ok

Mini Shell

Direktori : /proc/thread-self/root/home2/selectio/www/fms-worksuite/vendor/phpstan/phpstan/
Upload File :
Current File : //proc/thread-self/root/home2/selectio/www/fms-worksuite/vendor/phpstan/phpstan/phpstan.phar

#!/usr/bin/env php
<?php

Phar::mapPhar('phpstan.phar');

require 'phar://phpstan.phar/bin/phpstan';

__HALT_COMPILER(); ?>
�Q(vendor/clue/ndjson-react/src/Decoder.php����d�Y�쀤(vendor/clue/ndjson-react/src/Encoder.php����d���ܷ� vendor/clue/ndjson-react/LICENSE:���d:�DiG�vendor/autoload.php���d�|��9vendor/evenement/evenement/src/Evenement/EventEmitter.phpr���dr��,(�Bvendor/evenement/evenement/src/Evenement/EventEmitterInterface.php����d��?.�>vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php����d�=��"vendor/evenement/evenement/LICENSE ���d �{I=�4vendor/ringcentral/psr7/src/StreamDecoratorTrait.php���dJxw�,vendor/ringcentral/psr7/src/BufferStream.php���d�<Q�-vendor/ringcentral/psr7/src/StreamWrapper.php

���d

��N7�-vendor/ringcentral/psr7/src/InflateStream.php����d���Q�(vendor/ringcentral/psr7/src/Response.php
���d
s^�h�1vendor/ringcentral/psr7/src/functions_include.php����d�g
�#vendor/ringcentral/psr7/src/Uri.phpZ:���dZ:���-vendor/ringcentral/psr7/src/CachingStream.phpW���dW�U�2�(vendor/ringcentral/psr7/src/FnStream.php@���d@�c�פ/vendor/ringcentral/psr7/src/MultipartStream.php����d���B��,vendor/ringcentral/psr7/src/AppendStream.phpw���dw3Ƞ�)vendor/ringcentral/psr7/src/functions.php�[���d�[�l�:�&vendor/ringcentral/psr7/src/Stream.php����d����+vendor/ringcentral/psr7/src/LimitStream.php8���d8�3n�-vendor/ringcentral/psr7/src/ServerRequest.php���d�
*o�*vendor/ringcentral/psr7/src/PumpStream.php����d�X	�̤,vendor/ringcentral/psr7/src/NoSeekStream.php����d���,��,vendor/ringcentral/psr7/src/MessageTrait.php���dM	��.vendor/ringcentral/psr7/src/DroppingStream.php_���d_�a��.vendor/ringcentral/psr7/src/LazyOpenStream.php����d�o�\��'vendor/ringcentral/psr7/src/Request.php.���d.c�Sk�vendor/ringcentral/psr7/LICENSEW���dW��ؤ3vendor/react/promise-timer/src/TimeoutException.phpz���dz|�2�4vendor/react/promise-timer/src/functions_include.php����d��:7�,vendor/react/promise-timer/src/functions.php0���d0����"vendor/react/promise-timer/LICENSEg���dg��|�$vendor/react/promise/src/Promise.phpW!���dW!fI#��.vendor/react/promise/src/functions_include.php����d�
��Ѥ.vendor/react/promise/src/CancellationQueue.php����d��ψ�&vendor/react/promise/src/functions.php�3���d�3H<ͤ-vendor/react/promise/src/PromiseInterface.php���d�!�[�8vendor/react/promise/src/UnhandledRejectionException.phpr���drO=�(vendor/react/promise/src/LazyPromise.php����d�&Jt�%vendor/react/promise/src/Deferred.php����d�ڤ�	�.vendor/react/promise/src/PromisorInterface.php����d���)�6vendor/react/promise/src/Exception/LengthException.phpq���dq�Iz��8vendor/react/promise/src/CancellablePromiseInterface.php����d�O��-vendor/react/promise/src/FulfilledPromise.phph���dh#\��,vendor/react/promise/src/RejectedPromise.php����d��.��5vendor/react/promise/src/ExtendedPromiseInterface.php�
���d�
�![�vendor/react/promise/LICENSEg���dg�F�.vendor/react/event-loop/src/TimerInterface.php����d��:�
�'vendor/react/event-loop/src/Factory.php<���d<j?�L�,vendor/react/event-loop/src/ExtEventLoop.php����d���}�,vendor/react/event-loop/src/Timer/Timers.php
���d
�=�+vendor/react/event-loop/src/Timer/Timer.php6���d6$eN��.vendor/react/event-loop/src/SignalsHandler.php+���d+� և�)vendor/react/event-loop/src/ExtUvLoop.php�#���d�#b#�J�0vendor/react/event-loop/src/StreamSelectLoop.php/���d/s��,vendor/react/event-loop/src/ExtLibevLoop.php����d���ѳ�$vendor/react/event-loop/src/Loop.php9���d9��*�4vendor/react/event-loop/src/Tick/FutureTickQueue.php����d�V%�m�)vendor/react/event-loop/src/ExtEvLoop.php����d����/vendor/react/event-loop/src/ExtLibeventLoop.php�!���d�!�h��-vendor/react/event-loop/src/LoopInterface.php�K���d�K�!��vendor/react/event-loop/LICENSEu���du�{��/vendor/react/socket/src/ConnectionInterface.phpm���dmN��(vendor/react/socket/src/DnsConnector.php~���d~J��Z�%vendor/react/socket/src/TcpServer.phpj!���dj!2%Ĥ,vendor/react/socket/src/StreamEncryption.php0���d0�_��)vendor/react/socket/src/UnixConnector.phpJ���dJʸ�%vendor/react/socket/src/Connector.php����d���ܰ�&vendor/react/socket/src/Connection.php����d������"vendor/react/socket/src/Server.php�
���d�
*�{��(vendor/react/socket/src/TcpConnector.phph���dh.Q�'�(vendor/react/socket/src/SecureServer.php���d�,�D�2vendor/react/socket/src/HappyEyeBallsConnector.php����d�aF�9�*vendor/react/socket/src/LimitingServer.php����d����:vendor/react/socket/src/HappyEyeBallsConnectionBuilder.php�,���d�,̜@�+vendor/react/socket/src/SecureConnector.php����d�f�7�&vendor/react/socket/src/UnixServer.php����d��-&'�.vendor/react/socket/src/ConnectorInterface.php,���d,�<�1�,vendor/react/socket/src/TimeoutConnector.php.���d.p�;�(vendor/react/socket/src/SocketServer.php����d���,�-vendor/react/socket/src/FixedUriConnector.php<���d<�Ȼ�$vendor/react/socket/src/FdServer.php����d��82�+vendor/react/socket/src/ServerInterface.php����d���$�vendor/react/socket/LICENSEu���du�{��1vendor/react/stream/src/DuplexStreamInterface.php����d�s�)vendor/react/stream/src/ThroughStream.phpb���db8ݾ�2vendor/react/stream/src/ReadableResourceStream.phpx���dx,a�Z� vendor/react/stream/src/Util.php����d��E��2vendor/react/stream/src/WritableResourceStream.phpn���dn����3vendor/react/stream/src/ReadableStreamInterface.php�7���d�7�8q�3vendor/react/stream/src/WritableStreamInterface.php�9���d�9�_�0vendor/react/stream/src/DuplexResourceStream.php����d��]xd�+vendor/react/stream/src/CompositeStream.phph���dh�x���vendor/react/stream/LICENSEu���du�{��%vendor/react/cache/src/ArrayCache.php_���d_��)vendor/react/cache/src/CacheInterface.php0 ���d0 �p
�vendor/react/cache/LICENSEu���du�{��*vendor/react/child-process/src/Process.phpTE���dTE�2�H�"vendor/react/child-process/LICENSEu���du�{��,vendor/react/async/src/functions_include.php����d���>�$vendor/react/async/src/functions.php�4���d�4fH��vendor/react/async/LICENSE^���d^yT�3vendor/react/dns/src/Query/UdpTransportExecutor.phpd ���dd �C�9vendor/react/dns/src/Query/SelectiveTransportExecutor.php
���d
���]�/vendor/react/dns/src/Query/TimeoutException.phpj���dj~7��4vendor/react/dns/src/Query/CancellationException.phpv���dv�d��+vendor/react/dns/src/Query/CoopExecutor.php�
���d�
yr�Ť.vendor/react/dns/src/Query/CachingExecutor.phpU
���dU
�SM��,vendor/react/dns/src/Query/RetryExecutor.phpK
���dK

w+�.vendor/react/dns/src/Query/TimeoutExecutor.php����d��2��0vendor/react/dns/src/Query/HostsFileExecutor.php����d����r�3vendor/react/dns/src/Query/TcpTransportExecutor.php�5���d�5���[�0vendor/react/dns/src/Query/ExecutorInterface.php����d��'3�/vendor/react/dns/src/Query/FallbackExecutor.php����d��.��$vendor/react/dns/src/Query/Query.php���d���ݤ+vendor/react/dns/src/BadServerException.phpf���df��.g�&vendor/react/dns/src/Config/Config.phpK���dK��SM�)vendor/react/dns/src/Config/HostsFile.php����d�$]�r�0vendor/react/dns/src/RecordNotFoundException.phpk���dkB��Τ&vendor/react/dns/src/Model/Message.php����d��)^a�%vendor/react/dns/src/Model/Record.php����d���Y�.vendor/react/dns/src/Protocol/BinaryDumper.phpQ���dQg\)4�(vendor/react/dns/src/Protocol/Parser.php,���d,��8��)vendor/react/dns/src/Resolver/Factory.php����d���㙤3vendor/react/dns/src/Resolver/ResolverInterface.php����d��h;�*vendor/react/dns/src/Resolver/Resolver.php���d�;�Ѥvendor/react/dns/LICENSEu���du�{��3vendor/react/http/src/Message/ResponseException.php����d�D�_5�*vendor/react/http/src/Message/Response.phpB)���dB)C�3W�/vendor/react/http/src/Message/ServerRequest.php���d�I���)vendor/react/http/src/Message/Request.phpt	���dt		��	�!vendor/react/http/src/Browser.phpC|���dC|-�ä vendor/react/http/src/Server.phpF���dF�kw�'vendor/react/http/src/Client/Client.php����d��j���,vendor/react/http/src/Io/MultipartParser.php($���d($����"vendor/react/http/src/Io/Clock.php����d�/�k��/vendor/react/http/src/Io/ClientRequestState.php-���d-H�E�/vendor/react/http/src/Io/ReadableBodyStream.php
���d
)w~�2vendor/react/http/src/Io/CloseProtectionStream.php6���d6���k�-vendor/react/http/src/Io/MiddlewareRunner.php����d��5�T�0vendor/react/http/src/Io/LengthLimitedStream.php���d=?�b�)vendor/react/http/src/Io/BufferedBody.php����d�[��^�)vendor/react/http/src/Io/UploadedFile.php�	���d�	S灸�,vendor/react/http/src/Io/EmptyBodyStream.phpH���dH��o�$vendor/react/http/src/Io/IniUtil.phps���dsyd��,vendor/react/http/src/Io/StreamingServer.phpDC���dDC!ce��+vendor/react/http/src/Io/ChunkedDecoder.php/���d/��4N�0vendor/react/http/src/Io/RequestHeaderParser.php82���d82��~�4vendor/react/http/src/Io/ClientConnectionManager.php����d�sR�4�+vendor/react/http/src/Io/HttpBodyStream.php����d��B�8�+vendor/react/http/src/Io/ChunkedEncoder.phpQ���dQ��
s�(vendor/react/http/src/Io/Transaction.php�,���d�,��m��0vendor/react/http/src/Io/ClientRequestStream.php3%���d3%/�L�#vendor/react/http/src/Io/Sender.phps���ds�o{��.vendor/react/http/src/Io/PauseBufferStream.php���d�rK�$vendor/react/http/src/HttpServer.php�<���d�<Gn2f�?vendor/react/http/src/Middleware/StreamingRequestMiddleware.php/
���d/
ӏǒ�Fvendor/react/http/src/Middleware/LimitConcurrentRequestsMiddleware.php����d����`�@vendor/react/http/src/Middleware/RequestBodyParserMiddleware.php^���d^@��פ@vendor/react/http/src/Middleware/RequestBodyBufferMiddleware.php3���d3��4^�vendor/react/http/LICENSEu���du�{��vendor/psr/log/LICENSE=���d=p��O�/vendor/psr/log/Psr/Log/LoggerAwareInterface.php<���d<شI��&vendor/psr/log/Psr/Log/LoggerTrait.phpb
���db
-��:�*vendor/psr/log/Psr/Log/LoggerInterface.php5���d5!d���%vendor/psr/log/Psr/Log/NullLogger.php����d����)vendor/psr/log/Psr/Log/AbstractLogger.php���dN0��+vendor/psr/log/Psr/Log/LoggerAwareTrait.php����d�(���3vendor/psr/log/Psr/Log/InvalidArgumentException.phps���ds��,��#vendor/psr/log/Psr/Log/LogLevel.phpL���dL"���7vendor/psr/container/src/NotFoundExceptionInterface.php����d�Y�/vendor/psr/container/src/ContainerInterface.php"���d"rћ��8vendor/psr/container/src/ContainerExceptionInterface.php����d�b���vendor/psr/container/LICENSEy���dy�O�p�0vendor/psr/http-message/src/MessageInterface.php���d����,vendor/psr/http-message/src/UriInterface.phpD1���dD1V�{��5vendor/psr/http-message/src/UploadedFileInterface.phpO���dO�|�D�/vendor/psr/http-message/src/StreamInterface.php����d�#K1�1vendor/psr/http-message/src/ResponseInterface.php0
���d0
��{=�6vendor/psr/http-message/src/ServerRequestInterface.phpy'���dy'qǟ�0vendor/psr/http-message/src/RequestInterface.php����d�8�<դvendor/psr/http-message/LICENSE=���d=���,vendor/ondram/ci-detector/src/Ci/Jenkins.php����d�1�2�,vendor/ondram/ci-detector/src/Ci/Wercker.php.���d.C�ͤ*vendor/ondram/ci-detector/src/Ci/Buddy.php���d�҉Ƥ*vendor/ondram/ci-detector/src/Ci/Drone.php2���d2�]-�-vendor/ondram/ci-detector/src/Ci/Codeship.php���d�`50�+vendor/ondram/ci-detector/src/Ci/Bamboo.php8���d8���k�-vendor/ondram/ci-detector/src/Ci/AppVeyor.php����d���]��+vendor/ondram/ci-detector/src/Ci/Travis.php����d��L�t�0vendor/ondram/ci-detector/src/Ci/CiInterface.php����d�k�1��1vendor/ondram/ci-detector/src/Ci/AwsCodeBuild.php����d���|�2vendor/ondram/ci-detector/src/Ci/Continuousphp.phpi���di��I_�+vendor/ondram/ci-detector/src/Ci/GitLab.php���d�75�/vendor/ondram/ci-detector/src/Ci/AbstractCi.php����d��b��2vendor/ondram/ci-detector/src/Ci/GitHubActions.php���d���7vendor/ondram/ci-detector/src/Ci/BitbucketPipelines.php����d�9�2�+vendor/ondram/ci-detector/src/Ci/Circle.php����d��T�M�-vendor/ondram/ci-detector/src/Ci/TeamCity.php����d�E��k�Bvendor/ondram/ci-detector/src/Exception/CiNotDetectedException.php����d�$��,vendor/ondram/ci-detector/src/CiDetector.php�
���d�
�NY1�.vendor/ondram/ci-detector/src/TrinaryLogic.php?���d?�y�`�%vendor/ondram/ci-detector/src/Env.php����d���Җ�;vendor/fig/http-message-util/src/RequestMethodInterface.php����d�Fʬ��8vendor/fig/http-message-util/src/StatusCodeInterface.phpy���dy�6�$vendor/fig/http-message-util/LICENSE=���d=��?�0vendor/jetbrains/phpstorm-stubs/xdiff/xdiff.stub"(���d"(����Cvendor/jetbrains/phpstorm-stubs/meta/attributes/ExpectedValues.stub����d�ђ~��=vendor/jetbrains/phpstorm-stubs/meta/attributes/Language.stub����d��MJ��9vendor/jetbrains/phpstorm-stubs/meta/attributes/Pure.stub����d�;Ś��Pvendor/jetbrains/phpstorm-stubs/meta/attributes/internal/ReturnTypeContract.stubh���dh�<
x�Tvendor/jetbrains/phpstorm-stubs/meta/attributes/internal/LanguageLevelTypeAware.stubo���do��%��[vendor/jetbrains/phpstorm-stubs/meta/attributes/internal/PhpStormStubsElementAvailable.stub����d�e3�Kvendor/jetbrains/phpstorm-stubs/meta/attributes/internal/TentativeType.stub����d�()��?vendor/jetbrains/phpstorm-stubs/meta/attributes/Deprecated.stub����d���z��=vendor/jetbrains/phpstorm-stubs/meta/attributes/NoReturn.stub����d��4���>vendor/jetbrains/phpstorm-stubs/meta/attributes/Immutable.stub����d��a'��?vendor/jetbrains/phpstorm-stubs/meta/attributes/ArrayShape.stubV���dVO7��8vendor/jetbrains/phpstorm-stubs/libsodium/libsodium.stube<���de<�`-�,vendor/jetbrains/phpstorm-stubs/zip/zip.stub1����d1���L�0vendor/jetbrains/phpstorm-stubs/event/event.stub�����d���zI�6vendor/jetbrains/phpstorm-stubs/mqseries/mqseries.stub�����d��1%�8vendor/jetbrains/phpstorm-stubs/blackfire/blackfire.stubH���dHZ�4�8vendor/jetbrains/phpstorm-stubs/cassandra/cassandra.stub	���d	3��Ԥ.vendor/jetbrains/phpstorm-stubs/dom/dom_c.stub6S���d6S4|�,vendor/jetbrains/phpstorm-stubs/dom/dom.stuby���dy�9��8vendor/jetbrains/phpstorm-stubs/xmlreader/xmlreader.stub+9���d+9_���.vendor/jetbrains/phpstorm-stubs/v8js/v8js.stub���d�U�9�8vendor/jetbrains/phpstorm-stubs/ZendUtils/ZendUtils.stub8���d8�܌�6vendor/jetbrains/phpstorm-stubs/fileinfo/fileinfo.stub� ���d� ��,�4vendor/jetbrains/phpstorm-stubs/enchant/enchant.stub�)���d�)�R��0vendor/jetbrains/phpstorm-stubs/stats/stats.stub"H���d"H��e�,vendor/jetbrains/phpstorm-stubs/bz2/bz2.stubq���dq�4��4vendor/jetbrains/phpstorm-stubs/sysvshm/sysvshm.stub>���d>���2vendor/jetbrains/phpstorm-stubs/bcmath/bcmath.stub�"���d�"*��Ԥ2vendor/jetbrains/phpstorm-stubs/pgsql/pgsql_c.stub����d���޲�0vendor/jetbrains/phpstorm-stubs/pgsql/pgsql.stub�k���d�k�u�b�.vendor/jetbrains/phpstorm-stubs/dio/dio_d.stub����d�C�,vendor/jetbrains/phpstorm-stubs/dio/dio.stub�%���d�%�'�&�,vendor/jetbrains/phpstorm-stubs/rar/rar.stub�_���d�_EQ`�4vendor/jetbrains/phpstorm-stubs/leveldb/LevelDB.stub����d�;���.vendor/jetbrains/phpstorm-stubs/ming/ming.stubr"���dr"2�: �3vendor/jetbrains/phpstorm-stubs/ftp/Connection.stubG���dG��!�,vendor/jetbrains/phpstorm-stubs/ftp/ftp.stubj���dj�G�$�0vendor/jetbrains/phpstorm-stubs/xxtea/xxtea.stub����d��$nڤ,vendor/jetbrains/phpstorm-stubs/eio/eio.stubfy���dfy��4vendor/jetbrains/phpstorm-stubs/rpminfo/rpminfo.stub,���d,�w��2vendor/jetbrains/phpstorm-stubs/SQLite/SQLite.stubl����dl�
L�4vendor/jetbrains/phpstorm-stubs/inotify/inotify.stubN���dNn���4vendor/jetbrains/phpstorm-stubs/imagick/imagick.stub4����d4���vä2vendor/jetbrains/phpstorm-stubs/filter/filter.stub�;���d�;v2֬�.vendor/jetbrains/phpstorm-stubs/exif/exif.stub����d�	0	Ѥ.vendor/jetbrains/phpstorm-stubs/grpc/grpc.stub�Y���d�YX�K٤2vendor/jetbrains/phpstorm-stubs/phpdbg/phpdbg.stubg���dgAȾO�,vendor/jetbrains/phpstorm-stubs/xsl/xsl.stub����d�o�oq�.vendor/jetbrains/phpstorm-stubs/imap/imap.stub<����d<�9dh�4vendor/jetbrains/phpstorm-stubs/imap/Connection.stubH���dHF�?��8vendor/jetbrains/phpstorm-stubs/redis/RedisSentinel.stub����d��>��0vendor/jetbrains/phpstorm-stubs/redis/Redis.stub�����d������5vendor/jetbrains/phpstorm-stubs/redis/RedisArray.stubL���dLf�L�7vendor/jetbrains/phpstorm-stubs/redis/RedisCluster.stub�����d��wN��4vendor/jetbrains/phpstorm-stubs/decimal/decimal.stub<<���d<<z�y�2vendor/jetbrains/phpstorm-stubs/xhprof/xhprof.stub����d��g"դ2vendor/jetbrains/phpstorm-stubs/xdebug/xdebug.stub'3���d'3���4vendor/jetbrains/phpstorm-stubs/ibm_db2/ibm_db2.stubI����dI�����,vendor/jetbrains/phpstorm-stubs/gmp/gmp.stub�u���d�u)���2vendor/jetbrains/phpstorm-stubs/cubrid/cubrid.stub�����d����Ǥ>vendor/jetbrains/phpstorm-stubs/ZendDebugger/ZendDebugger.stub���dw�!�8vendor/jetbrains/phpstorm-stubs/mailparse/mailparse.stubw���dw�r�.vendor/jetbrains/phpstorm-stubs/pcre/pcre.stubzP���dzPȨ�y�4vendor/jetbrains/phpstorm-stubs/pspell/pspell_c.stub���dR�� �2vendor/jetbrains/phpstorm-stubs/pspell/pspell.stubq.���dq.�0\�.vendor/jetbrains/phpstorm-stubs/json/json.stubx4���dx4T�Q�6vendor/jetbrains/phpstorm-stubs/igbinary/igbinary.stub����d�o/��.vendor/jetbrains/phpstorm-stubs/ssh2/ssh2.stub4Y���d4Y�?���2vendor/jetbrains/phpstorm-stubs/apache/apache.stub-���d-��L��3vendor/jetbrains/phpstorm-stubs/relay/Sentinel.stubQ���dQ(z��2vendor/jetbrains/phpstorm-stubs/relay/KeyType.stub����d��ۼ��4vendor/jetbrains/phpstorm-stubs/relay/Exception.stubc���dcr��!�0vendor/jetbrains/phpstorm-stubs/relay/Event.stub����d����0vendor/jetbrains/phpstorm-stubs/relay/Relay.stub�p���d�p����4vendor/jetbrains/phpstorm-stubs/meminfo/meminfo.stub����d��rbɤ2vendor/jetbrains/phpstorm-stubs/sqlsrv/sqlsrv.stub~����d~���i�4vendor/jetbrains/phpstorm-stubs/aerospike/Bytes.stub���d��ʍ�8vendor/jetbrains/phpstorm-stubs/aerospike/aerospike.stub�O���d�O#�2V�8vendor/jetbrains/phpstorm-stubs/zookeeper/zookeeper.stub")���d")	ޛ�.vendor/jetbrains/phpstorm-stubs/apcu/apcu.stub[n���d[nF���4vendor/jetbrains/phpstorm-stubs/uv/uv_functions.stub�l���d�l[x�*vendor/jetbrains/phpstorm-stubs/uv/UV.stubH���dH����.vendor/jetbrains/phpstorm-stubs/odbc/odbc.stubQs���dQs��`�<vendor/jetbrains/phpstorm-stubs/elastic_apm/elastic_apm.stub�~���d�~����8vendor/jetbrains/phpstorm-stubs/xmlwriter/xmlwriter.stubz����dz��=g�.vendor/jetbrains/phpstorm-stubs/wddx/wddx.stub
���d
)*A�0vendor/jetbrains/phpstorm-stubs/ctype/ctype.stubR���dRP���.vendor/jetbrains/phpstorm-stubs/uopz/uopz.stub�&���d�&-#��0vendor/jetbrains/phpstorm-stubs/date/date_d.stub"���d"��e��.vendor/jetbrains/phpstorm-stubs/date/date.stub$����d$��1ɤ0vendor/jetbrains/phpstorm-stubs/date/date_c.stubN����dN�ـR�2vendor/jetbrains/phpstorm-stubs/libxml/libxml.stub�$���d�$�?!��.vendor/jetbrains/phpstorm-stubs/Phar/Phar.stub����d��J���8vendor/jetbrains/phpstorm-stubs/winbinder/winbinder.stubx����dx��:��6vendor/jetbrains/phpstorm-stubs/mbstring/mbstring.stub����d�\��g�,vendor/jetbrains/phpstorm-stubs/PDO/PDO.stubr-���dr-.��'vendor/jetbrains/phpstorm-stubs/LICENSEW,���dW,M��̤,vendor/jetbrains/phpstorm-stubs/FFI/FFI.stub�M���d�M�t��*vendor/jetbrains/phpstorm-stubs/Ev/Ev.stubx����dx��Ԑ�+vendor/jetbrains/phpstorm-stubs/PATCHES.txt����d�>��2vendor/jetbrains/phpstorm-stubs/SaxonC/SaxonC.stubl����dl��# ��2vendor/jetbrains/phpstorm-stubs/xmlrpc/xmlrpc.stub����d�����8vendor/jetbrains/phpstorm-stubs/standard/standard_0.stub"����d"��Uz��8vendor/jetbrains/phpstorm-stubs/standard/standard_8.stubT����dT���(�8vendor/jetbrains/phpstorm-stubs/standard/standard_6.stube����de�'�,̤4vendor/jetbrains/phpstorm-stubs/standard/_types.stub�H���d�H::<�8vendor/jetbrains/phpstorm-stubs/standard/standard_9.stub�����d��
/I��3vendor/jetbrains/phpstorm-stubs/standard/basic.stub�,���d�,�ʙ*�8vendor/jetbrains/phpstorm-stubs/standard/standard_3.stub
y���d
y��Tl�6vendor/jetbrains/phpstorm-stubs/standard/password.stub'���d'�O�u�8vendor/jetbrains/phpstorm-stubs/standard/standard_5.stub���d�
4�8vendor/jetbrains/phpstorm-stubs/standard/standard_2.stub����d��G4��8vendor/jetbrains/phpstorm-stubs/standard/standard_7.stub����d�.�Ť8vendor/jetbrains/phpstorm-stubs/standard/standard_4.stub:����d:���Ф�>vendor/jetbrains/phpstorm-stubs/standard/_standard_manual.stub)���d)�ػD�8vendor/jetbrains/phpstorm-stubs/standard/standard_1.stub�����d����Ĥ>vendor/jetbrains/phpstorm-stubs/standard/standard_defines.stub�����d���W���/vendor/jetbrains/phpstorm-stubs/Inspections.xml����d�wl�*vendor/jetbrains/phpstorm-stubs/pq/pq.stub�+���d�+Q��Q�0vendor/jetbrains/phpstorm-stubs/mssql/mssql.stub6M���d6M�W˟�?vendor/jetbrains/phpstorm-stubs/superglobals/_superglobals.stub����d�nσ�.vendor/jetbrains/phpstorm-stubs/oci8/oci8.stub�o���d�oh!p��0vendor/jetbrains/phpstorm-stubs/oci8/oci8v3.stub-7���d-7>"
�.vendor/jetbrains/phpstorm-stubs/gd/GdFont.stub3���d3`I=�*vendor/jetbrains/phpstorm-stubs/gd/gd.stubڈ���dڈ�n��6vendor/jetbrains/phpstorm-stubs/wincache/wincache.stuba���da�Ѓ�*vendor/jetbrains/phpstorm-stubs/ds/ds.stub�����d���|�.vendor/jetbrains/phpstorm-stubs/zstd/zstd.stub���d�L�V�>vendor/jetbrains/phpstorm-stubs/parallel/parallel/Runtime.stub����d�0��ˤ=vendor/jetbrains/phpstorm-stubs/parallel/parallel/Future.stub`���d`.?DäNvendor/jetbrains/phpstorm-stubs/parallel/parallel/Sync/Error/IllegalValue.stube���de>w�Avendor/jetbrains/phpstorm-stubs/parallel/parallel/Sync/Error.stubH���dH��b�Vvendor/jetbrains/phpstorm-stubs/parallel/parallel/Events/Input/Error/IllegalValue.stubu���dui����Svendor/jetbrains/phpstorm-stubs/parallel/parallel/Events/Input/Error/Existence.stubr���dr��7o�Ivendor/jetbrains/phpstorm-stubs/parallel/parallel/Events/Input/Error.stubP���dP?���Mvendor/jetbrains/phpstorm-stubs/parallel/parallel/Events/Error/Existence.stubf���df�R�b�Kvendor/jetbrains/phpstorm-stubs/parallel/parallel/Events/Error/Timeout.stubd���dd�J�6�Cvendor/jetbrains/phpstorm-stubs/parallel/parallel/Events/Error.stubJ���dJ�ž��Hvendor/jetbrains/phpstorm-stubs/parallel/parallel/Events/Event/Type.stub.���d.ϞZ>�Ivendor/jetbrains/phpstorm-stubs/parallel/parallel/Events/Event/Error.stubP���dP��R��Cvendor/jetbrains/phpstorm-stubs/parallel/parallel/Events/Event.stub����d�̀�8�Cvendor/jetbrains/phpstorm-stubs/parallel/parallel/Events/Input.stub0���d0�>��Mvendor/jetbrains/phpstorm-stubs/parallel/parallel/Future/Error/Cancelled.stub_���d_����Kvendor/jetbrains/phpstorm-stubs/parallel/parallel/Future/Error/Foreign.stub]���d]}�Jvendor/jetbrains/phpstorm-stubs/parallel/parallel/Future/Error/Killed.stub\���d\�<
�Cvendor/jetbrains/phpstorm-stubs/parallel/parallel/Future/Error.stubJ���dJ�b��=vendor/jetbrains/phpstorm-stubs/parallel/parallel/Events.stub�
���d�
��ܤ<vendor/jetbrains/phpstorm-stubs/parallel/parallel/Error.stub:���d:{���Qvendor/jetbrains/phpstorm-stubs/parallel/parallel/Channel/Error/IllegalValue.stubk���dk���Nvendor/jetbrains/phpstorm-stubs/parallel/parallel/Channel/Error/Existence.stubh���dh��yäKvendor/jetbrains/phpstorm-stubs/parallel/parallel/Channel/Error/Closed.stube���de��z�Dvendor/jetbrains/phpstorm-stubs/parallel/parallel/Channel/Error.stubK���dK��%�;vendor/jetbrains/phpstorm-stubs/parallel/parallel/Sync.stub����d�4�R��Ovendor/jetbrains/phpstorm-stubs/parallel/parallel/Runtime/Type/Unavailable.stub>���d>�^���Nvendor/jetbrains/phpstorm-stubs/parallel/parallel/Runtime/Error/Bootstrap.stubh���dhU<H��Uvendor/jetbrains/phpstorm-stubs/parallel/parallel/Runtime/Error/IllegalParameter.stubo���do#���Rvendor/jetbrains/phpstorm-stubs/parallel/parallel/Runtime/Error/IllegalReturn.stubl���dl$�Tvendor/jetbrains/phpstorm-stubs/parallel/parallel/Runtime/Error/IllegalVariable.stubn���dn�[�Kvendor/jetbrains/phpstorm-stubs/parallel/parallel/Runtime/Error/Killed.stube���de�7ۑ�Kvendor/jetbrains/phpstorm-stubs/parallel/parallel/Runtime/Error/Closed.stube���de�pp�Wvendor/jetbrains/phpstorm-stubs/parallel/parallel/Runtime/Error/IllegalInstruction.stubq���dqZ�G��Tvendor/jetbrains/phpstorm-stubs/parallel/parallel/Runtime/Error/IllegalFunction.stubn���dn�� ��Qvendor/jetbrains/phpstorm-stubs/parallel/parallel/Runtime/Object/Unavailable.stub@���d@:�Ǧ�Dvendor/jetbrains/phpstorm-stubs/parallel/parallel/Runtime/Error.stubK���dK�����>vendor/jetbrains/phpstorm-stubs/parallel/parallel/Channel.stub(���d(��&�6vendor/jetbrains/phpstorm-stubs/parallel/parallel.stub���d�z�.vendor/jetbrains/phpstorm-stubs/judy/judy.stubF"���dF"q��3�@vendor/jetbrains/phpstorm-stubs/mosquitto-php/mosquitto-php.stub�5���d�5�e��:vendor/jetbrains/phpstorm-stubs/com_dotnet/com_dotnet.stubf/���df/�b�4vendor/jetbrains/phpstorm-stubs/pdo_ibm/pdo_ibm.stubf���df�<7Ȥ.vendor/jetbrains/phpstorm-stubs/pcov/pcov.stub���d\�X��6vendor/jetbrains/phpstorm-stubs/rdkafka/functions.stub���d���<vendor/jetbrains/phpstorm-stubs/rdkafka/RdKafka/Message.stubr���drb��W�Bvendor/jetbrains/phpstorm-stubs/rdkafka/RdKafka/ConsumerTopic.stub���d��>�Bvendor/jetbrains/phpstorm-stubs/rdkafka/RdKafka/KafkaConsumer.stubq
���dq
F�!�Cvendor/jetbrains/phpstorm-stubs/rdkafka/RdKafka/TopicPartition.stub!���d!�9<�=vendor/jetbrains/phpstorm-stubs/rdkafka/RdKafka/Metadata.stub����d���ώ�Gvendor/jetbrains/phpstorm-stubs/rdkafka/RdKafka/KafkaConsumerTopic.stub���d�C�٤9vendor/jetbrains/phpstorm-stubs/rdkafka/RdKafka/Conf.stubq���dq���8�>vendor/jetbrains/phpstorm-stubs/rdkafka/RdKafka/TopicConf.stub���d�x��:vendor/jetbrains/phpstorm-stubs/rdkafka/RdKafka/Topic.stub{���d{�t{=�Dvendor/jetbrains/phpstorm-stubs/rdkafka/RdKafka/Metadata/Broker.stub����d�IQuR�Gvendor/jetbrains/phpstorm-stubs/rdkafka/RdKafka/Metadata/Partition.stub����d���Cvendor/jetbrains/phpstorm-stubs/rdkafka/RdKafka/Metadata/Topic.stub���d��c�Hvendor/jetbrains/phpstorm-stubs/rdkafka/RdKafka/Metadata/Collection.stub����d��L��=vendor/jetbrains/phpstorm-stubs/rdkafka/RdKafka/Producer.stub9���d9�߲�Hvendor/jetbrains/phpstorm-stubs/rdkafka/RdKafka/KafkaErrorException.stub����d�Q���>vendor/jetbrains/phpstorm-stubs/rdkafka/RdKafka/Exception.stubA���dAD/Q��Bvendor/jetbrains/phpstorm-stubs/rdkafka/RdKafka/ProducerTopic.stuba���da���=vendor/jetbrains/phpstorm-stubs/rdkafka/RdKafka/Consumer.stub����d��T�Y�:vendor/jetbrains/phpstorm-stubs/rdkafka/RdKafka/Queue.stub����d���hh�6vendor/jetbrains/phpstorm-stubs/rdkafka/constants.stub�#���d�#����4vendor/jetbrains/phpstorm-stubs/rdkafka/RdKafka.stubq���dq�;�Ҥ2vendor/jetbrains/phpstorm-stubs/recode/recode.stub����d��O�0vendor/jetbrains/phpstorm-stubs/uuid/uuid_c.stub����d�}��j�<vendor/jetbrains/phpstorm-stubs/libvirt-php/libvirt-php.stub�9���d�9��:`�8vendor/jetbrains/phpstorm-stubs/interbase/interbase.stub�����d������4vendor/jetbrains/phpstorm-stubs/ncurses/ncurses.stub����d�*�֩�4vendor/jetbrains/phpstorm-stubs/suhosin/suhosin.stub����d���Q�2vendor/jetbrains/phpstorm-stubs/mysqli/mysqli.stub�����d����#��.vendor/jetbrains/phpstorm-stubs/geos/geos.stub�A���d�A��U�Rvendor/jetbrains/phpstorm-stubs/solr/Exceptions/SolrIllegalOperationException.stub����d�-N%��[vendor/jetbrains/phpstorm-stubs/solr/Exceptions/SolrMissingMandatoryParameterException.stub����d���n��Hvendor/jetbrains/phpstorm-stubs/solr/Exceptions/SolrClientException.stubs���ds�GP�Qvendor/jetbrains/phpstorm-stubs/solr/Exceptions/SolrIllegalArgumentException.stub����d�)�4�Hvendor/jetbrains/phpstorm-stubs/solr/Exceptions/SolrServerException.stuby���dyC�$��Bvendor/jetbrains/phpstorm-stubs/solr/Exceptions/SolrException.stub����d�&�Fvendor/jetbrains/phpstorm-stubs/solr/Queries/SolrCollapseFunction.stub����d�E
�;vendor/jetbrains/phpstorm-stubs/solr/Queries/SolrQuery.stubs>���ds>���Fvendor/jetbrains/phpstorm-stubs/solr/Queries/SolrModifiableParams.stubk���dk%���<vendor/jetbrains/phpstorm-stubs/solr/Queries/SolrParams.stub����d�(�D�Avendor/jetbrains/phpstorm-stubs/solr/Queries/SolrDisMaxQuery.stub-���d-I!��3vendor/jetbrains/phpstorm-stubs/solr/functions.stub����d�A�A�4vendor/jetbrains/phpstorm-stubs/solr/SolrClient.stub�M���d�MC|���Evendor/jetbrains/phpstorm-stubs/solr/Documents/SolrInputDocument.stub�&���d�&?J��@vendor/jetbrains/phpstorm-stubs/solr/Documents/SolrDocument.stub�/���d�/�F&��Evendor/jetbrains/phpstorm-stubs/solr/Documents/SolrDocumentField.stub���d

\�3vendor/jetbrains/phpstorm-stubs/solr/constants.stubD���dD��c�9vendor/jetbrains/phpstorm-stubs/solr/Utils/SolrUtils.stub�	���d�	��O�:vendor/jetbrains/phpstorm-stubs/solr/Utils/SolrObject.stub
���d
�t
��@vendor/jetbrains/phpstorm-stubs/solr/Responses/SolrResponse.stub����d�/I�%�Dvendor/jetbrains/phpstorm-stubs/solr/Responses/SolrPingResponse.stub����d�ޡ�ޤFvendor/jetbrains/phpstorm-stubs/solr/Responses/SolrUpdateResponse.stub%���d%>H�٤Gvendor/jetbrains/phpstorm-stubs/solr/Responses/SolrGenericResponse.stub+���d+�����Evendor/jetbrains/phpstorm-stubs/solr/Responses/SolrQueryResponse.stub���d�ɤ.vendor/jetbrains/phpstorm-stubs/zlib/zlib.stub�K���d�K�Z�Ԥ,vendor/jetbrains/phpstorm-stubs/svm/SVM.stubz���dz�Ф1vendor/jetbrains/phpstorm-stubs/svm/SVMModel.stub����d�
��p�,vendor/jetbrains/phpstorm-stubs/xml/xml.stub�U���d�UQK��4vendor/jetbrains/phpstorm-stubs/SplType/SplType.stub�
���d�
�o���9vendor/jetbrains/phpstorm-stubs/snappy/snappy/snappy.stub���d ��Bvendor/jetbrains/phpstorm-stubs/uploadprogress/uploadprogress.stub���d�r݋�4vendor/jetbrains/phpstorm-stubs/gmagick/gmagick.stub�j���d�jY\��.vendor/jetbrains/phpstorm-stubs/sync/sync.stubi7���di7VB��4vendor/jetbrains/phpstorm-stubs/sysvsem/sysvsem.stub�
���d�
zX�,vendor/jetbrains/phpstorm-stubs/yar/yar.stub���d���ۤ:vendor/jetbrains/phpstorm-stubs/pdo_sqlite/pdo_sqlite.stubC���dC�%�,vendor/jetbrains/phpstorm-stubs/SPL/SPL.stub����d��x�	�.vendor/jetbrains/phpstorm-stubs/SPL/SPL_f.stubm���dm�O:ä/vendor/jetbrains/phpstorm-stubs/SPL/SPL_c1.stubC:���dC:��
�8vendor/jetbrains/phpstorm-stubs/ZendCache/ZendCache.stub���d�ab�0vendor/jetbrains/phpstorm-stubs/stomp/stomp.stubA"���dA"!K��+vendor/jetbrains/phpstorm-stubs/runTests.sh`���d`�Rz1�2vendor/jetbrains/phpstorm-stubs/radius/radius.stub�G���d�G�4g��8vendor/jetbrains/phpstorm-stubs/pdo_mysql/pdo_mysql.stubA���dAH~��8vendor/jetbrains/phpstorm-stubs/memcached/memcached.stub�����d��H@��0vendor/jetbrains/phpstorm-stubs/iconv/iconv.stub�5���d�51�+G�,vendor/jetbrains/phpstorm-stubs/rrd/rrd.stub0���d0��Τ.vendor/jetbrains/phpstorm-stubs/amqp/amqp.stub�����d���g~�0vendor/jetbrains/phpstorm-stubs/zend/zend_f.stub.���d.6��x�.vendor/jetbrains/phpstorm-stubs/zend/zend.stub�X���d�X��B
�0vendor/jetbrains/phpstorm-stubs/zend/zend_d.stub���d�-|j�4vendor/jetbrains/phpstorm-stubs/sysvmsg/sysvmsg.stub�&���d�&
��4vendor/jetbrains/phpstorm-stubs/openssl/openssl.stubI����dI���ܤ0vendor/jetbrains/phpstorm-stubs/mongo/mongo.stub�����d��;n��0vendor/jetbrains/phpstorm-stubs/pcntl/pcntl.stub�U���d�U�>d:�0vendor/jetbrains/phpstorm-stubs/oauth/oauth.stubb ���db ��bp�.vendor/jetbrains/phpstorm-stubs/snmp/snmp.stub����d�����2vendor/jetbrains/phpstorm-stubs/intl/IntlChar.stub.���d.R�ˤ.vendor/jetbrains/phpstorm-stubs/intl/intl.stubsh���dsh")���Bvendor/jetbrains/phpstorm-stubs/intl/IntlDatePatternGenerator.stub���d$��J�2vendor/jetbrains/phpstorm-stubs/expect/expect.stub����d�I�.Ȥ2vendor/jetbrains/phpstorm-stubs/crypto/crypto.stub1?���d1?ګפ0vendor/jetbrains/phpstorm-stubs/gnupg/gnupg.stub!I���d!I0��i�8vendor/jetbrains/phpstorm-stubs/couchbase/couchbase.stub�����d���Q3�0vendor/jetbrains/phpstorm-stubs/Core/Core_c.stub%����d%�mAs�.vendor/jetbrains/phpstorm-stubs/Core/Core.stubw����dw��h��0vendor/jetbrains/phpstorm-stubs/Core/Core_d.stub�#���d�#����.vendor/jetbrains/phpstorm-stubs/tidy/tidy.stub����d�/^\�,vendor/jetbrains/phpstorm-stubs/lua/lua.stub<	���d<	�€�.vendor/jetbrains/phpstorm-stubs/yaml/yaml.stubh���dh�{�Ȥ4vendor/jetbrains/phpstorm-stubs/gearman/gearman.stub�����d����5vendor/jetbrains/phpstorm-stubs/swoole/functions.stub8"���d8"6|��@vendor/jetbrains/phpstorm-stubs/swoole/Swoole/ExitException.stub ���d ��_�Gvendor/jetbrains/phpstorm-stubs/swoole/Swoole/WebSocket/CloseFrame.stub����d��%���Cvendor/jetbrains/phpstorm-stubs/swoole/Swoole/WebSocket/Server.stub����d��!Af�Bvendor/jetbrains/phpstorm-stubs/swoole/Swoole/WebSocket/Frame.stub���dD��>vendor/jetbrains/phpstorm-stubs/swoole/Swoole/Atomic/Long.stub����d�����:vendor/jetbrains/phpstorm-stubs/swoole/Swoole/Runtime.stub���d���?vendor/jetbrains/phpstorm-stubs/swoole/Swoole/Process/Pool.stub����d�L4!�7vendor/jetbrains/phpstorm-stubs/swoole/Swoole/Lock.stub���d�.�n�@vendor/jetbrains/phpstorm-stubs/swoole/Swoole/Http/Response.stub����d���c��?vendor/jetbrains/phpstorm-stubs/swoole/Swoole/Http/Request.stub����d���],�>vendor/jetbrains/phpstorm-stubs/swoole/Swoole/Http/Server.stub`���d`Y��Avendor/jetbrains/phpstorm-stubs/swoole/Swoole/Timer/Iterator.stub����d�g8'�8vendor/jetbrains/phpstorm-stubs/swoole/Swoole/Timer.stub{���d{��U��?vendor/jetbrains/phpstorm-stubs/swoole/Swoole/Redis/Server.stub�	���d�	�?��9vendor/jetbrains/phpstorm-stubs/swoole/Swoole/Server.stubq&���dq&��EĤDvendor/jetbrains/phpstorm-stubs/swoole/Swoole/Server/StatusInfo.stub����d��.���Evendor/jetbrains/phpstorm-stubs/swoole/Swoole/Server/PipeMessage.stub����d�v�D�>vendor/jetbrains/phpstorm-stubs/swoole/Swoole/Server/Task.stub����d�eZ<u�?vendor/jetbrains/phpstorm-stubs/swoole/Swoole/Server/Event.stub����d���4�>vendor/jetbrains/phpstorm-stubs/swoole/Swoole/Server/Port.stub����d�_{��Dvendor/jetbrains/phpstorm-stubs/swoole/Swoole/Server/TaskResult.stub����d�K���@vendor/jetbrains/phpstorm-stubs/swoole/Swoole/Server/Packet.stub����d�+���Fvendor/jetbrains/phpstorm-stubs/swoole/Swoole/Connection/Iterator.stub����d�fo�Ƥ:vendor/jetbrains/phpstorm-stubs/swoole/Swoole/Process.stub����d�8<ڋ�Avendor/jetbrains/phpstorm-stubs/swoole/Swoole/Http2/Response.stub���di�@vendor/jetbrains/phpstorm-stubs/swoole/Swoole/Http2/Request.stub����d���H1�8vendor/jetbrains/phpstorm-stubs/swoole/Swoole/Error.stubR���dR��T�Cvendor/jetbrains/phpstorm-stubs/swoole/Swoole/Client/Exception.stubh���dh���;�<vendor/jetbrains/phpstorm-stubs/swoole/Swoole/Exception.stubZ���dZ����Dvendor/jetbrains/phpstorm-stubs/swoole/Swoole/Coroutine/Context.stub����d�����Bvendor/jetbrains/phpstorm-stubs/swoole/Swoole/Coroutine/MySQL.stub<���d<�&��Evendor/jetbrains/phpstorm-stubs/swoole/Swoole/Coroutine/Iterator.stub����d�4;�Lvendor/jetbrains/phpstorm-stubs/swoole/Swoole/Coroutine/MySQL/Statement.stub����d��5��Lvendor/jetbrains/phpstorm-stubs/swoole/Swoole/Coroutine/MySQL/Exception.stubq���dqQ�ï�Hvendor/jetbrains/phpstorm-stubs/swoole/Swoole/Coroutine/Http/Server.stub���d�y�*�Rvendor/jetbrains/phpstorm-stubs/swoole/Swoole/Coroutine/Http/Client/Exception.stubw���dw���Hvendor/jetbrains/phpstorm-stubs/swoole/Swoole/Coroutine/Http/Client.stub)���d)g&�Mvendor/jetbrains/phpstorm-stubs/swoole/Swoole/Coroutine/Socket/Exception.stubr���dr-| ��Cvendor/jetbrains/phpstorm-stubs/swoole/Swoole/Coroutine/System.stub�
���d�
S�AۤBvendor/jetbrains/phpstorm-stubs/swoole/Swoole/Coroutine/Redis.stub�m���d�m�%T��Svendor/jetbrains/phpstorm-stubs/swoole/Swoole/Coroutine/Http2/Client/Exception.stubx���dxP
�Ivendor/jetbrains/phpstorm-stubs/swoole/Swoole/Coroutine/Http2/Client.stubo���do��G>�Kvendor/jetbrains/phpstorm-stubs/swoole/Swoole/Coroutine/Curl/Exception.stubp���dp{�_ԤCvendor/jetbrains/phpstorm-stubs/swoole/Swoole/Coroutine/Socket.stuba���da�M���Fvendor/jetbrains/phpstorm-stubs/swoole/Swoole/Coroutine/Scheduler.stub����d��9���Cvendor/jetbrains/phpstorm-stubs/swoole/Swoole/Coroutine/Client.stub����d�p�ծ�Dvendor/jetbrains/phpstorm-stubs/swoole/Swoole/Coroutine/Channel.stub���d�O�h�8vendor/jetbrains/phpstorm-stubs/swoole/Swoole/Event.stub����d��w���9vendor/jetbrains/phpstorm-stubs/swoole/Swoole/Client.stub	���d	���Ѥ<vendor/jetbrains/phpstorm-stubs/swoole/Swoole/Coroutine.stub����d�N�ˤ9vendor/jetbrains/phpstorm-stubs/swoole/Swoole/Atomic.stub����d��eKͤ8vendor/jetbrains/phpstorm-stubs/swoole/Swoole/Table.stub����d�Ƃwդ3vendor/jetbrains/phpstorm-stubs/swoole/aliases.stubX���dX��ᕤ5vendor/jetbrains/phpstorm-stubs/swoole/constants.stub�A���d�A@�y��9vendor/jetbrains/phpstorm-stubs/Zend OPcache/OPcache.stubm
���dm
�I�m�0vendor/jetbrains/phpstorm-stubs/Parle/Token.stub����d�N����9vendor/jetbrains/phpstorm-stubs/Parle/LexerException.stubw���dw^Ut��0vendor/jetbrains/phpstorm-stubs/Parle/Stack.stub#���d#�K�5�2vendor/jetbrains/phpstorm-stubs/Parle/RParser.stub����d��ɥФ0vendor/jetbrains/phpstorm-stubs/Parle/Lexer.stub*���d*;� ��1vendor/jetbrains/phpstorm-stubs/Parle/Parser.stub,���d,����1vendor/jetbrains/phpstorm-stubs/Parle/RLexer.stub����d�w���:vendor/jetbrains/phpstorm-stubs/Parle/ParserException.stubx���dxL��4vendor/jetbrains/phpstorm-stubs/Parle/ErrorInfo.stubA���dA��@vendor/jetbrains/phpstorm-stubs/mysql_xdevapi/mysql_xdevapi.stub�����d��^��8vendor/jetbrains/phpstorm-stubs/pdo_pgsql/pdo_pgsql.stubA���dAH�]\�+vendor/jetbrains/phpstorm-stubs/qodana.yaml 
���d 
'JX;�,vendor/jetbrains/phpstorm-stubs/pam/pam.stub����d��U�e�4vendor/jetbrains/phpstorm-stubs/session/session.stubiG���diG���ޤ;vendor/jetbrains/phpstorm-stubs/session/SessionHandler.stubD+���dD+9&e��0vendor/jetbrains/phpstorm-stubs/posix/posix.stub�g���d�g���l�6vendor/jetbrains/phpstorm-stubs/calendar/calendar.stub�&���d�&�fxݤ0vendor/jetbrains/phpstorm-stubs/shmop/shmop.stub����d��2ɤ2vendor/jetbrains/phpstorm-stubs/pdflib/PDFlib.stub�@���d�@�LRQ�4vendor/jetbrains/phpstorm-stubs/gettext/gettext.stubG���dG����0vendor/jetbrains/phpstorm-stubs/geoip/geoip.stub$���d$6��2vendor/jetbrains/phpstorm-stubs/sodium/sodium.stub�����d���uԃ�8vendor/jetbrains/phpstorm-stubs/SimpleXML/SimpleXML.stubL���dL@�f�.vendor/jetbrains/phpstorm-stubs/ldap/ldap.stub0����d0�t�h�0vendor/jetbrains/phpstorm-stubs/ldap/Result.stubD���dD��vZ�4vendor/jetbrains/phpstorm-stubs/ldap/Connection.stubH���dH��5vendor/jetbrains/phpstorm-stubs/ldap/ResultEntry.stubI���dIPx�_�,vendor/jetbrains/phpstorm-stubs/lzf/lzf.stub����d����Ƥ2vendor/jetbrains/phpstorm-stubs/xcache/xcache.stub����d��^�)�2vendor/jetbrains/phpstorm-stubs/random/random.stub����d���mؤ7vendor/jetbrains/phpstorm-stubs/tokenizer/PhpToken.stub����d�&���8vendor/jetbrains/phpstorm-stubs/tokenizer/tokenizer.stub���d���P�6vendor/jetbrains/phpstorm-stubs/readline/readline.stubC���dCc��Dvendor/jetbrains/phpstorm-stubs/mongodb/BSON/TimestampInterface.stub����d�E�p�Cvendor/jetbrains/phpstorm-stubs/mongodb/BSON/ObjectIdInterface.stub����d�C_��=vendor/jetbrains/phpstorm-stubs/mongodb/BSON/UTCDateTime.stub����d�1�G��;vendor/jetbrains/phpstorm-stubs/mongodb/BSON/functions.stub^
���d^
9��:vendor/jetbrains/phpstorm-stubs/mongodb/BSON/ObjectId.stub����d��⮤;vendor/jetbrains/phpstorm-stubs/mongodb/BSON/Undefined.stub����d��;�ߤ>vendor/jetbrains/phpstorm-stubs/mongodb/BSON/Serializable.stub���d&��6vendor/jetbrains/phpstorm-stubs/mongodb/BSON/Type.stub����d�'J�-�Avendor/jetbrains/phpstorm-stubs/mongodb/BSON/MaxKeyInterface.stub���d���#�@vendor/jetbrains/phpstorm-stubs/mongodb/BSON/Unserializable.stub����d�"t�_�Avendor/jetbrains/phpstorm-stubs/mongodb/BSON/BinaryInterface.stub����d��0>F�Evendor/jetbrains/phpstorm-stubs/mongodb/BSON/JavascriptInterface.stub����d�]O؇�Fvendor/jetbrains/phpstorm-stubs/mongodb/BSON/UTCDateTimeInterface.stub+���d+2,��8vendor/jetbrains/phpstorm-stubs/mongodb/BSON/Symbol.stubc���dc)�[j�8vendor/jetbrains/phpstorm-stubs/mongodb/BSON/MaxKey.stub����d��>*��;vendor/jetbrains/phpstorm-stubs/mongodb/BSON/Timestamp.stub	
���d	
w����@vendor/jetbrains/phpstorm-stubs/mongodb/BSON/RegexInterface.stube���de���m�8vendor/jetbrains/phpstorm-stubs/mongodb/BSON/MinKey.stub����d�:�8vendor/jetbrains/phpstorm-stubs/mongodb/BSON/Binary.stub	
���d	
y_��7vendor/jetbrains/phpstorm-stubs/mongodb/BSON/Int64.stub����d���kx�7vendor/jetbrains/phpstorm-stubs/mongodb/BSON/Regex.stub����d�u�_�;vendor/jetbrains/phpstorm-stubs/mongodb/BSON/DBPointer.stuby���dyJi���=vendor/jetbrains/phpstorm-stubs/mongodb/BSON/Persistable.stub)���d)��cv�<vendor/jetbrains/phpstorm-stubs/mongodb/BSON/Decimal128.stub;���d;`�
|�Evendor/jetbrains/phpstorm-stubs/mongodb/BSON/Decimal128Interface.stub8���d8�L=p�Avendor/jetbrains/phpstorm-stubs/mongodb/BSON/MinKeyInterface.stub���dG�u��<vendor/jetbrains/phpstorm-stubs/mongodb/BSON/Javascript.stubL	���dL	p��;vendor/jetbrains/phpstorm-stubs/mongodb/ReadPreference.stub����d��y��Avendor/jetbrains/phpstorm-stubs/mongodb/Monitoring/functions.stuby���dyG�\�Ivendor/jetbrains/phpstorm-stubs/mongodb/Monitoring/CommandSubscriber.stub����d�;O��Kvendor/jetbrains/phpstorm-stubs/mongodb/Monitoring/CommandStartedEvent.stub����d�����Bvendor/jetbrains/phpstorm-stubs/mongodb/Monitoring/Subscriber.stub����d���Jvendor/jetbrains/phpstorm-stubs/mongodb/Monitoring/CommandFailedEvent.stubq���dq��c�Mvendor/jetbrains/phpstorm-stubs/mongodb/Monitoring/CommandSucceededEvent.stub7
���d7
E\��9vendor/jetbrains/phpstorm-stubs/mongodb/WriteConcern.stubi���dis8�Q�8vendor/jetbrains/phpstorm-stubs/mongodb/ReadConcern.stub
���d
�b��4vendor/jetbrains/phpstorm-stubs/mongodb/Command.stub����d��r�8vendor/jetbrains/phpstorm-stubs/mongodb/WriteResult.stub�
���d�
aZ��4vendor/jetbrains/phpstorm-stubs/mongodb/Manager.stub�'���d�'��ew�3vendor/jetbrains/phpstorm-stubs/mongodb/Server.stub�)���d�)?
��=vendor/jetbrains/phpstorm-stubs/mongodb/ClientEncryption.stub}
���d}
I���>vendor/jetbrains/phpstorm-stubs/mongodb/WriteConcernError.stub)���d)fVK�Ovendor/jetbrains/phpstorm-stubs/mongodb/Exception/InvalidArgumentException.stubS���dS5k�:�Pvendor/jetbrains/phpstorm-stubs/mongodb/Exception/ExecutionTimeoutException.stubH���dHA��Nvendor/jetbrains/phpstorm-stubs/mongodb/Exception/AuthenticationException.stub5���d5K��Jvendor/jetbrains/phpstorm-stubs/mongodb/Exception/ConnectionException.stubG���dGAl��Lvendor/jetbrains/phpstorm-stubs/mongodb/Exception/WriteConcernException.stuby���dy����Gvendor/jetbrains/phpstorm-stubs/mongodb/Exception/RuntimeException.stubh���dhc�E�Gvendor/jetbrains/phpstorm-stubs/mongodb/Exception/CommandException.stub���d
�N�Evendor/jetbrains/phpstorm-stubs/mongodb/Exception/WriteException.stub����d�Bc̤Ivendor/jetbrains/phpstorm-stubs/mongodb/Exception/BulkWriteException.stub���d����Qvendor/jetbrains/phpstorm-stubs/mongodb/Exception/ConnectionTimeoutException.stubd���dd�-;�@vendor/jetbrains/phpstorm-stubs/mongodb/Exception/Exception.stub:���d:M��Ovendor/jetbrains/phpstorm-stubs/mongodb/Exception/UnexpectedValueException.stubj���dj�Mm�Mvendor/jetbrains/phpstorm-stubs/mongodb/Exception/SSLConnectionException.stub2���d2���Jvendor/jetbrains/phpstorm-stubs/mongodb/Exception/EncryptionException.stub,���d,
�5��Fvendor/jetbrains/phpstorm-stubs/mongodb/Exception/ServerException.stub����d���`�Evendor/jetbrains/phpstorm-stubs/mongodb/Exception/LogicException.stub���dZ�Ť4vendor/jetbrains/phpstorm-stubs/mongodb/Session.stub����d��(LX�5vendor/jetbrains/phpstorm-stubs/mongodb/CursorId.stub����d�2�&�4vendor/jetbrains/phpstorm-stubs/mongodb/mongodb.stubF���dFB���6vendor/jetbrains/phpstorm-stubs/mongodb/ServerApi.stub����d��ܚo�<vendor/jetbrains/phpstorm-stubs/mongodb/CursorInterface.stub����d���
�7vendor/jetbrains/phpstorm-stubs/mongodb/WriteError.stub����d�O���6vendor/jetbrains/phpstorm-stubs/mongodb/BulkWrite.stub����d����,�3vendor/jetbrains/phpstorm-stubs/mongodb/Cursor.stub����d�R�8��2vendor/jetbrains/phpstorm-stubs/mongodb/Query.stub����d�X0T��.vendor/jetbrains/phpstorm-stubs/hash/hash.stub�D���d�D?�"Q�6vendor/jetbrains/phpstorm-stubs/pthreads/pthreads.stub�H���d�H�>9��Jvendor/jetbrains/phpstorm-stubs/Reflection/ReflectionFunctionAbstract.stub�(���d�(�K�S�Gvendor/jetbrains/phpstorm-stubs/Reflection/ReflectionZendExtension.stub�
���d�
b{`�@vendor/jetbrains/phpstorm-stubs/Reflection/ReflectionMethod.stubK)���dK)���Hvendor/jetbrains/phpstorm-stubs/Reflection/ReflectionEnumBackedCase.stub2���d2.3ab�Fvendor/jetbrains/phpstorm-stubs/Reflection/ReflectionEnumPureCase.stub����d�d���Cvendor/jetbrains/phpstorm-stubs/Reflection/ReflectionException.stub����d��#5��:vendor/jetbrains/phpstorm-stubs/Reflection/Reflection.stub����d��C�Bvendor/jetbrains/phpstorm-stubs/Reflection/ReflectionFunction.stub����d�b���Bvendor/jetbrains/phpstorm-stubs/Reflection/ReflectionProperty.stub�*���d�*\�(��?vendor/jetbrains/phpstorm-stubs/Reflection/ReflectionClass.stubz]���dz]��q�Gvendor/jetbrains/phpstorm-stubs/Reflection/ReflectionClassConstant.stubF���dFXخ�Cvendor/jetbrains/phpstorm-stubs/Reflection/ReflectionReference.stub����d�E�b��Cvendor/jetbrains/phpstorm-stubs/Reflection/ReflectionAttribute.stuby���dy4�]��Cvendor/jetbrains/phpstorm-stubs/Reflection/ReflectionParameter.stub�'���d�'�E�O�Fvendor/jetbrains/phpstorm-stubs/Reflection/ReflectionEnumUnitCase.stub����d����Y�>vendor/jetbrains/phpstorm-stubs/Reflection/ReflectionEnum.stub����d�@q�K�>vendor/jetbrains/phpstorm-stubs/Reflection/ReflectionType.stub���d\4���Cvendor/jetbrains/phpstorm-stubs/Reflection/ReflectionUnionType.stub
���d
��˜�Cvendor/jetbrains/phpstorm-stubs/Reflection/ReflectionExtension.stub2���d2�~�Jvendor/jetbrains/phpstorm-stubs/Reflection/ReflectionIntersectionType.stub����d�6�c8�Cvendor/jetbrains/phpstorm-stubs/Reflection/ReflectionNamedType.stubp���dp'��@vendor/jetbrains/phpstorm-stubs/Reflection/ReflectionObject.stub����d�0���?vendor/jetbrains/phpstorm-stubs/Reflection/ReflectionFiber.stub����d�*a��9vendor/jetbrains/phpstorm-stubs/Reflection/Reflector.stub����d��T��Cvendor/jetbrains/phpstorm-stubs/Reflection/ReflectionGenerator.stub����d��.Y̤.vendor/jetbrains/phpstorm-stubs/fann/fann.stubh����dh���a*�,vendor/jetbrains/phpstorm-stubs/zmq/zmq.stubzu���dzu��Z�6vendor/jetbrains/phpstorm-stubs/newrelic/newrelic.stub�}���d�}�ظ��0vendor/jetbrains/phpstorm-stubs/mysql/mysql.stub|���d|�0{�4vendor/jetbrains/phpstorm-stubs/sqlite3/sqlite3.stub�e���d�e5m��2vendor/jetbrains/phpstorm-stubs/ffmpeg/ffmpeg.stub����d�g%�5vendor/jetbrains/phpstorm-stubs/sybase/sybase_ct.stub7���d7#��!�8vendor/jetbrains/phpstorm-stubs/mapscript/mapscript.stub�����d��{�|K�/vendor/jetbrains/phpstorm-stubs/http/http3.stub�����d��յR��.vendor/jetbrains/phpstorm-stubs/http/http.stub�����d������2vendor/jetbrains/phpstorm-stubs/mcrypt/mcrypt.stub�_���d�_iXV��,vendor/jetbrains/phpstorm-stubs/fpm/fpm.stub����d��B��,vendor/jetbrains/phpstorm-stubs/svn/svn.stubl����dl��	R�6vendor/jetbrains/phpstorm-stubs/memcache/memcache.stub$R���d$RU��*�6vendor/jetbrains/phpstorm-stubs/libevent/libevent.stub"Y���d"Y�0�:vendor/jetbrains/phpstorm-stubs/LuaSandbox/LuaSandbox.stubE���dE���8vendor/jetbrains/phpstorm-stubs/xlswriter/xlswriter.stub'>���d'>��@��,vendor/jetbrains/phpstorm-stubs/dba/dba.stub|,���d|,��1S�;vendor/jetbrains/phpstorm-stubs/couchbase_v2/couchbase.stub�����d��d�z
�:vendor/jetbrains/phpstorm-stubs/couchbase_v2/toplevel.stubW���dWa->�6vendor/jetbrains/phpstorm-stubs/yaf/yaf_namespace.stub�[���d�[-x�q�,vendor/jetbrains/phpstorm-stubs/yaf/yaf.stubwe���dwe-�n��4vendor/jetbrains/phpstorm-stubs/PhpStormStubsMap.php.�
���d.�
$�P��.vendor/jetbrains/phpstorm-stubs/soap/soap.stub����d��k�.�4vendor/jetbrains/phpstorm-stubs/msgpack/msgpack.stubX���dX2d\��2vendor/jetbrains/phpstorm-stubs/docker-compose.ymlg���dg_�׿�/vendor/jetbrains/phpstorm-stubs/regex/ereg.stubz ���dz =c�P�,vendor/jetbrains/phpstorm-stubs/ast/ast.stub [���d [��nΤ>vendor/jetbrains/phpstorm-stubs/win32service/win32service.stubEc���dEc�R�ۤ4vendor/jetbrains/phpstorm-stubs/sockets/sockets.stub����d���>֤8vendor/jetbrains/phpstorm-stubs/curl/CURLStringFile.stub����d�@b�.vendor/jetbrains/phpstorm-stubs/curl/curl.stubs���dsV���0vendor/jetbrains/phpstorm-stubs/curl/curl_d.stub�I���d�IP]ƤBvendor/jetbrains/phpstorm-stubs/simple_kafka_client/functions.stub����d�B�Q��Rvendor/jetbrains/phpstorm-stubs/simple_kafka_client/SimpleKafkaClient/Message.stub����d�k�Yvendor/jetbrains/phpstorm-stubs/simple_kafka_client/SimpleKafkaClient/TopicPartition.stub&���d&�>�~�Svendor/jetbrains/phpstorm-stubs/simple_kafka_client/SimpleKafkaClient/Metadata.stub9���d9!�a�Pvendor/jetbrains/phpstorm-stubs/simple_kafka_client/SimpleKafkaClient/Topic.stub����d����Zvendor/jetbrains/phpstorm-stubs/simple_kafka_client/SimpleKafkaClient/Metadata/Broker.stub9���d9�uo`�]vendor/jetbrains/phpstorm-stubs/simple_kafka_client/SimpleKafkaClient/Metadata/Partition.stub����d��g�Yvendor/jetbrains/phpstorm-stubs/simple_kafka_client/SimpleKafkaClient/Metadata/Topic.stubS���dS\��^vendor/jetbrains/phpstorm-stubs/simple_kafka_client/SimpleKafkaClient/Metadata/Collection.stub	���d	����Svendor/jetbrains/phpstorm-stubs/simple_kafka_client/SimpleKafkaClient/Producer.stub����d�И��^vendor/jetbrains/phpstorm-stubs/simple_kafka_client/SimpleKafkaClient/KafkaErrorException.stub����d��i',�Tvendor/jetbrains/phpstorm-stubs/simple_kafka_client/SimpleKafkaClient/Exception.stubd���dd�Y�v�Svendor/jetbrains/phpstorm-stubs/simple_kafka_client/SimpleKafkaClient/Consumer.stubW���dW�����Xvendor/jetbrains/phpstorm-stubs/simple_kafka_client/SimpleKafkaClient/Configuration.stubx���dxռv��Jvendor/jetbrains/phpstorm-stubs/simple_kafka_client/SimpleKafkaClient.stub����d��!���vendor/nikic/php-parser/LICENSE����d���*�7vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php�'���d�'���k�>vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php�#���d�#*tY
�Lvendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php���dHj��9vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php���d�'>;�;vendor/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php/���d/����6vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php2���d2L�8vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php����d�[m��4vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php�	���d�	�v���Dvendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php����d���!F�Mvendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php]���d]���Ivendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php����d���+�Dvendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.phpl���dl�=*��Bvendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php)&���d)&!QΤKvendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.phpt���dt�k�ڤ4vendor/nikic/php-parser/lib/PhpParser/NodeDumper.phpU���dU0gx�6vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php~���d~[�W{�@vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php����d�J���5vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.phph���dh�y���Mvendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php����d����K�Svendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php[���d[�_'��Ovendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php����d�*�3�Svendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php����d��<fB�Ovendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php����d�%�d�Wvendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php}	���d}	�N�	�Svendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php����d�x�,��Mvendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php���d�p�L�Kvendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.phpm���dmm�zG�Mvendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php����d��I�Pvendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php����d��6~%�[vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php����d��pX��Wvendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php���d�V&z�]vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.phpe���deNeV�9vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php�"���d�"=�ݤ7vendor/nikic/php-parser/lib/PhpParser/ParserFactory.phpY���dY��_h�1vendor/nikic/php-parser/lib/PhpParser/Comment.php����d��i��.vendor/nikic/php-parser/lib/PhpParser/Node.php����d�eȊԤ>vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php����d����7vendor/nikic/php-parser/lib/PhpParser/Builder/Param.phpp���dp�n;�;vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php1���d1(�jL�6vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php����d�ixL�8vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php����d���6ۤ:vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php/���d/G���:vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php.���d.�(���8vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php����d����:vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php<���d<L��<vendor/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php5
���d5
�9��Dvendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.phpb���db�a���<vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php�	���d�	w���=vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php����d�?{�<vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php%���d%�����8vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php{���d{a,;#�7vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.phpg���dgkoä<vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.phpu%���du%��r�5vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php����d�Y���=vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php����d�8���5vendor/nikic/php-parser/lib/PhpParser/NameContext.php�%���d�%|0�R�5vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php�+���d�+!�P��5vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php�N���d�N5�f��9vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php����d����Ҥ7vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php���dy��\�@vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php.����d.�(���5vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.phpD
���dD
�C�D�1vendor/nikic/php-parser/lib/PhpParser/Builder.php����d���@vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php���dT�.�3vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php����d�:����;vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php����d��,O�2vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php8���d8�ѥQ�4vendor/nikic/php-parser/lib/PhpParser/Node/Param.phpr���dr�%��5vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php����d���<ѤBvendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php����d�!���<vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php����d�ħ�J�:vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.phpC���dC��y�3vendor/nikic/php-parser/lib/PhpParser/Node/Name.php���dڽT��:vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php����d�F=eL�<vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.phpv���dv��^�7vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php2���d2��?��=vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php
���d
܄�h�:vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php����d��|�:vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php����d��c%�8vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php\���d\�,��8vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php.���d.c�W�?vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.phpx���dx��5�:vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php���d�p�/�:vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php����d����<vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php����d��QM�<vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php����d�H�-�>vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php����d�+[��:vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.phpr���drŠ��9vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php����d�wC��=vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php���d>��7�9vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php����d�ci���<vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php�
���d�
�/�:vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.phpd���ddxء�>vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php���de�$�=vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php���dLY�դ<vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php)���d)��Lvendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php1���d1�Q9�Qvendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.phpJ���dJ:`��<vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php_���d_�h��Fvendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php
���d
!<��>vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php����d�x�R�:vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php5���d5�^?��@vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php����d�� )�<vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php����d��YƤ=vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php����d�2&��7vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php0���d0cL ��;vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php����d�x����:vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.phpa���da9�5�Bvendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php����d��ץ1�;vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php����d���¤<vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php���d���!�9vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php����d���yh�>vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php����d�����;vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php%���d%ߩ'�9vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.phpB���dB�~�Ȥ9vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php\���d\�XEu�9vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php����d��+��Dvendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php����d�Ɉ;��>vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php����d��i��;vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php9���d9�t��;vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php����d���J}�7vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php*���d*��=vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php����d�UP�R�8vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php@���d@�`�7vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php����d�j,q�<vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php����d�O�J��:vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php(���d(93�'�:vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php���d�=�=vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php����d�i$���<vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php0���d0,fS�>vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php����d�+2�8�>vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.phpw���dwp���Evendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php=���d=�:���Evendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php=���d=5p�6�Cvendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php8���d8"ɼ�Dvendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php:���d:�����Avendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php4���d4~i1�Gvendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.phpA���dA�rL0�Fvendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php@���d@�.?�Gvendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.phpB���dB�ا��Fvendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php?���d?� 72�@vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php3���d3�9�V�Gvendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.phpA���dA��(�@vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php2���d21���Ivendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.phpF���dF���1�Kvendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.phpI���dI���K�Gvendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php@���d@�LK
�Fvendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php?���d?d�;x�Bvendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php7���d7(����@vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php2���d2�i�a�@vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php2���d2̒�_�Gvendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.phpB���dB�G�p�Kvendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.phpI���dI#��t�Dvendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php:���d:K���Fvendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php?���d?э���Bvendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php6���d6�߉�Gvendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php@���d@�ݞ��Fvendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php>���d>Η�0�Fvendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php@���d@���=vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.phph���dhf�ͤ<vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php���d�pФ>vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php����d��l
�:vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php���d�i�x�>vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.phpJ���dJ���Gvendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php���d��M�=vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php����d����g�Cvendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php����d��<��Avendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php=���d=XqGN�8vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php1���d1��k�Avendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php����d��DG�9vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php����d�*�I�;vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php~���d~�4�Q�Ivendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php����d���Ĥ=vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php8���d8��)�;vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php�
���d�
<�/5�:vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php����d��ճŤ=vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php����d��'(�:vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php~���d~�?(�:vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php~���d~۵��:vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php����d�x �,�8vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.phpx���dxP��:vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php{���d{�Y��<vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php����d�%6`��?vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php����d�8)J]�?vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php����d�@���@vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php����d�m��3�?vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php����d�kO#ͤ@vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php����d�`��̤=vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php����d���o=�>vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php����d�d���Avendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php����d�j�77�Evendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php����d�Q�Cvendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php����d������Avendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php����d�
�B�Gvendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php����d�7F��@vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php����d��|��@vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php����d�ǒ߿�Gvendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php����d��x�@vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php����d�U#`ɤ@vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php����d�c���Fvendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php����d�wú�Bvendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php����d�U���Gvendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php����d�( f��Fvendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php����d�.���;vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php����d���H�:vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php{���d{���Fvendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.phpS���dS�3�ͤ>vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php����d��$��Avendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.phph	���dh	Ll^Ť>vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php����d�9����;vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php~���d~���J�9vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php����d�ni�q�:vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.phpL���dL�2�t�9vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php����d���2�>vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php<���d<8���<vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php����d�@��ˤ9vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php{���d{~���?vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.phpI���dI�>lפ:vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php{���d{Ly0��<vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php_���d_�4A�Bvendor/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php����d���E
�5vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.phps���dsuQ��8vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php����d�����=vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.phpY���dY��28�Hvendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php����d��՝�=vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php���d�^�T�Jvendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.phpM���dM�fA��Evendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php@���d@�g¤Gvendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.phpD���dDC����Gvendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.phpD���dD+0
��Evendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php@���d@�&Q&�Dvendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php=���d=)�G��Kvendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.phpP���dP�t�Gvendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.phpF���dF��3�>vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php����d��d�@vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.phpS���dSix�=vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.phpi
���di
��1��?vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php����d�aD��3vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php����d��Et1�9vendor/nikic/php-parser/lib/PhpParser/Node/Identifier.php����d��m�{�;vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php����d��{��Fvendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.phpW���dW�"�/vendor/nikic/php-parser/lib/PhpParser/Lexer.php%[���d%[BVRo�/vendor/nikic/php-parser/lib/PhpParser/Error.php����d�%b&�?vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.phpn���dn�ZAM�Avendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php|���d|����8vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php!%���d!%�mGܤ?vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php~����d~�Š��8vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php�,���d�,�
�0vendor/nikic/php-parser/lib/PhpParser/Parser.php����d�P�VR�/vendor/nikic/php-parser/grammar/parser.template	���d	-ɚQ�(vendor/nikic/php-parser/grammar/tokens.y�
���d�
�C~j�&vendor/nikic/php-parser/grammar/php7.y����d�[vt[�,vendor/nikic/php-parser/grammar/phpyLang.php����d��}o�/vendor/nikic/php-parser/grammar/tokens.template*���d*��_֤&vendor/nikic/php-parser/grammar/php5.y�����d��P%PG�Gvendor/ondrejmirtes/better-reflection/src/Identifier/IdentifierType.php����d���lޤXvendor/ondrejmirtes/better-reflection/src/Identifier/Exception/InvalidIdentifierName.phpe���de�ZJ�Cvendor/ondrejmirtes/better-reflection/src/Identifier/Identifier.php����d�qb!��mvendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Factory/MakeLocatorForInstalledJson.php����d��#@�svendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Factory/Exception/InvalidProjectDirectory.php����d��!4l�pvendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Factory/Exception/MissingInstalledJson.php����d���"o�ovendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Factory/Exception/MissingComposerJson.php����d��T_ʤmvendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Factory/Exception/FailedToParseJson.php����d�'�<��evendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Factory/Exception/Exception.php����d��Z�\�lvendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJson.php���d��L+�|vendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJsonAndInstalledJson.phpo ���do :���bvendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Psr/PsrAutoloaderMapping.phpv���dv��'֤Yvendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Psr/Psr4Mapping.php
���d
����Yvendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Psr/Psr0Mapping.phpG���dG�'�e�avendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Psr/Exception/Exception.php����d���lvendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Psr/Exception/InvalidPrefixMapping.phps���ds�󴜤^vendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/PsrAutoloaderLocator.php�	���d�	X4m�Vvendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/ComposerSourceLocator.php����d�H	��Yvendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/DirectoriesSourceLocator.php����d�8QvY�Nvendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/SourceLocator.php+���d+C�=�Vvendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/AutoloadSourceLocator.php5/���d5/�JQc�Vvendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/AbstractSourceLocator.php=	���d=	�*���Uvendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/ClosureSourceLocator.php}���d}M$�ФWvendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/MemoizingSourceLocator.php�
���d�
�,���bvendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/AnonymousClassObjectSourceLocator.phpD���dD�Nw�Wvendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/AggregateSourceLocator.php���d�H���pvendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/AutoloadSourceLocator/FileReadTrapStreamWrapper.php{���d{z���Xvendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/EvaledCodeSourceLocator.php����d��u�Zvendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/FileIteratorSourceLocator.phpm
���dm
�&_��Tvendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/StringSourceLocator.php1���d1<>�٤Xvendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/SingleFileSourceLocator.phpT���dTzE{G�Yvendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/PhpInternalSourceLocator.php2���d2���Gvendor/ondrejmirtes/better-reflection/src/SourceLocator/FileChecker.php����d�)��M�Uvendor/ondrejmirtes/better-reflection/src/SourceLocator/Ast/FindReflectionsInTree.php����d��\�Yvendor/ondrejmirtes/better-reflection/src/SourceLocator/Ast/Strategy/NodeToReflection.php@	���d@	`�Y�^vendor/ondrejmirtes/better-reflection/src/SourceLocator/Ast/Strategy/AstConversionStrategy.php����d��Ϝ�[vendor/ondrejmirtes/better-reflection/src/SourceLocator/Ast/Exception/ParseToAstFailure.php����d�J�:��Vvendor/ondrejmirtes/better-reflection/src/SourceLocator/Ast/Parser/MemoizingParser.php����d�g�	��Gvendor/ondrejmirtes/better-reflection/src/SourceLocator/Ast/Locator.php(���d(���a�Qvendor/ondrejmirtes/better-reflection/src/SourceLocator/Located/LocatedSource.php}���d}�	ݤZvendor/ondrejmirtes/better-reflection/src/SourceLocator/Located/AnonymousLocatedSource.phpt���dt�m �Wvendor/ondrejmirtes/better-reflection/src/SourceLocator/Located/EvaledLocatedSource.php4���d4{rj�Vvendor/ondrejmirtes/better-reflection/src/SourceLocator/Located/AliasLocatedSource.phpO���dO�����Yvendor/ondrejmirtes/better-reflection/src/SourceLocator/Located/InternalLocatedSource.php ���d ��z��Vvendor/ondrejmirtes/better-reflection/src/SourceLocator/Exception/InvalidDirectory.php����d��d�T�[vendor/ondrejmirtes/better-reflection/src/SourceLocator/Exception/TwoClosuresOnSameLine.phpr���dr��ӤVvendor/ondrejmirtes/better-reflection/src/SourceLocator/Exception/NotInternalClass.php����d��zׯ�cvendor/ondrejmirtes/better-reflection/src/SourceLocator/Exception/TwoAnonymousClassesOnSameLine.php����d�M/���Uvendor/ondrejmirtes/better-reflection/src/SourceLocator/Exception/InvalidFileInfo.php+���d+J"��bvendor/ondrejmirtes/better-reflection/src/SourceLocator/Exception/EvaledClosureCannotBeLocated.php$���d$d�ϤUvendor/ondrejmirtes/better-reflection/src/SourceLocator/Exception/NoClosureOnLine.phpp���dp��G�\vendor/ondrejmirtes/better-reflection/src/SourceLocator/Exception/NoAnonymousClassOnLine.php���d�\�Wvendor/ondrejmirtes/better-reflection/src/SourceLocator/Exception/FunctionUndefined.phpV���dVN0��ivendor/ondrejmirtes/better-reflection/src/SourceLocator/Exception/EvaledAnonymousClassCannotBeLocated.php3���d3�6Ǯ�Yvendor/ondrejmirtes/better-reflection/src/SourceLocator/Exception/InvalidFileLocation.php����d������fvendor/ondrejmirtes/better-reflection/src/SourceLocator/SourceStubber/PhpStormStubs/CachingVisitor.php���dV�dvendor/ondrejmirtes/better-reflection/src/SourceLocator/SourceStubber/PhpStormStubsSourceStubber.php�u���d�uQ�ؤ`vendor/ondrejmirtes/better-reflection/src/SourceLocator/SourceStubber/AggregateSourceStubber.php���d��)��avendor/ondrejmirtes/better-reflection/src/SourceLocator/SourceStubber/ReflectionSourceStubber.php�d���d�d* sw�Wvendor/ondrejmirtes/better-reflection/src/SourceLocator/SourceStubber/SourceStubber.php����d��ϭ�mvendor/ondrejmirtes/better-reflection/src/SourceLocator/SourceStubber/Exception/CouldNotFindPhpStormStubs.php0���d0��~��Rvendor/ondrejmirtes/better-reflection/src/SourceLocator/SourceStubber/StubData.php����d���$դ>vendor/ondrejmirtes/better-reflection/src/BetterReflection.php"���d"����Avendor/ondrejmirtes/better-reflection/src/Reflector/Reflector.php���db�y��Hvendor/ondrejmirtes/better-reflection/src/Reflector/DefaultReflector.php���d���Ivendor/ondrejmirtes/better-reflection/src/Reflector/FunctionReflector.php����d�a�8ҤIvendor/ondrejmirtes/better-reflection/src/Reflector/ConstantReflector.php����d���$E�Fvendor/ondrejmirtes/better-reflection/src/Reflector/ClassReflector.php����d��E�Tvendor/ondrejmirtes/better-reflection/src/Reflector/Exception/IdentifierNotFound.phpL���dLޤ'�Fvendor/ondrejmirtes/better-reflection/src/Util/ConstantNodeChecker.php����d�߸�C�=vendor/ondrejmirtes/better-reflection/src/Util/FileHelper.phpf���dfAuL�Hvendor/ondrejmirtes/better-reflection/src/Util/ClassExistenceChecker.php{���d{���J�Gvendor/ondrejmirtes/better-reflection/src/Util/FindReflectionOnLine.php����d�P5�ˤDvendor/ondrejmirtes/better-reflection/src/Util/GetLastDocComment.php����d���t�Pvendor/ondrejmirtes/better-reflection/src/Util/Exception/InvalidNodePosition.phpV���dV>U�ݤKvendor/ondrejmirtes/better-reflection/src/Util/Exception/NoNodePosition.php����d�$���Lvendor/ondrejmirtes/better-reflection/src/Util/CalculateReflectionColumn.php����d�5�_��Jvendor/ondrejmirtes/better-reflection/src/NodeCompiler/CompilerContext.php_���d_Z��W�Hvendor/ondrejmirtes/better-reflection/src/NodeCompiler/CompiledValue.php����d�_����Xvendor/ondrejmirtes/better-reflection/src/NodeCompiler/Exception/UnableToCompileNode.php����d�V��Mvendor/ondrejmirtes/better-reflection/src/NodeCompiler/CompileNodeToValue.phpC1���dC17�k֤Lvendor/ondrejmirtes/better-reflection/src/Reflection/ReflectionNamedType.php����d�d⯤Svendor/ondrejmirtes/better-reflection/src/Reflection/ReflectionFunctionAbstract.php><���d><�v^~�Tvendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionNamedType.php���d�Gf�Pvendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionClass.php�R���d�R]�4�Wvendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionEnumUnitCase.php����d��0�Tvendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionParameter.phpt#���dt#�.���[vendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionAttributeFactory.php6���d6���Ovendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionEnum.phpK���dKK���Ovendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionType.php����d�Rc/F�[vendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionIntersectionType.php1���d1�{w��Tvendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionAttribute.php���d=x���Qvendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionObject.phppG���dpG���m�Xvendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionClassConstant.php����d������Xvendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/FakeReflectionAttribute.php���d���d�Yvendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/Exception/NotImplemented.php����d�IRe�Qvendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionMethod.php�,���d�,�`�Svendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionProperty.php����d��YƤSvendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionFunction.php\"���d\"�Ma��Yvendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionEnumBackedCase.php~���d~/��
�Tvendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionUnionType.php���d|���Hvendor/ondrejmirtes/better-reflection/src/Reflection/ReflectionClass.php�����d��CxQ�evendor/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionClassConstantStringCast.php����d����avendor/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionParameterStringCast.php����d�}1��\vendor/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionTypeStringCast.php:���d:l1τ�`vendor/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionFunctionStringCast.phpL���dL��v�`vendor/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionConstantStringCast.php����d�wԊϤavendor/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionAttributeStringCast.php����d��1vˤ]vendor/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionClassStringCast.phpc#���dc#i.���`vendor/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionPropertyStringCast.php����d��@��^vendor/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionMethodStringCast.php����d�Zu
e�`vendor/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionEnumCaseStringCast.phpd���dd�wj��Tvendor/ondrejmirtes/better-reflection/src/Reflection/Annotation/AnnotationHelper.php2���d2i�
ˤLvendor/ondrejmirtes/better-reflection/src/Reflection/ReflectionParameter.php)E���d)E�%`�Gvendor/ondrejmirtes/better-reflection/src/Reflection/ReflectionEnum.php����d�����Gvendor/ondrejmirtes/better-reflection/src/Reflection/ReflectionType.php���dTx�\vendor/ondrejmirtes/better-reflection/src/Reflection/Attribute/ReflectionAttributeHelper.php+���d+{��d�Svendor/ondrejmirtes/better-reflection/src/Reflection/ReflectionIntersectionType.php
���d
m-���Kvendor/ondrejmirtes/better-reflection/src/Reflection/ReflectionEnumCase.php����d�=�'�Lvendor/ondrejmirtes/better-reflection/src/Reflection/ReflectionAttribute.php����d���ĤCvendor/ondrejmirtes/better-reflection/src/Reflection/Reflection.php����d�RuK�Ivendor/ondrejmirtes/better-reflection/src/Reflection/ReflectionObject.php�4���d�4�Y�4�Pvendor/ondrejmirtes/better-reflection/src/Reflection/ReflectionClassConstant.php�#���d�#`�g�Vvendor/ondrejmirtes/better-reflection/src/Reflection/Exception/CodeLocationMissing.php���d����Zvendor/ondrejmirtes/better-reflection/src/Reflection/Exception/InvalidDefaultValueType.php����d��udB�Kvendor/ondrejmirtes/better-reflection/src/Reflection/Exception/NoParent.php����d��ߤWvendor/ondrejmirtes/better-reflection/src/Reflection/Exception/PropertyDoesNotExist.php]���d]/7i[�Vvendor/ondrejmirtes/better-reflection/src/Reflection/Exception/InvalidConstantNode.php����d��k��Vvendor/ondrejmirtes/better-reflection/src/Reflection/Exception/PropertyIsNotStatic.php[���d[���Tvendor/ondrejmirtes/better-reflection/src/Reflection/Exception/ClassDoesNotExist.php����d���n�Vvendor/ondrejmirtes/better-reflection/src/Reflection/Exception/NotAClassReflection.php/���d/�1ɤTvendor/ondrejmirtes/better-reflection/src/Reflection/Exception/CircularReference.phpm���dm"�Wvendor/ondrejmirtes/better-reflection/src/Reflection/Exception/FunctionDoesNotExist.php{���d{��c��Zvendor/ondrejmirtes/better-reflection/src/Reflection/Exception/MethodPrototypeNotFound.php����d�2�7V�_vendor/ondrejmirtes/better-reflection/src/Reflection/Exception/InvalidArrowFunctionBodyNode.php����d�Z1q)�Svendor/ondrejmirtes/better-reflection/src/Reflection/Exception/NoObjectProvided.php���d�/��Nvendor/ondrejmirtes/better-reflection/src/Reflection/Exception/NotAnObject.php����d��[vendor/ondrejmirtes/better-reflection/src/Reflection/Exception/NotAnInterfaceReflection.php4���d4�BE�[vendor/ondrejmirtes/better-reflection/src/Reflection/Exception/ObjectNotInstanceOfClass.phpx���dx��w�Ivendor/ondrejmirtes/better-reflection/src/Reflection/ReflectionMethod.phpH=���dH=Z�B)�Kvendor/ondrejmirtes/better-reflection/src/Reflection/ReflectionConstant.php�&���d�&N-���Vvendor/ondrejmirtes/better-reflection/src/Reflection/Support/AlreadyVisitedClasses.php]���d]%0��Kvendor/ondrejmirtes/better-reflection/src/Reflection/ReflectionProperty.php�J���d�J1����Kvendor/ondrejmirtes/better-reflection/src/Reflection/ReflectionFunction.php9���d9lA�n�Lvendor/ondrejmirtes/better-reflection/src/Reflection/ReflectionUnionType.phpd���dd�!���3vendor/ondrejmirtes/better-reflection/renovate.json����d���{��-vendor/ondrejmirtes/better-reflection/LICENSE6���d6Ww��)vendor/symfony/string/CodePointString.php����d�mz�ɤ'vendor/symfony/string/UnicodeString.php�2���d�2�]:��vendor/symfony/string/LICENSE,���d,զ_Ϥ$vendor/symfony/string/LazyString.phpx���dxx�F��/vendor/symfony/string/AbstractUnicodeString.php^i���d^i��q�<vendor/symfony/string/Resources/data/wcswidth_table_wide.php����d�M���<vendor/symfony/string/Resources/data/wcswidth_table_zero.php����d�%�:�-vendor/symfony/string/Resources/functions.phpp���dp(c�/�6vendor/symfony/string/Exception/ExceptionInterface.phpc���dc�3靤4vendor/symfony/string/Exception/RuntimeException.php����d��1!��<vendor/symfony/string/Exception/InvalidArgumentException.php����d�'	Ѥ$vendor/symfony/string/ByteString.php�<���d�<@�Jܤ(vendor/symfony/string/AbstractString.php"O���d"O-�/�3vendor/symfony/string/Inflector/FrenchInflector.php$���d$}D�o�6vendor/symfony/string/Inflector/InflectorInterface.phpV���dVS���4vendor/symfony/string/Inflector/EnglishInflector.php�=���d�=Ρ�.vendor/symfony/string/Slugger/AsciiSlugger.php1���d12�ؤ2vendor/symfony/string/Slugger/SluggerInterface.php����d���Q�'vendor/symfony/process/ProcessUtils.php\���d\��.��%vendor/symfony/process/PhpProcess.php�	���d�	�*�Ѥ"vendor/symfony/process/Process.php�����d������*vendor/symfony/process/Pipes/UnixPipes.php����d���%�-vendor/symfony/process/Pipes/WindowsPipes.phpg���dgZ�h�.vendor/symfony/process/Pipes/AbstractPipes.php����d�w�稤/vendor/symfony/process/Pipes/PipesInterface.php����d�����.vendor/symfony/process/PhpExecutableFinder.php^
���d^
����vendor/symfony/process/LICENSE,���d,���U�&vendor/symfony/process/InputStream.php�	���d�	�b�g�+vendor/symfony/process/ExecutableFinder.php�	���d�	c`���7vendor/symfony/process/Exception/ExceptionInterface.php����d��Uaä5vendor/symfony/process/Exception/RuntimeException.php����d�m
)Ť;vendor/symfony/process/Exception/ProcessFailedException.phpI���dI5S���3vendor/symfony/process/Exception/LogicException.php����d�q��,�=vendor/symfony/process/Exception/ProcessSignaledException.php����d�$���=vendor/symfony/process/Exception/InvalidArgumentException.php���d\2�m�=vendor/symfony/process/Exception/ProcessTimedOutException.php|���d|���g�%vendor/symfony/polyfill-php80/LICENSE$���d$LO!
�+vendor/symfony/polyfill-php80/bootstrap.php����d��.Ĥ<vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php>���d>g���;vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php����d�MK�<�Evendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.phpG���dGֈ+�:vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.phpw���dw=7T8�<vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php����d�t]\ڤ*vendor/symfony/polyfill-php80/PhpToken.php����d�]f�'vendor/symfony/polyfill-php80/Php80.php�
���d�
cH���-vendor/symfony/polyfill-mbstring/Mbstring.php�q���d�qs�ܺ�0vendor/symfony/polyfill-mbstring/bootstrap80.phpP"���dP"�An�(vendor/symfony/polyfill-mbstring/LICENSE)���d)�\��.vendor/symfony/polyfill-mbstring/bootstrap.phpE���dE�`��Fvendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php9���d9>|zK�@vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php�_���d�_���d�@vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php�f���d�f�P��,vendor/symfony/console/Output/NullOutput.php8	���d8	|�Ѥ(vendor/symfony/console/Output/Output.phpf���df�2u�6vendor/symfony/console/Output/ConsoleSectionOutput.php����d��Cz��0vendor/symfony/console/Output/BufferedOutput.phpc���dc=S�8vendor/symfony/console/Output/ConsoleOutputInterface.php1���d1�}5��.vendor/symfony/console/Output/StreamOutput.php�
���d�
�U⤤5vendor/symfony/console/Output/TrimmedBufferOutput.phpn���dn�x��1vendor/symfony/console/Output/OutputInterface.phpt���dtJ�H�/vendor/symfony/console/Output/ConsoleOutput.php'���d'��)
�8vendor/symfony/console/SignalRegistry/SignalRegistry.phpD���dDd0ff�?vendor/symfony/console/CommandLoader/CommandLoaderInterface.php����d�.G
�=vendor/symfony/console/CommandLoader/FactoryCommandLoader.phpe���deY��F�?vendor/symfony/console/CommandLoader/ContainerCommandLoader.php���dj��e�3vendor/symfony/console/SingleCommandApplication.php7���d76�;j�,vendor/symfony/console/Question/Question.php|���d|�V���2vendor/symfony/console/Question/ChoiceQuestion.php����d� �L��8vendor/symfony/console/Question/ConfirmationQuestion.php)���d)��[��&vendor/symfony/console/Input/Input.php<���d<_��0vendor/symfony/console/Input/InputDefinition.phpT.���dT.:�z��.vendor/symfony/console/Input/InputArgument.php�
���d�
}����/vendor/symfony/console/Input/InputInterface.php����d�Ҧ�M�,vendor/symfony/console/Input/StringInput.php�
���d�
Tq&ۤ+vendor/symfony/console/Input/ArrayInput.php����d�Ϋ�9vendor/symfony/console/Input/StreamableInputInterface.phpz���dz�ʜ��*vendor/symfony/console/Input/ArgvInput.php�0���d�0|f�Ȥ,vendor/symfony/console/Input/InputOption.php)���d)
N�_�4vendor/symfony/console/Input/InputAwareInterface.phpL���dL{�=�3vendor/symfony/console/Descriptor/XmlDescriptor.php-'���d-'kqX�0vendor/symfony/console/Descriptor/Descriptor.php���dcpz��8vendor/symfony/console/Descriptor/MarkdownDescriptor.phpk���dk��œ�<vendor/symfony/console/Descriptor/ApplicationDescription.php$���d$⃻�4vendor/symfony/console/Descriptor/TextDescriptor.php2���d2��]��9vendor/symfony/console/Descriptor/DescriptorInterface.phpQ���dQ|P|�4vendor/symfony/console/Descriptor/JsonDescriptor.php����d��^��/vendor/symfony/console/Logger/ConsoleLogger.php����d����vendor/symfony/console/LICENSE,���d,���U�.vendor/symfony/console/Attribute/AsCommand.phpN���dN��ņ�Dvendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php����d�s4n�Fvendor/symfony/console/Completion/Output/CompletionOutputInterface.php����d���`"�Avendor/symfony/console/Completion/Output/BashCompletionOutput.php���dw�$&�0vendor/symfony/console/Completion/Suggestion.php����d�ܳVB�;vendor/symfony/console/Completion/CompletionSuggestions.phpn���dn�=��5vendor/symfony/console/Completion/CompletionInput.php[ ���d[ p��.vendor/symfony/console/Command/LazyCommand.phpC���dC���<�0vendor/symfony/console/Command/LockableTrait.php#���d#����=vendor/symfony/console/Command/SignalableCommandInterface.php����d����
�.vendor/symfony/console/Command/HelpCommand.php���d3�?�2vendor/symfony/console/Command/CompleteCommand.php!���d!ǂ��.vendor/symfony/console/Command/ListCommand.php���d�A��*vendor/symfony/console/Command/Command.php�P���d�P�V�E�8vendor/symfony/console/Command/DumpCompletionCommand.php����d�?��� vendor/symfony/console/Color.phpZ���dZ�Ȃؤ!vendor/symfony/console/Cursor.php?���d?�ݤ#vendor/symfony/console/Terminal.phpJ���dJC��Q�(vendor/symfony/console/ConsoleEvents.php����d�V@Td�=vendor/symfony/console/Formatter/OutputFormatterInterface.phpD���dD=u�#�8vendor/symfony/console/Formatter/NullOutputFormatter.phpo���doN�xd�Bvendor/symfony/console/Formatter/OutputFormatterStyleInterface.phpg���dg,�:I�9vendor/symfony/console/Formatter/OutputFormatterStyle.php����d���/Ȥ>vendor/symfony/console/Formatter/OutputFormatterStyleStack.php)
���d)
'4�ȤFvendor/symfony/console/Formatter/WrappableOutputFormatterInterface.php����d�����4vendor/symfony/console/Formatter/OutputFormatter.php����d�5�R�=vendor/symfony/console/Formatter/NullOutputFormatterStyle.php����d��5��-vendor/symfony/console/Event/ConsoleEvent.php����d���L�4vendor/symfony/console/Event/ConsoleCommandEvent.php����d��@�3vendor/symfony/console/Event/ConsoleSignalEvent.php����d��$�6vendor/symfony/console/Event/ConsoleTerminateEvent.phpj���dj�mA�2vendor/symfony/console/Event/ConsoleErrorEvent.php!���d!���6vendor/symfony/console/EventListener/ErrorListener.php]���d]�Z2�0vendor/symfony/console/Resources/completion.bash�
���d�
�z(�4vendor/symfony/console/Resources/bin/hiddeninput.exe$���d$���v�2vendor/symfony/console/CI/GithubActionReporter.php���dn�{2�+vendor/symfony/console/Helper/TableRows.phpV���dV��:פ-vendor/symfony/console/Helper/ProgressBar.phpH���dHD�m��+vendor/symfony/console/Helper/TableCell.php���d�Tz"�7vendor/symfony/console/Helper/SymfonyQuestionHelper.phpG
���dG
�w��(vendor/symfony/console/Helper/Helper.php����d�G����,vendor/symfony/console/Helper/TableStyle.php�0���d�0U
͝�3vendor/symfony/console/Helper/ProgressIndicator.php����d��}Ĥ/vendor/symfony/console/Helper/ProcessHelper.php����d�8҅�2vendor/symfony/console/Helper/DescriptorHelper.php�	���d�	���(vendor/symfony/console/Helper/Dumper.phpV���dVW��ʤ0vendor/symfony/console/Helper/QuestionHelper.phpaM���daMG~q�0vendor/symfony/console/Helper/TableSeparator.php%���d%�,]ɤ'vendor/symfony/console/Helper/Table.phpir���dirW٤Ǥ1vendor/symfony/console/Helper/FormatterHelper.php�	���d�	��u��6vendor/symfony/console/Helper/DebugFormatterHelper.php\
���d\
��(��1vendor/symfony/console/Helper/HelperInterface.php]���d]?�.�+vendor/symfony/console/Helper/HelperSet.phpC
���dC
��F�0vendor/symfony/console/Helper/TableCellStyle.phpd���ddL��~�2vendor/symfony/console/Helper/InputAwareHelper.php!���d!%~Zݤ7vendor/symfony/console/Exception/ExceptionInterface.php����d����5vendor/symfony/console/Exception/RuntimeException.php����d����=vendor/symfony/console/Exception/CommandNotFoundException.php����d�Q�ä3vendor/symfony/console/Exception/LogicException.php����d�!���:vendor/symfony/console/Exception/MissingInputException.php���dT$<�;vendor/symfony/console/Exception/InvalidOptionException.php���d��]�=vendor/symfony/console/Exception/InvalidArgumentException.php����d���~�?vendor/symfony/console/Exception/NamespaceNotFoundException.php����d�OU*�-vendor/symfony/console/Style/SymfonyStyle.php�9���d�9l�ä,vendor/symfony/console/Style/OutputStyle.phpL���dL���/vendor/symfony/console/Style/StyleInterface.phpO
���dO
j�O�&vendor/symfony/console/Application.php����d�a9V��@vendor/symfony/console/Tester/Constraint/CommandIsSuccessful.php����d�g�kj�9vendor/symfony/console/Tester/CommandCompletionTester.phpL���dLۀn��-vendor/symfony/console/Tester/TesterTrait.php����d��2c�3vendor/symfony/console/Tester/ApplicationTester.php�
���d�
����/vendor/symfony/console/Tester/CommandTester.phpJ	���dJ	���a�7vendor/symfony/polyfill-intl-normalizer/bootstrap80.php����d��,��/vendor/symfony/polyfill-intl-normalizer/LICENSE)���d)�\��5vendor/symfony/polyfill-intl-normalizer/bootstrap.php����d�#p��Lvendor/symfony/polyfill-intl-normalizer/Resources/unidata/combiningClass.phpD5���dD5����Xvendor/symfony/polyfill-intl-normalizer/Resources/unidata/compatibilityDecomposition.phpo���doc�,��Tvendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalDecomposition.php{����d{��je��Rvendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalComposition.php�D���d�D'�CԤFvendor/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php����d����%�6vendor/symfony/polyfill-intl-normalizer/Normalizer.phpd%���dd%u��� vendor/symfony/finder/Finder.php�X���d�X�뱏�%vendor/symfony/finder/SplFileInfo.php,���d,,���vendor/symfony/finder/Glob.phpJ���dJ�b/�vendor/symfony/finder/LICENSE,���d,���U�#vendor/symfony/finder/Gitignore.php%���d%qhx?�>vendor/symfony/finder/Exception/DirectoryNotFoundException.php����d���W��9vendor/symfony/finder/Exception/AccessDeniedException.php����d���i`�5vendor/symfony/finder/Comparator/NumberComparator.php
���d
��ä3vendor/symfony/finder/Comparator/DateComparator.php����d�����/vendor/symfony/finder/Comparator/Comparator.php����d�����3vendor/symfony/finder/Iterator/SortableIterator.phpj���dj{����;vendor/symfony/finder/Iterator/VcsIgnoredFilterIterator.php����d�DWDP�:vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php����d��2@N�5vendor/symfony/finder/Iterator/PathFilterIterator.php����d���߲�=vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php����d�,����<vendor/symfony/finder/Iterator/FilecontentFilterIterator.php����d��h�V�/vendor/symfony/finder/Iterator/LazyIterator.php����d��=��9vendor/symfony/finder/Iterator/FilenameFilterIterator.php����d�
���Avendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php�
���d�
�3Ƞ�7vendor/symfony/finder/Iterator/CustomFilterIterator.php3���d3�Ar��;vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php����d�*�A�:vendor/symfony/finder/Iterator/DateRangeFilterIterator.php����d��Oi�=vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php����d�N���9vendor/symfony/finder/Iterator/FileTypeFilterIterator.php����d��1f�5vendor/symfony/polyfill-intl-grapheme/bootstrap80.phpg
���dg
��E{�-vendor/symfony/polyfill-intl-grapheme/LICENSE)���d)�\��3vendor/symfony/polyfill-intl-grapheme/bootstrap.php����d����2vendor/symfony/polyfill-intl-grapheme/Grapheme.php8&���d8&��I�-vendor/symfony/polyfill-ctype/bootstrap80.phph���dh|cUc�%vendor/symfony/polyfill-ctype/LICENSE)���d)�`e0�+vendor/symfony/polyfill-ctype/bootstrap.php,���d,�%�'vendor/symfony/polyfill-ctype/Ctype.php����d����)�%vendor/symfony/polyfill-php74/LICENSE$���d$��@�+vendor/symfony/polyfill-php74/bootstrap.php���d D驤'vendor/symfony/polyfill-php74/Php74.php�
���d�
AV܀�1vendor/symfony/deprecation-contracts/function.php2���d2/*�,vendor/symfony/deprecation-contracts/LICENSE,���d,K�=vendor/symfony/service-contracts/ServiceProviderInterface.php����d��~h��(vendor/symfony/service-contracts/LICENSE)���d)5古@vendor/symfony/service-contracts/Attribute/SubscribedService.php:���d:�qU��7vendor/symfony/service-contracts/Attribute/Required.php����d�ic�j�3vendor/symfony/service-contracts/ResetInterface.php����d����f�?vendor/symfony/service-contracts/ServiceSubscriberInterface.php����d�y.��;vendor/symfony/service-contracts/ServiceSubscriberTrait.php����d�QJ٤8vendor/symfony/service-contracts/ServiceLocatorTrait.php	���d	�TS�%vendor/symfony/polyfill-php73/LICENSE)���d)�`e0�+vendor/symfony/polyfill-php73/bootstrap.php����d���|�'vendor/symfony/polyfill-php73/Php73.phpb���dbJ�<�?vendor/symfony/polyfill-php73/Resources/stubs/JsonException.phpE���dE8S��*vendor/composer/ca-bundle/src/CaBundle.php
D���d
D��(vendor/composer/ca-bundle/res/cacert.pemN���dN���!vendor/composer/ca-bundle/LICENSE���d*!^`�!vendor/composer/autoload_real.php����d����f�vendor/composer/installed.php~����d~�,��%vendor/composer/InstalledVersions.php?���d? 2�Ť6vendor/composer/pcre/src/MatchAllWithOffsetsResult.php����d��+_��"vendor/composer/pcre/src/Regex.php���d|�w�*vendor/composer/pcre/src/ReplaceResult.php����d��
���(vendor/composer/pcre/src/MatchResult.php���d��S�7vendor/composer/pcre/src/MatchAllStrictGroupsResult.php����d�unb�9vendor/composer/pcre/src/UnexpectedNullMatchException.php���d(��"�!vendor/composer/pcre/src/Preg.php�D���d�D��K�+vendor/composer/pcre/src/MatchAllResult.php����d��^U��3vendor/composer/pcre/src/MatchWithOffsetsResult.php����d�v0�"�*vendor/composer/pcre/src/PcreException.php���d�5RE�4vendor/composer/pcre/src/MatchStrictGroupsResult.php���d���vendor/composer/pcre/LICENSE���dhg�^�vendor/composer/LICENSE.���d. ��!vendor/composer/autoload_psr4.php����d�����0vendor/composer/xdebug-handler/src/PhpConfig.php����d���EO�.vendor/composer/xdebug-handler/src/Process.phpJ���dJ|�!'�4vendor/composer/xdebug-handler/src/XdebugHandler.phpJN���dJN���-vendor/composer/xdebug-handler/src/Status.php����d�>�</�&vendor/composer/xdebug-handler/LICENSE)���d)#�;^�"vendor/composer/autoload_files.php����d�6פ'vendor/composer/autoload_namespaces.php����d��/t�%vendor/composer/autoload_classmap.phpB���dB�>F��vendor/composer/ClassLoader.php�@���d�@>]פ#vendor/composer/autoload_static.php�����d��^q��vendor/hoa/event/Listens.php����d��#v�vendor/hoa/event/Listener.php����d����ݤvendor/hoa/event/Bucket.phpD
���dD
4u�*�vendor/hoa/event/Source.php_���d_��vendor/hoa/event/Event.php���dG�ṳvendor/hoa/event/Listenable.php����d��GO�vendor/hoa/event/Exception.php����d���=�vendor/hoa/file/Finder.php%D���d%D��ސ�vendor/hoa/file/ReadWrite.php�"���d�"���vendor/hoa/file/Generic.php44���d44W\/�vendor/hoa/file/Read.php@���d@އ"t�"vendor/hoa/file/Link/ReadWrite.php�"���d�"��ͤvendor/hoa/file/Link/Read.phpP���dP�X<6�vendor/hoa/file/Link/Write.php����d��G�vendor/hoa/file/Link/Link.phpR���dR�M��vendor/hoa/file/SplFileInfo.php���d�RK�vendor/hoa/file/File.php�%���d�%X))�vendor/hoa/file/Write.php���d��0M�vendor/hoa/file/Watcher.php����d�ċv��vendor/hoa/file/Directory.php����d��V��'vendor/hoa/file/Temporary/ReadWrite.php�"���d�"����"vendor/hoa/file/Temporary/Read.phpm���dm��3�'vendor/hoa/file/Temporary/Temporary.php����d�0�9�#vendor/hoa/file/Temporary/Write.php���dF6���.vendor/hoa/file/Exception/FileDoesNotExist.php����d�K�i��'vendor/hoa/file/Exception/Exception.php����d�U墕�vendor/hoa/iterator/Append.php^���d^��{F�vendor/hoa/iterator/Limit.phpZ���dZ�!x#�%vendor/hoa/iterator/Demultiplexer.php����d�: �+�vendor/hoa/iterator/Filter.phpg���dgiһ�"vendor/hoa/iterator/FileSystem.php����d����)vendor/hoa/iterator/CallbackGenerator.php����d�6H�9�!vendor/hoa/iterator/Lookahead.phpq���dq��_��vendor/hoa/iterator/Counter.php����d��6՟�#vendor/hoa/iterator/SplFileInfo.phph���dh�o�l�vendor/hoa/iterator/Map.phpV���dV���w�vendor/hoa/iterator/Glob.phpV���dV�ǻ��vendor/hoa/iterator/Outer.phpf���df�񽲤 vendor/hoa/iterator/Infinite.phpf���df��*�vendor/hoa/iterator/PATCHES.txt����d����2� vendor/hoa/iterator/Seekable.phpq���dq���פ!vendor/hoa/iterator/Directory.php���d��~�vendor/hoa/iterator/Mock.phpX���dX|!� vendor/hoa/iterator/Iterator.php����d��"�� vendor/hoa/iterator/NoRewind.phpf���df7Z/}�)vendor/hoa/iterator/RegularExpression.php�!���d�!^Iu��&vendor/hoa/iterator/CallbackFilter.php~���d~�L�� vendor/hoa/iterator/Multiple.php����d��� �(vendor/hoa/iterator/Recursive/Filter.php����d���҅�%vendor/hoa/iterator/Recursive/Map.php|���d|PX:�+vendor/hoa/iterator/Recursive/Directory.php����d�6�FY�&vendor/hoa/iterator/Recursive/Mock.phpo���do���w�+vendor/hoa/iterator/Recursive/Recursive.php����d�Zr
��*vendor/hoa/iterator/Recursive/Iterator.php����d����s�3vendor/hoa/iterator/Recursive/RegularExpression.php����d�lֲ�0vendor/hoa/iterator/Recursive/CallbackFilter.php����d�����"vendor/hoa/iterator/Lookbehind.php4���d4�*4�(vendor/hoa/iterator/IteratorIterator.phpv���dviÃ#�!vendor/hoa/iterator/Exception.php����d��>�T�vendor/hoa/iterator/Buffer.php����d��Mtʤ vendor/hoa/iterator/Repeater.php5���d5�q��!vendor/hoa/iterator/Aggregate.phpv���dv��ˤ+vendor/hoa/stream/Wrapper/IWrapper/File.php����d�݉=��/vendor/hoa/stream/Wrapper/IWrapper/IWrapper.php����d��?��-vendor/hoa/stream/Wrapper/IWrapper/Stream.php0(���d0(_��S�%vendor/hoa/stream/Wrapper/Wrapper.php����d��L�Q�'vendor/hoa/stream/Wrapper/Exception.php����d�Xe�(vendor/hoa/stream/IStream/Bufferable.php�
���d�
Y�q�&vendor/hoa/stream/IStream/Statable.php�
���d�
i���'vendor/hoa/stream/IStream/Touchable.php����d�-6��$vendor/hoa/stream/IStream/Stream.php����d�g��&vendor/hoa/stream/IStream/Pathable.phps���dsI7�'vendor/hoa/stream/IStream/Pointable.php���d�gq�!vendor/hoa/stream/IStream/Out.php�
���d�
�ǟΤ vendor/hoa/stream/IStream/In.phpn���dn�T
�(vendor/hoa/stream/IStream/Structural.php���d��q~�&vendor/hoa/stream/IStream/Lockable.phph
���dh
���vendor/hoa/stream/Bucket.php����d�e��vendor/hoa/stream/PATCHES.txt����d��aQ�vendor/hoa/stream/Stream.php�A���d�AMEP�vendor/hoa/stream/Composite.php����d��¯~�)vendor/hoa/stream/Filter/LateComputed.phpc���dc4�G�#vendor/hoa/stream/Filter/Filter.php����d�Y&�:�"vendor/hoa/stream/Filter/Basic.php����d���x�&vendor/hoa/stream/Filter/Exception.php����d���vendor/hoa/stream/Context.phpe���delp�vendor/hoa/stream/Exception.php����d�e3���vendor/hoa/math/Arithmetic.pp�
���d�
��٤vendor/hoa/math/Util.phpY���dY�c]
�"vendor/hoa/math/Sampler/Random.php����d�P�%�#vendor/hoa/math/Sampler/Sampler.php!���d!�M��4vendor/hoa/math/Exception/AlreadyDefinedConstant.php����d���=��-vendor/hoa/math/Exception/UnknownConstant.php����d��q���-vendor/hoa/math/Exception/UnknownFunction.php����d��䒤-vendor/hoa/math/Exception/UnknownVariable.php����d���*�'vendor/hoa/math/Exception/Exception.php����d��
���*vendor/hoa/math/Combinatorics/Counting.php���dsY�7�+vendor/hoa/math/Combinatorics/FiniteSet.php���dsY�7�-vendor/hoa/math/Combinatorics/Permutation.php���dsY�7�>vendor/hoa/math/Combinatorics/Combination/CartesianProduct.php����d����3vendor/hoa/math/Combinatorics/Combination/Gamma.php?���d?���ʤ9vendor/hoa/math/Combinatorics/Combination/Combination.php����d�	�K�-vendor/hoa/math/Combinatorics/Arrangement.php���dsY�7�vendor/hoa/math/Bin/Calc.php����d��&�~�&vendor/hoa/math/Visitor/Arithmetic.phpG'���dG'-�}ڤvendor/hoa/math/Context.php ���d J/���vendor/hoa/compiler/Ll1.php`k���d`k�\K�vendor/hoa/compiler/Llk/Llk.pp����d�Gr��$vendor/hoa/compiler/Llk/TreeNode.php}���d}���,vendor/hoa/compiler/Llk/Sampler/Coverage.php{F���d{F�CC�5vendor/hoa/compiler/Llk/Sampler/BoundedExhaustive.php�&���d�&U�o�+vendor/hoa/compiler/Llk/Sampler/Sampler.php����d�k�<*�+vendor/hoa/compiler/Llk/Sampler/Uniform.php�"���d�"���-vendor/hoa/compiler/Llk/Sampler/Exception.php����d���k�vendor/hoa/compiler/Llk/Llk.php�.���d�.�&��+vendor/hoa/compiler/Llk/Rule/Invocation.phpK���dK�2-y�+vendor/hoa/compiler/Llk/Rule/Repetition.php����d�T1&�'vendor/hoa/compiler/Llk/Rule/Choice.phpe���de�Oᙤ.vendor/hoa/compiler/Llk/Rule/Concatenation.phpz���dz_oP�)vendor/hoa/compiler/Llk/Rule/Analyzer.php"4���d"4��xF�%vendor/hoa/compiler/Llk/Rule/Rule.php"���d"�hg7�&vendor/hoa/compiler/Llk/Rule/Token.php=���d=�i�/�&vendor/hoa/compiler/Llk/Rule/Ekzit.phpo���doV�|�&vendor/hoa/compiler/Llk/Rule/Entry.phph���dh��+ͤ!vendor/hoa/compiler/Llk/Lexer.php����d�v�F�"vendor/hoa/compiler/Llk/Parser.php
Q���d
Q�J�(�vendor/hoa/compiler/PATCHES.txt����d����3vendor/hoa/compiler/Exception/UnrecognizedToken.php�
���d�
wؤ&vendor/hoa/compiler/Exception/Rule.php����d�5�<@�=vendor/hoa/compiler/Exception/FinalStateHasNotBeenReached.php����d��bsϤ'vendor/hoa/compiler/Exception/Lexer.php����d�����+vendor/hoa/compiler/Exception/Exception.php���dQ#�w�.vendor/hoa/compiler/Exception/IllegalToken.php�
���d�
EW ��1vendor/hoa/compiler/Exception/UnexpectedToken.php����d���/��vendor/hoa/compiler/Bin/Pp.php����d�%��.vendor/hoa/compiler/Documentation/En/Index.xyl�����d���d/�.vendor/hoa/compiler/Documentation/Fr/Index.xylt����dt��E�$vendor/hoa/compiler/Visitor/Dump.php?
���d?
L�护 vendor/hoa/protocol/Protocol.php���d�H��vendor/hoa/protocol/PATCHES.txt����d����P�#vendor/hoa/protocol/Bin/Resolve.php����d�A��M�$vendor/hoa/protocol/Node/Library.php����d���7�!vendor/hoa/protocol/Node/Node.php�&���d�&��z�vendor/hoa/protocol/Wrapper.php&F���d&F[
ZC�!vendor/hoa/protocol/Exception.php����d�6��\�vendor/hoa/exception/Idle.php����d�/ϗ̤vendor/hoa/exception/Group.phpZ���dZ�f�$�vendor/hoa/exception/Error.phpH���dH*b�&�"vendor/hoa/exception/Exception.phpO���dO��&vendor/hoa/consistency/Consistency.php~ ���d~ ��f�"vendor/hoa/consistency/PATCHES.txt����d�oV?�%vendor/hoa/consistency/Autoloader.phpa���da���"vendor/hoa/consistency/Prelude.php���dY`�i�$vendor/hoa/consistency/Xcallable.phpt ���dt t��$vendor/hoa/consistency/Exception.php����d��m�X�vendor/hoa/visitor/Visit.php����d���5�vendor/hoa/visitor/Element.php����d��e�b�vendor/hoa/ustring/Search.php���d���vendor/hoa/ustring/Ustring.php�e���d�e����#vendor/hoa/ustring/Bin/Fromcode.php����d�;�m�!vendor/hoa/ustring/Bin/Tocode.php����d�����-vendor/hoa/ustring/Documentation/En/Index.xylh���dh��v�-vendor/hoa/ustring/Documentation/Fr/Index.xylEn���dEn�Fp� vendor/hoa/ustring/Exception.php����d�P��R�&vendor/hoa/zformat/Parameterizable.php����d��Kn� vendor/hoa/zformat/Parameter.phpG���dG��?�� vendor/hoa/zformat/Exception.php����d�N�f�&vendor/hoa/regex/Visitor/Isotropic.php>$���d>$CId;�vendor/hoa/regex/Grammar.pp	���d	AL��vendor/hoa/regex/Exception.php����d� ���7vendor/phpstan/phpdoc-parser/src/Ast/NodeAttributes.php����d��YXT�6vendor/phpstan/phpdoc-parser/src/Ast/NodeTraverser.php�*���d�*�B,��Bvendor/phpstan/phpdoc-parser/src/Ast/Type/OffsetAccessTypeNode.php����d��3?ݤBvendor/phpstan/phpdoc-parser/src/Ast/Type/IntersectionTypeNode.phpF���dF7�6�@vendor/phpstan/phpdoc-parser/src/Ast/Type/IdentifierTypeNode.php����d�F��>vendor/phpstan/phpdoc-parser/src/Ast/Type/NullableTypeNode.php����d�K6�ˤ=vendor/phpstan/phpdoc-parser/src/Ast/Type/GenericTypeNode.phpR���dRq�`�;vendor/phpstan/phpdoc-parser/src/Ast/Type/UnionTypeNode.php?���d?T��;vendor/phpstan/phpdoc-parser/src/Ast/Type/ConstTypeNode.php���d!�.ߤ;vendor/phpstan/phpdoc-parser/src/Ast/Type/ArrayTypeNode.php����d��Ξ��=vendor/phpstan/phpdoc-parser/src/Ast/Type/InvalidTypeNode.phpS���dS����=vendor/phpstan/phpdoc-parser/src/Ast/Type/ObjectShapeNode.phpM���dMͥR��Avendor/phpstan/phpdoc-parser/src/Ast/Type/ObjectShapeItemNode.php���d���>vendor/phpstan/phpdoc-parser/src/Ast/Type/CallableTypeNode.phpU���dU���ɤGvendor/phpstan/phpdoc-parser/src/Ast/Type/CallableTypeParameterNode.php����d�\6��@vendor/phpstan/phpdoc-parser/src/Ast/Type/ArrayShapeItemNode.php����d��ԯ�<vendor/phpstan/phpdoc-parser/src/Ast/Type/ArrayShapeNode.php����d���Y�:vendor/phpstan/phpdoc-parser/src/Ast/Type/ThisTypeNode.php(���d(+�œ�Mvendor/phpstan/phpdoc-parser/src/Ast/Type/ConditionalTypeForParameterNode.phpA���dA>a���Avendor/phpstan/phpdoc-parser/src/Ast/Type/ConditionalTypeNode.phpN���dN��@�6vendor/phpstan/phpdoc-parser/src/Ast/Type/TypeNode.php����d��]�ˤPvendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/QuoteAwareConstExprStringNode.phpP���dP��]�Fvendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprStringNode.php����d�č��Evendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprFloatNode.php����d�	��Dvendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprTrueNode.php;���d;�ĉE�Ivendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprArrayItemNode.php���d4�|ͤAvendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstFetchNode.php����d��[e�@vendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprNode.php����d�0��K�Evendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprFalseNode.php=���d=P1w1�Gvendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprIntegerNode.php����d�ҳ���Evendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprArrayNode.phpF���dFD���Dvendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprNullNode.php;���d;�g
��Cvendor/phpstan/phpdoc-parser/src/Ast/NodeVisitor/CloningVisitor.php����d��d���2vendor/phpstan/phpdoc-parser/src/Ast/Attribute.php9���d9����?vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocChildNode.php����d�����Ivendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/TypelessParamTagValueNode.php���d���<�Jvendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/AssertTagPropertyValueNode.php����d��P�o�Dvendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/TemplateTagValueNode.php���d���ɤCvendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/SelfOutTagValueNode.php����d���2K�@vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/UsesTagValueNode.php����d�����Kvendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/MethodTagValueParameterNode.php3���d3�뉤Bvendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/ThrowsTagValueNode.php����d���6��Bvendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocTagValueNode.php����d���9e�?vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/VarTagValueNode.phpB���dBkN�-�Kvendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/TypeAliasImportTagValueNode.php����d�pк�Dvendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/ParamOutTagValueNode.php2���d2m�>vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocTextNode.php����d���N�Jvendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/Doctrine/DoctrineArrayItem.phpL���dL�0B�Kvendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/Doctrine/DoctrineAnnotation.php����d�(�TͤFvendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/Doctrine/DoctrineArray.phpT���dT|�m��Mvendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/Doctrine/DoctrineTagValueNode.php����d�^��Ivendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/Doctrine/DoctrineArgument.php����d�LM*�Fvendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/DeprecatedTagValueNode.php���d2��w�Evendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/TypeAliasTagValueNode.phpw���dw6&"!�Fvendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/ImplementsTagValueNode.php����d�?���Bvendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/ReturnTagValueNode.php����d��H�Cvendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/ExtendsTagValueNode.php����d�uE此Dvendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/PropertyTagValueNode.php-���d-Y�?ŤCvendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/GenericTagValueNode.php����d��&��Cvendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/InvalidTagValueNode.php����d�>��N�Avendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/MixinTagValueNode.php����d�a���Hvendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/AssertTagMethodValueNode.php����d��Ěd�Bvendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/AssertTagValueNode.phpp���dp�>䍤:vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocNode.php*���d*?	
��Bvendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/MethodTagValueNode.php����d�4�>ˤAvendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/ParamTagValueNode.php����d������=vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocTagNode.php(���d(Xr��<vendor/phpstan/phpdoc-parser/src/Ast/AbstractNodeVisitor.php����d��/��-vendor/phpstan/phpdoc-parser/src/Ast/Node.phpw���dw?S;
�4vendor/phpstan/phpdoc-parser/src/Ast/NodeVisitor.php�
���d�
o����4vendor/phpstan/phpdoc-parser/src/Printer/Printer.php�{���d�{)i�R�3vendor/phpstan/phpdoc-parser/src/Printer/Differ.php����d�R�ǀ�5vendor/phpstan/phpdoc-parser/src/Printer/DiffElem.php����d��Z6�0vendor/phpstan/phpdoc-parser/src/Lexer/Lexer.php����d�Y�6vendor/phpstan/phpdoc-parser/src/Parser/TypeParser.php-���d-�!]�9vendor/phpstan/phpdoc-parser/src/Parser/TokenIterator.php� ���d� 
��c�8vendor/phpstan/phpdoc-parser/src/Parser/PhpDocParser.php�����d��U�9�;vendor/phpstan/phpdoc-parser/src/Parser/ParserException.phpg	���dg	u/g��;vendor/phpstan/phpdoc-parser/src/Parser/ConstExprParser.phpm���dmޖ��;vendor/phpstan/phpdoc-parser/src/Parser/StringUnescaper.php�	���d�	�Q��$vendor/phpstan/phpdoc-parser/LICENSE.���d.�-�+vendor/phpstan/php-8-stubs/Php8StubsMap.phpC����dC��`���?vendor/phpstan/php-8-stubs/stubs/sapi/phpdbg/phpdbg_prompt.stub9���d9/_��Bvendor/phpstan/php-8-stubs/stubs/sapi/phpdbg/phpdbg_end_oplog.stubC���dCfMi�Evendor/phpstan/php-8-stubs/stubs/sapi/phpdbg/phpdbg_break_method.stubN���dN��k�Dvendor/phpstan/php-8-stubs/stubs/sapi/phpdbg/phpdbg_start_oplog.stub0���d0s����Gvendor/phpstan/php-8-stubs/stubs/sapi/phpdbg/phpdbg_break_function.stubC���dC�6:�Gvendor/phpstan/php-8-stubs/stubs/sapi/phpdbg/phpdbg_get_executable.stubG���dG��x�>vendor/phpstan/php-8-stubs/stubs/sapi/phpdbg/phpdbg_color.stubE���dEP�s��Cvendor/phpstan/php-8-stubs/stubs/sapi/phpdbg/phpdbg_break_next.stubQ���dQz�o�Cvendor/phpstan/php-8-stubs/stubs/sapi/phpdbg/phpdbg_break_file.stubF���dF�X5C�>vendor/phpstan/php-8-stubs/stubs/sapi/phpdbg/phpdbg_clear.stub*���d*Ȅ�P�=vendor/phpstan/php-8-stubs/stubs/sapi/phpdbg/phpdbg_exec.stub?���d?$6�m�Dvendor/phpstan/php-8-stubs/stubs/sapi/cli/cli_set_process_title.stub@���d@2I(��Fvendor/phpstan/php-8-stubs/stubs/sapi/cli/apache_response_headers.stub6���d68d�J�Dvendor/phpstan/php-8-stubs/stubs/sapi/cli/cli_get_process_title.stub6���d6�ĥ�<vendor/phpstan/php-8-stubs/stubs/sapi/cli/getallheaders.stub,���d,�"�)�Evendor/phpstan/php-8-stubs/stubs/sapi/cli/apache_request_headers.stub5���d5q"�Gvendor/phpstan/php-8-stubs/stubs/sapi/apache2handler/apache_getenv.stub^���d^�_�Kvendor/phpstan/php-8-stubs/stubs/sapi/apache2handler/apache_lookup_uri.stubi���di,=_ܤQvendor/phpstan/php-8-stubs/stubs/sapi/apache2handler/apache_response_headers.stub6���d68d�J�Avendor/phpstan/php-8-stubs/stubs/sapi/apache2handler/virtual.stub0���d02�.Z�Gvendor/phpstan/php-8-stubs/stubs/sapi/apache2handler/apache_setenv.stube���de��g�Lvendor/phpstan/php-8-stubs/stubs/sapi/apache2handler/apache_get_version.stub8���d8t�$��Lvendor/phpstan/php-8-stubs/stubs/sapi/apache2handler/apache_get_modules.stub1���d1�Gvendor/phpstan/php-8-stubs/stubs/sapi/apache2handler/getallheaders.stubQ���dQ�i��Pvendor/phpstan/php-8-stubs/stubs/sapi/apache2handler/apache_request_headers.stub5���d5q"�Evendor/phpstan/php-8-stubs/stubs/sapi/apache2handler/apache_note.stub^���d^�sJ�Evendor/phpstan/php-8-stubs/stubs/sapi/cgi/apache_child_terminate.stubV���dV[�/O�Fvendor/phpstan/php-8-stubs/stubs/sapi/cgi/apache_response_headers.stub6���d68d�J�<vendor/phpstan/php-8-stubs/stubs/sapi/cgi/getallheaders.stubQ���dQ�i��Evendor/phpstan/php-8-stubs/stubs/sapi/cgi/apache_request_headers.stub5���d5q"�Ivendor/phpstan/php-8-stubs/stubs/sapi/fpm/fpm/fastcgi_finish_request.stubV���dVtz��@vendor/phpstan/php-8-stubs/stubs/sapi/fpm/fpm/getallheaders.stubQ���dQ�i��Ivendor/phpstan/php-8-stubs/stubs/sapi/fpm/fpm/apache_request_headers.stub5���d5q"�Avendor/phpstan/php-8-stubs/stubs/sapi/fpm/fpm/fpm_get_status.stub3���d3�V-�Nvendor/phpstan/php-8-stubs/stubs/sapi/litespeed/litespeed_request_headers.stubZ���dZ��ϤMvendor/phpstan/php-8-stubs/stubs/sapi/litespeed/litespeed_finish_request.stub6���d6�-�N�Lvendor/phpstan/php-8-stubs/stubs/sapi/litespeed/apache_response_headers.stube���de����Gvendor/phpstan/php-8-stubs/stubs/sapi/litespeed/apache_get_modules.stub1���d1�Bvendor/phpstan/php-8-stubs/stubs/sapi/litespeed/getallheaders.stubT���dT�W~�Kvendor/phpstan/php-8-stubs/stubs/sapi/litespeed/apache_request_headers.stub]���d]e�MƤOvendor/phpstan/php-8-stubs/stubs/sapi/litespeed/litespeed_response_headers.stub?���d?:��R�;vendor/phpstan/php-8-stubs/stubs/Zend/get_defined_vars.stubF���dFV���?vendor/phpstan/php-8-stubs/stubs/Zend/ReturnTypeWillChange.stubk���dk�Y��8vendor/phpstan/php-8-stubs/stubs/Zend/func_get_args.stub,���d,:&��>vendor/phpstan/php-8-stubs/stubs/Zend/get_extension_funcs.stub`���d`�?f�6vendor/phpstan/php-8-stubs/stubs/Zend/class_alias.stub\���d\j�Vp�:vendor/phpstan/php-8-stubs/stubs/Zend/get_resource_id.stubV���dV�r	�4vendor/phpstan/php-8-stubs/stubs/Zend/gc_status.stub?���d?.5u�3vendor/phpstan/php-8-stubs/stubs/Zend/Iterator.stub���d]燤>vendor/phpstan/php-8-stubs/stubs/Zend/UnhandledMatchError.stub4���d4-�A�8vendor/phpstan/php-8-stubs/stubs/Zend/WeakReference.stub����d�H�&�<vendor/phpstan/php-8-stubs/stubs/Zend/get_class_methods.stube���de6]rX�<vendor/phpstan/php-8-stubs/stubs/Zend/IteratorAggregate.stub����d���-E�0vendor/phpstan/php-8-stubs/stubs/Zend/Fiber.stub���d9���7vendor/phpstan/php-8-stubs/stubs/Zend/trait_exists.stubN���dN��P�6vendor/phpstan/php-8-stubs/stubs/Zend/enum_exists.stub]���d]�&��Avendor/phpstan/php-8-stubs/stubs/Zend/AllowDynamicProperties.stub����d���]%�5vendor/phpstan/php-8-stubs/stubs/Zend/strcasecmp.stubG���dGRP�Ԥ>vendor/phpstan/php-8-stubs/stubs/Zend/get_declared_traits.stubI���dIm�$��7vendor/phpstan/php-8-stubs/stubs/Zend/Serializable.stub����d���i�<vendor/phpstan/php-8-stubs/stubs/Zend/set_error_handler.stub~���d~�S�Q�9vendor/phpstan/php-8-stubs/stubs/Zend/is_subclass_of.stub����d����l�Bvendor/phpstan/php-8-stubs/stubs/Zend/get_mangled_object_vars.stubD���dDa�H'�=vendor/phpstan/php-8-stubs/stubs/Zend/get_required_files.stubV���dV\��,�5vendor/phpstan/php-8-stubs/stubs/Zend/FiberError.stubp���dp�U3�<vendor/phpstan/php-8-stubs/stubs/Zend/gc_collect_cycles.stub.���d.��
��:vendor/phpstan/php-8-stubs/stubs/Zend/error_reporting.stubD���dD$/k�/vendor/phpstan/php-8-stubs/stubs/Zend/is_a.stub����d��Q��8vendor/phpstan/php-8-stubs/stubs/Zend/func_num_args.stub*���d*Յ��8vendor/phpstan/php-8-stubs/stubs/Zend/method_exists.stubx���dxOaf�4vendor/phpstan/php-8-stubs/stubs/Zend/Generator.stub����d�~C>=�@vendor/phpstan/php-8-stubs/stubs/Zend/restore_error_handler.stub����d��*�5�:vendor/phpstan/php-8-stubs/stubs/Zend/get_object_vars.stub<���d<��N��=vendor/phpstan/php-8-stubs/stubs/Zend/get_included_files.stubH���dH�I�:�;vendor/phpstan/php-8-stubs/stubs/Zend/extension_loaded.stub?���d?1{U�5vendor/phpstan/php-8-stubs/stubs/Zend/gc_disable.stub(���d(��@vendor/phpstan/php-8-stubs/stubs/Zend/get_defined_constants.stubc���dc�K�k�3vendor/phpstan/php-8-stubs/stubs/Zend/UnitEnum.stubz���dz`�Ԥ2vendor/phpstan/php-8-stubs/stubs/Zend/defined.stub:���d:0�B7�@vendor/phpstan/php-8-stubs/stubs/Zend/get_defined_functions.stubh���dh��S�;vendor/phpstan/php-8-stubs/stubs/Zend/get_called_class.stub0���d0B�p��<vendor/phpstan/php-8-stubs/stubs/Zend/get_resource_type.stub[���d[�S0��5vendor/phpstan/php-8-stubs/stubs/Zend/BackedEnum.stub����d�jWP\�7vendor/phpstan/php-8-stubs/stubs/Zend/CompileError.stub-���d-���:vendor/phpstan/php-8-stubs/stubs/Zend/ArithmeticError.stub0���d0�ڏ�;vendor/phpstan/php-8-stubs/stubs/Zend/get_parent_class.stub^���d^92ß�5vendor/phpstan/php-8-stubs/stubs/Zend/user_error.stubu���duqc�y�:vendor/phpstan/php-8-stubs/stubs/Zend/property_exists.stub|���d|�{Z�2vendor/phpstan/php-8-stubs/stubs/Zend/WeakMap.stubJ���dJ<���@vendor/phpstan/php-8-stubs/stubs/Zend/set_exception_handler.stubg���dg#\%�4vendor/phpstan/php-8-stubs/stubs/Zend/get_class.stubA���dA$5��0vendor/phpstan/php-8-stubs/stubs/Zend/Error.stub
���d
��,h�2vendor/phpstan/php-8-stubs/stubs/Zend/strncmp.stubQ���dQ�}�.�9vendor/phpstan/php-8-stubs/stubs/Zend/zend_thread_id.stubJ���dJM�v"�6vendor/phpstan/php-8-stubs/stubs/Zend/strncasecmp.stubU���dUc"wߤ9vendor/phpstan/php-8-stubs/stubs/Zend/get_class_vars.stubQ���dQ�Ƥ4vendor/phpstan/php-8-stubs/stubs/Zend/TypeError.stub*���d*��֤@vendor/phpstan/php-8-stubs/stubs/Zend/get_loaded_extensions.stubh���dh���4vendor/phpstan/php-8-stubs/stubs/Zend/Exception.stubm���dm���5vendor/phpstan/php-8-stubs/stubs/Zend/ParseError.stub2���d2�!�5vendor/phpstan/php-8-stubs/stubs/Zend/Stringable.stubK���dK��X9�Dvendor/phpstan/php-8-stubs/stubs/Zend/restore_exception_handler.stub����d�����7vendor/phpstan/php-8-stubs/stubs/Zend/func_get_arg.stub8���d8�E4)�;vendor/phpstan/php-8-stubs/stubs/Zend/InternalIterator.stub����d��.㧤Bvendor/phpstan/php-8-stubs/stubs/Zend/get_declared_interfaces.stubM���dM�Q�s�8vendor/phpstan/php-8-stubs/stubs/Zend/gc_mem_caches.stub1���d1���4vendor/phpstan/php-8-stubs/stubs/Zend/Attribute.stub����d��E�Y�=vendor/phpstan/php-8-stubs/stubs/Zend/ArgumentCountError.stub7���d7�f-�?vendor/phpstan/php-8-stubs/stubs/Zend/get_declared_classes.stubJ���dJ���X�:vendor/phpstan/php-8-stubs/stubs/Zend/debug_backtrace.stub����d��Gᝤ5vendor/phpstan/php-8-stubs/stubs/Zend/gc_enabled.stub(���d(�����1vendor/phpstan/php-8-stubs/stubs/Zend/strlen.stub1���d1�����4vendor/phpstan/php-8-stubs/stubs/Zend/gc_enable.stub'���d'��z�2vendor/phpstan/php-8-stubs/stubs/Zend/Closure.stub���d�BX�8vendor/phpstan/php-8-stubs/stubs/Zend/get_resources.stub@���d@'g?8�6vendor/phpstan/php-8-stubs/stubs/Zend/Traversable.stubC���dC�ł��7vendor/phpstan/php-8-stubs/stubs/Zend/class_exists.stubN���dN��ڑ�:vendor/phpstan/php-8-stubs/stubs/Zend/function_exists.stub=���d=b�9��1vendor/phpstan/php-8-stubs/stubs/Zend/define.stub����d�J�&=�7vendor/phpstan/php-8-stubs/stubs/Zend/zend_version.stubN���dN�/��1vendor/phpstan/php-8-stubs/stubs/Zend/strcmp.stubC���dC�_%�4vendor/phpstan/php-8-stubs/stubs/Zend/Countable.stub}���d}�ҿ��@vendor/phpstan/php-8-stubs/stubs/Zend/debug_print_backtrace.stubS���dS��̤3vendor/phpstan/php-8-stubs/stubs/Zend/stdClass.stubJ���dJ"�_�;vendor/phpstan/php-8-stubs/stubs/Zend/interface_exists.stubV���dV�0��9vendor/phpstan/php-8-stubs/stubs/Zend/ErrorException.stub!���d!F��m�5vendor/phpstan/php-8-stubs/stubs/Zend/ValueError.stub+���d+�&Ȳ�6vendor/phpstan/php-8-stubs/stubs/Zend/ArrayAccess.stub5���d5&+���Bvendor/phpstan/php-8-stubs/stubs/Zend/SensitiveParameterValue.stub9���d9��L�Cvendor/phpstan/php-8-stubs/stubs/Zend/ClosedGeneratorException.stub=���d=kQ��=vendor/phpstan/php-8-stubs/stubs/Zend/SensitiveParameter.stub����d���Q�>vendor/phpstan/php-8-stubs/stubs/Zend/DivisionByZeroError.stub>���d>�8դ8vendor/phpstan/php-8-stubs/stubs/Zend/trigger_error.stub\���d\;�58�4vendor/phpstan/php-8-stubs/stubs/Zend/Throwable.stubu���du�+"}�(vendor/phpstan/php-8-stubs/stubs/LICENSE����d����V�7vendor/phpstan/php-8-stubs/stubs/ext/ffi/FFI/CData.stub-���d-����;vendor/phpstan/php-8-stubs/stubs/ext/ffi/FFI/Exception.stub:���d:ڧ���7vendor/phpstan/php-8-stubs/stubs/ext/ffi/FFI/CType.stub���d�Ο�Avendor/phpstan/php-8-stubs/stubs/ext/ffi/FFI/ParserException.stubN���dN2q	0�1vendor/phpstan/php-8-stubs/stubs/ext/ffi/FFI.stub����d��8C�8vendor/phpstan/php-8-stubs/stubs/ext/zip/ZipArchive.stub����d���B�Fvendor/phpstan/php-8-stubs/stubs/ext/zip/zip_entry_compressedsize.stubz���dz�H{�<vendor/phpstan/php-8-stubs/stubs/ext/zip/zip_entry_name.stubs���ds�H}�@vendor/phpstan/php-8-stubs/stubs/ext/zip/zip_entry_filesize.stubt���dt����Ivendor/phpstan/php-8-stubs/stubs/ext/zip/zip_entry_compressionmethod.stub����d��ߦ�=vendor/phpstan/php-8-stubs/stubs/ext/zip/zip_entry_close.stubl���dlX�x0�7vendor/phpstan/php-8-stubs/stubs/ext/zip/zip_close.stubZ���dZ9+�^�<vendor/phpstan/php-8-stubs/stubs/ext/zip/zip_entry_open.stub����d�{�P��6vendor/phpstan/php-8-stubs/stubs/ext/zip/zip_read.stubl���dl�J��6vendor/phpstan/php-8-stubs/stubs/ext/zip/zip_open.stub����d��C�>�<vendor/phpstan/php-8-stubs/stubs/ext/zip/zip_entry_read.stub����d�`��>vendor/phpstan/php-8-stubs/stubs/ext/dom/DOMCharacterData.stub(���d(��,�=vendor/phpstan/php-8-stubs/stubs/ext/dom/DOMNamedNodeMap.stub����d�O&V��9vendor/phpstan/php-8-stubs/stubs/ext/dom/DOMNodeList.stubD���dD�cp��5vendor/phpstan/php-8-stubs/stubs/ext/dom/DOMAttr.stub����d������8vendor/phpstan/php-8-stubs/stubs/ext/dom/DOMElement.stub����d��a	פ;vendor/phpstan/php-8-stubs/stubs/ext/dom/DOMParentNode.stub����d�!�\�@vendor/phpstan/php-8-stubs/stubs/ext/dom/DOMEntityReference.stubo���do*���?vendor/phpstan/php-8-stubs/stubs/ext/dom/DOMImplementation.stub����d��C�>vendor/phpstan/php-8-stubs/stubs/ext/dom/DOMNameSpaceNode.stub"���d"^��9�6vendor/phpstan/php-8-stubs/stubs/ext/dom/DOMXPath.stub;���d;V�yQ�=vendor/phpstan/php-8-stubs/stubs/ext/dom/DOMDocumentType.stubT���dToW=�Avendor/phpstan/php-8-stubs/stubs/ext/dom/DOMDocumentFragment.stub����d�e9��Fvendor/phpstan/php-8-stubs/stubs/ext/dom/DOMProcessingInstruction.stub����d��B�Ȥ9vendor/phpstan/php-8-stubs/stubs/ext/dom/DOMNotation.stub.���d.�c�Bvendor/phpstan/php-8-stubs/stubs/ext/dom/dom_import_simplexml.stubL���dL.sJ��:vendor/phpstan/php-8-stubs/stubs/ext/dom/DOMChildNode.stubM���dM�P��5vendor/phpstan/php-8-stubs/stubs/ext/dom/DOMNode.stub����d�e�1��7vendor/phpstan/php-8-stubs/stubs/ext/dom/DOMEntity.stub,���d,�v���8vendor/phpstan/php-8-stubs/stubs/ext/dom/DOMComment.stubu���dup=1��=vendor/phpstan/php-8-stubs/stubs/ext/dom/DOMCdataSection.stubl���dl�� �9vendor/phpstan/php-8-stubs/stubs/ext/dom/DOMDocument.stub����d���x�:vendor/phpstan/php-8-stubs/stubs/ext/dom/DOMException.stub7���d7wH��5vendor/phpstan/php-8-stubs/stubs/ext/dom/DOMText.stub����d�8葰�=vendor/phpstan/php-8-stubs/stubs/ext/xmlreader/XMLReader.stub����d�F�|�Dvendor/phpstan/php-8-stubs/stubs/ext/fileinfo/mime_content_type.stubl���dl$��*�=vendor/phpstan/php-8-stubs/stubs/ext/fileinfo/finfo_file.stub����d��,���Bvendor/phpstan/php-8-stubs/stubs/ext/fileinfo/finfo_set_flags.stub����d��¤�=vendor/phpstan/php-8-stubs/stubs/ext/fileinfo/finfo_open.stub���de�¤?vendor/phpstan/php-8-stubs/stubs/ext/fileinfo/finfo_buffer.stub����d�k�@"�>vendor/phpstan/php-8-stubs/stubs/ext/fileinfo/finfo_close.stub����d�y�ؤ8vendor/phpstan/php-8-stubs/stubs/ext/fileinfo/finfo.stub ���d �&u'�Bvendor/phpstan/php-8-stubs/stubs/ext/enchant/enchant_dict_add.stubZ���dZ2&dw�Kvendor/phpstan/php-8-stubs/stubs/ext/enchant/enchant_broker_list_dicts.stube���de�*�Mvendor/phpstan/php-8-stubs/stubs/ext/enchant/enchant_broker_request_dict.stubp���dp�z��Jvendor/phpstan/php-8-stubs/stubs/ext/enchant/enchant_dict_quick_check.stub����d��ښ#�Nvendor/phpstan/php-8-stubs/stubs/ext/enchant/enchant_dict_add_to_personal.stub����d�G��I�Nvendor/phpstan/php-8-stubs/stubs/ext/enchant/enchant_broker_get_dict_path.stubv���dv�&�Ivendor/phpstan/php-8-stubs/stubs/ext/enchant/enchant_broker_describe.stubc���dc��X�Gvendor/phpstan/php-8-stubs/stubs/ext/enchant/enchant_dict_is_added.stub_���d_ӫut�Evendor/phpstan/php-8-stubs/stubs/ext/enchant/enchant_broker_free.stubZ���dZXǗ�Gvendor/phpstan/php-8-stubs/stubs/ext/enchant/enchant_dict_describe.stubi���di��5�Mvendor/phpstan/php-8-stubs/stubs/ext/enchant/enchant_dict_add_to_session.stube���de�����Dvendor/phpstan/php-8-stubs/stubs/ext/enchant/enchant_dict_check.stub\���d\۪��Jvendor/phpstan/php-8-stubs/stubs/ext/enchant/enchant_broker_free_dict.stubg���dgTIQ�Lvendor/phpstan/php-8-stubs/stubs/ext/enchant/enchant_dict_is_in_session.stub����d�A]t2�Fvendor/phpstan/php-8-stubs/stubs/ext/enchant/enchant_dict_suggest.stubv���dvO����Hvendor/phpstan/php-8-stubs/stubs/ext/enchant/enchant_dict_get_error.stubZ���dZ���>�Cvendor/phpstan/php-8-stubs/stubs/ext/enchant/EnchantDictionary.stub)���d)u.=^�Evendor/phpstan/php-8-stubs/stubs/ext/enchant/enchant_broker_init.stubA���dAo�X�Qvendor/phpstan/php-8-stubs/stubs/ext/enchant/enchant_broker_request_pwl_dict.stuby���dy����Mvendor/phpstan/php-8-stubs/stubs/ext/enchant/enchant_broker_set_ordering.stubn���dng�rդPvendor/phpstan/php-8-stubs/stubs/ext/enchant/enchant_dict_store_replacement.stub���d�{���Nvendor/phpstan/php-8-stubs/stubs/ext/enchant/enchant_broker_set_dict_path.stub|���d|B=ԤJvendor/phpstan/php-8-stubs/stubs/ext/enchant/enchant_broker_get_error.stubT���dT�=�Lvendor/phpstan/php-8-stubs/stubs/ext/enchant/enchant_broker_dict_exists.stub[���d[��t�?vendor/phpstan/php-8-stubs/stubs/ext/enchant/EnchantBroker.stubG���dG!����:vendor/phpstan/php-8-stubs/stubs/ext/bz2/bzdecompress.stuba���da�lc\�6vendor/phpstan/php-8-stubs/stubs/ext/bz2/bzerrstr.stub����d��k�ˤ5vendor/phpstan/php-8-stubs/stubs/ext/bz2/bzwrite.stub����d����$�5vendor/phpstan/php-8-stubs/stubs/ext/bz2/bzerrno.stub����d���Q��5vendor/phpstan/php-8-stubs/stubs/ext/bz2/bzerror.stub����d�.Ө_�8vendor/phpstan/php-8-stubs/stubs/ext/bz2/bzcompress.stube���de�d,R�5vendor/phpstan/php-8-stubs/stubs/ext/bz2/bzflush.stubg���dgN�D!�4vendor/phpstan/php-8-stubs/stubs/ext/bz2/bzopen.stub����d���DӤ5vendor/phpstan/php-8-stubs/stubs/ext/bz2/bzclose.stubg���dgc=��4vendor/phpstan/php-8-stubs/stubs/ext/bz2/bzread.stub^���d^��a�<vendor/phpstan/php-8-stubs/stubs/ext/sysvshm/shm_detach.stub>���d><��[�<vendor/phpstan/php-8-stubs/stubs/ext/sysvshm/shm_remove.stub>���d>|��=vendor/phpstan/php-8-stubs/stubs/ext/sysvshm/shm_put_var.stubW���dW��_�@vendor/phpstan/php-8-stubs/stubs/ext/sysvshm/shm_remove_var.stubL���dL=�*��=vendor/phpstan/php-8-stubs/stubs/ext/sysvshm/shm_get_var.stubJ���dJZ�F�Bvendor/phpstan/php-8-stubs/stubs/ext/sysvshm/SysvSharedMemory.stubJ���dJI�_+�=vendor/phpstan/php-8-stubs/stubs/ext/sysvshm/shm_has_var.stubI���dI\��¤<vendor/phpstan/php-8-stubs/stubs/ext/sysvshm/shm_attach.stubo���do�`�6vendor/phpstan/php-8-stubs/stubs/ext/bcmath/bcdiv.stubS���dS���7vendor/phpstan/php-8-stubs/stubs/ext/bcmath/bcsqrt.stubE���dE�ۗ�7vendor/phpstan/php-8-stubs/stubs/ext/bcmath/bccomp.stubQ���dQ��S�9vendor/phpstan/php-8-stubs/stubs/ext/bcmath/bcpowmod.stubj���dj�[u�8vendor/phpstan/php-8-stubs/stubs/ext/bcmath/bcscale.stub6���d6F���6vendor/phpstan/php-8-stubs/stubs/ext/bcmath/bcsub.stubS���dS�q��6vendor/phpstan/php-8-stubs/stubs/ext/bcmath/bcmul.stubS���dS�@*�6vendor/phpstan/php-8-stubs/stubs/ext/bcmath/bcadd.stubu���duD�嬤6vendor/phpstan/php-8-stubs/stubs/ext/bcmath/bcpow.stubV���dVH]�6vendor/phpstan/php-8-stubs/stubs/ext/bcmath/bcmod.stubS���dSXg���<vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_fieldsize.stub���dѸ
�Avendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_unescape_bytea.stub?���d?l���<vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_cmdtuples.stub���d2Zzu�Fvendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_set_error_verbosity.stub-���d-���:vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_loclose.stub����d���j��@vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_affected_rows.stub����d����8�:vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_convert.stubg���dg�%&��;vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_locreate.stub����d�q�'�=vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_send_query.stub����d���s�<vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_fieldtype.stub ���d �p���Dvendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_send_query_params.stub���d?w���<vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_fetch_row.stubU���dU�����8vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_query.stubD���dDS;�@vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_result_status.stub���dV�<vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_fetch_all.stub���d�X�<vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_field_num.stub����d�3!9�@vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_field_is_null.stub>���d>Y�h�?vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_fetch_object.stubk���dk�:��7vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_port.stub����d��b B�;vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_pconnect.stub����d��j�:vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_get_pid.stub����d�ڙ*�<vendor/phpstan/php-8-stubs/stubs/ext/pgsql/PgSql/Result.stubt���dtK}��@vendor/phpstan/php-8-stubs/stubs/ext/pgsql/PgSql/Connection.stubx���dxZ@	1�9vendor/phpstan/php-8-stubs/stubs/ext/pgsql/PgSql/Lob.stubq���dq���?vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_result_error.stub����d�w{5��;vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_lo_close.stub����d�r�G�?vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_cancel_query.stub����d�б##�=vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_get_notify.stub<���d<fQ�t�;vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_loimport.stub!���d!ȓ&�Avendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_clientencoding.stub@���d@ɃN*�Dvendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_fetch_all_columns.stub���d�'��9vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_delete.stub]���d]�μ�9vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_loread.stub$���d$0N���<vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_loreadall.stub����d�{�<��8vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_flush.stub����d��P
&�;vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_end_copy.stub����d�ݳ=�Evendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_transaction_status.stub����d��c{ŤFvendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_set_client_encoding.stub+���d+�^P�?vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_connect_poll.stub����d��O��9vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_insert.stuby���dy�1"K�;vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_put_line.stub���d����Dvendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_setclientencoding.stub����d�4eĨ�:vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_options.stub����d���D�:vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_version.stub
���d
���=�@vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_escape_string.stub4���d4�m[��7vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_exec.stubY���dY�}ϤBvendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_client_encoding.stub����d������Cvendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_parameter_status.stubB���dB��K�=vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_field_name.stub����d�^=���:vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_copy_to.stub����d�l&�c�>vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_fieldprtlen.stub����d���դ:vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_lo_open.stub����d��b�Ф<vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_fieldname.stub ���d ��W�:vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_untrace.stub����d��BӤ?vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_errormessage.stub2���d2l6g{�<vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_numfields.stub���d,�G!�>vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_fetch_assoc.stub+���d+�9�>vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_free_result.stub����d�x�@�:vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_prepare.stubx���dx\<b�9vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_socket.stub����d��Г��<vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_copy_from.stubf���df�D���Bvendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_connection_busy.stub����d��1D��>vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_fieldisnull.stub����d�to�{�7vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_ping.stub����d���ј�@vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_consume_input.stub����d�#�T��=vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_freeresult.stub���dl���9vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_update.stub{���d{4T��8vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_trace.stub���d�q�J�9vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_result.stub����d��{��6vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_tty.stub����d���+�=vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_field_type.stub����d����9vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_dbname.stub����d����'�;vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_fieldnum.stub���d�x`�:vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_lo_read.stub����d��e"~�:vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_connect.stub	���d	��b�<vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_lo_unlink.stub/���d/:d���:vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_execute.stub����d�~I�?vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_send_execute.stub���d���=vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_last_error.stub����d�
��\�Cvendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_connection_reset.stub����d��a+�<vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_meta_data.stub]���d]��mo�?vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_send_prepare.stub���d9Tbd�?vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_fetch_result.stub_���d_q���:vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_lo_tell.stub����d��7rѤ>vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_lo_truncate.stub����d���+�=vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_get_result.stub����d��ұ�9vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_select.stub����d��/��>vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_lo_read_all.stub����d�����?vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_field_prtlen.stub<���d<N�٤=vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_num_fields.stub����d��Au��;vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_last_oid.stub����d��O�8vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_close.stub����d�g���=vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_getlastoid.stub���d�E@?�Dvendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_escape_identifier.stubH���dHE4���:vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_lo_seek.stub����d�r���:vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_numrows.stub����d�T��D�9vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_loopen.stub����d�XC�D�Avendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_escape_literal.stubB���dB�>��?vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_query_params.stub����d�=G�"�;vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_lounlink.stuby���dyp���<vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_lo_import.stub����d��lF�<vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_lo_create.stubj���dj��5��Avendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_field_type_oid.stub����d��b�U�>vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_result_seek.stub����d�"F�Evendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_result_error_field.stub���d$�챤<vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_lo_export.stub����d��(�¤;vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_loexport.stub���d��k��=vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_field_size.stub����d�"/�>vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_fetch_array.stub[���d[eq!�;vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_num_rows.stub����d�d��ʤDvendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_connection_status.stub����d��ꁑ�>vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_last_notice.stub���d�,���?vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_escape_bytea.stub2���d2�w��7vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_host.stub����d����h�:vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_lowrite.stub@���d@kx{��>vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_field_table.stub���d���;vendor/phpstan/php-8-stubs/stubs/ext/pgsql/pg_lo_write.stub����d����6vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_mlsd.stub	���d	2��7vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_login.stub����d�y|��8vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_rename.stub����d��կ��9vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_rawlist.stubB���dB�l|�6vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_site.stub����d�^�U�7vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_chmod.stub����d�oO�V�8vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_append.stub1���d1RqΉ�<vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_get_option.stub����d�^by�7vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_rmdir.stub����d��T�Ԥ<vendor/phpstan/php-8-stubs/stubs/ext/ftp/FTP/Connection.stubv���dv;p���5vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_raw.stub����d�zo�:�6vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_quit.stub����d��QN�=vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_ssl_connect.stub+���d+��&�6vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_fput.stubo���dov�%��9vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_nb_fput.stubs���ds�#�%�7vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_alloc.stub���d�Eä<vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_set_option.stub
���d
��D�7vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_chdir.stub����d���c��6vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_size.stub����d�T\zn�9vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_nb_fget.stubs���ds\Q>�6vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_pasv.stub����d�8_�e�=vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_nb_continue.stub����d�6��7vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_mkdir.stub����d���W�9vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_connect.stub���dL-��6vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_cdup.stub����d���ޤ9vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_systype.stub����d�?� �5vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_pwd.stub����d��J�ʤ7vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_close.stub����d�����7vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_nlist.stub���dK*k�5vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_get.stubM���dM�#>�8vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_nb_put.stub]���d]����6vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_exec.stub����d�O��դ5vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_put.stubM���dM��NC�6vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_fget.stubo���do����6vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_mdtm.stub����d��e�D�8vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_nb_get.stubW���dWza�	�8vendor/phpstan/php-8-stubs/stubs/ext/ftp/ftp_delete.stub����d��A�W�;vendor/phpstan/php-8-stubs/stubs/ext/filter/filter_var.stubk���dkO���?vendor/phpstan/php-8-stubs/stubs/ext/filter/filter_has_var.stubo���do��*M�Cvendor/phpstan/php-8-stubs/stubs/ext/filter/filter_input_array.stub����d��;��=vendor/phpstan/php-8-stubs/stubs/ext/filter/filter_input.stub|���d|*<٤:vendor/phpstan/php-8-stubs/stubs/ext/filter/filter_id.stub8���d8��3ԤAvendor/phpstan/php-8-stubs/stubs/ext/filter/filter_var_array.stub����d�o�t��<vendor/phpstan/php-8-stubs/stubs/ext/filter/filter_list.stubA���dA�td�Ovendor/phpstan/php-8-stubs/stubs/ext/reflection/ReflectionFunctionAbstract.stub����d��K�3�Lvendor/phpstan/php-8-stubs/stubs/ext/reflection/ReflectionZendExtension.stub����d���:+�Evendor/phpstan/php-8-stubs/stubs/ext/reflection/ReflectionMethod.stub����d�5�(�Mvendor/phpstan/php-8-stubs/stubs/ext/reflection/ReflectionEnumBackedCase.stub����d��7�Hvendor/phpstan/php-8-stubs/stubs/ext/reflection/ReflectionException.stubZ���dZ�&���?vendor/phpstan/php-8-stubs/stubs/ext/reflection/Reflection.stub����d������Gvendor/phpstan/php-8-stubs/stubs/ext/reflection/ReflectionFunction.stub>���d>���i�Gvendor/phpstan/php-8-stubs/stubs/ext/reflection/ReflectionProperty.stub�
���d�
��Dvendor/phpstan/php-8-stubs/stubs/ext/reflection/ReflectionClass.stubD���dD����Lvendor/phpstan/php-8-stubs/stubs/ext/reflection/ReflectionClassConstant.stub����d�!
w�Hvendor/phpstan/php-8-stubs/stubs/ext/reflection/ReflectionReference.stube���de�O7�Hvendor/phpstan/php-8-stubs/stubs/ext/reflection/ReflectionAttribute.stub����d��1�Hvendor/phpstan/php-8-stubs/stubs/ext/reflection/ReflectionParameter.stub����d���\�Kvendor/phpstan/php-8-stubs/stubs/ext/reflection/ReflectionEnumUnitCase.stub����d�!�:��Cvendor/phpstan/php-8-stubs/stubs/ext/reflection/ReflectionEnum.stub:���d:��f
�Cvendor/phpstan/php-8-stubs/stubs/ext/reflection/ReflectionType.stub����d�lH{ǤHvendor/phpstan/php-8-stubs/stubs/ext/reflection/ReflectionUnionType.stubp���dp��촤Hvendor/phpstan/php-8-stubs/stubs/ext/reflection/ReflectionExtension.stub����d�I��D�Ovendor/phpstan/php-8-stubs/stubs/ext/reflection/ReflectionIntersectionType.stub����d�!:
�Hvendor/phpstan/php-8-stubs/stubs/ext/reflection/ReflectionNamedType.stub���dL��Q�Evendor/phpstan/php-8-stubs/stubs/ext/reflection/ReflectionObject.stubw���dw����Dvendor/phpstan/php-8-stubs/stubs/ext/reflection/ReflectionFiber.stub����d��
���>vendor/phpstan/php-8-stubs/stubs/ext/reflection/Reflector.stub3���d3�����Hvendor/phpstan/php-8-stubs/stubs/ext/reflection/ReflectionGenerator.stubo���do���%�;vendor/phpstan/php-8-stubs/stubs/ext/exif/exif_tagname.stub^���d^o��̤=vendor/phpstan/php-8-stubs/stubs/ext/exif/exif_imagetype.stubA���dA�v��=vendor/phpstan/php-8-stubs/stubs/ext/exif/exif_thumbnail.stub����d�Jd�=vendor/phpstan/php-8-stubs/stubs/ext/exif/exif_read_data.stub����d�Z���;vendor/phpstan/php-8-stubs/stubs/ext/xsl/XSLTProcessor.stub����d���Z�=vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_set_quota.stub����d�S�[{�Hvendor/phpstan/php-8-stubs/stubs/ext/imap/imap_rfc822_parse_headers.stubq���dq_���;vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_is_open.stubQ���dQ�W�@vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_getmailboxes.stub���d
	��:vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_errors.stub0���d0����@vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_setflag_full.stub���d�5:n�:vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_create.stub	���d	�;�8vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_mail.stub����d����I�7vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_uid.stub����d��5��=vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_fetchtext.stub/���d/�\��Bvendor/phpstan/php-8-stubs/stubs/ext/imap/imap_mailboxmsginfo.stub����d���H�:vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_alerts.stub0���d0�f!)�8vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_lsub.stub����d��D��=vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_get_quota.stubK���dK:�n��?vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_listmailbox.stub5���d5up�z�>vendor/phpstan/php-8-stubs/stubs/ext/imap/IMAP/Connection.stubw���dw̑^f�?vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_scanmailbox.stub_���d_T��`�<vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_savebody.stubw���dw#����=vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_fetchbody.stub!���d!�!Ks�9vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_check.stub����d��"3�6vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_gc.stub����d�d�S~�;vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_expunge.stub����d�/�Sx�Hvendor/phpstan/php-8-stubs/stubs/ext/imap/imap_rfc822_parse_adrlist.stub`���d`6I�^�?vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_unsubscribe.stub����d�X𲊤?vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_utf7_encode.stub>���d>�i;1�>vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_headerinfo.stubE���dE�/C��8vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_utf8.stubB���dB.��8vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_sort.stub���d	/:vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_binary.stub?���d?m���>vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_last_error.stub5���d5�?���:vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_status.stub���dI��B�:vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_base64.stub?���d?܃mv�;vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_headers.stub����d�j�$̤?vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_utf7_decode.stubD���dDƖ�;vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_timeout.stubR���dR��t��8vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_open.stub����d��*�h�=vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_mail_move.stub���dP��>vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_num_recent.stub����d���O"�:vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_delete.stub����d��&\�9vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_msgno.stub����d�w��8�8vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_body.stub����d�P�_w�Avendor/phpstan/php-8-stubs/stubs/ext/imap/imap_renamemailbox.stub����d�3�ĤAvendor/phpstan/php-8-stubs/stubs/ext/imap/imap_mutf7_to_utf8.stubF���dFyFK�:vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_qprint.stub?���d?/���:vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_rename.stub���dr;ڛ�:vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_getacl.stub����d�.��:�<vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_listscan.stub!���d!�M}�9vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_close.stub����d��^äHvendor/phpstan/php-8-stubs/stubs/ext/imap/imap_rfc822_write_address.stubr���dr��NΤ>vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_bodystruct.stub���d�N*�=vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_fetchmime.stub!���d!���Bvendor/phpstan/php-8-stubs/stubs/ext/imap/imap_listsubscribed.stub;���d;�3�<vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_undelete.stub����d������8vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_8bit.stub=���d=���K�=vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_mail_copy.stub���dܗ֡�:vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_append.stubW���dW��f0�Avendor/phpstan/php-8-stubs/stubs/ext/imap/imap_getsubscribed.stub	���d	���w�:vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_reopen.stub���do��x�Avendor/phpstan/php-8-stubs/stubs/ext/imap/imap_deletemailbox.stub����d��V��Bvendor/phpstan/php-8-stubs/stubs/ext/imap/imap_fetchstructure.stub���d&�"�@vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_mail_compose.stubU���dU!l烤8vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_ping.stub����d��P#-�Avendor/phpstan/php-8-stubs/stubs/ext/imap/imap_createmailbox.stub����d��%�֤=vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_subscribe.stub����d��)���Bvendor/phpstan/php-8-stubs/stubs/ext/imap/imap_clearflag_full.stub���d�k��Avendor/phpstan/php-8-stubs/stubs/ext/imap/imap_utf8_to_mutf7.stub]���d]�>���Avendor/phpstan/php-8-stubs/stubs/ext/imap/imap_get_quotaroot.stub����d���$�?vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_fetchheader.stub���dH�Z�8vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_list.stub����d���k�Fvendor/phpstan/php-8-stubs/stubs/ext/imap/imap_mime_header_decode.stubQ���dQ�JΤ8vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_scan.stubQ���dQ��{/�Bvendor/phpstan/php-8-stubs/stubs/ext/imap/imap_fetch_overview.stub���d��:}�:vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_search.stub/���d/��ꡤ;vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_num_msg.stub����d���S`�:vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_thread.stub����d��Vk9�:vendor/phpstan/php-8-stubs/stubs/ext/imap/imap_setacl.stub	���d	�_��;vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_kronecker.stubV���dV�
��8vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_div_qr.stub����d���oä6vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_sign.stub9���d90g��;vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_nextprime.stub?���d?p�c��8vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_clrbit.stub=���d=��7��6vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_root.stubD���dD#�3��5vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_abs.stub9���d9z/���8vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_intval.stub;���d;7�i�<vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_prob_prime.stubV���dV��C�8vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_jacobi.stubS���dS�}X�?vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_perfect_power.stubC���dC��4'�@vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_perfect_square.stubD���dDL4 �1vendor/phpstan/php-8-stubs/stubs/ext/gmp/GMP.stub>���d>��Ѥ8vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_invert.stubZ���dZ&އ�5vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_gcd.stubQ���dQ%�Ԥ:vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_binomial.stubD���dD$��5vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_div.stub����d���l�7vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_scan0.stubG���dG�X�|�=vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_random_seed.stubB���dB��Dp�5vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_com.stub9���d9��ʤ7vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_div_r.stubx���dx�K|�5vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_xor.stubQ���dQz�y��9vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_sqrtrem.stubU���dUX�=�5vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_pow.stubH���dH໭Ť=vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_random_bits.stub6���d6d�t��7vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_scan1.stubG���dGY�X�>vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_random_range.stubX���dX0��ݤ5vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_add.stubQ���dQwC¤8vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_gcdext.stubl���dla�w�4vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_or.stubP���dP���5vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_neg.stub9���d9��I/�6vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_init.stubD���dD��0��:vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_legendre.stubU���dU�YƤ5vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_mul.stubQ���dQyTϤ8vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_strval.stubN���dN�.7��6vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_fact.stub:���d:���6vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_sqrt.stub:���d:0�&�8vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_setbit.stubQ���dQ���5vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_and.stubQ���dQ�?Y�5vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_lcm.stubQ���dQ%��7vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_div_q.stubx���dx���֤5vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_mod.stubQ���dQ�g���9vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_rootrem.stub_���d_�����5vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_cmp.stubP���dP)�t�:vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_popcount.stub=���d=��\�:vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_divexact.stubV���dVղ�/�5vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_sub.stubQ���dQ��l��8vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_import.stubx���dx�jĤ9vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_testbit.stubI���dI_pǧ�6vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_powm.stubo���do`�K��9vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_hamdist.stubT���dT�o;"�8vendor/phpstan/php-8-stubs/stubs/ext/gmp/gmp_export.stub����d�m���9vendor/phpstan/php-8-stubs/stubs/ext/pcre/preg_quote.stubP���dP�Bᖤ:vendor/phpstan/php-8-stubs/stubs/ext/pcre/preg_filter.stub����d�
>���8vendor/phpstan/php-8-stubs/stubs/ext/pcre/preg_grep.stub[���d[��W��;vendor/phpstan/php-8-stubs/stubs/ext/pcre/preg_replace.stub����d�D�_ۤ9vendor/phpstan/php-8-stubs/stubs/ext/pcre/preg_split.stub����d�qi��=vendor/phpstan/php-8-stubs/stubs/ext/pcre/preg_match_all.stub����d��RK�Bvendor/phpstan/php-8-stubs/stubs/ext/pcre/preg_last_error_msg.stub3���d32�	l�Jvendor/phpstan/php-8-stubs/stubs/ext/pcre/preg_replace_callback_array.stub����d�lAh¤Dvendor/phpstan/php-8-stubs/stubs/ext/pcre/preg_replace_callback.stub����d���Pפ9vendor/phpstan/php-8-stubs/stubs/ext/pcre/preg_match.stub����d�$�.ݤ>vendor/phpstan/php-8-stubs/stubs/ext/pcre/preg_last_error.stub,���d,k�[�Gvendor/phpstan/php-8-stubs/stubs/ext/pspell/pspell_config_personal.stub����d���p�=vendor/phpstan/php-8-stubs/stubs/ext/pspell/pspell_check.stub����d�� \��Gvendor/phpstan/php-8-stubs/stubs/ext/pspell/pspell_add_to_personal.stub����d���8ۤEvendor/phpstan/php-8-stubs/stubs/ext/pspell/pspell_clear_session.stub����d�0E�0�Evendor/phpstan/php-8-stubs/stubs/ext/pspell/pspell_save_wordlist.stub����d����Ivendor/phpstan/php-8-stubs/stubs/ext/pspell/pspell_store_replacement.stub����d�I����?vendor/phpstan/php-8-stubs/stubs/ext/pspell/pspell_suggest.stub���d3�J*�Dvendor/phpstan/php-8-stubs/stubs/ext/pspell/pspell_new_personal.stub~���d~�{�դCvendor/phpstan/php-8-stubs/stubs/ext/pspell/pspell_config_repl.stub����d��o�&�;vendor/phpstan/php-8-stubs/stubs/ext/pspell/pspell_new.stubj���dj�h��Bvendor/phpstan/php-8-stubs/stubs/ext/pspell/pspell_new_config.stub����d��C���Cvendor/phpstan/php-8-stubs/stubs/ext/pspell/pspell_config_mode.stub����d��;u��Gvendor/phpstan/php-8-stubs/stubs/ext/pspell/pspell_config_data_dir.stub����d���Ot�Hvendor/phpstan/php-8-stubs/stubs/ext/pspell/pspell_config_save_repl.stub����d�Y���Evendor/phpstan/php-8-stubs/stubs/ext/pspell/pspell_config_ignore.stub����d���5��Fvendor/phpstan/php-8-stubs/stubs/ext/pspell/pspell_add_to_session.stub����d���/�Gvendor/phpstan/php-8-stubs/stubs/ext/pspell/pspell_config_dict_dir.stub����d��[Q��Bvendor/phpstan/php-8-stubs/stubs/ext/pspell/PSpell/Dictionary.stuby���dy�S�>vendor/phpstan/php-8-stubs/stubs/ext/pspell/PSpell/Config.stubu���duF�F�Jvendor/phpstan/php-8-stubs/stubs/ext/pspell/pspell_config_runtogether.stub����d��E:�Evendor/phpstan/php-8-stubs/stubs/ext/pspell/pspell_config_create.stub.���d.��ʅ�:vendor/phpstan/php-8-stubs/stubs/ext/json/json_decode.stubs���ds=����:vendor/phpstan/php-8-stubs/stubs/ext/json/json_encode.stub����d���SΤ?vendor/phpstan/php-8-stubs/stubs/ext/json/JsonSerializable.stub����d�a�H��<vendor/phpstan/php-8-stubs/stubs/ext/json/JsonException.stub2���d2P�'�Bvendor/phpstan/php-8-stubs/stubs/ext/json/json_last_error_msg.stub3���d3�#k�>vendor/phpstan/php-8-stubs/stubs/ext/json/json_last_error.stub,���d,�j�7vendor/phpstan/php-8-stubs/stubs/ext/phar/PharData.stubb&���db&�su��3vendor/phpstan/php-8-stubs/stubs/ext/phar/Phar.stubQ���dQ�8��<vendor/phpstan/php-8-stubs/stubs/ext/phar/PharException.stubT���dT�v�O�;vendor/phpstan/php-8-stubs/stubs/ext/phar/PharFileInfo.stub*���d*M�;�:vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_cursor.stub]���d]�Rl��;vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_columns.stub����d����:vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_result.stubt���dt�U��=vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_setoption.stubs���ds:�B��;vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_execute.stubj���djm䆤<vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_pconnect.stub����d�wt���>vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_autocommit.stubi���di��D�Dvendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_columnprivileges.stub����d�����?vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_fetch_array.stubp���dp��Z�>vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_statistics.stub����d��,%	�?vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_longreadlen.stubg���dg
-¤:vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_tables.stub����d�L��V�>vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_num_fields.stub_���d_b��?vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_foreignkeys.stub����d�$�-٤Bvendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_specialcolumns.stub����d�yn
j�?vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_data_source.stub����d����{�>vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_field_name.stubm���dmG����?vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_free_result.stubZ���dZ����6vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_do.stub����d��VW�;vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_connect.stub����d��mʉ�Rvendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_connection_string_should_quote.stub]���d]˭�=vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_field_len.stubi���di�9�I�9vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_close.stubJ���dJ��8��=vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_field_num.stubl���dlL�C�Kvendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_connection_string_quote.stubX���dX��&Ԥ<vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_num_rows.stubV���dV��l�Ovendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_connection_string_is_quoted.stubt���dt��Z��=vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_fetch_row.stubj���dj�fl��@vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_fetch_object.stub����d�}]Ve�?vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_next_result.stub����d���~Τ9vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_error.stubX���dXQ�{��Dvendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_procedurecolumns.stub���dk����<vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_errormsg.stub[���d[���|�?vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_gettypeinfo.stub{���d{����<vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_rollback.stubM���dM���>vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_fetch_into.stub����d���'Ť;vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_prepare.stubr���dr��@��8vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_exec.stubv���dv�B�>vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_field_type.stubm���dmJV��:vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_commit.stubK���dK����>vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_result_all.stubs���ds���u�?vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_field_scale.stubk���dk��[V�?vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_primarykeys.stub����d��1箤Cvendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_tableprivileges.stub���d�EU+�>vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_procedures.stub����d�-���Cvendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_field_precision.stub����d�����=vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_close_all.stubN���dN��ޤ;vendor/phpstan/php-8-stubs/stubs/ext/odbc/odbc_binmode.stuba���daUE'z�Fvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_write_pi.stubc���dc�u�Pvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_start_attribute_ns.stub���d��W�Fvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_start_pi.stubR���dRzL��Lvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_end_dtd_entity.stubH���dHN+8O�Evendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_end_dtd.stubA���dA{�W��Gvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_start_dtd.stub����d�|�GE�Gvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_write_raw.stubT���dT�I;��Mvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_end_dtd_element.stubI���dI0{��Bvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_text.stubO���dO;Б�Ovendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_write_dtd_attlist.stubj���djR]�H�Ivendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_end_element.stubE���dE�e��Kvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_output_memory.stub]���d]d����Mvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_write_attribute.stubf���df��!�Fvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_open_uri.stubi���di^z�=vendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/XMLWriter.stub���d�\���Ivendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_open_memory.stub?���d?�xr�Ivendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_write_cdata.stubV���dV���Ivendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_end_comment.stubE���dE)�^�Ovendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_start_dtd_attlist.stubY���dY���Kvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_start_comment.stubG���dG9��>�Dvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_end_pi.stub@���d@L`�r�Kvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_end_attribute.stubG���dGQ(g�Mvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_end_dtd_attlist.stubI���dI�Lu��Ovendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_write_dtd_element.stubj���dj�}��Mvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_start_attribute.stubW���dWwV�1�Jvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_end_document.stubF���dFs�Kvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_write_comment.stubX���dX:�פOvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_set_indent_string.stub`���d`.�f�Pvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_write_attribute_ns.stub����d�>�q�Kvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_start_element.stubU���dU�JܤGvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_write_dtd.stub����d��ߧ	�Nvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_full_end_element.stubJ���dJ�$�ڤNvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_start_element_ns.stub}���d}ykܤIvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_start_cdata.stubE���dE`at��Lvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_start_document.stub����d�.�G�Hvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_set_indent.stubR���dR�6�d�Kvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_write_element.stubn���dn/X��Nvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_write_dtd_entity.stub����d���ʤCvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_flush.stubY���dYdE�n�Nvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_write_element_ns.stub����d�œꪤGvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_end_cdata.stubC���dC.	q�Ovendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_start_dtd_element.stubb���db�M^��Nvendor/phpstan/php-8-stubs/stubs/ext/xmlwriter/xmlwriter_start_dtd_entity.stubg���dg��@�;vendor/phpstan/php-8-stubs/stubs/ext/ctype/ctype_lower.stub4���d4�$��;vendor/phpstan/php-8-stubs/stubs/ext/ctype/ctype_digit.stub4���d4���;vendor/phpstan/php-8-stubs/stubs/ext/ctype/ctype_upper.stub4���d4�9���;vendor/phpstan/php-8-stubs/stubs/ext/ctype/ctype_alpha.stub4���d4��g��;vendor/phpstan/php-8-stubs/stubs/ext/ctype/ctype_print.stub4���d4_�a��;vendor/phpstan/php-8-stubs/stubs/ext/ctype/ctype_alnum.stubV���dV��uŤ<vendor/phpstan/php-8-stubs/stubs/ext/ctype/ctype_xdigit.stub5���d5�V�;vendor/phpstan/php-8-stubs/stubs/ext/ctype/ctype_punct.stub4���d4Ѥ;vendor/phpstan/php-8-stubs/stubs/ext/ctype/ctype_graph.stub4���d4:�If�;vendor/phpstan/php-8-stubs/stubs/ext/ctype/ctype_space.stub4���d4_���;vendor/phpstan/php-8-stubs/stubs/ext/ctype/ctype_cntrl.stub4���d4b�N��Pvendor/phpstan/php-8-stubs/stubs/ext/date/date_create_immutable_from_format.stub����d����y�Fvendor/phpstan/php-8-stubs/stubs/ext/date/date_create_from_format.stub����d���^�8vendor/phpstan/php-8-stubs/stubs/ext/date/localtime.stubp���dp���Dvendor/phpstan/php-8-stubs/stubs/ext/date/date_create_immutable.stub����d�S����;vendor/phpstan/php-8-stubs/stubs/ext/date/DateTimeZone.stub����d����7vendor/phpstan/php-8-stubs/stubs/ext/date/strftime.stubT���dT0>v�@vendor/phpstan/php-8-stubs/stubs/ext/date/date_timezone_get.stubX���dXSr�y�@vendor/phpstan/php-8-stubs/stubs/ext/date/DateTimeImmutable.stub����d�V��ͤJvendor/phpstan/php-8-stubs/stubs/ext/date/timezone_abbreviations_list.stubQ���dQ���8�8vendor/phpstan/php-8-stubs/stubs/ext/date/checkdate.stubF���dF_;y�5vendor/phpstan/php-8-stubs/stubs/ext/date/gmdate.stubL���dL�H7��:vendor/phpstan/php-8-stubs/stubs/ext/date/date_sunset.stub����d�'{g~�:vendor/phpstan/php-8-stubs/stubs/ext/date/date_create.stubm���dm"�m��3vendor/phpstan/php-8-stubs/stubs/ext/date/time.stub!���d!i���Gvendor/phpstan/php-8-stubs/stubs/ext/date/timezone_transitions_get.stub����d�4�`�9vendor/phpstan/php-8-stubs/stubs/ext/date/gmstrftime.stubV���dV�_�<vendor/phpstan/php-8-stubs/stubs/ext/date/timezone_open.stubJ���dJ�9��9vendor/phpstan/php-8-stubs/stubs/ext/date/DatePeriod.stub���dPk*�@vendor/phpstan/php-8-stubs/stubs/ext/date/DateTimeInterface.stub����d��8��;vendor/phpstan/php-8-stubs/stubs/ext/date/DateInterval.stubT���dTƝC��7vendor/phpstan/php-8-stubs/stubs/ext/date/date_sub.stubU���dU(����5vendor/phpstan/php-8-stubs/stubs/ext/date/mktime.stub����d�*$b�4vendor/phpstan/php-8-stubs/stubs/ext/date/idate.stubN���dN�X$�Evendor/phpstan/php-8-stubs/stubs/ext/date/date_parse_from_format.stubl���dlp��[�9vendor/phpstan/php-8-stubs/stubs/ext/date/date_parse.stubP���dP[���Hvendor/phpstan/php-8-stubs/stubs/ext/date/date_default_timezone_set.stubI���dIjT�Ф<vendor/phpstan/php-8-stubs/stubs/ext/date/date_date_set.stubb���db�O�I�;vendor/phpstan/php-8-stubs/stubs/ext/date/date_sunrise.stub����d�s��?�Cvendor/phpstan/php-8-stubs/stubs/ext/date/date_interval_format.stubY���dY�#�<vendor/phpstan/php-8-stubs/stubs/ext/date/date_sun_info.stubt���dt5���7vendor/phpstan/php-8-stubs/stubs/ext/date/date_add.stubU���dU��8vendor/phpstan/php-8-stubs/stubs/ext/date/date_diff.stub����d��X�q�?vendor/phpstan/php-8-stubs/stubs/ext/date/date_isodate_set.stubn���dnoڲN�Tvendor/phpstan/php-8-stubs/stubs/ext/date/date_interval_create_from_date_string.stubb���db�	=�Cvendor/phpstan/php-8-stubs/stubs/ext/date/date_get_last_errors.stubP���dPU�[�Fvendor/phpstan/php-8-stubs/stubs/ext/date/timezone_name_from_abbr.stubo���do�ឤ3vendor/phpstan/php-8-stubs/stubs/ext/date/date.stubJ���dJ�����6vendor/phpstan/php-8-stubs/stubs/ext/date/getdate.stubS���dS��F�>vendor/phpstan/php-8-stubs/stubs/ext/date/date_offset_get.stubF���dF�O芤Dvendor/phpstan/php-8-stubs/stubs/ext/date/timezone_location_get.stubf���df���@vendor/phpstan/php-8-stubs/stubs/ext/date/timezone_name_get.stubF���dF�S�8vendor/phpstan/php-8-stubs/stubs/ext/date/strtotime.stubz���dz.��ɤ:vendor/phpstan/php-8-stubs/stubs/ext/date/date_modify.stubW���dW�\.�:vendor/phpstan/php-8-stubs/stubs/ext/date/date_format.stubU���dUQA���<vendor/phpstan/php-8-stubs/stubs/ext/date/date_time_set.stub����d�V��Cvendor/phpstan/php-8-stubs/stubs/ext/date/timezone_version_get.stub4���d4,�w��Avendor/phpstan/php-8-stubs/stubs/ext/date/date_timestamp_get.stubI���dI��,��7vendor/phpstan/php-8-stubs/stubs/ext/date/DateTime.stub

���d

j�y#�Bvendor/phpstan/php-8-stubs/stubs/ext/date/timezone_offset_get.stubc���dc�k$)�7vendor/phpstan/php-8-stubs/stubs/ext/date/gmmktime.stub����d�yk��Hvendor/phpstan/php-8-stubs/stubs/ext/date/date_default_timezone_get.stub9���d9&��ޤAvendor/phpstan/php-8-stubs/stubs/ext/date/date_timestamp_set.stubV���dV]���Hvendor/phpstan/php-8-stubs/stubs/ext/date/timezone_identifiers_list.stub����d�5S9C�@vendor/phpstan/php-8-stubs/stubs/ext/date/date_timezone_set.stub^���d^	��Rvendor/phpstan/php-8-stubs/stubs/ext/libxml/libxml_get_external_entity_loader.stubU���dU4^��Fvendor/phpstan/php-8-stubs/stubs/ext/libxml/libxml_get_last_error.stubA���dA���ŤDvendor/phpstan/php-8-stubs/stubs/ext/libxml/libxml_clear_errors.stub1���d1��X�Kvendor/phpstan/php-8-stubs/stubs/ext/libxml/libxml_set_streams_context.stub`���d`$�s��Kvendor/phpstan/php-8-stubs/stubs/ext/libxml/libxml_use_internal_errors.stubP���dP �7�<vendor/phpstan/php-8-stubs/stubs/ext/libxml/LibXMLError.stub?���d?���Mvendor/phpstan/php-8-stubs/stubs/ext/libxml/libxml_disable_entity_loader.stuba���da<��q�Rvendor/phpstan/php-8-stubs/stubs/ext/libxml/libxml_set_external_entity_loader.stub[���d[,=�9�Bvendor/phpstan/php-8-stubs/stubs/ext/libxml/libxml_get_errors.stub0���d0�tܤEvendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_ereg_search_pos.stub~���d~��㏤Ivendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_ereg_search_getregs.stubR���dRP|㈤:vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_ereg.stubs���dsx��1�Dvendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_list_encodings.stubG���dGp'S�Fvendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_convert_encoding.stub����d�m;AE�Fvendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_ereg_search_init.stubq���dq�\o�Hvendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_ereg_search_setpos.stub>���d>dA�Ƥ<vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_strcut.stubr���drZ(}C�Gvendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_convert_variables.stub����d���(t�Bvendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_convert_kana.stubl���dl�鉤>vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_language.stubj���djI�B�;vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_eregi.stubt���dt'��s�?vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_send_mail.stub����d��=
Y�<vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_strstr.stub����d����ۤDvendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_regex_encoding.stubb���dbfG2ΤBvendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_ereg_replace.stub����d����d�@vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_strimwidth.stub����d�����;vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_split.stubt���dt:돤�>vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_strwidth.stubP���dPE���<vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_strpos.stubw���dw���.�Gvendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_decode_mimeheader.stubB���dB^�u��Avendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_http_output.stubK���dK&\/�Avendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_ereg_search.stub\���d\�hQd�Cvendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_eregi_replace.stub����d��)5^�Gvendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_encode_mimeheader.stub����d�,9�ԤBvendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_detect_order.stubl���dl�If1�@vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_strtoupper.stubU���dUԗ���Gvendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_regex_set_options.stubK���dK�Ф?vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_parse_str.stub^���d^V�8�9vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_ord.stubQ���dQผ�Dvendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_check_encoding.stubh���dh�4��Kvendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_ereg_replace_callback.stub����d��n(a�Ivendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_preferred_mime_name.stubL���dLJ��Jvendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_decode_numericentity.stubk���dko5�Ф=vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_strrpos.stubx���dx���֤Dvendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_output_handler.stubL���dL��v'�;vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_scrub.stubP���dP{�V��<vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_strlen.stubN���dN��ߤHvendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_ereg_search_getpos.stub2���d2�����Bvendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_substr_count.stubf���dfҪUK�?vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_str_split.stubd���ddѬ̒�Gvendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_internal_encoding.stubQ���dQi���>vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_get_info.stubf���df��M��Fvendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_ereg_search_regs.stub���d$�+��9vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_chr.stubT���dT�j��Jvendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_encode_numericentity.stub~���d~�gƔ�=vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_strrchr.stub����d�;
h�@vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_ereg_match.stubc���dc���=vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_stripos.stubx���dx�*�e�=vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_stristr.stub����d�NK�ݤ<vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_substr.stubr���drw��>vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_strrichr.stub����d��ߤJvendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_substitute_character.stubl���dl�
�+�Bvendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_convert_case.stubb���dbw
�m�@vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_strtolower.stubU���dU,���>vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_strripos.stuby���dyK=K�Evendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_detect_encoding.stub����d�����Fvendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_encoding_aliases.stubY���dY����@vendor/phpstan/php-8-stubs/stubs/ext/mbstring/mb_http_input.stubd���ddY�}��Ivendor/phpstan/php-8-stubs/stubs/ext/simplexml/simplexml_load_string.stub����d�<���Dvendor/phpstan/php-8-stubs/stubs/ext/simplexml/SimpleXMLElement.stub����d��W��Evendor/phpstan/php-8-stubs/stubs/ext/simplexml/SimpleXMLIterator.stub=���d=
��Hvendor/phpstan/php-8-stubs/stubs/ext/simplexml/simplexml_import_dom.stub����d�ۣ9�Gvendor/phpstan/php-8-stubs/stubs/ext/simplexml/simplexml_load_file.stub����d������Avendor/phpstan/php-8-stubs/stubs/ext/standard/assert_options.stubP���dPa�0�Pvendor/phpstan/php-8-stubs/stubs/ext/standard/sapi_windows_set_ctrl_handler.stub_���d_f����?vendor/phpstan/php-8-stubs/stubs/ext/standard/is_countable.stub6���d6��=�@vendor/phpstan/php-8-stubs/stubs/ext/standard/strnatcasecmp.stubJ���dJ/�<�<vendor/phpstan/php-8-stubs/stubs/ext/standard/rewinddir.stuba���da��t�:vendor/phpstan/php-8-stubs/stubs/ext/standard/ini_get.stub;���d;`"�0�7vendor/phpstan/php-8-stubs/stubs/ext/standard/ftok.stubg���dg�����6vendor/phpstan/php-8-stubs/stubs/ext/standard/max.stub@���d@�{��Cvendor/phpstan/php-8-stubs/stubs/ext/standard/time_sleep_until.stub>���d>)�ޤ<vendor/phpstan/php-8-stubs/stubs/ext/standard/urldecode.stub7���d7b�:��Cvendor/phpstan/php-8-stubs/stubs/ext/standard/array_diff_assoc.stubM���dMJ��c�?vendor/phpstan/php-8-stubs/stubs/ext/standard/ob_get_flush.stub2���d2���6vendor/phpstan/php-8-stubs/stubs/ext/standard/end.stub6���d6U�?�Avendor/phpstan/php-8-stubs/stubs/ext/standard/getprotobyname.stub`���d`��R�;vendor/phpstan/php-8-stubs/stubs/ext/standard/pathinfo.stubl���dl�����8vendor/phpstan/php-8-stubs/stubs/ext/standard/range.stub����d��ޡ��Avendor/phpstan/php-8-stubs/stubs/ext/standard/proc_terminate.stubf���df�0��7vendor/phpstan/php-8-stubs/stubs/ext/standard/next.stub7���d7��b@�Mvendor/phpstan/php-8-stubs/stubs/ext/standard/register_shutdown_function.stub����d����Jvendor/phpstan/php-8-stubs/stubs/ext/standard/memory_reset_peak_usage.stubF���dF�ִ$�7vendor/phpstan/php-8-stubs/stubs/ext/standard/sort.stub����d�@%Pˤ?vendor/phpstan/php-8-stubs/stubs/ext/standard/similar_text.stubx���dx�I;�<vendor/phpstan/php-8-stubs/stubs/ext/standard/str_rot13.stub7���d7)Ԥ�Cvendor/phpstan/php-8-stubs/stubs/ext/standard/memory_get_usage.stubE���dE�r��@vendor/phpstan/php-8-stubs/stubs/ext/standard/array_unshift.stubI���dI���:vendor/phpstan/php-8-stubs/stubs/ext/standard/long2ip.stub4���d4q6c��8vendor/phpstan/php-8-stubs/stubs/ext/standard/hypot.stub6���d6�T���Dvendor/phpstan/php-8-stubs/stubs/ext/standard/file_get_contents.stub����d�����<vendor/phpstan/php-8-stubs/stubs/ext/standard/is_finite.stub1���d1�y9V�Fvendor/phpstan/php-8-stubs/stubs/ext/standard/php_ini_loaded_file.stub9���d9)���?vendor/phpstan/php-8-stubs/stubs/ext/standard/random_bytes.stubF���dFӞ�F�Avendor/phpstan/php-8-stubs/stubs/ext/standard/escapeshellcmd.stub=���d=��}��>vendor/phpstan/php-8-stubs/stubs/ext/standard/nl_langinfo.stubO���dO�}��>vendor/phpstan/php-8-stubs/stubs/ext/standard/utf8_encode.stub9���d9���[�9vendor/phpstan/php-8-stubs/stubs/ext/standard/sscanf.stubt���dt�X��?vendor/phpstan/php-8-stubs/stubs/ext/standard/gettimeofday.stub^���d^�.��<vendor/phpstan/php-8-stubs/stubs/ext/standard/inet_pton.stubV���dV��+��Ivendor/phpstan/php-8-stubs/stubs/ext/standard/register_tick_function.stub]���d]��j��9vendor/phpstan/php-8-stubs/stubs/ext/standard/fwrite.stubr���drg���Lvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_context_set_params.stubn���dn�ZC��8vendor/phpstan/php-8-stubs/stubs/ext/standard/sleep.stub.���d.�ъb�:vendor/phpstan/php-8-stubs/stubs/ext/standard/fputcsv.stub����d��X=Τ9vendor/phpstan/php-8-stubs/stubs/ext/standard/intdiv.stub7���d7����:vendor/phpstan/php-8-stubs/stubs/ext/standard/settype.stub>���d>V$=s�<vendor/phpstan/php-8-stubs/stubs/ext/standard/strnatcmp.stubF���dF�,!G�9vendor/phpstan/php-8-stubs/stubs/ext/standard/bindec.stub>���d>v�Q�9vendor/phpstan/php-8-stubs/stubs/ext/standard/strrev.stub4���d4�f�k�9vendor/phpstan/php-8-stubs/stubs/ext/standard/decoct.stub.���d.{�L�>vendor/phpstan/php-8-stubs/stubs/ext/standard/file_exists.stub9���d9�Y��<vendor/phpstan/php-8-stubs/stubs/ext/standard/inet_ntop.stubV���dVםHw�Mvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_context_set_default.stubW���dW�D�Gvendor/phpstan/php-8-stubs/stubs/ext/standard/call_user_func_array.stubR���dR	+q�;vendor/phpstan/php-8-stubs/stubs/ext/standard/vfprintf.stubj���djHf	�?vendor/phpstan/php-8-stubs/stubs/ext/standard/setrawcookie.stub����d���s��@vendor/phpstan/php-8-stubs/stubs/ext/standard/gethostbyname.stub=���d=���:vendor/phpstan/php-8-stubs/stubs/ext/standard/is_file.stub5���d5,��Y�;vendor/phpstan/php-8-stubs/stubs/ext/standard/getmygid.stub+���d+�P�>vendor/phpstan/php-8-stubs/stubs/ext/standard/get_cfg_var.stubE���dE�6��Mvendor/phpstan/php-8-stubs/stubs/ext/standard/sapi_windows_vt100_support.stub����d�z*Ȥ>vendor/phpstan/php-8-stubs/stubs/ext/standard/str_replace.stub����d�~�	�;vendor/phpstan/php-8-stubs/stubs/ext/standard/is_array.stub2���d2�F�@vendor/phpstan/php-8-stubs/stubs/ext/standard/getservbyport.stubl���dlO��ŤGvendor/phpstan/php-8-stubs/stubs/ext/standard/array_walk_recursive.stub����d�^Ǝ�Cvendor/phpstan/php-8-stubs/stubs/ext/standard/array_key_exists.stub^���d^�A�9vendor/phpstan/php-8-stubs/stubs/ext/standard/octdec.stub=���d=�<vendor/phpstan/php-8-stubs/stubs/ext/standard/urlencode.stub7���d7�Aڤ=vendor/phpstan/php-8-stubs/stubs/ext/standard/var_export.stubM���dM�{6�8vendor/phpstan/php-8-stubs/stubs/ext/standard/rsort.stubK���dK�C��Dvendor/phpstan/php-8-stubs/stubs/ext/standard/array_diff_uassoc.stubi���di�r=�Bvendor/phpstan/php-8-stubs/stubs/ext/standard/password_verify.stubK���dK�>���:vendor/phpstan/php-8-stubs/stubs/ext/standard/is_null.stub1���d1��1/�>vendor/phpstan/php-8-stubs/stubs/ext/standard/ini_get_all.stubv���dv����:vendor/phpstan/php-8-stubs/stubs/ext/standard/boolval.stub1���d1c�N?�Cvendor/phpstan/php-8-stubs/stubs/ext/standard/highlight_string.stubY���dY�Ǒ�7vendor/phpstan/php-8-stubs/stubs/ext/standard/acos.stub-���d-C�Ț�9vendor/phpstan/php-8-stubs/stubs/ext/standard/assert.stuby���dyqx�x�<vendor/phpstan/php-8-stubs/stubs/ext/standard/filegroup.stub<���d<\�q�Mvendor/phpstan/php-8-stubs/stubs/ext/standard/get_html_translation_table.stub����d�4���Gvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_socket_server.stub-���d-g��Y�;vendor/phpstan/php-8-stubs/stubs/ext/standard/readlink.stubw���dw�a"�8vendor/phpstan/php-8-stubs/stubs/ext/standard/touch.stubj���dj��d
�>vendor/phpstan/php-8-stubs/stubs/ext/standard/addcslashes.stubM���dM�g���9vendor/phpstan/php-8-stubs/stubs/ext/standard/unlink.stubj���dj�DS�8vendor/phpstan/php-8-stubs/stubs/ext/standard/crc32.stub>���d>��w��:vendor/phpstan/php-8-stubs/stubs/ext/standard/ini_set.stub����d�M��:vendor/phpstan/php-8-stubs/stubs/ext/standard/natsort.stub2���d2���Hvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_copy_to_stream.stub����d����q�;vendor/phpstan/php-8-stubs/stubs/ext/standard/md5_file.stubT���dTŇ�Ӥ:vendor/phpstan/php-8-stubs/stubs/ext/standard/ucwords.stubY���dY#�c�Dvendor/phpstan/php-8-stubs/stubs/ext/standard/ignore_user_abort.stubB���dBt���Dvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_bucket_new.stubg���dg�T��Fvendor/phpstan/php-8-stubs/stubs/ext/standard/realpath_cache_size.stub0���d0Z�|��:vendor/phpstan/php-8-stubs/stubs/ext/standard/ucfirst.stub5���d5��,.�<vendor/phpstan/php-8-stubs/stubs/ext/standard/microtime.stubp���dpL�Τ>vendor/phpstan/php-8-stubs/stubs/ext/standard/array_merge.stub:���d:*��ԤBvendor/phpstan/php-8-stubs/stubs/ext/standard/disk_free_space.stubE���dE���@vendor/phpstan/php-8-stubs/stubs/ext/standard/header_remove.stub?���d?&�פ@vendor/phpstan/php-8-stubs/stubs/ext/standard/array_combine.stubF���dF%ƤAvendor/phpstan/php-8-stubs/stubs/ext/standard/password_algos.stub-���d-��I�8vendor/phpstan/php-8-stubs/stubs/ext/standard/rtrim.stubY���dY� ��Jvendor/phpstan/php-8-stubs/stubs/ext/standard/htmlspecialchars_decode.stub����d��)�;vendor/phpstan/php-8-stubs/stubs/ext/standard/wordwrap.stub{���d{�P�t�Evendor/phpstan/php-8-stubs/stubs/ext/standard/ini_parse_quantity.stubQ���dQӰQs�9vendor/phpstan/php-8-stubs/stubs/ext/standard/arsort.stub����d���ɤ:vendor/phpstan/php-8-stubs/stubs/ext/standard/fgetcsv.stub����d�����6vendor/phpstan/php-8-stubs/stubs/ext/standard/pow.stubH���dH�ݧC�<vendor/phpstan/php-8-stubs/stubs/ext/standard/array_sum.stub8���d8n���8vendor/phpstan/php-8-stubs/stubs/ext/standard/log1p.stub.���d./#l�<vendor/phpstan/php-8-stubs/stubs/ext/standard/parse_url.stub����d��ȍ_�Avendor/phpstan/php-8-stubs/stubs/ext/standard/clearstatcache.stubl���dlP-��=vendor/phpstan/php-8-stubs/stubs/ext/standard/getrandmax.stubC���dCUǠ�8vendor/phpstan/php-8-stubs/stubs/ext/standard/crypt.stubO���dO�]�6vendor/phpstan/php-8-stubs/stubs/ext/standard/min.stub@���d@��ꉤ9vendor/phpstan/php-8-stubs/stubs/ext/standard/chroot.stubu���du���=vendor/phpstan/php-8-stubs/stubs/ext/standard/localeconv.stub@���d@�E��Dvendor/phpstan/php-8-stubs/stubs/ext/standard/socket_get_status.stuby���dy�J٤Fvendor/phpstan/php-8-stubs/stubs/ext/standard/array_intersect_key.stubP���dP��Ĥ6vendor/phpstan/php-8-stubs/stubs/ext/standard/pos.stubK���dK08ᯤ>vendor/phpstan/php-8-stubs/stubs/ext/standard/is_infinite.stub3���d3a���<vendor/phpstan/php-8-stubs/stubs/ext/standard/iptcparse.stubW���dW��U6�=vendor/phpstan/php-8-stubs/stubs/ext/standard/dns_get_mx.stub����d�nQ�֤Ivendor/phpstan/php-8-stubs/stubs/ext/standard/output_add_rewrite_var.stubO���dOLĈ�Fvendor/phpstan/php-8-stubs/stubs/ext/standard/socket_set_blocking.stub����d�"�}�Dvendor/phpstan/php-8-stubs/stubs/ext/standard/file_put_contents.stub����d��!P)�?vendor/phpstan/php-8-stubs/stubs/ext/standard/ob_get_level.stub)���d)��-�Avendor/phpstan/php-8-stubs/stubs/ext/standard/substr_compare.stub����d�l*�b�@vendor/phpstan/php-8-stubs/stubs/ext/standard/base64_decode.stubW���dW6�q�Hvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_get_transports.stubK���dKۍ1��>vendor/phpstan/php-8-stubs/stubs/ext/standard/is_iterable.stub5���d5�����:vendor/phpstan/php-8-stubs/stubs/ext/standard/is_link.stub5���d5��9�=vendor/phpstan/php-8-stubs/stubs/ext/standard/array_keys.stub����d��M��Bvendor/phpstan/php-8-stubs/stubs/ext/standard/set_file_buffer.stub����d�HY��:vendor/phpstan/php-8-stubs/stubs/ext/standard/lcfirst.stub5���d56��*�<vendor/phpstan/php-8-stubs/stubs/ext/standard/setcookie.stub����d�7V��7vendor/phpstan/php-8-stubs/stubs/ext/standard/chop.stubl���dlԉ���5vendor/phpstan/php-8-stubs/stubs/ext/standard/dl.stub:���d:��sؤ<vendor/phpstan/php-8-stubs/stubs/ext/standard/is_double.stubJ���dJO'�@vendor/phpstan/php-8-stubs/stubs/ext/standard/array_replace.stubP���dPh�*
�<vendor/phpstan/php-8-stubs/stubs/ext/standard/filectime.stub<���d<�`C&�Fvendor/phpstan/php-8-stubs/stubs/ext/standard/sapi_windows_cp_get.stubA���dA����<vendor/phpstan/php-8-stubs/stubs/ext/standard/fdatasync.stub^���d^��(X�:vendor/phpstan/php-8-stubs/stubs/ext/standard/vprintf.stubA���dA-�Q��>vendor/phpstan/php-8-stubs/stubs/ext/standard/str_shuffle.stub9���d9�O̠�Jvendor/phpstan/php-8-stubs/stubs/ext/standard/array_uintersect_uassoc.stubo���do�D�9�Dvendor/phpstan/php-8-stubs/stubs/ext/standard/array_udiff_assoc.stubi���di�]!'�<vendor/phpstan/php-8-stubs/stubs/ext/standard/array_pop.stub5���d5��:�Bvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_is_local.stubZ���dZ�Z���7vendor/phpstan/php-8-stubs/stubs/ext/standard/sqrt.stub-���d-[�2��Avendor/phpstan/php-8-stubs/stubs/ext/standard/array_diff_key.stubK���dK�?��Bvendor/phpstan/php-8-stubs/stubs/ext/standard/php_user_filter.stub����d�b�@k�:vendor/phpstan/php-8-stubs/stubs/ext/standard/str_pad.stub{���d{�R���9vendor/phpstan/php-8-stubs/stubs/ext/standard/unpack.stubq���dq|'B�Gvendor/phpstan/php-8-stubs/stubs/ext/standard/array_intersect_ukey.stubl���dl����:vendor/phpstan/php-8-stubs/stubs/ext/standard/current.stub9���d9fo�Ť9vendor/phpstan/php-8-stubs/stubs/ext/standard/dechex.stub.���d.D�8vendor/phpstan/php-8-stubs/stubs/ext/standard/asinh.stub.���d.B��Ivendor/phpstan/php-8-stubs/stubs/ext/standard/stream_socket_recvfrom.stub����d�	��A�:vendor/phpstan/php-8-stubs/stubs/ext/standard/bin2hex.stubD���dD}�Cv�7vendor/phpstan/php-8-stubs/stubs/ext/standard/join.stubg���dg��`ݤ;vendor/phpstan/php-8-stubs/stubs/ext/standard/linkinfo.stub7���d7Y&U��:vendor/phpstan/php-8-stubs/stubs/ext/standard/sprintf.stub_���d_�OY�Evendor/phpstan/php-8-stubs/stubs/ext/standard/connection_aborted.stub/���d/ə˼�8vendor/phpstan/php-8-stubs/stubs/ext/standard/fgetc.stubQ���dQ+�)Ȥ:vendor/phpstan/php-8-stubs/stubs/ext/standard/fprintf.stubl���dl���Bvendor/phpstan/php-8-stubs/stubs/ext/standard/array_multisort.stub����d�}�A7�=vendor/phpstan/php-8-stubs/stubs/ext/standard/getlastmod.stub-���d-p���:vendor/phpstan/php-8-stubs/stubs/ext/standard/tmpfile.stub<���d<�?��8vendor/phpstan/php-8-stubs/stubs/ext/standard/round.stube���deT�}�7vendor/phpstan/php-8-stubs/stubs/ext/standard/mail.stub����d�Сa9�;vendor/phpstan/php-8-stubs/stubs/ext/standard/ob_start.stub����d�n���9vendor/phpstan/php-8-stubs/stubs/ext/standard/hexdec.stub;���d;�Ê�<vendor/phpstan/php-8-stubs/stubs/ext/standard/array_map.stub[���d[��(��9vendor/phpstan/php-8-stubs/stubs/ext/standard/strval.stub2���d2h�L��7vendor/phpstan/php-8-stubs/stubs/ext/standard/atan.stub-���d-���V�Ivendor/phpstan/php-8-stubs/stubs/ext/standard/array_intersect_uassoc.stubn���dnM�9ä:vendor/phpstan/php-8-stubs/stubs/ext/standard/stripos.stub[���d[��a�=vendor/phpstan/php-8-stubs/stubs/ext/standard/array_push.stubT���dT+�(��<vendor/phpstan/php-8-stubs/stubs/ext/standard/fpassthru.stubL���dLG�K��9vendor/phpstan/php-8-stubs/stubs/ext/standard/substr.stubV���dV����9vendor/phpstan/php-8-stubs/stubs/ext/standard/is_int.stub0���d0q'b �@vendor/phpstan/php-8-stubs/stubs/ext/standard/getservbyname.stubh���dh��Y��<vendor/phpstan/php-8-stubs/stubs/ext/standard/filemtime.stub<���d<��C�=vendor/phpstan/php-8-stubs/stubs/ext/standard/key_exists.stubw���dwgo��8vendor/phpstan/php-8-stubs/stubs/ext/standard/mkdir.stub����d��H�W�9vendor/phpstan/php-8-stubs/stubs/ext/standard/syslog.stub����d�_��l�Fvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_get_wrappers.stubI���dIuT��8vendor/phpstan/php-8-stubs/stubs/ext/standard/fsync.stubZ���dZ�ٛ1�>vendor/phpstan/php-8-stubs/stubs/ext/standard/chunk_split.stubg���dg��ڢ�9vendor/phpstan/php-8-stubs/stubs/ext/standard/uasort.stub����d���E:�>vendor/phpstan/php-8-stubs/stubs/ext/standard/ini_restore.stub7���d7
'ɤ>vendor/phpstan/php-8-stubs/stubs/ext/standard/show_source.stubs���ds���ԤEvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_set_timeout.stub����d�	iX�:vendor/phpstan/php-8-stubs/stubs/ext/standard/implode.stubT���dTF2���=vendor/phpstan/php-8-stubs/stubs/ext/standard/is_numeric.stub4���d4j�m�:vendor/phpstan/php-8-stubs/stubs/ext/standard/mt_rand.stubJ���dJln�9vendor/phpstan/php-8-stubs/stubs/ext/standard/is_nan.stub.���d.��g�;vendor/phpstan/php-8-stubs/stubs/ext/standard/is_float.stub2���d2"Zec�Gvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_get_meta_data.stub]���d]���Mvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_context_get_default.stub_���d_�׬ؤ7vendor/phpstan/php-8-stubs/stubs/ext/standard/prev.stub7���d7S��:vendor/phpstan/php-8-stubs/stubs/ext/standard/openlog.stub����d������8vendor/phpstan/php-8-stubs/stubs/ext/standard/rmdir.stubj���dj���ͤHvendor/phpstan/php-8-stubs/stubs/ext/standard/array_change_key_case.stubX���dXQ|���Hvendor/phpstan/php-8-stubs/stubs/ext/standard/array_intersect_assoc.stubR���dR��&�Bvendor/phpstan/php-8-stubs/stubs/ext/standard/array_key_first.stubD���dDu���8vendor/phpstan/php-8-stubs/stubs/ext/standard/acosh.stub.���d.��7vendor/phpstan/php-8-stubs/stubs/ext/standard/sinh.stub-���d-���;�=vendor/phpstan/php-8-stubs/stubs/ext/standard/proc_close.stubO���dO�͏��Gvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_supports_lock.stubX���dX��0äNvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_resolve_include_path.stubQ���dQ�]rʤIvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_filter_register.stubV���dV�$�ؤ;vendor/phpstan/php-8-stubs/stubs/ext/standard/strptime.stub����d��A"�?vendor/phpstan/php-8-stubs/stubs/ext/standard/array_unique.stubQ���dQŨ�
�@vendor/phpstan/php-8-stubs/stubs/ext/standard/diskfreespace.stuba���daH��7vendor/phpstan/php-8-stubs/stubs/ext/standard/stat.stubP���dPA���Evendor/phpstan/php-8-stubs/stubs/ext/standard/realpath_cache_get.stubH���dH���<�Mvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_context_get_options.stuby���dy"�Q�@vendor/phpstan/php-8-stubs/stubs/ext/standard/array_product.stub<���d<��U|�Bvendor/phpstan/php-8-stubs/stubs/ext/standard/version_compare.stub����d��Qx�8vendor/phpstan/php-8-stubs/stubs/ext/standard/strtr.stub[���d[��ޏ�?vendor/phpstan/php-8-stubs/stubs/ext/standard/array_filter.stubb���db��D�Bvendor/phpstan/php-8-stubs/stubs/ext/standard/ob_get_contents.stub5���d5m���Fvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_set_blocking.stube���de�p��;vendor/phpstan/php-8-stubs/stubs/ext/standard/ob_clean.stub&���d&Eg���8vendor/phpstan/php-8-stubs/stubs/ext/standard/umask.stub3���d3_�֤Bvendor/phpstan/php-8-stubs/stubs/ext/standard/debug_zval_dump.stubK���dK����;vendor/phpstan/php-8-stubs/stubs/ext/standard/passthru.stub����d�{��y�Cvendor/phpstan/php-8-stubs/stubs/ext/standard/is_uploaded_file.stub>���d>���6vendor/phpstan/php-8-stubs/stubs/ext/standard/dir.stubt���dtc4�U�Avendor/phpstan/php-8-stubs/stubs/ext/standard/sys_getloadavg.stubh���dhq0��9vendor/phpstan/php-8-stubs/stubs/ext/standard/fscanf.stub����d��&�5�9vendor/phpstan/php-8-stubs/stubs/ext/standard/strstr.stubi���di(�>�Dvendor/phpstan/php-8-stubs/stubs/ext/standard/connection_status.stub.���d.����Bvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_get_line.stub}���d}�5��Dvendor/phpstan/php-8-stubs/stubs/ext/standard/ob_implicit_flush.stubB���dB��Rͤ9vendor/phpstan/php-8-stubs/stubs/ext/standard/usleep.stub5���d5���[�9vendor/phpstan/php-8-stubs/stubs/ext/standard/strchr.stub~���d~K�w3�<vendor/phpstan/php-8-stubs/stubs/ext/standard/getrusage.stubo���do�O���=vendor/phpstan/php-8-stubs/stubs/ext/standard/is_integer.stubI���dIEY���Bvendor/phpstan/php-8-stubs/stubs/ext/standard/array_fill_keys.stubG���dG!��8vendor/phpstan/php-8-stubs/stubs/ext/standard/chmod.stubL���dL.w��Jvendor/phpstan/php-8-stubs/stubs/ext/standard/sapi_windows_cp_is_utf8.stub5���d5����Bvendor/phpstan/php-8-stubs/stubs/ext/standard/array_diff_ukey.stubg���dg7)G<�Cvendor/phpstan/php-8-stubs/stubs/ext/standard/get_include_path.stub6���d6�9��Lvendor/phpstan/php-8-stubs/stubs/ext/standard/forward_static_call_array.stubW���dW��%F�?vendor/phpstan/php-8-stubs/stubs/ext/standard/rawurldecode.stub:���d:�8�o�<vendor/phpstan/php-8-stubs/stubs/ext/standard/ini_alter.stub����d�"eIʤ<vendor/phpstan/php-8-stubs/stubs/ext/standard/sha1_file.stubU���dU�n�Kvendor/phpstan/php-8-stubs/stubs/ext/standard/header_register_callback.stubZ���dZ�����Hvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_bucket_prepend.stubk���dk�M6�8vendor/phpstan/php-8-stubs/stubs/ext/standard/fseek.stubm���dmA-�;vendor/phpstan/php-8-stubs/stubs/ext/standard/strripos.stub\���d\��ܤBvendor/phpstan/php-8-stubs/stubs/ext/standard/config_get_hash.stubT���dT��oפ:vendor/phpstan/php-8-stubs/stubs/ext/standard/soundex.stubE���dE�\��Avendor/phpstan/php-8-stubs/stubs/ext/standard/str_word_count.stub����d�X�--�?vendor/phpstan/php-8-stubs/stubs/ext/standard/ob_end_flush.stub*���d*���^�Evendor/phpstan/php-8-stubs/stubs/ext/standard/http_response_code.stubJ���dJ*��ڤ9vendor/phpstan/php-8-stubs/stubs/ext/standard/strspn.stubk���dk���9vendor/phpstan/php-8-stubs/stubs/ext/standard/strtok.stubQ���dQz vW�:vendor/phpstan/php-8-stubs/stubs/ext/standard/opendir.stub����d��#`r�Jvendor/phpstan/php-8-stubs/stubs/ext/standard/quoted_printable_encode.stubE���dE�	���@vendor/phpstan/php-8-stubs/stubs/ext/standard/array_reverse.stubU���dU�U�&�7vendor/phpstan/php-8-stubs/stubs/ext/standard/exec.stub����d�"Օ�=vendor/phpstan/php-8-stubs/stubs/ext/standard/str_getcsv.stub����d�����Bvendor/phpstan/php-8-stubs/stubs/ext/standard/str_starts_with.stubM���dM<ɭɤ>vendor/phpstan/php-8-stubs/stubs/ext/standard/unserialize.stubK���dKu�;vendor/phpstan/php-8-stubs/stubs/ext/standard/mt_srand.stub����d�U�Q�9vendor/phpstan/php-8-stubs/stubs/ext/standard/system.stubp���dp�8>�:vendor/phpstan/php-8-stubs/stubs/ext/standard/symlink.stubA���dA�1$�8vendor/phpstan/php-8-stubs/stubs/ext/standard/chgrp.stubF���dF|+)�>vendor/phpstan/php-8-stubs/stubs/ext/standard/array_slice.stubu���du8ޤ<vendor/phpstan/php-8-stubs/stubs/ext/standard/proc_open.stub���d	��?vendor/phpstan/php-8-stubs/stubs/ext/standard/headers_list.stubB���dBܿ�C�<vendor/phpstan/php-8-stubs/stubs/ext/standard/fsockopen.stub����d�/�A�Evendor/phpstan/php-8-stubs/stubs/ext/standard/stream_socket_pair.stub����d��\�Q�>vendor/phpstan/php-8-stubs/stubs/ext/standard/is_writable.stub9���d9�2HݤCvendor/phpstan/php-8-stubs/stubs/ext/standard/sys_get_temp_dir.stub7���d78���7vendor/phpstan/php-8-stubs/stubs/ext/standard/fmod.stub;���d;�2��Avendor/phpstan/php-8-stubs/stubs/ext/standard/array_key_last.stubC���dC`h�@�:vendor/phpstan/php-8-stubs/stubs/ext/standard/gettype.stubG���dG��묤?vendor/phpstan/php-8-stubs/stubs/ext/standard/array_values.stubU���dU�(�:vendor/phpstan/php-8-stubs/stubs/ext/standard/rad2deg.stub0���d0��^�;vendor/phpstan/php-8-stubs/stubs/ext/standard/filesize.stub;���d;�f/Ӥ7vendor/phpstan/php-8-stubs/stubs/ext/standard/feof.stubH���dH3��Ť?vendor/phpstan/php-8-stubs/stubs/ext/standard/ob_end_clean.stub*���d*��H�@vendor/phpstan/php-8-stubs/stubs/ext/standard/ob_get_length.stub0���d0��JE�Jvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_register_wrapper.stub����d�@�d&�:vendor/phpstan/php-8-stubs/stubs/ext/standard/getmxrr.stub����d����5�9vendor/phpstan/php-8-stubs/stubs/ext/standard/putenv.stubI���dI\u�Fvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_get_contents.stub����d��$���:vendor/phpstan/php-8-stubs/stubs/ext/standard/stristr.stubj���dj� ]��9vendor/phpstan/php-8-stubs/stubs/ext/standard/uksort.stub����d���@vendor/phpstan/php-8-stubs/stubs/ext/standard/mt_getrandmax.stub*���d*f寉�8vendor/phpstan/php-8-stubs/stubs/ext/standard/lstat.stubQ���dQ���Ĥ9vendor/phpstan/php-8-stubs/stubs/ext/standard/hebrev.stubQ���dQ`�6�Gvendor/phpstan/php-8-stubs/stubs/ext/standard/php_strip_whitespace.stubD���dDD��@vendor/phpstan/php-8-stubs/stubs/ext/standard/str_ends_with.stubK���dK��b�Evendor/phpstan/php-8-stubs/stubs/ext/standard/html_entity_decode.stub ���d �6Tۤ8vendor/phpstan/php-8-stubs/stubs/ext/standard/usort.stub����d���~�8vendor/phpstan/php-8-stubs/stubs/ext/standard/expm1.stub.���d.p�=�Lvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_context_set_option.stub����d�eO-�Cvendor/phpstan/php-8-stubs/stubs/ext/standard/getprotobynumber.stubd���ddZd��Avendor/phpstan/php-8-stubs/stubs/ext/standard/error_get_last.stubE���dEp֝a�Hvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_filter_prepend.stub����d��)��<vendor/phpstan/php-8-stubs/stubs/ext/standard/proc_nice.stubE���dE�#^�@vendor/phpstan/php-8-stubs/stubs/ext/standard/gethostbyaddr.stubD���dDF�jФEvendor/phpstan/php-8-stubs/stubs/ext/standard/net_get_interfaces.stub����d��G�s�<vendor/phpstan/php-8-stubs/stubs/ext/standard/ftruncate.stubX���dX<�S��<vendor/phpstan/php-8-stubs/stubs/ext/standard/is_scalar.stub3���d3��U�:vendor/phpstan/php-8-stubs/stubs/ext/standard/print_r.stubN���dNn���7vendor/phpstan/php-8-stubs/stubs/ext/standard/cosh.stub-���d-&B~��?vendor/phpstan/php-8-stubs/stubs/ext/standard/str_ireplace.stub����d���n��Jvendor/phpstan/php-8-stubs/stubs/ext/standard/image_type_to_mime_type.stubT���dT�����8vendor/phpstan/php-8-stubs/stubs/ext/standard/fgets.stubf���df:�=vendor/phpstan/php-8-stubs/stubs/ext/standard/str_repeat.stubD���dDO�ܤ?vendor/phpstan/php-8-stubs/stubs/ext/standard/array_column.stubw���dwR�T$�Bvendor/phpstan/php-8-stubs/stubs/ext/standard/array_intersect.stubL���dL��~ǤJvendor/phpstan/php-8-stubs/stubs/ext/standard/quoted_printable_decode.stub_���d_,�v0�9vendor/phpstan/php-8-stubs/stubs/ext/standard/rewind.stubJ���dJPg��9vendor/phpstan/php-8-stubs/stubs/ext/standard/getopt.stub����d��pv٤;vendor/phpstan/php-8-stubs/stubs/ext/standard/closedir.stub`���d`	wk��6vendor/phpstan/php-8-stubs/stubs/ext/standard/chr.stub1���d1:��ȤCvendor/phpstan/php-8-stubs/stubs/ext/standard/http_build_query.stub����d�]�V�8vendor/phpstan/php-8-stubs/stubs/ext/standard/fstat.stubc���dc@��w�8vendor/phpstan/php-8-stubs/stubs/ext/standard/popen.stubW���dW�o�.�Cvendor/phpstan/php-8-stubs/stubs/ext/standard/set_include_path.stubJ���dJ�𘩤?vendor/phpstan/php-8-stubs/stubs/ext/standard/headers_sent.stub����d��Պ�=vendor/phpstan/php-8-stubs/stubs/ext/standard/addslashes.stub8���d8~��ˤ6vendor/phpstan/php-8-stubs/stubs/ext/standard/key.stub?���d?����=vendor/phpstan/php-8-stubs/stubs/ext/standard/array_rand.stubN���dN�̥��>vendor/phpstan/php-8-stubs/stubs/ext/standard/get_browser.stub����d�%�:�8vendor/phpstan/php-8-stubs/stubs/ext/standard/flock.stub����d��5vߤ>vendor/phpstan/php-8-stubs/stubs/ext/standard/utf8_decode.stub9���d9����:vendor/phpstan/php-8-stubs/stubs/ext/standard/deg2rad.stub0���d0s���Gvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_socket_client.stub1���d1�s�x�>vendor/phpstan/php-8-stubs/stubs/ext/standard/levenshtein.stub����d�"�n�;vendor/phpstan/php-8-stubs/stubs/ext/standard/readfile.stub����d�a|�Avendor/phpstan/php-8-stubs/stubs/ext/standard/dns_get_record.stub���d�D��?vendor/phpstan/php-8-stubs/stubs/ext/standard/base_convert.stubU���dU��C��@vendor/phpstan/php-8-stubs/stubs/ext/standard/stripcslashes.stub;���d;���<vendor/phpstan/php-8-stubs/stubs/ext/standard/setlocale.stub����d��I�4�@vendor/phpstan/php-8-stubs/stubs/ext/standard/is_executable.stub;���d;�[��Ivendor/phpstan/php-8-stubs/stubs/ext/standard/getimagesizefromstring.stub����d��J�Ф?vendor/phpstan/php-8-stubs/stubs/ext/standard/rawurlencode.stub:���d:�S�2�;vendor/phpstan/php-8-stubs/stubs/ext/standard/constant.stubK���dK8�;�Cvendor/phpstan/php-8-stubs/stubs/ext/standard/disk_total_space.stubF���dF����=vendor/phpstan/php-8-stubs/stubs/ext/standard/shell_exec.stubD���dD�ϴ�6vendor/phpstan/php-8-stubs/stubs/ext/standard/md5.stubS���dS�W��:vendor/phpstan/php-8-stubs/stubs/ext/standard/is_long.stubF���dF�Y7z�Avendor/phpstan/php-8-stubs/stubs/ext/standard/substr_replace.stub����d���/�Fvendor/phpstan/php-8-stubs/stubs/ext/standard/forward_static_call.stubT���dTl�ź�<vendor/phpstan/php-8-stubs/stubs/ext/standard/error_log.stub����d�]~ؤNvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_socket_enable_crypto.stub����d��I:vendor/phpstan/php-8-stubs/stubs/ext/standard/dirname.stubD���dD���9vendor/phpstan/php-8-stubs/stubs/ext/standard/getenv.stubw���dw�DN&�Cvendor/phpstan/php-8-stubs/stubs/ext/standard/dns_check_record.stub����d�~���Hvendor/phpstan/php-8-stubs/stubs/ext/standard/php_ini_scanned_files.stub;���d;@���8vendor/phpstan/php-8-stubs/stubs/ext/standard/ltrim.stubY���dY�T�5�Cvendor/phpstan/php-8-stubs/stubs/ext/standard/error_clear_last.stub.���d.pi4�>vendor/phpstan/php-8-stubs/stubs/ext/standard/is_resource.stub5���d5m�� �;vendor/phpstan/php-8-stubs/stubs/ext/standard/basename.stubI���dI�C��<vendor/phpstan/php-8-stubs/stubs/ext/standard/fileinode.stub<���d<8�+1�@vendor/phpstan/php-8-stubs/stubs/ext/standard/number_format.stub����d�`����<vendor/phpstan/php-8-stubs/stubs/ext/standard/serialize.stub5���d5s+��:vendor/phpstan/php-8-stubs/stubs/ext/standard/strrchr.stubM���dM;}�Q�7vendor/phpstan/php-8-stubs/stubs/ext/standard/copy.stubp���dp4
|�=vendor/phpstan/php-8-stubs/stubs/ext/standard/strip_tags.stub`���d`��Q�<vendor/phpstan/php-8-stubs/stubs/ext/standard/fileowner.stub<���d<����:vendor/phpstan/php-8-stubs/stubs/ext/standard/phpinfo.stub����d�Sl*�9vendor/phpstan/php-8-stubs/stubs/ext/standard/getcwd.stub3���d3p��7vendor/phpstan/php-8-stubs/stubs/ext/standard/sha1.stubU���dU��[b�:vendor/phpstan/php-8-stubs/stubs/ext/standard/tempnam.stubN���dNӐ֛�Hvendor/phpstan/php-8-stubs/stubs/ext/standard/memory_get_peak_usage.stubJ���dJ��XF�Hvendor/phpstan/php-8-stubs/stubs/ext/standard/password_needs_rehash.stubk���dk���%�>vendor/phpstan/php-8-stubs/stubs/ext/standard/array_chunk.stub`���d`�уؤCvendor/phpstan/php-8-stubs/stubs/ext/standard/parse_ini_string.stub����d�#��8vendor/phpstan/php-8-stubs/stubs/ext/standard/flush.stub#���d#�&�m�;vendor/phpstan/php-8-stubs/stubs/ext/standard/in_array.stubZ���dZ�\��Lvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_context_get_params.stubs���dsd	���8vendor/phpstan/php-8-stubs/stubs/ext/standard/srand.stub����d���z�@vendor/phpstan/php-8-stubs/stubs/ext/standard/ob_get_status.stub\���d\L�@vendor/phpstan/php-8-stubs/stubs/ext/standard/get_meta_tags.stuby���dy�G>�7vendor/phpstan/php-8-stubs/stubs/ext/standard/link.stub>���d>lK}�9vendor/phpstan/php-8-stubs/stubs/ext/standard/pclose.stubI���dI=\�9vendor/phpstan/php-8-stubs/stubs/ext/standard/strpos.stubZ���dZJ,U�6vendor/phpstan/php-8-stubs/stubs/ext/standard/exp.stub,���d,�.u��:vendor/phpstan/php-8-stubs/stubs/ext/standard/ip2long.stub4���d4���դIvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_socket_get_name.stubp���dp���*�Bvendor/phpstan/php-8-stubs/stubs/ext/standard/proc_get_status.stubi���diUWz>�Fvendor/phpstan/php-8-stubs/stubs/ext/standard/sapi_windows_cp_set.stubf���df?f�9vendor/phpstan/php-8-stubs/stubs/ext/standard/lchgrp.stubG���dG+0~��Gvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_filter_append.stub����d��;���Avendor/phpstan/php-8-stubs/stubs/ext/standard/AssertionError.stub@���d@�6�¤=vendor/phpstan/php-8-stubs/stubs/ext/standard/array_diff.stubG���dGf��k�=vendor/phpstan/php-8-stubs/stubs/ext/standard/strtoupper.stub8���d8�����6vendor/phpstan/php-8-stubs/stubs/ext/standard/ord.stub1���d1�8̤Avendor/phpstan/php-8-stubs/stubs/ext/standard/time_nanosleep.stubz���dz�8��8vendor/phpstan/php-8-stubs/stubs/ext/standard/ftell.stubN���dNTa��Ovendor/phpstan/php-8-stubs/stubs/ext/standard/stream_bucket_make_writeable.stubz���dz�^�<vendor/phpstan/php-8-stubs/stubs/ext/standard/lcg_value.stub4���d4#��ä@vendor/phpstan/php-8-stubs/stubs/ext/standard/stream_isatty.stubQ���dQ��W �8vendor/phpstan/php-8-stubs/stubs/ext/standard/fputs.stub����d��xФ?vendor/phpstan/php-8-stubs/stubs/ext/standard/array_search.stubj���dj�&�9vendor/phpstan/php-8-stubs/stubs/ext/standard/decbin.stub.���d.���6vendor/phpstan/php-8-stubs/stubs/ext/standard/sin.stub,���d,��!�7vendor/phpstan/php-8-stubs/stubs/ext/standard/pack.stubX���dXB�M�Jvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_set_write_buffer.stube���de+�(s�6vendor/phpstan/php-8-stubs/stubs/ext/standard/tan.stub,���d,ؖ,��>vendor/phpstan/php-8-stubs/stubs/ext/standard/natcasesort.stub6���d62���6vendor/phpstan/php-8-stubs/stubs/ext/standard/log.stub?���d?��33�>vendor/phpstan/php-8-stubs/stubs/ext/standard/is_callable.stub����d�p���Svendor/phpstan/php-8-stubs/stubs/ext/standard/sapi_windows_generate_ctrl_event.stubV���dV1���8vendor/phpstan/php-8-stubs/stubs/ext/standard/asort.stub����d�<ݫI�=vendor/phpstan/php-8-stubs/stubs/ext/standard/phpversion.stubI���dI�q�Ȥ:vendor/phpstan/php-8-stubs/stubs/ext/standard/fnmatch.stubj���dj`c�X�9vendor/phpstan/php-8-stubs/stubs/ext/standard/printf.stubC���dC'4���?vendor/phpstan/php-8-stubs/stubs/ext/standard/stripslashes.stub:���d:��#�8vendor/phpstan/php-8-stubs/stubs/ext/standard/chown.stubE���dE�_.T�9vendor/phpstan/php-8-stubs/stubs/ext/standard/hrtime.stubb���dby�`�:vendor/phpstan/php-8-stubs/stubs/ext/standard/strpbrk.stubO���dO����;vendor/phpstan/php-8-stubs/stubs/ext/standard/vsprintf.stubE���dE���Cvendor/phpstan/php-8-stubs/stubs/ext/standard/array_uintersect.stubh���dhi[�פ>vendor/phpstan/php-8-stubs/stubs/ext/standard/count_chars.stube���de�UW�:vendor/phpstan/php-8-stubs/stubs/ext/standard/explode.stub����d�����5vendor/phpstan/php-8-stubs/stubs/ext/standard/pi.stub!���d!9>Ԇ�Evendor/phpstan/php-8-stubs/stubs/ext/standard/array_udiff_uassoc.stubj���dje�ˤ@vendor/phpstan/php-8-stubs/stubs/ext/standard/stream_select.stubQ���dQM��t�7vendor/phpstan/php-8-stubs/stubs/ext/standard/file.stub����d��S�$�?vendor/phpstan/php-8-stubs/stubs/ext/standard/substr_count.stubo���do�}Tx�Cvendor/phpstan/php-8-stubs/stubs/ext/standard/htmlspecialchars.stub����d����l�?vendor/phpstan/php-8-stubs/stubs/ext/standard/getimagesize.stub����d��a֤>vendor/phpstan/php-8-stubs/stubs/ext/standard/array_udiff.stubc���dc�]l4�>vendor/phpstan/php-8-stubs/stubs/ext/standard/get_headers.stub����d��V�Ԥ9vendor/phpstan/php-8-stubs/stubs/ext/standard/lchown.stubV���dVj-U_�@vendor/phpstan/php-8-stubs/stubs/ext/standard/base64_encode.stubJ���dJ$�&�9vendor/phpstan/php-8-stubs/stubs/ext/standard/header.stubq���dq�� E�>vendor/phpstan/php-8-stubs/stubs/ext/standard/gethostname.stub\���d\���8vendor/phpstan/php-8-stubs/stubs/ext/standard/fread.stub^���d^jRo�Ivendor/phpstan/php-8-stubs/stubs/ext/standard/stream_wrapper_restore.stubD���dDv0��:vendor/phpstan/php-8-stubs/stubs/ext/standard/shuffle.stub���dsS���6vendor/phpstan/php-8-stubs/stubs/ext/standard/abs.stubA���dA(�x��9vendor/phpstan/php-8-stubs/stubs/ext/standard/fflush.stubJ���dJ�q�פKvendor/phpstan/php-8-stubs/stubs/ext/standard/unregister_tick_function.stubH���dHZ]o��?vendor/phpstan/php-8-stubs/stubs/ext/standard/htmlentities.stub_���d_LE��<vendor/phpstan/php-8-stubs/stubs/ext/standard/fileperms.stub<���d<-���9vendor/phpstan/php-8-stubs/stubs/ext/standard/rename.stubr���dr2�<�7vendor/phpstan/php-8-stubs/stubs/ext/standard/asin.stub-���d-��HѤHvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_set_chunk_size.stubj���dj���	�Lvendor/phpstan/php-8-stubs/stubs/ext/standard/output_reset_rewrite_vars.stub7���d7�ܷ�@vendor/phpstan/php-8-stubs/stubs/ext/standard/password_hash.stubi���di��Ϙ�Evendor/phpstan/php-8-stubs/stubs/ext/standard/stream_get_filters.stubH���dHx'.r�8vendor/phpstan/php-8-stubs/stubs/ext/standard/reset.stub8���d8X��@vendor/phpstan/php-8-stubs/stubs/ext/standard/array_is_list.stubH���dH�|���<vendor/phpstan/php-8-stubs/stubs/ext/standard/php_uname.stub;���d;�+v�Avendor/phpstan/php-8-stubs/stubs/ext/standard/get_debug_type.stub:���d:D����<vendor/phpstan/php-8-stubs/stubs/ext/standard/Directory.stub����d�t�w]�9vendor/phpstan/php-8-stubs/stubs/ext/standard/intval.stub?���d?{�pJ�@vendor/phpstan/php-8-stubs/stubs/ext/standard/php_sapi_name.stub3���d3�ʩ��Evendor/phpstan/php-8-stubs/stubs/ext/standard/array_count_values.stubT���dT�4}��8vendor/phpstan/php-8-stubs/stubs/ext/standard/log10.stub.���d.��פ:vendor/phpstan/php-8-stubs/stubs/ext/standard/extract.stub}���d}�	��<vendor/phpstan/php-8-stubs/stubs/ext/standard/metaphone.stubg���dgu�Gvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_bucket_append.stubj���djHV��<vendor/phpstan/php-8-stubs/stubs/ext/standard/array_pad.stubO���dO��!�Gvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_filter_remove.stubf���df-ܵ�=vendor/phpstan/php-8-stubs/stubs/ext/standard/strtolower.stub8���d8�#���;vendor/phpstan/php-8-stubs/stubs/ext/standard/getmyuid.stub<���d<
f��Ivendor/phpstan/php-8-stubs/stubs/ext/standard/__PHP_Incomplete_Class.stub^���d^LG8H�Lvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_wrapper_unregister.stubG���dG�h��;vendor/phpstan/php-8-stubs/stubs/ext/standard/filetype.stub>���d>�
`ʤ<vendor/phpstan/php-8-stubs/stubs/ext/standard/fileatime.stubM���dM�M��8vendor/phpstan/php-8-stubs/stubs/ext/standard/chdir.stub4���d4hq�Z�Hvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_context_create.stubq���dqR�5R�?vendor/phpstan/php-8-stubs/stubs/ext/standard/array_reduce.stubb���db���;vendor/phpstan/php-8-stubs/stubs/ext/standard/var_dump.stubP���dPX|o$�Ivendor/phpstan/php-8-stubs/stubs/ext/standard/stream_socket_shutdown.stubz���dz/�L��<vendor/phpstan/php-8-stubs/stubs/ext/standard/quotemeta.stub7���d7��Dݤ<vendor/phpstan/php-8-stubs/stubs/ext/standard/is_string.stub3���d3؁pä9vendor/phpstan/php-8-stubs/stubs/ext/standard/uniqid.stub}���d}�s���Avendor/phpstan/php-8-stubs/stubs/ext/standard/set_time_limit.stubl���dlNJ���?vendor/phpstan/php-8-stubs/stubs/ext/standard/array_splice.stubs���dsv��Q�;vendor/phpstan/php-8-stubs/stubs/ext/standard/getmypid.stub+���d+D�S �<vendor/phpstan/php-8-stubs/stubs/ext/standard/parse_str.stub[���d[���h�Jvendor/phpstan/php-8-stubs/stubs/ext/standard/image_type_to_extension.stubf���df���Avendor/phpstan/php-8-stubs/stubs/ext/standard/highlight_file.stubY���dYuNo�:vendor/phpstan/php-8-stubs/stubs/ext/standard/strrpos.stub[���d[���;vendor/phpstan/php-8-stubs/stubs/ext/standard/ob_flush.stub&���d&T]n��=vendor/phpstan/php-8-stubs/stubs/ext/standard/getmyinode.stub-���d-��Ǥ6vendor/phpstan/php-8-stubs/stubs/ext/standard/cos.stub,���d,*�Pj�=vendor/phpstan/php-8-stubs/stubs/ext/standard/array_flip.stubb���dbi�ﲤ<vendor/phpstan/php-8-stubs/stubs/ext/standard/str_split.stube���de�>Ϥ8vendor/phpstan/php-8-stubs/stubs/ext/standard/count.stubS���dS��e�?vendor/phpstan/php-8-stubs/stubs/ext/standard/ob_get_clean.stub2���d2��A(�=vendor/phpstan/php-8-stubs/stubs/ext/standard/checkdnsrr.stubl���dl]�!=�8vendor/phpstan/php-8-stubs/stubs/ext/standard/fopen.stub����d����:vendor/phpstan/php-8-stubs/stubs/ext/standard/readdir.stubg���dg�:�<vendor/phpstan/php-8-stubs/stubs/ext/standard/iptcembed.stubn���dn��㮤Hvendor/phpstan/php-8-stubs/stubs/ext/standard/array_merge_recursive.stubD���dDZRȽ�8vendor/phpstan/php-8-stubs/stubs/ext/standard/atanh.stub.���d.��ɤEvendor/phpstan/php-8-stubs/stubs/ext/standard/socket_set_timeout.stub����d�_|̆�=vendor/phpstan/php-8-stubs/stubs/ext/standard/random_int.stub9���d9��
�>vendor/phpstan/php-8-stubs/stubs/ext/standard/array_shift.stub7���d7�|��:vendor/phpstan/php-8-stubs/stubs/ext/standard/strcoll.stubK���dK��_�Dvendor/phpstan/php-8-stubs/stubs/ext/standard/password_get_info.stubd���dd=[Z�=vendor/phpstan/php-8-stubs/stubs/ext/standard/pfsockopen.stub����d�{[�h�=vendor/phpstan/php-8-stubs/stubs/ext/standard/phpcredits.stub����d�i2���Avendor/phpstan/php-8-stubs/stubs/ext/standard/escapeshellarg.stub9���d9���:vendor/phpstan/php-8-stubs/stubs/ext/standard/strcspn.stubl���dl؝
��Cvendor/phpstan/php-8-stubs/stubs/ext/standard/get_current_user.stub7���d7n[���Cvendor/phpstan/php-8-stubs/stubs/ext/standard/convert_uudecode.stubD���dDY񨕤<vendor/phpstan/php-8-stubs/stubs/ext/standard/doubleval.stubK���dKj����;vendor/phpstan/php-8-stubs/stubs/ext/standard/closelog.stubg���dg��1��Evendor/phpstan/php-8-stubs/stubs/ext/standard/move_uploaded_file.stubH���dH����8vendor/phpstan/php-8-stubs/stubs/ext/standard/nl2br.stubK���dK���<vendor/phpstan/php-8-stubs/stubs/ext/standard/is_object.stub3���d3�&.�:vendor/phpstan/php-8-stubs/stubs/ext/standard/hex2bin.stub;���d;�~,�Gvendor/phpstan/php-8-stubs/stubs/ext/standard/sapi_windows_cp_conv.stubw���dw�����:vendor/phpstan/php-8-stubs/stubs/ext/standard/scandir.stub����d���
`�9vendor/phpstan/php-8-stubs/stubs/ext/standard/krsort.stub����d�!��8vendor/phpstan/php-8-stubs/stubs/ext/standard/floor.stub2���d2�����Cvendor/phpstan/php-8-stubs/stubs/ext/standard/ob_list_handlers.stubF���dF<V."�;vendor/phpstan/php-8-stubs/stubs/ext/standard/floatval.stub3���d3XXC�7vendor/phpstan/php-8-stubs/stubs/ext/standard/ceil.stub1���d1�͖��8vendor/phpstan/php-8-stubs/stubs/ext/standard/atan2.stub6���d6S5ͤ=vendor/phpstan/php-8-stubs/stubs/ext/standard/array_walk.stub����d�|L�&�=vendor/phpstan/php-8-stubs/stubs/ext/standard/array_fill.stubS���dS�'��7vendor/phpstan/php-8-stubs/stubs/ext/standard/glob.stubp���dpT�
�Cvendor/phpstan/php-8-stubs/stubs/ext/standard/convert_uuencode.stubO���dOm�M�;vendor/phpstan/php-8-stubs/stubs/ext/standard/realpath.stub:���d:}8<�7vendor/phpstan/php-8-stubs/stubs/ext/standard/trim.stubX���dX�	��7vendor/phpstan/php-8-stubs/stubs/ext/standard/tanh.stub-���d-e���:vendor/phpstan/php-8-stubs/stubs/ext/standard/compact.stub����d�y���?vendor/phpstan/php-8-stubs/stubs/ext/standard/str_contains.stubJ���dJa���8vendor/phpstan/php-8-stubs/stubs/ext/standard/ksort.stub����d�#�Gvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_socket_sendto.stub����d� Г��:vendor/phpstan/php-8-stubs/stubs/ext/standard/is_bool.stub1���d1�p�Avendor/phpstan/php-8-stubs/stubs/ext/standard/call_user_func.stubO���dOs�9vendor/phpstan/php-8-stubs/stubs/ext/standard/sizeof.stubh���dhF�eu�Ivendor/phpstan/php-8-stubs/stubs/ext/standard/array_uintersect_assoc.stubn���dn�[�9vendor/phpstan/php-8-stubs/stubs/ext/standard/fclose.stubJ���dJ�3/ͤAvendor/phpstan/php-8-stubs/stubs/ext/standard/gethostbynamel.stubZ���dZN�Gvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_socket_accept.stub����d��(�_�>vendor/phpstan/php-8-stubs/stubs/ext/standard/is_readable.stub9���d9��a�Jvendor/phpstan/php-8-stubs/stubs/ext/standard/stream_wrapper_register.stub����d��,|�9vendor/phpstan/php-8-stubs/stubs/ext/standard/is_dir.stub4���d4��eW�Ivendor/phpstan/php-8-stubs/stubs/ext/standard/stream_set_read_buffer.stubd���ddW�Ƥ7vendor/phpstan/php-8-stubs/stubs/ext/standard/fdiv.stub;���d;C�ZΤJvendor/phpstan/php-8-stubs/stubs/ext/standard/array_replace_recursive.stubZ���dZݝ`�Avendor/phpstan/php-8-stubs/stubs/ext/standard/parse_ini_file.stub����d��n>'�7vendor/phpstan/php-8-stubs/stubs/ext/standard/rand.stubG���dG���d�?vendor/phpstan/php-8-stubs/stubs/ext/standard/is_writeable.stubT���dTXҤ8vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_close.stubV���dV�3�K�Cvendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_set_call_timeout.stubn���dnaU�n�@vendor/phpstan/php-8-stubs/stubs/ext/oci8/ociwritelobtofile.stub����d�~A��?vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_set_prefetch.stube���de�x��?vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocifreestatement.stub����d��M��Dvendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_collection_append.stub\���d\!��ۤ9vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocicollmax.stub{���d{yfMC�=vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_set_action.stubj���dj��M�Avendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_field_type_raw.stubu���du���٤;vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_lob_size.stub;���d;0�19�Hvendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_set_client_identifier.stubx���dx>nP�Cvendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_set_db_operation.stubp���dp@␯�=vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_lob_append.stubF���dF^&�Bvendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_collection_trim.stubU���dU���1�Avendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_free_statement.stub\���d\D�1�8vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocinlogon.stub����d�d\�Avendor/phpstan/php-8-stubs/stubs/ext/oci8/ocicolumnprecision.stub����d���Avendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_define_by_name.stub����d��.U�?vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocinewdescriptor.stub����d�E���=vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocicolumnscale.stub����d��3#s�?vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_bind_by_name.stub����d�3��<vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocifreecursor.stub����d��!�Ф:vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_execute.stubx���dxU�B�=vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_field_type.stubx���dxߏDg�<vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_lob_erase.stubf���dfYG�Avendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_new_descriptor.stub}���d}�G�;vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_pconnect.stub����d���+v�9vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_commit.stubV���dV�o"��=vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_new_cursor.stubq���dq�
�ʤ;vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_lob_copy.stubY���dYQ���8vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_error.stub����d���>vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_free_cursor.stubz���dz�@wT�<vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocicolumnname.stub����d��­�7vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocierror.stub����d��A�7�?vendor/phpstan/php-8-stubs/stubs/ext/oci8/ociserverversion.stub����d���F�;vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_lob_seek.stub_���d_�!D�?vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_lob_truncate.stubK���dK�Ҁk�;vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_num_rows.stub[���d[#�=�Bvendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_free_descriptor.stub=���d=���?�:vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_lob_eof.stub5���d5{���>vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_fetch_array.stub����d�r��9�Bvendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_password_change.stub����d��PLvendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_collection_element_assign.stubp���dpg�w��=vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocicollgetelem.stub����d���'�Cvendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_set_prefetch_lob.stub����d�"`���:vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocicolltrim.stub����d�?��j�9vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_cancel.stubT���dT��m�?vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocinewcollection.stub����d�&��:vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocirowcount.stub����d�eJ�7vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocilogon.stub����d�{�c2�8vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocilogoff.stub}���d}��%r�Dvendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_collection_assign.stub[���d[�~�B�<vendor/phpstan/php-8-stubs/stubs/ext/oci8/OCICollection.stub���d�qX]�@vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocicollassignelem.stub����d��4�}�Avendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_collection_max.stubO���dO�Y%�>vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_field_scale.stubr���dr,u"��>vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocicolumnisnull.stub����d�~w�9vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocinumcols.stub���d�F��>vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_fetch_assoc.stub`���d`8��8vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocicommit.stub}���d}���<vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_lob_flush.stubF���dF"�X<�Hvendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_register_taf_callback.stubz���dzp�\�:vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocicollsize.stub}���d}
���=vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_lob_rewind.stub8���d8L��8vendor/phpstan/php-8-stubs/stubs/ext/oci8/ociresult.stub����d�k<���@vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocifreecollection.stub~���d~/�!�@vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_field_is_null.stubo���do �Ǥ;vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_lob_load.stub>���d>X�U�5vendor/phpstan/php-8-stubs/stubs/ext/oci8/OCILob.stub=
���d=
���:vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_connect.stub����d�b]m�<vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocicolumnsize.stub����d��S�Avendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_statement_type.stubd���ddy��n�;vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocinewcursor.stub����d�t�գ�Jvendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_unregister_taf_callback.stubg���dg��`�<vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocicolumntype.stub����d��̤<vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_fetch_all.stub����d�D1�@vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocipasswordchange.stub����d����Avendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_server_version.stubf���df��\��?vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_fetch_object.stub����d��Z��<vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_fetch_row.stub^���d^_�4\�=vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_num_fields.stubW���dWB�<E�8vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_parse.stuby���dy���ä7vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocifetch.stuby���dy���:vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocifreedesc.stubj���dj�0jʤ9vendor/phpstan/php-8-stubs/stubs/ext/oci8/ociexecute.stub����d��f���@vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocifetchstatement.stub���d;5j��9vendor/phpstan/php-8-stubs/stubs/ext/oci8/ociloadlob.stubj���dj���<vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocibindbyname.stub����d�{�7ۤ<vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_lob_write.stub_���d_K��8vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocicancel.stub{���d{@п�Bvendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_field_precision.stubv���dvi���=vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_lob_import.stubJ���dJ��¤>vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocidefinebyname.stub����d��
�=vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocisavelobfile.stubz���dzc18o�=vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_field_size.stubq���dq��
�Avendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_new_collection.stub����d�&�ߑ�Avendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_client_version.stub2���d24�ʤBvendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_collection_size.stubP���dP�B�Bvendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_set_client_info.stubx���dx��W�;vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_rollback.stubX���dX��v��Avendor/phpstan/php-8-stubs/stubs/ext/oci8/ocisetbufferinglob.stubH���dHn��;vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_lob_tell.stub;���d;(B_\�Bvendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_set_module_name.stubm���dmL�/j�>vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_set_edition.stub<���d<�
�+�=vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_lob_export.stubt���dt��3��;vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocifetchinto.stub����d���u>�<vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocicollappend.stub����d��wṲ8vendor/phpstan/php-8-stubs/stubs/ext/oci8/ociplogon.stub����d����<�Bvendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_free_collection.stubK���dKi���>vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_new_connect.stub����d��qH��8vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_fetch.stubS���dSkz(P�Avendor/phpstan/php-8-stubs/stubs/ext/oci8/ocigetbufferinglob.stub<���d<��^�?vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocistatementtype.stub����d�s��`�;vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_lob_save.stubU���dU��ȤEvendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_bind_array_by_name.stub����d���"b�Ivendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_collection_element_get.stubq���dq�ޗ�=vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_field_name.stubt���dt�8P��9vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocisavelob.stub����d��c�֤=vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocisetprefetch.stub����d����(�:vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocirollback.stub����d���MҤ9vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_result.stubi���di���5�;vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_lob_read.stubK���dK:�Ԥ?vendor/phpstan/php-8-stubs/stubs/ext/oci8/ocicolumntyperaw.stub����d�`j�ݤIvendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_get_implicit_resultset.stub{���d{���?vendor/phpstan/php-8-stubs/stubs/ext/oci8/oci_lob_is_equal.stubJ���dJVҨo�7vendor/phpstan/php-8-stubs/stubs/ext/oci8/ociparse.stub����d���W[�:vendor/phpstan/php-8-stubs/stubs/ext/gd/imagesetstyle.stubH���dH=>kX�=vendor/phpstan/php-8-stubs/stubs/ext/gd/imageopenpolygon.stubz���dz�8�Dvendor/phpstan/php-8-stubs/stubs/ext/gd/imagetruecolortopalette.stubc���dc��Ȥ6vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecopy.stub����d�d�#!�:vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecropauto.stub����d�,Eo��:vendor/phpstan/php-8-stubs/stubs/ext/gd/imageloadfont.stub����d�9|��@vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecreatefromavif.stub����d�{H�=vendor/phpstan/php-8-stubs/stubs/ext/gd/imageconvolution.stubk���dk���8vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecreate.stubJ���dJ�
���Cvendor/phpstan/php-8-stubs/stubs/ext/gd/imagecolorresolvealpha.stubo���do��HU�<vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecolormatch.stubO���dO�i�e�Avendor/phpstan/php-8-stubs/stubs/ext/gd/imagecolorexactalpha.stubm���dm�^�X�;vendor/phpstan/php-8-stubs/stubs/ext/gd/imagefilledarc.stub����d�N���:vendor/phpstan/php-8-stubs/stubs/ext/gd/imagesetpixel.stubV���dV���?vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecopymergegray.stub����d���;vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecopymerge.stub����d����U�<vendor/phpstan/php-8-stubs/stubs/ext/gd/imagedashedline.stubl���dl�@��Dvendor/phpstan/php-8-stubs/stubs/ext/gd/imagecolorallocatealpha.stubv���dv�X�?vendor/phpstan/php-8-stubs/stubs/ext/gd/imagefilledpolygon.stub|���d|,��ߤ:vendor/phpstan/php-8-stubs/stubs/ext/gd/imagesetbrush.stubK���dKY��T�9vendor/phpstan/php-8-stubs/stubs/ext/gd/imagettfbbox.stub����d�80
P�?vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecopyresampled.stub����d�U����Bvendor/phpstan/php-8-stubs/stubs/ext/gd/imagesetinterpolation.stubd���ddb����<vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecolorexact.stub\���d\ߐǶ�9vendor/phpstan/php-8-stubs/stubs/ext/gd/imagedestroy.stub@���d@��Y�6vendor/phpstan/php-8-stubs/stubs/ext/gd/imagewebp.stub����d�=Q֤4vendor/phpstan/php-8-stubs/stubs/ext/gd/imagesy.stub3���d3��0�9vendor/phpstan/php-8-stubs/stubs/ext/gd/imagegetclip.stubQ���dQ�$�>vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecreatefromgd.stubI���dIVT1�?vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecreatefrompng.stubd���dd"��h�5vendor/phpstan/php-8-stubs/stubs/ext/gd/imagegd2.stub{���d{b�0��6vendor/phpstan/php-8-stubs/stubs/ext/gd/imagefill.stubR���dRq�פ?vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecreatefromxpm.stub]���d]w|�R�:vendor/phpstan/php-8-stubs/stubs/ext/gd/imagestringup.stub���dv�)٤6vendor/phpstan/php-8-stubs/stubs/ext/gd/imageflip.stubA���dA#iFG�?vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecreatefromxbm.stubQ���dQ{���?vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecreatefrombmp.stub]���d]��o�;vendor/phpstan/php-8-stubs/stubs/ext/gd/imageinterlace.stubQ���dQ���,�;vendor/phpstan/php-8-stubs/stubs/ext/gd/imagefontwidth.stub����d�'�s��8vendor/phpstan/php-8-stubs/stubs/ext/gd/imagerotate.stub����d�s���?vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecolorallocate.stube���de+l�3vendor/phpstan/php-8-stubs/stubs/ext/gd/GdFont.stubb���db��+<�8vendor/phpstan/php-8-stubs/stubs/ext/gd/imagestring.stub���dP��;vendor/phpstan/php-8-stubs/stubs/ext/gd/imagesavealpha.stubI���dI�4T�8vendor/phpstan/php-8-stubs/stubs/ext/gd/imageaffine.stubf���df�.���Avendor/phpstan/php-8-stubs/stubs/ext/gd/imagecreatetruecolor.stubS���dS����<vendor/phpstan/php-8-stubs/stubs/ext/gd/imagegrabwindow.stubn���dnG9~�Bvendor/phpstan/php-8-stubs/stubs/ext/gd/imagecreatefromstring.stubI���dI�n?�8vendor/phpstan/php-8-stubs/stubs/ext/gd/imagefttext.stub����d��驤<vendor/phpstan/php-8-stubs/stubs/ext/gd/imagefontheight.stub����d�-���>vendor/phpstan/php-8-stubs/stubs/ext/gd/imagegammacorrect.stubg���dg�za�8vendor/phpstan/php-8-stubs/stubs/ext/gd/imagefilter.stub���dJoq�5vendor/phpstan/php-8-stubs/stubs/ext/gd/imagexbm.stubn���dn
c�4vendor/phpstan/php-8-stubs/stubs/ext/gd/gd_info.stub=���d=#�٥�=vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecopyresized.stub����d���2�Avendor/phpstan/php-8-stubs/stubs/ext/gd/imagecolordeallocate.stubM���dM;�@�=vendor/phpstan/php-8-stubs/stubs/ext/gd/imageistruecolor.stub=���d=��9vendor/phpstan/php-8-stubs/stubs/ext/gd/imagesettile.stubI���dI���4vendor/phpstan/php-8-stubs/stubs/ext/gd/GdImage.stubA���dA_n	¤4vendor/phpstan/php-8-stubs/stubs/ext/gd/imagegd.stubJ���dJ��ݤ7vendor/phpstan/php-8-stubs/stubs/ext/gd/imagescale.stub���dmz}��@vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecreatefromwbmp.stubR���dR3;54�9vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecolorat.stubN���dN��V�<vendor/phpstan/php-8-stubs/stubs/ext/gd/imageresolution.stub����d�@���5vendor/phpstan/php-8-stubs/stubs/ext/gd/imagegif.stubl���dl'����Avendor/phpstan/php-8-stubs/stubs/ext/gd/imagecolorclosesthwb.stuba���da�
�A�Dvendor/phpstan/php-8-stubs/stubs/ext/gd/imagepalettetotruecolor.stubD���dD ��ԤBvendor/phpstan/php-8-stubs/stubs/ext/gd/imagegetinterpolation.stubA���dA�yf��@vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecreatefromjpeg.stub^���d^&�ܯ�;vendor/phpstan/php-8-stubs/stubs/ext/gd/imagerectangle.stubk���dk��p*�<vendor/phpstan/php-8-stubs/stubs/ext/gd/imagegrabscreen.stub7���d7�%��8vendor/phpstan/php-8-stubs/stubs/ext/gd/imageftbbox.stub����d��qp��6vendor/phpstan/php-8-stubs/stubs/ext/gd/imagejpeg.stub����d��M�?vendor/phpstan/php-8-stubs/stubs/ext/gd/imagefilledellipse.stub����d�W�LX�9vendor/phpstan/php-8-stubs/stubs/ext/gd/imagettftext.stub����d�(Ѐ�>vendor/phpstan/php-8-stubs/stubs/ext/gd/imagesetthickness.stubN���dN"�閤@vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecreatefromwebp.stubf���df���<�>vendor/phpstan/php-8-stubs/stubs/ext/gd/imagefilltoborder.stubm���dm���;vendor/phpstan/php-8-stubs/stubs/ext/gd/imageantialias.stubI���dI�t��Avendor/phpstan/php-8-stubs/stubs/ext/gd/imagefilledrectangle.stubq���dq{��5vendor/phpstan/php-8-stubs/stubs/ext/gd/imagepng.stub����d�_���6vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecrop.stubR���dR�$���6vendor/phpstan/php-8-stubs/stubs/ext/gd/imageline.stubf���dfZ1���>vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecolorresolve.stub^���d^h�Τ6vendor/phpstan/php-8-stubs/stubs/ext/gd/imagechar.stub����d�xr씤?vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecreatefromgd2.stubJ���dJiQn��9vendor/phpstan/php-8-stubs/stubs/ext/gd/imagepolygon.stubv���dv�N�?vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecreatefromtga.stubd���dd]�`�5vendor/phpstan/php-8-stubs/stubs/ext/gd/imagebmp.stub����d�P��ä=vendor/phpstan/php-8-stubs/stubs/ext/gd/imagepalettecopy.stubJ���dJc����Bvendor/phpstan/php-8-stubs/stubs/ext/gd/imagecolortransparent.stubU���dU�h��=vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecolorstotal.stub<���d<���Y�Cvendor/phpstan/php-8-stubs/stubs/ext/gd/imagecreatefromgd2part.stubw���dw�2AV�:vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecolorset.stub���dVXt�9vendor/phpstan/php-8-stubs/stubs/ext/gd/imagesetclip.stub]���d]Gs�`�5vendor/phpstan/php-8-stubs/stubs/ext/gd/imagearc.stub����d��6���Dvendor/phpstan/php-8-stubs/stubs/ext/gd/imageaffinematrixconcat.stubq���dqѵF�@vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecolorsforindex.stubd���dd�B�v�?vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecreatefromgif.stubJ���dJ�P��=vendor/phpstan/php-8-stubs/stubs/ext/gd/imagelayereffect.stubJ���dJ��9�Cvendor/phpstan/php-8-stubs/stubs/ext/gd/imagecolorclosestalpha.stubo���do:So�6vendor/phpstan/php-8-stubs/stubs/ext/gd/imageavif.stub����d�xB��>vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecolorclosest.stub^���d^�Z�6vendor/phpstan/php-8-stubs/stubs/ext/gd/imagewbmp.stub����d������Avendor/phpstan/php-8-stubs/stubs/ext/gd/imageaffinematrixget.stub����d��)���8vendor/phpstan/php-8-stubs/stubs/ext/gd/imagecharup.stub����d�p�t�?vendor/phpstan/php-8-stubs/stubs/ext/gd/imagealphablending.stubM���dM��cΤ4vendor/phpstan/php-8-stubs/stubs/ext/gd/imagesx.stub3���d3�I�1�7vendor/phpstan/php-8-stubs/stubs/ext/gd/imagetypes.stub'���d'��٤9vendor/phpstan/php-8-stubs/stubs/ext/gd/imageellipse.stub|���d|��D�@vendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/variant_imp.stubF���dF�~�3�Bvendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/com_exception.stub?���d?P�f�@vendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/variant_int.stub9���d9.�7ΤHvendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/com_safearray_proxy.stubC���dC��j�Evendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/com_message_pump.stubK���dK�
��Jvendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/com_get_active_object.stub]���d]d�dߤ;vendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/dotnet.stub����d���`*�@vendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/variant_sub.stubF���dF���Avendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/variant_idiv.stubG���dG�9��@vendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/variant_not.stub9���d9jEx�@vendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/variant_cmp.stuby���dyYI��@vendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/variant_and.stubF���dF(�"<�Avendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/variant_cast.stubJ���dJ3?���@vendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/variant_add.stubF���dF�uB�@vendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/variant_mul.stubF���dFs�[��@vendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/variant_pow.stubF���dFs}�@vendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/variant_set.stubj���dj$�&{�@vendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/variant_fix.stub9���d9���t�@vendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/variant_abs.stub9���d9���Ԥ@vendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/variant_div.stubF���dFy}���8vendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/com.stub����d�K�ϯ�Evendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/variant_get_type.stub>���d>�\3�Evendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/COMPersistHelper.stub����d�f����Evendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/variant_set_type.stubJ���dJCo�'�Nvendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/variant_date_to_timestamp.stubH���dHپ.�@vendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/variant_eqv.stubF���dF�/h�Dvendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/com_create_guid.stub5���d5�f��@vendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/variant_xor.stubF���dF�h�s�@vendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/variant_mod.stubF���dF'�Gvendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/com_print_typeinfo.stub����d��
�@vendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/variant_cat.stubF���dF���V�?vendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/variant_or.stubE���dEX���Pvendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/variant_date_from_timestamp.stubK���dK��o\�@vendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/variant_neg.stub9���d9Z��&�Evendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/com_load_typelib.stub\���d\��N�Bvendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/variant_round.stubK���dK��m��<vendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/variant.stub����d�4b@p�Cvendor/phpstan/php-8-stubs/stubs/ext/com_dotnet/com_event_sink.stub|���d|R}�Fvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_data_seek.stubW���dWI��>vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_commit.stub_���d_����Evendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_sqlstate.stubK���dK�0�@vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_sqlstate.stub=���d=M͡��Hvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_field_count.stubK���dKd0׹�Gvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_get_client_info.stubL���dL��Eh�Dvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_get_warnings.stubP���dP[��8�Evendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_fetch_lengths.stubf���dfǮ���Evendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_warning_count.stub?���d?�R�Cvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_fetch_assoc.stubi���di[.q��Bvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_errno.stubE���dE<���@vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_rollback.stuba���daBI��=vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_error.stub:���d:�x�Z�Evendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_sql_exception.stub����d���x�<vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_ping.stub7���d7���Cvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_set_charset.stubO���dOi�tŤ<vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_info.stub:���d:݊�Gvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_error_list.stubc���dc�A~\�?vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_set_opt.stub����d�g�tt�=vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_query.stub~���d~�$.�Hvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_next_result.stubL���dLq
�8�Jvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_real_escape_string.stubW���dWeH���>vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_report.stub5���d5-?0�Bvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_use_result.stubM���dM���c�?vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_refresh.stubF���dF�_��Avendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_init.stubJ���dJ���.�?vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_warning.stub����d��"�=vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_errno.stub7���d7�		�Gvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_get_result.stub{���d{��s�=vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_debug.stub����d��Hi]�Hvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_reap_async_query.stubr���dr`�YݤJvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_get_server_version.stubD���dD7 ��Dvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_store_result.stub^���d^��[�?vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_options.stubo���do,��v�Bvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_reset.stubF���dF�!�@�Evendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_connect_errno.stub1���d1���@vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_num_rows.stubI���dI�`뵤Dvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_fetch_fields.stub_���d_�S�ӤCvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_get_charset.stubH���dHnOzt�Evendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_escape_string.stubz���dzZB�W�Bvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_real_query.stubL���dL,!N�<vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_init.stub2���d2�χf�Bvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_field_tell.stubD���dD��E�Evendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_get_host_info.stubB���dB�	N�Evendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_affected_rows.stubF���dF͛���Evendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_connect_error.stub5���d5��D�Jvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_affected_rows.stubT���dT�(J0�Avendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_savepoint.stubJ���dJ�1C�Avendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_select_db.stubN���dN�t�<vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_poll.stub����d����Kvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_send_long_data.stubm���dm��\M�Dvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_fetch_object.stub����d�dŤLvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_result_metadata.stub`���d`���&�Fvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_get_proto_info.stub@���d@�셚�Ivendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_more_results.stubm���dmm�?�Ivendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_release_savepoint.stubY���dY�*�Q�Jvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_fetch_field_direct.stuba���da�Z��Bvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_close.stub����d�6�#��Avendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_insert_id.stubB���dB	��Dvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_prepare.stubW���dW_hp�Jvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_character_set_name.stubG���dG��ե�Evendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_attr_set.stube���de?"�q�Evendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_attr_get.stubX���dX%𘷤<vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_kill.stubH���dHg�d�=vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_close.stub����d�X�PܤHvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_param_count.stubK���dK�㋤Cvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_free_result.stubF���dF��8��?vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_prepare.stub^���d^�m��Ivendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_begin_transaction.stubj���djrr���Lvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_get_connection_stats.stub���d��E��Dvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_execute.stub����d�x�G �Bvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_field_seek.stubQ���dQ<uL��Cvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_fetch_field.stubN���dN�D(Z�Avendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_fetch_all.stub����d�+�ŤCvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_field_count.stub=���d=���Avendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_thread_id.stub;���d;�nM�Gvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_dump_debug_info.stubB���dBm'�1�<vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stat.stub?���d?���ʤCvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_fetch_array.stub����d�B;a��Gvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_bind_param.stubk���dk5�齤<vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt.stub
���d
c���Dvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_more_results.stub?���d?�̘�Evendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_execute_query.stub����d��N�Hvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_free_result.stubL���dL�kGn�Bvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_fetch.stubG���dGT�$Z�Ivendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_get_warnings.stube���de~��Hvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_bind_result.stub]���d]"�(�>vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_result.stub'	���d'	�(��7vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli.stub����d�f�C��Ivendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_store_result.stubM���dM�A-��Gvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_get_server_info.stubD���dD�@8�Cvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_change_user.stubu���duy��Bvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_error.stubH���dH�_��Dvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_fetch_column.stub����d���-�Cvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_thread_safe.stub0���d0�	���Avendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_fetch_row.stubg���dg�ʀ��Bvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_autocommit.stubK���dKCj�\�Cvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_multi_query.stubM���dM�8V�Evendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_num_rows.stubV���dVʒS�Avendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_data_seek.stubQ���dQnB��>vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_driver.stubG���dG�Ai�Hvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_get_client_stats.stubM���dM��v�Bvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_error_list.stubU���dU�j�Gvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_get_links_stats.stubL���dL'\ۚ�Cvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_next_result.stub>���d>�Y'��?vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_ssl_set.stub[���d[P�M�Jvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_get_client_version.stub6���d6R�5�?vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_connect.stub����d���˼�?vendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_execute.stub����d��*�Bvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_num_fields.stubD���dD� ͤDvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_real_connect.stub����d��xvz�Fvendor/phpstan/php-8-stubs/stubs/ext/mysqli/mysqli_stmt_insert_id.stubP���dP�̆ؤ;vendor/phpstan/php-8-stubs/stubs/ext/zlib/ob_gzhandler.stubJ���dJ�#�a�8vendor/phpstan/php-8-stubs/stubs/ext/zlib/gzinflate.stubP���dP�z,��;vendor/phpstan/php-8-stubs/stubs/ext/zlib/deflate_init.stub]���d]�w�A�:vendor/phpstan/php-8-stubs/stubs/ext/zlib/inflate_add.stubz���dz��7�:vendor/phpstan/php-8-stubs/stubs/ext/zlib/deflate_add.stubz���dzl�*�5vendor/phpstan/php-8-stubs/stubs/ext/zlib/gztell.stubc���dc�#�`�7vendor/phpstan/php-8-stubs/stubs/ext/zlib/gzdecode.stubO���dO�S�O�=vendor/phpstan/php-8-stubs/stubs/ext/zlib/InflateContext.stubH���dH�I��Cvendor/phpstan/php-8-stubs/stubs/ext/zlib/zlib_get_coding_type.stub:���d:�9���Avendor/phpstan/php-8-stubs/stubs/ext/zlib/inflate_get_status.stubG���dG(���7vendor/phpstan/php-8-stubs/stubs/ext/zlib/gzrewind.stuba���dah���5vendor/phpstan/php-8-stubs/stubs/ext/zlib/gzputs.stub����d�
�2�;vendor/phpstan/php-8-stubs/stubs/ext/zlib/gzuncompress.stubS���dS5�>��:vendor/phpstan/php-8-stubs/stubs/ext/zlib/zlib_encode.stub]���d]��8vendor/phpstan/php-8-stubs/stubs/ext/zlib/gzdeflate.stubo���do�5��5vendor/phpstan/php-8-stubs/stubs/ext/zlib/gzgets.stub{���d{�QjΤ:vendor/phpstan/php-8-stubs/stubs/ext/zlib/zlib_decode.stubR���dR[�j��5vendor/phpstan/php-8-stubs/stubs/ext/zlib/gzseek.stub����d�h�k��5vendor/phpstan/php-8-stubs/stubs/ext/zlib/gzopen.stubt���dt�6�7vendor/phpstan/php-8-stubs/stubs/ext/zlib/gzencode.stubo���do���k�=vendor/phpstan/php-8-stubs/stubs/ext/zlib/DeflateContext.stub&���d&�Ǭ��9vendor/phpstan/php-8-stubs/stubs/ext/zlib/gzpassthru.stube���de}2u��Cvendor/phpstan/php-8-stubs/stubs/ext/zlib/inflate_get_read_len.stubI���dIb#g,�5vendor/phpstan/php-8-stubs/stubs/ext/zlib/gzgetc.stubf���df�;(�9vendor/phpstan/php-8-stubs/stubs/ext/zlib/readgzfile.stubX���dXyY2��4vendor/phpstan/php-8-stubs/stubs/ext/zlib/gzeof.stub\���d\�oq¤;vendor/phpstan/php-8-stubs/stubs/ext/zlib/inflate_init.stub]���d]TB�.�9vendor/phpstan/php-8-stubs/stubs/ext/zlib/gzcompress.stubt���dt<E�g�6vendor/phpstan/php-8-stubs/stubs/ext/zlib/gzwrite.stub����d�!���6vendor/phpstan/php-8-stubs/stubs/ext/zlib/gzclose.stub`���d`?y.:�5vendor/phpstan/php-8-stubs/stubs/ext/zlib/gzread.stubs���ds�ԡ��5vendor/phpstan/php-8-stubs/stubs/ext/zlib/gzfile.stubm���dm�W�%�>vendor/phpstan/php-8-stubs/stubs/ext/xml/xml_error_string.stub@���d@�+��Ivendor/phpstan/php-8-stubs/stubs/ext/xml/xml_get_current_line_number.stubJ���dJ���ӤEvendor/phpstan/php-8-stubs/stubs/ext/xml/xml_set_element_handler.stuby���dy��
�Kvendor/phpstan/php-8-stubs/stubs/ext/xml/xml_set_notation_decl_handler.stub	���d	���?vendor/phpstan/php-8-stubs/stubs/ext/xml/xml_parser_create.stubo���do(�&6�Rvendor/phpstan/php-8-stubs/stubs/ext/xml/xml_set_unparsed_entity_decl_handler.stub���d&��v�Rvendor/phpstan/php-8-stubs/stubs/ext/xml/xml_set_start_namespace_decl_handler.stub���d����Cvendor/phpstan/php-8-stubs/stubs/ext/xml/xml_parse_into_struct.stub����d��pࣤ@vendor/phpstan/php-8-stubs/stubs/ext/xml/xml_get_error_code.stubA���dAm�7�Bvendor/phpstan/php-8-stubs/stubs/ext/xml/xml_parser_create_ns.stubi���di-�OǤPvendor/phpstan/php-8-stubs/stubs/ext/xml/xml_set_end_namespace_decl_handler.stub���d�"iӤ7vendor/phpstan/php-8-stubs/stubs/ext/xml/xml_parse.stub^���d^�k0��Cvendor/phpstan/php-8-stubs/stubs/ext/xml/xml_parser_set_option.stubz���dz��9�7vendor/phpstan/php-8-stubs/stubs/ext/xml/XMLParser.stub!���d!�;	A�Qvendor/phpstan/php-8-stubs/stubs/ext/xml/xml_set_external_entity_ref_handler.stub���d��^��Tvendor/phpstan/php-8-stubs/stubs/ext/xml/xml_set_processing_instruction_handler.stub���d�m�Cvendor/phpstan/php-8-stubs/stubs/ext/xml/xml_parser_get_option.stubX���dXD�q��<vendor/phpstan/php-8-stubs/stubs/ext/xml/xml_set_object.stub����d��Dŏ�=vendor/phpstan/php-8-stubs/stubs/ext/xml/xml_parser_free.stub?���d?~)��Kvendor/phpstan/php-8-stubs/stubs/ext/xml/xml_get_current_column_number.stubL���dLW�f�Evendor/phpstan/php-8-stubs/stubs/ext/xml/xml_set_default_handler.stub����d�n򭒤Lvendor/phpstan/php-8-stubs/stubs/ext/xml/xml_set_character_data_handler.stub���d'~kˤHvendor/phpstan/php-8-stubs/stubs/ext/xml/xml_get_current_byte_index.stubI���dI��<Ĥ<vendor/phpstan/php-8-stubs/stubs/ext/sysvsem/sem_remove.stubA���dA���=vendor/phpstan/php-8-stubs/stubs/ext/sysvsem/sem_acquire.stub^���d^:�ec�?vendor/phpstan/php-8-stubs/stubs/ext/sysvsem/SysvSemaphore.stubG���dG�|W��=vendor/phpstan/php-8-stubs/stubs/ext/sysvsem/sem_release.stubB���dB&���9vendor/phpstan/php-8-stubs/stubs/ext/sysvsem/sem_get.stub����d��$Z��Cvendor/phpstan/php-8-stubs/stubs/ext/pdo_sqlite/PDO_SQLite_Ext.stub����d��W�5vendor/phpstan/php-8-stubs/stubs/ext/iconv/iconv.stube���de���5�Avendor/phpstan/php-8-stubs/stubs/ext/iconv/iconv_mime_encode.stubs���ds����<vendor/phpstan/php-8-stubs/stubs/ext/iconv/iconv_substr.stub|���d|�{���Ivendor/phpstan/php-8-stubs/stubs/ext/iconv/iconv_mime_decode_headers.stub����d�c�H��Avendor/phpstan/php-8-stubs/stubs/ext/iconv/iconv_mime_decode.stubn���dn�]��=vendor/phpstan/php-8-stubs/stubs/ext/iconv/iconv_strrpos.stubj���dj���O�Bvendor/phpstan/php-8-stubs/stubs/ext/iconv/iconv_set_encoding.stubN���dNG�l�Bvendor/phpstan/php-8-stubs/stubs/ext/iconv/iconv_get_encoding.stubi���di,� �<vendor/phpstan/php-8-stubs/stubs/ext/iconv/iconv_strpos.stubz���dz��&K�<vendor/phpstan/php-8-stubs/stubs/ext/iconv/iconv_strlen.stuby���dy�5~��Bvendor/phpstan/php-8-stubs/stubs/ext/sysvmsg/msg_queue_exists.stub6���d6Q;N�?vendor/phpstan/php-8-stubs/stubs/ext/sysvmsg/msg_set_queue.stubP���dP����?vendor/phpstan/php-8-stubs/stubs/ext/sysvmsg/msg_get_queue.stub_���d_���a�@vendor/phpstan/php-8-stubs/stubs/ext/sysvmsg/msg_stat_queue.stubK���dKd��Bvendor/phpstan/php-8-stubs/stubs/ext/sysvmsg/SysvMessageQueue.stubJ���dJ[�6M�:vendor/phpstan/php-8-stubs/stubs/ext/sysvmsg/msg_send.stub����d��Eo��=vendor/phpstan/php-8-stubs/stubs/ext/sysvmsg/msg_receive.stub#���d#H�9T�Bvendor/phpstan/php-8-stubs/stubs/ext/sysvmsg/msg_remove_queue.stubF���dF.H���Hvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_dh_compute_key.stubr���dr��ͤEvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_x509_export.stub����d�E�sa�Evendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_x509_verify.stub����d��0�t�Jvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_x509_fingerprint.stub����d�
�L[�Dvendor/phpstan/php-8-stubs/stubs/ext/openssl/OpenSSLCertificate.stubL���dLLYZ��Dvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_x509_parse.stub����d��Y��Gvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_get_publickey.stub����d�{A���Lvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_csr_get_public_key.stub����d��cO�Gvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_pkcs7_encrypt.stub���di`�Mvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_random_pseudo_bytes.stub����d�߁o�Fvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_error_string.stub:���d:���Ovendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_spki_export_challenge.stubO���dO���Jvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_cipher_iv_length.stubN���dNLl�a�Mvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_x509_export_to_file.stub����d����r�Evendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_cms_decrypt.stub5���d5��B��Evendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_pkey_derive.stub���d�n��@vendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_digest.stubr���dr�Ƞ�Kvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_cipher_key_length.stub`���d`�u��Lvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_get_cipher_methods.stube���dea7��Evendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_pkcs12_read.stub����d�e�祤Dvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_cms_verify.stub)���d)�Q�	�>vendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_open.stub����d�(6�̤Dvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_pkcs7_read.stubn���dn�
�Avendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_decrypt.stub����d�_,��Fvendor/phpstan/php-8-stubs/stubs/ext/openssl/OpenSSLAsymmetricKey.stub,���d,{Ք��Bvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_cms_sign.stub^���d^&
���Bvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_free_key.stub{���d{>w��Lvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_get_cert_locations.stubP���dP�s��Hvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_get_md_methods.stuba���da	�-�>vendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_sign.stub����d�o���Kvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_x509_checkpurpose.stub����d�r��Cvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_x509_free.stubb���db{�_!�Evendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_pkey_export.stub����d��\b�Cvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_x509_read.stubk���dk̽�Ivendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_private_encrypt.stub����d��]Ɣ�Evendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_cms_encrypt.stubX���dX�`���Lvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_csr_export_to_file.stub����d�CR,�Hvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_public_decrypt.stub����d����Fvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_pkcs7_verify.stub���d��դRvendor/phpstan/php-8-stubs/stubs/ext/openssl/OpenSSLCertificateSigningRequest.stub8���d8w�mW�Dvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_csr_export.stub����d�}���Dvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_pkcs7_sign.stubE���dE-L�=�Avendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_csr_new.stub����d�)�ͤIvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_csr_get_subject.stub����d��v���@vendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_verify.stub����d��n]�Evendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_spki_verify.stub=���d=���@vendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_pbkdf2.stub����d�/�7��Gvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_pkcs12_export.stub���d�lŤAvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_encrypt.stub����d��x��Cvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_pkey_free.stub\���d\��R�Ivendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_get_curve_names.stubk���dk�tG��Bvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_pkey_new.stub[���d[��8�Bvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_csr_sign.stub3���d3�i�r�Ovendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_pkcs12_export_to_file.stub���d���Jvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_pkey_get_details.stubn���dn?��E�Bvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_cms_read.stubv���dvӃ�Pvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_x509_check_private_key.stub����d��6���Mvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_pkey_export_to_file.stub����d���d�Bvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_spki_new.stub����d��~I�Evendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_spki_export.stubE���dE�сO�Ivendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_pkey_get_public.stub����d�*@��Ivendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_private_decrypt.stub����d�1��Gvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_pkcs7_decrypt.stub���d�+1A�>vendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_seal.stub����d��ܕ��Hvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_get_privatekey.stub����d���j8�Jvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_pkey_get_private.stub����d���B�Hvendor/phpstan/php-8-stubs/stubs/ext/openssl/openssl_public_encrypt.stub����d�m�ǤAvendor/phpstan/php-8-stubs/stubs/ext/pcntl/pcntl_sigprocmask.stub����d�C�	�>vendor/phpstan/php-8-stubs/stubs/ext/pcntl/pcntl_strerror.stubD���dDi�?�Avendor/phpstan/php-8-stubs/stubs/ext/pcntl/pcntl_setpriority.stub����d���BƤ;vendor/phpstan/php-8-stubs/stubs/ext/pcntl/pcntl_alarm.stub4���d4!Ñ$�Bvendor/phpstan/php-8-stubs/stubs/ext/pcntl/pcntl_sigtimedwait.stub����d���A�?vendor/phpstan/php-8-stubs/stubs/ext/pcntl/pcntl_wifexited.stubF���dF�<���Avendor/phpstan/php-8-stubs/stubs/ext/pcntl/pcntl_wexitstatus.stub?���d?�J�j�:vendor/phpstan/php-8-stubs/stubs/ext/pcntl/pcntl_fork.stubI���dI����Avendor/phpstan/php-8-stubs/stubs/ext/pcntl/pcntl_sigwaitinfo.stub����d�C-�Ȥ>vendor/phpstan/php-8-stubs/stubs/ext/pcntl/pcntl_wtermsig.stub<���d<:�Y
�Avendor/phpstan/php-8-stubs/stubs/ext/pcntl/pcntl_getpriority.stub}���d}�m��;vendor/phpstan/php-8-stubs/stubs/ext/pcntl/pcntl_rfork.stubm���dm���
�Avendor/phpstan/php-8-stubs/stubs/ext/pcntl/pcntl_wifsignaled.stubA���dA��w�;vendor/phpstan/php-8-stubs/stubs/ext/pcntl/pcntl_forkx.stub\���d\�r�U�Evendor/phpstan/php-8-stubs/stubs/ext/pcntl/pcntl_signal_dispatch.stub3���d3NI�[�Bvendor/phpstan/php-8-stubs/stubs/ext/pcntl/pcntl_wifcontinued.stubR���dR(�ޤ=vendor/phpstan/php-8-stubs/stubs/ext/pcntl/pcntl_waitpid.stub����d�r��Hvendor/phpstan/php-8-stubs/stubs/ext/pcntl/pcntl_signal_get_handler.stubV���dV���%�Dvendor/phpstan/php-8-stubs/stubs/ext/pcntl/pcntl_get_last_error.stub1���d1���'�:vendor/phpstan/php-8-stubs/stubs/ext/pcntl/pcntl_exec.stub\���d\m�>Ƥ;vendor/phpstan/php-8-stubs/stubs/ext/pcntl/pcntl_errno.stubK���dK1�ˤCvendor/phpstan/php-8-stubs/stubs/ext/pcntl/pcntl_async_signals.stubE���dEe�>vendor/phpstan/php-8-stubs/stubs/ext/pcntl/pcntl_wstopsig.stub<���d<8m��<vendor/phpstan/php-8-stubs/stubs/ext/pcntl/pcntl_signal.stub����d��[��@vendor/phpstan/php-8-stubs/stubs/ext/pcntl/pcntl_wifstopped.stub9���d9uPͤ=vendor/phpstan/php-8-stubs/stubs/ext/pcntl/pcntl_unshare.stubI���dI����:vendor/phpstan/php-8-stubs/stubs/ext/pcntl/pcntl_wait.stub����d�О�S�Ivendor/phpstan/php-8-stubs/stubs/ext/snmp/snmp_set_oid_output_format.stubC���dC��х�Cvendor/phpstan/php-8-stubs/stubs/ext/snmp/snmp_get_quick_print.stub2���d2h��V�;vendor/phpstan/php-8-stubs/stubs/ext/snmp/snmprealwalk.stub����d��+.�Fvendor/phpstan/php-8-stubs/stubs/ext/snmp/snmp_get_valueretrieval.stub4���d4�ӓ��6vendor/phpstan/php-8-stubs/stubs/ext/snmp/snmpget.stub����d� A�o�9vendor/phpstan/php-8-stubs/stubs/ext/snmp/snmp3_walk.stub���d�R�@�Bvendor/phpstan/php-8-stubs/stubs/ext/snmp/snmp_set_enum_print.stub=���d=�s��:vendor/phpstan/php-8-stubs/stubs/ext/snmp/snmpgetnext.stub����d�+B
��6vendor/phpstan/php-8-stubs/stubs/ext/snmp/snmpset.stub����d�[(:z�<vendor/phpstan/php-8-stubs/stubs/ext/snmp/SNMPException.stub9���d9�=w�>vendor/phpstan/php-8-stubs/stubs/ext/snmp/snmp3_real_walk.stub���d���t�Ivendor/phpstan/php-8-stubs/stubs/ext/snmp/snmp_set_oid_numeric_print.stubl���dl�2���8vendor/phpstan/php-8-stubs/stubs/ext/snmp/snmp2_set.stub����d��T+H�7vendor/phpstan/php-8-stubs/stubs/ext/snmp/snmpwalk.stub����d����<vendor/phpstan/php-8-stubs/stubs/ext/snmp/snmp2_getnext.stub����d�ˣ���Fvendor/phpstan/php-8-stubs/stubs/ext/snmp/snmp_set_valueretrieval.stub@���d@��Y��<vendor/phpstan/php-8-stubs/stubs/ext/snmp/snmp_read_mib.stub;���d;�wu7�8vendor/phpstan/php-8-stubs/stubs/ext/snmp/snmp3_get.stub���d�'s��8vendor/phpstan/php-8-stubs/stubs/ext/snmp/snmp2_get.stub����d�-73z�8vendor/phpstan/php-8-stubs/stubs/ext/snmp/snmp3_set.stub4���d4�ԋ&�Cvendor/phpstan/php-8-stubs/stubs/ext/snmp/snmp_set_quick_print.stub>���d>U��4�9vendor/phpstan/php-8-stubs/stubs/ext/snmp/snmp2_walk.stub����d�R[��3vendor/phpstan/php-8-stubs/stubs/ext/snmp/SNMP.stub����d�1z��:vendor/phpstan/php-8-stubs/stubs/ext/snmp/snmpwalkoid.stub����d�+�<vendor/phpstan/php-8-stubs/stubs/ext/snmp/snmp3_getnext.stub���d�v�V�>vendor/phpstan/php-8-stubs/stubs/ext/snmp/snmp2_real_walk.stub����d�*v9�?vendor/phpstan/php-8-stubs/stubs/ext/intl/grapheme_extract.stub����d��ͪ��Bvendor/phpstan/php-8-stubs/stubs/ext/intl/datefmt_get_pattern.stubV���dVZ1�X�Lvendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_set_first_day_of_week.stubb���db�/�Ivendor/phpstan/php-8-stubs/stubs/ext/intl/collator_get_error_message.stubQ���dQ� ~�>vendor/phpstan/php-8-stubs/stubs/ext/intl/intl_error_name.stub=���d=����<vendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_clear.stubV���dV}��ܤBvendor/phpstan/php-8-stubs/stubs/ext/intl/collator_get_locale.stubU���dU��0�Gvendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_field_difference.stubp���dp��äAvendor/phpstan/php-8-stubs/stubs/ext/intl/msgfmt_set_pattern.stub]���d]�_:E�Tvendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_set_repeated_wall_time_option.stubg���dg&yCB�Hvendor/phpstan/php-8-stubs/stubs/ext/intl/datefmt_get_error_message.stubV���dV���ԤFvendor/phpstan/php-8-stubs/stubs/ext/intl/collator_get_error_code.stubK���dK�W�Svendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_set_skipped_wall_time_option.stubf���df=VIݤEvendor/phpstan/php-8-stubs/stubs/ext/intl/datefmt_get_error_code.stubP���dPnS�%�Hvendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_get_least_maximum.stub_���d_���	�Avendor/phpstan/php-8-stubs/stubs/ext/intl/resourcebundle_get.stub����d�Kk�S�Lvendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_get_first_day_of_week.stubW���dW��ƤLvendor/phpstan/php-8-stubs/stubs/ext/intl/transliterator/Transliterator.stub����d��4��Dvendor/phpstan/php-8-stubs/stubs/ext/intl/normalizer/Normalizer.stub����d��ӗ�?vendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_get_type.stubG���dG��9�;vendor/phpstan/php-8-stubs/stubs/ext/intl/idn_to_ascii.stub����d�7c���Evendor/phpstan/php-8-stubs/stubs/ext/intl/resourcebundle_locales.stub`���d`C��ҤDvendor/phpstan/php-8-stubs/stubs/ext/intl/intltz_create_default.stub<���d<$BY�Avendor/phpstan/php-8-stubs/stubs/ext/intl/numfmt_set_pattern.stub\���d\�1&��<vendor/phpstan/php-8-stubs/stubs/ext/intl/datefmt_parse.stub����d��q��Fvendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_create_instance.stub����d����Ҥ@vendor/phpstan/php-8-stubs/stubs/ext/intl/datefmt_localtime.stub����d�㯝-�<vendor/phpstan/php-8-stubs/stubs/ext/intl/msgfmt_create.stubh���dh�!��<vendor/phpstan/php-8-stubs/stubs/ext/intl/collator_sort.stubp���dp@l���Cvendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_to_date_time.stubT���dTgz3�:vendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_get.stubQ���dQ�2��Evendor/phpstan/php-8-stubs/stubs/ext/intl/collator_set_attribute.stuba���da�f��>vendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_get_now.stub.���d.�ȐW�Dvendor/phpstan/php-8-stubs/stubs/ext/intl/transliterator_create.stub����d�{uP�Uvendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_set_minimal_days_in_first_week.stubf���df���Dvendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_get_time_zone.stubY���dY󆱜�Dvendor/phpstan/php-8-stubs/stubs/ext/intl/msgfmt_get_error_code.stubN���dN&�3ʤUvendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_get_minimal_days_in_first_week.stub`���d`�I���Ovendor/phpstan/php-8-stubs/stubs/ext/intl/transliterator_create_from_rules.stub����d��L��Evendor/phpstan/php-8-stubs/stubs/ext/intl/collator_get_attribute.stubZ���dZU|LФAvendor/phpstan/php-8-stubs/stubs/ext/intl/datefmt_is_lenient.stubM���dM�Fu�@vendor/phpstan/php-8-stubs/stubs/ext/intl/locale_get_script.stub@���d@N�	�Ivendor/phpstan/php-8-stubs/stubs/ext/intl/intltz_get_tz_data_version.stub@���d@N����>vendor/phpstan/php-8-stubs/stubs/ext/intl/grapheme_substr.stube���de-�}ΤEvendor/phpstan/php-8-stubs/stubs/ext/intl/numfmt_format_currency.stubx���dx�k$ܤCvendor/phpstan/php-8-stubs/stubs/ext/intl/numfmt_get_attribute.stubh���dhJ��@�Avendor/phpstan/php-8-stubs/stubs/ext/intl/intltz_get_unknown.stub9���d9��TB�Ivendor/phpstan/php-8-stubs/stubs/ext/intl/locale_get_display_variant.stubm���dm��?vendor/phpstan/php-8-stubs/stubs/ext/intl/grapheme_stristr.stubr���drtxۤ<vendor/phpstan/php-8-stubs/stubs/ext/intl/msgfmt_format.stub^���d^ꀖ?�Evendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_from_date_time.stubp���dp�y�Dvendor/phpstan/php-8-stubs/stubs/ext/intl/numfmt_parse_currency.stub����d��8�;vendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_roll.stubs���ds�+�Hvendor/phpstan/php-8-stubs/stubs/ext/intl/numfmt_get_text_attribute.stubj���dj�{>�@vendor/phpstan/php-8-stubs/stubs/ext/intl/collator/Collator.stub	���d	��?�Fvendor/phpstan/php-8-stubs/stubs/ext/intl/datefmt_get_timezone_id.stubZ���dZ5���Avendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_get_locale.stubZ���dZ})���Evendor/phpstan/php-8-stubs/stubs/ext/intl/intl_get_error_message.stub6���d6�8�V�=vendor/phpstan/php-8-stubs/stubs/ext/intl/intltz_get_gmt.stub5���d53!�u�Cvendor/phpstan/php-8-stubs/stubs/ext/intl/datefmt_get_timezone.stub^���d^�q��>vendor/phpstan/php-8-stubs/stubs/ext/intl/grapheme_strstr.stubq���dq5��o�Cvendor/phpstan/php-8-stubs/stubs/ext/intl/datefmt_get_calendar.stubT���dT�%��=vendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_is_set.stubO���dO��y��Bvendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_get_maximum.stubY���dYC>���@vendor/phpstan/php-8-stubs/stubs/ext/intl/intltz_get_offset.stub����d��ẤBvendor/phpstan/php-8-stubs/stubs/ext/intl/locale_get_keywords.stubb���db�06
�Evendor/phpstan/php-8-stubs/stubs/ext/intl/intltz_get_dst_savings.stubJ���dJ�y��Gvendor/phpstan/php-8-stubs/stubs/ext/intl/msgfmt_get_error_message.stubT���dT��"�?vendor/phpstan/php-8-stubs/stubs/ext/intl/collator_compare.stubf���df��Z�Tvendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_get_keyword_values_for_locale.stub����d���%�<vendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_after.stubX���dXj:�Dvendor/phpstan/php-8-stubs/stubs/ext/intl/intltz_has_same_rules.stubg���dgo���@vendor/phpstan/php-8-stubs/stubs/ext/intl/numfmt_get_symbol.stub_���d_�=3�Evendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_get_error_code.stubP���dP�IG�:vendor/phpstan/php-8-stubs/stubs/ext/intl/idn_to_utf8.stub����d���'�Jvendor/phpstan/php-8-stubs/stubs/ext/intl/locale_get_display_language.stubn���dnN-.�Avendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_is_weekend.stuba���da�ӹX�Mvendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_get_weekend_transition.stubh���dh5��Jvendor/phpstan/php-8-stubs/stubs/ext/intl/locale_get_primary_language.stubJ���dJ�ܤLvendor/phpstan/php-8-stubs/stubs/ext/intl/resourcebundle_get_error_code.stubQ���dQ���q�Hvendor/phpstan/php-8-stubs/stubs/ext/intl/locale_get_display_region.stubl���dl�&���=vendor/phpstan/php-8-stubs/stubs/ext/intl/locale_compose.stubB���dBX���Ivendor/phpstan/php-8-stubs/stubs/ext/intl/intltz_from_date_time_zone.stubY���dY�W)�Fvendor/phpstan/php-8-stubs/stubs/ext/intl/intltz_get_canonical_id.stub����d��v���Bvendor/phpstan/php-8-stubs/stubs/ext/intl/common/IntlIterator.stubi���di�X�A�Gvendor/phpstan/php-8-stubs/stubs/ext/intl/intltz_get_equivalent_id.stub]���d]�çN�Dvendor/phpstan/php-8-stubs/stubs/ext/intl/collator_get_sort_key.stub\���d\DV1Y�Jvendor/phpstan/php-8-stubs/stubs/ext/intl/datefmt_get_calendar_object.stubj���dj��rϤ@vendor/phpstan/php-8-stubs/stubs/ext/intl/grapheme_strripos.stube���de��--�Dvendor/phpstan/php-8-stubs/stubs/ext/intl/locale_filter_matches.stubs���ds?��=vendor/phpstan/php-8-stubs/stubs/ext/intl/collator_asort.stubq���dqi�ͭ�Lvendor/phpstan/php-8-stubs/stubs/ext/intl/resourcebundle/ResourceBundle.stub���d�3��Gvendor/phpstan/php-8-stubs/stubs/ext/intl/intltz_to_date_time_zone.stub\���d\��yw�Ovendor/phpstan/php-8-stubs/stubs/ext/intl/intlgregcal_set_gregorian_change.stubp���dp	���Ovendor/phpstan/php-8-stubs/stubs/ext/intl/intlgregcal_get_gregorian_change.stub_���d_X��Q�Avendor/phpstan/php-8-stubs/stubs/ext/intl/datefmt_get_locale.stubu���du^���Dvendor/phpstan/php-8-stubs/stubs/ext/intl/msgfmt_format_message.stubi���di�cө�Hvendor/phpstan/php-8-stubs/stubs/ext/intl/intltz_create_enumeration.stub����d�NȖŤAvendor/phpstan/php-8-stubs/stubs/ext/intl/locale_set_default.stub>���d>e�t��@vendor/phpstan/php-8-stubs/stubs/ext/intl/numfmt_set_symbol.stubf���df��&}�Gvendor/phpstan/php-8-stubs/stubs/ext/intl/intltz_use_daylight_time.stubM���dM##��Fvendor/phpstan/php-8-stubs/stubs/ext/intl/locale_accept_from_http.stubK���dK%���Lvendor/phpstan/php-8-stubs/stubs/ext/intl/transliterator_create_inverse.stubf���dfo,w�<vendor/phpstan/php-8-stubs/stubs/ext/intl/locale/Locale.stub�
���d�
	'��Gvendor/phpstan/php-8-stubs/stubs/ext/intl/intltz_get_error_message.stubU���dUٯs�Avendor/phpstan/php-8-stubs/stubs/ext/intl/msgfmt_get_pattern.stubT���dT�-�<vendor/phpstan/php-8-stubs/stubs/ext/intl/numfmt_format.stub����d��2ř�>vendor/phpstan/php-8-stubs/stubs/ext/intl/intl_is_failure.stub;���d;�Z�Bvendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_set_lenient.stubW���dW�`ꀤBvendor/phpstan/php-8-stubs/stubs/ext/intl/datefmt_set_lenient.stub]���d]�� W�=vendor/phpstan/php-8-stubs/stubs/ext/intl/datefmt_format.stub����d�����:vendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_set.stub����d��#r�;vendor/phpstan/php-8-stubs/stubs/ext/intl/locale_parse.stub:���d:���*�Kvendor/phpstan/php-8-stubs/stubs/ext/intl/dateformat/IntlDateFormatter.stubU���dU�"o�Rvendor/phpstan/php-8-stubs/stubs/ext/intl/dateformat/IntlDatePatternGenerator.stubP���dP"�}�Fvendor/phpstan/php-8-stubs/stubs/ext/intl/locale_get_all_variants.stubE���dE�V3��<vendor/phpstan/php-8-stubs/stubs/ext/intl/IntlException.stubT���dTc��Dvendor/phpstan/php-8-stubs/stubs/ext/intl/collator_set_strength.stubS���dSL�~}�;vendor/phpstan/php-8-stubs/stubs/ext/intl/msgfmt_parse.stubt���dt�8j9�Dvendor/phpstan/php-8-stubs/stubs/ext/intl/intltz_get_error_code.stubO���dO�y�=vendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_equals.stubY���dY�
�ݤDvendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_set_time_zone.stub����d���U��Lvendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_get_available_locales.stubS���dS�s~��Fvendor/phpstan/php-8-stubs/stubs/ext/intl/intltz_create_time_zone.stubQ���dQ�{�]�@vendor/phpstan/php-8-stubs/stubs/ext/intl/msgfmt_get_locale.stubM���dM�OB�Dvendor/phpstan/php-8-stubs/stubs/ext/intl/resourcebundle_create.stub����d�T����Dvendor/phpstan/php-8-stubs/stubs/ext/intl/datefmt_format_object.stub����d��͆��Gvendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_is_equivalent_to.stubc���dcJ`�Bvendor/phpstan/php-8-stubs/stubs/ext/intl/datefmt_set_pattern.stub_���d_�iRr�<vendor/phpstan/php-8-stubs/stubs/ext/intl/numfmt_create.stub{���d{����Hvendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_get_error_message.stubV���dV�r���Ovendor/phpstan/php-8-stubs/stubs/ext/intl/normalizer_get_raw_decomposition.stub����d�0^�1�?vendor/phpstan/php-8-stubs/stubs/ext/intl/grapheme_strrpos.stubd���dd5��Bvendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_get_minimum.stubY���dY�֗�Cvendor/phpstan/php-8-stubs/stubs/ext/intl/numfmt_set_attribute.stubo���doE��
�Lvendor/phpstan/php-8-stubs/stubs/ext/intl/transliterator_get_error_code.stub_���d_���h�Ivendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_get_actual_maximum.stub`���d`�ФWvendor/phpstan/php-8-stubs/stubs/ext/intl/breakiterator/IntlCodePointBreakIterator.stub����d�?��Nvendor/phpstan/php-8-stubs/stubs/ext/intl/breakiterator/IntlBreakIterator.stub`���d`�h�Nvendor/phpstan/php-8-stubs/stubs/ext/intl/breakiterator/IntlPartsIterator.stub(���d(��LF�Wvendor/phpstan/php-8-stubs/stubs/ext/intl/breakiterator/IntlRuleBasedBreakIterator.stub����d�f�,�?vendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_get_time.stubL���dL.Ew�Ovendor/phpstan/php-8-stubs/stubs/ext/intl/transliterator_get_error_message.stube���de�EF��@vendor/phpstan/php-8-stubs/stubs/ext/intl/intltz_get_region.stubI���dIM�P��Ivendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_get_actual_minimum.stub`���d`x�&>�Dvendor/phpstan/php-8-stubs/stubs/ext/intl/numfmt_get_error_code.stubM���dM��R�Dvendor/phpstan/php-8-stubs/stubs/ext/intl/intltz_get_windows_id.stubo���do�kϝ�Kvendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_get_day_of_week_type.stubf���df^3���Dvendor/phpstan/php-8-stubs/stubs/ext/intl/intltz_get_raw_offset.stubI���dI`�Qj�Avendor/phpstan/php-8-stubs/stubs/ext/intl/locale_get_default.stub?���d?�H?�Gvendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_in_daylight_time.stubM���dMNk�~�Hvendor/phpstan/php-8-stubs/stubs/ext/intl/locale_get_display_script.stubl���dl�C��Bvendor/phpstan/php-8-stubs/stubs/ext/intl/locale_canonicalize.stubB���dBb�SA�Cvendor/phpstan/php-8-stubs/stubs/ext/intl/converter/UConverter.stub�
���d�
1�*w�Kvendor/phpstan/php-8-stubs/stubs/ext/intl/transliterator_transliterate.stub����d�3���<vendor/phpstan/php-8-stubs/stubs/ext/intl/intltz_get_id.stubJ���dJ��MT�=vendor/phpstan/php-8-stubs/stubs/ext/intl/uchar/IntlChar.stub�#���d�#u�V��Avendor/phpstan/php-8-stubs/stubs/ext/intl/numfmt_get_pattern.stubS���dS�_b��Uvendor/phpstan/php-8-stubs/stubs/ext/intl/intltz_create_time_zone_id_enumeration.stub����d�|�'h�<vendor/phpstan/php-8-stubs/stubs/ext/intl/locale_lookup.stub����d�X}�Mvendor/phpstan/php-8-stubs/stubs/ext/intl/calendar/IntlGregorianCalendar.stub����d��-�Dvendor/phpstan/php-8-stubs/stubs/ext/intl/calendar/IntlCalendar.stubb���dbV�3r�Cvendor/phpstan/php-8-stubs/stubs/ext/intl/resourcebundle_count.stubH���dH[�a��?vendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_set_time.stubW���dWm����?vendor/phpstan/php-8-stubs/stubs/ext/intl/grapheme_stripos.stubd���ddCĶ�Ovendor/phpstan/php-8-stubs/stubs/ext/intl/resourcebundle_get_error_message.stubW���dWj����Cvendor/phpstan/php-8-stubs/stubs/ext/intl/datefmt_get_datetype.stubT���dT*�Ƥ;vendor/phpstan/php-8-stubs/stubs/ext/intl/numfmt_parse.stub����d���H��Cvendor/phpstan/php-8-stubs/stubs/ext/intl/normalizer_normalize.stuby���dy���j�@vendor/phpstan/php-8-stubs/stubs/ext/intl/numfmt_get_locale.stubr���dr{)̤Avendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_is_lenient.stubG���dG�WT�Cvendor/phpstan/php-8-stubs/stubs/ext/intl/datefmt_set_timezone.stub����d�vT�Gvendor/phpstan/php-8-stubs/stubs/ext/intl/normalizer_is_normalized.stubd���ddP2
��Hvendor/phpstan/php-8-stubs/stubs/ext/intl/numfmt_set_text_attribute.stubq���dq���=vendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_before.stubY���dY�ӠƤCvendor/phpstan/php-8-stubs/stubs/ext/intl/datefmt_set_calendar.stubq���dq��Eh�Dvendor/phpstan/php-8-stubs/stubs/ext/intl/timezone/IntlTimeZone.stub����d�y�W�Gvendor/phpstan/php-8-stubs/stubs/ext/intl/intlgregcal_is_leap_year.stuba���da����>vendor/phpstan/php-8-stubs/stubs/ext/intl/grapheme_strlen.stubT���dT��;�Kvendor/phpstan/php-8-stubs/stubs/ext/intl/collator_sort_with_sort_keys.stubZ���dZ�v��Jvendor/phpstan/php-8-stubs/stubs/ext/intl/intlgregcal_create_instance.stub����d���Y�Bvendor/phpstan/php-8-stubs/stubs/ext/intl/intl_get_error_code.stub=���d=�ǩ�Tvendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_get_repeated_wall_time_option.stubY���dY��Q�Kvendor/phpstan/php-8-stubs/stubs/ext/intl/intltz_get_id_for_windows_id.stubl���dl��yߤJvendor/phpstan/php-8-stubs/stubs/ext/intl/intltz_count_equivalent_ids.stub_���d_�"�I�Fvendor/phpstan/php-8-stubs/stubs/ext/intl/intltz_get_display_name.stub����d��B�Cvendor/phpstan/php-8-stubs/stubs/ext/intl/msgfmt_parse_message.stub����d�Ӏ�D�Fvendor/phpstan/php-8-stubs/stubs/ext/intl/transliterator_list_ids.stubS���dS���Svendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_get_skipped_wall_time_option.stubX���dX�c��Fvendor/phpstan/php-8-stubs/stubs/ext/intl/locale_get_display_name.stubj���dj0�@3�>vendor/phpstan/php-8-stubs/stubs/ext/intl/collator_create.stubP���dP\��u�@vendor/phpstan/php-8-stubs/stubs/ext/intl/locale_get_region.stub@���d@�q��Hvendor/phpstan/php-8-stubs/stubs/ext/intl/formatter/NumberFormatter.stubO���dO)!R�Cvendor/phpstan/php-8-stubs/stubs/ext/intl/datefmt_get_timetype.stubT���dT��"8�=vendor/phpstan/php-8-stubs/stubs/ext/intl/datefmt_create.stube���de�tW��Ivendor/phpstan/php-8-stubs/stubs/ext/intl/msgformat/MessageFormatter.stub����d��L���Kvendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_get_greatest_minimum.stubb���dblBy��>vendor/phpstan/php-8-stubs/stubs/ext/intl/grapheme_strpos.stubc���dc��*�:vendor/phpstan/php-8-stubs/stubs/ext/intl/intlcal_add.stubX���dX�y���Gvendor/phpstan/php-8-stubs/stubs/ext/intl/numfmt_get_error_message.stubS���dS,��(�Hvendor/phpstan/php-8-stubs/stubs/ext/intl/spoofchecker/Spoofchecker.stub����d��\��Dvendor/phpstan/php-8-stubs/stubs/ext/intl/collator_get_strength.stubC���dC�O��:vendor/phpstan/php-8-stubs/stubs/ext/tidy/tidy_getopt.stubO���dO���c�7vendor/phpstan/php-8-stubs/stubs/ext/tidy/tidyNode.stub���dW�6	�@vendor/phpstan/php-8-stubs/stubs/ext/tidy/tidy_parse_string.stub����d�I��}�@vendor/phpstan/php-8-stubs/stubs/ext/tidy/tidy_get_html_ver.stub9���d95b�2�<vendor/phpstan/php-8-stubs/stubs/ext/tidy/tidy_get_root.stub<���d<
g�
�<vendor/phpstan/php-8-stubs/stubs/ext/tidy/tidy_get_html.stub<���d<���Ѥ@vendor/phpstan/php-8-stubs/stubs/ext/tidy/tidy_access_count.stub9���d9>�Ꙥ>vendor/phpstan/php-8-stubs/stubs/ext/tidy/tidy_parse_file.stub����d��#���>vendor/phpstan/php-8-stubs/stubs/ext/tidy/tidy_get_output.stub:���d:���.�?vendor/phpstan/php-8-stubs/stubs/ext/tidy/tidy_error_count.stub8���d8����?vendor/phpstan/php-8-stubs/stubs/ext/tidy/tidy_repair_file.stub����d�m�Zd�<vendor/phpstan/php-8-stubs/stubs/ext/tidy/tidy_get_head.stub<���d<w].ۤ?vendor/phpstan/php-8-stubs/stubs/ext/tidy/tidy_get_release.stub0���d03��\�<vendor/phpstan/php-8-stubs/stubs/ext/tidy/tidy_diagnose.stub6���d6p�b�Avendor/phpstan/php-8-stubs/stubs/ext/tidy/tidy_warning_count.stub:���d:c+��>vendor/phpstan/php-8-stubs/stubs/ext/tidy/tidy_get_status.stub7���d7�L��@vendor/phpstan/php-8-stubs/stubs/ext/tidy/tidy_clean_repair.stub:���d:��lI�<vendor/phpstan/php-8-stubs/stubs/ext/tidy/tidy_get_body.stub<���d<XO @�Avendor/phpstan/php-8-stubs/stubs/ext/tidy/tidy_repair_string.stub����d���C�:vendor/phpstan/php-8-stubs/stubs/ext/tidy/tidy_is_xml.stub4���d4�.�Y�<vendor/phpstan/php-8-stubs/stubs/ext/tidy/tidy_is_xhtml.stub6���d6-���>vendor/phpstan/php-8-stubs/stubs/ext/tidy/tidy_get_config.stub@���d@�z�Dvendor/phpstan/php-8-stubs/stubs/ext/tidy/tidy_get_error_buffer.stubF���dF'�ሤ?vendor/phpstan/php-8-stubs/stubs/ext/tidy/tidy_get_opt_doc.stubk���dk��=��3vendor/phpstan/php-8-stubs/stubs/ext/tidy/tidy.stubY���dYq����@vendor/phpstan/php-8-stubs/stubs/ext/tidy/tidy_config_count.stub9���d9���Avendor/phpstan/php-8-stubs/stubs/ext/pdo_pgsql/PDO_PGSql_Ext.stub����d�Y7L��<vendor/phpstan/php-8-stubs/stubs/ext/session/session_id.stubB���dB�7פXvendor/phpstan/php-8-stubs/stubs/ext/session/SessionUpdateTimestampHandlerInterface.stub+���d+��B��?vendor/phpstan/php-8-stubs/stubs/ext/session/session_abort.stub+���d+
4��Avendor/phpstan/php-8-stubs/stubs/ext/session/session_destroy.stub-���d-�ؔ
�@vendor/phpstan/php-8-stubs/stubs/ext/session/SessionHandler.stub����d����Jvendor/phpstan/php-8-stubs/stubs/ext/session/session_set_save_handler.stubf���df0���@vendor/phpstan/php-8-stubs/stubs/ext/session/session_commit.stubN���dN���7�@vendor/phpstan/php-8-stubs/stubs/ext/session/session_status.stub+���d+q<�>vendor/phpstan/php-8-stubs/stubs/ext/session/session_name.stubh���dh����?vendor/phpstan/php-8-stubs/stubs/ext/session/session_unset.stub+���d+F�A��Dvendor/phpstan/php-8-stubs/stubs/ext/session/SessionIdInterface.stub����d�bᣤIvendor/phpstan/php-8-stubs/stubs/ext/session/SessionHandlerInterface.stub����d��&)�Kvendor/phpstan/php-8-stubs/stubs/ext/session/session_set_cookie_params.stub����d����Gvendor/phpstan/php-8-stubs/stubs/ext/session/session_regenerate_id.stubS���dS��P��Kvendor/phpstan/php-8-stubs/stubs/ext/session/session_register_shutdown.stub7���d7>�c�Evendor/phpstan/php-8-stubs/stubs/ext/session/session_write_close.stub1���d1�7{ۤEvendor/phpstan/php-8-stubs/stubs/ext/session/session_module_name.stubO���dO����Gvendor/phpstan/php-8-stubs/stubs/ext/session/session_cache_limiter.stubP���dPy󢌤Cvendor/phpstan/php-8-stubs/stubs/ext/session/session_save_path.stubK���dKߪ��?vendor/phpstan/php-8-stubs/stubs/ext/session/session_start.stub>���d>_��̤Kvendor/phpstan/php-8-stubs/stubs/ext/session/session_get_cookie_params.stubO���dOQZ���@vendor/phpstan/php-8-stubs/stubs/ext/session/session_decode.stub8���d8�ď�<vendor/phpstan/php-8-stubs/stubs/ext/session/session_gc.stub-���d-��a�Cvendor/phpstan/php-8-stubs/stubs/ext/session/session_create_id.stubJ���dJ�]�@vendor/phpstan/php-8-stubs/stubs/ext/session/session_encode.stub4���d4�uͤFvendor/phpstan/php-8-stubs/stubs/ext/session/session_cache_expire.stubI���dI7j��?vendor/phpstan/php-8-stubs/stubs/ext/session/session_reset.stub+���d+8���>vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_strerror.stub=���d=
q��?vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_setrlimit.stuby���dy�Oޤ=vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_getpgrp.stub1���d1�ҹZ�?vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_getgroups.stubh���dh�h}*�=vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_getppid.stub*���d*_w��?vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_getrlimit.stuba���da�i|��>vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_getlogin.stubP���dP�m֤=vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_setpgid.stubX���dX�Qѭ�=vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_getpgid.stubS���dSѸ�|�<vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_access.stubQ���dQ"Kȩ�<vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_getcwd.stub2���d2���:vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_kill.stubf���dfj����<vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_setgid.stub7���d7n�ޤ;vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_uname.stubN���dN����=vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_ctermid.stubG���dG*�F�Dvendor/phpstan/php-8-stubs/stubs/ext/posix/posix_get_last_error.stub8���d8�_"�<vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_setsid.stub<���d<`�/�>vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_getgrnam.stubV���dV���<vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_getsid.stubX���dX<ϟ�>vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_getpwuid.stubV���dV$8�i�;vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_times.stubG���dG�!�<vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_getpid.stub)���d)�<�Q�<vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_isatty.stubf���df��
��;vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_mknod.stub~���d~P�%�<vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_mkfifo.stub_���d_��贤<vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_setuid.stub6���d6PGŃ�=vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_ttyname.stubv���dv���>vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_getgrgid.stubW���dW�
�n�<vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_getuid.stub)���d)[�cb�;vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_errno.stubK���dK�,��<vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_getgid.stub0���d0R�T��>vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_getpwnam.stubZ���dZ���=vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_getegid.stub*���d*�nj��=vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_geteuid.stub*���d*\@�o�=vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_setegid.stubL���dL���@vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_initgroups.stubd���ddg��=vendor/phpstan/php-8-stubs/stubs/ext/posix/posix_seteuid.stubK���dK1�;S�=vendor/phpstan/php-8-stubs/stubs/ext/calendar/juliantojd.stubF���dF'�ڤ=vendor/phpstan/php-8-stubs/stubs/ext/calendar/frenchtojd.stubF���dF>��3�Dvendor/phpstan/php-8-stubs/stubs/ext/calendar/cal_days_in_month.stubt���dt�,Ĥ>vendor/phpstan/php-8-stubs/stubs/ext/calendar/cal_from_jd.stub_���d_�
�;vendor/phpstan/php-8-stubs/stubs/ext/calendar/jdtounix.stub4���d4KՄ�=vendor/phpstan/php-8-stubs/stubs/ext/calendar/jdtojewish.stub_���d_�E8�=vendor/phpstan/php-8-stubs/stubs/ext/calendar/jdtofrench.stub9���d9���>vendor/phpstan/php-8-stubs/stubs/ext/calendar/easter_date.stubY���dYv7NM�@vendor/phpstan/php-8-stubs/stubs/ext/calendar/gregoriantojd.stubI���dIVrO�>vendor/phpstan/php-8-stubs/stubs/ext/calendar/jdmonthname.stubE���dE�z�x�@vendor/phpstan/php-8-stubs/stubs/ext/calendar/jdtogregorian.stub<���d<���=vendor/phpstan/php-8-stubs/stubs/ext/calendar/jdtojulian.stub9���d9�f
��>vendor/phpstan/php-8-stubs/stubs/ext/calendar/jddayofweek.stubY���dY�]�<vendor/phpstan/php-8-stubs/stubs/ext/calendar/cal_to_jd.stubT���dT�f٤;vendor/phpstan/php-8-stubs/stubs/ext/calendar/unixtojd.stubA���dA�1Ϥ=vendor/phpstan/php-8-stubs/stubs/ext/calendar/jewishtojd.stubF���dF���W�>vendor/phpstan/php-8-stubs/stubs/ext/calendar/easter_days.stubY���dY�ǒԤ;vendor/phpstan/php-8-stubs/stubs/ext/calendar/cal_info.stubP���dPF�WѤ5vendor/phpstan/php-8-stubs/stubs/ext/shmop/Shmop.stub?���d?�f+�;vendor/phpstan/php-8-stubs/stubs/ext/shmop/shmop_write.stubP���dP_�Q�<vendor/phpstan/php-8-stubs/stubs/ext/shmop/shmop_delete.stub7���d7��s��:vendor/phpstan/php-8-stubs/stubs/ext/shmop/shmop_read.stubO���dO��UE�;vendor/phpstan/php-8-stubs/stubs/ext/shmop/shmop_close.stubI���dI�@���:vendor/phpstan/php-8-stubs/stubs/ext/shmop/shmop_open.stubc���dc�c��:vendor/phpstan/php-8-stubs/stubs/ext/shmop/shmop_size.stub4���d4V�d�;vendor/phpstan/php-8-stubs/stubs/ext/gettext/dcgettext.stubW���dW��:vendor/phpstan/php-8-stubs/stubs/ext/gettext/ngettext.stubi���divBL��@vendor/phpstan/php-8-stubs/stubs/ext/gettext/bindtextdomain.stubV���dV@�۽�:vendor/phpstan/php-8-stubs/stubs/ext/gettext/dgettext.stubG���dG��-�<vendor/phpstan/php-8-stubs/stubs/ext/gettext/dcngettext.stub����d���� �Ivendor/phpstan/php-8-stubs/stubs/ext/gettext/bind_textdomain_codeset.stub����d�r�9vendor/phpstan/php-8-stubs/stubs/ext/gettext/gettext.stub6���d62¹%�;vendor/phpstan/php-8-stubs/stubs/ext/gettext/dngettext.stub����d����3vendor/phpstan/php-8-stubs/stubs/ext/gettext/_.stubF���dFV��<vendor/phpstan/php-8-stubs/stubs/ext/gettext/textdomain.stub[���d[g{�ˤ[vendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_scalarmult_ristretto255_base.stubd���dd���[vendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_core_ristretto255_scalar_sub.stubo���doM{-A�evendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_pwhash_scryptsalsa208sha256_str_verify.stubp���dp-;�B�Evendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_stream.stub[���d[_��j�bvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_core_ristretto255_scalar_complement.stubk���dk��щ�gvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_secretstream_xchacha20poly1305_init_push.stub`���d`�b�Uvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_kx_client_session_keys.stubn���dnPԤMvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_sign_secretkey.stubL���dL�~hc�Zvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_aead_aes256gcm_is_available.stubi���di<${�[vendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_box_publickey_from_secretkey.stub\���d\(�[�^vendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_core_ristretto255_scalar_negate.stubg���dgju�*�^vendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_pwhash_scryptsalsa208sha256_str.stub{���d{�s s�Bvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_base642bin.stub]���d]5e�c�Vvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_scalarmult_ristretto255.stub����d��U�@vendor/phpstan/php-8-stubs/stubs/ext/sodium/SodiumException.stub4���d4���\�Vvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_pwhash_str_needs_rehash.stub����d��l��cvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_secretstream_xchacha20poly1305_rekey.stub^���d^��d�;vendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_pad.stubI���dI����Lvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_stream_keygen.stub;���d;��H�Ovendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_stream_xchacha20.stub����d�.f��Nvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_scalarmult_base.stub����d��bز�Kvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_sign_keypair.stub:���d:�`P~�Tvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_core_ristretto255_sub.stubh���dh ��դOvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_generichash_init.stub}���d}�<��Lvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_box_publickey.stubK���dK�X�&�Bvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_bin2base64.stubn���dn 4@�\vendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_aead_chacha20poly1305_encrypt.stub����d�W�\>�Lvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_box_seal_open.stube���de����Ovendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_shorthash_keygen.stub>���d>�]Ovendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_box_seed_keypair.stubJ���dJ��ٵ�gvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_secretstream_xchacha20poly1305_init_pull.stubq���dq�(-�Bvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_box.stuba���dat�Hvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_sign_open.stubg���dg�D��;vendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_add.stubI���dI��Mvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_secretbox_open.stubp���dp"b|�avendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_aead_chacha20poly1305_ietf_encrypt.stub����d�&( J�Jvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_auth_verify.stub`���d`7f��Qvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_generichash_keygen.stub@���d@�CL�Pvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_sign_seed_keypair.stubK���dK>N���Evendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_pwhash.stub����d�����Lvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_box_secretkey.stubK���dK��7��Gvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_box_seal.stubY���dY�-[�^vendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_core_ristretto255_scalar_reduce.stubg���dg <�ܤRvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_kdf_derive_from_key.stub����d�V��u�`vendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_aead_chacha20poly1305_ietf_keygen.stubO���dO�V���Gvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_box_open.stubo���do�ﺝ�avendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_aead_xchacha20poly1305_ietf_keygen.stubP���dP�b�E�bvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_secretstream_xchacha20poly1305_pull.stub����d�Jo��[vendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_core_ristretto255_scalar_mul.stubo���do�4Na�\vendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_aead_chacha20poly1305_decrypt.stub����d�F�%s�Wvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_core_ristretto255_random.stubW���dW�9x�Vvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_stream_xchacha20_xor_ic.stub����d�)���hvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_sign_keypair_from_secretkey_and_publickey.stub}���d}�]�d�Ivendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_pwhash_str.stubf���df�bi�Cvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_auth.stubU���dU�T��Svendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_sign_verify_detached.stubv���dv��H�dvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_secretstream_xchacha20poly1305_keygen.stub����d������Vvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_stream_xchacha20_keygen.stubV���dV�&�Ĥavendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_aead_chacha20poly1305_ietf_decrypt.stub����d�-�F6�Lvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_sign_detached.stub^���d^;Ϥ=vendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_unpad.stubK���dK$�\��>vendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_memcmp.stubJ���dJ~hp��Pvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_pwhash_str_verify.stub[���d[0]:�Qvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_generichash_update.stub����d��^w��Kvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_kx_publickey.stubJ���dJ�/|�Nvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_kx_seed_keypair.stubI���dI�6;ݤ[vendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_core_ristretto255_scalar_add.stubo���do����?vendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_compare.stubK���dKHF<1�bvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_secretstream_xchacha20poly1305_push.stub����d��v૤?vendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_memzero.stub;���d;��ô�Tvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_aead_aes256gcm_keygen.stubC���dC��m̤[vendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_aead_chacha20poly1305_keygen.stubJ���dJ.���Ivendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_scalarmult.stubS���dS�M
��Jvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_auth_keygen.stub9���d9�^��gvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_box_keypair_from_secretkey_and_publickey.stub|���d| �\vendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_sign_ed25519_pk_to_curve25519.stub]���d]��äJvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_generichash.stub����d����x�\vendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_sign_ed25519_sk_to_curve25519.stub]���d]��դHvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_secretbox.stubb���db�k�Ivendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_kx_keypair.stub8���d8�5��^vendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_core_ristretto255_scalar_random.stub^���d^��<�^vendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_core_ristretto255_scalar_invert.stubg���dg�_�-�Jvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_box_keypair.stub9���d9��q��Zvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_core_ristretto255_from_hash.stubc���dcavI:�Uvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_aead_aes256gcm_decrypt.stub����d�J��\vendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_sign_publickey_from_secretkey.stub]���d]�����Pvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_generichash_final.stub|���d|%!��Svendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_stream_xchacha20_xor.stub~���d~��_�Zvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_pwhash_scryptsalsa208sha256.stub����d��å�?vendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_hex2bin.stubQ���dQ��y��Cvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_sign.stubU���dU8(@�Avendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_increment.stub=���d=����_vendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_core_ristretto255_is_valid_point.stubf���dfB�<]�Uvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_kx_server_session_keys.stuby���dy���Hvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_shorthash.stubZ���dZ]���Tvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_core_ristretto255_add.stub����d��_H¤?vendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_bin2hex.stub<���d<ޑѳ�Ivendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_stream_xor.stubc���dc
	�\�Mvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_sign_publickey.stubL���dL���Kvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_kx_secretkey.stubJ���dJ���s�Uvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_aead_aes256gcm_encrypt.stub����d��I7��bvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_aead_xchacha20poly1305_ietf_decrypt.stub����d���>�Ivendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_kdf_keygen.stub8���d8��8ԤOvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_secretbox_keygen.stub>���d>h6!��bvendor/phpstan/php-8-stubs/stubs/ext/sodium/sodium_crypto_aead_xchacha20poly1305_ietf_encrypt.stub����d���;�;vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_compare.stub=���d=�v�8�9vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_errno.stub����d�A��i�8vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_exop.stub����d�ю-�:vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_escape.stubd���dd�Ѥ:vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_rename.stub����d��i�:vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_dn2ufn.stub;���d;Ŕ�=vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_sasl_bind.stub#���d#��%;�Cvendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_first_attribute.stub���d�2f��@vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_parse_result.stub���d��m��8vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_bind.stub����d�a�*O�Cvendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_parse_reference.stub����d��u�Cvendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_set_rebind_proc.stub����d�x���Bvendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_get_attributes.stub=���d=
>vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_next_entry.stub���deS5�>vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_get_values.stub����d��+��<vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_bind_ext.stub\���d\&����;vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_mod_del.stub
���d
x�rD�;vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_connect.stub����d�?`���8vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_list.stubm���dm�Ĥ=vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_start_tls.stub����d�����;vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_add_ext.stub2���d2%άq�Dvendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_count_references.stub����d�;�`�?vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_get_entries.stub@���d@��	�;vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_mod_add.stub
���d
*~P��:vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_delete.stub����d�P?0��;vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_err2str.stub6���d6R"�f�@vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_exop_refresh.stub+���d+�h	<�?vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_mod_replace.stub���d���h�>vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_rename_ext.stub����d�)sg�>vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_delete_ext.stub���d��b1�9vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_error.stub����d��S��:vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_modify.stubI���dI'���?vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_mod_add_ext.stub:���d:�8ֵ�Bvendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_next_attribute.stub���d��IӤBvendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_get_values_len.stubo���do���:vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_search.stubq���dq�Z�r�?vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_exop_whoami.stub���d�]q��:vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_unbind.stub����d����.�:vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_get_dn.stub����d��_��>vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_get_option.stub3���d3���9vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_close.stub����d�����:vendor/phpstan/php-8-stubs/stubs/ext/ldap/LDAP/Result.stubs���ds�A7=�>vendor/phpstan/php-8-stubs/stubs/ext/ldap/LDAP/Connection.stubw���dw;ըѤ?vendor/phpstan/php-8-stubs/stubs/ext/ldap/LDAP/ResultEntry.stubx���dxoq�(�Cvendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_first_reference.stub���d�<�äCvendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_mod_replace_ext.stubB���dB>���>vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_explode_dn.stubg���dg',���?vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_t61_to_8859.stubZ���dZB��N�7vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_add.stub���d�g�Avendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_count_entries.stub����d�~��r�>vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_set_option.stub3���d3r�A.�?vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_free_result.stub����d�A�EȤ@vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_modify_batch.stub1���d1�J�Ԥ?vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_mod_del_ext.stub:���d:�e#�Bvendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_next_reference.stub���d�V��?vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_8859_to_t61.stubC���dC�0���?vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_exop_passwd.stub����d���.�?vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_first_entry.stub���d���0�8vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_read.stub{���d{�\��>vendor/phpstan/php-8-stubs/stubs/ext/ldap/ldap_parse_exop.stub+���d+Js�
�=vendor/phpstan/php-8-stubs/stubs/ext/random/random_bytes.stub[���d[��H̤Cvendor/phpstan/php-8-stubs/stubs/ext/random/Random/RandomError.stubn���dn�wY�>vendor/phpstan/php-8-stubs/stubs/ext/random/Random/Engine.stubi���dil�.�Bvendor/phpstan/php-8-stubs/stubs/ext/random/Random/Randomizer.stub����d�g�s;�Hvendor/phpstan/php-8-stubs/stubs/ext/random/Random/CryptoSafeEngine.stuba���da��?�Ovendor/phpstan/php-8-stubs/stubs/ext/random/Random/BrokenRandomEngineError.stub����d���i�Qvendor/phpstan/php-8-stubs/stubs/ext/random/Random/Engine/Xoshiro256StarStar.stub(���d(UC�ˤRvendor/phpstan/php-8-stubs/stubs/ext/random/Random/Engine/PcgOneseq128XslRr64.stub���d�v��Evendor/phpstan/php-8-stubs/stubs/ext/random/Random/Engine/Secure.stub���d�G�ڤFvendor/phpstan/php-8-stubs/stubs/ext/random/Random/Engine/Mt19937.stub����d�l��Gvendor/phpstan/php-8-stubs/stubs/ext/random/Random/RandomException.stubv���dva��;vendor/phpstan/php-8-stubs/stubs/ext/random/getrandmax.stubT���dT9g��8vendor/phpstan/php-8-stubs/stubs/ext/random/mt_rand.stub[���d[���9vendor/phpstan/php-8-stubs/stubs/ext/random/mt_srand.stubg���dg���^�>vendor/phpstan/php-8-stubs/stubs/ext/random/mt_getrandmax.stub;���d;cd���6vendor/phpstan/php-8-stubs/stubs/ext/random/srand.stub{���d{*t�K�:vendor/phpstan/php-8-stubs/stubs/ext/random/lcg_value.stub9���d9�H�)�;vendor/phpstan/php-8-stubs/stubs/ext/random/random_int.stubJ���dJ��N�5vendor/phpstan/php-8-stubs/stubs/ext/random/rand.stubX���dX��%�<vendor/phpstan/php-8-stubs/stubs/ext/tokenizer/PhpToken.stub	���d	hɱS�>vendor/phpstan/php-8-stubs/stubs/ext/tokenizer/token_name.stub1���d1�G_�Avendor/phpstan/php-8-stubs/stubs/ext/tokenizer/token_get_all.stubj���dj |oݤOvendor/phpstan/php-8-stubs/stubs/ext/readline/readline_completion_function.stubL���dL&ȷ��Evendor/phpstan/php-8-stubs/stubs/ext/readline/readline_redisplay.stub0���d0�MؤTvendor/phpstan/php-8-stubs/stubs/ext/readline/readline_callback_handler_install.stub����d�����Hvendor/phpstan/php-8-stubs/stubs/ext/readline/readline_read_history.stubR���dR8����Gvendor/phpstan/php-8-stubs/stubs/ext/readline/readline_on_new_line.stubJ���dJfō��Ivendor/phpstan/php-8-stubs/stubs/ext/readline/readline_write_history.stubL���dL��Gvendor/phpstan/php-8-stubs/stubs/ext/readline/readline_add_history.stub@���d@f�h9�Hvendor/phpstan/php-8-stubs/stubs/ext/readline/readline_list_history.stubd���dd2���@vendor/phpstan/php-8-stubs/stubs/ext/readline/readline_info.stub����d��*K5�Svendor/phpstan/php-8-stubs/stubs/ext/readline/readline_callback_handler_remove.stub>���d>& �դNvendor/phpstan/php-8-stubs/stubs/ext/readline/readline_callback_read_char.stub9���d9��J�Ivendor/phpstan/php-8-stubs/stubs/ext/readline/readline_clear_history.stub4���d4뀨��;vendor/phpstan/php-8-stubs/stubs/ext/readline/readline.stubf���df�zO�9vendor/phpstan/php-8-stubs/stubs/ext/hash/hash_final.stubU���dU:�Y�:vendor/phpstan/php-8-stubs/stubs/ext/hash/hash_pbkdf2.stub����d��LE�8vendor/phpstan/php-8-stubs/stubs/ext/hash/hash_hkdf.stuby���dyƉԥ�:vendor/phpstan/php-8-stubs/stubs/ext/hash/hash_update.stubL���dL�"�C�8vendor/phpstan/php-8-stubs/stubs/ext/hash/hash_file.stub	���d	
R\��:vendor/phpstan/php-8-stubs/stubs/ext/hash/hash_equals.stubR���dR:=�e�8vendor/phpstan/php-8-stubs/stubs/ext/hash/hash_hmac.stubf���dfM3��3vendor/phpstan/php-8-stubs/stubs/ext/hash/hash.stub,���d,H�i�?vendor/phpstan/php-8-stubs/stubs/ext/hash/mhash_keygen_s2k.stubl���dlj�T<�8vendor/phpstan/php-8-stubs/stubs/ext/hash/hash_copy.stubD���dD�47�Cvendor/phpstan/php-8-stubs/stubs/ext/hash/mhash_get_block_size.stubT���dTp�P+�8vendor/phpstan/php-8-stubs/stubs/ext/hash/hash_init.stub����d���U
�:vendor/phpstan/php-8-stubs/stubs/ext/hash/mhash_count.stub(���d(b����?vendor/phpstan/php-8-stubs/stubs/ext/hash/hash_update_file.stub����d�ޝ���Avendor/phpstan/php-8-stubs/stubs/ext/hash/hash_update_stream.stub~���d~�zC'�>vendor/phpstan/php-8-stubs/stubs/ext/hash/hash_hmac_algos.stubE���dE�&ܟ�4vendor/phpstan/php-8-stubs/stubs/ext/hash/mhash.stubW���dW�MDӤBvendor/phpstan/php-8-stubs/stubs/ext/hash/mhash_get_hash_name.stubB���dBM�^@�:vendor/phpstan/php-8-stubs/stubs/ext/hash/HashContext.stub����d�R#�=vendor/phpstan/php-8-stubs/stubs/ext/hash/hash_hmac_file.stubu���du�2i�9vendor/phpstan/php-8-stubs/stubs/ext/hash/hash_algos.stub@���d@����9vendor/phpstan/php-8-stubs/stubs/ext/sqlite3/SQLite3.stub�
���d�
Q��L�=vendor/phpstan/php-8-stubs/stubs/ext/sqlite3/SQLite3Stmt.stub����d���LȤ?vendor/phpstan/php-8-stubs/stubs/ext/sqlite3/SQLite3Result.stub���d�rg~�Fvendor/phpstan/php-8-stubs/stubs/ext/spl/InvalidArgumentException.stubS���dS�W��Dvendor/phpstan/php-8-stubs/stubs/ext/spl/spl_autoload_functions.stub5���d5tF�`�;vendor/phpstan/php-8-stubs/stubs/ext/spl/spl_object_id.stub8���d82v��Cvendor/phpstan/php-8-stubs/stubs/ext/spl/RecursiveTreeIterator.stub����d��ԯ�<vendor/phpstan/php-8-stubs/stubs/ext/spl/FilterIterator.stub����d������>vendor/phpstan/php-8-stubs/stubs/ext/spl/NoRewindIterator.stub����d��Km��=vendor/phpstan/php-8-stubs/stubs/ext/spl/DomainException.stubJ���dJ�|HR�Evendor/phpstan/php-8-stubs/stubs/ext/spl/spl_autoload_unregister.stubG���dG]�w�Dvendor/phpstan/php-8-stubs/stubs/ext/spl/RecursiveArrayIterator.stubX���dX���;vendor/phpstan/php-8-stubs/stubs/ext/spl/LimitIterator.stub����d�����9vendor/phpstan/php-8-stubs/stubs/ext/spl/SplObserver.stub����d��MƵ�;vendor/phpstan/php-8-stubs/stubs/ext/spl/EmptyIterator.stubj���djGځݤGvendor/phpstan/php-8-stubs/stubs/ext/spl/RecursiveIteratorIterator.stub����d�ݸ��9vendor/phpstan/php-8-stubs/stubs/ext/spl/SplFileInfo.stub���dV�g�=vendor/phpstan/php-8-stubs/stubs/ext/spl/spl_object_hash.stub=���d=�e��5vendor/phpstan/php-8-stubs/stubs/ext/spl/SplHeap.stubZ���dZRg��Bvendor/phpstan/php-8-stubs/stubs/ext/spl/OutOfBoundsException.stubQ���dQ$�"�:vendor/phpstan/php-8-stubs/stubs/ext/spl/GlobIterator.stubc���dc
����Mvendor/phpstan/php-8-stubs/stubs/ext/spl/RecursiveCallbackFilterIterator.stub	���d	:ir&�=vendor/phpstan/php-8-stubs/stubs/ext/spl/CachingIterator.stub����d�3��x�Evendor/phpstan/php-8-stubs/stubs/ext/spl/RecursiveFilterIterator.stub����d���;vendor/phpstan/php-8-stubs/stubs/ext/spl/ArrayIterator.stub����d�����>vendor/phpstan/php-8-stubs/stubs/ext/spl/class_implements.stub����d���u�8vendor/phpstan/php-8-stubs/stubs/ext/spl/SplMaxHeap.stub����d�C�0�?vendor/phpstan/php-8-stubs/stubs/ext/spl/SplTempFileObject.stub����d���hv�Hvendor/phpstan/php-8-stubs/stubs/ext/spl/RecursiveDirectoryIterator.stub����d��t6�>vendor/phpstan/php-8-stubs/stubs/ext/spl/RuntimeException.stubF���dF�G��Cvendor/phpstan/php-8-stubs/stubs/ext/spl/spl_autoload_register.stubx���dx���Ƥ9vendor/phpstan/php-8-stubs/stubs/ext/spl/spl_classes.stubA���dAwc;�6vendor/phpstan/php-8-stubs/stubs/ext/spl/SplStack.stub7���d7>���Fvendor/phpstan/php-8-stubs/stubs/ext/spl/BadFunctionCallException.stubS���dS7}ҤDvendor/phpstan/php-8-stubs/stubs/ext/spl/BadMethodCallException.stub[���d[���&�8vendor/phpstan/php-8-stubs/stubs/ext/spl/class_uses.stub����d��'�ۤ<vendor/phpstan/php-8-stubs/stubs/ext/spl/ParentIterator.stub7���d7��ml�Avendor/phpstan/php-8-stubs/stubs/ext/spl/OutOfRangeException.stubN���dN�"�8�<vendor/phpstan/php-8-stubs/stubs/ext/spl/AppendIterator.stub����d�YT���Dvendor/phpstan/php-8-stubs/stubs/ext/spl/RecursiveRegexIterator.stub����d��6�&�>vendor/phpstan/php-8-stubs/stubs/ext/spl/SplObjectStorage.stub�
���d�

v�:vendor/phpstan/php-8-stubs/stubs/ext/spl/spl_autoload.stubX���dXw�ӫ�Fvendor/phpstan/php-8-stubs/stubs/ext/spl/UnexpectedValueException.stubU���dU��h�>vendor/phpstan/php-8-stubs/stubs/ext/spl/MultipleIterator.stub����d���\9�=vendor/phpstan/php-8-stubs/stubs/ext/spl/LengthException.stubJ���dJ2��?�;vendor/phpstan/php-8-stubs/stubs/ext/spl/SplFixedArray.stub����d��݄1�>vendor/phpstan/php-8-stubs/stubs/ext/spl/SeekableIterator.stub����d��֤Avendor/phpstan/php-8-stubs/stubs/ext/spl/SplDoublyLinkedList.stubv���dvP�4Ѥ<vendor/phpstan/php-8-stubs/stubs/ext/spl/iterator_count.stub����d��A,�?vendor/phpstan/php-8-stubs/stubs/ext/spl/spl_autoload_call.stub<���d<���:�?vendor/phpstan/php-8-stubs/stubs/ext/spl/RecursiveIterator.stub���d���ۤ8vendor/phpstan/php-8-stubs/stubs/ext/spl/SplMinHeap.stub����d��]��?vendor/phpstan/php-8-stubs/stubs/ext/spl/iterator_to_array.stub����d���ͤDvendor/phpstan/php-8-stubs/stubs/ext/spl/CallbackFilterIterator.stub����d��	��6vendor/phpstan/php-8-stubs/stubs/ext/spl/SplQueue.stub����d�t�V��;vendor/phpstan/php-8-stubs/stubs/ext/spl/OuterIterator.stub����d�==�?vendor/phpstan/php-8-stubs/stubs/ext/spl/DirectoryIterator.stub"���d"t�b�<vendor/phpstan/php-8-stubs/stubs/ext/spl/RangeException.stubK���dK�7gͤ>vendor/phpstan/php-8-stubs/stubs/ext/spl/SplPriorityQueue.stub����d��ߟ_�;vendor/phpstan/php-8-stubs/stubs/ext/spl/SplFileObject.stubn���dn+���9vendor/phpstan/php-8-stubs/stubs/ext/spl/ArrayObject.stubU���dU#���>vendor/phpstan/php-8-stubs/stubs/ext/spl/InfiniteIterator.stub����d�3VH�;vendor/phpstan/php-8-stubs/stubs/ext/spl/class_parents.stub����d���Z�8vendor/phpstan/php-8-stubs/stubs/ext/spl/SplSubject.stubj���dj�r�Ϥ?vendor/phpstan/php-8-stubs/stubs/ext/spl/OverflowException.stubN���dN���Ƥ<vendor/phpstan/php-8-stubs/stubs/ext/spl/iterator_apply.stubj���dj1s\��Evendor/phpstan/php-8-stubs/stubs/ext/spl/spl_autoload_extensions.stubV���dV;�et�Fvendor/phpstan/php-8-stubs/stubs/ext/spl/RecursiveCachingIterator.stub����d���)��>vendor/phpstan/php-8-stubs/stubs/ext/spl/IteratorIterator.stub,���d,�h絤<vendor/phpstan/php-8-stubs/stubs/ext/spl/LogicException.stubc���dcU�;�;vendor/phpstan/php-8-stubs/stubs/ext/spl/RegexIterator.stubZ���dZG#��@vendor/phpstan/php-8-stubs/stubs/ext/spl/FilesystemIterator.stubE���dE�J��@vendor/phpstan/php-8-stubs/stubs/ext/spl/UnderflowException.stubO���dO��A��9vendor/phpstan/php-8-stubs/stubs/ext/dba/dba_nextkey.stubQ���dQ��'�:vendor/phpstan/php-8-stubs/stubs/ext/dba/dba_handlers.stubY���dY���¤8vendor/phpstan/php-8-stubs/stubs/ext/dba/dba_exists.stub����d�=�i[�7vendor/phpstan/php-8-stubs/stubs/ext/dba/dba_popen.stub����d��xT�6vendor/phpstan/php-8-stubs/stubs/ext/dba/dba_sync.stubF���dFcK�x�7vendor/phpstan/php-8-stubs/stubs/ext/dba/dba_fetch.stub����d�쨀2�7vendor/phpstan/php-8-stubs/stubs/ext/dba/dba_close.stubG���dG�ؘ�6vendor/phpstan/php-8-stubs/stubs/ext/dba/dba_open.stub����d�T��:vendor/phpstan/php-8-stubs/stubs/ext/dba/dba_firstkey.stubR���dR��$	�;vendor/phpstan/php-8-stubs/stubs/ext/dba/dba_key_split.stubH���dHm�j٤6vendor/phpstan/php-8-stubs/stubs/ext/dba/dba_list.stub'���d'�s���:vendor/phpstan/php-8-stubs/stubs/ext/dba/dba_optimize.stubJ���dJ���8vendor/phpstan/php-8-stubs/stubs/ext/dba/dba_delete.stub����d�FclԤ9vendor/phpstan/php-8-stubs/stubs/ext/dba/dba_replace.stub���d����8vendor/phpstan/php-8-stubs/stubs/ext/dba/dba_insert.stub���d��K�9vendor/phpstan/php-8-stubs/stubs/ext/soap/SoapClient.stubB���dB�B<�8vendor/phpstan/php-8-stubs/stubs/ext/soap/SoapParam.stubb���db�d>�6vendor/phpstan/php-8-stubs/stubs/ext/soap/SoapVar.stub����d�T�|l�9vendor/phpstan/php-8-stubs/stubs/ext/soap/SoapHeader.stub����d���V�8vendor/phpstan/php-8-stubs/stubs/ext/soap/SoapFault.stub���d`��	�9vendor/phpstan/php-8-stubs/stubs/ext/soap/SoapServer.stub����d�؅ӧ�<vendor/phpstan/php-8-stubs/stubs/ext/soap/is_soap_fault.stub8���d8f��d�Evendor/phpstan/php-8-stubs/stubs/ext/soap/use_soap_error_handler.stubi���di����:vendor/phpstan/php-8-stubs/stubs/ext/pdo/PDOException.stubZ���dZ��4�1vendor/phpstan/php-8-stubs/stubs/ext/pdo/PDO.stubW���dW~�Ҥ:vendor/phpstan/php-8-stubs/stubs/ext/pdo/PDOStatement.stub"���d"��]~�9vendor/phpstan/php-8-stubs/stubs/ext/pdo/pdo_drivers.stubA���dA��@��4vendor/phpstan/php-8-stubs/stubs/ext/pdo/PDORow.stub���dӪ!2�?vendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_sendto.stub����d�v����Avendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_strerror.stub>���d> @��Cvendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_set_option.stub����d�w�*Ӥ?vendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_setopt.stub����d���)�=vendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_bind.stubX���dX�ĝ�=vendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_read.stubj���djT璶�=vendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_recv.stub~���d~(7�>vendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_close.stub9���d9�� H�@vendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_recvmsg.stuba���da�B�d�Cvendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_get_option.stuby���dy����Qvendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_wsaprotocol_info_release.stubL���dL*�~�@vendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_connect.stub_���d_5��a�Ivendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_addrinfo_connect.stubS���dS��x�=vendor/phpstan/php-8-stubs/stubs/ext/sockets/AddressInfo.stub#���d#AA�Dvendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_getpeername.stub����d�� X�Dvendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_clear_error.stubG���dGc���Cvendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_cmsg_space.stubR���dR�k�ŤFvendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_create_listen.stubX���dX%�Ю�?vendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_accept.stubC���dC���Fvendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_addrinfo_bind.stubP���dP�8��Fvendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_export_stream.stubX���dX��hP�Avendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_shutdown.stubg���dg����Pvendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_wsaprotocol_info_import.stubT���dTwR�t�?vendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_getopt.stub����d��w���Pvendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_wsaprotocol_info_export.stubu���du��⌤Ivendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_addrinfo_explain.stubb���db�{�Ť>vendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_write.stuba���da;�I��?vendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_listen.stubL���dL1ܨ��8vendor/phpstan/php-8-stubs/stubs/ext/sockets/Socket.stub@���d@R�o�@vendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_sendmsg.stub`���d`����?vendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_select.stub����d�q�f�Avendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_recvfrom.stub����d�D_|��Cvendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_last_error.stubL���dL�A��Dvendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_create_pair.stub����d�H���?vendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_create.stubY���dYrX2�Fvendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_import_stream.stuba���dap@aa�Evendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_set_nonblock.stub@���d@�%�Dvendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_getsockname.stub����d�� ���Bvendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_set_block.stub=���d=�S��Hvendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_addrinfo_lookup.stub����d�Mk�7�=vendor/phpstan/php-8-stubs/stubs/ext/sockets/socket_send.stubd���dd�2�9vendor/phpstan/php-8-stubs/stubs/ext/curl/curl_close.stub;���d;���>vendor/phpstan/php-8-stubs/stubs/ext/curl/curl_multi_init.stub9���d9��?��Cvendor/phpstan/php-8-stubs/stubs/ext/curl/curl_multi_info_read.stub����d�m��Dvendor/phpstan/php-8-stubs/stubs/ext/curl/curl_multi_getcontent.stubI���dIu��q�9vendor/phpstan/php-8-stubs/stubs/ext/curl/curl_pause.stubw���dw�"AΤ<vendor/phpstan/php-8-stubs/stubs/ext/curl/curl_unescape.stubV���dV����<vendor/phpstan/php-8-stubs/stubs/ext/curl/curl_strerror.stub=���d=��z��@vendor/phpstan/php-8-stubs/stubs/ext/curl/curl_setopt_array.stubR���dR)�ä?vendor/phpstan/php-8-stubs/stubs/ext/curl/curl_file_create.stub���d@S��>vendor/phpstan/php-8-stubs/stubs/ext/curl/CurlMultiHandle.stub'���d'`�f`�Bvendor/phpstan/php-8-stubs/stubs/ext/curl/curl_share_strerror.stubC���dC@W��?vendor/phpstan/php-8-stubs/stubs/ext/curl/curl_share_close.stubL���dL�˯<�=vendor/phpstan/php-8-stubs/stubs/ext/curl/CURLStringFile.stub����d�'��V�>vendor/phpstan/php-8-stubs/stubs/ext/curl/curl_multi_exec.stub|���d|��X��?vendor/phpstan/php-8-stubs/stubs/ext/curl/curl_copy_handle.stubN���dN�8���;vendor/phpstan/php-8-stubs/stubs/ext/curl/curl_version.stubH���dH�h��8vendor/phpstan/php-8-stubs/stubs/ext/curl/curl_exec.stubH���dH��:vendor/phpstan/php-8-stubs/stubs/ext/curl/curl_escape.stub����d�+�dl�Gvendor/phpstan/php-8-stubs/stubs/ext/curl/curl_multi_remove_handle.stubh���dh���8vendor/phpstan/php-8-stubs/stubs/ext/curl/curl_init.stubG���dG�Jr��:vendor/phpstan/php-8-stubs/stubs/ext/curl/curl_upkeep.stub����d�k웓�9vendor/phpstan/php-8-stubs/stubs/ext/curl/curl_error.stub=���d=zLFa�7vendor/phpstan/php-8-stubs/stubs/ext/curl/CURLFile.stub���dn�7B�9vendor/phpstan/php-8-stubs/stubs/ext/curl/curl_reset.stubB���dB��~ݤ?vendor/phpstan/php-8-stubs/stubs/ext/curl/curl_multi_close.stubL���dL�Ō�;vendor/phpstan/php-8-stubs/stubs/ext/curl/curl_getinfo.stubS���dSۍ�b�:vendor/phpstan/php-8-stubs/stubs/ext/curl/curl_setopt.stubW���dWWc�>�@vendor/phpstan/php-8-stubs/stubs/ext/curl/curl_share_setopt.stubh���dhBK
��@vendor/phpstan/php-8-stubs/stubs/ext/curl/curl_multi_select.stubb���dbV�I�>vendor/phpstan/php-8-stubs/stubs/ext/curl/curl_share_init.stub9���d9k�iҤ9vendor/phpstan/php-8-stubs/stubs/ext/curl/curl_errno.stub:���d:.��Dvendor/phpstan/php-8-stubs/stubs/ext/curl/curl_multi_add_handle.stube���de�p�,�Bvendor/phpstan/php-8-stubs/stubs/ext/curl/curl_multi_strerror.stubC���dC,�с�9vendor/phpstan/php-8-stubs/stubs/ext/curl/CurlHandle.stubD���dD���?vendor/phpstan/php-8-stubs/stubs/ext/curl/curl_share_errno.stubK���dKH���?vendor/phpstan/php-8-stubs/stubs/ext/curl/curl_multi_errno.stubK���dK2��z�>vendor/phpstan/php-8-stubs/stubs/ext/curl/CurlShareHandle.stub'���d'4\4��@vendor/phpstan/php-8-stubs/stubs/ext/curl/curl_multi_setopt.stubh���dha�?ɤKvendor/phpstan/php-8-stubs/stubs/ext/opcache/opcache_get_configuration.stubU���dUǹ䄤Fvendor/phpstan/php-8-stubs/stubs/ext/opcache/opcache_compile_file.stubB���dB���[�?vendor/phpstan/php-8-stubs/stubs/ext/opcache/opcache_reset.stubM���dM懳��Jvendor/phpstan/php-8-stubs/stubs/ext/opcache/opcache_is_script_cached.stubF���dFT��פDvendor/phpstan/php-8-stubs/stubs/ext/opcache/opcache_get_status.stubj���dj���Dvendor/phpstan/php-8-stubs/stubs/ext/opcache/opcache_invalidate.stubU���dUT��Τ&vendor/nette/utils/src/StaticClass.php����d��}\�(vendor/nette/utils/src/compatibility.php���d�I8��%vendor/nette/utils/src/Translator.php����d��m֜�)vendor/nette/utils/src/HtmlStringable.phpl���dll���+vendor/nette/utils/src/Iterators/Mapper.php����d�X����4vendor/nette/utils/src/Iterators/CachingIterator.php�
���d�
�e���&vendor/nette/utils/src/SmartObject.php���d��n�%vendor/nette/utils/src/exceptions.php����d���z��(vendor/nette/utils/src/Utils/Strings.phpqQ���dqQ��Y�*vendor/nette/utils/src/Utils/ArrayHash.phpN���dN�L(I�%vendor/nette/utils/src/Utils/Json.php����d���> �+vendor/nette/utils/src/Utils/Validators.php�+���d�+�۰�+vendor/nette/utils/src/Utils/FileSystem.php� ���d� ��O��'vendor/nette/utils/src/Utils/Random.php����d������(vendor/nette/utils/src/Utils/Helpers.php�	���d�	T
+�)vendor/nette/utils/src/Utils/DateTime.php_���d_	�:�&vendor/nette/utils/src/Utils/Image.php�`���d�`�T�)vendor/nette/utils/src/Utils/Callback.php����d���%�%vendor/nette/utils/src/Utils/Html.php�Z���d�Z�D4Ϥ*vendor/nette/utils/src/Utils/Paginator.php����d�&���+vendor/nette/utils/src/Utils/Reflection.php{7���d{7����'vendor/nette/utils/src/Utils/Floats.phpm	���dm	P��ۤ,vendor/nette/utils/src/Utils/ObjectMixin.php���d�6҅�+vendor/nette/utils/src/Utils/exceptions.php����d������.vendor/nette/utils/src/Utils/ObjectHelpers.phpF���dF��,��%vendor/nette/utils/src/Utils/Type.php����d�Or�'vendor/nette/utils/src/Utils/Arrays.php�1���d�1��*vendor/nette/utils/src/Utils/ArrayList.php����d�"i�ݤvendor/nette/utils/ncs.xml����d���vendor/nette/utils/ncs.php8���d8�}���*vendor/nette/neon/src/Neon/TokenStream.php,���d,�ۤ�%vendor/nette/neon/src/Neon/Entity.php����d��[ю�&vendor/nette/neon/src/Neon/Decoder.php����d�(�4��&vendor/nette/neon/src/Neon/Encoder.php@
���d@
i�k�#vendor/nette/neon/src/Neon/Neon.phpv���dv��ˤ#vendor/nette/neon/src/Neon/Node.php!���d!�m#U�(vendor/nette/neon/src/Neon/Traverser.php
���d
d��+�$vendor/nette/neon/src/Neon/Token.php����d����8�.vendor/nette/neon/src/Neon/Node/StringNode.php%���d%o�,��.vendor/nette/neon/src/Neon/Node/EntityNode.php����d�,q���1vendor/nette/neon/src/Neon/Node/ArrayItemNode.php����d�CA�u�3vendor/nette/neon/src/Neon/Node/EntityChainNode.php����d����2vendor/nette/neon/src/Neon/Node/BlockArrayNode.php����d�,��Ѥ3vendor/nette/neon/src/Neon/Node/InlineArrayNode.php����d�}���-vendor/nette/neon/src/Neon/Node/ArrayNode.php����d�W���/vendor/nette/neon/src/Neon/Node/LiteralNode.php����d���r�$vendor/nette/neon/src/Neon/Lexer.php
���d
TU��(vendor/nette/neon/src/Neon/Exception.php7���d7��|ɤ%vendor/nette/neon/src/Neon/Parser.php����d���{A�vendor/nette/neon/bin/neon-lintK���dK��|��>vendor/nette/php-generator/src/PhpGenerator/GlobalFunction.php����d�����7vendor/nette/php-generator/src/PhpGenerator/Factory.php�3���d�3�K�2�7vendor/nette/php-generator/src/PhpGenerator/PhpFile.php����d��;�Avendor/nette/php-generator/src/PhpGenerator/PromotedParameter.php����d����:vendor/nette/php-generator/src/PhpGenerator/PsrPrinter.php����d��#�K�<vendor/nette/php-generator/src/PhpGenerator/PhpNamespace.php�$���d�$�c��7vendor/nette/php-generator/src/PhpGenerator/Helpers.phpa���da�ܤ�9vendor/nette/php-generator/src/PhpGenerator/Attribute.php_���d_&�K�9vendor/nette/php-generator/src/PhpGenerator/ClassType.phpo:���do:�� ��Cvendor/nette/php-generator/src/PhpGenerator/Traits/FunctionLike.php-���d-��x�Cvendor/nette/php-generator/src/PhpGenerator/Traits/CommentAware.php����d���C�@vendor/nette/php-generator/src/PhpGenerator/Traits/NameAware.php����d��۷]�Fvendor/nette/php-generator/src/PhpGenerator/Traits/VisibilityAware.phpE���dEv��Evendor/nette/php-generator/src/PhpGenerator/Traits/AttributeAware.php����d��,�I�7vendor/nette/php-generator/src/PhpGenerator/Literal.php	���d	k�V(�7vendor/nette/php-generator/src/PhpGenerator/Closure.php����d�{R<g�8vendor/nette/php-generator/src/PhpGenerator/TraitUse.php����d�?Y�P�8vendor/nette/php-generator/src/PhpGenerator/EnumCase.php����d��3�6vendor/nette/php-generator/src/PhpGenerator/Dumper.phpF#���dF#�]�c�8vendor/nette/php-generator/src/PhpGenerator/Property.php�
���d�
��^�9vendor/nette/php-generator/src/PhpGenerator/Extractor.php;���d;<���9vendor/nette/php-generator/src/PhpGenerator/Parameter.php+
���d+
a|���:vendor/nette/php-generator/src/PhpGenerator/PhpLiteral.php����d��9��6vendor/nette/php-generator/src/PhpGenerator/Method.php����d�@Q'F�7vendor/nette/php-generator/src/PhpGenerator/Printer.phpS4���dS4���b�4vendor/nette/php-generator/src/PhpGenerator/Type.php����d�W��8vendor/nette/php-generator/src/PhpGenerator/Constant.php����d�в���@vendor/nette/bootstrap/src/Bootstrap/Extensions/PhpExtension.phpQ���dQv���Fvendor/nette/bootstrap/src/Bootstrap/Extensions/ConstantsExtension.php)���d)u��֤5vendor/nette/bootstrap/src/Bootstrap/Configurator.php,���d,*���+vendor/nette/bootstrap/src/Configurator.php����d���GĤ6vendor/nette/di/src/Bridges/DITracy/ContainerPanel.php�	���d�	J瑤Hvendor/nette/di/src/Bridges/DITracy/templates/ContainerPanel.panel.phtml����d�o˟�Fvendor/nette/di/src/Bridges/DITracy/templates/ContainerPanel.tab.phtml����d� QJ�+vendor/nette/di/src/DI/DynamicParameter.phpo���do53��(vendor/nette/di/src/DI/Config/Loader.php�
���d�
G���5vendor/nette/di/src/DI/Config/Adapters/PhpAdapter.php����d��9]�6vendor/nette/di/src/DI/Config/Adapters/NeonAdapter.php����d��3@��)vendor/nette/di/src/DI/Config/Adapter.php���d�^��)vendor/nette/di/src/DI/Config/Helpers.php����d�T���2vendor/nette/di/src/DI/Config/DefinitionSchema.php ���d W�Z�"vendor/nette/di/src/DI/Helpers.php�#���d�#I�ä5vendor/nette/di/src/DI/Extensions/InjectExtension.phpc���dc��TO�9vendor/nette/di/src/DI/Extensions/ExtensionsExtension.php���dN��<�5vendor/nette/di/src/DI/Extensions/SearchExtension.php����d�I'�2vendor/nette/di/src/DI/Extensions/PhpExtension.php0���d08���7vendor/nette/di/src/DI/Extensions/ServicesExtension.php����d��Zو�9vendor/nette/di/src/DI/Extensions/ParametersExtension.php�	���d�	�U5�8vendor/nette/di/src/DI/Extensions/ConstantsExtension.php"���d"����1vendor/nette/di/src/DI/Extensions/DIExtension.phpo���do�V�8vendor/nette/di/src/DI/Extensions/DecoratorExtension.php�	���d�	�
�$vendor/nette/di/src/DI/Container.php)���d)��dF�%vendor/nette/di/src/DI/Autowiring.phpd���dd��)l�#vendor/nette/di/src/DI/Resolver.phpzY���dzY!�6�,vendor/nette/di/src/DI/DependencyChecker.php%���d%^�-Ԥ,vendor/nette/di/src/DI/CompilerExtension.php����d��yU��,vendor/nette/di/src/DI/Attributes/Inject.php!���d!����8vendor/nette/di/src/DI/Definitions/ServiceDefinition.php���d����8vendor/nette/di/src/DI/Definitions/FactoryDefinition.php(���d(�s*�8vendor/nette/di/src/DI/Definitions/LocatorDefinition.php����d��_��0vendor/nette/di/src/DI/Definitions/Reference.php����d���d�9vendor/nette/di/src/DI/Definitions/ImportedDefinition.phph���dh�B5�9vendor/nette/di/src/DI/Definitions/AccessorDefinition.php+
���d+
x�1��1vendor/nette/di/src/DI/Definitions/Definition.php���dl#�ä0vendor/nette/di/src/DI/Definitions/Statement.php����d��cL}�#vendor/nette/di/src/DI/Compiler.php�'���d�'��S��+vendor/nette/di/src/DI/ContainerBuilder.php�+���d�+��b��'vendor/nette/di/src/DI/PhpGenerator.php����d���'�%vendor/nette/di/src/DI/exceptions.php6���d6��	z�*vendor/nette/di/src/DI/ContainerLoader.php{���d{
�֋�%vendor/nette/di/src/compatibility.php����d���&�0vendor/nette/schema/src/Schema/Elements/Base.php����d���,��1vendor/nette/schema/src/Schema/Elements/AnyOf.phpw
���dw
ޝ�5vendor/nette/schema/src/Schema/Elements/Structure.phpF���dF]�a�0vendor/nette/schema/src/Schema/Elements/Type.phpd���dd�Ф3vendor/nette/schema/src/Schema/DynamicParameter.php����d����'�*vendor/nette/schema/src/Schema/Message.php-���d-8 ��*vendor/nette/schema/src/Schema/Helpers.php���d�]X��)vendor/nette/schema/src/Schema/Expect.php����d�*���6vendor/nette/schema/src/Schema/ValidationException.php����d��5Ѥ,vendor/nette/schema/src/Schema/Processor.php
	���d
	jR��)vendor/nette/schema/src/Schema/Schema.phpy���dy赇1�*vendor/nette/schema/src/Schema/Context.php���ds�c!�(vendor/nette/finder/src/Utils/Finder.php�*���d�*�eWp�9vendor/nette/robot-loader/src/RobotLoader/RobotLoader.php�@���d�@W�K��/vendor/fidry/cpu-core-counter/src/Diagnoser.php{���d{�?"e�>vendor/fidry/cpu-core-counter/src/Finder/_NProcessorFinder.php����d��ư�:vendor/fidry/cpu-core-counter/src/Finder/CpuCoreFinder.php���d�a�h�>vendor/fidry/cpu-core-counter/src/Finder/WmicLogicalFinder.php����d�Z�8�;vendor/fidry/cpu-core-counter/src/Finder/FinderRegistry.phpe���de��Qb�@vendor/fidry/cpu-core-counter/src/Finder/ProcOpenBasedFinder.php	���d	��&�=vendor/fidry/cpu-core-counter/src/Finder/HwPhysicalFinder.phpz���dza����:vendor/fidry/cpu-core-counter/src/Finder/CpuInfoFinder.php����d�*o���8vendor/fidry/cpu-core-counter/src/Finder/NProcFinder.php&���d&㱕M�@vendor/fidry/cpu-core-counter/src/Finder/LscpuPhysicalFinder.phpx���dxz�"�?vendor/fidry/cpu-core-counter/src/Finder/WmicPhysicalFinder.php����d�3t���<vendor/fidry/cpu-core-counter/src/Finder/HwLogicalFinder.phpv���dv�E��=vendor/fidry/cpu-core-counter/src/Finder/NProcessorFinder.php����d��IY4�?vendor/fidry/cpu-core-counter/src/Finder/LscpuLogicalFinder.phpM���dMk!I��>vendor/fidry/cpu-core-counter/src/Finder/NullCpuCoreFinder.php����d�;G�q�?vendor/fidry/cpu-core-counter/src/Finder/DummyCpuCoreFinder.phpA���dAZ)��Avendor/fidry/cpu-core-counter/src/Finder/OnlyOnOSFamilyFinder.php����d�gQ�8�Avendor/fidry/cpu-core-counter/src/Finder/SkipOnOSFamilyFinder.php����d�ɋXh�=vendor/fidry/cpu-core-counter/src/NumberOfCpuCoreNotFound.php$���d$
rȤ4vendor/fidry/cpu-core-counter/src/CpuCoreCounter.phpk���dk��z|�?vendor/fidry/cpu-core-counter/src/Executor/ProcOpenExecutor.php����d�*l鍤>vendor/fidry/cpu-core-counter/src/Executor/ProcessExecutor.php����d��Ǥ.vendor/fidry/cpu-core-counter/bin/diagnose.phpl���dl��[�-vendor/fidry/cpu-core-counter/bin/execute.phpk���dk҅V�� src/Collectors/CollectedData.phpL���dL��7�"src/Collectors/RegistryFactory.php1���d1�aP?�src/Collectors/Registry.php����d�z�Uh�src/Collectors/Collector.php,���d,���4src/Internal/ContainerDynamicReturnTypeExtension.php����d�%�+Фsrc/Internal/ComposerHelper.php�
���d�
�\�1�src/Internal/BytesHelper.php����d�^�d;�src/Internal/SprintfHelper.php����d�F̎��src/Process/ProcessHelper.phpS	���dS	��]��'src/Process/ProcessCrashedException.php����d��\�(src/Process/ProcessCanceledException.php����d��$���src/Process/ProcessPromise.php
���d
��C�src/Process/CpuCoreCounter.php����d��=���src/Cache/Cache.phpp���dp7J�src/Cache/FileCacheStorage.php�
���d�
�e4R�src/Cache/CacheStorage.php0���d0���� src/Cache/MemoryCacheStorage.phpI���dI2���src/Cache/CacheItem.php2���d2(@Ȥsrc/Type/LateResolvableType.php����d��1��0src/Type/StaticMethodTypeSpecifyingExtension.phpG���dGz��;�src/Type/VoidType.php����d���gҤsrc/Type/TypeCombinator.php%����d%��HA�src/Type/VerbosityLevel.php����d��tO�4src/Type/OperatorTypeSpecifyingExtensionRegistry.php���dPf.�src/Type/IterableType.php�9���d�9�FC�src/Type/CallableType.phpr?���dr?�)G#�src/Type/SubtractableType.php����d�����src/Type/ObjectType.php;����d;��\���-src/Type/DynamicMethodReturnTypeExtension.php����d�C�$�&src/Type/SimultaneousTypeTraverser.phpz���dz�on��src/Type/CallableTypeHelper.php�
���d�
�����src/Type/ConstantTypeHelper.phpS	���dS	��m�(src/Type/Constant/ConstantStringType.php�>���d�>�1=�2src/Type/Constant/ConstantScalarToBooleanTrait.php���d&���0src/Type/Constant/ConstantArrayTypeAndMethod.php����d���u\�)src/Type/Constant/ConstantBooleanType.php�
���d�
��Ѵ�'src/Type/Constant/ConstantArrayType.php�����d�����l�+src/Type/Constant/OversizedArrayBuilder.php����d���[��)src/Type/Constant/ConstantIntegerType.php����d�Qޙ�.src/Type/Constant/ConstantArrayTypeBuilder.php�.���d�.��(�'src/Type/Constant/ConstantFloatType.php����d�k� v�src/Type/MixedType.phpJm���dJm�6��src/Type/TypeTraverser.php$���d$g�R�*src/Type/LazyTypeAliasResolverProvider.php1���d1)wӤ,src/Type/OperatorTypeSpecifyingExtension.php����d��
tF�src/Type/ClosureTypeFactory.php����d�"X_�src/Type/BooleanType.php���dIA�(src/Type/ParserNodeTypeToPHPStanType.php����d�hkq��src/Type/ErrorType.php����d�X�ä6src/Type/Traits/ConstantNumericComparisonTypeTrait.phpz���dzz�C1�+src/Type/Traits/LateResolvableTypeTrait.php%7���d%7]�¤2src/Type/Traits/MaybeOffsetAccessibleTypeTrait.php����d�y���*src/Type/Traits/MaybeCallableTypeTrait.phpB���dBr�ڤ(src/Type/Traits/NonCallableTypeTrait.php����d�զ�[�-src/Type/Traits/NonGeneralizableTypeTrait.php����d�f�7ݤ+src/Type/Traits/ConstantScalarTypeTrait.php�
���d�
+��(�-src/Type/Traits/UndecidedBooleanTypeTrait.php����d�ȷ��*src/Type/Traits/FalseyBooleanTypeTrait.php���d4�k1�#src/Type/Traits/ObjectTypeTrait.phpI���dIo��D�(src/Type/Traits/MaybeObjectTypeTrait.php

���d

�2{�*src/Type/Traits/NonRemoveableTypeTrait.php����d�4�i8�0src/Type/Traits/UndecidedComparisonTypeTrait.php���d��n�&src/Type/Traits/NonObjectTypeTrait.phpu
���du
B��(src/Type/Traits/NonIterableTypeTrait.php���d�.|�0src/Type/Traits/NonOffsetAccessibleTypeTrait.php	���d	ّh�%src/Type/Traits/NonArrayTypeTrait.php���dO��8src/Type/Traits/UndecidedComparisonCompoundTypeTrait.php����d����'src/Type/Traits/MaybeArrayTypeTrait.php���dQIA��'src/Type/Traits/NonGenericTypeTrait.php����d���ށ�*src/Type/Traits/MaybeIterableTypeTrait.phpI���dI��*src/Type/Traits/TruthyBooleanTypeTrait.php���d���	�src/Type/BitwiseFlagHelper.php���d��~�.src/Type/DynamicFunctionThrowTypeExtension.phpl���dl+����src/Type/TypeAliasResolver.php4���d4Л��src/Type/KeyOfType.php4
���d4
Ű�J�src/Type/StaticType.phpW���dW�(�|�.src/Type/Generic/TemplateConstantArrayType.php����d�0"���*src/Type/Generic/TemplateTypeReference.php����d�Q���1src/Type/Generic/TemplateTypeArgumentStrategy.php����d�׾>�3src/Type/Generic/TemplateObjectWithoutClassType.php����d�
����(src/Type/Generic/TemplateBooleanType.php����d�Ja%q�'src/Type/Generic/TemplateStringType.php����d�@F��.src/Type/Generic/TemplateGenericObjectType.php����d�n��&src/Type/Generic/TemplateFloatType.php����d��6<��(src/Type/Generic/TemplateTypeFactory.php����d�:�g�+src/Type/Generic/GenericClassStringType.php����d����|�0src/Type/Generic/TemplateBenevolentUnionType.php7���d7�d�&src/Type/Generic/TemplateTypeScope.php���d��Τ/src/Type/Generic/TemplateConstantStringType.php���d�]Z��)src/Type/Generic/TemplateTypeStrategy.php<���d<Uzܤ&src/Type/Generic/TemplateArrayType.php����d�
�4Ǥ&src/Type/Generic/TemplateUnionType.php���d�<L�(src/Type/Generic/TemplateIntegerType.php����d�t�7�)src/Type/Generic/TemplateTypeVariance.php����d���[�,src/Type/Generic/TemplateObjectShapeType.php(���d(_��Ƥ0src/Type/Generic/TemplateConstantIntegerType.php���dx��]�$src/Type/Generic/TemplateTypeMap.php����d��v�Ǥ&src/Type/Generic/TemplateTypeTrait.php�(���d�(:DZ=�'src/Type/Generic/TemplateTypeHelper.phpG���dG���,src/Type/Generic/TemplateStrictMixedType.phpb���db�z���-src/Type/Generic/TemplateIntersectionType.php;���d;�z;�!src/Type/Generic/TemplateType.php.���d.���'src/Type/Generic/TemplateObjectType.php����d��O��&src/Type/Generic/GenericObjectType.php�-���d�-��2src/Type/Generic/TemplateTypeParameterStrategy.phpz���dz�CR0�&src/Type/Generic/TemplateMixedType.php����d�bam�&src/Type/Generic/TemplateKeyOfType.php����d�f9w6�(src/Type/ConditionalTypeForParameter.php����d��H�¤-src/Type/Accessory/AccessoryArrayListType.phpH*���dH*��Z4�1src/Type/Accessory/AccessoryLiteralStringType.php1���d1�*N�2src/Type/Accessory/AccessoryNonFalsyStringType.php9���d9�|��$src/Type/Accessory/HasMethodType.php����d�u�$src/Type/Accessory/HasOffsetType.phpP$���dP$�9�I�(src/Type/Accessory/NonEmptyArrayType.php�&���d�&��{Z�$src/Type/Accessory/AccessoryType.php����d�;ʠ�)src/Type/Accessory/OversizedArrayType.php�$���d�$�o��&src/Type/Accessory/HasPropertyType.php4���d4�&G�)src/Type/Accessory/HasOffsetValueType.phpP-���dP-��q�2src/Type/Accessory/AccessoryNonEmptyStringType.php� ���d� _���1src/Type/Accessory/AccessoryNumericStringType.php4 ���d4 HY'0�src/Type/NullType.php2%���d2% I��src/Type/OffsetAccessType.php����d��'src/Type/CircularTypeAliasErrorType.php����d�[}���"src/Type/JustNullableTypeTrait.phpr���dr�Hh��src/Type/ConstantScalarType.php����d�)Y�src/Type/CompoundType.phpu���du�令8src/Type/StringAlwaysAcceptingObjectWithToStringType.php*���d*x��$src/Type/Enum/EnumCaseObjectType.phpR���dR��x٤src/Type/StringType.php9���d9���k�,src/Type/DynamicMethodThrowTypeExtension.phpg���dg�ޭ^�src/Type/TypehintHelper.php�$���d�$���,src/Type/DirectTypeAliasResolverProvider.php���d쎛��src/Type/RecursionGuard.php����d��ZE+�src/Type/IntegerType.php����d���SK�1src/Type/CircularTypeAliasDefinitionException.php����d�Z@+��'src/Type/Helper/GetTemplateTypeType.php�
���d�
?��	�/src/Type/DynamicFunctionReturnTypeExtension.php~���d~����3src/Type/DynamicStaticMethodReturnTypeExtension.php����d���CѤsrc/Type/TypeAlias.php����d���,פsrc/Type/IntegerRangeType.phpbP���dbPݾ��src/Type/UnionType.phpw����dw�r���*src/Type/MethodTypeSpecifyingExtension.php'���d'T\0e�src/Type/ResourceType.php2���d2�g���#src/Type/ObjectWithoutClassType.phpV���dV�L/�src/Type/StaticTypeFactory.php����d�R�TҤ,src/Type/FunctionTypeSpecifyingExtension.php���dg\�P�2src/Type/DynamicStaticMethodThrowTypeExtension.php����d����'src/Type/NonexistentParentClassType.php����d�Ӡ�¤src/Type/ObjectShapeType.php�E���d�E뜫	�src/Type/StrictMixedType.php�*���d�*E��#�src/Type/ClosureType.phpzF���dzF]�o��$src/Type/UsefulTypeAliasResolver.php
���d
��/�src/Type/UnionTypeHelper.php&���d&}@O�src/Type/ConditionalType.php����d���!�(src/Type/GenericTypeVariableResolver.php����d��	h�src/Type/FileTypeMapper.php�a���d�a�U�src/Type/IntersectionType.php����d��t��src/Type/ClassStringType.php�	���d�	��Ťsrc/Type/NeverType.php�0���d�0m�src/Type/TypeWithClassName.php\���d\'��ܤsrc/Type/ConstantType.php|���d|��>G�src/Type/Type.php�)���d�)em�src/Type/ValueOfType.php�	���d�	8�z�"src/Type/LooseComparisonHelper.php�	���d�	xRMo�*src/Type/ObjectShapePropertyReflection.php����d��ڤsrc/Type/AcceptsResult.php����d���=�� src/Type/GeneralizePrecision.php���d�+��src/Type/ArrayType.php1Z���d1Z��\b�&src/Type/TypeAliasResolverProvider.php����d���!n�/src/Type/DynamicReturnTypeExtensionRegistry.phpI���dIۑ�U�src/Type/TypeUtils.php�-���d�-�c�(� src/Type/BenevolentUnionType.php1���d1��/src/Type/Php/PowFunctionReturnTypeExtension.phpu���duw�f�Asrc/Type/Php/SimpleXMLElementClassPropertyReflectionExtension.php����d�7�T�8src/Type/Php/ArrayReverseFunctionReturnTypeExtension.php����d�+��ä3src/Type/Php/CompactFunctionReturnTypeExtension.phpF���dF��p�4src/Type/Php/ArrayNextDynamicReturnTypeExtension.phpV���dV�Y�5src/Type/Php/StrRepeatFunctionReturnTypeExtension.php~
���d~
5�X~�2src/Type/Php/StrlenFunctionReturnTypeExtension.php����d��~��4src/Type/Php/DateFormatMethodReturnTypeExtension.php!���d!W���;src/Type/Php/ClassImplementsFunctionReturnTypeExtension.phpu���du�Q=��;src/Type/Php/ReplaceFunctionsDynamicReturnTypeExtension.php^���d^'�;�3src/Type/Php/GetClassDynamicReturnTypeExtension.php���d�-��?src/Type/Php/NumberFormatFunctionDynamicReturnTypeExtension.php���d�
vQ�;src/Type/Php/NonEmptyStringFunctionsReturnTypeExtension.php����d�-��K�7src/Type/Php/IsArrayFunctionTypeSpecifyingExtension.php���dQ�ˤ0src/Type/Php/DsMapDynamicReturnTypeExtension.php'���d'���	�7src/Type/Php/ArrayColumnFunctionReturnTypeExtension.php����d����¤7src/Type/Php/DefinedConstantTypeSpecifyingExtension.php����d��'1k�'src/Type/Php/JsonThrowTypeExtension.php����d�[	�*�4src/Type/Php/FilterVarDynamicReturnTypeExtension.php����d��~Ӥ2src/Type/Php/StrPadFunctionReturnTypeExtension.phpW���dWj8�ۤ:src/Type/Php/ExplodeFunctionDynamicReturnTypeExtension.phpH
���dH
��9��1src/Type/Php/RoundFunctionReturnTypeExtension.php
���d
��v}�9src/Type/Php/GetCalledClassDynamicReturnTypeExtension.php����d�Ɖ���Asrc/Type/Php/VersionCompareFunctionDynamicReturnTypeExtension.php-���d-v��8src/Type/Php/ClosureBindToDynamicReturnTypeExtension.php#���d#���h�)src/Type/Php/IntdivThrowTypeExtension.php����d���,H�/src/Type/Php/MbFunctionsReturnTypeExtension.php���d7"��5src/Type/Php/MicrotimeFunctionReturnTypeExtension.phph���dh�+��2src/Type/Php/StrTokFunctionReturnTypeExtension.php����d�D�Ɇ�5src/Type/Php/StrtotimeFunctionReturnTypeExtension.php�	���d�	T�/��8src/Type/Php/StrvalFamilyFunctionReturnTypeExtension.php����d�;�Hɤ9src/Type/Php/ArrayFillKeysFunctionReturnTypeExtension.phpM���dM�7�?�;src/Type/Php/PathinfoFunctionDynamicReturnTypeExtension.phpz���dz��4��@src/Type/Php/MbSubstituteCharacterDynamicReturnTypeExtension.php����d���pP�5src/Type/Php/ArrayFlipFunctionReturnTypeExtension.php���d�2�6src/Type/Php/DateTimeConstructorThrowTypeExtension.phpW���dW�$w�=src/Type/Php/MbConvertEncodingFunctionReturnTypeExtension.php����d���|��@src/Type/Php/ReflectionPropertyConstructorThrowTypeExtension.php
���d
@��:src/Type/Php/DioStatDynamicFunctionReturnTypeExtension.php����d�P-PW�Asrc/Type/Php/ReflectionGetAttributesMethodReturnTypeExtension.php���dށ�,�1src/Type/Php/CountFunctionReturnTypeExtension.php����d��A��;src/Type/Php/ArraySumFunctionDynamicReturnTypeExtension.php���d�#䔤>src/Type/Php/ArrayKeyExistsFunctionTypeSpecifyingExtension.phpr���dr'�W"�Csrc/Type/Php/ReflectionClassIsSubclassOfTypeSpecifyingExtension.php����d��HQ
�:src/Type/Php/CtypeDigitFunctionTypeSpecifyingExtension.php�
���d�
Y�6src/Type/Php/ArrayChunkFunctionReturnTypeExtension.php�
���d�
�ҩ
�>src/Type/Php/SimpleXMLElementConstructorThrowTypeExtension.php<���d<��פ5src/Type/Php/ArrayFillFunctionReturnTypeExtension.php�
���d�
�ps�1src/Type/Php/RangeFunctionReturnTypeExtension.php����d��ň��2src/Type/Php/DateTimeModifyReturnTypeExtension.php���d�8h�6src/Type/Php/DateFormatFunctionReturnTypeExtension.php����d��)1��7src/Type/Php/ArrayKeyLastDynamicReturnTypeExtension.php����d�5t�k�4src/Type/Php/ArrayMapFunctionReturnTypeExtension.php���d��ۤ;src/Type/Php/ClassExistsFunctionTypeSpecifyingExtension.php����d�2%PϤ7src/Type/Php/ArraySpliceFunctionReturnTypeExtension.phpQ���dQ�p?Q�?src/Type/Php/SimpleXMLElementXpathMethodReturnTypeExtension.php����d������6src/Type/Php/BcMathStringOrNullReturnTypeExtension.php�(���d�(��T�Asrc/Type/Php/GetParentClassDynamicFunctionReturnTypeExtension.php�
���d�
i(��;src/Type/Php/ParseUrlFunctionDynamicReturnTypeExtension.php����d��%�4src/Type/Php/ArrayPopFunctionReturnTypeExtension.php����d�Y�פ7src/Type/Php/ArrayReduceFunctionReturnTypeExtension.php�	���d�	��&��1src/Type/Php/XMLReaderOpenReturnTypeExtension.php����d��X	N�>src/Type/Php/CurlGetinfoFunctionDynamicReturnTypeExtension.phpp���dpr�B�1src/Type/Php/SubstrDynamicReturnTypeExtension.php����d��ތĤ:src/Type/Php/SprintfFunctionDynamicReturnTypeExtension.php^
���d^
ø�>src/Type/Php/ClosureFromCallableDynamicReturnTypeExtension.php����d���	�8src/Type/Php/ArrayReplaceFunctionReturnTypeExtension.php����d��0�6src/Type/Php/PregFilterFunctionReturnTypeExtension.php����d�ĞR��7src/Type/Php/InArrayFunctionTypeSpecifyingExtension.php7
���d7
L�0��;src/Type/Php/IteratorToArrayFunctionReturnTypeExtension.php����d������8src/Type/Php/ArrayKeyFirstDynamicReturnTypeExtension.php����d�^B�>src/Type/Php/ArrayValuesFunctionDynamicReturnTypeExtension.phpG���dGݍ�[�2src/Type/Php/HrtimeFunctionReturnTypeExtension.php���d���5src/Type/Php/CountFunctionTypeSpecifyingExtension.php����d��}bl�<src/Type/Php/IsSubclassOfFunctionTypeSpecifyingExtension.php�	���d�	�@��Bsrc/Type/Php/TypeSpecifyingFunctionsDynamicReturnTypeExtension.phpJ���dJ!�i�6src/Type/Php/FilterInputDynamicReturnTypeExtension.php����d�2n��7src/Type/Php/TriggerErrorDynamicReturnTypeExtension.phpD���dDtL���3src/Type/Php/IsAFunctionTypeSpecifyingExtension.phpT	���dT	p��1�?src/Type/Php/StrWordCountFunctionDynamicReturnTypeExtension.php���d�1�2src/Type/Php/MinMaxFunctionReturnTypeExtension.php���d,�S�-src/Type/Php/ThrowableReturnTypeExtension.php����d�s���/src/Type/Php/StatDynamicReturnTypeExtension.phph���dh�\c��4src/Type/Php/MethodExistsTypeSpecifyingExtension.php����d�5�
��3src/Type/Php/ArrayKeyDynamicReturnTypeExtension.php;���d;g�S��9src/Type/Php/FilterVarArrayDynamicReturnTypeExtension.php	!���d	!ҿF�5src/Type/Php/DsMapDynamicMethodThrowTypeExtension.php����d��;�5src/Type/Php/ArrayRandFunctionReturnTypeExtension.phpy���dy(5b��6src/Type/Php/ArrayShiftFunctionReturnTypeExtension.php����d��ϰ�=src/Type/Php/ArrayMergeFunctionDynamicReturnTypeExtension.php#���d#9�'�9src/Type/Php/DateTimeCreateDynamicReturnTypeExtension.php(���d(%y��<src/Type/Php/ArrayKeysFunctionDynamicReturnTypeExtension.phpA���dAg��:src/Type/Php/DateIntervalConstructorThrowTypeExtension.php,���d,ی@Ҥ7src/Type/Php/ArrayCurrentDynamicReturnTypeExtension.php{���d{��湤4src/Type/Php/StrSplitFunctionReturnTypeExtension.phpZ���dZ��ξ�5src/Type/Php/StrContainingTypeSpecifyingExtension.php=
���d=
2(�4src/Type/Php/PregSplitDynamicReturnTypeExtension.php����d�n���0src/Type/Php/DateFunctionReturnTypeExtension.php����d�q���7src/Type/Php/DateIntervalDynamicReturnTypeExtension.php����d�]&G�6src/Type/Php/DefineConstantTypeSpecifyingExtension.php����d���:�6src/Type/Php/PropertyExistsTypeSpecifyingExtension.php'���d'�r�?src/Type/Php/BackedEnumFromMethodDynamicReturnTypeExtension.phpt���dtnł�6src/Type/Php/ClosureBindDynamicReturnTypeExtension.phpG���dG<�B�9src/Type/Php/DatePeriodConstructorReturnTypeExtension.php5	���d5	O��;�:src/Type/Php/DateTimeZoneConstructorThrowTypeExtension.php���deX0�0src/Type/Php/IsAFunctionTypeSpecifyingHelper.php	���d	2ζ�9src/Type/Php/ArgumentBasedFunctionReturnTypeExtension.php�	���d�	��pP�/src/Type/Php/FilterFunctionReturnTypeHelper.php�A���d�A0J��;src/Type/Php/JsonThrowOnErrorDynamicReturnTypeExtension.php����d�i�c�6src/Type/Php/AssertFunctionTypeSpecifyingExtension.php����d���
^�@src/Type/Php/ReflectionFunctionConstructorThrowTypeExtension.php���dj��>src/Type/Php/ReflectionMethodConstructorThrowTypeExtension.php����d���Ѥ1src/Type/Php/LtrimFunctionReturnTypeExtension.phpU���dU5���5src/Type/Php/RandomIntFunctionReturnTypeExtension.php�
���d�
݊$��>src/Type/Php/FunctionExistsFunctionTypeSpecifyingExtension.phpM���dM���*src/Type/Php/IniGetReturnTypeExtension.php����d��.��,src/Type/Php/CurlInitReturnTypeExtension.phpS���dS�=&��@src/Type/Php/ArrayPointerFunctionsDynamicReturnTypeExtension.php����d�&Iˤ?src/Type/Php/SimpleXMLElementAsXMLMethodReturnTypeExtension.php5���d5�dH�?src/Type/Php/GettimeofdayDynamicFunctionReturnTypeExtension.php����d�oyB�Asrc/Type/Php/ArrayFilterFunctionReturnTypeReturnTypeExtension.php�*���d�*&Qh��=src/Type/Php/ReflectionClassConstructorThrowTypeExtension.php ���d �Ȃ�?src/Type/Php/Base64DecodeDynamicFunctionReturnTypeExtension.php"���d"9�:src/Type/Php/IsIterableFunctionTypeSpecifyingExtension.php:���d:)��z�3src/Type/Php/ImplodeFunctionReturnTypeExtension.phpt���dt��^�8src/Type/Php/ArrayCombineFunctionReturnTypeExtension.php����d�]=�"�;src/Type/Php/ArraySearchFunctionTypeSpecifyingExtension.phpT���dT*����3src/Type/Php/DateTimeDynamicReturnTypeExtension.php5���d5�-Gޤ4src/Type/Php/StrCaseFunctionsReturnTypeExtension.php����d��oyʤ=src/Type/Php/ArrayIntersectKeyFunctionReturnTypeExtension.phpG���dG�4�b�4src/Type/Php/MbFunctionsReturnTypeExtensionTrait.php����d�"O�<�>src/Type/Php/ArraySearchFunctionDynamicReturnTypeExtension.phpj���dj$�=�6src/Type/Php/ArraySliceFunctionReturnTypeExtension.phpI���dI�is]�4src/Type/Php/MbStrlenFunctionReturnTypeExtension.php���d'}At�9src/Type/Php/SscanfFunctionDynamicReturnTypeExtension.phpa
���da
�Uh��1src/Type/Php/HashFunctionsReturnTypeExtension.php����d��q7ʤ:src/Type/Php/IsCallableFunctionTypeSpecifyingExtension.php
���d
HY���src/Type/ThisType.phpX���dX�lw��src/Type/FloatType.php����d�����src/Type/ExponentiateHelper.phpE
���dE
���8�)src/NodeVisitor/StatementOrderVisitor.php����d����8src/PhpDoc/TypeNodeResolverExtensionRegistryProvider.php����d�p:(��src/PhpDoc/StubValidator.phpX(���dX(��E�$src/PhpDoc/ConstExprNodeResolver.php����d�o����0src/PhpDoc/TypeNodeResolverExtensionRegistry.php����d�u��'src/PhpDoc/StubSourceLocatorFactory.php����d�2�d@�'src/PhpDoc/DefaultStubFilesProvider.phpF���dFf���src/PhpDoc/TypeNodeResolver.php|����d|���u#�!src/PhpDoc/TypeStringResolver.php����d���ä!src/PhpDoc/StubPhpDocProvider.phpB1���dB1K����src/PhpDoc/PhpDocBlock.php�,���d�,��C��!src/PhpDoc/StubFilesExtension.phpt���dt�R���<src/PhpDoc/LazyTypeNodeResolverExtensionRegistryProvider.php����d�Y_���%src/PhpDoc/ConstExprParserFactory.php����d��T�5src/PhpDoc/TypeNodeResolverExtensionAwareRegistry.phpk���dk�_x�!src/PhpDoc/PhpDocNodeResolver.php_V���d_V�1"��#src/PhpDoc/PhpDocStringResolver.php����d��6�Ȥ*src/PhpDoc/CountableStubFilesExtension.php���d��T� src/PhpDoc/StubFilesProvider.php����d���%�(src/PhpDoc/PhpDocInheritanceResolver.php����d��;�L�"src/PhpDoc/ResolvedPhpDocBlock.php�s���d�sܹtK�(src/PhpDoc/TypeNodeResolverExtension.php���d �)�>src/PhpDoc/DirectTypeNodeResolverExtensionRegistryProvider.php0���d0�?�src/PhpDoc/Tag/TypedTag.php����d��*�4�src/PhpDoc/Tag/VarTag.php���d��瘤src/PhpDoc/Tag/ReturnTag.php[���d["�=9�src/PhpDoc/Tag/MixinTag.phpZ���dZ�"�src/PhpDoc/Tag/PropertyTag.php����d�4��`�!src/PhpDoc/Tag/SelfOutTypeTag.php���dB��%src/PhpDoc/Tag/TypeAliasImportTag.php<���d<T}>�� src/PhpDoc/Tag/ImplementsTag.php_���d_��f?�%src/PhpDoc/Tag/MethodTagParameter.phpC���dC�l� src/PhpDoc/Tag/DeprecatedTag.phpY���dY�}��src/PhpDoc/Tag/MethodTag.php����d��+��%src/PhpDoc/Tag/AssertTagParameter.php����d�E6ܤsrc/PhpDoc/Tag/UsesTag.phpY���dY�C2�src/PhpDoc/Tag/ThrowsTag.php[���d[�u�~�src/PhpDoc/Tag/ParamTag.php����d�Z�٤src/PhpDoc/Tag/ParamOutTag.php���dK.mr�src/PhpDoc/Tag/ExtendsTag.php\���d\�N��src/PhpDoc/Tag/TemplateTag.phpJ���dJCrEb�src/PhpDoc/Tag/TypeAliasTag.phpb���dbV��4�src/PhpDoc/Tag/AssertTag.phpZ
���dZ
�1�-src/PhpDoc/TypeNodeResolverAwareExtension.php����d�N�,s�src/autoloadFunctions.php����d��Ѥ.src/DependencyInjection/MemoizingContainer.php���d����:src/DependencyInjection/ValidateIgnoredErrorsExtension.php����d�$�n�,src/DependencyInjection/ContainerFactory.php*���d*V�L��Osrc/DependencyInjection/Type/LazyDynamicReturnTypeExtensionRegistryProvider.phpC���dC�R�D�Psrc/DependencyInjection/Type/OperatorTypeSpecifyingExtensionRegistryProvider.php���d��s)�Bsrc/DependencyInjection/Type/DynamicThrowTypeExtensionProvider.php����d��p�դTsrc/DependencyInjection/Type/LazyOperatorTypeSpecifyingExtensionRegistryProvider.php9���d9��ۭ�Ksrc/DependencyInjection/Type/DynamicReturnTypeExtensionRegistryProvider.php���d;r��Fsrc/DependencyInjection/Type/LazyDynamicThrowTypeExtensionProvider.phpr���drӒ'�.src/DependencyInjection/BleedingEdgeToggle.php����d�;���6src/DependencyInjection/ParameterNotFoundException.phpJ���dJ�ӕ`�%src/DependencyInjection/Container.php����d��qm5�*src/DependencyInjection/RulesExtension.php����d���Ͳ�0src/DependencyInjection/Nette/NetteContainer.php:	���d:	�¶�)src/DependencyInjection/LoaderFactory.php���d:bC��6src/DependencyInjection/DerivativeContainerFactory.phpF	���dF	��I�5src/DependencyInjection/ParametersSchemaExtension.phpd���dd!f!Ť4src/DependencyInjection/ConditionalTagsExtension.phpI
���dI
7��'src/DependencyInjection/NeonAdapter.php���dJi+�&src/DependencyInjection/NeonLoader.php����d��b��Osrc/DependencyInjection/Reflection/ClassReflectionExtensionRegistryProvider.php
���d
�r��Usrc/DependencyInjection/Reflection/DirectClassReflectionExtensionRegistryProvider.phpM
���dM
(��Ssrc/DependencyInjection/Reflection/LazyClassReflectionExtensionRegistryProvider.php���d���m�@src/DependencyInjection/InvalidIgnoredErrorPatternsException.php)���d)���Ť;src/DependencyInjection/DuplicateIncludedFilesException.phpj���djx�A��(src/DependencyInjection/Configurator.php����d���?�src/Dependency/ExportedNode.phpa���daV�N�#src/Dependency/RootExportedNode.php����d�]65�&src/Dependency/ExportedNodeFetcher.php���d���&src/Dependency/ExportedNodeVisitor.php���d�� e�5src/Dependency/ExportedNode/ExportedInterfaceNode.php����d�v���6src/Dependency/ExportedNode/ExportedPropertiesNode.phpG���dGi�i��0src/Dependency/ExportedNode/ExportedEnumNode.php����d����v�1src/Dependency/ExportedNode/ExportedClassNode.phpF���dF��,��4src/Dependency/ExportedNode/ExportedEnumCaseNode.php����d��_�5�5src/Dependency/ExportedNode/ExportedAttributeNode.php���d��7e�:src/Dependency/ExportedNode/ExportedClassConstantsNode.php����d�(RT��2src/Dependency/ExportedNode/ExportedPhpDocNode.php'���d'l��2src/Dependency/ExportedNode/ExportedMethodNode.php����d���I�5src/Dependency/ExportedNode/ExportedParameterNode.php����d����ߤ4src/Dependency/ExportedNode/ExportedFunctionNode.php����d����Ƥ9src/Dependency/ExportedNode/ExportedClassConstantNode.phpO	���dO	ށxB�1src/Dependency/ExportedNode/ExportedTraitNode.php���d/A�~�:src/Dependency/ExportedNode/ExportedTraitUseAdaptation.phpL
���dL
���S�%src/Dependency/DependencyResolver.phpz���dzm�U�'src/Dependency/ExportedNodeResolver.php�2���d�2�-��#src/Dependency/NodeDependencies.php���dn��ߤsrc/Command/AnalysisResult.phpz���dz �Ǥ%src/Command/Symfony/SymfonyOutput.phpZ���dZٜ��$src/Command/Symfony/SymfonyStyle.php����d�E �^�src/Command/Output.php����d��ؑ��'src/Command/ClearResultCacheCommand.php<���d<=@���7src/Command/ErrorFormatter/CheckstyleErrorFormatter.php����d�\'�ޤ3src/Command/ErrorFormatter/GithubErrorFormatter.phpp
���dp
��2src/Command/ErrorFormatter/TableErrorFormatter.php>���d>6;3�1src/Command/ErrorFormatter/JsonErrorFormatter.phpL���dL_��g�5src/Command/ErrorFormatter/TeamcityErrorFormatter.php���d����2src/Command/ErrorFormatter/JunitErrorFormatter.phpA���dA�(���3src/Command/ErrorFormatter/GitlabErrorFormatter.php=���d=�^�9src/Command/ErrorFormatter/BaselineNeonErrorFormatter.php���d��:��8src/Command/ErrorFormatter/BaselinePhpErrorFormatter.php�	���d�	B8FԤ7src/Command/ErrorFormatter/CiDetectedErrorFormatter.php����d��8�-src/Command/ErrorFormatter/ErrorFormatter.php����d��s�̤0src/Command/ErrorFormatter/RawErrorFormatter.php@���d@u�Y��src/Command/fixer-phar.pubkey ���d u䪤+src/Command/IgnoredRegexValidatorResult.php����d��%qZ�%src/Command/DumpParametersCommand.phpi
���di
�#�|�src/Command/InceptionResult.phpS���dS�l9פsrc/Command/AnalyserRunner.phpa	���da	�Xql�%src/Command/IgnoredRegexValidator.php4���d4盱��"src/Command/FixerWorkerCommand.php����d���6��src/Command/OutputStyle.php����d��>g�"src/Command/AnalyseApplication.phpR*���dR*�z�C�src/Command/AnalyseCommand.php)R���d)Rv5�x�%src/Command/FixerProcessException.php~���d~E-&{�src/Command/WorkerCommand.php�"���d�"�&�Ф/src/Command/InceptionNotSuccessfulException.php����d��VC��"src/Command/ErrorsConsoleStyle.php	���d	I�LV�src/Command/CommandHelper.phpZc���dZc	y�� src/Command/FixerApplication.php�H���d�H�N��src/AnalysedCodeException.php����d�iqE^�src/dumpType.php����d��3W�,src/Analyser/ConditionalExpressionHolder.php����d�B�n*�src/Analyser/NameScope.phpF���dF�b`� src/Analyser/StatementResult.php}���d}���src/Analyser/IgnoredError.php5	���d5	+�1
�src/Analyser/ScopeContext.php&���d&����src/Analyser/Scope.phpW
���dW

��#src/Analyser/IgnoredErrorHelper.php����d����y�src/Analyser/Analyser.php���d�B��src/Analyser/TypeSpecifier.phpz���dz��p��%src/Analyser/InternalScopeFactory.php����d�J�
4�#src/Analyser/StatementExitPoint.php����d�3�ʤ)src/Analyser/IgnoredErrorHelperResult.php�&���d�&����src/Analyser/MutatingScope.php�����d��K���"src/Analyser/ExpressionContext.php����d��u���$src/Analyser/ArgumentsNormalizer.php����d����'src/Analyser/NullsafeOperatorHelper.php�
���d�
��C�5src/Analyser/ResultCache/ResultCacheProcessResult.php����d�/�Ĥ(src/Analyser/ResultCache/ResultCache.php�
���d�
3�ܤ6src/Analyser/ResultCache/ResultCacheManagerFactory.php����d�C���/src/Analyser/ResultCache/ResultCacheClearer.phpE���dE��B�/src/Analyser/ResultCache/ResultCacheManager.php�}���d�}H�b�src/Analyser/AnalyserResult.php����d��2�,src/Analyser/EnsuredNonNullabilityResult.phpc���dc�3�)src/Analyser/LazyInternalScopeFactory.php����d�l�դ%src/Analyser/TypeSpecifierContext.php����d�V��1�%src/Analyser/RuleErrorTransformer.php	���d	�A1	�"src/Analyser/NodeScopeResolver.php�8���d�8�?GM�,src/Analyser/TypeSpecifierAwareExtension.php����d����Q� src/Analyser/OutOfClassScope.php����d���ǡ�#src/Analyser/FileAnalyserResult.php����d�O:��!src/Analyser/ExpressionResult.phpC	���dC	�2�ޤ6src/Analyser/EnsuredNonNullabilityResultExpression.php����d��ՋU�+src/Analyser/DirectInternalScopeFactory.php����d�g{���src/Analyser/ThrowPoint.php����d�Y�ߤ(src/Analyser/ConstantResolverFactory.php}���d}�\���src/Analyser/Error.php|���d|�{�a�%src/Analyser/ExpressionTypeHolder.php����d����src/Analyser/SpecifiedTypes.php����d�E2���src/Analyser/ScopeFactory.php���dU��src/Analyser/FileAnalyser.phpj:���dj:���Ѥ!src/Analyser/StatementContext.php����d����c�!src/Analyser/ConstantResolver.phpx(���dx(��1�%src/Analyser/TypeSpecifierFactory.phpT���dT�4sL�+src/Analyser/UndefinedVariableException.phpG���dG�ˤ&src/Parser/ArrowFunctionArgVisitor.php����d��]Ć�%src/Parser/ParentStmtTypesVisitor.phpn���dn	&ܤ"src/Parser/ArrayWalkArgVisitor.php����d�"��?� src/Parser/ClosureArgVisitor.phpr���dr1�ˤ$src/Parser/ArrayFilterArgVisitor.php����d�v@�]�src/Parser/SimpleParser.php����d���z �src/Parser/CachedParser.php�
���d�
U��l�src/Parser/CleaningParser.php����d��7��*src/Parser/FunctionCallStatementFinder.php����d���+�+src/Parser/NewAssignedToPropertyVisitor.phpi���diwL�#src/Parser/LastConditionVisitor.php���dwdҤ4src/Parser/RemoveUnusedCodeByPhpVersionIdVisitor.php-���d-t����src/Parser/RichParser.php'
���d'
1;�u�#src/Parser/CurlSetOptArgVisitor.php����d��y���!src/Parser/PhpParserDecorator.php����d��t��"src/Parser/TryCatchTypeVisitor.php����d��K>��!src/Parser/ArrayMapArgVisitor.php����d�@Tդ-src/Parser/TypeTraverserInstanceofVisitor.php"���d"�á�src/Parser/CleaningVisitor.php}���d}.h�פ src/Parser/PathRoutingParser.php>���d>�Zj��src/Parser/LexerFactory.php����d�)�A�src/Parser/Parser.php����d��_8��$src/Parser/ParserErrorsException.php����d���src/Node/InFunctionNode.php����d����"�src/Node/LiteralArrayNode.phpp���dp�%]��"src/Node/FinallyExitPointsNode.php���d6\�G�+src/Node/CatchWithUnthrownExceptionNode.php(���d(\�c��src/Node/ExecutionEndNode.php���d�P�!src/Node/FunctionCallableNode.phpS���dS�	�@�src/Node/ClassMethodsNode.php����d�qg��"src/Node/Property/PropertyRead.phpd���dd��,ޤ#src/Node/Property/PropertyWrite.phpe���de6���(src/Node/Constant/ClassConstantFetch.php����d�]�N)�src/Node/InForeachNode.php���d�ǫ>�src/Node/ClassConstantsNode.php����d��^X� src/Node/InArrowFunctionNode.phpb���db�~��src/Node/InClosureNode.php4���d4��ͤ(src/Node/ClosureReturnStatementsNode.php�	���d�	3���$src/Node/ClassStatementsGatherer.php_���d_���ڤsrc/Node/ClassMethod.phpA���dAj�f�� src/Node/Printer/ExprPrinter.php����d��vIm�src/Node/Printer/Printer.php����d�;�O�)src/Node/FunctionReturnStatementsNode.phpG	���dG	4�e�src/Node/ClassPropertyNode.php'���d'��^�src/Node/InClassNode.phpM���dMlĭ��&src/Node/InstantiationCallableNode.phpX���dXjP��� src/Node/MatchExpressionNode.php"���d"Zu覤src/Node/CollectedDataNode.php����d�Jm�� src/Node/ClassPropertiesNode.php�!���d�!;��A�src/Node/BooleanAndNode.php���d�6�src/Node/MatchExpressionArm.php����d�����%src/Node/StaticMethodCallableNode.php����d����%src/Node/UnreachableStatementNode.php
���d
r9�(src/Node/Expr/GetOffsetValueTypeExpr.phpN���dNt"}X�*src/Node/Expr/OriginalPropertyTypeExpr.php����d���4��src/Node/Expr/TypeExpr.php����d����(src/Node/Expr/GetIterableKeyTypeExpr.php����d�����(src/Node/Expr/SetOffsetValueTypeExpr.php���d���٤*src/Node/Expr/GetIterableValueTypeExpr.php����d����Y�src/Node/LiteralArrayItem.php����d�\��'src/Node/MethodReturnStatementsNode.phpO	���dO	
v�S�#src/Node/BreaklessWhileLoopNode.php����d�9�Lv�src/Node/FileNode.phpB���dB,h�Ӥ%src/Node/DoWhileLoopConditionNode.phpF���dF~\�r�src/Node/InClassMethodNode.php����d��mK�,src/Node/VarTagChangedExpressionTypeNode.php����d�b$��src/Node/PropertyAssignNode.php����d��K5��src/Node/Method/MethodCall.php����d�Ed�n�(src/Node/MatchExpressionArmCondition.php���d��WW�!src/Node/ReturnStatementsNode.php����d�ť�&�src/Node/BooleanOrNode.php���d�v��#src/Node/MatchExpressionArmBody.phpG���dG�{��src/Node/ReturnStatement.php����d����src/Node/VirtualNode.php����d��@�Ϥsrc/Node/MethodCallableNode.php���ds�A��src/Parallel/Scheduler.php)���d)����src/Parallel/Process.php"���d",���!src/Parallel/ParallelAnalyser.phpN!���dN!UX*
�src/Parallel/ProcessPool.phpp���dp=���src/Parallel/Schedule.php����d�$�.src/File/ParentDirectoryRelativePathHelper.php����d��]���src/File/FileFinder.phpm���dm�=�#src/File/FileExcluderRawFactory.php����d�)f��%src/File/SimpleRelativePathHelper.php���d� src/File/FileHelper.phpU���dU�3�src/File/FileMonitorResult.php���d�갤src/File/FileWriter.php����d�@#�src/File/RelativePathHelper.php����d���+l�'src/File/CouldNotWriteFileException.php����d�I�W��&src/File/CouldNotReadFileException.php����d��~ˠ�src/File/FileFinderResult.phpT���dT8�|��$src/File/FuzzyRelativePathHelper.phpI���dIY����#src/File/NullRelativePathHelper.php����d����"src/File/PathNotFoundException.php����d���_��src/File/FileReader.php���d
�_��src/File/FileExcluder.php{���d{7Ӫ��src/File/FileMonitor.phpC	���dC	��t#� src/File/FileExcluderFactory.phpS���dS��O�%src/Reflection/EnumCaseReflection.php����d��k�3src/Reflection/ClassReflectionExtensionRegistry.php����d�^�9�7src/Reflection/MissingMethodFromReflectionException.phpp���dp�.��"src/Reflection/FunctionVariant.php����d�1'g6�*src/Reflection/ResolvedFunctionVariant.phpK���dKVg���src/Reflection/Assertions.php
���d
�܂�"src/Reflection/ClassNameHelper.php���dX~�i�%src/Reflection/ConstantReflection.php|���d|, =�Esrc/Reflection/Type/CallbackUnresolvedPropertyPrototypeReflection.php,���d,�K�t�Csrc/Reflection/Type/CallbackUnresolvedMethodPrototypeReflection.php���d��%Z�1src/Reflection/Type/UnionTypeMethodReflection.php����d���M��Msrc/Reflection/Type/IntersectionTypeUnresolvedPropertyPrototypeReflection.php�
���d�
��֤;src/Reflection/Type/UnresolvedMethodPrototypeReflection.php����d���C.�Dsrc/Reflection/Type/UnionTypeUnresolvedMethodPrototypeReflection.php�
���d�
 �S�3src/Reflection/Type/UnionTypePropertyReflection.php/���d/O]�?�8src/Reflection/Type/IntersectionTypeMethodReflection.php����d���ˤKsrc/Reflection/Type/IntersectionTypeUnresolvedMethodPrototypeReflection.php�
���d�
#�k�Gsrc/Reflection/Type/CalledOnTypeUnresolvedMethodPrototypeReflection.php���d�K�(�Fsrc/Reflection/Type/UnionTypeUnresolvedPropertyPrototypeReflection.php�
���d�
`¤Isrc/Reflection/Type/CalledOnTypeUnresolvedPropertyPrototypeReflection.php9���d9�%0��:src/Reflection/Type/IntersectionTypePropertyReflection.php-���d-#-׏�=src/Reflection/Type/UnresolvedPropertyPrototypeReflection.php����d�秗U�9src/Reflection/MissingConstantFromReflectionException.phpv���dv�^�-�-src/Reflection/ResolvedPropertyReflection.php1
���d1
�c�+src/Reflection/GlobalConstantReflection.php����d�v�Zʤ5src/Reflection/Constant/RuntimeConstantReflection.php����d�Jn���3src/Reflection/Dummy/DummyConstructorReflection.php����d�N�&��6src/Reflection/Dummy/ChangedTypePropertyReflection.php�	���d�	�6�Q�0src/Reflection/Dummy/DummyPropertyReflection.php9���d9ڂ(ʤ0src/Reflection/Dummy/DummyConstantReflection.phpo���do���c�.src/Reflection/Dummy/DummyMethodReflection.php����d�>K�4src/Reflection/Dummy/ChangedTypeMethodReflection.php���d���n�-src/Reflection/FunctionVariantWithPhpDocs.php����d��?p��>src/Reflection/Native/NativeParameterWithPhpDocsReflection.phpW
���dW
�
TV�3src/Reflection/Native/NativeParameterReflection.php_���d_8^b��2src/Reflection/Native/NativeFunctionReflection.php����d�
b�0src/Reflection/Native/NativeMethodReflection.phpr���dry9��%src/Reflection/PropertyReflection.phpW���dW<�zW�;src/Reflection/Annotations/AnnotationPropertyReflection.php����d����ԤIsrc/Reflection/Annotations/AnnotationsMethodsClassReflectionExtension.php����d�{J���Lsrc/Reflection/Annotations/AnnotationsPropertiesClassReflectionExtension.phpn���dn�a�Csrc/Reflection/Annotations/AnnotationsMethodParameterReflection.phpv���dv����9src/Reflection/Annotations/AnnotationMethodReflection.php�
���d�
����)src/Reflection/InitializerExprContext.php����d�h���$src/Reflection/NamespaceAnswerer.php����d��5�,src/Reflection/MethodPrototypeReflection.phpC	���dC	/N��0src/Reflection/ParametersAcceptorWithPhpDocs.php����d��ve�9src/Reflection/MissingPropertyFromReflectionException.phpw���dws�$֤*src/Reflection/ClassConstantReflection.php����d�#��c�+src/Reflection/ExtendedMethodReflection.phpT���dTLj�$src/Reflection/PassedByReference.php���dGɲ1�%src/Reflection/ConstructorsHelper.php�
���d�
��̤8src/Reflection/SignatureMap/Php8SignatureMapProvider.php�8���d�8�D>��2src/Reflection/SignatureMap/SignatureMapParser.php�
���d�
�M�1src/Reflection/SignatureMap/FunctionSignature.php����d��򌜤4src/Reflection/SignatureMap/SignatureMapProvider.phpz���dz�з��<src/Reflection/SignatureMap/FunctionSignatureMapProvider.php�'���d�'U��;�@src/Reflection/SignatureMap/NativeFunctionReflectionProvider.php����d�\��F�2src/Reflection/SignatureMap/ParameterSignature.php����d��h
�;src/Reflection/SignatureMap/SignatureMapProviderFactory.php����d����,src/Reflection/TrivialParametersAcceptor.php����d����2src/Reflection/AdditionalConstructorsExtension.php����d�
W<�2src/Reflection/WrappedExtendedMethodReflection.php/
���d/
$(��4src/Reflection/GenericParametersAcceptorResolver.php���d�h��#src/Reflection/MethodReflection.php����d��u�*�&src/Reflection/ParameterReflection.php����d��`}1�+src/Reflection/ResolvedMethodReflection.php����d�{)%src/Reflection/ParametersAcceptor.phpI���dI6U��Hsrc/Reflection/BetterReflection/BetterReflectionSourceLocatorFactory.phpz ���dz ��Dsrc/Reflection/BetterReflection/SourceLocator/FetchedNodesResult.php%���d%�4O��=src/Reflection/BetterReflection/SourceLocator/FetchedNode.phpC���dCŹu��@src/Reflection/BetterReflection/SourceLocator/PhpFileCleaner.php�"���d�"�t4ѤPsrc/Reflection/BetterReflection/SourceLocator/RewriteClassAliasSourceLocator.php����d�H*P�Ksrc/Reflection/BetterReflection/SourceLocator/FileReadTrapStreamWrapper.php)���d)�q|��Gsrc/Reflection/BetterReflection/SourceLocator/AutoloadSourceLocator.php�6���d�6���M�Osrc/Reflection/BetterReflection/SourceLocator/OptimizedPsrAutoloaderLocator.php4	���d4	*�?�Nsrc/Reflection/BetterReflection/SourceLocator/ReflectionClassSourceLocator.php����d�-�J�Ysrc/Reflection/BetterReflection/SourceLocator/OptimizedSingleFileSourceLocatorFactory.php���di���\src/Reflection/BetterReflection/SourceLocator/OptimizedSingleFileSourceLocatorRepository.php����d�:ɆƤQsrc/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocator.php5���d5�#�[src/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocatorRepository.php����d����c�Xsrc/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocatorFactory.php����d��"&Τ@src/Reflection/BetterReflection/SourceLocator/CachingVisitor.php����d���)W�Vsrc/Reflection/BetterReflection/SourceLocator/OptimizedPsrAutoloaderLocatorFactory.phps���dsǣ/`�Psrc/Reflection/BetterReflection/SourceLocator/AutoloadFunctionsSourceLocator.php	���d	:��7�`src/Reflection/BetterReflection/SourceLocator/ComposerJsonAndInstalledJsonSourceLocatorMaker.php�+���d�+��Rsrc/Reflection/BetterReflection/SourceLocator/PhpVersionBlacklistSourceLocator.php&���d&d��Rsrc/Reflection/BetterReflection/SourceLocator/OptimizedSingleFileSourceLocator.phpK%���dK%`��E�Msrc/Reflection/BetterReflection/SourceLocator/SkipClassAliasSourceLocator.php����d��0�ǤBsrc/Reflection/BetterReflection/SourceLocator/FileNodesFetcher.php>���d>���S�@src/Reflection/BetterReflection/Reflector/MemoizingReflector.php����d�����<src/Reflection/BetterReflection/BetterReflectionProvider.php�F���d�F<�ĤCsrc/Reflection/BetterReflection/BetterReflectionProviderFactory.php#���d#�)y�Ssrc/Reflection/BetterReflection/SourceStubber/PhpStormStubsSourceStubberFactory.php����d�o�뼤%src/Reflection/ConstantNameHelper.php4���d4B͛�(src/Reflection/ClassMemberReflection.phpd���ddY3�٤,src/Reflection/ClassMemberAccessAnswerer.phpt���dt�J�,src/Reflection/FunctionReflectionFactory.php$���d$j��5src/Reflection/PropertiesClassReflectionExtension.phpS���dS-=�[�%src/Reflection/ReflectionProvider.phpS���dS,��C�:src/Reflection/AllowedSubTypesClassReflectionExtension.php����d�Ulb��3src/Reflection/ReflectionProviderStaticAccessor.php����d��W�"src/Reflection/ClassReflection.php�����d���麤-src/Reflection/ParametersAcceptorSelector.php�j���d�j���Q�2src/Reflection/MethodsClassReflectionExtension.php:���d:GgN��@src/Reflection/Mixin/MixinPropertiesClassReflectionExtension.php!
���d!
�a�.�.src/Reflection/Mixin/MixinMethodReflection.phpB���dB�W�=src/Reflection/Mixin/MixinMethodsClassReflectionExtension.php�
���d�
H�BV�%src/Reflection/InaccessibleMethod.php���di�Fsrc/Reflection/ReflectionProvider/DirectReflectionProviderProvider.php^���d^���|�?src/Reflection/ReflectionProvider/ReflectionProviderFactory.phpa���da5�)�Dsrc/Reflection/ReflectionProvider/LazyReflectionProviderProvider.phpw���dwdy���Fsrc/Reflection/ReflectionProvider/SetterReflectionProviderProvider.phpo���do�\S�@src/Reflection/ReflectionProvider/ReflectionProviderProvider.php����d�
		�=src/Reflection/ReflectionProvider/DummyReflectionProvider.php����d��\�w�Asrc/Reflection/ReflectionProvider/MemoizingReflectionProvider.php����d�ﴂ��,src/Reflection/WrapperPropertyReflection.php����d���#'�1src/Reflection/ParameterReflectionWithPhpDocs.phpB���dB�H���'src/Reflection/BrokerAwareExtension.php���d�J��.src/Reflection/InitializerExprTypeResolver.phpE���dE�G��/src/Reflection/Php/SimpleXMLElementProperty.php����d���0src/Reflection/Php/EnumCasesMethodReflection.php�
���d�
��~,�,src/Reflection/Php/PhpFunctionReflection.php�%���d�%�����3src/Reflection/Php/UniversalObjectCrateProperty.phpd���dd�����-src/Reflection/Php/PhpParameterReflection.php����d��w<�%src/Reflection/Php/DummyParameter.php@���d@�ު5�-src/Reflection/Php/EnumPropertyReflection.php����d��%R�2src/Reflection/Php/FakeBuiltinMethodReflection.php���dF��I�.src/Reflection/Php/BuiltinMethodReflection.phps���dsy�P�;src/Reflection/Php/PhpParameterFromParserNodeReflection.phpW���dW�a@L�Esrc/Reflection/Php/Soap/SoapClientMethodsClassReflectionExtension.php����d���JǤ6src/Reflection/Php/Soap/SoapClientMethodReflection.phpU���dU�ҳ�1src/Reflection/Php/PhpMethodReflectionFactory.phpa���da��M��,src/Reflection/Php/PhpPropertyReflection.phpg���dg�P�
�:src/Reflection/Php/PhpFunctionFromParserNodeReflection.php�"���d�"���Ҥ4src/Reflection/Php/NativeBuiltinMethodReflection.php����d�i��֤2src/Reflection/Php/ClosureCallMethodReflection.php���d8\��*src/Reflection/Php/PhpMethodReflection.php�?���d�?�2`�0src/Reflection/Php/DummyParameterWithPhpDocs.php����d�c�Ȥ8src/Reflection/Php/PhpMethodFromParserNodeReflection.phpF���dFj���2src/Reflection/Php/PhpClassReflectionExtension.php�����d��m���Bsrc/Reflection/Php/EnumAllowedSubTypesClassReflectionExtension.php���d/��f�Dsrc/Reflection/Php/UniversalObjectCratesClassReflectionExtension.php����d���դ@src/Reflection/Php/EnumUnresolvedPropertyPrototypeReflection.php����d����Esrc/Reflection/Php/ClosureCallUnresolvedMethodPrototypeReflection.php����d��@�X�%src/Reflection/FunctionReflection.php]���d]�Ă��'src/Broker/AnonymousClassNameHelper.php/���d/�7O6�src/Broker/BrokerFactory.phpy���dy:�z�%src/Broker/ClassNotFoundException.php����d�`�)�(src/Broker/ClassAutoloadingException.php����d�2d�(src/Broker/FunctionNotFoundException.php����d���j�src/Broker/Broker.php+���d+����(src/Broker/ConstantNotFoundException.php����d��Ԥsrc/TrinaryLogic.php����d����,src/Rules/Exceptions/ThrowExpressionRule.phpo���do��Bsrc/Rules/Exceptions/MissingCheckedExceptionInMethodThrowsRule.phpy���dyY�;�7src/Rules/Exceptions/CatchWithUnthrownExceptionRule.php@���d@���Csrc/Rules/Exceptions/ThrowsVoidMethodWithExplicitThrowPointRule.php�
���d�
ߝ���Esrc/Rules/Exceptions/ThrowsVoidFunctionWithExplicitThrowPointRule.php{
���d{
:��u�5src/Rules/Exceptions/DefaultExceptionTypeResolver.php����d��k�*�:src/Rules/Exceptions/OverwrittenExitPointByFinallyRule.php����d���s��5src/Rules/Exceptions/CaughtExceptionExistenceRule.php�	���d�	R7�*�5src/Rules/Exceptions/TooWideFunctionThrowTypeRule.php����d���e�3src/Rules/Exceptions/TooWideMethodThrowTypeRule.php�	���d�	�k�ڤ.src/Rules/Exceptions/TooWideThrowTypeCheck.php����d��O�Dsrc/Rules/Exceptions/MissingCheckedExceptionInFunctionThrowsRule.phpQ���dQV>$Ѥ.src/Rules/Exceptions/ExceptionTypeResolver.php����d�D
��=src/Rules/Exceptions/MissingCheckedExceptionInThrowsCheck.php����d�;����(src/Rules/Playground/MethodNeverRule.php����d���`�(src/Rules/Playground/NeverRuleHelper.php����d�-ʤ*src/Rules/Playground/FunctionNeverRule.php����d�kV��6src/Rules/Operators/InvalidComparisonOperationRule.php����d��v�Ϥ2src/Rules/Operators/InvalidBinaryOperationRule.php����d�qm�W�,src/Rules/Operators/InvalidAssignVarRule.php�	���d�	�G�I�2src/Rules/Operators/InvalidIncDecOperationRule.phpW���dWf2��1src/Rules/Operators/InvalidUnaryOperationRule.php����d��d��.src/Rules/EnumCases/EnumCaseAttributesRule.php&���d&�W�}� src/Rules/Debug/DumpTypeRule.php���d^�@��"src/Rules/Debug/FileAssertRule.php����d�s�ޤ2src/Rules/Properties/UninitializedPropertyRule.php����d�k���;src/Rules/Properties/ReadOnlyByPhpDocPropertyAssignRule.php����d�fM�H�/src/Rules/Properties/OverridingPropertyRule.php ���d �2�:�5src/Rules/Properties/ReadOnlyByPhpDocPropertyRule.phpI���dI�`�4src/Rules/Properties/MissingPropertyTypehintRule.php����d�RAm��5src/Rules/Properties/AccessPropertiesInAssignRule.php����d�
t���7src/Rules/Properties/ReadingWriteOnlyPropertiesRule.php	���d	+�?h�Bsrc/Rules/Properties/MissingReadOnlyByPhpDocPropertyAssignRule.php�	���d�	�އ��:src/Rules/Properties/MissingReadOnlyPropertyAssignRule.php$	���d$	��ۤ>src/Rules/Properties/ReadOnlyByPhpDocPropertyAssignRefRule.phpX���dX�F=�-src/Rules/Properties/ReadOnlyPropertyRule.php���d��+src/Rules/Properties/PropertyDescriptor.php|���d|R�4{�=src/Rules/Properties/ReadWritePropertiesExtensionProvider.php.���d._����6src/Rules/Properties/TypesAssignedToPropertiesRule.php����d�MMx�Csrc/Rules/Properties/DirectReadWritePropertiesExtensionProvider.phpb���dbTD��;src/Rules/Properties/AccessStaticPropertiesInAssignRule.php*���d*՗�=�3src/Rules/Properties/ReadOnlyPropertyAssignRule.php*���d*׏)Ф2src/Rules/Properties/NullsafePropertyFetchRule.php����d��YM:�8src/Rules/Properties/ExistingClassesInPropertiesRule.phpw���dw���0src/Rules/Properties/FoundPropertyReflection.phpL���dL�#���3src/Rules/Properties/AccessStaticPropertiesRule.php:!���d:!�F�h�/src/Rules/Properties/PropertyAttributesRule.php���d�(��?src/Rules/Properties/AccessPrivatePropertyThroughStaticRule.php���dwѰ��1src/Rules/Properties/PropertyReflectionFinder.php����d��L-�6src/Rules/Properties/ReadOnlyPropertyAssignRefRule.php$���d$�Pؓ�-src/Rules/Properties/AccessPropertiesRule.php����d���V:�5src/Rules/Properties/ReadWritePropertiesExtension.php����d�����Asrc/Rules/Properties/LazyReadWritePropertiesExtensionProvider.php ���d Q�c/�8src/Rules/Properties/WritingToReadOnlyPropertiesRule.php����d����Bsrc/Rules/Properties/DefaultValueTypesAssignedToPropertiesRule.php����d��'��'src/Rules/DateTimeInstantiationRule.phpK���dK(gb��src/Rules/RuleErrorBuilder.php]���d]%�q��*src/Rules/RuleLevelHelperAcceptsResult.php����d��{��src/Rules/FoundTypeResult.php����d�jWY��+src/Rules/UnusedFunctionParametersCheck.php�
���d�
*�q��(src/Rules/Methods/MethodCallableRule.php����d�&�ơ�+src/Rules/Methods/StaticMethodCallCheck.php|%���d|%���3�:src/Rules/Methods/AbstractMethodInNonAbstractClassRule.php����d��$�%src/Rules/Methods/MethodCallCheck.phpB���dB��g_�%src/Rules/Methods/CallMethodsRule.phpl���dli�;I�,src/Rules/Methods/NullsafeMethodCallRule.php����d�0P�٤8src/Rules/Methods/MissingMethodParameterTypehintRule.phpe���de���5src/Rules/Methods/MethodParameterComparisonHelper.php�8���d�8��{(�.src/Rules/Methods/StaticMethodCallableRule.php
���d
1.���Fsrc/Rules/Methods/CallToConstructorStatementWithoutSideEffectsRule.php����d���E�)src/Rules/Methods/MethodSignatureRule.phpN ���dN ���*src/Rules/Methods/MethodAttributesRule.php���dQ��>�Gsrc/Rules/Methods/CallToStaticMethodStatementWithoutSideEffectsRule.php�
���d�
 �BI�,src/Rules/Methods/FinalPrivateMethodRule.php����d��[�q�:src/Rules/Methods/MissingMagicSerializationMethodsRule.php�	���d�	яs�5src/Rules/Methods/MissingMethodImplementationRule.php����d�3��
�6src/Rules/Methods/IllegalConstructorMethodCallRule.php����d���ᇤ*src/Rules/Methods/OverridingMethodRule.phpj"���dj"�D��$src/Rules/Methods/ReturnTypeRule.phpz���dz�ą�5src/Rules/Methods/MissingMethodReturnTypehintRule.phpF���dFk�l?�/src/Rules/Methods/ConsistentConstructorRule.php����d�#$�Asrc/Rules/Methods/CallToMethodStatementWithoutSideEffectsRule.php6���d6���J�+src/Rules/Methods/CallStaticMethodsRule.php���dq��b�4src/Rules/Methods/ExistingClassesInTypehintsRule.php����d��K�K�6src/Rules/Methods/IllegalConstructorStaticCallRule.php����d�I��P�8src/Rules/Methods/CallPrivateMethodThroughStaticRule.php����d���H�:src/Rules/Methods/IncompatibleDefaultParameterTypeRule.phpU���dU3'`Ӥsrc/Rules/LazyRegistry.php����d�:.,h�/src/Rules/Generics/FunctionTemplateTypeRule.phpF���dFd�Z�0src/Rules/Generics/InterfaceTemplateTypeRule.php����d�N�`}�+src/Rules/Generics/EnumTemplateTypeRule.php?���d?_�ق�(src/Rules/Generics/TemplateTypeCheck.php����d�\	�4�(src/Rules/Generics/EnumAncestorsRule.php����d��g��-src/Rules/Generics/MethodTemplateTypeRule.phpd���ddi����,src/Rules/Generics/GenericAncestorsCheck.php����d��O녤)src/Rules/Generics/ClassAncestorsRule.php���d�w��%src/Rules/Generics/UsedTraitsRule.php����d��l�1src/Rules/Generics/CrossCheckInterfacesHelper.php����d�����2src/Rules/Generics/MethodSignatureVarianceRule.php}���d}F���+src/Rules/Generics/PropertyVarianceRule.php���dV
;פ,src/Rules/Generics/TraitTemplateTypeRule.php���d��P��4src/Rules/Generics/FunctionSignatureVarianceRule.phpc���dcBn��-src/Rules/Generics/GenericObjectTypeCheck.phpu���duh�eĤ$src/Rules/Generics/VarianceCheck.php`���d`(k��-src/Rules/Generics/InterfaceAncestorsRule.phpD
���dD
�j~��,src/Rules/Generics/ClassTemplateTypeRule.php���d���Ϥsrc/Rules/RuleLevelHelper.php�3���d�3[����>src/Rules/TooWideTypehints/TooWideMethodReturnTypehintRule.php���d�����@src/Rules/TooWideTypehints/TooWideFunctionReturnTypehintRule.php�
���d�
P?��Esrc/Rules/TooWideTypehints/TooWideArrowFunctionReturnTypehintRule.phpp���dp3��(�?src/Rules/TooWideTypehints/TooWideClosureReturnTypehintRule.php����d�����3src/Rules/Classes/DuplicateClassDeclarationRule.php����d���Z�3src/Rules/Classes/InvalidPromotedPropertiesRule.php�	���d�	�n$̤*src/Rules/Classes/LocalTypeAliasesRule.php����d��ڻ��/src/Rules/Classes/LocalTypeTraitAliasesRule.php����d�G��?�1src/Rules/Classes/ExistingClassInTraitUseRule.php�
���d�
[I&�1src/Rules/Classes/ClassConstantAttributesRule.php-���d-��vP�src/Rules/Classes/MixinRule.php����d�ϒ��)src/Rules/Classes/ClassAttributesRule.php���d�-u��5src/Rules/Classes/UnusedConstructorParametersRule.php����d�2�D�;src/Rules/Classes/ExistingClassesInInterfaceExtendsRule.php
���d
b����'src/Rules/Classes/InstantiationRule.php("���d("9=�=�)src/Rules/Classes/AllowedSubTypesRule.phpX���dX��٤5src/Rules/Classes/ExistingClassInClassExtendsRule.php�
���d�
1U��-src/Rules/Classes/TraitAttributeClassRule.php+���d+G�Ë�<src/Rules/Classes/AccessPrivateConstantThroughStaticRule.php����d������$src/Rules/Classes/EnumSanityRule.phpO���dO�1El�.src/Rules/Classes/ImpossibleInstanceOfRule.php����d�����+src/Rules/Classes/LocalTypeAliasesCheck.phpa���da�\դ.src/Rules/Classes/DuplicateDeclarationRule.php`���d`�2^�:src/Rules/Classes/ExistingClassesInClassImplementsRule.php.���d.�[3src/Rules/Classes/ExistingClassInInstanceOfRule.php�
���d�
�[��0src/Rules/Classes/NonClassAttributeClassRule.php����d�����#src/Rules/Classes/NewStaticRule.php����d�Iq�T�'src/Rules/Classes/ClassConstantRule.phpm���dm���/src/Rules/Classes/InstantiationCallableRule.phpr���dr'��Y�9src/Rules/Classes/ExistingClassesInEnumImplementsRule.php�
���d�
JF���src/Rules/AttributesCheck.php���d��F�&src/Rules/Generators/YieldTypeRule.phph���dh���-src/Rules/Generators/YieldInGeneratorRule.php-���d-�M�m�*src/Rules/Generators/YieldFromTypeRule.php����d�sa�y�src/Rules/RuleError.php����d�t@�Ф7src/Rules/PhpDoc/IncompatiblePropertyPhpDocTypeRule.php���dV��y�/src/Rules/PhpDoc/IncompatiblePhpDocTypeRule.phpK%���dK%G2��4src/Rules/PhpDoc/ConditionalReturnTypeRuleHelper.php����d�];�4src/Rules/PhpDoc/VarTagChangedExpressionTypeRule.phpx���dx�w��0src/Rules/PhpDoc/IncompatibleSelfOutTypeRule.php����d��SI�'src/Rules/PhpDoc/FunctionAssertRule.php���d�*�t�.src/Rules/PhpDoc/InvalidPhpDocTagValueRule.php9���d9���1src/Rules/PhpDoc/InvalidThrowsPhpDocValueRule.phpM���dMl����+src/Rules/PhpDoc/UnresolvableTypeHelper.php?���d?K�&��0src/Rules/PhpDoc/InvalidPhpDocVarTagTypeRule.php����d�����4src/Rules/PhpDoc/MethodConditionalReturnTypeRule.php����d�Ǥ�c�)src/Rules/PhpDoc/VarTagTypeRuleHelper.php����d���c�<src/Rules/PhpDoc/IncompatibleClassConstantPhpDocTypeRule.php����d��L�x�%src/Rules/PhpDoc/MethodAssertRule.php~���d~QG���6src/Rules/PhpDoc/FunctionConditionalReturnTypeRule.php����d�����-src/Rules/PhpDoc/InvalidPHPStanDocTagRule.php�
���d�
�'O�2src/Rules/PhpDoc/WrongVariableNameInVarTagRule.php�4���d�4ծ ��%src/Rules/PhpDoc/AssertRuleHelper.php`
���d`
fR
��5src/Rules/Arrays/DuplicateKeysInLiteralArraysRule.phpB	���dB	Q�&��'src/Rules/Arrays/EmptyArrayItemRule.php���dI�A�$src/Rules/Arrays/DeadForeachRule.php����d�
į�2src/Rules/Arrays/InvalidKeyInArrayDimFetchRule.php����d�j\ۤ*src/Rules/Arrays/AllowedArrayKeysTypes.php����d����'src/Rules/Arrays/ArrayUnpackingRule.phpR���dR�#դ-src/Rules/Arrays/AppendedArrayKeyTypeRule.php�
���d�
B���4src/Rules/Arrays/OffsetAccessValueAssignmentRule.phps	���ds	���:src/Rules/Arrays/NonexistentOffsetInArrayDimFetchCheck.php(
���d(
Z�K��-src/Rules/Arrays/OffsetAccessAssignOpRule.php`
���d`
��|V�.src/Rules/Arrays/UnpackIterableInArrayRule.php����d���j|�9src/Rules/Arrays/OffsetAccessWithoutDimForReadingRule.php����d�//���.src/Rules/Arrays/AppendedArrayItemTypeRule.php�
���d�
@C�N�9src/Rules/Arrays/NonexistentOffsetInArrayDimFetchRule.phph
���dh
���/src/Rules/Arrays/OffsetAccessAssignmentRule.php�
���d�
�>�L�.src/Rules/Arrays/InvalidKeyInArrayItemRule.php����d��VLQ�+src/Rules/Arrays/ArrayDestructuringRule.php<
���d<
i`��*src/Rules/Arrays/IterableInForeachRule.php#���d#ǐ�/�.src/Rules/DeadCode/UnusedPrivateMethodRule.php����d�����/src/Rules/DeadCode/UnreachableStatementRule.php���dzhB¤0src/Rules/DeadCode/UnusedPrivateConstantRule.php�
���d�
u�$�src/Rules/DeadCode/NoopRule.php
���d
S|�0src/Rules/DeadCode/UnusedPrivatePropertyRule.phpo���do�˛ۤAsrc/Rules/Constants/AlwaysUsedClassConstantsExtensionProvider.phpE���dER��?�.src/Rules/Constants/OverridingConstantRule.phpa���da��'�)src/Rules/Constants/FinalConstantRule.php����d�<��Z�Esrc/Rules/Constants/LazyAlwaysUsedClassConstantsExtensionProvider.php1���d1�.���$src/Rules/Constants/ConstantRule.php����d�j�.v�9src/Rules/Constants/AlwaysUsedClassConstantsExtension.php����d�ޡr�8src/Rules/Constants/MissingClassConstantTypehintRule.php����d�,���$src/Rules/RuleErrors/RuleError27.php����d��l0M�$src/Rules/RuleErrors/RuleError15.phpm���dm���ɤ$src/Rules/RuleErrors/RuleError51.php����d��{\�$src/Rules/RuleErrors/RuleError23.php����d�;�C�$src/Rules/RuleErrors/RuleError67.phpJ���dJ��$�$src/Rules/RuleErrors/RuleError19.php����d��j�ɤ%src/Rules/RuleErrors/RuleError105.php/���d/���E�%src/Rules/RuleErrors/RuleError113.phpR���dR���%src/Rules/RuleErrors/RuleError103.php����d�)�.�$src/Rules/RuleErrors/RuleError89.php���d��
�$src/Rules/RuleErrors/RuleError33.php?���d?�Ўe�$src/Rules/RuleErrors/RuleError77.php����d�3@d�#src/Rules/RuleErrors/RuleError7.php����d�����$src/Rules/RuleErrors/RuleError97.php���d)s09�$src/Rules/RuleErrors/RuleError71.php����d����$src/Rules/RuleErrors/RuleError81.phpn���dn����%src/Rules/RuleErrors/RuleError127.phpc���dc��3��$src/Rules/RuleErrors/RuleError53.php����d��3��$src/Rules/RuleErrors/RuleError49.php���d�נD�%src/Rules/RuleErrors/RuleError109.php����d��~�t�$src/Rules/RuleErrors/RuleError95.php���d7�΅�#src/Rules/RuleErrors/RuleError9.php
���d
 ���$src/Rules/RuleErrors/RuleError37.php����d���F}�%src/Rules/RuleErrors/RuleError107.php����d�{���%src/Rules/RuleErrors/RuleError125.php����d�e
�T�$src/Rules/RuleErrors/RuleError65.php����d�l��1�%src/Rules/RuleErrors/RuleError101.php4���d4i��ʤ$src/Rules/RuleErrors/RuleError57.php����d�����$src/Rules/RuleErrors/RuleError55.phps���ds���֤$src/Rules/RuleErrors/RuleError99.php-���d-, ɤ%src/Rules/RuleErrors/RuleError115.php���d�J�$src/Rules/RuleErrors/RuleError11.php����d�x&���$src/Rules/RuleErrors/RuleError91.php����d�As��%src/Rules/RuleErrors/RuleError111.php����d��;3ܤ$src/Rules/RuleErrors/RuleError25.php����d��_㬤$src/Rules/RuleErrors/RuleError39.php����d�۵z`�$src/Rules/RuleErrors/RuleError59.phpn���dnM:��%src/Rules/RuleErrors/RuleError121.php���dD_b�$src/Rules/RuleErrors/RuleError41.php����d�ُ�y�$src/Rules/RuleErrors/RuleError87.php����d���U,�%src/Rules/RuleErrors/RuleError119.php����d��_��#src/Rules/RuleErrors/RuleError5.php���d����%src/Rules/RuleErrors/RuleError117.php���d�Y�5�$src/Rules/RuleErrors/RuleError93.php����d���Y�$src/Rules/RuleErrors/RuleError79.php����d���n��$src/Rules/RuleErrors/RuleError29.php����d��]u��$src/Rules/RuleErrors/RuleError17.php.���d.D�PI�$src/Rules/RuleErrors/RuleError47.phpP���dP`��$src/Rules/RuleErrors/RuleError73.phpK���dK�Y�5�%src/Rules/RuleErrors/RuleError123.php����d�F���$src/Rules/RuleErrors/RuleError63.php"���d"w���$src/Rules/RuleErrors/RuleError31.php?���d?�����$src/Rules/RuleErrors/RuleError83.php���d�;Q/�$src/Rules/RuleErrors/RuleError69.phpP���dP�P��#src/Rules/RuleErrors/RuleError3.php	���d	�k�t�$src/Rules/RuleErrors/RuleError13.php����d���2�#src/Rules/RuleErrors/RuleError1.php[���d[\�5Ϥ$src/Rules/RuleErrors/RuleError85.php"���d"���<�$src/Rules/RuleErrors/RuleError75.php����d�@
�/�$src/Rules/RuleErrors/RuleError45.php����d�u�s�$src/Rules/RuleErrors/RuleError43.php����d�VDO�$src/Rules/RuleErrors/RuleError21.php����d��`~�$src/Rules/RuleErrors/RuleError61.phpt���dt���Ѥ$src/Rules/RuleErrors/RuleError35.php����d���Ĥ)src/Rules/Traits/NotAnalysedTraitRule.php���d��:��&src/Rules/Traits/TraitUseCollector.phpx���dx��(H�.src/Rules/Traits/TraitDeclarationCollector.phpP���dP��R�'src/Rules/ClassCaseSensitivityCheck.php����d�OZɤsrc/Rules/Registry.phpj���djz�쿤src/Rules/ClassNameNodePair.php���d-%��src/Rules/DirectRegistry.php����d�ok�դ%src/Rules/FunctionReturnTypeCheck.php�
���d�
�(�src/Rules/Cast/PrintRule.php>���d>����2src/Rules/Cast/InvalidPartOfEncapsedStringRule.php����d��B�src/Rules/Cast/EchoRule.php����d�T���� src/Rules/Cast/UnsetCastRule.phpl���dl�$ۤ"src/Rules/Cast/InvalidCastRule.php�
���d�
�%���+src/Rules/Whitespace/FileWhitespaceRule.php���d\�y��src/Rules/NullsafeCheck.php����d�����)src/Rules/FunctionCallParametersCheck.php�Y���d�Y#[�0�src/Rules/IssetCheck.php�*���d�*߼�=�#src/Rules/NonIgnorableRuleError.php����d�6�y̤"src/Rules/MissingTypehintCheck.phpb���db�v��src/Rules/FileRuleError.php����d�ڌ.y�4src/Rules/Namespaces/ExistingNamesInGroupUseRule.php����d�n�� �/src/Rules/Namespaces/ExistingNamesInUseRule.phpK���dK��A�+src/Rules/Variables/DefinedVariableRule.php���df���!src/Rules/Variables/EmptyRule.php����d�p}��,src/Rules/Variables/CompactVariablesRule.php�
���d�
˚>�(src/Rules/Variables/NullCoalesceRule.php����d�\�tQ�%src/Rules/Variables/ThrowTypeRule.php8���d8O'_	�+src/Rules/Variables/VariableCloningRule.php����d�����!src/Rules/Variables/IssetRule.php���dQ�)A�!src/Rules/Variables/UnsetRule.phpj���dj;���%src/Rules/FunctionDefinitionCheck.php1I���d1I�t��src/Rules/Api/ApiRuleHelper.phpS	���dS	ʳ���)src/Rules/Api/ApiInterfaceExtendsRule.php���dp��%src/Rules/Api/GetTemplateTypeRule.php�	���d�	k$ȭ�!src/Rules/Api/ApiTraitUseRule.php����d���&�4src/Rules/Api/RuntimeReflectionInstantiationRule.php
���d
�=>ɤ#src/Rules/Api/ApiStaticCallRule.php����d����'src/Rules/Api/ApiInstanceofTypeRule.php����d�����%src/Rules/Api/ApiClassExtendsRule.php�	���d�	�-��#src/Rules/Api/ApiInstanceofRule.phpm���dm|2��(src/Rules/Api/ApiClassImplementsRule.php���d[��E�(src/Rules/Api/ApiClassConstFetchRule.php]���d]L���&src/Rules/Api/ApiInstantiationRule.phpy	���dy	J8�7src/Rules/Api/PhpStanNamespaceIn3rdPartyPackageRule.php�	���d�	��IV�5src/Rules/Api/NodeConnectingVisitorAttributesRule.php�
���d�
|l�5�/src/Rules/Api/RuntimeReflectionFunctionRule.php����d����O�#src/Rules/Api/ApiMethodCallRule.php)
���d)
r�B�&src/Rules/Api/BcUncoveredInterface.php���d��>(�:src/Rules/Comparison/ImpossibleCheckTypeMethodCallRule.php���d����=src/Rules/Comparison/StrictComparisonOfDifferentTypesRule.php~���d~����9src/Rules/Comparison/UnreachableTernaryElseBranchRule.php-
���d-
� �<src/Rules/Comparison/ImpossibleCheckTypeFunctionCallRule.php�
���d�
h9wh�=src/Rules/Comparison/TernaryOperatorConstantConditionRule.php����d�=��,src/Rules/Comparison/MatchExpressionRule.php����d�Q�=��4src/Rules/Comparison/ConstantConditionRuleHelper.php����d��Pg��@src/Rules/Comparison/ImpossibleCheckTypeStaticMethodCallRule.php����d��kn�9src/Rules/Comparison/DoWhileLoopConstantConditionRule.php����d�|�'f�4src/Rules/Comparison/ElseIfConstantConditionRule.php^���d^�c�8src/Rules/Comparison/BooleanAndConstantConditionRule.php>���d>,�bȤ2src/Rules/Comparison/ImpossibleCheckTypeHelper.php�B���d�B5���Gsrc/Rules/Comparison/NumberComparisonOperatorsConstantConditionRule.php����d����3�9src/Rules/Comparison/WhileLoopAlwaysTrueConditionRule.php�
���d�
�}!B�:src/Rules/Comparison/WhileLoopAlwaysFalseConditionRule.phpv���dv^&ؤ8src/Rules/Comparison/BooleanNotConstantConditionRule.php�
���d�
�JE�0src/Rules/Comparison/IfConstantConditionRule.phpc���dcXZww�4src/Rules/Comparison/ConstantLooseComparisonRule.php�
���d�
��ID�7src/Rules/Comparison/UsageOfVoidMatchExpressionRule.php����d�C�Q(�7src/Rules/Comparison/BooleanOrConstantConditionRule.phpF���dF"7!�2src/Rules/Comparison/UnreachableIfBranchesRule.php�
���d�
AyD�!src/Rules/IdentifierRuleError.php����d�MT3�src/Rules/Rule.php����d�-�Ӥ'src/Rules/Missing/MissingReturnRule.phpL���dL�J�src/Rules/TipRuleError.php����d���|�1src/Rules/Regexp/RegularExpressionPatternRule.phpo���do��oҤ=src/Rules/Functions/ExistingClassesInClosureTypehintsRule.phpe���de!.��,src/Rules/Functions/FunctionCallableRule.phpz���dz�Cl��-src/Rules/Functions/ClosureReturnTypeRule.phpI���dI�%�3src/Rules/Functions/ArrowFunctionAttributesRule.php)���d)�1-��/src/Rules/Functions/ReturnNullsafeByRefRule.php@���d@�$���Isrc/Rules/Functions/IncompatibleArrowFunctionDefaultParameterTypeRule.php����d�,��ڤ-src/Rules/Functions/ClosureAttributesRule.php���d����.src/Rules/Functions/FunctionAttributesRule.php���d�*Q�4src/Rules/Functions/CallToFunctionParametersRule.phpF
���dF
GR|�)src/Rules/Functions/InnerFunctionRule.phpA���dA��Z�8src/Rules/Functions/DuplicateFunctionDeclarationRule.php����d��KT��+src/Rules/Functions/ImplodeFunctionRule.php����d���e�,src/Rules/Functions/DefineParametersRule.php����d��7��3src/Rules/Functions/ArrowFunctionReturnTypeRule.php���d��]�9src/Rules/Functions/MissingFunctionReturnTypehintRule.php_
���d_
&����'src/Rules/Functions/ArrayFilterRule.php�
���d�
I��i�-src/Rules/Functions/UnusedClosureUsesRule.php����d���PD�Csrc/Rules/Functions/ExistingClassesInArrowFunctionTypehintsRule.php`���d`�'O��&src/Rules/Functions/ReturnTypeRule.php@���d@B9��<src/Rules/Functions/MissingFunctionParameterTypehintRule.php�
���d�
��%Ȥ<src/Rules/Functions/ArrowFunctionReturnNullsafeByRefRule.php����d��v�u�+src/Rules/Functions/ParamAttributesRule.php����d�)a��6src/Rules/Functions/ExistingClassesInTypehintsRule.php����d�{�Ә�)src/Rules/Functions/CallCallablesRule.php����d���"�5src/Rules/Functions/CallToNonExistentFunctionRule.php����d��d�S�/src/Rules/Functions/RandomIntParametersRule.php����d�[x�d�Esrc/Rules/Functions/CallToFunctionStatementWithoutSideEffectsRule.php���d$���<src/Rules/Functions/IncompatibleDefaultParameterTypeRule.php$���d$r�u��Csrc/Rules/Functions/IncompatibleClosureDefaultParameterTypeRule.php����d�S'}+�,src/Rules/Functions/PrintfParametersRule.phpk���dkA�Y�src/Rules/LineRuleError.php����d��[%7�.src/Rules/Keywords/ContinueBreakInLoopRule.php����d�
b��src/Rules/MetadataRuleError.php����d���h� src/ShouldNotHappenException.php���d���src/Testing/RuleTestCase.php����d�P�}�,src/Testing/TestCaseSourceLocatorFactory.php����d��-hפsrc/Testing/LevelsTestCase.phpW���dW��]��src/Testing/TestCase.neonG���dG3�f��src/Testing/functions.php����d��-c�&src/Testing/ErrorFormatterTestCase.php����d�����%src/Testing/TypeInferenceTestCase.phpb!���db!{�aդsrc/Testing/PHPStanTestCase.phpq#���dq#��茤src/Php/PhpVersion.php����d���O�$src/Php/PhpVersionFactoryFactory.php����d����src/Php/PhpVersionFactory.php&���d&;Z�F�preload.php�����d���u/F�conf/config.level9.neonH���dH�u��conf/config.level3.neon�
���d�
C�QN�conf/config.levelmax.neon!���d!�h�conf/config.stubValidator.neon����d��VPԤconf/config.level0.neon�"���d�"���ߤconf/config.level8.neonD���dDs�Jc�conf/config.level1.neon����d��?�$�conf/config.level7.neonY���dY^b�Z�conf/config.level4.neonP���dP���conf/config.level6.neon/���d/�DJ'�conf/config.level2.neon����d��P�a�conf/config.neon�����d����?�conf/config.level5.neonY���dY�r)D�conf/bleedingEdge.neon����d��v5�$resources/functionMap_php74delta.phpr���dr�;G��$resources/functionMap_php81delta.phpw���dw�ž��$resources/functionMap_php82delta.phpd���dd�t�@�resources/functionMetadata.phpU���dU�O\ߤ1resources/functionMap_php80delta_bleedingEdge.php<���d<ibq�resources/functionMap.php,����d,�,zꜤ$resources/functionMap_php80delta.php�`���d�`v(��&resources/functionMap_bleedingEdge.php0+���d0+%�bin/phpstan����d�)���%stubs/ReflectionFunctionAbstract.stub���d�Ӛ��stubs/ReflectionMethod.stubT���dTfT�stubs/ImagickPixel.stubp���dp+���stubs/WeakReference.stub���d�mݤstubs/ext-ds.stub8���d8Kc�T�stubs/iterable.stub$���d$��Ab�stubs/ReflectionProperty.stub����d��0^�stubs/ReflectionClass.stub���d)��̤"stubs/ReflectionClassConstant.stub����d�Ź�J�stubs/ReflectionAttribute.stub���dq����stubs/ReflectionParameter.stub����d�V����stubs/PDOStatement.stub����d�����stubs/arrayFunctions.stub����d�s@�v�stubs/core.stub"���d"��%�stubs/SplObjectStorage.stubn���dn��jڤstubs/runtime/Attribute.php9���d9Qۊ��,stubs/runtime/ReflectionIntersectionType.php���d���;�%stubs/runtime/ReflectionAttribute.php����d��="�-stubs/runtime/Enum/ReflectionEnumUnitCase.php����d����!stubs/runtime/Enum/BackedEnum.php
���d
��M�%stubs/runtime/Enum/ReflectionEnum.php����d���mG�stubs/runtime/Enum/UnitEnum.php����d��g��/stubs/runtime/Enum/ReflectionEnumBackedCase.php����d�;7y�%stubs/runtime/ReflectionUnionType.php����d��D=�stubs/Exception.stub-	���d-	W�m�stubs/date.stub���d�fa� stubs/typeCheckingFunctions.stub]���d]W�K�stubs/zip.stub4���d4��#�stubs/mysqli.stub����d�d�
�!stubs/bleedingEdge/Countable.stubo���do
�U�stubs/Countable.stubd���dd�䞤stubs/dom.stubM���dMM
=�stubs/spl.stub/���d/
���stubs/ibm_db2.stub���d�`�C�stubs/ArrayObject.stub���d��jM�<?php

namespace _PHPStan_dcc7b7cff\Clue\React\NDJson;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
use _PHPStan_dcc7b7cff\React\Stream\ReadableStreamInterface;
use _PHPStan_dcc7b7cff\React\Stream\Util;
use _PHPStan_dcc7b7cff\React\Stream\WritableStreamInterface;
/**
 * The Decoder / Parser reads from a plain stream and emits data objects for each JSON element
 */
class Decoder extends EventEmitter implements ReadableStreamInterface
{
    private $input;
    private $assoc;
    private $depth;
    private $options;
    /** @var int */
    private $maxlength;
    private $buffer = '';
    private $closed = \false;
    /**
     * @param ReadableStreamInterface $input
     * @param bool $assoc
     * @param int $depth
     * @param int $options (requires PHP 5.4+)
     * @param int $maxlength
     * @throws \BadMethodCallException
     */
    public function __construct(ReadableStreamInterface $input, $assoc = \false, $depth = 512, $options = 0, $maxlength = 65536)
    {
        // @codeCoverageIgnoreStart
        if ($options !== 0 && \PHP_VERSION < 5.4) {
            throw new \BadMethodCallException('Options parameter is only supported on PHP 5.4+');
        }
        if (\defined('JSON_THROW_ON_ERROR')) {
            $options = $options & ~\JSON_THROW_ON_ERROR;
        }
        // @codeCoverageIgnoreEnd
        $this->input = $input;
        if (!$input->isReadable()) {
            $this->close();
            return;
        }
        $this->assoc = $assoc;
        $this->depth = $depth;
        $this->options = $options;
        $this->maxlength = $maxlength;
        $this->input->on('data', array($this, 'handleData'));
        $this->input->on('end', array($this, 'handleEnd'));
        $this->input->on('error', array($this, 'handleError'));
        $this->input->on('close', array($this, 'close'));
    }
    public function isReadable()
    {
        return !$this->closed;
    }
    public function close()
    {
        if ($this->closed) {
            return;
        }
        $this->closed = \true;
        $this->buffer = '';
        $this->input->close();
        $this->emit('close');
        $this->removeAllListeners();
    }
    public function pause()
    {
        $this->input->pause();
    }
    public function resume()
    {
        $this->input->resume();
    }
    public function pipe(WritableStreamInterface $dest, array $options = array())
    {
        Util::pipe($this, $dest, $options);
        return $dest;
    }
    /** @internal */
    public function handleData($data)
    {
        if (!\is_string($data)) {
            $this->handleError(new \UnexpectedValueException('Expected stream to emit string, but got ' . \gettype($data)));
            return;
        }
        $this->buffer .= $data;
        // keep parsing while a newline has been found
        while (($newline = \strpos($this->buffer, "\n")) !== \false && $newline <= $this->maxlength) {
            // read data up until newline and remove from buffer
            $data = (string) \substr($this->buffer, 0, $newline);
            $this->buffer = (string) \substr($this->buffer, $newline + 1);
            // decode data with options given in ctor
            // @codeCoverageIgnoreStart
            if ($this->options === 0) {
                $data = \json_decode($data, $this->assoc, $this->depth);
            } else {
                \assert(\PHP_VERSION_ID >= 50400);
                $data = \json_decode($data, $this->assoc, $this->depth, $this->options);
            }
            // @codeCoverageIgnoreEnd
            // abort stream if decoding failed
            if ($data === null && \json_last_error() !== \JSON_ERROR_NONE) {
                // @codeCoverageIgnoreStart
                if (\PHP_VERSION_ID > 50500) {
                    $errstr = \json_last_error_msg();
                } elseif (\json_last_error() === \JSON_ERROR_SYNTAX) {
                    $errstr = 'Syntax error';
                } else {
                    $errstr = 'Unknown error';
                }
                // @codeCoverageIgnoreEnd
                return $this->handleError(new \RuntimeException('Unable to decode JSON: ' . $errstr, \json_last_error()));
            }
            $this->emit('data', array($data));
        }
        if (isset($this->buffer[$this->maxlength])) {
            $this->handleError(new \OverflowException('Buffer size exceeded'));
        }
    }
    /** @internal */
    public function handleEnd()
    {
        if ($this->buffer !== '') {
            $this->handleData("\n");
        }
        if (!$this->closed) {
            $this->emit('end');
            $this->close();
        }
    }
    /** @internal */
    public function handleError(\Exception $error)
    {
        $this->emit('error', array($error));
        $this->close();
    }
}
<?php

namespace _PHPStan_dcc7b7cff\Clue\React\NDJson;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
use _PHPStan_dcc7b7cff\React\Stream\WritableStreamInterface;
/**
 * The Encoder / Serializer can be used to write any value, encode it as a JSON text and forward it to an output stream
 */
class Encoder extends EventEmitter implements WritableStreamInterface
{
    private $output;
    private $options;
    private $depth;
    private $closed = \false;
    /**
     * @param WritableStreamInterface $output
     * @param int $options
     * @param int $depth (requires PHP 5.5+)
     * @throws \InvalidArgumentException
     * @throws \BadMethodCallException
     */
    public function __construct(WritableStreamInterface $output, $options = 0, $depth = 512)
    {
        // @codeCoverageIgnoreStart
        if (\defined('JSON_PRETTY_PRINT') && $options & \JSON_PRETTY_PRINT) {
            throw new \InvalidArgumentException('Pretty printing not available for NDJSON');
        }
        if ($depth !== 512 && \PHP_VERSION < 5.5) {
            throw new \BadMethodCallException('Depth parameter is only supported on PHP 5.5+');
        }
        if (\defined('JSON_THROW_ON_ERROR')) {
            $options = $options & ~\JSON_THROW_ON_ERROR;
        }
        // @codeCoverageIgnoreEnd
        $this->output = $output;
        if (!$output->isWritable()) {
            $this->close();
            return;
        }
        $this->options = $options;
        $this->depth = $depth;
        $this->output->on('drain', array($this, 'handleDrain'));
        $this->output->on('error', array($this, 'handleError'));
        $this->output->on('close', array($this, 'close'));
    }
    public function write($data)
    {
        if ($this->closed) {
            return \false;
        }
        // we have to handle PHP warnings for legacy PHP < 5.5
        // certain values (such as INF etc.) emit a warning, but still encode successfully
        // @codeCoverageIgnoreStart
        if (\PHP_VERSION_ID < 50500) {
            $errstr = null;
            \set_error_handler(function ($_, $error) use(&$errstr) {
                $errstr = $error;
            });
            // encode data with options given in ctor (depth not supported)
            $data = \json_encode($data, $this->options);
            // always check error code and match missing error messages
            \restore_error_handler();
            $errno = \json_last_error();
            if (\defined('JSON_ERROR_UTF8') && $errno === \JSON_ERROR_UTF8) {
                // const JSON_ERROR_UTF8 added in PHP 5.3.3, but no error message assigned in legacy PHP < 5.5
                // this overrides PHP 5.3.14 only: https://3v4l.org/IGP8Z#v5314
                $errstr = 'Malformed UTF-8 characters, possibly incorrectly encoded';
            } elseif ($errno !== \JSON_ERROR_NONE && $errstr === null) {
                // error number present, but no error message applicable
                $errstr = 'Unknown error';
            }
            // abort stream if encoding fails
            if ($errno !== \JSON_ERROR_NONE || $errstr !== null) {
                $this->handleError(new \RuntimeException('Unable to encode JSON: ' . $errstr, $errno));
                return \false;
            }
        } else {
            // encode data with options given in ctor
            $data = \json_encode($data, $this->options, $this->depth);
            // abort stream if encoding fails
            if ($data === \false && \json_last_error() !== \JSON_ERROR_NONE) {
                $this->handleError(new \RuntimeException('Unable to encode JSON: ' . \json_last_error_msg(), \json_last_error()));
                return \false;
            }
        }
        // @codeCoverageIgnoreEnd
        return $this->output->write($data . "\n");
    }
    public function end($data = null)
    {
        if ($data !== null) {
            $this->write($data);
        }
        $this->output->end();
    }
    public function isWritable()
    {
        return !$this->closed;
    }
    public function close()
    {
        if ($this->closed) {
            return;
        }
        $this->closed = \true;
        $this->output->close();
        $this->emit('close');
        $this->removeAllListeners();
    }
    /** @internal */
    public function handleDrain()
    {
        $this->emit('drain');
    }
    /** @internal */
    public function handleError(\Exception $error)
    {
        $this->emit('error', array($error));
        $this->close();
    }
}
The MIT License (MIT)

Copyright (c) 2016 Christian Lück

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

// autoload.php @generated by Composer

if (PHP_VERSION_ID < 50600) {
    if (!headers_sent()) {
        header('HTTP/1.1 500 Internal Server Error');
    }
    $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
    if (!ini_get('display_errors')) {
        if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
            fwrite(STDERR, $err);
        } elseif (!headers_sent()) {
            echo $err;
        }
    }
    trigger_error(
        $err,
        E_USER_ERROR
    );
}

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit0fc888f20645a0056333807f0fcc1038::getLoader();
<?php

declare (strict_types=1);
/*
 * This file is part of Evenement.
 *
 * (c) Igor Wiedler <igor@wiedler.ch>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Evenement;

class EventEmitter implements EventEmitterInterface
{
    use EventEmitterTrait;
}
<?php

declare (strict_types=1);
/*
 * This file is part of Evenement.
 *
 * (c) Igor Wiedler <igor@wiedler.ch>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Evenement;

interface EventEmitterInterface
{
    public function on($event, callable $listener);
    public function once($event, callable $listener);
    public function removeListener($event, callable $listener);
    public function removeAllListeners($event = null);
    public function listeners($event = null);
    public function emit($event, array $arguments = []);
}
<?php

declare (strict_types=1);
/*
 * This file is part of Evenement.
 *
 * (c) Igor Wiedler <igor@wiedler.ch>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Evenement;

use InvalidArgumentException;
trait EventEmitterTrait
{
    protected $listeners = [];
    protected $onceListeners = [];
    public function on($event, callable $listener)
    {
        if ($event === null) {
            throw new InvalidArgumentException('event name must not be null');
        }
        if (!isset($this->listeners[$event])) {
            $this->listeners[$event] = [];
        }
        $this->listeners[$event][] = $listener;
        return $this;
    }
    public function once($event, callable $listener)
    {
        if ($event === null) {
            throw new InvalidArgumentException('event name must not be null');
        }
        if (!isset($this->onceListeners[$event])) {
            $this->onceListeners[$event] = [];
        }
        $this->onceListeners[$event][] = $listener;
        return $this;
    }
    public function removeListener($event, callable $listener)
    {
        if ($event === null) {
            throw new InvalidArgumentException('event name must not be null');
        }
        if (isset($this->listeners[$event])) {
            $index = \array_search($listener, $this->listeners[$event], \true);
            if (\false !== $index) {
                unset($this->listeners[$event][$index]);
                if (\count($this->listeners[$event]) === 0) {
                    unset($this->listeners[$event]);
                }
            }
        }
        if (isset($this->onceListeners[$event])) {
            $index = \array_search($listener, $this->onceListeners[$event], \true);
            if (\false !== $index) {
                unset($this->onceListeners[$event][$index]);
                if (\count($this->onceListeners[$event]) === 0) {
                    unset($this->onceListeners[$event]);
                }
            }
        }
    }
    public function removeAllListeners($event = null)
    {
        if ($event !== null) {
            unset($this->listeners[$event]);
        } else {
            $this->listeners = [];
        }
        if ($event !== null) {
            unset($this->onceListeners[$event]);
        } else {
            $this->onceListeners = [];
        }
    }
    public function listeners($event = null) : array
    {
        if ($event === null) {
            $events = [];
            $eventNames = \array_unique(\array_merge(\array_keys($this->listeners), \array_keys($this->onceListeners)));
            foreach ($eventNames as $eventName) {
                $events[$eventName] = \array_merge(isset($this->listeners[$eventName]) ? $this->listeners[$eventName] : [], isset($this->onceListeners[$eventName]) ? $this->onceListeners[$eventName] : []);
            }
            return $events;
        }
        return \array_merge(isset($this->listeners[$event]) ? $this->listeners[$event] : [], isset($this->onceListeners[$event]) ? $this->onceListeners[$event] : []);
    }
    public function emit($event, array $arguments = [])
    {
        if ($event === null) {
            throw new InvalidArgumentException('event name must not be null');
        }
        if (isset($this->listeners[$event])) {
            foreach ($this->listeners[$event] as $listener) {
                $listener(...$arguments);
            }
        }
        if (isset($this->onceListeners[$event])) {
            $listeners = $this->onceListeners[$event];
            unset($this->onceListeners[$event]);
            foreach ($listeners as $listener) {
                $listener(...$arguments);
            }
        }
    }
}
Copyright (c) 2011 Igor Wiedler

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

namespace _PHPStan_dcc7b7cff\RingCentral\Psr7;

use _PHPStan_dcc7b7cff\Psr\Http\Message\StreamInterface;
/**
 * Stream decorator trait
 * @property StreamInterface stream
 */
abstract class StreamDecoratorTrait implements StreamInterface
{
    /**
     * @param StreamInterface $stream Stream to decorate
     */
    public function __construct(StreamInterface $stream = null)
    {
        if ($stream) {
            $this->stream = $stream;
        }
    }
    /**
     * Magic method used to create a new stream if streams are not added in
     * the constructor of a decorator (e.g., LazyOpenStream).
     *
     * @param string $name Name of the property (allows "stream" only).
     *
     * @return StreamInterface
     */
    public function __get($name)
    {
        if ($name == 'stream') {
            $this->stream = $this->createStream();
            return $this->stream;
        }
        throw new \UnexpectedValueException("{$name} not found on class");
    }
    public function __toString()
    {
        try {
            if ($this->isSeekable()) {
                $this->seek(0);
            }
            return $this->getContents();
        } catch (\Exception $e) {
            // Really, PHP? https://bugs.php.net/bug.php?id=53648
            \trigger_error('StreamDecorator::__toString exception: ' . (string) $e, \E_USER_ERROR);
            return '';
        }
    }
    public function getContents()
    {
        return copy_to_string($this);
    }
    /**
     * Allow decorators to implement custom methods
     *
     * @param string $method Missing method name
     * @param array  $args   Method arguments
     *
     * @return mixed
     */
    public function __call($method, array $args)
    {
        $result = \call_user_func_array(array($this->stream, $method), $args);
        // Always return the wrapped object if the result is a return $this
        return $result === $this->stream ? $this : $result;
    }
    public function close()
    {
        $this->stream->close();
    }
    public function getMetadata($key = null)
    {
        return $this->stream->getMetadata($key);
    }
    public function detach()
    {
        return $this->stream->detach();
    }
    public function getSize()
    {
        return $this->stream->getSize();
    }
    public function eof()
    {
        return $this->stream->eof();
    }
    public function tell()
    {
        return $this->stream->tell();
    }
    public function isReadable()
    {
        return $this->stream->isReadable();
    }
    public function isWritable()
    {
        return $this->stream->isWritable();
    }
    public function isSeekable()
    {
        return $this->stream->isSeekable();
    }
    public function rewind()
    {
        $this->seek(0);
    }
    public function seek($offset, $whence = \SEEK_SET)
    {
        $this->stream->seek($offset, $whence);
    }
    public function read($length)
    {
        return $this->stream->read($length);
    }
    public function write($string)
    {
        return $this->stream->write($string);
    }
}
<?php

namespace _PHPStan_dcc7b7cff\RingCentral\Psr7;

use _PHPStan_dcc7b7cff\Psr\Http\Message\StreamInterface;
/**
 * Provides a buffer stream that can be written to to fill a buffer, and read
 * from to remove bytes from the buffer.
 *
 * This stream returns a "hwm" metadata value that tells upstream consumers
 * what the configured high water mark of the stream is, or the maximum
 * preferred size of the buffer.
 */
class BufferStream implements StreamInterface
{
    private $hwm;
    private $buffer = '';
    /**
     * @param int $hwm High water mark, representing the preferred maximum
     *                 buffer size. If the size of the buffer exceeds the high
     *                 water mark, then calls to write will continue to succeed
     *                 but will return false to inform writers to slow down
     *                 until the buffer has been drained by reading from it.
     */
    public function __construct($hwm = 16384)
    {
        $this->hwm = $hwm;
    }
    public function __toString()
    {
        return $this->getContents();
    }
    public function getContents()
    {
        $buffer = $this->buffer;
        $this->buffer = '';
        return $buffer;
    }
    public function close()
    {
        $this->buffer = '';
    }
    public function detach()
    {
        $this->close();
    }
    public function getSize()
    {
        return \strlen($this->buffer);
    }
    public function isReadable()
    {
        return \true;
    }
    public function isWritable()
    {
        return \true;
    }
    public function isSeekable()
    {
        return \false;
    }
    public function rewind()
    {
        $this->seek(0);
    }
    public function seek($offset, $whence = \SEEK_SET)
    {
        throw new \RuntimeException('Cannot seek a BufferStream');
    }
    public function eof()
    {
        return \strlen($this->buffer) === 0;
    }
    public function tell()
    {
        throw new \RuntimeException('Cannot determine the position of a BufferStream');
    }
    /**
     * Reads data from the buffer.
     */
    public function read($length)
    {
        $currentLength = \strlen($this->buffer);
        if ($length >= $currentLength) {
            // No need to slice the buffer because we don't have enough data.
            $result = $this->buffer;
            $this->buffer = '';
        } else {
            // Slice up the result to provide a subset of the buffer.
            $result = \substr($this->buffer, 0, $length);
            $this->buffer = \substr($this->buffer, $length);
        }
        return $result;
    }
    /**
     * Writes data to the buffer.
     */
    public function write($string)
    {
        $this->buffer .= $string;
        // TODO: What should happen here?
        if (\strlen($this->buffer) >= $this->hwm) {
            return \false;
        }
        return \strlen($string);
    }
    public function getMetadata($key = null)
    {
        if ($key == 'hwm') {
            return $this->hwm;
        }
        return $key ? null : array();
    }
}
<?php

namespace _PHPStan_dcc7b7cff\RingCentral\Psr7;

use _PHPStan_dcc7b7cff\Psr\Http\Message\StreamInterface;
/**
 * Converts Guzzle streams into PHP stream resources.
 */
class StreamWrapper
{
    /** @var resource */
    public $context;
    /** @var StreamInterface */
    private $stream;
    /** @var string r, r+, or w */
    private $mode;
    /**
     * Returns a resource representing the stream.
     *
     * @param StreamInterface $stream The stream to get a resource for
     *
     * @return resource
     * @throws \InvalidArgumentException if stream is not readable or writable
     */
    public static function getResource(StreamInterface $stream)
    {
        self::register();
        if ($stream->isReadable()) {
            $mode = $stream->isWritable() ? 'r+' : 'r';
        } elseif ($stream->isWritable()) {
            $mode = 'w';
        } else {
            throw new \InvalidArgumentException('The stream must be readable, ' . 'writable, or both.');
        }
        return \fopen('guzzle://stream', $mode, null, \stream_context_create(array('guzzle' => array('stream' => $stream))));
    }
    /**
     * Registers the stream wrapper if needed
     */
    public static function register()
    {
        if (!\in_array('guzzle', \stream_get_wrappers())) {
            \stream_wrapper_register('guzzle', __CLASS__);
        }
    }
    public function stream_open($path, $mode, $options, &$opened_path)
    {
        $options = \stream_context_get_options($this->context);
        if (!isset($options['guzzle']['stream'])) {
            return \false;
        }
        $this->mode = $mode;
        $this->stream = $options['guzzle']['stream'];
        return \true;
    }
    public function stream_read($count)
    {
        return $this->stream->read($count);
    }
    public function stream_write($data)
    {
        return (int) $this->stream->write($data);
    }
    public function stream_tell()
    {
        return $this->stream->tell();
    }
    public function stream_eof()
    {
        return $this->stream->eof();
    }
    public function stream_seek($offset, $whence)
    {
        $this->stream->seek($offset, $whence);
        return \true;
    }
    public function stream_stat()
    {
        static $modeMap = array('r' => 33060, 'r+' => 33206, 'w' => 33188);
        return array('dev' => 0, 'ino' => 0, 'mode' => $modeMap[$this->mode], 'nlink' => 0, 'uid' => 0, 'gid' => 0, 'rdev' => 0, 'size' => $this->stream->getSize() ?: 0, 'atime' => 0, 'mtime' => 0, 'ctime' => 0, 'blksize' => 0, 'blocks' => 0);
    }
}
<?php

namespace _PHPStan_dcc7b7cff\RingCentral\Psr7;

use _PHPStan_dcc7b7cff\Psr\Http\Message\StreamInterface;
/**
 * Uses PHP's zlib.inflate filter to inflate deflate or gzipped content.
 *
 * This stream decorator skips the first 10 bytes of the given stream to remove
 * the gzip header, converts the provided stream to a PHP stream resource,
 * then appends the zlib.inflate filter. The stream is then converted back
 * to a Guzzle stream resource to be used as a Guzzle stream.
 *
 * @link http://tools.ietf.org/html/rfc1952
 * @link http://php.net/manual/en/filters.compression.php
 */
class InflateStream extends StreamDecoratorTrait implements StreamInterface
{
    public function __construct(StreamInterface $stream)
    {
        // Skip the first 10 bytes
        $stream = new LimitStream($stream, -1, 10);
        $resource = StreamWrapper::getResource($stream);
        \stream_filter_append($resource, 'zlib.inflate', \STREAM_FILTER_READ);
        parent::__construct(new Stream($resource));
    }
}
<?php

namespace _PHPStan_dcc7b7cff\RingCentral\Psr7;

use _PHPStan_dcc7b7cff\Psr\Http\Message\ResponseInterface;
/**
 * PSR-7 response implementation.
 */
class Response extends MessageTrait implements ResponseInterface
{
    /** @var array Map of standard HTTP status code/reason phrases */
    private static $phrases = array(100 => 'Continue', 101 => 'Switching Protocols', 102 => 'Processing', 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authoritative Information', 204 => 'No Content', 205 => 'Reset Content', 206 => 'Partial Content', 207 => 'Multi-status', 208 => 'Already Reported', 300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other', 304 => 'Not Modified', 305 => 'Use Proxy', 306 => 'Switch Proxy', 307 => 'Temporary Redirect', 400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found', 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Time-out', 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed', 413 => 'Request Entity Too Large', 414 => 'Request-URI Too Large', 415 => 'Unsupported Media Type', 416 => 'Requested range not satisfiable', 417 => 'Expectation Failed', 418 => 'I\'m a teapot', 422 => 'Unprocessable Entity', 423 => 'Locked', 424 => 'Failed Dependency', 425 => 'Unordered Collection', 426 => 'Upgrade Required', 428 => 'Precondition Required', 429 => 'Too Many Requests', 431 => 'Request Header Fields Too Large', 500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Time-out', 505 => 'HTTP Version not supported', 506 => 'Variant Also Negotiates', 507 => 'Insufficient Storage', 508 => 'Loop Detected', 511 => 'Network Authentication Required');
    /** @var null|string */
    private $reasonPhrase = '';
    /** @var int */
    private $statusCode = 200;
    /**
     * @param int    $status  Status code for the response, if any.
     * @param array  $headers Headers for the response, if any.
     * @param mixed  $body    Stream body.
     * @param string $version Protocol version.
     * @param string $reason  Reason phrase (a default will be used if possible).
     */
    public function __construct($status = 200, array $headers = array(), $body = null, $version = '1.1', $reason = null)
    {
        $this->statusCode = (int) $status;
        if ($body !== null) {
            $this->stream = stream_for($body);
        }
        $this->setHeaders($headers);
        if (!$reason && isset(self::$phrases[$this->statusCode])) {
            $this->reasonPhrase = self::$phrases[$status];
        } else {
            $this->reasonPhrase = (string) $reason;
        }
        $this->protocol = $version;
    }
    public function getStatusCode()
    {
        return $this->statusCode;
    }
    public function getReasonPhrase()
    {
        return $this->reasonPhrase;
    }
    public function withStatus($code, $reasonPhrase = '')
    {
        $new = clone $this;
        $new->statusCode = (int) $code;
        if (!$reasonPhrase && isset(self::$phrases[$new->statusCode])) {
            $reasonPhrase = self::$phrases[$new->statusCode];
        }
        $new->reasonPhrase = $reasonPhrase;
        return $new;
    }
}
<?php

namespace _PHPStan_dcc7b7cff;

// Don't redefine the functions if included multiple times.
if (!\function_exists('_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\str')) {
    require __DIR__ . '/functions.php';
}
<?php

namespace _PHPStan_dcc7b7cff\RingCentral\Psr7;

use _PHPStan_dcc7b7cff\Psr\Http\Message\UriInterface;
/**
 * Basic PSR-7 URI implementation.
 *
 * @link https://github.com/phly/http This class is based upon
 *     Matthew Weier O'Phinney's URI implementation in phly/http.
 */
class Uri implements UriInterface
{
    private static $schemes = array('http' => 80, 'https' => 443);
    private static $charUnreserved = 'a-zA-Z0-9_\\-\\.~';
    private static $charSubDelims = '!\\$&\'\\(\\)\\*\\+,;=';
    private static $replaceQuery = array('=' => '%3D', '&' => '%26');
    /** @var string Uri scheme. */
    private $scheme = '';
    /** @var string Uri user info. */
    private $userInfo = '';
    /** @var string Uri host. */
    private $host = '';
    /** @var int|null Uri port. */
    private $port;
    /** @var string Uri path. */
    private $path = '';
    /** @var string Uri query string. */
    private $query = '';
    /** @var string Uri fragment. */
    private $fragment = '';
    /**
     * @param string $uri URI to parse and wrap.
     */
    public function __construct($uri = '')
    {
        if ($uri != null) {
            $parts = \parse_url($uri);
            if ($parts === \false) {
                throw new \InvalidArgumentException("Unable to parse URI: {$uri}");
            }
            $this->applyParts($parts);
        }
    }
    public function __toString()
    {
        return self::createUriString($this->scheme, $this->getAuthority(), $this->getPath(), $this->query, $this->fragment);
    }
    /**
     * Removes dot segments from a path and returns the new path.
     *
     * @param string $path
     *
     * @return string
     * @link http://tools.ietf.org/html/rfc3986#section-5.2.4
     */
    public static function removeDotSegments($path)
    {
        static $noopPaths = array('' => \true, '/' => \true, '*' => \true);
        static $ignoreSegments = array('.' => \true, '..' => \true);
        if (isset($noopPaths[$path])) {
            return $path;
        }
        $results = array();
        $segments = \explode('/', $path);
        foreach ($segments as $segment) {
            if ($segment == '..') {
                \array_pop($results);
            } elseif (!isset($ignoreSegments[$segment])) {
                $results[] = $segment;
            }
        }
        $newPath = \implode('/', $results);
        // Add the leading slash if necessary
        if (\substr($path, 0, 1) === '/' && \substr($newPath, 0, 1) !== '/') {
            $newPath = '/' . $newPath;
        }
        // Add the trailing slash if necessary
        if ($newPath != '/' && isset($ignoreSegments[\end($segments)])) {
            $newPath .= '/';
        }
        return $newPath;
    }
    /**
     * Resolve a base URI with a relative URI and return a new URI.
     *
     * @param UriInterface $base Base URI
     * @param string       $rel  Relative URI
     *
     * @return UriInterface
     */
    public static function resolve(UriInterface $base, $rel)
    {
        if ($rel === null || $rel === '') {
            return $base;
        }
        if (!$rel instanceof UriInterface) {
            $rel = new self($rel);
        }
        // Return the relative uri as-is if it has a scheme.
        if ($rel->getScheme()) {
            return $rel->withPath(static::removeDotSegments($rel->getPath()));
        }
        $relParts = array('scheme' => $rel->getScheme(), 'authority' => $rel->getAuthority(), 'path' => $rel->getPath(), 'query' => $rel->getQuery(), 'fragment' => $rel->getFragment());
        $parts = array('scheme' => $base->getScheme(), 'authority' => $base->getAuthority(), 'path' => $base->getPath(), 'query' => $base->getQuery(), 'fragment' => $base->getFragment());
        if (!empty($relParts['authority'])) {
            $parts['authority'] = $relParts['authority'];
            $parts['path'] = self::removeDotSegments($relParts['path']);
            $parts['query'] = $relParts['query'];
            $parts['fragment'] = $relParts['fragment'];
        } elseif (!empty($relParts['path'])) {
            if (\substr($relParts['path'], 0, 1) == '/') {
                $parts['path'] = self::removeDotSegments($relParts['path']);
                $parts['query'] = $relParts['query'];
                $parts['fragment'] = $relParts['fragment'];
            } else {
                if (!empty($parts['authority']) && empty($parts['path'])) {
                    $mergedPath = '/';
                } else {
                    $mergedPath = \substr($parts['path'], 0, \strrpos($parts['path'], '/') + 1);
                }
                $parts['path'] = self::removeDotSegments($mergedPath . $relParts['path']);
                $parts['query'] = $relParts['query'];
                $parts['fragment'] = $relParts['fragment'];
            }
        } elseif (!empty($relParts['query'])) {
            $parts['query'] = $relParts['query'];
        } elseif ($relParts['fragment'] != null) {
            $parts['fragment'] = $relParts['fragment'];
        }
        return new self(static::createUriString($parts['scheme'], $parts['authority'], $parts['path'], $parts['query'], $parts['fragment']));
    }
    /**
     * Create a new URI with a specific query string value removed.
     *
     * Any existing query string values that exactly match the provided key are
     * removed.
     *
     * Note: this function will convert "=" to "%3D" and "&" to "%26".
     *
     * @param UriInterface $uri URI to use as a base.
     * @param string       $key Query string key value pair to remove.
     *
     * @return UriInterface
     */
    public static function withoutQueryValue(UriInterface $uri, $key)
    {
        $current = $uri->getQuery();
        if (!$current) {
            return $uri;
        }
        $result = array();
        foreach (\explode('&', $current) as $part) {
            $subParts = \explode('=', $part);
            if ($subParts[0] !== $key) {
                $result[] = $part;
            }
        }
        return $uri->withQuery(\implode('&', $result));
    }
    /**
     * Create a new URI with a specific query string value.
     *
     * Any existing query string values that exactly match the provided key are
     * removed and replaced with the given key value pair.
     *
     * Note: this function will convert "=" to "%3D" and "&" to "%26".
     *
     * @param UriInterface $uri URI to use as a base.
     * @param string $key   Key to set.
     * @param string $value Value to set.
     *
     * @return UriInterface
     */
    public static function withQueryValue(UriInterface $uri, $key, $value)
    {
        $current = $uri->getQuery();
        $key = \strtr($key, self::$replaceQuery);
        if (!$current) {
            $result = array();
        } else {
            $result = array();
            foreach (\explode('&', $current) as $part) {
                $subParts = \explode('=', $part);
                if ($subParts[0] !== $key) {
                    $result[] = $part;
                }
            }
        }
        if ($value !== null) {
            $result[] = $key . '=' . \strtr($value, self::$replaceQuery);
        } else {
            $result[] = $key;
        }
        return $uri->withQuery(\implode('&', $result));
    }
    /**
     * Create a URI from a hash of parse_url parts.
     *
     * @param array $parts
     *
     * @return self
     */
    public static function fromParts(array $parts)
    {
        $uri = new self();
        $uri->applyParts($parts);
        return $uri;
    }
    public function getScheme()
    {
        return $this->scheme;
    }
    public function getAuthority()
    {
        if (empty($this->host)) {
            return '';
        }
        $authority = $this->host;
        if (!empty($this->userInfo)) {
            $authority = $this->userInfo . '@' . $authority;
        }
        if ($this->isNonStandardPort($this->scheme, $this->host, $this->port)) {
            $authority .= ':' . $this->port;
        }
        return $authority;
    }
    public function getUserInfo()
    {
        return $this->userInfo;
    }
    public function getHost()
    {
        return $this->host;
    }
    public function getPort()
    {
        return $this->port;
    }
    public function getPath()
    {
        return $this->path == null ? '' : $this->path;
    }
    public function getQuery()
    {
        return $this->query;
    }
    public function getFragment()
    {
        return $this->fragment;
    }
    public function withScheme($scheme)
    {
        $scheme = $this->filterScheme($scheme);
        if ($this->scheme === $scheme) {
            return $this;
        }
        $new = clone $this;
        $new->scheme = $scheme;
        $new->port = $new->filterPort($new->scheme, $new->host, $new->port);
        return $new;
    }
    public function withUserInfo($user, $password = null)
    {
        $info = $user;
        if ($password) {
            $info .= ':' . $password;
        }
        if ($this->userInfo === $info) {
            return $this;
        }
        $new = clone $this;
        $new->userInfo = $info;
        return $new;
    }
    public function withHost($host)
    {
        if ($this->host === $host) {
            return $this;
        }
        $new = clone $this;
        $new->host = $host;
        return $new;
    }
    public function withPort($port)
    {
        $port = $this->filterPort($this->scheme, $this->host, $port);
        if ($this->port === $port) {
            return $this;
        }
        $new = clone $this;
        $new->port = $port;
        return $new;
    }
    public function withPath($path)
    {
        if (!\is_string($path)) {
            throw new \InvalidArgumentException('Invalid path provided; must be a string');
        }
        $path = $this->filterPath($path);
        if ($this->path === $path) {
            return $this;
        }
        $new = clone $this;
        $new->path = $path;
        return $new;
    }
    public function withQuery($query)
    {
        if (!\is_string($query) && !\method_exists($query, '__toString')) {
            throw new \InvalidArgumentException('Query string must be a string');
        }
        $query = (string) $query;
        if (\substr($query, 0, 1) === '?') {
            $query = \substr($query, 1);
        }
        $query = $this->filterQueryAndFragment($query);
        if ($this->query === $query) {
            return $this;
        }
        $new = clone $this;
        $new->query = $query;
        return $new;
    }
    public function withFragment($fragment)
    {
        if (\substr($fragment, 0, 1) === '#') {
            $fragment = \substr($fragment, 1);
        }
        $fragment = $this->filterQueryAndFragment($fragment);
        if ($this->fragment === $fragment) {
            return $this;
        }
        $new = clone $this;
        $new->fragment = $fragment;
        return $new;
    }
    /**
     * Apply parse_url parts to a URI.
     *
     * @param $parts Array of parse_url parts to apply.
     */
    private function applyParts(array $parts)
    {
        $this->scheme = isset($parts['scheme']) ? $this->filterScheme($parts['scheme']) : '';
        $this->userInfo = isset($parts['user']) ? $parts['user'] : '';
        $this->host = isset($parts['host']) ? $parts['host'] : '';
        $this->port = !empty($parts['port']) ? $this->filterPort($this->scheme, $this->host, $parts['port']) : null;
        $this->path = isset($parts['path']) ? $this->filterPath($parts['path']) : '';
        $this->query = isset($parts['query']) ? $this->filterQueryAndFragment($parts['query']) : '';
        $this->fragment = isset($parts['fragment']) ? $this->filterQueryAndFragment($parts['fragment']) : '';
        if (isset($parts['pass'])) {
            $this->userInfo .= ':' . $parts['pass'];
        }
    }
    /**
     * Create a URI string from its various parts
     *
     * @param string $scheme
     * @param string $authority
     * @param string $path
     * @param string $query
     * @param string $fragment
     * @return string
     */
    private static function createUriString($scheme, $authority, $path, $query, $fragment)
    {
        $uri = '';
        if (!empty($scheme)) {
            $uri .= $scheme . '://';
        }
        if (!empty($authority)) {
            $uri .= $authority;
        }
        if ($path != null) {
            // Add a leading slash if necessary.
            if ($uri && \substr($path, 0, 1) !== '/') {
                $uri .= '/';
            }
            $uri .= $path;
        }
        if ($query != null) {
            $uri .= '?' . $query;
        }
        if ($fragment != null) {
            $uri .= '#' . $fragment;
        }
        return $uri;
    }
    /**
     * Is a given port non-standard for the current scheme?
     *
     * @param string $scheme
     * @param string $host
     * @param int $port
     * @return bool
     */
    private static function isNonStandardPort($scheme, $host, $port)
    {
        if (!$scheme && $port) {
            return \true;
        }
        if (!$host || !$port) {
            return \false;
        }
        return !isset(static::$schemes[$scheme]) || $port !== static::$schemes[$scheme];
    }
    /**
     * @param string $scheme
     *
     * @return string
     */
    private function filterScheme($scheme)
    {
        $scheme = \strtolower($scheme);
        $scheme = \rtrim($scheme, ':/');
        return $scheme;
    }
    /**
     * @param string $scheme
     * @param string $host
     * @param int $port
     *
     * @return int|null
     *
     * @throws \InvalidArgumentException If the port is invalid.
     */
    private function filterPort($scheme, $host, $port)
    {
        if (null !== $port) {
            $port = (int) $port;
            if (1 > $port || 0xffff < $port) {
                throw new \InvalidArgumentException(\sprintf('Invalid port: %d. Must be between 1 and 65535', $port));
            }
        }
        return $this->isNonStandardPort($scheme, $host, $port) ? $port : null;
    }
    /**
     * Filters the path of a URI
     *
     * @param $path
     *
     * @return string
     */
    private function filterPath($path)
    {
        return \preg_replace_callback('/(?:[^' . self::$charUnreserved . self::$charSubDelims . ':@\\/%]+|%(?![A-Fa-f0-9]{2}))/', array($this, 'rawurlencodeMatchZero'), $path);
    }
    /**
     * Filters the query string or fragment of a URI.
     *
     * @param $str
     *
     * @return string
     */
    private function filterQueryAndFragment($str)
    {
        return \preg_replace_callback('/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\\/\\?]+|%(?![A-Fa-f0-9]{2}))/', array($this, 'rawurlencodeMatchZero'), $str);
    }
    private function rawurlencodeMatchZero(array $match)
    {
        return \rawurlencode($match[0]);
    }
}
<?php

namespace _PHPStan_dcc7b7cff\RingCentral\Psr7;

use _PHPStan_dcc7b7cff\Psr\Http\Message\StreamInterface;
/**
 * Stream decorator that can cache previously read bytes from a sequentially
 * read stream.
 */
class CachingStream extends StreamDecoratorTrait implements StreamInterface
{
    /** @var StreamInterface Stream being wrapped */
    private $remoteStream;
    /** @var int Number of bytes to skip reading due to a write on the buffer */
    private $skipReadBytes = 0;
    /**
     * We will treat the buffer object as the body of the stream
     *
     * @param StreamInterface $stream Stream to cache
     * @param StreamInterface $target Optionally specify where data is cached
     */
    public function __construct(StreamInterface $stream, StreamInterface $target = null)
    {
        $this->remoteStream = $stream;
        parent::__construct($target ?: new Stream(\fopen('php://temp', 'r+')));
    }
    public function getSize()
    {
        return \max($this->stream->getSize(), $this->remoteStream->getSize());
    }
    public function rewind()
    {
        $this->seek(0);
    }
    public function seek($offset, $whence = \SEEK_SET)
    {
        if ($whence == \SEEK_SET) {
            $byte = $offset;
        } elseif ($whence == \SEEK_CUR) {
            $byte = $offset + $this->tell();
        } elseif ($whence == \SEEK_END) {
            $size = $this->remoteStream->getSize();
            if ($size === null) {
                $size = $this->cacheEntireStream();
            }
            // Because 0 is the first byte, we seek to size - 1.
            $byte = $size - 1 - $offset;
        } else {
            throw new \InvalidArgumentException('Invalid whence');
        }
        $diff = $byte - $this->stream->getSize();
        if ($diff > 0) {
            // If the seek byte is greater the number of read bytes, then read
            // the difference of bytes to cache the bytes and inherently seek.
            $this->read($diff);
        } else {
            // We can just do a normal seek since we've already seen this byte.
            $this->stream->seek($byte);
        }
    }
    public function read($length)
    {
        // Perform a regular read on any previously read data from the buffer
        $data = $this->stream->read($length);
        $remaining = $length - \strlen($data);
        // More data was requested so read from the remote stream
        if ($remaining) {
            // If data was written to the buffer in a position that would have
            // been filled from the remote stream, then we must skip bytes on
            // the remote stream to emulate overwriting bytes from that
            // position. This mimics the behavior of other PHP stream wrappers.
            $remoteData = $this->remoteStream->read($remaining + $this->skipReadBytes);
            if ($this->skipReadBytes) {
                $len = \strlen($remoteData);
                $remoteData = \substr($remoteData, $this->skipReadBytes);
                $this->skipReadBytes = \max(0, $this->skipReadBytes - $len);
            }
            $data .= $remoteData;
            $this->stream->write($remoteData);
        }
        return $data;
    }
    public function write($string)
    {
        // When appending to the end of the currently read stream, you'll want
        // to skip bytes from being read from the remote stream to emulate
        // other stream wrappers. Basically replacing bytes of data of a fixed
        // length.
        $overflow = \strlen($string) + $this->tell() - $this->remoteStream->tell();
        if ($overflow > 0) {
            $this->skipReadBytes += $overflow;
        }
        return $this->stream->write($string);
    }
    public function eof()
    {
        return $this->stream->eof() && $this->remoteStream->eof();
    }
    /**
     * Close both the remote stream and buffer stream
     */
    public function close()
    {
        $this->remoteStream->close() && $this->stream->close();
    }
    private function cacheEntireStream()
    {
        $target = new FnStream(array('write' => 'strlen'));
        copy_to_stream($this, $target);
        return $this->tell();
    }
}
<?php

namespace _PHPStan_dcc7b7cff\RingCentral\Psr7;

use _PHPStan_dcc7b7cff\Psr\Http\Message\StreamInterface;
/**
 * Compose stream implementations based on a hash of functions.
 *
 * Allows for easy testing and extension of a provided stream without needing
 * to create a concrete class for a simple extension point.
 * @property callable _fn___toString
 * @property callable _fn_close
 * @property callable _fn_detach
 * @property callable _fn_getSize
 * @property callable _fn_tell
 * @property callable _fn_isSeekable
 * @property callable _fn_rewind
 * @property callable _fn_seek
 * @property callable _fn_isWritable
 * @property callable _fn_write
 * @property callable _fn_isReadable
 * @property callable _fn_read
 * @property callable _fn_getContents
 * @property callable _fn_getMetadata
 */
class FnStream implements StreamInterface
{
    /** @var array */
    private $methods;
    /** @var array Methods that must be implemented in the given array */
    private static $slots = array('__toString', 'close', 'detach', 'rewind', 'getSize', 'tell', 'eof', 'isSeekable', 'seek', 'isWritable', 'write', 'isReadable', 'read', 'getContents', 'getMetadata');
    /**
     * @param array $methods Hash of method name to a callable.
     */
    public function __construct(array $methods)
    {
        $this->methods = $methods;
        // Create the functions on the class
        foreach ($methods as $name => $fn) {
            $this->{'_fn_' . $name} = $fn;
        }
    }
    /**
     * Lazily determine which methods are not implemented.
     * @throws \BadMethodCallException
     */
    public function __get($name)
    {
        throw new \BadMethodCallException(\str_replace('_fn_', '', $name) . '() is not implemented in the FnStream');
    }
    /**
     * The close method is called on the underlying stream only if possible.
     */
    public function __destruct()
    {
        if (isset($this->_fn_close)) {
            \call_user_func($this->_fn_close);
        }
    }
    /**
     * Adds custom functionality to an underlying stream by intercepting
     * specific method calls.
     *
     * @param StreamInterface $stream  Stream to decorate
     * @param array           $methods Hash of method name to a closure
     *
     * @return FnStream
     */
    public static function decorate(StreamInterface $stream, array $methods)
    {
        // If any of the required methods were not provided, then simply
        // proxy to the decorated stream.
        foreach (\array_diff(self::$slots, \array_keys($methods)) as $diff) {
            $methods[$diff] = array($stream, $diff);
        }
        return new self($methods);
    }
    public function __toString()
    {
        return \call_user_func($this->_fn___toString);
    }
    public function close()
    {
        return \call_user_func($this->_fn_close);
    }
    public function detach()
    {
        return \call_user_func($this->_fn_detach);
    }
    public function getSize()
    {
        return \call_user_func($this->_fn_getSize);
    }
    public function tell()
    {
        return \call_user_func($this->_fn_tell);
    }
    public function eof()
    {
        return \call_user_func($this->_fn_eof);
    }
    public function isSeekable()
    {
        return \call_user_func($this->_fn_isSeekable);
    }
    public function rewind()
    {
        \call_user_func($this->_fn_rewind);
    }
    public function seek($offset, $whence = \SEEK_SET)
    {
        \call_user_func($this->_fn_seek, $offset, $whence);
    }
    public function isWritable()
    {
        return \call_user_func($this->_fn_isWritable);
    }
    public function write($string)
    {
        return \call_user_func($this->_fn_write, $string);
    }
    public function isReadable()
    {
        return \call_user_func($this->_fn_isReadable);
    }
    public function read($length)
    {
        return \call_user_func($this->_fn_read, $length);
    }
    public function getContents()
    {
        return \call_user_func($this->_fn_getContents);
    }
    public function getMetadata($key = null)
    {
        return \call_user_func($this->_fn_getMetadata, $key);
    }
}
<?php

namespace _PHPStan_dcc7b7cff\RingCentral\Psr7;

use _PHPStan_dcc7b7cff\Psr\Http\Message\StreamInterface;
/**
 * Stream that when read returns bytes for a streaming multipart or
 * multipart/form-data stream.
 */
class MultipartStream extends StreamDecoratorTrait implements StreamInterface
{
    private $boundary;
    /**
     * @param array  $elements Array of associative arrays, each containing a
     *                         required "name" key mapping to the form field,
     *                         name, a required "contents" key mapping to a
     *                         StreamInterface/resource/string, an optional
     *                         "headers" associative array of custom headers,
     *                         and an optional "filename" key mapping to a
     *                         string to send as the filename in the part.
     * @param string $boundary You can optionally provide a specific boundary
     *
     * @throws \InvalidArgumentException
     */
    public function __construct(array $elements = array(), $boundary = null)
    {
        $this->boundary = $boundary ?: \uniqid();
        parent::__construct($this->createStream($elements));
    }
    /**
     * Get the boundary
     *
     * @return string
     */
    public function getBoundary()
    {
        return $this->boundary;
    }
    public function isWritable()
    {
        return \false;
    }
    /**
     * Get the headers needed before transferring the content of a POST file
     */
    private function getHeaders(array $headers)
    {
        $str = '';
        foreach ($headers as $key => $value) {
            $str .= "{$key}: {$value}\r\n";
        }
        return "--{$this->boundary}\r\n" . \trim($str) . "\r\n\r\n";
    }
    /**
     * Create the aggregate stream that will be used to upload the POST data
     */
    protected function createStream(array $elements)
    {
        $stream = new AppendStream();
        foreach ($elements as $element) {
            $this->addElement($stream, $element);
        }
        // Add the trailing boundary with CRLF
        $stream->addStream(stream_for("--{$this->boundary}--\r\n"));
        return $stream;
    }
    private function addElement(AppendStream $stream, array $element)
    {
        foreach (array('contents', 'name') as $key) {
            if (!\array_key_exists($key, $element)) {
                throw new \InvalidArgumentException("A '{$key}' key is required");
            }
        }
        $element['contents'] = stream_for($element['contents']);
        if (empty($element['filename'])) {
            $uri = $element['contents']->getMetadata('uri');
            if (\substr($uri, 0, 6) !== 'php://') {
                $element['filename'] = $uri;
            }
        }
        list($body, $headers) = $this->createElement($element['name'], $element['contents'], isset($element['filename']) ? $element['filename'] : null, isset($element['headers']) ? $element['headers'] : array());
        $stream->addStream(stream_for($this->getHeaders($headers)));
        $stream->addStream($body);
        $stream->addStream(stream_for("\r\n"));
    }
    /**
     * @return array
     */
    private function createElement($name, $stream, $filename, array $headers)
    {
        // Set a default content-disposition header if one was no provided
        $disposition = $this->getHeader($headers, 'content-disposition');
        if (!$disposition) {
            $headers['Content-Disposition'] = $filename ? \sprintf('form-data; name="%s"; filename="%s"', $name, \basename($filename)) : "form-data; name=\"{$name}\"";
        }
        // Set a default content-length header if one was no provided
        $length = $this->getHeader($headers, 'content-length');
        if (!$length) {
            if ($length = $stream->getSize()) {
                $headers['Content-Length'] = (string) $length;
            }
        }
        // Set a default Content-Type if one was not supplied
        $type = $this->getHeader($headers, 'content-type');
        if (!$type && $filename) {
            if ($type = mimetype_from_filename($filename)) {
                $headers['Content-Type'] = $type;
            }
        }
        return array($stream, $headers);
    }
    private function getHeader(array $headers, $key)
    {
        $lowercaseHeader = \strtolower($key);
        foreach ($headers as $k => $v) {
            if (\strtolower($k) === $lowercaseHeader) {
                return $v;
            }
        }
        return null;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\RingCentral\Psr7;

use _PHPStan_dcc7b7cff\Psr\Http\Message\StreamInterface;
/**
 * Reads from multiple streams, one after the other.
 *
 * This is a read-only stream decorator.
 */
class AppendStream implements StreamInterface
{
    /** @var StreamInterface[] Streams being decorated */
    private $streams = array();
    private $seekable = \true;
    private $current = 0;
    private $pos = 0;
    private $detached = \false;
    /**
     * @param StreamInterface[] $streams Streams to decorate. Each stream must
     *                                   be readable.
     */
    public function __construct(array $streams = array())
    {
        foreach ($streams as $stream) {
            $this->addStream($stream);
        }
    }
    public function __toString()
    {
        try {
            $this->rewind();
            return $this->getContents();
        } catch (\Exception $e) {
            return '';
        }
    }
    /**
     * Add a stream to the AppendStream
     *
     * @param StreamInterface $stream Stream to append. Must be readable.
     *
     * @throws \InvalidArgumentException if the stream is not readable
     */
    public function addStream(StreamInterface $stream)
    {
        if (!$stream->isReadable()) {
            throw new \InvalidArgumentException('Each stream must be readable');
        }
        // The stream is only seekable if all streams are seekable
        if (!$stream->isSeekable()) {
            $this->seekable = \false;
        }
        $this->streams[] = $stream;
    }
    public function getContents()
    {
        return copy_to_string($this);
    }
    /**
     * Closes each attached stream.
     *
     * {@inheritdoc}
     */
    public function close()
    {
        $this->pos = $this->current = 0;
        foreach ($this->streams as $stream) {
            $stream->close();
        }
        $this->streams = array();
    }
    /**
     * Detaches each attached stream
     *
     * {@inheritdoc}
     */
    public function detach()
    {
        $this->close();
        $this->detached = \true;
    }
    public function tell()
    {
        return $this->pos;
    }
    /**
     * Tries to calculate the size by adding the size of each stream.
     *
     * If any of the streams do not return a valid number, then the size of the
     * append stream cannot be determined and null is returned.
     *
     * {@inheritdoc}
     */
    public function getSize()
    {
        $size = 0;
        foreach ($this->streams as $stream) {
            $s = $stream->getSize();
            if ($s === null) {
                return null;
            }
            $size += $s;
        }
        return $size;
    }
    public function eof()
    {
        return !$this->streams || $this->current >= \count($this->streams) - 1 && $this->streams[$this->current]->eof();
    }
    public function rewind()
    {
        $this->seek(0);
    }
    /**
     * Attempts to seek to the given position. Only supports SEEK_SET.
     *
     * {@inheritdoc}
     */
    public function seek($offset, $whence = \SEEK_SET)
    {
        if (!$this->seekable) {
            throw new \RuntimeException('This AppendStream is not seekable');
        } elseif ($whence !== \SEEK_SET) {
            throw new \RuntimeException('The AppendStream can only seek with SEEK_SET');
        }
        $this->pos = $this->current = 0;
        // Rewind each stream
        foreach ($this->streams as $i => $stream) {
            try {
                $stream->rewind();
            } catch (\Exception $e) {
                throw new \RuntimeException('Unable to seek stream ' . $i . ' of the AppendStream', 0, $e);
            }
        }
        // Seek to the actual position by reading from each stream
        while ($this->pos < $offset && !$this->eof()) {
            $result = $this->read(\min(8096, $offset - $this->pos));
            if ($result === '') {
                break;
            }
        }
    }
    /**
     * Reads from all of the appended streams until the length is met or EOF.
     *
     * {@inheritdoc}
     */
    public function read($length)
    {
        $buffer = '';
        $total = \count($this->streams) - 1;
        $remaining = $length;
        $progressToNext = \false;
        while ($remaining > 0) {
            // Progress to the next stream if needed.
            if ($progressToNext || $this->streams[$this->current]->eof()) {
                $progressToNext = \false;
                if ($this->current === $total) {
                    break;
                }
                $this->current++;
            }
            $result = $this->streams[$this->current]->read($remaining);
            // Using a loose comparison here to match on '', false, and null
            if ($result == null) {
                $progressToNext = \true;
                continue;
            }
            $buffer .= $result;
            $remaining = $length - \strlen($buffer);
        }
        $this->pos += \strlen($buffer);
        return $buffer;
    }
    public function isReadable()
    {
        return \true;
    }
    public function isWritable()
    {
        return \false;
    }
    public function isSeekable()
    {
        return $this->seekable;
    }
    public function write($string)
    {
        throw new \RuntimeException('Cannot write to an AppendStream');
    }
    public function getMetadata($key = null)
    {
        return $key ? null : array();
    }
}
<?php

namespace _PHPStan_dcc7b7cff\RingCentral\Psr7;

use _PHPStan_dcc7b7cff\Psr\Http\Message\MessageInterface;
use _PHPStan_dcc7b7cff\Psr\Http\Message\RequestInterface;
use _PHPStan_dcc7b7cff\Psr\Http\Message\ResponseInterface;
use _PHPStan_dcc7b7cff\Psr\Http\Message\StreamInterface;
use _PHPStan_dcc7b7cff\Psr\Http\Message\UriInterface;
// Manually define missing constants for PHP 5.3
\defined('PHP_QUERY_RFC1738') or \define('PHP_QUERY_RFC1738', 1);
\defined('PHP_QUERY_RFC3986') or \define('PHP_QUERY_RFC3986', 2);
/**
 * Returns the string representation of an HTTP message.
 *
 * @param MessageInterface $message Message to convert to a string.
 *
 * @return string
 */
function str(MessageInterface $message)
{
    if ($message instanceof RequestInterface) {
        $msg = \trim($message->getMethod() . ' ' . $message->getRequestTarget()) . ' HTTP/' . $message->getProtocolVersion();
        if (!$message->hasHeader('host')) {
            $msg .= "\r\nHost: " . $message->getUri()->getHost();
        }
    } elseif ($message instanceof ResponseInterface) {
        $msg = 'HTTP/' . $message->getProtocolVersion() . ' ' . $message->getStatusCode() . ' ' . $message->getReasonPhrase();
    } else {
        throw new \InvalidArgumentException('Unknown message type');
    }
    foreach ($message->getHeaders() as $name => $values) {
        $msg .= "\r\n{$name}: " . \implode(', ', $values);
    }
    return "{$msg}\r\n\r\n" . $message->getBody();
}
/**
 * Returns a UriInterface for the given value.
 *
 * This function accepts a string or {@see Psr\Http\Message\UriInterface} and
 * returns a UriInterface for the given value. If the value is already a
 * `UriInterface`, it is returned as-is.
 *
 * @param string|UriInterface $uri
 *
 * @return UriInterface
 * @throws \InvalidArgumentException
 */
function uri_for($uri)
{
    if ($uri instanceof UriInterface) {
        return $uri;
    } elseif (\is_string($uri)) {
        return new Uri($uri);
    }
    throw new \InvalidArgumentException('URI must be a string or UriInterface');
}
/**
 * Create a new stream based on the input type.
 *
 * Options is an associative array that can contain the following keys:
 * - metadata: Array of custom metadata.
 * - size: Size of the stream.
 *
 * @param resource|string|StreamInterface $resource Entity body data
 * @param array                           $options  Additional options
 *
 * @return Stream
 * @throws \InvalidArgumentException if the $resource arg is not valid.
 */
function stream_for($resource = '', array $options = array())
{
    switch (\gettype($resource)) {
        case 'string':
            $stream = \fopen('php://temp', 'r+');
            if ($resource !== '') {
                \fwrite($stream, $resource);
                \fseek($stream, 0);
            }
            return new Stream($stream, $options);
        case 'resource':
            return new Stream($resource, $options);
        case 'object':
            if ($resource instanceof StreamInterface) {
                return $resource;
            } elseif ($resource instanceof \Iterator) {
                return new PumpStream(function () use($resource) {
                    if (!$resource->valid()) {
                        return \false;
                    }
                    $result = $resource->current();
                    $resource->next();
                    return $result;
                }, $options);
            } elseif (\method_exists($resource, '__toString')) {
                return stream_for((string) $resource, $options);
            }
            break;
        case 'NULL':
            return new Stream(\fopen('php://temp', 'r+'), $options);
    }
    if (\is_callable($resource)) {
        return new PumpStream($resource, $options);
    }
    throw new \InvalidArgumentException('Invalid resource type: ' . \gettype($resource));
}
/**
 * Parse an array of header values containing ";" separated data into an
 * array of associative arrays representing the header key value pair
 * data of the header. When a parameter does not contain a value, but just
 * contains a key, this function will inject a key with a '' string value.
 *
 * @param string|array $header Header to parse into components.
 *
 * @return array Returns the parsed header values.
 */
function parse_header($header)
{
    static $trimmed = "\"'  \n\t\r";
    $params = $matches = array();
    foreach (normalize_header($header) as $val) {
        $part = array();
        foreach (\preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) {
            if (\preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) {
                $m = $matches[0];
                if (isset($m[1])) {
                    $part[\trim($m[0], $trimmed)] = \trim($m[1], $trimmed);
                } else {
                    $part[] = \trim($m[0], $trimmed);
                }
            }
        }
        if ($part) {
            $params[] = $part;
        }
    }
    return $params;
}
/**
 * Converts an array of header values that may contain comma separated
 * headers into an array of headers with no comma separated values.
 *
 * @param string|array $header Header to normalize.
 *
 * @return array Returns the normalized header field values.
 */
function normalize_header($header)
{
    if (!\is_array($header)) {
        return \array_map('trim', \explode(',', $header));
    }
    $result = array();
    foreach ($header as $value) {
        foreach ((array) $value as $v) {
            if (\strpos($v, ',') === \false) {
                $result[] = $v;
                continue;
            }
            foreach (\preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $v) as $vv) {
                $result[] = \trim($vv);
            }
        }
    }
    return $result;
}
/**
 * Clone and modify a request with the given changes.
 *
 * The changes can be one of:
 * - method: (string) Changes the HTTP method.
 * - set_headers: (array) Sets the given headers.
 * - remove_headers: (array) Remove the given headers.
 * - body: (mixed) Sets the given body.
 * - uri: (UriInterface) Set the URI.
 * - query: (string) Set the query string value of the URI.
 * - version: (string) Set the protocol version.
 *
 * @param RequestInterface $request Request to clone and modify.
 * @param array            $changes Changes to apply.
 *
 * @return RequestInterface
 */
function modify_request(RequestInterface $request, array $changes)
{
    if (!$changes) {
        return $request;
    }
    $headers = $request->getHeaders();
    if (!isset($changes['uri'])) {
        $uri = $request->getUri();
    } else {
        // Remove the host header if one is on the URI
        if ($host = $changes['uri']->getHost()) {
            $changes['set_headers']['Host'] = $host;
        }
        $uri = $changes['uri'];
    }
    if (!empty($changes['remove_headers'])) {
        $headers = _caseless_remove($changes['remove_headers'], $headers);
    }
    if (!empty($changes['set_headers'])) {
        $headers = _caseless_remove(\array_keys($changes['set_headers']), $headers);
        $headers = $changes['set_headers'] + $headers;
    }
    if (isset($changes['query'])) {
        $uri = $uri->withQuery($changes['query']);
    }
    return new Request(isset($changes['method']) ? $changes['method'] : $request->getMethod(), $uri, $headers, isset($changes['body']) ? $changes['body'] : $request->getBody(), isset($changes['version']) ? $changes['version'] : $request->getProtocolVersion());
}
/**
 * Attempts to rewind a message body and throws an exception on failure.
 *
 * The body of the message will only be rewound if a call to `tell()` returns a
 * value other than `0`.
 *
 * @param MessageInterface $message Message to rewind
 *
 * @throws \RuntimeException
 */
function rewind_body(MessageInterface $message)
{
    $body = $message->getBody();
    if ($body->tell()) {
        $body->rewind();
    }
}
/**
 * Safely opens a PHP stream resource using a filename.
 *
 * When fopen fails, PHP normally raises a warning. This function adds an
 * error handler that checks for errors and throws an exception instead.
 *
 * @param string $filename File to open
 * @param string $mode     Mode used to open the file
 *
 * @return resource
 * @throws \RuntimeException if the file cannot be opened
 */
function try_fopen($filename, $mode)
{
    $ex = null;
    $fargs = \func_get_args();
    \set_error_handler(function () use($filename, $mode, &$ex, $fargs) {
        $ex = new \RuntimeException(\sprintf('Unable to open %s using mode %s: %s', $filename, $mode, $fargs[1]));
    });
    $handle = \fopen($filename, $mode);
    \restore_error_handler();
    if ($ex) {
        /** @var $ex \RuntimeException */
        throw $ex;
    }
    return $handle;
}
/**
 * Copy the contents of a stream into a string until the given number of
 * bytes have been read.
 *
 * @param StreamInterface $stream Stream to read
 * @param int             $maxLen Maximum number of bytes to read. Pass -1
 *                                to read the entire stream.
 * @return string
 * @throws \RuntimeException on error.
 */
function copy_to_string(StreamInterface $stream, $maxLen = -1)
{
    $buffer = '';
    if ($maxLen === -1) {
        while (!$stream->eof()) {
            $buf = $stream->read(1048576);
            // Using a loose equality here to match on '' and false.
            if ($buf == null) {
                break;
            }
            $buffer .= $buf;
        }
        return $buffer;
    }
    $len = 0;
    while (!$stream->eof() && $len < $maxLen) {
        $buf = $stream->read($maxLen - $len);
        // Using a loose equality here to match on '' and false.
        if ($buf == null) {
            break;
        }
        $buffer .= $buf;
        $len = \strlen($buffer);
    }
    return $buffer;
}
/**
 * Copy the contents of a stream into another stream until the given number
 * of bytes have been read.
 *
 * @param StreamInterface $source Stream to read from
 * @param StreamInterface $dest   Stream to write to
 * @param int             $maxLen Maximum number of bytes to read. Pass -1
 *                                to read the entire stream.
 *
 * @throws \RuntimeException on error.
 */
function copy_to_stream(StreamInterface $source, StreamInterface $dest, $maxLen = -1)
{
    if ($maxLen === -1) {
        while (!$source->eof()) {
            if (!$dest->write($source->read(1048576))) {
                break;
            }
        }
        return;
    }
    $bytes = 0;
    while (!$source->eof()) {
        $buf = $source->read($maxLen - $bytes);
        if (!($len = \strlen($buf))) {
            break;
        }
        $bytes += $len;
        $dest->write($buf);
        if ($bytes == $maxLen) {
            break;
        }
    }
}
/**
 * Calculate a hash of a Stream
 *
 * @param StreamInterface $stream    Stream to calculate the hash for
 * @param string          $algo      Hash algorithm (e.g. md5, crc32, etc)
 * @param bool            $rawOutput Whether or not to use raw output
 *
 * @return string Returns the hash of the stream
 * @throws \RuntimeException on error.
 */
function hash(StreamInterface $stream, $algo, $rawOutput = \false)
{
    $pos = $stream->tell();
    if ($pos > 0) {
        $stream->rewind();
    }
    $ctx = \hash_init($algo);
    while (!$stream->eof()) {
        \hash_update($ctx, $stream->read(1048576));
    }
    $out = \hash_final($ctx, (bool) $rawOutput);
    $stream->seek($pos);
    return $out;
}
/**
 * Read a line from the stream up to the maximum allowed buffer length
 *
 * @param StreamInterface $stream    Stream to read from
 * @param int             $maxLength Maximum buffer length
 *
 * @return string|bool
 */
function readline(StreamInterface $stream, $maxLength = null)
{
    $buffer = '';
    $size = 0;
    while (!$stream->eof()) {
        // Using a loose equality here to match on '' and false.
        if (null == ($byte = $stream->read(1))) {
            return $buffer;
        }
        $buffer .= $byte;
        // Break when a new line is found or the max length - 1 is reached
        if ($byte == \PHP_EOL || ++$size == $maxLength - 1) {
            break;
        }
    }
    return $buffer;
}
/**
 * Parses a request message string into a request object.
 *
 * @param string $message Request message string.
 *
 * @return Request
 */
function parse_request($message)
{
    $data = _parse_message($message);
    $matches = array();
    if (!\preg_match('/^[a-zA-Z]+\\s+([a-zA-Z]+:\\/\\/|\\/).*/', $data['start-line'], $matches)) {
        throw new \InvalidArgumentException('Invalid request string');
    }
    $parts = \explode(' ', $data['start-line'], 3);
    $subParts = isset($parts[2]) ? \explode('/', $parts[2]) : array();
    $version = isset($parts[2]) ? $subParts[1] : '1.1';
    $request = new Request($parts[0], $matches[1] === '/' ? _parse_request_uri($parts[1], $data['headers']) : $parts[1], $data['headers'], $data['body'], $version);
    return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]);
}
/**
 * Parses a request message string into a server request object.
 *
 * @param string $message Request message string.
 * @param array $serverParams Server params that will be added to the
 *                            ServerRequest object
 *
 * @return ServerRequest
 */
function parse_server_request($message, array $serverParams = array())
{
    $request = parse_request($message);
    return new ServerRequest($request->getMethod(), $request->getUri(), $request->getHeaders(), $request->getBody(), $request->getProtocolVersion(), $serverParams);
}
/**
 * Parses a response message string into a response object.
 *
 * @param string $message Response message string.
 *
 * @return Response
 */
function parse_response($message)
{
    $data = _parse_message($message);
    // According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space
    // between status-code and reason-phrase is required. But browsers accept
    // responses without space and reason as well.
    if (!\preg_match('/^HTTP\\/.* [0-9]{3}( .*|$)/', $data['start-line'])) {
        throw new \InvalidArgumentException('Invalid response string');
    }
    $parts = \explode(' ', $data['start-line'], 3);
    $subParts = \explode('/', $parts[0]);
    return new Response($parts[1], $data['headers'], $data['body'], $subParts[1], isset($parts[2]) ? $parts[2] : null);
}
/**
 * Parse a query string into an associative array.
 *
 * If multiple values are found for the same key, the value of that key
 * value pair will become an array. This function does not parse nested
 * PHP style arrays into an associative array (e.g., foo[a]=1&foo[b]=2 will
 * be parsed into ['foo[a]' => '1', 'foo[b]' => '2']).
 *
 * @param string      $str         Query string to parse
 * @param bool|string $urlEncoding How the query string is encoded
 *
 * @return array
 */
function parse_query($str, $urlEncoding = \true)
{
    $result = array();
    if ($str === '') {
        return $result;
    }
    if ($urlEncoding === \true) {
        $decoder = function ($value) {
            return \rawurldecode(\str_replace('+', ' ', $value));
        };
    } elseif ($urlEncoding == \PHP_QUERY_RFC3986) {
        $decoder = 'rawurldecode';
    } elseif ($urlEncoding == \PHP_QUERY_RFC1738) {
        $decoder = 'urldecode';
    } else {
        $decoder = function ($str) {
            return $str;
        };
    }
    foreach (\explode('&', $str) as $kvp) {
        $parts = \explode('=', $kvp, 2);
        $key = $decoder($parts[0]);
        $value = isset($parts[1]) ? $decoder($parts[1]) : null;
        if (!isset($result[$key])) {
            $result[$key] = $value;
        } else {
            if (!\is_array($result[$key])) {
                $result[$key] = array($result[$key]);
            }
            $result[$key][] = $value;
        }
    }
    return $result;
}
/**
 * Build a query string from an array of key value pairs.
 *
 * This function can use the return value of parseQuery() to build a query
 * string. This function does not modify the provided keys when an array is
 * encountered (like http_build_query would).
 *
 * @param array     $params   Query string parameters.
 * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986
 *                            to encode using RFC3986, or PHP_QUERY_RFC1738
 *                            to encode using RFC1738.
 * @return string
 */
function build_query(array $params, $encoding = \PHP_QUERY_RFC3986)
{
    if (!$params) {
        return '';
    }
    if ($encoding === \false) {
        $encoder = function ($str) {
            return $str;
        };
    } elseif ($encoding == \PHP_QUERY_RFC3986) {
        $encoder = 'rawurlencode';
    } elseif ($encoding == \PHP_QUERY_RFC1738) {
        $encoder = 'urlencode';
    } else {
        throw new \InvalidArgumentException('Invalid type');
    }
    $qs = '';
    foreach ($params as $k => $v) {
        $k = $encoder($k);
        if (!\is_array($v)) {
            $qs .= $k;
            if ($v !== null) {
                $qs .= '=' . $encoder($v);
            }
            $qs .= '&';
        } else {
            foreach ($v as $vv) {
                $qs .= $k;
                if ($vv !== null) {
                    $qs .= '=' . $encoder($vv);
                }
                $qs .= '&';
            }
        }
    }
    return $qs ? (string) \substr($qs, 0, -1) : '';
}
/**
 * Determines the mimetype of a file by looking at its extension.
 *
 * @param $filename
 *
 * @return null|string
 */
function mimetype_from_filename($filename)
{
    return mimetype_from_extension(\pathinfo($filename, \PATHINFO_EXTENSION));
}
/**
 * Maps a file extensions to a mimetype.
 *
 * @param $extension string The file extension.
 *
 * @return string|null
 * @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types
 */
function mimetype_from_extension($extension)
{
    static $mimetypes = array('7z' => 'application/x-7z-compressed', 'aac' => 'audio/x-aac', 'ai' => 'application/postscript', 'aif' => 'audio/x-aiff', 'asc' => 'text/plain', 'asf' => 'video/x-ms-asf', 'atom' => 'application/atom+xml', 'avi' => 'video/x-msvideo', 'bmp' => 'image/bmp', 'bz2' => 'application/x-bzip2', 'cer' => 'application/pkix-cert', 'crl' => 'application/pkix-crl', 'crt' => 'application/x-x509-ca-cert', 'css' => 'text/css', 'csv' => 'text/csv', 'cu' => 'application/cu-seeme', 'deb' => 'application/x-debian-package', 'doc' => 'application/msword', 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'dvi' => 'application/x-dvi', 'eot' => 'application/vnd.ms-fontobject', 'eps' => 'application/postscript', 'epub' => 'application/epub+zip', 'etx' => 'text/x-setext', 'flac' => 'audio/flac', 'flv' => 'video/x-flv', 'gif' => 'image/gif', 'gz' => 'application/gzip', 'htm' => 'text/html', 'html' => 'text/html', 'ico' => 'image/x-icon', 'ics' => 'text/calendar', 'ini' => 'text/plain', 'iso' => 'application/x-iso9660-image', 'jar' => 'application/java-archive', 'jpe' => 'image/jpeg', 'jpeg' => 'image/jpeg', 'jpg' => 'image/jpeg', 'js' => 'text/javascript', 'json' => 'application/json', 'latex' => 'application/x-latex', 'log' => 'text/plain', 'm4a' => 'audio/mp4', 'm4v' => 'video/mp4', 'mid' => 'audio/midi', 'midi' => 'audio/midi', 'mov' => 'video/quicktime', 'mp3' => 'audio/mpeg', 'mp4' => 'video/mp4', 'mp4a' => 'audio/mp4', 'mp4v' => 'video/mp4', 'mpe' => 'video/mpeg', 'mpeg' => 'video/mpeg', 'mpg' => 'video/mpeg', 'mpg4' => 'video/mp4', 'oga' => 'audio/ogg', 'ogg' => 'audio/ogg', 'ogv' => 'video/ogg', 'ogx' => 'application/ogg', 'pbm' => 'image/x-portable-bitmap', 'pdf' => 'application/pdf', 'pgm' => 'image/x-portable-graymap', 'png' => 'image/png', 'pnm' => 'image/x-portable-anymap', 'ppm' => 'image/x-portable-pixmap', 'ppt' => 'application/vnd.ms-powerpoint', 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'ps' => 'application/postscript', 'qt' => 'video/quicktime', 'rar' => 'application/x-rar-compressed', 'ras' => 'image/x-cmu-raster', 'rss' => 'application/rss+xml', 'rtf' => 'application/rtf', 'sgm' => 'text/sgml', 'sgml' => 'text/sgml', 'svg' => 'image/svg+xml', 'swf' => 'application/x-shockwave-flash', 'tar' => 'application/x-tar', 'tif' => 'image/tiff', 'tiff' => 'image/tiff', 'torrent' => 'application/x-bittorrent', 'ttf' => 'application/x-font-ttf', 'txt' => 'text/plain', 'wav' => 'audio/x-wav', 'webm' => 'video/webm', 'wma' => 'audio/x-ms-wma', 'wmv' => 'video/x-ms-wmv', 'woff' => 'application/x-font-woff', 'wsdl' => 'application/wsdl+xml', 'xbm' => 'image/x-xbitmap', 'xls' => 'application/vnd.ms-excel', 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xml' => 'application/xml', 'xpm' => 'image/x-xpixmap', 'xwd' => 'image/x-xwindowdump', 'yaml' => 'text/yaml', 'yml' => 'text/yaml', 'zip' => 'application/zip');
    $extension = \strtolower($extension);
    return isset($mimetypes[$extension]) ? $mimetypes[$extension] : null;
}
/**
 * Parses an HTTP message into an associative array.
 *
 * The array contains the "start-line" key containing the start line of
 * the message, "headers" key containing an associative array of header
 * array values, and a "body" key containing the body of the message.
 *
 * @param string $message HTTP request or response to parse.
 *
 * @return array
 * @internal
 */
function _parse_message($message)
{
    if (!$message) {
        throw new \InvalidArgumentException('Invalid message');
    }
    // Iterate over each line in the message, accounting for line endings
    $lines = \preg_split('/(\\r?\\n)/', $message, -1, \PREG_SPLIT_DELIM_CAPTURE);
    $result = array('start-line' => \array_shift($lines), 'headers' => array(), 'body' => '');
    \array_shift($lines);
    for ($i = 0, $totalLines = \count($lines); $i < $totalLines; $i += 2) {
        $line = $lines[$i];
        // If two line breaks were encountered, then this is the end of body
        if (empty($line)) {
            if ($i < $totalLines - 1) {
                $result['body'] = \implode('', \array_slice($lines, $i + 2));
            }
            break;
        }
        if (\strpos($line, ':')) {
            $parts = \explode(':', $line, 2);
            $key = \trim($parts[0]);
            $value = isset($parts[1]) ? \trim($parts[1]) : '';
            $result['headers'][$key][] = $value;
        }
    }
    return $result;
}
/**
 * Constructs a URI for an HTTP request message.
 *
 * @param string $path    Path from the start-line
 * @param array  $headers Array of headers (each value an array).
 *
 * @return string
 * @internal
 */
function _parse_request_uri($path, array $headers)
{
    $hostKey = \array_filter(\array_keys($headers), function ($k) {
        return \strtolower($k) === 'host';
    });
    // If no host is found, then a full URI cannot be constructed.
    if (!$hostKey) {
        return $path;
    }
    $host = $headers[\reset($hostKey)][0];
    $scheme = \substr($host, -4) === ':443' ? 'https' : 'http';
    return $scheme . '://' . $host . '/' . \ltrim($path, '/');
}
/** @internal */
function _caseless_remove($keys, array $data)
{
    $result = array();
    foreach ($keys as &$key) {
        $key = \strtolower($key);
    }
    foreach ($data as $k => $v) {
        if (!\in_array(\strtolower($k), $keys)) {
            $result[$k] = $v;
        }
    }
    return $result;
}
<?php

namespace _PHPStan_dcc7b7cff\RingCentral\Psr7;

use _PHPStan_dcc7b7cff\Psr\Http\Message\StreamInterface;
/**
 * PHP stream implementation.
 *
 * @var $stream
 */
class Stream implements StreamInterface
{
    private $stream;
    private $size;
    private $seekable;
    private $readable;
    private $writable;
    private $uri;
    private $customMetadata;
    /** @var array Hash of readable and writable stream types */
    private static $readWriteHash = array('read' => array('r' => \true, 'w+' => \true, 'r+' => \true, 'x+' => \true, 'c+' => \true, 'rb' => \true, 'w+b' => \true, 'r+b' => \true, 'x+b' => \true, 'c+b' => \true, 'rt' => \true, 'w+t' => \true, 'r+t' => \true, 'x+t' => \true, 'c+t' => \true, 'a+' => \true), 'write' => array('w' => \true, 'w+' => \true, 'rw' => \true, 'r+' => \true, 'x+' => \true, 'c+' => \true, 'wb' => \true, 'w+b' => \true, 'r+b' => \true, 'x+b' => \true, 'c+b' => \true, 'w+t' => \true, 'r+t' => \true, 'x+t' => \true, 'c+t' => \true, 'a' => \true, 'a+' => \true));
    /**
     * This constructor accepts an associative array of options.
     *
     * - size: (int) If a read stream would otherwise have an indeterminate
     *   size, but the size is known due to foreknownledge, then you can
     *   provide that size, in bytes.
     * - metadata: (array) Any additional metadata to return when the metadata
     *   of the stream is accessed.
     *
     * @param resource $stream  Stream resource to wrap.
     * @param array    $options Associative array of options.
     *
     * @throws \InvalidArgumentException if the stream is not a stream resource
     */
    public function __construct($stream, $options = array())
    {
        if (!\is_resource($stream)) {
            throw new \InvalidArgumentException('Stream must be a resource');
        }
        if (isset($options['size'])) {
            $this->size = $options['size'];
        }
        $this->customMetadata = isset($options['metadata']) ? $options['metadata'] : array();
        $this->stream = $stream;
        $meta = \stream_get_meta_data($this->stream);
        $this->seekable = $meta['seekable'];
        $this->readable = isset(self::$readWriteHash['read'][$meta['mode']]);
        $this->writable = isset(self::$readWriteHash['write'][$meta['mode']]);
        $this->uri = $this->getMetadata('uri');
    }
    public function __get($name)
    {
        if ($name == 'stream') {
            throw new \RuntimeException('The stream is detached');
        }
        throw new \BadMethodCallException('No value for ' . $name);
    }
    /**
     * Closes the stream when the destructed
     */
    public function __destruct()
    {
        $this->close();
    }
    public function __toString()
    {
        try {
            $this->seek(0);
            return (string) \stream_get_contents($this->stream);
        } catch (\Exception $e) {
            return '';
        }
    }
    public function getContents()
    {
        $contents = \stream_get_contents($this->stream);
        if ($contents === \false) {
            throw new \RuntimeException('Unable to read stream contents');
        }
        return $contents;
    }
    public function close()
    {
        if (isset($this->stream)) {
            if (\is_resource($this->stream)) {
                \fclose($this->stream);
            }
            $this->detach();
        }
    }
    public function detach()
    {
        if (!isset($this->stream)) {
            return null;
        }
        $result = $this->stream;
        unset($this->stream);
        $this->size = $this->uri = null;
        $this->readable = $this->writable = $this->seekable = \false;
        return $result;
    }
    public function getSize()
    {
        if ($this->size !== null) {
            return $this->size;
        }
        if (!isset($this->stream)) {
            return null;
        }
        // Clear the stat cache if the stream has a URI
        if ($this->uri) {
            \clearstatcache(\true, $this->uri);
        }
        $stats = \fstat($this->stream);
        if (isset($stats['size'])) {
            $this->size = $stats['size'];
            return $this->size;
        }
        return null;
    }
    public function isReadable()
    {
        return $this->readable;
    }
    public function isWritable()
    {
        return $this->writable;
    }
    public function isSeekable()
    {
        return $this->seekable;
    }
    public function eof()
    {
        return !$this->stream || \feof($this->stream);
    }
    public function tell()
    {
        $result = \ftell($this->stream);
        if ($result === \false) {
            throw new \RuntimeException('Unable to determine stream position');
        }
        return $result;
    }
    public function rewind()
    {
        $this->seek(0);
    }
    public function seek($offset, $whence = \SEEK_SET)
    {
        if (!$this->seekable) {
            throw new \RuntimeException('Stream is not seekable');
        } elseif (\fseek($this->stream, $offset, $whence) === -1) {
            throw new \RuntimeException('Unable to seek to stream position ' . $offset . ' with whence ' . \var_export($whence, \true));
        }
    }
    public function read($length)
    {
        if (!$this->readable) {
            throw new \RuntimeException('Cannot read from non-readable stream');
        }
        return \fread($this->stream, $length);
    }
    public function write($string)
    {
        if (!$this->writable) {
            throw new \RuntimeException('Cannot write to a non-writable stream');
        }
        // We can't know the size after writing anything
        $this->size = null;
        $result = \fwrite($this->stream, $string);
        if ($result === \false) {
            throw new \RuntimeException('Unable to write to stream');
        }
        return $result;
    }
    public function getMetadata($key = null)
    {
        if (!isset($this->stream)) {
            return $key ? null : array();
        } elseif (!$key) {
            return $this->customMetadata + \stream_get_meta_data($this->stream);
        } elseif (isset($this->customMetadata[$key])) {
            return $this->customMetadata[$key];
        }
        $meta = \stream_get_meta_data($this->stream);
        return isset($meta[$key]) ? $meta[$key] : null;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\RingCentral\Psr7;

use _PHPStan_dcc7b7cff\Psr\Http\Message\StreamInterface;
/**
 * Decorator used to return only a subset of a stream
 */
class LimitStream extends StreamDecoratorTrait implements StreamInterface
{
    /** @var int Offset to start reading from */
    private $offset;
    /** @var int Limit the number of bytes that can be read */
    private $limit;
    /**
     * @param StreamInterface $stream Stream to wrap
     * @param int             $limit  Total number of bytes to allow to be read
     *                                from the stream. Pass -1 for no limit.
     * @param int|null        $offset Position to seek to before reading (only
     *                                works on seekable streams).
     */
    public function __construct(StreamInterface $stream, $limit = -1, $offset = 0)
    {
        parent::__construct($stream);
        $this->setLimit($limit);
        $this->setOffset($offset);
    }
    public function eof()
    {
        // Always return true if the underlying stream is EOF
        if ($this->stream->eof()) {
            return \true;
        }
        // No limit and the underlying stream is not at EOF
        if ($this->limit == -1) {
            return \false;
        }
        return $this->stream->tell() >= $this->offset + $this->limit;
    }
    /**
     * Returns the size of the limited subset of data
     * {@inheritdoc}
     */
    public function getSize()
    {
        if (null === ($length = $this->stream->getSize())) {
            return null;
        } elseif ($this->limit == -1) {
            return $length - $this->offset;
        } else {
            return \min($this->limit, $length - $this->offset);
        }
    }
    /**
     * Allow for a bounded seek on the read limited stream
     * {@inheritdoc}
     */
    public function seek($offset, $whence = \SEEK_SET)
    {
        if ($whence !== \SEEK_SET || $offset < 0) {
            throw new \RuntimeException(\sprintf('Cannot seek to offset % with whence %s', $offset, $whence));
        }
        $offset += $this->offset;
        if ($this->limit !== -1) {
            if ($offset > $this->offset + $this->limit) {
                $offset = $this->offset + $this->limit;
            }
        }
        $this->stream->seek($offset);
    }
    /**
     * Give a relative tell()
     * {@inheritdoc}
     */
    public function tell()
    {
        return $this->stream->tell() - $this->offset;
    }
    /**
     * Set the offset to start limiting from
     *
     * @param int $offset Offset to seek to and begin byte limiting from
     *
     * @throws \RuntimeException if the stream cannot be seeked.
     */
    public function setOffset($offset)
    {
        $current = $this->stream->tell();
        if ($current !== $offset) {
            // If the stream cannot seek to the offset position, then read to it
            if ($this->stream->isSeekable()) {
                $this->stream->seek($offset);
            } elseif ($current > $offset) {
                throw new \RuntimeException("Could not seek to stream offset {$offset}");
            } else {
                $this->stream->read($offset - $current);
            }
        }
        $this->offset = $offset;
    }
    /**
     * Set the limit of bytes that the decorator allows to be read from the
     * stream.
     *
     * @param int $limit Number of bytes to allow to be read from the stream.
     *                   Use -1 for no limit.
     */
    public function setLimit($limit)
    {
        $this->limit = $limit;
    }
    public function read($length)
    {
        if ($this->limit == -1) {
            return $this->stream->read($length);
        }
        // Check if the current position is less than the total allowed
        // bytes + original offset
        $remaining = $this->offset + $this->limit - $this->stream->tell();
        if ($remaining > 0) {
            // Only return the amount of requested data, ensuring that the byte
            // limit is not exceeded
            return $this->stream->read(\min($remaining, $length));
        }
        return '';
    }
}
<?php

namespace _PHPStan_dcc7b7cff\RingCentral\Psr7;

use _PHPStan_dcc7b7cff\Psr\Http\Message\ServerRequestInterface;
use _PHPStan_dcc7b7cff\RingCentral\Psr7\Request;
/**
 * PSR-7 server-side request implementation.
 */
class ServerRequest extends Request implements ServerRequestInterface
{
    private $attributes = array();
    private $serverParams = array();
    private $fileParams = array();
    private $cookies = array();
    private $queryParams = array();
    private $parsedBody = null;
    /**
     * @param null|string $method HTTP method for the request.
     * @param null|string|UriInterface $uri URI for the request.
     * @param array $headers Headers for the message.
     * @param string|resource|StreamInterface $body Message body.
     * @param string $protocolVersion HTTP protocol version.
     * @param array $serverParams Server params of the request.
     *
     * @throws InvalidArgumentException for an invalid URI
     */
    public function __construct($method, $uri, array $headers = array(), $body = null, $protocolVersion = '1.1', $serverParams = array())
    {
        parent::__construct($method, $uri, $headers, $body, $protocolVersion);
        $this->serverParams = $serverParams;
    }
    public function getServerParams()
    {
        return $this->serverParams;
    }
    public function getCookieParams()
    {
        return $this->cookies;
    }
    public function withCookieParams(array $cookies)
    {
        $new = clone $this;
        $new->cookies = $cookies;
        return $new;
    }
    public function getQueryParams()
    {
        return $this->queryParams;
    }
    public function withQueryParams(array $query)
    {
        $new = clone $this;
        $new->queryParams = $query;
        return $new;
    }
    public function getUploadedFiles()
    {
        return $this->fileParams;
    }
    public function withUploadedFiles(array $uploadedFiles)
    {
        $new = clone $this;
        $new->fileParams = $uploadedFiles;
        return $new;
    }
    public function getParsedBody()
    {
        return $this->parsedBody;
    }
    public function withParsedBody($data)
    {
        $new = clone $this;
        $new->parsedBody = $data;
        return $new;
    }
    public function getAttributes()
    {
        return $this->attributes;
    }
    public function getAttribute($name, $default = null)
    {
        if (!\array_key_exists($name, $this->attributes)) {
            return $default;
        }
        return $this->attributes[$name];
    }
    public function withAttribute($name, $value)
    {
        $new = clone $this;
        $new->attributes[$name] = $value;
        return $new;
    }
    public function withoutAttribute($name)
    {
        $new = clone $this;
        unset($new->attributes[$name]);
        return $new;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\RingCentral\Psr7;

use _PHPStan_dcc7b7cff\Psr\Http\Message\StreamInterface;
/**
 * Provides a read only stream that pumps data from a PHP callable.
 *
 * When invoking the provided callable, the PumpStream will pass the amount of
 * data requested to read to the callable. The callable can choose to ignore
 * this value and return fewer or more bytes than requested. Any extra data
 * returned by the provided callable is buffered internally until drained using
 * the read() function of the PumpStream. The provided callable MUST return
 * false when there is no more data to read.
 */
class PumpStream implements StreamInterface
{
    /** @var callable */
    private $source;
    /** @var int */
    private $size;
    /** @var int */
    private $tellPos = 0;
    /** @var array */
    private $metadata;
    /** @var BufferStream */
    private $buffer;
    /**
     * @param callable $source Source of the stream data. The callable MAY
     *                         accept an integer argument used to control the
     *                         amount of data to return. The callable MUST
     *                         return a string when called, or false on error
     *                         or EOF.
     * @param array $options   Stream options:
     *                         - metadata: Hash of metadata to use with stream.
     *                         - size: Size of the stream, if known.
     */
    public function __construct($source, array $options = array())
    {
        $this->source = $source;
        $this->size = isset($options['size']) ? $options['size'] : null;
        $this->metadata = isset($options['metadata']) ? $options['metadata'] : array();
        $this->buffer = new BufferStream();
    }
    public function __toString()
    {
        try {
            return copy_to_string($this);
        } catch (\Exception $e) {
            return '';
        }
    }
    public function close()
    {
        $this->detach();
    }
    public function detach()
    {
        $this->tellPos = \false;
        $this->source = null;
    }
    public function getSize()
    {
        return $this->size;
    }
    public function tell()
    {
        return $this->tellPos;
    }
    public function eof()
    {
        return !$this->source;
    }
    public function isSeekable()
    {
        return \false;
    }
    public function rewind()
    {
        $this->seek(0);
    }
    public function seek($offset, $whence = \SEEK_SET)
    {
        throw new \RuntimeException('Cannot seek a PumpStream');
    }
    public function isWritable()
    {
        return \false;
    }
    public function write($string)
    {
        throw new \RuntimeException('Cannot write to a PumpStream');
    }
    public function isReadable()
    {
        return \true;
    }
    public function read($length)
    {
        $data = $this->buffer->read($length);
        $readLen = \strlen($data);
        $this->tellPos += $readLen;
        $remaining = $length - $readLen;
        if ($remaining) {
            $this->pump($remaining);
            $data .= $this->buffer->read($remaining);
            $this->tellPos += \strlen($data) - $readLen;
        }
        return $data;
    }
    public function getContents()
    {
        $result = '';
        while (!$this->eof()) {
            $result .= $this->read(1000000);
        }
        return $result;
    }
    public function getMetadata($key = null)
    {
        if (!$key) {
            return $this->metadata;
        }
        return isset($this->metadata[$key]) ? $this->metadata[$key] : null;
    }
    private function pump($length)
    {
        if ($this->source) {
            do {
                $data = \call_user_func($this->source, $length);
                if ($data === \false || $data === null) {
                    $this->source = null;
                    return;
                }
                $this->buffer->write($data);
                $length -= \strlen($data);
            } while ($length > 0);
        }
    }
}
<?php

namespace _PHPStan_dcc7b7cff\RingCentral\Psr7;

use _PHPStan_dcc7b7cff\Psr\Http\Message\StreamInterface;
/**
 * Stream decorator that prevents a stream from being seeked
 */
class NoSeekStream extends StreamDecoratorTrait implements StreamInterface
{
    public function seek($offset, $whence = \SEEK_SET)
    {
        throw new \RuntimeException('Cannot seek a NoSeekStream');
    }
    public function isSeekable()
    {
        return \false;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\RingCentral\Psr7;

use _PHPStan_dcc7b7cff\Psr\Http\Message\StreamInterface;
/**
 * Trait implementing functionality common to requests and responses.
 */
abstract class MessageTrait
{
    /** @var array Cached HTTP header collection with lowercase key to values */
    protected $headers = array();
    /** @var array Actual key to list of values per header. */
    protected $headerLines = array();
    /** @var string */
    protected $protocol = '1.1';
    /** @var StreamInterface */
    protected $stream;
    public function getProtocolVersion()
    {
        return $this->protocol;
    }
    public function withProtocolVersion($version)
    {
        if ($this->protocol === $version) {
            return $this;
        }
        $new = clone $this;
        $new->protocol = $version;
        return $new;
    }
    public function getHeaders()
    {
        return $this->headerLines;
    }
    public function hasHeader($header)
    {
        return isset($this->headers[\strtolower($header)]);
    }
    public function getHeader($header)
    {
        $name = \strtolower($header);
        return isset($this->headers[$name]) ? $this->headers[$name] : array();
    }
    public function getHeaderLine($header)
    {
        return \implode(', ', $this->getHeader($header));
    }
    public function withHeader($header, $value)
    {
        $new = clone $this;
        $header = \trim($header);
        $name = \strtolower($header);
        if (!\is_array($value)) {
            $new->headers[$name] = array(\trim($value));
        } else {
            $new->headers[$name] = $value;
            foreach ($new->headers[$name] as &$v) {
                $v = \trim($v);
            }
        }
        // Remove the header lines.
        foreach (\array_keys($new->headerLines) as $key) {
            if (\strtolower($key) === $name) {
                unset($new->headerLines[$key]);
            }
        }
        // Add the header line.
        $new->headerLines[$header] = $new->headers[$name];
        return $new;
    }
    public function withAddedHeader($header, $value)
    {
        if (!$this->hasHeader($header)) {
            return $this->withHeader($header, $value);
        }
        $header = \trim($header);
        $name = \strtolower($header);
        $value = (array) $value;
        foreach ($value as &$v) {
            $v = \trim($v);
        }
        $new = clone $this;
        $new->headers[$name] = \array_merge($new->headers[$name], $value);
        $new->headerLines[$header] = \array_merge($new->headerLines[$header], $value);
        return $new;
    }
    public function withoutHeader($header)
    {
        if (!$this->hasHeader($header)) {
            return $this;
        }
        $new = clone $this;
        $name = \strtolower($header);
        unset($new->headers[$name]);
        foreach (\array_keys($new->headerLines) as $key) {
            if (\strtolower($key) === $name) {
                unset($new->headerLines[$key]);
            }
        }
        return $new;
    }
    public function getBody()
    {
        if (!$this->stream) {
            $this->stream = stream_for('');
        }
        return $this->stream;
    }
    public function withBody(StreamInterface $body)
    {
        if ($body === $this->stream) {
            return $this;
        }
        $new = clone $this;
        $new->stream = $body;
        return $new;
    }
    protected function setHeaders(array $headers)
    {
        $this->headerLines = $this->headers = array();
        foreach ($headers as $header => $value) {
            $header = \trim($header);
            $name = \strtolower($header);
            if (!\is_array($value)) {
                $value = \trim($value);
                $this->headers[$name][] = $value;
                $this->headerLines[$header][] = $value;
            } else {
                foreach ($value as $v) {
                    $v = \trim($v);
                    $this->headers[$name][] = $v;
                    $this->headerLines[$header][] = $v;
                }
            }
        }
    }
}
<?php

namespace _PHPStan_dcc7b7cff\RingCentral\Psr7;

use _PHPStan_dcc7b7cff\Psr\Http\Message\StreamInterface;
/**
 * Stream decorator that begins dropping data once the size of the underlying
 * stream becomes too full.
 */
class DroppingStream extends StreamDecoratorTrait implements StreamInterface
{
    private $maxLength;
    /**
     * @param StreamInterface $stream    Underlying stream to decorate.
     * @param int             $maxLength Maximum size before dropping data.
     */
    public function __construct(StreamInterface $stream, $maxLength)
    {
        parent::__construct($stream);
        $this->maxLength = $maxLength;
    }
    public function write($string)
    {
        $diff = $this->maxLength - $this->stream->getSize();
        // Begin returning 0 when the underlying stream is too large.
        if ($diff <= 0) {
            return 0;
        }
        // Write the stream or a subset of the stream if needed.
        if (\strlen($string) < $diff) {
            return $this->stream->write($string);
        }
        return $this->stream->write(\substr($string, 0, $diff));
    }
}
<?php

namespace _PHPStan_dcc7b7cff\RingCentral\Psr7;

use _PHPStan_dcc7b7cff\Psr\Http\Message\StreamInterface;
/**
 * Lazily reads or writes to a file that is opened only after an IO operation
 * take place on the stream.
 */
class LazyOpenStream extends StreamDecoratorTrait implements StreamInterface
{
    /** @var string File to open */
    private $filename;
    /** @var string $mode */
    private $mode;
    /**
     * @param string $filename File to lazily open
     * @param string $mode     fopen mode to use when opening the stream
     */
    public function __construct($filename, $mode)
    {
        $this->filename = $filename;
        $this->mode = $mode;
        parent::__construct();
    }
    /**
     * Creates the underlying stream lazily when required.
     *
     * @return StreamInterface
     */
    protected function createStream()
    {
        return stream_for(try_fopen($this->filename, $this->mode));
    }
}
<?php

namespace _PHPStan_dcc7b7cff\RingCentral\Psr7;

use InvalidArgumentException;
use _PHPStan_dcc7b7cff\Psr\Http\Message\RequestInterface;
use _PHPStan_dcc7b7cff\Psr\Http\Message\StreamInterface;
use _PHPStan_dcc7b7cff\Psr\Http\Message\UriInterface;
/**
 * PSR-7 request implementation.
 */
class Request extends MessageTrait implements RequestInterface
{
    /** @var string */
    private $method;
    /** @var null|string */
    private $requestTarget;
    /** @var null|UriInterface */
    private $uri;
    /**
     * @param null|string $method HTTP method for the request.
     * @param null|string|UriInterface $uri URI for the request.
     * @param array $headers Headers for the message.
     * @param string|resource|StreamInterface $body Message body.
     * @param string $protocolVersion HTTP protocol version.
     *
     * @throws InvalidArgumentException for an invalid URI
     */
    public function __construct($method, $uri, array $headers = array(), $body = null, $protocolVersion = '1.1')
    {
        if (\is_string($uri)) {
            $uri = new Uri($uri);
        } elseif (!$uri instanceof UriInterface) {
            throw new \InvalidArgumentException('_PHPStan_dcc7b7cff\\URI must be a string or Psr\\Http\\Message\\UriInterface');
        }
        $this->method = \strtoupper($method);
        $this->uri = $uri;
        $this->setHeaders($headers);
        $this->protocol = $protocolVersion;
        $host = $uri->getHost();
        if ($host && !$this->hasHeader('Host')) {
            $this->updateHostFromUri($host);
        }
        if ($body) {
            $this->stream = stream_for($body);
        }
    }
    public function getRequestTarget()
    {
        if ($this->requestTarget !== null) {
            return $this->requestTarget;
        }
        $target = $this->uri->getPath();
        if ($target == null) {
            $target = '/';
        }
        if ($this->uri->getQuery()) {
            $target .= '?' . $this->uri->getQuery();
        }
        return $target;
    }
    public function withRequestTarget($requestTarget)
    {
        if (\preg_match('#\\s#', $requestTarget)) {
            throw new InvalidArgumentException('Invalid request target provided; cannot contain whitespace');
        }
        $new = clone $this;
        $new->requestTarget = $requestTarget;
        return $new;
    }
    public function getMethod()
    {
        return $this->method;
    }
    public function withMethod($method)
    {
        $new = clone $this;
        $new->method = \strtoupper($method);
        return $new;
    }
    public function getUri()
    {
        return $this->uri;
    }
    public function withUri(UriInterface $uri, $preserveHost = \false)
    {
        if ($uri === $this->uri) {
            return $this;
        }
        $new = clone $this;
        $new->uri = $uri;
        if (!$preserveHost) {
            if ($host = $uri->getHost()) {
                $new->updateHostFromUri($host);
            }
        }
        return $new;
    }
    public function withHeader($header, $value)
    {
        /** @var Request $newInstance */
        $newInstance = parent::withHeader($header, $value);
        return $newInstance;
    }
    private function updateHostFromUri($host)
    {
        // Ensure Host is the first header.
        // See: http://tools.ietf.org/html/rfc7230#section-5.4
        if ($port = $this->uri->getPort()) {
            $host .= ':' . $port;
        }
        $this->headerLines = array('Host' => array($host)) + $this->headerLines;
        $this->headers = array('host' => array($host)) + $this->headers;
    }
}
Copyright (c) 2015 Michael Dowling, https://github.com/mtdowling <mtdowling@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

namespace _PHPStan_dcc7b7cff\React\Promise\Timer;

use RuntimeException;
class TimeoutException extends RuntimeException
{
    /** @var float */
    private $timeout;
    /**
     * @param float                      $timeout
     * @param string|null                $message
     * @param int|null                   $code
     * @param null|\Exception|\Throwable $previous
     */
    public function __construct($timeout, $message = '', $code = 0, $previous = null)
    {
        // Preserve compatibility with our former nullable signature, but avoid invalid arguments for the parent constructor:
        parent::__construct((string) $message, (int) $code, $previous);
        $this->timeout = (float) $timeout;
    }
    /**
     * Get the timeout value in seconds.
     *
     * @return float
     */
    public function getTimeout()
    {
        return $this->timeout;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Promise\Timer;

if (!\function_exists('_PHPStan_dcc7b7cff\\React\\Promise\\Timer\\timeout')) {
    require __DIR__ . '/functions.php';
}
<?php

namespace _PHPStan_dcc7b7cff\React\Promise\Timer;

use _PHPStan_dcc7b7cff\React\EventLoop\Loop;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use _PHPStan_dcc7b7cff\React\Promise\Promise;
use _PHPStan_dcc7b7cff\React\Promise\PromiseInterface;
/**
 * Cancel operations that take *too long*.
 *
 * You need to pass in an input `$promise` that represents a pending operation
 * and timeout parameters. It returns a new promise with the following
 * resolution behavior:
 *
 * - If the input `$promise` resolves before `$time` seconds, resolve the
 *   resulting promise with its fulfillment value.
 *
 * - If the input `$promise` rejects before `$time` seconds, reject the
 *   resulting promise with its rejection value.
 *
 * - If the input `$promise` does not settle before `$time` seconds, *cancel*
 *   the operation and reject the resulting promise with a [`TimeoutException`](#timeoutexception).
 *
 * Internally, the given `$time` value will be used to start a timer that will
 * *cancel* the pending operation once it triggers. This implies that if you
 * pass a really small (or negative) value, it will still start a timer and will
 * thus trigger at the earliest possible time in the future.
 *
 * If the input `$promise` is already settled, then the resulting promise will
 * resolve or reject immediately without starting a timer at all.
 *
 * This function takes an optional `LoopInterface|null $loop` parameter that can be used to
 * pass the event loop instance to use. You can use a `null` value here in order to
 * use the [default loop](https://github.com/reactphp/event-loop#loop). This value
 * SHOULD NOT be given unless you're sure you want to explicitly use a given event
 * loop instance.
 *
 * A common use case for handling only resolved values looks like this:
 *
 * ```php
 * $promise = accessSomeRemoteResource();
 * React\Promise\Timer\timeout($promise, 10.0)->then(function ($value) {
 *     // the operation finished within 10.0 seconds
 * });
 * ```
 *
 * A more complete example could look like this:
 *
 * ```php
 * $promise = accessSomeRemoteResource();
 * React\Promise\Timer\timeout($promise, 10.0)->then(
 *     function ($value) {
 *         // the operation finished within 10.0 seconds
 *     },
 *     function ($error) {
 *         if ($error instanceof React\Promise\Timer\TimeoutException) {
 *             // the operation has failed due to a timeout
 *         } else {
 *             // the input operation has failed due to some other error
 *         }
 *     }
 * );
 * ```
 *
 * Or if you're using [react/promise v3](https://github.com/reactphp/promise):
 *
 * ```php
 * React\Promise\Timer\timeout($promise, 10.0)->then(function ($value) {
 *     // the operation finished within 10.0 seconds
 * })->catch(function (React\Promise\Timer\TimeoutException $error) {
 *     // the operation has failed due to a timeout
 * })->catch(function (Throwable $error) {
 *     // the input operation has failed due to some other error
 * });
 * ```
 *
 * As discussed above, the [`timeout()`](#timeout) function will take care of
 * the underlying operation if it takes *too long*. In this case, you can be
 * sure the resulting promise will always be rejected with a
 * [`TimeoutException`](#timeoutexception). On top of this, the function will
 * try to *cancel* the underlying operation. Responsibility for this
 * cancellation logic is left up to the underlying operation.
 *
 * - A common use case involves cleaning up any resources like open network
 *   sockets or file handles or terminating external processes or timers.
 *
 * - If the given input `$promise` does not support cancellation, then this is a
 *   NO-OP. This means that while the resulting promise will still be rejected,
 *   the underlying input `$promise` may still be pending and can hence continue
 *   consuming resources
 *
 * On top of this, the returned promise is implemented in such a way that it can
 * be cancelled when it is still pending. Cancelling a pending promise will
 * cancel the underlying operation. As discussed above, responsibility for this
 * cancellation logic is left up to the underlying operation.
 *
 * ```php
 * $promise = accessSomeRemoteResource();
 * $timeout = React\Promise\Timer\timeout($promise, 10.0);
 *
 * $timeout->cancel();
 * ```
 *
 * For more details on the promise cancellation, please refer to the
 * [Promise documentation](https://github.com/reactphp/promise#cancellablepromiseinterface).
 *
 * If you want to wait for multiple promises to resolve, you can use the normal
 * promise primitives like this:
 *
 * ```php
 * $promises = array(
 *     accessSomeRemoteResource(),
 *     accessSomeRemoteResource(),
 *     accessSomeRemoteResource()
 * );
 *
 * $promise = React\Promise\all($promises);
 *
 * React\Promise\Timer\timeout($promise, 10)->then(function ($values) {
 *     // *all* promises resolved
 * });
 * ```
 *
 * The applies to all promise collection primitives alike, i.e. `all()`,
 * `race()`, `any()`, `some()` etc.
 *
 * For more details on the promise primitives, please refer to the
 * [Promise documentation](https://github.com/reactphp/promise#functions).
 *
 * @param PromiseInterface<mixed, \Throwable|mixed> $promise
 * @param float $time
 * @param ?LoopInterface $loop
 * @return PromiseInterface<mixed, TimeoutException|\Throwable|mixed>
 */
function timeout(PromiseInterface $promise, $time, LoopInterface $loop = null)
{
    // cancelling this promise will only try to cancel the input promise,
    // thus leaving responsibility to the input promise.
    $canceller = null;
    if (\method_exists($promise, 'cancel')) {
        // pass promise by reference to clean reference after cancellation handler
        // has been invoked once in order to avoid garbage references in call stack.
        $canceller = function () use(&$promise) {
            $promise->cancel();
            $promise = null;
        };
    }
    if ($loop === null) {
        $loop = Loop::get();
    }
    return new Promise(function ($resolve, $reject) use($loop, $time, $promise) {
        $timer = null;
        $promise = $promise->then(function ($v) use(&$timer, $loop, $resolve) {
            if ($timer) {
                $loop->cancelTimer($timer);
            }
            $timer = \false;
            $resolve($v);
        }, function ($v) use(&$timer, $loop, $reject) {
            if ($timer) {
                $loop->cancelTimer($timer);
            }
            $timer = \false;
            $reject($v);
        });
        // promise already resolved => no need to start timer
        if ($timer === \false) {
            return;
        }
        // start timeout timer which will cancel the input promise
        $timer = $loop->addTimer($time, function () use($time, &$promise, $reject) {
            $reject(new TimeoutException($time, 'Timed out after ' . $time . ' seconds'));
            // try to invoke cancellation handler of input promise and then clean
            // reference in order to avoid garbage references in call stack.
            if (\method_exists($promise, 'cancel')) {
                $promise->cancel();
            }
            $promise = null;
        });
    }, $canceller);
}
/**
 * Create a new promise that resolves in `$time` seconds.
 *
 * ```php
 * React\Promise\Timer\sleep(1.5)->then(function () {
 *     echo 'Thanks for waiting!' . PHP_EOL;
 * });
 * ```
 *
 * Internally, the given `$time` value will be used to start a timer that will
 * resolve the promise once it triggers. This implies that if you pass a really
 * small (or negative) value, it will still start a timer and will thus trigger
 * at the earliest possible time in the future.
 *
 * This function takes an optional `LoopInterface|null $loop` parameter that can be used to
 * pass the event loop instance to use. You can use a `null` value here in order to
 * use the [default loop](https://github.com/reactphp/event-loop#loop). This value
 * SHOULD NOT be given unless you're sure you want to explicitly use a given event
 * loop instance.
 *
 * The returned promise is implemented in such a way that it can be cancelled
 * when it is still pending. Cancelling a pending promise will reject its value
 * with a `RuntimeException` and clean up any pending timers.
 *
 * ```php
 * $timer = React\Promise\Timer\sleep(2.0);
 *
 * $timer->cancel();
 * ```
 *
 * @param float $time
 * @param ?LoopInterface $loop
 * @return PromiseInterface<void, \RuntimeException>
 */
function sleep($time, LoopInterface $loop = null)
{
    if ($loop === null) {
        $loop = Loop::get();
    }
    $timer = null;
    return new Promise(function ($resolve) use($loop, $time, &$timer) {
        // resolve the promise when the timer fires in $time seconds
        $timer = $loop->addTimer($time, function () use($resolve) {
            $resolve(null);
        });
    }, function () use(&$timer, $loop) {
        // cancelling this promise will cancel the timer, clean the reference
        // in order to avoid garbage references in call stack and then reject.
        $loop->cancelTimer($timer);
        $timer = null;
        throw new \RuntimeException('Timer cancelled');
    });
}
/**
 * [Deprecated] Create a new promise that resolves in `$time` seconds with the `$time` as the fulfillment value.
 *
 * ```php
 * React\Promise\Timer\resolve(1.5)->then(function ($time) {
 *     echo 'Thanks for waiting ' . $time . ' seconds' . PHP_EOL;
 * });
 * ```
 *
 * Internally, the given `$time` value will be used to start a timer that will
 * resolve the promise once it triggers. This implies that if you pass a really
 * small (or negative) value, it will still start a timer and will thus trigger
 * at the earliest possible time in the future.
 *
 * This function takes an optional `LoopInterface|null $loop` parameter that can be used to
 * pass the event loop instance to use. You can use a `null` value here in order to
 * use the [default loop](https://github.com/reactphp/event-loop#loop). This value
 * SHOULD NOT be given unless you're sure you want to explicitly use a given event
 * loop instance.
 *
 * The returned promise is implemented in such a way that it can be cancelled
 * when it is still pending. Cancelling a pending promise will reject its value
 * with a `RuntimeException` and clean up any pending timers.
 *
 * ```php
 * $timer = React\Promise\Timer\resolve(2.0);
 *
 * $timer->cancel();
 * ```
 *
 * @param float $time
 * @param ?LoopInterface $loop
 * @return PromiseInterface<float, \RuntimeException>
 * @deprecated 1.8.0 See `sleep()` instead
 * @see sleep()
 */
function resolve($time, LoopInterface $loop = null)
{
    return \sleep($time, $loop)->then(function () use($time) {
        return $time;
    });
}
/**
 * [Deprecated] Create a new promise which rejects in `$time` seconds with a `TimeoutException`.
 *
 * ```php
 * React\Promise\Timer\reject(2.0)->then(null, function (React\Promise\Timer\TimeoutException $e) {
 *     echo 'Rejected after ' . $e->getTimeout() . ' seconds ' . PHP_EOL;
 * });
 * ```
 *
 * Internally, the given `$time` value will be used to start a timer that will
 * reject the promise once it triggers. This implies that if you pass a really
 * small (or negative) value, it will still start a timer and will thus trigger
 * at the earliest possible time in the future.
 *
 * This function takes an optional `LoopInterface|null $loop` parameter that can be used to
 * pass the event loop instance to use. You can use a `null` value here in order to
 * use the [default loop](https://github.com/reactphp/event-loop#loop). This value
 * SHOULD NOT be given unless you're sure you want to explicitly use a given event
 * loop instance.
 *
 * The returned promise is implemented in such a way that it can be cancelled
 * when it is still pending. Cancelling a pending promise will reject its value
 * with a `RuntimeException` and clean up any pending timers.
 *
 * ```php
 * $timer = React\Promise\Timer\reject(2.0);
 *
 * $timer->cancel();
 * ```
 *
 * @param float         $time
 * @param LoopInterface $loop
 * @return PromiseInterface<void, TimeoutException|\RuntimeException>
 * @deprecated 1.8.0 See `sleep()` instead
 * @see sleep()
 */
function reject($time, LoopInterface $loop = null)
{
    return \sleep($time, $loop)->then(function () use($time) {
        throw new TimeoutException($time, 'Timer expired after ' . $time . ' seconds');
    });
}
The MIT License (MIT)

Copyright (c) 2015 Christian Lück, Cees-Jan Kiewiet, Jan Sorgalla, Chris Boden

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

namespace _PHPStan_dcc7b7cff\React\Promise;

class Promise implements ExtendedPromiseInterface, CancellablePromiseInterface
{
    private $canceller;
    private $result;
    private $handlers = [];
    private $progressHandlers = [];
    private $requiredCancelRequests = 0;
    private $cancelRequests = 0;
    public function __construct(callable $resolver, callable $canceller = null)
    {
        $this->canceller = $canceller;
        // Explicitly overwrite arguments with null values before invoking
        // resolver function. This ensure that these arguments do not show up
        // in the stack trace in PHP 7+ only.
        $cb = $resolver;
        $resolver = $canceller = null;
        $this->call($cb);
    }
    public function then(callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null)
    {
        if (null !== $this->result) {
            return $this->result->then($onFulfilled, $onRejected, $onProgress);
        }
        if (null === $this->canceller) {
            return new static($this->resolver($onFulfilled, $onRejected, $onProgress));
        }
        // This promise has a canceller, so we create a new child promise which
        // has a canceller that invokes the parent canceller if all other
        // followers are also cancelled. We keep a reference to this promise
        // instance for the static canceller function and clear this to avoid
        // keeping a cyclic reference between parent and follower.
        $parent = $this;
        ++$parent->requiredCancelRequests;
        return new static($this->resolver($onFulfilled, $onRejected, $onProgress), static function () use(&$parent) {
            if (++$parent->cancelRequests >= $parent->requiredCancelRequests) {
                $parent->cancel();
            }
            $parent = null;
        });
    }
    public function done(callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null)
    {
        if (null !== $this->result) {
            return $this->result->done($onFulfilled, $onRejected, $onProgress);
        }
        $this->handlers[] = static function (ExtendedPromiseInterface $promise) use($onFulfilled, $onRejected) {
            $promise->done($onFulfilled, $onRejected);
        };
        if ($onProgress) {
            $this->progressHandlers[] = $onProgress;
        }
    }
    public function otherwise(callable $onRejected)
    {
        return $this->then(null, static function ($reason) use($onRejected) {
            if (!_checkTypehint($onRejected, $reason)) {
                return new RejectedPromise($reason);
            }
            return $onRejected($reason);
        });
    }
    public function always(callable $onFulfilledOrRejected)
    {
        return $this->then(static function ($value) use($onFulfilledOrRejected) {
            return resolve($onFulfilledOrRejected())->then(function () use($value) {
                return $value;
            });
        }, static function ($reason) use($onFulfilledOrRejected) {
            return resolve($onFulfilledOrRejected())->then(function () use($reason) {
                return new RejectedPromise($reason);
            });
        });
    }
    public function progress(callable $onProgress)
    {
        return $this->then(null, null, $onProgress);
    }
    public function cancel()
    {
        if (null === $this->canceller || null !== $this->result) {
            return;
        }
        $canceller = $this->canceller;
        $this->canceller = null;
        $this->call($canceller);
    }
    private function resolver(callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null)
    {
        return function ($resolve, $reject, $notify) use($onFulfilled, $onRejected, $onProgress) {
            if ($onProgress) {
                $progressHandler = static function ($update) use($notify, $onProgress) {
                    try {
                        $notify($onProgress($update));
                    } catch (\Throwable $e) {
                        $notify($e);
                    } catch (\Exception $e) {
                        $notify($e);
                    }
                };
            } else {
                $progressHandler = $notify;
            }
            $this->handlers[] = static function (ExtendedPromiseInterface $promise) use($onFulfilled, $onRejected, $resolve, $reject, $progressHandler) {
                $promise->then($onFulfilled, $onRejected)->done($resolve, $reject, $progressHandler);
            };
            $this->progressHandlers[] = $progressHandler;
        };
    }
    private function reject($reason = null)
    {
        if (null !== $this->result) {
            return;
        }
        $this->settle(reject($reason));
    }
    private function settle(ExtendedPromiseInterface $promise)
    {
        $promise = $this->unwrap($promise);
        if ($promise === $this) {
            $promise = new RejectedPromise(new \LogicException('Cannot resolve a promise with itself.'));
        }
        $handlers = $this->handlers;
        $this->progressHandlers = $this->handlers = [];
        $this->result = $promise;
        $this->canceller = null;
        foreach ($handlers as $handler) {
            $handler($promise);
        }
    }
    private function unwrap($promise)
    {
        $promise = $this->extract($promise);
        while ($promise instanceof self && null !== $promise->result) {
            $promise = $this->extract($promise->result);
        }
        return $promise;
    }
    private function extract($promise)
    {
        if ($promise instanceof LazyPromise) {
            $promise = $promise->promise();
        }
        return $promise;
    }
    private function call(callable $cb)
    {
        // Explicitly overwrite argument with null value. This ensure that this
        // argument does not show up in the stack trace in PHP 7+ only.
        $callback = $cb;
        $cb = null;
        // Use reflection to inspect number of arguments expected by this callback.
        // We did some careful benchmarking here: Using reflection to avoid unneeded
        // function arguments is actually faster than blindly passing them.
        // Also, this helps avoiding unnecessary function arguments in the call stack
        // if the callback creates an Exception (creating garbage cycles).
        if (\is_array($callback)) {
            $ref = new \ReflectionMethod($callback[0], $callback[1]);
        } elseif (\is_object($callback) && !$callback instanceof \Closure) {
            $ref = new \ReflectionMethod($callback, '__invoke');
        } else {
            $ref = new \ReflectionFunction($callback);
        }
        $args = $ref->getNumberOfParameters();
        try {
            if ($args === 0) {
                $callback();
            } else {
                // Keep references to this promise instance for the static resolve/reject functions.
                // By using static callbacks that are not bound to this instance
                // and passing the target promise instance by reference, we can
                // still execute its resolving logic and still clear this
                // reference when settling the promise. This helps avoiding
                // garbage cycles if any callback creates an Exception.
                // These assumptions are covered by the test suite, so if you ever feel like
                // refactoring this, go ahead, any alternative suggestions are welcome!
                $target =& $this;
                $progressHandlers =& $this->progressHandlers;
                $callback(static function ($value = null) use(&$target) {
                    if ($target !== null) {
                        $target->settle(resolve($value));
                        $target = null;
                    }
                }, static function ($reason = null) use(&$target) {
                    if ($target !== null) {
                        $target->reject($reason);
                        $target = null;
                    }
                }, static function ($update = null) use(&$progressHandlers) {
                    foreach ($progressHandlers as $handler) {
                        $handler($update);
                    }
                });
            }
        } catch (\Throwable $e) {
            $target = null;
            $this->reject($e);
        } catch (\Exception $e) {
            $target = null;
            $this->reject($e);
        }
    }
}
<?php

namespace _PHPStan_dcc7b7cff;

if (!\function_exists('_PHPStan_dcc7b7cff\\React\\Promise\\resolve')) {
    require __DIR__ . '/functions.php';
}
<?php

namespace _PHPStan_dcc7b7cff\React\Promise;

class CancellationQueue
{
    private $started = \false;
    private $queue = [];
    public function __invoke()
    {
        if ($this->started) {
            return;
        }
        $this->started = \true;
        $this->drain();
    }
    public function enqueue($cancellable)
    {
        if (!\is_object($cancellable) || !\method_exists($cancellable, 'then') || !\method_exists($cancellable, 'cancel')) {
            return;
        }
        $length = \array_push($this->queue, $cancellable);
        if ($this->started && 1 === $length) {
            $this->drain();
        }
    }
    private function drain()
    {
        for ($i = \key($this->queue); isset($this->queue[$i]); $i++) {
            $cancellable = $this->queue[$i];
            $exception = null;
            try {
                $cancellable->cancel();
            } catch (\Throwable $exception) {
            } catch (\Exception $exception) {
            }
            unset($this->queue[$i]);
            if ($exception) {
                throw $exception;
            }
        }
        $this->queue = [];
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Promise;

/**
 * Creates a promise for the supplied `$promiseOrValue`.
 *
 * If `$promiseOrValue` is a value, it will be the resolution value of the
 * returned promise.
 *
 * If `$promiseOrValue` is a thenable (any object that provides a `then()` method),
 * a trusted promise that follows the state of the thenable is returned.
 *
 * If `$promiseOrValue` is a promise, it will be returned as is.
 *
 * @param mixed $promiseOrValue
 * @return PromiseInterface
 */
function resolve($promiseOrValue = null)
{
    if ($promiseOrValue instanceof ExtendedPromiseInterface) {
        return $promiseOrValue;
    }
    // Check is_object() first to avoid method_exists() triggering
    // class autoloaders if $promiseOrValue is a string.
    if (\is_object($promiseOrValue) && \method_exists($promiseOrValue, 'then')) {
        $canceller = null;
        if (\method_exists($promiseOrValue, 'cancel')) {
            $canceller = [$promiseOrValue, 'cancel'];
        }
        return new Promise(function ($resolve, $reject, $notify) use($promiseOrValue) {
            $promiseOrValue->then($resolve, $reject, $notify);
        }, $canceller);
    }
    return new FulfilledPromise($promiseOrValue);
}
/**
 * Creates a rejected promise for the supplied `$promiseOrValue`.
 *
 * If `$promiseOrValue` is a value, it will be the rejection value of the
 * returned promise.
 *
 * If `$promiseOrValue` is a promise, its completion value will be the rejected
 * value of the returned promise.
 *
 * This can be useful in situations where you need to reject a promise without
 * throwing an exception. For example, it allows you to propagate a rejection with
 * the value of another promise.
 *
 * @param mixed $promiseOrValue
 * @return PromiseInterface
 */
function reject($promiseOrValue = null)
{
    if ($promiseOrValue instanceof PromiseInterface) {
        return resolve($promiseOrValue)->then(function ($value) {
            return new RejectedPromise($value);
        });
    }
    return new RejectedPromise($promiseOrValue);
}
/**
 * Returns a promise that will resolve only once all the items in
 * `$promisesOrValues` have resolved. The resolution value of the returned promise
 * will be an array containing the resolution values of each of the items in
 * `$promisesOrValues`.
 *
 * @param array $promisesOrValues
 * @return PromiseInterface
 */
function all($promisesOrValues)
{
    return map($promisesOrValues, function ($val) {
        return $val;
    });
}
/**
 * Initiates a competitive race that allows one winner. Returns a promise which is
 * resolved in the same way the first settled promise resolves.
 *
 * The returned promise will become **infinitely pending** if  `$promisesOrValues`
 * contains 0 items.
 *
 * @param array $promisesOrValues
 * @return PromiseInterface
 */
function race($promisesOrValues)
{
    $cancellationQueue = new CancellationQueue();
    $cancellationQueue->enqueue($promisesOrValues);
    return new Promise(function ($resolve, $reject, $notify) use($promisesOrValues, $cancellationQueue) {
        resolve($promisesOrValues)->done(function ($array) use($cancellationQueue, $resolve, $reject, $notify) {
            if (!\is_array($array) || !$array) {
                $resolve();
                return;
            }
            foreach ($array as $promiseOrValue) {
                $cancellationQueue->enqueue($promiseOrValue);
                resolve($promiseOrValue)->done($resolve, $reject, $notify);
            }
        }, $reject, $notify);
    }, $cancellationQueue);
}
/**
 * Returns a promise that will resolve when any one of the items in
 * `$promisesOrValues` resolves. The resolution value of the returned promise
 * will be the resolution value of the triggering item.
 *
 * The returned promise will only reject if *all* items in `$promisesOrValues` are
 * rejected. The rejection value will be an array of all rejection reasons.
 *
 * The returned promise will also reject with a `React\Promise\Exception\LengthException`
 * if `$promisesOrValues` contains 0 items.
 *
 * @param array $promisesOrValues
 * @return PromiseInterface
 */
function any($promisesOrValues)
{
    return some($promisesOrValues, 1)->then(function ($val) {
        return \array_shift($val);
    });
}
/**
 * Returns a promise that will resolve when `$howMany` of the supplied items in
 * `$promisesOrValues` resolve. The resolution value of the returned promise
 * will be an array of length `$howMany` containing the resolution values of the
 * triggering items.
 *
 * The returned promise will reject if it becomes impossible for `$howMany` items
 * to resolve (that is, when `(count($promisesOrValues) - $howMany) + 1` items
 * reject). The rejection value will be an array of
 * `(count($promisesOrValues) - $howMany) + 1` rejection reasons.
 *
 * The returned promise will also reject with a `React\Promise\Exception\LengthException`
 * if `$promisesOrValues` contains less items than `$howMany`.
 *
 * @param array $promisesOrValues
 * @param int $howMany
 * @return PromiseInterface
 */
function some($promisesOrValues, $howMany)
{
    $cancellationQueue = new CancellationQueue();
    $cancellationQueue->enqueue($promisesOrValues);
    return new Promise(function ($resolve, $reject, $notify) use($promisesOrValues, $howMany, $cancellationQueue) {
        resolve($promisesOrValues)->done(function ($array) use($howMany, $cancellationQueue, $resolve, $reject, $notify) {
            if (!\is_array($array) || $howMany < 1) {
                $resolve([]);
                return;
            }
            $len = \count($array);
            if ($len < $howMany) {
                throw new Exception\LengthException(\sprintf('Input array must contain at least %d item%s but contains only %s item%s.', $howMany, 1 === $howMany ? '' : 's', $len, 1 === $len ? '' : 's'));
            }
            $toResolve = $howMany;
            $toReject = $len - $toResolve + 1;
            $values = [];
            $reasons = [];
            foreach ($array as $i => $promiseOrValue) {
                $fulfiller = function ($val) use($i, &$values, &$toResolve, $toReject, $resolve) {
                    if ($toResolve < 1 || $toReject < 1) {
                        return;
                    }
                    $values[$i] = $val;
                    if (0 === --$toResolve) {
                        $resolve($values);
                    }
                };
                $rejecter = function ($reason) use($i, &$reasons, &$toReject, $toResolve, $reject) {
                    if ($toResolve < 1 || $toReject < 1) {
                        return;
                    }
                    $reasons[$i] = $reason;
                    if (0 === --$toReject) {
                        $reject($reasons);
                    }
                };
                $cancellationQueue->enqueue($promiseOrValue);
                resolve($promiseOrValue)->done($fulfiller, $rejecter, $notify);
            }
        }, $reject, $notify);
    }, $cancellationQueue);
}
/**
 * Traditional map function, similar to `array_map()`, but allows input to contain
 * promises and/or values, and `$mapFunc` may return either a value or a promise.
 *
 * The map function receives each item as argument, where item is a fully resolved
 * value of a promise or value in `$promisesOrValues`.
 *
 * @param array $promisesOrValues
 * @param callable $mapFunc
 * @return PromiseInterface
 */
function map($promisesOrValues, callable $mapFunc)
{
    $cancellationQueue = new CancellationQueue();
    $cancellationQueue->enqueue($promisesOrValues);
    return new Promise(function ($resolve, $reject, $notify) use($promisesOrValues, $mapFunc, $cancellationQueue) {
        resolve($promisesOrValues)->done(function ($array) use($mapFunc, $cancellationQueue, $resolve, $reject, $notify) {
            if (!\is_array($array) || !$array) {
                $resolve([]);
                return;
            }
            $toResolve = \count($array);
            $values = [];
            foreach ($array as $i => $promiseOrValue) {
                $cancellationQueue->enqueue($promiseOrValue);
                $values[$i] = null;
                resolve($promiseOrValue)->then($mapFunc)->done(function ($mapped) use($i, &$values, &$toResolve, $resolve) {
                    $values[$i] = $mapped;
                    if (0 === --$toResolve) {
                        $resolve($values);
                    }
                }, $reject, $notify);
            }
        }, $reject, $notify);
    }, $cancellationQueue);
}
/**
 * Traditional reduce function, similar to `array_reduce()`, but input may contain
 * promises and/or values, and `$reduceFunc` may return either a value or a
 * promise, *and* `$initialValue` may be a promise or a value for the starting
 * value.
 *
 * @param array $promisesOrValues
 * @param callable $reduceFunc
 * @param mixed $initialValue
 * @return PromiseInterface
 */
function reduce($promisesOrValues, callable $reduceFunc, $initialValue = null)
{
    $cancellationQueue = new CancellationQueue();
    $cancellationQueue->enqueue($promisesOrValues);
    return new Promise(function ($resolve, $reject, $notify) use($promisesOrValues, $reduceFunc, $initialValue, $cancellationQueue) {
        resolve($promisesOrValues)->done(function ($array) use($reduceFunc, $initialValue, $cancellationQueue, $resolve, $reject, $notify) {
            if (!\is_array($array)) {
                $array = [];
            }
            $total = \count($array);
            $i = 0;
            // Wrap the supplied $reduceFunc with one that handles promises and then
            // delegates to the supplied.
            $wrappedReduceFunc = function ($current, $val) use($reduceFunc, $cancellationQueue, $total, &$i) {
                $cancellationQueue->enqueue($val);
                return $current->then(function ($c) use($reduceFunc, $total, &$i, $val) {
                    return resolve($val)->then(function ($value) use($reduceFunc, $total, &$i, $c) {
                        return $reduceFunc($c, $value, $i++, $total);
                    });
                });
            };
            $cancellationQueue->enqueue($initialValue);
            \array_reduce($array, $wrappedReduceFunc, resolve($initialValue))->done($resolve, $reject, $notify);
        }, $reject, $notify);
    }, $cancellationQueue);
}
/**
 * @internal
 */
function _checkTypehint(callable $callback, $object)
{
    if (!\is_object($object)) {
        return \true;
    }
    if (\is_array($callback)) {
        $callbackReflection = new \ReflectionMethod($callback[0], $callback[1]);
    } elseif (\is_object($callback) && !$callback instanceof \Closure) {
        $callbackReflection = new \ReflectionMethod($callback, '__invoke');
    } else {
        $callbackReflection = new \ReflectionFunction($callback);
    }
    $parameters = $callbackReflection->getParameters();
    if (!isset($parameters[0])) {
        return \true;
    }
    $expectedException = $parameters[0];
    // PHP before v8 used an easy API:
    if (\PHP_VERSION_ID < 70100 || \defined('_PHPStan_dcc7b7cff\\HHVM_VERSION')) {
        if (!$expectedException->getClass()) {
            return \true;
        }
        return $expectedException->getClass()->isInstance($object);
    }
    // Extract the type of the argument and handle different possibilities
    $type = $expectedException->getType();
    $isTypeUnion = \true;
    $types = [];
    switch (\true) {
        case $type === null:
            break;
        case $type instanceof \ReflectionNamedType:
            $types = [$type];
            break;
        case $type instanceof \ReflectionIntersectionType:
            $isTypeUnion = \false;
        case $type instanceof \ReflectionUnionType:
            $types = $type->getTypes();
            break;
        default:
            throw new \LogicException('Unexpected return value of ReflectionParameter::getType');
    }
    // If there is no type restriction, it matches
    if (empty($types)) {
        return \true;
    }
    foreach ($types as $type) {
        if ($type instanceof \ReflectionIntersectionType) {
            foreach ($type->getTypes() as $typeToMatch) {
                if (!($matches = $typeToMatch->isBuiltin() && \gettype($object) === $typeToMatch->getName() || (new \ReflectionClass($typeToMatch->getName()))->isInstance($object))) {
                    break;
                }
            }
        } else {
            $matches = $type->isBuiltin() && \gettype($object) === $type->getName() || (new \ReflectionClass($type->getName()))->isInstance($object);
        }
        // If we look for a single match (union), we can return early on match
        // If we look for a full match (intersection), we can return early on mismatch
        if ($matches) {
            if ($isTypeUnion) {
                return \true;
            }
        } else {
            if (!$isTypeUnion) {
                return \false;
            }
        }
    }
    // If we look for a single match (union) and did not return early, we matched no type and are false
    // If we look for a full match (intersection) and did not return early, we matched all types and are true
    return $isTypeUnion ? \false : \true;
}
<?php

namespace _PHPStan_dcc7b7cff\React\Promise;

interface PromiseInterface
{
    /**
     * Transforms a promise's value by applying a function to the promise's fulfillment
     * or rejection value. Returns a new promise for the transformed result.
     *
     * The `then()` method registers new fulfilled and rejection handlers with a promise
     * (all parameters are optional):
     *
     *  * `$onFulfilled` will be invoked once the promise is fulfilled and passed
     *     the result as the first argument.
     *  * `$onRejected` will be invoked once the promise is rejected and passed the
     *     reason as the first argument.
     *  * `$onProgress` (deprecated) will be invoked whenever the producer of the promise
     *     triggers progress notifications and passed a single argument (whatever it
     *     wants) to indicate progress.
     *
     * It returns a new promise that will fulfill with the return value of either
     * `$onFulfilled` or `$onRejected`, whichever is called, or will reject with
     * the thrown exception if either throws.
     *
     * A promise makes the following guarantees about handlers registered in
     * the same call to `then()`:
     *
     *  1. Only one of `$onFulfilled` or `$onRejected` will be called,
     *      never both.
     *  2. `$onFulfilled` and `$onRejected` will never be called more
     *      than once.
     *  3. `$onProgress` (deprecated) may be called multiple times.
     *
     * @param callable|null $onFulfilled
     * @param callable|null $onRejected
     * @param callable|null $onProgress This argument is deprecated and should not be used anymore.
     * @return PromiseInterface
     */
    public function then(callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null);
}
<?php

namespace _PHPStan_dcc7b7cff\React\Promise;

class UnhandledRejectionException extends \RuntimeException
{
    private $reason;
    public static function resolve($reason)
    {
        if ($reason instanceof \Exception || $reason instanceof \Throwable) {
            return $reason;
        }
        return new static($reason);
    }
    public function __construct($reason)
    {
        $this->reason = $reason;
        $message = \sprintf('Unhandled Rejection: %s', \json_encode($reason));
        parent::__construct($message, 0);
    }
    public function getReason()
    {
        return $this->reason;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Promise;

/**
 * @deprecated 2.8.0 LazyPromise is deprecated and should not be used anymore.
 */
class LazyPromise implements ExtendedPromiseInterface, CancellablePromiseInterface
{
    private $factory;
    private $promise;
    public function __construct(callable $factory)
    {
        $this->factory = $factory;
    }
    public function then(callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null)
    {
        return $this->promise()->then($onFulfilled, $onRejected, $onProgress);
    }
    public function done(callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null)
    {
        return $this->promise()->done($onFulfilled, $onRejected, $onProgress);
    }
    public function otherwise(callable $onRejected)
    {
        return $this->promise()->otherwise($onRejected);
    }
    public function always(callable $onFulfilledOrRejected)
    {
        return $this->promise()->always($onFulfilledOrRejected);
    }
    public function progress(callable $onProgress)
    {
        return $this->promise()->progress($onProgress);
    }
    public function cancel()
    {
        return $this->promise()->cancel();
    }
    /**
     * @internal
     * @see Promise::settle()
     */
    public function promise()
    {
        if (null === $this->promise) {
            try {
                $this->promise = resolve(\call_user_func($this->factory));
            } catch (\Throwable $exception) {
                $this->promise = new RejectedPromise($exception);
            } catch (\Exception $exception) {
                $this->promise = new RejectedPromise($exception);
            }
        }
        return $this->promise;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Promise;

class Deferred implements PromisorInterface
{
    private $promise;
    private $resolveCallback;
    private $rejectCallback;
    private $notifyCallback;
    private $canceller;
    public function __construct(callable $canceller = null)
    {
        $this->canceller = $canceller;
    }
    public function promise()
    {
        if (null === $this->promise) {
            $this->promise = new Promise(function ($resolve, $reject, $notify) {
                $this->resolveCallback = $resolve;
                $this->rejectCallback = $reject;
                $this->notifyCallback = $notify;
            }, $this->canceller);
            $this->canceller = null;
        }
        return $this->promise;
    }
    public function resolve($value = null)
    {
        $this->promise();
        \call_user_func($this->resolveCallback, $value);
    }
    public function reject($reason = null)
    {
        $this->promise();
        \call_user_func($this->rejectCallback, $reason);
    }
    /**
     * @deprecated 2.6.0 Progress support is deprecated and should not be used anymore.
     * @param mixed $update
     */
    public function notify($update = null)
    {
        $this->promise();
        \call_user_func($this->notifyCallback, $update);
    }
    /**
     * @deprecated 2.2.0
     * @see Deferred::notify()
     */
    public function progress($update = null)
    {
        $this->notify($update);
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Promise;

interface PromisorInterface
{
    /**
     * Returns the promise of the deferred.
     *
     * @return PromiseInterface
     */
    public function promise();
}
<?php

namespace _PHPStan_dcc7b7cff\React\Promise\Exception;

class LengthException extends \LengthException
{
}
<?php

namespace _PHPStan_dcc7b7cff\React\Promise;

interface CancellablePromiseInterface extends PromiseInterface
{
    /**
     * The `cancel()` method notifies the creator of the promise that there is no
     * further interest in the results of the operation.
     *
     * Once a promise is settled (either fulfilled or rejected), calling `cancel()` on
     * a promise has no effect.
     *
     * @return void
     */
    public function cancel();
}
<?php

namespace _PHPStan_dcc7b7cff\React\Promise;

/**
 * @deprecated 2.8.0 External usage of FulfilledPromise is deprecated, use `resolve()` instead.
 */
class FulfilledPromise implements ExtendedPromiseInterface, CancellablePromiseInterface
{
    private $value;
    public function __construct($value = null)
    {
        if ($value instanceof PromiseInterface) {
            throw new \InvalidArgumentException('You cannot create React\\Promise\\FulfilledPromise with a promise. Use React\\Promise\\resolve($promiseOrValue) instead.');
        }
        $this->value = $value;
    }
    public function then(callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null)
    {
        if (null === $onFulfilled) {
            return $this;
        }
        try {
            return resolve($onFulfilled($this->value));
        } catch (\Throwable $exception) {
            return new RejectedPromise($exception);
        } catch (\Exception $exception) {
            return new RejectedPromise($exception);
        }
    }
    public function done(callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null)
    {
        if (null === $onFulfilled) {
            return;
        }
        $result = $onFulfilled($this->value);
        if ($result instanceof ExtendedPromiseInterface) {
            $result->done();
        }
    }
    public function otherwise(callable $onRejected)
    {
        return $this;
    }
    public function always(callable $onFulfilledOrRejected)
    {
        return $this->then(function ($value) use($onFulfilledOrRejected) {
            return resolve($onFulfilledOrRejected())->then(function () use($value) {
                return $value;
            });
        });
    }
    public function progress(callable $onProgress)
    {
        return $this;
    }
    public function cancel()
    {
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Promise;

/**
 * @deprecated 2.8.0 External usage of RejectedPromise is deprecated, use `reject()` instead.
 */
class RejectedPromise implements ExtendedPromiseInterface, CancellablePromiseInterface
{
    private $reason;
    public function __construct($reason = null)
    {
        if ($reason instanceof PromiseInterface) {
            throw new \InvalidArgumentException('You cannot create React\\Promise\\RejectedPromise with a promise. Use React\\Promise\\reject($promiseOrValue) instead.');
        }
        $this->reason = $reason;
    }
    public function then(callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null)
    {
        if (null === $onRejected) {
            return $this;
        }
        try {
            return resolve($onRejected($this->reason));
        } catch (\Throwable $exception) {
            return new RejectedPromise($exception);
        } catch (\Exception $exception) {
            return new RejectedPromise($exception);
        }
    }
    public function done(callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null)
    {
        if (null === $onRejected) {
            throw UnhandledRejectionException::resolve($this->reason);
        }
        $result = $onRejected($this->reason);
        if ($result instanceof self) {
            throw UnhandledRejectionException::resolve($result->reason);
        }
        if ($result instanceof ExtendedPromiseInterface) {
            $result->done();
        }
    }
    public function otherwise(callable $onRejected)
    {
        if (!_checkTypehint($onRejected, $this->reason)) {
            return $this;
        }
        return $this->then(null, $onRejected);
    }
    public function always(callable $onFulfilledOrRejected)
    {
        return $this->then(null, function ($reason) use($onFulfilledOrRejected) {
            return resolve($onFulfilledOrRejected())->then(function () use($reason) {
                return new RejectedPromise($reason);
            });
        });
    }
    public function progress(callable $onProgress)
    {
        return $this;
    }
    public function cancel()
    {
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Promise;

interface ExtendedPromiseInterface extends PromiseInterface
{
    /**
     * Consumes the promise's ultimate value if the promise fulfills, or handles the
     * ultimate error.
     *
     * It will cause a fatal error if either `$onFulfilled` or
     * `$onRejected` throw or return a rejected promise.
     *
     * Since the purpose of `done()` is consumption rather than transformation,
     * `done()` always returns `null`.
     *
     * @param callable|null $onFulfilled
     * @param callable|null $onRejected
     * @param callable|null $onProgress This argument is deprecated and should not be used anymore.
     * @return void
     */
    public function done(callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null);
    /**
     * Registers a rejection handler for promise. It is a shortcut for:
     *
     * ```php
     * $promise->then(null, $onRejected);
     * ```
     *
     * Additionally, you can type hint the `$reason` argument of `$onRejected` to catch
     * only specific errors.
     *
     * @param callable $onRejected
     * @return ExtendedPromiseInterface
     */
    public function otherwise(callable $onRejected);
    /**
     * Allows you to execute "cleanup" type tasks in a promise chain.
     *
     * It arranges for `$onFulfilledOrRejected` to be called, with no arguments,
     * when the promise is either fulfilled or rejected.
     *
     * * If `$promise` fulfills, and `$onFulfilledOrRejected` returns successfully,
     *    `$newPromise` will fulfill with the same value as `$promise`.
     * * If `$promise` fulfills, and `$onFulfilledOrRejected` throws or returns a
     *    rejected promise, `$newPromise` will reject with the thrown exception or
     *    rejected promise's reason.
     * * If `$promise` rejects, and `$onFulfilledOrRejected` returns successfully,
     *    `$newPromise` will reject with the same reason as `$promise`.
     * * If `$promise` rejects, and `$onFulfilledOrRejected` throws or returns a
     *    rejected promise, `$newPromise` will reject with the thrown exception or
     *    rejected promise's reason.
     *
     * `always()` behaves similarly to the synchronous finally statement. When combined
     * with `otherwise()`, `always()` allows you to write code that is similar to the familiar
     * synchronous catch/finally pair.
     *
     * Consider the following synchronous code:
     *
     * ```php
     * try {
     *     return doSomething();
     * } catch(\Exception $e) {
     *     return handleError($e);
     * } finally {
     *     cleanup();
     * }
     * ```
     *
     * Similar asynchronous code (with `doSomething()` that returns a promise) can be
     * written:
     *
     * ```php
     * return doSomething()
     *     ->otherwise('handleError')
     *     ->always('cleanup');
     * ```
     *
     * @param callable $onFulfilledOrRejected
     * @return ExtendedPromiseInterface
     */
    public function always(callable $onFulfilledOrRejected);
    /**
     * Registers a handler for progress updates from promise. It is a shortcut for:
     *
     * ```php
     * $promise->then(null, null, $onProgress);
     * ```
     *
     * @param callable $onProgress
     * @return ExtendedPromiseInterface
     * @deprecated 2.6.0 Progress support is deprecated and should not be used anymore.
     */
    public function progress(callable $onProgress);
}
The MIT License (MIT)

Copyright (c) 2012 Jan Sorgalla, Christian Lück, Cees-Jan Kiewiet, Chris Boden

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
<?php

namespace _PHPStan_dcc7b7cff\React\EventLoop;

interface TimerInterface
{
    /**
     * Get the interval after which this timer will execute, in seconds
     *
     * @return float
     */
    public function getInterval();
    /**
     * Get the callback that will be executed when this timer elapses
     *
     * @return callable
     */
    public function getCallback();
    /**
     * Determine whether the time is periodic
     *
     * @return bool
     */
    public function isPeriodic();
}
<?php

namespace _PHPStan_dcc7b7cff\React\EventLoop;

/**
 * [Deprecated] The `Factory` class exists as a convenient way to pick the best available event loop implementation.
 *
 * @deprecated 1.2.0 See Loop instead.
 * @see Loop
 */
final class Factory
{
    /**
     * [Deprecated] Creates a new event loop instance
     *
     * ```php
     * // deprecated
     * $loop = React\EventLoop\Factory::create();
     *
     * // new
     * $loop = React\EventLoop\Loop::get();
     * ```
     *
     * This method always returns an instance implementing `LoopInterface`,
     * the actual event loop implementation is an implementation detail.
     *
     * This method should usually only be called once at the beginning of the program.
     *
     * @deprecated 1.2.0 See Loop::get() instead.
     * @see Loop::get()
     *
     * @return LoopInterface
     */
    public static function create()
    {
        $loop = self::construct();
        Loop::set($loop);
        return $loop;
    }
    /**
     * @internal
     * @return LoopInterface
     */
    private static function construct()
    {
        // @codeCoverageIgnoreStart
        if (\function_exists('uv_loop_new')) {
            // only use ext-uv on PHP 7
            return new ExtUvLoop();
        }
        if (\class_exists('_PHPStan_dcc7b7cff\\libev\\EventLoop', \false)) {
            return new ExtLibevLoop();
        }
        if (\class_exists('EvLoop', \false)) {
            return new ExtEvLoop();
        }
        if (\class_exists('EventBase', \false)) {
            return new ExtEventLoop();
        }
        if (\function_exists('event_base_new') && \PHP_MAJOR_VERSION === 5) {
            // only use ext-libevent on PHP 5 for now
            return new ExtLibeventLoop();
        }
        return new StreamSelectLoop();
        // @codeCoverageIgnoreEnd
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\EventLoop;

use BadMethodCallException;
use Event;
use EventBase;
use _PHPStan_dcc7b7cff\React\EventLoop\Tick\FutureTickQueue;
use _PHPStan_dcc7b7cff\React\EventLoop\Timer\Timer;
use SplObjectStorage;
/**
 * An `ext-event` based event loop.
 *
 * This uses the [`event` PECL extension](https://pecl.php.net/package/event),
 * that provides an interface to `libevent` library.
 * `libevent` itself supports a number of system-specific backends (epoll, kqueue).
 *
 * This loop is known to work with PHP 5.4 through PHP 8+.
 *
 * @link https://pecl.php.net/package/event
 */
final class ExtEventLoop implements LoopInterface
{
    private $eventBase;
    private $futureTickQueue;
    private $timerCallback;
    private $timerEvents;
    private $streamCallback;
    private $readEvents = array();
    private $writeEvents = array();
    private $readListeners = array();
    private $writeListeners = array();
    private $readRefs = array();
    private $writeRefs = array();
    private $running;
    private $signals;
    private $signalEvents = array();
    public function __construct()
    {
        if (!\class_exists('EventBase', \false)) {
            throw new BadMethodCallException('Cannot create ExtEventLoop, ext-event extension missing');
        }
        // support arbitrary file descriptors and not just sockets
        // Windows only has limited file descriptor support, so do not require this (will fail otherwise)
        // @link http://www.wangafu.net/~nickm/libevent-book/Ref2_eventbase.html#_setting_up_a_complicated_event_base
        $config = new \EventConfig();
        if (\DIRECTORY_SEPARATOR !== '\\') {
            $config->requireFeatures(\EventConfig::FEATURE_FDS);
        }
        $this->eventBase = new EventBase($config);
        $this->futureTickQueue = new FutureTickQueue();
        $this->timerEvents = new SplObjectStorage();
        $this->signals = new SignalsHandler();
        $this->createTimerCallback();
        $this->createStreamCallback();
    }
    public function __destruct()
    {
        // explicitly clear all references to Event objects to prevent SEGFAULTs on Windows
        foreach ($this->timerEvents as $timer) {
            $this->timerEvents->detach($timer);
        }
        $this->readEvents = array();
        $this->writeEvents = array();
    }
    public function addReadStream($stream, $listener)
    {
        $key = (int) $stream;
        if (isset($this->readListeners[$key])) {
            return;
        }
        $event = new Event($this->eventBase, $stream, Event::PERSIST | Event::READ, $this->streamCallback);
        $event->add();
        $this->readEvents[$key] = $event;
        $this->readListeners[$key] = $listener;
        // ext-event does not increase refcount on stream resources for PHP 7+
        // manually keep track of stream resource to prevent premature garbage collection
        if (\PHP_VERSION_ID >= 70000) {
            $this->readRefs[$key] = $stream;
        }
    }
    public function addWriteStream($stream, $listener)
    {
        $key = (int) $stream;
        if (isset($this->writeListeners[$key])) {
            return;
        }
        $event = new Event($this->eventBase, $stream, Event::PERSIST | Event::WRITE, $this->streamCallback);
        $event->add();
        $this->writeEvents[$key] = $event;
        $this->writeListeners[$key] = $listener;
        // ext-event does not increase refcount on stream resources for PHP 7+
        // manually keep track of stream resource to prevent premature garbage collection
        if (\PHP_VERSION_ID >= 70000) {
            $this->writeRefs[$key] = $stream;
        }
    }
    public function removeReadStream($stream)
    {
        $key = (int) $stream;
        if (isset($this->readEvents[$key])) {
            $this->readEvents[$key]->free();
            unset($this->readEvents[$key], $this->readListeners[$key], $this->readRefs[$key]);
        }
    }
    public function removeWriteStream($stream)
    {
        $key = (int) $stream;
        if (isset($this->writeEvents[$key])) {
            $this->writeEvents[$key]->free();
            unset($this->writeEvents[$key], $this->writeListeners[$key], $this->writeRefs[$key]);
        }
    }
    public function addTimer($interval, $callback)
    {
        $timer = new Timer($interval, $callback, \false);
        $this->scheduleTimer($timer);
        return $timer;
    }
    public function addPeriodicTimer($interval, $callback)
    {
        $timer = new Timer($interval, $callback, \true);
        $this->scheduleTimer($timer);
        return $timer;
    }
    public function cancelTimer(TimerInterface $timer)
    {
        if ($this->timerEvents->contains($timer)) {
            $this->timerEvents[$timer]->free();
            $this->timerEvents->detach($timer);
        }
    }
    public function futureTick($listener)
    {
        $this->futureTickQueue->add($listener);
    }
    public function addSignal($signal, $listener)
    {
        $this->signals->add($signal, $listener);
        if (!isset($this->signalEvents[$signal])) {
            $this->signalEvents[$signal] = Event::signal($this->eventBase, $signal, array($this->signals, 'call'));
            $this->signalEvents[$signal]->add();
        }
    }
    public function removeSignal($signal, $listener)
    {
        $this->signals->remove($signal, $listener);
        if (isset($this->signalEvents[$signal]) && $this->signals->count($signal) === 0) {
            $this->signalEvents[$signal]->free();
            unset($this->signalEvents[$signal]);
        }
    }
    public function run()
    {
        $this->running = \true;
        while ($this->running) {
            $this->futureTickQueue->tick();
            $flags = EventBase::LOOP_ONCE;
            if (!$this->running || !$this->futureTickQueue->isEmpty()) {
                $flags |= EventBase::LOOP_NONBLOCK;
            } elseif (!$this->readEvents && !$this->writeEvents && !$this->timerEvents->count() && $this->signals->isEmpty()) {
                break;
            }
            $this->eventBase->loop($flags);
        }
    }
    public function stop()
    {
        $this->running = \false;
    }
    /**
     * Schedule a timer for execution.
     *
     * @param TimerInterface $timer
     */
    private function scheduleTimer(TimerInterface $timer)
    {
        $flags = Event::TIMEOUT;
        if ($timer->isPeriodic()) {
            $flags |= Event::PERSIST;
        }
        $event = new Event($this->eventBase, -1, $flags, $this->timerCallback, $timer);
        $this->timerEvents[$timer] = $event;
        $event->add($timer->getInterval());
    }
    /**
     * Create a callback used as the target of timer events.
     *
     * A reference is kept to the callback for the lifetime of the loop
     * to prevent "Cannot destroy active lambda function" fatal error from
     * the event extension.
     */
    private function createTimerCallback()
    {
        $timers = $this->timerEvents;
        $this->timerCallback = function ($_, $__, $timer) use($timers) {
            \call_user_func($timer->getCallback(), $timer);
            if (!$timer->isPeriodic() && $timers->contains($timer)) {
                $this->cancelTimer($timer);
            }
        };
    }
    /**
     * Create a callback used as the target of stream events.
     *
     * A reference is kept to the callback for the lifetime of the loop
     * to prevent "Cannot destroy active lambda function" fatal error from
     * the event extension.
     */
    private function createStreamCallback()
    {
        $read =& $this->readListeners;
        $write =& $this->writeListeners;
        $this->streamCallback = function ($stream, $flags) use(&$read, &$write) {
            $key = (int) $stream;
            if (Event::READ === (Event::READ & $flags) && isset($read[$key])) {
                \call_user_func($read[$key], $stream);
            }
            if (Event::WRITE === (Event::WRITE & $flags) && isset($write[$key])) {
                \call_user_func($write[$key], $stream);
            }
        };
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\EventLoop\Timer;

use _PHPStan_dcc7b7cff\React\EventLoop\TimerInterface;
/**
 * A scheduler implementation that can hold multiple timer instances
 *
 * This class should only be used internally, see TimerInterface instead.
 *
 * @see TimerInterface
 * @internal
 */
final class Timers
{
    private $time;
    private $timers = array();
    private $schedule = array();
    private $sorted = \true;
    private $useHighResolution;
    public function __construct()
    {
        // prefer high-resolution timer, available as of PHP 7.3+
        $this->useHighResolution = \function_exists('hrtime');
    }
    public function updateTime()
    {
        return $this->time = $this->useHighResolution ? \hrtime(\true) * 1.0E-9 : \microtime(\true);
    }
    public function getTime()
    {
        return $this->time ?: $this->updateTime();
    }
    public function add(TimerInterface $timer)
    {
        $id = \spl_object_hash($timer);
        $this->timers[$id] = $timer;
        $this->schedule[$id] = $timer->getInterval() + $this->updateTime();
        $this->sorted = \false;
    }
    public function contains(TimerInterface $timer)
    {
        return isset($this->timers[\spl_object_hash($timer)]);
    }
    public function cancel(TimerInterface $timer)
    {
        $id = \spl_object_hash($timer);
        unset($this->timers[$id], $this->schedule[$id]);
    }
    public function getFirst()
    {
        // ensure timers are sorted to simply accessing next (first) one
        if (!$this->sorted) {
            $this->sorted = \true;
            \asort($this->schedule);
        }
        return \reset($this->schedule);
    }
    public function isEmpty()
    {
        return \count($this->timers) === 0;
    }
    public function tick()
    {
        // hot path: skip timers if nothing is scheduled
        if (!$this->schedule) {
            return;
        }
        // ensure timers are sorted so we can execute in order
        if (!$this->sorted) {
            $this->sorted = \true;
            \asort($this->schedule);
        }
        $time = $this->updateTime();
        foreach ($this->schedule as $id => $scheduled) {
            // schedule is ordered, so loop until first timer that is not scheduled for execution now
            if ($scheduled >= $time) {
                break;
            }
            // skip any timers that are removed while we process the current schedule
            if (!isset($this->schedule[$id]) || $this->schedule[$id] !== $scheduled) {
                continue;
            }
            $timer = $this->timers[$id];
            \call_user_func($timer->getCallback(), $timer);
            // re-schedule if this is a periodic timer and it has not been cancelled explicitly already
            if ($timer->isPeriodic() && isset($this->timers[$id])) {
                $this->schedule[$id] = $timer->getInterval() + $time;
                $this->sorted = \false;
            } else {
                unset($this->timers[$id], $this->schedule[$id]);
            }
        }
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\EventLoop\Timer;

use _PHPStan_dcc7b7cff\React\EventLoop\TimerInterface;
/**
 * The actual connection implementation for TimerInterface
 *
 * This class should only be used internally, see TimerInterface instead.
 *
 * @see TimerInterface
 * @internal
 */
final class Timer implements TimerInterface
{
    const MIN_INTERVAL = 1.0E-6;
    private $interval;
    private $callback;
    private $periodic;
    /**
     * Constructor initializes the fields of the Timer
     *
     * @param float         $interval The interval after which this timer will execute, in seconds
     * @param callable      $callback The callback that will be executed when this timer elapses
     * @param bool          $periodic Whether the time is periodic
     */
    public function __construct($interval, $callback, $periodic = \false)
    {
        if ($interval < self::MIN_INTERVAL) {
            $interval = self::MIN_INTERVAL;
        }
        $this->interval = (float) $interval;
        $this->callback = $callback;
        $this->periodic = (bool) $periodic;
    }
    public function getInterval()
    {
        return $this->interval;
    }
    public function getCallback()
    {
        return $this->callback;
    }
    public function isPeriodic()
    {
        return $this->periodic;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\EventLoop;

/**
 * @internal
 */
final class SignalsHandler
{
    private $signals = array();
    public function add($signal, $listener)
    {
        if (!isset($this->signals[$signal])) {
            $this->signals[$signal] = array();
        }
        if (\in_array($listener, $this->signals[$signal])) {
            return;
        }
        $this->signals[$signal][] = $listener;
    }
    public function remove($signal, $listener)
    {
        if (!isset($this->signals[$signal])) {
            return;
        }
        $index = \array_search($listener, $this->signals[$signal], \true);
        unset($this->signals[$signal][$index]);
        if (isset($this->signals[$signal]) && \count($this->signals[$signal]) === 0) {
            unset($this->signals[$signal]);
        }
    }
    public function call($signal)
    {
        if (!isset($this->signals[$signal])) {
            return;
        }
        foreach ($this->signals[$signal] as $listener) {
            \call_user_func($listener, $signal);
        }
    }
    public function count($signal)
    {
        if (!isset($this->signals[$signal])) {
            return 0;
        }
        return \count($this->signals[$signal]);
    }
    public function isEmpty()
    {
        return !$this->signals;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\EventLoop;

use _PHPStan_dcc7b7cff\React\EventLoop\Tick\FutureTickQueue;
use _PHPStan_dcc7b7cff\React\EventLoop\Timer\Timer;
use SplObjectStorage;
/**
 * An `ext-uv` based event loop.
 *
 * This loop uses the [`uv` PECL extension](https://pecl.php.net/package/uv),
 * that provides an interface to `libuv` library.
 * `libuv` itself supports a number of system-specific backends (epoll, kqueue).
 *
 * This loop is known to work with PHP 7.x.
 *
 * @see https://github.com/bwoebi/php-uv
 */
final class ExtUvLoop implements LoopInterface
{
    private $uv;
    private $futureTickQueue;
    private $timers;
    private $streamEvents = array();
    private $readStreams = array();
    private $writeStreams = array();
    private $running;
    private $signals;
    private $signalEvents = array();
    private $streamListener;
    public function __construct()
    {
        if (!\function_exists('uv_loop_new')) {
            throw new \BadMethodCallException('Cannot create LibUvLoop, ext-uv extension missing');
        }
        $this->uv = \uv_loop_new();
        $this->futureTickQueue = new FutureTickQueue();
        $this->timers = new SplObjectStorage();
        $this->streamListener = $this->createStreamListener();
        $this->signals = new SignalsHandler();
    }
    /**
     * Returns the underlying ext-uv event loop. (Internal ReactPHP use only.)
     *
     * @internal
     *
     * @return resource
     */
    public function getUvLoop()
    {
        return $this->uv;
    }
    /**
     * {@inheritdoc}
     */
    public function addReadStream($stream, $listener)
    {
        if (isset($this->readStreams[(int) $stream])) {
            return;
        }
        $this->readStreams[(int) $stream] = $listener;
        $this->addStream($stream);
    }
    /**
     * {@inheritdoc}
     */
    public function addWriteStream($stream, $listener)
    {
        if (isset($this->writeStreams[(int) $stream])) {
            return;
        }
        $this->writeStreams[(int) $stream] = $listener;
        $this->addStream($stream);
    }
    /**
     * {@inheritdoc}
     */
    public function removeReadStream($stream)
    {
        if (!isset($this->streamEvents[(int) $stream])) {
            return;
        }
        unset($this->readStreams[(int) $stream]);
        $this->removeStream($stream);
    }
    /**
     * {@inheritdoc}
     */
    public function removeWriteStream($stream)
    {
        if (!isset($this->streamEvents[(int) $stream])) {
            return;
        }
        unset($this->writeStreams[(int) $stream]);
        $this->removeStream($stream);
    }
    /**
     * {@inheritdoc}
     */
    public function addTimer($interval, $callback)
    {
        $timer = new Timer($interval, $callback, \false);
        $that = $this;
        $timers = $this->timers;
        $callback = function () use($timer, $timers, $that) {
            \call_user_func($timer->getCallback(), $timer);
            if ($timers->contains($timer)) {
                $that->cancelTimer($timer);
            }
        };
        $event = \uv_timer_init($this->uv);
        $this->timers->attach($timer, $event);
        \uv_timer_start($event, $this->convertFloatSecondsToMilliseconds($interval), 0, $callback);
        return $timer;
    }
    /**
     * {@inheritdoc}
     */
    public function addPeriodicTimer($interval, $callback)
    {
        $timer = new Timer($interval, $callback, \true);
        $callback = function () use($timer) {
            \call_user_func($timer->getCallback(), $timer);
        };
        $interval = $this->convertFloatSecondsToMilliseconds($interval);
        $event = \uv_timer_init($this->uv);
        $this->timers->attach($timer, $event);
        \uv_timer_start($event, $interval, (int) $interval === 0 ? 1 : $interval, $callback);
        return $timer;
    }
    /**
     * {@inheritdoc}
     */
    public function cancelTimer(TimerInterface $timer)
    {
        if (isset($this->timers[$timer])) {
            @\uv_timer_stop($this->timers[$timer]);
            $this->timers->detach($timer);
        }
    }
    /**
     * {@inheritdoc}
     */
    public function futureTick($listener)
    {
        $this->futureTickQueue->add($listener);
    }
    public function addSignal($signal, $listener)
    {
        $this->signals->add($signal, $listener);
        if (!isset($this->signalEvents[$signal])) {
            $signals = $this->signals;
            $this->signalEvents[$signal] = \_PHPStan_dcc7b7cff\uv_signal_init($this->uv);
            \_PHPStan_dcc7b7cff\uv_signal_start($this->signalEvents[$signal], function () use($signals, $signal) {
                $signals->call($signal);
            }, $signal);
        }
    }
    public function removeSignal($signal, $listener)
    {
        $this->signals->remove($signal, $listener);
        if (isset($this->signalEvents[$signal]) && $this->signals->count($signal) === 0) {
            \uv_signal_stop($this->signalEvents[$signal]);
            unset($this->signalEvents[$signal]);
        }
    }
    /**
     * {@inheritdoc}
     */
    public function run()
    {
        $this->running = \true;
        while ($this->running) {
            $this->futureTickQueue->tick();
            $hasPendingCallbacks = !$this->futureTickQueue->isEmpty();
            $wasJustStopped = !$this->running;
            $nothingLeftToDo = !$this->readStreams && !$this->writeStreams && !$this->timers->count() && $this->signals->isEmpty();
            // Use UV::RUN_ONCE when there are only I/O events active in the loop and block until one of those triggers,
            // otherwise use UV::RUN_NOWAIT.
            // @link http://docs.libuv.org/en/v1.x/loop.html#c.uv_run
            $flags = \UV::RUN_ONCE;
            if ($wasJustStopped || $hasPendingCallbacks) {
                $flags = \UV::RUN_NOWAIT;
            } elseif ($nothingLeftToDo) {
                break;
            }
            \uv_run($this->uv, $flags);
        }
    }
    /**
     * {@inheritdoc}
     */
    public function stop()
    {
        $this->running = \false;
    }
    private function addStream($stream)
    {
        if (!isset($this->streamEvents[(int) $stream])) {
            $this->streamEvents[(int) $stream] = \_PHPStan_dcc7b7cff\uv_poll_init_socket($this->uv, $stream);
        }
        if ($this->streamEvents[(int) $stream] !== \false) {
            $this->pollStream($stream);
        }
    }
    private function removeStream($stream)
    {
        if (!isset($this->streamEvents[(int) $stream])) {
            return;
        }
        if (!isset($this->readStreams[(int) $stream]) && !isset($this->writeStreams[(int) $stream])) {
            \uv_poll_stop($this->streamEvents[(int) $stream]);
            \uv_close($this->streamEvents[(int) $stream]);
            unset($this->streamEvents[(int) $stream]);
            return;
        }
        $this->pollStream($stream);
    }
    private function pollStream($stream)
    {
        if (!isset($this->streamEvents[(int) $stream])) {
            return;
        }
        $flags = 0;
        if (isset($this->readStreams[(int) $stream])) {
            $flags |= \UV::READABLE;
        }
        if (isset($this->writeStreams[(int) $stream])) {
            $flags |= \UV::WRITABLE;
        }
        \uv_poll_start($this->streamEvents[(int) $stream], $flags, $this->streamListener);
    }
    /**
     * Create a stream listener
     *
     * @return callable Returns a callback
     */
    private function createStreamListener()
    {
        $callback = function ($event, $status, $events, $stream) {
            // libuv automatically stops polling on error, re-enable polling to match other loop implementations
            if ($status !== 0) {
                $this->pollStream($stream);
                // libuv may report no events on error, but this should still invoke stream listeners to report closed connections
                // re-enable both readable and writable, correct listeners will be checked below anyway
                if ($events === 0) {
                    $events = \UV::READABLE | \UV::WRITABLE;
                }
            }
            if (isset($this->readStreams[(int) $stream]) && $events & \UV::READABLE) {
                \call_user_func($this->readStreams[(int) $stream], $stream);
            }
            if (isset($this->writeStreams[(int) $stream]) && $events & \UV::WRITABLE) {
                \call_user_func($this->writeStreams[(int) $stream], $stream);
            }
        };
        return $callback;
    }
    /**
     * @param float $interval
     * @return int
     */
    private function convertFloatSecondsToMilliseconds($interval)
    {
        if ($interval < 0) {
            return 0;
        }
        $maxValue = (int) (\PHP_INT_MAX / 1000);
        $intInterval = (int) $interval;
        if ($intInterval <= 0 && $interval > 1 || $intInterval >= $maxValue) {
            throw new \InvalidArgumentException("Interval overflow, value must be lower than '{$maxValue}', but '{$interval}' passed.");
        }
        return (int) \floor($interval * 1000);
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\EventLoop;

use _PHPStan_dcc7b7cff\React\EventLoop\Tick\FutureTickQueue;
use _PHPStan_dcc7b7cff\React\EventLoop\Timer\Timer;
use _PHPStan_dcc7b7cff\React\EventLoop\Timer\Timers;
/**
 * A `stream_select()` based event loop.
 *
 * This uses the [`stream_select()`](https://www.php.net/manual/en/function.stream-select.php)
 * function and is the only implementation that works out of the box with PHP.
 *
 * This event loop works out of the box on PHP 5.4 through PHP 8+ and HHVM.
 * This means that no installation is required and this library works on all
 * platforms and supported PHP versions.
 * Accordingly, the [`Loop` class](#loop) and the deprecated [`Factory`](#factory)
 * will use this event loop by default if you do not install any of the event loop
 * extensions listed below.
 *
 * Under the hood, it does a simple `select` system call.
 * This system call is limited to the maximum file descriptor number of
 * `FD_SETSIZE` (platform dependent, commonly 1024) and scales with `O(m)`
 * (`m` being the maximum file descriptor number passed).
 * This means that you may run into issues when handling thousands of streams
 * concurrently and you may want to look into using one of the alternative
 * event loop implementations listed below in this case.
 * If your use case is among the many common use cases that involve handling only
 * dozens or a few hundred streams at once, then this event loop implementation
 * performs really well.
 *
 * If you want to use signal handling (see also [`addSignal()`](#addsignal) below),
 * this event loop implementation requires `ext-pcntl`.
 * This extension is only available for Unix-like platforms and does not support
 * Windows.
 * It is commonly installed as part of many PHP distributions.
 * If this extension is missing (or you're running on Windows), signal handling is
 * not supported and throws a `BadMethodCallException` instead.
 *
 * This event loop is known to rely on wall-clock time to schedule future timers
 * when using any version before PHP 7.3, because a monotonic time source is
 * only available as of PHP 7.3 (`hrtime()`).
 * While this does not affect many common use cases, this is an important
 * distinction for programs that rely on a high time precision or on systems
 * that are subject to discontinuous time adjustments (time jumps).
 * This means that if you schedule a timer to trigger in 30s on PHP < 7.3 and
 * then adjust your system time forward by 20s, the timer may trigger in 10s.
 * See also [`addTimer()`](#addtimer) for more details.
 *
 * @link https://www.php.net/manual/en/function.stream-select.php
 */
final class StreamSelectLoop implements LoopInterface
{
    /** @internal */
    const MICROSECONDS_PER_SECOND = 1000000;
    private $futureTickQueue;
    private $timers;
    private $readStreams = array();
    private $readListeners = array();
    private $writeStreams = array();
    private $writeListeners = array();
    private $running;
    private $pcntl = \false;
    private $pcntlPoll = \false;
    private $signals;
    public function __construct()
    {
        $this->futureTickQueue = new FutureTickQueue();
        $this->timers = new Timers();
        $this->pcntl = \function_exists('pcntl_signal') && \function_exists('pcntl_signal_dispatch');
        $this->pcntlPoll = $this->pcntl && !\function_exists('pcntl_async_signals');
        $this->signals = new SignalsHandler();
        // prefer async signals if available (PHP 7.1+) or fall back to dispatching on each tick
        if ($this->pcntl && !$this->pcntlPoll) {
            \pcntl_async_signals(\true);
        }
    }
    public function addReadStream($stream, $listener)
    {
        $key = (int) $stream;
        if (!isset($this->readStreams[$key])) {
            $this->readStreams[$key] = $stream;
            $this->readListeners[$key] = $listener;
        }
    }
    public function addWriteStream($stream, $listener)
    {
        $key = (int) $stream;
        if (!isset($this->writeStreams[$key])) {
            $this->writeStreams[$key] = $stream;
            $this->writeListeners[$key] = $listener;
        }
    }
    public function removeReadStream($stream)
    {
        $key = (int) $stream;
        unset($this->readStreams[$key], $this->readListeners[$key]);
    }
    public function removeWriteStream($stream)
    {
        $key = (int) $stream;
        unset($this->writeStreams[$key], $this->writeListeners[$key]);
    }
    public function addTimer($interval, $callback)
    {
        $timer = new Timer($interval, $callback, \false);
        $this->timers->add($timer);
        return $timer;
    }
    public function addPeriodicTimer($interval, $callback)
    {
        $timer = new Timer($interval, $callback, \true);
        $this->timers->add($timer);
        return $timer;
    }
    public function cancelTimer(TimerInterface $timer)
    {
        $this->timers->cancel($timer);
    }
    public function futureTick($listener)
    {
        $this->futureTickQueue->add($listener);
    }
    public function addSignal($signal, $listener)
    {
        if ($this->pcntl === \false) {
            throw new \BadMethodCallException('Event loop feature "signals" isn\'t supported by the "StreamSelectLoop"');
        }
        $first = $this->signals->count($signal) === 0;
        $this->signals->add($signal, $listener);
        if ($first) {
            \pcntl_signal($signal, array($this->signals, 'call'));
        }
    }
    public function removeSignal($signal, $listener)
    {
        if (!$this->signals->count($signal)) {
            return;
        }
        $this->signals->remove($signal, $listener);
        if ($this->signals->count($signal) === 0) {
            \pcntl_signal($signal, \SIG_DFL);
        }
    }
    public function run()
    {
        $this->running = \true;
        while ($this->running) {
            $this->futureTickQueue->tick();
            $this->timers->tick();
            // Future-tick queue has pending callbacks ...
            if (!$this->running || !$this->futureTickQueue->isEmpty()) {
                $timeout = 0;
                // There is a pending timer, only block until it is due ...
            } elseif ($scheduledAt = $this->timers->getFirst()) {
                $timeout = $scheduledAt - $this->timers->getTime();
                if ($timeout < 0) {
                    $timeout = 0;
                } else {
                    // Convert float seconds to int microseconds.
                    // Ensure we do not exceed maximum integer size, which may
                    // cause the loop to tick once every ~35min on 32bit systems.
                    $timeout *= self::MICROSECONDS_PER_SECOND;
                    $timeout = $timeout > \PHP_INT_MAX ? \PHP_INT_MAX : (int) $timeout;
                }
                // The only possible event is stream or signal activity, so wait forever ...
            } elseif ($this->readStreams || $this->writeStreams || !$this->signals->isEmpty()) {
                $timeout = null;
                // There's nothing left to do ...
            } else {
                break;
            }
            $this->waitForStreamActivity($timeout);
        }
    }
    public function stop()
    {
        $this->running = \false;
    }
    /**
     * Wait/check for stream activity, or until the next timer is due.
     *
     * @param integer|null $timeout Activity timeout in microseconds, or null to wait forever.
     */
    private function waitForStreamActivity($timeout)
    {
        $read = $this->readStreams;
        $write = $this->writeStreams;
        $available = $this->streamSelect($read, $write, $timeout);
        if ($this->pcntlPoll) {
            \pcntl_signal_dispatch();
        }
        if (\false === $available) {
            // if a system call has been interrupted,
            // we cannot rely on it's outcome
            return;
        }
        foreach ($read as $stream) {
            $key = (int) $stream;
            if (isset($this->readListeners[$key])) {
                \call_user_func($this->readListeners[$key], $stream);
            }
        }
        foreach ($write as $stream) {
            $key = (int) $stream;
            if (isset($this->writeListeners[$key])) {
                \call_user_func($this->writeListeners[$key], $stream);
            }
        }
    }
    /**
     * Emulate a stream_select() implementation that does not break when passed
     * empty stream arrays.
     *
     * @param array    $read    An array of read streams to select upon.
     * @param array    $write   An array of write streams to select upon.
     * @param int|null $timeout Activity timeout in microseconds, or null to wait forever.
     *
     * @return int|false The total number of streams that are ready for read/write.
     *     Can return false if stream_select() is interrupted by a signal.
     */
    private function streamSelect(array &$read, array &$write, $timeout)
    {
        if ($read || $write) {
            // We do not usually use or expose the `exceptfds` parameter passed to the underlying `select`.
            // However, Windows does not report failed connection attempts in `writefds` passed to `select` like most other platforms.
            // Instead, it uses `writefds` only for successful connection attempts and `exceptfds` for failed connection attempts.
            // We work around this by adding all sockets that look like a pending connection attempt to `exceptfds` automatically on Windows and merge it back later.
            // This ensures the public API matches other loop implementations across all platforms (see also test suite or rather test matrix).
            // Lacking better APIs, every write-only socket that has not yet read any data is assumed to be in a pending connection attempt state.
            // @link https://docs.microsoft.com/de-de/windows/win32/api/winsock2/nf-winsock2-select
            $except = null;
            if (\DIRECTORY_SEPARATOR === '\\') {
                $except = array();
                foreach ($write as $key => $socket) {
                    if (!isset($read[$key]) && @\ftell($socket) === 0) {
                        $except[$key] = $socket;
                    }
                }
            }
            /** @var ?callable $previous */
            $previous = \set_error_handler(function ($errno, $errstr) use(&$previous) {
                // suppress warnings that occur when `stream_select()` is interrupted by a signal
                // PHP defines `EINTR` through `ext-sockets` or `ext-pcntl`, otherwise use common default (Linux & Mac)
                $eintr = \defined('SOCKET_EINTR') ? \SOCKET_EINTR : (\defined('PCNTL_EINTR') ? \PCNTL_EINTR : 4);
                if ($errno === \E_WARNING && \strpos($errstr, '[' . $eintr . ']: ') !== \false) {
                    return;
                }
                // forward any other error to registered error handler or print warning
                return $previous !== null ? \call_user_func_array($previous, \func_get_args()) : \false;
            });
            try {
                $ret = \stream_select($read, $write, $except, $timeout === null ? null : 0, $timeout);
                \restore_error_handler();
            } catch (\Throwable $e) {
                // @codeCoverageIgnoreStart
                \restore_error_handler();
                throw $e;
            } catch (\Exception $e) {
                \restore_error_handler();
                throw $e;
            }
            // @codeCoverageIgnoreEnd
            if ($except) {
                $write = \array_merge($write, $except);
            }
            return $ret;
        }
        if ($timeout > 0) {
            \usleep($timeout);
        } elseif ($timeout === null) {
            // wait forever (we only reach this if we're only awaiting signals)
            // this may be interrupted and return earlier when a signal is received
            \sleep(\PHP_INT_MAX);
        }
        return 0;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\EventLoop;

use BadMethodCallException;
use _PHPStan_dcc7b7cff\libev\EventLoop;
use _PHPStan_dcc7b7cff\libev\IOEvent;
use _PHPStan_dcc7b7cff\libev\SignalEvent;
use _PHPStan_dcc7b7cff\libev\TimerEvent;
use _PHPStan_dcc7b7cff\React\EventLoop\Tick\FutureTickQueue;
use _PHPStan_dcc7b7cff\React\EventLoop\Timer\Timer;
use SplObjectStorage;
/**
 * [Deprecated] An `ext-libev` based event loop.
 *
 * This uses an [unofficial `libev` extension](https://github.com/m4rw3r/php-libev),
 * that provides an interface to `libev` library.
 * `libev` itself supports a number of system-specific backends (epoll, kqueue).
 *
 * This loop does only work with PHP 5.
 * An update for PHP 7 is [unlikely](https://github.com/m4rw3r/php-libev/issues/8)
 * to happen any time soon.
 *
 * @see https://github.com/m4rw3r/php-libev
 * @see https://gist.github.com/1688204
 * @deprecated 1.2.0, use [`ExtEvLoop`](#extevloop) instead.
 */
final class ExtLibevLoop implements LoopInterface
{
    private $loop;
    private $futureTickQueue;
    private $timerEvents;
    private $readEvents = array();
    private $writeEvents = array();
    private $running;
    private $signals;
    private $signalEvents = array();
    public function __construct()
    {
        if (!\class_exists('_PHPStan_dcc7b7cff\\libev\\EventLoop', \false)) {
            throw new BadMethodCallException('Cannot create ExtLibevLoop, ext-libev extension missing');
        }
        $this->loop = new EventLoop();
        $this->futureTickQueue = new FutureTickQueue();
        $this->timerEvents = new SplObjectStorage();
        $this->signals = new SignalsHandler();
    }
    public function addReadStream($stream, $listener)
    {
        if (isset($this->readEvents[(int) $stream])) {
            return;
        }
        $callback = function () use($stream, $listener) {
            \call_user_func($listener, $stream);
        };
        $event = new IOEvent($callback, $stream, IOEvent::READ);
        $this->loop->add($event);
        $this->readEvents[(int) $stream] = $event;
    }
    public function addWriteStream($stream, $listener)
    {
        if (isset($this->writeEvents[(int) $stream])) {
            return;
        }
        $callback = function () use($stream, $listener) {
            \call_user_func($listener, $stream);
        };
        $event = new IOEvent($callback, $stream, IOEvent::WRITE);
        $this->loop->add($event);
        $this->writeEvents[(int) $stream] = $event;
    }
    public function removeReadStream($stream)
    {
        $key = (int) $stream;
        if (isset($this->readEvents[$key])) {
            $this->readEvents[$key]->stop();
            $this->loop->remove($this->readEvents[$key]);
            unset($this->readEvents[$key]);
        }
    }
    public function removeWriteStream($stream)
    {
        $key = (int) $stream;
        if (isset($this->writeEvents[$key])) {
            $this->writeEvents[$key]->stop();
            $this->loop->remove($this->writeEvents[$key]);
            unset($this->writeEvents[$key]);
        }
    }
    public function addTimer($interval, $callback)
    {
        $timer = new Timer($interval, $callback, \false);
        $that = $this;
        $timers = $this->timerEvents;
        $callback = function () use($timer, $timers, $that) {
            \call_user_func($timer->getCallback(), $timer);
            if ($timers->contains($timer)) {
                $that->cancelTimer($timer);
            }
        };
        $event = new TimerEvent($callback, $timer->getInterval());
        $this->timerEvents->attach($timer, $event);
        $this->loop->add($event);
        return $timer;
    }
    public function addPeriodicTimer($interval, $callback)
    {
        $timer = new Timer($interval, $callback, \true);
        $callback = function () use($timer) {
            \call_user_func($timer->getCallback(), $timer);
        };
        $event = new TimerEvent($callback, $timer->getInterval(), $timer->getInterval());
        $this->timerEvents->attach($timer, $event);
        $this->loop->add($event);
        return $timer;
    }
    public function cancelTimer(TimerInterface $timer)
    {
        if (isset($this->timerEvents[$timer])) {
            $this->loop->remove($this->timerEvents[$timer]);
            $this->timerEvents->detach($timer);
        }
    }
    public function futureTick($listener)
    {
        $this->futureTickQueue->add($listener);
    }
    public function addSignal($signal, $listener)
    {
        $this->signals->add($signal, $listener);
        if (!isset($this->signalEvents[$signal])) {
            $signals = $this->signals;
            $this->signalEvents[$signal] = new SignalEvent(function () use($signals, $signal) {
                $signals->call($signal);
            }, $signal);
            $this->loop->add($this->signalEvents[$signal]);
        }
    }
    public function removeSignal($signal, $listener)
    {
        $this->signals->remove($signal, $listener);
        if (isset($this->signalEvents[$signal]) && $this->signals->count($signal) === 0) {
            $this->signalEvents[$signal]->stop();
            $this->loop->remove($this->signalEvents[$signal]);
            unset($this->signalEvents[$signal]);
        }
    }
    public function run()
    {
        $this->running = \true;
        while ($this->running) {
            $this->futureTickQueue->tick();
            $flags = EventLoop::RUN_ONCE;
            if (!$this->running || !$this->futureTickQueue->isEmpty()) {
                $flags |= EventLoop::RUN_NOWAIT;
            } elseif (!$this->readEvents && !$this->writeEvents && !$this->timerEvents->count() && $this->signals->isEmpty()) {
                break;
            }
            $this->loop->run($flags);
        }
    }
    public function stop()
    {
        $this->running = \false;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\EventLoop;

/**
 * The `Loop` class exists as a convenient way to get the currently relevant loop
 */
final class Loop
{
    /**
     * @var ?LoopInterface
     */
    private static $instance;
    /** @var bool */
    private static $stopped = \false;
    /**
     * Returns the event loop.
     * When no loop is set, it will call the factory to create one.
     *
     * This method always returns an instance implementing `LoopInterface`,
     * the actual event loop implementation is an implementation detail.
     *
     * This method is the preferred way to get the event loop and using
     * Factory::create has been deprecated.
     *
     * @return LoopInterface
     */
    public static function get()
    {
        if (self::$instance instanceof LoopInterface) {
            return self::$instance;
        }
        self::$instance = $loop = Factory::create();
        // Automatically run loop at end of program, unless already started or stopped explicitly.
        // This is tested using child processes, so coverage is actually 100%, see BinTest.
        // @codeCoverageIgnoreStart
        $hasRun = \false;
        $loop->futureTick(function () use(&$hasRun) {
            $hasRun = \true;
        });
        $stopped =& self::$stopped;
        \register_shutdown_function(function () use($loop, &$hasRun, &$stopped) {
            // Don't run if we're coming from a fatal error (uncaught exception).
            $error = \error_get_last();
            if ((isset($error['type']) ? $error['type'] : 0) & (\E_ERROR | \E_CORE_ERROR | \E_COMPILE_ERROR | \E_USER_ERROR | \E_RECOVERABLE_ERROR)) {
                return;
            }
            if (!$hasRun && !$stopped) {
                $loop->run();
            }
        });
        // @codeCoverageIgnoreEnd
        return self::$instance;
    }
    /**
     * Internal undocumented method, behavior might change or throw in the
     * future. Use with caution and at your own risk.
     *
     * @internal
     * @return void
     */
    public static function set(LoopInterface $loop)
    {
        self::$instance = $loop;
    }
    /**
     * [Advanced] Register a listener to be notified when a stream is ready to read.
     *
     * @param resource $stream
     * @param callable $listener
     * @return void
     * @throws \Exception
     * @see LoopInterface::addReadStream()
     */
    public static function addReadStream($stream, $listener)
    {
        // create loop instance on demand (legacy PHP < 7 doesn't like ternaries in method calls)
        if (self::$instance === null) {
            self::get();
        }
        self::$instance->addReadStream($stream, $listener);
    }
    /**
     * [Advanced] Register a listener to be notified when a stream is ready to write.
     *
     * @param resource $stream
     * @param callable $listener
     * @return void
     * @throws \Exception
     * @see LoopInterface::addWriteStream()
     */
    public static function addWriteStream($stream, $listener)
    {
        // create loop instance on demand (legacy PHP < 7 doesn't like ternaries in method calls)
        if (self::$instance === null) {
            self::get();
        }
        self::$instance->addWriteStream($stream, $listener);
    }
    /**
     * Remove the read event listener for the given stream.
     *
     * @param resource $stream
     * @return void
     * @see LoopInterface::removeReadStream()
     */
    public static function removeReadStream($stream)
    {
        if (self::$instance !== null) {
            self::$instance->removeReadStream($stream);
        }
    }
    /**
     * Remove the write event listener for the given stream.
     *
     * @param resource $stream
     * @return void
     * @see LoopInterface::removeWriteStream()
     */
    public static function removeWriteStream($stream)
    {
        if (self::$instance !== null) {
            self::$instance->removeWriteStream($stream);
        }
    }
    /**
     * Enqueue a callback to be invoked once after the given interval.
     *
     * @param float $interval
     * @param callable $callback
     * @return TimerInterface
     * @see LoopInterface::addTimer()
     */
    public static function addTimer($interval, $callback)
    {
        // create loop instance on demand (legacy PHP < 7 doesn't like ternaries in method calls)
        if (self::$instance === null) {
            self::get();
        }
        return self::$instance->addTimer($interval, $callback);
    }
    /**
     * Enqueue a callback to be invoked repeatedly after the given interval.
     *
     * @param float $interval
     * @param callable $callback
     * @return TimerInterface
     * @see LoopInterface::addPeriodicTimer()
     */
    public static function addPeriodicTimer($interval, $callback)
    {
        // create loop instance on demand (legacy PHP < 7 doesn't like ternaries in method calls)
        if (self::$instance === null) {
            self::get();
        }
        return self::$instance->addPeriodicTimer($interval, $callback);
    }
    /**
     * Cancel a pending timer.
     *
     * @param TimerInterface $timer
     * @return void
     * @see LoopInterface::cancelTimer()
     */
    public static function cancelTimer(TimerInterface $timer)
    {
        if (self::$instance !== null) {
            self::$instance->cancelTimer($timer);
        }
    }
    /**
     * Schedule a callback to be invoked on a future tick of the event loop.
     *
     * @param callable $listener
     * @return void
     * @see LoopInterface::futureTick()
     */
    public static function futureTick($listener)
    {
        // create loop instance on demand (legacy PHP < 7 doesn't like ternaries in method calls)
        if (self::$instance === null) {
            self::get();
        }
        self::$instance->futureTick($listener);
    }
    /**
     * Register a listener to be notified when a signal has been caught by this process.
     *
     * @param int $signal
     * @param callable $listener
     * @return void
     * @see LoopInterface::addSignal()
     */
    public static function addSignal($signal, $listener)
    {
        // create loop instance on demand (legacy PHP < 7 doesn't like ternaries in method calls)
        if (self::$instance === null) {
            self::get();
        }
        self::$instance->addSignal($signal, $listener);
    }
    /**
     * Removes a previously added signal listener.
     *
     * @param int $signal
     * @param callable $listener
     * @return void
     * @see LoopInterface::removeSignal()
     */
    public static function removeSignal($signal, $listener)
    {
        if (self::$instance !== null) {
            self::$instance->removeSignal($signal, $listener);
        }
    }
    /**
     * Run the event loop until there are no more tasks to perform.
     *
     * @return void
     * @see LoopInterface::run()
     */
    public static function run()
    {
        // create loop instance on demand (legacy PHP < 7 doesn't like ternaries in method calls)
        if (self::$instance === null) {
            self::get();
        }
        self::$instance->run();
    }
    /**
     * Instruct a running event loop to stop.
     *
     * @return void
     * @see LoopInterface::stop()
     */
    public static function stop()
    {
        self::$stopped = \true;
        if (self::$instance !== null) {
            self::$instance->stop();
        }
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\EventLoop\Tick;

use SplQueue;
/**
 * A tick queue implementation that can hold multiple callback functions
 *
 * This class should only be used internally, see LoopInterface instead.
 *
 * @see LoopInterface
 * @internal
 */
final class FutureTickQueue
{
    private $queue;
    public function __construct()
    {
        $this->queue = new SplQueue();
    }
    /**
     * Add a callback to be invoked on a future tick of the event loop.
     *
     * Callbacks are guaranteed to be executed in the order they are enqueued.
     *
     * @param callable $listener The callback to invoke.
     */
    public function add($listener)
    {
        $this->queue->enqueue($listener);
    }
    /**
     * Flush the callback queue.
     */
    public function tick()
    {
        // Only invoke as many callbacks as were on the queue when tick() was called.
        $count = $this->queue->count();
        while ($count--) {
            \call_user_func($this->queue->dequeue());
        }
    }
    /**
     * Check if the next tick queue is empty.
     *
     * @return boolean
     */
    public function isEmpty()
    {
        return $this->queue->isEmpty();
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\EventLoop;

use Ev;
use EvIo;
use EvLoop;
use _PHPStan_dcc7b7cff\React\EventLoop\Tick\FutureTickQueue;
use _PHPStan_dcc7b7cff\React\EventLoop\Timer\Timer;
use SplObjectStorage;
/**
 * An `ext-ev` based event loop.
 *
 * This loop uses the [`ev` PECL extension](https://pecl.php.net/package/ev),
 * that provides an interface to `libev` library.
 * `libev` itself supports a number of system-specific backends (epoll, kqueue).
 *
 * This loop is known to work with PHP 5.4 through PHP 8+.
 *
 * @see http://php.net/manual/en/book.ev.php
 * @see https://bitbucket.org/osmanov/pecl-ev/overview
 */
class ExtEvLoop implements LoopInterface
{
    /**
     * @var EvLoop
     */
    private $loop;
    /**
     * @var FutureTickQueue
     */
    private $futureTickQueue;
    /**
     * @var SplObjectStorage
     */
    private $timers;
    /**
     * @var EvIo[]
     */
    private $readStreams = array();
    /**
     * @var EvIo[]
     */
    private $writeStreams = array();
    /**
     * @var bool
     */
    private $running;
    /**
     * @var SignalsHandler
     */
    private $signals;
    /**
     * @var \EvSignal[]
     */
    private $signalEvents = array();
    public function __construct()
    {
        $this->loop = new EvLoop();
        $this->futureTickQueue = new FutureTickQueue();
        $this->timers = new SplObjectStorage();
        $this->signals = new SignalsHandler();
    }
    public function addReadStream($stream, $listener)
    {
        $key = (int) $stream;
        if (isset($this->readStreams[$key])) {
            return;
        }
        $callback = $this->getStreamListenerClosure($stream, $listener);
        $event = $this->loop->io($stream, Ev::READ, $callback);
        $this->readStreams[$key] = $event;
    }
    /**
     * @param resource $stream
     * @param callable $listener
     *
     * @return \Closure
     */
    private function getStreamListenerClosure($stream, $listener)
    {
        return function () use($stream, $listener) {
            \call_user_func($listener, $stream);
        };
    }
    public function addWriteStream($stream, $listener)
    {
        $key = (int) $stream;
        if (isset($this->writeStreams[$key])) {
            return;
        }
        $callback = $this->getStreamListenerClosure($stream, $listener);
        $event = $this->loop->io($stream, Ev::WRITE, $callback);
        $this->writeStreams[$key] = $event;
    }
    public function removeReadStream($stream)
    {
        $key = (int) $stream;
        if (!isset($this->readStreams[$key])) {
            return;
        }
        $this->readStreams[$key]->stop();
        unset($this->readStreams[$key]);
    }
    public function removeWriteStream($stream)
    {
        $key = (int) $stream;
        if (!isset($this->writeStreams[$key])) {
            return;
        }
        $this->writeStreams[$key]->stop();
        unset($this->writeStreams[$key]);
    }
    public function addTimer($interval, $callback)
    {
        $timer = new Timer($interval, $callback, \false);
        $that = $this;
        $timers = $this->timers;
        $callback = function () use($timer, $timers, $that) {
            \call_user_func($timer->getCallback(), $timer);
            if ($timers->contains($timer)) {
                $that->cancelTimer($timer);
            }
        };
        $event = $this->loop->timer($timer->getInterval(), 0.0, $callback);
        $this->timers->attach($timer, $event);
        return $timer;
    }
    public function addPeriodicTimer($interval, $callback)
    {
        $timer = new Timer($interval, $callback, \true);
        $callback = function () use($timer) {
            \call_user_func($timer->getCallback(), $timer);
        };
        $event = $this->loop->timer($timer->getInterval(), $timer->getInterval(), $callback);
        $this->timers->attach($timer, $event);
        return $timer;
    }
    public function cancelTimer(TimerInterface $timer)
    {
        if (!isset($this->timers[$timer])) {
            return;
        }
        $event = $this->timers[$timer];
        $event->stop();
        $this->timers->detach($timer);
    }
    public function futureTick($listener)
    {
        $this->futureTickQueue->add($listener);
    }
    public function run()
    {
        $this->running = \true;
        while ($this->running) {
            $this->futureTickQueue->tick();
            $hasPendingCallbacks = !$this->futureTickQueue->isEmpty();
            $wasJustStopped = !$this->running;
            $nothingLeftToDo = !$this->readStreams && !$this->writeStreams && !$this->timers->count() && $this->signals->isEmpty();
            $flags = Ev::RUN_ONCE;
            if ($wasJustStopped || $hasPendingCallbacks) {
                $flags |= Ev::RUN_NOWAIT;
            } elseif ($nothingLeftToDo) {
                break;
            }
            $this->loop->run($flags);
        }
    }
    public function stop()
    {
        $this->running = \false;
    }
    public function __destruct()
    {
        /** @var TimerInterface $timer */
        foreach ($this->timers as $timer) {
            $this->cancelTimer($timer);
        }
        foreach ($this->readStreams as $key => $stream) {
            $this->removeReadStream($key);
        }
        foreach ($this->writeStreams as $key => $stream) {
            $this->removeWriteStream($key);
        }
    }
    public function addSignal($signal, $listener)
    {
        $this->signals->add($signal, $listener);
        if (!isset($this->signalEvents[$signal])) {
            $this->signalEvents[$signal] = $this->loop->signal($signal, function () use($signal) {
                $this->signals->call($signal);
            });
        }
    }
    public function removeSignal($signal, $listener)
    {
        $this->signals->remove($signal, $listener);
        if (isset($this->signalEvents[$signal])) {
            $this->signalEvents[$signal]->stop();
            unset($this->signalEvents[$signal]);
        }
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\EventLoop;

use BadMethodCallException;
use Event;
use EventBase;
use _PHPStan_dcc7b7cff\React\EventLoop\Tick\FutureTickQueue;
use _PHPStan_dcc7b7cff\React\EventLoop\Timer\Timer;
use SplObjectStorage;
/**
 * [Deprecated] An `ext-libevent` based event loop.
 *
 * This uses the [`libevent` PECL extension](https://pecl.php.net/package/libevent),
 * that provides an interface to `libevent` library.
 * `libevent` itself supports a number of system-specific backends (epoll, kqueue).
 *
 * This event loop does only work with PHP 5.
 * An [unofficial update](https://github.com/php/pecl-event-libevent/pull/2) for
 * PHP 7 does exist, but it is known to cause regular crashes due to `SEGFAULT`s.
 * To reiterate: Using this event loop on PHP 7 is not recommended.
 * Accordingly, neither the [`Loop` class](#loop) nor the deprecated
 * [`Factory` class](#factory) will try to use this event loop on PHP 7.
 *
 * This event loop is known to trigger a readable listener only if
 * the stream *becomes* readable (edge-triggered) and may not trigger if the
 * stream has already been readable from the beginning.
 * This also implies that a stream may not be recognized as readable when data
 * is still left in PHP's internal stream buffers.
 * As such, it's recommended to use `stream_set_read_buffer($stream, 0);`
 * to disable PHP's internal read buffer in this case.
 * See also [`addReadStream()`](#addreadstream) for more details.
 *
 * @link https://pecl.php.net/package/libevent
 * @deprecated 1.2.0, use [`ExtEventLoop`](#exteventloop) instead.
 */
final class ExtLibeventLoop implements LoopInterface
{
    /** @internal */
    const MICROSECONDS_PER_SECOND = 1000000;
    private $eventBase;
    private $futureTickQueue;
    private $timerCallback;
    private $timerEvents;
    private $streamCallback;
    private $readEvents = array();
    private $writeEvents = array();
    private $readListeners = array();
    private $writeListeners = array();
    private $running;
    private $signals;
    private $signalEvents = array();
    public function __construct()
    {
        if (!\function_exists('event_base_new')) {
            throw new BadMethodCallException('Cannot create ExtLibeventLoop, ext-libevent extension missing');
        }
        $this->eventBase = \event_base_new();
        $this->futureTickQueue = new FutureTickQueue();
        $this->timerEvents = new SplObjectStorage();
        $this->signals = new SignalsHandler();
        $this->createTimerCallback();
        $this->createStreamCallback();
    }
    public function addReadStream($stream, $listener)
    {
        $key = (int) $stream;
        if (isset($this->readListeners[$key])) {
            return;
        }
        $event = \event_new();
        \event_set($event, $stream, \EV_PERSIST | \EV_READ, $this->streamCallback);
        \event_base_set($event, $this->eventBase);
        \event_add($event);
        $this->readEvents[$key] = $event;
        $this->readListeners[$key] = $listener;
    }
    public function addWriteStream($stream, $listener)
    {
        $key = (int) $stream;
        if (isset($this->writeListeners[$key])) {
            return;
        }
        $event = \event_new();
        \event_set($event, $stream, \EV_PERSIST | \EV_WRITE, $this->streamCallback);
        \event_base_set($event, $this->eventBase);
        \event_add($event);
        $this->writeEvents[$key] = $event;
        $this->writeListeners[$key] = $listener;
    }
    public function removeReadStream($stream)
    {
        $key = (int) $stream;
        if (isset($this->readListeners[$key])) {
            $event = $this->readEvents[$key];
            \event_del($event);
            \event_free($event);
            unset($this->readEvents[$key], $this->readListeners[$key]);
        }
    }
    public function removeWriteStream($stream)
    {
        $key = (int) $stream;
        if (isset($this->writeListeners[$key])) {
            $event = $this->writeEvents[$key];
            \event_del($event);
            \event_free($event);
            unset($this->writeEvents[$key], $this->writeListeners[$key]);
        }
    }
    public function addTimer($interval, $callback)
    {
        $timer = new Timer($interval, $callback, \false);
        $this->scheduleTimer($timer);
        return $timer;
    }
    public function addPeriodicTimer($interval, $callback)
    {
        $timer = new Timer($interval, $callback, \true);
        $this->scheduleTimer($timer);
        return $timer;
    }
    public function cancelTimer(TimerInterface $timer)
    {
        if ($this->timerEvents->contains($timer)) {
            $event = $this->timerEvents[$timer];
            \event_del($event);
            \event_free($event);
            $this->timerEvents->detach($timer);
        }
    }
    public function futureTick($listener)
    {
        $this->futureTickQueue->add($listener);
    }
    public function addSignal($signal, $listener)
    {
        $this->signals->add($signal, $listener);
        if (!isset($this->signalEvents[$signal])) {
            $this->signalEvents[$signal] = \event_new();
            \event_set($this->signalEvents[$signal], $signal, \EV_PERSIST | \EV_SIGNAL, array($this->signals, 'call'));
            \event_base_set($this->signalEvents[$signal], $this->eventBase);
            \event_add($this->signalEvents[$signal]);
        }
    }
    public function removeSignal($signal, $listener)
    {
        $this->signals->remove($signal, $listener);
        if (isset($this->signalEvents[$signal]) && $this->signals->count($signal) === 0) {
            \event_del($this->signalEvents[$signal]);
            \event_free($this->signalEvents[$signal]);
            unset($this->signalEvents[$signal]);
        }
    }
    public function run()
    {
        $this->running = \true;
        while ($this->running) {
            $this->futureTickQueue->tick();
            $flags = \EVLOOP_ONCE;
            if (!$this->running || !$this->futureTickQueue->isEmpty()) {
                $flags |= \EVLOOP_NONBLOCK;
            } elseif (!$this->readEvents && !$this->writeEvents && !$this->timerEvents->count() && $this->signals->isEmpty()) {
                break;
            }
            \event_base_loop($this->eventBase, $flags);
        }
    }
    public function stop()
    {
        $this->running = \false;
    }
    /**
     * Schedule a timer for execution.
     *
     * @param TimerInterface $timer
     */
    private function scheduleTimer(TimerInterface $timer)
    {
        $this->timerEvents[$timer] = $event = \event_timer_new();
        \event_timer_set($event, $this->timerCallback, $timer);
        \event_base_set($event, $this->eventBase);
        \event_add($event, $timer->getInterval() * self::MICROSECONDS_PER_SECOND);
    }
    /**
     * Create a callback used as the target of timer events.
     *
     * A reference is kept to the callback for the lifetime of the loop
     * to prevent "Cannot destroy active lambda function" fatal error from
     * the event extension.
     */
    private function createTimerCallback()
    {
        $that = $this;
        $timers = $this->timerEvents;
        $this->timerCallback = function ($_, $__, $timer) use($timers, $that) {
            \call_user_func($timer->getCallback(), $timer);
            // Timer already cancelled ...
            if (!$timers->contains($timer)) {
                return;
            }
            // Reschedule periodic timers ...
            if ($timer->isPeriodic()) {
                \event_add($timers[$timer], $timer->getInterval() * ExtLibeventLoop::MICROSECONDS_PER_SECOND);
                // Clean-up one shot timers ...
            } else {
                $that->cancelTimer($timer);
            }
        };
    }
    /**
     * Create a callback used as the target of stream events.
     *
     * A reference is kept to the callback for the lifetime of the loop
     * to prevent "Cannot destroy active lambda function" fatal error from
     * the event extension.
     */
    private function createStreamCallback()
    {
        $read =& $this->readListeners;
        $write =& $this->writeListeners;
        $this->streamCallback = function ($stream, $flags) use(&$read, &$write) {
            $key = (int) $stream;
            if (\EV_READ === (\EV_READ & $flags) && isset($read[$key])) {
                \call_user_func($read[$key], $stream);
            }
            if (\EV_WRITE === (\EV_WRITE & $flags) && isset($write[$key])) {
                \call_user_func($write[$key], $stream);
            }
        };
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\EventLoop;

interface LoopInterface
{
    /**
     * [Advanced] Register a listener to be notified when a stream is ready to read.
     *
     * Note that this low-level API is considered advanced usage.
     * Most use cases should probably use the higher-level
     * [readable Stream API](https://github.com/reactphp/stream#readablestreaminterface)
     * instead.
     *
     * The first parameter MUST be a valid stream resource that supports
     * checking whether it is ready to read by this loop implementation.
     * A single stream resource MUST NOT be added more than once.
     * Instead, either call [`removeReadStream()`](#removereadstream) first or
     * react to this event with a single listener and then dispatch from this
     * listener. This method MAY throw an `Exception` if the given resource type
     * is not supported by this loop implementation.
     *
     * The second parameter MUST be a listener callback function that accepts
     * the stream resource as its only parameter.
     * If you don't use the stream resource inside your listener callback function
     * you MAY use a function which has no parameters at all.
     *
     * The listener callback function MUST NOT throw an `Exception`.
     * The return value of the listener callback function will be ignored and has
     * no effect, so for performance reasons you're recommended to not return
     * any excessive data structures.
     *
     * If you want to access any variables within your callback function, you
     * can bind arbitrary data to a callback closure like this:
     *
     * ```php
     * $loop->addReadStream($stream, function ($stream) use ($name) {
     *     echo $name . ' said: ' . fread($stream);
     * });
     * ```
     *
     * See also [example #11](examples).
     *
     * You can invoke [`removeReadStream()`](#removereadstream) to remove the
     * read event listener for this stream.
     *
     * The execution order of listeners when multiple streams become ready at
     * the same time is not guaranteed.
     *
     * @param resource $stream   The PHP stream resource to check.
     * @param callable $listener Invoked when the stream is ready.
     * @throws \Exception if the given resource type is not supported by this loop implementation
     * @see self::removeReadStream()
     */
    public function addReadStream($stream, $listener);
    /**
     * [Advanced] Register a listener to be notified when a stream is ready to write.
     *
     * Note that this low-level API is considered advanced usage.
     * Most use cases should probably use the higher-level
     * [writable Stream API](https://github.com/reactphp/stream#writablestreaminterface)
     * instead.
     *
     * The first parameter MUST be a valid stream resource that supports
     * checking whether it is ready to write by this loop implementation.
     * A single stream resource MUST NOT be added more than once.
     * Instead, either call [`removeWriteStream()`](#removewritestream) first or
     * react to this event with a single listener and then dispatch from this
     * listener. This method MAY throw an `Exception` if the given resource type
     * is not supported by this loop implementation.
     *
     * The second parameter MUST be a listener callback function that accepts
     * the stream resource as its only parameter.
     * If you don't use the stream resource inside your listener callback function
     * you MAY use a function which has no parameters at all.
     *
     * The listener callback function MUST NOT throw an `Exception`.
     * The return value of the listener callback function will be ignored and has
     * no effect, so for performance reasons you're recommended to not return
     * any excessive data structures.
     *
     * If you want to access any variables within your callback function, you
     * can bind arbitrary data to a callback closure like this:
     *
     * ```php
     * $loop->addWriteStream($stream, function ($stream) use ($name) {
     *     fwrite($stream, 'Hello ' . $name);
     * });
     * ```
     *
     * See also [example #12](examples).
     *
     * You can invoke [`removeWriteStream()`](#removewritestream) to remove the
     * write event listener for this stream.
     *
     * The execution order of listeners when multiple streams become ready at
     * the same time is not guaranteed.
     *
     * Some event loop implementations are known to only trigger the listener if
     * the stream *becomes* readable (edge-triggered) and may not trigger if the
     * stream has already been readable from the beginning.
     * This also implies that a stream may not be recognized as readable when data
     * is still left in PHP's internal stream buffers.
     * As such, it's recommended to use `stream_set_read_buffer($stream, 0);`
     * to disable PHP's internal read buffer in this case.
     *
     * @param resource $stream   The PHP stream resource to check.
     * @param callable $listener Invoked when the stream is ready.
     * @throws \Exception if the given resource type is not supported by this loop implementation
     * @see self::removeWriteStream()
     */
    public function addWriteStream($stream, $listener);
    /**
     * Remove the read event listener for the given stream.
     *
     * Removing a stream from the loop that has already been removed or trying
     * to remove a stream that was never added or is invalid has no effect.
     *
     * @param resource $stream The PHP stream resource.
     */
    public function removeReadStream($stream);
    /**
     * Remove the write event listener for the given stream.
     *
     * Removing a stream from the loop that has already been removed or trying
     * to remove a stream that was never added or is invalid has no effect.
     *
     * @param resource $stream The PHP stream resource.
     */
    public function removeWriteStream($stream);
    /**
     * Enqueue a callback to be invoked once after the given interval.
     *
     * The second parameter MUST be a timer callback function that accepts
     * the timer instance as its only parameter.
     * If you don't use the timer instance inside your timer callback function
     * you MAY use a function which has no parameters at all.
     *
     * The timer callback function MUST NOT throw an `Exception`.
     * The return value of the timer callback function will be ignored and has
     * no effect, so for performance reasons you're recommended to not return
     * any excessive data structures.
     *
     * This method returns a timer instance. The same timer instance will also be
     * passed into the timer callback function as described above.
     * You can invoke [`cancelTimer`](#canceltimer) to cancel a pending timer.
     * Unlike [`addPeriodicTimer()`](#addperiodictimer), this method will ensure
     * the callback will be invoked only once after the given interval.
     *
     * ```php
     * $loop->addTimer(0.8, function () {
     *     echo 'world!' . PHP_EOL;
     * });
     *
     * $loop->addTimer(0.3, function () {
     *     echo 'hello ';
     * });
     * ```
     *
     * See also [example #1](examples).
     *
     * If you want to access any variables within your callback function, you
     * can bind arbitrary data to a callback closure like this:
     *
     * ```php
     * function hello($name, LoopInterface $loop)
     * {
     *     $loop->addTimer(1.0, function () use ($name) {
     *         echo "hello $name\n";
     *     });
     * }
     *
     * hello('Tester', $loop);
     * ```
     *
     * This interface does not enforce any particular timer resolution, so
     * special care may have to be taken if you rely on very high precision with
     * millisecond accuracy or below. Event loop implementations SHOULD work on
     * a best effort basis and SHOULD provide at least millisecond accuracy
     * unless otherwise noted. Many existing event loop implementations are
     * known to provide microsecond accuracy, but it's generally not recommended
     * to rely on this high precision.
     *
     * Similarly, the execution order of timers scheduled to execute at the
     * same time (within its possible accuracy) is not guaranteed.
     *
     * This interface suggests that event loop implementations SHOULD use a
     * monotonic time source if available. Given that a monotonic time source is
     * only available as of PHP 7.3 by default, event loop implementations MAY
     * fall back to using wall-clock time.
     * While this does not affect many common use cases, this is an important
     * distinction for programs that rely on a high time precision or on systems
     * that are subject to discontinuous time adjustments (time jumps).
     * This means that if you schedule a timer to trigger in 30s and then adjust
     * your system time forward by 20s, the timer SHOULD still trigger in 30s.
     * See also [event loop implementations](#loop-implementations) for more details.
     *
     * @param int|float $interval The number of seconds to wait before execution.
     * @param callable  $callback The callback to invoke.
     *
     * @return TimerInterface
     */
    public function addTimer($interval, $callback);
    /**
     * Enqueue a callback to be invoked repeatedly after the given interval.
     *
     * The second parameter MUST be a timer callback function that accepts
     * the timer instance as its only parameter.
     * If you don't use the timer instance inside your timer callback function
     * you MAY use a function which has no parameters at all.
     *
     * The timer callback function MUST NOT throw an `Exception`.
     * The return value of the timer callback function will be ignored and has
     * no effect, so for performance reasons you're recommended to not return
     * any excessive data structures.
     *
     * This method returns a timer instance. The same timer instance will also be
     * passed into the timer callback function as described above.
     * Unlike [`addTimer()`](#addtimer), this method will ensure the callback
     * will be invoked infinitely after the given interval or until you invoke
     * [`cancelTimer`](#canceltimer).
     *
     * ```php
     * $timer = $loop->addPeriodicTimer(0.1, function () {
     *     echo 'tick!' . PHP_EOL;
     * });
     *
     * $loop->addTimer(1.0, function () use ($loop, $timer) {
     *     $loop->cancelTimer($timer);
     *     echo 'Done' . PHP_EOL;
     * });
     * ```
     *
     * See also [example #2](examples).
     *
     * If you want to limit the number of executions, you can bind
     * arbitrary data to a callback closure like this:
     *
     * ```php
     * function hello($name, LoopInterface $loop)
     * {
     *     $n = 3;
     *     $loop->addPeriodicTimer(1.0, function ($timer) use ($name, $loop, &$n) {
     *         if ($n > 0) {
     *             --$n;
     *             echo "hello $name\n";
     *         } else {
     *             $loop->cancelTimer($timer);
     *         }
     *     });
     * }
     *
     * hello('Tester', $loop);
     * ```
     *
     * This interface does not enforce any particular timer resolution, so
     * special care may have to be taken if you rely on very high precision with
     * millisecond accuracy or below. Event loop implementations SHOULD work on
     * a best effort basis and SHOULD provide at least millisecond accuracy
     * unless otherwise noted. Many existing event loop implementations are
     * known to provide microsecond accuracy, but it's generally not recommended
     * to rely on this high precision.
     *
     * Similarly, the execution order of timers scheduled to execute at the
     * same time (within its possible accuracy) is not guaranteed.
     *
     * This interface suggests that event loop implementations SHOULD use a
     * monotonic time source if available. Given that a monotonic time source is
     * only available as of PHP 7.3 by default, event loop implementations MAY
     * fall back to using wall-clock time.
     * While this does not affect many common use cases, this is an important
     * distinction for programs that rely on a high time precision or on systems
     * that are subject to discontinuous time adjustments (time jumps).
     * This means that if you schedule a timer to trigger in 30s and then adjust
     * your system time forward by 20s, the timer SHOULD still trigger in 30s.
     * See also [event loop implementations](#loop-implementations) for more details.
     *
     * Additionally, periodic timers may be subject to timer drift due to
     * re-scheduling after each invocation. As such, it's generally not
     * recommended to rely on this for high precision intervals with millisecond
     * accuracy or below.
     *
     * @param int|float $interval The number of seconds to wait before execution.
     * @param callable  $callback The callback to invoke.
     *
     * @return TimerInterface
     */
    public function addPeriodicTimer($interval, $callback);
    /**
     * Cancel a pending timer.
     *
     * See also [`addPeriodicTimer()`](#addperiodictimer) and [example #2](examples).
     *
     * Calling this method on a timer instance that has not been added to this
     * loop instance or on a timer that has already been cancelled has no effect.
     *
     * @param TimerInterface $timer The timer to cancel.
     *
     * @return void
     */
    public function cancelTimer(TimerInterface $timer);
    /**
     * Schedule a callback to be invoked on a future tick of the event loop.
     *
     * This works very much similar to timers with an interval of zero seconds,
     * but does not require the overhead of scheduling a timer queue.
     *
     * The tick callback function MUST be able to accept zero parameters.
     *
     * The tick callback function MUST NOT throw an `Exception`.
     * The return value of the tick callback function will be ignored and has
     * no effect, so for performance reasons you're recommended to not return
     * any excessive data structures.
     *
     * If you want to access any variables within your callback function, you
     * can bind arbitrary data to a callback closure like this:
     *
     * ```php
     * function hello($name, LoopInterface $loop)
     * {
     *     $loop->futureTick(function () use ($name) {
     *         echo "hello $name\n";
     *     });
     * }
     *
     * hello('Tester', $loop);
     * ```
     *
     * Unlike timers, tick callbacks are guaranteed to be executed in the order
     * they are enqueued.
     * Also, once a callback is enqueued, there's no way to cancel this operation.
     *
     * This is often used to break down bigger tasks into smaller steps (a form
     * of cooperative multitasking).
     *
     * ```php
     * $loop->futureTick(function () {
     *     echo 'b';
     * });
     * $loop->futureTick(function () {
     *     echo 'c';
     * });
     * echo 'a';
     * ```
     *
     * See also [example #3](examples).
     *
     * @param callable $listener The callback to invoke.
     *
     * @return void
     */
    public function futureTick($listener);
    /**
     * Register a listener to be notified when a signal has been caught by this process.
     *
     * This is useful to catch user interrupt signals or shutdown signals from
     * tools like `supervisor` or `systemd`.
     *
     * The second parameter MUST be a listener callback function that accepts
     * the signal as its only parameter.
     * If you don't use the signal inside your listener callback function
     * you MAY use a function which has no parameters at all.
     *
     * The listener callback function MUST NOT throw an `Exception`.
     * The return value of the listener callback function will be ignored and has
     * no effect, so for performance reasons you're recommended to not return
     * any excessive data structures.
     *
     * ```php
     * $loop->addSignal(SIGINT, function (int $signal) {
     *     echo 'Caught user interrupt signal' . PHP_EOL;
     * });
     * ```
     *
     * See also [example #4](examples).
     *
     * Signaling is only available on Unix-like platforms, Windows isn't
     * supported due to operating system limitations.
     * This method may throw a `BadMethodCallException` if signals aren't
     * supported on this platform, for example when required extensions are
     * missing.
     *
     * **Note: A listener can only be added once to the same signal, any
     * attempts to add it more than once will be ignored.**
     *
     * @param int $signal
     * @param callable $listener
     *
     * @throws \BadMethodCallException when signals aren't supported on this
     *     platform, for example when required extensions are missing.
     *
     * @return void
     */
    public function addSignal($signal, $listener);
    /**
     * Removes a previously added signal listener.
     *
     * ```php
     * $loop->removeSignal(SIGINT, $listener);
     * ```
     *
     * Any attempts to remove listeners that aren't registered will be ignored.
     *
     * @param int $signal
     * @param callable $listener
     *
     * @return void
     */
    public function removeSignal($signal, $listener);
    /**
     * Run the event loop until there are no more tasks to perform.
     *
     * For many applications, this method is the only directly visible
     * invocation on the event loop.
     * As a rule of thumb, it is usually recommended to attach everything to the
     * same loop instance and then run the loop once at the bottom end of the
     * application.
     *
     * ```php
     * $loop->run();
     * ```
     *
     * This method will keep the loop running until there are no more tasks
     * to perform. In other words: This method will block until the last
     * timer, stream and/or signal has been removed.
     *
     * Likewise, it is imperative to ensure the application actually invokes
     * this method once. Adding listeners to the loop and missing to actually
     * run it will result in the application exiting without actually waiting
     * for any of the attached listeners.
     *
     * This method MUST NOT be called while the loop is already running.
     * This method MAY be called more than once after it has explicitly been
     * [`stop()`ped](#stop) or after it automatically stopped because it
     * previously did no longer have anything to do.
     *
     * @return void
     */
    public function run();
    /**
     * Instruct a running event loop to stop.
     *
     * This method is considered advanced usage and should be used with care.
     * As a rule of thumb, it is usually recommended to let the loop stop
     * only automatically when it no longer has anything to do.
     *
     * This method can be used to explicitly instruct the event loop to stop:
     *
     * ```php
     * $loop->addTimer(3.0, function () use ($loop) {
     *     $loop->stop();
     * });
     * ```
     *
     * Calling this method on a loop instance that is not currently running or
     * on a loop instance that has already been stopped has no effect.
     *
     * @return void
     */
    public function stop();
}
The MIT License (MIT)

Copyright (c) 2012 Christian Lück, Cees-Jan Kiewiet, Jan Sorgalla, Chris Boden, Igor Wiedler

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

namespace _PHPStan_dcc7b7cff\React\Socket;

use _PHPStan_dcc7b7cff\React\Stream\DuplexStreamInterface;
/**
 * Any incoming and outgoing connection is represented by this interface,
 * such as a normal TCP/IP connection.
 *
 * An incoming or outgoing connection is a duplex stream (both readable and
 * writable) that implements React's
 * [`DuplexStreamInterface`](https://github.com/reactphp/stream#duplexstreaminterface).
 * It contains additional properties for the local and remote address (client IP)
 * where this connection has been established to/from.
 *
 * Most commonly, instances implementing this `ConnectionInterface` are emitted
 * by all classes implementing the [`ServerInterface`](#serverinterface) and
 * used by all classes implementing the [`ConnectorInterface`](#connectorinterface).
 *
 * Because the `ConnectionInterface` implements the underlying
 * [`DuplexStreamInterface`](https://github.com/reactphp/stream#duplexstreaminterface)
 * you can use any of its events and methods as usual:
 *
 * ```php
 * $connection->on('data', function ($chunk) {
 *     echo $chunk;
 * });
 *
 * $connection->on('end', function () {
 *     echo 'ended';
 * });
 *
 * $connection->on('error', function (Exception $e) {
 *     echo 'error: ' . $e->getMessage();
 * });
 *
 * $connection->on('close', function () {
 *     echo 'closed';
 * });
 *
 * $connection->write($data);
 * $connection->end($data = null);
 * $connection->close();
 * // …
 * ```
 *
 * For more details, see the
 * [`DuplexStreamInterface`](https://github.com/reactphp/stream#duplexstreaminterface).
 *
 * @see DuplexStreamInterface
 * @see ServerInterface
 * @see ConnectorInterface
 */
interface ConnectionInterface extends DuplexStreamInterface
{
    /**
     * Returns the full remote address (URI) where this connection has been established with
     *
     * ```php
     * $address = $connection->getRemoteAddress();
     * echo 'Connection with ' . $address . PHP_EOL;
     * ```
     *
     * If the remote address can not be determined or is unknown at this time (such as
     * after the connection has been closed), it MAY return a `NULL` value instead.
     *
     * Otherwise, it will return the full address (URI) as a string value, such
     * as `tcp://127.0.0.1:8080`, `tcp://[::1]:80`, `tls://127.0.0.1:443`,
     * `unix://example.sock` or `unix:///path/to/example.sock`.
     * Note that individual URI components are application specific and depend
     * on the underlying transport protocol.
     *
     * If this is a TCP/IP based connection and you only want the remote IP, you may
     * use something like this:
     *
     * ```php
     * $address = $connection->getRemoteAddress();
     * $ip = trim(parse_url($address, PHP_URL_HOST), '[]');
     * echo 'Connection with ' . $ip . PHP_EOL;
     * ```
     *
     * @return ?string remote address (URI) or null if unknown
     */
    public function getRemoteAddress();
    /**
     * Returns the full local address (full URI with scheme, IP and port) where this connection has been established with
     *
     * ```php
     * $address = $connection->getLocalAddress();
     * echo 'Connection with ' . $address . PHP_EOL;
     * ```
     *
     * If the local address can not be determined or is unknown at this time (such as
     * after the connection has been closed), it MAY return a `NULL` value instead.
     *
     * Otherwise, it will return the full address (URI) as a string value, such
     * as `tcp://127.0.0.1:8080`, `tcp://[::1]:80`, `tls://127.0.0.1:443`,
     * `unix://example.sock` or `unix:///path/to/example.sock`.
     * Note that individual URI components are application specific and depend
     * on the underlying transport protocol.
     *
     * This method complements the [`getRemoteAddress()`](#getremoteaddress) method,
     * so they should not be confused.
     *
     * If your `TcpServer` instance is listening on multiple interfaces (e.g. using
     * the address `0.0.0.0`), you can use this method to find out which interface
     * actually accepted this connection (such as a public or local interface).
     *
     * If your system has multiple interfaces (e.g. a WAN and a LAN interface),
     * you can use this method to find out which interface was actually
     * used for this connection.
     *
     * @return ?string local address (URI) or null if unknown
     * @see self::getRemoteAddress()
     */
    public function getLocalAddress();
}
<?php

namespace _PHPStan_dcc7b7cff\React\Socket;

use _PHPStan_dcc7b7cff\React\Dns\Resolver\ResolverInterface;
use _PHPStan_dcc7b7cff\React\Promise;
use _PHPStan_dcc7b7cff\React\Promise\PromiseInterface;
final class DnsConnector implements ConnectorInterface
{
    private $connector;
    private $resolver;
    public function __construct(ConnectorInterface $connector, ResolverInterface $resolver)
    {
        $this->connector = $connector;
        $this->resolver = $resolver;
    }
    public function connect($uri)
    {
        $original = $uri;
        if (\strpos($uri, '://') === \false) {
            $uri = 'tcp://' . $uri;
            $parts = \parse_url($uri);
            if (isset($parts['scheme'])) {
                unset($parts['scheme']);
            }
        } else {
            $parts = \parse_url($uri);
        }
        if (!$parts || !isset($parts['host'])) {
            return Promise\reject(new \InvalidArgumentException('Given URI "' . $original . '" is invalid (EINVAL)', \defined('SOCKET_EINVAL') ? \SOCKET_EINVAL : 22));
        }
        $host = \trim($parts['host'], '[]');
        $connector = $this->connector;
        // skip DNS lookup / URI manipulation if this URI already contains an IP
        if (@\inet_pton($host) !== \false) {
            return $connector->connect($original);
        }
        $promise = $this->resolver->resolve($host);
        $resolved = null;
        return new Promise\Promise(function ($resolve, $reject) use(&$promise, &$resolved, $uri, $connector, $host, $parts) {
            // resolve/reject with result of DNS lookup
            $promise->then(function ($ip) use(&$promise, &$resolved, $uri, $connector, $host, $parts) {
                $resolved = $ip;
                return $promise = $connector->connect(Connector::uri($parts, $host, $ip))->then(null, function (\Exception $e) use($uri) {
                    if ($e instanceof \RuntimeException) {
                        $message = \preg_replace('/^(Connection to [^ ]+)[&?]hostname=[^ &]+/', '$1', $e->getMessage());
                        $e = new \RuntimeException('Connection to ' . $uri . ' failed: ' . $message, $e->getCode(), $e);
                        // avoid garbage references by replacing all closures in call stack.
                        // what a lovely piece of code!
                        $r = new \ReflectionProperty('Exception', 'trace');
                        $r->setAccessible(\true);
                        $trace = $r->getValue($e);
                        // Exception trace arguments are not available on some PHP 7.4 installs
                        // @codeCoverageIgnoreStart
                        foreach ($trace as $ti => $one) {
                            if (isset($one['args'])) {
                                foreach ($one['args'] as $ai => $arg) {
                                    if ($arg instanceof \Closure) {
                                        $trace[$ti]['args'][$ai] = 'Object(' . \get_class($arg) . ')';
                                    }
                                }
                            }
                        }
                        // @codeCoverageIgnoreEnd
                        $r->setValue($e, $trace);
                    }
                    throw $e;
                });
            }, function ($e) use($uri, $reject) {
                $reject(new \RuntimeException('Connection to ' . $uri . ' failed during DNS lookup: ' . $e->getMessage(), 0, $e));
            })->then($resolve, $reject);
        }, function ($_, $reject) use(&$promise, &$resolved, $uri) {
            // cancellation should reject connection attempt
            // reject DNS resolution with custom reason, otherwise rely on connection cancellation below
            if ($resolved === null) {
                $reject(new \RuntimeException('Connection to ' . $uri . ' cancelled during DNS lookup (ECONNABORTED)', \defined('SOCKET_ECONNABORTED') ? \SOCKET_ECONNABORTED : 103));
            }
            // (try to) cancel pending DNS lookup / connection attempt
            if ($promise instanceof PromiseInterface && \method_exists($promise, 'cancel')) {
                // overwrite callback arguments for PHP7+ only, so they do not show
                // up in the Exception trace and do not cause a possible cyclic reference.
                $_ = $reject = null;
                $promise->cancel();
                $promise = null;
            }
        });
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Socket;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
use _PHPStan_dcc7b7cff\React\EventLoop\Loop;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use InvalidArgumentException;
use RuntimeException;
/**
 * The `TcpServer` class implements the `ServerInterface` and
 * is responsible for accepting plaintext TCP/IP connections.
 *
 * ```php
 * $server = new React\Socket\TcpServer(8080);
 * ```
 *
 * Whenever a client connects, it will emit a `connection` event with a connection
 * instance implementing `ConnectionInterface`:
 *
 * ```php
 * $server->on('connection', function (React\Socket\ConnectionInterface $connection) {
 *     echo 'Plaintext connection from ' . $connection->getRemoteAddress() . PHP_EOL;
 *     $connection->write('hello there!' . PHP_EOL);
 *     …
 * });
 * ```
 *
 * See also the `ServerInterface` for more details.
 *
 * @see ServerInterface
 * @see ConnectionInterface
 */
final class TcpServer extends EventEmitter implements ServerInterface
{
    private $master;
    private $loop;
    private $listening = \false;
    /**
     * Creates a plaintext TCP/IP socket server and starts listening on the given address
     *
     * This starts accepting new incoming connections on the given address.
     * See also the `connection event` documented in the `ServerInterface`
     * for more details.
     *
     * ```php
     * $server = new React\Socket\TcpServer(8080);
     * ```
     *
     * As above, the `$uri` parameter can consist of only a port, in which case the
     * server will default to listening on the localhost address `127.0.0.1`,
     * which means it will not be reachable from outside of this system.
     *
     * In order to use a random port assignment, you can use the port `0`:
     *
     * ```php
     * $server = new React\Socket\TcpServer(0);
     * $address = $server->getAddress();
     * ```
     *
     * In order to change the host the socket is listening on, you can provide an IP
     * address through the first parameter provided to the constructor, optionally
     * preceded by the `tcp://` scheme:
     *
     * ```php
     * $server = new React\Socket\TcpServer('192.168.0.1:8080');
     * ```
     *
     * If you want to listen on an IPv6 address, you MUST enclose the host in square
     * brackets:
     *
     * ```php
     * $server = new React\Socket\TcpServer('[::1]:8080');
     * ```
     *
     * If the given URI is invalid, does not contain a port, any other scheme or if it
     * contains a hostname, it will throw an `InvalidArgumentException`:
     *
     * ```php
     * // throws InvalidArgumentException due to missing port
     * $server = new React\Socket\TcpServer('127.0.0.1');
     * ```
     *
     * If the given URI appears to be valid, but listening on it fails (such as if port
     * is already in use or port below 1024 may require root access etc.), it will
     * throw a `RuntimeException`:
     *
     * ```php
     * $first = new React\Socket\TcpServer(8080);
     *
     * // throws RuntimeException because port is already in use
     * $second = new React\Socket\TcpServer(8080);
     * ```
     *
     * Note that these error conditions may vary depending on your system and/or
     * configuration.
     * See the exception message and code for more details about the actual error
     * condition.
     *
     * This class takes an optional `LoopInterface|null $loop` parameter that can be used to
     * pass the event loop instance to use for this object. You can use a `null` value
     * here in order to use the [default loop](https://github.com/reactphp/event-loop#loop).
     * This value SHOULD NOT be given unless you're sure you want to explicitly use a
     * given event loop instance.
     *
     * Optionally, you can specify [socket context options](https://www.php.net/manual/en/context.socket.php)
     * for the underlying stream socket resource like this:
     *
     * ```php
     * $server = new React\Socket\TcpServer('[::1]:8080', null, array(
     *     'backlog' => 200,
     *     'so_reuseport' => true,
     *     'ipv6_v6only' => true
     * ));
     * ```
     *
     * Note that available [socket context options](https://www.php.net/manual/en/context.socket.php),
     * their defaults and effects of changing these may vary depending on your system
     * and/or PHP version.
     * Passing unknown context options has no effect.
     * The `backlog` context option defaults to `511` unless given explicitly.
     *
     * @param string|int     $uri
     * @param ?LoopInterface $loop
     * @param array          $context
     * @throws InvalidArgumentException if the listening address is invalid
     * @throws RuntimeException if listening on this address fails (already in use etc.)
     */
    public function __construct($uri, LoopInterface $loop = null, array $context = array())
    {
        $this->loop = $loop ?: Loop::get();
        // a single port has been given => assume localhost
        if ((string) (int) $uri === (string) $uri) {
            $uri = '127.0.0.1:' . $uri;
        }
        // assume default scheme if none has been given
        if (\strpos($uri, '://') === \false) {
            $uri = 'tcp://' . $uri;
        }
        // parse_url() does not accept null ports (random port assignment) => manually remove
        if (\substr($uri, -2) === ':0') {
            $parts = \parse_url(\substr($uri, 0, -2));
            if ($parts) {
                $parts['port'] = 0;
            }
        } else {
            $parts = \parse_url($uri);
        }
        // ensure URI contains TCP scheme, host and port
        if (!$parts || !isset($parts['scheme'], $parts['host'], $parts['port']) || $parts['scheme'] !== 'tcp') {
            throw new \InvalidArgumentException('Invalid URI "' . $uri . '" given (EINVAL)', \defined('SOCKET_EINVAL') ? \SOCKET_EINVAL : 22);
        }
        if (@\inet_pton(\trim($parts['host'], '[]')) === \false) {
            throw new \InvalidArgumentException('Given URI "' . $uri . '" does not contain a valid host IP (EINVAL)', \defined('SOCKET_EINVAL') ? \SOCKET_EINVAL : 22);
        }
        $this->master = @\stream_socket_server($uri, $errno, $errstr, \STREAM_SERVER_BIND | \STREAM_SERVER_LISTEN, \stream_context_create(array('socket' => $context + array('backlog' => 511))));
        if (\false === $this->master) {
            if ($errno === 0) {
                // PHP does not seem to report errno, so match errno from errstr
                // @link https://3v4l.org/3qOBl
                $errno = SocketServer::errno($errstr);
            }
            throw new \RuntimeException('Failed to listen on "' . $uri . '": ' . $errstr . SocketServer::errconst($errno), $errno);
        }
        \stream_set_blocking($this->master, \false);
        $this->resume();
    }
    public function getAddress()
    {
        if (!\is_resource($this->master)) {
            return null;
        }
        $address = \stream_socket_get_name($this->master, \false);
        // check if this is an IPv6 address which includes multiple colons but no square brackets
        $pos = \strrpos($address, ':');
        if ($pos !== \false && \strpos($address, ':') < $pos && \substr($address, 0, 1) !== '[') {
            $address = '[' . \substr($address, 0, $pos) . ']:' . \substr($address, $pos + 1);
            // @codeCoverageIgnore
        }
        return 'tcp://' . $address;
    }
    public function pause()
    {
        if (!$this->listening) {
            return;
        }
        $this->loop->removeReadStream($this->master);
        $this->listening = \false;
    }
    public function resume()
    {
        if ($this->listening || !\is_resource($this->master)) {
            return;
        }
        $that = $this;
        $this->loop->addReadStream($this->master, function ($master) use($that) {
            try {
                $newSocket = SocketServer::accept($master);
            } catch (\RuntimeException $e) {
                $that->emit('error', array($e));
                return;
            }
            $that->handleConnection($newSocket);
        });
        $this->listening = \true;
    }
    public function close()
    {
        if (!\is_resource($this->master)) {
            return;
        }
        $this->pause();
        \fclose($this->master);
        $this->removeAllListeners();
    }
    /** @internal */
    public function handleConnection($socket)
    {
        $this->emit('connection', array(new Connection($socket, $this->loop)));
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Socket;

use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use _PHPStan_dcc7b7cff\React\Promise\Deferred;
use RuntimeException;
use UnexpectedValueException;
/**
 * This class is considered internal and its API should not be relied upon
 * outside of Socket.
 *
 * @internal
 */
class StreamEncryption
{
    private $loop;
    private $method;
    private $server;
    public function __construct(LoopInterface $loop, $server = \true)
    {
        $this->loop = $loop;
        $this->server = $server;
        // support TLSv1.0+ by default and exclude legacy SSLv2/SSLv3.
        // As of PHP 7.2+ the main crypto method constant includes all TLS versions.
        // As of PHP 5.6+ the crypto method is a bitmask, so we explicitly include all TLS versions.
        // For legacy PHP < 5.6 the crypto method is a single value only and this constant includes all TLS versions.
        // @link https://3v4l.org/9PSST
        if ($server) {
            $this->method = \STREAM_CRYPTO_METHOD_TLS_SERVER;
            if (\PHP_VERSION_ID < 70200 && \PHP_VERSION_ID >= 50600) {
                $this->method |= \STREAM_CRYPTO_METHOD_TLSv1_0_SERVER | \STREAM_CRYPTO_METHOD_TLSv1_1_SERVER | \STREAM_CRYPTO_METHOD_TLSv1_2_SERVER;
                // @codeCoverageIgnore
            }
        } else {
            $this->method = \STREAM_CRYPTO_METHOD_TLS_CLIENT;
            if (\PHP_VERSION_ID < 70200 && \PHP_VERSION_ID >= 50600) {
                $this->method |= \STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT | \STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT | \STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT;
                // @codeCoverageIgnore
            }
        }
    }
    public function enable(Connection $stream)
    {
        return $this->toggle($stream, \true);
    }
    public function toggle(Connection $stream, $toggle)
    {
        // pause actual stream instance to continue operation on raw stream socket
        $stream->pause();
        // TODO: add write() event to make sure we're not sending any excessive data
        // cancelling this leaves this stream in an inconsistent state…
        $deferred = new Deferred(function () {
            throw new \RuntimeException();
        });
        // get actual stream socket from stream instance
        $socket = $stream->stream;
        // get crypto method from context options or use global setting from constructor
        $method = $this->method;
        $context = \stream_context_get_options($socket);
        if (isset($context['ssl']['crypto_method'])) {
            $method = $context['ssl']['crypto_method'];
        }
        $that = $this;
        $toggleCrypto = function () use($socket, $deferred, $toggle, $method, $that) {
            $that->toggleCrypto($socket, $deferred, $toggle, $method);
        };
        $this->loop->addReadStream($socket, $toggleCrypto);
        if (!$this->server) {
            $toggleCrypto();
        }
        $loop = $this->loop;
        return $deferred->promise()->then(function () use($stream, $socket, $loop, $toggle) {
            $loop->removeReadStream($socket);
            $stream->encryptionEnabled = $toggle;
            $stream->resume();
            return $stream;
        }, function ($error) use($stream, $socket, $loop) {
            $loop->removeReadStream($socket);
            $stream->resume();
            throw $error;
        });
    }
    public function toggleCrypto($socket, Deferred $deferred, $toggle, $method)
    {
        $error = null;
        \set_error_handler(function ($_, $errstr) use(&$error) {
            $error = \str_replace(array("\r", "\n"), ' ', $errstr);
            // remove useless function name from error message
            if (($pos = \strpos($error, "): ")) !== \false) {
                $error = \substr($error, $pos + 3);
            }
        });
        $result = \stream_socket_enable_crypto($socket, $toggle, $method);
        \restore_error_handler();
        if (\true === $result) {
            $deferred->resolve(null);
        } else {
            if (\false === $result) {
                // overwrite callback arguments for PHP7+ only, so they do not show
                // up in the Exception trace and do not cause a possible cyclic reference.
                $d = $deferred;
                $deferred = null;
                if (\feof($socket) || $error === null) {
                    // EOF or failed without error => connection closed during handshake
                    $d->reject(new \UnexpectedValueException('Connection lost during TLS handshake (ECONNRESET)', \defined('SOCKET_ECONNRESET') ? \SOCKET_ECONNRESET : 104));
                } else {
                    // handshake failed with error message
                    $d->reject(new \UnexpectedValueException($error));
                }
            } else {
                // need more data, will retry
            }
        }
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Socket;

use _PHPStan_dcc7b7cff\React\EventLoop\Loop;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use _PHPStan_dcc7b7cff\React\Promise;
use InvalidArgumentException;
use RuntimeException;
/**
 * Unix domain socket connector
 *
 * Unix domain sockets use atomic operations, so we can as well emulate
 * async behavior.
 */
final class UnixConnector implements ConnectorInterface
{
    private $loop;
    public function __construct(LoopInterface $loop = null)
    {
        $this->loop = $loop ?: Loop::get();
    }
    public function connect($path)
    {
        if (\strpos($path, '://') === \false) {
            $path = 'unix://' . $path;
        } elseif (\substr($path, 0, 7) !== 'unix://') {
            return Promise\reject(new \InvalidArgumentException('Given URI "' . $path . '" is invalid (EINVAL)', \defined('SOCKET_EINVAL') ? \SOCKET_EINVAL : 22));
        }
        $resource = @\stream_socket_client($path, $errno, $errstr, 1.0);
        if (!$resource) {
            return Promise\reject(new \RuntimeException('Unable to connect to unix domain socket "' . $path . '": ' . $errstr . SocketServer::errconst($errno), $errno));
        }
        $connection = new Connection($resource, $this->loop);
        $connection->unix = \true;
        return Promise\resolve($connection);
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Socket;

use _PHPStan_dcc7b7cff\React\Dns\Config\Config as DnsConfig;
use _PHPStan_dcc7b7cff\React\Dns\Resolver\Factory as DnsFactory;
use _PHPStan_dcc7b7cff\React\Dns\Resolver\ResolverInterface;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
/**
 * The `Connector` class is the main class in this package that implements the
 * `ConnectorInterface` and allows you to create streaming connections.
 *
 * You can use this connector to create any kind of streaming connections, such
 * as plaintext TCP/IP, secure TLS or local Unix connection streams.
 *
 * Under the hood, the `Connector` is implemented as a *higher-level facade*
 * for the lower-level connectors implemented in this package. This means it
 * also shares all of their features and implementation details.
 * If you want to typehint in your higher-level protocol implementation, you SHOULD
 * use the generic [`ConnectorInterface`](#connectorinterface) instead.
 *
 * @see ConnectorInterface for the base interface
 */
final class Connector implements ConnectorInterface
{
    private $connectors = array();
    /**
     * Instantiate new `Connector`
     *
     * ```php
     * $connector = new React\Socket\Connector();
     * ```
     *
     * This class takes two optional arguments for more advanced usage:
     *
     * ```php
     * // constructor signature as of v1.9.0
     * $connector = new React\Socket\Connector(array $context = [], ?LoopInterface $loop = null);
     *
     * // legacy constructor signature before v1.9.0
     * $connector = new React\Socket\Connector(?LoopInterface $loop = null, array $context = []);
     * ```
     *
     * This class takes an optional `LoopInterface|null $loop` parameter that can be used to
     * pass the event loop instance to use for this object. You can use a `null` value
     * here in order to use the [default loop](https://github.com/reactphp/event-loop#loop).
     * This value SHOULD NOT be given unless you're sure you want to explicitly use a
     * given event loop instance.
     *
     * @param array|LoopInterface|null $context
     * @param null|LoopInterface|array $loop
     * @throws \InvalidArgumentException for invalid arguments
     */
    public function __construct($context = array(), $loop = null)
    {
        // swap arguments for legacy constructor signature
        if (($context instanceof LoopInterface || $context === null) && (\func_num_args() <= 1 || \is_array($loop))) {
            $swap = $loop === null ? array() : $loop;
            $loop = $context;
            $context = $swap;
        }
        if (!\is_array($context) || $loop !== null && !$loop instanceof LoopInterface) {
            throw new \InvalidArgumentException('Expected "array $context" and "?LoopInterface $loop" arguments');
        }
        // apply default options if not explicitly given
        $context += array('tcp' => \true, 'tls' => \true, 'unix' => \true, 'dns' => \true, 'timeout' => \true, 'happy_eyeballs' => \true);
        if ($context['timeout'] === \true) {
            $context['timeout'] = (float) \ini_get("default_socket_timeout");
        }
        if ($context['tcp'] instanceof ConnectorInterface) {
            $tcp = $context['tcp'];
        } else {
            $tcp = new TcpConnector($loop, \is_array($context['tcp']) ? $context['tcp'] : array());
        }
        if ($context['dns'] !== \false) {
            if ($context['dns'] instanceof ResolverInterface) {
                $resolver = $context['dns'];
            } else {
                if ($context['dns'] !== \true) {
                    $config = $context['dns'];
                } else {
                    // try to load nameservers from system config or default to Google's public DNS
                    $config = DnsConfig::loadSystemConfigBlocking();
                    if (!$config->nameservers) {
                        $config->nameservers[] = '8.8.8.8';
                        // @codeCoverageIgnore
                    }
                }
                $factory = new DnsFactory();
                $resolver = $factory->createCached($config, $loop);
            }
            if ($context['happy_eyeballs'] === \true) {
                $tcp = new HappyEyeBallsConnector($loop, $tcp, $resolver);
            } else {
                $tcp = new DnsConnector($tcp, $resolver);
            }
        }
        if ($context['tcp'] !== \false) {
            $context['tcp'] = $tcp;
            if ($context['timeout'] !== \false) {
                $context['tcp'] = new TimeoutConnector($context['tcp'], $context['timeout'], $loop);
            }
            $this->connectors['tcp'] = $context['tcp'];
        }
        if ($context['tls'] !== \false) {
            if (!$context['tls'] instanceof ConnectorInterface) {
                $context['tls'] = new SecureConnector($tcp, $loop, \is_array($context['tls']) ? $context['tls'] : array());
            }
            if ($context['timeout'] !== \false) {
                $context['tls'] = new TimeoutConnector($context['tls'], $context['timeout'], $loop);
            }
            $this->connectors['tls'] = $context['tls'];
        }
        if ($context['unix'] !== \false) {
            if (!$context['unix'] instanceof ConnectorInterface) {
                $context['unix'] = new UnixConnector($loop);
            }
            $this->connectors['unix'] = $context['unix'];
        }
    }
    public function connect($uri)
    {
        $scheme = 'tcp';
        if (\strpos($uri, '://') !== \false) {
            $scheme = (string) \substr($uri, 0, \strpos($uri, '://'));
        }
        if (!isset($this->connectors[$scheme])) {
            return \_PHPStan_dcc7b7cff\React\Promise\reject(new \RuntimeException('No connector available for URI scheme "' . $scheme . '" (EINVAL)', \defined('SOCKET_EINVAL') ? \SOCKET_EINVAL : 22));
        }
        return $this->connectors[$scheme]->connect($uri);
    }
    /**
     * [internal] Builds on URI from the given URI parts and ip address with original hostname as query
     *
     * @param array  $parts
     * @param string $host
     * @param string $ip
     * @return string
     * @internal
     */
    public static function uri(array $parts, $host, $ip)
    {
        $uri = '';
        // prepend original scheme if known
        if (isset($parts['scheme'])) {
            $uri .= $parts['scheme'] . '://';
        }
        if (\strpos($ip, ':') !== \false) {
            // enclose IPv6 addresses in square brackets before appending port
            $uri .= '[' . $ip . ']';
        } else {
            $uri .= $ip;
        }
        // append original port if known
        if (isset($parts['port'])) {
            $uri .= ':' . $parts['port'];
        }
        // append orignal path if known
        if (isset($parts['path'])) {
            $uri .= $parts['path'];
        }
        // append original query if known
        if (isset($parts['query'])) {
            $uri .= '?' . $parts['query'];
        }
        // append original hostname as query if resolved via DNS and if
        // destination URI does not contain "hostname" query param already
        $args = array();
        \parse_str(isset($parts['query']) ? $parts['query'] : '', $args);
        if ($host !== $ip && !isset($args['hostname'])) {
            $uri .= (isset($parts['query']) ? '&' : '?') . 'hostname=' . \rawurlencode($host);
        }
        // append original fragment if known
        if (isset($parts['fragment'])) {
            $uri .= '#' . $parts['fragment'];
        }
        return $uri;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Socket;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use _PHPStan_dcc7b7cff\React\Stream\DuplexResourceStream;
use _PHPStan_dcc7b7cff\React\Stream\Util;
use _PHPStan_dcc7b7cff\React\Stream\WritableResourceStream;
use _PHPStan_dcc7b7cff\React\Stream\WritableStreamInterface;
/**
 * The actual connection implementation for ConnectionInterface
 *
 * This class should only be used internally, see ConnectionInterface instead.
 *
 * @see ConnectionInterface
 * @internal
 */
class Connection extends EventEmitter implements ConnectionInterface
{
    /**
     * Internal flag whether this is a Unix domain socket (UDS) connection
     *
     * @internal
     */
    public $unix = \false;
    /**
     * Internal flag whether encryption has been enabled on this connection
     *
     * Mostly used by internal StreamEncryption so that connection returns
     * `tls://` scheme for encrypted connections instead of `tcp://`.
     *
     * @internal
     */
    public $encryptionEnabled = \false;
    /** @internal */
    public $stream;
    private $input;
    public function __construct($resource, LoopInterface $loop)
    {
        // PHP < 7.3.3 (and PHP < 7.2.15) suffers from a bug where feof() might
        // block with 100% CPU usage on fragmented TLS records.
        // We try to work around this by always consuming the complete receive
        // buffer at once to avoid stale data in TLS buffers. This is known to
        // work around high CPU usage for well-behaving peers, but this may
        // cause very large data chunks for high throughput scenarios. The buggy
        // behavior can still be triggered due to network I/O buffers or
        // malicious peers on affected versions, upgrading is highly recommended.
        // @link https://bugs.php.net/bug.php?id=77390
        $clearCompleteBuffer = \PHP_VERSION_ID < 70215 || \PHP_VERSION_ID >= 70300 && \PHP_VERSION_ID < 70303;
        // PHP < 7.1.4 (and PHP < 7.0.18) suffers from a bug when writing big
        // chunks of data over TLS streams at once.
        // We try to work around this by limiting the write chunk size to 8192
        // bytes for older PHP versions only.
        // This is only a work-around and has a noticable performance penalty on
        // affected versions. Please update your PHP version.
        // This applies to all streams because TLS may be enabled later on.
        // See https://github.com/reactphp/socket/issues/105
        $limitWriteChunks = \PHP_VERSION_ID < 70018 || \PHP_VERSION_ID >= 70100 && \PHP_VERSION_ID < 70104;
        $this->input = new DuplexResourceStream($resource, $loop, $clearCompleteBuffer ? -1 : null, new WritableResourceStream($resource, $loop, null, $limitWriteChunks ? 8192 : null));
        $this->stream = $resource;
        Util::forwardEvents($this->input, $this, array('data', 'end', 'error', 'close', 'pipe', 'drain'));
        $this->input->on('close', array($this, 'close'));
    }
    public function isReadable()
    {
        return $this->input->isReadable();
    }
    public function isWritable()
    {
        return $this->input->isWritable();
    }
    public function pause()
    {
        $this->input->pause();
    }
    public function resume()
    {
        $this->input->resume();
    }
    public function pipe(WritableStreamInterface $dest, array $options = array())
    {
        return $this->input->pipe($dest, $options);
    }
    public function write($data)
    {
        return $this->input->write($data);
    }
    public function end($data = null)
    {
        $this->input->end($data);
    }
    public function close()
    {
        $this->input->close();
        $this->handleClose();
        $this->removeAllListeners();
    }
    public function handleClose()
    {
        if (!\is_resource($this->stream)) {
            return;
        }
        // Try to cleanly shut down socket and ignore any errors in case other
        // side already closed. Underlying Stream implementation will take care
        // of closing stream resource, so we otherwise keep this open here.
        @\stream_socket_shutdown($this->stream, \STREAM_SHUT_RDWR);
    }
    public function getRemoteAddress()
    {
        if (!\is_resource($this->stream)) {
            return null;
        }
        return $this->parseAddress(\stream_socket_get_name($this->stream, \true));
    }
    public function getLocalAddress()
    {
        if (!\is_resource($this->stream)) {
            return null;
        }
        return $this->parseAddress(\stream_socket_get_name($this->stream, \false));
    }
    private function parseAddress($address)
    {
        if ($address === \false) {
            return null;
        }
        if ($this->unix) {
            // remove trailing colon from address for HHVM < 3.19: https://3v4l.org/5C1lo
            // note that technically ":" is a valid address, so keep this in place otherwise
            if (\substr($address, -1) === ':' && \defined('_PHPStan_dcc7b7cff\\HHVM_VERSION_ID') && \_PHPStan_dcc7b7cff\HHVM_VERSION_ID < 31900) {
                $address = (string) \substr($address, 0, -1);
                // @codeCoverageIgnore
            }
            // work around unknown addresses should return null value: https://3v4l.org/5C1lo and https://bugs.php.net/bug.php?id=74556
            // PHP uses "\0" string and HHVM uses empty string (colon removed above)
            if ($address === '' || $address[0] === "\x00") {
                return null;
                // @codeCoverageIgnore
            }
            return 'unix://' . $address;
        }
        // check if this is an IPv6 address which includes multiple colons but no square brackets
        $pos = \strrpos($address, ':');
        if ($pos !== \false && \strpos($address, ':') < $pos && \substr($address, 0, 1) !== '[') {
            $address = '[' . \substr($address, 0, $pos) . ']:' . \substr($address, $pos + 1);
            // @codeCoverageIgnore
        }
        return ($this->encryptionEnabled ? 'tls' : 'tcp') . '://' . $address;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Socket;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
use _PHPStan_dcc7b7cff\React\EventLoop\Loop;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use Exception;
/**
 * @deprecated 1.9.0 See `SocketServer` instead
 * @see SocketServer
 */
final class Server extends EventEmitter implements ServerInterface
{
    private $server;
    /**
     * [Deprecated] `Server`
     *
     * This class exists for BC reasons only and should not be used anymore.
     *
     * ```php
     * // deprecated
     * $socket = new React\Socket\Server(0);
     * $socket = new React\Socket\Server('127.0.0.1:8000');
     * $socket = new React\Socket\Server('127.0.0.1:8000', null, $context);
     * $socket = new React\Socket\Server('127.0.0.1:8000', $loop, $context);
     *
     * // new
     * $socket = new React\Socket\SocketServer('127.0.0.1:0');
     * $socket = new React\Socket\SocketServer('127.0.0.1:8000');
     * $socket = new React\Socket\SocketServer('127.0.0.1:8000', $context);
     * $socket = new React\Socket\SocketServer('127.0.0.1:8000', $context, $loop);
     * ```
     *
     * This class takes an optional `LoopInterface|null $loop` parameter that can be used to
     * pass the event loop instance to use for this object. You can use a `null` value
     * here in order to use the [default loop](https://github.com/reactphp/event-loop#loop).
     * This value SHOULD NOT be given unless you're sure you want to explicitly use a
     * given event loop instance.
     *
     * For BC reasons, you can also pass the TCP socket context options as a simple
     * array without wrapping this in another array under the `tcp` key.
     *
     * @param string|int    $uri
     * @param LoopInterface $loop
     * @param array         $context
     * @deprecated 1.9.0 See `SocketServer` instead
     * @see SocketServer
     */
    public function __construct($uri, LoopInterface $loop = null, array $context = array())
    {
        $loop = $loop ?: Loop::get();
        // sanitize TCP context options if not properly wrapped
        if ($context && (!isset($context['tcp']) && !isset($context['tls']) && !isset($context['unix']))) {
            $context = array('tcp' => $context);
        }
        // apply default options if not explicitly given
        $context += array('tcp' => array(), 'tls' => array(), 'unix' => array());
        $scheme = 'tcp';
        $pos = \strpos($uri, '://');
        if ($pos !== \false) {
            $scheme = \substr($uri, 0, $pos);
        }
        if ($scheme === 'unix') {
            $server = new UnixServer($uri, $loop, $context['unix']);
        } else {
            $server = new TcpServer(\str_replace('tls://', '', $uri), $loop, $context['tcp']);
            if ($scheme === 'tls') {
                $server = new SecureServer($server, $loop, $context['tls']);
            }
        }
        $this->server = $server;
        $that = $this;
        $server->on('connection', function (ConnectionInterface $conn) use($that) {
            $that->emit('connection', array($conn));
        });
        $server->on('error', function (Exception $error) use($that) {
            $that->emit('error', array($error));
        });
    }
    public function getAddress()
    {
        return $this->server->getAddress();
    }
    public function pause()
    {
        $this->server->pause();
    }
    public function resume()
    {
        $this->server->resume();
    }
    public function close()
    {
        $this->server->close();
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Socket;

use _PHPStan_dcc7b7cff\React\EventLoop\Loop;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use _PHPStan_dcc7b7cff\React\Promise;
use InvalidArgumentException;
use RuntimeException;
final class TcpConnector implements ConnectorInterface
{
    private $loop;
    private $context;
    public function __construct(LoopInterface $loop = null, array $context = array())
    {
        $this->loop = $loop ?: Loop::get();
        $this->context = $context;
    }
    public function connect($uri)
    {
        if (\strpos($uri, '://') === \false) {
            $uri = 'tcp://' . $uri;
        }
        $parts = \parse_url($uri);
        if (!$parts || !isset($parts['scheme'], $parts['host'], $parts['port']) || $parts['scheme'] !== 'tcp') {
            return Promise\reject(new \InvalidArgumentException('Given URI "' . $uri . '" is invalid (EINVAL)', \defined('SOCKET_EINVAL') ? \SOCKET_EINVAL : 22));
        }
        $ip = \trim($parts['host'], '[]');
        if (@\inet_pton($ip) === \false) {
            return Promise\reject(new \InvalidArgumentException('Given URI "' . $uri . '" does not contain a valid host IP (EINVAL)', \defined('SOCKET_EINVAL') ? \SOCKET_EINVAL : 22));
        }
        // use context given in constructor
        $context = array('socket' => $this->context);
        // parse arguments from query component of URI
        $args = array();
        if (isset($parts['query'])) {
            \parse_str($parts['query'], $args);
        }
        // If an original hostname has been given, use this for TLS setup.
        // This can happen due to layers of nested connectors, such as a
        // DnsConnector reporting its original hostname.
        // These context options are here in case TLS is enabled later on this stream.
        // If TLS is not enabled later, this doesn't hurt either.
        if (isset($args['hostname'])) {
            $context['ssl'] = array('SNI_enabled' => \true, 'peer_name' => $args['hostname']);
            // Legacy PHP < 5.6 ignores peer_name and requires legacy context options instead.
            // The SNI_server_name context option has to be set here during construction,
            // as legacy PHP ignores any values set later.
            // @codeCoverageIgnoreStart
            if (\PHP_VERSION_ID < 50600) {
                $context['ssl'] += array('SNI_server_name' => $args['hostname'], 'CN_match' => $args['hostname']);
            }
            // @codeCoverageIgnoreEnd
        }
        // latest versions of PHP no longer accept any other URI components and
        // HHVM fails to parse URIs with a query but no path, so let's simplify our URI here
        $remote = 'tcp://' . $parts['host'] . ':' . $parts['port'];
        $stream = @\stream_socket_client($remote, $errno, $errstr, 0, \STREAM_CLIENT_CONNECT | \STREAM_CLIENT_ASYNC_CONNECT, \stream_context_create($context));
        if (\false === $stream) {
            return Promise\reject(new \RuntimeException('Connection to ' . $uri . ' failed: ' . $errstr . SocketServer::errconst($errno), $errno));
        }
        // wait for connection
        $loop = $this->loop;
        return new Promise\Promise(function ($resolve, $reject) use($loop, $stream, $uri) {
            $loop->addWriteStream($stream, function ($stream) use($loop, $resolve, $reject, $uri) {
                $loop->removeWriteStream($stream);
                // The following hack looks like the only way to
                // detect connection refused errors with PHP's stream sockets.
                if (\false === \stream_socket_get_name($stream, \true)) {
                    // If we reach this point, we know the connection is dead, but we don't know the underlying error condition.
                    // @codeCoverageIgnoreStart
                    if (\function_exists('socket_import_stream')) {
                        // actual socket errno and errstr can be retrieved with ext-sockets on PHP 5.4+
                        $socket = \socket_import_stream($stream);
                        $errno = \socket_get_option($socket, \SOL_SOCKET, \SO_ERROR);
                        $errstr = \socket_strerror($errno);
                    } elseif (\PHP_OS === 'Linux') {
                        // Linux reports socket errno and errstr again when trying to write to the dead socket.
                        // Suppress error reporting to get error message below and close dead socket before rejecting.
                        // This is only known to work on Linux, Mac and Windows are known to not support this.
                        $errno = 0;
                        $errstr = '';
                        \set_error_handler(function ($_, $error) use(&$errno, &$errstr) {
                            // Match errstr from PHP's warning message.
                            // fwrite(): send of 1 bytes failed with errno=111 Connection refused
                            \preg_match('/errno=(\\d+) (.+)/', $error, $m);
                            $errno = isset($m[1]) ? (int) $m[1] : 0;
                            $errstr = isset($m[2]) ? $m[2] : $error;
                        });
                        \fwrite($stream, \PHP_EOL);
                        \restore_error_handler();
                    } else {
                        // Not on Linux and ext-sockets not available? Too bad.
                        $errno = \defined('SOCKET_ECONNREFUSED') ? \SOCKET_ECONNREFUSED : 111;
                        $errstr = 'Connection refused?';
                    }
                    // @codeCoverageIgnoreEnd
                    \fclose($stream);
                    $reject(new \RuntimeException('Connection to ' . $uri . ' failed: ' . $errstr . SocketServer::errconst($errno), $errno));
                } else {
                    $resolve(new Connection($stream, $loop));
                }
            });
        }, function () use($loop, $stream, $uri) {
            $loop->removeWriteStream($stream);
            \fclose($stream);
            // @codeCoverageIgnoreStart
            // legacy PHP 5.3 sometimes requires a second close call (see tests)
            if (\PHP_VERSION_ID < 50400 && \is_resource($stream)) {
                \fclose($stream);
            }
            // @codeCoverageIgnoreEnd
            throw new \RuntimeException('Connection to ' . $uri . ' cancelled during TCP/IP handshake (ECONNABORTED)', \defined('SOCKET_ECONNABORTED') ? \SOCKET_ECONNABORTED : 103);
        });
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Socket;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
use _PHPStan_dcc7b7cff\React\EventLoop\Loop;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use BadMethodCallException;
use UnexpectedValueException;
/**
 * The `SecureServer` class implements the `ServerInterface` and is responsible
 * for providing a secure TLS (formerly known as SSL) server.
 *
 * It does so by wrapping a `TcpServer` instance which waits for plaintext
 * TCP/IP connections and then performs a TLS handshake for each connection.
 *
 * ```php
 * $server = new React\Socket\TcpServer(8000);
 * $server = new React\Socket\SecureServer($server, null, array(
 *     // tls context options here…
 * ));
 * ```
 *
 * Whenever a client completes the TLS handshake, it will emit a `connection` event
 * with a connection instance implementing [`ConnectionInterface`](#connectioninterface):
 *
 * ```php
 * $server->on('connection', function (React\Socket\ConnectionInterface $connection) {
 *     echo 'Secure connection from' . $connection->getRemoteAddress() . PHP_EOL;
 *
 *     $connection->write('hello there!' . PHP_EOL);
 *     …
 * });
 * ```
 *
 * Whenever a client fails to perform a successful TLS handshake, it will emit an
 * `error` event and then close the underlying TCP/IP connection:
 *
 * ```php
 * $server->on('error', function (Exception $e) {
 *     echo 'Error' . $e->getMessage() . PHP_EOL;
 * });
 * ```
 *
 * See also the `ServerInterface` for more details.
 *
 * Note that the `SecureServer` class is a concrete implementation for TLS sockets.
 * If you want to typehint in your higher-level protocol implementation, you SHOULD
 * use the generic `ServerInterface` instead.
 *
 * @see ServerInterface
 * @see ConnectionInterface
 */
final class SecureServer extends EventEmitter implements ServerInterface
{
    private $tcp;
    private $encryption;
    private $context;
    /**
     * Creates a secure TLS server and starts waiting for incoming connections
     *
     * It does so by wrapping a `TcpServer` instance which waits for plaintext
     * TCP/IP connections and then performs a TLS handshake for each connection.
     * It thus requires valid [TLS context options],
     * which in its most basic form may look something like this if you're using a
     * PEM encoded certificate file:
     *
     * ```php
     * $server = new React\Socket\TcpServer(8000);
     * $server = new React\Socket\SecureServer($server, null, array(
     *     'local_cert' => 'server.pem'
     * ));
     * ```
     *
     * Note that the certificate file will not be loaded on instantiation but when an
     * incoming connection initializes its TLS context.
     * This implies that any invalid certificate file paths or contents will only cause
     * an `error` event at a later time.
     *
     * If your private key is encrypted with a passphrase, you have to specify it
     * like this:
     *
     * ```php
     * $server = new React\Socket\TcpServer(8000);
     * $server = new React\Socket\SecureServer($server, null, array(
     *     'local_cert' => 'server.pem',
     *     'passphrase' => 'secret'
     * ));
     * ```
     *
     * Note that available [TLS context options],
     * their defaults and effects of changing these may vary depending on your system
     * and/or PHP version.
     * Passing unknown context options has no effect.
     *
     * This class takes an optional `LoopInterface|null $loop` parameter that can be used to
     * pass the event loop instance to use for this object. You can use a `null` value
     * here in order to use the [default loop](https://github.com/reactphp/event-loop#loop).
     * This value SHOULD NOT be given unless you're sure you want to explicitly use a
     * given event loop instance.
     *
     * Advanced usage: Despite allowing any `ServerInterface` as first parameter,
     * you SHOULD pass a `TcpServer` instance as first parameter, unless you
     * know what you're doing.
     * Internally, the `SecureServer` has to set the required TLS context options on
     * the underlying stream resources.
     * These resources are not exposed through any of the interfaces defined in this
     * package, but only through the internal `Connection` class.
     * The `TcpServer` class is guaranteed to emit connections that implement
     * the `ConnectionInterface` and uses the internal `Connection` class in order to
     * expose these underlying resources.
     * If you use a custom `ServerInterface` and its `connection` event does not
     * meet this requirement, the `SecureServer` will emit an `error` event and
     * then close the underlying connection.
     *
     * @param ServerInterface|TcpServer $tcp
     * @param ?LoopInterface $loop
     * @param array $context
     * @throws BadMethodCallException for legacy HHVM < 3.8 due to lack of support
     * @see TcpServer
     * @link https://www.php.net/manual/en/context.ssl.php for TLS context options
     */
    public function __construct(ServerInterface $tcp, LoopInterface $loop = null, array $context = array())
    {
        if (!\function_exists('stream_socket_enable_crypto')) {
            throw new \BadMethodCallException('Encryption not supported on your platform (HHVM < 3.8?)');
            // @codeCoverageIgnore
        }
        // default to empty passphrase to suppress blocking passphrase prompt
        $context += array('passphrase' => '');
        $this->tcp = $tcp;
        $this->encryption = new StreamEncryption($loop ?: Loop::get());
        $this->context = $context;
        $that = $this;
        $this->tcp->on('connection', function ($connection) use($that) {
            $that->handleConnection($connection);
        });
        $this->tcp->on('error', function ($error) use($that) {
            $that->emit('error', array($error));
        });
    }
    public function getAddress()
    {
        $address = $this->tcp->getAddress();
        if ($address === null) {
            return null;
        }
        return \str_replace('tcp://', 'tls://', $address);
    }
    public function pause()
    {
        $this->tcp->pause();
    }
    public function resume()
    {
        $this->tcp->resume();
    }
    public function close()
    {
        return $this->tcp->close();
    }
    /** @internal */
    public function handleConnection(ConnectionInterface $connection)
    {
        if (!$connection instanceof Connection) {
            $this->emit('error', array(new \UnexpectedValueException('Base server does not use internal Connection class exposing stream resource')));
            $connection->close();
            return;
        }
        foreach ($this->context as $name => $value) {
            \stream_context_set_option($connection->stream, 'ssl', $name, $value);
        }
        // get remote address before starting TLS handshake in case connection closes during handshake
        $remote = $connection->getRemoteAddress();
        $that = $this;
        $this->encryption->enable($connection)->then(function ($conn) use($that) {
            $that->emit('connection', array($conn));
        }, function ($error) use($that, $connection, $remote) {
            $error = new \RuntimeException('Connection from ' . $remote . ' failed during TLS handshake: ' . $error->getMessage(), $error->getCode());
            $that->emit('error', array($error));
            $connection->close();
        });
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Socket;

use _PHPStan_dcc7b7cff\React\Dns\Resolver\ResolverInterface;
use _PHPStan_dcc7b7cff\React\EventLoop\Loop;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use _PHPStan_dcc7b7cff\React\Promise;
final class HappyEyeBallsConnector implements ConnectorInterface
{
    private $loop;
    private $connector;
    private $resolver;
    public function __construct(LoopInterface $loop = null, ConnectorInterface $connector = null, ResolverInterface $resolver = null)
    {
        // $connector and $resolver arguments are actually required, marked
        // optional for technical reasons only. Nullable $loop without default
        // requires PHP 7.1, null default is also supported in legacy PHP
        // versions, but required parameters are not allowed after arguments
        // with null default. Mark all parameters optional and check accordingly.
        if ($connector === null || $resolver === null) {
            throw new \InvalidArgumentException('Missing required $connector or $resolver argument');
        }
        $this->loop = $loop ?: Loop::get();
        $this->connector = $connector;
        $this->resolver = $resolver;
    }
    public function connect($uri)
    {
        $original = $uri;
        if (\strpos($uri, '://') === \false) {
            $uri = 'tcp://' . $uri;
            $parts = \parse_url($uri);
            if (isset($parts['scheme'])) {
                unset($parts['scheme']);
            }
        } else {
            $parts = \parse_url($uri);
        }
        if (!$parts || !isset($parts['host'])) {
            return Promise\reject(new \InvalidArgumentException('Given URI "' . $original . '" is invalid (EINVAL)', \defined('SOCKET_EINVAL') ? \SOCKET_EINVAL : 22));
        }
        $host = \trim($parts['host'], '[]');
        // skip DNS lookup / URI manipulation if this URI already contains an IP
        if (@\inet_pton($host) !== \false) {
            return $this->connector->connect($original);
        }
        $builder = new HappyEyeBallsConnectionBuilder($this->loop, $this->connector, $this->resolver, $uri, $host, $parts);
        return $builder->connect();
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Socket;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
use Exception;
use OverflowException;
/**
 * The `LimitingServer` decorator wraps a given `ServerInterface` and is responsible
 * for limiting and keeping track of open connections to this server instance.
 *
 * Whenever the underlying server emits a `connection` event, it will check its
 * limits and then either
 * - keep track of this connection by adding it to the list of
 *   open connections and then forward the `connection` event
 * - or reject (close) the connection when its limits are exceeded and will
 *   forward an `error` event instead.
 *
 * Whenever a connection closes, it will remove this connection from the list of
 * open connections.
 *
 * ```php
 * $server = new React\Socket\LimitingServer($server, 100);
 * $server->on('connection', function (React\Socket\ConnectionInterface $connection) {
 *     $connection->write('hello there!' . PHP_EOL);
 *     …
 * });
 * ```
 *
 * See also the `ServerInterface` for more details.
 *
 * @see ServerInterface
 * @see ConnectionInterface
 */
class LimitingServer extends EventEmitter implements ServerInterface
{
    private $connections = array();
    private $server;
    private $limit;
    private $pauseOnLimit = \false;
    private $autoPaused = \false;
    private $manuPaused = \false;
    /**
     * Instantiates a new LimitingServer.
     *
     * You have to pass a maximum number of open connections to ensure
     * the server will automatically reject (close) connections once this limit
     * is exceeded. In this case, it will emit an `error` event to inform about
     * this and no `connection` event will be emitted.
     *
     * ```php
     * $server = new React\Socket\LimitingServer($server, 100);
     * $server->on('connection', function (React\Socket\ConnectionInterface $connection) {
     *     $connection->write('hello there!' . PHP_EOL);
     *     …
     * });
     * ```
     *
     * You MAY pass a `null` limit in order to put no limit on the number of
     * open connections and keep accepting new connection until you run out of
     * operating system resources (such as open file handles). This may be
     * useful if you do not want to take care of applying a limit but still want
     * to use the `getConnections()` method.
     *
     * You can optionally configure the server to pause accepting new
     * connections once the connection limit is reached. In this case, it will
     * pause the underlying server and no longer process any new connections at
     * all, thus also no longer closing any excessive connections.
     * The underlying operating system is responsible for keeping a backlog of
     * pending connections until its limit is reached, at which point it will
     * start rejecting further connections.
     * Once the server is below the connection limit, it will continue consuming
     * connections from the backlog and will process any outstanding data on
     * each connection.
     * This mode may be useful for some protocols that are designed to wait for
     * a response message (such as HTTP), but may be less useful for other
     * protocols that demand immediate responses (such as a "welcome" message in
     * an interactive chat).
     *
     * ```php
     * $server = new React\Socket\LimitingServer($server, 100, true);
     * $server->on('connection', function (React\Socket\ConnectionInterface $connection) {
     *     $connection->write('hello there!' . PHP_EOL);
     *     …
     * });
     * ```
     *
     * @param ServerInterface $server
     * @param int|null        $connectionLimit
     * @param bool            $pauseOnLimit
     */
    public function __construct(ServerInterface $server, $connectionLimit, $pauseOnLimit = \false)
    {
        $this->server = $server;
        $this->limit = $connectionLimit;
        if ($connectionLimit !== null) {
            $this->pauseOnLimit = $pauseOnLimit;
        }
        $this->server->on('connection', array($this, 'handleConnection'));
        $this->server->on('error', array($this, 'handleError'));
    }
    /**
     * Returns an array with all currently active connections
     *
     * ```php
     * foreach ($server->getConnection() as $connection) {
     *     $connection->write('Hi!');
     * }
     * ```
     *
     * @return ConnectionInterface[]
     */
    public function getConnections()
    {
        return $this->connections;
    }
    public function getAddress()
    {
        return $this->server->getAddress();
    }
    public function pause()
    {
        if (!$this->manuPaused) {
            $this->manuPaused = \true;
            if (!$this->autoPaused) {
                $this->server->pause();
            }
        }
    }
    public function resume()
    {
        if ($this->manuPaused) {
            $this->manuPaused = \false;
            if (!$this->autoPaused) {
                $this->server->resume();
            }
        }
    }
    public function close()
    {
        $this->server->close();
    }
    /** @internal */
    public function handleConnection(ConnectionInterface $connection)
    {
        // close connection if limit exceeded
        if ($this->limit !== null && \count($this->connections) >= $this->limit) {
            $this->handleError(new \OverflowException('Connection closed because server reached connection limit'));
            $connection->close();
            return;
        }
        $this->connections[] = $connection;
        $that = $this;
        $connection->on('close', function () use($that, $connection) {
            $that->handleDisconnection($connection);
        });
        // pause accepting new connections if limit exceeded
        if ($this->pauseOnLimit && !$this->autoPaused && \count($this->connections) >= $this->limit) {
            $this->autoPaused = \true;
            if (!$this->manuPaused) {
                $this->server->pause();
            }
        }
        $this->emit('connection', array($connection));
    }
    /** @internal */
    public function handleDisconnection(ConnectionInterface $connection)
    {
        unset($this->connections[\array_search($connection, $this->connections)]);
        // continue accepting new connection if below limit
        if ($this->autoPaused && \count($this->connections) < $this->limit) {
            $this->autoPaused = \false;
            if (!$this->manuPaused) {
                $this->server->resume();
            }
        }
    }
    /** @internal */
    public function handleError(\Exception $error)
    {
        $this->emit('error', array($error));
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Socket;

use _PHPStan_dcc7b7cff\React\Dns\Model\Message;
use _PHPStan_dcc7b7cff\React\Dns\Resolver\ResolverInterface;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use _PHPStan_dcc7b7cff\React\EventLoop\TimerInterface;
use _PHPStan_dcc7b7cff\React\Promise;
use _PHPStan_dcc7b7cff\React\Promise\PromiseInterface;
/**
 * @internal
 */
final class HappyEyeBallsConnectionBuilder
{
    /**
     * As long as we haven't connected yet keep popping an IP address of the connect queue until one of them
     * succeeds or they all fail. We will wait 100ms between connection attempts as per RFC.
     *
     * @link https://tools.ietf.org/html/rfc8305#section-5
     */
    const CONNECTION_ATTEMPT_DELAY = 0.1;
    /**
     * Delay `A` lookup by 50ms sending out connection to IPv4 addresses when IPv6 records haven't
     * resolved yet as per RFC.
     *
     * @link https://tools.ietf.org/html/rfc8305#section-3
     */
    const RESOLUTION_DELAY = 0.05;
    public $loop;
    public $connector;
    public $resolver;
    public $uri;
    public $host;
    public $resolved = array(Message::TYPE_A => \false, Message::TYPE_AAAA => \false);
    public $resolverPromises = array();
    public $connectionPromises = array();
    public $connectQueue = array();
    public $nextAttemptTimer;
    public $parts;
    public $ipsCount = 0;
    public $failureCount = 0;
    public $resolve;
    public $reject;
    public $lastErrorFamily;
    public $lastError6;
    public $lastError4;
    public function __construct(LoopInterface $loop, ConnectorInterface $connector, ResolverInterface $resolver, $uri, $host, $parts)
    {
        $this->loop = $loop;
        $this->connector = $connector;
        $this->resolver = $resolver;
        $this->uri = $uri;
        $this->host = $host;
        $this->parts = $parts;
    }
    public function connect()
    {
        $timer = null;
        $that = $this;
        return new Promise\Promise(function ($resolve, $reject) use($that, &$timer) {
            $lookupResolve = function ($type) use($that, $resolve, $reject) {
                return function (array $ips) use($that, $type, $resolve, $reject) {
                    unset($that->resolverPromises[$type]);
                    $that->resolved[$type] = \true;
                    $that->mixIpsIntoConnectQueue($ips);
                    // start next connection attempt if not already awaiting next
                    if ($that->nextAttemptTimer === null && $that->connectQueue) {
                        $that->check($resolve, $reject);
                    }
                };
            };
            $that->resolverPromises[Message::TYPE_AAAA] = $that->resolve(Message::TYPE_AAAA, $reject)->then($lookupResolve(Message::TYPE_AAAA));
            $that->resolverPromises[Message::TYPE_A] = $that->resolve(Message::TYPE_A, $reject)->then(function (array $ips) use($that, &$timer) {
                // happy path: IPv6 has resolved already (or could not resolve), continue with IPv4 addresses
                if ($that->resolved[Message::TYPE_AAAA] === \true || !$ips) {
                    return $ips;
                }
                // Otherwise delay processing IPv4 lookup until short timer passes or IPv6 resolves in the meantime
                $deferred = new Promise\Deferred();
                $timer = $that->loop->addTimer($that::RESOLUTION_DELAY, function () use($deferred, $ips) {
                    $deferred->resolve($ips);
                });
                $that->resolverPromises[Message::TYPE_AAAA]->then(function () use($that, $timer, $deferred, $ips) {
                    $that->loop->cancelTimer($timer);
                    $deferred->resolve($ips);
                });
                return $deferred->promise();
            })->then($lookupResolve(Message::TYPE_A));
        }, function ($_, $reject) use($that, &$timer) {
            $reject(new \RuntimeException('Connection to ' . $that->uri . ' cancelled' . (!$that->connectionPromises ? ' during DNS lookup' : '') . ' (ECONNABORTED)', \defined('SOCKET_ECONNABORTED') ? \SOCKET_ECONNABORTED : 103));
            $_ = $reject = null;
            $that->cleanUp();
            if ($timer instanceof TimerInterface) {
                $that->loop->cancelTimer($timer);
            }
        });
    }
    /**
     * @internal
     * @param int      $type   DNS query type
     * @param callable $reject
     * @return \React\Promise\PromiseInterface<string[]> Returns a promise that
     *     always resolves with a list of IP addresses on success or an empty
     *     list on error.
     */
    public function resolve($type, $reject)
    {
        $that = $this;
        return $that->resolver->resolveAll($that->host, $type)->then(null, function (\Exception $e) use($type, $reject, $that) {
            unset($that->resolverPromises[$type]);
            $that->resolved[$type] = \true;
            if ($type === Message::TYPE_A) {
                $that->lastError4 = $e->getMessage();
                $that->lastErrorFamily = 4;
            } else {
                $that->lastError6 = $e->getMessage();
                $that->lastErrorFamily = 6;
            }
            // cancel next attempt timer when there are no more IPs to connect to anymore
            if ($that->nextAttemptTimer !== null && !$that->connectQueue) {
                $that->loop->cancelTimer($that->nextAttemptTimer);
                $that->nextAttemptTimer = null;
            }
            if ($that->hasBeenResolved() && $that->ipsCount === 0) {
                $reject(new \RuntimeException($that->error(), 0, $e));
            }
            // Exception already handled above, so don't throw an unhandled rejection here
            return array();
        });
    }
    /**
     * @internal
     */
    public function check($resolve, $reject)
    {
        $ip = \array_shift($this->connectQueue);
        // start connection attempt and remember array position to later unset again
        $this->connectionPromises[] = $this->attemptConnection($ip);
        \end($this->connectionPromises);
        $index = \key($this->connectionPromises);
        $that = $this;
        $that->connectionPromises[$index]->then(function ($connection) use($that, $index, $resolve) {
            unset($that->connectionPromises[$index]);
            $that->cleanUp();
            $resolve($connection);
        }, function (\Exception $e) use($that, $index, $ip, $resolve, $reject) {
            unset($that->connectionPromises[$index]);
            $that->failureCount++;
            $message = \preg_replace('/^(Connection to [^ ]+)[&?]hostname=[^ &]+/', '$1', $e->getMessage());
            if (\strpos($ip, ':') === \false) {
                $that->lastError4 = $message;
                $that->lastErrorFamily = 4;
            } else {
                $that->lastError6 = $message;
                $that->lastErrorFamily = 6;
            }
            // start next connection attempt immediately on error
            if ($that->connectQueue) {
                if ($that->nextAttemptTimer !== null) {
                    $that->loop->cancelTimer($that->nextAttemptTimer);
                    $that->nextAttemptTimer = null;
                }
                $that->check($resolve, $reject);
            }
            if ($that->hasBeenResolved() === \false) {
                return;
            }
            if ($that->ipsCount === $that->failureCount) {
                $that->cleanUp();
                $reject(new \RuntimeException($that->error(), $e->getCode(), $e));
            }
        });
        // Allow next connection attempt in 100ms: https://tools.ietf.org/html/rfc8305#section-5
        // Only start timer when more IPs are queued or when DNS query is still pending (might add more IPs)
        if ($this->nextAttemptTimer === null && (\count($this->connectQueue) > 0 || $this->resolved[Message::TYPE_A] === \false || $this->resolved[Message::TYPE_AAAA] === \false)) {
            $this->nextAttemptTimer = $this->loop->addTimer(self::CONNECTION_ATTEMPT_DELAY, function () use($that, $resolve, $reject) {
                $that->nextAttemptTimer = null;
                if ($that->connectQueue) {
                    $that->check($resolve, $reject);
                }
            });
        }
    }
    /**
     * @internal
     */
    public function attemptConnection($ip)
    {
        $uri = Connector::uri($this->parts, $this->host, $ip);
        return $this->connector->connect($uri);
    }
    /**
     * @internal
     */
    public function cleanUp()
    {
        // clear list of outstanding IPs to avoid creating new connections
        $this->connectQueue = array();
        foreach ($this->connectionPromises as $connectionPromise) {
            if ($connectionPromise instanceof PromiseInterface && \method_exists($connectionPromise, 'cancel')) {
                $connectionPromise->cancel();
            }
        }
        foreach ($this->resolverPromises as $resolverPromise) {
            if ($resolverPromise instanceof PromiseInterface && \method_exists($resolverPromise, 'cancel')) {
                $resolverPromise->cancel();
            }
        }
        if ($this->nextAttemptTimer instanceof TimerInterface) {
            $this->loop->cancelTimer($this->nextAttemptTimer);
            $this->nextAttemptTimer = null;
        }
    }
    /**
     * @internal
     */
    public function hasBeenResolved()
    {
        foreach ($this->resolved as $typeHasBeenResolved) {
            if ($typeHasBeenResolved === \false) {
                return \false;
            }
        }
        return \true;
    }
    /**
     * Mixes an array of IP addresses into the connect queue in such a way they alternate when attempting to connect.
     * The goal behind it is first attempt to connect to IPv6, then to IPv4, then to IPv6 again until one of those
     * attempts succeeds.
     *
     * @link https://tools.ietf.org/html/rfc8305#section-4
     *
     * @internal
     */
    public function mixIpsIntoConnectQueue(array $ips)
    {
        \shuffle($ips);
        $this->ipsCount += \count($ips);
        $connectQueueStash = $this->connectQueue;
        $this->connectQueue = array();
        while (\count($connectQueueStash) > 0 || \count($ips) > 0) {
            if (\count($ips) > 0) {
                $this->connectQueue[] = \array_shift($ips);
            }
            if (\count($connectQueueStash) > 0) {
                $this->connectQueue[] = \array_shift($connectQueueStash);
            }
        }
    }
    /**
     * @internal
     * @return string
     */
    public function error()
    {
        if ($this->lastError4 === $this->lastError6) {
            $message = $this->lastError6;
        } elseif ($this->lastErrorFamily === 6) {
            $message = 'Last error for IPv6: ' . $this->lastError6 . '. Previous error for IPv4: ' . $this->lastError4;
        } else {
            $message = 'Last error for IPv4: ' . $this->lastError4 . '. Previous error for IPv6: ' . $this->lastError6;
        }
        if ($this->hasBeenResolved() && $this->ipsCount === 0) {
            if ($this->lastError6 === $this->lastError4) {
                $message = ' during DNS lookup: ' . $this->lastError6;
            } else {
                $message = ' during DNS lookup. ' . $message;
            }
        } else {
            $message = ': ' . $message;
        }
        return 'Connection to ' . $this->uri . ' failed' . $message;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Socket;

use _PHPStan_dcc7b7cff\React\EventLoop\Loop;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use _PHPStan_dcc7b7cff\React\Promise;
use BadMethodCallException;
use InvalidArgumentException;
use UnexpectedValueException;
final class SecureConnector implements ConnectorInterface
{
    private $connector;
    private $streamEncryption;
    private $context;
    public function __construct(ConnectorInterface $connector, LoopInterface $loop = null, array $context = array())
    {
        $this->connector = $connector;
        $this->streamEncryption = new StreamEncryption($loop ?: Loop::get(), \false);
        $this->context = $context;
    }
    public function connect($uri)
    {
        if (!\function_exists('stream_socket_enable_crypto')) {
            return Promise\reject(new \BadMethodCallException('Encryption not supported on your platform (HHVM < 3.8?)'));
            // @codeCoverageIgnore
        }
        if (\strpos($uri, '://') === \false) {
            $uri = 'tls://' . $uri;
        }
        $parts = \parse_url($uri);
        if (!$parts || !isset($parts['scheme']) || $parts['scheme'] !== 'tls') {
            return Promise\reject(new \InvalidArgumentException('Given URI "' . $uri . '" is invalid (EINVAL)', \defined('SOCKET_EINVAL') ? \SOCKET_EINVAL : 22));
        }
        $context = $this->context;
        $encryption = $this->streamEncryption;
        $connected = \false;
        /** @var \React\Promise\PromiseInterface $promise */
        $promise = $this->connector->connect(\str_replace('tls://', '', $uri))->then(function (ConnectionInterface $connection) use($context, $encryption, $uri, &$promise, &$connected) {
            // (unencrypted) TCP/IP connection succeeded
            $connected = \true;
            if (!$connection instanceof Connection) {
                $connection->close();
                throw new \UnexpectedValueException('Base connector does not use internal Connection class exposing stream resource');
            }
            // set required SSL/TLS context options
            foreach ($context as $name => $value) {
                \stream_context_set_option($connection->stream, 'ssl', $name, $value);
            }
            // try to enable encryption
            return $promise = $encryption->enable($connection)->then(null, function ($error) use($connection, $uri) {
                // establishing encryption failed => close invalid connection and return error
                $connection->close();
                throw new \RuntimeException('Connection to ' . $uri . ' failed during TLS handshake: ' . $error->getMessage(), $error->getCode());
            });
        }, function (\Exception $e) use($uri) {
            if ($e instanceof \RuntimeException) {
                $message = \preg_replace('/^Connection to [^ ]+/', '', $e->getMessage());
                $e = new \RuntimeException('Connection to ' . $uri . $message, $e->getCode(), $e);
                // avoid garbage references by replacing all closures in call stack.
                // what a lovely piece of code!
                $r = new \ReflectionProperty('Exception', 'trace');
                $r->setAccessible(\true);
                $trace = $r->getValue($e);
                // Exception trace arguments are not available on some PHP 7.4 installs
                // @codeCoverageIgnoreStart
                foreach ($trace as $ti => $one) {
                    if (isset($one['args'])) {
                        foreach ($one['args'] as $ai => $arg) {
                            if ($arg instanceof \Closure) {
                                $trace[$ti]['args'][$ai] = 'Object(' . \get_class($arg) . ')';
                            }
                        }
                    }
                }
                // @codeCoverageIgnoreEnd
                $r->setValue($e, $trace);
            }
            throw $e;
        });
        return new \_PHPStan_dcc7b7cff\React\Promise\Promise(function ($resolve, $reject) use($promise) {
            $promise->then($resolve, $reject);
        }, function ($_, $reject) use(&$promise, $uri, &$connected) {
            if ($connected) {
                $reject(new \RuntimeException('Connection to ' . $uri . ' cancelled during TLS handshake (ECONNABORTED)', \defined('SOCKET_ECONNABORTED') ? \SOCKET_ECONNABORTED : 103));
            }
            $promise->cancel();
            $promise = null;
        });
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Socket;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
use _PHPStan_dcc7b7cff\React\EventLoop\Loop;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use InvalidArgumentException;
use RuntimeException;
/**
 * The `UnixServer` class implements the `ServerInterface` and
 * is responsible for accepting plaintext connections on unix domain sockets.
 *
 * ```php
 * $server = new React\Socket\UnixServer('unix:///tmp/app.sock');
 * ```
 *
 * See also the `ServerInterface` for more details.
 *
 * @see ServerInterface
 * @see ConnectionInterface
 */
final class UnixServer extends EventEmitter implements ServerInterface
{
    private $master;
    private $loop;
    private $listening = \false;
    /**
     * Creates a plaintext socket server and starts listening on the given unix socket
     *
     * This starts accepting new incoming connections on the given address.
     * See also the `connection event` documented in the `ServerInterface`
     * for more details.
     *
     * ```php
     * $server = new React\Socket\UnixServer('unix:///tmp/app.sock');
     * ```
     *
     * This class takes an optional `LoopInterface|null $loop` parameter that can be used to
     * pass the event loop instance to use for this object. You can use a `null` value
     * here in order to use the [default loop](https://github.com/reactphp/event-loop#loop).
     * This value SHOULD NOT be given unless you're sure you want to explicitly use a
     * given event loop instance.
     *
     * @param string         $path
     * @param ?LoopInterface $loop
     * @param array          $context
     * @throws InvalidArgumentException if the listening address is invalid
     * @throws RuntimeException if listening on this address fails (already in use etc.)
     */
    public function __construct($path, LoopInterface $loop = null, array $context = array())
    {
        $this->loop = $loop ?: Loop::get();
        if (\strpos($path, '://') === \false) {
            $path = 'unix://' . $path;
        } elseif (\substr($path, 0, 7) !== 'unix://') {
            throw new \InvalidArgumentException('Given URI "' . $path . '" is invalid (EINVAL)', \defined('SOCKET_EINVAL') ? \SOCKET_EINVAL : 22);
        }
        $errno = 0;
        $errstr = '';
        \set_error_handler(function ($_, $error) use(&$errno, &$errstr) {
            // PHP does not seem to report errno/errstr for Unix domain sockets (UDS) right now.
            // This only applies to UDS server sockets, see also https://3v4l.org/NAhpr.
            // Parse PHP warning message containing unknown error, HHVM reports proper info at least.
            if (\preg_match('/\\(([^\\)]+)\\)|\\[(\\d+)\\]: (.*)/', $error, $match)) {
                $errstr = isset($match[3]) ? $match['3'] : $match[1];
                $errno = isset($match[2]) ? (int) $match[2] : 0;
            }
        });
        $this->master = \stream_socket_server($path, $errno, $errstr, \STREAM_SERVER_BIND | \STREAM_SERVER_LISTEN, \stream_context_create(array('socket' => $context)));
        \restore_error_handler();
        if (\false === $this->master) {
            throw new \RuntimeException('Failed to listen on Unix domain socket "' . $path . '": ' . $errstr . SocketServer::errconst($errno), $errno);
        }
        \stream_set_blocking($this->master, 0);
        $this->resume();
    }
    public function getAddress()
    {
        if (!\is_resource($this->master)) {
            return null;
        }
        return 'unix://' . \stream_socket_get_name($this->master, \false);
    }
    public function pause()
    {
        if (!$this->listening) {
            return;
        }
        $this->loop->removeReadStream($this->master);
        $this->listening = \false;
    }
    public function resume()
    {
        if ($this->listening || !\is_resource($this->master)) {
            return;
        }
        $that = $this;
        $this->loop->addReadStream($this->master, function ($master) use($that) {
            try {
                $newSocket = SocketServer::accept($master);
            } catch (\RuntimeException $e) {
                $that->emit('error', array($e));
                return;
            }
            $that->handleConnection($newSocket);
        });
        $this->listening = \true;
    }
    public function close()
    {
        if (!\is_resource($this->master)) {
            return;
        }
        $this->pause();
        \fclose($this->master);
        $this->removeAllListeners();
    }
    /** @internal */
    public function handleConnection($socket)
    {
        $connection = new Connection($socket, $this->loop);
        $connection->unix = \true;
        $this->emit('connection', array($connection));
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Socket;

/**
 * The `ConnectorInterface` is responsible for providing an interface for
 * establishing streaming connections, such as a normal TCP/IP connection.
 *
 * This is the main interface defined in this package and it is used throughout
 * React's vast ecosystem.
 *
 * Most higher-level components (such as HTTP, database or other networking
 * service clients) accept an instance implementing this interface to create their
 * TCP/IP connection to the underlying networking service.
 * This is usually done via dependency injection, so it's fairly simple to actually
 * swap this implementation against any other implementation of this interface.
 *
 * The interface only offers a single `connect()` method.
 *
 * @see ConnectionInterface
 */
interface ConnectorInterface
{
    /**
     * Creates a streaming connection to the given remote address
     *
     * If returns a Promise which either fulfills with a stream implementing
     * `ConnectionInterface` on success or rejects with an `Exception` if the
     * connection is not successful.
     *
     * ```php
     * $connector->connect('google.com:443')->then(
     *     function (React\Socket\ConnectionInterface $connection) {
     *         // connection successfully established
     *     },
     *     function (Exception $error) {
     *         // failed to connect due to $error
     *     }
     * );
     * ```
     *
     * The returned Promise MUST be implemented in such a way that it can be
     * cancelled when it is still pending. Cancelling a pending promise MUST
     * reject its value with an Exception. It SHOULD clean up any underlying
     * resources and references as applicable.
     *
     * ```php
     * $promise = $connector->connect($uri);
     *
     * $promise->cancel();
     * ```
     *
     * @param string $uri
     * @return \React\Promise\PromiseInterface resolves with a stream implementing ConnectionInterface on success or rejects with an Exception on error
     * @see ConnectionInterface
     */
    public function connect($uri);
}
<?php

namespace _PHPStan_dcc7b7cff\React\Socket;

use _PHPStan_dcc7b7cff\React\EventLoop\Loop;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use _PHPStan_dcc7b7cff\React\Promise\Timer;
use _PHPStan_dcc7b7cff\React\Promise\Timer\TimeoutException;
final class TimeoutConnector implements ConnectorInterface
{
    private $connector;
    private $timeout;
    private $loop;
    public function __construct(ConnectorInterface $connector, $timeout, LoopInterface $loop = null)
    {
        $this->connector = $connector;
        $this->timeout = $timeout;
        $this->loop = $loop ?: Loop::get();
    }
    public function connect($uri)
    {
        return Timer\timeout($this->connector->connect($uri), $this->timeout, $this->loop)->then(null, self::handler($uri));
    }
    /**
     * Creates a static rejection handler that reports a proper error message in case of a timeout.
     *
     * This uses a private static helper method to ensure this closure is not
     * bound to this instance and the exception trace does not include a
     * reference to this instance and its connector stack as a result.
     *
     * @param string $uri
     * @return callable
     */
    private static function handler($uri)
    {
        return function (\Exception $e) use($uri) {
            if ($e instanceof TimeoutException) {
                throw new \RuntimeException('Connection to ' . $uri . ' timed out after ' . $e->getTimeout() . ' seconds (ETIMEDOUT)', \defined('SOCKET_ETIMEDOUT') ? \SOCKET_ETIMEDOUT : 110);
            }
            throw $e;
        };
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Socket;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
final class SocketServer extends EventEmitter implements ServerInterface
{
    private $server;
    /**
     * The `SocketServer` class is the main class in this package that implements the `ServerInterface` and
     * allows you to accept incoming streaming connections, such as plaintext TCP/IP or secure TLS connection streams.
     *
     * ```php
     * $socket = new React\Socket\SocketServer('127.0.0.1:0');
     * $socket = new React\Socket\SocketServer('127.0.0.1:8000');
     * $socket = new React\Socket\SocketServer('127.0.0.1:8000', $context);
     * ```
     *
     * This class takes an optional `LoopInterface|null $loop` parameter that can be used to
     * pass the event loop instance to use for this object. You can use a `null` value
     * here in order to use the [default loop](https://github.com/reactphp/event-loop#loop).
     * This value SHOULD NOT be given unless you're sure you want to explicitly use a
     * given event loop instance.
     *
     * @param string         $uri
     * @param array          $context
     * @param ?LoopInterface $loop
     * @throws \InvalidArgumentException if the listening address is invalid
     * @throws \RuntimeException if listening on this address fails (already in use etc.)
     */
    public function __construct($uri, array $context = array(), LoopInterface $loop = null)
    {
        // apply default options if not explicitly given
        $context += array('tcp' => array(), 'tls' => array(), 'unix' => array());
        $scheme = 'tcp';
        $pos = \strpos($uri, '://');
        if ($pos !== \false) {
            $scheme = \substr($uri, 0, $pos);
        }
        if ($scheme === 'unix') {
            $server = new UnixServer($uri, $loop, $context['unix']);
        } elseif ($scheme === 'php') {
            $server = new FdServer($uri, $loop);
        } else {
            if (\preg_match('#^(?:\\w+://)?\\d+$#', $uri)) {
                throw new \InvalidArgumentException('Invalid URI given (EINVAL)', \defined('SOCKET_EINVAL') ? \SOCKET_EINVAL : 22);
            }
            $server = new TcpServer(\str_replace('tls://', '', $uri), $loop, $context['tcp']);
            if ($scheme === 'tls') {
                $server = new SecureServer($server, $loop, $context['tls']);
            }
        }
        $this->server = $server;
        $that = $this;
        $server->on('connection', function (ConnectionInterface $conn) use($that) {
            $that->emit('connection', array($conn));
        });
        $server->on('error', function (\Exception $error) use($that) {
            $that->emit('error', array($error));
        });
    }
    public function getAddress()
    {
        return $this->server->getAddress();
    }
    public function pause()
    {
        $this->server->pause();
    }
    public function resume()
    {
        $this->server->resume();
    }
    public function close()
    {
        $this->server->close();
    }
    /**
     * [internal] Internal helper method to accept new connection from given server socket
     *
     * @param resource $socket server socket to accept connection from
     * @return resource new client socket if any
     * @throws \RuntimeException if accepting fails
     * @internal
     */
    public static function accept($socket)
    {
        $errno = 0;
        $errstr = '';
        \set_error_handler(function ($_, $error) use(&$errno, &$errstr) {
            // Match errstr from PHP's warning message.
            // stream_socket_accept(): accept failed: Connection timed out
            $errstr = \preg_replace('#.*: #', '', $error);
            $errno = SocketServer::errno($errstr);
        });
        $newSocket = \stream_socket_accept($socket, 0);
        \restore_error_handler();
        if (\false === $newSocket) {
            throw new \RuntimeException('Unable to accept new connection: ' . $errstr . self::errconst($errno), $errno);
        }
        return $newSocket;
    }
    /**
     * [Internal] Returns errno value for given errstr
     *
     * The errno and errstr values describes the type of error that has been
     * encountered. This method tries to look up the given errstr and find a
     * matching errno value which can be useful to provide more context to error
     * messages. It goes through the list of known errno constants when
     * ext-sockets is available to find an errno matching the given errstr.
     *
     * @param string $errstr
     * @return int errno value (e.g. value of `SOCKET_ECONNREFUSED`) or 0 if not found
     * @internal
     * @copyright Copyright (c) 2018 Christian Lück, taken from https://github.com/clue/errno with permission
     * @codeCoverageIgnore
     */
    public static function errno($errstr)
    {
        if (\function_exists('socket_strerror')) {
            foreach (\get_defined_constants(\false) as $name => $value) {
                if (\strpos($name, 'SOCKET_E') === 0 && \socket_strerror($value) === $errstr) {
                    return $value;
                }
            }
        }
        return 0;
    }
    /**
     * [Internal] Returns errno constant name for given errno value
     *
     * The errno value describes the type of error that has been encountered.
     * This method tries to look up the given errno value and find a matching
     * errno constant name which can be useful to provide more context and more
     * descriptive error messages. It goes through the list of known errno
     * constants when ext-sockets is available to find the matching errno
     * constant name.
     *
     * Because this method is used to append more context to error messages, the
     * constant name will be prefixed with a space and put between parenthesis
     * when found.
     *
     * @param int $errno
     * @return string e.g. ` (ECONNREFUSED)` or empty string if no matching const for the given errno could be found
     * @internal
     * @copyright Copyright (c) 2018 Christian Lück, taken from https://github.com/clue/errno with permission
     * @codeCoverageIgnore
     */
    public static function errconst($errno)
    {
        if (\function_exists('socket_strerror')) {
            foreach (\get_defined_constants(\false) as $name => $value) {
                if ($value === $errno && \strpos($name, 'SOCKET_E') === 0) {
                    return ' (' . \substr($name, 7) . ')';
                }
            }
        }
        return '';
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Socket;

/**
 * Decorates an existing Connector to always use a fixed, preconfigured URI
 *
 * This can be useful for consumers that do not support certain URIs, such as
 * when you want to explicitly connect to a Unix domain socket (UDS) path
 * instead of connecting to a default address assumed by an higher-level API:
 *
 * ```php
 * $connector = new React\Socket\FixedUriConnector(
 *     'unix:///var/run/docker.sock',
 *     new React\Socket\UnixConnector()
 * );
 *
 * // destination will be ignored, actually connects to Unix domain socket
 * $promise = $connector->connect('localhost:80');
 * ```
 */
class FixedUriConnector implements ConnectorInterface
{
    private $uri;
    private $connector;
    /**
     * @param string $uri
     * @param ConnectorInterface $connector
     */
    public function __construct($uri, ConnectorInterface $connector)
    {
        $this->uri = $uri;
        $this->connector = $connector;
    }
    public function connect($_)
    {
        return $this->connector->connect($this->uri);
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Socket;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
use _PHPStan_dcc7b7cff\React\EventLoop\Loop;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
/**
 * [Internal] The `FdServer` class implements the `ServerInterface` and
 * is responsible for accepting connections from an existing file descriptor.
 *
 * ```php
 * $socket = new React\Socket\FdServer(3);
 * ```
 *
 * Whenever a client connects, it will emit a `connection` event with a connection
 * instance implementing `ConnectionInterface`:
 *
 * ```php
 * $socket->on('connection', function (ConnectionInterface $connection) {
 *     echo 'Plaintext connection from ' . $connection->getRemoteAddress() . PHP_EOL;
 *     $connection->write('hello there!' . PHP_EOL);
 *     …
 * });
 * ```
 *
 * See also the `ServerInterface` for more details.
 *
 * @see ServerInterface
 * @see ConnectionInterface
 * @internal
 */
final class FdServer extends EventEmitter implements ServerInterface
{
    private $master;
    private $loop;
    private $unix = \false;
    private $listening = \false;
    /**
     * Creates a socket server and starts listening on the given file descriptor
     *
     * This starts accepting new incoming connections on the given file descriptor.
     * See also the `connection event` documented in the `ServerInterface`
     * for more details.
     *
     * ```php
     * $socket = new React\Socket\FdServer(3);
     * ```
     *
     * If the given FD is invalid or out of range, it will throw an `InvalidArgumentException`:
     *
     * ```php
     * // throws InvalidArgumentException
     * $socket = new React\Socket\FdServer(-1);
     * ```
     *
     * If the given FD appears to be valid, but listening on it fails (such as
     * if the FD does not exist or does not refer to a socket server), it will
     * throw a `RuntimeException`:
     *
     * ```php
     * // throws RuntimeException because FD does not reference a socket server
     * $socket = new React\Socket\FdServer(0, $loop);
     * ```
     *
     * Note that these error conditions may vary depending on your system and/or
     * configuration.
     * See the exception message and code for more details about the actual error
     * condition.
     *
     * @param int|string     $fd   FD number such as `3` or as URL in the form of `php://fd/3`
     * @param ?LoopInterface $loop
     * @throws \InvalidArgumentException if the listening address is invalid
     * @throws \RuntimeException if listening on this address fails (already in use etc.)
     */
    public function __construct($fd, LoopInterface $loop = null)
    {
        if (\preg_match('#^php://fd/(\\d+)$#', $fd, $m)) {
            $fd = (int) $m[1];
        }
        if (!\is_int($fd) || $fd < 0 || $fd >= \PHP_INT_MAX) {
            throw new \InvalidArgumentException('Invalid FD number given (EINVAL)', \defined('SOCKET_EINVAL') ? \SOCKET_EINVAL : 22);
        }
        $this->loop = $loop ?: Loop::get();
        $errno = 0;
        $errstr = '';
        \set_error_handler(function ($_, $error) use(&$errno, &$errstr) {
            // Match errstr from PHP's warning message.
            // fopen(php://fd/3): Failed to open stream: Error duping file descriptor 3; possibly it doesn't exist: [9]: Bad file descriptor
            \preg_match('/\\[(\\d+)\\]: (.*)/', $error, $m);
            $errno = isset($m[1]) ? (int) $m[1] : 0;
            $errstr = isset($m[2]) ? $m[2] : $error;
        });
        $this->master = \fopen('php://fd/' . $fd, 'r+');
        \restore_error_handler();
        if (\false === $this->master) {
            throw new \RuntimeException('Failed to listen on FD ' . $fd . ': ' . $errstr . SocketServer::errconst($errno), $errno);
        }
        $meta = \stream_get_meta_data($this->master);
        if (!isset($meta['stream_type']) || $meta['stream_type'] !== 'tcp_socket') {
            \fclose($this->master);
            $errno = \defined('SOCKET_ENOTSOCK') ? \SOCKET_ENOTSOCK : 88;
            $errstr = \function_exists('socket_strerror') ? \socket_strerror($errno) : 'Not a socket';
            throw new \RuntimeException('Failed to listen on FD ' . $fd . ': ' . $errstr . ' (ENOTSOCK)', $errno);
        }
        // Socket should not have a peer address if this is a listening socket.
        // Looks like this work-around is the closest we can get because PHP doesn't expose SO_ACCEPTCONN even with ext-sockets.
        if (\stream_socket_get_name($this->master, \true) !== \false) {
            \fclose($this->master);
            $errno = \defined('SOCKET_EISCONN') ? \SOCKET_EISCONN : 106;
            $errstr = \function_exists('socket_strerror') ? \socket_strerror($errno) : 'Socket is connected';
            throw new \RuntimeException('Failed to listen on FD ' . $fd . ': ' . $errstr . ' (EISCONN)', $errno);
        }
        // Assume this is a Unix domain socket (UDS) when its listening address doesn't parse as a valid URL with a port.
        // Looks like this work-around is the closest we can get because PHP doesn't expose SO_DOMAIN even with ext-sockets.
        $this->unix = \parse_url($this->getAddress(), \PHP_URL_PORT) === \false;
        \stream_set_blocking($this->master, \false);
        $this->resume();
    }
    public function getAddress()
    {
        if (!\is_resource($this->master)) {
            return null;
        }
        $address = \stream_socket_get_name($this->master, \false);
        if ($this->unix === \true) {
            return 'unix://' . $address;
        }
        // check if this is an IPv6 address which includes multiple colons but no square brackets
        $pos = \strrpos($address, ':');
        if ($pos !== \false && \strpos($address, ':') < $pos && \substr($address, 0, 1) !== '[') {
            $address = '[' . \substr($address, 0, $pos) . ']:' . \substr($address, $pos + 1);
            // @codeCoverageIgnore
        }
        return 'tcp://' . $address;
    }
    public function pause()
    {
        if (!$this->listening) {
            return;
        }
        $this->loop->removeReadStream($this->master);
        $this->listening = \false;
    }
    public function resume()
    {
        if ($this->listening || !\is_resource($this->master)) {
            return;
        }
        $that = $this;
        $this->loop->addReadStream($this->master, function ($master) use($that) {
            try {
                $newSocket = SocketServer::accept($master);
            } catch (\RuntimeException $e) {
                $that->emit('error', array($e));
                return;
            }
            $that->handleConnection($newSocket);
        });
        $this->listening = \true;
    }
    public function close()
    {
        if (!\is_resource($this->master)) {
            return;
        }
        $this->pause();
        \fclose($this->master);
        $this->removeAllListeners();
    }
    /** @internal */
    public function handleConnection($socket)
    {
        $connection = new Connection($socket, $this->loop);
        $connection->unix = $this->unix;
        $this->emit('connection', array($connection));
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Socket;

use _PHPStan_dcc7b7cff\Evenement\EventEmitterInterface;
/**
 * The `ServerInterface` is responsible for providing an interface for accepting
 * incoming streaming connections, such as a normal TCP/IP connection.
 *
 * Most higher-level components (such as a HTTP server) accept an instance
 * implementing this interface to accept incoming streaming connections.
 * This is usually done via dependency injection, so it's fairly simple to actually
 * swap this implementation against any other implementation of this interface.
 * This means that you SHOULD typehint against this interface instead of a concrete
 * implementation of this interface.
 *
 * Besides defining a few methods, this interface also implements the
 * `EventEmitterInterface` which allows you to react to certain events:
 *
 * connection event:
 *     The `connection` event will be emitted whenever a new connection has been
 *     established, i.e. a new client connects to this server socket:
 *
 *     ```php
 *     $socket->on('connection', function (React\Socket\ConnectionInterface $connection) {
 *         echo 'new connection' . PHP_EOL;
 *     });
 *     ```
 *
 *     See also the `ConnectionInterface` for more details about handling the
 *     incoming connection.
 *
 * error event:
 *     The `error` event will be emitted whenever there's an error accepting a new
 *     connection from a client.
 *
 *     ```php
 *     $socket->on('error', function (Exception $e) {
 *         echo 'error: ' . $e->getMessage() . PHP_EOL;
 *     });
 *     ```
 *
 *     Note that this is not a fatal error event, i.e. the server keeps listening for
 *     new connections even after this event.
 *
 * @see ConnectionInterface
 */
interface ServerInterface extends EventEmitterInterface
{
    /**
     * Returns the full address (URI) this server is currently listening on
     *
     * ```php
     * $address = $socket->getAddress();
     * echo 'Server listening on ' . $address . PHP_EOL;
     * ```
     *
     * If the address can not be determined or is unknown at this time (such as
     * after the socket has been closed), it MAY return a `NULL` value instead.
     *
     * Otherwise, it will return the full address (URI) as a string value, such
     * as `tcp://127.0.0.1:8080`, `tcp://[::1]:80` or `tls://127.0.0.1:443`.
     * Note that individual URI components are application specific and depend
     * on the underlying transport protocol.
     *
     * If this is a TCP/IP based server and you only want the local port, you may
     * use something like this:
     *
     * ```php
     * $address = $socket->getAddress();
     * $port = parse_url($address, PHP_URL_PORT);
     * echo 'Server listening on port ' . $port . PHP_EOL;
     * ```
     *
     * @return ?string the full listening address (URI) or NULL if it is unknown (not applicable to this server socket or already closed)
     */
    public function getAddress();
    /**
     * Pauses accepting new incoming connections.
     *
     * Removes the socket resource from the EventLoop and thus stop accepting
     * new connections. Note that the listening socket stays active and is not
     * closed.
     *
     * This means that new incoming connections will stay pending in the
     * operating system backlog until its configurable backlog is filled.
     * Once the backlog is filled, the operating system may reject further
     * incoming connections until the backlog is drained again by resuming
     * to accept new connections.
     *
     * Once the server is paused, no futher `connection` events SHOULD
     * be emitted.
     *
     * ```php
     * $socket->pause();
     *
     * $socket->on('connection', assertShouldNeverCalled());
     * ```
     *
     * This method is advisory-only, though generally not recommended, the
     * server MAY continue emitting `connection` events.
     *
     * Unless otherwise noted, a successfully opened server SHOULD NOT start
     * in paused state.
     *
     * You can continue processing events by calling `resume()` again.
     *
     * Note that both methods can be called any number of times, in particular
     * calling `pause()` more than once SHOULD NOT have any effect.
     * Similarly, calling this after `close()` is a NO-OP.
     *
     * @see self::resume()
     * @return void
     */
    public function pause();
    /**
     * Resumes accepting new incoming connections.
     *
     * Re-attach the socket resource to the EventLoop after a previous `pause()`.
     *
     * ```php
     * $socket->pause();
     *
     * Loop::addTimer(1.0, function () use ($socket) {
     *     $socket->resume();
     * });
     * ```
     *
     * Note that both methods can be called any number of times, in particular
     * calling `resume()` without a prior `pause()` SHOULD NOT have any effect.
     * Similarly, calling this after `close()` is a NO-OP.
     *
     * @see self::pause()
     * @return void
     */
    public function resume();
    /**
     * Shuts down this listening socket
     *
     * This will stop listening for new incoming connections on this socket.
     *
     * Calling this method more than once on the same instance is a NO-OP.
     *
     * @return void
     */
    public function close();
}
The MIT License (MIT)

Copyright (c) 2012 Christian Lück, Cees-Jan Kiewiet, Jan Sorgalla, Chris Boden, Igor Wiedler

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

namespace _PHPStan_dcc7b7cff\React\Stream;

/**
 * The `DuplexStreamInterface` is responsible for providing an interface for
 * duplex streams (both readable and writable).
 *
 * It builds on top of the existing interfaces for readable and writable streams
 * and follows the exact same method and event semantics.
 * If you're new to this concept, you should look into the
 * `ReadableStreamInterface` and `WritableStreamInterface` first.
 *
 * Besides defining a few methods, this interface also implements the
 * `EventEmitterInterface` which allows you to react to the same events defined
 * on the `ReadbleStreamInterface` and `WritableStreamInterface`.
 *
 * The event callback functions MUST be a valid `callable` that obeys strict
 * parameter definitions and MUST accept event parameters exactly as documented.
 * The event callback functions MUST NOT throw an `Exception`.
 * The return value of the event callback functions will be ignored and has no
 * effect, so for performance reasons you're recommended to not return any
 * excessive data structures.
 *
 * Every implementation of this interface MUST follow these event semantics in
 * order to be considered a well-behaving stream.
 *
 * > Note that higher-level implementations of this interface may choose to
 *   define additional events with dedicated semantics not defined as part of
 *   this low-level stream specification. Conformance with these event semantics
 *   is out of scope for this interface, so you may also have to refer to the
 *   documentation of such a higher-level implementation.
 *
 * @see ReadableStreamInterface
 * @see WritableStreamInterface
 */
interface DuplexStreamInterface extends ReadableStreamInterface, WritableStreamInterface
{
}
<?php

namespace _PHPStan_dcc7b7cff\React\Stream;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
use InvalidArgumentException;
/**
 * The `ThroughStream` implements the
 * [`DuplexStreamInterface`](#duplexstreaminterface) and will simply pass any data
 * you write to it through to its readable end.
 *
 * ```php
 * $through = new ThroughStream();
 * $through->on('data', $this->expectCallableOnceWith('hello'));
 *
 * $through->write('hello');
 * ```
 *
 * Similarly, the [`end()` method](#end) will end the stream and emit an
 * [`end` event](#end-event) and then [`close()`](#close-1) the stream.
 * The [`close()` method](#close-1) will close the stream and emit a
 * [`close` event](#close-event).
 * Accordingly, this is can also be used in a [`pipe()`](#pipe) context like this:
 *
 * ```php
 * $through = new ThroughStream();
 * $source->pipe($through)->pipe($dest);
 * ```
 *
 * Optionally, its constructor accepts any callable function which will then be
 * used to *filter* any data written to it. This function receives a single data
 * argument as passed to the writable side and must return the data as it will be
 * passed to its readable end:
 *
 * ```php
 * $through = new ThroughStream('strtoupper');
 * $source->pipe($through)->pipe($dest);
 * ```
 *
 * Note that this class makes no assumptions about any data types. This can be
 * used to convert data, for example for transforming any structured data into
 * a newline-delimited JSON (NDJSON) stream like this:
 *
 * ```php
 * $through = new ThroughStream(function ($data) {
 *     return json_encode($data) . PHP_EOL;
 * });
 * $through->on('data', $this->expectCallableOnceWith("[2, true]\n"));
 *
 * $through->write(array(2, true));
 * ```
 *
 * The callback function is allowed to throw an `Exception`. In this case,
 * the stream will emit an `error` event and then [`close()`](#close-1) the stream.
 *
 * ```php
 * $through = new ThroughStream(function ($data) {
 *     if (!is_string($data)) {
 *         throw new \UnexpectedValueException('Only strings allowed');
 *     }
 *     return $data;
 * });
 * $through->on('error', $this->expectCallableOnce()));
 * $through->on('close', $this->expectCallableOnce()));
 * $through->on('data', $this->expectCallableNever()));
 *
 * $through->write(2);
 * ```
 *
 * @see WritableStreamInterface::write()
 * @see WritableStreamInterface::end()
 * @see DuplexStreamInterface::close()
 * @see WritableStreamInterface::pipe()
 */
final class ThroughStream extends EventEmitter implements DuplexStreamInterface
{
    private $readable = \true;
    private $writable = \true;
    private $closed = \false;
    private $paused = \false;
    private $drain = \false;
    private $callback;
    public function __construct($callback = null)
    {
        if ($callback !== null && !\is_callable($callback)) {
            throw new InvalidArgumentException('Invalid transformation callback given');
        }
        $this->callback = $callback;
    }
    public function pause()
    {
        $this->paused = \true;
    }
    public function resume()
    {
        if ($this->drain) {
            $this->drain = \false;
            $this->emit('drain');
        }
        $this->paused = \false;
    }
    public function pipe(WritableStreamInterface $dest, array $options = array())
    {
        return Util::pipe($this, $dest, $options);
    }
    public function isReadable()
    {
        return $this->readable;
    }
    public function isWritable()
    {
        return $this->writable;
    }
    public function write($data)
    {
        if (!$this->writable) {
            return \false;
        }
        if ($this->callback !== null) {
            try {
                $data = \call_user_func($this->callback, $data);
            } catch (\Exception $e) {
                $this->emit('error', array($e));
                $this->close();
                return \false;
            }
        }
        $this->emit('data', array($data));
        if ($this->paused) {
            $this->drain = \true;
            return \false;
        }
        return \true;
    }
    public function end($data = null)
    {
        if (!$this->writable) {
            return;
        }
        if (null !== $data) {
            $this->write($data);
            // return if write() already caused the stream to close
            if (!$this->writable) {
                return;
            }
        }
        $this->readable = \false;
        $this->writable = \false;
        $this->paused = \true;
        $this->drain = \false;
        $this->emit('end');
        $this->close();
    }
    public function close()
    {
        if ($this->closed) {
            return;
        }
        $this->readable = \false;
        $this->writable = \false;
        $this->closed = \true;
        $this->paused = \true;
        $this->drain = \false;
        $this->callback = null;
        $this->emit('close');
        $this->removeAllListeners();
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Stream;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
use _PHPStan_dcc7b7cff\React\EventLoop\Loop;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use InvalidArgumentException;
final class ReadableResourceStream extends EventEmitter implements ReadableStreamInterface
{
    /**
     * @var resource
     */
    private $stream;
    /** @var LoopInterface */
    private $loop;
    /**
     * Controls the maximum buffer size in bytes to read at once from the stream.
     *
     * This value SHOULD NOT be changed unless you know what you're doing.
     *
     * This can be a positive number which means that up to X bytes will be read
     * at once from the underlying stream resource. Note that the actual number
     * of bytes read may be lower if the stream resource has less than X bytes
     * currently available.
     *
     * This can be `-1` which means read everything available from the
     * underlying stream resource.
     * This should read until the stream resource is not readable anymore
     * (i.e. underlying buffer drained), note that this does not neccessarily
     * mean it reached EOF.
     *
     * @var int
     */
    private $bufferSize;
    private $closed = \false;
    private $listening = \false;
    public function __construct($stream, LoopInterface $loop = null, $readChunkSize = null)
    {
        if (!\is_resource($stream) || \get_resource_type($stream) !== "stream") {
            throw new InvalidArgumentException('First parameter must be a valid stream resource');
        }
        // ensure resource is opened for reading (fopen mode must contain "r" or "+")
        $meta = \stream_get_meta_data($stream);
        if (isset($meta['mode']) && $meta['mode'] !== '' && \strpos($meta['mode'], 'r') === \strpos($meta['mode'], '+')) {
            throw new InvalidArgumentException('Given stream resource is not opened in read mode');
        }
        // this class relies on non-blocking I/O in order to not interrupt the event loop
        // e.g. pipes on Windows do not support this: https://bugs.php.net/bug.php?id=47918
        if (\stream_set_blocking($stream, \false) !== \true) {
            throw new \RuntimeException('Unable to set stream resource to non-blocking mode');
        }
        // Use unbuffered read operations on the underlying stream resource.
        // Reading chunks from the stream may otherwise leave unread bytes in
        // PHP's stream buffers which some event loop implementations do not
        // trigger events on (edge triggered).
        // This does not affect the default event loop implementation (level
        // triggered), so we can ignore platforms not supporting this (HHVM).
        // Pipe streams (such as STDIN) do not seem to require this and legacy
        // PHP versions cause SEGFAULTs on unbuffered pipe streams, so skip this.
        if (\function_exists('stream_set_read_buffer') && !$this->isLegacyPipe($stream)) {
            \stream_set_read_buffer($stream, 0);
        }
        $this->stream = $stream;
        $this->loop = $loop ?: Loop::get();
        $this->bufferSize = $readChunkSize === null ? 65536 : (int) $readChunkSize;
        $this->resume();
    }
    public function isReadable()
    {
        return !$this->closed;
    }
    public function pause()
    {
        if ($this->listening) {
            $this->loop->removeReadStream($this->stream);
            $this->listening = \false;
        }
    }
    public function resume()
    {
        if (!$this->listening && !$this->closed) {
            $this->loop->addReadStream($this->stream, array($this, 'handleData'));
            $this->listening = \true;
        }
    }
    public function pipe(WritableStreamInterface $dest, array $options = array())
    {
        return Util::pipe($this, $dest, $options);
    }
    public function close()
    {
        if ($this->closed) {
            return;
        }
        $this->closed = \true;
        $this->emit('close');
        $this->pause();
        $this->removeAllListeners();
        if (\is_resource($this->stream)) {
            \fclose($this->stream);
        }
    }
    /** @internal */
    public function handleData()
    {
        $error = null;
        \set_error_handler(function ($errno, $errstr, $errfile, $errline) use(&$error) {
            $error = new \ErrorException($errstr, 0, $errno, $errfile, $errline);
        });
        $data = \stream_get_contents($this->stream, $this->bufferSize);
        \restore_error_handler();
        if ($error !== null) {
            $this->emit('error', array(new \RuntimeException('Unable to read from stream: ' . $error->getMessage(), 0, $error)));
            $this->close();
            return;
        }
        if ($data !== '') {
            $this->emit('data', array($data));
        } elseif (\feof($this->stream)) {
            // no data read => we reached the end and close the stream
            $this->emit('end');
            $this->close();
        }
    }
    /**
     * Returns whether this is a pipe resource in a legacy environment
     *
     * This works around a legacy PHP bug (#61019) that was fixed in PHP 5.4.28+
     * and PHP 5.5.12+ and newer.
     *
     * @param resource $resource
     * @return bool
     * @link https://github.com/reactphp/child-process/issues/40
     *
     * @codeCoverageIgnore
     */
    private function isLegacyPipe($resource)
    {
        if (\PHP_VERSION_ID < 50428 || \PHP_VERSION_ID >= 50500 && \PHP_VERSION_ID < 50512) {
            $meta = \stream_get_meta_data($resource);
            if (isset($meta['stream_type']) && $meta['stream_type'] === 'STDIO') {
                return \true;
            }
        }
        return \false;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Stream;

final class Util
{
    /**
     * Pipes all the data from the given $source into the $dest
     *
     * @param ReadableStreamInterface $source
     * @param WritableStreamInterface $dest
     * @param array $options
     * @return WritableStreamInterface $dest stream as-is
     * @see ReadableStreamInterface::pipe() for more details
     */
    public static function pipe(ReadableStreamInterface $source, WritableStreamInterface $dest, array $options = array())
    {
        // source not readable => NO-OP
        if (!$source->isReadable()) {
            return $dest;
        }
        // destination not writable => just pause() source
        if (!$dest->isWritable()) {
            $source->pause();
            return $dest;
        }
        $dest->emit('pipe', array($source));
        // forward all source data events as $dest->write()
        $source->on('data', $dataer = function ($data) use($source, $dest) {
            $feedMore = $dest->write($data);
            if (\false === $feedMore) {
                $source->pause();
            }
        });
        $dest->on('close', function () use($source, $dataer) {
            $source->removeListener('data', $dataer);
            $source->pause();
        });
        // forward destination drain as $source->resume()
        $dest->on('drain', $drainer = function () use($source) {
            $source->resume();
        });
        $source->on('close', function () use($dest, $drainer) {
            $dest->removeListener('drain', $drainer);
        });
        // forward end event from source as $dest->end()
        $end = isset($options['end']) ? $options['end'] : \true;
        if ($end) {
            $source->on('end', $ender = function () use($dest) {
                $dest->end();
            });
            $dest->on('close', function () use($source, $ender) {
                $source->removeListener('end', $ender);
            });
        }
        return $dest;
    }
    public static function forwardEvents($source, $target, array $events)
    {
        foreach ($events as $event) {
            $source->on($event, function () use($event, $target) {
                $target->emit($event, \func_get_args());
            });
        }
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Stream;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
use _PHPStan_dcc7b7cff\React\EventLoop\Loop;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
final class WritableResourceStream extends EventEmitter implements WritableStreamInterface
{
    private $stream;
    /** @var LoopInterface */
    private $loop;
    /**
     * @var int
     */
    private $softLimit;
    /**
     * @var int
     */
    private $writeChunkSize;
    private $listening = \false;
    private $writable = \true;
    private $closed = \false;
    private $data = '';
    public function __construct($stream, LoopInterface $loop = null, $writeBufferSoftLimit = null, $writeChunkSize = null)
    {
        if (!\is_resource($stream) || \get_resource_type($stream) !== "stream") {
            throw new \InvalidArgumentException('First parameter must be a valid stream resource');
        }
        // ensure resource is opened for writing (fopen mode must contain either of "waxc+")
        $meta = \stream_get_meta_data($stream);
        if (isset($meta['mode']) && $meta['mode'] !== '' && \strtr($meta['mode'], 'waxc+', '.....') === $meta['mode']) {
            throw new \InvalidArgumentException('Given stream resource is not opened in write mode');
        }
        // this class relies on non-blocking I/O in order to not interrupt the event loop
        // e.g. pipes on Windows do not support this: https://bugs.php.net/bug.php?id=47918
        if (\stream_set_blocking($stream, \false) !== \true) {
            throw new \RuntimeException('Unable to set stream resource to non-blocking mode');
        }
        $this->stream = $stream;
        $this->loop = $loop ?: Loop::get();
        $this->softLimit = $writeBufferSoftLimit === null ? 65536 : (int) $writeBufferSoftLimit;
        $this->writeChunkSize = $writeChunkSize === null ? -1 : (int) $writeChunkSize;
    }
    public function isWritable()
    {
        return $this->writable;
    }
    public function write($data)
    {
        if (!$this->writable) {
            return \false;
        }
        $this->data .= $data;
        if (!$this->listening && $this->data !== '') {
            $this->listening = \true;
            $this->loop->addWriteStream($this->stream, array($this, 'handleWrite'));
        }
        return !isset($this->data[$this->softLimit - 1]);
    }
    public function end($data = null)
    {
        if (null !== $data) {
            $this->write($data);
        }
        $this->writable = \false;
        // close immediately if buffer is already empty
        // otherwise wait for buffer to flush first
        if ($this->data === '') {
            $this->close();
        }
    }
    public function close()
    {
        if ($this->closed) {
            return;
        }
        if ($this->listening) {
            $this->listening = \false;
            $this->loop->removeWriteStream($this->stream);
        }
        $this->closed = \true;
        $this->writable = \false;
        $this->data = '';
        $this->emit('close');
        $this->removeAllListeners();
        if (\is_resource($this->stream)) {
            \fclose($this->stream);
        }
    }
    /** @internal */
    public function handleWrite()
    {
        $error = null;
        \set_error_handler(function ($_, $errstr) use(&$error) {
            $error = $errstr;
        });
        if ($this->writeChunkSize === -1) {
            $sent = \fwrite($this->stream, $this->data);
        } else {
            $sent = \fwrite($this->stream, $this->data, $this->writeChunkSize);
        }
        \restore_error_handler();
        // Only report errors if *nothing* could be sent and an error has been raised.
        // Ignore non-fatal warnings if *some* data could be sent.
        // Any hard (permanent) error will fail to send any data at all.
        // Sending excessive amounts of data will only flush *some* data and then
        // report a temporary error (EAGAIN) which we do not raise here in order
        // to keep the stream open for further tries to write.
        // Should this turn out to be a permanent error later, it will eventually
        // send *nothing* and we can detect this.
        if (($sent === 0 || $sent === \false) && $error !== null) {
            $this->emit('error', array(new \RuntimeException('Unable to write to stream: ' . $error)));
            $this->close();
            return;
        }
        $exceeded = isset($this->data[$this->softLimit - 1]);
        $this->data = (string) \substr($this->data, $sent);
        // buffer has been above limit and is now below limit
        if ($exceeded && !isset($this->data[$this->softLimit - 1])) {
            $this->emit('drain');
        }
        // buffer is now completely empty => stop trying to write
        if ($this->data === '') {
            // stop waiting for resource to be writable
            if ($this->listening) {
                $this->loop->removeWriteStream($this->stream);
                $this->listening = \false;
            }
            // buffer is end()ing and now completely empty => close buffer
            if (!$this->writable) {
                $this->close();
            }
        }
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Stream;

use _PHPStan_dcc7b7cff\Evenement\EventEmitterInterface;
/**
 * The `ReadableStreamInterface` is responsible for providing an interface for
 * read-only streams and the readable side of duplex streams.
 *
 * Besides defining a few methods, this interface also implements the
 * `EventEmitterInterface` which allows you to react to certain events:
 *
 * data event:
 *     The `data` event will be emitted whenever some data was read/received
 *     from this source stream.
 *     The event receives a single mixed argument for incoming data.
 *
 *     ```php
 *     $stream->on('data', function ($data) {
 *         echo $data;
 *     });
 *     ```
 *
 *     This event MAY be emitted any number of times, which may be zero times if
 *     this stream does not send any data at all.
 *     It SHOULD not be emitted after an `end` or `close` event.
 *
 *     The given `$data` argument may be of mixed type, but it's usually
 *     recommended it SHOULD be a `string` value or MAY use a type that allows
 *     representation as a `string` for maximum compatibility.
 *
 *     Many common streams (such as a TCP/IP connection or a file-based stream)
 *     will emit the raw (binary) payload data that is received over the wire as
 *     chunks of `string` values.
 *
 *     Due to the stream-based nature of this, the sender may send any number
 *     of chunks with varying sizes. There are no guarantees that these chunks
 *     will be received with the exact same framing the sender intended to send.
 *     In other words, many lower-level protocols (such as TCP/IP) transfer the
 *     data in chunks that may be anywhere between single-byte values to several
 *     dozens of kilobytes. You may want to apply a higher-level protocol to
 *     these low-level data chunks in order to achieve proper message framing.
 *
 * end event:
 *     The `end` event will be emitted once the source stream has successfully
 *     reached the end of the stream (EOF).
 *
 *     ```php
 *     $stream->on('end', function () {
 *         echo 'END';
 *     });
 *     ```
 *
 *     This event SHOULD be emitted once or never at all, depending on whether
 *     a successful end was detected.
 *     It SHOULD NOT be emitted after a previous `end` or `close` event.
 *     It MUST NOT be emitted if the stream closes due to a non-successful
 *     end, such as after a previous `error` event.
 *
 *     After the stream is ended, it MUST switch to non-readable mode,
 *     see also `isReadable()`.
 *
 *     This event will only be emitted if the *end* was reached successfully,
 *     not if the stream was interrupted by an unrecoverable error or explicitly
 *     closed. Not all streams know this concept of a "successful end".
 *     Many use-cases involve detecting when the stream closes (terminates)
 *     instead, in this case you should use the `close` event.
 *     After the stream emits an `end` event, it SHOULD usually be followed by a
 *     `close` event.
 *
 *     Many common streams (such as a TCP/IP connection or a file-based stream)
 *     will emit this event if either the remote side closes the connection or
 *     a file handle was successfully read until reaching its end (EOF).
 *
 *     Note that this event should not be confused with the `end()` method.
 *     This event defines a successful end *reading* from a source stream, while
 *     the `end()` method defines *writing* a successful end to a destination
 *     stream.
 *
 * error event:
 *     The `error` event will be emitted once a fatal error occurs, usually while
 *     trying to read from this stream.
 *     The event receives a single `Exception` argument for the error instance.
 *
 *     ```php
 *     $stream->on('error', function (Exception $e) {
 *         echo 'Error: ' . $e->getMessage() . PHP_EOL;
 *     });
 *     ```
 *
 *     This event SHOULD be emitted once the stream detects a fatal error, such
 *     as a fatal transmission error or after an unexpected `data` or premature
 *     `end` event.
 *     It SHOULD NOT be emitted after a previous `error`, `end` or `close` event.
 *     It MUST NOT be emitted if this is not a fatal error condition, such as
 *     a temporary network issue that did not cause any data to be lost.
 *
 *     After the stream errors, it MUST close the stream and SHOULD thus be
 *     followed by a `close` event and then switch to non-readable mode, see
 *     also `close()` and `isReadable()`.
 *
 *     Many common streams (such as a TCP/IP connection or a file-based stream)
 *     only deal with data transmission and do not make assumption about data
 *     boundaries (such as unexpected `data` or premature `end` events).
 *     In other words, many lower-level protocols (such as TCP/IP) may choose
 *     to only emit this for a fatal transmission error once and will then
 *     close (terminate) the stream in response.
 *
 *     If this stream is a `DuplexStreamInterface`, you should also notice
 *     how the writable side of the stream also implements an `error` event.
 *     In other words, an error may occur while either reading or writing the
 *     stream which should result in the same error processing.
 *
 * close event:
 *     The `close` event will be emitted once the stream closes (terminates).
 *
 *     ```php
 *     $stream->on('close', function () {
 *         echo 'CLOSED';
 *     });
 *     ```
 *
 *     This event SHOULD be emitted once or never at all, depending on whether
 *     the stream ever terminates.
 *     It SHOULD NOT be emitted after a previous `close` event.
 *
 *     After the stream is closed, it MUST switch to non-readable mode,
 *     see also `isReadable()`.
 *
 *     Unlike the `end` event, this event SHOULD be emitted whenever the stream
 *     closes, irrespective of whether this happens implicitly due to an
 *     unrecoverable error or explicitly when either side closes the stream.
 *     If you only want to detect a *successful* end, you should use the `end`
 *     event instead.
 *
 *     Many common streams (such as a TCP/IP connection or a file-based stream)
 *     will likely choose to emit this event after reading a *successful* `end`
 *     event or after a fatal transmission `error` event.
 *
 *     If this stream is a `DuplexStreamInterface`, you should also notice
 *     how the writable side of the stream also implements a `close` event.
 *     In other words, after receiving this event, the stream MUST switch into
 *     non-writable AND non-readable mode, see also `isWritable()`.
 *     Note that this event should not be confused with the `end` event.
 *
 * The event callback functions MUST be a valid `callable` that obeys strict
 * parameter definitions and MUST accept event parameters exactly as documented.
 * The event callback functions MUST NOT throw an `Exception`.
 * The return value of the event callback functions will be ignored and has no
 * effect, so for performance reasons you're recommended to not return any
 * excessive data structures.
 *
 * Every implementation of this interface MUST follow these event semantics in
 * order to be considered a well-behaving stream.
 *
 * > Note that higher-level implementations of this interface may choose to
 *   define additional events with dedicated semantics not defined as part of
 *   this low-level stream specification. Conformance with these event semantics
 *   is out of scope for this interface, so you may also have to refer to the
 *   documentation of such a higher-level implementation.
 *
 * @see EventEmitterInterface
 */
interface ReadableStreamInterface extends EventEmitterInterface
{
    /**
     * Checks whether this stream is in a readable state (not closed already).
     *
     * This method can be used to check if the stream still accepts incoming
     * data events or if it is ended or closed already.
     * Once the stream is non-readable, no further `data` or `end` events SHOULD
     * be emitted.
     *
     * ```php
     * assert($stream->isReadable() === false);
     *
     * $stream->on('data', assertNeverCalled());
     * $stream->on('end', assertNeverCalled());
     * ```
     *
     * A successfully opened stream always MUST start in readable mode.
     *
     * Once the stream ends or closes, it MUST switch to non-readable mode.
     * This can happen any time, explicitly through `close()` or
     * implicitly due to a remote close or an unrecoverable transmission error.
     * Once a stream has switched to non-readable mode, it MUST NOT transition
     * back to readable mode.
     *
     * If this stream is a `DuplexStreamInterface`, you should also notice
     * how the writable side of the stream also implements an `isWritable()`
     * method. Unless this is a half-open duplex stream, they SHOULD usually
     * have the same return value.
     *
     * @return bool
     */
    public function isReadable();
    /**
     * Pauses reading incoming data events.
     *
     * Removes the data source file descriptor from the event loop. This
     * allows you to throttle incoming data.
     *
     * Unless otherwise noted, a successfully opened stream SHOULD NOT start
     * in paused state.
     *
     * Once the stream is paused, no futher `data` or `end` events SHOULD
     * be emitted.
     *
     * ```php
     * $stream->pause();
     *
     * $stream->on('data', assertShouldNeverCalled());
     * $stream->on('end', assertShouldNeverCalled());
     * ```
     *
     * This method is advisory-only, though generally not recommended, the
     * stream MAY continue emitting `data` events.
     *
     * You can continue processing events by calling `resume()` again.
     *
     * Note that both methods can be called any number of times, in particular
     * calling `pause()` more than once SHOULD NOT have any effect.
     *
     * @see self::resume()
     * @return void
     */
    public function pause();
    /**
     * Resumes reading incoming data events.
     *
     * Re-attach the data source after a previous `pause()`.
     *
     * ```php
     * $stream->pause();
     *
     * Loop::addTimer(1.0, function () use ($stream) {
     *     $stream->resume();
     * });
     * ```
     *
     * Note that both methods can be called any number of times, in particular
     * calling `resume()` without a prior `pause()` SHOULD NOT have any effect.
     *
     * @see self::pause()
     * @return void
     */
    public function resume();
    /**
     * Pipes all the data from this readable source into the given writable destination.
     *
     * Automatically sends all incoming data to the destination.
     * Automatically throttles the source based on what the destination can handle.
     *
     * ```php
     * $source->pipe($dest);
     * ```
     *
     * Similarly, you can also pipe an instance implementing `DuplexStreamInterface`
     * into itself in order to write back all the data that is received.
     * This may be a useful feature for a TCP/IP echo service:
     *
     * ```php
     * $connection->pipe($connection);
     * ```
     *
     * This method returns the destination stream as-is, which can be used to
     * set up chains of piped streams:
     *
     * ```php
     * $source->pipe($decodeGzip)->pipe($filterBadWords)->pipe($dest);
     * ```
     *
     * By default, this will call `end()` on the destination stream once the
     * source stream emits an `end` event. This can be disabled like this:
     *
     * ```php
     * $source->pipe($dest, array('end' => false));
     * ```
     *
     * Note that this only applies to the `end` event.
     * If an `error` or explicit `close` event happens on the source stream,
     * you'll have to manually close the destination stream:
     *
     * ```php
     * $source->pipe($dest);
     * $source->on('close', function () use ($dest) {
     *     $dest->end('BYE!');
     * });
     * ```
     *
     * If the source stream is not readable (closed state), then this is a NO-OP.
     *
     * ```php
     * $source->close();
     * $source->pipe($dest); // NO-OP
     * ```
     *
     * If the destinantion stream is not writable (closed state), then this will simply
     * throttle (pause) the source stream:
     *
     * ```php
     * $dest->close();
     * $source->pipe($dest); // calls $source->pause()
     * ```
     *
     * Similarly, if the destination stream is closed while the pipe is still
     * active, it will also throttle (pause) the source stream:
     *
     * ```php
     * $source->pipe($dest);
     * $dest->close(); // calls $source->pause()
     * ```
     *
     * Once the pipe is set up successfully, the destination stream MUST emit
     * a `pipe` event with this source stream an event argument.
     *
     * @param WritableStreamInterface $dest
     * @param array $options
     * @return WritableStreamInterface $dest stream as-is
     */
    public function pipe(WritableStreamInterface $dest, array $options = array());
    /**
     * Closes the stream (forcefully).
     *
     * This method can be used to (forcefully) close the stream.
     *
     * ```php
     * $stream->close();
     * ```
     *
     * Once the stream is closed, it SHOULD emit a `close` event.
     * Note that this event SHOULD NOT be emitted more than once, in particular
     * if this method is called multiple times.
     *
     * After calling this method, the stream MUST switch into a non-readable
     * mode, see also `isReadable()`.
     * This means that no further `data` or `end` events SHOULD be emitted.
     *
     * ```php
     * $stream->close();
     * assert($stream->isReadable() === false);
     *
     * $stream->on('data', assertNeverCalled());
     * $stream->on('end', assertNeverCalled());
     * ```
     *
     * If this stream is a `DuplexStreamInterface`, you should also notice
     * how the writable side of the stream also implements a `close()` method.
     * In other words, after calling this method, the stream MUST switch into
     * non-writable AND non-readable mode, see also `isWritable()`.
     * Note that this method should not be confused with the `end()` method.
     *
     * @return void
     * @see WritableStreamInterface::close()
     */
    public function close();
}
<?php

namespace _PHPStan_dcc7b7cff\React\Stream;

use _PHPStan_dcc7b7cff\Evenement\EventEmitterInterface;
/**
 * The `WritableStreamInterface` is responsible for providing an interface for
 * write-only streams and the writable side of duplex streams.
 *
 * Besides defining a few methods, this interface also implements the
 * `EventEmitterInterface` which allows you to react to certain events:
 *
 * drain event:
 *     The `drain` event will be emitted whenever the write buffer became full
 *     previously and is now ready to accept more data.
 *
 *     ```php
 *     $stream->on('drain', function () use ($stream) {
 *         echo 'Stream is now ready to accept more data';
 *     });
 *     ```
 *
 *     This event SHOULD be emitted once every time the buffer became full
 *     previously and is now ready to accept more data.
 *     In other words, this event MAY be emitted any number of times, which may
 *     be zero times if the buffer never became full in the first place.
 *     This event SHOULD NOT be emitted if the buffer has not become full
 *     previously.
 *
 *     This event is mostly used internally, see also `write()` for more details.
 *
 * pipe event:
 *     The `pipe` event will be emitted whenever a readable stream is `pipe()`d
 *     into this stream.
 *     The event receives a single `ReadableStreamInterface` argument for the
 *     source stream.
 *
 *     ```php
 *     $stream->on('pipe', function (ReadableStreamInterface $source) use ($stream) {
 *         echo 'Now receiving piped data';
 *
 *         // explicitly close target if source emits an error
 *         $source->on('error', function () use ($stream) {
 *             $stream->close();
 *         });
 *     });
 *
 *     $source->pipe($stream);
 *     ```
 *
 *     This event MUST be emitted once for each readable stream that is
 *     successfully piped into this destination stream.
 *     In other words, this event MAY be emitted any number of times, which may
 *     be zero times if no stream is ever piped into this stream.
 *     This event MUST NOT be emitted if either the source is not readable
 *     (closed already) or this destination is not writable (closed already).
 *
 *     This event is mostly used internally, see also `pipe()` for more details.
 *
 * error event:
 *     The `error` event will be emitted once a fatal error occurs, usually while
 *     trying to write to this stream.
 *     The event receives a single `Exception` argument for the error instance.
 *
 *     ```php
 *     $stream->on('error', function (Exception $e) {
 *         echo 'Error: ' . $e->getMessage() . PHP_EOL;
 *     });
 *     ```
 *
 *     This event SHOULD be emitted once the stream detects a fatal error, such
 *     as a fatal transmission error.
 *     It SHOULD NOT be emitted after a previous `error` or `close` event.
 *     It MUST NOT be emitted if this is not a fatal error condition, such as
 *     a temporary network issue that did not cause any data to be lost.
 *
 *     After the stream errors, it MUST close the stream and SHOULD thus be
 *     followed by a `close` event and then switch to non-writable mode, see
 *     also `close()` and `isWritable()`.
 *
 *     Many common streams (such as a TCP/IP connection or a file-based stream)
 *     only deal with data transmission and may choose
 *     to only emit this for a fatal transmission error once and will then
 *     close (terminate) the stream in response.
 *
 *     If this stream is a `DuplexStreamInterface`, you should also notice
 *     how the readable side of the stream also implements an `error` event.
 *     In other words, an error may occur while either reading or writing the
 *     stream which should result in the same error processing.
 *
 * close event:
 *     The `close` event will be emitted once the stream closes (terminates).
 *
 *     ```php
 *     $stream->on('close', function () {
 *         echo 'CLOSED';
 *     });
 *     ```
 *
 *     This event SHOULD be emitted once or never at all, depending on whether
 *     the stream ever terminates.
 *     It SHOULD NOT be emitted after a previous `close` event.
 *
 *     After the stream is closed, it MUST switch to non-writable mode,
 *     see also `isWritable()`.
 *
 *     This event SHOULD be emitted whenever the stream closes, irrespective of
 *     whether this happens implicitly due to an unrecoverable error or
 *     explicitly when either side closes the stream.
 *
 *     Many common streams (such as a TCP/IP connection or a file-based stream)
 *     will likely choose to emit this event after flushing the buffer from
 *     the `end()` method, after receiving a *successful* `end` event or after
 *     a fatal transmission `error` event.
 *
 *     If this stream is a `DuplexStreamInterface`, you should also notice
 *     how the readable side of the stream also implements a `close` event.
 *     In other words, after receiving this event, the stream MUST switch into
 *     non-writable AND non-readable mode, see also `isReadable()`.
 *     Note that this event should not be confused with the `end` event.
 *
 * The event callback functions MUST be a valid `callable` that obeys strict
 * parameter definitions and MUST accept event parameters exactly as documented.
 * The event callback functions MUST NOT throw an `Exception`.
 * The return value of the event callback functions will be ignored and has no
 * effect, so for performance reasons you're recommended to not return any
 * excessive data structures.
 *
 * Every implementation of this interface MUST follow these event semantics in
 * order to be considered a well-behaving stream.
 *
 * > Note that higher-level implementations of this interface may choose to
 *   define additional events with dedicated semantics not defined as part of
 *   this low-level stream specification. Conformance with these event semantics
 *   is out of scope for this interface, so you may also have to refer to the
 *   documentation of such a higher-level implementation.
 *
 * @see EventEmitterInterface
 * @see DuplexStreamInterface
 */
interface WritableStreamInterface extends EventEmitterInterface
{
    /**
     * Checks whether this stream is in a writable state (not closed already).
     *
     * This method can be used to check if the stream still accepts writing
     * any data or if it is ended or closed already.
     * Writing any data to a non-writable stream is a NO-OP:
     *
     * ```php
     * assert($stream->isWritable() === false);
     *
     * $stream->write('end'); // NO-OP
     * $stream->end('end'); // NO-OP
     * ```
     *
     * A successfully opened stream always MUST start in writable mode.
     *
     * Once the stream ends or closes, it MUST switch to non-writable mode.
     * This can happen any time, explicitly through `end()` or `close()` or
     * implicitly due to a remote close or an unrecoverable transmission error.
     * Once a stream has switched to non-writable mode, it MUST NOT transition
     * back to writable mode.
     *
     * If this stream is a `DuplexStreamInterface`, you should also notice
     * how the readable side of the stream also implements an `isReadable()`
     * method. Unless this is a half-open duplex stream, they SHOULD usually
     * have the same return value.
     *
     * @return bool
     */
    public function isWritable();
    /**
     * Write some data into the stream.
     *
     * A successful write MUST be confirmed with a boolean `true`, which means
     * that either the data was written (flushed) immediately or is buffered and
     * scheduled for a future write. Note that this interface gives you no
     * control over explicitly flushing the buffered data, as finding the
     * appropriate time for this is beyond the scope of this interface and left
     * up to the implementation of this interface.
     *
     * Many common streams (such as a TCP/IP connection or file-based stream)
     * may choose to buffer all given data and schedule a future flush by using
     * an underlying EventLoop to check when the resource is actually writable.
     *
     * If a stream cannot handle writing (or flushing) the data, it SHOULD emit
     * an `error` event and MAY `close()` the stream if it can not recover from
     * this error.
     *
     * If the internal buffer is full after adding `$data`, then `write()`
     * SHOULD return `false`, indicating that the caller should stop sending
     * data until the buffer drains.
     * The stream SHOULD send a `drain` event once the buffer is ready to accept
     * more data.
     *
     * Similarly, if the the stream is not writable (already in a closed state)
     * it MUST NOT process the given `$data` and SHOULD return `false`,
     * indicating that the caller should stop sending data.
     *
     * The given `$data` argument MAY be of mixed type, but it's usually
     * recommended it SHOULD be a `string` value or MAY use a type that allows
     * representation as a `string` for maximum compatibility.
     *
     * Many common streams (such as a TCP/IP connection or a file-based stream)
     * will only accept the raw (binary) payload data that is transferred over
     * the wire as chunks of `string` values.
     *
     * Due to the stream-based nature of this, the sender may send any number
     * of chunks with varying sizes. There are no guarantees that these chunks
     * will be received with the exact same framing the sender intended to send.
     * In other words, many lower-level protocols (such as TCP/IP) transfer the
     * data in chunks that may be anywhere between single-byte values to several
     * dozens of kilobytes. You may want to apply a higher-level protocol to
     * these low-level data chunks in order to achieve proper message framing.
     *
     * @param mixed|string $data
     * @return bool
     */
    public function write($data);
    /**
     * Successfully ends the stream (after optionally sending some final data).
     *
     * This method can be used to successfully end the stream, i.e. close
     * the stream after sending out all data that is currently buffered.
     *
     * ```php
     * $stream->write('hello');
     * $stream->write('world');
     * $stream->end();
     * ```
     *
     * If there's no data currently buffered and nothing to be flushed, then
     * this method MAY `close()` the stream immediately.
     *
     * If there's still data in the buffer that needs to be flushed first, then
     * this method SHOULD try to write out this data and only then `close()`
     * the stream.
     * Once the stream is closed, it SHOULD emit a `close` event.
     *
     * Note that this interface gives you no control over explicitly flushing
     * the buffered data, as finding the appropriate time for this is beyond the
     * scope of this interface and left up to the implementation of this
     * interface.
     *
     * Many common streams (such as a TCP/IP connection or file-based stream)
     * may choose to buffer all given data and schedule a future flush by using
     * an underlying EventLoop to check when the resource is actually writable.
     *
     * You can optionally pass some final data that is written to the stream
     * before ending the stream. If a non-`null` value is given as `$data`, then
     * this method will behave just like calling `write($data)` before ending
     * with no data.
     *
     * ```php
     * // shorter version
     * $stream->end('bye');
     *
     * // same as longer version
     * $stream->write('bye');
     * $stream->end();
     * ```
     *
     * After calling this method, the stream MUST switch into a non-writable
     * mode, see also `isWritable()`.
     * This means that no further writes are possible, so any additional
     * `write()` or `end()` calls have no effect.
     *
     * ```php
     * $stream->end();
     * assert($stream->isWritable() === false);
     *
     * $stream->write('nope'); // NO-OP
     * $stream->end(); // NO-OP
     * ```
     *
     * If this stream is a `DuplexStreamInterface`, calling this method SHOULD
     * also end its readable side, unless the stream supports half-open mode.
     * In other words, after calling this method, these streams SHOULD switch
     * into non-writable AND non-readable mode, see also `isReadable()`.
     * This implies that in this case, the stream SHOULD NOT emit any `data`
     * or `end` events anymore.
     * Streams MAY choose to use the `pause()` method logic for this, but
     * special care may have to be taken to ensure a following call to the
     * `resume()` method SHOULD NOT continue emitting readable events.
     *
     * Note that this method should not be confused with the `close()` method.
     *
     * @param mixed|string|null $data
     * @return void
     */
    public function end($data = null);
    /**
     * Closes the stream (forcefully).
     *
     * This method can be used to forcefully close the stream, i.e. close
     * the stream without waiting for any buffered data to be flushed.
     * If there's still data in the buffer, this data SHOULD be discarded.
     *
     * ```php
     * $stream->close();
     * ```
     *
     * Once the stream is closed, it SHOULD emit a `close` event.
     * Note that this event SHOULD NOT be emitted more than once, in particular
     * if this method is called multiple times.
     *
     * After calling this method, the stream MUST switch into a non-writable
     * mode, see also `isWritable()`.
     * This means that no further writes are possible, so any additional
     * `write()` or `end()` calls have no effect.
     *
     * ```php
     * $stream->close();
     * assert($stream->isWritable() === false);
     *
     * $stream->write('nope'); // NO-OP
     * $stream->end(); // NO-OP
     * ```
     *
     * Note that this method should not be confused with the `end()` method.
     * Unlike the `end()` method, this method does not take care of any existing
     * buffers and simply discards any buffer contents.
     * Likewise, this method may also be called after calling `end()` on a
     * stream in order to stop waiting for the stream to flush its final data.
     *
     * ```php
     * $stream->end();
     * Loop::addTimer(1.0, function () use ($stream) {
     *     $stream->close();
     * });
     * ```
     *
     * If this stream is a `DuplexStreamInterface`, you should also notice
     * how the readable side of the stream also implements a `close()` method.
     * In other words, after calling this method, the stream MUST switch into
     * non-writable AND non-readable mode, see also `isReadable()`.
     *
     * @return void
     * @see ReadableStreamInterface::close()
     */
    public function close();
}
<?php

namespace _PHPStan_dcc7b7cff\React\Stream;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
use _PHPStan_dcc7b7cff\React\EventLoop\Loop;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use InvalidArgumentException;
final class DuplexResourceStream extends EventEmitter implements DuplexStreamInterface
{
    private $stream;
    /** @var LoopInterface */
    private $loop;
    /**
     * Controls the maximum buffer size in bytes to read at once from the stream.
     *
     * This can be a positive number which means that up to X bytes will be read
     * at once from the underlying stream resource. Note that the actual number
     * of bytes read may be lower if the stream resource has less than X bytes
     * currently available.
     *
     * This can be `-1` which means read everything available from the
     * underlying stream resource.
     * This should read until the stream resource is not readable anymore
     * (i.e. underlying buffer drained), note that this does not neccessarily
     * mean it reached EOF.
     *
     * @var int
     */
    private $bufferSize;
    private $buffer;
    private $readable = \true;
    private $writable = \true;
    private $closing = \false;
    private $listening = \false;
    public function __construct($stream, LoopInterface $loop = null, $readChunkSize = null, WritableStreamInterface $buffer = null)
    {
        if (!\is_resource($stream) || \get_resource_type($stream) !== "stream") {
            throw new InvalidArgumentException('First parameter must be a valid stream resource');
        }
        // ensure resource is opened for reading and wrting (fopen mode must contain "+")
        $meta = \stream_get_meta_data($stream);
        if (isset($meta['mode']) && $meta['mode'] !== '' && \strpos($meta['mode'], '+') === \false) {
            throw new InvalidArgumentException('Given stream resource is not opened in read and write mode');
        }
        // this class relies on non-blocking I/O in order to not interrupt the event loop
        // e.g. pipes on Windows do not support this: https://bugs.php.net/bug.php?id=47918
        if (\stream_set_blocking($stream, \false) !== \true) {
            throw new \RuntimeException('Unable to set stream resource to non-blocking mode');
        }
        // Use unbuffered read operations on the underlying stream resource.
        // Reading chunks from the stream may otherwise leave unread bytes in
        // PHP's stream buffers which some event loop implementations do not
        // trigger events on (edge triggered).
        // This does not affect the default event loop implementation (level
        // triggered), so we can ignore platforms not supporting this (HHVM).
        // Pipe streams (such as STDIN) do not seem to require this and legacy
        // PHP versions cause SEGFAULTs on unbuffered pipe streams, so skip this.
        if (\function_exists('stream_set_read_buffer') && !$this->isLegacyPipe($stream)) {
            \stream_set_read_buffer($stream, 0);
        }
        if ($buffer === null) {
            $buffer = new WritableResourceStream($stream, $loop);
        }
        $this->stream = $stream;
        $this->loop = $loop ?: Loop::get();
        $this->bufferSize = $readChunkSize === null ? 65536 : (int) $readChunkSize;
        $this->buffer = $buffer;
        $that = $this;
        $this->buffer->on('error', function ($error) use($that) {
            $that->emit('error', array($error));
        });
        $this->buffer->on('close', array($this, 'close'));
        $this->buffer->on('drain', function () use($that) {
            $that->emit('drain');
        });
        $this->resume();
    }
    public function isReadable()
    {
        return $this->readable;
    }
    public function isWritable()
    {
        return $this->writable;
    }
    public function pause()
    {
        if ($this->listening) {
            $this->loop->removeReadStream($this->stream);
            $this->listening = \false;
        }
    }
    public function resume()
    {
        if (!$this->listening && $this->readable) {
            $this->loop->addReadStream($this->stream, array($this, 'handleData'));
            $this->listening = \true;
        }
    }
    public function write($data)
    {
        if (!$this->writable) {
            return \false;
        }
        return $this->buffer->write($data);
    }
    public function close()
    {
        if (!$this->writable && !$this->closing) {
            return;
        }
        $this->closing = \false;
        $this->readable = \false;
        $this->writable = \false;
        $this->emit('close');
        $this->pause();
        $this->buffer->close();
        $this->removeAllListeners();
        if (\is_resource($this->stream)) {
            \fclose($this->stream);
        }
    }
    public function end($data = null)
    {
        if (!$this->writable) {
            return;
        }
        $this->closing = \true;
        $this->readable = \false;
        $this->writable = \false;
        $this->pause();
        $this->buffer->end($data);
    }
    public function pipe(WritableStreamInterface $dest, array $options = array())
    {
        return Util::pipe($this, $dest, $options);
    }
    /** @internal */
    public function handleData($stream)
    {
        $error = null;
        \set_error_handler(function ($errno, $errstr, $errfile, $errline) use(&$error) {
            $error = new \ErrorException($errstr, 0, $errno, $errfile, $errline);
        });
        $data = \stream_get_contents($stream, $this->bufferSize);
        \restore_error_handler();
        if ($error !== null) {
            $this->emit('error', array(new \RuntimeException('Unable to read from stream: ' . $error->getMessage(), 0, $error)));
            $this->close();
            return;
        }
        if ($data !== '') {
            $this->emit('data', array($data));
        } elseif (\feof($this->stream)) {
            // no data read => we reached the end and close the stream
            $this->emit('end');
            $this->close();
        }
    }
    /**
     * Returns whether this is a pipe resource in a legacy environment
     *
     * This works around a legacy PHP bug (#61019) that was fixed in PHP 5.4.28+
     * and PHP 5.5.12+ and newer.
     *
     * @param resource $resource
     * @return bool
     * @link https://github.com/reactphp/child-process/issues/40
     *
     * @codeCoverageIgnore
     */
    private function isLegacyPipe($resource)
    {
        if (\PHP_VERSION_ID < 50428 || \PHP_VERSION_ID >= 50500 && \PHP_VERSION_ID < 50512) {
            $meta = \stream_get_meta_data($resource);
            if (isset($meta['stream_type']) && $meta['stream_type'] === 'STDIO') {
                return \true;
            }
        }
        return \false;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Stream;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
final class CompositeStream extends EventEmitter implements DuplexStreamInterface
{
    private $readable;
    private $writable;
    private $closed = \false;
    public function __construct(ReadableStreamInterface $readable, WritableStreamInterface $writable)
    {
        $this->readable = $readable;
        $this->writable = $writable;
        if (!$readable->isReadable() || !$writable->isWritable()) {
            $this->close();
            return;
        }
        Util::forwardEvents($this->readable, $this, array('data', 'end', 'error'));
        Util::forwardEvents($this->writable, $this, array('drain', 'error', 'pipe'));
        $this->readable->on('close', array($this, 'close'));
        $this->writable->on('close', array($this, 'close'));
    }
    public function isReadable()
    {
        return $this->readable->isReadable();
    }
    public function pause()
    {
        $this->readable->pause();
    }
    public function resume()
    {
        if (!$this->writable->isWritable()) {
            return;
        }
        $this->readable->resume();
    }
    public function pipe(WritableStreamInterface $dest, array $options = array())
    {
        return Util::pipe($this, $dest, $options);
    }
    public function isWritable()
    {
        return $this->writable->isWritable();
    }
    public function write($data)
    {
        return $this->writable->write($data);
    }
    public function end($data = null)
    {
        $this->readable->pause();
        $this->writable->end($data);
    }
    public function close()
    {
        if ($this->closed) {
            return;
        }
        $this->closed = \true;
        $this->readable->close();
        $this->writable->close();
        $this->emit('close');
        $this->removeAllListeners();
    }
}
The MIT License (MIT)

Copyright (c) 2012 Christian Lück, Cees-Jan Kiewiet, Jan Sorgalla, Chris Boden, Igor Wiedler

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

namespace _PHPStan_dcc7b7cff\React\Cache;

use _PHPStan_dcc7b7cff\React\Promise;
use _PHPStan_dcc7b7cff\React\Promise\PromiseInterface;
class ArrayCache implements CacheInterface
{
    private $limit;
    private $data = array();
    private $expires = array();
    private $supportsHighResolution;
    /**
     * The `ArrayCache` provides an in-memory implementation of the [`CacheInterface`](#cacheinterface).
     *
     * ```php
     * $cache = new ArrayCache();
     *
     * $cache->set('foo', 'bar');
     * ```
     *
     * Its constructor accepts an optional `?int $limit` parameter to limit the
     * maximum number of entries to store in the LRU cache. If you add more
     * entries to this instance, it will automatically take care of removing
     * the one that was least recently used (LRU).
     *
     * For example, this snippet will overwrite the first value and only store
     * the last two entries:
     *
     * ```php
     * $cache = new ArrayCache(2);
     *
     * $cache->set('foo', '1');
     * $cache->set('bar', '2');
     * $cache->set('baz', '3');
     * ```
     *
     * This cache implementation is known to rely on wall-clock time to schedule
     * future cache expiration times when using any version before PHP 7.3,
     * because a monotonic time source is only available as of PHP 7.3 (`hrtime()`).
     * While this does not affect many common use cases, this is an important
     * distinction for programs that rely on a high time precision or on systems
     * that are subject to discontinuous time adjustments (time jumps).
     * This means that if you store a cache item with a TTL of 30s on PHP < 7.3
     * and then adjust your system time forward by 20s, the cache item may
     * expire in 10s. See also [`set()`](#set) for more details.
     *
     * @param int|null $limit maximum number of entries to store in the LRU cache
     */
    public function __construct($limit = null)
    {
        $this->limit = $limit;
        // prefer high-resolution timer, available as of PHP 7.3+
        $this->supportsHighResolution = \function_exists('hrtime');
    }
    public function get($key, $default = null)
    {
        // delete key if it is already expired => below will detect this as a cache miss
        if (isset($this->expires[$key]) && $this->now() - $this->expires[$key] > 0) {
            unset($this->data[$key], $this->expires[$key]);
        }
        if (!\array_key_exists($key, $this->data)) {
            return Promise\resolve($default);
        }
        // remove and append to end of array to keep track of LRU info
        $value = $this->data[$key];
        unset($this->data[$key]);
        $this->data[$key] = $value;
        return Promise\resolve($value);
    }
    public function set($key, $value, $ttl = null)
    {
        // unset before setting to ensure this entry will be added to end of array (LRU info)
        unset($this->data[$key]);
        $this->data[$key] = $value;
        // sort expiration times if TTL is given (first will expire first)
        unset($this->expires[$key]);
        if ($ttl !== null) {
            $this->expires[$key] = $this->now() + $ttl;
            \asort($this->expires);
        }
        // ensure size limit is not exceeded or remove first entry from array
        if ($this->limit !== null && \count($this->data) > $this->limit) {
            // first try to check if there's any expired entry
            // expiration times are sorted, so we can simply look at the first one
            \reset($this->expires);
            $key = \key($this->expires);
            // check to see if the first in the list of expiring keys is already expired
            // if the first key is not expired, we have to overwrite by using LRU info
            if ($key === null || $this->now() - $this->expires[$key] < 0) {
                \reset($this->data);
                $key = \key($this->data);
            }
            unset($this->data[$key], $this->expires[$key]);
        }
        return Promise\resolve(\true);
    }
    public function delete($key)
    {
        unset($this->data[$key], $this->expires[$key]);
        return Promise\resolve(\true);
    }
    public function getMultiple(array $keys, $default = null)
    {
        $values = array();
        foreach ($keys as $key) {
            $values[$key] = $this->get($key, $default);
        }
        return Promise\all($values);
    }
    public function setMultiple(array $values, $ttl = null)
    {
        foreach ($values as $key => $value) {
            $this->set($key, $value, $ttl);
        }
        return Promise\resolve(\true);
    }
    public function deleteMultiple(array $keys)
    {
        foreach ($keys as $key) {
            unset($this->data[$key], $this->expires[$key]);
        }
        return Promise\resolve(\true);
    }
    public function clear()
    {
        $this->data = array();
        $this->expires = array();
        return Promise\resolve(\true);
    }
    public function has($key)
    {
        // delete key if it is already expired
        if (isset($this->expires[$key]) && $this->now() - $this->expires[$key] > 0) {
            unset($this->data[$key], $this->expires[$key]);
        }
        if (!\array_key_exists($key, $this->data)) {
            return Promise\resolve(\false);
        }
        // remove and append to end of array to keep track of LRU info
        $value = $this->data[$key];
        unset($this->data[$key]);
        $this->data[$key] = $value;
        return Promise\resolve(\true);
    }
    /**
     * @return float
     */
    private function now()
    {
        return $this->supportsHighResolution ? \hrtime(\true) * 1.0E-9 : \microtime(\true);
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Cache;

use _PHPStan_dcc7b7cff\React\Promise\PromiseInterface;
interface CacheInterface
{
    /**
     * Retrieves an item from the cache.
     *
     * This method will resolve with the cached value on success or with the
     * given `$default` value when no item can be found or when an error occurs.
     * Similarly, an expired cache item (once the time-to-live is expired) is
     * considered a cache miss.
     *
     * ```php
     * $cache
     *     ->get('foo')
     *     ->then('var_dump');
     * ```
     *
     * This example fetches the value of the key `foo` and passes it to the
     * `var_dump` function. You can use any of the composition provided by
     * [promises](https://github.com/reactphp/promise).
     *
     * @param string $key
     * @param mixed  $default Default value to return for cache miss or null if not given.
     * @return PromiseInterface<mixed>
     */
    public function get($key, $default = null);
    /**
     * Stores an item in the cache.
     *
     * This method will resolve with `true` on success or `false` when an error
     * occurs. If the cache implementation has to go over the network to store
     * it, it may take a while.
     *
     * The optional `$ttl` parameter sets the maximum time-to-live in seconds
     * for this cache item. If this parameter is omitted (or `null`), the item
     * will stay in the cache for as long as the underlying implementation
     * supports. Trying to access an expired cache item results in a cache miss,
     * see also [`get()`](#get).
     *
     * ```php
     * $cache->set('foo', 'bar', 60);
     * ```
     *
     * This example eventually sets the value of the key `foo` to `bar`. If it
     * already exists, it is overridden.
     *
     * This interface does not enforce any particular TTL resolution, so special
     * care may have to be taken if you rely on very high precision with
     * millisecond accuracy or below. Cache implementations SHOULD work on a
     * best effort basis and SHOULD provide at least second accuracy unless
     * otherwise noted. Many existing cache implementations are known to provide
     * microsecond or millisecond accuracy, but it's generally not recommended
     * to rely on this high precision.
     *
     * This interface suggests that cache implementations SHOULD use a monotonic
     * time source if available. Given that a monotonic time source is only
     * available as of PHP 7.3 by default, cache implementations MAY fall back
     * to using wall-clock time.
     * While this does not affect many common use cases, this is an important
     * distinction for programs that rely on a high time precision or on systems
     * that are subject to discontinuous time adjustments (time jumps).
     * This means that if you store a cache item with a TTL of 30s and then
     * adjust your system time forward by 20s, the cache item SHOULD still
     * expire in 30s.
     *
     * @param string $key
     * @param mixed  $value
     * @param ?float $ttl
     * @return PromiseInterface<bool> Returns a promise which resolves to `true` on success or `false` on error
     */
    public function set($key, $value, $ttl = null);
    /**
     * Deletes an item from the cache.
     *
     * This method will resolve with `true` on success or `false` when an error
     * occurs. When no item for `$key` is found in the cache, it also resolves
     * to `true`. If the cache implementation has to go over the network to
     * delete it, it may take a while.
     *
     * ```php
     * $cache->delete('foo');
     * ```
     *
     * This example eventually deletes the key `foo` from the cache. As with
     * `set()`, this may not happen instantly and a promise is returned to
     * provide guarantees whether or not the item has been removed from cache.
     *
     * @param string $key
     * @return PromiseInterface<bool> Returns a promise which resolves to `true` on success or `false` on error
     */
    public function delete($key);
    /**
     * Retrieves multiple cache items by their unique keys.
     *
     * This method will resolve with an array of cached values on success or with the
     * given `$default` value when an item can not be found or when an error occurs.
     * Similarly, an expired cache item (once the time-to-live is expired) is
     * considered a cache miss.
     *
     * ```php
     * $cache->getMultiple(array('name', 'age'))->then(function (array $values) {
     *     $name = $values['name'] ?? 'User';
     *     $age = $values['age'] ?? 'n/a';
     *
     *     echo $name . ' is ' . $age . PHP_EOL;
     * });
     * ```
     *
     * This example fetches the cache items for the `name` and `age` keys and
     * prints some example output. You can use any of the composition provided
     * by [promises](https://github.com/reactphp/promise).
     *
     * @param string[] $keys A list of keys that can obtained in a single operation.
     * @param mixed $default Default value to return for keys that do not exist.
     * @return PromiseInterface<array> Returns a promise which resolves to an `array` of cached values
     */
    public function getMultiple(array $keys, $default = null);
    /**
     * Persists a set of key => value pairs in the cache, with an optional TTL.
     *
     * This method will resolve with `true` on success or `false` when an error
     * occurs. If the cache implementation has to go over the network to store
     * it, it may take a while.
     *
     * The optional `$ttl` parameter sets the maximum time-to-live in seconds
     * for these cache items. If this parameter is omitted (or `null`), these items
     * will stay in the cache for as long as the underlying implementation
     * supports. Trying to access an expired cache items results in a cache miss,
     * see also [`get()`](#get).
     *
     * ```php
     * $cache->setMultiple(array('foo' => 1, 'bar' => 2), 60);
     * ```
     *
     * This example eventually sets the list of values - the key `foo` to 1 value
     * and the key `bar` to 2. If some of the keys already exist, they are overridden.
     *
     * @param array  $values A list of key => value pairs for a multiple-set operation.
     * @param ?float $ttl    Optional. The TTL value of this item.
     * @return PromiseInterface<bool> Returns a promise which resolves to `true` on success or `false` on error
     */
    public function setMultiple(array $values, $ttl = null);
    /**
     * Deletes multiple cache items in a single operation.
     *
     * @param string[] $keys A list of string-based keys to be deleted.
     * @return PromiseInterface<bool> Returns a promise which resolves to `true` on success or `false` on error
     */
    public function deleteMultiple(array $keys);
    /**
     * Wipes clean the entire cache.
     *
     * @return PromiseInterface<bool> Returns a promise which resolves to `true` on success or `false` on error
     */
    public function clear();
    /**
     * Determines whether an item is present in the cache.
     *
     * This method will resolve with `true` on success or `false` when no item can be found
     * or when an error occurs. Similarly, an expired cache item (once the time-to-live
     * is expired) is considered a cache miss.
     *
     * ```php
     * $cache
     *     ->has('foo')
     *     ->then('var_dump');
     * ```
     *
     * This example checks if the value of the key `foo` is set in the cache and passes
     * the result to the `var_dump` function. You can use any of the composition provided by
     * [promises](https://github.com/reactphp/promise).
     *
     * NOTE: It is recommended that has() is only to be used for cache warming type purposes
     * and not to be used within your live applications operations for get/set, as this method
     * is subject to a race condition where your has() will return true and immediately after,
     * another script can remove it making the state of your app out of date.
     *
     * @param string $key The cache item key.
     * @return PromiseInterface<bool> Returns a promise which resolves to `true` on success or `false` on error
     */
    public function has($key);
}
The MIT License (MIT)

Copyright (c) 2012 Christian Lück, Cees-Jan Kiewiet, Jan Sorgalla, Chris Boden, Igor Wiedler

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

namespace _PHPStan_dcc7b7cff\React\ChildProcess;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
use _PHPStan_dcc7b7cff\React\EventLoop\Loop;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use _PHPStan_dcc7b7cff\React\Stream\ReadableResourceStream;
use _PHPStan_dcc7b7cff\React\Stream\ReadableStreamInterface;
use _PHPStan_dcc7b7cff\React\Stream\WritableResourceStream;
use _PHPStan_dcc7b7cff\React\Stream\WritableStreamInterface;
use _PHPStan_dcc7b7cff\React\Stream\DuplexResourceStream;
use _PHPStan_dcc7b7cff\React\Stream\DuplexStreamInterface;
/**
 * Process component.
 *
 * This class borrows logic from Symfony's Process component for ensuring
 * compatibility when PHP is compiled with the --enable-sigchild option.
 *
 * This class also implements the `EventEmitterInterface`
 * which allows you to react to certain events:
 *
 * exit event:
 *     The `exit` event will be emitted whenever the process is no longer running.
 *     Event listeners will receive the exit code and termination signal as two
 *     arguments:
 *
 *     ```php
 *     $process = new Process('sleep 10');
 *     $process->start();
 *
 *     $process->on('exit', function ($code, $term) {
 *         if ($term === null) {
 *             echo 'exit with code ' . $code . PHP_EOL;
 *         } else {
 *             echo 'terminated with signal ' . $term . PHP_EOL;
 *         }
 *     });
 *     ```
 *
 *     Note that `$code` is `null` if the process has terminated, but the exit
 *     code could not be determined (for example
 *     [sigchild compatibility](#sigchild-compatibility) was disabled).
 *     Similarly, `$term` is `null` unless the process has terminated in response to
 *     an uncaught signal sent to it.
 *     This is not a limitation of this project, but actual how exit codes and signals
 *     are exposed on POSIX systems, for more details see also
 *     [here](https://unix.stackexchange.com/questions/99112/default-exit-code-when-process-is-terminated).
 *
 *     It's also worth noting that process termination depends on all file descriptors
 *     being closed beforehand.
 *     This means that all [process pipes](#stream-properties) will emit a `close`
 *     event before the `exit` event and that no more `data` events will arrive after
 *     the `exit` event.
 *     Accordingly, if either of these pipes is in a paused state (`pause()` method
 *     or internally due to a `pipe()` call), this detection may not trigger.
 */
class Process extends EventEmitter
{
    /**
     * @var WritableStreamInterface|null|DuplexStreamInterface|ReadableStreamInterface
     */
    public $stdin;
    /**
     * @var ReadableStreamInterface|null|DuplexStreamInterface|WritableStreamInterface
     */
    public $stdout;
    /**
     * @var ReadableStreamInterface|null|DuplexStreamInterface|WritableStreamInterface
     */
    public $stderr;
    /**
     * Array with all process pipes (once started)
     *
     * Unless explicitly configured otherwise during construction, the following
     * standard I/O pipes will be assigned by default:
     * - 0: STDIN (`WritableStreamInterface`)
     * - 1: STDOUT (`ReadableStreamInterface`)
     * - 2: STDERR (`ReadableStreamInterface`)
     *
     * @var array<ReadableStreamInterface|WritableStreamInterface|DuplexStreamInterface>
     */
    public $pipes = array();
    private $cmd;
    private $cwd;
    private $env;
    private $fds;
    private $enhanceSigchildCompatibility;
    private $sigchildPipe;
    private $process;
    private $status;
    private $exitCode;
    private $fallbackExitCode;
    private $stopSignal;
    private $termSignal;
    private static $sigchild;
    /**
     * Constructor.
     *
     * @param string $cmd      Command line to run
     * @param null|string $cwd Current working directory or null to inherit
     * @param null|array  $env Environment variables or null to inherit
     * @param null|array  $fds File descriptors to allocate for this process (or null = default STDIO streams)
     * @throws \LogicException On windows or when proc_open() is not installed
     */
    public function __construct($cmd, $cwd = null, array $env = null, array $fds = null)
    {
        if (!\function_exists('proc_open')) {
            throw new \LogicException('The Process class relies on proc_open(), which is not available on your PHP installation.');
        }
        $this->cmd = $cmd;
        $this->cwd = $cwd;
        if (null !== $env) {
            $this->env = array();
            foreach ($env as $key => $value) {
                $this->env[(string) $key] = (string) $value;
            }
        }
        if ($fds === null) {
            $fds = array(
                array('pipe', 'r'),
                // stdin
                array('pipe', 'w'),
                // stdout
                array('pipe', 'w'),
            );
        }
        if (\DIRECTORY_SEPARATOR === '\\') {
            foreach ($fds as $fd) {
                if (isset($fd[0]) && $fd[0] === 'pipe') {
                    throw new \LogicException('Process pipes are not supported on Windows due to their blocking nature on Windows');
                }
            }
        }
        $this->fds = $fds;
        $this->enhanceSigchildCompatibility = self::isSigchildEnabled();
    }
    /**
     * Start the process.
     *
     * After the process is started, the standard I/O streams will be constructed
     * and available via public properties.
     *
     * This method takes an optional `LoopInterface|null $loop` parameter that can be used to
     * pass the event loop instance to use for this process. You can use a `null` value
     * here in order to use the [default loop](https://github.com/reactphp/event-loop#loop).
     * This value SHOULD NOT be given unless you're sure you want to explicitly use a
     * given event loop instance.
     *
     * @param ?LoopInterface $loop        Loop interface for stream construction
     * @param float          $interval    Interval to periodically monitor process state (seconds)
     * @throws \RuntimeException If the process is already running or fails to start
     */
    public function start(LoopInterface $loop = null, $interval = 0.1)
    {
        if ($this->isRunning()) {
            throw new \RuntimeException('Process is already running');
        }
        $loop = $loop ?: Loop::get();
        $cmd = $this->cmd;
        $fdSpec = $this->fds;
        $sigchild = null;
        // Read exit code through fourth pipe to work around --enable-sigchild
        if ($this->enhanceSigchildCompatibility) {
            $fdSpec[] = array('pipe', 'w');
            \end($fdSpec);
            $sigchild = \key($fdSpec);
            // make sure this is fourth or higher (do not mess with STDIO)
            if ($sigchild < 3) {
                $fdSpec[3] = $fdSpec[$sigchild];
                unset($fdSpec[$sigchild]);
                $sigchild = 3;
            }
            $cmd = \sprintf('(%s) ' . $sigchild . '>/dev/null; code=$?; echo $code >&' . $sigchild . '; exit $code', $cmd);
        }
        // on Windows, we do not launch the given command line in a shell (cmd.exe) by default and omit any error dialogs
        // the cmd.exe shell can explicitly be given as part of the command as detailed in both documentation and tests
        $options = array();
        if (\DIRECTORY_SEPARATOR === '\\') {
            $options['bypass_shell'] = \true;
            $options['suppress_errors'] = \true;
        }
        $errstr = '';
        \set_error_handler(function ($_, $error) use(&$errstr) {
            // Match errstr from PHP's warning message.
            // proc_open(/dev/does-not-exist): Failed to open stream: No such file or directory
            $errstr = $error;
        });
        $pipes = array();
        $this->process = @\proc_open($cmd, $fdSpec, $pipes, $this->cwd, $this->env, $options);
        \restore_error_handler();
        if (!\is_resource($this->process)) {
            throw new \RuntimeException('Unable to launch a new process: ' . $errstr);
        }
        // count open process pipes and await close event for each to drain buffers before detecting exit
        $that = $this;
        $closeCount = 0;
        $streamCloseHandler = function () use(&$closeCount, $loop, $interval, $that) {
            $closeCount--;
            if ($closeCount > 0) {
                return;
            }
            // process already closed => report immediately
            if (!$that->isRunning()) {
                $that->close();
                $that->emit('exit', array($that->getExitCode(), $that->getTermSignal()));
                return;
            }
            // close not detected immediately => check regularly
            $loop->addPeriodicTimer($interval, function ($timer) use($that, $loop) {
                if (!$that->isRunning()) {
                    $loop->cancelTimer($timer);
                    $that->close();
                    $that->emit('exit', array($that->getExitCode(), $that->getTermSignal()));
                }
            });
        };
        if ($sigchild !== null) {
            $this->sigchildPipe = $pipes[$sigchild];
            unset($pipes[$sigchild]);
        }
        foreach ($pipes as $n => $fd) {
            // use open mode from stream meta data or fall back to pipe open mode for legacy HHVM
            $meta = \stream_get_meta_data($fd);
            $mode = $meta['mode'] === '' ? $this->fds[$n][1] === 'r' ? 'w' : 'r' : $meta['mode'];
            if ($mode === 'r+') {
                $stream = new DuplexResourceStream($fd, $loop);
                $stream->on('close', $streamCloseHandler);
                $closeCount++;
            } elseif ($mode === 'w') {
                $stream = new WritableResourceStream($fd, $loop);
            } else {
                $stream = new ReadableResourceStream($fd, $loop);
                $stream->on('close', $streamCloseHandler);
                $closeCount++;
            }
            $this->pipes[$n] = $stream;
        }
        $this->stdin = isset($this->pipes[0]) ? $this->pipes[0] : null;
        $this->stdout = isset($this->pipes[1]) ? $this->pipes[1] : null;
        $this->stderr = isset($this->pipes[2]) ? $this->pipes[2] : null;
        // immediately start checking for process exit when started without any I/O pipes
        if (!$closeCount) {
            $streamCloseHandler();
        }
    }
    /**
     * Close the process.
     *
     * This method should only be invoked via the periodic timer that monitors
     * the process state.
     */
    public function close()
    {
        if ($this->process === null) {
            return;
        }
        foreach ($this->pipes as $pipe) {
            $pipe->close();
        }
        if ($this->enhanceSigchildCompatibility) {
            $this->pollExitCodePipe();
            $this->closeExitCodePipe();
        }
        $exitCode = \proc_close($this->process);
        $this->process = null;
        if ($this->exitCode === null && $exitCode !== -1) {
            $this->exitCode = $exitCode;
        }
        if ($this->exitCode === null && $this->status['exitcode'] !== -1) {
            $this->exitCode = $this->status['exitcode'];
        }
        if ($this->exitCode === null && $this->fallbackExitCode !== null) {
            $this->exitCode = $this->fallbackExitCode;
            $this->fallbackExitCode = null;
        }
    }
    /**
     * Terminate the process with an optional signal.
     *
     * @param int $signal Optional signal (default: SIGTERM)
     * @return bool Whether the signal was sent successfully
     */
    public function terminate($signal = null)
    {
        if ($this->process === null) {
            return \false;
        }
        if ($signal !== null) {
            return \proc_terminate($this->process, $signal);
        }
        return \proc_terminate($this->process);
    }
    /**
     * Get the command string used to launch the process.
     *
     * @return string
     */
    public function getCommand()
    {
        return $this->cmd;
    }
    /**
     * Get the exit code returned by the process.
     *
     * This value is only meaningful if isRunning() has returned false. Null
     * will be returned if the process is still running.
     *
     * Null may also be returned if the process has terminated, but the exit
     * code could not be determined (e.g. sigchild compatibility was disabled).
     *
     * @return int|null
     */
    public function getExitCode()
    {
        return $this->exitCode;
    }
    /**
     * Get the process ID.
     *
     * @return int|null
     */
    public function getPid()
    {
        $status = $this->getCachedStatus();
        return $status !== null ? $status['pid'] : null;
    }
    /**
     * Get the signal that caused the process to stop its execution.
     *
     * This value is only meaningful if isStopped() has returned true. Null will
     * be returned if the process was never stopped.
     *
     * @return int|null
     */
    public function getStopSignal()
    {
        return $this->stopSignal;
    }
    /**
     * Get the signal that caused the process to terminate its execution.
     *
     * This value is only meaningful if isTerminated() has returned true. Null
     * will be returned if the process was never terminated.
     *
     * @return int|null
     */
    public function getTermSignal()
    {
        return $this->termSignal;
    }
    /**
     * Return whether the process is still running.
     *
     * @return bool
     */
    public function isRunning()
    {
        if ($this->process === null) {
            return \false;
        }
        $status = $this->getFreshStatus();
        return $status !== null ? $status['running'] : \false;
    }
    /**
     * Return whether the process has been stopped by a signal.
     *
     * @return bool
     */
    public function isStopped()
    {
        $status = $this->getFreshStatus();
        return $status !== null ? $status['stopped'] : \false;
    }
    /**
     * Return whether the process has been terminated by an uncaught signal.
     *
     * @return bool
     */
    public function isTerminated()
    {
        $status = $this->getFreshStatus();
        return $status !== null ? $status['signaled'] : \false;
    }
    /**
     * Return whether PHP has been compiled with the '--enable-sigchild' option.
     *
     * @see \Symfony\Component\Process\Process::isSigchildEnabled()
     * @return bool
     */
    public static final function isSigchildEnabled()
    {
        if (null !== self::$sigchild) {
            return self::$sigchild;
        }
        if (!\function_exists('phpinfo')) {
            return self::$sigchild = \false;
            // @codeCoverageIgnore
        }
        \ob_start();
        \phpinfo(\INFO_GENERAL);
        return self::$sigchild = \false !== \strpos(\ob_get_clean(), '--enable-sigchild');
    }
    /**
     * Enable or disable sigchild compatibility mode.
     *
     * Sigchild compatibility mode is required to get the exit code and
     * determine the success of a process when PHP has been compiled with
     * the --enable-sigchild option.
     *
     * @param bool $sigchild
     * @return void
     */
    public static final function setSigchildEnabled($sigchild)
    {
        self::$sigchild = (bool) $sigchild;
    }
    /**
     * Check the fourth pipe for an exit code.
     *
     * This should only be used if --enable-sigchild compatibility was enabled.
     */
    private function pollExitCodePipe()
    {
        if ($this->sigchildPipe === null) {
            return;
        }
        $r = array($this->sigchildPipe);
        $w = $e = null;
        $n = @\stream_select($r, $w, $e, 0);
        if (1 !== $n) {
            return;
        }
        $data = \fread($r[0], 8192);
        if (\strlen($data) > 0) {
            $this->fallbackExitCode = (int) $data;
        }
    }
    /**
     * Close the fourth pipe used to relay an exit code.
     *
     * This should only be used if --enable-sigchild compatibility was enabled.
     */
    private function closeExitCodePipe()
    {
        if ($this->sigchildPipe === null) {
            return;
        }
        \fclose($this->sigchildPipe);
        $this->sigchildPipe = null;
    }
    /**
     * Return the cached process status.
     *
     * @return array
     */
    private function getCachedStatus()
    {
        if ($this->status === null) {
            $this->updateStatus();
        }
        return $this->status;
    }
    /**
     * Return the updated process status.
     *
     * @return array
     */
    private function getFreshStatus()
    {
        $this->updateStatus();
        return $this->status;
    }
    /**
     * Update the process status, stop/term signals, and exit code.
     *
     * Stop/term signals are only updated if the process is currently stopped or
     * signaled, respectively. Otherwise, signal values will remain as-is so the
     * corresponding getter methods may be used at a later point in time.
     */
    private function updateStatus()
    {
        if ($this->process === null) {
            return;
        }
        $this->status = \proc_get_status($this->process);
        if ($this->status === \false) {
            throw new \UnexpectedValueException('proc_get_status() failed');
        }
        if ($this->status['stopped']) {
            $this->stopSignal = $this->status['stopsig'];
        }
        if ($this->status['signaled']) {
            $this->termSignal = $this->status['termsig'];
        }
        if (!$this->status['running'] && -1 !== $this->status['exitcode']) {
            $this->exitCode = $this->status['exitcode'];
        }
    }
}
The MIT License (MIT)

Copyright (c) 2012 Christian Lück, Cees-Jan Kiewiet, Jan Sorgalla, Chris Boden, Igor Wiedler

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

namespace _PHPStan_dcc7b7cff\React\Async;

// @codeCoverageIgnoreStart
if (!\function_exists(__NAMESPACE__ . '\\parallel')) {
    require __DIR__ . '/functions.php';
}
<?php

namespace _PHPStan_dcc7b7cff\React\Async;

use _PHPStan_dcc7b7cff\React\EventLoop\Loop;
use _PHPStan_dcc7b7cff\React\Promise\Deferred;
use _PHPStan_dcc7b7cff\React\Promise\PromiseInterface;
use function _PHPStan_dcc7b7cff\React\Promise\reject;
use function _PHPStan_dcc7b7cff\React\Promise\resolve;
/**
 * Block waiting for the given `$promise` to be fulfilled.
 *
 * ```php
 * $result = React\Async\await($promise, $loop);
 * ```
 *
 * This function will only return after the given `$promise` has settled, i.e.
 * either fulfilled or rejected.
 *
 * While the promise is pending, this function will assume control over the event
 * loop. Internally, it will `run()` the [default loop](https://github.com/reactphp/event-loop#loop)
 * until the promise settles and then calls `stop()` to terminate execution of the
 * loop. This means this function is more suited for short-lived promise executions
 * when using promise-based APIs is not feasible. For long-running applications,
 * using promise-based APIs by leveraging chained `then()` calls is usually preferable.
 *
 * Once the promise is fulfilled, this function will return whatever the promise
 * resolved to.
 *
 * Once the promise is rejected, this will throw whatever the promise rejected
 * with. If the promise did not reject with an `Exception` or `Throwable`, then
 * this function will throw an `UnexpectedValueException` instead.
 *
 * ```php
 * try {
 *     $result = React\Async\await($promise, $loop);
 *     // promise successfully fulfilled with $result
 *     echo 'Result: ' . $result;
 * } catch (Throwable $e) {
 *     // promise rejected with $e
 *     echo 'Error: ' . $e->getMessage();
 * }
 * ```
 *
 * @param PromiseInterface $promise
 * @return mixed returns whatever the promise resolves to
 * @throws \Exception when the promise is rejected with an `Exception`
 * @throws \Throwable when the promise is rejected with a `Throwable`
 * @throws \UnexpectedValueException when the promise is rejected with an unexpected value (Promise API v1 or v2 only)
 */
function await(PromiseInterface $promise)
{
    $wait = \true;
    $resolved = null;
    $exception = null;
    $rejected = \false;
    $loopStarted = \false;
    $promise->then(function ($c) use(&$resolved, &$wait, &$loopStarted) {
        $resolved = $c;
        $wait = \false;
        if ($loopStarted) {
            Loop::stop();
        }
    }, function ($error) use(&$exception, &$rejected, &$wait, &$loopStarted) {
        $exception = $error;
        $rejected = \true;
        $wait = \false;
        if ($loopStarted) {
            Loop::stop();
        }
    });
    // Explicitly overwrite argument with null value. This ensure that this
    // argument does not show up in the stack trace in PHP 7+ only.
    $promise = null;
    while ($wait) {
        $loopStarted = \true;
        Loop::run();
    }
    if ($rejected) {
        // promise is rejected with an unexpected value (Promise API v1 or v2 only)
        if (!$exception instanceof \Throwable) {
            $exception = new \UnexpectedValueException('Promise rejected with unexpected value of type ' . (\is_object($exception) ? \get_class($exception) : \gettype($exception)));
        }
        throw $exception;
    }
    return $resolved;
}
/**
 * Execute a Generator-based coroutine to "await" promises.
 *
 * ```php
 * React\Async\coroutine(function () {
 *     $browser = new React\Http\Browser();
 *
 *     try {
 *         $response = yield $browser->get('https://example.com/');
 *         assert($response instanceof Psr\Http\Message\ResponseInterface);
 *         echo $response->getBody();
 *     } catch (Exception $e) {
 *         echo 'Error: ' . $e->getMessage() . PHP_EOL;
 *     }
 * });
 * ```
 *
 * Using Generator-based coroutines is an alternative to directly using the
 * underlying promise APIs. For many use cases, this makes using promise-based
 * APIs much simpler, as it resembles a synchronous code flow more closely.
 * The above example performs the equivalent of directly using the promise APIs:
 *
 * ```php
 * $browser = new React\Http\Browser();
 *
 * $browser->get('https://example.com/')->then(function (Psr\Http\Message\ResponseInterface $response) {
 *     echo $response->getBody();
 * }, function (Exception $e) {
 *     echo 'Error: ' . $e->getMessage() . PHP_EOL;
 * });
 * ```
 *
 * The `yield` keyword can be used to "await" a promise resolution. Internally,
 * it will turn the entire given `$function` into a [`Generator`](https://www.php.net/manual/en/class.generator.php).
 * This allows the execution to be interrupted and resumed at the same place
 * when the promise is fulfilled. The `yield` statement returns whatever the
 * promise is fulfilled with. If the promise is rejected, it will throw an
 * `Exception` or `Throwable`.
 *
 * The `coroutine()` function will always return a Proimise which will be
 * fulfilled with whatever your `$function` returns. Likewise, it will return
 * a promise that will be rejected if you throw an `Exception` or `Throwable`
 * from your `$function`. This allows you easily create Promise-based functions:
 *
 * ```php
 * $promise = React\Async\coroutine(function () {
 *     $browser = new React\Http\Browser();
 *     $urls = [
 *         'https://example.com/alice',
 *         'https://example.com/bob'
 *     ];
 *
 *     $bytes = 0;
 *     foreach ($urls as $url) {
 *         $response = yield $browser->get($url);
 *         assert($response instanceof Psr\Http\Message\ResponseInterface);
 *         $bytes += $response->getBody()->getSize();
 *     }
 *     return $bytes;
 * });
 *
 * $promise->then(function (int $bytes) {
 *     echo 'Total size: ' . $bytes . PHP_EOL;
 * }, function (Exception $e) {
 *     echo 'Error: ' . $e->getMessage() . PHP_EOL;
 * });
 * ```
 *
 * The previous example uses a `yield` statement inside a loop to highlight how
 * this vastly simplifies consuming asynchronous operations. At the same time,
 * this naive example does not leverage concurrent execution, as it will
 * essentially "await" between each operation. In order to take advantage of
 * concurrent execution within the given `$function`, you can "await" multiple
 * promises by using a single `yield` together with Promise-based primitives
 * like this:
 *
 * ```php
 * $promise = React\Async\coroutine(function () {
 *     $browser = new React\Http\Browser();
 *     $urls = [
 *         'https://example.com/alice',
 *         'https://example.com/bob'
 *     ];
 *
 *     $promises = [];
 *     foreach ($urls as $url) {
 *         $promises[] = $browser->get($url);
 *     }
 *
 *     try {
 *         $responses = yield React\Promise\all($promises);
 *     } catch (Exception $e) {
 *         foreach ($promises as $promise) {
 *             $promise->cancel();
 *         }
 *         throw $e;
 *     }
 *
 *     $bytes = 0;
 *     foreach ($responses as $response) {
 *         assert($response instanceof Psr\Http\Message\ResponseInterface);
 *         $bytes += $response->getBody()->getSize();
 *     }
 *     return $bytes;
 * });
 *
 * $promise->then(function (int $bytes) {
 *     echo 'Total size: ' . $bytes . PHP_EOL;
 * }, function (Exception $e) {
 *     echo 'Error: ' . $e->getMessage() . PHP_EOL;
 * });
 * ```
 *
 * @param callable(...$args):\Generator<mixed,PromiseInterface,mixed,mixed> $function
 * @param mixed ...$args Optional list of additional arguments that will be passed to the given `$function` as is
 * @return PromiseInterface<mixed>
 * @since 3.0.0
 */
function coroutine(callable $function, ...$args) : PromiseInterface
{
    try {
        $generator = $function(...$args);
    } catch (\Throwable $e) {
        return reject($e);
    }
    if (!$generator instanceof \Generator) {
        return resolve($generator);
    }
    $promise = null;
    $deferred = new Deferred(function () use(&$promise) {
        if ($promise instanceof PromiseInterface && \method_exists($promise, 'cancel')) {
            $promise->cancel();
        }
        $promise = null;
    });
    /** @var callable $next */
    $next = function () use($deferred, $generator, &$next, &$promise) {
        try {
            if (!$generator->valid()) {
                $next = null;
                $deferred->resolve($generator->getReturn());
                return;
            }
        } catch (\Throwable $e) {
            $next = null;
            $deferred->reject($e);
            return;
        }
        $promise = $generator->current();
        if (!$promise instanceof PromiseInterface) {
            $next = null;
            $deferred->reject(new \UnexpectedValueException('Expected coroutine to yield ' . PromiseInterface::class . ', but got ' . (\is_object($promise) ? \get_class($promise) : \gettype($promise))));
            return;
        }
        $promise->then(function ($value) use($generator, $next) {
            $generator->send($value);
            $next();
        }, function (\Throwable $reason) use($generator, $next) {
            $generator->throw($reason);
            $next();
        })->then(null, function (\Throwable $reason) use($deferred, &$next) {
            $next = null;
            $deferred->reject($reason);
        });
    };
    $next();
    return $deferred->promise();
}
/**
 * @param iterable<callable():PromiseInterface<mixed,Exception>> $tasks
 * @return PromiseInterface<array<mixed>,Exception>
 */
function parallel(iterable $tasks) : PromiseInterface
{
    $pending = [];
    $deferred = new Deferred(function () use(&$pending) {
        foreach ($pending as $promise) {
            if ($promise instanceof PromiseInterface && \method_exists($promise, 'cancel')) {
                $promise->cancel();
            }
        }
        $pending = [];
    });
    $results = [];
    $continue = \true;
    $taskErrback = function ($error) use(&$pending, $deferred, &$continue) {
        $continue = \false;
        $deferred->reject($error);
        foreach ($pending as $promise) {
            if ($promise instanceof PromiseInterface && \method_exists($promise, 'cancel')) {
                $promise->cancel();
            }
        }
        $pending = [];
    };
    foreach ($tasks as $i => $task) {
        $taskCallback = function ($result) use(&$results, &$pending, &$continue, $i, $deferred) {
            $results[$i] = $result;
            unset($pending[$i]);
            if (!$pending && !$continue) {
                $deferred->resolve($results);
            }
        };
        $promise = \call_user_func($task);
        \assert($promise instanceof PromiseInterface);
        $pending[$i] = $promise;
        $promise->then($taskCallback, $taskErrback);
        if (!$continue) {
            break;
        }
    }
    $continue = \false;
    if (!$pending) {
        $deferred->resolve($results);
    }
    return $deferred->promise();
}
/**
 * @param iterable<callable():PromiseInterface<mixed,Exception>> $tasks
 * @return PromiseInterface<array<mixed>,Exception>
 */
function series(iterable $tasks) : PromiseInterface
{
    $pending = null;
    $deferred = new Deferred(function () use(&$pending) {
        if ($pending instanceof PromiseInterface && \method_exists($pending, 'cancel')) {
            $pending->cancel();
        }
        $pending = null;
    });
    $results = [];
    if ($tasks instanceof \IteratorAggregate) {
        $tasks = $tasks->getIterator();
        \assert($tasks instanceof \Iterator);
    }
    /** @var callable():void $next */
    $taskCallback = function ($result) use(&$results, &$next) {
        $results[] = $result;
        $next();
    };
    $next = function () use(&$tasks, $taskCallback, $deferred, &$results, &$pending) {
        if ($tasks instanceof \Iterator ? !$tasks->valid() : !$tasks) {
            $deferred->resolve($results);
            return;
        }
        if ($tasks instanceof \Iterator) {
            $task = $tasks->current();
            $tasks->next();
        } else {
            $task = \array_shift($tasks);
        }
        $promise = \call_user_func($task);
        \assert($promise instanceof PromiseInterface);
        $pending = $promise;
        $promise->then($taskCallback, array($deferred, 'reject'));
    };
    $next();
    return $deferred->promise();
}
/**
 * @param iterable<callable(mixed=):PromiseInterface<mixed,Exception>> $tasks
 * @return PromiseInterface<mixed,Exception>
 */
function waterfall(iterable $tasks) : PromiseInterface
{
    $pending = null;
    $deferred = new Deferred(function () use(&$pending) {
        if ($pending instanceof PromiseInterface && \method_exists($pending, 'cancel')) {
            $pending->cancel();
        }
        $pending = null;
    });
    if ($tasks instanceof \IteratorAggregate) {
        $tasks = $tasks->getIterator();
        \assert($tasks instanceof \Iterator);
    }
    /** @var callable $next */
    $next = function ($value = null) use(&$tasks, &$next, $deferred, &$pending) {
        if ($tasks instanceof \Iterator ? !$tasks->valid() : !$tasks) {
            $deferred->resolve($value);
            return;
        }
        if ($tasks instanceof \Iterator) {
            $task = $tasks->current();
            $tasks->next();
        } else {
            $task = \array_shift($tasks);
        }
        $promise = \call_user_func_array($task, \func_get_args());
        \assert($promise instanceof PromiseInterface);
        $pending = $promise;
        $promise->then($next, array($deferred, 'reject'));
    };
    $next();
    return $deferred->promise();
}
Copyright (c) 2012 Christian Lück, Cees-Jan Kiewiet, Jan Sorgalla, Chris Boden, Igor Wiedler

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

namespace _PHPStan_dcc7b7cff\React\Dns\Query;

use _PHPStan_dcc7b7cff\React\Dns\Model\Message;
use _PHPStan_dcc7b7cff\React\Dns\Protocol\BinaryDumper;
use _PHPStan_dcc7b7cff\React\Dns\Protocol\Parser;
use _PHPStan_dcc7b7cff\React\EventLoop\Loop;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use _PHPStan_dcc7b7cff\React\Promise\Deferred;
/**
 * Send DNS queries over a UDP transport.
 *
 * This is the main class that sends a DNS query to your DNS server and is used
 * internally by the `Resolver` for the actual message transport.
 *
 * For more advanced usages one can utilize this class directly.
 * The following example looks up the `IPv6` address for `igor.io`.
 *
 * ```php
 * $executor = new UdpTransportExecutor('8.8.8.8:53');
 *
 * $executor->query(
 *     new Query($name, Message::TYPE_AAAA, Message::CLASS_IN)
 * )->then(function (Message $message) {
 *     foreach ($message->answers as $answer) {
 *         echo 'IPv6: ' . $answer->data . PHP_EOL;
 *     }
 * }, 'printf');
 * ```
 *
 * See also the [fourth example](examples).
 *
 * Note that this executor does not implement a timeout, so you will very likely
 * want to use this in combination with a `TimeoutExecutor` like this:
 *
 * ```php
 * $executor = new TimeoutExecutor(
 *     new UdpTransportExecutor($nameserver),
 *     3.0
 * );
 * ```
 *
 * Also note that this executor uses an unreliable UDP transport and that it
 * does not implement any retry logic, so you will likely want to use this in
 * combination with a `RetryExecutor` like this:
 *
 * ```php
 * $executor = new RetryExecutor(
 *     new TimeoutExecutor(
 *         new UdpTransportExecutor($nameserver),
 *         3.0
 *     )
 * );
 * ```
 *
 * Note that this executor is entirely async and as such allows you to execute
 * any number of queries concurrently. You should probably limit the number of
 * concurrent queries in your application or you're very likely going to face
 * rate limitations and bans on the resolver end. For many common applications,
 * you may want to avoid sending the same query multiple times when the first
 * one is still pending, so you will likely want to use this in combination with
 * a `CoopExecutor` like this:
 *
 * ```php
 * $executor = new CoopExecutor(
 *     new RetryExecutor(
 *         new TimeoutExecutor(
 *             new UdpTransportExecutor($nameserver),
 *             3.0
 *         )
 *     )
 * );
 * ```
 *
 * > Internally, this class uses PHP's UDP sockets and does not take advantage
 *   of [react/datagram](https://github.com/reactphp/datagram) purely for
 *   organizational reasons to avoid a cyclic dependency between the two
 *   packages. Higher-level components should take advantage of the Datagram
 *   component instead of reimplementing this socket logic from scratch.
 */
final class UdpTransportExecutor implements ExecutorInterface
{
    private $nameserver;
    private $loop;
    private $parser;
    private $dumper;
    /**
     * maximum UDP packet size to send and receive
     *
     * @var int
     */
    private $maxPacketSize = 512;
    /**
     * @param string         $nameserver
     * @param ?LoopInterface $loop
     */
    public function __construct($nameserver, LoopInterface $loop = null)
    {
        if (\strpos($nameserver, '[') === \false && \substr_count($nameserver, ':') >= 2 && \strpos($nameserver, '://') === \false) {
            // several colons, but not enclosed in square brackets => enclose IPv6 address in square brackets
            $nameserver = '[' . $nameserver . ']';
        }
        $parts = \parse_url((\strpos($nameserver, '://') === \false ? 'udp://' : '') . $nameserver);
        if (!isset($parts['scheme'], $parts['host']) || $parts['scheme'] !== 'udp' || @\inet_pton(\trim($parts['host'], '[]')) === \false) {
            throw new \InvalidArgumentException('Invalid nameserver address given');
        }
        $this->nameserver = 'udp://' . $parts['host'] . ':' . (isset($parts['port']) ? $parts['port'] : 53);
        $this->loop = $loop ?: Loop::get();
        $this->parser = new Parser();
        $this->dumper = new BinaryDumper();
    }
    public function query(Query $query)
    {
        $request = Message::createRequestForQuery($query);
        $queryData = $this->dumper->toBinary($request);
        if (isset($queryData[$this->maxPacketSize])) {
            return \_PHPStan_dcc7b7cff\React\Promise\reject(new \RuntimeException('DNS query for ' . $query->describe() . ' failed: Query too large for UDP transport', \defined('SOCKET_EMSGSIZE') ? \SOCKET_EMSGSIZE : 90));
        }
        // UDP connections are instant, so try connection without a loop or timeout
        $errno = 0;
        $errstr = '';
        $socket = @\stream_socket_client($this->nameserver, $errno, $errstr, 0);
        if ($socket === \false) {
            return \_PHPStan_dcc7b7cff\React\Promise\reject(new \RuntimeException('DNS query for ' . $query->describe() . ' failed: Unable to connect to DNS server ' . $this->nameserver . ' (' . $errstr . ')', $errno));
        }
        // set socket to non-blocking and immediately try to send (fill write buffer)
        \stream_set_blocking($socket, \false);
        \set_error_handler(function ($_, $error) use(&$errno, &$errstr) {
            // Write may potentially fail, but most common errors are already caught by connection check above.
            // Among others, macOS is known to report here when trying to send to broadcast address.
            // This can also be reproduced by writing data exceeding `stream_set_chunk_size()` to a server refusing UDP data.
            // fwrite(): send of 8192 bytes failed with errno=111 Connection refused
            \preg_match('/errno=(\\d+) (.+)/', $error, $m);
            $errno = isset($m[1]) ? (int) $m[1] : 0;
            $errstr = isset($m[2]) ? $m[2] : $error;
        });
        $written = \fwrite($socket, $queryData);
        \restore_error_handler();
        if ($written !== \strlen($queryData)) {
            return \_PHPStan_dcc7b7cff\React\Promise\reject(new \RuntimeException('DNS query for ' . $query->describe() . ' failed: Unable to send query to DNS server ' . $this->nameserver . ' (' . $errstr . ')', $errno));
        }
        $loop = $this->loop;
        $deferred = new Deferred(function () use($loop, $socket, $query) {
            // cancellation should remove socket from loop and close socket
            $loop->removeReadStream($socket);
            \fclose($socket);
            throw new CancellationException('DNS query for ' . $query->describe() . ' has been cancelled');
        });
        $max = $this->maxPacketSize;
        $parser = $this->parser;
        $nameserver = $this->nameserver;
        $loop->addReadStream($socket, function ($socket) use($loop, $deferred, $query, $parser, $request, $max, $nameserver) {
            // try to read a single data packet from the DNS server
            // ignoring any errors, this is uses UDP packets and not a stream of data
            $data = @\fread($socket, $max);
            if ($data === \false) {
                return;
            }
            try {
                $response = $parser->parseMessage($data);
            } catch (\Exception $e) {
                // ignore and await next if we received an invalid message from remote server
                // this may as well be a fake response from an attacker (possible DOS)
                return;
            }
            // ignore and await next if we received an unexpected response ID
            // this may as well be a fake response from an attacker (possible cache poisoning)
            if ($response->id !== $request->id) {
                return;
            }
            // we only react to the first valid message, so remove socket from loop and close
            $loop->removeReadStream($socket);
            \fclose($socket);
            if ($response->tc) {
                $deferred->reject(new \RuntimeException('DNS query for ' . $query->describe() . ' failed: The DNS server ' . $nameserver . ' returned a truncated result for a UDP query', \defined('SOCKET_EMSGSIZE') ? \SOCKET_EMSGSIZE : 90));
                return;
            }
            $deferred->resolve($response);
        });
        return $deferred->promise();
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Dns\Query;

use _PHPStan_dcc7b7cff\React\Promise\Promise;
/**
 * Send DNS queries over a UDP or TCP/IP stream transport.
 *
 * This class will automatically choose the correct transport protocol to send
 * a DNS query to your DNS server. It will always try to send it over the more
 * efficient UDP transport first. If this query yields a size related issue
 * (truncated messages), it will retry over a streaming TCP/IP transport.
 *
 * For more advanced usages one can utilize this class directly.
 * The following example looks up the `IPv6` address for `reactphp.org`.
 *
 * ```php
 * $executor = new SelectiveTransportExecutor($udpExecutor, $tcpExecutor);
 *
 * $executor->query(
 *     new Query($name, Message::TYPE_AAAA, Message::CLASS_IN)
 * )->then(function (Message $message) {
 *     foreach ($message->answers as $answer) {
 *         echo 'IPv6: ' . $answer->data . PHP_EOL;
 *     }
 * }, 'printf');
 * ```
 *
 * Note that this executor only implements the logic to select the correct
 * transport for the given DNS query. Implementing the correct transport logic,
 * implementing timeouts and any retry logic is left up to the given executors,
 * see also [`UdpTransportExecutor`](#udptransportexecutor) and
 * [`TcpTransportExecutor`](#tcptransportexecutor) for more details.
 *
 * Note that this executor is entirely async and as such allows you to execute
 * any number of queries concurrently. You should probably limit the number of
 * concurrent queries in your application or you're very likely going to face
 * rate limitations and bans on the resolver end. For many common applications,
 * you may want to avoid sending the same query multiple times when the first
 * one is still pending, so you will likely want to use this in combination with
 * a `CoopExecutor` like this:
 *
 * ```php
 * $executor = new CoopExecutor(
 *     new SelectiveTransportExecutor(
 *         $datagramExecutor,
 *         $streamExecutor
 *     )
 * );
 * ```
 */
class SelectiveTransportExecutor implements ExecutorInterface
{
    private $datagramExecutor;
    private $streamExecutor;
    public function __construct(ExecutorInterface $datagramExecutor, ExecutorInterface $streamExecutor)
    {
        $this->datagramExecutor = $datagramExecutor;
        $this->streamExecutor = $streamExecutor;
    }
    public function query(Query $query)
    {
        $stream = $this->streamExecutor;
        $pending = $this->datagramExecutor->query($query);
        return new Promise(function ($resolve, $reject) use(&$pending, $stream, $query) {
            $pending->then($resolve, function ($e) use(&$pending, $stream, $query, $resolve, $reject) {
                if ($e->getCode() === (\defined('SOCKET_EMSGSIZE') ? \SOCKET_EMSGSIZE : 90)) {
                    $pending = $stream->query($query)->then($resolve, $reject);
                } else {
                    $reject($e);
                }
            });
        }, function () use(&$pending) {
            $pending->cancel();
            $pending = null;
        });
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Dns\Query;

final class TimeoutException extends \Exception
{
}
<?php

namespace _PHPStan_dcc7b7cff\React\Dns\Query;

final class CancellationException extends \RuntimeException
{
}
<?php

namespace _PHPStan_dcc7b7cff\React\Dns\Query;

use _PHPStan_dcc7b7cff\React\Promise\Promise;
/**
 * Cooperatively resolves hosts via the given base executor to ensure same query is not run concurrently
 *
 * Wraps an existing `ExecutorInterface` to keep tracking of pending queries
 * and only starts a new query when the same query is not already pending. Once
 * the underlying query is fulfilled/rejected, it will forward its value to all
 * promises awaiting the same query.
 *
 * This means it will not limit concurrency for queries that differ, for example
 * when sending many queries for different host names or types.
 *
 * This is useful because all executors are entirely async and as such allow you
 * to execute any number of queries concurrently. You should probably limit the
 * number of concurrent queries in your application or you're very likely going
 * to face rate limitations and bans on the resolver end. For many common
 * applications, you may want to avoid sending the same query multiple times
 * when the first one is still pending, so you will likely want to use this in
 * combination with some other executor like this:
 *
 * ```php
 * $executor = new CoopExecutor(
 *     new RetryExecutor(
 *         new TimeoutExecutor(
 *             new UdpTransportExecutor($nameserver),
 *             3.0
 *         )
 *     )
 * );
 * ```
 */
final class CoopExecutor implements ExecutorInterface
{
    private $executor;
    private $pending = array();
    private $counts = array();
    public function __construct(ExecutorInterface $base)
    {
        $this->executor = $base;
    }
    public function query(Query $query)
    {
        $key = $this->serializeQueryToIdentity($query);
        if (isset($this->pending[$key])) {
            // same query is already pending, so use shared reference to pending query
            $promise = $this->pending[$key];
            ++$this->counts[$key];
        } else {
            // no such query pending, so start new query and keep reference until it's fulfilled or rejected
            $promise = $this->executor->query($query);
            $this->pending[$key] = $promise;
            $this->counts[$key] = 1;
            $pending =& $this->pending;
            $counts =& $this->counts;
            $promise->then(function () use($key, &$pending, &$counts) {
                unset($pending[$key], $counts[$key]);
            }, function () use($key, &$pending, &$counts) {
                unset($pending[$key], $counts[$key]);
            });
        }
        // Return a child promise awaiting the pending query.
        // Cancelling this child promise should only cancel the pending query
        // when no other child promise is awaiting the same query.
        $pending =& $this->pending;
        $counts =& $this->counts;
        return new Promise(function ($resolve, $reject) use($promise) {
            $promise->then($resolve, $reject);
        }, function () use(&$promise, $key, $query, &$pending, &$counts) {
            if (--$counts[$key] < 1) {
                unset($pending[$key], $counts[$key]);
                $promise->cancel();
                $promise = null;
            }
            throw new \RuntimeException('DNS query for ' . $query->describe() . ' has been cancelled');
        });
    }
    private function serializeQueryToIdentity(Query $query)
    {
        return \sprintf('%s:%s:%s', $query->name, $query->type, $query->class);
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Dns\Query;

use _PHPStan_dcc7b7cff\React\Cache\CacheInterface;
use _PHPStan_dcc7b7cff\React\Dns\Model\Message;
use _PHPStan_dcc7b7cff\React\Promise\Promise;
final class CachingExecutor implements ExecutorInterface
{
    /**
     * Default TTL for negative responses (NXDOMAIN etc.).
     *
     * @internal
     */
    const TTL = 60;
    private $executor;
    private $cache;
    public function __construct(ExecutorInterface $executor, CacheInterface $cache)
    {
        $this->executor = $executor;
        $this->cache = $cache;
    }
    public function query(Query $query)
    {
        $id = $query->name . ':' . $query->type . ':' . $query->class;
        $cache = $this->cache;
        $that = $this;
        $executor = $this->executor;
        $pending = $cache->get($id);
        return new Promise(function ($resolve, $reject) use($query, $id, $cache, $executor, &$pending, $that) {
            $pending->then(function ($message) use($query, $id, $cache, $executor, &$pending, $that) {
                // return cached response message on cache hit
                if ($message !== null) {
                    return $message;
                }
                // perform DNS lookup if not already cached
                return $pending = $executor->query($query)->then(function (Message $message) use($cache, $id, $that) {
                    // DNS response message received => store in cache when not truncated and return
                    if (!$message->tc) {
                        $cache->set($id, $message, $that->ttl($message));
                    }
                    return $message;
                });
            })->then($resolve, function ($e) use($reject, &$pending) {
                $reject($e);
                $pending = null;
            });
        }, function ($_, $reject) use(&$pending, $query) {
            $reject(new \RuntimeException('DNS query for ' . $query->describe() . ' has been cancelled'));
            $pending->cancel();
            $pending = null;
        });
    }
    /**
     * @param Message $message
     * @return int
     * @internal
     */
    public function ttl(Message $message)
    {
        // select TTL from answers (should all be the same), use smallest value if available
        // @link https://tools.ietf.org/html/rfc2181#section-5.2
        $ttl = null;
        foreach ($message->answers as $answer) {
            if ($ttl === null || $answer->ttl < $ttl) {
                $ttl = $answer->ttl;
            }
        }
        if ($ttl === null) {
            $ttl = self::TTL;
        }
        return $ttl;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Dns\Query;

use _PHPStan_dcc7b7cff\React\Promise\Deferred;
use _PHPStan_dcc7b7cff\React\Promise\PromiseInterface;
final class RetryExecutor implements ExecutorInterface
{
    private $executor;
    private $retries;
    public function __construct(ExecutorInterface $executor, $retries = 2)
    {
        $this->executor = $executor;
        $this->retries = $retries;
    }
    public function query(Query $query)
    {
        return $this->tryQuery($query, $this->retries);
    }
    public function tryQuery(Query $query, $retries)
    {
        $deferred = new Deferred(function () use(&$promise) {
            if ($promise instanceof PromiseInterface && \method_exists($promise, 'cancel')) {
                $promise->cancel();
            }
        });
        $success = function ($value) use($deferred, &$errorback) {
            $errorback = null;
            $deferred->resolve($value);
        };
        $executor = $this->executor;
        $errorback = function ($e) use($deferred, &$promise, $query, $success, &$errorback, &$retries, $executor) {
            if (!$e instanceof TimeoutException) {
                $errorback = null;
                $deferred->reject($e);
            } elseif ($retries <= 0) {
                $errorback = null;
                $deferred->reject($e = new \RuntimeException('DNS query for ' . $query->describe() . ' failed: too many retries', 0, $e));
                // avoid garbage references by replacing all closures in call stack.
                // what a lovely piece of code!
                $r = new \ReflectionProperty('Exception', 'trace');
                $r->setAccessible(\true);
                $trace = $r->getValue($e);
                // Exception trace arguments are not available on some PHP 7.4 installs
                // @codeCoverageIgnoreStart
                foreach ($trace as $ti => $one) {
                    if (isset($one['args'])) {
                        foreach ($one['args'] as $ai => $arg) {
                            if ($arg instanceof \Closure) {
                                $trace[$ti]['args'][$ai] = 'Object(' . \get_class($arg) . ')';
                            }
                        }
                    }
                }
                // @codeCoverageIgnoreEnd
                $r->setValue($e, $trace);
            } else {
                --$retries;
                $promise = $executor->query($query)->then($success, $errorback);
            }
        };
        $promise = $this->executor->query($query)->then($success, $errorback);
        return $deferred->promise();
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Dns\Query;

use _PHPStan_dcc7b7cff\React\EventLoop\Loop;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use _PHPStan_dcc7b7cff\React\Promise\Timer;
final class TimeoutExecutor implements ExecutorInterface
{
    private $executor;
    private $loop;
    private $timeout;
    public function __construct(ExecutorInterface $executor, $timeout, LoopInterface $loop = null)
    {
        $this->executor = $executor;
        $this->loop = $loop ?: Loop::get();
        $this->timeout = $timeout;
    }
    public function query(Query $query)
    {
        return Timer\timeout($this->executor->query($query), $this->timeout, $this->loop)->then(null, function ($e) use($query) {
            if ($e instanceof Timer\TimeoutException) {
                $e = new TimeoutException(\sprintf("DNS query for %s timed out", $query->describe()), 0, $e);
            }
            throw $e;
        });
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Dns\Query;

use _PHPStan_dcc7b7cff\React\Dns\Config\HostsFile;
use _PHPStan_dcc7b7cff\React\Dns\Model\Message;
use _PHPStan_dcc7b7cff\React\Dns\Model\Record;
use _PHPStan_dcc7b7cff\React\Promise;
/**
 * Resolves hosts from the given HostsFile or falls back to another executor
 *
 * If the host is found in the hosts file, it will not be passed to the actual
 * DNS executor. If the host is not found in the hosts file, it will be passed
 * to the DNS executor as a fallback.
 */
final class HostsFileExecutor implements ExecutorInterface
{
    private $hosts;
    private $fallback;
    public function __construct(HostsFile $hosts, ExecutorInterface $fallback)
    {
        $this->hosts = $hosts;
        $this->fallback = $fallback;
    }
    public function query(Query $query)
    {
        if ($query->class === Message::CLASS_IN && ($query->type === Message::TYPE_A || $query->type === Message::TYPE_AAAA)) {
            // forward lookup for type A or AAAA
            $records = array();
            $expectsColon = $query->type === Message::TYPE_AAAA;
            foreach ($this->hosts->getIpsForHost($query->name) as $ip) {
                // ensure this is an IPv4/IPV6 address according to query type
                if ((\strpos($ip, ':') !== \false) === $expectsColon) {
                    $records[] = new Record($query->name, $query->type, $query->class, 0, $ip);
                }
            }
            if ($records) {
                return Promise\resolve(Message::createResponseWithAnswersForQuery($query, $records));
            }
        } elseif ($query->class === Message::CLASS_IN && $query->type === Message::TYPE_PTR) {
            // reverse lookup: extract IPv4 or IPv6 from special `.arpa` domain
            $ip = $this->getIpFromHost($query->name);
            if ($ip !== null) {
                $records = array();
                foreach ($this->hosts->getHostsForIp($ip) as $host) {
                    $records[] = new Record($query->name, $query->type, $query->class, 0, $host);
                }
                if ($records) {
                    return Promise\resolve(Message::createResponseWithAnswersForQuery($query, $records));
                }
            }
        }
        return $this->fallback->query($query);
    }
    private function getIpFromHost($host)
    {
        if (\substr($host, -13) === '.in-addr.arpa') {
            // IPv4: read as IP and reverse bytes
            $ip = @\inet_pton(\substr($host, 0, -13));
            if ($ip === \false || isset($ip[4])) {
                return null;
            }
            return \inet_ntop(\strrev($ip));
        } elseif (\substr($host, -9) === '.ip6.arpa') {
            // IPv6: replace dots, reverse nibbles and interpret as hexadecimal string
            $ip = @\inet_ntop(\pack('H*', \strrev(\str_replace('.', '', \substr($host, 0, -9)))));
            if ($ip === \false) {
                return null;
            }
            return $ip;
        } else {
            return null;
        }
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Dns\Query;

use _PHPStan_dcc7b7cff\React\Dns\Model\Message;
use _PHPStan_dcc7b7cff\React\Dns\Protocol\BinaryDumper;
use _PHPStan_dcc7b7cff\React\Dns\Protocol\Parser;
use _PHPStan_dcc7b7cff\React\EventLoop\Loop;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use _PHPStan_dcc7b7cff\React\Promise\Deferred;
/**
 * Send DNS queries over a TCP/IP stream transport.
 *
 * This is one of the main classes that send a DNS query to your DNS server.
 *
 * For more advanced usages one can utilize this class directly.
 * The following example looks up the `IPv6` address for `reactphp.org`.
 *
 * ```php
 * $executor = new TcpTransportExecutor('8.8.8.8:53');
 *
 * $executor->query(
 *     new Query($name, Message::TYPE_AAAA, Message::CLASS_IN)
 * )->then(function (Message $message) {
 *     foreach ($message->answers as $answer) {
 *         echo 'IPv6: ' . $answer->data . PHP_EOL;
 *     }
 * }, 'printf');
 * ```
 *
 * See also [example #92](examples).
 *
 * Note that this executor does not implement a timeout, so you will very likely
 * want to use this in combination with a `TimeoutExecutor` like this:
 *
 * ```php
 * $executor = new TimeoutExecutor(
 *     new TcpTransportExecutor($nameserver),
 *     3.0
 * );
 * ```
 *
 * Unlike the `UdpTransportExecutor`, this class uses a reliable TCP/IP
 * transport, so you do not necessarily have to implement any retry logic.
 *
 * Note that this executor is entirely async and as such allows you to execute
 * queries concurrently. The first query will establish a TCP/IP socket
 * connection to the DNS server which will be kept open for a short period.
 * Additional queries will automatically reuse this existing socket connection
 * to the DNS server, will pipeline multiple requests over this single
 * connection and will keep an idle connection open for a short period. The
 * initial TCP/IP connection overhead may incur a slight delay if you only send
 * occasional queries – when sending a larger number of concurrent queries over
 * an existing connection, it becomes increasingly more efficient and avoids
 * creating many concurrent sockets like the UDP-based executor. You may still
 * want to limit the number of (concurrent) queries in your application or you
 * may be facing rate limitations and bans on the resolver end. For many common
 * applications, you may want to avoid sending the same query multiple times
 * when the first one is still pending, so you will likely want to use this in
 * combination with a `CoopExecutor` like this:
 *
 * ```php
 * $executor = new CoopExecutor(
 *     new TimeoutExecutor(
 *         new TcpTransportExecutor($nameserver),
 *         3.0
 *     )
 * );
 * ```
 *
 * > Internally, this class uses PHP's TCP/IP sockets and does not take advantage
 *   of [react/socket](https://github.com/reactphp/socket) purely for
 *   organizational reasons to avoid a cyclic dependency between the two
 *   packages. Higher-level components should take advantage of the Socket
 *   component instead of reimplementing this socket logic from scratch.
 */
class TcpTransportExecutor implements ExecutorInterface
{
    private $nameserver;
    private $loop;
    private $parser;
    private $dumper;
    /**
     * @var ?resource
     */
    private $socket;
    /**
     * @var Deferred[]
     */
    private $pending = array();
    /**
     * @var string[]
     */
    private $names = array();
    /**
     * Maximum idle time when socket is current unused (i.e. no pending queries outstanding)
     *
     * If a new query is to be sent during the idle period, we can reuse the
     * existing socket without having to wait for a new socket connection.
     * This uses a rather small, hard-coded value to not keep any unneeded
     * sockets open and to not keep the loop busy longer than needed.
     *
     * A future implementation may take advantage of `edns-tcp-keepalive` to keep
     * the socket open for longer periods. This will likely require explicit
     * configuration because this may consume additional resources and also keep
     * the loop busy for longer than expected in some applications.
     *
     * @var float
     * @link https://tools.ietf.org/html/rfc7766#section-6.2.1
     * @link https://tools.ietf.org/html/rfc7828
     */
    private $idlePeriod = 0.001;
    /**
     * @var ?\React\EventLoop\TimerInterface
     */
    private $idleTimer;
    private $writeBuffer = '';
    private $writePending = \false;
    private $readBuffer = '';
    private $readPending = \false;
    /** @var string */
    private $readChunk = 0xffff;
    /**
     * @param string         $nameserver
     * @param ?LoopInterface $loop
     */
    public function __construct($nameserver, LoopInterface $loop = null)
    {
        if (\strpos($nameserver, '[') === \false && \substr_count($nameserver, ':') >= 2 && \strpos($nameserver, '://') === \false) {
            // several colons, but not enclosed in square brackets => enclose IPv6 address in square brackets
            $nameserver = '[' . $nameserver . ']';
        }
        $parts = \parse_url((\strpos($nameserver, '://') === \false ? 'tcp://' : '') . $nameserver);
        if (!isset($parts['scheme'], $parts['host']) || $parts['scheme'] !== 'tcp' || @\inet_pton(\trim($parts['host'], '[]')) === \false) {
            throw new \InvalidArgumentException('Invalid nameserver address given');
        }
        $this->nameserver = 'tcp://' . $parts['host'] . ':' . (isset($parts['port']) ? $parts['port'] : 53);
        $this->loop = $loop ?: Loop::get();
        $this->parser = new Parser();
        $this->dumper = new BinaryDumper();
    }
    public function query(Query $query)
    {
        $request = Message::createRequestForQuery($query);
        // keep shuffing message ID to avoid using the same message ID for two pending queries at the same time
        while (isset($this->pending[$request->id])) {
            $request->id = \mt_rand(0, 0xffff);
            // @codeCoverageIgnore
        }
        $queryData = $this->dumper->toBinary($request);
        $length = \strlen($queryData);
        if ($length > 0xffff) {
            return \_PHPStan_dcc7b7cff\React\Promise\reject(new \RuntimeException('DNS query for ' . $query->describe() . ' failed: Query too large for TCP transport'));
        }
        $queryData = \pack('n', $length) . $queryData;
        if ($this->socket === null) {
            // create async TCP/IP connection (may take a while)
            $socket = @\stream_socket_client($this->nameserver, $errno, $errstr, 0, \STREAM_CLIENT_CONNECT | \STREAM_CLIENT_ASYNC_CONNECT);
            if ($socket === \false) {
                return \_PHPStan_dcc7b7cff\React\Promise\reject(new \RuntimeException('DNS query for ' . $query->describe() . ' failed: Unable to connect to DNS server ' . $this->nameserver . ' (' . $errstr . ')', $errno));
            }
            // set socket to non-blocking and wait for it to become writable (connection success/rejected)
            \stream_set_blocking($socket, \false);
            if (\function_exists('stream_set_chunk_size')) {
                \stream_set_chunk_size($socket, $this->readChunk);
                // @codeCoverageIgnore
            }
            $this->socket = $socket;
        }
        if ($this->idleTimer !== null) {
            $this->loop->cancelTimer($this->idleTimer);
            $this->idleTimer = null;
        }
        // wait for socket to become writable to actually write out data
        $this->writeBuffer .= $queryData;
        if (!$this->writePending) {
            $this->writePending = \true;
            $this->loop->addWriteStream($this->socket, array($this, 'handleWritable'));
        }
        $names =& $this->names;
        $that = $this;
        $deferred = new Deferred(function () use($that, &$names, $request) {
            // remove from list of pending names, but remember pending query
            $name = $names[$request->id];
            unset($names[$request->id]);
            $that->checkIdle();
            throw new CancellationException('DNS query for ' . $name . ' has been cancelled');
        });
        $this->pending[$request->id] = $deferred;
        $this->names[$request->id] = $query->describe();
        return $deferred->promise();
    }
    /**
     * @internal
     */
    public function handleWritable()
    {
        if ($this->readPending === \false) {
            $name = @\stream_socket_get_name($this->socket, \true);
            if ($name === \false) {
                // Connection failed? Check socket error if available for underlying errno/errstr.
                // @codeCoverageIgnoreStart
                if (\function_exists('socket_import_stream')) {
                    $socket = \socket_import_stream($this->socket);
                    $errno = \socket_get_option($socket, \SOL_SOCKET, \SO_ERROR);
                    $errstr = \socket_strerror($errno);
                } else {
                    $errno = \defined('SOCKET_ECONNREFUSED') ? \SOCKET_ECONNREFUSED : 111;
                    $errstr = 'Connection refused';
                }
                // @codeCoverageIgnoreEnd
                $this->closeError('Unable to connect to DNS server ' . $this->nameserver . ' (' . $errstr . ')', $errno);
                return;
            }
            $this->readPending = \true;
            $this->loop->addReadStream($this->socket, array($this, 'handleRead'));
        }
        $errno = 0;
        $errstr = '';
        \set_error_handler(function ($_, $error) use(&$errno, &$errstr) {
            // Match errstr from PHP's warning message.
            // fwrite(): Send of 327712 bytes failed with errno=32 Broken pipe
            \preg_match('/errno=(\\d+) (.+)/', $error, $m);
            $errno = isset($m[1]) ? (int) $m[1] : 0;
            $errstr = isset($m[2]) ? $m[2] : $error;
        });
        $written = \fwrite($this->socket, $this->writeBuffer);
        \restore_error_handler();
        if ($written === \false || $written === 0) {
            $this->closeError('Unable to send query to DNS server ' . $this->nameserver . ' (' . $errstr . ')', $errno);
            return;
        }
        if (isset($this->writeBuffer[$written])) {
            $this->writeBuffer = \substr($this->writeBuffer, $written);
        } else {
            $this->loop->removeWriteStream($this->socket);
            $this->writePending = \false;
            $this->writeBuffer = '';
        }
    }
    /**
     * @internal
     */
    public function handleRead()
    {
        // read one chunk of data from the DNS server
        // any error is fatal, this is a stream of TCP/IP data
        $chunk = @\fread($this->socket, $this->readChunk);
        if ($chunk === \false || $chunk === '') {
            $this->closeError('Connection to DNS server ' . $this->nameserver . ' lost');
            return;
        }
        // reassemble complete message by concatenating all chunks.
        $this->readBuffer .= $chunk;
        // response message header contains at least 12 bytes
        while (isset($this->readBuffer[11])) {
            // read response message length from first 2 bytes and ensure we have length + data in buffer
            list(, $length) = \unpack('n', $this->readBuffer);
            if (!isset($this->readBuffer[$length + 1])) {
                return;
            }
            $data = \substr($this->readBuffer, 2, $length);
            $this->readBuffer = (string) \substr($this->readBuffer, $length + 2);
            try {
                $response = $this->parser->parseMessage($data);
            } catch (\Exception $e) {
                // reject all pending queries if we received an invalid message from remote server
                $this->closeError('Invalid message received from DNS server ' . $this->nameserver);
                return;
            }
            // reject all pending queries if we received an unexpected response ID or truncated response
            if (!isset($this->pending[$response->id]) || $response->tc) {
                $this->closeError('Invalid response message received from DNS server ' . $this->nameserver);
                return;
            }
            $deferred = $this->pending[$response->id];
            unset($this->pending[$response->id], $this->names[$response->id]);
            $deferred->resolve($response);
            $this->checkIdle();
        }
    }
    /**
     * @internal
     * @param string $reason
     * @param int    $code
     */
    public function closeError($reason, $code = 0)
    {
        $this->readBuffer = '';
        if ($this->readPending) {
            $this->loop->removeReadStream($this->socket);
            $this->readPending = \false;
        }
        $this->writeBuffer = '';
        if ($this->writePending) {
            $this->loop->removeWriteStream($this->socket);
            $this->writePending = \false;
        }
        if ($this->idleTimer !== null) {
            $this->loop->cancelTimer($this->idleTimer);
            $this->idleTimer = null;
        }
        @\fclose($this->socket);
        $this->socket = null;
        foreach ($this->names as $id => $name) {
            $this->pending[$id]->reject(new \RuntimeException('DNS query for ' . $name . ' failed: ' . $reason, $code));
        }
        $this->pending = $this->names = array();
    }
    /**
     * @internal
     */
    public function checkIdle()
    {
        if ($this->idleTimer === null && !$this->names) {
            $that = $this;
            $this->idleTimer = $this->loop->addTimer($this->idlePeriod, function () use($that) {
                $that->closeError('Idle timeout');
            });
        }
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Dns\Query;

interface ExecutorInterface
{
    /**
     * Executes a query and will return a response message
     *
     * It returns a Promise which either fulfills with a response
     * `React\Dns\Model\Message` on success or rejects with an `Exception` if
     * the query is not successful. A response message may indicate an error
     * condition in its `rcode`, but this is considered a valid response message.
     *
     * ```php
     * $executor->query($query)->then(
     *     function (React\Dns\Model\Message $response) {
     *         // response message successfully received
     *         var_dump($response->rcode, $response->answers);
     *     },
     *     function (Exception $error) {
     *         // failed to query due to $error
     *     }
     * );
     * ```
     *
     * The returned Promise MUST be implemented in such a way that it can be
     * cancelled when it is still pending. Cancelling a pending promise MUST
     * reject its value with an Exception. It SHOULD clean up any underlying
     * resources and references as applicable.
     *
     * ```php
     * $promise = $executor->query($query);
     *
     * $promise->cancel();
     * ```
     *
     * @param Query $query
     * @return \React\Promise\PromiseInterface<\React\Dns\Model\Message,\Exception>
     *     resolves with response message on success or rejects with an Exception on error
     */
    public function query(Query $query);
}
<?php

namespace _PHPStan_dcc7b7cff\React\Dns\Query;

use _PHPStan_dcc7b7cff\React\Promise\Promise;
final class FallbackExecutor implements ExecutorInterface
{
    private $executor;
    private $fallback;
    public function __construct(ExecutorInterface $executor, ExecutorInterface $fallback)
    {
        $this->executor = $executor;
        $this->fallback = $fallback;
    }
    public function query(Query $query)
    {
        $cancelled = \false;
        $fallback = $this->fallback;
        $promise = $this->executor->query($query);
        return new Promise(function ($resolve, $reject) use(&$promise, $fallback, $query, &$cancelled) {
            $promise->then($resolve, function (\Exception $e1) use($fallback, $query, $resolve, $reject, &$cancelled, &$promise) {
                // reject if primary resolution rejected due to cancellation
                if ($cancelled) {
                    $reject($e1);
                    return;
                }
                // start fallback query if primary query rejected
                $promise = $fallback->query($query)->then($resolve, function (\Exception $e2) use($e1, $reject) {
                    $append = $e2->getMessage();
                    if (($pos = \strpos($append, ':')) !== \false) {
                        $append = \substr($append, $pos + 2);
                    }
                    // reject with combined error message if both queries fail
                    $reject(new \RuntimeException($e1->getMessage() . '. ' . $append));
                });
            });
        }, function () use(&$promise, &$cancelled) {
            // cancel pending query (primary or fallback)
            $cancelled = \true;
            $promise->cancel();
        });
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Dns\Query;

use _PHPStan_dcc7b7cff\React\Dns\Model\Message;
/**
 * This class represents a single question in a query/response message
 *
 * It uses a structure similar to `\React\Dns\Message\Record`, but does not
 * contain fields for resulting TTL and resulting record data (IPs etc.).
 *
 * @link https://tools.ietf.org/html/rfc1035#section-4.1.2
 * @see \React\Dns\Message\Record
 */
final class Query
{
    /**
     * @var string query name, i.e. hostname to look up
     */
    public $name;
    /**
     * @var int query type (aka QTYPE), see Message::TYPE_* constants
     */
    public $type;
    /**
     * @var int query class (aka QCLASS), see Message::CLASS_IN constant
     */
    public $class;
    /**
     * @param string $name  query name, i.e. hostname to look up
     * @param int    $type  query type, see Message::TYPE_* constants
     * @param int    $class query class, see Message::CLASS_IN constant
     */
    public function __construct($name, $type, $class)
    {
        $this->name = $name;
        $this->type = $type;
        $this->class = $class;
    }
    /**
     * Describes the hostname and query type/class for this query
     *
     * The output format is supposed to be human readable and is subject to change.
     * The format is inspired by RFC 3597 when handling unkown types/classes.
     *
     * @return string "example.com (A)" or "example.com (CLASS0 TYPE1234)"
     * @link https://tools.ietf.org/html/rfc3597
     */
    public function describe()
    {
        $class = $this->class !== Message::CLASS_IN ? 'CLASS' . $this->class . ' ' : '';
        $type = 'TYPE' . $this->type;
        $ref = new \ReflectionClass('_PHPStan_dcc7b7cff\\React\\Dns\\Model\\Message');
        foreach ($ref->getConstants() as $name => $value) {
            if ($value === $this->type && \strpos($name, 'TYPE_') === 0) {
                $type = \substr($name, 5);
                break;
            }
        }
        return $this->name . ' (' . $class . $type . ')';
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Dns;

final class BadServerException extends \Exception
{
}
<?php

namespace _PHPStan_dcc7b7cff\React\Dns\Config;

use RuntimeException;
final class Config
{
    /**
     * Loads the system DNS configuration
     *
     * Note that this method may block while loading its internal files and/or
     * commands and should thus be used with care! While this should be
     * relatively fast for most systems, it remains unknown if this may block
     * under certain circumstances. In particular, this method should only be
     * executed before the loop starts, not while it is running.
     *
     * Note that this method will try to access its files and/or commands and
     * try to parse its output. Currently, this will only parse valid nameserver
     * entries from its output and will ignore all other output without
     * complaining.
     *
     * Note that the previous section implies that this may return an empty
     * `Config` object if no valid nameserver entries can be found.
     *
     * @return self
     * @codeCoverageIgnore
     */
    public static function loadSystemConfigBlocking()
    {
        // Use WMIC output on Windows
        if (\DIRECTORY_SEPARATOR === '\\') {
            return self::loadWmicBlocking();
        }
        // otherwise (try to) load from resolv.conf
        try {
            return self::loadResolvConfBlocking();
        } catch (RuntimeException $ignored) {
            // return empty config if parsing fails (file not found)
            return new self();
        }
    }
    /**
     * Loads a resolv.conf file (from the given path or default location)
     *
     * Note that this method blocks while loading the given path and should
     * thus be used with care! While this should be relatively fast for normal
     * resolv.conf files, this may be an issue if this file is located on a slow
     * device or contains an excessive number of entries. In particular, this
     * method should only be executed before the loop starts, not while it is
     * running.
     *
     * Note that this method will throw if the given file can not be loaded,
     * such as if it is not readable or does not exist. In particular, this file
     * is not available on Windows.
     *
     * Currently, this will only parse valid "nameserver X" lines from the
     * given file contents. Lines can be commented out with "#" and ";" and
     * invalid lines will be ignored without complaining. See also
     * `man resolv.conf` for more details.
     *
     * Note that the previous section implies that this may return an empty
     * `Config` object if no valid "nameserver X" lines can be found. See also
     * `man resolv.conf` which suggests that the DNS server on the localhost
     * should be used in this case. This is left up to higher level consumers
     * of this API.
     *
     * @param ?string $path (optional) path to resolv.conf file or null=load default location
     * @return self
     * @throws RuntimeException if the path can not be loaded (does not exist)
     */
    public static function loadResolvConfBlocking($path = null)
    {
        if ($path === null) {
            $path = '/etc/resolv.conf';
        }
        $contents = @\file_get_contents($path);
        if ($contents === \false) {
            throw new RuntimeException('Unable to load resolv.conf file "' . $path . '"');
        }
        $matches = array();
        \preg_match_all('/^nameserver\\s+(\\S+)\\s*$/m', $contents, $matches);
        $config = new self();
        foreach ($matches[1] as $ip) {
            // remove IPv6 zone ID (`fe80::1%lo0` => `fe80:1`)
            if (\strpos($ip, ':') !== \false && ($pos = \strpos($ip, '%')) !== \false) {
                $ip = \substr($ip, 0, $pos);
            }
            if (@\inet_pton($ip) !== \false) {
                $config->nameservers[] = $ip;
            }
        }
        return $config;
    }
    /**
     * Loads the DNS configurations from Windows's WMIC (from the given command or default command)
     *
     * Note that this method blocks while loading the given command and should
     * thus be used with care! While this should be relatively fast for normal
     * WMIC commands, it remains unknown if this may block under certain
     * circumstances. In particular, this method should only be executed before
     * the loop starts, not while it is running.
     *
     * Note that this method will only try to execute the given command try to
     * parse its output, irrespective of whether this command exists. In
     * particular, this command is only available on Windows. Currently, this
     * will only parse valid nameserver entries from the command output and will
     * ignore all other output without complaining.
     *
     * Note that the previous section implies that this may return an empty
     * `Config` object if no valid nameserver entries can be found.
     *
     * @param ?string $command (advanced) should not be given (NULL) unless you know what you're doing
     * @return self
     * @link https://ss64.com/nt/wmic.html
     */
    public static function loadWmicBlocking($command = null)
    {
        $contents = \shell_exec($command === null ? 'wmic NICCONFIG get "DNSServerSearchOrder" /format:CSV' : $command);
        \preg_match_all('/(?<=[{;,"])([\\da-f.:]{4,})(?=[};,"])/i', $contents, $matches);
        $config = new self();
        $config->nameservers = $matches[1];
        return $config;
    }
    public $nameservers = array();
}
<?php

namespace _PHPStan_dcc7b7cff\React\Dns\Config;

use RuntimeException;
/**
 * Represents a static hosts file which maps hostnames to IPs
 *
 * Hosts files are used on most systems to avoid actually hitting the DNS for
 * certain common hostnames.
 *
 * Most notably, this file usually contains an entry to map "localhost" to the
 * local IP. Windows is a notable exception here, as Windows does not actually
 * include "localhost" in this file by default. To compensate for this, this
 * class may explicitly be wrapped in another HostsFile instance which
 * hard-codes these entries for Windows (see also Factory).
 *
 * This class mostly exists to abstract the parsing/extraction process so this
 * can be replaced with a faster alternative in the future.
 */
class HostsFile
{
    /**
     * Returns the default path for the hosts file on this system
     *
     * @return string
     * @codeCoverageIgnore
     */
    public static function getDefaultPath()
    {
        // use static path for all Unix-based systems
        if (\DIRECTORY_SEPARATOR !== '\\') {
            return '/etc/hosts';
        }
        // Windows actually stores the path in the registry under
        // \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DataBasePath
        $path = '_PHPStan_dcc7b7cff\\%SystemRoot%\\system32\\drivers\\etc\\hosts';
        $base = \getenv('SystemRoot');
        if ($base === \false) {
            $base = 'C:\\Windows';
        }
        return \str_replace('%SystemRoot%', $base, $path);
    }
    /**
     * Loads a hosts file (from the given path or default location)
     *
     * Note that this method blocks while loading the given path and should
     * thus be used with care! While this should be relatively fast for normal
     * hosts file, this may be an issue if this file is located on a slow device
     * or contains an excessive number of entries. In particular, this method
     * should only be executed before the loop starts, not while it is running.
     *
     * @param ?string $path (optional) path to hosts file or null=load default location
     * @return self
     * @throws RuntimeException if the path can not be loaded (does not exist)
     */
    public static function loadFromPathBlocking($path = null)
    {
        if ($path === null) {
            $path = self::getDefaultPath();
        }
        $contents = @\file_get_contents($path);
        if ($contents === \false) {
            throw new RuntimeException('Unable to load hosts file "' . $path . '"');
        }
        return new self($contents);
    }
    private $contents;
    /**
     * Instantiate new hosts file with the given hosts file contents
     *
     * @param string $contents
     */
    public function __construct($contents)
    {
        // remove all comments from the contents
        $contents = \preg_replace('/[ \\t]*#.*/', '', \strtolower($contents));
        $this->contents = $contents;
    }
    /**
     * Returns all IPs for the given hostname
     *
     * @param string $name
     * @return string[]
     */
    public function getIpsForHost($name)
    {
        $name = \strtolower($name);
        $ips = array();
        foreach (\preg_split('/\\r?\\n/', $this->contents) as $line) {
            $parts = \preg_split('/\\s+/', $line);
            $ip = \array_shift($parts);
            if ($parts && \array_search($name, $parts) !== \false) {
                // remove IPv6 zone ID (`fe80::1%lo0` => `fe80:1`)
                if (\strpos($ip, ':') !== \false && ($pos = \strpos($ip, '%')) !== \false) {
                    $ip = \substr($ip, 0, $pos);
                }
                if (@\inet_pton($ip) !== \false) {
                    $ips[] = $ip;
                }
            }
        }
        return $ips;
    }
    /**
     * Returns all hostnames for the given IPv4 or IPv6 address
     *
     * @param string $ip
     * @return string[]
     */
    public function getHostsForIp($ip)
    {
        // check binary representation of IP to avoid string case and short notation
        $ip = @\inet_pton($ip);
        if ($ip === \false) {
            return array();
        }
        $names = array();
        foreach (\preg_split('/\\r?\\n/', $this->contents) as $line) {
            $parts = \preg_split('/\\s+/', $line, -1, \PREG_SPLIT_NO_EMPTY);
            $addr = (string) \array_shift($parts);
            // remove IPv6 zone ID (`fe80::1%lo0` => `fe80:1`)
            if (\strpos($addr, ':') !== \false && ($pos = \strpos($addr, '%')) !== \false) {
                $addr = \substr($addr, 0, $pos);
            }
            if (@\inet_pton($addr) === $ip) {
                foreach ($parts as $part) {
                    $names[] = $part;
                }
            }
        }
        return $names;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Dns;

final class RecordNotFoundException extends \Exception
{
}
<?php

namespace _PHPStan_dcc7b7cff\React\Dns\Model;

use _PHPStan_dcc7b7cff\React\Dns\Query\Query;
/**
 * This class represents an outgoing query message or an incoming response message
 *
 * @link https://tools.ietf.org/html/rfc1035#section-4.1.1
 */
final class Message
{
    const TYPE_A = 1;
    const TYPE_NS = 2;
    const TYPE_CNAME = 5;
    const TYPE_SOA = 6;
    const TYPE_PTR = 12;
    const TYPE_MX = 15;
    const TYPE_TXT = 16;
    const TYPE_AAAA = 28;
    const TYPE_SRV = 33;
    const TYPE_SSHFP = 44;
    /**
     * pseudo-type for EDNS0
     *
     * These are included in the additional section and usually not in answer section.
     * Defined in [RFC 6891](https://tools.ietf.org/html/rfc6891) (or older
     * [RFC 2671](https://tools.ietf.org/html/rfc2671)).
     *
     * The OPT record uses the "class" field to store the maximum size.
     *
     * The OPT record uses the "ttl" field to store additional flags.
     */
    const TYPE_OPT = 41;
    /**
     * Sender Policy Framework (SPF) had a dedicated SPF type which has been
     * deprecated in favor of reusing the existing TXT type.
     *
     * @deprecated https://datatracker.ietf.org/doc/html/rfc7208#section-3.1
     * @see self::TYPE_TXT
     */
    const TYPE_SPF = 99;
    const TYPE_ANY = 255;
    const TYPE_CAA = 257;
    const CLASS_IN = 1;
    const OPCODE_QUERY = 0;
    const OPCODE_IQUERY = 1;
    // inverse query
    const OPCODE_STATUS = 2;
    const RCODE_OK = 0;
    const RCODE_FORMAT_ERROR = 1;
    const RCODE_SERVER_FAILURE = 2;
    const RCODE_NAME_ERROR = 3;
    const RCODE_NOT_IMPLEMENTED = 4;
    const RCODE_REFUSED = 5;
    /**
     * The edns-tcp-keepalive EDNS0 Option
     *
     * Option value contains a `?float` with timeout in seconds (in 0.1s steps)
     * for DNS response or `null` for DNS query.
     *
     * @link https://tools.ietf.org/html/rfc7828
     */
    const OPT_TCP_KEEPALIVE = 11;
    /**
     * The EDNS(0) Padding Option
     *
     * Option value contains a `string` with binary data (usually variable
     * number of null bytes)
     *
     * @link https://tools.ietf.org/html/rfc7830
     */
    const OPT_PADDING = 12;
    /**
     * Creates a new request message for the given query
     *
     * @param Query $query
     * @return self
     */
    public static function createRequestForQuery(Query $query)
    {
        $request = new Message();
        $request->id = self::generateId();
        $request->rd = \true;
        $request->questions[] = $query;
        return $request;
    }
    /**
     * Creates a new response message for the given query with the given answer records
     *
     * @param Query    $query
     * @param Record[] $answers
     * @return self
     */
    public static function createResponseWithAnswersForQuery(Query $query, array $answers)
    {
        $response = new Message();
        $response->id = self::generateId();
        $response->qr = \true;
        $response->rd = \true;
        $response->questions[] = $query;
        foreach ($answers as $record) {
            $response->answers[] = $record;
        }
        return $response;
    }
    /**
     * generates a random 16 bit message ID
     *
     * This uses a CSPRNG so that an outside attacker that is sending spoofed
     * DNS response messages can not guess the message ID to avoid possible
     * cache poisoning attacks.
     *
     * The `random_int()` function is only available on PHP 7+ or when
     * https://github.com/paragonie/random_compat is installed. As such, using
     * the latest supported PHP version is highly recommended. This currently
     * falls back to a less secure random number generator on older PHP versions
     * in the hope that this system is properly protected against outside
     * attackers, for example by using one of the common local DNS proxy stubs.
     *
     * @return int
     * @see self::getId()
     * @codeCoverageIgnore
     */
    private static function generateId()
    {
        if (\function_exists('random_int')) {
            return \random_int(0, 0xffff);
        }
        return \mt_rand(0, 0xffff);
    }
    /**
     * The 16 bit message ID
     *
     * The response message ID has to match the request message ID. This allows
     * the receiver to verify this is the correct response message. An outside
     * attacker may try to inject fake responses by "guessing" the message ID,
     * so this should use a proper CSPRNG to avoid possible cache poisoning.
     *
     * @var int 16 bit message ID
     * @see self::generateId()
     */
    public $id = 0;
    /**
     * @var bool Query/Response flag, query=false or response=true
     */
    public $qr = \false;
    /**
     * @var int specifies the kind of query (4 bit), see self::OPCODE_* constants
     * @see self::OPCODE_QUERY
     */
    public $opcode = self::OPCODE_QUERY;
    /**
     *
     * @var bool Authoritative Answer
     */
    public $aa = \false;
    /**
     * @var bool TrunCation
     */
    public $tc = \false;
    /**
     * @var bool Recursion Desired
     */
    public $rd = \false;
    /**
     * @var bool Recursion Available
     */
    public $ra = \false;
    /**
     * @var int response code (4 bit), see self::RCODE_* constants
     * @see self::RCODE_OK
     */
    public $rcode = Message::RCODE_OK;
    /**
     * An array of Query objects
     *
     * ```php
     * $questions = array(
     *     new Query(
     *         'reactphp.org',
     *         Message::TYPE_A,
     *         Message::CLASS_IN
     *     )
     * );
     * ```
     *
     * @var Query[]
     */
    public $questions = array();
    /**
     * @var Record[]
     */
    public $answers = array();
    /**
     * @var Record[]
     */
    public $authority = array();
    /**
     * @var Record[]
     */
    public $additional = array();
}
<?php

namespace _PHPStan_dcc7b7cff\React\Dns\Model;

/**
 * This class represents a single resulting record in a response message
 *
 * It uses a structure similar to `\React\Dns\Query\Query`, but does include
 * fields for resulting TTL and resulting record data (IPs etc.).
 *
 * @link https://tools.ietf.org/html/rfc1035#section-4.1.3
 * @see \React\Dns\Query\Query
 */
final class Record
{
    /**
     * @var string hostname without trailing dot, for example "reactphp.org"
     */
    public $name;
    /**
     * @var int see Message::TYPE_* constants (UINT16)
     */
    public $type;
    /**
     * Defines the network class, usually `Message::CLASS_IN`.
     *
     * For `OPT` records (EDNS0), this defines the maximum message size instead.
     *
     * @var int see Message::CLASS_IN constant (UINT16)
     * @see Message::CLASS_IN
     */
    public $class;
    /**
     * Defines the maximum time-to-live (TTL) in seconds
     *
     * For `OPT` records (EDNS0), this defines additional flags instead.
     *
     * @var int maximum TTL in seconds (UINT32, most significant bit always unset)
     * @link https://tools.ietf.org/html/rfc2181#section-8
     * @link https://tools.ietf.org/html/rfc6891#section-6.1.3 for `OPT` records (EDNS0)
     */
    public $ttl;
    /**
     * The payload data for this record
     *
     * The payload data format depends on the record type. As a rule of thumb,
     * this library will try to express this in a way that can be consumed
     * easily without having to worry about DNS internals and its binary transport:
     *
     * - A:
     *   IPv4 address string, for example "192.168.1.1".
     *
     * - AAAA:
     *   IPv6 address string, for example "::1".
     *
     * - CNAME / PTR / NS:
     *   The hostname without trailing dot, for example "reactphp.org".
     *
     * - TXT:
     *   List of string values, for example `["v=spf1 include:example.com"]`.
     *   This is commonly a list with only a single string value, but this
     *   technically allows multiple strings (0-255 bytes each) in a single
     *   record. This is rarely used and depending on application you may want
     *   to join these together or handle them separately. Each string can
     *   transport any binary data, its character encoding is not defined (often
     *   ASCII/UTF-8 in practice). [RFC 1464](https://tools.ietf.org/html/rfc1464)
     *   suggests using key-value pairs such as `["name=test","version=1"]`, but
     *   interpretation of this is not enforced and left up to consumers of this
     *   library (used for DNS-SD/Zeroconf and others).
     *
     * - MX:
     *   Mail server priority (UINT16) and target hostname without trailing dot,
     *   for example `{"priority":10,"target":"mx.example.com"}`.
     *   The payload data uses an associative array with fixed keys "priority"
     *   (also commonly referred to as weight or preference) and "target" (also
     *   referred to as exchange). If a response message contains multiple
     *   records of this type, targets should be sorted by priority (lowest
     *   first) - this is left up to consumers of this library (used for SMTP).
     *
     * - SRV:
     *   Service priority (UINT16), service weight (UINT16), service port (UINT16)
     *   and target hostname without trailing dot, for example
     *   `{"priority":10,"weight":50,"port":8080,"target":"example.com"}`.
     *   The payload data uses an associative array with fixed keys "priority",
     *   "weight", "port" and "target" (also referred to as name).
     *   The target may be an empty host name string if the service is decidedly
     *   not available. If a response message contains multiple records of this
     *   type, targets should be sorted by priority (lowest first) and selected
     *   randomly according to their weight - this is left up to consumers of
     *   this library, see also [RFC 2782](https://tools.ietf.org/html/rfc2782)
     *   for more details.
     *
     * - SSHFP:
     *   Includes algorithm (UNIT8), fingerprint type (UNIT8) and fingerprint
     *   value as lower case hex string, for example:
     *   `{"algorithm":1,"type":1,"fingerprint":"0123456789abcdef..."}`
     *   See also https://www.iana.org/assignments/dns-sshfp-rr-parameters/dns-sshfp-rr-parameters.xhtml
     *   for algorithm and fingerprint type assignments.
     *
     * - SOA:
     *   Includes master hostname without trailing dot, responsible person email
     *   as hostname without trailing dot and serial, refresh, retry, expire and
     *   minimum times in seconds (UINT32 each), for example:
     *   `{"mname":"ns.example.com","rname":"hostmaster.example.com","serial":
     *   2018082601,"refresh":3600,"retry":1800,"expire":60000,"minimum":3600}`.
     *
     * - CAA:
     *   Includes flag (UNIT8), tag string and value string, for example:
     *   `{"flag":128,"tag":"issue","value":"letsencrypt.org"}`
     *
     * - OPT:
     *   Special pseudo-type for EDNS0. Includes an array of additional opt codes
     *   with a value according to the respective OPT code. See `Message::OPT_*`
     *   for list of supported OPT codes. Any other OPT code not currently
     *   supported will be an opaque binary string containing the raw data
     *   as transported in the DNS record. For forwards compatibility, you should
     *   not rely on this format for unknown types. Future versions may add
     *   support for new types and this may then parse the payload data
     *   appropriately - this will not be considered a BC break. See also
     *   [RFC 6891](https://tools.ietf.org/html/rfc6891) for more details.
     *
     * - Any other unknown type:
     *   An opaque binary string containing the RDATA as transported in the DNS
     *   record. For forwards compatibility, you should not rely on this format
     *   for unknown types. Future versions may add support for new types and
     *   this may then parse the payload data appropriately - this will not be
     *   considered a BC break. See the format definition of known types above
     *   for more details.
     *
     * @var string|string[]|array
     */
    public $data;
    /**
     * @param string                $name
     * @param int                   $type
     * @param int                   $class
     * @param int                   $ttl
     * @param string|string[]|array $data
     */
    public function __construct($name, $type, $class, $ttl, $data)
    {
        $this->name = $name;
        $this->type = $type;
        $this->class = $class;
        $this->ttl = $ttl;
        $this->data = $data;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Dns\Protocol;

use _PHPStan_dcc7b7cff\React\Dns\Model\Message;
use _PHPStan_dcc7b7cff\React\Dns\Model\Record;
use _PHPStan_dcc7b7cff\React\Dns\Query\Query;
final class BinaryDumper
{
    /**
     * @param Message $message
     * @return string
     */
    public function toBinary(Message $message)
    {
        $data = '';
        $data .= $this->headerToBinary($message);
        $data .= $this->questionToBinary($message->questions);
        $data .= $this->recordsToBinary($message->answers);
        $data .= $this->recordsToBinary($message->authority);
        $data .= $this->recordsToBinary($message->additional);
        return $data;
    }
    /**
     * @param Message $message
     * @return string
     */
    private function headerToBinary(Message $message)
    {
        $data = '';
        $data .= \pack('n', $message->id);
        $flags = 0x0;
        $flags = $flags << 1 | ($message->qr ? 1 : 0);
        $flags = $flags << 4 | $message->opcode;
        $flags = $flags << 1 | ($message->aa ? 1 : 0);
        $flags = $flags << 1 | ($message->tc ? 1 : 0);
        $flags = $flags << 1 | ($message->rd ? 1 : 0);
        $flags = $flags << 1 | ($message->ra ? 1 : 0);
        $flags = $flags << 3 | 0;
        // skip unused zero bit
        $flags = $flags << 4 | $message->rcode;
        $data .= \pack('n', $flags);
        $data .= \pack('n', \count($message->questions));
        $data .= \pack('n', \count($message->answers));
        $data .= \pack('n', \count($message->authority));
        $data .= \pack('n', \count($message->additional));
        return $data;
    }
    /**
     * @param Query[] $questions
     * @return string
     */
    private function questionToBinary(array $questions)
    {
        $data = '';
        foreach ($questions as $question) {
            $data .= $this->domainNameToBinary($question->name);
            $data .= \pack('n*', $question->type, $question->class);
        }
        return $data;
    }
    /**
     * @param Record[] $records
     * @return string
     */
    private function recordsToBinary(array $records)
    {
        $data = '';
        foreach ($records as $record) {
            /* @var $record Record */
            switch ($record->type) {
                case Message::TYPE_A:
                case Message::TYPE_AAAA:
                    $binary = \inet_pton($record->data);
                    break;
                case Message::TYPE_CNAME:
                case Message::TYPE_NS:
                case Message::TYPE_PTR:
                    $binary = $this->domainNameToBinary($record->data);
                    break;
                case Message::TYPE_TXT:
                case Message::TYPE_SPF:
                    $binary = $this->textsToBinary($record->data);
                    break;
                case Message::TYPE_MX:
                    $binary = \pack('n', $record->data['priority']);
                    $binary .= $this->domainNameToBinary($record->data['target']);
                    break;
                case Message::TYPE_SRV:
                    $binary = \pack('n*', $record->data['priority'], $record->data['weight'], $record->data['port']);
                    $binary .= $this->domainNameToBinary($record->data['target']);
                    break;
                case Message::TYPE_SOA:
                    $binary = $this->domainNameToBinary($record->data['mname']);
                    $binary .= $this->domainNameToBinary($record->data['rname']);
                    $binary .= \pack('N*', $record->data['serial'], $record->data['refresh'], $record->data['retry'], $record->data['expire'], $record->data['minimum']);
                    break;
                case Message::TYPE_CAA:
                    $binary = \pack('C*', $record->data['flag'], \strlen($record->data['tag']));
                    $binary .= $record->data['tag'];
                    $binary .= $record->data['value'];
                    break;
                case Message::TYPE_SSHFP:
                    $binary = \pack('CCH*', $record->data['algorithm'], $record->data['type'], $record->data['fingerprint']);
                    break;
                case Message::TYPE_OPT:
                    $binary = '';
                    foreach ($record->data as $opt => $value) {
                        if ($opt === Message::OPT_TCP_KEEPALIVE && $value !== null) {
                            $value = \pack('n', \round($value * 10));
                        }
                        $binary .= \pack('n*', $opt, \strlen((string) $value)) . $value;
                    }
                    break;
                default:
                    // RDATA is already stored as binary value for unknown record types
                    $binary = $record->data;
            }
            $data .= $this->domainNameToBinary($record->name);
            $data .= \pack('nnNn', $record->type, $record->class, $record->ttl, \strlen($binary));
            $data .= $binary;
        }
        return $data;
    }
    /**
     * @param string[] $texts
     * @return string
     */
    private function textsToBinary(array $texts)
    {
        $data = '';
        foreach ($texts as $text) {
            $data .= \chr(\strlen($text)) . $text;
        }
        return $data;
    }
    /**
     * @param string $host
     * @return string
     */
    private function domainNameToBinary($host)
    {
        if ($host === '') {
            return "\x00";
        }
        // break up domain name at each dot that is not preceeded by a backslash (escaped notation)
        return $this->textsToBinary(\array_map('stripcslashes', \preg_split('/(?<!\\\\)\\./', $host . '.')));
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Dns\Protocol;

use _PHPStan_dcc7b7cff\React\Dns\Model\Message;
use _PHPStan_dcc7b7cff\React\Dns\Model\Record;
use _PHPStan_dcc7b7cff\React\Dns\Query\Query;
use InvalidArgumentException;
/**
 * DNS protocol parser
 *
 * Obsolete and uncommon types and classes are not implemented.
 */
final class Parser
{
    /**
     * Parses the given raw binary message into a Message object
     *
     * @param string $data
     * @throws InvalidArgumentException
     * @return Message
     */
    public function parseMessage($data)
    {
        $message = $this->parse($data, 0);
        if ($message === null) {
            throw new InvalidArgumentException('Unable to parse binary message');
        }
        return $message;
    }
    /**
     * @param string $data
     * @param int    $consumed
     * @return ?Message
     */
    private function parse($data, $consumed)
    {
        if (!isset($data[12 - 1])) {
            return null;
        }
        list($id, $fields, $qdCount, $anCount, $nsCount, $arCount) = \array_values(\unpack('n*', \substr($data, 0, 12)));
        $message = new Message();
        $message->id = $id;
        $message->rcode = $fields & 0xf;
        $message->ra = ($fields >> 7 & 1) === 1;
        $message->rd = ($fields >> 8 & 1) === 1;
        $message->tc = ($fields >> 9 & 1) === 1;
        $message->aa = ($fields >> 10 & 1) === 1;
        $message->opcode = $fields >> 11 & 0xf;
        $message->qr = ($fields >> 15 & 1) === 1;
        $consumed += 12;
        // parse all questions
        for ($i = $qdCount; $i > 0; --$i) {
            list($question, $consumed) = $this->parseQuestion($data, $consumed);
            if ($question === null) {
                return null;
            } else {
                $message->questions[] = $question;
            }
        }
        // parse all answer records
        for ($i = $anCount; $i > 0; --$i) {
            list($record, $consumed) = $this->parseRecord($data, $consumed);
            if ($record === null) {
                return null;
            } else {
                $message->answers[] = $record;
            }
        }
        // parse all authority records
        for ($i = $nsCount; $i > 0; --$i) {
            list($record, $consumed) = $this->parseRecord($data, $consumed);
            if ($record === null) {
                return null;
            } else {
                $message->authority[] = $record;
            }
        }
        // parse all additional records
        for ($i = $arCount; $i > 0; --$i) {
            list($record, $consumed) = $this->parseRecord($data, $consumed);
            if ($record === null) {
                return null;
            } else {
                $message->additional[] = $record;
            }
        }
        return $message;
    }
    /**
     * @param string $data
     * @param int $consumed
     * @return array
     */
    private function parseQuestion($data, $consumed)
    {
        list($labels, $consumed) = $this->readLabels($data, $consumed);
        if ($labels === null || !isset($data[$consumed + 4 - 1])) {
            return array(null, null);
        }
        list($type, $class) = \array_values(\unpack('n*', \substr($data, $consumed, 4)));
        $consumed += 4;
        return array(new Query(\implode('.', $labels), $type, $class), $consumed);
    }
    /**
     * @param string $data
     * @param int $consumed
     * @return array An array with a parsed Record on success or array with null if data is invalid/incomplete
     */
    private function parseRecord($data, $consumed)
    {
        list($name, $consumed) = $this->readDomain($data, $consumed);
        if ($name === null || !isset($data[$consumed + 10 - 1])) {
            return array(null, null);
        }
        list($type, $class) = \array_values(\unpack('n*', \substr($data, $consumed, 4)));
        $consumed += 4;
        list($ttl) = \array_values(\unpack('N', \substr($data, $consumed, 4)));
        $consumed += 4;
        // TTL is a UINT32 that must not have most significant bit set for BC reasons
        if ($ttl < 0 || $ttl >= 1 << 31) {
            $ttl = 0;
        }
        list($rdLength) = \array_values(\unpack('n', \substr($data, $consumed, 2)));
        $consumed += 2;
        if (!isset($data[$consumed + $rdLength - 1])) {
            return array(null, null);
        }
        $rdata = null;
        $expected = $consumed + $rdLength;
        if (Message::TYPE_A === $type) {
            if ($rdLength === 4) {
                $rdata = \inet_ntop(\substr($data, $consumed, $rdLength));
                $consumed += $rdLength;
            }
        } elseif (Message::TYPE_AAAA === $type) {
            if ($rdLength === 16) {
                $rdata = \inet_ntop(\substr($data, $consumed, $rdLength));
                $consumed += $rdLength;
            }
        } elseif (Message::TYPE_CNAME === $type || Message::TYPE_PTR === $type || Message::TYPE_NS === $type) {
            list($rdata, $consumed) = $this->readDomain($data, $consumed);
        } elseif (Message::TYPE_TXT === $type || Message::TYPE_SPF === $type) {
            $rdata = array();
            while ($consumed < $expected) {
                $len = \ord($data[$consumed]);
                $rdata[] = (string) \substr($data, $consumed + 1, $len);
                $consumed += $len + 1;
            }
        } elseif (Message::TYPE_MX === $type) {
            if ($rdLength > 2) {
                list($priority) = \array_values(\unpack('n', \substr($data, $consumed, 2)));
                list($target, $consumed) = $this->readDomain($data, $consumed + 2);
                $rdata = array('priority' => $priority, 'target' => $target);
            }
        } elseif (Message::TYPE_SRV === $type) {
            if ($rdLength > 6) {
                list($priority, $weight, $port) = \array_values(\unpack('n*', \substr($data, $consumed, 6)));
                list($target, $consumed) = $this->readDomain($data, $consumed + 6);
                $rdata = array('priority' => $priority, 'weight' => $weight, 'port' => $port, 'target' => $target);
            }
        } elseif (Message::TYPE_SSHFP === $type) {
            if ($rdLength > 2) {
                list($algorithm, $hash) = \array_values(\unpack('C*', \substr($data, $consumed, 2)));
                $fingerprint = \bin2hex(\substr($data, $consumed + 2, $rdLength - 2));
                $consumed += $rdLength;
                $rdata = array('algorithm' => $algorithm, 'type' => $hash, 'fingerprint' => $fingerprint);
            }
        } elseif (Message::TYPE_SOA === $type) {
            list($mname, $consumed) = $this->readDomain($data, $consumed);
            list($rname, $consumed) = $this->readDomain($data, $consumed);
            if ($mname !== null && $rname !== null && isset($data[$consumed + 20 - 1])) {
                list($serial, $refresh, $retry, $expire, $minimum) = \array_values(\unpack('N*', \substr($data, $consumed, 20)));
                $consumed += 20;
                $rdata = array('mname' => $mname, 'rname' => $rname, 'serial' => $serial, 'refresh' => $refresh, 'retry' => $retry, 'expire' => $expire, 'minimum' => $minimum);
            }
        } elseif (Message::TYPE_OPT === $type) {
            $rdata = array();
            while (isset($data[$consumed + 4 - 1])) {
                list($code, $length) = \array_values(\unpack('n*', \substr($data, $consumed, 4)));
                $value = (string) \substr($data, $consumed + 4, $length);
                if ($code === Message::OPT_TCP_KEEPALIVE && $value === '') {
                    $value = null;
                } elseif ($code === Message::OPT_TCP_KEEPALIVE && $length === 2) {
                    list($value) = \array_values(\unpack('n', $value));
                    $value = \round($value * 0.1, 1);
                } elseif ($code === Message::OPT_TCP_KEEPALIVE) {
                    break;
                }
                $rdata[$code] = $value;
                $consumed += 4 + $length;
            }
        } elseif (Message::TYPE_CAA === $type) {
            if ($rdLength > 3) {
                list($flag, $tagLength) = \array_values(\unpack('C*', \substr($data, $consumed, 2)));
                if ($tagLength > 0 && $rdLength - 2 - $tagLength > 0) {
                    $tag = \substr($data, $consumed + 2, $tagLength);
                    $value = \substr($data, $consumed + 2 + $tagLength, $rdLength - 2 - $tagLength);
                    $consumed += $rdLength;
                    $rdata = array('flag' => $flag, 'tag' => $tag, 'value' => $value);
                }
            }
        } else {
            // unknown types simply parse rdata as an opaque binary string
            $rdata = \substr($data, $consumed, $rdLength);
            $consumed += $rdLength;
        }
        // ensure parsing record data consumes expact number of bytes indicated in record length
        if ($consumed !== $expected || $rdata === null) {
            return array(null, null);
        }
        return array(new Record($name, $type, $class, $ttl, $rdata), $consumed);
    }
    private function readDomain($data, $consumed)
    {
        list($labels, $consumed) = $this->readLabels($data, $consumed);
        if ($labels === null) {
            return array(null, null);
        }
        // use escaped notation for each label part, then join using dots
        return array(\implode('.', \array_map(function ($label) {
            return \addcslashes($label, "\x00.. .");
        }, $labels)), $consumed);
    }
    /**
     * @param string $data
     * @param int    $consumed
     * @param int    $compressionDepth maximum depth for compressed labels to avoid unreasonable recursion
     * @return array
     */
    private function readLabels($data, $consumed, $compressionDepth = 127)
    {
        $labels = array();
        while (\true) {
            if (!isset($data[$consumed])) {
                return array(null, null);
            }
            $length = \ord($data[$consumed]);
            // end of labels reached
            if ($length === 0) {
                $consumed += 1;
                break;
            }
            // first two bits set? this is a compressed label (14 bit pointer offset)
            if (($length & 0xc0) === 0xc0 && isset($data[$consumed + 1]) && $compressionDepth) {
                $offset = ($length & ~0xc0) << 8 | \ord($data[$consumed + 1]);
                if ($offset >= $consumed) {
                    return array(null, null);
                }
                $consumed += 2;
                list($newLabels) = $this->readLabels($data, $offset, $compressionDepth - 1);
                if ($newLabels === null) {
                    return array(null, null);
                }
                $labels = \array_merge($labels, $newLabels);
                break;
            }
            // length MUST be 0-63 (6 bits only) and data has to be large enough
            if ($length & 0xc0 || !isset($data[$consumed + $length - 1])) {
                return array(null, null);
            }
            $labels[] = \substr($data, $consumed + 1, $length);
            $consumed += $length + 1;
        }
        return array($labels, $consumed);
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Dns\Resolver;

use _PHPStan_dcc7b7cff\React\Cache\ArrayCache;
use _PHPStan_dcc7b7cff\React\Cache\CacheInterface;
use _PHPStan_dcc7b7cff\React\Dns\Config\Config;
use _PHPStan_dcc7b7cff\React\Dns\Config\HostsFile;
use _PHPStan_dcc7b7cff\React\Dns\Query\CachingExecutor;
use _PHPStan_dcc7b7cff\React\Dns\Query\CoopExecutor;
use _PHPStan_dcc7b7cff\React\Dns\Query\ExecutorInterface;
use _PHPStan_dcc7b7cff\React\Dns\Query\FallbackExecutor;
use _PHPStan_dcc7b7cff\React\Dns\Query\HostsFileExecutor;
use _PHPStan_dcc7b7cff\React\Dns\Query\RetryExecutor;
use _PHPStan_dcc7b7cff\React\Dns\Query\SelectiveTransportExecutor;
use _PHPStan_dcc7b7cff\React\Dns\Query\TcpTransportExecutor;
use _PHPStan_dcc7b7cff\React\Dns\Query\TimeoutExecutor;
use _PHPStan_dcc7b7cff\React\Dns\Query\UdpTransportExecutor;
use _PHPStan_dcc7b7cff\React\EventLoop\Loop;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
final class Factory
{
    /**
     * Creates a DNS resolver instance for the given DNS config
     *
     * As of v1.7.0 it's recommended to pass a `Config` object instead of a
     * single nameserver address. If the given config contains more than one DNS
     * nameserver, all DNS nameservers will be used in order. The primary DNS
     * server will always be used first before falling back to the secondary or
     * tertiary DNS server.
     *
     * @param Config|string  $config DNS Config object (recommended) or single nameserver address
     * @param ?LoopInterface $loop
     * @return \React\Dns\Resolver\ResolverInterface
     * @throws \InvalidArgumentException for invalid DNS server address
     * @throws \UnderflowException when given DNS Config object has an empty list of nameservers
     */
    public function create($config, LoopInterface $loop = null)
    {
        $executor = $this->decorateHostsFileExecutor($this->createExecutor($config, $loop ?: Loop::get()));
        return new Resolver($executor);
    }
    /**
     * Creates a cached DNS resolver instance for the given DNS config and cache
     *
     * As of v1.7.0 it's recommended to pass a `Config` object instead of a
     * single nameserver address. If the given config contains more than one DNS
     * nameserver, all DNS nameservers will be used in order. The primary DNS
     * server will always be used first before falling back to the secondary or
     * tertiary DNS server.
     *
     * @param Config|string   $config DNS Config object (recommended) or single nameserver address
     * @param ?LoopInterface  $loop
     * @param ?CacheInterface $cache
     * @return \React\Dns\Resolver\ResolverInterface
     * @throws \InvalidArgumentException for invalid DNS server address
     * @throws \UnderflowException when given DNS Config object has an empty list of nameservers
     */
    public function createCached($config, LoopInterface $loop = null, CacheInterface $cache = null)
    {
        // default to keeping maximum of 256 responses in cache unless explicitly given
        if (!$cache instanceof CacheInterface) {
            $cache = new ArrayCache(256);
        }
        $executor = $this->createExecutor($config, $loop ?: Loop::get());
        $executor = new CachingExecutor($executor, $cache);
        $executor = $this->decorateHostsFileExecutor($executor);
        return new Resolver($executor);
    }
    /**
     * Tries to load the hosts file and decorates the given executor on success
     *
     * @param ExecutorInterface $executor
     * @return ExecutorInterface
     * @codeCoverageIgnore
     */
    private function decorateHostsFileExecutor(ExecutorInterface $executor)
    {
        try {
            $executor = new HostsFileExecutor(HostsFile::loadFromPathBlocking(), $executor);
        } catch (\RuntimeException $e) {
            // ignore this file if it can not be loaded
        }
        // Windows does not store localhost in hosts file by default but handles this internally
        // To compensate for this, we explicitly use hard-coded defaults for localhost
        if (\DIRECTORY_SEPARATOR === '\\') {
            $executor = new HostsFileExecutor(new HostsFile("127.0.0.1 localhost\n::1 localhost"), $executor);
        }
        return $executor;
    }
    /**
     * @param Config|string $nameserver
     * @param LoopInterface $loop
     * @return CoopExecutor
     * @throws \InvalidArgumentException for invalid DNS server address
     * @throws \UnderflowException when given DNS Config object has an empty list of nameservers
     */
    private function createExecutor($nameserver, LoopInterface $loop)
    {
        if ($nameserver instanceof Config) {
            if (!$nameserver->nameservers) {
                throw new \UnderflowException('Empty config with no DNS servers');
            }
            // Hard-coded to check up to 3 DNS servers to match default limits in place in most systems (see MAXNS config).
            // Note to future self: Recursion isn't too hard, but how deep do we really want to go?
            $primary = \reset($nameserver->nameservers);
            $secondary = \next($nameserver->nameservers);
            $tertiary = \next($nameserver->nameservers);
            if ($tertiary !== \false) {
                // 3 DNS servers given => nest first with fallback for second and third
                return new CoopExecutor(new RetryExecutor(new FallbackExecutor($this->createSingleExecutor($primary, $loop), new FallbackExecutor($this->createSingleExecutor($secondary, $loop), $this->createSingleExecutor($tertiary, $loop)))));
            } elseif ($secondary !== \false) {
                // 2 DNS servers given => fallback from first to second
                return new CoopExecutor(new RetryExecutor(new FallbackExecutor($this->createSingleExecutor($primary, $loop), $this->createSingleExecutor($secondary, $loop))));
            } else {
                // 1 DNS server given => use single executor
                $nameserver = $primary;
            }
        }
        return new CoopExecutor(new RetryExecutor($this->createSingleExecutor($nameserver, $loop)));
    }
    /**
     * @param string $nameserver
     * @param LoopInterface $loop
     * @return ExecutorInterface
     * @throws \InvalidArgumentException for invalid DNS server address
     */
    private function createSingleExecutor($nameserver, LoopInterface $loop)
    {
        $parts = \parse_url($nameserver);
        if (isset($parts['scheme']) && $parts['scheme'] === 'tcp') {
            $executor = $this->createTcpExecutor($nameserver, $loop);
        } elseif (isset($parts['scheme']) && $parts['scheme'] === 'udp') {
            $executor = $this->createUdpExecutor($nameserver, $loop);
        } else {
            $executor = new SelectiveTransportExecutor($this->createUdpExecutor($nameserver, $loop), $this->createTcpExecutor($nameserver, $loop));
        }
        return $executor;
    }
    /**
     * @param string $nameserver
     * @param LoopInterface $loop
     * @return TimeoutExecutor
     * @throws \InvalidArgumentException for invalid DNS server address
     */
    private function createTcpExecutor($nameserver, LoopInterface $loop)
    {
        return new TimeoutExecutor(new TcpTransportExecutor($nameserver, $loop), 5.0, $loop);
    }
    /**
     * @param string $nameserver
     * @param LoopInterface $loop
     * @return TimeoutExecutor
     * @throws \InvalidArgumentException for invalid DNS server address
     */
    private function createUdpExecutor($nameserver, LoopInterface $loop)
    {
        return new TimeoutExecutor(new UdpTransportExecutor($nameserver, $loop), 5.0, $loop);
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Dns\Resolver;

interface ResolverInterface
{
    /**
     * Resolves the given $domain name to a single IPv4 address (type `A` query).
     *
     * ```php
     * $resolver->resolve('reactphp.org')->then(function ($ip) {
     *     echo 'IP for reactphp.org is ' . $ip . PHP_EOL;
     * });
     * ```
     *
     * This is one of the main methods in this package. It sends a DNS query
     * for the given $domain name to your DNS server and returns a single IP
     * address on success.
     *
     * If the DNS server sends a DNS response message that contains more than
     * one IP address for this query, it will randomly pick one of the IP
     * addresses from the response. If you want the full list of IP addresses
     * or want to send a different type of query, you should use the
     * [`resolveAll()`](#resolveall) method instead.
     *
     * If the DNS server sends a DNS response message that indicates an error
     * code, this method will reject with a `RecordNotFoundException`. Its
     * message and code can be used to check for the response code.
     *
     * If the DNS communication fails and the server does not respond with a
     * valid response message, this message will reject with an `Exception`.
     *
     * Pending DNS queries can be cancelled by cancelling its pending promise like so:
     *
     * ```php
     * $promise = $resolver->resolve('reactphp.org');
     *
     * $promise->cancel();
     * ```
     *
     * @param string $domain
     * @return \React\Promise\PromiseInterface<string,\Exception>
     *     resolves with a single IP address on success or rejects with an Exception on error.
     */
    public function resolve($domain);
    /**
     * Resolves all record values for the given $domain name and query $type.
     *
     * ```php
     * $resolver->resolveAll('reactphp.org', Message::TYPE_A)->then(function ($ips) {
     *     echo 'IPv4 addresses for reactphp.org ' . implode(', ', $ips) . PHP_EOL;
     * });
     *
     * $resolver->resolveAll('reactphp.org', Message::TYPE_AAAA)->then(function ($ips) {
     *     echo 'IPv6 addresses for reactphp.org ' . implode(', ', $ips) . PHP_EOL;
     * });
     * ```
     *
     * This is one of the main methods in this package. It sends a DNS query
     * for the given $domain name to your DNS server and returns a list with all
     * record values on success.
     *
     * If the DNS server sends a DNS response message that contains one or more
     * records for this query, it will return a list with all record values
     * from the response. You can use the `Message::TYPE_*` constants to control
     * which type of query will be sent. Note that this method always returns a
     * list of record values, but each record value type depends on the query
     * type. For example, it returns the IPv4 addresses for type `A` queries,
     * the IPv6 addresses for type `AAAA` queries, the hostname for type `NS`,
     * `CNAME` and `PTR` queries and structured data for other queries. See also
     * the `Record` documentation for more details.
     *
     * If the DNS server sends a DNS response message that indicates an error
     * code, this method will reject with a `RecordNotFoundException`. Its
     * message and code can be used to check for the response code.
     *
     * If the DNS communication fails and the server does not respond with a
     * valid response message, this message will reject with an `Exception`.
     *
     * Pending DNS queries can be cancelled by cancelling its pending promise like so:
     *
     * ```php
     * $promise = $resolver->resolveAll('reactphp.org', Message::TYPE_AAAA);
     *
     * $promise->cancel();
     * ```
     *
     * @param string $domain
     * @return \React\Promise\PromiseInterface<array,\Exception>
     *     Resolves with all record values on success or rejects with an Exception on error.
     */
    public function resolveAll($domain, $type);
}
<?php

namespace _PHPStan_dcc7b7cff\React\Dns\Resolver;

use _PHPStan_dcc7b7cff\React\Dns\Model\Message;
use _PHPStan_dcc7b7cff\React\Dns\Query\ExecutorInterface;
use _PHPStan_dcc7b7cff\React\Dns\Query\Query;
use _PHPStan_dcc7b7cff\React\Dns\RecordNotFoundException;
/**
 * @see ResolverInterface for the base interface
 */
final class Resolver implements ResolverInterface
{
    private $executor;
    public function __construct(ExecutorInterface $executor)
    {
        $this->executor = $executor;
    }
    public function resolve($domain)
    {
        return $this->resolveAll($domain, Message::TYPE_A)->then(function (array $ips) {
            return $ips[\array_rand($ips)];
        });
    }
    public function resolveAll($domain, $type)
    {
        $query = new Query($domain, $type, Message::CLASS_IN);
        $that = $this;
        return $this->executor->query($query)->then(function (Message $response) use($query, $that) {
            return $that->extractValues($query, $response);
        });
    }
    /**
     * [Internal] extract all resource record values from response for this query
     *
     * @param Query   $query
     * @param Message $response
     * @return array
     * @throws RecordNotFoundException when response indicates an error or contains no data
     * @internal
     */
    public function extractValues(Query $query, Message $response)
    {
        // reject if response code indicates this is an error response message
        $code = $response->rcode;
        if ($code !== Message::RCODE_OK) {
            switch ($code) {
                case Message::RCODE_FORMAT_ERROR:
                    $message = 'Format Error';
                    break;
                case Message::RCODE_SERVER_FAILURE:
                    $message = 'Server Failure';
                    break;
                case Message::RCODE_NAME_ERROR:
                    $message = 'Non-Existent Domain / NXDOMAIN';
                    break;
                case Message::RCODE_NOT_IMPLEMENTED:
                    $message = 'Not Implemented';
                    break;
                case Message::RCODE_REFUSED:
                    $message = 'Refused';
                    break;
                default:
                    $message = 'Unknown error response code ' . $code;
            }
            throw new RecordNotFoundException('DNS query for ' . $query->describe() . ' returned an error response (' . $message . ')', $code);
        }
        $answers = $response->answers;
        $addresses = $this->valuesByNameAndType($answers, $query->name, $query->type);
        // reject if we did not receive a valid answer (domain is valid, but no record for this type could be found)
        if (0 === \count($addresses)) {
            throw new RecordNotFoundException('DNS query for ' . $query->describe() . ' did not return a valid answer (NOERROR / NODATA)');
        }
        return \array_values($addresses);
    }
    /**
     * @param \React\Dns\Model\Record[] $answers
     * @param string                    $name
     * @param int                       $type
     * @return array
     */
    private function valuesByNameAndType(array $answers, $name, $type)
    {
        // return all record values for this name and type (if any)
        $named = $this->filterByName($answers, $name);
        $records = $this->filterByType($named, $type);
        if ($records) {
            return $this->mapRecordData($records);
        }
        // no matching records found? check if there are any matching CNAMEs instead
        $cnameRecords = $this->filterByType($named, Message::TYPE_CNAME);
        if ($cnameRecords) {
            $cnames = $this->mapRecordData($cnameRecords);
            foreach ($cnames as $cname) {
                $records = \array_merge($records, $this->valuesByNameAndType($answers, $cname, $type));
            }
        }
        return $records;
    }
    private function filterByName(array $answers, $name)
    {
        return $this->filterByField($answers, 'name', $name);
    }
    private function filterByType(array $answers, $type)
    {
        return $this->filterByField($answers, 'type', $type);
    }
    private function filterByField(array $answers, $field, $value)
    {
        $value = \strtolower($value);
        return \array_filter($answers, function ($answer) use($field, $value) {
            return $value === \strtolower($answer->{$field});
        });
    }
    private function mapRecordData(array $records)
    {
        return \array_map(function ($record) {
            return $record->data;
        }, $records);
    }
}
The MIT License (MIT)

Copyright (c) 2012 Christian Lück, Cees-Jan Kiewiet, Jan Sorgalla, Chris Boden, Igor Wiedler

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Message;

use RuntimeException;
use _PHPStan_dcc7b7cff\Psr\Http\Message\ResponseInterface;
/**
 * The `React\Http\Message\ResponseException` is an `Exception` sub-class that will be used to reject
 * a request promise if the remote server returns a non-success status code
 * (anything but 2xx or 3xx).
 * You can control this behavior via the [`withRejectErrorResponse()` method](#withrejecterrorresponse).
 *
 * The `getCode(): int` method can be used to
 * return the HTTP response status code.
 */
final class ResponseException extends RuntimeException
{
    private $response;
    public function __construct(ResponseInterface $response, $message = null, $code = null, $previous = null)
    {
        if ($message === null) {
            $message = 'HTTP status code ' . $response->getStatusCode() . ' (' . $response->getReasonPhrase() . ')';
        }
        if ($code === null) {
            $code = $response->getStatusCode();
        }
        parent::__construct($message, $code, $previous);
        $this->response = $response;
    }
    /**
     * Access its underlying response object.
     *
     * @return ResponseInterface
     */
    public function getResponse()
    {
        return $this->response;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Message;

use _PHPStan_dcc7b7cff\Fig\Http\Message\StatusCodeInterface;
use _PHPStan_dcc7b7cff\Psr\Http\Message\StreamInterface;
use _PHPStan_dcc7b7cff\React\Http\Io\BufferedBody;
use _PHPStan_dcc7b7cff\React\Http\Io\HttpBodyStream;
use _PHPStan_dcc7b7cff\React\Stream\ReadableStreamInterface;
use _PHPStan_dcc7b7cff\RingCentral\Psr7\Response as Psr7Response;
/**
 * Represents an outgoing server response message.
 *
 * ```php
 * $response = new React\Http\Message\Response(
 *     React\Http\Message\Response::STATUS_OK,
 *     array(
 *         'Content-Type' => 'text/html'
 *     ),
 *     "<html>Hello world!</html>\n"
 * );
 * ```
 *
 * This class implements the
 * [PSR-7 `ResponseInterface`](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface)
 * which in turn extends the
 * [PSR-7 `MessageInterface`](https://www.php-fig.org/psr/psr-7/#31-psrhttpmessagemessageinterface).
 *
 * On top of this, this class implements the
 * [PSR-7 Message Util `StatusCodeInterface`](https://github.com/php-fig/http-message-util/blob/master/src/StatusCodeInterface.php)
 * which means that most common HTTP status codes are available as class
 * constants with the `STATUS_*` prefix. For instance, the `200 OK` and
 * `404 Not Found` status codes can used as `Response::STATUS_OK` and
 * `Response::STATUS_NOT_FOUND` respectively.
 *
 * > Internally, this implementation builds on top of an existing incoming
 *   response message and only adds required streaming support. This base class is
 *   considered an implementation detail that may change in the future.
 *
 * @see \Psr\Http\Message\ResponseInterface
 */
final class Response extends Psr7Response implements StatusCodeInterface
{
    /**
     * Create an HTML response
     *
     * ```php
     * $html = <<<HTML
     * <!doctype html>
     * <html>
     * <body>Hello wörld!</body>
     * </html>
     *
     * HTML;
     *
     * $response = React\Http\Message\Response::html($html);
     * ```
     *
     * This is a convenient shortcut method that returns the equivalent of this:
     *
     * ```
     * $response = new React\Http\Message\Response(
     *     React\Http\Message\Response::STATUS_OK,
     *     [
     *         'Content-Type' => 'text/html; charset=utf-8'
     *     ],
     *     $html
     * );
     * ```
     *
     * This method always returns a response with a `200 OK` status code and
     * the appropriate `Content-Type` response header for the given HTTP source
     * string encoded in UTF-8 (Unicode). It's generally recommended to end the
     * given plaintext string with a trailing newline.
     *
     * If you want to use a different status code or custom HTTP response
     * headers, you can manipulate the returned response object using the
     * provided PSR-7 methods or directly instantiate a custom HTTP response
     * object using the `Response` constructor:
     *
     * ```php
     * $response = React\Http\Message\Response::html(
     *     "<h1>Error</h1>\n<p>Invalid user name given.</p>\n"
     * )->withStatus(React\Http\Message\Response::STATUS_BAD_REQUEST);
     * ```
     *
     * @param string $html
     * @return self
     */
    public static function html($html)
    {
        return new self(self::STATUS_OK, array('Content-Type' => 'text/html; charset=utf-8'), $html);
    }
    /**
     * Create a JSON response
     *
     * ```php
     * $response = React\Http\Message\Response::json(['name' => 'Alice']);
     * ```
     *
     * This is a convenient shortcut method that returns the equivalent of this:
     *
     * ```
     * $response = new React\Http\Message\Response(
     *     React\Http\Message\Response::STATUS_OK,
     *     [
     *         'Content-Type' => 'application/json'
     *     ],
     *     json_encode(
     *         ['name' => 'Alice'],
     *         JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRESERVE_ZERO_FRACTION
     *     ) . "\n"
     * );
     * ```
     *
     * This method always returns a response with a `200 OK` status code and
     * the appropriate `Content-Type` response header for the given structured
     * data encoded as a JSON text.
     *
     * The given structured data will be encoded as a JSON text. Any `string`
     * values in the data must be encoded in UTF-8 (Unicode). If the encoding
     * fails, this method will throw an `InvalidArgumentException`.
     *
     * By default, the given structured data will be encoded with the flags as
     * shown above. This includes pretty printing (PHP 5.4+) and preserving
     * zero fractions for `float` values (PHP 5.6.6+) to ease debugging. It is
     * assumed any additional data overhead is usually compensated by using HTTP
     * response compression.
     *
     * If you want to use a different status code or custom HTTP response
     * headers, you can manipulate the returned response object using the
     * provided PSR-7 methods or directly instantiate a custom HTTP response
     * object using the `Response` constructor:
     *
     * ```php
     * $response = React\Http\Message\Response::json(
     *     ['error' => 'Invalid user name given']
     * )->withStatus(React\Http\Message\Response::STATUS_BAD_REQUEST);
     * ```
     *
     * @param mixed $data
     * @return self
     * @throws \InvalidArgumentException when encoding fails
     */
    public static function json($data)
    {
        $json = @\json_encode($data, (\defined('JSON_PRETTY_PRINT') ? \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE : 0) | (\defined('JSON_PRESERVE_ZERO_FRACTION') ? \JSON_PRESERVE_ZERO_FRACTION : 0));
        // throw on error, now `false` but used to be `(string) "null"` before PHP 5.5
        if ($json === \false || \PHP_VERSION_ID < 50500 && \json_last_error() !== \JSON_ERROR_NONE) {
            throw new \InvalidArgumentException('Unable to encode given data as JSON' . (\function_exists('json_last_error_msg') ? ': ' . \json_last_error_msg() : ''), \json_last_error());
        }
        return new self(self::STATUS_OK, array('Content-Type' => 'application/json'), $json . "\n");
    }
    /**
     * Create a plaintext response
     *
     * ```php
     * $response = React\Http\Message\Response::plaintext("Hello wörld!\n");
     * ```
     *
     * This is a convenient shortcut method that returns the equivalent of this:
     *
     * ```
     * $response = new React\Http\Message\Response(
     *     React\Http\Message\Response::STATUS_OK,
     *     [
     *         'Content-Type' => 'text/plain; charset=utf-8'
     *     ],
     *     "Hello wörld!\n"
     * );
     * ```
     *
     * This method always returns a response with a `200 OK` status code and
     * the appropriate `Content-Type` response header for the given plaintext
     * string encoded in UTF-8 (Unicode). It's generally recommended to end the
     * given plaintext string with a trailing newline.
     *
     * If you want to use a different status code or custom HTTP response
     * headers, you can manipulate the returned response object using the
     * provided PSR-7 methods or directly instantiate a custom HTTP response
     * object using the `Response` constructor:
     *
     * ```php
     * $response = React\Http\Message\Response::plaintext(
     *     "Error: Invalid user name given.\n"
     * )->withStatus(React\Http\Message\Response::STATUS_BAD_REQUEST);
     * ```
     *
     * @param string $text
     * @return self
     */
    public static function plaintext($text)
    {
        return new self(self::STATUS_OK, array('Content-Type' => 'text/plain; charset=utf-8'), $text);
    }
    /**
     * Create an XML response
     *
     * ```php
     * $xml = <<<XML
     * <?xml version="1.0" encoding="utf-8"?>
     * <body>
     *     <greeting>Hello wörld!</greeting>
     * </body>
     *
     * XML;
     *
     * $response = React\Http\Message\Response::xml($xml);
     * ```
     *
     * This is a convenient shortcut method that returns the equivalent of this:
     *
     * ```
     * $response = new React\Http\Message\Response(
     *     React\Http\Message\Response::STATUS_OK,
     *     [
     *         'Content-Type' => 'application/xml'
     *     ],
     *     $xml
     * );
     * ```
     *
     * This method always returns a response with a `200 OK` status code and
     * the appropriate `Content-Type` response header for the given XML source
     * string. It's generally recommended to use UTF-8 (Unicode) and specify
     * this as part of the leading XML declaration and to end the given XML
     * source string with a trailing newline.
     *
     * If you want to use a different status code or custom HTTP response
     * headers, you can manipulate the returned response object using the
     * provided PSR-7 methods or directly instantiate a custom HTTP response
     * object using the `Response` constructor:
     *
     * ```php
     * $response = React\Http\Message\Response::xml(
     *     "<error><message>Invalid user name given.</message></error>\n"
     * )->withStatus(React\Http\Message\Response::STATUS_BAD_REQUEST);
     * ```
     *
     * @param string $xml
     * @return self
     */
    public static function xml($xml)
    {
        return new self(self::STATUS_OK, array('Content-Type' => 'application/xml'), $xml);
    }
    /**
     * @param int                                            $status  HTTP status code (e.g. 200/404), see `self::STATUS_*` constants
     * @param array<string,string|string[]>                  $headers additional response headers
     * @param string|ReadableStreamInterface|StreamInterface $body    response body
     * @param string                                         $version HTTP protocol version (e.g. 1.1/1.0)
     * @param ?string                                        $reason  custom HTTP response phrase
     * @throws \InvalidArgumentException for an invalid body
     */
    public function __construct($status = self::STATUS_OK, array $headers = array(), $body = '', $version = '1.1', $reason = null)
    {
        if (\is_string($body)) {
            $body = new BufferedBody($body);
        } elseif ($body instanceof ReadableStreamInterface && !$body instanceof StreamInterface) {
            $body = new HttpBodyStream($body, null);
        } elseif (!$body instanceof StreamInterface) {
            throw new \InvalidArgumentException('Invalid response body given');
        }
        parent::__construct($status, $headers, $body, $version, $reason);
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Message;

use _PHPStan_dcc7b7cff\Psr\Http\Message\ServerRequestInterface;
use _PHPStan_dcc7b7cff\Psr\Http\Message\StreamInterface;
use _PHPStan_dcc7b7cff\Psr\Http\Message\UriInterface;
use _PHPStan_dcc7b7cff\React\Http\Io\BufferedBody;
use _PHPStan_dcc7b7cff\React\Http\Io\HttpBodyStream;
use _PHPStan_dcc7b7cff\React\Stream\ReadableStreamInterface;
use _PHPStan_dcc7b7cff\RingCentral\Psr7\Request as BaseRequest;
/**
 * Respresents an incoming server request message.
 *
 * This class implements the
 * [PSR-7 `ServerRequestInterface`](https://www.php-fig.org/psr/psr-7/#321-psrhttpmessageserverrequestinterface)
 * which extends the
 * [PSR-7 `RequestInterface`](https://www.php-fig.org/psr/psr-7/#32-psrhttpmessagerequestinterface)
 * which in turn extends the
 * [PSR-7 `MessageInterface`](https://www.php-fig.org/psr/psr-7/#31-psrhttpmessagemessageinterface).
 *
 * This is mostly used internally to represent each incoming request message.
 * Likewise, you can also use this class in test cases to test how your web
 * application reacts to certain HTTP requests.
 *
 * > Internally, this implementation builds on top of an existing outgoing
 *   request message and only adds required server methods. This base class is
 *   considered an implementation detail that may change in the future.
 *
 * @see ServerRequestInterface
 */
final class ServerRequest extends BaseRequest implements ServerRequestInterface
{
    private $attributes = array();
    private $serverParams;
    private $fileParams = array();
    private $cookies = array();
    private $queryParams = array();
    private $parsedBody;
    /**
     * @param string                                         $method       HTTP method for the request.
     * @param string|UriInterface                            $url          URL for the request.
     * @param array<string,string|string[]>                  $headers      Headers for the message.
     * @param string|ReadableStreamInterface|StreamInterface $body         Message body.
     * @param string                                         $version      HTTP protocol version.
     * @param array<string,string>                           $serverParams server-side parameters
     * @throws \InvalidArgumentException for an invalid URL or body
     */
    public function __construct($method, $url, array $headers = array(), $body = '', $version = '1.1', $serverParams = array())
    {
        $stream = null;
        if (\is_string($body)) {
            $body = new BufferedBody($body);
        } elseif ($body instanceof ReadableStreamInterface && !$body instanceof StreamInterface) {
            $stream = $body;
            $body = null;
        } elseif (!$body instanceof StreamInterface) {
            throw new \InvalidArgumentException('Invalid server request body given');
        }
        $this->serverParams = $serverParams;
        parent::__construct($method, $url, $headers, $body, $version);
        if ($stream !== null) {
            $size = (int) $this->getHeaderLine('Content-Length');
            if (\strtolower($this->getHeaderLine('Transfer-Encoding')) === 'chunked') {
                $size = null;
            }
            $this->stream = new HttpBodyStream($stream, $size);
        }
        $query = $this->getUri()->getQuery();
        if ($query !== '') {
            \parse_str($query, $this->queryParams);
        }
        // Multiple cookie headers are not allowed according
        // to https://tools.ietf.org/html/rfc6265#section-5.4
        $cookieHeaders = $this->getHeader("Cookie");
        if (\count($cookieHeaders) === 1) {
            $this->cookies = $this->parseCookie($cookieHeaders[0]);
        }
    }
    public function getServerParams()
    {
        return $this->serverParams;
    }
    public function getCookieParams()
    {
        return $this->cookies;
    }
    public function withCookieParams(array $cookies)
    {
        $new = clone $this;
        $new->cookies = $cookies;
        return $new;
    }
    public function getQueryParams()
    {
        return $this->queryParams;
    }
    public function withQueryParams(array $query)
    {
        $new = clone $this;
        $new->queryParams = $query;
        return $new;
    }
    public function getUploadedFiles()
    {
        return $this->fileParams;
    }
    public function withUploadedFiles(array $uploadedFiles)
    {
        $new = clone $this;
        $new->fileParams = $uploadedFiles;
        return $new;
    }
    public function getParsedBody()
    {
        return $this->parsedBody;
    }
    public function withParsedBody($data)
    {
        $new = clone $this;
        $new->parsedBody = $data;
        return $new;
    }
    public function getAttributes()
    {
        return $this->attributes;
    }
    public function getAttribute($name, $default = null)
    {
        if (!\array_key_exists($name, $this->attributes)) {
            return $default;
        }
        return $this->attributes[$name];
    }
    public function withAttribute($name, $value)
    {
        $new = clone $this;
        $new->attributes[$name] = $value;
        return $new;
    }
    public function withoutAttribute($name)
    {
        $new = clone $this;
        unset($new->attributes[$name]);
        return $new;
    }
    /**
     * @param string $cookie
     * @return array
     */
    private function parseCookie($cookie)
    {
        $cookieArray = \explode(';', $cookie);
        $result = array();
        foreach ($cookieArray as $pair) {
            $pair = \trim($pair);
            $nameValuePair = \explode('=', $pair, 2);
            if (\count($nameValuePair) === 2) {
                $key = $nameValuePair[0];
                $value = \urldecode($nameValuePair[1]);
                $result[$key] = $value;
            }
        }
        return $result;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Message;

use _PHPStan_dcc7b7cff\Psr\Http\Message\RequestInterface;
use _PHPStan_dcc7b7cff\Psr\Http\Message\StreamInterface;
use _PHPStan_dcc7b7cff\Psr\Http\Message\UriInterface;
use _PHPStan_dcc7b7cff\React\Http\Io\BufferedBody;
use _PHPStan_dcc7b7cff\React\Http\Io\ReadableBodyStream;
use _PHPStan_dcc7b7cff\React\Stream\ReadableStreamInterface;
use _PHPStan_dcc7b7cff\RingCentral\Psr7\Request as BaseRequest;
/**
 * Respresents an outgoing HTTP request message.
 *
 * This class implements the
 * [PSR-7 `RequestInterface`](https://www.php-fig.org/psr/psr-7/#32-psrhttpmessagerequestinterface)
 * which extends the
 * [PSR-7 `MessageInterface`](https://www.php-fig.org/psr/psr-7/#31-psrhttpmessagemessageinterface).
 *
 * This is mostly used internally to represent each outgoing HTTP request
 * message for the HTTP client implementation. Likewise, you can also use this
 * class with other HTTP client implementations and for tests.
 *
 * > Internally, this implementation builds on top of an existing outgoing
 *   request message and only adds support for streaming. This base class is
 *   considered an implementation detail that may change in the future.
 *
 * @see RequestInterface
 */
final class Request extends BaseRequest implements RequestInterface
{
    /**
     * @param string                                         $method  HTTP method for the request.
     * @param string|UriInterface                            $url     URL for the request.
     * @param array<string,string|string[]>                  $headers Headers for the message.
     * @param string|ReadableStreamInterface|StreamInterface $body    Message body.
     * @param string                                         $version HTTP protocol version.
     * @throws \InvalidArgumentException for an invalid URL or body
     */
    public function __construct($method, $url, array $headers = array(), $body = '', $version = '1.1')
    {
        if (\is_string($body)) {
            $body = new BufferedBody($body);
        } elseif ($body instanceof ReadableStreamInterface && !$body instanceof StreamInterface) {
            $body = new ReadableBodyStream($body);
        } elseif (!$body instanceof StreamInterface) {
            throw new \InvalidArgumentException('Invalid request body given');
        }
        parent::__construct($method, $url, $headers, $body, $version);
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http;

use _PHPStan_dcc7b7cff\Psr\Http\Message\ResponseInterface;
use _PHPStan_dcc7b7cff\RingCentral\Psr7\Uri;
use _PHPStan_dcc7b7cff\React\EventLoop\Loop;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use _PHPStan_dcc7b7cff\React\Http\Io\Sender;
use _PHPStan_dcc7b7cff\React\Http\Io\Transaction;
use _PHPStan_dcc7b7cff\React\Http\Message\Request;
use _PHPStan_dcc7b7cff\React\Promise\PromiseInterface;
use _PHPStan_dcc7b7cff\React\Socket\ConnectorInterface;
use _PHPStan_dcc7b7cff\React\Stream\ReadableStreamInterface;
use InvalidArgumentException;
/**
 * @final This class is final and shouldn't be extended as it is likely to be marked final in a future release.
 */
class Browser
{
    private $transaction;
    private $baseUrl;
    private $protocolVersion = '1.1';
    private $defaultHeaders = array('User-Agent' => 'ReactPHP/1');
    /**
     * The `Browser` is responsible for sending HTTP requests to your HTTP server
     * and keeps track of pending incoming HTTP responses.
     *
     * ```php
     * $browser = new React\Http\Browser();
     * ```
     *
     * This class takes two optional arguments for more advanced usage:
     *
     * ```php
     * // constructor signature as of v1.5.0
     * $browser = new React\Http\Browser(?ConnectorInterface $connector = null, ?LoopInterface $loop = null);
     *
     * // legacy constructor signature before v1.5.0
     * $browser = new React\Http\Browser(?LoopInterface $loop = null, ?ConnectorInterface $connector = null);
     * ```
     *
     * If you need custom connector settings (DNS resolution, TLS parameters, timeouts,
     * proxy servers etc.), you can explicitly pass a custom instance of the
     * [`ConnectorInterface`](https://github.com/reactphp/socket#connectorinterface):
     *
     * ```php
     * $connector = new React\Socket\Connector(array(
     *     'dns' => '127.0.0.1',
     *     'tcp' => array(
     *         'bindto' => '192.168.10.1:0'
     *     ),
     *     'tls' => array(
     *         'verify_peer' => false,
     *         'verify_peer_name' => false
     *     )
     * ));
     *
     * $browser = new React\Http\Browser($connector);
     * ```
     *
     * This class takes an optional `LoopInterface|null $loop` parameter that can be used to
     * pass the event loop instance to use for this object. You can use a `null` value
     * here in order to use the [default loop](https://github.com/reactphp/event-loop#loop).
     * This value SHOULD NOT be given unless you're sure you want to explicitly use a
     * given event loop instance.
     *
     * @param null|ConnectorInterface|LoopInterface $connector
     * @param null|LoopInterface|ConnectorInterface $loop
     * @throws \InvalidArgumentException for invalid arguments
     */
    public function __construct($connector = null, $loop = null)
    {
        // swap arguments for legacy constructor signature
        if (($connector instanceof LoopInterface || $connector === null) && ($loop instanceof ConnectorInterface || $loop === null)) {
            $swap = $loop;
            $loop = $connector;
            $connector = $swap;
        }
        if ($connector !== null && !$connector instanceof ConnectorInterface || $loop !== null && !$loop instanceof LoopInterface) {
            throw new \InvalidArgumentException('Expected "?ConnectorInterface $connector" and "?LoopInterface $loop" arguments');
        }
        $loop = $loop ?: Loop::get();
        $this->transaction = new Transaction(Sender::createFromLoop($loop, $connector), $loop);
    }
    /**
     * Sends an HTTP GET request
     *
     * ```php
     * $browser->get($url)->then(function (Psr\Http\Message\ResponseInterface $response) {
     *     var_dump((string)$response->getBody());
     * }, function (Exception $e) {
     *     echo 'Error: ' . $e->getMessage() . PHP_EOL;
     * });
     * ```
     *
     * See also [GET request client example](../examples/01-client-get-request.php).
     *
     * @param string $url     URL for the request.
     * @param array  $headers
     * @return PromiseInterface<ResponseInterface>
     */
    public function get($url, array $headers = array())
    {
        return $this->requestMayBeStreaming('GET', $url, $headers);
    }
    /**
     * Sends an HTTP POST request
     *
     * ```php
     * $browser->post(
     *     $url,
     *     [
     *         'Content-Type' => 'application/json'
     *     ],
     *     json_encode($data)
     * )->then(function (Psr\Http\Message\ResponseInterface $response) {
     *     var_dump(json_decode((string)$response->getBody()));
     * }, function (Exception $e) {
     *     echo 'Error: ' . $e->getMessage() . PHP_EOL;
     * });
     * ```
     *
     * See also [POST JSON client example](../examples/04-client-post-json.php).
     *
     * This method is also commonly used to submit HTML form data:
     *
     * ```php
     * $data = [
     *     'user' => 'Alice',
     *     'password' => 'secret'
     * ];
     *
     * $browser->post(
     *     $url,
     *     [
     *         'Content-Type' => 'application/x-www-form-urlencoded'
     *     ],
     *     http_build_query($data)
     * );
     * ```
     *
     * This method will automatically add a matching `Content-Length` request
     * header if the outgoing request body is a `string`. If you're using a
     * streaming request body (`ReadableStreamInterface`), it will default to
     * using `Transfer-Encoding: chunked` or you have to explicitly pass in a
     * matching `Content-Length` request header like so:
     *
     * ```php
     * $body = new React\Stream\ThroughStream();
     * Loop::addTimer(1.0, function () use ($body) {
     *     $body->end("hello world");
     * });
     *
     * $browser->post($url, array('Content-Length' => '11'), $body);
     * ```
     *
     * @param string                         $url      URL for the request.
     * @param array                          $headers
     * @param string|ReadableStreamInterface $body
     * @return PromiseInterface<ResponseInterface>
     */
    public function post($url, array $headers = array(), $body = '')
    {
        return $this->requestMayBeStreaming('POST', $url, $headers, $body);
    }
    /**
     * Sends an HTTP HEAD request
     *
     * ```php
     * $browser->head($url)->then(function (Psr\Http\Message\ResponseInterface $response) {
     *     var_dump($response->getHeaders());
     * }, function (Exception $e) {
     *     echo 'Error: ' . $e->getMessage() . PHP_EOL;
     * });
     * ```
     *
     * @param string $url     URL for the request.
     * @param array  $headers
     * @return PromiseInterface<ResponseInterface>
     */
    public function head($url, array $headers = array())
    {
        return $this->requestMayBeStreaming('HEAD', $url, $headers);
    }
    /**
     * Sends an HTTP PATCH request
     *
     * ```php
     * $browser->patch(
     *     $url,
     *     [
     *         'Content-Type' => 'application/json'
     *     ],
     *     json_encode($data)
     * )->then(function (Psr\Http\Message\ResponseInterface $response) {
     *     var_dump(json_decode((string)$response->getBody()));
     * }, function (Exception $e) {
     *     echo 'Error: ' . $e->getMessage() . PHP_EOL;
     * });
     * ```
     *
     * This method will automatically add a matching `Content-Length` request
     * header if the outgoing request body is a `string`. If you're using a
     * streaming request body (`ReadableStreamInterface`), it will default to
     * using `Transfer-Encoding: chunked` or you have to explicitly pass in a
     * matching `Content-Length` request header like so:
     *
     * ```php
     * $body = new React\Stream\ThroughStream();
     * Loop::addTimer(1.0, function () use ($body) {
     *     $body->end("hello world");
     * });
     *
     * $browser->patch($url, array('Content-Length' => '11'), $body);
     * ```
     *
     * @param string                         $url      URL for the request.
     * @param array                          $headers
     * @param string|ReadableStreamInterface $body
     * @return PromiseInterface<ResponseInterface>
     */
    public function patch($url, array $headers = array(), $body = '')
    {
        return $this->requestMayBeStreaming('PATCH', $url, $headers, $body);
    }
    /**
     * Sends an HTTP PUT request
     *
     * ```php
     * $browser->put(
     *     $url,
     *     [
     *         'Content-Type' => 'text/xml'
     *     ],
     *     $xml->asXML()
     * )->then(function (Psr\Http\Message\ResponseInterface $response) {
     *     var_dump((string)$response->getBody());
     * }, function (Exception $e) {
     *     echo 'Error: ' . $e->getMessage() . PHP_EOL;
     * });
     * ```
     *
     * See also [PUT XML client example](../examples/05-client-put-xml.php).
     *
     * This method will automatically add a matching `Content-Length` request
     * header if the outgoing request body is a `string`. If you're using a
     * streaming request body (`ReadableStreamInterface`), it will default to
     * using `Transfer-Encoding: chunked` or you have to explicitly pass in a
     * matching `Content-Length` request header like so:
     *
     * ```php
     * $body = new React\Stream\ThroughStream();
     * Loop::addTimer(1.0, function () use ($body) {
     *     $body->end("hello world");
     * });
     *
     * $browser->put($url, array('Content-Length' => '11'), $body);
     * ```
     *
     * @param string                         $url      URL for the request.
     * @param array                          $headers
     * @param string|ReadableStreamInterface $body
     * @return PromiseInterface<ResponseInterface>
     */
    public function put($url, array $headers = array(), $body = '')
    {
        return $this->requestMayBeStreaming('PUT', $url, $headers, $body);
    }
    /**
     * Sends an HTTP DELETE request
     *
     * ```php
     * $browser->delete($url)->then(function (Psr\Http\Message\ResponseInterface $response) {
     *     var_dump((string)$response->getBody());
     * }, function (Exception $e) {
     *     echo 'Error: ' . $e->getMessage() . PHP_EOL;
     * });
     * ```
     *
     * @param string                         $url      URL for the request.
     * @param array                          $headers
     * @param string|ReadableStreamInterface $body
     * @return PromiseInterface<ResponseInterface>
     */
    public function delete($url, array $headers = array(), $body = '')
    {
        return $this->requestMayBeStreaming('DELETE', $url, $headers, $body);
    }
    /**
     * Sends an arbitrary HTTP request.
     *
     * The preferred way to send an HTTP request is by using the above
     * [request methods](#request-methods), for example the [`get()`](#get)
     * method to send an HTTP `GET` request.
     *
     * As an alternative, if you want to use a custom HTTP request method, you
     * can use this method:
     *
     * ```php
     * $browser->request('OPTIONS', $url)->then(function (Psr\Http\Message\ResponseInterface $response) {
     *     var_dump((string)$response->getBody());
     * }, function (Exception $e) {
     *     echo 'Error: ' . $e->getMessage() . PHP_EOL;
     * });
     * ```
     *
     * This method will automatically add a matching `Content-Length` request
     * header if the size of the outgoing request body is known and non-empty.
     * For an empty request body, if will only include a `Content-Length: 0`
     * request header if the request method usually expects a request body (only
     * applies to `POST`, `PUT` and `PATCH`).
     *
     * If you're using a streaming request body (`ReadableStreamInterface`), it
     * will default to using `Transfer-Encoding: chunked` or you have to
     * explicitly pass in a matching `Content-Length` request header like so:
     *
     * ```php
     * $body = new React\Stream\ThroughStream();
     * Loop::addTimer(1.0, function () use ($body) {
     *     $body->end("hello world");
     * });
     *
     * $browser->request('POST', $url, array('Content-Length' => '11'), $body);
     * ```
     *
     * @param string                         $method   HTTP request method, e.g. GET/HEAD/POST etc.
     * @param string                         $url      URL for the request
     * @param array                          $headers  Additional request headers
     * @param string|ReadableStreamInterface $body     HTTP request body contents
     * @return PromiseInterface<ResponseInterface>
     */
    public function request($method, $url, array $headers = array(), $body = '')
    {
        return $this->withOptions(array('streaming' => \false))->requestMayBeStreaming($method, $url, $headers, $body);
    }
    /**
     * Sends an arbitrary HTTP request and receives a streaming response without buffering the response body.
     *
     * The preferred way to send an HTTP request is by using the above
     * [request methods](#request-methods), for example the [`get()`](#get)
     * method to send an HTTP `GET` request. Each of these methods will buffer
     * the whole response body in memory by default. This is easy to get started
     * and works reasonably well for smaller responses.
     *
     * In some situations, it's a better idea to use a streaming approach, where
     * only small chunks have to be kept in memory. You can use this method to
     * send an arbitrary HTTP request and receive a streaming response. It uses
     * the same HTTP message API, but does not buffer the response body in
     * memory. It only processes the response body in small chunks as data is
     * received and forwards this data through [ReactPHP's Stream API](https://github.com/reactphp/stream).
     * This works for (any number of) responses of arbitrary sizes.
     *
     * ```php
     * $browser->requestStreaming('GET', $url)->then(function (Psr\Http\Message\ResponseInterface $response) {
     *     $body = $response->getBody();
     *     assert($body instanceof Psr\Http\Message\StreamInterface);
     *     assert($body instanceof React\Stream\ReadableStreamInterface);
     *
     *     $body->on('data', function ($chunk) {
     *         echo $chunk;
     *     });
     *
     *     $body->on('error', function (Exception $e) {
     *         echo 'Error: ' . $e->getMessage() . PHP_EOL;
     *     });
     *
     *     $body->on('close', function () {
     *         echo '[DONE]' . PHP_EOL;
     *     });
     * }, function (Exception $e) {
     *     echo 'Error: ' . $e->getMessage() . PHP_EOL;
     * });
     * ```
     *
     * See also [`ReadableStreamInterface`](https://github.com/reactphp/stream#readablestreaminterface)
     * and the [streaming response](#streaming-response) for more details,
     * examples and possible use-cases.
     *
     * This method will automatically add a matching `Content-Length` request
     * header if the size of the outgoing request body is known and non-empty.
     * For an empty request body, if will only include a `Content-Length: 0`
     * request header if the request method usually expects a request body (only
     * applies to `POST`, `PUT` and `PATCH`).
     *
     * If you're using a streaming request body (`ReadableStreamInterface`), it
     * will default to using `Transfer-Encoding: chunked` or you have to
     * explicitly pass in a matching `Content-Length` request header like so:
     *
     * ```php
     * $body = new React\Stream\ThroughStream();
     * Loop::addTimer(1.0, function () use ($body) {
     *     $body->end("hello world");
     * });
     *
     * $browser->requestStreaming('POST', $url, array('Content-Length' => '11'), $body);
     * ```
     *
     * @param string                         $method   HTTP request method, e.g. GET/HEAD/POST etc.
     * @param string                         $url      URL for the request
     * @param array                          $headers  Additional request headers
     * @param string|ReadableStreamInterface $body     HTTP request body contents
     * @return PromiseInterface<ResponseInterface>
     */
    public function requestStreaming($method, $url, $headers = array(), $body = '')
    {
        return $this->withOptions(array('streaming' => \true))->requestMayBeStreaming($method, $url, $headers, $body);
    }
    /**
     * Changes the maximum timeout used for waiting for pending requests.
     *
     * You can pass in the number of seconds to use as a new timeout value:
     *
     * ```php
     * $browser = $browser->withTimeout(10.0);
     * ```
     *
     * You can pass in a bool `false` to disable any timeouts. In this case,
     * requests can stay pending forever:
     *
     * ```php
     * $browser = $browser->withTimeout(false);
     * ```
     *
     * You can pass in a bool `true` to re-enable default timeout handling. This
     * will respects PHP's `default_socket_timeout` setting (default 60s):
     *
     * ```php
     * $browser = $browser->withTimeout(true);
     * ```
     *
     * See also [timeouts](#timeouts) for more details about timeout handling.
     *
     * Notice that the [`Browser`](#browser) is an immutable object, i.e. this
     * method actually returns a *new* [`Browser`](#browser) instance with the
     * given timeout value applied.
     *
     * @param bool|number $timeout
     * @return self
     */
    public function withTimeout($timeout)
    {
        if ($timeout === \true) {
            $timeout = null;
        } elseif ($timeout === \false) {
            $timeout = -1;
        } elseif ($timeout < 0) {
            $timeout = 0;
        }
        return $this->withOptions(array('timeout' => $timeout));
    }
    /**
     * Changes how HTTP redirects will be followed.
     *
     * You can pass in the maximum number of redirects to follow:
     *
     * ```php
     * $browser = $browser->withFollowRedirects(5);
     * ```
     *
     * The request will automatically be rejected when the number of redirects
     * is exceeded. You can pass in a `0` to reject the request for any
     * redirects encountered:
     *
     * ```php
     * $browser = $browser->withFollowRedirects(0);
     *
     * $browser->get($url)->then(function (Psr\Http\Message\ResponseInterface $response) {
     *     // only non-redirected responses will now end up here
     *     var_dump($response->getHeaders());
     * }, function (Exception $e) {
     *     echo 'Error: ' . $e->getMessage() . PHP_EOL;
     * });
     * ```
     *
     * You can pass in a bool `false` to disable following any redirects. In
     * this case, requests will resolve with the redirection response instead
     * of following the `Location` response header:
     *
     * ```php
     * $browser = $browser->withFollowRedirects(false);
     *
     * $browser->get($url)->then(function (Psr\Http\Message\ResponseInterface $response) {
     *     // any redirects will now end up here
     *     var_dump($response->getHeaderLine('Location'));
     * }, function (Exception $e) {
     *     echo 'Error: ' . $e->getMessage() . PHP_EOL;
     * });
     * ```
     *
     * You can pass in a bool `true` to re-enable default redirect handling.
     * This defaults to following a maximum of 10 redirects:
     *
     * ```php
     * $browser = $browser->withFollowRedirects(true);
     * ```
     *
     * See also [redirects](#redirects) for more details about redirect handling.
     *
     * Notice that the [`Browser`](#browser) is an immutable object, i.e. this
     * method actually returns a *new* [`Browser`](#browser) instance with the
     * given redirect setting applied.
     *
     * @param bool|int $followRedirects
     * @return self
     */
    public function withFollowRedirects($followRedirects)
    {
        return $this->withOptions(array('followRedirects' => $followRedirects !== \false, 'maxRedirects' => \is_bool($followRedirects) ? null : $followRedirects));
    }
    /**
     * Changes whether non-successful HTTP response status codes (4xx and 5xx) will be rejected.
     *
     * You can pass in a bool `false` to disable rejecting incoming responses
     * that use a 4xx or 5xx response status code. In this case, requests will
     * resolve with the response message indicating an error condition:
     *
     * ```php
     * $browser = $browser->withRejectErrorResponse(false);
     *
     * $browser->get($url)->then(function (Psr\Http\Message\ResponseInterface $response) {
     *     // any HTTP response will now end up here
     *     var_dump($response->getStatusCode(), $response->getReasonPhrase());
     * }, function (Exception $e) {
     *     echo 'Error: ' . $e->getMessage() . PHP_EOL;
     * });
     * ```
     *
     * You can pass in a bool `true` to re-enable default status code handling.
     * This defaults to rejecting any response status codes in the 4xx or 5xx
     * range:
     *
     * ```php
     * $browser = $browser->withRejectErrorResponse(true);
     *
     * $browser->get($url)->then(function (Psr\Http\Message\ResponseInterface $response) {
     *     // any successful HTTP response will now end up here
     *     var_dump($response->getStatusCode(), $response->getReasonPhrase());
     * }, function (Exception $e) {
     *     if ($e instanceof React\Http\Message\ResponseException) {
     *         // any HTTP response error message will now end up here
     *         $response = $e->getResponse();
     *         var_dump($response->getStatusCode(), $response->getReasonPhrase());
     *     } else {
     *         echo 'Error: ' . $e->getMessage() . PHP_EOL;
     *     }
     * });
     * ```
     *
     * Notice that the [`Browser`](#browser) is an immutable object, i.e. this
     * method actually returns a *new* [`Browser`](#browser) instance with the
     * given setting applied.
     *
     * @param bool $obeySuccessCode
     * @return self
     */
    public function withRejectErrorResponse($obeySuccessCode)
    {
        return $this->withOptions(array('obeySuccessCode' => $obeySuccessCode));
    }
    /**
     * Changes the base URL used to resolve relative URLs to.
     *
     * If you configure a base URL, any requests to relative URLs will be
     * processed by first resolving this relative to the given absolute base
     * URL. This supports resolving relative path references (like `../` etc.).
     * This is particularly useful for (RESTful) API calls where all endpoints
     * (URLs) are located under a common base URL.
     *
     * ```php
     * $browser = $browser->withBase('http://api.example.com/v3/');
     *
     * // will request http://api.example.com/v3/users
     * $browser->get('users')->then(…);
     * ```
     *
     * You can pass in a `null` base URL to return a new instance that does not
     * use a base URL:
     *
     * ```php
     * $browser = $browser->withBase(null);
     * ```
     *
     * Accordingly, any requests using relative URLs to a browser that does not
     * use a base URL can not be completed and will be rejected without sending
     * a request.
     *
     * This method will throw an `InvalidArgumentException` if the given
     * `$baseUrl` argument is not a valid URL.
     *
     * Notice that the [`Browser`](#browser) is an immutable object, i.e. the `withBase()` method
     * actually returns a *new* [`Browser`](#browser) instance with the given base URL applied.
     *
     * @param string|null $baseUrl absolute base URL
     * @return self
     * @throws InvalidArgumentException if the given $baseUrl is not a valid absolute URL
     * @see self::withoutBase()
     */
    public function withBase($baseUrl)
    {
        $browser = clone $this;
        if ($baseUrl === null) {
            $browser->baseUrl = null;
            return $browser;
        }
        $browser->baseUrl = new Uri($baseUrl);
        if (!\in_array($browser->baseUrl->getScheme(), array('http', 'https')) || $browser->baseUrl->getHost() === '') {
            throw new \InvalidArgumentException('Base URL must be absolute');
        }
        return $browser;
    }
    /**
     * Changes the HTTP protocol version that will be used for all subsequent requests.
     *
     * All the above [request methods](#request-methods) default to sending
     * requests as HTTP/1.1. This is the preferred HTTP protocol version which
     * also provides decent backwards-compatibility with legacy HTTP/1.0
     * servers. As such, there should rarely be a need to explicitly change this
     * protocol version.
     *
     * If you want to explicitly use the legacy HTTP/1.0 protocol version, you
     * can use this method:
     *
     * ```php
     * $browser = $browser->withProtocolVersion('1.0');
     *
     * $browser->get($url)->then(…);
     * ```
     *
     * Notice that the [`Browser`](#browser) is an immutable object, i.e. this
     * method actually returns a *new* [`Browser`](#browser) instance with the
     * new protocol version applied.
     *
     * @param string $protocolVersion HTTP protocol version to use, must be one of "1.1" or "1.0"
     * @return self
     * @throws InvalidArgumentException
     */
    public function withProtocolVersion($protocolVersion)
    {
        if (!\in_array($protocolVersion, array('1.0', '1.1'), \true)) {
            throw new InvalidArgumentException('Invalid HTTP protocol version, must be one of "1.1" or "1.0"');
        }
        $browser = clone $this;
        $browser->protocolVersion = (string) $protocolVersion;
        return $browser;
    }
    /**
     * Changes the maximum size for buffering a response body.
     *
     * The preferred way to send an HTTP request is by using the above
     * [request methods](#request-methods), for example the [`get()`](#get)
     * method to send an HTTP `GET` request. Each of these methods will buffer
     * the whole response body in memory by default. This is easy to get started
     * and works reasonably well for smaller responses.
     *
     * By default, the response body buffer will be limited to 16 MiB. If the
     * response body exceeds this maximum size, the request will be rejected.
     *
     * You can pass in the maximum number of bytes to buffer:
     *
     * ```php
     * $browser = $browser->withResponseBuffer(1024 * 1024);
     *
     * $browser->get($url)->then(function (Psr\Http\Message\ResponseInterface $response) {
     *     // response body will not exceed 1 MiB
     *     var_dump($response->getHeaders(), (string) $response->getBody());
     * }, function (Exception $e) {
     *     echo 'Error: ' . $e->getMessage() . PHP_EOL;
     * });
     * ```
     *
     * Note that the response body buffer has to be kept in memory for each
     * pending request until its transfer is completed and it will only be freed
     * after a pending request is fulfilled. As such, increasing this maximum
     * buffer size to allow larger response bodies is usually not recommended.
     * Instead, you can use the [`requestStreaming()` method](#requeststreaming)
     * to receive responses with arbitrary sizes without buffering. Accordingly,
     * this maximum buffer size setting has no effect on streaming responses.
     *
     * Notice that the [`Browser`](#browser) is an immutable object, i.e. this
     * method actually returns a *new* [`Browser`](#browser) instance with the
     * given setting applied.
     *
     * @param int $maximumSize
     * @return self
     * @see self::requestStreaming()
     */
    public function withResponseBuffer($maximumSize)
    {
        return $this->withOptions(array('maximumSize' => $maximumSize));
    }
    /**
     * Add a request header for all following requests.
     *
     * ```php
     * $browser = $browser->withHeader('User-Agent', 'ACME');
     *
     * $browser->get($url)->then(…);
     * ```
     *
     * Note that the new header will overwrite any headers previously set with
     * the same name (case-insensitive). Following requests will use these headers
     * by default unless they are explicitly set for any requests.
     *
     * @param string $header
     * @param string $value
     * @return Browser
     */
    public function withHeader($header, $value)
    {
        $browser = $this->withoutHeader($header);
        $browser->defaultHeaders[$header] = $value;
        return $browser;
    }
    /**
     * Remove any default request headers previously set via
     * the [`withHeader()` method](#withheader).
     *
     * ```php
     * $browser = $browser->withoutHeader('User-Agent');
     *
     * $browser->get($url)->then(…);
     * ```
     *
     * Note that this method only affects the headers which were set with the
     * method `withHeader(string $header, string $value): Browser`
     *
     * @param string $header
     * @return Browser
     */
    public function withoutHeader($header)
    {
        $browser = clone $this;
        /** @var string|int $key */
        foreach (\array_keys($browser->defaultHeaders) as $key) {
            if (\strcasecmp($key, $header) === 0) {
                unset($browser->defaultHeaders[$key]);
                break;
            }
        }
        return $browser;
    }
    /**
     * Changes the [options](#options) to use:
     *
     * The [`Browser`](#browser) class exposes several options for the handling of
     * HTTP transactions. These options resemble some of PHP's
     * [HTTP context options](http://php.net/manual/en/context.http.php) and
     * can be controlled via the following API (and their defaults):
     *
     * ```php
     * // deprecated
     * $newBrowser = $browser->withOptions(array(
     *     'timeout' => null, // see withTimeout() instead
     *     'followRedirects' => true, // see withFollowRedirects() instead
     *     'maxRedirects' => 10, // see withFollowRedirects() instead
     *     'obeySuccessCode' => true, // see withRejectErrorResponse() instead
     *     'streaming' => false, // deprecated, see requestStreaming() instead
     * ));
     * ```
     *
     * See also [timeouts](#timeouts), [redirects](#redirects) and
     * [streaming](#streaming) for more details.
     *
     * Notice that the [`Browser`](#browser) is an immutable object, i.e. this
     * method actually returns a *new* [`Browser`](#browser) instance with the
     * options applied.
     *
     * @param array $options
     * @return self
     * @see self::withTimeout()
     * @see self::withFollowRedirects()
     * @see self::withRejectErrorResponse()
     */
    private function withOptions(array $options)
    {
        $browser = clone $this;
        $browser->transaction = $this->transaction->withOptions($options);
        return $browser;
    }
    /**
     * @param string                         $method
     * @param string                         $url
     * @param array                          $headers
     * @param string|ReadableStreamInterface $body
     * @return PromiseInterface<ResponseInterface>
     */
    private function requestMayBeStreaming($method, $url, array $headers = array(), $body = '')
    {
        if ($this->baseUrl !== null) {
            // ensure we're actually below the base URL
            $url = Uri::resolve($this->baseUrl, $url);
        }
        foreach ($this->defaultHeaders as $key => $value) {
            $explicitHeaderExists = \false;
            foreach (\array_keys($headers) as $headerKey) {
                if (\strcasecmp($headerKey, $key) === 0) {
                    $explicitHeaderExists = \true;
                    break;
                }
            }
            if (!$explicitHeaderExists) {
                $headers[$key] = $value;
            }
        }
        return $this->transaction->send(new Request($method, $url, $headers, $body, $this->protocolVersion));
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http;

// Deprecated `Server` is an alias for new `HttpServer` to ensure existing code continues to work as-is.
\class_alias(__NAMESPACE__ . '\\HttpServer', __NAMESPACE__ . '\\Server', \true);
// Aid static analysis and IDE autocompletion about this deprecation,
// but don't actually execute during runtime because `HttpServer` is final.
if (!\class_exists(__NAMESPACE__ . '\\Server', \false)) {
    /**
     * @deprecated 1.5.0 See HttpServer instead
     * @see HttpServer
     */
    final class Server extends HttpServer
    {
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Client;

use _PHPStan_dcc7b7cff\Psr\Http\Message\RequestInterface;
use _PHPStan_dcc7b7cff\React\Http\Io\ClientConnectionManager;
use _PHPStan_dcc7b7cff\React\Http\Io\ClientRequestStream;
/**
 * @internal
 */
class Client
{
    /** @var ClientConnectionManager */
    private $connectionManager;
    public function __construct(ClientConnectionManager $connectionManager)
    {
        $this->connectionManager = $connectionManager;
    }
    /** @return ClientRequestStream */
    public function request(RequestInterface $request)
    {
        return new ClientRequestStream($this->connectionManager, $request);
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Io;

use _PHPStan_dcc7b7cff\Psr\Http\Message\ServerRequestInterface;
/**
 * [Internal] Parses a string body with "Content-Type: multipart/form-data" into structured data
 *
 * This is use internally to parse incoming request bodies into structured data
 * that resembles PHP's `$_POST` and `$_FILES` superglobals.
 *
 * @internal
 * @link https://tools.ietf.org/html/rfc7578
 * @link https://tools.ietf.org/html/rfc2046#section-5.1.1
 */
final class MultipartParser
{
    /**
     * @var ServerRequestInterface|null
     */
    private $request;
    /**
     * @var int|null
     */
    private $maxFileSize;
    /**
     * Based on $maxInputVars and $maxFileUploads
     *
     * @var int
     */
    private $maxMultipartBodyParts;
    /**
     * ini setting "max_input_vars"
     *
     * Does not exist in PHP < 5.3.9 or HHVM, so assume PHP's default 1000 here.
     *
     * @var int
     * @link http://php.net/manual/en/info.configuration.php#ini.max-input-vars
     */
    private $maxInputVars = 1000;
    /**
     * ini setting "max_input_nesting_level"
     *
     * Does not exist in HHVM, but assumes hard coded to 64 (PHP's default).
     *
     * @var int
     * @link http://php.net/manual/en/info.configuration.php#ini.max-input-nesting-level
     */
    private $maxInputNestingLevel = 64;
    /**
     * ini setting "upload_max_filesize"
     *
     * @var int
     */
    private $uploadMaxFilesize;
    /**
     * ini setting "max_file_uploads"
     *
     * Additionally, setting "file_uploads = off" effectively sets this to zero.
     *
     * @var int
     */
    private $maxFileUploads;
    private $multipartBodyPartCount = 0;
    private $postCount = 0;
    private $filesCount = 0;
    private $emptyCount = 0;
    private $cursor = 0;
    /**
     * @param int|string|null $uploadMaxFilesize
     * @param int|null $maxFileUploads
     */
    public function __construct($uploadMaxFilesize = null, $maxFileUploads = null)
    {
        $var = \ini_get('max_input_vars');
        if ($var !== \false) {
            $this->maxInputVars = (int) $var;
        }
        $var = \ini_get('max_input_nesting_level');
        if ($var !== \false) {
            $this->maxInputNestingLevel = (int) $var;
        }
        if ($uploadMaxFilesize === null) {
            $uploadMaxFilesize = \ini_get('upload_max_filesize');
        }
        $this->uploadMaxFilesize = IniUtil::iniSizeToBytes($uploadMaxFilesize);
        $this->maxFileUploads = $maxFileUploads === null ? \ini_get('file_uploads') === '' ? 0 : (int) \ini_get('max_file_uploads') : (int) $maxFileUploads;
        $this->maxMultipartBodyParts = $this->maxInputVars + $this->maxFileUploads;
    }
    public function parse(ServerRequestInterface $request)
    {
        $contentType = $request->getHeaderLine('content-type');
        if (!\preg_match('/boundary="?(.*?)"?$/', $contentType, $matches)) {
            return $request;
        }
        $this->request = $request;
        $this->parseBody('--' . $matches[1], (string) $request->getBody());
        $request = $this->request;
        $this->request = null;
        $this->multipartBodyPartCount = 0;
        $this->cursor = 0;
        $this->postCount = 0;
        $this->filesCount = 0;
        $this->emptyCount = 0;
        $this->maxFileSize = null;
        return $request;
    }
    private function parseBody($boundary, $buffer)
    {
        $len = \strlen($boundary);
        // ignore everything before initial boundary (SHOULD be empty)
        $this->cursor = \strpos($buffer, $boundary . "\r\n");
        while ($this->cursor !== \false) {
            // search following boundary (preceded by newline)
            // ignore last if not followed by boundary (SHOULD end with "--")
            $this->cursor += $len + 2;
            $end = \strpos($buffer, "\r\n" . $boundary, $this->cursor);
            if ($end === \false) {
                break;
            }
            // parse one part and continue searching for next
            $this->parsePart(\substr($buffer, $this->cursor, $end - $this->cursor));
            $this->cursor = $end;
            if (++$this->multipartBodyPartCount > $this->maxMultipartBodyParts) {
                break;
            }
        }
    }
    private function parsePart($chunk)
    {
        $pos = \strpos($chunk, "\r\n\r\n");
        if ($pos === \false) {
            return;
        }
        $headers = $this->parseHeaders((string) \substr($chunk, 0, $pos));
        $body = (string) \substr($chunk, $pos + 4);
        if (!isset($headers['content-disposition'])) {
            return;
        }
        $name = $this->getParameterFromHeader($headers['content-disposition'], 'name');
        if ($name === null) {
            return;
        }
        $filename = $this->getParameterFromHeader($headers['content-disposition'], 'filename');
        if ($filename !== null) {
            $this->parseFile($name, $filename, isset($headers['content-type'][0]) ? $headers['content-type'][0] : null, $body);
        } else {
            $this->parsePost($name, $body);
        }
    }
    private function parseFile($name, $filename, $contentType, $contents)
    {
        $file = $this->parseUploadedFile($filename, $contentType, $contents);
        if ($file === null) {
            return;
        }
        $this->request = $this->request->withUploadedFiles($this->extractPost($this->request->getUploadedFiles(), $name, $file));
    }
    private function parseUploadedFile($filename, $contentType, $contents)
    {
        $size = \strlen($contents);
        // no file selected (zero size and empty filename)
        if ($size === 0 && $filename === '') {
            // ignore excessive number of empty file uploads
            if (++$this->emptyCount + $this->filesCount > $this->maxInputVars) {
                return;
            }
            return new UploadedFile(new BufferedBody(''), $size, \UPLOAD_ERR_NO_FILE, $filename, $contentType);
        }
        // ignore excessive number of file uploads
        if (++$this->filesCount > $this->maxFileUploads) {
            return;
        }
        // file exceeds "upload_max_filesize" ini setting
        if ($size > $this->uploadMaxFilesize) {
            return new UploadedFile(new BufferedBody(''), $size, \UPLOAD_ERR_INI_SIZE, $filename, $contentType);
        }
        // file exceeds MAX_FILE_SIZE value
        if ($this->maxFileSize !== null && $size > $this->maxFileSize) {
            return new UploadedFile(new BufferedBody(''), $size, \UPLOAD_ERR_FORM_SIZE, $filename, $contentType);
        }
        return new UploadedFile(new BufferedBody($contents), $size, \UPLOAD_ERR_OK, $filename, $contentType);
    }
    private function parsePost($name, $value)
    {
        // ignore excessive number of post fields
        if (++$this->postCount > $this->maxInputVars) {
            return;
        }
        $this->request = $this->request->withParsedBody($this->extractPost($this->request->getParsedBody(), $name, $value));
        if (\strtoupper($name) === 'MAX_FILE_SIZE') {
            $this->maxFileSize = (int) $value;
            if ($this->maxFileSize === 0) {
                $this->maxFileSize = null;
            }
        }
    }
    private function parseHeaders($header)
    {
        $headers = array();
        foreach (\explode("\r\n", \trim($header)) as $line) {
            $parts = \explode(':', $line, 2);
            if (!isset($parts[1])) {
                continue;
            }
            $key = \strtolower(\trim($parts[0]));
            $values = \explode(';', $parts[1]);
            $values = \array_map('trim', $values);
            $headers[$key] = $values;
        }
        return $headers;
    }
    private function getParameterFromHeader(array $header, $parameter)
    {
        foreach ($header as $part) {
            if (\preg_match('/' . $parameter . '="?(.*?)"?$/', $part, $matches)) {
                return $matches[1];
            }
        }
        return null;
    }
    private function extractPost($postFields, $key, $value)
    {
        $chunks = \explode('[', $key);
        if (\count($chunks) == 1) {
            $postFields[$key] = $value;
            return $postFields;
        }
        // ignore this key if maximum nesting level is exceeded
        if (isset($chunks[$this->maxInputNestingLevel])) {
            return $postFields;
        }
        $chunkKey = \rtrim($chunks[0], ']');
        $parent =& $postFields;
        for ($i = 1; isset($chunks[$i]); $i++) {
            $previousChunkKey = $chunkKey;
            if ($previousChunkKey === '') {
                $parent[] = array();
                \end($parent);
                $parent =& $parent[\key($parent)];
            } else {
                if (!isset($parent[$previousChunkKey]) || !\is_array($parent[$previousChunkKey])) {
                    $parent[$previousChunkKey] = array();
                }
                $parent =& $parent[$previousChunkKey];
            }
            $chunkKey = \rtrim($chunks[$i], ']');
        }
        if ($chunkKey === '') {
            $parent[] = $value;
        } else {
            $parent[$chunkKey] = $value;
        }
        return $postFields;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Io;

use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
/**
 * [internal] Clock source that returns current timestamp and memoize clock for same tick
 *
 * This is mostly used as an internal optimization to avoid unneeded syscalls to
 * get the current system time multiple times within the same loop tick. For the
 * purpose of the HTTP server, the clock is assumed to not change to a
 * significant degree within the same loop tick. If you need a high precision
 * clock source, you may want to use `\hrtime()` instead (PHP 7.3+).
 *
 * The API is modelled to resemble the PSR-20 `ClockInterface` (in draft at the
 * time of writing this), but uses a `float` return value for performance
 * reasons instead.
 *
 * Note that this is an internal class only and nothing you should usually care
 * about for outside use.
 *
 * @internal
 */
class Clock
{
    /** @var LoopInterface $loop */
    private $loop;
    /** @var ?float */
    private $now;
    public function __construct(LoopInterface $loop)
    {
        $this->loop = $loop;
    }
    /** @return float */
    public function now()
    {
        if ($this->now === null) {
            $this->now = \microtime(\true);
            // remember clock for current loop tick only and update on next tick
            $now =& $this->now;
            $this->loop->futureTick(function () use(&$now) {
                \assert($now !== null);
                $now = null;
            });
        }
        return $this->now;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Io;

/** @internal */
class ClientRequestState
{
    /** @var int */
    public $numRequests = 0;
    /** @var ?\React\Promise\PromiseInterface */
    public $pending = null;
    /** @var ?\React\EventLoop\TimerInterface */
    public $timeout = null;
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Io;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
use _PHPStan_dcc7b7cff\Psr\Http\Message\StreamInterface;
use _PHPStan_dcc7b7cff\React\Stream\ReadableStreamInterface;
use _PHPStan_dcc7b7cff\React\Stream\Util;
use _PHPStan_dcc7b7cff\React\Stream\WritableStreamInterface;
/**
 * @internal
 */
class ReadableBodyStream extends EventEmitter implements ReadableStreamInterface, StreamInterface
{
    private $input;
    private $position = 0;
    private $size;
    private $closed = \false;
    public function __construct(ReadableStreamInterface $input, $size = null)
    {
        $this->input = $input;
        $this->size = $size;
        $that = $this;
        $pos =& $this->position;
        $input->on('data', function ($data) use($that, &$pos, $size) {
            $that->emit('data', array($data));
            $pos += \strlen($data);
            if ($size !== null && $pos >= $size) {
                $that->handleEnd();
            }
        });
        $input->on('error', function ($error) use($that) {
            $that->emit('error', array($error));
            $that->close();
        });
        $input->on('end', array($that, 'handleEnd'));
        $input->on('close', array($that, 'close'));
    }
    public function close()
    {
        if (!$this->closed) {
            $this->closed = \true;
            $this->input->close();
            $this->emit('close');
            $this->removeAllListeners();
        }
    }
    public function isReadable()
    {
        return $this->input->isReadable();
    }
    public function pause()
    {
        $this->input->pause();
    }
    public function resume()
    {
        $this->input->resume();
    }
    public function pipe(WritableStreamInterface $dest, array $options = array())
    {
        Util::pipe($this, $dest, $options);
        return $dest;
    }
    public function eof()
    {
        return !$this->isReadable();
    }
    public function __toString()
    {
        return '';
    }
    public function detach()
    {
        throw new \BadMethodCallException();
    }
    public function getSize()
    {
        return $this->size;
    }
    public function tell()
    {
        throw new \BadMethodCallException();
    }
    public function isSeekable()
    {
        return \false;
    }
    public function seek($offset, $whence = \SEEK_SET)
    {
        throw new \BadMethodCallException();
    }
    public function rewind()
    {
        throw new \BadMethodCallException();
    }
    public function isWritable()
    {
        return \false;
    }
    public function write($string)
    {
        throw new \BadMethodCallException();
    }
    public function read($length)
    {
        throw new \BadMethodCallException();
    }
    public function getContents()
    {
        throw new \BadMethodCallException();
    }
    public function getMetadata($key = null)
    {
        return $key === null ? array() : null;
    }
    /** @internal */
    public function handleEnd()
    {
        if ($this->position !== $this->size && $this->size !== null) {
            $this->emit('error', array(new \UnderflowException('Unexpected end of response body after ' . $this->position . '/' . $this->size . ' bytes')));
        } else {
            $this->emit('end');
        }
        $this->close();
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Io;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
use _PHPStan_dcc7b7cff\React\Stream\ReadableStreamInterface;
use _PHPStan_dcc7b7cff\React\Stream\Util;
use _PHPStan_dcc7b7cff\React\Stream\WritableStreamInterface;
/**
 * [Internal] Protects a given stream from actually closing and only discards its incoming data instead.
 *
 * This is used internally to prevent the underlying connection from closing, so
 * that we can still send back a response over the same stream.
 *
 * @internal
 * */
class CloseProtectionStream extends EventEmitter implements ReadableStreamInterface
{
    private $input;
    private $closed = \false;
    private $paused = \false;
    /**
     * @param ReadableStreamInterface $input stream that will be discarded instead of closing it on an 'close' event.
     */
    public function __construct(ReadableStreamInterface $input)
    {
        $this->input = $input;
        $this->input->on('data', array($this, 'handleData'));
        $this->input->on('end', array($this, 'handleEnd'));
        $this->input->on('error', array($this, 'handleError'));
        $this->input->on('close', array($this, 'close'));
    }
    public function isReadable()
    {
        return !$this->closed && $this->input->isReadable();
    }
    public function pause()
    {
        if ($this->closed) {
            return;
        }
        $this->paused = \true;
        $this->input->pause();
    }
    public function resume()
    {
        if ($this->closed) {
            return;
        }
        $this->paused = \false;
        $this->input->resume();
    }
    public function pipe(WritableStreamInterface $dest, array $options = array())
    {
        Util::pipe($this, $dest, $options);
        return $dest;
    }
    public function close()
    {
        if ($this->closed) {
            return;
        }
        $this->closed = \true;
        // stop listening for incoming events
        $this->input->removeListener('data', array($this, 'handleData'));
        $this->input->removeListener('error', array($this, 'handleError'));
        $this->input->removeListener('end', array($this, 'handleEnd'));
        $this->input->removeListener('close', array($this, 'close'));
        // resume the stream to ensure we discard everything from incoming connection
        if ($this->paused) {
            $this->paused = \false;
            $this->input->resume();
        }
        $this->emit('close');
        $this->removeAllListeners();
    }
    /** @internal */
    public function handleData($data)
    {
        $this->emit('data', array($data));
    }
    /** @internal */
    public function handleEnd()
    {
        $this->emit('end');
        $this->close();
    }
    /** @internal */
    public function handleError(\Exception $e)
    {
        $this->emit('error', array($e));
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Io;

use _PHPStan_dcc7b7cff\Psr\Http\Message\ResponseInterface;
use _PHPStan_dcc7b7cff\Psr\Http\Message\ServerRequestInterface;
use _PHPStan_dcc7b7cff\React\Promise\PromiseInterface;
/**
 * [Internal] Middleware runner to expose an array of middleware request handlers as a single request handler callable
 *
 * @internal
 */
final class MiddlewareRunner
{
    /**
     * @var callable[]
     */
    private $middleware;
    /**
     * @param callable[] $middleware
     */
    public function __construct(array $middleware)
    {
        $this->middleware = \array_values($middleware);
    }
    /**
     * @param ServerRequestInterface $request
     * @return ResponseInterface|PromiseInterface<ResponseInterface>
     * @throws \Exception
     */
    public function __invoke(ServerRequestInterface $request)
    {
        if (empty($this->middleware)) {
            throw new \RuntimeException('No middleware to run');
        }
        return $this->call($request, 0);
    }
    /** @internal */
    public function call(ServerRequestInterface $request, $position)
    {
        // final request handler will be invoked without a next handler
        if (!isset($this->middleware[$position + 1])) {
            $handler = $this->middleware[$position];
            return $handler($request);
        }
        $that = $this;
        $next = function (ServerRequestInterface $request) use($that, $position) {
            return $that->call($request, $position + 1);
        };
        // invoke middleware request handler with next handler
        $handler = $this->middleware[$position];
        return $handler($request, $next);
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Io;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
use _PHPStan_dcc7b7cff\React\Stream\ReadableStreamInterface;
use _PHPStan_dcc7b7cff\React\Stream\Util;
use _PHPStan_dcc7b7cff\React\Stream\WritableStreamInterface;
/**
 * [Internal] Limits the amount of data the given stream can emit
 *
 * This is used internally to limit the size of the underlying connection stream
 * to the size defined by the "Content-Length" header of the incoming request.
 *
 * @internal
 */
class LengthLimitedStream extends EventEmitter implements ReadableStreamInterface
{
    private $stream;
    private $closed = \false;
    private $transferredLength = 0;
    private $maxLength;
    public function __construct(ReadableStreamInterface $stream, $maxLength)
    {
        $this->stream = $stream;
        $this->maxLength = $maxLength;
        $this->stream->on('data', array($this, 'handleData'));
        $this->stream->on('end', array($this, 'handleEnd'));
        $this->stream->on('error', array($this, 'handleError'));
        $this->stream->on('close', array($this, 'close'));
    }
    public function isReadable()
    {
        return !$this->closed && $this->stream->isReadable();
    }
    public function pause()
    {
        $this->stream->pause();
    }
    public function resume()
    {
        $this->stream->resume();
    }
    public function pipe(WritableStreamInterface $dest, array $options = array())
    {
        Util::pipe($this, $dest, $options);
        return $dest;
    }
    public function close()
    {
        if ($this->closed) {
            return;
        }
        $this->closed = \true;
        $this->stream->close();
        $this->emit('close');
        $this->removeAllListeners();
    }
    /** @internal */
    public function handleData($data)
    {
        if ($this->transferredLength + \strlen($data) > $this->maxLength) {
            // Only emit data until the value of 'Content-Length' is reached, the rest will be ignored
            $data = (string) \substr($data, 0, $this->maxLength - $this->transferredLength);
        }
        if ($data !== '') {
            $this->transferredLength += \strlen($data);
            $this->emit('data', array($data));
        }
        if ($this->transferredLength === $this->maxLength) {
            // 'Content-Length' reached, stream will end
            $this->emit('end');
            $this->close();
            $this->stream->removeListener('data', array($this, 'handleData'));
        }
    }
    /** @internal */
    public function handleError(\Exception $e)
    {
        $this->emit('error', array($e));
        $this->close();
    }
    /** @internal */
    public function handleEnd()
    {
        if (!$this->closed) {
            $this->handleError(new \Exception('Unexpected end event'));
        }
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Io;

use _PHPStan_dcc7b7cff\Psr\Http\Message\StreamInterface;
/**
 * [Internal] PSR-7 message body implementation using an in-memory buffer
 *
 * @internal
 */
class BufferedBody implements StreamInterface
{
    private $buffer = '';
    private $position = 0;
    private $closed = \false;
    /**
     * @param string $buffer
     */
    public function __construct($buffer)
    {
        $this->buffer = $buffer;
    }
    public function __toString()
    {
        if ($this->closed) {
            return '';
        }
        $this->seek(0);
        return $this->getContents();
    }
    public function close()
    {
        $this->buffer = '';
        $this->position = 0;
        $this->closed = \true;
    }
    public function detach()
    {
        $this->close();
        return null;
    }
    public function getSize()
    {
        return $this->closed ? null : \strlen($this->buffer);
    }
    public function tell()
    {
        if ($this->closed) {
            throw new \RuntimeException('Unable to tell position of closed stream');
        }
        return $this->position;
    }
    public function eof()
    {
        return $this->position >= \strlen($this->buffer);
    }
    public function isSeekable()
    {
        return !$this->closed;
    }
    public function seek($offset, $whence = \SEEK_SET)
    {
        if ($this->closed) {
            throw new \RuntimeException('Unable to seek on closed stream');
        }
        $old = $this->position;
        if ($whence === \SEEK_SET) {
            $this->position = $offset;
        } elseif ($whence === \SEEK_CUR) {
            $this->position += $offset;
        } elseif ($whence === \SEEK_END) {
            $this->position = \strlen($this->buffer) + $offset;
        } else {
            throw new \InvalidArgumentException('Invalid seek mode given');
        }
        if (!\is_int($this->position) || $this->position < 0) {
            $this->position = $old;
            throw new \RuntimeException('Unable to seek to position');
        }
    }
    public function rewind()
    {
        $this->seek(0);
    }
    public function isWritable()
    {
        return !$this->closed;
    }
    public function write($string)
    {
        if ($this->closed) {
            throw new \RuntimeException('Unable to write to closed stream');
        }
        if ($string === '') {
            return 0;
        }
        if ($this->position > 0 && !isset($this->buffer[$this->position - 1])) {
            $this->buffer = \str_pad($this->buffer, $this->position, "\x00");
        }
        $len = \strlen($string);
        $this->buffer = \substr($this->buffer, 0, $this->position) . $string . \substr($this->buffer, $this->position + $len);
        $this->position += $len;
        return $len;
    }
    public function isReadable()
    {
        return !$this->closed;
    }
    public function read($length)
    {
        if ($this->closed) {
            throw new \RuntimeException('Unable to read from closed stream');
        }
        if ($length < 1) {
            throw new \InvalidArgumentException('Invalid read length given');
        }
        if ($this->position + $length > \strlen($this->buffer)) {
            $length = \strlen($this->buffer) - $this->position;
        }
        if (!isset($this->buffer[$this->position])) {
            return '';
        }
        $pos = $this->position;
        $this->position += $length;
        return \substr($this->buffer, $pos, $length);
    }
    public function getContents()
    {
        if ($this->closed) {
            throw new \RuntimeException('Unable to read from closed stream');
        }
        if (!isset($this->buffer[$this->position])) {
            return '';
        }
        $pos = $this->position;
        $this->position = \strlen($this->buffer);
        return \substr($this->buffer, $pos);
    }
    public function getMetadata($key = null)
    {
        return $key === null ? array() : null;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Io;

use _PHPStan_dcc7b7cff\Psr\Http\Message\StreamInterface;
use _PHPStan_dcc7b7cff\Psr\Http\Message\UploadedFileInterface;
use InvalidArgumentException;
use RuntimeException;
/**
 * [Internal] Implementation of the PSR-7 `UploadedFileInterface`
 *
 * This is used internally to represent each incoming file upload.
 *
 * Note that this is an internal class only and nothing you should usually care
 * about. See the `UploadedFileInterface` for more details.
 *
 * @see UploadedFileInterface
 * @internal
 */
final class UploadedFile implements UploadedFileInterface
{
    /**
     * @var StreamInterface
     */
    private $stream;
    /**
     * @var int
     */
    private $size;
    /**
     * @var int
     */
    private $error;
    /**
     * @var string
     */
    private $filename;
    /**
     * @var string
     */
    private $mediaType;
    /**
     * @param StreamInterface $stream
     * @param int $size
     * @param int $error
     * @param string $filename
     * @param string $mediaType
     */
    public function __construct(StreamInterface $stream, $size, $error, $filename, $mediaType)
    {
        $this->stream = $stream;
        $this->size = $size;
        if (!\is_int($error) || !\in_array($error, array(\UPLOAD_ERR_OK, \UPLOAD_ERR_INI_SIZE, \UPLOAD_ERR_FORM_SIZE, \UPLOAD_ERR_PARTIAL, \UPLOAD_ERR_NO_FILE, \UPLOAD_ERR_NO_TMP_DIR, \UPLOAD_ERR_CANT_WRITE, \UPLOAD_ERR_EXTENSION))) {
            throw new InvalidArgumentException('Invalid error code, must be an UPLOAD_ERR_* constant');
        }
        $this->error = $error;
        $this->filename = $filename;
        $this->mediaType = $mediaType;
    }
    /**
     * {@inheritdoc}
     */
    public function getStream()
    {
        if ($this->error !== \UPLOAD_ERR_OK) {
            throw new RuntimeException('Cannot retrieve stream due to upload error');
        }
        return $this->stream;
    }
    /**
     * {@inheritdoc}
     */
    public function moveTo($targetPath)
    {
        throw new RuntimeException('Not implemented');
    }
    /**
     * {@inheritdoc}
     */
    public function getSize()
    {
        return $this->size;
    }
    /**
     * {@inheritdoc}
     */
    public function getError()
    {
        return $this->error;
    }
    /**
     * {@inheritdoc}
     */
    public function getClientFilename()
    {
        return $this->filename;
    }
    /**
     * {@inheritdoc}
     */
    public function getClientMediaType()
    {
        return $this->mediaType;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Io;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
use _PHPStan_dcc7b7cff\Psr\Http\Message\StreamInterface;
use _PHPStan_dcc7b7cff\React\Stream\ReadableStreamInterface;
use _PHPStan_dcc7b7cff\React\Stream\Util;
use _PHPStan_dcc7b7cff\React\Stream\WritableStreamInterface;
/**
 * [Internal] Bridge between an empty StreamInterface from PSR-7 and ReadableStreamInterface from ReactPHP
 *
 * This class is used in the server to represent an empty body stream of an
 * incoming response from the client. This is similar to the `HttpBodyStream`,
 * but is specifically designed for the common case of having an empty message
 * body.
 *
 * Note that this is an internal class only and nothing you should usually care
 * about. See the `StreamInterface` and `ReadableStreamInterface` for more
 * details.
 *
 * @see HttpBodyStream
 * @see StreamInterface
 * @see ReadableStreamInterface
 * @internal
 */
class EmptyBodyStream extends EventEmitter implements StreamInterface, ReadableStreamInterface
{
    private $closed = \false;
    public function isReadable()
    {
        return !$this->closed;
    }
    public function pause()
    {
        // NOOP
    }
    public function resume()
    {
        // NOOP
    }
    public function pipe(WritableStreamInterface $dest, array $options = array())
    {
        Util::pipe($this, $dest, $options);
        return $dest;
    }
    public function close()
    {
        if ($this->closed) {
            return;
        }
        $this->closed = \true;
        $this->emit('close');
        $this->removeAllListeners();
    }
    public function getSize()
    {
        return 0;
    }
    /** @ignore */
    public function __toString()
    {
        return '';
    }
    /** @ignore */
    public function detach()
    {
        return null;
    }
    /** @ignore */
    public function tell()
    {
        throw new \BadMethodCallException();
    }
    /** @ignore */
    public function eof()
    {
        throw new \BadMethodCallException();
    }
    /** @ignore */
    public function isSeekable()
    {
        return \false;
    }
    /** @ignore */
    public function seek($offset, $whence = \SEEK_SET)
    {
        throw new \BadMethodCallException();
    }
    /** @ignore */
    public function rewind()
    {
        throw new \BadMethodCallException();
    }
    /** @ignore */
    public function isWritable()
    {
        return \false;
    }
    /** @ignore */
    public function write($string)
    {
        throw new \BadMethodCallException();
    }
    /** @ignore */
    public function read($length)
    {
        throw new \BadMethodCallException();
    }
    /** @ignore */
    public function getContents()
    {
        return '';
    }
    /** @ignore */
    public function getMetadata($key = null)
    {
        return $key === null ? array() : null;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Io;

/**
 * @internal
 */
final class IniUtil
{
    /**
     * Convert a ini like size to a numeric size in bytes.
     *
     * @param string $size
     * @return int
     */
    public static function iniSizeToBytes($size)
    {
        if (\is_numeric($size)) {
            return (int) $size;
        }
        $suffix = \strtoupper(\substr($size, -1));
        $strippedSize = \substr($size, 0, -1);
        if (!\is_numeric($strippedSize)) {
            throw new \InvalidArgumentException("{$size} is not a valid ini size");
        }
        if ($strippedSize <= 0) {
            throw new \InvalidArgumentException("Expect {$size} to be higher isn't zero or lower");
        }
        if ($suffix === 'K') {
            return $strippedSize * 1024;
        }
        if ($suffix === 'M') {
            return $strippedSize * 1024 * 1024;
        }
        if ($suffix === 'G') {
            return $strippedSize * 1024 * 1024 * 1024;
        }
        if ($suffix === 'T') {
            return $strippedSize * 1024 * 1024 * 1024 * 1024;
        }
        return (int) $size;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Io;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
use _PHPStan_dcc7b7cff\Psr\Http\Message\ResponseInterface;
use _PHPStan_dcc7b7cff\Psr\Http\Message\ServerRequestInterface;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use _PHPStan_dcc7b7cff\React\Http\Message\Response;
use _PHPStan_dcc7b7cff\React\Http\Message\ServerRequest;
use _PHPStan_dcc7b7cff\React\Promise;
use _PHPStan_dcc7b7cff\React\Promise\PromiseInterface;
use _PHPStan_dcc7b7cff\React\Socket\ConnectionInterface;
use _PHPStan_dcc7b7cff\React\Socket\ServerInterface;
use _PHPStan_dcc7b7cff\React\Stream\ReadableStreamInterface;
use _PHPStan_dcc7b7cff\React\Stream\WritableStreamInterface;
/**
 * The internal `StreamingServer` class is responsible for handling incoming connections and then
 * processing each incoming HTTP request.
 *
 * Unlike the [`HttpServer`](#httpserver) class, it does not buffer and parse the incoming
 * HTTP request body by default. This means that the request handler will be
 * invoked with a streaming request body. Once the request headers have been
 * received, it will invoke the request handler function. This request handler
 * function needs to be passed to the constructor and will be invoked with the
 * respective [request](#request) object and expects a [response](#response)
 * object in return:
 *
 * ```php
 * $server = new StreamingServer($loop, function (ServerRequestInterface $request) {
 *     return new Response(
 *         Response::STATUS_OK,
 *         array(
 *             'Content-Type' => 'text/plain'
 *         ),
 *         "Hello World!\n"
 *     );
 * });
 * ```
 *
 * Each incoming HTTP request message is always represented by the
 * [PSR-7 `ServerRequestInterface`](https://www.php-fig.org/psr/psr-7/#321-psrhttpmessageserverrequestinterface),
 * see also following [request](#request) chapter for more details.
 * Each outgoing HTTP response message is always represented by the
 * [PSR-7 `ResponseInterface`](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface),
 * see also following [response](#response) chapter for more details.
 *
 * In order to process any connections, the server needs to be attached to an
 * instance of `React\Socket\ServerInterface` through the [`listen()`](#listen) method
 * as described in the following chapter. In its most simple form, you can attach
 * this to a [`React\Socket\SocketServer`](https://github.com/reactphp/socket#socketserver)
 * in order to start a plaintext HTTP server like this:
 *
 * ```php
 * $server = new StreamingServer($loop, $handler);
 *
 * $socket = new React\Socket\SocketServer('0.0.0.0:8080', array(), $loop);
 * $server->listen($socket);
 * ```
 *
 * See also the [`listen()`](#listen) method and the [first example](examples) for more details.
 *
 * The `StreamingServer` class is considered advanced usage and unless you know
 * what you're doing, you're recommended to use the [`HttpServer`](#httpserver) class
 * instead. The `StreamingServer` class is specifically designed to help with
 * more advanced use cases where you want to have full control over consuming
 * the incoming HTTP request body and concurrency settings.
 *
 * In particular, this class does not buffer and parse the incoming HTTP request
 * in memory. It will invoke the request handler function once the HTTP request
 * headers have been received, i.e. before receiving the potentially much larger
 * HTTP request body. This means the [request](#request) passed to your request
 * handler function may not be fully compatible with PSR-7. See also
 * [streaming request](#streaming-request) below for more details.
 *
 * @see \React\Http\HttpServer
 * @see \React\Http\Message\Response
 * @see self::listen()
 * @internal
 */
final class StreamingServer extends EventEmitter
{
    private $callback;
    private $parser;
    /** @var Clock */
    private $clock;
    /**
     * Creates an HTTP server that invokes the given callback for each incoming HTTP request
     *
     * In order to process any connections, the server needs to be attached to an
     * instance of `React\Socket\ServerInterface` which emits underlying streaming
     * connections in order to then parse incoming data as HTTP.
     * See also [listen()](#listen) for more details.
     *
     * @param LoopInterface $loop
     * @param callable $requestHandler
     * @see self::listen()
     */
    public function __construct(LoopInterface $loop, $requestHandler)
    {
        if (!\is_callable($requestHandler)) {
            throw new \InvalidArgumentException('Invalid request handler given');
        }
        $this->callback = $requestHandler;
        $this->clock = new Clock($loop);
        $this->parser = new RequestHeaderParser($this->clock);
        $that = $this;
        $this->parser->on('headers', function (ServerRequestInterface $request, ConnectionInterface $conn) use($that) {
            $that->handleRequest($conn, $request);
        });
        $this->parser->on('error', function (\Exception $e, ConnectionInterface $conn) use($that) {
            $that->emit('error', array($e));
            // parsing failed => assume dummy request and send appropriate error
            $that->writeError($conn, $e->getCode() !== 0 ? $e->getCode() : Response::STATUS_BAD_REQUEST, new ServerRequest('GET', '/'));
        });
    }
    /**
     * Starts listening for HTTP requests on the given socket server instance
     *
     * @param ServerInterface $socket
     * @see \React\Http\HttpServer::listen()
     */
    public function listen(ServerInterface $socket)
    {
        $socket->on('connection', array($this->parser, 'handle'));
    }
    /** @internal */
    public function handleRequest(ConnectionInterface $conn, ServerRequestInterface $request)
    {
        if ($request->getProtocolVersion() !== '1.0' && '100-continue' === \strtolower($request->getHeaderLine('Expect'))) {
            $conn->write("HTTP/1.1 100 Continue\r\n\r\n");
        }
        // execute request handler callback
        $callback = $this->callback;
        try {
            $response = $callback($request);
        } catch (\Exception $error) {
            // request handler callback throws an Exception
            $response = Promise\reject($error);
        } catch (\Throwable $error) {
            // @codeCoverageIgnoreStart
            // request handler callback throws a PHP7+ Error
            $response = Promise\reject($error);
            // @codeCoverageIgnoreEnd
        }
        // cancel pending promise once connection closes
        if ($response instanceof PromiseInterface && \method_exists($response, 'cancel')) {
            $conn->on('close', function () use($response) {
                $response->cancel();
            });
        }
        // happy path: response returned, handle and return immediately
        if ($response instanceof ResponseInterface) {
            return $this->handleResponse($conn, $request, $response);
        }
        // did not return a promise? this is an error, convert into one for rejection below.
        if (!$response instanceof PromiseInterface) {
            $response = Promise\resolve($response);
        }
        $that = $this;
        $response->then(function ($response) use($that, $conn, $request) {
            if (!$response instanceof ResponseInterface) {
                $message = 'The response callback is expected to resolve with an object implementing Psr\\Http\\Message\\ResponseInterface, but resolved with "%s" instead.';
                $message = \sprintf($message, \is_object($response) ? \get_class($response) : \gettype($response));
                $exception = new \RuntimeException($message);
                $that->emit('error', array($exception));
                return $that->writeError($conn, Response::STATUS_INTERNAL_SERVER_ERROR, $request);
            }
            $that->handleResponse($conn, $request, $response);
        }, function ($error) use($that, $conn, $request) {
            $message = 'The response callback is expected to resolve with an object implementing Psr\\Http\\Message\\ResponseInterface, but rejected with "%s" instead.';
            $message = \sprintf($message, \is_object($error) ? \get_class($error) : \gettype($error));
            $previous = null;
            if ($error instanceof \Throwable || $error instanceof \Exception) {
                $previous = $error;
            }
            $exception = new \RuntimeException($message, 0, $previous);
            $that->emit('error', array($exception));
            return $that->writeError($conn, Response::STATUS_INTERNAL_SERVER_ERROR, $request);
        });
    }
    /** @internal */
    public function writeError(ConnectionInterface $conn, $code, ServerRequestInterface $request)
    {
        $response = new Response($code, array('Content-Type' => 'text/plain', 'Connection' => 'close'), 'Error ' . $code);
        // append reason phrase to response body if known
        $reason = $response->getReasonPhrase();
        if ($reason !== '') {
            $body = $response->getBody();
            $body->seek(0, \SEEK_END);
            $body->write(': ' . $reason);
        }
        $this->handleResponse($conn, $request, $response);
    }
    /** @internal */
    public function handleResponse(ConnectionInterface $connection, ServerRequestInterface $request, ResponseInterface $response)
    {
        // return early and close response body if connection is already closed
        $body = $response->getBody();
        if (!$connection->isWritable()) {
            $body->close();
            return;
        }
        $code = $response->getStatusCode();
        $method = $request->getMethod();
        // assign HTTP protocol version from request automatically
        $version = $request->getProtocolVersion();
        $response = $response->withProtocolVersion($version);
        // assign default "Server" header automatically
        if (!$response->hasHeader('Server')) {
            $response = $response->withHeader('Server', 'ReactPHP/1');
        } elseif ($response->getHeaderLine('Server') === '') {
            $response = $response->withoutHeader('Server');
        }
        // assign default "Date" header from current time automatically
        if (!$response->hasHeader('Date')) {
            // IMF-fixdate  = day-name "," SP date1 SP time-of-day SP GMT
            $response = $response->withHeader('Date', \gmdate('D, d M Y H:i:s', (int) $this->clock->now()) . ' GMT');
        } elseif ($response->getHeaderLine('Date') === '') {
            $response = $response->withoutHeader('Date');
        }
        // assign "Content-Length" header automatically
        $chunked = \false;
        if ($method === 'CONNECT' && $code >= 200 && $code < 300 || $code >= 100 && $code < 200 || $code === Response::STATUS_NO_CONTENT) {
            // 2xx response to CONNECT and 1xx and 204 MUST NOT include Content-Length or Transfer-Encoding header
            $response = $response->withoutHeader('Content-Length');
        } elseif ($method === 'HEAD' && $response->hasHeader('Content-Length')) {
            // HEAD Request: preserve explicit Content-Length
        } elseif ($code === Response::STATUS_NOT_MODIFIED && ($response->hasHeader('Content-Length') || $body->getSize() === 0)) {
            // 304 Not Modified: preserve explicit Content-Length and preserve missing header if body is empty
        } elseif ($body->getSize() !== null) {
            // assign Content-Length header when using a "normal" buffered body string
            $response = $response->withHeader('Content-Length', (string) $body->getSize());
        } elseif (!$response->hasHeader('Content-Length') && $version === '1.1') {
            // assign chunked transfer-encoding if no 'content-length' is given for HTTP/1.1 responses
            $chunked = \true;
        }
        // assign "Transfer-Encoding" header automatically
        if ($chunked) {
            $response = $response->withHeader('Transfer-Encoding', 'chunked');
        } else {
            // remove any Transfer-Encoding headers unless automatically enabled above
            $response = $response->withoutHeader('Transfer-Encoding');
        }
        // assign "Connection" header automatically
        $persist = \false;
        if ($code === Response::STATUS_SWITCHING_PROTOCOLS) {
            // 101 (Switching Protocols) response uses Connection: upgrade header
            // This implies that this stream now uses another protocol and we
            // may not persist this connection for additional requests.
            $response = $response->withHeader('Connection', 'upgrade');
        } elseif (\strtolower($request->getHeaderLine('Connection')) === 'close' || \strtolower($response->getHeaderLine('Connection')) === 'close') {
            // obey explicit "Connection: close" request header or response header if present
            $response = $response->withHeader('Connection', 'close');
        } elseif ($version === '1.1') {
            // HTTP/1.1 assumes persistent connection support by default, so we don't need to inform client
            $persist = \true;
        } elseif (\strtolower($request->getHeaderLine('Connection')) === 'keep-alive') {
            // obey explicit "Connection: keep-alive" request header and inform client
            $persist = \true;
            $response = $response->withHeader('Connection', 'keep-alive');
        } else {
            // remove any Connection headers unless automatically enabled above
            $response = $response->withoutHeader('Connection');
        }
        // 101 (Switching Protocols) response (for Upgrade request) forwards upgraded data through duplex stream
        // 2xx (Successful) response to CONNECT forwards tunneled application data through duplex stream
        if (($code === Response::STATUS_SWITCHING_PROTOCOLS || $method === 'CONNECT' && $code >= 200 && $code < 300) && $body instanceof HttpBodyStream && $body->input instanceof WritableStreamInterface) {
            if ($request->getBody()->isReadable()) {
                // request is still streaming => wait for request close before forwarding following data from connection
                $request->getBody()->on('close', function () use($connection, $body) {
                    if ($body->input->isWritable()) {
                        $connection->pipe($body->input);
                        $connection->resume();
                    }
                });
            } elseif ($body->input->isWritable()) {
                // request already closed => forward following data from connection
                $connection->pipe($body->input);
                $connection->resume();
            }
        }
        // build HTTP response header by appending status line and header fields
        $headers = "HTTP/" . $version . " " . $code . " " . $response->getReasonPhrase() . "\r\n";
        foreach ($response->getHeaders() as $name => $values) {
            foreach ($values as $value) {
                $headers .= $name . ": " . $value . "\r\n";
            }
        }
        // response to HEAD and 1xx, 204 and 304 responses MUST NOT include a body
        // exclude status 101 (Switching Protocols) here for Upgrade request handling above
        if ($method === 'HEAD' || $code >= 100 && $code < 200 && $code !== Response::STATUS_SWITCHING_PROTOCOLS || $code === Response::STATUS_NO_CONTENT || $code === Response::STATUS_NOT_MODIFIED) {
            $body->close();
            $body = '';
        }
        // this is a non-streaming response body or the body stream already closed?
        if (!$body instanceof ReadableStreamInterface || !$body->isReadable()) {
            // add final chunk if a streaming body is already closed and uses `Transfer-Encoding: chunked`
            if ($body instanceof ReadableStreamInterface && $chunked) {
                $body = "0\r\n\r\n";
            }
            // write response headers and body
            $connection->write($headers . "\r\n" . $body);
            // either wait for next request over persistent connection or end connection
            if ($persist) {
                $this->parser->handle($connection);
            } else {
                $connection->end();
            }
            return;
        }
        $connection->write($headers . "\r\n");
        if ($chunked) {
            $body = new ChunkedEncoder($body);
        }
        // Close response stream once connection closes.
        // Note that this TCP/IP close detection may take some time,
        // in particular this may only fire on a later read/write attempt.
        $connection->on('close', array($body, 'close'));
        // write streaming body and then wait for next request over persistent connection
        if ($persist) {
            $body->pipe($connection, array('end' => \false));
            $parser = $this->parser;
            $body->on('end', function () use($connection, $parser, $body) {
                $connection->removeListener('close', array($body, 'close'));
                $parser->handle($connection);
            });
        } else {
            $body->pipe($connection);
        }
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Io;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
use _PHPStan_dcc7b7cff\React\Stream\ReadableStreamInterface;
use _PHPStan_dcc7b7cff\React\Stream\Util;
use _PHPStan_dcc7b7cff\React\Stream\WritableStreamInterface;
use Exception;
/**
 * [Internal] Decodes "Transfer-Encoding: chunked" from given stream and returns only payload data.
 *
 * This is used internally to decode incoming requests with this encoding.
 *
 * @internal
 */
class ChunkedDecoder extends EventEmitter implements ReadableStreamInterface
{
    const CRLF = "\r\n";
    const MAX_CHUNK_HEADER_SIZE = 1024;
    private $closed = \false;
    private $input;
    private $buffer = '';
    private $chunkSize = 0;
    private $transferredSize = 0;
    private $headerCompleted = \false;
    public function __construct(ReadableStreamInterface $input)
    {
        $this->input = $input;
        $this->input->on('data', array($this, 'handleData'));
        $this->input->on('end', array($this, 'handleEnd'));
        $this->input->on('error', array($this, 'handleError'));
        $this->input->on('close', array($this, 'close'));
    }
    public function isReadable()
    {
        return !$this->closed && $this->input->isReadable();
    }
    public function pause()
    {
        $this->input->pause();
    }
    public function resume()
    {
        $this->input->resume();
    }
    public function pipe(WritableStreamInterface $dest, array $options = array())
    {
        Util::pipe($this, $dest, $options);
        return $dest;
    }
    public function close()
    {
        if ($this->closed) {
            return;
        }
        $this->buffer = '';
        $this->closed = \true;
        $this->input->close();
        $this->emit('close');
        $this->removeAllListeners();
    }
    /** @internal */
    public function handleEnd()
    {
        if (!$this->closed) {
            $this->handleError(new Exception('Unexpected end event'));
        }
    }
    /** @internal */
    public function handleError(Exception $e)
    {
        $this->emit('error', array($e));
        $this->close();
    }
    /** @internal */
    public function handleData($data)
    {
        $this->buffer .= $data;
        while ($this->buffer !== '') {
            if (!$this->headerCompleted) {
                $positionCrlf = \strpos($this->buffer, static::CRLF);
                if ($positionCrlf === \false) {
                    // Header shouldn't be bigger than 1024 bytes
                    if (isset($this->buffer[static::MAX_CHUNK_HEADER_SIZE])) {
                        $this->handleError(new Exception('Chunk header size inclusive extension bigger than' . static::MAX_CHUNK_HEADER_SIZE . ' bytes'));
                    }
                    return;
                }
                $header = \strtolower((string) \substr($this->buffer, 0, $positionCrlf));
                $hexValue = $header;
                if (\strpos($header, ';') !== \false) {
                    $array = \explode(';', $header);
                    $hexValue = $array[0];
                }
                if ($hexValue !== '') {
                    $hexValue = \ltrim(\trim($hexValue), "0");
                    if ($hexValue === '') {
                        $hexValue = "0";
                    }
                }
                $this->chunkSize = @\hexdec($hexValue);
                if (!\is_int($this->chunkSize) || \dechex($this->chunkSize) !== $hexValue) {
                    $this->handleError(new Exception($hexValue . ' is not a valid hexadecimal number'));
                    return;
                }
                $this->buffer = (string) \substr($this->buffer, $positionCrlf + 2);
                $this->headerCompleted = \true;
                if ($this->buffer === '') {
                    return;
                }
            }
            $chunk = (string) \substr($this->buffer, 0, $this->chunkSize - $this->transferredSize);
            if ($chunk !== '') {
                $this->transferredSize += \strlen($chunk);
                $this->emit('data', array($chunk));
                $this->buffer = (string) \substr($this->buffer, \strlen($chunk));
            }
            $positionCrlf = \strpos($this->buffer, static::CRLF);
            if ($positionCrlf === 0) {
                if ($this->chunkSize === 0) {
                    $this->emit('end');
                    $this->close();
                    return;
                }
                $this->chunkSize = 0;
                $this->headerCompleted = \false;
                $this->transferredSize = 0;
                $this->buffer = (string) \substr($this->buffer, 2);
            } elseif ($this->chunkSize === 0) {
                // end chunk received, skip all trailer data
                $this->buffer = (string) \substr($this->buffer, $positionCrlf);
            }
            if ($positionCrlf !== 0 && $this->chunkSize !== 0 && $this->chunkSize === $this->transferredSize && \strlen($this->buffer) > 2) {
                // the first 2 characters are not CRLF, send error event
                $this->handleError(new Exception('Chunk does not end with a CRLF'));
                return;
            }
            if ($positionCrlf !== 0 && \strlen($this->buffer) < 2) {
                // No CRLF found, wait for additional data which could be a CRLF
                return;
            }
        }
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Io;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
use _PHPStan_dcc7b7cff\Psr\Http\Message\ServerRequestInterface;
use _PHPStan_dcc7b7cff\React\Http\Message\Response;
use _PHPStan_dcc7b7cff\React\Http\Message\ServerRequest;
use _PHPStan_dcc7b7cff\React\Socket\ConnectionInterface;
use Exception;
/**
 * [Internal] Parses an incoming request header from an input stream
 *
 * This is used internally to parse the request header from the connection and
 * then process the remaining connection as the request body.
 *
 * @event headers
 * @event error
 *
 * @internal
 */
class RequestHeaderParser extends EventEmitter
{
    private $maxSize = 8192;
    /** @var Clock */
    private $clock;
    /** @var array<string|int,array<string,string>> */
    private $connectionParams = array();
    public function __construct(Clock $clock)
    {
        $this->clock = $clock;
    }
    public function handle(ConnectionInterface $conn)
    {
        $buffer = '';
        $maxSize = $this->maxSize;
        $that = $this;
        $conn->on('data', $fn = function ($data) use(&$buffer, &$fn, $conn, $maxSize, $that) {
            // append chunk of data to buffer and look for end of request headers
            $buffer .= $data;
            $endOfHeader = \strpos($buffer, "\r\n\r\n");
            // reject request if buffer size is exceeded
            if ($endOfHeader > $maxSize || $endOfHeader === \false && isset($buffer[$maxSize])) {
                $conn->removeListener('data', $fn);
                $fn = null;
                $that->emit('error', array(new \OverflowException("Maximum header size of {$maxSize} exceeded.", Response::STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE), $conn));
                return;
            }
            // ignore incomplete requests
            if ($endOfHeader === \false) {
                return;
            }
            // request headers received => try to parse request
            $conn->removeListener('data', $fn);
            $fn = null;
            try {
                $request = $that->parseRequest((string) \substr($buffer, 0, $endOfHeader + 2), $conn);
            } catch (Exception $exception) {
                $buffer = '';
                $that->emit('error', array($exception, $conn));
                return;
            }
            $contentLength = 0;
            if ($request->hasHeader('Transfer-Encoding')) {
                $contentLength = null;
            } elseif ($request->hasHeader('Content-Length')) {
                $contentLength = (int) $request->getHeaderLine('Content-Length');
            }
            if ($contentLength === 0) {
                // happy path: request body is known to be empty
                $stream = new EmptyBodyStream();
                $request = $request->withBody($stream);
            } else {
                // otherwise body is present => delimit using Content-Length or ChunkedDecoder
                $stream = new CloseProtectionStream($conn);
                if ($contentLength !== null) {
                    $stream = new LengthLimitedStream($stream, $contentLength);
                } else {
                    $stream = new ChunkedDecoder($stream);
                }
                $request = $request->withBody(new HttpBodyStream($stream, $contentLength));
            }
            $bodyBuffer = isset($buffer[$endOfHeader + 4]) ? \substr($buffer, $endOfHeader + 4) : '';
            $buffer = '';
            $that->emit('headers', array($request, $conn));
            if ($bodyBuffer !== '') {
                $conn->emit('data', array($bodyBuffer));
            }
            // happy path: request body is known to be empty => immediately end stream
            if ($contentLength === 0) {
                $stream->emit('end');
                $stream->close();
            }
        });
    }
    /**
     * @param string $headers buffer string containing request headers only
     * @param ConnectionInterface $connection
     * @return ServerRequestInterface
     * @throws \InvalidArgumentException
     * @internal
     */
    public function parseRequest($headers, ConnectionInterface $connection)
    {
        // additional, stricter safe-guard for request line
        // because request parser doesn't properly cope with invalid ones
        $start = array();
        if (!\preg_match('#^(?<method>[^ ]+) (?<target>[^ ]+) HTTP/(?<version>\\d\\.\\d)#m', $headers, $start)) {
            throw new \InvalidArgumentException('Unable to parse invalid request-line');
        }
        // only support HTTP/1.1 and HTTP/1.0 requests
        if ($start['version'] !== '1.1' && $start['version'] !== '1.0') {
            throw new \InvalidArgumentException('Received request with invalid protocol version', Response::STATUS_VERSION_NOT_SUPPORTED);
        }
        // match all request header fields into array, thanks to @kelunik for checking the HTTP specs and coming up with this regex
        $matches = array();
        $n = \preg_match_all('/^([^()<>@,;:\\\\"\\/\\[\\]?={}\\x01-\\x20\\x7F]++):[\\x20\\x09]*+((?:[\\x20\\x09]*+[\\x21-\\x7E\\x80-\\xFF]++)*+)[\\x20\\x09]*+[\\r]?+\\n/m', $headers, $matches, \PREG_SET_ORDER);
        // check number of valid header fields matches number of lines + request line
        if (\substr_count($headers, "\n") !== $n + 1) {
            throw new \InvalidArgumentException('Unable to parse invalid request header fields');
        }
        // format all header fields into associative array
        $host = null;
        $fields = array();
        foreach ($matches as $match) {
            $fields[$match[1]][] = $match[2];
            // match `Host` request header
            if ($host === null && \strtolower($match[1]) === 'host') {
                $host = $match[2];
            }
        }
        // reuse same connection params for all server params for this connection
        $cid = \PHP_VERSION_ID < 70200 ? \spl_object_hash($connection) : \spl_object_id($connection);
        if (isset($this->connectionParams[$cid])) {
            $serverParams = $this->connectionParams[$cid];
        } else {
            // assign new server params for new connection
            $serverParams = array();
            // scheme is `http` unless TLS is used
            $localSocketUri = $connection->getLocalAddress();
            $localParts = $localSocketUri === null ? array() : \parse_url($localSocketUri);
            if (isset($localParts['scheme']) && $localParts['scheme'] === 'tls') {
                $serverParams['HTTPS'] = 'on';
            }
            // apply SERVER_ADDR and SERVER_PORT if server address is known
            // address should always be known, even for Unix domain sockets (UDS)
            // but skip UDS as it doesn't have a concept of host/port.
            if ($localSocketUri !== null && isset($localParts['host'], $localParts['port'])) {
                $serverParams['SERVER_ADDR'] = $localParts['host'];
                $serverParams['SERVER_PORT'] = $localParts['port'];
            }
            // apply REMOTE_ADDR and REMOTE_PORT if source address is known
            // address should always be known, unless this is over Unix domain sockets (UDS)
            $remoteSocketUri = $connection->getRemoteAddress();
            if ($remoteSocketUri !== null) {
                $remoteAddress = \parse_url($remoteSocketUri);
                $serverParams['REMOTE_ADDR'] = $remoteAddress['host'];
                $serverParams['REMOTE_PORT'] = $remoteAddress['port'];
            }
            // remember server params for all requests from this connection, reset on connection close
            $this->connectionParams[$cid] = $serverParams;
            $params =& $this->connectionParams;
            $connection->on('close', function () use(&$params, $cid) {
                \assert(\is_array($params));
                unset($params[$cid]);
            });
        }
        // create new obj implementing ServerRequestInterface by preserving all
        // previous properties and restoring original request-target
        $serverParams['REQUEST_TIME'] = (int) ($now = $this->clock->now());
        $serverParams['REQUEST_TIME_FLOAT'] = $now;
        // scheme is `http` unless TLS is used
        $scheme = isset($serverParams['HTTPS']) ? 'https://' : 'http://';
        // default host if unset comes from local socket address or defaults to localhost
        $hasHost = $host !== null;
        if ($host === null) {
            $host = isset($serverParams['SERVER_ADDR'], $serverParams['SERVER_PORT']) ? $serverParams['SERVER_ADDR'] . ':' . $serverParams['SERVER_PORT'] : '127.0.0.1';
        }
        if ($start['method'] === 'OPTIONS' && $start['target'] === '*') {
            // support asterisk-form for `OPTIONS *` request line only
            $uri = $scheme . $host;
        } elseif ($start['method'] === 'CONNECT') {
            $parts = \parse_url('tcp://' . $start['target']);
            // check this is a valid authority-form request-target (host:port)
            if (!isset($parts['scheme'], $parts['host'], $parts['port']) || \count($parts) !== 3) {
                throw new \InvalidArgumentException('CONNECT method MUST use authority-form request target');
            }
            $uri = $scheme . $start['target'];
        } else {
            // support absolute-form or origin-form for proxy requests
            if ($start['target'][0] === '/') {
                $uri = $scheme . $host . $start['target'];
            } else {
                // ensure absolute-form request-target contains a valid URI
                $parts = \parse_url($start['target']);
                // make sure value contains valid host component (IP or hostname), but no fragment
                if (!isset($parts['scheme'], $parts['host']) || $parts['scheme'] !== 'http' || isset($parts['fragment'])) {
                    throw new \InvalidArgumentException('Invalid absolute-form request-target');
                }
                $uri = $start['target'];
            }
        }
        $request = new ServerRequest($start['method'], $uri, $fields, '', $start['version'], $serverParams);
        // only assign request target if it is not in origin-form (happy path for most normal requests)
        if ($start['target'][0] !== '/') {
            $request = $request->withRequestTarget($start['target']);
        }
        if ($hasHost) {
            // Optional Host request header value MUST be valid (host and optional port)
            $parts = \parse_url('http://' . $request->getHeaderLine('Host'));
            // make sure value contains valid host component (IP or hostname)
            if (!$parts || !isset($parts['scheme'], $parts['host'])) {
                $parts = \false;
            }
            // make sure value does not contain any other URI component
            if (\is_array($parts)) {
                unset($parts['scheme'], $parts['host'], $parts['port']);
            }
            if ($parts === \false || $parts) {
                throw new \InvalidArgumentException('Invalid Host header value');
            }
        } elseif (!$hasHost && $start['version'] === '1.1' && $start['method'] !== 'CONNECT') {
            // require Host request header for HTTP/1.1 (except for CONNECT method)
            throw new \InvalidArgumentException('Missing required Host request header');
        } elseif (!$hasHost) {
            // remove default Host request header for HTTP/1.0 when not explicitly given
            $request = $request->withoutHeader('Host');
        }
        // ensure message boundaries are valid according to Content-Length and Transfer-Encoding request headers
        if ($request->hasHeader('Transfer-Encoding')) {
            if (\strtolower($request->getHeaderLine('Transfer-Encoding')) !== 'chunked') {
                throw new \InvalidArgumentException('Only chunked-encoding is allowed for Transfer-Encoding', Response::STATUS_NOT_IMPLEMENTED);
            }
            // Transfer-Encoding: chunked and Content-Length header MUST NOT be used at the same time
            // as per https://tools.ietf.org/html/rfc7230#section-3.3.3
            if ($request->hasHeader('Content-Length')) {
                throw new \InvalidArgumentException('Using both `Transfer-Encoding: chunked` and `Content-Length` is not allowed', Response::STATUS_BAD_REQUEST);
            }
        } elseif ($request->hasHeader('Content-Length')) {
            $string = $request->getHeaderLine('Content-Length');
            if ((string) (int) $string !== $string) {
                // Content-Length value is not an integer or not a single integer
                throw new \InvalidArgumentException('The value of `Content-Length` is not valid', Response::STATUS_BAD_REQUEST);
            }
        }
        return $request;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Io;

use _PHPStan_dcc7b7cff\Psr\Http\Message\UriInterface;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use _PHPStan_dcc7b7cff\React\EventLoop\TimerInterface;
use _PHPStan_dcc7b7cff\React\Promise\PromiseInterface;
use _PHPStan_dcc7b7cff\React\Socket\ConnectionInterface;
use _PHPStan_dcc7b7cff\React\Socket\ConnectorInterface;
/**
 * [Internal] Manages outgoing HTTP connections for the HTTP client
 *
 * @internal
 * @final
 */
class ClientConnectionManager
{
    /** @var ConnectorInterface */
    private $connector;
    /** @var LoopInterface */
    private $loop;
    /** @var string[] */
    private $idleUris = array();
    /** @var ConnectionInterface[] */
    private $idleConnections = array();
    /** @var TimerInterface[] */
    private $idleTimers = array();
    /** @var \Closure[] */
    private $idleStreamHandlers = array();
    /** @var float */
    private $maximumTimeToKeepAliveIdleConnection = 0.001;
    public function __construct(ConnectorInterface $connector, LoopInterface $loop)
    {
        $this->connector = $connector;
        $this->loop = $loop;
    }
    /**
     * @return PromiseInterface<ConnectionInterface>
     */
    public function connect(UriInterface $uri)
    {
        $scheme = $uri->getScheme();
        if ($scheme !== 'https' && $scheme !== 'http') {
            return \_PHPStan_dcc7b7cff\React\Promise\reject(new \InvalidArgumentException('Invalid request URL given'));
        }
        $port = $uri->getPort();
        if ($port === null) {
            $port = $scheme === 'https' ? 443 : 80;
        }
        $uri = ($scheme === 'https' ? 'tls://' : '') . $uri->getHost() . ':' . $port;
        // Reuse idle connection for same URI if available
        foreach ($this->idleConnections as $id => $connection) {
            if ($this->idleUris[$id] === $uri) {
                \assert($this->idleStreamHandlers[$id] instanceof \Closure);
                $connection->removeListener('close', $this->idleStreamHandlers[$id]);
                $connection->removeListener('data', $this->idleStreamHandlers[$id]);
                $connection->removeListener('error', $this->idleStreamHandlers[$id]);
                \assert($this->idleTimers[$id] instanceof TimerInterface);
                $this->loop->cancelTimer($this->idleTimers[$id]);
                unset($this->idleUris[$id], $this->idleConnections[$id], $this->idleTimers[$id], $this->idleStreamHandlers[$id]);
                return \_PHPStan_dcc7b7cff\React\Promise\resolve($connection);
            }
        }
        // Create new connection if no idle connection to same URI is available
        return $this->connector->connect($uri);
    }
    /**
     * Hands back an idle connection to the connection manager for possible future reuse.
     *
     * @return void
     */
    public function keepAlive(UriInterface $uri, ConnectionInterface $connection)
    {
        $scheme = $uri->getScheme();
        \assert($scheme === 'https' || $scheme === 'http');
        $port = $uri->getPort();
        if ($port === null) {
            $port = $scheme === 'https' ? 443 : 80;
        }
        $this->idleUris[] = ($scheme === 'https' ? 'tls://' : '') . $uri->getHost() . ':' . $port;
        $this->idleConnections[] = $connection;
        $that = $this;
        $cleanUp = function () use($connection, $that) {
            // call public method to support legacy PHP 5.3
            $that->cleanUpConnection($connection);
        };
        // clean up and close connection when maximum time to keep-alive idle connection has passed
        $this->idleTimers[] = $this->loop->addTimer($this->maximumTimeToKeepAliveIdleConnection, $cleanUp);
        // clean up and close connection when unexpected close/data/error event happens during idle time
        $this->idleStreamHandlers[] = $cleanUp;
        $connection->on('close', $cleanUp);
        $connection->on('data', $cleanUp);
        $connection->on('error', $cleanUp);
    }
    /**
     * @internal
     * @return void
     */
    public function cleanUpConnection(ConnectionInterface $connection)
    {
        $id = \array_search($connection, $this->idleConnections, \true);
        if ($id === \false) {
            return;
        }
        \assert(\is_int($id));
        \assert($this->idleTimers[$id] instanceof TimerInterface);
        $this->loop->cancelTimer($this->idleTimers[$id]);
        unset($this->idleUris[$id], $this->idleConnections[$id], $this->idleTimers[$id], $this->idleStreamHandlers[$id]);
        $connection->close();
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Io;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
use _PHPStan_dcc7b7cff\Psr\Http\Message\StreamInterface;
use _PHPStan_dcc7b7cff\React\Stream\ReadableStreamInterface;
use _PHPStan_dcc7b7cff\React\Stream\Util;
use _PHPStan_dcc7b7cff\React\Stream\WritableStreamInterface;
/**
 * [Internal] Bridge between StreamInterface from PSR-7 and ReadableStreamInterface from ReactPHP
 *
 * This class is used in the server to stream the body of an incoming response
 * from the client. This allows us to stream big amounts of data without having
 * to buffer this data. Similarly, this used to stream the body of an outgoing
 * request body to the client. The data will be sent directly to the client.
 *
 * Note that this is an internal class only and nothing you should usually care
 * about. See the `StreamInterface` and `ReadableStreamInterface` for more
 * details.
 *
 * @see StreamInterface
 * @see ReadableStreamInterface
 * @internal
 */
class HttpBodyStream extends EventEmitter implements StreamInterface, ReadableStreamInterface
{
    public $input;
    private $closed = \false;
    private $size;
    /**
     * @param ReadableStreamInterface $input Stream data from $stream as a body of a PSR-7 object4
     * @param int|null $size size of the data body
     */
    public function __construct(ReadableStreamInterface $input, $size)
    {
        $this->input = $input;
        $this->size = $size;
        $this->input->on('data', array($this, 'handleData'));
        $this->input->on('end', array($this, 'handleEnd'));
        $this->input->on('error', array($this, 'handleError'));
        $this->input->on('close', array($this, 'close'));
    }
    public function isReadable()
    {
        return !$this->closed && $this->input->isReadable();
    }
    public function pause()
    {
        $this->input->pause();
    }
    public function resume()
    {
        $this->input->resume();
    }
    public function pipe(WritableStreamInterface $dest, array $options = array())
    {
        Util::pipe($this, $dest, $options);
        return $dest;
    }
    public function close()
    {
        if ($this->closed) {
            return;
        }
        $this->closed = \true;
        $this->input->close();
        $this->emit('close');
        $this->removeAllListeners();
    }
    public function getSize()
    {
        return $this->size;
    }
    /** @ignore */
    public function __toString()
    {
        return '';
    }
    /** @ignore */
    public function detach()
    {
        return null;
    }
    /** @ignore */
    public function tell()
    {
        throw new \BadMethodCallException();
    }
    /** @ignore */
    public function eof()
    {
        throw new \BadMethodCallException();
    }
    /** @ignore */
    public function isSeekable()
    {
        return \false;
    }
    /** @ignore */
    public function seek($offset, $whence = \SEEK_SET)
    {
        throw new \BadMethodCallException();
    }
    /** @ignore */
    public function rewind()
    {
        throw new \BadMethodCallException();
    }
    /** @ignore */
    public function isWritable()
    {
        return \false;
    }
    /** @ignore */
    public function write($string)
    {
        throw new \BadMethodCallException();
    }
    /** @ignore */
    public function read($length)
    {
        throw new \BadMethodCallException();
    }
    /** @ignore */
    public function getContents()
    {
        return '';
    }
    /** @ignore */
    public function getMetadata($key = null)
    {
        return null;
    }
    /** @internal */
    public function handleData($data)
    {
        $this->emit('data', array($data));
    }
    /** @internal */
    public function handleError(\Exception $e)
    {
        $this->emit('error', array($e));
        $this->close();
    }
    /** @internal */
    public function handleEnd()
    {
        if (!$this->closed) {
            $this->emit('end');
            $this->close();
        }
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Io;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
use _PHPStan_dcc7b7cff\React\Stream\ReadableStreamInterface;
use _PHPStan_dcc7b7cff\React\Stream\Util;
use _PHPStan_dcc7b7cff\React\Stream\WritableStreamInterface;
/**
 * [Internal] Encodes given payload stream with "Transfer-Encoding: chunked" and emits encoded data
 *
 * This is used internally to encode outgoing requests with this encoding.
 *
 * @internal
 */
class ChunkedEncoder extends EventEmitter implements ReadableStreamInterface
{
    private $input;
    private $closed = \false;
    public function __construct(ReadableStreamInterface $input)
    {
        $this->input = $input;
        $this->input->on('data', array($this, 'handleData'));
        $this->input->on('end', array($this, 'handleEnd'));
        $this->input->on('error', array($this, 'handleError'));
        $this->input->on('close', array($this, 'close'));
    }
    public function isReadable()
    {
        return !$this->closed && $this->input->isReadable();
    }
    public function pause()
    {
        $this->input->pause();
    }
    public function resume()
    {
        $this->input->resume();
    }
    public function pipe(WritableStreamInterface $dest, array $options = array())
    {
        return Util::pipe($this, $dest, $options);
    }
    public function close()
    {
        if ($this->closed) {
            return;
        }
        $this->closed = \true;
        $this->input->close();
        $this->emit('close');
        $this->removeAllListeners();
    }
    /** @internal */
    public function handleData($data)
    {
        if ($data !== '') {
            $this->emit('data', array(\dechex(\strlen($data)) . "\r\n" . $data . "\r\n"));
        }
    }
    /** @internal */
    public function handleError(\Exception $e)
    {
        $this->emit('error', array($e));
        $this->close();
    }
    /** @internal */
    public function handleEnd()
    {
        $this->emit('data', array("0\r\n\r\n"));
        if (!$this->closed) {
            $this->emit('end');
            $this->close();
        }
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Io;

use _PHPStan_dcc7b7cff\Psr\Http\Message\RequestInterface;
use _PHPStan_dcc7b7cff\Psr\Http\Message\ResponseInterface;
use _PHPStan_dcc7b7cff\Psr\Http\Message\UriInterface;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use _PHPStan_dcc7b7cff\React\Http\Message\Response;
use _PHPStan_dcc7b7cff\React\Http\Message\ResponseException;
use _PHPStan_dcc7b7cff\React\Promise\Deferred;
use _PHPStan_dcc7b7cff\React\Promise\Promise;
use _PHPStan_dcc7b7cff\React\Promise\PromiseInterface;
use _PHPStan_dcc7b7cff\React\Stream\ReadableStreamInterface;
use _PHPStan_dcc7b7cff\RingCentral\Psr7\Uri;
/**
 * @internal
 */
class Transaction
{
    private $sender;
    private $loop;
    // context: http.timeout (ini_get('default_socket_timeout'): 60)
    private $timeout;
    // context: http.follow_location (true)
    private $followRedirects = \true;
    // context: http.max_redirects (10)
    private $maxRedirects = 10;
    // context: http.ignore_errors (false)
    private $obeySuccessCode = \true;
    private $streaming = \false;
    private $maximumSize = 16777216;
    // 16 MiB = 2^24 bytes
    public function __construct(Sender $sender, LoopInterface $loop)
    {
        $this->sender = $sender;
        $this->loop = $loop;
    }
    /**
     * @param array $options
     * @return self returns new instance, without modifying existing instance
     */
    public function withOptions(array $options)
    {
        $transaction = clone $this;
        foreach ($options as $name => $value) {
            if (\property_exists($transaction, $name)) {
                // restore default value if null is given
                if ($value === null) {
                    $default = new self($this->sender, $this->loop);
                    $value = $default->{$name};
                }
                $transaction->{$name} = $value;
            }
        }
        return $transaction;
    }
    public function send(RequestInterface $request)
    {
        $state = new ClientRequestState();
        $deferred = new Deferred(function () use($state) {
            if ($state->pending !== null) {
                $state->pending->cancel();
                $state->pending = null;
            }
        });
        // use timeout from options or default to PHP's default_socket_timeout (60)
        $timeout = (float) ($this->timeout !== null ? $this->timeout : \ini_get("default_socket_timeout"));
        $loop = $this->loop;
        $this->next($request, $deferred, $state)->then(function (ResponseInterface $response) use($state, $deferred, $loop, &$timeout) {
            if ($state->timeout !== null) {
                $loop->cancelTimer($state->timeout);
                $state->timeout = null;
            }
            $timeout = -1;
            $deferred->resolve($response);
        }, function ($e) use($state, $deferred, $loop, &$timeout) {
            if ($state->timeout !== null) {
                $loop->cancelTimer($state->timeout);
                $state->timeout = null;
            }
            $timeout = -1;
            $deferred->reject($e);
        });
        if ($timeout < 0) {
            return $deferred->promise();
        }
        $body = $request->getBody();
        if ($body instanceof ReadableStreamInterface && $body->isReadable()) {
            $that = $this;
            $body->on('close', function () use($that, $deferred, $state, &$timeout) {
                if ($timeout >= 0) {
                    $that->applyTimeout($deferred, $state, $timeout);
                }
            });
        } else {
            $this->applyTimeout($deferred, $state, $timeout);
        }
        return $deferred->promise();
    }
    /**
     * @internal
     * @param number $timeout
     * @return void
     */
    public function applyTimeout(Deferred $deferred, ClientRequestState $state, $timeout)
    {
        $state->timeout = $this->loop->addTimer($timeout, function () use($timeout, $deferred, $state) {
            $deferred->reject(new \RuntimeException('Request timed out after ' . $timeout . ' seconds'));
            if ($state->pending !== null) {
                $state->pending->cancel();
                $state->pending = null;
            }
        });
    }
    private function next(RequestInterface $request, Deferred $deferred, ClientRequestState $state)
    {
        $this->progress('request', array($request));
        $that = $this;
        ++$state->numRequests;
        $promise = $this->sender->send($request);
        if (!$this->streaming) {
            $promise = $promise->then(function ($response) use($deferred, $state, $that) {
                return $that->bufferResponse($response, $deferred, $state);
            });
        }
        $state->pending = $promise;
        return $promise->then(function (ResponseInterface $response) use($request, $that, $deferred, $state) {
            return $that->onResponse($response, $request, $deferred, $state);
        });
    }
    /**
     * @internal
     * @return PromiseInterface Promise<ResponseInterface, Exception>
     */
    public function bufferResponse(ResponseInterface $response, Deferred $deferred, ClientRequestState $state)
    {
        $body = $response->getBody();
        $size = $body->getSize();
        if ($size !== null && $size > $this->maximumSize) {
            $body->close();
            return \_PHPStan_dcc7b7cff\React\Promise\reject(new \OverflowException('Response body size of ' . $size . ' bytes exceeds maximum of ' . $this->maximumSize . ' bytes', \defined('SOCKET_EMSGSIZE') ? \SOCKET_EMSGSIZE : 90));
        }
        // body is not streaming => already buffered
        if (!$body instanceof ReadableStreamInterface) {
            return \_PHPStan_dcc7b7cff\React\Promise\resolve($response);
        }
        /** @var ?\Closure $closer */
        $closer = null;
        $maximumSize = $this->maximumSize;
        return $state->pending = new Promise(function ($resolve, $reject) use($body, $maximumSize, $response, &$closer) {
            // resolve with current buffer when stream closes successfully
            $buffer = '';
            $body->on('close', $closer = function () use(&$buffer, $response, $maximumSize, $resolve, $reject) {
                $resolve($response->withBody(new BufferedBody($buffer)));
            });
            // buffer response body data in memory
            $body->on('data', function ($data) use(&$buffer, $maximumSize, $body, $closer, $reject) {
                $buffer .= $data;
                // close stream and reject promise if limit is exceeded
                if (isset($buffer[$maximumSize])) {
                    $buffer = '';
                    \assert($closer instanceof \Closure);
                    $body->removeListener('close', $closer);
                    $body->close();
                    $reject(new \OverflowException('Response body size exceeds maximum of ' . $maximumSize . ' bytes', \defined('SOCKET_EMSGSIZE') ? \SOCKET_EMSGSIZE : 90));
                }
            });
            // reject buffering if body emits error
            $body->on('error', function (\Exception $e) use($reject) {
                $reject(new \RuntimeException('Error while buffering response body: ' . $e->getMessage(), $e->getCode(), $e));
            });
        }, function () use($body, &$closer) {
            // cancelled buffering: remove close handler to avoid resolving, then close and reject
            \assert($closer instanceof \Closure);
            $body->removeListener('close', $closer);
            $body->close();
            throw new \RuntimeException('Cancelled buffering response body');
        });
    }
    /**
     * @internal
     * @throws ResponseException
     * @return ResponseInterface|PromiseInterface
     */
    public function onResponse(ResponseInterface $response, RequestInterface $request, Deferred $deferred, ClientRequestState $state)
    {
        $this->progress('response', array($response, $request));
        // follow 3xx (Redirection) response status codes if Location header is present and not explicitly disabled
        // @link https://tools.ietf.org/html/rfc7231#section-6.4
        if ($this->followRedirects && ($response->getStatusCode() >= 300 && $response->getStatusCode() < 400) && $response->hasHeader('Location')) {
            return $this->onResponseRedirect($response, $request, $deferred, $state);
        }
        // only status codes 200-399 are considered to be valid, reject otherwise
        if ($this->obeySuccessCode && ($response->getStatusCode() < 200 || $response->getStatusCode() >= 400)) {
            throw new ResponseException($response);
        }
        // resolve our initial promise
        return $response;
    }
    /**
     * @param ResponseInterface $response
     * @param RequestInterface $request
     * @param Deferred $deferred
     * @param ClientRequestState $state
     * @return PromiseInterface
     * @throws \RuntimeException
     */
    private function onResponseRedirect(ResponseInterface $response, RequestInterface $request, Deferred $deferred, ClientRequestState $state)
    {
        // resolve location relative to last request URI
        $location = Uri::resolve($request->getUri(), $response->getHeaderLine('Location'));
        $request = $this->makeRedirectRequest($request, $location, $response->getStatusCode());
        $this->progress('redirect', array($request));
        if ($state->numRequests >= $this->maxRedirects) {
            throw new \RuntimeException('Maximum number of redirects (' . $this->maxRedirects . ') exceeded');
        }
        return $this->next($request, $deferred, $state);
    }
    /**
     * @param RequestInterface $request
     * @param UriInterface $location
     * @param int $statusCode
     * @return RequestInterface
     * @throws \RuntimeException
     */
    private function makeRedirectRequest(RequestInterface $request, UriInterface $location, $statusCode)
    {
        // Remove authorization if changing hostnames (but not if just changing ports or protocols).
        $originalHost = $request->getUri()->getHost();
        if ($location->getHost() !== $originalHost) {
            $request = $request->withoutHeader('Authorization');
        }
        $request = $request->withoutHeader('Host')->withUri($location);
        if ($statusCode === Response::STATUS_TEMPORARY_REDIRECT || $statusCode === Response::STATUS_PERMANENT_REDIRECT) {
            if ($request->getBody() instanceof ReadableStreamInterface) {
                throw new \RuntimeException('Unable to redirect request with streaming body');
            }
        } else {
            $request = $request->withMethod($request->getMethod() === 'HEAD' ? 'HEAD' : 'GET')->withoutHeader('Content-Type')->withoutHeader('Content-Length')->withBody(new BufferedBody(''));
        }
        return $request;
    }
    private function progress($name, array $args = array())
    {
        return;
        echo $name;
        foreach ($args as $arg) {
            echo ' ';
            if ($arg instanceof ResponseInterface) {
                echo 'HTTP/' . $arg->getProtocolVersion() . ' ' . $arg->getStatusCode() . ' ' . $arg->getReasonPhrase();
            } elseif ($arg instanceof RequestInterface) {
                echo $arg->getMethod() . ' ' . $arg->getRequestTarget() . ' HTTP/' . $arg->getProtocolVersion();
            } else {
                echo $arg;
            }
        }
        echo \PHP_EOL;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Io;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
use _PHPStan_dcc7b7cff\Psr\Http\Message\MessageInterface;
use _PHPStan_dcc7b7cff\Psr\Http\Message\RequestInterface;
use _PHPStan_dcc7b7cff\React\Http\Message\Response;
use _PHPStan_dcc7b7cff\React\Socket\ConnectionInterface;
use _PHPStan_dcc7b7cff\React\Stream\WritableStreamInterface;
use _PHPStan_dcc7b7cff\RingCentral\Psr7 as gPsr;
/**
 * @event response
 * @event drain
 * @event error
 * @event close
 * @internal
 */
class ClientRequestStream extends EventEmitter implements WritableStreamInterface
{
    const STATE_INIT = 0;
    const STATE_WRITING_HEAD = 1;
    const STATE_HEAD_WRITTEN = 2;
    const STATE_END = 3;
    /** @var ClientConnectionManager */
    private $connectionManager;
    /** @var RequestInterface */
    private $request;
    /** @var ?ConnectionInterface */
    private $connection;
    /** @var string */
    private $buffer = '';
    private $responseFactory;
    private $state = self::STATE_INIT;
    private $ended = \false;
    private $pendingWrites = '';
    public function __construct(ClientConnectionManager $connectionManager, RequestInterface $request)
    {
        $this->connectionManager = $connectionManager;
        $this->request = $request;
    }
    public function isWritable()
    {
        return self::STATE_END > $this->state && !$this->ended;
    }
    private function writeHead()
    {
        $this->state = self::STATE_WRITING_HEAD;
        $request = $this->request;
        $connectionRef =& $this->connection;
        $stateRef =& $this->state;
        $pendingWrites =& $this->pendingWrites;
        $that = $this;
        $promise = $this->connectionManager->connect($this->request->getUri());
        $promise->then(function (ConnectionInterface $connection) use($request, &$connectionRef, &$stateRef, &$pendingWrites, $that) {
            $connectionRef = $connection;
            \assert($connectionRef instanceof ConnectionInterface);
            $connection->on('drain', array($that, 'handleDrain'));
            $connection->on('data', array($that, 'handleData'));
            $connection->on('end', array($that, 'handleEnd'));
            $connection->on('error', array($that, 'handleError'));
            $connection->on('close', array($that, 'close'));
            \assert($request instanceof RequestInterface);
            $headers = "{$request->getMethod()} {$request->getRequestTarget()} HTTP/{$request->getProtocolVersion()}\r\n";
            foreach ($request->getHeaders() as $name => $values) {
                foreach ($values as $value) {
                    $headers .= "{$name}: {$value}\r\n";
                }
            }
            $more = $connection->write($headers . "\r\n" . $pendingWrites);
            \assert($stateRef === ClientRequestStream::STATE_WRITING_HEAD);
            $stateRef = ClientRequestStream::STATE_HEAD_WRITTEN;
            // clear pending writes if non-empty
            if ($pendingWrites !== '') {
                $pendingWrites = '';
                if ($more) {
                    $that->emit('drain');
                }
            }
        }, array($this, 'closeError'));
        $this->on('close', function () use($promise) {
            $promise->cancel();
        });
    }
    public function write($data)
    {
        if (!$this->isWritable()) {
            return \false;
        }
        // write directly to connection stream if already available
        if (self::STATE_HEAD_WRITTEN <= $this->state) {
            return $this->connection->write($data);
        }
        // otherwise buffer and try to establish connection
        $this->pendingWrites .= $data;
        if (self::STATE_WRITING_HEAD > $this->state) {
            $this->writeHead();
        }
        return \false;
    }
    public function end($data = null)
    {
        if (!$this->isWritable()) {
            return;
        }
        if (null !== $data) {
            $this->write($data);
        } else {
            if (self::STATE_WRITING_HEAD > $this->state) {
                $this->writeHead();
            }
        }
        $this->ended = \true;
    }
    /** @internal */
    public function handleDrain()
    {
        $this->emit('drain');
    }
    /** @internal */
    public function handleData($data)
    {
        $this->buffer .= $data;
        // buffer until double CRLF (or double LF for compatibility with legacy servers)
        if (\false !== \strpos($this->buffer, "\r\n\r\n") || \false !== \strpos($this->buffer, "\n\n")) {
            try {
                $response = gPsr\parse_response($this->buffer);
                $bodyChunk = (string) $response->getBody();
            } catch (\InvalidArgumentException $exception) {
                $this->closeError($exception);
                return;
            }
            // response headers successfully received => remove listeners for connection events
            $connection = $this->connection;
            \assert($connection instanceof ConnectionInterface);
            $connection->removeListener('drain', array($this, 'handleDrain'));
            $connection->removeListener('data', array($this, 'handleData'));
            $connection->removeListener('end', array($this, 'handleEnd'));
            $connection->removeListener('error', array($this, 'handleError'));
            $connection->removeListener('close', array($this, 'close'));
            $this->connection = null;
            $this->buffer = '';
            // take control over connection handling and check if we can reuse the connection once response body closes
            $that = $this;
            $request = $this->request;
            $connectionManager = $this->connectionManager;
            $successfulEndReceived = \false;
            $input = $body = new CloseProtectionStream($connection);
            $input->on('close', function () use($connection, $that, $connectionManager, $request, $response, &$successfulEndReceived) {
                // only reuse connection after successful response and both request and response allow keep alive
                if ($successfulEndReceived && $connection->isReadable() && $that->hasMessageKeepAliveEnabled($response) && $that->hasMessageKeepAliveEnabled($request)) {
                    $connectionManager->keepAlive($request->getUri(), $connection);
                } else {
                    $connection->close();
                }
                $that->close();
            });
            // determine length of response body
            $length = null;
            $code = $response->getStatusCode();
            if ($this->request->getMethod() === 'HEAD' || $code >= 100 && $code < 200 || $code == Response::STATUS_NO_CONTENT || $code == Response::STATUS_NOT_MODIFIED) {
                $length = 0;
            } elseif (\strtolower($response->getHeaderLine('Transfer-Encoding')) === 'chunked') {
                $body = new ChunkedDecoder($body);
            } elseif ($response->hasHeader('Content-Length')) {
                $length = (int) $response->getHeaderLine('Content-Length');
            }
            $response = $response->withBody($body = new ReadableBodyStream($body, $length));
            $body->on('end', function () use(&$successfulEndReceived) {
                $successfulEndReceived = \true;
            });
            // emit response with streaming response body (see `Sender`)
            $this->emit('response', array($response, $body));
            // re-emit HTTP response body to trigger body parsing if parts of it are buffered
            if ($bodyChunk !== '') {
                $input->handleData($bodyChunk);
            } elseif ($length === 0) {
                $input->handleEnd();
            }
        }
    }
    /** @internal */
    public function handleEnd()
    {
        $this->closeError(new \RuntimeException("Connection ended before receiving response"));
    }
    /** @internal */
    public function handleError(\Exception $error)
    {
        $this->closeError(new \RuntimeException("An error occurred in the underlying stream", 0, $error));
    }
    /** @internal */
    public function closeError(\Exception $error)
    {
        if (self::STATE_END <= $this->state) {
            return;
        }
        $this->emit('error', array($error));
        $this->close();
    }
    public function close()
    {
        if (self::STATE_END <= $this->state) {
            return;
        }
        $this->state = self::STATE_END;
        $this->pendingWrites = '';
        $this->buffer = '';
        if ($this->connection instanceof ConnectionInterface) {
            $this->connection->close();
            $this->connection = null;
        }
        $this->emit('close');
        $this->removeAllListeners();
    }
    /**
     * @internal
     * @return bool
     * @link https://www.rfc-editor.org/rfc/rfc9112#section-9.3
     * @link https://www.rfc-editor.org/rfc/rfc7230#section-6.1
     */
    public function hasMessageKeepAliveEnabled(MessageInterface $message)
    {
        $connectionOptions = \_PHPStan_dcc7b7cff\RingCentral\Psr7\normalize_header(\strtolower($message->getHeaderLine('Connection')));
        if (\in_array('close', $connectionOptions, \true)) {
            return \false;
        }
        if ($message->getProtocolVersion() === '1.1') {
            return \true;
        }
        if (\in_array('keep-alive', $connectionOptions, \true)) {
            return \true;
        }
        return \false;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Io;

use _PHPStan_dcc7b7cff\Psr\Http\Message\RequestInterface;
use _PHPStan_dcc7b7cff\Psr\Http\Message\ResponseInterface;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use _PHPStan_dcc7b7cff\React\Http\Client\Client as HttpClient;
use _PHPStan_dcc7b7cff\React\Promise\PromiseInterface;
use _PHPStan_dcc7b7cff\React\Promise\Deferred;
use _PHPStan_dcc7b7cff\React\Socket\Connector;
use _PHPStan_dcc7b7cff\React\Socket\ConnectorInterface;
use _PHPStan_dcc7b7cff\React\Stream\ReadableStreamInterface;
/**
 * [Internal] Sends requests and receives responses
 *
 * The `Sender` is responsible for passing the [`RequestInterface`](#requestinterface) objects to
 * the underlying [`HttpClient`](https://github.com/reactphp/http-client) library
 * and keeps track of its transmission and converts its reponses back to [`ResponseInterface`](#responseinterface) objects.
 *
 * It also registers everything with the main [`EventLoop`](https://github.com/reactphp/event-loop#usage)
 * and the default [`Connector`](https://github.com/reactphp/socket-client) and [DNS `Resolver`](https://github.com/reactphp/dns).
 *
 * The `Sender` class mostly exists in order to abstract changes on the underlying
 * components away from this package in order to provide backwards and forwards
 * compatibility.
 *
 * @internal You SHOULD NOT rely on this API, it is subject to change without prior notice!
 * @see Browser
 */
class Sender
{
    /**
     * create a new default sender attached to the given event loop
     *
     * This method is used internally to create the "default sender".
     *
     * You may also use this method if you need custom DNS or connector
     * settings. You can use this method manually like this:
     *
     * ```php
     * $connector = new \React\Socket\Connector(array(), $loop);
     * $sender = \React\Http\Io\Sender::createFromLoop($loop, $connector);
     * ```
     *
     * @param LoopInterface $loop
     * @param ConnectorInterface|null $connector
     * @return self
     */
    public static function createFromLoop(LoopInterface $loop, ConnectorInterface $connector = null)
    {
        if ($connector === null) {
            $connector = new Connector(array(), $loop);
        }
        return new self(new HttpClient(new ClientConnectionManager($connector, $loop)));
    }
    private $http;
    /**
     * [internal] Instantiate Sender
     *
     * @param HttpClient $http
     * @internal
     */
    public function __construct(HttpClient $http)
    {
        $this->http = $http;
    }
    /**
     *
     * @internal
     * @param RequestInterface $request
     * @return PromiseInterface Promise<ResponseInterface, Exception>
     */
    public function send(RequestInterface $request)
    {
        // support HTTP/1.1 and HTTP/1.0 only, ensured by `Browser` already
        \assert(\in_array($request->getProtocolVersion(), array('1.0', '1.1'), \true));
        $body = $request->getBody();
        $size = $body->getSize();
        if ($size !== null && $size !== 0) {
            // automatically assign a "Content-Length" request header if the body size is known and non-empty
            $request = $request->withHeader('Content-Length', (string) $size);
        } elseif ($size === 0 && \in_array($request->getMethod(), array('POST', 'PUT', 'PATCH'))) {
            // only assign a "Content-Length: 0" request header if the body is expected for certain methods
            $request = $request->withHeader('Content-Length', '0');
        } elseif ($body instanceof ReadableStreamInterface && $body->isReadable() && !$request->hasHeader('Content-Length')) {
            // use "Transfer-Encoding: chunked" when this is a streaming body and body size is unknown
            $request = $request->withHeader('Transfer-Encoding', 'chunked');
        } else {
            // do not use chunked encoding if size is known or if this is an empty request body
            $size = 0;
        }
        // automatically add `Authorization: Basic …` request header if URL includes `user:pass@host`
        if ($request->getUri()->getUserInfo() !== '' && !$request->hasHeader('Authorization')) {
            $request = $request->withHeader('Authorization', 'Basic ' . \base64_encode($request->getUri()->getUserInfo()));
        }
        $requestStream = $this->http->request($request);
        $deferred = new Deferred(function ($_, $reject) use($requestStream) {
            // close request stream if request is cancelled
            $reject(new \RuntimeException('Request cancelled'));
            $requestStream->close();
        });
        $requestStream->on('error', function ($error) use($deferred) {
            $deferred->reject($error);
        });
        $requestStream->on('response', function (ResponseInterface $response) use($deferred, $request) {
            $deferred->resolve($response);
        });
        if ($body instanceof ReadableStreamInterface) {
            if ($body->isReadable()) {
                // length unknown => apply chunked transfer-encoding
                if ($size === null) {
                    $body = new ChunkedEncoder($body);
                }
                // pipe body into request stream
                // add dummy write to immediately start request even if body does not emit any data yet
                $body->pipe($requestStream);
                $requestStream->write('');
                $body->on('close', $close = function () use($deferred, $requestStream) {
                    $deferred->reject(new \RuntimeException('Request failed because request body closed unexpectedly'));
                    $requestStream->close();
                });
                $body->on('error', function ($e) use($deferred, $requestStream, $close, $body) {
                    $body->removeListener('close', $close);
                    $deferred->reject(new \RuntimeException('Request failed because request body reported an error', 0, $e));
                    $requestStream->close();
                });
                $body->on('end', function () use($close, $body) {
                    $body->removeListener('close', $close);
                });
            } else {
                // stream is not readable => end request without body
                $requestStream->end();
            }
        } else {
            // body is fully buffered => write as one chunk
            $requestStream->end((string) $body);
        }
        return $deferred->promise();
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Io;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
use _PHPStan_dcc7b7cff\React\Stream\ReadableStreamInterface;
use _PHPStan_dcc7b7cff\React\Stream\Util;
use _PHPStan_dcc7b7cff\React\Stream\WritableStreamInterface;
/**
 * [Internal] Pauses a given stream and buffers all events while paused
 *
 * This class is used to buffer all events that happen on a given stream while
 * it is paused. This allows you to pause a stream and no longer watch for any
 * of its events. Once the stream is resumed, all buffered events will be
 * emitted. Explicitly closing the resulting stream clears all buffers.
 *
 * Note that this is an internal class only and nothing you should usually care
 * about.
 *
 * @see ReadableStreamInterface
 * @internal
 */
class PauseBufferStream extends EventEmitter implements ReadableStreamInterface
{
    private $input;
    private $closed = \false;
    private $paused = \false;
    private $dataPaused = '';
    private $endPaused = \false;
    private $closePaused = \false;
    private $errorPaused;
    private $implicit = \false;
    public function __construct(ReadableStreamInterface $input)
    {
        $this->input = $input;
        $this->input->on('data', array($this, 'handleData'));
        $this->input->on('end', array($this, 'handleEnd'));
        $this->input->on('error', array($this, 'handleError'));
        $this->input->on('close', array($this, 'handleClose'));
    }
    /**
     * pause and remember this was not explicitly from user control
     *
     * @internal
     */
    public function pauseImplicit()
    {
        $this->pause();
        $this->implicit = \true;
    }
    /**
     * resume only if this was previously paused implicitly and not explicitly from user control
     *
     * @internal
     */
    public function resumeImplicit()
    {
        if ($this->implicit) {
            $this->resume();
        }
    }
    public function isReadable()
    {
        return !$this->closed;
    }
    public function pause()
    {
        if ($this->closed) {
            return;
        }
        $this->input->pause();
        $this->paused = \true;
        $this->implicit = \false;
    }
    public function resume()
    {
        if ($this->closed) {
            return;
        }
        $this->paused = \false;
        $this->implicit = \false;
        if ($this->dataPaused !== '') {
            $this->emit('data', array($this->dataPaused));
            $this->dataPaused = '';
        }
        if ($this->errorPaused) {
            $this->emit('error', array($this->errorPaused));
            return $this->close();
        }
        if ($this->endPaused) {
            $this->endPaused = \false;
            $this->emit('end');
            return $this->close();
        }
        if ($this->closePaused) {
            $this->closePaused = \false;
            return $this->close();
        }
        $this->input->resume();
    }
    public function pipe(WritableStreamInterface $dest, array $options = array())
    {
        Util::pipe($this, $dest, $options);
        return $dest;
    }
    public function close()
    {
        if ($this->closed) {
            return;
        }
        $this->closed = \true;
        $this->dataPaused = '';
        $this->endPaused = $this->closePaused = \false;
        $this->errorPaused = null;
        $this->input->close();
        $this->emit('close');
        $this->removeAllListeners();
    }
    /** @internal */
    public function handleData($data)
    {
        if ($this->paused) {
            $this->dataPaused .= $data;
            return;
        }
        $this->emit('data', array($data));
    }
    /** @internal */
    public function handleError(\Exception $e)
    {
        if ($this->paused) {
            $this->errorPaused = $e;
            return;
        }
        $this->emit('error', array($e));
        $this->close();
    }
    /** @internal */
    public function handleEnd()
    {
        if ($this->paused) {
            $this->endPaused = \true;
            return;
        }
        if (!$this->closed) {
            $this->emit('end');
            $this->close();
        }
    }
    /** @internal */
    public function handleClose()
    {
        if ($this->paused) {
            $this->closePaused = \true;
            return;
        }
        $this->close();
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http;

use _PHPStan_dcc7b7cff\Evenement\EventEmitter;
use _PHPStan_dcc7b7cff\React\EventLoop\Loop;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use _PHPStan_dcc7b7cff\React\Http\Io\IniUtil;
use _PHPStan_dcc7b7cff\React\Http\Io\MiddlewareRunner;
use _PHPStan_dcc7b7cff\React\Http\Io\StreamingServer;
use _PHPStan_dcc7b7cff\React\Http\Middleware\LimitConcurrentRequestsMiddleware;
use _PHPStan_dcc7b7cff\React\Http\Middleware\StreamingRequestMiddleware;
use _PHPStan_dcc7b7cff\React\Http\Middleware\RequestBodyBufferMiddleware;
use _PHPStan_dcc7b7cff\React\Http\Middleware\RequestBodyParserMiddleware;
use _PHPStan_dcc7b7cff\React\Socket\ServerInterface;
/**
 * The `React\Http\HttpServer` class is responsible for handling incoming connections and then
 * processing each incoming HTTP request.
 *
 * When a complete HTTP request has been received, it will invoke the given
 * request handler function. This request handler function needs to be passed to
 * the constructor and will be invoked with the respective [request](#server-request)
 * object and expects a [response](#server-response) object in return:
 *
 * ```php
 * $http = new React\Http\HttpServer(function (Psr\Http\Message\ServerRequestInterface $request) {
 *     return new React\Http\Message\Response(
 *         React\Http\Message\Response::STATUS_OK,
 *         array(
 *             'Content-Type' => 'text/plain'
 *         ),
 *         "Hello World!\n"
 *     );
 * });
 * ```
 *
 * Each incoming HTTP request message is always represented by the
 * [PSR-7 `ServerRequestInterface`](https://www.php-fig.org/psr/psr-7/#321-psrhttpmessageserverrequestinterface),
 * see also following [request](#server-request) chapter for more details.
 *
 * Each outgoing HTTP response message is always represented by the
 * [PSR-7 `ResponseInterface`](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface),
 * see also following [response](#server-response) chapter for more details.
 *
 * This class takes an optional `LoopInterface|null $loop` parameter that can be used to
 * pass the event loop instance to use for this object. You can use a `null` value
 * here in order to use the [default loop](https://github.com/reactphp/event-loop#loop).
 * This value SHOULD NOT be given unless you're sure you want to explicitly use a
 * given event loop instance.
 *
 * In order to start listening for any incoming connections, the `HttpServer` needs
 * to be attached to an instance of
 * [`React\Socket\ServerInterface`](https://github.com/reactphp/socket#serverinterface)
 * through the [`listen()`](#listen) method as described in the following
 * chapter. In its most simple form, you can attach this to a
 * [`React\Socket\SocketServer`](https://github.com/reactphp/socket#socketserver)
 * in order to start a plaintext HTTP server like this:
 *
 * ```php
 * $http = new React\Http\HttpServer($handler);
 *
 * $socket = new React\Socket\SocketServer('0.0.0.0:8080');
 * $http->listen($socket);
 * ```
 *
 * See also the [`listen()`](#listen) method and
 * [hello world server example](../examples/51-server-hello-world.php)
 * for more details.
 *
 * By default, the `HttpServer` buffers and parses the complete incoming HTTP
 * request in memory. It will invoke the given request handler function when the
 * complete request headers and request body has been received. This means the
 * [request](#server-request) object passed to your request handler function will be
 * fully compatible with PSR-7 (http-message). This provides sane defaults for
 * 80% of the use cases and is the recommended way to use this library unless
 * you're sure you know what you're doing.
 *
 * On the other hand, buffering complete HTTP requests in memory until they can
 * be processed by your request handler function means that this class has to
 * employ a number of limits to avoid consuming too much memory. In order to
 * take the more advanced configuration out your hand, it respects setting from
 * your [`php.ini`](https://www.php.net/manual/en/ini.core.php) to apply its
 * default settings. This is a list of PHP settings this class respects with
 * their respective default values:
 *
 * ```
 * memory_limit 128M
 * post_max_size 8M // capped at 64K
 *
 * enable_post_data_reading 1
 * max_input_nesting_level 64
 * max_input_vars 1000
 *
 * file_uploads 1
 * upload_max_filesize 2M
 * max_file_uploads 20
 * ```
 *
 * In particular, the `post_max_size` setting limits how much memory a single
 * HTTP request is allowed to consume while buffering its request body. This
 * needs to be limited because the server can process a large number of requests
 * concurrently, so the server may potentially consume a large amount of memory
 * otherwise. To support higher concurrency by default, this value is capped
 * at `64K`. If you assign a higher value, it will only allow `64K` by default.
 * If a request exceeds this limit, its request body will be ignored and it will
 * be processed like a request with no request body at all. See below for
 * explicit configuration to override this setting.
 *
 * By default, this class will try to avoid consuming more than half of your
 * `memory_limit` for buffering multiple concurrent HTTP requests. As such, with
 * the above default settings of `128M` max, it will try to consume no more than
 * `64M` for buffering multiple concurrent HTTP requests. As a consequence, it
 * will limit the concurrency to `1024` HTTP requests with the above defaults.
 *
 * It is imperative that you assign reasonable values to your PHP ini settings.
 * It is usually recommended to not support buffering incoming HTTP requests
 * with a large HTTP request body (e.g. large file uploads). If you want to
 * increase this buffer size, you will have to also increase the total memory
 * limit to allow for more concurrent requests (set `memory_limit 512M` or more)
 * or explicitly limit concurrency.
 *
 * In order to override the above buffering defaults, you can configure the
 * `HttpServer` explicitly. You can use the
 * [`LimitConcurrentRequestsMiddleware`](#limitconcurrentrequestsmiddleware) and
 * [`RequestBodyBufferMiddleware`](#requestbodybuffermiddleware) (see below)
 * to explicitly configure the total number of requests that can be handled at
 * once like this:
 *
 * ```php
 * $http = new React\Http\HttpServer(
 *     new React\Http\Middleware\StreamingRequestMiddleware(),
 *     new React\Http\Middleware\LimitConcurrentRequestsMiddleware(100), // 100 concurrent buffering handlers
 *     new React\Http\Middleware\RequestBodyBufferMiddleware(2 * 1024 * 1024), // 2 MiB per request
 *     new React\Http\Middleware\RequestBodyParserMiddleware(),
 *     $handler
 * ));
 * ```
 *
 * In this example, we allow processing up to 100 concurrent requests at once
 * and each request can buffer up to `2M`. This means you may have to keep a
 * maximum of `200M` of memory for incoming request body buffers. Accordingly,
 * you need to adjust the `memory_limit` ini setting to allow for these buffers
 * plus your actual application logic memory requirements (think `512M` or more).
 *
 * > Internally, this class automatically assigns these middleware handlers
 *   automatically when no [`StreamingRequestMiddleware`](#streamingrequestmiddleware)
 *   is given. Accordingly, you can use this example to override all default
 *   settings to implement custom limits.
 *
 * As an alternative to buffering the complete request body in memory, you can
 * also use a streaming approach where only small chunks of data have to be kept
 * in memory:
 *
 * ```php
 * $http = new React\Http\HttpServer(
 *     new React\Http\Middleware\StreamingRequestMiddleware(),
 *     $handler
 * );
 * ```
 *
 * In this case, it will invoke the request handler function once the HTTP
 * request headers have been received, i.e. before receiving the potentially
 * much larger HTTP request body. This means the [request](#server-request) passed to
 * your request handler function may not be fully compatible with PSR-7. This is
 * specifically designed to help with more advanced use cases where you want to
 * have full control over consuming the incoming HTTP request body and
 * concurrency settings. See also [streaming incoming request](#streaming-incoming-request)
 * below for more details.
 *
 * > Changelog v1.5.0: This class has been renamed to `HttpServer` from the
 *   previous `Server` class in order to avoid any ambiguities.
 *   The previous name has been deprecated and should not be used anymore.
 */
final class HttpServer extends EventEmitter
{
    /**
     * The maximum buffer size used for each request.
     *
     * This needs to be limited because the server can process a large number of
     * requests concurrently, so the server may potentially consume a large
     * amount of memory otherwise.
     *
     * See `RequestBodyBufferMiddleware` to override this setting.
     *
     * @internal
     */
    const MAXIMUM_BUFFER_SIZE = 65536;
    // 64 KiB
    /**
     * @var StreamingServer
     */
    private $streamingServer;
    /**
     * Creates an HTTP server that invokes the given callback for each incoming HTTP request
     *
     * In order to process any connections, the server needs to be attached to an
     * instance of `React\Socket\ServerInterface` which emits underlying streaming
     * connections in order to then parse incoming data as HTTP.
     * See also [listen()](#listen) for more details.
     *
     * @param callable|LoopInterface $requestHandlerOrLoop
     * @param callable[] ...$requestHandler
     * @see self::listen()
     */
    public function __construct($requestHandlerOrLoop)
    {
        $requestHandlers = \func_get_args();
        if (\reset($requestHandlers) instanceof LoopInterface) {
            $loop = \array_shift($requestHandlers);
        } else {
            $loop = Loop::get();
        }
        $requestHandlersCount = \count($requestHandlers);
        if ($requestHandlersCount === 0 || \count(\array_filter($requestHandlers, 'is_callable')) < $requestHandlersCount) {
            throw new \InvalidArgumentException('Invalid request handler given');
        }
        $streaming = \false;
        foreach ((array) $requestHandlers as $handler) {
            if ($handler instanceof StreamingRequestMiddleware) {
                $streaming = \true;
                break;
            }
        }
        $middleware = array();
        if (!$streaming) {
            $maxSize = $this->getMaxRequestSize();
            $concurrency = $this->getConcurrentRequestsLimit(\ini_get('memory_limit'), $maxSize);
            if ($concurrency !== null) {
                $middleware[] = new LimitConcurrentRequestsMiddleware($concurrency);
            }
            $middleware[] = new RequestBodyBufferMiddleware($maxSize);
            // Checking for an empty string because that is what a boolean
            // false is returned as by ini_get depending on the PHP version.
            // @link http://php.net/manual/en/ini.core.php#ini.enable-post-data-reading
            // @link http://php.net/manual/en/function.ini-get.php#refsect1-function.ini-get-notes
            // @link https://3v4l.org/qJtsa
            $enablePostDataReading = \ini_get('enable_post_data_reading');
            if ($enablePostDataReading !== '') {
                $middleware[] = new RequestBodyParserMiddleware();
            }
        }
        $middleware = \array_merge($middleware, $requestHandlers);
        /**
         * Filter out any configuration middleware, no need to run requests through something that isn't
         * doing anything with the request.
         */
        $middleware = \array_filter($middleware, function ($handler) {
            return !$handler instanceof StreamingRequestMiddleware;
        });
        $this->streamingServer = new StreamingServer($loop, new MiddlewareRunner($middleware));
        $that = $this;
        $this->streamingServer->on('error', function ($error) use($that) {
            $that->emit('error', array($error));
        });
    }
    /**
     * Starts listening for HTTP requests on the given socket server instance
     *
     * The given [`React\Socket\ServerInterface`](https://github.com/reactphp/socket#serverinterface)
     * is responsible for emitting the underlying streaming connections. This
     * HTTP server needs to be attached to it in order to process any
     * connections and pase incoming streaming data as incoming HTTP request
     * messages. In its most common form, you can attach this to a
     * [`React\Socket\SocketServer`](https://github.com/reactphp/socket#socketserver)
     * in order to start a plaintext HTTP server like this:
     *
     * ```php
     * $http = new React\Http\HttpServer($handler);
     *
     * $socket = new React\Socket\SocketServer('0.0.0.0:8080');
     * $http->listen($socket);
     * ```
     *
     * See also [hello world server example](../examples/51-server-hello-world.php)
     * for more details.
     *
     * This example will start listening for HTTP requests on the alternative
     * HTTP port `8080` on all interfaces (publicly). As an alternative, it is
     * very common to use a reverse proxy and let this HTTP server listen on the
     * localhost (loopback) interface only by using the listen address
     * `127.0.0.1:8080` instead. This way, you host your application(s) on the
     * default HTTP port `80` and only route specific requests to this HTTP
     * server.
     *
     * Likewise, it's usually recommended to use a reverse proxy setup to accept
     * secure HTTPS requests on default HTTPS port `443` (TLS termination) and
     * only route plaintext requests to this HTTP server. As an alternative, you
     * can also accept secure HTTPS requests with this HTTP server by attaching
     * this to a [`React\Socket\SocketServer`](https://github.com/reactphp/socket#socketserver)
     * using a secure TLS listen address, a certificate file and optional
     * `passphrase` like this:
     *
     * ```php
     * $http = new React\Http\HttpServer($handler);
     *
     * $socket = new React\Socket\SocketServer('tls://0.0.0.0:8443', array(
     *     'tls' => array(
     *         'local_cert' => __DIR__ . '/localhost.pem'
     *     )
     * ));
     * $http->listen($socket);
     * ```
     *
     * See also [hello world HTTPS example](../examples/61-server-hello-world-https.php)
     * for more details.
     *
     * @param ServerInterface $socket
     */
    public function listen(ServerInterface $socket)
    {
        $this->streamingServer->listen($socket);
    }
    /**
     * @param string $memory_limit
     * @param string $post_max_size
     * @return ?int
     */
    private function getConcurrentRequestsLimit($memory_limit, $post_max_size)
    {
        if ($memory_limit == -1) {
            return null;
        }
        $availableMemory = IniUtil::iniSizeToBytes($memory_limit) / 2;
        $concurrentRequests = (int) \ceil($availableMemory / IniUtil::iniSizeToBytes($post_max_size));
        return $concurrentRequests;
    }
    /**
     * @param ?string $post_max_size
     * @return int
     */
    private function getMaxRequestSize($post_max_size = null)
    {
        $maxSize = IniUtil::iniSizeToBytes($post_max_size === null ? \ini_get('post_max_size') : $post_max_size);
        return $maxSize === 0 || $maxSize >= self::MAXIMUM_BUFFER_SIZE ? self::MAXIMUM_BUFFER_SIZE : $maxSize;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Middleware;

use _PHPStan_dcc7b7cff\Psr\Http\Message\ServerRequestInterface;
/**
 * Process incoming requests with a streaming request body (without buffering).
 *
 * This allows you to process requests of any size without buffering the request
 * body in memory. Instead, it will represent the request body as a
 * [`ReadableStreamInterface`](https://github.com/reactphp/stream#readablestreaminterface)
 * that emit chunks of incoming data as it is received:
 *
 * ```php
 * $http = new React\Http\HttpServer(
 *     new React\Http\Middleware\StreamingRequestMiddleware(),
 *     function (Psr\Http\Message\ServerRequestInterface $request) {
 *         $body = $request->getBody();
 *         assert($body instanceof Psr\Http\Message\StreamInterface);
 *         assert($body instanceof React\Stream\ReadableStreamInterface);
 *
 *         return new React\Promise\Promise(function ($resolve) use ($body) {
 *             $bytes = 0;
 *             $body->on('data', function ($chunk) use (&$bytes) {
 *                 $bytes += \count($chunk);
 *             });
 *             $body->on('close', function () use (&$bytes, $resolve) {
 *                 $resolve(new React\Http\Response(
 *                     200,
 *                     [],
 *                     "Received $bytes bytes\n"
 *                 ));
 *             });
 *         });
 *     }
 * );
 * ```
 *
 * See also [streaming incoming request](../../README.md#streaming-incoming-request)
 * for more details.
 *
 * Additionally, this middleware can be used in combination with the
 * [`LimitConcurrentRequestsMiddleware`](#limitconcurrentrequestsmiddleware) and
 * [`RequestBodyBufferMiddleware`](#requestbodybuffermiddleware) (see below)
 * to explicitly configure the total number of requests that can be handled at
 * once:
 *
 * ```php
 * $http = new React\Http\HttpServer(
 *     new React\Http\Middleware\StreamingRequestMiddleware(),
 *     new React\Http\Middleware\LimitConcurrentRequestsMiddleware(100), // 100 concurrent buffering handlers
 *     new React\Http\Middleware\RequestBodyBufferMiddleware(2 * 1024 * 1024), // 2 MiB per request
 *     new React\Http\Middleware\RequestBodyParserMiddleware(),
 *     $handler
 * );
 * ```
 *
 * > Internally, this class is used as a "marker" to not trigger the default
 *   request buffering behavior in the `HttpServer`. It does not implement any logic
 *   on its own.
 */
final class StreamingRequestMiddleware
{
    public function __invoke(ServerRequestInterface $request, $next)
    {
        return $next($request);
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Middleware;

use _PHPStan_dcc7b7cff\Psr\Http\Message\ResponseInterface;
use _PHPStan_dcc7b7cff\Psr\Http\Message\ServerRequestInterface;
use _PHPStan_dcc7b7cff\React\Http\Io\HttpBodyStream;
use _PHPStan_dcc7b7cff\React\Http\Io\PauseBufferStream;
use _PHPStan_dcc7b7cff\React\Promise;
use _PHPStan_dcc7b7cff\React\Promise\PromiseInterface;
use _PHPStan_dcc7b7cff\React\Promise\Deferred;
use _PHPStan_dcc7b7cff\React\Stream\ReadableStreamInterface;
/**
 * Limits how many next handlers can be executed concurrently.
 *
 * If this middleware is invoked, it will check if the number of pending
 * handlers is below the allowed limit and then simply invoke the next handler
 * and it will return whatever the next handler returns (or throws).
 *
 * If the number of pending handlers exceeds the allowed limit, the request will
 * be queued (and its streaming body will be paused) and it will return a pending
 * promise.
 * Once a pending handler returns (or throws), it will pick the oldest request
 * from this queue and invokes the next handler (and its streaming body will be
 * resumed).
 *
 * The following example shows how this middleware can be used to ensure no more
 * than 10 handlers will be invoked at once:
 *
 * ```php
 * $http = new React\Http\HttpServer(
 *     new React\Http\Middleware\StreamingRequestMiddleware(),
 *     new React\Http\Middleware\LimitConcurrentRequestsMiddleware(10),
 *     $handler
 * );
 * ```
 *
 * Similarly, this middleware is often used in combination with the
 * [`RequestBodyBufferMiddleware`](#requestbodybuffermiddleware) (see below)
 * to limit the total number of requests that can be buffered at once:
 *
 * ```php
 * $http = new React\Http\HttpServer(
 *     new React\Http\Middleware\StreamingRequestMiddleware(),
 *     new React\Http\Middleware\LimitConcurrentRequestsMiddleware(100), // 100 concurrent buffering handlers
 *     new React\Http\Middleware\RequestBodyBufferMiddleware(2 * 1024 * 1024), // 2 MiB per request
 *     new React\Http\Middleware\RequestBodyParserMiddleware(),
 *     $handler
 * );
 * ```
 *
 * More sophisticated examples include limiting the total number of requests
 * that can be buffered at once and then ensure the actual request handler only
 * processes one request after another without any concurrency:
 *
 * ```php
 * $http = new React\Http\HttpServer(
 *     new React\Http\Middleware\StreamingRequestMiddleware(),
 *     new React\Http\Middleware\LimitConcurrentRequestsMiddleware(100), // 100 concurrent buffering handlers
 *     new React\Http\Middleware\RequestBodyBufferMiddleware(2 * 1024 * 1024), // 2 MiB per request
 *     new React\Http\Middleware\RequestBodyParserMiddleware(),
 *     new React\Http\Middleware\LimitConcurrentRequestsMiddleware(1), // only execute 1 handler (no concurrency)
 *     $handler
 * );
 * ```
 *
 * @see RequestBodyBufferMiddleware
 */
final class LimitConcurrentRequestsMiddleware
{
    private $limit;
    private $pending = 0;
    private $queue = array();
    /**
     * @param int $limit Maximum amount of concurrent requests handled.
     *
     * For example when $limit is set to 10, 10 requests will flow to $next
     * while more incoming requests have to wait until one is done.
     */
    public function __construct($limit)
    {
        $this->limit = $limit;
    }
    public function __invoke(ServerRequestInterface $request, $next)
    {
        // happy path: simply invoke next request handler if we're below limit
        if ($this->pending < $this->limit) {
            ++$this->pending;
            try {
                $response = $next($request);
            } catch (\Exception $e) {
                $this->processQueue();
                throw $e;
            } catch (\Throwable $e) {
                // @codeCoverageIgnoreStart
                // handle Errors just like Exceptions (PHP 7+ only)
                $this->processQueue();
                throw $e;
                // @codeCoverageIgnoreEnd
            }
            // happy path: if next request handler returned immediately,
            // we can simply try to invoke the next queued request
            if ($response instanceof ResponseInterface) {
                $this->processQueue();
                return $response;
            }
            // if the next handler returns a pending promise, we have to
            // await its resolution before invoking next queued request
            return $this->await(Promise\resolve($response));
        }
        // if we reach this point, then this request will need to be queued
        // check if the body is streaming, in which case we need to buffer everything
        $body = $request->getBody();
        if ($body instanceof ReadableStreamInterface) {
            // pause actual body to stop emitting data until the handler is called
            $size = $body->getSize();
            $body = new PauseBufferStream($body);
            $body->pauseImplicit();
            // replace with buffering body to ensure any readable events will be buffered
            $request = $request->withBody(new HttpBodyStream($body, $size));
        }
        // get next queue position
        $queue =& $this->queue;
        $queue[] = null;
        \end($queue);
        $id = \key($queue);
        $deferred = new Deferred(function ($_, $reject) use(&$queue, $id) {
            // queued promise cancelled before its next handler is invoked
            // remove from queue and reject explicitly
            unset($queue[$id]);
            $reject(new \RuntimeException('Cancelled queued next handler'));
        });
        // queue request and process queue if pending does not exceed limit
        $queue[$id] = $deferred;
        $pending =& $this->pending;
        $that = $this;
        return $deferred->promise()->then(function () use($request, $next, $body, &$pending, $that) {
            // invoke next request handler
            ++$pending;
            try {
                $response = $next($request);
            } catch (\Exception $e) {
                $that->processQueue();
                throw $e;
            } catch (\Throwable $e) {
                // @codeCoverageIgnoreStart
                // handle Errors just like Exceptions (PHP 7+ only)
                $that->processQueue();
                throw $e;
                // @codeCoverageIgnoreEnd
            }
            // resume readable stream and replay buffered events
            if ($body instanceof PauseBufferStream) {
                $body->resumeImplicit();
            }
            // if the next handler returns a pending promise, we have to
            // await its resolution before invoking next queued request
            return $that->await(Promise\resolve($response));
        });
    }
    /**
     * @internal
     * @param PromiseInterface $promise
     * @return PromiseInterface
     */
    public function await(PromiseInterface $promise)
    {
        $that = $this;
        return $promise->then(function ($response) use($that) {
            $that->processQueue();
            return $response;
        }, function ($error) use($that) {
            $that->processQueue();
            return Promise\reject($error);
        });
    }
    /**
     * @internal
     */
    public function processQueue()
    {
        // skip if we're still above concurrency limit or there's no queued request waiting
        if (--$this->pending >= $this->limit || !$this->queue) {
            return;
        }
        $first = \reset($this->queue);
        unset($this->queue[\key($this->queue)]);
        $first->resolve(null);
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Middleware;

use _PHPStan_dcc7b7cff\Psr\Http\Message\ServerRequestInterface;
use _PHPStan_dcc7b7cff\React\Http\Io\MultipartParser;
final class RequestBodyParserMiddleware
{
    private $multipart;
    /**
     * @param int|string|null $uploadMaxFilesize
     * @param int|null $maxFileUploads
     */
    public function __construct($uploadMaxFilesize = null, $maxFileUploads = null)
    {
        $this->multipart = new MultipartParser($uploadMaxFilesize, $maxFileUploads);
    }
    public function __invoke(ServerRequestInterface $request, $next)
    {
        $type = \strtolower($request->getHeaderLine('Content-Type'));
        list($type) = \explode(';', $type);
        if ($type === 'application/x-www-form-urlencoded') {
            return $next($this->parseFormUrlencoded($request));
        }
        if ($type === 'multipart/form-data') {
            return $next($this->multipart->parse($request));
        }
        return $next($request);
    }
    private function parseFormUrlencoded(ServerRequestInterface $request)
    {
        // parse string into array structure
        // ignore warnings due to excessive data structures (max_input_vars and max_input_nesting_level)
        $ret = array();
        @\parse_str((string) $request->getBody(), $ret);
        return $request->withParsedBody($ret);
    }
}
<?php

namespace _PHPStan_dcc7b7cff\React\Http\Middleware;

use OverflowException;
use _PHPStan_dcc7b7cff\Psr\Http\Message\ServerRequestInterface;
use _PHPStan_dcc7b7cff\React\Http\Io\BufferedBody;
use _PHPStan_dcc7b7cff\React\Http\Io\IniUtil;
use _PHPStan_dcc7b7cff\React\Promise\Promise;
use _PHPStan_dcc7b7cff\React\Stream\ReadableStreamInterface;
final class RequestBodyBufferMiddleware
{
    private $sizeLimit;
    /**
     * @param int|string|null $sizeLimit Either an int with the max request body size
     *                                   in bytes or an ini like size string
     *                                   or null to use post_max_size from PHP's
     *                                   configuration. (Note that the value from
     *                                   the CLI configuration will be used.)
     */
    public function __construct($sizeLimit = null)
    {
        if ($sizeLimit === null) {
            $sizeLimit = \ini_get('post_max_size');
        }
        $this->sizeLimit = IniUtil::iniSizeToBytes($sizeLimit);
    }
    public function __invoke(ServerRequestInterface $request, $next)
    {
        $body = $request->getBody();
        $size = $body->getSize();
        // happy path: skip if body is known to be empty (or is already buffered)
        if ($size === 0 || !$body instanceof ReadableStreamInterface || !$body->isReadable()) {
            // replace with empty body if body is streaming (or buffered size exceeds limit)
            if ($body instanceof ReadableStreamInterface || $size > $this->sizeLimit) {
                $request = $request->withBody(new BufferedBody(''));
            }
            return $next($request);
        }
        // request body of known size exceeding limit
        $sizeLimit = $this->sizeLimit;
        if ($size > $this->sizeLimit) {
            $sizeLimit = 0;
        }
        /** @var ?\Closure $closer */
        $closer = null;
        return new Promise(function ($resolve, $reject) use($body, &$closer, $sizeLimit, $request, $next) {
            // buffer request body data in memory, discard but keep buffering if limit is reached
            $buffer = '';
            $bufferer = null;
            $body->on('data', $bufferer = function ($data) use(&$buffer, $sizeLimit, $body, &$bufferer) {
                $buffer .= $data;
                // On buffer overflow keep the request body stream in,
                // but ignore the contents and wait for the close event
                // before passing the request on to the next middleware.
                if (isset($buffer[$sizeLimit])) {
                    \assert($bufferer instanceof \Closure);
                    $body->removeListener('data', $bufferer);
                    $bufferer = null;
                    $buffer = '';
                }
            });
            // call $next with current buffer and resolve or reject with its results
            $body->on('close', $closer = function () use(&$buffer, $request, $resolve, $reject, $next) {
                try {
                    // resolve with result of next handler
                    $resolve($next($request->withBody(new BufferedBody($buffer))));
                } catch (\Exception $e) {
                    $reject($e);
                } catch (\Throwable $e) {
                    // @codeCoverageIgnoreStart
                    // reject Errors just like Exceptions (PHP 7+)
                    $reject($e);
                    // @codeCoverageIgnoreEnd
                }
            });
            // reject buffering if body emits error
            $body->on('error', function (\Exception $e) use($reject, $body, $closer) {
                // remove close handler to avoid resolving, then close and reject
                \assert($closer instanceof \Closure);
                $body->removeListener('close', $closer);
                $body->close();
                $reject(new \RuntimeException('Error while buffering request body: ' . $e->getMessage(), $e->getCode(), $e));
            });
        }, function () use($body, &$closer) {
            // cancelled buffering: remove close handler to avoid resolving, then close and reject
            \assert($closer instanceof \Closure);
            $body->removeListener('close', $closer);
            $body->close();
            throw new \RuntimeException('Cancelled buffering request body');
        });
    }
}
The MIT License (MIT)

Copyright (c) 2012 Christian Lück, Cees-Jan Kiewiet, Jan Sorgalla, Chris Boden, Igor Wiedler

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Copyright (c) 2012 PHP Framework Interoperability Group

Permission is hereby granted, free of charge, to any person obtaining a copy 
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights 
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
copies of the Software, and to permit persons to whom the Software is 
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in 
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

namespace _PHPStan_dcc7b7cff\Psr\Log;

/**
 * Describes a logger-aware instance.
 */
interface LoggerAwareInterface
{
    /**
     * Sets a logger instance on the object.
     *
     * @param LoggerInterface $logger
     *
     * @return void
     */
    public function setLogger(LoggerInterface $logger);
}
<?php

namespace _PHPStan_dcc7b7cff\Psr\Log;

/**
 * This is a simple Logger trait that classes unable to extend AbstractLogger
 * (because they extend another class, etc) can include.
 *
 * It simply delegates all log-level-specific methods to the `log` method to
 * reduce boilerplate code that a simple Logger that does the same thing with
 * messages regardless of the error level has to implement.
 */
trait LoggerTrait
{
    /**
     * System is unusable.
     *
     * @param string $message
     * @param array  $context
     *
     * @return void
     */
    public function emergency($message, array $context = array())
    {
        $this->log(LogLevel::EMERGENCY, $message, $context);
    }
    /**
     * Action must be taken immediately.
     *
     * Example: Entire website down, database unavailable, etc. This should
     * trigger the SMS alerts and wake you up.
     *
     * @param string $message
     * @param array  $context
     *
     * @return void
     */
    public function alert($message, array $context = array())
    {
        $this->log(LogLevel::ALERT, $message, $context);
    }
    /**
     * Critical conditions.
     *
     * Example: Application component unavailable, unexpected exception.
     *
     * @param string $message
     * @param array  $context
     *
     * @return void
     */
    public function critical($message, array $context = array())
    {
        $this->log(LogLevel::CRITICAL, $message, $context);
    }
    /**
     * Runtime errors that do not require immediate action but should typically
     * be logged and monitored.
     *
     * @param string $message
     * @param array  $context
     *
     * @return void
     */
    public function error($message, array $context = array())
    {
        $this->log(LogLevel::ERROR, $message, $context);
    }
    /**
     * Exceptional occurrences that are not errors.
     *
     * Example: Use of deprecated APIs, poor use of an API, undesirable things
     * that are not necessarily wrong.
     *
     * @param string $message
     * @param array  $context
     *
     * @return void
     */
    public function warning($message, array $context = array())
    {
        $this->log(LogLevel::WARNING, $message, $context);
    }
    /**
     * Normal but significant events.
     *
     * @param string $message
     * @param array  $context
     *
     * @return void
     */
    public function notice($message, array $context = array())
    {
        $this->log(LogLevel::NOTICE, $message, $context);
    }
    /**
     * Interesting events.
     *
     * Example: User logs in, SQL logs.
     *
     * @param string $message
     * @param array  $context
     *
     * @return void
     */
    public function info($message, array $context = array())
    {
        $this->log(LogLevel::INFO, $message, $context);
    }
    /**
     * Detailed debug information.
     *
     * @param string $message
     * @param array  $context
     *
     * @return void
     */
    public function debug($message, array $context = array())
    {
        $this->log(LogLevel::DEBUG, $message, $context);
    }
    /**
     * Logs with an arbitrary level.
     *
     * @param mixed  $level
     * @param string $message
     * @param array  $context
     *
     * @return void
     *
     * @throws \Psr\Log\InvalidArgumentException
     */
    public abstract function log($level, $message, array $context = array());
}
<?php

namespace _PHPStan_dcc7b7cff\Psr\Log;

/**
 * Describes a logger instance.
 *
 * The message MUST be a string or object implementing __toString().
 *
 * The message MAY contain placeholders in the form: {foo} where foo
 * will be replaced by the context data in key "foo".
 *
 * The context array can contain arbitrary data. The only assumption that
 * can be made by implementors is that if an Exception instance is given
 * to produce a stack trace, it MUST be in a key named "exception".
 *
 * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md
 * for the full interface specification.
 */
interface LoggerInterface
{
    /**
     * System is unusable.
     *
     * @param string  $message
     * @param mixed[] $context
     *
     * @return void
     */
    public function emergency($message, array $context = array());
    /**
     * Action must be taken immediately.
     *
     * Example: Entire website down, database unavailable, etc. This should
     * trigger the SMS alerts and wake you up.
     *
     * @param string  $message
     * @param mixed[] $context
     *
     * @return void
     */
    public function alert($message, array $context = array());
    /**
     * Critical conditions.
     *
     * Example: Application component unavailable, unexpected exception.
     *
     * @param string  $message
     * @param mixed[] $context
     *
     * @return void
     */
    public function critical($message, array $context = array());
    /**
     * Runtime errors that do not require immediate action but should typically
     * be logged and monitored.
     *
     * @param string  $message
     * @param mixed[] $context
     *
     * @return void
     */
    public function error($message, array $context = array());
    /**
     * Exceptional occurrences that are not errors.
     *
     * Example: Use of deprecated APIs, poor use of an API, undesirable things
     * that are not necessarily wrong.
     *
     * @param string  $message
     * @param mixed[] $context
     *
     * @return void
     */
    public function warning($message, array $context = array());
    /**
     * Normal but significant events.
     *
     * @param string  $message
     * @param mixed[] $context
     *
     * @return void
     */
    public function notice($message, array $context = array());
    /**
     * Interesting events.
     *
     * Example: User logs in, SQL logs.
     *
     * @param string  $message
     * @param mixed[] $context
     *
     * @return void
     */
    public function info($message, array $context = array());
    /**
     * Detailed debug information.
     *
     * @param string  $message
     * @param mixed[] $context
     *
     * @return void
     */
    public function debug($message, array $context = array());
    /**
     * Logs with an arbitrary level.
     *
     * @param mixed   $level
     * @param string  $message
     * @param mixed[] $context
     *
     * @return void
     *
     * @throws \Psr\Log\InvalidArgumentException
     */
    public function log($level, $message, array $context = array());
}
<?php

namespace _PHPStan_dcc7b7cff\Psr\Log;

/**
 * This Logger can be used to avoid conditional log calls.
 *
 * Logging should always be optional, and if no logger is provided to your
 * library creating a NullLogger instance to have something to throw logs at
 * is a good way to avoid littering your code with `if ($this->logger) { }`
 * blocks.
 */
class NullLogger extends AbstractLogger
{
    /**
     * Logs with an arbitrary level.
     *
     * @param mixed  $level
     * @param string $message
     * @param array  $context
     *
     * @return void
     *
     * @throws \Psr\Log\InvalidArgumentException
     */
    public function log($level, $message, array $context = array())
    {
        // noop
    }
}
<?php

namespace _PHPStan_dcc7b7cff\Psr\Log;

/**
 * This is a simple Logger implementation that other Loggers can inherit from.
 *
 * It simply delegates all log-level-specific methods to the `log` method to
 * reduce boilerplate code that a simple Logger that does the same thing with
 * messages regardless of the error level has to implement.
 */
abstract class AbstractLogger implements LoggerInterface
{
    /**
     * System is unusable.
     *
     * @param string $message
     * @param array  $context
     *
     * @return void
     */
    public function emergency($message, array $context = array())
    {
        $this->log(LogLevel::EMERGENCY, $message, $context);
    }
    /**
     * Action must be taken immediately.
     *
     * Example: Entire website down, database unavailable, etc. This should
     * trigger the SMS alerts and wake you up.
     *
     * @param string $message
     * @param array  $context
     *
     * @return void
     */
    public function alert($message, array $context = array())
    {
        $this->log(LogLevel::ALERT, $message, $context);
    }
    /**
     * Critical conditions.
     *
     * Example: Application component unavailable, unexpected exception.
     *
     * @param string $message
     * @param array  $context
     *
     * @return void
     */
    public function critical($message, array $context = array())
    {
        $this->log(LogLevel::CRITICAL, $message, $context);
    }
    /**
     * Runtime errors that do not require immediate action but should typically
     * be logged and monitored.
     *
     * @param string $message
     * @param array  $context
     *
     * @return void
     */
    public function error($message, array $context = array())
    {
        $this->log(LogLevel::ERROR, $message, $context);
    }
    /**
     * Exceptional occurrences that are not errors.
     *
     * Example: Use of deprecated APIs, poor use of an API, undesirable things
     * that are not necessarily wrong.
     *
     * @param string $message
     * @param array  $context
     *
     * @return void
     */
    public function warning($message, array $context = array())
    {
        $this->log(LogLevel::WARNING, $message, $context);
    }
    /**
     * Normal but significant events.
     *
     * @param string $message
     * @param array  $context
     *
     * @return void
     */
    public function notice($message, array $context = array())
    {
        $this->log(LogLevel::NOTICE, $message, $context);
    }
    /**
     * Interesting events.
     *
     * Example: User logs in, SQL logs.
     *
     * @param string $message
     * @param array  $context
     *
     * @return void
     */
    public function info($message, array $context = array())
    {
        $this->log(LogLevel::INFO, $message, $context);
    }
    /**
     * Detailed debug information.
     *
     * @param string $message
     * @param array  $context
     *
     * @return void
     */
    public function debug($message, array $context = array())
    {
        $this->log(LogLevel::DEBUG, $message, $context);
    }
}
<?php

namespace _PHPStan_dcc7b7cff\Psr\Log;

/**
 * Basic Implementation of LoggerAwareInterface.
 */
trait LoggerAwareTrait
{
    /**
     * The logger instance.
     *
     * @var LoggerInterface
     */
    protected $logger;
    /**
     * Sets a logger.
     *
     * @param LoggerInterface $logger
     */
    public function setLogger(LoggerInterface $logger)
    {
        $this->logger = $logger;
    }
}
<?php

namespace _PHPStan_dcc7b7cff\Psr\Log;

class InvalidArgumentException extends \InvalidArgumentException
{
}
<?php

namespace _PHPStan_dcc7b7cff\Psr\Log;

/**
 * Describes log levels.
 */
class LogLevel
{
    const EMERGENCY = 'emergency';
    const ALERT = 'alert';
    const CRITICAL = 'critical';
    const ERROR = 'error';
    const WARNING = 'warning';
    const NOTICE = 'notice';
    const INFO = 'info';
    const DEBUG = 'debug';
}
<?php

namespace _PHPStan_dcc7b7cff\Psr\Container;

/**
 * No entry was found in the container.
 */
interface NotFoundExceptionInterface extends ContainerExceptionInterface
{
}
<?php

declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Psr\Container;

/**
 * Describes the interface of a container that exposes methods to read its entries.
 */
interface ContainerInterface
{
    /**
     * Finds an entry of the container by its identifier and returns it.
     *
     * @param string $id Identifier of the entry to look for.
     *
     * @throws NotFoundExceptionInterface  No entry was found for **this** identifier.
     * @throws ContainerExceptionInterface Error while retrieving the entry.
     *
     * @return mixed Entry.
     */
    public function get(string $id);
    /**
     * Returns true if the container can return an entry for the given identifier.
     * Returns false otherwise.
     *
     * `has($id)` returning true does not mean that `get($id)` will not throw an exception.
     * It does however mean that `get($id)` will not throw a `NotFoundExceptionInterface`.
     *
     * @param string $id Identifier of the entry to look for.
     *
     * @return bool
     */
    public function has(string $id);
}
<?php

namespace _PHPStan_dcc7b7cff\Psr\Container;

use Throwable;
/**
 * Base interface representing a generic exception in a container.
 */
interface ContainerExceptionInterface extends Throwable
{
}
The MIT License (MIT)

Copyright (c) 2013-2016 container-interop
Copyright (c) 2016 PHP Framework Interoperability Group

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
<?php

namespace _PHPStan_dcc7b7cff\Psr\Http\Message;

/**
 * HTTP messages consist of requests from a client to a server and responses
 * from a server to a client. This interface defines the methods common to
 * each.
 *
 * Messages are considered immutable; all methods that might change state MUST
 * be implemented such that they retain the internal state of the current
 * message and return an instance that contains the changed state.
 *
 * @link http://www.ietf.org/rfc/rfc7230.txt
 * @link http://www.ietf.org/rfc/rfc7231.txt
 */
interface MessageInterface
{
    /**
     * Retrieves the HTTP protocol version as a string.
     *
     * The string MUST contain only the HTTP version number (e.g., "1.1", "1.0").
     *
     * @return string HTTP protocol version.
     */
    public function getProtocolVersion();
    /**
     * Return an instance with the specified HTTP protocol version.
     *
     * The version string MUST contain only the HTTP version number (e.g.,
     * "1.1", "1.0").
     *
     * This method MUST be implemented in such a way as to retain the
     * immutability of the message, and MUST return an instance that has the
     * new protocol version.
     *
     * @param string $version HTTP protocol version
     * @return static
     */
    public function withProtocolVersion($version);
    /**
     * Retrieves all message header values.
     *
     * The keys represent the header name as it will be sent over the wire, and
     * each value is an array of strings associated with the header.
     *
     *     // Represent the headers as a string
     *     foreach ($message->getHeaders() as $name => $values) {
     *         echo $name . ": " . implode(", ", $values);
     *     }
     *
     *     // Emit headers iteratively:
     *     foreach ($message->getHeaders() as $name => $values) {
     *         foreach ($values as $value) {
     *             header(sprintf('%s: %s', $name, $value), false);
     *         }
     *     }
     *
     * While header names are not case-sensitive, getHeaders() will preserve the
     * exact case in which headers were originally specified.
     *
     * @return string[][] Returns an associative array of the message's headers. Each
     *     key MUST be a header name, and each value MUST be an array of strings
     *     for that header.
     */
    public function getHeaders();
    /**
     * Checks if a header exists by the given case-insensitive name.
     *
     * @param string $name Case-insensitive header field name.
     * @return bool Returns true if any header names match the given header
     *     name using a case-insensitive string comparison. Returns false if
     *     no matching header name is found in the message.
     */
    public function hasHeader($name);
    /**
     * Retrieves a message header value by the given case-insensitive name.
     *
     * This method returns an array of all the header values of the given
     * case-insensitive header name.
     *
     * If the header does not appear in the message, this method MUST return an
     * empty array.
     *
     * @param string $name Case-insensitive header field name.
     * @return string[] An array of string values as provided for the given
     *    header. If the header does not appear in the message, this method MUST
     *    return an empty array.
     */
    public function getHeader($name);
    /**
     * Retrieves a comma-separated string of the values for a single header.
     *
     * This method returns all of the header values of the given
     * case-insensitive header name as a string concatenated together using
     * a comma.
     *
     * NOTE: Not all header values may be appropriately represented using
     * comma concatenation. For such headers, use getHeader() instead
     * and supply your own delimiter when concatenating.
     *
     * If the header does not appear in the message, this method MUST return
     * an empty string.
     *
     * @param string $name Case-insensitive header field name.
     * @return string A string of values as provided for the given header
     *    concatenated together using a comma. If the header does not appear in
     *    the message, this method MUST return an empty string.
     */
    public function getHeaderLine($name);
    /**
     * Return an instance with the provided value replacing the specified header.
     *
     * While header names are case-insensitive, the casing of the header will
     * be preserved by this function, and returned from getHeaders().
     *
     * This method MUST be implemented in such a way as to retain the
     * immutability of the message, and MUST return an instance that has the
     * new and/or updated header and value.
     *
     * @param string $name Case-insensitive header field name.
     * @param string|string[] $value Header value(s).
     * @return static
     * @throws \InvalidArgumentException for invalid header names or values.
     */
    public function withHeader($name, $value);
    /**
     * Return an instance with the specified header appended with the given value.
     *
     * Existing values for the specified header will be maintained. The new
     * value(s) will be appended to the existing list. If the header did not
     * exist previously, it will be added.
     *
     * This method MUST be implemented in such a way as to retain the
     * immutability of the message, and MUST return an instance that has the
     * new header and/or value.
     *
     * @param string $name Case-insensitive header field name to add.
     * @param string|string[] $value Header value(s).
     * @return static
     * @throws \InvalidArgumentException for invalid header names or values.
     */
    public function withAddedHeader($name, $value);
    /**
     * Return an instance without the specified header.
     *
     * Header resolution MUST be done without case-sensitivity.
     *
     * This method MUST be implemented in such a way as to retain the
     * immutability of the message, and MUST return an instance that removes
     * the named header.
     *
     * @param string $name Case-insensitive header field name to remove.
     * @return static
     */
    public function withoutHeader($name);
    /**
     * Gets the body of the message.
     *
     * @return StreamInterface Returns the body as a stream.
     */
    public function getBody();
    /**
     * Return an instance with the specified message body.
     *
     * The body MUST be a StreamInterface object.
     *
     * This method MUST be implemented in such a way as to retain the
     * immutability of the message, and MUST return a new instance that has the
     * new body stream.
     *
     * @param StreamInterface $body Body.
     * @return static
     * @throws \InvalidArgumentException When the body is not valid.
     */
    public function withBody(StreamInterface $body);
}
<?php

namespace _PHPStan_dcc7b7cff\Psr\Http\Message;

/**
 * Value object representing a URI.
 *
 * This interface is meant to represent URIs according to RFC 3986 and to
 * provide methods for most common operations. Additional functionality for
 * working with URIs can be provided on top of the interface or externally.
 * Its primary use is for HTTP requests, but may also be used in other
 * contexts.
 *
 * Instances of this interface are considered immutable; all methods that
 * might change state MUST be implemented such that they retain the internal
 * state of the current instance and return an instance that contains the
 * changed state.
 *
 * Typically the Host header will be also be present in the request message.
 * For server-side requests, the scheme will typically be discoverable in the
 * server parameters.
 *
 * @link http://tools.ietf.org/html/rfc3986 (the URI specification)
 */
interface UriInterface
{
    /**
     * Retrieve the scheme component of the URI.
     *
     * If no scheme is present, this method MUST return an empty string.
     *
     * The value returned MUST be normalized to lowercase, per RFC 3986
     * Section 3.1.
     *
     * The trailing ":" character is not part of the scheme and MUST NOT be
     * added.
     *
     * @see https://tools.ietf.org/html/rfc3986#section-3.1
     * @return string The URI scheme.
     */
    public function getScheme();
    /**
     * Retrieve the authority component of the URI.
     *
     * If no authority information is present, this method MUST return an empty
     * string.
     *
     * The authority syntax of the URI is:
     *
     * <pre>
     * [user-info@]host[:port]
     * </pre>
     *
     * If the port component is not set or is the standard port for the current
     * scheme, it SHOULD NOT be included.
     *
     * @see https://tools.ietf.org/html/rfc3986#section-3.2
     * @return string The URI authority, in "[user-info@]host[:port]" format.
     */
    public function getAuthority();
    /**
     * Retrieve the user information component of the URI.
     *
     * If no user information is present, this method MUST return an empty
     * string.
     *
     * If a user is present in the URI, this will return that value;
     * additionally, if the password is also present, it will be appended to the
     * user value, with a colon (":") separating the values.
     *
     * The trailing "@" character is not part of the user information and MUST
     * NOT be added.
     *
     * @return string The URI user information, in "username[:password]" format.
     */
    public function getUserInfo();
    /**
     * Retrieve the host component of the URI.
     *
     * If no host is present, this method MUST return an empty string.
     *
     * The value returned MUST be normalized to lowercase, per RFC 3986
     * Section 3.2.2.
     *
     * @see http://tools.ietf.org/html/rfc3986#section-3.2.2
     * @return string The URI host.
     */
    public function getHost();
    /**
     * Retrieve the port component of the URI.
     *
     * If a port is present, and it is non-standard for the current scheme,
     * this method MUST return it as an integer. If the port is the standard port
     * used with the current scheme, this method SHOULD return null.
     *
     * If no port is present, and no scheme is present, this method MUST return
     * a null value.
     *
     * If no port is present, but a scheme is present, this method MAY return
     * the standard port for that scheme, but SHOULD return null.
     *
     * @return null|int The URI port.
     */
    public function getPort();
    /**
     * Retrieve the path component of the URI.
     *
     * The path can either be empty or absolute (starting with a slash) or
     * rootless (not starting with a slash). Implementations MUST support all
     * three syntaxes.
     *
     * Normally, the empty path "" and absolute path "/" are considered equal as
     * defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically
     * do this normalization because in contexts with a trimmed base path, e.g.
     * the front controller, this difference becomes significant. It's the task
     * of the user to handle both "" and "/".
     *
     * The value returned MUST be percent-encoded, but MUST NOT double-encode
     * any characters. To determine what characters to encode, please refer to
     * RFC 3986, Sections 2 and 3.3.
     *
     * As an example, if the value should include a slash ("/") not intended as
     * delimiter between path segments, that value MUST be passed in encoded
     * form (e.g., "%2F") to the instance.
     *
     * @see https://tools.ietf.org/html/rfc3986#section-2
     * @see https://tools.ietf.org/html/rfc3986#section-3.3
     * @return string The URI path.
     */
    public function getPath();
    /**
     * Retrieve the query string of the URI.
     *
     * If no query string is present, this method MUST return an empty string.
     *
     * The leading "?" character is not part of the query and MUST NOT be
     * added.
     *
     * The value returned MUST be percent-encoded, but MUST NOT double-encode
     * any characters. To determine what characters to encode, please refer to
     * RFC 3986, Sections 2 and 3.4.
     *
     * As an example, if a value in a key/value pair of the query string should
     * include an ampersand ("&") not intended as a delimiter between values,
     * that value MUST be passed in encoded form (e.g., "%26") to the instance.
     *
     * @see https://tools.ietf.org/html/rfc3986#section-2
     * @see https://tools.ietf.org/html/rfc3986#section-3.4
     * @return string The URI query string.
     */
    public function getQuery();
    /**
     * Retrieve the fragment component of the URI.
     *
     * If no fragment is present, this method MUST return an empty string.
     *
     * The leading "#" character is not part of the fragment and MUST NOT be
     * added.
     *
     * The value returned MUST be percent-encoded, but MUST NOT double-encode
     * any characters. To determine what characters to encode, please refer to
     * RFC 3986, Sections 2 and 3.5.
     *
     * @see https://tools.ietf.org/html/rfc3986#section-2
     * @see https://tools.ietf.org/html/rfc3986#section-3.5
     * @return string The URI fragment.
     */
    public function getFragment();
    /**
     * Return an instance with the specified scheme.
     *
     * This method MUST retain the state of the current instance, and return
     * an instance that contains the specified scheme.
     *
     * Implementations MUST support the schemes "http" and "https" case
     * insensitively, and MAY accommodate other schemes if required.
     *
     * An empty scheme is equivalent to removing the scheme.
     *
     * @param string $scheme The scheme to use with the new instance.
     * @return static A new instance with the specified scheme.
     * @throws \InvalidArgumentException for invalid or unsupported schemes.
     */
    public function withScheme($scheme);
    /**
     * Return an instance with the specified user information.
     *
     * This method MUST retain the state of the current instance, and return
     * an instance that contains the specified user information.
     *
     * Password is optional, but the user information MUST include the
     * user; an empty string for the user is equivalent to removing user
     * information.
     *
     * @param string $user The user name to use for authority.
     * @param null|string $password The password associated with $user.
     * @return static A new instance with the specified user information.
     */
    public function withUserInfo($user, $password = null);
    /**
     * Return an instance with the specified host.
     *
     * This method MUST retain the state of the current instance, and return
     * an instance that contains the specified host.
     *
     * An empty host value is equivalent to removing the host.
     *
     * @param string $host The hostname to use with the new instance.
     * @return static A new instance with the specified host.
     * @throws \InvalidArgumentException for invalid hostnames.
     */
    public function withHost($host);
    /**
     * Return an instance with the specified port.
     *
     * This method MUST retain the state of the current instance, and return
     * an instance that contains the specified port.
     *
     * Implementations MUST raise an exception for ports outside the
     * established TCP and UDP port ranges.
     *
     * A null value provided for the port is equivalent to removing the port
     * information.
     *
     * @param null|int $port The port to use with the new instance; a null value
     *     removes the port information.
     * @return static A new instance with the specified port.
     * @throws \InvalidArgumentException for invalid ports.
     */
    public function withPort($port);
    /**
     * Return an instance with the specified path.
     *
     * This method MUST retain the state of the current instance, and return
     * an instance that contains the specified path.
     *
     * The path can either be empty or absolute (starting with a slash) or
     * rootless (not starting with a slash). Implementations MUST support all
     * three syntaxes.
     *
     * If the path is intended to be domain-relative rather than path relative then
     * it must begin with a slash ("/"). Paths not starting with a slash ("/")
     * are assumed to be relative to some base path known to the application or
     * consumer.
     *
     * Users can provide both encoded and decoded path characters.
     * Implementations ensure the correct encoding as outlined in getPath().
     *
     * @param string $path The path to use with the new instance.
     * @return static A new instance with the specified path.
     * @throws \InvalidArgumentException for invalid paths.
     */
    public function withPath($path);
    /**
     * Return an instance with the specified query string.
     *
     * This method MUST retain the state of the current instance, and return
     * an instance that contains the specified query string.
     *
     * Users can provide both encoded and decoded query characters.
     * Implementations ensure the correct encoding as outlined in getQuery().
     *
     * An empty query string value is equivalent to removing the query string.
     *
     * @param string $query The query string to use with the new instance.
     * @return static A new instance with the specified query string.
     * @throws \InvalidArgumentException for invalid query strings.
     */
    public function withQuery($query);
    /**
     * Return an instance with the specified URI fragment.
     *
     * This method MUST retain the state of the current instance, and return
     * an instance that contains the specified URI fragment.
     *
     * Users can provide both encoded and decoded fragment characters.
     * Implementations ensure the correct encoding as outlined in getFragment().
     *
     * An empty fragment value is equivalent to removing the fragment.
     *
     * @param string $fragment The fragment to use with the new instance.
     * @return static A new instance with the specified fragment.
     */
    public function withFragment($fragment);
    /**
     * Return the string representation as a URI reference.
     *
     * Depending on which components of the URI are present, the resulting
     * string is either a full URI or relative reference according to RFC 3986,
     * Section 4.1. The method concatenates the various components of the URI,
     * using the appropriate delimiters:
     *
     * - If a scheme is present, it MUST be suffixed by ":".
     * - If an authority is present, it MUST be prefixed by "//".
     * - The path can be concatenated without delimiters. But there are two
     *   cases where the path has to be adjusted to make the URI reference
     *   valid as PHP does not allow to throw an exception in __toString():
     *     - If the path is rootless and an authority is present, the path MUST
     *       be prefixed by "/".
     *     - If the path is starting with more than one "/" and no authority is
     *       present, the starting slashes MUST be reduced to one.
     * - If a query is present, it MUST be prefixed by "?".
     * - If a fragment is present, it MUST be prefixed by "#".
     *
     * @see http://tools.ietf.org/html/rfc3986#section-4.1
     * @return string
     */
    public function __toString();
}
<?php

namespace _PHPStan_dcc7b7cff\Psr\Http\Message;

/**
 * Value object representing a file uploaded through an HTTP request.
 *
 * Instances of this interface are considered immutable; all methods that
 * might change state MUST be implemented such that they retain the internal
 * state of the current instance and return an instance that contains the
 * changed state.
 */
interface UploadedFileInterface
{
    /**
     * Retrieve a stream representing the uploaded file.
     *
     * This method MUST return a StreamInterface instance, representing the
     * uploaded file. The purpose of this method is to allow utilizing native PHP
     * stream functionality to manipulate the file upload, such as
     * stream_copy_to_stream() (though the result will need to be decorated in a
     * native PHP stream wrapper to work with such functions).
     *
     * If the moveTo() method has been called previously, this method MUST raise
     * an exception.
     *
     * @return StreamInterface Stream representation of the uploaded file.
     * @throws \RuntimeException in cases when no stream is available or can be
     *     created.
     */
    public function getStream();
    /**
     * Move the uploaded file to a new location.
     *
     * Use this method as an alternative to move_uploaded_file(). This method is
     * guaranteed to work in both SAPI and non-SAPI environments.
     * Implementations must determine which environment they are in, and use the
     * appropriate method (move_uploaded_file(), rename(), or a stream
     * operation) to perform the operation.
     *
     * $targetPath may be an absolute path, or a relative path. If it is a
     * relative path, resolution should be the same as used by PHP's rename()
     * function.
     *
     * The original file or stream MUST be removed on completion.
     *
     * If this method is called more than once, any subsequent calls MUST raise
     * an exception.
     *
     * When used in an SAPI environment where $_FILES is populated, when writing
     * files via moveTo(), is_uploaded_file() and move_uploaded_file() SHOULD be
     * used to ensure permissions and upload status are verified correctly.
     *
     * If you wish to move to a stream, use getStream(), as SAPI operations
     * cannot guarantee writing to stream destinations.
     *
     * @see http://php.net/is_uploaded_file
     * @see http://php.net/move_uploaded_file
     * @param string $targetPath Path to which to move the uploaded file.
     * @throws \InvalidArgumentException if the $targetPath specified is invalid.
     * @throws \RuntimeException on any error during the move operation, or on
     *     the second or subsequent call to the method.
     */
    public function moveTo($targetPath);
    /**
     * Retrieve the file size.
     *
     * Implementations SHOULD return the value stored in the "size" key of
     * the file in the $_FILES array if available, as PHP calculates this based
     * on the actual size transmitted.
     *
     * @return int|null The file size in bytes or null if unknown.
     */
    public function getSize();
    /**
     * Retrieve the error associated with the uploaded file.
     *
     * The return value MUST be one of PHP's UPLOAD_ERR_XXX constants.
     *
     * If the file was uploaded successfully, this method MUST return
     * UPLOAD_ERR_OK.
     *
     * Implementations SHOULD return the value stored in the "error" key of
     * the file in the $_FILES array.
     *
     * @see http://php.net/manual/en/features.file-upload.errors.php
     * @return int One of PHP's UPLOAD_ERR_XXX constants.
     */
    public function getError();
    /**
     * Retrieve the filename sent by the client.
     *
     * Do not trust the value returned by this method. A client could send
     * a malicious filename with the intention to corrupt or hack your
     * application.
     *
     * Implementations SHOULD return the value stored in the "name" key of
     * the file in the $_FILES array.
     *
     * @return string|null The filename sent by the client or null if none
     *     was provided.
     */
    public function getClientFilename();
    /**
     * Retrieve the media type sent by the client.
     *
     * Do not trust the value returned by this method. A client could send
     * a malicious media type with the intention to corrupt or hack your
     * application.
     *
     * Implementations SHOULD return the value stored in the "type" key of
     * the file in the $_FILES array.
     *
     * @return string|null The media type sent by the client or null if none
     *     was provided.
     */
    public function getClientMediaType();
}
<?php

namespace _PHPStan_dcc7b7cff\Psr\Http\Message;

/**
 * Describes a data stream.
 *
 * Typically, an instance will wrap a PHP stream; this interface provides
 * a wrapper around the most common operations, including serialization of
 * the entire stream to a string.
 */
interface StreamInterface
{
    /**
     * Reads all data from the stream into a string, from the beginning to end.
     *
     * This method MUST attempt to seek to the beginning of the stream before
     * reading data and read the stream until the end is reached.
     *
     * Warning: This could attempt to load a large amount of data into memory.
     *
     * This method MUST NOT raise an exception in order to conform with PHP's
     * string casting operations.
     *
     * @see http://php.net/manual/en/language.oop5.magic.php#object.tostring
     * @return string
     */
    public function __toString();
    /**
     * Closes the stream and any underlying resources.
     *
     * @return void
     */
    public function close();
    /**
     * Separates any underlying resources from the stream.
     *
     * After the stream has been detached, the stream is in an unusable state.
     *
     * @return resource|null Underlying PHP stream, if any
     */
    public function detach();
    /**
     * Get the size of the stream if known.
     *
     * @return int|null Returns the size in bytes if known, or null if unknown.
     */
    public function getSize();
    /**
     * Returns the current position of the file read/write pointer
     *
     * @return int Position of the file pointer
     * @throws \RuntimeException on error.
     */
    public function tell();
    /**
     * Returns true if the stream is at the end of the stream.
     *
     * @return bool
     */
    public function eof();
    /**
     * Returns whether or not the stream is seekable.
     *
     * @return bool
     */
    public function isSeekable();
    /**
     * Seek to a position in the stream.
     *
     * @link http://www.php.net/manual/en/function.fseek.php
     * @param int $offset Stream offset
     * @param int $whence Specifies how the cursor position will be calculated
     *     based on the seek offset. Valid values are identical to the built-in
     *     PHP $whence values for `fseek()`.  SEEK_SET: Set position equal to
     *     offset bytes SEEK_CUR: Set position to current location plus offset
     *     SEEK_END: Set position to end-of-stream plus offset.
     * @throws \RuntimeException on failure.
     */
    public function seek($offset, $whence = \SEEK_SET);
    /**
     * Seek to the beginning of the stream.
     *
     * If the stream is not seekable, this method will raise an exception;
     * otherwise, it will perform a seek(0).
     *
     * @see seek()
     * @link http://www.php.net/manual/en/function.fseek.php
     * @throws \RuntimeException on failure.
     */
    public function rewind();
    /**
     * Returns whether or not the stream is writable.
     *
     * @return bool
     */
    public function isWritable();
    /**
     * Write data to the stream.
     *
     * @param string $string The string that is to be written.
     * @return int Returns the number of bytes written to the stream.
     * @throws \RuntimeException on failure.
     */
    public function write($string);
    /**
     * Returns whether or not the stream is readable.
     *
     * @return bool
     */
    public function isReadable();
    /**
     * Read data from the stream.
     *
     * @param int $length Read up to $length bytes from the object and return
     *     them. Fewer than $length bytes may be returned if underlying stream
     *     call returns fewer bytes.
     * @return string Returns the data read from the stream, or an empty string
     *     if no bytes are available.
     * @throws \RuntimeException if an error occurs.
     */
    public function read($length);
    /**
     * Returns the remaining contents in a string
     *
     * @return string
     * @throws \RuntimeException if unable to read or an error occurs while
     *     reading.
     */
    public function getContents();
    /**
     * Get stream metadata as an associative array or retrieve a specific key.
     *
     * The keys returned are identical to the keys returned from PHP's
     * stream_get_meta_data() function.
     *
     * @link http://php.net/manual/en/function.stream-get-meta-data.php
     * @param string $key Specific metadata to retrieve.
     * @return array|mixed|null Returns an associative array if no key is
     *     provided. Returns a specific key value if a key is provided and the
     *     value is found, or null if the key is not found.
     */
    public function getMetadata($key = null);
}
<?php

namespace _PHPStan_dcc7b7cff\Psr\Http\Message;

/**
 * Representation of an outgoing, server-side response.
 *
 * Per the HTTP specification, this interface includes properties for
 * each of the following:
 *
 * - Protocol version
 * - Status code and reason phrase
 * - Headers
 * - Message body
 *
 * Responses are considered immutable; all methods that might change state MUST
 * be implemented such that they retain the internal state of the current
 * message and return an instance that contains the changed state.
 */
interface ResponseInterface extends MessageInterface
{
    /**
     * Gets the response status code.
     *
     * The status code is a 3-digit integer result code of the server's attempt
     * to understand and satisfy the request.
     *
     * @return int Status code.
     */
    public function getStatusCode();
    /**
     * Return an instance with the specified status code and, optionally, reason phrase.
     *
     * If no reason phrase is specified, implementations MAY choose to default
     * to the RFC 7231 or IANA recommended reason phrase for the response's
     * status code.
     *
     * This method MUST be implemented in such a way as to retain the
     * immutability of the message, and MUST return an instance that has the
     * updated status and reason phrase.
     *
     * @link http://tools.ietf.org/html/rfc7231#section-6
     * @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
     * @param int $code The 3-digit integer result code to set.
     * @param string $reasonPhrase The reason phrase to use with the
     *     provided status code; if none is provided, implementations MAY
     *     use the defaults as suggested in the HTTP specification.
     * @return static
     * @throws \InvalidArgumentException For invalid status code arguments.
     */
    public function withStatus($code, $reasonPhrase = '');
    /**
     * Gets the response reason phrase associated with the status code.
     *
     * Because a reason phrase is not a required element in a response
     * status line, the reason phrase value MAY be null. Implementations MAY
     * choose to return the default RFC 7231 recommended reason phrase (or those
     * listed in the IANA HTTP Status Code Registry) for the response's
     * status code.
     *
     * @link http://tools.ietf.org/html/rfc7231#section-6
     * @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
     * @return string Reason phrase; must return an empty string if none present.
     */
    public function getReasonPhrase();
}
<?php

namespace _PHPStan_dcc7b7cff\Psr\Http\Message;

/**
 * Representation of an incoming, server-side HTTP request.
 *
 * Per the HTTP specification, this interface includes properties for
 * each of the following:
 *
 * - Protocol version
 * - HTTP method
 * - URI
 * - Headers
 * - Message body
 *
 * Additionally, it encapsulates all data as it has arrived to the
 * application from the CGI and/or PHP environment, including:
 *
 * - The values represented in $_SERVER.
 * - Any cookies provided (generally via $_COOKIE)
 * - Query string arguments (generally via $_GET, or as parsed via parse_str())
 * - Upload files, if any (as represented by $_FILES)
 * - Deserialized body parameters (generally from $_POST)
 *
 * $_SERVER values MUST be treated as immutable, as they represent application
 * state at the time of request; as such, no methods are provided to allow
 * modification of those values. The other values provide such methods, as they
 * can be restored from $_SERVER or the request body, and may need treatment
 * during the application (e.g., body parameters may be deserialized based on
 * content type).
 *
 * Additionally, this interface recognizes the utility of introspecting a
 * request to derive and match additional parameters (e.g., via URI path
 * matching, decrypting cookie values, deserializing non-form-encoded body
 * content, matching authorization headers to users, etc). These parameters
 * are stored in an "attributes" property.
 *
 * Requests are considered immutable; all methods that might change state MUST
 * be implemented such that they retain the internal state of the current
 * message and return an instance that contains the changed state.
 */
interface ServerRequestInterface extends RequestInterface
{
    /**
     * Retrieve server parameters.
     *
     * Retrieves data related to the incoming request environment,
     * typically derived from PHP's $_SERVER superglobal. The data IS NOT
     * REQUIRED to originate from $_SERVER.
     *
     * @return array
     */
    public function getServerParams();
    /**
     * Retrieve cookies.
     *
     * Retrieves cookies sent by the client to the server.
     *
     * The data MUST be compatible with the structure of the $_COOKIE
     * superglobal.
     *
     * @return array
     */
    public function getCookieParams();
    /**
     * Return an instance with the specified cookies.
     *
     * The data IS NOT REQUIRED to come from the $_COOKIE superglobal, but MUST
     * be compatible with the structure of $_COOKIE. Typically, this data will
     * be injected at instantiation.
     *
     * This method MUST NOT update the related Cookie header of the request
     * instance, nor related values in the server params.
     *
     * This method MUST be implemented in such a way as to retain the
     * immutability of the message, and MUST return an instance that has the
     * updated cookie values.
     *
     * @param array $cookies Array of key/value pairs representing cookies.
     * @return static
     */
    public function withCookieParams(array $cookies);
    /**
     * Retrieve query string arguments.
     *
     * Retrieves the deserialized query string arguments, if any.
     *
     * Note: the query params might not be in sync with the URI or server
     * params. If you need to ensure you are only getting the original
     * values, you may need to parse the query string from `getUri()->getQuery()`
     * or from the `QUERY_STRING` server param.
     *
     * @return array
     */
    public function getQueryParams();
    /**
     * Return an instance with the specified query string arguments.
     *
     * These values SHOULD remain immutable over the course of the incoming
     * request. They MAY be injected during instantiation, such as from PHP's
     * $_GET superglobal, or MAY be derived from some other value such as the
     * URI. In cases where the arguments are parsed from the URI, the data
     * MUST be compatible with what PHP's parse_str() would return for
     * purposes of how duplicate query parameters are handled, and how nested
     * sets are handled.
     *
     * Setting query string arguments MUST NOT change the URI stored by the
     * request, nor the values in the server params.
     *
     * This method MUST be implemented in such a way as to retain the
     * immutability of the message, and MUST return an instance that has the
     * updated query string arguments.
     *
     * @param array $query Array of query string arguments, typically from
     *     $_GET.
     * @return static
     */
    public function withQueryParams(array $query);
    /**
     * Retrieve normalized file upload data.
     *
     * This method returns upload metadata in a normalized tree, with each leaf
     * an instance of Psr\Http\Message\UploadedFileInterface.
     *
     * These values MAY be prepared from $_FILES or the message body during
     * instantiation, or MAY be injected via withUploadedFiles().
     *
     * @return array An array tree of UploadedFileInterface instances; an empty
     *     array MUST be returned if no data is present.
     */
    public function getUploadedFiles();
    /**
     * Create a new instance with the specified uploaded files.
     *
     * This method MUST be implemented in such a way as to retain the
     * immutability of the message, and MUST return an instance that has the
     * updated body parameters.
     *
     * @param array $uploadedFiles An array tree of UploadedFileInterface instances.
     * @return static
     * @throws \InvalidArgumentException if an invalid structure is provided.
     */
    public function withUploadedFiles(array $uploadedFiles);
    /**
     * Retrieve any parameters provided in the request body.
     *
     * If the request Content-Type is either application/x-www-form-urlencoded
     * or multipart/form-data, and the request method is POST, this method MUST
     * return the contents of $_POST.
     *
     * Otherwise, this method may return any results of deserializing
     * the request body content; as parsing returns structured content, the
     * potential types MUST be arrays or objects only. A null value indicates
     * the absence of body content.
     *
     * @return null|array|object The deserialized body parameters, if any.
     *     These will typically be an array or object.
     */
    public function getParsedBody();
    /**
     * Return an instance with the specified body parameters.
     *
     * These MAY be injected during instantiation.
     *
     * If the request Content-Type is either application/x-www-form-urlencoded
     * or multipart/form-data, and the request method is POST, use this method
     * ONLY to inject the contents of $_POST.
     *
     * The data IS NOT REQUIRED to come from $_POST, but MUST be the results of
     * deserializing the request body content. Deserialization/parsing returns
     * structured data, and, as such, this method ONLY accepts arrays or objects,
     * or a null value if nothing was available to parse.
     *
     * As an example, if content negotiation determines that the request data
     * is a JSON payload, this method could be used to create a request
     * instance with the deserialized parameters.
     *
     * This method MUST be implemented in such a way as to retain the
     * immutability of the message, and MUST return an instance that has the
     * updated body parameters.
     *
     * @param null|array|object $data The deserialized body data. This will
     *     typically be in an array or object.
     * @return static
     * @throws \InvalidArgumentException if an unsupported argument type is
     *     provided.
     */
    public function withParsedBody($data);
    /**
     * Retrieve attributes derived from the request.
     *
     * The request "attributes" may be used to allow injection of any
     * parameters derived from the request: e.g., the results of path
     * match operations; the results of decrypting cookies; the results of
     * deserializing non-form-encoded message bodies; etc. Attributes
     * will be application and request specific, and CAN be mutable.
     *
     * @return array Attributes derived from the request.
     */
    public function getAttributes();
    /**
     * Retrieve a single derived request attribute.
     *
     * Retrieves a single derived request attribute as described in
     * getAttributes(). If the attribute has not been previously set, returns
     * the default value as provided.
     *
     * This method obviates the need for a hasAttribute() method, as it allows
     * specifying a default value to return if the attribute is not found.
     *
     * @see getAttributes()
     * @param string $name The attribute name.
     * @param mixed $default Default value to return if the attribute does not exist.
     * @return mixed
     */
    public function getAttribute($name, $default = null);
    /**
     * Return an instance with the specified derived request attribute.
     *
     * This method allows setting a single derived request attribute as
     * described in getAttributes().
     *
     * This method MUST be implemented in such a way as to retain the
     * immutability of the message, and MUST return an instance that has the
     * updated attribute.
     *
     * @see getAttributes()
     * @param string $name The attribute name.
     * @param mixed $value The value of the attribute.
     * @return static
     */
    public function withAttribute($name, $value);
    /**
     * Return an instance that removes the specified derived request attribute.
     *
     * This method allows removing a single derived request attribute as
     * described in getAttributes().
     *
     * This method MUST be implemented in such a way as to retain the
     * immutability of the message, and MUST return an instance that removes
     * the attribute.
     *
     * @see getAttributes()
     * @param string $name The attribute name.
     * @return static
     */
    public function withoutAttribute($name);
}
<?php

namespace _PHPStan_dcc7b7cff\Psr\Http\Message;

/**
 * Representation of an outgoing, client-side request.
 *
 * Per the HTTP specification, this interface includes properties for
 * each of the following:
 *
 * - Protocol version
 * - HTTP method
 * - URI
 * - Headers
 * - Message body
 *
 * During construction, implementations MUST attempt to set the Host header from
 * a provided URI if no Host header is provided.
 *
 * Requests are considered immutable; all methods that might change state MUST
 * be implemented such that they retain the internal state of the current
 * message and return an instance that contains the changed state.
 */
interface RequestInterface extends MessageInterface
{
    /**
     * Retrieves the message's request target.
     *
     * Retrieves the message's request-target either as it will appear (for
     * clients), as it appeared at request (for servers), or as it was
     * specified for the instance (see withRequestTarget()).
     *
     * In most cases, this will be the origin-form of the composed URI,
     * unless a value was provided to the concrete implementation (see
     * withRequestTarget() below).
     *
     * If no URI is available, and no request-target has been specifically
     * provided, this method MUST return the string "/".
     *
     * @return string
     */
    public function getRequestTarget();
    /**
     * Return an instance with the specific request-target.
     *
     * If the request needs a non-origin-form request-target — e.g., for
     * specifying an absolute-form, authority-form, or asterisk-form —
     * this method may be used to create an instance with the specified
     * request-target, verbatim.
     *
     * This method MUST be implemented in such a way as to retain the
     * immutability of the message, and MUST return an instance that has the
     * changed request target.
     *
     * @link http://tools.ietf.org/html/rfc7230#section-5.3 (for the various
     *     request-target forms allowed in request messages)
     * @param mixed $requestTarget
     * @return static
     */
    public function withRequestTarget($requestTarget);
    /**
     * Retrieves the HTTP method of the request.
     *
     * @return string Returns the request method.
     */
    public function getMethod();
    /**
     * Return an instance with the provided HTTP method.
     *
     * While HTTP method names are typically all uppercase characters, HTTP
     * method names are case-sensitive and thus implementations SHOULD NOT
     * modify the given string.
     *
     * This method MUST be implemented in such a way as to retain the
     * immutability of the message, and MUST return an instance that has the
     * changed request method.
     *
     * @param string $method Case-sensitive method.
     * @return static
     * @throws \InvalidArgumentException for invalid HTTP methods.
     */
    public function withMethod($method);
    /**
     * Retrieves the URI instance.
     *
     * This method MUST return a UriInterface instance.
     *
     * @link http://tools.ietf.org/html/rfc3986#section-4.3
     * @return UriInterface Returns a UriInterface instance
     *     representing the URI of the request.
     */
    public function getUri();
    /**
     * Returns an instance with the provided URI.
     *
     * This method MUST update the Host header of the returned request by
     * default if the URI contains a host component. If the URI does not
     * contain a host component, any pre-existing Host header MUST be carried
     * over to the returned request.
     *
     * You can opt-in to preserving the original state of the Host header by
     * setting `$preserveHost` to `true`. When `$preserveHost` is set to
     * `true`, this method interacts with the Host header in the following ways:
     *
     * - If the Host header is missing or empty, and the new URI contains
     *   a host component, this method MUST update the Host header in the returned
     *   request.
     * - If the Host header is missing or empty, and the new URI does not contain a
     *   host component, this method MUST NOT update the Host header in the returned
     *   request.
     * - If a Host header is present and non-empty, this method MUST NOT update
     *   the Host header in the returned request.
     *
     * This method MUST be implemented in such a way as to retain the
     * immutability of the message, and MUST return an instance that has the
     * new UriInterface instance.
     *
     * @link http://tools.ietf.org/html/rfc3986#section-4.3
     * @param UriInterface $uri New request URI to use.
     * @param bool $preserveHost Preserve the original state of the Host header.
     * @return static
     */
    public function withUri(UriInterface $uri, $preserveHost = \false);
}
Copyright (c) 2014 PHP Framework Interoperability Group

Permission is hereby granted, free of charge, to any person obtaining a copy 
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights 
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
copies of the Software, and to permit persons to whom the Software is 
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in 
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\OndraM\CiDetector\Ci;

use _PHPStan_dcc7b7cff\OndraM\CiDetector\CiDetector;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\Env;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\TrinaryLogic;
class Jenkins extends AbstractCi
{
    public static function isDetected(Env $env) : bool
    {
        return $env->get('JENKINS_URL') !== \false;
    }
    public function getCiName() : string
    {
        return CiDetector::CI_JENKINS;
    }
    public function isPullRequest() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getBuildNumber() : string
    {
        return $this->env->getString('BUILD_NUMBER');
    }
    public function getBuildUrl() : string
    {
        return $this->env->getString('BUILD_URL');
    }
    public function getGitCommit() : string
    {
        return $this->env->getString('GIT_COMMIT');
    }
    public function getGitBranch() : string
    {
        return $this->env->getString('GIT_BRANCH');
    }
    public function getRepositoryName() : string
    {
        return '';
        // unsupported
    }
    public function getRepositoryUrl() : string
    {
        return $this->env->getString('GIT_URL');
    }
}
<?php

declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\OndraM\CiDetector\Ci;

use _PHPStan_dcc7b7cff\OndraM\CiDetector\CiDetector;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\Env;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\TrinaryLogic;
class Wercker extends AbstractCi
{
    public static function isDetected(Env $env) : bool
    {
        return $env->get('WERCKER') === 'true';
    }
    public function getCiName() : string
    {
        return CiDetector::CI_WERCKER;
    }
    public function isPullRequest() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getBuildNumber() : string
    {
        return $this->env->getString('WERCKER_RUN_ID');
    }
    public function getBuildUrl() : string
    {
        return $this->env->getString('WERCKER_RUN_URL');
    }
    public function getGitCommit() : string
    {
        return $this->env->getString('WERCKER_GIT_COMMIT');
    }
    public function getGitBranch() : string
    {
        return $this->env->getString('WERCKER_GIT_BRANCH');
    }
    public function getRepositoryName() : string
    {
        return $this->env->getString('WERCKER_GIT_OWNER') . '/' . $this->env->getString('WERCKER_GIT_REPOSITORY');
    }
    public function getRepositoryUrl() : string
    {
        return '';
        // unsupported
    }
}
<?php

declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\OndraM\CiDetector\Ci;

use _PHPStan_dcc7b7cff\OndraM\CiDetector\CiDetector;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\Env;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\TrinaryLogic;
class Buddy extends AbstractCi
{
    public static function isDetected(Env $env) : bool
    {
        return $env->get('BUDDY') !== \false;
    }
    public function getCiName() : string
    {
        return CiDetector::CI_BUDDY;
    }
    public function isPullRequest() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->env->getString('BUDDY_EXECUTION_PULL_REQUEST_ID') !== '');
    }
    public function getBuildNumber() : string
    {
        return $this->env->getString('BUDDY_EXECUTION_ID');
    }
    public function getBuildUrl() : string
    {
        return $this->env->getString('BUDDY_EXECUTION_URL');
    }
    public function getGitCommit() : string
    {
        return $this->env->getString('BUDDY_EXECUTION_REVISION');
    }
    public function getGitBranch() : string
    {
        $prBranch = $this->env->getString('BUDDY_EXECUTION_PULL_REQUEST_HEAD_BRANCH');
        if ($this->isPullRequest()->no() || empty($prBranch)) {
            return $this->env->getString('BUDDY_EXECUTION_BRANCH');
        }
        return $prBranch;
    }
    public function getRepositoryName() : string
    {
        return $this->env->getString('BUDDY_REPO_SLUG');
    }
    public function getRepositoryUrl() : string
    {
        return $this->env->getString('BUDDY_SCM_URL');
    }
}
<?php

declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\OndraM\CiDetector\Ci;

use _PHPStan_dcc7b7cff\OndraM\CiDetector\CiDetector;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\Env;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\TrinaryLogic;
class Drone extends AbstractCi
{
    public static function isDetected(Env $env) : bool
    {
        return $env->get('CI') === 'drone';
    }
    public function getCiName() : string
    {
        return CiDetector::CI_DRONE;
    }
    public function isPullRequest() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->env->getString('DRONE_PULL_REQUEST') !== '');
    }
    public function getBuildNumber() : string
    {
        return $this->env->getString('DRONE_BUILD_NUMBER');
    }
    public function getBuildUrl() : string
    {
        return $this->env->getString('DRONE_BUILD_LINK');
    }
    public function getGitCommit() : string
    {
        return $this->env->getString('DRONE_COMMIT_SHA');
    }
    public function getGitBranch() : string
    {
        return $this->env->getString('DRONE_COMMIT_BRANCH');
    }
    public function getRepositoryName() : string
    {
        return $this->env->getString('DRONE_REPO');
    }
    public function getRepositoryUrl() : string
    {
        return $this->env->getString('DRONE_REPO_LINK');
    }
}
<?php

declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\OndraM\CiDetector\Ci;

use _PHPStan_dcc7b7cff\OndraM\CiDetector\CiDetector;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\Env;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\TrinaryLogic;
class Codeship extends AbstractCi
{
    public static function isDetected(Env $env) : bool
    {
        return $env->get('CI_NAME') === 'codeship';
    }
    public function getCiName() : string
    {
        return CiDetector::CI_CODESHIP;
    }
    public function isPullRequest() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->env->getString('CI_PULL_REQUEST') !== 'false');
    }
    public function getBuildNumber() : string
    {
        return $this->env->getString('CI_BUILD_NUMBER');
    }
    public function getBuildUrl() : string
    {
        return $this->env->getString('CI_BUILD_URL');
    }
    public function getGitCommit() : string
    {
        return $this->env->getString('COMMIT_ID');
    }
    public function getGitBranch() : string
    {
        return $this->env->getString('CI_BRANCH');
    }
    public function getRepositoryName() : string
    {
        return $this->env->getString('CI_REPO_NAME');
    }
    public function getRepositoryUrl() : string
    {
        return '';
        // unsupported
    }
}
<?php

declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\OndraM\CiDetector\Ci;

use _PHPStan_dcc7b7cff\OndraM\CiDetector\CiDetector;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\Env;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\TrinaryLogic;
class Bamboo extends AbstractCi
{
    public static function isDetected(Env $env) : bool
    {
        return $env->get('bamboo_buildKey') !== \false;
    }
    public function getCiName() : string
    {
        return CiDetector::CI_BAMBOO;
    }
    public function isPullRequest() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->env->get('bamboo_repository_pr_key') !== \false);
    }
    public function getBuildNumber() : string
    {
        return $this->env->getString('bamboo_buildNumber');
    }
    public function getBuildUrl() : string
    {
        return $this->env->getString('bamboo_resultsUrl');
    }
    public function getGitCommit() : string
    {
        return $this->env->getString('bamboo_planRepository_revision');
    }
    public function getGitBranch() : string
    {
        $prBranch = $this->env->getString('bamboo_repository_pr_sourceBranch');
        if ($this->isPullRequest()->no() || empty($prBranch)) {
            return $this->env->getString('bamboo_planRepository_branch');
        }
        return $prBranch;
    }
    public function getRepositoryName() : string
    {
        return $this->env->getString('bamboo_planRepository_name');
    }
    public function getRepositoryUrl() : string
    {
        return $this->env->getString('bamboo_planRepository_repositoryUrl');
    }
}
<?php

declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\OndraM\CiDetector\Ci;

use _PHPStan_dcc7b7cff\OndraM\CiDetector\CiDetector;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\Env;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\TrinaryLogic;
class AppVeyor extends AbstractCi
{
    public static function isDetected(Env $env) : bool
    {
        return $env->get('APPVEYOR') === 'True';
    }
    public function getCiName() : string
    {
        return CiDetector::CI_APPVEYOR;
    }
    public function isPullRequest() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->env->getString('APPVEYOR_PULL_REQUEST_NUMBER') !== '');
    }
    public function getBuildNumber() : string
    {
        return $this->env->getString('APPVEYOR_BUILD_NUMBER');
    }
    public function getBuildUrl() : string
    {
        return \sprintf('%s/project/%s/%s/builds/%s', $this->env->get('APPVEYOR_URL'), $this->env->get('APPVEYOR_ACCOUNT_NAME'), $this->env->get('APPVEYOR_PROJECT_SLUG'), $this->env->get('APPVEYOR_BUILD_ID'));
    }
    public function getGitCommit() : string
    {
        return $this->env->getString('APPVEYOR_REPO_COMMIT');
    }
    public function getGitBranch() : string
    {
        $prBranch = $this->env->getString('APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH');
        if ($this->isPullRequest()->no() || empty($prBranch)) {
            return $this->env->getString('APPVEYOR_REPO_BRANCH');
        }
        return $prBranch;
    }
    public function getRepositoryName() : string
    {
        return $this->env->getString('APPVEYOR_REPO_NAME');
    }
    public function getRepositoryUrl() : string
    {
        return '';
        // unsupported
    }
}
<?php

declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\OndraM\CiDetector\Ci;

use _PHPStan_dcc7b7cff\OndraM\CiDetector\CiDetector;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\Env;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\TrinaryLogic;
class Travis extends AbstractCi
{
    public const TRAVIS_BASE_URL = 'https://travis-ci.org';
    public static function isDetected(Env $env) : bool
    {
        return $env->get('TRAVIS') !== \false;
    }
    public function getCiName() : string
    {
        return CiDetector::CI_TRAVIS;
    }
    public function isPullRequest() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->env->getString('TRAVIS_PULL_REQUEST') !== 'false');
    }
    public function getBuildNumber() : string
    {
        return $this->env->getString('TRAVIS_JOB_NUMBER');
    }
    public function getBuildUrl() : string
    {
        return \sprintf('%s/%s/jobs/%s', self::TRAVIS_BASE_URL, $this->env->get('TRAVIS_REPO_SLUG'), $this->env->get('TRAVIS_JOB_ID'));
    }
    public function getGitCommit() : string
    {
        return $this->env->getString('TRAVIS_COMMIT');
    }
    public function getGitBranch() : string
    {
        if ($this->isPullRequest()->no()) {
            return $this->env->getString('TRAVIS_BRANCH');
        }
        // If the build is for PR, return name of the branch with the PR, not the target PR branch
        // https://github.com/travis-ci/travis-ci/issues/6652
        return $this->env->getString('TRAVIS_PULL_REQUEST_BRANCH');
    }
    public function getRepositoryName() : string
    {
        return $this->env->getString('TRAVIS_REPO_SLUG');
    }
    public function getRepositoryUrl() : string
    {
        return '';
        // unsupported
    }
}
<?php

declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\OndraM\CiDetector\Ci;

use _PHPStan_dcc7b7cff\OndraM\CiDetector\Env;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\TrinaryLogic;
interface CiInterface
{
    /**
     * Return true if this CI was detected
     */
    public static function isDetected(Env $env) : bool;
    /**
     * Get name of the CI server type
     */
    public function getCiName() : string;
    /**
     * Returned TrinaryLogic object's value will be true if the current build is from a pull/merge request,
     * false if it not, and maybe if we can't determine it.
     */
    public function isPullRequest() : TrinaryLogic;
    /**
     * Get number of this concrete build.
     *
     * Build number is usually increasing number sequence. It should increase each time this this particular job
     * was run on the CI server. Most CIs use simple numbering sequence like: 1, 2, 3...
     */
    public function getBuildNumber() : string;
    /**
     * Get URL to this build
     */
    public function getBuildUrl() : string;
    /**
     * Get git commit being built
     */
    public function getGitCommit() : string;
    /**
     * Get name of the git branch which is being built
     */
    public function getGitBranch() : string;
    /**
     * Get name of the git repository which is being built
     */
    public function getRepositoryName() : string;
    /**
     * Get URL of the git repository which is being built
     */
    public function getRepositoryUrl() : string;
}
<?php

declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\OndraM\CiDetector\Ci;

use _PHPStan_dcc7b7cff\OndraM\CiDetector\CiDetector;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\Env;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\TrinaryLogic;
class AwsCodeBuild extends AbstractCi
{
    public static function isDetected(Env $env) : bool
    {
        return $env->get('CODEBUILD_CI') !== \false;
    }
    public function getCiName() : string
    {
        return CiDetector::CI_AWS_CODEBUILD;
    }
    public function isPullRequest() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean(\mb_strpos($this->env->getString('CODEBUILD_WEBHOOK_EVENT'), 'PULL_REQUEST') === 0);
    }
    public function getBuildNumber() : string
    {
        return $this->env->getString('CODEBUILD_BUILD_NUMBER');
    }
    public function getBuildUrl() : string
    {
        return $this->env->getString('CODEBUILD_BUILD_URL');
    }
    public function getGitCommit() : string
    {
        return $this->env->getString('CODEBUILD_RESOLVED_SOURCE_VERSION');
    }
    public function getGitBranch() : string
    {
        $gitReference = $this->env->getString('CODEBUILD_WEBHOOK_HEAD_REF');
        return \preg_replace('~^refs/heads/~', '', $gitReference) ?? '';
    }
    public function getRepositoryName() : string
    {
        return '';
        // unsupported
    }
    public function getRepositoryUrl() : string
    {
        return $this->env->getString('CODEBUILD_SOURCE_REPO_URL');
    }
}
<?php

declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\OndraM\CiDetector\Ci;

use _PHPStan_dcc7b7cff\OndraM\CiDetector\CiDetector;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\Env;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\TrinaryLogic;
class Continuousphp extends AbstractCi
{
    public static function isDetected(Env $env) : bool
    {
        return $env->get('CONTINUOUSPHP') === 'continuousphp';
    }
    public function getCiName() : string
    {
        return CiDetector::CI_CONTINUOUSPHP;
    }
    public function isPullRequest() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->env->getString('CPHP_PR_ID') !== '');
    }
    public function getBuildNumber() : string
    {
        return $this->env->getString('CPHP_BUILD_ID');
    }
    public function getBuildUrl() : string
    {
        return $this->env->getString('');
    }
    public function getGitCommit() : string
    {
        return $this->env->getString('CPHP_GIT_COMMIT');
    }
    public function getGitBranch() : string
    {
        $gitReference = $this->env->getString('CPHP_GIT_REF');
        return \preg_replace('~^refs/heads/~', '', $gitReference) ?? '';
    }
    public function getRepositoryName() : string
    {
        return '';
        // unsupported
    }
    public function getRepositoryUrl() : string
    {
        return $this->env->getString('');
    }
}
<?php

declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\OndraM\CiDetector\Ci;

use _PHPStan_dcc7b7cff\OndraM\CiDetector\CiDetector;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\Env;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\TrinaryLogic;
class GitLab extends AbstractCi
{
    public static function isDetected(Env $env) : bool
    {
        return $env->get('GITLAB_CI') !== \false;
    }
    public function getCiName() : string
    {
        return CiDetector::CI_GITLAB;
    }
    public function isPullRequest() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->env->get('CI_MERGE_REQUEST_ID') !== \false || $this->env->get('CI_EXTERNAL_PULL_REQUEST_IID') !== \false);
    }
    public function getBuildNumber() : string
    {
        return !empty($this->env->getString('CI_JOB_ID')) ? $this->env->getString('CI_JOB_ID') : $this->env->getString('CI_BUILD_ID');
    }
    public function getBuildUrl() : string
    {
        return $this->env->getString('CI_PROJECT_URL') . '/builds/' . $this->getBuildNumber();
    }
    public function getGitCommit() : string
    {
        return !empty($this->env->getString('CI_COMMIT_SHA')) ? $this->env->getString('CI_COMMIT_SHA') : $this->env->getString('CI_BUILD_REF');
    }
    public function getGitBranch() : string
    {
        return !empty($this->env->getString('CI_COMMIT_REF_NAME')) ? $this->env->getString('CI_COMMIT_REF_NAME') : $this->env->getString('CI_BUILD_REF_NAME');
    }
    public function getRepositoryName() : string
    {
        return $this->env->getString('CI_PROJECT_PATH');
    }
    public function getRepositoryUrl() : string
    {
        return !empty($this->env->getString('CI_REPOSITORY_URL')) ? $this->env->getString('CI_REPOSITORY_URL') : $this->env->getString('CI_BUILD_REPO');
    }
}
<?php

declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\OndraM\CiDetector\Ci;

use _PHPStan_dcc7b7cff\OndraM\CiDetector\Env;
/**
 * Unified adapter to retrieve environment variables from current continuous integration server
 */
abstract class AbstractCi implements CiInterface
{
    /** @var Env */
    protected $env;
    public function __construct(Env $env)
    {
        $this->env = $env;
    }
}
<?php

declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\OndraM\CiDetector\Ci;

use _PHPStan_dcc7b7cff\OndraM\CiDetector\CiDetector;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\Env;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\TrinaryLogic;
class GitHubActions extends AbstractCi
{
    public const GITHUB_BASE_URL = 'https://github.com';
    public static function isDetected(Env $env) : bool
    {
        return $env->get('GITHUB_ACTIONS') !== \false;
    }
    public function getCiName() : string
    {
        return CiDetector::CI_GITHUB_ACTIONS;
    }
    public function isPullRequest() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->env->getString('GITHUB_EVENT_NAME') === 'pull_request');
    }
    public function getBuildNumber() : string
    {
        return $this->env->getString('GITHUB_RUN_NUMBER');
    }
    public function getBuildUrl() : string
    {
        return \sprintf('%s/%s/commit/%s/checks', self::GITHUB_BASE_URL, $this->env->get('GITHUB_REPOSITORY'), $this->env->get('GITHUB_SHA'));
    }
    public function getGitCommit() : string
    {
        return $this->env->getString('GITHUB_SHA');
    }
    public function getGitBranch() : string
    {
        $prBranch = $this->env->getString('GITHUB_HEAD_REF');
        if ($this->isPullRequest()->no() || empty($prBranch)) {
            $gitReference = $this->env->getString('GITHUB_REF');
            return \preg_replace('~^refs/heads/~', '', $gitReference) ?? '';
        }
        return $prBranch;
    }
    public function getRepositoryName() : string
    {
        return $this->env->getString('GITHUB_REPOSITORY');
    }
    public function getRepositoryUrl() : string
    {
        return \sprintf('%s/%s', self::GITHUB_BASE_URL, $this->env->get('GITHUB_REPOSITORY'));
    }
}
<?php

declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\OndraM\CiDetector\Ci;

use _PHPStan_dcc7b7cff\OndraM\CiDetector\CiDetector;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\Env;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\TrinaryLogic;
class BitbucketPipelines extends AbstractCi
{
    public static function isDetected(Env $env) : bool
    {
        return $env->get('BITBUCKET_COMMIT') !== \false;
    }
    public function getCiName() : string
    {
        return CiDetector::CI_BITBUCKET_PIPELINES;
    }
    public function isPullRequest() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->env->getString('BITBUCKET_PR_ID') !== '');
    }
    public function getBuildNumber() : string
    {
        return $this->env->getString('BITBUCKET_BUILD_NUMBER');
    }
    public function getBuildUrl() : string
    {
        return \sprintf('%s/addon/pipelines/home#!/results/%s', $this->env->get('BITBUCKET_GIT_HTTP_ORIGIN'), $this->env->get('BITBUCKET_BUILD_NUMBER'));
    }
    public function getGitCommit() : string
    {
        return $this->env->getString('BITBUCKET_COMMIT');
    }
    public function getGitBranch() : string
    {
        return $this->env->getString('BITBUCKET_BRANCH');
    }
    public function getRepositoryName() : string
    {
        return $this->env->getString('BITBUCKET_REPO_FULL_NAME');
    }
    public function getRepositoryUrl() : string
    {
        return \sprintf('ssh://%s', $this->env->get('BITBUCKET_GIT_SSH_ORIGIN'));
    }
}
<?php

declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\OndraM\CiDetector\Ci;

use _PHPStan_dcc7b7cff\OndraM\CiDetector\CiDetector;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\Env;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\TrinaryLogic;
class Circle extends AbstractCi
{
    public static function isDetected(Env $env) : bool
    {
        return $env->get('CIRCLECI') !== \false;
    }
    public function getCiName() : string
    {
        return CiDetector::CI_CIRCLE;
    }
    public function isPullRequest() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->env->getString('CI_PULL_REQUEST') !== '');
    }
    public function getBuildNumber() : string
    {
        return $this->env->getString('CIRCLE_BUILD_NUM');
    }
    public function getBuildUrl() : string
    {
        return $this->env->getString('CIRCLE_BUILD_URL');
    }
    public function getGitCommit() : string
    {
        return $this->env->getString('CIRCLE_SHA1');
    }
    public function getGitBranch() : string
    {
        return $this->env->getString('CIRCLE_BRANCH');
    }
    public function getRepositoryName() : string
    {
        return \sprintf('%s/%s', $this->env->getString('CIRCLE_PROJECT_USERNAME'), $this->env->getString('CIRCLE_PROJECT_REPONAME'));
    }
    public function getRepositoryUrl() : string
    {
        return $this->env->getString('CIRCLE_REPOSITORY_URL');
    }
}
<?php

declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\OndraM\CiDetector\Ci;

use _PHPStan_dcc7b7cff\OndraM\CiDetector\CiDetector;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\Env;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\TrinaryLogic;
class TeamCity extends AbstractCi
{
    public static function isDetected(Env $env) : bool
    {
        return $env->get('TEAMCITY_VERSION') !== \false;
    }
    public function getCiName() : string
    {
        return CiDetector::CI_TEAMCITY;
    }
    public function isPullRequest() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getBuildNumber() : string
    {
        return $this->env->getString('BUILD_NUMBER');
    }
    public function getBuildUrl() : string
    {
        return '';
        // unsupported
    }
    public function getGitCommit() : string
    {
        return $this->env->getString('BUILD_VCS_NUMBER');
    }
    public function getGitBranch() : string
    {
        return '';
        // unsupported
    }
    public function getRepositoryName() : string
    {
        return '';
        // unsupported
    }
    public function getRepositoryUrl() : string
    {
        return '';
        // unsupported
    }
}
<?php

declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\OndraM\CiDetector\Exception;

class CiNotDetectedException extends \RuntimeException
{
}
<?php

declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\OndraM\CiDetector;

use _PHPStan_dcc7b7cff\OndraM\CiDetector\Ci\CiInterface;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\Exception\CiNotDetectedException;
/**
 * Unified way to get environment variables from current continuous integration server
 */
class CiDetector
{
    public const CI_APPVEYOR = 'AppVeyor';
    public const CI_AWS_CODEBUILD = 'AWS CodeBuild';
    public const CI_BAMBOO = 'Bamboo';
    public const CI_BITBUCKET_PIPELINES = 'Bitbucket Pipelines';
    public const CI_BUDDY = 'Buddy';
    public const CI_CIRCLE = 'CircleCI';
    public const CI_CODESHIP = 'Codeship';
    public const CI_CONTINUOUSPHP = 'continuousphp';
    public const CI_DRONE = 'drone';
    public const CI_GITHUB_ACTIONS = 'GitHub Actions';
    public const CI_GITLAB = 'GitLab';
    public const CI_JENKINS = 'Jenkins';
    public const CI_TEAMCITY = 'TeamCity';
    public const CI_TRAVIS = 'Travis CI';
    public const CI_WERCKER = 'Wercker';
    /** @var Env */
    private $environment;
    public function __construct()
    {
        $this->environment = new Env();
    }
    public static function fromEnvironment(Env $environment) : self
    {
        $detector = new static();
        $detector->environment = $environment;
        return $detector;
    }
    /**
     * Is current environment an recognized CI server?
     */
    public function isCiDetected() : bool
    {
        $ciServer = $this->detectCurrentCiServer();
        return $ciServer !== null;
    }
    /**
     * Detect current CI server and return instance of its settings
     *
     * @throws CiNotDetectedException
     */
    public function detect() : CiInterface
    {
        $ciServer = $this->detectCurrentCiServer();
        if ($ciServer === null) {
            throw new CiNotDetectedException('No CI server detected in current environment');
        }
        return $ciServer;
    }
    /**
     * @return string[]
     */
    protected function getCiServers() : array
    {
        return [Ci\AppVeyor::class, Ci\AwsCodeBuild::class, Ci\Bamboo::class, Ci\BitbucketPipelines::class, Ci\Buddy::class, Ci\Circle::class, Ci\Codeship::class, Ci\Continuousphp::class, Ci\Drone::class, Ci\GitHubActions::class, Ci\GitLab::class, Ci\Jenkins::class, Ci\TeamCity::class, Ci\Travis::class, Ci\Wercker::class];
    }
    protected function detectCurrentCiServer() : ?CiInterface
    {
        $ciServers = $this->getCiServers();
        foreach ($ciServers as $ciClass) {
            $callback = [$ciClass, 'isDetected'];
            if (\is_callable($callback)) {
                if ($callback($this->environment)) {
                    return new $ciClass($this->environment);
                }
            }
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\OndraM\CiDetector;

/**
 * @see https://en.wikipedia.org/wiki/Three-valued_logic
 * @see https://github.com/phpstan/phpstan-src/blob/cedc99f51f7b8d815036e983166d7cb51ab46734/src/TrinaryLogic.php
 *
 * @internal
 */
final class TrinaryLogic
{
    private const YES = 1;
    private const MAYBE = 0;
    private const NO = -1;
    /** @var self[] */
    private static $registry = [];
    /** @var int */
    private $value;
    private function __construct(int $value)
    {
        $this->value = $value;
    }
    public static function createMaybe() : self
    {
        return self::create(self::MAYBE);
    }
    public static function createFromBoolean(bool $value) : self
    {
        return self::create($value ? self::YES : self::NO);
    }
    private static function create(int $value) : self
    {
        return self::$registry[$value] = self::$registry[$value] ?? new self($value);
    }
    /**
     * Return true if its known for sure that the value is true
     */
    public function yes() : bool
    {
        return $this->value === self::YES;
    }
    /**
     * Return true if its not known for sure whether the value is true or false
     */
    public function maybe() : bool
    {
        return $this->value === self::MAYBE;
    }
    /**
     * Return true if its known for sure that the value is false
     */
    public function no() : bool
    {
        return $this->value === self::NO;
    }
    /**
     * Return string representation of the value.
     * "Yes" when the value is true, "No" when its false, "Maybe" when its not known for sure whether its true or false.
     */
    public function describe() : string
    {
        static $labels = [self::NO => 'No', self::MAYBE => 'Maybe', self::YES => 'Yes'];
        return $labels[$this->value];
    }
}
<?php

declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\OndraM\CiDetector;

/**
 * Encapsulate access to the environment variables
 */
class Env
{
    /**
     * @return string|false Environment variable value or false if the variable does not exist
     */
    public function get(string $name)
    {
        return \getenv($name);
    }
    public function getString(string $name) : string
    {
        return (string) $this->get($name);
    }
}
<?php

namespace _PHPStan_dcc7b7cff\Fig\Http\Message;

/**
 * Defines constants for common HTTP request methods.
 *
 * Usage:
 *
 * <code>
 * class RequestFactory implements RequestMethodInterface
 * {
 *     public static function factory(
 *         $uri = '/',
 *         $method = self::METHOD_GET,
 *         $data = []
 *     ) {
 *     }
 * }
 * </code>
 */
interface RequestMethodInterface
{
    const METHOD_HEAD = 'HEAD';
    const METHOD_GET = 'GET';
    const METHOD_POST = 'POST';
    const METHOD_PUT = 'PUT';
    const METHOD_PATCH = 'PATCH';
    const METHOD_DELETE = 'DELETE';
    const METHOD_PURGE = 'PURGE';
    const METHOD_OPTIONS = 'OPTIONS';
    const METHOD_TRACE = 'TRACE';
    const METHOD_CONNECT = 'CONNECT';
}
<?php

namespace _PHPStan_dcc7b7cff\Fig\Http\Message;

/**
 * Defines constants for common HTTP status code.
 *
 * @see https://tools.ietf.org/html/rfc2295#section-8.1
 * @see https://tools.ietf.org/html/rfc2324#section-2.3
 * @see https://tools.ietf.org/html/rfc2518#section-9.7
 * @see https://tools.ietf.org/html/rfc2774#section-7
 * @see https://tools.ietf.org/html/rfc3229#section-10.4
 * @see https://tools.ietf.org/html/rfc4918#section-11
 * @see https://tools.ietf.org/html/rfc5842#section-7.1
 * @see https://tools.ietf.org/html/rfc5842#section-7.2
 * @see https://tools.ietf.org/html/rfc6585#section-3
 * @see https://tools.ietf.org/html/rfc6585#section-4
 * @see https://tools.ietf.org/html/rfc6585#section-5
 * @see https://tools.ietf.org/html/rfc6585#section-6
 * @see https://tools.ietf.org/html/rfc7231#section-6
 * @see https://tools.ietf.org/html/rfc7238#section-3
 * @see https://tools.ietf.org/html/rfc7725#section-3
 * @see https://tools.ietf.org/html/rfc7540#section-9.1.2
 * @see https://tools.ietf.org/html/rfc8297#section-2
 * @see https://tools.ietf.org/html/rfc8470#section-7
 * Usage:
 *
 * <code>
 * class ResponseFactory implements StatusCodeInterface
 * {
 *     public function createResponse($code = self::STATUS_OK)
 *     {
 *     }
 * }
 * </code>
 */
interface StatusCodeInterface
{
    // Informational 1xx
    const STATUS_CONTINUE = 100;
    const STATUS_SWITCHING_PROTOCOLS = 101;
    const STATUS_PROCESSING = 102;
    const STATUS_EARLY_HINTS = 103;
    // Successful 2xx
    const STATUS_OK = 200;
    const STATUS_CREATED = 201;
    const STATUS_ACCEPTED = 202;
    const STATUS_NON_AUTHORITATIVE_INFORMATION = 203;
    const STATUS_NO_CONTENT = 204;
    const STATUS_RESET_CONTENT = 205;
    const STATUS_PARTIAL_CONTENT = 206;
    const STATUS_MULTI_STATUS = 207;
    const STATUS_ALREADY_REPORTED = 208;
    const STATUS_IM_USED = 226;
    // Redirection 3xx
    const STATUS_MULTIPLE_CHOICES = 300;
    const STATUS_MOVED_PERMANENTLY = 301;
    const STATUS_FOUND = 302;
    const STATUS_SEE_OTHER = 303;
    const STATUS_NOT_MODIFIED = 304;
    const STATUS_USE_PROXY = 305;
    const STATUS_RESERVED = 306;
    const STATUS_TEMPORARY_REDIRECT = 307;
    const STATUS_PERMANENT_REDIRECT = 308;
    // Client Errors 4xx
    const STATUS_BAD_REQUEST = 400;
    const STATUS_UNAUTHORIZED = 401;
    const STATUS_PAYMENT_REQUIRED = 402;
    const STATUS_FORBIDDEN = 403;
    const STATUS_NOT_FOUND = 404;
    const STATUS_METHOD_NOT_ALLOWED = 405;
    const STATUS_NOT_ACCEPTABLE = 406;
    const STATUS_PROXY_AUTHENTICATION_REQUIRED = 407;
    const STATUS_REQUEST_TIMEOUT = 408;
    const STATUS_CONFLICT = 409;
    const STATUS_GONE = 410;
    const STATUS_LENGTH_REQUIRED = 411;
    const STATUS_PRECONDITION_FAILED = 412;
    const STATUS_PAYLOAD_TOO_LARGE = 413;
    const STATUS_URI_TOO_LONG = 414;
    const STATUS_UNSUPPORTED_MEDIA_TYPE = 415;
    const STATUS_RANGE_NOT_SATISFIABLE = 416;
    const STATUS_EXPECTATION_FAILED = 417;
    const STATUS_IM_A_TEAPOT = 418;
    const STATUS_MISDIRECTED_REQUEST = 421;
    const STATUS_UNPROCESSABLE_ENTITY = 422;
    const STATUS_LOCKED = 423;
    const STATUS_FAILED_DEPENDENCY = 424;
    const STATUS_TOO_EARLY = 425;
    const STATUS_UPGRADE_REQUIRED = 426;
    const STATUS_PRECONDITION_REQUIRED = 428;
    const STATUS_TOO_MANY_REQUESTS = 429;
    const STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE = 431;
    const STATUS_UNAVAILABLE_FOR_LEGAL_REASONS = 451;
    // Server Errors 5xx
    const STATUS_INTERNAL_SERVER_ERROR = 500;
    const STATUS_NOT_IMPLEMENTED = 501;
    const STATUS_BAD_GATEWAY = 502;
    const STATUS_SERVICE_UNAVAILABLE = 503;
    const STATUS_GATEWAY_TIMEOUT = 504;
    const STATUS_VERSION_NOT_SUPPORTED = 505;
    const STATUS_VARIANT_ALSO_NEGOTIATES = 506;
    const STATUS_INSUFFICIENT_STORAGE = 507;
    const STATUS_LOOP_DETECTED = 508;
    const STATUS_NOT_EXTENDED = 510;
    const STATUS_NETWORK_AUTHENTICATION_REQUIRED = 511;
}
Copyright (c) 2016 PHP Framework Interoperability Group

Permission is hereby granted, free of charge, to any person obtaining a copy 
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights 
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
copies of the Software, and to permit persons to whom the Software is 
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in 
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

use JetBrains\PhpStorm\ExpectedValues;

/**
 * Read a size of file created by applying a binary diff
 * @link https://www.php.net/manual/en/function.xdiff-file-bdiff-size.php
 * @param string $file The path to the binary patch created by xdiff_string_bdiff() or xdiff_string_rabdiff() function
 * @return int the size of file that would be created.
 */
function xdiff_file_bdiff_size(string $file): int {}

/**
 * Make binary diff of two files
 * @link https://www.php.net/manual/en/function.xdiff-file-bdiff.php
 * @param string $old_file Path to the first file. This file acts as "old" file.
 * @param string $new_file Path to the second file. This file acts as "new" file.
 * @param string $dest Path of the resulting patch file. Resulting file contains differences between
 * "old" and "new" files. It is in binary format and is human-unreadable.
 * @return bool true on success or false on failure.
 */
function xdiff_file_bdiff(string $old_file, string $new_file, string $dest): bool {}

/**
 * Patch a file with a binary diff
 * @link https://www.php.net/manual/en/function.xdiff-file-bpatch.php
 * @param string $file The original file.
 * @param string $patch The binary patch file.
 * @param string $dest Path of the resulting file.
 * @return bool true on success or false on failure.
 */
function xdiff_file_bpatch(string $file, string $patch, string $dest): bool {}

/**
 * Alias of xdiff_file_bdiff
 * @link https://www.php.net/manual/en/function.xdiff-file-diff-binary.php
 * @param string $old_file Path to the first file. This file acts as "old" file.
 * @param string $new_file Path to the second file. This file acts as "new" file.
 * @param string $dest Path of the resulting patch file. Resulting file contains differences between
 * "old" and "new" files. It is in binary format and is human-unreadable.
 * @return bool true on success or false on failure.
 */
function xdiff_file_diff_binary(string $old_file, string $new_file, string $dest): bool {}

/**
 * Make unified diff of two files
 * @link https://www.php.net/manual/en/function.xdiff-file-diff.php
 * @param string $old_file Path to the first file. This file acts as "old" file.
 * @param string $new_file Path to the second file. This file acts as "new" file.
 * @param string $dest Path of the resulting patch file.
 * @param int $context Indicates how many lines of context you want to include in diff result.
 * @param bool $minimal Set this parameter to true if you want to minimalize size of the result (can take a long time).
 * @return bool true on success or false on failure.
 */
function xdiff_file_diff(
    string $old_file,
    string $new_file,
    string $dest,
    int $context = 3,
    bool $minimal = false
): bool {}

/**
 * Merge 3 files into one
 * @link https://www.php.net/manual/en/function.xdiff-file-merge3.php
 * @param string $old_file Path to the first file. It acts as "old" file.
 * @param string $new_file1 Path to the second file. It acts as modified version of old_file.
 * @param string $new_file2 Path to the third file. It acts as modified version of old_file.
 * @param string $dest Path of the resulting file, containing merged changed from both new_file1 and new_file2.
 * @return bool|string true if merge was successful, string with rejected chunks if it was not or false if an internal
 * error happened.
 */
function xdiff_file_merge3(string $old_file, string $new_file1, string $new_file2, string $dest) {}

/**
 * Alias of xdiff_file_bpatch
 * @link https://www.php.net/manual/en/function.xdiff-file-patch-binary.php
 * @param string $file The original file.
 * @param string $patch The binary patch file.
 * @param string $dest Path of the resulting file.
 * @return bool true on success or false on failure.
 */
function xdiff_file_patch_binary(string $file, string $patch, string $dest): bool {}

/**
 * Patch a file with an unified diff
 * @link https://www.php.net/manual/en/function.xdiff-file-patch.php
 * @param string $file The original file.
 * @param string $patch The unified patch file. It has to be created using xdiff_string_diff(), xdiff_file_diff()
 * functions or compatible tools.
 * @param string $dest Path of the resulting file.
 * @param int $flags Can be either XDIFF_PATCH_NORMAL (default mode, normal patch) or XDIFF_PATCH_REVERSE
 * (reversed patch). Starting from version 1.5.0, you can also use binary OR to enable XDIFF_PATCH_IGNORESPACE flag.
 * @return bool|string false if an internal error happened, string with rejected chunks if patch couldn't be applied
 * or true if patch has been successfully applied.
 */
function xdiff_file_patch(string $file, string $patch, string $dest, #[ExpectedValues([XDIFF_PATCH_NORMAL|XDIFF_PATCH_REVERSE|XDIFF_PATCH_IGNORESPACE])] int $flags = XDIFF_PATCH_NORMAL) {}

/**
 * Make binary diff of two files using the Rabin's polynomial fingerprinting algorithm
 * @link https://www.php.net/manual/en/function.xdiff-file-rabdiff.php
 * @param string $old_file Path to the first file. This file acts as "old" file.
 * @param string $new_file Path to the second file. This file acts as "new" file.
 * @param string $dest Path of the resulting patch file. Resulting file contains differences between "old"
 * and "new" files. It is in binary format and is human-unreadable.
 * @return bool true on success or false on failure.
 */
function xdiff_file_rabdiff(string $old_file, string $new_file, string $dest): bool {}

/**
 * Read a size of file created by applying a binary diff
 * @link https://www.php.net/manual/en/function.xdiff-string-bdiff-size.php
 * @param string $patch The binary patch created by xdiff_string_bdiff() or xdiff_string_rabdiff() function.
 * @return int the size of file that would be created.
 */
function xdiff_string_bdiff_size(string $patch): int {}

/**
 * Make binary diff of two strings
 * @link https://www.php.net/manual/en/function.xdiff-string-bdiff.php
 * @param string $old_data First string with binary data. It acts as "old" data.
 * @param string $new_data Second string with binary data. It acts as "new" data.
 * @return string|false string with binary diff containing differences between "old" and "new" data or false
 * if an internal error occurred.
 */
function xdiff_string_bdiff(string $old_data, string $new_data) {}

/**
 * Patch a string with a binary diff
 * @link https://www.php.net/manual/en/function.xdiff-string-bpatch.php
 * @param string $str The original binary string.
 * @param string $patch The binary patch string.
 * @return string|false the patched string, or false on error.
 */
function xdiff_string_bpatch(string $str, string $patch) {}

/**
 * Alias of xdiff_string_bdiff
 * @link https://www.php.net/manual/en/function.xdiff-string-diff-binary.php
 * @param string $old_data First string with binary data. It acts as "old" data.
 * @param string $new_data Second string with binary data. It acts as "new" data.
 * @return string|false string with result or false if an internal error happened.
 */
function xdiff_string_diff_binary(string $old_data, string $new_data) {}

/**
 * Make unified diff of two strings
 * @link https://www.php.net/manual/en/function.xdiff-string-diff.php
 * @param string $old_data First string with data. It acts as "old" data.
 * @param string $new_data Second string with data. It acts as "new" data.
 * @param int $context Indicates how many lines of context you want to include in the diff result.
 * @param bool $minimal Set this parameter to true if you want to minimalize the size of the result
 * (can take a long time).
 * @return string|false string with resulting diff or false if an internal error happened.
 */
function xdiff_string_diff(string $old_data, string $new_data, int $context = 3, bool $minimal = false) {}

/**
 * Merge 3 strings into one
 * @link https://www.php.net/manual/en/function.xdiff-string-merge3.php
 * @param string $old_data First string with data. It acts as "old" data.
 * @param string $new_data1 Second string with data. It acts as modified version of old_data.
 * @param string $new_data2 Third string with data. It acts as modified version of old_data.
 * @param ?string $error If provided then rejected parts are stored inside this variable.
 * @return bool|string the merged string, false if an internal error happened, or true if merged string is empty.
 */
function xdiff_string_merge3(string $old_data, string $new_data1, string $new_data2, ?string &$error) {}

/**
 * Alias of xdiff_string_bpatch
 * @link https://www.php.net/manual/en/function.xdiff-string-patch-binary.php
 * @param string $str The original binary string.
 * @param string $patch The binary patch string.
 * @return string|false the patched string, or false on error.
 */
function xdiff_string_patch_binary(string $str, string $patch) {}

/**
 * Patch a string with an unified diff
 * @link https://www.php.net/manual/en/function.xdiff-string-patch.php
 * @param string $str The original string.
 * @param string $patch The unified patch string. It has to be created using xdiff_string_diff(), xdiff_file_diff()
 * functions or compatible tools.
 * @param ?int $flags flags can be either XDIFF_PATCH_NORMAL (default mode, normal patch) or XDIFF_PATCH_REVERSE
 * (reversed patch). Starting from version 1.5.0, you can also use binary OR to enable XDIFF_PATCH_IGNORESPACE flag.
 * @param ?string $error If provided then rejected parts are stored inside this variable.
 * @return string|false the patched string, or false on error.
 */
function xdiff_string_patch(string $str, string $patch, #[ExpectedValues([XDIFF_PATCH_NORMAL|XDIFF_PATCH_REVERSE|XDIFF_PATCH_IGNORESPACE])] ?int $flags, ?string &$error) {}

/**
 * Make binary diff of two strings using the Rabin's polynomial fingerprinting algorithm
 * @link https://www.php.net/manual/en/function.xdiff-string-rabdiff.php
 * @param string $old_data First string with binary data. It acts as "old" data.
 * @param string $new_data Second string with binary data. It acts as "new" data.
 * @return string|false string with binary diff containing differences between "old" and "new" data or false if an internal error occurred.
 */
function xdiff_string_rabdiff(string $old_data, string $new_data) {}

define('XDIFF_PATCH_NORMAL', 0);
define('XDIFF_PATCH_REVERSE', 0);
define('XDIFF_PATCH_IGNORESPACE', 0);
<?php

namespace JetBrains\PhpStorm;

use Attribute;

/**
 * The attribute specifies the expected values of an entity: return values for functions and arguments' values for methods.
 *
 * If the attribute is applied, PhpStorm assumes that only the arguments specified in the attribute constructor can
 * be passed/returned. This will affect the following:
 * <ul>
 * <li><i>Code completion</i> - expected arguments are displayed on the top of the suggestions list when used in comparison expressions</li>
 * <li><i>Inspections [when used in a comparison with a value/assignment to/return from method]</i> - the element absent from the expected values list produces the inspection warning</li>
 * <li><i>Code generation</i> - for example, when generating the 'switch' statement, all possible expected values are inserted automatically</li>
 * </ul>
 *
 * Expected values can be any of the following:
 * <ul>
 * <li>numbers</li>
 * <li>string literals</li>
 * <li>constant references</li>
 * <li>class constant references</li>
 * </ul>
 *
 * Expected arguments can be specified in any of the following ways:
 * <ul>
 * <li><b>#[ExpectedValues(values: [1,2,3])]</b> means that one of the following is expected: `1`, `2`, or `3`</li>
 * <li><b>#[ExpectedValues(values: MY_CONST]</b> - default value of MY_CONST is expected to be array creation expression, in this case value of MY_CONST will be inlined</li>
 * <li><b>#[ExpectedValues(flags: [1,2,3])]</b> means that a bitmask of the following is expected: `1`, `2`, or `3`</li>
 * <li><b>#[ExpectedValues(valuesFromClass: MyClass::class)]</b> means that one of the constants from the class `MyClass` is expected</li>
 * <li><b>#[ExpectedValues(flagsFromClass: ExpectedValues::class)]</b> means that a bitmask of the constants from the class `MyClass` is expected</li>
 * </ul>
 *
 * The attribute with the number of provided constructor arguments different from 1 will result in undefined behavior.
 * @since 8.0
 */
#[Attribute(Attribute::TARGET_FUNCTION|Attribute::TARGET_METHOD|Attribute::TARGET_PARAMETER|Attribute::TARGET_PROPERTY)]
class ExpectedValues
{
    public function __construct(array $values = [], array $flags = [], string $valuesFromClass = null, string $flagsFromClass = null) {}
}
<?php

namespace JetBrains\PhpStorm;

use Attribute;

/**
 * Specifies that the parameter is a string that represents source code in a different language.
 * An IDE will automatically inject the specified language into the passed string literals.
 *
 * @since 8.0
 */
#[Attribute(Attribute::TARGET_PARAMETER)]
class Language
{
    /**
     * @param string $languageName Language name like "PHP", "SQL", "RegExp", etc...
     */
    public function __construct(string $languageName) {}
}
<?php

namespace JetBrains\PhpStorm;

use Attribute;

/**
 * The attribute marks the function that has no impact on the program state or passed parameters used after the function execution.
 * This means that a function call that resolves to such a function can be safely removed if the execution result is not used in code afterwards.
 *
 * @since 8.0
 */
#[Attribute(Attribute::TARGET_FUNCTION|Attribute::TARGET_METHOD)]
class Pure
{
    /**
     * @param bool $mayDependOnGlobalScope Whether the function result may be dependent on anything except passed variables
     */
    public function __construct(bool $mayDependOnGlobalScope = false) {}
}
<?php

namespace JetBrains\PhpStorm\Internal;

use Attribute;

/**
 * For PhpStorm internal use only
 * @since 8.0
 * @internal
 */
#[Attribute(Attribute::TARGET_PARAMETER)]
class ReturnTypeContract
{
    public function __construct(
        string $true = "",
        string $false = "",
        string $exists = "",
        string $notExists = ""
    ) {}
}
<?php

namespace JetBrains\PhpStorm\Internal;

use Attribute;

/**
 * For PhpStorm internal use only
 * @since 8.0
 * @internal
 */
#[Attribute(Attribute::TARGET_FUNCTION|Attribute::TARGET_METHOD|Attribute::TARGET_PARAMETER|Attribute::TARGET_PROPERTY)]
class LanguageLevelTypeAware
{
    public function __construct(array $languageLevelTypeMap, string $default) {}
}
<?php

namespace JetBrains\PhpStorm\Internal;

use Attribute;
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\ExpectedValues;

/**
 * For PhpStorm internal use only
 * @since 8.0
 * @internal
 */
#[Attribute(Attribute::TARGET_FUNCTION|Attribute::TARGET_METHOD|Attribute::TARGET_PARAMETER)]
class PhpStormStubsElementAvailable
{
    public function __construct(
        #[ExpectedValues(Deprecated::PHP_VERSIONS)] $from,
        #[ExpectedValues(Deprecated::PHP_VERSIONS)] $to = null
    ) {}
}
<?php

namespace JetBrains\PhpStorm\Internal;

use Attribute;

/**
 * For PhpStorm internal use only
 * @since 8.1
 * @internal
 */
#[Attribute(Attribute::TARGET_METHOD)]
class TentativeType {}
<?php

namespace JetBrains\PhpStorm;

use Attribute;

#[Attribute(Attribute::TARGET_FUNCTION|Attribute::TARGET_METHOD|Attribute::TARGET_CLASS|Attribute::TARGET_CLASS_CONSTANT|Attribute::TARGET_PROPERTY|Attribute::TARGET_PARAMETER)]
class Deprecated
{
    public const PHP_VERSIONS = [
        "5.3",
        "5.4",
        "5.5",
        "5.6",
        "7.0",
        "7.1",
        "7.2",
        "7.3",
        "7.4",
        "8.0",
        "8.1",
        "8.2"
    ];

    /**
     * Mark element as deprecated
     *
     * @param string $reason Reason for deprecation. It will be displayed by PhpStorm via the Deprecated inspection instead of the  default message
     * @param string $replacement Applicable only to function/method calls: IDE will suggest replacing a deprecated function call with the provided code template.
     * The following variables are available in this template:
     * <ul>
     * <li>%parametersList%: parameters of the function call. For example, for the "f(1,2)" call, %parametersList% will be "1,2"</li>
     * <li>%parameter0%,%parameter1%,%parameter2%,...: parameters of the function call. For example, for the "f(1,2)" call, %parameter1% will be "2"</li>
     * <li>%name%: For "\x\f(1,2)", %name% will be "\x\f", for "$this->ff()", %name% will be "ff"</li>
     * <li>%class%: If the attribute is provided for method "m", then for "$this->f()->m()", %class% will be "$this->f()"</li>
     * </ul>
     * The following example shows how to wrap a function call in another call and swap arguments:<br />
     * "#[Deprecated(replacement: "wrappedCall(%name%(%parameter1%, %parameter0%))")] f($a, $b){}<br />
     * f(1,2) will be replaced with wrappedCall(f(2,1))
     * @param string $since Element is deprecated starting with the provided PHP language level, applicable only for PhpStorm stubs entries
     */
    public function __construct(
        $reason = "",
        $replacement = "",
        #[ExpectedValues(self::PHP_VERSIONS)] $since = "5.6"
    ) {}
}
<?php

namespace JetBrains\PhpStorm;

use Attribute;

/**
 * You can use this facility to mark the function as halting the execution flow.
 * Such marked functions will be treated like die() or exit() calls by control flow inspections.
 * In most cases, just annotation function with 0 arguments will work.
 * To mark the function as the exit point only when it's called with some constant arguments, specify them in $arguments param
 *
 * {@see NoReturn::ANY_ARGUMENT}
 */
#[Attribute(Attribute::TARGET_FUNCTION|Attribute::TARGET_METHOD)]
class NoReturn
{
    /**
     * Use this constant to skip function argument on the specified position
     */
    public const ANY_ARGUMENT = 1;

    public function __construct(...$arguments) {}
}
<?php

namespace JetBrains\PhpStorm;

use Attribute;

/**
 * Mark a property (or all class properties in the case of a class) as immutable.
 * By default, an IDE highlights write accesses on such properties if they are located outside a constructor (this scope is customizable, see below).
 *
 * You can provide a custom allowed write scope by using the following values:
 * <ul>
 * <li>{@link Immutable::CONSTRUCTOR_WRITE_SCOPE}: write is allowed only in containing class constructor (default choice)</li>
 * <li>{@link Immutable::PRIVATE_WRITE_SCOPE}: write is allowed only in places where the property would be accessible if it had 'private' visibility modifier</li>
 * <li>{@link Immutable::PROTECTED_WRITE_SCOPE}: write is allowed only in places where the property would be accessible if it had 'protected' visibility modifier</li>
 * </ul>
 * @since 8.0
 */
#[Attribute(Attribute::TARGET_PROPERTY|Attribute::TARGET_CLASS)]
class Immutable
{
    public const CONSTRUCTOR_WRITE_SCOPE = "constructor";
    public const PRIVATE_WRITE_SCOPE = "private";
    public const PROTECTED_WRITE_SCOPE = "protected";

    public function __construct(#[ExpectedValues(valuesFromClass: Immutable::class)] $allowedWriteScope = self::CONSTRUCTOR_WRITE_SCOPE) {}
}
<?php

namespace JetBrains\PhpStorm;

use Attribute;

/**
 * The attribute specifies possible array keys and their types.
 *
 * If applied, an IDE will suggest the specified array keys, infer the specified types, and highlight non-specified keys in array access expressions.
 *
 * Array shapes should be specified with the required $shape parameter whose values should be array literals.<br />
 *
 * Example: <br />
 * <b>#[ArrayShape(["f" => "int", "string", "x" => "float"])]</b>
 * This usage applied on an element effectively means that the array has 3 elements, the keys are "f", 1, and "x", and the corresponding types are "int", "string", and "float".
 */
#[Attribute(Attribute::TARGET_FUNCTION|Attribute::TARGET_METHOD|Attribute::TARGET_PARAMETER|Attribute::TARGET_PROPERTY)]
class ArrayShape
{
    public function __construct(array $shape) {}
}
<?php
declare(strict_types=1);

namespace Sodium;

/**
 * To silence the phpstorm "unknown namespace" errors.
 */
const CRYPTO_AEAD_AES256GCM_KEYBYTES = 32;
const CRYPTO_AEAD_AES256GCM_NSECBYTES = 0;
const CRYPTO_AEAD_AES256GCM_NPUBBYTES = 12;
const CRYPTO_AEAD_AES256GCM_ABYTES = 16;
const CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES = 32;
const CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES = 0;
const CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES = 8;
const CRYPTO_AEAD_CHACHA20POLY1305_ABYTES = 16;
const CRYPTO_AUTH_BYTES = 32;
const CRYPTO_AUTH_KEYBYTES = 32;
const CRYPTO_BOX_SEALBYTES = 16;
const CRYPTO_BOX_SECRETKEYBYTES = 32;
const CRYPTO_BOX_PUBLICKEYBYTES = 32;
const CRYPTO_BOX_KEYPAIRBYTES = 64;
const CRYPTO_BOX_MACBYTES = 16;
const CRYPTO_BOX_NONCEBYTES = 24;
const CRYPTO_BOX_SEEDBYTES = 32;
const CRYPTO_KX_BYTES = 32;
const CRYPTO_KX_PUBLICKEYBYTES = 32;
const CRYPTO_KX_SECRETKEYBYTES = 32;
const CRYPTO_GENERICHASH_BYTES = 32;
const CRYPTO_GENERICHASH_BYTES_MIN = 16;
const CRYPTO_GENERICHASH_BYTES_MAX = 64;
const CRYPTO_GENERICHASH_KEYBYTES = 32;
const CRYPTO_GENERICHASH_KEYBYTES_MIN = 16;
const CRYPTO_GENERICHASH_KEYBYTES_MAX = 64;
const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_SALTBYTES = 32;
const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_STRPREFIX = '$7$';
const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_INTERACTIVE = 534288;
const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_INTERACTIVE = 16777216;
const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_SENSITIVE = 33554432;
const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_SENSITIVE = 1073741824;
const CRYPTO_SCALARMULT_BYTES = 32;
const CRYPTO_SCALARMULT_SCALARBYTES = 32;
const CRYPTO_SHORTHASH_BYTES = 8;
const CRYPTO_SHORTHASH_KEYBYTES = 16;
const CRYPTO_SECRETBOX_KEYBYTES = 32;
const CRYPTO_SECRETBOX_MACBYTES = 16;
const CRYPTO_SECRETBOX_NONCEBYTES = 24;
const CRYPTO_SIGN_BYTES = 64;
const CRYPTO_SIGN_SEEDBYTES = 32;
const CRYPTO_SIGN_PUBLICKEYBYTES = 32;
const CRYPTO_SIGN_SECRETKEYBYTES = 64;
const CRYPTO_SIGN_KEYPAIRBYTES = 96;
const CRYPTO_STREAM_KEYBYTES = 32;
const CRYPTO_STREAM_NONCEBYTES = 24;
const CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE = 4;
const CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE = 33554432;
const CRYPTO_PWHASH_OPSLIMIT_MODERATE = 6;
const CRYPTO_PWHASH_MEMLIMIT_MODERATE = 134217728;
const CRYPTO_PWHASH_OPSLIMIT_SENSITIVE = 8;
const CRYPTO_PWHASH_MEMLIMIT_SENSITIVE = 536870912;

/**
 * Can you access AES-256-GCM? This is only available if you have supported
 * hardware.
 *
 * @return bool
 */
function crypto_aead_aes256gcm_is_available(): bool {}

/**
 * Authenticated Encryption with Associated Data (decrypt)
 * AES-256-GCM
 *
 * @param string $msg encrypted message
 * @param string $nonce
 * @param string $key
 * @param string $ad additional data (optional)
 * @return string
 */
function crypto_aead_aes256gcm_decrypt(
    string $msg,
    string $nonce,
    string $key,
    string $ad = ''
): string {}

/**
 * Authenticated Encryption with Associated Data (encrypt)
 * AES-256-GCM
 *
 * @param string $msg plaintext message
 * @param string $nonce
 * @param string $key
 * @param string $ad additional data (optional)
 * @return string
 */
function crypto_aead_aes256gcm_encrypt(
    string $msg,
    string $nonce,
    string $key,
    string $ad = ''
): string {}

/**
 * Authenticated Encryption with Associated Data (decrypt)
 * ChaCha20 + Poly1305
 *
 * @param string $msg encrypted message
 * @param string $nonce
 * @param string $key
 * @param string $ad additional data (optional)
 * @return string
 */
function crypto_aead_chacha20poly1305_decrypt(
    string $msg,
    string $nonce,
    string $key,
    string $ad = ''
): string {}

/**
 * Authenticated Encryption with Associated Data (encrypt)
 * ChaCha20 + Poly1305
 *
 * @param string $msg plaintext message
 * @param string $nonce
 * @param string $key
 * @param string $ad additional data (optional)
 * @return string
 */
function crypto_aead_chacha20poly1305_encrypt(
    string $msg,
    string $nonce,
    string $key,
    string $ad = ''
): string {}

/**
 * Secret-key message authentication
 * HMAC SHA-512/256
 *
 * @param string $msg
 * @param string $key
 * @return string
 */
function crypto_auth(
    string $msg,
    string $key
): string {}

/**
 * Secret-key message verification
 * HMAC SHA-512/256
 *
 * @param string $mac
 * @param string $msg
 * @param string $key
 * @return bool
 */
function crypto_auth_verify(
    string $mac,
    string $msg,
    string $key
): bool {}

/**
 * Public-key authenticated encryption (encrypt)
 * X25519 + Xsalsa20 + Poly1305
 *
 * @param string $msg
 * @param string $nonce
 * @param string $keypair
 * @return string
 */
function crypto_box(
    string $msg,
    string $nonce,
    string $keypair
): string {}

/**
 * Generate an X25519 keypair for use with the crypto_box API
 *
 * @return string
 */
function crypto_box_keypair(): string {}

/**
 * Derive an X25519 keypair for use with the crypto_box API from a seed
 *
 * @param string $seed
 * @return string
 */
function crypto_box_seed_keypair(
    string $seed
): string {}

/**
 * Create an X25519 keypair from an X25519 secret key and X25519 public key
 *
 * @param string $secretkey
 * @param string $publickey
 * @return string
 */
function crypto_box_keypair_from_secretkey_and_publickey(
    string $secretkey,
    string $publickey
): string {}

/**
 * Public-key authenticated encryption (decrypt)
 * X25519 + Xsalsa20 + Poly1305
 *
 * @param string $msg
 * @param string $nonce
 * @param string $keypair
 * @return string
 */
function crypto_box_open(
    string $msg,
    string $nonce,
    string $keypair
): string {}

/**
 * Get an X25519 public key from an X25519 keypair
 *
 * @param string $keypair
 * @return string
 */
function crypto_box_publickey(
    string $keypair
): string {}

/**
 * Derive an X25519 public key from an X25519 secret key
 *
 * @param string $secretkey
 * @return string
 */
function crypto_box_publickey_from_secretkey(
    string $secretkey
): string {}

/**
 * Anonymous public-key encryption (encrypt)
 * X25519 + Xsalsa20 + Poly1305 + BLAKE2b
 *
 * @param string $message
 * @param string $publickey
 * @return string
 */
function crypto_box_seal(
    string $message,
    string $publickey
): string {}

/**
 * Anonymous public-key encryption (decrypt)
 * X25519 + Xsalsa20 + Poly1305 + BLAKE2b
 *
 * @param string $encrypted
 * @param string $keypair
 * @return string
 */
function crypto_box_seal_open(
    string $encrypted,
    string $keypair
): string {}

/**
 * Extract the X25519 secret key from an X25519 keypair
 *
 * @param string $keypair
 * @return string
 */
function crypto_box_secretkey(
    string $keypair
): string {}

/**
 * Elliptic Curve Diffie Hellman Key Exchange
 * X25519
 *
 * @param string $secretkey
 * @param string $publickey
 * @param string $client_publickey
 * @param string $server_publickey
 * @return string
 */
function crypto_kx(
    string $secretkey,
    string $publickey,
    string $client_publickey,
    string $server_publickey
): string {}

/**
 * Fast and secure cryptographic hash
 *
 * @param string $input
 * @param string $key
 * @param int $length
 * @return string
 */
function crypto_generichash(
    string $input,
    string $key = '',
    int $length = 32
): string {}

/**
 * Create a new hash state (e.g. to use for streams)
 * BLAKE2b
 *
 * @param string $key
 * @param int $length
 * @return string
 */
function crypto_generichash_init(
    string $key = '',
    int $length = 32
): string {}

/**
 * Update the hash state with some data
 * BLAKE2b
 *
 * @param string &$hashState
 * @param string $append
 * @return bool
 */
function crypto_generichash_update(
    string &$hashState,
    string $append
): bool {}

/**
 * Get the final hash
 * BLAKE2b
 *
 * @param string $state
 * @param int $length
 * @return string
 */
function crypto_generichash_final(
    string $state,
    int $length = 32
): string {}

/**
 * Secure password-based key derivation function
 * Argon2i
 *
 * @param int $out_len
 * @param string $passwd
 * @param string $salt
 * @param int $opslimit
 * @param int $memlimit
 * @return string
 */
function crypto_pwhash(
    int $out_len,
    string $passwd,
    string $salt,
    int $opslimit,
    int $memlimit
): string {}

/**
 * Get a formatted password hash (for storage)
 * Argon2i
 *
 * @param string $passwd
 * @param int $opslimit
 * @param int $memlimit
 * @return string
 */
function crypto_pwhash_str(
    string $passwd,
    int $opslimit,
    int $memlimit
): string {}

/**
 * Verify a password against a hash
 * Argon2i
 *
 * @param string $hash
 * @param string $passwd
 * @return bool
 */
function crypto_pwhash_str_verify(
    string $hash,
    string $passwd
): bool {}

/**
 * Secure password-based key derivation function
 * Scrypt
 *
 * @param int $out_len
 * @param string $passwd
 * @param string $salt
 * @param int $opslimit
 * @param int $memlimit
 * @return string
 */
function crypto_pwhash_scryptsalsa208sha256(
    int $out_len,
    string $passwd,
    string $salt,
    int $opslimit,
    int $memlimit
): string {}

/**
 * Get a formatted password hash (for storage)
 * Scrypt
 *
 * @param string $passwd
 * @param int $opslimit
 * @param int $memlimit
 * @return string
 */
function crypto_pwhash_scryptsalsa208sha256_str(
    string $passwd,
    int $opslimit,
    int $memlimit
): string {}

/**
 * Verify a password against a hash
 * Scrypt
 *
 * @param string $hash
 * @param string $passwd
 * @return bool
 */
function crypto_pwhash_scryptsalsa208sha256_str_verify(
    string $hash,
    string $passwd
): bool {}

/**
 * Elliptic Curve Diffie Hellman over Curve25519
 * X25519
 *
 * @param string $ecdhA
 * @param string $ecdhB
 * @return string
 */
function crypto_scalarmult(
    string $ecdhA,
    string $ecdhB
): string {}

/**
 * Authenticated secret-key encryption (encrypt)
 * Xsals20 + Poly1305
 *
 * @param string $plaintext
 * @param string $nonce
 * @param string $key
 * @return string
 */
function crypto_secretbox(
    string $plaintext,
    string $nonce,
    string $key
): string {}

/**
 * Authenticated secret-key encryption (decrypt)
 * Xsals20 + Poly1305
 *
 * @param string $ciphertext
 * @param string $nonce
 * @param string $key
 * @return string
 */
function crypto_secretbox_open(
    string $ciphertext,
    string $nonce,
    string $key
): string {}

/**
 * A short keyed hash suitable for data structures
 * SipHash-2-4
 *
 * @param string $message
 * @param string $key
 * @return string
 */
function crypto_shorthash(
    string $message,
    string $key
): string {}

/**
 * Digital Signature
 * Ed25519
 *
 * @param string $message
 * @param string $secretkey
 * @return string
 */
function crypto_sign(
    string $message,
    string $secretkey
): string {}

/**
 * Digital Signature (detached)
 * Ed25519
 *
 * @param string $message
 * @param string $secretkey
 * @return string
 */
function crypto_sign_detached(
    string $message,
    string $secretkey
): string {}

/**
 * Convert an Ed25519 public key to an X25519 public key
 *
 * @param string $sign_pk
 * @return string
 */
function crypto_sign_ed25519_pk_to_curve25519(
    string $sign_pk
): string {}

/**
 * Convert an Ed25519 secret key to an X25519 secret key
 *
 * @param string $sign_sk
 * @return string
 */
function crypto_sign_ed25519_sk_to_curve25519(
    string $sign_sk
): string {}

/**
 * Generate an Ed25519 keypair for use with the crypto_sign API
 *
 * @return string
 */
function crypto_sign_keypair(): string {}

/**
 * Create an Ed25519 keypair from an Ed25519 secret key + Ed25519 public key
 *
 * @param string $secretkey
 * @param string $publickey
 * @return string
 */
function crypto_sign_keypair_from_secretkey_and_publickey(
    string $secretkey,
    string $publickey
): string {}

/**
 * Verify a signed message and return the plaintext
 *
 * @param string $signed_message
 * @param string $publickey
 * @return string
 */
function crypto_sign_open(
    string $signed_message,
    string $publickey
): string {}

/**
 * Get the public key from an Ed25519 keypair
 *
 * @param string $keypair
 * @return string
 */
function crypto_sign_publickey(
    string $keypair
): string {}

/**
 * Get the secret key from an Ed25519 keypair
 *
 * @param string $keypair
 * @return string
 */
function crypto_sign_secretkey(
    string $keypair
): string {}

/**
 * Derive an Ed25519 public key from an Ed25519 secret key
 *
 * @param string $secretkey
 * @return string
 */
function crypto_sign_publickey_from_secretkey(
    string $secretkey
): string {}

/**
 * Derive an Ed25519 keypair for use with the crypto_sign API from a seed
 *
 * @param string $seed
 * @return string
 */
function crypto_sign_seed_keypair(
    string $seed
): string {}

/**
 * Verify a detached signature
 *
 * @param string $signature
 * @param string $msg
 * @param string $publickey
 * @return bool
 */
function crypto_sign_verify_detached(
    string $signature,
    string $msg,
    string $publickey
): bool {}

/**
 * Create a keystream from a key and nonce
 * Xsalsa20
 *
 * @param int $length
 * @param string $nonce
 * @param string $key
 * @return string
 */
function crypto_stream(
    int $length,
    string $nonce,
    string $key
): string {}

/**
 * Encrypt a message using a stream cipher
 * Xsalsa20
 *
 * @param string $plaintext
 * @param string $nonce
 * @param string $key
 * @return string
 */
function crypto_stream_xor(
    string $plaintext,
    string $nonce,
    string $key
): string {}

/**
 * Generate a string of random bytes
 * /dev/urandom
 *
 * @param int $length
 * @return string|false
 */
function randombytes_buf(
    int $length
): string {}

/**
 * Generate a 16-bit integer
 * /dev/urandom
 *
 * @return int
 */
function randombytes_random16(): int {}

/**
 * Generate an unbiased random integer between 0 and a specified value
 * /dev/urandom
 *
 * @param int $upperBoundNonInclusive
 * @return int
 */
function randombytes_uniform(
    int $upperBoundNonInclusive
): int {}

/**
 * Convert to hex without side-chanels
 *
 * @param string $binary
 * @return string
 */
function bin2hex(
    string $binary
): string {}

/**
 * Compare two strings in constant time
 *
 * @param string $left
 * @param string $right
 * @return int
 */
function compare(
    string $left,
    string $right
): int {}

/**
 * Convert from hex without side-chanels
 *
 * @param string $hex
 * @return string
 */
function hex2bin(
    string $hex
): string {}

/**
 * Increment a string in little-endian
 *
 * @param string &$nonce
 * @return string
 */
function increment(
    string &$nonce
) {}

/**
 * Add the right operand to the left
 *
 * @param string &$left
 * @param string $right
 */
function add(
    string &$left,
    string $right
) {}

/**
 * Get the true major version of libsodium
 * @return int
 */
function library_version_major(): int {}

/**
 * Get the true minor version of libsodium
 * @return int
 */
function library_version_minor(): int {}

/**
 * Compare two strings in constant time
 *
 * @param string $left
 * @param string $right
 * @return int
 */
function memcmp(
    string $left,
    string $right
): int {}

/**
 * Wipe a buffer
 *
 * @param string &$target
 */
function memzero(string &$target) {}

/**
 * Get the version string
 *
 * @return string
 */
function version_string(): string {}

/**
 * Scalar multiplication of the base point and your key
 *
 * @param string $sk
 * @return string
 */
function crypto_scalarmult_base(string $sk): string {}
<?php

// Start of zip v.1.14.0
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;

/**
 * A file archive, compressed with Zip.
 * @link https://php.net/manual/en/class.ziparchive.php
 */
class ZipArchive implements Countable
{
    /**
     * Zip library version
     * @link https://php.net/manual/en/zip.constants.php
     * @since 7.4.3
     */
    public const LIBZIP_VERSION = '1.7.3';

    /**
     * Create the archive if it does not exist.
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const CREATE = 1;

    /**
     * Error if archive already exists.
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const EXCL = 2;

    /**
     * Perform additional consistency checks on the archive, and error if they fail.
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const CHECKCONS = 4;

    /**
     * Always start a new archive, this mode will overwrite the file if
     * it already exists.
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const OVERWRITE = 8;

    /**
     * Ignore case on name lookup
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const FL_NOCASE = 1;

    /**
     * Ignore directory component
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const FL_NODIR = 2;

    /**
     * Read compressed data
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const FL_COMPRESSED = 4;

    /**
     * Use original data, ignoring changes.
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const FL_UNCHANGED = 8;
    public const FL_RECOMPRESS = 16;
    public const FL_ENCRYPTED = 32;
    public const FL_OVERWRITE = 8192;
    public const FL_LOCAL = 256;
    public const FL_CENTRAL = 512;
    public const EM_TRAD_PKWARE = 1;
    public const EM_UNKNOWN = 65535;

    /**
     * better of deflate or store.
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const CM_DEFAULT = -1;

    /**
     * stored (uncompressed).
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const CM_STORE = 0;

    /**
     * shrunk
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const CM_SHRINK = 1;

    /**
     * reduced with factor 1
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const CM_REDUCE_1 = 2;

    /**
     * reduced with factor 2
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const CM_REDUCE_2 = 3;

    /**
     * reduced with factor 3
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const CM_REDUCE_3 = 4;

    /**
     * reduced with factor 4
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const CM_REDUCE_4 = 5;

    /**
     * imploded
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const CM_IMPLODE = 6;

    /**
     * deflated
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const CM_DEFLATE = 8;

    /**
     * deflate64
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const CM_DEFLATE64 = 9;

    /**
     * PKWARE imploding
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const CM_PKWARE_IMPLODE = 10;

    /**
     * BZIP2 algorithm
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const CM_BZIP2 = 12;
    public const CM_LZMA = 14;
    public const CM_TERSE = 18;
    public const CM_LZ77 = 19;
    public const CM_WAVPACK = 97;
    public const CM_PPMD = 98;

    /**
     * No error.
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const ER_OK = 0;

    /**
     * Multi-disk zip archives not supported.
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const ER_MULTIDISK = 1;

    /**
     * Renaming temporary file failed.
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const ER_RENAME = 2;

    /**
     * Closing zip archive failed
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const ER_CLOSE = 3;

    /**
     * Seek error
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const ER_SEEK = 4;

    /**
     * Read error
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const ER_READ = 5;

    /**
     * Write error
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const ER_WRITE = 6;

    /**
     * CRC error
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const ER_CRC = 7;

    /**
     * Containing zip archive was closed
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const ER_ZIPCLOSED = 8;

    /**
     * No such file.
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const ER_NOENT = 9;

    /**
     * File already exists
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const ER_EXISTS = 10;

    /**
     * Can't open file
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const ER_OPEN = 11;

    /**
     * Failure to create temporary file.
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const ER_TMPOPEN = 12;

    /**
     * Zlib error
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const ER_ZLIB = 13;

    /**
     * Memory allocation failure
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const ER_MEMORY = 14;

    /**
     * Entry has been changed
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const ER_CHANGED = 15;

    /**
     * Compression method not supported.
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const ER_COMPNOTSUPP = 16;

    /**
     * Premature EOF
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const ER_EOF = 17;

    /**
     * Invalid argument
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const ER_INVAL = 18;

    /**
     * Not a zip archive
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const ER_NOZIP = 19;

    /**
     * Internal error
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const ER_INTERNAL = 20;

    /**
     * Zip archive inconsistent
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const ER_INCONS = 21;

    /**
     * Can't remove file
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const ER_REMOVE = 22;

    /**
     * Entry has been deleted
     * @link https://php.net/manual/en/zip.constants.php
     */
    public const ER_DELETED = 23;

    /**
     * No encryption
     * @link https://secure.php.net/manual/en/zip.constants.php
     * @since 7.2
     */
    public const EM_NONE = 0;

    /**
     * AES 128 encryption
     * @link https://secure.php.net/manual/en/zip.constants.php
     * @since 7.2
     */
    public const EM_AES_128 = 257;

    /**
     * AES 192 encryption
     * @link https://secure.php.net/manual/en/zip.constants.php
     * @since 7.2
     */
    public const EM_AES_192 = 258;

    /**
     * AES 256 encryption
     * @link https://secure.php.net/manual/en/zip.constants.php
     * @since 7.2
     */
    public const EM_AES_256 = 259;

    /**
     * Open archive in read only mode
     * @link https://secure.php.net/manual/en/zip.constants.php
     * @since 7.4.3
     */
    public const RDONLY = 16;

    /**
     * Guess string encoding (is default)
     * @link https://secure.php.net/manual/en/zip.constants.php
     * @since 7.0.8
     */
    public const FL_ENC_GUESS = 0;

    /**
     * Get unmodified string
     * @link https://secure.php.net/manual/en/zip.constants.php
     * @since 7.0.8
     */
    public const FL_ENC_RAW = 64;

    /**
     * Follow specification strictly
     * @link https://secure.php.net/manual/en/zip.constants.php
     * @since 7.0.8
     */
    public const FL_ENC_STRICT = 128;

    /**
     * String is UTF-8 encoded
     * @link https://secure.php.net/manual/en/zip.constants.php
     * @since 7.0.8
     */
    public const FL_ENC_UTF_8 = 2048;

    /**
     * String is CP437 encoded
     * @link https://secure.php.net/manual/en/zip.constants.php
     * @since 7.0.8
     */
    public const FL_ENC_CP437 = 4096;

    /**
     * LZMA2 algorithm
     * @link https://secure.php.net/manual/en/zip.constants.php
     * @since 7.4.3
     */
    public const CM_LZMA2 = 33;

    /**
     * XZ algorithm
     * @link https://secure.php.net/manual/en/zip.constants.php
     * @since 7.4.3
     */
    public const CM_XZ = 95;

    /**
     * Encryption method not support
     * @link https://secure.php.net/manual/en/zip.constants.php
     * @since 7.4.3
     */
    public const ER_ENCRNOTSUPP = 24;

    /**
     * Read-only archive
     * @link https://secure.php.net/manual/en/zip.constants.php
     * @since 7.4.3
     */
    public const ER_RDONLY = 25;

    /**
     * No password provided
     * @link https://secure.php.net/manual/en/zip.constants.php
     * @since 7.4.3
     */
    public const ER_NOPASSWD = 26;

    /**
     * Wrong password provided
     * @link https://secure.php.net/manual/en/zip.constants.php
     * @since 7.4.3
     */
    public const ER_WRONGPASSWD = 27;

    /**
     * Operation not supported
     * @link https://secure.php.net/manual/en/zip.constants.php
     * @since 7.4.3
     */
    public const ER_OPNOTSUPP = 28;

    /**
     * Resource still in use
     * @link https://secure.php.net/manual/en/zip.constants.php
     * @since 7.4.3
     */
    public const ER_INUSE = 29;

    /**
     * Tell error
     * @link https://secure.php.net/manual/en/zip.constants.php
     * @since 7.4.3
     */
    public const ER_TELL = 30;

    /**
     * Compressed data invalid
     * @link https://secure.php.net/manual/en/zip.constants.php
     * @since 7.4.3
     */
    public const ER_COMPRESSED_DATA = 31;

    /**
     * Operation cancelled
     * @link https://secure.php.net/manual/en/zip.constants.php
     * @since 7.4.3
     */
    public const ER_CANCELLED = 32;

    /**
     * @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
     * @since 5.6
     */
    public const OPSYS_DOS = 0;

    /**
     * @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
     * @since 5.6
     */
    public const OPSYS_AMIGA = 1;

    /**
     * @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
     * @since 5.6
     */
    public const OPSYS_OPENVMS = 2;

    /**
     * @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
     * @since 5.6
     */
    public const OPSYS_UNIX = 3;

    /**
     * @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
     * @since 5.6
     */
    public const OPSYS_VM_CMS = 4;

    /**
     * @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
     * @since 5.6
     */
    public const OPSYS_ATARI_ST = 5;

    /**
     * @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
     * @since 5.6
     */
    public const OPSYS_OS_2 = 6;

    /**
     * @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
     * @since 5.6
     */
    public const OPSYS_MACINTOSH = 7;

    /**
     * @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
     * @since 5.6
     */
    public const OPSYS_Z_SYSTEM = 8;

    /**
     * @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
     * @removed 8.0 Use {@link ZipArchive::ZOPSYS_CPM} instead.
     * @since 5.6
     */
    public const OPSYS_Z_CPM = 9;

    /**
     * @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
     * @since 5.6
     */
    public const OPSYS_WINDOWS_NTFS = 10;

    /**
     * @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
     * @since 5.6
     */
    public const OPSYS_MVS = 11;

    /**
     * @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
     * @since 5.6
     */
    public const OPSYS_VSE = 12;

    /**
     * @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
     * @since 5.6
     */
    public const OPSYS_ACORN_RISC = 13;

    /**
     * @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
     * @since 5.6
     */
    public const OPSYS_VFAT = 14;

    /**
     * @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
     * @since 5.6
     */
    public const OPSYS_ALTERNATE_MVS = 15;

    /**
     * @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
     * @since 5.6
     */
    public const OPSYS_BEOS = 16;

    /**
     * @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
     * @since 5.6
     */
    public const OPSYS_TANDEM = 17;

    /**
     * @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
     * @since 5.6
     */
    public const OPSYS_OS_400 = 18;

    /**
     * @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
     * @since 5.6
     */
    public const OPSYS_OS_X = 19;

    /**
     * @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
     */
    public const OPSYS_CPM = 9;

    /**
     * @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
     * @since 5.6
     */
    public const OPSYS_DEFAULT = 3;

    /**
     * Status of the Zip Archive
     * @var int
     */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $status;

    /**
     * System status of the Zip Archive
     * @var int
     */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $statusSys;

    /**
     * Number of files in archive
     * @var int
     */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $numFiles;

    /**
     * File name in the file system
     * @var string
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $filename;

    /**
     * Comment for the archive
     * @var string
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $comment;

    /**
     * @var int
     */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $lastId;

    /**
     * (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.1.0)<br/>
     * Open a ZIP file archive
     *
     * @link https://php.net/manual/en/ziparchive.open.php
     *
     * @param string $filename <p>
     * The file name of the ZIP archive to open.
     * </p>
     * @param int $flags [optional] <p>
     * The mode to use to open the archive.
     * </p>
     * <p>
     * <b>ZipArchive::OVERWRITE</b>
     * </p>
     *
     * @return int|bool <i>Error codes</i>
     * <p>
     * Returns <b>TRUE</b> on success, <b>FALSE</b> or the error code on error.
     * </p>
     * <p>
     * <b>ZipArchive::ER_EXISTS</b>
     * </p>
     * <p>
     * File already exists.
     * </p>
     * <p>
     * <b>ZipArchive::ER_INCONS</b>
     * </p>
     * <p>
     * Zip archive inconsistent.
     * </p>
     * <p>
     * <b>ZipArchive::ER_INVAL</b>
     * </p>
     * <p>
     * Invalid argument.
     * </p>
     * <p>
     * <b>ZipArchive::ER_MEMORY</b>
     * </p>
     * <p>
     * Malloc failure.
     * </p>
     * <p>
     * <b>ZipArchive::ER_NOENT</b>
     * </p>
     * <p>
     * No such file.
     * </p>
     * <p>
     * <b>ZipArchive::ER_NOZIP</b>
     * </p>
     * <p>
     * Not a zip archive.
     * </p>
     * <p>
     * <b>ZipArchive::ER_OPEN</b>
     * </p>
     * <p>
     * Can't open file.
     * </p>
     * <p>
     * <b>ZipArchive::ER_READ</b>
     * </p>
     * <p>
     * Read error.
     * </p>
     * <p>
     * <b>ZipArchive::ER_SEEK</b>
     * </p>
     * <p>
     * Seek error.
     * </p>
     */
    public function open(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = null
    ) {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.1.0)<br/>
     * Close the active archive (opened or newly created)
     * @link https://php.net/manual/en/ziparchive.close.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function close() {}

    /**
     * (PHP 7 &gt;= 7.2.0, PECL zip &gt;= 1.15.0)<br/>
     * Counts the number of files in the archive.
     * @link https://www.php.net/manual/en/ziparchive.count.php
     * @return int
     * @since 7.2
     */
    public function count() {}

    /**
     * Returns the status error message, system and/or zip messages
     * @link https://php.net/manual/en/ziparchive.getstatusstring.php
     * @return string|false a string with the status message on success or <b>FALSE</b> on failure.
     * @since 5.2.7
     */
    public function getStatusString() {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.8.0)<br/>
     * Add a new directory
     * @link https://php.net/manual/en/ziparchive.addemptydir.php
     * @param string $dirname <p>
     * The directory to add.
     * </p>
     * @param int $flags [optional] Set how to manage name encoding (ZipArchive::FL_ENC_*) and entry replacement (ZipArchive::FL_OVERWRITE)
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function addEmptyDir(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $dirname,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags
    ) {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.1.0)<br/>
     * Add a file to a ZIP archive using its contents
     * @link https://php.net/manual/en/ziparchive.addfromstring.php
     * @param string $name <p>
     * The name of the entry to create.
     * </p>
     * @param string $content <p>
     * The contents to use to create the entry. It is used in a binary
     * safe mode.
     * </p>
     * @param int $flags [optional] Set how to manage name encoding (ZipArchive::FL_ENC_*) and entry replacement (ZipArchive::FL_OVERWRITE)
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function addFromString(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $content,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = 8192
    ) {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.1.0)<br/>
     * Adds a file to a ZIP archive from the given path
     * @link https://php.net/manual/en/ziparchive.addfile.php
     * @param string $filepath <p>
     * The path to the file to add.
     * </p>
     * @param string $entryname [optional] <p>
     * If supplied, this is the local name inside the ZIP archive that will override the <i>filename</i>.
     * </p>
     * @param int $start [optional] <p>
     * This parameter is not used but is required to extend <b>ZipArchive</b>.
     * </p>
     * @param int $length [optional] <p>
     * This parameter is not used but is required to extend <b>ZipArchive</b>.
     * </p>
     * @param int $flags [optional] Set how to manage name encoding (ZipArchive::FL_ENC_*) and entry replacement (ZipArchive::FL_OVERWRITE)
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function addFile(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filepath,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $entryname = null,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $start = 0,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $length = 0,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = 8192
    ) {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL zip &gt;= 1.9.0)<br/>
     * Add files from a directory by glob pattern
     * @link https://php.net/manual/en/ziparchive.addglob.php
     * @param string $pattern <p>
     * A <b>glob</b> pattern against which files will be matched.
     * </p>
     * @param int $flags [optional] <p>
     * A bit mask of glob() flags.
     * </p>
     * @param array $options [optional] <p>
     * An associative array of options. Available options are:
     * </p>
     * <p>
     * "add_path"
     * </p>
     * <p>
     * Prefix to prepend when translating to the local path of the file within
     * the archive. This is applied after any remove operations defined by the
     * "remove_path" or "remove_all_path"
     * options.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function addGlob(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = 0,
        array $options = []
    ) {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL zip &gt;= 1.9.0)<br/>
     * Add files from a directory by PCRE pattern
     * @link https://php.net/manual/en/ziparchive.addpattern.php
     * @param string $pattern <p>
     * A PCRE pattern against which files will be matched.
     * </p>
     * @param string $path [optional] <p>
     * The directory that will be scanned. Defaults to the current working directory.
     * </p>
     * @param array $options [optional] <p>
     * An associative array of options accepted by <b>ZipArchive::addGlob</b>.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function addPattern(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $path = '.',
        array $options = []
    ) {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.5.0)<br/>
     * Renames an entry defined by its index
     * @link https://php.net/manual/en/ziparchive.renameindex.php
     * @param int $index <p>
     * Index of the entry to rename.
     * </p>
     * @param string $new_name <p>
     * New name.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function renameIndex(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $new_name
    ) {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.5.0)<br/>
     * Renames an entry defined by its name
     * @link https://php.net/manual/en/ziparchive.renamename.php
     * @param string $name <p>
     * Name of the entry to rename.
     * </p>
     * @param string $new_name <p>
     * New name.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function renameName(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $new_name
    ) {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.4.0)<br/>
     * Set the comment of a ZIP archive
     * @link https://php.net/manual/en/ziparchive.setarchivecomment.php
     * @param string $comment <p>
     * The contents of the comment.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function setArchiveComment(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $comment) {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.1.0)<br/>
     * Returns the Zip archive comment
     * @link https://php.net/manual/en/ziparchive.getarchivecomment.php
     * @param int $flags [optional] <p>
     * If flags is set to <b>ZipArchive::FL_UNCHANGED</b>, the original unchanged
     * comment is returned.
     * </p>
     * @return string|false the Zip archive comment or <b>FALSE</b> on failure.
     */
    public function getArchiveComment(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = null) {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.4.0)<br/>
     * Set the comment of an entry defined by its index
     * @link https://php.net/manual/en/ziparchive.setcommentindex.php
     * @param int $index <p>
     * Index of the entry.
     * </p>
     * @param string $comment <p>
     * The contents of the comment.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function setCommentIndex(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $comment
    ) {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.4.0)<br/>
     * Set the comment of an entry defined by its name
     * @link https://php.net/manual/en/ziparchive.setcommentname.php
     * @param string $name <p>
     * Name of the entry.
     * </p>
     * @param string $comment <p>
     * The contents of the comment.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function setCommentName(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $comment
    ) {}

    /**
     * Set the compression method of an entry defined by its index
     * @link https://php.net/manual/en/ziparchive.setcompressionindex.php
     * @param int $index Index of the entry.
     * @param int $method The compression method. Either ZipArchive::CM_DEFAULT, ZipArchive::CM_STORE or ZipArchive::CM_DEFLATE.
     * @param int $compflags [optional] Compression flags. Currently unused.
     * @return bool Returns TRUE on success or FALSE on failure.
     * @since 7.0
     */
    public function setCompressionIndex(int $index, int $method, int $compflags = 0) {}

    /**
     * Set the compression method of an entry defined by its name
     * https://secure.php.net/manual/en/ziparchive.setcompressionname.php
     * @param string $name Name of the entry.
     * @param int $method The compression method. Either ZipArchive::CM_DEFAULT, ZipArchive::CM_STORE or ZipArchive::CM_DEFLATE.
     * @param int $compflags [optional] Compression flags. Currently unused.
     * @return bool Returns TRUE on success or FALSE on failure.
     * @since 7.0
     */
    public function setCompressionName(string $name, int $method, int $compflags = 0) {}

    /**
     * Set the encryption method of an entry defined by its index
     * @link https://php.net/manual/en/ziparchive.setencryptionindex.php
     * @param int $index Index of the entry.
     * @param int $method The encryption method defined by one of the ZipArchive::EM_ constants.
     * @param string|null $password [optional] Optional password, default used when missing.
     * @return bool Returns TRUE on success or FALSE on failure.
     * @since 7.2
     */
    public function setEncryptionIndex(int $index, int $method, ?string $password = null) {}

    /**
     * Set the encryption method of an entry defined by its name
     * @link https://php.net/manual/en/ziparchive.setencryptionname.php
     * @param string $name Name of the entry.
     * @param int $method The encryption method defined by one of the ZipArchive::EM_ constants.
     * @param string|null $password [optional] Optional password, default used when missing.
     * @return bool Returns TRUE on success or FALSE on failure.
     * @since 7.2
     */
    public function setEncryptionName(string $name, int $method, ?string $password = null) {}

    /**
     * (PHP 5 &gt;= 5.6.0, PECL zip &gt;= 1.12.0)<br/>
     * @param string $password
     * @return bool
     */
    public function setPassword(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $password) {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.4.0)<br/>
     * Returns the comment of an entry using the entry index
     * @link https://php.net/manual/en/ziparchive.getcommentindex.php
     * @param int $index <p>
     * Index of the entry
     * </p>
     * @param int $flags [optional] <p>
     * If flags is set to <b>ZipArchive::FL_UNCHANGED</b>, the original unchanged
     * comment is returned.
     * </p>
     * @return string|false the comment on success or <b>FALSE</b> on failure.
     */
    public function getCommentIndex(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = null
    ) {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.4.0)<br/>
     * Returns the comment of an entry using the entry name
     * @link https://php.net/manual/en/ziparchive.getcommentname.php
     * @param string $name <p>
     * Name of the entry
     * </p>
     * @param int $flags [optional] <p>
     * If flags is set to <b>ZipArchive::FL_UNCHANGED</b>, the original unchanged
     * comment is returned.
     * </p>
     * @return string|false the comment on success or <b>FALSE</b> on failure.
     */
    public function getCommentName(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = null
    ) {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.5.0)<br/>
     * delete an entry in the archive using its index
     * @link https://php.net/manual/en/ziparchive.deleteindex.php
     * @param int $index <p>
     * Index of the entry to delete.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function deleteIndex(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index) {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.5.0)<br/>
     * delete an entry in the archive using its name
     * @link https://php.net/manual/en/ziparchive.deletename.php
     * @param string $name <p>
     * Name of the entry to delete.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function deleteName(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name) {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.5.0)<br/>
     * Get the details of an entry defined by its name.
     * @link https://php.net/manual/en/ziparchive.statname.php
     * @param string $name <p>
     * Name of the entry
     * </p>
     * @param int $flags [optional] <p>
     * The flags argument specifies how the name lookup should be done.
     * Also, <b>ZipArchive::FL_UNCHANGED</b> may be ORed to it to request
     * information about the original file in the archive,
     * ignoring any changes made.
     * <b>ZipArchive::FL_NOCASE</b>
     * </p>
     * @return array{name: string, index: int, crc: int, size: int, mtime: int, comp_size: int, comp_method: int, encryption_method: int}|false an array containing the entry details or <b>FALSE</b> on failure.
     */
    public function statName(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = null
    ) {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.1.0)<br/>
     * Get the details of an entry defined by its index.
     * @link https://php.net/manual/en/ziparchive.statindex.php
     * @param int $index <p>
     * Index of the entry
     * </p>
     * @param int $flags [optional] <p>
     * <b>ZipArchive::FL_UNCHANGED</b> may be ORed to it to request
     * information about the original file in the archive,
     * ignoring any changes made.
     * </p>
     * @return array{name: string, index: int, crc: int, size: int, mtime: int, comp_size: int, comp_method: int, encryption_method: int}|false an array containing the entry details or <b>FALSE</b> on failure.
     */
    public function statIndex(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = null
    ) {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.5.0)<br/>
     * Returns the index of the entry in the archive
     * @link https://php.net/manual/en/ziparchive.locatename.php
     * @param string $name <p>
     * The name of the entry to look up
     * </p>
     * @param int $flags [optional] <p>
     * The flags are specified by ORing the following values,
     * or 0 for none of them.
     * <b>ZipArchive::FL_NOCASE</b>
     * </p>
     * @return int|false the index of the entry on success or <b>FALSE</b> on failure.
     */
    public function locateName(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = null
    ) {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.5.0)<br/>
     * Returns the name of an entry using its index
     * @link https://php.net/manual/en/ziparchive.getnameindex.php
     * @param int $index <p>
     * Index of the entry.
     * </p>
     * @param int $flags [optional] <p>
     * If flags is set to <b>ZipArchive::FL_UNCHANGED</b>, the original unchanged
     * name is returned.
     * </p>
     * @return string|false the name on success or <b>FALSE</b> on failure.
     */
    public function getNameIndex(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = null
    ) {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.1.0)<br/>
     * Revert all global changes done in the archive.
     * @link https://php.net/manual/en/ziparchive.unchangearchive.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function unchangeArchive() {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.1.0)<br/>
     * Undo all changes done in the archive
     * @link https://php.net/manual/en/ziparchive.unchangeall.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function unchangeAll() {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.1.0)<br/>
     * Revert all changes done to an entry at the given index
     * @link https://php.net/manual/en/ziparchive.unchangeindex.php
     * @param int $index <p>
     * Index of the entry.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function unchangeIndex(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index) {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.5.0)<br/>
     * Revert all changes done to an entry with the given name.
     * @link https://php.net/manual/en/ziparchive.unchangename.php
     * @param string $name <p>
     * Name of the entry.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function unchangeName(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name) {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.1.0)<br/>
     * Extract the archive contents
     * @link https://php.net/manual/en/ziparchive.extractto.php
     * @param string $pathto <p>
     * Location where to extract the files.
     * </p>
     * @param string[]|string|null $files [optional] <p>
     * The entries to extract. It accepts either a single entry name or
     * an array of names.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function extractTo(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pathto,
        #[LanguageLevelTypeAware(['8.0' => 'array|string|null'], default: '')] $files = null
    ) {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.1.0)<br/>
     * Returns the entry contents using its name
     * @link https://php.net/manual/en/ziparchive.getfromname.php
     * @param string $name <p>
     * Name of the entry
     * </p>
     * @param int $len [optional] <p>
     * The length to be read from the entry. If 0, then the
     * entire entry is read.
     * </p>
     * @param int $flags [optional] <p>
     * The flags to use to open the archive. the following values may
     * be ORed to it.
     * <b>ZipArchive::FL_UNCHANGED</b>
     * </p>
     * @return string|false the contents of the entry on success or <b>FALSE</b> on failure.
     */
    public function getFromName(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $len = 0,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = null
    ) {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.3.0)<br/>
     * Returns the entry contents using its index
     * @link https://php.net/manual/en/ziparchive.getfromindex.php
     * @param int $index <p>
     * Index of the entry
     * </p>
     * @param int $len [optional] <p>
     * The length to be read from the entry. If 0, then the
     * entire entry is read.
     * </p>
     * @param int $flags [optional] <p>
     * The flags to use to open the archive. the following values may
     * be ORed to it.
     * </p>
     * <p>
     * <b>ZipArchive::FL_UNCHANGED</b>
     * </p>
     * @return string|false the contents of the entry on success or <b>FALSE</b> on failure.
     */
    public function getFromIndex(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $len = 0,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = null
    ) {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.1.0)<br/>
     * Get a file handler to the entry defined by its name (read only).
     * @link https://php.net/manual/en/ziparchive.getstream.php
     * @param string $name <p>
     * The name of the entry to use.
     * </p>
     * @return resource|false a file pointer (resource) on success or <b>FALSE</b> on failure.
     */
    public function getStream(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name) {}

    /**
     * Set the external attributes of an entry defined by its name
     * @link https://www.php.net/manual/en/ziparchive.setexternalattributesname.php
     * @param string $name Name of the entry
     * @param int $opsys The operating system code defined by one of the ZipArchive::OPSYS_ constants.
     * @param int $attr The external attributes. Value depends on operating system.
     * @param int $flags [optional] Optional flags. Currently unused.
     * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function setExternalAttributesName(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $opsys,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $attr,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = null
    ) {}

    /**
     * Retrieve the external attributes of an entry defined by its name
     * @link https://www.php.net/manual/en/ziparchive.getexternalattributesname.php
     * @param string $name Name of the entry
     * @param int &$opsys On success, receive the operating system code defined by one of the ZipArchive::OPSYS_ constants.
     * @param int &$attr On success, receive the external attributes. Value depends on operating system.
     * @param int $flags [optional] If flags is set to ZipArchive::FL_UNCHANGED, the original unchanged attributes are returned.
     * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function getExternalAttributesName(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] &$opsys,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] &$attr,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = null
    ) {}

    /**
     * Set the external attributes of an entry defined by its index
     * @link https://www.php.net/manual/en/ziparchive.setexternalattributesindex.php
     * @param int $index Index of the entry.
     * @param int $opsys The operating system code defined by one of the ZipArchive::OPSYS_ constants.
     * @param int $attr The external attributes. Value depends on operating system.
     * @param int $flags [optional] Optional flags. Currently unused.
     * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function setExternalAttributesIndex(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $opsys,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $attr,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = null
    ) {}

    /**
     * Retrieve the external attributes of an entry defined by its index
     * @link https://www.php.net/manual/en/ziparchive.getexternalattributesindex.php
     * @param int $index Index of the entry.
     * @param int &$opsys On success, receive the operating system code defined by one of the ZipArchive::OPSYS_ constants.
     * @param int &$attr On success, receive the external attributes. Value depends on operating system.
     * @param int $flags [optional] If flags is set to ZipArchive::FL_UNCHANGED, the original unchanged attributes are returned.
     * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function getExternalAttributesIndex(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] &$opsys,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] &$attr,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = null
    ) {}

    public static function isEncryptionMethodSupported(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $method,
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $enc = true
    ) {}

    public static function isCompressionMethodSupported(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $method,
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $enc = true
    ) {}

    public function registerCancelCallback(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback) {}

    public function registerProgressCallback(
        #[LanguageLevelTypeAware(['8.0' => 'float'], default: '')] $rate,
        #[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback
    ) {}

    public function setMtimeName(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestamp,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = null
    ) {}

    public function setMtimeIndex(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestamp,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = null
    ) {}

    public function replaceFile(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filepath,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $index,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $start = null,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $length = null,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = null
    ) {}
}

/**
 * (PHP 4 &gt;= 4.1.0, PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.0.0)<br/>
 * Open a ZIP file archive
 * @link https://php.net/manual/en/function.zip-open.php
 * @param string $filename <p>
 * The file name of the ZIP archive to open.
 * </p>
 * @return resource|int|false a resource handle for later use with
 * <b>zip_read</b> and <b>zip_close</b>
 * or returns the number of error if <i>filename</i> does not
 * exist or in case of other error.
 * @deprecated 8.0 Use {@link ZipArchive} instead.
 */
function zip_open(string $filename) {}

/**
 * (PHP 4 &gt;= 4.1.0, PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.0.0)<br/>
 * Close a ZIP file archive
 * @link https://php.net/manual/en/function.zip-close.php
 * @param resource $zip <p>
 * A ZIP file previously opened with <b>zip_open</b>.
 * </p>
 * @return void No value is returned.
 * @deprecated 8.0 Use {@link ZipArchive} instead.
 */
function zip_close($zip): void {}

/**
 * (PHP 4 &gt;= 4.1.0, PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.0.0)<br/>
 * Read next entry in a ZIP file archive
 * @link https://php.net/manual/en/function.zip-read.php
 * @param resource $zip <p>
 * A ZIP file previously opened with <b>zip_open</b>.
 * </p>
 * @return resource|false a directory entry resource for later use with the
 * zip_entry_... functions, or <b>FALSE</b> if
 * there are no more entries to read, or an error code if an error
 * occurred.
 * @deprecated 8.0 Use {@link ZipArchive} instead.
 */
function zip_read($zip) {}

/**
 * (PHP 4 &gt;= 4.1.0, PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.0.0)<br/>
 * Open a directory entry for reading
 * @link https://php.net/manual/en/function.zip-entry-open.php
 * @param resource $zip_dp <p>
 * A valid resource handle returned by <b>zip_open</b>.
 * </p>
 * @param resource $zip_entry <p>
 * A directory entry returned by <b>zip_read</b>.
 * </p>
 * @param string $mode [optional] <p>
 * Any of the modes specified in the documentation of
 * <b>fopen</b>.
 * </p>
 * <p>
 * Currently, <i>mode</i> is ignored and is always
 * "rb". This is due to the fact that zip support
 * in PHP is read only access.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * <p>
 * Unlike <b>fopen</b> and other similar functions,
 * the return value of <b>zip_entry_open</b> only
 * indicates the result of the operation and is not needed for
 * reading or closing the directory entry.
 * </p>
 */
#[Deprecated(reason: 'This function is deprecated in favor of the Object API', since: "8.0")]
function zip_entry_open($zip_dp, $zip_entry, string $mode = 'rb'): bool {}

/**
 * (PHP 4 &gt;= 4.1.0, PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.0.0)<br/>
 * Close a directory entry
 * @link https://php.net/manual/en/function.zip-entry-close.php
 * @param resource $zip_entry <p>
 * A directory entry previously opened <b>zip_entry_open</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * @deprecated 8.0 Use {@link ZipArchive} instead.
 */
function zip_entry_close($zip_entry): bool {}

/**
 * (PHP 4 &gt;= 4.1.0, PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.0.0)<br/>
 * Read from an open directory entry
 * @link https://php.net/manual/en/function.zip-entry-read.php
 * @param resource $zip_entry <p>
 * A directory entry returned by <b>zip_read</b>.
 * </p>
 * @param int $len [optional] <p>
 * The number of bytes to return.
 * </p>
 * <p>
 * This should be the uncompressed length you wish to read.
 * </p>
 * @return string|false the data read, empty string on end of a file, or <b>FALSE</b> on error.
 * @deprecated 8.0 Use {@link ZipArchive} instead.
 */
function zip_entry_read($zip_entry, int $len = 1024): string|false {}

/**
 * (PHP 4 &gt;= 4.1.0, PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.0.0)<br/>
 * Retrieve the actual file size of a directory entry
 * @link https://php.net/manual/en/function.zip-entry-filesize.php
 * @param resource $zip_entry <p>
 * A directory entry returned by <b>zip_read</b>.
 * </p>
 * @return int|false The size of the directory entry.
 * @deprecated 8.0 Use {@link ZipArchive} instead.
 */
function zip_entry_filesize($zip_entry): int|false {}

/**
 * (PHP 4 &gt;= 4.1.0, PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.0.0)<br/>
 * Retrieve the name of a directory entry
 * @link https://php.net/manual/en/function.zip-entry-name.php
 * @param resource $zip_entry <p>
 * A directory entry returned by <b>zip_read</b>.
 * </p>
 * @return string|false The name of the directory entry.
 * @deprecated 8.0 Use {@link ZipArchive} instead.
 */
function zip_entry_name($zip_entry): string|false {}

/**
 * (PHP 4 &gt;= 4.1.0, PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.0.0)<br/>
 * Retrieve the compressed size of a directory entry
 * @link https://php.net/manual/en/function.zip-entry-compressedsize.php
 * @param resource $zip_entry <p>
 * A directory entry returned by <b>zip_read</b>.
 * </p>
 * @return int|false The compressed size.
 * @deprecated 8.0 Use {@link ZipArchive} instead.
 */
function zip_entry_compressedsize($zip_entry): int|false {}

/**
 * (PHP 4 &gt;= 4.1.0, PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.0.0)<br/>
 * Retrieve the compression method of a directory entry
 * @link https://php.net/manual/en/function.zip-entry-compressionmethod.php
 * @param resource $zip_entry <p>
 * A directory entry returned by <b>zip_read</b>.
 * </p>
 * @return string|false The compression method.
 * @deprecated 8.0 Use {@link ZipArchive} instead.
 */
function zip_entry_compressionmethod($zip_entry): string|false {}

// End of zip v.1.11.0
<?php

// The Event class
use JetBrains\PhpStorm\Immutable;
use JetBrains\PhpStorm\Pure;

/**
 * Event.
 * Event class represents and event firing on a file descriptor being ready to read from or write to; a file descriptor becoming ready to read from or write to(edge-triggered I/O only); a timeout expiring; a signal occurring; a user-triggered event.
 * Every event is associated with EventBase . However, event will never fire until it is added (via Event::add() ). An added event remains in pending state until the registered event occurs, thus turning it to active state. To handle events user may register a callback which is called when event becomes active. If event is configured persistent , it remains pending. If it is not persistent, it stops being pending when it's callback runs. Event::del() method deletes event, thus making it non-pending. By means of Event::add() method it could be added again.
 *
 * @author Kazuaki MABUCHI
 * @copyright Сopyright (https://php.net/manual/cc.license.php) by the PHP Documentation Group is licensed under [CC by 3.0 or later](https://creativecommons.org/licenses/by/3.0/).
 *
 * @see https://php.net/manual/en/class.event.php
 */
final class Event
{
    /**
     * @var bool
     */
    #[Immutable]
    public $pending;
    public const ET = 32;
    public const PERSIST = 16;
    public const READ = 2;
    public const WRITE = 4;
    public const SIGNAL = 8;
    public const TIMEOUT = 1;

    /**
     * __construct.
     * Constructs Event object.
     *
     * @param EventBase $base
     * @param mixed     $fd
     * @param int       $what
     * @param callable  $cb
     * @param mixed     $arg  = null
     *
     * @see https://php.net/manual/en/event.construct.php
     */
    #[Pure]
    public function __construct(EventBase $base, $fd, int $what, callable $cb, $arg = null) {}

    /**
     * add.
     * Makes event pending.
     *
     * @param float $timeout (optional)
     *
     * @return bool
     *
     * @see https://php.net/manual/en/event.add.php
     */
    public function add(float $timeout = -1): bool {}

    /**
     * addSignal.
     * Makes signal event pending.
     *
     * @param float $timeout (optional)
     *
     * @return bool
     *
     * @see https://php.net/manual/en/event.addsignal.php
     */
    public function addSignal(float $timeout = -1): bool {}

    /**
     * addTimer.
     * Makes timer event pending.
     *
     * @param float $timeout (optional)
     *
     * @return bool
     *
     * @see https://php.net/manual/en/event.addtimer.php
     */
    public function addTimer(float $timeout = -1): bool {}

    /**
     * del.
     * Makes event non-pending.
     *
     * @return bool
     *
     * @see https://php.net/manual/en/event.del.php
     */
    public function del(): bool {}

    /**
     * delSignal.
     * Makes signal event non-pending.
     *
     * @return bool
     *
     * @see https://php.net/manual/en/event.delsignal.php
     */
    public function delSignal(): bool {}

    /**
     * delTimer.
     * Makes timer event non-pending.
     *
     * @return bool
     *
     * @see https://php.net/manual/en/event.deltimer.php
     */
    public function delTimer(): bool {}

    /**
     * free.
     * Make event non-pending and free resources allocated for this event.
     *
     * @see https://php.net/manual/en/event.free.php
     */
    public function free(): void {}

    /**
     * getSupportedMethods.
     * Returns array with of the names of the methods supported in this version of Libevent.
     *
     * @return array
     *
     * @see https://php.net/manual/en/event.getsupportedmethods.php
     */
    public static function getSupportedMethods(): array {}

    /**
     * pending.
     * Detects whether event is pending or scheduled.
     *
     * @param int $flags
     *
     * @return bool
     *
     * @see https://php.net/manual/en/event.pending.php
     */
    public function pending(int $flags): bool {}

    /**
     * set.
     * Re-configures event.
     *
     * @param EventBase $base
     * @param mixed     $fd
     * @param int       $what (optional)
     * @param callable  $cb   (optional)
     * @param mixed     $arg  (optional)
     *
     * @return bool
     *
     * @see https://php.net/manual/en/event.set.php
     */
    public function set(EventBase $base, $fd, int $what, callable $cb, $arg): bool {}

    /**
     * setPriority.
     * Set event priority.
     *
     * @param int $priority
     * @return bool
     *
     * @see https://php.net/manual/en/event.setpriority.php
     */
    public function setPriority(int $priority): bool {}

    /**
     * setTimer.
     * Re-configures timer event.
     *
     * @param EventBase $base
     * @param callable  $cb
     * @param mixed     $arg  (optional)
     *
     * @return bool
     *
     * @see https://php.net/manual/en/event.settimer.php
     */
    public function setTimer(EventBase $base, callable $cb, $arg): bool {}

    /**
     * signal.
     * Constructs signal event object.
     *
     * @param EventBase $base
     * @param int       $signum
     * @param callable  $cb
     * @param mixed     $arg    (optional)
     *
     * @return Event
     *
     * @see https://php.net/manual/en/event.signal.php
     */
    public static function signal(EventBase $base, int $signum, callable $cb, $arg): Event {}

    /**
     * timer.
     * Constructs timer event object.
     *
     * @param EventBase $base
     * @param callable  $cb
     * @param mixed     $arg  (optional)
     *
     * @return Event
     *
     * @see https://php.net/manual/en/event.timer.php
     */
    public static function timer(EventBase $base, callable $cb, $arg): Event {}
}

//  The EventBase class
/**
 * EventBase.
 * EventBase class represents libevent's event base structure. It holds a set of events and can poll to determine which events are active.
 * Each event base has a method, or a backend that it uses to determine which events are ready. The recognized methods are: select, poll, epoll, kqueue, devpoll, evport and win32 .
 * To configure event base to use, or avoid specific backend EventConfig class can be used.
 *
 * @author Kazuaki MABUCHI
 * @copyright Copyright (https://php.net/manual/cc.license.php) by the PHP Documentation Group is licensed under [CC by 3.0 or later](https://creativecommons.org/licenses/by/3.0/).
 *
 * @see https://php.net/manual/en/class.eventbase.php
 */
final class EventBase
{
    public const LOOP_ONCE = 1;
    public const LOOP_NONBLOCK = 2;
    public const NOLOCK = 1;
    public const STARTUP_IOCP = 4;
    public const NO_CACHE_TIME = 8;
    public const EPOLL_USE_CHANGELIST = 16;
    public const IGNORE_ENV = 2;
    public const PRECISE_TIMER = 32;

    /**
     * __construct.
     * Constructs EventBase object.
     *
     * @param null|EventConfig $cfg
     *
     * @see https://php.net/manual/en/eventbase.construct.php
     */
    public function __construct(?EventConfig $cfg = null) {}

    /**
     * dispatch.
     * Dispatch pending events.
     *
     * @see https://php.net/manual/en/eventbase.dispatch.php
     */
    public function dispatch(): void {}

    /**
     * exit.
     * Stop dispatching events.
     *
     * @param float $timeout
     *
     * @return bool
     *
     * @see https://php.net/manual/en/eventbase.exit.php
     */
    public function exit(float $timeout = 0.0): bool {}

    /**
     * free.
     * Free resources allocated for this event base.
     *
     * @see https://php.net/manual/en/eventbase.free.php
     */
    public function free(): void {}

    /**
     * getFeatures.
     * Returns bitmask of features supported.
     *
     * @return int
     *
     * @see https://php.net/manual/en/eventbase.getfeatures.php
     */
    #[Pure]
    public function getFeatures(): int {}

    /**
     * getMethod.
     * Returns event method in use.
     *
     * @return string
     *
     * @see https://php.net/manual/en/eventbase.getmethod.php
     */
    #[Pure]
    public function getMethod(): string {}

    /**
     * getTimeOfDayCached.
     * Returns the current event base time.
     *
     * @return float
     *
     * @see https://php.net/manual/en/eventbase.gettimeofdaycached.php
     */
    #[Pure]
    public function getTimeOfDayCached(): float {}

    /**
     * gotExit.
     * Checks if the event loop was told to exit.
     *
     * @return bool
     *
     * @see https://php.net/manual/en/eventbase.gotexit.php
     */
    #[Pure]
    public function gotExit(): bool {}

    /**
     * gotStop.
     * Checks if the event loop was told to exit.
     *
     * @return bool
     *
     * @see https://php.net/manual/en/eventbase.gotstop.php
     */
    #[Pure]
    public function gotStop(): bool {}

    /**
     * loop.
     * Dispatch pending events.
     *
     * @param int $flags
     *
     * @return bool
     *
     * @see https://php.net/manual/en/eventbase.loop.php
     */
    public function loop(int $flags = -1): bool {}

    /**
     * priorityInit.
     * Sets number of priorities per event base.
     *
     * @param int $n_priorities
     *
     * @return bool
     *
     * @see https://php.net/manual/en/eventbase.priorityinit.php
     */
    public function priorityInit(int $n_priorities): bool {}

    /**
     * reInit.
     * Re]initialize event base(after a fork).
     *
     * @return bool
     *
     * @see https://php.net/manual/en/eventbase.reinit.php
     */
    public function reInit(): bool {}

    /**
     * Tells event_base to resume previously stopped event
     * @return bool
     * @since libevent version 2.1.2-alpha
     * @see https://bitbucket.org/osmanov/pecl-event/src/8e5ab7303f3ef7827b71f31904a51b3f26dd1ac2/php8/classes/base.c#lines-387
     */
    public function resume(): bool {}

    /**
     * stop.
     * Tells event_base to stop dispatching events.
     *
     * @return bool
     *
     * @see https://php.net/manual/en/eventbase.stop.php
     */
    public function stop(): bool {}

    /**
     * Updates cache time
     * @return bool
     * @since libevent 2.1.1-alpha
     * @see https://bitbucket.org/osmanov/pecl-event/src/8e5ab7303f3ef7827b71f31904a51b3f26dd1ac2/php8/classes/base.c#lines-343
     */
    public function updateCacheTime(): bool {}
}

// The EventBuffer class
/**
 * EventBuffer.
 * EventBuffer represents Libevent's "evbuffer", an utility functionality for buffered I/O.
 * Event buffers are meant to be generally useful for doing the "buffer" part of buffered network I/O.
 *
 * @author Kazuaki MABUCHI
 * @copyright Copyright (https://php.net/manual/cc.license.php) by the PHP Documentation Group is licensed under [CC by 3.0 or later](https://creativecommons.org/licenses/by/3.0/).
 *
 * @see https://php.net/manual/en/class.eventbuffer.php
 */
class EventBuffer
{
    /**
     * @var int
     */
    #[Immutable]
    public $length;

    /**
     * @var int
     */
    #[Immutable]
    public $contiguous_space;
    public const EOL_ANY = 0;
    public const EOL_CRLF = 1;
    public const EOL_CRLF_STRICT = 2;
    public const EOL_LF = 3;
    public const EOL_NUL = 4;
    public const PTR_SET = 0;
    public const PTR_ADD = 1;

    /**
     * __construct.
     * Constructs EventBuffer object.
     *
     * @see https://php.net/manual/en/eventbuffer.construct.php
     */
    #[Pure]
    public function __construct() {}

    /**
     * add.
     * Append data to the end of an event buffer.
     *
     * @param string $data
     *
     * @return bool
     *
     * @see https://php.net/manual/en/eventbuffer.add.php
     */
    public function add(string $data): bool {}

    /**
     * addBuffer.
     * Move all data from a buffer provided to the current instance of EventBuffer.
     *
     * @param EventBuffer $buf
     *
     * @return bool
     *
     * @see https://php.net/manual/en/eventbuffer.addbuffer.php
     */
    public function addBuffer(EventBuffer $buf): bool {}

    /**
     * appendFrom.
     * Moves the specified number of bytes from a source buffer to the end of the current buffer.
     *
     * @param EventBuffer $buf
     * @param int         $len
     *
     * @return int
     *
     * @see https://php.net/manual/en/eventbuffer.appendfrom.php
     */
    public function appendFrom(EventBuffer $buf, int $len): int {}

    /**
     * copyout.
     * Copies out specified number of bytes from the front of the buffer.
     *
     * @param string &$data
     * @param int    $max_bytes
     *
     * @return int
     *
     * @see https://php.net/manual/en/eventbuffer.copyout.php
     */
    public function copyout(string &$data, int $max_bytes): int {}

    /**
     * drain.
     * Removes specified number of bytes from the front of the buffer without copying it anywhere.
     *
     * @param int $len
     *
     * @return bool
     *
     * @see https://php.net/manual/en/eventbuffer.drain.php
     */
    public function drain(int $len): bool {}

    /**
     * enableLocking.
     *
     * @see https://php.net/manual/en/eventbuffer.enablelocking.php
     */
    public function enableLocking(): void {}

    /**
     * expand.
     * Reserves space in buffer.
     *
     * @param int $len
     *
     * @return bool
     *
     * @see https://php.net/manual/en/eventbuffer.expand.php
     */
    public function expand(int $len): bool {}

    /**
     * freeze.
     * Prevent calls that modify an event buffer from succeeding.
     *
     * @param bool $at_front
     *
     * @return bool
     *
     * @see https://php.net/manual/en/eventbuffer.freeze.php
     */
    public function freeze(bool $at_front): bool {}

    /**
     * lock.
     * Acquires a lock on buffer.
     *
     * @see https://php.net/manual/en/eventbuffer.lock.php
     */
    public function lock(): void {}

    /**
     * prepend.
     * Prepend data to the front of the buffer.
     *
     * @param string $data
     *
     * @return bool
     *
     * @see https://php.net/manual/en/eventbuffer.prepend.php
     */
    public function prepend(string $data): bool {}

    /**
     * prependBuffer.
     * Moves all data from source buffer to the front of current buffer.
     *
     * @param EventBuffer $buf
     *
     * @return bool
     *
     * @see https://php.net/manual/en/eventbuffer.prependbuffer.php
     */
    public function prependBuffer(EventBuffer $buf): bool {}

    /**
     * pullup.
     * Linearizes data within buffer and returns it's contents as a string.
     *
     * @param int $size
     *
     * @return null|string
     *
     * @see https://php.net/manual/en/eventbuffer.pullup.php
     */
    public function pullup(int $size): ?string {}

    /**
     * read.
     * Read data from an evbuffer and drain the bytes read.
     *
     * @param int $max_bytes
     *
     * @return null | string
     */
    public function read(int $max_bytes): ?string {}

    /**
     * readFrom.
     * Read data from a file onto the end of the buffer.
     *
     * @param mixed $fd
     * @param int   $howmuch
     *
     * @return int
     *
     * @see https://php.net/manual/en/eventbuffer.readfrom.php
     */
    public function readFrom($fd, int $howmuch): int {}

    /**
     * readLine.
     * Extracts a line from the front of the buffer.
     *
     * @param int $eol_style
     *
     * @return null | string
     *
     * @see https://php.net/manual/en/eventbuffer.readline.php
     */
    public function readLine(int $eol_style): ?string {}

    /**
     * search.
     * Scans the buffer for an occurrence of a string.
     *
     * @param string $what
     * @param int    $start = 1
     * @param int    $end   = 1
     *
     * @return int|false
     *
     * @see https://php.net/manual/en/eventbuffer.search.php
     */
    public function search(string $what, int $start = 1, int $end = 1): int|false {}

    /**
     * searchEol.
     * Scans the buffer for an occurrence of an end of line.
     *
     * @param int $start     = 1
     * @param int $eol_style = EOL_ANY
     *
     * @return int|false
     *
     * @see https://php.net/manual/en/eventbuffer.searcheol.php
     */
    public function searchEol(int $start = 1, int $eol_style = EventBuffer::EOL_ANY): int|false {}

    /**
     * substr.
     * Substracts a portion of the buffer data.
     *
     * @param int $start
     * @param int $length (optional)
     *
     * @return string
     *
     * @see https://php.net/manual/en/eventbuffer.substr.php
     */
    public function substr(int $start, int $length): string {}

    /**
     * unfreeze.
     * Re-enable calls that modify an event buffer.
     *
     * @param bool $at_front
     *
     * @return bool
     *
     * @see https://php.net/manual/en/eventbuffer.unfreeze.php
     */
    public function unfreeze(bool $at_front): bool {}

    /**
     * unlock.
     * Releases lock acquired by EventBuffer::lock.
     *
     * @return void
     *
     * @see https://php.net/manual/en/eventbuffer.unlock.php
     */
    public function unlock(): void {}

    /**
     * write.
     * Write contents of the buffer to a file or socket.
     *
     * @param mixed $fd
     * @param int $howmuch (optional)
     *
     * @return int|false
     *
     * @see https://php.net/manual/en/eventbuffer.write.php
     */
    public function write(mixed $fd, int $howmuch): int|false {}
}

// The EventBufferEvent class
/**
 * EventBufferEvent.
 * Represents Libevent's buffer event.
 * Usually an application wants to perform some amount of data buffering in addition to just responding to events. When we want to write data, for example, the usual pattern looks like:
 * Decide that we want to write some data to a connection; put that data in a buffer.
 * Wait for the connection to become writable
 * Write as much of the data as we can
 * Remember how much we wrote, and if we still have more data to write, wait for the connection to become writable again.
 * This buffered I/O pattern is common enough that Libevent provides a generic mechanism for it. A "buffer event" consists of an underlying transport (like a socket), a read buffer, and a write buffer. Instead of regular events, which give callbacks when the underlying transport is ready to be read or written, a buffer event invokes its user-supplied callbacks when it has read or written enough data.
 *
 * @author Kazuaki MABUCHI
 * @copyright Copyright (https://php.net/manual/cc.license.php) by the PHP Documentation Group is licensed under [CC by 3.0 or later](https://creativecommons.org/licenses/by/3.0/).
 *
 * @see https://php.net/manual/en/class.eventbufferevent.php
 */
final class EventBufferEvent
{
    /** @var int */
    public $fd;

    /** @var int */
    public $priority;

    /**
     * @var EventBuffer
     */
    #[Immutable]
    public $input;

    /**
     * @var EventBuffer
     */
    #[Immutable]
    public $output;
    public const READING = 1;
    public const WRITING = 2;
    public const EOF = 16;
    public const ERROR = 32;
    public const TIMEOUT = 64;
    public const CONNECTED = 128;
    public const OPT_CLOSE_ON_FREE = 1;
    public const OPT_THREADSAFE = 2;
    public const OPT_DEFER_CALLBACKS = 4;
    public const OPT_UNLOCK_CALLBACKS = 8;
    public const SSL_OPEN = 0;
    public const SSL_CONNECTING = 1;
    public const SSL_ACCEPTING = 2;

    /**
     * __construct.
     * Constructs EventBufferEvent object.
     *
     * @param EventBase $base
     * @param mixed     $socket  = null
     * @param int       $options = 0
     * @param null|callable $readcb  = null
     * @param null|callable $writecb = null
     * @param null|callable $eventcb = null
     *
     * @see https://php.net/manual/en/eventbufferevent.construct.php
     */
    #[Pure]
    public function __construct(EventBase $base, $socket = null, int $options = 0, ?callable $readcb = null, ?callable $writecb = null, ?callable $eventcb = null) {}

    /**
     * close.
     * Closes file descriptor associated with the current buffer event.
     * @return bool
     * @see https://php.net/manual/en/eventbufferevent.close.php
     */
    public function close(): bool {}

    /**
     * connect.
     * Connect buffer event's file descriptor to given address or UNIX socket.
     *
     * @param string $addr
     *
     * @return bool
     *
     * @see https://php.net/manual/en/eventbufferevent.connect.php
     */
    public function connect(string $addr): bool {}

    /**
     * connectHost.
     * Connects to a hostname with optionally asyncronous DNS.
     *
     * @param null|EventDnsBase $dns_base
     * @param string       $hostname
     * @param int          $port
     * @param int          $family   = EventUtil::AF_UNSPEC
     *
     * @return bool
     *
     * @see https://php.net/manual/en/eventbufferevent.connecthost.php
     */
    public function connectHost(?EventDnsBase $dns_base, string $hostname, int $port, int $family = EventUtil::AF_UNSPEC): bool {}

    /**
     * createSslFilter
     *
     * @param EventBufferEvent $underlying
     * @param EventSslContext $ctx
     * @param int $state
     * @param int $options
     * @return EventBufferEvent
     * @see https://bitbucket.org/osmanov/pecl-event/src/8e5ab7303f3ef7827b71f31904a51b3f26dd1ac2/php8/classes/buffer_event.c#lines-1025
     */
    public function createSslFilter(EventBufferEvent $underlying, EventSslContext $ctx, int $state, int $options = 0): EventBufferEvent {}

    /**
     * createPair.
     * Creates two buffer events connected to each other.
     *
     * @param EventBase $base
     * @param int       $options = 0
     *
     * @return array
     *
     * @see https://php.net/manual/en/eventbufferevent.createpair.php
     */
    public static function createPair(EventBase $base, int $options = 0): array {}

    /**
     * disable.
     * Disable events read, write, or both on a buffer event.
     *
     * @param int $events
     *
     * @return bool
     *
     * @see https://php.net/manual/en/eventbufferevent.disable.php
     */
    public function disable(int $events): bool {}

    /**
     * enable.
     * Enable events read, write, or both on a buffer event.
     *
     * @param int $events
     *
     * @return bool
     *
     * @see https://php.net/manual/en/eventbufferevent.enable.php
     */
    public function enable(int $events): bool {}

    /**
     * free.
     * Free a buffer event.
     *
     * @see https://php.net/manual/en/eventbufferevent.free.php
     */
    public function free(): void {}

    /**
     * getDnsErrorString.
     * Returns string describing the last failed DNS lookup attempt.
     *
     * @return string
     *
     * @see https://php.net/manual/en/eventbufferevent.getdnserrorstring.php
     */
    #[Pure]
    public function getDnsErrorString(): string {}

    /**
     * getEnabled.
     * Returns bitmask of events currently enabled on the buffer event.
     *
     * @return int
     *
     * @see https://php.net/manual/en/eventbufferevent.getenabled.php
     */
    #[Pure]
    public function getEnabled(): int {}

    /**
     * getInput.
     * Returns underlying input buffer associated with current buffer event.
     *
     * @return EventBuffer
     *
     * @see https://php.net/manual/en/eventbufferevent.getinput.php
     */
    #[Pure]
    public function getInput(): EventBuffer {}

    /**
     * getOutput.
     * Returns underlying output buffer associated with current buffer event.
     *
     * @return EventBuffer
     *
     * @see https://php.net/manual/en/eventbufferevent.getoutput.php
     */
    #[Pure]
    public function getOutput(): EventBuffer {}

    /**
     * read.
     * Read buffer's data.
     *
     * @param int $size
     *
     * @return null|string
     *
     * @see https://php.net/manual/en/eventbufferevent.read.php
     */
    public function read(int $size): ?string {}

    /**
     * readBuffer.
     * Drains the entire contents of the input buffer and places them into buf.
     *
     * @param EventBuffer $buf
     *
     * @return bool
     *
     * @see https://php.net/manual/en/eventbufferevent.readbuffer.php
     */
    public function readBuffer(EventBuffer $buf): bool {}

    /**
     * setCallbacks.
     * Assigns read, write and event(status) callbacks.
     *
     * @param callable $readcb
     * @param callable $writecb
     * @param callable $eventcb
     * @param string   $arg     (optional)
     *
     * @see https://php.net/manual/en/eventbufferevent.setcallbacks.php
     */
    public function setCallbacks(callable $readcb, callable $writecb, callable $eventcb, mixed $arg = null): void {}

    /**
     * setPriority.
     * Assign a priority to a bufferevent.
     *
     * @param int $priority
     *
     * @return bool
     *
     * @see https://php.net/manual/en/eventbufferevent.setpriority.php
     */
    public function setPriority(int $priority): bool {}

    /**
     * setTimeouts.
     * Set the read and write timeout for a buffer event.
     *
     * @param float $timeout_read
     * @param float $timeout_write
     *
     * @return bool
     *
     * @see https://php.net/manual/en/eventbufferevent.settimeouts.php
     */
    public function setTimeouts(float $timeout_read, float $timeout_write): bool {}

    /**
     * setWatermark.
     * Adjusts read and/or write watermarks.
     *
     * @param int $events
     * @param int $lowmark
     * @param int $highmark
     *
     * @see https://php.net/manual/en/eventbufferevent.setwatermark.php
     */
    public function setWatermark(int $events, int $lowmark, int $highmark): void {}

    /**
     * sslError.
     * Returns most recent OpenSSL error reported on the buffer event.
     *
     * @return false|string
     *
     * @see https://secure.php.net/manual/en/eventbufferevent.sslerror.php
     */
    public function sslError(): false|string {}

    /**
     * sslFilter.
     * Create a new SSL buffer event to send its data over another buffer event.
     *
     * @param EventBase        $base
     * @param EventBufferEvent $underlying
     * @param EventSslContext  $ctx
     * @param int              $state
     * @param int              $options    = 0
     *
     * @return EventBufferEvent
     *
     * @see https://secure.php.net/manual/en/eventbufferevent.sslfilter.php
     */
    public static function sslFilter(EventBase $base, EventBufferEvent $underlying, EventSslContext $ctx, int $state, int $options = 0): EventBufferEvent {}

    /**
     * sslGetCipherInfo.
     * Returns a textual description of the cipher.
     *
     * @return string|false
     *
     * @see https://secure.php.net/manual/en/eventbufferevent.sslgetcipherinfo.php
     */
    public function sslGetCipherInfo(): string|false {}

    /**
     * sslGetCipherName.
     * Returns the current cipher name of the SSL connection.
     *
     * @return string|false
     *
     * @see https://secure.php.net/manual/en/eventbufferevent.sslgetciphername.php
     */
    public function sslGetCipherName(): string|false {}

    /**
     * sslGetCipherVersion.
     * Returns version of cipher used by current SSL connection.
     *
     * @return string|false
     *
     * @see https://secure.php.net/manual/en/eventbufferevent.sslgetcipherversion.php
     */
    public function sslGetCipherVersion(): string|false {}

    /**
     * sslGetProtocol.
     * Returns the name of the protocol used for current SSL.
     *
     * @return string
     *
     * @see https://secure.php.net/manual/en/eventbufferevent.sslgetprotocol.php
     */
    public function sslGetProtocol(): string {}

    /**
     * sslRenegotiate.
     * Tells a bufferevent to begin SSL renegotiation.
     *
     * @see https://secure.php.net/manual/en/eventbufferevent.sslrenegotiate.php
     */
    public function sslRenegotiate(): void {}

    /**
     * sslSocket.
     * Creates a new SSL buffer event to send its data over an SSL on a socket.
     *
     * @param EventBase $base
     * @param mixed $socket
     * @param EventSslContext $ctx
     * @param int $state
     * @param int $options (optional)
     *
     * @return EventBufferEvent
     *
     * @see https://secure.php.net/manual/en/eventbufferevent.sslsocket.php
     */
    public static function sslSocket(EventBase $base, mixed $socket, EventSslContext $ctx, int $state, int $options = 0): EventBufferEvent {}

    /**
     * write.
     * Adds data to a buffer event's output buffer.
     *
     * @param string $data
     *
     * @return bool
     *
     * @see https://secure.php.net/manual/en/eventbufferevent.write.php
     */
    public function write(string $data): bool {}

    /**
     * writeBuffer.
     * Adds contents of the entire buffer to a buffer event's output buffer.
     *
     * @param EventBuffer $buf
     *
     * @return bool
     *
     * @see https://secure.php.net/manual/en/eventbufferevent.writebuffer.php
     */
    public function writeBuffer(EventBuffer $buf): bool {}
}

// The EventConfig class
/**
 * EventConfig.
 * Represents configuration structure which could be used in construction of the EventBase .
 *
 * @author Kazuaki MABUCHI
 * @copyright Copyright (https://secure.php.net/manual/cc.license.php) by the PHP Documentation Group is licensed under [CC by 3.0 or later](https://creativecommons.org/licenses/by/3.0/).
 *
 * @see https://secure.php.net/manual/en/class.eventconfig.php
 */
final class EventConfig
{
    public const FEATURE_ET = 1;
    public const FEATURE_O1 = 2;
    public const FEATURE_FDS = 4;

    /**
     * __construct.
     * Constructs EventConfig object.
     *
     * @see https://secure.php.net/manual/en/eventconfig.construct.php
     */
    #[Pure]
    public function __construct() {}

    /**
     * avoidMethod.
     * Tells libevent to avoid specific event method.
     *
     * @param string $method
     *
     * @return bool
     *
     * @see https://secure.php.net/manual/en/eventconfig.avoidmethod.php
     */
    public function avoidMethod(string $method): bool {}

    /**
     * requireFeatures.
     * Enters a required event method feature that the application demands.
     *
     * @param int $feature
     *
     * @return bool
     *
     * @see https://secure.php.net/manual/en/eventconfig.requirefeatures.php
     */
    public function requireFeatures(int $feature): bool {}

    /**
     * Sets one or more flags to configure what parts of the eventual EventBase
     * will be initialized, and how they'll work
     * @param int $flags
     * @return bool
     * @since libevent version 2.0.2-alpha
     */
    public function setFlags(int $flags): bool {}

    /**
     * setMaxDispatchInterval.
     * Prevents priority inversion.
     *
     * @param int $max_interval
     * @param int $max_callbacks
     * @param int $min_priority
     *
     * @see https://secure.php.net/manual/en/eventconfig.setmaxdispatchinterval.php
     */
    public function setMaxDispatchInterval(int $max_interval, int $max_callbacks, int $min_priority): void {}
}

// The EventDnsBase class
/**
 * EventDnsBase.
 * Represents Libevent's DNS base structure. Used to resolve DNS asyncronously, parse configuration files like resolv.conf etc.
 *
 * @author Kazuaki MABUCHI
 * @copyright Copyright (https://secure.php.net/manual/cc.license.php) by the PHP Documentation Group is licensed under [CC by 3.0 or later](https://creativecommons.org/licenses/by/3.0/).
 *
 * @see https://secure.php.net/manual/en/class.eventdnsbase.php
 */
final class EventDnsBase
{
    public const OPTION_SEARCH = 1;
    public const OPTION_NAMESERVERS = 2;
    public const OPTION_MISC = 4;
    public const OPTION_HOSTSFILE = 8;
    public const OPTIONS_ALL = 15;

    /**
     * __construct.
     * Constructs EventDnsBase object.
     *
     * @param EventBase $base
     * @param bool      $initialize
     *
     * @see https://secure.php.net/manual/en/eventdnsbase.construct.php
     */
    #[Pure]
    public function __construct(EventBase $base, bool $initialize) {}

    /**
     * addNameserverIp.
     * Adds a nameserver to the DNS base.
     *
     * @param string $ip
     *
     * @return bool
     *
     * @see https://secure.php.net/manual/en/eventdnsbase.addnameserverip.php
     */
    public function addNameserverIp(string $ip): bool {}

    /**
     * addSearch.
     * Adds a domain to the list of search domains.
     *
     * @param string $domain
     *
     * @see https://secure.php.net/manual/en/eventdnsbase.addsearch.php
     */
    public function addSearch(string $domain): void {}

    /**
     * clearSearch.
     * Removes all current search suffixes.
     *
     * @see https://secure.php.net/manual/en/eventdnsbase.clearsearch.php
     */
    public function clearSearch(): void {}

    /**
     * countNameservers.
     * Gets the number of configured nameservers.
     *
     * @return int
     *
     * @see https://secure.php.net/manual/en/eventdnsbase.countnameservers.php
     */
    public function countNameservers(): int {}

    /**
     * loadHosts.
     * Loads a hosts file (in the same format as /etc/hosts) from hosts file.
     *
     * @param string $hosts
     *
     * @return bool
     *
     * @see https://secure.php.net/manual/en/eventdnsbase.loadhosts.php
     */
    public function loadHosts(string $hosts): bool {}

    /**
     * parseResolvConf.
     * Scans the resolv.conf-formatted file.
     *
     * @param int    $flags
     * @param string $filename
     *
     * @return bool
     *
     * @see https://secure.php.net/manual/en/eventdnsbase.parseresolvconf.php
     */
    public function parseResolvConf(int $flags, string $filename): bool {}

    /**
     * setOption.
     * Set the value of a configuration option.
     *
     * @param string $option
     * @param string $value
     *
     * @return bool
     *
     * @see https://secure.php.net/manual/en/eventdnsbase.setoption.php
     */
    public function setOption(string $option, string $value): bool {}

    /**
     * setSearchNdots.
     * Set the 'ndots' parameter for searches.
     *
     * @param int $ndots
     *
     * @return void
     *
     * @see https://secure.php.net/manual/en/eventdnsbase.setsearchndots.php
     */
    public function setSearchNdots(int $ndots): void {}
}

// The EventHttp class
/**
 * EventHttp.
 * Represents HTTP server.
 *
 * @author Kazuaki MABUCHI
 * @copyright Copyright (https://secure.php.net/manual/cc.license.php) by the PHP Documentation Group is licensed under [CC by 3.0 or later](https://creativecommons.org/licenses/by/3.0/).
 *
 * @see https://secure.php.net/manual/en/class.eventhttp.php
 */
final class EventHttp
{
    /**
     * __construct.
     * Constructs EventHttp object(the HTTP server).
     *
     * @param EventBase       $base
     * @param null|EventSslContext $ctx
     *
     * @see https://secure.php.net/manual/en/eventhttp.construct.php
     */
    public function __construct(EventBase $base, ?EventSslContext $ctx = null) {}

    /**
     * accept.
     * Makes an HTTP server accept connections on the specified socket stream or resource.
     *
     * @param mixed $socket
     *
     * @return bool
     *
     * @see https://secure.php.net/manual/en/eventhttp.accept.php
     */
    public function accept(mixed $socket): bool {}

    /**
     * addServerAlias.
     * Adds a server alias to the HTTP server object.
     *
     * @param string $alias
     *
     * @return bool
     *
     * @see https://secure.php.net/manual/en/eventhttp.addserveralias.php
     */
    public function addServerAlias(string $alias): bool {}

    /**
     * bind.
     * Binds an HTTP server on the specified address and port.
     *
     * @param string $address
     * @param int    $port
     * @return bool
     *
     * @see https://secure.php.net/manual/en/eventhttp.bind.php
     */
    public function bind(string $address, int $port): bool {}

    /**
     * removeServerAlias.
     * Removes server alias.
     *
     * @param string $alias
     *
     * @return bool
     *
     * @see https://secure.php.net/manual/en/eventhttp.removeserveralias.php
     */
    public function removeServerAlias(string $alias): bool {}

    /**
     * setAllowedMethods.
     * Sets the what HTTP methods are supported in requests accepted by this server, and passed to user callbacks.
     *
     * @param int $methods
     *
     * @see https://secure.php.net/manual/en/eventhttp.setallowedmethods.php
     */
    public function setAllowedMethods(int $methods): void {}

    /**
     * setCallback.
     * Sets a callback for specified URI.
     *
     * @param string $path
     * @param string $cb
     * @param null|string $arg (optional)
     * @return bool
     * @see https://secure.php.net/manual/en/eventhttp.setcallback.php
     */
    public function setCallback(string $path, string $cb, ?string $arg = null): bool {}

    /**
     * setDefaultCallback.
     * Sets default callback to handle requests that are not caught by specific callbacks.
     *
     * @param string $cb
     * @param null|string $arg (optional)
     *
     * @see https://secure.php.net/manual/en/eventhttp.setdefaultcallback.php
     */
    public function setDefaultCallback(string $cb, ?string $arg = null): void {}

    /**
     * setMaxBodySize.
     * Sets maximum request body size.
     *
     * @param int $value
     *
     * @see https://secure.php.net/manual/en/eventhttp.setmaxbodysize.php
     */
    public function setMaxBodySize(int $value): void {}

    /**
     * setMaxHeadersSize.
     * Sets maximum HTTP header size.
     *
     * @param int $value
     *
     * @see https://secure.php.net/manual/en/eventhttp.setmaxheaderssize.php
     */
    public function setMaxHeadersSize(int $value): void {}

    /**
     * setTimeout.
     * Sets the timeout for an HTTP request.
     *
     * @param int $value
     *
     * @see https://secure.php.net/manual/en/eventhttp.settimeout.php
     */
    public function setTimeout(int $value): void {}
}

// The EventHttpConnection class
/**
 * EventHttpConnection.
 * Represents an HTTP connection.
 *
 * @author Kazuaki MABUCHI
 * @copyright Copyright (https://secure.php.net/manual/cc.license.php) by the PHP Documentation Group is licensed under [CC by 3.0 or later](https://creativecommons.org/licenses/by/3.0/).
 *
 * @see https://secure.php.net/manual/en/class.eventhttpconnection.php
 */
class EventHttpConnection
{
    /**
     * __construct.
     * Constructs EventHttpConnection object.
     *
     * @param EventBase       $base
     * @param EventDnsBase    $dns_base
     * @param string          $address
     * @param int             $port
     * @param null|EventSslContext $ctx
     *
     * @see https://secure.php.net/manual/en/eventhttpconnection.construct.php
     */
    #[Pure]
    public function __construct(EventBase $base, EventDnsBase $dns_base, string $address, int $port, ?EventSslContext $ctx = null) {}

    /**
     * getBase.
     * Returns event base associated with the connection.
     *
     * @return false|EventBase
     *
     * @see https://secure.php.net/manual/en/eventhttpconnection.getbase.php
     */
    public function getBase(): false|EventBase {}

    /**
     * getPeer.
     * Gets the remote address and port associated with the connection.
     *
     * @param string &$address
     * @param int    &$port
     *
     * @see https://secure.php.net/manual/en/eventhttpconnection.getpeer.php
     */
    public function getPeer(string &$address, int &$port): void {}

    /**
     * makeRequest.
     * Makes an HTTP request over the specified connection.
     *
     * @param EventHttpRequest $req
     * @param int              $type
     * @param string           $uri
     *
     * @return bool
     *
     * @see https://secure.php.net/manual/en/eventhttpconnection.makerequest.php
     */
    public function makeRequest(EventHttpRequest $req, int $type, string $uri): bool {}

    /**
     * setCloseCallback.
     * Set callback for connection close.
     *
     * @param callable $callback
     * @param mixed    $data     (optional)
     *
     * @see https://secure.php.net/manual/en/eventhttpconnection.setclosecallback.php
     */
    public function setCloseCallback(callable $callback, mixed $data = null): void {}

    /**
     * setLocalAddress.
     * Sets the IP address from which HTTP connections are made.
     *
     * @param string $address
     *
     * @see https://secure.php.net/manual/en/eventhttpconnection.setlocaladdress.php
     */
    public function setLocalAddress(string $address): void {}

    /**
     * setLocalPort.
     * Sets the local port from which connections are made.
     *
     * @param int $port
     *
     * @see https://secure.php.net/manual/en/eventhttpconnection.setlocalport.php
     */
    public function setLocalPort(int $port): void {}

    /**
     * setMaxBodySize.
     * Sets maximum body size for the connection.
     *
     * @param string $max_size
     *
     * @see https://secure.php.net/manual/en/eventhttpconnection.setmaxbodysize.php
     */
    public function setMaxBodySize(string $max_size): void {}

    /**
     * setMaxHeadersSize.
     * Sets maximum header size.
     *
     * @param string $max_size
     *
     * @see https://secure.php.net/manual/en/eventhttpconnection.setmaxheaderssize.php
     */
    public function setMaxHeadersSize(string $max_size): void {}

    /**
     * setRetries.
     * Sets the retry limit for the connection.
     *
     * @param int $retries
     *
     * @see https://secure.php.net/manual/en/eventhttpconnection.setretries.php
     */
    public function setRetries(int $retries): void {}

    /**
     * setTimeout.
     * Sets the timeout for the connection.
     *
     * @param int $timeout
     *
     * @see https://secure.php.net/manual/en/eventhttpconnection.settimeout.php
     */
    public function setTimeout(int $timeout): void {}
}

// The EventHttpRequest class
class EventHttpRequest
{
    public const CMD_GET = 1;
    public const CMD_POST = 2;
    public const CMD_HEAD = 4;
    public const CMD_PUT = 8;
    public const CMD_DELETE = 16;
    public const CMD_OPTIONS = 32;
    public const CMD_TRACE = 64;
    public const CMD_CONNECT = 128;
    public const CMD_PATCH = 256;
    public const INPUT_HEADER = 1;
    public const OUTPUT_HEADER = 2;

    /**
     * EventHttpRequest constructor.
     * @param callable $callback
     * @param mixed $data
     */
    #[Pure]
    public function __construct(
        callable $callback,
        $data = null
    ) {}

    public function addHeader(string $key, string $value, int $type): bool {}

    public function cancel(): void {}

    public function clearHeaders(): void {}

    public function closeConnection(): void {}

    public function findHeader(string $key, string $type): ?string {}

    public function free() {}

    #[Pure]
    public function getCommand(): int {}

    #[Pure]
    public function getConnection(): ?EventHttpConnection {}

    #[Pure]
    public function getHost(): string {}

    #[Pure]
    public function getInputBuffer(): EventBuffer {}

    #[Pure]
    public function getInputHeaders(): array {}

    #[Pure]
    public function getOutputBuffer(): EventBuffer {}

    #[Pure]
    public function getOutputHeaders(): array {}

    #[Pure]
    public function getResponseCode(): int {}

    #[Pure]
    public function getUri(): string {}

    public function removeHeader(string $key, int $type): bool {}

    public function sendError(int $error, ?string $reason = null) {}

    public function sendReply(int $code, string $reason, ?EventBuffer $buf = null) {}

    public function sendReplyChunk(EventBuffer $buf) {}

    public function sendReplyEnd(): void {}

    public function sendReplyStart(int $code, string $reason): void {}
}

//  The EventListener class
/**
 * EventListener.
 * Represents a connection listener.
 *
 * @author Kazuaki MABUCHI
 * @copyright Copyright (https://secure.php.net/manual/cc.license.php) by the PHP Documentation Group is licensed under [CC by 3.0 or later](https://creativecommons.org/licenses/by/3.0/).
 *
 * @see https://secure.php.net/manual/en/class.eventlistener.php
 */
final class EventListener
{
    /**
     * @var int
     */
    #[Immutable]
    public $fd;
    public const OPT_LEAVE_SOCKETS_BLOCKING = 1;
    public const OPT_CLOSE_ON_FREE = 2;
    public const OPT_CLOSE_ON_EXEC = 4;
    public const OPT_REUSEABLE = 8;
    public const OPT_THREADSAFE = 16;
    public const OPT_DISABLED = 32;
    public const OPT_DEFERRED_ACCEPT = 64;

    /**
     * __construct.
     * Creates new connection listener associated with an event base.
     *
     * @param EventBase $base
     * @param callable  $cb
     * @param mixed     $data
     * @param int       $flags
     * @param int       $backlog
     * @param mixed     $target
     *
     * @see https://secure.php.net/manual/en/eventlistener.construct.php
     */
    public function __construct(EventBase $base, callable $cb, mixed $data, int $flags, int $backlog, mixed $target) {}

    /**
     * disable.
     * Disables an event connect listener object.
     *
     * @return bool
     *
     * @see https://secure.php.net/manual/en/eventlistener.disable.php
     */
    public function disable(): bool {}

    /**
     * enable.
     * Enables an event connect listener object.
     *
     * @return bool
     *
     * @see https://secure.php.net/manual/en/eventlistener.enable.php
     */
    public function enable(): bool {}

    public function free(): void {}

    /**
     * getBase.
     * Returns event base associated with the event listener.
     *
     * @see https://secure.php.net/manual/en/eventlistener.getbase.php
     */
    public function getBase(): void {}

    /**
     * getSocketName.
     * Retreives the current address to which the listener's socket is bound.
     *
     * @param string &$address
     * @param mixed  &$port
     *
     * @return bool
     *
     * @see https://secure.php.net/manual/en/eventlistener.getsocketname.php
     */
    public static function getSocketName(string &$address, int &$port): bool {}

    /**
     * setCallback.
     * The setCallback purpose.
     *
     * @param callable $cb
     * @param mixed    $arg = null
     *
     * @see https://secure.php.net/manual/en/eventlistener.setcallback.php
     */
    public function setCallback(callable $cb, mixed $arg = null): void {}

    /**
     * setErrorCallback.
     * Set event listener's error callback.
     *
     * @param string $cb
     *
     * @see https://secure.php.net/manual/en/eventlistener.seterrorcallback.php
     */
    public function setErrorCallback(string $cb): void {}
}

//  The EventSslContext class
/**
 * EventSslContext.
 * Represents SSL_CTX structure. Provides methods and properties to configure the SSL context.
 *
 *
 * @author Kazuaki MABUCHI
 * @copyright Copyright (https://secure.php.net/manual/cc.license.php) by the PHP Documentation Group is licensed under [CC by 3.0 or later](https://creativecommons.org/licenses/by/3.0/).
 *
 * @see https://secure.php.net/manual/en/class.eventsslcontext.php
 */
final class EventSslContext
{
    public const SSLv2_CLIENT_METHOD = 1;
    public const SSLv3_CLIENT_METHOD = 2;
    public const SSLv23_CLIENT_METHOD = 3;
    public const TLS_CLIENT_METHOD = 4;
    public const SSLv2_SERVER_METHOD = 5;
    public const SSLv3_SERVER_METHOD = 6;
    public const SSLv23_SERVER_METHOD = 7;
    public const TLS_SERVER_METHOD = 8;
    public const TLSv11_CLIENT_METHOD = 9;
    public const TLSv11_SERVER_METHOD = 10;
    public const TLSv12_CLIENT_METHOD = 11;
    public const TLSv12_SERVER_METHOD = 12;
    public const OPT_LOCAL_CERT = 1;
    public const OPT_LOCAL_PK = 2;
    public const OPT_PASSPHRASE = 3;
    public const OPT_CA_FILE = 4;
    public const OPT_CA_PATH = 5;
    public const OPT_ALLOW_SELF_SIGNED = 6;
    public const OPT_VERIFY_PEER = 7;
    public const OPT_VERIFY_DEPTH = 8;
    public const OPT_CIPHERS = 9;
    public const OPT_NO_SSLv2 = 10;
    public const OPT_NO_SSLv3 = 11;
    public const OPT_NO_TLSv1 = 12;
    public const OPT_NO_TLSv1_1 = 13;
    public const OPT_NO_TLSv1_2 = 14;
    public const OPT_CIPHER_SERVER_PREFERENCE = 15;
    public const OPT_REQUIRE_CLIENT_CERT = 16;
    public const OPT_VERIFY_CLIENT_ONCE = 17;

    /**
     * @var string
     */
    public $local_cert;

    /**
     * @var string
     */
    public $local_pk;

    /**
     * __construct.
     * Constructs an OpenSSL context for use with Event classes.
     *
     * @param int $method
     * @param array $options
     *
     * @see https://secure.php.net/manual/en/eventsslcontext.construct.php
     */
    #[Pure]
    public function __construct(int $method, array $options) {}

    /**
     * Sets minimum supported protocol version for the SSL context
     * @param int $proto
     * @return bool
     */
    public function setMinProtoVersion(int $proto): bool {}

    /**
     * Sets max supported protocol version for the SSL context.
     * @param int $proto
     * @return bool
     */
    public function setMaxProtoVersion(int $proto): bool {}
}

// The EventUtil class
/**
 * EventUtil.
 * EventUtil is a singleton with supplimentary methods and constants.
 *
 * @author Kazuaki MABUCHI
 * @copyright Copyright (https://secure.php.net/manual/cc.license.php) by the PHP Documentation Group is licensed under [CC by 3.0 or later](https://creativecommons.org/licenses/by/3.0/).
 *
 * @see https://secure.php.net/manual/en/class.eventutil.php
 */
final class EventUtil
{
    public const AF_INET = 2;
    public const AF_INET6 = 10;
    public const AF_UNIX = 1;
    public const AF_UNSPEC = 0;
    public const LIBEVENT_VERSION_NUMBER = 33559808;
    public const SO_DEBUG = 1;
    public const SO_REUSEADDR = 2;
    public const SO_KEEPALIVE = 9;
    public const SO_DONTROUTE = 5;
    public const SO_LINGER = 13;
    public const SO_BROADCAST = 6;
    public const SO_OOBINLINE = 10;
    public const SO_SNDBUF = 7;
    public const SO_RCVBUF = 8;
    public const SO_SNDLOWAT = 19;
    public const SO_RCVLOWAT = 18;
    public const SO_SNDTIMEO = 21;
    public const SO_RCVTIMEO = 20;
    public const SO_TYPE = 3;
    public const SO_ERROR = 4;
    public const SOL_SOCKET = 1;
    public const SOL_TCP = 6;
    public const SOL_UDP = 17;
    public const SOCK_RAW = 3;
    public const TCP_NODELAY = 1;
    public const IPPROTO_IP = 0;
    public const IPPROTO_IPV6 = 41;

    /**
     * __construct.
     * The abstract constructor.
     *
     * @see https://secure.php.net/manual/en/eventutil.construct.php
     */
    abstract public function __construct();

    /**
     * @param mixed $socket
     * @return resource
     */
    public function createSocket(mixed $socket) {}

    /**
     * getLastSocketErrno.
     * Returns the most recent socket error number.
     *
     * @param mixed $socket = null
     *
     * @return int|false
     *
     * @see https://secure.php.net/manual/en/eventutil.getlastsocketerrno.php
     */
    public static function getLastSocketErrno($socket = null): int|false {}

    /**
     * getLastSocketError.
     * Returns the most recent socket error.
     *
     * @param mixed $socket
     *
     * @return string|false
     *
     * @see https://secure.php.net/manual/en/eventutil.getlastsocketerror.php
     */
    public static function getLastSocketError(mixed $socket): string|false {}

    /**
     * getSocketFd.
     * Returns numeric file descriptor of a socket, or stream.
     *
     * @param mixed $socket
     *
     * @return int
     *
     * @see https://secure.php.net/manual/en/eventutil.getsocketfd.php
     */
    public static function getSocketFd(mixed $socket): int {}

    /**
     * getSocketName.
     * Retreives the current address to which the socket is bound.
     *
     * @param mixed $socket
     * @param string &$address
     * @param mixed  &$port
     *
     * @return bool
     *
     * @see https://secure.php.net/manual/en/eventutil.getsocketname.php
     */
    public static function getSocketName(mixed $socket, string &$address, int &$port): bool {}

    /**
     * setSocketOption.
     * Sets socket options.
     *
     * @param mixed $socket
     * @param int   $level
     * @param int   $optname
     * @param int|array $optval
     *
     * @return bool
     *
     * @see https://secure.php.net/manual/en/eventutil.setsocketoption.php
     */
    public static function setSocketOption(mixed $socket, int $level, int $optname, int|array $optval): bool {}

    /**
     * sslRandPoll.
     * Generates entropy by means of OpenSSL's RAND_poll().
     *
     * @see https://secure.php.net/manual/en/eventutil.sslrandpoll.php
     */
    public static function sslRandPoll(): bool {}
}
<?php

/**
 * @param resource $hconn
 * @param resource &$compCode
 * @param resource &$reason
 */
function mqseries_back($hconn, &$compCode, &$reason) {}

/**
 * @param resource $hconn
 * @param array $beginOptions
 * @param resource &$compCode
 * @param resource &$reason
 */
function mqseries_begin($hconn, array $beginOptions, &$compCode, &$reason) {}

/**
 * @param resource $hconn
 * @param resource $hobj
 * @param int $options
 * @param resource &$compCode
 * @param resource &$reason
 */
function mqseries_close($hconn, $hobj, $options, &$compCode, &$reason) {}

/**
 * @param resource $hconn
 * @param resource &$compCode
 * @param resource &$reason
 */
function mqseries_cmit($hconn, &$compCode, &$reason) {}

/**
 * @param string $qManagerName
 * @param resource &$hconn
 * @param resource &$compCode
 * @param resource &$reason
 */
function mqseries_conn($qManagerName, &$hconn, &$compCode, &$reason) {}

/**
 * @param string $qManagerName
 * @param array &$connOptions
 * @param resource &$hconn
 * @param resource &$compCode
 * @param resource &$reason
 */
function mqseries_connx($qManagerName, array &$connOptions, &$hconn, &$compCode, &$reason) {}

/**
 * @param resource $hconn
 * @param resource &$compCode
 * @param resource &$reason
 */
function mqseries_disc($hconn, &$compCode, &$reason) {}

/**
 * @param resource $hConn
 * @param resource $hObj
 * @param array &$md
 * @param array &$gmo
 * @param int &$bufferLength
 * @param string &$msg
 * @param int &$data_length
 * @param resource &$compCode
 * @param resource &$reason
 */
function mqseries_get($hConn, $hObj, array &$md, array &$gmo, &$bufferLength, &$msg, &$data_length, &$compCode, &$reason) {}

/**
 * @param resource $hconn
 * @param resource $hobj
 * @param int $selectorCount
 * @param array $selectors
 * @param int $intAttrCount
 * @param resource &$intAttr
 * @param int $charAttrLength
 * @param resource &$charAttr
 * @param resource &$compCode
 * @param resource &$reason
 */
function mqseries_inq($hconn, $hobj, $selectorCount, array $selectors, $intAttrCount, &$intAttr, $charAttrLength, &$charAttr, &$compCode, &$reason) {}

/**
 * @param resource $hconn
 * @param array &$objDesc
 * @param int $option
 * @param resource &$hobj
 * @param resource &$compCode
 * @param resource &$reason
 */
function mqseries_open($hconn, array &$objDesc, $option, &$hobj, &$compCode, &$reason) {}

/**
 * @param resource $hconn
 * @param resource &$objDesc
 * @param resource &$msgDesc
 * @param resource &$pmo
 * @param string &$buffer
 * @param resource &$compCode
 * @param resource &$reason
 */
function mqseries_put1($hconn, &$objDesc, &$msgDesc, &$pmo, $buffer, &$compCode, &$reason) {}

/**
 * @param resource $hConn
 * @param resource $hObj
 * @param array &$md
 * @param array &$pmo
 * @param string $message
 * @param resource &$compCode
 * @param resource &$reason
 */
function mqseries_put($hConn, $hObj, array &$md, array &$pmo, $message, &$compCode, &$reason) {}

/**
 * @param resource $hconn
 * @param resource $hobj
 * @param int $selectorcount
 * @param array $selectors
 * @param int $intattrcount
 * @param array $intattrs
 * @param int $charattrlength
 * @param array $charattrs
 * @param resource &$compCode
 * @param resource &$reason
 */
function mqseries_set($hconn, $hobj, $selectorcount, array $selectors, $intattrcount, array $intattrs, $charattrlength, array $charattrs, &$compCode, &$reason) {}

/**
 * @param int $reason
 *
 * @return string
 */
function mqseries_strerror($reason)
{
    return (string)$reason;
}

/*
 * To obtain the list below, execute   print_r(get_defined_constants(true)['mqseries']);  and then reformat
 */
define('MQSERIES_MQCC_OK', 0);
define('MQSERIES_MQCC_WARNING', 1);
define('MQSERIES_MQCC_FAILED', 2);
define('MQSERIES_MQCC_UNKNOWN', -1);
define('MQSERIES_MQRC_NONE', 0);
define('MQSERIES_MQRC_APPL_FIRST', 900);
define('MQSERIES_MQRC_APPL_LAST', 999);
define('MQSERIES_MQRC_ALIAS_BASE_Q_TYPE_ERROR', 2001);
define('MQSERIES_MQRC_ALREADY_CONNECTED', 2002);
define('MQSERIES_MQRC_BACKED_OUT', 2003);
define('MQSERIES_MQRC_BUFFER_ERROR', 2004);
define('MQSERIES_MQRC_BUFFER_LENGTH_ERROR', 2005);
define('MQSERIES_MQRC_CHAR_ATTR_LENGTH_ERROR', 2006);
define('MQSERIES_MQRC_CHAR_ATTRS_ERROR', 2007);
define('MQSERIES_MQRC_CHAR_ATTRS_TOO_SHORT', 2008);
define('MQSERIES_MQRC_CONNECTION_BROKEN', 2009);
define('MQSERIES_MQRC_DATA_LENGTH_ERROR', 2010);
define('MQSERIES_MQRC_DYNAMIC_Q_NAME_ERROR', 2011);
define('MQSERIES_MQRC_ENVIRONMENT_ERROR', 2012);
define('MQSERIES_MQRC_EXPIRY_ERROR', 2013);
define('MQSERIES_MQRC_FEEDBACK_ERROR', 2014);
define('MQSERIES_MQRC_GET_INHIBITED', 2016);
define('MQSERIES_MQRC_HANDLE_NOT_AVAILABLE', 2017);
define('MQSERIES_MQRC_HCONN_ERROR', 2018);
define('MQSERIES_MQRC_HOBJ_ERROR', 2019);
define('MQSERIES_MQRC_INHIBIT_VALUE_ERROR', 2020);
define('MQSERIES_MQRC_INT_ATTR_COUNT_ERROR', 2021);
define('MQSERIES_MQRC_INT_ATTR_COUNT_TOO_SMALL', 2022);
define('MQSERIES_MQRC_INT_ATTRS_ARRAY_ERROR', 2023);
define('MQSERIES_MQRC_SYNCPOINT_LIMIT_REACHED', 2024);
define('MQSERIES_MQRC_MAX_CONNS_LIMIT_REACHED', 2025);
define('MQSERIES_MQRC_MD_ERROR', 2026);
define('MQSERIES_MQRC_MISSING_REPLY_TO_Q', 2027);
define('MQSERIES_MQRC_MSG_TYPE_ERROR', 2029);
define('MQSERIES_MQRC_MSG_TOO_BIG_FOR_Q', 2030);
define('MQSERIES_MQRC_MSG_TOO_BIG_FOR_Q_MGR', 2031);
define('MQSERIES_MQRC_NO_MSG_AVAILABLE', 2033);
define('MQSERIES_MQRC_NO_MSG_UNDER_CURSOR', 2034);
define('MQSERIES_MQRC_NOT_AUTHORIZED', 2035);
define('MQSERIES_MQRC_NOT_OPEN_FOR_BROWSE', 2036);
define('MQSERIES_MQRC_NOT_OPEN_FOR_INPUT', 2037);
define('MQSERIES_MQRC_NOT_OPEN_FOR_INQUIRE', 2038);
define('MQSERIES_MQRC_NOT_OPEN_FOR_OUTPUT', 2039);
define('MQSERIES_MQRC_NOT_OPEN_FOR_SET', 2040);
define('MQSERIES_MQRC_OBJECT_CHANGED', 2041);
define('MQSERIES_MQRC_OBJECT_IN_USE', 2042);
define('MQSERIES_MQRC_OBJECT_TYPE_ERROR', 2043);
define('MQSERIES_MQRC_OD_ERROR', 2044);
define('MQSERIES_MQRC_OPTION_NOT_VALID_FOR_TYPE', 2045);
define('MQSERIES_MQRC_OPTIONS_ERROR', 2046);
define('MQSERIES_MQRC_PERSISTENCE_ERROR', 2047);
define('MQSERIES_MQRC_PERSISTENT_NOT_ALLOWED', 2048);
define('MQSERIES_MQRC_PRIORITY_EXCEEDS_MAXIMUM', 2049);
define('MQSERIES_MQRC_PRIORITY_ERROR', 2050);
define('MQSERIES_MQRC_PUT_INHIBITED', 2051);
define('MQSERIES_MQRC_Q_DELETED', 2052);
define('MQSERIES_MQRC_Q_FULL', 2053);
define('MQSERIES_MQRC_Q_NOT_EMPTY', 2055);
define('MQSERIES_MQRC_Q_SPACE_NOT_AVAILABLE', 2056);
define('MQSERIES_MQRC_Q_TYPE_ERROR', 2057);
define('MQSERIES_MQRC_Q_MGR_NAME_ERROR', 2058);
define('MQSERIES_MQRC_Q_MGR_NOT_AVAILABLE', 2059);
define('MQSERIES_MQRC_REPORT_OPTIONS_ERROR', 2061);
define('MQSERIES_MQRC_SECOND_MARK_NOT_ALLOWED', 2062);
define('MQSERIES_MQRC_SECURITY_ERROR', 2063);
define('MQSERIES_MQRC_SELECTOR_COUNT_ERROR', 2065);
define('MQSERIES_MQRC_SELECTOR_LIMIT_EXCEEDED', 2066);
define('MQSERIES_MQRC_SELECTOR_ERROR', 2067);
define('MQSERIES_MQRC_SELECTOR_NOT_FOR_TYPE', 2068);
define('MQSERIES_MQRC_SIGNAL_OUTSTANDING', 2069);
define('MQSERIES_MQRC_SIGNAL_REQUEST_ACCEPTED', 2070);
define('MQSERIES_MQRC_STORAGE_NOT_AVAILABLE', 2071);
define('MQSERIES_MQRC_SYNCPOINT_NOT_AVAILABLE', 2072);
define('MQSERIES_MQRC_TRIGGER_CONTROL_ERROR', 2075);
define('MQSERIES_MQRC_TRIGGER_DEPTH_ERROR', 2076);
define('MQSERIES_MQRC_TRIGGER_MSG_PRIORITY_ERR', 2077);
define('MQSERIES_MQRC_TRIGGER_TYPE_ERROR', 2078);
define('MQSERIES_MQRC_TRUNCATED_MSG_ACCEPTED', 2079);
define('MQSERIES_MQRC_TRUNCATED_MSG_FAILED', 2080);
define('MQSERIES_MQRC_UNKNOWN_ALIAS_BASE_Q', 2082);
define('MQSERIES_MQRC_UNKNOWN_OBJECT_NAME', 2085);
define('MQSERIES_MQRC_UNKNOWN_OBJECT_Q_MGR', 2086);
define('MQSERIES_MQRC_UNKNOWN_REMOTE_Q_MGR', 2087);
define('MQSERIES_MQRC_WAIT_INTERVAL_ERROR', 2090);
define('MQSERIES_MQRC_XMIT_Q_TYPE_ERROR', 2091);
define('MQSERIES_MQRC_XMIT_Q_USAGE_ERROR', 2092);
define('MQSERIES_MQRC_NOT_OPEN_FOR_PASS_ALL', 2093);
define('MQSERIES_MQRC_NOT_OPEN_FOR_PASS_IDENT', 2094);
define('MQSERIES_MQRC_NOT_OPEN_FOR_SET_ALL', 2095);
define('MQSERIES_MQRC_NOT_OPEN_FOR_SET_IDENT', 2096);
define('MQSERIES_MQRC_CONTEXT_HANDLE_ERROR', 2097);
define('MQSERIES_MQRC_CONTEXT_NOT_AVAILABLE', 2098);
define('MQSERIES_MQRC_SIGNAL1_ERROR', 2099);
define('MQSERIES_MQRC_OBJECT_ALREADY_EXISTS', 2100);
define('MQSERIES_MQRC_OBJECT_DAMAGED', 2101);
define('MQSERIES_MQRC_RESOURCE_PROBLEM', 2102);
define('MQSERIES_MQRC_ANOTHER_Q_MGR_CONNECTED', 2103);
define('MQSERIES_MQRC_UNKNOWN_REPORT_OPTION', 2104);
define('MQSERIES_MQRC_STORAGE_CLASS_ERROR', 2105);
define('MQSERIES_MQRC_COD_NOT_VALID_FOR_XCF_Q', 2106);
define('MQSERIES_MQRC_XWAIT_CANCELED', 2107);
define('MQSERIES_MQRC_XWAIT_ERROR', 2108);
define('MQSERIES_MQRC_SUPPRESSED_BY_EXIT', 2109);
define('MQSERIES_MQRC_FORMAT_ERROR', 2110);
define('MQSERIES_MQRC_SOURCE_CCSID_ERROR', 2111);
define('MQSERIES_MQRC_SOURCE_INTEGER_ENC_ERROR', 2112);
define('MQSERIES_MQRC_SOURCE_DECIMAL_ENC_ERROR', 2113);
define('MQSERIES_MQRC_SOURCE_FLOAT_ENC_ERROR', 2114);
define('MQSERIES_MQRC_TARGET_CCSID_ERROR', 2115);
define('MQSERIES_MQRC_TARGET_INTEGER_ENC_ERROR', 2116);
define('MQSERIES_MQRC_TARGET_DECIMAL_ENC_ERROR', 2117);
define('MQSERIES_MQRC_TARGET_FLOAT_ENC_ERROR', 2118);
define('MQSERIES_MQRC_NOT_CONVERTED', 2119);
define('MQSERIES_MQRC_CONVERTED_MSG_TOO_BIG', 2120);
define('MQSERIES_MQRC_TRUNCATED', 2120);
define('MQSERIES_MQRC_NO_EXTERNAL_PARTICIPANTS', 2121);
define('MQSERIES_MQRC_PARTICIPANT_NOT_AVAILABLE', 2122);
define('MQSERIES_MQRC_OUTCOME_MIXED', 2123);
define('MQSERIES_MQRC_OUTCOME_PENDING', 2124);
define('MQSERIES_MQRC_BRIDGE_STARTED', 2125);
define('MQSERIES_MQRC_BRIDGE_STOPPED', 2126);
define('MQSERIES_MQRC_ADAPTER_STORAGE_SHORTAGE', 2127);
define('MQSERIES_MQRC_UOW_IN_PROGRESS', 2128);
define('MQSERIES_MQRC_ADAPTER_CONN_LOAD_ERROR', 2129);
define('MQSERIES_MQRC_ADAPTER_SERV_LOAD_ERROR', 2130);
define('MQSERIES_MQRC_ADAPTER_DEFS_ERROR', 2131);
define('MQSERIES_MQRC_ADAPTER_DEFS_LOAD_ERROR', 2132);
define('MQSERIES_MQRC_ADAPTER_CONV_LOAD_ERROR', 2133);
define('MQSERIES_MQRC_BO_ERROR', 2134);
define('MQSERIES_MQRC_DH_ERROR', 2135);
define('MQSERIES_MQRC_MULTIPLE_REASONS', 2136);
define('MQSERIES_MQRC_OPEN_FAILED', 2137);
define('MQSERIES_MQRC_ADAPTER_DISC_LOAD_ERROR', 2138);
define('MQSERIES_MQRC_CNO_ERROR', 2139);
define('MQSERIES_MQRC_CICS_WAIT_FAILED', 2140);
define('MQSERIES_MQRC_DLH_ERROR', 2141);
define('MQSERIES_MQRC_HEADER_ERROR', 2142);
define('MQSERIES_MQRC_SOURCE_LENGTH_ERROR', 2143);
define('MQSERIES_MQRC_TARGET_LENGTH_ERROR', 2144);
define('MQSERIES_MQRC_SOURCE_BUFFER_ERROR', 2145);
define('MQSERIES_MQRC_TARGET_BUFFER_ERROR', 2146);
define('MQSERIES_MQRC_IIH_ERROR', 2148);
define('MQSERIES_MQRC_PCF_ERROR', 2149);
define('MQSERIES_MQRC_DBCS_ERROR', 2150);
define('MQSERIES_MQRC_OBJECT_NAME_ERROR', 2152);
define('MQSERIES_MQRC_OBJECT_Q_MGR_NAME_ERROR', 2153);
define('MQSERIES_MQRC_RECS_PRESENT_ERROR', 2154);
define('MQSERIES_MQRC_OBJECT_RECORDS_ERROR', 2155);
define('MQSERIES_MQRC_RESPONSE_RECORDS_ERROR', 2156);
define('MQSERIES_MQRC_ASID_MISMATCH', 2157);
define('MQSERIES_MQRC_PMO_RECORD_FLAGS_ERROR', 2158);
define('MQSERIES_MQRC_PUT_MSG_RECORDS_ERROR', 2159);
define('MQSERIES_MQRC_CONN_ID_IN_USE', 2160);
define('MQSERIES_MQRC_Q_MGR_QUIESCING', 2161);
define('MQSERIES_MQRC_Q_MGR_STOPPING', 2162);
define('MQSERIES_MQRC_DUPLICATE_RECOV_COORD', 2163);
define('MQSERIES_MQRC_PMO_ERROR', 2173);
define('MQSERIES_MQRC_API_EXIT_NOT_FOUND', 2182);
define('MQSERIES_MQRC_API_EXIT_LOAD_ERROR', 2183);
define('MQSERIES_MQRC_REMOTE_Q_NAME_ERROR', 2184);
define('MQSERIES_MQRC_INCONSISTENT_PERSISTENCE', 2185);
define('MQSERIES_MQRC_GMO_ERROR', 2186);
define('MQSERIES_MQRC_CICS_BRIDGE_RESTRICTION', 2187);
define('MQSERIES_MQRC_STOPPED_BY_CLUSTER_EXIT', 2188);
define('MQSERIES_MQRC_CLUSTER_RESOLUTION_ERROR', 2189);
define('MQSERIES_MQRC_CONVERTED_STRING_TOO_BIG', 2190);
define('MQSERIES_MQRC_TMC_ERROR', 2191);
define('MQSERIES_MQRC_PAGESET_FULL', 2192);
define('MQSERIES_MQRC_STORAGE_MEDIUM_FULL', 2192);
define('MQSERIES_MQRC_PAGESET_ERROR', 2193);
define('MQSERIES_MQRC_NAME_NOT_VALID_FOR_TYPE', 2194);
define('MQSERIES_MQRC_UNEXPECTED_ERROR', 2195);
define('MQSERIES_MQRC_UNKNOWN_XMIT_Q', 2196);
define('MQSERIES_MQRC_UNKNOWN_DEF_XMIT_Q', 2197);
define('MQSERIES_MQRC_DEF_XMIT_Q_TYPE_ERROR', 2198);
define('MQSERIES_MQRC_DEF_XMIT_Q_USAGE_ERROR', 2199);
define('MQSERIES_MQRC_MSG_MARKED_BROWSE_CO_OP', 2200);
define('MQSERIES_MQRC_NAME_IN_USE', 2201);
define('MQSERIES_MQRC_CONNECTION_QUIESCING', 2202);
define('MQSERIES_MQRC_CONNECTION_STOPPING', 2203);
define('MQSERIES_MQRC_ADAPTER_NOT_AVAILABLE', 2204);
define('MQSERIES_MQRC_MSG_ID_ERROR', 2206);
define('MQSERIES_MQRC_CORREL_ID_ERROR', 2207);
define('MQSERIES_MQRC_FILE_SYSTEM_ERROR', 2208);
define('MQSERIES_MQRC_NO_MSG_LOCKED', 2209);
define('MQSERIES_MQRC_SOAP_DOTNET_ERROR', 2210);
define('MQSERIES_MQRC_SOAP_AXIS_ERROR', 2211);
define('MQSERIES_MQRC_SOAP_URL_ERROR', 2212);
define('MQSERIES_MQRC_FILE_NOT_AUDITED', 2216);
define('MQSERIES_MQRC_CONNECTION_NOT_AUTHORIZED', 2217);
define('MQSERIES_MQRC_MSG_TOO_BIG_FOR_CHANNEL', 2218);
define('MQSERIES_MQRC_CALL_IN_PROGRESS', 2219);
define('MQSERIES_MQRC_RMH_ERROR', 2220);
define('MQSERIES_MQRC_Q_MGR_ACTIVE', 2222);
define('MQSERIES_MQRC_Q_MGR_NOT_ACTIVE', 2223);
define('MQSERIES_MQRC_Q_DEPTH_HIGH', 2224);
define('MQSERIES_MQRC_Q_DEPTH_LOW', 2225);
define('MQSERIES_MQRC_Q_SERVICE_INTERVAL_HIGH', 2226);
define('MQSERIES_MQRC_Q_SERVICE_INTERVAL_OK', 2227);
define('MQSERIES_MQRC_RFH_HEADER_FIELD_ERROR', 2228);
define('MQSERIES_MQRC_RAS_PROPERTY_ERROR', 2229);
define('MQSERIES_MQRC_UNIT_OF_WORK_NOT_STARTED', 2232);
define('MQSERIES_MQRC_CHANNEL_AUTO_DEF_OK', 2233);
define('MQSERIES_MQRC_CHANNEL_AUTO_DEF_ERROR', 2234);
define('MQSERIES_MQRC_CFH_ERROR', 2235);
define('MQSERIES_MQRC_CFIL_ERROR', 2236);
define('MQSERIES_MQRC_CFIN_ERROR', 2237);
define('MQSERIES_MQRC_CFSL_ERROR', 2238);
define('MQSERIES_MQRC_CFST_ERROR', 2239);
define('MQSERIES_MQRC_INCOMPLETE_GROUP', 2241);
define('MQSERIES_MQRC_INCOMPLETE_MSG', 2242);
define('MQSERIES_MQRC_INCONSISTENT_CCSIDS', 2243);
define('MQSERIES_MQRC_INCONSISTENT_ENCODINGS', 2244);
define('MQSERIES_MQRC_INCONSISTENT_UOW', 2245);
define('MQSERIES_MQRC_INVALID_MSG_UNDER_CURSOR', 2246);
define('MQSERIES_MQRC_MATCH_OPTIONS_ERROR', 2247);
define('MQSERIES_MQRC_MDE_ERROR', 2248);
define('MQSERIES_MQRC_MSG_FLAGS_ERROR', 2249);
define('MQSERIES_MQRC_MSG_SEQ_NUMBER_ERROR', 2250);
define('MQSERIES_MQRC_OFFSET_ERROR', 2251);
define('MQSERIES_MQRC_ORIGINAL_LENGTH_ERROR', 2252);
define('MQSERIES_MQRC_SEGMENT_LENGTH_ZERO', 2253);
define('MQSERIES_MQRC_UOW_NOT_AVAILABLE', 2255);
define('MQSERIES_MQRC_WRONG_GMO_VERSION', 2256);
define('MQSERIES_MQRC_WRONG_MD_VERSION', 2257);
define('MQSERIES_MQRC_GROUP_ID_ERROR', 2258);
define('MQSERIES_MQRC_INCONSISTENT_BROWSE', 2259);
define('MQSERIES_MQRC_XQH_ERROR', 2260);
define('MQSERIES_MQRC_SRC_ENV_ERROR', 2261);
define('MQSERIES_MQRC_SRC_NAME_ERROR', 2262);
define('MQSERIES_MQRC_DEST_ENV_ERROR', 2263);
define('MQSERIES_MQRC_DEST_NAME_ERROR', 2264);
define('MQSERIES_MQRC_TM_ERROR', 2265);
define('MQSERIES_MQRC_CLUSTER_EXIT_ERROR', 2266);
define('MQSERIES_MQRC_CLUSTER_EXIT_LOAD_ERROR', 2267);
define('MQSERIES_MQRC_CLUSTER_PUT_INHIBITED', 2268);
define('MQSERIES_MQRC_CLUSTER_RESOURCE_ERROR', 2269);
define('MQSERIES_MQRC_NO_DESTINATIONS_AVAILABLE', 2270);
define('MQSERIES_MQRC_CONN_TAG_IN_USE', 2271);
define('MQSERIES_MQRC_PARTIALLY_CONVERTED', 2272);
define('MQSERIES_MQRC_CONNECTION_ERROR', 2273);
define('MQSERIES_MQRC_OPTION_ENVIRONMENT_ERROR', 2274);
define('MQSERIES_MQRC_CD_ERROR', 2277);
define('MQSERIES_MQRC_CLIENT_CONN_ERROR', 2278);
define('MQSERIES_MQRC_CHANNEL_STOPPED_BY_USER', 2279);
define('MQSERIES_MQRC_HCONFIG_ERROR', 2280);
define('MQSERIES_MQRC_FUNCTION_ERROR', 2281);
define('MQSERIES_MQRC_CHANNEL_STARTED', 2282);
define('MQSERIES_MQRC_CHANNEL_STOPPED', 2283);
define('MQSERIES_MQRC_CHANNEL_CONV_ERROR', 2284);
define('MQSERIES_MQRC_SERVICE_NOT_AVAILABLE', 2285);
define('MQSERIES_MQRC_INITIALIZATION_FAILED', 2286);
define('MQSERIES_MQRC_TERMINATION_FAILED', 2287);
define('MQSERIES_MQRC_UNKNOWN_Q_NAME', 2288);
define('MQSERIES_MQRC_SERVICE_ERROR', 2289);
define('MQSERIES_MQRC_Q_ALREADY_EXISTS', 2290);
define('MQSERIES_MQRC_USER_ID_NOT_AVAILABLE', 2291);
define('MQSERIES_MQRC_UNKNOWN_ENTITY', 2292);
define('MQSERIES_MQRC_UNKNOWN_AUTH_ENTITY', 2293);
define('MQSERIES_MQRC_UNKNOWN_REF_OBJECT', 2294);
define('MQSERIES_MQRC_CHANNEL_ACTIVATED', 2295);
define('MQSERIES_MQRC_CHANNEL_NOT_ACTIVATED', 2296);
define('MQSERIES_MQRC_UOW_CANCELED', 2297);
define('MQSERIES_MQRC_FUNCTION_NOT_SUPPORTED', 2298);
define('MQSERIES_MQRC_SELECTOR_TYPE_ERROR', 2299);
define('MQSERIES_MQRC_COMMAND_TYPE_ERROR', 2300);
define('MQSERIES_MQRC_MULTIPLE_INSTANCE_ERROR', 2301);
define('MQSERIES_MQRC_SYSTEM_ITEM_NOT_ALTERABLE', 2302);
define('MQSERIES_MQRC_BAG_CONVERSION_ERROR', 2303);
define('MQSERIES_MQRC_SELECTOR_OUT_OF_RANGE', 2304);
define('MQSERIES_MQRC_SELECTOR_NOT_UNIQUE', 2305);
define('MQSERIES_MQRC_INDEX_NOT_PRESENT', 2306);
define('MQSERIES_MQRC_STRING_ERROR', 2307);
define('MQSERIES_MQRC_ENCODING_NOT_SUPPORTED', 2308);
define('MQSERIES_MQRC_SELECTOR_NOT_PRESENT', 2309);
define('MQSERIES_MQRC_OUT_SELECTOR_ERROR', 2310);
define('MQSERIES_MQRC_STRING_TRUNCATED', 2311);
define('MQSERIES_MQRC_SELECTOR_WRONG_TYPE', 2312);
define('MQSERIES_MQRC_INCONSISTENT_ITEM_TYPE', 2313);
define('MQSERIES_MQRC_INDEX_ERROR', 2314);
define('MQSERIES_MQRC_SYSTEM_BAG_NOT_ALTERABLE', 2315);
define('MQSERIES_MQRC_ITEM_COUNT_ERROR', 2316);
define('MQSERIES_MQRC_FORMAT_NOT_SUPPORTED', 2317);
define('MQSERIES_MQRC_SELECTOR_NOT_SUPPORTED', 2318);
define('MQSERIES_MQRC_ITEM_VALUE_ERROR', 2319);
define('MQSERIES_MQRC_HBAG_ERROR', 2320);
define('MQSERIES_MQRC_PARAMETER_MISSING', 2321);
define('MQSERIES_MQRC_CMD_SERVER_NOT_AVAILABLE', 2322);
define('MQSERIES_MQRC_STRING_LENGTH_ERROR', 2323);
define('MQSERIES_MQRC_INQUIRY_COMMAND_ERROR', 2324);
define('MQSERIES_MQRC_NESTED_BAG_NOT_SUPPORTED', 2325);
define('MQSERIES_MQRC_BAG_WRONG_TYPE', 2326);
define('MQSERIES_MQRC_ITEM_TYPE_ERROR', 2327);
define('MQSERIES_MQRC_SYSTEM_BAG_NOT_DELETABLE', 2328);
define('MQSERIES_MQRC_SYSTEM_ITEM_NOT_DELETABLE', 2329);
define('MQSERIES_MQRC_CODED_CHAR_SET_ID_ERROR', 2330);
define('MQSERIES_MQRC_MSG_TOKEN_ERROR', 2331);
define('MQSERIES_MQRC_MISSING_WIH', 2332);
define('MQSERIES_MQRC_WIH_ERROR', 2333);
define('MQSERIES_MQRC_RFH_ERROR', 2334);
define('MQSERIES_MQRC_RFH_STRING_ERROR', 2335);
define('MQSERIES_MQRC_RFH_COMMAND_ERROR', 2336);
define('MQSERIES_MQRC_RFH_PARM_ERROR', 2337);
define('MQSERIES_MQRC_RFH_DUPLICATE_PARM', 2338);
define('MQSERIES_MQRC_RFH_PARM_MISSING', 2339);
define('MQSERIES_MQRC_CHAR_CONVERSION_ERROR', 2340);
define('MQSERIES_MQRC_UCS2_CONVERSION_ERROR', 2341);
define('MQSERIES_MQRC_DB2_NOT_AVAILABLE', 2342);
define('MQSERIES_MQRC_OBJECT_NOT_UNIQUE', 2343);
define('MQSERIES_MQRC_CONN_TAG_NOT_RELEASED', 2344);
define('MQSERIES_MQRC_CF_NOT_AVAILABLE', 2345);
define('MQSERIES_MQRC_CF_STRUC_IN_USE', 2346);
define('MQSERIES_MQRC_CF_STRUC_LIST_HDR_IN_USE', 2347);
define('MQSERIES_MQRC_CF_STRUC_AUTH_FAILED', 2348);
define('MQSERIES_MQRC_CF_STRUC_ERROR', 2349);
define('MQSERIES_MQRC_CONN_TAG_NOT_USABLE', 2350);
define('MQSERIES_MQRC_GLOBAL_UOW_CONFLICT', 2351);
define('MQSERIES_MQRC_LOCAL_UOW_CONFLICT', 2352);
define('MQSERIES_MQRC_HANDLE_IN_USE_FOR_UOW', 2353);
define('MQSERIES_MQRC_UOW_ENLISTMENT_ERROR', 2354);
define('MQSERIES_MQRC_UOW_MIX_NOT_SUPPORTED', 2355);
define('MQSERIES_MQRC_WXP_ERROR', 2356);
define('MQSERIES_MQRC_CURRENT_RECORD_ERROR', 2357);
define('MQSERIES_MQRC_NEXT_OFFSET_ERROR', 2358);
define('MQSERIES_MQRC_NO_RECORD_AVAILABLE', 2359);
define('MQSERIES_MQRC_OBJECT_LEVEL_INCOMPATIBLE', 2360);
define('MQSERIES_MQRC_NEXT_RECORD_ERROR', 2361);
define('MQSERIES_MQRC_BACKOUT_THRESHOLD_REACHED', 2362);
define('MQSERIES_MQRC_MSG_NOT_MATCHED', 2363);
define('MQSERIES_MQRC_JMS_FORMAT_ERROR', 2364);
define('MQSERIES_MQRC_SEGMENTS_NOT_SUPPORTED', 2365);
define('MQSERIES_MQRC_WRONG_CF_LEVEL', 2366);
define('MQSERIES_MQRC_CONFIG_CREATE_OBJECT', 2367);
define('MQSERIES_MQRC_CONFIG_CHANGE_OBJECT', 2368);
define('MQSERIES_MQRC_CONFIG_DELETE_OBJECT', 2369);
define('MQSERIES_MQRC_CONFIG_REFRESH_OBJECT', 2370);
define('MQSERIES_MQRC_CHANNEL_SSL_ERROR', 2371);
define('MQSERIES_MQRC_PARTICIPANT_NOT_DEFINED', 2372);
define('MQSERIES_MQRC_CF_STRUC_FAILED', 2373);
define('MQSERIES_MQRC_API_EXIT_ERROR', 2374);
define('MQSERIES_MQRC_API_EXIT_INIT_ERROR', 2375);
define('MQSERIES_MQRC_API_EXIT_TERM_ERROR', 2376);
define('MQSERIES_MQRC_EXIT_REASON_ERROR', 2377);
define('MQSERIES_MQRC_RESERVED_VALUE_ERROR', 2378);
define('MQSERIES_MQRC_NO_DATA_AVAILABLE', 2379);
define('MQSERIES_MQRC_SCO_ERROR', 2380);
define('MQSERIES_MQRC_KEY_REPOSITORY_ERROR', 2381);
define('MQSERIES_MQRC_CRYPTO_HARDWARE_ERROR', 2382);
define('MQSERIES_MQRC_AUTH_INFO_REC_COUNT_ERROR', 2383);
define('MQSERIES_MQRC_AUTH_INFO_REC_ERROR', 2384);
define('MQSERIES_MQRC_AIR_ERROR', 2385);
define('MQSERIES_MQRC_AUTH_INFO_TYPE_ERROR', 2386);
define('MQSERIES_MQRC_AUTH_INFO_CONN_NAME_ERROR', 2387);
define('MQSERIES_MQRC_LDAP_USER_NAME_ERROR', 2388);
define('MQSERIES_MQRC_LDAP_USER_NAME_LENGTH_ERR', 2389);
define('MQSERIES_MQRC_LDAP_PASSWORD_ERROR', 2390);
define('MQSERIES_MQRC_SSL_ALREADY_INITIALIZED', 2391);
define('MQSERIES_MQRC_SSL_CONFIG_ERROR', 2392);
define('MQSERIES_MQRC_SSL_INITIALIZATION_ERROR', 2393);
define('MQSERIES_MQRC_Q_INDEX_TYPE_ERROR', 2394);
define('MQSERIES_MQRC_CFBS_ERROR', 2395);
define('MQSERIES_MQRC_SSL_NOT_ALLOWED', 2396);
define('MQSERIES_MQRC_JSSE_ERROR', 2397);
define('MQSERIES_MQRC_SSL_PEER_NAME_MISMATCH', 2398);
define('MQSERIES_MQRC_SSL_PEER_NAME_ERROR', 2399);
define('MQSERIES_MQRC_UNSUPPORTED_CIPHER_SUITE', 2400);
define('MQSERIES_MQRC_SSL_CERTIFICATE_REVOKED', 2401);
define('MQSERIES_MQRC_SSL_CERT_STORE_ERROR', 2402);
define('MQSERIES_MQRC_CLIENT_EXIT_LOAD_ERROR', 2406);
define('MQSERIES_MQRC_CLIENT_EXIT_ERROR', 2407);
define('MQSERIES_MQRC_UOW_COMMITTED', 2408);
define('MQSERIES_MQRC_SSL_KEY_RESET_ERROR', 2409);
define('MQSERIES_MQRC_UNKNOWN_COMPONENT_NAME', 2410);
define('MQSERIES_MQRC_LOGGER_STATUS', 2411);
define('MQSERIES_MQRC_COMMAND_MQSC', 2412);
define('MQSERIES_MQRC_COMMAND_PCF', 2413);
define('MQSERIES_MQRC_CFIF_ERROR', 2414);
define('MQSERIES_MQRC_CFSF_ERROR', 2415);
define('MQSERIES_MQRC_CFGR_ERROR', 2416);
define('MQSERIES_MQRC_MSG_NOT_ALLOWED_IN_GROUP', 2417);
define('MQSERIES_MQRC_FILTER_OPERATOR_ERROR', 2418);
define('MQSERIES_MQRC_NESTED_SELECTOR_ERROR', 2419);
define('MQSERIES_MQRC_EPH_ERROR', 2420);
define('MQSERIES_MQRC_RFH_FORMAT_ERROR', 2421);
define('MQSERIES_MQRC_CFBF_ERROR', 2422);
define('MQSERIES_MQRC_CLIENT_CHANNEL_CONFLICT', 2423);
define('MQSERIES_MQRC_SD_ERROR', 2424);
define('MQSERIES_MQRC_TOPIC_STRING_ERROR', 2425);
define('MQSERIES_MQRC_STS_ERROR', 2426);
define('MQSERIES_MQRC_NO_SUBSCRIPTION', 2428);
define('MQSERIES_MQRC_SUBSCRIPTION_IN_USE', 2429);
define('MQSERIES_MQRC_STAT_TYPE_ERROR', 2430);
define('MQSERIES_MQRC_SUB_USER_DATA_ERROR', 2431);
define('MQSERIES_MQRC_SUB_ALREADY_EXISTS', 2432);
define('MQSERIES_MQRC_IDENTITY_MISMATCH', 2434);
define('MQSERIES_MQRC_ALTER_SUB_ERROR', 2435);
define('MQSERIES_MQRC_DURABILITY_NOT_ALLOWED', 2436);
define('MQSERIES_MQRC_NO_RETAINED_MSG', 2437);
define('MQSERIES_MQRC_SRO_ERROR', 2438);
define('MQSERIES_MQRC_SUB_NAME_ERROR', 2440);
define('MQSERIES_MQRC_OBJECT_STRING_ERROR', 2441);
define('MQSERIES_MQRC_PROPERTY_NAME_ERROR', 2442);
define('MQSERIES_MQRC_SEGMENTATION_NOT_ALLOWED', 2443);
define('MQSERIES_MQRC_CBD_ERROR', 2444);
define('MQSERIES_MQRC_CTLO_ERROR', 2445);
define('MQSERIES_MQRC_NO_CALLBACKS_ACTIVE', 2446);
define('MQSERIES_MQRC_CALLBACK_NOT_REGISTERED', 2448);
define('MQSERIES_MQRC_OPTIONS_CHANGED', 2457);
define('MQSERIES_MQRC_READ_AHEAD_MSGS', 2458);
define('MQSERIES_MQRC_SELECTOR_SYNTAX_ERROR', 2459);
define('MQSERIES_MQRC_HMSG_ERROR', 2460);
define('MQSERIES_MQRC_CMHO_ERROR', 2461);
define('MQSERIES_MQRC_DMHO_ERROR', 2462);
define('MQSERIES_MQRC_SMPO_ERROR', 2463);
define('MQSERIES_MQRC_IMPO_ERROR', 2464);
define('MQSERIES_MQRC_PROPERTY_NAME_TOO_BIG', 2465);
define('MQSERIES_MQRC_PROP_VALUE_NOT_CONVERTED', 2466);
define('MQSERIES_MQRC_PROP_TYPE_NOT_SUPPORTED', 2467);
define('MQSERIES_MQRC_PROPERTY_VALUE_TOO_BIG', 2469);
define('MQSERIES_MQRC_PROP_CONV_NOT_SUPPORTED', 2470);
define('MQSERIES_MQRC_PROPERTY_NOT_AVAILABLE', 2471);
define('MQSERIES_MQRC_PROP_NUMBER_FORMAT_ERROR', 2472);
define('MQSERIES_MQRC_PROPERTY_TYPE_ERROR', 2473);
define('MQSERIES_MQRC_PROPERTIES_TOO_BIG', 2478);
define('MQSERIES_MQRC_PUT_NOT_RETAINED', 2479);
define('MQSERIES_MQRC_ALIAS_TARGTYPE_CHANGED', 2480);
define('MQSERIES_MQRC_DMPO_ERROR', 2481);
define('MQSERIES_MQRC_PD_ERROR', 2482);
define('MQSERIES_MQRC_CALLBACK_TYPE_ERROR', 2483);
define('MQSERIES_MQRC_CBD_OPTIONS_ERROR', 2484);
define('MQSERIES_MQRC_MAX_MSG_LENGTH_ERROR', 2485);
define('MQSERIES_MQRC_CALLBACK_ROUTINE_ERROR', 2486);
define('MQSERIES_MQRC_CALLBACK_LINK_ERROR', 2487);
define('MQSERIES_MQRC_OPERATION_ERROR', 2488);
define('MQSERIES_MQRC_BMHO_ERROR', 2489);
define('MQSERIES_MQRC_UNSUPPORTED_PROPERTY', 2490);
define('MQSERIES_MQRC_PROP_NAME_NOT_CONVERTED', 2492);
define('MQSERIES_MQRC_GET_ENABLED', 2494);
define('MQSERIES_MQRC_MODULE_NOT_FOUND', 2495);
define('MQSERIES_MQRC_MODULE_INVALID', 2496);
define('MQSERIES_MQRC_MODULE_ENTRY_NOT_FOUND', 2497);
define('MQSERIES_MQRC_MIXED_CONTENT_NOT_ALLOWED', 2498);
define('MQSERIES_MQRC_MSG_HANDLE_IN_USE', 2499);
define('MQSERIES_MQRC_HCONN_ASYNC_ACTIVE', 2500);
define('MQSERIES_MQRC_MHBO_ERROR', 2501);
define('MQSERIES_MQRC_PUBLICATION_FAILURE', 2502);
define('MQSERIES_MQRC_SUB_INHIBITED', 2503);
define('MQSERIES_MQRC_SELECTOR_ALWAYS_FALSE', 2504);
define('MQSERIES_MQRC_XEPO_ERROR', 2507);
define('MQSERIES_MQRC_DURABILITY_NOT_ALTERABLE', 2509);
define('MQSERIES_MQRC_TOPIC_NOT_ALTERABLE', 2510);
define('MQSERIES_MQRC_SUBLEVEL_NOT_ALTERABLE', 2512);
define('MQSERIES_MQRC_PROPERTY_NAME_LENGTH_ERR', 2513);
define('MQSERIES_MQRC_DUPLICATE_GROUP_SUB', 2514);
define('MQSERIES_MQRC_GROUPING_NOT_ALTERABLE', 2515);
define('MQSERIES_MQRC_SELECTOR_INVALID_FOR_TYPE', 2516);
define('MQSERIES_MQRC_HOBJ_QUIESCED', 2517);
define('MQSERIES_MQRC_HOBJ_QUIESCED_NO_MSGS', 2518);
define('MQSERIES_MQRC_SELECTION_STRING_ERROR', 2519);
define('MQSERIES_MQRC_RES_OBJECT_STRING_ERROR', 2520);
define('MQSERIES_MQRC_CONNECTION_SUSPENDED', 2521);
define('MQSERIES_MQRC_INVALID_DESTINATION', 2522);
define('MQSERIES_MQRC_INVALID_SUBSCRIPTION', 2523);
define('MQSERIES_MQRC_SELECTOR_NOT_ALTERABLE', 2524);
define('MQSERIES_MQRC_RETAINED_MSG_Q_ERROR', 2525);
define('MQSERIES_MQRC_RETAINED_NOT_DELIVERED', 2526);
define('MQSERIES_MQRC_RFH_RESTRICTED_FORMAT_ERR', 2527);
define('MQSERIES_MQRC_CONNECTION_STOPPED', 2528);
define('MQSERIES_MQRC_ASYNC_UOW_CONFLICT', 2529);
define('MQSERIES_MQRC_ASYNC_XA_CONFLICT', 2530);
define('MQSERIES_MQRC_PUBSUB_INHIBITED', 2531);
define('MQSERIES_MQRC_MSG_HANDLE_COPY_FAILURE', 2532);
define('MQSERIES_MQRC_DEST_CLASS_NOT_ALTERABLE', 2533);
define('MQSERIES_MQRC_OPERATION_NOT_ALLOWED', 2534);
define('MQSERIES_MQRC_ACTION_ERROR', 2535);
define('MQSERIES_MQRC_CHANNEL_NOT_AVAILABLE', 2537);
define('MQSERIES_MQRC_HOST_NOT_AVAILABLE', 2538);
define('MQSERIES_MQRC_CHANNEL_CONFIG_ERROR', 2539);
define('MQSERIES_MQRC_UNKNOWN_CHANNEL_NAME', 2540);
define('MQSERIES_MQRC_LOOPING_PUBLICATION', 2541);
define('MQSERIES_MQRC_ALREADY_JOINED', 2542);
define('MQSERIES_MQRC_STANDBY_Q_MGR', 2543);
define('MQSERIES_MQRC_RECONNECTING', 2544);
define('MQSERIES_MQRC_RECONNECTED', 2545);
define('MQSERIES_MQRC_RECONNECT_QMID_MISMATCH', 2546);
define('MQSERIES_MQRC_RECONNECT_INCOMPATIBLE', 2547);
define('MQSERIES_MQRC_RECONNECT_FAILED', 2548);
define('MQSERIES_MQRC_CALL_INTERRUPTED', 2549);
define('MQSERIES_MQRC_NO_SUBS_MATCHED', 2550);
define('MQSERIES_MQRC_SELECTION_NOT_AVAILABLE', 2551);
define('MQSERIES_MQRC_CHANNEL_SSL_WARNING', 2552);
define('MQSERIES_MQRC_OCSP_URL_ERROR', 2553);
define('MQSERIES_MQRC_CONTENT_ERROR', 2554);
define('MQSERIES_MQRC_RECONNECT_Q_MGR_REQD', 2555);
define('MQSERIES_MQRC_RECONNECT_TIMED_OUT', 2556);
define('MQSERIES_MQRC_PUBLISH_EXIT_ERROR', 2557);
define('MQSERIES_MQRC_COMMINFO_ERROR', 2558);
define('MQSERIES_MQRC_DEF_SYNCPOINT_INHIBITED', 2559);
define('MQSERIES_MQRC_MULTICAST_ONLY', 2560);
define('MQSERIES_MQRC_DATA_SET_NOT_AVAILABLE', 2561);
define('MQSERIES_MQRC_GROUPING_NOT_ALLOWED', 2562);
define('MQSERIES_MQRC_GROUP_ADDRESS_ERROR', 2563);
define('MQSERIES_MQRC_MULTICAST_CONFIG_ERROR', 2564);
define('MQSERIES_MQRC_MULTICAST_INTERFACE_ERROR', 2565);
define('MQSERIES_MQRC_MULTICAST_SEND_ERROR', 2566);
define('MQSERIES_MQRC_MULTICAST_INTERNAL_ERROR', 2567);
define('MQSERIES_MQRC_CONNECTION_NOT_AVAILABLE', 2568);
define('MQSERIES_MQRC_SYNCPOINT_NOT_ALLOWED', 2569);
define('MQSERIES_MQRC_SSL_ALT_PROVIDER_REQUIRED', 2570);
define('MQSERIES_MQRC_MCAST_PUB_STATUS', 2571);
define('MQSERIES_MQRC_MCAST_SUB_STATUS', 2572);
define('MQSERIES_MQRC_PRECONN_EXIT_LOAD_ERROR', 2573);
define('MQSERIES_MQRC_PRECONN_EXIT_NOT_FOUND', 2574);
define('MQSERIES_MQRC_PRECONN_EXIT_ERROR', 2575);
define('MQSERIES_MQRC_CD_ARRAY_ERROR', 2576);
define('MQSERIES_MQRC_CHANNEL_BLOCKED', 2577);
define('MQSERIES_MQRC_CHANNEL_BLOCKED_WARNING', 2578);
define('MQSERIES_MQRC_SUBSCRIPTION_CREATE', 2579);
define('MQSERIES_MQRC_SUBSCRIPTION_DELETE', 2580);
define('MQSERIES_MQRC_SUBSCRIPTION_CHANGE', 2581);
define('MQSERIES_MQRC_SUBSCRIPTION_REFRESH', 2582);
define('MQSERIES_MQRC_INSTALLATION_MISMATCH', 2583);
define('MQSERIES_MQRC_NOT_PRIVILEGED', 2584);
define('MQSERIES_MQRC_PROPERTIES_DISABLED', 2586);
define('MQSERIES_MQRC_HMSG_NOT_AVAILABLE', 2587);
define('MQSERIES_MQRC_EXIT_PROPS_NOT_SUPPORTED', 2588);
define('MQSERIES_MQRC_INSTALLATION_MISSING', 2589);
define('MQSERIES_MQRC_FASTPATH_NOT_AVAILABLE', 2590);
define('MQSERIES_MQRC_CIPHER_SPEC_NOT_SUITE_B', 2591);
define('MQSERIES_MQRC_SUITE_B_ERROR', 2592);
define('MQSERIES_MQRC_CERT_VAL_POLICY_ERROR', 2593);
define('MQSERIES_MQRC_REOPEN_EXCL_INPUT_ERROR', 6100);
define('MQSERIES_MQRC_REOPEN_INQUIRE_ERROR', 6101);
define('MQSERIES_MQRC_REOPEN_SAVED_CONTEXT_ERR', 6102);
define('MQSERIES_MQRC_REOPEN_TEMPORARY_Q_ERROR', 6103);
define('MQSERIES_MQRC_ATTRIBUTE_LOCKED', 6104);
define('MQSERIES_MQRC_CURSOR_NOT_VALID', 6105);
define('MQSERIES_MQRC_ENCODING_ERROR', 6106);
define('MQSERIES_MQRC_STRUC_ID_ERROR', 6107);
define('MQSERIES_MQRC_NULL_POINTER', 6108);
define('MQSERIES_MQRC_NO_CONNECTION_REFERENCE', 6109);
define('MQSERIES_MQRC_NO_BUFFER', 6110);
define('MQSERIES_MQRC_BINARY_DATA_LENGTH_ERROR', 6111);
define('MQSERIES_MQRC_BUFFER_NOT_AUTOMATIC', 6112);
define('MQSERIES_MQRC_INSUFFICIENT_BUFFER', 6113);
define('MQSERIES_MQRC_INSUFFICIENT_DATA', 6114);
define('MQSERIES_MQRC_DATA_TRUNCATED', 6115);
define('MQSERIES_MQRC_ZERO_LENGTH', 6116);
define('MQSERIES_MQRC_NEGATIVE_LENGTH', 6117);
define('MQSERIES_MQRC_NEGATIVE_OFFSET', 6118);
define('MQSERIES_MQRC_INCONSISTENT_FORMAT', 6119);
define('MQSERIES_MQRC_INCONSISTENT_OBJECT_STATE', 6120);
define('MQSERIES_MQRC_CONTEXT_OBJECT_NOT_VALID', 6121);
define('MQSERIES_MQRC_CONTEXT_OPEN_ERROR', 6122);
define('MQSERIES_MQRC_STRUC_LENGTH_ERROR', 6123);
define('MQSERIES_MQRC_NOT_CONNECTED', 6124);
define('MQSERIES_MQRC_NOT_OPEN', 6125);
define('MQSERIES_MQRC_DISTRIBUTION_LIST_EMPTY', 6126);
define('MQSERIES_MQRC_INCONSISTENT_OPEN_OPTIONS', 6127);
define('MQSERIES_MQRC_WRONG_VERSION', 6128);
define('MQSERIES_MQRC_REFERENCE_ERROR', 6129);
define('MQSERIES_MQRC_XR_NOT_AVAILABLE', 6130);
define('MQSERIES_MQOO_BIND_AS_Q_DEF', 0);
define('MQSERIES_MQOO_READ_AHEAD_AS_Q_DEF', 0);
define('MQSERIES_MQOO_INPUT_AS_Q_DEF', 1);
define('MQSERIES_MQOO_INPUT_SHARED', 2);
define('MQSERIES_MQOO_INPUT_EXCLUSIVE', 4);
define('MQSERIES_MQOO_BROWSE', 8);
define('MQSERIES_MQOO_OUTPUT', 16);
define('MQSERIES_MQOO_INQUIRE', 32);
define('MQSERIES_MQOO_SET', 64);
define('MQSERIES_MQOO_SAVE_ALL_CONTEXT', 128);
define('MQSERIES_MQOO_PASS_IDENTITY_CONTEXT', 256);
define('MQSERIES_MQOO_PASS_ALL_CONTEXT', 512);
define('MQSERIES_MQOO_SET_IDENTITY_CONTEXT', 1024);
define('MQSERIES_MQOO_SET_ALL_CONTEXT', 2048);
define('MQSERIES_MQOO_ALTERNATE_USER_AUTHORITY', 4096);
define('MQSERIES_MQOO_FAIL_IF_QUIESCING', 8192);
define('MQSERIES_MQOO_BIND_ON_OPEN', 16384);
define('MQSERIES_MQOO_BIND_ON_GROUP', 4194304);
define('MQSERIES_MQOO_BIND_NOT_FIXED', 32768);
define('MQSERIES_MQOO_CO_OP', 131072);
define('MQSERIES_MQOO_NO_READ_AHEAD', 524288);
define('MQSERIES_MQOO_READ_AHEAD', 1048576);
define('MQSERIES_MQOO_NO_MULTICAST', 2097152);
define('MQSERIES_MQOO_RESOLVE_LOCAL_Q', 262144);
define('MQSERIES_MQOO_RESOLVE_LOCAL_TOPIC', 262144);
define('MQSERIES_MQCO_IMMEDIATE', 0);
define('MQSERIES_MQCO_NONE', 0);
define('MQSERIES_MQCO_DELETE', 1);
define('MQSERIES_MQCO_DELETE_PURGE', 2);
define('MQSERIES_MQCO_KEEP_SUB', 4);
define('MQSERIES_MQCO_REMOVE_SUB', 8);
define('MQSERIES_MQCO_QUIESCE', 32);
define('MQSERIES_MQGMO_VERSION_1', 1);
define('MQSERIES_MQGMO_VERSION_2', 2);
define('MQSERIES_MQGMO_VERSION_3', 3);
define('MQSERIES_MQGMO_VERSION_4', 4);
define('MQSERIES_MQGMO_CURRENT_VERSION', 4);
define('MQSERIES_MQGMO_WAIT', 1);
define('MQSERIES_MQGMO_NO_WAIT', 0);
define('MQSERIES_MQGMO_SET_SIGNAL', 8);
define('MQSERIES_MQGMO_FAIL_IF_QUIESCING', 8192);
define('MQSERIES_MQGMO_SYNCPOINT', 2);
define('MQSERIES_MQGMO_SYNCPOINT_IF_PERSISTENT', 4096);
define('MQSERIES_MQGMO_NO_SYNCPOINT', 4);
define('MQSERIES_MQGMO_MARK_SKIP_BACKOUT', 128);
define('MQSERIES_MQGMO_BROWSE_FIRST', 16);
define('MQSERIES_MQGMO_BROWSE_NEXT', 32);
define('MQSERIES_MQGMO_BROWSE_MSG_UNDER_CURSOR', 2048);
define('MQSERIES_MQGMO_MSG_UNDER_CURSOR', 256);
define('MQSERIES_MQGMO_LOCK', 512);
define('MQSERIES_MQGMO_UNLOCK', 1024);
define('MQSERIES_MQGMO_ACCEPT_TRUNCATED_MSG', 64);
define('MQSERIES_MQGMO_CONVERT', 16384);
define('MQSERIES_MQGMO_LOGICAL_ORDER', 32768);
define('MQSERIES_MQGMO_COMPLETE_MSG', 65536);
define('MQSERIES_MQGMO_ALL_MSGS_AVAILABLE', 131072);
define('MQSERIES_MQGMO_ALL_SEGMENTS_AVAILABLE', 262144);
define('MQSERIES_MQGMO_MARK_BROWSE_HANDLE', 1048576);
define('MQSERIES_MQGMO_MARK_BROWSE_CO_OP', 2097152);
define('MQSERIES_MQGMO_UNMARK_BROWSE_CO_OP', 4194304);
define('MQSERIES_MQGMO_UNMARK_BROWSE_HANDLE', 8388608);
define('MQSERIES_MQGMO_UNMARKED_BROWSE_MSG', 16777216);
define('MQSERIES_MQGMO_PROPERTIES_FORCE_MQRFH2', 33554432);
define('MQSERIES_MQGMO_NO_PROPERTIES', 67108864);
define('MQSERIES_MQGMO_PROPERTIES_IN_HANDLE', 134217728);
define('MQSERIES_MQGMO_PROPERTIES_COMPATIBILITY', 268435456);
define('MQSERIES_MQGMO_PROPERTIES_AS_Q_DEF', 0);
define('MQSERIES_MQGMO_NONE', 0);
define('MQSERIES_MQGMO_BROWSE_HANDLE', 17825808);
define('MQSERIES_MQGMO_BROWSE_CO_OP', 18874384);
define('MQSERIES_MQWI_UNLIMITED', -1);
define('MQSERIES_MQEC_MSG_ARRIVED', 2);
define('MQSERIES_MQEC_WAIT_INTERVAL_EXPIRED', 3);
define('MQSERIES_MQEC_WAIT_CANCELED', 4);
define('MQSERIES_MQEC_Q_MGR_QUIESCING', 5);
define('MQSERIES_MQEC_CONNECTION_QUIESCING', 6);
define('MQSERIES_MQMO_MATCH_MSG_ID', 1);
define('MQSERIES_MQMO_MATCH_CORREL_ID', 2);
define('MQSERIES_MQMO_MATCH_GROUP_ID', 4);
define('MQSERIES_MQMO_MATCH_MSG_SEQ_NUMBER', 8);
define('MQSERIES_MQMO_MATCH_OFFSET', 16);
define('MQSERIES_MQMO_MATCH_MSG_TOKEN', 32);
define('MQSERIES_MQMO_NONE', 0);
define('MQSERIES_MQMTOK_NONE', '');
define('MQSERIES_MQRL_UNDEFINED', -1);
define('MQSERIES_MQMD_VERSION_1', 1);
define('MQSERIES_MQMD_VERSION_2', 2);
define('MQSERIES_MQMD_CURRENT_VERSION', 2);
define('MQSERIES_MQRO_EXCEPTION', 16777216);
define('MQSERIES_MQRO_EXCEPTION_WITH_DATA', 50331648);
define('MQSERIES_MQRO_EXCEPTION_WITH_FULL_DATA', 117440512);
define('MQSERIES_MQRO_EXPIRATION', 2097152);
define('MQSERIES_MQRO_EXPIRATION_WITH_DATA', 6291456);
define('MQSERIES_MQRO_EXPIRATION_WITH_FULL_DATA', 14680064);
define('MQSERIES_MQRO_COA', 256);
define('MQSERIES_MQRO_COA_WITH_DATA', 768);
define('MQSERIES_MQRO_COA_WITH_FULL_DATA', 1792);
define('MQSERIES_MQRO_COD', 2048);
define('MQSERIES_MQRO_COD_WITH_DATA', 6144);
define('MQSERIES_MQRO_COD_WITH_FULL_DATA', 14336);
define('MQSERIES_MQRO_PAN', 1);
define('MQSERIES_MQRO_NAN', 2);
define('MQSERIES_MQRO_ACTIVITY', 4);
define('MQSERIES_MQRO_NEW_MSG_ID', 0);
define('MQSERIES_MQRO_PASS_MSG_ID', 128);
define('MQSERIES_MQRO_COPY_MSG_ID_TO_CORREL_ID', 0);
define('MQSERIES_MQRO_PASS_CORREL_ID', 64);
define('MQSERIES_MQRO_DEAD_LETTER_Q', 0);
define('MQSERIES_MQRO_DISCARD_MSG', 134217728);
define('MQSERIES_MQRO_PASS_DISCARD_AND_EXPIRY', 16384);
define('MQSERIES_MQRO_NONE', 0);
define('MQSERIES_MQRO_REJECT_UNSUP_MASK', 270270464);
define('MQSERIES_MQRO_ACCEPT_UNSUP_MASK', 4024434943);
define('MQSERIES_MQRO_ACCEPT_UNSUP_IF_XMIT_MASK', 261888);
define('MQSERIES_MQMT_SYSTEM_FIRST', 1);
define('MQSERIES_MQMT_REQUEST', 1);
define('MQSERIES_MQMT_REPLY', 2);
define('MQSERIES_MQMT_DATAGRAM', 8);
define('MQSERIES_MQMT_REPORT', 4);
define('MQSERIES_MQMT_MQE_FIELDS_FROM_MQE', 112);
define('MQSERIES_MQMT_MQE_FIELDS', 113);
define('MQSERIES_MQMT_SYSTEM_LAST', 65535);
define('MQSERIES_MQMT_APPL_FIRST', 65536);
define('MQSERIES_MQMT_APPL_LAST', 999999999);
define('MQSERIES_MQEI_UNLIMITED', -1);
define('MQSERIES_MQFB_NONE', 0);
define('MQSERIES_MQFB_SYSTEM_FIRST', 1);
define('MQSERIES_MQFB_QUIT', 256);
define('MQSERIES_MQFB_EXPIRATION', 258);
define('MQSERIES_MQFB_COA', 259);
define('MQSERIES_MQFB_COD', 260);
define('MQSERIES_MQFB_CHANNEL_COMPLETED', 262);
define('MQSERIES_MQFB_CHANNEL_FAIL_RETRY', 263);
define('MQSERIES_MQFB_CHANNEL_FAIL', 264);
define('MQSERIES_MQFB_APPL_CANNOT_BE_STARTED', 265);
define('MQSERIES_MQFB_TM_ERROR', 266);
define('MQSERIES_MQFB_APPL_TYPE_ERROR', 267);
define('MQSERIES_MQFB_STOPPED_BY_MSG_EXIT', 268);
define('MQSERIES_MQFB_ACTIVITY', 269);
define('MQSERIES_MQFB_XMIT_Q_MSG_ERROR', 271);
define('MQSERIES_MQFB_PAN', 275);
define('MQSERIES_MQFB_NAN', 276);
define('MQSERIES_MQFB_STOPPED_BY_CHAD_EXIT', 277);
define('MQSERIES_MQFB_STOPPED_BY_PUBSUB_EXIT', 279);
define('MQSERIES_MQFB_NOT_A_REPOSITORY_MSG', 280);
define('MQSERIES_MQFB_BIND_OPEN_CLUSRCVR_DEL', 281);
define('MQSERIES_MQFB_MAX_ACTIVITIES', 282);
define('MQSERIES_MQFB_NOT_FORWARDED', 283);
define('MQSERIES_MQFB_NOT_DELIVERED', 284);
define('MQSERIES_MQFB_UNSUPPORTED_FORWARDING', 285);
define('MQSERIES_MQFB_UNSUPPORTED_DELIVERY', 286);
define('MQSERIES_MQFB_DATA_LENGTH_ZERO', 291);
define('MQSERIES_MQFB_DATA_LENGTH_NEGATIVE', 292);
define('MQSERIES_MQFB_DATA_LENGTH_TOO_BIG', 293);
define('MQSERIES_MQFB_BUFFER_OVERFLOW', 294);
define('MQSERIES_MQFB_LENGTH_OFF_BY_ONE', 295);
define('MQSERIES_MQFB_IIH_ERROR', 296);
define('MQSERIES_MQFB_NOT_AUTHORIZED_FOR_IMS', 298);
define('MQSERIES_MQFB_IMS_ERROR', 300);
define('MQSERIES_MQFB_IMS_FIRST', 301);
define('MQSERIES_MQFB_IMS_LAST', 399);
define('MQSERIES_MQFB_CICS_INTERNAL_ERROR', 401);
define('MQSERIES_MQFB_CICS_NOT_AUTHORIZED', 402);
define('MQSERIES_MQFB_CICS_BRIDGE_FAILURE', 403);
define('MQSERIES_MQFB_CICS_CORREL_ID_ERROR', 404);
define('MQSERIES_MQFB_CICS_CCSID_ERROR', 405);
define('MQSERIES_MQFB_CICS_ENCODING_ERROR', 406);
define('MQSERIES_MQFB_CICS_CIH_ERROR', 407);
define('MQSERIES_MQFB_CICS_UOW_ERROR', 408);
define('MQSERIES_MQFB_CICS_COMMAREA_ERROR', 409);
define('MQSERIES_MQFB_CICS_APPL_NOT_STARTED', 410);
define('MQSERIES_MQFB_CICS_APPL_ABENDED', 411);
define('MQSERIES_MQFB_CICS_DLQ_ERROR', 412);
define('MQSERIES_MQFB_CICS_UOW_BACKED_OUT', 413);
define('MQSERIES_MQFB_PUBLICATIONS_ON_REQUEST', 501);
define('MQSERIES_MQFB_SUBSCRIBER_IS_PUBLISHER', 502);
define('MQSERIES_MQFB_MSG_SCOPE_MISMATCH', 503);
define('MQSERIES_MQFB_SELECTOR_MISMATCH', 504);
define('MQSERIES_MQFB_NOT_A_GROUPUR_MSG', 505);
define('MQSERIES_MQFB_IMS_NACK_1A_REASON_FIRST', 600);
define('MQSERIES_MQFB_IMS_NACK_1A_REASON_LAST', 855);
define('MQSERIES_MQFB_SYSTEM_LAST', 65535);
define('MQSERIES_MQFB_APPL_FIRST', 65536);
define('MQSERIES_MQFB_APPL_LAST', 999999999);
define('MQSERIES_MQENC_NATIVE', 546);
define('MQSERIES_MQENC_INTEGER_MASK', 15);
define('MQSERIES_MQENC_DECIMAL_MASK', 240);
define('MQSERIES_MQENC_FLOAT_MASK', 3840);
define('MQSERIES_MQENC_RESERVED_MASK', 4294963200);
define('MQSERIES_MQENC_INTEGER_UNDEFINED', 0);
define('MQSERIES_MQENC_INTEGER_NORMAL', 1);
define('MQSERIES_MQENC_INTEGER_REVERSED', 2);
define('MQSERIES_MQENC_DECIMAL_UNDEFINED', 0);
define('MQSERIES_MQENC_DECIMAL_NORMAL', 16);
define('MQSERIES_MQENC_DECIMAL_REVERSED', 32);
define('MQSERIES_MQENC_FLOAT_UNDEFINED', 0);
define('MQSERIES_MQENC_FLOAT_IEEE_NORMAL', 256);
define('MQSERIES_MQENC_FLOAT_IEEE_REVERSED', 512);
define('MQSERIES_MQENC_FLOAT_S390', 768);
define('MQSERIES_MQENC_FLOAT_TNS', 1024);
define('MQSERIES_MQENC_NORMAL', 273);
define('MQSERIES_MQENC_REVERSED', 546);
define('MQSERIES_MQENC_S390', 785);
define('MQSERIES_MQENC_TNS', 1041);
define('MQSERIES_MQENC_AS_PUBLISHED', -1);
define('MQSERIES_MQCCSI_UNDEFINED', 0);
define('MQSERIES_MQCCSI_DEFAULT', 0);
define('MQSERIES_MQCCSI_Q_MGR', 0);
define('MQSERIES_MQCCSI_INHERIT', -2);
define('MQSERIES_MQCCSI_EMBEDDED', -1);
define('MQSERIES_MQCCSI_APPL', -3);
define('MQSERIES_MQCCSI_AS_PUBLISHED', -4);
define('MQSERIES_MQFMT_NONE', '');
define('MQSERIES_MQFMT_ADMIN', 'MQADMIN');
define('MQSERIES_MQFMT_CHANNEL_COMPLETED', 'MQCHCOM');
define('MQSERIES_MQFMT_CICS', 'MQCICS');
define('MQSERIES_MQFMT_COMMAND_1', 'MQCMD1');
define('MQSERIES_MQFMT_COMMAND_2', 'MQCMD2');
define('MQSERIES_MQFMT_DEAD_LETTER_HEADER', 'MQDEAD');
define('MQSERIES_MQFMT_DIST_HEADER', 'MQHDIST');
define('MQSERIES_MQFMT_EMBEDDED_PCF', 'MQHEPCF');
define('MQSERIES_MQFMT_EVENT', 'MQEVENT');
define('MQSERIES_MQFMT_IMS', 'MQIMS');
define('MQSERIES_MQFMT_IMS_VAR_STRING', 'MQIMSVS');
define('MQSERIES_MQFMT_MD_EXTENSION', 'MQHMDE');
define('MQSERIES_MQFMT_PCF', 'MQPCF');
define('MQSERIES_MQFMT_REF_MSG_HEADER', 'MQHREF');
define('MQSERIES_MQFMT_RF_HEADER', 'MQHRF');
define('MQSERIES_MQFMT_RF_HEADER_1', 'MQHRF');
define('MQSERIES_MQFMT_RF_HEADER_2', 'MQHRF2');
define('MQSERIES_MQFMT_STRING', 'MQSTR');
define('MQSERIES_MQFMT_TRIGGER', 'MQTRIG');
define('MQSERIES_MQFMT_WORK_INFO_HEADER', 'MQHWIH');
define('MQSERIES_MQFMT_XMIT_Q_HEADER', 'MQXMIT');
define('MQSERIES_MQPRI_PRIORITY_AS_Q_DEF', -1);
define('MQSERIES_MQPRI_PRIORITY_AS_PARENT', -2);
define('MQSERIES_MQPRI_PRIORITY_AS_PUBLISHED', -3);
define('MQSERIES_MQPRI_PRIORITY_AS_TOPIC_DEF', -1);
define('MQSERIES_MQPER_PERSISTENCE_AS_PARENT', -1);
define('MQSERIES_MQPER_NOT_PERSISTENT', 0);
define('MQSERIES_MQPER_PERSISTENT', 1);
define('MQSERIES_MQPER_PERSISTENCE_AS_Q_DEF', 2);
define('MQSERIES_MQPER_PERSISTENCE_AS_TOPIC_DEF', 2);
define('MQSERIES_MQPRT_RESPONSE_AS_PARENT', 0);
define('MQSERIES_MQPRT_SYNC_RESPONSE', 1);
define('MQSERIES_MQPRT_ASYNC_RESPONSE', 2);
define('MQSERIES_MQMI_NONE', '');
define('MQSERIES_MQCI_NONE', '');
define('MQSERIES_MQCI_NEW_SESSION', 'AMQ!NEW_SESSION_CORRELID');
define('MQSERIES_MQACT_NONE', '');
define('MQSERIES_MQAT_UNKNOWN', -1);
define('MQSERIES_MQAT_NO_CONTEXT', 0);
define('MQSERIES_MQAT_CICS', 1);
define('MQSERIES_MQAT_MVS', 2);
define('MQSERIES_MQAT_OS390', 2);
define('MQSERIES_MQAT_ZOS', 2);
define('MQSERIES_MQAT_IMS', 3);
define('MQSERIES_MQAT_OS2', 4);
define('MQSERIES_MQAT_DOS', 5);
define('MQSERIES_MQAT_AIX', 6);
define('MQSERIES_MQAT_UNIX', 6);
define('MQSERIES_MQAT_QMGR', 7);
define('MQSERIES_MQAT_OS400', 8);
define('MQSERIES_MQAT_WINDOWS', 9);
define('MQSERIES_MQAT_CICS_VSE', 10);
define('MQSERIES_MQAT_WINDOWS_NT', 11);
define('MQSERIES_MQAT_VMS', 12);
define('MQSERIES_MQAT_GUARDIAN', 13);
define('MQSERIES_MQAT_NSK', 13);
define('MQSERIES_MQAT_VOS', 14);
define('MQSERIES_MQAT_OPEN_TP1', 15);
define('MQSERIES_MQAT_VM', 18);
define('MQSERIES_MQAT_IMS_BRIDGE', 19);
define('MQSERIES_MQAT_XCF', 20);
define('MQSERIES_MQAT_CICS_BRIDGE', 21);
define('MQSERIES_MQAT_NOTES_AGENT', 22);
define('MQSERIES_MQAT_TPF', 23);
define('MQSERIES_MQAT_USER', 25);
define('MQSERIES_MQAT_BROKER', 26);
define('MQSERIES_MQAT_QMGR_PUBLISH', 26);
define('MQSERIES_MQAT_JAVA', 28);
define('MQSERIES_MQAT_DQM', 29);
define('MQSERIES_MQAT_CHANNEL_INITIATOR', 30);
define('MQSERIES_MQAT_WLM', 31);
define('MQSERIES_MQAT_BATCH', 32);
define('MQSERIES_MQAT_RRS_BATCH', 33);
define('MQSERIES_MQAT_SIB', 34);
define('MQSERIES_MQAT_SYSTEM_EXTENSION', 35);
define('MQSERIES_MQAT_MCAST_PUBLISH', 36);
define('MQSERIES_MQAT_DEFAULT', 6);
define('MQSERIES_MQAT_USER_FIRST', 65536);
define('MQSERIES_MQAT_USER_LAST', 999999999);
define('MQSERIES_MQGI_NONE', '');
define('MQSERIES_MQMF_SEGMENTATION_INHIBITED', 0);
define('MQSERIES_MQMF_SEGMENTATION_ALLOWED', 1);
define('MQSERIES_MQMF_MSG_IN_GROUP', 8);
define('MQSERIES_MQMF_LAST_MSG_IN_GROUP', 16);
define('MQSERIES_MQMF_SEGMENT', 2);
define('MQSERIES_MQMF_LAST_SEGMENT', 4);
define('MQSERIES_MQMF_NONE', 0);
define('MQSERIES_MQMF_REJECT_UNSUP_MASK', 4095);
define('MQSERIES_MQMF_ACCEPT_UNSUP_MASK', 4293918720);
define('MQSERIES_MQMF_ACCEPT_UNSUP_IF_XMIT_MASK', 1044480);
define('MQSERIES_MQOL_UNDEFINED', -1);
define('MQSERIES_MQBO_VERSION_1', 1);
define('MQSERIES_MQBO_CURRENT_VERSION', 1);
define('MQSERIES_MQBO_NONE', 0);
define('MQSERIES_MQPMO_VERSION_1', 1);
define('MQSERIES_MQPMO_VERSION_2', 2);
define('MQSERIES_MQPMO_VERSION_3', 3);
define('MQSERIES_MQPMO_CURRENT_VERSION', 3);
define('MQSERIES_MQPMO_SYNCPOINT', 2);
define('MQSERIES_MQPMO_NO_SYNCPOINT', 4);
define('MQSERIES_MQPMO_DEFAULT_CONTEXT', 32);
define('MQSERIES_MQPMO_NEW_MSG_ID', 64);
define('MQSERIES_MQPMO_NEW_CORREL_ID', 128);
define('MQSERIES_MQPMO_PASS_IDENTITY_CONTEXT', 256);
define('MQSERIES_MQPMO_PASS_ALL_CONTEXT', 512);
define('MQSERIES_MQPMO_SET_IDENTITY_CONTEXT', 1024);
define('MQSERIES_MQPMO_SET_ALL_CONTEXT', 2048);
define('MQSERIES_MQPMO_ALTERNATE_USER_AUTHORITY', 4096);
define('MQSERIES_MQPMO_FAIL_IF_QUIESCING', 8192);
define('MQSERIES_MQPMO_NO_CONTEXT', 16384);
define('MQSERIES_MQPMO_LOGICAL_ORDER', 32768);
define('MQSERIES_MQPMO_ASYNC_RESPONSE', 65536);
define('MQSERIES_MQPMO_SYNC_RESPONSE', 131072);
define('MQSERIES_MQPMO_RESOLVE_LOCAL_Q', 262144);
define('MQSERIES_MQPMO_WARN_IF_NO_SUBS_MATCHED', 524288);
define('MQSERIES_MQPMO_RETAIN', 2097152);
define('MQSERIES_MQPMO_MD_FOR_OUTPUT_ONLY', 8388608);
define('MQSERIES_MQPMO_SCOPE_QMGR', 67108864);
define('MQSERIES_MQPMO_SUPPRESS_REPLYTO', 134217728);
define('MQSERIES_MQPMO_NOT_OWN_SUBS', 268435456);
define('MQSERIES_MQPMO_RESPONSE_AS_Q_DEF', 0);
define('MQSERIES_MQPMO_RESPONSE_AS_TOPIC_DEF', 0);
define('MQSERIES_MQPMO_NONE', 0);
define('MQSERIES_MQCNO_VERSION_1', 1);
define('MQSERIES_MQCNO_VERSION_2', 2);
define('MQSERIES_MQCNO_VERSION_3', 3);
define('MQSERIES_MQCNO_VERSION_4', 4);
define('MQSERIES_MQCNO_VERSION_5', 5);
define('MQSERIES_MQCNO_CURRENT_VERSION', 5);
define('MQSERIES_MQCNO_STANDARD_BINDING', 0);
define('MQSERIES_MQCNO_FASTPATH_BINDING', 1);
define('MQSERIES_MQCNO_SERIALIZE_CONN_TAG_Q_MGR', 2);
define('MQSERIES_MQCNO_SERIALIZE_CONN_TAG_QSG', 4);
define('MQSERIES_MQCNO_RESTRICT_CONN_TAG_Q_MGR', 8);
define('MQSERIES_MQCNO_RESTRICT_CONN_TAG_QSG', 16);
define('MQSERIES_MQCNO_HANDLE_SHARE_NONE', 32);
define('MQSERIES_MQCNO_HANDLE_SHARE_BLOCK', 64);
define('MQSERIES_MQCNO_HANDLE_SHARE_NO_BLOCK', 128);
define('MQSERIES_MQCNO_SHARED_BINDING', 256);
define('MQSERIES_MQCNO_ISOLATED_BINDING', 512);
define('MQSERIES_MQCNO_LOCAL_BINDING', 1024);
define('MQSERIES_MQCNO_CLIENT_BINDING', 2048);
define('MQSERIES_MQCNO_ACCOUNTING_MQI_ENABLED', 4096);
define('MQSERIES_MQCNO_ACCOUNTING_MQI_DISABLED', 8192);
define('MQSERIES_MQCNO_ACCOUNTING_Q_ENABLED', 16384);
define('MQSERIES_MQCNO_ACCOUNTING_Q_DISABLED', 32768);
define('MQSERIES_MQCNO_NO_CONV_SHARING', 65536);
define('MQSERIES_MQCNO_ALL_CONVS_SHARE', 262144);
define('MQSERIES_MQCNO_CD_FOR_OUTPUT_ONLY', 524288);
define('MQSERIES_MQCNO_USE_CD_SELECTION', 1048576);
define('MQSERIES_MQCNO_RECONNECT_AS_DEF', 0);
define('MQSERIES_MQCNO_RECONNECT', 16777216);
define('MQSERIES_MQCNO_RECONNECT_DISABLED', 33554432);
define('MQSERIES_MQCNO_RECONNECT_Q_MGR', 67108864);
define('MQSERIES_MQCNO_ACTIVITY_TRACE_ENABLED', 134217728);
define('MQSERIES_MQCNO_ACTIVITY_TRACE_DISABLED', 268435456);
define('MQSERIES_MQCNO_NONE', 0);
define('MQSERIES_MQXPT_ALL', -1);
define('MQSERIES_MQXPT_LOCAL', 0);
define('MQSERIES_MQXPT_LU62', 1);
define('MQSERIES_MQXPT_TCP', 2);
define('MQSERIES_MQXPT_NETBIOS', 3);
define('MQSERIES_MQXPT_SPX', 4);
define('MQSERIES_MQXPT_DECNET', 5);
define('MQSERIES_MQXPT_UDP', 6);
define('MQSERIES_MQOT_NONE', 0);
define('MQSERIES_MQOT_Q', 1);
define('MQSERIES_MQOT_NAMELIST', 2);
define('MQSERIES_MQOT_PROCESS', 3);
define('MQSERIES_MQOT_STORAGE_CLASS', 4);
define('MQSERIES_MQOT_Q_MGR', 5);
define('MQSERIES_MQOT_CHANNEL', 6);
define('MQSERIES_MQOT_AUTH_INFO', 7);
define('MQSERIES_MQOT_TOPIC', 8);
define('MQSERIES_MQOT_COMM_INFO', 9);
define('MQSERIES_MQOT_CF_STRUC', 10);
define('MQSERIES_MQOT_LISTENER', 11);
define('MQSERIES_MQOT_SERVICE', 12);
define('MQSERIES_MQOT_RESERVED_1', 999);
define('MQSERIES_MQCA_ADMIN_TOPIC_NAME', 2105);
define('MQSERIES_MQCA_ALTERATION_DATE', 2027);
define('MQSERIES_MQCA_ALTERATION_TIME', 2028);
define('MQSERIES_MQCA_APPL_ID', 2001);
define('MQSERIES_MQCA_AUTH_INFO_CONN_NAME', 2053);
define('MQSERIES_MQCA_AUTH_INFO_DESC', 2046);
define('MQSERIES_MQCA_AUTH_INFO_NAME', 2045);
define('MQSERIES_MQCA_AUTH_INFO_OCSP_URL', 2109);
define('MQSERIES_MQCA_AUTO_REORG_CATALOG', 2091);
define('MQSERIES_MQCA_AUTO_REORG_START_TIME', 2090);
define('MQSERIES_MQCA_BACKOUT_REQ_Q_NAME', 2019);
define('MQSERIES_MQCA_BASE_OBJECT_NAME', 2002);
define('MQSERIES_MQCA_BASE_Q_NAME', 2002);
define('MQSERIES_MQCA_BATCH_INTERFACE_ID', 2068);
define('MQSERIES_MQCA_CF_STRUC_DESC', 2052);
define('MQSERIES_MQCA_CF_STRUC_NAME', 2039);
define('MQSERIES_MQCA_CHANNEL_AUTO_DEF_EXIT', 2026);
define('MQSERIES_MQCA_CHILD', 2101);
define('MQSERIES_MQCA_CHINIT_SERVICE_PARM', 2076);
define('MQSERIES_MQCA_CICS_FILE_NAME', 2060);
define('MQSERIES_MQCA_CLUSTER_DATE', 2037);
define('MQSERIES_MQCA_CLUSTER_NAME', 2029);
define('MQSERIES_MQCA_CLUSTER_NAMELIST', 2030);
define('MQSERIES_MQCA_CLUSTER_Q_MGR_NAME', 2031);
define('MQSERIES_MQCA_CLUSTER_TIME', 2038);
define('MQSERIES_MQCA_CLUSTER_WORKLOAD_DATA', 2034);
define('MQSERIES_MQCA_CLUSTER_WORKLOAD_EXIT', 2033);
define('MQSERIES_MQCA_COMMAND_INPUT_Q_NAME', 2003);
define('MQSERIES_MQCA_COMMAND_REPLY_Q_NAME', 2067);
define('MQSERIES_MQCA_CREATION_DATE', 2004);
define('MQSERIES_MQCA_CREATION_TIME', 2005);
define('MQSERIES_MQCA_DEAD_LETTER_Q_NAME', 2006);
define('MQSERIES_MQCA_DEF_XMIT_Q_NAME', 2025);
define('MQSERIES_MQCA_DNS_GROUP', 2071);
define('MQSERIES_MQCA_ENV_DATA', 2007);
define('MQSERIES_MQCA_FIRST', 2001);
define('MQSERIES_MQCA_IGQ_USER_ID', 2041);
define('MQSERIES_MQCA_INITIATION_Q_NAME', 2008);
define('MQSERIES_MQCA_LAST', 4000);
define('MQSERIES_MQCA_LDAP_PASSWORD', 2048);
define('MQSERIES_MQCA_LDAP_USER_NAME', 2047);
define('MQSERIES_MQCA_LU_GROUP_NAME', 2072);
define('MQSERIES_MQCA_LU_NAME', 2073);
define('MQSERIES_MQCA_LU62_ARM_SUFFIX', 2074);
define('MQSERIES_MQCA_MODEL_DURABLE_Q', 2096);
define('MQSERIES_MQCA_MODEL_NON_DURABLE_Q', 2097);
define('MQSERIES_MQCA_MONITOR_Q_NAME', 2066);
define('MQSERIES_MQCA_NAMELIST_DESC', 2009);
define('MQSERIES_MQCA_NAMELIST_NAME', 2010);
define('MQSERIES_MQCA_NAMES', 2020);
define('MQSERIES_MQCA_PARENT', 2102);
define('MQSERIES_MQCA_PASS_TICKET_APPL', 2086);
define('MQSERIES_MQCA_PROCESS_DESC', 2011);
define('MQSERIES_MQCA_PROCESS_NAME', 2012);
define('MQSERIES_MQCA_Q_DESC', 2013);
define('MQSERIES_MQCA_Q_MGR_DESC', 2014);
define('MQSERIES_MQCA_Q_MGR_IDENTIFIER', 2032);
define('MQSERIES_MQCA_Q_MGR_NAME', 2015);
define('MQSERIES_MQCA_Q_NAME', 2016);
define('MQSERIES_MQCA_QSG_NAME', 2040);
define('MQSERIES_MQCA_REMOTE_Q_MGR_NAME', 2017);
define('MQSERIES_MQCA_REMOTE_Q_NAME', 2018);
define('MQSERIES_MQCA_REPOSITORY_NAME', 2035);
define('MQSERIES_MQCA_REPOSITORY_NAMELIST', 2036);
define('MQSERIES_MQCA_RESUME_DATE', 2098);
define('MQSERIES_MQCA_RESUME_TIME', 2099);
define('MQSERIES_MQCA_SERVICE_DESC', 2078);
define('MQSERIES_MQCA_SERVICE_NAME', 2077);
define('MQSERIES_MQCA_SERVICE_START_ARGS', 2080);
define('MQSERIES_MQCA_SERVICE_START_COMMAND', 2079);
define('MQSERIES_MQCA_SERVICE_STOP_ARGS', 2082);
define('MQSERIES_MQCA_SERVICE_STOP_COMMAND', 2081);
define('MQSERIES_MQCA_STDERR_DESTINATION', 2084);
define('MQSERIES_MQCA_STDOUT_DESTINATION', 2083);
define('MQSERIES_MQCA_SSL_CRL_NAMELIST', 2050);
define('MQSERIES_MQCA_SSL_CRYPTO_HARDWARE', 2051);
define('MQSERIES_MQCA_SSL_KEY_LIBRARY', 2069);
define('MQSERIES_MQCA_SSL_KEY_MEMBER', 2070);
define('MQSERIES_MQCA_SSL_KEY_REPOSITORY', 2049);
define('MQSERIES_MQCA_STORAGE_CLASS', 2022);
define('MQSERIES_MQCA_STORAGE_CLASS_DESC', 2042);
define('MQSERIES_MQCA_SYSTEM_LOG_Q_NAME', 2065);
define('MQSERIES_MQCA_TCP_NAME', 2075);
define('MQSERIES_MQCA_TOPIC_DESC', 2093);
define('MQSERIES_MQCA_TOPIC_NAME', 2092);
define('MQSERIES_MQCA_TOPIC_STRING', 2094);
define('MQSERIES_MQCA_TOPIC_STRING_FILTER', 2108);
define('MQSERIES_MQCA_TPIPE_NAME', 2085);
define('MQSERIES_MQCA_TRIGGER_CHANNEL_NAME', 2064);
define('MQSERIES_MQCA_TRIGGER_DATA', 2023);
define('MQSERIES_MQCA_TRIGGER_PROGRAM_NAME', 2062);
define('MQSERIES_MQCA_TRIGGER_TERM_ID', 2063);
define('MQSERIES_MQCA_TRIGGER_TRANS_ID', 2061);
define('MQSERIES_MQCA_USER_DATA', 2021);
define('MQSERIES_MQCA_USER_LIST', 4000);
define('MQSERIES_MQCA_VERSION', 2120);
define('MQSERIES_MQCA_XCF_GROUP_NAME', 2043);
define('MQSERIES_MQCA_XCF_MEMBER_NAME', 2044);
define('MQSERIES_MQCA_XMIT_Q_NAME', 2024);
define('MQSERIES_MQCA_COMM_INFO_NAME', 2110);
define('MQSERIES_MQCA_COMM_INFO_DESC', 2111);
define('MQSERIES_MQCA_POLICY_NAME', 2112);
define('MQSERIES_MQCA_SIGNER_DN', 2113);
define('MQSERIES_MQCA_RECIPIENT_DN', 2114);
define('MQSERIES_MQCA_INSTALLATION_DESC', 2115);
define('MQSERIES_MQCA_INSTALLATION_NAME', 2116);
define('MQSERIES_MQCA_INSTALLATION_PATH', 2117);
define('MQSERIES_MQCA_CHLAUTH_DESC', 2118);
define('MQSERIES_MQCA_CUSTOM', 2119);
define('MQSERIES_MQCA_XR_VERSION', 2122);
define('MQSERIES_MQCA_XR_SSL_CIPHER_SUITES', 2123);
define('MQSERIES_MQCA_CLUS_CHL_NAME', 2124);
define('MQSERIES_MQCA_LAST_USED', 2137);
define('MQSERIES_MQIA_ACCOUNTING_CONN_OVERRIDE', 136);
define('MQSERIES_MQIA_ACCOUNTING_INTERVAL', 135);
define('MQSERIES_MQIA_ACCOUNTING_MQI', 133);
define('MQSERIES_MQIA_ACCOUNTING_Q', 134);
define('MQSERIES_MQIA_ACTIVE_CHANNELS', 100);
define('MQSERIES_MQIA_ACTIVITY_RECORDING', 138);
define('MQSERIES_MQIA_ADOPTNEWMCA_CHECK', 102);
define('MQSERIES_MQIA_ADOPTNEWMCA_TYPE', 103);
define('MQSERIES_MQIA_ADOPTNEWMCA_INTERVAL', 104);
define('MQSERIES_MQIA_APPL_TYPE', 1);
define('MQSERIES_MQIA_ARCHIVE', 60);
define('MQSERIES_MQIA_AUTH_INFO_TYPE', 66);
define('MQSERIES_MQIA_AUTHORITY_EVENT', 47);
define('MQSERIES_MQIA_AUTO_REORG_INTERVAL', 174);
define('MQSERIES_MQIA_AUTO_REORGANIZATION', 173);
define('MQSERIES_MQIA_BACKOUT_THRESHOLD', 22);
define('MQSERIES_MQIA_BASE_TYPE', 193);
define('MQSERIES_MQIA_BATCH_INTERFACE_AUTO', 86);
define('MQSERIES_MQIA_BRIDGE_EVENT', 74);
define('MQSERIES_MQIA_CERT_VAL_POLICY', 252);
define('MQSERIES_MQIA_CF_CFCONLOS', 246);
define('MQSERIES_MQIA_CF_LEVEL', 70);
define('MQSERIES_MQIA_CF_OFFLOAD', 224);
define('MQSERIES_MQIA_CF_OFFLOAD_THRESHOLD1', 225);
define('MQSERIES_MQIA_CF_OFFLOAD_THRESHOLD2', 226);
define('MQSERIES_MQIA_CF_OFFLOAD_THRESHOLD3', 227);
define('MQSERIES_MQIA_CF_OFFLDUSE', 229);
define('MQSERIES_MQIA_CF_RECOVER', 71);
define('MQSERIES_MQIA_CF_RECAUTO', 244);
define('MQSERIES_MQIA_CF_SMDS_BUFFERS', 228);
define('MQSERIES_MQIA_CHANNEL_AUTO_DEF', 55);
define('MQSERIES_MQIA_CHANNEL_AUTO_DEF_EVENT', 56);
define('MQSERIES_MQIA_CHANNEL_EVENT', 73);
define('MQSERIES_MQIA_CHINIT_ADAPTERS', 101);
define('MQSERIES_MQIA_CHINIT_CONTROL', 119);
define('MQSERIES_MQIA_CHINIT_DISPATCHERS', 105);
define('MQSERIES_MQIA_CHINIT_TRACE_AUTO_START', 117);
define('MQSERIES_MQIA_CHINIT_TRACE_TABLE_SIZE', 118);
define('MQSERIES_MQIA_CLUSTER_Q_TYPE', 59);
define('MQSERIES_MQIA_CLUSTER_WORKLOAD_LENGTH', 58);
define('MQSERIES_MQIA_CLWL_MRU_CHANNELS', 97);
define('MQSERIES_MQIA_CLWL_Q_RANK', 95);
define('MQSERIES_MQIA_CLWL_Q_PRIORITY', 96);
define('MQSERIES_MQIA_CLWL_USEQ', 98);
define('MQSERIES_MQIA_CMD_SERVER_AUTO', 87);
define('MQSERIES_MQIA_CMD_SERVER_CONTROL', 120);
define('MQSERIES_MQIA_CMD_SERVER_CONVERT_MSG', 88);
define('MQSERIES_MQIA_CMD_SERVER_DLQ_MSG', 89);
define('MQSERIES_MQIA_CODED_CHAR_SET_ID', 2);
define('MQSERIES_MQIA_COMMAND_EVENT', 99);
define('MQSERIES_MQIA_COMMAND_LEVEL', 31);
define('MQSERIES_MQIA_CONFIGURATION_EVENT', 51);
define('MQSERIES_MQIA_CPI_LEVEL', 27);
define('MQSERIES_MQIA_CURRENT_Q_DEPTH', 3);
define('MQSERIES_MQIA_DEF_BIND', 61);
define('MQSERIES_MQIA_DEF_INPUT_OPEN_OPTION', 4);
define('MQSERIES_MQIA_DEF_PERSISTENCE', 5);
define('MQSERIES_MQIA_DEF_PRIORITY', 6);
define('MQSERIES_MQIA_DEF_PUT_RESPONSE_TYPE', 184);
define('MQSERIES_MQIA_DEF_READ_AHEAD', 188);
define('MQSERIES_MQIA_DEFINITION_TYPE', 7);
define('MQSERIES_MQIA_DIST_LISTS', 34);
define('MQSERIES_MQIA_DNS_WLM', 106);
define('MQSERIES_MQIA_DURABLE_SUB', 175);
define('MQSERIES_MQIA_EXPIRY_INTERVAL', 39);
define('MQSERIES_MQIA_FIRST', 1);
define('MQSERIES_MQIA_GROUP_UR', 221);
define('MQSERIES_MQIA_HARDEN_GET_BACKOUT', 8);
define('MQSERIES_MQIA_HIGH_Q_DEPTH', 36);
define('MQSERIES_MQIA_IGQ_PUT_AUTHORITY', 65);
define('MQSERIES_MQIA_INDEX_TYPE', 57);
define('MQSERIES_MQIA_INHIBIT_EVENT', 48);
define('MQSERIES_MQIA_INHIBIT_GET', 9);
define('MQSERIES_MQIA_INHIBIT_PUB', 181);
define('MQSERIES_MQIA_INHIBIT_PUT', 10);
define('MQSERIES_MQIA_INHIBIT_SUB', 182);
define('MQSERIES_MQIA_INTRA_GROUP_QUEUING', 64);
define('MQSERIES_MQIA_IP_ADDRESS_VERSION', 93);
define('MQSERIES_MQIA_LAST', 2000);
define('MQSERIES_MQIA_LISTENER_PORT_NUMBER', 85);
define('MQSERIES_MQIA_LISTENER_TIMER', 107);
define('MQSERIES_MQIA_LOGGER_EVENT', 94);
define('MQSERIES_MQIA_LU62_CHANNELS', 108);
define('MQSERIES_MQIA_LOCAL_EVENT', 49);
define('MQSERIES_MQIA_MSG_MARK_BROWSE_INTERVAL', 68);
define('MQSERIES_MQIA_MASTER_ADMIN', 186);
define('MQSERIES_MQIA_MAX_CHANNELS', 109);
define('MQSERIES_MQIA_MAX_CLIENTS', 172);
define('MQSERIES_MQIA_MAX_GLOBAL_LOCKS', 83);
define('MQSERIES_MQIA_MAX_HANDLES', 11);
define('MQSERIES_MQIA_MAX_LOCAL_LOCKS', 84);
define('MQSERIES_MQIA_MAX_MSG_LENGTH', 13);
define('MQSERIES_MQIA_MAX_OPEN_Q', 80);
define('MQSERIES_MQIA_MAX_PRIORITY', 14);
define('MQSERIES_MQIA_MAX_PROPERTIES_LENGTH', 192);
define('MQSERIES_MQIA_MAX_Q_DEPTH', 15);
define('MQSERIES_MQIA_MAX_Q_TRIGGERS', 90);
define('MQSERIES_MQIA_MAX_RECOVERY_TASKS', 171);
define('MQSERIES_MQIA_MAX_RESPONSES', 230);
define('MQSERIES_MQIA_MAX_UNCOMMITTED_MSGS', 33);
define('MQSERIES_MQIA_MONITOR_INTERVAL', 81);
define('MQSERIES_MQIA_MONITORING_AUTO_CLUSSDR', 124);
define('MQSERIES_MQIA_MONITORING_CHANNEL', 122);
define('MQSERIES_MQIA_MONITORING_Q', 123);
define('MQSERIES_MQIA_MSG_DELIVERY_SEQUENCE', 16);
define('MQSERIES_MQIA_MSG_DEQ_COUNT', 38);
define('MQSERIES_MQIA_MSG_ENQ_COUNT', 37);
define('MQSERIES_MQIA_NAME_COUNT', 19);
define('MQSERIES_MQIA_NAMELIST_TYPE', 72);
define('MQSERIES_MQIA_NPM_CLASS', 78);
define('MQSERIES_MQIA_NPM_DELIVERY', 196);
define('MQSERIES_MQIA_OPEN_INPUT_COUNT', 17);
define('MQSERIES_MQIA_OPEN_OUTPUT_COUNT', 18);
define('MQSERIES_MQIA_OUTBOUND_PORT_MAX', 140);
define('MQSERIES_MQIA_OUTBOUND_PORT_MIN', 110);
define('MQSERIES_MQIA_PAGESET_ID', 62);
define('MQSERIES_MQIA_PERFORMANCE_EVENT', 53);
define('MQSERIES_MQIA_PLATFORM', 32);
define('MQSERIES_MQIA_PM_DELIVERY', 195);
define('MQSERIES_MQIA_PROPERTY_CONTROL', 190);
define('MQSERIES_MQIA_PROXY_SUB', 199);
define('MQSERIES_MQIA_PUB_COUNT', 215);
define('MQSERIES_MQIA_PUB_SCOPE', 219);
define('MQSERIES_MQIA_PUBSUB_CLUSTER', 249);
define('MQSERIES_MQIA_PUBSUB_MAXMSG_RETRY_COUNT', 206);
define('MQSERIES_MQIA_PUBSUB_MODE', 187);
define('MQSERIES_MQIA_PUBSUB_NP_MSG', 203);
define('MQSERIES_MQIA_PUBSUB_NP_RESP', 205);
define('MQSERIES_MQIA_PUBSUB_SYNC_PT', 207);
define('MQSERIES_MQIA_Q_DEPTH_HIGH_EVENT', 43);
define('MQSERIES_MQIA_Q_DEPTH_HIGH_LIMIT', 40);
define('MQSERIES_MQIA_Q_DEPTH_LOW_EVENT', 44);
define('MQSERIES_MQIA_Q_DEPTH_LOW_LIMIT', 41);
define('MQSERIES_MQIA_Q_DEPTH_MAX_EVENT', 42);
define('MQSERIES_MQIA_Q_SERVICE_INTERVAL', 54);
define('MQSERIES_MQIA_Q_SERVICE_INTERVAL_EVENT', 46);
define('MQSERIES_MQIA_Q_TYPE', 20);
define('MQSERIES_MQIA_Q_USERS', 82);
define('MQSERIES_MQIA_QMGR_CFCONLOS', 245);
define('MQSERIES_MQIA_QMOPT_CONS_COMMS_MSGS', 155);
define('MQSERIES_MQIA_QMOPT_CONS_CRITICAL_MSGS', 154);
define('MQSERIES_MQIA_QMOPT_CONS_ERROR_MSGS', 153);
define('MQSERIES_MQIA_QMOPT_CONS_INFO_MSGS', 151);
define('MQSERIES_MQIA_QMOPT_CONS_REORG_MSGS', 156);
define('MQSERIES_MQIA_QMOPT_CONS_SYSTEM_MSGS', 157);
define('MQSERIES_MQIA_QMOPT_CONS_WARNING_MSGS', 152);
define('MQSERIES_MQIA_QMOPT_CSMT_ON_ERROR', 150);
define('MQSERIES_MQIA_QMOPT_INTERNAL_DUMP', 170);
define('MQSERIES_MQIA_QMOPT_LOG_COMMS_MSGS', 162);
define('MQSERIES_MQIA_QMOPT_LOG_CRITICAL_MSGS', 161);
define('MQSERIES_MQIA_QMOPT_LOG_ERROR_MSGS', 160);
define('MQSERIES_MQIA_QMOPT_LOG_INFO_MSGS', 158);
define('MQSERIES_MQIA_QMOPT_LOG_REORG_MSGS', 163);
define('MQSERIES_MQIA_QMOPT_LOG_SYSTEM_MSGS', 164);
define('MQSERIES_MQIA_QMOPT_LOG_WARNING_MSGS', 159);
define('MQSERIES_MQIA_QMOPT_TRACE_COMMS', 166);
define('MQSERIES_MQIA_QMOPT_TRACE_CONVERSION', 168);
define('MQSERIES_MQIA_QMOPT_TRACE_REORG', 167);
define('MQSERIES_MQIA_QMOPT_TRACE_MQI_CALLS', 165);
define('MQSERIES_MQIA_QMOPT_TRACE_SYSTEM', 169);
define('MQSERIES_MQIA_QSG_DISP', 63);
define('MQSERIES_MQIA_READ_AHEAD', 189);
define('MQSERIES_MQIA_RECEIVE_TIMEOUT', 111);
define('MQSERIES_MQIA_RECEIVE_TIMEOUT_MIN', 113);
define('MQSERIES_MQIA_RECEIVE_TIMEOUT_TYPE', 112);
define('MQSERIES_MQIA_REMOTE_EVENT', 50);
define('MQSERIES_MQIA_RETENTION_INTERVAL', 21);
define('MQSERIES_MQIA_RESPONSE_RESTART_POINT', 231);
define('MQSERIES_MQIA_SCOPE', 45);
define('MQSERIES_MQIA_SECURITY_CASE', 141);
define('MQSERIES_MQIA_SERVICE_CONTROL', 139);
define('MQSERIES_MQIA_SERVICE_TYPE', 121);
define('MQSERIES_MQIA_SHAREABILITY', 23);
define('MQSERIES_MQIA_SHARED_Q_Q_MGR_NAME', 77);
define('MQSERIES_MQIA_SSL_EVENT', 75);
define('MQSERIES_MQIA_SSL_FIPS_REQUIRED', 92);
define('MQSERIES_MQIA_SSL_RESET_COUNT', 76);
define('MQSERIES_MQIA_SSL_TASKS', 69);
define('MQSERIES_MQIA_START_STOP_EVENT', 52);
define('MQSERIES_MQIA_STATISTICS_CHANNEL', 129);
define('MQSERIES_MQIA_STATISTICS_AUTO_CLUSSDR', 130);
define('MQSERIES_MQIA_STATISTICS_INTERVAL', 131);
define('MQSERIES_MQIA_STATISTICS_MQI', 127);
define('MQSERIES_MQIA_STATISTICS_Q', 128);
define('MQSERIES_MQIA_SUB_COUNT', 204);
define('MQSERIES_MQIA_SUB_SCOPE', 218);
define('MQSERIES_MQIA_SYNCPOINT', 30);
define('MQSERIES_MQIA_TCP_CHANNELS', 114);
define('MQSERIES_MQIA_TCP_KEEP_ALIVE', 115);
define('MQSERIES_MQIA_TCP_STACK_TYPE', 116);
define('MQSERIES_MQIA_TIME_SINCE_RESET', 35);
define('MQSERIES_MQIA_TOPIC_DEF_PERSISTENCE', 185);
define('MQSERIES_MQIA_TOPIC_TYPE', 208);
define('MQSERIES_MQIA_TRACE_ROUTE_RECORDING', 137);
define('MQSERIES_MQIA_TREE_LIFE_TIME', 183);
define('MQSERIES_MQIA_TRIGGER_CONTROL', 24);
define('MQSERIES_MQIA_TRIGGER_DEPTH', 29);
define('MQSERIES_MQIA_TRIGGER_INTERVAL', 25);
define('MQSERIES_MQIA_TRIGGER_MSG_PRIORITY', 26);
define('MQSERIES_MQIA_TRIGGER_TYPE', 28);
define('MQSERIES_MQIA_TRIGGER_RESTART', 91);
define('MQSERIES_MQIA_UR_DISP', 222);
define('MQSERIES_MQIA_USAGE', 12);
define('MQSERIES_MQIA_USER_LIST', 2000);
define('MQSERIES_MQIA_MULTICAST', 176);
define('MQSERIES_MQIA_WILDCARD_OPERATION', 216);
define('MQSERIES_MQIA_COMM_INFO_TYPE', 223);
define('MQSERIES_MQIA_COMM_EVENT', 232);
define('MQSERIES_MQIA_MCAST_BRIDGE', 233);
define('MQSERIES_MQIA_USE_DEAD_LETTER_Q', 234);
define('MQSERIES_MQIA_TOLERATE_UNPROTECTED', 235);
define('MQSERIES_MQIA_SIGNATURE_ALGORITHM', 236);
define('MQSERIES_MQIA_ENCRYPTION_ALGORITHM', 237);
define('MQSERIES_MQIA_POLICY_VERSION', 238);
define('MQSERIES_MQIA_ACTIVITY_CONN_OVERRIDE', 239);
define('MQSERIES_MQIA_ACTIVITY_TRACE', 240);
define('MQSERIES_MQIA_SUB_CONFIGURATION_EVENT', 242);
define('MQSERIES_MQIA_XR_CAPABILITY', 243);
define('MQSERIES_MQIA_SUITE_B_STRENGTH', 247);
define('MQSERIES_MQIA_CHLAUTH_RECORDS', 248);
define('MQSERIES_MQIA_DEF_CLUSTER_XMIT_Q_TYPE', 250);
define('MQSERIES_MQIA_PROT_POLICY_CAPABILITY', 251);
define('MQSERIES_MQOD_VERSION_1', 1);
define('MQSERIES_MQOD_VERSION_2', 2);
define('MQSERIES_MQOD_VERSION_3', 3);
define('MQSERIES_MQOD_VERSION_4', 4);
define('MQSERIES_MQOD_CURRENT_VERSION', 4);
define('MQSERIES_MQSO_NONE', 0);
define('MQSERIES_MQSO_NON_DURABLE', 0);
define('MQSERIES_MQSO_READ_AHEAD_AS_Q_DEF', 0);
define('MQSERIES_MQSO_ALTER', 1);
define('MQSERIES_MQSO_CREATE', 2);
define('MQSERIES_MQSO_RESUME', 4);
define('MQSERIES_MQSO_DURABLE', 8);
define('MQSERIES_MQSO_GROUP_SUB', 16);
define('MQSERIES_MQSO_MANAGED', 32);
define('MQSERIES_MQSO_SET_IDENTITY_CONTEXT', 64);
define('MQSERIES_MQSO_NO_MULTICAST', 128);
define('MQSERIES_MQSO_FIXED_USERID', 256);
define('MQSERIES_MQSO_ANY_USERID', 512);
define('MQSERIES_MQSO_PUBLICATIONS_ON_REQUEST', 2048);
define('MQSERIES_MQSO_NEW_PUBLICATIONS_ONLY', 4096);
define('MQSERIES_MQSO_FAIL_IF_QUIESCING', 8192);
define('MQSERIES_MQSO_ALTERNATE_USER_AUTHORITY', 262144);
define('MQSERIES_MQSO_WILDCARD_CHAR', 1048576);
define('MQSERIES_MQSO_WILDCARD_TOPIC', 2097152);
define('MQSERIES_MQSO_SET_CORREL_ID', 4194304);
define('MQSERIES_MQSO_SCOPE_QMGR', 67108864);
define('MQSERIES_MQSO_NO_READ_AHEAD', 134217728);
define('MQSERIES_MQSO_READ_AHEAD', 268435456);
define('MQSERIES_MQSTAT_TYPE_ASYNC_ERROR', 0);
define('MQSERIES_MQSTAT_TYPE_RECONNECTION', 1);
define('MQSERIES_MQSTAT_TYPE_RECONNECTION_ERROR', 2);
<?php

/**
 * Blackfire extension stubs.
 * @link https://blackfire.io
 */
final class BlackfireProbe
{
    /**
     * Returns a global singleton and enables it by default.
     *
     * @return \BlackfireProbe
     */
    public static function getMainInstance() {}

    /**
     * Tells whether the probe is currently profiling or not.
     *
     * @return bool
     */
    public static function isEnabled() {}

    /**
     * Adds a marker for the Timeline View.
     *
     * @param string $markerName
     */
    public static function addMarker($markerName = '') {}

    /**
     * BlackfireProbe constructor. SHOULD NOT BE USED DIRECTLY!
     * USE getMainInstance() INSTEAD!
     *
     * @param string $query An URL-encoded string that configures the probe. Part of the string is signed.
     *                      Typically comes from X-Blackfire-Query HTTP header or BLACKRFIRE_QUERY environment variable.
     * @param string|null $envId An id that is given to the agent for signature impersonation.
     * @param string|null $envToken The token associated to $envId.
     * @param string|null $agentSocket The URL where profiles will be written (directory, socket or TCP destination).
     */
    public function __construct($query, $envId = null, $envToken = null, $agentSocket = null) {}

    /**
     * Tells if the probe is cryptographically verified,
     * i.e. if the signature in X-Blackfire-Query HTTP header or
     * BLACKFIRE_QUERY environment variable is valid.
     *
     * @return bool
     */
    public function isVerified() {}

    /**
     * @param string $configuration
     */
    public function setConfiguration($configuration) {}

    /**
     * Gets the response message/status/line.
     *
     * This lines gives details about the status of the probe. That can be:
     * - an error: `Blackfire-Error: $errNumber $urlEncodedErrorMessage`
     * - or not: `Blackfire-Response: $rfc1738EncodedMessage`
     *
     * @return string The response line
     */
    public function getResponseLine() {}

    /**
     * Enables manual instrumentation. Starts collecting profiling data.
     *
     * @return bool False if enabling failed.
     */
    public function enable() {}

    /**
     * Discards collected data and disables instrumentation.
     *
     * Does not close the profile payload, allowing to re-enable the probe and aggregate data in the same profile.
     *
     * @return bool False if the probe was not enabled.
     */
    public function discard() {}

    /**
     * Disables instrumentation.
     *
     * Does not close the profile payload, allowing to re-enable the probe
     * and to aggregate data in the same profile.
     *
     * @return bool False if the probe was not enabled.
     */
    public function disable() {}

    /**
     * Stops the profiling and forces the collected data to be sent to Blackfire.
     *
     * @return bool False if the probe was not enabled.
     */
    public function close() {}

    /**
     * Creates a sub-query string to create a new profile linked to the current one.
     * Generated query must be set in the X-Blackire-Query HTTP header or in the BLACKFIRE_QUERY environment variable.
     *
     * @return string|null The sub-query or null if the current profile is not the first sample or profiling is disabled.
     */
    public function createSubProfileQuery() {}

    /**
     * Sets a custom transaction name for Blackfire Monitoring.
     *
     * @param string $transactionName Name to register for the transaction (e.g. 'user_model:show')
     *
     * @return void
     */
    public static function setTransactionName(string $transactionName) {}

    /**
     * Disables Blackfire Monitoring instrumentation for a transaction.
     *
     * @return void
     */
    public static function ignoreTransaction() {}

    /**
     * Manually starts a transaction. Useful for CLI/Consumer monitoring.
     *
     * @return void
     */
    public static function startTransaction() {}

    /**
     * Manually stops a transaction. Useful for CLI/Consumer monitoring.
     *
     * @return void
     */
    public static function stopTransaction() {}
}
<?php

/**
 * Helper autocomplete for php cassandra extension.
 * Compiled using the https://github.com/datastax/php-driver/blob/master/ext/doc/generate_doc.sh
 *
 * @see https://github.com/datastax/php-driver/tree/master/ext/doc
 *
 * @author Vasyl Sovyak <soulshockers@gmail.com>
 * @link   https://github.com/soulshockers/cassandra-phpdoc
 */

/**
 * Copyright 2019 DataStax, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

namespace {
    /**
     * The main entry point to the PHP Driver for Apache Cassandra.
     *
     * Use Cassandra::cluster() to build a cluster instance.
     * Use Cassandra::ssl() to build SSL options instance.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/
     */
    final class Cassandra
    {
        /**
         * Consistency level ANY means the request is fulfilled as soon as the data
         * has been written on the Coordinator. Requests with this consistency level
         * are not guaranteed to make it to Replica nodes.
         *
         * @see \Cassandra\Session::execute()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-CONSISTENCY_ANY
         */
        public const CONSISTENCY_ANY = 0;

        /**
         * Consistency level ONE guarantees that data has been written to at least
         * one Replica node.
         *
         * @see \Cassandra\Session::execute()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-CONSISTENCY_ONE
         */
        public const CONSISTENCY_ONE = 1;

        /**
         * Consistency level TWO guarantees that data has been written to at least
         * two Replica nodes.
         *
         * @see \Cassandra\Session::execute()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-CONSISTENCY_TWO
         */
        public const CONSISTENCY_TWO = 2;

        /**
         * Consistency level THREE guarantees that data has been written to at least
         * three Replica nodes.
         *
         * @see \Cassandra\Session::execute()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-CONSISTENCY_THREE
         */
        public const CONSISTENCY_THREE = 3;

        /**
         * Consistency level QUORUM guarantees that data has been written to at least
         * the majority of Replica nodes. How many nodes exactly are a majority
         * depends on the replication factor of a given keyspace and is calculated
         * using the formula `ceil(RF / 2 + 1)`, where `ceil` is a mathematical
         * ceiling function and `RF` is the replication factor used. For example,
         * for a replication factor of `5`, the majority is `ceil(5 / 2 + 1) = 3`.
         *
         * @see \Cassandra\Session::execute()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-CONSISTENCY_QUORUM
         */
        public const CONSISTENCY_QUORUM = 4;

        /**
         * Consistency level ALL guarantees that data has been written to all
         * Replica nodes.
         *
         * @see \Cassandra\Session::execute()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-CONSISTENCY_ALL
         */
        public const CONSISTENCY_ALL = 5;

        /**
         * Same as `CONSISTENCY_QUORUM`, but confined to the local data center. This
         * consistency level works only with `NetworkTopologyStrategy` replication.
         *
         * @see \Cassandra\Session::execute()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-CONSISTENCY_LOCAL_QUORUM
         */
        public const CONSISTENCY_LOCAL_QUORUM = 6;

        /**
         * Consistency level EACH_QUORUM guarantees that data has been written to at
         * least a majority Replica nodes in all datacenters. This consistency level
         * works only with `NetworkTopologyStrategy` replication.
         *
         * @see \Cassandra\Session::execute()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-CONSISTENCY_EACH_QUORUM
         */
        public const CONSISTENCY_EACH_QUORUM = 7;

        /**
         * This is a serial consistency level, it is used in conditional updates,
         * e.g. (`CREATE|INSERT ... IF NOT EXISTS`), and should be specified as the
         * `serial_consistency` execution option when invoking `session.execute`
         * or `session.execute_async`.
         *
         * Consistency level SERIAL, when set, ensures that a Paxos commit fails if
         * any of the replicas is down.
         *
         * @see \Cassandra\Session::execute()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-CONSISTENCY_SERIAL
         */
        public const CONSISTENCY_SERIAL = 8;

        /**
         * Same as `CONSISTENCY_SERIAL`, but confined to the local data center. This
         * consistency level works only with `NetworkTopologyStrategy` replication.
         *
         * @see \Cassandra\Session::execute()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-CONSISTENCY_LOCAL_SERIAL
         */
        public const CONSISTENCY_LOCAL_SERIAL = 9;

        /**
         * Same as `CONSISTENCY_ONE`, but confined to the local data center. This
         * consistency level works only with `NetworkTopologyStrategy` replication.
         *
         * @see \Cassandra\Session::execute()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-CONSISTENCY_LOCAL_ONE
         */
        public const CONSISTENCY_LOCAL_ONE = 10;

        /**
         * Perform no verification of nodes when using SSL encryption.
         *
         * @see \Cassandra\SSLOptions\Builder::withVerifyFlags()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-VERIFY_NONE
         */
        public const VERIFY_NONE = 0;

        /**
         * Verify presence and validity of SSL certificates.
         *
         * @see \Cassandra\SSLOptions\Builder::withVerifyFlags()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-VERIFY_PEER_CERT
         */
        public const VERIFY_PEER_CERT = 1;

        /**
         * Verify that the IP address matches the SSL certificate’s common name or
         * one of its subject alternative names. This implies the certificate is
         * also present.
         *
         * @see \Cassandra\SSLOptions\Builder::withVerifyFlags()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-VERIFY_PEER_IDENTITY
         */
        public const VERIFY_PEER_IDENTITY = 2;

        /**
         * @see \Cassandra\BatchStatement::__construct()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-BATCH_LOGGED
         */
        public const BATCH_LOGGED = 0;

        /**
         * @see \Cassandra\BatchStatement::__construct()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-BATCH_UNLOGGED
         */
        public const BATCH_UNLOGGED = 1;

        /**
         * @see \Cassandra\BatchStatement::__construct()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-BATCH_COUNTER
         */
        public const BATCH_COUNTER = 2;

        /**
         * Used to disable logging.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-LOG_DISABLED
         */
        public const LOG_DISABLED = 0;

        /**
         * Allow critical level logging.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-LOG_CRITICAL
         */
        public const LOG_CRITICAL = 1;

        /**
         * Allow error level logging.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-LOG_ERROR
         */
        public const LOG_ERROR = 2;

        /**
         * Allow warning level logging.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-LOG_WARN
         */
        public const LOG_WARN = 3;

        /**
         * Allow info level logging.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-LOG_INFO
         */
        public const LOG_INFO = 4;

        /**
         * Allow debug level logging.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-LOG_DEBUG
         */
        public const LOG_DEBUG = 5;

        /**
         * Allow trace level logging.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-LOG_TRACE
         */
        public const LOG_TRACE = 6;

        /**
         * When using a map, collection or set of type text, all of its elements
         * must be strings.
         *
         * @see Set::__construct()
         * @see Collection::__construct()
         * @see Map::__construct()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_TEXT
         */
        public const TYPE_TEXT = 'text';

        /**
         * When using a map, collection or set of type ascii, all of its elements
         * must be strings.
         *
         * @see Set::__construct()
         * @see Collection::__construct()
         * @see Map::__construct()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_ASCII
         */
        public const TYPE_ASCII = 'ascii';

        /**
         * When using a map, collection or set of type varchar, all of its elements
         * must be strings.
         *
         * @see Set::__construct()
         * @see Collection::__construct()
         * @see Map::__construct()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_VARCHAR
         */
        public const TYPE_VARCHAR = 'varchar';

        /**
         * When using a map, collection or set of type bigint, all of its elements
         * must be instances of Bigint.
         *
         * @see Set::__construct()
         * @see Collection::__construct()
         * @see Map::__construct()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_BIGINT
         */
        public const TYPE_BIGINT = 'bigint';

        /**
         * When using a map, collection or set of type smallint, all of its elements
         * must be instances of Inet.
         *
         * @see Set::__construct()
         * @see Collection::__construct()
         * @see Map::__construct()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_SMALLINT
         */
        public const TYPE_SMALLINT = 'smallint';

        /**
         * When using a map, collection or set of type tinyint, all of its elements
         * must be instances of Inet.
         *
         * @see Set::__construct()
         * @see Collection::__construct()
         * @see Map::__construct()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_TINYINT
         */
        public const TYPE_TINYINT = 'tinyint';

        /**
         * When using a map, collection or set of type blob, all of its elements
         * must be instances of Blob.
         *
         * @see Set::__construct()
         * @see Collection::__construct()
         * @see Map::__construct()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_BLOB
         */
        public const TYPE_BLOB = 'blob';

        /**
         * When using a map, collection or set of type bool, all of its elements
         * must be boolean.
         *
         * @see Set::__construct()
         * @see Collection::__construct()
         * @see Map::__construct()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_BOOLEAN
         */
        public const TYPE_BOOLEAN = 'boolean';

        /**
         * When using a map, collection or set of type counter, all of its elements
         * must be instances of Bigint.
         *
         * @see Set::__construct()
         * @see Collection::__construct()
         * @see Map::__construct()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_COUNTER
         */
        public const TYPE_COUNTER = 'counter';

        /**
         * When using a map, collection or set of type decimal, all of its elements
         * must be instances of Decimal.
         *
         * @see Set::__construct()
         * @see Collection::__construct()
         * @see Map::__construct()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_DECIMAL
         */
        public const TYPE_DECIMAL = 'decimal';

        /**
         * When using a map, collection or set of type double, all of its elements
         * must be doubles.
         *
         * @see Set::__construct()
         * @see Collection::__construct()
         * @see Map::__construct()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_DOUBLE
         */
        public const TYPE_DOUBLE = 'double';

        /**
         * When using a map, collection or set of type float, all of its elements
         * must be instances of Float.
         *
         * @see Set::__construct()
         * @see Collection::__construct()
         * @see Map::__construct()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_FLOAT
         */
        public const TYPE_FLOAT = 'float';

        /**
         * When using a map, collection or set of type int, all of its elements
         * must be ints.
         *
         * @see Set::__construct()
         * @see Collection::__construct()
         * @see Map::__construct()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_INT
         */
        public const TYPE_INT = 'int';

        /**
         * When using a map, collection or set of type timestamp, all of its elements
         * must be instances of Timestamp.
         *
         * @see Set::__construct()
         * @see Collection::__construct()
         * @see Map::__construct()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_TIMESTAMP
         */
        public const TYPE_TIMESTAMP = 'timestamp';

        /**
         * When using a map, collection or set of type uuid, all of its elements
         * must be instances of Uuid.
         *
         * @see Set::__construct()
         * @see Collection::__construct()
         * @see Map::__construct()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_UUID
         */
        public const TYPE_UUID = 'uuid';

        /**
         * When using a map, collection or set of type varint, all of its elements
         * must be instances of Varint.
         *
         * @see Set::__construct()
         * @see Collection::__construct()
         * @see Map::__construct()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_VARINT
         */
        public const TYPE_VARINT = 'varint';

        /**
         * When using a map, collection or set of type timeuuid, all of its elements
         * must be instances of Timeuuid.
         *
         * @see Set::__construct()
         * @see Collection::__construct()
         * @see Map::__construct()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_TIMEUUID
         */
        public const TYPE_TIMEUUID = 'timeuuid';

        /**
         * When using a map, collection or set of type inet, all of its elements
         * must be instances of Inet.
         *
         * @see Set::__construct()
         * @see Collection::__construct()
         * @see Map::__construct()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_INET
         */
        public const TYPE_INET = 'inet';

        /**
         * The current version of the extension.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-VERSION
         */
        public const VERSION = '1.3.2';

        /**
         * The version of the cpp-driver the extension is compiled against.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-CPP_DRIVER_VERSION
         */
        public const CPP_DRIVER_VERSION = '2.13.0';

        /**
         * Creates a new cluster builder for constructing a Cluster object.
         *
         * @return \Cassandra\Cluster\Builder A cluster builder object with default settings
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#method-cluster
         */
        public static function cluster() {}

        /**
         * Creates a new ssl builder for constructing a SSLOptions object.
         *
         * @return \Cassandra\SSLOptions\Builder A SSL options builder with default settings
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#method-ssl
         */
        public static function ssl() {}
    }
}

/**
 * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/
 */

namespace Cassandra {
    use JetBrains\PhpStorm\Deprecated;

    /**
     * A PHP representation of a column
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Column/
     */
    interface Column
    {
        /**
         * Returns the name of the column.
         *
         * @return string Name of the column or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Column/#method-name
         */
        public function name();

        /**
         * Returns the type of the column.
         *
         * @return \Cassandra\Type Type of the column
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Column/#method-type
         */
        public function type();

        /**
         * Returns whether the column is in descending or ascending order.
         *
         * @return bool Whether the column is stored in descending order.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Column/#method-isReversed
         */
        public function isReversed();

        /**
         * Returns true for static columns.
         *
         * @return bool Whether the column is static
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Column/#method-isStatic
         */
        public function isStatic();

        /**
         * Returns true for frozen columns.
         *
         * @return bool Whether the column is frozen
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Column/#method-isFrozen
         */
        public function isFrozen();

        /**
         * Returns name of the index if defined.
         *
         * @return string Name of the index if defined or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Column/#method-indexName
         */
        public function indexName();

        /**
         * Returns index options if present.
         *
         * @return string Index options if present or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Column/#method-indexOptions
         */
        public function indexOptions();
    }

    /**
     * A session is used to prepare and execute statements.
     *
     * @see \Cassandra\Cluster::connect()
     * @see \Cassandra\Cluster::connectAsync()
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Session/
     */
    interface Session
    {
        /**
         * Execute a query.
         *
         * Available execution options:
         * | Option Name        | Option **Type** | Option Details                                                                                           |
         * |--------------------|-----------------|----------------------------------------------------------------------------------------------------------|
         * | arguments          | array           | An array or positional or named arguments                                                                |
         * | consistency        | int             | A consistency constant e.g Dse::CONSISTENCY_ONE, Dse::CONSISTENCY_QUORUM, etc.                           |
         * | timeout            | int             | A number of rows to include in result for paging                                                         |
         * | paging_state_token | string          | A string token use to resume from the state of a previous result set                                     |
         * | retry_policy       | RetryPolicy     | A retry policy that is used to handle server-side failures for this request                              |
         * | serial_consistency | int             | Either Dse::CONSISTENCY_SERIAL or Dse::CONSISTENCY_LOCAL_SERIAL                                          |
         * | timestamp          | int\|string     | Either an integer or integer string timestamp that represents the number of microseconds since the epoch |
         * | execute_as         | string          | User to execute statement as                                                                             |
         *
         * @param string|\Cassandra\Statement $statement string or statement to be executed.
         * @param array|\Cassandra\ExecutionOptions|null $options Options to control execution of the query.
         *
         * @return \Cassandra\Rows A collection of rows.
         * @throws \Cassandra\Exception
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Session/#method-execute
         */
        public function execute($statement, $options);

        /**
         * Execute a query asynchronously. This method returns immediately, but
         * the query continues execution in the background.
         *
         * @param string|\Cassandra\Statement $statement string or statement to be executed.
         * @param array|\Cassandra\ExecutionOptions|null $options Options to control execution of the query.
         *
         * @return \Cassandra\FutureRows A future that can be used to retrieve the result.
         *
         * @see \Cassandra\Session::execute() for valid execution options
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Session/#method-executeAsync
         */
        public function executeAsync($statement, $options);

        /**
         * Prepare a query for execution.
         *
         * @param string $cql The query to be prepared.
         * @param array|\Cassandra\ExecutionOptions|null $options Options to control preparing the query.
         *
         * @return \Cassandra\PreparedStatement A prepared statement that can be bound with parameters and executed.
         *
         * @throws \Cassandra\Exception
         *
         * @see \Cassandra\Session::execute() for valid execution options
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Session/#method-prepare
         */
        public function prepare($cql, $options);

        /**
         * Asynchronously prepare a query for execution.
         *
         * @param string $cql The query to be prepared.
         * @param array|\Cassandra\ExecutionOptions|null $options Options to control preparing the query.
         *
         * @return \Cassandra\FuturePreparedStatement A future that can be used to retrieve the prepared statement.
         *
         * @see \Cassandra\Session::execute() for valid execution options
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Session/#method-prepareAsync
         */
        public function prepareAsync($cql, $options);

        /**
         * Close the session and all its connections.
         *
         * @param float $timeout The amount of time in seconds to wait for the session to close.
         *
         * @return null Nothing.
         * @throws \Cassandra\Exception
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Session/#method-close
         */
        public function close($timeout);

        /**
         * Asynchronously close the session and all its connections.
         *
         * @return \Cassandra\FutureClose A future that can be waited on.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Session/#method-closeAsync
         */
        public function closeAsync();

        /**
         * Get performance and diagnostic metrics.
         *
         * @return array Performance/Diagnostic metrics.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Session/#method-metrics
         */
        public function metrics();

        /**
         * Get a snapshot of the cluster's current schema.
         *
         * @return \Cassandra\Schema A snapshot of the cluster's schema.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Session/#method-schema
         */
        public function schema();
    }

    /**
     * A PHP representation of a table
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/
     */
    interface Table
    {
        /**
         * Returns the name of this table
         *
         * @return string Name of the table
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-name
         */
        public function name();

        /**
         * Return a table's option by name
         *
         * @param string $name The name of the option
         *
         * @return \Cassandra\Value Value of an option by name
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-option
         */
        public function option($name);

        /**
         * Returns all the table's options
         *
         * @return array A dictionary of `string` and `Value` pairs of the table's options.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-options
         */
        public function options();

        /**
         * Description of the table, if any
         *
         * @return string Table description or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-comment
         */
        public function comment();

        /**
         * Returns read repair chance
         *
         * @return float Read repair chance
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-readRepairChance
         */
        public function readRepairChance();

        /**
         * Returns local read repair chance
         *
         * @return float Local read repair chance
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-localReadRepairChance
         */
        public function localReadRepairChance();

        /**
         * Returns GC grace seconds
         *
         * @return int GC grace seconds
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-gcGraceSeconds
         */
        public function gcGraceSeconds();

        /**
         * Returns caching options
         *
         * @return string Caching options
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-caching
         */
        public function caching();

        /**
         * Returns bloom filter FP chance
         *
         * @return float Bloom filter FP chance
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-bloomFilterFPChance
         */
        public function bloomFilterFPChance();

        /**
         * Returns memtable flush period in milliseconds
         *
         * @return int Memtable flush period in milliseconds
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-memtableFlushPeriodMs
         */
        public function memtableFlushPeriodMs();

        /**
         * Returns default TTL.
         *
         * @return int Default TTL.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-defaultTTL
         */
        public function defaultTTL();

        /**
         * Returns speculative retry.
         *
         * @return string Speculative retry.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-speculativeRetry
         */
        public function speculativeRetry();

        /**
         * Returns index interval
         *
         * @return int Index interval
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-indexInterval
         */
        public function indexInterval();

        /**
         * Returns compaction strategy class name
         *
         * @return string Compaction strategy class name
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-compactionStrategyClassName
         */
        public function compactionStrategyClassName();

        /**
         * Returns compaction strategy options
         *
         * @return \Cassandra\Map Compaction strategy options
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-compactionStrategyOptions
         */
        public function compactionStrategyOptions();

        /**
         * Returns compression parameters
         *
         * @return \Cassandra\Map Compression parameters
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-compressionParameters
         */
        public function compressionParameters();

        /**
         * Returns whether or not the `populate_io_cache_on_flush` is true
         *
         * @return bool Value of `populate_io_cache_on_flush` or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-populateIOCacheOnFlush
         */
        public function populateIOCacheOnFlush();

        /**
         * Returns whether or not the `replicate_on_write` is true
         *
         * @return bool Value of `replicate_on_write` or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-replicateOnWrite
         */
        public function replicateOnWrite();

        /**
         * Returns the value of `max_index_interval`
         *
         * @return int Value of `max_index_interval` or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-maxIndexInterval
         */
        public function maxIndexInterval();

        /**
         * Returns the value of `min_index_interval`
         *
         * @return int Value of `min_index_interval` or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-minIndexInterval
         */
        public function minIndexInterval();

        /**
         * Returns column by name
         *
         * @param string $name Name of the column
         *
         * @return \Cassandra\Column Column instance
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-column
         */
        public function column($name);

        /**
         * Returns all columns in this table
         *
         * @return array A list of Column instances
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-columns
         */
        public function columns();

        /**
         * Returns the partition key columns of the table
         *
         * @return array A list of Column instances
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-partitionKey
         */
        public function partitionKey();

        /**
         * Returns both the partition and clustering key columns of the table
         *
         * @return array A list of Column instances
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-primaryKey
         */
        public function primaryKey();

        /**
         * Returns the clustering key columns of the table
         *
         * @return array A list of Column instances
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-clusteringKey
         */
        public function clusteringKey();

        /**
         * @return array A list of cluster column orders ('asc' and 'desc')
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-clusteringOrder
         */
        public function clusteringOrder();
    }

    /**
     * Interface for retry policies.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.RetryPolicy/
     */
    interface RetryPolicy {}

    /**
     * Interface for timestamp generators.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.TimestampGenerator/
     */
    interface TimestampGenerator {}

    /**
     * An interface implemented by all exceptions thrown by the PHP Driver.
     * Makes it easy to catch all driver-related exceptions using
     * `catch (Exception $e)`.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Exception/
     */
    interface Exception {}

    /**
     * A PHP representation of a function
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Function/
     */
    interface Function_
    {
        /**
         * Returns the full name of the function
         *
         * @return string Full name of the function including name and types
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Function/#method-name
         */
        public function name();

        /**
         * Returns the simple name of the function
         *
         * @return string Simple name of the function
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Function/#method-simpleName
         */
        public function simpleName();

        /**
         * Returns the arguments of the function
         *
         * @return array Arguments of the function
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Function/#method-arguments
         */
        public function arguments();

        /**
         * Returns the return type of the function
         *
         * @return \Cassandra\Type Return type of the function
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Function/#method-returnType
         */
        public function returnType();

        /**
         * Returns the signature of the function
         *
         * @return string Signature of the function (same as name())
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Function/#method-signature
         */
        public function signature();

        /**
         * Returns the lanuage of the function
         *
         * @return string Language used by the function
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Function/#method-language
         */
        public function language();

        /**
         * Returns the body of the function
         *
         * @return string Body of the function
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Function/#method-body
         */
        public function body();

        /**
         * Determines if a function is called when the value is null.
         *
         * @return bool Returns whether the function is called when the input columns are null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Function/#method-isCalledOnNullInput
         */
        public function isCalledOnNullInput();
    }

    /**
     * A PHP representation of the CQL `uuid` datatype
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.UuidInterface/
     */
    interface UuidInterface
    {
        /**
         * Returns this uuid as string.
         *
         * @return string uuid as string
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.UuidInterface/#method-uuid
         */
        public function uuid();

        /**
         * Returns the version of this uuid.
         *
         * @return int version of this uuid
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.UuidInterface/#method-version
         */
        public function version();
    }

    /**
     * A PHP representation of an index
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Index/
     */
    interface Index
    {
        /**
         * Returns the name of the index
         *
         * @return string Name of the index
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Index/#method-name
         */
        public function name();

        /**
         * Returns the kind of index
         *
         * @return string Kind of the index
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Index/#method-kind
         */
        public function kind();

        /**
         * Returns the target column of the index
         *
         * @return string Target column name of the index
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Index/#method-target
         */
        public function target();

        /**
         * Return a column's option by name
         *
         * @param string $name The name of the option
         *
         * @return \Cassandra\Value Value of an option by name
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Index/#method-option
         */
        public function option($name);

        /**
         * Returns all the index's options
         *
         * @return array A dictionary of `string` and `Value` pairs of the index's options.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Index/#method-options
         */
        public function options();

        /**
         * Returns the class name of the index
         *
         * @return string Class name of a custom index
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Index/#method-className
         */
        public function className();

        /**
         * Determines if the index is a custom index.
         *
         * @return bool true if a custom index
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Index/#method-isCustom
         */
        public function isCustom();
    }

    /**
     * Cluster object is used to create Sessions.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Cluster/
     */
    interface Cluster
    {
        /**
         * Creates a new Session instance.
         *
         * @param string $keyspace Optional keyspace name
         *
         * @return \Cassandra\Session Session instance
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Cluster/#method-connect
         */
        public function connect($keyspace);

        /**
         * Creates a new Session instance.
         *
         * @param string $keyspace Optional keyspace name
         *
         * @return \Cassandra\Future A Future Session instance
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Cluster/#method-connectAsync
         */
        public function connectAsync($keyspace);
    }

    /**
     * Common interface implemented by all numeric types, providing basic
     * arithmetic functions.
     *
     * @see \Cassandra\Bigint
     * @see \Cassandra\Decimal
     * @see \Cassandra\Float_
     * @see \Cassandra\Varint
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Numeric/
     */
    interface Numeric
    {
        /**
         * @param \Cassandra\Numeric $num a number to add to this one
         *
         * @return \Cassandra\Numeric sum
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Numeric/#method-add
         */
        public function add($num);

        /**
         * @param \Cassandra\Numeric $num a number to subtract from this one
         *
         * @return \Cassandra\Numeric difference
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Numeric/#method-sub
         */
        public function sub($num);

        /**
         * @param \Cassandra\Numeric $num a number to multiply this one by
         *
         * @return \Cassandra\Numeric product
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Numeric/#method-mul
         */
        public function mul($num);

        /**
         * @param \Cassandra\Numeric $num a number to divide this one by
         *
         * @return \Cassandra\Numeric quotient
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Numeric/#method-div
         */
        public function div($num);

        /**
         * @param \Cassandra\Numeric $num a number to divide this one by
         *
         * @return \Cassandra\Numeric remainder
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Numeric/#method-mod
         */
        public function mod($num);

        /**
         * @return \Cassandra\Numeric absolute value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Numeric/#method-abs
         */
        public function abs();

        /**
         * @return \Cassandra\Numeric negative value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Numeric/#method-neg
         */
        public function neg();

        /**
         * @return \Cassandra\Numeric square root
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Numeric/#method-sqrt
         */
        public function sqrt();

        /**
         * @return int this number as int
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Numeric/#method-toInt
         */
        public function toInt();

        /**
         * @return float this number as float
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Numeric/#method-toDouble
         */
        public function toDouble();
    }

    /**
     * Futures are returns from asynchronous methods.
     *
     * @see \Cassandra\Cluster::connectAsync()
     * @see \Cassandra\Session::executeAsync()
     * @see \Cassandra\Session::prepareAsync()
     * @see \Cassandra\Session::closeAsync()
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Future/
     */
    interface Future
    {
        /**
         * Waits for a given future resource to resolve and throws errors if any.
         *
         * @param int|float|null $timeout A timeout in seconds
         *
         * @return mixed a value that the future has been resolved with
         * @throws \Cassandra\Exception\TimeoutException
         *
         * @throws \Cassandra\Exception\InvalidArgumentException
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Future/#method-get
         */
        public function get($timeout);
    }

    /**
     * A PHP representation of a keyspace
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Keyspace/
     */
    interface Keyspace
    {
        /**
         * Returns keyspace name
         *
         * @return string Name
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Keyspace/#method-name
         */
        public function name();

        /**
         * Returns replication class name
         *
         * @return string Replication class
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Keyspace/#method-replicationClassName
         */
        public function replicationClassName();

        /**
         * Returns replication options
         *
         * @return \Cassandra\Map Replication options
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Keyspace/#method-replicationOptions
         */
        public function replicationOptions();

        /**
         * Returns whether the keyspace has durable writes enabled
         *
         * @return string Whether durable writes are enabled
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Keyspace/#method-hasDurableWrites
         */
        public function hasDurableWrites();

        /**
         * Returns a table by name
         *
         * @param string $name Table name
         *
         * @return \Cassandra\Table|null Table instance or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Keyspace/#method-table
         */
        public function table($name);

        /**
         * Returns all tables defined in this keyspace
         *
         * @return array An array of `Table` instances
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Keyspace/#method-tables
         */
        public function tables();

        /**
         * Get user type by name
         *
         * @param string $name User type name
         *
         * @return \Cassandra\Type\UserType|null A user type or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Keyspace/#method-userType
         */
        public function userType($name);

        /**
         * Get all user types
         *
         * @return array An array of user types
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Keyspace/#method-userTypes
         */
        public function userTypes();

        /**
         * Get materialized view by name
         *
         * @param string $name Materialized view name
         *
         * @return \Cassandra\MaterializedView|null A materialized view or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Keyspace/#method-materializedView
         */
        public function materializedView($name);

        /**
         * Gets all materialized views
         *
         * @return array An array of materialized views
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Keyspace/#method-materializedViews
         */
        public function materializedViews();

        /**
         * Get a function by name and signature
         *
         * @param string $name Function name
         * @param string|\Cassandra\Type $params Function arguments
         *
         * @return \Cassandra\Function_|null A function or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Keyspace/#method-function
         */
        public function function_($name, ...$params);

        /**
         * Get all functions
         *
         * @return array An array of functions
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Keyspace/#method-functions
         */
        public function functions();

        /**
         * Get an aggregate by name and signature
         *
         * @param string $name Aggregate name
         * @param string|\Cassandra\Type $params Aggregate arguments
         *
         * @return \Cassandra\Aggregate|null An aggregate or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Keyspace/#method-aggregate
         */
        public function aggregate($name, ...$params);

        /**
         * Get all aggregates
         *
         * @return array An array of aggregates
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Keyspace/#method-aggregates
         */
        public function aggregates();
    }

    /**
     * Common interface implemented by all Cassandra value types.
     *
     * @see \Cassandra\Bigint
     * @see \Cassandra\Smallint
     * @see \Cassandra\Tinyint
     * @see \Cassandra\Blob
     * @see \Cassandra\Collection
     * @see \Cassandra\Float_
     * @see \Cassandra\Inet
     * @see \Cassandra\Map
     * @see \Cassandra\Set
     * @see \Cassandra\Timestamp
     * @see \Cassandra\Timeuuid
     * @see \Cassandra\Uuid
     * @see \Cassandra\Varint
     * @see \Cassandra\Date
     * @see \Cassandra\Time
     *
     * @see \Cassandra\Numeric
     * @see \Cassandra\UuidInterface
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Value/
     */
    interface Value
    {
        /**
         * The type of represented by the value.
         *
         * @return \Cassandra\Type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Value/#method-type
         */
        public function type();
    }

    /**
     * A PHP representation of an aggregate
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Aggregate/
     */
    interface Aggregate
    {
        /**
         * Returns the full name of the aggregate
         *
         * @return string Full name of the aggregate including name and types
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Aggregate/#method-name
         */
        public function name();

        /**
         * Returns the simple name of the aggregate
         *
         * @return string Simple name of the aggregate
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Aggregate/#method-simpleName
         */
        public function simpleName();

        /**
         * Returns the argument types of the aggregate
         *
         * @return array Argument types of the aggregate
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Aggregate/#method-argumentTypes
         */
        public function argumentTypes();

        /**
         * Returns the final function of the aggregate
         *
         * @return \Cassandra\Function_ Final function of the aggregate
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Aggregate/#method-finalFunction
         */
        public function finalFunction();

        /**
         * Returns the state function of the aggregate
         *
         * @return \Cassandra\Function_ State function of the aggregate
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Aggregate/#method-stateFunction
         */
        public function stateFunction();

        /**
         * Returns the initial condition of the aggregate
         *
         * @return \Cassandra\Value Initial condition of the aggregate
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Aggregate/#method-initialCondition
         */
        public function initialCondition();

        /**
         * Returns the return type of the aggregate
         *
         * @return \Cassandra\Type Return type of the aggregate
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Aggregate/#method-returnType
         */
        public function returnType();

        /**
         * Returns the state type of the aggregate
         *
         * @return \Cassandra\Type State type of the aggregate
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Aggregate/#method-stateType
         */
        public function stateType();

        /**
         * Returns the signature of the aggregate
         *
         * @return string Signature of the aggregate (same as name())
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Aggregate/#method-signature
         */
        public function signature();
    }

    /**
     * All statements implement this common interface.
     *
     * @see \Cassandra\SimpleStatement
     * @see \Cassandra\PreparedStatement
     * @see \Cassandra\BatchStatement
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Statement/
     */
    interface Statement {}

    /**
     * A PHP representation of a schema
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Schema/
     */
    interface Schema
    {
        /**
         * Returns a Keyspace instance by name.
         *
         * @param string $name Name of the keyspace to get
         *
         * @return \Cassandra\Keyspace Keyspace instance or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Schema/#method-keyspace
         */
        public function keyspace($name);

        /**
         * Returns all keyspaces defined in the schema.
         *
         * @return array An array of Keyspace instances.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Schema/#method-keyspaces
         */
        public function keyspaces();
    }

    /**
     * Rows represent a result of statement execution.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/
     */
    final class Rows implements \Iterator, \ArrayAccess
    {
        /**
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-__construct
         */
        public function __construct() {}

        /**
         * Returns the number of rows.
         *
         * @return int number of rows
         *
         * @see \Countable::count()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-count
         */
        public function count() {}

        /**
         * Resets the rows iterator.
         *
         * @return void
         *
         * @see \Iterator::rewind()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-rewind
         */
        public function rewind() {}

        /**
         * Returns current row.
         *
         * @return array current row
         *
         * @see \Iterator::current()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-current
         */
        public function current() {}

        /**
         * Returns current index.
         *
         * @return int index
         *
         * @see \Iterator::key()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-key
         */
        public function key() {}

        /**
         * Advances the rows iterator by one.
         *
         * @return void
         *
         * @see \Iterator::next()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-next
         */
        public function next() {}

        /**
         * Returns existence of more rows being available.
         *
         * @return bool whether there are more rows available for iteration
         *
         * @see \Iterator::valid()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-valid
         */
        public function valid() {}

        /**
         * Returns existence of a given row.
         *
         * @param int $offset row index
         *
         * @return bool whether a row at a given index exists
         *
         * @see \ArrayAccess::offsetExists()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-offsetExists
         */
        public function offsetExists($offset) {}

        /**
         * Returns a row at given index.
         *
         * @param int $offset row index
         *
         * @return array|null row at a given index
         *
         * @see \ArrayAccess::offsetGet()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-offsetGet
         */
        public function offsetGet($offset) {}

        /**
         * Sets a row at given index.
         *
         * @param int $offset row index
         * @param array $value row value
         *
         * @return void
         *
         * @throws \Cassandra\Exception\DomainException
         *
         * @see \ArrayAccess::offsetSet()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-offsetSet
         */
        public function offsetSet($offset, $value) {}

        /**
         * Removes a row at given index.
         *
         * @param int $offset row index
         *
         * @return void
         *
         * @throws \Cassandra\Exception\DomainException
         *
         * @see \ArrayAccess::offsetUnset()
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-offsetUnset
         */
        public function offsetUnset($offset) {}

        /**
         * Check for the last page when paging.
         *
         * @return bool whether this is the last page or not
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-isLastPage
         */
        public function isLastPage() {}

        /**
         * Get the next page of results.
         *
         * @param float|null $timeout
         *
         * @return \Cassandra\Rows|null loads and returns next result page
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-nextPage
         */
        public function nextPage($timeout) {}

        /**
         * Get the next page of results asynchronously.
         *
         * @return \Cassandra\Future returns future of the next result page
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-nextPageAsync
         */
        public function nextPageAsync() {}

        /**
         * Returns the raw paging state token.
         *
         * @return string
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-pagingStateToken
         */
        public function pagingStateToken() {}

        /**
         * Get the first row.
         *
         * @return array|null returns first row if any
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-first
         */
        public function first() {}
    }

    /**
     * Default cluster implementation.
     *
     * @see \Cassandra\Cluster
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultCluster/
     */
    final class DefaultCluster implements Cluster
    {
        /**
         * Creates a new Session instance.
         *
         * @param string $keyspace Optional keyspace name
         * @param int $timeout Optional timeout
         *
         * @return \Cassandra\Session Session instance
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultCluster/#method-connect
         */
        public function connect($keyspace, $timeout) {}

        /**
         * Creates a new Session instance.
         *
         * @param string $keyspace Optional keyspace name
         *
         * @return \Cassandra\Future A Future Session instance
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultCluster/#method-connectAsync
         */
        public function connectAsync($keyspace) {}
    }

    /**
     * A PHP representation of a public function
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultFunction/
     */
    final class DefaultFunction implements Function_
    {
        /**
         * Returns the full name of the function
         *
         * @return string Full name of the function including name and types
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultFunction/#method-name
         */
        public function name() {}

        /**
         * Returns the simple name of the function
         *
         * @return string Simple name of the function
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultFunction/#method-simpleName
         */
        public function simpleName() {}

        /**
         * Returns the arguments of the function
         *
         * @return array Arguments of the function
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultFunction/#method-arguments
         */
        public function arguments() {}

        /**
         * Returns the return type of the function
         *
         * @return \Cassandra\Type Return type of the function
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultFunction/#method-returnType
         */
        public function returnType() {}

        /**
         * Returns the signature of the function
         *
         * @return string Signature of the function (same as name())
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultFunction/#method-signature
         */
        public function signature() {}

        /**
         * Returns the lanuage of the function
         *
         * @return string Language used by the function
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultFunction/#method-language
         */
        public function language() {}

        /**
         * Returns the body of the function
         *
         * @return string Body of the function
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultFunction/#method-body
         */
        public function body() {}

        /**
         * Determines if a function is called when the value is null.
         *
         * @return bool Returns whether the function is called when the input columns are null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultFunction/#method-isCalledOnNullInput
         */
        public function isCalledOnNullInput() {}
    }

    /**
     * Simple statements can be executed using a Session instance.
     * They are constructed with a CQL string that can contain positional
     * argument markers `?`.
     *
     * NOTE: Positional argument are only valid for native protocol v2+.
     *
     * @see \Cassandra\Session::execute()
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.SimpleStatement/
     */
    final class SimpleStatement implements Statement
    {
        /**
         * Creates a new simple statement with the provided CQL.
         *
         * @param string $cql CQL string for this simple statement
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.SimpleStatement/#method-__construct
         */
        public function __construct($cql) {}
    }

    /**
     * A PHP representation of the CQL `tuple` datatype
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tuple/
     */
    final class Tuple implements Value, \Countable, \Iterator
    {
        /**
         * Creates a new tuple with the given types.
         *
         * @param array $types Array of types
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tuple/#method-__construct
         */
        public function __construct($types) {}

        /**
         * The type of this tuple.
         *
         * @return \Cassandra\Type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tuple/#method-type
         */
        public function type() {}

        /**
         * Array of values in this tuple.
         *
         * @return array values
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tuple/#method-values
         */
        public function values() {}

        /**
         * Sets the value at index in this tuple .
         *
         * @param mixed $value A value or null
         *
         * @return void
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tuple/#method-set
         */
        public function set($value) {}

        /**
         * Retrieves the value at a given index.
         *
         * @param int $index Index
         *
         * @return mixed A value or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tuple/#method-get
         */
        public function get($index) {}

        /**
         * Total number of elements in this tuple
         *
         * @return int count
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tuple/#method-count
         */
        public function count() {}

        /**
         * Current element for iteration
         *
         * @return mixed current element
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tuple/#method-current
         */
        public function current() {}

        /**
         * Current key for iteration
         *
         * @return int current key
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tuple/#method-key
         */
        public function key() {}

        /**
         * Move internal iterator forward
         *
         * @return void
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tuple/#method-next
         */
        public function next() {}

        /**
         * Check whether a current value exists
         *
         * @return bool
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tuple/#method-valid
         */
        public function valid() {}

        /**
         * Rewind internal iterator
         *
         * @return void
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tuple/#method-rewind
         */
        public function rewind() {}
    }

    /**
     * A PHP representation of the CQL `smallint` datatype.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/
     */
    final class Smallint implements Value, Numeric
    {
        /**
         * Creates a new 16-bit signed integer.
         *
         * @param int|float|string $value The value as an integer, double or string
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-__construct
         */
        public function __construct($value) {}

        /**
         * Minimum possible Smallint value
         *
         * @return \Cassandra\Smallint minimum value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-min
         */
        public static function min() {}

        /**
         * Maximum possible Smallint value
         *
         * @return \Cassandra\Smallint maximum value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-max
         */
        public static function max() {}

        /**
         * @return string
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-__toString
         */
        public function __toString() {}

        /**
         * The type of this value (smallint).
         *
         * @return \Cassandra\Type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-type
         */
        public function type() {}

        /**
         * Returns the integer value.
         *
         * @return int integer value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-value
         */
        public function value() {}

        /**
         * @param \Cassandra\Numeric $num a number to add to this one
         *
         * @return \Cassandra\Numeric sum
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-add
         */
        public function add($num) {}

        /**
         * @param \Cassandra\Numeric $num a number to subtract from this one
         *
         * @return \Cassandra\Numeric difference
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-sub
         */
        public function sub($num) {}

        /**
         * @param \Cassandra\Numeric $num a number to multiply this one by
         *
         * @return \Cassandra\Numeric product
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-mul
         */
        public function mul($num) {}

        /**
         * @param \Cassandra\Numeric $num a number to divide this one by
         *
         * @return \Cassandra\Numeric quotient
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-div
         */
        public function div($num) {}

        /**
         * @param \Cassandra\Numeric $num a number to divide this one by
         *
         * @return \Cassandra\Numeric remainder
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-mod
         */
        public function mod($num) {}

        /**
         * @return \Cassandra\Numeric absolute value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-abs
         */
        public function abs() {}

        /**
         * @return \Cassandra\Numeric negative value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-neg
         */
        public function neg() {}

        /**
         * @return \Cassandra\Numeric square root
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-sqrt
         */
        public function sqrt() {}

        /**
         * @return int this number as int
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-toInt
         */
        public function toInt() {}

        /**
         * @return float this number as float
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-toDouble
         */
        public function toDouble() {}
    }

    /**
     * A future returned from `Session::prepareAsync()`
     * This future will resolve with a PreparedStatement or an exception.
     *
     * @see \Cassandra\Session::prepareAsync()
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.FuturePreparedStatement/
     */
    final class FuturePreparedStatement implements Future
    {
        /**
         * Waits for a given future resource to resolve and throws errors if any.
         *
         * @param int|float|null $timeout A timeout in seconds
         *
         * @return \Cassandra\PreparedStatement A prepared statement
         * @throws \Cassandra\Exception\TimeoutException
         *
         * @throws \Cassandra\Exception\InvalidArgumentException
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.FuturePreparedStatement/#method-get
         */
        public function get($timeout) {}
    }

    /**
     * A PHP representation of a schema
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultSchema/
     */
    final class DefaultSchema implements Schema
    {
        /**
         * Returns a Keyspace instance by name.
         *
         * @param string $name Name of the keyspace to get
         *
         * @return \Cassandra\Keyspace Keyspace instance or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultSchema/#method-keyspace
         */
        public function keyspace($name) {}

        /**
         * Returns all keyspaces defined in the schema.
         *
         * @return array An array of `Keyspace` instances.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultSchema/#method-keyspaces
         */
        public function keyspaces() {}

        /**
         * Get the version of the schema snapshot
         *
         * @return int Version of the schema.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultSchema/#method-version
         */
        public function version() {}
    }

    /**
     * Batch statements are used to execute a series of simple or prepared
     * statements.
     *
     * There are 3 types of batch statements:
     *  * `Cassandra::BATCH_LOGGED`   - this is the default batch type. This batch
     *    guarantees that either all or none of its statements will be executed.
     *    This behavior is achieved by writing a batch log on the coordinator,
     *    which slows down the execution somewhat.
     *  * `Cassandra::BATCH_UNLOGGED` - this batch will not be verified when
     *    executed, which makes it faster than a `LOGGED` batch, but means that
     *    some of its statements might fail, while others - succeed.
     *  * `Cassandra::BATCH_COUNTER`  - this batch is used for counter updates,
     *    which are, unlike other writes, not idempotent.
     *
     * @see Cassandra::BATCH_LOGGED
     * @see Cassandra::BATCH_UNLOGGED
     * @see Cassandra::BATCH_COUNTER
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.BatchStatement/
     */
    final class BatchStatement implements Statement
    {
        /**
         * Creates a new batch statement.
         *
         * @param int $type must be one of Cassandra::BATCH_* (default: Cassandra::BATCH_LOGGED).
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.BatchStatement/#method-__construct
         */
        public function __construct($type) {}

        /**
         * Adds a statement to this batch.
         *
         * @param string|\Cassandra\Statement $statement string or statement to add
         * @param array|null $arguments positional or named arguments (optional)
         *
         * @return \Cassandra\BatchStatement self
         * @throws \Cassandra\Exception\InvalidArgumentException
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.BatchStatement/#method-add
         */
        public function add($statement, $arguments) {}
    }

    /**
     * A PHP representation of the CQL `list` datatype
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Collection/
     */
    final class Collection implements Value, \Countable, \Iterator
    {
        /**
         * Creates a new collection of a given type.
         *
         * @param \Cassandra\Type $type
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Collection/#method-__construct
         */
        public function __construct($type) {}

        /**
         * The type of this collection.
         *
         * @return \Cassandra\Type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Collection/#method-type
         */
        public function type() {}

        /**
         * Array of values in this collection.
         *
         * @return array values
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Collection/#method-values
         */
        public function values() {}

        /**
         * Adds one or more values to this collection.
         *
         * @param mixed ...$value one or more values to add
         *
         * @return int total number of values in this collection
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Collection/#method-add
         */
        public function add(...$value) {}

        /**
         * Retrieves the value at a given index.
         *
         * @param int $index Index
         *
         * @return mixed Value or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Collection/#method-get
         */
        public function get($index) {}

        /**
         * Finds index of a value in this collection.
         *
         * @param mixed $value Value
         *
         * @return int Index or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Collection/#method-find
         */
        public function find($value) {}

        /**
         * Total number of elements in this collection
         *
         * @return int count
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Collection/#method-count
         */
        public function count() {}

        /**
         * Current element for iteration
         *
         * @return mixed current element
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Collection/#method-current
         */
        public function current() {}

        /**
         * Current key for iteration
         *
         * @return int current key
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Collection/#method-key
         */
        public function key() {}

        /**
         * Move internal iterator forward
         *
         * @return void
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Collection/#method-next
         */
        public function next() {}

        /**
         * Check whether a current value exists
         *
         * @return bool
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Collection/#method-valid
         */
        public function valid() {}

        /**
         * Rewind internal iterator
         *
         * @return void
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Collection/#method-rewind
         */
        public function rewind() {}

        /**
         * Deletes the value at a given index
         *
         * @param int $index Index
         *
         * @return bool Whether the value at a given index is correctly removed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Collection/#method-remove
         */
        public function remove($index) {}
    }

    /**
     * This future results is resolved with Rows.
     *
     * @see \Cassandra\Session::executeAsync()
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.FutureRows/
     */
    final class FutureRows implements Future
    {
        /**
         * Waits for a given future resource to resolve and throws errors if any.
         *
         * @param int|float|null $timeout A timeout in seconds
         *
         * @return \Cassandra\Rows|null The result set
         * @throws \Cassandra\Exception\TimeoutException
         *
         * @throws \Cassandra\Exception\InvalidArgumentException
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.FutureRows/#method-get
         */
        public function get($timeout) {}
    }

    /**
     * A PHP representation of a materialized view
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/
     */
    final class DefaultMaterializedView extends MaterializedView
    {
        /**
         * Returns the name of this view
         *
         * @return string Name of the view
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-name
         */
        public function name() {}

        /**
         * Return a view's option by name
         *
         * @param string $name The name of the option
         *
         * @return \Cassandra\Value Value of an option by name
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-option
         */
        public function option($name) {}

        /**
         * Returns all the view's options
         *
         * @return array A dictionary of string and Value pairs of the
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-options
         */
        public function options() {}

        /**
         * Description of the view, if any
         *
         * @return string Table description or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-comment
         */
        public function comment() {}

        /**
         * Returns read repair chance
         *
         * @return float Read repair chance
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-readRepairChance
         */
        public function readRepairChance() {}

        /**
         * Returns local read repair chance
         *
         * @return float Local read repair chance
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-localReadRepairChance
         */
        public function localReadRepairChance() {}

        /**
         * Returns GC grace seconds
         *
         * @return int GC grace seconds
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-gcGraceSeconds
         */
        public function gcGraceSeconds() {}

        /**
         * Returns caching options
         *
         * @return string Caching options
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-caching
         */
        public function caching() {}

        /**
         * Returns bloom filter FP chance
         *
         * @return float Bloom filter FP chance
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-bloomFilterFPChance
         */
        public function bloomFilterFPChance() {}

        /**
         * Returns memtable flush period in milliseconds
         *
         * @return int Memtable flush period in milliseconds
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-memtableFlushPeriodMs
         */
        public function memtableFlushPeriodMs() {}

        /**
         * Returns default TTL.
         *
         * @return int Default TTL.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-defaultTTL
         */
        public function defaultTTL() {}

        /**
         * Returns speculative retry.
         *
         * @return string Speculative retry.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-speculativeRetry
         */
        public function speculativeRetry() {}

        /**
         * Returns index interval
         *
         * @return int Index interval
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-indexInterval
         */
        public function indexInterval() {}

        /**
         * Returns compaction strategy class name
         *
         * @return string Compaction strategy class name
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-compactionStrategyClassName
         */
        public function compactionStrategyClassName() {}

        /**
         * Returns compaction strategy options
         *
         * @return \Cassandra\Map Compaction strategy options
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-compactionStrategyOptions
         */
        public function compactionStrategyOptions() {}

        /**
         * Returns compression parameters
         *
         * @return \Cassandra\Map Compression parameters
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-compressionParameters
         */
        public function compressionParameters() {}

        /**
         * Returns whether or not the `populate_io_cache_on_flush` is true
         *
         * @return bool Value of `populate_io_cache_on_flush` or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-populateIOCacheOnFlush
         */
        public function populateIOCacheOnFlush() {}

        /**
         * Returns whether or not the `replicate_on_write` is true
         *
         * @return bool Value of `replicate_on_write` or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-replicateOnWrite
         */
        public function replicateOnWrite() {}

        /**
         * Returns the value of `max_index_interval`
         *
         * @return int Value of `max_index_interval` or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-maxIndexInterval
         */
        public function maxIndexInterval() {}

        /**
         * Returns the value of `min_index_interval`
         *
         * @return int Value of `min_index_interval` or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-minIndexInterval
         */
        public function minIndexInterval() {}

        /**
         * Returns column by name
         *
         * @param string $name Name of the column
         *
         * @return \Cassandra\Column Column instance
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-column
         */
        public function column($name) {}

        /**
         * Returns all columns in this view
         *
         * @return array A list of Column instances
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-columns
         */
        public function columns() {}

        /**
         * Returns the partition key columns of the view
         *
         * @return array A list of Column instances
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-partitionKey
         */
        public function partitionKey() {}

        /**
         * Returns both the partition and clustering key columns of the view
         *
         * @return array A list of Column instances
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-primaryKey
         */
        public function primaryKey() {}

        /**
         * Returns the clustering key columns of the view
         *
         * @return array A list of Column instances
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-clusteringKey
         */
        public function clusteringKey() {}

        /**
         * @return array A list of cluster column orders ('asc' and 'desc')
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-clusteringOrder
         */
        public function clusteringOrder() {}

        /**
         * Returns the base table of the view
         *
         * @return \Cassandra\Table Base table of the view
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-baseTable
         */
        public function baseTable() {}
    }

    /**
     * SSL options for Cluster.
     *
     * @see \Cassandra\SSLOptions\Builder
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.SSLOptions/
     */
    final class SSLOptions {}

    /**
     * A PHP representation of the CQL `bigint` datatype
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/
     */
    final class Bigint implements Value, Numeric
    {
        /**
         * Creates a new 64bit integer.
         *
         * @param string $value integer value as a string
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-__construct
         */
        public function __construct($value) {}

        /**
         * Minimum possible Bigint value
         *
         * @return \Cassandra\Bigint minimum value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-min
         */
        public static function min() {}

        /**
         * Maximum possible Bigint value
         *
         * @return \Cassandra\Bigint maximum value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-max
         */
        public static function max() {}

        /**
         * Returns string representation of the integer value.
         *
         * @return string integer value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-__toString
         */
        public function __toString() {}

        /**
         * The type of this bigint.
         *
         * @return \Cassandra\Type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-type
         */
        public function type() {}

        /**
         * Returns the integer value.
         *
         * @return string integer value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-value
         */
        public function value() {}

        /**
         * @param \Cassandra\Numeric $num a number to add to this one
         *
         * @return \Cassandra\Numeric sum
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-add
         */
        public function add($num) {}

        /**
         * @param \Cassandra\Numeric $num a number to subtract from this one
         *
         * @return \Cassandra\Numeric difference
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-sub
         */
        public function sub($num) {}

        /**
         * @param \Cassandra\Numeric $num a number to multiply this one by
         *
         * @return \Cassandra\Numeric product
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-mul
         */
        public function mul($num) {}

        /**
         * @param \Cassandra\Numeric $num a number to divide this one by
         *
         * @return \Cassandra\Numeric quotient
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-div
         */
        public function div($num) {}

        /**
         * @param \Cassandra\Numeric $num a number to divide this one by
         *
         * @return \Cassandra\Numeric remainder
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-mod
         */
        public function mod($num) {}

        /**
         * @return \Cassandra\Numeric absolute value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-abs
         */
        public function abs() {}

        /**
         * @return \Cassandra\Numeric negative value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-neg
         */
        public function neg() {}

        /**
         * @return \Cassandra\Numeric square root
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-sqrt
         */
        public function sqrt() {}

        /**
         * @return int this number as int
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-toInt
         */
        public function toInt() {}

        /**
         * @return float this number as float
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-toDouble
         */
        public function toDouble() {}
    }

    /**
     * A future that resolves with Session.
     *
     * @see \Cassandra\Cluster::connectAsync()
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.FutureSession/
     */
    final class FutureSession implements Future
    {
        /**
         * Waits for a given future resource to resolve and throws errors if any.
         *
         * @param int|float|null $timeout A timeout in seconds
         *
         * @return \Cassandra\Session A connected session
         * @throws \Cassandra\Exception\TimeoutException
         *
         * @throws \Cassandra\Exception\InvalidArgumentException
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.FutureSession/#method-get
         */
        public function get($timeout) {}
    }

    /**
     * A PHP representation of the CQL `set` datatype
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Set/
     */
    final class Set implements Value, \Countable, \Iterator
    {
        /**
         * Creates a new collection of a given type.
         *
         * @param \Cassandra\Type $type
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Set/#method-__construct
         */
        public function __construct($type) {}

        /**
         * The type of this set.
         *
         * @return \Cassandra\Type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Set/#method-type
         */
        public function type() {}

        /**
         * Array of values in this set.
         *
         * @return array values
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Set/#method-values
         */
        public function values() {}

        /**
         * Adds a value to this set.
         *
         * @param mixed $value Value
         *
         * @return bool whether the value has been added
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Set/#method-add
         */
        public function add($value) {}

        /**
         * Returns whether a value is in this set.
         *
         * @param mixed $value Value
         *
         * @return bool whether the value is in the set
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Set/#method-has
         */
        public function has($value) {}

        /**
         * Removes a value to this set.
         *
         * @param mixed $value Value
         *
         * @return bool whether the value has been removed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Set/#method-remove
         */
        public function remove($value) {}

        /**
         * Total number of elements in this set
         *
         * @return int count
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Set/#method-count
         */
        public function count() {}

        /**
         * Current element for iteration
         *
         * @return mixed current element
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Set/#method-current
         */
        public function current() {}

        /**
         * Current key for iteration
         *
         * @return int current key
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Set/#method-key
         */
        public function key() {}

        /**
         * Move internal iterator forward
         *
         * @return void
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Set/#method-next
         */
        public function next() {}

        /**
         * Check whether a current value exists
         *
         * @return bool
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Set/#method-valid
         */
        public function valid() {}

        /**
         * Rewind internal iterator
         *
         * @return void
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Set/#method-rewind
         */
        public function rewind() {}
    }

    /**
     * A PHP representation of an index
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultIndex/
     */
    final class DefaultIndex implements Index
    {
        /**
         * Returns the name of the index
         *
         * @return string Name of the index
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultIndex/#method-name
         */
        public function name() {}

        /**
         * Returns the kind of index
         *
         * @return string Kind of the index
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultIndex/#method-kind
         */
        public function kind() {}

        /**
         * Returns the target column of the index
         *
         * @return string Target column name of the index
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultIndex/#method-target
         */
        public function target() {}

        /**
         * Return a column's option by name
         *
         * @param string $name The name of the option
         *
         * @return \Cassandra\Value Value of an option by name
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultIndex/#method-option
         */
        public function option($name) {}

        /**
         * Returns all the index's options
         *
         * @return array A dictionary of `string` and `Value` pairs of the index's options.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultIndex/#method-options
         */
        public function options() {}

        /**
         * Returns the class name of the index
         *
         * @return string Class name of a custom index
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultIndex/#method-className
         */
        public function className() {}

        /**
         * Determines if the index is a custom index.
         *
         * @return bool true if a custom index
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultIndex/#method-isCustom
         */
        public function isCustom() {}
    }

    /**
     * A PHP representation of an aggregate
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultAggregate/
     */
    final class DefaultAggregate implements Aggregate
    {
        /**
         * Returns the full name of the aggregate
         *
         * @return string Full name of the aggregate including name and types
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultAggregate/#method-name
         */
        public function name() {}

        /**
         * Returns the simple name of the aggregate
         *
         * @return string Simple name of the aggregate
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultAggregate/#method-simpleName
         */
        public function simpleName() {}

        /**
         * Returns the argument types of the aggregate
         *
         * @return array Argument types of the aggregate
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultAggregate/#method-argumentTypes
         */
        public function argumentTypes() {}

        /**
         * Returns the state function of the aggregate
         *
         * @return \Cassandra\Function_ State public function of the aggregate
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultAggregate/#method-stateFunction
         */
        public function stateFunction() {}

        /**
         * Returns the final function of the aggregate
         *
         * @return \Cassandra\Function_ Final public function of the aggregate
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultAggregate/#method-finalFunction
         */
        public function finalFunction() {}

        /**
         * Returns the initial condition of the aggregate
         *
         * @return \Cassandra\Value Initial condition of the aggregate
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultAggregate/#method-initialCondition
         */
        public function initialCondition() {}

        /**
         * Returns the state type of the aggregate
         *
         * @return \Cassandra\Type State type of the aggregate
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultAggregate/#method-stateType
         */
        public function stateType() {}

        /**
         * Returns the return type of the aggregate
         *
         * @return \Cassandra\Type Return type of the aggregate
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultAggregate/#method-returnType
         */
        public function returnType() {}

        /**
         * Returns the signature of the aggregate
         *
         * @return string Signature of the aggregate (same as name())
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultAggregate/#method-signature
         */
        public function signature() {}
    }

    /**
     * A PHP representation of the CQL `timestamp` datatype
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timestamp/
     */
    final class Timestamp implements Value
    {
        /**
         * Creates a new timestamp from either unix timestamp and microseconds or
         * from the current time by default.
         *
         * @param int $seconds The number of seconds
         * @param int $microseconds The number of microseconds
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timestamp/#method-__construct
         */
        public function __construct($seconds, $microseconds) {}

        /**
         * The type of this timestamp.
         *
         * @return \Cassandra\Type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timestamp/#method-type
         */
        public function type() {}

        /**
         * Unix timestamp.
         *
         * @return int seconds
         *
         * @see time
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timestamp/#method-time
         */
        public function time() {}

        /**
         * Microtime from this timestamp
         *
         * @param bool $get_as_float Whether to get this value as float
         *
         * @return float|string Float or string representation
         *
         * @see microtime
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timestamp/#method-microtime
         */
        public function microtime($get_as_float) {}

        /**
         * Converts current timestamp to PHP DateTime.
         *
         * @return \DateTime PHP representation
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timestamp/#method-toDateTime
         */
        public function toDateTime() {}

        /**
         * Returns a string representation of this timestamp.
         *
         * @return string timestamp
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timestamp/#method-__toString
         */
        public function __toString() {}
    }

    /**
     * A PHP representation of the CQL `tinyint` datatype.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/
     */
    final class Tinyint implements Value, Numeric
    {
        /**
         * Creates a new 8-bit signed integer.
         *
         * @param int|float|string $value The value as an integer, float or string
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-__construct
         */
        public function __construct($value) {}

        /**
         * Minimum possible Tinyint value
         *
         * @return \Cassandra\Tinyint minimum value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-min
         */
        public static function min() {}

        /**
         * Maximum possible Tinyint value
         *
         * @return \Cassandra\Tinyint maximum value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-max
         */
        public static function max() {}

        /**
         * @return string
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-__toString
         */
        public function __toString() {}

        /**
         * The type of this value (tinyint).
         *
         * @return \Cassandra\Type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-type
         */
        public function type() {}

        /**
         * Returns the integer value.
         *
         * @return int integer value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-value
         */
        public function value() {}

        /**
         * @param \Cassandra\Numeric $num a number to add to this one
         *
         * @return \Cassandra\Numeric sum
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-add
         */
        public function add($num) {}

        /**
         * @param \Cassandra\Numeric $num a number to subtract from this one
         *
         * @return \Cassandra\Numeric difference
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-sub
         */
        public function sub($num) {}

        /**
         * @param \Cassandra\Numeric $num a number to multiply this one by
         *
         * @return \Cassandra\Numeric product
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-mul
         */
        public function mul($num) {}

        /**
         * @param \Cassandra\Numeric $num a number to divide this one by
         *
         * @return \Cassandra\Numeric quotient
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-div
         */
        public function div($num) {}

        /**
         * @param \Cassandra\Numeric $num a number to divide this one by
         *
         * @return \Cassandra\Numeric remainder
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-mod
         */
        public function mod($num) {}

        /**
         * @return \Cassandra\Numeric absolute value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-abs
         */
        public function abs() {}

        /**
         * @return \Cassandra\Numeric negative value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-neg
         */
        public function neg() {}

        /**
         * @return \Cassandra\Numeric square root
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-sqrt
         */
        public function sqrt() {}

        /**
         * @return int this number as int
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-toInt
         */
        public function toInt() {}

        /**
         * @return float this number as float
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-toDouble
         */
        public function toDouble() {}
    }

    /**
     * A PHP representation of the CQL `timeuuid` datatype
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timeuuid/
     */
    final class Timeuuid implements Value, UuidInterface
    {
        /**
         * Creates a timeuuid from a given timestamp or current time.
         *
         * @param int $timestamp Unix timestamp
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timeuuid/#method-__construct
         */
        public function __construct($timestamp) {}

        /**
         * Returns this timeuuid as string.
         *
         * @return string timeuuid
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timeuuid/#method-__toString
         */
        public function __toString() {}

        /**
         * The type of this timeuuid.
         *
         * @return \Cassandra\Type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timeuuid/#method-type
         */
        public function type() {}

        /**
         * Returns this timeuuid as string.
         *
         * @return string timeuuid
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timeuuid/#method-uuid
         */
        public function uuid() {}

        /**
         * Returns the version of this timeuuid.
         *
         * @return int version of this timeuuid
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timeuuid/#method-version
         */
        public function version() {}

        /**
         * Unix timestamp.
         *
         * @return int seconds
         *
         * @see time
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timeuuid/#method-time
         */
        public function time() {}

        /**
         * Converts current timeuuid to PHP DateTime.
         *
         * @return \DateTime PHP representation
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timeuuid/#method-toDateTime
         */
        public function toDateTime() {}
    }

    /**
     * A session is used to prepare and execute statements.
     *
     * @see \Cassandra\Cluster::connect()
     * @see \Cassandra\Cluster::connectAsync()
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultSession/
     */
    final class DefaultSession implements Session
    {
        /**
         * Execute a query.
         *
         * Available execution options:
         * | Option Name        | Option **Type** | Option Details                                                                                           |
         * |--------------------|-----------------|----------------------------------------------------------------------------------------------------------|
         * | arguments          | array           | An array or positional or named arguments                                                                |
         * | consistency        | int             | A consistency constant e.g Dse::CONSISTENCY_ONE, Dse::CONSISTENCY_QUORUM, etc.                           |
         * | timeout            | int             | A number of rows to include in result for paging                                                         |
         * | paging_state_token | string          | A string token use to resume from the state of a previous result set                                     |
         * | retry_policy       | RetryPolicy     | A retry policy that is used to handle server-side failures for this request                              |
         * | serial_consistency | int             | Either Dse::CONSISTENCY_SERIAL or Dse::CONSISTENCY_LOCAL_SERIAL                                          |
         * | timestamp          | int\|string     | Either an integer or integer string timestamp that represents the number of microseconds since the epoch |
         * | execute_as         | string          | User to execute statement as                                                                             |
         *
         * @param string|\Cassandra\Statement $statement string or statement to be executed.
         * @param array|\Cassandra\ExecutionOptions|null $options Options to control execution of the query.
         *
         * @return \Cassandra\Rows A collection of rows.
         * @throws \Cassandra\Exception
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultSession/#method-execute
         */
        public function execute($statement, $options) {}

        /**
         * Execute a query asynchronously. This method returns immediately, but
         * the query continues execution in the background.
         *
         * @param string|\Cassandra\Statement $statement string or statement to be executed.
         * @param array|\Cassandra\ExecutionOptions|null $options Options to control execution of the query.
         *
         * @return \Cassandra\FutureRows A future that can be used to retrieve the result.
         *
         * @see \Cassandra\Session::execute() for valid execution options
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultSession/#method-executeAsync
         */
        public function executeAsync($statement, $options) {}

        /**
         * Prepare a query for execution.
         *
         * @param string $cql The query to be prepared.
         * @param array|\Cassandra\ExecutionOptions|null $options Options to control preparing the query.
         *
         * @return \Cassandra\PreparedStatement A prepared statement that can be bound with parameters and executed.
         *
         * @throws \Cassandra\Exception
         *
         * @see \Cassandra\Session::execute() for valid execution options
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultSession/#method-prepare
         */
        public function prepare($cql, $options) {}

        /**
         * Asynchronously prepare a query for execution.
         *
         * @param string $cql The query to be prepared.
         * @param array|\Cassandra\ExecutionOptions|null $options Options to control preparing the query.
         *
         * @return \Cassandra\FuturePreparedStatement A future that can be used to retrieve the prepared statement.
         *
         * @see \Cassandra\Session::execute() for valid execution options
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultSession/#method-prepareAsync
         */
        public function prepareAsync($cql, $options) {}

        /**
         * Close the session and all its connections.
         *
         * @param float $timeout The amount of time in seconds to wait for the session to close.
         *
         * @return null Nothing.
         * @throws \Cassandra\Exception
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultSession/#method-close
         */
        public function close($timeout) {}

        /**
         * Asynchronously close the session and all its connections.
         *
         * @return \Cassandra\FutureClose A future that can be waited on.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultSession/#method-closeAsync
         */
        public function closeAsync() {}

        /**
         * Get performance and diagnostic metrics.
         *
         * @return array Performance/Diagnostic metrics.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultSession/#method-metrics
         */
        public function metrics() {}

        /**
         * Get a snapshot of the cluster's current schema.
         *
         * @return \Cassandra\Schema A snapshot of the cluster's schema.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultSession/#method-schema
         */
        public function schema() {}
    }

    /**
     * A class for representing custom values.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Custom/
     */
    abstract class Custom implements Value
    {
        /**
         * The type of this value.
         *
         * @return \Cassandra\Type\Custom
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Custom/#method-type
         */
        abstract public function type();
    }

    /**
     * A PHP representation of a materialized view
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/
     */
    abstract class MaterializedView implements Table
    {
        /**
         * Returns the base table of the view
         *
         * @return \Cassandra\Table Base table of the view
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-baseTable
         */
        abstract public function baseTable();

        /**
         * Returns the name of this view
         *
         * @return string Name of the view
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-name
         */
        abstract public function name();

        /**
         * Return a view's option by name
         *
         * @param string $name The name of the option
         *
         * @return \Cassandra\Value Value of an option by name
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-option
         */
        abstract public function option($name);

        /**
         * Returns all the view's options
         *
         * @return array A dictionary of string and Value pairs of the
         *               view's options.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-options
         */
        abstract public function options();

        /**
         * Description of the view, if any
         *
         * @return string View description or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-comment
         */
        abstract public function comment();

        /**
         * Returns read repair chance
         *
         * @return float Read repair chance
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-readRepairChance
         */
        abstract public function readRepairChance();

        /**
         * Returns local read repair chance
         *
         * @return float Local read repair chance
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-localReadRepairChance
         */
        abstract public function localReadRepairChance();

        /**
         * Returns GC grace seconds
         *
         * @return int GC grace seconds
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-gcGraceSeconds
         */
        abstract public function gcGraceSeconds();

        /**
         * Returns caching options
         *
         * @return string Caching options
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-caching
         */
        abstract public function caching();

        /**
         * Returns bloom filter FP chance
         *
         * @return float Bloom filter FP chance
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-bloomFilterFPChance
         */
        abstract public function bloomFilterFPChance();

        /**
         * Returns memtable flush period in milliseconds
         *
         * @return int Memtable flush period in milliseconds
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-memtableFlushPeriodMs
         */
        abstract public function memtableFlushPeriodMs();

        /**
         * Returns default TTL.
         *
         * @return int Default TTL.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-defaultTTL
         */
        abstract public function defaultTTL();

        /**
         * Returns speculative retry.
         *
         * @return string Speculative retry.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-speculativeRetry
         */
        abstract public function speculativeRetry();

        /**
         * Returns index interval
         *
         * @return int Index interval
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-indexInterval
         */
        abstract public function indexInterval();

        /**
         * Returns compaction strategy class name
         *
         * @return string Compaction strategy class name
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-compactionStrategyClassName
         */
        abstract public function compactionStrategyClassName();

        /**
         * Returns compaction strategy options
         *
         * @return \Cassandra\Map Compaction strategy options
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-compactionStrategyOptions
         */
        abstract public function compactionStrategyOptions();

        /**
         * Returns compression parameters
         *
         * @return \Cassandra\Map Compression parameters
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-compressionParameters
         */
        abstract public function compressionParameters();

        /**
         * Returns whether or not the `populate_io_cache_on_flush` is true
         *
         * @return bool Value of `populate_io_cache_on_flush` or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-populateIOCacheOnFlush
         */
        abstract public function populateIOCacheOnFlush();

        /**
         * Returns whether or not the `replicate_on_write` is true
         *
         * @return bool Value of `replicate_on_write` or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-replicateOnWrite
         */
        abstract public function replicateOnWrite();

        /**
         * Returns the value of `max_index_interval`
         *
         * @return int Value of `max_index_interval` or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-maxIndexInterval
         */
        abstract public function maxIndexInterval();

        /**
         * Returns the value of `min_index_interval`
         *
         * @return int Value of `min_index_interval` or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-minIndexInterval
         */
        abstract public function minIndexInterval();

        /**
         * Returns column by name
         *
         * @param string $name Name of the column
         *
         * @return \Cassandra\Column Column instance
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-column
         */
        abstract public function column($name);

        /**
         * Returns all columns in this view
         *
         * @return array A list of `Column` instances
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-columns
         */
        abstract public function columns();

        /**
         * Returns the partition key columns of the view
         *
         * @return array A list of `Column` instances
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-partitionKey
         */
        abstract public function partitionKey();

        /**
         * Returns both the partition and clustering key columns of the view
         *
         * @return array A list of `Column` instances
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-primaryKey
         */
        abstract public function primaryKey();

        /**
         * Returns the clustering key columns of the view
         *
         * @return array A list of `Column` instances
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-clusteringKey
         */
        abstract public function clusteringKey();

        /**
         * @return array A list of cluster column orders ('asc' and 'desc')
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-clusteringOrder
         */
        abstract public function clusteringOrder();
    }

    /**
     * A PHP representation of the CQL `time` type.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Time/
     */
    final class Time implements Value
    {
        /**
         * Creates a new Time object
         *
         * @param int|string $nanoseconds Number of nanoseconds since last microsecond
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Time/#method-__construct
         */
        public function __construct($nanoseconds) {}

        /**
         * @param \DateTime $datetime
         *
         * @return \Cassandra\Time
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Time/#method-fromDateTime
         */
        public static function fromDateTime($datetime) {}

        /**
         * The type of this date.
         *
         * @return \Cassandra\Type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Time/#method-type
         */
        public function type() {}

        /**
         * @return int
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Time/#method-seconds
         */
        public function seconds() {}

        /**
         * @return string this date in string format: Time(nanoseconds=$nanoseconds)
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Time/#method-__toString
         */
        public function __toString() {}
    }

    /**
     * Cluster object is used to create Sessions.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/
     */
    abstract class Type
    {
        /**
         * Get representation of ascii type
         *
         * @return \Cassandra\Type ascii type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-ascii
         */
        final public static function ascii() {}

        /**
         * Get representation of bigint type
         *
         * @return \Cassandra\Type bigint type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-bigint
         */
        final public static function bigint() {}

        /**
         * Get representation of smallint type
         *
         * @return \Cassandra\Type smallint type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-smallint
         */
        final public static function smallint() {}

        /**
         * Get representation of tinyint type
         *
         * @return \Cassandra\Type tinyint type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-tinyint
         */
        final public static function tinyint() {}

        /**
         * Get representation of blob type
         *
         * @return \Cassandra\Type blob type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-blob
         */
        final public static function blob() {}

        /**
         * Get representation of boolean type
         *
         * @return \Cassandra\Type boolean type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-boolean
         */
        final public static function boolean() {}

        /**
         * Get representation of counter type
         *
         * @return \Cassandra\Type counter type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-counter
         */
        final public static function counter() {}

        /**
         * Get representation of decimal type
         *
         * @return \Cassandra\Type decimal type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-decimal
         */
        final public static function decimal() {}

        /**
         * Get representation of double type
         *
         * @return \Cassandra\Type double type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-double
         */
        final public static function double() {}

        /**
         * Get representation of duration type
         *
         * @return \Cassandra\Type duration type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-duration
         */
        final public static function duration() {}

        /**
         * Get representation of float type
         *
         * @return \Cassandra\Type float type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-float
         */
        final public static function float() {}

        /**
         * Get representation of int type
         *
         * @return \Cassandra\Type int type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-int
         */
        final public static function int() {}

        /**
         * Get representation of text type
         *
         * @return \Cassandra\Type text type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-text
         */
        final public static function text() {}

        /**
         * Get representation of timestamp type
         *
         * @return \Cassandra\Type timestamp type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-timestamp
         */
        final public static function timestamp() {}

        /**
         * Get representation of date type
         *
         * @return \Cassandra\Type date type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-date
         */
        final public static function date() {}

        /**
         * Get representation of time type
         *
         * @return \Cassandra\Type time type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-time
         */
        final public static function time() {}

        /**
         * Get representation of uuid type
         *
         * @return \Cassandra\Type uuid type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-uuid
         */
        final public static function uuid() {}

        /**
         * Get representation of varchar type
         *
         * @return \Cassandra\Type varchar type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-varchar
         */
        final public static function varchar() {}

        /**
         * Get representation of varint type
         *
         * @return \Cassandra\Type varint type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-varint
         */
        final public static function varint() {}

        /**
         * Get representation of timeuuid type
         *
         * @return \Cassandra\Type timeuuid type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-timeuuid
         */
        final public static function timeuuid() {}

        /**
         * Get representation of inet type
         *
         * @return \Cassandra\Type inet type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-inet
         */
        final public static function inet() {}

        /**
         * Initialize a Collection type
         * ```php
         * <?php
         * use Type;
         *
         * $collection = Type::collection(Type::int())
         *                   ->create(1, 2, 3, 4, 5, 6, 7, 8, 9);
         *
         * var_dump($collection);
         * ```
         *
         * @param \Cassandra\Type $type The type of values
         *
         * @return \Cassandra\Type The collection type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-collection
         */
        final public static function collection($type) {}

        /**
         * Initialize a set type
         * ```
         * <?php
         * use Type;
         *
         * $set = Type::set(Type::varchar())
         *            ->create("a", "b", "c", "d", "e", "f", "g", "h", "i", "j");
         *
         * var_dump($set);
         * ```
         *
         * @param \Cassandra\Type $type The types of values
         *
         * @return \Cassandra\Type The set type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-set
         */
        final public static function set($type) {}

        /**
         * Initialize a map type
         * ```<?php
         * use Type;
         *
         * $map = Type::map(Type::int(), Type::varchar())
         *            ->create(1, "a", 2, "b", 3, "c", 4, "d", 5, "e", 6, "f")
         *
         * var_dump($map);```
         *
         * @param \Cassandra\Type $keyType The type of keys
         * @param \Cassandra\Type $valueType The type of values
         *
         * @return \Cassandra\Type The map type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-map
         */
        final public static function map($keyType, $valueType) {}

        /**
         * Initialize a tuple type
         * ```<?php
         * use Type;
         *
         * $tuple = Type::tuple(Type::varchar(), Type::int())
         *            ->create("a", 123);
         *
         * var_dump($tuple);```
         *
         * @param \Cassandra\Type $types A variadic list of types
         *
         * @return \Cassandra\Type The tuple type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-tuple
         */
        final public static function tuple($types) {}

        /**
         * Initialize a user type
         * ```<?php
         * use Type;
         *
         * $userType = Type::userType("a", Type::varchar(), "b", Type::int())
         *                 ->create("a", "abc", "b", 123);
         *
         * var_dump($userType);```
         *
         * @param \Cassandra\Type $types A variadic list of name/type pairs
         *
         * @return \Cassandra\Type The user type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-userType
         */
        final public static function userType($types) {}

        /**
         * Returns the name of this type as string.
         *
         * @return string Name of this type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-name
         */
        abstract public function name();

        /**
         * Returns string representation of this type.
         *
         * @return string String representation of this type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-__toString
         */
        abstract public function __toString();
    }

    /**
     * A PHP representation of the CQL `varint` datatype
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/
     */
    final class Varint implements Value, Numeric
    {
        /**
         * Creates a new variable length integer.
         *
         * @param string $value integer value as a string
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-__construct
         */
        public function __construct($value) {}

        /**
         * Returns the integer value.
         *
         * @return string integer value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-__toString
         */
        public function __toString() {}

        /**
         * The type of this varint.
         *
         * @return \Cassandra\Type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-type
         */
        public function type() {}

        /**
         * Returns the integer value.
         *
         * @return string integer value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-value
         */
        public function value() {}

        /**
         * @param \Cassandra\Numeric $num a number to add to this one
         *
         * @return \Cassandra\Numeric sum
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-add
         */
        public function add($num) {}

        /**
         * @param \Cassandra\Numeric $num a number to subtract from this one
         *
         * @return \Cassandra\Numeric difference
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-sub
         */
        public function sub($num) {}

        /**
         * @param \Cassandra\Numeric $num a number to multiply this one by
         *
         * @return \Cassandra\Numeric product
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-mul
         */
        public function mul($num) {}

        /**
         * @param \Cassandra\Numeric $num a number to divide this one by
         *
         * @return \Cassandra\Numeric quotient
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-div
         */
        public function div($num) {}

        /**
         * @param \Cassandra\Numeric $num a number to divide this one by
         *
         * @return \Cassandra\Numeric remainder
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-mod
         */
        public function mod($num) {}

        /**
         * @return \Cassandra\Numeric absolute value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-abs
         */
        public function abs() {}

        /**
         * @return \Cassandra\Numeric negative value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-neg
         */
        public function neg() {}

        /**
         * @return \Cassandra\Numeric square root
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-sqrt
         */
        public function sqrt() {}

        /**
         * @return int this number as int
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-toInt
         */
        public function toInt() {}

        /**
         * @return float this number as float
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-toDouble
         */
        public function toDouble() {}
    }

    /**
     * A PHP representation of the CQL `map` datatype
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/
     */
    final class Map implements Value, \Countable, \Iterator, \ArrayAccess
    {
        /**
         * Creates a new map of a given key and value type.
         *
         * @param \Cassandra\Type $keyType
         * @param \Cassandra\Type $valueType
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-__construct
         */
        public function __construct($keyType, $valueType) {}

        /**
         * The type of this map.
         *
         * @return \Cassandra\Type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-type
         */
        public function type() {}

        /**
         * Returns all keys in the map as an array.
         *
         * @return array keys
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-keys
         */
        public function keys() {}

        /**
         * Returns all values in the map as an array.
         *
         * @return array values
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-values
         */
        public function values() {}

        /**
         * Sets key/value in the map.
         *
         * @param mixed $key key
         * @param mixed $value value
         *
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-set
         */
        public function set($key, $value) {}

        /**
         * Gets the value of the key in the map.
         *
         * @param mixed $key Key
         *
         * @return mixed Value or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-get
         */
        public function get($key) {}

        /**
         * Removes the key from the map.
         *
         * @param mixed $key Key
         *
         * @return bool Whether the key was removed or not, e.g. didn't exist
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-remove
         */
        public function remove($key) {}

        /**
         * Returns whether the key is in the map.
         *
         * @param mixed $key Key
         *
         * @return bool Whether the key is in the map or not
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-has
         */
        public function has($key) {}

        /**
         * Total number of elements in this map
         *
         * @return int count
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-count
         */
        public function count() {}

        /**
         * Current value for iteration
         *
         * @return mixed current value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-current
         */
        public function current() {}

        /**
         * Current key for iteration
         *
         * @return int current key
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-key
         */
        public function key() {}

        /**
         * Move internal iterator forward
         *
         * @return void
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-next
         */
        public function next() {}

        /**
         * Check whether a current value exists
         *
         * @return bool
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-valid
         */
        public function valid() {}

        /**
         * Rewind internal iterator
         *
         * @return void
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-rewind
         */
        public function rewind() {}

        /**
         * Sets the value at a given key
         *
         * @param mixed $key Key to use.
         * @param mixed $value Value to set.
         *
         * @return void
         * @throws \Cassandra\Exception\InvalidArgumentException when the type of key or value is wrong
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-offsetSet
         */
        public function offsetSet($key, $value) {}

        /**
         * Retrieves the value at a given key
         *
         * @param mixed $key Key to use.
         *
         * @return mixed Value or `null`
         * @throws \Cassandra\Exception\InvalidArgumentException when the type of key is wrong
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-offsetGet
         */
        public function offsetGet($key) {}

        /**
         * Deletes the value at a given key
         *
         * @param mixed $key Key to use.
         *
         * @return void
         * @throws \Cassandra\Exception\InvalidArgumentException when the type of key is wrong
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-offsetUnset
         */
        public function offsetUnset($key) {}

        /**
         * Returns whether the value a given key is present
         *
         * @param mixed $key Key to use.
         *
         * @return bool Whether the value at a given key is present
         * @throws \Cassandra\Exception\InvalidArgumentException when the type of key is wrong
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-offsetExists
         */
        public function offsetExists($key) {}
    }

    /**
     * A PHP representation of the CQL `uuid` datatype
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Uuid/
     */
    final class Uuid implements Value, UuidInterface
    {
        /**
         * Creates a uuid from a given uuid string or a random one.
         *
         * @param string $uuid A uuid string
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Uuid/#method-__construct
         */
        public function __construct($uuid) {}

        /**
         * Returns this uuid as string.
         *
         * @return string uuid
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Uuid/#method-__toString
         */
        public function __toString() {}

        /**
         * The type of this uuid.
         *
         * @return \Cassandra\Type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Uuid/#method-type
         */
        public function type() {}

        /**
         * Returns this uuid as string.
         *
         * @return string uuid
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Uuid/#method-uuid
         */
        public function uuid() {}

        /**
         * Returns the version of this uuid.
         *
         * @return int version of this uuid
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Uuid/#method-version
         */
        public function version() {}
    }

    /**
     * A PHP representation of the CQL `float` datatype
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/
     */
    final class Float_ implements Value, Numeric
    {
        /**
         * Creates a new float.
         *
         * @param float|int|string|\Cassandra\Float_ $value A float value as a string, number or Float
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-__construct
         */
        public function __construct($value) {}

        /**
         * Minimum possible Float value
         *
         * @return \Cassandra\Float_ minimum value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-min
         */
        public static function min() {}

        /**
         * Maximum possible Float value
         *
         * @return \Cassandra\Float_ maximum value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-max
         */
        public static function max() {}

        /**
         * Returns string representation of the float value.
         *
         * @return string float value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-__toString
         */
        public function __toString() {}

        /**
         * The type of this float.
         *
         * @return \Cassandra\Type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-type
         */
        public function type() {}

        /**
         * Returns the float value.
         *
         * @return float float value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-value
         */
        public function value() {}

        /**
         * @return bool
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-isInfinite
         */
        public function isInfinite() {}

        /**
         * @return bool
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-isFinite
         */
        public function isFinite() {}

        /**
         * @return bool
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-isNaN
         */
        public function isNaN() {}

        /**
         * @param \Cassandra\Numeric $num a number to add to this one
         *
         * @return \Cassandra\Numeric sum
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-add
         */
        public function add($num) {}

        /**
         * @param \Cassandra\Numeric $num a number to subtract from this one
         *
         * @return \Cassandra\Numeric difference
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-sub
         */
        public function sub($num) {}

        /**
         * @param \Cassandra\Numeric $num a number to multiply this one by
         *
         * @return \Cassandra\Numeric product
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-mul
         */
        public function mul($num) {}

        /**
         * @param \Cassandra\Numeric $num a number to divide this one by
         *
         * @return \Cassandra\Numeric quotient
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-div
         */
        public function div($num) {}

        /**
         * @param \Cassandra\Numeric $num a number to divide this one by
         *
         * @return \Cassandra\Numeric remainder
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-mod
         */
        public function mod($num) {}

        /**
         * @return \Cassandra\Numeric absolute value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-abs
         */
        public function abs() {}

        /**
         * @return \Cassandra\Numeric negative value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-neg
         */
        public function neg() {}

        /**
         * @return \Cassandra\Numeric square root
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-sqrt
         */
        public function sqrt() {}

        /**
         * @return int this number as int
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-toInt
         */
        public function toInt() {}

        /**
         * @return float this number as float
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-toDouble
         */
        public function toDouble() {}
    }

    /**
     * A PHP representation of the CQL `duration` datatype
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Duration/
     */
    final class Duration implements Value
    {
        /**
         * @param int|float|string|\Cassandra\Bigint $months Months attribute of the duration.
         * @param int|float|string|\Cassandra\Bigint $days Days attribute of the duration.
         * @param int|float|string|\Cassandra\Bigint $nanos Nanos attribute of the duration.
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Duration/#method-__construct
         */
        public function __construct($months, $days, $nanos) {}

        /**
         * The type of represented by the value.
         *
         * @return \Cassandra\Type the Cassandra type for Duration
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Duration/#method-type
         */
        public function type() {}

        /**
         * @return string the months attribute of this Duration
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Duration/#method-months
         */
        public function months() {}

        /**
         * @return string the days attribute of this Duration
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Duration/#method-days
         */
        public function days() {}

        /**
         * @return string the nanoseconds attribute of this Duration
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Duration/#method-nanos
         */
        public function nanos() {}

        /**
         * @return string string representation of this Duration; may be used as a literal parameter in CQL queries.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Duration/#method-__toString
         */
        public function __toString() {}
    }

    /**
     * A PHP representation of a keyspace
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/
     */
    final class DefaultKeyspace implements Keyspace
    {
        /**
         * Returns keyspace name
         *
         * @return string Name
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-name
         */
        public function name() {}

        /**
         * Returns replication class name
         *
         * @return string Replication class
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-replicationClassName
         */
        public function replicationClassName() {}

        /**
         * Returns replication options
         *
         * @return \Cassandra\Map Replication options
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-replicationOptions
         */
        public function replicationOptions() {}

        /**
         * Returns whether the keyspace has durable writes enabled
         *
         * @return string Whether durable writes are enabled
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-hasDurableWrites
         */
        public function hasDurableWrites() {}

        /**
         * Returns a table by name
         *
         * @param string $name Table name
         *
         * @return \Cassandra\Table
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-table
         */
        public function table($name) {}

        /**
         * Returns all tables defined in this keyspace
         *
         * @return array An array of `Table` instances
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-tables
         */
        public function tables() {}

        /**
         * Get user type by name
         *
         * @param string $name User type name
         *
         * @return \Cassandra\Type\UserType|null A user type or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-userType
         */
        public function userType($name) {}

        /**
         * Get all user types
         *
         * @return array An array of user types
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-userTypes
         */
        public function userTypes() {}

        /**
         * Get materialized view by name
         *
         * @param string $name Materialized view name
         *
         * @return \Cassandra\MaterializedView|null A materialized view or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-materializedView
         */
        public function materializedView($name) {}

        /**
         * Gets all materialized views
         *
         * @return array An array of materialized views
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-materializedViews
         */
        public function materializedViews() {}

        /**
         * Get a function by name and signature
         *
         * @param string $name Function name
         * @param string|\Cassandra\Type $params Function arguments
         *
         * @return \Cassandra\Function_|null A function or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-function
         */
        public function function_($name, ...$params) {}

        /**
         * Get all functions
         *
         * @return array An array of functions
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-functions
         */
        public function functions() {}

        /**
         * Get an aggregate by name and signature
         *
         * @param string $name Aggregate name
         * @param string|\Cassandra\Type $params Aggregate arguments
         *
         * @return \Cassandra\Aggregate|null An aggregate or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-aggregate
         */
        public function aggregate($name, ...$params) {}

        /**
         * Get all aggregates
         *
         * @return array An array of aggregates
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-aggregates
         */
        public function aggregates() {}
    }

    /**
     * A PHP representation of the CQL `inet` datatype
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Inet/
     */
    final class Inet implements Value
    {
        /**
         * Creates a new IPv4 or IPv6 inet address.
         *
         * @param string $address any IPv4 or IPv6 address
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Inet/#method-__construct
         */
        public function __construct($address) {}

        /**
         * Returns the normalized string representation of the address.
         *
         * @return string address
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Inet/#method-__toString
         */
        public function __toString() {}

        /**
         * The type of this inet.
         *
         * @return \Cassandra\Type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Inet/#method-type
         */
        public function type() {}

        /**
         * Returns the normalized string representation of the address.
         *
         * @return string address
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Inet/#method-address
         */
        public function address() {}
    }

    /**
     * A PHP representation of the CQL `date` type.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Date/
     */
    final class Date implements Value
    {
        /**
         * Creates a new Date object
         *
         * @param int $seconds Absolute seconds from epoch (1970, 1, 1), can be negative, defaults to current time.
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Date/#method-__construct
         */
        public function __construct($seconds) {}

        /**
         * Creates a new Date object from a \DateTime object.
         *
         * @param \DateTime $datetime A \DateTime object to convert.
         *
         * @return \DateTime PHP representation
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Date/#method-fromDateTime
         */
        public static function fromDateTime($datetime) {}

        /**
         * The type of this date.
         *
         * @return \Cassandra\Type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Date/#method-type
         */
        public function type() {}

        /**
         * @return int Absolute seconds from epoch (1970, 1, 1), can be negative
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Date/#method-seconds
         */
        public function seconds() {}

        /**
         * Converts current date to PHP DateTime.
         *
         * @param \Cassandra\Time $time An optional Time object that is added to the DateTime object.
         *
         * @return \DateTime PHP representation
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Date/#method-toDateTime
         */
        public function toDateTime($time) {}

        /**
         * @return string this date in string format: Date(seconds=$seconds)
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Date/#method-__toString
         */
        public function __toString() {}
    }

    /**
     * A PHP representation of a column
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultColumn/
     */
    final class DefaultColumn implements Column
    {
        /**
         * Returns the name of the column.
         *
         * @return string Name of the column or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultColumn/#method-name
         */
        public function name() {}

        /**
         * Returns the type of the column.
         *
         * @return \Cassandra\Type Type of the column
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultColumn/#method-type
         */
        public function type() {}

        /**
         * Returns whether the column is in descending or ascending order.
         *
         * @return bool Whether the column is stored in descending order.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultColumn/#method-isReversed
         */
        public function isReversed() {}

        /**
         * Returns true for static columns.
         *
         * @return bool Whether the column is static
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultColumn/#method-isStatic
         */
        public function isStatic() {}

        /**
         * Returns true for frozen columns.
         *
         * @return bool Whether the column is frozen
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultColumn/#method-isFrozen
         */
        public function isFrozen() {}

        /**
         * Returns name of the index if defined.
         *
         * @return string Name of the index if defined or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultColumn/#method-indexName
         */
        public function indexName() {}

        /**
         * Returns index options if present.
         *
         * @return string Index options if present or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultColumn/#method-indexOptions
         */
        public function indexOptions() {}
    }

    /**
     * A PHP representation of the CQL `blob` datatype
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Blob/
     */
    final class Blob implements Value
    {
        /**
         * Creates a new bytes array.
         *
         * @param string $bytes any bytes
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Blob/#method-__construct
         */
        public function __construct($bytes) {}

        /**
         * Returns bytes as a hex string.
         *
         * @return string bytes as hexadecimal string
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Blob/#method-__toString
         */
        public function __toString() {}

        /**
         * The type of this blob.
         *
         * @return \Cassandra\Type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Blob/#method-type
         */
        public function type() {}

        /**
         * Returns bytes as a hex string.
         *
         * @return string bytes as hexadecimal string
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Blob/#method-bytes
         */
        public function bytes() {}

        /**
         * Returns bytes as a binary string.
         *
         * @return string bytes as binary string
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Blob/#method-toBinaryString
         */
        public function toBinaryString() {}
    }

    /**
     * A PHP representation of a table
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/
     */
    final class DefaultTable implements Table
    {
        /**
         * Returns the name of this table
         *
         * @return string Name of the table
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-name
         */
        public function name() {}

        /**
         * Return a table's option by name
         *
         * @param string $name The name of the option
         *
         * @return \Cassandra\Value Value of an option by name
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-option
         */
        public function option($name) {}

        /**
         * Returns all the table's options
         *
         * @return array A dictionary of `string` and `Value` pairs of the table's options.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-options
         */
        public function options() {}

        /**
         * Description of the table, if any
         *
         * @return string Table description or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-comment
         */
        public function comment() {}

        /**
         * Returns read repair chance
         *
         * @return float Read repair chance
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-readRepairChance
         */
        public function readRepairChance() {}

        /**
         * Returns local read repair chance
         *
         * @return float Local read repair chance
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-localReadRepairChance
         */
        public function localReadRepairChance() {}

        /**
         * Returns GC grace seconds
         *
         * @return int GC grace seconds
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-gcGraceSeconds
         */
        public function gcGraceSeconds() {}

        /**
         * Returns caching options
         *
         * @return string Caching options
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-caching
         */
        public function caching() {}

        /**
         * Returns bloom filter FP chance
         *
         * @return float Bloom filter FP chance
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-bloomFilterFPChance
         */
        public function bloomFilterFPChance() {}

        /**
         * Returns memtable flush period in milliseconds
         *
         * @return int Memtable flush period in milliseconds
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-memtableFlushPeriodMs
         */
        public function memtableFlushPeriodMs() {}

        /**
         * Returns default TTL.
         *
         * @return int Default TTL.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-defaultTTL
         */
        public function defaultTTL() {}

        /**
         * Returns speculative retry.
         *
         * @return string Speculative retry.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-speculativeRetry
         */
        public function speculativeRetry() {}

        /**
         * Returns index interval
         *
         * @return int Index interval
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-indexInterval
         */
        public function indexInterval() {}

        /**
         * Returns compaction strategy class name
         *
         * @return string Compaction strategy class name
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-compactionStrategyClassName
         */
        public function compactionStrategyClassName() {}

        /**
         * Returns compaction strategy options
         *
         * @return \Cassandra\Map Compaction strategy options
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-compactionStrategyOptions
         */
        public function compactionStrategyOptions() {}

        /**
         * Returns compression parameters
         *
         * @return \Cassandra\Map Compression parameters
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-compressionParameters
         */
        public function compressionParameters() {}

        /**
         * Returns whether or not the `populate_io_cache_on_flush` is true
         *
         * @return bool Value of `populate_io_cache_on_flush` or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-populateIOCacheOnFlush
         */
        public function populateIOCacheOnFlush() {}

        /**
         * Returns whether or not the `replicate_on_write` is true
         *
         * @return bool Value of `replicate_on_write` or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-replicateOnWrite
         */
        public function replicateOnWrite() {}

        /**
         * Returns the value of `max_index_interval`
         *
         * @return int Value of `max_index_interval` or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-maxIndexInterval
         */
        public function maxIndexInterval() {}

        /**
         * Returns the value of `min_index_interval`
         *
         * @return int Value of `min_index_interval` or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-minIndexInterval
         */
        public function minIndexInterval() {}

        /**
         * Returns column by name
         *
         * @param string $name Name of the column
         *
         * @return \Cassandra\Column Column instance
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-column
         */
        public function column($name) {}

        /**
         * Returns all columns in this table
         *
         * @return array A list of `Column` instances
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-columns
         */
        public function columns() {}

        /**
         * Returns the partition key columns of the table
         *
         * @return array A list of `Column` instance
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-partitionKey
         */
        public function partitionKey() {}

        /**
         * Returns both the partition and clustering key columns of the table
         *
         * @return array A list of `Column` instance
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-primaryKey
         */
        public function primaryKey() {}

        /**
         * Returns the clustering key columns of the table
         *
         * @return array A list of `Column` instances
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-clusteringKey
         */
        public function clusteringKey() {}

        /**
         * @return array A list of cluster column orders ('asc' and 'desc')
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-clusteringOrder
         */
        public function clusteringOrder() {}

        /**
         * Get an index by name
         *
         * @param string $name Index name
         *
         * @return \Cassandra\Index|null An index or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-index
         */
        public function index($name) {}

        /**
         * Gets all indexes
         *
         * @return array An array of indexes
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-indexes
         */
        public function indexes() {}

        /**
         * Get materialized view by name
         *
         * @param string $name Materialized view name
         *
         * @return \Cassandra\MaterializedView|null A materialized view or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-materializedView
         */
        public function materializedView($name) {}

        /**
         * Gets all materialized views
         *
         * @return array An array of materialized views
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-materializedViews
         */
        public function materializedViews() {}
    }

    /**
     * A future that always resolves in a value.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.FutureValue/
     */
    final class FutureValue implements Future
    {
        /**
         * Waits for a given future resource to resolve and throws errors if any.
         *
         * @param int|float|null $timeout A timeout in seconds
         *
         * @return mixed A value
         * @throws \Cassandra\Exception\TimeoutException
         *
         * @throws \Cassandra\Exception\InvalidArgumentException
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.FutureValue/#method-get
         */
        public function get($timeout) {}
    }

    /**
     * A PHP representation of the CQL `decimal` datatype
     *
     * The actual value of a decimal is `$value * pow(10, $scale * -1)`
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/
     */
    final class Decimal implements Value, Numeric
    {
        /**
         * Creates a decimal from a given decimal string:
         *
         * ~~~{.php}
         * <?php
         * $decimal = new Cassandra::Decimal("1313123123.234234234234234234123");
         * ~~~
         *
         * @param string $value Any decimal string
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-__construct
         */
        public function __construct($value) {}

        /**
         * String representation of this decimal.
         *
         * @return string Decimal value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-__toString
         */
        public function __toString() {}

        /**
         * The type of this decimal.
         *
         * @return \Cassandra\Type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-type
         */
        public function type() {}

        /**
         * Numeric value of this decimal as string.
         *
         * @return string Numeric value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-value
         */
        public function value() {}

        /**
         * Scale of this decimal as int.
         *
         * @return int Scale
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-scale
         */
        public function scale() {}

        /**
         * @param \Cassandra\Numeric $num a number to add to this one
         *
         * @return \Cassandra\Numeric sum
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-add
         */
        public function add($num) {}

        /**
         * @param \Cassandra\Numeric $num a number to subtract from this one
         *
         * @return \Cassandra\Numeric difference
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-sub
         */
        public function sub($num) {}

        /**
         * @param \Cassandra\Numeric $num a number to multiply this one by
         *
         * @return \Cassandra\Numeric product
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-mul
         */
        public function mul($num) {}

        /**
         * @param \Cassandra\Numeric $num a number to divide this one by
         *
         * @return \Cassandra\Numeric quotient
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-div
         */
        public function div($num) {}

        /**
         * @param \Cassandra\Numeric $num a number to divide this one by
         *
         * @return \Cassandra\Numeric remainder
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-mod
         */
        public function mod($num) {}

        /**
         * @return \Cassandra\Numeric absolute value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-abs
         */
        public function abs() {}

        /**
         * @return \Cassandra\Numeric negative value
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-neg
         */
        public function neg() {}

        /**
         * @return \Cassandra\Numeric square root
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-sqrt
         */
        public function sqrt() {}

        /**
         * @return int this number as int
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-toInt
         */
        public function toInt() {}

        /**
         * @return float this number as float
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-toDouble
         */
        public function toDouble() {}
    }

    /**
     * A future returned from Session::closeAsync().
     *
     * @see \Cassandra\Session::closeAsync()
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.FutureClose/
     */
    final class FutureClose implements Future
    {
        /**
         * Waits for a given future resource to resolve and throws errors if any.
         *
         * @param int|float|null $timeout A timeout in seconds
         *
         * @return null Nothing
         * @throws \Cassandra\Exception\TimeoutException
         *
         * @throws \Cassandra\Exception\InvalidArgumentException
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.FutureClose/#method-get
         */
        public function get($timeout) {}
    }

    /**
     * Prepared statements are faster to execute because the server doesn't need
     * to process a statement's CQL during the execution.
     *
     * With token-awareness enabled in the driver, prepared statements are even
     * faster, because they are sent directly to replica nodes and avoid the extra
     * network hop.
     *
     * @see \Cassandra\Session::prepare()
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.PreparedStatement/
     */
    final class PreparedStatement implements Statement
    {
        private function __construct() {}
    }

    /**
     * Request execution options.
     *
     * @see \Cassandra\Session::execute()
     * @see \Cassandra\Session::executeAsync()
     * @see \Cassandra\Session::prepare()
     * @see \Cassandra\Session::prepareAsync()
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.ExecutionOptions/
     */
    #[Deprecated('Use an array of options instead of creating an instance of this class.')]
    final class ExecutionOptions
    {
        /**
         * Creates a new options object for execution.
         *
         * @param array $options various execution options
         *
         * @throws \Cassandra\Exception\InvalidArgumentException
         *
         * @see \Cassandra\Session::execute() for valid execution options
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.ExecutionOptions/#method-__construct
         */
        public function __construct($options) {}

        /**
         * @param mixed $name
         *
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.ExecutionOptions/#method-__get
         */
        public function __get($name) {}
    }

    /**
     * A PHP representation of the CQL UDT datatype
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.UserTypeValue/
     */
    final class UserTypeValue implements Value, \Countable, \Iterator
    {
        /**
         * Creates a new user type value with the given name/type pairs.
         *
         * @param array $types Array of types
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.UserTypeValue/#method-__construct
         */
        public function __construct($types) {}

        /**
         * The type of this user type value.
         *
         * @return \Cassandra\Type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.UserTypeValue/#method-type
         */
        public function type() {}

        /**
         * Array of values in this user type value.
         *
         * @return array values
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.UserTypeValue/#method-values
         */
        public function values() {}

        /**
         * Sets the value at name in this user type value.
         *
         * @param mixed $value A value or null
         *
         * @return void
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.UserTypeValue/#method-set
         */
        public function set($value) {}

        /**
         * Retrieves the value at a given name.
         *
         * @param string $name String of the field name
         *
         * @return mixed A value or null
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.UserTypeValue/#method-get
         */
        public function get($name) {}

        /**
         * Total number of elements in this user type value.
         *
         * @return int count
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.UserTypeValue/#method-count
         */
        public function count() {}

        /**
         * Current element for iteration
         *
         * @return mixed The current element
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.UserTypeValue/#method-current
         */
        public function current() {}

        /**
         * Current key for iteration
         *
         * @return int current key
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.UserTypeValue/#method-key
         */
        public function key() {}

        /**
         * Move internal iterator forward
         *
         * @return void
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.UserTypeValue/#method-next
         */
        public function next() {}

        /**
         * Check whether a current value exists
         *
         * @return bool
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.UserTypeValue/#method-valid
         */
        public function valid() {}

        /**
         * Rewind internal iterator
         *
         * @return void
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.UserTypeValue/#method-rewind
         */
        public function rewind() {}
    }
}

/**
 * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/
 */

namespace Cassandra\Cluster {
    /**
     * Cluster builder allows fluent configuration of the cluster instance.
     *
     * @see \Cassandra::cluster()
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/
     */
    final class Builder
    {
        /**
         * Returns a Cluster Instance.
         *
         * @return \Cassandra\Cluster Cluster instance
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-build
         */
        public function build() {}

        /**
         * Configures default consistency for all requests.
         *
         * @param int $consistency A consistency level, must be one of Cassandra::CONSISTENCY_* values
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withDefaultConsistency
         */
        public function withDefaultConsistency($consistency) {}

        /**
         * Configures default page size for all results.
         * Set to `null` to disable paging altogether.
         *
         * @param int|null $pageSize default page size
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withDefaultPageSize
         */
        public function withDefaultPageSize($pageSize) {}

        /**
         * Configures default timeout for future resolution in blocking operations
         * Set to null to disable (default).
         *
         * @param float|null $timeout Timeout value in seconds, can be fractional
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withDefaultTimeout
         */
        public function withDefaultTimeout($timeout) {}

        /**
         * Configures the initial endpoints. Note that the driver will
         * automatically discover and connect to the rest of the cluster.
         *
         * @param string ...$host one or more ip addresses or hostnames
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withContactPoints
         */
        public function withContactPoints(...$host) {}

        /**
         * Specify a different port to be used when connecting to the cluster.
         *
         * @param int $port a number between 1 and 65535
         *
         * @return \Cassandra\Cluster\Builder self
         * @throws \Cassandra\Exception\InvalidArgumentException
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withPort
         */
        public function withPort($port) {}

        /**
         * Configures this cluster to use a round robin load balancing policy.
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withRoundRobinLoadBalancingPolicy
         */
        public function withRoundRobinLoadBalancingPolicy() {}

        /**
         * Configures this cluster to use a datacenter aware round robin load balancing policy.
         *
         * @param string $localDatacenter Name of the local datacenter
         * @param int $hostPerRemoteDatacenter Maximum number of hosts to try in remote datacenters
         * @param bool $useRemoteDatacenterForLocalConsistencies Allow using hosts from remote datacenters to execute statements with local consistencies
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withDatacenterAwareRoundRobinLoadBalancingPolicy
         */
        public function withDatacenterAwareRoundRobinLoadBalancingPolicy($localDatacenter, $hostPerRemoteDatacenter, $useRemoteDatacenterForLocalConsistencies) {}

        /**
         * Sets the blacklist hosts. Any host in the blacklist will be ignored and
         * a connection will not be established. This is useful for ensuring that
         * the driver will not connection to a predefied set of hosts.
         *
         * @param string $hosts A comma delimited list of addresses.
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withBlackListHosts
         */
        public function withBlackListHosts($hosts) {}

        /**
         * Sets the whitelist hosts. Any host not in the whitelist will be ignored
         * and a connection will not be established. This policy is useful for
         * ensuring that the driver will only connect to a predefined set of hosts.
         *
         * @param string $hosts A comma delimited list of addresses.
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withWhiteListHosts
         */
        public function withWhiteListHosts($hosts) {}

        /**
         * Sets the blacklist datacenters. Any datacenter in the blacklist will be
         * ignored and a connection will not be established to any host in those
         * datacenters. This policy is useful for ensuring the driver will not
         * connect to any host in a specific datacenter.
         *
         * @param string $dcs A comma delimited list of datacenters.
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withBlackListDCs
         */
        public function withBlackListDCs($dcs) {}

        /**
         * Sets the whitelist datacenters. Any host not in a whitelisted datacenter
         * will be ignored. This policy is useful for ensuring the driver will only
         * connect to hosts in specific datacenters.
         *
         * @param string $dcs A comma delimited list of datacenters.
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withWhiteListDCs
         */
        public function withWhiteListDCs($dcs) {}

        /**
         * Enable token aware routing.
         *
         * @param bool $enabled Whether to enable token aware routing (optional)
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withTokenAwareRouting
         */
        public function withTokenAwareRouting($enabled) {}

        /**
         * Configures plain-text authentication.
         *
         * @param string $username Username
         * @param string $password Password
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withCredentials
         */
        public function withCredentials($username, $password) {}

        /**
         * Timeout used for establishing TCP connections.
         *
         * @param float $timeout Timeout value in seconds, can be fractional
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withConnectTimeout
         */
        public function withConnectTimeout($timeout) {}

        /**
         * Timeout used for waiting for a response from a node.
         *
         * @param float $timeout Timeout value in seconds, can be fractional
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withRequestTimeout
         */
        public function withRequestTimeout($timeout) {}

        /**
         * Set up ssl context.
         *
         * @param \Cassandra\SSLOptions $options a preconfigured ssl context
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withSSL
         */
        public function withSSL($options) {}

        /**
         * Enable persistent sessions and clusters.
         *
         * @param bool $enabled whether to enable persistent sessions and clusters
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withPersistentSessions
         */
        public function withPersistentSessions($enabled) {}

        /**
         * Force the driver to use a specific binary protocol version.
         *
         * Apache Cassandra 1.2+ supports protocol version 1
         * Apache Cassandra 2.0+ supports protocol version 2
         * Apache Cassandra 2.1+ supports protocol version 3
         * Apache Cassandra 2.2+ supports protocol version 4
         *
         * NOTE: Apache Cassandra 3.x supports protocol version 3 and 4 only
         *
         * @param int $version The protocol version
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withProtocolVersion
         */
        public function withProtocolVersion($version) {}

        /**
         * Total number of IO threads to use for handling the requests.
         *
         * Note: number of io threads * core connections per host <= total number
         *       of connections <= number of io threads * max connections per host
         *
         * @param int $count total number of threads.
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withIOThreads
         */
        public function withIOThreads($count) {}

        /**
         * Set the size of connection pools used by the driver. Pools are fixed
         * when only `$core` is given, when a `$max` is specified as well,
         * additional connections will be created automatically based on current
         * load until the maximum number of connection has been reached. When
         * request load goes down, extra connections are automatically cleaned up
         * until only the core number of connections is left.
         *
         * @param int $core minimum connections to keep open to any given host
         * @param int $max maximum connections to keep open to any given host
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withConnectionsPerHost
         */
        public function withConnectionsPerHost($core, $max) {}

        /**
         * Specify interval in seconds that the driver should wait before attempting
         * to re-establish a closed connection.
         *
         * @param float $interval interval in seconds
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withReconnectInterval
         */
        public function withReconnectInterval($interval) {}

        /**
         * Enables/disables latency-aware routing.
         *
         * @param bool $enabled whether to actually enable or disable the routing.
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withLatencyAwareRouting
         */
        public function withLatencyAwareRouting($enabled) {}

        /**
         * Disables nagle algorithm for lower latency.
         *
         * @param bool $enabled whether to actually enable or disable nodelay.
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withTCPNodelay
         */
        public function withTCPNodelay($enabled) {}

        /**
         * Enables/disables TCP keepalive.
         *
         * @param float|null $delay The period of inactivity in seconds, after
         *                          which the keepalive probe should be sent over
         *                          the connection. If set to `null`, disables
         *                          keepalive probing.
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withTCPKeepalive
         */
        public function withTCPKeepalive($delay) {}

        /**
         * Configures the retry policy.
         *
         * @param \Cassandra\RetryPolicy $policy the retry policy to use.
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withRetryPolicy
         */
        public function withRetryPolicy($policy) {}

        /**
         * Sets the timestamp generator.
         *
         * @param \Cassandra\TimestampGenerator $generator A timestamp generator that will be used
         *                                                 to generate timestamps for statements.
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withTimestampGenerator
         */
        public function withTimestampGenerator($generator) {}

        /**
         * Enables/disables Schema Metadata.
         *
         * If disabled this allows the driver to skip over retrieving and
         * updating schema metadata, but it also disables the usage of token-aware
         * routing and $session->schema() will always return an empty object. This
         * can be useful for reducing the startup overhead of short-lived sessions.
         *
         * @param bool $enabled whether the driver fetches and maintains schema metadata.
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withSchemaMetadata
         */
        public function withSchemaMetadata($enabled) {}

        /**
         * Enables/disables Hostname Resolution.
         *
         * If enabled the driver will resolve hostnames for IP addresses using
         * reverse IP lookup. This is useful for authentication (Kerberos) or
         * encryption SSL services that require a valid hostname for verification.
         *
         * Important: It's possible that the underlying C/C++ driver does not
         * support hostname resolution. A PHP warning will be emitted if the driver
         * does not support hostname resolution.
         *
         * @param bool $enabled whether the driver uses hostname resolution.
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withHostnameResolution
         */
        public function withHostnameResolution($enabled) {}

        /**
         * Enables/disables Randomized Contact Points.
         *
         * If enabled this allows the driver randomly use contact points in order
         * to evenly spread the load across the cluster and prevent
         * hotspots/load spikes during notifications (e.g. massive schema change).
         *
         * Note: This setting should only be disabled for debugging and testing.
         *
         * @param bool $enabled whether the driver uses randomized contact points.
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withRandomizedContactPoints
         */
        public function withRandomizedContactPoints($enabled) {}

        /**
         * Specify interval in seconds that the driver should wait before attempting
         * to send heartbeat messages and control the amount of time the connection
         * must be idle before sending heartbeat messages. This is useful for
         * preventing intermediate network devices from dropping connections.
         *
         * @param float $interval interval in seconds (0 to disable heartbeat).
         *
         * @return \Cassandra\Cluster\Builder self
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withConnectionHeartbeatInterval
         */
        public function withConnectionHeartbeatInterval($interval) {}
    }
}

/**
 * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/TimestampGenerator/
 */

namespace Cassandra\TimestampGenerator {
    /**
     * A timestamp generator that allows the server-side to assign timestamps.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/TimestampGenerator/class.ServerSide/
     */
    final class ServerSide implements \Cassandra\TimestampGenerator {}

    /**
     * A timestamp generator that generates monotonically increasing timestamps
     * client-side. The timestamps generated have a microsecond granularity with
     * the sub-millisecond part generated using a counter. The implementation
     * guarantees that no more than 1000 timestamps will be generated for a given
     * clock tick even if shared by multiple session objects. If that rate is
     * exceeded then a warning is logged and timestamps stop incrementing until
     * the next clock tick.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/TimestampGenerator/class.Monotonic/
     */
    final class Monotonic implements \Cassandra\TimestampGenerator {}
}

/**
 * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/RetryPolicy/
 */

namespace Cassandra\RetryPolicy {
    /**
     * The default retry policy. This policy retries a query, using the
     * request's original consistency level, in the following cases:
     *
     * * On a read timeout, if enough replicas replied but the data was not received.
     * * On a write timeout, if a timeout occurs while writing a distributed batch log.
     * * On unavailable, it will move to the next host.
     *
     * In all other cases the error will be returned.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/RetryPolicy/class.DefaultPolicy/
     */
    final class DefaultPolicy implements \Cassandra\RetryPolicy {}

    /**
     * A retry policy that will downgrade the consistency of a request in
     * an attempt to save a request in cases where there is any chance of success. A
     * write request will succeed if there is at least a single copy persisted and a
     * read request will succeed if there is some data available even if it increases
     * the risk of reading stale data. This policy will retry in the same scenarios as
     * the default policy, and it will also retry in the following case:
     *
     * * On a read timeout, if some replicas responded but is lower than
     *   required by the current consistency level then retry with a lower
     *   consistency level
     * * On a write timeout, Retry unlogged batches at a lower consistency level
     *   if at least one replica responded. For single queries and batch if any
     *   replicas responded then consider the request successful and swallow the
     *   error.
     * * On unavailable, retry at a lower consistency if at lease one replica
     *   responded.
     *
     * Important: This policy may attempt to retry requests with a lower
     * consistency level. Using this policy can break consistency guarantees.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/RetryPolicy/class.DowngradingConsistency/
     */
    final class DowngradingConsistency implements \Cassandra\RetryPolicy {}

    /**
     * A retry policy that never retries and allows all errors to fallthrough.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/RetryPolicy/class.Fallthrough/
     */
    final class Fallthrough implements \Cassandra\RetryPolicy {}

    /**
     * A retry policy that logs the decisions of its child policy.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/RetryPolicy/class.Logging/
     */
    final class Logging implements \Cassandra\RetryPolicy
    {
        /**
         * Creates a new Logging retry policy.
         *
         * @param \Cassandra\RetryPolicy $childPolicy Any retry policy other than Logging
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/RetryPolicy/class.Logging/#method-__construct
         */
        public function __construct($childPolicy) {}
    }
}

/**
 * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/
 */

namespace Cassandra\Type {
    /**
     * A class that represents the tuple type. The tuple type is able to represent
     * a composite type of one or more types accessed by index.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Tuple/
     */
    final class Tuple extends \Cassandra\Type
    {
        private function __construct() {}

        /**
         * Returns "tuple"
         *
         * @return string "tuple"
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Tuple/#method-name
         */
        public function name() {}

        /**
         * Returns type representation in CQL, e.g. `tuple<varchar, int>`
         *
         * @return string Type representation in CQL
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Tuple/#method-__toString
         */
        public function __toString() {}

        /**
         * Returns types of values
         *
         * @return array An array of types
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Tuple/#method-types
         */
        public function types() {}

        /**
         * Creates a new Tuple from the given values. When no values given,
         * creates a tuple with null for the values.
         *
         * @param mixed ...$values One or more values to be added to the tuple.
         *
         * @return \Cassandra\Tuple A tuple with given values.
         * @throws \Cassandra\Exception\InvalidArgumentException when values given are of a
         *                                            different type than what the
         *                                            tuple expects.
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Tuple/#method-create
         */
        public function create(...$values) {}
    }

    /**
     * A class that represents the list type. The list type contains the type of the
     * elements contain in the list.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Collection/
     */
    final class Collection extends \Cassandra\Type
    {
        private function __construct() {}

        /**
         * Returns "list"
         *
         * @return string "list"
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Collection/#method-name
         */
        public function name() {}

        /**
         * Returns type of values
         *
         * @return \Cassandra\Type Type of values
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Collection/#method-valueType
         */
        public function valueType() {}

        /**
         * Returns type representation in CQL, e.g. `list<varchar>`
         *
         * @return string Type representation in CQL
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Collection/#method-__toString
         */
        public function __toString() {}

        /**
         * Creates a new Collection from the given values.  When no values
         * given, creates an empty list.
         *
         * @param mixed ...$value One or more values to be added to the list.
         *
         * @return \Cassandra\Collection A list with given values.
         * @throws \Cassandra\Exception\InvalidArgumentException when values given are of a
         *                                            different type than what this
         *                                            list type expects.
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Collection/#method-create
         */
        public function create(...$value) {}
    }

    /**
     * A class that represents the set type. The set type contains the type of the
     * elements contain in the set.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Set/
     */
    final class Set extends \Cassandra\Type
    {
        private function __construct() {}

        /**
         * Returns "set"
         *
         * @return string "set"
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Set/#method-name
         */
        public function name() {}

        /**
         * Returns type of values
         *
         * @return \Cassandra\Type Type of values
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Set/#method-valueType
         */
        public function valueType() {}

        /**
         * Returns type representation in CQL, e.g. `set<varchar>`
         *
         * @return string Type representation in CQL
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Set/#method-__toString
         */
        public function __toString() {}

        /**
         * Creates a new Set from the given values.
         *
         * @param mixed ...$value One or more values to be added to the set. When no values are given, creates an empty set.
         *
         * @return \Cassandra\Set A set with given values.
         * @throws \Cassandra\Exception\InvalidArgumentException when values given are of a
         *                                            different type than what this
         *                                            set type expects.
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Set/#method-create
         */
        public function create(...$value) {}
    }

    /**
     * A class that represents a custom type.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Custom/
     */
    final class Custom extends \Cassandra\Type
    {
        private function __construct() {}

        /**
         * Returns the name of this type as string.
         *
         * @return string The name of this type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Custom/#method-name
         */
        public function name() {}

        /**
         * Returns string representation of this type.
         *
         * @return string String representation of this type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Custom/#method-__toString
         */
        public function __toString() {}

        /**
         * @param mixed $value
         *
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Custom/#method-create
         */
        public function create($value) {}
    }

    /**
     * A class that represents a user type. The user type is able to represent a
     * composite type of one or more types accessed by name.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.UserType/
     */
    final class UserType extends \Cassandra\Type
    {
        private function __construct() {}

        /**
         * Associate the user type with a name.
         *
         * @param string $name Name of the user type.
         *
         * @return null Nothing.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.UserType/#method-withName
         */
        public function withName($name) {}

        /**
         * Returns type name for the user type
         *
         * @return string Name of this type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.UserType/#method-name
         */
        public function name() {}

        /**
         * Associate the user type with a keyspace.
         *
         * @param string $keyspace Keyspace that contains the user type.
         *
         * @return null Nothing.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.UserType/#method-withKeyspace
         */
        public function withKeyspace($keyspace) {}

        /**
         * Returns keyspace for the user type
         *
         * @return string
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.UserType/#method-keyspace
         */
        public function keyspace() {}

        /**
         * Returns type representation in CQL, e.g. keyspace1.type_name1 or
         * `userType<name1:varchar, name2:int>`.
         *
         * @return string Type representation in CQL
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.UserType/#method-__toString
         */
        public function __toString() {}

        /**
         * Returns types of values
         *
         * @return array An array of types
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.UserType/#method-types
         */
        public function types() {}

        /**
         * Creates a new UserTypeValue from the given name/value pairs. When
         * no values given, creates an empty user type.
         *
         * @param mixed ...$value One or more name/value pairs to be added to the user type.
         *
         * @return \Cassandra\UserTypeValue A user type value with given name/value pairs.
         * @throws \Cassandra\Exception\InvalidArgumentException when values given are of a
         *                                            different types than what the
         *                                            user type expects.
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.UserType/#method-create
         */
        public function create(...$value) {}
    }

    /**
     * A class that represents the map type. The map type contains two types that
     * represents the types of the key and value contained in the map.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Map/
     */
    final class Map extends \Cassandra\Type
    {
        private function __construct() {}

        /**
         * Returns "map"
         *
         * @return string "map"
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Map/#method-name
         */
        public function name() {}

        /**
         * Returns type of keys
         *
         * @return \Cassandra\Type Type of keys
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Map/#method-keyType
         */
        public function keyType() {}

        /**
         * Returns type of values
         *
         * @return \Cassandra\Type Type of values
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Map/#method-valueType
         */
        public function valueType() {}

        /**
         * Returns type representation in CQL, e.g. `map<varchar, int>`
         *
         * @return string Type representation in CQL
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Map/#method-__toString
         */
        public function __toString() {}

        /**
         * Creates a new Map from the given values.
         *
         * ```<?php
         * use Type;
         * use Uuid;
         *
         * $type = Type::map(Type::uuid(), Type::varchar());
         * $map = $type->create(new Uuid(), 'first uuid',
         *                      new Uuid(), 'second uuid',
         *                      new Uuid(), 'third uuid');
         *
         * var_dump($map);```
         *
         *
         *                          is a key and each even value is a value for the
         *                          map, e.g. `create(key, value, key, value)`.
         *                          When no values given, creates an empty map.
         *
         * @param mixed ...$value An even number of values, where each odd value
         *
         * @return \Cassandra\Map A set with given values.
         * @throws \Cassandra\Exception\InvalidArgumentException when keys or values given are
         *                                            of a different type than what
         *                                            this map type expects.
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Map/#method-create
         */
        public function create(...$value) {}
    }

    /**
     * A class that represents a primitive type (e.g. `varchar` or `bigint`)
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Scalar/
     */
    final class Scalar extends \Cassandra\Type
    {
        private function __construct() {}

        /**
         * Returns the name of this type as string.
         *
         * @return string Name of this type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Scalar/#method-name
         */
        public function name() {}

        /**
         * Returns string representation of this type.
         *
         * @return string String representation of this type
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Scalar/#method-__toString
         */
        public function __toString() {}

        /**
         * @param mixed $value
         *
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Scalar/#method-create
         */
        public function create($value) {}
    }
}

/**
 * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/SSLOptions/
 */

namespace Cassandra\SSLOptions {
    /**
     * SSLOptions builder allows fluent configuration of ssl options.
     *
     * @see \Cassandra::ssl()
     * @see \Cassandra\Cluster\Builder::withSSL()
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/SSLOptions/class.Builder/
     */
    final class Builder
    {
        /**
         * Builds SSL options.
         *
         * @return \Cassandra\SSLOptions ssl options configured accordingly.
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/SSLOptions/class.Builder/#method-build
         */
        public function build() {}

        /**
         * Adds a trusted certificate. This is used to verify node's identity.
         *
         * @param string ...$path one or more paths to files containing a PEM formatted certificate.
         *
         * @return \Cassandra\Cluster\Builder self
         * @throws \Cassandra\Exception\InvalidArgumentException
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/SSLOptions/class.Builder/#method-withTrustedCerts
         */
        public function withTrustedCerts(...$path) {}

        /**
         * Disable certificate verification.
         *
         * @param int $flags
         *
         * @return \Cassandra\Cluster\Builder self
         * @throws \Cassandra\Exception\InvalidArgumentException
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/SSLOptions/class.Builder/#method-withVerifyFlags
         */
        public function withVerifyFlags($flags) {}

        /**
         * Set client-side certificate chain.
         *
         * This is used to authenticate the client on the server-side. This should contain the entire Certificate
         * chain starting with the certificate itself.
         *
         * @param string $path path to a file containing a PEM formatted certificate.
         *
         * @return \Cassandra\Cluster\Builder self
         * @throws \Cassandra\Exception\InvalidArgumentException
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/SSLOptions/class.Builder/#method-withClientCert
         */
        public function withClientCert($path) {}

        /**
         * Set client-side private key. This is used to authenticate the client on
         * the server-side.
         *
         * @param string $path Path to the private key file
         * @param string|null $passphrase Passphrase for the private key, if any
         *
         * @return \Cassandra\Cluster\Builder self
         * @throws \Cassandra\Exception\InvalidArgumentException
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/SSLOptions/class.Builder/#method-withPrivateKey
         */
        public function withPrivateKey($path, $passphrase) {}
    }
}

/**
 * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/
 */

namespace Cassandra\Exception {
    use JetBrains\PhpStorm\Pure;

    /**
     * ConfigurationException is raised when query is syntactically correct but
     * invalid because of some configuration issue.
     * For example when attempting to drop a non-existent keyspace.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.ConfigurationException/
     */
    class ConfigurationException extends ValidationException
    {
        /**
         * @param mixed $message
         * @param mixed $code
         * @param mixed $previous
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.ConfigurationException/#method-__construct
         */
        #[Pure]
        public function __construct($message, $code, $previous) {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.ConfigurationException/#method-__wakeup
         */
        public function __wakeup() {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.ConfigurationException/#method-__toString
         */
        public function __toString() {}
    }

    /**
     * Cassandra domain exception.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.DomainException/
     */
    class DomainException extends \DomainException implements \Cassandra\Exception
    {
        /**
         * @param mixed $message
         * @param mixed $code
         * @param mixed $previous
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.DomainException/#method-__construct
         */
        #[Pure]
        public function __construct($message, $code, $previous) {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.DomainException/#method-__wakeup
         */
        public function __wakeup() {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.DomainException/#method-__toString
         */
        public function __toString() {}
    }

    /**
     * InvalidQueryException is raised when query is syntactically correct but invalid.
     * For example when attempting to create a table without specifying a keyspace.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.InvalidQueryException/
     */
    class InvalidQueryException extends ValidationException
    {
        /**
         * @param mixed $message
         * @param mixed $code
         * @param mixed $previous
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.InvalidQueryException/#method-__construct
         */
        #[Pure]
        public function __construct($message, $code, $previous) {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.InvalidQueryException/#method-__wakeup
         */
        public function __wakeup() {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.InvalidQueryException/#method-__toString
         */
        public function __toString() {}
    }

    /**
     * UnpreparedException is raised when a given prepared statement id does not
     * exist on the server. The driver should be automatically re-preparing the
     * statement in this case. Seeing this error could be considered a bug.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.UnpreparedException/
     */
    class UnpreparedException extends ValidationException
    {
        /**
         * @param mixed $message
         * @param mixed $code
         * @param mixed $previous
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.UnpreparedException/#method-__construct
         */
        #[Pure]
        public function __construct($message, $code, $previous) {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.UnpreparedException/#method-__wakeup
         */
        public function __wakeup() {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.UnpreparedException/#method-__toString
         */
        public function __toString() {}
    }

    /**
     * Cassandra invalid argument exception.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.InvalidArgumentException/
     */
    class InvalidArgumentException extends \InvalidArgumentException implements \Cassandra\Exception
    {
        /**
         * @param mixed $message
         * @param mixed $code
         * @param mixed $previous
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.InvalidArgumentException/#method-__construct
         */
        #[Pure]
        public function __construct($message, $code, $previous) {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.InvalidArgumentException/#method-__wakeup
         */
        public function __wakeup() {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.InvalidArgumentException/#method-__toString
         */
        public function __toString() {}
    }

    /**
     * ServerException is raised when something unexpected happened on the server.
     * This exception is most likely due to a server-side bug.
     * **NOTE** This exception and all its children are generated on the server.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.ServerException/
     */
    class ServerException extends RuntimeException
    {
        /**
         * @param mixed $message
         * @param mixed $code
         * @param mixed $previous
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.ServerException/#method-__construct
         */
        #[Pure]
        public function __construct($message, $code, $previous) {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.ServerException/#method-__wakeup
         */
        public function __wakeup() {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.ServerException/#method-__toString
         */
        public function __toString() {}
    }

    /**
     * Cassandra domain exception.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.RangeException/
     */
    class RangeException extends \RangeException implements \Cassandra\Exception
    {
        /**
         * @param mixed $message
         * @param mixed $code
         * @param mixed $previous
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.RangeException/#method-__construct
         */
        #[Pure]
        public function __construct($message, $code, $previous) {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.RangeException/#method-__wakeup
         */
        public function __wakeup() {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.RangeException/#method-__toString
         */
        public function __toString() {}
    }

    /**
     * UnauthorizedException is raised when the current user doesn't have
     * sufficient permissions to access data.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.UnauthorizedException/
     */
    class UnauthorizedException extends ValidationException
    {
        /**
         * @param mixed $message
         * @param mixed $code
         * @param mixed $previous
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.UnauthorizedException/#method-__construct
         */
        #[Pure]
        public function __construct($message, $code, $previous) {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.UnauthorizedException/#method-__wakeup
         */
        public function __wakeup() {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.UnauthorizedException/#method-__toString
         */
        public function __toString() {}
    }

    /**
     * Cassandra logic exception.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.LogicException/
     */
    class LogicException extends \LogicException implements \Cassandra\Exception
    {
        /**
         * @param mixed $message
         * @param mixed $code
         * @param mixed $previous
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.LogicException/#method-__construct
         */
        #[Pure]
        public function __construct($message, $code, $previous) {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.LogicException/#method-__wakeup
         */
        public function __wakeup() {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.LogicException/#method-__toString
         */
        public function __toString() {}
    }

    /**
     * UnavailableException is raised when a coordinator detected that there aren't
     * enough replica nodes available to fulfill the request.
     *
     * NOTE: Request has not even been forwarded to the replica nodes in this case.
     * @see https://github.com/apache/cassandra/blob/cassandra-2.1/doc/native_protocol_v1.spec#L667-L677 Description of the Unavailable error in the native protocol v1 spec.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.UnavailableException/
     */
    class UnavailableException extends ExecutionException
    {
        /**
         * @param mixed $message
         * @param mixed $code
         * @param mixed $previous
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.UnavailableException/#method-__construct
         */
        #[Pure]
        public function __construct($message, $code, $previous) {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.UnavailableException/#method-__wakeup
         */
        public function __wakeup() {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.UnavailableException/#method-__toString
         */
        public function __toString() {}
    }

    /**
     * AuthenticationException is raised when client was not configured with valid
     * authentication credentials.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.AuthenticationException/
     */
    class AuthenticationException extends RuntimeException
    {
        /**
         * @param mixed $message
         * @param mixed $code
         * @param mixed $previous
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.AuthenticationException/#method-__construct
         */
        #[Pure]
        public function __construct($message, $code, $previous) {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.AuthenticationException/#method-__wakeup
         */
        public function __wakeup() {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.AuthenticationException/#method-__toString
         */
        public function __toString() {}
    }

    /**
     * OverloadedException is raised when a node is overloaded.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.OverloadedException/
     */
    class OverloadedException extends ServerException
    {
        /**
         * @param mixed $message
         * @param mixed $code
         * @param mixed $previous
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.OverloadedException/#method-__construct
         */
        #[Pure]
        public function __construct($message, $code, $previous) {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.OverloadedException/#method-__wakeup
         */
        public function __wakeup() {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.OverloadedException/#method-__toString
         */
        public function __toString() {}
    }

    /**
     * ReadTimeoutException is raised when a coordinator failed to receive acks
     * from the required number of replica nodes in time during a read.
     * @see https://github.com/apache/cassandra/blob/cassandra-2.1/doc/native_protocol_v1.spec#L709-L726 Description of ReadTimeout error in the native protocol spec
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.ReadTimeoutException/
     */
    class ReadTimeoutException extends ExecutionException
    {
        /**
         * @param mixed $message
         * @param mixed $code
         * @param mixed $previous
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.ReadTimeoutException/#method-__construct
         */
        #[Pure]
        public function __construct($message, $code, $previous) {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.ReadTimeoutException/#method-__wakeup
         */
        public function __wakeup() {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.ReadTimeoutException/#method-__toString
         */
        public function __toString() {}
    }

    /**
     * IsBootstrappingException is raised when a node is bootstrapping.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.IsBootstrappingException/
     */
    class IsBootstrappingException extends ServerException
    {
        /**
         * @param mixed $message
         * @param mixed $code
         * @param mixed $previous
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.IsBootstrappingException/#method-__construct
         */
        #[Pure]
        public function __construct($message, $code, $previous) {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.IsBootstrappingException/#method-__wakeup
         */
        public function __wakeup() {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.IsBootstrappingException/#method-__toString
         */
        public function __toString() {}
    }

    /**
     * ProtocolException is raised when a client did not follow server's protocol,
     * e.g. sending a QUERY message before STARTUP. Seeing this error can be
     * considered a bug.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.ProtocolException/
     */
    class ProtocolException extends RuntimeException
    {
        /**
         * @param mixed $message
         * @param mixed $code
         * @param mixed $previous
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.ProtocolException/#method-__construct
         */
        #[Pure]
        public function __construct($message, $code, $previous) {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.ProtocolException/#method-__wakeup
         */
        public function __wakeup() {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.ProtocolException/#method-__toString
         */
        public function __toString() {}
    }

    /**
     * ExecutionException is raised when something went wrong during request execution.
     * @see \Cassandra\Exception\TruncateException
     * @see \Cassandra\Exception\UnavailableException
     * @see \Cassandra\Exception\ReadTimeoutException
     * @see \Cassandra\Exception\WriteTimeoutException
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.ExecutionException/
     */
    class ExecutionException extends RuntimeException
    {
        /**
         * @param mixed $message
         * @param mixed $code
         * @param mixed $previous
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.ExecutionException/#method-__construct
         */
        #[Pure]
        public function __construct($message, $code, $previous) {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.ExecutionException/#method-__wakeup
         */
        public function __wakeup() {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.ExecutionException/#method-__toString
         */
        public function __toString() {}
    }

    /**
     * InvalidSyntaxException is raised when CQL in the request is syntactically incorrect.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.InvalidSyntaxException/
     */
    class InvalidSyntaxException extends ValidationException
    {
        /**
         * @param mixed $message
         * @param mixed $code
         * @param mixed $previous
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.InvalidSyntaxException/#method-__construct
         */
        #[Pure]
        public function __construct($message, $code, $previous) {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.InvalidSyntaxException/#method-__wakeup
         */
        public function __wakeup() {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.InvalidSyntaxException/#method-__toString
         */
        public function __toString() {}
    }

    /**
     * Cassandra runtime exception.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.RuntimeException/
     */
    class RuntimeException extends \RuntimeException implements \Cassandra\Exception
    {
        /**
         * @param mixed $message
         * @param mixed $code
         * @param mixed $previous
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.RuntimeException/#method-__construct
         */
        #[Pure]
        public function __construct($message, $code, $previous) {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.RuntimeException/#method-__wakeup
         */
        public function __wakeup() {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.RuntimeException/#method-__toString
         */
        public function __toString() {}
    }

    /**
     * TimeoutException is generally raised when a future did not resolve
     * within a given time interval.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.TimeoutException/
     */
    class TimeoutException extends RuntimeException
    {
        /**
         * @param mixed $message
         * @param mixed $code
         * @param mixed $previous
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.TimeoutException/#method-__construct
         */
        #[Pure]
        public function __construct($message, $code, $previous) {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.TimeoutException/#method-__wakeup
         */
        public function __wakeup() {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.TimeoutException/#method-__toString
         */
        public function __toString() {}
    }

    /**
     * ValidationException is raised on invalid request, before even attempting to
     * execute it.
     * @see \Cassandra\Exception\InvalidSyntaxException
     * @see \Cassandra\Exception\UnauthorizedException
     * @see \Cassandra\Exception\InvalidQueryException
     * @see \Cassandra\Exception\ConfigurationException
     * @see \Cassandra\Exception\AlreadyExistsException
     * @see \Cassandra\Exception\UnpreparedException
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.ValidationException/
     */
    class ValidationException extends RuntimeException
    {
        /**
         * @param mixed $message
         * @param mixed $code
         * @param mixed $previous
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.ValidationException/#method-__construct
         */
        #[Pure]
        public function __construct($message, $code, $previous) {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.ValidationException/#method-__wakeup
         */
        public function __wakeup() {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.ValidationException/#method-__toString
         */
        public function __toString() {}
    }

    /**
     * TruncateException is raised when something went wrong during table
     * truncation.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.TruncateException/
     */
    class TruncateException extends ExecutionException
    {
        /**
         * @param mixed $message
         * @param mixed $code
         * @param mixed $previous
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.TruncateException/#method-__construct
         */
        #[Pure]
        public function __construct($message, $code, $previous) {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.TruncateException/#method-__wakeup
         */
        public function __wakeup() {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.TruncateException/#method-__toString
         */
        public function __toString() {}
    }

    /**
     * AlreadyExistsException is raised when attempting to re-create existing keyspace.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.AlreadyExistsException/
     */
    class AlreadyExistsException extends ConfigurationException
    {
        /**
         * @param mixed $message
         * @param mixed $code
         * @param mixed $previous
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.AlreadyExistsException/#method-__construct
         */
        #[Pure]
        public function __construct($message, $code, $previous) {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.AlreadyExistsException/#method-__wakeup
         */
        public function __wakeup() {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.AlreadyExistsException/#method-__toString
         */
        public function __toString() {}
    }

    /**
     * Cassandra domain exception.
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.DivideByZeroException/
     */
    class DivideByZeroException extends RangeException
    {
        /**
         * @param mixed $message
         * @param mixed $code
         * @param mixed $previous
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.DivideByZeroException/#method-__construct
         */
        #[Pure]
        public function __construct($message, $code, $previous) {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.DivideByZeroException/#method-__wakeup
         */
        public function __wakeup() {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.DivideByZeroException/#method-__toString
         */
        public function __toString() {}
    }

    /**
     * WriteTimeoutException is raised when a coordinator failed to receive acks
     * from the required number of replica nodes in time during a write.
     * @see https://github.com/apache/cassandra/blob/cassandra-2.1/doc/native_protocol_v1.spec#L683-L708 Description of WriteTimeout error in the native protocol spec
     * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.WriteTimeoutException/
     */
    class WriteTimeoutException extends ExecutionException
    {
        /**
         * @param mixed $message
         * @param mixed $code
         * @param mixed $previous
         *
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.WriteTimeoutException/#method-__construct
         */
        #[Pure]
        public function __construct($message, $code, $previous) {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.WriteTimeoutException/#method-__wakeup
         */
        public function __wakeup() {}

        /**
         * @return mixed
         * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/class.WriteTimeoutException/#method-__toString
         */
        public function __toString() {}
    }
}
<?php

//20120405 AG synced to official docs
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Immutable;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Language;

/**
 * The DOMNode class
 * @link https://php.net/manual/en/class.domnode.php
 */
class DOMNode
{
    /**
     * @var string
     * Returns the most accurate name for the current node type
     * @link https://php.net/manual/en/class.domnode.php#domnode.props.nodename
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $nodeName;

    /**
     * @var string|null
     * The value of this node, depending on its type
     * @link https://php.net/manual/en/class.domnode.php#domnode.props.nodevalue
     */
    #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
    public $nodeValue;

    /**
     * @var int
     * Gets the type of the node. One of the predefined
     * <a href="https://secure.php.net/manual/en/dom.constants.php">XML_xxx_NODE</a> constants
     * @link https://php.net/manual/en/class.domnode.php#domnode.props.nodetype
     */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $nodeType;

    /**
     * @var DOMNode|null
     * The parent of this node. If there is no such node, this returns NULL.
     * @link https://php.net/manual/en/class.domnode.php#domnode.props.parentnode
     */
    #[LanguageLevelTypeAware(['8.1' => 'DOMNode|null'], default: '')]
    public $parentNode;

    /**
     * @var DOMNodeList
     * A <classname>DOMNodeList</classname> that contains all children of this node. If there are no children, this is an empty <classname>DOMNodeList</classname>.
     * @link https://php.net/manual/en/class.domnode.php#domnode.props.childnodes
     */
    #[LanguageLevelTypeAware(['8.1' => 'DOMNodeList'], default: '')]
    public $childNodes;

    /**
     * @var DOMNode|null
     * The first child of this node. If there is no such node, this returns NULL.
     * @link https://php.net/manual/en/class.domnode.php#domnode.props.firstchild
     */
    #[LanguageLevelTypeAware(['8.1' => 'DOMNode|null'], default: '')]
    public $firstChild;

    /**
     * @var DOMNode|null
     * The last child of this node. If there is no such node, this returns NULL.
     * @link https://php.net/manual/en/class.domnode.php#domnode.props.lastchild
     */
    #[LanguageLevelTypeAware(['8.1' => 'DOMNode|null'], default: '')]
    public $lastChild;

    /**
     * @var DOMNode|null
     * The node immediately preceding this node. If there is no such node, this returns NULL.
     * @link https://php.net/manual/en/class.domnode.php#domnode.props.previoussibling
     */
    #[LanguageLevelTypeAware(['8.1' => 'DOMNode|null'], default: '')]
    public $previousSibling;

    /**
     * @var DOMNode|null
     * The node immediately following this node. If there is no such node, this returns NULL.
     * @link https://php.net/manual/en/class.domnode.php#domnode.props.nextsibling
     */
    #[LanguageLevelTypeAware(['8.1' => 'DOMNode|null'], default: '')]
    public $nextSibling;

    /**
     * @var DOMNamedNodeMap|null
     * A <classname>DOMNamedNodeMap</classname> containing the attributes of this node (if it is a <classname>DOMElement</classname>) or NULL otherwise.
     * @link https://php.net/manual/en/class.domnode.php#domnode.props.attributes
     */
    #[LanguageLevelTypeAware(['8.1' => 'DOMNamedNodeMap|null'], default: '')]
    public $attributes;

    /**
     * @var DOMDocument|null
     * The <classname>DOMDocument</classname> object associated with this node, or NULL if this node is a <classname>DOMDocument</classname>.
     * @link https://php.net/manual/en/class.domnode.php#domnode.props.ownerdocument
     */
    #[LanguageLevelTypeAware(['8.1' => 'DOMDocument|null'], default: '')]
    public $ownerDocument;

    /**
     * @var string|null
     * The namespace URI of this node, or NULL if it is unspecified.
     * @link https://php.net/manual/en/class.domnode.php#domnode.props.namespaceuri
     */
    #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
    public $namespaceURI;

    /**
     * @var string|null
     * The namespace prefix of this node, or NULL if it is unspecified.
     * @link https://php.net/manual/en/class.domnode.php#domnode.props.prefix
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $prefix;

    /**
     * @var string|null
     * Returns the local part of the qualified name of this node.
     * @link https://php.net/manual/en/class.domnode.php#domnode.props.localname
     */
    #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
    public $localName;

    /**
     * @var string|null
     * The absolute base URI of this node or NULL if the implementation wasn't able to obtain an absolute URI.
     * @link https://php.net/manual/en/class.domnode.php#domnode.props.baseuri
     */
    #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
    public $baseURI;

    /**
     * @var string
     * This attribute returns the text content of this node and its descendants.
     * @link https://php.net/manual/en/class.domnode.php#domnode.props.textcontent
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $textContent;

    /**
     * Adds a new child before a reference node
     * @link https://php.net/manual/en/domnode.insertbefore.php
     * @param DOMNode $node <p>
     * The new node.
     * </p>
     * @param null|DOMNode $child [optional] <p>
     * The reference node. If not supplied, newnode is
     * appended to the children.
     * </p>
     * @return DOMNode The inserted node.
     */
    public function insertBefore(
        DOMNode $node,
        #[LanguageLevelTypeAware(['8.0' => 'DOMNode|null'], default: 'DOMNode')] $child = null
    ) {}

    /**
     * Replaces a child
     * @link https://php.net/manual/en/domnode.replacechild.php
     * @param DOMNode $node <p>
     * The new node. It must be a member of the target document, i.e.
     * created by one of the DOMDocument->createXXX() methods or imported in
     * the document by .
     * </p>
     * @param DOMNode $child <p>
     * The old node.
     * </p>
     * @return DOMNode|false The old node or false if an error occur.
     */
    public function replaceChild(DOMNode $node, DOMNode $child) {}

    /**
     * Removes child from list of children
     * @link https://php.net/manual/en/domnode.removechild.php
     * @param DOMNode $child <p>
     * The removed child.
     * </p>
     * @return DOMNode If the child could be removed the functions returns the old child.
     */
    public function removeChild(DOMNode $child) {}

    /**
     * Adds new child at the end of the children
     * @link https://php.net/manual/en/domnode.appendchild.php
     * @param DOMNode $node <p>
     * The appended child.
     * </p>
     * @return DOMNode The node added.
     */
    public function appendChild(DOMNode $node) {}

    /**
     * Checks if node has children
     * @link https://php.net/manual/en/domnode.haschildnodes.php
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function hasChildNodes(): bool {}

    /**
     * Clones a node
     * @link https://php.net/manual/en/domnode.clonenode.php
     * @param bool $deep <p>
     * Indicates whether to copy all descendant nodes. This parameter is
     * defaulted to false.
     * </p>
     * @return static The cloned node.
     */
    public function cloneNode(
        #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $deep,
        #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $deep = false
    ) {}

    /**
     * Normalizes the node
     * @link https://php.net/manual/en/domnode.normalize.php
     * @return void
     */
    #[TentativeType]
    public function normalize(): void {}

    /**
     * Checks if feature is supported for specified version
     * @link https://php.net/manual/en/domnode.issupported.php
     * @param string $feature <p>
     * The feature to test. See the example of
     * DOMImplementation::hasFeature for a
     * list of features.
     * </p>
     * @param string $version <p>
     * The version number of the feature to test.
     * </p>
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function isSupported(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $feature,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $version
    ): bool {}

    /**
     * Checks if node has attributes
     * @link https://php.net/manual/en/domnode.hasattributes.php
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function hasAttributes(): bool {}

    /**
     * @param DOMNode $other
     */
    public function compareDocumentPosition(DOMNode $other) {}

    /**
     * Indicates if two nodes are the same node
     * @link https://php.net/manual/en/domnode.issamenode.php
     * @param DOMNode $otherNode <p>
     * The compared node.
     * </p>
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function isSameNode(DOMNode $otherNode): bool {}

    /**
     * Gets the namespace prefix of the node based on the namespace URI
     * @link https://php.net/manual/en/domnode.lookupprefix.php
     * @param string $namespace <p>
     * The namespace URI.
     * </p>
     * @return string The prefix of the namespace.
     */
    #[TentativeType]
    public function lookupPrefix(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace): ?string {}

    /**
     * Checks if the specified namespaceURI is the default namespace or not
     * @link https://php.net/manual/en/domnode.isdefaultnamespace.php
     * @param string $namespace <p>
     * The namespace URI to look for.
     * </p>
     * @return bool Return true if namespaceURI is the default
     * namespace, false otherwise.
     */
    #[TentativeType]
    public function isDefaultNamespace(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace): bool {}

    /**
     * Gets the namespace URI of the node based on the prefix
     * @link https://php.net/manual/en/domnode.lookupnamespaceuri.php
     * @param string|null $prefix <p>
     * The prefix of the namespace.
     * </p>
     * @return string The namespace URI of the node.
     */
    #[PhpStormStubsElementAvailable(from: '8.0')]
    #[TentativeType]
    public function lookupNamespaceURI(?string $prefix): ?string {}

    /**
     * Gets the namespace URI of the node based on the prefix
     * @link https://php.net/manual/en/domnode.lookupnamespaceuri.php
     * @param string $prefix <p>
     * The prefix of the namespace.
     * </p>
     * @return string The namespace URI of the node.
     */
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')]
    public function lookupNamespaceUri($prefix) {}

    /**
     * @param DOMNode $arg
     * @return bool
     */
    public function isEqualNode(DOMNode $arg) {}

    /**
     * @param $feature
     * @param $version
     * @return mixed
     */
    public function getFeature($feature, $version) {}

    /**
     * @param $key
     * @param $data
     * @param $handler
     */
    public function setUserData($key, $data, $handler) {}

    /**
     * @param $key
     * @return mixed
     */
    public function getUserData($key) {}

    /**
     * Gets an XPath location path for the node
     * @return string|null the XPath, or NULL in case of an error.
     * @link https://secure.php.net/manual/en/domnode.getnodepath.php
     */
    #[TentativeType]
    public function getNodePath(): ?string {}

    /**
     * Get line number for a node
     * @link https://php.net/manual/en/domnode.getlineno.php
     * @return int Always returns the line number where the node was defined in.
     */
    #[TentativeType]
    public function getLineNo(): int {}

    /**
     * Canonicalize nodes to a string
     * @param bool $exclusive [optional] Enable exclusive parsing of only the nodes matched by the provided xpath or namespace prefixes.
     * @param bool $withComments [optional] Retain comments in output.
     * @param null|array $xpath [optional] An array of xpaths to filter the nodes by.
     * @param null|array $nsPrefixes [optional] An array of namespace prefixes to filter the nodes by.
     * @return string|false Canonicalized nodes as a string or FALSE on failure
     */
    #[TentativeType]
    public function C14N(
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $exclusive = false,
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $withComments = false,
        #[LanguageLevelTypeAware(['8.0' => 'array|null'], default: 'array')] $xpath = null,
        #[LanguageLevelTypeAware(['8.0' => 'array|null'], default: 'array')] $nsPrefixes = null
    ): string|false {}

    /**
     * Canonicalize nodes to a file.
     * @link https://www.php.net/manual/en/domnode.c14nfile
     * @param string $uri Number of bytes written or FALSE on failure
     * @param bool $exclusive [optional] Enable exclusive parsing of only the nodes matched by the provided xpath or namespace prefixes.
     * @param bool $withComments [optional]  Retain comments in output.
     * @param null|array $xpath [optional] An array of xpaths to filter the nodes by.
     * @param null|array $nsPrefixes [optional] An array of namespace prefixes to filter the nodes by.
     * @return int|false Number of bytes written or FALSE on failure
     */
    #[TentativeType]
    public function C14NFile(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $uri,
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $exclusive = false,
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $withComments = false,
        #[LanguageLevelTypeAware(['8.0' => 'array|null'], default: 'array')] $xpath = null,
        #[LanguageLevelTypeAware(['8.0' => 'array|null'], default: 'array')] $nsPrefixes = null
    ): int|false {}
}

/**
 * DOM operations raise exceptions under particular circumstances, i.e.,
 * when an operation is impossible to perform for logical reasons.
 * @link https://php.net/manual/en/class.domexception.php
 */
final class DOMException extends Exception
{
    /**
     * @link https://php.net/manual/en/class.domexception.php#domexception.props.code
     * @var int An integer indicating the type of error generated
     */
    public $code;
}

class DOMStringList
{
    /**
     * @param $index
     * @return mixed
     */
    public function item($index) {}
}

/**
 * @link https://php.net/manual/en/ref.dom.php
 * @removed 8.0
 */
class DOMNameList
{
    /**
     * @param $index
     * @return mixed
     */
    public function getName($index) {}

    /**
     * @param $index
     * @return mixed
     */
    public function getNamespaceURI($index) {}
}

/**
 * @removed 8.0
 */
class DOMImplementationList
{
    /**
     * @param $index
     * @return mixed
     */
    public function item($index) {}
}

/**
 * @removed 8.0
 */
class DOMImplementationSource
{
    /**
     * @param $features
     * @return mixed
     */
    public function getDomimplementation($features) {}

    /**
     * @param $features
     * @return mixed
     */
    public function getDomimplementations($features) {}
}

/**
 * The DOMImplementation interface provides a number
 * of methods for performing operations that are independent of any
 * particular instance of the document object model.
 * @link https://php.net/manual/en/class.domimplementation.php
 */
class DOMImplementation
{
    /**
     * @param string $feature
     * @param string $version
     * @return mixed
     */
    #[TentativeType]
    public function getFeature(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $feature,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $version
    ): never {}

    /**
     * Test if the DOM implementation implements a specific feature
     * @link https://php.net/manual/en/domimplementation.hasfeature.php
     * @param string $feature <p>
     * The feature to test.
     * </p>
     * @param string $version <p>
     * The version number of the feature to test. In
     * level 2, this can be either 2.0 or 1.0.
     * </p>
     * @return bool true on success or false on failure.
     */
    public function hasFeature($feature, $version) {}

    /**
     * Creates an empty DOMDocumentType object
     * @link https://php.net/manual/en/domimplementation.createdocumenttype.php
     * @param string $qualifiedName <p>
     * The qualified name of the document type to create.
     * </p>
     * @param string $publicId <p>
     * The external subset public identifier.
     * </p>
     * @param string $systemId <p>
     * The external subset system identifier.
     * </p>
     * @return DOMDocumentType|false A new DOMDocumentType node with its
     * ownerDocument set to null.
     * @throws DOMException If there is an error with the namespace
     */
    public function createDocumentType(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName,
        #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $publicId,
        #[PhpStormStubsElementAvailable(from: '8.0')] string $publicId = '',
        #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $systemId,
        #[PhpStormStubsElementAvailable(from: '8.0')] string $systemId = ''
    ) {}

    /**
     * Creates a DOMDocument object of the specified type with its document element
     * @link https://php.net/manual/en/domimplementation.createdocument.php
     * @param string|null $namespace <p>
     * The namespace URI of the document element to create.
     * </p>
     * @param string $qualifiedName <p>
     * The qualified name of the document element to create.
     * </p>
     * @param DOMDocumentType|null $doctype <p>
     * The type of document to create or null.
     * </p>
     * @return DOMDocument|false A new DOMDocument object. If
     * namespaceURI, qualifiedName, and doctype are null, the
     * returned DOMDocument is empty with no document element.
     * @throws DOMException If $doctype has already been used
     * with adifferent document or was created from a different
     * implementation. If there is an error with the namespace,
     * as determined by $namespace and $qualifiedName.
     */
    public function createDocument(
        #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $namespace,
        #[PhpStormStubsElementAvailable(from: '8.0')] ?string $namespace = null,
        #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $qualifiedName,
        #[PhpStormStubsElementAvailable(from: '8.0')] string $qualifiedName = '',
        #[PhpStormStubsElementAvailable(from: '5.3', to: '7.3')] DOMDocumentType $doctype,
        #[PhpStormStubsElementAvailable(from: '7.4')] #[LanguageLevelTypeAware(['8.0' => 'DOMDocumentType|null'], default: 'DOMDocumentType')] $doctype = null
    ) {}
}

class DOMNameSpaceNode
{
    #[LanguageLevelTypeAware(['8.1' => 'DOMNode|null'], default: '')]
    public $parentNode;

    #[LanguageLevelTypeAware(['8.1' => 'DOMDocument|null'], default: '')]
    public $ownerDocument;

    #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
    public $namespaceURI;

    #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
    public $localName;

    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $prefix;

    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $nodeType;

    #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
    public $nodeValue;

    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $nodeName;
}

/**
 * The DOMDocumentFragment class
 * @link https://php.net/manual/en/class.domdocumentfragment.php
 */
class DOMDocumentFragment extends DOMNode implements DOMParentNode
{
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $childElementCount;

    #[LanguageLevelTypeAware(['8.1' => 'DOMElement|null'], default: '')]
    public $lastElementChild;

    #[LanguageLevelTypeAware(['8.1' => 'DOMElement|null'], default: '')]
    public $firstElementChild;

    public function __construct() {}

    /**
     * Append raw XML data
     * @link https://php.net/manual/en/domdocumentfragment.appendxml.php
     * @param string $data <p>
     * XML to append.
     * </p>
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function appendXML(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): bool {}

    /**
     * {@inheritDoc}
     */
    public function append(...$nodes): void {}

    /**
     * {@inheritDoc}
     */
    public function prepend(...$nodes): void {}
}

/**
 * The DOMDocument class represents an entire HTML or XML
 * document; serves as the root of the document tree.
 * @link https://php.net/manual/en/class.domdocument.php
 */
class DOMDocument extends DOMNode implements DOMParentNode
{
    /**
     * @var string|null
     * @link https://php.net/manual/en/class.domdocument.php#domdocument.props.actualencoding
     */
    #[Deprecated("Actual encoding of the document, is a readonly equivalent to encoding.")]
    #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
    public $actualEncoding;

    /**
     * @var DOMConfiguration
     * @link https://php.net/manual/en/class.domdocument.php#domdocument.props.config
     * @see DOMDocument::normalizeDocument()
     */
    #[Deprecated("Configuration used when DOMDocument::normalizeDocument() is invoked.")]
    #[LanguageLevelTypeAware(['8.1' => 'mixed'], default: '')]
    public $config;

    /**
     * @var DOMDocumentType
     * The Document Type Declaration associated with this document.
     * @link https://php.net/manual/en/class.domdocument.php#domdocument.props.doctype
     */
    #[LanguageLevelTypeAware(['8.1' => 'DOMDocumentType|null'], default: '')]
    public $doctype;

    /**
     * @var DOMElement
     * This is a convenience attribute that allows direct access to the child node
     * that is the document element of the document.
     * @link https://php.net/manual/en/class.domdocument.php#domdocument.props.documentelement
     */
    #[LanguageLevelTypeAware(['8.1' => 'DOMElement|null'], default: '')]
    public $documentElement;

    /**
     * @var string|null
     * The location of the document or NULL if undefined.
     * @link https://php.net/manual/en/class.domdocument.php#domdocument.props.documenturi
     */
    #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
    public $documentURI;

    /**
     * @var string|null
     * Encoding of the document, as specified by the XML declaration. This attribute is not present
     * in the final DOM Level 3 specification, but is the only way of manipulating XML document
     * encoding in this implementation.
     * @link https://php.net/manual/en/class.domdocument.php#domdocument.props.encoding
     */
    #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
    public $encoding;

    /**
     * @var bool
     * Nicely formats output with indentation and extra space.
     * @link https://php.net/manual/en/class.domdocument.php#domdocument.props.formatoutput
     */
    #[LanguageLevelTypeAware(['8.1' => 'bool'], default: '')]
    public $formatOutput;

    /**
     * @var DOMImplementation
     * The <classname>DOMImplementation</classname> object that handles this document.
     * @link https://php.net/manual/en/class.domdocument.php#domdocument.props.implementation
     */
    #[LanguageLevelTypeAware(['8.1' => 'DOMImplementation'], default: '')]
    public $implementation;

    /**
     * @var bool
     * Do not remove redundant white space. Default to TRUE.
     * @link https://php.net/manual/en/class.domdocument.php#domdocument.props.preservewhitespace
     */
    #[LanguageLevelTypeAware(['8.1' => 'bool'], default: '')]
    public $preserveWhiteSpace = true;

    /**
     * @var bool
     * Proprietary. Enables recovery mode, i.e. trying to parse non-well formed documents.
     * This attribute is not part of the DOM specification and is specific to libxml.
     * @link https://php.net/manual/en/class.domdocument.php#domdocument.props.recover
     */
    #[LanguageLevelTypeAware(['8.1' => 'bool'], default: '')]
    public $recover;

    /**
     * @var bool
     * Set it to TRUE to load external entities from a doctype declaration. This is useful for
     * including character entities in your XML document.
     * @link https://php.net/manual/en/class.domdocument.php#domdocument.props.resolveexternals
     */
    #[LanguageLevelTypeAware(['8.1' => 'bool'], default: '')]
    public $resolveExternals;

    /**
     * @var bool
     * @link https://php.net/manual/en/class.domdocument.php#domdocument.props.standalone
     */
    #[Deprecated("Whether or not the document is standalone, as specified by the XML declaration, corresponds to xmlStandalone.")]
    #[LanguageLevelTypeAware(['8.1' => 'bool'], default: '')]
    public $standalone;

    /**
     * @var bool
     * Throws <classname>DOMException</classname> on errors. Default to TRUE.
     * @link https://php.net/manual/en/class.domdocument.php#domdocument.props.stricterrorchecking
     */
    #[LanguageLevelTypeAware(['8.1' => 'bool'], default: '')]
    public $strictErrorChecking = true;

    /**
     * @var bool
     * Proprietary. Whether or not to substitute entities. This attribute is not part of the DOM
     * specification and is specific to libxml.
     * @link https://php.net/manual/en/class.domdocument.php#domdocument.props.substituteentities
     */
    #[LanguageLevelTypeAware(['8.1' => 'bool'], default: '')]
    public $substituteEntities;

    /**
     * @var bool
     * Loads and validates against the DTD. Default to FALSE.
     * @link https://php.net/manual/en/class.domdocument.php#domdocument.props.validateonparse
     */
    #[LanguageLevelTypeAware(['8.1' => 'bool'], default: '')]
    public $validateOnParse = false;

    /**
     * @var string
     * @link https://php.net/manual/en/class.domdocument.php#domdocument.props.version
     */
    #[Deprecated('Version of XML, corresponds to xmlVersion')]
    #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
    public $version;

    /**
     * @var string|null
     * An attribute specifying, as part of the XML declaration, the encoding of this document. This is NULL when
     * unspecified or when it is not known, such as when the Document was created in memory.
     * @link https://php.net/manual/en/class.domdocument.php#domdocument.props.xmlencoding
     */
    #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
    public $xmlEncoding;

    /**
     * @var bool
     * An attribute specifying, as part of the XML declaration, whether this document is standalone.
     * This is FALSE when unspecified.
     * @link https://php.net/manual/en/class.domdocument.php#domdocument.props.xmlstandalone
     */
    #[LanguageLevelTypeAware(['8.1' => 'bool'], default: '')]
    public $xmlStandalone;

    /**
     * @var string|null
     * An attribute specifying, as part of the XML declaration, the version number of this document. If there is no
     * declaration and if this document supports the "XML" feature, the value is "1.0".
     * @link https://php.net/manual/en/class.domdocument.php#domdocument.props.xmlversion
     */
    #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
    public $xmlVersion;

    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $childElementCount;

    #[LanguageLevelTypeAware(['8.1' => 'DOMElement|null'], default: '')]
    public $lastElementChild;

    #[LanguageLevelTypeAware(['8.1' => 'DOMElement|null'], default: '')]
    public $firstElementChild;

    /**
     * Create new element node
     * @link https://php.net/manual/en/domdocument.createelement.php
     * @param string $localName <p>
     * The tag name of the element.
     * </p>
     * @param string $value [optional] <p>
     * The value of the element. By default, an empty element will be created.
     * You can also set the value later with DOMElement->nodeValue.
     * </p>
     * @return DOMElement|false A new instance of class DOMElement or false
     * if an error occurred.
     * @throws DOMException If invalid $localName
     */
    public function createElement(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value = ''
    ) {}

    /**
     * Create new document fragment
     * @link https://php.net/manual/en/domdocument.createdocumentfragment.php
     * @return DOMDocumentFragment|false The new DOMDocumentFragment or false if an error occurred.
     */
    #[TentativeType]
    public function createDocumentFragment(): DOMDocumentFragment {}

    /**
     * Create new text node
     * @link https://php.net/manual/en/domdocument.createtextnode.php
     * @param string $data <p>
     * The content of the text.
     * </p>
     * @return DOMText|false The new DOMText or false if an error occurred.
     */
    #[TentativeType]
    public function createTextNode(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): DOMText {}

    /**
     * Create new comment node
     * @link https://php.net/manual/en/domdocument.createcomment.php
     * @param string $data <p>
     * The content of the comment.
     * </p>
     * @return DOMComment|false The new DOMComment or false if an error occurred.
     */
    #[TentativeType]
    public function createComment(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): DOMComment {}

    /**
     * Create new cdata node
     * @link https://php.net/manual/en/domdocument.createcdatasection.php
     * @param string $data <p>
     * The content of the cdata.
     * </p>
     * @return DOMCDATASection|false The new DOMCDATASection or false if an error occurred.
     */
    public function createCDATASection(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data) {}

    /**
     * Creates new PI node
     * @link https://php.net/manual/en/domdocument.createprocessinginstruction.php
     * @param string $target <p>
     * The target of the processing instruction.
     * </p>
     * @param string $data <p>
     * The content of the processing instruction.
     * </p>
     * @return DOMProcessingInstruction|false The new DOMProcessingInstruction or false if an error occurred.
     */
    public function createProcessingInstruction(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $target,
        #[PhpStormStubsElementAvailable(from: '5.3', to: '7.3')] $data,
        #[PhpStormStubsElementAvailable(from: '7.4')] #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data = null
    ) {}

    /**
     * Create new attribute
     * @link https://php.net/manual/en/domdocument.createattribute.php
     * @param string $localName <p>
     * The name of the attribute.
     * </p>
     * @return DOMAttr|false The new DOMAttr or false if an error occurred.
     * @throws DOMException If invalid $localName
     */
    public function createAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName) {}

    /**
     * Create new entity reference node
     * @link https://php.net/manual/en/domdocument.createentityreference.php
     * @param string $name <p>
     * The content of the entity reference, e.g. the entity reference minus
     * the leading &amp; and the trailing
     * ; characters.
     * </p>
     * @return DOMEntityReference|false The new DOMEntityReference or false if an error
     * occurred.
     */
    public function createEntityReference(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name) {}

    /**
     * Searches for all elements with given tag name
     * @link https://php.net/manual/en/domdocument.getelementsbytagname.php
     * @param string $qualifiedName <p>
     * The name of the tag to match on. The special value *
     * matches all tags.
     * </p>
     * @return DOMNodeList A new DOMNodeList object containing all the matched
     * elements.
     */
    #[TentativeType]
    public function getElementsByTagName(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName): DOMNodeList {}

    /**
     * Import node into current document
     * @link https://php.net/manual/en/domdocument.importnode.php
     * @param DOMNode $node <p>
     * The node to import.
     * </p>
     * @param bool $deep <p>
     * If set to true, this method will recursively import the subtree under
     * the importedNode.
     * </p>
     * <p>
     * To copy the nodes attributes deep needs to be set to true
     * </p>
     * @return DOMNode|false The copied node or false, if it cannot be copied.
     */
    public function importNode(
        DOMNode $node,
        #[PhpStormStubsElementAvailable(from: '5.3', to: '7.3')] $deep,
        #[PhpStormStubsElementAvailable(from: '7.4')] #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $deep = false
    ) {}

    /**
     * Create new element node with an associated namespace
     * @link https://php.net/manual/en/domdocument.createelementns.php
     * @param string|null $namespace <p>
     * The URI of the namespace.
     * </p>
     * @param string $qualifiedName <p>
     * The qualified name of the element, as prefix:tagname.
     * </p>
     * @param string $value [optional] <p>
     * The value of the element. By default, an empty element will be created.
     * You can also set the value later with DOMElement->nodeValue.
     * </p>
     * @return DOMElement|false The new DOMElement or false if an error occurred.
     * @throws DOMException If invalid $namespace or $qualifiedName
     */
    public function createElementNS(
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value = ''
    ) {}

    /**
     * Create new attribute node with an associated namespace
     * @link https://php.net/manual/en/domdocument.createattributens.php
     * @param string|null $namespace <p>
     * The URI of the namespace.
     * </p>
     * @param string $qualifiedName <p>
     * The tag name and prefix of the attribute, as prefix:tagname.
     * </p>
     * @return DOMAttr|false The new DOMAttr or false if an error occurred.
     * @throws DOMException If invalid $namespace or $qualifiedName
     */
    public function createAttributeNS(
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName
    ) {}

    /**
     * Searches for all elements with given tag name in specified namespace
     * @link https://php.net/manual/en/domdocument.getelementsbytagnamens.php
     * @param string $namespace <p>
     * The namespace URI of the elements to match on.
     * The special value * matches all namespaces.
     * </p>
     * @param string $localName <p>
     * The local name of the elements to match on.
     * The special value * matches all local names.
     * </p>
     * @return DOMNodeList A new DOMNodeList object containing all the matched
     * elements.
     */
    #[TentativeType]
    public function getElementsByTagNameNS(
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName
    ): DOMNodeList {}

    /**
     * Searches for an element with a certain id
     * @link https://php.net/manual/en/domdocument.getelementbyid.php
     * @param string $elementId <p>
     * The unique id value for an element.
     * </p>
     * @return DOMElement|null The DOMElement or null if the element is
     * not found.
     */
    #[TentativeType]
    public function getElementById(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $elementId): ?DOMElement {}

    /**
     * @param DOMNode $node
     */
    public function adoptNode(DOMNode $node) {}

    /**
     * {@inheritDoc}
     */
    public function append(...$nodes): void {}

    /**
     * {@inheritDoc}
     */
    public function prepend(...$nodes): void {}

    /**
     * Normalizes the document
     * @link https://php.net/manual/en/domdocument.normalizedocument.php
     * @return void
     */
    #[TentativeType]
    public function normalizeDocument(): void {}

    /**
     * @param DOMNode $node
     * @param $namespace
     * @param $qualifiedName
     */
    public function renameNode(DOMNode $node, $namespace, $qualifiedName) {}

    /**
     * Load XML from a file
     * @link https://php.net/manual/en/domdocument.load.php
     * @param string $filename <p>
     * The path to the XML document.
     * </p>
     * @param int $options [optional] <p>
     * Bitwise OR
     * of the libxml option constants.
     * </p>
     * @return DOMDocument|bool true on success or false on failure. If called statically, returns a
     * DOMDocument and issues E_STRICT
     * warning.
     */
    public function load(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = null
    ) {}

    /**
     * Dumps the internal XML tree back into a file
     * @link https://php.net/manual/en/domdocument.save.php
     * @param string $filename <p>
     * The path to the saved XML document.
     * </p>
     * @param int $options [optional] <p>
     * Additional Options. Currently only LIBXML_NOEMPTYTAG is supported.
     * </p>
     * @return int|false the number of bytes written or false if an error occurred.
     */
    public function save($filename, $options = null) {}

    /**
     * Load XML from a string
     * @link https://php.net/manual/en/domdocument.loadxml.php
     * @param string $source <p>
     * The string containing the XML.
     * </p>
     * @param int $options [optional] <p>
     * Bitwise OR
     * of the libxml option constants.
     * </p>
     * @return DOMDocument|bool true on success or false on failure. If called statically, returns a
     * DOMDocument and issues E_STRICT
     * warning.
     */
    public function loadXML(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $source,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = null
    ) {}

    /**
     * Dumps the internal XML tree back into a string
     * @link https://php.net/manual/en/domdocument.savexml.php
     * @param null|DOMNode $node [optional] <p>
     * Use this parameter to output only a specific node without XML declaration
     * rather than the entire document.
     * </p>
     * @param int $options [optional] <p>
     * Additional Options. Currently only LIBXML_NOEMPTYTAG is supported.
     * </p>
     * @return string|false the XML, or false if an error occurred.
     */
    #[TentativeType]
    public function saveXML(
        ?DOMNode $node = null,
        #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = null
    ): string|false {}

    /**
     * Creates a new DOMDocument object
     * @link https://php.net/manual/en/domdocument.construct.php
     * @param string $version [optional] The version number of the document as part of the XML declaration.
     * @param string $encoding [optional] The encoding of the document as part of the XML declaration.
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $version = '1.0',
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $encoding = ''
    ) {}

    /**
     * Validates the document based on its DTD
     * @link https://php.net/manual/en/domdocument.validate.php
     * @return bool true on success or false on failure.
     * If the document have no DTD attached, this method will return false.
     */
    #[TentativeType]
    public function validate(): bool {}

    /**
     * Substitutes XIncludes in a DOMDocument Object
     * @link https://php.net/manual/en/domdocument.xinclude.php
     * @param int $options [optional] <p>
     * libxml parameters. Available
     * since PHP 5.1.0 and Libxml 2.6.7.
     * </p>
     * @return int|false the number of XIncludes in the document.
     */
    #[TentativeType]
    public function xinclude(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = null): int|false {}

    /**
     * Load HTML from a string
     * @link https://php.net/manual/en/domdocument.loadhtml.php
     * @param string $source <p>
     * The HTML string.
     * </p>
     * @param int $options [optional] <p>
     * Since PHP 5.4.0 and Libxml 2.6.0, you may also
     * use the options parameter to specify additional Libxml parameters.
     * </p>
     * @return DOMDocument|bool true on success or false on failure. If called statically, returns a
     * DOMDocument and issues E_STRICT
     * warning.
     */
    public function loadHTML(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $source,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = 0
    ) {}

    /**
     * Load HTML from a file
     * @link https://php.net/manual/en/domdocument.loadhtmlfile.php
     * @param string $filename <p>
     * The path to the HTML file.
     * </p>
     * @param int $options [optional] <p>
     * Since PHP 5.4.0 and Libxml 2.6.0, you may also
     * use the options parameter to specify additional Libxml parameters.
     * </p>
     * @return DOMDocument|bool true on success or false on failure. If called statically, returns a
     * DOMDocument and issues E_STRICT
     * warning.
     */
    public function loadHTMLFile(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = 0
    ) {}

    /**
     * Dumps the internal document into a string using HTML formatting
     * @link https://php.net/manual/en/domdocument.savehtml.php
     * @param null|DOMNode $node [optional] parameter to output a subset of the document.
     * @return string|false The HTML, or false if an error occurred.
     */
    public function saveHTML(DOMNode $node = null) {}

    /**
     * Dumps the internal document into a file using HTML formatting
     * @link https://php.net/manual/en/domdocument.savehtmlfile.php
     * @param string $filename <p>
     * The path to the saved HTML document.
     * </p>
     * @return int|false the number of bytes written or false if an error occurred.
     */
    #[TentativeType]
    public function saveHTMLFile(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename): int|false {}

    /**
     * Validates a document based on a schema
     * @link https://php.net/manual/en/domdocument.schemavalidate.php
     * @param string $filename <p>
     * The path to the schema.
     * </p>
     * @param int $options [optional] <p>
     * Bitwise OR
     * of the libxml option constants.
     * </p>
     * @return bool true on success or false on failure.
     */
    public function schemaValidate($filename, $options = null) {}

    /**
     * Validates a document based on a schema
     * @link https://php.net/manual/en/domdocument.schemavalidatesource.php
     * @param string $source <p>
     * A string containing the schema.
     * </p>
     * @param int $flags [optional] <p>A bitmask of Libxml schema validation flags. Currently the only supported value is <b>LIBXML_SCHEMA_CREATE</b>.
     * Available since PHP 5.5.2 and Libxml 2.6.14.</p>
     * @return bool true on success or false on failure.
     */
    public function schemaValidateSource($source, $flags) {}

    /**
     * Performs relaxNG validation on the document
     * @link https://php.net/manual/en/domdocument.relaxngvalidate.php
     * @param string $filename <p>
     * The RNG file.
     * </p>
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function relaxNGValidate(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename): bool {}

    /**
     * Performs relaxNG validation on the document
     * @link https://php.net/manual/en/domdocument.relaxngvalidatesource.php
     * @param string $source <p>
     * A string containing the RNG schema.
     * </p>
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function relaxNGValidateSource(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $source): bool {}

    /**
     * Register extended class used to create base node type
     * @link https://php.net/manual/en/domdocument.registernodeclass.php
     * @param string $baseClass <p>
     * The DOM class that you want to extend. You can find a list of these
     * classes in the chapter introduction.
     * </p>
     * @param string $extendedClass <p>
     * Your extended class name. If null is provided, any previously
     * registered class extending baseclass will
     * be removed.
     * </p>
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function registerNodeClass(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $baseClass,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $extendedClass
    ): bool {}
}

/**
 * The DOMNodeList class
 * @link https://php.net/manual/en/class.domnodelist.php
 */
class DOMNodeList implements IteratorAggregate, Countable
{
    /**
     * @var int
     * The number of nodes in the list. The range of valid child node indices is 0 to length - 1 inclusive.
     * @link https://php.net/manual/en/class.domnodelist.php#domnodelist.props.length
     */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    #[Immutable]
    public $length;

    /**
     * Retrieves a node specified by index
     * @link https://php.net/manual/en/domnodelist.item.php
     * @param int $index <p>
     * Index of the node into the collection.
     * The range of valid child node indices is 0 to length - 1 inclusive.
     * </p>
     * @return DOMNode|null The node at the indexth position in the
     * DOMNodeList, or null if that is not a valid
     * index.
     */
    public function item(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index) {}

    /**
     * @return int<0, max>
     * @since 7.2
     */
    #[TentativeType]
    public function count(): int {}

    /**
     * @return Iterator
     * @since 8.0
     */
    public function getIterator(): Iterator {}
}

/**
 * The DOMNamedNodeMap class
 * @link https://php.net/manual/en/class.domnamednodemap.php
 * @property-read int $length The number of nodes in the map. The range of valid child node indices is 0 to length - 1 inclusive.
 */
class DOMNamedNodeMap implements IteratorAggregate, Countable
{
    /**
     * Retrieves a node specified by name
     * @link https://php.net/manual/en/domnamednodemap.getnameditem.php
     * @param string $qualifiedName <p>
     * The nodeName of the node to retrieve.
     * </p>
     * @return DOMNode|null A node (of any type) with the specified nodeName, or
     * null if no node is found.
     */
    #[TentativeType]
    public function getNamedItem(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName): ?DOMNode {}

    /**
     * @param DOMNode $arg
     */
    public function setNamedItem(DOMNode $arg) {}

    /**
     * @param $name [optional]
     */
    public function removeNamedItem($name) {}

    /**
     * Retrieves a node specified by index
     * @link https://php.net/manual/en/domnamednodemap.item.php
     * @param int $index <p>
     * Index into this map.
     * </p>
     * @return DOMNode|null The node at the indexth position in the map, or null
     * if that is not a valid index (greater than or equal to the number of nodes
     * in this map).
     */
    #[TentativeType]
    public function item(
        #[PhpStormStubsElementAvailable(from: '5.3', to: '7.0')] $index = 0,
        #[PhpStormStubsElementAvailable(from: '7.1')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index
    ): ?DOMNode {}

    /**
     * Retrieves a node specified by local name and namespace URI
     * @link https://php.net/manual/en/domnamednodemap.getnameditemns.php
     * @param string $namespace <p>
     * The namespace URI of the node to retrieve.
     * </p>
     * @param string $localName <p>
     * The local name of the node to retrieve.
     * </p>
     * @return DOMNode|null A node (of any type) with the specified local name and namespace URI, or
     * null if no node is found.
     */
    #[TentativeType]
    public function getNamedItemNS(
        #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $namespaceURI = '',
        #[PhpStormStubsElementAvailable(from: '8.0')] ?string $namespace,
        #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $localName = '',
        #[PhpStormStubsElementAvailable(from: '8.0')] string $localName
    ): ?DOMNode {}

    /**
     * @param DOMNode $arg [optional]
     */
    public function setNamedItemNS(DOMNode $arg) {}

    /**
     * @param $namespace [optional]
     * @param $localName [optional]
     */
    public function removeNamedItemNS($namespace, $localName) {}

    /**
     * @return int<0,max>
     * @since 7.2
     */
    #[TentativeType]
    public function count(): int {}

    /**
     * @return Iterator
     * @since 8.0
     */
    public function getIterator(): Iterator {}
}

/**
 * The DOMCharacterData class represents nodes with character data.
 * No nodes directly correspond to this class, but other nodes do inherit from it.
 * @link https://php.net/manual/en/class.domcharacterdata.php
 */
class DOMCharacterData extends DOMNode implements DOMChildNode
{
    /**
     * @var string
     * The contents of the node.
     * @link https://php.net/manual/en/class.domcharacterdata.php#domcharacterdata.props.data
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $data;

    /**
     * @var int
     * The length of the contents.
     * @link https://php.net/manual/en/class.domcharacterdata.php#domcharacterdata.props.length
     */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $length;

    #[LanguageLevelTypeAware(['8.1' => 'DOMElement|null'], default: '')]
    public $nextElementSibling;

    #[LanguageLevelTypeAware(['8.1' => 'DOMElement|null'], default: '')]
    public $previousElementSibling;

    /**
     * Extracts a range of data from the node
     * @link https://php.net/manual/en/domcharacterdata.substringdata.php
     * @param int $offset <p>
     * Start offset of substring to extract.
     * </p>
     * @param int $count <p>
     * The number of characters to extract.
     * </p>
     * @return string The specified substring. If the sum of offset
     * and count exceeds the length, then all 16-bit units
     * to the end of the data are returned.
     */
    public function substringData(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $count
    ) {}

    /**
     * Append the string to the end of the character data of the node
     * @link https://php.net/manual/en/domcharacterdata.appenddata.php
     * @param string $data <p>
     * The string to append.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function appendData(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): bool {}

    /**
     * Insert a string at the specified 16-bit unit offset
     * @link https://php.net/manual/en/domcharacterdata.insertdata.php
     * @param int $offset <p>
     * The character offset at which to insert.
     * </p>
     * @param string $data <p>
     * The string to insert.
     * </p>
     * @return bool
     */
    #[TentativeType]
    public function insertData(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data
    ): bool {}

    /**
     * Remove a range of characters from the node
     * @link https://php.net/manual/en/domcharacterdata.deletedata.php
     * @param int $offset <p>
     * The offset from which to start removing.
     * </p>
     * @param int $count <p>
     * The number of characters to delete. If the sum of
     * offset and count exceeds
     * the length, then all characters to the end of the data are deleted.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function deleteData(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $count
    ): bool {}

    /**
     * Replace a substring within the DOMCharacterData node
     * @link https://php.net/manual/en/domcharacterdata.replacedata.php
     * @param int $offset <p>
     * The offset from which to start replacing.
     * </p>
     * @param int $count <p>
     * The number of characters to replace. If the sum of
     * offset and count exceeds
     * the length, then all characters to the end of the data are replaced.
     * </p>
     * @param string $data <p>
     * The string with which the range must be replaced.
     * </p>
     * @return bool
     */
    #[TentativeType]
    public function replaceData(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $count,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data
    ): bool {}

    /**
     * {@inheritDoc}
     */
    public function remove(): void {}

    /**
     * {@inheritDoc}
     */
    public function before(...$nodes): void {}

    /**
     * {@inheritDoc}
     */
    public function after(...$nodes): void {}

    /**
     * {@inheritDoc}
     */
    public function replaceWith(...$nodes): void {}
}

/**
 * The DOMAttr interface represents an attribute in an DOMElement object.
 * @link https://php.net/manual/en/class.domattr.php
 */
class DOMAttr extends DOMNode
{
    /**
     * @var string
     * (PHP5)<br/>
     * The name of the attribute
     * @link https://php.net/manual/en/class.domattr.php#domattr.props.name
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $name;

    /**
     * @var DOMElement
     * (PHP5)<br/>
     * The element which contains the attribute
     * @link https://php.net/manual/en/class.domattr.php#domattr.props.ownerelement
     */
    #[LanguageLevelTypeAware(['8.1' => 'DOMElement|null'], default: '')]
    public $ownerElement;

    /**
     * @var bool
     * (PHP5)<br/>
     * Not implemented yet, always is NULL
     * @link https://php.net/manual/en/class.domattr.php#domattr.props.schematypeinfo
     */
    #[LanguageLevelTypeAware(['8.1' => 'mixed'], default: '')]
    public $schemaTypeInfo;

    /**
     * @var bool
     * (PHP5)<br/>
     * Not implemented yet, always is NULL
     * @link https://php.net/manual/en/class.domattr.php#domattr.props.specified
     */
    #[LanguageLevelTypeAware(['8.1' => 'bool'], default: '')]
    public $specified;

    /**
     * @var string
     * (PHP5)<br/>
     * The value of the attribute
     * @link https://php.net/manual/en/class.domattr.php#domattr.props.value
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $value;

    /**
     * Checks if attribute is a defined ID
     * @link https://php.net/manual/en/domattr.isid.php
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function isId(): bool {}

    /**
     * Creates a new {@see DOMAttr} object
     * @link https://php.net/manual/en/domattr.construct.php
     * @param string $name <p>The tag name of the attribute.</p>
     * @param string $value [optional] <p>The value of the attribute.</p>
     * @throws DOMException If invalid $name
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value = ''
    ) {}
}

/**
 * The DOMElement class
 * @link https://php.net/manual/en/class.domelement.php
 */
class DOMElement extends DOMNode implements DOMParentNode, DOMChildNode
{
    /**
     * @var DOMNode|null
     * The parent of this node. If there is no such node, this returns NULL.
     * @link https://php.net/manual/en/class.domnode.php#domnode.props.parentnode
     */
    public $parentNode;

    /**
     * @var DOMNode|null
     * The first child of this node. If there is no such node, this returns NULL.
     * @link https://php.net/manual/en/class.domnode.php#domnode.props.firstchild
     */
    public $firstChild;

    /**
     * @var DOMNode|null
     * The last child of this node. If there is no such node, this returns NULL.
     * @link https://php.net/manual/en/class.domnode.php#domnode.props.lastchild
     */
    public $lastChild;

    /**
     * @var DOMNode|null
     * The node immediately preceding this node. If there is no such node, this returns NULL.
     * @link https://php.net/manual/en/class.domnode.php#domnode.props.previoussibling
     */
    public $previousSibling;

    /**
     * @var DOMNode|null
     * The node immediately following this node. If there is no such node, this returns NULL.
     * @link https://php.net/manual/en/class.domnode.php#domnode.props.nextsibling
     */
    public $nextSibling;

    /**
     * @var DOMNamedNodeMap
     * A <classname>DOMNamedNodeMap</classname> containing the attributes of this node (if it is a <classname>DOMElement</classname>) or NULL otherwise.
     * @link https://php.net/manual/en/class.domnode.php#domnode.props.attributes
     */
    #[LanguageLevelTypeAware(['8.1' => 'DOMNamedNodeMap'], default: '')]
    public $attributes;

    /**
     * @var bool
     * Not implemented yet, always return NULL
     * @link https://php.net/manual/en/class.domelement.php#domelement.props.schematypeinfo
     */
    #[LanguageLevelTypeAware(['8.1' => 'mixed'], default: '')]
    public $schemaTypeInfo;

    /**
     * @var string
     * The element name
     * @link https://php.net/manual/en/class.domelement.php#domelement.props.tagname
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $tagName;

    #[LanguageLevelTypeAware(['8.1' => 'DOMElement|null'], default: '')]
    public $firstElementChild;

    #[LanguageLevelTypeAware(['8.1' => 'DOMElement|null'], default: '')]
    public $lastElementChild;

    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $childElementCount;

    #[LanguageLevelTypeAware(['8.1' => 'DOMElement|null'], default: '')]
    public $previousElementSibling;

    #[LanguageLevelTypeAware(['8.1' => 'DOMElement|null'], default: '')]
    public $nextElementSibling;

    /**
     * Returns value of attribute
     * @link https://php.net/manual/en/domelement.getattribute.php
     * @param string $qualifiedName <p>
     * The name of the attribute.
     * </p>
     * @return string The value of the attribute, or an empty string if no attribute with the
     * given name is found.
     */
    #[TentativeType]
    public function getAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName): string {}

    /**
     * Adds new attribute
     * @link https://php.net/manual/en/domelement.setattribute.php
     * @param string $qualifiedName <p>
     * The name of the attribute.
     * </p>
     * @param string $value <p>
     * The value of the attribute.
     * </p>
     * @return DOMAttr|false The new DOMAttr or false if an error occurred.
     */
    public function setAttribute(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value
    ) {}

    /**
     * Removes attribute
     * @link https://php.net/manual/en/domelement.removeattribute.php
     * @param string $qualifiedName <p>
     * The name of the attribute.
     * </p>
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function removeAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName): bool {}

    /**
     * Returns attribute node
     * @link https://php.net/manual/en/domelement.getattributenode.php
     * @param string $qualifiedName <p>
     * The name of the attribute.
     * </p>
     * @return DOMAttr The attribute node.
     */
    public function getAttributeNode(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName) {}

    /**
     * Adds new attribute node to element
     * @link https://php.net/manual/en/domelement.setattributenode.php
     * @param DOMAttr $attr <p>
     * The attribute node.
     * </p>
     * @return DOMAttr|null Old node if the attribute has been replaced or null.
     */
    public function setAttributeNode(DOMAttr $attr) {}

    /**
     * Removes attribute
     * @link https://php.net/manual/en/domelement.removeattributenode.php
     * @param DOMAttr $attr <p>
     * The attribute node.
     * </p>
     * @return bool true on success or false on failure.
     */
    public function removeAttributeNode(DOMAttr $attr) {}

    /**
     * Gets elements by tagname
     * @link https://php.net/manual/en/domelement.getelementsbytagname.php
     * @param string $qualifiedName <p>
     * The tag name. Use * to return all elements within
     * the element tree.
     * </p>
     * @return DOMNodeList This function returns a new instance of the class
     * DOMNodeList of all matched elements.
     */
    #[TentativeType]
    public function getElementsByTagName(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName): DOMNodeList {}

    /**
     * Returns value of attribute
     * @link https://php.net/manual/en/domelement.getattributens.php
     * @param string $namespace <p>
     * The namespace URI.
     * </p>
     * @param string $localName <p>
     * The local name.
     * </p>
     * @return string The value of the attribute, or an empty string if no attribute with the
     * given localName and namespaceURI
     * is found.
     */
    #[TentativeType]
    public function getAttributeNS(
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName
    ): string {}

    /**
     * Adds new attribute
     * @link https://php.net/manual/en/domelement.setattributens.php
     * @param string $namespace <p>
     * The namespace URI.
     * </p>
     * @param string $qualifiedName <p>
     * The qualified name of the attribute, as prefix:tagname.
     * </p>
     * @param string $value <p>
     * The value of the attribute.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function setAttributeNS(
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value
    ): void {}

    /**
     * Removes attribute
     * @link https://php.net/manual/en/domelement.removeattributens.php
     * @param string $namespace <p>
     * The namespace URI.
     * </p>
     * @param string $localName <p>
     * The local name.
     * </p>
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function removeAttributeNS(
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName
    ): void {}

    /**
     * Returns attribute node
     * @link https://php.net/manual/en/domelement.getattributenodens.php
     * @param string $namespace <p>
     * The namespace URI.
     * </p>
     * @param string $localName <p>
     * The local name.
     * </p>
     * @return DOMAttr The attribute node.
     */
    public function getAttributeNodeNS(
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName
    ) {}

    /**
     * Adds new attribute node to element
     * @link https://php.net/manual/en/domelement.setattributenodens.php
     * @param DOMAttr $attr
     * @return DOMAttr the old node if the attribute has been replaced.
     */
    public function setAttributeNodeNS(DOMAttr $attr) {}

    /**
     * Get elements by namespaceURI and localName
     * @link https://php.net/manual/en/domelement.getelementsbytagnamens.php
     * @param string $namespace <p>
     * The namespace URI.
     * </p>
     * @param string $localName <p>
     * The local name. Use * to return all elements within
     * the element tree.
     * </p>
     * @return DOMNodeList This function returns a new instance of the class
     * DOMNodeList of all matched elements in the order in
     * which they are encountered in a preorder traversal of this element tree.
     */
    #[TentativeType]
    public function getElementsByTagNameNS(
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName
    ): DOMNodeList {}

    /**
     * Checks to see if attribute exists
     * @link https://php.net/manual/en/domelement.hasattribute.php
     * @param string $qualifiedName <p>
     * The attribute name.
     * </p>
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function hasAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName): bool {}

    /**
     * Checks to see if attribute exists
     * @link https://php.net/manual/en/domelement.hasattributens.php
     * @param string $namespace <p>
     * The namespace URI.
     * </p>
     * @param string $localName <p>
     * The local name.
     * </p>
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function hasAttributeNS(
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName
    ): bool {}

    /**
     * Declares the attribute specified by name to be of type ID
     * @link https://php.net/manual/en/domelement.setidattribute.php
     * @param string $qualifiedName <p>
     * The name of the attribute.
     * </p>
     * @param bool $isId <p>
     * Set it to true if you want name to be of type
     * ID, false otherwise.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function setIdAttribute(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName,
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $isId
    ): void {}

    /**
     * Declares the attribute specified by local name and namespace URI to be of type ID
     * @link https://php.net/manual/en/domelement.setidattributens.php
     * @param string $namespace <p>
     * The namespace URI of the attribute.
     * </p>
     * @param string $qualifiedName <p>
     * The local name of the attribute, as prefix:tagname.
     * </p>
     * @param bool $isId <p>
     * Set it to true if you want name to be of type
     * ID, false otherwise.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function setIdAttributeNS(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName,
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $isId
    ): void {}

    /**
     * Declares the attribute specified by node to be of type ID
     * @link https://php.net/manual/en/domelement.setidattributenode.php
     * @param DOMAttr $attr <p>
     * The attribute node.
     * </p>
     * @param bool $isId <p>
     * Set it to true if you want name to be of type
     * ID, false otherwise.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function setIdAttributeNode(DOMAttr $attr, #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $isId): void {}

    /**
     * {@inheritDoc}
     */
    public function remove(): void {}

    /**
     * {@inheritDoc}
     */
    public function before(...$nodes): void {}

    /**
     * {@inheritDoc}
     */
    public function after(...$nodes): void {}

    /**
     * {@inheritDoc}
     */
    public function replaceWith(...$nodes): void {}

    /**
     * {@inheritDoc}
     */
    public function append(...$nodes): void {}

    /**
     * {@inheritDoc}
     */
    public function prepend(...$nodes): void {}

    /**
     * Creates a new DOMElement object
     * @link https://php.net/manual/en/domelement.construct.php
     * @param string $qualifiedName The tag name of the element. When also passing in namespaceURI, the element name may take a prefix to be associated with the URI.
     * @param string|null $value [optional] The value of the element.
     * @param string $namespace [optional] A namespace URI to create the element within a specific namespace.
     * @throws DOMException If invalid $qualifiedName
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $value = null,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace = null
    ) {}
}

/**
 * The DOMText class inherits from <classname>DOMCharacterData</classname> and represents the textual content of
 * a <classname>DOMElement</classname> or <classname>DOMAttr</classname>.
 * @link https://php.net/manual/en/class.domtext.php
 */
class DOMText extends DOMCharacterData
{
    /**
     * Holds all the text of logically-adjacent (not separated by Element, Comment or Processing Instruction) Text nodes.
     * @link https://php.net/manual/en/class.domtext.php#domtext.props.wholeText
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $wholeText;

    /**
     * Breaks this node into two nodes at the specified offset
     * @link https://php.net/manual/en/domtext.splittext.php
     * @param int $offset <p>
     * The offset at which to split, starting from 0.
     * </p>
     * @return DOMText The new node of the same type, which contains all the content at and after the
     * offset.
     */
    public function splitText(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset) {}

    /**
     * Indicates whether this text node contains whitespace
     * @link https://php.net/manual/en/domtext.iswhitespaceinelementcontent.php
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function isWhitespaceInElementContent(): bool {}

    #[TentativeType]
    public function isElementContentWhitespace(): bool {}

    /**
     * @param $content
     */
    public function replaceWholeText($content) {}

    /**
     * Creates a new <classname>DOMText</classname> object
     * @link https://php.net/manual/en/domtext.construct.php
     * @param string $data [optional] The value of the text node. If not supplied an empty text node is created.
     */
    public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data) {}
}

/**
 * The DOMComment class represents comment nodes,
 * characters delimited by lt;!-- and --&gt;.
 * @link https://php.net/manual/en/class.domcomment.php
 */
class DOMComment extends DOMCharacterData
{
    /**
     * Creates a new DOMComment object
     * @link https://php.net/manual/en/domcomment.construct.php
     * @param string $data [optional] The value of the comment
     */
    public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data) {}
}

/**
 * @removed 8.0
 */
class DOMTypeinfo {}

/**
 * @removed 8.0
 */
class DOMUserDataHandler
{
    public function handle() {}
}

/**
 * @removed 8.0
 */
class DOMDomError {}

/**
 * @removed 8.0
 */
class DOMErrorHandler
{
    /**
     * @param DOMDomError $error
     */
    public function handleError(DOMDomError $error) {}
}

/**
 * @removed 8.0
 */
class DOMLocator {}

/**
 * @removed 8.0
 */
class DOMConfiguration
{
    /**
     * @param $name
     * @param $value
     */
    public function setParameter($name, $value) {}

    /**
     * @param $name [optional]
     */
    public function getParameter($name) {}

    /**
     * @param $name [optional]
     * @param $value [optional]
     */
    public function canSetParameter($name, $value) {}
}

/**
 * The DOMCdataSection inherits from DOMText for textural representation of CData constructs.
 * @link https://secure.php.net/manual/en/class.domcdatasection.php
 */
class DOMCdataSection extends DOMText
{
    /**
     * The value of the CDATA node. If not supplied, an empty CDATA node is created.
     * @param string $data The value of the CDATA node. If not supplied, an empty CDATA node is created.
     * @link https://secure.php.net/manual/en/domcdatasection.construct.php
     */
    public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data) {}
}

/**
 * The DOMDocumentType class
 * @link https://php.net/manual/en/class.domdocumenttype.php
 */
class DOMDocumentType extends DOMNode
{
    /**
     * @var string
     * The public identifier of the external subset.
     * @link https://php.net/manual/en/class.domdocumenttype.php#domdocumenttype.props.publicid
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $publicId;

    /**
     * @var string
     * The system identifier of the external subset. This may be an absolute URI or not.
     * @link https://php.net/manual/en/class.domdocumenttype.php#domdocumenttype.props.systemid
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $systemId;

    /**
     * @var string
     * The name of DTD; i.e., the name immediately following the DOCTYPE keyword.
     * @link https://php.net/manual/en/class.domdocumenttype.php#domdocumenttype.props.name
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $name;

    /**
     * @var DOMNamedNodeMap
     * A <classname>DOMNamedNodeMap</classname> containing the general entities, both external and internal, declared in the DTD.
     * @link https://php.net/manual/en/class.domdocumenttype.php#domdocumenttype.props.entities
     */
    #[LanguageLevelTypeAware(['8.1' => 'DOMNamedNodeMap'], default: '')]
    public $entities;

    /**
     * @var DOMNamedNodeMap
     * A <clasname>DOMNamedNodeMap</classname> containing the notations declared in the DTD.
     * @link https://php.net/manual/en/class.domdocumenttype.php#domdocumenttype.props.notations
     */
    #[LanguageLevelTypeAware(['8.1' => 'DOMNamedNodeMap'], default: '')]
    public $notations;

    /**
     * @var string|null
     * The internal subset as a string, or null if there is none. This is does not contain the delimiting square brackets.
     * @link https://php.net/manual/en/class.domdocumenttype.php#domdocumenttype.props.internalsubset
     */
    #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
    public $internalSubset;
}

/**
 * The DOMNotation class
 * @link https://php.net/manual/en/class.domnotation.php
 */
class DOMNotation extends DOMNode
{
    /**
     * @var string
     *
     * @link https://php.net/manual/en/class.domnotation.php#domnotation.props.publicid
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $publicId;

    /**
     * @var string
     *
     * @link https://php.net/manual/en/class.domnotation.php#domnotation.props.systemid
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $systemId;
}

/**
 * The DOMEntity class represents a known entity, either parsed or unparsed, in an XML document.
 * @link https://php.net/manual/en/class.domentity.php
 */
class DOMEntity extends DOMNode
{
    /**
     * @var string|null
     * The public identifier associated with the entity if specified, and NULL otherwise.
     * @link https://php.net/manual/en/class.domentity.php#domentity.props.publicid
     */
    #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
    public $publicId;

    /**
     * @var string|null
     * The system identifier associated with the entity if specified, and NULL otherwise. This may be an
     * absolute URI or not.
     * @link https://php.net/manual/en/class.domentity.php#domentity.props.systemid
     */
    #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
    public $systemId;

    /**
     * @var string|null
     * For unparsed entities, the name of the notation for the entity. For parsed entities, this is NULL.
     * @link https://php.net/manual/en/class.domentity.php#domentity.props.notationname
     */
    #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
    public $notationName;

    /**
     * @var string|null
     * An attribute specifying the encoding used for this entity at the time of parsing, when it is an external
     * parsed entity. This is NULL if it an entity from the internal subset or if it is not known.
     * @link https://php.net/manual/en/class.domentity.php#domentity.props.actualencoding
     */
    #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
    public $actualEncoding;

    /**
     * @var string|null
     * An attribute specifying, as part of the text declaration, the encoding of this entity, when it is an external
     * parsed entity. This is NULL otherwise.
     * @link https://php.net/manual/en/class.domentity.php#domentity.props.encoding
     */
    #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
    public $encoding;

    /**
     * @var string|null
     * An attribute specifying, as part of the text declaration, the version number of this entity, when it is an
     * external parsed entity. This is NULL otherwise.
     * @link https://php.net/manual/en/class.domentity.php#domentity.props.version
     */
    #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
    public $version;
}

/**
 * Extends DOMNode.
 * @link https://php.net/manual/en/class.domentityreference.php
 */
class DOMEntityReference extends DOMNode
{
    /**
     * Creates a new DOMEntityReference object
     * @link https://php.net/manual/en/domentityreference.construct.php
     * @param string $name The name of the entity reference.
     */
    public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name) {}
}

/**
 * The DOMProcessingInstruction class
 * @link https://php.net/manual/en/class.domprocessinginstruction.php
 */
class DOMProcessingInstruction extends DOMNode
{
    /**
     * @link https://php.net/manual/en/class.domprocessinginstruction.php#domprocessinginstruction.props.target
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $target;

    /**
     * @link https://php.net/manual/en/class.domprocessinginstruction.php#domprocessinginstruction.props.data
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $data;

    /**
     * Creates a new <classname>DOMProcessingInstruction</classname> object
     * @link https://php.net/manual/en/domprocessinginstruction.construct.php
     * @param string $name The tag name of the processing instruction.
     * @param string $value [optional] The value of the processing instruction.
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value
    ) {}
}

class DOMStringExtend
{
    /**
     * @param $offset32
     */
    public function findOffset16($offset32) {}

    /**
     * @param $offset16
     */
    public function findOffset32($offset16) {}
}

/**
 * The DOMXPath class (supports XPath 1.0)
 * @link https://php.net/manual/en/class.domxpath.php
 */
class DOMXPath
{
    /**
     * @var DOMDocument
     *
     * @link https://php.net/manual/en/class.domxpath.php#domxpath.props.document
     */
    #[LanguageLevelTypeAware(['8.1' => 'DOMDocument'], default: '')]
    public $document;

    #[LanguageLevelTypeAware(['8.1' => 'bool'], default: '')]
    public $registerNodeNamespaces;

    /**
     * Creates a new <classname>DOMXPath</classname> object
     * @link https://php.net/manual/en/domxpath.construct.php
     * @param DOMDocument $document The <classname>DOMDocument</classname> associated with the <classname>DOMXPath</classname>.
     * @param bool $registerNodeNS [optional] allow global flag to configure query() or evaluate() calls. Since 8.0.
     */
    public function __construct(DOMDocument $document, #[PhpStormStubsElementAvailable(from: '8.0')] bool $registerNodeNS = true) {}

    /**
     * Registers the namespace with the <classname>DOMXPath</classname> object
     * @link https://php.net/manual/en/domxpath.registernamespace.php
     * @param string $prefix <p>
     * The prefix.
     * </p>
     * @param string $namespace <p>
     * The URI of the namespace.
     * </p>
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function registerNamespace(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $prefix,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace
    ): bool {}

    /**
     * Evaluates the given XPath expression
     * @link https://php.net/manual/en/domxpath.query.php
     * @param string $expression <p>
     * The XPath expression to execute.
     * </p>
     * @param DOMNode $contextNode [optional] <p>
     * The optional contextnode can be specified for
     * doing relative XPath queries. By default, the queries are relative to
     * the root element.
     * </p>
     * @param bool $registerNodeNS [optional] <p>The optional registerNodeNS can be specified to
     * disable automatic registration of the context node.</p>
     * @return DOMNodeList|false a DOMNodeList containing all nodes matching
     * the given XPath expression. Any expression which does not return nodes
     * will return an empty DOMNodeList. The return is false if the expression
     * is malformed or the contextnode is invalid.
     */
    #[TentativeType]
    public function query(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] #[Language('XPath')] $expression,
        #[LanguageLevelTypeAware(['8.0' => 'DOMNode|null'], default: '')] $contextNode = null,
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $registerNodeNS = true
    ): mixed {}

    /**
     * Evaluates the given XPath expression and returns a typed result if possible.
     * @link https://php.net/manual/en/domxpath.evaluate.php
     * @param string $expression <p>
     * The XPath expression to execute.
     * </p>
     * @param DOMNode $contextNode [optional] <p>
     * The optional contextnode can be specified for
     * doing relative XPath queries. By default, the queries are relative to
     * the root element.
     * </p>
     * @param bool $registerNodeNS [optional]
     * <p>
     * The optional registerNodeNS can be specified to disable automatic registration of the context node.
     * </p>
     * @return mixed a typed result if possible or a DOMNodeList
     * containing all nodes matching the given XPath expression.
     */
    #[TentativeType]
    public function evaluate(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] #[Language('XPath')] $expression,
        #[LanguageLevelTypeAware(['8.0' => 'DOMNode|null'], default: '')] $contextNode = null,
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $registerNodeNS = true
    ): mixed {}

    /**
     * Register PHP functions as XPath functions
     * @link https://php.net/manual/en/domxpath.registerphpfunctions.php
     * @param string|string[] $restrict [optional] <p>
     * Use this parameter to only allow certain functions to be called from XPath.
     * </p>
     * <p>
     * This parameter can be either a string (a function name) or
     * an array of function names.
     * </p>
     * @return void
     */
    public function registerPhpFunctions($restrict = null) {}
}

/**
 * @property-read DOMElement|null $firstElementChild
 * @property-read DOMElement|null $lastElementChild
 * @property-read int $childElementCount
 *
 * @since 8.0
 */
interface DOMParentNode
{
    /**
     * Appends one or many nodes to the list of children behind the last
     * child node.
     *
     * @param DOMNode|string|null ...$nodes
     * @return void
     * @since 8.0
     */
    public function append(...$nodes): void;

    /**
     * Prepends one or many nodes to the list of children before the first
     * child node.
     *
     * @param DOMNode|string|null ...$nodes
     * @return void
     * @since 8.0
     */
    public function prepend(...$nodes): void;
}

/**
 * @property-read DOMElement|null $previousElementSibling
 * @property-read DOMElement|null $nextElementSibling
 *
 * @since 8.0
 */
interface DOMChildNode
{
    /**
     * Acts as a simpler version of {@see DOMNode::removeChild()}.
     *
     * @return void
     * @since 8.0
     */
    public function remove(): void;

    /**
     * Add passed node(s) before the current node
     *
     * @param DOMNode|string|null ...$nodes
     * @return void
     * @since 8.0
     */
    public function before(...$nodes): void;

    /**
     * Add passed node(s) after  the current node
     *
     * @param DOMNode|string|null ...$nodes
     * @return void
     * @since 8.0
     */
    public function after(...$nodes): void;

    /**
     * Replace current node with new node(s), a combination
     * of {@see DOMChildNode::remove()} + {@see DOMChildNode::append()}.
     *
     * @param DOMNode|string|null ...$nodes
     * @return void
     * @since 8.0
     */
    public function replaceWith(...$nodes): void;
}
<?php

// Start of dom v.20031129
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;

/**
 * Gets a <b>DOMElement</b> object from a <b>SimpleXMLElement</b> object
 * @link https://php.net/manual/en/function.dom-import-simplexml.php
 * @param SimpleXMLElement $node <p>
 * The <b>SimpleXMLElement</b> node.
 * </p>
 * @return DOMElement|null The <b>DOMElement</b> node added or <b>NULL</b> if any errors occur.
 */
#[LanguageLevelTypeAware(['8.0' => 'DOMElement'], default: 'DOMElement|null')]
function dom_import_simplexml(object $node) {}

/**
 * Node is a <b>DOMElement</b>
 * @link https://php.net/manual/en/dom.constants.php
 */
define('XML_ELEMENT_NODE', 1);

/**
 * Node is a <b>DOMAttr</b>
 * @link https://php.net/manual/en/dom.constants.php
 */
define('XML_ATTRIBUTE_NODE', 2);

/**
 * Node is a <b>DOMText</b>
 * @link https://php.net/manual/en/dom.constants.php
 */
define('XML_TEXT_NODE', 3);

/**
 * Node is a <b>DOMCharacterData</b>
 * @link https://php.net/manual/en/dom.constants.php
 */
define('XML_CDATA_SECTION_NODE', 4);

/**
 * Node is a <b>DOMEntityReference</b>
 * @link https://php.net/manual/en/dom.constants.php
 */
define('XML_ENTITY_REF_NODE', 5);

/**
 * Node is a <b>DOMEntity</b>
 * @link https://php.net/manual/en/dom.constants.php
 */
define('XML_ENTITY_NODE', 6);

/**
 * Node is a <b>DOMProcessingInstruction</b>
 * @link https://php.net/manual/en/dom.constants.php
 */
define('XML_PI_NODE', 7);

/**
 * Node is a <b>DOMComment</b>
 * @link https://php.net/manual/en/dom.constants.php
 */
define('XML_COMMENT_NODE', 8);

/**
 * Node is a <b>DOMDocument</b>
 * @link https://php.net/manual/en/dom.constants.php
 */
define('XML_DOCUMENT_NODE', 9);

/**
 * Node is a <b>DOMDocumentType</b>
 * @link https://php.net/manual/en/dom.constants.php
 */
define('XML_DOCUMENT_TYPE_NODE', 10);

/**
 * Node is a <b>DOMDocumentFragment</b>
 * @link https://php.net/manual/en/dom.constants.php
 */
define('XML_DOCUMENT_FRAG_NODE', 11);

/**
 * Node is a <b>DOMNotation</b>
 * @link https://php.net/manual/en/dom.constants.php
 */
define('XML_NOTATION_NODE', 12);
define('XML_HTML_DOCUMENT_NODE', 13);
define('XML_DTD_NODE', 14);
define('XML_ELEMENT_DECL_NODE', 15);
define('XML_ATTRIBUTE_DECL_NODE', 16);
define('XML_ENTITY_DECL_NODE', 17);
define('XML_NAMESPACE_DECL_NODE', 18);
define('XML_LOCAL_NAMESPACE', 18);
define('XML_ATTRIBUTE_CDATA', 1);
define('XML_ATTRIBUTE_ID', 2);
define('XML_ATTRIBUTE_IDREF', 3);
define('XML_ATTRIBUTE_IDREFS', 4);
define('XML_ATTRIBUTE_ENTITY', 6);
define('XML_ATTRIBUTE_NMTOKEN', 7);
define('XML_ATTRIBUTE_NMTOKENS', 8);
define('XML_ATTRIBUTE_ENUMERATION', 9);
define('XML_ATTRIBUTE_NOTATION', 10);

/**
 * Error code not part of the DOM specification. Meant for PHP errors.
 * @link https://php.net/manual/en/dom.constants.php
 */
define('DOM_PHP_ERR', 0);

/**
 * If index or size is negative, or greater than the allowed value.
 * @link https://php.net/manual/en/dom.constants.php
 */
define('DOM_INDEX_SIZE_ERR', 1);

/**
 * If the specified range of text does not fit into a
 * <b>DOMString</b>.
 * @link https://php.net/manual/en/dom.constants.php
 */
define('DOMSTRING_SIZE_ERR', 2);

/**
 * If any node is inserted somewhere it doesn't belong
 * @link https://php.net/manual/en/dom.constants.php
 */
define('DOM_HIERARCHY_REQUEST_ERR', 3);

/**
 * If a node is used in a different document than the one that created it.
 * @link https://php.net/manual/en/dom.constants.php
 */
define('DOM_WRONG_DOCUMENT_ERR', 4);

/**
 * If an invalid or illegal character is specified, such as in a name.
 * @link https://php.net/manual/en/dom.constants.php
 */
define('DOM_INVALID_CHARACTER_ERR', 5);

/**
 * If data is specified for a node which does not support data.
 * @link https://php.net/manual/en/dom.constants.php
 */
define('DOM_NO_DATA_ALLOWED_ERR', 6);

/**
 * If an attempt is made to modify an object where modifications are not allowed.
 * @link https://php.net/manual/en/dom.constants.php
 */
define('DOM_NO_MODIFICATION_ALLOWED_ERR', 7);

/**
 * If an attempt is made to reference a node in a context where it does not exist.
 * @link https://php.net/manual/en/dom.constants.php
 */
define('DOM_NOT_FOUND_ERR', 8);

/**
 * If the implementation does not support the requested type of object or operation.
 * @link https://php.net/manual/en/dom.constants.php
 */
define('DOM_NOT_SUPPORTED_ERR', 9);

/**
 * If an attempt is made to add an attribute that is already in use elsewhere.
 * @link https://php.net/manual/en/dom.constants.php
 */
define('DOM_INUSE_ATTRIBUTE_ERR', 10);

/**
 * If an attempt is made to use an object that is not, or is no longer, usable.
 * @link https://php.net/manual/en/dom.constants.php
 */
define('DOM_INVALID_STATE_ERR', 11);

/**
 * If an invalid or illegal string is specified.
 * @link https://php.net/manual/en/dom.constants.php
 */
define('DOM_SYNTAX_ERR', 12);

/**
 * If an attempt is made to modify the type of the underlying object.
 * @link https://php.net/manual/en/dom.constants.php
 */
define('DOM_INVALID_MODIFICATION_ERR', 13);

/**
 * If an attempt is made to create or change an object in a way which is
 * incorrect with regard to namespaces.
 * @link https://php.net/manual/en/dom.constants.php
 */
define('DOM_NAMESPACE_ERR', 14);

/**
 * If a parameter or an operation is not supported by the underlying object.
 * @link https://php.net/manual/en/dom.constants.php
 */
define('DOM_INVALID_ACCESS_ERR', 15);

/**
 * If a call to a method such as insertBefore or removeChild would make the Node
 * invalid with respect to "partial validity", this exception would be raised and
 * the operation would not be done.
 * @link https://php.net/manual/en/dom.constants.php
 */
define('DOM_VALIDATION_ERR', 16);

// End of dom v.20031129
<?php

// Start of xmlreader v.0.2
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;

/**
 * The XMLReader extension is an XML Pull parser. The reader acts as a
 * cursor going forward on the document stream and stopping at each node
 * on the way.
 * @link https://php.net/manual/en/class.xmlreader.php
 *
 * @property-read int $attributeCount The number of attributes on the node
 * @property-read string $baseURI The base URI of the node
 * @property-read int $depth Depth of the node in the tree, starting at 0
 * @property-read bool $hasAttributes Indicates if node has attributes
 * @property-read bool $hasValue Indicates if node has a text value
 * @property-read bool $isDefault Indicates if attribute is defaulted from DTD
 * @property-read bool $isEmptyElement Indicates if node is an empty element tag
 * @property-read string $localName The local name of the node
 * @property-read string $name The qualified name of the node
 * @property-read string $namespaceURI The URI of the namespace associated with the node
 * @property-read int $nodeType The node type for the node
 * @property-read string $prefix The prefix of the namespace associated with the node
 * @property-read string $value The text value of the node
 * @property-read string $xmlLang The xml:lang scope which the node resides
 */
class XMLReader
{
    /**
     * No node type
     */
    public const NONE = 0;

    /**
     * Start element
     */
    public const ELEMENT = 1;

    /**
     * Attribute node
     */
    public const ATTRIBUTE = 2;

    /**
     * Text node
     */
    public const TEXT = 3;

    /**
     * CDATA node
     */
    public const CDATA = 4;

    /**
     * Entity Reference node
     */
    public const ENTITY_REF = 5;

    /**
     * Entity Declaration node
     */
    public const ENTITY = 6;

    /**
     * Processing Instruction node
     */
    public const PI = 7;

    /**
     * Comment node
     */
    public const COMMENT = 8;

    /**
     * Document node
     */
    public const DOC = 9;

    /**
     * Document Type node
     */
    public const DOC_TYPE = 10;

    /**
     * Document Fragment node
     */
    public const DOC_FRAGMENT = 11;

    /**
     * Notation node
     */
    public const NOTATION = 12;

    /**
     * Whitespace node
     */
    public const WHITESPACE = 13;

    /**
     * Significant Whitespace node
     */
    public const SIGNIFICANT_WHITESPACE = 14;

    /**
     * End Element
     */
    public const END_ELEMENT = 15;

    /**
     * End Entity
     */
    public const END_ENTITY = 16;

    /**
     * XML Declaration node
     */
    public const XML_DECLARATION = 17;

    /**
     * Load DTD but do not validate
     */
    public const LOADDTD = 1;

    /**
     * Load DTD and default attributes but do not validate
     */
    public const DEFAULTATTRS = 2;

    /**
     * Load DTD and validate while parsing
     */
    public const VALIDATE = 3;

    /**
     * Substitute entities and expand references
     */
    public const SUBST_ENTITIES = 4;

    /**
     * Close the XMLReader input
     * @link https://php.net/manual/en/xmlreader.close.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @since 5.1.2
     */
    public function close() {}

    /**
     * Get the value of a named attribute
     * @link https://php.net/manual/en/xmlreader.getattribute.php
     * @param string $name <p>
     * The name of the attribute.
     * </p>
     * @return string|null The value of the attribute, or <b>NULL</b> if no attribute with the given
     * <i>name</i> is found or not positioned on an element node.
     * @since 5.1.2
     */
    #[TentativeType]
    public function getAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): ?string {}

    /**
     * Get the value of an attribute by index
     * @link https://php.net/manual/en/xmlreader.getattributeno.php
     * @param int $index <p>
     * The position of the attribute.
     * </p>
     * @return string|null The value of the attribute, or <b>NULL</b> if no attribute exists
     * at <i>index</i> or not positioned of element.
     * @since 5.1.2
     */
    #[TentativeType]
    public function getAttributeNo(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index): ?string {}

    /**
     * Get the value of an attribute by localname and URI
     * @link https://php.net/manual/en/xmlreader.getattributens.php
     * @param string $name <p>
     * The local name.
     * </p>
     * @param string $namespace <p>
     * The namespace URI.
     * </p>
     * @return string|null The value of the attribute, or <b>NULL</b> if no attribute with the
     * given <i>localName</i> and
     * <i>namespaceURI</i> is found or not positioned of element.
     * @since 5.1.2
     */
    #[TentativeType]
    public function getAttributeNs(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace
    ): ?string {}

    /**
     * Indicates if specified property has been set
     * @link https://php.net/manual/en/xmlreader.getparserproperty.php
     * @param int $property <p>
     * One of the parser option
     * constants.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @since 5.1.2
     */
    #[TentativeType]
    public function getParserProperty(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property): bool {}

    /**
     * Indicates if the parsed document is valid
     * @link https://php.net/manual/en/xmlreader.isvalid.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @since 5.1.2
     */
    #[TentativeType]
    public function isValid(): bool {}

    /**
     * Lookup namespace for a prefix
     * @link https://php.net/manual/en/xmlreader.lookupnamespace.php
     * @param string $prefix <p>
     * String containing the prefix.
     * </p>
     * @return string|null <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @since 5.1.2
     */
    #[TentativeType]
    public function lookupNamespace(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $prefix): ?string {}

    /**
     * Move cursor to an attribute by index
     * @link https://php.net/manual/en/xmlreader.movetoattributeno.php
     * @param int $index <p>
     * The position of the attribute.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @since 5.1.2
     */
    #[TentativeType]
    public function moveToAttributeNo(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index): bool {}

    /**
     * Move cursor to a named attribute
     * @link https://php.net/manual/en/xmlreader.movetoattribute.php
     * @param string $name <p>
     * The name of the attribute.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @since 5.1.2
     */
    #[TentativeType]
    public function moveToAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {}

    /**
     * Move cursor to a named attribute
     * @link https://php.net/manual/en/xmlreader.movetoattributens.php
     * @param string $name <p>
     * The local name.
     * </p>
     * @param string $namespace <p>
     * The namespace URI.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @since 5.1.2
     */
    #[TentativeType]
    public function moveToAttributeNs(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace
    ): bool {}

    /**
     * Position cursor on the parent Element of current Attribute
     * @link https://php.net/manual/en/xmlreader.movetoelement.php
     * @return bool <b>TRUE</b> if successful and <b>FALSE</b> if it fails or not positioned on
     * Attribute when this method is called.
     * @since 5.1.2
     */
    #[TentativeType]
    public function moveToElement(): bool {}

    /**
     * Position cursor on the first Attribute
     * @link https://php.net/manual/en/xmlreader.movetofirstattribute.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @since 5.1.2
     */
    #[TentativeType]
    public function moveToFirstAttribute(): bool {}

    /**
     * Position cursor on the next Attribute
     * @link https://php.net/manual/en/xmlreader.movetonextattribute.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @since 5.1.2
     */
    #[TentativeType]
    public function moveToNextAttribute(): bool {}

    /**
     * Set the URI containing the XML to parse
     * @link https://php.net/manual/en/xmlreader.open.php
     * @param string $uri <p>
     * URI pointing to the document.
     * </p>
     * @param string $encoding [optional] <p>
     * The document encoding or <b>NULL</b>.
     * </p>
     * @param int $flags [optional] <p>
     * A bitmask of the LIBXML_*
     * constants.
     * </p>
     * @return XMLReader|bool <b>TRUE</b> on success or <b>FALSE</b> on failure. If called statically, returns an
     * <b>XMLReader</b> or <b>FALSE</b> on failure.
     * @since 5.1.2
     */
    public static function open(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $uri,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $encoding = null,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = 0
    ) {}

    /**
     * Move to next node in document
     * @link https://php.net/manual/en/xmlreader.read.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @since 5.1.2
     */
    #[TentativeType]
    public function read(): bool {}

    /**
     * Move cursor to next node skipping all subtrees
     * @link https://php.net/manual/en/xmlreader.next.php
     * @param string $name [optional] <p>
     * The name of the next node to move to.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @since 5.1.2
     */
    #[TentativeType]
    public function next(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $name = null): bool {}

    /**
     * Retrieve XML from current node
     * @link https://php.net/manual/en/xmlreader.readinnerxml.php
     * @return string the contents of the current node as a string. Empty string on failure.
     */
    #[TentativeType]
    public function readInnerXml(): string {}

    /**
     * Retrieve XML from current node, including it self
     * @link https://php.net/manual/en/xmlreader.readouterxml.php
     * @return string the contents of current node, including itself, as a string. Empty string on failure.
     */
    #[TentativeType]
    public function readOuterXml(): string {}

    /**
     * Reads the contents of the current node as a string
     * @link https://php.net/manual/en/xmlreader.readstring.php
     * @return string the content of the current node as a string. Empty string on
     * failure.
     */
    #[TentativeType]
    public function readString(): string {}

    /**
     * Validate document against XSD
     * @link https://php.net/manual/en/xmlreader.setschema.php
     * @param string $filename <p>
     * The filename of the XSD schema.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function setSchema(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $filename): bool {}

    /**
     * Set parser options
     * @link https://php.net/manual/en/xmlreader.setparserproperty.php
     * @param int $property <p>
     * One of the parser option
     * constants.
     * </p>
     * @param bool $value <p>
     * If set to <b>TRUE</b> the option will be enabled otherwise will
     * be disabled.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @since 5.1.2
     */
    #[TentativeType]
    public function setParserProperty(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property,
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $value
    ): bool {}

    /**
     * Set the filename or URI for a RelaxNG Schema
     * @link https://php.net/manual/en/xmlreader.setrelaxngschema.php
     * @param string $filename <p>
     * filename or URI pointing to a RelaxNG Schema.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function setRelaxNGSchema(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $filename): bool {}

    /**
     * Set the data containing a RelaxNG Schema
     * @link https://php.net/manual/en/xmlreader.setrelaxngschemasource.php
     * @param string $source <p>
     * String containing the RelaxNG Schema.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @since 5.1.2
     */
    #[TentativeType]
    public function setRelaxNGSchemaSource(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $source): bool {}

    /**
     * Set the data containing the XML to parse
     * @link https://php.net/manual/en/xmlreader.xml.php
     * @param string $source <p>
     * String containing the XML to be parsed.
     * </p>
     * @param string $encoding [optional] <p>
     * The document encoding or <b>NULL</b>.
     * </p>
     * @param int $flags [optional] <p>
     * A bitmask of the LIBXML_*
     * constants.
     * </p>
     * @return XMLReader|bool <b>TRUE</b> on success or <b>FALSE</b> on failure. If called statically, returns an
     * <b>XMLReader</b> or <b>FALSE</b> on failure.
     * @since 5.1.2
     */
    public static function XML(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $source,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $encoding = null,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = 0
    ) {}

    /**
     * Returns a copy of the current node as a DOM object
     * @link https://php.net/manual/en/xmlreader.expand.php
     * @param null|DOMNode $baseNode [optional]
     * @return DOMNode|false The resulting <b>DOMNode</b> or <b>FALSE</b> on error.
     * @since 5.1.2
     */
    #[TentativeType]
    public function expand(
        #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'DOMNode|null'], default: '')] $baseNode = null
    ): DOMNode|false {}
}
// End of xmlreader v.0.2
<?php

class V8Js
{
    /* Constants */

    public const V8_VERSION = '';
    public const FLAG_NONE = 1;
    public const FLAG_FORCE_ARRAY = 2;
    public const FLAG_PROPAGATE_PHP_EXCEPTIONS = 4;

    /* Methods */

    /**
     * Initializes and starts V8 engine and returns new V8Js object with it's own V8 context.
     * Snapshots are supported by V8 4.3.7 and higher.
     * @param string $object_name
     * @param array $variables
     * @param array $extensions
     * @param bool $report_uncaught_exceptions
     * @param string $snapshot_blob
     */
    public function __construct($object_name = "PHP", array $variables = [], array $extensions = [], $report_uncaught_exceptions = true, $snapshot_blob = null) {}

    /**
     * Provide a function or method to be used to load required modules. This can be any valid PHP callable.
     * The loader function will receive the normalised module path and should return Javascript code to be executed.
     * @param callable $loader
     */
    public function setModuleLoader(callable $loader) {}

    /**
     * Provide a function or method to be used to normalise module paths. This can be any valid PHP callable.
     * This can be used in combination with setModuleLoader to influence normalisation of the module path (which
     * is normally done by V8Js itself but can be overriden this way).
     * The normaliser function will receive the base path of the current module (if any; otherwise an empty string)
     * and the literate string provided to the require method and should return an array of two strings (the new
     * module base path as well as the normalised name).  Both are joined by a '/' and then passed on to the
     * module loader (unless the module was cached before).
     * @param callable $normaliser
     */
    public function setModuleNormaliser(callable $normaliser) {}

    /**
     * Compiles and executes script in object's context with optional identifier string.
     * A time limit (milliseconds) and/or memory limit (bytes) can be provided to restrict execution. These options will throw a V8JsTimeLimitException or V8JsMemoryLimitException.
     * @param string $script
     * @param string $identifier
     * @param int $flags
     * @param int $time_limit in milliseconds
     * @param int $memory_limit in bytes
     * @return mixed
     */
    public function executeString($script, $identifier = '', $flags = V8Js::FLAG_NONE, $time_limit = 0, $memory_limit = 0) {}

    /**
     * Compiles a script in object's context with optional identifier string.
     * @param $script
     * @param string $identifier
     * @return resource
     */
    public function compileString($script, $identifier = '') {}

    /**
     * Executes a precompiled script in object's context.
     * A time limit (milliseconds) and/or memory limit (bytes) can be provided to restrict execution. These options will throw a V8JsTimeLimitException or V8JsMemoryLimitException.
     * @param resource $script
     * @param int $flags
     * @param int $time_limit
     * @param int $memory_limit
     */
    public function executeScript($script, $flags = V8Js::FLAG_NONE, $time_limit = 0, $memory_limit = 0) {}

    /**
     * Set the time limit (in milliseconds) for this V8Js object
     * works similar to the set_time_limit php
     * @param int $limit
     */
    public function setTimeLimit($limit) {}

    /**
     * Set the memory limit (in bytes) for this V8Js object
     * @param int $limit
     */
    public function setMemoryLimit($limit) {}

    /**
     * Set the average object size (in bytes) for this V8Js object.
     * V8's "amount of external memory" is adjusted by this value for every exported object.  V8 triggers a garbage collection once this totals to 192 MB.
     * @param int $average_object_size
     */
    public function setAverageObjectSize($average_object_size) {}

    /**
     * Returns uncaught pending exception or null if there is no pending exception.
     * @return V8JsScriptException|null
     */
    public function getPendingException() {}

    /**
     * Clears the uncaught pending exception
     */
    public function clearPendingException() {}

    /* Static methods */

    /**
     * Registers persistent context independent global Javascript extension.
     * NOTE! These extensions exist until PHP is shutdown and they need to be registered before V8 is initialized.
     * For best performance V8 is initialized only once per process thus this call has to be done before any V8Js objects are created!
     * @param string $extension_name
     * @param string $code
     * @param array $dependencies
     * @param bool $auto_enable
     * @return bool
     */
    public static function registerExtension($extension_name, $code, array $dependencies, $auto_enable = false) {}

    /**
     * Returns extensions successfully registered with V8Js::registerExtension().
     * @return string[]
     */
    public static function getExtensions() {}

    /**
     * Creates a custom V8 heap snapshot with the provided JavaScript source embedded.
     * Snapshots are supported by V8 4.3.7 and higher.  For older versions of V8 this
     * extension doesn't provide this method.
     * @param string $embed_source
     * @return string|false
     */
    public static function createSnapshot($embed_source) {}
}

final class V8JsScriptException extends Exception
{
    /**
     * @return string
     */
    final public function getJsFileName() {}

    /**
     * @return int
     */
    final public function getJsLineNumber() {}

    /**
     * @return int
     */
    final public function getJsStartColumn() {}

    /**
     * @return int
     */
    final public function getJsEndColumn() {}

    /**
     * @return string
     */
    final public function getJsSourceLine() {}

    /**
     * @return string
     */
    final public function getJsTrace() {}
}

final class V8JsTimeLimitException extends Exception {}

final class V8JsMemoryLimitException extends Exception {}
<?php

// Start of ZendUtils v.

function zem_get_extension_info_by_id() {}

function zem_get_extension_info_by_name() {}

function zem_get_extensions_info() {}

function zem_get_license_info() {}

function zend_is_configuration_changed() {}

function zend_set_configuration_changed() {}

// End of ZendUtils v.
<?php

// Start of fileinfo v.1.0.5

use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;

class finfo
{
    /**
     * @param int $flags [optional]
     * @param string $magic_database [optional]
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $magic_database
    ) {}

    /**
     * @param $options [optional]
     * @param $arg [optional]
     */
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')]
    public function finfo($options, $arg) {}

    /**
     * (PHP &gt;= 5.3.0, PECL fileinfo &gt;= 0.1.0)<br/>
     * Set libmagic configuration options
     * @link https://php.net/manual/en/function.finfo-set-flags.php
     * @param int $flags <p>
     * One or disjunction of more Fileinfo
     * constants.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function set_flags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags) {}

    /**
     * (PHP &gt;= 5.3.0, PECL fileinfo &gt;= 0.1.0)<br/>
     * Return information about a file
     * @link https://php.net/manual/en/function.finfo-file.php
     * @param string $filename <p>
     * Name of a file to be checked.
     * </p>
     * @param int $flags [optional] <p>
     * One or disjunction of more Fileinfo
     * constants.
     * </p>
     * @param resource $context [optional] <p>
     * For a description of contexts, refer to .
     * </p>
     * @return string a textual description of the contents of the
     * <i>filename</i> argument, or <b>FALSE</b> if an error occurred.
     */
    #[Pure]
    #[TentativeType]
    public function file(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FILEINFO_NONE,
        $context = null
    ): string|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL fileinfo &gt;= 0.1.0)<br/>
     * Return information about a string buffer
     * @link https://php.net/manual/en/function.finfo-buffer.php
     * @param string $string <p>
     * Content of a file to be checked.
     * </p>
     * @param int $flags [optional] <p>
     * One or disjunction of more Fileinfo
     * constants.
     * </p>
     * @param resource $context [optional]
     * @return string a textual description of the <i>string</i>
     * argument, or <b>FALSE</b> if an error occurred.
     */
    #[Pure]
    #[TentativeType]
    public function buffer(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FILEINFO_NONE,
        $context = null
    ): string|false {}
}

/**
 * (PHP &gt;= 5.3.0, PECL fileinfo &gt;= 0.1.0)<br/>
 * Create a new fileinfo resource
 * @link https://php.net/manual/en/function.finfo-open.php
 * @param int $flags <p>
 * One or disjunction of more Fileinfo
 * constants.
 * </p>
 * @param string|null $magic_database [optional] <p>
 * Name of a magic database file, usually something like
 * /path/to/magic.mime. If not specified,
 * the MAGIC environment variable is used. If this variable
 * is not set either, /usr/share/misc/magic is used by default.
 * A .mime and/or .mgc suffix is added if
 * needed.
 * </p>
 * @return resource|false a magic database resource on success or <b>FALSE</b> on failure.
 */
#[LanguageLevelTypeAware(['8.1' => 'finfo|false'], default: 'resource|false')]
function finfo_open(int $flags = 0, ?string $magic_database = null) {}

/**
 * (PHP &gt;= 5.3.0, PECL fileinfo &gt;= 0.1.0)<br/>
 * Close fileinfo resource
 * @link https://php.net/manual/en/function.finfo-close.php
 * @param resource $finfo <p>
 * Fileinfo resource returned by finfo_open.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function finfo_close(#[LanguageLevelTypeAware(['8.1' => 'finfo'], default: 'resource')] $finfo): bool {}

/**
 * (PHP &gt;= 5.3.0, PECL fileinfo &gt;= 0.1.0)<br/>
 * Set libmagic configuration options
 * @link https://php.net/manual/en/function.finfo-set-flags.php
 * @param resource $finfo <p>
 * Fileinfo resource returned by finfo_open.
 * </p>
 * @param int $flags <p>
 * One or disjunction of more Fileinfo
 * constants.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function finfo_set_flags(#[LanguageLevelTypeAware(['8.1' => 'finfo'], default: 'resource')] $finfo, int $flags): bool {}

/**
 * (PHP &gt;= 5.3.0, PECL fileinfo &gt;= 0.1.0)<br/>
 * Return information about a file
 * @link https://php.net/manual/en/function.finfo-file.php
 * @param resource $finfo <p>
 * Fileinfo resource returned by finfo_open.
 * </p>
 * @param string $filename <p>
 * Name of a file to be checked.
 * </p>
 * @param int $flags <p>
 * One or disjunction of more Fileinfo
 * constants.
 * </p>
 * @param resource $context [optional] <p>
 * For a description of contexts, refer to .
 * </p>
 * @return string|false a textual description of the contents of the
 * <i>filename</i> argument, or <b>FALSE</b> if an error occurred.
 */
function finfo_file(#[LanguageLevelTypeAware(['8.1' => 'finfo'], default: 'resource')] $finfo, string $filename, int $flags = 0, $context): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL fileinfo &gt;= 0.1.0)<br/>
 * Return information about a string buffer
 * @link https://php.net/manual/en/function.finfo-buffer.php
 * @param resource $finfo <p>
 * Fileinfo resource returned by finfo_open.
 * </p>
 * @param string $string <p>
 * Content of a file to be checked.
 * </p>
 * @param int $flags [optional] One or disjunction of more
 * <a href="https://php.net/manual/en/fileinfo.constants.php">Fileinfo</a> constants.
 * @param resource $context [optional]
 * @return string|false a textual description of the <i>string</i>
 * argument, or <b>FALSE</b> if an error occurred.
 */
function finfo_buffer(#[LanguageLevelTypeAware(['8.1' => 'finfo'], default: 'resource')] $finfo, string $string, int $flags = FILEINFO_NONE, $context): string|false {}

/**
 * Detect MIME Content-type for a file
 * @link https://php.net/manual/en/function.mime-content-type.php
 * @param string $filename <p>
 * Path to the tested file.
 * </p>
 * @return string|false the content type in MIME format, like
 * text/plain or application/octet-stream.
 */
function mime_content_type($filename): string|false {}

/**
 * No special handling.
 * @link https://php.net/manual/en/fileinfo.constants.php
 */
define('FILEINFO_NONE', 0);

/**
 * Follow symlinks.
 * @link https://php.net/manual/en/fileinfo.constants.php
 */
define('FILEINFO_SYMLINK', 2);

/**
 * Return the mime type and mime encoding as defined by RFC 2045.
 * @link https://php.net/manual/en/fileinfo.constants.php
 */
define('FILEINFO_MIME', 1040);

/**
 * Return the mime type.
 * @link https://php.net/manual/en/fileinfo.constants.php
 */
define('FILEINFO_MIME_TYPE', 16);

/**
 * Return the mime encoding of the file.
 * @link https://php.net/manual/en/fileinfo.constants.php
 */
define('FILEINFO_MIME_ENCODING', 1024);

/**
 * Look at the contents of blocks or character special devices.
 * @link https://php.net/manual/en/fileinfo.constants.php
 */
define('FILEINFO_DEVICES', 8);

/**
 * Return all matches, not just the first.
 * @link https://php.net/manual/en/fileinfo.constants.php
 */
define('FILEINFO_CONTINUE', 32);

/**
 * If possible preserve the original access time.
 * @link https://php.net/manual/en/fileinfo.constants.php
 */
define('FILEINFO_PRESERVE_ATIME', 128);

/**
 * Don't translate unprintable characters to a \ooo octal
 * representation.
 * @link https://php.net/manual/en/fileinfo.constants.php
 */
define('FILEINFO_RAW', 256);

/**
 * Returns the file extension appropriate for a the MIME type detected in the file.
 * For types that commonly have multiple file extensions, such as JPEG images, then the return value is multiple extensions speparated by a forward slash e.g.: "jpeg/jpg/jpe/jfif".
 * For unknown types not available in the magic.mime database, then return value is "???". Available since PHP 7.2.0.
 * @since 7.2
 */
define('FILEINFO_EXTENSION', 2097152);

/**
 * @since 8.2
 */
define('FILEINFO_APPLE', 2048);

// End of fileinfo v.1.0.5
<?php

// Start of enchant v.1.1.0
use JetBrains\PhpStorm\Deprecated;

/**
 * (PHP 5 &gt;= 5.3.0, PECL enchant &gt;= 0.1.0 )<br/>
 * create a new broker object capable of requesting
 * @link https://php.net/manual/en/function.enchant-broker-init.php
 * @return resource|false|EnchantBroker a broker resource on success or <b>FALSE</b>.
 */
function enchant_broker_init() {}

/**
 * Free the broker resource and its dictionaries
 * @link https://php.net/manual/en/function.enchant-broker-free.php
 * @param resource|EnchantBroker $broker <p>
 * Broker resource
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * @since 5.3
 */
#[Deprecated(reason: "Unset the object instead", since: '8.0')]
function enchant_broker_free($broker) {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL enchant &gt;= 0.1.0 )<br/>
 * Returns the last error of the broker
 * @link https://php.net/manual/en/function.enchant-broker-get-error.php
 * @param resource|EnchantBroker $broker <p>
 * Broker resource.
 * </p>
 * @return string|false Return the msg string if an error was found or <b>FALSE</b>
 */
function enchant_broker_get_error($broker) {}

/**
 * Set the directory path for a given backend
 * @link https://www.php.net/manual/en/function.enchant-broker-set-dict-path.php
 * @param resource|EnchantBroker $broker
 * @param int $dict_type
 * @param string $value
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
#[Deprecated(since: '8.0', reason: 'Relying on this function is highly discouraged.')]
function enchant_broker_set_dict_path($broker, int $dict_type, string $value) {}

/**
 * Get the directory path for a given backend
 * @link https://www.php.net/manual/en/function.enchant-broker-get-dict-path.php
 * @param resource|EnchantBroker $broker
 * @param int $dict_type
 * @return string|false
 */
#[Deprecated(since: '8.0', reason: 'Relying on this function is highly discouraged.')]
function enchant_broker_get_dict_path($broker, $dict_type) {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL enchant &gt;= 1.0.1)<br/>
 * Returns a list of available dictionaries
 * @link https://php.net/manual/en/function.enchant-broker-list-dicts.php
 * @param resource|EnchantBroker $broker <p>
 * Broker resource
 * </p>
 * @return array Returns an array of available dictionaries with their details.
 */
function enchant_broker_list_dicts($broker) {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL enchant &gt;= 0.1.0 )<br/>
 * create a new dictionary using a tag
 * @link https://php.net/manual/en/function.enchant-broker-request-dict.php
 * @param resource|EnchantBroker $broker <p>
 * Broker resource
 * </p>
 * @param string $tag <p>
 * A tag describing the locale, for example en_US, de_DE
 * </p>
 * @return resource|false|EnchantDictionary a dictionary resource on success or <b>FALSE</b> on failure.
 */
function enchant_broker_request_dict($broker, $tag) {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL enchant &gt;= 0.1.0 )<br/>
 * creates a dictionary using a PWL file
 * @link https://php.net/manual/en/function.enchant-broker-request-pwl-dict.php
 * @param resource|EnchantBroker $broker <p>
 * Broker resource
 * </p>
 * @param string $filename <p>
 * Path to the PWL file.
 * </p>
 * @return resource|false|EnchantDictionary a dictionary resource on success or <b>FALSE</b> on failure.
 */
function enchant_broker_request_pwl_dict($broker, $filename) {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL enchant &gt;= 0.1.0 )<br/>
 * Free a dictionary resource
 * @link https://php.net/manual/en/function.enchant-broker-free-dict.php
 * @param resource|EnchantDictionary $dict <p>
 * Dictionary resource.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
#[Deprecated("Unset the object instead", since: '8.0')]
function enchant_broker_free_dict($dict) {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL enchant &gt;= 0.1.0 )<br/>
 * Whether a dictionary exists or not. Using non-empty tag
 * @link https://php.net/manual/en/function.enchant-broker-dict-exists.php
 * @param resource|EnchantBroker $broker <p>
 * Broker resource
 * </p>
 * @param string $tag <p>
 * non-empty tag in the LOCALE format, ex: us_US, ch_DE, etc.
 * </p>
 * @return bool <b>TRUE</b> when the tag exist or <b>FALSE</b> when not.
 */
function enchant_broker_dict_exists($broker, $tag) {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL enchant &gt;= 0.1.0 )<br/>
 * Declares a preference of dictionaries to use for the language
 * @link https://php.net/manual/en/function.enchant-broker-set-ordering.php
 * @param resource|EnchantBroker $broker <p>
 * Broker resource
 * </p>
 * @param string $tag <p>
 * Language tag. The special "*" tag can be used as a language tag
 * to declare a default ordering for any language that does not
 * explicitly declare an ordering.
 * </p>
 * @param string $ordering <p>
 * Comma delimited list of provider names
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function enchant_broker_set_ordering($broker, $tag, $ordering) {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL enchant &gt;= 0.1.0)<br/>
 * Enumerates the Enchant providers
 * @link https://php.net/manual/en/function.enchant-broker-describe.php
 * @param resource|EnchantBroker $broker <p>
 * Broker resource
 * </p>
 * @return array|false
 */
function enchant_broker_describe($broker) {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL enchant &gt;= 0.1.0 )<br/>
 * Check whether a word is correctly spelled or not
 * @link https://php.net/manual/en/function.enchant-dict-check.php
 * @param resource|EnchantDictionary $dict <p>
 * Dictionary resource
 * </p>
 * @param string $word <p>
 * The word to check
 * </p>
 * @return bool <b>TRUE</b> if the word is spelled correctly, <b>FALSE</b> if not.
 */
function enchant_dict_check($dict, $word) {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL enchant &gt;= 0.1.0 )<br/>
 * Will return a list of values if any of those pre-conditions are not met
 * @link https://php.net/manual/en/function.enchant-dict-suggest.php
 * @param resource|EnchantDictionary $dict <p>
 * Dictionary resource
 * </p>
 * @param string $word <p>
 * Word to use for the suggestions.
 * </p>
 * @return array|false Will returns an array of suggestions if the word is bad spelled.
 */
function enchant_dict_suggest($dict, $word) {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL enchant &gt;= 0.1.0 )<br/>
 * add a word to personal word list
 * @link https://php.net/manual/en/function.enchant-dict-add-to-personal.php
 * @param resource $dict <p>
 * Dictionary resource
 * </p>
 * @param string $word <p>
 * The word to add
 * </p>
 * @return void
 * @see enchant_dict_add()
 */
#[Deprecated(
    reason: 'Use enchant_dict_add instead',
    replacement: 'enchant_dict_add(%parameter0%, %parameter1%)',
    since: '8.0'
)]
function enchant_dict_add_to_personal($dict, $word) {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL enchant &gt;= 0.1.0 )<br/>
 * add 'word' to this spell-checking session
 * @link https://php.net/manual/en/function.enchant-dict-add-to-session.php
 * @param resource|EnchantDictionary $dict <p>
 * Dictionary resource
 * </p>
 * @param string $word <p>
 * The word to add
 * </p>
 * @return void
 */
function enchant_dict_add_to_session($dict, $word) {}

/**
 * (PHP 8)<br/>
 * Add a word to personal word list
 * @link https://php.net/manual/en/function.enchant-dict-add.php
 * @param EnchantDictionary $dictionary <p>
 * An Enchant dictionary returned by enchant_broker_request_dict() or enchant_broker_request_pwl_dict().
 * </p>
 * @param string $word <p>
 * The word to add
 * </p>
 * @return void
 * @since 8.0
 */
function enchant_dict_add($dictionary, $word) {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL enchant &gt;= 0.1.0 )<br/>
 * whether or not 'word' exists in this spelling-session
 * @link https://php.net/manual/en/function.enchant-dict-is-in-session.php
 * @param resource $dict <p>
 * Dictionary resource
 * </p>
 * @param string $word <p>
 * The word to lookup
 * </p>
 * @return bool <b>TRUE</b> if the word exists or <b>FALSE</b>
 * @see enchant_dict_is_added
 */
#[Deprecated(
    reason: 'Use enchant_dict_is_added instead',
    replacement: 'enchant_dict_is_added(%parameter0%, %parameter1%)',
    since: '8.0'
)]
function enchant_dict_is_in_session($dict, $word) {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL enchant &gt;= 0.1.0 )<br/>
 * Add a correction for a word
 * @link https://php.net/manual/en/function.enchant-dict-store-replacement.php
 * @param resource|EnchantDictionary $dict <p>
 * Dictionary resource
 * </p>
 * @param string $mis <p>
 * The work to fix
 * </p>
 * @param string $cor <p>
 * The correct word
 * </p>
 * @return void
 */
function enchant_dict_store_replacement($dict, $mis, $cor) {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL enchant &gt;= 0.1.0 )<br/>
 * Returns the last error of the current spelling-session
 * @link https://php.net/manual/en/function.enchant-dict-get-error.php
 * @param resource|EnchantDictionary $dict <p>
 * Dictinaray resource
 * </p>
 * @return string|false the error message as string or <b>FALSE</b> if no error occurred.
 */
function enchant_dict_get_error($dict) {}

/**
 * (PHP 8)<br/>
 * Whether or not 'word' exists in this spelling-session
 * @link https://php.net/manual/en/function.enchant-dict-is-added.php
 * @param EnchantDictionary $dictionary <p>
 * An Enchant dictionary returned by enchant_broker_request_dict() or enchant_broker_request_pwl_dict().
 * </p>
 * @param string $word <p>
 * The word to lookup
 * </p>
 * @return bool <b>TRUE</b> if the word exists or <b>FALSE</b>
 * @since 8.0
 */
function enchant_dict_is_added($dictionary, $word) {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL enchant &gt;= 0.1.0 )<br/>
 * Describes an individual dictionary
 * @link https://php.net/manual/en/function.enchant-dict-describe.php
 * @param resource|EnchantDictionary $dict <p>
 * Dictionary resource
 * </p>
 * @return array Returns the details of the dictionary.
 */
function enchant_dict_describe($dict) {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL enchant:0.2.0-1.0.1)<br/>
 * Check the word is correctly spelled and provide suggestions
 * @link https://php.net/manual/en/function.enchant-dict-quick-check.php
 * @param resource|EnchantDictionary $dict <p>
 * Dictionary resource
 * </p>
 * @param string $word <p>
 * The word to check
 * </p>
 * @param null|array &$suggestions [optional] <p>
 * If the word is not correctly spelled, this variable will
 * contain an array of suggestions.
 * </p>
 * @return bool <b>TRUE</b> if the word is correctly spelled or <b>FALSE</b>
 */
function enchant_dict_quick_check($dict, $word, ?array &$suggestions = null) {}

/**
 * @deprecated 8.0
 */
define('ENCHANT_MYSPELL', 1);
/**
 * @deprecated 8.0
 */
define('ENCHANT_ISPELL', 2);

final class EnchantBroker {}

final class EnchantDictionary {}
// End of enchant v.1.1.0
<?php

// PECL stats stubs for PhpStorm
// https://pecl.php.net/package/stats
// https://www.php.net/manual/en/book.stats.php

// by @yoosefi

/**
 * Returns the absolute deviation of the values in a, or FALSE if a is empty or is not an array.
 *
 * @link https://www.php.net/manual/en/function.stats-absolute-deviation.php
 * @param array $a
 * @return float|false
 */
function stats_absolute_deviation(array $a) {}

/**
 * Returns CDF, x, alpha, or beta, determined by which.
 *
 * @link https://www.php.net/manual/en/function.stats-cdf-beta.php
 * @param float $par1
 * @param float $par2
 * @param float $par3
 * @param int $which
 * @return float
 */
function stats_cdf_beta(float $par1, float $par2, float $par3, int $which): float {}

/**
 * Returns CDF, x, n, or p, determined by which.
 *
 * @link https://www.php.net/manual/en/function.stats-cdf-binomial.php
 * @param float $par1
 * @param float $par2
 * @param float $par3
 * @param int $which
 * @return float
 */
function stats_cdf_binomial(float $par1, float $par2, float $par3, int $which): float {}

/**
 * Returns CDF, x, x0, or gamma, determined by which.
 *
 * @link https://www.php.net/manual/en/function.stats-cdf-cauchy.php
 * @param float $par1
 * @param float $par2
 * @param float $par3
 * @param int $which
 * @return float
 */
function stats_cdf_cauchy(float $par1, float $par2, float $par3, int $which): float {}

/**
 * Returns CDF, x, or k, determined by which.
 *
 * @link https://www.php.net/manual/en/function.stats-cdf-chisquare.php
 * @param float $par1
 * @param float $par2
 * @param int $which
 * @return float
 */
function stats_cdf_chisquare(float $par1, float $par2, int $which): float {}

/**
 * Returns CDF, x, or lambda, determined by which.
 *
 * @link https://www.php.net/manual/en/function.stats-cdf-exponential.php
 * @param float $par1
 * @param float $par2
 * @param int $which
 * @return float
 */
function stats_cdf_exponential(float $par1, float $par2, int $which): float {}

/**
 * Returns CDF, x, d1, or d2, determined by which.
 *
 * @link https://www.php.net/manual/en/function.stats-cdf-f.php
 * @param float $par1
 * @param float $par2
 * @param float $par3
 * @param int $which
 * @return float
 */
function stats_cdf_f(float $par1, float $par2, float $par3, int $which): float {}

/**
 * Returns CDF, x, k, or theta, determined by which.
 *
 * @link https://www.php.net/manual/en/function.stats-cdf-gamma.php
 * @param float $par1
 * @param float $par2
 * @param float $par3
 * @param int $which
 * @return float
 */
function stats_cdf_gamma(float $par1, float $par2, float $par3, int $which): float {}

/**
 * Returns CDF, x, mu, or b, determined by which.
 *
 * @link https://www.php.net/manual/en/function.stats-cdf-laplace.php
 * @param float $par1
 * @param float $par2
 * @param float $par3
 * @param int $which
 * @return float
 */
function stats_cdf_laplace(float $par1, float $par2, float $par3, int $which): float {}

/**
 * Returns CDF, x, mu, or s, determined by which.
 *
 * @link https://www.php.net/manual/en/function.stats-cdf-logistic.php
 * @param float $par1
 * @param float $par2
 * @param float $par3
 * @param int $which
 * @return float
 */
function stats_cdf_logistic(float $par1, float $par2, float $par3, int $which): float {}

/**
 * Returns CDF, x, r, or p, determined by which.
 *
 * @link https://www.php.net/manual/en/function.stats-cdf-negative-binomial.php
 * @param float $par1
 * @param float $par2
 * @param float $par3
 * @param int $which
 * @return float
 */
function stats_cdf_negative_binomial(float $par1, float $par2, float $par3, int $which): float {}

/**
 * Returns CDF, x, k, or lambda, determined by which.
 *
 * @link https://www.php.net/manual/en/function.stats-cdf-noncentral-chisquare.php
 * @param float $par1
 * @param float $par2
 * @param float $par3
 * @param int $which
 * @return float
 */
function stats_cdf_noncentral_chisquare(float $par1, float $par2, float $par3, int $which): float {}

/**
 * Returns CDF, x, nu1, nu2, or lambda, determined by which.
 *
 * @link https://www.php.net/manual/en/function.stats-cdf-noncentral-f.php
 * @param float $par1
 * @param float $par2
 * @param float $par3
 * @param float $par4
 * @param int $which
 * @return float
 */
function stats_cdf_noncentral_f(float $par1, float $par2, float $par3, float $par4, int $which): float {}

/**
 * Returns CDF, x, nu, or mu, determined by which.
 *
 * @link https://www.php.net/manual/en/function.stats-cdf-noncentral-t.php
 * @param float $par1
 * @param float $par2
 * @param float $par3
 * @param int $which
 * @return float
 */
function stats_cdf_noncentral_t(float $par1, float $par2, float $par3, int $which): float {}

/**
 * Returns CDF, x, mu, or sigma, determined by which.
 *
 * @link https://www.php.net/manual/en/function.stats-cdf-normal.php
 * @param float $par1
 * @param float $par2
 * @param float $par3
 * @param int $which
 * @return float
 */
function stats_cdf_normal(float $par1, float $par2, float $par3, int $which): float {}

/**
 * Returns CDF, x, or lambda, determined by which.
 *
 * @link https://www.php.net/manual/en/function.stats-cdf-poisson.php
 * @param float $par1
 * @param float $par2
 * @param int $which
 * @return float
 */
function stats_cdf_poisson(float $par1, float $par2, int $which): float {}

/**
 * Returns CDF, x, or nu, determined by which.
 *
 * @link https://www.php.net/manual/en/function.stats-cdf-t.php
 * @param float $par1
 * @param float $par2
 * @param int $which
 * @return float
 */
function stats_cdf_t(float $par1, float $par2, int $which): float {}

/**
 * Returns CDF, x, a, or b, determined by which.
 *
 * @link https://www.php.net/manual/en/function.stats-cdf-uniform.php
 * @param float $par1
 * @param float $par2
 * @param float $par3
 * @param int $which
 * @return float
 */
function stats_cdf_uniform(float $par1, float $par2, float $par3, int $which): float {}

/**
 * Returns CDF, x, k, or lambda, determined by which.
 *
 * @link https://www.php.net/manual/en/function.stats-cdf-weibull.php
 * @param float $par1
 * @param float $par2
 * @param float $par3
 * @param int $which
 * @return float
 */
function stats_cdf_weibull(float $par1, float $par2, float $par3, int $which): float {}

/**
 * Returns the covariance of a and b, or FALSE on failure.
 *
 * @link https://www.php.net/manual/en/function.stats-covariance.php
 * @param array $a
 * @param array $b
 * @return float|false
 */
function stats_covariance(array $a, array $b) {}

/**
 * The probability density at x or FALSE for failure.
 *
 * @link https://www.php.net/manual/en/function.stats-dens-beta.php
 * @param float $x
 * @param float $a
 * @param float $b
 * @return float|false
 */
function stats_dens_beta(float $x, float $a, float $b) {}

/**
 * The probability density at x or FALSE for failure.
 *
 * @link https://www.php.net/manual/en/function.stats-dens-cauchy.php
 * @param float $x
 * @param float $ave
 * @param float $stdev
 * @return float|false
 */
function stats_dens_cauchy(float $x, float $ave, float $stdev) {}

/**
 * The probability density at x or FALSE for failure.
 *
 * @link https://www.php.net/manual/en/function.stats-dens-chisquare.php
 * @param float $x
 * @param float $dfr
 * @return float|false
 */
function stats_dens_chisquare(float $x, float $dfr) {}

/**
 * The probability density at x or FALSE for failure.
 *
 * @link https://www.php.net/manual/en/function.stats-dens-exponential.php
 * @param float $x
 * @param float $scale
 * @return float|false
 */
function stats_dens_exponential(float $x, float $scale) {}

/**
 * The probability density at x or FALSE for failure.
 *
 * @link https://www.php.net/manual/en/function.stats-dens-f.php
 * @param float $x
 * @param float $dfr1
 * @param float $dfr2
 * @return float|false
 */
function stats_dens_f(float $x, float $dfr1, float $dfr2) {}

/**
 * The probability density at x or FALSE for failure.
 *
 * @link https://www.php.net/manual/en/function.stats-dens-gamma.php
 * @param float $x
 * @param float $shape
 * @param float $scale
 * @return float|false
 */
function stats_dens_gamma(float $x, float $shape, float $scale) {}

/**
 * The probability density at x or FALSE for failure.
 *
 * @link https://www.php.net/manual/en/function.stats-dens-laplace.php
 * @param float $x
 * @param float $ave
 * @param float $stdev
 * @return float|false
 */
function stats_dens_laplace(float $x, float $ave, float $stdev) {}

/**
 * The probability density at x or FALSE for failure.
 *
 * @link https://www.php.net/manual/en/function.stats-dens-logistic.php
 * @param float $x
 * @param float $ave
 * @param float $stdev
 * @return float|false
 */
function stats_dens_logistic(float $x, float $ave, float $stdev) {}

/**
 * The probability density at x or FALSE for failure.
 *
 * @link https://www.php.net/manual/en/function.stats-dens-normal.php
 * @param float $x
 * @param float $ave
 * @param float $stdev
 * @return float|false
 */
function stats_dens_normal(float $x, float $ave, float $stdev) {}

/**
 * The probability mass at x or FALSE for failure.
 *
 * @link https://www.php.net/manual/en/function.stats-dens-pmf-binomial.php
 * @param float $x
 * @param float $n
 * @param float $pi
 * @return float|false
 */
function stats_dens_pmf_binomial(float $x, float $n, float $pi) {}

/**
 * The probability mass at n1 or FALSE for failure.
 *
 * @link https://www.php.net/manual/en/function.stats-dens-pmf-hypergeometric.php
 * @param float $n1
 * @param float $n2
 * @param float $N1
 * @param float $N2
 * @return float|false
 */
function stats_dens_pmf_hypergeometric(float $n1, float $n2, float $N1, float $N2) {}

/**
 * The probability mass at x or FALSE for failure.
 *
 * @link https://www.php.net/manual/en/function.stats-dens-pmf-negative-binomial.php
 * @param float $x
 * @param float $n
 * @param float $pi
 * @return float|false
 */
function stats_dens_pmf_negative_binomial(float $x, float $n, float $pi) {}

/**
 * The probability mass at x or FALSE for failure.
 *
 * @link https://www.php.net/manual/en/function.stats-dens-pmf-poisson.php
 * @param float $x
 * @param float $lb
 * @return float|false
 */
function stats_dens_pmf_poisson(float $x, float $lb) {}

/**
 * The probability density at x or FALSE for failure.
 *
 * @link https://www.php.net/manual/en/function.stats-dens-t.php
 * @param float $x
 * @param float $dfr
 * @return float|false
 */
function stats_dens_t(float $x, float $dfr) {}

/**
 * The probability density at x or FALSE for failure.
 *
 * @link https://www.php.net/manual/en/function.stats-dens-uniform.php
 * @param float $x
 * @param float $a
 * @param float $b
 * @return float|false
 */
function stats_dens_uniform(float $x, float $a, float $b) {}

/**
 * The probability density at x or FALSE for failure.
 *
 * @link https://www.php.net/manual/en/function.stats-dens-weibull.php
 * @param float $x
 * @param float $a
 * @param float $b
 * @return float|false
 */
function stats_dens_weibull(float $x, float $a, float $b) {}

/**
 * Returns the harmonic mean of the values in a, or FALSE if a is empty or is not an array.
 *
 * @link https://www.php.net/manual/en/function.stats-harmonic-mean.php
 * @param array $a
 * @return number|false
 */
function stats_harmonic_mean(array $a) {}

/**
 * Returns the kurtosis of the values in a, or FALSE if a is empty or is not an array.
 *
 * @link https://www.php.net/manual/en/function.stats-kurtosis.php
 * @param array $a
 * @return float|false
 */
function stats_kurtosis(array $a) {}

/**
 * A random deviate
 *
 * @link https://www.php.net/manual/en/function.stats-rand-gen-beta.php
 * @param float $a
 * @param float $b
 * @return float
 */
function stats_rand_gen_beta(float $a, float $b): float {}

/**
 * A random deviate
 *
 * @link https://www.php.net/manual/en/function.stats-rand-gen-chisquare.php
 * @param float $df
 * @return float
 */
function stats_rand_gen_chisquare(float $df): float {}

/**
 * A random deviate
 *
 * @link https://www.php.net/manual/en/function.stats-rand-gen-exponential.php
 * @param float $av
 * @return float
 */
function stats_rand_gen_exponential(float $av): float {}

/**
 * A random deviate
 *
 * @link https://www.php.net/manual/en/function.stats-rand-gen-f.php
 * @param float $dfn
 * @param float $dfd
 * @return float
 */
function stats_rand_gen_f(float $dfn, float $dfd): float {}

/**
 * A random deviate
 *
 * @link https://www.php.net/manual/en/function.stats-rand-gen-funiform.php
 * @param float $low
 * @param float $high
 * @return float
 */
function stats_rand_gen_funiform(float $low, float $high): float {}

/**
 * A random deviate
 *
 * @link https://www.php.net/manual/en/function.stats-rand-gen-gamma.php
 * @param float $a
 * @param float $r
 * @return float
 */
function stats_rand_gen_gamma(float $a, float $r): float {}

/**
 * A random deviate, which is the number of failure.
 *
 * @link https://www.php.net/manual/en/function.stats-rand-gen-ibinomial-negative.php
 * @param int $n
 * @param float $p
 * @return int
 */
function stats_rand_gen_ibinomial_negative(int $n, float $p): int {}

/**
 * A random deviate
 *
 * @link https://www.php.net/manual/en/function.stats-rand-gen-ibinomial.php
 * @param int $n
 * @param float $pp
 * @return int
 */
function stats_rand_gen_ibinomial(int $n, float $pp): int {}

/**
 * A random integer
 *
 * @link https://www.php.net/manual/en/function.stats-rand-gen-int.php
 * @return int
 */
function stats_rand_gen_int(): int {}

/**
 * A random deviate
 *
 * @link https://www.php.net/manual/en/function.stats-rand-gen-ipoisson.php
 * @param float $mu
 * @return int
 */
function stats_rand_gen_ipoisson(float $mu): int {}

/**
 * A random integer
 *
 * @link https://www.php.net/manual/en/function.stats-rand-gen-iuniform.php
 * @param int $low
 * @param int $high
 * @return int
 */
function stats_rand_gen_iuniform(int $low, int $high): int {}

/**
 * A random deviate
 *
 * @link https://www.php.net/manual/en/function.stats-rand-gen-noncentral-f.php
 * @param float $dfn
 * @param float $dfd
 * @param float $xnonc
 * @return float
 */
function stats_rand_gen_noncentral_f(float $dfn, float $dfd, float $xnonc): float {}

/**
 * A random deviate
 *
 * @link https://www.php.net/manual/en/function.stats-rand-gen-noncentral-t.php
 * @param float $df
 * @param float $xnonc
 * @return float
 */
function stats_rand_gen_noncentral_t(float $df, float $xnonc): float {}

/**
 * A random deviate
 *
 * @link https://www.php.net/manual/en/function.stats-rand-gen-normal.php
 * @param float $av
 * @param float $sd
 * @return float
 */
function stats_rand_gen_normal(float $av, float $sd): float {}

/**
 * A random deviate
 *
 * @link https://www.php.net/manual/en/function.stats-rand-gen-t.php
 * @param float $df
 * @return float
 */
function stats_rand_gen_t(float $df): float {}

/**
 * Returns an array of two integers.
 *
 * @link https://www.php.net/manual/en/function.stats-rand-get-seeds.php
 * @return int[]
 */
function stats_rand_get_seeds() {}

/**
 * Returns an array of two integers.
 *
 * @link https://www.php.net/manual/en/function.stats-rand-phrase-to-seeds.php
 * @param string $phrase
 * @return int[]
 */
function stats_rand_phrase_to_seeds(string $phrase) {}

/**
 * A random floating point number
 *
 * @link https://www.php.net/manual/en/function.stats-rand-ranf.php
 * @return float
 */
function stats_rand_ranf(): float {}

/**
 * No values are returned.
 *
 * @link https://www.php.net/manual/en/function.stats-rand-setall.php
 * @param int $iseed1
 * @param int $iseed2
 */
function stats_rand_setall(int $iseed1, int $iseed2): void {}

/**
 * Returns the skewness of the values in a, or FALSE if a is empty or is not an array.
 *
 * @link https://www.php.net/manual/en/function.stats-skew.php
 * @param array $a
 * @return float|false
 */
function stats_skew(array $a) {}

/**
 * Returns the standard deviation on success; FALSE on failure.
 * Raises an E_WARNING when there are fewer than 2 values in a.
 *
 * @link https://www.php.net/manual/en/function.stats-standard-deviation.php
 * @param array $a
 * @param bool $sample
 * @return float|false
 */
function stats_standard_deviation(array $a, bool $sample = false) {}

/**
 * Returns the binomial coefficient
 *
 * @link https://www.php.net/manual/en/function.stats-stat-binomial-coef.php
 * @param int $x
 * @param int $n
 * @return float
 */
function stats_stat_binomial_coef(int $x, int $n): float {}

/**
 * Returns the Pearson correlation coefficient between arr1 and arr2, or FALSE on failure.
 *
 * @link https://www.php.net/manual/en/function.stats-stat-correlation.php
 * @param array $arr1
 * @param array $arr2
 * @return float|false
 */
function stats_stat_correlation(array $arr1, array $arr2) {}

/**
 * The factorial of n.
 *
 * @link https://www.php.net/manual/en/function.stats-stat-factorial.php
 * @param int $n
 * @return float
 */
function stats_stat_factorial(int $n): float {}

/**
 * Returns the t-value, or FALSE if failure.
 *
 * @link https://www.php.net/manual/en/function.stats-stat-independent-t.php
 * @param array $arr1
 * @param array $arr2
 * @return float|false
 */
function stats_stat_independent_t(array $arr1, array $arr2) {}

/**
 * Returns the inner product of arr1 and arr2, or FALSE on failure.
 *
 * @link https://www.php.net/manual/en/function.stats-stat-innerproduct.php
 * @param array $arr1
 * @param array $arr2
 * @return float|false
 */
function stats_stat_innerproduct(array $arr1, array $arr2) {}

/**
 * Returns the t-value, or FALSE if failure.
 *
 * @link https://www.php.net/manual/en/function.stats-stat-paired-t.php
 * @param array $arr1
 * @param array $arr2
 * @return float|false
 */
function stats_stat_paired_t(array $arr1, array $arr2) {}

/**
 * Returns the percentile values of the input array.
 *
 * @link https://www.php.net/manual/en/function.stats-stat-percentile.php
 * @param array $array
 * @param float $perc
 * @return float
 */
function stats_stat_percentile(array $array, float $perc): float {}

/**
 * Returns the power sum of the input array.
 *
 * @link https://www.php.net/manual/en/function.stats-stat-powersum.php
 * @param array $array
 * @param float $power
 * @return float
 */
function stats_stat_powersum(array $array, float $power): float {}

/**
 * Returns the variance on success; FALSE on failure.
 *
 * @link https://www.php.net/manual/en/function.stats-variance.php
 * @param array $a
 * @param bool $sample
 * @return float|false
 */
function stats_variance(array $a, bool $sample = false) {}
<?php

use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Pure;

/**
 * Opens a bzip2 compressed file
 * @link https://php.net/manual/en/function.bzopen.php
 * @param string $file <p>
 * The name of the file to open, or an existing stream resource.
 * </p>
 * @param string $mode <p>
 * Similar to the <b>fopen</b> function, only 'r' (read)
 * and 'w' (write) are supported. Everything else will cause bzopen
 * to return <b>FALSE</b>.
 * </p>
 * @return resource|false If the open fails, <b>bzopen</b> returns <b>FALSE</b>, otherwise
 * it returns a pointer to the newly opened file.
 */
#[Pure]
function bzopen($file, string $mode) {}

/**
 * Binary safe bzip2 file read
 * @link https://php.net/manual/en/function.bzread.php
 * @param resource $bz <p>
 * The file pointer. It must be valid and must point to a file
 * successfully opened by <b>bzopen</b>.
 * </p>
 * @param int<1024, 8192> $length [optional] <p>
 * If not specified, <b>bzread</b> will read 1024
 * (uncompressed) bytes at a time. A maximum of 8192
 * uncompressed bytes will be read at a time.
 * </p>
 * @return string|false the uncompressed data, or <b>FALSE</b> on error.
 */
function bzread($bz, int $length = 1024): string|false {}

/**
 * Binary safe bzip2 file write
 * @link https://php.net/manual/en/function.bzwrite.php
 * @param resource $bz <p>
 * The file pointer. It must be valid and must point to a file
 * successfully opened by <b>bzopen</b>.
 * </p>
 * @param string $data <p>
 * The written data.
 * </p>
 * @param int|null $length [optional] <p>
 * If supplied, writing will stop after <i>length</i>
 * (uncompressed) bytes have been written or the end of
 * <i>data</i> is reached, whichever comes first.
 * </p>
 * @return int|false the number of bytes written, or <b>FALSE</b> on error.
 */
function bzwrite($bz, string $data, ?int $length): int|false {}

/**
 * Force a write of all buffered data
 * @link https://php.net/manual/en/function.bzflush.php
 * @param resource $bz <p>
 * The file pointer. It must be valid and must point to a file
 * successfully opened by <b>bzopen</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function bzflush($bz): bool {}

/**
 * Close a bzip2 file
 * @link https://php.net/manual/en/function.bzclose.php
 * @param resource $bz <p>
 * The file pointer. It must be valid and must point to a file
 * successfully opened by <b>bzopen</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function bzclose($bz): bool {}

/**
 * Returns a bzip2 error number
 * @link https://php.net/manual/en/function.bzerrno.php
 * @param resource $bz <p>
 * The file pointer. It must be valid and must point to a file
 * successfully opened by <b>bzopen</b>.
 * </p>
 * @return int the error number as an integer.
 */
#[Pure]
#[LanguageLevelTypeAware(['8.1' => 'int', '8.0' => 'int|false'], default: 'int')]
function bzerrno($bz) {}

/**
 * Returns a bzip2 error string
 * @link https://php.net/manual/en/function.bzerrstr.php
 * @param resource $bz <p>
 * The file pointer. It must be valid and must point to a file
 * successfully opened by <b>bzopen</b>.
 * </p>
 * @return string a string containing the error message.
 */
#[Pure]
#[LanguageLevelTypeAware(['8.1' => 'string', '8.0' => 'string|false'], default: 'string')]
function bzerrstr($bz) {}

/**
 * Returns the bzip2 error number and error string in an array
 * @link https://php.net/manual/en/function.bzerror.php
 * @param resource $bz <p>
 * The file pointer. It must be valid and must point to a file
 * successfully opened by <b>bzopen</b>.
 * </p>
 * @return array an associative array, with the error code in the
 * errno entry, and the error message in the
 * errstr entry.
 */
#[Pure]
#[LanguageLevelTypeAware(['8.1' => 'array', '8.0' => 'array|false'], default: 'array')]
#[ArrayShape(["errno" => "int", "errstr" => "string"])]
function bzerror($bz) {}

/**
 * Compress a string into bzip2 encoded data
 * @link https://php.net/manual/en/function.bzcompress.php
 * @param string $data <p>
 * The string to compress.
 * </p>
 * @param int $block_size <p>
 * Specifies the blocksize used during compression and should be a number
 * from 1 to 9 with 9 giving the best compression, but using more
 * resources to do so.
 * </p>
 * @param int $work_factor [optional] <p>
 * Controls how the compression phase behaves when presented with worst
 * case, highly repetitive, input data. The value can be between 0 and
 * 250 with 0 being a special case.
 * </p>
 * <p>
 * Regardless of the <i>workfactor</i>, the generated
 * output is the same.
 * </p>
 * @return string|int The compressed string, or an error number if an error occurred.
 */
#[Pure]
function bzcompress(
    string $data,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.0')] int $blocksize,
    #[PhpStormStubsElementAvailable(from: '7.1')] int $block_size = 4,
    int $work_factor = 0
): string|int {}

/**
 * Decompresses bzip2 encoded data
 * @link https://php.net/manual/en/function.bzdecompress.php
 * @param string $data <p>
 * The string to decompress.
 * </p>
 * @param bool $use_less_memory [optional] <p>
 * If <b>TRUE</b>, an alternative decompression algorithm will be used which
 * uses less memory (the maximum memory requirement drops to around 2300K)
 * but works at roughly half the speed.
 * </p>
 * <p>
 * See the bzip2 documentation for more
 * information about this feature.
 * </p>
 * @return string|int|false The decompressed string, or an error number if an error occurred.
 */
#[Pure]
function bzdecompress(string $data, bool $use_less_memory = false): string|int|false {}
<?php

// Start of sysvshm v.
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;

/**
 * Creates or open a shared memory segment
 * @link https://php.net/manual/en/function.shm-attach.php
 * @param int $key <p>
 * A numeric shared memory segment ID
 * </p>
 * @param int|null $size [optional] <p>
 * The memory size. If not provided, default to the
 * sysvshm.init_mem in the <i>php.ini</i>, otherwise 10000
 * bytes.
 * </p>
 * @param int $permissions [optional] <p>
 * The optional permission bits. Default to 0666.
 * </p>
 * @return resource|SysvSharedMemory|false a shared memory segment identifier.
 */
#[LanguageLevelTypeAware(["8.0" => "SysvSharedMemory|false"], default: "resource|false")]
function shm_attach(int $key, ?int $size, int $permissions = 0666) {}

/**
 * Removes shared memory from Unix systems
 * @link https://php.net/manual/en/function.shm-remove.php
 * @param SysvSharedMemory $shm <p>
 * The shared memory identifier as returned by
 * <b>shm_attach</b>
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function shm_remove(#[LanguageLevelTypeAware(["8.0" => "SysvSharedMemory"], default: "resource")] $shm): bool {}

/**
 * Disconnects from shared memory segment
 * @link https://php.net/manual/en/function.shm-detach.php
 * @param SysvSharedMemory $shm <p>
 * A shared memory resource handle as returned by
 * <b>shm_attach</b>
 * </p>
 * @return bool <b>shm_detach</b> always returns <b>TRUE</b>.
 */
function shm_detach(#[LanguageLevelTypeAware(["8.0" => "SysvSharedMemory"], default: "resource")] $shm): bool {}

/**
 * Inserts or updates a variable in shared memory
 * @link https://php.net/manual/en/function.shm-put-var.php
 * @param SysvSharedMemory $shm <p>
 * A shared memory resource handle as returned by
 * <b>shm_attach</b>
 * </p>
 * @param int $key <p>
 * The variable key.
 * </p>
 * @param mixed $value <p>
 * The variable. All variable types
 * that <b>serialize</b> supports may be used: generally
 * this means all types except for resources and some internal objects
 * that cannot be serialized.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function shm_put_var(#[LanguageLevelTypeAware(["8.0" => "SysvSharedMemory"], default: "resource")] $shm, int $key, mixed $value): bool {}

/**
 * Check whether a specific entry exists
 * @link https://php.net/manual/en/function.shm-has-var.php
 * @param SysvSharedMemory $shm <p>
 * Shared memory segment, obtained from <b>shm_attach</b>.
 * </p>
 * @param int $key <p>
 * The variable key.
 * </p>
 * @return bool <b>TRUE</b> if the entry exists, otherwise <b>FALSE</b>
 */
function shm_has_var(#[LanguageLevelTypeAware(["8.0" => "SysvSharedMemory"], default: "resource")] $shm, int $key): bool {}

/**
 * Returns a variable from shared memory
 * @link https://php.net/manual/en/function.shm-get-var.php
 * @param SysvSharedMemory $shm <p>
 * Shared memory segment, obtained from <b>shm_attach</b>.
 * </p>
 * @param int $key <p>
 * The variable key.
 * </p>
 * @return mixed the variable with the given key.
 */
function shm_get_var(#[LanguageLevelTypeAware(["8.0" => "SysvSharedMemory"], default: "resource")] $shm, int $key): mixed {}

/**
 * Removes a variable from shared memory
 * @link https://php.net/manual/en/function.shm-remove-var.php
 * @param SysvSharedMemory $shm <p>
 * The shared memory identifier as returned by
 * <b>shm_attach</b>
 * </p>
 * @param int $key <p>
 * The variable key.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function shm_remove_var(#[LanguageLevelTypeAware(["8.0" => "SysvSharedMemory"], default: "resource")] $shm, int $key): bool {}

/**
 * @since 8.0
 */
final class SysvSharedMemory
{
    /**
     * Cannot directly construct SysvSharedMemory, use shm_attach() instead
     * @see shm_attach()
     */
    private function __construct() {}
}

// End of sysvshm v.
<?php

use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Pure;

/**
 * Add two arbitrary precision numbers
 * @link https://php.net/manual/en/function.bcadd.php
 * @param string $num1 <p>
 * The left operand, as a string.
 * </p>
 * @param string $num2 <p>
 * The right operand, as a string.
 * </p>
 * @param int|null $scale <p>
 * This optional parameter is used to set the number of digits after the
 * decimal place in the result. If omitted, it will default to the scale
 * set globally with the {@link bcscale()} function, or fallback to 0 if
 * this has not been set.
 * </p>
 * @return string The sum of the two operands, as a string.
 */
#[Pure]
function bcadd(string $num1, string $num2, ?int $scale = null): string {}

/**
 * Subtract one arbitrary precision number from another
 * @link https://php.net/manual/en/function.bcsub.php
 * @param string $num1 <p>
 * The left operand, as a string.
 * </p>
 * @param string $num2 <p>
 * The right operand, as a string.
 * </p>
 * @param int|null $scale <p>
 * This optional parameter is used to set the number of digits after the
 * decimal place in the result. If omitted, it will default to the scale
 * set globally with the {@link bcscale()} function, or fallback to 0 if
 * this has not been set.
 * </p>
 * @return string The result of the subtraction, as a string.
 */
#[Pure]
function bcsub(string $num1, string $num2, ?int $scale = null): string {}

/**
 * Multiply two arbitrary precision numbers
 * @link https://php.net/manual/en/function.bcmul.php
 * @param string $num1 <p>
 * The left operand, as a string.
 * </p>
 * @param string $num2 <p>
 * The right operand, as a string.
 * </p>
 * @param int|null $scale <p>
 * This optional parameter is used to set the number of digits after the
 * decimal place in the result. If omitted, it will default to the scale
 * set globally with the {@link bcscale()} function, or fallback to 0 if
 * this has not been set.
 * </p>
 * @return string the result as a string.
 */
#[Pure]
function bcmul(string $num1, string $num2, ?int $scale = null): string {}

/**
 * Divide two arbitrary precision numbers
 * @link https://php.net/manual/en/function.bcdiv.php
 * @param string $num1 <p>
 * The dividend, as a string.
 * </p>
 * @param string $num2 <p>
 * The divisor, as a string.
 * </p>
 * @param int|null $scale [optional] <p>
 * This optional parameter is used to set the number of digits after the
 * decimal place in the result. If omitted, it will default to the scale
 * set globally with the {@link bcscale()} function, or fallback to 0 if
 * this has not been set.
 * </p>
 * @return string|null the result of the division as a string, or <b>NULL</b> if
 * <i>divisor</i> is 0.
 */
#[Pure]
#[PhpStormStubsElementAvailable(to: '7.4')]
function bcdiv(string $num1, string $num2, ?int $scale = 0): ?string {}

/**
 * Divide two arbitrary precision numbers
 * @link https://php.net/manual/en/function.bcdiv.php
 * @param string $num1 <p>
 * The dividend, as a string.
 * </p>
 * @param string $num2 <p>
 * The divisor, as a string.
 * </p>
 * @param int|null $scale [optional] <p>
 * This optional parameter is used to set the number of digits after the
 * decimal place in the result. If omitted, it will default to the scale
 * set globally with the {@link bcscale()} function, or fallback to 0 if
 * this has not been set.
 * </p>
 * @return string the result of the division as a string.
 * @throws \DivisionByZeroError if <i>divisor</i> is 0. Available since PHP 8.0.
 */
#[Pure]
#[PhpStormStubsElementAvailable('8.0')]
function bcdiv(string $num1, string $num2, ?int $scale = null): string {}

/**
 * Get modulus of an arbitrary precision number
 * @link https://php.net/manual/en/function.bcmod.php
 * @param string $num1 <p>
 * The dividend, as a string. Since PHP 7.2, the divided is no longer truncated to an integer.
 * </p>
 * @param string $num2 <p>
 * The divisor, as a string. Since PHP 7.2, the divisor is no longer truncated to an integer.
 * </p>
 * @param int|null $scale [optional] <p>
 * This optional parameter is used to set the number of digits after the
 * decimal place in the result. If omitted, it will default to the scale
 * set globally with the {@link bcscale()} function, or fallback to 0 if
 * this has not been set. Available since PHP 7.2.
 * </p>
 * @return string|null the modulus as a string, or <b>NULL</b> if
 * <i>divisor</i> is 0.
 */
#[Pure]
#[PhpStormStubsElementAvailable(to: '7.4')]
function bcmod(string $num1, string $num2, ?int $scale = 0): ?string {}

/**
 * Get modulus of an arbitrary precision number
 * @link https://php.net/manual/en/function.bcmod.php
 * @param string $num1 <p>
 * The dividend, as a string. Since PHP 7.2, the divided is no longer truncated to an integer.
 * </p>
 * @param string $num2 <p>
 * The divisor, as a string. Since PHP 7.2, the divisor is no longer truncated to an integer.
 * </p>
 * @param int|null $scale [optional] <p>
 * This optional parameter is used to set the number of digits after the
 * decimal place in the result. If omitted, it will default to the scale
 * set globally with the {@link bcscale()} function, or fallback to 0 if
 * this has not been set. Available since PHP 7.2.
 * </p>
 * @return string the modulus as a string.
 * @throws \DivisionByZeroError if <i>divisor</i> is 0. Available since PHP 8.0.
 */
#[Pure]
#[PhpStormStubsElementAvailable('8.0')]
function bcmod(string $num1, string $num2, ?int $scale = null): string {}

/**
 * Raise an arbitrary precision number to another
 * @link https://php.net/manual/en/function.bcpow.php
 * @param string $num <p>
 * The base, as a string.
 * </p>
 * @param string $exponent <p>
 * The exponent, as a string. If the exponent is non-integral, it is truncated.
 * The valid range of the exponent is platform specific, but is at least
 * -2147483648 to 2147483647.
 * </p>
 * @param int|null $scale <p>
 * This optional parameter is used to set the number of digits after the
 * decimal place in the result. If omitted, it will default to the scale
 * set globally with the {@link bcscale()} function, or fallback to 0 if
 * this has not been set.
 * </p>
 * @return string the result as a string.
 */
#[Pure]
function bcpow(string $num, string $exponent, ?int $scale = null): string {}

/**
 * Get the square root of an arbitrary precision number
 * @link https://php.net/manual/en/function.bcsqrt.php
 * @param string $num <p>
 * The operand, as a string.
 * </p>
 * @param int|null $scale [optional]
 * @return string|null the square root as a string, or <b>NULL</b> if
 * <i>operand</i> is negative.
 */
#[Pure]
#[LanguageLevelTypeAware(["8.0" => "string"], default: "?string")]
function bcsqrt(string $num, ?int $scale) {}

/**
 * Set default scale parameter for all bc math functions
 * @link https://php.net/manual/en/function.bcscale.php
 * @param int $scale
 * @return int|bool
 */
#[LanguageLevelTypeAware(['7.3' => 'int'], default: 'bool')]
function bcscale(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')] int $scale,
    #[PhpStormStubsElementAvailable(from: '7.3')] #[LanguageLevelTypeAware(['8.0' => 'int|null'], default: 'int')] $scale = null
) {}

/**
 * Compare two arbitrary precision numbers
 * @link https://php.net/manual/en/function.bccomp.php
 * @param string $num1 <p>
 * The left operand, as a string.
 * </p>
 * @param string $num2 <p>
 * The right operand, as a string.
 * </p>
 * @param int|null $scale <p>
 * The optional <i>scale</i> parameter is used to set the
 * number of digits after the decimal place which will be used in the
 * comparison.
 * </p>
 * @return int 0 if the two operands are equal, 1 if the
 * <i>left_operand</i> is larger than the
 * <i>right_operand</i>, -1 otherwise.
 */
#[Pure]
function bccomp(string $num1, string $num2, ?int $scale = null): int {}

/**
 * Raise an arbitrary precision number to another, reduced by a specified modulus
 * @link https://php.net/manual/en/function.bcpowmod.php
 * @param string $num <p>
 * The base, as an integral string (i.e. the scale has to be zero).
 * </p>
 * @param string $exponent <p>
 * The exponent, as an non-negative, integral string (i.e. the scale has to be
 * zero).
 * </p>
 * @param string $modulus <p>
 * The modulus, as an integral string (i.e. the scale has to be zero).
 * </p>
 * @param int|null $scale <p>
 * This optional parameter is used to set the number of digits after the
 * decimal place in the result. If omitted, it will default to the scale
 * set globally with the {@link bcscale()} function, or fallback to 0 if
 * this has not been set.
 * </p>
 * @return string|null the result as a string, or <b>NULL</b> if <i>modulus</i>
 * is 0 or <i>exponent</i> is negative.
 */
#[Pure]
#[LanguageLevelTypeAware(["8.0" => "string"], default: "?string")]
function bcpowmod(string $num, string $exponent, string $modulus, ?int $scale = null) {}
<?php

namespace PgSql;

    /**
     * A fully opaque class which replaces a pgsql result resource as of PHP 8.1.0.
     * @since 8.1
     * @link https://www.php.net/manual/en/class.pgsql-result.php
     */
    final class Result {}

    /**
     * A fully opaque class which replaces a pgsql large object resource as of PHP 8.1.0.
     * @since 8.1
     * @link https://www.php.net/manual/en/class.pgsql-lob.php
     */
    final class Lob {}

    /**
     * A fully opaque class which replaces a pgsql link resource as of PHP 8.1.0.
     * @since 8.1
     * @link https://www.php.net/manual/en/class.pgsql-connection.php
     */
    final class Connection {}
<?php

// Start of pgsql v.
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;

/**
 * Open a PostgreSQL connection
 * @link https://php.net/manual/en/function.pg-connect.php
 * @param string $connection_string <p>
 * The <i>connection_string</i> can be empty to use all default parameters, or it
 * can contain one or more parameter settings separated by whitespace.
 * Each parameter setting is in the form keyword = value. Spaces around
 * the equal sign are optional. To write an empty value or a value
 * containing spaces, surround it with single quotes, e.g., keyword =
 * 'a value'. Single quotes and backslashes within the value must be
 * escaped with a backslash, i.e., \' and \\.
 * </p>
 * <p>
 * The currently recognized parameter keywords are:
 * <i>host</i>, <i>hostaddr</i>, <i>port</i>,
 * <i>dbname</i> (defaults to value of <i>user</i>),
 * <i>user</i>,
 * <i>password</i>, <i>connect_timeout</i>,
 * <i>options</i>, <i>tty</i> (ignored), <i>sslmode</i>,
 * <i>requiressl</i> (deprecated in favor of <i>sslmode</i>), and
 * <i>service</i>. Which of these arguments exist depends
 * on your PostgreSQL version.
 * </p>
 * <p>
 * The <i>options</i> parameter can be used to set command line parameters
 * to be invoked by the server.
 * </p>
 * @param int $flags <p>
 * If <b>PGSQL_CONNECT_FORCE_NEW</b> is passed, then a new connection
 * is created, even if the <i>connection_string</i> is identical to
 * an existing connection.
 * </p>
 * @return resource|false PostgreSQL connection resource on success, <b>FALSE</b> on failure.
 */
#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|false'], default: 'resource|false')]
function pg_connect(
    string $connection_string,
    int $flags = 0,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] string $host = '',
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] string $port = '',
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] string $options = '',
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] string $tty = '',
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] string $dbname = '',
) {}

/**
 * Open a persistent PostgreSQL connection
 * @link https://php.net/manual/en/function.pg-pconnect.php
 * @param string $connection_string <p>
 * The <i>connection_string</i> can be empty to use all default parameters, or it
 * can contain one or more parameter settings separated by whitespace.
 * Each parameter setting is in the form keyword = value. Spaces around
 * the equal sign are optional. To write an empty value or a value
 * containing spaces, surround it with single quotes, e.g., keyword =
 * 'a value'. Single quotes and backslashes within the value must be
 * escaped with a backslash, i.e., \' and \\.
 * </p>
 * <p>
 * The currently recognized parameter keywords are:
 * <i>host</i>, <i>hostaddr</i>, <i>port</i>,
 * <i>dbname</i>, <i>user</i>,
 * <i>password</i>, <i>connect_timeout</i>,
 * <i>options</i>, <i>tty</i> (ignored), <i>sslmode</i>,
 * <i>requiressl</i> (deprecated in favor of <i>sslmode</i>), and
 * <i>service</i>. Which of these arguments exist depends
 * on your PostgreSQL version.
 * </p>
 * @param int $flags <p>
 * If <b>PGSQL_CONNECT_FORCE_NEW</b> is passed, then a new connection
 * is created, even if the <i>connection_string</i> is identical to
 * an existing connection.
 * </p>
 * @return resource|false PostgreSQL connection resource on success, <b>FALSE</b> on failure.
 */
#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|false'], default: 'resource|false')]
function pg_pconnect(
    string $connection_string,
    #[PhpStormStubsElementAvailable(from: '8.0')] int $flags = 0,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] string $host = '',
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] string $port = '',
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] string $options = '',
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] string $tty = '',
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] string $dbname = '',
) {}

/**
 * Closes a PostgreSQL connection
 * @link https://php.net/manual/en/function.pg-close.php
 * @param resource $connection [optional] <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pg_close(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection = null): bool {}

/**
 * Poll the status of an in-progress asynchronous PostgreSQL connection attempt.
 * @link https://php.net/manual/en/function.pg-connect-poll.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource.
 * </p>
 * @return int <b>PGSQL_POLLING_FAILED</b>, <b>PGSQL_POLLING_READING</b>, <b>PGSQL_POLLING_WRITING</b>,
 * <b>PGSQL_POLLING_OK</b>, or <b>PGSQL_POLLING_ACTIVE</b>.
 * @since 5.6
 */
function pg_connect_poll(
    #[PhpStormStubsElementAvailable(from: '5.6', to: '7.4')] $connection = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection
): int {}

/**
 * Get connection status
 * @link https://php.net/manual/en/function.pg-connection-status.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource.
 * </p>
 * @return int <b>PGSQL_CONNECTION_OK</b> or
 * <b>PGSQL_CONNECTION_BAD</b>.
 */
function pg_connection_status(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection): int {}

/**
 * Get connection is busy or not
 * @link https://php.net/manual/en/function.pg-connection-busy.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource.
 * </p>
 * @return bool <b>TRUE</b> if the connection is busy, <b>FALSE</b> otherwise.
 */
function pg_connection_busy(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection): bool {}

/**
 * Reset connection (reconnect)
 * @link https://php.net/manual/en/function.pg-connection-reset.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pg_connection_reset(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection): bool {}

/**
 * Get a read only handle to the socket underlying a PostgreSQL connection
 * @link https://php.net/manual/en/function.pg-socket.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource.
 * </p>
 * @return resource|false A socket resource on success or <b>FALSE</b> on failure.
 * @since 5.6
 */
function pg_socket(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection) {}

/**
 * Returns the host name associated with the connection
 * @link https://php.net/manual/en/function.pg-host.php
 * @param resource $connection [optional] <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @return string|false A string containing the name of the host the
 * <i>connection</i> is to, or <b>FALSE</b> on error.
 */
function pg_host(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection = null): string {}

/**
 * Get the database name
 * @link https://php.net/manual/en/function.pg-dbname.php
 * @param resource $connection [optional] <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @return string|false A string containing the name of the database the
 * <i>connection</i> is to, or <b>FALSE</b> on error.
 */
function pg_dbname(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection = null): string {}

/**
 * Return the port number associated with the connection
 * @link https://php.net/manual/en/function.pg-port.php
 * @param resource $connection [optional] <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @return string A string containing the port number of the database server the connection is to, or empty string on error.
 */
function pg_port(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection = null): string {}

/**
 * Return the TTY name associated with the connection
 * @link https://php.net/manual/en/function.pg-tty.php
 * @param resource $connection [optional] <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @return string A string containing the debug TTY of
 * the <i>connection</i>, or <b>FALSE</b> on error.
 */
function pg_tty(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection = null): string {}

/**
 * Get the options associated with the connection
 * @link https://php.net/manual/en/function.pg-options.php
 * @param resource $connection [optional] <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @return string A string containing the <i>connection</i>
 * options, or <b>FALSE</b> on error.
 */
function pg_options(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection = null): string {}

/**
 * Returns an array with client, protocol and server version (when available)
 * @link https://php.net/manual/en/function.pg-version.php
 * @param resource $connection [optional] <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @return array an array with client, protocol
 * and server keys and values (if available). Returns
 * <b>FALSE</b> on error or invalid connection.
 */
#[ArrayShape(["client" => "string", "protocol" => "int", "server" => "string"])]
function pg_version(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection = null): array {}

/**
 * Ping database connection
 * @link https://php.net/manual/en/function.pg-ping.php
 * @param resource $connection [optional] <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pg_ping(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection = null): bool {}

/**
 * Looks up a current parameter setting of the server.
 * @link https://php.net/manual/en/function.pg-parameter-status.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @param string $name <p>
 * Possible <i>param_name</i> values include server_version,
 * server_encoding, client_encoding,
 * is_superuser, session_authorization,
 * DateStyle, TimeZone, and
 * integer_datetimes.
 * </p>
 * @return string|false A string containing the value of the parameter, <b>FALSE</b> on failure or invalid
 * <i>param_name</i>.
 */
function pg_parameter_status(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection, string $name = null): string|false {}

/**
 * Returns the current in-transaction status of the server.
 * @link https://php.net/manual/en/function.pg-transaction-status.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource.
 * </p>
 * @return int The status can be <b>PGSQL_TRANSACTION_IDLE</b> (currently idle),
 * <b>PGSQL_TRANSACTION_ACTIVE</b> (a command is in progress),
 * <b>PGSQL_TRANSACTION_INTRANS</b> (idle, in a valid transaction block),
 * or <b>PGSQL_TRANSACTION_INERROR</b> (idle, in a failed transaction block).
 * <b>PGSQL_TRANSACTION_UNKNOWN</b> is reported if the connection is bad.
 * <b>PGSQL_TRANSACTION_ACTIVE</b> is reported only when a query
 * has been sent to the server and not yet completed.
 */
function pg_transaction_status(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection): int {}

/**
 * Execute a query
 * @link https://php.net/manual/en/function.pg-query.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @param string $query <p>
 * The SQL statement or statements to be executed. When multiple statements are passed to the function,
 * they are automatically executed as one transaction, unless there are explicit BEGIN/COMMIT commands
 * included in the query string. However, using multiple transactions in one function call is not recommended.
 * </p>
 * <p>
 * String interpolation of user-supplied data is extremely dangerous and is
 * likely to lead to SQL
 * injection vulnerabilities. In most cases
 * <b>pg_query_params</b> should be preferred, passing
 * user-supplied values as parameters rather than substituting them into
 * the query string.
 * </p>
 * <p>
 * Any user-supplied data substituted directly into a query string should
 * be properly escaped.
 * </p>
 * @return resource|false A query result resource on success or <b>FALSE</b> on failure.
 */
#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result|false'], default: 'resource|false')]
function pg_query(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    string $query = null
) {}

/**
 * Submits a command to the server and waits for the result, with the ability to pass parameters separately from the SQL command text.
 * @link https://php.net/manual/en/function.pg-query-params.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @param string $query <p>
 * The parameterized SQL statement. Must contain only a single statement.
 * (multiple statements separated by semi-colons are not allowed.) If any parameters
 * are used, they are referred to as $1, $2, etc.
 * </p>
 * <p>
 * User-supplied values should always be passed as parameters, not
 * interpolated into the query string, where they form possible
 * SQL injection
 * attack vectors and introduce bugs when handling data containing quotes.
 * If for some reason you cannot use a parameter, ensure that interpolated
 * values are properly escaped.
 * </p>
 * @param array $params <p>
 * An array of parameter values to substitute for the $1, $2, etc. placeholders
 * in the original prepared query string. The number of elements in the array
 * must match the number of placeholders.
 * </p>
 * <p>
 * Values intended for bytea fields are not supported as
 * parameters. Use <b>pg_escape_bytea</b> instead, or use the
 * large object functions.
 * </p>
 * @return resource|false A query result resource on success or <b>FALSE</b> on failure.
 */
#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result|false'], default: 'resource|false')]
function pg_query_params(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $query = '',
    #[PhpStormStubsElementAvailable(from: '8.0')] $query,
    array $params = null
) {}

/**
 * Submits a request to create a prepared statement with the
 * given parameters, and waits for completion.
 * @link https://php.net/manual/en/function.pg-prepare.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @param string $statement_name <p>
 * The name to give the prepared statement. Must be unique per-connection. If
 * "" is specified, then an unnamed statement is created, overwriting any
 * previously defined unnamed statement.
 * </p>
 * @param string $query <p>
 * The parameterized SQL statement. Must contain only a single statement.
 * (multiple statements separated by semi-colons are not allowed.) If any parameters
 * are used, they are referred to as $1, $2, etc.
 * </p>
 * @return resource|false A query result resource on success or <b>FALSE</b> on failure.
 */
#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result|false'], default: 'resource|false')]
function pg_prepare(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] string $statement_name = '',
    #[PhpStormStubsElementAvailable(from: '8.0')] string $statement_name,
    string $query = null
) {}

/**
 * Sends a request to execute a prepared statement with given parameters, and waits for the result.
 * @link https://php.net/manual/en/function.pg-execute.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @param string $statement_name <p>
 * The name of the prepared statement to execute. if
 * "" is specified, then the unnamed statement is executed. The name must have
 * been previously prepared using <b>pg_prepare</b>,
 * <b>pg_send_prepare</b> or a PREPARE SQL
 * command.
 * </p>
 * @param array $params <p>
 * An array of parameter values to substitute for the $1, $2, etc. placeholders
 * in the original prepared query string. The number of elements in the array
 * must match the number of placeholders.
 * </p>
 * <p>
 * Elements are converted to strings by calling this function.
 * </p>
 * @return resource|false A query result resource on success or <b>FALSE</b> on failure.
 */
#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result|false'], default: 'resource|false')]
function pg_execute(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] string $statement_name = '',
    #[PhpStormStubsElementAvailable(from: '8.0')] $statement_name,
    array $params = null
) {}

/**
 * Sends asynchronous query
 * @link https://php.net/manual/en/function.pg-send-query.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource.
 * </p>
 * @param string $query <p>
 * The SQL statement or statements to be executed.
 * </p>
 * <p>
 * Data inside the query should be properly escaped.
 * </p>
 * @return int|bool <b>TRUE</b> on success or <b>FALSE</b> on failure.</p>
 * <p>
 * Use <b>pg_get_result</b> to determine the query result.
 */
function pg_send_query(
    #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    string $query
): int|bool {}

/**
 * Submits a command and separate parameters to the server without waiting for the result(s).
 * @link https://php.net/manual/en/function.pg-send-query-params.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource.
 * </p>
 * @param string $query <p>
 * The parameterized SQL statement. Must contain only a single statement.
 * (multiple statements separated by semi-colons are not allowed.) If any parameters
 * are used, they are referred to as $1, $2, etc.
 * </p>
 * @param array $params <p>
 * An array of parameter values to substitute for the $1, $2, etc. placeholders
 * in the original prepared query string. The number of elements in the array
 * must match the number of placeholders.
 * </p>
 * @return int|bool <b>TRUE</b> on success or <b>FALSE</b> on failure.</p>
 * <p>
 * Use <b>pg_get_result</b> to determine the query result.
 */
function pg_send_query_params(
    #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    string $query,
    array $params
): int|bool {}

/**
 * Sends a request to create a prepared statement with the given parameters, without waiting for completion.
 * @link https://php.net/manual/en/function.pg-send-prepare.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @param string $statement_name <p>
 * The name to give the prepared statement. Must be unique per-connection. If
 * "" is specified, then an unnamed statement is created, overwriting any
 * previously defined unnamed statement.
 * </p>
 * @param string $query <p>
 * The parameterized SQL statement. Must contain only a single statement.
 * (multiple statements separated by semi-colons are not allowed.) If any parameters
 * are used, they are referred to as $1, $2, etc.
 * </p>
 * @return int|bool <b>TRUE</b> on success, <b>FALSE</b> on failure. Use <b>pg_get_result</b>
 * to determine the query result.
 */
function pg_send_prepare(
    #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    string $statement_name,
    string $query
): int|bool {}

/**
 * Sends a request to execute a prepared statement with given parameters, without waiting for the result(s).
 * @link https://php.net/manual/en/function.pg-send-execute.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @param string $statement_name <p>
 * The name of the prepared statement to execute. if
 * "" is specified, then the unnamed statement is executed. The name must have
 * been previously prepared using <b>pg_prepare</b>,
 * <b>pg_send_prepare</b> or a PREPARE SQL
 * command.
 * </p>
 * @param array $params <p>
 * An array of parameter values to substitute for the $1, $2, etc. placeholders
 * in the original prepared query string. The number of elements in the array
 * must match the number of placeholders.
 * </p>
 * @return int|bool <b>TRUE</b> on success, <b>FALSE</b> on failure. Use <b>pg_get_result</b>
 * to determine the query result.
 */
function pg_send_execute(
    #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    string $statement_name,
    array $params
): int|bool {}

/**
 * Cancel an asynchronous query
 * @link https://php.net/manual/en/function.pg-cancel-query.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pg_cancel_query(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection): bool {}

/**
 * Returns values from a result resource
 * @link https://php.net/manual/en/function.pg-fetch-result.php
 * @param resource $result <p>
 * PostgreSQL query result resource, returned by <b>pg_query</b>,
 * <b>pg_query_params</b> or <b>pg_execute</b>
 * (among others).
 * </p>
 * @param int $row <p>
 * Row number in result to fetch. Rows are numbered from 0 upwards. If omitted,
 * next row is fetched.
 * </p>
 * @param mixed $field <p>
 * A string representing the name of the field (column) to fetch, otherwise
 * an int representing the field number to fetch. Fields are
 * numbered from 0 upwards.
 * </p>
 * @return string|false|null Boolean is returned as &#x00022;t&#x00022; or &#x00022;f&#x00022;. All
 * other types, including arrays are returned as strings formatted
 * in the same default PostgreSQL manner that you would see in the
 * psql program. Database NULL
 * values are returned as <b>NULL</b>.
 * </p>
 * <p>
 * <b>FALSE</b> is returned if <i>row</i> exceeds the number
 * of rows in the set, or on any other error.
 */
function pg_fetch_result(
    #[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $row = 0,
    #[PhpStormStubsElementAvailable(from: '8.0')] $row,
    string|int $field = null
): string|false|null {}

/**
 * Get a row as an enumerated array
 * @link https://php.net/manual/en/function.pg-fetch-row.php
 * @param resource $result <p>
 * PostgreSQL query result resource, returned by <b>pg_query</b>,
 * <b>pg_query_params</b> or <b>pg_execute</b>
 * (among others).
 * </p>
 * @param int $row [optional] <p>
 * Row number in result to fetch. Rows are numbered from 0 upwards. If
 * omitted or <b>NULL</b>, the next row is fetched.
 * </p>
 * @param int $mode [optional]
 * @return array|false An array, indexed from 0 upwards, with each value
 * represented as a string. Database NULL
 * values are returned as <b>NULL</b>.
 * </p>
 * <p>
 * <b>FALSE</b> is returned if <i>row</i> exceeds the number
 * of rows in the set, there are no more rows, or on any other error.
 */
function pg_fetch_row(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result, ?int $row = null, int $mode = 2): array|false {}

/**
 * Fetch a row as an associative array
 * @link https://php.net/manual/en/function.pg-fetch-assoc.php
 * @param resource $result <p>
 * PostgreSQL query result resource, returned by <b>pg_query</b>,
 * <b>pg_query_params</b> or <b>pg_execute</b>
 * (among others).
 * </p>
 * @param int $row [optional] <p>
 * Row number in result to fetch. Rows are numbered from 0 upwards. If
 * omitted or <b>NULL</b>, the next row is fetched.
 * </p>
 * @return array|false An array indexed associatively (by field name).
 * Each value in the array is represented as a
 * string. Database NULL
 * values are returned as <b>NULL</b>.
 * </p>
 * <p>
 * <b>FALSE</b> is returned if <i>row</i> exceeds the number
 * of rows in the set, there are no more rows, or on any other error.
 */
function pg_fetch_assoc(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result, ?int $row = null): array|false {}

/**
 * Fetch a row as an array
 * @link https://php.net/manual/en/function.pg-fetch-array.php
 * @param resource $result <p>
 * PostgreSQL query result resource, returned by <b>pg_query</b>,
 * <b>pg_query_params</b> or <b>pg_execute</b>
 * (among others).
 * </p>
 * @param int $row [optional] <p>
 * Row number in result to fetch. Rows are numbered from 0 upwards. If
 * omitted or <b>NULL</b>, the next row is fetched.
 * </p>
 * @param int $mode [optional] <p>
 * An optional parameter that controls
 * how the returned array is indexed.
 * <i>result_type</i> is a constant and can take the
 * following values: <b>PGSQL_ASSOC</b>,
 * <b>PGSQL_NUM</b> and <b>PGSQL_BOTH</b>.
 * Using <b>PGSQL_NUM</b>, <b>pg_fetch_array</b>
 * will return an array with numerical indices, using
 * <b>PGSQL_ASSOC</b> it will return only associative indices
 * while <b>PGSQL_BOTH</b>, the default, will return both
 * numerical and associative indices.
 * </p>
 * @return array|false An array indexed numerically (beginning with 0) or
 * associatively (indexed by field name), or both.
 * Each value in the array is represented as a
 * string. Database NULL
 * values are returned as <b>NULL</b>.
 * </p>
 * <p>
 * <b>FALSE</b> is returned if <i>row</i> exceeds the number
 * of rows in the set, there are no more rows, or on any other error.
 */
function pg_fetch_array(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result, ?int $row = null, int $mode = PGSQL_BOTH): array|false {}

/**
 * Fetch a row as an object
 * @link https://php.net/manual/en/function.pg-fetch-object.php
 * @param resource $result <p>
 * PostgreSQL query result resource, returned by <b>pg_query</b>,
 * <b>pg_query_params</b> or <b>pg_execute</b>
 * (among others).
 * </p>
 * @param int|null $row [optional] <p>
 * Row number in result to fetch. Rows are numbered from 0 upwards. If
 * omitted or <b>NULL</b>, the next row is fetched.
 * </p>
 * @param string $class [optional] <p>
 * Ignored and deprecated.
 * </p>
 * @param array $constructor_args [optional] <p>
 * </p>
 * @return object|false An object with one attribute for each field
 * name in the result. Database NULL
 * values are returned as <b>NULL</b>.
 * </p>
 * <p>
 * <b>FALSE</b> is returned if <i>row</i> exceeds the number
 * of rows in the set, there are no more rows, or on any other error.
 */
function pg_fetch_object(
    #[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result,
    ?int $row = null,
    string $class = 'stdClass',
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $l = null,
    array $constructor_args = []
): object|false {}

/**
 * Fetches all rows from a result as an array
 * @link https://php.net/manual/en/function.pg-fetch-all.php
 * @param resource $result <p>
 * PostgreSQL query result resource, returned by <b>pg_query</b>,
 * <b>pg_query_params</b> or <b>pg_execute</b>
 * (among others).
 * </p>
 * @param int $mode [optional] <p>
 * An optional parameter that controls
 * how the returned array is indexed.
 * <i>result_type</i> is a constant and can take the
 * following values: <b>PGSQL_ASSOC</b>,
 * <b>PGSQL_NUM</b> and <b>PGSQL_BOTH</b>.
 * Using <b>PGSQL_NUM</b>, <b>pg_fetch_array</b>
 * will return an array with numerical indices, using
 * <b>PGSQL_ASSOC</b> it will return only associative indices
 * while <b>PGSQL_BOTH</b>, the default, will return both
 * numerical and associative indices.
 * </p>
 * @return array|false An array with all rows in the result. Each row is an array
 * of field values indexed by field name.
 * </p>
 * <p>
 * <b>FALSE</b> is returned if there are no rows in the result, or on any
 * other error.
 */
#[LanguageLevelTypeAware(['8.0' => 'array'], default: 'array|false')]
function pg_fetch_all(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result, int $mode = PGSQL_ASSOC) {}

/**
 * Fetches all rows in a particular result column as an array
 * @link https://php.net/manual/en/function.pg-fetch-all-columns.php
 * @param resource $result <p>
 * PostgreSQL query result resource, returned by <b>pg_query</b>,
 * <b>pg_query_params</b> or <b>pg_execute</b>
 * (among others).
 * </p>
 * @param int $field [optional] <p>
 * Column number, zero-based, to be retrieved from the result resource. Defaults
 * to the first column if not specified.
 * </p>
 * @return array An array with all values in the result column.
 * <p>
 * <b>FALSE</b> is returned if <i>column</i> is larger than the number
 * of columns in the result, or on any other error.
 * </p>
 */
function pg_fetch_all_columns(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result, int $field = 0): array {}

/**
 * Returns number of affected records (tuples)
 * @link https://php.net/manual/en/function.pg-affected-rows.php
 * @param resource $result <p>
 * PostgreSQL query result resource, returned by <b>pg_query</b>,
 * <b>pg_query_params</b> or <b>pg_execute</b>
 * (among others).
 * </p>
 * @return int The number of rows affected by the query. If no tuple is
 * affected, it will return 0.
 */
function pg_affected_rows(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result): int {}

/**
 * Get asynchronous query result
 * @link https://php.net/manual/en/function.pg-get-result.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource.
 * </p>
 * @return resource|false The result resource, or <b>FALSE</b> if no more results are available.
 */
#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result|false'], default: 'resource|false')]
function pg_get_result(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection) {}

/**
 * Set internal row offset in result resource
 * @link https://php.net/manual/en/function.pg-result-seek.php
 * @param resource $result <p>
 * PostgreSQL query result resource, returned by <b>pg_query</b>,
 * <b>pg_query_params</b> or <b>pg_execute</b>
 * (among others).
 * </p>
 * @param int $row <p>
 * Row to move the internal offset to in the <i>result</i> resource.
 * Rows are numbered starting from zero.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pg_result_seek(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result, int $row): bool {}

/**
 * Get status of query result
 * @link https://php.net/manual/en/function.pg-result-status.php
 * @param resource $result <p>
 * PostgreSQL query result resource, returned by <b>pg_query</b>,
 * <b>pg_query_params</b> or <b>pg_execute</b>
 * (among others).
 * </p>
 * @param int $mode [optional] <p>
 * Either <b>PGSQL_STATUS_LONG</b> to return the numeric status
 * of the <i>result</i>, or <b>PGSQL_STATUS_STRING</b>
 * to return the command tag of the <i>result</i>.
 * If not specified, <b>PGSQL_STATUS_LONG</b> is the default.
 * </p>
 * @return string|int Possible return values are <b>PGSQL_EMPTY_QUERY</b>,
 * <b>PGSQL_COMMAND_OK</b>, <b>PGSQL_TUPLES_OK</b>, <b>PGSQL_COPY_OUT</b>,
 * <b>PGSQL_COPY_IN</b>, <b>PGSQL_BAD_RESPONSE</b>, <b>PGSQL_NONFATAL_ERROR</b> and
 * <b>PGSQL_FATAL_ERROR</b> if <b>PGSQL_STATUS_LONG</b> is
 * specified. Otherwise, a string containing the PostgreSQL command tag is returned.
 */
function pg_result_status(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result, int $mode = PGSQL_STATUS_LONG): string|int {}

/**
 * Free result memory
 * @link https://php.net/manual/en/function.pg-free-result.php
 * @param resource $result <p>
 * PostgreSQL query result resource, returned by <b>pg_query</b>,
 * <b>pg_query_params</b> or <b>pg_execute</b>
 * (among others).
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pg_free_result(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result): bool {}

/**
 * Returns the last row's OID
 * @link https://php.net/manual/en/function.pg-last-oid.php
 * @param resource $result <p>
 * PostgreSQL query result resource, returned by <b>pg_query</b>,
 * <b>pg_query_params</b> or <b>pg_execute</b>
 * (among others).
 * </p>
 * @return string|int|false A string containing the OID assigned to the most recently inserted
 * row in the specified <i>connection</i>, or <b>FALSE</b> on error or
 * no available OID.
 */
function pg_last_oid(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result): string|int|false {}

/**
 * Returns the number of rows in a result
 * @link https://php.net/manual/en/function.pg-num-rows.php
 * @param resource $result <p>
 * PostgreSQL query result resource, returned by <b>pg_query</b>,
 * <b>pg_query_params</b> or <b>pg_execute</b>
 * (among others).
 * </p>
 * @return int The number of rows in the result. On error, -1 is returned.
 */
function pg_num_rows(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result): int {}

/**
 * Returns the number of fields in a result
 * @link https://php.net/manual/en/function.pg-num-fields.php
 * @param resource $result <p>
 * PostgreSQL query result resource, returned by <b>pg_query</b>,
 * <b>pg_query_params</b> or <b>pg_execute</b>
 * (among others).
 * </p>
 * @return int The number of fields (columns) in the result. On error, -1 is returned.
 */
function pg_num_fields(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result): int {}

/**
 * Returns the name of a field
 * @link https://php.net/manual/en/function.pg-field-name.php
 * @param resource $result <p>
 * PostgreSQL query result resource, returned by <b>pg_query</b>,
 * <b>pg_query_params</b> or <b>pg_execute</b>
 * (among others).
 * </p>
 * @param int $field <p>
 * Field number, starting from 0.
 * </p>
 * @return string|false The field name, or <b>FALSE</b> on error.
 */
function pg_field_name(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result, int $field): string {}

/**
 * Returns the field number of the named field
 * @link https://php.net/manual/en/function.pg-field-num.php
 * @param resource $result <p>
 * PostgreSQL query result resource, returned by <b>pg_query</b>,
 * <b>pg_query_params</b> or <b>pg_execute</b>
 * (among others).
 * </p>
 * @param string $field <p>
 * The name of the field.
 * </p>
 * @return int The field number (numbered from 0), or -1 on error.
 */
function pg_field_num(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result, string $field): int {}

/**
 * Returns the internal storage size of the named field
 * @link https://php.net/manual/en/function.pg-field-size.php
 * @param resource $result <p>
 * PostgreSQL query result resource, returned by <b>pg_query</b>,
 * <b>pg_query_params</b> or <b>pg_execute</b>
 * (among others).
 * </p>
 * @param int $field <p>
 * Field number, starting from 0.
 * </p>
 * @return int The internal field storage size (in bytes). -1 indicates a variable
 * length field. <b>FALSE</b> is returned on error.
 */
function pg_field_size(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result, int $field): int {}

/**
 * Returns the type name for the corresponding field number
 * @link https://php.net/manual/en/function.pg-field-type.php
 * @param resource $result <p>
 * PostgreSQL query result resource, returned by <b>pg_query</b>,
 * <b>pg_query_params</b> or <b>pg_execute</b>
 * (among others).
 * </p>
 * @param int $field <p>
 * Field number, starting from 0.
 * </p>
 * @return string|false A string containing the base name of the field's type, or <b>FALSE</b>
 * on error.
 */
function pg_field_type(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result, int $field): string {}

/**
 * Returns the type ID (OID) for the corresponding field number
 * @link https://php.net/manual/en/function.pg-field-type-oid.php
 * @param resource $result <p>
 * PostgreSQL query result resource, returned by <b>pg_query</b>,
 * <b>pg_query_params</b> or <b>pg_execute</b>
 * (among others).
 * </p>
 * @param int $field <p>
 * Field number, starting from 0.
 * </p>
 * @return string|int The OID of the field's base type. <b>FALSE</b> is returned on error.
 */
function pg_field_type_oid(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result, int $field): string|int {}

/**
 * Returns the printed length
 * @link https://php.net/manual/en/function.pg-field-prtlen.php
 * @param resource $result <p>
 * PostgreSQL query result resource, returned by <b>pg_query</b>,
 * <b>pg_query_params</b> or <b>pg_execute</b>
 * (among others).
 * </p>
 * @param int $row
 * @param mixed $field
 * @return int|false The field printed length, or <b>FALSE</b> on error.
 */
function pg_field_prtlen(
    #[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $row = 0,
    #[PhpStormStubsElementAvailable(from: '8.0')] $row,
    string|int $field = null
): int|false {}

/**
 * Test if a field is SQL NULL
 * @link https://php.net/manual/en/function.pg-field-is-null.php
 * @param resource $result <p>
 * PostgreSQL query result resource, returned by <b>pg_query</b>,
 * <b>pg_query_params</b> or <b>pg_execute</b>
 * (among others).
 * </p>
 * @param int $row <p>
 * Row number in result to fetch. Rows are numbered from 0 upwards. If omitted,
 * current row is fetched.
 * </p>
 * @param mixed $field <p>
 * Field number (starting from 0) as an integer or
 * the field name as a string.
 * </p>
 * @return int|false 1 if the field in the given row is SQL NULL, 0
 * if not. <b>FALSE</b> is returned if the row is out of range, or upon any other error.
 */
function pg_field_is_null(
    #[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $row = 0,
    #[PhpStormStubsElementAvailable(from: '8.0')] $row,
    string|int $field = null
): int|false {}

/**
 * Returns the name or oid of the tables field
 * @link https://php.net/manual/en/function.pg-field-table.php
 * @param resource $result <p>
 * PostgreSQL query result resource, returned by <b>pg_query</b>,
 * <b>pg_query_params</b> or <b>pg_execute</b>
 * (among others).
 * </p>
 * @param int $field <p>
 * Field number, starting from 0.
 * </p>
 * @param bool $oid_only [optional] <p>
 * By default the tables name that field belongs to is returned but
 * if <i>oid_only</i> is set to <b>TRUE</b>, then the
 * oid will instead be returned.
 * </p>
 * @return string|int|false On success either the fields table name or oid. Or, <b>FALSE</b> on failure.
 */
function pg_field_table(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result, int $field, bool $oid_only = false): string|int|false {}

/**
 * Gets SQL NOTIFY message
 * @link https://php.net/manual/en/function.pg-get-notify.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource.
 * </p>
 * @param int $mode [optional] <p>
 * An optional parameter that controls
 * how the returned array is indexed.
 * <i>result_type</i> is a constant and can take the
 * following values: <b>PGSQL_ASSOC</b>,
 * <b>PGSQL_NUM</b> and <b>PGSQL_BOTH</b>.
 * Using <b>PGSQL_NUM</b>, <b>pg_get_notify</b>
 * will return an array with numerical indices, using
 * <b>PGSQL_ASSOC</b> it will return only associative indices
 * while <b>PGSQL_BOTH</b>, the default, will return both
 * numerical and associative indices.
 * </p>
 * @return array|false An array containing the NOTIFY message name and backend PID.
 * Otherwise if no NOTIFY is waiting, then <b>FALSE</b> is returned.
 */
#[ArrayShape(["message" => "string", "pid" => "int", "payload" => "string"])]
function pg_get_notify(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    int $mode = 1
): array|false {}

/**
 * Gets the backend's process ID
 * @link https://php.net/manual/en/function.pg-get-pid.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource.
 * </p>
 * @return int The backend database process ID.
 */
function pg_get_pid(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
): int {}

/**
 * Get error message associated with result
 * @link https://php.net/manual/en/function.pg-result-error.php
 * @param resource $result <p>
 * PostgreSQL query result resource, returned by <b>pg_query</b>,
 * <b>pg_query_params</b> or <b>pg_execute</b>
 * (among others).
 * </p>
 * @return string|false a string if there is an error associated with the
 * <i>result</i> parameter, <b>FALSE</b> otherwise.
 */
function pg_result_error(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result): string|false {}

/**
 * Returns an individual field of an error report.
 * @link https://php.net/manual/en/function.pg-result-error-field.php
 * @param resource $result <p>
 * A PostgreSQL query result resource from a previously executed
 * statement.
 * </p>
 * @param int $field_code <p>
 * Possible <i>fieldcode</i> values are: <b>PGSQL_DIAG_SEVERITY</b>,
 * <b>PGSQL_DIAG_SQLSTATE</b>, <b>PGSQL_DIAG_MESSAGE_PRIMARY</b>,
 * <b>PGSQL_DIAG_MESSAGE_DETAIL</b>,
 * <b>PGSQL_DIAG_MESSAGE_HINT</b>, <b>PGSQL_DIAG_STATEMENT_POSITION</b>,
 * <b>PGSQL_DIAG_INTERNAL_POSITION</b> (PostgreSQL 8.0+ only),
 * <b>PGSQL_DIAG_INTERNAL_QUERY</b> (PostgreSQL 8.0+ only),
 * <b>PGSQL_DIAG_CONTEXT</b>, <b>PGSQL_DIAG_SOURCE_FILE</b>,
 * <b>PGSQL_DIAG_SOURCE_LINE</b> or
 * <b>PGSQL_DIAG_SOURCE_FUNCTION</b>.
 * </p>
 * @return string|null|false A string containing the contents of the error field, <b>NULL</b> if the field does not exist or <b>FALSE</b>
 * on failure.
 */
function pg_result_error_field(
    #[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result,
    int $field_code
): string|false|null {}

/**
 * Get the last error message string of a connection
 * @link https://php.net/manual/en/function.pg-last-error.php
 * @param resource $connection [optional] <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @return string A string containing the last error message on the
 * given <i>connection</i>, or <b>FALSE</b> on error.
 */
function pg_last_error(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection = null): string {}

/**
 * Returns the last notice message from PostgreSQL server
 * @link https://php.net/manual/en/function.pg-last-notice.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource.
 * </p>
 * @param int $mode [optional] <p>
 * One of <b>PGSQL_NOTICE_LAST</b> (to return last notice),
 * <b>PGSQL_NOTICE_ALL</b> (to return all notices), or
 * <b>PGSQL_NOTICE_CLEAR</b> (to clear notices).
 * </p>
 * @return array|string|bool A string containing the last notice on the
 * given <i>connection</i> with <b>PGSQL_NOTICE_LAST</b>,
 * an array with <b>PGSQL_NOTICE_ALL</b>,
 * a bool with <b>PGSQL_NOTICE_CLEAR</b>, or
 * <b>FALSE</b> on error.
 */
function pg_last_notice(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection, int $mode = PGSQL_NOTICE_LAST): array|string|bool {}

/**
 * Send a NULL-terminated string to PostgreSQL backend
 * @link https://php.net/manual/en/function.pg-put-line.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @param string $query <p>
 * A line of text to be sent directly to the PostgreSQL backend. A NULL
 * terminator is added automatically.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pg_put_line(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    string $query = null
): bool {}

/**
 * Sync with PostgreSQL backend
 * @link https://php.net/manual/en/function.pg-end-copy.php
 * @param resource $connection [optional] <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pg_end_copy(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection = null): bool {}

/**
 * Copy a table to an array
 * @link https://php.net/manual/en/function.pg-copy-to.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource.
 * </p>
 * @param string $table_name <p>
 * Name of the table from which to copy the data into <i>rows</i>.
 * </p>
 * @param string $separator [optional] <p>
 * The token that separates values for each field in each element of
 * <i>rows</i>. Default is TAB.
 * </p>
 * @param string $null_as [optional] <p>
 * How SQL NULL values are represented in the
 * <i>rows</i>. Default is \N ("\\N").
 * </p>
 * @return array|false An array with one element for each line of COPY data.
 * It returns <b>FALSE</b> on failure.
 */
function pg_copy_to(
    #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    string $table_name,
    string $separator = '	',
    string $null_as = '\\\\N'
): array|false {}

/**
 * Insert records into a table from an array
 * @link https://php.net/manual/en/function.pg-copy-from.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource.
 * </p>
 * @param string $table_name <p>
 * Name of the table into which to copy the <i>rows</i>.
 * </p>
 * @param array $rows <p>
 * An array of data to be copied into <i>table_name</i>.
 * Each value in <i>rows</i> becomes a row in <i>table_name</i>.
 * Each value in <i>rows</i> should be a delimited string of the values
 * to insert into each field. Values should be linefeed terminated.
 * </p>
 * @param string $separator [optional] <p>
 * The token that separates values for each field in each element of
 * <i>rows</i>. Default is TAB.
 * </p>
 * @param string $null_as [optional] <p>
 * How SQL NULL values are represented in the
 * <i>rows</i>. Default is \N ("\\N").
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pg_copy_from(
    #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    string $table_name,
    array $rows,
    string $separator = '	',
    string $null_as = '\\\\N'
): bool {}

/**
 * Enable tracing a PostgreSQL connection
 * @link https://php.net/manual/en/function.pg-trace.php
 * @param string $filename <p>
 * The full path and file name of the file in which to write the
 * trace log. Same as in <b>fopen</b>.
 * </p>
 * @param string $mode [optional] <p>
 * An optional file access mode, same as for <b>fopen</b>.
 * </p>
 * @param resource $connection [optional] <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pg_trace(string $filename, string $mode = "w", #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection = null): bool {}

/**
 * Disable tracing of a PostgreSQL connection
 * @link https://php.net/manual/en/function.pg-untrace.php
 * @param resource $connection [optional] <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @return bool Always returns <b>TRUE</b>.
 */
function pg_untrace(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection = null): bool {}

/**
 * Create a large object
 * @link https://php.net/manual/en/function.pg-lo-create.php
 * @param resource $connection [optional] <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @param mixed $oid [optional] <p>
 * If an <i>object_id</i> is given the function
 * will try to create a large object with this id, else a free
 * object id is assigned by the server. The parameter
 * was added in PHP 5.3 and relies on functionality that first
 * appeared in PostgreSQL 8.1.
 * </p>
 * @return string|int|false A large object OID or <b>FALSE</b> on error.
 */
function pg_lo_create(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection = null, $oid = null): string|int|false {}

/**
 * Delete a large object
 * @link https://php.net/manual/en/function.pg-lo-unlink.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @param int $oid <p>
 * The OID of the large object in the database.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pg_lo_unlink(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    $oid = null
): bool {}

/**
 * Open a large object
 * @link https://php.net/manual/en/function.pg-lo-open.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @param int $oid <p>
 * The OID of the large object in the database.
 * </p>
 * @param string $mode <p>
 * Can be either "r" for read-only, "w" for write only or "rw" for read and
 * write.
 * </p>
 * @return resource|false A large object resource or <b>FALSE</b> on error.
 */
#[LanguageLevelTypeAware(['8.1' => 'PgSql\Lob|false'], default: 'resource|false')]
function pg_lo_open(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    $oid = null,
    string $mode = null
) {}

/**
 * Close a large object
 * @link https://php.net/manual/en/function.pg-lo-close.php
 * @param resource $lob
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pg_lo_close(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Lob'], default: 'resource')] $lob): bool {}

/**
 * Read a large object
 * @link https://php.net/manual/en/function.pg-lo-read.php
 * @param resource $lob <p>
 * PostgreSQL large object (LOB) resource, returned by <b>pg_lo_open</b>.
 * </p>
 * @param int $length [optional] <p>
 * An optional maximum number of bytes to return.
 * </p>
 * @return string|false A string containing <i>len</i> bytes from the
 * large object, or <b>FALSE</b> on error.
 */
function pg_lo_read(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Lob'], default: 'resource')] $lob, int $length = 8192): string|false {}

/**
 * Write to a large object
 * @link https://php.net/manual/en/function.pg-lo-write.php
 * @param resource $lob <p>
 * PostgreSQL large object (LOB) resource, returned by <b>pg_lo_open</b>.
 * </p>
 * @param string $data <p>
 * The data to be written to the large object. If <i>len</i> is
 * specified and is less than the length of <i>data</i>, only
 * <i>len</i> bytes will be written.
 * </p>
 * @param int $length [optional] <p>
 * An optional maximum number of bytes to write. Must be greater than zero
 * and no greater than the length of <i>data</i>. Defaults to
 * the length of <i>data</i>.
 * </p>
 * @return int|false The number of bytes written to the large object, or <b>FALSE</b> on error.
 */
function pg_lo_write(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Lob'], default: 'resource')] $lob, string $data, ?int $length = null): int|false {}

/**
 * Reads an entire large object and send straight to browser
 * @link https://php.net/manual/en/function.pg-lo-read-all.php
 * @param resource $lob <p>
 * PostgreSQL large object (LOB) resource, returned by <b>pg_lo_open</b>.
 * </p>
 * @return int|false Number of bytes read or <b>FALSE</b> on error.
 */
function pg_lo_read_all(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Lob'], default: 'resource')] $lob): int {}

/**
 * Import a large object from file
 * @link https://php.net/manual/en/function.pg-lo-import.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @param string $pathname <p>
 * The full path and file name of the file on the client
 * filesystem from which to read the large object data.
 * </p>
 * @param mixed $object_id [optional] <p>
 * If an <i>object_id</i> is given the function
 * will try to create a large object with this id, else a free
 * object id is assigned by the server. The parameter
 * was added in PHP 5.3 and relies on functionality that first
 * appeared in PostgreSQL 8.1.
 * </p>
 * @return string|int|false The OID of the newly created large object, or
 * <b>FALSE</b> on failure.
 */
function pg_lo_import(
    #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null,
    $pathname,
    $object_id = null
): string|int|false {}

/**
 * Export a large object to file
 * @link https://php.net/manual/en/function.pg-lo-export.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @param int $oid <p>
 * The OID of the large object in the database.
 * </p>
 * @param string $pathname <p>
 * The full path and file name of the file in which to write the
 * large object on the client filesystem.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pg_lo_export(
    #[PhpStormStubsElementAvailable('8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null,
    $oid,
    $pathname
): bool {}

/**
 * Seeks position within a large object
 * @link https://php.net/manual/en/function.pg-lo-seek.php
 * @param resource $lob <p>
 * PostgreSQL large object (LOB) resource, returned by <b>pg_lo_open</b>.
 * </p>
 * @param int $offset <p>
 * The number of bytes to seek.
 * </p>
 * @param int $whence [optional] <p>
 * One of the constants <b>PGSQL_SEEK_SET</b> (seek from object start),
 * <b>PGSQL_SEEK_CUR</b> (seek from current position)
 * or <b>PGSQL_SEEK_END</b> (seek from object end) .
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pg_lo_seek(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Lob'], default: 'resource')] $lob, int $offset, int $whence = PGSQL_SEEK_CUR): bool {}

/**
 * Returns current seek position a of large object
 * @link https://php.net/manual/en/function.pg-lo-tell.php
 * @param resource $lob <p>
 * PostgreSQL large object (LOB) resource, returned by <b>pg_lo_open</b>.
 * </p>
 * @return int The current seek offset (in number of bytes) from the beginning of the large
 * object. If there is an error, the return value is negative.
 */
function pg_lo_tell(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Lob'], default: 'resource')] $lob): int {}

/**
 *  Truncates a large object
 * @link https://www.php.net/manual/en/function.pg-lo-truncate.php
 * @param resource $lob <p>
 * PostgreSQL large object (LOB) resource, returned by <b>pg_lo_open</b>.
 * </p>
 * @param int $size The number of bytes to truncate.
 * @return bool Returns true on success or false on failure.
 */
function pg_lo_truncate(
    #[LanguageLevelTypeAware(['8.1' => 'PgSql\Lob'], default: 'resource')] $lob,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] int $size = 0,
    #[PhpStormStubsElementAvailable(from: '8.0')] int $size
): bool {}

/**
 * Escape a string for query
 * @link https://php.net/manual/en/function.pg-escape-string.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @param string $string <p>
 * A string containing text to be escaped.
 * </p>
 * @return string A string containing the escaped data.
 */
function pg_escape_string(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    string $string = null
): string {}

/**
 * Escape a string for insertion into a bytea field
 * @link https://php.net/manual/en/function.pg-escape-bytea.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @param string $string <p>
 * A string containing text or binary data to be inserted into a bytea
 * column.
 * </p>
 * @return string A string containing the escaped data.
 */
function pg_escape_bytea(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    string $string = null
): string {}

/**
 * Escape a identifier for insertion into a text field
 * @link https://php.net/manual/en/function.pg-escape-identifier.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @param string $string <p>
 * A string containing text to be escaped.
 * </p>
 * @return string|false A string containing the escaped data.
 * @since 5.4.4
 */
function pg_escape_identifier(
    #[PhpStormStubsElementAvailable(from: '5.4', to: '7.4')] $connection = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    string $string = null
): string|false {}

/**
 * Escape a literal for insertion into a text field
 * @link https://php.net/manual/en/function.pg-escape-literal.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @param string $string <p>
 * A string containing text to be escaped.
 * </p>
 * @return string|false A string containing the escaped data.
 * @since 5.4.4
 */
function pg_escape_literal(
    #[PhpStormStubsElementAvailable(from: '5.4', to: '7.4')] $connection = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    string $string = null
): string|false {}

/**
 * Unescape binary for bytea type
 * @link https://php.net/manual/en/function.pg-unescape-bytea.php
 * @param string $string <p>
 * A string containing PostgreSQL bytea data to be converted into
 * a PHP binary string.
 * </p>
 * @return string A string containing the unescaped data.
 */
function pg_unescape_bytea(string $string): string {}

/**
 * Determines the verbosity of messages returned by <b>pg_last_error</b>
 * and <b>pg_result_error</b>.
 * @link https://php.net/manual/en/function.pg-set-error-verbosity.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @param int $verbosity <p>
 * The required verbosity: <b>PGSQL_ERRORS_TERSE</b>,
 * <b>PGSQL_ERRORS_DEFAULT</b>
 * or <b>PGSQL_ERRORS_VERBOSE</b>.
 * </p>
 * @return int|false The previous verbosity level: <b>PGSQL_ERRORS_TERSE</b>,
 * <b>PGSQL_ERRORS_DEFAULT</b>
 * or <b>PGSQL_ERRORS_VERBOSE</b>.
 */
function pg_set_error_verbosity(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    int $verbosity = null
): int|false {}

/**
 * Gets the client encoding
 * @link https://php.net/manual/en/function.pg-client-encoding.php
 * @param resource $connection [optional] <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @return string|false The client encoding, or <b>FALSE</b> on error.
 */
function pg_client_encoding(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection = null): string {}

/**
 * Set the client encoding
 * @link https://php.net/manual/en/function.pg-set-client-encoding.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource. When
 * <i>connection</i> is not present, the default connection
 * is used. The default connection is the last connection made by
 * <b>pg_connect</b> or <b>pg_pconnect</b>.
 * </p>
 * @param string $encoding <p>
 * The required client encoding. One of SQL_ASCII, EUC_JP,
 * EUC_CN, EUC_KR, EUC_TW,
 * UNICODE, MULE_INTERNAL, LATINX (X=1...9),
 * KOI8, WIN, ALT, SJIS,
 * BIG5 or WIN1250.
 * </p>
 * <p>
 * The exact list of available encodings depends on your PostgreSQL version, so check your
 * PostgreSQL manual for a more specific list.
 * </p>
 * @return int 0 on success or -1 on error.
 */
function pg_set_client_encoding(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    string $encoding = null
): int {}

/**
 * Get meta data for table
 * @link https://php.net/manual/en/function.pg-meta-data.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource.
 * </p>
 * @param string $table_name <p>
 * The name of the table.
 * </p>
 * @return array|false An array of the table definition, or <b>FALSE</b> on error.
 */
function pg_meta_data(
    #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    string $table_name,
    #[PhpStormStubsElementAvailable(from: '8.0')] bool $extended = false
): array|false {}

/**
 * Convert associative array values into suitable for SQL statement
 * @link https://php.net/manual/en/function.pg-convert.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource.
 * </p>
 * @param string $table_name <p>
 * Name of the table against which to convert types.
 * </p>
 * @param array $values <p>
 * Data to be converted.
 * </p>
 * @param int $flags [optional] <p>
 * Any number of <b>PGSQL_CONV_IGNORE_DEFAULT</b>,
 * <b>PGSQL_CONV_FORCE_NULL</b> or
 * <b>PGSQL_CONV_IGNORE_NOT_NULL</b>, combined.
 * </p>
 * @return array|false An array of converted values, or <b>FALSE</b> on error.
 */
function pg_convert(
    #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    string $table_name,
    array $values,
    int $flags = 0
): array|false {}

/**
 * Insert array into table
 * @link https://php.net/manual/en/function.pg-insert.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource.
 * </p>
 * @param string $table_name <p>
 * Name of the table into which to insert rows. The table <i>table_name</i> must at least
 * have as many columns as <i>assoc_array</i> has elements.
 * </p>
 * @param array $values <p>
 * An array whose keys are field names in the table <i>table_name</i>,
 * and whose values are the values of those fields that are to be inserted.
 * </p>
 * @param int $flags [optional] <p>
 * Any number of <b>PGSQL_CONV_OPTS</b>,
 * <b>PGSQL_DML_NO_CONV</b>,
 * <b>PGSQL_DML_EXEC</b>,
 * <b>PGSQL_DML_ASYNC</b> or
 * <b>PGSQL_DML_STRING</b> combined. If <b>PGSQL_DML_STRING</b> is part of the
 * <i>options</i> then query string is returned.
 * </p>
 * @return mixed <b>TRUE</b> on success or <b>FALSE</b> on failure. Returns string if <b>PGSQL_DML_STRING</b> is passed
 * via <i>options</i>.
 */
#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result|string|bool'], default: 'resource|string|bool')]
function pg_insert(
    #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    string $table_name,
    array $values,
    int $flags = PGSQL_DML_EXEC
) {}

/**
 * Update table
 * @link https://php.net/manual/en/function.pg-update.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource.
 * </p>
 * @param string $table_name <p>
 * Name of the table into which to update rows.
 * </p>
 * @param array $values <p>
 * An array whose keys are field names in the table <i>table_name</i>,
 * and whose values are what matched rows are to be updated to.
 * </p>
 * @param array $conditions <p>
 * An array whose keys are field names in the table <i>table_name</i>,
 * and whose values are the conditions that a row must meet to be updated.
 * </p>
 * @param int $flags [optional] <p>
 * Any number of <b>PGSQL_CONV_OPTS</b>,
 * <b>PGSQL_DML_NO_CONV</b>,
 * <b>PGSQL_DML_EXEC</b> or
 * <b>PGSQL_DML_STRING</b> combined. If <b>PGSQL_DML_STRING</b> is part of the
 * <i>options</i> then query string is returned.
 * </p>
 * @return string|bool <b>TRUE</b> on success or <b>FALSE</b> on failure. Returns string if <b>PGSQL_DML_STRING</b> is passed
 * via <i>options</i>.
 */
function pg_update(
    #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    string $table_name,
    array $values,
    array $conditions,
    int $flags = PGSQL_DML_EXEC
): string|bool {}

/**
 * Deletes records
 * @link https://php.net/manual/en/function.pg-delete.php
 * @param resource $connection <p>
 * PostgreSQL database connection resource.
 * </p>
 * @param string $table_name <p>
 * Name of the table from which to delete rows.
 * </p>
 * @param array $conditions <p>
 * An array whose keys are field names in the table <i>table_name</i>,
 * and whose values are the values of those fields that are to be deleted.
 * </p>
 * @param int $flags [optional] <p>
 * Any number of <b>PGSQL_CONV_FORCE_NULL</b>,
 * <b>PGSQL_DML_NO_CONV</b>,
 * <b>PGSQL_DML_EXEC</b> or
 * <b>PGSQL_DML_STRING</b> combined. If <b>PGSQL_DML_STRING</b> is part of the
 * <i>options</i> then query string is returned.
 * </p>
 * @return string|bool <b>TRUE</b> on success or <b>FALSE</b> on failure. Returns string if <b>PGSQL_DML_STRING</b> is passed
 * via <i>options</i>.
 */
function pg_delete(
    #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    string $table_name,
    array $conditions,
    int $flags = PGSQL_DML_EXEC
): string|bool {}

/**
 * Select records
 * @link https://php.net/manual/en/function.pg-select.php
 * @param resource|PgSql\Connection $connection <p>
 * PostgreSQL database connection resource.
 * </p>
 * @param string $table_name <p>
 * Name of the table from which to select rows.
 * </p>
 * @param array $conditions <p>
 * An array whose keys are field names in the table <i>table_name</i>,
 * and whose values are the conditions that a row must meet to be retrieved.
 * </p>
 * @param int $flags [optional] <p>
 * Any number of <b>PGSQL_CONV_FORCE_NULL</b>,
 * <b>PGSQL_DML_NO_CONV</b>,
 * <b>PGSQL_DML_EXEC</b>,
 * <b>PGSQL_DML_ASYNC</b> or
 * <b>PGSQL_DML_STRING</b> combined. If <b>PGSQL_DML_STRING</b> is part of the
 * <i>options</i> then query string is returned.
 * </p>
 * @param int $mode [optional] <p>
 * An optional parameter that controls
 * how the returned array is indexed.
 * <i>result_type</i> is a constant and can take the
 * following values: <b>PGSQL_ASSOC</b>,
 * <b>PGSQL_NUM</b> and <b>PGSQL_BOTH</b>.
 * Using <b>PGSQL_NUM</b>, <b>pg_fetch_array</b>
 * will return an array with numerical indices, using
 * <b>PGSQL_ASSOC</b> it will return only associative indices
 * while <b>PGSQL_BOTH</b>, the default, will return both
 * numerical and associative indices.
 * </p>
 * @return array|string|false <b>TRUE</b> on success or <b>FALSE</b> on failure. Returns string if <b>PGSQL_DML_STRING</b> is passed
 * via <i>options</i>.
 */
function pg_select(
    #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    string $table_name,
    array $conditions,
    int $flags = PGSQL_DML_EXEC,
    int $mode = PGSQL_ASSOC
): array|string|false {}

/**
 * @param $connection
 * @param $query
 * @return mixed
 */
#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result|false'], default: 'resource|false')]
function pg_exec(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    string $query = null
) {}

/**
 * @param $result
 * @return string|int|false
 * @deprecated
 */
function pg_getlastoid(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result): string|int|false {}

/**
 * @param $result
 * @return int
 * @deprecated
 */
function pg_cmdtuples(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result): int {} // TODO remove

/**
 * @param $connection [optional]
 * @return string
 * @deprecated
 */
function pg_errormessage(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection): string {}

/**
 * @param $result
 * @return int
 * @deprecated
 */
function pg_numrows(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result): int {}

/**
 * @param $result
 * @return int
 * @deprecated
 */
function pg_numfields(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result): int {}

/**
 * @param $result
 * @param $field
 * @return string
 * @deprecated
 */
function pg_fieldname(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result, int $field): string {}

/**
 * @param $result
 * @param $field
 * @return int
 * @deprecated
 */
function pg_fieldsize(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result, int $field): int {}

/**
 * @param $result
 * @param $field
 * @return string
 * @deprecated
 */
function pg_fieldtype(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result, int $field): string {}

/**
 * @param $result
 * @param $field
 * @return int
 * @deprecated
 */
function pg_fieldnum(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result, string $field): int {}

/**
 * @param $result
 * @param $row
 * @param $field [optional]
 * @return int|false
 * @deprecated
 */
function pg_fieldprtlen(
    #[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $row = 0,
    #[PhpStormStubsElementAvailable(from: '8.0')] $row,
    string|int $field
): int|false {}

/**
 * @param $result
 * @param $row
 * @param $field [optional]
 * @return int|false
 * @deprecated
 */
function pg_fieldisnull(
    #[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $row = 0,
    #[PhpStormStubsElementAvailable(from: '8.0')] $row,
    string|int $field
): int|false {}

/**
 * @param $result
 * @return bool
 * @deprecated
 */
function pg_freeresult(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result): bool {}

/**
 * @param PgSql\Result|resource $result
 * @param $row
 * @param $field
 * @deprecated
 */
function pg_result(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection,
    #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result,
    #[PhpStormStubsElementAvailable(from: '8.0')] $row,
    #[PhpStormStubsElementAvailable(from: '8.0')] string|int $field = null
): string|null|false {}

/**
 * @param $lob
 * @deprecated
 */
function pg_loreadall(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Lob'], default: 'resource')] $lob): int {} // TODO remove

/**
 * @param $connection [optional]
 * @param $oid [optional]
 * @return string|int|false
 * @deprecated
 */
function pg_locreate(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection, $oid): string|int|false {}

/**
 * @param $connection
 * @param $oid [optional]
 * @return bool
 * @deprecated
 */
function pg_lounlink(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    $oid
): bool {}

/**
 * @param $connection
 * @param $oid [optional]
 * @param $mode [optional]
 * @return resource
 * @deprecated
 */
#[LanguageLevelTypeAware(['8.1' => 'PgSql\Lob|false'], default: 'resource|false')]
function pg_loopen(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    $oid,
    string $mode
) {}

/**
 * @param $lob
 * @return bool
 * @deprecated
 */
function pg_loclose(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Lob'], default: 'resource')] $lob): bool {}

/**
 * @param $lob
 * @param $length
 * @return string|false
 * @deprecated
 */
function pg_loread(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Lob'], default: 'resource')] $lob, int $length = 8192): string|false {}

/**
 * @param $lob
 * @param $data
 * @param $length [optional]
 * @return int|false
 * @deprecated
 */
function pg_lowrite(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Lob'], default: 'resource')] $lob, string $data, ?int $length): int|false {}

/**
 * @param $connection
 * @param $filename [optional]
 * @param $oid [optional]
 * @return string|int|false
 * @deprecated
 */
function pg_loimport(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    $filename,
    $oid
): string|int|false {}

/**
 * @param $connection
 * @param $oid [optional]
 * @param $filename [optional]
 * @return bool
 * @deprecated
 */
function pg_loexport(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    $oid,
    $filename
): bool {}

/**
 * @param $connection [optional]
 * @return string
 * @deprecated
 */
function pg_clientencoding(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection): string {}

/**
 * @param $connection
 * @param $encoding [optional]
 * @return int
 * @deprecated
 */
function pg_setclientencoding(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
    string $encoding
): int {}

/**
 * Reads input on the connection
 * @link https://www.php.net/manual/en/function.pg-consume-input.php
 * @param PgSql\Connection|resource $connection
 * @return bool true if no error occurred, or false if there was an error.
 * Note that true does not necessarily indicate that input was waiting to be read.
 */
function pg_consume_input(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection): bool {}

/**
 * Flush outbound query data on the connection
 * @link https://www.php.net/manual/en/function.pg-flush.php
 * @param PgSql\Connection|resource $connection
 * @return int|bool Returns true if the flush was successful or no data was waiting to be flushed, 0 if part of the pending
 * data was flushed but more remains or false on failure.
 */
function pg_flush(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection): int|bool {}

define('PGSQL_LIBPQ_VERSION', "15.2");
define('PGSQL_LIBPQ_VERSION_STR', "15.2");

/**
 * Passed to <b>pg_connect</b> to force the creation of a new connection,
 * rather than re-using an existing identical connection.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_CONNECT_FORCE_NEW', 2);

/**
 * Passed to <b>pg_fetch_array</b>. Return an associative array of field
 * names and values.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_ASSOC', 1);

/**
 * Passed to <b>pg_fetch_array</b>. Return a numerically indexed array of field
 * numbers and values.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_NUM', 2);

/**
 * Passed to <b>pg_fetch_array</b>. Return an array of field values
 * that is both numerically indexed (by field number) and associated (by field name).
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_BOTH', 3);

/**
 * Returned by <b>pg_connection_status</b> indicating that the database
 * connection is in an invalid state.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_CONNECTION_BAD', 1);

/**
 * Returned by <b>pg_connection_status</b> indicating that the database
 * connection is in a valid state.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_CONNECTION_OK', 0);

/**
 * Returned by <b>pg_transaction_status</b>. Connection is
 * currently idle, not in a transaction.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_TRANSACTION_IDLE', 0);

/**
 * Returned by <b>pg_transaction_status</b>. A command
 * is in progress on the connection. A query has been sent via the connection
 * and not yet completed.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_TRANSACTION_ACTIVE', 1);

/**
 * Returned by <b>pg_transaction_status</b>. The connection
 * is idle, in a transaction block.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_TRANSACTION_INTRANS', 2);

/**
 * Returned by <b>pg_transaction_status</b>. The connection
 * is idle, in a failed transaction block.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_TRANSACTION_INERROR', 3);

/**
 * Returned by <b>pg_transaction_status</b>. The connection
 * is bad.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_TRANSACTION_UNKNOWN', 4);

/**
 * Passed to <b>pg_set_error_verbosity</b>.
 * Specified that returned messages include severity, primary text,
 * and position only; this will normally fit on a single line.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_ERRORS_TERSE', 0);

/**
 * Passed to <b>pg_set_error_verbosity</b>.
 * The default mode produces messages that include the above
 * plus any detail, hint, or context fields (these may span
 * multiple lines).
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_ERRORS_DEFAULT', 1);

/**
 * Passed to <b>pg_set_error_verbosity</b>.
 * The verbose mode includes all available fields.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_ERRORS_VERBOSE', 2);

/**
 * Passed to <b>pg_lo_seek</b>. Seek operation is to begin
 * from the start of the object.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_SEEK_SET', 0);

/**
 * Passed to <b>pg_lo_seek</b>. Seek operation is to begin
 * from the current position.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_SEEK_CUR', 1);

/**
 * Passed to <b>pg_lo_seek</b>. Seek operation is to begin
 * from the end of the object.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_SEEK_END', 2);

/**
 * Passed to <b>pg_result_status</b>. Indicates that
 * numerical result code is desired.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_STATUS_LONG', 1);

/**
 * Passed to <b>pg_result_status</b>. Indicates that
 * textual result command tag is desired.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_STATUS_STRING', 2);

/**
 * Returned by <b>pg_result_status</b>. The string sent to the server
 * was empty.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_EMPTY_QUERY', 0);

/**
 * Returned by <b>pg_result_status</b>. Successful completion of a
 * command returning no data.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_COMMAND_OK', 1);

/**
 * Returned by <b>pg_result_status</b>. Successful completion of a command
 * returning data (such as a SELECT or SHOW).
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_TUPLES_OK', 2);

/**
 * Returned by <b>pg_result_status</b>. Copy Out (from server) data
 * transfer started.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_COPY_OUT', 3);

/**
 * Returned by <b>pg_result_status</b>. Copy In (to server) data
 * transfer started.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_COPY_IN', 4);

/**
 * Returned by <b>pg_result_status</b>. The server's response
 * was not understood.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_BAD_RESPONSE', 5);

/**
 * Returned by <b>pg_result_status</b>. A nonfatal error
 * (a notice or warning) occurred.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_NONFATAL_ERROR', 6);

/**
 * Returned by <b>pg_result_status</b>. A fatal error
 * occurred.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_FATAL_ERROR', 7);

/**
 * Passed to <b>pg_result_error_field</b>.
 * The severity; the field contents are ERROR,
 * FATAL, or PANIC (in an error message), or
 * WARNING, NOTICE, DEBUG,
 * INFO, or LOG (in a notice message), or a localized
 * translation of one of these. Always present.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_DIAG_SEVERITY', 83);

/**
 * Passed to <b>pg_result_error_field</b>.
 * The SQLSTATE code for the error. The SQLSTATE code identifies the type of error
 * that has occurred; it can be used by front-end applications to perform specific
 * operations (such as error handling) in response to a particular database error.
 * This field is not localizable, and is always present.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_DIAG_SQLSTATE', 67);

/**
 * Passed to <b>pg_result_error_field</b>.
 * The primary human-readable error message (typically one line). Always present.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_DIAG_MESSAGE_PRIMARY', 77);

/**
 * Passed to <b>pg_result_error_field</b>.
 * Detail: an optional secondary error message carrying more detail about the problem. May run to multiple lines.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_DIAG_MESSAGE_DETAIL', 68);

/**
 * Passed to <b>pg_result_error_field</b>.
 * Hint: an optional suggestion what to do about the problem. This is intended to differ from detail in that it
 * offers advice (potentially inappropriate) rather than hard facts. May run to multiple lines.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_DIAG_MESSAGE_HINT', 72);

/**
 * Passed to <b>pg_result_error_field</b>.
 * A string containing a decimal integer indicating an error cursor position as an index into the original
 * statement string. The first character has index 1, and positions are measured in characters not bytes.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_DIAG_STATEMENT_POSITION', 80);

/**
 * Passed to <b>pg_result_error_field</b>.
 * This is defined the same as the <b>PG_DIAG_STATEMENT_POSITION</b> field, but
 * it is used when the cursor position refers to an internally generated
 * command rather than the one submitted by the client. The
 * <b>PG_DIAG_INTERNAL_QUERY</b> field will always appear when this
 * field appears.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_DIAG_INTERNAL_POSITION', 112);

/**
 * Passed to <b>pg_result_error_field</b>.
 * The text of a failed internally-generated command. This could be, for example, a
 * SQL query issued by a PL/pgSQL function.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_DIAG_INTERNAL_QUERY', 113);

/**
 * Passed to <b>pg_result_error_field</b>.
 * An indication of the context in which the error occurred. Presently
 * this includes a call stack traceback of active procedural language
 * functions and internally-generated queries. The trace is one entry
 * per line, most recent first.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_DIAG_CONTEXT', 87);

/**
 * Passed to <b>pg_result_error_field</b>.
 * The file name of the PostgreSQL source-code location where the error
 * was reported.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_DIAG_SOURCE_FILE', 70);

/**
 * Passed to <b>pg_result_error_field</b>.
 * The line number of the PostgreSQL source-code location where the
 * error was reported.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_DIAG_SOURCE_LINE', 76);

/**
 * Passed to <b>pg_result_error_field</b>.
 * The name of the PostgreSQL source-code function reporting the error.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_DIAG_SOURCE_FUNCTION', 82);

/**
 * Passed to <b>pg_convert</b>.
 * Ignore default values in the table during conversion.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_CONV_IGNORE_DEFAULT', 2);

/**
 * Passed to <b>pg_convert</b>.
 * Use SQL NULL in place of an empty string.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_CONV_FORCE_NULL', 4);

/**
 * Passed to <b>pg_convert</b>.
 * Ignore conversion of <b>NULL</b> into SQL NOT NULL columns.
 * @link https://php.net/manual/en/pgsql.constants.php
 */
define('PGSQL_CONV_IGNORE_NOT_NULL', 8);
define('PGSQL_DML_NO_CONV', 256);
define('PGSQL_DML_EXEC', 512);
define('PGSQL_DML_ASYNC', 1024);
define('PGSQL_DML_STRING', 2048);

/**
 * @link https://php.net/manual/en/function.pg-last-notice.php
 * @since 7.1
 */
define('PGSQL_NOTICE_LAST', 1);

/**
 * @link https://php.net/manual/en/function.pg-last-notice.php
 * @since 7.1
 */
define('PGSQL_NOTICE_ALL', 2);

/**
 * @link https://php.net/manual/en/function.pg-last-notice.php
 * @since 7.1
 */
define('PGSQL_NOTICE_CLEAR', 3);

const PGSQL_CONNECT_ASYNC = 4;
const PGSQL_CONNECTION_AUTH_OK = 5;
const PGSQL_CONNECTION_AWAITING_RESPONSE = 4;
const PGSQL_CONNECTION_MADE = 3;
const PGSQL_CONNECTION_SETENV = 6;
const PGSQL_CONNECTION_STARTED = 2;
const PGSQL_DML_ESCAPE = 4096;
const PGSQL_POLLING_ACTIVE = 4;
const PGSQL_POLLING_FAILED = 0;
const PGSQL_POLLING_OK = 3;
const PGSQL_POLLING_READING = 1;
const PGSQL_POLLING_WRITING = 2;
const PGSQL_DIAG_SCHEMA_NAME = 115;
const PGSQL_DIAG_TABLE_NAME = 116;
const PGSQL_DIAG_COLUMN_NAME = 99;
const PGSQL_DIAG_DATATYPE_NAME = 100;
const PGSQL_DIAG_CONSTRAINT_NAME = 110;
const PGSQL_DIAG_SEVERITY_NONLOCALIZED = 86;
// End of pgsql v.
<?php
/**
 * @link https://www.php.net/manual/en/dio.constants.php
 * Direct IO Constants
 * Table of Contents
 * O_RDONLY - opens the file for read access.
 * O_WRONLY - opens the file for write access.
 * O_RDWR - opens the file for both reading and writing.
 * O_CREAT - creates the file, if it doesn't already exist.
 * O_EXCL - if both O_CREAT and O_EXCL are set and the file already exists, dio_open() will fail.
 * O_TRUNC - if the file exists and is opened for write access, the file will be truncated to zero length.
 * O_APPEND - write operations write data at the end of the file.
 * O_NONBLOCK - sets non blocking mode.
 * O_NOCTTY - prevent the OS from assigning the opened file as the process's controlling terminal when opening a TTY device file.
 * F_SETLK - Lock is set or cleared. If the lockis held by someone else dio_fcntl() returns-1.
 * F_SETLKW - like F_SETLK,but in case the lock is held by someone else, dio_fcntl() waits until the lock is released.
 * F_GETLK - dio_fcntl() returns an associative array (as described below) if someone elseprevents lock. If there is no obstruction key "type" will setto F_UNLCK.
 * F_DUPFD - finds the lowest numbered availablefile descriptor greater than or equal to argsand returns them.
 * F_SETFL - Sets the file descriptors flags tothe value specified by args, which can be O_APPEND, O_NONBLOCK or O_ASYNC. To use O_ASYNC you will need to use the PCNTL extension.
 * O_NDELAY -
 * O_SYNC -
 * O_ASYNC -
 * S_IRWXU -
 * S_IRUSR -
 * S_IWUSR -
 * S_IXUSR -
 * S_IRWXG -
 * S_IRGRP -
 * S_IWGRP -
 * S_IXGRP -
 * S_IRWXO -
 * S_IROTH -
 * S_IWOTH -
 * S_IXOTH -
 * F_GETFD -
 * F_GETFL -
 * F_SETOWN -
 * F_GETOWN -
 * F_UNLCK -
 * F_RDLCK -
 * F_WRLCK -
 */

/**
 * O_RDONLY - opens the file for read access.
 */
define('O_RDONLY', 0);

/**
 * O_WRONLY - opens the file for write access.
 */
define('O_WRONLY', 1);

/**
 * O_RDWR - opens the file for both reading and writing.
 */
define('O_RDWR', 2);

/**
 * O_CREAT - creates the file, if it doesn't already exist.
 */
define('O_CREAT', 64);

/**
 * O_EXCL - if both O_CREAT and O_EXCL are set and the file already exists, dio_open() will fail.
 */
define('O_EXCL', 128);

/**
 * O_TRUNC - if the file exists and is opened for write access, the file will be truncated to zero length.
 */
define('O_TRUNC', 512);

/**
 * O_APPEND - write operations write data at the end of the file.
 */
define('O_APPEND', 1024);

/**
 * O_NONBLOCK - sets non blocking mode.
 */
define('O_NONBLOCK', 2048);

define('O_NDELAY', 2048);
define('O_SYNC', 1052672);
define('O_ASYNC', 8192);

/**
 * O_NOCTTY - prevent the OS from assigning the opened file as the process's controlling terminal when opening a TTY device file.
 */
define('O_NOCTTY', 256);

define('S_IRWXU', 448);
define('S_IRUSR', 256);
define('S_IWUSR', 128);
define('S_IXUSR', 64);
define('S_IRWXG', 56);
define('S_IRGRP', 32);
define('S_IWGRP', 16);
define('S_IXGRP', 8);
define('S_IRWXO', 7);
define('S_IROTH', 4);
define('S_IWOTH', 2);
define('S_IXOTH', 1);

/**
 * F_DUPFD - finds the lowest numbered availablefile descriptor greater than or equal to argsand returns them.
 */
define('F_DUPFD', 0);

define('F_GETFD', 1);
define('F_GETFL', 3);

/**
 * F_SETFL - Sets the file descriptors flags tothe value specified by args, which can be O_APPEND, O_NONBLOCK or O_ASYNC. To use O_ASYNC you will need to use the PCNTL extension.
 */
define('F_SETFL', 4);

/**
 * F_GETLK - dio_fcntl() returns an associative array (as described below) if someone elseprevents lock. If there is no obstruction key "type" will setto F_UNLCK.
 */
define('F_GETLK', 5);

/**
 * F_SETLK - Lock is set or cleared. If the lockis held by someone else dio_fcntl() returns-1.
 */
define('F_SETLK', 6);

/**
 * F_SETLKW - like F_SETLK,but in case the lock is held by someone else, dio_fcntl() waits until the lock is released.
 */
define('F_SETLKW', 7);

define('F_SETOWN', 8);
define('F_GETOWN', 9);
define('F_UNLCK', 2);
define('F_RDLCK', 0);
define('F_WRLCK', 1);
<?php
/**
 * @link https://www.php.net/manual/en/ref.dio.php
 * Direct IO Functions
 * Table of Contents
 * dio_close — Closes the file descriptor given by fd
 * dio_fcntl — Performs a c library fcntl on fd
 * dio_open — Opens a file (creating it if necessary) at a lower level than the C library input/ouput stream functions allow
 * dio_read — Reads bytes from a file descriptor
 * dio_seek — Seeks to pos on fd from whence
 * dio_stat — Gets stat information about the file descriptor fd
 * dio_tcsetattr — Sets terminal attributes and baud rate for a serial port
 * dio_truncate — Truncates file descriptor fd to offset bytes
 * dio_write — Writes data to fd with optional truncation at length
 * dio_raw - Opens a raw direct IO stream.
 * dio_serial - Opens a serial direct IO stream.
 */

/**
 * Closes the file descriptor given by fd.
 *
 * dio_close ( resource $fd ) : void
 *
 * @link https://www.php.net/manual/en/function.dio-close.php
 * @param resource $fd The file descriptor returned by dio_open()
 * @return void
 */
function dio_close($fd): void {}

/**
 * The dio_fcntl() function performs the operation specified by cmd on the file descriptor fd.
 *
 * dio_fcntl ( resource $fd , int $cmd [, mixed $args ] ) : mixed
 *
 * Some commands require additional arguments args to be supplied.
 * @link https://www.php.net/manual/en/function.dio-fcntl.php
 * @param resource $fd The file descriptor returned by dio_open().
 * @param int $cmd The file descriptor returned by dio_open().
 * @param mixed ...$args args is an associative array, when cmd is F_SETLK or F_SETLLW, with the following keys:
 * <ul>
 * <li>"start" - offset where lock begins</li>
 * <li>"length" - size of locked area. zero means to end of file</li>
 * <li>"whence" - Where l_start is relative to: can be SEEK_SET, SEEK_END and SEEK_CUR</li>
 * <li>"type" - type of lock: can be F_RDLCK (read lock), F_WRLCK (write lock) or F_UNLCK (unlock)</li>
 * </ul>
 * @return mixed Returns the result of the C call.
 */
function dio_fcntl($fd, int $cmd, ...$args) {}

/**
 * Opens a file (creating it if necessary) at a lower level than theC library input/ouput stream functions allow
 *
 * dio_open ( string $filename , int $flags [, int $mode = 0 ] ) : resource
 *
 * @link https://www.php.net/manual/en/function.dio-open.php
 * @param string $filename The pathname of the file to open.
 * @param int $flags The flags parameter is a bitwise-ORed value comprising flags from the following list.
 * <ul>
 * <li>O_RDONLY - opens the file for read access.</li>
 * <li>O_WRONLY - opens the file for write access.</li>
 * <li>O_RDWR - opens the file for both reading and writing.</li>
 * <li>O_CREAT - creates the file, if it doesn't already exist.</li>
 * <li>O_EXCL - if both O_CREAT and O_EXCL are set and the file already exists, dio_open() will fail.</li>
 * <li>O_TRUNC - if the file exists and is opened for write access, the file will be truncated to zero length.</li>
 * <li>O_APPEND - write operations write data at the end of the file.</li>
 * <li>O_NONBLOCK - sets non blocking mode.</li>
 * <li>O_NOCTTY - prevent the OS from assigning the opened file as the process's controllingterminal when opening a TTY device file.</li>
 * </ul>
 * @param int $mode If flags contains O_CREAT, mode will set the permissions of the file (creation permissions).
 * @return resource|false A file descriptor or FALSE on error.
 */
function dio_open(string $filename, int $flags, int $mode = 0) {}

/**
 * Reads bytes from a file descriptor.
 *
 * dio_read ( resource $fd [, int $len = 1024 ] ) : string
 *
 * @param resource $fd The file descriptor returned by dio_open().
 * @param int $len The number of bytes to read. If not specified, dio_read() reads 1k sized block.
 * @return string The bytes read from fd.
 * @link https://www.php.net/manual/en/function.dio-read.php
 */
function dio_read($fd, int $len = 1024) {}

/**
 * Seeks to pos on fd from whence
 *
 * dio_seek ( resource $fd , int $pos [, int $whence = SEEK_SET ] ): int
 *
 * @param resource $fd The file descriptor returned by dio_open().
 * @param int $pos The new position.
 * @param int $whence Specifies how the position pos should be interpreted:
 * <ul>
 * <li>SEEK_SET - (Default) Specifies that pos is specified from the beginning of the file.</li>
 * <li>SEEK_CUR - Specifies that pos is a count of characters from the current file position. This count may be positive or negative.</li>
 * <li>SEEK_END - Specifies that pos is a count of characters from the end of the file.</li>
 * </ul>
 * @return int
 * @link https://www.php.net/manual/en/function.dio-seek.php
 */
function dio_seek($fd, int $pos, int $whence = SEEK_SET) {}

/**
 * Gets stat information about the file descriptor fd
 *
 * dio_stat ( resource $fd ) : array
 *
 * @param resource $fd The file descriptor returned by dio_open().
 * @return array|null Returns an associative array with the following keys:
 * <ul>
 * <li>"device" - device</li>
 * <li>"inode" - inode</li>
 * <li>"mode" - mode</li>
 * <li>"nlink" - number of hard links</li>
 * <li>"uid" - user id</li>
 * <li>"gid" - group id</li>
 * <li>"device_type" - device type (if inode device)</li>
 * <li>"size" - total size in bytes</li>
 * <li>"blocksize" - blocksize</li>
 * <li>"blocks" - number of blocks allocated</li>
 * <li>"atime" - time of last access</li>
 * <li>"mtime" - time of last modification</li>
 * <li>"ctime" - time of last change</li>
 * </ul>
 * On error dio_stat() returns NULL.
 * @link https://www.php.net/manual/en/function.dio-stat.php
 */
function dio_stat($fd) {}

/**
 * Sets terminal attributes and baud rate for a serial port
 *
 * dio_tcsetattr ( resource $fd , array $options ) : bool
 *
 * @param resource $fd The file descriptor returned by dio_open().
 * @param array $options The currently available options are:
 * <ul>
 * <li>"baud" - baud rate of the port - can be 38400, 19200, 9600, 4800, 2400, 1800, 1200, 600, 300, 200, 150, 134, 110, 75 or 50, default value is 9600.</li>
 * <li>"bits" - data bits - can be 8,7,6 or 5. Default value is 8.</li>
 * <li>"stop" - stop bits - can be 1 or 2. Default value is 1.</li>
 * <li>"parity" - can be 0,1 or 2. Default value is 0.</li>
 * </ul>
 * @return void
 * @link https://www.php.net/manual/en/function.dio-tcsetattr.php
 */
function dio_tcsetattr($fd, array $options) {}

/**
 * Truncates a file to at most offset bytes in size.
 *
 * dio_truncate ( resource $fd , int $offset ) : bool
 *
 * If the file previously was larger than this size, the extra data is lost.
 * If the file previously was shorter, it is unspecified whether the file is left unchanged or is extended.
 * In the latter case the extended part reads as zero bytes.
 * @param resource $fd The file descriptor returned by dio_open().
 * @param int $offset The offset in bytes.
 * @return bool Returns TRUE on success or FALSE on failure.
 * @link https://www.php.net/manual/en/function.dio-truncate.php
 */
function dio_truncate($fd, int $offset) {}

/**
 * Writes data to fd with optional truncation at length
 *
 * dio_write ( resource $fd , string $data [, int $len = 0 ] ) : int
 *
 * @link https://www.php.net/manual/en/function.dio-write.php
 * @param resource $fd The file descriptor returned by dio_open().
 * @param string $data The written data.
 * @param int $len The length of data to write in bytes. If not specified, the function writes all the data to the specified file.
 * @return int Returns the number of bytes written to fd.
 */
function dio_write($fd, string $data, int $len = 0) {}

/**
 * Opens a raw direct IO stream.
 *
 * dio_raw ( string filename , string mode [, array options] ) : ?resource
 *
 * @param string $filename The pathname of the file to open.
 * @param string $mode The mode parameter specifies the type of access you require to the stream (as fopen()).
 * @param array|null $options The currently available options are:
 * <ul>
 * <li>"data_rate" - baud rate of the port - can be 75, 110, 134, 150, 300, 600, 1200, 1800, 2400, 4800, 7200, 9600, 14400, 19200, 38400, 57600, 115200, 56000, 128000 or 256000 default value is 9600.</li>
 * <li>"data_bits" - can be 8, 7, 6 or 5. Default value is 8.</li>
 * <li>"stop_bits" - can be 1 or 2. Default value is 1.</li>
 * <li>"parity" - can be 0, 1 or 2. Default value is 0.</li>
 * <li>"flow_control" - can be 0 or 1. Default value is 1.</li>
 * <li>"is_canonical" - can be 0 or 1. Default value is 1.</li>
 * </ul>
 * @return resource|null A stream resource or null on error.
 */
function dio_raw(string $filename, string $mode, ?array $options) {}

/**
 * Opens a serial direct IO stream.
 *
 * dio_serial ( string $filename , string $mode [, array $options = null] ) : ?resource
 *
 * @param string $filename The pathname of the file to open.
 * @param string $mode The mode parameter specifies the type of access you require to the stream (as fopen()).
 * @param array|null $options The currently available options are:
 * <ul>
 * <li>"data_rate" - baud rate of the port - can be 75, 110, 134, 150, 300, 600, 1200, 1800, 2400, 4800, 7200, 9600, 14400, 19200, 38400, 57600, 115200, 56000, 128000 or 256000 default value is 9600.</li>
 * <li>"data_bits" - can be 8, 7, 6 or 5. Default value is 8.</li>
 * <li>"stop_bits" - can be 1 or 2. Default value is 1.</li>
 * <li>"parity" - can be 0, 1 or 2. Default value is 0.</li>
 * <li>"flow_control" - can be 0 or 1. Default value is 1.</li>
 * <li>"is_canonical" - can be 0 or 1. Default value is 1.</li>
 * </ul>
 * @return resource|null A stream resource or null on error.
 */
function dio_serial(string $filename, string $mode, ?array $options) {}
<?php
/**
 * This class represents a RAR archive, which may be formed by several volumes (parts) and which contains a number of
 * RAR entries (i.e., files, directories and other special objects such as symbolic links).
 *
 * Objects of this class can be traversed, yielding the entries stored in the respective RAR archive.
 * Those entries can also be obtained through {@see \RarArchive::getEntry} and {@see \RarArchive::getEntries}.
 *
 * @link https://php.net/manual/en/class.rararchive.php
 */
final class RarArchive implements Traversable
{
    /**
     * Open RAR archive
     *
     * @param string $filename Path to the Rar archive
     * @param null|string $password A plain password, if needed to decrypt the headers. It will also be used by default if
     *      encrypted files are found. Note that the files may have different passwords in respect
     *      to the headers and among them
     * @param null|callable $volume_callback A function that receives one parameter – the path of the volume that was
     *      not found – and returns a string with the correct path for such volume or NULL if such volume does not
     *      exist or is not known. The programmer should ensure the passed function doesn't cause loops as this
     *      function is called repeatedly if the path returned in a previous call did not correspond to the needed
     *      volume. Specifying this parameter omits the notice that would otherwise be emitted whenever a volume is
     *      not found; an implementation that only returns NULL can therefore be used to merely omit such notices
     *
     * @link https://php.net/manual/en/rararchive.open.php
     *
     * @return RarArchive|false the requested RarArchive instance or FALSE on failure.
     */
    public static function open($filename, $password = null, ?callable $volume_callback = null) {}

    /**
     * Close RAR archive and free all resources
     *
     * @link https://php.net/manual/en/rararchive.close.php
     *
     * @return bool TRUE on success or FALSE on failure
     */
    public function close() {}

    /**
     * Get comment text from the RAR archive
     *
     * @link https://php.net/manual/en/rararchive.getcomment.php
     *
     * @return string|null the comment or NULL if there is none
     */
    public function getComment() {}

    /**
     * Get full list of entries from the RAR archive
     *
     * @return RarEntry[]|false array of {@see RarEntry} objects or FALSE on failure
     */
    public function getEntries() {}

    /**
     * Get entry object from the RAR archive
     *
     * Get entry object (file or directory) from the RAR archive
     *
     * @link https://php.net/manual/en/rararchive.getentry.php
     *
     * @param string $entryname Path to the entry within the RAR archive
     *
     * @return RarEntry|false the matching RarEntry object or FALSE on failure
     */
    public function getEntry($entryname) {}

    /**
     * Test whether an archive is broken (incomplete)
     *
     * This function determines whether an archive is incomplete, i.e., if a volume is missing or a volume is truncated.
     *
     * @link https://php.net/manual/en/rararchive.isbroken.php
     *
     * @return bool Returns TRUE if the archive is broken, FALSE otherwise. This function may also return FALSE if
     *         the passed file has already been closed. The only way to tell the two cases apart is to enable
     *         exceptions with {@see RarException::setUsingExceptions()}; however, this should be unnecessary as a program
     *         should not operate on closed files.
     */
    public function isBroken() {}

    /**
     * Check whether the RAR archive is solid
     *
     * Check whether the RAR archive is solid. Individual file extraction is slower on solid archives
     *
     * @link https://php.net/manual/enrararchive.issolid.php
     *
     * @return bool TRUE if the archive is solid, FALSE otherwise
     */
    public function isSolid() {}

    /**
     * Whether opening broken archives is allowed
     *
     * This method defines whether broken archives can be read or all the operations that attempt to extract the
     * archive entries will fail. Broken archives are archives for which no error is detected when the file is
     * opened but an error occurs when reading the entries.
     *
     * @link https://php.net/manual/en/rararchive.setallowbroken.php
     *
     * @param bool $allow_broken Whether to allow reading broken files (TRUE) or not (FALSE)
     *
     * @return bool TRUE или FALSE в случае возникновения ошибки. It will only fail if the file has already been closed
     */
    public function setAllowBroken($allow_broken) {}

    /**
     * Get text representation
     *
     * Provides a string representation for this RarArchive object. It currently shows the full path name of the
     * archive volume that was opened and whether the resource is valid or was already closed through a
     * call to {@see RarArchive::close()}.
     *
     * This method may be used only for debugging purposes, as there are no guarantees as to which information the
     * result contains or how it is formatted.
     *
     * @return string A textual representation of this RarArchive object. The content of this
     *          representation is unspecified.
     */
    public function __toString() {}
}
/**
 * A RAR entry, representing a directory or a compressed file inside a RAR archive
 *
 * @link https://php.net/manual/en/class.rarentry.php
 */
final class RarEntry
{
    /**
     * If the return value of {@see RarEntry::getHostOs()} equals this constant, MS-DOS was used to add this entry.
     * Use instead of {@see RAR_HOST_MSDOS}.
     */
    public const HOST_MSDOS = 0;

    /**
     * If the return value of {@see RarEntry::getHostOs()} equals this constant, OS/2 was used to add this entry.
     * Intended to replace {@see RAR_HOST_OS2}.
     */
    public const HOST_OS2 = 1;

    /**
     * If the return value of {@see RarEntry::getHostOs()} equals this constant, Microsoft Windows was used to add this entry.
     * Intended to replace {@see RAR_HOST_WIN32}
     */
    public const HOST_WIN32 = 2;

    /**
     * If the return value of {@see RarEntry::getHostOs()} equals this constant, an unspecified UNIX OS was used to add
     * this entry. Intended to replace {@see RAR_HOST_UNIX}.
     */
    public const HOST_UNIX = 3;

    /**
     * If the return value of {@see RarEntry::getHostOs()} equals this constant, Mac OS was used to add this entry.
     */
    public const HOST_MACOS = 4;

    /**
     * If the return value of {@see RarEntry::getHostOs()} equals this constant, BeOS was used to add this entry.
     * Intended to replace {@see RAR_HOST_BEOS}.
     */
    public const HOST_BEOS = 5;

    /**
     * Bit that represents a Windows entry with a read-only attribute. To be used with {@see RarEntry::getAttr()} on
     * entries whose host OS is Microsoft Windows.
     */
    public const ATTRIBUTE_WIN_READONLY = 1;

    /**
     * Bit that represents a Windows entry with a hidden attribute. To be used with {@see RarEntry::getAttr()} on
     * entries whose host OS is Microsoft Windows.
     */
    public const ATTRIBUTE_WIN_HIDDEN = 2;

    /**
     * Bit that represents a Windows entry with a system attribute. To be used with {@see RarEntry::getAttr()} on
     * entries whose host OS is Microsoft Windows.
     */
    public const ATTRIBUTE_WIN_SYSTEM = 4;

    /**
     * Bit that represents a Windows entry with a directory attribute (entry is a directory). To be used with
     * {@see RarEntry::getAttr()} on entries whose host OS is Microsoft Windows. See also
     * {@see RarEntry::isDirectory()}, which also works with entries that were not added in WinRAR.
     */
    public const ATTRIBUTE_WIN_DIRECTORY = 16;

    /**
     * Bit that represents a Windows entry with an archive attribute. To be used with {@see RarEntry::getAttr()} on
     * entries whose host OS is Microsoft Windows.
     */
    public const ATTRIBUTE_WIN_ARCHIVE = 32;

    /**
     * Bit that represents a Windows entry with a device attribute. To be used with {@see RarEntry::getAttr()} on
     * entries whose host OS is Microsoft Windows.
     */
    public const ATTRIBUTE_WIN_DEVICE = 64;

    /**
     * Bit that represents a Windows entry with a normal file attribute (entry is NOT a directory). To be used with
     * {@see RarEntry::getAttr()} on entries whose host OS is Microsoft Windows. See also
     * {@see RarEntry::isDirectory()}, which also works with entries that were not added in WinRAR.
     */
    public const ATTRIBUTE_WIN_NORMAL = 128;

    /**
     * Bit that represents a Windows entry with a temporary attribute. To be used with {@see RarEntry::getAttr()} on
     * entries whose host OS is Microsoft Windows.
     */
    public const ATTRIBUTE_WIN_TEMPORARY = 256;

    /**
     * Bit that represents a Windows entry with a sparse file attribute (file is an NTFS sparse file). To be used with
     * {@see RarEntry::getAttr()} on entries whose host OS is Microsoft Windows.
     */
    public const ATTRIBUTE_WIN_SPARSE_FILE = 512;

    /**
     * Bit that represents a Windows entry with a reparse point attribute (entry is an NTFS reparse point, e.g. a
     * directory junction or a mount file system). To be used with {@see RarEntry::getAttr()} on entries whose host OS
     * is Microsoft Windows.
     */
    public const ATTRIBUTE_WIN_REPARSE_POINT = 1024;

    /**
     * Bit that represents a Windows entry with a compressed attribute (NTFS only). To be used with
     * {@see RarEntry::getAttr()} on entries whose host OS is Microsoft Windows.
     */
    public const ATTRIBUTE_WIN_COMPRESSED = 2048;

    /**
     * Bit that represents a Windows entry with an offline attribute (entry is offline and not accessible). To be used
     * with {@see RarEntry::getAttr()} on entries whose host OS is Microsoft Windows.
     */
    public const ATTRIBUTE_WIN_OFFLINE = 4096;

    /**
     * Bit that represents a Windows entry with a not content indexed attribute (entry is to be indexed). To be used
     * with {@see RarEntry::getAttr()} on entries whose host OS is Microsoft Windows.
     */
    public const ATTRIBUTE_WIN_NOT_CONTENT_INDEXED = 8192;

    /**
     * Bit that represents a Windows entry with an encrypted attribute (NTFS only). To be used with
     * {@see RarEntry::getAttr()} on entries whose host OS is Microsoft Windows.
     */
    public const ATTRIBUTE_WIN_ENCRYPTED = 16384;

    /**
     * Bit that represents a Windows entry with a virtual attribute. To be used with {@see RarEntry::getAttr()}
     * on entries whose host OS is Microsoft Windows.
     */
    public const ATTRIBUTE_WIN_VIRTUAL = 65536;

    /**
     * Bit that represents a UNIX entry that is world executable. To be used with {@see RarEntry::getAttr()} on entries
     * whose host OS is UNIX.
     */
    public const ATTRIBUTE_UNIX_WORLD_EXECUTE = 1;

    /**
     * Bit that represents a UNIX entry that is world writable. To be used with {@see RarEntry::getAttr()} on entries
     * whose host OS is UNIX.
     */
    public const ATTRIBUTE_UNIX_WORLD_WRITE = 2;

    /**
     * Bit that represents a UNIX entry that is world readable. To be used with {@see RarEntry::getAttr()} on entries
     * whose host OS is UNIX.
     */
    public const ATTRIBUTE_UNIX_WORLD_READ = 4;

    /**
     * Bit that represents a UNIX entry that is group executable. To be used with {@see RarEntry::getAttr()} on entries
     * whose host OS is UNIX.
     */
    public const ATTRIBUTE_UNIX_GROUP_EXECUTE = 8;

    /**
     * Bit that represents a UNIX entry that is group writable. To be used with {@see RarEntry::getAttr()} on entries
     * whose host OS is UNIX.
     */
    public const ATTRIBUTE_UNIX_GROUP_WRITE = 16;

    /**
     * Bit that represents a UNIX entry that is group readable. To be used with {@see RarEntry::getAttr()} on entries
     * whose host OS is UNIX.
     */
    public const ATTRIBUTE_UNIX_GROUP_READ = 32;

    /**
     * Bit that represents a UNIX entry that is owner executable. To be used with {@see RarEntry::getAttr()} on entries
     * whose host OS is UNIX.
     */
    public const ATTRIBUTE_UNIX_OWNER_EXECUTE = 64;

    /**
     * Bit that represents a UNIX entry that is owner writable. To be used with {@see RarEntry::getAttr()} on entries
     * whose host OS is UNIX.
     */
    public const ATTRIBUTE_UNIX_OWNER_WRITE = 128;

    /**
     * Bit that represents a UNIX entry that is owner readable. To be used with {@see RarEntry::getAttr()} on entries
     * whose host OS is UNIX.
     */
    public const ATTRIBUTE_UNIX_OWNER_READ = 256;

    /**
     * Bit that represents the UNIX sticky bit. To be used with {@see RarEntry::getAttr()} on entries whose host OS is
     * UNIX.
     */
    public const ATTRIBUTE_UNIX_STICKY = 512;

    /**
     * Bit that represents the UNIX setgid attribute. To be used with {@see RarEntry::getAttr()} on entries whose host
     * OS is UNIX.
     */
    public const ATTRIBUTE_UNIX_SETGID = 1024;

    /**
     * Bit that represents the UNIX setuid attribute. To be used with {@see RarEntry::getAttr()} on entries whose host
     * OS is UNIX.
     */
    public const ATTRIBUTE_UNIX_SETUID = 2048;

    /**
     * Mask to isolate the last four bits (nibble) of UNIX attributes (_S_IFMT, the type of file mask). To be used with
     * {@see RarEntry::getAttr()} on entries whose host OS is UNIX and with the constants
     * {@see RarEntry::ATTRIBUTE_UNIX_FIFO}, {@see RarEntry::ATTRIBUTE_UNIX_CHAR_DEV},
     * {@see RarEntry::ATTRIBUTE_UNIX_DIRECTORY}, {@see RarEntry::ATTRIBUTE_UNIX_BLOCK_DEV},
     * {@see RarEntry::ATTRIBUTE_UNIX_REGULAR_FILE},
     * {@see RarEntry::ATTRIBUTE_UNIX_SYM_LINK} and {@see RarEntry::ATTRIBUTE_UNIX_SOCKET}.
     */
    public const ATTRIBUTE_UNIX_FINAL_QUARTET = 61440;

    /**
     * Unix FIFOs will have attributes whose last four bits have this value. To be used with {@see RarEntry::getAttr()}
     * on entries whose host OS is UNIX and with the constant {@see RarEntry::ATTRIBUTE_UNIX_FINAL_QUARTET}.
     */
    public const ATTRIBUTE_UNIX_FIFO = 4096;

    /**
     * Unix character devices will have attributes whose last four bits have this value. To be used with
     * {@see RarEntry::getAttr()} on entries whose host OS is UNIX and with the constant
     * {@see RarEntry::ATTRIBUTE_UNIX_FINAL_QUARTET}.
     */
    public const ATTRIBUTE_UNIX_CHAR_DEV = 8192;

    /**
     * Unix directories will have attributes whose last four bits have this value. To be used with
     * {@see RarEntry::getAttr()} on entries whose host OS is UNIX and with the constant
     * {@see RarEntry::ATTRIBUTE_UNIX_FINAL_QUARTET}.
     *
     * See also {@see RarEntry::isDirectory()}, which also works with entries that were added in other operating
     * systems.
     */
    public const ATTRIBUTE_UNIX_DIRECTORY = 16384;

    /**
     * Unix block devices will have attributes whose last four bits have this value. To be used with
     * {@see RarEntry::getAttr()} on entries whose host OS is UNIX and with the constant
     * {@see RarEntry::ATTRIBUTE_UNIX_FINAL_QUARTET}.
     */
    public const ATTRIBUTE_UNIX_BLOCK_DEV = 24576;

    /**
     * Unix regular files (not directories) will have attributes whose last four bits have this value. To be used with
     * {@see RarEntry::getAttr()} on entries whose host OS is UNIX and with the constant
     * {@see RarEntry::ATTRIBUTE_UNIX_FINAL_QUARTET}. See also {@see RarEntry::isDirectory()}, which also works with
     * entries that were added in other operating systems.
     */
    public const ATTRIBUTE_UNIX_REGULAR_FILE = 32768;

    /**
     * Unix symbolic links will have attributes whose last four bits have this value. To be used with
     * {@see RarEntry::getAttr()} on entries whose host OS is UNIX and with the constant
     * {@see RarEntry::ATTRIBUTE_UNIX_FINAL_QUARTET}.
     */
    public const ATTRIBUTE_UNIX_SYM_LINK = 40960;

    /**
     * Unix sockets will have attributes whose last four bits have this value. To be used with
     * {@see RarEntry::getAttr()} on entries whose host OS is UNIX and with the constant
     * {@see RarEntry::ATTRIBUTE_UNIX_FINAL_QUARTET}.
     */
    public const ATTRIBUTE_UNIX_SOCKET = 49152;

    /**
     * Extract entry from the archive
     *
     * extracts the entry's data. It will create new file in the specified dir with the name identical to the entry's
     * name, unless the second argument is specified.
     *
     * @link https://php.net/manual/en/rarentry.extract.php
     *
     * @param string $dir Path to the directory where files should be extracted. This parameter is considered if and
     *      only if filepath is not. If both parameters are empty an extraction to the current directory
     *      will be attempted.
     * @param string $filepath Path (relative or absolute) containing the directory and filename of the extracted file.
     *      This parameter overrides both the parameter dir and the original file name.
     * @param string $password The password used to encrypt this entry. If the entry is not encrypted, this value will
     *      not be used and can be omitted. If this parameter is omitted and the entry is encrypted, the password
     *      given to rar_open(), if any, will be used. If a wrong password is given, either explicitly or implicitly
     *      via rar_open(), CRC checking will fail and this method will fail and return FALSE. If no password is given
     *      and one is required, this method will fail and return FALSE. You can check whether an entry is encrypted
     *      with {@see RarEntry::isEncrypted()}.
     * @param bool $extended_data If TRUE, extended information such as NTFS ACLs and Unix owner information will be
     *      set in the extract files, as long as it's present in the archive.
     *
     * @return bool TRUE on success or FALSE on failure
     */
    public function extract($dir, $filepath = "", $password = null, $extended_data = false) {}

    /**
     * Get attributes of the entry
     *
     * Returns the OS-dependent attributes of the archive entry
     *
     * @link https://php.net/manual/en/rarentry.getattr.php
     *
     * @return int|false the attributes or FALSE on error
     */
    public function getAttr() {}

    /**
     * Get CRC of the entry
     *
     * Returns an hexadecimal string representation of the CRC of the archive entry.
     *
     * @link https://php.net/manual/en/rarentry.getcrc.php
     *
     * @return string|false the CRC of the archive entry or FALSE on error
     */
    public function getCrc() {}

    /**
     * Get entry last modification time
     *
     * @link https://php.net/manual/en/rarentry.getfiletime.php
     *
     * @return string|false entry last modification time as string in format YYYY-MM-DD HH:II:SS, or FALSE on errors
     */
    public function getFileTime() {}

    /**
     * Get entry host OS
     *
     * Returns the code of the host OS of the archive entry
     *
     * @link https://php.net/manual/en/rarentry.gethostos.php
     *
     * @return int|false the code of the host OS, or FALSE on error
     */
    public function getHostOs() {}

    /**
     * Get pack method of the entry
     *
     * returns number of the method used when adding current archive entry
     *
     * @link https://php.net/manual/en/rarentry.getmethod.php
     *
     * @return int|false the method number or FALSE on error
     */
    public function getMethod() {}

    /**
     * Get name of the entry
     *
     * Returns the name (with path) of the archive entry.
     *
     * @link https://php.net/manual/en/rarentry.getname.php
     *
     * @return string|false the entry name as a string, or FALSE on error.
     */
    public function getName() {}

    /**
     * Get packed size of the entry
     *
     * @link https://php.net/manual/en/rarentry.getpackedsize.php
     *
     * @return int|false the packed size, or FALSE on error
     */
    public function getPackedSize() {}

    /**
     * Get file handler for entry
     *
     * Returns a file handler that supports read operations. This handler provides on-the-fly decompression for
     * this entry. The handler is not invalidated by calling {@see rar_close()}.
     *
     * @link https://php.net/manual/en/rarentry.getstream.php
     *
     * @param string $password The password used to encrypt this entry. If the entry is not encrypted, this value will
     *      not be used and can be omitted. If this parameter is omitted and the entry is encrypted,
     *      the password given to {@see rar_open()}, if any, will be used. If a wrong password is given, either
     *      explicitly or implicitly via {@see rar_open()}, this method's resulting stream will produce wrong output.
     *      If no password is given and one is required, this method will fail and return FALSE. You can check
     *      whether an entry is encrypted with {@see RarEntry::isEncrypted()}.
     *
     * @return resource|false file handler or FALSE on failure
     */
    public function getStream($password = '') {}

    /**
     * Get unpacked size of the entry
     * @link https://php.net/manual/en/rarentry.getunpackedsize.php
     * @return int|false the unpacked size, or FALSE on error
     */
    public function getUnpackedSize() {}

    /**
     * Get minimum version of RAR program required to unpack the entry
     *
     * Returns minimum version of RAR program (e.g. WinRAR) required to unpack the entry. It is encoded as
     * 10 * major version + minor version.
     *
     * @link https://php.net/manual/en/rarentry.getversion.php
     *
     * @return int|false the version or FALSE on error
     */
    public function getVersion() {}

    /**
     * Test whether an entry represents a directory
     *
     * @link https://php.net/manual/en/rarentry.isdirectory.php
     *
     * @return bool TRUE if this entry is a directory and FALSE otherwise.
     */
    public function isDirectory() {}

    /**
     * Test whether an entry is encrypted
     *
     * @link https://php.net/manual/en/rarentry.isencrypted.php
     *
     * @return bool TRUE if the current entry is encrypted and FALSE otherwise
     */
    public function isEncrypted() {}

    /**
     * Get text representation of entry
     *
     * Returns a textual representation for this entry. It includes whether the entry is a file or a directory
     * (symbolic links and other special objects will be treated as files), the UTF-8 name of the entry and its CRC.
     * The form and content of this representation may be changed in the future, so they cannot be relied upon.
     *
     * @link https://php.net/manual/en/rarentry.tostring.php
     *
     * @return string A textual representation for the entry
     */
    public function __toString() {}
}
/**
 * This class serves two purposes:
 * it is the type of the exceptions thrown by the RAR extension functions and methods and it allows, through static
 * methods to query and define the error behaviour of the extension, i.e., whether exceptions are thrown or only
 * warnings are emitted.<br>
 * The following error codes are used:<br><ul>
 * <li>-1 - error outside UnRAR library</li>
 * <li>11 - insufficient memory</li>
 * <li>12 - bad data</li>
 * <li>13 - bad archive</li>
 * <li>14 - unknown format</li>
 * <li>15 - file open error</li>
 * <li>16 - file create error</li>
 * <li>17 - file close error</li>
 * <li>18 - read error</li>
 * <li>19 - write error</li>
 * <li>20 - buffer too small</li>
 * <li>21 - unkown RAR error</li>
 * <li>22 - password required but not given</li>
 * </ul>
 *
 * @link https://php.net/manual/en/class.rarexception.php
 */
final class RarException extends Exception
{
    /**
     * Check whether error handling with exceptions is in use
     *
     * @link https://php.net/manual/en/rarexception.isusingexceptions.php
     *
     * @return bool TRUE if exceptions are being used, FALSE otherwise
     */
    public static function isUsingExceptions() {}

    /**
     * Activate and deactivate error handling with exceptions
     *
     * @link https://php.net/manual/en/rarexception.setusingexceptions.php
     *
     * @param bool $using_exceptions Should be TRUE to activate exception throwing, FALSE to deactivate (the default)
     */
    public static function setUsingExceptions($using_exceptions) {}
}
<?php

define("LEVELDB_NO_COMPRESSION", 0);

define("LEVELDB_SNAPPY_COMPRESSION", 1);

class LevelDB
{
    /**
     * @param string $name Path to database
     * @param array  $options
     * @param array  $read_options
     * @param array  $write_options
     */
    public function __construct($name, array $options = [
        'create_if_missing' => true, // if the specified database does not exist will create a new one
        'error_if_exists' => false, // if the opened database exists will throw exception
        'paranoid_checks' => false,
        'block_cache_size' => 8 * (2 << 20),
        'write_buffer_size' => 4 << 20,
        'block_size' => 4096,
        'max_open_files' => 1000,
        'block_restart_interval' => 16,
        'compression' => LEVELDB_SNAPPY_COMPRESSION,
        'comparator' => null, // any callable parameter return 0, -1, 1
    ], array $read_options = [
        'verify_check_sum' => false, //may be set to true to force checksum verification of all data that is read from the file system on behalf of a particular read. By default, no such verification is done.
        'fill_cache' => true, //When performing a bulk read, the application may set this to false to disable the caching so that the data processed by the bulk read does not end up displacing most of the cached contents.
    ], array $write_options = [
        //Only one element named sync in the write option array. By default, each write to leveldb is asynchronous.
        'sync' => false
    ]) {}

    /**
     * @param string $key
     * @param array  $read_options
     *
     * @return string|false
     */
    public function get($key, array $read_options = []) {}

    /**
     * Alias of LevelDB::put()
     *
     * @param string $key
     * @param string $value
     * @param array  $write_options
     */
    public function set($key, $value, array $write_options = []) {}

    /**
     * @param string $key
     * @param string $value
     * @param array  $write_options
     */
    public function put($key, $value, array $write_options = []) {}

    /**
     * @param string $key
     * @param array  $write_options
     *
     * @return bool
     */
    public function delete($key, array $write_options = []) {}

    /**
     * Executes all of the operations added in the write batch.
     *
     * @param LevelDBWriteBatch $batch
     * @param array             $write_options
     */
    public function write(LevelDBWriteBatch $batch, array $write_options = []) {}

    /**
     * Valid properties:
     * - leveldb.stats: returns the status of the entire db
     * - leveldb.num-files-at-level: returns the number of files for each level. For example, you can use leveldb.num-files-at-level0 the number of files for zero level.
     * - leveldb.sstables: returns current status of sstables
     *
     * @param string $name
     *
     * @return mixed
     */
    public function getProperty($name) {}

    public function getApproximateSizes($start, $limit) {}

    public function compactRange($start, $limit) {}

    public function close() {}

    /**
     * @param array $options
     *
     * @return LevelDBIterator
     */
    public function getIterator(array $options = []) {}

    /**
     * @return LevelDBSnapshot
     */
    public function getSnapshot() {}

    public static function destroy($name, array $options = []) {}

    public static function repair($name, array $options = []) {}
}

class LevelDBIterator implements Iterator
{
    public function __construct(LevelDB $db, array $read_options = []) {}

    public function valid() {}

    public function rewind() {}

    public function last() {}

    public function seek($key) {}

    public function next() {}

    public function prev() {}

    public function key() {}

    public function current() {}

    public function getError() {}

    public function destroy() {}
}

class LevelDBWriteBatch
{
    public function __construct() {}

    public function set($key, $value, array $write_options = []) {}

    public function put($key, $value, array $write_options = []) {}

    public function delete($key, array $write_options = []) {}

    public function clear() {}
}

class LevelDBSnapshot
{
    public function __construct(LevelDB $db) {}

    public function release() {}
}

class LevelDBException extends Exception {}
<?php

// Start of ming v.

class SWFShape
{
    public function __construct() {}

    public function setLine() {}

    public function addFill() {}

    public function setLeftFill() {}

    public function setRightFill() {}

    public function movePenTo() {}

    public function movePen() {}

    public function drawLineTo() {}

    public function drawLine() {}

    public function drawCurveTo() {}

    public function drawCurve() {}

    public function drawGlyph() {}

    public function drawCircle() {}

    public function drawArc() {}

    public function drawCubic() {}

    public function drawCubicTo() {}
}

class SWFFill
{
    public function __construct() {}

    public function moveTo() {}

    public function scaleTo() {}

    public function rotateTo() {}

    public function skewXTo() {}

    public function skewYTo() {}
}

class SWFGradient
{
    public function __construct() {}

    public function addEntry() {}
}

class SWFBitmap
{
    public function __construct() {}

    public function getWidth() {}

    public function getHeight() {}
}

class SWFText
{
    public function __construct() {}

    public function setFont() {}

    public function setHeight() {}

    public function setSpacing() {}

    public function setColor() {}

    public function moveTo() {}

    public function addString() {}

    public function addUTF8String() {}

    public function getWidth() {}

    public function getUTF8Width() {}

    public function getAscent() {}

    public function getDescent() {}

    public function getLeading() {}
}

class SWFTextField
{
    public function __construct() {}

    public function setFont() {}

    public function setBounds() {}

    public function align() {}

    public function setHeight() {}

    public function setLeftMargin() {}

    public function setRightMargin() {}

    public function setMargins() {}

    public function setIndentation() {}

    public function setLineSpacing() {}

    public function setColor() {}

    public function setName() {}

    public function addString() {}

    public function setPadding() {}

    public function addChars() {}
}

class SWFFont
{
    public function __construct() {}

    public function getWidth() {}

    public function getUTF8Width() {}

    public function getAscent() {}

    public function getDescent() {}

    public function getLeading() {}

    public function getShape() {}
}

class SWFDisplayItem
{
    public function moveTo() {}

    public function move() {}

    public function scaleTo() {}

    public function scale() {}

    public function rotateTo() {}

    public function rotate() {}

    public function skewXTo() {}

    public function skewX() {}

    public function skewYTo() {}

    public function skewY() {}

    public function setMatrix() {}

    public function setDepth() {}

    public function setRatio() {}

    public function addColor() {}

    public function multColor() {}

    public function setName() {}

    public function addAction() {}

    public function remove() {}

    public function setMaskLevel() {}

    public function endMask() {}

    public function getX() {}

    public function getY() {}

    public function getXScale() {}

    public function getYScale() {}

    public function getXSkew() {}

    public function getYSkew() {}

    public function getRot() {}
}

class SWFMovie
{
    public function __construct() {}

    public function nextFrame() {}

    public function labelFrame() {}

    public function add() {}

    public function remove() {}

    public function output() {}

    public function save() {}

    public function saveToFile() {}

    public function setBackground() {}

    public function setRate() {}

    public function setDimension() {}

    public function setFrames() {}

    public function streamMP3() {}

    public function addExport() {}

    public function writeExports() {}

    public function startSound() {}

    public function stopSound() {}

    public function importChar() {}

    public function importFont() {}

    public function addFont() {}

    public function protect() {}

    public function namedAnchor() {}
}

class SWFButton
{
    public function __construct() {}

    public function setHit() {}

    public function setOver() {}

    public function setUp() {}

    public function setDown() {}

    public function setAction() {}

    public function addShape() {}

    public function setMenu() {}

    public function addAction() {}

    public function addSound() {}
}

class SWFAction
{
    public function __construct() {}
}

class SWFMorph
{
    public function __construct() {}

    public function getShape1() {}

    public function getShape2() {}
}

class SWFSprite
{
    public function __construct() {}

    public function add() {}

    public function remove() {}

    public function nextFrame() {}

    public function labelFrame() {}

    public function setFrames() {}

    public function startSound() {}

    public function stopSound() {}
}

class SWFSound
{
    public function __construct() {}
}

class SWFFontChar
{
    public function addChars() {}

    public function addUTF8Chars() {}
}

class SWFSoundInstance
{
    public function noMultiple() {}

    public function loopInPoint() {}

    public function loopOutPoint() {}

    public function loopCount() {}
}

class SWFVideoStream
{
    public function __construct() {}

    public function setdimension() {}

    public function getnumframes() {}
}

/**
 * Set cubic threshold
 * @link https://php.net/manual/en/function.ming-setcubicthreshold.php
 * @param int $threshold <p>
 * The Threshold. Lower is more accurate, hence larger file size.
 * </p>
 * @return void
 */
function ming_setcubicthreshold($threshold) {}

/**
 * Set the global scaling factor.
 * @link https://php.net/manual/en/function.ming-setscale.php
 * @param float $scale <p>
 * The scale to be set.
 * </p>
 * @return void
 */
function ming_setscale($scale) {}

/**
 * Sets the SWF version
 * @link https://php.net/manual/en/function.ming-useswfversion.php
 * @param int $version <p>
 * SWF version to use.
 * </p>
 * @return void
 */
function ming_useswfversion($version) {}

/**
 * Returns the action flag for keyPress(char)
 * @link https://php.net/manual/en/function.ming-keypress.php
 * @param string $char
 * @return int What the function returns, first on success, then on failure. See
 * also the &amp;return.success; entity
 */
function ming_keypress($char) {}

/**
 * Use constant pool
 * @link https://php.net/manual/en/function.ming-useconstants.php
 * @param int $use <p>
 * Its description
 * </p>
 * @return void
 */
function ming_useconstants($use) {}

/**
 * Sets the SWF output compression
 * @link https://php.net/manual/en/function.ming-setswfcompression.php
 * @param int $level <p>
 * The new compression level. Should be a value between 1 and 9
 * inclusive.
 * </p>
 * @return void
 */
function ming_setswfcompression($level) {}

define('MING_NEW', 1);
define('MING_ZLIB', 1);
define('SWFBUTTON_HIT', 8);
define('SWFBUTTON_DOWN', 4);
define('SWFBUTTON_OVER', 2);
define('SWFBUTTON_UP', 1);
define('SWFBUTTON_MOUSEUPOUTSIDE', 64);
define('SWFBUTTON_DRAGOVER', 160);
define('SWFBUTTON_DRAGOUT', 272);
define('SWFBUTTON_MOUSEUP', 8);
define('SWFBUTTON_MOUSEDOWN', 4);
define('SWFBUTTON_MOUSEOUT', 2);
define('SWFBUTTON_MOUSEOVER', 1);
define('SWFFILL_RADIAL_GRADIENT', 18);
define('SWFFILL_LINEAR_GRADIENT', 16);
define('SWFFILL_TILED_BITMAP', 64);
define('SWFFILL_CLIPPED_BITMAP', 65);
define('SWFTEXTFIELD_HASLENGTH', 2);
define('SWFTEXTFIELD_NOEDIT', 8);
define('SWFTEXTFIELD_PASSWORD', 16);
define('SWFTEXTFIELD_MULTILINE', 32);
define('SWFTEXTFIELD_WORDWRAP', 64);
define('SWFTEXTFIELD_DRAWBOX', 2048);
define('SWFTEXTFIELD_NOSELECT', 4096);
define('SWFTEXTFIELD_HTML', 512);
define('SWFTEXTFIELD_USEFONT', 256);
define('SWFTEXTFIELD_AUTOSIZE', 16384);
define('SWFTEXTFIELD_ALIGN_LEFT', 0);
define('SWFTEXTFIELD_ALIGN_RIGHT', 1);
define('SWFTEXTFIELD_ALIGN_CENTER', 2);
define('SWFTEXTFIELD_ALIGN_JUSTIFY', 3);
define('SWFACTION_ONLOAD', 1);
define('SWFACTION_ENTERFRAME', 2);
define('SWFACTION_UNLOAD', 4);
define('SWFACTION_MOUSEMOVE', 8);
define('SWFACTION_MOUSEDOWN', 16);
define('SWFACTION_MOUSEUP', 32);
define('SWFACTION_KEYDOWN', 64);
define('SWFACTION_KEYUP', 128);
define('SWFACTION_DATA', 256);
define('SWF_SOUND_NOT_COMPRESSED', 0);
define('SWF_SOUND_ADPCM_COMPRESSED', 16);
define('SWF_SOUND_MP3_COMPRESSED', 32);
define('SWF_SOUND_NOT_COMPRESSED_LE', 48);
define('SWF_SOUND_NELLY_COMPRESSED', 96);
define('SWF_SOUND_5KHZ', 0);
define('SWF_SOUND_11KHZ', 4);
define('SWF_SOUND_22KHZ', 8);
define('SWF_SOUND_44KHZ', 12);
define('SWF_SOUND_8BITS', 0);
define('SWF_SOUND_16BITS', 2);
define('SWF_SOUND_MONO', 0);
define('SWF_SOUND_STEREO', 1);

// End of ming v.
<?php

namespace FTP;

/**
 * @since 8.1
 */
final class Connection {}
<?php

// Start of ftp v.
use JetBrains\PhpStorm\ExpectedValues as EV;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;

/**
 * append the contents of a file to another file on the ftp server
 * @param resource $ftp
 * @param string $remote_filename
 * @param string $local_filename
 * @param int $mode Optional since PHP 7.3
 * @return bool
 * @since 7.2
 */
function ftp_append(
    #[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp,
    string $remote_filename,
    string $local_filename,
    #[EV([FTP_ASCII, FTP_BINARY])]
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')]
    int $mode,
    #[EV([FTP_ASCII, FTP_BINARY])]
    #[PhpStormStubsElementAvailable(from: '7.3')]
    int $mode = FTP_BINARY
): bool {}

/**
 * returns a list of files in the given directory
 * @param resource $ftp
 * @param string $directory
 * @return array|false
 * @since 7.2
 */
function ftp_mlsd(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $directory): array|false {}

/**
 * Opens an FTP connection
 * @link https://php.net/manual/en/function.ftp-connect.php
 * @param string $hostname <p>
 * The FTP server address. This parameter shouldn't have any trailing
 * slashes and shouldn't be prefixed with ftp://.
 * </p>
 * @param int $port [optional] <p>
 * This parameter specifies an alternate port to connect to. If it is
 * omitted or set to zero, then the default FTP port, 21, will be used.
 * </p>
 * @param int $timeout [optional] <p>
 * This parameter specifies the timeout for all subsequent network operations.
 * If omitted, the default value is 90 seconds. The timeout can be changed and
 * queried at any time with <b>ftp_set_option</b> and
 * <b>ftp_get_option</b>.
 * </p>
 * @return resource|false a FTP stream on success or <b>FALSE</b> on error.
 */
#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection|false'], default: 'resource|false')]
function ftp_connect(string $hostname, int $port = 21, int $timeout = 90) {}

/**
 * Opens a Secure SSL-FTP connection
 * @link https://php.net/manual/en/function.ftp-ssl-connect.php
 * @param string $hostname <p>
 * The FTP server address. This parameter shouldn't have any trailing
 * slashes and shouldn't be prefixed with ftp://.
 * </p>
 * @param int $port [optional] <p>
 * This parameter specifies an alternate port to connect to. If it is
 * omitted or set to zero, then the default FTP port, 21, will be used.
 * </p>
 * @param int $timeout [optional] <p>
 * This parameter specifies the timeout for all subsequent network operations.
 * If omitted, the default value is 90 seconds. The timeout can be changed and
 * queried at any time with <b>ftp_set_option</b> and
 * <b>ftp_get_option</b>.
 * </p>
 * @return resource|false a SSL-FTP stream on success or <b>FALSE</b> on error.
 */
#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection|false'], default: 'resource|false')]
function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90) {}

/**
 * Logs in to an FTP connection
 * @link https://php.net/manual/en/function.ftp-login.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @param string $username <p>
 * The username (USER).
 * </p>
 * @param string $password <p>
 * The password (PASS).
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * If login fails, PHP will also throw a warning.
 */
function ftp_login(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $username, string $password): bool {}

/**
 * Returns the current directory name
 * @link https://php.net/manual/en/function.ftp-pwd.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @return string|false the current directory name or <b>FALSE</b> on error.
 */
function ftp_pwd(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp): string|false {}

/**
 * Changes to the parent directory
 * @link https://php.net/manual/en/function.ftp-cdup.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function ftp_cdup(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp): bool {}

/**
 * Changes the current directory on a FTP server
 * @link https://php.net/manual/en/function.ftp-chdir.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @param string $directory <p>
 * The target directory.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * If changing directory fails, PHP will also throw a warning.
 */
function ftp_chdir(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $directory): bool {}

/**
 * Requests execution of a command on the FTP server
 * @link https://php.net/manual/en/function.ftp-exec.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @param string $command <p>
 * The command to execute.
 * </p>
 * @return bool <b>TRUE</b> if the command was successful (server sent response code:
 * 200); otherwise returns <b>FALSE</b>.
 */
function ftp_exec(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $command): bool {}

/**
 * Sends an arbitrary command to an FTP server
 * @link https://php.net/manual/en/function.ftp-raw.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @param string $command <p>
 * The command to execute.
 * </p>
 * @return string[] the server's response as an array of strings.
 * No parsing is performed on the response string, nor does
 * <b>ftp_raw</b> determine if the command succeeded.
 */
#[LanguageLevelTypeAware(['8.0' => 'array|null'], default: 'array')]
function ftp_raw(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $command) {}

/**
 * Creates a directory
 * @link https://php.net/manual/en/function.ftp-mkdir.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @param string $directory <p>
 * The name of the directory that will be created.
 * </p>
 * @return string|false the newly created directory name on success or <b>FALSE</b> on error.
 */
function ftp_mkdir(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $directory): string|false {}

/**
 * Removes a directory
 * @link https://php.net/manual/en/function.ftp-rmdir.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @param string $directory <p>
 * The directory to delete. This must be either an absolute or relative
 * path to an empty directory.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function ftp_rmdir(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $directory): bool {}

/**
 * Set permissions on a file via FTP
 * @link https://php.net/manual/en/function.ftp-chmod.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @param int $permissions <p>
 * The new permissions, given as an octal value.
 * </p>
 * @param string $filename <p>
 * The remote file.
 * </p>
 * @return int|false the new file permissions on success or <b>FALSE</b> on error.
 */
function ftp_chmod(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, int $permissions, string $filename): int|false {}

/**
 * Allocates space for a file to be uploaded
 * @link https://php.net/manual/en/function.ftp-alloc.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @param int $size <p>
 * The number of bytes to allocate.
 * </p>
 * @param string &$response [optional] <p>
 * A textual representation of the servers response will be returned by
 * reference in <i>result</i> if a variable is provided.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function ftp_alloc(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, int $size, &$response): bool {}

/**
 * Returns a list of files in the given directory
 * @link https://php.net/manual/en/function.ftp-nlist.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @param string $directory <p>
 * The directory to be listed. This parameter can also include arguments, eg.
 * ftp_nlist($conn_id, "-la /your/dir");
 * Note that this parameter isn't escaped so there may be some issues with
 * filenames containing spaces and other characters.
 * </p>
 * @return string[]|false an array of filenames from the specified directory on success or
 * <b>FALSE</b> on error.
 */
function ftp_nlist(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $directory): array|false {}

/**
 * Returns a detailed list of files in the given directory
 * @link https://php.net/manual/en/function.ftp-rawlist.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @param string $directory <p>
 * The directory path. May include arguments for the LIST
 * command.
 * </p>
 * @param bool $recursive [optional] <p>
 * If set to <b>TRUE</b>, the issued command will be LIST -R.
 * </p>
 * @return string[]|false an array where each element corresponds to one line of text.
 * <p>
 * The output is not parsed in any way. The system type identifier returned by
 * <b>ftp_systype</b> can be used to determine how the results
 * should be interpreted.
 * </p>
 */
function ftp_rawlist(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $directory, bool $recursive = false): array|false {}

/**
 * Returns the system type identifier of the remote FTP server
 * @link https://php.net/manual/en/function.ftp-systype.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @return string|false the remote system type, or <b>FALSE</b> on error.
 */
function ftp_systype(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp): string|false {}

/**
 * Turns passive mode on or off
 * @link https://php.net/manual/en/function.ftp-pasv.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @param bool $enable <p>
 * If <b>TRUE</b>, the passive mode is turned on, else it's turned off.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function ftp_pasv(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, bool $enable): bool {}

/**
 * Downloads a file from the FTP server
 * @link https://php.net/manual/en/function.ftp-get.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @param string $local_filename <p>
 * The local file path (will be overwritten if the file already exists).
 * </p>
 * @param string $remote_filename <p>
 * The remote file path.
 * </p>
 * @param int $mode <p>
 * The transfer mode. Must be either <b>FTP_ASCII</b> or <b>FTP_BINARY</b>. Optional since PHP 7.3
 * </p>
 * @param int $offset [optional] <p>
 * The position in the remote file to start downloading from.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function ftp_get(
    #[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp,
    string $local_filename,
    string $remote_filename,
    #[EV([FTP_ASCII, FTP_BINARY])]
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')]
    int $mode,
    #[EV([FTP_ASCII, FTP_BINARY])]
    #[PhpStormStubsElementAvailable(from: '7.3')]
    int $mode = FTP_BINARY,
    int $offset = 0
): bool {}

/**
 * Downloads a file from the FTP server and saves to an open file
 * @link https://php.net/manual/en/function.ftp-fget.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @param resource $stream <p>
 * An open file pointer in which we store the data.
 * </p>
 * @param string $remote_filename <p>
 * The remote file path.
 * </p>
 * @param int $mode <p>
 * The transfer mode. Must be either <b>FTP_ASCII</b> or <b>FTP_BINARY</b>. Since PHP 7.3 parameter is optional
 * </p>
 * @param int $offset [optional] <p>
 * The position in the remote file to start downloading from.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function ftp_fget(
    #[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp,
    $stream,
    string $remote_filename,
    #[EV([FTP_ASCII, FTP_BINARY])]
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')]
    int $mode,
    #[EV([FTP_ASCII, FTP_BINARY])]
    #[PhpStormStubsElementAvailable(from: '7.3')]
    int $mode = FTP_BINARY,
    int $offset = 0
): bool {}

/**
 * Uploads a file to the FTP server
 * @link https://php.net/manual/en/function.ftp-put.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @param string $remote_filename <p>
 * The remote file path.
 * </p>
 * @param string $local_filename <p>
 * The local file path.
 * </p>
 * @param int $mode <p>
 * The transfer mode. Must be either <b>FTP_ASCII</b> or <b>FTP_BINARY</b>. Optional since PHP 7.3
 * </p>
 * @param int $offset [optional] <p>The position in the remote file to start uploading to.</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function ftp_put(
    #[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp,
    string $remote_filename,
    string $local_filename,
    #[EV([FTP_ASCII, FTP_BINARY])]
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')]
    int $mode,
    #[EV([FTP_ASCII, FTP_BINARY])]
    #[PhpStormStubsElementAvailable(from: '7.3')]
    int $mode = FTP_BINARY,
    int $offset = 0
): bool {}

/**
 * Uploads from an open file to the FTP server
 * @link https://php.net/manual/en/function.ftp-fput.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @param string $remote_filename <p>
 * The remote file path.
 * </p>
 * @param resource $stream <p>
 * An open file pointer on the local file. Reading stops at end of file.
 * </p>
 * @param int $mode <p>
 * The transfer mode. Must be either <b>FTP_ASCII</b> or <b>FTP_BINARY</b>. Optional since PHP 7.3
 * </p>
 * @param int $offset [optional] <p>The position in the remote file to start uploading to.</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function ftp_fput(
    #[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp,
    string $remote_filename,
    $stream,
    #[EV([FTP_ASCII, FTP_BINARY])]
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')]
    int $mode,
    #[EV([FTP_ASCII, FTP_BINARY])]
    #[PhpStormStubsElementAvailable(from: '7.3')]
    int $mode = FTP_BINARY,
    int $offset = 0
): bool {}

/**
 * Returns the size of the given file
 * @link https://php.net/manual/en/function.ftp-size.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @param string $filename <p>
 * The remote file.
 * </p>
 * @return int the file size on success, or -1 on error.
 */
function ftp_size(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $filename): int {}

/**
 * Returns the last modified time of the given file
 * @link https://php.net/manual/en/function.ftp-mdtm.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @param string $filename <p>
 * The file from which to extract the last modification time.
 * </p>
 * @return int the last modified time as a Unix timestamp on success, or -1 on
 * error.
 */
function ftp_mdtm(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $filename): int {}

/**
 * Renames a file or a directory on the FTP server
 * @link https://php.net/manual/en/function.ftp-rename.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @param string $from <p>
 * The old file/directory name.
 * </p>
 * @param string $to <p>
 * The new name.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function ftp_rename(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $from, string $to): bool {}

/**
 * Deletes a file on the FTP server
 * @link https://php.net/manual/en/function.ftp-delete.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @param string $filename <p>
 * The file to delete.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function ftp_delete(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $filename): bool {}

/**
 * Sends a SITE command to the server
 * @link https://php.net/manual/en/function.ftp-site.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @param string $command <p>
 * The SITE command. Note that this parameter isn't escaped so there may
 * be some issues with filenames containing spaces and other characters.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function ftp_site(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $command): bool {}

/**
 * Closes an FTP connection
 * @link https://php.net/manual/en/function.ftp-close.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function ftp_close(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp): bool {}

/**
 * Set miscellaneous runtime FTP options
 * @link https://php.net/manual/en/function.ftp-set-option.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @param int $option <p>
 * Currently, the following options are supported:
 * <table>
 * Supported runtime FTP options
 * <tr valign="top">
 * <td><b>FTP_TIMEOUT_SEC</b></td>
 * <td>
 * Changes the timeout in seconds used for all network related
 * functions. <i>value</i> must be an integer that
 * is greater than 0. The default timeout is 90 seconds.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>FTP_AUTOSEEK</b></td>
 * <td>
 * When enabled, GET or PUT requests with a
 * <i>resumepos</i> or <i>startpos</i>
 * parameter will first seek to the requested position within the file.
 * This is enabled by default.
 * </td>
 * </tr>
 * </table>
 * </p>
 * @param mixed $value <p>
 * This parameter depends on which <i>option</i> is chosen
 * to be altered.
 * </p>
 * @return bool <b>TRUE</b> if the option could be set; <b>FALSE</b> if not. A warning
 * message will be thrown if the <i>option</i> is not
 * supported or the passed <i>value</i> doesn't match the
 * expected value for the given <i>option</i>.
 */
function ftp_set_option(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, #[EV(flags: [FTP_TIMEOUT_SEC, FTP_AUTOSEEK, FTP_USEPASVADDRESS])] int $option, $value): bool {}

/**
 * Retrieves various runtime behaviours of the current FTP stream
 * @link https://php.net/manual/en/function.ftp-get-option.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @param int $option <p>
 * Currently, the following options are supported:
 * <table>
 * Supported runtime FTP options
 * <tr valign="top">
 * <td><b>FTP_TIMEOUT_SEC</b></td>
 * <td>
 * Returns the current timeout used for network related operations.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>FTP_AUTOSEEK</b></td>
 * <td>
 * Returns <b>TRUE</b> if this option is on, <b>FALSE</b> otherwise.
 * </td>
 * </tr>
 * </table>
 * </p>
 * @return int|bool the value on success or <b>FALSE</b> if the given
 * <i>option</i> is not supported. In the latter case, a
 * warning message is also thrown.
 */
function ftp_get_option(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, #[EV(flags: [FTP_TIMEOUT_SEC, FTP_AUTOSEEK])] int $option): int|bool {}

/**
 * Retrieves a file from the FTP server and writes it to an open file (non-blocking)
 * @link https://php.net/manual/en/function.ftp-nb-fget.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @param resource $stream <p>
 * An open file pointer in which we store the data.
 * </p>
 * @param string $remote_filename <p>
 * The remote file path.
 * </p>
 * @param int $mode <p>
 * The transfer mode. Must be either <b>FTP_ASCII</b> or <b>FTP_BINARY</b>. Optional since PHP 7.3
 * </p>
 * @param int $offset [optional] <p>The position in the remote file to start downloading from.</p>
 * @return int <b>FTP_FAILED</b> or <b>FTP_FINISHED</b>
 * or <b>FTP_MOREDATA</b>.
 */
#[EV([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])]
function ftp_nb_fget(
    #[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp,
    $stream,
    string $remote_filename,
    #[EV([FTP_ASCII, FTP_BINARY])]
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')]
    int $mode,
    #[EV([FTP_ASCII, FTP_BINARY])]
    #[PhpStormStubsElementAvailable(from: '7.3')]
    int $mode = FTP_BINARY,
    int $offset = 0
): int {}

/**
 * Retrieves a file from the FTP server and writes it to a local file (non-blocking)
 * @link https://php.net/manual/en/function.ftp-nb-get.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @param string $local_filename <p>
 * The local file path (will be overwritten if the file already exists).
 * </p>
 * @param string $remote_filename <p>
 * The remote file path.
 * </p>
 * @param int $mode  <p>
 * The transfer mode. Must be either <b>FTP_ASCII</b> or <b>FTP_BINARY</b>. Optional since PHP 7.3
 * </p>
 * @param int $offset [optional] <p>The position in the remote file to start downloading from.</p>
 * @return int|false <b>FTP_FAILED</b> or <b>FTP_FINISHED</b>
 * or <b>FTP_MOREDATA</b>.
 */
#[EV([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])]
#[LanguageLevelTypeAware(["8.1" => "int|false"], default: "int")]
function ftp_nb_get(
    #[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp,
    string $local_filename,
    string $remote_filename,
    #[EV([FTP_ASCII, FTP_BINARY])]
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')]
    int $mode,
    #[EV([FTP_ASCII, FTP_BINARY])]
    #[PhpStormStubsElementAvailable(from: '7.3')]
    int $mode = FTP_BINARY,
    int $offset = 0
) {}

/**
 * Continues retrieving/sending a file (non-blocking)
 * @link https://php.net/manual/en/function.ftp-nb-continue.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @return int <b>FTP_FAILED</b> or <b>FTP_FINISHED</b>
 * or <b>FTP_MOREDATA</b>.
 */
#[EV([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])]
function ftp_nb_continue(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp): int {}

/**
 * Stores a file on the FTP server (non-blocking)
 * @link https://php.net/manual/en/function.ftp-nb-put.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @param string $remote_filename <p>
 * The remote file path.
 * </p>
 * @param string $local_filename <p>
 * The local file path.
 * </p>
 * @param int $mode <p>
 * The transfer mode. Must be either <b>FTP_ASCII</b> or <b>FTP_BINARY</b>. Optional since PHP 7.3
 * </p>
 * @param int $offset [optional] <p>The position in the remote file to start uploading to.</p>
 * @return int|false <b>FTP_FAILED</b> or <b>FTP_FINISHED</b>
 * or <b>FTP_MOREDATA</b>.
 */
#[EV([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])]
function ftp_nb_put(
    #[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp,
    string $remote_filename,
    string $local_filename,
    #[EV([FTP_ASCII, FTP_BINARY])]
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')]
    int $mode,
    #[EV([FTP_ASCII, FTP_BINARY])]
    #[PhpStormStubsElementAvailable(from: '7.3')]
    int $mode = FTP_BINARY,
    int $offset = 0
): int|false {}

/**
 * Stores a file from an open file to the FTP server (non-blocking)
 * @link https://php.net/manual/en/function.ftp-nb-fput.php
 * @param resource $ftp <p>
 * The link identifier of the FTP connection.
 * </p>
 * @param string $remote_filename <p>
 * The remote file path.
 * </p>
 * @param resource $stream <p>
 * An open file pointer on the local file. Reading stops at end of file.
 * </p>
 * @param int $mode <p>
 * The transfer mode. Must be either <b>FTP_ASCII</b> or <b>FTP_BINARY</b>. Optional since PHP 7.3
 * </p>
 * @param int $offset [optional] <p>The position in the remote file to start uploading to.</p>
 * @return int <b>FTP_FAILED</b> or <b>FTP_FINISHED</b>
 * or <b>FTP_MOREDATA</b>.
 */
#[EV([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])]
function ftp_nb_fput(
    #[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp,
    string $remote_filename,
    $stream,
    #[EV([FTP_ASCII, FTP_BINARY])]
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')]
    int $mode,
    #[EV([FTP_ASCII, FTP_BINARY])]
    #[PhpStormStubsElementAvailable(from: '7.3')]
    int $mode = FTP_BINARY,
    int $offset = 0
): int {}

/**
 * Alias of <b>ftp_close</b>
 * @link https://php.net/manual/en/function.ftp-quit.php
 * @param resource $ftp
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function ftp_quit(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp): bool {}

/**
 * <p></p>
 * @link https://php.net/manual/en/ftp.constants.php
 */
define('FTP_ASCII', 1);

/**
 * <p></p>
 * @link https://php.net/manual/en/ftp.constants.php
 */
define('FTP_TEXT', 1);

/**
 * <p></p>
 * @link https://php.net/manual/en/ftp.constants.php
 */
define('FTP_BINARY', 2);

/**
 * <p></p>
 * @link https://php.net/manual/en/ftp.constants.php
 */
define('FTP_IMAGE', 2);

/**
 * <p>
 * Automatically determine resume position and start position for GET and PUT requests
 * (only works if FTP_AUTOSEEK is enabled)
 * </p>
 * @link https://php.net/manual/en/ftp.constants.php
 */
define('FTP_AUTORESUME', -1);

/**
 * <p>
 * See <b>ftp_set_option</b> for information.
 * </p>
 * @link https://php.net/manual/en/ftp.constants.php
 */
define('FTP_TIMEOUT_SEC', 0);

/**
 * <p>
 * See <b>ftp_set_option</b> for information.
 * </p>
 * @link https://php.net/manual/en/ftp.constants.php
 */
define('FTP_AUTOSEEK', 1);

define('FTP_USEPASVADDRESS', 2);

/**
 * <p>
 * Asynchronous transfer has failed
 * </p>
 * @link https://php.net/manual/en/ftp.constants.php
 */
define('FTP_FAILED', 0);

/**
 * <p>
 * Asynchronous transfer has finished
 * </p>
 * @link https://php.net/manual/en/ftp.constants.php
 */
define('FTP_FINISHED', 1);

/**
 * <p>
 * Asynchronous transfer is still active
 * </p>
 * @link https://php.net/manual/en/ftp.constants.php
 */
define('FTP_MOREDATA', 2);

// End of ftp v.
<?php

/**
 * Stubs for XXTEA
 * https://pecl.php.net/package/xxtea.
 */
class XXTEA
{
    /**
     * Encrypts data.
     *
     * @param string $data Data to be encrypted
     * @param string $key Encryption key
     *
     * @return string
     *
     * @since 1.0.0
     */
    public static function encrypt($data, $key) {}

    /**
     * Decrypts data.
     *
     * @param string $data Data to be decrypted
     * @param string $key Encryption key
     *
     * @return string|false
     *
     * @since 1.0.0
     */
    public static function decrypt($data, $key) {}
}

/**
 * Encrypts data.
 *
 * @param string $data Data to be encrypted
 * @param string $key Encryption key
 *
 * @return string
 *
 * @since 1.0.0
 */
function xxtea_encrypt($data, $key) {}

/**
 * Decrypts data.
 *
 * @param string $data Data to be decrypted
 * @param string $key Encryption key
 *
 * @return string|false
 *
 * @since 1.0.0
 */
function xxtea_decrypt($data, $key) {}
<?php

const EIO_DEBUG = 0;
const EIO_SEEK_SET = 0;
const EIO_SEEK_CUR = 0;
const EIO_SEEK_END = 0;
const EIO_PRI_MIN = 0;
const EIO_PRI_DEFAULT = 0;
const EIO_PRI_MAX = 0;
const EIO_READDIR_DENTS = 0;
const EIO_READDIR_DIRS_FIRST = 0;
const EIO_READDIR_STAT_ORDER = 0;
const EIO_READDIR_FOUND_UNKNOWN = 0;
const EIO_DT_UNKNOWN = 0;
const EIO_DT_FIFO = 0;
const EIO_DT_CHR = 0;
const EIO_DT_MPC = 0;
const EIO_DT_DIR = 0;
const EIO_DT_NAM = 0;
const EIO_DT_BLK = 0;
const EIO_DT_MPB = 0;
const EIO_DT_REG = 0;
const EIO_DT_NWK = 0;
const EIO_DT_CMP = 0;
const EIO_DT_LNK = 0;
const EIO_DT_SOCK = 0;
const EIO_DT_DOOR = 0;
const EIO_DT_WHT = 0;
const EIO_DT_MAX = 0;
const EIO_O_RDONLY = 0;
const EIO_O_WRONLY = 0;
const EIO_O_RDWR = 0;
const EIO_O_NONBLOCK = 0;
const EIO_O_APPEND = 0;
const EIO_O_CREAT = 0;
const EIO_O_TRUNC = 0;
const EIO_O_EXCL = 0;
const EIO_O_FSYNC = 0;
const EIO_S_IRUSR = 0;
const EIO_S_IWUSR = 0;
const EIO_S_IXUSR = 0;
const EIO_S_IRGRP = 0;
const EIO_S_IWGRP = 0;
const EIO_S_IXGRP = 0;
const EIO_S_IROTH = 0;
const EIO_S_IWOTH = 0;
const EIO_S_IXOTH = 0;
const EIO_S_IFREG = 0;
const EIO_S_IFCHR = 0;
const EIO_S_IFBLK = 0;
const EIO_S_IFIFO = 0;
const EIO_S_IFSOCK = 0;
const EIO_SYNC_FILE_RANGE_WAIT_BEFORE = 0;
const EIO_SYNC_FILE_RANGE_WRITE = 0;
const EIO_SYNC_FILE_RANGE_WAIT_AFTER = 0;
const EIO_FALLOC_FL_KEEP_SIZE = 0;

/**
 * Polls libeio until all requests proceeded
 * @link https://www.php.net/manual/en/function.eio-event-loop.php
 * @return bool returns true on success, or false on failure.
 */
function eio_event_loop(): bool {}

/**
 * Can be to be called whenever there are pending requests that need finishing
 * @link https://www.php.net/manual/en/function.eio-poll.php
 * @return int If any request invocation returns a non-zero value, returns that value. Otherwise, it returns 0.
 */
function eio_poll(): int {}

/**
 * Opens a file
 * @link https://www.php.net/manual/en/function.eio-open.php
 * @param string $path Path of the file to be opened.
 * @param int $flags One of EIO_O_* constants, or their combinations.
 * @param int $mode One of EIO_S_I* constants, or their combination (via bitwise OR operator).
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX.
 * @param mixed $callback function is called when the request is done.
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|false returns file descriptor in result argument of callback on success; otherwise, result is equal to -1.
 */
function eio_open(string $path, int $flags, int $mode, int $pri, mixed $callback, mixed $data = null) {}

/**
 * Truncate a file
 * @link https://www.php.net/manual/en/function.eio-truncate.php
 * @param string $path File path
 * @param int $offset Offset from beginning of the file.
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|false returns request resource on success, or false on failure.
 */
function eio_truncate(string $path, int $offset = 0, int $pri = 0, mixed $callback = null, mixed $data = null) {}

/**
 * Create directory
 * @link https://www.php.net/manual/en/function.eio-mkdir.php
 * @param string $path Path for the new directory.
 * @param int $mode Access mode, e.g. 0755
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|false returns request resource on success, or false on failure.
 */
function eio_mkdir(string $path, int $mode, int $pri = 0, mixed $callback = null, mixed $data = null) {}

/**
 * Remove a directory
 * @link https://www.php.net/manual/en/function.eio-rmdir.php
 * @param string $path Directory path
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_rmdir(string $path, int $pri = 0, mixed $callback = null, mixed $data = null) {}

/**
 * Delete a name and possibly the file it refers to
 * @link https://www.php.net/manual/en/function.eio-unlink.php
 * @param string $path Path to file
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_unlink(string $path, int $pri = 0, mixed $callback = null, mixed $data = null) {}

/**
 * Change file last access and modification times
 * @link https://www.php.net/manual/en/function.eio-utime.php
 * @param string $path Path to the file.
 * @param float $atime Access time
 * @param float $mtime Modification time
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_utime(string $path, float $atime, float $mtime, int $pri = 0, mixed $callback = null, mixed $data = null) {}

/**
 * Create a special or ordinary file
 * @link https://www.php.net/manual/en/function.eio-mknod.php
 * @param string $path Path for the new node(file).
 * @param int $mode Specifies both the permissions to use and the type of node to be created
 * @param int $dev If the file type is EIO_S_IFCHR or EIO_S_IFBLK then dev specifies the major and minor numbers of the newly created device special file.
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_mknod(string $path, int $mode, int $dev, int $pri = 0, mixed $callback = null, mixed $data = null) {}

/**
 * Create a hardlink for file
 * @link https://www.php.net/manual/en/function.eio-link.php
 * @param string $path Source file path.
 * @param string $new_path Target file path.
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_link(string $path, string $new_path, int $pri = 0, mixed $callback = null, mixed $data = null) {}

/**
 * Create a symbolic link
 * @link https://www.php.net/manual/en/function.eio-symlink.php
 * @param string $path Source path.
 * @param string $new_path Target path.
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_symlink(string $path, string $new_path, int $pri = 0, mixed $callback = null, mixed $data = null) {}

/**
 * Change the name or location of a file
 * @link https://www.php.net/manual/en/function.eio-rename.php
 * @param string $path Source path.
 * @param string $new_path Target path.
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_rename(string $path, string $new_path, int $pri = 0, mixed $callback = null, mixed $data = null) {}

/**
 * Close file
 * @link https://www.php.net/manual/en/function.eio-close.php
 * @param mixed $fd Stream, Socket resource, or numeric file descriptor
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_close(mixed $fd, int $pri = 0, mixed $callback = null, mixed $data = null) {}

/**
 * Commit buffer cache to disk
 * @link https://www.php.net/manual/en/function.eio-sync.php
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_sync(int $pri = 0, mixed $callback = null, mixed $data = null) {}

/**
 * Synchronize a file's in-core state with storage device
 * @link https://www.php.net/manual/en/function.eio-fsync.php
 * @param mixed $fd Stream, Socket resource, or numeric file descriptor
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_fsync(mixed $fd, int $pri = 0, mixed $callback = null, mixed $data = null) {}

/**
 * Synchronize a file's in-core state with storage device
 * @link https://www.php.net/manual/en/function.eio-fdatasync.php
 * @param mixed $fd Stream, Socket resource, or numeric file descriptor
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_fdatasync(mixed $fd, int $pri = 0, mixed $callback = null, mixed $data = null) {}

/**
 * Change file last access and modification times
 * @link https://www.php.net/manual/en/function.eio-futime.php
 * @param mixed $fd Stream, Socket resource, or numeric file descriptor
 * @param float $atime Access time
 * @param float $mtime Modification time
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_futime(mixed $fd, float $atime, float $mtime, int $pri = 0, mixed $callback = null, mixed $data = null) {}

/**
 * Truncate a file
 * @link https://www.php.net/manual/en/function.eio-ftruncate.php
 * @param mixed $fd Stream, Socket resource, or numeric file descriptor
 * @param int $offset Offset from beginning of the file.
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_ftruncate(mixed $fd, int $offset = 0, int $pri = 0, mixed $callback = null, mixed $data = null) {}

/**
 * Change file/directory permissions
 * @link https://www.php.net/manual/en/function.eio-chmod.php
 * @param string $path Path to the target file or directory
 * @param int $mode The new permissions. E.g. 0644.
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_chmod(string $path, int $mode, int $pri = 0, mixed $callback = null, mixed $data = null) {}

/**
 * Change file permissions
 * @link https://www.php.net/manual/en/function.eio-fchmod.php
 * @param mixed $fd Stream, Socket resource, or numeric file descriptor
 * @param int $mode The new permissions. E.g. 0644.
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_fchmod(mixed $fd, int $mode, int $pri = 0, mixed $callback = null, mixed $data = null) {}

/**
 * Change file/directory permissions
 * @link https://www.php.net/manual/en/function.eio-chown.php
 * @param string $path Path to file or directory.
 * @param int $uid User ID. Is ignored when equal to -1.
 * @param int $gid Group ID. Is ignored when equal to -1.
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_chown(string $path, int $uid, int $gid = -1, int $pri = 0, mixed $callback = null, ?mixed $data = null) {}

/**
 * Change file ownership
 * @link https://www.php.net/manual/en/function.eio-fchown.php
 * @param mixed $fd Stream, Socket resource, or numeric file descriptor
 * @param int $uid User ID. Is ignored when equal to -1.
 * @param int $gid Group ID. Is ignored when equal to -1.
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_fchown(mixed $fd, int $uid, int $gid = -1, int $pri = 0, mixed $callback = null, mixed $data = null) {}

/**
 * Duplicate a file descriptor
 * @link https://www.php.net/manual/en/function.eio-dup2.php
 * @param mixed $fd Stream, Socket resource, or numeric file descriptor
 * @param mixed $fd2 Stream, Socket resource, or numeric file descriptor
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_dup2(mixed $fd, mixed $fd2, int $pri = 0, mixed $callback = null, mixed $data = null) {}

/**
 * Read from a file descriptor at given offset
 * @link https://www.php.net/manual/en/function.eio-read.php
 * @param mixed $fd Stream, Socket resource, or numeric file descriptor
 * @param int $length Maximum number of bytes to read.
 * @param int $offset Offset within the file.
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_read(mixed $fd, int $length, int $offset, int $pri, mixed $callback, mixed $data = null) {}

/**
 * Write to file
 * @link https://www.php.net/manual/en/function.eio-write.php
 * @param mixed $fd Stream, Socket resource, or numeric file descriptor
 * @param mixed $str Source string
 * @param int $length Maximum number of bytes to write.
 * @param int $offset Offset from the beginning of file.
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_write(mixed $fd, mixed $str, int $length = 0, int $offset = 0, int $pri = 0, mixed $callback = null, mixed $data = null) {}

/**
 * Read value of a symbolic link
 * @link https://www.php.net/manual/en/function.eio-readlink.php
 * @param string $path Source symbolic link path
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_readlink(string $path, int $pri, mixed $callback, mixed $data = null) {}

/**
 * Get the canonicalized absolute pathname
 * @link https://www.php.net/manual/en/function.eio-realpath.php
 * @param string $path Short pathname
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_realpath(string $path, int $pri, mixed $callback, mixed $data = null) {}

/**
 * Get file status
 * @link https://www.php.net/manual/en/function.eio-stat.php
 * @param string $path The file path
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_stat(string $path, int $pri, mixed $callback, mixed $data = null) {}

/**
 * Get file status
 * @link https://www.php.net/manual/en/function.eio-lstat.php
 * @param string $path The file path
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_lstat(string $path, int $pri, mixed $callback, mixed $data = null) {}

/**
 * Get file status
 * @link https://www.php.net/manual/en/function.eio-fstat.php
 * @param mixed $fd Stream, Socket resource, or numeric file descriptor
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_fstat(mixed $fd, int $pri, mixed $callback, mixed $data = null) {}

/**
 * Get file system statistics
 * @link https://www.php.net/manual/en/function.eio-statvfs.php
 * @param string $path Pathname of any file within the mounted file system
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_statvfs(string $path, int $pri, mixed $callback, mixed $data = null) {}

/**
 * Get file system statistics
 * @link https://www.php.net/manual/en/function.eio-fstatvfs.php
 * @param mixed $fd Stream, Socket resource, or numeric file descriptor
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_fstatvfs(mixed $fd, int $pri, mixed $callback, mixed $data = null) {}

/**
 * Reads through a whole directory
 * @link https://www.php.net/manual/en/function.eio-readdir.php
 * @param string $path Directory path.
 * @param int $flags Combination of EIO_READDIR_* constants.
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_readdir(string $path, int $flags, int $pri, mixed $callback, mixed $data = null) {}

/**
 * Transfer data between file descriptors
 * @link https://www.php.net/manual/en/function.eio-sendfile.php
 * @param mixed $out_fd Output stream, Socket resource, or file descriptor. Should be opened for writing.
 * @param mixed $in_fd Input stream, Socket resource, or file descriptor. Should be opened for reading.
 * @param int $offset Offset within the source file.
 * @param int $length Number of bytes to copy.
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_sendfile(mixed $out_fd, mixed $in_fd, int $offset, int $length, int $pri, mixed $callback, mixed $data = null) {}

/**
 * Perform file readahead into page cache
 * @link https://www.php.net/manual/en/function.eio-readahead.php
 * @param mixed $fd Stream, Socket resource, or numeric file descriptor
 * @param int $offset Starting point from which data is to be read.
 * @param int $length Number of bytes to be read.
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_readahead(mixed $fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT, mixed $callback = null, mixed $data = null) {}

/**
 * Repositions the offset of the open file associated with the fd argument to the argument offset according to the directive whence
 * @link https://www.php.net/manual/en/function.eio-seek.php
 * @param mixed $fd Stream, Socket resource, or numeric file descriptor
 * @param int $offset Starting point from which data is to be read.
 * @param int $length Number of bytes to be read.
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_seek(mixed $fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT, mixed $callback = null, mixed $data = null) {}

/**
 * Calls Linux' syncfs syscall, if available
 * @link https://www.php.net/manual/en/function.eio-syncfs.php
 * @param mixed $fd File descriptor
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_syncfs(mixed $fd, int $pri = EIO_PRI_DEFAULT, mixed $callback = null, mixed $data = null) {}

/**
 * Sync a file segment with disk
 * @link https://www.php.net/manual/en/function.eio-sync-file-range.php
 * @param mixed $fd File descriptor
 * @param int $offset The starting byte of the file range to be synchronized
 * @param int $nbytes Specifies the length of the range to be synchronized, in bytes. If nbytes is zero, then all bytes from offset through to the end of file are synchronized.
 * @param int $flags A bit-mask. Can include any of the following values: EIO_SYNC_FILE_RANGE_WAIT_BEFORE, EIO_SYNC_FILE_RANGE_WRITE, EIO_SYNC_FILE_RANGE_WAIT_AFTER.
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_sync_file_range(mixed $fd, int $offset, int $nbytes, int $flags, int $pri = EIO_PRI_DEFAULT, mixed $callback = null, mixed $data = null) {}

/**
 * Allows the caller to directly manipulate the allocated disk space for a file
 * @link https://www.php.net/manual/en/function.eio-fallocate.php
 * @param mixed $fd Stream, Socket resource, or numeric file descriptor
 * @param int $mode Currently only one flag is supported for mode: EIO_FALLOC_FL_KEEP_SIZE (the same as POSIX constant FALLOC_FL_KEEP_SIZE).
 * @param int $offset Specifies start of the byte range.
 * @param int $length Specifies length the byte range.
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_fallocate(mixed $fd, int $mode, int $offset, int $length, int $pri = EIO_PRI_DEFAULT, mixed $callback = null, mixed $data = null) {}

/**
 * Execute custom request like any other eio_* call
 * @link https://www.php.net/manual/en/function.eio-custom.php
 * @param mixed $execute Specifies the request function
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_custom(mixed $execute, int $pri, mixed $callback, mixed $data = null) {}

/**
 * Artificially increase load. Could be useful in tests, benchmarking
 * @link https://www.php.net/manual/en/function.eio-busy.php
 * @param int $delay Delay in seconds
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_busy(int $delay, int $pri = EIO_PRI_DEFAULT, mixed $callback = null, mixed $data = null) {}

/**
 * Does nothing, except go through the whole request cycle
 * @link https://www.php.net/manual/en/function.eio-nop.php
 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource|bool returns request resource on success, or false on failure.
 */
function eio_nop(int $pri = EIO_PRI_DEFAULT, mixed $callback = null, mixed $data = null) {}

/**
 * Cancels a request
 * @link https://www.php.net/manual/en/function.eio-cancel.php
 * @param resource $req The request resource
 */
function eio_cancel($req): void {}

/**
 * Creates a request group
 * @link https://www.php.net/manual/en/function.eio-grp.php
 * @param mixed $callback function is called when the request is done
 * @param mixed $data Arbitrary variable passed to callback
 * @return resource returns request group resource on success, or false on failure.
 */
function eio_grp(mixed $callback, mixed $data = null) {}

/**
 * Adds a request to the request group
 * @link https://www.php.net/manual/en/function.eio-grp-add.php
 * @param resource $grp The request group resource returned by eio_grp()
 * @param resource $req The request resource
 */
function eio_grp_add($grp, $req): void {}

/**
 * Set group limit
 * @link https://www.php.net/manual/en/function.eio-grp-limit.php
 * @param resource $grp The request group resource.
 * @param int $limit Number of requests in the group.
 */
function eio_grp_limit($grp, int $limit): void {}

/**
 * Cancels a request group
 * @link https://www.php.net/manual/en/function.eio-grp-cancel.php
 * @param resource $grp The request group resource returned by eio_grp().
 */
function eio_grp_cancel($grp): void {}

/**
 * Set maximum poll time
 * @link https://www.php.net/manual/en/function.eio-set-max-poll-time.php
 * @param float $nseconds Number of seconds
 */
function eio_set_max_poll_time(float $nseconds): void {}

/**
 * Set maximum number of requests processed in a poll
 * @link https://www.php.net/manual/en/function.eio-set-max-poll-reqs.php
 * @param int $value Number of requests
 */
function eio_set_max_poll_reqs(int $value): void {}

/**
 * Set minimum parallel thread number
 * @link https://www.php.net/manual/en/function.eio-set-min-parallel.php
 * @param int $value Number of parallel threads.
 */
function eio_set_min_parallel(int $value): void {}

/**
 * Set maximum parallel threads
 * @link https://www.php.net/manual/en/function.eio-set-max-parallel.php
 * @param int $value Number of parallel threads
 */
function eio_set_max_parallel(int $value): void {}

/**
 * Set maximum number of idle threads
 * @link https://www.php.net/manual/en/function.eio-set-max-idle.php
 * @param int $value Number of idle threads.
 */
function eio_set_max_idle(int $value): void {}

/**
 * Returns number of threads currently in use
 * @link https://www.php.net/manual/en/function.eio-nthreads.php
 * @return int returns number of threads currently in use.
 */
function eio_nthreads(): int {}

/**
 * Returns number of requests to be processed
 * @link https://www.php.net/manual/en/function.eio-nreqs.php
 * @return int returns number of requests to be processed.
 */
function eio_nreqs(): int {}

/**
 * Returns number of not-yet handled requests
 * @link https://www.php.net/manual/en/function.eio-nready.php
 * @return int returns number of not-yet handled requests
 */
function eio_nready(): int {}

/**
 * Returns number of finished, but unhandled requests
 * @link https://www.php.net/manual/en/function.eio-npending.php
 * @return int returns number of finished, but unhandled requests.
 */
function eio_npending(): int {}

/**
 * Get stream representing a variable used in internal communications with libeio
 * @link https://www.php.net/manual/en/function.eio-get-event-stream.php
 * @return resource|null returns stream on success; otherwise, null
 */
function eio_get_event_stream() {}

/**
 * Returns string describing the last error associated with a request resource
 * @link https://www.php.net/manual/en/function.eio-get-last-error.php
 * @param resource $req The request resource
 * @return string returns string describing the last error associated with the request resource specified by req.
 */
function eio_get_last_error($req): string {}
<?php

// Start of rpminfo v.0.5.0

const RPMVERSION = '4.15.1';
const RPMSENSE_ANY = 0;
const RPMSENSE_LESS = 2;
const RPMSENSE_GREATER = 4;
const RPMSENSE_EQUAL = 8;
const RPMSENSE_POSTTRANS = 32;
const RPMSENSE_PREREQ = 64;
const RPMSENSE_PRETRANS = 128;
const RPMSENSE_INTERP = 256;
const RPMSENSE_SCRIPT_PRE = 512;
const RPMSENSE_SCRIPT_POST = 1024;
const RPMSENSE_SCRIPT_PREUN = 2048;
const RPMSENSE_SCRIPT_POSTUN = 4096;
const RPMSENSE_SCRIPT_VERIFY = 8192;
const RPMSENSE_FIND_REQUIRES = 16384;
const RPMSENSE_FIND_PROVIDES = 32768;
const RPMSENSE_TRIGGERIN = 65536;
const RPMSENSE_TRIGGERUN = 131072;
const RPMSENSE_TRIGGERPOSTUN = 262144;
const RPMSENSE_MISSINGOK = 524288;
const RPMSENSE_RPMLIB = 16777216;
const RPMSENSE_TRIGGERPREIN = 33554432;
const RPMSENSE_KEYRING = 67108864;
const RPMSENSE_CONFIG = 268435456;
const RPMMIRE_DEFAULT = 0;
const RPMMIRE_STRCMP = 1;
const RPMMIRE_REGEX = 2;
const RPMMIRE_GLOB = 3;
const RPMTAG_ARCH = 1022;
const RPMTAG_ARCHIVESIZE = 1046;
const RPMTAG_BASENAMES = 1117;
const RPMTAG_BUGURL = 5012;
const RPMTAG_BUILDARCHS = 1089;
const RPMTAG_BUILDHOST = 1007;
const RPMTAG_BUILDTIME = 1006;
const RPMTAG_C = 1054;
const RPMTAG_CHANGELOGNAME = 1081;
const RPMTAG_CHANGELOGTEXT = 1082;
const RPMTAG_CHANGELOGTIME = 1080;
const RPMTAG_CLASSDICT = 1142;
const RPMTAG_CONFLICTFLAGS = 1053;
const RPMTAG_CONFLICTNAME = 1054;
const RPMTAG_CONFLICTNEVRS = 5044;
const RPMTAG_CONFLICTS = 1054;
const RPMTAG_CONFLICTVERSION = 1055;
const RPMTAG_COOKIE = 1094;
const RPMTAG_DBINSTANCE = 1195;
const RPMTAG_DEPENDSDICT = 1145;
const RPMTAG_DESCRIPTION = 1005;
const RPMTAG_DIRINDEXES = 1116;
const RPMTAG_DIRNAMES = 1118;
const RPMTAG_DISTRIBUTION = 1010;
const RPMTAG_DISTTAG = 1155;
const RPMTAG_DISTURL = 1123;
const RPMTAG_DSAHEADER = 267;
const RPMTAG_E = 1003;
const RPMTAG_ENCODING = 5062;
const RPMTAG_ENHANCEFLAGS = 5057;
const RPMTAG_ENHANCENAME = 5055;
const RPMTAG_ENHANCENEVRS = 5061;
const RPMTAG_ENHANCES = 5055;
const RPMTAG_ENHANCEVERSION = 5056;
const RPMTAG_EPOCH = 1003;
const RPMTAG_EPOCHNUM = 5019;
const RPMTAG_EVR = 5013;
const RPMTAG_EXCLUDEARCH = 1059;
const RPMTAG_EXCLUDEOS = 1060;
const RPMTAG_EXCLUSIVEARCH = 1061;
const RPMTAG_EXCLUSIVEOS = 1062;
const RPMTAG_FILECAPS = 5010;
const RPMTAG_FILECLASS = 1141;
const RPMTAG_FILECOLORS = 1140;
const RPMTAG_FILECONTEXTS = 1147;
const RPMTAG_FILEDEPENDSN = 1144;
const RPMTAG_FILEDEPENDSX = 1143;
const RPMTAG_FILEDEVICES = 1095;
const RPMTAG_FILEDIGESTALGO = 5011;
const RPMTAG_FILEDIGESTS = 1035;
const RPMTAG_FILEFLAGS = 1037;
const RPMTAG_FILEGROUPNAME = 1040;
const RPMTAG_FILEINODES = 1096;
const RPMTAG_FILELANGS = 1097;
const RPMTAG_FILELINKTOS = 1036;
const RPMTAG_FILEMD5S = 1035;
const RPMTAG_FILEMODES = 1030;
const RPMTAG_FILEMTIMES = 1034;
const RPMTAG_FILENAMES = 5000;
const RPMTAG_FILENLINKS = 5045;
const RPMTAG_FILEPROVIDE = 5001;
const RPMTAG_FILERDEVS = 1033;
const RPMTAG_FILEREQUIRE = 5002;
const RPMTAG_FILESIGNATURELENGTH = 5091;
const RPMTAG_FILESIGNATURES = 5090;
const RPMTAG_FILESIZES = 1028;
const RPMTAG_FILESTATES = 1029;
const RPMTAG_FILETRIGGERCONDS = 5086;
const RPMTAG_FILETRIGGERFLAGS = 5072;
const RPMTAG_FILETRIGGERINDEX = 5070;
const RPMTAG_FILETRIGGERNAME = 5069;
const RPMTAG_FILETRIGGERPRIORITIES = 5084;
const RPMTAG_FILETRIGGERSCRIPTFLAGS = 5068;
const RPMTAG_FILETRIGGERSCRIPTPROG = 5067;
const RPMTAG_FILETRIGGERSCRIPTS = 5066;
const RPMTAG_FILETRIGGERTYPE = 5087;
const RPMTAG_FILETRIGGERVERSION = 5071;
const RPMTAG_FILEUSERNAME = 1039;
const RPMTAG_FILEVERIFYFLAGS = 1045;
const RPMTAG_FSCONTEXTS = 1148;
const RPMTAG_GIF = 1012;
const RPMTAG_GROUP = 1016;
const RPMTAG_HDRID = 269;
const RPMTAG_HEADERCOLOR = 5017;
const RPMTAG_HEADERI18NTABLE = 100;
const RPMTAG_HEADERIMAGE = 61;
const RPMTAG_HEADERIMMUTABLE = 63;
const RPMTAG_HEADERREGIONS = 64;
const RPMTAG_HEADERSIGNATURES = 62;
const RPMTAG_ICON = 1043;
const RPMTAG_INSTALLCOLOR = 1127;
const RPMTAG_INSTALLTID = 1128;
const RPMTAG_INSTALLTIME = 1008;
const RPMTAG_INSTFILENAMES = 5040;
const RPMTAG_INSTPREFIXES = 1099;
const RPMTAG_LICENSE = 1014;
const RPMTAG_LONGARCHIVESIZE = 271;
const RPMTAG_LONGFILESIZES = 5008;
const RPMTAG_LONGSIGSIZE = 270;
const RPMTAG_LONGSIZE = 5009;
const RPMTAG_MODULARITYLABEL = 5096;
const RPMTAG_N = 1000;
const RPMTAG_NAME = 1000;
const RPMTAG_NEVR = 5015;
const RPMTAG_NEVRA = 5016;
const RPMTAG_NOPATCH = 1052;
const RPMTAG_NOSOURCE = 1051;
const RPMTAG_NVR = 5014;
const RPMTAG_NVRA = 1196;
const RPMTAG_O = 1090;
const RPMTAG_OBSOLETEFLAGS = 1114;
const RPMTAG_OBSOLETENAME = 1090;
const RPMTAG_OBSOLETENEVRS = 5043;
const RPMTAG_OBSOLETES = 1090;
const RPMTAG_OBSOLETEVERSION = 1115;
const RPMTAG_OLDENHANCES = 1159;
const RPMTAG_OLDENHANCESFLAGS = 1161;
const RPMTAG_OLDENHANCESNAME = 1159;
const RPMTAG_OLDENHANCESVERSION = 1160;
const RPMTAG_OLDFILENAMES = 1027;
const RPMTAG_OLDSUGGESTS = 1156;
const RPMTAG_OLDSUGGESTSFLAGS = 1158;
const RPMTAG_OLDSUGGESTSNAME = 1156;
const RPMTAG_OLDSUGGESTSVERSION = 1157;
const RPMTAG_OPTFLAGS = 1122;
const RPMTAG_ORDERFLAGS = 5037;
const RPMTAG_ORDERNAME = 5035;
const RPMTAG_ORDERVERSION = 5036;
const RPMTAG_ORIGBASENAMES = 1120;
const RPMTAG_ORIGDIRINDEXES = 1119;
const RPMTAG_ORIGDIRNAMES = 1121;
const RPMTAG_ORIGFILENAMES = 5007;
const RPMTAG_OS = 1021;
const RPMTAG_P = 1047;
const RPMTAG_PACKAGER = 1015;
const RPMTAG_PATCH = 1019;
const RPMTAG_PATCHESFLAGS = 1134;
const RPMTAG_PATCHESNAME = 1133;
const RPMTAG_PATCHESVERSION = 1135;
const RPMTAG_PAYLOADCOMPRESSOR = 1125;
const RPMTAG_PAYLOADDIGEST = 5092;
const RPMTAG_PAYLOADDIGESTALGO = 5093;
const RPMTAG_PAYLOADFLAGS = 1126;
const RPMTAG_PAYLOADFORMAT = 1124;
const RPMTAG_PKGID = 261;
const RPMTAG_PLATFORM = 1132;
const RPMTAG_POLICIES = 1150;
const RPMTAG_POLICYFLAGS = 5033;
const RPMTAG_POLICYNAMES = 5030;
const RPMTAG_POLICYTYPES = 5031;
const RPMTAG_POLICYTYPESINDEXES = 5032;
const RPMTAG_POSTIN = 1024;
const RPMTAG_POSTINFLAGS = 5021;
const RPMTAG_POSTINPROG = 1086;
const RPMTAG_POSTTRANS = 1152;
const RPMTAG_POSTTRANSFLAGS = 5025;
const RPMTAG_POSTTRANSPROG = 1154;
const RPMTAG_POSTUN = 1026;
const RPMTAG_POSTUNFLAGS = 5023;
const RPMTAG_POSTUNPROG = 1088;
const RPMTAG_PREFIXES = 1098;
const RPMTAG_PREIN = 1023;
const RPMTAG_PREINFLAGS = 5020;
const RPMTAG_PREINPROG = 1085;
const RPMTAG_PRETRANS = 1151;
const RPMTAG_PRETRANSFLAGS = 5024;
const RPMTAG_PRETRANSPROG = 1153;
const RPMTAG_PREUN = 1025;
const RPMTAG_PREUNFLAGS = 5022;
const RPMTAG_PREUNPROG = 1087;
const RPMTAG_PROVIDEFLAGS = 1112;
const RPMTAG_PROVIDENAME = 1047;
const RPMTAG_PROVIDENEVRS = 5042;
const RPMTAG_PROVIDES = 1047;
const RPMTAG_PROVIDEVERSION = 1113;
const RPMTAG_PUBKEYS = 266;
const RPMTAG_R = 1002;
const RPMTAG_RECOMMENDFLAGS = 5048;
const RPMTAG_RECOMMENDNAME = 5046;
const RPMTAG_RECOMMENDNEVRS = 5058;
const RPMTAG_RECOMMENDS = 5046;
const RPMTAG_RECOMMENDVERSION = 5047;
const RPMTAG_RECONTEXTS = 1149;
const RPMTAG_RELEASE = 1002;
const RPMTAG_REMOVETID = 1129;
const RPMTAG_REQUIREFLAGS = 1048;
const RPMTAG_REQUIRENAME = 1049;
const RPMTAG_REQUIRENEVRS = 5041;
const RPMTAG_REQUIRES = 1049;
const RPMTAG_REQUIREVERSION = 1050;
const RPMTAG_RPMVERSION = 1064;
const RPMTAG_RSAHEADER = 268;
const RPMTAG_SHA1HEADER = 269;
const RPMTAG_SHA256HEADER = 273;
const RPMTAG_SIGGPG = 262;
const RPMTAG_SIGMD5 = 261;
const RPMTAG_SIGPGP = 259;
const RPMTAG_SIGSIZE = 257;
const RPMTAG_SIZE = 1009;
const RPMTAG_SOURCE = 1018;
const RPMTAG_SOURCEPACKAGE = 1106;
const RPMTAG_SOURCEPKGID = 1146;
const RPMTAG_SOURCERPM = 1044;
const RPMTAG_SUGGESTFLAGS = 5051;
const RPMTAG_SUGGESTNAME = 5049;
const RPMTAG_SUGGESTNEVRS = 5059;
const RPMTAG_SUGGESTS = 5049;
const RPMTAG_SUGGESTVERSION = 5050;
const RPMTAG_SUMMARY = 1004;
const RPMTAG_SUPPLEMENTFLAGS = 5054;
const RPMTAG_SUPPLEMENTNAME = 5052;
const RPMTAG_SUPPLEMENTNEVRS = 5060;
const RPMTAG_SUPPLEMENTS = 5052;
const RPMTAG_SUPPLEMENTVERSION = 5053;
const RPMTAG_TRANSFILETRIGGERCONDS = 5088;
const RPMTAG_TRANSFILETRIGGERFLAGS = 5082;
const RPMTAG_TRANSFILETRIGGERINDEX = 5080;
const RPMTAG_TRANSFILETRIGGERNAME = 5079;
const RPMTAG_TRANSFILETRIGGERPRIORITIES = 5085;
const RPMTAG_TRANSFILETRIGGERSCRIPTFLAGS = 5078;
const RPMTAG_TRANSFILETRIGGERSCRIPTPROG = 5077;
const RPMTAG_TRANSFILETRIGGERSCRIPTS = 5076;
const RPMTAG_TRANSFILETRIGGERTYPE = 5089;
const RPMTAG_TRANSFILETRIGGERVERSION = 5081;
const RPMTAG_TRIGGERCONDS = 5005;
const RPMTAG_TRIGGERFLAGS = 1068;
const RPMTAG_TRIGGERINDEX = 1069;
const RPMTAG_TRIGGERNAME = 1066;
const RPMTAG_TRIGGERSCRIPTFLAGS = 5027;
const RPMTAG_TRIGGERSCRIPTPROG = 1092;
const RPMTAG_TRIGGERSCRIPTS = 1065;
const RPMTAG_TRIGGERTYPE = 5006;
const RPMTAG_TRIGGERVERSION = 1067;
const RPMTAG_URL = 1020;
const RPMTAG_V = 1001;
const RPMTAG_VCS = 5034;
const RPMTAG_VENDOR = 1011;
const RPMTAG_VERBOSE = 5018;
const RPMTAG_VERIFYSCRIPT = 1079;
const RPMTAG_VERIFYSCRIPTFLAGS = 5026;
const RPMTAG_VERIFYSCRIPTPROG = 1091;
const RPMTAG_VERSION = 1001;
const RPMTAG_XPM = 1013;

/**
 * Compare two RPM evr (epoch:version-release) strings
 *
 * @param string $evr1 <p>
 * First epoch:version-release string
 * </p>
 * @param string $evr2 <p>
 * Second epoch:version-release string
 * </p>
 * @return int <p>
 * < 0 if evr1 < evr2, > 0 if evr1 > evr2, 0 if equal.
 * </p>
 * @since 0.1.0
 */
function rpmvercmp(string $evr1, string $evr2) {}

/**
 * Retrieve information from a RPM file, reading its metadata.
 * If given error will be used to store error message
 * instead of raising a warning. The return
 * value is a hash table,
 * or false if it fails.
 *
 * @param string $path <p>
 * Path to the RPM file.
 * </p>
 * @param bool $full [optional] <p>
 * If TRUE all information headers for the file are retrieved, else only a minimal set.
 * </p>
 * @param null|string &$error [optional] <p>
 * If provided, will receive the possible error message, and will avoid a runtime warning.
 * </p>
 *
 * @return array|null <p>
 * An array of information or <b>NULL</b> on error.
 * </p>
 * @since 0.1.0
 */
function rpminfo(string $path, bool $full = false, ?string &$error = null) {}

/**
 * Retrieve information about an installed package, from the system RPM database.
 *
 * @param string $nevr <p>
 * Name with optional epoch, version and release.
 * </p>
 * @param bool $full [optional] <p>
 * If TRUE all information headers for the file are retrieved, else only a minimal set.
 * </p>
 *
 * @return array|null <p>
 * An array of arrays of information or <b>NULL</b> on error.
 * </p>
 * @since 0.2.0
 */
function rpmdbinfo(string $nevr, bool $full = false) {}

/**
 * Retriev information from the local RPM database.
 *
 * @param string $pattern <p>
 * Value to search for.
 * </p>
 * @param int $rpmtag [optional] <p>
 * Search criterion, one of RPMTAG_* constant.
 * </p>
 * @param int $rpmmire [optional] <p>
 * Pattern type, one of RPMMIRE_* constant.
 * When < 0 the criterion must equals the value, and database index is used if possible.
 * </p>
 * @param bool $full [optional] <p>
 * If TRUE all information headers for the file are retrieved, else only a minimal set.
 * </p>
 *
 * @return array|null <p>
 * An array of arrays of information or <b>NULL</b> on error.
 * </p>
 * @since 0.3.0
 */
function rpmdbsearch(string $pattern, int $rpmtag = RPMTAG_NAME, int $rpmmire = -1, bool $full = false) {}
<?php

// Start of SQLite v.2.0-dev
use JetBrains\PhpStorm\Pure;

/**
 * @link https://php.net/manual/en/ref.sqlite.php
 */
class SQLiteDatabase
{
    /**
     * (PHP 5 &lt; 5.4.0, PECL sqlite &gt;= 1.0.0)
     * @link https://php.net/manual/en/function.sqlite-open.php
     * @param string $filename <p>The filename of the SQLite database. If the file does not exist, SQLite will attempt to create it. PHP must have write permissions to the file if data is inserted, the database schema is modified or to create the database if it does not exist.</p>
     * @param int $mode [optional] <p>The mode of the file. Intended to be used to open the database in read-only mode. Presently, this parameter is ignored by the sqlite library. The default value for mode is the octal value 0666 and this is the recommended value.</p>
     * @param string &$error_message [optional] <p>Passed by reference and is set to hold a descriptive error message explaining why the database could not be opened if there was an error.</p>
     */
    final public function __construct($filename, $mode = 0666, &$error_message) {}

    /**
     * (PHP 5 &lt; 5.4.0, PECL sqlite &gt;= 1.0.0)
     * @link https://php.net/manual/en/function.sqlite-query.php
     * @param string $query <p>
     * The query to be executed.
     * </p>
     * <p>
     * Data inside the query should be {@link https://php.net/manual/en/function.sqlite-escape-string.php properly escaped}.
     * </p>
     * @param int $result_type [optional]
     * <p>The optional <i>result_type</i> parameter accepts a constant and determines how the returned array will be indexed. Using <b>SQLITE_ASSOC</b> will return only associative indices (named fields) while <b>SQLITE_NUM</b> will return only numerical indices (ordinal field numbers). <b>SQLITE_BOTH</b> will return both associative and numerical indices. <b>SQLITE_BOTH</b> is the default for this function.</p>
     * @param string &$error_message [optional] <p>The specified variable will be filled if an error occurs. This is specially important because SQL syntax errors can't be fetched using the {@see sqlite_last_error()} function.</p>
     * @return resource|false <p>
     * This function will return a result handle or <b>FALSE</b> on failure.
     * For queries that return rows, the result handle can then be used with
     * functions such as {@see sqlite_fetch_array()} and
     * {@see sqlite_seek()}.
     * </p>
     * <p>
     * Regardless of the query type, this function will return <b>FALSE</b> if the
     * query failed.
     * </p>
     * <p>
     * {@see sqlite_query()} returns a buffered, seekable result
     * handle.  This is useful for reasonably small queries where you need to
     * be able to randomly access the rows.  Buffered result handles will
     * allocate memory to hold the entire result and will not return until it
     * has been fetched.  If you only need sequential access to the data, it is
     * recommended that you use the much higher performance
     * {@see sqlite_unbuffered_query()} instead.
     * </p>
     */
    public function query($query, $result_type, &$error_message) {}

    /**
     * (PHP 5 &lt; 5.4.0, PECL sqlite &gt;= 1.0.0)
     * @link https://php.net/manual/en/function.sqlite-exec.php
     * @param string $query <p>
     * The query to be executed.
     * </p>
     * <p>
     * Data inside the query should be {@link https://php.net/manual/en/function.sqlite-escape-string.php properly escaped}.
     * </p>
     * @param string &$error_message [optional] <p>The specified variable will be filled if an error occurs. This is specially important because SQL syntax errors can't be fetched using the
     * {@see sqlite_last_error()} function.</p>
     * @return bool <p>
     * This function will return a boolean result; <b>TRUE</b> for success or <b>FALSE</b> for failure.
     * If you need to run a query that returns rows, see {@see sqlite_query()}.
     * </p>
     * <p>The column names returned by
     * <b>SQLITE_ASSOC</b> and <b>SQLITE_BOTH</b> will be
     * case-folded according to the value of the
     * {@link https://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case} configuration
     * option.</p>
     */
    public function queryExec($query, &$error_message) {}

    /**
     * (PHP 5 &lt; 5.4.0, PECL sqlite &gt;= 1.0.0)
     * Execute a query against a given database and returns an array
     * @link https://php.net/manual/en/function.sqlite-array-query.php
     * @param string $query <p>
     * The query to be executed.
     * </p>
     * <p>
     * Data inside the query should be {@link https://php.net/manual/en/function.sqlite-escape-string.php properly escaped}.
     * </p>
     * @param int $result_type [optional] <p>The optional <i>result_type</i>
     * parameter accepts a constant and determines how the returned array will be
     * indexed. Using <b>SQLITE_ASSOC</b> will return only associative
     * indices (named fields) while <b>SQLITE_NUM</b> will return
     * only numerical indices (ordinal field numbers). <b>SQLITE_BOTH</b>
     * will return both associative and numerical indices.
     * <b>SQLITE_BOTH</b> is the default for this function.</p>
     * @param bool $decode_binary [optional] <p>When the <i>decode_binary</i>
     * parameter is set to <b>TRUE</b> (the default), PHP will decode the binary encoding
     * it applied to the data if it was encoded using the
     * {@see sqlite_escape_string()}.  You should normally leave this
     * value at its default, unless you are interoperating with databases created by
     * other sqlite capable applications.</p>
     * <p>
     * @return array|false
     * Returns an array of the entire result set; <b>FALSE</b> otherwise.
     * </p>
     * <p>The column names returned by
     * <b>SQLITE_ASSOC</b> and <b>SQLITE_BOTH</b> will be
     * case-folded according to the value of the
     * {@link https://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case} configuration
     * option.</p>
     */
    public function arrayQuery($query, $result_type, $decode_binary) {}

    /**
     * (PHP 5 &lt; 5.4.0, PECL sqlite &gt;= 1.0.1)
     * Executes a query and returns either an array for one single column or the value of the first row
     * @link https://php.net/manual/en/function.sqlite-single-query.php
     * @param string $query
     * @param bool $first_row_only [optional]
     * @param bool $decode_binary [optional]
     * @return array
     */
    public function singleQuery($query, $first_row_only, $decode_binary) {}

    /**
     * (PHP 5 &lt; 5.4.0, PECL sqlite &gt;= 1.0.0)
     * Execute a query that does not prefetch and buffer all data
     * @link https://php.net/manual/en/function.sqlite-unbuffered-query.php
     * @param string $query  <p>
     * The query to be executed.
     * </p>
     * <p>
     * Data inside the query should be {@link https://php.net/manual/en/function.sqlite-escape-string.php properly escaped}.
     * </p>
     * @param int $result_type [optional] <p>The optional <i>result_type</i> parameter accepts a constant and determines how the returned array will be indexed.
     * Using <b>SQLITE_ASSOC</b> will return only associative indices (named fields) while <b>SQLITE_NUM</b> will return only numerical indices (ordinal field numbers).
     * <b>SQLITE_BOTH</b> will return both associative and numerical indices. <b>SQLITE_BOTH</b> is the default for this function.
     * </p>
     * @param string &$error_message [optional]
     * @return resource Returns a result handle or <b>FALSE</b> on failure.
     * {@see sqlite_unbuffered_query()} returns a sequential forward-only result set that can only be used to read each row, one after the other.
     */
    public function unbufferedQuery($query, $result_type = SQLITE_BOTH, &$error_message = null) {}

    /**
     * (PHP 5 &lt; 5.4.0, PECL sqlite &gt;= 1.0.0)
     * Returns the rowid of the most recently inserted row
     * @link https://php.net/manual/en/function.sqlite-last-insert-rowid.php
     * @return int Returns the row id, as an integer.
     */
    public function lastInsertRowid() {}

    /**
     * (PHP 5 &lt; 5.4.0, PECL sqlite &gt;= 1.0.0)
     * Returns the number of rows that were changed by the most recent SQL statement
     * @link https://php.net/manual/en/function.sqlite-changes.php
     * @return int Returns the number of changed rows.
     */
    public function changes() {}

    /**
     * (PHP 5 &lt; 5.4.0, PECL sqlite &gt;= 1.0.0)
     * Register an aggregating UDF for use in SQL statements
     * @link https://php.net/manual/en/function.sqlite-create-aggregate.php
     * @param string $function_name <p>The name of the function used in SQL statements.</p>
     * @param callable $step_func <p>Callback function called for each row of the result set. Function parameters are &$context, $value, ....</p>
     * @param callable $finalize_func <p>Callback function to aggregate the "stepped" data from each row. Function parameter is &$context and the function should return the final result of aggregation.</p>
     * @param int $num_args [optional] <p>Hint to the SQLite parser if the callback function accepts a predetermined number of arguments.</p>
     */
    public function createAggregate($function_name, $step_func, $finalize_func, $num_args = -1) {}

    /**
     * (PHP 5 &lt; 5.4.0, PECL sqlite &gt;= 1.0.0)
     * Registers a "regular" User Defined Function for use in SQL statements
     * @link https://php.net/manual/en/function.sqlite-create-function.php
     * @param string $function_name <p>The name of the function used in SQL statements.</p>
     * @param callable $callback <p>
     * Callback function to handle the defined SQL function.
     * </p>
     * <blockquote><p><b>Note</b>:
     * Callback functions should return a type understood by SQLite (i.e.
     * {@link https://php.net/manual/en/language.types.intro.php scalar type}).
     * </p></blockquote>
     * @param int $num_args [optional]   <blockquote><p><b>Note</b>: Two alternative syntaxes are
     * supported for compatibility with other database extensions (such as MySQL).
     * The preferred form is the first, where the <i>dbhandle</i>
     * parameter is the first parameter to the function.</p></blockquote>
     */
    public function createFunction($function_name, $callback, $num_args = -1) {}

    /**
     * (PHP 5 &lt; 5.4.0, PECL sqlite &gt;= 1.0.0)
     * Set busy timeout duration, or disable busy handlers
     * @link https://php.net/manual/en/function.sqlite-busy-timeout.php
     * @param int $milliseconds <p> The number of milliseconds. When set to 0, busy handlers will be disabled and SQLite will return immediately with a <b>SQLITE_BUSY</b> status code if another process/thread has the database locked for an update.
     * PHP sets the default busy timeout to be 60 seconds when the database is opened.</p>
     * @return int <p>Returns an error code, or 0 if no error occurred.</p>
     */
    public function busyTimeout($milliseconds) {}

    /**
     * (PHP 5 &lt; 5.4.0, PECL sqlite &gt;= 1.0.0)
     * Returns the error code of the last error for a database
     * @link https://php.net/manual/en/function.sqlite-last-error.php
     * @return int Returns an error code, or 0 if no error occurred.
     */
    public function lastError() {}

    /**
     * (PHP 5 &lt; 5.4.0)
     * Return an array of column types from a particular table
     * @link https://php.net/manual/en/function.sqlite-fetch-column-types.php
     * @param string $table_name <p>The table name to query.</p>
     * @param int $result_type [optional] <p>
     * The optional <i>result_type</i> parameter accepts a
     * constant and determines how the returned array will be indexed. Using
     * <b>SQLITE_ASSOC</b> will return only associative indices
     * (named fields) while <b>SQLITE_NUM</b> will return only
     * numerical indices (ordinal field numbers).
     * <b>SQLITE_ASSOC</b> is the default for
     * this function.
     * </p>
     * @return array <p>
     * Returns an array of column data types; <b>FALSE</b> on error.
     * </p>
     * <p>The column names returned by
     * <b>SQLITE_ASSOC</b> and <b>SQLITE_BOTH</b> will be
     * case-folded according to the value of the
     * {@link https://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case} configuration
     * option.</p>
     */
    public function fetchColumnTypes($table_name, $result_type = SQLITE_ASSOC) {}
}

/**
 * @link https://php.net/manual/en/ref.sqlite.php
 */
final class SQLiteResult implements Iterator, Countable
{
    /**
     * (PHP 5 &lt; 5.4.0, PECL sqlite &gt;= 1.0.0)
     * Fetches the next row from a result set as an array
     * @link https://php.net/manual/en/function.sqlite-fetch-array.php
     * @param int $result_type [optional]
     * <p>
     * The optional <i>result_type</i>
     * parameter accepts a constant and determines how the returned array will be
     * indexed. Using <b>SQLITE_ASSOC</b> will return only associative
     * indices (named fields) while <b>SQLITE_NUM</b> will return
     * only numerical indices (ordinal field numbers). <b>SQLITE_BOTH</b>
     * will return both associative and numerical indices.
     * <b>SQLITE_BOTH</b> is the default for this function.
     * </p>
     * @param bool $decode_binary [optional] <p>When the <i>decode_binary</i>
     * parameter is set to <b>TRUE</b> (the default), PHP will decode the binary encoding
     * it applied to the data if it was encoded using the
     * {@link https://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case}. You should normally leave this
     * value at its default, unless you are interoperating with databases created by
     * other sqlite capable applications.</p>
     * @return array
     * <p>
     * Returns an array of the next row from a result set; <b>FALSE</b> if the
     * next position is beyond the final row.
     * </p>
     * <p>The column names returned by
     * <b>SQLITE_ASSOC</b> and <b>SQLITE_BOTH</b> will be
     * case-folded according to the value of the
     * {@link https://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case}  configuration
     * option.</p>
     */
    public function fetch($result_type = SQLITE_BOTH, $decode_binary = true) {}

    /**
     * (PHP 5 &lt; 5.4.0)
     * Fetches the next row from a result set as an object
     * @link https://php.net/manual/en/function.sqlite-fetch-object.php
     * @param string $class_name [optional]
     * @param array $ctor_params [optional]
     * @param bool $decode_binary [optional]
     * @return object
     */
    public function fetchObject($class_name, $ctor_params, $decode_binary = true) {}

    /**
     * (PHP 5 &lt; 5.4.0, PECL sqlite &gt;= 1.0.1)
     * Fetches the first column of a result set as a string
     * @link https://php.net/manual/en/function.sqlite-fetch-single.php
     * @param bool $decode_binary [optional]
     * @return string <p>Returns the first column value, as a string.</p>
     */
    public function fetchSingle($decode_binary = true) {}

    /**
     * (PHP 5 &lt; 5.4.0)
     * Fetches the next row from a result set as an object
     * @link https://www.php.net/manual/en/function.sqlite-fetch-all.php
     * @param int $result_type [optional] <p>
     * The optional result_type parameter accepts a constant and determines how the returned array will be indexed.
     * Using SQLITE_ASSOC will return only associative indices (named fields) while SQLITE_NUM will return only numerical indices (ordinal field numbers).
     * {@see SQLITE_BOTH} will return both associative and numerical indices. {@see SQLITE_BOTH} is the default for this function.</p>
     * @param bool $decode_binary [optional] <p> When the decode_binary parameter is set to TRUE (the default),
     * PHP will decode the binary encoding it applied to the data if it was encoded using the {@see sqlite_escape_string()}.
     * You should normally leave this value at its default, unless you are interoperating with databases created by other sqlite capable applications.</p>
     * @return object
     */
    public function fetchAll($result_type, $decode_binary = true) {}

    /**
     * (PHP 5 &lt; 5.4.0, PECL sqlite &gt;= 1.0.0)
     * Fetches a column from the current row of a result set
     * @link https://php.net/manual/en/function.sqlite-column.php
     * @param $index_or_name
     * @param $decode_binary [optional] <p>When the <i>decode_binary</i>
     * parameter is set to <b>TRUE</b> (the default), PHP will decode the binary encoding
     * it applied to the data if it was encoded using the
     * {@see sqlite_escape_string()}.  You should normally leave this
     * value at its default, unless you are interoperating with databases created by
     * other sqlite capable applications.</p>
     * @return mixed <p>Returns the column value</p>
     */
    public function column($index_or_name, $decode_binary = true) {}

    /**
     * (PHP 5 &lt; 5.4.0, PECL sqlite &gt;= 1.0.0)
     * Returns the number of fields in a result set
     * @link https://php.net/manual/en/function.sqlite-num-fields.php
     * @return int <p>Returns the number of fields, as an integer.</p>
     */
    public function numFields() {}

    /**
     * (PHP 5 &lt; 5.4.0, PECL sqlite &gt;= 1.0.0)
     * Returns the name of a particular field
     * @link https://php.net/manual/en/function.sqlite-field-name.php
     * @param int $field_index <p>The ordinal column number in the result set.</p>
     * @return string <p>
     * Returns the name of a field in an SQLite result set, given the ordinal
     * column number; <b>FALSE</b> on error.
     * </p>
     * <p>The column names returned by
     * <b>SQLITE_ASSOC</b> and <b>SQLITE_BOTH</b> will be
     * case-folded according to the value of the
     * {@link https://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case}configuration
     * option.</p>
     */
    public function fieldName($field_index) {}

    /**
     * (PHP 5 &lt; 5.4.0, PECL sqlite &gt;= 1.0.0)
     * Fetches the current row from a result set as an array
     * @link https://php.net/manual/en/function.sqlite-current.php
     * @param int $result_type [optional] <p>The optional <i>result_type</i>
     * parameter accepts a constant and determines how the returned array will be
     * indexed. Using {@see SQLITE_ASSOC} will return only associative
     * indices (named fields) while {@see SQLITE_NUM} will return
     * only numerical indices (ordinal field numbers). <b>SQLITE_BOTH</b>
     * will return both associative and numerical indices.
     * {@see SQLITE_BOTH} is the default for this function.</p>
     * @param bool $decode_binary [optional] <p>When the <i>decode_binary</i>
     * parameter is set to <b>TRUE</b> (the default), PHP will decode the binary encoding
     * it applied to the data if it was encoded using the
     * {@see sqlite_escape_string()}.  You should normally leave this
     * value at its default, unless you are interoperating with databases created by
     * other sqlite capable applications.</p>
     * @return array <p>
     * Returns an array of the current row from a result set; <b>FALSE</b> if the
     * current position is beyond the final row.
     * </p>
     * <p>The column names returned by
     * <b>SQLITE_ASSOC</b> and <b>SQLITE_BOTH</b> will be
     * case-folded according to the value of the
     * {@link https://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case} configuration
     * option.</p>
     */
    public function current($result_type = SQLITE_BOTH, $decode_binary = true) {}

    /**
     * Return the key of the current element
     * @link https://php.net/manual/en/iterator.key.php
     * @return mixed scalar on success, or null on failure.
     * @since 5.0.0
     */
    public function key() {}

    /**
     * Seek to the next row number
     * @link https://php.net/manual/en/function.sqlite-next.php
     * @return bool Returns <b>TRUE</b> on success, or <b>FALSE</b> if there are no more rows.
     * @since 5.0.0
     */
    public function next() {}

    /**
     * Checks if current position is valid
     * @link https://php.net/manual/en/iterator.valid.php
     * @return bool <p>
     * Returns <b>TRUE</b> if there are more rows available from the
     * <i>result</i> handle, or <b>FALSE</b> otherwise.
     * </p>
     * @since 5.0.0
     */
    public function valid() {}

    /**
     * Rewind the Iterator to the first element
     * @link https://php.net/manual/en/iterator.rewind.php
     * @return void Any returned value is ignored.
     * @since 5.0.0
     */
    public function rewind() {}

    /**
     * Count elements of an object
     * @link https://php.net/manual/en/countable.count.php
     * @return int <p>The custom count as an integer.
     * </p>
     * <p>
     * The return value is cast to an integer.
     * </p>
     * @since 5.1.0
     */
    public function count() {}

    /**
     * Seek to the previous row number of a result set
     * @link https://php.net/manual/en/function.sqlite-prev.php
     * @return bool <p> Returns <b>TRUE</b> on success, or <b>FALSE</b> if there are no more previous rows.
     * </p>
     * @since 5.4.0
     */
    public function prev() {}

    /**
     *@since 5.4.0
     * Returns whether or not a previous row is available
     * @link https://php.net/manual/en/function.sqlite-has-prev.php
     * @return bool <p>
     * Returns <b>TRUE</b> if there are more previous rows available from the
     * <i>result</i> handle, or <b>FALSE</b> otherwise.
     * </p>
     */
    public function hasPrev() {}

    /**
     * (PHP 5 &lt; 5.4.0, PECL sqlite &gt;= 1.0.0)
     * Returns the number of rows in a buffered result set
     * @link https://php.net/manual/en/function.sqlite-num-rows.php
     * @return int Returns the number of rows, as an integer.
     */
    public function numRows() {}

    /**
     * (PHP 5 &lt; 5.4.0, PECL sqlite &gt;= 1.0.0)
     * Seek to a particular row number of a buffered result set
     * @link https://php.net/manual/en/function.sqlite-seek.php
     * @param $row
     * <p>
     * The ordinal row number to seek to.  The row number is zero-based (0 is
     * the first row).
     * </p>
     * <blockquote><p><b>Note</b>: </p><p>This function cannot be used with
     * unbuffered result handles.</p></blockquote>
     */
    public function seek($row) {}
}

/**
 * Represents an unbuffered SQLite result set. Unbuffered results sets are sequential, forward-seeking only.
 * @link https://php.net/manual/en/ref.sqlite.php
 */
final class SQLiteUnbuffered
{
    /**
     * @param int $result_type [optional]
     * @param bool $decode_binary [optional]
     */
    public function fetch($result_type, $decode_binary) {}

    /**
     * @link https://www.php.net/manual/en/function.sqlite-fetch-object.php
     * @param string $class_name [optional]
     * @param array $ctor_params [optional]
     * @param bool $decode_binary [optional]
     */
    public function fetchObject($class_name, $ctor_params, $decode_binary) {}

    /**
     * @param bool $decode_binary [optional]
     */
    public function fetchSingle($decode_binary) {}

    /**
     * @param int $result_type [optional]
     * @param bool $decode_binary [optional]
     */
    public function fetchAll($result_type, $decode_binary) {}

    /**
     * @param $index_or_name
     * @param $decode_binary [optional]
     */
    public function column($index_or_name, $decode_binary) {}

    public function numFields() {}

    /**
     * @param int $field_index
     */
    public function fieldName($field_index) {}

    /**
     * @param int $result_type [optional]
     * @param bool $decode_binary [optional]
     */
    public function current($result_type, $decode_binary) {}

    public function next() {}

    public function valid() {}
}

final class SQLiteException extends RuntimeException
{
    protected $message;
    protected $code;
    protected $file;
    protected $line;

    /**
     * Clone the exception
     * @link https://php.net/manual/en/exception.clone.php
     * @return void
     * @since 5.1.0
     */
    final private function __clone() {}

    /**
     * Construct the exception
     * @link https://php.net/manual/en/exception.construct.php
     * @param $message [optional]
     * @param $code [optional]
     * @param $previous [optional]
     * @since 5.1.0
     */
    #[Pure]
    public function __construct($message, $code, $previous) {}

    /**
     * String representation of the exception
     * @link https://php.net/manual/en/exception.tostring.php
     * @return string the string representation of the exception.
     * @since 5.1.0
     */
    public function __toString() {}
}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Opens a SQLite database and create the database if it does not exist
 * @link https://php.net/manual/en/function.sqlite-open.php
 * @param string $filename <p>
 * The filename of the SQLite database. If the file does not exist, SQLite
 * will attempt to create it. PHP must have write permissions to the file
 * if data is inserted, the database schema is modified or to create the
 * database if it does not exist.
 * </p>
 * @param int $mode [optional] <p>
 * The mode of the file. Intended to be used to open the database in
 * read-only mode. Presently, this parameter is ignored by the sqlite
 * library. The default value for mode is the octal value
 * 0666 and this is the recommended value.
 * </p>
 * @param string &$error_message [optional] <p>
 * Passed by reference and is set to hold a descriptive error message
 * explaining why the database could not be opened if there was an error.
 * </p>
 * @return resource|false a resource (database handle) on success, false on error.
 */
function sqlite_open($filename, $mode = null, &$error_message = null) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Opens a persistent handle to an SQLite database and create the database if it does not exist
 * @link https://php.net/manual/en/function.sqlite-popen.php
 * @param string $filename <p>
 * The filename of the SQLite database. If the file does not exist, SQLite
 * will attempt to create it. PHP must have write permissions to the file
 * if data is inserted, the database schema is modified or to create the
 * database if it does not exist.
 * </p>
 * @param int $mode [optional] <p>
 * The mode of the file. Intended to be used to open the database in
 * read-only mode. Presently, this parameter is ignored by the sqlite
 * library. The default value for mode is the octal value
 * 0666 and this is the recommended value.
 * </p>
 * @param string &$error_message [optional] <p>
 * Passed by reference and is set to hold a descriptive error message
 * explaining why the database could not be opened if there was an error.
 * </p>
 * @return resource|false <p>a resource (database handle) on success, false on error.</p>
 */
function sqlite_popen($filename, $mode = null, &$error_message = null) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Closes an open SQLite database
 * @link https://php.net/manual/en/function.sqlite-close.php
 * @param resource $dbhandle <p>
 * The SQLite Database resource; returned from sqlite_open
 * when used procedurally.
 * </p>
 * @return void
 */
function sqlite_close($dbhandle) {}

/**
 * (PHP 5 &lt; 5.4.0, PECL sqlite &gt;= 1.0.0)<br/>
 * Executes a query against a given database and returns a result handle
 * there are two signatures with <i>$query</i> first and with <i>$dbhandle</i> first.
 * @link https://php.net/manual/en/function.sqlite-query.php
 * @param string|resource $query <p>
 * The query to be executed.
 * </p>
 * <p>
 * Data inside the query should be properly escaped.
 * </p>
 * @param resource|string $dbhandle The SQLite Database resource; returned from sqlite_open() when used procedurally. This parameter is not required when using the object-oriented method.
 * @param int $result_type [optional] <p>The optional <i>result_type</i>
 * parameter accepts a constant and determines how the returned array will be
 * indexed. Using <b>SQLITE_ASSOC</b> will return only associative
 * indices (named fields) while <b>SQLITE_NUM</b> will return
 * only numerical indices (ordinal field numbers). <b>SQLITE_BOTH</b>
 * will return both associative and numerical indices.
 * <b>SQLITE_BOTH</b> is the default for this function.</p>
 * @param string &$error_msg [optional] <p>
 * The specified variable will be filled if an error occurs. This is
 * specially important because SQL syntax errors can't be fetched using
 * the
 * {@see sqlite_last_error} function.
 * </p>
 * @return resource|false  This function will return a result handle or <b>FALSE</b> on failure.
 * For queries that return rows, the result handle can then be used with
 * functions such as
 * {@see sqlite_fetch_array} and
 * {@see sqlite_seek}.
 * </p>
 * <p>
 * Regardless of the query type, this function will return false if the
 * query failed.
 * </p>
 * <p>
 * {@see sqlite_query} returns a buffered, seekable result
 * handle. This is useful for reasonably small queries where you need to
 * be able to randomly access the rows. Buffered result handles will
 * allocate memory to hold the entire result and will not return until it
 * has been fetched. If you only need sequential access to the data, it is
 * recommended that you use the much higher performance
 * {@see sqlite_unbuffered_query} instead.
 */
function sqlite_query($query, $dbhandle, $result_type = SQLITE_BOTH, &$error_msg = null) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.3)<br/>
 * Executes a result-less query against a given database
 * @link https://php.net/manual/en/function.sqlite-exec.php
 * @param string $query <p>
 * The query to be executed.
 * </p>
 * <p>
 * Data inside the query should be properly escaped.
 * </p>
 * @param resource $dbhandle <p>
 * The SQLite Database resource; returned from
 * {@see sqlite_open()} when used procedurally. This parameter
 * is not required when using the object-oriented method.
 * </p>
 * @param string &$error_msg [optional] <p>
 * The specified variable will be filled if an error occurs. This is
 * specially important because SQL syntax errors can't be fetched using
 * the
 * {@see sqlite_last_error} function.
 * </p>
 * @return bool <p>This function will return a boolean result; true for success or false for failure.
 * If you need to run a query that returns rows, see sqlite_query.</p>
 */
function sqlite_exec($dbhandle, $query, &$error_msg = null) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Execute a query against a given database and returns an array
 * @link https://php.net/manual/en/function.sqlite-array-query.php
 * @param string $query <p>
 * The query to be executed.
 * </p>
 * <p>
 * Data inside the query should be properly escaped.
 * </p>
 * @param resource $dbhandle <p>
 * The SQLite Database resource; returned from
 * {@see sqlite_open()}
 * when used procedurally.  This parameter is not required
 * when using the object-oriented method.
 * </p>
 * @param int $result_type [optional] <p>The optional <i>result_type</i>
 * parameter accepts a constant and determines how the returned array will be
 * indexed. Using <b>SQLITE_ASSOC</b> will return only associative
 * indices (named fields) while <b>SQLITE_NUM</b> will return
 * only numerical indices (ordinal field numbers). <b>SQLITE_BOTH</b>
 * will return both associative and numerical indices.
 * <b>SQLITE_BOTH</b> is the default for this function.</p>
 * @param bool $decode_binary [optional] <p>When the <i>decode_binary</i>
 * parameter is set to <b>TRUE</b> (the default), PHP will decode the binary encoding
 * it applied to the data if it was encoded using the
 * {@link sqlite_escape_string()}.  You should normally leave this
 * value at its default, unless you are interoperating with databases created by
 * other sqlite capable applications.</p>
 * @return array|false an array of the entire result set; false otherwise.
 * <p>The column names returned by
 * <b>SQLITE_ASSOC</b> and <b>SQLITE_BOTH</b> will be
 * case-folded according to the value of the
 * {@link php.net/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case} configuration
 * option.</p>
 */
function sqlite_array_query($dbhandle, $query, $result_type = null, $decode_binary = null) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.1)<br/>
 * Executes a query and returns either an array for one single column or the value of the first row
 * @link https://php.net/manual/en/function.sqlite-single-query.php
 * @param resource $db
 * @param string $query
 * @param bool $first_row_only [optional]
 * @param bool $decode_binary [optional]
 * @return array
 */
function sqlite_single_query($db, $query, $first_row_only = null, $decode_binary = null) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Fetches the next row from a result set as an array
 * @link https://php.net/manual/en/function.sqlite-fetch-array.php
 * @param resource $result <p>The SQLite result resource. This parameter is not required when using the object-oriented method.</p>
 * @param int $result_type [optional]
 * @param bool $decode_binary [optional]
 * @return array|false <p>an array of the next row from a result set; false if the
 * next position is beyond the final row.</p>
 */
function sqlite_fetch_array($result, $result_type = SQLITE_BOTH, $decode_binary = null) {}

/**
 * Fetches the next row from a result set as an object
 * @link https://php.net/manual/en/function.sqlite-fetch-object.php
 * @param resource $result
 * @param string $class_name [optional]
 * @param null|array $ctor_params [optional]
 * @param bool $decode_binary [optional]
 * @return object
 */
function sqlite_fetch_object($result, $class_name = null, ?array $ctor_params = null, $decode_binary = null) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.1)<br/>
 * Fetches the first column of a result set as a string
 * @link https://php.net/manual/en/function.sqlite-fetch-single.php
 * @param resource $result <p>The SQLite result resource. This parameter is not required when using the object-oriented method.</p>
 * @param bool $decode_binary [optional] <p>When the <b>decode_binary</b>
 * parameter is set to <b>TRUE</b> (the default), PHP will decode the binary encoding
 * it applied to the data if it was encoded using the
 * {@see sqlite_escape_string()}.  You should normally leave this
 * value at its default, unless you are interoperating with databases created by
 * other sqlite capable applications.</p>
 * @return string <p>the first column value, as a string.</p>
 */
function sqlite_fetch_single($result, $decode_binary = null) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Alias:
 * {@see sqlite_fetch_single}
 * @link https://php.net/manual/en/function.sqlite-fetch-string.php
 * @param resource $result <p>The SQLite result resource. This parameter is not required when using the object-oriented method.</p>
 * @param bool $decode_binary [optional] <p>When the <b>decode_binary</b>
 * parameter is set to <b>TRUE</b> (the default), PHP will decode the binary encoding
 * it applied to the data if it was encoded using the
 * {@see sqlite_escape_string()}.  You should normally leave this
 * value at its default, unless you are interoperating with databases created by
 * other sqlite capable applications.</p>
 * @return string <p>the first column value, as a string.</p>
 */
function sqlite_fetch_string($result, $decode_binary) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Fetches all rows from a result set as an array of arrays
 * @link https://php.net/manual/en/function.sqlite-fetch-all.php
 * @param int $result_type [optional]
 * @param bool $decode_binary [optional]
 * @return array <p>an array of the remaining rows in a result set. If called right
 * after
 * {@see sqlite_query}, it returns all rows. If called
 * after
 * {@see sqlite_fetch_array}, it returns the rest. If
 * there are no rows in a result set, it returns an empty array.</p>
 * <p>The column names returned by <b>SQLITE_ASSOC</b> and <b>SQLITE_BOTH</b> will be case-folded according to the value of the
 * {@link https://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case} configuration option.</p>
 */
function sqlite_fetch_all($result_type = null, $decode_binary = null) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Fetches the current row from a result set as an array
 * @link https://php.net/manual/en/function.sqlite-current.php
 * @param resource $result <p>The SQLite result resource. This parameter is not required when using the object-oriented method.</p>
 * @param int $result_type [optional] <p>The optional result_type parameter accepts a constant and determines how the returned array will be indexed. Using <b>SQLITE_ASSOC</b> will return only associative indices (named fields) while <b>SQLITE_NUM</b> will return only numerical indices (ordinal field numbers). <b>SQLITE_BOTH</b> will return both associative and numerical indices. <b>SQLITE_BOTH</b> is the default for this function.</p>
 * @param bool $decode_binary [optional] <p>When the decode_binary parameter is set to <b>TRUE</b> (the default), PHP will decode the binary encoding it applied to the data if it was encoded using the sqlite_escape_string(). You should normally leave this value at its default, unless you are interoperating with databases created by other sqlite capable applications.</p>
 * @return array|false an array of the current row from a result set; false if the
 * current position is beyond the final row.
 */
function sqlite_current($result, $result_type = null, $decode_binary = null) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Fetches a column from the current row of a result set
 * @link https://php.net/manual/en/function.sqlite-column.php
 * @param resource $result <p>The SQLite result resource. This parameter is not required when using the object-oriented method.</p>
 * @param mixed $index_or_name <p>
 * The column index or name to fetch.
 * </p>
 * @param bool $decode_binary [optional] <p>When the <b>decode_binary</b>
 * parameter is set to <b>TRUE</b> (the default), PHP will decode the binary encoding
 * it applied to the data if it was encoded using the
 * {@see sqlite_escape_string()}.  You should normally leave this
 * value at its default, unless you are interoperating with databases created by
 * other sqlite capable applications.</p>
 * @return mixed the column value.
 */
function sqlite_column($result, $index_or_name, $decode_binary = null) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Returns the version of the linked SQLite library
 * @link https://php.net/manual/en/function.sqlite-libversion.php
 * @return string the library version, as a string.
 */
function sqlite_libversion() {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Returns the encoding of the linked SQLite library
 * @link https://php.net/manual/en/function.sqlite-libencoding.php
 * @return string the library encoding.
 */
function sqlite_libencoding() {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Returns the number of rows that were changed by the most
 * recent SQL statement
 * @link https://php.net/manual/en/function.sqlite-changes.php
 * @param $db
 * @return int the number of changed rows.
 */
function sqlite_changes($db) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Returns the rowid of the most recently inserted row
 * @link https://php.net/manual/en/function.sqlite-last-insert-rowid.php
 * @param resource $dbhandle <p>The SQLite Database resource; returned from
 * {@see sqlite_open()} when used procedurally. This parameter is not required when using the object-oriented method.</p>
 * @return int the row id, as an integer.
 */
function sqlite_last_insert_rowid($dbhandle) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Returns the number of rows in a buffered result set
 * @link https://php.net/manual/en/function.sqlite-num-rows.php
 * @param resource $result <p>
 * The SQLite result resource.  This parameter is not required when using
 * the object-oriented method.
 * </p>
 * <blockquote><p><b>Note</b>: </p><p>This function cannot be used with
 * unbuffered result handles.</p></blockquote>
 * @return int the number of rows, as an integer.
 */
function sqlite_num_rows($result) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Returns the number of fields in a result set
 * @link https://php.net/manual/en/function.sqlite-num-fields.php
 * @param resource $result <p>The SQLite result resource. This parameter is not required when using the object-oriented method.</p>
 * @return int the number of fields, as an integer.
 */
function sqlite_num_fields($result) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Returns the name of a particular field
 * @link https://php.net/manual/en/function.sqlite-field-name.php
 * @param resource $result <p>The SQLite result resource. This parameter is not required when using the object-oriented method.</p>
 * @param int $field_index <p>
 * The ordinal column number in the result set.
 * </p>
 * @return string the name of a field in an SQLite result set, given the ordinal
 * column number; false on error.
 */
function sqlite_field_name($result, $field_index) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Seek to a particular row number of a buffered result set
 * @link https://php.net/manual/en/function.sqlite-seek.php
 * @param resource $result <p>
 * The SQLite result resource.  This parameter is not required when using
 * the object-oriented method.
 * </p>
 * <blockquote><p><b>Note</b>: </p><p>This function cannot be used with
 * unbuffered result handles.</p></blockquote>
 * @param int $rownum <p>
 * The ordinal row number to seek to. The row number is zero-based (0 is
 * the first row).
 * </p>
 * @return bool false if the row does not exist, true otherwise.
 */
function sqlite_seek($result, $rownum) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Seek to the first row number
 * @link https://php.net/manual/en/function.sqlite-rewind.php
 * @param resource $result <p>
 * The SQLite result resource.  This parameter is not required when using
 * the object-oriented method.
 * </p>
 * <blockquote><p><b>Note</b>: </p><p>This function cannot be used with
 * unbuffered result handles.</p></blockquote>
 * @return bool false if there are no rows in the result set, true otherwise.
 */
function sqlite_rewind($result) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Seek to the next row number
 * @link https://php.net/manual/en/function.sqlite-next.php
 * @param resource $result <p>
 * The SQLite result resource.  This parameter is not required when using
 * the object-oriented method.
 * </p>
 * <blockquote><p><b>Note</b>: </p><p>This function cannot be used with
 * unbuffered result handles.</p></blockquote>
 * @return bool <b>TRUE</b> on success, or <b>FALSE</b> if there are no more rows.
 */
function sqlite_next($result) {}

/**
 * Seek to the previous row number of a result set
 * @link https://php.net/manual/en/function.sqlite-prev.php
 * @param resource $result <p>
 * The SQLite result resource.  This parameter is not required when using
 * the object-oriented method.
 * </p>
 * <blockquote><p><b>Note</b>: </p><p>This function cannot be used with
 * unbuffered result handles.</p></blockquote>
 * @return bool true on success, or false if there are no more previous rows.
 */
function sqlite_prev($result) {}

/**
 * Returns whether more rows are available
 * @link https://php.net/manual/en/function.sqlite-valid.php
 * @param resource $result <p>
 * The SQLite result resource.  This parameter is not required when using
 * the object-oriented method.
 * </p>
 * <blockquote><p><b>Note</b>: </p><p>This function cannot be used with
 * unbuffered result handles.</p></blockquote>
 * @return bool <b>TRUE</b> if there are more rows available from the
 * result handle, or <b>FALSE</b> otherwise.
 */
function sqlite_valid($result) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Finds whether or not more rows are available
 * @link https://php.net/manual/en/function.sqlite-has-more.php
 * @param resource $result <p>
 * The SQLite result resource.
 * </p>
 * @return bool <b>TRUE</b> if there are more rows available from the
 * result handle, or <b>FALSE</b> otherwise.
 */
function sqlite_has_more($result) {}

/**
 * Returns whether or not a previous row is available
 * @link https://php.net/manual/en/function.sqlite-has-prev.php
 * @param resource $result <p>
 * The SQLite result resource.  This parameter is not required when using
 * the object-oriented method.
 * </p>
 * @return bool <b>TRUE</b> if there are more previous rows available from the
 * result handle, or <b>FALSE</b> otherwise.
 */
function sqlite_has_prev($result) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Escapes a string for use as a query parameter
 * @link https://php.net/manual/en/function.sqlite-escape-string.php
 * @param string $item <p>
 * The string being quoted.
 * </p>
 * <p>
 * If the item contains a NUL
 * character, or if it begins with a character whose ordinal value is
 * 0x01, PHP will apply a binary encoding scheme so that
 * you can safely store and retrieve binary data.
 * </p>
 * @return string an escaped string for use in an SQLite SQL statement.
 */
function sqlite_escape_string($item) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Set busy timeout duration, or disable busy handlers
 * @link https://php.net/manual/en/function.sqlite-busy-timeout.php
 * @param resource $dbhandle <p>The SQLite Database resource; returned from
 * {@see sqlite_open()} when used procedurally.
 * This parameter is not required when using the object-oriented method.</p>
 * @param int $milliseconds <p>
 * The number of milliseconds. When set to
 * 0, busy handlers will be disabled and SQLite will
 * return immediately with a <b>SQLITE_BUSY</b> status code
 * if another process/thread has the database locked for an update.
 * </p>
 * <p>
 * PHP sets the default busy timeout to be 60 seconds when the database is
 * opened.
 * </p>
 * <p>
 * There are one thousand (1000) milliseconds in one second.
 * </p>
 * @return void
 */
function sqlite_busy_timeout($dbhandle, $milliseconds) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Returns the error code of the last error for a database
 * @link https://php.net/manual/en/function.sqlite-last-error.php
 * @param resource $dbhandle <p>The SQLite Database resource; returned from
 * {@see sqlite_open()} when used procedurally.
 * This parameter is not required when using the object-oriented method.</p>
 * @return int an error code, or 0 if no error occurred.
 */
function sqlite_last_error($dbhandle) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Returns the textual description of an error code
 * @link https://php.net/manual/en/function.sqlite-error-string.php
 * @param int $error_code <p>
 * The error code being used, which might be passed in from
 * {@see sqlite_last_error}.
 * </p>
 * @return string a human readable description of the error_code,
 * as a string.
 */
function sqlite_error_string($error_code) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Execute a query that does not prefetch and buffer all data
 * @link https://php.net/manual/en/function.sqlite-unbuffered-query.php
 * @param resource $dbhandle <p>The SQLite Database resource; returned from
 * {@see sqlite_open()} when used procedurally.
 * This parameter is not required when using the object-oriented method.</p>
 * @param string $query <p>
 * The query to be executed.
 * </p>
 * <p>
 * Data inside the query should be properly escaped.
 * </p>
 * @param int $result_type [optional]
 * @param string &$error_msg [optional] <p>
 * The specified variable will be filled if an error occurs. This is
 * specially important because SQL syntax errors can't be fetched using
 * the sqlite_last_error function.
 * </p>
 * @return SQLiteUnbuffered|false a result handle or false on failure.
 * <p>
 * sqlite_unbuffered_query returns a sequential
 * forward-only result set that can only be used to read each row, one after
 * the other.
 * </p>
 */
function sqlite_unbuffered_query($dbhandle, $query, $result_type = SQLITE_BOTH, &$error_msg = null) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Register an aggregating UDF for use in SQL statements
 * @link https://php.net/manual/en/function.sqlite-create-aggregate.php
 * @param resource $dbhandle <p>The SQLite Database resource; returned from
 * {@see sqlite_open()} when used procedurally.
 * This parameter is not required when using the object-oriented method.</p>
 * @param string $function_name <p>
 * The name of the function used in SQL statements.
 * </p>
 * @param callable $step_func <p>
 * Callback function called for each row of the result set.
 * </p>
 * @param callable $finalize_func <p>
 * Callback function to aggregate the "stepped" data from each row.
 * </p>
 * @param int $num_args [optional] <p>
 * Hint to the SQLite parser if the callback function accepts a
 * predetermined number of arguments.
 * </p>
 * @return void
 */
function sqlite_create_aggregate($dbhandle, $function_name, $step_func, $finalize_func, $num_args = null) {}

/**
 * (PHP 5, sqlite &gt;= 1.0.0)<br/>
 * Registers a "regular" User Defined Function for use in SQL statements
 * @link https://php.net/manual/en/function.sqlite-create-function.php
 * @param resource $dbhandle <p>The SQLite Database resource; returned from
 * {@see sqlite_open()} when used procedurally.
 * This parameter is not required when using the object-oriented method.</p>
 * @param string $function_name <p>
 * The name of the function used in SQL statements.
 * </p>
 * @param callable $callback <p>
 * Callback function to handle the defined SQL function.
 * </p>
 * Callback functions should return a type understood by SQLite (i.e.
 * scalar type).
 * @param int $num_args [optional] <p>
 * Hint to the SQLite parser if the callback function accepts a
 * predetermined number of arguments.
 * </p>
 * @return void
 */
function sqlite_create_function($dbhandle, $function_name, $callback, $num_args = null) {}

/**
 * Opens a SQLite database and returns a SQLiteDatabase object
 * @link https://php.net/manual/en/function.sqlite-factory.php
 * @param string $filename <p>
 * The filename of the SQLite database.
 * </p>
 * @param int $mode [optional] <p>
 * The mode of the file. Intended to be used to open the database in
 * read-only mode. Presently, this parameter is ignored by the sqlite
 * library. The default value for mode is the octal value
 * 0666 and this is the recommended value.
 * </p>
 * @param string &$error_message [optional] <p>
 * Passed by reference and is set to hold a descriptive error message
 * explaining why the database could not be opened if there was an error.
 * </p>
 * @return SQLiteDatabase|null a SQLiteDatabase object on success, null on error.
 */
function sqlite_factory($filename, $mode = null, &$error_message = null) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Encode binary data before returning it from an UDF
 * @link https://php.net/manual/en/function.sqlite-udf-encode-binary.php
 * @param string $data <p>
 * The string being encoded.
 * </p>
 * @return string The encoded string.
 */
function sqlite_udf_encode_binary($data) {}

/**
 * (PHP 5, PECL sqlite &gt;= 1.0.0)<br/>
 * Decode binary data passed as parameters to an <acronym>UDF</acronym>
 * @link https://php.net/manual/en/function.sqlite-udf-decode-binary.php
 * @param string $data <p>
 * The encoded data that will be decoded, data that was applied by either
 * sqlite_udf_encode_binary or
 * sqlite_escape_string.
 * </p>
 * @return string The decoded string.
 */
function sqlite_udf_decode_binary($data) {}

/**
 * Return an array of column types from a particular table
 * @link https://php.net/manual/en/function.sqlite-fetch-column-types.php
 * @param string $table_name <p>
 * The table name to query.
 * </p>
 * @param resource $dbhandle <p>The SQLite Database resource; returned from
 * {@see sqlite_open()} when used procedurally.
 * This parameter is not required when using the object-oriented method.</p>
 * @param int $result_type [optional] <p>
 * The optional result_type parameter accepts a
 * constant and determines how the returned array will be indexed. Using
 * <b>SQLITE_ASSOC</b> will return only associative indices
 * (named fields) while <b>SQLITE_NUM</b> will return only
 * numerical indices (ordinal field numbers).
 * SQLITE_BOTH will return both associative and
 * numerical indices. <b>SQLITE_ASSOC</b> is the default for
 * this function.
 * </p>
 * @return array|false an array of column data types; false on error.
 */
function sqlite_fetch_column_types($dbhandle, $table_name, $result_type = null) {}

/**
 * Columns are returned into the array having both a numerical index
 * and the field name as the array index.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_BOTH', 3);

/**
 * Columns are returned into the array having a numerical index to the
 * fields. This index starts with 0, the first field in the result.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_NUM', 2);

/**
 * Columns are returned into the array having the field name as the array
 * index.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_ASSOC', 1);

/**
 * Successful result.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_OK', 0);

/**
 * SQL error or missing database.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_ERROR', 1);

/**
 * An internal logic error in SQLite.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_INTERNAL', 2);

/**
 * Access permission denied.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_PERM', 3);

/**
 * Callback routine requested an abort.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_ABORT', 4);

/**
 * The database file is locked.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_BUSY', 5);

/**
 * A table in the database is locked.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_LOCKED', 6);

/**
 * Memory allocation failed.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_NOMEM', 7);

/**
 * Attempt to write a readonly database.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_READONLY', 8);

/**
 * Operation terminated internally.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_INTERRUPT', 9);

/**
 * Disk I/O error occurred.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_IOERR', 10);

/**
 * The database disk image is malformed.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_CORRUPT', 11);

/**
 * (Internal) Table or record not found.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_NOTFOUND', 12);

/**
 * Insertion failed because database is full.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_FULL', 13);

/**
 * Unable to open the database file.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_CANTOPEN', 14);

/**
 * Database lock protocol error.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_PROTOCOL', 15);

/**
 * (Internal) Database table is empty.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_EMPTY', 16);

/**
 * The database schema changed.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_SCHEMA', 17);

/**
 * Too much data for one row of a table.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_TOOBIG', 18);

/**
 * Abort due to constraint violation.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_CONSTRAINT', 19);

/**
 * Data type mismatch.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_MISMATCH', 20);

/**
 * Library used incorrectly.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_MISUSE', 21);

/**
 * Uses of OS features not supported on host.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_NOLFS', 22);

/**
 * Authorized failed.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_AUTH', 23);

/**
 * File opened that is not a database file.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_NOTADB', 26);

/**
 * Auxiliary database format error.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_FORMAT', 24);

/**
 * Internal process has another row ready.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_ROW', 100);

/**
 * Internal process has finished executing.
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE_DONE', 101);
<?php

// Start of inotify v.0.1.6

/**
 * (PHP &gt;= 5.2.0, PECL inotify &gt;= 0.1.2)<br/>
 * Add a watch to an initialized inotify instance
 *
 * @link https://php.net/manual/en/function.inotify-add-watch.php
 *
 * @param resource $inotify_instance <p>resource returned by {@link https://php.net/manual/en/function.inotify-init.php inotify_init()}</p>
 * @param string   $pathname         <p>File or directory to watch</p>
 * @param int      $mask             <p>Events to watch for. See {@link https://php.net/manual/en/inotify.constants.php Predefined Constants}.</p>
 *
 * @return int a unique (<i>inotify</i> instance-wide) watch descriptor.
 */
function inotify_add_watch($inotify_instance, $pathname, $mask) {}

/**
 * (PHP &gt;= 5.2.0, PECL inotify &gt;= 0.1.2)<br/>
 * Initialize an inotify instance for use with {@see inotify_add_watch}
 *
 * @link https://php.net/manual/en/function.inotify-init.php
 * @return resource|false a stream resource or <b>FALSE</b> on error.
 */
function inotify_init() {}

/**
 * (PHP &gt;= 5.2.0, PECL inotify &gt;= 0.1.2)<br/>
 * This function allows to know if {@see inotify_read} will block or not.
 * If a number upper than zero is returned, there are pending events
 * and {@see inotify_read} will not block.
 *
 * @link https://php.net/manual/en/function.inotify-queue-len.php
 *
 * @param resource $inotify_instance <p>resource returned by {@link https://php.net/manual/en/function.inotify-init.php inotify_init()}</p>
 *
 * @return int a number greater than zero if events are pending, otherwise zero.
 */
function inotify_queue_len($inotify_instance) {}

/**
 * (PHP &gt;= 5.2.0, PECL inotify &gt;= 0.1.2)<br/>
 * Read inotify events from an inotify instance.
 *
 * @link https://php.net/manual/en/function.inotify-read.php
 *
 * @param resource $inotify_instance <p>resource returned by {@link https://php.net/manual/en/function.inotify-init.php inotify_init()}</p>
 *
 * @return array|false an array of inotify events or <b>FALSE</b> if no events
 * were pending and <i>inotify_instance</i> is non-blocking. Each event
 * is an array with the following keys:
 *
 * <ul>
 *  <li><b>wd</b> is a watch descriptor returned by inotify_add_watch()</li>
 *  <li><b>mask</b> is a bit mask of events</li>
 *  <li><b>cookie</b> is a unique id to connect related events (e.g. IN_MOVE_FROM and IN_MOVE_TO)</li>
 *  <li><b>name</b> is the name of a file (e.g. if a file was modified in a watched directory)</li>
 * </ul>
 */
function inotify_read($inotify_instance) {}

/**
 * (PHP &gt;= 5.2.0, PECL inotify &gt;= 0.1.2)<br/>
 * Removes the watch <i>$watch_descriptor</i> from the inotify instance <i>$inotify_instance</i>.
 *
 * @link     https://secure.php.net/manual/en/function.inotify-rm-watch.php
 *
 * @param resource $inotify_instance <p>resource returned by {@link https://php.net/manual/en/function.inotify-init.php inotify_init()}</p>
 * @param int      $mask <p>watch to remove from the instance</p>
 *
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function inotify_rm_watch($inotify_instance, $mask) {}

/**
 * @link https://php.net/manual/en/inotify.constants.php
 */
const IN_ACCESS = 1;
/**
 * @link https://php.net/manual/en/inotify.constants.php
 */
const IN_MODIFY = 2;
/**
 * @link https://php.net/manual/en/inotify.constants.php
 */
const IN_ATTRIB = 4;
/**
 * @link https://php.net/manual/en/inotify.constants.php
 */
const IN_CLOSE_WRITE = 8;
/**
 * @link https://php.net/manual/en/inotify.constants.php
 */
const IN_CLOSE_NOWRITE = 16;
/**
 * @link https://php.net/manual/en/inotify.constants.php
 */
const IN_OPEN = 32;
/**
 * @link https://php.net/manual/en/inotify.constants.php
 */
const IN_MOVED_FROM = 64;
/**
 * @link https://php.net/manual/en/inotify.constants.php
 */
const IN_MOVED_TO = 128;
/**
 * @link https://php.net/manual/en/inotify.constants.php
 */
const IN_CREATE = 256;
/**
 * @link https://php.net/manual/en/inotify.constants.php
 */
const IN_DELETE = 512;
/**
 * @link https://php.net/manual/en/inotify.constants.php
 */
const IN_DELETE_SELF = 1024;
/**
 * @link https://php.net/manual/en/inotify.constants.php
 */
const IN_MOVE_SELF = 2048;
/**
 * @link https://php.net/manual/en/inotify.constants.php
 */
const IN_UNMOUNT = 8192;
/**
 * @link https://php.net/manual/en/inotify.constants.php
 */
const IN_Q_OVERFLOW = 16384;
/**
 * @link https://php.net/manual/en/inotify.constants.php
 */
const IN_IGNORED = 32768;
/**
 * @link https://php.net/manual/en/inotify.constants.php
 */
const IN_CLOSE = 24;
/**
 * @link https://php.net/manual/en/inotify.constants.php
 */
const IN_MOVE = 192;
/**
 * @link https://php.net/manual/en/inotify.constants.php
 */
const IN_ALL_EVENTS = 4095;
/**
 * @link https://php.net/manual/en/inotify.constants.php
 */
const IN_ONLYDIR = 16777216;
/**
 * @link https://php.net/manual/en/inotify.constants.php
 */
const IN_DONT_FOLLOW = 33554432;
/**
 * @link https://php.net/manual/en/inotify.constants.php
 */
const IN_MASK_ADD = 536870912;
/**
 * @link https://php.net/manual/en/inotify.constants.php
 */
const IN_ISDIR = 1073741824;
/**
 * @link https://php.net/manual/en/inotify.constants.php
 */
const IN_ONESHOT = 2147483648;

// End of inotify v.0.1.6
<?php

// Start of imagick v.3.4.3

use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Pure;

class ImagickException extends Exception {}

class ImagickDrawException extends Exception {}

class ImagickPixelIteratorException extends Exception {}

class ImagickPixelException extends Exception {}

class ImagickKernelException extends Exception {}

/**
 * @method Imagick clone() (PECL imagick 2.0.0)<br/>Makes an exact copy of the Imagick object
 * @link https://php.net/manual/en/class.imagick.php
 */
class Imagick implements Iterator, Countable
{
    public const COLOR_BLACK = 11;
    public const COLOR_BLUE = 12;
    public const COLOR_CYAN = 13;
    public const COLOR_GREEN = 14;
    public const COLOR_RED = 15;
    public const COLOR_YELLOW = 16;
    public const COLOR_MAGENTA = 17;
    public const COLOR_OPACITY = 18;
    public const COLOR_ALPHA = 19;
    public const COLOR_FUZZ = 20;
    public const IMAGICK_EXTNUM = 30403;
    public const IMAGICK_EXTVER = "3.4.3";
    public const QUANTUM_RANGE = 65535;
    public const USE_ZEND_MM = 0;
    public const COMPOSITE_DEFAULT = 40;
    public const COMPOSITE_UNDEFINED = 0;
    public const COMPOSITE_NO = 1;
    public const COMPOSITE_ADD = 2;
    public const COMPOSITE_ATOP = 3;
    public const COMPOSITE_BLEND = 4;
    public const COMPOSITE_BUMPMAP = 5;
    public const COMPOSITE_CLEAR = 7;
    public const COMPOSITE_COLORBURN = 8;
    public const COMPOSITE_COLORDODGE = 9;
    public const COMPOSITE_COLORIZE = 10;
    public const COMPOSITE_COPYBLACK = 11;
    public const COMPOSITE_COPYBLUE = 12;
    public const COMPOSITE_COPY = 13;
    public const COMPOSITE_COPYCYAN = 14;
    public const COMPOSITE_COPYGREEN = 15;
    public const COMPOSITE_COPYMAGENTA = 16;
    public const COMPOSITE_COPYOPACITY = 17;
    public const COMPOSITE_COPYRED = 18;
    public const COMPOSITE_COPYYELLOW = 19;
    public const COMPOSITE_DARKEN = 20;
    public const COMPOSITE_DSTATOP = 21;
    public const COMPOSITE_DST = 22;
    public const COMPOSITE_DSTIN = 23;
    public const COMPOSITE_DSTOUT = 24;
    public const COMPOSITE_DSTOVER = 25;
    public const COMPOSITE_DIFFERENCE = 26;
    public const COMPOSITE_DISPLACE = 27;
    public const COMPOSITE_DISSOLVE = 28;
    public const COMPOSITE_EXCLUSION = 29;
    public const COMPOSITE_HARDLIGHT = 30;
    public const COMPOSITE_HUE = 31;
    public const COMPOSITE_IN = 32;
    public const COMPOSITE_LIGHTEN = 33;
    public const COMPOSITE_LUMINIZE = 35;
    public const COMPOSITE_MINUS = 36;
    public const COMPOSITE_MODULATE = 37;
    public const COMPOSITE_MULTIPLY = 38;
    public const COMPOSITE_OUT = 39;
    public const COMPOSITE_OVER = 40;
    public const COMPOSITE_OVERLAY = 41;
    public const COMPOSITE_PLUS = 42;
    public const COMPOSITE_REPLACE = 43;
    public const COMPOSITE_SATURATE = 44;
    public const COMPOSITE_SCREEN = 45;
    public const COMPOSITE_SOFTLIGHT = 46;
    public const COMPOSITE_SRCATOP = 47;
    public const COMPOSITE_SRC = 48;
    public const COMPOSITE_SRCIN = 49;
    public const COMPOSITE_SRCOUT = 50;
    public const COMPOSITE_SRCOVER = 51;
    public const COMPOSITE_SUBTRACT = 52;
    public const COMPOSITE_THRESHOLD = 53;
    public const COMPOSITE_XOR = 54;
    public const COMPOSITE_CHANGEMASK = 6;
    public const COMPOSITE_LINEARLIGHT = 34;
    public const COMPOSITE_DIVIDE = 55;
    public const COMPOSITE_DISTORT = 56;
    public const COMPOSITE_BLUR = 57;
    public const COMPOSITE_PEGTOPLIGHT = 58;
    public const COMPOSITE_VIVIDLIGHT = 59;
    public const COMPOSITE_PINLIGHT = 60;
    public const COMPOSITE_LINEARDODGE = 61;
    public const COMPOSITE_LINEARBURN = 62;
    public const COMPOSITE_MATHEMATICS = 63;
    public const COMPOSITE_MODULUSADD = 2;
    public const COMPOSITE_MODULUSSUBTRACT = 52;
    public const COMPOSITE_MINUSDST = 36;
    public const COMPOSITE_DIVIDEDST = 55;
    public const COMPOSITE_DIVIDESRC = 64;
    public const COMPOSITE_MINUSSRC = 65;
    public const COMPOSITE_DARKENINTENSITY = 66;
    public const COMPOSITE_LIGHTENINTENSITY = 67;
    public const MONTAGEMODE_FRAME = 1;
    public const MONTAGEMODE_UNFRAME = 2;
    public const MONTAGEMODE_CONCATENATE = 3;
    public const STYLE_NORMAL = 1;
    public const STYLE_ITALIC = 2;
    public const STYLE_OBLIQUE = 3;
    public const STYLE_ANY = 4;
    public const FILTER_UNDEFINED = 0;
    public const FILTER_POINT = 1;
    public const FILTER_BOX = 2;
    public const FILTER_TRIANGLE = 3;
    public const FILTER_HERMITE = 4;
    public const FILTER_HANNING = 5;
    public const FILTER_HAMMING = 6;
    public const FILTER_BLACKMAN = 7;
    public const FILTER_GAUSSIAN = 8;
    public const FILTER_QUADRATIC = 9;
    public const FILTER_CUBIC = 10;
    public const FILTER_CATROM = 11;
    public const FILTER_MITCHELL = 12;
    public const FILTER_LANCZOS = 22;
    public const FILTER_BESSEL = 13;
    public const FILTER_SINC = 14;
    public const FILTER_KAISER = 16;
    public const FILTER_WELSH = 17;
    public const FILTER_PARZEN = 18;
    public const FILTER_LAGRANGE = 21;
    public const FILTER_SENTINEL = 31;
    public const FILTER_BOHMAN = 19;
    public const FILTER_BARTLETT = 20;
    public const FILTER_JINC = 13;
    public const FILTER_SINCFAST = 15;
    public const FILTER_ROBIDOUX = 26;
    public const FILTER_LANCZOSSHARP = 23;
    public const FILTER_LANCZOS2 = 24;
    public const FILTER_LANCZOS2SHARP = 25;
    public const FILTER_ROBIDOUXSHARP = 27;
    public const FILTER_COSINE = 28;
    public const FILTER_SPLINE = 29;
    public const FILTER_LANCZOSRADIUS = 30;
    public const IMGTYPE_UNDEFINED = 0;
    public const IMGTYPE_BILEVEL = 1;
    public const IMGTYPE_GRAYSCALE = 2;
    public const IMGTYPE_GRAYSCALEMATTE = 3;
    public const IMGTYPE_PALETTE = 4;
    public const IMGTYPE_PALETTEMATTE = 5;
    public const IMGTYPE_TRUECOLOR = 6;
    public const IMGTYPE_TRUECOLORMATTE = 7;
    public const IMGTYPE_COLORSEPARATION = 8;
    public const IMGTYPE_COLORSEPARATIONMATTE = 9;
    public const IMGTYPE_OPTIMIZE = 10;
    public const IMGTYPE_PALETTEBILEVELMATTE = 11;
    public const RESOLUTION_UNDEFINED = 0;
    public const RESOLUTION_PIXELSPERINCH = 1;
    public const RESOLUTION_PIXELSPERCENTIMETER = 2;
    public const COMPRESSION_UNDEFINED = 0;
    public const COMPRESSION_NO = 1;
    public const COMPRESSION_BZIP = 2;
    public const COMPRESSION_FAX = 6;
    public const COMPRESSION_GROUP4 = 7;
    public const COMPRESSION_JPEG = 8;
    public const COMPRESSION_JPEG2000 = 9;
    public const COMPRESSION_LOSSLESSJPEG = 10;
    public const COMPRESSION_LZW = 11;
    public const COMPRESSION_RLE = 12;
    public const COMPRESSION_ZIP = 13;
    public const COMPRESSION_DXT1 = 3;
    public const COMPRESSION_DXT3 = 4;
    public const COMPRESSION_DXT5 = 5;
    public const COMPRESSION_ZIPS = 14;
    public const COMPRESSION_PIZ = 15;
    public const COMPRESSION_PXR24 = 16;
    public const COMPRESSION_B44 = 17;
    public const COMPRESSION_B44A = 18;
    public const COMPRESSION_LZMA = 19;
    public const COMPRESSION_JBIG1 = 20;
    public const COMPRESSION_JBIG2 = 21;
    public const PAINT_POINT = 1;
    public const PAINT_REPLACE = 2;
    public const PAINT_FLOODFILL = 3;
    public const PAINT_FILLTOBORDER = 4;
    public const PAINT_RESET = 5;
    public const GRAVITY_NORTHWEST = 1;
    public const GRAVITY_NORTH = 2;
    public const GRAVITY_NORTHEAST = 3;
    public const GRAVITY_WEST = 4;
    public const GRAVITY_CENTER = 5;
    public const GRAVITY_EAST = 6;
    public const GRAVITY_SOUTHWEST = 7;
    public const GRAVITY_SOUTH = 8;
    public const GRAVITY_SOUTHEAST = 9;
    public const GRAVITY_FORGET = 0;
    public const GRAVITY_STATIC = 10;
    public const STRETCH_NORMAL = 1;
    public const STRETCH_ULTRACONDENSED = 2;
    public const STRETCH_EXTRACONDENSED = 3;
    public const STRETCH_CONDENSED = 4;
    public const STRETCH_SEMICONDENSED = 5;
    public const STRETCH_SEMIEXPANDED = 6;
    public const STRETCH_EXPANDED = 7;
    public const STRETCH_EXTRAEXPANDED = 8;
    public const STRETCH_ULTRAEXPANDED = 9;
    public const STRETCH_ANY = 10;
    public const ALIGN_UNDEFINED = 0;
    public const ALIGN_LEFT = 1;
    public const ALIGN_CENTER = 2;
    public const ALIGN_RIGHT = 3;
    public const DECORATION_NO = 1;
    public const DECORATION_UNDERLINE = 2;
    public const DECORATION_OVERLINE = 3;
    public const DECORATION_LINETROUGH = 4;
    public const DECORATION_LINETHROUGH = 4;
    public const NOISE_UNIFORM = 1;
    public const NOISE_GAUSSIAN = 2;
    public const NOISE_MULTIPLICATIVEGAUSSIAN = 3;
    public const NOISE_IMPULSE = 4;
    public const NOISE_LAPLACIAN = 5;
    public const NOISE_POISSON = 6;
    public const NOISE_RANDOM = 7;
    public const CHANNEL_UNDEFINED = 0;
    public const CHANNEL_RED = 1;
    public const CHANNEL_GRAY = 1;
    public const CHANNEL_CYAN = 1;
    public const CHANNEL_GREEN = 2;
    public const CHANNEL_MAGENTA = 2;
    public const CHANNEL_BLUE = 4;
    public const CHANNEL_YELLOW = 4;
    public const CHANNEL_ALPHA = 8;
    public const CHANNEL_OPACITY = 8;
    public const CHANNEL_MATTE = 8;
    public const CHANNEL_BLACK = 32;
    public const CHANNEL_INDEX = 32;
    public const CHANNEL_ALL = 134217727;
    public const CHANNEL_DEFAULT = 134217719;
    public const CHANNEL_RGBA = 15;
    public const CHANNEL_TRUEALPHA = 64;
    public const CHANNEL_RGBS = 128;
    public const CHANNEL_GRAY_CHANNELS = 128;
    public const CHANNEL_SYNC = 256;
    public const CHANNEL_COMPOSITES = 47;
    public const METRIC_UNDEFINED = 0;
    public const METRIC_ABSOLUTEERRORMETRIC = 1;
    public const METRIC_MEANABSOLUTEERROR = 2;
    public const METRIC_MEANERRORPERPIXELMETRIC = 3;
    public const METRIC_MEANSQUAREERROR = 4;
    public const METRIC_PEAKABSOLUTEERROR = 5;
    public const METRIC_PEAKSIGNALTONOISERATIO = 6;
    public const METRIC_ROOTMEANSQUAREDERROR = 7;
    public const METRIC_NORMALIZEDCROSSCORRELATIONERRORMETRIC = 8;
    public const METRIC_FUZZERROR = 9;
    public const PIXEL_CHAR = 1;
    public const PIXEL_DOUBLE = 2;
    public const PIXEL_FLOAT = 3;
    public const PIXEL_INTEGER = 4;
    public const PIXEL_LONG = 5;
    public const PIXEL_QUANTUM = 6;
    public const PIXEL_SHORT = 7;
    public const EVALUATE_UNDEFINED = 0;
    public const EVALUATE_ADD = 1;
    public const EVALUATE_AND = 2;
    public const EVALUATE_DIVIDE = 3;
    public const EVALUATE_LEFTSHIFT = 4;
    public const EVALUATE_MAX = 5;
    public const EVALUATE_MIN = 6;
    public const EVALUATE_MULTIPLY = 7;
    public const EVALUATE_OR = 8;
    public const EVALUATE_RIGHTSHIFT = 9;
    public const EVALUATE_SET = 10;
    public const EVALUATE_SUBTRACT = 11;
    public const EVALUATE_XOR = 12;
    public const EVALUATE_POW = 13;
    public const EVALUATE_LOG = 14;
    public const EVALUATE_THRESHOLD = 15;
    public const EVALUATE_THRESHOLDBLACK = 16;
    public const EVALUATE_THRESHOLDWHITE = 17;
    public const EVALUATE_GAUSSIANNOISE = 18;
    public const EVALUATE_IMPULSENOISE = 19;
    public const EVALUATE_LAPLACIANNOISE = 20;
    public const EVALUATE_MULTIPLICATIVENOISE = 21;
    public const EVALUATE_POISSONNOISE = 22;
    public const EVALUATE_UNIFORMNOISE = 23;
    public const EVALUATE_COSINE = 24;
    public const EVALUATE_SINE = 25;
    public const EVALUATE_ADDMODULUS = 26;
    public const EVALUATE_MEAN = 27;
    public const EVALUATE_ABS = 28;
    public const EVALUATE_EXPONENTIAL = 29;
    public const EVALUATE_MEDIAN = 30;
    public const EVALUATE_SUM = 31;
    public const COLORSPACE_UNDEFINED = 0;
    public const COLORSPACE_RGB = 1;
    public const COLORSPACE_GRAY = 2;
    public const COLORSPACE_TRANSPARENT = 3;
    public const COLORSPACE_OHTA = 4;
    public const COLORSPACE_LAB = 5;
    public const COLORSPACE_XYZ = 6;
    public const COLORSPACE_YCBCR = 7;
    public const COLORSPACE_YCC = 8;
    public const COLORSPACE_YIQ = 9;
    public const COLORSPACE_YPBPR = 10;
    public const COLORSPACE_YUV = 11;
    public const COLORSPACE_CMYK = 12;
    public const COLORSPACE_SRGB = 13;
    public const COLORSPACE_HSB = 14;
    public const COLORSPACE_HSL = 15;
    public const COLORSPACE_HWB = 16;
    public const COLORSPACE_REC601LUMA = 17;
    public const COLORSPACE_REC709LUMA = 19;
    public const COLORSPACE_LOG = 21;
    public const COLORSPACE_CMY = 22;
    public const COLORSPACE_LUV = 23;
    public const COLORSPACE_HCL = 24;
    public const COLORSPACE_LCH = 25;
    public const COLORSPACE_LMS = 26;
    public const COLORSPACE_LCHAB = 27;
    public const COLORSPACE_LCHUV = 28;
    public const COLORSPACE_SCRGB = 29;
    public const COLORSPACE_HSI = 30;
    public const COLORSPACE_HSV = 31;
    public const COLORSPACE_HCLP = 32;
    public const COLORSPACE_YDBDR = 33;
    public const COLORSPACE_REC601YCBCR = 18;
    public const COLORSPACE_REC709YCBCR = 20;
    public const VIRTUALPIXELMETHOD_UNDEFINED = 0;
    public const VIRTUALPIXELMETHOD_BACKGROUND = 1;
    public const VIRTUALPIXELMETHOD_CONSTANT = 2;
    public const VIRTUALPIXELMETHOD_EDGE = 4;
    public const VIRTUALPIXELMETHOD_MIRROR = 5;
    public const VIRTUALPIXELMETHOD_TILE = 7;
    public const VIRTUALPIXELMETHOD_TRANSPARENT = 8;
    public const VIRTUALPIXELMETHOD_MASK = 9;
    public const VIRTUALPIXELMETHOD_BLACK = 10;
    public const VIRTUALPIXELMETHOD_GRAY = 11;
    public const VIRTUALPIXELMETHOD_WHITE = 12;
    public const VIRTUALPIXELMETHOD_HORIZONTALTILE = 13;
    public const VIRTUALPIXELMETHOD_VERTICALTILE = 14;
    public const VIRTUALPIXELMETHOD_HORIZONTALTILEEDGE = 15;
    public const VIRTUALPIXELMETHOD_VERTICALTILEEDGE = 16;
    public const VIRTUALPIXELMETHOD_CHECKERTILE = 17;
    public const PREVIEW_UNDEFINED = 0;
    public const PREVIEW_ROTATE = 1;
    public const PREVIEW_SHEAR = 2;
    public const PREVIEW_ROLL = 3;
    public const PREVIEW_HUE = 4;
    public const PREVIEW_SATURATION = 5;
    public const PREVIEW_BRIGHTNESS = 6;
    public const PREVIEW_GAMMA = 7;
    public const PREVIEW_SPIFF = 8;
    public const PREVIEW_DULL = 9;
    public const PREVIEW_GRAYSCALE = 10;
    public const PREVIEW_QUANTIZE = 11;
    public const PREVIEW_DESPECKLE = 12;
    public const PREVIEW_REDUCENOISE = 13;
    public const PREVIEW_ADDNOISE = 14;
    public const PREVIEW_SHARPEN = 15;
    public const PREVIEW_BLUR = 16;
    public const PREVIEW_THRESHOLD = 17;
    public const PREVIEW_EDGEDETECT = 18;
    public const PREVIEW_SPREAD = 19;
    public const PREVIEW_SOLARIZE = 20;
    public const PREVIEW_SHADE = 21;
    public const PREVIEW_RAISE = 22;
    public const PREVIEW_SEGMENT = 23;
    public const PREVIEW_SWIRL = 24;
    public const PREVIEW_IMPLODE = 25;
    public const PREVIEW_WAVE = 26;
    public const PREVIEW_OILPAINT = 27;
    public const PREVIEW_CHARCOALDRAWING = 28;
    public const PREVIEW_JPEG = 29;
    public const RENDERINGINTENT_UNDEFINED = 0;
    public const RENDERINGINTENT_SATURATION = 1;
    public const RENDERINGINTENT_PERCEPTUAL = 2;
    public const RENDERINGINTENT_ABSOLUTE = 3;
    public const RENDERINGINTENT_RELATIVE = 4;
    public const INTERLACE_UNDEFINED = 0;
    public const INTERLACE_NO = 1;
    public const INTERLACE_LINE = 2;
    public const INTERLACE_PLANE = 3;
    public const INTERLACE_PARTITION = 4;
    public const INTERLACE_GIF = 5;
    public const INTERLACE_JPEG = 6;
    public const INTERLACE_PNG = 7;
    public const FILLRULE_UNDEFINED = 0;
    public const FILLRULE_EVENODD = 1;
    public const FILLRULE_NONZERO = 2;
    public const PATHUNITS_UNDEFINED = 0;
    public const PATHUNITS_USERSPACE = 1;
    public const PATHUNITS_USERSPACEONUSE = 2;
    public const PATHUNITS_OBJECTBOUNDINGBOX = 3;
    public const LINECAP_UNDEFINED = 0;
    public const LINECAP_BUTT = 1;
    public const LINECAP_ROUND = 2;
    public const LINECAP_SQUARE = 3;
    public const LINEJOIN_UNDEFINED = 0;
    public const LINEJOIN_MITER = 1;
    public const LINEJOIN_ROUND = 2;
    public const LINEJOIN_BEVEL = 3;
    public const RESOURCETYPE_UNDEFINED = 0;
    public const RESOURCETYPE_AREA = 1;
    public const RESOURCETYPE_DISK = 2;
    public const RESOURCETYPE_FILE = 3;
    public const RESOURCETYPE_MAP = 4;
    public const RESOURCETYPE_MEMORY = 5;
    public const RESOURCETYPE_TIME = 7;
    public const RESOURCETYPE_THROTTLE = 8;
    public const RESOURCETYPE_THREAD = 6;
    public const DISPOSE_UNRECOGNIZED = 0;
    public const DISPOSE_UNDEFINED = 0;
    public const DISPOSE_NONE = 1;
    public const DISPOSE_BACKGROUND = 2;
    public const DISPOSE_PREVIOUS = 3;
    public const INTERPOLATE_UNDEFINED = 0;
    public const INTERPOLATE_AVERAGE = 1;
    public const INTERPOLATE_BICUBIC = 2;
    public const INTERPOLATE_BILINEAR = 3;
    public const INTERPOLATE_FILTER = 4;
    public const INTERPOLATE_INTEGER = 5;
    public const INTERPOLATE_MESH = 6;
    public const INTERPOLATE_NEARESTNEIGHBOR = 7;
    public const INTERPOLATE_SPLINE = 8;
    public const LAYERMETHOD_UNDEFINED = 0;
    public const LAYERMETHOD_COALESCE = 1;
    public const LAYERMETHOD_COMPAREANY = 2;
    public const LAYERMETHOD_COMPARECLEAR = 3;
    public const LAYERMETHOD_COMPAREOVERLAY = 4;
    public const LAYERMETHOD_DISPOSE = 5;
    public const LAYERMETHOD_OPTIMIZE = 6;
    public const LAYERMETHOD_OPTIMIZEPLUS = 8;
    public const LAYERMETHOD_OPTIMIZETRANS = 9;
    public const LAYERMETHOD_COMPOSITE = 12;
    public const LAYERMETHOD_OPTIMIZEIMAGE = 7;
    public const LAYERMETHOD_REMOVEDUPS = 10;
    public const LAYERMETHOD_REMOVEZERO = 11;
    public const LAYERMETHOD_TRIMBOUNDS = 16;
    public const ORIENTATION_UNDEFINED = 0;
    public const ORIENTATION_TOPLEFT = 1;
    public const ORIENTATION_TOPRIGHT = 2;
    public const ORIENTATION_BOTTOMRIGHT = 3;
    public const ORIENTATION_BOTTOMLEFT = 4;
    public const ORIENTATION_LEFTTOP = 5;
    public const ORIENTATION_RIGHTTOP = 6;
    public const ORIENTATION_RIGHTBOTTOM = 7;
    public const ORIENTATION_LEFTBOTTOM = 8;
    public const DISTORTION_UNDEFINED = 0;
    public const DISTORTION_AFFINE = 1;
    public const DISTORTION_AFFINEPROJECTION = 2;
    public const DISTORTION_ARC = 9;
    public const DISTORTION_BILINEAR = 6;
    public const DISTORTION_PERSPECTIVE = 4;
    public const DISTORTION_PERSPECTIVEPROJECTION = 5;
    public const DISTORTION_SCALEROTATETRANSLATE = 3;
    public const DISTORTION_POLYNOMIAL = 8;
    public const DISTORTION_POLAR = 10;
    public const DISTORTION_DEPOLAR = 11;
    public const DISTORTION_BARREL = 14;
    public const DISTORTION_SHEPARDS = 16;
    public const DISTORTION_SENTINEL = 18;
    public const DISTORTION_BARRELINVERSE = 15;
    public const DISTORTION_BILINEARFORWARD = 6;
    public const DISTORTION_BILINEARREVERSE = 7;
    public const DISTORTION_RESIZE = 17;
    public const DISTORTION_CYLINDER2PLANE = 12;
    public const DISTORTION_PLANE2CYLINDER = 13;
    public const LAYERMETHOD_MERGE = 13;
    public const LAYERMETHOD_FLATTEN = 14;
    public const LAYERMETHOD_MOSAIC = 15;
    public const ALPHACHANNEL_ACTIVATE = 1;
    public const ALPHACHANNEL_RESET = 7;
    public const ALPHACHANNEL_SET = 8;
    public const ALPHACHANNEL_UNDEFINED = 0;
    public const ALPHACHANNEL_COPY = 3;
    public const ALPHACHANNEL_DEACTIVATE = 4;
    public const ALPHACHANNEL_EXTRACT = 5;
    public const ALPHACHANNEL_OPAQUE = 6;
    public const ALPHACHANNEL_SHAPE = 9;
    public const ALPHACHANNEL_TRANSPARENT = 10;
    public const SPARSECOLORMETHOD_UNDEFINED = 0;
    public const SPARSECOLORMETHOD_BARYCENTRIC = 1;
    public const SPARSECOLORMETHOD_BILINEAR = 7;
    public const SPARSECOLORMETHOD_POLYNOMIAL = 8;
    public const SPARSECOLORMETHOD_SPEPARDS = 16;
    public const SPARSECOLORMETHOD_VORONOI = 18;
    public const SPARSECOLORMETHOD_INVERSE = 19;
    public const DITHERMETHOD_UNDEFINED = 0;
    public const DITHERMETHOD_NO = 1;
    public const DITHERMETHOD_RIEMERSMA = 2;
    public const DITHERMETHOD_FLOYDSTEINBERG = 3;
    public const FUNCTION_UNDEFINED = 0;
    public const FUNCTION_POLYNOMIAL = 1;
    public const FUNCTION_SINUSOID = 2;
    public const ALPHACHANNEL_BACKGROUND = 2;
    public const FUNCTION_ARCSIN = 3;
    public const FUNCTION_ARCTAN = 4;
    public const ALPHACHANNEL_FLATTEN = 11;
    public const ALPHACHANNEL_REMOVE = 12;
    public const STATISTIC_GRADIENT = 1;
    public const STATISTIC_MAXIMUM = 2;
    public const STATISTIC_MEAN = 3;
    public const STATISTIC_MEDIAN = 4;
    public const STATISTIC_MINIMUM = 5;
    public const STATISTIC_MODE = 6;
    public const STATISTIC_NONPEAK = 7;
    public const STATISTIC_STANDARD_DEVIATION = 8;
    public const MORPHOLOGY_CONVOLVE = 1;
    public const MORPHOLOGY_CORRELATE = 2;
    public const MORPHOLOGY_ERODE = 3;
    public const MORPHOLOGY_DILATE = 4;
    public const MORPHOLOGY_ERODE_INTENSITY = 5;
    public const MORPHOLOGY_DILATE_INTENSITY = 6;
    public const MORPHOLOGY_DISTANCE = 7;
    public const MORPHOLOGY_OPEN = 8;
    public const MORPHOLOGY_CLOSE = 9;
    public const MORPHOLOGY_OPEN_INTENSITY = 10;
    public const MORPHOLOGY_CLOSE_INTENSITY = 11;
    public const MORPHOLOGY_SMOOTH = 12;
    public const MORPHOLOGY_EDGE_IN = 13;
    public const MORPHOLOGY_EDGE_OUT = 14;
    public const MORPHOLOGY_EDGE = 15;
    public const MORPHOLOGY_TOP_HAT = 16;
    public const MORPHOLOGY_BOTTOM_HAT = 17;
    public const MORPHOLOGY_HIT_AND_MISS = 18;
    public const MORPHOLOGY_THINNING = 19;
    public const MORPHOLOGY_THICKEN = 20;
    public const MORPHOLOGY_VORONOI = 21;
    public const MORPHOLOGY_ITERATIVE = 22;
    public const KERNEL_UNITY = 1;
    public const KERNEL_GAUSSIAN = 2;
    public const KERNEL_DIFFERENCE_OF_GAUSSIANS = 3;
    public const KERNEL_LAPLACIAN_OF_GAUSSIANS = 4;
    public const KERNEL_BLUR = 5;
    public const KERNEL_COMET = 6;
    public const KERNEL_LAPLACIAN = 7;
    public const KERNEL_SOBEL = 8;
    public const KERNEL_FREI_CHEN = 9;
    public const KERNEL_ROBERTS = 10;
    public const KERNEL_PREWITT = 11;
    public const KERNEL_COMPASS = 12;
    public const KERNEL_KIRSCH = 13;
    public const KERNEL_DIAMOND = 14;
    public const KERNEL_SQUARE = 15;
    public const KERNEL_RECTANGLE = 16;
    public const KERNEL_OCTAGON = 17;
    public const KERNEL_DISK = 18;
    public const KERNEL_PLUS = 19;
    public const KERNEL_CROSS = 20;
    public const KERNEL_RING = 21;
    public const KERNEL_PEAKS = 22;
    public const KERNEL_EDGES = 23;
    public const KERNEL_CORNERS = 24;
    public const KERNEL_DIAGONALS = 25;
    public const KERNEL_LINE_ENDS = 26;
    public const KERNEL_LINE_JUNCTIONS = 27;
    public const KERNEL_RIDGES = 28;
    public const KERNEL_CONVEX_HULL = 29;
    public const KERNEL_THIN_SE = 30;
    public const KERNEL_SKELETON = 31;
    public const KERNEL_CHEBYSHEV = 32;
    public const KERNEL_MANHATTAN = 33;
    public const KERNEL_OCTAGONAL = 34;
    public const KERNEL_EUCLIDEAN = 35;
    public const KERNEL_USER_DEFINED = 36;
    public const KERNEL_BINOMIAL = 37;
    public const DIRECTION_LEFT_TO_RIGHT = 2;
    public const DIRECTION_RIGHT_TO_LEFT = 1;
    public const NORMALIZE_KERNEL_NONE = 0;
    public const NORMALIZE_KERNEL_VALUE = 8192;
    public const NORMALIZE_KERNEL_CORRELATE = 65536;
    public const NORMALIZE_KERNEL_PERCENT = 4096;

    /**
     * (PECL imagick 2.0.0)<br/>
     * Removes repeated portions of images to optimize
     * @link https://php.net/manual/en/imagick.optimizeimagelayers.php
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function optimizeImageLayers() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the maximum bounding region between images
     * @link https://php.net/manual/en/imagick.compareimagelayers.php
     * @param int $method <p>
     * One of the layer method constants.
     * </p>
     * @return Imagick <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function compareImageLayers($method) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Quickly fetch attributes
     * @link https://php.net/manual/en/imagick.pingimageblob.php
     * @param string $image <p>
     * A string containing the image.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function pingImageBlob($image) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Get basic image attributes in a lightweight manner
     * @link https://php.net/manual/en/imagick.pingimagefile.php
     * @param resource $filehandle <p>
     * An open filehandle to the image.
     * </p>
     * @param string $fileName [optional] <p>
     * Optional filename for this image.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function pingImageFile($filehandle, $fileName = null) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Creates a vertical mirror image
     * @link https://php.net/manual/en/imagick.transposeimage.php
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function transposeImage() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Creates a horizontal mirror image
     * @link https://php.net/manual/en/imagick.transverseimage.php
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function transverseImage() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Remove edges from the image
     * @link https://php.net/manual/en/imagick.trimimage.php
     * @param float $fuzz <p>
     * By default target must match a particular pixel color exactly.
     * However, in many cases two colors may differ by a small amount.
     * The fuzz member of image defines how much tolerance is acceptable
     * to consider two colors as the same. This parameter represents the variation
     * on the quantum range.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function trimImage($fuzz) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Applies wave filter to the image
     * @link https://php.net/manual/en/imagick.waveimage.php
     * @param float $amplitude <p>
     * The amplitude of the wave.
     * </p>
     * @param float $length <p>
     * The length of the wave.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function waveImage($amplitude, $length) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Adds vignette filter to the image
     * @link https://php.net/manual/en/imagick.vignetteimage.php
     * @param float $blackPoint <p>
     * The black point.
     * </p>
     * @param float $whitePoint <p>
     * The white point
     * </p>
     * @param int $x <p>
     * X offset of the ellipse
     * </p>
     * @param int $y <p>
     * Y offset of the ellipse
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function vignetteImage($blackPoint, $whitePoint, $x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Discards all but one of any pixel color
     * @link https://php.net/manual/en/imagick.uniqueimagecolors.php
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function uniqueImageColors() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Return if the image has a matte channel
     * @link https://php.net/manual/en/imagick.getimagematte.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @throws ImagickException on error.
     */
    #[Deprecated]
    #[Pure]
    public function getImageMatte() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image matte channel
     * @link https://php.net/manual/en/imagick.setimagematte.php
     * @param bool $matte <p>
     * True activates the matte channel and false disables it.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageMatte($matte) {}

    /**
     * Adaptively resize image with data dependent triangulation
     *
     * If legacy is true, the calculations are done with the small rounding bug that existed in Imagick before 3.4.0.<br>
     * If false, the calculations should produce the same results as ImageMagick CLI does.<br>
     * <br>
     * <b>Note:</b> The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched.
     * In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given.
     * @link https://php.net/manual/en/imagick.adaptiveresizeimage.php
     * @param int $columns The number of columns in the scaled image.
     * @param int $rows The number of rows in the scaled image.
     * @param bool $bestfit [optional] Whether to fit the image inside a bounding box.<br>
     *                                 The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched. In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given.
     * @param bool $legacy [optional] Added since 3.4.0. Default value FALSE
     * @return bool TRUE on success
     * @throws ImagickException Throws ImagickException on error
     * @since 2.0.0
     */
    public function adaptiveResizeImage($columns, $rows, $bestfit = false, $legacy = false) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Simulates a pencil sketch
     * @link https://php.net/manual/en/imagick.sketchimage.php
     * @param float $radius <p>
     * The radius of the Gaussian, in pixels, not counting the center pixel
     * </p>
     * @param float $sigma <p>
     * The standard deviation of the Gaussian, in pixels.
     * </p>
     * @param float $angle <p>
     * Apply the effect along this angle.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function sketchImage($radius, $sigma, $angle) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Creates a 3D effect
     * @link https://php.net/manual/en/imagick.shadeimage.php
     * @param bool $gray <p>
     * A value other than zero shades the intensity of each pixel.
     * </p>
     * @param float $azimuth <p>
     * Defines the light source direction.
     * </p>
     * @param float $elevation <p>
     * Defines the light source direction.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function shadeImage($gray, $azimuth, $elevation) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the size offset
     * @link https://php.net/manual/en/imagick.getsizeoffset.php
     * @return int the size offset associated with the Imagick object.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getSizeOffset() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the size and offset of the Imagick object
     * @link https://php.net/manual/en/imagick.setsizeoffset.php
     * @param int $columns <p>
     * The width in pixels.
     * </p>
     * @param int $rows <p>
     * The height in pixels.
     * </p>
     * @param int $offset <p>
     * The image offset.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setSizeOffset($columns, $rows, $offset) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Adds adaptive blur filter to image
     * @link https://php.net/manual/en/imagick.adaptiveblurimage.php
     * @param float $radius <p>
     * The radius of the Gaussian, in pixels, not counting the center pixel.
     * Provide a value of 0 and the radius will be chosen automagically.
     * </p>
     * @param float $sigma <p>
     * The standard deviation of the Gaussian, in pixels.
     * </p>
     * @param int $channel [optional] <p>
     * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function adaptiveBlurImage($radius, $sigma, $channel = Imagick::CHANNEL_DEFAULT) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Enhances the contrast of a color image
     * @link https://php.net/manual/en/imagick.contraststretchimage.php
     * @param float $black_point <p>
     * The black point.
     * </p>
     * @param float $white_point <p>
     * The white point.
     * </p>
     * @param int $channel [optional] <p>
     * Provide any channel constant that is valid for your channel mode. To
     * apply to more than one channel, combine channeltype constants using
     * bitwise operators. <b>Imagick::CHANNEL_ALL</b>. Refer to this
     * list of channel constants.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function contrastStretchImage($black_point, $white_point, $channel = Imagick::CHANNEL_ALL) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Adaptively sharpen the image
     * @link https://php.net/manual/en/imagick.adaptivesharpenimage.php
     * @param float $radius <p>
     * The radius of the Gaussian, in pixels, not counting the center pixel. Use 0 for auto-select.
     * </p>
     * @param float $sigma <p>
     * The standard deviation of the Gaussian, in pixels.
     * </p>
     * @param int $channel [optional] <p>
     * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function adaptiveSharpenImage($radius, $sigma, $channel = Imagick::CHANNEL_DEFAULT) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Creates a high-contrast, two-color image
     * @link https://php.net/manual/en/imagick.randomthresholdimage.php
     * @param float $low <p>
     * The low point
     * </p>
     * @param float $high <p>
     * The high point
     * </p>
     * @param int $channel [optional] <p>
     * Provide any channel constant that is valid for your channel mode. To
     * apply to more than one channel, combine channeltype constants using
     * bitwise operators. Refer to this
     * list of channel constants.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function randomThresholdImage($low, $high, $channel = Imagick::CHANNEL_ALL) {}

    /**
     * @param $xRounding
     * @param $yRounding
     * @param $strokeWidth [optional]
     * @param $displace [optional]
     * @param $sizeCorrection [optional]
     * @throws ImagickException on error.
     */
    public function roundCornersImage($xRounding, $yRounding, $strokeWidth, $displace, $sizeCorrection) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Rounds image corners
     * Alias to {@see Imagick::roundCornersImage}
     * @link https://php.net/manual/en/imagick.roundcorners.php
     * @param float $x_rounding <p>
     * x rounding
     * </p>
     * @param float $y_rounding <p>
     * y rounding
     * </p>
     * @param float $stroke_width [optional] <p>
     * stroke width
     * </p>
     * @param float $displace [optional] <p>
     * image displace
     * </p>
     * @param float $size_correction [optional] <p>
     * size correction
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    #[Deprecated(replacement: "%class%->roundCornersImage(%parametersList%)")]
    public function roundCorners($x_rounding, $y_rounding, $stroke_width = 10.0, $displace = 5.0, $size_correction = -6.0) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Set the iterator position
     * @link https://php.net/manual/en/imagick.setiteratorindex.php
     * @param int $index <p>
     * The position to set the iterator to
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setIteratorIndex($index) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the index of the current active image
     * @link https://php.net/manual/en/imagick.getiteratorindex.php
     * @return int an integer containing the index of the image in the stack.
     */
    #[Pure]
    public function getIteratorIndex() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Convenience method for setting crop size and the image geometry
     * @link https://php.net/manual/en/imagick.transformimage.php
     * @param string $crop <p>
     * A crop geometry string. This geometry defines a subregion of the image to crop.
     * </p>
     * @param string $geometry <p>
     * An image geometry string. This geometry defines the final size of the image.
     * </p>
     * @return Imagick <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function transformImage($crop, $geometry) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image opacity level
     * @link https://php.net/manual/en/imagick.setimageopacity.php
     * @param float $opacity <p>
     * The level of transparency: 1.0 is fully opaque and 0.0 is fully
     * transparent.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageOpacity($opacity) {}

    /**
     * (PECL imagick 2.2.2)<br/>
     * Performs an ordered dither
     * @link https://php.net/manual/en/imagick.orderedposterizeimage.php
     * @param string $threshold_map <p>
     * A string containing the name of the threshold dither map to use
     * </p>
     * @param int $channel [optional] <p>
     * Provide any channel constant that is valid for your channel mode. To
     * apply to more than one channel, combine channeltype constants using
     * bitwise operators. Refer to this
     * list of channel constants.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function orderedPosterizeImage($threshold_map, $channel = Imagick::CHANNEL_ALL) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Simulates a Polaroid picture
     * @link https://php.net/manual/en/imagick.polaroidimage.php
     * @param ImagickDraw $properties <p>
     * The polaroid properties
     * </p>
     * @param float $angle <p>
     * The polaroid angle
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function polaroidImage(ImagickDraw $properties, $angle) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the named image property
     * @link https://php.net/manual/en/imagick.getimageproperty.php
     * @param string $name <p>
     * name of the property (for example Exif:DateTime)
     * </p>
     * @return string|false a string containing the image property, false if a
     * property with the given name does not exist.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageProperty($name) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets an image property
     * @link https://php.net/manual/en/imagick.setimageproperty.php
     * @param string $name
     * @param string $value
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageProperty($name, $value) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image interpolate pixel method
     * @link https://php.net/manual/en/imagick.setimageinterpolatemethod.php
     * @param int $method <p>
     * The method is one of the <b>Imagick::INTERPOLATE_*</b> constants
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageInterpolateMethod($method) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the interpolation method
     * @link https://php.net/manual/en/imagick.getimageinterpolatemethod.php
     * @return int the interpolate method on success.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageInterpolateMethod() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Stretches with saturation the image intensity
     * @link https://php.net/manual/en/imagick.linearstretchimage.php
     * @param float $blackPoint <p>
     * The image black point
     * </p>
     * @param float $whitePoint <p>
     * The image white point
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function linearStretchImage($blackPoint, $whitePoint) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the image length in bytes
     * @link https://php.net/manual/en/imagick.getimagelength.php
     * @return int an int containing the current image size.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageLength() {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Set image size
     * @link https://php.net/manual/en/imagick.extentimage.php
     * @param int $width <p>
     * The new width
     * </p>
     * @param int $height <p>
     * The new height
     * </p>
     * @param int $x <p>
     * X position for the new size
     * </p>
     * @param int $y <p>
     * Y position for the new size
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function extentImage($width, $height, $x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the image orientation
     * @link https://php.net/manual/en/imagick.getimageorientation.php
     * @return int an int on success.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageOrientation() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image orientation
     * @link https://php.net/manual/en/imagick.setimageorientation.php
     * @param int $orientation <p>
     * One of the orientation constants
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageOrientation($orientation) {}

    /**
     * (PECL imagick 2.1.0)<br/>
     * Changes the color value of any pixel that matches target
     * @link https://php.net/manual/en/imagick.paintfloodfillimage.php
     * @param mixed $fill <p>
     * ImagickPixel object or a string containing the fill color
     * </p>
     * @param float $fuzz <p>
     * The amount of fuzz. For example, set fuzz to 10 and the color red at
     * intensities of 100 and 102 respectively are now interpreted as the
     * same color for the purposes of the floodfill.
     * </p>
     * @param mixed $bordercolor <p>
     * ImagickPixel object or a string containing the border color
     * </p>
     * @param int $x <p>
     * X start position of the floodfill
     * </p>
     * @param int $y <p>
     * Y start position of the floodfill
     * </p>
     * @param int $channel [optional] <p>
     * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    #[Deprecated]
    public function paintFloodfillImage($fill, $fuzz, $bordercolor, $x, $y, $channel = Imagick::CHANNEL_ALL) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Replaces colors in the image from a color lookup table. Optional second parameter to replace colors in a specific channel. This method is available if Imagick has been compiled against ImageMagick version 6.3.6 or newer.
     * @link https://php.net/manual/en/imagick.clutimage.php
     * @param Imagick $lookup_table <p>
     * Imagick object containing the color lookup table
     * </p>
     * @param int $channel [optional] <p>
     * The Channeltype
     * constant. When not supplied, default channels are replaced.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     * @since 2.0.0
     */
    public function clutImage(Imagick $lookup_table, $channel = Imagick::CHANNEL_DEFAULT) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the image properties
     * @link https://php.net/manual/en/imagick.getimageproperties.php
     * @param string $pattern [optional] <p>
     * The pattern for property names.
     * </p>
     * @param bool $only_names [optional] <p>
     * Whether to return only property names. If <b>FALSE</b> then also the values are returned
     * </p>
     * @return array an array containing the image properties or property names.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageProperties($pattern = "*", $only_names = true) {}

    /**
     * (PECL imagick 2.2.0)<br/>
     * Returns the image profiles
     * @link https://php.net/manual/en/imagick.getimageprofiles.php
     * @param string $pattern [optional] <p>
     * The pattern for profile names.
     * </p>
     * @param bool $include_values [optional] <p>
     * Whether to return only profile names. If <b>FALSE</b> then only profile names will be returned.
     * </p>
     * @return array an array containing the image profiles or profile names.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageProfiles($pattern = "*", $include_values = true) {}

    /**
     * (PECL imagick 2.0.1)<br/>
     * Distorts an image using various distortion methods
     * @link https://php.net/manual/en/imagick.distortimage.php
     * @param int $method <p>
     * The method of image distortion. See distortion constants
     * </p>
     * @param array $arguments <p>
     * The arguments for this distortion method
     * </p>
     * @param bool $bestfit <p>
     * Attempt to resize destination to fit distorted source
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function distortImage($method, array $arguments, $bestfit) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Writes an image to a filehandle
     * @link https://php.net/manual/en/imagick.writeimagefile.php
     * @param resource $filehandle <p>
     * Filehandle where to write the image
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function writeImageFile($filehandle) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Writes frames to a filehandle
     * @link https://php.net/manual/en/imagick.writeimagesfile.php
     * @param resource $filehandle <p>
     * Filehandle where to write the images
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function writeImagesFile($filehandle) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Reset image page
     * @link https://php.net/manual/en/imagick.resetimagepage.php
     * @param string $page <p>
     * The page definition. For example 7168x5147+0+0
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function resetImagePage($page) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Sets image clip mask
     * @link https://php.net/manual/en/imagick.setimageclipmask.php
     * @param Imagick $clip_mask <p>
     * The Imagick object containing the clip mask
     * </p>
     * @return bool <b>TRUE</b> on success.
     */
    public function setImageClipMask(Imagick $clip_mask) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Gets image clip mask
     * @link https://php.net/manual/en/imagick.getimageclipmask.php
     * @return Imagick an Imagick object containing the clip mask.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageClipMask() {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Animates an image or images
     * @link https://php.net/manual/en/imagick.animateimages.php
     * @param string $x_server <p>
     * X server address
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function animateImages($x_server) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Recolors image
     * @link https://php.net/manual/en/imagick.recolorimage.php
     * @param array $matrix <p>
     * The matrix containing the color values
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    #[Deprecated]
    public function recolorImage(array $matrix) {}

    /**
     * (PECL imagick 2.1.0)<br/>
     * Sets font
     * @link https://php.net/manual/en/imagick.setfont.php
     * @param string $font <p>
     * Font name or a filename
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setFont($font) {}

    /**
     * (PECL imagick 2.1.0)<br/>
     * Gets font
     * @link https://php.net/manual/en/imagick.getfont.php
     * @return string|false the string containing the font name or <b>FALSE</b> if not font is set.
     */
    #[Pure]
    public function getFont() {}

    /**
     * (PECL imagick 2.1.0)<br/>
     * Sets point size
     * @link https://php.net/manual/en/imagick.setpointsize.php
     * @param float $point_size <p>
     * Point size
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setPointSize($point_size) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Gets point size
     * @link https://php.net/manual/en/imagick.getpointsize.php
     * @return float a float containing the point size.
     */
    #[Pure]
    public function getPointSize() {}

    /**
     * (PECL imagick 2.1.0)<br/>
     * Merges image layers
     * @link https://php.net/manual/en/imagick.mergeimagelayers.php
     * @param int $layer_method <p>
     * One of the <b>Imagick::LAYERMETHOD_*</b> constants
     * </p>
     * @return Imagick Returns an Imagick object containing the merged image.
     * @throws ImagickException
     */
    public function mergeImageLayers($layer_method) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Sets image alpha channel
     * @link https://php.net/manual/en/imagick.setimagealphachannel.php
     * @param int $mode <p>
     * One of the <b>Imagick::ALPHACHANNEL_*</b> constants
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageAlphaChannel($mode) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Changes the color value of any pixel that matches target
     * @link https://php.net/manual/en/imagick.floodfillpaintimage.php
     * @param mixed $fill <p>
     * ImagickPixel object or a string containing the fill color
     * </p>
     * @param float $fuzz <p>
     * The amount of fuzz. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color.
     * </p>
     * @param mixed $target <p>
     * ImagickPixel object or a string containing the target color to paint
     * </p>
     * @param int $x <p>
     * X start position of the floodfill
     * </p>
     * @param int $y <p>
     * Y start position of the floodfill
     * </p>
     * @param bool $invert <p>
     * If <b>TRUE</b> paints any pixel that does not match the target color.
     * </p>
     * @param int $channel [optional] <p>
     * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function floodFillPaintImage($fill, $fuzz, $target, $x, $y, $invert, $channel = Imagick::CHANNEL_DEFAULT) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Changes the color value of any pixel that matches target
     * @link https://php.net/manual/en/imagick.opaquepaintimage.php
     * @param mixed $target <p>
     * ImagickPixel object or a string containing the color to change
     * </p>
     * @param mixed $fill <p>
     * The replacement color
     * </p>
     * @param float $fuzz <p>
     * The amount of fuzz. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color.
     * </p>
     * @param bool $invert <p>
     * If <b>TRUE</b> paints any pixel that does not match the target color.
     * </p>
     * @param int $channel [optional] <p>
     * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function opaquePaintImage($target, $fill, $fuzz, $invert, $channel = Imagick::CHANNEL_DEFAULT) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Paints pixels transparent
     * @link https://php.net/manual/en/imagick.transparentpaintimage.php
     * @param mixed $target <p>
     * The target color to paint
     * </p>
     * @param float $alpha <p>
     * The level of transparency: 1.0 is fully opaque and 0.0 is fully transparent.
     * </p>
     * @param float $fuzz <p>
     * The amount of fuzz. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color.
     * </p>
     * @param bool $invert <p>
     * If <b>TRUE</b> paints any pixel that does not match the target color.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function transparentPaintImage($target, $alpha, $fuzz, $invert) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Animates an image or images
     * @link https://php.net/manual/en/imagick.liquidrescaleimage.php
     * @param int $width <p>
     * The width of the target size
     * </p>
     * @param int $height <p>
     * The height of the target size
     * </p>
     * @param float $delta_x <p>
     * How much the seam can traverse on x-axis.
     * Passing 0 causes the seams to be straight.
     * </p>
     * @param float $rigidity <p>
     * Introduces a bias for non-straight seams. This parameter is
     * typically 0.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function liquidRescaleImage($width, $height, $delta_x, $rigidity) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Enciphers an image
     * @link https://php.net/manual/en/imagick.encipherimage.php
     * @param string $passphrase <p>
     * The passphrase
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function encipherImage($passphrase) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Deciphers an image
     * @link https://php.net/manual/en/imagick.decipherimage.php
     * @param string $passphrase <p>
     * The passphrase
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function decipherImage($passphrase) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Sets the gravity
     * @link https://php.net/manual/en/imagick.setgravity.php
     * @param int $gravity <p>
     * The gravity property. Refer to the list of
     * gravity constants.
     * </p>
     * @return bool No value is returned.
     * @throws ImagickException on error.
     */
    public function setGravity($gravity) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Gets the gravity
     * @link https://php.net/manual/en/imagick.getgravity.php
     * @return int the gravity property. Refer to the list of
     * gravity constants.
     */
    #[Pure]
    public function getGravity() {}

    /**
     * (PECL imagick 2.2.1)<br/>
     * Gets channel range
     * @link https://php.net/manual/en/imagick.getimagechannelrange.php
     * @param int $channel <p>
     * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants
     * </p>
     * @return float[] an array containing minima and maxima values of the channel(s).
     * @throws ImagickException on error.
     */
    #[ArrayShape(["minima" => "float", "maxima" => "float"])]
    #[Pure]
    public function getImageChannelRange($channel) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Gets the image alpha channel
     * @link https://php.net/manual/en/imagick.getimagealphachannel.php
     * @return int a constant defining the current alpha channel value. Refer to this
     * list of alpha channel constants.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageAlphaChannel() {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Gets channel distortions
     * @link https://php.net/manual/en/imagick.getimagechanneldistortions.php
     * @param Imagick $reference <p>
     * Imagick object containing the reference image
     * </p>
     * @param int $metric <p>
     * Refer to this list of metric type constants.
     * </p>
     * @param int $channel [optional] <p>
     * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants
     * </p>
     * @return float a float describing the channel distortion.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageChannelDistortions(Imagick $reference, $metric, $channel = Imagick::CHANNEL_DEFAULT) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Sets the image gravity
     * @link https://php.net/manual/en/imagick.setimagegravity.php
     * @param int $gravity <p>
     * The gravity property. Refer to the list of
     * gravity constants.
     * </p>
     * @return bool No value is returned.
     * @throws ImagickException on error.
     */
    public function setImageGravity($gravity) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Gets the image gravity
     * @link https://php.net/manual/en/imagick.getimagegravity.php
     * @return int the images gravity property. Refer to the list of
     * gravity constants.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageGravity() {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Imports image pixels
     * @link https://php.net/manual/en/imagick.importimagepixels.php
     * @param int $x <p>
     * The image x position
     * </p>
     * @param int $y <p>
     * The image y position
     * </p>
     * @param int $width <p>
     * The image width
     * </p>
     * @param int $height <p>
     * The image height
     * </p>
     * @param string $map <p>
     * Map of pixel ordering as a string. This can be for example RGB.
     * The value can be any combination or order of R = red, G = green, B = blue, A = alpha (0 is transparent),
     * O = opacity (0 is opaque), C = cyan, Y = yellow, M = magenta, K = black, I = intensity (for grayscale), P = pad.
     * </p>
     * @param int $storage <p>
     * The pixel storage method.
     * Refer to this list of pixel constants.
     * </p>
     * @param array $pixels <p>
     * The array of pixels
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function importImagePixels($x, $y, $width, $height, $map, $storage, array $pixels) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Removes skew from the image
     * @link https://php.net/manual/en/imagick.deskewimage.php
     * @param float $threshold <p>
     * Deskew threshold
     * </p>
     * @return bool
     * @throws ImagickException on error.
     */
    public function deskewImage($threshold) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Segments an image
     * @link https://php.net/manual/en/imagick.segmentimage.php
     * @param int $COLORSPACE <p>
     * One of the COLORSPACE constants.
     * </p>
     * @param float $cluster_threshold <p>
     * A percentage describing minimum number of pixels
     * contained in hexedra before it is considered valid.
     * </p>
     * @param float $smooth_threshold <p>
     * Eliminates noise from the histogram.
     * </p>
     * @param bool $verbose [optional] <p>
     * Whether to output detailed information about recognised classes.
     * </p>
     * @return bool
     * @throws ImagickException on error.
     */
    public function segmentImage($COLORSPACE, $cluster_threshold, $smooth_threshold, $verbose = false) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Interpolates colors
     * @link https://php.net/manual/en/imagick.sparsecolorimage.php
     * @param int $SPARSE_METHOD <p>
     * Refer to this list of sparse method constants
     * </p>
     * @param array $arguments <p>
     * An array containing the coordinates.
     * The array is in format array(1,1, 2,45)
     * </p>
     * @param int $channel [optional]
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function sparseColorImage($SPARSE_METHOD, array $arguments, $channel = Imagick::CHANNEL_DEFAULT) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Remaps image colors
     * @link https://php.net/manual/en/imagick.remapimage.php
     * @param Imagick $replacement <p>
     * An Imagick object containing the replacement colors
     * </p>
     * @param int $DITHER <p>
     * Refer to this list of dither method constants
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function remapImage(Imagick $replacement, $DITHER) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Exports raw image pixels
     * @link https://php.net/manual/en/imagick.exportimagepixels.php
     * @param int $x <p>
     * X-coordinate of the exported area
     * </p>
     * @param int $y <p>
     * Y-coordinate of the exported area
     * </p>
     * @param int $width <p>
     * Width of the exported aread
     * </p>
     * @param int $height <p>
     * Height of the exported area
     * </p>
     * @param string $map <p>
     * Ordering of the exported pixels. For example "RGB".
     * Valid characters for the map are R, G, B, A, O, C, Y, M, K, I and P.
     * </p>
     * @param int $STORAGE <p>
     * Refer to this list of pixel type constants
     * </p>
     * @return int[] an array containing the pixels values.
     * @throws ImagickException on error.
     */
    public function exportImagePixels($x, $y, $width, $height, $map, $STORAGE) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * The getImageChannelKurtosis purpose
     * @link https://php.net/manual/en/imagick.getimagechannelkurtosis.php
     * @param int $channel [optional] <p>
     * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants
     * </p>
     * @return float[] an array with kurtosis and skewness
     * members.
     * @throws ImagickException on error.
     */
    #[ArrayShape(["kurtosis" => "float", "skewness" => "float"])]
    #[Pure]
    public function getImageChannelKurtosis($channel = Imagick::CHANNEL_DEFAULT) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Applies a function on the image
     * @link https://php.net/manual/en/imagick.functionimage.php
     * @param int $function <p>
     * Refer to this list of function constants
     * </p>
     * @param array $arguments <p>
     * Array of arguments to pass to this function.
     * </p>
     * @param int $channel [optional]
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function functionImage($function, array $arguments, $channel = Imagick::CHANNEL_DEFAULT) {}

    /**
     * Transform image colorspace
     * @param $COLORSPACE
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function transformImageColorspace($COLORSPACE) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Replaces colors in the image
     * @link https://php.net/manual/en/imagick.haldclutimage.php
     * @param Imagick $clut <p>
     * Imagick object containing the Hald lookup image.
     * </p>
     * @param int $channel [optional] <p>
     * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function haldClutImage(Imagick $clut, $channel = Imagick::CHANNEL_DEFAULT) {}

    /**
     * Adjusts the levels of a particular image channel by scaling the minimum and maximum values to the full quantum range.
     * @param $CHANNEL [optional]
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function autoLevelImage($CHANNEL) {}

    /**
     * @link https://www.php.net/manual/en/imagick.blueshiftimage.php
     * @param float $factor [optional]
     * @return bool
     * @throws ImagickException on error.
     */
    public function blueShiftImage($factor) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Get image artifact
     * @link https://php.net/manual/en/imagick.getimageartifact.php
     * @param string $artifact <p>
     * The name of the artifact
     * </p>
     * @return string the artifact value on success.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageArtifact($artifact) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Set image artifact
     * @link https://php.net/manual/en/imagick.setimageartifact.php
     * @param string $artifact <p>
     * The name of the artifact
     * </p>
     * @param string $value <p>
     * The value of the artifact
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageArtifact($artifact, $value) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Delete image artifact
     * @link https://php.net/manual/en/imagick.deleteimageartifact.php
     * @param string $artifact <p>
     * The name of the artifact to delete
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function deleteImageArtifact($artifact) {}

    /**
     * (PECL imagick 0.9.10-0.9.9)<br/>
     * Gets the colorspace
     * @link https://php.net/manual/en/imagick.getcolorspace.php
     * @return int an integer which can be compared against COLORSPACE constants.
     */
    #[Pure]
    public function getColorspace() {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Set colorspace
     * @link https://php.net/manual/en/imagick.setcolorspace.php
     * @param int $COLORSPACE <p>
     * One of the COLORSPACE constants
     * </p>
     * @return bool <b>TRUE</b> on success.
     */
    public function setColorspace($COLORSPACE) {}

    /**
     * @param $CHANNEL [optional]
     * @throws ImagickException on error.
     */
    public function clampImage($CHANNEL) {}

    /**
     * @param bool $stack
     * @param int $offset
     * @return Imagick
     * @throws ImagickException on error.
     */
    public function smushImages($stack, $offset) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * The Imagick constructor
     * @link https://php.net/manual/en/imagick.construct.php
     * @param mixed $files <p>
     * The path to an image to load or an array of paths. Paths can include
     * wildcards for file names, or can be URLs.
     * </p>
     * @throws ImagickException Throws ImagickException on error.
     */
    public function __construct($files = null) {}

    /**
     * @return string
     */
    public function __toString() {}

    public function count() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns a MagickPixelIterator
     * @link https://php.net/manual/en/imagick.getpixeliterator.php
     * @return ImagickPixelIterator an ImagickPixelIterator on success.
     * @throws ImagickException on error.
     * @throws ImagickPixelIteratorException on error.
     */
    #[Pure]
    public function getPixelIterator() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Get an ImagickPixelIterator for an image section
     * @link https://php.net/manual/en/imagick.getpixelregioniterator.php
     * @param int $x <p>
     * The x-coordinate of the region.
     * </p>
     * @param int $y <p>
     * The y-coordinate of the region.
     * </p>
     * @param int $columns <p>
     * The width of the region.
     * </p>
     * @param int $rows <p>
     * The height of the region.
     * </p>
     * @return ImagickPixelIterator an ImagickPixelIterator for an image section.
     * @throws ImagickException on error.
     * @throws ImagickPixelIteratorException on error.
     */
    #[Pure]
    public function getPixelRegionIterator($x, $y, $columns, $rows) {}

    /**
     * (PECL imagick 0.9.0-0.9.9)<br/>
     * Reads image from filename
     * @link https://php.net/manual/en/imagick.readimage.php
     * @param string $filename
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException Throws ImagickException on error.
     */
    public function readImage($filename) {}

    /**
     * @param $filenames
     * @throws ImagickException Throws ImagickException on error.
     */
    public function readImages($filenames) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Reads image from a binary string
     * @link https://php.net/manual/en/imagick.readimageblob.php
     * @param string $image
     * @param string $filename [optional]
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException Throws ImagickException on error.
     */
    public function readImageBlob($image, $filename = null) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the format of a particular image
     * @link https://php.net/manual/en/imagick.setimageformat.php
     * @param string $format <p>
     * String presentation of the image format. Format support
     * depends on the ImageMagick installation.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageFormat($format) {}

    /**
     * Scales the size of an image to the given dimensions. Passing zero as either of the arguments will preserve dimension while scaling.<br>
     * If legacy is true, the calculations are done with the small rounding bug that existed in Imagick before 3.4.0.<br>
     * If false, the calculations should produce the same results as ImageMagick CLI does.
     * @link https://php.net/manual/en/imagick.scaleimage.php
     * @param int $cols
     * @param int $rows
     * @param bool $bestfit [optional] The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched. In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given.
     * @param bool $legacy [optional] Added since 3.4.0. Default value FALSE
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException Throws ImagickException on error
     * @since 2.0.0
     */
    public function scaleImage($cols, $rows, $bestfit = false, $legacy = false) {}

    /**
     * (PECL imagick 0.9.0-0.9.9)<br/>
     * Writes an image to the specified filename
     * @link https://php.net/manual/en/imagick.writeimage.php
     * @param string $filename [optional] <p>
     * Filename where to write the image. The extension of the filename
     * defines the type of the file.
     * Format can be forced regardless of file extension using format: prefix,
     * for example "jpg:test.png".
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function writeImage($filename = null) {}

    /**
     * (PECL imagick 0.9.0-0.9.9)<br/>
     * Writes an image or image sequence
     * @link https://php.net/manual/en/imagick.writeimages.php
     * @param string $filename
     * @param bool $adjoin
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function writeImages($filename, $adjoin) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Adds blur filter to image
     * @link https://php.net/manual/en/imagick.blurimage.php
     * @param float $radius <p>
     * Blur radius
     * </p>
     * @param float $sigma <p>
     * Standard deviation
     * </p>
     * @param int $channel [optional] <p>
     * The Channeltype
     * constant. When not supplied, all channels are blurred.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function blurImage($radius, $sigma, $channel = null) {}

    /**
     * Changes the size of an image to the given dimensions and removes any associated profiles.<br>
     * If legacy is true, the calculations are done with the small rounding bug that existed in Imagick before 3.4.0.<br>
     * If false, the calculations should produce the same results as ImageMagick CLI does.<br>
     * <br>
     * <b>Note:</b> The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched. In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given.
     * @link https://php.net/manual/en/imagick.thumbnailimage.php
     * @param int $columns <p>
     * Image width
     * </p>
     * @param int $rows <p>
     * Image height
     * </p>
     * @param bool $bestfit [optional] <p>
     * Whether to force maximum values
     * </p>
     * The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched. In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given.
     * @param bool $fill [optional]
     * @param bool $legacy [optional] Added since 3.4.0. Default value FALSE
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     * @since 2.0.0
     */
    public function thumbnailImage($columns, $rows, $bestfit = false, $fill = false, $legacy = false) {}

    /**
     * Creates a cropped thumbnail at the requested size.
     * If legacy is true, uses the incorrect behaviour that was present until Imagick 3.4.0.
     * If false it uses the correct behaviour.
     * @link https://php.net/manual/en/imagick.cropthumbnailimage.php
     * @param int $width The width of the thumbnail
     * @param int $height The Height of the thumbnail
     * @param bool $legacy [optional] Added since 3.4.0. Default value FALSE
     * @return bool TRUE on succes
     * @throws ImagickException Throws ImagickException on error
     * @since 2.0.0
     */
    public function cropThumbnailImage($width, $height, $legacy = false) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the filename of a particular image in a sequence
     * @link https://php.net/manual/en/imagick.getimagefilename.php
     * @return string a string with the filename of the image.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageFilename() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the filename of a particular image
     * @link https://php.net/manual/en/imagick.setimagefilename.php
     * @param string $filename
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageFilename($filename) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the format of a particular image in a sequence
     * @link https://php.net/manual/en/imagick.getimageformat.php
     * @return string a string containing the image format on success.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageFormat() {}

    /**
     * @link https://secure.php.net/manual/en/imagick.getimagemimetype.php
     * @return string Returns the image mime-type.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageMimeType() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Removes an image from the image list
     * @link https://php.net/manual/en/imagick.removeimage.php
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function removeImage() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Destroys the Imagick object
     * @link https://php.net/manual/en/imagick.destroy.php
     * @return bool <b>TRUE</b> on success.
     */
    public function destroy() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Clears all resources associated to Imagick object
     * @link https://php.net/manual/en/imagick.clear.php
     * @return bool <b>TRUE</b> on success.
     */
    public function clear() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the image length in bytes
     * @link https://php.net/manual/en/imagick.getimagesize.php
     * @return int an int containing the current image size.
     * @throws ImagickException on error.
     */
    #[Deprecated(replacement: "%class%->getImageLength()")]
    #[Pure]
    public function getImageSize() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the image sequence as a blob
     * @link https://php.net/manual/en/imagick.getimageblob.php
     * @return string a string containing the image.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageBlob() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns all image sequences as a blob
     * @link https://php.net/manual/en/imagick.getimagesblob.php
     * @return string a string containing the images. On failure, throws ImagickException on failure
     * @throws ImagickException on failure
     */
    #[Pure]
    public function getImagesBlob() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the Imagick iterator to the first image
     * @link https://php.net/manual/en/imagick.setfirstiterator.php
     * @return bool <b>TRUE</b> on success.
     */
    public function setFirstIterator() {}

    /**
     * (PECL imagick 2.0.1)<br/>
     * Sets the Imagick iterator to the last image
     * @link https://php.net/manual/en/imagick.setlastiterator.php
     * @return bool <b>TRUE</b> on success.
     */
    public function setLastIterator() {}

    public function resetIterator() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Move to the previous image in the object
     * @link https://php.net/manual/en/imagick.previousimage.php
     * @return bool <b>TRUE</b> on success.
     */
    public function previousImage() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Moves to the next image
     * @link https://php.net/manual/en/imagick.nextimage.php
     * @return bool <b>TRUE</b> on success.
     */
    public function nextImage() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Checks if the object has a previous image
     * @link https://php.net/manual/en/imagick.haspreviousimage.php
     * @return bool <b>TRUE</b> if the object has more images when traversing the list in the
     * reverse direction, returns <b>FALSE</b> if there are none.
     */
    public function hasPreviousImage() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Checks if the object has more images
     * @link https://php.net/manual/en/imagick.hasnextimage.php
     * @return bool <b>TRUE</b> if the object has more images when traversing the list in the
     * forward direction, returns <b>FALSE</b> if there are none.
     */
    public function hasNextImage() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Set the iterator position
     * @link https://php.net/manual/en/imagick.setimageindex.php
     * @param int $index <p>
     * The position to set the iterator to
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    #[Deprecated]
    public function setImageIndex($index) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the index of the current active image
     * @link https://php.net/manual/en/imagick.getimageindex.php
     * @return int an integer containing the index of the image in the stack.
     */
    #[Deprecated]
    #[Pure]
    public function getImageIndex() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Adds a comment to your image
     * @link https://php.net/manual/en/imagick.commentimage.php
     * @param string $comment <p>
     * The comment to add
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function commentImage($comment) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Extracts a region of the image
     * @link https://php.net/manual/en/imagick.cropimage.php
     * @param int $width <p>
     * The width of the crop
     * </p>
     * @param int $height <p>
     * The height of the crop
     * </p>
     * @param int $x <p>
     * The X coordinate of the cropped region's top left corner
     * </p>
     * @param int $y <p>
     * The Y coordinate of the cropped region's top left corner
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function cropImage($width, $height, $x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Adds a label to an image
     * @link https://php.net/manual/en/imagick.labelimage.php
     * @param string $label <p>
     * The label to add
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function labelImage($label) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the width and height as an associative array
     * @link https://php.net/manual/en/imagick.getimagegeometry.php
     * @return int[] an array with the width/height of the image.
     * @throws ImagickException on error.
     */
    #[ArrayShape(["width" => "int", "height" => "int"])]
    #[Pure]
    public function getImageGeometry() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Renders the ImagickDraw object on the current image
     * @link https://php.net/manual/en/imagick.drawimage.php
     * @param ImagickDraw $draw <p>
     * The drawing operations to render on the image.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function drawImage(ImagickDraw $draw) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Sets the image compression quality
     * @link https://php.net/manual/en/imagick.setimagecompressionquality.php
     * @param int $quality <p>
     * The image compression quality as an integer
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageCompressionQuality($quality) {}

    /**
     * (PECL imagick 2.2.2)<br/>
     * Gets the current image's compression quality
     * @link https://php.net/manual/en/imagick.getimagecompressionquality.php
     * @return int integer describing the images compression quality
     */
    #[Pure]
    public function getImageCompressionQuality() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Annotates an image with text
     * @link https://php.net/manual/en/imagick.annotateimage.php
     * @param ImagickDraw $draw_settings <p>
     * The ImagickDraw object that contains settings for drawing the text
     * </p>
     * @param float $x <p>
     * Horizontal offset in pixels to the left of text
     * </p>
     * @param float $y <p>
     * Vertical offset in pixels to the baseline of text
     * </p>
     * @param float $angle <p>
     * The angle at which to write the text
     * </p>
     * @param string $text <p>
     * The string to draw
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function annotateImage(ImagickDraw $draw_settings, $x, $y, $angle, $text) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Composite one image onto another
     * @link https://php.net/manual/en/imagick.compositeimage.php
     * @param Imagick $composite_object <p>
     * Imagick object which holds the composite image
     * </p>
     * @param int $composite Composite operator
     * @param int $x <p>
     * The column offset of the composited image
     * </p>
     * @param int $y <p>
     * The row offset of the composited image
     * </p>
     * @param int $channel [optional] <p>
     * Provide any channel constant that is valid for your channel mode. To
     * apply to more than one channel, combine channeltype constants using
     * bitwise operators. Refer to this list of channel constants.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function compositeImage(Imagick $composite_object, $composite, $x, $y, $channel = Imagick::CHANNEL_ALL) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Control the brightness, saturation, and hue
     * @link https://php.net/manual/en/imagick.modulateimage.php
     * @param float $brightness
     * @param float $saturation
     * @param float $hue
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function modulateImage($brightness, $saturation, $hue) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the number of unique colors in the image
     * @link https://php.net/manual/en/imagick.getimagecolors.php
     * @return int <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageColors() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Creates a composite image
     * @link https://php.net/manual/en/imagick.montageimage.php
     * @param ImagickDraw $draw <p>
     * The font name, size, and color are obtained from this object.
     * </p>
     * @param string $tile_geometry <p>
     * The number of tiles per row and page (e.g. 6x4+0+0).
     * </p>
     * @param string $thumbnail_geometry <p>
     * Preferred image size and border size of each thumbnail
     * (e.g. 120x120+4+3&#x3E;).
     * </p>
     * @param int $mode <p>
     * Thumbnail framing mode, see Montage Mode constants.
     * </p>
     * @param string $frame <p>
     * Surround the image with an ornamental border (e.g. 15x15+3+3). The
     * frame color is that of the thumbnail's matte color.
     * </p>
     * @return Imagick <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function montageImage(ImagickDraw $draw, $tile_geometry, $thumbnail_geometry, $mode, $frame) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Identifies an image and fetches attributes
     * @link https://php.net/manual/en/imagick.identifyimage.php
     * @param bool $appendRawOutput [optional]
     * @return array Identifies an image and returns the attributes. Attributes include
     * the image width, height, size, and others.
     * @throws ImagickException on error.
     */
    public function identifyImage($appendRawOutput = false) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Changes the value of individual pixels based on a threshold
     * @link https://php.net/manual/en/imagick.thresholdimage.php
     * @param float $threshold
     * @param int $channel [optional]
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function thresholdImage($threshold, $channel = Imagick::CHANNEL_ALL) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Selects a threshold for each pixel based on a range of intensity
     * @link https://php.net/manual/en/imagick.adaptivethresholdimage.php
     * @param int $width <p>
     * Width of the local neighborhood.
     * </p>
     * @param int $height <p>
     * Height of the local neighborhood.
     * </p>
     * @param int $offset <p>
     * The mean offset
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function adaptiveThresholdImage($width, $height, $offset) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Forces all pixels below the threshold into black
     * @link https://php.net/manual/en/imagick.blackthresholdimage.php
     * @param mixed $threshold <p>
     * The threshold below which everything turns black
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function blackThresholdImage($threshold) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Force all pixels above the threshold into white
     * @link https://php.net/manual/en/imagick.whitethresholdimage.php
     * @param mixed $threshold
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function whiteThresholdImage($threshold) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Append a set of images
     * @link https://php.net/manual/en/imagick.appendimages.php
     * @param bool $stack [optional] <p>
     * Whether to stack the images vertically.
     * By default (or if <b>FALSE</b> is specified) images are stacked left-to-right.
     * If <i>stack</i> is <b>TRUE</b>, images are stacked top-to-bottom.
     * </p>
     * @return Imagick Imagick instance on success.
     * @throws ImagickException on error.
     */
    public function appendImages($stack = false) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Simulates a charcoal drawing
     * @link https://php.net/manual/en/imagick.charcoalimage.php
     * @param float $radius <p>
     * The radius of the Gaussian, in pixels, not counting the center pixel
     * </p>
     * @param float $sigma <p>
     * The standard deviation of the Gaussian, in pixels
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function charcoalImage($radius, $sigma) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Enhances the contrast of a color image
     * @link https://php.net/manual/en/imagick.normalizeimage.php
     * @param int $channel [optional] <p>
     * Provide any channel constant that is valid for your channel mode. To
     * apply to more than one channel, combine channeltype constants using
     * bitwise operators. Refer to this
     * list of channel constants.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function normalizeImage($channel = Imagick::CHANNEL_ALL) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Simulates an oil painting
     * @link https://php.net/manual/en/imagick.oilpaintimage.php
     * @param float $radius <p>
     * The radius of the circular neighborhood.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function oilPaintImage($radius) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Reduces the image to a limited number of color level
     * @link https://php.net/manual/en/imagick.posterizeimage.php
     * @param int $levels
     * @param bool $dither
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function posterizeImage($levels, $dither) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Radial blurs an image
     * @link https://php.net/manual/en/imagick.radialblurimage.php
     * @param float $angle
     * @param int $channel [optional]
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function radialBlurImage($angle, $channel = Imagick::CHANNEL_ALL) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Creates a simulated 3d button-like effect
     * @link https://php.net/manual/en/imagick.raiseimage.php
     * @param int $width
     * @param int $height
     * @param int $x
     * @param int $y
     * @param bool $raise
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function raiseImage($width, $height, $x, $y, $raise) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Resample image to desired resolution
     * @link https://php.net/manual/en/imagick.resampleimage.php
     * @param float $x_resolution
     * @param float $y_resolution
     * @param int $filter
     * @param float $blur
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function resampleImage($x_resolution, $y_resolution, $filter, $blur) {}

    /**
     * Scales an image to the desired dimensions with one of these filters:<br>
     * If legacy is true, the calculations are done with the small rounding bug that existed in Imagick before 3.4.0.<br>
     * If false, the calculations should produce the same results as ImageMagick CLI does.<br>
     * <br>
     * <b>Note:</b> The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched.<br>
     * In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given.
     * @link https://php.net/manual/en/imagick.resizeimage.php
     * @param int $columns Width of the image
     * @param int $rows Height of the image
     * @param int $filter Refer to the list of filter constants.
     * @param float $blur The blur factor where > 1 is blurry, < 1 is sharp.
     * @param bool $bestfit [optional] Added since 2.1.0. Added optional fit parameter. This method now supports proportional scaling. Pass zero as either parameter for proportional scaling
     * @param bool $legacy [optional] Added since 3.4.0. Default value FALSE
     * @return bool TRUE on success
     * @throws ImagickException on error.
     * @since 2.0.0
     */
    public function resizeImage($columns, $rows, $filter, $blur, $bestfit = false, $legacy = false) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Offsets an image
     * @link https://php.net/manual/en/imagick.rollimage.php
     * @param int $x <p>
     * The X offset.
     * </p>
     * @param int $y <p>
     * The Y offset.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function rollImage($x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Rotates an image
     * @link https://php.net/manual/en/imagick.rotateimage.php
     * @param mixed $background <p>
     * The background color
     * </p>
     * @param float $degrees <p>
     * The number of degrees to rotate the image
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function rotateImage($background, $degrees) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Scales an image with pixel sampling
     * @link https://php.net/manual/en/imagick.sampleimage.php
     * @param int $columns
     * @param int $rows
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function sampleImage($columns, $rows) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Applies a solarizing effect to the image
     * @link https://php.net/manual/en/imagick.solarizeimage.php
     * @param int $threshold
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function solarizeImage($threshold) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Simulates an image shadow
     * @link https://php.net/manual/en/imagick.shadowimage.php
     * @param float $opacity
     * @param float $sigma
     * @param int $x
     * @param int $y
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function shadowImage($opacity, $sigma, $x, $y) {}

    /**
     * @param string $key
     * @param string $value
     * @return bool
     * @throws ImagickException on error.
     */
    #[Deprecated]
    public function setImageAttribute($key, $value) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image background color
     * @link https://php.net/manual/en/imagick.setimagebackgroundcolor.php
     * @param mixed $background
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageBackgroundColor($background) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image composite operator
     * @link https://php.net/manual/en/imagick.setimagecompose.php
     * @param int $compose
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageCompose($compose) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image compression
     * @link https://php.net/manual/en/imagick.setimagecompression.php
     * @param int $compression <p>
     * One of the <b>COMPRESSION</b> constants
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageCompression($compression) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image delay
     * @link https://php.net/manual/en/imagick.setimagedelay.php
     * @param int $delay <p>
     * The amount of time expressed in 'ticks' that the image should be
     * displayed for. For animated GIFs there are 100 ticks per second, so a
     * value of 20 would be 20/100 of a second aka 1/5th of a second.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageDelay($delay) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image depth
     * @link https://php.net/manual/en/imagick.setimagedepth.php
     * @param int $depth
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageDepth($depth) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image gamma
     * @link https://php.net/manual/en/imagick.setimagegamma.php
     * @param float $gamma
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageGamma($gamma) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image iterations
     * @link https://php.net/manual/en/imagick.setimageiterations.php
     * @param int $iterations <p>
     * The number of iterations the image should loop over. Set to '0' to loop
     * continuously.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageIterations($iterations) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image matte color
     * @link https://php.net/manual/en/imagick.setimagemattecolor.php
     * @param mixed $matte
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageMatteColor($matte) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the page geometry of the image
     * @link https://php.net/manual/en/imagick.setimagepage.php
     * @param int $width
     * @param int $height
     * @param int $x
     * @param int $y
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImagePage($width, $height, $x, $y) {}

    /**
     * @param $filename
     * @throws ImagickException on error.
     */
    public function setImageProgressMonitor($filename) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image resolution
     * @link https://php.net/manual/en/imagick.setimageresolution.php
     * @param float $x_resolution
     * @param float $y_resolution
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageResolution($x_resolution, $y_resolution) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image scene
     * @link https://php.net/manual/en/imagick.setimagescene.php
     * @param int $scene
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageScene($scene) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image ticks-per-second
     * @link https://php.net/manual/en/imagick.setimagetickspersecond.php
     * @param int $ticks_per_second <p>
     * The duration for which an image should be displayed expressed in ticks
     * per second.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageTicksPerSecond($ticks_per_second) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image type
     * @link https://php.net/manual/en/imagick.setimagetype.php
     * @param int $image_type
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageType($image_type) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image units of resolution
     * @link https://php.net/manual/en/imagick.setimageunits.php
     * @param int $units
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageUnits($units) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sharpens an image
     * @link https://php.net/manual/en/imagick.sharpenimage.php
     * @param float $radius
     * @param float $sigma
     * @param int $channel [optional]
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function sharpenImage($radius, $sigma, $channel = Imagick::CHANNEL_ALL) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Shaves pixels from the image edges
     * @link https://php.net/manual/en/imagick.shaveimage.php
     * @param int $columns
     * @param int $rows
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function shaveImage($columns, $rows) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Creating a parallelogram
     * @link https://php.net/manual/en/imagick.shearimage.php
     * @param mixed $background <p>
     * The background color
     * </p>
     * @param float $x_shear <p>
     * The number of degrees to shear on the x axis
     * </p>
     * @param float $y_shear <p>
     * The number of degrees to shear on the y axis
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function shearImage($background, $x_shear, $y_shear) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Splices a solid color into the image
     * @link https://php.net/manual/en/imagick.spliceimage.php
     * @param int $width
     * @param int $height
     * @param int $x
     * @param int $y
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function spliceImage($width, $height, $x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Fetch basic attributes about the image
     * @link https://php.net/manual/en/imagick.pingimage.php
     * @param string $filename <p>
     * The filename to read the information from.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function pingImage($filename) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Reads image from open filehandle
     * @link https://php.net/manual/en/imagick.readimagefile.php
     * @param resource $filehandle
     * @param string $fileName [optional]
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function readImageFile($filehandle, $fileName = null) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Displays an image
     * @link https://php.net/manual/en/imagick.displayimage.php
     * @param string $servername <p>
     * The X server name
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function displayImage($servername) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Displays an image or image sequence
     * @link https://php.net/manual/en/imagick.displayimages.php
     * @param string $servername <p>
     * The X server name
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function displayImages($servername) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Randomly displaces each pixel in a block
     * @link https://php.net/manual/en/imagick.spreadimage.php
     * @param float $radius
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function spreadImage($radius) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Swirls the pixels about the center of the image
     * @link https://php.net/manual/en/imagick.swirlimage.php
     * @param float $degrees
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function swirlImage($degrees) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Strips an image of all profiles and comments
     * @link https://php.net/manual/en/imagick.stripimage.php
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function stripImage() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns formats supported by Imagick
     * @link https://php.net/manual/en/imagick.queryformats.php
     * @param string $pattern [optional]
     * @return array an array containing the formats supported by Imagick.
     */
    public static function queryFormats($pattern = "*") {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the configured fonts
     * @link https://php.net/manual/en/imagick.queryfonts.php
     * @param string $pattern [optional] <p>
     * The query pattern
     * </p>
     * @return array an array containing the configured fonts.
     */
    public static function queryFonts($pattern = "*") {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns an array representing the font metrics
     * @link https://php.net/manual/en/imagick.queryfontmetrics.php
     * @param ImagickDraw $properties <p>
     * ImagickDraw object containing font properties
     * </p>
     * @param string $text <p>
     * The text
     * </p>
     * @param bool $multiline [optional] <p>
     * Multiline parameter. If left empty it is autodetected
     * </p>
     * @return array a multi-dimensional array representing the font metrics.
     * @throws ImagickException on error.
     */
    public function queryFontMetrics(ImagickDraw $properties, $text, $multiline = null) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Hides a digital watermark within the image
     * @link https://php.net/manual/en/imagick.steganoimage.php
     * @param Imagick $watermark_wand
     * @param int $offset
     * @return Imagick <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function steganoImage(Imagick $watermark_wand, $offset) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Adds random noise to the image
     * @link https://php.net/manual/en/imagick.addnoiseimage.php
     * @param int $noise_type <p>
     * The type of the noise. Refer to this list of
     * noise constants.
     * </p>
     * @param int $channel [optional] <p>
     * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function addNoiseImage($noise_type, $channel = Imagick::CHANNEL_DEFAULT) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Simulates motion blur
     * @link https://php.net/manual/en/imagick.motionblurimage.php
     * @param float $radius <p>
     * The radius of the Gaussian, in pixels, not counting the center pixel.
     * </p>
     * @param float $sigma <p>
     * The standard deviation of the Gaussian, in pixels.
     * </p>
     * @param float $angle <p>
     * Apply the effect along this angle.
     * </p>
     * @param int $channel [optional] <p>
     * Provide any channel constant that is valid for your channel mode. To
     * apply to more than one channel, combine channeltype constants using
     * bitwise operators. Refer to this
     * list of channel constants.
     * The channel argument affects only if Imagick is compiled against ImageMagick version
     * 6.4.4 or greater.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function motionBlurImage($radius, $sigma, $angle, $channel = Imagick::CHANNEL_DEFAULT) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Forms a mosaic from images
     * @link https://php.net/manual/en/imagick.mosaicimages.php
     * @return Imagick <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    #[Deprecated]
    public function mosaicImages() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Method morphs a set of images
     * @link https://php.net/manual/en/imagick.morphimages.php
     * @param int $number_frames <p>
     * The number of in-between images to generate.
     * </p>
     * @return Imagick This method returns a new Imagick object on success.
     * Throw an <b>ImagickException</b> on error.
     * @throws ImagickException on error
     * @throws ImagickException on error.
     */
    public function morphImages($number_frames) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Scales an image proportionally to half its size
     * @link https://php.net/manual/en/imagick.minifyimage.php
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function minifyImage() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Transforms an image
     * @link https://php.net/manual/en/imagick.affinetransformimage.php
     * @param ImagickDraw $matrix <p>
     * The affine matrix
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function affineTransformImage(ImagickDraw $matrix) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Average a set of images
     * @link https://php.net/manual/en/imagick.averageimages.php
     * @return Imagick a new Imagick object on success.
     * @throws ImagickException on error.
     */
    #[Deprecated]
    public function averageImages() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Surrounds the image with a border
     * @link https://php.net/manual/en/imagick.borderimage.php
     * @param mixed $bordercolor <p>
     * ImagickPixel object or a string containing the border color
     * </p>
     * @param int $width <p>
     * Border width
     * </p>
     * @param int $height <p>
     * Border height
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function borderImage($bordercolor, $width, $height) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Removes a region of an image and trims
     * @link https://php.net/manual/en/imagick.chopimage.php
     * @param int $width <p>
     * Width of the chopped area
     * </p>
     * @param int $height <p>
     * Height of the chopped area
     * </p>
     * @param int $x <p>
     * X origo of the chopped area
     * </p>
     * @param int $y <p>
     * Y origo of the chopped area
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function chopImage($width, $height, $x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Clips along the first path from the 8BIM profile
     * @link https://php.net/manual/en/imagick.clipimage.php
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function clipImage() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Clips along the named paths from the 8BIM profile
     * @link https://php.net/manual/en/imagick.clippathimage.php
     * @param string $pathname <p>
     * The name of the path
     * </p>
     * @param bool $inside <p>
     * If <b>TRUE</b> later operations take effect inside clipping path.
     * Otherwise later operations take effect outside clipping path.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function clipPathImage($pathname, $inside) {}

    /**
     * Alias to {@see Imagick::clipPathImage}
     * @param string $pathname
     * @param string $inside
     * @throws ImagickException on error.
     */
    public function clipImagePath($pathname, $inside) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Composites a set of images
     * @link https://php.net/manual/en/imagick.coalesceimages.php
     * @return Imagick a new Imagick object on success.
     * @throws ImagickException on error.
     */
    public function coalesceImages() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Changes the color value of any pixel that matches target
     * @link https://php.net/manual/en/imagick.colorfloodfillimage.php
     * @param mixed $fill <p>
     * ImagickPixel object containing the fill color
     * </p>
     * @param float $fuzz <p>
     * The amount of fuzz. For example, set fuzz to 10 and the color red at
     * intensities of 100 and 102 respectively are now interpreted as the
     * same color for the purposes of the floodfill.
     * </p>
     * @param mixed $bordercolor <p>
     * ImagickPixel object containing the border color
     * </p>
     * @param int $x <p>
     * X start position of the floodfill
     * </p>
     * @param int $y <p>
     * Y start position of the floodfill
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    #[Deprecated]
    public function colorFloodfillImage($fill, $fuzz, $bordercolor, $x, $y) {}

    /**
     * Blends the fill color with each pixel in the image. The 'opacity' color is a per channel strength factor for how strongly the color should be applied.<br>
     * If legacy is true, the behaviour of this function is incorrect, but consistent with how it behaved before Imagick version 3.4.0
     * @link https://php.net/manual/en/imagick.colorizeimage.php
     * @param mixed $colorize <p>
     * ImagickPixel object or a string containing the colorize color
     * </p>
     * @param mixed $opacity <p>
     * ImagickPixel object or an float containing the opacity value.
     * 1.0 is fully opaque and 0.0 is fully transparent.
     * </p>
     * @param bool $legacy [optional] Added since 3.4.0. Default value FALSE
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException Throws ImagickException on error
     * @since 2.0.0
     */
    public function colorizeImage($colorize, $opacity, $legacy = false) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the difference in one or more images
     * @link https://php.net/manual/en/imagick.compareimagechannels.php
     * @param Imagick $image <p>
     * Imagick object containing the image to compare.
     * </p>
     * @param int $channelType <p>
     * Provide any channel constant that is valid for your channel mode. To
     * apply to more than one channel, combine channeltype constants using
     * bitwise operators. Refer to this
     * list of channel constants.
     * </p>
     * @param int $metricType <p>
     * One of the metric type constants.
     * </p>
     * @return array Array consisting of new_wand and
     * distortion.
     * @throws ImagickException on error.
     */
    public function compareImageChannels(Imagick $image, $channelType, $metricType) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Compares an image to a reconstructed image
     * @link https://php.net/manual/en/imagick.compareimages.php
     * @param Imagick $compare <p>
     * An image to compare to.
     * </p>
     * @param int $metric <p>
     * Provide a valid metric type constant. Refer to this
     * list of metric constants.
     * </p>
     * @return array Array consisting of an Imagick object of the
     * reconstructed image and a float representing the difference.
     * @throws ImagickException Throws ImagickException on error.
     */
    public function compareImages(Imagick $compare, $metric) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Change the contrast of the image
     * @link https://php.net/manual/en/imagick.contrastimage.php
     * @param bool $sharpen <p>
     * The sharpen value
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function contrastImage($sharpen) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Combines one or more images into a single image
     * @link https://php.net/manual/en/imagick.combineimages.php
     * @param int $channelType <p>
     * Provide any channel constant that is valid for your channel mode. To
     * apply to more than one channel, combine channeltype constants using
     * bitwise operators. Refer to this
     * list of channel constants.
     * </p>
     * @return Imagick <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function combineImages($channelType) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Applies a custom convolution kernel to the image
     * @link https://php.net/manual/en/imagick.convolveimage.php
     * @param array $kernel <p>
     * The convolution kernel
     * </p>
     * @param int $channel [optional] <p>
     * Provide any channel constant that is valid for your channel mode. To
     * apply to more than one channel, combine channeltype constants using
     * bitwise operators. Refer to this
     * list of channel constants.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function convolveImage(array $kernel, $channel = Imagick::CHANNEL_ALL) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Displaces an image's colormap
     * @link https://php.net/manual/en/imagick.cyclecolormapimage.php
     * @param int $displace <p>
     * The amount to displace the colormap.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function cycleColormapImage($displace) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns certain pixel differences between images
     * @link https://php.net/manual/en/imagick.deconstructimages.php
     * @return Imagick a new Imagick object on success.
     * @throws ImagickException on error.
     */
    public function deconstructImages() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Reduces the speckle noise in an image
     * @link https://php.net/manual/en/imagick.despeckleimage.php
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function despeckleImage() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Enhance edges within the image
     * @link https://php.net/manual/en/imagick.edgeimage.php
     * @param float $radius <p>
     * The radius of the operation.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function edgeImage($radius) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns a grayscale image with a three-dimensional effect
     * @link https://php.net/manual/en/imagick.embossimage.php
     * @param float $radius <p>
     * The radius of the effect
     * </p>
     * @param float $sigma <p>
     * The sigma of the effect
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function embossImage($radius, $sigma) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Improves the quality of a noisy image
     * @link https://php.net/manual/en/imagick.enhanceimage.php
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function enhanceImage() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Equalizes the image histogram
     * @link https://php.net/manual/en/imagick.equalizeimage.php
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function equalizeImage() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Applies an expression to an image
     * @link https://php.net/manual/en/imagick.evaluateimage.php
     * @param int $op <p>
     * The evaluation operator
     * </p>
     * @param float $constant <p>
     * The value of the operator
     * </p>
     * @param int $channel [optional] <p>
     * Provide any channel constant that is valid for your channel mode. To
     * apply to more than one channel, combine channeltype constants using
     * bitwise operators. Refer to this
     * list of channel constants.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function evaluateImage($op, $constant, $channel = Imagick::CHANNEL_ALL) {}

    /**
     * Merges a sequence of images. This is useful for combining Photoshop layers into a single image.
     * This is replaced by:
     * <pre>
     * $im = $im->mergeImageLayers(\Imagick::LAYERMETHOD_FLATTEN)
     * </pre>
     * @link https://php.net/manual/en/imagick.flattenimages.php
     * @return Imagick Returns an Imagick object containing the merged image.
     * @throws ImagickException Throws ImagickException on error.
     * @since 2.0.0
     */
    #[Deprecated]
    public function flattenImages() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Creates a vertical mirror image
     * @link https://php.net/manual/en/imagick.flipimage.php
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function flipImage() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Creates a horizontal mirror image
     * @link https://php.net/manual/en/imagick.flopimage.php
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function flopImage() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Adds a simulated three-dimensional border
     * @link https://php.net/manual/en/imagick.frameimage.php
     * @param mixed $matte_color <p>
     * ImagickPixel object or a string representing the matte color
     * </p>
     * @param int $width <p>
     * The width of the border
     * </p>
     * @param int $height <p>
     * The height of the border
     * </p>
     * @param int $inner_bevel <p>
     * The inner bevel width
     * </p>
     * @param int $outer_bevel <p>
     * The outer bevel width
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function frameImage($matte_color, $width, $height, $inner_bevel, $outer_bevel) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Evaluate expression for each pixel in the image
     * @link https://php.net/manual/en/imagick.fximage.php
     * @param string $expression <p>
     * The expression.
     * </p>
     * @param int $channel [optional] <p>
     * Provide any channel constant that is valid for your channel mode. To
     * apply to more than one channel, combine channeltype constants using
     * bitwise operators. Refer to this
     * list of channel constants.
     * </p>
     * @return Imagick <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function fxImage($expression, $channel = Imagick::CHANNEL_ALL) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gamma-corrects an image
     * @link https://php.net/manual/en/imagick.gammaimage.php
     * @param float $gamma <p>
     * The amount of gamma-correction.
     * </p>
     * @param int $channel [optional] <p>
     * Provide any channel constant that is valid for your channel mode. To
     * apply to more than one channel, combine channeltype constants using
     * bitwise operators. Refer to this
     * list of channel constants.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function gammaImage($gamma, $channel = Imagick::CHANNEL_ALL) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Blurs an image
     * @link https://php.net/manual/en/imagick.gaussianblurimage.php
     * @param float $radius <p>
     * The radius of the Gaussian, in pixels, not counting the center pixel.
     * </p>
     * @param float $sigma <p>
     * The standard deviation of the Gaussian, in pixels.
     * </p>
     * @param int $channel [optional] <p>
     * Provide any channel constant that is valid for your channel mode. To
     * apply to more than one channel, combine channeltype constants using
     * bitwise operators. Refer to this
     * list of channel constants.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function gaussianBlurImage($radius, $sigma, $channel = Imagick::CHANNEL_ALL) {}

    /**
     * @link https://www.php.net/manual/en/imagick.getimageattribute.php
     * @param string $key <p>The key of the attribute to get.</p>
     * @return string
     */
    #[Deprecated]
    #[Pure]
    public function getImageAttribute($key) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the image background color
     * @link https://php.net/manual/en/imagick.getimagebackgroundcolor.php
     * @return ImagickPixel an ImagickPixel set to the background color of the image.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageBackgroundColor() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the chromaticy blue primary point
     * @link https://php.net/manual/en/imagick.getimageblueprimary.php
     * @return float[] Array consisting of "x" and "y" coordinates of point.
     * @throws ImagickException on error.
     */
    #[ArrayShape(["x" => "float", "y" => "float"])]
    #[Pure]
    public function getImageBluePrimary() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the image border color
     * @link https://php.net/manual/en/imagick.getimagebordercolor.php
     * @return ImagickPixel <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageBorderColor() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the depth for a particular image channel
     * @link https://php.net/manual/en/imagick.getimagechanneldepth.php
     * @param int $channel <p>
     * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants
     * </p>
     * @return int <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageChannelDepth($channel) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Compares image channels of an image to a reconstructed image
     * @link https://php.net/manual/en/imagick.getimagechanneldistortion.php
     * @param Imagick $reference <p>
     * Imagick object to compare to.
     * </p>
     * @param int $channel <p>
     * Provide any channel constant that is valid for your channel mode. To
     * apply to more than one channel, combine channeltype constants using
     * bitwise operators. Refer to this
     * list of channel constants.
     * </p>
     * @param int $metric <p>
     * One of the metric type constants.
     * </p>
     * @return float <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageChannelDistortion(Imagick $reference, $channel, $metric) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the extrema for one or more image channels
     * @link https://php.net/manual/en/imagick.getimagechannelextrema.php
     * @param int $channel <p>
     * Provide any channel constant that is valid for your channel mode. To
     * apply to more than one channel, combine channeltype constants using
     * bitwise operators. Refer to this
     * list of channel constants.
     * </p>
     * @return int[]
     * @throws ImagickException on error.
     */
    #[ArrayShape(["minima" => "int", "maxima" => "int"])]
    #[Deprecated]
    #[Pure]
    public function getImageChannelExtrema($channel) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the mean and standard deviation
     * @link https://php.net/manual/en/imagick.getimagechannelmean.php
     * @param int $channel <p>
     * Provide any channel constant that is valid for your channel mode. To
     * apply to more than one channel, combine channeltype constants using
     * bitwise operators. Refer to this
     * list of channel constants.
     * </p>
     * @return float[]
     * @throws ImagickException on error.
     */
    #[ArrayShape(["mean" => "float", "standardDeviation" => "float"])]
    #[Pure]
    public function getImageChannelMean($channel) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns statistics for each channel in the image
     * @link https://php.net/manual/en/imagick.getimagechannelstatistics.php
     * @return array
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageChannelStatistics() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the color of the specified colormap index
     * @link https://php.net/manual/en/imagick.getimagecolormapcolor.php
     * @param int $index <p>
     * The offset into the image colormap.
     * </p>
     * @return ImagickPixel <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageColormapColor($index) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the image colorspace
     * @link https://php.net/manual/en/imagick.getimagecolorspace.php
     * @return int <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageColorspace() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the composite operator associated with the image
     * @link https://php.net/manual/en/imagick.getimagecompose.php
     * @return int <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageCompose() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the image delay
     * @link https://php.net/manual/en/imagick.getimagedelay.php
     * @return int the image delay.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageDelay() {}

    /**
     * (PECL imagick 0.9.1-0.9.9)<br/>
     * Gets the image depth
     * @link https://php.net/manual/en/imagick.getimagedepth.php
     * @return int The image depth.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageDepth() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Compares an image to a reconstructed image
     * @link https://php.net/manual/en/imagick.getimagedistortion.php
     * @param Imagick $reference <p>
     * Imagick object to compare to.
     * </p>
     * @param int $metric <p>
     * One of the metric type constants.
     * </p>
     * @return float the distortion metric used on the image (or the best guess
     * thereof).
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageDistortion(Imagick $reference, $metric) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the extrema for the image
     * @link https://php.net/manual/en/imagick.getimageextrema.php
     * @return int[] an associative array with the keys "min" and "max".
     * @throws ImagickException on error.
     */
    #[ArrayShape(["min" => "int", "max" => "int"])]
    #[Deprecated]
    #[Pure]
    public function getImageExtrema() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the image disposal method
     * @link https://php.net/manual/en/imagick.getimagedispose.php
     * @return int the dispose method on success.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageDispose() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the image gamma
     * @link https://php.net/manual/en/imagick.getimagegamma.php
     * @return float the image gamma on success.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageGamma() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the chromaticy green primary point
     * @link https://php.net/manual/en/imagick.getimagegreenprimary.php
     * @return float[] an array with the keys "x" and "y" on success, throws an ImagickException on failure.
     * @throws ImagickException on failure
     * @throws ImagickException on error.
     */
    #[ArrayShape(["x" => "float", "y" => "float"])]
    #[Pure]
    public function getImageGreenPrimary() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the image height
     * @link https://php.net/manual/en/imagick.getimageheight.php
     * @return int the image height in pixels.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageHeight() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the image histogram
     * @link https://php.net/manual/en/imagick.getimagehistogram.php
     * @return array the image histogram as an array of ImagickPixel objects.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageHistogram() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the image interlace scheme
     * @link https://php.net/manual/en/imagick.getimageinterlacescheme.php
     * @return int the interlace scheme as an integer on success.
     * Trhow an <b>ImagickException</b> on error.
     * @throws ImagickException on error
     */
    #[Deprecated]
    #[Pure]
    public function getImageInterlaceScheme() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the image iterations
     * @link https://php.net/manual/en/imagick.getimageiterations.php
     * @return int the image iterations as an integer.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageIterations() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the image matte color
     * @link https://php.net/manual/en/imagick.getimagemattecolor.php
     * @return ImagickPixel ImagickPixel object on success.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageMatteColor() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the page geometry
     * @link https://php.net/manual/en/imagick.getimagepage.php
     * @return int[] the page geometry associated with the image in an array with the
     * keys "width", "height", "x", and "y".
     * @throws ImagickException on error.
     */
    #[ArrayShape(["width" => "int", "height" => "int", "x" => "int", "y" => "int"])]
    #[Pure]
    public function getImagePage() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the color of the specified pixel
     * @link https://php.net/manual/en/imagick.getimagepixelcolor.php
     * @param int $x <p>
     * The x-coordinate of the pixel
     * </p>
     * @param int $y <p>
     * The y-coordinate of the pixel
     * </p>
     * @return ImagickPixel an ImagickPixel instance for the color at the coordinates given.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImagePixelColor($x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the named image profile
     * @link https://php.net/manual/en/imagick.getimageprofile.php
     * @param string $name <p>
     * The name of the profile to return.
     * </p>
     * @return string a string containing the image profile.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageProfile($name) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the chromaticity red primary point
     * @link https://php.net/manual/en/imagick.getimageredprimary.php
     * @return float[] the chromaticity red primary point as an array with the keys "x"
     * and "y".
     * Throw an <b>ImagickException</b> on error.
     * @throws ImagickException on error
     */
    #[ArrayShape(["x" => "float", "y" => "float"])]
    #[Pure]
    public function getImageRedPrimary() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the image rendering intent
     * @link https://php.net/manual/en/imagick.getimagerenderingintent.php
     * @return int the image rendering intent.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageRenderingIntent() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the image X and Y resolution
     * @link https://php.net/manual/en/imagick.getimageresolution.php
     * @return float[] the resolution as an array.
     * @throws ImagickException on error.
     */
    #[ArrayShape(["x" => "float", "y" => "float"])]
    #[Pure]
    public function getImageResolution() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the image scene
     * @link https://php.net/manual/en/imagick.getimagescene.php
     * @return int the image scene.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageScene() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Generates an SHA-256 message digest
     * @link https://php.net/manual/en/imagick.getimagesignature.php
     * @return string a string containing the SHA-256 hash of the file.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageSignature() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the image ticks-per-second
     * @link https://php.net/manual/en/imagick.getimagetickspersecond.php
     * @return int the image ticks-per-second.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageTicksPerSecond() {}

    /**
     * (PECL imagick 0.9.10-0.9.9)<br/>
     * Gets the potential image type
     * @link https://php.net/manual/en/imagick.getimagetype.php
     * @return int the potential image type.
     * <b>imagick::IMGTYPE_UNDEFINED</b>
     * <b>imagick::IMGTYPE_BILEVEL</b>
     * <b>imagick::IMGTYPE_GRAYSCALE</b>
     * <b>imagick::IMGTYPE_GRAYSCALEMATTE</b>
     * <b>imagick::IMGTYPE_PALETTE</b>
     * <b>imagick::IMGTYPE_PALETTEMATTE</b>
     * <b>imagick::IMGTYPE_TRUECOLOR</b>
     * <b>imagick::IMGTYPE_TRUECOLORMATTE</b>
     * <b>imagick::IMGTYPE_COLORSEPARATION</b>
     * <b>imagick::IMGTYPE_COLORSEPARATIONMATTE</b>
     * <b>imagick::IMGTYPE_OPTIMIZE</b>
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageType() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the image units of resolution
     * @link https://php.net/manual/en/imagick.getimageunits.php
     * @return int the image units of resolution.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageUnits() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the virtual pixel method
     * @link https://php.net/manual/en/imagick.getimagevirtualpixelmethod.php
     * @return int the virtual pixel method on success.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageVirtualPixelMethod() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the chromaticity white point
     * @link https://php.net/manual/en/imagick.getimagewhitepoint.php
     * @return float[] the chromaticity white point as an associative array with the keys
     * "x" and "y".
     * @throws ImagickException on error.
     */
    #[ArrayShape(["x" => "float", "y" => "float"])]
    #[Pure]
    public function getImageWhitePoint() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the image width
     * @link https://php.net/manual/en/imagick.getimagewidth.php
     * @return int the image width.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageWidth() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the number of images in the object
     * @link https://php.net/manual/en/imagick.getnumberimages.php
     * @return int the number of images associated with Imagick object.
     */
    #[Pure]
    public function getNumberImages() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the image total ink density
     * @link https://php.net/manual/en/imagick.getimagetotalinkdensity.php
     * @return float the image total ink density of the image.
     * Throw an <b>ImagickException</b> on error.
     * @throws ImagickException on error
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageTotalInkDensity() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Extracts a region of the image
     * @link https://php.net/manual/en/imagick.getimageregion.php
     * @param int $width <p>
     * The width of the extracted region.
     * </p>
     * @param int $height <p>
     * The height of the extracted region.
     * </p>
     * @param int $x <p>
     * X-coordinate of the top-left corner of the extracted region.
     * </p>
     * @param int $y <p>
     * Y-coordinate of the top-left corner of the extracted region.
     * </p>
     * @return Imagick Extracts a region of the image and returns it as a new wand.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImageRegion($width, $height, $x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Creates a new image as a copy
     * @link https://php.net/manual/en/imagick.implodeimage.php
     * @param float $radius <p>
     * The radius of the implode
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function implodeImage($radius) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Adjusts the levels of an image
     * @link https://php.net/manual/en/imagick.levelimage.php
     * @param float $blackPoint <p>
     * The image black point
     * </p>
     * @param float $gamma <p>
     * The gamma value
     * </p>
     * @param float $whitePoint <p>
     * The image white point
     * </p>
     * @param int $channel [optional] <p>
     * Provide any channel constant that is valid for your channel mode. To
     * apply to more than one channel, combine channeltype constants using
     * bitwise operators. Refer to this
     * list of channel constants.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function levelImage($blackPoint, $gamma, $whitePoint, $channel = Imagick::CHANNEL_ALL) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Scales an image proportionally 2x
     * @link https://php.net/manual/en/imagick.magnifyimage.php
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function magnifyImage() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Replaces the colors of an image with the closest color from a reference image.
     * @link https://php.net/manual/en/imagick.mapimage.php
     * @param Imagick $map
     * @param bool $dither
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    #[Deprecated]
    public function mapImage(Imagick $map, $dither) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Changes the transparency value of a color
     * @link https://php.net/manual/en/imagick.mattefloodfillimage.php
     * @param float $alpha <p>
     * The level of transparency: 1.0 is fully opaque and 0.0 is fully
     * transparent.
     * </p>
     * @param float $fuzz <p>
     * The fuzz member of image defines how much tolerance is acceptable to
     * consider two colors as the same.
     * </p>
     * @param mixed $bordercolor <p>
     * An <b>ImagickPixel</b> object or string representing the border color.
     * </p>
     * @param int $x <p>
     * The starting x coordinate of the operation.
     * </p>
     * @param int $y <p>
     * The starting y coordinate of the operation.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    #[Deprecated]
    public function matteFloodfillImage($alpha, $fuzz, $bordercolor, $x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Applies a digital filter
     * @link https://php.net/manual/en/imagick.medianfilterimage.php
     * @param float $radius <p>
     * The radius of the pixel neighborhood.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    #[Deprecated]
    public function medianFilterImage($radius) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Negates the colors in the reference image
     * @link https://php.net/manual/en/imagick.negateimage.php
     * @param bool $gray <p>
     * Whether to only negate grayscale pixels within the image.
     * </p>
     * @param int $channel [optional] <p>
     * Provide any channel constant that is valid for your channel mode. To
     * apply to more than one channel, combine channeltype constants using
     * bitwise operators. Refer to this
     * list of channel constants.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function negateImage($gray, $channel = Imagick::CHANNEL_ALL) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Change any pixel that matches color
     * @link https://php.net/manual/en/imagick.paintopaqueimage.php
     * @param mixed $target <p>
     * Change this target color to the fill color within the image. An
     * ImagickPixel object or a string representing the target color.
     * </p>
     * @param mixed $fill <p>
     * An ImagickPixel object or a string representing the fill color.
     * </p>
     * @param float $fuzz <p>
     * The fuzz member of image defines how much tolerance is acceptable to
     * consider two colors as the same.
     * </p>
     * @param int $channel [optional] <p>
     * Provide any channel constant that is valid for your channel mode. To
     * apply to more than one channel, combine channeltype constants using
     * bitwise operators. Refer to this
     * list of channel constants.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    #[Deprecated]
    public function paintOpaqueImage($target, $fill, $fuzz, $channel = Imagick::CHANNEL_ALL) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Changes any pixel that matches color with the color defined by fill
     * @link https://php.net/manual/en/imagick.painttransparentimage.php
     * @param mixed $target <p>
     * Change this target color to specified opacity value within the image.
     * </p>
     * @param float $alpha <p>
     * The level of transparency: 1.0 is fully opaque and 0.0 is fully
     * transparent.
     * </p>
     * @param float $fuzz <p>
     * The fuzz member of image defines how much tolerance is acceptable to
     * consider two colors as the same.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    #[Deprecated]
    public function paintTransparentImage($target, $alpha, $fuzz) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Quickly pin-point appropriate parameters for image processing
     * @link https://php.net/manual/en/imagick.previewimages.php
     * @param int $preview <p>
     * Preview type. See Preview type constants
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function previewImages($preview) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Adds or removes a profile from an image
     * @link https://php.net/manual/en/imagick.profileimage.php
     * @param string $name
     * @param string $profile
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function profileImage($name, $profile) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Analyzes the colors within a reference image
     * @link https://php.net/manual/en/imagick.quantizeimage.php
     * @param int $numberColors
     * @param int $colorspace
     * @param int $treedepth
     * @param bool $dither
     * @param bool $measureError
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function quantizeImage($numberColors, $colorspace, $treedepth, $dither, $measureError) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Analyzes the colors within a sequence of images
     * @link https://php.net/manual/en/imagick.quantizeimages.php
     * @param int $numberColors
     * @param int $colorspace
     * @param int $treedepth
     * @param bool $dither
     * @param bool $measureError
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function quantizeImages($numberColors, $colorspace, $treedepth, $dither, $measureError) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Smooths the contours of an image
     * @link https://php.net/manual/en/imagick.reducenoiseimage.php
     * @param float $radius
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    #[Deprecated]
    public function reduceNoiseImage($radius) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Removes the named image profile and returns it
     * @link https://php.net/manual/en/imagick.removeimageprofile.php
     * @param string $name
     * @return string a string containing the profile of the image.
     * @throws ImagickException on error.
     */
    public function removeImageProfile($name) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Separates a channel from the image
     * @link https://php.net/manual/en/imagick.separateimagechannel.php
     * @param int $channel
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function separateImageChannel($channel) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sepia tones an image
     * @link https://php.net/manual/en/imagick.sepiatoneimage.php
     * @param float $threshold
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function sepiaToneImage($threshold) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image bias for any method that convolves an image
     * @link https://php.net/manual/en/imagick.setimagebias.php
     * @param float $bias
     * @return bool <b>TRUE</b> on success.
     */
    public function setImageBias($bias) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image chromaticity blue primary point
     * @link https://php.net/manual/en/imagick.setimageblueprimary.php
     * @param float $x
     * @param float $y
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageBluePrimary($x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image border color
     * @link https://php.net/manual/en/imagick.setimagebordercolor.php
     * @param mixed $border <p>
     * The border color
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageBorderColor($border) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the depth of a particular image channel
     * @link https://php.net/manual/en/imagick.setimagechanneldepth.php
     * @param int $channel
     * @param int $depth
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageChannelDepth($channel, $depth) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the color of the specified colormap index
     * @link https://php.net/manual/en/imagick.setimagecolormapcolor.php
     * @param int $index
     * @param ImagickPixel $color
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageColormapColor($index, ImagickPixel $color) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image colorspace
     * @link https://php.net/manual/en/imagick.setimagecolorspace.php
     * @param int $colorspace <p>
     * One of the COLORSPACE constants
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageColorspace($colorspace) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image disposal method
     * @link https://php.net/manual/en/imagick.setimagedispose.php
     * @param int $dispose
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageDispose($dispose) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image size
     * @link https://php.net/manual/en/imagick.setimageextent.php
     * @param int $columns
     * @param int $rows
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageExtent($columns, $rows) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image chromaticity green primary point
     * @link https://php.net/manual/en/imagick.setimagegreenprimary.php
     * @param float $x
     * @param float $y
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageGreenPrimary($x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image compression
     * @link https://php.net/manual/en/imagick.setimageinterlacescheme.php
     * @param int $interlace_scheme
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageInterlaceScheme($interlace_scheme) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Adds a named profile to the Imagick object
     * @link https://php.net/manual/en/imagick.setimageprofile.php
     * @param string $name
     * @param string $profile
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageProfile($name, $profile) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image chromaticity red primary point
     * @link https://php.net/manual/en/imagick.setimageredprimary.php
     * @param float $x
     * @param float $y
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageRedPrimary($x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image rendering intent
     * @link https://php.net/manual/en/imagick.setimagerenderingintent.php
     * @param int $rendering_intent
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageRenderingIntent($rendering_intent) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image virtual pixel method
     * @link https://php.net/manual/en/imagick.setimagevirtualpixelmethod.php
     * @param int $method
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageVirtualPixelMethod($method) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image chromaticity white point
     * @link https://php.net/manual/en/imagick.setimagewhitepoint.php
     * @param float $x
     * @param float $y
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImageWhitePoint($x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Adjusts the contrast of an image
     * @link https://php.net/manual/en/imagick.sigmoidalcontrastimage.php
     * @param bool $sharpen
     * @param float $alpha
     * @param float $beta
     * @param int $channel [optional]
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function sigmoidalContrastImage($sharpen, $alpha, $beta, $channel = Imagick::CHANNEL_ALL) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Composites two images
     * @link https://php.net/manual/en/imagick.stereoimage.php
     * @param Imagick $offset_wand
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function stereoImage(Imagick $offset_wand) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Repeatedly tiles the texture image
     * @link https://php.net/manual/en/imagick.textureimage.php
     * @param Imagick $texture_wand
     * @return Imagick a new Imagick object that has the repeated texture applied.
     * @throws ImagickException on error.
     */
    public function textureImage(Imagick $texture_wand) {}

    /**
     * pplies a color vector to each pixel in the image. The 'opacity' color is a per channel strength factor for how strongly the color should be applied.
     * If legacy is true, the behaviour of this function is incorrect, but consistent with how it behaved before Imagick version 3.4.0
     * @link https://php.net/manual/en/imagick.tintimage.php
     * @param mixed $tint
     * @param mixed $opacity
     * @param bool $legacy [optional]
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException Throws ImagickException on error
     * @since 2.0.0
     */
    public function tintImage($tint, $opacity, $legacy = false) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sharpens an image
     * @link https://php.net/manual/en/imagick.unsharpmaskimage.php
     * @param float $radius
     * @param float $sigma
     * @param float $amount
     * @param float $threshold
     * @param int $channel [optional]
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function unsharpMaskImage($radius, $sigma, $amount, $threshold, $channel = Imagick::CHANNEL_ALL) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns a new Imagick object
     * @link https://php.net/manual/en/imagick.getimage.php
     * @return Imagick a new Imagick object with the current image sequence.
     * @throws ImagickException on error.
     */
    #[Pure]
    public function getImage() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Adds new image to Imagick object image list
     * @link https://php.net/manual/en/imagick.addimage.php
     * @param Imagick $source <p>
     * The source Imagick object
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function addImage(Imagick $source) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Replaces image in the object
     * @link https://php.net/manual/en/imagick.setimage.php
     * @param Imagick $replace <p>
     * The replace Imagick object
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setImage(Imagick $replace) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Creates a new image
     * @link https://php.net/manual/en/imagick.newimage.php
     * @param int $cols <p>
     * Columns in the new image
     * </p>
     * @param int $rows <p>
     * Rows in the new image
     * </p>
     * @param mixed $background <p>
     * The background color used for this image
     * </p>
     * @param string $format [optional] <p>
     * Image format. This parameter was added in Imagick version 2.0.1.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function newImage($cols, $rows, $background, $format = null) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Creates a new image
     * @link https://php.net/manual/en/imagick.newpseudoimage.php
     * @param int $columns <p>
     * columns in the new image
     * </p>
     * @param int $rows <p>
     * rows in the new image
     * </p>
     * @param string $pseudoString <p>
     * string containing pseudo image definition.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function newPseudoImage($columns, $rows, $pseudoString) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the object compression type
     * @link https://php.net/manual/en/imagick.getcompression.php
     * @return int the compression constant
     */
    #[Pure]
    public function getCompression() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the object compression quality
     * @link https://php.net/manual/en/imagick.getcompressionquality.php
     * @return int integer describing the compression quality
     */
    #[Pure]
    public function getCompressionQuality() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the ImageMagick API copyright as a string
     * @link https://php.net/manual/en/imagick.getcopyright.php
     * @return string a string containing the copyright notice of Imagemagick and
     * Magickwand C API.
     */
    public static function getCopyright() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * The filename associated with an image sequence
     * @link https://php.net/manual/en/imagick.getfilename.php
     * @return string a string on success.
     */
    #[Pure]
    public function getFilename() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the format of the Imagick object
     * @link https://php.net/manual/en/imagick.getformat.php
     * @return string the format of the image.
     */
    #[Pure]
    public function getFormat() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the ImageMagick home URL
     * @link https://php.net/manual/en/imagick.gethomeurl.php
     * @return string a link to the imagemagick homepage.
     */
    public static function getHomeURL() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the object interlace scheme
     * @link https://php.net/manual/en/imagick.getinterlacescheme.php
     * @return int Gets the wand interlace
     * scheme.
     */
    #[Pure]
    public function getInterlaceScheme() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns a value associated with the specified key
     * @link https://php.net/manual/en/imagick.getoption.php
     * @param string $key <p>
     * The name of the option
     * </p>
     * @return string a value associated with a wand and the specified key.
     */
    #[Pure]
    public function getOption($key) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the ImageMagick package name
     * @link https://php.net/manual/en/imagick.getpackagename.php
     * @return string the ImageMagick package name as a string.
     */
    public static function getPackageName() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the page geometry
     * @link https://php.net/manual/en/imagick.getpage.php
     * @return int[] the page geometry associated with the Imagick object in
     * an associative array with the keys "width", "height", "x", and "y",
     * throwing ImagickException on error.
     * @throws ImagickException on error
     */
    //width:int, height:int, x:int, y:int
    #[ArrayShape(["width" => "int", "height" => "int", "x" => "int", "y" => "int"])]
    #[Pure]
    public function getPage() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the quantum depth
     * @link https://php.net/manual/en/imagick.getquantumdepth.php
     * @return array the Imagick quantum depth as a string.
     */
    // quantumDepthLong:int, quantumDepthString:string
    #[ArrayShape(["quantumDepthLong" => "int", "quantumDepthString" => "string"])]
    public static function getQuantumDepth() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the Imagick quantum range
     * @link https://php.net/manual/en/imagick.getquantumrange.php
     * @return array the Imagick quantum range as a string.
     */
    #[ArrayShape(["quantumRangeLong" => "int", "quantumRangeString" => "string"])]
    public static function getQuantumRange() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the ImageMagick release date
     * @link https://php.net/manual/en/imagick.getreleasedate.php
     * @return string the ImageMagick release date as a string.
     */
    public static function getReleaseDate() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the specified resource's memory usage
     * @link https://php.net/manual/en/imagick.getresource.php
     * @param int $type <p>
     * Refer to the list of resourcetype constants.
     * </p>
     * @return int the specified resource's memory usage in megabytes.
     */
    public static function getResource($type) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the specified resource limit
     * @link https://php.net/manual/en/imagick.getresourcelimit.php
     * @param int $type <p>
     * Refer to the list of resourcetype constants.
     * </p>
     * @return int the specified resource limit in megabytes.
     */
    public static function getResourceLimit($type) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the horizontal and vertical sampling factor
     * @link https://php.net/manual/en/imagick.getsamplingfactors.php
     * @return array an associative array with the horizontal and vertical sampling
     * factors of the image.
     */
    #[Pure]
    public function getSamplingFactors() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the size associated with the Imagick object
     * @link https://php.net/manual/en/imagick.getsize.php
     * @return int[] the size associated with the Imagick object as an array with the
     * keys "columns" and "rows".
     * @throws ImagickException on error.
     */
    #[ArrayShape(["columns" => "int", "rows" => "int"])]
    #[Pure]
    public function getSize() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the ImageMagick API version
     * @link https://php.net/manual/en/imagick.getversion.php
     * @return array the ImageMagick API version as a string and as a number.
     */
    #[ArrayShape(["versionNumber" => "int", "versionString" => "string"])]
    public static function getVersion() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the object's default background color
     * @link https://php.net/manual/en/imagick.setbackgroundcolor.php
     * @param mixed $background
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setBackgroundColor($background) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the object's default compression type
     * @link https://php.net/manual/en/imagick.setcompression.php
     * @param int $compression
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setCompression($compression) {}

    /**
     * (PECL imagick 0.9.10-0.9.9)<br/>
     * Sets the object's default compression quality
     * @link https://php.net/manual/en/imagick.setcompressionquality.php
     * @param int $quality
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setCompressionQuality($quality) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the filename before you read or write the image
     * @link https://php.net/manual/en/imagick.setfilename.php
     * @param string $filename
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setFilename($filename) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the format of the Imagick object
     * @link https://php.net/manual/en/imagick.setformat.php
     * @param string $format
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setFormat($format) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image compression
     * @link https://php.net/manual/en/imagick.setinterlacescheme.php
     * @param int $interlace_scheme
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setInterlaceScheme($interlace_scheme) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Set an option
     * @link https://php.net/manual/en/imagick.setoption.php
     * @param string $key
     * @param string $value
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setOption($key, $value) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the page geometry of the Imagick object
     * @link https://php.net/manual/en/imagick.setpage.php
     * @param int $width
     * @param int $height
     * @param int $x
     * @param int $y
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setPage($width, $height, $x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the limit for a particular resource in megabytes
     * @link https://php.net/manual/en/imagick.setresourcelimit.php
     * @param int $type <p>
     * Refer to the list of resourcetype constants.
     * </p>
     * @param int $limit <p>
     * The resource limit. The unit depends on the type of the resource being limited.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public static function setResourceLimit($type, $limit) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image resolution
     * @link https://php.net/manual/en/imagick.setresolution.php
     * @param float $x_resolution <p>
     * The horizontal resolution.
     * </p>
     * @param float $y_resolution <p>
     * The vertical resolution.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setResolution($x_resolution, $y_resolution) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image sampling factors
     * @link https://php.net/manual/en/imagick.setsamplingfactors.php
     * @param array $factors
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setSamplingFactors(array $factors) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the size of the Imagick object
     * @link https://php.net/manual/en/imagick.setsize.php
     * @param int $columns
     * @param int $rows
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setSize($columns, $rows) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the image type attribute
     * @link https://php.net/manual/en/imagick.settype.php
     * @param int $image_type
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function setType($image_type) {}

    public function key() {}

    public function next() {}

    public function rewind() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Checks if the current item is valid
     * @link https://php.net/manual/en/imagick.valid.php
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function valid() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns a reference to the current Imagick object
     * @link https://php.net/manual/en/imagick.current.php
     * @return Imagick self on success.
     */
    public function current() {}

    /**
     * Change the brightness and/or contrast of an image. It converts the brightness and contrast parameters into slope and intercept and calls a polynomical function to apply to the image.
     * @link https://php.net/manual/en/imagick.brightnesscontrastimage.php
     * @param float $brightness
     * @param float $contrast
     * @param int $CHANNEL [optional]
     * @return void
     * @throws ImagickException on error.
     * @since 3.3.0
     */
    public function brightnessContrastImage($brightness, $contrast, $CHANNEL = Imagick::CHANNEL_DEFAULT) {}

    /**
     * Applies a user supplied kernel to the image according to the given morphology method.
     * @link https://php.net/manual/en/imagick.morphology.php
     * @param int $morphologyMethod Which morphology method to use one of the \Imagick::MORPHOLOGY_* constants.
     * @param int $iterations The number of iteration to apply the morphology function. A value of -1 means loop until no change found. How this is applied may depend on the morphology method. Typically this is a value of 1.
     * @param ImagickKernel $ImagickKernel
     * @param int $CHANNEL [optional]
     * @return void
     * @throws ImagickException on error.
     * @throws ImagickKernelException on error.
     * @since 3.3.0
     */
    public function morphology($morphologyMethod, $iterations, ImagickKernel $ImagickKernel, $CHANNEL = Imagick::CHANNEL_DEFAULT) {}

    /**
     * Applies a custom convolution kernel to the image.
     * @link https://php.net/manual/en/imagick.filter.php
     * @param ImagickKernel $ImagickKernel An instance of ImagickKernel that represents either a single kernel or a linked series of kernels.
     * @param int $CHANNEL [optional] Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants
     * @return void
     * @throws ImagickException on error.
     * @since 3.3.0
     */
    public function filter(ImagickKernel $ImagickKernel, $CHANNEL = Imagick::CHANNEL_DEFAULT) {}

    /**
     * Apply color transformation to an image. The method permits saturation changes, hue rotation, luminance to alpha, and various other effects. Although variable-sized transformation matrices can be used, typically one uses a 5x5 matrix for an RGBA image and a 6x6 for CMYKA (or RGBA with offsets).
     * The matrix is similar to those used by Adobe Flash except offsets are in column 6 rather than 5 (in support of CMYKA images) and offsets are normalized (divide Flash offset by 255)
     * @link https://php.net/manual/en/imagick.colormatriximage.php
     * @param array $color_matrix
     * @return void
     * @throws ImagickException on error.
     * @since 3.3.0
     */
    public function colorMatrixImage($color_matrix = Imagick::CHANNEL_DEFAULT) {}

    /**
     * Deletes an image property.
     * @link https://php.net/manual/en/imagick.deleteimageproperty.php
     * @param string $name The name of the property to delete.
     * @return void
     * @throws ImagickException on error.
     * @since 3.3.0
     */
    public function deleteImageProperty($name) {}

    /**
     * Implements the discrete Fourier transform (DFT) of the image either as a magnitude / phase or real / imaginary image pair.
     * @link https://php.net/manual/en/imagick.forwardfouriertransformimage.php
     * @param bool $magnitude If true, return as magnitude / phase pair otherwise a real / imaginary image pair.
     * @return void
     * @throws ImagickException on error.
     * @since 3.3.0
     */
    public function forwardFourierTransformimage($magnitude) {}

    /**
     * Gets the current image's compression type.
     * @link https://php.net/manual/en/imagick.getimagecompression.php
     * @return int
     * @since 3.3.0
     */
    #[Pure]
    public function getImageCompression() {}

    /**
     * Get the StringRegistry entry for the named key or false if not set.
     * @link https://php.net/manual/en/imagick.getregistry.php
     * @param string $key
     * @return string|false
     * @throws ImagickException Since version >= 3.4.3. Throws an exception if the key does not exist, rather than terminating the program.
     * @since 3.3.0
     */
    public static function getRegistry($key) {}

    /**
     * Returns the ImageMagick quantum range as an integer.
     * @link https://php.net/manual/en/imagick.getquantum.php
     * @return int
     * @since 3.3.0
     */
    public static function getQuantum() {}

    /**
     * Replaces any embedded formatting characters with the appropriate image property and returns the interpreted text. See https://www.imagemagick.org/script/escape.php for escape sequences.
     * @link https://php.net/manual/en/imagick.identifyformat.php
     * @see https://www.imagemagick.org/script/escape.php
     * @param string $embedText A string containing formatting sequences e.g. "Trim box: %@ number of unique colors: %k".
     * @return bool
     * @throws ImagickException on error.
     * @since 3.3.0
     */
    public function identifyFormat($embedText) {}

    /**
     * Implements the inverse discrete Fourier transform (DFT) of the image either as a magnitude / phase or real / imaginary image pair.
     * @link https://php.net/manual/en/imagick.inversefouriertransformimage.php
     * @param Imagick $complement The second image to combine with this one to form either the magnitude / phase or real / imaginary image pair.
     * @param bool $magnitude If true, combine as magnitude / phase pair otherwise a real / imaginary image pair.
     * @return void
     * @throws ImagickException on error.
     * @since 3.3.0
     */
    public function inverseFourierTransformImage($complement, $magnitude) {}

    /**
     * List all the registry settings. Returns an array of all the key/value pairs in the registry
     * @link https://php.net/manual/en/imagick.listregistry.php
     * @return array An array containing the key/values from the registry.
     * @since 3.3.0
     */
    public static function listRegistry() {}

    /**
     * Rotational blurs an image.
     * @link https://php.net/manual/en/imagick.rotationalblurimage.php
     * @param float $angle
     * @param int $CHANNEL
     * @return void
     * @throws ImagickException on error.
     * @since 3.3.0
     */
    public function rotationalBlurImage($angle, $CHANNEL = Imagick::CHANNEL_DEFAULT) {}

    /**
     * Selectively blur an image within a contrast threshold. It is similar to the unsharpen mask that sharpens everything with contrast above a certain threshold.
     * @link https://php.net/manual/en/imagick.selectiveblurimage.php
     * @param float $radius
     * @param float $sigma
     * @param float $threshold
     * @param int $CHANNEL Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants
     * @return void
     * @throws ImagickException on error.
     * @since 3.3.0
     */
    public function selectiveBlurImage($radius, $sigma, $threshold, $CHANNEL = Imagick::CHANNEL_DEFAULT) {}

    /**
     * Set whether antialiasing should be used for operations. On by default.
     * @param bool $antialias
     * @return int
     * @throws ImagickException on error.
     * @since 3.3.0
     */
    public function setAntiAlias($antialias) {}

    /**
     * @link https://php.net/manual/en/imagick.setimagebiasquantum.php
     * @param string $bias
     * @return void
     * @since 3.3.0
     */
    public function setImageBiasQuantum($bias) {}

    /**
     * Set a callback that will be called during the processing of the Imagick image.
     * @link https://php.net/manual/en/imagick.setprogressmonitor.php
     * @param callable $callback The progress function to call. It should return true if image processing should continue, or false if it should be cancelled.
     * The offset parameter indicates the progress and the span parameter indicates the total amount of work needed to be done.
     * <pre> bool callback ( mixed $offset , mixed $span ) </pre>
     * <b>Caution</b>
     * The values passed to the callback function are not consistent. In particular the span parameter can increase during image processing. Because of this calculating the percentage complete of an image operation is not trivial.
     * @return void
     * @throws ImagickException on error.
     * @since 3.3.0
     */
    public function setProgressMonitor($callback) {}

    /**
     * Sets the ImageMagick registry entry named key to value. This is most useful for setting "temporary-path" which controls where ImageMagick creates temporary images e.g. while processing PDFs.
     * @link https://php.net/manual/en/imagick.setregistry.php
     * @param string $key
     * @param string $value
     * @return void
     * @since 3.3.0
     */
    public static function setRegistry($key, $value) {}

    /**
     * Replace each pixel with corresponding statistic from the neighborhood of the specified width and height.
     * @link https://php.net/manual/en/imagick.statisticimage.php
     * @param int $type
     * @param int $width
     * @param int $height
     * @param int $channel [optional]
     * @return void
     * @throws ImagickException on error.
     * @since 3.3.0
     */
    public function statisticImage($type, $width, $height, $channel = Imagick::CHANNEL_DEFAULT) {}

    /**
     * Searches for a subimage in the current image and returns a similarity image such that an exact match location is
     * completely white and if none of the pixels match, black, otherwise some gray level in-between.
     * You can also pass in the optional parameters bestMatch and similarity. After calling the function similarity will
     * be set to the 'score' of the similarity between the subimage and the matching position in the larger image,
     * bestMatch will contain an associative array with elements x, y, width, height that describe the matching region.
     *
     * @link https://php.net/manual/en/imagick.subimagematch.php
     * @param Imagick $imagick
     * @param array &$bestMatch [optional]
     * @param float &$similarity [optional] A new image that displays the amount of similarity at each pixel.
     * @param float $similarity_threshold [optional] Only used if compiled with ImageMagick (library) > 7
     * @param int $metric [optional] Only used if compiled with ImageMagick (library) > 7
     * @return Imagick
     * @throws ImagickException on error.
     * @since 3.3.0
     */
    public function subImageMatch(Imagick $imagick, array &$bestMatch, &$similarity, $similarity_threshold, $metric) {}

    /**
     * Is an alias of Imagick::subImageMatch
     *
     * @param Imagick $imagick
     * @param array &$bestMatch [optional]
     * @param float &$similarity [optional] A new image that displays the amount of similarity at each pixel.
     * @param float $similarity_threshold [optional]
     * @param int $metric [optional]
     * @return Imagick
     * @throws ImagickException on error.
     * @see Imagick::subImageMatch() This function is an alias of subImageMatch()
     * @since 3.4.0
     */
    public function similarityImage(Imagick $imagick, array &$bestMatch, &$similarity, $similarity_threshold, $metric) {}

    /**
     * Returns any ImageMagick  configure options that match the specified pattern (e.g. "*" for all). Options include NAME, VERSION, LIB_VERSION, etc.
     * @return string
     * @since 3.4.0
     */
    #[Pure]
    public function getConfigureOptions() {}

    /**
     * GetFeatures() returns the ImageMagick features that have been compiled into the runtime.
     * @return string
     * @since 3.4.0
     */
    #[Pure]
    public function getFeatures() {}

    /**
     * @return int
     * @since 3.4.0
     */
    #[Pure]
    public function getHDRIEnabled() {}

    /**
     * Sets the image channel mask. Returns the previous set channel mask.
     * Only works with Imagick >= 7
     * @param int $channel
     * @throws ImagickException on error.
     * @since 3.4.0
     */
    public function setImageChannelMask($channel) {}

    /**
     * Merge multiple images of the same size together with the selected operator. https://www.imagemagick.org/Usage/layers/#evaluate-sequence
     * @param int $EVALUATE_CONSTANT
     * @return bool
     * @see https://www.imagemagick.org/Usage/layers/#evaluate-sequence
     * @throws ImagickException on error.
     * @since 3.4.0
     */
    public function evaluateImages($EVALUATE_CONSTANT) {}

    /**
     * Extracts the 'mean' from the image and adjust the image to try make set its gamma appropriately.
     * @param int $channel [optional] Default value Imagick::CHANNEL_ALL
     * @return bool
     * @throws ImagickException on error.
     * @since 3.4.1
     */
    public function autoGammaImage($channel = Imagick::CHANNEL_ALL) {}

    /**
     * Adjusts an image so that its orientation is suitable $ for viewing (i.e. top-left orientation).
     * @return bool
     * @throws ImagickException on error.
     * @since 3.4.1
     */
    public function autoOrient() {}

    /**
     * Composite one image onto another using the specified gravity.
     *
     * @param Imagick $imagick
     * @param int $COMPOSITE_CONSTANT
     * @param int $GRAVITY_CONSTANT
     * @return bool
     * @throws ImagickException on error.
     * @since 3.4.1
     */
    public function compositeImageGravity(Imagick $imagick, $COMPOSITE_CONSTANT, $GRAVITY_CONSTANT) {}

    /**
     * Attempts to increase the appearance of large-scale light-dark transitions.
     *
     * @param float $radius
     * @param float $strength
     * @return bool
     * @throws ImagickException on error.
     * @since 3.4.1
     */
    public function localContrastImage($radius, $strength) {}

    /**
     * Identifies the potential image type, returns one of the Imagick::IMGTYPE_* constants
     * @return int
     * @throws ImagickException on error.
     * @since 3.4.3
     */
    public function identifyImageType() {}

    /**
     * Sets the image to the specified alpha level. Will replace ImagickDraw::setOpacity()
     *
     * @param float $alpha
     * @return bool
     * @throws ImagickException on error.
     * @since 3.4.3
     */
    public function setImageAlpha($alpha) {}
}

/**
 * @method ImagickDraw clone() (PECL imagick 2.0.0)<br/>Makes an exact copy of the specified ImagickDraw object
 * @link https://php.net/manual/en/class.imagickdraw.php
 */
class ImagickDraw
{
    public function resetVectorGraphics() {}

    #[Pure]
    public function getTextKerning() {}

    /**
     * @param float $kerning
     */
    public function setTextKerning($kerning) {}

    #[Pure]
    public function getTextInterWordSpacing() {}

    /**
     * @param $spacing
     */
    public function setTextInterWordSpacing($spacing) {}

    #[Pure]
    public function getTextInterLineSpacing() {}

    /**
     * @param $spacing
     */
    public function setTextInterLineSpacing($spacing) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * The ImagickDraw constructor
     * @link https://php.net/manual/en/imagickdraw.construct.php
     */
    public function __construct() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the fill color to be used for drawing filled objects
     * @link https://php.net/manual/en/imagickdraw.setfillcolor.php
     * @param ImagickPixel $fill_pixel <p>
     * ImagickPixel to use to set the color
     * </p>
     * @return bool No value is returned.
     * @throws ImagickDrawException on error.
     */
    public function setFillColor(ImagickPixel $fill_pixel) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the opacity to use when drawing using the fill color or fill texture
     * @link https://php.net/manual/en/imagickdraw.setfillalpha.php
     * @param float $opacity <p>
     * fill alpha
     * </p>
     * @return bool No value is returned.
     */
    #[Deprecated]
    public function setFillAlpha($opacity) {}

    /**
     * Sets the image resolution
     * @param float $x_resolution <p>The horizontal resolution.</p>
     * @param float $y_resolution <p>The vertical resolution.</p>
     * @return bool
     * @throws ImagickDrawException on error.
     */
    public function setResolution($x_resolution, $y_resolution) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the color used for stroking object outlines
     * @link https://php.net/manual/en/imagickdraw.setstrokecolor.php
     * @param ImagickPixel $stroke_pixel <p>
     * the stroke color
     * </p>
     * @return bool No value is returned.
     * @throws ImagickDrawException on error.
     */
    public function setStrokeColor(ImagickPixel $stroke_pixel) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Specifies the opacity of stroked object outlines
     * @link https://php.net/manual/en/imagickdraw.setstrokealpha.php
     * @param float $opacity <p>
     * opacity
     * </p>
     * @return bool No value is returned.
     */
    #[Deprecated]
    public function setStrokeAlpha($opacity) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the width of the stroke used to draw object outlines
     * @link https://php.net/manual/en/imagickdraw.setstrokewidth.php
     * @param float $stroke_width <p>
     * stroke width
     * </p>
     * @return bool No value is returned.
     */
    public function setStrokeWidth($stroke_width) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Clears the ImagickDraw
     * @link https://php.net/manual/en/imagickdraw.clear.php
     * @return bool an ImagickDraw object.
     */
    public function clear() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws a circle
     * @link https://php.net/manual/en/imagickdraw.circle.php
     * @param float $ox <p>
     * origin x coordinate
     * </p>
     * @param float $oy <p>
     * origin y coordinate
     * </p>
     * @param float $px <p>
     * perimeter x coordinate
     * </p>
     * @param float $py <p>
     * perimeter y coordinate
     * </p>
     * @return bool No value is returned.
     */
    public function circle($ox, $oy, $px, $py) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws text on the image
     * @link https://php.net/manual/en/imagickdraw.annotation.php
     * @param float $x <p>
     * The x coordinate where text is drawn
     * </p>
     * @param float $y <p>
     * The y coordinate where text is drawn
     * </p>
     * @param string $text <p>
     * The text to draw on the image
     * </p>
     * @return bool No value is returned.
     * @throws ImagickDrawException on error.
     */
    public function annotation($x, $y, $text) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Controls whether text is antialiased
     * @link https://php.net/manual/en/imagickdraw.settextantialias.php
     * @param bool $antiAlias
     * @return bool No value is returned.
     */
    public function setTextAntialias($antiAlias) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Specifies specifies the text code set
     * @link https://php.net/manual/en/imagickdraw.settextencoding.php
     * @param string $encoding <p>
     * the encoding name
     * </p>
     * @return bool No value is returned.
     */
    public function setTextEncoding($encoding) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the fully-specified font to use when annotating with text
     * @link https://php.net/manual/en/imagickdraw.setfont.php
     * @param string $font_name
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickDrawException on error.
     * @throws ImagickException on error.
     */
    public function setFont($font_name) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the font family to use when annotating with text
     * @link https://php.net/manual/en/imagickdraw.setfontfamily.php
     * @param string $font_family <p>
     * the font family
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickDrawException on error.
     * @throws ImagickException on error.
     */
    public function setFontFamily($font_family) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the font pointsize to use when annotating with text
     * @link https://php.net/manual/en/imagickdraw.setfontsize.php
     * @param float $pointsize <p>
     * the point size
     * </p>
     * @return bool No value is returned.
     */
    public function setFontSize($pointsize) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the font style to use when annotating with text
     * @link https://php.net/manual/en/imagickdraw.setfontstyle.php
     * @param int $style <p>
     * STYLETYPE_ constant
     * </p>
     * @return bool No value is returned.
     */
    public function setFontStyle($style) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the font weight
     * @link https://php.net/manual/en/imagickdraw.setfontweight.php
     * @param int $font_weight
     * @return bool
     * @throws ImagickDrawException on error.
     */
    public function setFontWeight($font_weight) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the font
     * @link https://php.net/manual/en/imagickdraw.getfont.php
     * @return string|false a string on success and false if no font is set.
     */
    #[Pure]
    public function getFont() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the font family
     * @link https://php.net/manual/en/imagickdraw.getfontfamily.php
     * @return string|false the font family currently selected or false if font family is not set.
     */
    #[Pure]
    public function getFontFamily() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the font pointsize
     * @link https://php.net/manual/en/imagickdraw.getfontsize.php
     * @return float the font size associated with the current ImagickDraw object.
     */
    #[Pure]
    public function getFontSize() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the font style
     * @link https://php.net/manual/en/imagickdraw.getfontstyle.php
     * @return int the font style constant (STYLE_) associated with the ImagickDraw object
     * or 0 if no style is set.
     */
    #[Pure]
    public function getFontStyle() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the font weight
     * @link https://php.net/manual/en/imagickdraw.getfontweight.php
     * @return int an int on success and 0 if no weight is set.
     */
    #[Pure]
    public function getFontWeight() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Frees all associated resources
     * @link https://php.net/manual/en/imagickdraw.destroy.php
     * @return bool No value is returned.
     */
    public function destroy() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws a rectangle
     * @link https://php.net/manual/en/imagickdraw.rectangle.php
     * @param float $x1 <p>
     * x coordinate of the top left corner
     * </p>
     * @param float $y1 <p>
     * y coordinate of the top left corner
     * </p>
     * @param float $x2 <p>
     * x coordinate of the bottom right corner
     * </p>
     * @param float $y2 <p>
     * y coordinate of the bottom right corner
     * </p>
     * @return bool No value is returned.
     */
    public function rectangle($x1, $y1, $x2, $y2) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws a rounded rectangle
     * @link https://php.net/manual/en/imagickdraw.roundrectangle.php
     * @param float $x1 <p>
     * x coordinate of the top left corner
     * </p>
     * @param float $y1 <p>
     * y coordinate of the top left corner
     * </p>
     * @param float $x2 <p>
     * x coordinate of the bottom right
     * </p>
     * @param float $y2 <p>
     * y coordinate of the bottom right
     * </p>
     * @param float $rx <p>
     * x rounding
     * </p>
     * @param float $ry <p>
     * y rounding
     * </p>
     * @return bool No value is returned.
     */
    public function roundRectangle($x1, $y1, $x2, $y2, $rx, $ry) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws an ellipse on the image
     * @link https://php.net/manual/en/imagickdraw.ellipse.php
     * @param float $ox
     * @param float $oy
     * @param float $rx
     * @param float $ry
     * @param float $start
     * @param float $end
     * @return bool No value is returned.
     */
    public function ellipse($ox, $oy, $rx, $ry, $start, $end) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Skews the current coordinate system in the horizontal direction
     * @link https://php.net/manual/en/imagickdraw.skewx.php
     * @param float $degrees <p>
     * degrees to skew
     * </p>
     * @return bool No value is returned.
     */
    public function skewX($degrees) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Skews the current coordinate system in the vertical direction
     * @link https://php.net/manual/en/imagickdraw.skewy.php
     * @param float $degrees <p>
     * degrees to skew
     * </p>
     * @return bool No value is returned.
     */
    public function skewY($degrees) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Applies a translation to the current coordinate system
     * @link https://php.net/manual/en/imagickdraw.translate.php
     * @param float $x <p>
     * horizontal translation
     * </p>
     * @param float $y <p>
     * vertical translation
     * </p>
     * @return bool No value is returned.
     */
    public function translate($x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws a line
     * @link https://php.net/manual/en/imagickdraw.line.php
     * @param float $sx <p>
     * starting x coordinate
     * </p>
     * @param float $sy <p>
     * starting y coordinate
     * </p>
     * @param float $ex <p>
     * ending x coordinate
     * </p>
     * @param float $ey <p>
     * ending y coordinate
     * </p>
     * @return bool No value is returned.
     */
    public function line($sx, $sy, $ex, $ey) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws an arc
     * @link https://php.net/manual/en/imagickdraw.arc.php
     * @param float $sx <p>
     * Starting x ordinate of bounding rectangle
     * </p>
     * @param float $sy <p>
     * starting y ordinate of bounding rectangle
     * </p>
     * @param float $ex <p>
     * ending x ordinate of bounding rectangle
     * </p>
     * @param float $ey <p>
     * ending y ordinate of bounding rectangle
     * </p>
     * @param float $sd <p>
     * starting degrees of rotation
     * </p>
     * @param float $ed <p>
     * ending degrees of rotation
     * </p>
     * @return bool No value is returned.
     */
    public function arc($sx, $sy, $ex, $ey, $sd, $ed) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Paints on the image's opacity channel
     * @link https://php.net/manual/en/imagickdraw.matte.php
     * @param float $x <p>
     * x coordinate of the matte
     * </p>
     * @param float $y <p>
     * y coordinate of the matte
     * </p>
     * @param int $paintMethod <p>
     * PAINT_ constant
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function matte($x, $y, $paintMethod) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws a polygon
     * @link https://php.net/manual/en/imagickdraw.polygon.php
     * @param array $coordinates <p>
     * multidimensional array like array( array( 'x' => 3, 'y' => 4 ), array( 'x' => 2, 'y' => 6 ) );
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickDrawException on error.
     */
    public function polygon(array $coordinates) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws a point
     * @link https://php.net/manual/en/imagickdraw.point.php
     * @param float $x <p>
     * point's x coordinate
     * </p>
     * @param float $y <p>
     * point's y coordinate
     * </p>
     * @return bool No value is returned.
     */
    public function point($x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the text decoration
     * @link https://php.net/manual/en/imagickdraw.gettextdecoration.php
     * @return int one of the DECORATION_ constants
     * and 0 if no decoration is set.
     */
    #[Pure]
    public function getTextDecoration() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the code set used for text annotations
     * @link https://php.net/manual/en/imagickdraw.gettextencoding.php
     * @return string a string specifying the code set
     * or false if text encoding is not set.
     */
    #[Pure]
    public function getTextEncoding() {}

    #[Pure]
    public function getFontStretch() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the font stretch to use when annotating with text
     * @link https://php.net/manual/en/imagickdraw.setfontstretch.php
     * @param int $fontStretch <p>
     * STRETCH_ constant
     * </p>
     * @return bool No value is returned.
     */
    public function setFontStretch($fontStretch) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Controls whether stroked outlines are antialiased
     * @link https://php.net/manual/en/imagickdraw.setstrokeantialias.php
     * @param bool $stroke_antialias <p>
     * the antialias setting
     * </p>
     * @return bool No value is returned.
     */
    public function setStrokeAntialias($stroke_antialias) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Specifies a text alignment
     * @link https://php.net/manual/en/imagickdraw.settextalignment.php
     * @param int $alignment <p>
     * ALIGN_ constant
     * </p>
     * @return bool No value is returned.
     */
    public function setTextAlignment($alignment) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Specifies a decoration
     * @link https://php.net/manual/en/imagickdraw.settextdecoration.php
     * @param int $decoration <p>
     * DECORATION_ constant
     * </p>
     * @return bool No value is returned.
     */
    public function setTextDecoration($decoration) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Specifies the color of a background rectangle
     * @link https://php.net/manual/en/imagickdraw.settextundercolor.php
     * @param ImagickPixel $under_color <p>
     * the under color
     * </p>
     * @return bool No value is returned.
     * @throws ImagickDrawException on error.
     */
    public function setTextUnderColor(ImagickPixel $under_color) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the overall canvas size
     * @link https://php.net/manual/en/imagickdraw.setviewbox.php
     * @param int $x1 <p>
     * left x coordinate
     * </p>
     * @param int $y1 <p>
     * left y coordinate
     * </p>
     * @param int $x2 <p>
     * right x coordinate
     * </p>
     * @param int $y2 <p>
     * right y coordinate
     * </p>
     * @return bool No value is returned.
     */
    public function setViewbox($x1, $y1, $x2, $y2) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Adjusts the current affine transformation matrix
     * @link https://php.net/manual/en/imagickdraw.affine.php
     * @param array $affine <p>
     * Affine matrix parameters
     * </p>
     * @return bool No value is returned.
     * @throws ImagickDrawException on error.
     */
    public function affine(array $affine) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws a bezier curve
     * @link https://php.net/manual/en/imagickdraw.bezier.php
     * @param array $coordinates <p>
     * Multidimensional array like array( array( 'x' => 1, 'y' => 2 ),
     * array( 'x' => 3, 'y' => 4 ) )
     * </p>
     * @return bool No value is returned.
     * @throws ImagickDrawException on error.
     */
    public function bezier(array $coordinates) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Composites an image onto the current image
     * @link https://php.net/manual/en/imagickdraw.composite.php
     * @param int $compose <p>
     * composition operator. One of COMPOSITE_ constants
     * </p>
     * @param float $x <p>
     * x coordinate of the top left corner
     * </p>
     * @param float $y <p>
     * y coordinate of the top left corner
     * </p>
     * @param float $width <p>
     * width of the composition image
     * </p>
     * @param float $height <p>
     * height of the composition image
     * </p>
     * @param Imagick $compositeWand <p>
     * the Imagick object where composition image is taken from
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickException on error.
     */
    public function composite($compose, $x, $y, $width, $height, Imagick $compositeWand) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws color on image
     * @link https://php.net/manual/en/imagickdraw.color.php
     * @param float $x <p>
     * x coordinate of the paint
     * </p>
     * @param float $y <p>
     * y coordinate of the paint
     * </p>
     * @param int $paintMethod <p>
     * one of the PAINT_ constants
     * </p>
     * @return bool No value is returned.
     */
    public function color($x, $y, $paintMethod) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Adds a comment
     * @link https://php.net/manual/en/imagickdraw.comment.php
     * @param string $comment <p>
     * The comment string to add to vector output stream
     * </p>
     * @return bool No value is returned.
     */
    public function comment($comment) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Obtains the current clipping path ID
     * @link https://php.net/manual/en/imagickdraw.getclippath.php
     * @return string|false a string containing the clip path ID or false if no clip path exists.
     */
    #[Pure]
    public function getClipPath() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the current polygon fill rule
     * @link https://php.net/manual/en/imagickdraw.getcliprule.php
     * @return int one of the FILLRULE_ constants.
     */
    #[Pure]
    public function getClipRule() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the interpretation of clip path units
     * @link https://php.net/manual/en/imagickdraw.getclipunits.php
     * @return int an int on success.
     */
    #[Pure]
    public function getClipUnits() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the fill color
     * @link https://php.net/manual/en/imagickdraw.getfillcolor.php
     * @return ImagickPixel an ImagickPixel object.
     */
    #[Pure]
    public function getFillColor() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the opacity used when drawing
     * @link https://php.net/manual/en/imagickdraw.getfillopacity.php
     * @return float The opacity.
     */
    #[Pure]
    public function getFillOpacity() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the fill rule
     * @link https://php.net/manual/en/imagickdraw.getfillrule.php
     * @return int a FILLRULE_ constant
     */
    #[Pure]
    public function getFillRule() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the text placement gravity
     * @link https://php.net/manual/en/imagickdraw.getgravity.php
     * @return int a GRAVITY_ constant on success and 0 if no gravity is set.
     */
    #[Pure]
    public function getGravity() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the current stroke antialias setting
     * @link https://php.net/manual/en/imagickdraw.getstrokeantialias.php
     * @return bool <b>TRUE</b> if antialiasing is on and false if it is off.
     */
    #[Pure]
    public function getStrokeAntialias() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the color used for stroking object outlines
     * @link https://php.net/manual/en/imagickdraw.getstrokecolor.php
     * @return ImagickPixel an ImagickPixel object which describes the color.
     */
    #[Pure]
    public function getStrokeColor() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns an array representing the pattern of dashes and gaps used to stroke paths
     * @link https://php.net/manual/en/imagickdraw.getstrokedasharray.php
     * @return array an array on success and empty array if not set.
     */
    #[Pure]
    public function getStrokeDashArray() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the offset into the dash pattern to start the dash
     * @link https://php.net/manual/en/imagickdraw.getstrokedashoffset.php
     * @return float a float representing the offset and 0 if it's not set.
     */
    #[Pure]
    public function getStrokeDashOffset() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the shape to be used at the end of open subpaths when they are stroked
     * @link https://php.net/manual/en/imagickdraw.getstrokelinecap.php
     * @return int one of the LINECAP_ constants or 0 if stroke linecap is not set.
     */
    #[Pure]
    public function getStrokeLineCap() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the shape to be used at the corners of paths when they are stroked
     * @link https://php.net/manual/en/imagickdraw.getstrokelinejoin.php
     * @return int one of the LINEJOIN_ constants or 0 if stroke line join is not set.
     */
    #[Pure]
    public function getStrokeLineJoin() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the stroke miter limit
     * @link https://php.net/manual/en/imagickdraw.getstrokemiterlimit.php
     * @return int an int describing the miter limit
     * and 0 if no miter limit is set.
     */
    #[Pure]
    public function getStrokeMiterLimit() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the opacity of stroked object outlines
     * @link https://php.net/manual/en/imagickdraw.getstrokeopacity.php
     * @return float a float describing the opacity.
     */
    #[Pure]
    public function getStrokeOpacity() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the width of the stroke used to draw object outlines
     * @link https://php.net/manual/en/imagickdraw.getstrokewidth.php
     * @return float a float describing the stroke width.
     */
    #[Pure]
    public function getStrokeWidth() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the text alignment
     * @link https://php.net/manual/en/imagickdraw.gettextalignment.php
     * @return int one of the ALIGN_ constants and 0 if no align is set.
     */
    #[Pure]
    public function getTextAlignment() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the current text antialias setting
     * @link https://php.net/manual/en/imagickdraw.gettextantialias.php
     * @return bool <b>TRUE</b> if text is antialiased and false if not.
     */
    #[Pure]
    public function getTextAntialias() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns a string containing vector graphics
     * @link https://php.net/manual/en/imagickdraw.getvectorgraphics.php
     * @return string a string containing the vector graphics.
     */
    #[Pure]
    public function getVectorGraphics() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the text under color
     * @link https://php.net/manual/en/imagickdraw.gettextundercolor.php
     * @return ImagickPixel an ImagickPixel object describing the color.
     * @throws ImagickDrawException on error.
     */
    #[Pure]
    public function getTextUnderColor() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Adds a path element to the current path
     * @link https://php.net/manual/en/imagickdraw.pathclose.php
     * @return bool No value is returned.
     */
    public function pathClose() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws a cubic Bezier curve
     * @link https://php.net/manual/en/imagickdraw.pathcurvetoabsolute.php
     * @param float $x1 <p>
     * x coordinate of the first control point
     * </p>
     * @param float $y1 <p>
     * y coordinate of the first control point
     * </p>
     * @param float $x2 <p>
     * x coordinate of the second control point
     * </p>
     * @param float $y2 <p>
     * y coordinate of the first control point
     * </p>
     * @param float $x <p>
     * x coordinate of the curve end
     * </p>
     * @param float $y <p>
     * y coordinate of the curve end
     * </p>
     * @return bool No value is returned.
     */
    public function pathCurveToAbsolute($x1, $y1, $x2, $y2, $x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws a cubic Bezier curve
     * @link https://php.net/manual/en/imagickdraw.pathcurvetorelative.php
     * @param float $x1 <p>
     * x coordinate of starting control point
     * </p>
     * @param float $y1 <p>
     * y coordinate of starting control point
     * </p>
     * @param float $x2 <p>
     * x coordinate of ending control point
     * </p>
     * @param float $y2 <p>
     * y coordinate of ending control point
     * </p>
     * @param float $x <p>
     * ending x coordinate
     * </p>
     * @param float $y <p>
     * ending y coordinate
     * </p>
     * @return bool No value is returned.
     */
    public function pathCurveToRelative($x1, $y1, $x2, $y2, $x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws a quadratic Bezier curve
     * @link https://php.net/manual/en/imagickdraw.pathcurvetoquadraticbezierabsolute.php
     * @param float $x1 <p>
     * x coordinate of the control point
     * </p>
     * @param float $y1 <p>
     * y coordinate of the control point
     * </p>
     * @param float $x <p>
     * x coordinate of the end point
     * </p>
     * @param float $y <p>
     * y coordinate of the end point
     * </p>
     * @return bool No value is returned.
     */
    public function pathCurveToQuadraticBezierAbsolute($x1, $y1, $x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws a quadratic Bezier curve
     * @link https://php.net/manual/en/imagickdraw.pathcurvetoquadraticbezierrelative.php
     * @param float $x1 <p>
     * starting x coordinate
     * </p>
     * @param float $y1 <p>
     * starting y coordinate
     * </p>
     * @param float $x <p>
     * ending x coordinate
     * </p>
     * @param float $y <p>
     * ending y coordinate
     * </p>
     * @return bool No value is returned.
     */
    public function pathCurveToQuadraticBezierRelative($x1, $y1, $x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws a quadratic Bezier curve
     * @link https://php.net/manual/en/imagickdraw.pathcurvetoquadraticbeziersmoothabsolute.php
     * @param float $x <p>
     * ending x coordinate
     * </p>
     * @param float $y <p>
     * ending y coordinate
     * </p>
     * @return bool No value is returned.
     */
    public function pathCurveToQuadraticBezierSmoothAbsolute($x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws a quadratic Bezier curve
     * @link https://php.net/manual/en/imagickdraw.pathcurvetoquadraticbeziersmoothrelative.php
     * @param float $x <p>
     * ending x coordinate
     * </p>
     * @param float $y <p>
     * ending y coordinate
     * </p>
     * @return bool No value is returned.
     */
    public function pathCurveToQuadraticBezierSmoothRelative($x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws a cubic Bezier curve
     * @link https://php.net/manual/en/imagickdraw.pathcurvetosmoothabsolute.php
     * @param float $x2 <p>
     * x coordinate of the second control point
     * </p>
     * @param float $y2 <p>
     * y coordinate of the second control point
     * </p>
     * @param float $x <p>
     * x coordinate of the ending point
     * </p>
     * @param float $y <p>
     * y coordinate of the ending point
     * </p>
     * @return bool No value is returned.
     */
    public function pathCurveToSmoothAbsolute($x2, $y2, $x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws a cubic Bezier curve
     * @link https://php.net/manual/en/imagickdraw.pathcurvetosmoothrelative.php
     * @param float $x2 <p>
     * x coordinate of the second control point
     * </p>
     * @param float $y2 <p>
     * y coordinate of the second control point
     * </p>
     * @param float $x <p>
     * x coordinate of the ending point
     * </p>
     * @param float $y <p>
     * y coordinate of the ending point
     * </p>
     * @return bool No value is returned.
     */
    public function pathCurveToSmoothRelative($x2, $y2, $x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws an elliptical arc
     * @link https://php.net/manual/en/imagickdraw.pathellipticarcabsolute.php
     * @param float $rx <p>
     * x radius
     * </p>
     * @param float $ry <p>
     * y radius
     * </p>
     * @param float $x_axis_rotation <p>
     * x axis rotation
     * </p>
     * @param bool $large_arc_flag <p>
     * large arc flag
     * </p>
     * @param bool $sweep_flag <p>
     * sweep flag
     * </p>
     * @param float $x <p>
     * x coordinate
     * </p>
     * @param float $y <p>
     * y coordinate
     * </p>
     * @return bool No value is returned.
     */
    public function pathEllipticArcAbsolute($rx, $ry, $x_axis_rotation, $large_arc_flag, $sweep_flag, $x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws an elliptical arc
     * @link https://php.net/manual/en/imagickdraw.pathellipticarcrelative.php
     * @param float $rx <p>
     * x radius
     * </p>
     * @param float $ry <p>
     * y radius
     * </p>
     * @param float $x_axis_rotation <p>
     * x axis rotation
     * </p>
     * @param bool $large_arc_flag <p>
     * large arc flag
     * </p>
     * @param bool $sweep_flag <p>
     * sweep flag
     * </p>
     * @param float $x <p>
     * x coordinate
     * </p>
     * @param float $y <p>
     * y coordinate
     * </p>
     * @return bool No value is returned.
     */
    public function pathEllipticArcRelative($rx, $ry, $x_axis_rotation, $large_arc_flag, $sweep_flag, $x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Terminates the current path
     * @link https://php.net/manual/en/imagickdraw.pathfinish.php
     * @return bool No value is returned.
     */
    public function pathFinish() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws a line path
     * @link https://php.net/manual/en/imagickdraw.pathlinetoabsolute.php
     * @param float $x <p>
     * starting x coordinate
     * </p>
     * @param float $y <p>
     * ending x coordinate
     * </p>
     * @return bool No value is returned.
     */
    public function pathLineToAbsolute($x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws a line path
     * @link https://php.net/manual/en/imagickdraw.pathlinetorelative.php
     * @param float $x <p>
     * starting x coordinate
     * </p>
     * @param float $y <p>
     * starting y coordinate
     * </p>
     * @return bool No value is returned.
     */
    public function pathLineToRelative($x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws a horizontal line path
     * @link https://php.net/manual/en/imagickdraw.pathlinetohorizontalabsolute.php
     * @param float $x <p>
     * x coordinate
     * </p>
     * @return bool No value is returned.
     */
    public function pathLineToHorizontalAbsolute($x) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws a horizontal line
     * @link https://php.net/manual/en/imagickdraw.pathlinetohorizontalrelative.php
     * @param float $x <p>
     * x coordinate
     * </p>
     * @return bool No value is returned.
     */
    public function pathLineToHorizontalRelative($x) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws a vertical line
     * @link https://php.net/manual/en/imagickdraw.pathlinetoverticalabsolute.php
     * @param float $y <p>
     * y coordinate
     * </p>
     * @return bool No value is returned.
     */
    public function pathLineToVerticalAbsolute($y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws a vertical line path
     * @link https://php.net/manual/en/imagickdraw.pathlinetoverticalrelative.php
     * @param float $y <p>
     * y coordinate
     * </p>
     * @return bool No value is returned.
     */
    public function pathLineToVerticalRelative($y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Starts a new sub-path
     * @link https://php.net/manual/en/imagickdraw.pathmovetoabsolute.php
     * @param float $x <p>
     * x coordinate of the starting point
     * </p>
     * @param float $y <p>
     * y coordinate of the starting point
     * </p>
     * @return bool No value is returned.
     */
    public function pathMoveToAbsolute($x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Starts a new sub-path
     * @link https://php.net/manual/en/imagickdraw.pathmovetorelative.php
     * @param float $x <p>
     * target x coordinate
     * </p>
     * @param float $y <p>
     * target y coordinate
     * </p>
     * @return bool No value is returned.
     */
    public function pathMoveToRelative($x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Declares the start of a path drawing list
     * @link https://php.net/manual/en/imagickdraw.pathstart.php
     * @return bool No value is returned.
     */
    public function pathStart() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Draws a polyline
     * @link https://php.net/manual/en/imagickdraw.polyline.php
     * @param array $coordinates <p>
     * array of x and y coordinates: array( array( 'x' => 4, 'y' => 6 ), array( 'x' => 8, 'y' => 10 ) )
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickDrawException on error.
     */
    public function polyline(array $coordinates) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Terminates a clip path definition
     * @link https://php.net/manual/en/imagickdraw.popclippath.php
     * @return bool No value is returned.
     */
    public function popClipPath() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Terminates a definition list
     * @link https://php.net/manual/en/imagickdraw.popdefs.php
     * @return bool No value is returned.
     */
    public function popDefs() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Terminates a pattern definition
     * @link https://php.net/manual/en/imagickdraw.poppattern.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @throws ImagickException on error.
     */
    public function popPattern() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Starts a clip path definition
     * @link https://php.net/manual/en/imagickdraw.pushclippath.php
     * @param string $clip_mask_id <p>
     * Clip mask Id
     * </p>
     * @return bool No value is returned.
     */
    public function pushClipPath($clip_mask_id) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Indicates that following commands create named elements for early processing
     * @link https://php.net/manual/en/imagickdraw.pushdefs.php
     * @return bool No value is returned.
     */
    public function pushDefs() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Indicates that subsequent commands up to a ImagickDraw::opPattern() command comprise the definition of a named pattern
     * @link https://php.net/manual/en/imagickdraw.pushpattern.php
     * @param string $pattern_id <p>
     * the pattern Id
     * </p>
     * @param float $x <p>
     * x coordinate of the top-left corner
     * </p>
     * @param float $y <p>
     * y coordinate of the top-left corner
     * </p>
     * @param float $width <p>
     * width of the pattern
     * </p>
     * @param float $height <p>
     * height of the pattern
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function pushPattern($pattern_id, $x, $y, $width, $height) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Renders all preceding drawing commands onto the image
     * @link https://php.net/manual/en/imagickdraw.render.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @throws ImagickException on error.
     */
    public function render() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Applies the specified rotation to the current coordinate space
     * @link https://php.net/manual/en/imagickdraw.rotate.php
     * @param float $degrees <p>
     * degrees to rotate
     * </p>
     * @return bool No value is returned.
     */
    public function rotate($degrees) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Adjusts the scaling factor
     * @link https://php.net/manual/en/imagickdraw.scale.php
     * @param float $x <p>
     * horizontal factor
     * </p>
     * @param float $y <p>
     * vertical factor
     * </p>
     * @return bool No value is returned.
     */
    public function scale($x, $y) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Associates a named clipping path with the image
     * @link https://php.net/manual/en/imagickdraw.setclippath.php
     * @param string $clip_mask <p>
     * the clipping path name
     * </p>
     * @return bool No value is returned.
     * @throws ImagickException on error.
     */
    public function setClipPath($clip_mask) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Set the polygon fill rule to be used by the clipping path
     * @link https://php.net/manual/en/imagickdraw.setcliprule.php
     * @param int $fill_rule <p>
     * FILLRULE_ constant
     * </p>
     * @return bool No value is returned.
     */
    public function setClipRule($fill_rule) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the interpretation of clip path units
     * @link https://php.net/manual/en/imagickdraw.setclipunits.php
     * @param int $clip_units <p>
     * the number of clip units
     * </p>
     * @return bool No value is returned.
     */
    public function setClipUnits($clip_units) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the opacity to use when drawing using the fill color or fill texture
     * @link https://php.net/manual/en/imagickdraw.setfillopacity.php
     * @param float $fillOpacity <p>
     * the fill opacity
     * </p>
     * @return bool No value is returned.
     */
    public function setFillOpacity($fillOpacity) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the URL to use as a fill pattern for filling objects
     * @link https://php.net/manual/en/imagickdraw.setfillpatternurl.php
     * @param string $fill_url <p>
     * URL to use to obtain fill pattern.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @throws ImagickException on error.
     */
    public function setFillPatternURL($fill_url) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the fill rule to use while drawing polygons
     * @link https://php.net/manual/en/imagickdraw.setfillrule.php
     * @param int $fill_rule <p>
     * FILLRULE_ constant
     * </p>
     * @return bool No value is returned.
     */
    public function setFillRule($fill_rule) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the text placement gravity
     * @link https://php.net/manual/en/imagickdraw.setgravity.php
     * @param int $gravity <p>
     * GRAVITY_ constant
     * </p>
     * @return bool No value is returned.
     */
    public function setGravity($gravity) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the pattern used for stroking object outlines
     * @link https://php.net/manual/en/imagickdraw.setstrokepatternurl.php
     * @param string $stroke_url <p>
     * stroke URL
     * </p>
     * @return bool imagick.imagickdraw.return.success;
     * @throws ImagickException on error.
     */
    public function setStrokePatternURL($stroke_url) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Specifies the offset into the dash pattern to start the dash
     * @link https://php.net/manual/en/imagickdraw.setstrokedashoffset.php
     * @param float $dash_offset <p>
     * dash offset
     * </p>
     * @return bool No value is returned.
     */
    public function setStrokeDashOffset($dash_offset) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Specifies the shape to be used at the end of open subpaths when they are stroked
     * @link https://php.net/manual/en/imagickdraw.setstrokelinecap.php
     * @param int $linecap <p>
     * LINECAP_ constant
     * </p>
     * @return bool No value is returned.
     */
    public function setStrokeLineCap($linecap) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Specifies the shape to be used at the corners of paths when they are stroked
     * @link https://php.net/manual/en/imagickdraw.setstrokelinejoin.php
     * @param int $linejoin <p>
     * LINEJOIN_ constant
     * </p>
     * @return bool No value is returned.
     */
    public function setStrokeLineJoin($linejoin) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Specifies the miter limit
     * @link https://php.net/manual/en/imagickdraw.setstrokemiterlimit.php
     * @param int $miterlimit <p>
     * the miter limit
     * </p>
     * @return bool No value is returned.
     */
    public function setStrokeMiterLimit($miterlimit) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Specifies the opacity of stroked object outlines
     * @link https://php.net/manual/en/imagickdraw.setstrokeopacity.php
     * @param float $stroke_opacity <p>
     * stroke opacity. 1.0 is fully opaque
     * </p>
     * @return bool No value is returned.
     */
    public function setStrokeOpacity($stroke_opacity) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the vector graphics
     * @link https://php.net/manual/en/imagickdraw.setvectorgraphics.php
     * @param string $xml <p>
     * xml containing the vector graphics
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function setVectorGraphics($xml) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Destroys the current ImagickDraw in the stack, and returns to the previously pushed ImagickDraw
     * @link https://php.net/manual/en/imagickdraw.pop.php
     * @return bool <b>TRUE</b> on success and false on failure.
     * @throws ImagickException on error.
     */
    public function pop() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Clones the current ImagickDraw and pushes it to the stack
     * @link https://php.net/manual/en/imagickdraw.push.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @throws ImagickException on error.
     */
    public function push() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Specifies the pattern of dashes and gaps used to stroke paths
     * @link https://php.net/manual/en/imagickdraw.setstrokedasharray.php
     * @param array $dashArray <p>
     * array of floats
     * </p>
     * @return bool <b>TRUE</b> on success.
     */
    public function setStrokeDashArray(array $dashArray) {}

    /**
     * Sets the opacity to use when drawing using the fill or stroke color or texture. Fully opaque is 1.0.
     *
     * @param float $opacity
     * @return void
     * @since 3.4.1
     */
    public function setOpacity($opacity) {}

    /**
     * Returns the opacity used when drawing with the fill or stroke color or texture. Fully opaque is 1.0.
     *
     * @return float
     * @since 3.4.1
     */
    #[Pure]
    public function getOpacity() {}

    /**
     * Sets the image font resolution.
     *
     * @param float $x
     * @param float $y
     * @return bool
     * @throws ImagickException on error.
     * @since 3.4.1
     */
    public function setFontResolution($x, $y) {}

    /**
     * Gets the image X and Y resolution.
     *
     * @return array
     * @throws ImagickException on error.
     * @since 3.4.1
     */
    #[Pure]
    public function getFontResolution() {}

    /**
     * Returns the direction that will be used when annotating with text.
     * @return bool
     * @since 3.4.1
     */
    #[Pure]
    public function getTextDirection() {}

    /**
     * Sets the font style to use when annotating with text. The AnyStyle enumeration acts as a wild-card "don't care" option.
     *
     * @param int $direction
     * @return bool
     * @since 3.4.1
     */
    public function setTextDirection($direction) {}

    /**
     * Returns the border color used for drawing bordered objects.
     *
     * @return ImagickPixel
     * @since 3.4.1
     */
    #[Pure]
    public function getBorderColor() {}

    /**
     * Sets the border color to be used for drawing bordered objects.
     * @param ImagickPixel $color
     * @return bool
     * @throws ImagickDrawException on error.
     * @since 3.4.1
     */
    public function setBorderColor(ImagickPixel $color) {}

    /**
     * Obtains the vertical and horizontal resolution.
     *
     * @return string|null
     * @since 3.4.1
     */
    #[Pure]
    public function getDensity() {}

    /**
     * Sets the vertical and horizontal resolution.
     * @param string $density_string
     * @return bool
     * @throws ImagickException on error.
     * @since 3.4.1
     */
    public function setDensity($density_string) {}
}

/**
 * @link https://php.net/manual/en/class.imagickpixeliterator.php
 */
class ImagickPixelIterator implements Iterator
{
    /**
     * (PECL imagick 2.0.0)<br/>
     * The ImagickPixelIterator constructor
     * @link https://php.net/manual/en/imagickpixeliterator.construct.php
     * @param Imagick $wand
     * @throws ImagickPixelIteratorException on error.
     * @throws ImagickException on error.
     */
    public function __construct(Imagick $wand) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns a new pixel iterator
     * @link https://php.net/manual/en/imagickpixeliterator.newpixeliterator.php
     * @param Imagick $wand
     * @return bool <b>TRUE</b> on success. Throwing ImagickPixelIteratorException.
     * @throws ImagickPixelIteratorException
     * @throws ImagickException
     */
    #[Deprecated(replacement: "%class%->getPixelIterator(%parametersList%)")]
    public function newPixelIterator(Imagick $wand) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns a new pixel iterator
     * @link https://php.net/manual/en/imagickpixeliterator.newpixelregioniterator.php
     * @param Imagick $wand
     * @param int $x
     * @param int $y
     * @param int $columns
     * @param int $rows
     * @return bool a new ImagickPixelIterator on success; on failure, throws ImagickPixelIteratorException
     * @throws ImagickPixelIteratorException
     * @throws ImagickException
     */
    #[Deprecated(replacement: "%class%->getPixelRegionIterator(%parametersList%)")]
    public function newPixelRegionIterator(Imagick $wand, $x, $y, $columns, $rows) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the current pixel iterator row
     * @link https://php.net/manual/en/imagickpixeliterator.getiteratorrow.php
     * @return int the integer offset of the row, throwing ImagickPixelIteratorException on error.
     * @throws ImagickPixelIteratorException on error
     */
    #[Pure]
    public function getIteratorRow() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Set the pixel iterator row
     * @link https://php.net/manual/en/imagickpixeliterator.setiteratorrow.php
     * @param int $row
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickPixelIteratorException on error.
     */
    public function setIteratorRow($row) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the pixel iterator to the first pixel row
     * @link https://php.net/manual/en/imagickpixeliterator.setiteratorfirstrow.php
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickPixelIteratorException on error.
     */
    public function setIteratorFirstRow() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the pixel iterator to the last pixel row
     * @link https://php.net/manual/en/imagickpixeliterator.setiteratorlastrow.php
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickPixelIteratorException on error.
     */
    public function setIteratorLastRow() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the previous row
     * @link https://php.net/manual/en/imagickpixeliterator.getpreviousiteratorrow.php
     * @return array the previous row as an array of ImagickPixelWand objects from the
     * ImagickPixelIterator, throwing ImagickPixelIteratorException on error.
     * @throws ImagickPixelIteratorException on error
     */
    #[Pure]
    public function getPreviousIteratorRow() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the current row of ImagickPixel objects
     * @link https://php.net/manual/en/imagickpixeliterator.getcurrentiteratorrow.php
     * @return array a row as an array of ImagickPixel objects that can themselves be iterated.
     * @throws ImagickPixelIteratorException on error.
     */
    #[Pure]
    public function getCurrentIteratorRow() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the next row of the pixel iterator
     * @link https://php.net/manual/en/imagickpixeliterator.getnextiteratorrow.php
     * @return array the next row as an array of ImagickPixel objects, throwing
     * ImagickPixelIteratorException on error.
     * @throws ImagickPixelIteratorException on error
     */
    #[Pure]
    public function getNextIteratorRow() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Resets the pixel iterator
     * @link https://php.net/manual/en/imagickpixeliterator.resetiterator.php
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickPixelIteratorException on error.
     */
    public function resetIterator() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Syncs the pixel iterator
     * @link https://php.net/manual/en/imagickpixeliterator.synciterator.php
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickPixelIteratorException on error.
     */
    public function syncIterator() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Deallocates resources associated with a PixelIterator
     * @link https://php.net/manual/en/imagickpixeliterator.destroy.php
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickPixelIteratorException on error.
     */
    public function destroy() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Clear resources associated with a PixelIterator
     * @link https://php.net/manual/en/imagickpixeliterator.clear.php
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickPixelIteratorException on error.
     */
    public function clear() {}

    /**
     * @param Imagick $Imagick
     * @throws ImagickPixelIteratorException on error.
     * @throws ImagickException on error.
     */
    public static function getpixeliterator(Imagick $Imagick) {}

    /**
     * @param Imagick $Imagick
     * @param $x
     * @param $y
     * @param $columns
     * @param $rows
     * @throws ImagickPixelIteratorException on error.
     * @throws ImagickException on error.
     */
    public static function getpixelregioniterator(Imagick $Imagick, $x, $y, $columns, $rows) {}

    /**
     * @throws ImagickPixelIteratorException on error.
     */
    public function key() {}

    /**
     * @throws ImagickPixelIteratorException on error.
     */
    public function next() {}

    /**
     * @throws ImagickPixelIteratorException on error.
     */
    public function rewind() {}

    /**
     * @throws ImagickPixelIteratorException on error.
     */
    public function current() {}

    /**
     * @throws ImagickPixelIteratorException on error.
     */
    public function valid() {}
}

/**
 * @method clone()
 * @link https://php.net/manual/en/class.imagickpixel.php
 */
class ImagickPixel
{
    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the normalized HSL color of the ImagickPixel object
     * @link https://php.net/manual/en/imagickpixel.gethsl.php
     * @return float[] the HSL value in an array with the keys "hue",
     * "saturation", and "luminosity". Throws ImagickPixelException on failure.
     * @throws ImagickPixelException on failure
     */
    #[ArrayShape(["hue" => "float", "saturation" => "float", "luminosity" => "float"])]
    #[Pure]
    public function getHSL() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the normalized HSL color
     * @link https://php.net/manual/en/imagickpixel.sethsl.php
     * @param float $hue <p>
     * The normalized value for hue, described as a fractional arc
     * (between 0 and 1) of the hue circle, where the zero value is
     * red.
     * </p>
     * @param float $saturation <p>
     * The normalized value for saturation, with 1 as full saturation.
     * </p>
     * @param float $luminosity <p>
     * The normalized value for luminosity, on a scale from black at
     * 0 to white at 1, with the full HS value at 0.5 luminosity.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickPixelException on failure
     */
    public function setHSL($hue, $saturation, $luminosity) {}

    /**
     * @throws ImagickPixelException on failure
     */
    #[Pure]
    public function getColorValueQuantum() {}

    /**
     * @param $color_value
     * @throws ImagickPixelException on failure
     */
    public function setColorValueQuantum($color_value) {}

    /**
     * Gets the colormap index of the pixel wand.
     * @throws ImagickPixelException on failure
     */
    #[Pure]
    public function getIndex() {}

    /**
     * @param int $index
     * @throws ImagickPixelException on failure
     */
    public function setIndex($index) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * The ImagickPixel constructor
     * @link https://php.net/manual/en/imagickpixel.construct.php
     * @param string $color [optional] <p>
     * The optional color string to use as the initial value of this object.
     * </p>
     * @throws ImagickPixelException on failure
     */
    public function __construct($color = null) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the color
     * @link https://php.net/manual/en/imagickpixel.setcolor.php
     * @param string $color <p>
     * The color definition to use in order to initialise the
     * ImagickPixel object.
     * </p>
     * @return bool <b>TRUE</b> if the specified color was set, <b>FALSE</b> otherwise.
     * @throws ImagickPixelException on failure
     */
    public function setColor($color) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Sets the normalized value of one of the channels
     * @link https://php.net/manual/en/imagickpixel.setcolorvalue.php
     * @param int $color <p>
     * One of the Imagick color constants e.g. \Imagick::COLOR_GREEN or \Imagick::COLOR_ALPHA.
     * </p>
     * @param float $value <p>
     * The value to set this channel to, ranging from 0 to 1.
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickPixelException on failure
     */
    public function setColorValue($color, $value) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Gets the normalized value of the provided color channel
     * @link https://php.net/manual/en/imagickpixel.getcolorvalue.php
     * @param int $color <p>
     * The color to get the value of, specified as one of the Imagick color
     * constants. This can be one of the RGB colors, CMYK colors, alpha and
     * opacity e.g (Imagick::COLOR_BLUE, Imagick::COLOR_MAGENTA).
     * </p>
     * @return float The value of the channel, as a normalized floating-point number, throwing
     * ImagickPixelException on error.
     * @throws ImagickPixelException on error
     */
    #[Pure]
    public function getColorValue($color) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Clears resources associated with this object
     * @link https://php.net/manual/en/imagickpixel.clear.php
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickPixelException on failure
     */
    public function clear() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Deallocates resources associated with this object
     * @link https://php.net/manual/en/imagickpixel.destroy.php
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickPixelException on failure
     */
    public function destroy() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Check the distance between this color and another
     * @link https://php.net/manual/en/imagickpixel.issimilar.php
     * @param ImagickPixel $color <p>
     * The ImagickPixel object to compare this object against.
     * </p>
     * @param float $fuzz <p>
     * The maximum distance within which to consider these colors as similar.
     * The theoretical maximum for this value is the square root of three
     * (1.732).
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickPixelException on failure
     */
    public function isSimilar(ImagickPixel $color, $fuzz) {}

    /**
     * (No version information available, might only be in SVN)<br/>
     * Check the distance between this color and another
     * @link https://php.net/manual/en/imagickpixel.ispixelsimilar.php
     * @param ImagickPixel $color <p>
     * The ImagickPixel object to compare this object against.
     * </p>
     * @param float $fuzz <p>
     * The maximum distance within which to consider these colors as similar.
     * The theoretical maximum for this value is the square root of three
     * (1.732).
     * </p>
     * @return bool <b>TRUE</b> on success.
     * @throws ImagickPixelException on failure
     */
    public function isPixelSimilar(ImagickPixel $color, $fuzz) {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the color
     * @link https://php.net/manual/en/imagickpixel.getcolor.php
     * @param int $normalized [optional] <p>
     * Normalize the color values
     * </p>
     * @return array An array of channel values, each normalized if <b>TRUE</b> is given as param. Throws
     * ImagickPixelException on error.
     * @throws ImagickPixelException on error.
     */
    #[ArrayShape(["r" => "int|float", "g" => "int|float", "b" => "int|float", "a" => "int|float"])]
    #[Pure]
    public function getColor($normalized = 0) {}

    /**
     * (PECL imagick 2.1.0)<br/>
     * Returns the color as a string
     * @link https://php.net/manual/en/imagickpixel.getcolorasstring.php
     * @return string the color of the ImagickPixel object as a string.
     * @throws ImagickPixelException on failure
     */
    #[Pure]
    public function getColorAsString() {}

    /**
     * (PECL imagick 2.0.0)<br/>
     * Returns the color count associated with this color
     * @link https://php.net/manual/en/imagickpixel.getcolorcount.php
     * @return int the color count as an integer on success, throws
     * ImagickPixelException on failure.
     * @throws ImagickPixelException on failure.
     */
    #[Pure]
    public function getColorCount() {}

    /**
     * @param int $colorCount
     * @throws ImagickPixelException on failure
     */
    public function setColorCount($colorCount) {}

    /**
     * Returns true if the distance between two colors is less than the specified distance. The fuzz value should be in the range 0-QuantumRange.<br>
     * The maximum value represents the longest possible distance in the colorspace. e.g. from RGB(0, 0, 0) to RGB(255, 255, 255) for the RGB colorspace
     * @link https://php.net/manual/en/imagickpixel.ispixelsimilarquantum.php
     * @param string $color
     * @param string $fuzz
     * @return bool
     * @throws ImagickPixelException on failure
     * @since 3.3.0
     */
    public function isPixelSimilarQuantum($color, $fuzz) {}

    /**
     * Returns the color of the pixel in an array as Quantum values. If ImageMagick was compiled as HDRI these will be floats, otherwise they will be integers.
     * @link https://php.net/manual/en/imagickpixel.getcolorquantum.php
     * @return mixed The quantum value of the color element. Float if ImageMagick was compiled with HDRI, otherwise an int.
     * @throws ImagickPixelException on failure
     * @since 3.3.0
     */
    #[Pure]
    public function getColorQuantum() {}

    /**
     * Sets the color count associated with this color from another ImagickPixel object.
     *
     * @param ImagickPixel $srcPixel
     * @return bool
     * @throws ImagickPixelException on failure
     * @since 3.4.1
     */
    public function setColorFromPixel(ImagickPixel $srcPixel) {}
}
// End of imagick v.3.2.0RC1

// Start of Imagick v3.3.0RC1

/**
 * @link https://php.net/manual/en/class.imagickkernel.php
 */
class ImagickKernel
{
    /**
     * Attach another kernel to this kernel to allow them to both be applied in a single morphology or filter function. Returns the new combined kernel.
     * @link https://php.net/manual/en/imagickkernel.addkernel.php
     * @param ImagickKernel $imagickKernel
     * @return void
     * @throws ImagickKernelException on error
     * @since 3.3.0
     */
    public function addKernel(ImagickKernel $imagickKernel) {}

    /**
     * Adds a given amount of the 'Unity' Convolution Kernel to the given pre-scaled and normalized Kernel. This in effect adds that amount of the original image into the resulting convolution kernel. The resulting effect is to convert the defined kernels into blended soft-blurs, unsharp kernels or into sharpening kernels.
     * @link https://php.net/manual/en/imagickkernel.addunitykernel.php
     * @return void
     * @throws ImagickKernelException on error
     * @since 3.3.0
     */
    public function addUnityKernel() {}

    /**
     * Create a kernel from a builtin in kernel. See https://www.imagemagick.org/Usage/morphology/#kernel for examples.<br>
     * Currently the 'rotation' symbols are not supported. Example: $diamondKernel = ImagickKernel::fromBuiltIn(\Imagick::KERNEL_DIAMOND, "2");
     * @link https://php.net/manual/en/imagickkernel.frombuiltin.php
     * @param int $kernelType The type of kernel to build e.g. \Imagick::KERNEL_DIAMOND
     * @param string $kernelString A string that describes the parameters e.g. "4,2.5"
     * @return ImagickKernel
     * @since 3.3.0
     */
    public static function fromBuiltin($kernelType, $kernelString) {}

    /**
     * Create a kernel from a builtin in kernel. See https://www.imagemagick.org/Usage/morphology/#kernel for examples.<br>
     * Currently the 'rotation' symbols are not supported. Example: $diamondKernel = ImagickKernel::fromBuiltIn(\Imagick::KERNEL_DIAMOND, "2");
     * @link https://php.net/manual/en/imagickkernel.frombuiltin.php
     * @see https://www.imagemagick.org/Usage/morphology/#kernel
     * @param array $matrix A matrix (i.e. 2d array) of values that define the kernel. Each element should be either a float value, or FALSE if that element shouldn't be used by the kernel.
     * @param array $origin [optional] Which element of the kernel should be used as the origin pixel. e.g. For a 3x3 matrix specifying the origin as [2, 2] would specify that the bottom right element should be the origin pixel.
     * @return ImagickKernel
     * @throws ImagickKernelException on error
     * @since 3.3.0
     */
    public static function fromMatrix($matrix, $origin) {}

    /**
     * Get the 2d matrix of values used in this kernel. The elements are either float for elements that are used or 'false' if the element should be skipped.
     * @link https://php.net/manual/en/imagickkernel.getmatrix.php
     * @return array A matrix (2d array) of the values that represent the kernel.
     * @throws ImagickKernelException on error
     * @since 3.3.0
     */
    #[Pure]
    public function getMatrix() {}

    /**
     * ScaleKernelInfo() scales the given kernel list by the given amount, with or without normalization of the sum of the kernel values (as per given flags).<br>
     * The exact behaviour of this function depends on the normalization type being used please see https://www.imagemagick.org/api/morphology.php#ScaleKernelInfo for details.<br>
     * Flag should be one of Imagick::NORMALIZE_KERNEL_VALUE, Imagick::NORMALIZE_KERNEL_CORRELATE, Imagick::NORMALIZE_KERNEL_PERCENT or not set.
     * @link https://php.net/manual/en/imagickkernel.scale.php
     * @see https://www.imagemagick.org/api/morphology.php#ScaleKernelInfo
     * @return void
     * @throws ImagickKernelException on error
     * @since 3.3.0
     */
    public function scale() {}

    /**
     * Separates a linked set of kernels and returns an array of ImagickKernels.
     * @link https://php.net/manual/en/imagickkernel.separate.php
     * @return void
     * @throws ImagickKernelException on error
     * @since 3.3.0
     */
    public function seperate() {}
}
<?php

// Start of filter v.0.11.0
use JetBrains\PhpStorm\Pure;

/**
 * Gets a specific external variable by name and optionally filters it
 * @link https://php.net/manual/en/function.filter-input.php
 * @param int $type <p>
 * One of <b>INPUT_GET</b>, <b>INPUT_POST</b>,
 * <b>INPUT_COOKIE</b>, <b>INPUT_SERVER</b>, or
 * <b>INPUT_ENV</b>.
 * </p>
 * @param string $var_name <p>
 * Name of a variable to get.
 * </p>
 * @param int $filter [optional] <p>
 * The ID of the filter to apply. The
 * manual page lists the available filters.
 * </p>
 * @param array|int $options <p>
 * Associative array of options or bitwise disjunction of flags. If filter
 * accepts options, flags can be provided in "flags" field of array.
 * </p>
 * @return mixed Value of the requested variable on success, <b>FALSE</b> if the filter fails,
 * or <b>NULL</b> if the <i>variable_name</i> variable is not set.
 * If the flag <b>FILTER_NULL_ON_FAILURE</b> is used, it
 * returns <b>FALSE</b> if the variable is not set and <b>NULL</b> if the filter fails.
 */
#[Pure]
function filter_input(int $type, string $var_name, int $filter = FILTER_DEFAULT, array|int $options = 0): mixed {}

/**
 * Filters a variable with a specified filter
 * @link https://php.net/manual/en/function.filter-var.php
 * @param mixed $value <p>
 * Value to filter.
 * </p>
 * @param int $filter [optional] <p>
 * The ID of the filter to apply. The
 * manual page lists the available filters.
 * </p>
 * @param array|int $options <p>
 * Associative array of options or bitwise disjunction of flags. If filter
 * accepts options, flags can be provided in "flags" field of array. For
 * the "callback" filter, callable type should be passed. The
 * callback must accept one argument, the value to be filtered, and return
 * the value after filtering/sanitizing it.
 * </p>
 * <p>
 * <code>
 * // for filters that accept options, use this format
 * $options = array(
 * 'options' => array(
 * 'default' => 3, // value to return if the filter fails
 * // other options here
 * 'min_range' => 0
 * ),
 * 'flags' => FILTER_FLAG_ALLOW_OCTAL,
 * );
 * $var = filter_var('0755', FILTER_VALIDATE_INT, $options);
 * // for filter that only accept flags, you can pass them directly
 * $var = filter_var('oops', FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
 * // for filter that only accept flags, you can also pass as an array
 * $var = filter_var('oops', FILTER_VALIDATE_BOOLEAN,
 * array('flags' => FILTER_NULL_ON_FAILURE));
 * // callback validate filter
 * function foo($value)
 * {
 * // Expected format: Surname, GivenNames
 * if (strpos($value, ", ") === false) return false;
 * list($surname, $givennames) = explode(", ", $value, 2);
 * $empty = (empty($surname) || empty($givennames));
 * $notstrings = (!is_string($surname) || !is_string($givennames));
 * if ($empty || $notstrings) {
 * return false;
 * } else {
 * return $value;
 * }
 * }
 * $var = filter_var('Doe, Jane Sue', FILTER_CALLBACK, array('options' => 'foo'));
 * </code>
 * </p>
 * @return mixed the filtered data, or <b>FALSE</b> if the filter fails.
 */
#[Pure]
function filter_var(mixed $value, int $filter = FILTER_DEFAULT, array|int $options = 0): mixed {}

/**
 * Gets external variables and optionally filters them
 * @link https://php.net/manual/en/function.filter-input-array.php
 * @param int $type <p>
 * One of <b>INPUT_GET</b>, <b>INPUT_POST</b>,
 * <b>INPUT_COOKIE</b>, <b>INPUT_SERVER</b>, or
 * <b>INPUT_ENV</b>.
 * </p>
 * @param array|int $options [optional] <p>
 * An array defining the arguments. A valid key is a string
 * containing a variable name and a valid value is either a filter type, or an array
 * optionally specifying the filter, flags and options. If the value is an
 * array, valid keys are filter which specifies the
 * filter type,
 * flags which specifies any flags that apply to the
 * filter, and options which specifies any options that
 * apply to the filter. See the example below for a better understanding.
 * </p>
 * <p>
 * This parameter can be also an integer holding a filter constant. Then all values in the
 * input array are filtered by this filter.
 * </p>
 * @param bool $add_empty [optional] <p>
 * Add missing keys as <b>NULL</b> to the return value.
 * </p>
 * @return array|false|null An array containing the values of the requested variables on success, or <b>FALSE</b>
 * on failure. An array value will be <b>FALSE</b> if the filter fails, or <b>NULL</b> if
 * the variable is not set. Or if the flag <b>FILTER_NULL_ON_FAILURE</b>
 * is used, it returns <b>FALSE</b> if the variable is not set and <b>NULL</b> if the filter
 * fails.
 */
#[Pure]
function filter_input_array(int $type, array|int $options = FILTER_DEFAULT, bool $add_empty = true): array|false|null {}

/**
 * Gets multiple variables and optionally filters them
 * @link https://php.net/manual/en/function.filter-var-array.php
 * @param array $array <p>
 * An array with string keys containing the data to filter.
 * </p>
 * @param array|int $options [optional] <p>
 * An array defining the arguments. A valid key is a string
 * containing a variable name and a valid value is either a
 * filter type, or an
 * array optionally specifying the filter, flags and options.
 * If the value is an array, valid keys are filter
 * which specifies the filter type,
 * flags which specifies any flags that apply to the
 * filter, and options which specifies any options that
 * apply to the filter. See the example below for a better understanding.
 * </p>
 * <p>
 * This parameter can be also an integer holding a filter constant. Then all values in the
 * input array are filtered by this filter.
 * </p>
 * @param bool $add_empty [optional] <p>
 * Add missing keys as <b>NULL</b> to the return value.
 * </p>
 * @return array|false|null An array containing the values of the requested variables on success, or <b>FALSE</b>
 * on failure. An array value will be <b>FALSE</b> if the filter fails, or <b>NULL</b> if
 * the variable is not set.
 */
#[Pure]
function filter_var_array(array $array, array|int $options = FILTER_DEFAULT, bool $add_empty = true): array|false|null {}

/**
 * Returns a list of all supported filters
 * @link https://php.net/manual/en/function.filter-list.php
 * @return array an array of names of all supported filters, empty array if there
 * are no such filters. Indexes of this array are not filter IDs, they can be
 * obtained with <b>filter_id</b> from a name instead.
 */
#[Pure]
function filter_list(): array {}

/**
 * Checks if variable of specified type exists
 * @link https://php.net/manual/en/function.filter-has-var.php
 * @param int $input_type <p>
 * One of <b>INPUT_GET</b>, <b>INPUT_POST</b>,
 * <b>INPUT_COOKIE</b>, <b>INPUT_SERVER</b>, or
 * <b>INPUT_ENV</b>.
 * </p>
 * @param string $var_name <p>
 * Name of a variable to check.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
#[Pure]
function filter_has_var(int $input_type, string $var_name): bool {}

/**
 * Returns the filter ID belonging to a named filter
 * @link https://php.net/manual/en/function.filter-id.php
 * @param string $name <p>
 * Name of a filter to get.
 * </p>
 * @return int|false ID of a filter on success or <b>FALSE</b> if filter doesn't exist.
 */
#[Pure]
function filter_id(string $name): int|false {}

/**
 * POST variables.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('INPUT_POST', 0);

/**
 * GET variables.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('INPUT_GET', 1);

/**
 * COOKIE variables.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('INPUT_COOKIE', 2);

/**
 * ENV variables.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('INPUT_ENV', 4);

/**
 * SERVER variables.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('INPUT_SERVER', 5);

/**
 * SESSION variables.
 * (not implemented yet)
 * @link https://php.net/manual/en/filter.constants.php
 * @removed 8.0
 */
define('INPUT_SESSION', 6);

/**
 * REQUEST variables.
 * (not implemented yet)
 * @link https://php.net/manual/en/filter.constants.php
 * @removed 8.0
 */
define('INPUT_REQUEST', 99);

/**
 * No flags.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_FLAG_NONE', 0);

/**
 * Flag used to require scalar as input
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_REQUIRE_SCALAR', 33554432);

/**
 * Require an array as input.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_REQUIRE_ARRAY', 16777216);

/**
 * Always returns an array.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_FORCE_ARRAY', 67108864);

/**
 * Use NULL instead of FALSE on failure.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_NULL_ON_FAILURE', 134217728);

/**
 * ID of "int" filter.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_VALIDATE_INT', 257);

/**
 * ID of "boolean" filter.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_VALIDATE_BOOLEAN', 258);
/**
 * ID of "boolean" filter.
 * @link https://php.net/manual/en/filter.constants.php
 * @link https://php.net/manual/en/filter.filters.validate.php
 * @since 8.0 Using `FILTER_VALIDATE_BOOL` is preferred.
 */
define('FILTER_VALIDATE_BOOL', 258);

/**
 * ID of "float" filter.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_VALIDATE_FLOAT', 259);

/**
 * ID of "validate_regexp" filter.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_VALIDATE_REGEXP', 272);

define('FILTER_VALIDATE_DOMAIN', 277);

/**
 * ID of "validate_url" filter.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_VALIDATE_URL', 273);

/**
 * ID of "validate_email" filter.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_VALIDATE_EMAIL', 274);

/**
 * ID of "validate_ip" filter.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_VALIDATE_IP', 275);
define('FILTER_VALIDATE_MAC', 276);

/**
 * ID of default ("string") filter.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_DEFAULT', 516);

/**
 * @since 7.3
 */
define('FILTER_SANITIZE_ADD_SLASHES', 523);

/**
 * ID of "unsafe_raw" filter.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_UNSAFE_RAW', 516);

/**
 * ID of "string" filter.
 * @link https://php.net/manual/en/filter.constants.php
 * @deprecated 8.1
 */
define('FILTER_SANITIZE_STRING', 513);

/**
 * ID of "stripped" filter.
 * @link https://php.net/manual/en/filter.constants.php
 * @deprecated 8.1
 */
define('FILTER_SANITIZE_STRIPPED', 513);

/**
 * ID of "encoded" filter.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_SANITIZE_ENCODED', 514);

/**
 * ID of "special_chars" filter.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_SANITIZE_SPECIAL_CHARS', 515);
define('FILTER_SANITIZE_FULL_SPECIAL_CHARS', 522);

/**
 * ID of "email" filter.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_SANITIZE_EMAIL', 517);

/**
 * ID of "url" filter.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_SANITIZE_URL', 518);

/**
 * ID of "number_int" filter.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_SANITIZE_NUMBER_INT', 519);

/**
 * ID of "number_float" filter.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_SANITIZE_NUMBER_FLOAT', 520);

/**
 * ID of "magic_quotes" filter.
 * @link https://php.net/manual/en/filter.constants.php
 * @deprecated 7.4
 * @removed 8.0
 */
define('FILTER_SANITIZE_MAGIC_QUOTES', 521);

/**
 * ID of "callback" filter.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_CALLBACK', 1024);

/**
 * Allow octal notation (0[0-7]+) in "int" filter.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_FLAG_ALLOW_OCTAL', 1);

/**
 * Allow hex notation (0x[0-9a-fA-F]+) in "int" filter.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_FLAG_ALLOW_HEX', 2);

/**
 * Strip characters with ASCII value less than 32.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_FLAG_STRIP_LOW', 4);

/**
 * Strip characters with ASCII value greater than 127.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_FLAG_STRIP_HIGH', 8);
define('FILTER_FLAG_STRIP_BACKTICK', 512);

/**
 * Encode characters with ASCII value less than 32.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_FLAG_ENCODE_LOW', 16);

/**
 * Encode characters with ASCII value greater than 127.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_FLAG_ENCODE_HIGH', 32);

/**
 * Encode &.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_FLAG_ENCODE_AMP', 64);

/**
 * Don't encode ' and ".
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_FLAG_NO_ENCODE_QUOTES', 128);

/**
 * (No use for now.)
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_FLAG_EMPTY_STRING_NULL', 256);

/**
 * Allow fractional part in "number_float" filter.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_FLAG_ALLOW_FRACTION', 4096);

/**
 * Allow thousand separator (,) in "number_float" filter.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_FLAG_ALLOW_THOUSAND', 8192);

/**
 * Allow scientific notation (e, E) in
 * "number_float" filter.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_FLAG_ALLOW_SCIENTIFIC', 16384);

/**
 * Require scheme in "validate_url" filter.
 * @link https://php.net/manual/en/filter.constants.php
 * @deprecated 7.3
 * @removed 8.0
 */
define('FILTER_FLAG_SCHEME_REQUIRED', 65536);

/**
 * Require host in "validate_url" filter.
 * @link https://php.net/manual/en/filter.constants.php
 * @deprecated 7.3
 * @removed 8.0
 */
define('FILTER_FLAG_HOST_REQUIRED', 131072);

/**
 * Require path in "validate_url" filter.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_FLAG_PATH_REQUIRED', 262144);

/**
 * Require query in "validate_url" filter.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_FLAG_QUERY_REQUIRED', 524288);

/**
 * Allow only IPv4 address in "validate_ip" filter.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_FLAG_IPV4', 1048576);

/**
 * Allow only IPv6 address in "validate_ip" filter.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_FLAG_IPV6', 2097152);

/**
 * Deny reserved addresses in "validate_ip" filter.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_FLAG_NO_RES_RANGE', 4194304);

/**
 * Deny private addresses in "validate_ip" filter.
 * @link https://php.net/manual/en/filter.constants.php
 */
define('FILTER_FLAG_NO_PRIV_RANGE', 8388608);

define('FILTER_FLAG_HOSTNAME', 1048576);
define('FILTER_FLAG_EMAIL_UNICODE', 1048576);

/**
 * filters Global IPs per RFC 6890
 * @since 8.2
 */
define('FILTER_FLAG_GLOBAL_RANGE', 268435456);

// End of filter v.0.11.0
<?php

// Start of exif v.1.4 $Id$
use JetBrains\PhpStorm\Deprecated;

/**
 * Reads the EXIF headers from JPEG or TIFF
 * @link https://php.net/manual/en/function.exif-read-data.php
 * @param string $file <p>
 * The location of the image file. This cannot be an URL.
 * Since 7.2.0 this can either be a path to the file (stream wrappers are also supported as usual)
 * or a stream resource.
 * </p>
 * @param string|null $required_sections [optional] <p>
 * Is a comma separated list of sections that need to be present in file
 * to produce a result array. If none of the requested
 * sections could be found the return value is <b>FALSE</b>.
 * <tr valign="top">
 * <td>FILE</td>
 * <td>FileName, FileSize, FileDateTime, SectionsFound</td>
 * </tr>
 * <tr valign="top">
 * <td>COMPUTED</td>
 * <td>
 * html, Width, Height, IsColor, and more if available. Height and
 * Width are computed the same way <b>getimagesize</b>
 * does so their values must not be part of any header returned.
 * Also, html is a height/width text string to be used inside normal
 * HTML.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>ANY_TAG</td>
 * <td>Any information that has a Tag e.g. IFD0, EXIF, ...</td>
 * </tr>
 * <tr valign="top">
 * <td>IFD0</td>
 * <td>
 * All tagged data of IFD0. In normal imagefiles this contains
 * image size and so forth.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>THUMBNAIL</td>
 * <td>
 * A file is supposed to contain a thumbnail if it has a second IFD.
 * All tagged information about the embedded thumbnail is stored in
 * this section.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>COMMENT</td>
 * <td>Comment headers of JPEG images.</td>
 * </tr>
 * <tr valign="top">
 * <td>EXIF</td>
 * <td>
 * The EXIF section is a sub section of IFD0. It contains
 * more detailed information about an image. Most of these entries
 * are digital camera related.
 * </td>
 * </tr>
 * </p>
 * @param bool $as_arrays [optional] <p>
 * Specifies whether or not each section becomes an array. The
 * <i>sections</i> COMPUTED,
 * THUMBNAIL, and COMMENT
 * always become arrays as they may contain values whose names conflict
 * with other sections.
 * </p>
 * @param bool $read_thumbnail [optional] <p>
 * When set to <b>TRUE</b> the thumbnail itself is read. Otherwise, only the
 * tagged data is read.
 * </p>
 * @return array|false It returns an associative array where the array indexes are
 * the header names and the array values are the values associated with
 * those headers. If no data can be returned,
 * <b>exif_read_data</b> will return <b>FALSE</b>.
 */
function exif_read_data($file, ?string $required_sections, bool $as_arrays = false, bool $read_thumbnail = false): array|false {}

/**
 * Alias of <b>exif_read_data</b>
 * @link https://php.net/manual/en/function.read-exif-data.php
 * @param $filename
 * @param $sections [optional]
 * @param $arrays [optional]
 * @param $thumbnail [optional]
 * @removed 8.0
 */
#[Deprecated(replacement: "exif_read_data(%parametersList%)", since: "7.2")]
function read_exif_data($filename, $sections = null, $arrays = false, $thumbnail = false) {}

/**
 * Get the header name for an index
 * @link https://php.net/manual/en/function.exif-tagname.php
 * @param int $index <p>
 * The Tag ID for which a Tag Name will be looked up.
 * </p>
 * @return string|false the header name, or <b>FALSE</b> if <i>index</i> is
 * not a defined EXIF tag id.
 */
function exif_tagname(int $index): string|false {}

/**
 * Retrieve the embedded thumbnail of a TIFF or JPEG image
 * @link https://php.net/manual/en/function.exif-thumbnail.php
 * @param string|resource $file <p>
 * The location of the image file. This cannot be an URL.
 * Since 7.2.0 this can either be a path to the file (stream wrappers are also supported as usual)
 * or a stream resource.
 * </p>
 * @param int &$width [optional] <p>
 * The return width of the returned thumbnail.
 * </p>
 * @param int &$height [optional] <p>
 * The returned height of the returned thumbnail.
 * </p>
 * @param int &$image_type [optional] <p>
 * The returned image type of the returned thumbnail. This is either
 * TIFF or JPEG.
 * </p>
 * @return string|false the embedded thumbnail, or <b>FALSE</b> if the image contains no
 * thumbnail.
 */
function exif_thumbnail($file, &$width, &$height, &$image_type): string|false {}

/**
 * Determine the type of an image
 * @link https://php.net/manual/en/function.exif-imagetype.php
 * @param string $filename The image being checked.
 * @return int|false When a correct signature is found, the appropriate constant value will be
 * returned otherwise the return value is <b>FALSE</b>. The return value is the
 * same value that <b>getimagesize</b> returns in index 2 but
 * <b>exif_imagetype</b> is much faster.
 * </p>
 * <p>
 * <b>exif_imagetype</b> will emit an <b>E_NOTICE</b>
 * and return <b>FALSE</b> if it is unable to read enough bytes from the file to
 * determine the image type.
 */
function exif_imagetype(string $filename): int|false {}

define('EXIF_USE_MBSTRING', 1);

// End of exif v.1.4 $Id$
<?php
/**
 * Helper autocomplete for php grpc extension
 * @author Dmitry Gavriloff <info@imega.ru>
 * @link https://github.com/iMega/grpc-phpdoc
 */
/**
 * Grpc
 * @see https://grpc.io
 * @see https://github.com/grpc/grpc/tree/master/src/php/ext/grpc
 */

namespace Grpc;

    /**
     * Register call error constants
     */

    /**
     * everything went ok
     */
    const CALL_OK = 0;

    /**
     * something failed, we don't know what
     */
    const CALL_ERROR = 1;

    /**
     * this method is not available on the server
     */
    const CALL_ERROR_NOT_ON_SERVER = 2;

    /**
     * this method is not available on the client
     */
    const CALL_ERROR_NOT_ON_CLIENT = 3;

    /**
     * this method must be called before server_accept
     */
    const CALL_ERROR_ALREADY_ACCEPTED = 4;

    /**
     * this method must be called before invoke
     */
    const CALL_ERROR_ALREADY_INVOKED = 5;

    /**
     * this method must be called after invoke
     */
    const CALL_ERROR_NOT_INVOKED = 6;

    /**
     * this call is already finished
     * (writes_done or write_status has already been called)
     */
    const CALL_ERROR_ALREADY_FINISHED = 7;

    /**
     * there is already an outstanding read/write operation on the call
     */
    const CALL_ERROR_TOO_MANY_OPERATIONS = 8;

    /**
     * the flags value was illegal for this call
     */
    const CALL_ERROR_INVALID_FLAGS = 9;

    /**
     * invalid metadata was passed to this call
     */
    const CALL_ERROR_INVALID_METADATA = 10;

    /**
     * invalid message was passed to this call
     */
    const CALL_ERROR_INVALID_MESSAGE = 11;

    /**
     * completion queue for notification has not been registered with the
     * server
     */
    const CALL_ERROR_NOT_SERVER_COMPLETION_QUEUE = 12;

    /**
     * this batch of operations leads to more operations than allowed
     */
    const CALL_ERROR_BATCH_TOO_BIG = 13;

    /**
     * payload type requested is not the type registered
     */
    const CALL_ERROR_PAYLOAD_TYPE_MISMATCH = 14;

    /*
     * Register write flags
     */

    /**
     * Hint that the write may be buffered and need not go out on the wire
     * immediately. GRPC is free to buffer the message until the next non-buffered
     * write, or until writes_done, but it need not buffer completely or at all.
     */
    const WRITE_BUFFER_HINT = 1;

    /**
     * Force compression to be disabled for a particular write
     * (start_write/add_metadata). Illegal on invoke/accept.
     */
    const WRITE_NO_COMPRESS = 2;

    /*
     * Register status constants
     */

    /**
     * Not an error; returned on success
     */
    const STATUS_OK = 0;

    /**
     * The operation was cancelled (typically by the caller).
     */
    const STATUS_CANCELLED = 1;

    /**
     * Unknown error.  An example of where this error may be returned is
     * if a Status value received from another address space belongs to
     * an error-space that is not known in this address space.  Also
     * errors raised by APIs that do not return enough error information
     * may be converted to this error.
     */
    const STATUS_UNKNOWN = 2;

    /**
     * Client specified an invalid argument.  Note that this differs
     * from FAILED_PRECONDITION.  INVALID_ARGUMENT indicates arguments
     * that are problematic regardless of the state of the system
     * (e.g., a malformed file name).
     */
    const STATUS_INVALID_ARGUMENT = 3;

    /**
     * Deadline expired before operation could complete.  For operations
     * that change the state of the system, this error may be returned
     * even if the operation has completed successfully.  For example, a
     * successful response from a server could have been delayed long
     * enough for the deadline to expire.
     */
    const STATUS_DEADLINE_EXCEEDED = 4;

    /**
     * Some requested entity (e.g., file or directory) was not found.
     */
    const STATUS_NOT_FOUND = 5;

    /* Some entity that we attempted to create (e.g., file or directory)
     * already exists.
     */
    const STATUS_ALREADY_EXISTS = 6;

    /**
     * The caller does not have permission to execute the specified
     * operation.  PERMISSION_DENIED must not be used for rejections
     * caused by exhausting some resource (use RESOURCE_EXHAUSTED
     * instead for those errors).  PERMISSION_DENIED must not be
     * used if the caller can not be identified (use UNAUTHENTICATED
     * instead for those errors).
     */
    const STATUS_PERMISSION_DENIED = 7;

    /**
     * The request does not have valid authentication credentials for the
     * operation.
     */
    const STATUS_UNAUTHENTICATED = 16;

    /**
     * Some resource has been exhausted, perhaps a per-user quota, or
     * perhaps the entire file system is out of space.
     */
    const STATUS_RESOURCE_EXHAUSTED = 8;

    /**
     * Operation was rejected because the system is not in a state
     * required for the operation's execution.  For example, directory
     * to be deleted may be non-empty, an rmdir operation is applied to
     * a non-directory, etc.
     *
     * A litmus test that may help a service implementor in deciding
     * between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE:
     *  (a) Use UNAVAILABLE if the client can retry just the failing call.
     *  (b) Use ABORTED if the client should retry at a higher-level
     *      (e.g., restarting a read-modify-write sequence).
     *  (c) Use FAILED_PRECONDITION if the client should not retry until
     *      the system state has been explicitly fixed.  E.g., if an "rmdir"
     *      fails because the directory is non-empty, FAILED_PRECONDITION
     *      should be returned since the client should not retry unless
     *      they have first fixed up the directory by deleting files from it.
     *  (d) Use FAILED_PRECONDITION if the client performs conditional
     *      REST Get/Update/Delete on a resource and the resource on the
     *      server does not match the condition. E.g., conflicting
     *      read-modify-write on the same resource.
     */
    const STATUS_FAILED_PRECONDITION = 9;

    /**
     * The operation was aborted, typically due to a concurrency issue
     * like sequencer check failures, transaction aborts, etc.
     *
     * See litmus test above for deciding between FAILED_PRECONDITION,
     * ABORTED, and UNAVAILABLE.
     */
    const STATUS_ABORTED = 10;

    /**
     * Operation was attempted past the valid range.  E.g., seeking or
     * reading past end of file.
     *
     * Unlike INVALID_ARGUMENT, this error indicates a problem that may
     * be fixed if the system state changes. For example, a 32-bit file
     * system will generate INVALID_ARGUMENT if asked to read at an
     * offset that is not in the range [0,2^32-1], but it will generate
     * OUT_OF_RANGE if asked to read from an offset past the current
     * file size.
     *
     * There is a fair bit of overlap between FAILED_PRECONDITION and
     * OUT_OF_RANGE.  We recommend using OUT_OF_RANGE (the more specific
     * error) when it applies so that callers who are iterating through
     * a space can easily look for an OUT_OF_RANGE error to detect when
     * they are done.
     */
    const STATUS_OUT_OF_RANGE = 11;

    /**
     * Operation is not implemented or not supported/enabled in this service.
     */
    const STATUS_UNIMPLEMENTED = 12;

    /**
     * Internal errors.  Means some invariants expected by underlying
     *  system has been broken.  If you see one of these errors,
     *  something is very broken.
     */
    const STATUS_INTERNAL = 13;

    /**
     * The service is currently unavailable.  This is a most likely a
     * transient condition and may be corrected by retrying with
     * a backoff.
     *
     * See litmus test above for deciding between FAILED_PRECONDITION,
     * ABORTED, and UNAVAILABLE.
     */
    const STATUS_UNAVAILABLE = 14;

    /**
     * Unrecoverable data loss or corruption.
     */
    const STATUS_DATA_LOSS = 15;

    /*
     * Register op type constants
     */

    /**
     * Send initial metadata: one and only one instance MUST be sent for each
     * call, unless the call was cancelled - in which case this can be skipped.
     * This op completes after all bytes of metadata have been accepted by
     * outgoing flow control.
     */
    const OP_SEND_INITIAL_METADATA = 0;

    /**
     * Send a message: 0 or more of these operations can occur for each call.
     * This op completes after all bytes for the message have been accepted by
     * outgoing flow control.
     */
    const OP_SEND_MESSAGE = 1;

    /** Send a close from the client: one and only one instance MUST be sent from
     * the client, unless the call was cancelled - in which case this can be
     * skipped.
     * This op completes after all bytes for the call (including the close)
     * have passed outgoing flow control.
     */
    const OP_SEND_CLOSE_FROM_CLIENT = 2;

    /**
     * Send status from the server: one and only one instance MUST be sent from
     * the server unless the call was cancelled - in which case this can be
     * skipped.
     * This op completes after all bytes for the call (including the status)
     * have passed outgoing flow control.
     */
    const OP_SEND_STATUS_FROM_SERVER = 3;

    /**
     * Receive initial metadata: one and only one MUST be made on the client,
     * must not be made on the server.
     * This op completes after all initial metadata has been read from the
     * peer.
     */
    const OP_RECV_INITIAL_METADATA = 4;

    /**
     * Receive a message: 0 or more of these operations can occur for each call.
     * This op completes after all bytes of the received message have been
     * read, or after a half-close has been received on this call.
     */
    const OP_RECV_MESSAGE = 5;

    /**
     * Receive status on the client: one and only one must be made on the client.
     * This operation always succeeds, meaning ops paired with this operation
     * will also appear to succeed, even though they may not have. In that case
     * the status will indicate some failure.
     * This op completes after all activity on the call has completed.
     */
    const OP_RECV_STATUS_ON_CLIENT = 6;

    /**
     * Receive close on the server: one and only one must be made on the
     * server.
     * This op completes after the close has been received by the server.
     * This operation always succeeds, meaning ops paired with this operation
     * will also appear to succeed, even though they may not have.
     */
    const OP_RECV_CLOSE_ON_SERVER = 7;

    /*
     * Register connectivity state constants
     */

    /**
     * channel is idle
     */
    const CHANNEL_IDLE = 0;

    /**
     * channel is connecting
     */
    const CHANNEL_CONNECTING = 1;

    /**
     * channel is ready for work
     */
    const CHANNEL_READY = 2;

    /**
     * channel has seen a failure but expects to recover
     */
    const CHANNEL_TRANSIENT_FAILURE = 3;

    /**
     * channel has seen a failure that it cannot recover from
     */
    const CHANNEL_SHUTDOWN = 4;
    const CHANNEL_FATAL_FAILURE = 4;

    /**
     * Class Server
     * @see https://github.com/grpc/grpc/tree/master/src/php/ext/grpc
     */
    class Server
    {
        /**
         * Constructs a new instance of the Server class
         *
         * @param array $args The arguments to pass to the server (optional)
         */
        public function __construct(array $args) {}

        /**
         * Request a call on a server. Creates a single GRPC_SERVER_RPC_NEW event.
         *
         * @param int $tag_new    The tag to associate with the new request
         * @param int $tag_cancel The tag to use if the call is cancelled
         */
        public function requestCall($tag_new, $tag_cancel) {}

        /**
         * Add a http2 over tcp listener.
         *
         * @param string $addr The address to add
         *
         * @return bool true on success, false on failure
         */
        public function addHttp2Port($addr) {}

        /**
         * Add a secure http2 over tcp listener.
         *
         * @param string             $addr      The address to add
         * @param ServerCredentials $creds_obj
         *
         * @return bool true on success, false on failure
         */
        public function addSecureHttp2Port($addr, $creds_obj) {}

        /**
         * Start a server - tells all listeners to start listening
         */
        public function start() {}
    }

    /**
     * Class ServerCredentials
     * @see https://github.com/grpc/grpc/tree/master/src/php/ext/grpc
     */
    class ServerCredentials
    {
        /**
         * Create SSL credentials.
         *
         * @param string $pem_root_certs  PEM encoding of the server root certificates
         * @param string $pem_private_key PEM encoding of the client's private key
         * @param string $pem_cert_chain  PEM encoding of the client's certificate chain
         *
         * @return object Credentials The new SSL credentials object
         * @throws \InvalidArgumentException
         */
        public static function createSsl(
            $pem_root_certs,
            $pem_private_key,
            $pem_cert_chain
        ) {}
    }

    /**
     * Class Channel
     * @see https://github.com/grpc/grpc/tree/master/src/php/ext/grpc
     */
    class Channel
    {
        /**
         * Construct an instance of the Channel class. If the $args array contains a
         * "credentials" key mapping to a ChannelCredentials object, a secure channel
         * will be created with those credentials.
         *
         * @param string $target The hostname to associate with this channel
         * @param array  $args   The arguments to pass to the Channel (optional)
         *
         * @throws \InvalidArgumentException
         */
        public function __construct($target, $args = []) {}

        /**
         * Get the endpoint this call/stream is connected to
         *
         * @return string The URI of the endpoint
         */
        public function getTarget() {}

        /**
         * Get the connectivity state of the channel
         *
         * @param bool $try_to_connect try to connect on the channel
         *
         * @return int The grpc connectivity state
         * @throws \InvalidArgumentException
         */
        public function getConnectivityState($try_to_connect = false) {}

        /**
         * Watch the connectivity state of the channel until it changed
         *
         * @param int     $last_state   The previous connectivity state of the channel
         * @param Timeval $deadline_obj The deadline this function should wait until
         *
         * @return bool If the connectivity state changes from last_state
         *              before deadline
         * @throws \InvalidArgumentException
         */
        public function watchConnectivityState($last_state, Timeval $deadline_obj) {}

        /**
         * Close the channel
         */
        public function close() {}
    }

    /**
     * Class ChannelCredentials
     * @see https://github.com/grpc/grpc/tree/master/src/php/ext/grpc
     */
    class ChannelCredentials
    {
        /**
         * Set default roots pem.
         *
         * @param string $pem_roots PEM encoding of the server root certificates
         *
         * @throws \InvalidArgumentException
         */
        public static function setDefaultRootsPem($pem_roots) {}

        /**
         * Create a default channel credentials object.
         *
         * @return ChannelCredentials The new default channel credentials object
         */
        public static function createDefault() {}

        /**
         * Create SSL credentials.
         *
         * @param string|null $pem_root_certs  PEM encoding of the server root certificates
         * @param string|null $pem_private_key PEM encoding of the client's private key
         * @param string|null $pem_cert_chain  PEM encoding of the client's certificate chain
         *
         * @return ChannelCredentials The new SSL credentials object
         * @throws \InvalidArgumentException
         */
        public static function createSsl(
            string $pem_root_certs = null,
            string $pem_private_key = null,
            string $pem_cert_chain = null
        ) {}

        /**
         * Create composite credentials from two existing credentials.
         *
         * @param ChannelCredentials $cred1 The first credential
         * @param CallCredentials    $cred2 The second credential
         *
         * @return ChannelCredentials The new composite credentials object
         * @throws \InvalidArgumentException
         */
        public static function createComposite(
            ChannelCredentials $cred1,
            CallCredentials $cred2
        ) {}

        /**
         * Create insecure channel credentials
         *
         * @return null
         */
        public static function createInsecure() {}
    }

    /**
     * Class Call
     * @see https://github.com/grpc/grpc/tree/master/src/php/ext/grpc
     */
    class Call
    {
        /**
         * Constructs a new instance of the Call class.
         *
         * @param Channel $channel           The channel to associate the call with.
         *                                   Must not be closed.
         * @param string  $method            The method to call
         * @param Timeval $absolute_deadline The deadline for completing the call
         * @param null|string $host_override The host is set by user (optional)
         *
         * @throws \InvalidArgumentException
         */
        public function __construct(
            Channel $channel,
            $method,
            Timeval $absolute_deadline,
            $host_override = null
        ) {}

        /**
         * Start a batch of RPC actions.
         *
         * @param array $batch Array of actions to take
         *
         * @return object Object with results of all actions
         * @throws \InvalidArgumentException
         * @throws \LogicException
         */
        public function startBatch(array $batch) {}

        /**
         * Set the CallCredentials for this call.
         *
         * @param CallCredentials $creds_obj The CallCredentials object
         *
         * @return int The error code
         * @throws \InvalidArgumentException
         */
        public function setCredentials(CallCredentials $creds_obj) {}

        /**
         * Get the endpoint this call/stream is connected to
         *
         * @return string The URI of the endpoint
         */
        public function getPeer() {}

        /**
         * Cancel the call. This will cause the call to end with STATUS_CANCELLED if it
         * has not already ended with another status.
         */
        public function cancel() {}
    }

    /**
     * Class CallCredentials
     * @see https://github.com/grpc/grpc/tree/master/src/php/ext/grpc
     */
    class CallCredentials
    {
        /**
         * Create composite credentials from two existing credentials.
         *
         * @param CallCredentials $cred1 The first credential
         * @param CallCredentials $cred2 The second credential
         *
         * @return CallCredentials The new composite credentials object
         * @throws \InvalidArgumentException
         */
        public static function createComposite(
            CallCredentials $cred1,
            CallCredentials $cred2
        ) {}

        /**
         * Create a call credentials object from the plugin API
         *
         * @param \Closure $callback The callback function
         *
         * @return CallCredentials The new call credentials object
         * @throws \InvalidArgumentException
         */
        public static function createFromPlugin(\Closure $callback) {}
    }

    /**
     * Class Timeval
     *
     * @see https://github.com/grpc/grpc/tree/master/src/php/ext/grpc
     */
    class Timeval
    {
        /**
         * Constructs a new instance of the Timeval class
         *
         * @param int $usec The number of microseconds in the interval
         */
        public function __construct($usec) {}

        /**
         * Adds another Timeval to this one and returns the sum. Calculations saturate
         * at infinities.
         *
         * @param Timeval $other The other Timeval object to add
         *
         * @return Timeval A new Timeval object containing the sum
         * @throws \InvalidArgumentException
         */
        public function add(Timeval $other) {}

        /**
         * Return negative, 0, or positive according to whether a < b, a == b, or a > b
         * respectively.
         *
         * @param Timeval $a The first time to compare
         * @param Timeval $b The second time to compare
         *
         * @return int
         * @throws \InvalidArgumentException
         */
        public static function compare(Timeval $a, Timeval $b) {}

        /**
         * Returns the infinite future time value as a timeval object
         *
         * @return Timeval Infinite future time value
         */
        public static function infFuture() {}

        /**
         * Returns the infinite past time value as a timeval object
         *
         * @return Timeval Infinite past time value
         */
        public static function infPast() {}

        /**
         * Returns the current time as a timeval object
         *
         * @return Timeval The current time
         */
        public static function now() {}

        /**
         * Checks whether the two times are within $threshold of each other
         *
         * @param Timeval $a         The first time to compare
         * @param Timeval $b         The second time to compare
         * @param Timeval $threshold The threshold to check against
         *
         * @return bool True if $a and $b are within $threshold, False otherwise
         * @throws \InvalidArgumentException
         */
        public static function similar(Timeval $a, Timeval $b, Timeval $threshold) {}

        /**
         * Sleep until this time, interpreted as an absolute timeout
         */
        public function sleepUntil() {}

        /**
         * Subtracts another Timeval from this one and returns the difference.
         * Calculations saturate at infinities.
         *
         * @param Timeval $other The other Timeval object to subtract
         *
         * @return Timeval A new Timeval object containing the sum
         * @throws \InvalidArgumentException
         */
        public function subtract(Timeval $other) {}

        /**
         * Returns the zero time interval as a timeval object
         *
         * @return Timeval Zero length time interval
         */
        public static function zero() {}
    }
<?php

function phpdbg_break_next(): void {}

function phpdbg_break_file(string $file, int $line): void {}

function phpdbg_break_method(string $class, string $method): void {}

function phpdbg_break_function(string $function): void {}

function phpdbg_color(int $element, string $color): void {}

function phpdbg_prompt(string $string): void {}

/**
 * @return string|bool
 */
function phpdbg_exec(string $context) {}

function phpdbg_clear(): void {}

function phpdbg_start_oplog(): void {}

function phpdbg_end_oplog(array $options = []): ?array {}

function phpdbg_get_executable(array $options = []): array {}
<?php

// Start of xsl v.0.1

/**
 * @link https://php.net/manual/en/class.xsltprocessor.php
 */
class XSLTProcessor
{
    /**
     * Import stylesheet
     * @link https://php.net/manual/en/xsltprocessor.importstylesheet.php
     * @param object $stylesheet <p>
     * The imported style sheet as a <b>DOMDocument</b> or
     * <b>SimpleXMLElement</b> object.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function importStylesheet($stylesheet) {}

    /**
     * Transform to a DOMDocument
     * @link https://php.net/manual/en/xsltprocessor.transformtodoc.php
     * @param DOMNode $doc <p>
     * The node to be transformed.
     * </p>
     * @return DOMDocument|false The resulting <b>DOMDocument</b> or <b>FALSE</b> on error.
     */
    public function transformToDoc(DOMNode $doc) {}

    /**
     * Transform to URI
     * @link https://php.net/manual/en/xsltprocessor.transformtouri.php
     * @param DOMDocument|SimpleXMLElement $doc <p>
     * The document to transform.
     * </p>
     * @param string $uri <p>
     * The target URI for the transformation.
     * </p>
     * @return int|false the number of bytes written or <b>FALSE</b> if an error occurred.
     */
    public function transformToUri($doc, $uri) {}

    /**
     * Transform to XML
     * @link https://php.net/manual/en/xsltprocessor.transformtoxml.php
     * @param DOMDocument|SimpleXMLElement $doc <p>
     * The transformed document.
     * </p>
     * @return string|false|null The result of the transformation as a string or <b>FALSE</b> on error.
     */
    public function transformToXml($doc) {}

    /**
     * Set value for a parameter
     * @link https://php.net/manual/en/xsltprocessor.setparameter.php
     * @param string $namespace <p>
     * The namespace URI of the XSLT parameter.
     * </p>
     * @param array $options <p>
     * An array of name => value pairs. This syntax is available since PHP 5.1.0.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function setParameter($namespace, $options) {}

    /**
     * Set value for a parameter
     * @link https://php.net/manual/en/xsltprocessor.setparameter.php
     * @param string $namespace <p>
     * The namespace URI of the XSLT parameter.
     * </p>
     * @param string $name <p>
     * The local name of the XSLT parameter.
     * </p>
     * @param string $value <p>
     * The new value of the XSLT parameter.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function setParameter($namespace, $name, $value) {}

    /**
     * Get value of a parameter
     * @link https://php.net/manual/en/xsltprocessor.getparameter.php
     * @param string $namespaceURI <p>
     * The namespace URI of the XSLT parameter.
     * </p>
     * @param string $localName <p>
     * The local name of the XSLT parameter.
     * </p>
     * @return string|false The value of the parameter (as a string), or <b>FALSE</b> if it's not set.
     */
    public function getParameter($namespaceURI, $localName) {}

    /**
     * Remove parameter
     * @link https://php.net/manual/en/xsltprocessor.removeparameter.php
     * @param string $namespaceURI <p>
     * The namespace URI of the XSLT parameter.
     * </p>
     * @param string $localName <p>
     * The local name of the XSLT parameter.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function removeParameter($namespaceURI, $localName) {}

    /**
     * Determine if PHP has EXSLT support
     * @link https://php.net/manual/en/xsltprocessor.hasexsltsupport.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @since 5.0.4
     */
    public function hasExsltSupport() {}

    /**
     * Enables the ability to use PHP functions as XSLT functions
     * @link https://php.net/manual/en/xsltprocessor.registerphpfunctions.php
     * @param mixed $restrict [optional] <p>
     * Use this parameter to only allow certain functions to be called from
     * XSLT.
     * </p>
     * <p>
     * This parameter can be either a string (a function name) or an array of
     * functions.
     * </p>
     * @return void No value is returned.
     * @since 5.0.4
     */
    public function registerPHPFunctions($restrict = null) {}

    /**
     * Sets profiling output file
     * @link https://php.net/manual/en/xsltprocessor.setprofiling.php
     * @param string $filename <p>
     * Path to the file to dump profiling information.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function setProfiling($filename) {}

    /**
     * Set security preferences
     * @link https://php.net/manual/en/xsltprocessor.setsecurityprefs.php
     * @param int $securityPrefs
     * @return int
     * @since 5.4
     */
    public function setSecurityPrefs($securityPrefs) {}

    /**
     * Get security preferences
     * @link https://php.net/manual/en/xsltprocessor.getsecurityprefs.php
     * @return int
     * @since 5.4
     */
    public function getSecurityPrefs() {}
}
define('XSL_CLONE_AUTO', 0);
define('XSL_CLONE_NEVER', -1);
define('XSL_CLONE_ALWAYS', 1);

/** @link https://php.net/manual/en/xsl.constants.php */
define('XSL_SECPREF_NONE', 0);
/** @link https://php.net/manual/en/xsl.constants.php */
define('XSL_SECPREF_READ_FILE', 2);
/** @link https://php.net/manual/en/xsl.constants.php */
define('XSL_SECPREF_WRITE_FILE', 4);
/** @link https://php.net/manual/en/xsl.constants.php */
define('XSL_SECPREF_CREATE_DIRECTORY', 8);
/** @link https://php.net/manual/en/xsl.constants.php */
define('XSL_SECPREF_READ_NETWORK', 16);
/** @link https://php.net/manual/en/xsl.constants.php */
define('XSL_SECPREF_WRITE_NETWORK', 32);
/** @link https://php.net/manual/en/xsl.constants.php */
define('XSL_SECPREF_DEFAULT', 44);

/**
 * libxslt version like 10117. Available as of PHP 5.1.2.
 * @link https://php.net/manual/en/xsl.constants.php
 */
define('LIBXSLT_VERSION', 10128);

/**
 * libxslt version like 1.1.17. Available as of PHP 5.1.2.
 * @link https://php.net/manual/en/xsl.constants.php
 */
define('LIBXSLT_DOTTED_VERSION', "1.1.28");

/**
 * libexslt version like 813. Available as of PHP 5.1.2.
 * @link https://php.net/manual/en/xsl.constants.php
 */
define('LIBEXSLT_VERSION', 817);

/**
 * libexslt version like 1.1.17. Available as of PHP 5.1.2.
 * @link https://php.net/manual/en/xsl.constants.php
 */
define('LIBEXSLT_DOTTED_VERSION', "1.1.28");

// End of xsl v.0.1
<?php

// Start of imap v.
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;

/**
 * Open an IMAP stream to a mailbox
 * @link https://php.net/manual/en/function.imap-open.php
 * @param string $mailbox <p>
 * A mailbox name consists of a server and a mailbox path on this server.
 * The special name INBOX stands for the current users
 * personal mailbox. Mailbox names that contain international characters
 * besides those in the printable ASCII space have to be encoded width
 * <b>imap_utf7_encode</b>.
 * </p>
 * <p>
 * The server part, which is enclosed in '{' and '}', consists of the servers
 * name or ip address, an optional port (prefixed by ':'), and an optional
 * protocol specification (prefixed by '/').
 * </p>
 * <p>
 * The server part is mandatory in all mailbox
 * parameters.
 * </p>
 * <p>
 * All names which start with { are remote names, and are
 * in the form "{" remote_system_name [":" port] [flags] "}"
 * [mailbox_name] where:
 * remote_system_name - Internet domain name or
 * bracketed IP address of server.</p>
 * @param string $user <p>
 * The user name
 * </p>
 * @param string $password <p>
 * The password associated with the <i>username</i>
 * </p>
 * @param int $flags [optional] <p>
 * The <i>options</i> are a bit mask with one or more of
 * the following:
 * <b>OP_READONLY</b> - Open mailbox read-only</p>
 * @param int $retries [optional] <p>
 * Number of maximum connect attempts
 * </p>
 * @param null|array $options <p>
 * Connection parameters, the following (string) keys maybe used
 * to set one or more connection parameters:
 * DISABLE_AUTHENTICATOR - Disable authentication properties</p>
 * @return resource|false an IMAP stream on success or <b>FALSE</b> on error.
 */
#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection|false'], default: 'resource|false')]
function imap_open(string $mailbox, string $user, string $password, int $flags = 0, int $retries = 0, array $options = []) {}

/**
 * Reopen IMAP stream to new mailbox
 * @link https://php.net/manual/en/function.imap-reopen.php
 * @param resource $imap
 * @param string $mailbox <p>
 * The mailbox name, see <b>imap_open</b> for more
 * information
 * </p>
 * @param int $flags [optional] <p>
 * The <i>options</i> are a bit mask with one or more of
 * the following:
 * <b>OP_READONLY</b> - Open mailbox read-only</p>
 * @param int $retries [optional] <p>
 * Number of maximum connect attempts
 * </p>
 * @return bool <b>TRUE</b> if the stream is reopened, <b>FALSE</b> otherwise.
 */
function imap_reopen(
    #[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap,
    string $mailbox,
    int $flags = 0,
    int $retries = 0
): bool {}

/**
 * Close an IMAP stream
 * @link https://php.net/manual/en/function.imap-close.php
 * @param resource $imap
 * @param int $flags [optional] <p>
 * If set to <b>CL_EXPUNGE</b>, the function will silently
 * expunge the mailbox before closing, removing all messages marked for
 * deletion. You can achieve the same thing by using
 * <b>imap_expunge</b>
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function imap_close(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, int $flags = 0): bool {}

/**
 * Gets the number of messages in the current mailbox
 * @link https://php.net/manual/en/function.imap-num-msg.php
 * @param resource $imap
 * @return int|false Return the number of messages in the current mailbox, as an integer.
 */
function imap_num_msg(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap): int|false {}

/**
 * Gets the number of recent messages in current mailbox
 * @link https://php.net/manual/en/function.imap-num-recent.php
 * @param resource $imap
 * @return int the number of recent messages in the current mailbox, as an
 * integer.
 */
function imap_num_recent(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap): int {}

/**
 * Returns headers for all messages in a mailbox
 * @link https://php.net/manual/en/function.imap-headers.php
 * @param resource $imap
 * @return array|false an array of string formatted with header info. One
 * element per mail message.
 */
function imap_headers(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap): array|false {}

/**
 * Read the header of the message
 * @link https://php.net/manual/en/function.imap-headerinfo.php
 * @param resource|IMAP\Connection $imap An IMAP stream returned by imap_open().
 * @param int $message_num The message number
 * @param int $from_length [optional] Number of characters for the fetchfrom property. Must be greater than or equal to zero.
 * @param int $subject_length [optional] Number of characters for the fetchsubject property Must be greater than or equal to zero.
 * @param $default_host [optional]
 * @return stdClass|false Returns the information in an object with following properties:
 * <dl>
 * <dt>toaddress</dt><dd>full to: line, up to 1024 characters</dd>
 * <dt>to</dt><dd>an array of objects from the To: line, with the following properties: personal, adl, mailbox, and host</dd>
 * <dt>fromaddress</dt><dd>full from: line, up to 1024 characters</dd>
 * <dt>from</dt><dd>an array of objects from the From: line, with the following properties: personal, adl, mailbox, and host</dd>
 * <dt>ccaddress</dt><dd>full cc: line, up to 1024 characters</dd>
 * <dt>cc</dt><dd>an array of objects from the Cc: line, with the following properties: personal, adl, mailbox, and host</dd>
 * <dt>bccaddress</dt><dd>full bcc: line, up to 1024 characters</dd>
 * <dt>bcc</dt><dd>an array of objects from the Bcc: line, with the following properties: personal, adl, mailbox, and host</dd>
 * <dt>reply_toaddress</dt><dd>full Reply-To: line, up to 1024 characters</dd>
 * <dt>reply_to</dt><dd>an array of objects from the Reply-To: line, with the following properties: personal, adl, mailbox, and host</dd>
 * <dt>senderaddress</dt><dd>full sender: line, up to 1024 characters</dd>
 * <dt>sender</dt><dd>an array of objects from the Sender: line, with the following properties: personal, adl, mailbox, and host</dd>
 * <dt>return_pathaddress</dt><dd>full Return-Path: line, up to 1024 characters</dd>
 * <dt>return_path</dt><dd>an array of objects from the Return-Path: line, with the following properties: personal, adl, mailbox, and host</dd>
 * <dt>remail -</dt>
 * <dt>date</dt><dd>The message date as found in its headers</dd>
 * <dt>Date</dt><dd>Same as date</dd>
 * <dt>subject</dt><dd>The message subject</dd>
 * <dt>Subject</dt><dd>Same a subject</dd>
 * <dt>in_reply_to -</dt>
 * <dt>message_id -</dt>
 * <dt>newsgroups -</dt>
 * <dt>followup_to -</dt>
 * <dt>references -</dt>
 * <dt>Recent</dt><dd>R if recent and seen, N if recent and not seen, ' ' if not recent.</dd>
 * <dt>Unseen</dt><dd>U if not seen AND not recent, ' ' if seen OR not seen and recent</dd>
 * <dt>Flagged</dt><dd>F if flagged, ' ' if not flagged</dd>
 * <dt>Answered</dt><dd>A if answered, ' ' if unanswered</dd>
 * <dt>Deleted</dt><dd>D if deleted, ' ' if not deleted</dd>
 * <dt>Draft</dt><dd>X if draft, ' ' if not draft</dd>
 * <dt>Msgno</dt><dd>The message number</dd>
 * <dt>MailDate -</dt>
 * <dt>Size</dt><dd>The message size</dd>
 * <dt>udate</dt><dd>mail message date in Unix time</dd>
 * <dt>fetchfrom</dt><dd>from line formatted to fit fromlength characters</dd>
 * <dt>fetchsubject</dt><dd>subject line formatted to fit subjectlength characters</dd>
 * </dl>
 */
function imap_headerinfo(
    #[LanguageLevelTypeAware(['8.0' => 'IMAP\Connection'], default: 'resource')] $imap,
    int $message_num,
    int $from_length = 0,
    int $subject_length = 0,
    #[PhpStormStubsElementAvailable(to: '7.4')] $default_host = null
): stdClass|false {}

/**
 * Parse mail headers from a string
 * @link https://php.net/manual/en/function.imap-rfc822-parse-headers.php
 * @param string $headers <p>
 * The parsed headers data
 * </p>
 * @param string $default_hostname [optional] <p>
 * The default host name
 * </p>
 * @return object|stdClass an object similar to the one returned by
 * <b>imap_header</b>, except for the flags and other
 * properties that come from the IMAP server.
 */
function imap_rfc822_parse_headers(string $headers, string $default_hostname = "UNKNOWN"): stdClass {}

/**
 * Returns a properly formatted email address given the mailbox, host, and personal info
 * @link https://php.net/manual/en/function.imap-rfc822-write-address.php
 * @param string $mailbox <p>
 * The mailbox name, see <b>imap_open</b> for more
 * information
 * </p>
 * @param string $hostname <p>
 * The email host part
 * </p>
 * @param string $personal <p>
 * The name of the account owner
 * </p>
 * @return string|false a string properly formatted email address as defined in RFC2822.
 */
function imap_rfc822_write_address(string $mailbox, string $hostname, string $personal): string|false {}

/**
 * Parses an address string
 * @link https://php.net/manual/en/function.imap-rfc822-parse-adrlist.php
 * @param string $string <p>
 * A string containing addresses
 * </p>
 * @param string $default_hostname <p>
 * The default host name
 * </p>
 * @return array an array of objects. The objects properties are:
 * <p>
 * mailbox - the mailbox name (username)
 * host - the host name
 * personal - the personal name
 * adl - at domain source route
 * </p>
 */
function imap_rfc822_parse_adrlist(string $string, string $default_hostname): array {}

/**
 * Read the message body
 * @link https://php.net/manual/en/function.imap-body.php
 * @param resource $imap
 * @param int $message_num <p>
 * The message number
 * </p>
 * @param int $flags [optional] <p>
 * The optional <i>options</i> are a bit mask
 * with one or more of the following:
 * <b>FT_UID</b> - The <i>msg_number</i> is a UID</p>
 * @return string|false the body of the specified message, as a string.
 */
function imap_body(
    #[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap,
    int $message_num,
    int $flags = 0
): string|false {}

/**
 * Read the structure of a specified body section of a specific message
 * @link https://php.net/manual/en/function.imap-bodystruct.php
 * @param resource $imap
 * @param int $message_num <p>
 * The message number
 * </p>
 * @param string $section <p>
 * The body section to read
 * </p>
 * @return object the information in an object, for a detailed description
 * of the object structure and properties see
 * <b>imap_fetchstructure</b>.
 */
#[LanguageLevelTypeAware(['8.1' => 'stdClass|false'], default: 'object')]
function imap_bodystruct(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, int $message_num, string $section) {}

/**
 * Fetch a particular section of the body of the message
 * @link https://php.net/manual/en/function.imap-fetchbody.php
 * @param resource $imap
 * @param int $message_num <p>
 * The message number
 * </p>
 * @param string $section <p>
 * The part number. It is a string of integers delimited by period which
 * index into a body part list as per the IMAP4 specification
 * </p>
 * @param int $flags [optional] <p>
 * A bitmask with one or more of the following:
 * <b>FT_UID</b> - The <i>msg_number</i> is a UID</p>
 * @return string|false a particular section of the body of the specified messages as a
 * text string.
 */
function imap_fetchbody(
    #[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap,
    int $message_num,
    string $section,
    int $flags = 0
): string|false {}

/**
 * Fetch MIME headers for a particular section of the message
 * @link https://php.net/manual/en/function.imap-fetchmime.php
 * @param resource $imap
 * @param int $message_num <p>
 * The message number
 * </p>
 * @param string $section <p>
 * The part number. It is a string of integers delimited by period which
 * index into a body part list as per the IMAP4 specification
 * </p>
 * @param int $flags [optional] <p>
 * A bitmask with one or more of the following:
 * <b>FT_UID</b> - The <i>msg_number</i> is a UID</p>
 * @return string|false the MIME headers of a particular section of the body of the specified messages as a
 * text string.
 * @since 5.3.6
 */
function imap_fetchmime(
    #[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap,
    int $message_num,
    string $section,
    int $flags = 0
): string|false {}

/**
 * Save a specific body section to a file
 * @link https://php.net/manual/en/function.imap-savebody.php
 * @param resource $imap
 * @param mixed $file <p>
 * The path to the saved file as a string, or a valid file descriptor
 * returned by <b>fopen</b>.
 * </p>
 * @param int $message_num <p>
 * The message number
 * </p>
 * @param string $section [optional] <p>
 * The part number. It is a string of integers delimited by period which
 * index into a body part list as per the IMAP4 specification
 * </p>
 * @param int $flags [optional] <p>
 * A bitmask with one or more of the following:
 * <b>FT_UID</b> - The <i>msg_number</i> is a UID</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * @since 5.1.3
 */
function imap_savebody(
    #[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap,
    $file,
    int $message_num,
    string $section = "",
    int $flags = 0
): bool {}

/**
 * Returns header for a message
 * @link https://php.net/manual/en/function.imap-fetchheader.php
 * @param resource $imap
 * @param int $message_num <p>
 * The message number
 * </p>
 * @param int $flags [optional] <p>
 * The possible <i>options</i> are:
 * <b>FT_UID</b> - The <i>msgno</i>
 * argument is a UID</p>
 * @return string|false the header of the specified message as a text string.
 */
function imap_fetchheader(
    #[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap,
    int $message_num,
    int $flags = 0
): string|false {}

/**
 * Read the structure of a particular message
 * @link https://php.net/manual/en/function.imap-fetchstructure.php
 * @param resource $imap
 * @param int $message_num <p>
 * The message number
 * </p>
 * @param int $flags [optional] <p>
 * This optional parameter only has a single option,
 * <b>FT_UID</b>, which tells the function to treat the
 * <i>msg_number</i> argument as a
 * UID.
 * </p>
 * @return object|stdClass|false an object includes the envelope, internal date, size, flags and
 * body structure along with a similar object for each mime attachment. The
 * structure of the returned objects is as follows:
 * </p>
 * <p>
 * <table>
 * Returned Objects for <b>imap_fetchstructure</b>
 * <tr valign="top">
 * <td>type</td>
 * <td>Primary body type</td>
 * </tr>
 * <tr valign="top">
 * <td>encoding</td>
 * <td>Body transfer encoding</td>
 * </tr>
 * <tr valign="top">
 * <td>ifsubtype</td>
 * <td><b>TRUE</b> if there is a subtype string</td>
 * </tr>
 * <tr valign="top">
 * <td>subtype</td>
 * <td>MIME subtype</td>
 * </tr>
 * <tr valign="top">
 * <td>ifdescription</td>
 * <td><b>TRUE</b> if there is a description string</td>
 * </tr>
 * <tr valign="top">
 * <td>description</td>
 * <td>Content description string</td>
 * </tr>
 * <tr valign="top">
 * <td>ifid</td>
 * <td><b>TRUE</b> if there is an identification string</td>
 * </tr>
 * <tr valign="top">
 * <td>id</td>
 * <td>Identification string</td>
 * </tr>
 * <tr valign="top">
 * <td>lines</td>
 * <td>Number of lines</td>
 * </tr>
 * <tr valign="top">
 * <td>bytes</td>
 * <td>Number of bytes</td>
 * </tr>
 * <tr valign="top">
 * <td>ifdisposition</td>
 * <td><b>TRUE</b> if there is a disposition string</td>
 * </tr>
 * <tr valign="top">
 * <td>disposition</td>
 * <td>Disposition string</td>
 * </tr>
 * <tr valign="top">
 * <td>ifdparameters</td>
 * <td><b>TRUE</b> if the dparameters array exists</td>
 * </tr>
 * <tr valign="top">
 * <td>dparameters</td>
 * <td>An array of objects where each object has an
 * "attribute" and a "value"
 * property corresponding to the parameters on the
 * Content-disposition MIME
 * header.</td>
 * </tr>
 * <tr valign="top">
 * <td>ifparameters</td>
 * <td><b>TRUE</b> if the parameters array exists</td>
 * </tr>
 * <tr valign="top">
 * <td>parameters</td>
 * <td>An array of objects where each object has an
 * "attribute" and a "value"
 * property.</td>
 * </tr>
 * <tr valign="top">
 * <td>parts</td>
 * <td>An array of objects identical in structure to the top-level
 * object, each of which corresponds to a MIME body
 * part.</td>
 * </tr>
 * </table>
 * </p>
 * <p>
 * <table>
 * Primary body type (may vary with used library)
 * <tr valign="top"><td>0</td><td>text</td></tr>
 * <tr valign="top"><td>1</td><td>multipart</td></tr>
 * <tr valign="top"><td>2</td><td>message</td></tr>
 * <tr valign="top"><td>3</td><td>application</td></tr>
 * <tr valign="top"><td>4</td><td>audio</td></tr>
 * <tr valign="top"><td>5</td><td>image</td></tr>
 * <tr valign="top"><td>6</td><td>video</td></tr>
 * <tr valign="top"><td>7</td><td>other</td></tr>
 * </table>
 * </p>
 * <p>
 * <table>
 * Transfer encodings (may vary with used library)
 * <tr valign="top"><td>0</td><td>7BIT</td></tr>
 * <tr valign="top"><td>1</td><td>8BIT</td></tr>
 * <tr valign="top"><td>2</td><td>BINARY</td></tr>
 * <tr valign="top"><td>3</td><td>BASE64</td></tr>
 * <tr valign="top"><td>4</td><td>QUOTED-PRINTABLE</td></tr>
 * <tr valign="top"><td>5</td><td>OTHER</td></tr>
 * </table>
 */
function imap_fetchstructure(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, int $message_num, int $flags = 0): stdClass|false {}

/**
 * Clears IMAP cache
 * @link https://php.net/manual/en/function.imap-gc.php
 * @param resource $imap
 * @param int $flags <p>
 * Specifies the cache to purge. It may one or a combination
 * of the following constants:
 * <b>IMAP_GC_ELT</b> (message cache elements),
 * <b>IMAP_GC_ENV</b> (enveloppe and bodies),
 * <b>IMAP_GC_TEXTS</b> (texts).
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function imap_gc(
    #[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] int $flags = 0,
    #[PhpStormStubsElementAvailable(from: '8.0')] int $flags
): bool {}

/**
 * Delete all messages marked for deletion
 * @link https://php.net/manual/en/function.imap-expunge.php
 * @param resource $imap
 * @return bool <b>TRUE</b>.
 */
function imap_expunge(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap): bool {}

/**
 * Mark a message for deletion from current mailbox
 * @link https://php.net/manual/en/function.imap-delete.php
 * @param resource $imap
 * @param string $message_nums <p>
 * The message number
 * </p>
 * @param int $flags [optional] <p>
 * You can set the <b>FT_UID</b> which tells the function
 * to treat the <i>msg_number</i> argument as an
 * UID.
 * </p>
 * @return bool <b>TRUE</b>.
 */
function imap_delete(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $message_nums, int $flags = 0): bool {}

/**
 * Unmark the message which is marked deleted
 * @link https://php.net/manual/en/function.imap-undelete.php
 * @param resource $imap
 * @param string $message_nums <p>
 * The message number
 * </p>
 * @param int $flags [optional]
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function imap_undelete(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $message_nums, int $flags = 0): bool {}

/**
 * Check current mailbox
 * @link https://php.net/manual/en/function.imap-check.php
 * @param resource $imap
 * @return object|stdClass|false the information in an object with following properties:
 * <b>Date</b> - current system time formatted according to RFC2822
 * <b>Driver</b> - protocol used to access this mailbox:
 * POP3, IMAP, NNTP
 * <b>Mailbox</b> - the mailbox name
 * <b>Nmsgs</b> - number of messages in the mailbox
 * <b>Recent</b> - number of recent messages in the mailbox
 * </p>
 * <p>
 * Returns <b>FALSE</b> on failure.
 */
function imap_check(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap): stdClass|false {}

/**
 * Returns the list of mailboxes that matches the given text
 * @link https://php.net/manual/en/function.imap-listscan.php
 * @param resource $imap
 * @param string $reference <p>
 * <i>ref</i> should normally be just the server
 * specification as described in <b>imap_open</b>
 * </p>
 * @param string $pattern Specifies where in the mailbox hierarchy
 * to start searching.</p>There are two special characters you can
 * pass as part of the <i>pattern</i>:
 * &#x00027;*&#x00027; and &#x00027;&#37;&#x00027;.
 * &#x00027;*&#x00027; means to return all mailboxes. If you pass
 * <i>pattern</i> as &#x00027;*&#x00027;, you will
 * get a list of the entire mailbox hierarchy.
 * &#x00027;&#37;&#x00027;
 * means to return the current level only.
 * &#x00027;&#37;&#x00027; as the <i>pattern</i>
 * parameter will return only the top level
 * mailboxes; &#x00027;~/mail/&#37;&#x00027; on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory.</p>
 * @param string $content <p>
 * The searched string
 * </p>
 * @return array|false an array containing the names of the mailboxes that have
 * <i>content</i> in the text of the mailbox.
 */
function imap_listscan(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $reference, string $pattern, string $content): array|false {}

/**
 * Copy specified messages to a mailbox
 * @link https://php.net/manual/en/function.imap-mail-copy.php
 * @param resource $imap
 * @param string $message_nums <p>
 * <i>msglist</i> is a range not just message
 * numbers (as described in RFC2060).
 * </p>
 * @param string $mailbox <p>
 * The mailbox name, see <b>imap_open</b> for more
 * information
 * </p>
 * @param int $flags [optional] <p>
 * <i>options</i> is a bitmask of one or more of
 * <b>CP_UID</b> - the sequence numbers contain UIDS</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function imap_mail_copy(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $message_nums, string $mailbox, int $flags = 0): bool {}

/**
 * Move specified messages to a mailbox
 * @link https://php.net/manual/en/function.imap-mail-move.php
 * @param resource $imap
 * @param string $message_nums <p>
 * <i>msglist</i> is a range not just message numbers
 * (as described in RFC2060).
 * </p>
 * @param string $mailbox <p>
 * The mailbox name, see <b>imap_open</b> for more
 * information
 * </p>
 * @param int $flags [optional] <p>
 * <i>options</i> is a bitmask and may contain the single option:
 * <b>CP_UID</b> - the sequence numbers contain UIDS</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function imap_mail_move(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $message_nums, string $mailbox, int $flags = 0): bool {}

/**
 * Create a MIME message based on given envelope and body sections
 * @link https://php.net/manual/en/function.imap-mail-compose.php
 * @param array $envelope <p>
 * An associative array of headers fields. Valid keys are: "remail",
 * "return_path", "date", "from", "reply_to", "in_reply_to", "subject",
 * "to", "cc", "bcc", "message_id" and "custom_headers" (which contains
 * associative array of other headers).
 * </p>
 * @param array $bodies <p>
 * An indexed array of bodies
 * </p>
 * <p>
 * A body is an associative array which can consist of the following keys:
 * "type", "encoding", "charset", "type.parameters", "subtype", "id",
 * "description", "disposition.type", "disposition", "contents.data",
 * "lines", "bytes" and "md5".
 * </p>
 * @return string|false the MIME message.
 */
function imap_mail_compose(array $envelope, array $bodies): string|false {}

/**
 * Create a new mailbox
 * @link https://php.net/manual/en/function.imap-createmailbox.php
 * @param resource $imap
 * @param string $mailbox <p>
 * The mailbox name, see <b>imap_open</b> for more
 * information. Names containing international characters should be
 * encoded by <b>imap_utf7_encode</b>
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function imap_createmailbox(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $mailbox): bool {}

/**
 * Rename an old mailbox to new mailbox
 * @link https://php.net/manual/en/function.imap-renamemailbox.php
 * @param resource $imap
 * @param string $from <p>
 * The old mailbox name, see <b>imap_open</b> for more
 * information
 * </p>
 * @param string $to <p>
 * The new mailbox name, see <b>imap_open</b> for more
 * information
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function imap_renamemailbox(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $from, string $to): bool {}

/**
 * Delete a mailbox
 * @link https://php.net/manual/en/function.imap-deletemailbox.php
 * @param resource $imap
 * @param string $mailbox <p>
 * The mailbox name, see <b>imap_open</b> for more
 * information
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function imap_deletemailbox(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $mailbox): bool {}

/**
 * Subscribe to a mailbox
 * @link https://php.net/manual/en/function.imap-subscribe.php
 * @param resource $imap
 * @param string $mailbox <p>
 * The mailbox name, see <b>imap_open</b> for more
 * information
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function imap_subscribe(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $mailbox): bool {}

/**
 * Unsubscribe from a mailbox
 * @link https://php.net/manual/en/function.imap-unsubscribe.php
 * @param resource $imap
 * @param string $mailbox <p>
 * The mailbox name, see <b>imap_open</b> for more
 * information
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function imap_unsubscribe(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $mailbox): bool {}

/**
 * Append a string message to a specified mailbox
 * @link https://php.net/manual/en/function.imap-append.php
 * @param resource $imap
 * @param string $folder <p>
 * The mailbox name, see <b>imap_open</b> for more
 * information
 * </p>
 * @param string $message <p>
 * The message to be append, as a string
 * </p>
 * <p>
 * When talking to the Cyrus IMAP server, you must use "\r\n" as
 * your end-of-line terminator instead of "\n" or the operation will
 * fail
 * </p>
 * @param string $options [optional] <p>
 * If provided, the <i>options</i> will also be written
 * to the <i>mailbox</i>
 * </p>
 * @param string $internal_date [optional] <p>
 * If this parameter is set, it will set the INTERNALDATE on the appended message. The parameter should be a date string that conforms to the rfc2060 specifications for a date_time value.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function imap_append(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $folder, string $message, ?string $options = null, ?string $internal_date = null): bool {}

/**
 * Check if the IMAP stream is still active
 * @link https://php.net/manual/en/function.imap-ping.php
 * @param resource $imap
 * @return bool <b>TRUE</b> if the stream is still alive, <b>FALSE</b> otherwise.
 */
function imap_ping(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap): bool {}

/**
 * Decode BASE64 encoded text
 * @link https://php.net/manual/en/function.imap-base64.php
 * @param string $string <p>
 * The encoded text
 * </p>
 * @return string|false the decoded message as a string.
 */
function imap_base64(string $string): string|false {}

/**
 * Convert a quoted-printable string to an 8 bit string
 * @link https://php.net/manual/en/function.imap-qprint.php
 * @param string $string <p>
 * A quoted-printable string
 * </p>
 * @return string|false an 8 bits string.
 */
function imap_qprint(string $string): string|false {}

/**
 * Convert an 8bit string to a quoted-printable string
 * @link https://php.net/manual/en/function.imap-8bit.php
 * @param string $string <p>
 * The 8bit string to convert
 * </p>
 * @return string|false a quoted-printable string.
 */
function imap_8bit(string $string): string|false {}

/**
 * Convert an 8bit string to a base64 string
 * @link https://php.net/manual/en/function.imap-binary.php
 * @param string $string <p>
 * The 8bit string
 * </p>
 * @return string|false a base64 encoded string.
 */
function imap_binary(string $string): string|false {}

/**
 * Converts MIME-encoded text to UTF-8
 * @link https://php.net/manual/en/function.imap-utf8.php
 * @param string $mime_encoded_text <p>
 * A MIME encoded string. MIME encoding method and the UTF-8
 * specification are described in RFC2047 and RFC2044 respectively.
 * </p>
 * @return string an UTF-8 encoded string.
 */
function imap_utf8(string $mime_encoded_text): string {}

/**
 * Returns status information on a mailbox
 * @link https://php.net/manual/en/function.imap-status.php
 * @param resource $imap
 * @param string $mailbox <p>
 * The mailbox name, see <b>imap_open</b> for more
 * information
 * </p>
 * @param int $flags <p>
 * Valid flags are:
 * <b>SA_MESSAGES</b> - set $status->messages to the
 * number of messages in the mailbox
 * @return object This function returns an object containing status information.
 * The object has the following properties: messages,
 * recent, unseen,
 * uidnext, and uidvalidity.
 * </p>
 * <p>
 * flags is also set, which contains a bitmask which can
 * be checked against any of the above constants.</p>
 */
#[LanguageLevelTypeAware(['8.1' => 'stdClass|false'], default: 'object')]
function imap_status(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $mailbox, int $flags) {}

/**
 * @param $stream_id
 * @param $options
 */
function imap_status_current($stream_id, $options) {}

/**
 * Get information about the current mailbox
 * @link https://php.net/manual/en/function.imap-mailboxmsginfo.php
 * @param resource $imap
 * @return object|stdClass|false the information in an object with following properties:
 * <table>
 * Mailbox properties
 * <tr valign="top">
 * <td>Date</td>
 * <td>date of last change (current datetime)</td>
 * </tr>
 * <tr valign="top">
 * <td>Driver</td>
 * <td>driver</td>
 * </tr>
 * <tr valign="top">
 * <td>Mailbox</td>
 * <td>name of the mailbox</td>
 * </tr>
 * <tr valign="top">
 * <td>Nmsgs</td>
 * <td>number of messages</td>
 * </tr>
 * <tr valign="top">
 * <td>Recent</td>
 * <td>number of recent messages</td>
 * </tr>
 * <tr valign="top">
 * <td>Unread</td>
 * <td>number of unread messages</td>
 * </tr>
 * <tr valign="top">
 * <td>Deleted</td>
 * <td>number of deleted messages</td>
 * </tr>
 * <tr valign="top">
 * <td>Size</td>
 * <td>mailbox size</td>
 * </tr>
 * </table>
 * </p>
 * <p>
 * Returns <b>FALSE</b> on failure.
 */
function imap_mailboxmsginfo(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap): stdClass {}

/**
 * Sets flags on messages
 * @link https://php.net/manual/en/function.imap-setflag-full.php
 * @param resource $imap
 * @param string $sequence <p>
 * A sequence of message numbers. You can enumerate desired messages
 * with the X,Y syntax, or retrieve all messages
 * within an interval with the X:Y syntax
 * </p>
 * @param string $flag <p>
 * The flags which you can set are \Seen,
 * \Answered, \Flagged,
 * \Deleted, and \Draft as
 * defined by RFC2060.
 * </p>
 * @param int $options [optional] <p>
 * A bit mask that may contain the single option:
 * <b>ST_UID</b> - The sequence argument contains UIDs
 * instead of sequence numbers</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function imap_setflag_full(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $sequence, string $flag, int $options = NIL): bool {}

/**
 * Clears flags on messages
 * @link https://php.net/manual/en/function.imap-clearflag-full.php
 * @param resource $imap
 * @param string $sequence <p>
 * A sequence of message numbers. You can enumerate desired messages
 * with the X,Y syntax, or retrieve all messages
 * within an interval with the X:Y syntax
 * </p>
 * @param string $flag <p>
 * The flags which you can unset are "\\Seen", "\\Answered", "\\Flagged",
 * "\\Deleted", and "\\Draft" (as defined by RFC2060)
 * </p>
 * @param int $options [optional] <p>
 * <i>options</i> are a bit mask and may contain
 * the single option:
 * <b>ST_UID</b> - The sequence argument contains UIDs
 * instead of sequence numbers</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function imap_clearflag_full(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $sequence, string $flag, int $options = 0): bool {}

/**
 * Gets and sort messages
 * @link https://php.net/manual/en/function.imap-sort.php
 * @param resource $imap
 * @param int $criteria <p>
 * Criteria can be one (and only one) of the following:
 * <b>SORTDATE</b> - message Date</p>
 * @param bool $reverse <p>
 * Set this to 1 for reverse sorting
 * </p>
 * @param int $flags [optional] <p>
 * The <i>options</i> are a bitmask of one or more of the
 * following:
 * <b>SE_UID</b> - Return UIDs instead of sequence numbers</p>
 * @param string|null $search_criteria [optional]
 * @param string|null $charset [optional]
 * @return array|false an array of message numbers sorted by the given
 * parameters.
 */
function imap_sort(
    #[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap,
    int $criteria,
    #[LanguageLevelTypeAware(['8.0' => 'bool'], default: 'int')] $reverse,
    int $flags = 0,
    ?string $search_criteria = null,
    ?string $charset = null
): array|false {}

/**
 * This function returns the UID for the given message sequence number
 * @link https://php.net/manual/en/function.imap-uid.php
 * @param resource $imap
 * @param int $message_num <p>
 * The message number.
 * </p>
 * @return int|false The UID of the given message.
 */
function imap_uid(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, int $message_num): int|false {}

/**
 * Gets the message sequence number for the given UID
 * @link https://php.net/manual/en/function.imap-msgno.php
 * @param resource $imap
 * @param int $message_uid <p>
 * The message UID
 * </p>
 * @return int the message sequence number for the given
 * <i>uid</i>.
 */
function imap_msgno(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, int $message_uid): int {}

/**
 * Read the list of mailboxes
 * @link https://php.net/manual/en/function.imap-list.php
 * @param resource $imap
 * @param string $reference <p>
 * <i>ref</i> should normally be just the server
 * specification as described in <b>imap_open</b>.
 * </p>
 * @param string $pattern Specifies where in the mailbox hierarchy
 * to start searching.</p>There are two special characters you can
 * pass as part of the <i>pattern</i>:
 * &#x00027;*&#x00027; and &#x00027;&#37;&#x00027;.
 * &#x00027;*&#x00027; means to return all mailboxes. If you pass
 * <i>pattern</i> as &#x00027;*&#x00027;, you will
 * get a list of the entire mailbox hierarchy.
 * &#x00027;&#37;&#x00027;
 * means to return the current level only.
 * &#x00027;&#37;&#x00027; as the <i>pattern</i>
 * parameter will return only the top level
 * mailboxes; &#x00027;~/mail/&#37;&#x00027; on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory.</p>
 * @return array|false an array containing the names of the mailboxes.
 */
function imap_list(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $reference, string $pattern): array|false {}

/**
 * List all the subscribed mailboxes
 * @link https://php.net/manual/en/function.imap-lsub.php
 * @param resource $imap
 * @param string $reference <p>
 * <i>ref</i> should normally be just the server
 * specification as described in <b>imap_open</b>
 * </p>
 * @param string $pattern Specifies where in the mailbox hierarchy
 * to start searching.</p>There are two special characters you can
 * pass as part of the <i>pattern</i>:
 * &#x00027;*&#x00027; and &#x00027;&#37;&#x00027;.
 * &#x00027;*&#x00027; means to return all mailboxes. If you pass
 * <i>pattern</i> as &#x00027;*&#x00027;, you will
 * get a list of the entire mailbox hierarchy.
 * &#x00027;&#37;&#x00027;
 * means to return the current level only.
 * &#x00027;&#37;&#x00027; as the <i>pattern</i>
 * parameter will return only the top level
 * mailboxes; &#x00027;~/mail/&#37;&#x00027; on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory.</p>
 * @return array|false an array of all the subscribed mailboxes.
 */
function imap_lsub(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $reference, string $pattern): array|false {}

/**
 * Read an overview of the information in the headers of the given message
 * @link https://php.net/manual/en/function.imap-fetch-overview.php
 * @param resource $imap
 * @param string $sequence <p>
 * A message sequence description. You can enumerate desired messages
 * with the X,Y syntax, or retrieve all messages
 * within an interval with the X:Y syntax
 * </p>
 * @param int $flags [optional] <p>
 * <i>sequence</i> will contain a sequence of message
 * indices or UIDs, if this parameter is set to
 * <b>FT_UID</b>.
 * </p>
 * @return array|false an array of objects describing one message header each.
 * The object will only define a property if it exists. The possible
 * properties are:
 * subject - the messages subject
 * from - who sent it
 * to - recipient
 * date - when was it sent
 * message_id - Message-ID
 * references - is a reference to this message id
 * in_reply_to - is a reply to this message id
 * size - size in bytes
 * uid - UID the message has in the mailbox
 * msgno - message sequence number in the mailbox
 * recent - this message is flagged as recent
 * flagged - this message is flagged
 * answered - this message is flagged as answered
 * deleted - this message is flagged for deletion
 * seen - this message is flagged as already read
 * draft - this message is flagged as being a draft
 */
function imap_fetch_overview(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $sequence, int $flags = 0): array|false {}

/**
 * Returns all IMAP alert messages that have occurred
 * @link https://php.net/manual/en/function.imap-alerts.php
 * @return array|false an array of all of the IMAP alert messages generated or <b>FALSE</b> if
 * no alert messages are available.
 */
function imap_alerts(): array|false {}

/**
 * Returns all of the IMAP errors that have occurred
 * @link https://php.net/manual/en/function.imap-errors.php
 * @return array|false This function returns an array of all of the IMAP error messages
 * generated since the last <b>imap_errors</b> call,
 * or the beginning of the page. Returns <b>FALSE</b> if no error messages are
 * available.
 */
function imap_errors(): array|false {}

/**
 * Gets the last IMAP error that occurred during this page request
 * @link https://php.net/manual/en/function.imap-last-error.php
 * @return string|false the full text of the last IMAP error message that occurred on the
 * current page. Returns <b>FALSE</b> if no error messages are available.
 */
function imap_last_error(): string|false {}

/**
 * This function returns an array of messages matching the given search criteria
 * @link https://php.net/manual/en/function.imap-search.php
 * @param resource $imap
 * @param string $criteria <p>
 * A string, delimited by spaces, in which the following keywords are
 * allowed. Any multi-word arguments (e.g.
 * FROM "joey smith") must be quoted. Results will match
 * all <i>criteria</i> entries.
 * ALL - return all messages matching the rest of the criteria</p>
 * @param int $flags [optional] <p>
 * Valid values for <i>options</i> are
 * <b>SE_UID</b>, which causes the returned array to
 * contain UIDs instead of messages sequence numbers.
 * </p>
 * @param string $charset
 * @return array|false an array of message numbers or UIDs.
 * <p>
 * Return <b>FALSE</b> if it does not understand the search
 * <i>criteria</i> or no messages have been found.
 * </p>
 */
function imap_search(
    #[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap,
    string $criteria,
    int $flags = SE_FREE,
    string $charset = ""
): array|false {}

/**
 * Decodes a modified UTF-7 encoded string
 * @link https://php.net/manual/en/function.imap-utf7-decode.php
 * @param string $string <p>
 * A modified UTF-7 encoding string, as defined in RFC 2060, section 5.1.3 (original UTF-7
 * was defined in RFC1642).
 * </p>
 * @return string|false a string that is encoded in ISO-8859-1 and consists of the same
 * sequence of characters in <i>text</i>, or <b>FALSE</b>
 * if <i>text</i> contains invalid modified UTF-7 sequence
 * or <i>text</i> contains a character that is not part of
 * ISO-8859-1 character set.
 */
function imap_utf7_decode(string $string): string|false {}

/**
 * Converts ISO-8859-1 string to modified UTF-7 text
 * @link https://php.net/manual/en/function.imap-utf7-encode.php
 * @param string $string <p>
 * An ISO-8859-1 string.
 * </p>
 * @return string <i>data</i> encoded with the modified UTF-7
 * encoding as defined in RFC 2060,
 * section 5.1.3 (original UTF-7 was defined in RFC1642).
 */
function imap_utf7_encode(string $string): string {}

/**
 * Decode MIME header elements
 * @link https://php.net/manual/en/function.imap-mime-header-decode.php
 * @param string $string <p>
 * The MIME text
 * </p>
 * @return array|false The decoded elements are returned in an array of objects, where each
 * object has two properties, charset and
 * text.
 * </p>
 * <p>
 * If the element hasn't been encoded, and in other words is in
 * plain US-ASCII, the charset property of that element is
 * set to default.
 */
function imap_mime_header_decode(string $string): array|false {}

/**
 * Returns a tree of threaded message
 * @link https://php.net/manual/en/function.imap-thread.php
 * @param resource $imap
 * @param int $flags [optional]
 * @return array|false <b>imap_thread</b> returns an associative array containing
 * a tree of messages threaded by REFERENCES, or <b>FALSE</b>
 * on error.
 * </p>
 * <p>
 * Every message in the current mailbox will be represented by three entries
 * in the resulting array:
 * <p>
 * $thread["XX.num"] - current message number
 * </p>
 * <p>
 * $thread["XX.next"]
 * </p>
 * <p>
 * $thread["XX.branch"]
 * </p>
 */
function imap_thread(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, int $flags = SE_FREE): array|false {}

/**
 * Set or fetch imap timeout
 * @link https://php.net/manual/en/function.imap-timeout.php
 * @param int $timeout_type <p>
 * One of the following:
 * <b>IMAP_OPENTIMEOUT</b>,
 * <b>IMAP_READTIMEOUT</b>,
 * <b>IMAP_WRITETIMEOUT</b>, or
 * <b>IMAP_CLOSETIMEOUT</b>.
 * </p>
 * @param int $timeout [optional] <p>
 * The timeout, in seconds.
 * </p>
 * @return int|bool If the <i>timeout</i> parameter is set, this function
 * returns <b>TRUE</b> on success and <b>FALSE</b> on failure.
 * </p>
 * <p>
 * If <i>timeout</i> is not provided or evaluates to -1,
 * the current timeout value of <i>timeout_type</i> is
 * returned as an integer.
 */
function imap_timeout(int $timeout_type, int $timeout = -1): int|bool {}

/**
 * Retrieve the quota level settings, and usage statics per mailbox
 * @link https://php.net/manual/en/function.imap-get-quota.php
 * @param resource $imap
 * @param string $quota_root <p>
 * <i>quota_root</i> should normally be in the form of
 * user.name where name is the mailbox you wish to
 * retrieve information about.
 * </p>
 * @return array|false an array with integer values limit and usage for the given
 * mailbox. The value of limit represents the total amount of space
 * allowed for this mailbox. The usage value represents the mailboxes
 * current level of capacity. Will return <b>FALSE</b> in the case of failure.
 * </p>
 * <p>
 * As of PHP 4.3, the function more properly reflects the
 * functionality as dictated by the RFC2087.
 * The array return value has changed to support an unlimited number of returned
 * resources (i.e. messages, or sub-folders) with each named resource receiving
 * an individual array key. Each key value then contains an another array with
 * the usage and limit values within it.
 * </p>
 * <p>
 * For backwards compatibility reasons, the original access methods are
 * still available for use, although it is suggested to update.
 */
#[ArrayShape(["usage" => "int", "limit" => "int"])]
function imap_get_quota(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $quota_root): array|false {}

/**
 * Retrieve the quota settings per user
 * @link https://php.net/manual/en/function.imap-get-quotaroot.php
 * @param resource $imap
 * @param string $mailbox <p>
 * <i>quota_root</i> should normally be in the form of
 * which mailbox (i.e. INBOX).
 * </p>
 * @return array|false an array of integer values pertaining to the specified user
 * mailbox. All values contain a key based upon the resource name, and a
 * corresponding array with the usage and limit values within.
 * </p>
 * <p>
 * This function will return <b>FALSE</b> in the case of call failure, and an
 * array of information about the connection upon an un-parsable response
 * from the server.
 */
function imap_get_quotaroot(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $mailbox): array|false {}

/**
 * Sets a quota for a given mailbox
 * @link https://php.net/manual/en/function.imap-set-quota.php
 * @param resource $imap
 * @param string $quota_root <p>
 * The mailbox to have a quota set. This should follow the IMAP standard
 * format for a mailbox: user.name.
 * </p>
 * @param int $mailbox_size <p>
 * The maximum size (in KB) for the <i>quota_root</i>
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function imap_set_quota(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $quota_root, int $mailbox_size): bool {}

/**
 * Sets the ACL for a given mailbox
 * @link https://php.net/manual/en/function.imap-setacl.php
 * @param resource $imap
 * @param string $mailbox <p>
 * The mailbox name, see <b>imap_open</b> for more
 * information
 * </p>
 * @param string $user_id <p>
 * The user to give the rights to.
 * </p>
 * @param string $rights <p>
 * The rights to give to the user. Passing an empty string will delete
 * acl.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function imap_setacl(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $mailbox, string $user_id, string $rights): bool {}

/**
 * Gets the ACL for a given mailbox
 * @link https://php.net/manual/en/function.imap-getacl.php
 * @param resource $imap
 * @param string $mailbox <p>
 * The mailbox name, see <b>imap_open</b> for more
 * information
 * </p>
 * @return array|false an associative array of "folder" => "acl" pairs.
 */
function imap_getacl(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $mailbox): array|false {}

/**
 * @param $stream_id
 * @param $mailbox
 */
function imap_myrights($stream_id, $mailbox) {}

/**
 * @param $stream_id
 * @param $mailbox
 * @param $entry
 * @param $attr
 * @param $value
 */
function imap_setannotation($stream_id, $mailbox, $entry, $attr, $value) {}

/**
 * @param $stream_id
 * @param $mailbox
 * @param $entry
 * @param $attr
 */
function imap_getannotation($stream_id, $mailbox, $entry, $attr) {}

/**
 * Send an email message
 * @link https://php.net/manual/en/function.imap-mail.php
 * @param string $to <p>
 * The receiver
 * </p>
 * @param string $subject <p>
 * The mail subject
 * </p>
 * @param string $message <p>
 * The mail body, see <b>imap_mail_compose</b>
 * </p>
 * @param string $additional_headers [optional] <p>
 * As string with additional headers to be set on the mail
 * </p>
 * @param string $cc [optional]
 * @param string $bcc [optional] <p>
 * The receivers specified in <i>bcc</i> will get the
 * mail, but are excluded from the headers.
 * </p>
 * @param string $return_path [optional] <p>
 * Use this parameter to specify return path upon mail delivery failure.
 * This is useful when using PHP as a mail client for multiple users.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function imap_mail(string $to, string $subject, string $message, ?string $additional_headers = null, ?string $cc = null, ?string $bcc = null, ?string $return_path = null): bool {}

/**
 * Alias of <b>imap_headerinfo</b>
 * @link https://php.net/manual/en/function.imap-header.php
 * @param resource $stream_id An IMAP stream returned by imap_open().
 * @param int $msg_no The message number
 * @param int $from_length [optional] Number of characters for the fetchfrom property. Must be greater than or equal to zero.
 * @param int $subject_length [optional] Number of characters for the fetchsubject property Must be greater than or equal to zero.
 * @param $default_host [optional]
 * @return object Returns the information in an object with following properties:
 * <dl>
 * <dt>toaddress</dt><dd>full to: line, up to 1024 characters</dd>
 * <dt>to</dt><dd>an array of objects from the To: line, with the following properties: personal, adl, mailbox, and host</dd>
 * <dt>fromaddress</dt><dd>full from: line, up to 1024 characters</dd>
 * <dt>from</dt><dd>an array of objects from the From: line, with the following properties: personal, adl, mailbox, and host</dd>
 * <dt>ccaddress</dt><dd>full cc: line, up to 1024 characters</dd>
 * <dt>cc</dt><dd>an array of objects from the Cc: line, with the following properties: personal, adl, mailbox, and host</dd>
 * <dt>bccaddress</dt><dd>full bcc: line, up to 1024 characters</dd>
 * <dt>bcc</dt><dd>an array of objects from the Bcc: line, with the following properties: personal, adl, mailbox, and host</dd>
 * <dt>reply_toaddress</dt><dd>full Reply-To: line, up to 1024 characters</dd>
 * <dt>reply_to</dt><dd>an array of objects from the Reply-To: line, with the following properties: personal, adl, mailbox, and host</dd>
 * <dt>senderaddress</dt><dd>full sender: line, up to 1024 characters</dd>
 * <dt>sender</dt><dd>an array of objects from the Sender: line, with the following properties: personal, adl, mailbox, and host</dd>
 * <dt>return_pathaddress</dt><dd>full Return-Path: line, up to 1024 characters</dd>
 * <dt>return_path</dt><dd>an array of objects from the Return-Path: line, with the following properties: personal, adl, mailbox, and host</dd>
 * <dt>remail -</dt>
 * <dt>date</dt><dd>The message date as found in its headers</dd>
 * <dt>Date</dt><dd>Same as date</dd>
 * <dt>subject</dt><dd>The message subject</dd>
 * <dt>Subject</dt><dd>Same a subject</dd>
 * <dt>in_reply_to -</dt>
 * <dt>message_id -</dt>
 * <dt>newsgroups -</dt>
 * <dt>followup_to -</dt>
 * <dt>references -</dt>
 * <dt>Recent</dt><dd>R if recent and seen, N if recent and not seen, ' ' if not recent.</dd>
 * <dt>Unseen</dt><dd>U if not seen AND not recent, ' ' if seen OR not seen and recent</dd>
 * <dt>Flagged</dt><dd>F if flagged, ' ' if not flagged</dd>
 * <dt>Answered</dt><dd>A if answered, ' ' if unanswered</dd>
 * <dt>Deleted</dt><dd>D if deleted, ' ' if not deleted</dd>
 * <dt>Draft</dt><dd>X if draft, ' ' if not draft</dd>
 * <dt>Msgno</dt><dd>The message number</dd>
 * <dt>MailDate -</dt>
 * <dt>Size</dt><dd>The message size</dd>
 * <dt>udate</dt><dd>mail message date in Unix time</dd>
 * <dt>fetchfrom</dt><dd>from line formatted to fit fromlength characters</dd>
 * <dt>fetchsubject</dt><dd>subject line formatted to fit subjectlength characters</dd>
 * </dl>
 */
#[PhpStormStubsElementAvailable(to: '7.4')]
function imap_header($stream_id, $msg_no, $from_length = 0, $subject_length = 0, $default_host = null) {}

/**
 * Alias of <b>imap_list</b>
 * @link https://php.net/manual/en/function.imap-listmailbox.php
 * @param resource $imap
 * @param string $reference
 * @param string $pattern
 * @return array|false
 */
function imap_listmailbox(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $reference, string $pattern): array|false {}

/**
 * Read the list of mailboxes, returning detailed information on each one
 * @link https://php.net/manual/en/function.imap-getmailboxes.php
 * @param resource $imap
 * @param string $reference <p>
 * <i>ref</i> should normally be just the server
 * specification as described in <b>imap_open</b>
 * </p>
 * @param string $pattern Specifies where in the mailbox hierarchy
 * to start searching.</p>There are two special characters you can
 * pass as part of the <i>pattern</i>:
 * &#x00027;*&#x00027; and &#x00027;&#37;&#x00027;.
 * &#x00027;*&#x00027; means to return all mailboxes. If you pass
 * <i>pattern</i> as &#x00027;*&#x00027;, you will
 * get a list of the entire mailbox hierarchy.
 * &#x00027;&#37;&#x00027;
 * means to return the current level only.
 * &#x00027;&#37;&#x00027; as the <i>pattern</i>
 * parameter will return only the top level
 * mailboxes; &#x00027;~/mail/&#37;&#x00027; on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory.</p>
 * @return array|false an array of objects containing mailbox information. Each
 * object has the attributes <i>name</i>, specifying
 * the full name of the mailbox; <i>delimiter</i>,
 * which is the hierarchy delimiter for the part of the hierarchy
 * this mailbox is in; and
 * <i>attributes</i>. <i>Attributes</i>
 * is a bitmask that can be tested against:
 * <p>
 * <b>LATT_NOINFERIORS</b> - This mailbox contains, and may not contain any
 * "children" (there are no mailboxes below this one). Calling
 * <b>imap_createmailbox</b> will not work on this mailbox.
 * </p>
 * <p>
 * <b>LATT_NOSELECT</b> - This is only a container,
 * not a mailbox - you cannot open it.
 * </p>
 * <p>
 * <b>LATT_MARKED</b> - This mailbox is marked. This means that it may
 * contain new messages since the last time it was checked. Not provided by all IMAP
 * servers.
 * </p>
 * <p>
 * <b>LATT_UNMARKED</b> - This mailbox is not marked, does not contain new
 * messages. If either <b>MARKED</b> or <b>UNMARKED</b> is
 * provided, you can assume the IMAP server supports this feature for this mailbox.
 * </p>
 */
function imap_getmailboxes(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $reference, string $pattern): array|false {}

/**
 * Alias of <b>imap_listscan</b>
 * @link https://php.net/manual/en/function.imap-scanmailbox.php
 * @param $imap
 * @param $reference
 * @param $pattern
 * @param $content
 */
function imap_scanmailbox(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $reference, string $pattern, string $content): array|false {}

/**
 * Alias of <b>imap_lsub</b>
 * @link https://php.net/manual/en/function.imap-listsubscribed.php
 * @param resource $imap
 * @param string $reference
 * @param string $pattern
 * @return array|false
 */
function imap_listsubscribed(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $reference, string $pattern): array|false {}

/**
 * List all the subscribed mailboxes
 * @link https://php.net/manual/en/function.imap-getsubscribed.php
 * @param resource $imap
 * @param string $reference <p>
 * <i>ref</i> should normally be just the server
 * specification as described in <b>imap_open</b>
 * </p>
 * @param string $pattern Specifies where in the mailbox hierarchy
 * to start searching.</p>There are two special characters you can
 * pass as part of the <i>pattern</i>:
 * &#x00027;*&#x00027; and &#x00027;&#37;&#x00027;.
 * &#x00027;*&#x00027; means to return all mailboxes. If you pass
 * <i>pattern</i> as &#x00027;*&#x00027;, you will
 * get a list of the entire mailbox hierarchy.
 * &#x00027;&#37;&#x00027;
 * means to return the current level only.
 * &#x00027;&#37;&#x00027; as the <i>pattern</i>
 * parameter will return only the top level
 * mailboxes; &#x00027;~/mail/&#37;&#x00027; on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory.</p>
 * @return array|false an array of objects containing mailbox information. Each
 * object has the attributes <i>name</i>, specifying
 * the full name of the mailbox; <i>delimiter</i>,
 * which is the hierarchy delimiter for the part of the hierarchy
 * this mailbox is in; and
 * <i>attributes</i>. <i>Attributes</i>
 * is a bitmask that can be tested against:
 * <b>LATT_NOINFERIORS</b> - This mailbox has no
 * "children" (there are no mailboxes below this one).
 * <b>LATT_NOSELECT</b> - This is only a container,
 * not a mailbox - you cannot open it.
 * <b>LATT_MARKED</b> - This mailbox is marked.
 * Only used by UW-IMAPD.
 * <b>LATT_UNMARKED</b> - This mailbox is not marked.
 * Only used by UW-IMAPD.
 */
function imap_getsubscribed(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $reference, string $pattern): array|false {}

/**
 * (PHP 4, PHP 5)<br/>
 * Alias of imap_body()
 * @param resource $imap An IMAP stream returned by imap_open()
 * @param int $message_num message number
 * @param int $flags [optional] A bitmask with one or more of the following:<ul>
 * <li>FT_UID - The msg_number is a UID
 * <li>FT_PEEK - Do not set the \Seen flag if not already set
 * <li>FT_INTERNAL - The return string is in internal format, will not canonicalize to CRLF.</ul><p>
 * @return string|false body of the specified message
 */
function imap_fetchtext(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, int $message_num, int $flags = 0): string|false {}

/**
 * Alias of <b>imap_listscan</b>
 * @link https://php.net/manual/en/function.imap-scan.php
 * @param $imap
 * @param $reference
 * @param $pattern
 * @param $content
 */
function imap_scan(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $reference, string $pattern, string $content): array|false {}

/**
 * Alias of <b>imap_createmailbox</b>
 * @link https://php.net/manual/en/function.imap-create.php
 * @param $imap
 * @param $mailbox
 */
function imap_create(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $mailbox): bool {}

/**
 * Alias of <b>imap_renamemailbox</b>
 * @link https://php.net/manual/en/function.imap-rename.php
 * @param $imap
 * @param $from
 * @param $to
 */
function imap_rename(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $from, string $to): bool {}

/**
 * Decode a modified UTF-7 string to UTF-8
 *
 * @link https://www.php.net/manual/en/function.imap-mutf7-to-utf8.php
 *
 * @param string $string
 * @return string|false
 */
function imap_mutf7_to_utf8(string $string): string|false {}

/**
 * Encode a UTF-8 string to modified UTF-7
 *
 * @link https://www.php.net/manual/en/function.imap-utf8-to-mutf7.php
 *
 * @param string $string
 * @return string|false
 */
function imap_utf8_to_mutf7(string $string): string|false {}

/**
 * @since 8.2
 */
function imap_is_open(IMAP\Connection $imap): bool {}

/**
 * @deprecated 8.1
 */
define('NIL', 0);
define('IMAP_OPENTIMEOUT', 1);
define('IMAP_READTIMEOUT', 2);
define('IMAP_WRITETIMEOUT', 3);
define('IMAP_CLOSETIMEOUT', 4);
define('OP_DEBUG', 1);

/**
 * Open mailbox read-only
 * @link https://php.net/manual/en/imap.constants.php
 */
define('OP_READONLY', 2);

/**
 * Don't use or update a .newsrc for news
 * (NNTP only)
 * @link https://php.net/manual/en/imap.constants.php
 */
define('OP_ANONYMOUS', 4);
define('OP_SHORTCACHE', 8);
define('OP_SILENT', 16);
define('OP_PROTOTYPE', 32);

/**
 * For IMAP and NNTP
 * names, open a connection but don't open a mailbox.
 * @link https://php.net/manual/en/imap.constants.php
 */
define('OP_HALFOPEN', 64);
define('OP_EXPUNGE', 128);
define('OP_SECURE', 256);

/**
 * silently expunge the mailbox before closing when
 * calling <b>imap_close</b>
 * @link https://php.net/manual/en/imap.constants.php
 */
define('CL_EXPUNGE', 32768);

/**
 * The parameter is a UID
 * @link https://php.net/manual/en/imap.constants.php
 */
define('FT_UID', 1);

/**
 * Do not set the \Seen flag if not already set
 * @link https://php.net/manual/en/imap.constants.php
 */
define('FT_PEEK', 2);
define('FT_NOT', 4);

/**
 * The return string is in internal format, will not canonicalize to CRLF.
 * @link https://php.net/manual/en/imap.constants.php
 */
define('FT_INTERNAL', 8);
define('FT_PREFETCHTEXT', 32);

/**
 * The sequence argument contains UIDs instead of sequence numbers
 * @link https://php.net/manual/en/imap.constants.php
 */
define('ST_UID', 1);
define('ST_SILENT', 2);
define('ST_SET', 4);

/**
 * the sequence numbers contain UIDS
 * @link https://php.net/manual/en/imap.constants.php
 */
define('CP_UID', 1);

/**
 * Delete the messages from the current mailbox after copying
 * with <b>imap_mail_copy</b>
 * @link https://php.net/manual/en/imap.constants.php
 */
define('CP_MOVE', 2);

/**
 * Return UIDs instead of sequence numbers
 * @link https://php.net/manual/en/imap.constants.php
 */
define('SE_UID', 1);
define('SE_FREE', 2);

/**
 * Don't prefetch searched messages
 * @link https://php.net/manual/en/imap.constants.php
 */
define('SE_NOPREFETCH', 4);
define('SO_FREE', 8);
define('SO_NOSERVER', 8);
define('SA_MESSAGES', 1);
define('SA_RECENT', 2);
define('SA_UNSEEN', 4);
define('SA_UIDNEXT', 8);
define('SA_UIDVALIDITY', 16);
define('SA_ALL', 31);

/**
 * This mailbox has no "children" (there are no
 * mailboxes below this one).
 * @link https://php.net/manual/en/imap.constants.php
 */
define('LATT_NOINFERIORS', 1);

/**
 * This is only a container, not a mailbox - you
 * cannot open it.
 * @link https://php.net/manual/en/imap.constants.php
 */
define('LATT_NOSELECT', 2);

/**
 * This mailbox is marked. Only used by UW-IMAPD.
 * @link https://php.net/manual/en/imap.constants.php
 */
define('LATT_MARKED', 4);

/**
 * This mailbox is not marked. Only used by
 * UW-IMAPD.
 * @link https://php.net/manual/en/imap.constants.php
 */
define('LATT_UNMARKED', 8);
define('LATT_REFERRAL', 16);
define('LATT_HASCHILDREN', 32);
define('LATT_HASNOCHILDREN', 64);

/**
 * Sort criteria for <b>imap_sort</b>:
 * message Date
 * @link https://php.net/manual/en/imap.constants.php
 */
define('SORTDATE', 0);

/**
 * Sort criteria for <b>imap_sort</b>:
 * arrival date
 * @link https://php.net/manual/en/imap.constants.php
 */
define('SORTARRIVAL', 1);

/**
 * Sort criteria for <b>imap_sort</b>:
 * mailbox in first From address
 * @link https://php.net/manual/en/imap.constants.php
 */
define('SORTFROM', 2);

/**
 * Sort criteria for <b>imap_sort</b>:
 * message subject
 * @link https://php.net/manual/en/imap.constants.php
 */
define('SORTSUBJECT', 3);

/**
 * Sort criteria for <b>imap_sort</b>:
 * mailbox in first To address
 * @link https://php.net/manual/en/imap.constants.php
 */
define('SORTTO', 4);

/**
 * Sort criteria for <b>imap_sort</b>:
 * mailbox in first cc address
 * @link https://php.net/manual/en/imap.constants.php
 */
define('SORTCC', 5);

/**
 * Sort criteria for <b>imap_sort</b>:
 * size of message in octets
 * @link https://php.net/manual/en/imap.constants.php
 */
define('SORTSIZE', 6);
define('TYPETEXT', 0);
define('TYPEMULTIPART', 1);
define('TYPEMESSAGE', 2);
define('TYPEAPPLICATION', 3);
define('TYPEAUDIO', 4);
define('TYPEIMAGE', 5);
define('TYPEVIDEO', 6);
define('TYPEMODEL', 7);
define('TYPEOTHER', 8);
define('ENC7BIT', 0);
define('ENC8BIT', 1);
define('ENCBINARY', 2);
define('ENCBASE64', 3);
define('ENCQUOTEDPRINTABLE', 4);
define('ENCOTHER', 5);

/**
 * Garbage collector, clear message cache elements.
 * @link https://php.net/manual/en/imap.constants.php
 */
define('IMAP_GC_ELT', 1);

/**
 * Garbage collector, clear envelopes and bodies.
 * @link https://php.net/manual/en/imap.constants.php
 */
define('IMAP_GC_ENV', 2);

/**
 * Garbage collector, clear texts.
 * @link https://php.net/manual/en/imap.constants.php
 */
define('IMAP_GC_TEXTS', 4);
<?php

namespace IMAP;

/**
 * @since 8.1
 */
final class Connection {}
<?php

/**
 * The MIT License (MIT)
 *
 * Copyright (c) Tawana Musewe
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * <https://opensource.org/licenses/MIT>.
 */

/**
 * Helper autocomplete for phpredis extension
 *
 * @author  Tawana Musewe <tawana@aeonis.co.za>
 * @link    https://github.com/tbtmuse/phpredis-sentinel-phpdoc
 */
class RedisSentinel
{
    /**
     * Creates a Redis Sentinel
     *
     * @param string      $host          Sentinel IP address or hostname
     * @param int         $port          Sentinel Port
     * @param float       $timeout       Value in seconds (optional, default is 0 meaning unlimited)
     * @param string|null $persistent    Persistent connection id (optional, default is null meaning not persistent)
     * @param int         $retryInterval Value in milliseconds (optional, default is 0)
     * @param float       $readTimeout   Value in seconds (optional, default is 0 meaning unlimited)
     *
     * @example
     * // 1s timeout, 100ms delay between reconnection attempts.
     * $sentinel = new RedisSentinel('127.0.0.1', 26379, 1, null, 100);
     */
    public function __construct(
        string $host,
        int $port,
        float $timeout = 0,
        ?string $persistent = null,
        int $retryInterval = 0,
        float $readTimeout = 0
    ) {}

    /**
     * Check if the current Sentinel configuration is able to reach the quorum needed to failover a master, and the
     * majority needed to authorize the failover. This command should be used in monitoring systems to check if a
     * Sentinel deployment is ok.
     *
     * @param string $master Name of master
     *
     * @return bool True in case of success, False in case of failure.
     *
     * @example $sentinel->ckquorum('mymaster');
     *
     * @since   >= 5.2.0
     */
    public function ckquorum(string $master): bool {}

    /**
     * Force a failover as if the master was not reachable, and without asking for agreement to other Sentinels
     * (however a new version of the configuration will be published so that the other Sentinels will update
     * their configurations).
     *
     * @param string $master Name of master
     *
     * @return bool True in case of success, False in case of failure.
     *
     * @example $sentinel->failover('mymaster');
     *
     * @since   >= 5.2.0
     */
    public function failover(string $master): bool {}

    /**
     * Force Sentinel to rewrite its configuration on disk, including the current Sentinel state.
     *
     * Normally Sentinel rewrites the configuration every time something changes in its state (in the context of the
     * subset of the state which is persisted on disk across restart). However sometimes it is possible that the
     * configuration file is lost because of operation errors, disk failures, package upgrade scripts or configuration
     * managers. In those cases a way to to force Sentinel to rewrite the configuration file is handy.
     *
     * This command works even if the previous configuration file is completely missing.
     *
     * @return bool True in case of success, False in case of failure.
     *
     * @example $sentinel->flushconfig();
     *
     * @since   >= 5.2.0
     */
    public function flushconfig(): bool {}

    /**
     * Return the ip and port number of the master with that name. If a failover is in progress or terminated
     * successfully for this master it returns the address and port of the promoted replica.
     *
     * @param string $master Name of master
     *
     * @return array|false ['address', 'port'] in case of success, False in case of failure.
     *
     * @example $sentinel->getMasterAddrByName('mymaster');
     *
     * @since   >= 5.2.0
     */
    public function getMasterAddrByName(string $master) {}

    /**
     * Return the state and info of the specified master
     *
     * @param string $master Name of master
     *
     * @return array|false Associative array with info in case of success, False in case of failure.
     *
     * @example $sentinel->master('mymaster');
     *
     * @since   >= 5.2.0
     */
    public function master(string $master) {}

    /**
     * Return a list of monitored masters and their state
     *
     * @return array|false Array of arrays with info for each master in case of success, FALSE in case of failure.
     *
     * @example $sentinel->masters();
     *
     * @since   >= 5.2.0
     */
    public function masters() {}

    /**
     * Ping the sentinel
     *
     * @return bool True in case of success, False in case of failure
     *
     * @example $sentinel->ping();
     *
     * @since   >= 5.2.0
     */
    public function ping(): bool {}

    /**
     * Reset all the masters with matching name. The pattern argument is a glob-style pattern.
     * The reset process clears any previous state in a master (including a failover in progress), and removes every
     * replica and sentinel already discovered and associated with the master.
     *
     * @param string $pattern Glob-style pattern
     *
     * @return bool True in case of success, False in case of failure
     *
     * @example $sentinel->reset('*');
     *
     * @since   >= 5.2.0
     */
    public function reset(string $pattern): bool {}

    /**
     * Return a list of sentinel instances for this master, and their state
     *
     * @param string $master Name of master
     *
     * @return array|false Array of arrays with info for each sentinel in case of success, False in case of failure
     *
     * @example $sentinel->sentinels('mymaster');
     *
     * @since   >= 5.2.0
     */
    public function sentinels(string $master) {}

    /**
     * Return a list of sentinel instances for this master, and their state
     *
     * @param string $master Name of master
     *
     * @return array|false Array of arrays with info for each replica in case of success, False in case of failure
     *
     * @example $sentinel->slaves('mymaster');
     *
     * @since   >= 5.2.0
     */
    public function slaves(string $master) {}
}
<?php

use JetBrains\PhpStorm\Deprecated;

/**
 * Helper autocomplete for php redis extension
 *
 * @link https://github.com/phpredis/phpredis/blob/develop/redis.stub.php
 */
class Redis
{
    public const AFTER = 'after';
    public const BEFORE = 'before';
    public const LEFT = 'left';
    public const RIGHT = 'right';

    /**
     * Options
     */
    public const OPT_SERIALIZER = 1;
    public const OPT_PREFIX = 2;
    public const OPT_READ_TIMEOUT = 3;
    public const OPT_SCAN = 4;
    public const OPT_FAILOVER = 5;
    public const OPT_TCP_KEEPALIVE = 6;
    public const OPT_COMPRESSION = 7;
    public const OPT_REPLY_LITERAL = 8;
    public const OPT_COMPRESSION_LEVEL = 9;
    public const OPT_NULL_MULTIBULK_AS_NULL = 10;
    public const OPT_MAX_RETRIES = 11;
    public const OPT_BACKOFF_ALGORITHM = 12;
    public const OPT_BACKOFF_BASE = 13;
    public const OPT_BACKOFF_CAP = 14;

    /**
     * Cluster options
     */
    public const FAILOVER_NONE = 0;
    public const FAILOVER_ERROR = 1;
    public const FAILOVER_DISTRIBUTE = 2;
    public const FAILOVER_DISTRIBUTE_SLAVES = 3;

    /**
     * SCAN options
     */
    public const SCAN_NORETRY = 0;
    public const SCAN_RETRY = 1;

    /**
     * @since 5.3.0
     */
    public const SCAN_PREFIX = 2;

    /**
     * @since 5.3.0
     */
    public const SCAN_NOPREFIX = 3;

    /**
     * Serializers
     */
    public const SERIALIZER_NONE = 0;
    public const SERIALIZER_PHP = 1;
    public const SERIALIZER_IGBINARY = 2;
    public const SERIALIZER_MSGPACK = 3;
    public const SERIALIZER_JSON = 4;

    /**
     * Compressions
     */
    public const COMPRESSION_NONE = 0;
    public const COMPRESSION_LZF = 1;
    public const COMPRESSION_ZSTD = 2;
    public const COMPRESSION_LZ4 = 3;

    /**
     * Compression ZSTD levels
     */
    public const COMPRESSION_ZSTD_MIN = 1;
    public const COMPRESSION_ZSTD_DEFAULT = 3;
    public const COMPRESSION_ZSTD_MAX = 22;

    /**
     * Multi
     */
    public const ATOMIC = 0;
    public const MULTI = 1;
    public const PIPELINE = 2;

    /**
     * Types
     */
    public const REDIS_NOT_FOUND = 0;
    public const REDIS_STRING = 1;
    public const REDIS_SET = 2;
    public const REDIS_LIST = 3;
    public const REDIS_ZSET = 4;
    public const REDIS_HASH = 5;
    public const REDIS_STREAM = 6;

    /**
     * Backoff algorithms
     * @since 5.3.5
     */
    public const BACKOFF_ALGORITHM_DEFAULT = 0;
    public const BACKOFF_ALGORITHM_DECORRELATED_JITTER = 1;
    public const BACKOFF_ALGORITHM_FULL_JITTER = 2;
    public const BACKOFF_ALGORITHM_EQUAL_JITTER = 3;
    public const BACKOFF_ALGORITHM_EXPONENTIAL = 4;
    public const BACKOFF_ALGORITHM_UNIFORM = 5;
    public const BACKOFF_ALGORITHM_CONSTANT = 6;

    /**
     * Creates a Redis client
     *
     * @param array|null $options configuration options
     *
     * @example
     *
     * $redis = new Redis();
     *
     * // Starting from version 6.0.0 it's possible to specify configuration options.
     * // This allows to connect to the server without explicitly invoking connect command.
     * $redis = new Redis([
     *     // If you do wish to connect via the constructor, only 'host' is strictly required,
     *     // which will cause PhpRedis to connect to that host on Redis' default port (6379).
     *     'host' => '127.0.0.1',
     *     'port' => 6379,
     *     'readTimeout' => 2.5,
     *     'connectTimeout' => 2.5,
     *     'persistent' => true,
     *     // Valid formats: NULL, ['user', 'pass'], 'pass', or ['pass']
     *     'auth' => ['phpredis', 'phpredis'],
     *     // See PHP stream options for valid SSL configuration settings.
     *     'ssl' => ['verify_peer' => false],
     *     // How quickly to retry a connection after we time out or it  closes.
     *     // Note that this setting is overridden by 'backoff' strategies.
     *     'retryInterval' => 100,
     *     // Which backoff algorithm to use. 'decorrelated jitter' is likely the
     *     // bestone for most solution, but there are many to choose from
     *     'backoff' => [
     *         'algorithm' => Redis::BACKOFF_ALGORITHM_DECORRELATED_JITTER,
     *         // 'base', and 'cap' are in milliseconds and represent the first delay redis will
     *         // use when reconnecting, and the maximum delay we will reach while retrying.
     *         'base' => 500,
     *         'cap' => 750,
     *     ],
     * ]);
     */
    public function __construct($options = null) {}

    /**
     * Connects to a Redis instance.
     *
     * @param string $host           can be a host, or the path to a unix domain socket
     * @param int    $port           optional
     * @param float  $timeout        value in seconds (optional, default is 0.0 meaning unlimited)
     * @param string|null $persistent_id  identity for the requested persistent connection
     * @param int    $retry_interval retry interval in milliseconds.
     * @param float  $read_timeout   value in seconds (optional, default is 0 meaning unlimited)
     * @param array|null $context    since PhpRedis >= 5.3.0 can specify authentication and stream information on connect
     *
     * @return bool TRUE on success, FALSE on error
     *
     * @throws RedisException
     *
     * @example
     * <pre>
     * $redis->connect('127.0.0.1', 6379);
     * $redis->connect('127.0.0.1');            // port 6379 by default
     * $redis->connect('127.0.0.1', 6379, 2.5); // 2.5 sec timeout.
     * $redis->connect('/tmp/redis.sock');      // unix domain socket.
     * // since PhpRedis >= 5.3.0 can specify authentication and stream information on connect
     * $redis->connect('127.0.0.1', 6379, 1, NULL, 0, 0, ['auth' => ['phpredis', 'phpredis']]);
     * </pre>
     */
    public function connect(
        $host,
        $port = 6379,
        $timeout = 0,
        $persistent_id = null,
        $retry_interval = 0,
        $read_timeout = 0,
        $context = null
    ) {}

    /**
     * Connects to a Redis instance.
     *
     * @param string $host           can be a host, or the path to a unix domain socket
     * @param int    $port           optional
     * @param float  $timeout        value in seconds (optional, default is 0.0 meaning unlimited)
     * @param string $persistent_id  identity for the requested persistent connection
     * @param int    $retry_interval retry interval in milliseconds.
     * @param float  $read_timeout   value in seconds (optional, default is 0 meaning unlimited)
     * @param array  $context        since PhpRedis >= 5.3.0 can specify authentication and stream information on connect
     *
     * @return bool TRUE on success, FALSE on error
     *
     * @throws RedisException
     */
    #[Deprecated(replacement: '%class%->connect(%parametersList%)')]
    public function open(
        $host,
        $port = 6379,
        $timeout = 0,
        $persistent_id = null,
        $retry_interval = 0,
        $read_timeout = 0,
        $context = null
    ) {}

    /**
     * A method to determine if a phpredis object thinks it's connected to a server
     *
     * @return bool Returns TRUE if phpredis thinks it's connected and FALSE if not
     *
     * @throws RedisException
     */
    public function isConnected() {}

    /**
     * Retrieve our host or unix socket that we're connected to
     *
     * @return string|false The host or unix socket we're connected to or FALSE if we're not connected
     *
     * @throws RedisException
     */
    public function getHost() {}

    /**
     * Get the port we're connected to
     *
     * This number will be zero if we are connected to a unix socket.
     *
     * @return int|false Returns the port we're connected to or FALSE if we're not connected
     *
     * @throws RedisException
     */
    public function getPort() {}

    /**
     * Get the database number phpredis is pointed to
     *
     * @return int|bool Returns the database number (int) phpredis thinks it's pointing to
     * or FALSE if we're not connected
     *
     * @throws RedisException
     */
    public function getDbNum() {}

    /**
     * Get the (write) timeout in use for phpredis
     *
     * @return float|false The timeout (DOUBLE) specified in our connect call or FALSE if we're not connected
     *
     * @throws RedisException
     */
    public function getTimeout() {}

    /**
     * Get the read timeout specified to phpredis or FALSE if we're not connected
     *
     * @return float|bool Returns the read timeout (which can be set using setOption and Redis::OPT_READ_TIMEOUT)
     * or FALSE if we're not connected
     *
     * @throws RedisException
     */
    public function getReadTimeout() {}

    /**
     * Gets the persistent ID that phpredis is using
     *
     * @return string|null|bool Returns the persistent id phpredis is using
     * (which will only be set if connected with pconnect),
     * NULL if we're not using a persistent ID,
     * and FALSE if we're not connected
     *
     * @throws RedisException
     */
    public function getPersistentID() {}

    /**
     * Get the authentication information on the connection, if any.
     *
     * @return mixed The authentication information used to authenticate the connection.
     *
     * @throws RedisException
     */
    public function getAuth() {}

    /**
     * Connects to a Redis instance or reuse a connection already established with pconnect/popen.
     *
     * The connection will not be closed on close or end of request until the php process ends.
     * So be patient on to many open FD's (specially on redis server side) when using persistent connections on
     * many servers connecting to one redis server.
     *
     * Also more than one persistent connection can be made identified by either host + port + timeout
     * or host + persistentId or unix socket + timeout.
     *
     * This feature is not available in threaded versions. pconnect and popen then working like their non persistent
     * equivalents.
     *
     * @param string $host           can be a host, or the path to a unix domain socket
     * @param int    $port           optional
     * @param float  $timeout        value in seconds (optional, default is 0.0 meaning unlimited)
     * @param string|null $persistent_id  identity for the requested persistent connection
     * @param int    $retry_interval retry interval in milliseconds.
     * @param float  $read_timeout   value in seconds (optional, default is 0 meaning unlimited)
     * @param array|null $context    since PhpRedis >= 5.3.0 can specify authentication and stream information on connect
     *
     * @return bool TRUE on success, FALSE on ertcnror.
     *
     * @throws RedisException
     *
     * @example
     * <pre>
     * $redis->pconnect('127.0.0.1', 6379);
     *
     * // port 6379 by default - same connection like before
     * $redis->pconnect('127.0.0.1');
     *
     * // 2.5 sec timeout and would be another connection than the two before.
     * $redis->pconnect('127.0.0.1', 6379, 2.5);
     *
     * // x is sent as persistent_id and would be another connection than the three before.
     * $redis->pconnect('127.0.0.1', 6379, 2.5, 'x');
     *
     * // unix domain socket - would be another connection than the four before.
     * $redis->pconnect('/tmp/redis.sock');
     * </pre>
     */
    public function pconnect(
        $host,
        $port = 6379,
        $timeout = 0,
        $persistent_id = null,
        $retry_interval = 0,
        $read_timeout = 0,
        $context = null
    ) {}

    /**
     * @param string $host
     * @param int    $port
     * @param float  $timeout
     * @param string|null $persistent_id
     * @param int    $retry_interval
     * @param float  $read_timeout
     * @param array|null $context
     *
     * @return bool
     *
     * @throws RedisException
     */
    #[Deprecated(replacement: '%class%->pconnect(%parametersList%)')]
    public function popen(
        $host,
        $port = 6379,
        $timeout = 0,
        $persistent_id = null,
        $retry_interval = 0,
        $read_timeout = 0,
        $context = null
    ) {}

    /**
     * Disconnects from the Redis instance.
     *
     * Note: Closing a persistent connection requires PhpRedis >= 4.2.0
     *
     * @since >= 4.2 Closing a persistent connection requires PhpRedis
     *
     * @return bool TRUE on success, FALSE on error
     *
     * @throws RedisException
     */
    public function close() {}

    /**
     * Swap one Redis database with another atomically
     *
     * Note: Requires Redis >= 4.0.0
     *
     * @param int $db1
     * @param int $db2
     *
     * @return bool TRUE on success and FALSE on failure
     *
     * @throws RedisException
     *
     * @link https://redis.io/commands/swapdb
     * @since >= 4.0
     * @example
     * <pre>
     * // Swaps DB 0 with DB 1 atomically
     * $redis->swapdb(0, 1);
     * </pre>
     */
    public function swapdb(int $db1, int $db2) {}

    /**
     * Set a configurable option on the Redis object.
     *
     * @param int   $option The option constant.
     * @param mixed $value  The option value.
     *
     * @return bool TRUE on success, FALSE on error
     *
     * @throws RedisException
     *
     * @example
     * <pre>
     * $redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_NONE);        // don't serialize data
     * $redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_PHP);         // use built-in serialize/unserialize
     * $redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_IGBINARY);    // use igBinary serialize/unserialize
     * $redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_MSGPACK);     // Use msgpack serialize/unserialize
     * $redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_JSON);        // Use json serialize/unserialize
     *
     * $redis->setOption(Redis::OPT_PREFIX, 'myAppName:');                      // use custom prefix on all keys
     *
     * // Options for the SCAN family of commands, indicating whether to abstract
     * // empty results from the user.  If set to SCAN_NORETRY (the default), phpredis
     * // will just issue one SCAN command at a time, sometimes returning an empty
     * // array of results.  If set to SCAN_RETRY, phpredis will retry the scan command
     * // until keys come back OR Redis returns an iterator of zero
     * $redis->setOption(Redis::OPT_SCAN, Redis::SCAN_NORETRY);
     * $redis->setOption(Redis::OPT_SCAN, Redis::SCAN_RETRY);
     * </pre>
     */
    public function setOption($option, $value) {}

    /**
     * Retrieve the value of a configuration setting as set by Redis::setOption()
     *
     * @param int $option parameter name
     *
     * @return mixed|null The setting itself or false on failure.
     *
     * @throws RedisException
     *
     * @see setOption()
     * @example
     * // return option value
     * $redis->getOption(Redis::OPT_SERIALIZER);
     */
    public function getOption($option) {}

    /**
     * Check the current connection status
     *
     * @param string $message An optional string message that Redis will reply with, if passed.
     *
     * @return bool|string TRUE if the command is successful or returns message
     * Throws a RedisException object on connectivity error, as described above.
     * @throws RedisException
     * @link    https://redis.io/commands/ping
     *
     * @example
     * // When called without an argument, PING returns `TRUE`
     * $redis->ping();
     *
     * // If passed an argument, that argument is returned. Here 'hello' will be returned
     * $redis->ping('hello');
     */
    public function ping($message = null) {}

    /**
     * Sends a string to Redis, which replies with the same string
     *
     * @param string $message
     *
     * @return string|Redis The string sent to Redis or false on failure or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/echo
     *
     * @example $redis->echo('Hello, World');
     */
    public function echo($message) {}

    /**
     * Get the value related to the specified key
     *
     * @param string $key
     *
     * @return string|mixed|false|Redis If key didn't exist, FALSE is returned or Redis if in multimode
     * Otherwise, the value related to this key is returned
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/get
     * @example
     * <pre>
     * $redis->set('key', 'hello');
     * $redis->get('key');
     *
     * // set and get with serializer
     * $redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_JSON);
     *
     * $redis->set('key', ['asd' => 'as', 'dd' => 123, 'b' => true]);
     * var_dump($redis->get('key'));
     * // Output:
     * array(3) {
     *  'asd' => string(2) "as"
     *  'dd' => int(123)
     *  'b' => bool(true)
     * }
     * </pre>
     */
    public function get($key) {}

    /**
     * Set the string value in argument as value of the key.
     *
     * @since If you're using Redis >= 2.6.12, you can pass extended options as explained in example
     *
     * @param string $key     The key name to set.
     * @param mixed  $value   The value to set the key to.
     * @param mixed  $options Either an array with options for how to perform the set or an integer with an expiration.
     *                        If an expiration is set PhpRedis will actually send the `SETEX` command.
     * Since 2.6.12 it also supports different flags inside an array.
     * OPTION                         DESCRIPTION
     * ------------                   --------------------------------------------------------------
     * ['EX' => 60]                   expire 60 seconds.
     * ['PX' => 6000]                 expire in 6000 milliseconds.
     * ['EXAT' => time() + 10]        expire in 10 seconds.
     * ['PXAT' => time()*1000 + 1000] expire in 1 second.
     * ['KEEPTTL' => true]            Redis will not update the key's current TTL.
     * ['XX']                         Only set the key if it already exists.
     * ['NX']                         Only set the key if it doesn't exist.
     * ['GET']                        Instead of returning `+OK` return the previous value of the
     *                                key or NULL if the key didn't exist.
     *
     * @example
     * <pre>
     * // Simple key -> value set
     * $redis->set('key', 'value');
     *
     * // Will redirect, and actually make an SETEX call
     * $redis->set('key','value', 10);
     *
     * // Will set the key, if it doesn't exist, with a ttl of 10 seconds
     * $redis->set('key', 'value', ['nx', 'ex' => 10]);
     *
     * // Will set a key, if it does exist, with a ttl of 1000 milliseconds
     * $redis->set('key', 'value', ['xx', 'px' => 1000]);
     * </pre>
     *
     * @return bool|Redis TRUE if the command is successful or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link     https://redis.io/commands/set
     */
    public function set($key, $value, $options = null) {}

    /**
     * Set the string value in argument as value of the key, with a time to live.
     *
     * @param string $key    The name of the key to set.
     * @param int    $expire The key's expiration in seconds.
     * @param mixed  $value  The value to set the key.
     *
     * @return bool|Redis returns Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/setex
     * @example $redis->setex('key', 3600, 'value'); // sets key → value, with 1h TTL.
     */
    public function setex($key, $expire, $value) {}

    /**
     * Set the value and expiration in milliseconds of a key.
     *
     * @see     setex()
     * @param string $key    The key to set
     * @param int    $expire The TTL to set, in milliseconds.
     * @param mixed  $value  The value to set the key to.
     *
     * @return bool|Redis returns Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/psetex
     * @example $redis->psetex('key', 1000, 'value'); // sets key → value, with 1sec TTL.
     */
    public function psetex($key, $expire, $value) {}

    /**
     * Set the string value in argument as value of the key if the key doesn't already exist in the database.
     *
     * @param string       $key
     * @param mixed $value
     *
     * @return bool|array|Redis returns Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/setnx
     * @example
     * <pre>
     * $redis->setnx('key', 'value');   // return TRUE
     * $redis->setnx('key', 'value');   // return FALSE
     * </pre>
     */
    public function setnx(string $key, $value) {}

    /**
     * Remove specified keys.
     *
     * @param string|array $key1 Either an array with one or more key names or a string with the name of a key.
     * @param string ...$otherKeys One or more additional keys passed in a variadic fashion.
     *
     * @return false|int|Redis Number of keys deleted or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link https://redis.io/commands/del
     * @example
     * <pre>
     * $redis->set('key1', 'val1');
     * $redis->set('key2', 'val2');
     * $redis->set('key3', 'val3');
     * $redis->set('key4', 'val4');
     *
     * $redis->del('key1', 'key2');     // return 2
     * $redis->del(['key3', 'key4']);   // return 2
     * </pre>
     */
    public function del($key1, ...$otherKeys) {}

    /**
     * Remove specified keys.
     *
     * @param string|array $key An array of keys, or an undefined number of parameters, each a key: key1 key2 key3 ... keyN
     * @param string       ...$otherKeys
     *
     * @return false|int|Redis Number of keys deleted or Redis if in multimode
     *
     * @throws RedisException
     */
    #[Deprecated(replacement: "%class%->del(%parametersList%)")]
    public function delete($key, ...$otherKeys) {}

    /**
     * Delete a key asynchronously in another thread. Otherwise it is just as DEL, but non blocking.
     *
     * @see del()
     * @param string|array $key An array of keys, or an undefined number of parameters, each a key: key1 key2 key3 ... keyN
     * @param string       ...$other_keys
     *
     * @return false|int|Redis Number of keys unlinked or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/unlink
     * @example
     * <pre>
     * $redis->set('key1', 'val1');
     * $redis->set('key2', 'val2');
     * $redis->set('key3', 'val3');
     * $redis->set('key4', 'val4');
     * $redis->unlink('key1', 'key2');          // return 2
     * $redis->unlink(array('key3', 'key4'));   // return 2
     * </pre>
     */
    public function unlink($key, ...$other_keys) {}

    /**
     * Enter and exit transactional mode.
     *
     * @param int $mode Redis::MULTI|Redis::PIPELINE
     * Defaults to Redis::MULTI.
     * A Redis::MULTI block of commands runs as a single transaction;
     * a Redis::PIPELINE block is simply transmitted faster to the server, but without any guarantee of atomicity.
     * discard cancels a transaction.
     *
     * @return static|Redis returns the Redis instance and enters multi-mode or Redis if in multimode
     * Once in multi-mode, all subsequent method calls return the same object until exec() is called.
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/multi
     * @example
     * <pre>
     * $ret = $redis->multi()
     *      ->set('key1', 'val1')
     *      ->get('key1')
     *      ->set('key2', 'val2')
     *      ->get('key2')
     *      ->exec();
     *
     * //$ret == array (
     * //    0 => TRUE,
     * //    1 => 'val1',
     * //    2 => TRUE,
     * //    3 => 'val2');
     * </pre>
     */
    public function multi($mode = Redis::MULTI) {}

    /**
     * Returns a Redis instance which can simply transmitted faster to the server.
     *
     * @return bool|Redis returns the Redis instance.
     * Once in pipeline-mode, all subsequent method calls return the same object until exec() is called.
     * Pay attention, that Pipeline is not a transaction, so you can get unexpected
     * results in case of big pipelines and small read/write timeouts.
     *
     * @throws RedisException
     *
     * @link   https://redis.io/topics/pipelining
     * @example
     * <pre>
     * $ret = $this->redis->pipeline()
     *      ->ping()
     *      ->multi()->set('x', 42)->incr('x')->exec()
     *      ->ping()
     *      ->multi()->get('x')->del('x')->exec()
     *      ->ping()
     *      ->exec();
     *
     * //$ret == array (
     * //    0 => '+PONG',
     * //    1 => [TRUE, 43],
     * //    2 => '+PONG',
     * //    3 => [43, 1],
     * //    4 => '+PONG');
     * </pre>
     */
    public function pipeline() {}

    /**
     * Execute either a MULTI or PIPELINE block and return the array of replies.
     *
     * @return array|false|Redis The array of pipeline'd or multi replies or false on failure or Redis if in multimode
     *
     * @throws RedisException
     *
     * @see multi()
     * @link https://redis.io/commands/exec
     * @link https://redis.io/commands/multi
     *
     * @example
     * $res = $redis->multi()
     *              ->set('foo', 'bar')
     *              ->get('foo')
     *              ->del('list')
     *              ->rpush('list', 'one', 'two', 'three')
     *              ->exec();
     */
    public function exec() {}

    /**
     * Flushes all previously queued commands in a transaction and restores the connection state to normal.
     *
     * @return bool|Redis True if we could discard the transaction or Redis if in multimode
     *
     * @throws RedisException
     *
     * @see multi()
     * @link https://redis.io/commands/discard
     *
     * @example
     * $redis->getMode();
     * $redis->set('foo', 'bar');
     * $redis->discard();
     * $redis->getMode();
     */
    public function discard() {}

    /**
     * Watches a key for modifications by another client. If the key is modified between WATCH and EXEC,
     * the MULTI/EXEC transaction will fail (return FALSE). unwatch cancels all the watching of all keys by this client.
     *
     * @param string|array $key     Either an array with one or more key names, or a string key name
     * @param string ...$other_keys If the first argument was passed as a string, any number of
     *                              additional string key names may be passed variadically.
     *
     * @return bool|Redis returns Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/watch
     * @example
     * <pre>
     * $redis->watch('x');
     * // long code here during the execution of which other clients could well modify `x`
     * $ret = $redis->multi()
     *          ->incr('x')
     *          ->exec();
     * // $ret = FALSE if x has been modified between the call to WATCH and the call to EXEC.
     * </pre>
     */
    public function watch($key, ...$other_keys) {}

    /**
     * Remove any previously WATCH'ed keys in a transaction.
     *
     * @throws RedisException
     *
     * @see watch()
     * @return bool|Redis
     * @link    https://redis.io/commands/unwatch
     */
    public function unwatch() {}

    /**
     * Subscribes the client to the specified channels.
     *
     * Once the client enters the subscribed state it is not supposed to issue any other commands, except for additional SUBSCRIBE, SSUBSCRIBE, PSUBSCRIBE, UNSUBSCRIBE, SUNSUBSCRIBE, PUNSUBSCRIBE, PING, RESET and QUIT commands.
     *
     * @param array|string $channels One or more channel names.
     * @param callable $callback     The callback PhpRedis will invoke when we receive a message from one of the subscribed channels.
     *
     * @return false|array|Redis False on faiilure. Note that this command will block the client in a subscribe loop, waiting for messages to arrive
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/subscribe
     * @since 2.0
     *
     * @example
     * $redis->subscribe(['channel-1', 'channel-2'], function ($redis, $channel, $message) {
     *     echo "[$channel]: $message\n";
     *
     *     // Unsubscribe from the message channel when we read 'quit'
     *     if ($message == 'quit') {
     *         echo "Unsubscribing from '$channel'\n";
     *         $redis->unsubscribe([$channel]);
     *     }
     * });
     *
     * // Once we read 'quit' from both channel-1 and channel-2 the subscribe loop will be broken and this command will execute.
     * echo "Subscribe loop ended\n";
     */
    public function subscribe($channels, $callback) {}

    /**
     * Subscribe to channels by pattern
     *
     * @param array                 $patterns an array of glob-style patterns to subscribe
     * @param string|array|callable $callback Either a string or an array with an object and method.
     *                     The callback will get four arguments ($redis, $pattern, $channel, $message)
     * @return mixed|Redis Any non-null return value in the callback will be returned to the caller or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/psubscribe
     * @example
     * <pre>
     * function f($redis, $pattern, $chan, $msg) {
     *  echo "Pattern: $pattern\n";
     *  echo "Channel: $chan\n";
     *  echo "Payload: $msg\n";
     * }
     *
     * $redis->psubscribe(array('chan-1', 'chan-2', 'chan-3'), 'f')
     * </pre>
     */
    public function psubscribe($patterns, $callback) {}

    /**
     * Publish messages to channels.
     *
     * Warning: this function will probably change in the future.
     *
     * @param string $channel The channel to publish to.
     * @param string $message The message itself.
     *
     * @return false|int|Redis Number of clients that received the message or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/publish
     * @example $redis->publish('chan-1', 'hello, world!'); // send message.
     */
    public function publish($channel, $message) {}

    /**
     * A command allowing you to get information on the Redis pub/sub system
     *
     * @param string       $keyword    String, which can be: "channels", "numsub", or "numpat"
     * @param mixed        $argument   Optional, variant.
     *                                 For the "channels" subcommand, you can pass a string pattern.
     *                                 For "numsub" an array of channel names
     *
     * @return mixed|Redis Either an integer or an array or Redis if in multimode
     *   - channels  Returns an array where the members are the matching channels.
     *   - numsub    Returns a key/value array where the keys are channel names and
     *               values are their counts.
     *   - numpat    Integer return containing the number active pattern subscriptions
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/pubsub
     * @example
     * <pre>
     * $redis->pubsub('channels'); // All channels
     * $redis->pubsub('channels', '*pattern*'); // Just channels matching your pattern
     * $redis->pubsub('numsub', array('chan1', 'chan2')); // Get subscriber counts for 'chan1' and 'chan2'
     * $redis->pubsub('numpat'); // Get the number of pattern subscribers
     * </pre>
     */
    public function pubsub($keyword, $argument = null) {}

    /**
     * Stop listening for messages posted to the given channels.
     *
     * @param array $channels One or more channels to unsubscribe from.
     *
     * @return bool|array|Redis The array of unsubscribed channels.
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/unsubscribe
     *
     * @example
     * $redis->subscribe(['channel-1', 'channel-2'], function ($redis, $channel, $message) {
     *     if ($message == 'quit') {
     *         echo "$channel => 'quit' detected, unsubscribing!\n";
     *         $redis->unsubscribe([$channel]);
     *     } else {
     *         echo "$channel => $message\n";
     *     }
     * });
     */
    public function unsubscribe(array $channels) {}

    /**
     * Stop listening for messages posted to the given channels.
     *
     * @param array $patterns   an array of glob-style patterns to unsubscribe
     *
     * @return false|array
     *
     * @throws RedisException
     *
     * @link https://redis.io/commands/punsubscribe
     */
    public function punsubscribe(array $patterns) {}

    /**
     * Verify if the specified key/keys exists
     *
     * This function took a single argument and returned TRUE or FALSE in phpredis versions < 4.0.0.
     *
     * @since >= 4.0 Returned int, if < 4.0 returned bool
     *
     * @param mixed $key Either an array of keys or a string key
     * @param mixed ...$other_keys If the previous argument was a string, you may send any number of additional keys to test.
     *
     * @return int|bool|Redis The number of keys tested that do exist or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link https://redis.io/commands/exists
     * @link https://github.com/phpredis/phpredis#exists
     * @example
     * <pre>
     * $redis->exists('key'); // 1
     * $redis->exists('NonExistingKey'); // 0
     *
     * $redis->mset(['foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz']);
     * $redis->exists(['foo', 'bar', 'baz]); // 3
     * $redis->exists('foo', 'bar', 'baz'); // 3
     * </pre>
     */
    public function exists($key, ...$other_keys) {}

    /**
     * Increment the number stored at key by one.
     *
     * @param string $key The key to increment
     * @param int    $by  An optional amount to increment by.
     *
     * @return false|int|Redis the new value or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/incr
     * @example
     * <pre>
     * $redis->incr('key1'); // key1 didn't exists, set to 0 before the increment and now has the value 1
     * $redis->incr('key1'); // 2
     * $redis->incr('key1'); // 3
     * $redis->incr('key1'); // 4
     * $redis->incr('key1', 2); // 6
     * </pre>
     */
    public function incr($key, $by = 1) {}

    /**
     * Increment the float value of a key by the given amount
     *
     * @param string $key
     * @param float  $increment
     *
     * @return float|false|Redis returns Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/incrbyfloat
     * @example
     * <pre>
     * $redis->set('x', 3);
     * $redis->incrByFloat('x', 1.5);   // float(4.5)
     * $redis->get('x');                // float(4.5)
     * $redis->incrByFloat('x', 3.1415926);
     * </pre>
     */
    public function incrByFloat($key, $increment) {}

    /**
     * Increment the number stored at key by one.
     *
     * @param string $key   The key to increment.
     * @param int    $value The amount to increment.
     *
     * @return false|int|Redis the new value or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/incrby
     * @example
     * <pre>
     * $redis->incr('key1');        // key1 didn't exists, set to 0 before the increment and now has the value 1
     * $redis->incr('key1');        // 2
     * $redis->incr('key1');        // 3
     * $redis->incr('key1');        // 4
     * $redis->incrBy('key1', 10);  // 14
     * </pre>
     */
    public function incrBy($key, $value) {}

    /**
     * Decrement the number stored at key by one.
     *
     * @param string $key The key to decrement
     * @param int    $by  How much to decrement the key. Note that if this value is not sent or is set to `1`
     *
     * @return false|int|Redis The new value of the key or false on failure or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/decr
     * @example
     * <pre>
     * $redis->decr('key1'); // key1 didn't exists, set to 0 before the increment and now has the value -1
     * $redis->decr('key1'); // -2
     * $redis->decr('key1'); // -3
     * $redis->decr('key1', 2); // -5
     * </pre>
     */
    public function decr($key, $by = 1) {}

    /**
     * Decrement the number stored at key by one.
     *
     * @param string $key The integer key to decrement.
     * @param int    $value How much to decrement the key.
     *
     * @return false|int|Redis The new value of the key or false on failure or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/decrby
     * @example
     * <pre>
     * $redis->decr('key1');        // key1 didn't exists, set to 0 before the increment and now has the value -1
     * $redis->decr('key1');        // -2
     * $redis->decr('key1');        // -3
     * $redis->decrBy('key1', 10);  // -13
     * </pre>
     */
    public function decrBy($key, $value) {}

    /**
     * Adds the string values to the head (left) of the list.
     * Creates the list if the key didn't exist.
     * If the key exists and is not a list, FALSE is returned.
     *
     * @param string $key       The list to prepend.
     * @param mixed  ...$value1 One or more elements to prepend.
     *
     * @return int|false|Redis The new length of the list in case of success, FALSE in case of Failure or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link https://redis.io/commands/lpush
     * @example
     * <pre>
     * $redis->lPush('l', 'v1', 'v2', 'v3', 'v4')   // int(4)
     * var_dump( $redis->lRange('l', 0, -1) );
     * // Output:
     * // array(4) {
     * //   [0]=> string(2) "v4"
     * //   [1]=> string(2) "v3"
     * //   [2]=> string(2) "v2"
     * //   [3]=> string(2) "v1"
     * // }
     * </pre>
     */
    public function lPush($key, ...$value1) {}

    /**
     * Adds the string values to the tail (right) of the list.
     * Creates the list if the key didn't exist.
     * If the key exists and is not a list, FALSE is returned.
     *
     * @param string $key      The list to append to.
     * @param mixed ...$value1 one or more elements to append.
     *
     * @return int|false|Redis The new length of the list in case of success, FALSE in case of Failure or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/rpush
     * @example
     * <pre>
     * $redis->rPush('l', 'v1', 'v2', 'v3', 'v4');    // int(4)
     * var_dump( $redis->lRange('l', 0, -1) );
     * // Output:
     * // array(4) {
     * //   [0]=> string(2) "v1"
     * //   [1]=> string(2) "v2"
     * //   [2]=> string(2) "v3"
     * //   [3]=> string(2) "v4"
     * // }
     * </pre>
     */
    public function rPush($key, ...$value1) {}

    /**
     * Adds the string value to the head (left) of the list if the list exists.
     *
     * @param string $key   The key to prepend to.
     * @param mixed  $value The value to prepend.
     *
     * @return int|false|Redis The new length of the list in case of success, FALSE in case of Failure or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/lpushx
     * @example
     * <pre>
     * $redis->del('key1');
     * $redis->lPushx('key1', 'A');     // returns 0
     * $redis->lPush('key1', 'A');      // returns 1
     * $redis->lPushx('key1', 'B');     // returns 2
     * $redis->lPushx('key1', 'C');     // returns 3
     * // key1 now points to the following list: [ 'A', 'B', 'C' ]
     * </pre>
     */
    public function lPushx($key, $value) {}

    /**
     * Adds the string value to the tail (right) of the list if the ist exists. FALSE in case of Failure.
     *
     * @param string $key   The key to prepend to.
     * @param mixed  $value The value to prepend.
     *
     * @return int|false|Redis The new length of the list in case of success, FALSE in case of Failure or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/rpushx
     * @example
     * <pre>
     * $redis->del('key1');
     * $redis->rPushx('key1', 'A'); // returns 0
     * $redis->rPush('key1', 'A'); // returns 1
     * $redis->rPushx('key1', 'B'); // returns 2
     * $redis->rPushx('key1', 'C'); // returns 3
     * // key1 now points to the following list: [ 'A', 'B', 'C' ]
     * </pre>
     */
    public function rPushx($key, $value) {}

    /**
     * Returns and removes the first element of the list.
     *
     * @param string $key   The list to pop from.
     * @param int    $count Optional number of elements to remove.  By default one element is popped.
     *
     * @return  mixed|bool|Redis if command executed successfully BOOL FALSE in case of failure (empty list) or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/lpop
     * @example
     * <pre>
     * $redis->rPush('key1', 'A');
     * $redis->rPush('key1', 'B');
     * $redis->rPush('key1', 'C');  // key1 => [ 'A', 'B', 'C' ]
     * $redis->lPop('key1');        // key1 => [ 'B', 'C' ]
     * </pre>
     */
    public function lPop($key, $count = 0) {}

    /**
     * Returns and removes the last element of the list.
     *
     * @param string $key   A redis LIST key name.
     * @param int    $count The maximum number of elements to pop at once. NOTE: The `count` argument requires Redis >= 6.2.0
     *
     * @return mixed|array|string|bool|Redis if command executed successfully BOOL FALSE in case of failure (empty list) or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/rpop
     * @example
     * <pre>
     * $redis->rPush('key1', 'A');
     * $redis->rPush('key1', 'B');
     * $redis->rPush('key1', 'C');  // key1 => [ 'A', 'B', 'C' ]
     * $redis->rPop('key1');        // key1 => [ 'A', 'B' ]
     * </pre>
     */
    public function rPop($key, $count = 0) {}

    /**
     * Is a blocking lPop primitive. If at least one of the lists contains at least one element,
     * the element will be popped from the head of the list and returned to the caller.
     * Il all the list identified by the keys passed in arguments are empty, blPop will block
     * during the specified timeout until an element is pushed to one of those lists. This element will be popped.
     *
     * @param string|string[]  $key_or_keys    String array containing the keys of the lists OR variadic list of strings
     * @param string|float|int $timeout_or_key Timeout is always the required final parameter
     * @param mixed           ...$extra_args
     *
     * @return array|null|false|Redis Can return various things depending on command and data or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/blpop
     * @example
     * <pre>
     * // Non blocking feature
     * $redis->lPush('key1', 'A');
     * $redis->del('key2');
     *
     * $redis->blPop('key1', 'key2', 10);        // array('key1', 'A')
     * // OR
     * $redis->blPop(['key1', 'key2'], 10);      // array('key1', 'A')
     *
     * $redis->blPop('key1', 'key2', 10);        // array('key1', 'A')
     * // OR
     * $redis->blPop(['key1', 'key2'], 10); // array('key1', 'A')
     *
     * // Blocking feature
     *
     * // process 1
     * $redis->del('key1');
     * $redis->blPop('key1', 10);
     * // blocking for 10 seconds
     *
     * // process 2
     * $redis->lPush('key1', 'A');
     *
     * // process 1
     * // array('key1', 'A') is returned
     * </pre>
     */
    public function blPop($key_or_keys, $timeout_or_key, ...$extra_args) {}

    /**
     * Is a blocking rPop primitive. If at least one of the lists contains at least one element,
     * the element will be popped from the head of the list and returned to the caller.
     * Il all the list identified by the keys passed in arguments are empty, brPop will
     * block during the specified timeout until an element is pushed to one of those lists.
     * This element will be popped.
     *
     * @param string|string[] $key_or_keys     String array containing the keys of the lists OR variadic list of strings
     * @param string|float|int $timeout_or_key Timeout is always the required final parameter
     * @param mixed           ...$extra_args
     *
     * @return array|null|true|Redis Can return various things depending on command and data or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/brpop
     * @example
     * <pre>
     * // Non blocking feature
     * $redis->rPush('key1', 'A');
     * $redis->del('key2');
     *
     * $redis->brPop('key1', 'key2', 10); // array('key1', 'A')
     * // OR
     * $redis->brPop(array('key1', 'key2'), 10); // array('key1', 'A')
     *
     * $redis->brPop('key1', 'key2', 10); // array('key1', 'A')
     * // OR
     * $redis->brPop(array('key1', 'key2'), 10); // array('key1', 'A')
     *
     * // Blocking feature
     *
     * // process 1
     * $redis->del('key1');
     * $redis->brPop('key1', 10);
     * // blocking for 10 seconds
     *
     * // process 2
     * $redis->lPush('key1', 'A');
     *
     * // process 1
     * // array('key1', 'A') is returned
     * </pre>
     */
    public function brPop($key_or_keys, $timeout_or_key, ...$extra_args) {}

    /**
     * Returns the size of a list identified by Key. If the list didn't exist or is empty,
     * the command returns 0. If the data type identified by Key is not a list, the command return FALSE.
     *
     * @param string $key
     *
     * @return int|bool|Redis The size of the list identified by Key exists or Redis if in multimode
     * bool FALSE if the data type identified by Key is not list
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/llen
     * @example
     * <pre>
     * $redis->rPush('key1', 'A');
     * $redis->rPush('key1', 'B');
     * $redis->rPush('key1', 'C'); // key1 => [ 'A', 'B', 'C' ]
     * $redis->lLen('key1');       // 3
     * $redis->rPop('key1');
     * $redis->lLen('key1');       // 2
     * </pre>
     */
    public function lLen($key) {}

    /**
     * @link https://redis.io/commands/llen
     *
     * @param string $key
     *
     * @return false|int|Redis The size of the list identified by Key exists or Redis if in multimode
     *
     * @throws RedisException
     */
    #[Deprecated(replacement: '%class%->lLen(%parametersList%)')]
    public function lSize($key) {}

    /**
     * Return the specified element of the list stored at the specified key.
     * 0 the first element, 1 the second ... -1 the last element, -2 the penultimate ...
     * Return FALSE in case of a bad index or a key that doesn't point to a list.
     *
     * @param string $key
     * @param int    $index
     *
     * @return mixed|bool|Redis the element at this index or Redis if in multimode
     *
     * @throws RedisException
     *
     * Bool FALSE if the key identifies a non-string data type, or no value corresponds to this index in the list Key.
     *
     * @link    https://redis.io/commands/lindex
     * @example
     * <pre>
     * $redis->rPush('key1', 'A');
     * $redis->rPush('key1', 'B');
     * $redis->rPush('key1', 'C');  // key1 => [ 'A', 'B', 'C' ]
     * $redis->lIndex('key1', 0);     // 'A'
     * $redis->lIndex('key1', -1);    // 'C'
     * $redis->lIndex('key1', 10);    // `FALSE`
     * </pre>
     */
    public function lIndex($key, $index) {}

    /**
     * @link https://redis.io/commands/lindex
     *
     * @param string $key
     * @param int $index
     * @return mixed|bool|Redis the element at this index or Redis if in multimode
     *
     * @throws RedisException
     */
    #[Deprecated(replacement: '%class%->lIndex(%parametersList%)')]
    public function lGet($key, $index) {}

    /**
     * Set the list at index with the new value.
     *
     * @param string $key   The list to modify.
     * @param int    $index The position of the element to change.
     * @param mixed  $value The new value.
     *
     * @return bool|Redis TRUE if the new value is setted or Redis if in multimode
     * FALSE if the index is out of range, or data type identified by key is not a list.
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/lset
     * @example
     * <pre>
     * $redis->rPush('key1', 'A');
     * $redis->rPush('key1', 'B');
     * $redis->rPush('key1', 'C');    // key1 => [ 'A', 'B', 'C' ]
     * $redis->lIndex('key1', 0);     // 'A'
     * $redis->lSet('key1', 0, 'X');
     * $redis->lIndex('key1', 0);     // 'X'
     * </pre>
     */
    public function lSet($key, $index, $value) {}

    /**
     * Returns the specified elements of the list stored at the specified key in
     * the range [start, end]. start and stop are interpretated as indices: 0 the first element,
     * 1 the second ... -1 the last element, -2 the penultimate ...
     *
     * @param string $key   The list to query.
     * @param int    $start The beginning index to retrieve.  This number can be negative meaning start from the end of the list.
     * @param int    $end   The end index to retrieve. This can also be negative to start from the end of the list.
     *
     * @return array|Redis containing the values in specified range or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/lrange
     * @example
     * <pre>
     * $redis->rPush('key1', 'A');
     * $redis->rPush('key1', 'B');
     * $redis->rPush('key1', 'C');
     * $redis->lRange('key1', 0, -1); // array('A', 'B', 'C')
     * </pre>
     */
    public function lRange($key, $start, $end) {}

    /**
     * @link https://redis.io/commands/lrange
     *
     * @param string    $key
     * @param int       $start
     * @param int       $end
     * @return array|Redis returns Redis if in multimode
     *
     * @throws RedisException
     */
    #[Deprecated(replacement: '%class%->lRange(%parametersList%)')]
    public function lGetRange($key, $start, $end) {}

    /**
     * Trims an existing list so that it will contain only a specified range of elements.
     *
     * @param string $key   The list to trim
     * @param int    $start The starting index to keep
     * @param int    $end   The ending index to keep.
     *
     * @return array|false|Redis Bool return FALSE if the key identify a non-list value or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link        https://redis.io/commands/ltrim
     * @example
     * <pre>
     * $redis->rPush('key1', 'A');
     * $redis->rPush('key1', 'B');
     * $redis->rPush('key1', 'C');
     * $redis->lRange('key1', 0, -1); // array('A', 'B', 'C')
     * $redis->lTrim('key1', 0, 1);
     * $redis->lRange('key1', 0, -1); // array('A', 'B')
     * </pre>
     */
    public function lTrim($key, $start, $end) {}

    /**
     * @link  https://redis.io/commands/ltrim
     *
     * @param string    $key
     * @param int       $start
     * @param int       $stop
     *
     * @throws RedisException
     */
    #[Deprecated(replacement: '%class%->lTrim(%parametersList%)')]
    public function listTrim($key, $start, $stop) {}

    /**
     * Removes the first count occurrences of the value element from the list.
     * If count is zero, all the matching elements are removed. If count is negative,
     * elements are removed from tail to head.
     *
     * @param string $key   The list to truncate.
     * @param mixed  $value The value to remove.
     * @param int    $count How many elements matching the value to remove.
     *
     * @return int|bool|Redis the number of elements to remove or Redis if in multimode
     * bool FALSE if the value identified by key is not a list.
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/lrem
     * @example
     * <pre>
     * $redis->lPush('key1', 'A');
     * $redis->lPush('key1', 'B');
     * $redis->lPush('key1', 'C');
     * $redis->lPush('key1', 'A');
     * $redis->lPush('key1', 'A');
     *
     * $redis->lRange('key1', 0, -1);   // array('A', 'A', 'C', 'B', 'A')
     * $redis->lRem('key1', 'A', 2);    // 2
     * $redis->lRange('key1', 0, -1);   // array('C', 'B', 'A')
     * </pre>
     */
    public function lRem($key, $value, $count = 0) {}

    /**
     * @link https://redis.io/commands/lremove
     *
     * @param string $key
     * @param string $value
     * @param int $count
     *
     * @throws RedisException
     */
    #[Deprecated(replacement: '%class%->lRem(%parametersList%)')]
    public function lRemove($key, $value, $count) {}

    /**
     * Insert value in the list before or after the pivot value. the parameter options
     * specify the position of the insert (before or after). If the list didn't exists,
     * or the pivot didn't exists, the value is not inserted.
     *
     * @param string       $key
     * @param string       $position Redis::BEFORE | Redis::AFTER
     * @param mixed        $pivot
     * @param mixed        $value
     *
     * @return false|int|Redis The number of the elements in the list, -1 if the pivot didn't exists or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/linsert
     * @example
     * <pre>
     * $redis->del('key1');
     * $redis->lInsert('key1', Redis::AFTER, 'A', 'X');     // 0
     *
     * $redis->lPush('key1', 'A');
     * $redis->lPush('key1', 'B');
     * $redis->lPush('key1', 'C');
     *
     * $redis->lInsert('key1', Redis::BEFORE, 'C', 'X');    // 4
     * $redis->lRange('key1', 0, -1);                       // array('A', 'B', 'X', 'C')
     *
     * $redis->lInsert('key1', Redis::AFTER, 'C', 'Y');     // 5
     * $redis->lRange('key1', 0, -1);                       // array('A', 'B', 'X', 'C', 'Y')
     *
     * $redis->lInsert('key1', Redis::AFTER, 'W', 'value'); // -1
     * </pre>
     */
    public function lInsert($key, $position, $pivot, $value) {}

    /**
     * Adds a values to the set value stored at key.
     *
     * @param  string  $key  Required key
     * @param  mixed   $value
     * @param  mixed  ...$other_values  Variadic list of values
     *
     * @return int|bool|Redis The number of elements added to the set or Redis if in multimode
     * If this value is already in the set, FALSE is returned
     *
     * @link    https://redis.io/commands/sadd
     * @example
     * <pre>
     * $redis->sAdd('k', 'v1');                // int(1)
     * $redis->sAdd('k', 'v1', 'v2', 'v3');    // int(2)
     * </pre>
     */
    public function sAdd(string $key, $value, ...$other_values) {}

    /**
     * Removes the specified members from the set value stored at key.
     *
     * @param  string  $key
     * @param  mixed  $value
     * @param  mixed  ...$other_values  Variadic list of members
     *
     * @return false|int|Redis The number of elements removed from the set or Redis if in multimode
     *
     * @link    https://redis.io/commands/srem
     * @example
     * <pre>
     * var_dump( $redis->sAdd('k', 'v1', 'v2', 'v3') );    // int(3)
     * var_dump( $redis->sRem('k', 'v2', 'v3') );          // int(2)
     * var_dump( $redis->sMembers('k') );
     * //// Output:
     * // array(1) {
     * //   [0]=> string(2) "v1"
     * // }
     * </pre>
     */
    public function sRem(string $key, $value, ...$other_values) {}

    /**
     * @link    https://redis.io/commands/srem
     *
     * @param   string  $key
     * @param   string|mixed  ...$member1
     *
     * @throws RedisException
     */
    #[Deprecated(replacement: '%class%->sRem(%parametersList%)')]
    public function sRemove($key, ...$member1) {}

    /**
     * Moves the specified member from the set at srcKey to the set at dstKey.
     *
     * @param string       $srcKey
     * @param string       $dstKey
     * @param mixed        $member
     *
     * @return bool|Redis If the operation is successful, return TRUE or Redis if in multimode
     * If the srcKey and/or dstKey didn't exist, and/or the member didn't exist in srcKey, FALSE is returned.
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/smove
     * @example
     * <pre>
     * $redis->sAdd('key1' , 'set11');
     * $redis->sAdd('key1' , 'set12');
     * $redis->sAdd('key1' , 'set13');          // 'key1' => {'set11', 'set12', 'set13'}
     * $redis->sAdd('key2' , 'set21');
     * $redis->sAdd('key2' , 'set22');          // 'key2' => {'set21', 'set22'}
     * $redis->sMove('key1', 'key2', 'set13');  // 'key1' =>  {'set11', 'set12'}
     *                                          // 'key2' =>  {'set21', 'set22', 'set13'}
     * </pre>
     */
    public function sMove($srcKey, $dstKey, $member) {}

    /**
     * Checks if value is a member of the set stored at the key key.
     *
     * @param string       $key
     * @param mixed        $value
     *
     * @return bool|Redis TRUE if value is a member of the set at key key, FALSE otherwise or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/sismember
     * @example
     * <pre>
     * $redis->sAdd('key1' , 'set1');
     * $redis->sAdd('key1' , 'set2');
     * $redis->sAdd('key1' , 'set3'); // 'key1' => {'set1', 'set2', 'set3'}
     *
     * $redis->sIsMember('key1', 'set1'); // TRUE
     * $redis->sIsMember('key1', 'setX'); // FALSE
     * </pre>
     */
    public function sIsMember(string $key, $value) {}

    /**
     * @link    https://redis.io/commands/sismember
     *
     * @param string       $key
     * @param string|mixed $value
     *
     * @throws RedisException
     */
    #[Deprecated(replacement: '%class%->sIsMember(%parametersList%)')]
    public function sContains($key, $value) {}

    /**
     * Returns the cardinality of the set identified by key.
     *
     * @param string $key
     *
     * @return false|int|Redis the cardinality of the set identified by key, 0 if the set doesn't exist or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/scard
     * @example
     * <pre>
     * $redis->sAdd('key1' , 'set1');
     * $redis->sAdd('key1' , 'set2');
     * $redis->sAdd('key1' , 'set3');   // 'key1' => {'set1', 'set2', 'set3'}
     * $redis->sCard('key1');           // 3
     * $redis->sCard('keyX');           // 0
     * </pre>
     */
    public function sCard($key) {}

    /**
     * Removes and returns a random element from the set value at Key.
     *
     * @param string $key   The set in question.
     * @param int    $count An optional number of members to pop. This defaults to removing one element.
     *
     * @return string|mixed|array|bool|Redis "popped" values or Redis if in multimode
     * bool FALSE if set identified by key is empty or doesn't exist.
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/spop
     * @example
     * <pre>
     * $redis->sAdd('key1' , 'set1');
     * $redis->sAdd('key1' , 'set2');
     * $redis->sAdd('key1' , 'set3');   // 'key1' => {'set3', 'set1', 'set2'}
     * $redis->sPop('key1');            // 'set1', 'key1' => {'set3', 'set2'}
     * $redis->sPop('key1');            // 'set3', 'key1' => {'set2'}
     *
     * // With count
     * $redis->sAdd('key2', 'set1', 'set2', 'set3');
     * var_dump( $redis->sPop('key2', 3) ); // Will return all members but in no particular order
     *
     * // array(3) {
     * //   [0]=> string(4) "set2"
     * //   [1]=> string(4) "set3"
     * //   [2]=> string(4) "set1"
     * // }
     * </pre>
     */
    public function sPop($key, $count = 0) {}

    /**
     * Returns a random element(s) from the set value at Key, without removing it.
     *
     * @param string $key   The set to query.
     * @param int    $count An optional count of members to return.
     *
     *                      If this value is positive, Redis will return *up to* the requested
     *                      number but with unique elements that will never repeat.  This means
     *                      you may recieve fewer then `$count` replies.
     *
     *                      If the number is negative, Redis will return the exact number requested
     *                      but the result may contain duplicate elements.
     *
     * @return string|mixed|array|bool|Redis value(s) from the set or Redis if in multimode
     * bool FALSE if set identified by key is empty or doesn't exist and count argument isn't passed.
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/srandmember
     * @example
     * <pre>
     * $redis->sAdd('key1' , 'one');
     * $redis->sAdd('key1' , 'two');
     * $redis->sAdd('key1' , 'three');              // 'key1' => {'one', 'two', 'three'}
     *
     * var_dump( $redis->sRandMember('key1') );     // 'key1' => {'one', 'two', 'three'}
     *
     * // string(5) "three"
     *
     * var_dump( $redis->sRandMember('key1', 2) );  // 'key1' => {'one', 'two', 'three'}
     *
     * // array(2) {
     * //   [0]=> string(2) "one"
     * //   [1]=> string(5) "three"
     * // }
     * </pre>
     */
    public function sRandMember($key, $count = 0) {}

    /**
     * Returns the members of a set resulting from the intersection of all the sets
     * held at the specified keys. If just a single key is specified, then this command
     * produces the members of this set. If one of the keys is missing, FALSE is returned.
     *
     * @param string $key1         keys identifying the different sets on which we will apply the intersection.
     * @param string ...$otherKeys variadic list of keys
     *
     * @return array|false|Redis contain the result of the intersection between those keys or Redis if in multimode
     * If the intersection between the different sets is empty, the return value will be empty array.
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/sinter
     * @example
     * <pre>
     * $redis->sAdd('key1', 'val1');
     * $redis->sAdd('key1', 'val2');
     * $redis->sAdd('key1', 'val3');
     * $redis->sAdd('key1', 'val4');
     *
     * $redis->sAdd('key2', 'val3');
     * $redis->sAdd('key2', 'val4');
     *
     * $redis->sAdd('key3', 'val3');
     * $redis->sAdd('key3', 'val4');
     *
     * var_dump($redis->sInter('key1', 'key2', 'key3'));
     *
     * //array(2) {
     * //  [0]=>
     * //  string(4) "val4"
     * //  [1]=>
     * //  string(4) "val3"
     * //}
     * </pre>
     */
    public function sInter($key1, ...$otherKeys) {}

    /**
     * Performs a sInter command and stores the result in a new set.
     *
     * @param array|string $key Either a string key, or an array of keys (with at least two elements,
     *                          consisting of the destination key name and one or more source keys names.
     * @param string ...$otherKeys If the first argument was a string, subsequent arguments should be source key names.
     *
     * @return int|false|Redis The cardinality of the resulting set, or FALSE in case of a missing key or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/sinterstore
     * @example
     * <pre>
     * $redis->sAdd('key1', 'val1');
     * $redis->sAdd('key1', 'val2');
     * $redis->sAdd('key1', 'val3');
     * $redis->sAdd('key1', 'val4');
     *
     * $redis->sAdd('key2', 'val3');
     * $redis->sAdd('key2', 'val4');
     *
     * $redis->sAdd('key3', 'val3');
     * $redis->sAdd('key3', 'val4');
     *
     * var_dump($redis->sInterStore('output', 'key1', 'key2', 'key3'));
     * var_dump($redis->sMembers('output'));
     *
     * //int(2)
     * //
     * //array(2) {
     * //  [0]=>
     * //  string(4) "val4"
     * //  [1]=>
     * //  string(4) "val3"
     * //}
     * </pre>
     */
    public function sInterStore(string $key, ...$otherKeys) {}

    /**
     * Performs the union between N sets and returns it.
     *
     * @param string $key1         first key for union
     * @param string ...$otherKeys variadic list of keys corresponding to sets in redis
     *
     * @return array|false|Redis The union of all these sets or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/sunionstore
     * @example
     * <pre>
     * $redis->sAdd('s0', '1');
     * $redis->sAdd('s0', '2');
     * $redis->sAdd('s1', '3');
     * $redis->sAdd('s1', '1');
     * $redis->sAdd('s2', '3');
     * $redis->sAdd('s2', '4');
     *
     * var_dump($redis->sUnion('s0', 's1', 's2'));
     *
     * array(4) {
     * //  [0]=>
     * //  string(1) "3"
     * //  [1]=>
     * //  string(1) "4"
     * //  [2]=>
     * //  string(1) "1"
     * //  [3]=>
     * //  string(1) "2"
     * //}
     * </pre>
     */
    public function sUnion($key1, ...$otherKeys) {}

    /**
     * Performs the same action as sUnion, but stores the result in the first key
     *
     * @param string $dstKey       The destination key
     * @param string $key1         The first source key
     * @param string ...$otherKeys One or more additional source keys
     *
     * @return false|int|Redis Any number of keys corresponding to sets in redis or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/sunionstore
     * @example
     * <pre>
     * $redis->del('s0', 's1', 's2');
     *
     * $redis->sAdd('s0', '1');
     * $redis->sAdd('s0', '2');
     * $redis->sAdd('s1', '3');
     * $redis->sAdd('s1', '1');
     * $redis->sAdd('s2', '3');
     * $redis->sAdd('s2', '4');
     *
     * var_dump($redis->sUnionStore('dst', 's0', 's1', 's2'));
     * var_dump($redis->sMembers('dst'));
     *
     * //int(4)
     * //array(4) {
     * //  [0]=>
     * //  string(1) "3"
     * //  [1]=>
     * //  string(1) "4"
     * //  [2]=>
     * //  string(1) "1"
     * //  [3]=>
     * //  string(1) "2"
     * //}
     * </pre>
     */
    public function sUnionStore($dstKey, $key1, ...$otherKeys) {}

    /**
     * Performs the difference between N sets and returns it.
     *
     * @param string $key1         first key for diff
     * @param string ...$otherKeys variadic list of keys corresponding to sets in redis
     *
     * @return array|false|Redis string[] The difference of the first set will all the others or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/sdiff
     * @example
     * <pre>
     * $redis->del('s0', 's1', 's2');
     *
     * $redis->sAdd('s0', '1');
     * $redis->sAdd('s0', '2');
     * $redis->sAdd('s0', '3');
     * $redis->sAdd('s0', '4');
     *
     * $redis->sAdd('s1', '1');
     * $redis->sAdd('s2', '3');
     *
     * var_dump($redis->sDiff('s0', 's1', 's2'));
     *
     * //array(2) {
     * //  [0]=>
     * //  string(1) "4"
     * //  [1]=>
     * //  string(1) "2"
     * //}
     * </pre>
     */
    public function sDiff($key1, ...$otherKeys) {}

    /**
     * Performs the same action as sDiff, but stores the result in the first key
     *
     * @param string $dstKey       the key to store the diff into.
     * @param string $key1         first key for diff
     * @param string ...$otherKeys variadic list of keys corresponding to sets in redis
     *
     * @return int|false|Redis The cardinality of the resulting set, or FALSE in case of a missing key or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/sdiffstore
     * @example
     * <pre>
     * $redis->del('s0', 's1', 's2');
     *
     * $redis->sAdd('s0', '1');
     * $redis->sAdd('s0', '2');
     * $redis->sAdd('s0', '3');
     * $redis->sAdd('s0', '4');
     *
     * $redis->sAdd('s1', '1');
     * $redis->sAdd('s2', '3');
     *
     * var_dump($redis->sDiffStore('dst', 's0', 's1', 's2'));
     * var_dump($redis->sMembers('dst'));
     *
     * //int(2)
     * //array(2) {
     * //  [0]=>
     * //  string(1) "4"
     * //  [1]=>
     * //  string(1) "2"
     * //}
     * </pre>
     */
    public function sDiffStore($dstKey, $key1, ...$otherKeys) {}

    /**
     * Returns the contents of a set.
     *
     * @param string $key
     *
     * @return array|false|Redis An array of elements, the contents of the set or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/smembers
     * @example
     * <pre>
     * $redis->del('s');
     * $redis->sAdd('s', 'a');
     * $redis->sAdd('s', 'b');
     * $redis->sAdd('s', 'a');
     * $redis->sAdd('s', 'c');
     * var_dump($redis->sMembers('s'));
     *
     * //array(3) {
     * //  [0]=>
     * //  string(1) "c"
     * //  [1]=>
     * //  string(1) "a"
     * //  [2]=>
     * //  string(1) "b"
     * //}
     * // The order is random and corresponds to redis' own internal representation of the set structure.
     * </pre>
     */
    public function sMembers($key) {}

    /**
     * Check if one or more values are members of a set.
     *
     * @link https://redis.io/commands/smismember
     * @see smember()
     *
     * @param string $key              The set to query.
     * @param string $member           The first value to test if exists in the set.
     * @param string ...$other_members Any number of additional values to check.
     *
     * @return Redis|array|false An array of integers representing whether each passed value was a member of the set.
     *
     * @example
     * $redis->sAdd('ds9-crew', ...["Sisko", "Kira", "Dax", "Worf", "Bashir", "O'Brien"]);
     * $members = $redis->sMIsMember('ds9-crew', ...['Sisko', 'Picard', 'Data', 'Worf']);
     */
    public function sMisMember(string $key, string $member, string ...$other_members): array|false {}

    /**
     * @link    https://redis.io/commands/smembers
     *
     * @param  string  $key
     * @return array|Redis   An array of elements, the contents of the set or Redis if in multimode
     *
     * @throws RedisException
     */
    #[Deprecated(replacement: '%class%->sMembers(%parametersList%)')]
    public function sGetMembers($key) {}

    /**
     * Scan a set for members
     *
     * @param string $key         The Redis SET key in question.
     * @param int|null &$iterator A reference to an iterator which should be initialized to NULL that
     *                            PhpRedis will update with the value returned from Redis after each
     *                            subsequent call to SSCAN.  Once this cursor is zero you know all
     *                            members have been traversed.
     * @param string $pattern     An optional glob style pattern to match against, so Redis only
     *                            returns the subset of members matching this pattern.
     * @param int    $count       A hint to Redis as to how many members it should scan in one command
     *                            before returning members for that iteration.
     *
     * @return array|false|Redis PHPRedis will return an array of keys or FALSE when we're done iterating or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/sscan
     * @example
     * <pre>
     * $redis->del('myset');
     * for ($i = 0; $i < 10000; $i++) {
     *     $redis->sAdd('myset', "member:$i");
     * }
     * $redis->sadd('myset', 'foofoo');
     *
     * $redis->setOption(Redis::OPT_SCAN, Redis::SCAN_NORETRY);
     *
     * $scanned = 0;
     * $it = null;
     *
     * // Without Redis::SCAN_RETRY we may receive empty results and
     * // a nonzero iterator.
     * do {
     *     // Scan members containing '5'
     *     $members = $redis->sscan('myset', $it, '*5*');
     *     foreach ($members as $member) {
     *          echo "NORETRY: $member\n";
     *          $scanned++;
     *     }
     * } while ($it != 0);
     * echo "TOTAL: $scanned\n";
     *
     * $redis->setOption(Redis::OPT_SCAN, Redis::SCAN_RETRY);
     *
     * $scanned = 0;
     * $it = null;
     *
     * // With Redis::SCAN_RETRY PhpRedis will never return an empty array
     * // when the cursor is non-zero
     * while (($members = $redis->sScan('set', $it, '*5*'))) {
     *     foreach ($members as $member) {
     *         echo "RETRY: $member\n";
     *         $scanned++;
     *     }
     * }
     * </pre>
     */
    public function sScan($key, &$iterator, $pattern = null, $count = 0) {}

    /**
     * Sets a value and returns the previous entry at that key.
     *
     * @param string       $key
     * @param mixed        $value
     *
     * @return string|mixed|false|Redis A string (mixed, if used serializer), the previous value located at this key or false if it didn't exist or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/getset
     * @example
     * <pre>
     * $redis->set('x', '42');
     * $exValue = $redis->getSet('x', 'lol');   // return '42', replaces x by 'lol'
     * $newValue = $redis->get('x')'            // return 'lol'
     * </pre>
     */
    public function getSet($key, $value) {}

    /**
     * Returns a random key
     *
     * @return string|false|Redis an existing key in redis or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/randomkey
     * @example
     * <pre>
     * $key = $redis->randomKey();
     * $surprise = $redis->get($key);  // who knows what's in there.
     * </pre>
     */
    public function randomKey() {}

    /**
     * Switches to a given database
     *
     * @param int $dbIndex
     *
     * @return bool|Redis TRUE in case of success, FALSE in case of failure or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/select
     * @example
     * <pre>
     * $redis->select(0);       // switch to DB 0
     * $redis->set('x', '42');  // write 42 to x
     * $redis->move('x', 1);    // move to DB 1
     * $redis->select(1);       // switch to DB 1
     * $redis->get('x');        // will return 42
     * </pre>
     */
    public function select($dbIndex) {}

    /**
     * Moves a key to a different database.
     *
     * @param string $key
     * @param int    $dbIndex
     *
     * @return bool|Redis TRUE in case of success, FALSE in case of failure or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/move
     * @example
     * <pre>
     * $redis->select(0);       // switch to DB 0
     * $redis->set('x', '42');  // write 42 to x
     * $redis->move('x', 1);    // move to DB 1
     * $redis->select(1);       // switch to DB 1
     * $redis->get('x');        // will return 42
     * </pre>
     */
    public function move($key, $dbIndex) {}

    /**
     * Renames a key
     *
     * @param string $srcKey
     * @param string $dstKey
     *
     * @return bool|Redis TRUE in case of success, FALSE in case of failure or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/rename
     * @example
     * <pre>
     * $redis->set('x', '42');
     * $redis->rename('x', 'y');
     * $redis->get('y');   // → 42
     * $redis->get('x');   // → `FALSE`
     * </pre>
     */
    public function rename($srcKey, $dstKey) {}

    /**
     * @link    https://redis.io/commands/rename
     *
     * @param   string  $srcKey
     * @param   string  $dstKey
     *
     * @throws RedisException
     */
    #[Deprecated(replacement: '%class%->rename(%parametersList%)')]
    public function renameKey($srcKey, $dstKey) {}

    /**
     * Renames a key
     *
     * Same as rename, but will not replace a key if the destination already exists.
     * This is the same behaviour as setnx.
     *
     * @param string $srcKey
     * @param string $dstKey
     *
     * @return bool|Redis TRUE in case of success, FALSE in case of failure or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/renamenx
     * @example
     * <pre>
     * $redis->set('x', '42');
     * $redis->rename('x', 'y');
     * $redis->get('y');   // → 42
     * $redis->get('x');   // → `FALSE`
     * </pre>
     */
    public function renameNx($srcKey, $dstKey) {}

    /**
     * Sets an expiration in seconds on the key in question.  If connected to
     * redis-server >= 7.0.0 you may send an additional "mode" argument which
     * modifies how the command will execute.
     *
     * @param string $key The key to set an expiration on.
     * @param int    $ttl The key's remaining Time To Live, in seconds
     * @param string|null $mode A two character modifier that changes how the command works.
     *                      NX - Set expiry only if key has no expiry
     *                      XX - Set expiry only if key has an expiry
     *                      LT - Set expiry only when new expiry is < current expiry
     *                      GT - Set expiry only when new expiry is > current expiry
     *
     * @return bool|Redis TRUE in case of success, FALSE in case of failure or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/expire
     * @example
     * <pre>
     * $redis->set('x', '42');
     * $redis->expire('x', 3);  // x will disappear in 3 seconds.
     * sleep(5);                    // wait 5 seconds
     * $redis->get('x');            // will return `FALSE`, as 'x' has expired.
     * </pre>
     */
    public function expire($key, $ttl, $mode = null) {}

    /**
     * Sets an expiration date (a timeout in milliseconds) on an item
     *
     * If connected to Redis >= 7.0.0 you can pass an optional mode argument that modifies how the command will execute.
     *
     * @param string $key       The key to set an expiration on.
     * @param int    $ttl       The key's remaining Time To Live, in milliseconds
     * @param string|null $mode A two character modifier that changes how the command works.
     *
     * @return bool|Redis TRUE in case of success, FALSE in case of failure or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/pexpire
     * @example
     * <pre>
     * $redis->set('x', '42');
     * $redis->pExpire('x', 11500); // x will disappear in 11500 milliseconds.
     * $redis->ttl('x');            // 12
     * $redis->pttl('x');           // 11500
     * </pre>
     */
    public function pExpire($key, $ttl, $mode = null) {}

    /**
     * @link    https://redis.io/commands/expire
     *
     * @param   string  $key
     * @param   int     $ttl
     * @return  bool|Redis returns Redis if in multimode
     *
     * @throws RedisException
     */
    #[Deprecated(replacement: '%class%->expire(%parametersList%)')]
    public function setTimeout($key, $ttl) {}

    /**
     * Sets an expiration date (a timestamp) on an item.
     *
     * If connected to Redis >= 7.0.0 you can pass an optional 'mode' argument.
     * @see expire() For a description of the mode argument.
     *
     * @param string $key       The key to set an expiration on.
     * @param int    $timestamp The unix timestamp to expire at.
     * @param string|null $mode An option 'mode' that modifies how the command acts
     *
     * @return bool|Redis TRUE in case of success, FALSE in case of failure or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/expireat
     * @example
     * <pre>
     * $redis->set('x', '42');
     * $now = time(NULL);               // current timestamp
     * $redis->expireAt('x', $now + 3); // x will disappear in 3 seconds.
     * sleep(5);                        // wait 5 seconds
     * $redis->get('x');                // will return `FALSE`, as 'x' has expired.
     * </pre>
     */
    public function expireAt($key, $timestamp, $mode = null) {}

    /**
     * Sets an expiration date (a timestamp) on an item. Requires a timestamp in milliseconds
     *
     * If connected to Redis >= 7.0.0 you can pass an optional 'mode' argument.
     *
     * @param string $key       The key to set an expiration on.
     * @param int    $timestamp Unix timestamp. The key's date of death, in seconds from Epoch time
     * @param string|null $mode A two character modifier that changes how the command works.
     *
     * @return bool|Redis TRUE in case of success, FALSE in case of failure or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/pexpireat
     * @example
     * <pre>
     * $redis->set('x', '42');
     * $redis->pExpireAt('x', 1555555555005);
     * echo $redis->ttl('x');                       // 218270121
     * echo $redis->pttl('x');                      // 218270120575
     * </pre>
     */
    public function pExpireAt($key, $timestamp, $mode = null) {}

    /**
     * Returns the keys that match a certain pattern.
     *
     * @param string $pattern pattern, using '*' as a wildcard
     *
     * @return array|false|Redis The keys that match a certain pattern or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/keys
     * @example
     * <pre>
     * $allKeys = $redis->keys('*');   // all keys will match this.
     * $keyWithUserPrefix = $redis->keys('user*');
     * </pre>
     */
    public function keys($pattern) {}

    /**
     * @param string $pattern
     *
     * @throws RedisException
     * @link    https://redis.io/commands/keys
     */
    #[Deprecated(replacement: '%class%->keys(%parametersList%)')]
    public function getKeys($pattern) {}

    /**
     * Returns the current database's size
     *
     * @return false|int|Redis DB size, in number of keys or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/dbsize
     * @example
     * <pre>
     * $count = $redis->dbSize();
     * echo "Redis has $count keys\n";
     * </pre>
     */
    public function dbSize() {}

    /**
     * Authenticate a Redis connection after its been established.
     * Warning: The password is sent in plain-text over the network.
     *
     * @param mixed $credentials A string password, or an array with one or two string elements.
     *
     * @return bool|Redis TRUE if the connection is authenticated, FALSE otherwise or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/auth
     *
     * @example
     * $redis->auth('password');
     * $redis->auth(['password']);
     * $redis->auth(['username', 'password']);
     */
    public function auth($credentials) {}

    /**
     * Starts the background rewrite of AOF (Append-Only File)
     *
     * @return bool|Redis TRUE in case of success, FALSE in case of failure or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/bgrewriteaof
     * @example $redis->bgrewriteaof();
     */
    public function bgrewriteaof() {}

    /**
     * Changes the slave status
     * Either host and port, or no parameter to stop being a slave.
     *
     * This method and the corresponding command in Redis has been marked deprecated
     * and users should instead use replicaof() if connecting to redis-server >= 5.0.0.
     *
     * @param string $host [optional]
     * @param int    $port [optional]
     *
     * @return bool|Redis TRUE in case of success, FALSE in case of failure or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/slaveof
     * @example
     * <pre>
     * $redis->slaveof('10.0.1.7', 6379);
     * // ...
     * $redis->slaveof();
     * </pre>
     */
    #[Deprecated(replacement: '%class%->replicaof(%parametersList%)')]
    public function slaveof($host = '127.0.0.1', $port = 6379) {}

    /**
     * Access the Redis slowLog
     *
     * @param string $operation The operation you wish to perform. This can be one of the following values:
     *                          'GET'   - Retrieve the Redis slowlog as an array.
     *                          'LEN'   - Retrieve the length of the slowlog.
     *                          'RESET' - Remove all slowlog entries.
     * @param int    $length    This optional argument can be passed when operation
     *                          is 'get' and will specify how many elements to retrieve.
     *                          If omitted Redis will send up to a default number of
     *                          entries, which is configurable.
     *
     *                          Note:  With Redis >= 7.0.0 you can send -1 to mean "all".
     *
     * @return mixed|Redis The return value of SLOWLOG will depend on which operation was performed or Redis if in multimode
     * - SLOWLOG GET: Array of slowLog entries, as provided by Redis
     * - SLOGLOG LEN: Integer, the length of the slowLog
     * - SLOWLOG RESET: Boolean, depending on success
     *
     * @throws RedisException
     *
     * @example
     * <pre>
     * // Get ten slowLog entries
     * $redis->slowLog('get', 10);
     * // Get the default number of slowLog entries
     *
     * $redis->slowLog('get');
     * // Reset our slowLog
     * $redis->slowLog('reset');
     *
     * // Retrieve slowLog length
     * $redis->slowLog('len');
     * </pre>
     *
     * @link https://redis.io/commands/slowlog
     */
    public function slowLog(string $operation, int $length = 0) {}

    /**
     * Describes the object pointed to by a key.
     * The information to retrieve (string) and the key (string).
     * Info can be one of the following:
     * - "encoding"
     * - "refcount"
     * - "idletime"
     *
     * @param string $subcommand
     * @param string $key
     *
     * @return string|int|false|Redis for "encoding", int for "refcount" and "idletime", FALSE if the key doesn't exist or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/object
     * @example
     * <pre>
     * $redis->lPush('l', 'Hello, world!');
     * $redis->object("encoding", "l"); // → ziplist
     * $redis->object("refcount", "l"); // → 1
     * $redis->object("idletime", "l"); // → 400 (in seconds, with a precision of 10 seconds).
     * </pre>
     */
    public function object($subcommand, $key) {}

    /**
     * Performs a synchronous save.
     *
     * @return bool|Redis TRUE in case of success, FALSE in case of failure or Redis if in multimode
     * If a save is already running, this command will fail and return FALSE.
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/save
     * @example $redis->save();
     */
    public function save() {}

    /**
     * Performs a background save.
     *
     * @return bool|Redis TRUE in case of success, FALSE in case of failure or Redis if in multimode
     * If a save is already running, this command will fail and return FALSE
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/bgsave
     * @example $redis->bgSave();
     */
    public function bgSave() {}

    /**
     * Returns the timestamp of the last disk save.
     *
     * @return false|int|Redis timestamp or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/lastsave
     * @example $redis->lastSave();
     */
    public function lastSave() {}

    /**
     * Blocks the current client until all the previous write commands are successfully transferred and
     * acknowledged by at least the specified number of slaves.
     *
     * @param int $numreplicas The number of replicas we want to confirm write operaions
     * @param int $timeout     How long to wait (zero meaning forever).
     *
     * @return int|false|Redis The command returns the number of slaves reached by all the writes performed in the or Redis if in multimode
     *              context of the current connection
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/wait
     * @example $redis->wait(2, 1000);
     */
    public function wait($numreplicas, $timeout) {}

    /**
     * Returns the type of data pointed by a given key.
     *
     * @param string $key
     *
     * @return false|int|Redis returns Redis if in multimode
     * Depending on the type of the data pointed by the key,
     * this method will return the following value:
     * - string: Redis::REDIS_STRING
     * - set:   Redis::REDIS_SET
     * - list:  Redis::REDIS_LIST
     * - zset:  Redis::REDIS_ZSET
     * - hash:  Redis::REDIS_HASH
     * - stream: Redis::REDIS_STREAM
     * - other: Redis::REDIS_NOT_FOUND
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/type
     * @example $redis->type('key');
     */
    public function type(string $key) {}

    /**
     * Append specified string to the string stored in specified key.
     *
     * @param string       $key
     * @param mixed        $value
     *
     * @return false|int|Redis Size of the value after the append or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/append
     * @example
     * <pre>
     * $redis->set('key', 'value1');
     * $redis->append('key', 'value2'); // 12
     * $redis->get('key');              // 'value1value2'
     * </pre>
     */
    public function append($key, $value) {}

    /**
     * Return a substring of a larger string
     *
     * @param string $key
     * @param int    $start
     * @param int    $end
     *
     * @return string|Redis the substring or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/getrange
     * @example
     * <pre>
     * $redis->set('key', 'string value');
     * $redis->getRange('key', 0, 5);   // 'string'
     * $redis->getRange('key', -5, -1); // 'value'
     * </pre>
     */
    public function getRange($key, $start, $end) {}

    /**
     * Return a substring of a larger string
     *
     * @param   string  $key
     * @param   int     $start
     * @param   int     $end
     *
     * @throws RedisException
     */
    #[Deprecated]
    public function substr($key, $start, $end) {}

    /**
     * Changes a substring of a larger string.
     *
     * @param string $key
     * @param int    $offset
     * @param string $value
     *
     * @return false|int|Redis the length of the string after it was modified or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/setrange
     * @example
     * <pre>
     * $redis->set('key', 'Hello world');
     * $redis->setRange('key', 6, "redis"); // returns 11
     * $redis->get('key');                  // "Hello redis"
     * </pre>
     */
    public function setRange($key, $offset, $value) {}

    /**
     * Get the length of a string value.
     *
     * @param string $key
     * @return false|int|Redis The length of the string key if it exists, zero if it does not, and false on failure.
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/strlen
     * @example
     * <pre>
     * $redis->set('key', 'value');
     * $redis->strlen('key'); // 5
     * </pre>
     */
    public function strlen($key) {}

    /**
     * Return the position of the first bit set to 1 or 0 in a string. The position is returned, thinking of the
     * string as an array of bits from left to right, where the first byte's most significant bit is at position 0,
     * the second byte's most significant bit is at position 8, and so forth.
     *
     * @param string $key   The key to check (must be a string)
     * @param bool   $bit   Whether to look for an unset (0) or set (1) bit.
     * @param int    $start Where in the string to start looking.
     * @param int    $end   Where in the string to stop looking.
     * @param bool   $bybit If true, Redis will treat $start and $end as BIT values and not bytes, so if start was 0 and end was 2, Redis would only search the first two bits.
     *
     * @return false|int|Redis The command returns the position of the first bit set to 1 or 0 according to the request or Redis if in multimode
     * If we look for set bits (the bit argument is 1) and the string is empty or composed of just
     * zero bytes, -1 is returned. If we look for clear bits (the bit argument is 0) and the string
     * only contains bit set to 1, the function returns the first bit not part of the string on the
     * right. So if the string is three bytes set to the value 0xff the command BITPOS key 0 will
     * return 24, since up to bit 23 all the bits are 1. Basically, the function considers the right
     * of the string as padded with zeros if you look for clear bits and specify no range or the
     * start argument only. However, this behavior changes if you are looking for clear bits and
     * specify a range with both start and end. If no clear bit is found in the specified range, the
     * function returns -1 as the user specified a clear range and there are no 0 bits in that range.
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/bitpos
     * @example
     * <pre>
     * $redis->set('key', '\xff\xff');
     * $redis->bitpos('key', 1); // int(0)
     * $redis->bitpos('key', 1, 1); // int(8)
     * $redis->bitpos('key', 1, 3); // int(-1)
     * $redis->bitpos('key', 0); // int(16)
     * $redis->bitpos('key', 0, 1); // int(16)
     * $redis->bitpos('key', 0, 1, 5); // int(-1)
     * </pre>
     */
    public function bitpos($key, $bit, $start = 0, $end = -1, $bybit = false) {}

    /**
     * Return a single bit out of a larger string
     *
     * @param string $key
     * @param int    $offset
     *
     * @return false|int|Redis the bit value (0 or 1) or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/getbit
     * @example
     * <pre>
     * $redis->set('key', "\x7f");  // this is 0111 1111
     * $redis->getBit('key', 0);    // 0
     * $redis->getBit('key', 1);    // 1
     * </pre>
     */
    public function getBit($key, $offset) {}

    /**
     * Changes a single bit of a string.
     *
     * @param string   $key
     * @param int      $offset
     * @param bool|int $value  bool or int (1 or 0)
     *
     * @return false|int|Redis 0 or 1, the value of the bit before it was set or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/setbit
     * @example
     * <pre>
     * $redis->set('key', "*");     // ord("*") = 42 = 0x2f = "0010 1010"
     * $redis->setBit('key', 5, 1); // returns 0
     * $redis->setBit('key', 7, 1); // returns 0
     * $redis->get('key');          // chr(0x2f) = "/" = b("0010 1111")
     * </pre>
     */
    public function setBit($key, $offset, $value) {}

    /**
     * Count bits in a string
     *
     * @param string $key The key in question (must be a string key)
     * @param int $start The index where Redis should start counting. If omitted it defaults to zero, which means the start of the string.
     * @param int $end The index where Redis should stop counting. If omitted it defaults to -1, meaning the very end of the string.
     * @param bool $bybit Whether or not Redis should treat $start and $end as bit positions, rather than bytes.
     *
     * @return false|int|Redis The number of bits set to 1 in the value behind the input key or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/bitcount
     * @example
     * <pre>
     * $redis->set('bit', '345'); // // 11 0011  0011 0100  0011 0101
     * var_dump( $redis->bitCount('bit', 0, 0) ); // int(4)
     * var_dump( $redis->bitCount('bit', 1, 1) ); // int(3)
     * var_dump( $redis->bitCount('bit', 2, 2) ); // int(4)
     * var_dump( $redis->bitCount('bit', 0, 2) ); // int(11)
     * </pre>
     */
    public function bitCount($key, $start = 0, $end = -1, $bybit = false) {}

    /**
     * Bitwise operation on multiple keys.
     *
     * @param string $operation    either "AND", "OR", "NOT", "XOR"
     * @param string $retKey       return key
     * @param string $key1         first key
     * @param string ...$otherKeys variadic list of keys
     *
     * @return false|int|Redis The size of the string stored in the destination key or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/bitop
     * @example
     * <pre>
     * $redis->set('bit1', '1'); // 11 0001
     * $redis->set('bit2', '2'); // 11 0010
     *
     * $redis->bitOp('AND', 'bit', 'bit1', 'bit2'); // bit = 110000
     * $redis->bitOp('OR',  'bit', 'bit1', 'bit2'); // bit = 110011
     * $redis->bitOp('NOT', 'bit', 'bit1', 'bit2'); // bit = 110011
     * $redis->bitOp('XOR', 'bit', 'bit1', 'bit2'); // bit = 11
     * </pre>
     */
    public function bitOp($operation, $retKey, $key1, ...$otherKeys) {}

    /**
     * Removes all entries from the current database.
     *
     * @param bool|null $async Whether to perform the task in a blocking or non-blocking way. Requires server version 4.0.0 or greater
     *
     * @return bool|Redis Always TRUE or Redis if in multimode
     * @throws RedisException
     * @link    https://redis.io/commands/flushdb
     * @example $redis->flushDB();
     */
    public function flushDB($async = null) {}

    /**
     * Removes all entries from all databases.
     *
     * @param bool|null $async Whether to perform the task in a blocking or non-blocking way. Requires server version 4.0.0 or greater
     *
     * @return bool|Redis Always TRUE or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/flushall
     * @example $redis->flushAll();
     */
    public function flushAll($async = null) {}

    /**
     * Sort the contents of a Redis key in various ways.
     *
     * @param string $key     The key you wish to sort
     * @param array|null $options Various options controlling how you would like the data sorted.
     *                        See blow for a detailed description of this options array.
     *                        'SORT'  => 'ASC'|| 'DESC' // Sort in descending or descending order.
     *                        'ALPHA' => true || false  // Whether to sort alphanumerically.
     *                        'LIMIT' => [0, 10]        // Return a subset of the data at offset, count
     *                        'BY'    => 'weight_*'     // For each element in the key, read data from the
     *                                                     external key weight_* and sort based on that value.
     *                        'GET'   => 'weight_*'     // For each element in the source key, retrieve the
     *                                                     data from key weight_* and return that in the result
     *                                                     rather than the source keys' element.  This can
     *                                                     be used in combination with 'BY'
     *
     * @return mixed This command can either return an array with the sorted data or the
     * number of elements placed in a destination set when using the STORE option.
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/sort
     * @example
     * <pre>
     * $redis->del('s');
     * $redis->sadd('s', 5);
     * $redis->sadd('s', 4);
     * $redis->sadd('s', 2);
     * $redis->sadd('s', 1);
     * $redis->sadd('s', 3);
     *
     * var_dump($redis->sort('s')); // 1,2,3,4,5
     * var_dump($redis->sort('s', array('sort' => 'desc'))); // 5,4,3,2,1
     * var_dump($redis->sort('s', array('sort' => 'desc', 'store' => 'out'))); // (int)5
     * </pre>
     */
    public function sort($key, $options = null) {}

    /**
     * Returns an associative array of strings and integers
     *
     * If connected to Redis server >= 7.0.0 you may pass multiple optional sections.
     *
     * @param string ...$sections Optional section(s) you wish Redis server to return.
     * SERVER | CLIENTS | MEMORY | PERSISTENCE | STATS | REPLICATION | CPU | CLUSTER | KEYSPACE | COMMANDSTATS
     *
     * Returns an associative array of strings and integers, with the following keys:
     * - redis_version
     * - redis_git_sha1
     * - redis_git_dirty
     * - arch_bits
     * - multiplexing_api
     * - process_id
     * - uptime_in_seconds
     * - uptime_in_days
     * - lru_clock
     * - used_cpu_sys
     * - used_cpu_user
     * - used_cpu_sys_children
     * - used_cpu_user_children
     * - connected_clients
     * - connected_slaves
     * - client_longest_output_list
     * - client_biggest_input_buf
     * - blocked_clients
     * - used_memory
     * - used_memory_human
     * - used_memory_peak
     * - used_memory_peak_human
     * - mem_fragmentation_ratio
     * - mem_allocator
     * - loading
     * - aof_enabled
     * - changes_since_last_save
     * - bgsave_in_progress
     * - last_save_time
     * - total_connections_received
     * - total_commands_processed
     * - expired_keys
     * - evicted_keys
     * - keyspace_hits
     * - keyspace_misses
     * - hash_max_zipmap_entries
     * - hash_max_zipmap_value
     * - pubsub_channels
     * - pubsub_patterns
     * - latest_fork_usec
     * - vm_enabled
     * - role
     *
     * @return array|false|Redis returns Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/info
     * @example
     * <pre>
     * $redis->info();
     *
     * or
     *
     * $redis->info("COMMANDSTATS"); //Information on the commands that have been run (>=2.6 only)
     * $redis->info("CPU"); // just CPU information from Redis INFO
     * </pre>
     */
    public function info(...$sections) {}

    /**
     * Returns an indexed array whose first element is the role
     *
     * @return mixed|Redis Will return an array with the role of the connected instance unless there is an error.  returns Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/role
     * @example
     * <pre>
     * $redis->role();
     * </pre>
     */
    public function role() {}

    /**
     * Resets the statistics reported by Redis using the INFO command (`info()` function).
     * These are the counters that are reset:
     *      - Keyspace hits
     *      - Keyspace misses
     *      - Number of commands processed
     *      - Number of connections received
     *      - Number of expired keys
     *
     * @return bool|Redis `TRUE` in case of success, `FALSE` in case of failure or Redis if in multimode
     *
     * @throws RedisException
     *
     * @example $redis->resetStat();
     * @link https://redis.io/commands/config-resetstat
     */
    #[Deprecated(replacement: "%class%->rawCommand('CONFIG', 'RESETSTAT')")]
    public function resetStat() {}

    /**
     * Returns the time to live left for a given key, in seconds. If the key doesn't exist, FALSE is returned.
     *
     * @param string $key
     *
     * @return int|bool|Redis the time left to live in seconds or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/ttl
     * @example
     * <pre>
     * $redis->setex('key', 123, 'test');
     * $redis->ttl('key'); // int(123)
     * </pre>
     */
    public function ttl($key) {}

    /**
     * Returns a time to live left for a given key, in milliseconds.
     *
     * If the key doesn't exist, FALSE is returned.
     *
     * @param string $key
     *
     * @return int|bool|Redis the time left to live in milliseconds or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/pttl
     * @example
     * <pre>
     * $redis->setex('key', 123, 'test');
     * $redis->pttl('key'); // int(122999)
     * </pre>
     */
    public function pttl($key) {}

    /**
     * Remove the expiration timer from a key.
     *
     * @param string $key
     *
     * @return bool|Redis TRUE if a timeout was removed, FALSE if the key didn’t exist or didn’t have an expiration timer or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/persist
     * @example $redis->persist('key');
     */
    public function persist($key) {}

    /**
     * Sets multiple key-value pairs in one atomic command.
     * MSETNX only returns TRUE if all the keys were set (see SETNX).
     *
     * @param array<string, string> $array Pairs: array(key => value, ...)
     *
     * @return bool|Redis TRUE in case of success, FALSE in case of failure or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/mset
     * @example
     * <pre>
     * $redis->mSet(array('key0' => 'value0', 'key1' => 'value1'));
     * var_dump($redis->get('key0'));
     * var_dump($redis->get('key1'));
     * // Output:
     * // string(6) "value0"
     * // string(6) "value1"
     * </pre>
     */
    public function mSet($array) {}

    /**
     * Get the values of all the specified keys.
     * If one or more keys dont exist, the array will contain FALSE at the position of the key.
     *
     * @param array $keys Array containing the list of the keys
     *
     * @return array|Redis Array containing the values related to keys in argument or Redis if in multimode
     *
     * @throws RedisException
     *
     * @example
     * <pre>
     * $redis->set('key1', 'value1');
     * $redis->set('key2', 'value2');
     * $redis->set('key3', 'value3');
     * $redis->getMultiple(array('key1', 'key2', 'key3')); // array('value1', 'value2', 'value3');
     * $redis->getMultiple(array('key0', 'key1', 'key5')); // array(`FALSE`, 'value2', `FALSE`);
     * </pre>
     */
    #[Deprecated(replacement: '%class%->mGet(%parametersList%)')]
    public function getMultiple(array $keys) {}

    /**
     * Returns the values of all specified keys.
     *
     * For every key that does not hold a string value or does not exist,
     * the special value false is returned. Because of this, the operation never fails.
     *
     * @param array $array
     *
     * @return false|list<false|string>|Redis returns Redis if in multimode
     *
     * @throws RedisException
     *
     * @link https://redis.io/commands/mget
     * @example
     * <pre>
     * $redis->del('x', 'y', 'z', 'h');  // remove x y z
     * $redis->mset(array('x' => 'a', 'y' => 'b', 'z' => 'c'));
     * $redis->hset('h', 'field', 'value');
     * var_dump($redis->mget(array('x', 'y', 'z', 'h')));
     * // Output:
     * // array(3) {
     * //   [0]=> string(1) "a"
     * //   [1]=> string(1) "b"
     * //   [2]=> string(1) "c"
     * //   [3]=> bool(false)
     * // }
     * </pre>
     */
    public function mGet(array $array) {}

    /**
     * Set one ore more string keys but only if none of the key exist.
     *
     * @see mSet()
     *
     * @param array<string, string> $array
     * @return false|int|Redis 1 (if the keys were set) or 0 (no key was set) or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/msetnx
     * @example $redis->msetnx(['foo' => 'bar', 'baz' => 'bop']);
     */
    public function msetnx(array $array) {}

    /**
     * Pops a value from the tail of a list, and pushes it to the front of another list.
     * Also return this value.
     *
     * @since   redis >= 1.1
     *
     * @param string $srcKey
     * @param string $dstKey
     *
     * @return string|mixed|false|Redis The element that was moved in case of success, FALSE in case of failure or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/rpoplpush
     * @example
     * <pre>
     * $redis->del('x', 'y');
     *
     * $redis->lPush('x', 'abc');
     * $redis->lPush('x', 'def');
     * $redis->lPush('y', '123');
     * $redis->lPush('y', '456');
     *
     * // move the last of x to the front of y.
     * var_dump($redis->rpoplpush('x', 'y'));
     * var_dump($redis->lRange('x', 0, -1));
     * var_dump($redis->lRange('y', 0, -1));
     *
     * //Output:
     * //
     * //string(3) "abc"
     * //array(1) {
     * //  [0]=>
     * //  string(3) "def"
     * //}
     * //array(3) {
     * //  [0]=>
     * //  string(3) "abc"
     * //  [1]=>
     * //  string(3) "456"
     * //  [2]=>
     * //  string(3) "123"
     * //}
     * </pre>
     */
    public function rPopLPush($srcKey, $dstKey) {}

    /**
     * A blocking version of rPopLPush, with an integral timeout in the third parameter.
     *
     * @param string $srcKey
     * @param string $dstKey
     * @param int|float $timeout The number of seconds to wait. Note that you must be connected to Redis >= 6.0.0 to send a floating point timeout.
     *
     * @return  string|mixed|bool|Redis  The element that was moved in case of success, FALSE in case of timeout or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/brpoplpush
     */
    public function bRPopLPush($srcKey, $dstKey, $timeout) {}

    /**
     * Adds the specified member with a given score to the sorted set stored at key
     *
     * @param string      $key              The sorted set in question.
     * @param array|float $score_or_options Either the score for the first element, or an array of options.
     *                                      'NX',       # Only update elements that already exist
     *                                      'NX',       # Only add new elements but don't update existing ones.
     *                                      'LT'        # Only update existing elements if the new score is
     *                                                  # less than the existing one.
     *                                      'GT'        # Only update existing elements if the new score is
     *                                                  # greater than the existing one.
     *                                      'CH'        # Instead of returning the number of elements added,
     *                                                  # Redis will return the number Of elements that were
     *                                                  # changed in the operation.
     *                                      'INCR'      # Instead of setting each element to the provide score,
     *                                      # increment the element by the
     *                                      # provided score, much like ZINCRBY.  When this option
     *                                      # is passed, you may only send a single score and member.
     *
     *                                     Note:  'GX', 'LT', and 'NX' cannot be passed together, and PhpRedis
     *                                            will send whichever one is last in the options array.
     *
     * @param mixed $more_scores_and_mems       A variadic number of additional scores and members.
     *
     * @return false|int|Redis Number of values added or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/zadd
     * @example
     * <pre>
     * $redis->zAdd('z', 1, 'v1', 2, 'v2', 3, 'v3', 4, 'v4' );  // int(2)
     * $redis->zRem('z', 'v2', 'v3');                           // int(2)
     * $redis->zAdd('z', ['NX'], 5, 'v5');                      // int(1)
     * $redis->zAdd('z', ['NX'], 6, 'v5');                      // int(0)
     * $redis->zAdd('z', 7, 'v6');                              // int(1)
     * $redis->zAdd('z', 8, 'v6');                              // int(0)
     *
     * var_dump( $redis->zRange('z', 0, -1) );
     * // Output:
     * // array(4) {
     * //   [0]=> string(2) "v1"
     * //   [1]=> string(2) "v4"
     * //   [2]=> string(2) "v5"
     * //   [3]=> string(2) "v8"
     * // }
     *
     * var_dump( $redis->zRange('z', 0, -1, true) );
     * // Output:
     * // array(4) {
     * //   ["v1"]=> float(1)
     * //   ["v4"]=> float(4)
     * //   ["v5"]=> float(5)
     * //   ["v6"]=> float(8)
     * </pre>
     */
    public function zAdd($key, $score_or_options, ...$more_scores_and_mems) {}

    /**
     * Returns a range of elements from the ordered set stored at the specified key,
     * with values in the range [start, end]. start and stop are interpreted as zero-based indices:
     * 0 the first element,
     * 1 the second ...
     * -1 the last element,
     * -2 the penultimate ...
     *
     * @param string          $key   The sorted set in question.
     * @param string|int      $start The starting index we want to return.
     * @param string|int      $end   The final index we want to return.
     *
     * @param array|bool|null $options This value may either be an array of options to pass to
     *                                 the command, or for historical purposes a boolean which
     *                                 controls just the 'WITHSCORES' option.
     *                                 'WITHSCORES' => true,     # Return both scores and members.
     *                                 'LIMIT'      => [10, 10], # Start at offset 10 and return 10 elements.
     *                                 'REV'                     # Return the elements in reverse order
     *                                 'BYSCORE',                # Treat `start` and `end` as scores instead
     *                                 'BYLEX'                   # Treat `start` and `end` as lexicographical values.

     *                                 Note:  'BYLEX' and 'BYSCORE' are mutually exclusive.
     *
     * @return array|Redis Array containing the values in specified range or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/zrange
     * @example
     * <pre>
     * $redis->zAdd('key1', 0, 'val0');
     * $redis->zAdd('key1', 2, 'val2');
     * $redis->zAdd('key1', 10, 'val10');
     * $redis->zRange('key1', 0, -1); // array('val0', 'val2', 'val10')
     * // with scores
     * $redis->zRange('key1', 0, -1, true); // array('val0' => 0, 'val2' => 2, 'val10' => 10)
     * </pre>
     */
    public function zRange($key, $start, $end, $options = null) {}

    /**
     * Deletes a specified member from the ordered set.
     *
     * @param string       $key
     * @param string|mixed $member1
     * @param string|mixed ...$otherMembers
     *
     * @return false|int|Redis Number of deleted values or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/zrem
     * @example
     * <pre>
     * $redis->zAdd('z', 1, 'v1', 2, 'v2', 3, 'v3', 4, 'v4' );  // int(2)
     * $redis->zRem('z', 'v2', 'v3');                           // int(2)
     * var_dump( $redis->zRange('z', 0, -1) );
     * //// Output:
     * // array(2) {
     * //   [0]=> string(2) "v1"
     * //   [1]=> string(2) "v4"
     * // }
     * </pre>
     */
    public function zRem($key, $member1, ...$otherMembers) {}

    /**
     * @link https://redis.io/commands/zrem
     *
     * @param string       $key
     * @param string|mixed $member1
     * @param string|mixed ...$otherMembers
     *
     * @return false|int|Redis Number of deleted values or Redis if in multimode
     *
     * @throws RedisException
     */
    #[Deprecated(replacement: '%class%->zRem(%parametersList%)')]
    public function zDelete($key, $member1, ...$otherMembers) {}

    /**
     * Returns the elements of the sorted set stored at the specified key in the range [start, end]
     * in reverse order. start and stop are interpretated as zero-based indices:
     * 0 the first element,
     * 1 the second ...
     * -1 the last element,
     * -2 the penultimate ...
     *
     * @param string $key    The sorted set in question.
     * @param int    $start  The index to start listing elements
     * @param int    $end    The index to stop listing elements.
     * @param mixed  $scores Whether or not Redis should also return each members score.
     *
     * @return array|Redis Array containing the values in specified range or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/zrevrange
     * @example
     * <pre>
     * $redis->zAdd('key', 0, 'val0');
     * $redis->zAdd('key', 2, 'val2');
     * $redis->zAdd('key', 10, 'val10');
     * $redis->zRevRange('key', 0, -1); // array('val10', 'val2', 'val0')
     *
     * // with scores
     * $redis->zRevRange('key', 0, -1, true); // array('val10' => 10, 'val2' => 2, 'val0' => 0)
     * $redis->zRevRange('key', 0, -1, ['withscores' => true]);
     * </pre>
     */
    public function zRevRange($key, $start, $end, $scores = null) {}

    /**
     * Returns the elements of the sorted set stored at the specified key which have scores in the
     * range [start,end]. Adding a parenthesis before start or end excludes it from the range.
     * +inf and -inf are also valid limits.
     *
     * zRevRangeByScore returns the same items in reverse order, when the start and end parameters are swapped.
     *
     * @param string $key     The sorted set to query.
     * @param string $start   The minimum score of elements that Redis should return.
     * @param string $end     The maximum score of elements that Redis should return.
     * @param array  $options Options that change how Redis will execute the command.
     *
     *                        OPTION       TYPE            MEANING
     *                        'WITHSCORES' bool            Whether to also return scores.
     *                        'LIMIT'      [offset, count] Limit the reply to a subset of elements.
     *
     * @return array|false|Redis Array containing the values in specified range or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/zrangebyscore
     * @example
     * <pre>
     * $redis->zAdd('key', 0, 'val0');
     * $redis->zAdd('key', 2, 'val2');
     * $redis->zAdd('key', 10, 'val10');
     * $redis->zRangeByScore('key', 0, 3);                                          // array('val0', 'val2')
     * $redis->zRangeByScore('key', 0, 3, array('withscores' => TRUE);              // array('val0' => 0, 'val2' => 2)
     * $redis->zRangeByScore('key', 0, 3, array('limit' => array(1, 1));                        // array('val2')
     * $redis->zRangeByScore('key', 0, 3, array('withscores' => TRUE, 'limit' => array(1, 1));  // array('val2' => 2)
     * </pre>
     */
    public function zRangeByScore($key, $start, $end, array $options = []) {}

    /**
     * List elements from a Redis sorted set by score, highest to lowest
     *
     * @param string $key     The sorted set to query.
     * @param string $start   The highest score to include in the results.
     * @param string $end     The lowest score to include in the results.
     * @param array  $options An options array that modifies how the command executes.
     *                        <code>
     *                        $options = [
     *                            'WITHSCORES' => true|false # Whether or not to return scores
     *                            'LIMIT' => [offset, count] # Return a subset of the matching members
     *                        ];
     *                        </code>
     *
     *                        NOTE:  For legacy reason, you may also simply pass `true` for the
     *                               options argument, to mean `WITHSCORES`.
     *
     * @return array|false|Redis returns Redis if in multimode
     *
     * @throws RedisException
     * @see zRangeByScore()
     *
     * @example
     * $redis->zadd('oldest-people', 122.4493, 'Jeanne Calment', 119.2932, 'Kane Tanaka',
     *                               119.2658, 'Sarah Knauss',   118.7205, 'Lucile Randon',
     *                               117.7123, 'Nabi Tajima',    117.6301, 'Marie-Louise Meilleur',
     *                               117.5178, 'Violet Brown',   117.3753, 'Emma Morano',
     *                               117.2219, 'Chiyo Miyako',   117.0740, 'Misao Okawa');
     *
     * $redis->zRevRangeByScore('oldest-people', 122, 119);
     * $redis->zRevRangeByScore('oldest-people', 'inf', 118);
     * $redis->zRevRangeByScore('oldest-people', '117.5', '-inf', ['LIMIT' => [0, 1]]);
     */
    public function zRevRangeByScore(string $key, string $start, string $end, array $options = []) {}

    /**
     * Returns a lexigraphical range of members in a sorted set, assuming the members have the same score. The
     * min and max values are required to start with '(' (exclusive), '[' (inclusive), or be exactly the values
     * '-' (negative inf) or '+' (positive inf).  The command must be called with either three *or* five
     * arguments or will return FALSE.
     *
     * @param  string  $key  The ZSET you wish to run against.
     * @param  string  $min  The minimum alphanumeric value you wish to get.
     * @param  string  $max  The maximum alphanumeric value you wish to get.
     * @param  int  $offset  Optional argument if you wish to start somewhere other than the first element.
     * @param  int  $count  An optional count to limit the replies to (used in conjunction with offset)
     *
     * @return array|false|Redis Array containing the values in the specified range or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/zrangebylex
     * @example
     * <pre>
     * foreach (array('a', 'b', 'c', 'd', 'e', 'f', 'g') as $char) {
     *     $redis->zAdd('key', $char);
     * }
     *
     * $redis->zRangeByLex('key', '-', '[c'); // array('a', 'b', 'c')
     * $redis->zRangeByLex('key', '-', '(c'); // array('a', 'b')
     * $redis->zRangeByLex('key', '-', '[c'); // array('b', 'c')
     * </pre>
     */
    public function zRangeByLex(string $key, string $min, string $max, int $offset = -1, int $count = -1) {}

    /**
     * Retrieve the score of one or more members in a sorted set.
     *
     * @link https://redis.io/commands/zmscore
     *
     * @param string $key           The sorted set
     * @param mixed  $member        The first member to return the score from
     * @param mixed  $other_members One or more additional members to return the scores of.
     *
     * @return Redis|array|false An array of the scores of the requested elements.
     *
     * @example
     * $redis->zAdd('zs', 0, 'zero', 1, 'one', 2, 'two', 3, 'three');
     *
     * $redis->zMScore('zs', 'zero', 'two');
     * $redis->zMScore('zs', 'one', 'not-a-member');
     */
    public function zMscore(string $key, string $member, string ...$other_members): array|false {}

    /**
     * Pop one or more of the highest scoring elements from a sorted set.
     *
     * @param string $key     The sorted set to pop elements from.
     * @param int|null $count An optional count of elements to pop.
     *
     * @return Redis|array|false All of the popped elements with scores or false on fialure.
     *
     * @link https://redis.io/commands/zpopmax
     *
     * @example
     * $redis->zAdd('zs', 0, 'zero', 1, 'one', 2, 'two', 3, 'three');
     *
     * $redis->zPopMax('zs');
     * $redis->zPopMax('zs', 2);.
     */
    public function zPopMax(string $key, int $count = null): array|false {}

    /**
     * Pop one or more of the lowest scoring elements from a sorted set.
     *
     * @param string $key     The sorted set to pop elements from.
     * @param int|null $count An optional count of elements to pop.
     *
     * @return Redis|array|false The popped elements with their scores or false on failure.
     *
     * @link https://redis.io/commands/zpopmin
     *
     * @example
     * $redis->zAdd('zs', 0, 'zero', 1, 'one', 2, 'two', 3, 'three');
     *
     * $redis->zPopMin('zs');
     * $redis->zPopMin('zs', 2);
     */
    public function zPopMin(string $key, int $count = null): array|false {}

    /**
     * Retrieve one or more random members from a Redis sorted set.
     *
     * @param string $key     The sorted set to pull random members from.
     * @param array|null $options One or more options that determine exactly how the command operates.
     *
     *                        OPTION       TYPE     MEANING
     *                        'COUNT'      int      The number of random members to return.
     *                        'WITHSCORES' bool     Whether to return scores and members instead of
     *
     * @return Redis|string|array One ore more random elements.
     *
     * @see     https://redis.io/commands/zrandmember
     *
     * @example $redis->zRandMember('zs', ['COUNT' => 2, 'WITHSCORES' => true]);
     */
    public function zRandMember(string $key, array $options = null): string|array|false {}

    /**
     * List members of a Redis sorted set within a legographical range, in reverse order.
     *
     * @param string $key    The sorted set to list
     * @param string $min    The maximum legographical element to include in the result.
     * @param string $min    The minimum lexographical element to include in the result.
     * @param int    $offset An option offset within the matching elements to start at.
     * @param int    $count  An optional count to limit the replies to.
     *
     * @return false|array|Redis returns Redis if in multimode
     *
     * @throws RedisException
     *
     * @see zRangeByLex()
     * @link    https://redis.io/commands/zrevrangebylex
     *
     * @example
     * $redis->zRevRangeByLex('captains', '[Q', '[J');
     * $redis->zRevRangeByLex('captains', '[Q', '[J', 1, 2);
     */
    public function zRevRangeByLex(string $key, string $min, string $max, int $offset = -1, int $count = -1) {}

    /**
     * Removes all elements in the sorted set stored at key between the lexicographical range specified by min and max.
     * Applies when all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering.
     *
     * @param string $key The sorted set to remove elements from.
     * @param string $min The start of the lexographical range to remove.
     * @param string $max The end of the lexographical range to remove
     *
     * @return int|false|Redis The number of elements removed
     *
     * @link    https://redis.io/commands/zremrangebylex
     *
     * @example
     * $redis->zRemRangeByLex('zs', '[a', '(b');
     * $redis->zRemRangeByLex('zs', '(banana', '(eggplant');
     */
    public function zRemRangeByLex(string $key, string $min, string $max) {}

    /**
     * Returns the number of elements of the sorted set stored at the specified key which have
     * scores in the range [start,end]. Adding a parenthesis before start or end excludes it
     * from the range. +inf and -inf are also valid limits.
     *
     * @param string $key
     * @param string $start
     * @param string $end
     *
     * @return false|int|Redis the size of a corresponding zRangeByScore or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/zcount
     * @example
     * <pre>
     * $redis->zAdd('key', 0, 'val0');
     * $redis->zAdd('key', 2, 'val2');
     * $redis->zAdd('key', 10, 'val10');
     * $redis->zCount('key', 0, 3); // 2, corresponding to array('val0', 'val2')
     * </pre>
     */
    public function zCount($key, $start, $end) {}

    /**
     * Deletes the elements of the sorted set stored at the specified key which have scores in the range [start,end].
     *
     * @param string $key
     * @param string $start double or "+inf" or "-inf" as a string
     * @param string $end double or "+inf" or "-inf" as a string
     *
     * @return false|int|Redis The number of values deleted from the sorted set or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/zremrangebyscore
     * @example
     * <pre>
     * $redis->zAdd('key', 0, 'val0');
     * $redis->zAdd('key', 2, 'val2');
     * $redis->zAdd('key', 10, 'val10');
     * $redis->zRemRangeByScore('key', '0', '3'); // 2
     * </pre>
     */
    public function zRemRangeByScore($key, $start, $end) {}

    /**
     * @param string $key
     * @param float  $start
     * @param float  $end
     *
     * @throws RedisException
     */
    #[Deprecated(replacement: '%class%->zRemRangeByScore(%parametersList%)')]
    public function zDeleteRangeByScore($key, $start, $end) {}

    /**
     * Deletes the elements of the sorted set stored at the specified key which have rank in the range [start,end].
     *
     * @param string $key
     * @param int    $start
     * @param int    $end
     *
     * @return false|int|Redis The number of values deleted from the sorted set or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/zremrangebyrank
     * @example
     * <pre>
     * $redis->zAdd('key', 1, 'one');
     * $redis->zAdd('key', 2, 'two');
     * $redis->zAdd('key', 3, 'three');
     * $redis->zRemRangeByRank('key', 0, 1); // 2
     * $redis->zRange('key', 0, -1, array('withscores' => TRUE)); // array('three' => 3)
     * </pre>
     */
    public function zRemRangeByRank($key, $start, $end) {}

    /**
     * @link    https://redis.io/commands/zremrangebyscore
     *
     * @param string $key
     * @param int    $start
     * @param int    $end
     *
     * @throws RedisException
     */
    #[Deprecated(replacement: '%class%->zRemRangeByRank(%parametersList%)')]
    public function zDeleteRangeByRank($key, $start, $end) {}

    /**
     * Returns the cardinality of an ordered set.
     *
     * @param string $key
     *
     * @return false|int|Redis the set's cardinality or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/zsize
     * @example
     * <pre>
     * $redis->zAdd('key', 0, 'val0');
     * $redis->zAdd('key', 2, 'val2');
     * $redis->zAdd('key', 10, 'val10');
     * $redis->zCard('key');            // 3
     * </pre>
     */
    public function zCard($key) {}

    /**
     * Given one or more sorted set key names, return every element that is in the first
     * set but not any of the others.
     *
     * @param array $keys    One ore more sorted sets.
     * @param array|null $options An array which can contain ['WITHSCORES' => true] if you want Redis to return members and scores.
     *
     * @return Redis|array|false An array of members or false on failure.
     *
     * @link https://redis.io/commands/zdiff
     *
     * @example
     * $redis->zAdd('primes', 1, 'one', 3, 'three', 5, 'five');
     * $redis->zAdd('evens', 2, 'two', 4, 'four');
     * $redis->zAdd('mod3', 3, 'three', 6, 'six');
     *
     * $redis->zDiff(['primes', 'evens', 'mod3']);
     */
    public function zdiff(array $keys, array $options = null): array|false {}

    /**
     * @param string $key
     * @return false|int|Redis returns Redis if in multimode
     *
     * @throws RedisException
     */
    #[Deprecated(replacement: '%class%->zCard(%parametersList%)')]
    public function zSize($key) {}

    /**
     * Returns the score of a given member in the specified sorted set.
     *
     * @param string $key    The sorted set to query.
     * @param mixed  $member The member we wish to query.
     *
     * @return float|bool|Redis false if member or key not exists or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/zscore
     * @example
     * <pre>
     * $redis->zAdd('key', 2.5, 'val2');
     * $redis->zScore('key', 'val2'); // 2.5
     * </pre>
     */
    public function zScore($key, $member) {}

    /**
     * Returns the rank of a given member in the specified sorted set, starting at 0 for the item
     * with the smallest score. zRevRank starts at 0 for the item with the largest score.
     *
     * @param string       $key
     * @param mixed        $member
     *
     * @return int|false|Redis the item's score, or false if key or member is not exists or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/zrank
     * @example
     * <pre>
     * $redis->del('z');
     * $redis->zAdd('key', 1, 'one');
     * $redis->zAdd('key', 2, 'two');
     * $redis->zRank('key', 'one');     // 0
     * $redis->zRank('key', 'two');     // 1
     * $redis->zRevRank('key', 'one');  // 1
     * $redis->zRevRank('key', 'two');  // 0
     * </pre>
     */
    public function zRank($key, $member) {}

    /**
     * @see zRank()
     * @param string       $key
     * @param string|mixed $member
     *
     * @return int|false|Redis the item's score, false - if key or member is not exists or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link   https://redis.io/commands/zrevrank
     */
    public function zRevRank($key, $member) {}

    /**
     * Increments the score of a member from a sorted set by a given amount.
     *
     * @param string $key
     * @param float  $value (double) value that will be added to the member's score
     * @param mixed  $member
     *
     * @return float|Redis the new value or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/zincrby
     * @example
     * <pre>
     * $redis->del('key');
     * $redis->zIncrBy('key', 2.5, 'member1');  // key or member1 didn't exist, so member1's score is to 0
     *                                          // before the increment and now has the value 2.5
     * $redis->zIncrBy('key', 1, 'member1');    // 3.5
     * </pre>
     */
    public function zIncrBy($key, $value, $member) {}

    /**
     * Creates an union of sorted sets given in second argument.
     * The result of the union will be stored in the sorted set defined by the first argument.
     * The third optionnel argument defines weights to apply to the sorted sets in input.
     * In this case, the weights will be multiplied by the score of each element in the sorted set
     * before applying the aggregation. The forth argument defines the AGGREGATE option which
     * specify how the results of the union are aggregated.
     *
     * @param string $output
     * @param array  $zSetKeys
     * @param null|array $weights
     * @param string|null $aggregateFunction  Either "SUM", "MIN", or "MAX": defines the behaviour to use on
     * duplicate entries during the zUnionStore
     *
     * @return false|int|Redis The number of values in the new sorted set or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/zunionstore
     * @example
     * <pre>
     * $redis->del('k1');
     * $redis->del('k2');
     * $redis->del('k3');
     * $redis->del('ko1');
     * $redis->del('ko2');
     * $redis->del('ko3');
     *
     * $redis->zAdd('k1', 0, 'val0');
     * $redis->zAdd('k1', 1, 'val1');
     *
     * $redis->zAdd('k2', 2, 'val2');
     * $redis->zAdd('k2', 3, 'val3');
     *
     * $redis->zUnionStore('ko1', array('k1', 'k2')); // 4, 'ko1' => array('val0', 'val1', 'val2', 'val3')
     *
     * // Weighted zUnionStore
     * $redis->zUnionStore('ko2', array('k1', 'k2'), array(1, 1)); // 4, 'ko2' => array('val0', 'val1', 'val2', 'val3')
     * $redis->zUnionStore('ko3', array('k1', 'k2'), array(5, 1)); // 4, 'ko3' => array('val0', 'val2', 'val3', 'val1')
     * </pre>
     */
    public function zUnionStore($output, $zSetKeys, ?array $weights = null, $aggregateFunction = null) {}

    /**
     * @param string     $Output
     * @param array      $ZSetKeys
     * @param array|null $Weights
     * @param string     $aggregateFunction
     *
     * @throws RedisException
     */
    #[Deprecated(replacement: '%class%->zUnionStore(%parametersList%)')]
    public function zUnion($Output, $ZSetKeys, array $Weights = null, $aggregateFunction = 'SUM') {}

    /**
     * Creates an intersection of sorted sets given in second argument.
     * The result of the union will be stored in the sorted set defined by the first argument.
     * The third optional argument defines weights to apply to the sorted sets in input.
     * In this case, the weights will be multiplied by the score of each element in the sorted set
     * before applying the aggregation. The forth argument defines the AGGREGATE option which
     * specify how the results of the union are aggregated.
     *
     * @param string $output
     * @param array  $zSetKeys
     * @param null|array $weights
     * @param string|null $aggregateFunction Either "SUM", "MIN", or "MAX":
     * defines the behaviour to use on duplicate entries during the zInterStore.
     *
     * @return false|int|Redis The number of values in the new sorted set or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/zinterstore
     * @example
     * <pre>
     * $redis->del('k1');
     * $redis->del('k2');
     * $redis->del('k3');
     *
     * $redis->del('ko1');
     * $redis->del('ko2');
     * $redis->del('ko3');
     * $redis->del('ko4');
     *
     * $redis->zAdd('k1', 0, 'val0');
     * $redis->zAdd('k1', 1, 'val1');
     * $redis->zAdd('k1', 3, 'val3');
     *
     * $redis->zAdd('k2', 2, 'val1');
     * $redis->zAdd('k2', 3, 'val3');
     *
     * $redis->zInterStore('ko1', array('k1', 'k2'));               // 2, 'ko1' => array('val1', 'val3')
     * $redis->zInterStore('ko2', array('k1', 'k2'), array(1, 1));  // 2, 'ko2' => array('val1', 'val3')
     *
     * // Weighted zInterStore
     * $redis->zInterStore('ko3', array('k1', 'k2'), array(1, 5), 'min'); // 2, 'ko3' => array('val1', 'val3')
     * $redis->zInterStore('ko4', array('k1', 'k2'), array(1, 5), 'max'); // 2, 'ko4' => array('val3', 'val1')
     * </pre>
     */
    public function zInterStore($output, $zSetKeys, array $weights = null, $aggregateFunction = null) {}

    /**
     * @param $Output
     * @param $ZSetKeys
     * @param array|null $Weights
     * @param string $aggregateFunction
     * @throws RedisException
     */
    #[Deprecated(replacement: '%class%->zInterStore(%parametersList%)')]
    public function zInter($Output, $ZSetKeys, array $Weights = null, $aggregateFunction = 'SUM') {}

    /**
     * Scan a sorted set for members, with optional pattern and count
     *
     * @param string $key      String, the set to scan.
     * @param int|null &$iterator Long (reference), initialized to NULL.
     * @param string $pattern  String (optional), the pattern to match.
     * @param int    $count    How many keys to return per iteration (Redis might return a different number).
     *
     * @return array|false|Redis PHPRedis will return matching keys from Redis, or FALSE when iteration is complete or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/zscan
     * @example
     * <pre>
     * $iterator = null;
     * while ($members = $redis-zscan('zset', $iterator)) {
     *     foreach ($members as $member => $score) {
     *         echo $member . ' => ' . $score . PHP_EOL;
     *     }
     * }
     * </pre>
     */
    public function zScan($key, &$iterator, $pattern = null, $count = 0) {}

    /**
     * Block until Redis can pop the highest or lowest scoring members from one or more ZSETs.
     * There are two commands (BZPOPMIN and BZPOPMAX for popping the lowest and highest scoring elements respectively.)
     *
     * @param string|array     $key_or_keys    Either a string key or an array of one or more keys.
     * @param string|int|array $timeout_or_key If the previous argument was an array, this argument must be a timeout value. Otherwise it could also be another key.
     * @param mixed            ...$extra_args  Can consist of additional keys, until the last argument which needs to be a timeout.
     *
     * @return false|array|Redis Either an array with the key member and score of the highest or lowest element or an empty array or Redis if in multimode
     * if the timeout was reached without an element to pop.
     *
     * @throws RedisException
     *
     * @since >= 5.0
     * @link https://redis.io/commands/bzpopmax
     * @example
     * <pre>
     * // Wait up to 5 seconds to pop the *highest* scoring member from sets `zs1` and `zs2`
     * $redis->bzPopMax(['zs1', 'zs2'], 5);
     * $redis->bzPopMax('zs1', 'zs2', 5);
     * </pre>
     */
    public function bzPopMax($key_or_keys, $timeout_or_key, ...$extra_args) {}

    /**
     * POP the minimum scoring element off of one or more sorted sets, blocking up to a specified timeout if no elements are available.
     *
     * @param string|array     $key_or_keys    Either a string key or an array of one or more keys.
     * @param string|int|array $timeout_or_key If the previous argument was an array, this argument must be a timeout value. Otherwise it could also be another key.
     * @param mixed            ...$extra_args  Can consist of additional keys, until the last argument which needs to be a timeout.
     *
     * @return false|array|Redis Either an array with the key member and score of the highest or lowest element or an empty array or Redis if in multimode
     * if the timeout was reached without an element to pop.
     *
     * @throws RedisException
     *
     * @see bzPopMax
     * @since >= 5.0
     * @link https://redis.io/commands/bzpopmin
     *
     * @example
     * <pre>
     * // Wait up to 5 seconds to pop the *lowest* scoring member from sets `zs1` and `zs2`.
     * $redis->bzPopMin(['zs1', 'zs2'], 5);
     * $redis->bzPopMin('zs1', 'zs2', 5);
     * </pre>
     */
    public function bzPopMin($key_or_keys, $timeout_or_key, ...$extra_args) {}

    /**
     * Adds a value to the hash stored at key. If this value is already in the hash, FALSE is returned.
     *
     * @param string $key
     * @param string $hashKey
     * @param mixed  $value
     *
     * @return int|bool|Redis returns Redis if in multimode
     * - 1 if value didn't exist and was added successfully,
     * - 0 if the value was already present and was replaced, FALSE if there was an error.
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/hset
     * @example
     * <pre>
     * $redis->del('h')
     * $redis->hSet('h', 'key1', 'hello');  // 1, 'key1' => 'hello' in the hash at "h"
     * $redis->hGet('h', 'key1');           // returns "hello"
     *
     * $redis->hSet('h', 'key1', 'plop');   // 0, value was replaced.
     * $redis->hGet('h', 'key1');           // returns "plop"
     * </pre>
     */
    public function hSet($key, $hashKey, $value) {}

    /**
     * Adds a value to the hash stored at key only if this field isn't already in the hash.
     *
     * @param string $key
     * @param string $hashKey
     * @param string $value
     *
     * @return  bool|Redis TRUE if the field was set, FALSE if it was already present or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/hsetnx
     * @example
     * <pre>
     * $redis->del('h')
     * $redis->hSetNx('h', 'key1', 'hello'); // TRUE, 'key1' => 'hello' in the hash at "h"
     * $redis->hSetNx('h', 'key1', 'world'); // FALSE, 'key1' => 'hello' in the hash at "h". No change since the field
     * wasn't replaced.
     * </pre>
     */
    public function hSetNx($key, $hashKey, $value) {}

    /**
     * Gets a value from the hash stored at key.
     * If the hash table doesn't exist, or the key doesn't exist, FALSE is returned.
     *
     * @param string $key
     * @param string $hashKey
     *
     * @return string|false|Redis The value, if the command executed successfully BOOL FALSE in case of failure or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/hget
     */
    public function hGet($key, $hashKey) {}

    /**
     * Returns the length of a hash, in number of items
     *
     * @param string $key
     *
     * @return int|false|Redis the number of items in a hash, FALSE if the key doesn't exist or isn't a hash or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/hlen
     * @example
     * <pre>
     * $redis->del('h')
     * $redis->hSet('h', 'key1', 'hello');
     * $redis->hSet('h', 'key2', 'plop');
     * $redis->hLen('h'); // returns 2
     * </pre>
     */
    public function hLen($key) {}

    /**
     * Removes a values from the hash stored at key.
     * If the hash table doesn't exist, or the key doesn't exist, FALSE is returned.
     *
     * @param string $key
     * @param string $hashKey1
     * @param string ...$otherHashKeys
     *
     * @return int|bool|Redis Number of deleted fields or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/hdel
     * @example
     * <pre>
     * $redis->hMSet('h',
     *               array(
     *                    'f1' => 'v1',
     *                    'f2' => 'v2',
     *                    'f3' => 'v3',
     *                    'f4' => 'v4',
     *               ));
     *
     * var_dump( $redis->hDel('h', 'f1') );        // int(1)
     * var_dump( $redis->hDel('h', 'f2', 'f3') );  // int(2)
     * s
     * var_dump( $redis->hGetAll('h') );
     * //// Output:
     * //  array(1) {
     * //    ["f4"]=> string(2) "v4"
     * //  }
     * </pre>
     */
    public function hDel($key, $hashKey1, ...$otherHashKeys) {}

    /**
     * Returns the keys in a hash, as an array of strings.
     *
     * @param string $key
     *
     * @return array|false|Redis An array of elements, the keys of the hash. This works like PHP's array_keys() or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/hkeys
     * @example
     * <pre>
     * $redis->del('h');
     * $redis->hSet('h', 'a', 'x');
     * $redis->hSet('h', 'b', 'y');
     * $redis->hSet('h', 'c', 'z');
     * $redis->hSet('h', 'd', 't');
     * var_dump($redis->hKeys('h'));
     *
     * // Output:
     * // array(4) {
     * // [0]=>
     * // string(1) "a"
     * // [1]=>
     * // string(1) "b"
     * // [2]=>
     * // string(1) "c"
     * // [3]=>
     * // string(1) "d"
     * // }
     * // The order is random and corresponds to redis' own internal representation of the set structure.
     * </pre>
     */
    public function hKeys($key) {}

    /**
     * Returns the values in a hash, as an array of strings.
     *
     * @param string $key
     *
     * @return array|false|Redis An array of elements, the values of the hash. This works like PHP's array_values() or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/hvals
     * @example
     * <pre>
     * $redis->del('h');
     * $redis->hSet('h', 'a', 'x');
     * $redis->hSet('h', 'b', 'y');
     * $redis->hSet('h', 'c', 'z');
     * $redis->hSet('h', 'd', 't');
     * var_dump($redis->hVals('h'));
     *
     * // Output
     * // array(4) {
     * //   [0]=>
     * //   string(1) "x"
     * //   [1]=>
     * //   string(1) "y"
     * //   [2]=>
     * //   string(1) "z"
     * //   [3]=>
     * //   string(1) "t"
     * // }
     * // The order is random and corresponds to redis' own internal representation of the set structure.
     * </pre>
     */
    public function hVals($key) {}

    /**
     * Returns the whole hash, as an array of strings indexed by strings.
     *
     * @param string $key
     *
     * @return array|false|Redis An array of elements, the contents of the hash or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/hgetall
     * @example
     * <pre>
     * $redis->del('h');
     * $redis->hSet('h', 'a', 'x');
     * $redis->hSet('h', 'b', 'y');
     * $redis->hSet('h', 'c', 'z');
     * $redis->hSet('h', 'd', 't');
     * var_dump($redis->hGetAll('h'));
     *
     * // Output:
     * // array(4) {
     * //   ["a"]=>
     * //   string(1) "x"
     * //   ["b"]=>
     * //   string(1) "y"
     * //   ["c"]=>
     * //   string(1) "z"
     * //   ["d"]=>
     * //   string(1) "t"
     * // }
     * // The order is random and corresponds to redis' own internal representation of the set structure.
     * </pre>
     */
    public function hGetAll($key) {}

    /**
     * Verify if the specified member exists in a key.
     *
     * @param string $key
     * @param string $hashKey
     *
     * @return bool|Redis If the member exists in the hash table, return TRUE, otherwise return FALSE or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/hexists
     * @example
     * <pre>
     * $redis->hSet('h', 'a', 'x');
     * $redis->hExists('h', 'a');               //  TRUE
     * $redis->hExists('h', 'NonExistingKey');  // FALSE
     * </pre>
     */
    public function hExists($key, $hashKey) {}

    /**
     * Increments the value of a member from a hash by a given amount.
     *
     * @param string $key
     * @param string $hashKey
     * @param int    $value (integer) value that will be added to the member's value
     *
     * @return false|int|Redis the new value or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/hincrby
     * @example
     * <pre>
     * $redis->del('h');
     * $redis->hIncrBy('h', 'x', 2); // returns 2: h[x] = 2 now.
     * $redis->hIncrBy('h', 'x', 1); // h[x] ← 2 + 1. Returns 3
     * </pre>
     */
    public function hIncrBy($key, $hashKey, $value) {}

    /**
     * Increment the float value of a hash field by the given amount
     *
     * @param string $key
     * @param string $field
     * @param float  $increment
     *
     * @return float|false|Redis returns Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/hincrbyfloat
     * @example
     * <pre>
     * $redis = new Redis();
     * $redis->connect('127.0.0.1');
     * $redis->hset('h', 'float', 3);
     * $redis->hset('h', 'int',   3);
     * var_dump( $redis->hIncrByFloat('h', 'float', 1.5) ); // float(4.5)
     *
     * var_dump( $redis->hGetAll('h') );
     *
     * // Output
     *  array(2) {
     *    ["float"]=>
     *    string(3) "4.5"
     *    ["int"]=>
     *    string(1) "3"
     *  }
     * </pre>
     */
    public function hIncrByFloat($key, $field, $increment) {}

    /**
     * Fills in a whole hash. Non-string values are converted to string, using the standard (string) cast.
     * NULL values are stored as empty strings
     *
     * @param string $key
     * @param array  $hashKeys key → value array
     *
     * @return bool|Redis returns Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/hmset
     * @example
     * <pre>
     * $redis->del('user:1');
     * $redis->hMSet('user:1', array('name' => 'Joe', 'salary' => 2000));
     * $redis->hIncrBy('user:1', 'salary', 100); // Joe earns 100 more now.
     * </pre>
     */
    public function hMSet($key, $hashKeys) {}

    /**
     * Retrieve the values associated to the specified fields in the hash.
     *
     * @param string $key
     * @param array  $hashKeys
     *
     * @return array|false|Redis Array An array of elements, the values of the specified fields in the hash, or Redis if in multimode
     * with the hash keys as array keys.
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/hmget
     * @example
     * <pre>
     * $redis->del('h');
     * $redis->hSet('h', 'field1', 'value1');
     * $redis->hSet('h', 'field2', 'value2');
     * $redis->hMGet('h', array('field1', 'field2')); // returns array('field1' => 'value1', 'field2' => 'value2')
     * </pre>
     */
    public function hMGet($key, $hashKeys) {}

    /**
     * Scan a HASH value for members, with an optional pattern and count.
     *
     * @param string $key
     * @param int|null ?$iterator The scan iterator, which should be initialized to NULL before the first call.
     * @param string $pattern    Optional pattern to match against.
     * @param int    $count      How many keys to return in a go (only a sugestion to Redis).
     *
     * @return array|bool|Redis An array of members that match our pattern or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/hscan
     * @example
     * <pre>
     * $redis->del('big-hash');
     *
     * for ($i = 0; $i < 1000; $i++) {
     *     $fields["field:$i"] = "value:$i";
     * }
     *
     * $redis->hMSet('big-hash', $fields);
     *
     * $it = NULL;
     *
     * do {
     *     // Scan the hash but limit it to fields that match '*:1?3'
     *     $fields = $redis->hScan('big-hash', $it, '*:1?3');
     *
     *     foreach ($fields as $field => $value) {
     *         echo "[$field] => $value\n";
     *     }
     * } while ($it != 0);
     * </pre>
     */
    public function hScan($key, &$iterator, $pattern = null, $count = 0) {}

    /**
     * Get the string length of the value associated with field in the hash stored at key
     *
     * @param string $key
     * @param string $field
     *
     * @return false|int|Redis the string length of the value associated with field, or zero when field is not present in the hash or Redis if in multimode
     * or key does not exist at all.
     *
     * @throws RedisException
     *
     * @link https://redis.io/commands/hstrlen
     * @since >= 3.2
     *
     * @example
     * $redis->del('hash');
     * $redis->hMSet('hash', ['50bytes' => str_repeat('a', 50)]);
     * $redis->hStrLen('hash', '50bytes');
     */
    public function hStrLen(string $key, string $field) {}

    /**
     * Add one or more geospatial items to the specified key.
     * This function must be called with at least one longitude, latitude, member triplet.
     *
     * @param string $key
     * @param float  $longitude
     * @param float  $latitude
     * @param string $member
     * @param mixed  $other_triples_and_options You can continue to pass longitude, lattitude, and member arguments to add as many members
     *                                          as you wish. Optionally, the final argument may be a string with options for the command
     *
     * @return false|int|Redis The number of elements added to the geospatial key or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link https://redis.io/commands/geoadd
     * @since >= 3.2
     *
     * @example
     * <pre>
     * $redis->del("myplaces");
     *
     * // Since the key will be new, $result will be 2
     * $result = $redis->geoAdd(
     *   "myplaces",
     *   -122.431, 37.773, "San Francisco",
     *   -157.858, 21.315, "Honolulu"
     * ); // 2
     *
     * $redis->geoAdd('cities', -121.837478, 39.728494, 'Chico', ['XX', 'CH']);
     * $redis->geoAdd('cities', -121.8374, 39.7284, 'Chico', -122.03218, 37.322, 'Cupertino');
     * </pre>
     */
    public function geoAdd($key, $longitude, $latitude, $member, ...$other_triples_and_options) {}

    /**
     * Retrieve Geohash strings for one or more elements of a geospatial index.
     *
     * @param string $key
     * @param string ...$member variadic list of members
     *
     * @return false|array|Redis One or more Redis Geohash encoded strings or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link https://redis.io/commands/geohash
     * @since >= 3.2
     *
     * @example
     * <pre>
     * $redis->geoAdd("hawaii", -157.858, 21.306, "Honolulu", -156.331, 20.798, "Maui");
     * $hashes = $redis->geoHash("hawaii", "Honolulu", "Maui");
     * var_dump($hashes);
     * // Output: array(2) {
     * //   [0]=>
     * //   string(11) "87z9pyek3y0"
     * //   [1]=>
     * //   string(11) "8e8y6d5jps0"
     * // }
     * </pre>
     */
    public function geoHash($key, ...$member) {}

    /**
     * Return longitude, latitude positions for each requested member.
     *
     * @param string $key
     * @param string ...$member
     * @return array|Redis One or more longitude/latitude positions or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link https://redis.io/commands/geopos
     * @since >= 3.2
     *
     * @example
     * <pre>
     * $redis->geoAdd("hawaii", -157.858, 21.306, "Honolulu", -156.331, 20.798, "Maui");
     * $positions = $redis->geoPos("hawaii", "Honolulu", "Maui");
     * var_dump($positions);
     *
     * // Output:
     * array(2) {
     *  [0]=> array(2) {
     *      [0]=> string(22) "-157.85800248384475708"
     *      [1]=> string(19) "21.3060004581273077"
     *  }
     *  [1]=> array(2) {
     *      [0]=> string(22) "-156.33099943399429321"
     *      [1]=> string(20) "20.79799924753607598"
     *  }
     * }
     * </pre>
     */
    public function geoPos(string $key, string ...$member) {}

    /**
     * Search a geospacial sorted set for members in various ways.
     *
     * @param string          $key      The set to query.
     * @param array|string    $position Either a two element array with longitude and lattitude, or a string representing a member of the set.
     * @param array|int|float $shape    Either a number representine the radius of a circle to search, or
     *                                  a two element array representing the width and height of a box to search.
     * @param string          $unit     The unit of our shape. See geodist() for possible units.
     * @param array           $options  See georadius() for options. Note that the `STORE` options are not allowed for this command.
     *
     * @return mixed[]
     */
    public function geosearch(string $key, array|string $position, array|int|float $shape, string $unit, array $options = []): array|false {}

    /**
     * Search a geospacial sorted set for members within a given area or range, storing the results into
     * a new set.
     *
     * @param string          $dst      The destination where results will be stored.
     * @param string          $src      The key to query.
     * @param array|string    $position Either a two element array with longitude and lattitude, or a string representing a member of the set.
     * @param array|int|float $shape    Either a number representine the radius of a circle to search, or
     *                                  a two element array representing the width and height of a box to search.
     * @param string          $unit     The unit of our shape. See geoDist for possible units.
     * @param array           $options
     *                        <code>
     *                        $options = [
     *                           'ASC' | 'DESC',  # The sort order of returned members
     *                           'WITHDIST'       # Also store distances.
     *                            # Limit to N returned members.  Optionally a two element array may be
     *                            # passed as the `LIMIT` argument, and the `ANY` argument.
     *                            'COUNT' => [<int>], or [<int>, <bool>]
     *                        ];
     *                        </code>
     *
     * @return mixed[]|int|true|Redis
     */
    public function geosearchstore(string $dst, string $src, array|string $position, array|int|float $shape, string $unit, array $options = []): array|false {}

    /**
     * Return the distance between two members in a geospatial set.
     *
     * If units are passed it must be one of the following values:
     * - 'm' => Meters
     * - 'km' => Kilometers
     * - 'mi' => Miles
     * - 'ft' => Feet
     *
     * @param string $key
     * @param string $member1
     * @param string $member2
     * @param string|null $unit Which unit to use when computing distance, defaulting to meters. M - meters, KM - kilometers, FT - feet, MI - miles
     *
     * @return float|Redis The distance between the two passed members in the units requested (meters by default) or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link https://redis.io/commands/geodist
     * @since >= 3.2
     *
     * @example
     * <pre>
     * $redis->geoAdd("hawaii", -157.858, 21.306, "Honolulu", -156.331, 20.798, "Maui");
     *
     * $meters = $redis->geoDist("hawaii", "Honolulu", "Maui");
     * $kilometers = $redis->geoDist("hawaii", "Honolulu", "Maui", 'km');
     * $miles = $redis->geoDist("hawaii", "Honolulu", "Maui", 'mi');
     * $feet = $redis->geoDist("hawaii", "Honolulu", "Maui", 'ft');
     *
     * echo "Distance between Honolulu and Maui:\n";
     * echo "  meters    : $meters\n";
     * echo "  kilometers: $kilometers\n";
     * echo "  miles     : $miles\n";
     * echo "  feet      : $feet\n";
     *
     * // Bad unit
     * $inches = $redis->geoDist("hawaii", "Honolulu", "Maui", 'in');
     * echo "Invalid unit returned:\n";
     * var_dump($inches);
     *
     * // Output
     * Distance between Honolulu and Maui:
     * meters    : 168275.204
     * kilometers: 168.2752
     * miles     : 104.5616
     * feet      : 552084.0028
     * Invalid unit returned:
     * bool(false)
     * </pre>
     */
    public function geoDist($key, $member1, $member2, $unit = null) {}

    /**
     * Return members of a set with geospatial information that are within the radius specified by the caller.
     *
     * @param $key
     * @param $longitude
     * @param $latitude
     * @param $radius
     * @param $unit
     * @param array|null $options
     * <pre>
     * |Key         |Value          |Description                                        |
     * |------------|---------------|---------------------------------------------------|
     * |COUNT       |integer > 0    |Limit how many results are returned                |
     * |            |WITHCOORD      |Return longitude and latitude of matching members  |
     * |            |WITHDIST       |Return the distance from the center                |
     * |            |WITHHASH       |Return the raw geohash-encoded score               |
     * |            |ASC            |Sort results in ascending order                    |
     * |            |DESC           |Sort results in descending order                   |
     * |STORE       |key            |Store results in key                               |
     * |STOREDIST   |key            |Store the results as distances in key              |
     * </pre>
     * Note: It doesn't make sense to pass both ASC and DESC options but if both are passed
     * the last one passed will be used.
     * Note: When using STORE[DIST] in Redis Cluster, the store key must has to the same slot as
     * the query key or you will get a CROSSLOT error.
     * @return mixed|Redis When no STORE option is passed, this function returns an array of results or Redis if in multimode
     * If it is passed this function returns the number of stored entries.
     *
     * @throws RedisException
     *
     * @link https://redis.io/commands/georadius
     * @since >= 3.2
     * @example
     * <pre>
     * // Add some cities
     * $redis->geoAdd("hawaii", -157.858, 21.306, "Honolulu", -156.331, 20.798, "Maui");
     *
     * echo "Within 300 miles of Honolulu:\n";
     * var_dump($redis->geoRadius("hawaii", -157.858, 21.306, 300, 'mi'));
     *
     * echo "\nWithin 300 miles of Honolulu with distances:\n";
     * $options = ['WITHDIST'];
     * var_dump($redis->geoRadius("hawaii", -157.858, 21.306, 300, 'mi', $options));
     *
     * echo "\nFirst result within 300 miles of Honolulu with distances:\n";
     * $options['count'] = 1;
     * var_dump($redis->geoRadius("hawaii", -157.858, 21.306, 300, 'mi', $options));
     *
     * echo "\nFirst result within 300 miles of Honolulu with distances in descending sort order:\n";
     * $options[] = 'DESC';
     * var_dump($redis->geoRadius("hawaii", -157.858, 21.306, 300, 'mi', $options));
     *
     * // Output
     * Within 300 miles of Honolulu:
     * array(2) {
     *  [0]=> string(8) "Honolulu"
     *  [1]=> string(4) "Maui"
     * }
     *
     * Within 300 miles of Honolulu with distances:
     * array(2) {
     *     [0]=>
     *   array(2) {
     *         [0]=>
     *     string(8) "Honolulu"
     *         [1]=>
     *     string(6) "0.0002"
     *   }
     *   [1]=>
     *   array(2) {
     *         [0]=>
     *     string(4) "Maui"
     *         [1]=>
     *     string(8) "104.5615"
     *   }
     * }
     *
     * First result within 300 miles of Honolulu with distances:
     * array(1) {
     *     [0]=>
     *   array(2) {
     *         [0]=>
     *     string(8) "Honolulu"
     *         [1]=>
     *     string(6) "0.0002"
     *   }
     * }
     *
     * First result within 300 miles of Honolulu with distances in descending sort order:
     * array(1) {
     *     [0]=>
     *   array(2) {
     *         [0]=>
     *     string(4) "Maui"
     *         [1]=>
     *     string(8) "104.5615"
     *   }
     * }
     * </pre>
     */
    public function geoRadius($key, $longitude, $latitude, $radius, $unit, array $options = []) {}

    /**
     * This method is identical to geoRadius except that instead of passing a longitude and latitude as the "source"
     * you pass an existing member in the geospatial set
     *
     * @param string $key
     * @param string $member
     * @param $radius
     * @param $units
     * @param array|null $options see georadius
     *
     * @return mixed|Redis The zero or more entries that are close enough to the member given the distance and radius specified or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link https://redis.io/commands/georadiusbymember
     * @since >= 3.2
     * @see georadius
     * @example
     * <pre>
     * $redis->geoAdd("hawaii", -157.858, 21.306, "Honolulu", -156.331, 20.798, "Maui");
     *
     * echo "Within 300 miles of Honolulu:\n";
     * var_dump($redis->geoRadiusByMember("hawaii", "Honolulu", 300, 'mi'));
     *
     * echo "\nFirst match within 300 miles of Honolulu:\n";
     * var_dump($redis->geoRadiusByMember("hawaii", "Honolulu", 300, 'mi', ['count' => 1]));
     *
     * // Output
     * Within 300 miles of Honolulu:
     * array(2) {
     *  [0]=> string(8) "Honolulu"
     *  [1]=> string(4) "Maui"
     * }
     *
     * First match within 300 miles of Honolulu:
     * array(1) {
     *  [0]=> string(8) "Honolulu"
     * }
     * </pre>
     */
    public function geoRadiusByMember($key, $member, $radius, $units, array $options = []) {}

    /**
     * Execute the Redis CONFIG command in a variety of ways.
     *
     * @param string            $operation       Operations that PhpRedis supports: RESETSTAT, REWRITE, GET, and SET.
     * @param array|string|null $key_or_settings One or more keys or values.
     * @param string|null       $value           The value if this is a `CONFIG SET` operation.
     *
     * @return mixed|Redis Associative array for `GET`, key -> value or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/config-get
     * @example
     * <pre>
     * $redis->config('GET', 'timeout');
     * $redis->config('GET', ['timeout', 'databases']);
     * $redis->config('SET', 'timeout', 30);
     * $redis->config('SET', ['timeout' => 30, 'loglevel' => 'warning']);
     * </pre>
     */
    public function config($operation, $key_or_settings = null, $value = null) {}

    /**
     * Evaluate a LUA script serverside
     *
     * @param string $script
     * @param array  $args
     * @param int    $numKeys
     *
     * @return mixed|Redis What is returned depends on what the LUA script itself returns, which could be a scalar value or Redis if in multimode
     * (int/string), or an array. Arrays that are returned can also contain other arrays, if that's how it was set up in
     * your LUA script.  If there is an error executing the LUA script, the getLastError() function can tell you the
     * message that came back from Redis (e.g. compile error).
     *
     * @throws RedisException
     *
     * @link   https://redis.io/commands/eval
     * @example
     * <pre>
     * $redis->eval("return 1"); // Returns an integer: 1
     * $redis->eval("return {1,2,3}"); // Returns Array(1,2,3)
     * $redis->del('mylist');
     * $redis->rpush('mylist','a');
     * $redis->rpush('mylist','b');
     * $redis->rpush('mylist','c');
     * // Nested response:  Array(1,2,3,Array('a','b','c'));
     * $redis->eval("return {1,2,3,redis.call('lrange','mylist',0,-1)}}");
     * </pre>
     */
    public function eval($script, $args = [], $numKeys = 0) {}

    /**
     * @param   string  $script
     * @param   array   $args
     * @param   int     $numKeys
     * @return  mixed|Redis   @see eval() , returns Redis if in multimode
     *
     * @throws RedisException
     */
    #[Deprecated(replacement: '%class%->eval(%parametersList%)')]
    public function evaluate($script, $args = [], $numKeys = 0) {}

    /**
     * Evaluate a LUA script serverside, from the SHA1 hash of the script instead of the script itself.
     * In order to run this command Redis will have to have already loaded the script, either by running it or via
     * the SCRIPT LOAD command.
     *
     * @param string $scriptSha
     * @param array  $args
     * @param int    $numKeys
     *
     * @return mixed|Redis @see eval() , returns Redis if in multimode
     *
     * @throws RedisException
     *
     * @see     eval()
     * @link    https://redis.io/commands/evalsha
     * @example
     * <pre>
     * $script = 'return 1';
     * $sha = $redis->script('load', $script);
     * $redis->evalSha($sha); // Returns 1
     * </pre>
     */
    public function evalSha($scriptSha, $args = [], $numKeys = 0) {}

    /**
     * @param string $scriptSha
     * @param array  $args
     * @param int    $numKeys
     *
     * @throws RedisException
     */
    #[Deprecated(replacement: '%class%->evalSha(%parametersList%)')]
    public function evaluateSha($scriptSha, $args = [], $numKeys = 0) {}

    /**
     * Execute the Redis SCRIPT command to perform various operations on the scripting subsystem.
     * @param string $command load | flush | kill | exists
     * @param mixed ...$script
     *
     * @return  mixed|Redis This command returns various things depending on the specific operation executed. Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/script-load
     * @link    https://redis.io/commands/script-kill
     * @link    https://redis.io/commands/script-flush
     * @link    https://redis.io/commands/script-exists
     * @example
     * <pre>
     * $redis->script('load', $script);
     * $redis->script('flush');
     * $redis->script('kill');
     * $redis->script('exists', $script1, [$script2, $script3, ...]);
     * </pre>
     *
     * SCRIPT LOAD will return the SHA1 hash of the passed script on success, and FALSE on failure.
     * SCRIPT FLUSH should always return TRUE
     * SCRIPT KILL will return true if a script was able to be killed and false if not
     * SCRIPT EXISTS will return an array with TRUE or FALSE for each passed script
     */
    public function script($command, ...$script) {}

    /**
     * The last error message (if any)
     *
     * @return string|null A string with the last returned script based error message, or NULL if there is no error
     *
     * @throws RedisException
     *
     * @example
     * <pre>
     * $redis->eval('this-is-not-lua');
     * $err = $redis->getLastError();
     * // "ERR Error compiling script (new function): user_script:1: '=' expected near '-'"
     * </pre>
     */
    public function getLastError() {}

    /**
     * Clear the last error message
     *
     * @return bool This should always return true or throw an exception if we're not connected.
     *
     * @throws RedisException
     *
     * @example
     * <pre>
     * $redis->set('x', 'a');
     * $redis->incr('x');
     * $err = $redis->getLastError();
     * // "ERR value is not an integer or out of range"
     * $redis->clearLastError();
     * $err = $redis->getLastError();
     * // NULL
     * </pre>
     */
    public function clearLastError() {}

    /**
     * Issue the CLIENT command with various arguments.
     * The Redis CLIENT command can be used in four ways:
     * - CLIENT LIST
     * - CLIENT GETNAME
     * - CLIENT SETNAME [name]
     * - CLIENT KILL [ip:port]
     *
     * @param string $command
     * @param mixed ...$args
     * @return mixed This will vary depending on which client command was executed:
     * - CLIENT LIST will return an array of arrays with client information.
     * - CLIENT GETNAME will return the client name or false if none has been set
     * - CLIENT SETNAME will return true if it can be set and false if not
     * - CLIENT KILL will return true if the client can be killed, and false if not
     *
     * @throws RedisException
     *
     * Note: phpredis will attempt to reconnect so you can actually kill your own connection but may not notice losing it!
     *
     * @link https://redis.io/commands/client-list
     * @link https://redis.io/commands/client-getname
     * @link https://redis.io/commands/client-setname
     * @link https://redis.io/commands/client-kill
     *
     * @example
     * <pre>
     * $redis->client('list'); // Get a list of clients
     * $redis->client('getname'); // Get the name of the current connection
     * $redis->client('setname', 'somename'); // Set the name of the current connection
     * $redis->client('kill', <ip:port>); // Kill the process at ip:port
     * </pre>
     */
    public function client($command, ...$args) {}

    /**
     * A utility method to prefix the value with the prefix setting for phpredis.
     *
     * @param string $value The value you wish to prefix
     *
     * @return string If a prefix is set up, the value now prefixed
     * If there is no prefix, the value will be returned unchanged.
     *
     * @throws RedisException
     *
     * @example
     * <pre>
     * $redis->setOption(Redis::OPT_PREFIX, 'my-prefix:');
     * $redis->_prefix('my-value'); // Will return 'my-prefix:my-value'
     * </pre>
     */
    public function _prefix($value) {}

    /**
     * A utility method to unserialize data with whatever serializer is set up.  If there is no serializer set, the
     * value will be returned unchanged.  If there is a serializer set up, and the data passed in is malformed, an
     * exception will be thrown. This can be useful if phpredis is serializing values, and you return something from
     * redis in a LUA script that is serialized.
     *
     * @param string $value The value to be unserialized
     *
     * @return mixed
     * @example
     * <pre>
     * $redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_PHP);
     * $redis->_unserialize('a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}'); // Will return Array(1,2,3)
     * </pre>
     */
    public function _unserialize($value) {}

    /**
     * A utility method to serialize values manually. This method allows you to serialize a value with whatever
     * serializer is configured, manually. This can be useful for serialization/unserialization of data going in
     * and out of EVAL commands as phpredis can't automatically do this itself.  Note that if no serializer is
     * set, phpredis will change Array values to 'Array', and Objects to 'Object'.
     *
     * @param mixed $value The value to be serialized.
     *
     * @return string
     * @example
     * <pre>
     * $redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_NONE);
     * $redis->_serialize("foo"); // returns "foo"
     * $redis->_serialize(Array()); // Returns "Array"
     * $redis->_serialize(new stdClass()); // Returns "Object"
     *
     * $redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_PHP);
     * $redis->_serialize("foo"); // Returns 's:3:"foo";'
     * </pre>
     */
    public function _serialize($value) {}

    /**
     * Dump a key out of a redis database, the value of which can later be passed into redis using the RESTORE command.
     * The data that comes out of DUMP is a binary representation of the key as Redis stores it.
     * @param string $key
     *
     * @return string|false|Redis A binary string representing the key's value or FALSE if the key doesn't exist or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/dump
     * @example
     * <pre>
     * $redis->set('foo', 'bar');
     * $val = $redis->dump('foo'); // $val will be the Redis encoded key value
     * </pre>
     */
    public function dump($key) {}

    /**
     * Restore a key from the result of a DUMP operation.
     *
     * @param string $key     The name of the key you wish to create.
     * @param int    $ttl     What Redis should set the key's TTL (in milliseconds) to once it is created.Zero means no TTL at all.
     * @param string $value   The serialized binary value of the string (generated by DUMP).
     * @param array|null $options An array of additional options that modifies how the command operates.
     *                        <code>
     *                        $options = [
     *                            'ABSTTL'          # If this is present, the `$ttl` provided by the user should
     *                                              # be an absolute timestamp, in milliseconds()
     *
     *                            'REPLACE'         # This flag instructs Redis to store the key even if a key with
     *                                              # that name already exists.
     *
     *                            'IDLETIME' => int # Tells Redis to set the keys internal 'idletime' value to a
     *                                              # specific number (see the Redis command OBJECT for more info).
     *                            'FREQ'     => int # Tells Redis to set the keys internal 'FREQ' value to a specific
     *                                              # number (this relates to Redis' LFU eviction algorithm).
     *                        ];
     *                        </code>
     * @return bool|Redis True if the key was stored, false if not.
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/restore
     * @example
     * <pre>
     * $redis->set('foo', 'bar');
     * $val = $redis->dump('foo');
     * $redis->restore('bar', 0, $val); // The key 'bar', will now be equal to the key 'foo'
     * </pre>
     */
    public function restore($key, $ttl, $value, $options = null) {}

    /**
     * Migrates a key to a different Redis instance.
     *
     * @param string $host    The destination host
     * @param int    $port    The TCP port to connect to.
     * @param string|array $key     The key to migrate.
     * @param int    $db      The target DB.
     * @param int    $timeout The maximum amount of time given to this transfer.
     * @param bool   $copy    Should we send the COPY flag to redis.
     * @param bool   $replace Should we send the REPLACE flag to redis.
     * @param mixed $credentials
     *
     * @return bool|Redis
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/migrate
     * @example
     * <pre>
     * $redis->migrate('backup', 6379, 'foo', 0, 3600);
     * </pre>
     */
    public function migrate($host, $port, $key, $dstdb, $timeout, $copy = false, $replace = false, $credentials = null) {}

    /**
     * Retrieve the server time from the connected Redis instance.
     *
     * @return false|array If successful, the time will come back as an associative array with element zero being the
     * unix timestamp, and element one being microseconds.
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/time
     * @example
     * <pre>
     * var_dump( $redis->time() );
     * // array(2) {
     * //   [0] => string(10) "1342364352"
     * //   [1] => string(6) "253002"
     * // }
     * </pre>
     */
    public function time() {}

    /**
     * Scan the keyspace for keys
     *
     * @param int|null ?$iterator The cursor returned by Redis for every subsequent call to SCAN.  On
     *                         the initial invocation of the call, it should be initialized by the
     *                         caller to NULL.  Each time SCAN is invoked, the iterator will be
     *                         updated to a new number, until finally Redis will set the value to
     *                         zero, indicating that the scan is complete.
     *
     * @param string $pattern  An optional glob-style pattern for matching key names.  If passed as
     *                         NULL, it is the equivalent of sending '*' (match every key).
     *
     * @param int    $count    A hint to redis that tells it how many keys to return in a single
     *                         call to SCAN.  The larger the number, the longer Redis may block
     *                         clients while iterating the key space.
     *
     * @param string|null $type An optional argument to specify which key types to scan (e.g. 'STRING', 'LIST', 'SET')
     *
     * @return array|false|Redis This function will return an array of keys or FALSE if there are no more keys or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link   https://redis.io/commands/scan
     * @example
     * <pre>
     * $redis->setOption(Redis::OPT_SCAN, Redis::SCAN_NORETRY);
     *
     * $it = null;
     *
     * do {
     *     $keys = $redis->scan($it, '*zorg*');
     *     foreach ($keys as $key) {
     *         echo "KEY: $key\n";
     *     }
     * } while ($it != 0);
     *
     * $redis->setOption(Redis::OPT_SCAN, Redis::SCAN_RETRY);
     *
     * $it = null;
     *
     * // When Redis::SCAN_RETRY is enabled, we can use simpler logic, as we will never receive an
     * // empty array of keys when the iterator is nonzero.
     * while ($keys = $redis->scan($it, '*zorg*')) {
     *     foreach ($keys as $key) {
     *         echo "KEY: $key\n";
     *     }
     * }
     * </pre>
     */
    public function scan(&$iterator, $pattern = null, $count = 0, $type = null) {}

    /**
     * Adds all the element arguments to the HyperLogLog data structure stored at the key.
     *
     * @param string $key
     * @param array  $elements
     *
     * @return bool|int|Redis Returns 1 if the set was altered, and zero if not. Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/pfadd
     * @example $redis->pfAdd('key', array('elem1', 'elem2'))
     */
    public function pfAdd($key, array $elements) {}

    /**
     * When called with a single key, returns the approximated cardinality computed by the HyperLogLog data
     * structure stored at the specified variable, which is 0 if the variable does not exist.
     *
     * @param string|array $key_or_keys Either one key or an array of keys
     *
     * @return false|int|Redis returns Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/pfcount
     * @example
     * <pre>
     * $redis->pfAdd('key1', array('elem1', 'elem2'));
     * $redis->pfAdd('key2', array('elem3', 'elem2'));
     * $redis->pfCount('key1'); // int(2)
     * $redis->pfCount(array('key1', 'key2')); // int(3)
     * </pre>
     */
    public function pfCount($key_or_keys) {}

    /**
     * Merge multiple HyperLogLog values into an unique value that will approximate the cardinality
     * of the union of the observed Sets of the source HyperLogLog structures.
     *
     * @param string $destKey
     * @param array  $sourceKeys
     *
     * @return bool|Redis returns Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/pfmerge
     * @example
     * <pre>
     * $redis->pfAdd('key1', array('elem1', 'elem2'));
     * $redis->pfAdd('key2', array('elem3', 'elem2'));
     * $redis->pfMerge('key3', array('key1', 'key2'));
     * $redis->pfCount('key3'); // int(3)
     * </pre>
     */
    public function pfMerge($destKey, array $sourceKeys) {}

    /**
     * Send arbitrary things to the redis server.
     *
     * @param string $command      Required command to send to the server.
     * @param mixed  ...$arguments Optional variable amount of arguments to send to the server.
     *
     * @return mixed|Redis returns Redis if in multimode
     *
     * @throws RedisException
     *
     * @example
     * <pre>
     * $redis->rawCommand('SET', 'key', 'value'); // bool(true)
     * $redis->rawCommand('GET", 'key'); // string(5) "value"
     * </pre>
     */
    public function rawCommand($command, ...$arguments) {}

    /**
     * Detect whether we're in ATOMIC/MULTI/PIPELINE mode.
     *
     * @return false|int|Redis Either Redis::ATOMIC, Redis::MULTI or Redis::PIPELINE or Redis if in multimode
     *
     * @throws RedisException
     *
     * @example $redis->getMode();
     */
    public function getMode() {}

    /**
     * Acknowledge one or more messages on behalf of a consumer group.
     *
     * @param string $stream
     * @param string $group
     * @param array  $messages
     *
     * @return false|int|Redis The number of messages Redis reports as acknowledged or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/xack
     * @example
     * <pre>
     * $redis->xAck('stream', 'group1', ['1530063064286-0', '1530063064286-1']);
     * </pre>
     */
    public function xAck($stream, $group, $messages) {}

    /**
     * Append a message to a stream.
     *
     * @param string $key
     * @param string $id  The ID for the message we want to add. This can be the special value '*'
     *                            which means Redis will generate the ID that appends the message to the
     *                            end of the stream. It can also be a value in the form <ms>-* which will
     *                            generate an ID that appends to the end ot entries with the same <ms> value (if any exist).
     * @param array $messages
     * @param int $maxlen        If specified Redis will append the new message but trim any number of the
     *                            oldest messages in the stream until the length is <= $maxlen.
     * @param bool $isApproximate Used in conjunction with `$maxlen`, this flag tells Redis to trim the stream
     *                            but in a more efficient way, meaning the trimming may not be exactly to `$maxlen` values.
     * @param bool $nomkstream    If passed as `TRUE`, the stream must exist for Redis to append the message.
     *
     * @return string|true|Redis The added message ID or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/xadd
     * @example
     * <pre>
     * $redis->xAdd('mystream', "*", ['field' => 'value']);
     * $redis->xAdd('mystream', "*", ['field' => 'value'], 10);
     * $redis->xAdd('mystream', "*", ['field' => 'value'], 10, true);
     * </pre>
     */
    public function xAdd($key, $id, $messages, $maxLen = 0, $isApproximate = false, $nomkstream = false) {}

    /**
     * This method allows a consumer to take ownership of pending stream entries, by ID.  Another
     * command that does much the same thing but does not require passing specific IDs is `Redis::xAutoClaim`.
     *
     * @param string  $key           The stream we wish to claim messages for.
     * @param string  $group         Our consumer group.
     * @param string  $consumer      Our consumer.
     * @param int     $min_idle      The minimum idle-time in milliseconds a message must have for ownership to be transferred.
     * @param array   $ids
     * @param array   $options       An options array that modifies how the command operates.
     *
     *                               <code>
     *                               # Following is an options array describing every option you can pass.  Note that
     *                               # 'IDLE', and 'TIME' are mutually exclusive.
     *                               $options = [
     *                                   'IDLE'       => 3            # Set the idle time of the message to a 3.  By default
     *                                                                # the idle time is set to zero.
     *                                   'TIME'       => 1000*time()  # Same as IDLE except it takes a unix timestamp in
     *                                                                # milliseconds.
     *                                   'RETRYCOUNT' => 0            # Set the retry counter to zero.  By default XCLAIM
     *                                                                # doesn't modify the counter.
     *                                   'FORCE'                      # Creates the pending message entry even if IDs are
     *                                                                # not already
     *                                                                # in the PEL with another client.
     *                                   'JUSTID'                     # Return only an array of IDs rather than the messages
     *                                                                # themselves.
     *                               ];
     *                               </code>
     *
     * @return false|array|Redis Either an array of message IDs along with corresponding data, or just an array of IDs or Redis if in multimode
     * (if the 'JUSTID' option was passed).
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/xclaim
     * @example
     * <pre>
     * $ids = ['1530113681011-0', '1530113681011-1', '1530113681011-2'];
     *
     * // Without any options
     * $redis->xClaim('mystream', 'group1', 'myconsumer1', 0, $ids);
     *
     * // With options
     * $redis->xClaim(
     *     'mystream', 'group1', 'myconsumer2', 0, $ids,
     *     [
     *         'IDLE' => time() * 1000,
     *         'RETRYCOUNT' => 5,
     *         'FORCE',
     *         'JUSTID'
     *     ]
     * );
     * </pre>
     */
    public function xClaim(string $key, string $group, string $consumer, int $min_iddle, array $ids, array $options) {}

    /**
     * Delete one or more messages from a stream
     *
     * @param string $key
     * @param array  $ids
     *
     * @return false|int|Redis The number of messages removed or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/xdel
     * @example
     * <pre>
     * $redis->xDel('mystream', ['1530115304877-0', '1530115305731-0']);
     * </pre>
     */
    public function xDel($key, $ids) {}

    /**
     * Perform various operation on consumer groups for a particular Redis STREAM.  What the command does
     * is primarily based on which operation is passed.
     *
     * @param string $operation      The subcommand you intend to execute.  Valid options are as follows
     *                               'HELP'           - Redis will return information about the command
     *                               Requires: none
     *                               'CREATE'         - Create a consumer group.
     *                               Requires:  Key, group, consumer.
     *                               'SETID'          - Set the ID of an existing consumer group for the stream.
     *                               Requires:  Key, group, id.
     *                               'CREATECONSUMER' - Create a new consumer group for the stream.  You must
     *                               also pass key, group, and the consumer name you wish to
     *                               create.
     *                               Requires:  Key, group, consumer.
     *                               'DELCONSUMER'    - Delete a consumer from group attached to the stream.
     *                               Requires:  Key, group, consumer.
     *                               'DESTROY'        - Delete a consumer group from a stream.
     *                               Requires:  Key, group.
     * @param string|null $key       The STREAM we're operating on.
     * @param string|null $group     The consumer group we want to create/modify/delete.
     * @param string|null $id_or_consumer The STREAM id (e.g. '$') or consumer group.  See the operation section
     *                               for information about which to send.
     * @param bool   $mkstream       This flag may be sent in combination with the 'CREATE' operation, and
     *                               cause Redis to also create the STREAM if it doesn't currently exist.
     *
     * @param int    $entries_read   Allows you to set Redis' 'entries-read' STREAM value.  This argument is
     *                               only relevant to the 'CREATE' and 'SETID' operations.
     *                               Note:  Requires Redis >= 7.0.0.
     *
     * @return mixed|Redis This command returns different types depending on the specific XGROUP command executed or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/xgroup
     * @example
     * <pre>
     * $redis->xGroup('CREATE', 'mystream', 'mygroup', 0);
     * $redis->xGroup('CREATE', 'mystream', 'mygroup', 0, true); // create stream
     * $redis->xGroup('DESTROY', 'mystream', 'mygroup');
     * </pre>
     */
    public function xGroup($operation, $key = null, $group = null, $id_or_consumer = null, $mkstream = false, $entries_read = -2) {}

    /**
     * Get information about a stream or consumer groups
     *
     * @param string $operation The specific info operation to perform. e.g.: 'CONSUMERS', 'GROUPS', 'STREAM', 'HELP'
     * @param string|null $arg1 The first argument (depends on operation)
     * @param string|null $arg2 The second argument
     * @param int    $count     The COUNT argument to `XINFO STREAM`
     *
     * @return mixed|Redis This command returns different types depending on which subcommand is used or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/xinfo
     * @example
     * <pre>
     * $redis->xInfo('STREAM', 'mystream');
     * </pre>
     */
    public function xInfo($operation, $arg1 = null, $arg2 = null, $count = -1) {}

    /**
     * Get the length of a given stream.
     *
     * @param string $stream
     *
     * @return false|int|Redis The number of messages in the stream or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/xlen
     * @example
     * <pre>
     * $redis->xLen('mystream');
     * </pre>
     */
    public function xLen($stream) {}

    /**
     * Get information about pending messages in a given stream
     *
     * @param string      $stream   The stream to inspect.
     * @param string      $group    The user group we want to see pending messages from.
     * @param string|null $start    The minimum ID to consider.
     * @param string|null $end      The maximum ID to consider.
     * @param int         $count    Optional maximum number of messages to return.
     * @param string|null $consumer If provided, limit the returned messages to a specific consumer.
     *
     * @return array|string|false|Redis Information about the pending messages, in various forms depending on or Redis if in multimode
     * the specific invocation of XPENDING.
     *
     * @throws RedisException
     *
     * @link https://redis.io/commands/xpending
     * @example
     * <pre>
     * $redis->xPending('mystream', 'mygroup');
     * $redis->xPending('mystream', 'mygroup', '-', '+', 1, 'consumer-1');
     * </pre>
     */
    public function xPending($stream, $group, $start = null, $end = null, $count = -1, $consumer = null) {}

    /**
     * Get a range of messages from a given stream
     *
     * @param string $stream The stream key name to list.
     * @param string $start The minimum ID to return.
     * @param string $end   The maximum ID to return.
     * @param int    $count An optional maximum number of entries to return.
     *
     * @return array|bool|Redis The messages in the stream within the requested range or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/xrange
     * @example
     * <pre>
     * // Get everything in this stream
     * $redis->xRange('mystream', '-', '+');
     * // Only the first two messages
     * $redis->xRange('mystream', '-', '+', 2);
     * </pre>
     */
    public function xRange($stream, $start, $end, $count = -1) {}

    /**
     * Read data from one or more streams and only return IDs greater than sent in the command.
     *
     * @param array $streams An associative array with stream name keys and minimum id values.
     * @param int   $count   An optional limit to how many entries are returnd *per stream*
     * @param int   $block   An optional maximum number of milliseconds to block the caller if no data is available on any of the provided streams.
     *
     * @return array|bool|Redis The messages in the stream newer than the IDs passed to Redis (if any) or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/xread
     * @example
     * <pre>
     * $redis->xRead(['stream1' => '1535222584555-0', 'stream2' => '1535222584555-0']);
     * </pre>
     */
    public function xRead($streams, $count = -1, $block = -1) {}

    /**
     * This method is similar to xRead except that it supports reading messages for a specific consumer group.
     *
     * @param string $group    The consumer group to use.
     * @param string $consumer The consumer to use.
     * @param array  $streams  An array of stream names and message IDs
     * @param int|null $count  Optional maximum number of messages to return
     * @param int|null $block  How long to block if there are no messages available.
     *
     * @return array|bool|Redis The messages delivered to this consumer group (if any) or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/xreadgroup
     * @example
     * <pre>
     * // Consume messages for 'mygroup', 'consumer1'
     * $redis->xReadGroup('mygroup', 'consumer1', ['s1' => 0, 's2' => 0]);
     * // Read a single message as 'consumer2' for up to a second until a message arrives.
     * $redis->xReadGroup('mygroup', 'consumer2', ['s1' => 0, 's2' => 0], 1, 1000);
     * </pre>
     */
    public function xReadGroup($group, $consumer, $streams, $count = 1, $block = 1) {}

    /**
     * This is identical to xRange except the results come back in reverse order.
     * Also note that Redis reverses the order of "start" and "end".
     *
     * @param string $stream The stream key to query.
     * @param string $end   The maximum message ID to include.
     * @param string $start The minimum message ID to include.
     * @param int    $count An optional maximum number of messages to include.
     *
     * @return array|bool|Redis The messages in the range specified or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/xrevrange
     * @example
     * <pre>
     * $redis->xRevRange('mystream', '+', '-');
     * $redis->xRevRange('mystream', '0-2', '0-1');
     * </pre>
     */
    public function xRevRange($stream, $end, $start, $count = -1) {}

    /**
     * Trim the stream length to a given maximum.
     * If the "approximate" flag is pasesed, Redis will use your size as a hint but only trim trees in whole nodes
     * (this is more efficient)
     *
     * @param string $stream    The STREAM key to trim.
     * @param string $threshold This can either be a maximum length, or a minimum id.
     *                          MAXLEN - An integer describing the maximum desired length of the stream after the command.
     *                          MINID  - An ID that will become the new minimum ID in the stream, as Redis will trim all
     *                          messages older than this ID.
     * @param bool   $approx    Whether redis is allowed to do an approximate trimming of the stream.  This is
     *                          more efficient for Redis given how streams are stored internally.
     * @param bool   $minid     When set to `true`, users should pass a minimum ID to the `$threshold` argument.
     * @param int    $limit     An optional upper bound on how many entries to trim during the command.
     *
     * @return false|int|Redis The number of messages trimed from the stream or Redis if in multimode
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/xtrim
     * @example
     * <pre>
     * // Trim to exactly 100 messages
     * $redis->xTrim('mystream', 100);
     * // Let Redis approximate the trimming
     * $redis->xTrim('mystream', 100, true);
     * </pre>
     */
    public function xTrim($stream, $threshold, $approx = false, $minid = false, $limit = -1) {}

    /**
     * Adds a values to the set value stored at key.
     *
     * @param string $key Required key
     * @param array  $values Required values
     *
     * @return int|bool|Redis The number of elements added to the set or Redis if in multimode
     * If this value is already in the set, FALSE is returned
     *
     * @throws RedisException
     *
     * @link    https://redis.io/commands/sadd
     * @link    https://github.com/phpredis/phpredis/commit/3491b188e0022f75b938738f7542603c7aae9077
     * @since   phpredis 2.2.8
     * @example
     * <pre>
     * $redis->sAddArray('k', array('v1'));                // boolean
     * $redis->sAddArray('k', array('v1', 'v2', 'v3'));    // boolean
     * </pre>
     */
    public function sAddArray($key, array $values) {}

    public function __destruct() {}

    /**
     * Compress a value with the currently configured compressor as set with Redis::setOption().
     *
     * @param string $value The value to be compressed
     *
     * @return string The compressed result
     */
    public function _compress($value) {}

    /**
     * Uncompress the provided argument that has been compressed with the
     * currently configured compressor as set with Redis::setOption().
     *
     * @param string $value The compressed value to uncompress.
     *
     * @return string The uncompressed result.
     */
    public function _uncompress($value) {}

    /**
     * Pack the provided value with the configured serializer and compressor as set with Redis::setOption().
     *
     * @param mixed $value The value to pack
     *
     * @return string The packed result having been serialized and compressed.
     */
    public function _pack($value) {}

    /**
     * Unpack the provided value with the configured compressor and serializer as set with Redis::setOption().
     *
     * @param string $value The value which has been serialized and compressed.
     *
     * @return mixed The uncompressed and eserialized value.
     */
    public function _unpack($value) {}

    /**
     * Execute the Redis ACL command.
     *
     * @param string $subcmd Minumum of one argument for Redis and two for RedisCluster.
     * @param string ...$args
     *
     * @return mixed
     *
     * @example
     *
     * $redis->acl('USERS'); // Get a list of users
     * $redis->acl('LOG');   // See log of Redis' ACL subsystem
     */
    public function acl($subcmd, ...$args) {}

    /**
     * POP one or more elements from one or more sorted sets, blocking up to a specified amount of time when no elements are available.
     *
     * @param float  $timeout How long to block if there are no element available
     * @param array  $keys    The sorted sets to pop from
     * @param string $from    The string 'MIN' or 'MAX' (case insensitive) telling Redis whether you wish to pop the lowest or highest scoring members from the set(s).
     * @param int    $count   Pop up to how many elements.
     *
     * @return array|null|false|Redis This function will return an array of popped elements, or false
     *                                depending on whether any elements could be popped within the specified timeout.
     *
     * NOTE: If Redis::OPT_NULL_MULTIBULK_AS_NULL is set to true via Redis::setOption(), this method will instead return NULL when Redis doesn't pop any elements.
     * @since phpredis 6.0
     */
    public function bzmpop($timeout, $keys, $from, $count = 1) {}

    /**
     * POP one or more of the highest or lowest scoring elements from one or more sorted sets.
     *
     * @link https://redis.io/commands/zmpop
     *
     * @param array  $keys  One or more sorted sets
     * @param string $from  The string 'MIN' or 'MAX' (case insensitive) telling Redis whether you want to pop the lowest or highest scoring elements.
     * @param int    $count Pop up to how many elements at once.
     *
     * @return array|null|false|Redis An array of popped elements or false if none could be popped.
     * @since phpredis 6.0
     */
    public function zmpop($keys, $from, $count = 1) {}

    /**
     * Pop one or more elements from one or more Redis LISTs, blocking up to a specified timeout when no elements are available.
     *
     * @link https://redis.io/commands/blmpop
     *
     * @param float  $timeout The number of seconds Redis will block when no elements are available.
     * @param array  $keys    One or more Redis LISTs to pop from.
     * @param string $from    The string 'LEFT' or 'RIGHT' (case insensitive), telling Redis whether to pop elements from the beginning or end of the LISTs.
     * @param int    $count   Pop up to how many elements at once.
     *
     * @return array|null|false|Redis One or more elements popped from the list(s) or false if all LISTs were empty.
     * @since phpredis 6.0
     */
    public function blmpop($timeout, $keys, $from, $count = 1) {}

    /**
     * Pop one or more elements off of one or more Redis LISTs.
     *
     * @link https://redis.io/commands/lmpop
     *
     * @param array  $keys  An array with one or more Redis LIST key names.
     * @param string $from  The string 'LEFT' or 'RIGHT' (case insensitive), telling Redis whether to pop elements from the beginning or end of the LISTs.
     * @param int    $count The maximum number of elements to pop at once.
     *
     * @return array|null|false|Redis One or more elements popped from the LIST(s) or false if all the LISTs were empty.
     *
     * @since phpredis 6.0
     */
    public function lmpop($keys, $from, $count = 1) {}

    /**
     * @param string|null $opt
     * @param mixed       ...$args
     *
     * @return mixed
     */
    public function command($opt = null, ...$args) {}

    /**
     * Make a copy of a key.
     *
     * $redis = new Redis(['host' => 'localhost']);
     *
     * @param string $src         The key to copy
     * @param string $dst         The name of the new key created from the source key.
     * @param array|null $options An array with modifiers on how COPY should operate.
     *                            'REPLACE' => true|false # Whether to replace an existing key.
     *                            'DB' => int             # Copy key to specific db.
     *
     * @return bool|Redis True if the copy was completed and false if not.
     *
     * @link https://redis.io/commands/copy
     * @since phpredis 6.0
     *
     * @example
     * $redis->pipeline()
     *       ->select(1)
     *       ->del('newkey')
     *       ->select(0)
     *       ->del('newkey')
     *       ->mset(['source1' => 'value1', 'exists' => 'old_value'])
     *       ->exec();
     *
     * var_dump($redis->copy('source1', 'newkey'));
     * var_dump($redis->copy('source1', 'newkey', ['db' => 1]));
     * var_dump($redis->copy('source1', 'exists'));
     * var_dump($redis->copy('source1', 'exists', ['REPLACE' => true]));
     */
    public function copy($src, $dst, $options = null) {}

    /**
     * @param string $key
     *
     * @return string|Redis
     */
    public function debug($key) {}

    /**
     * This is simply the read-only variant of eval, meaning the underlying script may not modify data in redis.
     *
     * @param string  $script_sha
     * @param mixed[] $args
     * @param int     $num_keys
     *
     * @return mixed
     *
     * @see eval()
     * @since phpredis 6.0
     */
    public function eval_ro($script_sha, $args = [], $num_keys = 0) {}

    /**
     * This is simply the read-only variant of evalsha, meaning the underlying script may not modify data in redis.
     *
     * @param string  $sha1
     * @param mixed[] $args
     * @param int     $num_keys
     *
     * @return mixed
     * @see evalsha()
     * @since phpredis 6.0
     */
    public function evalsha_ro($sha1, $args = [], $num_keys = 0) {}

    /**
     * @param array|null $to
     * @param bool       $abort
     * @param int        $timeout
     *
     * @return bool|Redis
     * @since phpredis 6.0
     */
    public function failover($to = null, $abort = false, $timeout = 0) {}

    /**
     * Get the expiration of a given key as a unix timestamp
     *
     * @param string $key The key to check.
     *
     * @return int|false|Redis The timestamp when the key expires, or -1 if the key has no expiry and -2 if the key doesn't exist.
     *
     * @link https://redis.io/commands/expiretime
     * @since phpredis 6.0
     *
     * @example
     * $redis->setEx('mykey', 60, 'myval');
     * $redis->expiretime('mykey');
     */
    public function expiretime($key) {}

    /**
     * Get the expriation timestamp of a given Redis key but in milliseconds.
     *
     * @param string $key The key to check
     *
     * @link https://redis.io/commands/pexpiretime
     * @see expiretime()
     * @since phpredis 6.0
     *
     * @return int|false|Redis The expiration timestamp of this key (in milliseconds) or -1 if the key has no expiration, and -2 if it does not exist.
     */
    public function pexpiretime($key) {}

    /**
     * Invoke a function.
     *
     * @param string $fn   The name of the function
     * @param array  $keys Optional list of keys
     * @param array  $args Optional list of args
     *
     * @return mixed Function may return arbitrary data so this method can return strings, arrays, nested arrays, etc.
     *
     * @link https://redis.io/commands/fcall
     * @since phpredis 6.0
     */
    public function fcall($fn, $keys = [], $args = []) {}

    /**
     * This is a read-only variant of the FCALL command that cannot execute commands that modify data.
     *
     * @param string $fn   The name of the function
     * @param array  $keys Optional list of keys
     * @param array  $args Optional list of args
     *
     * @return mixed Function may return arbitrary data so this method can return strings, arrays, nested arrays, etc.
     *
     * @link https://redis.io/commands/fcall_ro
     * @since phpredis 6.0
     */
    public function fcall_ro($fn, $keys = [], $args = []) {}

    /**
     * Functions is an API for managing code to be executed on the server.
     *
     * @param string $operation The subcommand you intend to execute. Valid options are as follows
     *                          'LOAD'      - Create a new library with the given library name and code.
     *                          'DELETE'    - Delete the given library.
     *                          'LIST'      - Return general information on all the libraries
     *                          'STATS'     - Return information about the current function running
     *                          'KILL'      - Kill the current running function
     *                          'FLUSH'     - Delete all the libraries
     *                          'DUMP'      - Return a serialized payload representing the current libraries
     *                          'RESTORE'   - Restore the libraries represented by the given payload
     * @param mixed  $args      Additional arguments
     *
     * @return Redis|bool|string|array  Depends on subcommand.
     *
     * @link https://redis.io/commands/function
     * @since phpredis 6.0
     */
    public function function($operation, ...$args) {}

    /**
     * A readonly variant of `GEORADIUS` that may be executed on replicas.
     *
     * @param string  $key
     * @param float   $lng
     * @param float   $lat
     * @param float   $radius
     * @param string  $unit
     * @param mixed[] $options
     *
     * @return mixed
     * @see georadius()
     */
    public function georadius_ro($key, $lng, $lat, $radius, $unit, $options = []) {}

    /**
     * This is the read-only variant of `GEORADIUSBYMEMBER` that can be run on replicas.
     *
     * @param string  $key
     * @param string  $member
     * @param float   $radius
     * @param string  $unit
     * @param mixed[] $options
     *
     * @return mixed
     *
     * @see georadiusbymember()
     */
    public function georadiusbymember_ro($key, $member, $radius, $unit, $options = []) {}

    /**
     * Get the value of a key and optionally set it's expiration.
     *
     * @param string $key     The key to query
     * @param array  $options Options to modify how the command works.
     *                        'EX'     => <seconds>      # Expire in N seconds
     *                        'PX'     => <milliseconds> # Expire in N milliseconds
     *                        'EXAT'   => <timestamp>    # Expire at a unix timestamp (in seconds)
     *                        'PXAT'   => <mstimestamp>  # Expire at a unix timestamp (in milliseconds);
     *                        'PERSIST'                  # Remove any configured expiration on the key.
     *
     * @return string|bool|Redis The key's value or false if it didn't exist.
     *
     * @see     https://redis.io/comands/getex
     * @since phpredis 6.0
     *
     * @example $redis->getEx('mykey', ['EX' => 60]);
     */
    public function getEx($key, $options = []) {}

    /**
     * Get a key from Redis and delete it in an atomic operation.
     *
     * @param string $key The key to get/delete.
     *
     * @return Redis|string|bool The value of the key or false if it didn't exist.
     *
     * @see     https://redis.io/commands/getdel
     * @since phpredis 6.0
     *
     * @example $redis->getDel('token:123');
     */
    public function getDel($key) {}

    /**
     * Get the longest common subsequence between two string keys.
     *
     * @param string $key1    The first key to check
     * @param string $key2    The second key to check
     * @param array|null $options An optional array of modifiers for the comand.
     *                            'MINMATCHLEN'  => int  # Exclude matching substrings that are less than this value
     *                            'WITHMATCHLEN' => bool # Whether each match should also include its length.
     *                            'LEN'                  # Return the length of the longest subsequence
     *                            'IDX'                  # Each returned match will include the indexes where the
     *                                                   # match occurs in each string.
     *                             NOTE:  'LEN' cannot be used with 'IDX'.
     *
     * @return Redis|string|array|int|false Various reply types depending on options.
     *
     * @link https://redis.io/commands/lcs
     * @since phpredis 6.0
     *
     * @example
     * $redis->set('seq1', 'gtaggcccgcacggtctttaatgtatccctgtttaccatgccatacctgagcgcatacgc');
     * $redis->set('seq2', 'aactcggcgcgagtaccaggccaaggtcgttccagagcaaagactcgtgccccgctgagc');
     * echo $redis->lcs('seq1', 'seq2') . "\n";
     */
    public function lcs($key1, $key2, $options = null) {}

    /**
     * Get the number of bytes sent and received on the socket.
     *
     * @return array An array in the form [$sent_bytes, $received_bytes]
     * @since phpredis 6.0
     */
    public function getTransferredBytes() {}

    /**
     * Reset the number of bytes sent and received on the socket.
     * @since phpredis 6.0
     *
     * @return void
     */
    public function clearTransferredBytes() {}

    /**
     * Get one or more random field from a hash.
     *
     * @param string $key     The hash to query.
     * @param array|null $options An array of options to modify how the command behaves.
     *                            'COUNT'      => int  # An optional number of fields to return.
     *                            'WITHVALUES' => bool # Also return the field values.
     *
     * @return Redis|array|string One or more random fields (and possibly values).
     *
     * @see     https://redis.io/commands/hrandfield
     * @since phpredis 6.0
     *
     * @example
     * $redis->hRandField('settings');
     * $redis->hRandField('settings', ['count' => 2, 'withvalues' => true]);
     */
    public function hRandField($key, $options = null) {}

    /**
     * Move an element from one list into another.
     *
     * @param string $src       The source list.
     * @param string $dst       The destination list
     * @param string $wherefrom Where in the source list to retrieve the element.  This can be either
     *                          - `Redis::LEFT`, or `Redis::RIGHT`.
     * @param string $whereto   Where in the destination list to put the element.  This can be either
     *                          - `Redis::LEFT`, or `Redis::RIGHT`.
     *
     * @return Redis|string|false The element removed from the source list.
     * @since phpredis 6.0
     *
     * @example
     * $redis->rPush('numbers', 'one', 'two', 'three');
     * $redis->lMove('numbers', 'odds', Redis::LEFT, Redis::LEFT);
     */
    public function lMove($src, $dst, $wherefrom, $whereto) {}

    /**
     * Move an element from one list to another, blocking up to a timeout until an element is available.
     *
     * @param string $src       The source list
     * @param string $dst       The destination list
     * @param string $wherefrom Where in the source list to extract the element. - `Redis::LEFT`, or `Redis::RIGHT`.
     * @param string $whereto   Where in the destination list to put the element.- `Redis::LEFT`, or `Redis::RIGHT`.
     * @param float  $timeout   How long to block for an element.
     *
     * @return Redis|string|false;
     * @since phpredis 6.0
     *
     * @example
     * $redis->lPush('numbers', 'one');
     * $redis->blmove('numbers', 'odds', Redis::LEFT, Redis::LEFT 1.0);
     * // This call will block, if no additional elements are in 'numbers'
     * $redis->blmove('numbers', 'odds', Redis::LEFT, Redis::LEFT, 1.0);
     */
    public function blmove($src, $dst, $wherefrom, $whereto, $timeout) {}

    /**
     * Retrieve the index of an element in a list.
     *
     * @param string $key         The list to query.
     * @param mixed  $value       The value to search for.
     * @param array|null $options  Options to configure how the command operates
     *                            # How many matches to return.  By default a single match is returned.
     *                            # If count is set to zero, it means unlimited.
     *                            'COUNT' => <num-matches>
     *
     *                            # Specify which match you want returned.  `RANK` 1 means "the first match"
     *                            # 2 means the second, and so on.  If passed as a negative number the
     *                            # RANK is computed right to left, so a `RANK` of -1 means "the last match".
     *                            'RANK'  => <rank>
     *
     *                            # This argument allows you to limit how many elements Redis will search before
     *                            # returning.  This is useful to prevent Redis searching very long lists while
     *                            # blocking the client.
     *                            'MAXLEN => <max-len>
     *
     * @return Redis|null|bool|int|array Returns one or more of the matching indexes, or null/false if none were found.
     * @since phpredis 6.0
     */
    public function lPos($key, $value, $options = null) {}

    /**
     * Reset the state of the connection.
     *
     * @return Redis|bool Should always return true unless there is an error.
     * @since phpredis 6.0
     */
    public function reset() {}

    /**
     * Compute the intersection of one or more sets and return the cardinality of the result.
     *
     * @param array $keys  One or more set key names.
     * @param int   $limit A maximum cardinality to return. This is useful to put an upper bound on the amount of work Redis will do.
     *
     * @return Redis|int|false
     *
     * @link https://redis.io/commands/sintercard
     * @since phpredis 6.0
     *
     * @example
     * $redis->sAdd('set1', 'apple', 'pear', 'banana', 'carrot');
     * $redis->sAdd('set2', 'apple',         'banana');
     * $redis->sAdd('set3',          'pear', 'banana');
     *
     * $redis->sInterCard(['set1', 'set2', 'set3']);
     */
    public function sInterCard($keys, $limit = -1) {}

    /**
     * Used to turn a Redis instance into a replica of another, or to remove
     * replica status promoting the instance to a primary.
     *
     * @link https://redis.io/commands/replicaof
     * @link https://redis.io/commands/slaveof
     * @see slaveof()
     * @since phpredis 6.0
     *
     * @param string|null $host The host of the primary to start replicating.
     * @param int         $port The port of the primary to start replicating.
     *
     * @return Redis|bool Success if we were successfully able to start replicating a primary or
     *                    were able to promote teh replicat to a primary.
     *
     * @example
     * $redis = new Redis(['host' => 'localhost']);
     *
     * // Attempt to become a replica of a Redis instance at 127.0.0.1:9999
     * $redis->replicaof('127.0.0.1', 9999);
     *
     * // When passed no arguments, PhpRedis will deliver the command `REPLICAOF NO ONE`
     * // attempting to promote the instance to a primary.
     * $redis->replicaof();
     */
    public function replicaof($host = null, $port = 6379) {}

    /**
     * Update one or more keys last modified metadata.
     *
     * @link https://redis.io/commands/touch/
     *
     * @param array|string $key_or_array Either the first key or if passed as the only argument an array of keys.
     * @param string      ...$more_keys  One or more keys to send to the command.
     *
     * @return Redis|int|false This command returns the number of keys that exist and had their last modified time reset
     * @since phpredis 6.0
     */
    public function touch($key_or_array, ...$more_keys) {}

    /**
     * This is simply a read-only variant of the sort command
     *
     * @param string       $key
     * @param mixed[]|null $options
     *
     * @return mixed
     * @see sort()
     * @since phpredis 6.0
     */
    public function sort_ro($key, $options = null) {}

    /**
     * Subscribes the client to the specified shard channels.
     *
     * @param array    $channels One or more channel names.
     * @param callable $cb       The callback PhpRedis will invoke when we receive a message from one of the subscribed channels.
     *
     * @return bool True on success, false on faiilure.  Note that this command will block the
     *              client in a subscribe loop, waiting for messages to arrive.
     *
     * @link https://redis.io/commands/ssubscribe
     * @since phpredis 6.0
     *
     * @example
     * $redis = new Redis(['host' => 'localhost']);
     *
     * $redis->ssubscribe(['channel-1', 'channel-2'], function ($redis, $channel, $message) {
     *     echo "[$channel]: $message\n";
     *
     *     // Unsubscribe from the message channel when we read 'quit'
     *     if ($message == 'quit') {
     *         echo "Unsubscribing from '$channel'\n";
     *         $redis->sunsubscribe([$channel]);
     *     }
     * });
     *
     * // Once we read 'quit' from both channel-1 and channel-2 the subscribe loop will be
     * // broken and this command will execute.
     * echo "Subscribe loop ended\n";
     */
    public function ssubscribe($channels, $cb) {}

    /**
     * Unsubscribes the client from the given shard channels,
     * or from all of them if none is given.
     *
     * @param array $channels One or more channels to unsubscribe from.
     *
     * @return Redis|array|bool The array of unsubscribed channels.
     *
     * @link https://redis.io/commands/sunsubscribe
     * @see ssubscribe()
     * @since phpredis 6.0
     *
     * @example
     * $redis->ssubscribe(['channel-1', 'channel-2'], function ($redis, $channel, $message) {
     *     if ($message == 'quit') {
     *         echo "$channel => 'quit' detected, unsubscribing!\n";
     *         $redis->sunsubscribe([$channel]);
     *     } else {
     *         echo "$channel => $message\n";
     *     }
     * });
     *
     * echo "We've unsubscribed from both channels, exiting\n";
     */
    public function sunsubscribe($channels) {}

    /**
     * This command allows a consumer to claim pending messages that have been idle for a specified period of time.
     * Its purpose is to provide a mechanism for picking up messages that may have had a failed consumer.
     *
     * @link https://redis.io/commands/xautoclaim
     * @link https://redis.io/commands/xclaim
     * @link https://redis.io/docs/data-types/streams-tutorial/
     * @since phpredis 6.0
     *
     * @param string $key      The stream to check.
     * @param string $group    The consumer group to query.
     * @param string $consumer Which consumer to check.
     * @param int    $min_idle The minimum time in milliseconds for the message to have been pending.
     * @param string $start    The minimum message id to check.
     * @param int    $count    An optional limit on how many messages are returned.
     * @param bool   $justid   If the client only wants message IDs and not all of their data.
     *
     * @return Redis|array|bool An array of pending IDs or false if there are none, or on failure.
     *
     * @example
     * $redis->xGroup('CREATE', 'ships', 'combatants', '0-0', true);
     *
     * $redis->xAdd('ships', '1424-74205', ['name' => 'Defiant']);
     *
     * // Consume the ['name' => 'Defiant'] message
     * $msgs = $redis->xReadGroup('combatants', "Jem'Hadar", ['ships' => '>'], 1);
     *
     * // The "Jem'Hadar" consumer has the message presently
     * $pending = $redis->xPending('ships', 'combatants');
     * var_dump($pending);
     *
     * // Asssume control of the pending message with a different consumer.
     * $res = $redis->xAutoClaim('ships', 'combatants', 'Sisko', 0, '0-0');
     *
     * // Now the 'Sisko' consumer owns the message
     * $pending = $redis->xPending('ships', 'combatants');
     * var_dump($pending);
     */
    public function xAutoClaim($key, $group, $consumer, $min_idle, $start, $count = -1, $justid = false) {}

    /**
     * Count the number of elements in a sorted set whos members fall within the provided
     * lexographical range.
     *
     * @param string $key The sorted set to check.
     * @param string $min The minimum matching lexographical string
     * @param string $max The maximum matching lexographical string
     *
     * @return Redis|int|false The number of members that fall within the range or false on failure.
     *
     * @link https://redis.io/commands/zlexcount
     *
     * @example
     * $redis->zAdd('captains', 0, 'Janeway', 0, 'Kirk', 0, 'Picard', 0, 'Sisko', 0, 'Archer');
     * $redis->zLexCount('captains', '[A', '[S');
     */
    public function zLexCount($key, $min, $max) {}

    /**
     * This command is similar to ZRANGE except that instead of returning the values directly
     * it will store them in a destination key provided by the user
     *
     * @param string          $dstkey  The key to store the resulting element(s)
     * @param string          $srckey  The source key with element(s) to retrieve
     * @param string          $start   The starting index to store
     * @param string          $end     The ending index to store
     * @param array|bool|null $options Our options array that controls how the command will function.
     *
     * @return Redis|int|false The number of elements stored in $dstkey or false on failure.
     *
     * @see https://redis.io/commands/zrange/
     * @see Redis::zRange for a full description of the possible options.
     * @since phpredis 6.0
     */
    public function zRangeStore($dstkey, $srckey, $start, $end, $options = null) {}

    /**
     * Store the difference of one or more sorted sets in a destination sorted set.
     *
     * @param string $dst  The destination set name.
     * @param array  $keys One or more source key names
     *
     * @return Redis|int|false The number of elements stored in the destination set or false on failure.
     *
     * @see zDiff()
     * @link https://redis.io/commands/zdiff
     * @since phpredis 6.0
     */
    public function zDiffStore($dst, $keys) {}

    /**
     * Similar to ZINTER but instead of returning the intersected values, this command returns the
     * cardinality of the intersected set.
     *
     * @link https://redis.io/commands/zintercard
     * @link https://redis.io/commands/zinter
     * @see zInter()
     *
     * @param array $keys  One ore more sorted set key names.
     * @param int   $limit An optional upper bound on the returned cardinality. If set to a value
     *                     greater than zero, Redis will stop processing the intersection once the
     *                     resulting cardinality reaches this limit.
     *
     * @return Redis|int|false The cardinality of the intersection or false on failure.
     * @since phpredis 6.0
     *
     * @example
     * $redis->zAdd('zs1', 1, 'one', 2, 'two', 3, 'three', 4, 'four');
     * $redis->zAdd('zs2', 2, 'two', 4, 'four');
     *
     * $redis->zInterCard(['zs1', 'zs2']);
     */
    public function zInterCard($keys, $limit = -1) {}
}

class RedisException extends Exception {}
<?php

/**
 * Helper autocomplete for php redis extension
 *
 * @mixin \Redis
 *
 * @link   https://github.com/phpredis/phpredis/blob/develop/redis_array.stub.php
 */
class RedisArray
{
    /**
     * Constructor
     *
     * @param string|string[] $hosts Name of the redis array from redis.ini or array of hosts to construct the array with
     * @param null|array      $opts  Array of options
     */
    public function __construct(string|array $hosts, ?array $opts = null) {}

    /**
     * @return bool|array returns a list of points on continuum; may be useful with custom distributor function.
     */
    public function _continuum(): bool|array {}

    /**
     * @return bool|array returns a custom distributor function.
     */
    public function _distributor(): bool|callable {}

    /**
     * @return bool|callable the name of the function used to extract key parts during consistent hashing.
     */
    public function _function(): bool|callable {}

    /**
     * @return bool|array list of hosts for the selected array or false
     */
    public function _hosts(): bool|array {}

    /**
     * @param string $host The host you want to retrieve the instance for
     *
     * @return bool|null|\Redis a redis instance connected to a specific node
     */
    public function _instance(string $host): bool|null|Redis {}

    /**
     * Use this function when a new node is added and keys need to be rehashed.
     *
     * @return bool|null rehash result
     */
    public function _rehash(callable $fn = null): bool|null {}

    /**
     * @param string $key The key for which you want to lookup the host
     *
     * @return bool|string|null the host to be used for a certain key
     */
    public function _target(string $key): bool|string|null {}

    /**
     * @param string $host Host
     * @param int    $mode \Redis::MULTI|\Redis::PIPELINE
     *
     * @return bool|string|null the host to be used for a certain key
     */
    public function multi(string $host, int $mode = Redis::MULTI): bool|RedisArray {}

    /**
     * Returns a hosts array of associative array of strings and integers, with the following keys:
     * - redis_version
     * - redis_git_sha1
     * - redis_git_dirty
     * - redis_build_id
     * - redis_mode
     * - os
     * - arch_bits
     * - multiplexing_api
     * - atomicvar_api
     * - gcc_version
     * - process_id
     * - run_id
     * - tcp_port
     * - uptime_in_seconds
     * - uptime_in_days
     * - hz
     * - lru_clock
     * - executable
     * - config_file
     * - connected_clients
     * - client_longest_output_list
     * - client_biggest_input_buf
     * - blocked_clients
     * - used_memory
     * - used_memory_human
     * - used_memory_rss
     * - used_memory_rss_human
     * - used_memory_peak
     * - used_memory_peak_human
     * - used_memory_peak_perc
     * - used_memory_peak
     * - used_memory_overhead
     * - used_memory_startup
     * - used_memory_dataset
     * - used_memory_dataset_perc
     * - total_system_memory
     * - total_system_memory_human
     * - used_memory_lua
     * - used_memory_lua_human
     * - maxmemory
     * - maxmemory_human
     * - maxmemory_policy
     * - mem_fragmentation_ratio
     * - mem_allocator
     * - active_defrag_running
     * - lazyfree_pending_objects
     * - mem_fragmentation_ratio
     * - loading
     * - rdb_changes_since_last_save
     * - rdb_bgsave_in_progress
     * - rdb_last_save_time
     * - rdb_last_bgsave_status
     * - rdb_last_bgsave_time_sec
     * - rdb_current_bgsave_time_sec
     * - rdb_last_cow_size
     * - aof_enabled
     * - aof_rewrite_in_progress
     * - aof_rewrite_scheduled
     * - aof_last_rewrite_time_sec
     * - aof_current_rewrite_time_sec
     * - aof_last_bgrewrite_status
     * - aof_last_write_status
     * - aof_last_cow_size
     * - changes_since_last_save
     * - aof_current_size
     * - aof_base_size
     * - aof_pending_rewrite
     * - aof_buffer_length
     * - aof_rewrite_buffer_length
     * - aof_pending_bio_fsync
     * - aof_delayed_fsync
     * - loading_start_time
     * - loading_total_bytes
     * - loading_loaded_bytes
     * - loading_loaded_perc
     * - loading_eta_seconds
     * - total_connections_received
     * - total_commands_processed
     * - instantaneous_ops_per_sec
     * - total_net_input_bytes
     * - total_net_output_bytes
     * - instantaneous_input_kbps
     * - instantaneous_output_kbps
     * - rejected_connections
     * - maxclients
     * - sync_full
     * - sync_partial_ok
     * - sync_partial_err
     * - expired_keys
     * - evicted_keys
     * - keyspace_hits
     * - keyspace_misses
     * - pubsub_channels
     * - pubsub_patterns
     * - latest_fork_usec
     * - migrate_cached_sockets
     * - slave_expires_tracked_keys
     * - active_defrag_hits
     * - active_defrag_misses
     * - active_defrag_key_hits
     * - active_defrag_key_misses
     * - role
     * - master_replid
     * - master_replid2
     * - master_repl_offset
     * - second_repl_offset
     * - repl_backlog_active
     * - repl_backlog_size
     * - repl_backlog_first_byte_offset
     * - repl_backlog_histlen
     * - master_host
     * - master_port
     * - master_link_status
     * - master_last_io_seconds_ago
     * - master_sync_in_progress
     * - slave_repl_offset
     * - slave_priority
     * - slave_read_only
     * - master_sync_left_bytes
     * - master_sync_last_io_seconds_ago
     * - master_link_down_since_seconds
     * - connected_slaves
     * - min-slaves-to-write
     * - min-replicas-to-write
     * - min_slaves_good_slaves
     * - used_cpu_sys
     * - used_cpu_user
     * - used_cpu_sys_children
     * - used_cpu_user_children
     * - cluster_enabled
     *
     * @link    https://redis.io/commands/info
     * @return  bool|array
     * @example
     * <pre>
     * $redis->info();
     * </pre>
     */
    public function info(): bool|array {}
}
<?php

/**
 * Helper autocomplete for php redis cluster extension.
 * Based on the phpredis-phpdoc by Max Kamashev (https://github.com/ukko/phpredis-phpdoc)
 *
 * @author Tommy Zheng <tommy@vlv.pw>
 * @link   https://github.com/zgb7mtr/phpredis_cluster_phpdoc
 *
 * @method mixed eval($script, $args = array(), $numKeys = 0)
 */
class RedisCluster
{
    public const AFTER = 'after';
    public const BEFORE = 'before';

    /**
     * Options
     */
    public const OPT_SERIALIZER = 1;
    public const OPT_PREFIX = 2;
    public const OPT_READ_TIMEOUT = 3;
    public const OPT_SCAN = 4;
    public const OPT_SLAVE_FAILOVER = 5;

    /**
     * Cluster options
     */
    public const FAILOVER_NONE = 0;
    public const FAILOVER_ERROR = 1;
    public const FAILOVER_DISTRIBUTE = 2;
    public const FAILOVER_DISTRIBUTE_SLAVES = 3;

    /**
     * SCAN options
     */
    public const SCAN_NORETRY = 0;
    public const SCAN_RETRY = 1;

    /**
     * @since 5.3.0
     */
    public const SCAN_PREFIX = 2;

    /**
     * @since 5.3.0
     */
    public const SCAN_NOPREFIX = 3;

    /**
     * Serializers
     */
    public const SERIALIZER_NONE = 0;
    public const SERIALIZER_PHP = 1;
    public const SERIALIZER_IGBINARY = 2;
    public const SERIALIZER_MSGPACK = 3;
    public const SERIALIZER_JSON = 4;

    /**
     * Multi
     */
    public const ATOMIC = 0;
    public const MULTI = 1;
    public const PIPELINE = 2;

    /**
     * Type
     */
    public const REDIS_NOT_FOUND = 0;
    public const REDIS_STRING = 1;
    public const REDIS_SET = 2;
    public const REDIS_LIST = 3;
    public const REDIS_ZSET = 4;
    public const REDIS_HASH = 5;

    /**
     * Creates a Redis Cluster client
     *
     * @param string|null   $name
     * @param array         $seeds
     * @param float         $timeout
     * @param float         $readTimeout
     * @param bool          $persistent
     * @param string|null   $auth
     * @throws RedisClusterException
     *
     * @example
     * <pre>
     * // Declaring a cluster with an array of seeds
     * $redisCluster = new RedisCluster(null,['127.0.0.1:6379']);
     *
     * // Loading a cluster configuration by name
     * // In order to load a named array, one must first define the seed nodes in redis.ini.
     * // The following lines would define the cluster 'mycluster', and be loaded automatically by phpredis.
     *
     * // # In redis.ini
     * // redis.clusters.seeds = "mycluster[]=localhost:7000&test[]=localhost:7001"
     * // redis.clusters.timeout = "mycluster=5"
     * // redis.clusters.read_timeout = "mycluster=10"
     * // redis.clusters.auth = "mycluster=password" OR ['user' => 'foo', 'pass' => 'bar] as example
     *
     * //Then, this cluster can be loaded by doing the following
     *
     * $redisClusterPro = new RedisCluster('mycluster');
     * $redisClusterDev = new RedisCluster('test');
     * </pre>
     */
    public function __construct($name, $seeds, $timeout = null, $readTimeout = null, $persistent = false, $auth = null) {}

    /**
     * Disconnects from the RedisCluster instance, except when pconnect is used.
     */
    public function close() {}

    /**
     * Get the value related to the specified key
     *
     * @param   string $key
     *
     * @return  string|false If key didn't exist, FALSE is returned. Otherwise, the value related to this key is
     *                       returned.
     *
     * @link    https://redis.io/commands/get
     * @example
     * <pre>
     * $redisCluster->get('key');
     * </pre>
     */
    public function get($key) {}

    /**
     * Set the string value in argument as value of the key.
     *
     * @since    If you're using Redis >= 2.6.12, you can pass extended options as explained in example
     *
     * @param   string    $key
     * @param   string    $value
     * @param   int|array $timeout If you pass an integer, phpredis will redirect to SETEX, and will try to use Redis
     *                             >= 2.6.12 extended options if you pass an array with valid values.
     *
     * @return  bool TRUE if the command is successful.
     *
     * @link     https://redis.io/commands/set
     * @example
     * <pre>
     * // Simple key -> value set
     * $redisCluster->set('key', 'value');
     *
     * // Will redirect, and actually make an SETEX call
     * $redisCluster->set('key','value', 10);
     *
     * // Will set the key, if it doesn't exist, with a ttl of 10 seconds
     * $redisCluster->set('key', 'value', Array('nx', 'ex'=>10));
     *
     * // Will set a key, if it does exist, with a ttl of 1000 milliseconds
     * $redisCluster->set('key', 'value', Array('xx', 'px'=>1000));
     * </pre>
     */
    public function set($key, $value, $timeout = null) {}

    /**
     * Returns the values of all specified keys.
     *
     * For every key that does not hold a string value or does not exist,
     * the special value false is returned. Because of this, the operation never fails.
     *
     * @param array $array
     *
     * @return array
     *
     * @link https://redis.io/commands/mget
     * @example
     * <pre>
     * $redisCluster->del('x', 'y', 'z', 'h');    // remove x y z
     * $redisCluster->mset(array('x' => 'a', 'y' => 'b', 'z' => 'c'));
     * $redisCluster->hset('h', 'field', 'value');
     * var_dump($redisCluster->mget(array('x', 'y', 'z', 'h')));
     * // Output:
     * // array(3) {
     * // [0]=>
     * // string(1) "a"
     * // [1]=>
     * // string(1) "b"
     * // [2]=>
     * // string(1) "c"
     * // [3]=>
     * // bool(false)
     * // }
     * </pre>
     */
    public function mget(array $array) {}

    /**
     * Sets multiple key-value pairs in one atomic command.
     * MSETNX only returns TRUE if all the keys were set (see SETNX).
     *
     * @param   array $array Pairs: array(key => value, ...)
     *
     * @return  bool    TRUE in case of success, FALSE in case of failure.
     * @link    https://redis.io/commands/mset
     * @example
     * <pre>
     * $redisCluster->mset(array('key0' => 'value0', 'key1' => 'value1'));
     * var_dump($redisCluster->get('key0'));
     * var_dump($redisCluster->get('key1'));
     * // Output:
     * // string(6) "value0"
     * // string(6) "value1"
     * </pre>
     */
    public function mset(array $array) {}

    /**
     * @see     mset()
     *
     * @param   array $array
     *
     * @return  int 1 (if the keys were set) or 0 (no key was set)
     * @link    https://redis.io/commands/msetnx
     */
    public function msetnx(array $array) {}

    /**
     * Remove specified keys.
     *
     * @param int|string|array $key1 An array of keys, or an undefined number of parameters, each a key: key1 key2 key3
     *                            ... keyN
     * @param int|string ...$otherKeys
     *
     * @return int Number of keys deleted.
     * @link    https://redis.io/commands/del
     * @example
     * <pre>
     * $redisCluster->set('key1', 'val1');
     * $redisCluster->set('key2', 'val2');
     * $redisCluster->set('key3', 'val3');
     * $redisCluster->set('key4', 'val4');
     * $redisCluster->del('key1', 'key2');          // return 2
     * $redisCluster->del(array('key3', 'key4'));   // return 2
     * </pre>
     */
    public function del($key1, ...$otherKeys) {}

    /**
     * Set the string value in argument as value of the key, with a time to live.
     *
     * @param   string $key
     * @param   int    $ttl
     * @param   string $value
     *
     * @return  bool   TRUE if the command is successful.
     * @link    https://redis.io/commands/setex
     * @example
     * <pre>
     * $redisCluster->setex('key', 3600, 'value'); // sets key → value, with 1h TTL.
     * </pre>
     */
    public function setex($key, $ttl, $value) {}

    /**
     * PSETEX works exactly like SETEX with the sole difference that the expire time is specified in milliseconds
     * instead of seconds.
     *
     * @param   string $key
     * @param   int    $ttl
     * @param   string $value
     *
     * @return  bool   TRUE if the command is successful.
     * @link    https://redis.io/commands/psetex
     * @example
     * <pre>
     * $redisCluster->psetex('key', 1000, 'value'); // sets key → value, with 1s TTL.
     * </pre>
     */
    public function psetex($key, $ttl, $value) {}

    /**
     * Set the string value in argument as value of the key if the key doesn't already exist in the database.
     *
     * @param   string $key
     * @param   string $value
     *
     * @return  bool   TRUE in case of success, FALSE in case of failure.
     * @link    https://redis.io/commands/setnx
     * @example
     * <pre>
     * $redisCluster->setnx('key', 'value');   // return TRUE
     * $redisCluster->setnx('key', 'value');   // return FALSE
     * </pre>
     */
    public function setnx($key, $value) {}

    /**
     * Sets a value and returns the previous entry at that key.
     *
     * @param   string $key
     * @param   string $value
     *
     * @return  string  A string, the previous value located at this key.
     * @link    https://redis.io/commands/getset
     * @example
     * <pre>
     * $redisCluster->set('x', '42');
     * $exValue = $redisCluster->getSet('x', 'lol');   // return '42', replaces x by 'lol'
     * $newValue = $redisCluster->get('x');            // return 'lol'
     * </pre>
     */
    public function getSet($key, $value) {}

    /**
     * Verify if the specified key exists.
     *
     * @param   string $key
     *
     * @return  bool If the key exists, return TRUE, otherwise return FALSE.
     * @link    https://redis.io/commands/exists
     * @example
     * <pre>
     * $redisCluster->set('key', 'value');
     * $redisCluster->exists('key');               //  TRUE
     * $redisCluster->exists('NonExistingKey');    // FALSE
     * </pre>
     */
    public function exists($key) {}

    /**
     * Returns the keys that match a certain pattern.
     *
     * @param   string $pattern pattern, using '*' as a wildcard.
     *
     * @return  array   of STRING: The keys that match a certain pattern.
     * @link    https://redis.io/commands/keys
     * @example
     * <pre>
     * $allKeys = $redisCluster->keys('*');   // all keys will match this.
     * $keyWithUserPrefix = $redisCluster->keys('user*');
     * </pre>
     */
    public function keys($pattern) {}

    /**
     * Returns the type of data pointed by a given key.
     *
     * @param   string $key
     *
     * @return  int
     *
     * Depending on the type of the data pointed by the key,
     * this method will return the following value:
     * - string: RedisCluster::REDIS_STRING
     * - set:   RedisCluster::REDIS_SET
     * - list:  RedisCluster::REDIS_LIST
     * - zset:  RedisCluster::REDIS_ZSET
     * - hash:  RedisCluster::REDIS_HASH
     * - other: RedisCluster::REDIS_NOT_FOUND
     * @link    https://redis.io/commands/type
     * @example $redisCluster->type('key');
     */
    public function type($key) {}

    /**
     * Returns and removes the first element of the list.
     *
     * @param   string $key
     *
     * @return  string|false if command executed successfully BOOL FALSE in case of failure (empty list)
     * @link    https://redis.io/commands/lpop
     * @example
     * <pre>
     * $redisCluster->rPush('key1', 'A');
     * $redisCluster->rPush('key1', 'B');
     * $redisCluster->rPush('key1', 'C');
     * var_dump( $redisCluster->lRange('key1', 0, -1) );
     * // Output:
     * // array(3) {
     * //   [0]=> string(1) "A"
     * //   [1]=> string(1) "B"
     * //   [2]=> string(1) "C"
     * // }
     * $redisCluster->lPop('key1');
     * var_dump( $redisCluster->lRange('key1', 0, -1) );
     * // Output:
     * // array(2) {
     * //   [0]=> string(1) "B"
     * //   [1]=> string(1) "C"
     * // }
     * </pre>
     */
    public function lPop($key) {}

    /**
     * Returns and removes the last element of the list.
     *
     * @param   string $key
     *
     * @return  string|false if command executed successfully BOOL FALSE in case of failure (empty list)
     * @link    https://redis.io/commands/rpop
     * @example
     * <pre>
     * $redisCluster->rPush('key1', 'A');
     * $redisCluster->rPush('key1', 'B');
     * $redisCluster->rPush('key1', 'C');
     * var_dump( $redisCluster->lRange('key1', 0, -1) );
     * // Output:
     * // array(3) {
     * //   [0]=> string(1) "A"
     * //   [1]=> string(1) "B"
     * //   [2]=> string(1) "C"
     * // }
     * $redisCluster->rPop('key1');
     * var_dump( $redisCluster->lRange('key1', 0, -1) );
     * // Output:
     * // array(2) {
     * //   [0]=> string(1) "A"
     * //   [1]=> string(1) "B"
     * // }
     * </pre>
     */
    public function rPop($key) {}

    /**
     * Set the list at index with the new value.
     *
     * @param string $key
     * @param int    $index
     * @param string $value
     *
     * @return bool TRUE if the new value is setted. FALSE if the index is out of range, or data type identified by key
     * is not a list.
     * @link    https://redis.io/commands/lset
     * @example
     * <pre>
     * $redisCluster->rPush('key1', 'A');
     * $redisCluster->rPush('key1', 'B');
     * $redisCluster->rPush('key1', 'C');  // key1 => [ 'A', 'B', 'C' ]
     * $redisCluster->lGet('key1', 0);     // 'A'
     * $redisCluster->lSet('key1', 0, 'X');
     * $redisCluster->lGet('key1', 0);     // 'X'
     * </pre>
     */
    public function lSet($key, $index, $value) {}

    /**
     * Removes and returns a random element from the set value at Key.
     *
     * @param   string $key
     *
     * @return  string  "popped" value
     * bool FALSE if set identified by key is empty or doesn't exist.
     * @link    https://redis.io/commands/spop
     * @example
     * <pre>
     * $redisCluster->sAdd('key1' , 'set1');
     * $redisCluster->sAdd('key1' , 'set2');
     * $redisCluster->sAdd('key1' , 'set3');
     * var_dump($redisCluster->sMembers('key1'));// 'key1' => {'set3', 'set1', 'set2'}
     * $redisCluster->sPop('key1');// 'set1'
     * var_dump($redisCluster->sMembers('key1'));// 'key1' => {'set3', 'set2'}
     * $redisCluster->sPop('key1');// 'set3',
     * var_dump($redisCluster->sMembers('key1'));// 'key1' => {'set2'}
     * </pre>
     */
    public function sPop($key) {}

    /**
     * Adds the string values to the head (left) of the list. Creates the list if the key didn't exist.
     * If the key exists and is not a list, FALSE is returned.
     *
     * @param   string $key
     * @param   string $value1 String, value to push in key
     * @param   string $value2 Optional
     * @param   string $valueN Optional
     *
     * @return  int|false    The new length of the list in case of success, FALSE in case of Failure.
     * @link    https://redis.io/commands/lpush
     * @example
     * <pre>
     * $redisCluster->lPush('l', 'v1', 'v2', 'v3', 'v4')   // int(4)
     * var_dump( $redisCluster->lRange('l', 0, -1) );
     * //// Output:
     * // array(4) {
     * //   [0]=> string(2) "v4"
     * //   [1]=> string(2) "v3"
     * //   [2]=> string(2) "v2"
     * //   [3]=> string(2) "v1"
     * // }
     * </pre>
     */
    public function lPush($key, $value1, $value2 = null, $valueN = null) {}

    /**
     * Adds the string values to the tail (right) of the list. Creates the list if the key didn't exist.
     * If the key exists and is not a list, FALSE is returned.
     *
     * @param   string $key
     * @param   string $value1 String, value to push in key
     * @param   string $value2 Optional
     * @param   string $valueN Optional
     *
     * @return  int|false     The new length of the list in case of success, FALSE in case of Failure.
     * @link    https://redis.io/commands/rpush
     * @example
     * <pre>
     * $redisCluster->rPush('r', 'v1', 'v2', 'v3', 'v4');    // int(4)
     * var_dump( $redisCluster->lRange('r', 0, -1) );
     * //// Output:
     * // array(4) {
     * //   [0]=> string(2) "v1"
     * //   [1]=> string(2) "v2"
     * //   [2]=> string(2) "v3"
     * //   [3]=> string(2) "v4"
     * // }
     * </pre>
     */
    public function rPush($key, $value1, $value2 = null, $valueN = null) {}

    /**
     * BLPOP is a blocking list pop primitive.
     * It is the blocking version of LPOP because it blocks the connection when
     * there are no elements to pop from any of the given lists.
     * An element is popped from the head of the first list that is non-empty,
     * with the given keys being checked in the order that they are given.
     *
     * @param array $keys    Array containing the keys of the lists
     *                       Or STRING Key1 STRING Key2 STRING Key3 ... STRING Keyn
     * @param int   $timeout Timeout
     *
     * @return  array array('listName', 'element')
     * @link    https://redis.io/commands/blpop
     * @example
     * <pre>
     * // Non blocking feature
     * $redisCluster->lPush('key1', 'A');
     * $redisCluster->del('key2');
     *
     * $redisCluster->blPop('key1', 'key2', 10); // array('key1', 'A')
     * // OR
     * $redisCluster->blPop(array('key1', 'key2'), 10); // array('key1', 'A')
     *
     * $redisCluster->brPop('key1', 'key2', 10); // array('key1', 'A')
     * // OR
     * $redisCluster->brPop(array('key1', 'key2'), 10); // array('key1', 'A')
     *
     * // Blocking feature
     *
     * // process 1
     * $redisCluster->del('key1');
     * $redisCluster->blPop('key1', 10);
     * // blocking for 10 seconds
     *
     * // process 2
     * $redisCluster->lPush('key1', 'A');
     *
     * // process 1
     * // array('key1', 'A') is returned
     * </pre>
     */
    public function blPop(array $keys, $timeout) {}

    /**
     * BRPOP is a blocking list pop primitive.
     * It is the blocking version of RPOP because it blocks the connection when
     * there are no elements to pop from any of the given lists.
     * An element is popped from the tail of the first list that is non-empty,
     * with the given keys being checked in the order that they are given.
     * See the BLPOP documentation(https://redis.io/commands/blpop) for the exact semantics,
     * since BRPOP is identical to BLPOP with the only difference being that
     * it pops elements from the tail of a list instead of popping from the head.
     *
     * @param array $keys    Array containing the keys of the lists
     *                       Or STRING Key1 STRING Key2 STRING Key3 ... STRING Keyn
     * @param int   $timeout Timeout
     *
     * @return  array array('listName', 'element')
     * @link    https://redis.io/commands/brpop
     * @example
     * <pre>
     * // Non blocking feature
     * $redisCluster->lPush('key1', 'A');
     * $redisCluster->del('key2');
     *
     * $redisCluster->blPop('key1', 'key2', 10); // array('key1', 'A')
     * // OR
     * $redisCluster->blPop(array('key1', 'key2'), 10); // array('key1', 'A')
     *
     * $redisCluster->brPop('key1', 'key2', 10); // array('key1', 'A')
     * // OR
     * $redisCluster->brPop(array('key1', 'key2'), 10); // array('key1', 'A')
     *
     * // Blocking feature
     *
     * // process 1
     * $redisCluster->del('key1');
     * $redisCluster->blPop('key1', 10);
     * // blocking for 10 seconds
     *
     * // process 2
     * $redisCluster->lPush('key1', 'A');
     *
     * // process 1
     * // array('key1', 'A') is returned
     * </pre>
     */
    public function brPop(array $keys, $timeout) {}

    /**
     * Adds the string value to the tail (right) of the list if the ist exists. FALSE in case of Failure.
     *
     * @param   string $key
     * @param   string $value String, value to push in key
     *
     * @return  int|false     The new length of the list in case of success, FALSE in case of Failure.
     * @link    https://redis.io/commands/rpushx
     * @example
     * <pre>
     * $redisCluster->del('key1');
     * $redisCluster->rPushx('key1', 'A'); // returns 0
     * $redisCluster->rPush('key1', 'A'); // returns 1
     * $redisCluster->rPushx('key1', 'B'); // returns 2
     * $redisCluster->rPushx('key1', 'C'); // returns 3
     * // key1 now points to the following list: [ 'A', 'B', 'C' ]
     * </pre>
     */
    public function rPushx($key, $value) {}

    /**
     * Adds the string value to the head (left) of the list if the list exists.
     *
     * @param   string $key
     * @param   string $value String, value to push in key
     *
     * @return  int|false     The new length of the list in case of success, FALSE in case of Failure.
     * @link    https://redis.io/commands/lpushx
     * @example
     * <pre>
     * $redisCluster->del('key1');
     * $redisCluster->lPushx('key1', 'A');     // returns 0
     * $redisCluster->lPush('key1', 'A');      // returns 1
     * $redisCluster->lPushx('key1', 'B');     // returns 2
     * $redisCluster->lPushx('key1', 'C');     // returns 3
     * // key1 now points to the following list: [ 'C', 'B', 'A' ]
     * </pre>
     */
    public function lPushx($key, $value) {}

    /**
     * Insert value in the list before or after the pivot value. the parameter options
     * specify the position of the insert (before or after). If the list didn't exists,
     * or the pivot didn't exists, the value is not inserted.
     *
     * @param   string $key
     * @param   string $position RedisCluster::BEFORE | RedisCluster::AFTER
     * @param   string $pivot
     * @param   string $value
     *
     * @return  int     The number of the elements in the list, -1 if the pivot didn't exists.
     * @link    https://redis.io/commands/linsert
     * @example
     * <pre>
     * $redisCluster->del('key1');
     * $redisCluster->lInsert('key1', RedisCluster::AFTER, 'A', 'X');    // 0
     *
     * $redisCluster->lPush('key1', 'A');
     * $redisCluster->lPush('key1', 'B');
     * $redisCluster->lPush('key1', 'C');
     *
     * $redisCluster->lInsert('key1', RedisCluster::BEFORE, 'C', 'X');   // 4
     * $redisCluster->lRange('key1', 0, -1);                      // array('X', 'C', 'B', 'A')
     *
     * $redisCluster->lInsert('key1', RedisCluster::AFTER, 'C', 'Y');    // 5
     * $redisCluster->lRange('key1', 0, -1);                      // array('X', 'C', 'Y', 'B', 'A')
     *
     * $redisCluster->lInsert('key1', RedisCluster::AFTER, 'W', 'value'); // -1
     * </pre>
     */
    public function lInsert($key, $position, $pivot, $value) {}

    /**
     * Return the specified element of the list stored at the specified key.
     * 0 the first element, 1 the second ... -1 the last element, -2 the penultimate ...
     * Return FALSE in case of a bad index or a key that doesn't point to a list.
     *
     * @param string $key
     * @param int    $index
     *
     * @return string|false the element at this index
     * Bool FALSE if the key identifies a non-string data type, or no value corresponds to this index in the list Key.
     * @link    https://redis.io/commands/lindex
     * @example
     * <pre>
     * $redisCluster->rPush('key1', 'A');
     * $redisCluster->rPush('key1', 'B');
     * $redisCluster->rPush('key1', 'C');  // key1 => [ 'A', 'B', 'C' ]
     * $redisCluster->lGet('key1', 0);     // 'A'
     * $redisCluster->lGet('key1', -1);    // 'C'
     * $redisCluster->lGet('key1', 10);    // `FALSE`
     * </pre>
     */
    public function lIndex($key, $index) {}

    /**
     * Removes the first count occurrences of the value element from the list.
     * If count is zero, all the matching elements are removed. If count is negative,
     * elements are removed from tail to head.
     *
     * @param   string $key
     * @param   string $value
     * @param   int    $count
     *
     * @return  int     the number of elements to remove
     * bool FALSE if the value identified by key is not a list.
     * @link    https://redis.io/commands/lrem
     * @example
     * <pre>
     * $redisCluster->lPush('key1', 'A');
     * $redisCluster->lPush('key1', 'B');
     * $redisCluster->lPush('key1', 'C');
     * $redisCluster->lPush('key1', 'A');
     * $redisCluster->lPush('key1', 'A');
     *
     * $redisCluster->lRange('key1', 0, -1);   // array('A', 'A', 'C', 'B', 'A')
     * $redisCluster->lRem('key1', 'A', 2);    // 2
     * $redisCluster->lRange('key1', 0, -1);   // array('C', 'B', 'A')
     * </pre>
     */
    public function lRem($key, $value, $count) {}

    /**
     * A blocking version of rpoplpush, with an integral timeout in the third parameter.
     *
     * @param   string $srcKey
     * @param   string $dstKey
     * @param   int    $timeout
     *
     * @return  string|false  The element that was moved in case of success, FALSE in case of timeout.
     * @link    https://redis.io/commands/brpoplpush
     */
    public function brpoplpush($srcKey, $dstKey, $timeout) {}

    /**
     * Pops a value from the tail of a list, and pushes it to the front of another list.
     * Also return this value.
     *
     * @since   redis >= 1.2
     *
     * @param   string $srcKey
     * @param   string $dstKey
     *
     * @return  string|false  The element that was moved in case of success, FALSE in case of failure.
     * @link    https://redis.io/commands/rpoplpush
     * @example
     * <pre>
     * $redisCluster->del('x', 'y');
     *
     * $redisCluster->lPush('x', 'abc');
     * $redisCluster->lPush('x', 'def');
     * $redisCluster->lPush('y', '123');
     * $redisCluster->lPush('y', '456');
     *
     * // move the last of x to the front of y.
     * var_dump($redisCluster->rpoplpush('x', 'y'));
     * var_dump($redisCluster->lRange('x', 0, -1));
     * var_dump($redisCluster->lRange('y', 0, -1));
     *
     * ////Output:
     * //
     * //string(3) "abc"
     * //array(1) {
     * //  [0]=>
     * //  string(3) "def"
     * //}
     * //array(3) {
     * //  [0]=>
     * //  string(3) "abc"
     * //  [1]=>
     * //  string(3) "456"
     * //  [2]=>
     * //  string(3) "123"
     * //}
     * </pre>
     */
    public function rpoplpush($srcKey, $dstKey) {}

    /**
     * Returns the size of a list identified by Key. If the list didn't exist or is empty,
     * the command returns 0. If the data type identified by Key is not a list, the command return FALSE.
     *
     * @param   string $key
     *
     * @return  int     The size of the list identified by Key exists.
     * bool FALSE if the data type identified by Key is not list
     * @link    https://redis.io/commands/llen
     * @example
     * <pre>
     * $redisCluster->rPush('key1', 'A');
     * $redisCluster->rPush('key1', 'B');
     * $redisCluster->rPush('key1', 'C');  // key1 => [ 'A', 'B', 'C' ]
     * $redisCluster->lLen('key1');       // 3
     * $redisCluster->rPop('key1');
     * $redisCluster->lLen('key1');       // 2
     * </pre>
     */
    public function lLen($key) {}

    /**
     * Returns the set cardinality (number of elements) of the set stored at key.
     *
     * @param   string $key
     *
     * @return  int   the cardinality (number of elements) of the set, or 0 if key does not exist.
     * @link    https://redis.io/commands/scard
     * @example
     * <pre>
     * $redisCluster->sAdd('key1' , 'set1');
     * $redisCluster->sAdd('key1' , 'set2');
     * $redisCluster->sAdd('key1' , 'set3');   // 'key1' => {'set1', 'set2', 'set3'}
     * $redisCluster->sCard('key1');           // 3
     * $redisCluster->sCard('keyX');           // 0
     * </pre>
     */
    public function sCard($key) {}

    /**
     * Returns all the members of the set value stored at key.
     * This has the same effect as running SINTER with one argument key.
     *
     * @param   string $key
     *
     * @return  array   All elements of the set.
     * @link    https://redis.io/commands/smembers
     * @example
     * <pre>
     * $redisCluster->del('s');
     * $redisCluster->sAdd('s', 'a');
     * $redisCluster->sAdd('s', 'b');
     * $redisCluster->sAdd('s', 'a');
     * $redisCluster->sAdd('s', 'c');
     * var_dump($redisCluster->sMembers('s'));
     *
     * ////Output:
     * //
     * //array(3) {
     * //  [0]=>
     * //  string(1) "b"
     * //  [1]=>
     * //  string(1) "c"
     * //  [2]=>
     * //  string(1) "a"
     * //}
     * // The order is random and corresponds to redis' own internal representation of the set structure.
     * </pre>
     */
    public function sMembers($key) {}

    /**
     * Returns if member is a member of the set stored at key.
     *
     * @param   string $key
     * @param   string $value
     *
     * @return  bool    TRUE if value is a member of the set at key key, FALSE otherwise.
     * @link    https://redis.io/commands/sismember
     * @example
     * <pre>
     * $redisCluster->sAdd('key1' , 'set1');
     * $redisCluster->sAdd('key1' , 'set2');
     * $redisCluster->sAdd('key1' , 'set3'); // 'key1' => {'set1', 'set2', 'set3'}
     *
     * $redisCluster->sIsMember('key1', 'set1'); // TRUE
     * $redisCluster->sIsMember('key1', 'setX'); // FALSE
     * </pre>
     */
    public function sIsMember($key, $value) {}

    /**
     * Adds a values to the set value stored at key.
     * If this value is already in the set, FALSE is returned.
     *
     * @param   string $key    Required key
     * @param   string $value1 Required value
     * @param   string $value2 Optional value
     * @param   string $valueN Optional value
     *
     * @return  int|false     The number of elements added to the set
     * @link    https://redis.io/commands/sadd
     * @example
     * <pre>
     * $redisCluster->sAdd('k', 'v1');                // int(1)
     * $redisCluster->sAdd('k', 'v1', 'v2', 'v3');    // int(2)
     * </pre>
     */
    public function sAdd($key, $value1, $value2 = null, $valueN = null) {}

    /**
     * Adds a values to the set value stored at key.
     * If this value is already in the set, FALSE is returned.
     *
     * @param   string $key Required key
     * @param   array  $valueArray
     *
     * @return  int|false     The number of elements added to the set
     * @example
     * <pre>
     * $redisCluster->sAddArray('k', ['v1', 'v2', 'v3']);
     * //This is a feature in php only. Same as $redisCluster->sAdd('k', 'v1', 'v2', 'v3');
     * </pre>
     */
    public function sAddArray($key, array $valueArray) {}

    /**
     * Removes the specified members from the set value stored at key.
     *
     * @param   string $key
     * @param   string $member1
     * @param   string $member2
     * @param   string $memberN
     *
     * @return  int     The number of elements removed from the set.
     * @link    https://redis.io/commands/srem
     * @example
     * <pre>
     * var_dump( $redisCluster->sAdd('k', 'v1', 'v2', 'v3') );    // int(3)
     * var_dump( $redisCluster->sRem('k', 'v2', 'v3') );          // int(2)
     * var_dump( $redisCluster->sMembers('k') );
     * //// Output:
     * // array(1) {
     * //   [0]=> string(2) "v1"
     * // }
     * </pre>
     */
    public function sRem($key, $member1, $member2 = null, $memberN = null) {}

    /**
     * Performs the union between N sets and returns it.
     *
     * @param   string $key1 Any number of keys corresponding to sets in redis.
     * @param   string $key2 ...
     * @param   string $keyN ...
     *
     * @return  array   of strings: The union of all these sets.
     * @link    https://redis.io/commands/sunionstore
     * @example
     * <pre>
     * $redisCluster->del('s0', 's1', 's2');
     *
     * $redisCluster->sAdd('s0', '1');
     * $redisCluster->sAdd('s0', '2');
     * $redisCluster->sAdd('s1', '3');
     * $redisCluster->sAdd('s1', '1');
     * $redisCluster->sAdd('s2', '3');
     * $redisCluster->sAdd('s2', '4');
     *
     * var_dump($redisCluster->sUnion('s0', 's1', 's2'));
     *
     * //// Output:
     * //
     * //array(4) {
     * //  [0]=>
     * //  string(1) "3"
     * //  [1]=>
     * //  string(1) "4"
     * //  [2]=>
     * //  string(1) "1"
     * //  [3]=>
     * //  string(1) "2"
     * //}
     * </pre>
     */
    public function sUnion($key1, $key2, $keyN = null) {}

    /**
     * Performs the same action as sUnion, but stores the result in the first key
     *
     * @param   string $dstKey the key to store the diff into.
     * @param   string $key1   Any number of keys corresponding to sets in redis.
     * @param   string $key2   ...
     * @param   string $keyN   ...
     *
     * @return  int     Any number of keys corresponding to sets in redis.
     * @link    https://redis.io/commands/sunionstore
     * @example
     * <pre>
     * $redisCluster->del('s0', 's1', 's2');
     *
     * $redisCluster->sAdd('s0', '1');
     * $redisCluster->sAdd('s0', '2');
     * $redisCluster->sAdd('s1', '3');
     * $redisCluster->sAdd('s1', '1');
     * $redisCluster->sAdd('s2', '3');
     * $redisCluster->sAdd('s2', '4');
     *
     * var_dump($redisCluster->sUnionStore('dst', 's0', 's1', 's2'));
     * var_dump($redisCluster->sMembers('dst'));
     *
     * //// Output:
     * //
     * //int(4)
     * //array(4) {
     * //  [0]=>
     * //  string(1) "3"
     * //  [1]=>
     * //  string(1) "4"
     * //  [2]=>
     * //  string(1) "1"
     * //  [3]=>
     * //  string(1) "2"
     * //}
     * </pre>
     */
    public function sUnionStore($dstKey, $key1, $key2, $keyN = null) {}

    /**
     * Returns the members of a set resulting from the intersection of all the sets
     * held at the specified keys. If just a single key is specified, then this command
     * produces the members of this set. If one of the keys is missing, FALSE is returned.
     *
     * @param   string $key1 keys identifying the different sets on which we will apply the intersection.
     * @param   string $key2 ...
     * @param   string $keyN ...
     *
     * @return  array contain the result of the intersection between those keys.
     * If the intersection between the different sets is empty, the return value will be empty array.
     * @link    https://redis.io/commands/sinterstore
     * @example
     * <pre>
     * $redisCluster->sAdd('key1', 'val1');
     * $redisCluster->sAdd('key1', 'val2');
     * $redisCluster->sAdd('key1', 'val3');
     * $redisCluster->sAdd('key1', 'val4');
     *
     * $redisCluster->sAdd('key2', 'val3');
     * $redisCluster->sAdd('key2', 'val4');
     *
     * $redisCluster->sAdd('key3', 'val3');
     * $redisCluster->sAdd('key3', 'val4');
     *
     * var_dump($redisCluster->sInter('key1', 'key2', 'key3'));
     *
     * // Output:
     * //
     * //array(2) {
     * //  [0]=>
     * //  string(4) "val4"
     * //  [1]=>
     * //  string(4) "val3"
     * //}
     * </pre>
     */
    public function sInter($key1, $key2, $keyN = null) {}

    /**
     * Performs a sInter command and stores the result in a new set.
     *
     * @param   string $dstKey the key to store the diff into.
     * @param   string $key1   are intersected as in sInter.
     * @param   string $key2   ...
     * @param   string $keyN   ...
     *
     * @return  int|false    The cardinality of the resulting set, or FALSE in case of a missing key.
     * @link    https://redis.io/commands/sinterstore
     * @example
     * <pre>
     * $redisCluster->sAdd('key1', 'val1');
     * $redisCluster->sAdd('key1', 'val2');
     * $redisCluster->sAdd('key1', 'val3');
     * $redisCluster->sAdd('key1', 'val4');
     *
     * $redisCluster->sAdd('key2', 'val3');
     * $redisCluster->sAdd('key2', 'val4');
     *
     * $redisCluster->sAdd('key3', 'val3');
     * $redisCluster->sAdd('key3', 'val4');
     *
     * var_dump($redisCluster->sInterStore('output', 'key1', 'key2', 'key3'));
     * var_dump($redisCluster->sMembers('output'));
     *
     * //// Output:
     * //
     * //int(2)
     * //array(2) {
     * //  [0]=>
     * //  string(4) "val4"
     * //  [1]=>
     * //  string(4) "val3"
     * //}
     * </pre>
     */
    public function sInterStore($dstKey, $key1, $key2, $keyN = null) {}

    /**
     * Performs the difference between N sets and returns it.
     *
     * @param   string $key1 Any number of keys corresponding to sets in redis.
     * @param   string $key2 ...
     * @param   string $keyN ...
     *
     * @return  array   of strings: The difference of the first set will all the others.
     * @link    https://redis.io/commands/sdiff
     * @example
     * <pre>
     * $redisCluster->del('s0', 's1', 's2');
     *
     * $redisCluster->sAdd('s0', '1');
     * $redisCluster->sAdd('s0', '2');
     * $redisCluster->sAdd('s0', '3');
     * $redisCluster->sAdd('s0', '4');
     *
     * $redisCluster->sAdd('s1', '1');
     * $redisCluster->sAdd('s2', '3');
     *
     * var_dump($redisCluster->sDiff('s0', 's1', 's2'));
     *
     * //// Output:
     * //
     * //array(2) {
     * //  [0]=>
     * //  string(1) "4"
     * //  [1]=>
     * //  string(1) "2"
     * //}
     * </pre>
     */
    public function sDiff($key1, $key2, $keyN = null) {}

    /**
     * Performs the same action as sDiff, but stores the result in the first key
     *
     * @param   string $dstKey the key to store the diff into.
     * @param   string $key1   Any number of keys corresponding to sets in redis
     * @param   string $key2   ...
     * @param   string $keyN   ...
     *
     * @return  int|false    The cardinality of the resulting set, or FALSE in case of a missing key.
     * @link    https://redis.io/commands/sdiffstore
     * @example
     * <pre>
     * $redisCluster->del('s0', 's1', 's2');
     *
     * $redisCluster->sAdd('s0', '1');
     * $redisCluster->sAdd('s0', '2');
     * $redisCluster->sAdd('s0', '3');
     * $redisCluster->sAdd('s0', '4');
     *
     * $redisCluster->sAdd('s1', '1');
     * $redisCluster->sAdd('s2', '3');
     *
     * var_dump($redisCluster->sDiffStore('dst', 's0', 's1', 's2'));
     * var_dump($redisCluster->sMembers('dst'));
     *
     * //// Output:
     * //
     * //int(2)
     * //array(2) {
     * //  [0]=>
     * //  string(1) "4"
     * //  [1]=>
     * //  string(1) "2"
     * //}
     * </pre>
     */
    public function sDiffStore($dstKey, $key1, $key2, $keyN = null) {}

    /**
     * Returns a random element(s) from the set value at Key, without removing it.
     *
     * @param   string $key
     * @param   int    $count [optional]
     *
     * @return  string|array  value(s) from the set
     * bool FALSE if set identified by key is empty or doesn't exist and count argument isn't passed.
     * @link    https://redis.io/commands/srandmember
     * @example
     * <pre>
     * $redisCluster->sAdd('key1' , 'one');
     * $redisCluster->sAdd('key1' , 'two');
     * $redisCluster->sAdd('key1' , 'three');              // 'key1' => {'one', 'two', 'three'}
     *
     * var_dump( $redisCluster->sRandMember('key1') );     // 'key1' => {'one', 'two', 'three'}
     *
     * // string(5) "three"
     *
     * var_dump( $redisCluster->sRandMember('key1', 2) );  // 'key1' => {'one', 'two', 'three'}
     *
     * // array(2) {
     * //   [0]=> string(2) "one"
     * //   [1]=> string(2) "three"
     * // }
     * </pre>
     */
    public function sRandMember($key, $count = null) {}

    /**
     * Get the length of a string value.
     *
     * @param   string $key
     *
     * @return  int
     * @link    https://redis.io/commands/strlen
     * @example
     * <pre>
     * $redisCluster->set('key', 'value');
     * $redisCluster->strlen('key'); // 5
     * </pre>
     */
    public function strlen($key) {}

    /**
     * Remove the expiration timer from a key.
     *
     * @param   string $key
     *
     * @return  bool   TRUE if a timeout was removed, FALSE if the key didn’t exist or didn’t have an expiration timer.
     * @link    https://redis.io/commands/persist
     * @example $redisCluster->persist('key');
     */
    public function persist($key) {}

    /**
     * Returns the remaining time to live of a key that has a timeout.
     * This introspection capability allows a Redis client to check how many seconds a given key will continue to be
     * part of the dataset. In Redis 2.6 or older the command returns -1 if the key does not exist or if the key exist
     * but has no associated expire. Starting with Redis 2.8 the return value in case of error changed: Returns -2 if
     * the key does not exist. Returns -1 if the key exists but has no associated expire.
     *
     * @param   string $key
     *
     * @return  int    the time left to live in seconds.
     * @link    https://redis.io/commands/ttl
     * @example $redisCluster->ttl('key');
     */
    public function ttl($key) {}

    /**
     * Returns the remaining time to live of a key that has an expire set,
     * with the sole difference that TTL returns the amount of remaining time in seconds while PTTL returns it in
     * milliseconds. In Redis 2.6 or older the command returns -1 if the key does not exist or if the key exist but has
     * no associated expire. Starting with Redis 2.8 the return value in case of error changed: Returns -2 if the key
     * does not exist. Returns -1 if the key exists but has no associated expire.
     *
     * @param   string $key
     *
     * @return  int     the time left to live in milliseconds.
     * @link    https://redis.io/commands/pttl
     * @example $redisCluster->pttl('key');
     */
    public function pttl($key) {}

    /**
     * Returns the cardinality of an ordered set.
     *
     * @param   string $key
     *
     * @return  int     the set's cardinality
     * @link    https://redis.io/commands/zsize
     * @example
     * <pre>
     * $redisCluster->zAdd('key', 0, 'val0');
     * $redisCluster->zAdd('key', 2, 'val2');
     * $redisCluster->zAdd('key', 10, 'val10');
     * $redisCluster->zCard('key');            // 3
     * </pre>
     */
    public function zCard($key) {}

    /**
     * Returns the number of elements of the sorted set stored at the specified key which have
     * scores in the range [start,end]. Adding a parenthesis before start or end excludes it
     * from the range. +inf and -inf are also valid limits.
     *
     * @param   string $key
     * @param   string $start
     * @param   string $end
     *
     * @return  int     the size of a corresponding zRangeByScore.
     * @link    https://redis.io/commands/zcount
     * @example
     * <pre>
     * $redisCluster->zAdd('key', 0, 'val0');
     * $redisCluster->zAdd('key', 2, 'val2');
     * $redisCluster->zAdd('key', 10, 'val10');
     * $redisCluster->zCount('key', 0, 3); // 2, corresponding to array('val0', 'val2')
     * </pre>
     */
    public function zCount($key, $start, $end) {}

    /**
     * Deletes the elements of the sorted set stored at the specified key which have scores in the range [start,end].
     *
     * @param   string $key
     * @param   string $start double or "+inf" or "-inf" as a string
     * @param   string $end double or "+inf" or "-inf" as a string
     *
     * @return  int             The number of values deleted from the sorted set
     * @link    https://redis.io/commands/zremrangebyscore
     * @example
     * <pre>
     * $redisCluster->zAdd('key', 0, 'val0');
     * $redisCluster->zAdd('key', 2, 'val2');
     * $redisCluster->zAdd('key', 10, 'val10');
     * $redisCluster->zRemRangeByScore('key', '0', '3'); // 2
     * </pre>
     */
    public function zRemRangeByScore($key, $start, $end) {}

    /**
     * Returns the score of a given member in the specified sorted set.
     *
     * @param   string $key
     * @param   string $member
     *
     * @return  float
     * @link    https://redis.io/commands/zscore
     * @example
     * <pre>
     * $redisCluster->zAdd('key', 2.5, 'val2');
     * $redisCluster->zScore('key', 'val2'); // 2.5
     * </pre>
     */
    public function zScore($key, $member) {}

    /**
     * Adds the specified member with a given score to the sorted set stored at key.
     *
     * @param   string $key    Required key
     * @param   float  $score1 Required score
     * @param   string $value1 Required value
     * @param   float  $score2 Optional score
     * @param   string $value2 Optional value
     * @param   float  $scoreN Optional score
     * @param   string $valueN Optional value
     *
     * @return  int     Number of values added
     * @link    https://redis.io/commands/zadd
     * @example
     * <pre>
     * $redisCluster->zAdd('z', 1, 'v2', 2, 'v2', 3, 'v3', 4, 'v4' );  // int(3)
     * $redisCluster->zRem('z', 'v2', 'v3');                           // int(2)
     * var_dump( $redisCluster->zRange('z', 0, -1) );
     *
     * //// Output:
     * // array(1) {
     * //   [0]=> string(2) "v4"
     * // }
     * </pre>
     */
    public function zAdd($key, $score1, $value1, $score2 = null, $value2 = null, $scoreN = null, $valueN = null) {}

    /**
     * Increments the score of a member from a sorted set by a given amount.
     *
     * @param   string $key
     * @param   float  $value (double) value that will be added to the member's score
     * @param   string $member
     *
     * @return  float   the new value
     * @link    https://redis.io/commands/zincrby
     * @example
     * <pre>
     * $redisCluster->del('key');
     * $redisCluster->zIncrBy('key', 2.5, 'member1');// key or member1 didn't exist, so member1's score is to 0 ;
     *                                              //before the increment and now has the value 2.5
     * $redisCluster->zIncrBy('key', 1, 'member1');    // 3.5
     * </pre>
     */
    public function zIncrBy($key, $value, $member) {}

    /**
     * Returns the length of a hash, in number of items
     *
     * @param   string $key
     *
     * @return  int|false     the number of items in a hash, FALSE if the key doesn't exist or isn't a hash.
     * @link    https://redis.io/commands/hlen
     * @example
     * <pre>
     * $redisCluster->del('h');
     * $redisCluster->hSet('h', 'key1', 'hello');
     * $redisCluster->hSet('h', 'key2', 'plop');
     * $redisCluster->hLen('h'); // returns 2
     * </pre>
     */
    public function hLen($key) {}

    /**
     * Returns the keys in a hash, as an array of strings.
     *
     * @param   string $key
     *
     * @return  array   An array of elements, the keys of the hash. This works like PHP's array_keys().
     * @link    https://redis.io/commands/hkeys
     * @example
     * <pre>
     * $redisCluster->del('h');
     * $redisCluster->hSet('h', 'a', 'x');
     * $redisCluster->hSet('h', 'b', 'y');
     * $redisCluster->hSet('h', 'c', 'z');
     * $redisCluster->hSet('h', 'd', 't');
     * var_dump($redisCluster->hKeys('h'));
     *
     * //// Output:
     * //
     * // array(4) {
     * // [0]=>
     * // string(1) "a"
     * // [1]=>
     * // string(1) "b"
     * // [2]=>
     * // string(1) "c"
     * // [3]=>
     * // string(1) "d"
     * // }
     * // The order is random and corresponds to redis' own internal representation of the set structure.
     * </pre>
     */
    public function hKeys($key) {}

    /**
     * Returns the values in a hash, as an array of strings.
     *
     * @param   string $key
     *
     * @return  array   An array of elements, the values of the hash. This works like PHP's array_values().
     * @link    https://redis.io/commands/hvals
     * @example
     * <pre>
     * $redisCluster->del('h');
     * $redisCluster->hSet('h', 'a', 'x');
     * $redisCluster->hSet('h', 'b', 'y');
     * $redisCluster->hSet('h', 'c', 'z');
     * $redisCluster->hSet('h', 'd', 't');
     * var_dump($redisCluster->hVals('h'));
     *
     * //// Output:
     * //
     * // array(4) {
     * //   [0]=>
     * //   string(1) "x"
     * //   [1]=>
     * //   string(1) "y"
     * //   [2]=>
     * //   string(1) "z"
     * //   [3]=>
     * //   string(1) "t"
     * // }
     * // The order is random and corresponds to redis' own internal representation of the set structure.
     * </pre>
     */
    public function hVals($key) {}

    /**
     * Gets a value from the hash stored at key.
     * If the hash table doesn't exist, or the key doesn't exist, FALSE is returned.
     *
     * @param   string $key
     * @param   string $hashKey
     *
     * @return  string|false  The value, if the command executed successfully BOOL FALSE in case of failure
     * @link    https://redis.io/commands/hget
     * @example
     * <pre>
     * $redisCluster->del('h');
     * $redisCluster->hSet('h', 'a', 'x');
     * $redisCluster->hGet('h', 'a'); // 'X'
     * </pre>
     */
    public function hGet($key, $hashKey) {}

    /**
     * Returns the whole hash, as an array of strings indexed by strings.
     *
     * @param   string $key
     *
     * @return  array   An array of elements, the contents of the hash.
     * @link    https://redis.io/commands/hgetall
     * @example
     * <pre>
     * $redisCluster->del('h');
     * $redisCluster->hSet('h', 'a', 'x');
     * $redisCluster->hSet('h', 'b', 'y');
     * $redisCluster->hSet('h', 'c', 'z');
     * $redisCluster->hSet('h', 'd', 't');
     * var_dump($redisCluster->hGetAll('h'));
     *
     * //// Output:
     * //
     * // array(4) {
     * //   ["a"]=>
     * //   string(1) "x"
     * //   ["b"]=>
     * //   string(1) "y"
     * //   ["c"]=>
     * //   string(1) "z"
     * //   ["d"]=>
     * //   string(1) "t"
     * // }
     * // The order is random and corresponds to redis' own internal representation of the set structure.
     * </pre>
     */
    public function hGetAll($key) {}

    /**
     * Verify if the specified member exists in a key.
     *
     * @param   string $key
     * @param   string $hashKey
     *
     * @return  bool   If the member exists in the hash table, return TRUE, otherwise return FALSE.
     * @link    https://redis.io/commands/hexists
     * @example
     * <pre>
     * $redisCluster->hSet('h', 'a', 'x');
     * $redisCluster->hExists('h', 'a');               //  TRUE
     * $redisCluster->hExists('h', 'NonExistingKey');  // FALSE
     * </pre>
     */
    public function hExists($key, $hashKey) {}

    /**
     * Increments the value of a member from a hash by a given amount.
     *
     * @param   string $key
     * @param   string $hashKey
     * @param   int    $value (integer) value that will be added to the member's value
     *
     * @return  int     the new value
     * @link    https://redis.io/commands/hincrby
     * @example
     * <pre>
     * $redisCluster->del('h');
     * $redisCluster->hIncrBy('h', 'x', 2); // returns 2: h[x] = 2 now.
     * $redisCluster->hIncrBy('h', 'x', 1); // h[x] ← 2 + 1. Returns 3
     * </pre>
     */
    public function hIncrBy($key, $hashKey, $value) {}

    /**
     * Adds a value to the hash stored at key. If this value is already in the hash, FALSE is returned.
     *
     * @param string $key
     * @param string $hashKey
     * @param string $value
     *
     * @return int
     * 1 if value didn't exist and was added successfully,
     * 0 if the value was already present and was replaced, FALSE if there was an error.
     * @link    https://redis.io/commands/hset
     * @example
     * <pre>
     * $redisCluster->del('h')
     * $redisCluster->hSet('h', 'key1', 'hello');  // 1, 'key1' => 'hello' in the hash at "h"
     * $redisCluster->hGet('h', 'key1');           // returns "hello"
     *
     * $redisCluster->hSet('h', 'key1', 'plop');   // 0, value was replaced.
     * $redisCluster->hGet('h', 'key1');           // returns "plop"
     * </pre>
     */
    public function hSet($key, $hashKey, $value) {}

    /**
     * Adds a value to the hash stored at key only if this field isn't already in the hash.
     *
     * @param   string $key
     * @param   string $hashKey
     * @param   string $value
     *
     * @return  bool    TRUE if the field was set, FALSE if it was already present.
     * @link    https://redis.io/commands/hsetnx
     * @example
     * <pre>
     * $redisCluster->del('h')
     * $redisCluster->hSetNx('h', 'key1', 'hello'); // TRUE, 'key1' => 'hello' in the hash at "h"
     * $redisCluster->hSetNx('h', 'key1', 'world'); // FALSE, 'key1' => 'hello' in the hash at "h". No change since the
     * field wasn't replaced.
     * </pre>
     */
    public function hSetNx($key, $hashKey, $value) {}

    /**
     * Retrieve the values associated to the specified fields in the hash.
     *
     * @param   string $key
     * @param   array  $hashKeys
     *
     * @return  array   Array An array of elements, the values of the specified fields in the hash,
     * with the hash keys as array keys.
     * @link    https://redis.io/commands/hmget
     * @example
     * <pre>
     * $redisCluster->del('h');
     * $redisCluster->hSet('h', 'field1', 'value1');
     * $redisCluster->hSet('h', 'field2', 'value2');
     * $redisCluster->hMGet('h', array('field1', 'field2')); // returns array('field1' => 'value1', 'field2' =>
     * 'value2')
     * </pre>
     */
    public function hMGet($key, $hashKeys) {}

    /**
     * Fills in a whole hash. Non-string values are converted to string, using the standard (string) cast.
     * NULL values are stored as empty strings
     *
     * @param   string $key
     * @param   array  $hashKeys key → value array
     *
     * @return  bool
     * @link    https://redis.io/commands/hmset
     * @example
     * <pre>
     * $redisCluster->del('user:1');
     * $redisCluster->hMSet('user:1', array('name' => 'Joe', 'salary' => 2000));
     * $redisCluster->hIncrBy('user:1', 'salary', 100); // Joe earns 100 more now.
     * </pre>
     */
    public function hMSet($key, $hashKeys) {}

    /**
     * Removes a values from the hash stored at key.
     * If the hash table doesn't exist, or the key doesn't exist, FALSE is returned.
     *
     * @param   string $key
     * @param   string $hashKey1
     * @param   string $hashKey2
     * @param   string $hashKeyN
     *
     * @return  int     Number of deleted fields
     * @link    https://redis.io/commands/hdel
     * @example
     * <pre>
     * $redisCluster->hMSet('h',
     *               array(
     *                    'f1' => 'v1',
     *                    'f2' => 'v2',
     *                    'f3' => 'v3',
     *                    'f4' => 'v4',
     *               ));
     *
     * var_dump( $redisCluster->hDel('h', 'f1') );        // int(1)
     * var_dump( $redisCluster->hDel('h', 'f2', 'f3') );  // int(2)
     *
     * var_dump( $redisCluster->hGetAll('h') );
     *
     * //// Output:
     * //
     * //  array(1) {
     * //    ["f4"]=> string(2) "v4"
     * //  }
     * </pre>
     */
    public function hDel($key, $hashKey1, $hashKey2 = null, $hashKeyN = null) {}

    /**
     * Increment the float value of a hash field by the given amount
     *
     * @param   string $key
     * @param   string $field
     * @param   float  $increment
     *
     * @return  float
     * @link    https://redis.io/commands/hincrbyfloat
     * @example
     * <pre>
     * $redisCluster->hset('h', 'float', 3);
     * $redisCluster->hset('h', 'int',   3);
     * var_dump( $redisCluster->hIncrByFloat('h', 'float', 1.5) ); // float(4.5)
     *
     * var_dump( $redisCluster->hGetAll('h') );
     *
     * //// Output:
     * //
     * // array(2) {
     * //   ["float"]=>
     * //   string(3) "4.5"
     * //   ["int"]=>
     * //   string(1) "3"
     * // }
     * </pre>
     */
    public function hIncrByFloat($key, $field, $increment) {}

    /**
     * Dump a key out of a redis database, the value of which can later be passed into redis using the RESTORE command.
     * The data that comes out of DUMP is a binary representation of the key as Redis stores it.
     *
     * @param   string $key
     *
     * @return  string|false  The Redis encoded value of the key, or FALSE if the key doesn't exist
     * @link    https://redis.io/commands/dump
     * @example
     * <pre>
     * $redisCluster->set('foo', 'bar');
     * $val = $redisCluster->dump('foo'); // $val will be the Redis encoded key value
     * </pre>
     */
    public function dump($key) {}

    /**
     * Returns the rank of a given member in the specified sorted set, starting at 0 for the item
     * with the smallest score. zRevRank starts at 0 for the item with the largest score.
     *
     * @param   string $key
     * @param   string $member
     *
     * @return  int     the item's score.
     * @link    https://redis.io/commands/zrank
     * @example
     * <pre>
     * $redisCluster->del('z');
     * $redisCluster->zAdd('key', 1, 'one');
     * $redisCluster->zAdd('key', 2, 'two');
     * $redisCluster->zRank('key', 'one');     // 0
     * $redisCluster->zRank('key', 'two');     // 1
     * $redisCluster->zRevRank('key', 'one');  // 1
     * $redisCluster->zRevRank('key', 'two');  // 0
     * </pre>
     */
    public function zRank($key, $member) {}

    /**
     * @see    zRank()
     *
     * @param  string $key
     * @param  string $member
     *
     * @return int    the item's score
     * @link   https://redis.io/commands/zrevrank
     */
    public function zRevRank($key, $member) {}

    /**
     * Increment the number stored at key by one.
     *
     * @param   string $key
     *
     * @return  int    the new value
     * @link    https://redis.io/commands/incr
     * @example
     * <pre>
     * $redisCluster->incr('key1'); // key1 didn't exists, set to 0 before the increment and now has the value 1
     * $redisCluster->incr('key1'); // 2
     * $redisCluster->incr('key1'); // 3
     * $redisCluster->incr('key1'); // 4
     * </pre>
     */
    public function incr($key) {}

    /**
     * Decrement the number stored at key by one.
     *
     * @param   string $key
     *
     * @return  int    the new value
     * @link    https://redis.io/commands/decr
     * @example
     * <pre>
     * $redisCluster->decr('key1'); // key1 didn't exists, set to 0 before the increment and now has the value -1
     * $redisCluster->decr('key1'); // -2
     * $redisCluster->decr('key1'); // -3
     * </pre>
     */
    public function decr($key) {}

    /**
     * Increment the number stored at key by one. If the second argument is filled, it will be used as the integer
     * value of the increment.
     *
     * @param   string $key   key
     * @param   int    $value value that will be added to key (only for incrBy)
     *
     * @return  int         the new value
     * @link    https://redis.io/commands/incrby
     * @example
     * <pre>
     * $redisCluster->incr('key1');        // key1 didn't exists, set to 0 before the increment and now has the value 1
     * $redisCluster->incr('key1');        // 2
     * $redisCluster->incr('key1');        // 3
     * $redisCluster->incr('key1');        // 4
     * $redisCluster->incrBy('key1', 10);  // 14
     * </pre>
     */
    public function incrBy($key, $value) {}

    /**
     * Decrement the number stored at key by one. If the second argument is filled, it will be used as the integer
     * value of the decrement.
     *
     * @param   string $key
     * @param   int    $value that will be subtracted to key (only for decrBy)
     *
     * @return  int       the new value
     * @link    https://redis.io/commands/decrby
     * @example
     * <pre>
     * $redisCluster->decr('key1');        // key1 didn't exists, set to 0 before the increment and now has the value -1
     * $redisCluster->decr('key1');        // -2
     * $redisCluster->decr('key1');        // -3
     * $redisCluster->decrBy('key1', 10);  // -13
     * </pre>
     */
    public function decrBy($key, $value) {}

    /**
     * Increment the float value of a key by the given amount
     *
     * @param   string $key
     * @param   float  $increment
     *
     * @return  float
     * @link    https://redis.io/commands/incrbyfloat
     * @example
     * <pre>
     * $redisCluster->set('x', 3);
     * var_dump( $redisCluster->incrByFloat('x', 1.5) );   // float(4.5)
     *
     * var_dump( $redisCluster->get('x') );                // string(3) "4.5"
     * </pre>
     */
    public function incrByFloat($key, $increment) {}

    /**
     * Sets an expiration date (a timeout) on an item.
     *
     * @param   string $key The key that will disappear.
     * @param   int    $ttl The key's remaining Time To Live, in seconds.
     *
     * @return  bool   TRUE in case of success, FALSE in case of failure.
     * @link    https://redis.io/commands/expire
     * @example
     * <pre>
     * $redisCluster->set('x', '42');
     * $redisCluster->expire('x', 3);  // x will disappear in 3 seconds.
     * sleep(5);                    // wait 5 seconds
     * $redisCluster->get('x');            // will return `FALSE`, as 'x' has expired.
     * </pre>
     */
    public function expire($key, $ttl) {}

    /**
     * Sets an expiration date (a timeout in milliseconds) on an item.
     *
     * @param   string $key The key that will disappear.
     * @param   int    $ttl The key's remaining Time To Live, in milliseconds.
     *
     * @return  bool   TRUE in case of success, FALSE in case of failure.
     * @link    https://redis.io/commands/pexpire
     * @example
     * <pre>
     * $redisCluster->set('x', '42');
     * $redisCluster->pExpire('x', 11500); // x will disappear in 11500 milliseconds.
     * $redisCluster->ttl('x');            // 12
     * $redisCluster->pttl('x');           // 11500
     * </pre>
     */
    public function pExpire($key, $ttl) {}

    /**
     * Sets an expiration date (a timestamp) on an item.
     *
     * @param   string $key       The key that will disappear.
     * @param   int    $timestamp Unix timestamp. The key's date of death, in seconds from Epoch time.
     *
     * @return  bool   TRUE in case of success, FALSE in case of failure.
     * @link    https://redis.io/commands/expireat
     * @example
     * <pre>
     * $redisCluster->set('x', '42');
     * $now = time();               // current timestamp
     * $redisCluster->expireAt('x', $now + 3); // x will disappear in 3 seconds.
     * sleep(5);                        // wait 5 seconds
     * $redisCluster->get('x');                // will return `FALSE`, as 'x' has expired.
     * </pre>
     */
    public function expireAt($key, $timestamp) {}

    /**
     * Sets an expiration date (a timestamp) on an item. Requires a timestamp in milliseconds
     *
     * @param   string $key       The key that will disappear.
     * @param   int    $timestamp Unix timestamp. The key's date of death, in seconds from Epoch time.
     *
     * @return  bool   TRUE in case of success, FALSE in case of failure.
     * @link    https://redis.io/commands/pexpireat
     * @example
     * <pre>
     * $redisCluster->set('x', '42');
     * $redisCluster->pExpireAt('x', 1555555555005);
     * $redisCluster->ttl('x');                       // 218270121
     * $redisCluster->pttl('x');                      // 218270120575
     * </pre>
     */
    public function pExpireAt($key, $timestamp) {}

    /**
     * Append specified string to the string stored in specified key.
     *
     * @param   string $key
     * @param   string $value
     *
     * @return  int    Size of the value after the append
     * @link    https://redis.io/commands/append
     * @example
     * <pre>
     * $redisCluster->set('key', 'value1');
     * $redisCluster->append('key', 'value2'); // 12
     * $redisCluster->get('key');              // 'value1value2'
     * </pre>
     */
    public function append($key, $value) {}

    /**
     * Return a single bit out of a larger string
     *
     * @param   string $key
     * @param   int    $offset
     *
     * @return  int    the bit value (0 or 1)
     * @link    https://redis.io/commands/getbit
     * @example
     * <pre>
     * $redisCluster->set('key', "\x7f");  // this is 0111 1111
     * $redisCluster->getBit('key', 0);    // 0
     * $redisCluster->getBit('key', 1);    // 1
     * </pre>
     */
    public function getBit($key, $offset) {}

    /**
     * Changes a single bit of a string.
     *
     * @param   string   $key
     * @param   int      $offset
     * @param   bool|int $value bool or int (1 or 0)
     *
     * @return  int    0 or 1, the value of the bit before it was set.
     * @link    https://redis.io/commands/setbit
     * @example
     * <pre>
     * $redisCluster->set('key', "*");     // ord("*") = 42 = 0x2f = "0010 1010"
     * $redisCluster->setBit('key', 5, 1); // returns 0
     * $redisCluster->setBit('key', 7, 1); // returns 0
     * $redisCluster->get('key');          // chr(0x2f) = "/" = b("0010 1111")
     * </pre>
     */
    public function setBit($key, $offset, $value) {}

    /**
     * Bitwise operation on multiple keys.
     *
     * @param   string $operation either "AND", "OR", "NOT", "XOR"
     * @param   string $retKey    return key
     * @param   string $key1
     * @param   string $key2
     * @param   string $key3
     *
     * @return  int     The size of the string stored in the destination key.
     * @link    https://redis.io/commands/bitop
     * @example
     * <pre>
     * $redisCluster->set('bit1', '1'); // 11 0001
     * $redisCluster->set('bit2', '2'); // 11 0010
     *
     * $redisCluster->bitOp('AND', 'bit', 'bit1', 'bit2'); // bit = 110000
     * $redisCluster->bitOp('OR',  'bit', 'bit1', 'bit2'); // bit = 110011
     * $redisCluster->bitOp('NOT', 'bit', 'bit1', 'bit2'); // bit = 110011
     * $redisCluster->bitOp('XOR', 'bit', 'bit1', 'bit2'); // bit = 11
     * </pre>
     */
    public function bitOp($operation, $retKey, $key1, $key2, $key3 = null) {}

    /**
     * Return the position of the first bit set to 1 or 0 in a string. The position is returned, thinking of the
     * string as an array of bits from left to right, where the first byte's most significant bit is at position 0,
     * the second byte's most significant bit is at position 8, and so forth.
     *
     * @param   string $key
     * @param   int    $bit
     * @param   int    $start
     * @param   int    $end
     *
     * @return  int     The command returns the position of the first bit set to 1 or 0 according to the request.
     *                  If we look for set bits (the bit argument is 1) and the string is empty or composed of just
     *                  zero bytes, -1 is returned. If we look for clear bits (the bit argument is 0) and the string
     *                  only contains bit set to 1, the function returns the first bit not part of the string on the
     *                  right. So if the string is three bytes set to the value 0xff the command BITPOS key 0 will
     *                  return 24, since up to bit 23 all the bits are 1. Basically, the function considers the right
     *                  of the string as padded with zeros if you look for clear bits and specify no range or the
     *                  start argument only. However, this behavior changes if you are looking for clear bits and
     *                  specify a range with both start and end. If no clear bit is found in the specified range, the
     *                  function returns -1 as the user specified a clear range and there are no 0 bits in that range.
     * @link    https://redis.io/commands/bitpos
     * @example
     * <pre>
     * $redisCluster->set('key', '\xff\xff');
     * $redisCluster->bitpos('key', 1); // int(0)
     * $redisCluster->bitpos('key', 1, 1); // int(8)
     * $redisCluster->bitpos('key', 1, 3); // int(-1)
     * $redisCluster->bitpos('key', 0); // int(16)
     * $redisCluster->bitpos('key', 0, 1); // int(16)
     * $redisCluster->bitpos('key', 0, 1, 5); // int(-1)
     * </pre>
     */
    public function bitpos($key, $bit, $start = 0, $end = null) {}

    /**
     * Count bits in a string.
     *
     * @param   string $key
     *
     * @return  int     The number of bits set to 1 in the value behind the input key.
     * @link    https://redis.io/commands/bitcount
     * @example
     * <pre>
     * $redisCluster->set('bit', '345'); // // 11 0011  0011 0100  0011 0101
     * var_dump( $redisCluster->bitCount('bit', 0, 0) ); // int(4)
     * var_dump( $redisCluster->bitCount('bit', 1, 1) ); // int(3)
     * var_dump( $redisCluster->bitCount('bit', 2, 2) ); // int(4)
     * var_dump( $redisCluster->bitCount('bit', 0, 2) ); // int(11)
     * </pre>
     */
    public function bitCount($key) {}

    /**
     * @see     lIndex()
     *
     * @param   string $key
     * @param   int    $index
     *
     * @link    https://redis.io/commands/lindex
     */
    public function lGet($key, $index) {}

    /**
     * Return a substring of a larger string
     *
     * @param   string $key
     * @param   int    $start
     * @param   int    $end
     *
     * @return  string the substring
     * @link    https://redis.io/commands/getrange
     * @example
     * <pre>
     * $redisCluster->set('key', 'string value');
     * $redisCluster->getRange('key', 0, 5);   // 'string'
     * $redisCluster->getRange('key', -5, -1); // 'value'
     * </pre>
     */
    public function getRange($key, $start, $end) {}

    /**
     * Trims an existing list so that it will contain only a specified range of elements.
     *
     * @param string $key
     * @param int    $start
     * @param int    $stop
     *
     * @return array|false    Bool return FALSE if the key identify a non-list value.
     * @link        https://redis.io/commands/ltrim
     * @example
     * <pre>
     * $redisCluster->rPush('key1', 'A');
     * $redisCluster->rPush('key1', 'B');
     * $redisCluster->rPush('key1', 'C');
     * $redisCluster->lRange('key1', 0, -1); // array('A', 'B', 'C')
     * $redisCluster->lTrim('key1', 0, 1);
     * $redisCluster->lRange('key1', 0, -1); // array('A', 'B')
     * </pre>
     */
    public function lTrim($key, $start, $stop) {}

    /**
     * Returns the specified elements of the list stored at the specified key in
     * the range [start, end]. start and stop are interpretated as indices: 0 the first element,
     * 1 the second ... -1 the last element, -2 the penultimate ...
     *
     * @param   string $key
     * @param   int    $start
     * @param   int    $end
     *
     * @return  array containing the values in specified range.
     * @link    https://redis.io/commands/lrange
     * @example
     * <pre>
     * $redisCluster->rPush('key1', 'A');
     * $redisCluster->rPush('key1', 'B');
     * $redisCluster->rPush('key1', 'C');
     * $redisCluster->lRange('key1', 0, -1); // array('A', 'B', 'C')
     * </pre>
     */
    public function lRange($key, $start, $end) {}

    /**
     * Deletes the elements of the sorted set stored at the specified key which have rank in the range [start,end].
     *
     * @param   string $key
     * @param   int    $start
     * @param   int    $end
     *
     * @return  int     The number of values deleted from the sorted set
     * @link    https://redis.io/commands/zremrangebyrank
     * @example
     * <pre>
     * $redisCluster->zAdd('key', 1, 'one');
     * $redisCluster->zAdd('key', 2, 'two');
     * $redisCluster->zAdd('key', 3, 'three');
     * $redisCluster->zRemRangeByRank('key', 0, 1); // 2
     * $redisCluster->zRange('key', 0, -1, true); // array('three' => 3)
     * </pre>
     */
    public function zRemRangeByRank($key, $start, $end) {}

    /**
     * Publish messages to channels. Warning: this function will probably change in the future.
     *
     * @param   string $channel a channel to publish to
     * @param   string $message string
     *
     * @link    https://redis.io/commands/publish
     * @return  int Number of clients that received the message
     * @example $redisCluster->publish('chan-1', 'hello, world!'); // send message.
     */
    public function publish($channel, $message) {}

    /**
     * Renames a key.
     *
     * @param   string $srcKey
     * @param   string $dstKey
     *
     * @return  bool   TRUE in case of success, FALSE in case of failure.
     * @link    https://redis.io/commands/rename
     * @example
     * <pre>
     * $redisCluster->set('x', '42');
     * $redisCluster->rename('x', 'y');
     * $redisCluster->get('y');   // → 42
     * $redisCluster->get('x');   // → `FALSE`
     * </pre>
     */
    public function rename($srcKey, $dstKey) {}

    /**
     * Renames a key.
     *
     * Same as rename, but will not replace a key if the destination already exists.
     * This is the same behaviour as setNx.
     *
     * @param   string $srcKey
     * @param   string $dstKey
     *
     * @return  bool   TRUE in case of success, FALSE in case of failure.
     * @link    https://redis.io/commands/renamenx
     * @example
     * <pre>
     * $redisCluster->set('x', '42');
     * $redisCluster->renameNx('x', 'y');
     * $redisCluster->get('y');   // → 42
     * $redisCluster->get('x');   // → `FALSE`
     * </pre>
     */
    public function renameNx($srcKey, $dstKey) {}

    /**
     * When called with a single key, returns the approximated cardinality computed by the HyperLogLog data
     * structure stored at the specified variable, which is 0 if the variable does not exist.
     *
     * @param   string|array $key
     *
     * @return  int
     * @link    https://redis.io/commands/pfcount
     * @example
     * <pre>
     * $redisCluster->pfAdd('key1', array('elem1', 'elem2'));
     * $redisCluster->pfAdd('key2', array('elem3', 'elem2'));
     * $redisCluster->pfCount('key1'); // int(2)
     * $redisCluster->pfCount(array('key1', 'key2')); // int(3)
     * </pre>
     */
    public function pfCount($key) {}

    /**
     * Adds all the element arguments to the HyperLogLog data structure stored at the key.
     *
     * @param   string $key
     * @param   array  $elements
     *
     * @return  bool
     * @link    https://redis.io/commands/pfadd
     * @example $redisCluster->pfAdd('key', array('elem1', 'elem2'))
     */
    public function pfAdd($key, array $elements) {}

    /**
     * Merge multiple HyperLogLog values into an unique value that will approximate the cardinality
     * of the union of the observed Sets of the source HyperLogLog structures.
     *
     * @param   string $destKey
     * @param   array  $sourceKeys
     *
     * @return  bool
     * @link    https://redis.io/commands/pfmerge
     * @example
     * <pre>
     * $redisCluster->pfAdd('key1', array('elem1', 'elem2'));
     * $redisCluster->pfAdd('key2', array('elem3', 'elem2'));
     * $redisCluster->pfMerge('key3', array('key1', 'key2'));
     * $redisCluster->pfCount('key3'); // int(3)
     * </pre>
     */
    public function pfMerge($destKey, array $sourceKeys) {}

    /**
     * Changes a substring of a larger string.
     *
     * @param   string $key
     * @param   int    $offset
     * @param   string $value
     *
     * @return  string the length of the string after it was modified.
     * @link    https://redis.io/commands/setrange
     * @example
     * <pre>
     * $redisCluster->set('key', 'Hello world');
     * $redisCluster->setRange('key', 6, "redis"); // returns 11
     * $redisCluster->get('key');                  // "Hello redis"
     * </pre>
     */
    public function setRange($key, $offset, $value) {}

    /**
     * Restore a key from the result of a DUMP operation.
     *
     * @param   string $key   The key name
     * @param   int    $ttl   How long the key should live (if zero, no expire will be set on the key)
     * @param   string $value (binary).  The Redis encoded key value (from DUMP)
     *
     * @return  bool
     * @link    https://redis.io/commands/restore
     * @example
     * <pre>
     * $redisCluster->set('foo', 'bar');
     * $val = $redisCluster->dump('foo');
     * $redisCluster->restore('bar', 0, $val); // The key 'bar', will now be equal to the key 'foo'
     * </pre>
     */
    public function restore($key, $ttl, $value) {}

    /**
     * Moves the specified member from the set at srcKey to the set at dstKey.
     *
     * @param   string $srcKey
     * @param   string $dstKey
     * @param   string $member
     *
     * @return  bool    If the operation is successful, return TRUE.
     * If the srcKey and/or dstKey didn't exist, and/or the member didn't exist in srcKey, FALSE is returned.
     * @link    https://redis.io/commands/smove
     * @example
     * <pre>
     * $redisCluster->sAdd('key1' , 'set11');
     * $redisCluster->sAdd('key1' , 'set12');
     * $redisCluster->sAdd('key1' , 'set13');          // 'key1' => {'set11', 'set12', 'set13'}
     * $redisCluster->sAdd('key2' , 'set21');
     * $redisCluster->sAdd('key2' , 'set22');          // 'key2' => {'set21', 'set22'}
     * $redisCluster->sMove('key1', 'key2', 'set13');  // 'key1' =>  {'set11', 'set12'}
     *                                          // 'key2' =>  {'set21', 'set22', 'set13'}
     * </pre>
     */
    public function sMove($srcKey, $dstKey, $member) {}

    /**
     * Returns a range of elements from the ordered set stored at the specified key,
     * with values in the range [start, end]. start and stop are interpreted as zero-based indices:
     * 0 the first element,
     * 1 the second ...
     * -1 the last element,
     * -2 the penultimate ...
     *
     * @param   string $key
     * @param   int    $start
     * @param   int    $end
     * @param   bool   $withscores
     *
     * @return  array   Array containing the values in specified range.
     * @link    https://redis.io/commands/zrange
     * @example
     * <pre>
     * $redisCluster->zAdd('key1', 0, 'val0');
     * $redisCluster->zAdd('key1', 2, 'val2');
     * $redisCluster->zAdd('key1', 10, 'val10');
     * $redisCluster->zRange('key1', 0, -1); // array('val0', 'val2', 'val10')
     * // with scores
     * $redisCluster->zRange('key1', 0, -1, true); // array('val0' => 0, 'val2' => 2, 'val10' => 10)
     * </pre>
     */
    public function zRange($key, $start, $end, $withscores = null) {}

    /**
     * Returns the elements of the sorted set stored at the specified key in the range [start, end]
     * in reverse order. start and stop are interpretated as zero-based indices:
     * 0 the first element,
     * 1 the second ...
     * -1 the last element,
     * -2 the penultimate ...
     *
     * @param   string $key
     * @param   int    $start
     * @param   int    $end
     * @param   bool   $withscore
     *
     * @return  array   Array containing the values in specified range.
     * @link    https://redis.io/commands/zrevrange
     * @example
     * <pre>
     * $redisCluster->zAdd('key', 0, 'val0');
     * $redisCluster->zAdd('key', 2, 'val2');
     * $redisCluster->zAdd('key', 10, 'val10');
     * $redisCluster->zRevRange('key', 0, -1); // array('val10', 'val2', 'val0')
     *
     * // with scores
     * $redisCluster->zRevRange('key', 0, -1, true); // array('val10' => 10, 'val2' => 2, 'val0' => 0)
     * </pre>
     */
    public function zRevRange($key, $start, $end, $withscore = null) {}

    /**
     * Returns the elements of the sorted set stored at the specified key which have scores in the
     * range [start,end]. Adding a parenthesis before start or end excludes it from the range.
     * +inf and -inf are also valid limits.
     *
     * zRevRangeByScore returns the same items in reverse order, when the start and end parameters are swapped.
     *
     * @param   string $key
     * @param   int    $start
     * @param   int    $end
     * @param   array  $options Two options are available:
     *                          - withscores => TRUE,
     *                          - and limit => array($offset, $count)
     *
     * @return  array   Array containing the values in specified range.
     * @link    https://redis.io/commands/zrangebyscore
     * @example
     * <pre>
     * $redisCluster->zAdd('key', 0, 'val0');
     * $redisCluster->zAdd('key', 2, 'val2');
     * $redisCluster->zAdd('key', 10, 'val10');
     * $redisCluster->zRangeByScore('key', 0, 3);
     * // array('val0', 'val2')
     * $redisCluster->zRangeByScore('key', 0, 3, array('withscores' => TRUE);
     * // array('val0' => 0, 'val2' => 2)
     * $redisCluster->zRangeByScore('key', 0, 3, array('limit' => array(1, 1));
     * // array('val2' => 2)
     * $redisCluster->zRangeByScore('key', 0, 3, array('limit' => array(1, 1));
     * // array('val2')
     * $redisCluster->zRangeByScore('key', 0, 3, array('withscores' => TRUE, 'limit' => array(1, 1));
     * // array('val2'=> 2)
     * </pre>
     */
    public function zRangeByScore($key, $start, $end, array $options = []) {}

    /**
     * @see zRangeByScore()
     *
     * @param   string $key
     * @param   int    $start
     * @param   int    $end
     * @param   array  $options
     *
     * @return    array
     */
    public function zRevRangeByScore($key, $start, $end, array $options = []) {}

    /**
     * Returns a range of members in a sorted set, by lexicographical range
     *
     * @param   string $key    The ZSET you wish to run against.
     * @param   int    $min    The minimum alphanumeric value you wish to get.
     * @param   int    $max    The maximum alphanumeric value you wish to get.
     * @param   int    $offset Optional argument if you wish to start somewhere other than the first element.
     * @param   int    $limit  Optional argument if you wish to limit the number of elements returned.
     *
     * @return  array   Array containing the values in the specified range.
     * @link    https://redis.io/commands/zrangebylex
     * @example
     * <pre>
     * foreach (array('a', 'b', 'c', 'd', 'e', 'f', 'g') as $k => $char) {
     *     $redisCluster->zAdd('key', $k, $char);
     * }
     *
     * $redisCluster->zRangeByLex('key', '-', '[c'); // array('a', 'b', 'c')
     * $redisCluster->zRangeByLex('key', '-', '(c'); // array('a', 'b')
     * $redisCluster->zRevRangeByLex('key', '(c','-'); // array('b', 'a')
     * </pre>
     */
    public function zRangeByLex($key, $min, $max, $offset = null, $limit = null) {}

    /**
     * @see     zRangeByLex()
     *
     * @param   string $key
     * @param   int    $min
     * @param   int    $max
     * @param   int    $offset
     * @param   int    $limit
     *
     * @return  array
     * @link    https://redis.io/commands/zrevrangebylex
     */
    public function zRevRangeByLex($key, $min, $max, $offset = null, $limit = null) {}

    /**
     * Count the number of members in a sorted set between a given lexicographical range.
     *
     * @param   string $key
     * @param   int    $min
     * @param   int    $max
     *
     * @return  int The number of elements in the specified score range.
     * @link    https://redis.io/commands/zlexcount
     * @example
     * <pre>
     * foreach (array('a', 'b', 'c', 'd', 'e', 'f', 'g') as $k => $char) {
     *     $redisCluster->zAdd('key', $k, $char);
     * }
     * $redisCluster->zLexCount('key', '[b', '[f'); // 5
     * </pre>
     */
    public function zLexCount($key, $min, $max) {}

    /**
     * Remove all members in a sorted set between the given lexicographical range.
     *
     * @param  string  $key  The ZSET you wish to run against.
     * @param  string  $min  The minimum alphanumeric value you wish to get.
     * @param  string  $max  The maximum alphanumeric value you wish to get.
     *
     * @return  int|false    the number of elements removed.
     * @link    https://redis.io/commands/zremrangebylex
     * @example
     * <pre>
     * foreach (array('a', 'b', 'c', 'd', 'e', 'f', 'g') as $k => $char) {
     *     $redisCluster->zAdd('key', $k, $char);
     * }
     * $redisCluster->zRemRangeByLex('key', '(b','[d'); // 2 , remove element 'c' and 'd'
     * $redisCluster->zRange('key',0,-1);// array('a','b','e','f','g')
     * </pre>
     */
    public function zRemRangeByLex(string $key, string $min, string $max) {}

    /**
     * Add multiple sorted sets and store the resulting sorted set in a new key
     *
     * @param string $Output
     * @param array  $ZSetKeys
     * @param null|array $Weights
     * @param string $aggregateFunction Either "SUM", "MIN", or "MAX": defines the behaviour to use on
     *                                  duplicate entries during the zUnion.
     *
     * @return int The number of values in the new sorted set.
     * @link    https://redis.io/commands/zunionstore
     * @example
     * <pre>
     * $redisCluster->del('k1');
     * $redisCluster->del('k2');
     * $redisCluster->del('k3');
     * $redisCluster->del('ko1');
     * $redisCluster->del('ko2');
     * $redisCluster->del('ko3');
     *
     * $redisCluster->zAdd('k1', 0, 'val0');
     * $redisCluster->zAdd('k1', 1, 'val1');
     *
     * $redisCluster->zAdd('k2', 2, 'val2');
     * $redisCluster->zAdd('k2', 3, 'val3');
     *
     * $redisCluster->zUnionStore('ko1', array('k1', 'k2')); // 4, 'ko1' => array('val0', 'val1', 'val2', 'val3')
     *
     * // Weighted zUnionStore
     * $redisCluster->zUnionStore('ko2', array('k1', 'k2'), array(1, 1)); // 4, 'ko2' => array('val0', 'val1', 'val2','val3')
     * $redisCluster->zUnionStore('ko3', array('k1', 'k2'), array(5, 1)); // 4, 'ko3' => array('val0', 'val2', 'val3','val1')
     * </pre>
     */
    public function zUnionStore($Output, $ZSetKeys, ?array $Weights = null, $aggregateFunction = 'SUM') {}

    /**
     * Intersect multiple sorted sets and store the resulting sorted set in a new key
     *
     * @param   string $Output
     * @param   array  $ZSetKeys
     * @param   null|array $Weights
     * @param   string $aggregateFunction Either "SUM", "MIN", or "MAX":
     *                                    defines the behaviour to use on duplicate entries during the zInterStore.
     *
     * @return  int     The number of values in the new sorted set.
     * @link    https://redis.io/commands/zinterstore
     * @example
     * <pre>
     * $redisCluster->del('k1');
     * $redisCluster->del('k2');
     * $redisCluster->del('k3');
     *
     * $redisCluster->del('ko1');
     * $redisCluster->del('ko2');
     * $redisCluster->del('ko3');
     * $redisCluster->del('ko4');
     *
     * $redisCluster->zAdd('k1', 0, 'val0');
     * $redisCluster->zAdd('k1', 1, 'val1');
     * $redisCluster->zAdd('k1', 3, 'val3');
     *
     * $redisCluster->zAdd('k2', 2, 'val1');
     * $redisCluster->zAdd('k2', 3, 'val3');
     *
     * $redisCluster->zInterStore('ko1', array('k1', 'k2'));               // 2, 'ko1' => array('val1', 'val3')
     * $redisCluster->zInterStore('ko2', array('k1', 'k2'), array(1, 1));  // 2, 'ko2' => array('val1', 'val3')
     *
     * // Weighted zInterStore
     * $redisCluster->zInterStore('ko3', array('k1', 'k2'), array(1, 5), 'min'); // 2, 'ko3' => array('val1', 'val3')
     * $redisCluster->zInterStore('ko4', array('k1', 'k2'), array(1, 5), 'max'); // 2, 'ko4' => array('val3', 'val1')
     * </pre>
     */
    public function zInterStore($Output, $ZSetKeys, array $Weights = null, $aggregateFunction = 'SUM') {}

    /**
     * Deletes a specified member from the ordered set.
     *
     * @param   string $key
     * @param   string $member1
     * @param   string $member2
     * @param   string $memberN
     *
     * @return  int     Number of deleted values
     * @link    https://redis.io/commands/zrem
     * @example
     * <pre>
     * $redisCluster->zAdd('z', 1, 'v1', 2, 'v2', 3, 'v3', 4, 'v4' );  // int(2)
     * $redisCluster->zRem('z', 'v2', 'v3');                           // int(2)
     * var_dump( $redisCluster->zRange('z', 0, -1) );
     * //// Output:
     * //
     * // array(2) {
     * //   [0]=> string(2) "v1"
     * //   [1]=> string(2) "v4"
     * // }
     * </pre>
     */
    public function zRem($key, $member1, $member2 = null, $memberN = null) {}

    /**
     * Sort
     *
     * @param   string $key
     * @param   array  $option array(key => value, ...) - optional, with the following keys and values:
     *                         - 'by' => 'some_pattern_*',
     *                         - 'limit' => array(0, 1),
     *                         - 'get' => 'some_other_pattern_*' or an array of patterns,
     *                         - 'sort' => 'asc' or 'desc',
     *                         - 'alpha' => TRUE,
     *                         - 'store' => 'external-key'
     *
     * @return  array
     * An array of values, or a number corresponding to the number of elements stored if that was used.
     * @link    https://redis.io/commands/sort
     * @example
     * <pre>
     * $redisCluster->del('s');
     * $redisCluster->sadd('s', 5);
     * $redisCluster->sadd('s', 4);
     * $redisCluster->sadd('s', 2);
     * $redisCluster->sadd('s', 1);
     * $redisCluster->sadd('s', 3);
     *
     * var_dump($redisCluster->sort('s')); // 1,2,3,4,5
     * var_dump($redisCluster->sort('s', array('sort' => 'desc'))); // 5,4,3,2,1
     * var_dump($redisCluster->sort('s', array('sort' => 'desc', 'store' => 'out'))); // (int)5
     * </pre>
     */
    public function sort($key, $option = null) {}

    /**
     * Describes the object pointed to by a key.
     * The information to retrieve (string) and the key (string).
     * Info can be one of the following:
     * - "encoding"
     * - "refcount"
     * - "idletime"
     *
     * @param   string $string
     * @param   string $key
     *
     * @return  string|false  for "encoding", int for "refcount" and "idletime", FALSE if the key doesn't exist.
     * @link    https://redis.io/commands/object
     * @example
     * <pre>
     * $redisCluster->object("encoding", "l"); // → ziplist
     * $redisCluster->object("refcount", "l"); // → 1
     * $redisCluster->object("idletime", "l"); // → 400 (in seconds, with a precision of 10 seconds).
     * </pre>
     */
    public function object($string = '', $key = '') {}

    /**
     * Subscribe to channels. Warning: this function will probably change in the future.
     *
     * @param array        $channels an array of channels to subscribe to
     * @param string|array $callback either a string or an array($instance, 'method_name').
     *                                 The callback function receives 3 parameters: the redis instance, the channel
     *                                 name, and the message.
     *
     * @return mixed            Any non-null return value in the callback will be returned to the caller.
     * @link    https://redis.io/commands/subscribe
     * @example
     * <pre>
     * function f($redisCluster, $chan, $msg) {
     *  switch($chan) {
     *      case 'chan-1':
     *          ...
     *          break;
     *
     *      case 'chan-2':
     *                     ...
     *          break;
     *
     *      case 'chan-2':
     *          ...
     *          break;
     *      }
     * }
     *
     * $redisCluster->subscribe(array('chan-1', 'chan-2', 'chan-3'), 'f'); // subscribe to 3 chans
     * </pre>
     */
    public function subscribe($channels, $callback) {}

    /**
     * Subscribe to channels by pattern
     *
     * @param   array        $patterns     The number of elements removed from the set.
     * @param   string|array $callback     Either a string or an array with an object and method.
     *                                       The callback will get four arguments ($redis, $pattern, $channel, $message)
     *
     * @return  mixed           Any non-null return value in the callback will be returned to the caller.
     *
     * @link    https://redis.io/commands/psubscribe
     * @example
     * <pre>
     * function psubscribe($redisCluster, $pattern, $chan, $msg) {
     *  echo "Pattern: $pattern\n";
     *  echo "Channel: $chan\n";
     *  echo "Payload: $msg\n";
     * }
     * </pre>
     */
    public function psubscribe($patterns, $callback) {}

    /**
     * Unsubscribes the client from the given channels, or from all of them if none is given.
     *
     * @param $channels
     * @param $callback
     */
    public function unSubscribe($channels, $callback) {}

    /**
     * Unsubscribes the client from the given patterns, or from all of them if none is given.
     *
     * @param $channels
     * @param $callback
     */
    public function punSubscribe($channels, $callback) {}

    /**
     * Evaluate a LUA script serverside, from the SHA1 hash of the script instead of the script itself.
     * In order to run this command Redis will have to have already loaded the script, either by running it or via
     * the SCRIPT LOAD command.
     *
     * @param   string $scriptSha
     * @param   array  $args
     * @param   int    $numKeys
     *
     * @return  mixed   @see eval()
     * @see     eval()
     * @link    https://redis.io/commands/evalsha
     * @example
     * <pre>
     * $script = 'return 1';
     * $sha = $redisCluster->script('load', $script);
     * $redisCluster->evalSha($sha); // Returns 1
     * </pre>
     */
    public function evalSha($scriptSha, $args = [], $numKeys = 0) {}

    /**
     * Scan the keyspace for keys.
     *
     * @param  int          &$iterator Iterator, initialized to NULL.
     * @param  string|array $node      Node identified by key or host/port array
     * @param  string       $pattern   Pattern to match.
     * @param  int          $count     Count of keys per iteration (only a suggestion to Redis).
     *
     * @return array|false             This function will return an array of keys or FALSE if there are no more keys.
     * @link   https://redis.io/commands/scan
     * @example
     * <pre>
     * $iterator = null;
     * while($keys = $redisCluster->scan($iterator)) {
     *     foreach($keys as $key) {
     *         echo $key . PHP_EOL;
     *     }
     * }
     * </pre>
     */
    public function scan(&$iterator, $node, $pattern = null, $count = 0) {}

    /**
     * Scan a set for members.
     *
     * @param   string $key      The set to search.
     * @param   int    &$iterator LONG (reference) to the iterator as we go.
     * @param   null   $pattern  String, optional pattern to match against.
     * @param   int    $count    How many members to return at a time (Redis might return a different amount).
     *
     * @return  array|false   PHPRedis will return an array of keys or FALSE when we're done iterating.
     * @link    https://redis.io/commands/sscan
     * @example
     * <pre>
     * $iterator = null;
     * while ($members = $redisCluster->sScan('set', $iterator)) {
     *     foreach ($members as $member) {
     *         echo $member . PHP_EOL;
     *     }
     * }
     * </pre>
     */
    public function sScan($key, &$iterator, $pattern = null, $count = 0) {}

    /**
     * Scan a sorted set for members, with optional pattern and count.
     *
     * @param   string $key      String, the set to scan.
     * @param   int    &$iterator Long (reference), initialized to NULL.
     * @param   string $pattern  String (optional), the pattern to match.
     * @param   int    $count    How many keys to return per iteration (Redis might return a different number).
     *
     * @return  array|false   PHPRedis will return matching keys from Redis, or FALSE when iteration is complete.
     * @link    https://redis.io/commands/zscan
     * @example
     * <pre>
     * $iterator = null;
     * while ($members = $redis-zscan('zset', $iterator)) {
     *     foreach ($members as $member => $score) {
     *         echo $member . ' => ' . $score . PHP_EOL;
     *     }
     * }
     * </pre>
     */
    public function zScan($key, &$iterator, $pattern = null, $count = 0) {}

    /**
     * Scan a HASH value for members, with an optional pattern and count.
     *
     * @param   string $key
     * @param   int    &$iterator
     * @param   string $pattern Optional pattern to match against.
     * @param   int    $count   How many keys to return in a go (only a sugestion to Redis).
     *
     * @return  array     An array of members that match our pattern.
     * @link    https://redis.io/commands/hscan
     * @example
     * <pre>
     * $iterator = null;
     * while($elements = $redisCluster->hscan('hash', $iterator)) {
     *    foreach($elements as $key => $value) {
     *         echo $key . ' => ' . $value . PHP_EOL;
     *     }
     * }
     * </pre>
     */
    public function hScan($key, &$iterator, $pattern = null, $count = 0) {}

    /**
     * Detect whether we're in ATOMIC/MULTI/PIPELINE mode.
     *
     * @return  int     Either RedisCluster::ATOMIC, RedisCluster::MULTI or RedisCluster::PIPELINE
     * @example $redisCluster->getMode();
     */
    public function getMode() {}

    /**
     * The last error message (if any)
     *
     * @return  string|null  A string with the last returned script based error message, or NULL if there is no error
     * @example
     * <pre>
     * $redisCluster->eval('this-is-not-lua');
     * $err = $redisCluster->getLastError();
     * // "ERR Error compiling script (new function): user_script:1: '=' expected near '-'"
     * </pre>
     */
    public function getLastError() {}

    /**
     * Clear the last error message
     *
     * @return bool true
     * @example
     * <pre>
     * $redisCluster->set('x', 'a');
     * $redisCluster->incr('x');
     * $err = $redisCluster->getLastError();
     * // "ERR value is not an integer or out of range"
     * $redisCluster->clearLastError();
     * $err = $redisCluster->getLastError();
     * // NULL
     * </pre>
     */
    public function clearLastError() {}

    /**
     * Get client option
     *
     * @param   int $option parameter
     *
     * @return  int|string     Parameter value.
     * @example
     * // return RedisCluster::SERIALIZER_NONE, RedisCluster::SERIALIZER_PHP, or RedisCluster::SERIALIZER_IGBINARY.
     * $redisCluster->getOption(RedisCluster::OPT_SERIALIZER);
     */
    public function getOption($option) {}

    /**
     * Set client option.
     *
     * @param   int        $option parameter
     * @param   int|string $value  parameter value
     *
     * @return  bool   TRUE on success, FALSE on error.
     * @example
     * <pre>
     * $redisCluster->setOption(RedisCluster::OPT_SERIALIZER, RedisCluster::SERIALIZER_NONE);        // don't serialize data
     * $redisCluster->setOption(RedisCluster::OPT_SERIALIZER, RedisCluster::SERIALIZER_PHP);         // use built-in serialize/unserialize
     * $redisCluster->setOption(RedisCluster::OPT_SERIALIZER, RedisCluster::SERIALIZER_IGBINARY);    // use igBinary serialize/unserialize
     * $redisCluster->setOption(RedisCluster::OPT_PREFIX, 'myAppName:');                             // use custom prefix on all keys
     * </pre>
     */
    public function setOption($option, $value) {}

    /**
     * A utility method to prefix the value with the prefix setting for phpredis.
     *
     * @param   mixed $value The value you wish to prefix
     *
     * @return  string  If a prefix is set up, the value now prefixed.  If there is no prefix, the value will be returned unchanged.
     * @example
     * <pre>
     * $redisCluster->setOption(RedisCluster::OPT_PREFIX, 'my-prefix:');
     * $redisCluster->_prefix('my-value'); // Will return 'my-prefix:my-value'
     * </pre>
     */
    public function _prefix($value) {}

    /**
     * A utility method to serialize values manually. This method allows you to serialize a value with whatever
     * serializer is configured, manually. This can be useful for serialization/unserialization of data going in
     * and out of EVAL commands as phpredis can't automatically do this itself.  Note that if no serializer is
     * set, phpredis will change Array values to 'Array', and Objects to 'Object'.
     *
     * @param   mixed $value The value to be serialized.
     *
     * @return  mixed
     * @example
     * <pre>
     * $redisCluster->setOption(RedisCluster::OPT_SERIALIZER, RedisCluster::SERIALIZER_NONE);
     * $redisCluster->_serialize("foo"); // returns "foo"
     * $redisCluster->_serialize(Array()); // Returns "Array"
     * $redisCluster->_serialize(new stdClass()); // Returns "Object"
     *
     * $redisCluster->setOption(RedisCluster::OPT_SERIALIZER, RedisCluster::SERIALIZER_PHP);
     * $redisCluster->_serialize("foo"); // Returns 's:3:"foo";'
     * </pre>
     */
    public function _serialize($value) {}

    /**
     * A utility method to unserialize data with whatever serializer is set up.  If there is no serializer set, the
     * value will be returned unchanged.  If there is a serializer set up, and the data passed in is malformed, an
     * exception will be thrown. This can be useful if phpredis is serializing values, and you return something from
     * redis in a LUA script that is serialized.
     *
     * @param   string $value The value to be unserialized
     *
     * @return mixed
     * @example
     * <pre>
     * $redisCluster->setOption(RedisCluster::OPT_SERIALIZER, RedisCluster::SERIALIZER_PHP);
     * $redisCluster->_unserialize('a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}'); // Will return Array(1,2,3)
     * </pre>
     */
    public function _unserialize($value) {}

    /**
     * Return all redis master nodes
     *
     * @return array
     * @example
     * <pre>
     * $redisCluster->_masters(); // Will return [[0=>'127.0.0.1','6379'],[0=>'127.0.0.1','6380']]
     * </pre>
     */
    public function _masters() {}

    /**
     * Enter and exit transactional mode.
     *
     * @param int $mode RedisCluster::MULTI|RedisCluster::PIPELINE
     *            Defaults to RedisCluster::MULTI.
     *            A RedisCluster::MULTI block of commands runs as a single transaction;
     *            a RedisCluster::PIPELINE block is simply transmitted faster to the server, but without any guarantee
     *            of atomicity. discard cancels a transaction.
     *
     * @return RedisCluster returns the RedisCluster instance and enters multi-mode.
     * Once in multi-mode, all subsequent method calls return the same object until exec() is called.
     * @link    https://redis.io/commands/multi
     * @example
     * <pre>
     * $ret = $redisCluster->multi()
     *      ->set('key1', 'val1')
     *      ->get('key1')
     *      ->set('key2', 'val2')
     *      ->get('key2')
     *      ->exec();
     *
     * //$ret == array (
     * //    0 => TRUE,
     * //    1 => 'val1',
     * //    2 => TRUE,
     * //    3 => 'val2');
     * </pre>
     */
    public function multi($mode = RedisCluster::MULTI) {}

    /**
     * @see     multi()
     * @return void|array
     * @link    https://redis.io/commands/exec
     */
    public function exec() {}

    /**
     * @see     multi()
     * @link    https://redis.io/commands/discard
     */
    public function discard() {}

    /**
     * Watches a key for modifications by another client. If the key is modified between WATCH and EXEC,
     * the MULTI/EXEC transaction will fail (return FALSE). unwatch cancels all the watching of all keys by this client.
     *
     * @param string|array $key : a list of keys
     *
     * @return void
     * @link    https://redis.io/commands/watch
     * @example
     * <pre>
     * $redisCluster->watch('x');
     * // long code here during the execution of which other clients could well modify `x`
     * $ret = $redisCluster->multi()
     *          ->incr('x')
     *          ->exec();
     * // $ret = FALSE if x has been modified between the call to WATCH and the call to EXEC.
     * </pre>
     */
    public function watch($key) {}

    /**
     * @see     watch()
     * @link    https://redis.io/commands/unwatch
     */
    public function unwatch() {}

    /**
     * Performs a synchronous save at a specific node.
     *
     * @param string|array $nodeParams key or [host,port]
     *
     * @return  bool   TRUE in case of success, FALSE in case of failure.
     * If a save is already running, this command will fail and return FALSE.
     * @link    https://redis.io/commands/save
     * @example
     * $redisCluster->save('x'); //key
     * $redisCluster->save(['127.0.0.1',6379]); //[host,port]
     */
    public function save($nodeParams) {}

    /**
     * Performs a background save at a specific node.
     *
     * @param string|array $nodeParams key or [host,port]
     *
     * @return  bool    TRUE in case of success, FALSE in case of failure.
     * If a save is already running, this command will fail and return FALSE.
     * @link    https://redis.io/commands/bgsave
     */
    public function bgsave($nodeParams) {}

    /**
     * Removes all entries from the current database at a specific node.
     *
     * @param string|array $nodeParams key or [host,port]
     *
     * @return  bool Always TRUE.
     * @link    https://redis.io/commands/flushdb
     */
    public function flushDB($nodeParams) {}

    /**
     * Removes all entries from all databases at a specific node.
     *
     * @param string|array $nodeParams key or [host,port]
     *
     * @return  bool Always TRUE.
     * @link    https://redis.io/commands/flushall
     */
    public function flushAll($nodeParams) {}

    /**
     * Returns the current database's size at a specific node.
     *
     * @param string|array $nodeParams key or [host,port]
     *
     * @return int     DB size, in number of keys.
     * @link    https://redis.io/commands/dbsize
     * @example
     * <pre>
     * $count = $redisCluster->dbSize('x');
     * echo "Redis has $count keys\n";
     * </pre>
     */
    public function dbSize($nodeParams) {}

    /**
     * Starts the background rewrite of AOF (Append-Only File) at a specific node.
     *
     * @param string|array $nodeParams key or [host,port]
     *
     * @return  bool   TRUE in case of success, FALSE in case of failure.
     * @link    https://redis.io/commands/bgrewriteaof
     * @example $redisCluster->bgrewriteaof('x');
     */
    public function bgrewriteaof($nodeParams) {}

    /**
     * Returns the timestamp of the last disk save at a specific node.
     *
     * @param string|array $nodeParams key or [host,port]
     *
     * @return  int    timestamp.
     * @link    https://redis.io/commands/lastsave
     * @example $redisCluster->lastSave('x');
     */
    public function lastSave($nodeParams) {}

    /**
     * Returns an associative array of strings and integers
     *
     * @param   string $option Optional. The option to provide redis.
     *                         SERVER | CLIENTS | MEMORY | PERSISTENCE | STATS | REPLICATION | CPU | CLASTER | KEYSPACE
     *                         | COMANDSTATS
     *
     * Returns an associative array of strings and integers, with the following keys:
     * - redis_version
     * - redis_git_sha1
     * - redis_git_dirty
     * - redis_build_id
     * - redis_mode
     * - os
     * - arch_bits
     * - multiplexing_api
     * - atomicvar_api
     * - gcc_version
     * - process_id
     * - run_id
     * - tcp_port
     * - uptime_in_seconds
     * - uptime_in_days
     * - hz
     * - lru_clock
     * - executable
     * - config_file
     * - connected_clients
     * - client_longest_output_list
     * - client_biggest_input_buf
     * - blocked_clients
     * - used_memory
     * - used_memory_human
     * - used_memory_rss
     * - used_memory_rss_human
     * - used_memory_peak
     * - used_memory_peak_human
     * - used_memory_peak_perc
     * - used_memory_peak
     * - used_memory_overhead
     * - used_memory_startup
     * - used_memory_dataset
     * - used_memory_dataset_perc
     * - total_system_memory
     * - total_system_memory_human
     * - used_memory_lua
     * - used_memory_lua_human
     * - maxmemory
     * - maxmemory_human
     * - maxmemory_policy
     * - mem_fragmentation_ratio
     * - mem_allocator
     * - active_defrag_running
     * - lazyfree_pending_objects
     * - mem_fragmentation_ratio
     * - loading
     * - rdb_changes_since_last_save
     * - rdb_bgsave_in_progress
     * - rdb_last_save_time
     * - rdb_last_bgsave_status
     * - rdb_last_bgsave_time_sec
     * - rdb_current_bgsave_time_sec
     * - rdb_last_cow_size
     * - aof_enabled
     * - aof_rewrite_in_progress
     * - aof_rewrite_scheduled
     * - aof_last_rewrite_time_sec
     * - aof_current_rewrite_time_sec
     * - aof_last_bgrewrite_status
     * - aof_last_write_status
     * - aof_last_cow_size
     * - changes_since_last_save
     * - aof_current_size
     * - aof_base_size
     * - aof_pending_rewrite
     * - aof_buffer_length
     * - aof_rewrite_buffer_length
     * - aof_pending_bio_fsync
     * - aof_delayed_fsync
     * - loading_start_time
     * - loading_total_bytes
     * - loading_loaded_bytes
     * - loading_loaded_perc
     * - loading_eta_seconds
     * - total_connections_received
     * - total_commands_processed
     * - instantaneous_ops_per_sec
     * - total_net_input_bytes
     * - total_net_output_bytes
     * - instantaneous_input_kbps
     * - instantaneous_output_kbps
     * - rejected_connections
     * - maxclients
     * - sync_full
     * - sync_partial_ok
     * - sync_partial_err
     * - expired_keys
     * - evicted_keys
     * - keyspace_hits
     * - keyspace_misses
     * - pubsub_channels
     * - pubsub_patterns
     * - latest_fork_usec
     * - migrate_cached_sockets
     * - slave_expires_tracked_keys
     * - active_defrag_hits
     * - active_defrag_misses
     * - active_defrag_key_hits
     * - active_defrag_key_misses
     * - role
     * - master_replid
     * - master_replid2
     * - master_repl_offset
     * - second_repl_offset
     * - repl_backlog_active
     * - repl_backlog_size
     * - repl_backlog_first_byte_offset
     * - repl_backlog_histlen
     * - master_host
     * - master_port
     * - master_link_status
     * - master_last_io_seconds_ago
     * - master_sync_in_progress
     * - slave_repl_offset
     * - slave_priority
     * - slave_read_only
     * - master_sync_left_bytes
     * - master_sync_last_io_seconds_ago
     * - master_link_down_since_seconds
     * - connected_slaves
     * - min-slaves-to-write
     * - min-replicas-to-write
     * - min_slaves_good_slaves
     * - used_cpu_sys
     * - used_cpu_user
     * - used_cpu_sys_children
     * - used_cpu_user_children
     * - cluster_enabled
     *
     * @link    https://redis.io/commands/info
     * @return  array
     * @example
     * <pre>
     * $redisCluster->info();
     *
     * or
     *
     * $redisCluster->info("COMMANDSTATS"); //Information on the commands that have been run (>=2.6 only)
     * $redisCluster->info("CPU"); // just CPU information from Redis INFO
     * </pre>
     */
    public function info($option = null) {}

    /**
     * @since  redis >= 2.8.12.
     *  Returns the role of the instance in the context of replication
     *
     * @param string|array $nodeParams key or [host,port]
     *
     * @return array
     * @link   https://redis.io/commands/role
     * @example
     * <pre>
     * $redisCluster->role(['127.0.0.1',6379]);
     * // [ 0=>'master',1 => 3129659, 2 => [ ['127.0.0.1','9001','3129242'], ['127.0.0.1','9002','3129543'] ] ]
     * </pre>
     */
    public function role($nodeParams) {}

    /**
     * Returns a random key at the specified node
     *
     * @param string|array $nodeParams key or [host,port]
     *
     * @return string an existing key in redis.
     * @link    https://redis.io/commands/randomkey
     * @example
     * <pre>
     * $key = $redisCluster->randomKey('x');
     * $surprise = $redisCluster->get($key);  // who knows what's in there.
     * </pre>
     */
    public function randomKey($nodeParams) {}

    /**
     * Return the specified node server time.
     *
     * @param string|array $nodeParams key or [host,port]
     *
     * @return  array If successfully, the time will come back as an associative array with element zero being the
     * unix timestamp, and element one being microseconds.
     * @link    https://redis.io/commands/time
     * @example
     * <pre>
     * var_dump( $redisCluster->time('x') );
     * //// Output:
     * //
     * // array(2) {
     * //   [0] => string(10) "1342364352"
     * //   [1] => string(6) "253002"
     * // }
     * </pre>
     */
    public function time($nodeParams) {}

    /**
     * Check the specified node status
     *
     * @param string|array $nodeParams key or [host,port]
     *
     * @return  string STRING: +PONG on success. Throws a RedisClusterException object on connectivity error, as described
     *                 above.
     * @link    https://redis.io/commands/ping
     */
    public function ping($nodeParams) {}

    /**
     * Returns message.
     *
     * @param string|array $nodeParams key or [host,port]
     * @param string        $msg
     *
     * @return mixed
     */
    public function echo($nodeParams, $msg) {}

    /**
     * Returns Array reply of details about all Redis Cluster commands.
     *
     * @return mixed array | bool
     */
    public function command() {}

    /**
     * Send arbitrary things to the redis server at the specified node
     *
     * @param string|array $nodeParams key or [host,port]
     * @param string       $command    Required command to send to the server.
     * @param mixed        $arguments  Optional variable amount of arguments to send to the server.
     *
     * @return  mixed
     */
    public function rawCommand($nodeParams, $command, $arguments) {}

    /**
     * @since redis >= 3.0
     * Executes cluster command
     *
     * @param string|array $nodeParams key or [host,port]
     * @param string       $command    Required command to send to the server.
     * @param mixed        $arguments  Optional variable amount of arguments to send to the server.
     *
     * @return  mixed
     * @link  https://redis.io/commands#cluster
     * @example
     * <pre>
     * $redisCluster->cluster(['127.0.0.1',6379],'INFO');
     * </pre>
     */
    public function cluster($nodeParams, $command, $arguments) {}

    /**
     * Allows you to get information of the cluster client
     *
     * @param string|array $nodeParams key or [host,port]
     * @param string       $subCmd     can be: 'LIST', 'KILL', 'GETNAME', or 'SETNAME'
     * @param string       $args       optional arguments
     */
    public function client($nodeParams, $subCmd, $args) {}

    /**
     * Get or Set the redis config keys.
     *
     * @param string|array $nodeParams key or [host,port]
     * @param string       $operation  either `GET` or `SET`
     * @param string       $key        for `SET`, glob-pattern for `GET`. See https://redis.io/commands/config-get for examples.
     * @param string       $value      optional string (only for `SET`)
     *
     * @return  array   Associative array for `GET`, key -> value
     * @link    https://redis.io/commands/config-get
     * @link    https://redis.io/commands/config-set
     * @example
     * <pre>
     * $redisCluster->config(['127.0.0.1',6379], "GET", "*max-*-entries*");
     * $redisCluster->config(['127.0.0.1',6379], "SET", "dir", "/var/run/redis/dumps/");
     * </pre>
     */
    public function config($nodeParams, $operation, $key, $value) {}

    /**
     * A command allowing you to get information on the Redis pub/sub system.
     *
     * @param    string|array $nodeParams key or [host,port]
     *
     * @param    string       $keyword    String, which can be: "channels", "numsub", or "numpat"
     * @param    string|array $argument   Optional, variant.
     *                                    For the "channels" subcommand, you can pass a string pattern.
     *                                    For "numsub" an array of channel names
     *
     * @return    array|int               Either an integer or an array.
     *                          - channels  Returns an array where the members are the matching channels.
     *                          - numsub    Returns a key/value array where the keys are channel names and
     *                                      values are their counts.
     *                          - numpat    Integer return containing the number active pattern subscriptions.
     * @link    https://redis.io/commands/pubsub
     * @example
     * <pre>
     * $redisCluster->pubsub(['127.0.0.1',6379], 'channels'); // All channels
     * $redisCluster->pubsub(['127.0.0.1',6379], 'channels', '*pattern*'); // Just channels matching your pattern
     * $redisCluster->pubsub(['127.0.0.1',6379], 'numsub', array('chan1', 'chan2')); // Get subscriber counts for
     * 'chan1' and 'chan2'
     * $redisCluster->pubsub(['127.0.0.1',6379], 'numpat'); // Get the number of pattern subscribers
     * </pre>
     */
    public function pubsub($nodeParams, $keyword, $argument) {}

    /**
     * Execute the Redis SCRIPT command to perform various operations on the scripting subsystem.
     *
     * @param   string|array $nodeParams key or [host,port]
     * @param   string       $command    load | flush | kill | exists
     * @param   string       $script
     *
     * @return  mixed
     * @link    https://redis.io/commands/script-load
     * @link    https://redis.io/commands/script-kill
     * @link    https://redis.io/commands/script-flush
     * @link    https://redis.io/commands/script-exists
     * @example
     * <pre>
     * $redisCluster->script(['127.0.0.1',6379], 'load', $script);
     * $redisCluster->script(['127.0.0.1',6379], 'flush');
     * $redisCluster->script(['127.0.0.1',6379], 'kill');
     * $redisCluster->script(['127.0.0.1',6379], 'exists', $script1, [$script2, $script3, ...]);
     * </pre>
     *
     * SCRIPT LOAD will return the SHA1 hash of the passed script on success, and FALSE on failure.
     * SCRIPT FLUSH should always return TRUE
     * SCRIPT KILL will return true if a script was able to be killed and false if not
     * SCRIPT EXISTS will return an array with TRUE or FALSE for each passed script
     */
    public function script($nodeParams, $command, $script) {}

    /**
     * This function is used in order to read and reset the Redis slow queries log.
     *
     * @param   string|array $nodeParams key or [host,port]
     * @param   string       $command
     * @param   mixed        $argument
     *
     * @link  https://redis.io/commands/slowlog
     * @example
     * <pre>
     * $redisCluster->slowLog(['127.0.0.1',6379],'get','2');
     * </pre>
     */
    public function slowLog($nodeParams, $command, $argument) {}

    /**
     * Add one or more geospatial items in the geospatial index represented using a sorted set
     *
     * @param string $key
     * @param float  $longitude
     * @param float  $latitude
     * @param string $member
     *
     * @link  https://redis.io/commands/geoadd
     * @example
     * <pre>
     * $redisCluster->geoAdd('Sicily', 13.361389, 38.115556, 'Palermo'); // int(1)
     * $redisCluster->geoAdd('Sicily', 15.087269, 37.502669, "Catania"); // int(1)
     * </pre>
     */
    public function geoAdd($key, $longitude, $latitude, $member) {}

    /**
     * Returns members of a geospatial index as standard geohash strings
     *
     * @param string $key
     * @param string $member1
     * @param string $member2
     * @param string $memberN
     *
     * @example
     * <pre>
     * $redisCluster->geoAdd('Sicily', 13.361389, 38.115556, 'Palermo'); // int(1)
     * $redisCluster->geoAdd('Sicily', 15.087269, 37.502669, "Catania"); // int(1)
     * $redisCluster->geohash('Sicily','Palermo','Catania');//['sqc8b49rny0','sqdtr74hyu0']
     * </pre>
     */
    public function geohash($key, $member1, $member2 = null, $memberN = null) {}

    /**
     * Returns longitude and latitude of members of a geospatial index
     *
     * @param string $key
     * @param string $member1
     * @param string $member2
     * @param string $memberN
     * @example
     * <pre>
     * $redisCluster->geoAdd('Sicily', 15.087269, 37.502669, "Catania"); // int(1)
     * $redisCluster->geopos('Sicily','Palermo');//[['13.36138933897018433','38.11555639549629859']]
     * </pre>
     */
    public function geopos($key, $member1, $member2 = null, $memberN = null) {}

    /**
     * Returns the distance between two members of a geospatial index
     *
     * @param    string $key
     * @param    string $member1
     * @param    string $member2
     * @param    string $unit The unit must be one of the following, and defaults to meters:
     *                        m for meters.
     *                        km for kilometers.
     *                        mi for miles.
     *                        ft for feet.
     *
     * @link https://redis.io/commands/geoadd
     * @example
     * <pre>
     * $redisCluster->geoAdd('Sicily', 13.361389, 38.115556, 'Palermo'); // int(1)
     * $redisCluster->geoAdd('Sicily', 15.087269, 37.502669, "Catania"); // int(1)
     * $redisCluster->geoDist('Sicily', 'Palermo' ,'Catania'); // float(166274.1516)
     * $redisCluster->geoDist('Sicily', 'Palermo','Catania', 'km'); // float(166.2742)
     * </pre>
     */
    public function geoDist($key, $member1, $member2, $unit = 'm') {}

    /**
     * Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a point
     *
     * @param    string $key
     * @param    float  $longitude
     * @param    float  $latitude
     * @param    float  $radius
     * @param    string $radiusUnit String can be: "m" for meters; "km" for kilometers , "mi" for miles, or "ft" for feet.
     * @param    array  $options
     *
     * @link  https://redis.io/commands/georadius
     * @example
     * <pre>
     * $redisCluster->del('Sicily');
     * $redisCluster->geoAdd('Sicily', 12.361389, 35.115556, 'Palermo'); // int(1)
     * $redisCluster->geoAdd('Sicily', 15.087269, 37.502669, "Catania"); // int(1)
     * $redisCluster->geoAdd('Sicily', 13.3585, 35.330022, "Agrigento"); // int(1)
     *
     * var_dump( $redisCluster->geoRadius('Sicily',13.3585, 35.330022, 300, 'km', ['WITHDIST' ,'DESC']) );
     *
     * array(3) {
     *    [0]=>
     *   array(2) {
     *        [0]=>
     *     string(7) "Catania"
     *        [1]=>
     *     string(8) "286.9362"
     *   }
     *   [1]=>
     *   array(2) {
     *        [0]=>
     *     string(7) "Palermo"
     *        [1]=>
     *     string(7) "93.6874"
     *   }
     *   [2]=>
     *   array(2) {
     *        [0]=>
     *     string(9) "Agrigento"
     *        [1]=>
     *     string(6) "0.0002"
     *   }
     * }
     * var_dump( $redisCluster->geoRadiusByMember('Sicily','Agrigento', 100, 'km', ['WITHDIST' ,'DESC']) );
     *
     * * array(2) {
     *    [0]=>
     *   array(2) {
     *        [0]=>
     *     string(7) "Palermo"
     *        [1]=>
     *     string(7) "93.6872"
     *   }
     *   [1]=>
     *   array(2) {
     *        [0]=>
     *     string(9) "Agrigento"
     *        [1]=>
     *     string(6) "0.0000"
     *   }
     * }
     *
     * <pre>
     */
    public function geoRadius($key, $longitude, $latitude, $radius, $radiusUnit, array $options) {}

    /**
     * Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a member
     *
     * @see geoRadius
     *
     * @param string $key
     * @param string $member
     * @param float  $radius
     * @param string $radiusUnit
     * @param array  $options
     */
    public function geoRadiusByMember($key, $member, $radius, $radiusUnit, array $options) {}
}

class RedisClusterException extends Exception {}
<?php

namespace Decimal;

final class Decimal implements \JsonSerializable
{
    /**
     * These constants are for auto-complete only.
     */
    public const ROUND_UP = 0; /* Round away from zero. */
    public const ROUND_DOWN = 0; /* Round towards zero. */
    public const ROUND_CEILING = 0; /* Round towards positive infinity */
    public const ROUND_FLOOR = 0; /* Round towards negative infinity */
    public const ROUND_HALF_UP = 0; /* Round to nearest, ties away from zero. */
    public const ROUND_HALF_DOWN = 0; /* Round to nearest, ties towards zero. */
    public const ROUND_HALF_EVEN = 0; /* Round to nearest, ties towards even. */
    public const ROUND_HALF_ODD = 0; /* Round to nearest, ties towards odd. */
    public const ROUND_TRUNCATE = 0; /* Truncate, keeping infinity. */
    public const DEFAULT_ROUNDING = Decimal::ROUND_HALF_EVEN;
    public const DEFAULT_PRECISION = 28;
    public const MIN_PRECISION = 1;
    public const MAX_PRECISION = 0; /* This value may change across platforms */

    /**
     * Constructor
     *
     * Initializes a new instance using a given value and minimum precision.
     *
     * @param Decimal|string|int $value
     * @param int                $precision
     *
     * @throws \BadMethodCallException if already constructed.
     * @throws \TypeError if the value is not a decimal, string, or integer.
     * @throws \DomainException is the type is supported but the value could not
     *                          be converted to decimal.
     */
    public function __construct($value, int $precision = Decimal::DEFAULT_PRECISION) {}

    /**
     * Sum
     *
     * The precision of the result will be the max of all precisions that were
     * encountered during the calculation. The given precision should therefore
     * be considered the minimum precision of the result.
     *
     * This method is equivalent to adding each value individually.
     *
     * @param array|\Traversable $values
     * @param int                $precision Minimum precision of the sum.
     *
     * @return Decimal the sum of all given values.
     *
     * @throws \TypeError if an unsupported type is encountered.
     * @throws \ArithmeticError if addition is undefined, eg. INF + -INF
     */
    public static function sum($values, int $precision = Decimal::DEFAULT_PRECISION): Decimal {}

    /**
     * Average
     *
     * The precision of the result will be the max of all precisions that were
     * encountered during the calculation. The given precision should therefore
     * be considered the minimum precision of the result.
     *
     * This method is equivalent to adding each value individually,
     * then dividing by the number of values.
     *
     * @param array|\Traversable $values
     * @param int                $precision Minimum precision of the average.
     *
     * @return Decimal the average of all given values.
     *
     * @throws \TypeError if an unsupported type is encountered.
     * @throws \ArithmeticError if addition is undefined, eg. INF + -INF
     */
    public static function avg($values, int $precision = Decimal::DEFAULT_PRECISION): Decimal {}

    /**
     * Copy
     *
     * @param null|int $precision The precision of the return value, which defaults
     *                       to the precision of this decimal.
     *
     * @return Decimal a copy of this decimal.
     */
    public function copy(?int $precision = null): Decimal {}

    /**
     * Add
     *
     * This method is equivalent to the `+` operator.
     *
     * The precision of the result will be the max of this decimal's precision
     * and the given value's precision, where scalar values assume the default.
     *
     * @param Decimal|string|int $value
     *
     * @return Decimal the result of adding this decimal to the given value.
     *
     * @throws \TypeError if the value is not a decimal, string or integer.
     */
    public function add($value): Decimal {}

    /**
     * Subtract
     *
     * This method is equivalent to the `-` operator.
     *
     * The precision of the result will be the max of this decimal's precision
     * and the given value's precision, where scalar values assume the default.
     *
     * @param Decimal|string|int $value
     *
     * @return Decimal the result of subtracting a given value from this decimal.
     *
     * @throws \TypeError if the value is not a decimal, string or integer.
     */
    public function sub($value): Decimal {}

    /**
     * Multiply
     *
     * This method is equivalent to the `*` operator.
     *
     * The precision of the result will be the max of this decimal's precision
     * and the given value's precision, where scalar values assume the default.
     *
     * @param Decimal|string|int $value
     *
     * @return Decimal the result of multiplying this decimal by the given value.
     *
     * @throws \TypeError if the given value is not a decimal, string or integer.
     */
    public function mul($value): Decimal {}

    /**
     * Divide
     *
     * This method is equivalent to the `/` operator.
     *
     * The precision of the result will be the max of this decimal's precision
     * and the given value's precision, where scalar values assume the default.
     *
     * @param Decimal|string|int $value
     *
     * @return Decimal the result of dividing this decimal by the given value.
     *
     * @throws \TypeError if the value is not a decimal, string or integer.
     * @throws \DivisionByZeroError if dividing by zero.
     * @throws \ArithmeticError if division is undefined, eg. INF / -INF
     */
    public function div($value): Decimal {}

    /**
     * Modulo (integer)
     *
     * This method is equivalent to the `%` operator.
     *
     * The precision of the result will be the max of this decimal's precision
     * and the given value's precision, where scalar values assume the default.
     *
     * @see Decimal::rem for the decimal remainder.
     *
     * @param Decimal|string|int $value
     *
     * @return Decimal the remainder after dividing the integer value of this
     *                 decimal by the integer value of the given value
     *
     * @throws \TypeError if the value is not a decimal, string or integer.
     * @throws \DivisionByZeroError if the integer value of $value is zero.
     * @throws \ArithmeticError if the operation is undefined, eg. INF % -INF
     */
    public function mod($value): Decimal {}

    /**
     * Remainder
     *
     * The precision of the result will be the max of this decimal's precision
     * and the given value's precision, where scalar values assume the default.
     *
     * @param Decimal|string|int $value
     *
     * @return Decimal the remainder after dividing this decimal by a given value.
     *
     * @throws \TypeError if the value is not a decimal, string or integer.
     * @throws \DivisionByZeroError if the integer value of $value is zero.
     * @throws \ArithmeticError if the operation is undefined, eg. INF, -INF
     */
    public function rem($value): Decimal {}

    /**
     * Power
     *
     * This method is equivalent to the `**` operator.
     *
     * The precision of the result will be the max of this decimal's precision
     * and the given value's precision, where scalar values assume the default.
     *
     * @param Decimal|string|int $exponent The power to raise this decimal to.
     *
     * @return Decimal the result of raising this decimal to a given power.
     *
     * @throws \TypeError if the exponent is not a decimal, string or integer.
     */
    public function pow($exponent): Decimal {}

    /**
     * Natural logarithm
     *
     * This method is equivalent in function to PHP's `log`.
     *
     * @return Decimal the natural logarithm of this decimal (log base e),
     *                 with the same precision as this decimal.
     */
    public function ln(): Decimal {}

    /**
     * Exponent
     *
     * @return Decimal the exponent of this decimal, ie. e to the power of this,
     *                 with the same precision as this decimal.
     */
    public function exp(): Decimal {}

    /**
     * Base-10 logarithm
     *
     * @return Decimal the base-10 logarithm of this decimal, with the same
     *                 precision as this decimal.
     */
    public function log10(): Decimal {}

    /**
     * Square root
     *
     * @return Decimal the square root of this decimal, with the same precision
     *                 as this decimal.
     */
    public function sqrt(): Decimal {}

    /**
     * Floor
     *
     * @return Decimal the closest integer towards negative infinity.
     */
    public function floor(): Decimal {}

    /**
     * Ceiling
     *
     * @return Decimal the closest integer towards positive infinity.
     */
    public function ceil(): Decimal {}

    /**
     * Truncate
     *
     * @return Decimal the integer value of this decimal.
     */
    public function truncate(): Decimal {}

    /**
     * Round
     *
     * @param int $places The number of places behind the decimal to round to.
     * @param int $mode   The rounding mode, which are constants of Decimal.
     *
     * @return Decimal the value of this decimal with the same precision,
     *                 rounded according to the specified number of decimal
     *                 places and rounding mode
     *
     * @throws \InvalidArgumentException if the rounding mode is not supported.
     */
    public function round(int $places = 0, int $mode = Decimal::DEFAULT_ROUNDING): Decimal {}

    /**
     * Decimal point shift.
     *
     * @param int $places The number of places to shift the decimal point by.
     *                    A positive shift moves the decimal point to the right,
     *                    a negative shift moves the decimal point to the left.
     *
     * @return Decimal A copy of this decimal with its decimal place shifted.
     */
    public function shift(int $places): Decimal {}

    /**
     * Trims trailing zeroes.
     *
     * @return Decimal A copy of this decimal without trailing zeroes.
     */
    public function trim(): Decimal {}

    /**
     * Precision
     *
     * @return int the precision of this decimal.
     */
    public function precision(): int {}

    /**
     * Signum
     *
     * @return int 0 if zero, -1 if negative, or 1 if positive.
     */
    public function signum(): int {}

    /**
     * Parity (integer)
     *
     * @return int 0 if the integer value of this decimal is even, 1 if odd.
     *             Special numbers like NAN and INF will return 1.
     */
    public function parity(): int {}

    /**
     * Absolute
     *
     * @return Decimal the absolute (positive) value of this decimal.
     */
    public function abs(): Decimal {}

    /**
     * Negate
     *
     * @return Decimal the same value as this decimal, but the sign inverted.
     */
    public function negate(): Decimal {}

    /**
     * @return bool TRUE if this decimal is an integer and even, FALSE otherwise.
     */
    public function isEven(): bool {}

    /**
     * @return bool TRUE if this decimal is an integer and odd, FALSE otherwise.
     */
    public function isOdd(): bool {}

    /**
     * @return bool TRUE if this decimal is positive, FALSE otherwise.
     */
    public function isPositive(): bool {}

    /**
     * @return bool TRUE if this decimal is negative, FALSE otherwise.
     */
    public function isNegative(): bool {}

    /**
     * @return bool TRUE if this decimal is not a defined number.
     */
    public function isNaN(): bool {}

    /**
     * @return bool TRUE if this decimal represents infinity, FALSE otherwise.
     */
    public function isInf(): bool {}

    /**
     * @return bool TRUE if this decimal is an integer, ie. does not have
     *              significant figures behind the decimal point, otherwise FALSE.
     */
    public function isInteger(): bool {}

    /**
     * @return bool TRUE if this decimal is either positive or negative zero.
     */
    public function isZero(): bool {}

    /**
     * @param int  $places   The number of places behind the decimal point.
     * @param bool $commas   TRUE if thousands should be separated by a comma.
     * @param int  $rounding
     *
     * @return string the value of this decimal formatted to a fixed number of
     *                decimal places, optionally with thousands comma-separated,
     *                using a given rounding mode.
     */
    public function toFixed(int $places = 0, bool $commas = false, int $rounding = Decimal::DEFAULT_ROUNDING): string {}

    /**
     * String representation.
     *
     * This method is equivalent to a cast to string.
     *
     * This method should not be used as a canonical representation of this
     * decimal, because values can be represented in more than one way. However,
     * this method does guarantee that a decimal instantiated by its output with
     * the same precision will be exactly equal to this decimal.
     *
     * @return string the value of this decimal represented exactly, in either
     *                fixed or scientific form, depending on the value.
     */
    public function toString(): string {}

    /**
     * Integer representation.
     *
     * This method is equivalent to a cast to int.
     *
     * @return int the integer value of this decimal.
     *
     * @throws \OverflowException if the value is greater than PHP_INT_MAX.
     */
    public function toInt(): int {}

    /**
     * Binary floating point representation.
     *
     * This method is equivalent to a cast to float, and is not affected by the
     * 'precision' INI setting.
     *
     * @return float the native PHP floating point value of this decimal.
     *
     * @throws \OverflowException  if the value is greater than PHP_FLOAT_MAX.
     * @throws \UnderflowException if the value is smaller than PHP_FLOAT_MIN.
     */
    public function toFloat(): float {}

    /**
     * Equality
     *
     * This method is equivalent to the `==` operator.
     *
     * @param mixed $other
     *
     * @return bool TRUE if this decimal is considered equal to the given value.
     *              Equal decimal values tie-break on precision.
     */
    public function equals($other): bool {}

    /**
     * Ordering
     *
     * This method is equivalent to the `<=>` operator.
     *
     * @param mixed $other
     *
     * @return int  0 if this decimal is considered is equal to $other,
     *             -1 if this decimal should be placed before $other,
     *              1 if this decimal should be placed after $other.
     */
    public function compareTo($other): int {}

    /**
     * String representation.
     *
     * This method is equivalent to a cast to string, as well as `toString`.
     *
     * @return string the value of this decimal represented exactly, in either
     *                fixed or scientific form, depending on the value.
     */
    public function __toString(): string {}

    /**
     * JSON
     *
     * This method is only here to honour the interface, and is equivalent to
     * `toString`. JSON does not have a decimal type so all decimals are encoded
     * as strings in the same format as `toString`.
     *
     * @return string
     */
    public function jsonSerialize() {}
}
<?php

// Start of xhprof v.0.9.4

/**
 * (PHP &gt;= 5.2.0, PECL xhprof &gt;= 0.9.0)<br/>
 * Start xhprof profiler.
 *
 * @link https://php.net/manual/en/function.xhprof-enable.php
 *
 * @param int   $flags   <p>Optional flags to add additional information to the profiling. See the a
 *                       href="https://secure.php.net/manual/en/xhprof.constants.php">XHprof constants</a> for further
 *                       information about these flags, e.g., <strong>XHPROF_FLAGS_MEMORY</strong> to enable memory
 *                       profiling.</p>
 * @param array $options [optional] <p>An array of optional options, namely, the 'ignored_functions' option to pass in functions
 *                       to be ignored during profiling.</p>
 *
 * @return null
 */
function xhprof_enable($flags = 0, array $options = []) {}

/**
 * (PHP &gt;= 5.2.0, PECL xhprof &gt;= 0.9.0)<br/>
 * Stops the profiler, and returns xhprof data from the run.
 *
 * @link https://php.net/manual/en/function.xhprof-disable.php
 * @return array an array of xhprof data, from the run.
 */
function xhprof_disable() {}

/**
 * (PHP &gt;= 5.2.0, PECL xhprof &gt;= 0.9.0)<br/>
 * Starts profiling in sample mode, which is a lighter weight version of {@see xhprof_enable()}. The sampling interval
 * is 0.1 seconds, and samples record the full function call stack. The main use case is when lower overhead is
 * required when doing performance monitoring and diagnostics.
 *
 * @link https://php.net/manual/en/function.xhprof-sample-enable.php
 * @return null
 */
function xhprof_sample_enable() {}

/**
 * (PHP &gt;= 5.2.0, PECL xhprof &gt;= 0.9.0)<br/>
 * Stops the sample mode xhprof profiler, and returns xhprof data from the run.
 *
 * @link https://php.net/manual/en/function.xhprof-sample-disable.php
 * @return array an array of xhprof sample data, from the run.
 */
function xhprof_sample_disable() {}

/**
 * @link https://php.net/manual/en/xhprof.constants.php#constant.xhprof-flags-no-builtins
 */
const XHPROF_FLAGS_NO_BUILTINS = 1;
/**
 * @link https://php.net/manual/en/xhprof.constants.php#constant.xhprof-flags-cpu
 */
const XHPROF_FLAGS_CPU = 2;
/**
 * @link https://php.net/manual/en/xhprof.constants.php##constant.xhprof-flags-memory
 */
const XHPROF_FLAGS_MEMORY = 4;

// End of xhprof v.0.9.4
<?php

/**
 * Show diagnostic information
 */
function xdebug_info(string $category = '') {}

/**
 * Returns an array of ALL valid ini options with values and is not the same as ini_get_all() which returns only
 * registered ini options. Only useful for devs to debug php.ini scanner/parser!
 */
function config_get_hash(): array {}

/**
 * Returns the stack depth level.
 * The main body of a script is level 0 and each include and/or function call adds one to the stack depth level.
 * @return int
 */
function xdebug_get_stack_depth(): int {}

/**
 * Returns an array which resembles the stack trace up to this point.
 * @return array
 */
function xdebug_get_function_stack(): array {}

/**
 * Displays the current function stack, in a similar way as what Xdebug would display in an error situation.
 * @param string $message
 * @param int $options A bit mask of the following constants: XDEBUG_STACK_NO_DESC
 * @return void
 */
function xdebug_print_function_stack(string $message = 'user triggered', int $options = 0) {}

/**
 * Returns an array where each element is a variable name which is defined in the current scope.
 * @return array
 */
function xdebug_get_declared_vars(): array {}

/**
 * This function returns the filename from where the current function/method was executed from, or NULL
 * if the stack frame does not exist
 * @param int $depth
 * @return mixed
 */
function xdebug_call_file(int $depth = 2) {}

/**
 *  This function returns the name of the class that defined the current method, NULL if the stack frame does not exist,
 * or FALSE if no class is associated with this call.
 * @param int $depth
 * @return mixed
 */
function xdebug_call_class(int $depth = 2) {}

/**
 * This function returns the name of the current function/method, NULL if the stack frame does not exist, or FALSE
 * if the stack frame has no function/method information
 * @param int $depth
 * @return mixed
 */
function xdebug_call_function(int $depth = 2) {}

/**
 * This function returns the line number from where the current function/method was called from, or NULL
 * if the stack frame does not exist
 * @param int $depth
 * @return mixed
 */
function xdebug_call_line(int $depth = 2) {}

/**
 * This function starts the monitoring of functions that were given in a list as argument to this function.
 * Function monitoring allows you to find out where in your code the functions that you provided as argument are called from.
 * This can be used to track where old, or, discouraged functions are used.
 * The defined functions are case sensitive, and a dynamic call to a static method will not be caught.
 * @param string[] $listOfFunctionsToMonitor
 * @return void
 */
function xdebug_start_function_monitor(array $listOfFunctionsToMonitor) {}

/**
 * This function stops the function monitor.
 * In order to get the list of monitored functions, you need to use the xdebug_get_monitored_functions() function.
 * @return void
 */
function xdebug_stop_function_monitor() {}

/**
 * Returns a structure which contains information about where the monitored functions were executed in your script.
 * @return array
 */
function xdebug_get_monitored_functions(): array {}

/**
 * This function displays structured information about one or more expressions that includes its type and value.
 * Arrays are explored recursively with values.
 * @param mixed $var
 * @return void
 */
function xdebug_var_dump(mixed ...$variable) {}

/**
 * This function displays structured information about one or more variables that includes its type, value and refcount information.
 * Arrays are explored recursively with values.
 * This function is implemented differently from PHP's debug_zval_dump() function in order to work around the problems
 * that that function has because the variable itself is actually passed to the function.
 * Xdebug's version is better as it uses the variable name to lookup the variable in the internal symbol table and
 * accesses all the properties directly without having to deal with actually passing a variable to a function.
 * The result is that the information that this function returns is much more accurate than PHP's own function
 * for showing zval information.
 * @param string ...$varname
 * @return void
 */
function xdebug_debug_zval(string ...$varname) {}

/**
 * This function displays structured information about one or more variables that includes its type,
 * value and refcount information.
 * Arrays are explored recursively with values.
 * The difference with xdebug_debug_zval() is that the information is not displayed through a web server API layer,
 * but directly shown on stdout (so that when you run it with apache in single process mode it ends up on the console).
 * @param string ...$varname
 * @return void
 */
function xdebug_debug_zval_stdout(string ...$varname) {}

/**
 * Enable showing stack traces on error conditions.
 * @return void
 */
function xdebug_enable() {}

/**
 * Disable showing stack traces on error conditions.
 * @return void
 */
function xdebug_disable() {}

/**
 * Return whether stack traces would be shown in case of an error or not.
 * @return bool
 */
function xdebug_is_enabled() {}

/**
 * Starts recording all notices, warnings and errors and prevents their display
 *
 * When this function is executed, Xdebug will cause PHP not to display any notices, warnings or errors.
 * Instead, they are formatted according to Xdebug's normal error formatting rules (ie, the error table
 * with the red exclamation mark) and then stored in a buffer.
 * This will continue until you call xdebug_stop_error_collection().
 *
 * This buffer's contents can be retrieved by calling xdebug_get_collected_errors() and then subsequently displayed.
 * This is really useful if you want to prevent Xdebug's powerful error reporting features from destroying your layout.
 * @return void
 */
function xdebug_start_error_collection() {}

/**
 * When this function is executed, error collection as started by xdebug_start_error_collection() is aborted.
 * The errors stored in the collection buffer are not deleted and still available to be fetched through xdebug_get_collected_errors().
 * @return void
 */
function xdebug_stop_error_collection() {}

/**
 * This function returns all errors from the collection buffer that contains all errors that were stored there when error collection was started with xdebug_start_error_collection().
 * By default this function will not clear the error collection buffer. If you pass true as argument to this function then the buffer will be cleared as well.
 * This function returns a string containing all collected errors formatted as an "Xdebug table".
 * @param bool $emptyList
 * @return array
 */
function xdebug_get_collected_errors(bool $emptyList = false): array {}

/**
 * This function makes the debugger break on the specific line as if a normal file/line breakpoint was set on this line.
 *
 * @return bool
 */
function xdebug_break(): bool {}

/**
 * Start tracing function calls from this point to the file in the trace_file parameter.
 * If no filename is given, then the trace file will be placed in the directory as configured by the xdebug.trace_output_dir setting.
 * In case a file name is given as first parameter, the name is relative to the current working directory.
 * This current working directory might be different than you expect it to be, so please use an absolute path in case you specify a file name.
 * Use the PHP function getcwd() to figure out what the current working directory is.
 * @param string|null $traceFile
 * @param int $options
 * @return string|null
 */
function xdebug_start_trace(?string $traceFile = null, int $options = 0): ?string {}

/**
 * Stop tracing function calls and closes the trace file.
 *
 * @return string
 */
function xdebug_stop_trace(): string {}

/**
 * Returns the name of the file which is used to trace the output of this script too.
 * This is useful when xdebug.auto_trace is enabled.
 * @return string|null
 */
function xdebug_get_tracefile_name() {}

/**
 * Returns the name of the file which is used to save profile information to.
 *
 * @return string|false
 */
function xdebug_get_profiler_filename() {}

/**
 * @param $prefix [optional]
 * @return bool
 */
function xdebug_dump_aggr_profiling_data($prefix) {}

/**
 * @return bool
 */
function xdebug_clear_aggr_profiling_data() {}

/**
 * Returns the current amount of memory the script uses.
 * Before PHP 5.2.1, this only works if PHP is compiled with --enable-memory-limit.
 * From PHP 5.2.1 and later this function is always available.
 *
 * @return int
 */
function xdebug_memory_usage(): int {}

/**
 * Returns the maximum amount of memory the script used until now.
 * Before PHP 5.2.1, this only works if PHP is compiled with --enable-memory-limit.
 * From PHP 5.2.1 and later this function is always available.
 *
 * @return int
 */
function xdebug_peak_memory_usage(): int {}

/**
 * Returns the current time index since the starting of the script in seconds.
 *
 * @return float
 */
function xdebug_time_index(): float {}

/**
 * This function starts gathering the information for code coverage.
 * The information that is collected consists of an two dimensional array with as primary index the executed filename and as secondary key the line number.
 * The value in the elements represents the total number of execution units on this line have been executed.
 * Options to this function are: XDEBUG_CC_UNUSED Enables scanning of code to figure out which line has executable code.
 * XDEBUG_CC_DEAD_CODE Enables branch analyzes to figure out whether code can be executed.
 *
 * @param int $options
 * @return void
 */
function xdebug_start_code_coverage(int $options = 0) {}

/**
 * This function stops collecting information, the information in memory will be destroyed.
 * If you pass 0 ("false") as argument, then the code coverage information will not be destroyed so that you can resume
 * the gathering of information with the xdebug_start_code_coverage() function again.
 * @param bool $cleanUp Destroy collected information in memory
 * @return void
 */
function xdebug_stop_code_coverage(bool $cleanUp = true) {}

/**
 * Returns whether code coverage is active.
 * @return bool
 */
function xdebug_code_coverage_started(): bool {}

/**
 * Returns a structure which contains information about which lines
 * were executed in your script (including include files).
 *
 * @return array
 */
function xdebug_get_code_coverage(): array {}

/**
 * Returns the number of functions called, including constructors, desctructors and methods.
 *
 * @return int
 */
function xdebug_get_function_count(): int {}

/**
 * This function dumps the values of the elements of the super globals
 * as specified with the xdebug.dump.* php.ini settings.
 *
 * @return void
 */
function xdebug_dump_superglobals() {}

/**
 * Returns all the headers that are set with PHP's header() function,
 * or any other header set internally within PHP (such as through setcookie()), as an array.
 *
 * @return array
 */
function xdebug_get_headers(): array {}

function xdebug_get_formatted_function_stack() {}

/**
 * Returns whether a debugging session is active.
 *
 * Returns true if a debugging session through DBGp is currently active with a client attached; false, if not.
 *
 * @return bool
 */
function xdebug_is_debugger_active(): bool {}

/**
 * @param string|null $gcstatsFile
 * @return mixed
 */
function xdebug_start_gcstats(?string $gcstatsFile = null) {}

/**
 * Stop garbage collection statistics collection and closes the output file.
 * @return string The function returns the filename of the file where the statistics were written to.
 */
function xdebug_stop_gcstats(): string {}

/**
 * Returns the name of the file which is used to save garbage collection information to, or false if
 * statistics collection is not active.
 * @return mixed
 */
function xdebug_get_gcstats_filename() {}

/**
 * @return int
 */
function xdebug_get_gc_run_count(): int {}

/**
 * @return int
 */
function xdebug_get_gc_total_collected_roots(): int {}

/**
 * @param int $group
 * @param int $listType
 * @param array $configuration
 * @return void
 */
function xdebug_set_filter(int $group, int $listType, array $configuration) {}

function xdebug_connect_to_client(): bool {}

function xdebug_notify(mixed $data): bool {}

define('XDEBUG_STACK_NO_DESC', 1);
define('XDEBUG_TRACE_APPEND', 1);
define('XDEBUG_TRACE_COMPUTERIZED', 2);
define('XDEBUG_TRACE_HTML', 4);
define('XDEBUG_TRACE_NAKED_FILENAME', 8);
define('XDEBUG_CC_UNUSED', 1);
define('XDEBUG_CC_DEAD_CODE', 2);
define('XDEBUG_CC_BRANCH_CHECK', 4);
define('XDEBUG_FILTER_TRACING', 768);
define('XDEBUG_FILTER_STACK', 512);
define('XDEBUG_FILTER_CODE_COVERAGE', 256);
define('XDEBUG_FILTER_NONE', 0);
define('XDEBUG_PATH_WHITELIST', 1);
define('XDEBUG_PATH_BLACKLIST', 2);
define('XDEBUG_NAMESPACE_WHITELIST', 17);
define('XDEBUG_NAMESPACE_BLACKLIST', 18);
define('XDEBUG_NAMESPACE_EXCLUDE', 18);
define('XDEBUG_NAMESPACE_INCLUDE', 17);
define('XDEBUG_PATH_EXCLUDE', 2);
define('XDEBUG_PATH_INCLUDE', 1);
<?php

// Start of ibm_db2 v.1.6.0

/**
 * Returns a connection to a database
 * @link https://php.net/manual/en/function.db2-connect.php
 * @param string $database <p>
 * For a cataloged connection to a database, this parameter
 * represents the connection alias in the DB2 client catalog.
 * </p>
 * <p>
 * For an uncataloged connection to a database,
 * this parameter represents a complete DSN in the following format:
 * DRIVER=driver;DATABASE=database;HOSTNAME=hostname;PORT=port;PROTOCOL=TCPIP;UID=username;PWD=password;
 * </p>
 * @param string|null $username <p>
 * The username with which you are connecting to the database, or null if
 * the $database parameter contains a DSN which already provides the username for
 * the connection.
 * </p>
 * @param string|null $password <p>
 * The password with which you are connecting to the database, or null if
 * the $database parameter contains a DSN which already provides the password for
 * the connection.
 * </p>
 * @param array $options <p>
 * An associative array of connection options that affect the behavior
 * of the connection, where valid array keys include:
 * autocommit
 * <p>
 * Passing the DB2_AUTOCOMMIT_ON value turns
 * autocommit on for this connection handle.
 * </p>
 * <p>
 * Passing the DB2_AUTOCOMMIT_OFF value turns
 * autocommit off for this connection handle.
 * </p>
 * @return resource|false A connection handle resource if the connection attempt is
 * successful. If the connection attempt fails, db2_connect
 * returns false.
 */
function db2_connect(#[\SensitiveParameter] string $database, ?string $username, #[\SensitiveParameter] ?string $password, array $options = []) {}

/**
 * Commits a transaction
 * @link https://php.net/manual/en/function.db2-commit.php
 * @param resource $connection <p>
 * A valid database connection resource variable as returned from
 * db2_connect or db2_pconnect.
 * </p>
 * @return bool true on success or false on failure.
 */
function db2_commit($connection): bool {}

/**
 * Returns a persistent connection to a database
 * @link https://php.net/manual/en/function.db2-pconnect.php
 * @param string $database <p>
 * For a cataloged connection to a database, this parameter
 * represents the connection alias in the DB2 client catalog.
 * </p>
 * <p>
 * For an uncataloged connection to a database,
 * this parameter represents a complete DSN in the following format:
 * DRIVER=driver;DATABASE=database;HOSTNAME=hostname;PORT=port;PROTOCOL=TCPIP;UID=username;PWD=password;
 * </p>
 * @param string|null $username <p>
 * The username with which you are connecting to the database, or null if
 * the $database parameter contains a DSN which already provides the username for
 * the connection.
 * </p>
 * @param string|null $password <p>
 * The password with which you are connecting to the database, or null if
 * the $database parameter contains a DSN which already provides the password for
 * the connection.
 * </p>
 * @param array $options <p>
 * An associative array of connection options that affect the behavior
 * of the connection, where valid array keys include:
 * autocommit
 * </p>
 * <p>
 * Passing the DB2_AUTOCOMMIT_ON value turns
 * autocommit on for this connection handle.
 * </p>
 * <p>
 * Passing the DB2_AUTOCOMMIT_OFF value turns
 * autocommit off for this connection handle.
 * </p>
 * @return resource|false A connection handle resource if the connection attempt is
 * successful. db2_pconnect tries to reuse an existing
 * connection resource that exactly matches the
 * database, username, and
 * password parameters. If the connection attempt fails,
 * db2_pconnect returns false.
 */
function db2_pconnect(#[\SensitiveParameter] string $database, ?string $username, #[\SensitiveParameter] ?string $password, array $options = []) {}

/**
 * Returns or sets the AUTOCOMMIT state for a database connection
 * @link https://php.net/manual/en/function.db2-autocommit.php
 * @param resource $connection <p>
 * A valid database connection resource variable as returned from
 * db2_connect or db2_pconnect.
 * </p>
 * @param int $value <p>
 * One of the following constants:</p>
 * <p>
 * DB2_AUTOCOMMIT_OFF
 * Turns AUTOCOMMIT off.
 * </p>
 * <p>
 * DB2_AUTOCOMMIT_ON
 * Turns AUTOCOMMIT on.
 * </p>
 * @return int|bool <p>When db2_autocommit receives only the
 * connection parameter, it returns the current state
 * of AUTOCOMMIT for the requested connection as an integer value. A value of
 * 0 indicates that AUTOCOMMIT is off, while a value of 1 indicates that
 * AUTOCOMMIT is on.
 * </p>
 * <p>
 * When db2_autocommit receives both the
 * connection parameter and
 * autocommit parameter, it attempts to set the
 * AUTOCOMMIT state of the requested connection to the corresponding state.
 * true on success or false on failure.</p>
 */
function db2_autocommit($connection, int $value = null): int|bool {}

/**
 * Binds a PHP variable to an SQL statement parameter
 * @link https://php.net/manual/en/function.db2-bind-param.php
 * @param resource $stmt <p>
 * A prepared statement returned from db2_prepare.
 * </p>
 * @param int $parameter_number
 * @param string $variable_name
 * @param int $parameter_type
 * @param int $data_type
 * @param int $precision <p>
 * Specifies the precision with which the variable should be bound to the
 * database. This parameter can also be used for retrieving XML output values
 * from stored procedures. A non-negative value specifies the maximum size of
 * the XML data that will be retrieved from the database. If this parameter
 * is not used, a default of 1MB will be assumed for retrieving the XML
 * output value from the stored procedure.
 * </p>
 * @param int $scale <p>
 * Specifies the scale with which the variable should be bound to the
 * database.
 * </p>
 * @return bool true on success or false on failure.
 */
function db2_bind_param($stmt, int $parameter_number, string $variable_name, int $parameter_type = DB2_PARAM_IN, int $data_type = 0, int $precision = -1, int $scale = 0): bool {}

/**
 * Closes a database connection
 * @link https://php.net/manual/en/function.db2-close.php
 * @param resource $connection <p>
 * Specifies an active DB2 client connection.
 * </p>
 * @return bool true on success or false on failure.
 */
function db2_close($connection): bool {}

/**
 * Returns a result set listing the columns and associated privileges for a table
 * @link https://php.net/manual/en/function.db2-column-privileges.php
 * @param resource $connection <p>
 * A valid connection to an IBM DB2, Cloudscape, or Apache Derby database.
 * </p>
 * @param string|null $qualifier <p>
 * A qualifier for DB2 databases running on OS/390 or z/OS servers. For
 * other databases, pass null or an empty string.
 * </p>
 * @param string|null $schema <p>
 * The schema which contains the tables. To match all schemas, pass null
 * or an empty string.
 * </p>
 * @param string|null $table_name
 * @param string|null $column_name
 * @return resource|false a statement resource with a result set containing rows describing
 * the column privileges for columns matching the specified parameters. The
 * rows are composed of the following columns:
 * <tr valign="top">
 * <td>Column name</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>TABLE_CAT</td>
 * <td>Name of the catalog. The value is NULL if this table does not
 * have catalogs.</td>
 * </tr>
 * <tr valign="top">
 * <td>TABLE_SCHEM</td>
 * <td>Name of the schema.</td>
 * </tr>
 * <tr valign="top">
 * <td>TABLE_NAME</td>
 * <td>Name of the table or view.</td>
 * </tr>
 * <tr valign="top">
 * <td>COLUMN_NAME</td>
 * <td>Name of the column.</td>
 * </tr>
 * <tr valign="top">
 * <td>GRANTOR</td>
 * <td>Authorization ID of the user who granted the privilege.</td>
 * </tr>
 * <tr valign="top">
 * <td>GRANTEE</td>
 * <td>Authorization ID of the user to whom the privilege was
 * granted.</td>
 * </tr>
 * <tr valign="top">
 * <td>PRIVILEGE</td>
 * <td>The privilege for the column.</td>
 * </tr>
 * <tr valign="top">
 * <td>IS_GRANTABLE</td>
 * <td>Whether the GRANTEE is permitted to grant this privilege to
 * other users.</td>
 * </tr>
 */
function db2_column_privileges($connection, ?string $qualifier = null, ?string $schema = null, ?string $table_name = null, ?string $column_name = null) {}

function db2_columnprivileges() {}

/**
 * Returns a result set listing the columns and associated metadata for a table
 * @link https://php.net/manual/en/function.db2-columns.php
 * @param resource $connection <p>
 * A valid connection to an IBM DB2, Cloudscape, or Apache Derby database.
 * </p>
 * @param string $qualifier <p>
 * A qualifier for DB2 databases running on OS/390 or z/OS servers. For
 * other databases, pass null or an empty string.
 * </p>
 * @param string $schema <p>
 * The schema which contains the tables. To match all schemas, pass
 * '%'.
 * </p>
 * @param string $table_name
 * @param string $column_name
 * @return resource|false A statement resource with a result set containing rows describing
 * the columns matching the specified parameters. The rows are composed of
 * the following columns:
 * <tr valign="top">
 * <td>Column name</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>TABLE_CAT</td>
 * <td>Name of the catalog. The value is NULL if this table does not
 * have catalogs.</td>
 * </tr>
 * <tr valign="top">
 * <td>TABLE_SCHEM</td>
 * <td>Name of the schema.</td>
 * </tr>
 * <tr valign="top">
 * <td>TABLE_NAME</td>
 * <td>Name of the table or view.</td>
 * </tr>
 * <tr valign="top">
 * <td>COLUMN_NAME</td>
 * <td>Name of the column.</td>
 * </tr>
 * <tr valign="top">
 * <td>DATA_TYPE</td>
 * <td>The SQL data type for the column represented as an integer value.</td>
 * </tr>
 * <tr valign="top">
 * <td>TYPE_NAME</td>
 * <td>A string representing the data type for the column.</td>
 * </tr>
 * <tr valign="top">
 * <td>COLUMN_SIZE</td>
 * <td>An integer value representing the size of the column.</td>
 * </tr>
 * <tr valign="top">
 * <td>BUFFER_LENGTH</td>
 * <td>
 * Maximum number of bytes necessary to store data from this column.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>DECIMAL_DIGITS</td>
 * <td>
 * The scale of the column, or null where scale is not applicable.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>NUM_PREC_RADIX</td>
 * <td>
 * An integer value of either 10 (representing
 * an exact numeric data type), 2 (representing an
 * approximate numeric data type), or null (representing a data type for
 * which radix is not applicable).
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>NULLABLE</td>
 * <td>An integer value representing whether the column is nullable or
 * not.</td>
 * </tr>
 * <tr valign="top">
 * <td>REMARKS</td>
 * <td>Description of the column.</td>
 * </tr>
 * <tr valign="top">
 * <td>COLUMN_DEF</td>
 * <td>Default value for the column.</td>
 * </tr>
 * <tr valign="top">
 * <td>SQL_DATA_TYPE</td>
 * <td>An integer value representing the size of the column.</td>
 * </tr>
 * <tr valign="top">
 * <td>SQL_DATETIME_SUB</td>
 * <td>
 * Returns an integer value representing a datetime subtype code,
 * or null for SQL data types to which this does not apply.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>CHAR_OCTET_LENGTH</td>
 * <td>
 * Maximum length in octets for a character data type column, which
 * matches COLUMN_SIZE for single-byte character set data, or null for
 * non-character data types.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>ORDINAL_POSITION</td>
 * <td>The 1-indexed position of the column in the table.</td>
 * </tr>
 * <tr valign="top">
 * <td>IS_NULLABLE</td>
 * <td>
 * A string value where 'YES' means that the column is nullable and
 * 'NO' means that the column is not nullable.
 * </td>
 * </tr>
 */
function db2_columns($connection, $qualifier = null, $schema = null, $table_name = null, $column_name = null) {}

/**
 * Returns a result set listing the foreign keys for a table
 * @link https://php.net/manual/en/function.db2-foreign-keys.php
 * @param resource $connection <p>
 * A valid connection to an IBM DB2, Cloudscape, or Apache Derby database.
 * </p>
 * @param string|null $qualifier <p>
 * A qualifier for DB2 databases running on OS/390 or z/OS servers. For
 * other databases, pass null or an empty string.
 * </p>
 * @param string|null $schema <p>
 * The schema which contains the tables. If schema
 * is null, db2_foreign_keys matches the schema for
 * the current connection.
 * </p>
 * @param string $table_name
 * @return resource|false A statement resource with a result set containing rows describing
 * the foreign keys for the specified table. The result set is composed of the
 * following columns:
 * <tr valign="top">
 * <td>Column name</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>PKTABLE_CAT</td>
 * <td>
 * Name of the catalog for the table containing the primary key. The
 * value is NULL if this table does not have catalogs.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>PKTABLE_SCHEM</td>
 * <td>
 * Name of the schema for the table containing the primary key.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>PKTABLE_NAME</td>
 * <td>Name of the table containing the primary key.</td>
 * </tr>
 * <tr valign="top">
 * <td>PKCOLUMN_NAME</td>
 * <td>Name of the column containing the primary key.</td>
 * </tr>
 * <tr valign="top">
 * <td>FKTABLE_CAT</td>
 * <td>
 * Name of the catalog for the table containing the foreign key. The
 * value is NULL if this table does not have catalogs.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>FKTABLE_SCHEM</td>
 * <td>
 * Name of the schema for the table containing the foreign key.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>FKTABLE_NAME</td>
 * <td>Name of the table containing the foreign key.</td>
 * </tr>
 * <tr valign="top">
 * <td>FKCOLUMN_NAME</td>
 * <td>Name of the column containing the foreign key.</td>
 * </tr>
 * <tr valign="top">
 * <td>KEY_SEQ</td>
 * <td>1-indexed position of the column in the key.</td>
 * </tr>
 * <tr valign="top">
 * <td>UPDATE_RULE</td>
 * <td>
 * Integer value representing the action applied to the foreign key
 * when the SQL operation is UPDATE.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>DELETE_RULE</td>
 * <td>
 * Integer value representing the action applied to the foreign key
 * when the SQL operation is DELETE.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>FK_NAME</td>
 * <td>The name of the foreign key.</td>
 * </tr>
 * <tr valign="top">
 * <td>PK_NAME</td>
 * <td>The name of the primary key.</td>
 * </tr>
 * <tr valign="top">
 * <td>DEFERRABILITY</td>
 * <td>
 * An integer value representing whether the foreign key deferrability is
 * SQL_INITIALLY_DEFERRED, SQL_INITIALLY_IMMEDIATE, or
 * SQL_NOT_DEFERRABLE.
 * </td>
 * </tr>
 */
function db2_foreign_keys($connection, ?string $qualifier, ?string $schema, string $table_name) {}

function db2_foreignkeys() {}

/**
 * Returns a result set listing primary keys for a table
 * @link https://php.net/manual/en/function.db2-primary-keys.php
 * @param resource $connection <p>
 * A valid connection to an IBM DB2, Cloudscape, or Apache Derby database.
 * </p>
 * @param string|null $qualifier <p>
 * A qualifier for DB2 databases running on OS/390 or z/OS servers. For
 * other databases, pass null or an empty string.
 * </p>
 * @param string|null $schema <p>
 * The schema which contains the tables. If schema
 * is null, db2_primary_keys matches the schema for
 * the current connection.
 * </p>
 * @param string $table_name
 * @return resource|false A statement resource with a result set containing rows describing
 * the primary keys for the specified table. The result set is composed of the
 * following columns:
 * <tr valign="top">
 * <td>Column name</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>TABLE_CAT</td>
 * <td>
 * Name of the catalog for the table containing the primary key. The
 * value is NULL if this table does not have catalogs.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>TABLE_SCHEM</td>
 * <td>
 * Name of the schema for the table containing the primary key.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>TABLE_NAME</td>
 * <td>Name of the table containing the primary key.</td>
 * </tr>
 * <tr valign="top">
 * <td>COLUMN_NAME</td>
 * <td>Name of the column containing the primary key.</td>
 * </tr>
 * <tr valign="top">
 * <td>KEY_SEQ</td>
 * <td>1-indexed position of the column in the key.</td>
 * </tr>
 * <tr valign="top">
 * <td>PK_NAME</td>
 * <td>The name of the primary key.</td>
 * </tr>
 */
function db2_primary_keys($connection, ?string $qualifier, ?string $schema, string $table_name) {}

function db2_primarykeys() {}

/**
 * Returns a result set listing stored procedure parameters
 * @link https://php.net/manual/en/function.db2-procedure-columns.php
 * @param resource $connection <p>
 * A valid connection to an IBM DB2, Cloudscape, or Apache Derby database.
 * </p>
 * @param string|null $qualifier <p>
 * A qualifier for DB2 databases running on OS/390 or z/OS servers. For
 * other databases, pass null or an empty string.
 * </p>
 * @param string $schema <p>
 * The schema which contains the procedures. This parameter accepts a
 * search pattern containing _ and %
 * as wildcards.
 * </p>
 * @param string $procedure <p>
 * The name of the procedure. This parameter accepts a
 * search pattern containing _ and %
 * as wildcards.
 * </p>
 * @param string|null $parameter <p>
 * The name of the parameter. This parameter accepts a search pattern
 * containing _ and % as wildcards.
 * If this parameter is null, all parameters for the specified stored
 * procedures are returned.
 * </p>
 * @return resource|false A statement resource with a result set containing rows describing
 * the parameters for the stored procedures matching the specified parameters.
 * The rows are composed of the following columns:
 * <tr valign="top">
 * <td>Column name</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>PROCEDURE_CAT</td>
 * <td>The catalog that contains the procedure. The value is null if
 * this table does not have catalogs.</td>
 * </tr>
 * <tr valign="top">
 * <td>PROCEDURE_SCHEM</td>
 * <td>Name of the schema that contains the stored procedure.</td>
 * </tr>
 * <tr valign="top">
 * <td>PROCEDURE_NAME</td>
 * <td>Name of the procedure.</td>
 * </tr>
 * <tr valign="top">
 * <td>COLUMN_NAME</td>
 * <td>Name of the parameter.</td>
 * </tr>
 * <tr valign="top">
 * <td>COLUMN_TYPE</td>
 * <td>
 * <p>
 * An integer value representing the type of the parameter:
 * <tr valign="top">
 * <td>Return value</td>
 * <td>Parameter type</td>
 * </tr>
 * <tr valign="top">
 * <td>1 (SQL_PARAM_INPUT)</td>
 * <td>Input (IN) parameter.</td>
 * </tr>
 * <tr valign="top">
 * <td>2 (SQL_PARAM_INPUT_OUTPUT)</td>
 * <td>Input/output (INOUT) parameter.</td>
 * </tr>
 * <tr valign="top">
 * <td>3 (SQL_PARAM_OUTPUT)</td>
 * <td>Output (OUT) parameter.</td>
 * </tr>
 * </p>
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>DATA_TYPE</td>
 * <td>The SQL data type for the parameter represented as an integer
 * value.</td>
 * </tr>
 * <tr valign="top">
 * <td>TYPE_NAME</td>
 * <td>A string representing the data type for the parameter.</td>
 * </tr>
 * <tr valign="top">
 * <td>COLUMN_SIZE</td>
 * <td>An integer value representing the size of the parameter.</td>
 * </tr>
 * <tr valign="top">
 * <td>BUFFER_LENGTH</td>
 * <td>
 * Maximum number of bytes necessary to store data for this parameter.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>DECIMAL_DIGITS</td>
 * <td>
 * The scale of the parameter, or null where scale is not applicable.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>NUM_PREC_RADIX</td>
 * <td>
 * An integer value of either 10 (representing
 * an exact numeric data type), 2 (representing an
 * approximate numeric data type), or null (representing a data type for
 * which radix is not applicable).
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>NULLABLE</td>
 * <td>An integer value representing whether the parameter is nullable
 * or not.</td>
 * </tr>
 * <tr valign="top">
 * <td>REMARKS</td>
 * <td>Description of the parameter.</td>
 * </tr>
 * <tr valign="top">
 * <td>COLUMN_DEF</td>
 * <td>Default value for the parameter.</td>
 * </tr>
 * <tr valign="top">
 * <td>SQL_DATA_TYPE</td>
 * <td>An integer value representing the size of the parameter.</td>
 * </tr>
 * <tr valign="top">
 * <td>SQL_DATETIME_SUB</td>
 * <td>
 * Returns an integer value representing a datetime subtype code,
 * or null for SQL data types to which this does not apply.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>CHAR_OCTET_LENGTH</td>
 * <td>
 * Maximum length in octets for a character data type parameter, which
 * matches COLUMN_SIZE for single-byte character set data, or null for
 * non-character data types.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>ORDINAL_POSITION</td>
 * <td>The 1-indexed position of the parameter in the CALL
 * statement.</td>
 * </tr>
 * <tr valign="top">
 * <td>IS_NULLABLE</td>
 * <td>
 * A string value where 'YES' means that the parameter accepts or
 * returns null values and 'NO' means that the parameter does not
 * accept or return null values.
 * </td>
 * </tr>
 */
function db2_procedure_columns($connection, ?string $qualifier, string $schema, string $procedure, ?string $parameter) {}

function db2_procedurecolumns() {}

/**
 * Returns a result set listing the stored procedures registered in a database
 * @link https://php.net/manual/en/function.db2-procedures.php
 * @param resource $connection <p>
 * A valid connection to an IBM DB2, Cloudscape, or Apache Derby database.
 * </p>
 * @param string|null $qualifier <p>
 * A qualifier for DB2 databases running on OS/390 or z/OS servers. For
 * other databases, pass null or an empty string.
 * </p>
 * @param string $schema <p>
 * The schema which contains the procedures. This parameter accepts a
 * search pattern containing _ and %
 * as wildcards.
 * </p>
 * @param string $procedure <p>
 * The name of the procedure. This parameter accepts a
 * search pattern containing _ and %
 * as wildcards.
 * </p>
 * @return resource|false A statement resource with a result set containing rows describing
 * the stored procedures matching the specified parameters. The rows are
 * composed of the following columns:
 * <tr valign="top">
 * <td>Column name</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>PROCEDURE_CAT</td>
 * <td>The catalog that contains the procedure. The value is null if
 * this table does not have catalogs.</td>
 * </tr>
 * <tr valign="top">
 * <td>PROCEDURE_SCHEM</td>
 * <td>Name of the schema that contains the stored procedure.</td>
 * </tr>
 * <tr valign="top">
 * <td>PROCEDURE_NAME</td>
 * <td>Name of the procedure.</td>
 * </tr>
 * <tr valign="top">
 * <td>NUM_INPUT_PARAMS</td>
 * <td>Number of input (IN) parameters for the stored procedure.</td>
 * </tr>
 * <tr valign="top">
 * <td>NUM_OUTPUT_PARAMS</td>
 * <td>Number of output (OUT) parameters for the stored procedure.</td>
 * </tr>
 * <tr valign="top">
 * <td>NUM_RESULT_SETS</td>
 * <td>Number of result sets returned by the stored procedure.</td>
 * </tr>
 * <tr valign="top">
 * <td>REMARKS</td>
 * <td>Any comments about the stored procedure.</td>
 * </tr>
 * <tr valign="top">
 * <td>PROCEDURE_TYPE</td>
 * <td>Always returns 1, indicating that the stored
 * procedure does not return a return value.</td>
 * </tr>
 */
function db2_procedures($connection, ?string $qualifier, string $schema, string $procedure) {}

/**
 * Returns a result set listing the unique row identifier columns for a table
 * @link https://php.net/manual/en/function.db2-special-columns.php
 * @param resource $connection <p>
 * A valid connection to an IBM DB2, Cloudscape, or Apache Derby database.
 * </p>
 * @param string|null $qualifier <p>
 * A qualifier for DB2 databases running on OS/390 or z/OS servers. For
 * other databases, pass null or an empty string.
 * </p>
 * @param string $schema <p>
 * The schema which contains the tables.
 * </p>
 * @param string $table_name <p>
 * The name of the table.
 * </p>
 * @param int $scope <p>
 * Integer value representing the minimum duration for which the
 * unique row identifier is valid. This can be one of the following
 * values:
 * <tr valign="top">
 * <td>Integer value</td>
 * <td>SQL constant</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>0</td>
 * <td>SQL_SCOPE_CURROW</td>
 * <td>Row identifier is valid only while the cursor is positioned
 * on the row.</td>
 * </tr>
 * <tr valign="top">
 * <td>1</td>
 * <td>SQL_SCOPE_TRANSACTION</td>
 * <td>Row identifier is valid for the duration of the
 * transaction.</td>
 * </tr>
 * <tr valign="top">
 * <td>2</td>
 * <td>SQL_SCOPE_SESSION</td>
 * <td>Row identifier is valid for the duration of the
 * connection.</td>
 * </tr>
 * </p>
 * @return resource|false A statement resource with a result set containing rows with unique
 * row identifier information for a table. The rows are composed of the
 * following columns:
 * <tr valign="top">
 * <td>Column name</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>SCOPE</td>
 * <td>
 * <p>
 * <tr valign="top">
 * <td>Integer value</td>
 * <td>SQL constant</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>0</td>
 * <td>SQL_SCOPE_CURROW</td>
 * <td>Row identifier is valid only while the cursor is positioned
 * on the row.</td>
 * </tr>
 * <tr valign="top">
 * <td>1</td>
 * <td>SQL_SCOPE_TRANSACTION</td>
 * <td>Row identifier is valid for the duration of the
 * transaction.</td>
 * </tr>
 * <tr valign="top">
 * <td>2</td>
 * <td>SQL_SCOPE_SESSION</td>
 * <td>Row identifier is valid for the duration of the
 * connection.</td>
 * </tr>
 * </p>
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>COLUMN_NAME</td>
 * <td>Name of the unique column.</td>
 * </tr>
 * <tr valign="top">
 * <td>DATA_TYPE</td>
 * <td>SQL data type for the column.</td>
 * </tr>
 * <tr valign="top">
 * <td>TYPE_NAME</td>
 * <td>Character string representation of the SQL data type for the
 * column.</td>
 * </tr>
 * <tr valign="top">
 * <td>COLUMN_SIZE</td>
 * <td>An integer value representing the size of the column.</td>
 * </tr>
 * <tr valign="top">
 * <td>BUFFER_LENGTH</td>
 * <td>
 * Maximum number of bytes necessary to store data from this column.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>DECIMAL_DIGITS</td>
 * <td>
 * The scale of the column, or null where scale is not applicable.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>NUM_PREC_RADIX</td>
 * <td>
 * An integer value of either 10 (representing
 * an exact numeric data type), 2 (representing an
 * approximate numeric data type), or null (representing a data type for
 * which radix is not applicable).
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>PSEUDO_COLUMN</td>
 * <td>Always returns 1.</td>
 * </tr>
 */
function db2_special_columns($connection, ?string $qualifier, string $schema, string $table_name, int $scope) {}

function db2_specialcolumns() {}

/**
 * Returns a result set listing the index and statistics for a table
 * @link https://php.net/manual/en/function.db2-statistics.php
 * @param resource $connection <p>
 * A valid connection to an IBM DB2, Cloudscape, or Apache Derby database.
 * </p>
 * @param string|null $qualifier <p>
 * A qualifier for DB2 databases running on OS/390 or z/OS servers. For
 * other databases, pass null or an empty string.
 * </p>
 * @param string|null $schema <p>
 * The schema that contains the targeted table. If this parameter is
 * null, the statistics and indexes are returned for the schema of the
 * current user.
 * </p>
 * @param string $table_name <p>
 * The name of the table.
 * </p>
 * @param bool $unique <p>
 * Whether to return the only the unique indexes or all the indexes in the table.
 * </p>
 * <p>
 * Return only the information for unique indexes on the table.
 * </p>
 * @return resource|false A statement resource with a result set containing rows describing
 * the statistics and indexes for the base tables matching the specified
 * parameters. The rows are composed of the following columns:
 * <table>
 * <tr valign="top">
 * <td>Column name</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>TABLE_CAT</td>
 * <td>The catalog that contains the table. The value is null if
 * this table does not have catalogs.</td>
 * </tr>
 * <tr valign="top">
 * <td>TABLE_SCHEM</td>
 * <td>Name of the schema that contains the table.</td>
 * </tr>
 * <tr valign="top">
 * <td>TABLE_NAME</td>
 * <td>Name of the table.</td>
 * </tr>
 * <tr valign="top">
 * <td>NON_UNIQUE</td>
 * <td>
 * <table>
 * <p>
 * An boolean value representing whether the index prohibits unique
 * values, or whether the row represents statistics on the table itself:</p>
 * <tr valign="top">
 * <td>Return value</td>
 * <td>Parameter type</td>
 * </tr>
 * <tr valign="top">
 * <td>false (SQL_FALSE)</td>
 * <td>The index allows duplicate values.</td>
 * </tr>
 * <tr valign="top">
 * <td>true (SQL_TRUE)</td>
 * <td>The index values must be unique.</td>
 * </tr>
 * <tr valign="top">
 * <td>null</td>
 * <td>This row is statistics information for the table itself.</td>
 * </tr>
 * </table>
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>INDEX_QUALIFIER</td>
 * <td>A string value representing the qualifier that would have to be
 * prepended to INDEX_NAME to fully qualify the index.</td>
 * </tr>
 * <tr valign="top">
 * <td>INDEX_NAME</td>
 * <td>A string representing the name of the index.</td>
 * </tr>
 * <tr valign="top">
 * <td>TYPE</td>
 * <td>
 * <p>
 * An integer value representing the type of information contained in
 * this row of the result set:</p>
 * <table>
 * <tr valign="top">
 * <td>Return value</td>
 * <td>Parameter type</td>
 * </tr>
 * <tr valign="top">
 * <td>0 (SQL_TABLE_STAT)</td>
 * <td>The row contains statistics about the table itself.</td>
 * </tr>
 * <tr valign="top">
 * <td>1 (SQL_INDEX_CLUSTERED)</td>
 * <td>The row contains information about a clustered index.</td>
 * </tr>
 * <tr valign="top">
 * <td>2 (SQL_INDEX_HASH)</td>
 * <td>The row contains information about a hashed index.</td>
 * </tr>
 * <tr valign="top">
 * <td>3 (SQL_INDEX_OTHER)</td>
 * <td>The row contains information about a type of index that
 * is neither clustered nor hashed.</td>
 * </tr>
 * </table>
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>ORDINAL_POSITION</td>
 * <td>The 1-indexed position of the column in the index. null if
 * the row contains statistics information about the table itself.</td>
 * </tr>
 * <tr valign="top">
 * <td>COLUMN_NAME</td>
 * <td>The name of the column in the index. null if the row
 * contains statistics information about the table itself.</td>
 * </tr>
 * <tr valign="top">
 * <td>ASC_OR_DESC</td>
 * <td>
 * A if the column is sorted in ascending order,
 * D if the column is sorted in descending order,
 * null if the row contains statistics information about the table
 * itself.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>CARDINALITY</td>
 * <td>
 * <p>
 * If the row contains information about an index, this column contains
 * an integer value representing the number of unique values in the
 * index.
 * </p>
 * <p>
 * If the row contains information about the table itself, this column
 * contains an integer value representing the number of rows in the
 * table.
 * </p>
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>PAGES</td>
 * <td>
 * <p>
 * If the row contains information about an index, this column contains
 * an integer value representing the number of pages used to store the
 * index.
 * </p>
 * <p>
 * If the row contains information about the table itself, this column
 * contains an integer value representing the number of pages used to
 * store the table.
 * </p>
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>FILTER_CONDITION</td>
 * <td>Always returns null.</td>
 * </tr>
 * </table>
 */
function db2_statistics($connection, ?string $qualifier, ?string $schema, string $table_name, bool $unique) {}

/**
 * Returns a result set listing the tables and associated privileges in a database
 * @link https://php.net/manual/en/function.db2-table-privileges.php
 * @param resource $connection <p>
 * A valid connection to an IBM DB2, Cloudscape, or Apache Derby database.
 * </p>
 * @param string|null $qualifier <p>
 * A qualifier for DB2 databases running on OS/390 or z/OS servers. For
 * other databases, pass null or an empty string.
 * </p>
 * @param string|null $schema <p>
 * The schema which contains the tables. This parameter accepts a
 * search pattern containing _ and %
 * as wildcards.
 * </p>
 * @param string|null $table_name <p>
 * The name of the table. This parameter accepts a search pattern
 * containing _ and % as wildcards.
 * </p>
 * @return resource|false A statement resource with a result set containing rows describing
 * the privileges for the tables that match the specified parameters. The rows
 * are composed of the following columns:
 * <tr valign="top">
 * <td>Column name</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>TABLE_CAT</td>
 * <td>The catalog that contains the table. The value is null if
 * this table does not have catalogs.</td>
 * </tr>
 * <tr valign="top">
 * <td>TABLE_SCHEM</td>
 * <td>Name of the schema that contains the table.</td>
 * </tr>
 * <tr valign="top">
 * <td>TABLE_NAME</td>
 * <td>Name of the table.</td>
 * </tr>
 * <tr valign="top">
 * <td>GRANTOR</td>
 * <td>Authorization ID of the user who granted the privilege.</td>
 * </tr>
 * <tr valign="top">
 * <td>GRANTEE</td>
 * <td>Authorization ID of the user to whom the privilege was
 * granted.</td>
 * </tr>
 * <tr valign="top">
 * <td>PRIVILEGE</td>
 * <td>
 * The privilege that has been granted. This can be one of ALTER,
 * CONTROL, DELETE, INDEX, INSERT, REFERENCES, SELECT, or UPDATE.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>IS_GRANTABLE</td>
 * <td>
 * A string value of "YES" or "NO" indicating whether the grantee
 * can grant the privilege to other users.
 * </td>
 * </tr>
 */
function db2_table_privileges($connection, ?string $qualifier = null, ?string $schema = null, ?string $table_name = null) {}

function db2_tableprivileges() {}

/**
 * Returns a result set listing the tables and associated metadata in a database
 * @link https://php.net/manual/en/function.db2-tables.php
 * @param resource $connection <p>
 * A valid connection to an IBM DB2, Cloudscape, or Apache Derby database.
 * </p>
 * @param string|null $qualifier <p>
 * A qualifier for DB2 databases running on OS/390 or z/OS servers. For
 * other databases, pass null or an empty string.
 * </p>
 * @param string|null $schema <p>
 * The schema which contains the tables. This parameter accepts a
 * search pattern containing _ and %
 * as wildcards.
 * </p>
 * @param string|null $table_name
 * @param string|null $table_type
 * @return resource|false A statement resource with a result set containing rows describing
 * the tables that match the specified parameters. The rows are composed of
 * the following columns:
 * <tr valign="top">
 * <td>Column name</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>TABLE_CAT</td>
 * <td>The catalog that contains the table. The value is null if
 * this table does not have catalogs.</td>
 * </tr>
 * <tr valign="top">
 * <td>TABLE_SCHEM</td>
 * <td>Name of the schema that contains the table.</td>
 * </tr>
 * <tr valign="top">
 * <td>TABLE_NAME</td>
 * <td>Name of the table.</td>
 * </tr>
 * <tr valign="top">
 * <td>TABLE_TYPE</td>
 * <td>Table type identifier for the table.</td>
 * </tr>
 * <tr valign="top">
 * <td>REMARKS</td>
 * <td>Description of the table.</td>
 * </tr>
 */
function db2_tables($connection, ?string $qualifier = null, ?string $schema = null, ?string $table_name = null, ?string $table_type = null) {}

/**
 * Executes an SQL statement directly
 * @link https://php.net/manual/en/function.db2-exec.php
 * @param resource $connection <p>
 * A valid database connection resource variable as returned from
 * db2_connect or db2_pconnect.
 * </p>
 * @param string $statement <p>
 * An SQL statement. The statement cannot contain any parameter markers.
 * </p>
 * @param array $options <p>
 * An associative array containing statement options. You can use this
 * parameter to request a scrollable cursor on database servers that
 * support this functionality.
 * cursor
 * </p>
 * <p>
 * Passing the DB2_FORWARD_ONLY value requests a
 * forward-only cursor for this SQL statement. This is the default
 * type of cursor, and it is supported by all database servers. It is
 * also much faster than a scrollable cursor.
 * </p>
 * <p>
 * Passing the DB2_SCROLLABLE value requests a
 * scrollable cursor for this SQL statement. This type of cursor
 * enables you to fetch rows non-sequentially from the database
 * server. However, it is only supported by DB2 servers, and is much
 * slower than forward-only cursors.
 * </p>
 * @return resource|false A statement resource if the SQL statement was issued successfully,
 * or false if the database failed to execute the SQL statement.
 */
function db2_exec($connection, string $statement, array $options = []) {}

/**
 * Prepares an SQL statement to be executed
 * @link https://php.net/manual/en/function.db2-prepare.php
 * @param resource $connection <p>
 * A valid database connection resource variable as returned from
 * db2_connect or db2_pconnect.
 * </p>
 * @param string $statement <p>
 * An SQL statement, optionally containing one or more parameter markers..
 * </p>
 * @param array $options <p>
 * An associative array containing statement options. You can use this
 * parameter to request a scrollable cursor on database servers that
 * support this functionality.
 * cursor
 * </p>
 * </p>
 * Passing the DB2_FORWARD_ONLY value requests a
 * forward-only cursor for this SQL statement. This is the default
 * type of cursor, and it is supported by all database servers. It is
 * also much faster than a scrollable cursor.
 * </p>
 * <p>
 * Passing the DB2_SCROLLABLE value requests a
 * scrollable cursor for this SQL statement. This type of cursor
 * enables you to fetch rows non-sequentially from the database
 * server. However, it is only supported by DB2 servers, and is much
 * slower than forward-only cursors.
 * </p>
 * @return resource|false A statement resource if the SQL statement was successfully parsed and
 * prepared by the database server. Returns false if the database server
 * returned an error. You can determine which error was returned by calling
 * db2_stmt_error or db2_stmt_errormsg.
 */
function db2_prepare($connection, string $statement, array $options = []) {}

/**
 * Executes a prepared SQL statement
 * @link https://php.net/manual/en/function.db2-execute.php
 * @param resource $stmt <p>
 * A prepared statement returned from db2_prepare.
 * </p>
 * @param array $parameters <p>
 * An array of input parameters matching any parameter markers contained
 * in the prepared statement.
 * </p>
 * @return bool true on success or false on failure.
 */
function db2_execute($stmt, array $parameters = []): bool {}

/**
 * Returns a string containing the last SQL statement error message
 * @link https://php.net/manual/en/function.db2-stmt-errormsg.php
 * @param resource|null $stmt <p>
 * A valid statement resource or NULL.
 * </p>
 * @return string a string containing the error message and SQLCODE value for the
 * last error that occurred issuing an SQL statement.
 */
function db2_stmt_errormsg($stmt = null) {}

/**
 * Returns the last connection error message and SQLCODE value
 * @link https://php.net/manual/en/function.db2-conn-errormsg.php
 * @param resource|null $connection <p>
 * A connection resource associated with a connection that initially
 * succeeded, but which over time became invalid.
 * </p>
 * @return string a string containing the error message and SQLCODE value resulting
 * from a failed connection attempt. If there is no error associated with the last
 * connection attempt, db2_conn_errormsg returns an empty
 * string.
 */
function db2_conn_errormsg($connection = null) {}

/**
 * Returns a string containing the SQLSTATE returned by the last connection attempt
 * @link https://php.net/manual/en/function.db2-conn-error.php
 * @param resource|null $connection <p>
 * A connection resource associated with a connection that initially
 * succeeded, but which over time became invalid.
 * </p>
 * @return string the SQLSTATE value resulting from a failed connection attempt.
 * Returns an empty string if there is no error associated with the last
 * connection attempt.
 */
function db2_conn_error($connection = null) {}

/**
 * Returns a string containing the SQLSTATE returned by an SQL statement
 * @link https://php.net/manual/en/function.db2-stmt-error.php
 * @param resource|null $stmt <p>
 * A valid statement resource or NULL.
 * </p>
 * @return string a string containing an SQLSTATE value.
 */
function db2_stmt_error($stmt = null) {}

/**
 * Requests the next result set from a stored procedure
 * @link https://php.net/manual/en/function.db2-next-result.php
 * @param resource $stmt <p>
 * A prepared statement returned from db2_exec or
 * db2_execute.
 * </p>
 * @return resource|false A new statement resource containing the next result set if the
 * stored procedure returned another result set. Returns false if the stored
 * procedure did not return another result set.
 */
function db2_next_result($stmt) {}

/**
 * Returns the number of fields contained in a result set
 * @link https://php.net/manual/en/function.db2-num-fields.php
 * @param resource $stmt <p>
 * A valid statement resource containing a result set.
 * </p>
 * @return int|false An integer value representing the number of fields in the result
 * set associated with the specified statement resource. Returns false if
 * the statement resource is not a valid input value.
 */
function db2_num_fields($stmt): int|false {}

/**
 * Returns the number of rows affected by an SQL statement
 * @link https://php.net/manual/en/function.db2-num-rows.php
 * @param resource $stmt <p>
 * A valid stmt resource containing a result set.
 * </p>
 * @return int|false the number of rows affected by the last SQL statement issued by
 * the specified statement handle, or false in case of failure.
 */
function db2_num_rows($stmt): int|false {}

/**
 * Returns the name of the column in the result set
 * @link https://php.net/manual/en/function.db2-field-name.php
 * @param resource $stmt <p>
 * Specifies a statement resource containing a result set.
 * </p>
 * @param int|string $column <p>
 * Specifies the column in the result set. This can either be an integer
 * representing the 0-indexed position of the column, or a string
 * containing the name of the column.
 * </p>
 * @return string|false A string containing the name of the specified column. If the
 * specified column does not exist in the result
 * set, db2_field_name returns false.
 */
function db2_field_name($stmt, int|string $column): string|false {}

/**
 * Returns the maximum number of bytes required to display a column
 * @link https://php.net/manual/en/function.db2-field-display-size.php
 * @param resource $stmt <p>
 * Specifies a statement resource containing a result set.
 * </p>
 * @param int|string $column <p>
 * Specifies the column in the result set. This can either be an integer
 * representing the 0-indexed position of the column, or a string
 * containing the name of the column.
 * </p>
 * @return int|false An integer value with the maximum number of bytes required to
 * display the specified column. If the column does not exist in the result
 * set, db2_field_display_size returns false.
 */
function db2_field_display_size($stmt, int|string $column): int|false {}

/**
 * Returns the position of the named column in a result set
 * @link https://php.net/manual/en/function.db2-field-num.php
 * @param resource $stmt <p>
 * Specifies a statement resource containing a result set.
 * </p>
 * @param int|string $column <p>
 * Specifies the column in the result set. This can either be an integer
 * representing the 0-indexed position of the column, or a string
 * containing the name of the column.
 * </p>
 * @return int|false An integer containing the 0-indexed position of the named column in
 * the result set. If the specified column does not exist in the result set,
 * db2_field_num returns false.
 */
function db2_field_num($stmt, int|string $column): int|false {}

/**
 * Returns the precision of the indicated column in a result set
 * @link https://php.net/manual/en/function.db2-field-precision.php
 * @param resource $stmt <p>
 * Specifies a statement resource containing a result set.
 * </p>
 * @param int|string $column <p>
 * Specifies the column in the result set. This can either be an integer
 * representing the 0-indexed position of the column, or a string
 * containing the name of the column.
 * </p>
 * @return int|false An integer containing the precision of the specified column. If the
 * specified column does not exist in the result set,
 * db2_field_precision returns false.
 */
function db2_field_precision($stmt, int|string $column): int|false {}

/**
 * Returns the scale of the indicated column in a result set
 * @link https://php.net/manual/en/function.db2-field-scale.php
 * @param resource $stmt <p>
 * Specifies a statement resource containing a result set.
 * </p>
 * @param int|string $column <p>
 * Specifies the column in the result set. This can either be an integer
 * representing the 0-indexed position of the column, or a string
 * containing the name of the column.
 * </p>
 * @return int|false An integer containing the scale of the specified column. If the
 * specified column does not exist in the result set,
 * db2_field_scale returns false.
 */
function db2_field_scale($stmt, int|string $column): int|false {}

/**
 * Returns the data type of the indicated column in a result set
 * @link https://php.net/manual/en/function.db2-field-type.php
 * @param resource $stmt <p>
 * Specifies a statement resource containing a result set.
 * </p>
 * @param int|string $column <p>
 * Specifies the column in the result set. This can either be an integer
 * representing the 0-indexed position of the column, or a string
 * containing the name of the column.
 * </p>
 * @return string|false A string containing the defined data type of the specified column.
 * If the specified column does not exist in the result set,
 * db2_field_type returns false.
 */
function db2_field_type($stmt, int|string $column): string|false {}

/**
 * Returns the width of the current value of the indicated column in a result set
 * @link https://php.net/manual/en/function.db2-field-width.php
 * @param resource $stmt <p>
 * Specifies a statement resource containing a result set.
 * </p>
 * @param int|string $column <p>
 * Specifies the column in the result set. This can either be an integer
 * representing the 0-indexed position of the column, or a string
 * containing the name of the column.
 * </p>
 * @return int|false An integer containing the width of the specified character or
 * binary data type column in a result set. If the specified column does not
 * exist in the result set, db2_field_width returns
 * false.
 */
function db2_field_width($stmt, int|string $column): int|false {}

/**
 * Returns the cursor type used by a statement resource
 * @link https://php.net/manual/en/function.db2-cursor-type.php
 * @param resource $stmt <p>
 * A valid statement resource.
 * </p>
 * @return int either DB2_FORWARD_ONLY if the statement
 * resource uses a forward-only cursor or DB2_SCROLLABLE if
 * the statement resource uses a scrollable cursor.
 */
function db2_cursor_type($stmt): int {}

/**
 * Rolls back a transaction
 * @link https://php.net/manual/en/function.db2-rollback.php
 * @param resource $connection <p>
 * A valid database connection resource variable as returned from
 * db2_connect or db2_pconnect.
 * </p>
 * @return bool true on success or false on failure.
 */
function db2_rollback($connection): bool {}

/**
 * Frees resources associated with the indicated statement resource
 * @link https://php.net/manual/en/function.db2-free-stmt.php
 * @param resource $stmt <p>
 * A valid statement resource.
 * </p>
 * @return bool true on success or false on failure.
 */
function db2_free_stmt($stmt): bool {}

/**
 * Returns a single column from a row in the result set
 * @link https://php.net/manual/en/function.db2-result.php
 * @param resource $stmt <p>
 * A valid stmt resource.
 * </p>
 * @param int|string $column <p>
 * Either an integer mapping to the 0-indexed field in the result set, or
 * a string matching the name of the column.
 * </p>
 * @return mixed the value of the requested field if the field exists in the result
 * set. Returns NULL if the field does not exist, and issues a warning.
 */
function db2_result($stmt, int|string $column): mixed {}

/**
 * Sets the result set pointer to the next row or requested row
 * @link https://php.net/manual/en/function.db2-fetch-row.php
 * @param resource $stmt <p>
 * A valid stmt resource.
 * </p>
 * @param int $row_number <p>
 * With scrollable cursors, you can request a specific row number in the
 * result set. Row numbering is 1-indexed.
 * </p>
 * @return bool true if the requested row exists in the result set. Returns
 * false if the requested row does not exist in the result set.
 */
function db2_fetch_row($stmt, int $row_number = null) {}

/**
 * Returns an array, indexed by column name, representing a row in a result set
 * @link https://php.net/manual/en/function.db2-fetch-assoc.php
 * @param resource $stmt <p>
 * A valid stmt resource containing a result set.
 * </p>
 * @param int $row_number <p>
 * Requests a specific 1-indexed row from the result set. Passing this
 * parameter results in a PHP warning if the result set uses a
 * forward-only cursor.
 * </p>
 * @return array|false An associative array with column values indexed by the column name
 * representing the next or requested row in the result set. Returns false if
 * there are no rows left in the result set, or if the row requested by
 * row_number does not exist in the result set.
 */
function db2_fetch_assoc($stmt, int $row_number = null): array|false {}

/**
 * Returns an array, indexed by column position, representing a row in a result set
 * @link https://php.net/manual/en/function.db2-fetch-array.php
 * @param resource $stmt <p>
 * A valid stmt resource containing a result set.
 * </p>
 * @param int $row_number <p>
 * Requests a specific 1-indexed row from the result set. Passing this
 * parameter results in a PHP warning if the result set uses a
 * forward-only cursor.
 * </p>
 * @return array|false A 0-indexed array with column values indexed by the column position
 * representing the next or requested row in the result set. Returns false if
 * there are no rows left in the result set, or if the row requested by
 * row_number does not exist in the result set.
 */
function db2_fetch_array($stmt, int $row_number = null): array|false {}

/**
 * Returns an array, indexed by both column name and position, representing a row in a result set
 * @link https://php.net/manual/en/function.db2-fetch-both.php
 * @param resource $stmt <p>
 * A valid stmt resource containing a result set.
 * </p>
 * @param int $row_number <p>
 * Requests a specific 1-indexed row from the result set. Passing this
 * parameter results in a PHP warning if the result set uses a
 * forward-only cursor.
 * </p>
 * @return array|false An associative array with column values indexed by both the column
 * name and 0-indexed column number. The array represents the next or
 * requested row in the result set. Returns false if there are no rows left
 * in the result set, or if the row requested by
 * row_number does not exist in the result set.
 */
function db2_fetch_both($stmt, int $row_number = null): array|false {}

/**
 * Frees resources associated with a result set
 * @link https://php.net/manual/en/function.db2-free-result.php
 * @param resource $stmt <p>
 * A valid statement resource.
 * </p>
 * @return bool true on success or false on failure.
 */
function db2_free_result($stmt): bool {}

/**
 * Set options for connection or statement resources
 * @link https://php.net/manual/en/function.db2-set-option.php
 * @param resource $resource <p>
 * A valid statement resource as returned from
 * db2_prepare or a valid connection resource as
 * returned from db2_connect or
 * db2_pconnect.
 * </p>
 * @param array $options <p>
 * An associative array containing valid statement or connection
 * options. This parameter can be used to change autocommit values,
 * cursor types (scrollable or forward), and to specify the case of
 * the column names (lower, upper, or natural) that will appear in a
 * result set.
 * autocommit
 * <p>
 * Passing DB2_AUTOCOMMIT_ON turns
 * autocommit on for the specified connection resource.
 * </p>
 * <p>
 * Passing DB2_AUTOCOMMIT_OFF turns
 * autocommit off for the specified connection resource.
 * </p>
 * @param int $type <p>
 * An integer value that specifies the type of resource that was
 * passed into the function. The type of resource and this value
 * must correspond.
 * <p>
 * Passing 1 as the value specifies that
 * a connection resource has been passed into the function.
 * </p>
 * <p>
 * Passing any integer not equal to 1 as
 * the value specifies that a statement resource has been
 * passed into the function.
 * </p>
 * @return bool true on success or false on failure.
 */
function db2_set_option($resource, array $options, int $type): bool {}

function db2_setoption(): bool {}

/**
 * Returns an object with properties representing columns in the fetched row
 * @link https://php.net/manual/en/function.db2-fetch-object.php
 * @param resource $stmt <p>
 * A valid stmt resource containing a result set.
 * </p>
 * @param int $row_number <p>
 * Requests a specific 1-indexed row from the result set. Passing this
 * parameter results in a PHP warning if the result set uses a
 * forward-only cursor.
 * </p>
 * @return stdClass|false An object representing a single row in the result set. The
 * properties of the object map to the names of the columns in the result set.
 * </p>
 * <p>
 * The IBM DB2, Cloudscape, and Apache Derby database servers typically fold
 * column names to upper-case, so the object properties will reflect that case.
 * </p>
 * <p>
 * If your SELECT statement calls a scalar function to modify the value
 * of a column, the database servers return the column number as the name of
 * the column in the result set. If you prefer a more descriptive column name
 * and object property, you can use the AS clause to assign a name to the
 * column in the result set.
 * </p>
 * <p>
 * Returns false if no row was retrieved.
 */
function db2_fetch_object($stmt, int $row_number = null): stdClass|false {}

/**
 * Returns an object with properties that describe the DB2 database server
 * @link https://php.net/manual/en/function.db2-server-info.php
 * @param resource $connection <p>
 * Specifies an active DB2 client connection.
 * </p>
 * @return stdClass|false An object on a successful call. Returns false on failure.
 */
function db2_server_info($connection): stdClass|false {}

/**
 * Returns an object with properties that describe the DB2 database client
 * @link https://php.net/manual/en/function.db2-client-info.php
 * @param resource $connection <p>
 * Specifies an active DB2 client connection.
 * </p>
 * @return stdClass|false An object on a successful call. Returns false on failure.
 */
function db2_client_info($connection): stdClass|false {}

/**
 * Used to escape certain characters
 * @link https://php.net/manual/en/function.db2-escape-string.php
 * @param string $string_literal <p>
 * The string that contains special characters that need to be modified.
 * Characters that are prepended with a backslash are \x00,
 * \n, \r, \,
 * ', " and \x1a.
 * </p>
 * @return string string_literal with the special characters
 * noted above prepended with backslashes.
 */
function db2_escape_string(string $string_literal): string {}

/**
 * Gets a user defined size of LOB files with each invocation
 * @link https://php.net/manual/en/function.db2-lob-read.php
 * @param resource $stmt <p>
 * A valid stmt resource containing LOB data.
 * </p>
 * @param int $colnum <p>
 * A valid column number in the result set of the stmt resource.
 * </p>
 * @param int $length <p>
 * The size of the LOB data to be retrieved from the stmt resource.
 * </p>
 * @return string|false The amount of data the user specifies. Returns
 * false if the data cannot be retrieved.
 */
function db2_lob_read($stmt, int $colnum, int $length): string|false {}

/**
 * Retrieves an option value for a statement resource or a connection resource
 * @link https://php.net/manual/en/function.db2-get-option.php
 * @param resource $resource <p>
 * A valid statement resource as returned from
 * db2_prepare or a valid connection resource as
 * returned from db2_connect or
 * db2_pconnect.
 * </p>
 * @param string $option <p>
 * A valid statement or connection options. The following new options are available
 * as of ibm_db2 version 1.6.0. They provide useful tracking information
 * that can be set during execution with db2_get_option.
 * </p>
 * <p>
 * Note: Prior versions of ibm_db2 do not support these new options.
 * </p>
 * <p>
 * When the value in each option is being set, some servers might not handle
 * the entire length provided and might truncate the value.
 * </p>
 * <p>
 * To ensure that the data specified in each option is converted correctly
 * when transmitted to a host system, use only the characters A through Z,
 * 0 through 9, and the underscore (_) or period (.).
 * </p>
 * <p>
 * SQL_ATTR_INFO_USERID - A pointer to a null-terminated
 * character string used to identify the client user ID sent to the host
 * database server when using DB2 Connect.
 * </p>
 * <p>
 * Note: DB2 for z/OS and OS/390 servers support up to a length of 16 characters.
 * This user-id is not to be confused with the authentication user-id, it is for
 * identification purposes only and is not used for any authorization.
 * </p>
 * @return string|false The current setting of the connection attribute provided on success
 * or false on failure.
 */
function db2_get_option($resource, string $option): string|false {}

/**
 * Returns the auto generated ID of the last insert query that successfully executed on this connection.
 * @link https://php.net/manual/en/function.db2-last-insert-id.php
 * The result of this function is not affected by any of the following:
 * <ul><li>A single row INSERT statement with a VALUES clause for a table without an identity column.
 * <li>A multiple row INSERT statement with a VALUES clause.
 * <li>An INSERT statement with a fullselect.
 * <li>A ROLLBACK TO SAVEPOINT statement.
 * </ul>
 * @param resource $resource A valid connection resource as returned from db2_connect() or db2_pconnect().
 * The value of this parameter cannot be a statement resource or result set resource.
 * @return string|null Returns the auto generated ID of last insert query that successfully executed on this connection
 *                     or NULL if no ID was found.
 */
function db2_last_insert_id($resource): ?string {}

/**
 * Specifies that binary data shall be returned as is. This is the default
 * mode.
 * @link https://php.net/manual/en/ibm-db2.constants.php
 */
define('DB2_BINARY', 1);

/**
 * Specifies that binary data shall be converted to a hexadecimal encoding
 * and returned as an ASCII string.
 * @link https://php.net/manual/en/ibm-db2.constants.php
 */
define('DB2_CONVERT', 2);

/**
 * Specifies that binary data shall be converted to a null value.
 * @link https://php.net/manual/en/ibm-db2.constants.php
 */
define('DB2_PASSTHRU', 3);

/**
 * Specifies a scrollable cursor for a statement resource. This mode enables
 * random access to rows in a result set, but currently is supported only by
 * IBM DB2 Universal Database.
 * @link https://php.net/manual/en/ibm-db2.constants.php
 */
define('DB2_SCROLLABLE', 1);

/**
 * Specifies a forward-only cursor for a statement resource. This is the
 * default cursor type and is supported on all database servers.
 * @link https://php.net/manual/en/ibm-db2.constants.php
 */
define('DB2_FORWARD_ONLY', 0);

/**
 * Specifies the PHP variable should be bound as an IN parameter for a
 * stored procedure.
 * @link https://php.net/manual/en/ibm-db2.constants.php
 */
define('DB2_PARAM_IN', 1);

/**
 * Specifies the PHP variable should be bound as an OUT parameter for a
 * stored procedure.
 * @link https://php.net/manual/en/ibm-db2.constants.php
 */
define('DB2_PARAM_OUT', 4);

/**
 * Specifies the PHP variable should be bound as an INOUT parameter for a
 * stored procedure.
 * @link https://php.net/manual/en/ibm-db2.constants.php
 */
define('DB2_PARAM_INOUT', 2);

/**
 * Specifies that the column should be bound directly to a file for input.
 * @link https://php.net/manual/en/ibm-db2.constants.php
 */
define('DB2_PARAM_FILE', 11);

/**
 * Specifies that autocommit should be turned on.
 * @link https://php.net/manual/en/ibm-db2.constants.php
 */
define('DB2_AUTOCOMMIT_ON', 1);

/**
 * Specifies that autocommit should be turned off.
 * @link https://php.net/manual/en/ibm-db2.constants.php
 */
define('DB2_AUTOCOMMIT_OFF', 0);

/**
 * Specifies that deferred prepare should be turned on for the specified statement resource.
 * @link https://php.net/manual/en/ibm-db2.constants.php
 */
define('DB2_DEFERRED_PREPARE_ON', 1);

/**
 * Specifies that deferred prepare should be turned off for the specified statement resource.
 * @link https://php.net/manual/en/ibm-db2.constants.php
 */
define('DB2_DEFERRED_PREPARE_OFF', 0);

/**
 * Specifies that the variable should be bound as a DOUBLE, FLOAT, or REAL
 * data type.
 * @link https://php.net/manual/en/ibm-db2.constants.php
 */
define('DB2_DOUBLE', 8);

/**
 * Specifies that the variable should be bound as a SMALLINT, INTEGER, or
 * BIGINT data type.
 * @link https://php.net/manual/en/ibm-db2.constants.php
 */
define('DB2_LONG', 4);

/**
 * Specifies that the variable should be bound as a CHAR or VARCHAR data type.
 * @link https://php.net/manual/en/ibm-db2.constants.php
 */
define('DB2_CHAR', 1);
define('DB2_XML', -370);

/**
 * Specifies that column names will be returned in their natural case.
 * @link https://php.net/manual/en/ibm-db2.constants.php
 */
define('DB2_CASE_NATURAL', 0);

/**
 * Specifies that column names will be returned in lower case.
 * @link https://php.net/manual/en/ibm-db2.constants.php
 */
define('DB2_CASE_LOWER', 1);

/**
 * Specifies that column names will be returned in upper case.
 * @link https://php.net/manual/en/ibm-db2.constants.php
 */
define('DB2_CASE_UPPER', 2);

// End of ibm_db2 v.1.6.0
<?php

// Start of gmp v.
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Pure;

/**
 * Create GMP number
 * @link https://php.net/manual/en/function.gmp-init.php
 * @param mixed $num <p>
 * An integer or a string. The string representation can be decimal,
 * hexadecimal or octal.
 * </p>
 * @param int $base [optional] <p>
 * The base.
 * </p>
 * <p>
 * The base may vary from 2 to 36. If base is 0 (default value), the
 * actual base is determined from the leading characters: if the first
 * two characters are 0x or 0X,
 * hexadecimal is assumed, otherwise if the first character is "0",
 * octal is assumed, otherwise decimal is assumed.
 * </p>
 * @return resource|GMP A GMP number resource.
 */
#[Pure]
function gmp_init(string|int $num, int $base = 0): GMP {}

/**
 * Convert GMP number to integer
 * @link https://php.net/manual/en/function.gmp-intval.php
 * @param resource|int|string|GMP $num <p>
 * A GMP number.
 * </p>
 * @return int An integer value of <i>gmpnumber</i>.
 */
#[Pure]
function gmp_intval(GMP|string|int $num): int {}

/**
 * Sets the RNG seed
 * @param resource|string|int|GMP $seed <p>
 * The seed to be set for the {@see gmp_random()}, {@see gmp_random_bits()}, and {@see gmp_random_range()} functions.
 * </p>
 * Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 and later, or a numeric string provided that it is possible to convert the latter to a number.
 * @return void|null|false Returns NULL on success.
 * @since 7.0
 */
function gmp_random_seed(GMP|string|int $seed): void {}
/**
 * Convert GMP number to string
 * @link https://php.net/manual/en/function.gmp-strval.php
 * @param resource|int|string|GMP $num <p>
 * The GMP number that will be converted to a string.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param int $base [optional] <p>
 * The base of the returned number. The default base is 10.
 * Allowed values for the base are from 2 to 62 and -2 to -36.
 * </p>
 * @return string The number, as a string.
 */
#[Pure]
function gmp_strval(GMP|string|int $num, int $base = 10): string {}

/**
 * Add numbers
 * @link https://php.net/manual/en/function.gmp-add.php
 * @param resource|int|string|GMP $num1 <p>
 * A number that will be added.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param resource|string|GMP $num2 <p>
 * A number that will be added.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @return resource|GMP A GMP number representing the sum of the arguments.
 */
#[Pure]
function gmp_add(GMP|string|int $num1, GMP|string|int $num2): GMP {}

/**
 * Subtract numbers
 * @link https://php.net/manual/en/function.gmp-sub.php
 * @param resource|string|GMP $num1 <p>
 * The number being subtracted from.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param resource|string|GMP $num2 <p>
 * The number subtracted from <i>a</i>.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @return resource|GMP A GMP number resource.
 */
#[Pure]
function gmp_sub(GMP|string|int $num1, GMP|string|int $num2): GMP {}

/**
 * Multiply numbers
 * @link https://php.net/manual/en/function.gmp-mul.php
 * @param resource|string|GMP $num1 <p>
 * A number that will be multiplied by <i>b</i>.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param resource|string|GMP $num2 <p>
 * A number that will be multiplied by <i>a</i>.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @return resource|GMP A GMP number resource.
 */
#[Pure]
function gmp_mul(GMP|string|int $num1, GMP|string|int $num2): GMP {}

/**
 * Divide numbers and get quotient and remainder
 * @link https://php.net/manual/en/function.gmp-div-qr.php
 * @param resource|string|GMP $num1 <p>
 * The number being divided.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param resource|string|GMP $num2 <p>
 * The number that <i>n</i> is being divided by.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param int $rounding_mode [optional] <p>
 * See the <b>gmp_div_q</b> function for description
 * of the <i>round</i> argument.
 * </p>
 * @return array an array, with the first
 * element being [n/d] (the integer result of the
 * division) and the second being (n - [n/d] * d)
 * (the remainder of the division).
 */
#[Pure]
function gmp_div_qr(GMP|string|int $num1, GMP|string|int $num2, int $rounding_mode = GMP_ROUND_ZERO): array {}

/**
 * Divide numbers
 * @link https://php.net/manual/en/function.gmp-div-q.php
 * @param resource|string|GMP $num1 <p>
 * The number being divided.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param resource|string|GMP $num2 <p>
 * The number that <i>a</i> is being divided by.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param int $rounding_mode [optional] <p>
 * The result rounding is defined by the
 * <i>round</i>, which can have the following
 * values:
 * <b>GMP_ROUND_ZERO</b>: The result is truncated
 * towards 0.</p>
 * @return resource|GMP A GMP number resource.
 */
#[Pure]
function gmp_div_q(GMP|string|int $num1, GMP|string|int $num2, int $rounding_mode = GMP_ROUND_ZERO): GMP {}

/**
 * Remainder of the division of numbers
 * @link https://php.net/manual/en/function.gmp-div-r.php
 * @param resource|string|GMP $num1 <p>
 * The number being divided.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param resource|string|GMP $num2 <p>
 * The number that <i>n</i> is being divided by.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param int $rounding_mode [optional] <p>
 * See the <b>gmp_div_q</b> function for description
 * of the <i>round</i> argument.
 * </p>
 * @return resource|GMP The remainder, as a GMP number.
 */
#[Pure]
function gmp_div_r(GMP|string|int $num1, GMP|string|int $num2, int $rounding_mode = GMP_ROUND_ZERO): GMP {}

/**
 * Divide numbers
 * @link https://php.net/manual/en/function.gmp-div-q.php
 * @param resource|string|GMP $num1 <p>
 * The number being divided.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param resource|string|GMP $num2 <p>
 * The number that <i>a</i> is being divided by.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param int $rounding_mode [optional] <p>
 * The result rounding is defined by the
 * <i>round</i>, which can have the following
 * values:
 * <b>GMP_ROUND_ZERO</b>: The result is truncated
 * towards 0.</p>
 * @return resource|GMP A GMP number resource.
 */
#[Pure]
function gmp_div(GMP|string|int $num1, GMP|string|int $num2, int $rounding_mode = GMP_ROUND_ZERO): GMP {}

/**
 * Modulo operation
 * @link https://php.net/manual/en/function.gmp-mod.php
 * @param resource|string|GMP $num1 <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param resource|string|GMP $num2 <p>
 * The modulo that is being evaluated.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @return resource|GMP A GMP number resource.
 */
#[Pure]
function gmp_mod(GMP|string|int $num1, GMP|string|int $num2): GMP {}

/**
 * Exact division of numbers
 * @link https://php.net/manual/en/function.gmp-divexact.php
 * @param resource|string|GMP $num1 <p>
 * The number being divided.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param resource|string|GMP $num2 <p>
 * The number that <i>a</i> is being divided by.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @return resource|GMP A GMP number resource.
 */
#[Pure]
function gmp_divexact(GMP|string|int $num1, GMP|string|int $num2): GMP {}

/**
 * Negate number
 * @link https://php.net/manual/en/function.gmp-neg.php
 * @param resource|string|GMP $num <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @return resource|GMP -<i>a</i>, as a GMP number.
 */
#[Pure]
function gmp_neg(GMP|string|int $num): GMP {}

/**
 * Absolute value
 * @link https://php.net/manual/en/function.gmp-abs.php
 * @param resource|string|GMP $num <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @return resource|GMP the absolute value of <i>a</i>, as a GMP number.
 */
#[Pure]
function gmp_abs(GMP|string|int $num): GMP {}

/**
 * Factorial
 * @link https://php.net/manual/en/function.gmp-fact.php
 * @param resource|string|GMP $num <p>
 * The factorial number.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @return resource|GMP A GMP number resource.
 */
#[Pure]
function gmp_fact(GMP|string|int $num): GMP {}

/**
 * Calculate square root
 * @link https://php.net/manual/en/function.gmp-sqrt.php
 * @param resource|string|GMP $num <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @return resource|GMP The integer portion of the square root, as a GMP number.
 */
#[Pure]
function gmp_sqrt(GMP|string|int $num): GMP {}

/**
 * Square root with remainder
 * @link https://php.net/manual/en/function.gmp-sqrtrem.php
 * @param resource|string|GMP $num <p>
 * The number being square rooted.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @return array array where first element is the integer square root of
 * <i>a</i> and the second is the remainder
 * (i.e., the difference between <i>a</i> and the
 * first element squared).
 */
#[Pure]
function gmp_sqrtrem(GMP|string|int $num): array {}

/**
 * Raise number into power
 * @link https://php.net/manual/en/function.gmp-pow.php
 * @param resource|string|GMP $num <p>
 * The base number.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param positive-int $exponent <p>
 * The positive power to raise the <i>base</i>.
 * </p>
 * @return resource|GMP The new (raised) number, as a GMP number. The case of
 * 0^0 yields 1.
 */
#[Pure]
function gmp_pow(GMP|string|int $num, int $exponent): GMP {}

/**
 * Raise number into power with modulo
 * @link https://php.net/manual/en/function.gmp-powm.php
 * @param resource|string|GMP $num <p>
 * The base number.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param resource|string|GMP $exponent <p>
 * The positive power to raise the <i>base</i>.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param resource|string|GMP $modulus <p>
 * The modulo.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @return resource|GMP The new (raised) number, as a GMP number.
 */
#[Pure]
function gmp_powm(GMP|string|int $num, GMP|string|int $exponent, GMP|string|int $modulus): GMP {}

/**
 * Perfect square check
 * @link https://php.net/manual/en/function.gmp-perfect-square.php
 * @param resource|string|GMP $num <p>
 * The number being checked as a perfect square.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @return bool <b>TRUE</b> if <i>a</i> is a perfect square,
 * <b>FALSE</b> otherwise.
 */
#[Pure]
function gmp_perfect_square(GMP|string|int $num): bool {}

/**
 * Check if number is "probably prime"
 * @link https://php.net/manual/en/function.gmp-prob-prime.php
 * @param resource|string|GMP $num <p>
 * The number being checked as a prime.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param int $repetitions [optional] <p>
 * Reasonable values
 * of <i>reps</i> vary from 5 to 10 (default being
 * 10); a higher value lowers the probability for a non-prime to
 * pass as a "probable" prime.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @return int If this function returns 0, <i>a</i> is
 * definitely not prime. If it returns 1, then
 * <i>a</i> is "probably" prime. If it returns 2,
 * then <i>a</i> is surely prime.
 */
#[Pure]
function gmp_prob_prime(GMP|string|int $num, int $repetitions = 10): int {}

/**
 * Random number
 * @link https://php.net/manual/en/function.gmp-random-bits.php
 * @param int $bits <p>The number of bits. Either a GMP number resource in PHP 5.5 and earlier,
 * a GMP object in PHP 5.6 and later,
 * or a numeric string provided that it is possible to convert the latter to a number.</p>
 * @return GMP A random GMP number.
 */
function gmp_random_bits(int $bits): GMP {}

/**
 * Random number
 * @link https://php.net/manual/en/function.gmp-random-range.php
 * @param GMP|string|int $min <p>A GMP number representing the lower bound for the random number</p>
 * @param GMP|string|int $max <p>A GMP number representing the upper bound for the random number</p>
 * @return GMP A random GMP number.
 */
function gmp_random_range(GMP|string|int $min, GMP|string|int $max): GMP {}

/**
 * Calculate GCD
 * @link https://php.net/manual/en/function.gmp-gcd.php
 * @param resource|string|GMP $num1 <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param resource|string|GMP $num2 <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @return resource|GMP A positive GMP number that divides into both
 * <i>a</i> and <i>b</i>.
 */
#[Pure]
function gmp_gcd(GMP|string|int $num1, GMP|string|int $num2): GMP {}

/**
 * Calculate GCD and multipliers
 * @link https://php.net/manual/en/function.gmp-gcdext.php
 * @param resource|string|GMP $num1 <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param resource|string|GMP $num2 <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @return array An array of GMP numbers.
 */
#[Pure]
#[ArrayShape(["g" => "mixed", "s" => "mixed", "t" => "mixed"])]
function gmp_gcdext(GMP|string|int $num1, GMP|string|int $num2): array {}

/**
 * Inverse by modulo
 * @link https://php.net/manual/en/function.gmp-invert.php
 * @param resource|string|GMP $num1 <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param resource|string|GMP $num2 <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @return resource|GMP|false A GMP number on success or <b>FALSE</b> if an inverse does not exist.
 */
#[Pure]
function gmp_invert(GMP|string|int $num1, GMP|string|int $num2): GMP|false {}

/**
 * Jacobi symbol
 * @link https://php.net/manual/en/function.gmp-jacobi.php
 * @param resource|string|GMP $num1 <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param resource|string|GMP $num2 <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * <p>
 * Should be odd and must be positive.
 * </p>
 * @return int A GMP number resource.
 */
#[Pure]
function gmp_jacobi(GMP|string|int $num1, GMP|string|int $num2): int {}

/**
 * Legendre symbol
 * @link https://php.net/manual/en/function.gmp-legendre.php
 * @param resource|string|GMP $num1 <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param resource|string|GMP $num2 <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * <p>
 * Should be odd and must be positive.
 * </p>
 * @return int A GMP number resource.
 */
#[Pure]
function gmp_legendre(GMP|string|int $num1, GMP|string|int $num2): int {}

/**
 * Compare numbers
 * @link https://php.net/manual/en/function.gmp-cmp.php
 * @param resource|string|GMP $num1 <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param resource|string|GMP $num2 <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @return int a positive value if a &gt; b, zero if
 * a = b and a negative value if a &lt;
 * b.
 */
#[Pure]
function gmp_cmp(GMP|string|int $num1, GMP|string|int $num2): int {}

/**
 * Sign of number
 * @link https://php.net/manual/en/function.gmp-sign.php
 * @param resource|string|GMP $num <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @return int 1 if <i>a</i> is positive,
 * -1 if <i>a</i> is negative,
 * and 0 if <i>a</i> is zero.
 */
#[Pure]
function gmp_sign(GMP|string|int $num): int {}

/**
 * Random number
 * @link https://php.net/manual/en/function.gmp-random.php
 * @param int $limiter [optional] <p>
 * The limiter.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @return resource|GMP A random GMP number.
 * @see gmp_random_bits()
 * @see gmp_random_range()
 * @removed 8.0
 */
#[Deprecated(reason: "Use see gmp_random_bits() or see gmp_random_range() instead", since: "7.2")]
function gmp_random($limiter = 20) {}

/**
 * Bitwise AND
 * @link https://php.net/manual/en/function.gmp-and.php
 * @param resource|string|GMP $num1 <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param resource|string|GMP $num2 <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @return resource|GMP A GMP number representing the bitwise AND comparison.
 */
#[Pure]
function gmp_and(GMP|string|int $num1, GMP|string|int $num2): GMP {}

/**
 * Bitwise OR
 * @link https://php.net/manual/en/function.gmp-or.php
 * @param resource|string|GMP $num1 <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param resource|string|GMP $num2 <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @return resource|GMP A GMP number resource.
 */
#[Pure]
function gmp_or(GMP|string|int $num1, GMP|string|int $num2): GMP {}

/**
 * Calculates one's complement
 * @link https://php.net/manual/en/function.gmp-com.php
 * @param resource|string|GMP $num <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @return resource|GMP the one's complement of <i>a</i>, as a GMP number.
 */
#[Pure]
function gmp_com(GMP|string|int $num): GMP {}

/**
 * Bitwise XOR
 * @link https://php.net/manual/en/function.gmp-xor.php
 * @param resource|string|GMP $num1 <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param resource|string|GMP $num2 <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @return resource|GMP A GMP number resource.
 */
#[Pure]
function gmp_xor(GMP|string|int $num1, GMP|string|int $num2): GMP {}

/**
 * Set bit
 * @link https://php.net/manual/en/function.gmp-setbit.php
 * @param resource|string|GMP $num <p>
 * The number being set to.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param int $index <p>
 * The set bit.
 * </p>
 * @param bool $value [optional] <p>
 * Defines if the bit is set to 0 or 1. By default the bit is set to
 * 1. Index starts at 0.
 * </p>
 * @return void A GMP number resource.
 */
function gmp_setbit(GMP $num, int $index, bool $value = true): void {}

/**
 * Clear bit
 * @link https://php.net/manual/en/function.gmp-clrbit.php
 * @param resource|string|GMP $num <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param int $index <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @return void A GMP number resource.
 */
function gmp_clrbit(GMP $num, int $index): void {}

/**
 * Scan for 0
 * @link https://php.net/manual/en/function.gmp-scan0.php
 * @param resource|string|GMP $num1 <p>
 * The number to scan.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param int $start <p>
 * The starting bit.
 * </p>
 * @return int the index of the found bit, as an integer. The
 * index starts from 0.
 */
#[Pure]
function gmp_scan0(GMP|string|int $num1, int $start): int {}

/**
 * Scan for 1
 * @link https://php.net/manual/en/function.gmp-scan1.php
 * @param resource|string|GMP $num1 <p>
 * The number to scan.
 * </p>
 * <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param int $start <p>
 * The starting bit.
 * </p>
 * @return int the index of the found bit, as an integer.
 * If no set bit is found, -1 is returned.
 */
#[Pure]
function gmp_scan1(GMP|string|int $num1, int $start): int {}

/**
 * Tests if a bit is set
 * @link https://php.net/manual/en/function.gmp-testbit.php
 * @param resource|string|GMP $num <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @param int $index <p>
 * The bit to test
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
#[Pure]
function gmp_testbit(GMP|string|int $num, int $index): bool {}

/**
 * Population count
 * @link https://php.net/manual/en/function.gmp-popcount.php
 * @param resource|string|GMP $num <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @return int The population count of <i>a</i>, as an integer.
 */
#[Pure]
function gmp_popcount(GMP|string|int $num): int {}

/**
 * Hamming distance
 * @link https://php.net/manual/en/function.gmp-hamdist.php
 * @param resource|string|GMP $num1 <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * <p>
 * It should be positive.
 * </p>
 * @param resource|string|GMP $num2 <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * <p>
 * It should be positive.
 * </p>
 * @return int A GMP number resource.
 */
#[Pure]
function gmp_hamdist(GMP|string|int $num1, GMP|string|int $num2): int {}

/**
 * Import from a binary string
 * @link https://php.net/manual/en/function.gmp-import.php
 * @param string $data The binary string being imported
 * @param int $word_size <p>Default value is 1. The number of bytes in each chunk of binary
 * data. This is mainly used in conjunction with the options parameter.</p>
 * @param int $flags Default value is GMP_MSW_FIRST | GMP_NATIVE_ENDIAN.
 * @return GMP|false Returns a GMP number or FALSE on failure.
 * @since 5.6.1
 */
#[Pure]
function gmp_import(string $data, int $word_size = 1, int $flags = GMP_MSW_FIRST|GMP_NATIVE_ENDIAN): GMP {}

/**
 * Export to a binary string
 * @link https://php.net/manual/en/function.gmp-export.php
 * @param GMP|string|int $num The GMP number being exported
 * @param int $word_size <p>Default value is 1. The number of bytes in each chunk of binary
 * data. This is mainly used in conjunction with the options parameter.</p>
 * @param int $flags Default value is GMP_MSW_FIRST | GMP_NATIVE_ENDIAN.
 * @return string|false Returns a string or FALSE on failure.
 * @since 5.6.1
 */
#[Pure]
function gmp_export(GMP|string|int $num, int $word_size = 1, int $flags = GMP_MSW_FIRST|GMP_NATIVE_ENDIAN): string {}

/**
 * Takes the nth root of a and returns the integer component of the result.
 * @link https://php.net/manual/en/function.gmp-root.php
 * @param GMP|string|int $num <p>Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6
 * and later, or a numeric string provided that it is possible to convert the latter to a number.</p>
 * @param positive-int $nth The positive root to take of a <b>num</b>.
 * @return GMP The integer component of the resultant root, as a GMP number.
 * @since 5.6
 */
#[Pure]
function gmp_root(GMP|string|int $num, int $nth): GMP {}

/**
 * Takes the nth root of a and returns the integer component and remainder of the result.
 * @link https://php.net/manual/en/function.gmp-rootrem.php
 * @param GMP|string|int $num <p>Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6
 * and later, or a numeric string provided that it is possible to convert the latter to a number.</p>
 * @param positive-int $nth The positive root to take of a <b>num</b>.
 * @return array|GMP[] <p>A two element array, where the first element is the integer component of
 * the root, and the second element is the remainder, both represented as GMP numbers.</p>
 * @since 5.6
 */
#[Pure]
function gmp_rootrem(GMP|string|int $num, int $nth): array {}

/**
 * Find next prime number
 * @link https://php.net/manual/en/function.gmp-nextprime.php
 * @param int|resource|string|GMP $num <p>It can be either a GMP number resource, or a
 * numeric string given that it is possible to convert the latter to a number.</p>
 * @return resource|GMP Return the next prime number greater than <i>a</i>,
 * as a GMP number.
 */
#[Pure]
function gmp_nextprime(GMP|string|int $num): GMP {}

/**
 * Calculates binomial coefficient
 *
 * @link https://www.php.net/manual/en/function.gmp-binomial.php
 *
 * @param GMP|string|float|int $n
 * @param int $k
 * @return GMP|false
 *
 * @since 7.3
 */
#[Pure]
function gmp_binomial(GMP|string|int $n, int $k): GMP {}

/**
 * Computes the Kronecker symbol
 *
 * @link https://www.php.net/manual/en/function.gmp-kronecker.php
 *
 * @param GMP|string|float|int $num1
 * @param GMP|string|float|int $num2
 * @return int
 *
 * @since 7.3
 */
#[Pure]
function gmp_kronecker(GMP|string|int $num1, GMP|string|int $num2): int {}

/**
 * Computes the least common multiple of A and B
 *
 * @link https://www.php.net/manual/en/function.gmp-lcm.php
 *
 * @param GMP|string|float|int $num1
 * @param GMP|string|float|int $num2
 * @return GMP
 *
 * @since 7.3
 */
#[Pure]
function gmp_lcm(GMP|string|int $num1, GMP|string|int $num2): GMP {}

/**
 * Perfect power check
 *
 * @link https://www.php.net/manual/en/function.gmp-perfect-power.php
 *
 * @param GMP|string|float|int $num
 * @return bool
 *
 * @since 7.3
 */
#[Pure]
function gmp_perfect_power(GMP|string|int $num): bool {}

define('GMP_ROUND_ZERO', 0);
define('GMP_ROUND_PLUSINF', 1);
define('GMP_ROUND_MINUSINF', 2);
define('GMP_MSW_FIRST', 1);
define('GMP_LSW_FIRST', 2);
define('GMP_LITTLE_ENDIAN', 4);
define('GMP_BIG_ENDIAN', 8);
define('GMP_NATIVE_ENDIAN', 16);

/**
 * The GMP library version
 * @link https://php.net/manual/en/gmp.constants.php
 */
define('GMP_VERSION', "6.2.1");

define('GMP_MPIR_VERSION', '3.0.0');

class GMP implements Serializable
{
    /**
     * @since 8.2
     */
    public function __construct(int|string $num = 0, int $base = 0) {}

    /**
     * String representation of object
     * @link https://php.net/manual/en/serializable.serialize.php
     * @return string the string representation of the object or null
     */
    public function serialize() {}

    public function __serialize(): array {}

    /**
     * Constructs the object
     * @link https://php.net/manual/en/serializable.unserialize.php
     * @param string $data <p>
     * The string representation of the object.
     * </p>
     * @return void
     */
    public function unserialize($data) {}

    public function __unserialize(array $data): void {}
}
// End of gmp v.
<?php

// Start of cubrid v.1.1

/**
 * (PHP 5, CUBRID &gt;= 8.3.1)<br/>
 * Open a connection to a CUBRID Server
 * @link https://php.net/manual/en/function.cubrid-connect.php
 * @param string $host <p>
 * Host name or IP address of CUBRID CAS server.
 * </p>
 * @param int $port <p>
 * Port number of CUBRID CAS server (BROKER_PORT configured in
 * $CUBRID/conf/cubrid_broker.conf).
 * </p>
 * @param string $dbname <p>
 * Name of database.
 * </p>
 * @param string $userid [optional] <p>
 * User name for the database. Default value is 'PUBLIC'.
 * </p>
 * @param string $passwd [optional] <p>
 * User password. Default value is empty string, i.e. no
 * password is defined.
 * </p>
 * @param bool $new_link [optional] <p>
 * If a second call is made to cubrid_connect()
 * with the same arguments, no new link will be established,
 * but instead, the connection identifier of the already
 * opened connection will be
 * returned. The new_link parameter modifies this
 * behavior and makes cubrid_connect() always open
 * a new connection, even if cubrid_connect() was called
 * before with the same parameters.
 * </p>
 * @return resource|false <p>
 * a CUBRID connection identifier on success or false on failure.
 * </p>
 */
function cubrid_connect($host, $port, $dbname, $userid = 'PUBLIC', $passwd = '', $new_link = false) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.1)<br/>
 * Establish the environment for connecting to CUBRID server.
 * @link https://php.net/manual/en/function.cubrid-connect.php
 * @param string $conn_url <p>
 * A character string that contains server connection information.<br />
 * Syntax: 'CUBRID:&gt;host&lt;:&gt;port&lt;:&gt;dbname&lt;:&gt;username&lt;:&gt;password&lt;:?&gt;params&lt;'.<br />
 * E.g. <i>CUBRID:127.0.0.1:33088:demodb:dba:123456:?autocommit=off&althost=10.34.63.132:33088&rctime=100</i>
 * </p>
 * @param string $userid [optional] <p>
 * User name for the database. Default value is 'PUBLIC'.
 * </p>
 * @param string $passwd [optional] <p>
 * User password. Default value is empty string, i.e. no
 * password is defined.
 * </p>
 * @param bool $new_link [optional] <p>
 * If a second call is made to cubrid_connect()
 * with the same arguments, no new link will be established,
 * but instead, the connection identifier of the already
 * opened connection will be
 * returned. The new_link parameter modifies this
 * behavior and makes cubrid_connect() always open
 * a new connection, even if cubrid_connect() was called
 * before with the same parameters.
 * </p>
 * @return resource|false <p>
 * a CUBRID connection identifier on success or false on failure.
 * </p>
 */
function cubrid_connect_with_url($conn_url, $userid = 'PUBLIC', $passwd = '', $new_link = false) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.1)<br/>
 * Open a persistent connection to a CUBRID server
 * @link https://php.net/manual/en/function.cubrid-pconnect.php
 * @param string $host <p>
 * Host name or IP address of CUBRID CAS server.
 * </p>
 * @param int $port <p>
 * Port number of CUBRID CAS server (BROKER_PORT configured in
 * $CUBRID/conf/cubrid_broker.conf).
 * </p>
 * @param string $dbname <p>
 * Name of database.
 * </p>
 * @param string $userid [optional] <p>
 * User name for the database. Default value is 'PUBLIC'.
 * </p>
 * @param string $passwd [optional] <p>
 * User password. Default value is empty string, i.e. no
 * password is defined.
 * </p>
 * @return resource|false <p>
 * Connection identifier, when process is successful.
 * FALSE, when process is unsuccessful.
 * </p>
 */
function cubrid_pconnect($host, $port, $dbname, $userid = 'PUBLIC', $passwd = '') {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.1)<br/>
 * Open a persistent connection to CUBRID server
 * @link https://secure.php.net/manual/en/function.cubrid-pconnect-with-url.php
 * @param string $conn_url <p>
 * A character string that contains server connection information.<br />
 * Syntax: 'CUBRID:&gt;host&lt;:&gt;port&lt;:&gt;dbname&lt;:&gt;username&lt;:&gt;password&lt;:?&gt;params&lt;'.<br />
 * E.g. CUBRID:127.0.0.1:33088:demodb:dba:123456:?autocommit=off&althost=10.34.63.132:33088&rctime=100
 * </p>
 * @param string $userid [optional] <p>
 * User name for the database. Default value is 'PUBLIC'.
 * </p>
 * @param string $passwd [optional] <p>
 * User password. Default value is empty string, i.e. no
 * password is defined.
 * </p>
 * @return resource|false <p>
 * Connection identifier, when process is successful.
 * FALSE, when process is unsuccessful.
 * </p>
 */
function cubrid_pconnect_with_url($conn_url, $userid = 'PUBLIC', $passwd = '') {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Close CUBRID connection. Same as cubrid_disconnect().
 * @link https://php.net/manual/en/function.cubrid-close.php
 * @param resource $conn_identifier [optional] <p>
 * The CUBRID connection identifier. If the connection
 * identifier is not specified, the last connection
 * opened by cubrid_connect() is assumed.
 * </p>
 * @return bool <p>
 * TRUE, when process is successful.
 * FALSE, when process is unsuccessful.
 * </p>
 */
function cubrid_close($conn_identifier = null) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Close CUBRID connection. Same as cubrid_close().
 * @link https://php.net/manual/en/function.cubrid-disconnect.php
 * @param resource $conn_identifier [optional] <p>
 * Connection identifier.
 * </p>
 * @return bool Returns true on success or false on failure.
 */
function cubrid_disconnect($conn_identifier = null) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.1)<br/>
 * Send a CUBRID query
 * @link https://php.net/manual/en/function.cubrid-query.php
 * @param string $query <p>
 * A SQL query. Data inside the query should be properly escaped.
 * </p>
 * @param resource $conn_identifier [optional] <p>
 * The CUBRID connection. If the connection identifier
 * is not specified, the last connection opened by
 * cubrid_connect() is assumed.
 * </p>
 * @return resource|bool <ul><li>
 * For SELECT, SHOW, DESCRIBE, EXPLAIN and other statements
 * returning resultset, cubrid_query() returns a resource
 * on success, or false on error.
 * </li>
 * <li>
 * For other type of SQL statements, INSERT, UPDATE, DELETE, DROP, etc,
 * cubrid_query() returns true on success or false on error.
 * </li>
 * <p>
 * The returned result resource should be passed to
 * cubrid_fetch_array(), and other functions for dealing
 * with result tables, to access the returned data.
 * </p>
 * <p>
 * Use cubrid_num_rows() to find out how many rows
 * were returned for a SELECT statement.
 * </p>
 * <p>
 * Use cubrid_affected_rows() to find out how many
 * rows were affected by a DELETE, INSERT, REPLACE, or UPDATE
 * statement.
 * </p>
 * <li>
 * cubrid_query() will also fail and return false
 * if the user does not have permission to access the table(s)
 * referenced by the query.
 * </li>
 * </ul>
 */
function cubrid_query($query, $conn_identifier = null) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Execute a prepared SQL statement
 * @link https://php.net/manual/en/function.cubrid-execute.php
 * @param resource $conn_identifier <p>
 * Connection identifier.
 * </p>
 * @param string $sql <p>
 * SQL to be executed.
 * </p>
 * @param int $option [optional] <p>
 * Query execution option CUBRID_INCLUDE_OID, CUBRID_ASYNC,
 * CUBRID_EXEC_QUERY_ALL.
 * </p>
 * @return resource|bool <p>
 * Request identifier, when process is successful,
 * or FALSE, when process is unsuccessful.
 * </p>
 */
function cubrid_execute($conn_identifier, $sql, $option = null) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Execute a prepared SQL statement
 * @link https://php.net/manual/en/function.cubrid-execute.php
 * @param resource $request_identifier <p>
 * cubrid_prepare() identifier.
 * </p>
 * @param int $option [optional] <p>
 * Query execution option CUBRID_INCLUDE_OID, CUBRID_ASYNC,
 * CUBRID_EXEC_QUERY_ALL.
 * </p>
 * @return bool <p>
 * TRUE, when process is successful. FALSE, when
 * process is unsuccessful.
 * </p>
 */
function cubrid_execute($request_identifier, $option = null) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Bind variables to a prepared statement as parameters
 * @link https://php.net/manual/en/function.cubrid-bind.php
 * @param resource $req_identifier <p>
 * Request identifier as a result of cubrid_prepare().
 * </p>
 * @param int $bind_index <p>
 * Location of binding parameters. It starts with 1.
 * </p>
 * @param mixed $bind_value <p>
 * Actual value for binding.
 * </p>
 * @param string $bind_value_type [optional] <p>
 * A type of the value to bind. (It is omitted by default. Thus, system
 * internally use string by default. However, you need to specify the
 * exact type of the value as an argument when
 * they are NCHAR, BIT, or BLOB/CLOB).
 * </p>
 * <p>
 * The following bind types are supported:
 * "STRING", "NCHAR", "BIT", "NUMERIC", "NUMBER", "FLOAT", "DOUBLE",
 * "TIME", "DATE", "TIMESTAMP", "OBJECT", "BLOB", "CLOB", "NULL".
 * </p>
 * @return bool TRUE, when process is successful, otherwise FALSE.
 */
function cubrid_bind($req_identifier, $bind_index, $bind_value, $bind_value_type = null) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Close the request handle. Same as cubrid_close_request().
 * @link https://php.net/manual/en/function.cubrid-close-prepare.php
 * @param resource $req_identifier <p>
 * Request identifier.
 * </p>
 * @return bool TRUE, when process is successful, otherwise FALSE.
 */
function cubrid_close_prepare($req_identifier) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Close the request handle. Same as cubrid_close_prepare().
 * @link https://php.net/manual/en/function.cubrid-close-request.php
 * @param resource $req_identifier <p>
 * Request identifier.
 * </p>
 * @return bool TRUE, when process is successful, or FALSE.
 */
function cubrid_close_request($req_identifier) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Get contents of collection type column using OID
 * @link https://php.net/manual/en/function.cubrid-col-get.php
 * @param resource $conn_identifier <p>
 * Connection identifier.
 * </p>
 * @param string $oid <p>
 * OID of the instance that you want to read.
 * </p>
 * @param string $attr_name <p>
 * Attribute name that you want to read from the instance.
 * </p>
 * @return array <ul><li>
 * Array (0-based numerical array) containing the
 * elements requested, when process is successful;
 * </li>
 * <li>
 * FALSE (to distinguish the error from the situation of
 * attribute having empty collection;
 * or NULL, in case of error, a warning message is shown;
 * in such case you can check the error by using
 * cubrid_error_code()), when process is unsuccessful.
 * </li>
 * </ul>
 */
function cubrid_col_get($conn_identifier, $oid, $attr_name) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Get the number of elements in collection type column using OID
 * @link https://php.net/manual/en/function.cubrid-col-size.php
 * @param resource $conn_identifier <p>
 * Connection identifier.
 * </p>
 * @param string $oid <p>
 * OID of the instance that you want to read.
 * </p>
 * @param string $attr_name <p>
 * Attribute name that you want to read from the instance.
 * </p>
 * @return int <p>
 * Number of elements, when process is successful.
 * FALSE, when process is unsuccessful.
 * </p>
 */
function cubrid_col_size($conn_identifier, $oid, $attr_name) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Perform a query without fetching the results into memory
 * @link https://php.net/manual/en/function.cubrid-unbuffered-query.php
 * @param string $query <p>
 * The SQL query to execute.
 * </p>
 * @param resource $conn_identifier [optional] <p>
 * The CUBRID connection. If the connection identifier is not
 * specified, the last connection opened by cubrid_connect() is assumed.
 * </p>
 * @return resource|bool <p>
 * For SELECT, SHOW, DESCRIBE or EXPLAIN statements,
 * cubrid_unbuffered_query() returns a resource on success, or false on
 * error.
 * </p>
 * <p>
 * For other type of SQL statements, UPDATE, DELETE, DROP, etc,
 * cubrid_unbuffered_query returns true on success
 * or false on error.
 * </p>
 */
function cubrid_unbuffered_query($query, $conn_identifier = null) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Return an array with the list of all existing CUBRID databases
 * @link https://php.net/manual/en/function.cubrid-list-dbs.php
 * @param resource $conn_identifier [optional] <p>
 * The CUBRID connection.
 * </p>
 * @return array <p>
 * a numeric array with all existing CUBRID databases on success,
 * or false on failure.
 * </p>
 */
function cubrid_list_dbs($conn_identifier) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.1)<br/>
 * Get the error message. Same as cubrid_error_msg();
 * @link https://php.net/manual/en/function.cubrid-error.php
 * @param resource $connection [optional] <p>
 * The CUBRID connection.
 * </p>
 * @return string <p>
 * Error message that occurred.
 * </p>
 */
function cubrid_error($connection = null) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Get last error message for the most recent function call.
 * Same as cubrid_error();
 * @link https://php.net/manual/en/function.cubrid-error-msg.php
 * @return string <p>
 * Error message that occurred.
 * </p>
 */
function cubrid_error_msg() {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.1)<br/>
 * Returns the numerical value of the error message from previous
 * CUBRID operation. Same as cubrid_error_code();
 * @link https://php.net/manual/en/function.cubrid-errno.php
 * @param resource $conn_identifier [optional] <p>
 * The CUBRID connection identifier. If the connection
 * identifier is not specified, the last connection
 * opened by cubrid_connect() is assumed.
 * </p>
 * @return int <p>
 * the error number from the last CUBRID function, or
 * 0 (zero) if no error occurred.
 * </p>
 */
function cubrid_errno($conn_identifier = null) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Get error code for the most recent function call.
 * Same as cubrid_errno();
 * @link https://php.net/manual/en/function.cubrid-error-code.php
 * @return int <p>
 * Error code of the error that occurred, or
 * 0 (zero) if no error occurred.
 * </p>
 */
function cubrid_error_code() {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Return the number of rows affected by the last SQL statement
 * @link https://php.net/manual/en/function.cubrid-affected-rows.php
 * @param resource $conn_identifier [optional] <p>
 * The CUBRID connection. If the connection identifier is not
 * specified, the last link opened by cubrid_connect() is assumed.
 * </p>
 * @return int <p>
 * the number of affected rows on success,
 * or -1, when SQL statement is not INSERT, DELETE or UPDATE,
 * or FALSE, when the request identifier is not specified,
 * and there is no last request.
 * </p>
 */
function cubrid_affected_rows($conn_identifier = null) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Return the ID generated for the last updated AUTO_INCREMENT column
 * @link https://php.net/manual/en/function.cubrid-insert-id.php
 * @param resource $conn_identifier [optional] <p>
 * The connection identifier previously obtained by a call
 * to cubrid_connect().
 * </p>
 * @return string <p>
 * A string representing the ID generated for an AUTO_INCREMENT column
 * by the previous query, on success. 0, if the previous query does
 * not generate new rows. FALSE on failure.
 * </p>
 */
function cubrid_insert_id($conn_identifier = null) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Return the value of a specific field in a specific row
 * @link https://php.net/manual/en/function.cubrid-result.php
 * @param resource $result
 * @param int $row <p>
 * The row number from the result that's being retrieved. Row numbers
 * start at 0.
 * </p>
 * @param mixed $field [optional] <p>
 * The name or offset of the field being retrieved.
 * </p>
 * <p>
 * It can be the field's offset, the field's name, or the field's table
 * dot field name (tablename.fieldname). If the column name has been
 * aliased ('select foo as bar from...'), use the alias instead of the
 * column name. If undefined, the first field is retrieved.
 * </p>
 * @return string <p>
 * Value of a specific field, on success (NULL if value if null).
 * FALSE on failure.
 * </p>
 */
function cubrid_result($result, $row, $field = 0) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Get the number of rows in the result set
 * @link https://php.net/manual/en/function.cubrid-num-rows.php
 * @param resource $result <p>
 * result comes from a call to cubrid_execute(),
 * cubrid_query() and cubrid_prepare()
 * </p>
 * @return int <p>
 * Number of rows, when process is successful.
 * 0 when the query was done in async mode.
 * -1, if SQL statement is not SELECT.
 * FALSE when process is unsuccessful.
 * </p>
 */
function cubrid_num_rows($result) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Return the number of columns in the result set
 * @link https://php.net/manual/en/function.cubrid-num-cols.php
 * @param resource $result <p>
 * Result.
 * </p>
 * @return int <p>
 * Number of columns, when process is successful.
 * FALSE, if SQL statement is not SELECT.
 * </p>
 */
function cubrid_num_cols($result) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Return the number of columns in the result set
 * @link https://php.net/manual/en/function.cubrid-num-fields.php
 * @param resource $result <p>
 * result comes from a call to cubrid_execute(),
 * cubrid_query() and cubrid_prepare()
 * </p>
 * @return int <p>
 * Number of columns, on success.
 * -1 if SQL sentence is not SELECT.
 * FALSE when process is unsuccessful.
 * </p>
 */
function cubrid_num_fields($result) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Fetch the next row from a result set
 * @link https://php.net/manual/en/function.cubrid-fetch.php
 * @param resource $result <p>
 * result comes from a call to cubrid_execute()
 * </p>
 * @param int $type [optional] <p>
 * Array type of the fetched result CUBRID_NUM,
 * CUBRID_ASSOC, CUBRID_BOTH, CUBRID_OBJECT. If you want to
 * operate the lob object, you can use CUBRID_LOB.
 * </p>
 * @return mixed
 * <ul>
 * <li>array or object, when process is successful.</li>
 * <li>FALSE, when there are no more rows;</li>
 * <li>NULL, when process is unsuccessful.</li>
 * </ul>
 * <p>
 * The result can be received either as an array or as an object,
 * and you can decide which data type to use by setting the type
 * argument. The type variable can be set to one of the following
 * values:
 * </p>
 * <ul>
 * <li>CUBRID_NUM : Numerical array (0-based)</li>
 * <li>CUBRID_ASSOC : Associative array</li>
 * <li>CUBRID_BOTH : Numerical & Associative array (default)</li>
 * <li>CUBRID_OBJECT : object that has the attribute name as the
 * column name of query result</li>
 * </ul>
 * <p>
 * When type argument is omitted, the result will be received using
 * CUBRID_BOTH option as default. When you want to receive query
 * result in object data type, the column name of the result must
 * obey the naming rules for identifiers in PHP. For example,
 * column name such as "count(*)" cannot be received in object type.
 * </p>
 */
function cubrid_fetch($result, $type = CUBRID_BOTH) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Return a numerical array with the values of the current row
 * @link https://php.net/manual/en/function.cubrid-fetch-row.php
 * @param resource $result <p>
 * result comes from a call to cubrid_execute()
 * </p>
 * @param int $type <p>
 * Type can only be CUBRID_LOB, this parameter will be
 * used only when you need to operate the lob object.
 * </p>
 * @return array <p>
 * A numerical array, when process is successful.
 * FALSE, when there are no more rows;
 * NULL, when process is unsuccessful.
 * </p>
 */
function cubrid_fetch_row($result, $type = null) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Fetch a result row as an associative array, a numeric array, or both
 * @link https://php.net/manual/en/function.cubrid-fetch-array.php
 * @param resource $result
 * @param int $type [optional] <p>
 * The type of array that is to be fetched. It's a constant and can
 * take the following values: CUBRID_ASSOC, CUBRID_NUM, and CUBRID_BOTH.
 * </p>
 * @return array <p>
 * Returns an array of strings that corresponds to the fetched row,
 * when process is successful.
 * FALSE, when there are no more rows;
 * NULL, when process is unsuccessful.
 * </p>
 * <p>
 * The type of returned array depends on how result_type is defined.
 * By using CUBRID_BOTH (default), you'll get an array with both
 * associative and number indices, and you can decide which data
 * type to use by setting the type argument. The type variable can
 * be set to one of the following values:
 * </p>
 * <ul>
 * <li>CUBRID_NUM : Numerical array (0-based)</li>
 * <li>CUBRID_ASSOC : Associative array</li>
 * <li>CUBRID_BOTH : Numerical & Associative array (default)</li>
 * </ul>
 */
function cubrid_fetch_array($result, $type = CUBRID_BOTH) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Return the associative array that corresponds to the fetched row
 * @link https://php.net/manual/en/function.cubrid-fetch-assoc.php
 * @param resource $result <p>
 * result comes from a call to cubrid_execute()
 * </p>
 * @param int $type [optional] <p>
 * Type can only be CUBRID_LOB, this parameter will be used
 * only when you need to operate the lob object.
 * </p>
 * @return array <p>
 * Associative array, when process is successful.
 * FALSE, when there are no more rows;
 * NULL, when process is unsuccessful.
 * </p>
 */
function cubrid_fetch_assoc($result, $type = null) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Fetch the next row and return it as an object
 * @link https://php.net/manual/en/function.cubrid-fetch-object.php
 * @param resource $result <p>
 * result comes from a call to cubrid_execute()
 * </p>
 * @param string $class_name [optional] <p>
 * The name of the class to instantiate. If not specified,
 * a stdClass (stdClass is PHP's generic empty class that's
 * used when casting other types to objects) object is returned.
 * </p>
 * @param array $params [optional] <p>
 * An optional array of parameters to pass to the constructor
 * for class_name objects.
 * </p>
 * @param int $type [optional] <p>
 * Type can only be CUBRID_LOB, this parameter will be used
 * only when you need to operate the lob object.
 * </p>
 * @return object <p>
 * an object with string properties
 * that correspond to the fetched row, or false if there
 * are no more rows, or NULL, when process is unsuccessful.
 * </p>
 */
function cubrid_fetch_object($result, $class_name = null, $params = null, $type = null) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Move the internal row pointer of the CUBRID result
 * @link https://php.net/manual/en/function.cubrid-data-seek.php
 * @param resource $result <p>
 * The result.
 * </p>
 * @param int $row_number <p>
 * The desired row number of the new result pointer.
 * </p>
 * @return bool <p>
 * Returns TRUE on success or FALSE on failure.
 * </p>
 */
function cubrid_data_seek($result, $row_number) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Return an array with the lengths of the values of
 * each field from the current row
 * @link https://php.net/manual/en/function.cubrid-fetch-lengths.php
 * @param resource $result <p>
 * result comes from a call to cubrid_execute()
 * </p>
 * @return array <p>
 * A numerical array of lengths on success,
 * or false on failure.
 * </p>
 */
function cubrid_fetch_lengths($result) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.1)<br/>
 * Get column information from a result and return as an object
 * @link https://php.net/manual/en/function.cubrid-fetch-field.php
 * @param resource $result <p>
 * result comes from a call to cubrid_execute()
 * </p>
 * @param int $field_offset [optional] <p>
 * The numerical field offset. If the field offset is not specified, the
 * next field that was not yet retrieved by this function is retrieved.
 * The field_offset starts at 0.
 * </p>
 * @return object <p>
 * an object containing field information. The properties
 * of the object are:
 * </p>
 * <ul>
 * <li>name - column name</li>
 * <li>table - name of the table the column belongs to</li>
 * <li>def - default value of the column</li>
 * <li>max_length - maximum length of the column</li>
 * <li>not_null - 1 if the column cannot be NULL</li>
 * <li>primary_key - 1 if the column is a primary key</li>
 * <li>unique_key - 1 if the column is a unique key</li>
 * <li>multiple_key - 1 if the column is a non-unique key</li>
 * <li>numeric - 1 if the column is numeric</li>
 * <li>blob - 1 if the column is a BLOB</li>
 * <li>type - the type of the column</li>
 * <li>unsigned - 1 if the column is unsigned</li>
 * <li>zerofill - 1 if the column is zero-filled</li>
 * </ul>
 */
function cubrid_fetch_field($result, $field_offset = 0) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Get the column names in result
 * @link https://php.net/manual/en/function.cubrid-column-names.php
 * @param resource $req_identifier <p>
 * Request identifier.
 * </p>
 * @return array <p>
 * Array of string which containing column names,
 * when process is successful. FALSE, when process is unsuccessful.
 * </p>
 */
function cubrid_column_names($req_identifier) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Get column types in result
 * @link https://php.net/manual/en/function.cubrid-column-names.php
 * @param resource $req_identifier <p>
 * Request identifier.
 * </p>
 * @return array <p>
 * Array of string which containing column types,
 * when process is successful. FALSE, when process is unsuccessful.
 * </p>
 */
function cubrid_column_types($req_identifier) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Move the result set cursor to the specified field offset
 * @link https://php.net/manual/en/function.cubrid-field-seek.php
 * @param resource $result <p>
 * result comes from a call to cubrid_execute()
 * </p>
 * @param int $field_offset <p>
 * The numerical field offset. The field_offset starts at 0.
 * If field_offset does not exist, an error of level
 * E_WARNING is also issued.
 * </p>
 * @return bool <p>
 * Returns true on success or false on failure.
 * </p>
 */
function cubrid_field_seek($result, $field_offset) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Free the memory occupied by the result data
 * @link https://php.net/manual/en/function.cubrid-free-result.php
 * @param resource $req_identifier <p>
 * Request identifier.
 * </p>
 * @return bool <p>
 * Returns true on success or false on failure.
 * </p>
 * <p>
 * Note that it can only free the client fetch buffer now,
 * and if you want to free all the memory, use function
 * cubrid_close_request().
 * </p>
 */
function cubrid_free_result($req_identifier) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Return the name of the specified field index
 * @link https://php.net/manual/en/function.cubrid-field-name.php
 * @param resource $result <p>
 * result comes from a call to cubrid_execute()
 * </p>
 * @param int $field_offset <p>
 * The field_offset starts at 0. If field_offset does not exist,
 * an error of level E_WARNING is also issued.
 * </p>
 * @return string <p>
 * The name of the specified field index on
 * success or false on failure.
 * </p>
 */
function cubrid_field_name($result, $field_offset) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Return the name of the table of the specified field
 * @link https://php.net/manual/en/function.cubrid-field-table.php
 * @param resource $result <p>
 * result comes from a call to cubrid_execute()
 * </p>
 * @param int $field_offset <p>
 * The field_offset starts at 0. If field_offset does not exist,
 * an error of level E_WARNING is also issued.
 * </p>
 * @return string <p>
 * The name of the table on success,
 * FALSE when field_offset value is invalid, or
 * -1 if SQL sentence is not SELECT.
 * </p>
 */
function cubrid_field_table($result, $field_offset) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Get the maximum length of the specified field
 * @link https://php.net/manual/en/function.cubrid-field-len.php
 * @param resource $result <p>
 * result comes from a call to cubrid_execute()
 * </p>
 * @param int $field_offset <p>
 * The field_offset starts at 0. If field_offset does not exist,
 * an error of level E_WARNING is also issued.
 * </p>
 * @return int <p>
 * Maximum length, when process is successful. FALSE on failure.
 * </p>
 */
function cubrid_field_len($result, $field_offset) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Return the type of the column corresponding to the given field offset
 * @link https://php.net/manual/en/function.cubrid-field-type.php
 * @param resource $result <p>
 * result comes from a call to cubrid_execute()
 * </p>
 * @param int $field_offset <p>
 * The field_offset starts at 0. If field_offset does not exist,
 * an error of level E_WARNING is also issued.
 * </p>
 * @return string <p>
 * On success the returned field type will be one of
 * "int", "real", "string", "blob", and others as
 * detailed in the CUBRID documentation. Otherwise, FALSE
 * when invalid field_offset value, or -1 if SQL sentence
 * is not SELECT.
 * </p>
 */
function cubrid_field_type($result, $field_offset) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Return a string with the flags of the given field offset
 * @link https://php.net/manual/en/function.cubrid-field-flags.php
 * @param resource $result <p>
 * result comes from a call to cubrid_execute()
 * </p>
 * @param int $field_offset <p>
 * The numerical field offset. The field_offset starts at 0.
 * If field_offset does not exist, an error of level
 * E_WARNING is also issued.
 * </p>
 * @return string <p>
 * a string of flags associated with the result,
 * or FALSE when invalid field_offset value, or -1 if SQL sentence
 * is not SELECT.
 * </p>
 * <p>
 * The following flags are reported, if your version of CUBRID
 * is current enough to support them: "not_null", "primary_key",
 * "unique_key", "foreign_key", "auto_increment", "shared",
 * "reverse_index", "reverse_unique", and "timestamp".
 * </p>
 */
function cubrid_field_flags($result, $field_offset) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Escapes special characters in a string for use in an SQL statement
 * @link https://php.net/manual/en/function.cubrid-real-escape-string.php
 * @param string $unescaped_string <p>
 * The string that is to be escaped.
 * </p>
 * @param resource $conn_identifier [optional] <p>
 * The CUBRID connection. If the connection identifier is not
 * specified, the last connection opened by cubrid_connect() is assumed.
 * </p>
 * @return string <p>
 * Escaped string version of the given string, on success.
 * FALSE on failure.
 * </p>
 */
function cubrid_real_escape_string($unescaped_string, $conn_identifier = null) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Return the current CUBRID connection charset
 * @link https://php.net/manual/en/function.cubrid-client-encoding.php
 * @param resource $conn_identifier [optional] <p>
 * The CUBRID connection. If the connection identifier is not
 * specified, the last link opened by cubrid_connect() is assumed.
 * </p>
 * @return string <p>
 * A string that represents the CUBRID connection charset; on success.
 * FALSE on failure.
 * </p>
 */
function cubrid_client_encoding($conn_identifier = null) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.1)<br/>
 * Ping a server connection or reconnect if there is no connection
 * @link https://php.net/manual/en/function.cubrid-ping.php
 * @param resource $conn_identifier [optional] <p>
 * The CUBRID connection identifier. If the connection identifier
 * is not specified, the last connection opened by
 * cubrid_connect() is assumed.
 * </p>
 * @return bool <p>
 * true if the connection to the server is working,
 * otherwise false.
 * </p>
 */
function cubrid_ping($conn_identifier = null) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Return the client library version
 * @link https://php.net/manual/en/function.cubrid-get-client-info.php
 * @return string <p>
 * A string that represents the client library version; on success.
 * FALSE on failure.
 * </p>
 */
function cubrid_get_client_info() {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Return the CUBRID server version
 * @link https://php.net/manual/en/function.cubrid-get-server-info.php
 * @param resource $conn_identifier
 * @return string <p>
 * A string that represents the CUBRID server version; on success.
 * FALSE on failure.
 * </p>
 */
function cubrid_get_server_info($conn_identifier) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Returns the CUBRID database parameters
 * @link https://secure.php.net/manual/en/function.cubrid-get-db-parameter.php
 * @param resource $conn_identifier <p>
 * Connection identifier.
 * </p>
 * @return array <p>
 * An associative array with CUBRID database parameters; on success.
 * FALSE on failure.
 * </p>
 */
function cubrid_get_db_parameter($conn_identifier) {}

/**
 * (PHP 5, CUBRID &gt;= 8.4.0)<br/>
 * Get auto-commit mode of the connection
 * @link https://php.net/manual/en/function.cubrid-get-autocommit.php
 * @param resource $conn_identifier <p>
 * Connection identifier.
 * </p>
 * @return bool <p>
 * TRUE, if autocommit is set to true. FALSE otherwise.
 * NULL on error.
 * </p>
 */
function cubrid_get_autocommit($conn_identifier) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Return the current CUBRID connection charset
 * @link https://secure.php.net/manual/en/function.cubrid-get-charset.php
 * @param resource $conn_identifier <p>
 * Connection identifier.
 * </p>
 * @return string <p>
 * A string that represents the CUBRID connection charset; on success.
 * FALSE on failure.
 * </p>
 */
function cubrid_get_charset($conn_identifier) {}

/**
 * (PHP 5, CUBRID &gt;= 8.4.0)<br/>
 * Set auto-commit mode of the connection
 * @link https://php.net/manual/en/function.cubrid-set-autocommit.php
 * @param resource $conn_identifier <p>
 * Connection identifier.
 * </p>
 * @param bool $mode <p>
 * Auto-commit mode. The following constants can be used:
 * CUBRID_AUTOCOMMIT_FALSE, CUBRID_AUTOCOMMIT_TRUE
 * </p>
 * @return bool <p>
 * TRUE, when process is successful. FALSE, when
 * process is unsuccessful.
 * </p>
 */
function cubrid_set_autocommit($conn_identifier, $mode) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.1)<br/>
 * Get db name from results of cubrid_list_dbs
 * @link https://php.net/manual/en/function.cubrid-db-name.php
 * @param array $result <p>
 * The result pointer from a call to cubrid_list_dbs.
 * </p>
 * @param int $index <p>
 * The index into the result set.
 * </p>
 * @return string <p>
 * the database name on success, and false on failure. If false
 * is returned, use cubrid_error() to determine the nature
 * of the error.
 * </p>
 */
function cubrid_db_name($result, $index) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.1)<br/>
 * Get result data
 * @link https://php.net/manual/en/function.cubrid-db-parameter.php
 * @param resource $conn_identifier <p>
 * The CUBRID connection. If the connection identifier is not specified,
 * the last link opened by cubrid_connect() is assumed.
 * </p>
 * @return array <p>
 * An associative array with CUBRID database
 * parameters; on success. FALSE on failure.
 * </p>
 */
function cubrid_db_parameter($conn_identifier) {}

/**
 * (PHP 5, CUBRID &gt;= 8.4.0)<br/>
 * Sets the CUBRID database parameters
 * @link https://php.net/manual/en/function.cubrid-set-db-parameter.php
 * @param resource $conn_identifier <p>
 * The CUBRID connection. If the connection identifier is not specified,
 * the last link opened by cubrid_connect() is assumed.
 * </p>
 * @param int $param_type <p>
 * Database parameter type. Can be PARAM_ISOLATION_LEVEL,
 * or PARAM_LOCK_TIMEOUT.
 * </p>
 * @param int $param_value <p>
 * Isolation level value (1-6) or lock timeout (in seconds) value.
 * </p>
 * @return bool <p>
 * TRUE on success. FALSE on failure.
 * </p>
 */
function cubrid_set_db_parameter($conn_identifier, $param_type, $param_value) {}

/**
 * (PHP 5, CUBRID &gt;= 8.4.1)<br/>
 * Get the query timeout value of the request
 * @link https://php.net/manual/en/function.cubrid-get-query-timeout.php
 * @param resource $req_identifier <p>
 * Request identifier.
 * </p>
 * @return int <p>
 * Success: the query timeout value of the current request.
 * Units of msec. Failure: FALSE
 * </p>
 */
function cubrid_get_query_timeout($req_identifier) {}

/**
 * (PHP 5, CUBRID &gt;= 8.4.1)<br/>
 * Set the query timeout value of the request
 * @link https://php.net/manual/en/function.cubrid-set-query-timeout.php
 * @param resource $req_identifier <p>
 * Request identifier.
 * </p>
 * @param int $timeout <p>
 * Timeout time, unit of msec.
 * </p>
 * @return bool <p>
 * TRUE, when process is successful. FALSE, when
 * process is unsuccessful.
 * </p>
 */
function cubrid_set_query_timeout($req_identifier, $timeout) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Get the class name using OID
 * @link https://php.net/manual/en/function.cubrid-tablename.php
 * @param resource $conn_identifier <p>
 * Connection identifier.
 * </p>
 * @param string $oid <p>
 * OID of the instance that you want to check the existence.
 * To get the current OID of the request, use
 * cubrid_current_oid() function.
 * </p>
 * @return string <p>
 * Class name when process is successful.
 * FALSE, when process is unsuccessful.
 * </p>
 */
function cubrid_get_class_name($conn_identifier, $oid) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Get a column using OID
 * @link https://php.net/manual/en/function.cubrid-get.php
 * @param resource $conn_identifier <p>
 * Connection identifier.
 * </p>
 * @param string $oid <p>
 * OID of the instance that you want to read.
 * To get the current OID of the request, use
 * cubrid_current_oid() function.
 * </p>
 * @param mixed $attr [optional] <p>
 * Name of the attribute that you want to read.
 * </p>
 * @return mixed <p>
 * Content of the requested attribute,
 * when process is successful; When attr is set with string
 * data type, the result is returned as a string; when attr is
 * set with array data type (0-based numerical array), then the
 * result is returned in associative array. When attr is omitted,
 * then all attributes are received in array form.
 * </p>
 * <p>
 * FALSE when process is unsuccessful or result is NULL
 * (If error occurs to distinguish empty string from NULL,
 * then it prints the warning message. You can check the
 * error by using cubrid_error_code()).
 * </p>
 */
function cubrid_get($conn_identifier, $oid, $attr = null) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Check whether the instance pointed by OID exists
 * @link https://php.net/manual/en/function.cubrid-is-instance.php
 * @param resource $conn_identifier <p>
 * Connection identifier.
 * </p>
 * @param string $oid <p>
 * OID of the instance that you want to check the existence.
 * To get the current OID of the request, use
 * cubrid_current_oid() function.
 * </p>
 * @return int <p>
 * 1, if such instance exists; 0, if such instance
 * does not exist; -1, in case of error
 * </p>
 */
function cubrid_is_instance($conn_identifier, $oid) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Commit a transaction
 * @link https://php.net/manual/en/function.cubrid-commit.php
 * @param resource $conn_identifier <p>
 * Connection identifier.
 * </p>
 * @return bool <p>
 * TRUE, when process is successful. FALSE, when
 * process is unsuccessful.
 * </p>
 */
function cubrid_commit($conn_identifier) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Roll back a transaction
 * @link https://php.net/manual/en/function.cubrid-rollback.php
 * @param resource $conn_identifier <p>
 * Connection identifier.
 * </p>
 * @return bool <p>
 * TRUE, when process is successful. FALSE, when
 * process is unsuccessful.
 * </p>
 */
function cubrid_rollback($conn_identifier) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Get OID of the current cursor location
 * @link https://php.net/manual/en/function.cubrid-commit.php
 * @param resource $req_identifier <p>
 * Request identifier.
 * </p>
 * @return string <p>
 * OID of current cursor location, when process
 * is successful. FALSE, when process is unsuccessful.
 * </p>
 */
function cubrid_current_oid($req_identifier) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Delete an instance using OID
 * @link https://php.net/manual/en/function.cubrid-commit.php
 * @param resource $conn_identifier <p>
 * Connection identifier.
 * </p>
 * @param string $oid <p>
 * OID of the instance that you want to delete.
 * </p>
 * @return bool <p>
 * TRUE, when process is successful. FALSE,
 * when process is unsuccessful.
 * </p>
 */
function cubrid_drop($conn_identifier, $oid) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Get the facility code of error
 * @link https://php.net/manual/en/function.cubrid-error-code-facility.php
 * @return int <p>
 * Facility code of the error code that occurred:
 * CUBRID_FACILITY_DBMS, CUBRID_FACILITY_CAS,
 * CUBRID_FACILITY_CCI, CUBRID_FACILITY_CLIENT
 * </p>
 */
function cubrid_error_code_facility() {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.1)<br/>
 * Close BLOB/CLOB data
 * @link https://php.net/manual/en/function.cubrid-lob-close.php
 * @param array $lob_identifier_array <p>
 * LOB identifier array return from cubrid_lob_get().
 * </p>
 * @return bool <p>
 * TRUE, when process is successful.
 * FALSE, when process is unsuccessful.
 * </p>
 */
function cubrid_lob_close($lob_identifier_array) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.1)<br/>
 * Export BLOB/CLOB data to file
 * @link https://php.net/manual/en/function.cubrid-lob-export.php
 * @param resource $conn_identifier <p>
 * Connection identifier.
 * </p>
 * @param resource $lob_identifier <p>
 * LOB identifier.
 * </p>
 * @param string $path_name <p>
 * Path name of the file.
 * </p>
 * @return bool <p>
 * TRUE, when process is successful.
 * FALSE, when process is unsuccessful.
 * </p>
 */
function cubrid_lob_export($conn_identifier, $lob_identifier, $path_name) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.1)<br/>
 * cubrid_lob_get() is used to get BLOB/CLOB meta info from
 * CUBRID database. CUBRID gets BLOB/CLOB by executing the SQL statement,
 * and returns all LOBs as a resource array. Be sure that the SQL
 * retrieves only one column and its data type is BLOB or CLOB.
 * Remember to use cubrid_lob_close() to release the LOBs if you
 * don't need it any more.
 * @link https://php.net/manual/en/function.cubrid-lob-get.php
 * @param resource $conn_identifier <p>
 * Connection identifier.
 * </p>
 * @param string $sql <p>
 * SQL statement to be executed.
 * </p>
 * @return array <p>
 * Return an array of LOB resources, when process
 * is successful. FALSE, when process is unsuccessful.
 * </p>
 */
function cubrid_lob_get($conn_identifier, $sql) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.1)<br/>
 * Read BLOB/CLOB data and send straight to browser
 * @link https://php.net/manual/en/function.cubrid-lob-send.php
 * @param resource $conn_identifier <p>
 * Connection identifier.
 * </p>
 * @param resource $lob_identifier <p>
 * LOB identifier.
 * </p>
 * @return bool <p>
 * TRUE, when process is successful. FALSE, when
 * process is unsuccessful.
 * </p>
 */
function cubrid_lob_send($conn_identifier, $lob_identifier) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.1)<br/>
 * Get BLOB/CLOB data size
 * @link https://php.net/manual/en/function.cubrid-lob-size.php
 * @param resource $lob_identifier <p>
 * LOB identifier.
 * </p>
 * @return string <p>
 * A string representing LOB data size, when
 * process is successful. FALSE, when process is unsuccessful.
 * </p>
 */
function cubrid_lob_size($lob_identifier) {}

/**
 * (PHP 5, CUBRID &gt;= 8.4.1)<br/>
 * Bind a lob object or a string as a lob object to a
 * prepared statement as parameters.
 * @link https://secure.php.net/manual/en/function.cubrid-lob2-bind.php
 * @param resource $req_identifier <p>
 * Reqeust identifier.
 * </p>
 * @param int $bind_index <p>
 * Location of binding parameters. It starts with 1.
 * </p>
 * @param mixed $bind_value <p>
 * Actual value for binding.
 * </p>
 * @param string $bind_value_type [optional] <p>
 * It must be "BLOB" or "CLOB" and it won't be case-sensitive.
 * If it not be given, the default value is "BLOB".
 * </p>
 * @return bool <p>
 * TRUE, when process is successful.
 * FALSE, when process is unsuccessful.
 * </p>
 */
function cubrid_lob2_bind($req_identifier, $bind_index, $bind_value, $bind_value_type = null) {}

/**
 * (PHP 5, CUBRID &gt;= 8.4.1)<br/>
 * Close BLOB/CLOB data
 * @link https://php.net/manual/en/function.cubrid-lob2-close.php
 * @param resource $lob_identifier <p>
 * Lob identifier as a result of cubrid_lob2_new()
 * or get from the result set.
 * </p>
 * @return bool <p>
 * TRUE, on success.
 * FALSE, on failure.
 * </p>
 */
function cubrid_lob2_close($lob_identifier) {}

/**
 * (PHP 5, CUBRID &gt;= 8.4.1)<br/>
 * Export the lob object to a file.
 * @link https://php.net/manual/en/function.cubrid-lob2-export.php
 * @param resource $lob_identifier <p>
 * Lob identifier as a result of cubrid_lob2_new() or get
 * from the result set.
 * </p>
 * @param string $file_name <p>
 * File name you want to store BLOB/CLOB data.
 * It also supports the path of the file.
 * </p>
 * @return bool <p>
 * TRUE if the process is successful and FALSE for failure.
 * </p>
 */
function cubrid_lob2_export($lob_identifier, $file_name) {}

/**
 * (PHP 5, CUBRID &gt;= 8.4.1)<br/>
 * Import the lob object from a file.
 * @link https://php.net/manual/en/function.cubrid-lob2-import.php
 * @param resource $lob_identifier <p>
 * Lob identifier as a result of cubrid_lob2_new() or get
 * from the result set.
 * </p>
 * @param string $file_name <p>
 * File name you want to import BLOB/CLOB data.
 * It also supports the path of the file.
 * </p>
 * @return bool <p>
 * TRUE if the process is successful and FALSE for failure.
 * </p>
 */
function cubrid_lob2_import($lob_identifier, $file_name) {}

/**
 * (PHP 5, CUBRID &gt;= 8.4.1)<br/>
 * Create a lob object.
 * @link https://php.net/manual/en/function.cubrid-lob2-new.php
 * @param resource $conn_identifier [optional] <p>
 * Connection identifier. If the connection identifier is
 * not specified, the last connection opened by
 * cubrid_connect() or cubrid_connect_with_url() is assumed.
 * </p>
 * @param string $type [optional] <p>
 * It may be "BLOB" or "CLOB", it won't be case-sensitive.
 * The default value is "BLOB".
 * </p>
 * @return resource|false <p>
 * Lob identifier when it is successful. FALSE on failure.
 * </p>
 */
function cubrid_lob2_new($conn_identifier = null, $type = "BLOB") {}

/**
 * (PHP 5, CUBRID &gt;= 8.4.1)<br/>
 * Read from BLOB/CLOB data.
 * @link https://php.net/manual/en/function.cubrid-lob2-read.php
 * @param resource $lob_identifier <p>
 * Lob identifier as a result of cubrid_lob2_new() or get
 * from the result set.
 * </p>
 * @param int $len <p>
 * Length from buffer you want to read from the lob data.
 * </p>
 * @return string <p>
 * Returns the contents as a string.
 * FALSE when there is no more data.
 * NULL on failure.
 * </p>
 */
function cubrid_lob2_read($lob_identifier, $len) {}

/**
 * (PHP 5, CUBRID &gt;= 8.4.1)<br/>
 * Move the cursor of a lob object.
 * @link https://php.net/manual/en/function.cubrid-lob2-seek64.php
 * @param resource $lob_identifier <p>
 * Lob identifier as a result of cubrid_lob2_new() or get
 * from the result set.
 * </p>
 * @param string $offset <p>
 * Number of units you want to move the cursor.
 * </p>
 * @param int $origin [optional] <p>
 * This parameter can be the following values:
 * </p>
 * <ul>
 * <li>CUBRID_CURSOR_FIRST: move forward from the first
 * beginning.</li>
 * <li>CUBRID_CURSOR_CURRENT: move forward or backward
 * from the current position.</li>
 * <li>CUBRID_CURSOR_LAST: move backward at the end of LOB object.</li>
 * </ul>
 * @return bool <p>
 * TRUE if the process is successful and FALSE for failure.
 * </p>
 */
function cubrid_lob2_seek64($lob_identifier, $offset, $origin = CUBRID_CURSOR_CURRENT) {}

/**
 * (PHP 5, CUBRID &gt;= 8.4.1)<br/>
 * Move the cursor of a lob object.
 * @link https://php.net/manual/en/function.cubrid-lob2-seek.php
 * @param resource $lob_identifier <p>
 * Lob identifier as a result of cubrid_lob2_new() or get
 * from the result set.
 * </p>
 * @param int $offset <p>
 * Number of units you want to move the cursor.
 * </p>
 * @param int $origin [optional] <p>
 * This parameter can be the following values:
 * </p>
 * <ul>
 * <li>CUBRID_CURSOR_FIRST: move forward from the first
 * beginning.</li>
 * <li>CUBRID_CURSOR_CURRENT: move forward or backward
 * from the current position.</li>
 * <li>CUBRID_CURSOR_LAST: move backward at the end of LOB object.</li>
 * </ul>
 * @return bool <p>
 * TRUE if the process is successful and FALSE for failure.
 * </p>
 */
function cubrid_lob2_seek($lob_identifier, $offset, $origin = CUBRID_CURSOR_CURRENT) {}

/**
 * (PHP 5, CUBRID &gt;= 8.4.1)<br/>
 * Get a lob object's size.
 * @link https://php.net/manual/en/function.cubrid-lob2-size64.php
 * @param resource $lob_identifier <p>
 * Lob identifier as a result of cubrid_lob2_new() or get
 * from the result set.
 * </p>
 * @return string <p>
 * It will return the size of the LOB object as a string
 * when it processes successfully. FALSE on failure.
 * </p>
 */
function cubrid_lob2_size64($lob_identifier) {}

/**
 * (PHP 5, CUBRID &gt;= 8.4.1)<br/>
 * Get a lob object's size.
 * @link https://php.net/manual/en/function.cubrid-lob2-size.php
 * @param resource $lob_identifier <p>
 * Lob identifier as a result of cubrid_lob2_new() or get
 * from the result set.
 * </p>
 * @return int <p>
 * It will return the size of the LOB object as a string
 * when it processes successfully. FALSE on failure.
 * </p>
 */
function cubrid_lob2_size($lob_identifier) {}

/**
 * (PHP 5, CUBRID &gt;= 8.4.1)<br/>
 * Tell the cursor position of the LOB object.
 * @link https://php.net/manual/en/function.cubrid-lob2-tell64.php
 * @param resource $lob_identifier <p>
 * Lob identifier as a result of cubrid_lob2_new() or get
 * from the result set.
 * </p>
 * @return string <p>
 * It will return the cursor position on the LOB object as a
 * string when it processes successfully. FALSE on failure.
 * </p>
 */
function cubrid_lob2_tell64($lob_identifier) {}

/**
 * (PHP 5, CUBRID &gt;= 8.4.1)<br/>
 * Tell the cursor position of the LOB object.
 * @link https://php.net/manual/en/function.cubrid-lob2-tell.php
 * @param resource $lob_identifier <p>
 * Lob identifier as a result of cubrid_lob2_new() or get
 * from the result set.
 * </p>
 * @return int <p>
 * It will return the cursor position on the LOB object as a
 * string when it processes successfully. FALSE on failure.
 * </p>
 */
function cubrid_lob2_tell($lob_identifier) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Set a read lock on the given OID
 * @link https://php.net/manual/en/function.cubrid-lock-read.php
 * @param resource $conn_identifier <p>
 * Connection identifier.
 * </p>
 * @param string $oid <p>
 * OID of the instance that you want to put read lock on.
 * </p>
 * @return bool <p>
 * TRUE, when process is successful. FALSE, when
 * process is unsuccessful.
 * </p>
 */
function cubrid_lock_read($conn_identifier, $oid) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Set a write lock on the given OID
 * @link https://php.net/manual/en/function.cubrid-lock-write.php
 * @param resource $conn_identifier <p>
 * Connection identifier.
 * </p>
 * @param string $oid <p>
 * OID of the instance that you want to put write lock on.
 * </p>
 * @return bool <p>
 * TRUE, when process is successful. FALSE, when
 * process is unsuccessful.
 * </p>
 */
function cubrid_lock_write($conn_identifier, $oid) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Move the cursor in the result
 * @link https://php.net/manual/en/function.cubrid-move-cursor.php
 * @param resource $req_identifier <p>
 * Request identifier.
 * </p>
 * @param int $offset <p>
 * Number of units you want to move the cursor.
 * </p>
 * @param int $origin [optional] <p>
 * Location where you want to move the cursor from
 * CUBRID_CURSOR_FIRST, CUBRID_CURSOR_CURRENT, CUBRID_CURSOR_LAST.
 * </p>
 * @return int <p>
 * CUBRID_CURSOR_SUCCESS, when process is successful.
 * CUBRID_NO_MORE_DATA, when it is not a valid cursor location.
 * CUBRID_CURSOR_ERROR, in case of error.
 * </p>
 */
function cubrid_move_cursor($req_identifier, $offset, $origin = CUBRID_CURSOR_CURRENT) {}

/**
 * (PHP 5, CUBRID &gt;= 8.4.0)<br/>
 * Get result of next query when executing multiple SQL statements
 * @link https://php.net/manual/en/function.cubrid-next-result.php
 * @param resource $result <p>
 * result comes from a call to cubrid_execute().
 * </p>
 * @return bool <p>
 * TRUE, when process is successful. FALSE, when
 * process is unsuccessful.
 * </p>
 */
function cubrid_next_result($result) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Prepare an SQL statement for execution
 * @link https://php.net/manual/en/function.cubrid-prepare.php
 * @param resource $conn_identifier <p>
 * Connection identifier.
 * </p>
 * @param string $prepare_stmt <p>
 * Prepare query.
 * </p>
 * @param int $option [optional] <p>
 * OID return option CUBRID_INCLUDE_OID.
 * </p>
 * @return resource|false <p>
 * Request identifier, if process is successful;
 * FALSE, if process is unsuccessful.
 * </p>
 */
function cubrid_prepare($conn_identifier, $prepare_stmt, $option = 0) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Update a column using OID
 * @link https://php.net/manual/en/function.cubrid-put.php
 * @param resource $conn_identifier <p>
 * Connection identifier.
 * </p>
 * @param string $oid <p>
 * OID of the instance that you want to update.
 * </p>
 * @param string $attr [optional] <p>
 * Name of the attribute that you want to update.
 * </p>
 * @param mixed $value <p>
 * New value that you want to assign to the attribute.
 * </p>
 * @return bool <p>
 * TRUE, when process is successful.
 * FALSE, when process is unsuccessful.
 * </p>
 */
function cubrid_put($conn_identifier, $oid, $attr = null, $value) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Get the requested schema information
 * @link https://php.net/manual/en/function.cubrid-schema.php
 * @param resource $conn_identifier <p>
 * Connection identifier.
 * </p>
 * @param int $schema_type <p>
 * Schema data that you want to know.
 * </p>
 * @param string $class_name [optional] <p>
 * Table you want to know the schema of.
 * </p>
 * @param string $attr_name [optional] <p>
 * Attribute you want to know the schema of.
 * </p>
 * @return array <p>
 * Array containing the schema information,
 * when process is successful; FALSE, when process is
 * unsuccessful.
 * </p>
 */
function cubrid_schema($conn_identifier, $schema_type, $class_name = null, $attr_name = null) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Delete an element from sequence type column using OID
 * @link https://php.net/manual/en/function.cubrid-seq-drop.php
 * @param resource $conn_identifier <p>
 * Connection identifier.
 * </p>
 * @param string $oid <p>
 * OID of the instance you want to work with.
 * </p>
 * @param string $attr_name <p>
 * Name of the attribute that you want to delete an element from.
 * </p>
 * @param int $index <p>
 * Index of the element that you want to delete (1-based).
 * </p>
 * @return bool <p>
 * TRUE, when process is successful. FALSE,
 * when process is unsuccessful.
 * </p>
 */
function cubrid_seq_drop($conn_identifier, $oid, $attr_name, $index) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Insert an element to a sequence type column using OID
 * @link https://php.net/manual/en/function.cubrid-seq-insert.php
 * @param resource $conn_identifier <p>
 * Connection identifier.
 * </p>
 * @param string $oid <p>
 * OID of the instance you want to work with.
 * </p>
 * @param string $attr_name <p>
 * Name of the attribute you want to insert an instance to.
 * </p>
 * @param int $index <p>
 * Location of the element, you want to insert the element to (1-based).
 * </p>
 * @param string $seq_element <p>
 * Content of the element that you want to insert.
 * </p>
 * @return bool <p>
 * TRUE, when process is successful. FALSE,
 * when process is unsuccessful.
 * </p>
 */
function cubrid_seq_insert($conn_identifier, $oid, $attr_name, $index, $seq_element) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Update the element value of sequence type column using OID
 * @link https://php.net/manual/en/function.cubrid-seq-put.php
 * @param resource $conn_identifier <p>
 * Connection identifier.
 * </p>
 * @param string $oid <p>
 * OID of the instance you want to work with.
 * </p>
 * @param string $attr_name <p>
 * Name of the attribute that you want to update an element.
 * </p>
 * @param int $index <p>
 * Index of the element that you want to delete (1-based).
 * </p>
 * @param string $seq_element <p>
 * New content that you want to use for the update.
 * </p>
 * @return bool <p>
 * TRUE, when process is successful. FALSE,
 * when process is unsuccessful.
 * </p>
 */
function cubrid_seq_put($conn_identifier, $oid, $attr_name, $index, $seq_element) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Insert a single element to set type column using OID
 * @link https://php.net/manual/en/function.cubrid-seq-add.php
 * @param resource $conn_identifier <p>
 * Connection identifier.
 * </p>
 * @param string $oid <p>
 * OID of the instance you want to work with.
 * </p>
 * @param string $attr_name <p>
 * Name of the attribute you want to insert an element.
 * </p>
 * @param string $seq_element <p>
 * Content of the element that you want to insert.
 * </p>
 * @return bool <p>
 * TRUE, when process is successful. FALSE,
 * when process is unsuccessful.
 * </p>
 */
function cubrid_seq_add($conn_identifier, $oid, $attr_name, $seq_element) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Insert a single element to set type column using OID
 * @link https://php.net/manual/en/function.cubrid-set-add.php
 * @param resource $conn_identifier <p>
 * Connection identifier.
 * </p>
 * @param string $oid <p>
 * OID of the instance you want to work with.
 * </p>
 * @param string $attr_name <p>
 * Name of the attribute you want to insert an element.
 * </p>
 * @param string $set_element <p>
 * Content of the element you want to insert.
 * </p>
 * @return bool <p>
 * TRUE, when process is successful. FALSE,
 * when process is unsuccessful.
 * </p>
 */
function cubrid_set_add($conn_identifier, $oid, $attr_name, $set_element) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Delete an element from set type column using OID
 * @link https://php.net/manual/en/function.cubrid-set-drop.php
 * @param resource $conn_identifier <p>
 * Connection identifier.
 * </p>
 * @param string $oid <p>
 * OID of the instance you want to work with.
 * </p>
 * @param string $attr_name <p>
 * Name of the attribute you want to delete an element from.
 * </p>
 * @param string $set_element <p>
 * Content of the element you want to delete.
 * </p>
 * @return bool <p>
 * TRUE, when process is successful. FALSE,
 * when process is unsuccessful.
 * </p>
 */
function cubrid_set_drop($conn_identifier, $oid, $attr_name, $set_element) {}

/**
 * (PHP 5, CUBRID &gt;= 8.3.0)<br/>
 * Get the CUBRID PHP module's version
 * @link https://php.net/manual/en/function.cubrid-version.php
 * @return string <p>
 * Version information (eg. "8.4.1.0001").
 * </p>
 */
function cubrid_version() {}

/**
 * Columns are returned into the array having a numerical index to the
 * fields. This index starts with 0, the first field in the result.
 * @link https://php.net/manual/en/cubrid.constants.php
 */
define('CUBRID_NUM', 1);

/**
 * Columns are returned into the array having the fieldname as the array
 * index.
 * @link https://php.net/manual/en/cubrid.constants.php
 */
define('CUBRID_ASSOC', 2);

/**
 * Columns are returned into the array having both a numerical index
 * and the fieldname as the array index.
 * @link https://php.net/manual/en/cubrid.constants.php
 */
define('CUBRID_BOTH', 3);

/**
 * Get query result as an object.
 * @link https://php.net/manual/en/cubrid.constants.php
 */
define('CUBRID_OBJECT', 4);

/**
 * Determine whether to get OID during query execution.
 * @link https://php.net/manual/en/cubrid.constants.php
 */
define('CUBRID_INCLUDE_OID', 1);

/**
 * Execute the query in asynchronous mode.
 * @link https://php.net/manual/en/cubrid.constants.php
 */
define('CUBRID_ASYNC', 2);

/**
 * Execute the query in synchronous mode.
 * This flag must be set when executing multiple SQL statements.
 * @link https://php.net/manual/en/cubrid.constants.php
 */
define('CUBRID_EXEC_QUERY_ALL', 4);

/**
 * Returned value of cubrid_move_cursor() function
 * in case of success.
 * @link https://php.net/manual/en/cubrid.constants.php
 */
define('CUBRID_CURSOR_SUCCESS', 1);

/**
 * Returned value of cubrid_move_cursor() function in case
 * of failure.
 * @link https://php.net/manual/en/cubrid.constants.php
 */
define('CUBRID_NO_MORE_DATA', 0);

/**
 * Returned value of cubrid_move_cursor() function in case
 * of failure.
 * @link https://php.net/manual/en/cubrid.constants.php
 */
define('CUBRID_CURSOR_ERROR', -1);

/**
 * Enable the auto-commit mode.
 * @link https://php.net/manual/en/cubrid.constants.php
 */
define('CUBRID_AUTOCOMMIT_TRUE', 1);

/**
 * Disable the auto-commit mode.
 * @link https://php.net/manual/en/cubrid.constants.php
 */
define('CUBRID_AUTOCOMMIT_FALSE', 0);

/**
 * Move current cursor to the first position in the result.
 * @link https://php.net/manual/en/cubrid.constants.php
 */
define('CUBRID_CURSOR_FIRST', 0);

/**
 * Move current cursor as a default value if the origin is
 * not specified.
 * @link https://php.net/manual/en/cubrid.constants.php
 */
define('CUBRID_CURSOR_CURRENT', 1);

/**
 * Move current cursor to the last position in the result.
 * @link https://php.net/manual/en/cubrid.constants.php
 */
define('CUBRID_CURSOR_LAST', 2);

// End of cubrid v.1.0
<?php

// Start of Zend Debugger v.

function debugger_print() {}

function get_call_stack() {}

function debugger_start_debug() {}

function debugger_connector_pid() {}

function debugger_connect() {}

function debugger_get_server_start_time() {}

// End of Zend Debugger v.
<?php

// Start of mailparse v.

/**
 * (PECL mailparse >= 0.9.0)<br/>
 * Figures out the best way of encoding the content read from the given file pointer.
 * @link https://php.net/manual/en/function.mailparse-determine-best-xfer-encoding.php
 * @param resource $fp <p>
 * A valid file pointer, which must be seek-able.
 * </p>
 * @return string Returns one of the character encodings supported by the
 * {@link https://php.net/manual/en/ref.mbstring.php mbstring} module.
 */
function mailparse_determine_best_xfer_encoding($fp) {}

/**
 * (PECL mailparse >= 0.9.0)<br/>
 * Create a MIME mail resource.
 * @link https://php.net/manual/en/function.mailparse-msg-create.php
 * @return resource Returns a handle that can be used to parse a message.
 */
function mailparse_msg_create() {}

/**
 * (PECL mailparse >= 0.9.0)<br/>
 * Extracts/decodes a message section from the supplied filename.
 * The contents of the section will be decoded according to their transfer encoding - base64, quoted-printable and
 * uuencoded text are supported.
 * @link https://php.net/manual/en/function.mailparse-msg-extract-part-file.php
 * @param resource $mimemail <p>
 * A valid MIME resource, created with {@link https://php.net/manual/en/function.mailparse-msg-create.php mailparse_msg_create()}.
 * </p>
 * @param mixed $filename <p>
 * Can be a file name or a valid stream resource.
 * </p>
 * @param callable $callbackfunc [optional] <p>
 * If set, this must be either a valid callback that will be passed the extracted section, or <b>NULL</b> to make this
 * function return the extracted section.
 * </p>
 * <p>
 * If not specified, the contents will be sent to "stdout".
 * </p>
 * @return string|bool <p>
 * If callbackfunc is not <b>NULL</b> returns <b>TRUE</b> on success.
 * </p>
 * <p>
 * If callbackfunc is set to <b>NULL</b>, returns the extracted section as a string.
 * </p>
 * <p>
 * Returns FALSE on error.
 * </p>
 */
function mailparse_msg_extract_part_file($mimemail, $filename, $callbackfunc) {}

/**
 * (PECL mailparse >= 0.9.0)<br/>
 * Extracts/decodes a message section
 * @link https://php.net/manual/en/function.mailparse-msg-extract-part.php
 * @param resource $mimemail <p>
 * A valid MIME resource.
 * </p>
 * @param string $msgbody
 * @param callable $callbackfunc [optional]
 * @return void
 */
function mailparse_msg_extract_part($mimemail, $msgbody, $callbackfunc) {}

/**
 * (PECL mailparse >= 0.9.0)<br/>
 * Extracts a message section including headers without decoding the transfer encoding
 * @link https://php.net/manual/en/function.mailparse-msg-extract-whole-part-file.php
 * @param resource $mimemail <p>
 * A valid MIME resource
 * </p>
 * @param string $filename
 * @param callable $callbackfunc [optional]
 * @return string
 */
function mailparse_msg_extract_whole_part_file($mimemail, $filename, $callbackfunc) {}

/**
 * (PECL mailparse >= 0.9.0)<br/>
 * Frees a MIME resource.
 * @link https://php.net/manual/en/function.mailparse-msg-free.php
 * @param resource $mimemail <p>
 * A valid MIME resource allocated by
 * {@link https://php.net/manual/en/function.mailparse-msg-create.php mailparse_msg_create()} or
 * {@link https://php.net/manual/en/function.mailparse-msg-parse-file.php mailparse_msg_parse_file()}.
 * </p>
 * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function mailparse_msg_free($mimemail) {}

/**
 * (PECL mailparse >= 0.9.0)<br/>
 * Returns an associative array of info about the message
 * @link https://php.net/manual/en/function.mailparse-msg-get-part-data.php
 * @param resource $mimemail <p>
 * A valid MIME resource.
 * </p>
 * @return array
 */
function mailparse_msg_get_part_data($mimemail) {}

/**
 * (PECL mailparse >= 0.9.0)<br/>
 * Returns a handle on a given section in a mimemessage
 * @link https://php.net/manual/en/function.mailparse-msg-get-part.php
 * @param resource $mimemail <p>
 * A valid MIME resource.
 * </p>
 * @param string $mimesection
 * @return resource|false
 */
function mailparse_msg_get_part($mimemail, $mimesection) {}

/**
 * (PECL mailparse >= 0.9.0)<br/>
 * Returns an array of mime section names in the supplied message
 * @link https://php.net/manual/en/function.mailparse-msg-get-structure.php
 * @param resource $mimemail <p>
 * A valid MIME resource.
 * </p>
 * @return array
 */
function mailparse_msg_get_structure($mimemail) {}

/**
 * (PECL mailparse >= 0.9.0)<br/>
 * Parses a file. This is the optimal way of parsing a mail file that you have on disk.
 * @link https://php.net/manual/en/function.mailparse-msg-parse-file.php
 * @param string $filename <p>
 * Path to the file holding the message. The file is opened and streamed through the parser.
 * </p>
 * @return resource|false Returns a MIME resource representing the structure, or <b>FALSE</b> on error.
 */
function mailparse_msg_parse_file($filename) {}

/**
 * (PECL mailparse >= 0.9.0)<br/>
 * Incrementally parse data into the supplied mime mail resource.
 * This function allow you to stream portions of a file at a time, rather than read and parse the whole thing.
 * @link https://php.net/manual/en/function.mailparse-msg-parse.php
 * @param resource $mimemail <p>
 * A valid MIME resource.
 * </p>
 * @param string $data
 * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function mailparse_msg_parse($mimemail, $data) {}

/**
 * (PECL mailparse >= 0.9.0)<br/>
 * Parses a {@link http://www.faqs.org/rfcs/rfc822 RFC 822} compliant recipient list, such as that found in the To: header.
 * @link https://php.net/manual/en/function.mailparse-rfc822-parse-addresses.php
 * @param string $addresses <p>
 * A string containing addresses, like in: <pre>Wez Furlong <wez@example.com>, doe@example.com</pre>
 * Note: This string must not include the header name.
 * </p>
 * @return array <p>
 * Returns an array of associative arrays with the following keys for each recipient:
 * </p>
 * <table>
 * <tr valign="top">
 * <td>display</td>
 * <td>The recipient name, for display purpose. If this part is not set for a recipient, this key will hold the same value as address.</td>
 * </tr>
 * <tr valign="top">
 * <td>address</td>
 * <td>The email address</td>
 * </tr>
 * <tr valign="top">
 * <td>is_group</td>
 * <td><b>TRUE</b> if the recipient is a newsgroup, <b>FALSE</b> otherwise.</td>
 * </tr>
 * </table>
 */
function mailparse_rfc822_parse_addresses($addresses) {}

/**
 * (PECL mailparse >= 0.9.0)<br/>
 * Streams data from the source file pointer, apply encoding and write to the destination file pointer.
 * @link https://php.net/manual/en/function.mailparse-stream-encode.php
 * @param resource $sourcefp <p>
 * A valid file handle. The file is streamed through the parser.
 * </p>
 * @param resource $destfp <p>
 * The destination file handle in which the encoded data will be written.
 * </p>
 * @param string $encoding <p>
 * One of the character encodings supported by the {@link https://php.net/manual/en/ref.mbstring.php mbstring} module.
 * </p>
 * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function mailparse_stream_encode($sourcefp, $destfp, $encoding) {}

/**
 * (PECL mailparse >= 0.9.0)<br/>
 * Scans the data from the given file pointer and extract each embedded uuencoded file into a temporary file.
 * @link https://php.net/manual/en/function.mailparse-uudecode-all.php
 * @param resource $fp <p>
 * A valid file pointer.
 * </p>
 * @return array <p>
 * Returns an array of associative arrays listing filename information.
 * </p>
 * <table>
 * <tr valign="top">
 * <td>filename</td>
 * <td>Path to the temporary file name created</td>
 * </tr>
 * <tr valign="top">
 * <td>origfilename</td>
 * <td>The original filename, for uuencoded parts only</td>
 * </tr>
 * </table>
 * <p>
 * The first filename entry is the message body. The next entries are the decoded uuencoded files.
 * </p>
 */
function mailparse_uudecode_all($fp) {}

define('MAILPARSE_EXTRACT_OUTPUT', 0);
define('MAILPARSE_EXTRACT_STREAM', 1);
define('MAILPARSE_EXTRACT_RETURN', 2);

// End of mailparse v.
<?php

// Start of pcre v.
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Pure;

/**
 * Perform a regular expression match
 * @link https://php.net/manual/en/function.preg-match.php
 * @param string $pattern <p>
 * The pattern to search for, as a string.
 * </p>
 * @param string $subject <p>
 * The input string.
 * </p>
 * @param string[] &$matches [optional] <p>
 * If <i>matches</i> is provided, then it is filled with
 * the results of search. $matches[0] will contain the
 * text that matched the full pattern, $matches[1]
 * will have the text that matched the first captured parenthesized
 * subpattern, and so on.
 * </p>
 * @param int $flags [optional] <p>
 * <i>flags</i> can be the following flag:
 * <b>PREG_OFFSET_CAPTURE</b>
 * <blockquote>
 * If this flag is passed, for every occurring match the appendant string
 * offset will also be returned. Note that this changes the value of
 * <i>matches</i> into an array where every element is an
 * array consisting of the matched string at offset 0
 * and its string offset into <i>subject</i> at offset 1.
 * <pre>
 * <?php
 * preg_match('/(foo)(bar)(baz)/', 'foobarbaz', $matches, PREG_OFFSET_CAPTURE);
 * print_r($matches);
 * ?>
 * </pre>
 * The above example will output:
 * <pre>
 * Array
 * (
 *     [0] => Array
 *         (
 *             [0] => foobarbaz
 *             [1] => 0
 *         )
 *
 *     [1] => Array
 *         (
 *             [0] => foo
 *             [1] => 0
 *         )
 *
 *     [2] => Array
 *         (
 *             [0] => bar
 *             [1] => 3
 *         )
 *
 *     [3] => Array
 *         (
 *             [0] => baz
 *             [1] => 6
 *         )
 *
 * )
 * </pre>
 * </blockquote>
 * <b>PREG_UNMATCHED_AS_NULL</b>
 * <blockquote>
 * If this flag is passed, unmatched subpatterns are reported as NULL;
 * otherwise they are reported as an empty string.
 * <pre>
 * <?php
 * preg_match('/(a)(b)*(c)/', 'ac', $matches);
 * var_dump($matches);
 * preg_match('/(a)(b)*(c)/', 'ac', $matches, PREG_UNMATCHED_AS_NULL);
 * var_dump($matches);
 * ?>
 * </pre>
 * The above example will output:
 * <pre>
 * array(4) {
 *   [0]=>
 *   string(2) "ac"
 *   [1]=>
 *   string(1) "a"
 *   [2]=>
 *   string(0) ""
 *   [3]=>
 *   string(1) "c"
 * }
 * array(4) {
 *   [0]=>
 *   string(2) "ac"
 *   [1]=>
 *   string(1) "a"
 *   [2]=>
 *   NULL
 *   [3]=>
 *   string(1) "c"
 * }
 * </pre>
 * </blockquote>
 * @param int $offset [optional] <p>
 * Normally, the search starts from the beginning of the subject string.
 * The optional parameter <i>offset</i> can be used to
 * specify the alternate place from which to start the search (in bytes).
 * </p>
 * <p>
 * Using <i>offset</i> is not equivalent to passing
 * substr($subject, $offset) to
 * <b>preg_match</b> in place of the subject string,
 * because <i>pattern</i> can contain assertions such as
 * ^, $ or
 * (?&lt;=x). Compare:
 * <pre>
 * $subject = "abcdef";
 * $pattern = '/^def/';
 * preg_match($pattern, $subject, $matches, PREG_OFFSET_CAPTURE, 3);
 * print_r($matches);
 * </pre>
 * The above example will output:</p>
 * <pre>
 * Array
 * (
 * )
 * </pre>
 * <p>
 * while this example
 * </p>
 * <code>
 * $subject = "abcdef";
 * $pattern = '/^def/';
 * preg_match($pattern, substr($subject,3), $matches, PREG_OFFSET_CAPTURE);
 * print_r($matches);
 * </code>
 * <p>
 * will produce
 * </p>
 * <pre>
 * Array
 * (
 *     [0] => Array
 *         (
 *             [0] => def
 *             [1] => 0
 *         )
 * )
 * </pre>
 * Alternatively, to avoid using substr(), use the \G assertion rather
 * than the ^ anchor, or the A modifier instead, both of which work with
 * the offset parameter.
 * </p>
 * @return int|false <b>preg_match</b> returns 1 if the <i>pattern</i>
 * matches given <i>subject</i>, 0 if it does not, or <b>FALSE</b>
 * if an error occurred.
 */
function preg_match(string $pattern, string $subject, &$matches, int $flags = 0, int $offset = 0): int|false {}

/**
 * Perform a global regular expression match
 * @link https://php.net/manual/en/function.preg-match-all.php
 * @param string $pattern <p>
 * The pattern to search for, as a string.
 * </p>
 * @param string $subject <p>
 * The input string.
 * </p>
 * @param string[][] &$matches [optional] <p>
 * Array of all matches in multi-dimensional array ordered according to flags.
 * </p>
 * @param int $flags <p>
 * Can be a combination of the following flags (note that it doesn't make
 * sense to use <b>PREG_PATTERN_ORDER</b> together with
 * <b>PREG_SET_ORDER</b>):
 * <b>PREG_PATTERN_ORDER</b>
 * <br>
 * Orders results so that $matches[0] is an array of full
 * pattern matches, $matches[1] is an array of strings matched by
 * the first parenthesized subpattern, and so on.
 * </p>
 * @param int $offset [optional] <p>
 * Normally, the search starts from the beginning of the subject string.
 * The optional parameter <i>offset</i> can be used to
 * specify the alternate place from which to start the search (in bytes).
 * </p>
 * <p>
 * Using <i>offset</i> is not equivalent to passing
 * substr($subject, $offset) to
 * <b>preg_match_all</b> in place of the subject string,
 * because <i>pattern</i> can contain assertions such as
 * ^, $ or
 * (?&lt;=x). See <b>preg_match</b>
 * for examples.
 * </p>
 * <p>
 * <code>
 * preg_match_all("|]+>(.*)]+>|U",
 * "example: this is a test",
 * $out, PREG_PATTERN_ORDER);
 * echo $out[0][0] . ", " . $out[0][1] . "\n";
 * echo $out[1][0] . ", " . $out[1][1] . "\n";
 * </code>
 * The above example will output:</p>
 * <pre>
 * example: , this is a test
 * example: , this is a test
 * </pre>
 * <p>
 * So, $out[0] contains array of strings that matched full pattern,
 * and $out[1] contains array of strings enclosed by tags.
 * </p>
 * @return int|false|null the number of full pattern matches (which might be zero),
 * or <b>FALSE</b> if an error occurred.
 */
#[LanguageLevelTypeAware(['8.0' => 'int|false'], default: 'int|false|null')]
function preg_match_all(string $pattern, string $subject, &$matches, int $flags = 0, int $offset = 0) {}

/**
 * Perform a regular expression search and replace
 * @link https://php.net/manual/en/function.preg-replace.php
 * @param string|string[] $pattern <p>
 * The pattern to search for. It can be either a string or an array with
 * strings.
 * </p>
 * <p>
 * Several PCRE modifiers
 * are also available, including the deprecated 'e'
 * (PREG_REPLACE_EVAL), which is specific to this function.
 * </p>
 * @param string|string[] $replacement <p>
 * The string or an array with strings to replace. If this parameter is a
 * string and the <i>pattern</i> parameter is an array,
 * all patterns will be replaced by that string. If both
 * <i>pattern</i> and <i>replacement</i>
 * parameters are arrays, each <i>pattern</i> will be
 * replaced by the <i>replacement</i> counterpart. If
 * there are fewer elements in the <i>replacement</i>
 * array than in the <i>pattern</i> array, any extra
 * <i>pattern</i>s will be replaced by an empty string.
 * </p>
 * <p>
 * <i>replacement</i> may contain references of the form
 * \\n or (since PHP 4.0.4)
 * $n, with the latter form
 * being the preferred one. Every such reference will be replaced by the text
 * captured by the n'th parenthesized pattern.
 * n can be from 0 to 99, and
 * \\0 or $0 refers to the text matched
 * by the whole pattern. Opening parentheses are counted from left to right
 * (starting from 1) to obtain the number of the capturing subpattern.
 * To use backslash in replacement, it must be doubled
 * ("\\\\" PHP string).
 * </p>
 * <p>
 * When working with a replacement pattern where a backreference is
 * immediately followed by another number (i.e.: placing a literal number
 * immediately after a matched pattern), you cannot use the familiar
 * \\1 notation for your backreference.
 * \\11, for example, would confuse
 * <b>preg_replace</b> since it does not know whether you
 * want the \\1 backreference followed by a literal
 * 1, or the \\11 backreference
 * followed by nothing. In this case the solution is to use
 * \${1}1. This creates an isolated
 * $1 backreference, leaving the 1
 * as a literal.
 * </p>
 * <p>
 * When using the deprecated e modifier, this function escapes
 * some characters (namely ', ",
 * \ and NULL) in the strings that replace the
 * backreferences. This is done to ensure that no syntax errors arise
 * from backreference usage with either single or double quotes (e.g.
 * 'strlen(\'$1\')+strlen("$2")'). Make sure you are
 * aware of PHP's string
 * syntax to know exactly how the interpreted string will look.
 * </p>
 * @param string|string[] $subject <p>
 * The string or an array with strings to search and replace.
 * </p>
 * <p>
 * If <i>subject</i> is an array, then the search and
 * replace is performed on every entry of <i>subject</i>,
 * and the return value is an array as well.
 * </p>
 * @param int $limit [optional] <p>
 * The maximum possible replacements for each pattern in each
 * <i>subject</i> string. Defaults to
 * -1 (no limit).
 * </p>
 * @param int &$count [optional] <p>
 * If specified, this variable will be filled with the number of
 * replacements done.
 * </p>
 * @return string|string[]|null <b>preg_replace</b> returns an array if the
 * <i>subject</i> parameter is an array, or a string
 * otherwise.
 * </p>
 * <p>
 * If matches are found, the new <i>subject</i> will
 * be returned, otherwise <i>subject</i> will be
 * returned unchanged or <b>NULL</b> if an error occurred.
 */
function preg_replace(array|string $pattern, array|string $replacement, array|string $subject, int $limit = -1, &$count): array|string|null {}

/**
 * Perform a regular expression search and replace using a callback
 * @link https://php.net/manual/en/function.preg-replace-callback.php
 * @param string|string[] $pattern <p>
 * The pattern to search for. It can be either a string or an array with
 * strings.
 * </p>
 * @param callable $callback <p>
 * A callback that will be called and passed an array of matched elements
 * in the <i>subject</i> string. The callback should
 * return the replacement string. This is the callback signature:
 * </p>
 * <p>
 * string<b>handler</b>
 * <b>array<i>matches</i></b>
 * </p>
 * <p>
 * You'll often need the <i>callback</i> function
 * for a <b>preg_replace_callback</b> in just one place.
 * In this case you can use an
 * anonymous function to
 * declare the callback within the call to
 * <b>preg_replace_callback</b>. By doing it this way
 * you have all information for the call in one place and do not
 * clutter the function namespace with a callback function's name
 * not used anywhere else.
 * </p>
 * <p>
 * <b>preg_replace_callback</b> and
 * anonymous function
 * <code>
 * /* a unix-style command line filter to convert uppercase
 * * letters at the beginning of paragraphs to lowercase * /
 * $fp = fopen("php://stdin", "r") or die("can't read stdin");
 * while (!feof($fp)) {
 * $line = fgets($fp);
 * $line = preg_replace_callback(
 * '|<p>\s*\w|',
 * function ($matches) {
 * return strtolower($matches[0]);
 * },
 * $line
 * );
 * echo $line;
 * }
 * fclose($fp);
 * </code>
 * </p>
 * @param string|string[] $subject <p>
 * The string or an array with strings to search and replace.
 * </p>
 * @param int $limit [optional] <p>
 * The maximum possible replacements for each pattern in each
 * <i>subject</i> string. Defaults to
 * -1 (no limit).
 * </p>
 * @param int &$count [optional] <p>
 * If specified, this variable will be filled with the number of
 * replacements done.
 * </p>
 * @param int $flags [optional]
 * @return string|string[]|null <b>preg_replace_callback</b> returns an array if the
 * <i>subject</i> parameter is an array, or a string
 * otherwise. On errors the return value is <b>NULL</b>
 * </p>
 * <p>
 * If matches are found, the new subject will be returned, otherwise
 * <i>subject</i> will be returned unchanged.
 */
function preg_replace_callback(
    array|string $pattern,
    callable $callback,
    array|string $subject,
    int $limit = -1,
    &$count,
    #[PhpStormStubsElementAvailable(from: '7.4')] int $flags = 0
): array|string|null {}

/**
 * Perform a regular expression search and replace using callbacks
 * @link https://php.net/manual/en/function.preg-replace-callback-array.php
 * @param callable[] $pattern An associative array mapping patterns (keys) to callbacks (values)
 * @param string|string[] $subject
 * @param int $limit [optional]
 * @param int &$count [optional]
 * @param int $flags [optional]
 * @return string|string[]|null  <p>preg_replace_callback_array() returns an array if the subject parameter is an array, or a string otherwise. On errors the return value is NULL</p>
 * <p>If matches are found, the new subject will be returned, otherwise subject will be returned unchanged.</p>
 */
function preg_replace_callback_array(
    array $pattern,
    array|string $subject,
    int $limit = -1,
    &$count,
    #[PhpStormStubsElementAvailable(from: '7.4')] int $flags = 0
): array|string|null {}

/**
 * Perform a regular expression search and replace
 * @link https://php.net/manual/en/function.preg-filter.php
 * @param string|string[] $pattern
 * @param string|string[] $replacement
 * @param string|string[] $subject
 * @param int $limit [optional]
 * @param int &$count [optional]
 * @return string|string[]|null an array if the <i>subject</i>
 * parameter is an array, or a string otherwise.
 * </p>
 * <p>
 * If no matches are found or an error occurred, an empty array
 * is returned when <i>subject</i> is an array
 * or <b>NULL</b> otherwise.
 */
function preg_filter(array|string $pattern, array|string $replacement, array|string $subject, int $limit = -1, &$count): array|string|null {}

/**
 * Split string by a regular expression
 * @link https://php.net/manual/en/function.preg-split.php
 * @param string $pattern <p>
 * The pattern to search for, as a string.
 * </p>
 * @param string $subject <p>
 * The input string.
 * </p>
 * @param int $limit [optional] <p>
 * If specified, then only substrings up to <i>limit</i>
 * are returned with the rest of the string being placed in the last
 * substring. A <i>limit</i> of -1, 0 or <b>NULL</b> means "no limit"
 * and, as is standard across PHP, you can use <b>NULL</b> to skip to the
 * <i>flags</i> parameter.
 * </p>
 * @param int $flags [optional] <p>
 * <i>flags</i> can be any combination of the following
 * flags (combined with the | bitwise operator):
 * <b>PREG_SPLIT_NO_EMPTY</b>
 * If this flag is set, only non-empty pieces will be returned by
 * <b>preg_split</b>.
 * </p>
 * @return string[]|false an array containing substrings of <i>subject</i>
 * split along boundaries matched by <i>pattern</i>, or <b>FALSE</b>
 * if an error occurred.
 */
#[Pure]
function preg_split(string $pattern, string $subject, int $limit = -1, int $flags = 0): array|false {}

/**
 * Quote regular expression characters
 * @link https://php.net/manual/en/function.preg-quote.php
 * @param string $str <p>
 * The input string.
 * </p>
 * @param string|null $delimiter [optional] <p>
 * If the optional <i>delimiter</i> is specified, it
 * will also be escaped. This is useful for escaping the delimiter
 * that is required by the PCRE functions. The / is the most commonly
 * used delimiter.
 * </p>
 * @return string the quoted (escaped) string.
 */
#[Pure]
function preg_quote(string $str, ?string $delimiter = null): string {}

/**
 * Return array entries that match the pattern
 * @link https://php.net/manual/en/function.preg-grep.php
 * @param string $pattern <p>
 * The pattern to search for, as a string.
 * </p>
 * @param array $array <p>
 * The input array.
 * </p>
 * @param int $flags [optional] <p>
 * If set to <b>PREG_GREP_INVERT</b>, this function returns
 * the elements of the input array that do not match
 * the given <i>pattern</i>.
 * </p>
 * @return array|false an array indexed using the keys from the
 * <i>input</i> array or false when pattern cannot be compiled.
 */
#[Pure]
function preg_grep(string $pattern, array $array, int $flags = 0): array|false {}

/**
 * Returns the error code of the last PCRE regex execution
 * @link https://php.net/manual/en/function.preg-last-error.php
 * @return int one of the following constants (explained on their own page):
 * <b>PREG_NO_ERROR</b>
 * <b>PREG_INTERNAL_ERROR</b>
 * <b>PREG_BACKTRACK_LIMIT_ERROR</b> (see also pcre.backtrack_limit)
 * <b>PREG_RECURSION_LIMIT_ERROR</b> (see also pcre.recursion_limit)
 * <b>PREG_BAD_UTF8_ERROR</b>
 * <b>PREG_BAD_UTF8_OFFSET_ERROR</b> (since PHP 5.3.0)
 */
#[Pure(true)]
function preg_last_error(): int {}

/**
 * Returns the error message of the last PCRE regex execution
 *
 * @return string one of the error messages or "No error" if there is no error.
 * @since 8.0
 */
#[Pure(true)]
function preg_last_error_msg(): string {}

/**
 * Orders results so that $matches[0] is an array of full pattern
 * matches, $matches[1] is an array of strings matched by the first
 * parenthesized subpattern, and so on. This flag is only used with
 * <b>preg_match_all</b>.
 * @link https://php.net/manual/en/pcre.constants.php
 */
define('PREG_PATTERN_ORDER', 1);

/**
 * Returned by {@see preg_last_error()} if the last PCRE function failed due to limited JIT stack space.
 * @since 7.0
 */
define('PREG_JIT_STACKLIMIT_ERROR', 6);
/**
 * Orders results so that $matches[0] is an array of first set of
 * matches, $matches[1] is an array of second set of matches, and so
 * on. This flag is only used with <b>preg_match_all</b>.
 * @link https://php.net/manual/en/pcre.constants.php
 */
define('PREG_SET_ORDER', 2);

/**
 * See the description of
 * <b>PREG_SPLIT_OFFSET_CAPTURE</b>.
 * @link https://php.net/manual/en/pcre.constants.php
 */
define('PREG_OFFSET_CAPTURE', 256);

/**
 * This flag tells <b>preg_split</b> to return only non-empty
 * pieces.
 * @link https://php.net/manual/en/pcre.constants.php
 */
define('PREG_SPLIT_NO_EMPTY', 1);

/**
 * This flag tells <b>preg_split</b> to capture
 * parenthesized expression in the delimiter pattern as well.
 * @link https://php.net/manual/en/pcre.constants.php
 */
define('PREG_SPLIT_DELIM_CAPTURE', 2);

/**
 * If this flag is set, for every occurring match the appendant string
 * offset will also be returned. Note that this changes the return
 * values in an array where every element is an array consisting of the
 * matched string at offset 0 and its string offset within subject at
 * offset 1. This flag is only used for <b>preg_split</b>.
 * @link https://php.net/manual/en/pcre.constants.php
 */
define('PREG_SPLIT_OFFSET_CAPTURE', 4);
define('PREG_GREP_INVERT', 1);

/**
 * Returned by <b>preg_last_error</b> if there were no
 * errors.
 * @link https://php.net/manual/en/pcre.constants.php
 */
define('PREG_NO_ERROR', 0);

/**
 * Returned by <b>preg_last_error</b> if there was an
 * internal PCRE error.
 * @link https://php.net/manual/en/pcre.constants.php
 */
define('PREG_INTERNAL_ERROR', 1);

/**
 * Returned by <b>preg_last_error</b> if backtrack limit was exhausted.
 * @link https://php.net/manual/en/pcre.constants.php
 */
define('PREG_BACKTRACK_LIMIT_ERROR', 2);

/**
 * Returned by <b>preg_last_error</b> if recursion limit was exhausted.
 * @link https://php.net/manual/en/pcre.constants.php
 */
define('PREG_RECURSION_LIMIT_ERROR', 3);

/**
 * Returned by <b>preg_last_error</b> if the last error was
 * caused by malformed UTF-8 data (only when running a regex in UTF-8 mode).
 * @link https://php.net/manual/en/pcre.constants.php
 */
define('PREG_BAD_UTF8_ERROR', 4);

/**
 * Returned by <b>preg_last_error</b> if the offset didn't
 * correspond to the begin of a valid UTF-8 code point (only when running
 * a regex in UTF-8
 * mode).
 * @link https://php.net/manual/en/pcre.constants.php
 */
define('PREG_BAD_UTF8_OFFSET_ERROR', 5);

/**
 * This flag tells {@see preg_match()} and {@see preg_match_all()}
 * to include unmatched subpatterns in <b>$matches</b> as NULL values.
 * Without this flag, unmatched subpatterns are reported as empty strings,
 * as if they were empty matches. Setting this flag allows to distinguish between these two cases.
 * @since 7.2
 */
define('PREG_UNMATCHED_AS_NULL', 512);
/**
 * PCRE version and release date (e.g. "7.0 18-Dec-2006").
 * @link https://php.net/manual/en/pcre.constants.php
 */
define('PCRE_VERSION', "8.31 2012-07-06");

/**
 * @since 7.3
 */
define('PCRE_VERSION_MAJOR', 10);

/**
 * @since 7.3
 */
define('PCRE_VERSION_MINOR', 40);

/**
 * @since 7.3
 */
define('PCRE_JIT_SUPPORT', 1);
// End of pcre v.
<?php

namespace PSpell;

/**
 * A fully opaque class which replaces a pspell resource as of PHP 8.1.0.
 * @since 8.1
 */
final class Dictionary {}

/**
 * A fully opaque class which replaces a pspell config resource as of PHP 8.1.0.
 * @since 8.1
 */
final class Config {}
<?php

// Start of pspell v.
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;

/**
 * Load a new dictionary
 * @link https://php.net/manual/en/function.pspell-new.php
 * @param string $language <p>
 * The language parameter is the language code which consists of the
 * two letter ISO 639 language code and an optional two letter ISO
 * 3166 country code after a dash or underscore.
 * </p>
 * @param string $spelling <p>
 * The spelling parameter is the requested spelling for languages
 * with more than one spelling such as English. Known values are
 * 'american', 'british', and 'canadian'.
 * </p>
 * @param string $jargon <p>
 * The jargon parameter contains extra information to distinguish
 * two different words lists that have the same language and
 * spelling parameters.
 * </p>
 * @param string $encoding <p>
 * The encoding parameter is the encoding that words are expected to
 * be in. Valid values are 'utf-8', 'iso8859-*', 'koi8-r',
 * 'viscii', 'cp1252', 'machine unsigned 16', 'machine unsigned
 * 32'. This parameter is largely untested, so be careful when
 * using.
 * </p>
 * @param int $mode <p>
 * The mode parameter is the mode in which spellchecker will work.
 * There are several modes available:
 * <b>PSPELL_FAST</b> - Fast mode (least number of
 * suggestions)</p>
 * @return int|false the dictionary link identifier on success or <b>FALSE</b> on failure.
 */
#[LanguageLevelTypeAware(['8.1' => 'PSpell\Dictionary|false'], default: 'int|false')]
function pspell_new(string $language, string $spelling = "", string $jargon = "", string $encoding = "", int $mode = 0) {}

/**
 * Load a new dictionary with personal wordlist
 * @link https://php.net/manual/en/function.pspell-new-personal.php
 * @param string $filename <p>
 * The file where words added to the personal list will be stored.
 * It should be an absolute filename beginning with '/' because otherwise
 * it will be relative to $HOME, which is "/root" for most systems, and
 * is probably not what you want.
 * </p>
 * @param string $language <p>
 * The language code which consists of the two letter ISO 639 language
 * code and an optional two letter ISO 3166 country code after a dash
 * or underscore.
 * </p>
 * @param string $spelling <p>
 * The requested spelling for languages with more than one spelling such
 * as English. Known values are 'american', 'british', and 'canadian'.
 * </p>
 * @param string $jargon <p>
 * Extra information to distinguish two different words lists that have
 * the same language and spelling parameters.
 * </p>
 * @param string $encoding <p>
 * The encoding that words are expected to be in. Valid values are
 * utf-8, iso8859-*,
 * koi8-r, viscii,
 * cp1252, machine unsigned 16,
 * machine unsigned 32.
 * </p>
 * @param int $mode <p>
 * The mode in which spellchecker will work. There are several modes available:
 * <b>PSPELL_FAST</b> - Fast mode (least number of
 * suggestions)</p>
 * @return int|false the dictionary link identifier for use in other pspell functions.
 */
#[LanguageLevelTypeAware(['8.1' => 'PSpell\Dictionary|false'], default: 'int|false')]
function pspell_new_personal(string $filename, string $language, string $spelling = "", string $jargon = "", string $encoding = "", int $mode = 0) {}

/**
 * Load a new dictionary with settings based on a given config
 * @link https://php.net/manual/en/function.pspell-new-config.php
 * @param int $config <p>
 * The <i>config</i> parameter is the one returned by
 * <b>pspell_config_create</b> when the config was created.
 * </p>
 * @return int|false a dictionary link identifier on success.
 */
#[LanguageLevelTypeAware(['8.1' => 'PSpell\Dictionary|false'], default: 'int|false')]
function pspell_new_config(#[LanguageLevelTypeAware(['8.1' => 'PSpell\Config'], default: 'int')] $config) {}

/**
 * Check a word
 * @link https://php.net/manual/en/function.pspell-check.php
 * @param int $dictionary
 * @param string $word <p>
 * The tested word.
 * </p>
 * @return bool <b>TRUE</b> if the spelling is correct, <b>FALSE</b> if not.
 */
function pspell_check(#[LanguageLevelTypeAware(['8.1' => 'PSpell\Dictionary'], default: 'int')] $dictionary, string $word): bool {}

/**
 * Suggest spellings of a word
 * @link https://php.net/manual/en/function.pspell-suggest.php
 * @param int $dictionary
 * @param string $word <p>
 * The tested word.
 * </p>
 * @return array|false an array of possible spellings.
 */
function pspell_suggest(#[LanguageLevelTypeAware(['8.1' => 'PSpell\Dictionary'], default: 'int')] $dictionary, string $word): array|false {}

/**
 * Store a replacement pair for a word
 * @link https://php.net/manual/en/function.pspell-store-replacement.php
 * @param int $dictionary <p>
 * A dictionary link identifier, opened with
 * <b>pspell_new_personal</b>
 * </p>
 * @param string $misspelled <p>
 * The misspelled word.
 * </p>
 * @param string $correct <p>
 * The fixed spelling for the <i>misspelled</i> word.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pspell_store_replacement(#[LanguageLevelTypeAware(['8.1' => 'PSpell\Dictionary'], default: 'int')] $dictionary, string $misspelled, string $correct): bool {}

/**
 * Add the word to a personal wordlist
 * @link https://php.net/manual/en/function.pspell-add-to-personal.php
 * @param int $dictionary
 * @param string $word <p>
 * The added word.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pspell_add_to_personal(#[LanguageLevelTypeAware(['8.1' => 'PSpell\Dictionary'], default: 'int')] $dictionary, string $word): bool {}

/**
 * Add the word to the wordlist in the current session
 * @link https://php.net/manual/en/function.pspell-add-to-session.php
 * @param int $dictionary
 * @param string $word <p>
 * The added word.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pspell_add_to_session(#[LanguageLevelTypeAware(['8.1' => 'PSpell\Dictionary'], default: 'int')] $dictionary, string $word): bool {}

/**
 * Clear the current session
 * @link https://php.net/manual/en/function.pspell-clear-session.php
 * @param int $dictionary
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pspell_clear_session(#[LanguageLevelTypeAware(['8.1' => 'PSpell\Dictionary'], default: 'int')] $dictionary): bool {}

/**
 * Save the personal wordlist to a file
 * @link https://php.net/manual/en/function.pspell-save-wordlist.php
 * @param int $dictionary <p>
 * A dictionary link identifier opened with
 * <b>pspell_new_personal</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pspell_save_wordlist(#[LanguageLevelTypeAware(['8.1' => 'PSpell\Dictionary'], default: 'int')] $dictionary): bool {}

/**
 * Create a config used to open a dictionary
 * @link https://php.net/manual/en/function.pspell-config-create.php
 * @param string $language <p>
 * The language parameter is the language code which consists of the
 * two letter ISO 639 language code and an optional two letter ISO
 * 3166 country code after a dash or underscore.
 * </p>
 * @param string $spelling <p>
 * The spelling parameter is the requested spelling for languages
 * with more than one spelling such as English. Known values are
 * 'american', 'british', and 'canadian'.
 * </p>
 * @param string $jargon <p>
 * The jargon parameter contains extra information to distinguish
 * two different words lists that have the same language and
 * spelling parameters.
 * </p>
 * @param string $encoding <p>
 * The encoding parameter is the encoding that words are expected to
 * be in. Valid values are 'utf-8', 'iso8859-*', 'koi8-r',
 * 'viscii', 'cp1252', 'machine unsigned 16', 'machine unsigned
 * 32'. This parameter is largely untested, so be careful when
 * using.
 * </p>
 * @return int Retuns a pspell config identifier.
 */
#[LanguageLevelTypeAware(['8.1' => 'PSpell\Config'], default: 'int')]
function pspell_config_create(string $language, string $spelling = "", string $jargon = "", string $encoding = "") {}

/**
 * Consider run-together words as valid compounds
 * @link https://php.net/manual/en/function.pspell-config-runtogether.php
 * @param int $config
 * @param bool $allow <p>
 * <b>TRUE</b> if run-together words should be treated as legal compounds,
 * <b>FALSE</b> otherwise.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pspell_config_runtogether(#[LanguageLevelTypeAware(['8.1' => 'PSpell\Config'], default: 'int')] $config, bool $allow): bool {}

/**
 * Change the mode number of suggestions returned
 * @link https://php.net/manual/en/function.pspell-config-mode.php
 * @param int $config
 * @param int $mode <p>
 * The mode parameter is the mode in which spellchecker will work.
 * There are several modes available:
 * <b>PSPELL_FAST</b> - Fast mode (least number of
 * suggestions)</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pspell_config_mode(#[LanguageLevelTypeAware(['8.1' => 'PSpell\Config'], default: 'int')] $config, int $mode): bool {}

/**
 * Ignore words less than N characters long
 * @link https://php.net/manual/en/function.pspell-config-ignore.php
 * @param int $config
 * @param int $min_length <p>
 * Words less than <i>n</i> characters will be skipped.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pspell_config_ignore(#[LanguageLevelTypeAware(['8.1' => 'PSpell\Config'], default: 'int')] $config, int $min_length): bool {}

/**
 * Set a file that contains personal wordlist
 * @link https://php.net/manual/en/function.pspell-config-personal.php
 * @param int $config
 * @param string $filename <p>
 * The personal wordlist. If the file does not exist, it will be created.
 * The file should be writable by whoever PHP runs as (e.g. nobody).
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pspell_config_personal(#[LanguageLevelTypeAware(['8.1' => 'PSpell\Config'], default: 'int')] $config, string $filename): bool {}

/**
 * Location of the main word list
 * @link https://php.net/manual/en/function.pspell-config-dict-dir.php
 * @param int $config
 * @param string $directory
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pspell_config_dict_dir(#[LanguageLevelTypeAware(['8.1' => 'PSpell\Config'], default: 'int')] $config, string $directory): bool {}

/**
 * location of language data files
 * @link https://php.net/manual/en/function.pspell-config-data-dir.php
 * @param int $config
 * @param string $directory
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pspell_config_data_dir(#[LanguageLevelTypeAware(['8.1' => 'PSpell\Config'], default: 'int')] $config, string $directory): bool {}

/**
 * Set a file that contains replacement pairs
 * @link https://php.net/manual/en/function.pspell-config-repl.php
 * @param int $config
 * @param string $filename <p>
 * The file should be writable by whoever PHP runs as (e.g. nobody).
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pspell_config_repl(#[LanguageLevelTypeAware(['8.1' => 'PSpell\Config'], default: 'int')] $config, string $filename): bool {}

/**
 * Determine whether to save a replacement pairs list
 * along with the wordlist
 * @link https://php.net/manual/en/function.pspell-config-save-repl.php
 * @param int $config
 * @param bool $save <p>
 * <b>TRUE</b> if replacement pairs should be saved, <b>FALSE</b> otherwise.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pspell_config_save_repl(#[LanguageLevelTypeAware(['8.1' => 'PSpell\Config'], default: 'int')] $config, bool $save): bool {}

define('PSPELL_FAST', 1);
define('PSPELL_NORMAL', 2);
define('PSPELL_BAD_SPELLERS', 3);
define('PSPELL_RUN_TOGETHER', 8);

// End of pspell v.
<?php

// Start of json v.1.3.1
use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;

/**
 * Objects implementing JsonSerializable
 * can customize their JSON representation when encoded with
 * <b>json_encode</b>.
 * @link https://php.net/manual/en/class.jsonserializable.php
 * @since 5.4
 */
interface JsonSerializable
{
    /**
     * Specify data which should be serialized to JSON
     * @link https://php.net/manual/en/jsonserializable.jsonserialize.php
     * @return mixed data which can be serialized by <b>json_encode</b>,
     * which is a value of any type other than a resource.
     * @since 5.4
     */
    #[TentativeType]
    public function jsonSerialize(): mixed;
}

class JsonIncrementalParser
{
    public const JSON_PARSER_SUCCESS = 0;
    public const JSON_PARSER_CONTINUE = 1;

    /**
     * @param int $depth [optional]
     * @param int $options [optional]
     */
    #[Pure]
    public function __construct($depth, $options) {}

    #[Pure]
    public function getError() {}

    public function reset() {}

    /**
     * @param string $json
     */
    public function parse($json) {}

    /**
     * @param string $filename
     */
    public function parseFile($filename) {}

    /**
     * @param int $options [optional]
     */
    #[Pure]
    public function get($options) {}
}

/**
 * (PHP 5 &gt;= 5.2.0, PECL json &gt;= 1.2.0)<br/>
 * Returns the JSON representation of a value
 * @link https://php.net/manual/en/function.json-encode.php
 * @param mixed $value <p>
 * The <i>value</i> being encoded. Can be any type except
 * a resource.
 * </p>
 * <p>
 * All string data must be UTF-8 encoded.
 * </p>
 * <p>PHP implements a superset of
 * JSON - it will also encode and decode scalar types and <b>NULL</b>. The JSON standard
 * only supports these values when they are nested inside an array or an object.
 * </p>
 * @param int $flags [optional] <p>
 * Bitmask consisting of <b>JSON_HEX_QUOT</b>,
 * <b>JSON_HEX_TAG</b>,
 * <b>JSON_HEX_AMP</b>,
 * <b>JSON_HEX_APOS</b>,
 * <b>JSON_NUMERIC_CHECK</b>,
 * <b>JSON_PRETTY_PRINT</b>,
 * <b>JSON_UNESCAPED_SLASHES</b>,
 * <b>JSON_FORCE_OBJECT</b>,
 * <b>JSON_UNESCAPED_UNICODE</b>.
 * <b>JSON_THROW_ON_ERROR</b> The behaviour of these
 * constants is described on
 * the JSON constants page.
 * </p>
 * @param int $depth [optional] <p>
 * Set the maximum depth. Must be greater than zero.
 * </p>
 * @return string|false a JSON encoded string on success or <b>FALSE</b> on failure.
 */
function json_encode(mixed $value, int $flags = 0, int $depth = 512): string|false {}

/**
 * (PHP 5 &gt;= 5.2.0, PECL json &gt;= 1.2.0)<br/>
 * Decodes a JSON string
 * @link https://php.net/manual/en/function.json-decode.php
 * @param string $json <p>
 * The <i>json</i> string being decoded.
 * </p>
 * <p>
 * This function only works with UTF-8 encoded strings.
 * </p>
 * <p>PHP implements a superset of
 * JSON - it will also encode and decode scalar types and <b>NULL</b>. The JSON standard
 * only supports these values when they are nested inside an array or an object.
 * </p>
 * @param bool|null $associative <p>
 * When <b>TRUE</b>, returned objects will be converted into
 * associative arrays.
 * </p>
 * @param int $depth [optional] <p>
 * User specified recursion depth.
 * </p>
 * @param int $flags [optional] <p>
 * Bitmask of JSON decode options:<br/>
 * {@see JSON_BIGINT_AS_STRING} decodes large integers as their original string value.<br/>
 * {@see JSON_INVALID_UTF8_IGNORE} ignores invalid UTF-8 characters,<br/>
 * {@see JSON_INVALID_UTF8_SUBSTITUTE} converts invalid UTF-8 characters to \0xfffd,<br/>
 * {@see JSON_OBJECT_AS_ARRAY} decodes JSON objects as PHP array, since 7.2.0 used by default if $assoc parameter is null,<br/>
 * {@see JSON_THROW_ON_ERROR} when passed this flag, the error behaviour of these functions is changed. The global error state is left untouched, and if an error occurs that would otherwise set it, these functions instead throw a JsonException<br/>
 * </p>
 * @return mixed the value encoded in <i>json</i> in appropriate
 * PHP type. Values true, false and
 * null (case-insensitive) are returned as <b>TRUE</b>, <b>FALSE</b>
 * and <b>NULL</b> respectively. <b>NULL</b> is returned if the
 * <i>json</i> cannot be decoded or if the encoded
 * data is deeper than the recursion limit.
 */
function json_decode(string $json, ?bool $associative = null, int $depth = 512, int $flags = 0): mixed {}

/**
 * Returns the last error occurred
 * @link https://php.net/manual/en/function.json-last-error.php
 * @return int an integer, the value can be one of the following
 * constants:
 * <table class='doctable table'>
 * <thead>
 * <tr>
 * <th>Constant</th>
 * <th>Meaning</th>
 * <th>Availability</th>
 * </tr>
 *
 * </thead>
 *
 * <tbody class='tbody'>
 * <tr>
 * <td><strong><code>JSON_ERROR_NONE</code></strong></td>
 * <td>No error has occurred</td>
 * <td class='empty'>&nbsp;</td>
 * </tr>
 *
 * <tr>
 * <td><strong><code>JSON_ERROR_DEPTH</code></strong></td>
 * <td>The maximum stack depth has been exceeded</td>
 * <td class='empty'>&nbsp;</td>
 * </tr>
 *
 * <tr>
 * <td><strong><code>JSON_ERROR_STATE_MISMATCH</code></strong></td>
 * <td>Invalid or malformed JSON</td>
 * <td class='empty'>&nbsp;</td>
 * </tr>
 *
 * <tr>
 * <td><strong><code>JSON_ERROR_CTRL_CHAR</code></strong></td>
 * <td>Control character error, possibly incorrectly encoded</td>
 * <td class='empty'>&nbsp;</td>
 * </tr>
 *
 * <tr>
 * <td><strong><code>JSON_ERROR_SYNTAX</code></strong></td>
 * <td>Syntax error</td>
 * <td class='empty'>&nbsp;</td>
 * </tr>
 *
 * <tr>
 * <td><strong><code>JSON_ERROR_UTF8</code></strong></td>
 * <td>Malformed UTF-8 characters, possibly incorrectly encoded</td>
 * <td>PHP 5.3.3</td>
 * </tr>
 *
 * <tr>
 * <td><strong><code>JSON_ERROR_RECURSION</code></strong></td>
 * <td>One or more recursive references in the value to be encoded</td>
 * <td>PHP 5.5.0</td>
 * </tr>
 *
 * <tr>
 * <td><strong><code>JSON_ERROR_INF_OR_NAN</code></strong></td>
 * <td>
 * One or more
 * <a href='language.types.float.php#language.types.float.nan' class='link'><strong><code>NAN</code></strong></a>
 * or <a href='function.is-infinite.php' class='link'><strong><code>INF</code></strong></a>
 * values in the value to be encoded
 * </td>
 * <td>PHP 5.5.0</td>
 * </tr>
 *
 * <tr>
 * <td><strong><code>JSON_ERROR_UNSUPPORTED_TYPE</code></strong></td>
 * <td>A value of a type that cannot be encoded was given</td>
 * <td>PHP 5.5.0</td>
 * </tr>
 *
 * <tr>
 * <td><strong><code>JSON_ERROR_INVALID_PROPERTY_NAME</code></strong></td>
 * <td>A property name that cannot be encoded was given</td>
 * <td>PHP 7.0.0</td>
 * </tr>
 *
 * <tr>
 * <td><strong><code>JSON_ERROR_UTF16</code></strong></td>
 * <td>Malformed UTF-16 characters, possibly incorrectly encoded</td>
 * <td>PHP 7.0.0</td>
 * </tr>
 *
 * </tbody>
 *
 * </table>
 */
#[Pure(true)]
function json_last_error(): int {}

/**
 * Returns the error string of the last json_encode() or json_decode() call, which did not specify <b>JSON_THROW_ON_ERROR</b>.
 * @link https://php.net/manual/en/function.json-last-error-msg.php
 * @return string Returns the error message on success, "No error" if no error has occurred.
 * @since 5.5
 */
#[Pure]
function json_last_error_msg(): string {}

/**
 * All &lt; and &gt; are converted to \u003C and \u003E.
 * @link https://php.net/manual/en/json.constants.php
 */
define('JSON_HEX_TAG', 1);

/**
 * All &s are converted to \u0026.
 * @link https://php.net/manual/en/json.constants.php
 */
define('JSON_HEX_AMP', 2);

/**
 * All ' are converted to \u0027.
 * @link https://php.net/manual/en/json.constants.php
 */
define('JSON_HEX_APOS', 4);

/**
 * All " are converted to \u0022.
 * @link https://php.net/manual/en/json.constants.php
 */
define('JSON_HEX_QUOT', 8);

/**
 * Outputs an object rather than an array when a non-associative array is
 * used. Especially useful when the recipient of the output is expecting
 * an object and the array is empty.
 * @link https://php.net/manual/en/json.constants.php
 */
define('JSON_FORCE_OBJECT', 16);

/**
 * Encodes numeric strings as numbers.
 * @since 5.3.3
 * @link https://php.net/manual/en/json.constants.php
 */
define('JSON_NUMERIC_CHECK', 32);

/**
 * Don't escape /.
 * @since 5.4
 * @link https://php.net/manual/en/json.constants.php
 */
define('JSON_UNESCAPED_SLASHES', 64);

/**
 * Use whitespace in returned data to format it.
 * @since 5.4
 * @link https://php.net/manual/en/json.constants.php
 */
define('JSON_PRETTY_PRINT', 128);

/**
 * Encode multibyte Unicode characters literally (default is to escape as \uXXXX).
 * @since 5.4
 * @link https://php.net/manual/en/json.constants.php
 */
define('JSON_UNESCAPED_UNICODE', 256);
define('JSON_PARTIAL_OUTPUT_ON_ERROR', 512);

/**
 * Occurs with underflow or with the modes mismatch.
 * @link https://php.net/manual/en/json.constants.php
 */
define('JSON_ERROR_STATE_MISMATCH', 2);

/**
 * Control character error, possibly incorrectly encoded.
 * @link https://php.net/manual/en/json.constants.php
 */
define('JSON_ERROR_CTRL_CHAR', 3);

/**
 * Malformed UTF-8 characters, possibly incorrectly encoded. This
 * constant is available as of PHP 5.3.3.
 * @link https://php.net/manual/en/json.constants.php
 */
define('JSON_ERROR_UTF8', 5);

/**
 * <p>
 * The object or array passed to <b>json_encode</b> include
 * recursive references and cannot be encoded.
 * If the <b>JSON_PARTIAL_OUTPUT_ON_ERROR</b> option was
 * given, <b>NULL</b> will be encoded in the place of the recursive reference.
 * </p>
 * <p>
 * This constant is available as of PHP 5.5.0.
 * </p>
 * @link https://php.net/manual/en/json.constants.php
 */
define('JSON_ERROR_RECURSION', 6);

/**
 * <p>
 * The value passed to <b>json_encode</b> includes either
 * <b>NAN</b>
 * or <b>INF</b>.
 * If the <b>JSON_PARTIAL_OUTPUT_ON_ERROR</b> option was
 * given, 0 will be encoded in the place of these
 * special numbers.
 * </p>
 * <p>
 * This constant is available as of PHP 5.5.0.
 * </p>
 * @link https://php.net/manual/en/json.constants.php
 */
define('JSON_ERROR_INF_OR_NAN', 7);

/**
 * <p>
 * A value of an unsupported type was given to
 * <b>json_encode</b>, such as a resource.
 * If the <b>JSON_PARTIAL_OUTPUT_ON_ERROR</b> option was
 * given, <b>NULL</b> will be encoded in the place of the unsupported value.
 * </p>
 * <p>
 * This constant is available as of PHP 5.5.0.
 * </p>
 * @link https://php.net/manual/en/json.constants.php
 */
define('JSON_ERROR_UNSUPPORTED_TYPE', 8);

/**
 * No error has occurred.
 * @link https://php.net/manual/en/json.constants.php
 */
define('JSON_ERROR_NONE', 0);

/**
 * The maximum stack depth has been exceeded.
 * @link https://php.net/manual/en/json.constants.php
 */
define('JSON_ERROR_DEPTH', 1);

/**
 * Syntax error.
 * @link https://php.net/manual/en/json.constants.php
 */
define('JSON_ERROR_SYNTAX', 4);

/**
 * Decodes JSON objects as PHP array.
 * @since 5.4
 * @link https://php.net/manual/en/json.constants.php
 */
define('JSON_OBJECT_AS_ARRAY', 1);
define('JSON_PARSER_NOTSTRICT', 4);

/**
 * Decodes large integers as their original string value.
 * @since 5.4
 * @link https://php.net/manual/en/json.constants.php
 */
define('JSON_BIGINT_AS_STRING', 2);

/**
 * Ensures that float values are always encoded as a float value.
 * @since 5.6.6
 * @link https://php.net/manual/en/json.constants.php
 */
define('JSON_PRESERVE_ZERO_FRACTION', 1024);

/**
 * The line terminators are kept unescaped when JSON_UNESCAPED_UNICODE is supplied.
 * It uses the same behaviour as it was before PHP 7.1 without this constant. Available since PHP 7.1.0.
 * @link https://php.net/manual/en/json.constants.php
 * @since 7.1
 */
define('JSON_UNESCAPED_LINE_TERMINATORS', 2048);

/**
 * Ignore invalid UTF-8 characters.
 * @since 7.2
 */
define('JSON_INVALID_UTF8_IGNORE', 1048576);

/**
 * Convert invalid UTF-8 characters to \0xfffd (Unicode Character 'REPLACEMENT CHARACTER').
 * @since 7.2
 */
define('JSON_INVALID_UTF8_SUBSTITUTE', 2097152);

/**
 * A key starting with \u0000 character was in the string passed to json_decode() when decoding a JSON object into a PHP object.
 * Available since PHP 7.0.0.
 * @link https://php.net/manual/en/json.constants.php
 * @since 7.0
 */
define('JSON_ERROR_INVALID_PROPERTY_NAME', 9);

/**
 * Single unpaired UTF-16 surrogate in unicode escape contained in the JSON string passed to json_encode().
 * Available since PHP 7.0.0.
 * @link https://php.net/manual/en/json.constants.php
 * @since 7.0
 */
define('JSON_ERROR_UTF16', 10);

/**
 * Throws JsonException if an error occurs instead of setting the global error state
 * that is retrieved with json_last_error() and json_last_error_msg().
 *
 * {@see JSON_PARTIAL_OUTPUT_ON_ERROR} takes precedence over JSON_THROW_ON_ERROR.
 * @since 7.3
 */
define('JSON_THROW_ON_ERROR', 4194304);

/**
 * @since 8.1
 */
define('JSON_ERROR_NON_BACKED_ENUM', 11);

/**
 * Class JsonException
 *
 * <p>A new flag has been added, JSON_THROW_ON_ERROR, which can be used with
 * json_decode() or json_encode() and causes these functions to throw a
 * JsonException upon an error, instead of setting the global error state that
 * is retrieved with json_last_error(). JSON_PARTIAL_OUTPUT_ON_ERROR takes
 * precedence over <b>JSON_THROW_ON_ERROR</b>.
 * </p>
 *
 * @since 7.3
 * @link https://wiki.php.net/rfc/json_throw_on_error
 */
class JsonException extends Exception {}

// End of json v.1.3.1
<?php

// Start of igbinary v.1.0.0

/** Generates a storable representation of a value.
 * This is useful for storing or passing PHP values around without losing their type and structure.
 * To make the serialized string into a PHP value again, use {@link igbinary_unserialize}.
 *
 * igbinary_serialize() handles all types, except the resource-type.
 * You can even serialize() arrays that contain references to itself.
 * Circular references inside the array/object you are serialize()ing will also be stored.
 *
 * If object implements {@link https://secure.php.net/~helly/php/ext/spl/interfaceSerializable.html Serializable} -interface,
 * PHP will call the member function serialize to get serialized representation of object.
 *
 * When serializing objects, PHP will attempt to call the member function __sleep prior to serialization.
 * This is to allow the object to do any last minute clean-up, etc. prior to being serialized.
 * Likewise, when the object is restored using unserialize() the __wakeup member function is called.
 *
 * @param mixed $value The value to be serialized.
 * @return string|null Returns a string containing a byte-stream representation of value that can be stored anywhere or <b>NULL</b> on error.
 * @link https://secure.php.net/serialize PHP default serialize
 */
function igbinary_serialize($value) {}

/** Creates a PHP value from a stored representation.
 * igbinary_unserialize() takes a single serialized variable and converts it back into a PHP value.
 *
 * If the variable being unserialized is an object, after successfully reconstructing the object
 * PHP will automatically attempt to call the __wakeup() member function (if it exists).
 * In case the passed string is not unserializeable, NULL is returned and E_WARNING is issued.
 *
 * @param string $str The serialized string.
 * @return mixed|false The converted value is returned, and can be a boolean, integer, float, string, array, object or <b>false</b> by empty string input.
 * @link https://secure.php.net/manual/en/function.unserialize.php PHP default unserialize
 * @link https://secure.php.net/~helly/php/ext/spl/interfaceSerializable.html Serializable
 */
function igbinary_unserialize($str) {}

// End of igbinary v.1.0.0
<?php

// Start of ssh2 v.0.11.0-dev

/**
 * (PECL ssh2 &gt;= 0.9.0)<br/>
 * Connect to an SSH server
 * @link https://php.net/manual/en/function.ssh2-connect.php
 * @param string $host <p>
 * </p>
 * @param int $port [optional] <p>
 * </p>
 * @param null|array $methods [optional] <p>
 * methods may be an associative array with up to four parameters
 * as described below.
 * </p>
 * <p>
 * <table>
 * methods may be an associative array
 * with any or all of the following parameters.
 * <tr valign="top">
 * <td>Index</td>
 * <td>Meaning</td>
 * <td>Supported Values*</td>
 * </tr>
 * <tr valign="top">
 * <td>kex</td>
 * <td>
 * List of key exchange methods to advertise, comma separated
 * in order of preference.
 * </td>
 * <td>
 * diffie-hellman-group1-sha1,
 * diffie-hellman-group14-sha1, and
 * diffie-hellman-group-exchange-sha1
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>hostkey</td>
 * <td>
 * List of hostkey methods to advertise, come separated
 * in order of preference.
 * </td>
 * <td>
 * ssh-rsa and
 * ssh-dss
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>client_to_server</td>
 * <td>
 * Associative array containing crypt, compression, and
 * message authentication code (MAC) method preferences
 * for messages sent from client to server.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>server_to_client</td>
 * <td>
 * Associative array containing crypt, compression, and
 * message authentication code (MAC) method preferences
 * for messages sent from server to client.
 * </td>
 * </tr>
 * </table>
 * </p>
 * <p>
 * * - Supported Values are dependent on methods supported by underlying library.
 * See libssh2 documentation for additional
 * information.
 * </p>
 * <p>
 * <table>
 * client_to_server and
 * server_to_client may be an associative array
 * with any or all of the following parameters.
 * <tr valign="top">
 * <td>Index</td>
 * <td>Meaning</td>
 * <td>Supported Values*</td>
 * </tr>
 * <tr valign="top">
 * <td>crypt</td>
 * <td>List of crypto methods to advertise, comma separated
 * in order of preference.</td>
 * <td>
 * rijndael-cbc@lysator.liu.se,
 * aes256-cbc,
 * aes192-cbc,
 * aes128-cbc,
 * 3des-cbc,
 * blowfish-cbc,
 * cast128-cbc,
 * arcfour, and
 * none**
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>comp</td>
 * <td>List of compression methods to advertise, comma separated
 * in order of preference.</td>
 * <td>
 * zlib and
 * none
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>mac</td>
 * <td>List of MAC methods to advertise, come separated
 * in order of preference.</td>
 * <td>
 * hmac-sha1,
 * hmac-sha1-96,
 * hmac-ripemd160,
 * hmac-ripemd160@openssh.com, and
 * none**
 * </td>
 * </tr>
 * </table>
 * </p>
 * <p>
 * Crypt and MAC method "none"
 * <p>
 * For security reasons, none is disabled by the underlying
 * libssh2 library unless explicitly enabled
 * during build time by using the appropriate ./configure options. See documentation
 * for the underlying library for more information.
 * </p>
 * </p>
 * @param null|array $callbacks [optional] <p>
 * callbacks may be an associative array with any
 * or all of the following parameters.
 * <table>
 * Callbacks parameters
 * <tr valign="top">
 * <td>Index</td>
 * <td>Meaning</td>
 * <td>Prototype</td>
 * </tr>
 * <tr valign="top">
 * <td>ignore</td>
 * <td>
 * Name of function to call when an
 * SSH2_MSG_IGNORE packet is received
 * </td>
 * <td>void ignore_cb($message)</td>
 * </tr>
 * <tr valign="top">
 * <td>debug</td>
 * <td>
 * Name of function to call when an
 * SSH2_MSG_DEBUG packet is received
 * </td>
 * <td>void debug_cb($message, $language, $always_display)</td>
 * </tr>
 * <tr valign="top">
 * <td>macerror</td>
 * <td>
 * Name of function to call when a packet is received but the
 * message authentication code failed. If the callback returns
 * true, the mismatch will be ignored, otherwise the connection
 * will be terminated.
 * </td>
 * <td>bool macerror_cb($packet)</td>
 * </tr>
 * <tr valign="top">
 * <td>disconnect</td>
 * <td>
 * Name of function to call when an
 * SSH2_MSG_DISCONNECT packet is received
 * </td>
 * <td>void disconnect_cb($reason, $message, $language)</td>
 * </tr>
 * </table>
 * </p>
 * @return resource|false a resource on success, or false on error.
 */
function ssh2_connect($host, $port = 22, ?array $methods = null, ?array $callbacks = null) {}

/**
 * (PECL ssh2 &gt;= 1.0)<br/>
 * Close a connection to a remote SSH server
 * @link https://php.net/manual/en/function.ssh2-disconnect.php
 * @param resource $session <p>
 * An SSH connection link identifier, obtained from a call to
 * ssh2_connect.
 * </p>
 * @return bool
 */
function ssh2_disconnect($session) {}

/**
 * (PECL ssh2 &gt;= 0.9.0)<br/>
 * Return list of negotiated methods
 * @link https://php.net/manual/en/function.ssh2-methods-negotiated.php
 * @param resource $session <p>
 * An SSH connection link identifier, obtained from a call to
 * ssh2_connect.
 * </p>
 * @return array
 */
function ssh2_methods_negotiated($session) {}

/**
 * (PECL ssh2 &gt;= 0.9.0)<br/>
 * Retrieve fingerprint of remote server
 * @link https://php.net/manual/en/function.ssh2-fingerprint.php
 * @param resource $session <p>
 * An SSH connection link identifier, obtained from a call to
 * ssh2_connect.
 * </p>
 * @param int $flags [optional] <p>
 * flags may be either of
 * SSH2_FINGERPRINT_MD5 or
 * SSH2_FINGERPRINT_SHA1 logically ORed with
 * SSH2_FINGERPRINT_HEX or
 * SSH2_FINGERPRINT_RAW.
 * </p>
 * @return string the hostkey hash as a string.
 */
function ssh2_fingerprint($session, $flags = null) {}

/**
 * (PECL ssh2 &gt;= 0.9.0)<br/>
 * Authenticate as "none"
 * @link https://php.net/manual/en/function.ssh2-auth-none.php
 * @param resource $session <p>
 * An SSH connection link identifier, obtained from a call to
 * ssh2_connect.
 * </p>
 * @param string $username <p>
 * Remote user name.
 * </p>
 * @return array|bool true if the server does accept "none" as an authentication
 * method, or an array of accepted authentication methods on failure.
 */
function ssh2_auth_none($session, $username) {}

/**
 * (PECL ssh2 &gt;= 0.9.0)<br/>
 * Authenticate over SSH using a plain password
 * @link https://php.net/manual/en/function.ssh2-auth-password.php
 * @param resource $session <p>
 * An SSH connection link identifier, obtained from a call to
 * ssh2_connect.
 * </p>
 * @param string $username <p>
 * Remote user name.
 * </p>
 * @param string $password <p>
 * Password for username
 * </p>
 * @return bool true on success or false on failure.
 */
function ssh2_auth_password($session, $username, $password) {}

/**
 * (PECL ssh2 &gt;= 0.9.0)<br/>
 * Authenticate using a public key
 * @link https://php.net/manual/en/function.ssh2-auth-pubkey-file.php
 * @param resource $session <p>
 * An SSH connection link identifier, obtained from a call to
 * ssh2_connect.
 * </p>
 * @param string $username <p>
 * </p>
 * @param string $pubkeyfile <p>
 * </p>
 * @param string $privkeyfile <p>
 * </p>
 * @param string $passphrase [optional] <p>
 * If privkeyfile is encrypted (which it should
 * be), the passphrase must be provided.
 * </p>
 * @return bool true on success or false on failure.
 */
function ssh2_auth_pubkey_file($session, $username, $pubkeyfile, $privkeyfile, $passphrase = null) {}

/**
 * (PECL ssh2 &gt;= 0.9.0)<br/>
 * Authenticate using a public hostkey
 * @link https://php.net/manual/en/function.ssh2-auth-hostbased-file.php
 * @param resource $session <p>
 * An SSH connection link identifier, obtained from a call to
 * ssh2_connect.
 * </p>
 * @param string $username <p>
 * </p>
 * @param string $hostname <p>
 * </p>
 * @param string $pubkeyfile <p>
 * </p>
 * @param string $privkeyfile <p>
 * </p>
 * @param string $passphrase [optional] <p>
 * If privkeyfile is encrypted (which it should
 * be), the passphrase must be provided.
 * </p>
 * @param string $local_username [optional] <p>
 * If local_username is omitted, then the value
 * for username will be used for it.
 * </p>
 * @return bool true on success or false on failure.
 */
function ssh2_auth_hostbased_file($session, $username, $hostname, $pubkeyfile, $privkeyfile, $passphrase = null, $local_username = null) {}

function ssh2_forward_listen() {}

function ssh2_forward_accept() {}

/**
 * (PECL ssh2 &gt;= 0.9.0)<br/>
 * Request an interactive shell
 * @link https://php.net/manual/en/function.ssh2-shell.php
 * @param resource $session <p>
 * An SSH connection link identifier, obtained from a call to
 * ssh2_connect.
 * </p>
 * @param string $term_type [optional] <p>
 * term_type should correspond to one of the
 * entries in the target system's /etc/termcap file.
 * </p>
 * @param null|array $env [optional] <p>
 * env may be passed as an associative array of
 * name/value pairs to set in the target environment.
 * </p>
 * @param null|int $width [optional] <p>
 * Width of the virtual terminal.
 * </p>
 * @param null|int $height [optional] <p>
 * Height of the virtual terminal.
 * </p>
 * @param null|int $width_height_type [optional] <p>
 * width_height_type should be one of
 * SSH2_TERM_UNIT_CHARS or
 * SSH2_TERM_UNIT_PIXELS.
 * </p>
 * @return resource
 */
function ssh2_shell($session, $term_type = null, ?array $env = null, $width = null, $height = null, $width_height_type = null) {}

/**
 * (PECL ssh2 &gt;= 0.9.0)<br/>
 * Execute a command on a remote server
 * @link https://php.net/manual/en/function.ssh2-exec.php
 * @param resource $session <p>
 * An SSH connection link identifier, obtained from a call to
 * ssh2_connect.
 * </p>
 * @param string $command <p>
 * </p>
 * @param null|string $pty [optional] <p>
 * </p>
 * @param null|array $env [optional] <p>
 * env may be passed as an associative array of
 * name/value pairs to set in the target environment.
 * </p>
 * @param null|int $width [optional] <p>
 * Width of the virtual terminal.
 * </p>
 * @param null|int $height [optional] <p>
 * Height of the virtual terminal.
 * </p>
 * @param null|int $width_height_type [optional] <p>
 * width_height_type should be one of
 * SSH2_TERM_UNIT_CHARS or
 * SSH2_TERM_UNIT_PIXELS.
 * </p>
 * @return resource|false a stream on success or false on failure.
 */
function ssh2_exec($session, $command, $pty = null, ?array $env = null, $width = null, $height = null, $width_height_type = null) {}

/**
 * (PECL ssh2 &gt;= 0.9.0)<br/>
 * Open a tunnel through a remote server
 * @link https://php.net/manual/en/function.ssh2-tunnel.php
 * @param resource $session <p>
 * An SSH connection link identifier, obtained from a call to
 * ssh2_connect.
 * </p>
 * @param string $host <p>
 * </p>
 * @param int $port <p>
 * </p>
 * @return resource
 */
function ssh2_tunnel($session, $host, $port) {}

/**
 * (PECL ssh2 &gt;= 0.9.0)<br/>
 * Request a file via SCP
 * @link https://php.net/manual/en/function.ssh2-scp-recv.php
 * @param resource $session <p>
 * An SSH connection link identifier, obtained from a call to
 * ssh2_connect.
 * </p>
 * @param string $remote_file <p>
 * Path to the remote file.
 * </p>
 * @param string $local_file <p>
 * Path to the local file.
 * </p>
 * @return bool true on success or false on failure.
 */
function ssh2_scp_recv($session, $remote_file, $local_file) {}

/**
 * (PECL ssh2 &gt;= 0.9.0)<br/>
 * Send a file via SCP
 * @link https://php.net/manual/en/function.ssh2-scp-send.php
 * @param resource $session <p>
 * An SSH connection link identifier, obtained from a call to
 * ssh2_connect.
 * </p>
 * @param string $local_file <p>
 * Path to the local file.
 * </p>
 * @param string $remote_file <p>
 * Path to the remote file.
 * </p>
 * @param int $create_mode [optional] <p>
 * The file will be created with the mode specified by
 * create_mode.
 * </p>
 * @return bool true on success or false on failure.
 */
function ssh2_scp_send($session, $local_file, $remote_file, $create_mode = null) {}

/**
 * (PECL ssh2 &gt;= 0.9.0)<br/>
 * Fetch an extended data stream
 * @link https://php.net/manual/en/function.ssh2-fetch-stream.php
 * @param resource $channel <p>
 * </p>
 * @param int $streamid <p>
 * An SSH2 channel stream.
 * </p>
 * @return resource the requested stream resource.
 */
function ssh2_fetch_stream($channel, $streamid) {}

/**
 * @param array &$var1
 */
function ssh2_poll(&$var1) {}

/**
 * (PECL ssh2 &gt;= 0.9.0)<br/>
 * Initialize SFTP subsystem
 * @link https://php.net/manual/en/function.ssh2-sftp.php
 * @param resource $session <p>
 * An SSH connection link identifier, obtained from a call to
 * ssh2_connect.
 * </p>
 * @return resource|false This method returns an SSH2 SFTP resource for use with
 * all other ssh2_sftp_*() methods and the
 * ssh2.sftp:// fopen wrapper.
 */
function ssh2_sftp($session) {}

/**
 * (PECL ssh2 &gt;= 0.9.0)<br/>
 * Rename a remote file
 * @link https://php.net/manual/en/function.ssh2-sftp-rename.php
 * @param resource $sftp <p>
 * An SSH2 SFTP resource opened by ssh2_sftp.
 * </p>
 * @param string $from <p>
 * The current file that is being renamed.
 * </p>
 * @param string $to <p>
 * The new file name that replaces from.
 * </p>
 * @return bool true on success or false on failure.
 */
function ssh2_sftp_rename($sftp, $from, $to) {}

/**
 * (PECL ssh2 &gt;= 0.9.0)<br/>
 * Delete a file
 * @link https://php.net/manual/en/function.ssh2-sftp-unlink.php
 * @param resource $sftp <p>
 * An SSH2 SFTP resource opened by ssh2_sftp.
 * </p>
 * @param string $filename <p>
 * </p>
 * @return bool true on success or false on failure.
 */
function ssh2_sftp_unlink($sftp, $filename) {}

/**
 * (PECL ssh2 &gt;= 0.9.0)<br/>
 * Create a directory
 * @link https://php.net/manual/en/function.ssh2-sftp-mkdir.php
 * @param resource $sftp <p>
 * An SSH2 SFTP resource opened by ssh2_sftp.
 * </p>
 * @param string $dirname <p>
 * Path of the new directory.
 * </p>
 * @param int $mode [optional] <p>
 * Permissions on the new directory.
 * </p>
 * @param bool $recursive [optional] <p>
 * If recursive is true any parent directories
 * required for dirname will be automatically created as well.
 * </p>
 * @return bool true on success or false on failure.
 */
function ssh2_sftp_mkdir($sftp, $dirname, $mode = null, $recursive = null) {}

/**
 * (PECL ssh2 &gt;= 0.9.0)<br/>
 * Remove a directory
 * @link https://php.net/manual/en/function.ssh2-sftp-rmdir.php
 * @param resource $sftp <p>
 * An SSH2 SFTP resource opened by ssh2_sftp.
 * </p>
 * @param string $dirname <p>
 * </p>
 * @return bool true on success or false on failure.
 */
function ssh2_sftp_rmdir($sftp, $dirname) {}

/**
 * (PECL ssh2 &gt;= 0.9.0)<br/>
 * Stat a file on a remote filesystem
 * @link https://php.net/manual/en/function.ssh2-sftp-stat.php
 * @param resource $sftp <p>
 * An SSH2 SFTP resource opened by ssh2_sftp.
 * </p>
 * @param string $path <p>
 * </p>
 * @return array|false See the documentation for stat for details on the
 * values which may be returned.
 */
function ssh2_sftp_stat($sftp, $path) {}

/**
 * (PECL ssh2 &gt;= 0.9.0)<br/>
 * Stat a symbolic link
 * @link https://php.net/manual/en/function.ssh2-sftp-lstat.php
 * @param resource $sftp <p>
 * </p>
 * @param string $path <p>
 * Path to the remote symbolic link.
 * </p>
 * @return array See the documentation for stat for details on the
 * values which may be returned.
 */
function ssh2_sftp_lstat($sftp, $path) {}

/**
 * (PECL ssh2 &gt;= 0.9.0)<br/>
 * Create a symlink
 * @link https://php.net/manual/en/function.ssh2-sftp-symlink.php
 * @param resource $sftp <p>
 * An SSH2 SFTP resource opened by ssh2_sftp.
 * </p>
 * @param string $target <p>
 * Target of the symbolic link.
 * </p>
 * @param string $link <p>
 * </p>
 * @return bool true on success or false on failure.
 */
function ssh2_sftp_symlink($sftp, $target, $link) {}

/**
 * (PECL ssh2 &gt;= 0.9.0)<br/>
 * Return the target of a symbolic link
 * @link https://php.net/manual/en/function.ssh2-sftp-readlink.php
 * @param resource $sftp <p>
 * An SSH2 SFTP resource opened by ssh2_sftp.
 * </p>
 * @param string $link <p>
 * Path of the symbolic link.
 * </p>
 * @return string the target of the symbolic link.
 */
function ssh2_sftp_readlink($sftp, $link) {}

/**
 * (PECL ssh2 &gt;= 0.9.0)<br/>
 * Resolve the realpath of a provided path string
 * @link https://php.net/manual/en/function.ssh2-sftp-realpath.php
 * @param resource $sftp <p>
 * An SSH2 SFTP resource opened by ssh2_sftp.
 * </p>
 * @param string $filename <p>
 * </p>
 * @return string the real path as a string.
 */
function ssh2_sftp_realpath($sftp, $filename) {}

/**
 * (PECL ssh2 &gt;= 0.10)<br/>
 * Initialize Publickey subsystem
 * @link https://php.net/manual/en/function.ssh2-publickey-init.php
 * @param resource $session <p>
 * </p>
 * @return resource|false an SSH2 Publickey Subsystem resource for use
 * with all other ssh2_publickey_*() methods or false on failure.
 */
function ssh2_publickey_init($session) {}

/**
 * (PECL ssh2 &gt;= 0.10)<br/>
 * Add an authorized publickey
 * @link https://php.net/manual/en/function.ssh2-publickey-add.php
 * @param resource $pkey <p>
 * Publickey Subsystem resource created by ssh2_publickey_init.
 * </p>
 * @param string $algoname <p>
 * Publickey algorithm (e.g.): ssh-dss, ssh-rsa
 * </p>
 * @param string $blob <p>
 * Publickey blob as raw binary data
 * </p>
 * @param null|bool $overwrite [optional] <p>
 * If the specified key already exists, should it be overwritten?
 * </p>
 * @param null|array $attributes [optional] <p>
 * Associative array of attributes to assign to this public key.
 * Refer to ietf-secsh-publickey-subsystem for a list of supported attributes.
 * To mark an attribute as mandatory, precede its name with an asterisk.
 * If the server is unable to support an attribute marked mandatory,
 * it will abort the add process.
 * </p>
 * @return bool true on success or false on failure.
 */
function ssh2_publickey_add($pkey, $algoname, $blob, $overwrite = null, ?array $attributes = null) {}

/**
 * (PECL ssh2 &gt;= 0.10)<br/>
 * Remove an authorized publickey
 * @link https://php.net/manual/en/function.ssh2-publickey-remove.php
 * @param resource $pkey <p>
 * Publickey Subsystem Resource
 * </p>
 * @param string $algoname <p>
 * Publickey algorithm (e.g.): ssh-dss, ssh-rsa
 * </p>
 * @param string $blob <p>
 * Publickey blob as raw binary data
 * </p>
 * @return bool true on success or false on failure.
 */
function ssh2_publickey_remove($pkey, $algoname, $blob) {}

/**
 * (PECL ssh2 &gt;= 0.10)<br/>
 * List currently authorized publickeys
 * @link https://php.net/manual/en/function.ssh2-publickey-list.php
 * @param resource $pkey <p>
 * Publickey Subsystem resource
 * </p>
 * @return array a numerically indexed array of keys,
 * each of which is an associative array containing:
 * name, blob, and attrs elements.
 * </p>
 * <p>
 * <table>
 * Publickey elements
 * <tr valign="top">
 * <td>Array Key</td>
 * <td>Meaning</td>
 * </tr>
 * <tr valign="top">
 * <td>name</td>
 * <td>Name of algorithm used by this publickey, for example:
 * ssh-dss or ssh-rsa.</td>
 * </tr>
 * <tr valign="top">
 * <td>blob</td>
 * <td>Publickey blob as raw binary data.</td>
 * </tr>
 * <tr valign="top">
 * <td>attrs</td>
 * <td>Attributes assigned to this publickey. The most common
 * attribute, and the only one supported by publickey version 1
 * servers, is comment, which may be any freeform
 * string.</td>
 * </tr>
 * </table>
 */
function ssh2_publickey_list($pkey) {}

/**
 * (PECL ssh2 &gt;= 0.12)<br/>
 * ssh2_sftp_chmod — Changes file mode
 * @link https://php.net/manual/en/function.ssh2-sftp-chmod.php
 * @param resource $sftp <p>An SSH2 SFTP resource opened by ssh2_sftp().</p>
 * @param string $filename <p>Path to the file.</p>
 * @param int $mode <p>Permissions on the file. See the chmod() for more details on this parameter.</p>
 * @return bool <p>Returns TRUE on success or FALSE on failure.</p>
 */
function ssh2_sftp_chmod($sftp, $filename, $mode) {}

/**
 * (PECL ssh2 &gt;= 0.12)<br/>
 * ssh2_auth_agent — Authenticate over SSH using the ssh agent
 * @link https://php.net/manual/en/function.ssh2-auth-agent.php
 * <p>
 * Authenticate over SSH using the ssh agent
 * </p>
 * <p>
 * Note: The ssh2_auth_agent() function will only be available when the ssh2 extension is compiled with libssh >= 1.2.3.
 * </p>
 * @param resource $session <p>An SSH connection link identifier, obtained from a call to ssh2_connect().</p>
 * @param string $username <p>Remote user name.</p>
 * @return bool <p>Returns TRUE on success or FALSE on failure.</p>
 */
function ssh2_auth_agent($session, $username) {}

/**
 * Flag to ssh2_fingerprint requesting hostkey
 * fingerprint as an MD5 hash.
 * @link https://php.net/manual/en/ssh2.constants.php
 */
define('SSH2_FINGERPRINT_MD5', 0);

/**
 * Flag to ssh2_fingerprint requesting hostkey
 * fingerprint as an SHA1 hash.
 * @link https://php.net/manual/en/ssh2.constants.php
 */
define('SSH2_FINGERPRINT_SHA1', 1);

/**
 * Flag to ssh2_fingerprint requesting hostkey
 * fingerprint as a string of hexits.
 * @link https://php.net/manual/en/ssh2.constants.php
 */
define('SSH2_FINGERPRINT_HEX', 0);

/**
 * Flag to ssh2_fingerprint requesting hostkey
 * fingerprint as a raw string of 8-bit characters.
 * @link https://php.net/manual/en/ssh2.constants.php
 */
define('SSH2_FINGERPRINT_RAW', 2);

/**
 * Flag to ssh2_shell specifying that
 * width and height
 * are provided as character sizes.
 * @link https://php.net/manual/en/ssh2.constants.php
 */
define('SSH2_TERM_UNIT_CHARS', 0);

/**
 * Flag to ssh2_shell specifying that
 * width and height
 * are provided in pixel units.
 * @link https://php.net/manual/en/ssh2.constants.php
 */
define('SSH2_TERM_UNIT_PIXELS', 1);

/**
 * Default terminal type (e.g. vt102, ansi, xterm, vanilla) requested
 * by ssh2_shell.
 * @link https://php.net/manual/en/ssh2.constants.php
 */
define('SSH2_DEFAULT_TERMINAL', "vanilla");

/**
 * Default terminal width requested by ssh2_shell.
 * @link https://php.net/manual/en/ssh2.constants.php
 */
define('SSH2_DEFAULT_TERM_WIDTH', 80);

/**
 * Default terminal height requested by ssh2_shell.
 * @link https://php.net/manual/en/ssh2.constants.php
 */
define('SSH2_DEFAULT_TERM_HEIGHT', 25);

/**
 * Default terminal units requested by ssh2_shell.
 * @link https://php.net/manual/en/ssh2.constants.php
 */
define('SSH2_DEFAULT_TERM_UNIT', 0);

/**
 * Flag to ssh2_fetch_stream requesting STDIO subchannel.
 * @link https://php.net/manual/en/ssh2.constants.php
 */
define('SSH2_STREAM_STDIO', 0);

/**
 * Flag to ssh2_fetch_stream requesting STDERR subchannel.
 * @link https://php.net/manual/en/ssh2.constants.php
 */
define('SSH2_STREAM_STDERR', 1);
define('SSH2_POLLIN', 1);
define('SSH2_POLLEXT', 2);
define('SSH2_POLLOUT', 4);
define('SSH2_POLLERR', 8);
define('SSH2_POLLHUP', 16);
define('SSH2_POLLNVAL', 32);
define('SSH2_POLL_SESSION_CLOSED', 16);
define('SSH2_POLL_CHANNEL_CLOSED', 128);
define('SSH2_POLL_LISTENER_CLOSED', 128);
<?php

use JetBrains\PhpStorm\Pure;

/**
 * Terminate apache process after this request
 * apache_child_terminate() will register the Apache process executing the current PHP request for termination once execution of PHP code is completed. It may be used to terminate a process after a script with high memory consumption has been run as memory will usually only be freed internally but not given back to the operating system.
 * @link https://php.net/manual/en/function.apache-child-terminate.php
 * @return bool <b>TRUE</b> if PHP is running as an Apache 1 module, the Apache version is non-multithreaded, and the child_terminate PHP directive is enabled (disabled by default). If these conditions are not met, <b>FALSE</b> is returned and an error of level <b>E_WARNING</b> is generated.
 */
function apache_child_terminate() {}

/**
 * Get a list of loaded Apache modules
 * @link https://php.net/manual/en/function.apache-get-modules.php
 * @return array of loaded Apache modules.
 */
#[Pure]
function apache_get_modules() {}

/**
 * Fetch the Apache version
 * @link https://php.net/manual/en/function.apache-get-version.php
 * @return string|false the Apache version on success or <b>FALSE</b> on failure.
 */
#[Pure]
function apache_get_version() {}

/**
 * Get an Apache subprocess_env variable
 * Retrieve an Apache environment variable specified by $variable.
 * This function requires Apache 2 otherwise it's undefined.
 * @link https://php.net/manual/en/function.apache-getenv.php
 * @param string $variable <p>
 * The Apache environment variable.
 * </p>
 * @param bool $walk_to_top <p>
 * Whether to get the top-level variable available to all Apache layers.
 * </p>
 * @return string|false The value of the Apache environment variable on success, or <b>FALSE</b> on failure.
 */
#[Pure]
function apache_getenv($variable, $walk_to_top = false) {}

/**
 * Perform a partial request for the specified URI and return all info about it
 * This performs a partial request for a URI. It goes just far enough to obtain all the important information about the given resource.
 * This function is supported when PHP is installed as an Apache module or by the NSAPI server module in Netscape/iPlanet/SunONE webservers.
 * @link https://php.net/manual/en/function.apache-lookup-uri.php
 * @param string $filename <p>
 * The filename (URI) that's being requested.
 * </p>
 * @return object of related URI information.
 */
function apache_lookup_uri($filename) {}

/**
 * Get and set apache request notes
 * This function is a wrapper for Apache's table_get and table_set. It edits the table of notes that exists during a request. The table's purpose is to allow Apache modules to communicate.
 * The main use for apache_note() is to pass information from one module to another within the same request.
 * @link https://php.net/manual/en/function.apache-note.php
 * @param string $note_name <p>
 * The name of the note.
 * </p>
 * @param string $note_value <p>
 * The value of the note.
 * </p>
 * @return string|false If called with one argument, it returns the current value of note note_name. If called with two arguments, it sets the value of note note_name to note_value and returns the previous value of note note_name. If the note cannot be retrieved, <b>FALSE</b> is returned.
 */
function apache_note($note_name, $note_value = '') {}

/**
 * Reset the Apache write timer
 * apache_reset_timeout() resets the Apache write timer, which defaults to 300 seconds. With set_time_limit(0); ignore_user_abort(true) and periodic apache_reset_timeout() calls, Apache can theoretically run forever.
 * This function requires Apache 1.
 * @link https://php.net/manual/en/function.apache-reset-timeout.php
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function apache_reset_timeout() {}

/**
 * Fetch all HTTP response headers
 * @link https://php.net/manual/en/function.apache-response-headers.php
 * @return array|false An array of all Apache response headers on success or <b>FALSE</b> on failure.
 */
function apache_response_headers() {}

/**
 * Sets the value of the Apache environment variable specified by variable.
 * Note: When setting an Apache environment variable, the corresponding $_SERVER variable is not changed.
 * @link https://php.net/manual/en/function.apache-setenv.php
 * @param string $variable <p>
 * The environment variable that's being set.
 * </p>
 * @param string $value <p>
 * The new variable value.
 * </p>
 * @param bool $walk_to_top <p>
 * Whether to set the top-level variable available to all Apache layers.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function apache_setenv($variable, $value, $walk_to_top = false) {}

/**
 * Perform an Apache sub-request
 * virtual() is an Apache-specific function which is similar to <!--#include virtual...--> in mod_include. It performs an Apache sub-request. It is useful for including CGI scripts or .shtml files, or anything else that you would parse through Apache. Note that for a CGI script, the script must generate valid CGI headers. At the minimum that means it must generate a Content-Type header.
 * To run the sub-request, all buffers are terminated and flushed to the browser, pending headers are sent too.
 * This function is supported when PHP is installed as an Apache module or by the NSAPI server module in Netscape/iPlanet/SunONE webservers.
 * @link https://secure.php.net/manual/en/function.virtual.php
 * @param string $filename <p>
 * The file that the virtual command will be performed on.
 * </p>
 * @return bool Performs the virtual command on success, or returns FALSE on failure.
 */
function virtual($filename) {}
<?php

namespace Relay;

/**
 * Relay Sentinel client.
 *
 * @see https://redis.io/docs/management/sentinel/
 */
class Sentinel
{
    /**
     * Whether to throw an exception on `-ERR` replies.  Default: false
     *
     * @var int
     */
    public const OPT_THROW_ON_ERR = 1;

    /**
     * Whether \Relay\Sentinel should automatically discover other sentinels in the
     * cluster, so it may use them if we fail to communicate with the first one.
     *
     * @var int
     */
    public const OPT_AUTO_DISCOVER = 2;

    /**
     * Establishes a new connection to a Sentinel instance.
     *
     * @param  string  $host
     * @param  int  $port
     * @param  float  $timeout
     * @param  mixed  $persistent
     * @param  int  $retry_interval
     * @param  float  $read_timeout
     * @param  mixed  $auth
     */
    #[\Relay\Attributes\Server]
    public function __construct(
        string $host,
        int $port = 26379,
        float $timeout = 0,
        mixed $persistent = null,
        int $retry_interval = 0,
        float $read_timeout = 0,
        #[\SensitiveParameter] mixed $auth = null
    ) {}

    /**
     * Check if the current Sentinel configuration is able to reach the quorum needed
     * to failover a master, and the majority needed to authorize the failover.
     *
     * @param  string  $master
     * @return bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function ckquorum(string $master): bool {}

    /**
     * Force a failover as if the master was not reachable,
     * and without asking for agreement to other Sentinels.
     *
     * @param  string  $master
     * @return bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function failover(string $master): bool {}

    /**
     * Force Sentinel to rewrite its configuration on disk,
     * including the current Sentinel state.
     *
     * @return bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function flushconfig(): bool {}

    /**
     * Returns the ip and port number of the master with that name.
     *
     * @param  string  $master
     * @return array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function getMasterAddrByName(string $master): array|false {}

    /**
     * Returns the state and info of the specified master.
     *
     * @param  string  $master
     * @return array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function master(string $master): array|false {}

    /**
     * Returns a list of monitored masters and their state.
     *
     * @return array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function masters(): array|false {}

    /**
     * Returns the ID of the Sentinel instance.
     *
     * @return string
     */
    #[\Relay\Attributes\RedisCommand]
    public function myid(): string {}

    /**
     * Returns PONG if no message is provided, otherwise returns the message.
     *
     * @param  string|null  $message
     * @return string|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function ping(?string $message = null): string|bool {}

    /**
     * Will reset all the masters with matching name.
     *
     * @param  string  $pattern
     * @return int
     */
    #[\Relay\Attributes\RedisCommand]
    public function reset(string $pattern): int {}

    /**
     * Returns a list of sentinel instances for this master, and their state.
     *
     * @param  string  $master
     * @return array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function sentinels(string $master): array|false {}

    /**
     * Show a list of replicas for this master, and their state.
     *
     * @param  string  $master
     * @return array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function slaves(string $master): array|false {}

    /**
     * Returns the last error message, if any.
     *
     * @return string|null
     */
    #[\Relay\Attributes\Local]
    public function getLastError(): string|null {}

    /**
     * Sets a client option.
     *
     * @param  int  $option
     * @param  mixed  $value
     * @return bool
     */
    #[\Relay\Attributes\Local]
    public function setOption(int $option, mixed $value): bool {}

    /**
     * Returns a client option.
     *
     * @param  int  $option
     * @return mixed
     */
    #[\Relay\Attributes\Local]
    public function getOption(int $option): mixed {}
}
<?php

namespace Relay;

/**
 * A collection of Redis data types.
 */
enum KeyType: int
{
    /**
     * @see Relay::REDIS_NOT_FOUND
     */
    case NotFound = Relay::REDIS_NOT_FOUND;

    /**
     * @see Relay::REDIS_STRING
     */
    case String = Relay::REDIS_STRING;

    /**
     * @see Relay::REDIS_SET
     */
    case Set = Relay::REDIS_SET;

    /**
     * @see Relay::REDIS_LIST
     */
    case List = Relay::REDIS_LIST;

    /**
     * @see Relay::REDIS_ZSET
     */
    case Zset = Relay::REDIS_ZSET;

    /**
     * @see Relay::REDIS_HASH
     */
    case Hash = Relay::REDIS_HASH;

    /**
     * @see Relay::REDIS_STREAM
     */
    case Stream = Relay::REDIS_STREAM;
}
<?php

namespace Relay;

/**
 * Generic Relay exception.
 */
class Exception extends \Exception {}
<?php

namespace Relay;

/**
 * Relay event class.
 */
final class Event
{
    /**
     * The integer representing the `INVALIDATED` event.
     *
     * @var int
     */
    public const INVALIDATED = 1;

    /**
     * The integer representing the `INVALIDATED` event.
     *
     * @var int
     */
    public const Invalidated = 1;

    /**
     * The integer representing the `FLUSHED` event.
     *
     * @var int
     */
    public const FLUSHED = 2;

    /**
     * The integer representing the `FLUSHED` event.
     *
     * @var int
     */
    public const Flushed = 2;

    /**
     * The type of the event represented by an integer.
     *
     * @var int
     */
    public int $type;

    /**
     * The event key. Only filled for `INVALIDATED` events.
     *
     * @var mixed
     */
    public mixed $key = null;

    /**
     * Whether the invalidation was created in the client or
     * originated from a Redis PUSH message.
     *
     * @var bool
     */
    public bool $client;
}
<?php

namespace Relay;

/**
 * Relay client.
 */
class Relay
{
    /**
     * Relay's version.
     *
     * @var string
     */
    public const VERSION = "0.6.2";

    /**
     * Relay's version.
     *
     * @var string
     */
    public const Version = "0.6.2";

    /**
     * Integer representing no compression algorithm.
     *
     * @var int
     */
    public const COMPRESSION_NONE = 0;

    /**
     * Integer representing the LZF compression algorithm.
     *
     * @var int
     */
    public const COMPRESSION_LZF = 1;

    /**
     * Integer representing the Zstandard compression algorithm.
     *
     * @var int
     */
    public const COMPRESSION_ZSTD = 2;

    /**
     * Integer representing the LZ4 compression algorithm.
     *
     * @var int
     */
    public const COMPRESSION_LZ4 = 3;

    /**
     * Integer representing no serializer.
     *
     * @var int
     */
    public const SERIALIZER_NONE = 0;

    /**
     * Integer representing the PHP serializer.
     *
     * @var int
     */
    public const SERIALIZER_PHP = 1;

    /**
     * Integer representing the igbinary serializer.
     *
     * @var int
     */
    public const SERIALIZER_IGBINARY = 2;

    /**
     * Integer representing the MessagePack serializer.
     *
     * @var int
     */
    public const SERIALIZER_MSGPACK = 3;

    /**
     * Integer representing the JSON serializer.
     *
     * @var int
     */
    public const SERIALIZER_JSON = 4;

    /**
     * Integer representing the atomic mode.
     *
     * @see \Relay\Relay::getMode()
     * @var int
     */
    public const ATOMIC = 0x00;

    /**
     * Integer representing the pipeline mode.
     *
     * @see \Relay\Relay::getMode()
     * @var int
     */
    public const PIPELINE = 0x02;

    /**
     * Integer representing the `MULTI` mode.
     *
     * @see \Relay\Relay::getMode()
     * @var int
     */
    public const MULTI = 0x01;

    /**
     * Integer representing the prefix option.
     *
     * @var int
     */
    public const OPT_PREFIX = 2;

    /**
     * Integer representing the read timeout option.
     *
     * @var int
     */
    public const OPT_READ_TIMEOUT = 3;

    /**
     * Integer representing the maximum retries option.
     *
     * @var int
     */
    public const OPT_MAX_RETRIES = 11;

    /**
     * Integer representing the backoff algorithm.
     *
     * @var int
     */
    public const OPT_BACKOFF_ALGORITHM = 12;

    /**
     * Toggle TCP_KEEPALIVE on a connection
     *
     * @var int
     */
    public const OPT_TCP_KEEPALIVE = 6;

    /**
     * Integer representing the default backoff algorithm.
     *
     * @var int
     */
    public const BACKOFF_ALGORITHM_DEFAULT = 0;

    /**
     * Integer representing the decorrelated jitter backoff algorithm.
     *
     * @var int
     */
    public const BACKOFF_ALGORITHM_DECORRELATED_JITTER = 1;

    /**
     * Integer representing the full jitter backoff algorithm.
     *
     * @var int
     */
    public const BACKOFF_ALGORITHM_FULL_JITTER = 2;

    /**
     * Integer representing the base for backoff computation.
     *
     * @var int
     */
    public const OPT_BACKOFF_BASE = 13;

    /**
     * Integer representing the backoff time cap.
     *
     * @var int
     */
    public const OPT_BACKOFF_CAP = 14;

    /**
     * Integer representing the PhpRedis compatibility mode option.
     *
     * Enabled by default. Disabling will cause Relay to:
     * 1. Return `null` when a key doesn't exist, instead of `false`
     * 2. Throw exceptions when an error occurs, instead of returning `false`
     *
     * @var int
     */
    public const OPT_PHPREDIS_COMPATIBILITY = 100;

    /**
     * Integer representing the serializer option.
     *
     * @var int
     */
    public const OPT_SERIALIZER = 1;

    /**
     * Integer representing the compression option.
     *
     * @var int
     */
    public const OPT_COMPRESSION = 7;

    /**
     * Integer representing the compression level option.
     *
     * @var int
     */
    public const OPT_COMPRESSION_LEVEL = 9;

    /**
     * Integer representing the reply literal option.
     *
     * @var int
     */
    public const OPT_REPLY_LITERAL = 8;

    /**
     * Integer representing the null-multi-bulk-as-null option.
     *
     * @var int
     */
    public const OPT_NULL_MULTIBULK_AS_NULL = 10;

    /**
     * Integer representing the throw-on-error option.
     *
     * Disabled by default. When enabled, Relay will throw exceptions when errors occur.
     *
     * @var int
     */
    public const OPT_THROW_ON_ERROR = 105;

    /**
     * Integer representing Relay’s invalidation option.
     *
     * Enabled by default. When disabled will prevent Relay from
     * performing instantaneous client-side invalidation when a key
     * is changed without waiting for Redis to send an `INVALIDATE`
     * message. The invalidation occurs only in the same FPM pool.
     *
     * @var int
     */
    public const OPT_CLIENT_INVALIDATIONS = 101;

    /**
     * Integer representing Relay’s allow patterns option.
     *
     * When set only keys matching these patterns will be cached,
     * unless they also match an `OPT_IGNORE_PATTERNS`.
     *
     * @var int
     */
    public const OPT_ALLOW_PATTERNS = 102;

    /**
     * Integer representing Relay’s ignore patterns option.
     *
     * When set keys matching these patterns will not be cached.
     *
     * @var int
     */
    public const OPT_IGNORE_PATTERNS = 103;

    /**
     * Whether use in-memory caching. Enabled by default.
     *
     * @var int
     */
    public const OPT_USE_CACHE = 104;

    /**
     * Integer representing the scan option.
     *
     * @var int
     */
    public const OPT_SCAN = 4;

    /**
     * Issue one `SCAN` command at a time, sometimes returning an empty array of results.
     *
     * @var int
     */
    public const SCAN_NORETRY = 0;

    /**
     * Retry the `SCAN` command until keys come back, or iterator of zero is returned.
     *
     * @var int
     */
    public const SCAN_RETRY = 1;

    /**
     * Prepend the set prefix to any `MATCH` pattern.
     *
     * @var int
     */
    public const SCAN_PREFIX = 2;

    /**
     * Do not prepend the set prefix to any `MATCH` pattern.
     *
     * @var int
     */
    public const SCAN_NOPREFIX = 3;

    /**
     * Redis command argument.
     *
     * @internal
     * @var string
     */
    public const BEFORE = 'BEFORE';

    /**
     * Redis command argument.
     *
     * @internal
     * @var string
     */
    public const AFTER = 'AFTER';

    /**
     * Redis command argument.
     *
     * @internal
     * @var string
     */
    public const LEFT = 'LEFT';

    /**
     * Redis command argument.
     *
     * @internal
     * @var string
     */
    public const RIGHT = 'RIGHT';

    /**
     * Integer representing "key not found".
     *
     * @see \Relay\Relay::type()
     * @var int
     */
    public const REDIS_NOT_FOUND = 0;

    /**
     * Integer representing Redis `string` type.
     *
     * @see \Relay\Relay::type()
     * @var int
     */
    public const REDIS_STRING = 1;

    /**
     * Integer representing Redis `set` type.
     *
     * @see \Relay\Relay::type()
     * @var int
     */
    public const REDIS_SET = 2;

    /**
     * Integer representing Redis `list` type.
     *
     * @see \Relay\Relay::type()
     * @var int
     */
    public const REDIS_LIST = 3;

    /**
     * Integer representing Redis `zset` type.
     *
     * @see \Relay\Relay::type()
     * @var int
     */
    public const REDIS_ZSET = 4;

    /**
     * Integer representing Redis `hash` type.
     *
     * @see \Relay\Relay::type()
     * @var int
     */
    public const REDIS_HASH = 5;

    /**
     * Integer representing Redis `stream` type.
     *
     * @see \Relay\Relay::type()
     * @var int
     */
    public const REDIS_STREAM = 6;

    /**
     * Establishes a new connection to Redis, or re-uses already opened connection.
     *
     * @param  string  $host
     * @param  int  $port
     * @param  float  $connect_timeout
     * @param  float  $command_timeout
     * @param  array  $context
     */
    #[\Relay\Attributes\Server]
    public function __construct(
        string $host = null,
        int $port = 6379,
        float $connect_timeout = 0.0,
        float $command_timeout = 0.0,
        #[\SensitiveParameter] array $context = [],
        int $database = 0,
    ) {}

    /**
     * Establishes a new connection to Redis.
     * Will use `pconnect()` unless `relay.default_pconnect` is disabled.
     *
     * @param  string  $host
     * @param  int  $port
     * @param  float  $timeout
     * @param  string|null  $persistent_id
     * @param  int  $retry_interval
     * @param  float  $read_timeout
     * @param  array  $context
     * @param  int  $database
     * @return bool
     */
    #[\Relay\Attributes\Server]
    public function connect(
        string $host,
        int $port = 6379,
        float $timeout = 0.0,
        ?string $persistent_id = null,
        int $retry_interval = 0,
        float $read_timeout = 0.0,
        #[\SensitiveParameter] array $context = [],
        int $database = 0
    ): bool {}

    /**
     * Establishes a persistent connection to Redis.
     *
     * @param  string  $host
     * @param  int  $port
     * @param  float  $timeout
     * @param  string|null  $persistent_id
     * @param  int  $retry_interval
     * @param  float  $read_timeout
     * @param  array  $context
     * @param  int  $database
     * @return bool
     */
    #[\Relay\Attributes\Server]
    public function pconnect(
        string $host,
        int $port = 6379,
        float $timeout = 0.0,
        ?string $persistent_id = null,
        int $retry_interval = 0,
        float $read_timeout = 0.0,
        #[\SensitiveParameter] array $context = [],
        int $database = 0
    ): bool {}

    /**
     * Closes the current connection, unless it's persistent.
     *
     * @return bool
     */
    #[\Relay\Attributes\Local]
    public function close(): bool {}

    /**
     * Closes the current connection, if it's persistent.
     *
     * @return bool
     */
    #[\Relay\Attributes\Local]
    public function pclose(): bool {}

    /**
     * Registers a new event listener.
     *
     * @param  callable  $callback
     * @return bool
     */
    #[\Relay\Attributes\Local]
    public function listen(?callable $callback): bool {}

    /**
     * Registers a new `flushed` event listener.
     *
     * @param  callable  $callback
     * @return bool
     */
    #[\Relay\Attributes\Local]
    public function onFlushed(?callable $callback): bool {}

    /**
     * Registers a new `invalidated` event listener.
     *
     * @param  callable  $callback
     * @param  string|null  $pattern
     * @return bool
     */
    #[\Relay\Attributes\Local]
    public function onInvalidated(?callable $callback, ?string $pattern = null): bool {}

    /**
     * Dispatches all pending events.
     *
     * @return int|false
     */
    #[\Relay\Attributes\Local]
    public function dispatchEvents(): int|false {}

    /**
     * Returns a client option.
     *
     * @param  int  $option
     * @return mixed
     */
    #[\Relay\Attributes\Local]
    public function getOption(int $option): mixed {}

    /**
     * Returns or sets a client option.
     *
     * @param  int  $option
     * @param  mixed  $value
     * @return mixed
     */
    #[\Relay\Attributes\Local]
    public function option(int $option, mixed $value = null): mixed {}

    /**
     * Sets a client option.
     *
     * Relay specific options:
     *
     * - `OPT_ALLOW_PATTERNS`
     * - `OPT_IGNORE_PATTERNS`
     * - `OPT_THROW_ON_ERROR`
     * - `OPT_CLIENT_INVALIDATIONS`
     * - `OPT_PHPREDIS_COMPATIBILITY`
     *
     * Supported PhpRedis options:
     *
     * - `OPT_PREFIX`
     * - `OPT_READ_TIMEOUT`
     * - `OPT_COMPRESSION`
     * - `OPT_COMPRESSION_LEVEL`
     * - `OPT_MAX_RETRIES`
     * - `OPT_BACKOFF_ALGORITHM`
     * - `OPT_BACKOFF_BASE`
     * - `OPT_BACKOFF_CAP`
     * - `OPT_SCAN`
     * - `OPT_REPLY_LITERAL`
     * - `OPT_NULL_MULTIBULK_AS_NULL`
     *
     * @param  int  $option
     * @param  mixed  $value
     * @return bool
     */
    #[\Relay\Attributes\Local]
    public function setOption(int $option, mixed $value): bool {}

    /**
     * Adds ignore pattern(s). Matching keys will not be cached in memory.
     *
     * @param  string  $pattern,...
     * @return int
     */
    #[\Relay\Attributes\Local]
    public function addIgnorePatterns(string ...$pattern): int {}

    /**
     * Adds allow pattern(s). Only matching keys will be cached in memory.
     *
     * @param  string  $pattern,...
     * @return int
     */
    #[\Relay\Attributes\Local]
    public function addAllowPatterns(string ...$pattern): int {}

    /**
     * Returns the connection timeout.
     *
     * @return float|false
     */
    #[\Relay\Attributes\Local]
    public function getTimeout(): float|false {}

    /**
     * @see Relay\Relay::getTimeout()
     *
     * @return float|false
     */
    #[\Relay\Attributes\Local]
    public function timeout(): float|false {}

    /**
     * Returns the read timeout.
     *
     * @return float|false
     */
    #[\Relay\Attributes\Local]
    public function getReadTimeout(): float|false {}

    /**
     * @see Relay\Relay::getReadTimeout()
     *
     * @return float|false
     */
    #[\Relay\Attributes\Local]
    public function readTimeout(): float|false {}

    /**
     * Returns the number of bytes sent and received over the network during the Relay object's
     * lifetime, or since the last time {@link Relay::clearBytes()} was called.
     *
     * @return array{int, int}
     */
    #[\Relay\Attributes\Local]
    public function getBytes(): array {}

    /**
     * @see Relay\Relay::getBytes()
     *
     * @return array{int, int}
     */
    #[\Relay\Attributes\Local]
    public function bytes(): array {}

    /**
     * Returns the host or unix socket.
     *
     * @return string|false
     */
    #[\Relay\Attributes\Local]
    public function getHost(): string|false {}

    /**
     * Whether Relay is connected to Redis.
     *
     * @return bool
     */
    #[\Relay\Attributes\Local]
    public function isConnected(): bool {}

    /**
     * Returns the port.
     *
     * @return int|false
     */
    #[\Relay\Attributes\Local]
    public function getPort(): int|false {}

    /**
     * Returns the authentication information.
     * In PhpRedis compatibility mode this method returns any configured password in plain-text.
     *
     * @return mixed
     */
    #[\Relay\Attributes\Local]
    public function getAuth(): mixed {}

    /**
     * Returns the currently selected DB
     *
     * @return int|false
     */
    #[\Relay\Attributes\Local]
    public function getDbNum(): mixed {}

    /**
     * Returns the serialized value.
     *
     * @param  mixed  $value
     * @return mixed
     */
    #[\Relay\Attributes\Local]
    public function _serialize(mixed $value): mixed {}

    /**
     * Returns the unserialized value.
     *
     * @param  mixed  $value
     * @return mixed
     */
    #[\Relay\Attributes\Local]
    public function _unserialize(mixed $value): mixed {}

    /**
     * Compress data with Relay's currently configured compression algorithm.
     *
     * @param  string  $value
     * @return string
     */
    #[\Relay\Attributes\Local]
    public function _compress(string $value): string {}

    /**
     * Uncompress data with Relay's currently configured compression algorithm.
     *
     * @param  string  $value
     * @return string
     */
    #[\Relay\Attributes\Local]
    public function _uncompress(string $value): string {}

    /**
     * Returns the serialized and compressed value.
     *
     * @param  mixed  $value
     * @return string
     */
    #[\Relay\Attributes\Local]
    public function _pack(mixed $value): string {}

    /**
     * Returns the unserialized and decompressed value.
     *
     * @param  mixed  $value
     * @return mixed
     */
    #[\Relay\Attributes\Local]
    public function _unpack(mixed $value): mixed {}

    /**
     * Returns the value with the prefix.
     *
     * @param  mixed  $value
     * @return string
     */
    #[\Relay\Attributes\Local]
    public function _prefix(mixed $value): string {}

    /**
     * Returns the last error message, if any.
     *
     * @return string|null
     */
    #[\Relay\Attributes\Local]
    public function getLastError(): string|null {}

    /**
     * Clears the last error that is set, if any.
     *
     * @return bool
     */
    #[\Relay\Attributes\Local]
    public function clearLastError(): bool {}

    /**
     * Returns the connection's endpoint identifier.
     *
     * @return string|false
     */
    #[\Relay\Attributes\Local]
    public function endpointId(): string|false {}

    /**
     * @see Relay\Relay::endpointId()
     *
     * @return string|false
     */
    public function getPersistentID(): string|false {}

    /**
     * Returns a unique representation of the underlying socket connection identifier.
     *
     * @return string|false
     */
    #[\Relay\Attributes\Local]
    public function socketId(): string|false {}

    /**
     * Returns information about the license.
     *
     * @return array
     */
    #[\Relay\Attributes\Local]
    public static function license(): array {}

    /**
     * Returns statistics about Relay.
     *
     * - `usage.total_requests`: The total number of requests we've seen
     * - `usage.active_requests`: The number of requests currently in-flight
     * - `usage.max_active_requests`: The most concurrent in-flight requests we've seen
     * - `usage.free_epoch_records`: The estimated number of free epoch reclamation records
     *
     * - `stats.requests`: The total number of requests the cache has received
     * - `stats.misses`: Requests where we had to ask Redis for a value
     * - `stats.hits`: Requests where we did not have to ask redis for the value
     * - `stats.dirty_skips`: The number of times Relay has skipped an entire database because it was dirty.
     * - `stats.errors`: How many times a 'severe' error occurs (presently this is only incremented if we get a `null` response from hiredis)
     * - `stats.empty`: How many times we've run out of free requests (indicating the size of the ring buffers should be increased)
     * - `stats.oom`: The number of times we've run out of memory
     * - `stats.ops_per_sec`: The number of commands processed per second
     * - `stats.walltime`: The number of microseconds Relay has spent doing work
     * - `stats.bytes_sent`: The number of bytes Relay has written to the network
     * - `stats.bytes_received`: The number of bytes Relay has read from the network
     *
     * - `memory.total`: The total bytes of allocated memory
     * - `memory.limit`: The capped number of bytes Relay has available to use
     * - `memory.active`: The total amount of memory mapped into the allocator
     * - `memory.used`: The amount of memory pointing to live objects including metadata
     *
     * - `endpoints.*.redis`: Information about the connected Redis server.
     * - `endpoints.*.connections.*.keys`: The total number of cached keys for the connection.
     *
     * @return array
     */
    #[\Relay\Attributes\Local]
    public static function stats(): array {}

    /**
     * Returns the number of bytes allocated, or `0` in client-only mode.
     *
     * @return int
     */
    #[\Relay\Attributes\Local]
    public static function maxMemory(): int {}

    /**
     * Returns the number of bytes allocated, or `0` in client-only mode.
     *
     * @deprecated 0.5.0 Use `Relay:maxMemory()`
     *
     * @return int
     */
    #[\Relay\Attributes\Local]
    public static function memory(): int {}

    /**
     * Execute any command against Redis, without applying
     * the prefix, compression and serialization.
     *
     * @param  string  $cmd
     * @param  mixed  $args,...
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function rawCommand(string $cmd, mixed ...$args): mixed {}

    /**
     * Select the Redis logical database having the specified zero-based numeric index.
     *
     * @param  int  $db
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function select(int $db): Relay|bool {}

    /**
     * Authenticate the connection using a password or an ACL username and password.
     *
     * @param  mixed  $auth
     * @return bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function auth(#[\SensitiveParameter] mixed $auth): bool {}

    /**
     * The INFO command returns information and statistics about Redis in a format
     * that is simple to parse by computers and easy to read by humans.
     *
     * @see https://redis.io/commands/info
     *
     * @param  string  $sections,...
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function info(string ...$sections): Relay|array|false {}

    /**
     * Deletes all the keys of the currently selected database.
     *
     * @param  bool  $async
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function flushdb(bool $async = false): Relay|bool {}

    /**
     * Deletes all the keys of all the existing databases, not just the currently selected one.
     *
     * @param  bool  $async
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function flushall(bool $async = false): Relay|bool {}

    /**
     * Invokes a Redis function.
     *
     * @param  string  $name
     * @param  array  $keys
     * @param  array  $argv
     * @param  callable  $handler
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function fcall(string $name, array $keys = [], array $argv = [], callable $handler = null): mixed {}

    /**
     * Invokes a read-only Redis function.
     *
     * @param  string  $name
     * @param  array  $keys
     * @param  array  $argv
     * @param  callable  $handler
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function fcall_ro(string $name, array $keys = [], array $argv = [], callable $handler = null): mixed {}

    /**
     * Calls `FUNCTION` sub-command.
     *
     * @param  string  $op
     * @param  string  $args,...
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function function(string $op, string ...$args): mixed {}

    /**
     * Flushes Relay's in-memory cache of all databases.
     * When given an endpoint, only that connection will be flushed.
     * When given an endpoint and database index, only that database
     * for that connection will be flushed.
     *
     * @param  string|null  $endpointId
     * @param  int|null  $db
     * @return bool
     */
    #[\Relay\Attributes\Local]
    public static function flushMemory(?string $endpointId = null, int $db = null): bool {}

    /**
     * Returns the number of keys in the currently-selected database.
     *
     * @return Relay|int
     */
    #[\Relay\Attributes\RedisCommand]
    public function dbsize(): Relay|int|false {}

    /**
     * Serialize and return the value stored at key in a Redis-specific format.
     *
     * @param  mixed  $key
     * @return Relay|string|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function dump(mixed $key): Relay|string|false {}

    /**
     * Attach or detach the instance as a replica of another instance.
     *
     * @param  string|null  $host
     * @param  int  $port
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function replicaof(?string $host = null, $port = 0): Relay|bool {}

    /**
     * Create a key associated with a value that is obtained by deserializing the provided serialized value.
     *
     * @param  mixed  $key
     * @param  int  $ttl
     * @param  string  $value
     * @param  array  $options
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function restore(mixed $key, int $ttl, string $value, ?array $options = null): Relay|bool {}

    /**
     * Atomically transfer a key from a Redis instance to another one.
     *
     * @param  string  $host
     * @param  int  $port
     * @param  string|array  $key
     * @param  int  $dstdb
     * @param  int  $timeout
     * @param  bool  $copy
     * @param  bool  $replace
     * @param  mixed  $credentials
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function migrate(
        string $host,
        int $port,
        string|array $key,
        int $dstdb,
        int $timeout,
        bool $copy = false,
        bool $replace = false,
        #[\SensitiveParameter] mixed $credentials = null
    ): Relay|bool {}

    /**
     * This command copies the value stored at the source key to the destination key.
     *
     * @param  mixed  $src
     * @param  mixed  $dst
     * @param  array  $options
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function copy(mixed $src, mixed $dst, ?array $options = null): Relay|int|false {}

    /**
     * Asks Redis to echo back the provided string.
     *
     * @param  string  $arg
     * @return Relay|bool|string
     */
    #[\Relay\Attributes\RedisCommand]
    public function echo(string $arg): Relay|bool|string {}

    /**
     * Returns PONG if no argument is provided, otherwise return a copy of the argument as a bulk.
     *
     * @param  string  $arg
     * @return Relay|bool|string
     */
    #[\Relay\Attributes\RedisCommand]
    public function ping(string $arg = null): Relay|bool|string {}

    /**
     * Returns the number of milliseoconds since Relay has seen activity from the server.
     *
     * @return Relay|int|false
     */
    #[\Relay\Attributes\Local]
    public function idleTime(): Relay|int|false {}

    /**
     * Returns a random key from Redis.
     *
     * @return Relay|string|null|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function randomkey(): Relay|string|null|bool {}

    /**
     * Returns the current time from Redis.
     *
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function time(): Relay|array|false {}

    /**
     * Asynchronously rewrite the append-only file.
     *
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function bgrewriteaof(): Relay|bool {}

    /**
     * Returns the UNIX time stamp of the last successful save to disk.
     *
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function lastsave(): Relay|int|false {}

    /**
     * Asynchronously save the dataset to disk.
     *
     * @param  bool  $schedule
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function bgsave(bool $schedule = false): Relay|bool {}

    /**
     * Synchronously save the dataset to disk.
     *
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function save(): Relay|bool {}

    /**
     * Returns the role of the instance in the context of replication.
     *
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function role(): Relay|array|false {}

    /**
     * Returns the remaining time to live of a key that has a timeout in seconds.
     *
     * @param  mixed  $key
     * @return Relay|int
     */
    #[\Relay\Attributes\RedisCommand]
    public function ttl(mixed $key): Relay|int|false {}

    /**
     * Returns the remaining time to live of a key that has a timeout in milliseconds.
     *
     * @param  mixed  $key
     * @return Relay|int
     */
    #[\Relay\Attributes\RedisCommand]
    public function pttl(mixed $key): Relay|int|false {}

    /**
     * Returns if key(s) exists.
     *
     * @param  mixed  $keys,...
     * @return Relay|bool|int
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function exists(mixed ...$keys): Relay|bool|int {}

    /**
     * Evaluate script using the Lua interpreter.
     *
     * @see https://redis.io/commands/eval
     *
     * @param  mixed  $script
     * @param  array  $args
     * @param  int  $num_keys
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function eval(mixed $script, array $args = [], int $num_keys = 0): mixed {}

    /**
     * Evaluate script using the Lua interpreter.  This is just the "read-only" variant of EVAL
     * meaning it can be run on read-only replicas.
     *
     * @see https://redis.io/commands/eval_ro
     *
     * @param  mixed  $script
     * @param  array  $args
     * @param  int  $num_keys
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function eval_ro(mixed $script, array $args = [], int $num_keys = 0): mixed {}

    /**
     * Evaluates a script cached on the server-side by its SHA1 digest.
     *
     *
     * @param  string  $sha
     * @param  array  $args
     * @param  int  $num_keys
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function evalsha(string $sha, array $args = [], int $num_keys = 0): mixed {}

    /**
     * Evaluates a script cached on the server-side by its SHA1 digest.  This is just the "read-only" variant
     * of `EVALSHA` meaning it can be run on read-only replicas.
     *
     * @param  string  $sha
     * @param  array  $args
     * @param  int  $num_keys
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function evalsha_ro(string $sha, array $args = [], int $num_keys = 0): mixed {}

    /**
     * Executes `CLIENT` command operations.
     *
     * @param  string  $operation
     * @param  mixed  $args,...
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function client(string $operation, mixed ...$args): mixed {}

    /**
     * Add one or more members to a geospacial sorted set
     *
     * @param  string  $key
     * @param  float  $lng
     * @param  float  $lat
     * @param  string  $member
     * @param  mixed  $other_triples_and_options,...
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function geoadd(
        string $key,
        float $lng,
        float $lat,
        string $member,
        mixed ...$other_triples_and_options
    ): Relay|int|false {}

    /**
     * Get the distance between two members of a geospacially encoded sorted set.
     *
     * @param  string  $key
     * @param  string  $src
     * @param  string  $dst
     * @param  string|null  $unit
     * @return Relay|float|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function geodist(string $key, string $src, string $dst, ?string $unit = null): Relay|float|false {}

    /**
     * Retrieve one or more GeoHash encoded strings for members of the set.
     *
     * @param  string  $key
     * @param  string  $member
     * @param  string  $other_members,...
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function geohash(string $key, string $member, string ...$other_members): Relay|array|false {}

    /**
     * Retrieve members of a geospacially sorted set that are within a certain radius of a location.
     *
     * @param  string  $key
     * @param  float  $lng
     * @param  float  $lat
     * @param  float  $radius
     * @param  string  $unit
     * @param  array  $options
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function georadius(string $key, float $lng, float $lat, float $radius, string $unit, array $options = []): mixed {}

    /**
     * Similar to `GEORADIUS` except it uses a member as the center of the query.
     *
     * @param  string  $key
     * @param  string  $member
     * @param  float  $radius
     * @param  string  $unit
     * @param  array  $options
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function georadiusbymember(string $key, string $member, float $radius, string $unit, array $options = []): mixed {}

    /**
     * Similar to `GEORADIUS` except it uses a member as the center of the query.
     *
     * @param  string  $key
     * @param  string  $member
     * @param  float  $radius
     * @param  string  $unit
     * @param  array  $options
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function georadiusbymember_ro(string $key, string $member, float $radius, string $unit, array $options = []): mixed {}

    /**
     * Retrieve members of a geospacially sorted set that are within a certain radius of a location.
     *
     * @param  string  $key
     * @param  float  $lng
     * @param  float  $lat
     * @param  float  $radius
     * @param  string  $unit
     * @param  array  $options
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function georadius_ro(string $key, float $lng, float $lat, float $radius, string $unit, array $options = []): mixed {}

    /**
     * Search a geospacial sorted set for members in various ways.
     *
     * @param  string  $key
     * @param  array|string  $position
     * @param  array|int|float  $shape
     * @param  string  $unit
     * @param  array  $options
     * @return Relay|array
     */
    #[\Relay\Attributes\RedisCommand]
    public function geosearch(
        string $key,
        array|string $position,
        array|int|float $shape,
        string $unit,
        array $options = []
    ): Relay|array {}

    /**
     * Search a geospacial sorted set for members within a given area or range, storing the results into
     * a new set.
     *
     * @param  string  $dst
     * @param  string  $src
     * @param  array|string  $position
     * @param  array|int|float  $shape
     * @param  string  $unit
     * @param  array  $options
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function geosearchstore(
        string $dst,
        string $src,
        array|string $position,
        array|int|float $shape,
        string $unit,
        array $options = []
    ): Relay|int|false {}

    /**
     * Get the value of key.
     *
     * @param  mixed  $key
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function get(mixed $key): mixed {}

    /**
     * Atomically sets key to value and returns the old value stored at key.
     *
     * @param  mixed  $key
     * @param  mixed  $value
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function getset(mixed $key, mixed $value): mixed {}

    /**
     * Returns the substring of the string value stored at key,
     * determined by the offsets start and end (both are inclusive).
     *
     * @param  mixed  $key
     * @param  int  $start
     * @param  int  $end
     * @return Relay|string|false
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function getrange(mixed $key, int $start, int $end): Relay|string|false {}

    /**
     * Overwrites part of the string stored at key, starting at
     * the specified offset, for the entire length of value.
     *
     * @param  mixed  $key
     * @param  int  $start
     * @param  mixed  $value
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function setrange(mixed $key, int $start, mixed $value): Relay|int|false {}

    /**
     * Returns the bit value at offset in the string value stored at key.
     *
     * @param  mixed  $key
     * @param  int  $pos
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function getbit(mixed $key, int $pos): Relay|int|false {}

    /**
     * Count the number of set bits (population counting) in a string.
     *
     * @param  mixed  $key
     * @param  int  $start
     * @param  int  $end
     * @param  bool  $by_bit
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function bitcount(mixed $key, int $start = 0, int $end = -1, bool $by_bit = false): Relay|int|false {}

    /**
     * This is a container command for runtime configuration commands.
     *
     * @param  string  $operation
     * @param  mixed  $key
     * @param  string|null  $value
     * @return Relay|array|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function config(string $operation, mixed $key = null, ?string $value = null): Relay|array|bool {}

    /**
     * Return an array with details about every Redis command.
     *
     * @param  array  $args,...
     * @return Relay|array|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function command(mixed ...$args): Relay|array|int|false {}

    /**
     * Perform a bitwise operation on one or more keys, storing the result in a new key.
     *
     * @param  string  $operation
     * @param  string  $dstkey
     * @param  string  $srckey
     * @param  string  $other_keys,...
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function bitop(string $operation, string $dstkey, string $srckey, string ...$other_keys): Relay|int|false {}

    /**
     * Return the position of the first bit set to 1 or 0 in a string.
     *
     * @param  mixed  $key
     * @param  int  $bit
     * @param  int  $start
     * @param  int  $end
     * @param  bool  $bybit
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function bitpos(mixed $key, int $bit, int $start = null, int $end = null, bool $bybit = false): Relay|int|false {}

    /**
     * Sets or clears the bit at offset in the string value stored at key.
     *
     * @param  mixed  $key
     * @param  int  $pos
     * @param  int  $val
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function setbit(mixed $key, int $pos, int $val): Relay|int|false {}

    /**
     * Interact with Redis' ACLs
     *
     * @param  string  $cmd
     * @param  string  $args,...
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function acl(string $cmd, string ...$args): mixed {}

    /**
     * If key already exists and is a string, this command appends
     * the value at the end of the string. If key does not exist
     * it is created and set as an empty string, so APPEND will
     * be similar to SET in this special case.
     *
     * @param  mixed  $key
     * @param  mixed  $value
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function append(mixed $key, mixed $value): Relay|int|false {}

    /**
     * Set key to hold the string value. If key already holds
     * a value, it is overwritten, regardless of its type.
     *
     * @param  mixed  $key
     * @param  mixed  $value
     * @param  mixed  $options
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function set(mixed $key, mixed $value, mixed $options = null): mixed {}

    /**
     * Get the value of key and optionally set its expiration.
     * GETEX is similar to GET, but is a write command with additional options.
     *
     * @param  mixed  $key
     * @param  array  $options
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function getex(mixed $key, ?array $options = null): mixed {}

    /**
     * Get the value of key and delete the key. This command is similar to GET,
     * except for the fact that it also deletes the key on success
     * (if and only if the key's value type is a string).
     *
     * @param  mixed  $key
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function getdel(mixed $key): mixed {}

    /**
     * Set key to hold the string value and set key to timeout after a given number of seconds.
     *
     * @param  mixed  $key
     * @param  int  $seconds
     * @param  mixed  $value
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function setex(mixed $key, int $seconds, mixed $value): Relay|bool {}

    /**
     * Adds the specified elements to the specified HyperLogLog.
     *
     * @param  string  $key
     * @param  array  $elements
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function pfadd(string $key, array $elements): Relay|int|false {}

    /**
     * Return the approximated cardinality of the set(s) observed by the HyperLogLog at key(s).
     *
     * @param  string  $key
     * @return Relay|int
     */
    #[\Relay\Attributes\RedisCommand]
    public function pfcount(string $key): Relay|int|false {}

    /**
     * Merge given HyperLogLogs into a single one.
     *
     * @param  string  $dst
     * @param  array  $srckeys
     * @return Relay|bool
     */
    public function pfmerge(string $dst, array $srckeys): Relay|bool {}

    /**
     * Set key to hold the string value and set key to timeout after a given number of milliseconds.
     *
     *
     * @param  mixed  $key
     * @param  int  $milliseconds
     * @param  mixed  $value
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function psetex(mixed $key, int $milliseconds, mixed $value): Relay|bool {}

    /**
     * Posts a message to the given channel.
     *
     * @param  string  $channel
     * @param  string  $message
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function publish(string $channel, string $message): Relay|int|false {}

    /**
     * Set key to hold string value if key does not exist. In that case, it is equal to SET.
     * When key already holds a value, no operation is performed.
     * SETNX is short for "SET if Not eXists".
     *
     * @param  mixed  $key
     * @param  mixed  $value
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function setnx(mixed $key, mixed $value): Relay|bool {}

    /**
     * Returns the values of all specified keys.
     *
     * @param  array  $keys
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function mget(array $keys): Relay|array|false {}

    /**
     * Move key from the currently selected database to the specified destination database.
     *
     * @param  mixed  $key
     * @param  int  $db
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function move(mixed $key, int $db): Relay|int|false {}

    /**
     * Sets the given keys to their respective values.
     * MSET replaces existing values with new values, just as regular SET.
     *
     * @param  array  $kvals
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function mset(array $kvals): Relay|bool {}

    /**
     * Sets the given keys to their respective values.
     * MSETNX will not perform any operation at all even if just a single key already exists.
     *
     * @param  array  $kvals
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function msetnx(array $kvals): Relay|bool {}

    /**
     * Renames key.
     *
     * @param  mixed  $key
     * @param  mixed  $newkey
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function rename(mixed $key, mixed $newkey): Relay|bool {}

    /**
     * Renames key if the new key does not yet exist.
     *
     * @param  mixed  $key
     * @param  mixed  $newkey
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function renamenx(mixed $key, mixed $newkey): Relay|bool {}

    /**
     * Removes the specified keys.
     *
     * @param  mixed  $keys,...
     * @return Relay|int|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function del(mixed ...$keys): Relay|int|bool {}

    /**
     * Removes the specified keys without blocking Redis.
     *
     * @param  mixed  $keys,...
     * @return Relay|int
     */
    #[\Relay\Attributes\RedisCommand]
    public function unlink(mixed ...$keys): Relay|int|false {}

    /**
     * Set a timeout on key.
     *
     * @param  mixed  $key
     * @param  int  $seconds
     * @param  string|null  $mode
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function expire(mixed $key, int $seconds, ?string $mode = null): Relay|bool {}

    /**
     * Set a key's time to live in milliseconds.
     *
     * @param  mixed  $key
     * @param  int  $milliseconds
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function pexpire(mixed $key, int $milliseconds): Relay|bool {}

    /**
     * Set a timeout on key using a unix timestamp.
     *
     * @param  mixed  $key
     * @param  int  $timestamp
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function expireat(mixed $key, int $timestamp): Relay|bool {}

    /**
     * Returns the absolute Unix timestamp in seconds at which the given key will expire.
     * If the key exists but doesn't have a TTL this function return -1.
     * If the key does not exist -2.
     *
     * @param  mixed  $key
     * @return Relay|int|false
     * */
    #[\Relay\Attributes\RedisCommand]
    public function expiretime(mixed $key): Relay|int|false {}

    /**
     * Set the expiration for a key as a UNIX timestamp specified in milliseconds.
     *
     * @param  mixed  $key
     * @param  int  $timestamp_ms
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function pexpireat(mixed $key, int $timestamp_ms): Relay|bool {}

    /**
     * Semantic the same as EXPIRETIME, but returns the absolute Unix expiration
     * timestamp in milliseconds instead of seconds.
     *
     * @param  mixed  $key
     * @return Relay|int|false
     * */
    #[\Relay\Attributes\RedisCommand]
    public function pexpiretime(mixed $key): Relay|int|false {}

    /**
     * Remove the existing timeout on key, turning the key from volatile to persistent.
     *
     * @param  mixed  $key
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function persist(mixed $key): Relay|bool {}

    /**
     * Returns the type of a given key.
     *
     * In PhpRedis compatibility mode this will return an integer
     * (one of the REDIS_<type>) constants. Otherwise it will
     * return the string that Redis returns.
     *
     * @param  mixed  $key
     * @return Relay|int|string|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function type(mixed $key): Relay|int|string|bool {}

    /**
     * Atomically returns and removes the first/last element of the list
     * stored at source, and pushes the element at the first/last
     * element of the list stored at destination.
     *
     * @param  mixed  $srckey
     * @param  mixed  $dstkey
     * @param  string  $srcpos
     * @param  string  $dstpos
     * @return Relay|string|null|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function lmove(mixed $srckey, mixed $dstkey, string $srcpos, string $dstpos): Relay|string|null|false {}

    /**
     * BLMOVE is the blocking variant of LMOVE. When source contains elements,
     * this command behaves exactly like LMOVE. When used inside a
     * MULTI/EXEC block, this command behaves exactly like LMOVE.
     *
     * @param  mixed  $srckey
     * @param  mixed  $dstkey
     * @param  string  $srcpos
     * @param  string  $dstpos
     * @param  float  $timeout
     * @return Relay|string|null|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function blmove(mixed $srckey, mixed $dstkey, string $srcpos, string $dstpos, float $timeout): Relay|string|null|false {}

    /**
     * Returns the specified elements of the list stored at key.
     *
     * @param  mixed  $key
     * @param  int  $start
     * @param  int  $stop
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function lrange(mixed $key, int $start, int $stop): Relay|array|false {}

    /**
     * Insert all the specified values at the head of the list stored at key.
     *
     * @param  mixed  $key
     * @param  mixed  $mem
     * @param  mixed  $mems,...
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function lpush(mixed $key, mixed $mem, mixed ...$mems): Relay|int|false {}

    /**
     * Insert all the specified values at the tail of the list stored at key.
     *
     * @param  mixed  $key
     * @param  mixed  $mem
     * @param  mixed  $mems,...
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function rpush(mixed $key, mixed $mem, mixed ...$mems): Relay|int|false {}

    /**
     * Inserts specified values at the head of the list stored at key,
     * only if key already exists and holds a list.
     *
     * @param  mixed  $key
     * @param  mixed  $mem
     * @param  mixed  $mems,...
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function lpushx(mixed $key, mixed $mem, mixed ...$mems): Relay|int|false {}

    /**
     * Inserts specified values at the tail of the list stored at key,
     * only if key already exists and holds a list.
     *
     * @param  mixed  $key
     * @param  mixed  $mem
     * @param  mixed  $mems,...
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function rpushx(mixed $key, mixed $mem, mixed ...$mems): Relay|int|false {}

    /**
     * Sets the list element at index to element.
     *
     * @param  mixed  $key
     * @param  int  $index
     * @param  mixed  $mem
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function lset(mixed $key, int $index, mixed $mem): Relay|bool {}

    /**
     * Removes and returns the first elements of the list stored at key.
     *
     * @param  mixed  $key
     * @param  int  $count
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function lpop(mixed $key, int $count = 1): mixed {}

    /**
     * The command returns the index of matching elements inside a Redis list.
     *
     * @param  mixed  $key
     * @param  mixed  $value
     * @param  array  $options
     * @return Relay|int|array|false|null
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function lpos(mixed $key, mixed $value, ?array $options = null): Relay|int|array|false|null {}

    /**
     * Removes and returns the last elements of the list stored at key.
     *
     * @param  mixed  $key
     * @param  int  $count
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function rpop(mixed $key, int $count = 1): mixed {}

    /**
     * Atomically returns and removes the last element (tail) of the list stored at source,
     * and pushes the element at the first element (head) of the list stored at destination.
     *
     * @param  mixed  $source
     * @param  mixed  $dest
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function rpoplpush(mixed $source, mixed $dest): mixed {}

    /**
     * Atomically returns and removes the last element (tail) of the list stored at source,
     * and pushes the element at the first element (head) of the list stored at destination.
     * This command will block for an element up to the provided timeout.
     *
     * @param  mixed  $source
     * @param  mixed  $dest
     * @param  float  $timeout
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function brpoplpush(mixed $source, mixed $dest, float $timeout): mixed {}

    /**
     * BLPOP is a blocking list pop primitive. It is the blocking version of LPOP because
     * it blocks the connection when there are no elements to pop from any of the given lists.
     *
     * @param  string|array  $key
     * @param  string|float  $timeout_or_key
     * @param  array  $extra_args,...
     * @return Relay|array|null|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function blpop(string|array $key, string|float $timeout_or_key, mixed ...$extra_args): Relay|array|null|false {}

    /**
     * Pop elements from a list, or block until one is available
     *
     * @param  float  $timeout
     * @param  array  $keys
     * @param  string  $from
     * @param  int  $count
     * @return Relay|array|null|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function blmpop(float $timeout, array $keys, string $from, int $count = 1): Relay|array|null|false {}

    /**
     * Remove and return members with scores in a sorted set or block until one is available
     *
     * @param  float  $timeout
     * @param  array  $keys
     * @param  string  $from
     * @param  int  $count
     * @return Relay|array|null|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function bzmpop(float $timeout, array $keys, string $from, int $count = 1): Relay|array|null|false {}

    /**
     * Pops one or more elements from the first non-empty list key from the list of provided key names.
     *
     * @param  array  $keys
     * @param  string  $from
     * @param  int  $count
     * @return Relay|array|null|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function lmpop(array $keys, string $from, int $count = 1): Relay|array|null|false {}

    /**
     * Pops one or more elements, that are member-score pairs, from the
     * first non-empty sorted set in the provided list of key names.
     *
     * @param  array  $keys
     * @param  string  $from
     * @param  int  $count
     * @return Relay|array|null|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zmpop(array $keys, string $from, int $count = 1): Relay|array|null|false {}

    /**
     * BRPOP is a blocking list pop primitive. It is the blocking version of RPOP because
     * it blocks the connection when there are no elements to pop from any of the given lists.
     *
     * @param  string|array  $key
     * @param  string|float  $timeout_or_key
     * @param  array  $extra_args,...
     * @return Relay|array|null|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function brpop(string|array $key, string|float $timeout_or_key, mixed ...$extra_args): Relay|array|null|false {}

    /**
     * BZPOPMAX is the blocking variant of the sorted set ZPOPMAX primitive.
     *
     * @param  string|array  $key
     * @param  string|float  $timeout_or_key
     * @param  array  $extra_args,...
     * @return Relay|array|null|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function bzpopmax(string|array $key, string|float $timeout_or_key, mixed ...$extra_args): Relay|array|null|false {}

    /**
     * BZPOPMIN is the blocking variant of the sorted set ZPOPMIN primitive.
     *
     * @param  string|array  $key
     * @param  string|float  $timeout_or_key
     * @param  array  $extra_args,...
     * @return Relay|array|null|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function bzpopmin(string|array $key, string|float $timeout_or_key, mixed ...$extra_args): Relay|array|null|false {}

    /**
     * This is a container command for object introspection commands.
     *
     * @param  string  $op
     * @param  mixed  $key
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function object(string $op, mixed $key): mixed {}

    /**
     * Return the positions (longitude,latitude) of all the specified members
     * of the geospatial index represented by the sorted set at key.
     *
     * @param  mixed  $key
     * @param  mixed  $members,...
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function geopos(mixed $key, mixed ...$members): Relay|array|false {}

    /**
     * Removes the first count occurrences of elements equal to element from the list stored at key.
     *
     * @param  mixed  $key
     * @param  mixed  $mem
     * @param  int  $count
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function lrem(mixed $key, mixed $mem, int $count = 0): Relay|int|false {}

    /**
     * Returns the element at index index in the list stored at key.
     *
     * @param  mixed  $key
     * @param  int  $index
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function lindex(mixed $key, int $index): mixed {}

    /**
     * Inserts element in the list stored at key either before or after the reference value pivot.
     *
     * @param  mixed  $key
     * @param  string  $op
     * @param  mixed  $pivot
     * @param  mixed  $element
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function linsert(mixed $key, string $op, mixed $pivot, mixed $element): Relay|int|false {}

    /**
     * Trim an existing list so that it will contain only the specified range of elements specified.
     *
     * @param  mixed  $key
     * @param  int  $start
     * @param  int  $end
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function ltrim(mixed $key, int $start, int $end): Relay|bool {}

    /**
     * Returns the value associated with field in the hash stored at key.
     *
     * @param  mixed  $hash
     * @param  mixed  $member
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function hget(mixed $hash, mixed $member): mixed {}

    /**
     * Returns the string length of the value associated with field in the hash stored at key.
     *
     * @param  mixed  $hash
     * @param  mixed  $member
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function hstrlen(mixed $hash, mixed $member): Relay|int|false {}

    /**
     * Returns all fields and values of the hash stored at key.
     *
     * @param  mixed  $hash
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function hgetall(mixed $hash): Relay|array|false {}

    /**
     * Returns all field names in the hash stored at key.
     *
     * @param  mixed  $hash
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function hkeys(mixed $hash): Relay|array|false {}

    /**
     * Returns all values in the hash stored at key.
     *
     * @param  mixed  $hash
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function hvals(mixed $hash): Relay|array|false {}

    /**
     * Returns the values associated with the specified fields in the hash stored at key.
     *
     * @param  mixed  $hash
     * @param  array  $members
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function hmget(mixed $hash, array $members): Relay|array|false {}

    /**
     * When called with just the key argument, return a random field from the hash value stored at key.
     *
     * @param  mixed  $hash
     * @param  array  $options
     * @return Relay|array|string|false
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function hrandfield(mixed $hash, ?array $options = null): Relay|array|string|false {}

    /**
     * Sets the specified fields to their respective values in the hash stored at key.
     *
     * @param  mixed  $hash
     * @param  array  $members
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function hmset(mixed $hash, array $members): Relay|bool {}

    /**
     * Returns if field is an existing field in the hash stored at key.
     *
     * @param  mixed  $hash
     * @param  mixed  $member
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function hexists(mixed $hash, mixed $member): Relay|bool {}

    /**
     * Sets field in the hash stored at key to value, only if field does not yet exist.
     *
     * @param  mixed  $hash
     * @param  mixed  $member
     * @param  mixed  $value
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function hsetnx(mixed $hash, mixed $member, mixed $value): Relay|bool {}

    /**
     * Sets field in the hash stored at key to value.
     *
     * @param  mixed  $key
     * @param  mixed  $mem
     * @param  mixed  $val
     * @param  mixed  $kvals,...
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function hset(mixed $key, mixed $mem, mixed $val, mixed ...$kvals): Relay|int|false {}

    /**
     * Removes the specified fields from the hash stored at key.
     *
     * @param  mixed  $key
     * @param  mixed  $mem
     * @param  string  $mems,...
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function hdel(mixed $key, mixed $mem, string ...$mems): Relay|int|false {}

    /**
     * Increments the number stored at field in the hash stored at key by increment.
     *
     * @param  mixed  $key
     * @param  mixed  $mem
     * @param  int  $value
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function hincrby(mixed $key, mixed $mem, int $value): Relay|int|false {}

    /**
     * Increment the specified field of a hash stored at key, and representing
     * a floating point number, by the specified increment.
     *
     * @param  mixed  $key
     * @param  mixed  $mem
     * @param  float  $value
     * @return Relay|float|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function hincrbyfloat(mixed $key, mixed $mem, float $value): Relay|float|bool {}

    /**
     * Increments the number stored at key by one.
     *
     * @param  mixed  $key
     * @param  int  $by
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function incr(mixed $key, int $by = 1): Relay|int|false {}

    /**
     * Decrements the number stored at key by one.
     *
     * @param  mixed  $key
     * @param  int  $by
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function decr(mixed $key, int $by = 1): Relay|int|false {}

    /**
     * Increments the number stored at key by increment.
     *
     * @param  mixed  $key
     * @param  int  $value
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function incrby(mixed $key, int $value): Relay|int|false {}

    /**
     * Decrements the number stored at key by decrement.
     *
     * @param  mixed  $key
     * @param  int  $value
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function decrby(mixed $key, int $value): Relay|int|false {}

    /**
     * Increment the string representing a floating point number stored at key by the specified increment.
     *
     * @param  mixed  $key
     * @param  float  $value
     * @return Relay|float|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function incrbyfloat(mixed $key, float $value): Relay|float|false {}

    /**
     * Returns the members of the set resulting from the difference between the first set and all the successive sets.
     *
     * @param  mixed  $key
     * @param  mixed  $other_keys,...
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function sdiff(mixed $key, mixed ...$other_keys): Relay|array|false {}

    /**
     * This command is equal to SDIFF, but instead of returning the resulting set, it is stored in destination.
     * If destination already exists, it is overwritten.
     *
     * @param  mixed  $key
     * @param  mixed  $other_keys,...
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function sdiffstore(mixed $key, mixed ...$other_keys): Relay|int|false {}

    /**
     * Returns the members of the set resulting from the intersection of all the given sets.
     *
     * @param  mixed  $key
     * @param  mixed  $other_keys,...
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function sinter(mixed $key, mixed ...$other_keys): Relay|array|false {}

    /**
     * Intersect multiple sets and return the cardinality of the result.
     *
     * @param  array  $keys
     * @param  int  $limit
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function sintercard(array $keys, int $limit = -1): Relay|int|false {}

    /**
     * This command is equal to SINTER, but instead of returning the resulting set, it is stored in destination.
     * If destination already exists, it is overwritten.
     *
     * @param  mixed  $key
     * @param  mixed  $other_keys,...
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function sinterstore(mixed $key, mixed ...$other_keys): Relay|int|false {}

    /**
     * Returns the members of the set resulting from the union of all the given sets.
     *
     * @param  mixed  $key
     * @param  mixed  $other_keys,...
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function sunion(mixed $key, mixed ...$other_keys): Relay|array|false {}

    /**
     * This command is equal to SUNION, but instead of returning the resulting set, it is stored in destination.
     * If destination already exists, it is overwritten.
     *
     * @param  mixed  $key
     * @param  mixed  $other_keys,...
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function sunionstore(mixed $key, mixed ...$other_keys): Relay|int|false {}

    /**
     * Alters the last access time of a key(s).
     *
     * @param  array|string  $key_or_array
     * @param  mixed  $more_keys,...
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function touch(array|string $key_or_array, mixed ...$more_keys): Relay|int|false {}

    /**
     * A pipeline block is simply transmitted faster to the server (like `MULTI`), but without any guarantee of atomicity.
     *
     * @return Relay|bool
     */
    #[\Relay\Attributes\Local]
    public function pipeline(): Relay|bool {}

    /**
     * Marks the start of a transaction block. Subsequent commands will be queued for atomic execution using EXEC.
     *
     * Accepts `Relay::MULTI` and `Relay::PIPELINE` modes.
     *
     * @param  int  $mode
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function multi(int $mode = 0): Relay|bool {}

    /**
     * Executes all previously queued commands in a transaction and restores the connection state to normal.
     *
     * @return Relay|array|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function exec(): Relay|array|bool {}

    /**
     * Wait for the synchronous replication of all the write
     * commands sent in the context of the current connection.
     *
     * @param  int  $replicas
     * @param  int  $timeout
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function wait(int $replicas, $timeout): Relay|int|false {}

    /**
     * Marks the given keys to be watched for conditional execution of a transaction.
     *
     * @param  mixed  $key
     * @param  mixed  $other_keys,...
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function watch(mixed $key, mixed ...$other_keys): Relay|bool {}

    /**
     * Flushes all the previously watched keys for a transaction.
     * If you call EXEC or DISCARD, there's no need to manually call UNWATCH.
     *
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function unwatch(): Relay|bool {}

    /**
     * Flushes all previously queued commands in a transaction and restores the connection state to normal.
     * If WATCH was used, DISCARD unwatches all keys watched by the connection.
     *
     * @return bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function discard(): bool {}

    /**
     * Get the mode Relay is currently in.
     * `Relay::ATOMIC`, `Relay::PIPELINE` or `Relay::MULTI`.
     *
     * @param  bool  $masked
     * @return int
     */
    #[\Relay\Attributes\Local]
    public function getMode(bool $masked = false): int {}

    /**
     * Clear the accumulated sent and received bytes.
     *
     * @return void
     */
    #[\Relay\Attributes\Local]
    public function clearBytes(): void {}

    /**
     * Scan the keyspace for matching keys.
     *
     * @param  mixed  $iterator
     * @param  mixed  $match
     * @param  int  $count
     * @param  string|null  $type
     * @return array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function scan(mixed &$iterator, mixed $match = null, int $count = 0, ?string $type = null): array|false {}

    /**
     * Iterates fields of Hash types and their associated values.
     *
     * @param  mixed  $key
     * @param  mixed  $iterator
     * @param  mixed  $match
     * @param  int  $count
     * @return array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function hscan(mixed $key, mixed &$iterator, mixed $match = null, int $count = 0): array|false {}

    /**
     * Iterates elements of Sets types.
     *
     * @param  mixed  $key
     * @param  mixed  $iterator
     * @param  mixed  $match
     * @param  int  $count
     * @return array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function sscan(mixed $key, mixed &$iterator, mixed $match = null, int $count = 0): array|false {}

    /**
     * Iterates elements of Sorted Set types and their associated scores.
     *
     * @param  mixed  $key
     * @param  mixed  $iterator
     * @param  mixed  $match
     * @param  int  $count
     * @return array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zscan(mixed $key, mixed &$iterator, mixed $match = null, int $count = 0): array|false {}

    /**
     * Returns all keys matching pattern.
     *
     * @param  mixed  $pattern
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function keys(mixed $pattern): Relay|array|false {}

    /**
     * Interact with the Redis slowlog.
     *
     * @param  string  $operation
     * @param  string  $extra_args,...
     * @return Relay|array|int|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function slowlog(string $operation, string ...$extra_args): Relay|array|int|bool {}

    /**
     * Returns all the members of the set value stored at `$key`.
     *
     * @param  mixed  $set
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function smembers(mixed $set): Relay|array|false {}

    /**
     * Returns if `$member` is a member of the set stored at `$key`.
     *
     * @param  mixed  $set
     * @param  mixed  $member
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function sismember(mixed $set, mixed $member): Relay|bool {}

    /**
     * Returns whether each member is a member of the set stored at `$key`.
     *
     * @param  mixed  $set
     * @param  mixed  $members,...
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function smismember(mixed $set, mixed ...$members): Relay|array|false {}

    /**
     * Remove the specified members from the set stored at `$key`.
     *
     * @param  mixed  $set
     * @param  mixed  $member
     * @param  mixed  $members,...
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function srem(mixed $set, mixed $member, mixed ...$members): Relay|int|false {}

    /**
     * Add the specified members to the set stored at `$key`.
     *
     * @param  mixed  $set
     * @param  mixed  $member
     * @param  mixed  $members,...
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function sadd(mixed $set, mixed $member, mixed ...$members): Relay|int|false {}

    /**
     * Sort the elements in a list, set or sorted set.
     *
     * @param  mixed  $key
     * @param  array  $options
     * @return Relay|array|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function sort(mixed $key, array $options = []): Relay|array|int|false {}

    /**
     * Sort the elements in a list, set or sorted set. Read-only variant of SORT.
     *
     * @param  mixed  $key
     * @param  array  $options
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function sort_ro(mixed $key, array $options = []): Relay|array|false {}

    /**
     * Move member from the set at source to the set at destination.
     *
     * @param  mixed  $srcset
     * @param  mixed  $dstset
     * @param  mixed  $member
     * @return Relay|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function smove(mixed $srcset, mixed $dstset, mixed $member): Relay|bool {}

    /**
     * Removes and returns one or more random members from the set value store at `$key`.
     *
     * @param  mixed  $set
     * @param  int  $count
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function spop(mixed $set, int $count = 1): mixed {}

    /**
     * Returns one or multiple random members from a set.
     *
     * @param  mixed  $set
     * @param  int  $count
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function srandmember(mixed $set, int $count = 1): mixed {}

    /**
     * Returns the set cardinality (number of elements) of the set stored at `$key`.
     *
     * @param  mixed  $key
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function scard(mixed $key): Relay|int|false {}

    /**
     * Execute a script management command.
     *
     * @param  string  $command
     * @param  string  $args,...
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function script(string $command, string ...$args): mixed {}

    /**
     * Returns the length of the string value stored at `$key`.
     *
     * @param  mixed  $key
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function strlen(mixed $key): Relay|int|false {}

    /**
     * Returns the number of fields contained in the hash stored at `$key`.
     *
     * @param  mixed  $key
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function hlen(mixed $key): Relay|int|false {}

    /**
     * Returns the length of the list stored at `$key`.
     *
     * @param  mixed  $key
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function llen(mixed $key): Relay|int|false {}

    /**
     * Acknowledge one or more IDs as having been processed by the consumer group.
     *
     * @param  mixed  $key
     * @param  string  $group
     * @param  array  $ids
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function xack(mixed $key, string $group, array $ids): Relay|int|false {}

    /**
     * Append a message to a stream.
     *
     * @param  string  $key
     * @param  string  $id
     * @param  int  $maxlen
     * @param  bool  $approx
     * @param  bool  $nomkstream
     * @return Relay|string|false
     */
    public function xadd(
        string $key,
        string $id,
        array $values,
        int $maxlen = 0,
        bool $approx = false,
        bool $nomkstream = false
    ): Relay|string|false {}

    /**
     * Claim ownership of stream message(s).
     *
     * @param  string  $key
     * @param  string  $group
     * @param  string  $consumer
     * @param  int  $min_idle
     * @param  array  $ids
     * @param  array  $options
     * @return Relay|array|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function xclaim(
        string $key,
        string $group,
        string $consumer,
        int $min_idle,
        array $ids,
        array $options
    ): Relay|array|bool {}

    /**
     * Automatically take ownership of stream message(s) by metrics
     *
     * @param  string  $key
     * @param  string  $group
     * @param  string  $consumer
     * @param  int  $min_idle
     * @param  string  $start
     * @param  int  $count
     * @param  bool  $justid
     * @return Relay|array|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function xautoclaim(
        string $key,
        string $group,
        string $consumer,
        int $min_idle,
        string $start,
        int $count = -1,
        bool $justid = false
    ): Relay|bool|array {}

    /**
     * Get the length of a stream.
     *
     * @param  string  $key
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function xlen(string $key): Relay|int|false {}

    /**
     * Perform utility operations having to do with consumer groups
     *
     * @param  string  $operation
     * @param  mixed  $key
     * @param  string  $group
     * @param  string  $id_or_consumer
     * @param  bool  $mkstream
     * @param  int  $entries_read
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function xgroup(
        string $operation,
        mixed $key = null,
        string $group = null,
        string $id_or_consumer = null,
        bool $mkstream = false,
        int $entries_read = -2
    ): mixed {}

    /**
     * Remove one or more specific IDs from a stream.
     *
     * @param  string  $key
     * @param  array  $ids
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function xdel(string $key, array $ids): Relay|int|false {}

    /**
     * Retrieve information about a stream key.
     *
     * @param  string  $operation
     * @param  string|null  $arg1
     * @param  string|null  $arg2
     * @param  int  $count
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function xinfo(string $operation, ?string $arg1 = null, ?string $arg2 = null, int $count = -1): mixed {}

    /**
     * Query pending entries in a stream.
     *
     * @param  string  $key
     * @param  string  $group
     * @param  string|null  $start
     * @param  string|null  $end
     * @param  int  $count
     * @param  string|null  $consumer
     * @param  int  $idle
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function xpending(
        string $key,
        string $group,
        ?string $start = null,
        ?string $end = null,
        int $count = -1,
        ?string $consumer = null,
        int $idle = 0
    ): Relay|array|false {}

    /**
     * Lists elements in a stream.
     *
     * @param  mixed  $key
     * @param  string  $start
     * @param  string  $end
     * @param  int  $count = -1
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function xrange(mixed $key, string $start, string $end, int $count = -1): Relay|array|false {}

    /**
     * Get a range of entries from a STREAM ke in reverse chronological order.
     *
     * @param  string  $key
     * @param  string  $end
     * @param  string  $start
     * @param  int  $count
     * @return Relay|array|bool
     */
    #[\Relay\Attributes\RedisCommand]
    public function xrevrange(string $key, string $end, string $start, int $count = -1): Relay|array|bool {}

    /**
     * Read messages from a stream.
     *
     * @param  array  $streams
     * @param  int  $count
     * @param  int  $block
     * @return Relay|array|bool|null
     */
    #[\Relay\Attributes\RedisCommand]
    public function xread(array $streams, int $count = -1, int $block = -1): Relay|array|bool|null {}

    /**
     * Read messages from a stream using a consumer group.
     *
     * @param  string  $group
     * @param  string  $consumer
     * @param  array  $streams
     * @param  int  $count
     * @param  int  $block
     * @return Relay|array|bool|null
     */
    #[\Relay\Attributes\RedisCommand]
    public function xreadgroup(
        string $group,
        string $consumer,
        array $streams,
        int $count = 1,
        int $block = 1
    ): Relay|array|bool|null {}

    /**
     * Truncate a STREAM key in various ways.
     *
     * @param  string  $key
     * @param  string  $threshold
     * @param  bool  $approx
     * @param  bool  $minid
     * @param  int  $limit
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function xtrim(
        string $key,
        string $threshold,
        bool $approx = false,
        bool $minid = false,
        int $limit = -1
    ): Relay|int|false {}

    /**
     * Adds all the specified members with the specified scores to the sorted set stored at key.
     *
     * @param  mixed  $key
     * @param  mixed  $args,...
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function zadd(mixed $key, mixed ...$args): mixed {}

    /**
     * When called with just the key argument, return a random element from the sorted set value stored at key.
     * If the provided count argument is positive, return an array of distinct elements.
     *
     * @param  mixed  $key
     * @param  array|null  $options
     * @return mixed
     */
    #[\Relay\Attributes\RedisCommand]
    public function zrandmember(mixed $key, ?array $options = null): mixed {}

    /**
     * Returns the specified range of elements in the sorted set stored at key.
     *
     * @param  mixed  $key
     * @param  string  $start
     * @param  string  $end
     * @param  mixed  $options
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zrange(mixed $key, string $start, string $end, mixed $options = null): Relay|array|false {}

    /**
     * Returns the specified range of elements in the sorted set stored at key.
     *
     * @param  mixed  $key
     * @param  int  $start
     * @param  int  $end
     * @param  mixed  $options
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zrevrange(mixed $key, int $start, int $end, mixed $options = null): Relay|array|false {}

    /**
     * Returns all the elements in the sorted set at key with a score between
     * min and max (including elements with score equal to min or max).
     *
     * @param  mixed  $key
     * @param  mixed  $start
     * @param  mixed  $end
     * @param  mixed  $options
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zrangebyscore(mixed $key, mixed $start, mixed $end, mixed $options = null): Relay|array|false {}

    /**
     * Returns all the elements in the sorted set at key with a score between
     * max and min (including elements with score equal to max or min).
     *
     * @param  mixed  $key
     * @param  mixed  $start
     * @param  mixed  $end
     * @param  mixed  $options
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zrevrangebyscore(mixed $key, mixed $start, mixed $end, mixed $options = null): Relay|array|false {}

    /**
     * Returns all the elements in the sorted set at key with a score between
     * max and min (including elements with score equal to max or min).
     *
     * @param  mixed  $dst
     * @param  mixed  $src
     * @param  mixed  $start
     * @param  mixed  $end
     * @param  mixed  $options
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zrangestore(mixed $dst, mixed $src, mixed $start, mixed $end, mixed $options = null): Relay|int|false {}

    /**
     * When all the elements in a sorted set are inserted with the same score,
     * in order to force lexicographical ordering, this command returns all
     * the elements in the sorted set at key with a value between min and max.
     *
     * @param  mixed  $key
     * @param  mixed  $min
     * @param  mixed  $max
     * @param  int  $offset
     * @param  int  $count
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zrangebylex(mixed $key, mixed $min, mixed $max, int $offset = -1, int $count = -1): Relay|array|false {}

    /**
     * When all the elements in a sorted set are inserted with the same score,
     * in order to force lexicographical ordering, this command returns all
     * the elements in the sorted set at key with a value between max and min.
     *
     * @param  mixed  $key
     * @param  mixed  $max
     * @param  mixed  $min
     * @param  int  $offset
     * @param  int  $count
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zrevrangebylex(mixed $key, mixed $max, mixed $min, int $offset = -1, int $count = -1): Relay|array|false {}

    /**
     * Returns the rank of member in the sorted set stored at key, with the scores
     * ordered from low to high. The rank (or index) is 0-based, which means
     * that the member with the lowest score has rank 0.
     *
     * @param  mixed  $key
     * @param  mixed  $rank
     * @param  bool  $withscore
     * @return Relay|array|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zrank(mixed $key, mixed $rank, bool $withscore = false): Relay|array|int|false {}

    /**
     * Returns the rank of member in the sorted set stored at key, with the scores
     * ordered from high to low. The rank (or index) is 0-based, which means
     * that the member with the highest score has rank 0.
     *
     * @param  mixed  $key
     * @param  mixed  $rank
     * @param  bool  $withscore
     * @return Relay|array|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zrevrank(mixed $key, mixed $rank, bool $withscore = false): Relay|array|int|false {}

    /**
     * Removes the specified members from the sorted set stored at key.
     * Non existing members are ignored.
     *
     * @param  mixed  $key
     * @param  mixed  $args,...
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zrem(mixed $key, mixed ...$args): Relay|int|false {}

    /**
     * When all the elements in a sorted set are inserted with the same score,
     * in order to force lexicographical ordering, this command removes all
     * elements in the sorted set stored at key between the
     * lexicographical range specified by min and max.
     *
     * @param  mixed  $key
     * @param  mixed  $min
     * @param  mixed  $max
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zremrangebylex(mixed $key, mixed $min, mixed $max): Relay|int|false {}

    /**
     * Removes all elements in the sorted set stored at key with rank between
     * start and stop. Both start and stop are 0 -based indexes with 0 being
     * the element with the lowest score.
     *
     * @param  mixed  $key
     * @param  int  $start
     * @param  int  $end
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zremrangebyrank(mixed $key, int $start, int $end): Relay|int|false {}

    /**
     * Removes all elements in the sorted set stored at key with
     * a score between min and max (inclusive).
     *
     * @param  mixed  $key
     * @param  mixed  $min
     * @param  mixed  $max
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zremrangebyscore(mixed $key, mixed $min, mixed $max): Relay|int|false {}

    /**
     * Returns the sorted set cardinality (number of elements) of the sorted set stored at key.
     *
     * @param  mixed  $key
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached]
    public function zcard(mixed $key): Relay|int|false {}

    /**
     * Returns the number of elements in the sorted set at key with a score between min and max.
     *
     * @param  mixed  $key
     * @param  mixed  $min
     * @param  mixed  $max
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zcount(mixed $key, mixed $min, mixed $max): Relay|int|false {}

    /**
     * This command is similar to ZDIFFSTORE, but instead of storing the
     * resulting sorted set, it is returned to the client.
     *
     * @param  array  $keys
     * @param  array  $options
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zdiff(array $keys, ?array $options = null): Relay|array|false {}

    /**
     * Computes the difference between the first and all successive
     * input sorted sets and stores the result in destination.
     *
     * @param  mixed  $dst
     * @param  array  $keys
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zdiffstore(mixed $dst, array $keys): Relay|int|false {}

    /**
     * Increments the score of member in the sorted set stored at key by increment.
     *
     * @param  mixed  $key
     * @param  float  $score
     * @param  mixed  $mem
     * @return Relay|float|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zincrby(mixed $key, float $score, mixed $mem): Relay|float|false {}

    /**
     * When all the elements in a sorted set are inserted with the same score,
     * in order to force lexicographical ordering, this command returns the
     * number of elements in the sorted set at key with a value between min and max.
     *
     * @param  mixed  $key
     * @param  mixed  $min
     * @param  mixed  $max
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zlexcount(mixed $key, mixed $min, mixed $max): Relay|int|false {}

    /**
     * Returns the scores associated with the specified members in the sorted set stored at key.
     *
     * @param  mixed  $key
     * @param  mixed  $mems,...
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zmscore(mixed $key, mixed ...$mems): Relay|array|false {}

    /**
     * Returns the score of member in the sorted set at key.
     *
     * @param  mixed  $key
     * @param  mixed  $member
     * @return Relay|float|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zscore(mixed $key, mixed $member): Relay|float|false {}

    /**
     * This command is similar to ZINTERSTORE, but instead of storing
     * the resulting sorted set, it is returned to the client.
     *
     * @param  array  $keys
     * @param  array  $weights
     * @param  mixed  $options
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zinter(array $keys, ?array $weights = null, mixed $options = null): Relay|array|false {}

    /**
     * Intersect multiple sorted sets and return the cardinality of the result.
     *
     * @param  array  $keys
     * @param  int  $limit
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zintercard(array $keys, int $limit = -1): Relay|int|false {}

    /**
     * Computes the intersection of numkeys sorted sets given by the
     * specified keys, and stores the result in destination.
     *
     * @param  mixed  $dst
     * @param  array  $keys
     * @param  array  $weights
     * @param  mixed  $options
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zinterstore(mixed $dst, array $keys, ?array $weights = null, mixed $options = null): Relay|int|false {}

    /**
     * This command is similar to ZUNIONSTORE, but instead of storing
     * the resulting sorted set, it is returned to the client.
     *
     * @param  array  $keys
     * @param  array  $weights
     * @param  mixed  $options
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zunion(array $keys, ?array $weights = null, mixed $options = null): Relay|array|false {}

    /**
     * Computes the union of numkeys sorted sets given by the
     * specified keys, and stores the result in destination.
     *
     * @param  mixed  $dst
     * @param  array  $keys
     * @param  array  $weights
     * @param  mixed  $options
     * @return Relay|int|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zunionstore(mixed $dst, array $keys, ?array $weights = null, mixed $options = null): Relay|int|false {}

    /**
     * Removes and returns up to count members with the lowest
     * scores in the sorted set stored at key.
     *
     * @param  mixed  $key
     * @param  int  $count
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zpopmin(mixed $key, int $count = 1): Relay|array|false {}

    /**
     * Removes and returns up to count members with the highest
     * scores in the sorted set stored at key.
     *
     * @param  mixed  $key
     * @param  int  $count
     * @return Relay|array|false
     */
    #[\Relay\Attributes\RedisCommand]
    public function zpopmax(mixed $key, int $count = 1): Relay|array|false {}

    /**
     * Returns keys cached in runtime memory.
     *
     * @internal Temporary debug helper. Do not use.
     * @return mixed
     */
    #[\Relay\Attributes\Local]
    public function _getKeys() {}
}
<?php

// Stub for ext-meminfo: https://github.com/BitOne/php-meminfo

/**
 * @param resource $stream
 *
 * @return void
 */
function meminfo_dump($stream) {}
<?php
/**
 * SQLSRV Extension Stub File.
 *
 * Current through version 3.0.1 (rel March 22, 2012) of Microsoft Drivers for PHP for SQL Server.
 *
 * Documentation taken from {@link http://msdn.microsoft.com/en-us/library/ee229547(v=sql.10).aspx} on Mar 22, 2012.
 * Additional information from using Reflection.
 */

/**
 * Errors generated on the last sqlsrv function call are returned.
 *
 * <br />Used to specify if {@link sqlsrv_errors() sqlsrv_errors} returns errors, warnings, or both.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_ERR_ERRORS', 0);

/**
 * Warnings generated on the last sqlsrv function call are returned.
 *
 * <br />Used to specify if {@link sqlsrv_errors() sqlsrv_errors} returns errors, warnings, or both.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_ERR_WARNINGS', 1);

/**
 * Errors and warnings generated on the last sqlsrv function call are returned.
 *
 * <br />This is the default value.<br />
 *
 * Used to specify if {@link sqlsrv_errors() sqlsrv_errors} returns errors, warnings, or both.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_ERR_ALL', 2);

/**
 * Turns on logging of all subsystems.
 *
 * <br />Used as the value for the LogSubsystems setting with
 * {@link sqlsrv_configure() sqlsrv_configure}.<br />
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_LOG_SYSTEM_ALL', -1);

/**
 * Turns logging off.
 *
 * <br />Used as the value for the LogSubsystems setting with  {@link sqlsrv_configure() sqlsrv_configure}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_LOG_SYSTEM_OFF', 0);

/**
 * Turns on logging of initialization activity.
 *
 * <br />Used as the value for the LogSubsystems setting with {@link sqlsrv_configure() sqlsrv_configure}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_LOG_SYSTEM_INIT', 1);

/**
 * Turns on logging of connection activity.
 *
 * <br />Used as the value for the LogSubsystems setting with {@link sqlsrv_configure() sqlsrv_configure}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_LOG_SYSTEM_CONN', 2);

/**
 * Turns on logging of statement activity.
 *
 * <br />Used as the value for the LogSubsystems setting with {@link sqlsrv_configure() sqlsrv_configure}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_LOG_SYSTEM_STMT', 4);

/**
 * Turns on logging of error functions activity (such as handle_error and handle_warning).
 *
 * <br />Used as the value for the
 * LogSubsystems setting with {@link sqlsrv_configure() sqlsrv_configure}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_LOG_SYSTEM_UTIL', 8);

/**
 * Specifies that errors, warnings, and notices will be logged.
 *
 * <br />Used as the value for the LogSeverity setting with {@link sqlsrv_configure() sqlsrv_configure}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_LOG_SEVERITY_ALL', -1);

/**
 * Specifies that errors will be logged.
 *
 * <br />Used as the value for the LogSeverity setting with {@link sqlsrv_configure() sqlsrv_configure}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_LOG_SEVERITY_ERROR', 1);

/**
 * Specifies that notices will be logged.
 *
 * <br />Used as the value for the LogSeverity setting with {@link sqlsrv_configure() sqlsrv_configure}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_LOG_SEVERITY_NOTICE', 4);

/**
 * Specifies that warnings will be logged.
 *
 * <br />Used as the value for the LogSeverity setting with {@link sqlsrv_configure() sqlsrv_configure}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_LOG_SEVERITY_WARNING', 2);

/**
 * Returns numerically indexed array.
 *
 * <br />{@link sqlsrv_fetch_array() sqlsrv_fetch_array} returns the next row of data as a numerically indexed array.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_FETCH_NUMERIC', 1);

/**
 * Returns an associative array.
 *
 * <br />{@link sqlsrv_fetch_array() sqlsrv_fetch_array} returns the next row of data as an associative array.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_FETCH_ASSOC', 2);

/**
 * Returns both a numeric and associative array.
 *
 * <br />{@link sqlsrv_fetch_array() sqlsrv_fetch_array} returns the next row of data as an array with both numeric and
 * associative keys.<br />
 *
 * This is the default value.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_FETCH_BOTH', 3);

/**
 * Null
 *
 * <br />Used with {@link sqlsrv_prepare() sqlsrv_prepare},
 * {@link sqlsrv_query() sqlsrv_query}
 * and {@link sqlsrv_get_field() sqlsrv_get_field} to request a field be return as a specific PHP type.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_PHPTYPE_NULL', 1);

/**
 * Integer
 *
 * <br />Used with {@link sqlsrv_prepare() sqlsrv_prepare},
 * {@link sqlsrv_query() sqlsrv_query}
 * and {@link sqlsrv_get_field() sqlsrv_get_field} to request a field be return as a specific PHP type.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_PHPTYPE_INT', 2);

/**
 * Float
 *
 * <br />Used with {@link sqlsrv_prepare() sqlsrv_prepare},
 * {@link sqlsrv_query() sqlsrv_query}
 * and {@link sqlsrv_get_field() sqlsrv_get_field} to request a field be return as a specific PHP type.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_PHPTYPE_FLOAT', 3);

/**
 * Datetime
 *
 * <br />Used with {@link sqlsrv_prepare() sqlsrv_prepare},
 * {@link sqlsrv_query() sqlsrv_query}
 * and {@link sqlsrv_get_field() sqlsrv_get_field} to request a field be return as a specific PHP type.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_PHPTYPE_DATETIME', 4);

/**
 * Binary Encoding
 *
 * <br />Data is returned as a raw byte stream from the server without performing encoding or translation.<br />
 *
 * Used with {@link sqlsrv_prepare() sqlsrv_prepare},
 * {@link sqlsrv_query() sqlsrv_query}
 * and {@link sqlsrv_get_field() sqlsrv_get_field} to request a field be return as a specific PHP type.<br />
 *
 * This is used with {@link SQLSRV_PHPTYPE_STREAM() SQLSRV_PHPTYPE_STREAM} and
 * {@link SQLSRV_PHPTYPE_STRING() SQLSRV_PHPTYPE_STRING} to specify the encoding of those PHP types types.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_ENC_BINARY', 'binary');

/**
 * Character Encoding
 *
 * <br />Data is returned in 8-bit characters as specified in the code page of the Windows locale that is set on the
 * system. Any multi-byte characters or characters that do not map into this code page are substituted with a single
 * byte question mark (?) character.<br />
 *
 * This is the default encoding.<br />
 *
 * Used with {@link sqlsrv_prepare() sqlsrv_prepare},
 * {@link sqlsrv_query() sqlsrv_query}
 * and {@link sqlsrv_get_field() sqlsrv_get_field} to request a field be return as a specific PHP type.<br />
 *
 * This is used with {@link SQLSRV_PHPTYPE_STREAM() SQLSRV_PHPTYPE_STREAM} and
 * {@link SQLSRV_PHPTYPE_STRING() SQLSRV_PHPTYPE_STRING} to specify the encoding of those PHP types types.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_ENC_CHAR', 'char');

/**
 * The column is not nullable.
 *
 * <br />You can compare the value of the Nullable key that is returned by
 * {@link sqlsrv_field_metadata() sqlsrv_field_metadata} to determine the column's nullable status.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_NULLABLE_NO', 0);

/**
 * The column is nullable.
 *
 * <br />You can compare the value of the Nullable key that is returned by
 * {@link sqlsrv_field_metadata() sqlsrv_field_metadata} to determine the column's nullable status.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_NULLABLE_YES', 1);

/**
 * It is not known if the column is nullable.
 *
 * <br />You can compare the value of the Nullable key that is returned by
 * {@link sqlsrv_field_metadata() sqlsrv_field_metadata} to determine the column's nullable status.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_NULLABLE_UNKNOWN', 2);

/**
 * bigint.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_BIGINT', -5);
/**
 * bit.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_BIT', -7);
/**
 * char.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_CHAR', 1);
/**
 * datetime.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_DATETIME', 25177693);
/**
 * decimal.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_DECIMAL', 3);
/**
 * float.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_FLOAT', 6);
/**
 * image.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_IMAGE', -4);
/**
 * int.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_INT', 4);
/**
 * money.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_MONEY', 33564163);
/**
 * nchar.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_NCHAR', -8);
/**
 * ntext.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_NTEXT', -10);
/**
 * numeric.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_NUMERIC', 2);
/**
 * nvarchar.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_NVARCHAR', -9);
/**
 * text.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_TEXT', -1);
/**
 * real.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_REAL', 7);
/**
 * smalldatetime.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_SMALLDATETIME', 8285);
/**
 * smallint.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_SMALLINT', 5);
/**
 * smallmoney.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_SMALLMONEY', 33559555);
/**
 * timestamp.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_TIMESTAMP', 4606);
/**
 * tinyint.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_TINYINT', -6);
/**
 * udt.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_UDT', -151);
/**
 * uniqueidentifier.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_UNIQUEIDENTIFIER', -11);
/**
 * varbinary.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_VARBINARY', -3);
/**
 * varchar.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_VARCHAR', 12);
/**
 * xml.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_XML', -152);
/**
 * date.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_DATE', 5211);
/**
 * time.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_TIME', 58728806);
/**
 * datetimeoffset.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_DATETIMEOFFSET', 58738021);
/**
 * datetime2.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the SQL Server data type of a parameter.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SQLTYPE_DATETIME2', 58734173);

/**
 * Indicates an input parameter.
 *
 * <br />Used for specifying parameter direction when you call {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_PARAM_IN', 1);

/**
 * Indicates a bidirectional parameter.
 *
 * <br />Used for specifying parameter direction when you call {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_PARAM_INOUT', 2);

/**
 * Indicates an output parameter.
 *
 * <br />Used for specifying parameter direction when you call {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_PARAM_OUT', 4);

/**
 * Read Uncommitted.
 *
 * <br />Specifies that statements can read rows that have been modified by other transactions but not yet committed.<br />
 *
 * Transactions running at the READ UNCOMMITTED level do not issue shared locks to prevent other transactions from
 * modifying data read by the current transaction. READ UNCOMMITTED transactions are also not blocked by exclusive locks
 * that would prevent the current transaction from reading rows that have been modified but not committed by other
 * transactions. When this option is set, it is possible to read uncommitted modifications, which are called dirty reads.
 * Values in the data can be changed and rows can appear or disappear in the data set before the end of the transaction.
 * This option has the same effect as setting NOLOCK on all tables in all SELECT statements in a transaction. This is
 * the least restrictive of the isolation levels.<br />
 *
 * Used with the TransactionIsolation key when calling {@link sqlsrv_connect() sqlsrv_connect}. For information on using
 * these constants, see {@link http://msdn.microsoft.com/en-us/library/ms173763(v=sql.110).aspx SET TRANSACTION ISOLATION LEVEL (Transact-SQL)}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_TXN_READ_UNCOMMITTED', 1);
/**
 * Read Committed.
 *
 * <br />Specifies that statements cannot read data that has been modified but not committed by other transactions.
 * This prevents dirty reads. Data can be changed by other transactions between individual statements within the current
 * transaction, resulting in nonrepeatable reads or phantom data. This option is the SQL Server default.<br />
 *
 * The behavior of READ COMMITTED depends on the setting of the READ_COMMITTED_SNAPSHOT database option.<br />
 *
 * Used with the TransactionIsolation key when calling {@link sqlsrv_connect() sqlsrv_connect}. For information on using
 * these constants, see {@link http://msdn.microsoft.com/en-us/library/ms173763(v=sql.110).aspx SET TRANSACTION ISOLATION LEVEL (Transact-SQL)}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_TXN_READ_COMMITTED', 2);
/**
 * Repeatable Read.
 *
 * <br />Specifies that statements cannot read data that has been modified but not yet committed by other transactions and
 * that no other transactions can modify data that has been read by the current transaction until the current transaction
 * completes.<br />
 *
 * Shared locks are placed on all data read by each statement in the transaction and are held until the transaction
 * completes. This prevents other transactions from modifying any rows that have been read by the current transaction.
 * Other transactions can insert new rows that match the search conditions of statements issued by the current transaction.
 * If the current transaction then retries the statement it will retrieve the new rows, which results in phantom reads.
 * Because shared locks are held to the end of a transaction instead of being released at the end of each statement,
 * concurrency is lower than the default READ COMMITTED isolation level.<br />
 *
 * Use this option only when necessary.<br />
 *
 * Used with the TransactionIsolation key when calling {@link sqlsrv_connect() sqlsrv_connect}. For information on using
 * these constants, see {@link http://msdn.microsoft.com/en-us/library/ms173763(v=sql.110).aspx SET TRANSACTION ISOLATION LEVEL (Transact-SQL)}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_TXN_REPEATABLE_READ', 4);
/**
 * Serializable.
 *
 * <br />Specifies the following:
 * <ul><li>Statements cannot read data that has been modified but not yet committed by other transactions.</li>
 * <li>No other transactions can modify data that has been read by the current transaction until the current
 * transaction completes.</li>
 * <li>Other transactions cannot insert new rows with key values that would fall in the range of keys read by any
 * statements in the current transaction until the current transaction completes.</li></ul>
 *
 * Range locks are placed in the range of key values that match the search conditions of each statement executed in a
 * transaction. This blocks other transactions from updating or inserting any rows that would qualify for any of the
 * statements executed by the current transaction. This means that if any of the statements in a transaction are
 * executed a second time, they will read the same set of rows. The range locks are held until the transaction completes.
 * This is the most restrictive of the isolation levels because it locks entire ranges of keys and holds the locks until
 * the transaction completes. Because concurrency is lower, use this option only when necessary. This option has the same
 * effect as setting HOLDLOCK on all tables in all SELECT statements in a transaction.<br />
 *
 * Used with the TransactionIsolation key when calling {@link sqlsrv_connect() sqlsrv_connect}. For information on using
 * these constants, see {@link http://msdn.microsoft.com/en-us/library/ms173763(v=sql.110).aspx SET TRANSACTION ISOLATION LEVEL (Transact-SQL)}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_TXN_SERIALIZABLE', 8);
/**
 * Snapshot.
 *
 * <br />Specifies that data read by any statement in a transaction will be the transactionally consistent version of
 * the data that existed at the start of the transaction. The transaction can only recognize data modifications that
 * were committed before the start of the transaction. Data modifications made by other transactions after the start of
 * the current transaction are not visible to statements executing in the current transaction. The effect is as if the
 * statements in a transaction get a snapshot of the committed data as it existed at the start of the transaction.<br />
 *
 * Except when a database is being recovered, SNAPSHOT transactions do not request locks when reading data. SNAPSHOT
 * transactions reading data do not block other transactions from writing data. Transactions writing data do not block
 * SNAPSHOT transactions from reading data.<br />
 *
 * During the roll-back phase of a database recovery, SNAPSHOT transactions will request a lock if an attempt is made to
 * read data that is locked by another transaction that is being rolled back. The SNAPSHOT transaction is blocked until
 * that transaction has been rolled back. The lock is released immediately after it has been granted.<br />
 *
 * The ALLOW_SNAPSHOT_ISOLATION database option must be set to ON before you can start a transaction that uses the
 * SNAPSHOT isolation level. If a transaction using the SNAPSHOT isolation level accesses data in multiple databases,
 * ALLOW_SNAPSHOT_ISOLATION must be set to ON in each database.<br />
 *
 * A transaction cannot be set to SNAPSHOT isolation level that started with another isolation level; doing so will
 * cause the transaction to abort. If a transaction starts in the SNAPSHOT isolation level, you can change it to another
 * isolation level and then back to SNAPSHOT. A transaction starts the first time it accesses data.<br />
 *
 * A transaction running under SNAPSHOT isolation level can view changes made by that transaction. For example, if the
 * transaction performs an UPDATE on a table and then issues a SELECT statement against the same table, the modified
 * data will be included in the result set.<br />
 *
 * Used with the TransactionIsolation key when calling {@link sqlsrv_connect() sqlsrv_connect}. For information on using
 * these constants, see {@link http://msdn.microsoft.com/en-us/library/ms173763(v=sql.110).aspx SET TRANSACTION ISOLATION LEVEL (Transact-SQL)}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_TXN_SNAPSHOT', 32);

/**
 * Specifies the next row.
 *
 * <br />This is the default value, if you do not specify the row parameter for a scrollable result set.<br />
 *
 * Used with {@link sqlsrv_fetch() sqlsrv_fetch},
 * {@link sqlsrv_fetch_array() sqlsrv_fetch_array},
 * or {@link sqlsrv_fetch_object() sqlsrv_fetch_object} to specify a row.<br />
 *
 * Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify which row to select in the result set. For
 * information on using these constants, see
 * {@link http://msdn.microsoft.com/en-us/library/ee376927.aspx Specifying a Cursor Type and Selecting Rows}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SCROLL_NEXT', 1);
/**
 * Specifies the row before the current row.
 *
 * <br />Used with {@link sqlsrv_fetch() sqlsrv_fetch},
 * {@link sqlsrv_fetch_array() sqlsrv_fetch_array},
 * or {@link sqlsrv_fetch_object() sqlsrv_fetch_object} to specify a row.<br />
 *
 * Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify which row to select in the result set. For
 * information on using these constants, see
 * {@link http://msdn.microsoft.com/en-us/library/ee376927.aspx Specifying a Cursor Type and Selecting Rows}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SCROLL_PRIOR', 4);
/**
 * Specifies the first row in the result set.
 *
 * <br />Used with {@link sqlsrv_fetch() sqlsrv_fetch},
 * {@link sqlsrv_fetch_array() sqlsrv_fetch_array},
 * or {@link sqlsrv_fetch_object() sqlsrv_fetch_object} to specify a row.<br />
 *
 * Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify which row to select in the result set. For
 * information on using these constants, see
 * {@link http://msdn.microsoft.com/en-us/library/ee376927.aspx Specifying a Cursor Type and Selecting Rows}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SCROLL_FIRST', 2);
/**
 * Specifies the last row in the result set.
 *
 * <br />Used with {@link sqlsrv_fetch() sqlsrv_fetch},
 * {@link sqlsrv_fetch_array() sqlsrv_fetch_array},
 * or {@link sqlsrv_fetch_object() sqlsrv_fetch_object} to specify a row.<br />
 *
 * Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify which row to select in the result set. For
 * information on using these constants, see
 * {@link http://msdn.microsoft.com/en-us/library/ee376927.aspx Specifying a Cursor Type and Selecting Rows}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SCROLL_LAST', 3);
/**
 * Specifies the row specified with the offset parameter.
 *
 * <br />Used with {@link sqlsrv_fetch() sqlsrv_fetch},
 * {@link sqlsrv_fetch_array() sqlsrv_fetch_array},
 * or {@link sqlsrv_fetch_object() sqlsrv_fetch_object} to specify a row.<br />
 *
 * Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify which row to select in the result set. For
 * information on using these constants, see
 * {@link http://msdn.microsoft.com/en-us/library/ee376927.aspx Specifying a Cursor Type and Selecting Rows}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SCROLL_ABSOLUTE', 5);
/**
 * Specifies the row specified with the offset parameter from the current row.
 *
 * <br />Used with {@link sqlsrv_fetch() sqlsrv_fetch},
 * {@link sqlsrv_fetch_array() sqlsrv_fetch_array},
 * or {@link sqlsrv_fetch_object() sqlsrv_fetch_object} to specify a row.<br />
 *
 * Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify which row to select in the result set. For
 * information on using these constants, see
 * {@link http://msdn.microsoft.com/en-us/library/ee376927.aspx Specifying a Cursor Type and Selecting Rows}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_SCROLL_RELATIVE', 6);

/**
 * Lets you move one row at a time starting at the first row of the result set until you reach the end of
 * the result set.
 *
 * <br />This is the default cursor type.<br />
 *
 * {@link sqlsrv_num_rows() sqlsrv_num_rows} returns an error for result sets created with this cursor type.<br />
 *
 * Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the kind of cursor that you can use in a result
 * set. For information on using these constants, see
 * {@link http://msdn.microsoft.com/en-us/library/ee376927.aspx Specifying a Cursor Type and Selecting Rows}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_CURSOR_FORWARD', 'forward');
/**
 * Lets you access rows in any order but will not reflect changes in the database.
 *
 * <br />Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the kind of cursor that you can use in a result
 * set. For information on using these constants, see
 * {@link http://msdn.microsoft.com/en-us/library/ee376927.aspx Specifying a Cursor Type and Selecting Rows}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_CURSOR_STATIC', 'static');
/**
 * Lets you access rows in any order and will reflect changes in the database.
 *
 * <br />{@link sqlsrv_num_rows() sqlsrv_num_rows} returns an error for result sets created with this cursor type.<br />
 *
 * Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the kind of cursor that you can use in a result
 * set. For information on using these constants, see
 * {@link http://msdn.microsoft.com/en-us/library/ee376927.aspx Specifying a Cursor Type and Selecting Rows}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_CURSOR_DYNAMIC', 'dynamic');
/**
 * Lets you access rows in any order.
 *
 * <br />However, a keyset cursor does not update the row count if a row is deleted from the table (a deleted row is
 * returned with no values).<br />
 *
 * Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the kind of cursor that you can use in a result
 * set. For information on using these constants, see
 * {@link http://msdn.microsoft.com/en-us/library/ee376927.aspx Specifying a Cursor Type and Selecting Rows}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_CURSOR_KEYSET', 'keyset');
/**
 * Lets you access rows in any order.
 *
 * <br />Creates a client-side cursor query.<br />
 *
 * Used when calling {@link sqlsrv_query() sqlsrv_query} or
 *{@link sqlsrv_prepare() sqlsrv_prepare} to specify the kind of cursor that you can use in a result
 * set. For information on using these constants, see
 * {@link http://msdn.microsoft.com/en-us/library/ee376927.aspx Specifying a Cursor Type and Selecting Rows}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 */
define('SQLSRV_CURSOR_CLIENT_BUFFERED', 'buffered');

/**
 * Creates and opens a connection.
 *
 * <br />Creates a connection resource and opens a connection. By default, the connection is attempted using Windows
 * Authentication.<br />
 *
 * If values for the UID and PWD keys are not specified in the optional $connectionInfo parameter, the connection will
 * be attempted using Windows Authentication. For more information about connecting to the server,
 * see {@link http://msdn.microsoft.com/en-us/library/cc296205.aspx How to: Connect Using Windows Authentication}
 * and {@link http://msdn.microsoft.com/en-us/library/cc296182.aspx How to: Connect Using SQL Server Authentication.}<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/sqlsrv-connect
 * @param string $server_name A string specifying the name of the server to which a connection is being established.
 * An instance name (for example, "myServer\instanceName") or port number (for example, "myServer, 1521") can be
 * included as part of this string. For a complete description of the options available for this parameter, see the
 * Server keyword in the ODBC Driver Connection String Keywords section
 * of {@link http://go.microsoft.com/fwlink/?LinkId=105504 Using Connection String Keywords with SQL Native Client}.<br />
 *
 * Beginning in version 3.0 of the Microsoft Drivers for PHP for SQL Server, you can also specify a LocalDB instance
 * with "(localdb)\instancename". For more information,
 * see {@link http://msdn.microsoft.com/en-us/library/hh487161.aspx PHP Driver for SQL Server Support for LocalDB} .<br />
 *
 * Also beginning in version 3.0 of the Microsoft Drivers for PHP for SQL Server, you can specify a virtual network name,
 * to connect to an AlwaysOn availability group. For more information about Microsoft Drivers for PHP for SQL Server
 * support for AlwaysOn Availability Groups,
 * see {@link http://msdn.microsoft.com/en-us/library/hh487159.aspx PHP Driver for SQL Server Support for High Availability, Disaster Recovery}.
 * @param array $connection_info [optional] An associative array that contains connection attributes (for example, array("Database" => "AdventureWorks")).
 * See {@link http://msdn.microsoft.com/en-us/library/ff628167.aspx Connection Options} for a list of the supported keys for the array.
 * @return resource|false A PHP connection resource. If a connection cannot be successfully created and opened, false is returned.
 */
function sqlsrv_connect($server_name, $connection_info = []) {}

/**
 * Closes a connection. Frees all resources associated with the connection.
 *
 * <br />Null is a valid parameter for this function. This allows the function to be called multiple times in a script. For
 * example, if you close a connection in an error condition and close it again at the end of the script, the second call
 * to sqlsrv_close will return true because the first call to sqlsrv_close (in the error condition) sets the connection
 * resource to null.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/sqlsrv-close
 * @param resource|null $conn The connection to be closed.
 * @return bool The Boolean value true unless the function is called with an invalid parameter. If the function is called with an invalid parameter, false is returned.
 */
function sqlsrv_close($conn) {}

/**
 * Commits a transaction that was begun with sqlsrv_begin_transaction.
 *
 * <br />Commits the current transaction on the specified connection and returns the connection to the auto-commit mode.
 * The current transaction includes all statements on the specified connection that were executed after the call to
 * sqlsrv_begin_transaction and before any calls to sqlsrv_rollback or sqlsrv_commit.<br />
 *
 * The Microsoft Drivers for PHP for SQL Server is in auto-commit mode by default. This means that all queries are
 * automatically committed upon success unless they have been designated as part of an explicit transaction by using
 * sqlsrv_begin_transaction.<br />
 *
 * If sqlsrv_commit is called on a connection that is not in an active transaction and that was initiated with
 * sqlsrv_begin_transaction, the call returns false and a Not in Transaction error is added to the error collection.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/sqlsrv-commit
 * @param resource $conn The connection on which the transaction is active.
 * @return bool A Boolean value: true if the transaction was successfully committed. Otherwise, false.
 */
function sqlsrv_commit($conn) {}

/**
 * Begins a database transaction.
 *
 * <br />Begins a transaction on a specified connection. The current transaction includes all statements on the specified
 * connection that were executed after the call to sqlsrv_begin_transaction and before any calls to sqlsrv_rollback or
 * sqlsrv_commit.<br />
 *
 * The Microsoft Drivers for PHP for SQL Server is in auto-commit mode by default. This means that all queries are
 * automatically committed upon success unless they have been designated as part of an explicit transaction by using
 * sqlsrv_begin_transaction.<br />
 *
 * If sqlsrv_begin_transaction is called after a transaction has already been initiated on the connection but not
 * completed by calling either sqlsrv_commit or sqlsrv_rollback, the call returns false and an Already in Transaction
 * error is added to the error collection.<br />
 *
 * Do not use embedded Transact-SQL to perform transactions. For example, do not execute a statement with
 * "BEGIN TRANSACTION" as the Transact-SQL query to begin a transaction. The expected transactional behavior cannot be
 * guaranteed when using embedded Transact-SQL to perform transactions.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296206.aspx How to Perform Transactions}
 * and {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/sqlsrv-begin-transaction
 * @param resource $conn The connection with which the transaction is associated.
 * @return bool A Boolean value: true if the transaction was successfully begun. Otherwise, false.
 */
function sqlsrv_begin_transaction($conn) {}

/**
 * Rolls back a transaction that was begun with {@see sqlsrv_begin_transaction}.
 *
 * <br />Rolls back the current transaction on the specified connection and returns the connection to the auto-commit mode.
 * The current transaction includes all statements on the specified connection that were executed after the call to
 * sqlsrv_begin_transaction and before any calls to {@link sqlsrv_rollback() sqlsrv_rollback} or
 * {@link sqlsrv_commit() sqlsrv_commit}.<br />
 *
 * The Microsoft Drivers for PHP for SQL Server is in auto-commit mode by default. This means that all queries are
 * automatically committed upon success unless they have been designated as part of an explicit transaction by using
 * {@link sqlsrv_begin_transaction() sqlsrv_begin_transaction}.<br />
 *
 * If sqlsrv_rollback is called on a connection that is not in an active transaction that was initiated with
 * {@link sqlsrv_begin_transaction() sqlsrv_begin_transaction}, the call returns false and a Not in Transaction error
 * is added to the error collection.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296206.aspx How to Perform Transactions}
 * and {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/sqlsrv-rollback
 * @param resource $conn The connection on which the transaction is active.
 * @return bool A Boolean value: true if the transaction was successfully rolled back. Otherwise, false.
 */
function sqlsrv_rollback($conn) {}

/**
 * Returns error and/or warning information about the last operation.
 *
 * <br />Returns extended error and/or warning information about the last sqlsrv operation performed. <br />
 *
 * The sqlsrv_errors function can return error and/or warning information by calling it with one of the parameter values
 * specified in the Parameters section below. <br />
 *
 * By default, warnings generated on a call to any sqlsrv function are treated as errors; if a warning occurs on a call
 * to a sqlsrv function, the function returns false. However, warnings that correspond to SQLSTATE values 01000, 01001,
 * 01003, and 01S02 are never treated as errors. <br />
 *
 * The following line of code turns off the behavior mentioned above; a warning generated by a call to a sqlsrv function
 * does not cause the function to return false: <br />
 *
 * <code>{@link sqlsrv_configure() sqlsrv_configure}("WarningsReturnAsErrors", 0);</code>
 *
 * The following line of code reinstates the default behavior; warnings (with exceptions, noted above) are treated as
 * errors: <br />
 *
 * <code>{@link sqlsrv_configure() sqlsrv_configure}("WarningsReturnAsErrors", 1);</code>
 *
 * Regardless of the setting, warnings can only be retrieved by calling sqlsrv_errors with either the SQLSRV_ERR_ALL or
 * SQLSRV_ERR_WARNINGS parameter value (see Parameters section below for details). <br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/sqlsrv-errors
 * @param int $errorsAndOrWarnings [optional] A predefined constant. This parameter can take one of the values in the
 * following list: SQLSRV_ERR_ALL, SQLSRV_ERR_ERRORS, SQLSRV_ERR_WARNINGS. If no parameter value is supplied, both
 * errors and warnings generated by the last sqlsrv function call are returned.
 * @return array|null An array of arrays, or null. Each array in the returned array contains three key-value pairs. The
 * following table lists each key and its description: <br />
 * SQLSTATE:
 * <ul>
 * <li> For errors that originate from the ODBC driver, the SQLSTATE returned by ODBC.For information about SQLSTATE
 * values for ODBC, see {@link http://go.microsoft.com/fwlink/?linkid=119618 ODBC Error Codes}.</li>
 * <li> For errors that originate from the Microsoft Drivers for PHP for SQL Server, a SQLSTATE of IMSSP.</li>
 * <li> For warnings that originate from the Microsoft Drivers for PHP for SQL Server, a SQLSTATE of 01SSP.</li>
 * </ul>
 * code:
 * <ul>
 * <li>For errors that originate from SQL Server, the native SQL Server error code.</li>
 * <li>For errors that originate from the ODBC driver, the error code returned by ODBC.</li>
 * <li>For errors that originate from the Microsoft Drivers for PHP for SQL Server, the Microsoft Drivers for PHP for SQL Server error code. For more information, see {@link http://msdn.microsoft.com/en-us/library/cc626302.aspx Handling Errors and Warnings}.</li>
 * </ul>
 * message: A description of the error.<br />
 *
 * The array values can also be accessed with numeric keys 0, 1, and 2.<br /><br />
 *
 * If no errors or warnings occur, null is returned.<br />
 */
function sqlsrv_errors($errorsAndOrWarnings = SQLSRV_ERR_ALL) {}

/**
 * Changes the driver error handling and logging configurations.
 *
 * <br />Changes the settings for error handling and logging options.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/sqlsrv-configure
 * @param string $setting The name of the setting to be configured. See table below for list of settings.
 * @param mixed $value The value to be applied to the setting specified in the $setting parameter. The possible values for this parameter depend on which setting is specified. The following table lists the possible combinations.<br />
 * ClientBufferMaxKBSize (Default: 10240)<br />
 * For more information about client-side queries, see {@link http://msdn.microsoft.com/en-us/library/hh487160.aspx Cursor Types (SQLSRV Driver)}.
 * <ul>
 * <li>A non negative number up to the PHP memory limit.</li>
 * <li>Zero (0) means no limit to the buffer size.</li>
 * </ul>
 * LogSeverity (Default: SQLSRV_LOG_SEVERITY_ERROR )<br />
 * For more information about logging activity, see {@link http://msdn.microsoft.com/en-us/library/cc296188.aspx Logging Activity}.
 * <ul><li>SQLSRV_LOG_SEVERITY_ALL (-1)</li>
 * <li>SQLSRV_LOG_SEVERITY_ERROR (1)</li>
 * <li> SQLSRV_LOG_SEVERITY_NOTICE (4)</li>
 * <li>SQLSRV_LOG_SEVERITY_WARNING (2)</li></ul>
 * WarningsReturnAsErrors (Default: true )<br />
 * For more information about configuring error and warning handling, see {@link http://msdn.microsoft.com/en-us/library/cc626306.aspx How to: Configure Error and Warning Handling Using the SQLSRV Driver}.
 * <ul><li>true (1)</li>
 * <li>false (0)</li></ul>
 * @return bool If sqlsrv_configure is called with an unsupported setting or value, the function returns false. Otherwise, the function returns true.
 */
function sqlsrv_configure($setting, $value) {}

/**
 * Returns the current value of the specified configuration setting.
 *
 * <br />If false is returned by sqlsrv_get_config, you must call {@link sqlsrv_errors() sqlsrv_errors} to determine if an error occurred or
 * if false is the value of the setting specified by the $setting parameter.<br />
 *
 * For a list of configurable settings, see {@link sqlsrv_configure() sqlsrv_configure}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/sqlsrv-get-config
 * @param string $setting The configuration setting for which the value is returned.
 * @return mixed|false The value of the setting specified by the $setting parameter. If an invalid setting is specified, false is returned and an error is added to the error collection.
 */
function sqlsrv_get_config($setting) {}

/**
 * Prepares a Transact-SQL query without executing it. Implicitly binds parameters.
 *
 * <br />Creates a statement resource associated with the specified connection. This function is useful for execution of
 * multiple queries.<br />
 *
 * Variables passed as query parameters should be passed by reference instead of by value. For example, pass
 * &$myVariable instead of $myVariable. A PHP warning will be raised when a query with by-value parameters is
 * executed.<br />
 *
 * When you prepare a statement that uses variables as parameters, the variables are bound to the statement. That means
 * that if you update the values of the variables, the next time you execute the statement it will run with updated
 * parameter values.<br />
 *
 * The combination of sqlsrv_prepare and {@link sqlsrv_execute() sqlsrv_execute} separates statement preparation and
 * statement execution in to two function calls and can be used to execute parameterized queries. This function is ideal
 * to execute a statement multiple times with different parameter values for each execution.<br />
 *
 * For alternative strategies for writing and reading large amounts of information, see
 * {@link http://go.microsoft.com/fwlink/?LinkId=104225 Batches of SQL Statements} and
 * {@link http://go.microsoft.com/fwlink/?LinkId=104226 BULK INSERT}.<br />
 *
 * For more information, see
 * {@link http://msdn.microsoft.com/en-us/library/cc626303.aspx How to: Retrieve Output Parameters Using the SQLSRV Driver.}<br />
 *
 * For additional Information see:
 * <ul><li>{@link http://msdn.microsoft.com/en-us/library/cc644934.aspx Using Directional Parameters}</li>
 * <li>{@link http://msdn.microsoft.com/en-us/library/cc296202.aspx Updating Data (Microsoft Drivers for PHP for SQL Server)}</li>
 * <li>{@link http://msdn.microsoft.com/en-us/library/cc296201.aspx How to: Perform Parameterized Queries}</li>
 * <li>{@link http://msdn.microsoft.com/en-us/library/cc296191.aspx How to: Send Data as a Stream}</li>
 * <li>{@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}</li></ul>
 * @link https://docs.microsoft.com/en-us/sql/connect/php/sqlsrv-prepare
 * @param resource $conn The connection resource associated with the created statement.
 * @param string $tsql The Transact-SQL expression that corresponds to the created statement.
 * @param array $params [optional]: An array of values that correspond to parameters in a parameterized query. Each
 * element of the array can be one of the following: a literal value, a reference to a PHP variable, or an array with
 * the following structure:
 * <code>array(&$value [, $direction [, $phpType [, $sqlType]]])</code>
 * The following table describes these array elements:
 * <ul><li>&$value - A literal value or a reference to a PHP variable.</li>
 * <li>$direction[optional] - One of the following SQLSRV_PARAM_* constants used to indicate the parameter direction:
 * SQLSRV_PARAM_IN, SQLSRV_PARAM_OUT, SQLSRV_PARAM_INOUT. The default value is SQLSRV_PARAM_IN. For more information
 * about PHP constants, see
 * {@link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server Constants (Microsoft Drivers for PHP for SQL Server)}.</li>
 * <li>$phpType[optional] - A SQLSRV_PHPTYPE_* constant that specifies PHP data type of the returned value.</li>
 * <li>$sqlType[optional] - A SQLSRV_SQLTYPE_* constant that specifies the SQL Server data type of the input value.</li></ul>
 * @param array $options [optional]: An associative array that sets query properties. The table below lists the
 * supported keys and corresponding values:<br />
 *
 * QueryTimeout (int) - Sets the query timeout in seconds. By default, the driver will wait indefinitely for results.
 * Any positive integer value.<br />
 *
 * SendStreamParamsAtExec (bool) - Configures the driver to send all stream data at execution (true), or to send stream
 * data in chunks (false). By default, the value is set to true. For more information, see
 * {@link sqlsrv_send_stream_data() sqlsrv_send_stream_data}.<br />
 *
 * Scrollable - For more information about these values, see
 * {@link http://msdn.microsoft.com/en-us/library/ee376927.aspx Specifying a Cursor Type and Selecting Rows}.
 * <ul><li>SQLSRV_CURSOR_FORWARD</li>
 * <li>SQLSRV_CURSOR_STATIC</li>
 * <li>SQLSRV_CURSOR_DYNAMIC</li>
 * <li>SQLSRV_CURSOR_KEYSET</li>
 * <li>SQLSRV_CURSOR_CLIENT_BUFFERED</li></ul>
 * @return resource|false A statement resource. If the statement resource cannot be created, false is returned.
 */
function sqlsrv_prepare($conn, $tsql, $params = [], $options = []) {}

/**
 * Executes a statement prepared with {@see sqlsrv_prepare}
 *
 * <br />Executes a previously prepared statement. See {@link sqlsrv_prepare() sqlsrv_prepare} for information on preparing a statement
 * for execution.<br />
 *
 * This function is ideal for executing a prepared statement multiple times with different parameter values.<br />
 *
 * For additional Information see:
 * <ul><li>{@link sqlsrv_query() sqlsrv_query}</li>
 * <li>{@link http://msdn.microsoft.com/en-us/library/cc296201.aspx How to: Perform Parameterized Queries}</li>
 * <li>{@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}</li></ul>
 * @link https://docs.microsoft.com/en-us/sql/connect/php/sqlsrv-execute
 * @param resource $stmt A resource specifying the statement to be executed. For more information about how to create a
 * statement resource, see {@link sqlsrv_prepare() sqlsrv_prepare}.
 * @return bool A Boolean value: true if the statement was successfully executed. Otherwise, false.
 */
function sqlsrv_execute($stmt) {}

/**
 * Prepares and executes a Transact-SQL query.
 *
 * <br />Prepares and executes a statement.<br />
 *
 * The sqlsrv_query function is well-suited for one-time queries and should be the default choice to execute queries
 * unless special circumstances apply. This function provides a streamlined method to execute a query with a minimum
 * amount of code. The sqlsrv_query function does both statement preparation and statement execution, and can be used to
 * execute parameterized queries.<br />
 *
 * For more information, see
 * {@link http://msdn.microsoft.com/en-us/library/cc626303.aspx How to: Retrieve Output Parameters Using the SQLSRV Driver.}<br />
 *
 * For additional Information see:
 * <ul><li>{@link http://msdn.microsoft.com/en-us/library/cc644934.aspx Using Directional Parameters}</li>
 * <li>{@link http://msdn.microsoft.com/en-us/library/cc296202.aspx Updating Data (Microsoft Drivers for PHP for SQL Server)}</li>
 * <li>{@link http://msdn.microsoft.com/en-us/library/cc296201.aspx How to: Perform Parameterized Queries}</li>
 * <li>{@link http://msdn.microsoft.com/en-us/library/cc296191.aspx How to: Send Data as a Stream}</li>
 * <li>{@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}</li></ul>
 * @link https://docs.microsoft.com/en-us/sql/connect/php/sqlsrv-query
 * @param resource $conn The connection resource associated with the prepared statement.
 * @param string $tsql The Transact-SQL expression that corresponds to the prepared statement.
 * @param array $params [optional]: An array of values that correspond to parameters in a parameterized query. Each
 * element of the array can be one of the following: a literal value, a reference to a PHP variable, or an array with
 * the following structure:
 * <code>array($value [, $direction [, $phpType [, $sqlType]]])</code>
 * The following table describes these array elements:
 * <ul><li>&$value - A literal value, a PHP variable, or a PHP by-reference variable.</li>
 * <li>$direction[optional] - One of the following SQLSRV_PARAM_* constants used to indicate the parameter direction:
 * SQLSRV_PARAM_IN, SQLSRV_PARAM_OUT, SQLSRV_PARAM_INOUT. The default value is SQLSRV_PARAM_IN. For more information
 * about PHP constants, see
 * {@link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server Constants (Microsoft Drivers for PHP for SQL Server)}.</li>
 * <li>$phpType[optional] - A SQLSRV_PHPTYPE_* constant that specifies PHP data type of the returned value.</li>
 * <li>$sqlType[optional] - A SQLSRV_SQLTYPE_* constant that specifies the SQL Server data type of the input value.</li></ul>
 * @param array $options [optional]: An associative array that sets query properties. The table below lists the
 * supported keys and corresponding values:<br />
 *
 * QueryTimeout (int) - Sets the query timeout in seconds. By default, the driver will wait indefinitely for results.
 * Any positive integer value.<br />
 *
 * SendStreamParamsAtExec (bool) - Configures the driver to send all stream data at execution (true), or to send stream
 * data in chunks (false). By default, the value is set to true. For more information, see
 * {@link sqlsrv_send_stream_data() sqlsrv_send_stream_data}.<br />
 *
 * Scrollable - For more information about these values, see
 * {@link http://msdn.microsoft.com/en-us/library/ee376927.aspx Specifying a Cursor Type and Selecting Rows}.
 * <ul><li>SQLSRV_CURSOR_FORWARD</li>
 * <li>SQLSRV_CURSOR_STATIC</li>
 * <li>SQLSRV_CURSOR_DYNAMIC</li>
 * <li>SQLSRV_CURSOR_KEYSET</li>
 * <li>SQLSRV_CURSOR_CLIENT_BUFFERED</li></ul>
 * @return resource|false A statement resource. If the statement cannot be created and/or executed, false is returned.
 */
function sqlsrv_query($conn, $tsql, $params = [], $options = []) {}

/**
 * Makes the next row in a result set available for reading.
 *
 * <br />Makes the next row of a result set available for reading. Use {@link sqlsrv_get_field() sqlsrv_get_field} to read fields of
 * the row.<br />
 *
 * A statement must be executed before results can be retrieved. For information on executing a statement, see {@link sqlsrv_query() sqlsrv_query}
 * and {@link sqlsrv_execute() sqlsrv_execute}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 * @link https://docs.microsoft.com/en-us/sql/connect/php/sqlsrv-fetch
 * @param resource|null $stmt A statement resource corresponding to an executed statement.
 * @param int|null $row [optional]: One of the following values, specifying the row to access in a result set that uses a
 * scrollable cursor: SQLSRV_SCROLL_NEXT, SQLSRV_SCROLL_PRIOR, SQLSRV_SCROLL_FIRST, SQLSRV_SCROLL_LAST,
 * SQLSRV_SCROLL_ABSOLUTE, SQLSRV_SCROLL_RELATIVE. <br />
 *
 * For more information on these values, see
 * {@link http://msdn.microsoft.com/en-us/library/ee376927.aspx Specifying a Cursor Type and Selecting Rows}.
 * @param int|null $offset [optional] Used with SQLSRV_SCROLL_ABSOLUTE and SQLSRV_SCROLL_RELATIVE to specify the row to
 * retrieve. The first record in the result set is 0.
 * @return bool|null If the next row of the result set was successfully retrieved, true is returned. If there are
 * no more results in the result set, null is returned. If an error occurred, false is returned.
 */
function sqlsrv_fetch($stmt, $row = null, $offset = null) {}

/**
 * Retrieves a field in the current row by index. The PHP return type can be specified.
 *
 * <br />Retrieves data from the specified field of the current row. Field data must be accessed in order. For example,
 * data from the first field cannot be accessed after data from the second field has been accessed.<br />
 *
 * The combination of {@link sqlsrv_fetch() sqlsrv_fetch} and
 * {@link sqlsrv_get_field() sqlsrv_get_field} provides forward-only access to data.<br />
 *
 * The combination of {@link sqlsrv_fetch() sqlsrv_fetch} and
 * {@link sqlsrv_get_field() sqlsrv_get_field} loads only one
 * field of a result set row into script memory and allows PHP return type specification. (For information about how to
 * specify the PHP return type, see {@link http://msdn.microsoft.com/en-us/library/cc296208.aspx How to: Specify PHP Data Types}.)
 * This combination of functions also allows data to be retrieved as a stream. (For information about retrieving data
 * as a stream, see {@link http://msdn.microsoft.com/en-us/library/cc296155.aspx Retrieving Data as a Stream Using the SQLSRV Driver}.)<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/sqlsrv-get-field
 * @param resource $stmt A statement resource corresponding to an executed statement.
 * @param int $field_index The index of the field to be retrieved. Indexes begin at zero.
 * @param int $get_as_type [optional] A SQLSRV constant (SQLSRV_PHPTYPE_*) that determines the PHP data type for the returned
 * data. For information about supported data types, see
 * {@link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server Constants (Microsoft Drivers for PHP for SQL Server)}.
 * If no return type is specified, a default PHP type will be returned. For information about default PHP types, see
 * {@link http://msdn.microsoft.com/en-us/library/cc296193.aspx Default PHP Data Types}. For information about
 * specifying PHP data types, see {@link http://msdn.microsoft.com/en-us/library/cc296208.aspx How to: Specify PHP Data Types}.
 * @return mixed The field data. You can specify the PHP data type of the returned data by using the $getAsType
 * parameter. If no return data type is specified, the default PHP data type will be returned. For information about
 * default PHP types, see {@link http://msdn.microsoft.com/en-us/library/cc296193.aspx Default PHP Data Types}. For
 * information about specifying PHP data types,
 * see {@link http://msdn.microsoft.com/en-us/library/cc296208.aspx How to: Specify PHP Data Types}.
 */
function sqlsrv_get_field($stmt, $field_index, $get_as_type = null) {}

/**
 * Retrieves the next row of data as a numerically indexed array, an associative array, or both.
 *
 * <br />If a column with no name is returned, the associative key for the array element will be an empty string (""). For
 * example, consider this Transact-SQL statement that inserts a value into a database table and retrieves the
 * server-generated primary key:
 * <code>  INSERT INTO Production.ProductPhoto (LargePhoto) VALUES (?);
 * SELECT SCOPE_IDENTITY()</code>
 * If the result set returned by the SELECT SCOPE_IDENTITY() portion of this statement is retrieved as an associative
 * array, the key for the returned value will be an empty string ("") because the returned column has no name. To avoid
 * this, you can retrieve the result as a numeric array, or you can specify a name for the returned column in the
 * Transact-SQL statement. The following is one way to specify a column name in Transact-SQL:
 * <code>SELECT SCOPE_IDENTITY() AS PictureID</code>
 * If a result set contains multiple columns without names, the value of the last unnamed column will be assigned to the
 * empty string ("") key.<br />
 *
 * The sqlsrv_fetch_array function always returns data according to the
 * {@link http://msdn.microsoft.com/en-us/library/cc296193.aspx Default PHP Data Types}. For information about
 * how to specify the PHP data type,
 * see {@link http://msdn.microsoft.com/en-us/library/cc296208.aspx How to: Specify PHP Data Types}.<br />
 *
 * If a field with no name is retrieved, the associative key for the array element will be an empty string (""). For
 * more information, see {@link sqlsrv_fetch_array() sqlsrv_fetch_array}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296160.aspx Retrieving Data} and
 * {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/sqlsrv-fetch-array
 * @param resource|null $stmt A statement resource corresponding to an executed statement.
 * @param int $fetch_type [optional] A predefined constant. This parameter can take on one of the values listed in the
 * following table:
 * <ul><li>SQLSRV_FETCH_NUMERIC - The next row of data is returned as a numeric array.</li>
 * <li>SQLSRV_FETCH_ASSOC - The next row of data is returned as an associative array. The array keys are the column
 * names in the result set.</li>
 * <li>SQLSRV_FETCH_BOTH - The next row of data is returned as both a numeric array and an associative array. This is
 * the default value. </li></ul>
 * @param int|null $row [optional]: One of the following values, specifying the row to access in a result set that uses a
 * scrollable cursor: SQLSRV_SCROLL_NEXT, SQLSRV_SCROLL_PRIOR, SQLSRV_SCROLL_FIRST, SQLSRV_SCROLL_LAST,
 * SQLSRV_SCROLL_ABSOLUTE, SQLSRV_SCROLL_RELATIVE. <br />
 *
 * For more information on these values, see
 * {@link http://msdn.microsoft.com/en-us/library/ee376927.aspx Specifying a Cursor Type and Selecting Rows}.
 * @param int|null $offset [optional] Used with SQLSRV_SCROLL_ABSOLUTE and SQLSRV_SCROLL_RELATIVE to specify the row to
 * retrieve. The first record in the result set is 0.
 * @return array|null|false If a row of data is retrieved, an array is returned. If there are no more rows to retrieve, null is returned. If an error occurs, false is returned.
 */
function sqlsrv_fetch_array($stmt, $fetch_type = null, $row = null, $offset = null) {}

/**
 * Retrieves the next row of data as an object.
 *
 * <br />Retrieves the next row of data as a PHP object.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296160.aspx Retrieving Data} and
 * {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/sqlsrv-fetch-object
 * @param resource $stmt A statement resource corresponding to an executed statement.
 * @param string|null $class_name [optional] A string specifying the name of the class to instantiate. If a value for the
 * $className parameter is not specified, an instance of the PHP {@link stdClass} is instantiated.
 * @param array|null $ctor_params [optional]  An array that contains values passed to the constructor of the class
 * specified with the $className parameter. If the constructor of the specified class accepts parameter values, the
 * $ctorParams parameter must be used when calling sqlsrv_fetch_object.
 * @param int|null $row [optional] One of the following values, specifying the row to access in a result set that uses a
 * scrollable cursor: SQLSRV_SCROLL_NEXT, SQLSRV_SCROLL_PRIOR, SQLSRV_SCROLL_FIRST, SQLSRV_SCROLL_LAST,
 * SQLSRV_SCROLL_ABSOLUTE, SQLSRV_SCROLL_RELATIVE. <br />
 *
 * For more information on these values, see
 * {@link http://msdn.microsoft.com/en-us/library/ee376927.aspx Specifying a Cursor Type and Selecting Rows}.
 * @param int|null $offset [optional] Used with SQLSRV_SCROLL_ABSOLUTE and SQLSRV_SCROLL_RELATIVE to specify the row to
 * retrieve. The first record in the result set is 0.
 * @return object|false|null A PHP object with properties that correspond to result set field names. Property values are
 * populated with the corresponding result set field values. If the class specified with the optional $className
 * parameter does not exist or if there is no active result set associated with the specified statement, false is
 * returned. If there are no more rows to retrieve, null is returned.<br /><br />
 *
 * The data type of a value in the returned object will be the default PHP data type. For information on default PHP data
 * types, see {@link http://msdn.microsoft.com/en-us/library/cc296193.aspx Default PHP Data Types}.<br />
 */
function sqlsrv_fetch_object($stmt, $class_name = null, $ctor_params = null, $row = null, $offset = null) {}

/**
 * Detects if a result set has one or more rows.
 *
 * <br />Indicates if the result set has one or more rows.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/sqlsrv-has-rows
 * @param resource $stmt The executed statement.
 * @return bool If there are rows in the result set, the return value will be true. If there are no rows, or if the
 * function call fails, the return value will be false.
 */
function sqlsrv_has_rows($stmt) {}

/**
 * Retrieves the number of fields (columns) on a statemen.
 *
 * <br />Retrieves the number of fields in an active result set. Note that sqlsrv_num_fields can be called on any
 * prepared statement, before or after execution.<br />
 *
 * Additional Information at {@link sqlsrv_field_metadata() sqlsrv_field_metadata} and
 * {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/sqlsrv-num-fields
 * @param resource $stmt The statement on which the targeted result set is active.
 * @return int|false An integer value that represents the number of fields in the active result set. If an error occurs,
 * the Boolean value false is returned.
 */
function sqlsrv_num_fields($stmt) {}

/**
 * Makes the next result of the specified statement active.
 *
 * <br />Makes the next result (result set, row count, or output parameter) of the specified statement active.<br />
 *
 * The first (or only) result returned by a batch query or stored procedure is active without a call to sqlsrv_next_result.<br />
 *
 * Additional Information at
 * {@link http://msdn.microsoft.com/en-us/library/cc296202.aspx Updating Data (Microsoft Drivers for PHP for SQL Server)} and
 * {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/sqlsrv-next-result
 * @param resource $stmt The executed statement on which the next result is made active.
 * @return bool|null If the next result was successfully made active, the Boolean value true is returned. If an error occurred in
 * making the next result active, false is returned. If no more results are available, null is returned.
 */
function sqlsrv_next_result($stmt) {}

/**
 * Retrieves the number of rows in a result set.
 *
 * <br />sqlsrv_num_rows requires a client-side, static, or keyset cursor, and will return false if you use a forward cursor
 * or a dynamic cursor. (A forward cursor is the default.) For more information about cursors, see
 * {@link sqlsrv_prepare() sqlsrv_prepare},
 * {@link sqlsrv_query() sqlsrv_query} and
 * {@link http://msdn.microsoft.com/en-us/library/hh487160.aspx Cursor Types (SQLSRV Driver)}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/sqlsrv-num-rows
 * @param resource $stmt The result set for which to count the rows.
 * @return int|false False if there was an error calculating the number of rows. Otherwise, returns the number of rows in the result set.
 */
function sqlsrv_num_rows($stmt) {}

/**
 * Returns the number of modified rows.
 *
 * <br />Returns the number of rows modified by the last statement executed. This function does not return the number of
 * rows returned by a SELECT statement.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/sqlsrv-rows-affected
 * @param resource $stmt A statement resource corresponding to an executed statement.
 * @return int|false An integer indicating the number of rows modified by the last executed statement. If no rows were
 * modified, zero (0) is returned. If no information about the number of modified rows is available, negative one (-1)
 * is returned. If an error occurred in retrieving the number of modified rows, false is returned.
 */
function sqlsrv_rows_affected($stmt) {}

/**
 * Provides information about the client.
 *
 * <br />Returns information about the connection and client stack.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/sqlsrv-client-info
 * @param resource $conn The connection resource by which the client is connected.
 * @return array|false An associative array with keys described in the table below, or false if the connection resource
 * is null.<br />
 * <ul><li>DriverDllName - SQLNCLI10.DLL (Microsoft Drivers for PHP for SQL Server version 2.0)</li>
 * <li>DriverODBCVer - ODBC version (xx.yy)</li>
 * <li>DriverVer - SQL Server Native Client DLL version: 10.50.xxx (Microsoft Drivers for PHP for SQL Server version 2.0)</li>
 * <li>ExtensionVer - php_sqlsrv.dll version: 2.0.xxxx.x(Microsoft Drivers for PHP for SQL Server version 2.0)</li></ul>
 */
function sqlsrv_client_info($conn) {}

/**
 * Returns information about the server.
 *
 * <br />Returns information about the server. A connection must be established before calling this function.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/sqlsrv-server-info
 * @param resource $conn The connection resource by which the client and server are connected.
 * @return array An associative array with the following keys:
 * <ul><li>CurrentDatabase -  The database currently being targeted.</li>
 * <li>SQLServerVersion - The version of SQL Server.</li>
 * <li>SQLServerName - The name of the server.</li></ul>
 */
function sqlsrv_server_info($conn) {}

/**
 * Cancels a statement; discards any pending results for the statement.
 *
 * <br />Cancels a statement. This means that any pending results for the statement are discarded. After this function
 * is called, the statement can be re-executed if it was prepared with {@link sqlsrv_prepare() sqlsrv_prepare}. Calling
 * this function is not necessary if all the results associated with the statement have been consumed.<br />
 *
 * A statement that is prepared and executed using the combination of {@link sqlsrv_prepare() sqlsrv_prepare} and
 * {@link sqlsrv_execute() sqlsrv_execute} can be re-executed
 * with {@link sqlsrv_execute() sqlsrv_execute} after calling sqlsrv_cancel. A statement that is executed with
 * {@link sqlsrv_query() sqlsrv_query} cannot be re-executed after calling sqlsrv_cancel.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/sqlsrv-cancel
 * @param resource $stmt The statement to be canceled.
 * @return bool A Boolean value: true if the operation was successful. Otherwise, false.
 */
function sqlsrv_cancel($stmt) {}

/**
 * Closes a statement. Frees all resources associated with the statement.
 *
 * <br />Frees all resources associated with the specified statement. The statement cannot be used again after this function
 * has been called.<br />
 *
 * Null is a valid parameter for this function. This allows the function to be called multiple times in a script. For
 * example, if you free a statement in an error condition and free it again at the end of the script, the second call to
 * sqlsrv_free_stmt will return true because the first call to sqlsrv_free_stmt (in the error condition) sets the
 * statement resource to null.<br />
 *
 * Additional Information at {@link sqlsrv_cancel() sqlsrv_cancel} and
 * {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/sqlsrv-free-stmt
 * @param resource|null $stmt The statement to be closed.
 * @return bool The Boolean value true unless the function is called with an invalid parameter. If the function is
 * called with an invalid parameter, false is returned.
 */
function sqlsrv_free_stmt($stmt) {}

/**
 * Returns field metadata.
 *
 * <br />Retrieves metadata for the fields of a prepared statement. For information about preparing a statement,
 * see {@link sqlsrv_query() sqlsrv_query}
 * or {@link sqlsrv_prepare() sqlsrv_prepare}. Note that sqlsrv_field_metadata can be called on any prepared statement,
 * pre- or post-execution.<br />
 *
 * Additional Information at {@link sqlsrv_cancel() sqlsrv_cancel} and
 * {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/sqlsrv-field-metadata
 * @param resource $stmt A statement resource for which field metadata is sought.
 * @return array|false An array of arrays or false. The array consists of one array for each field in the result set.
 * Each sub-array has keys as described in the table below. If there is an error in retrieving field metadata, false is
 * returned.
 * <ul><li>Name - Name of the column to which the field corresponds.</li>
 * <li>Type - Numeric value that corresponds to a SQL type.</li>
 * <li>Size - Number of characters for fields of character type (char(n), varchar(n), nchar(n), nvarchar(n), XML).
 * Number of bytes for fields of binary type (binary(n), varbinary(n), UDT). NULL for other SQL Server data types.</li>
 * <li>Precision - The precision for types of variable precision (real, numeric, decimal, datetime2, datetimeoffset, and
 * time). NULL for other SQL Server data types.</li>
 * <li>Scale - The scale for types of variable scale (numeric, decimal, datetime2, datetimeoffset, and time). NULL for other
 * SQL Server data types.</li>
 * <li>Nullable - An enumerated value indicating whether the column is nullable (SQLSRV_NULLABLE_YES), the column is not
 * nullable (SQLSRV_NULLABLE_NO), or it is not known if the column is nullable (SQLSRV_NULLABLE_UNKNOWN).</li></ul>
 * See the {@link http://msdn.microsoft.com/en-us/library/cc296197.aspx function documentation} for more information on
 * the keys for each sub-array.
 */
function sqlsrv_field_metadata($stmt) {}

/**
 * Sends up to eight kilobytes (8 KB) of data to the server with each call to the function.
 *
 * <br />Sends data from parameter streams to the server. Up to eight kilobytes (8K) of data is sent with each call to
 * sqlsrv_send_stream_data.<br />
 *
 * By default, all stream data is sent to the server when a query is executed. If this default behavior is not changed,
 * you do not have to use sqlsrv_send_stream_data to send stream data to the server. For information about changing the
 * default behavior, see the Parameters section of {@link sqlsrv_query() sqlsrv_query}
 * or {@link sqlsrv_prepare() sqlsrv_prepare}.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/sqlsrv-send-stream-data
 * @param resource $stmt A statement resource corresponding to an executed statement.
 * @return bool Boolean : true if there is more data to be sent. Otherwise, false.
 */
function sqlsrv_send_stream_data($stmt) {}

/**
 * Specifies the encoding of a stream of data from the server.
 *
 * <br />When specifying the PHP data type of a value being returned from the server, this allows you to specify the encoding
 * used to process the value if the value is a stream.<br />
 *
 * In the documentation this is presented as a constant that accepts an arguement.<br />
 *
 * When you use SQLSRV_PHPTYPE_STREAM, the encoding must be specified. If no parameter is supplied, an error will be
 * returned.<br />
 *
 * Additional Information at:
 * <ul>
 * <li>{@link http://msdn.microsoft.com/en-us/library/cc296208.aspx How to: Specify PHP Data Types}</li>
 * <li>{@link http://msdn.microsoft.com/en-us/library/cc296163.aspx How to: Retrieve Character Data as a Stream Using the SQLSRV Driver.}</li>
 * <li>{@link http://msdn.microsoft.com/en-us/library/cc626307.aspx How to: Send and Retrieve UTF-8 Data Using Built-In UTF-8 Support.}</li>
 * <li>{@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}</li>
 * </ul>
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 *
 * @param string $encoding The encoding to use for the stream. The valid options are SQLSRV_ENC_BINARY, SQLSRV_ENC_CHAR
 * or "UTF-8".
 *
 * @return int Value to use in any place that accepts a SQLSRV_PHPTYPE_* constant to represent a PHP stream with the
 * given encoding.
 */
function SQLSRV_PHPTYPE_STREAM($encoding) {}

/**
 * Specifies the encoding of a string being received form the server.
 *
 * <br />When specifying the PHP data type of a value being returned from the server, this allows you to specify the
 * encoding used to process the value if the value is a string.<br />
 *
 * In the documentation this is presented as a constant that accepts an arguement.<br />
 *
 * When you use SQLSRV_PHPTYPE_STRING, the encoding must be specified. If no parameter is supplied, an error will be
 * returned.<br />
 *
 * Additional Information at:
 * <ul>
 * <li>{@link http://msdn.microsoft.com/en-us/library/cc296208.aspx How to: Specify PHP Data Types}</li>
 * <li>{@link http://msdn.microsoft.com/en-us/library/cc296163.aspx How to: Retrieve Character Data as a Stream Using the SQLSRV Driver.}</li>
 * <li>{@link http://msdn.microsoft.com/en-us/library/cc626307.aspx How to: Send and Retrieve UTF-8 Data Using Built-In UTF-8 Support.}</li>
 * <li>{@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}</li>
 * </ul>
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 *
 * @param string $encoding The encoding to use for the stream. The valid options are SQLSRV_ENC_BINARY, SQLSRV_ENC_CHAR
 * or "UTF-8".
 *
 * @return int Value to use in any place that accepts a SQLSRV_PHPTYPE_* constant to represent a PHP string with the
 * given encoding.
 */
function SQLSRV_PHPTYPE_STRING($encoding) {}

/**
 * Specifies a SQL Server binary field.
 *
 * <br />In the documentation this is presented as a constant that accepts an arguement.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 * @param int $byteCount Must be between 1 and 8000.
 * @return int Value to use in any place that accepts a SQLSRV_SQLTYPE_* constant to represent the 'binary' data type.
 */
function SQLSRV_SQLTYPE_BINARY($byteCount) {}

/**
 * Specifies a SQL Server varbinary field.
 *
 * <br />In the documentation this is presented as a constant that accepts an arguement.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 * @param int|string $byteCount Must be between 1 and 8000 or 'max'.
 * @return int Value to use in any place that accepts a SQLSRV_SQLTYPE_* constant to represent the varbinary data type.
 */
function SQLSRV_SQLTYPE_VARBINARY($byteCount) {}

/**
 * Specifies a SQL Server varchar filed.
 *
 * <br />In the documentation this is presented as a constant that accepts an arguement.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 *
 * @param int|string $charCount Must be between 1 and 8000 or 'max'.
 *
 * @return int Value to use in any place that accepts a SQLSRV_SQLTYPE_* constant to represent the varchar data type.
 */
function SQLSRV_SQLTYPE_VARCHAR($charCount) {}

/**
 * Specifies a SQL Server char field.
 *
 * <br />In the documentation this is presented as a constant that accepts an arguement.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 * @param int $charCount Must be between 1 and 8000.
 * @return int Value to use in any place that accepts a SQLSRV_SQLTYPE_* constant to represent the char data type.
 */
function SQLSRV_SQLTYPE_CHAR($charCount) {}

/**
 * Specifies a SQL Server nchar field.
 *
 * <br />In the documentation this is presented as a constant that accepts an arguement.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 * @param int $charCount Must be between 1 and 4000.
 * @return int Value to use in any place that accepts a SQLSRV_SQLTYPE_* constant to represent the nchar data type.
 */
function SQLSRV_SQLTYPE_NCHAR($charCount) {}

/**
 * Specifies a SQL Server nvarchar field.
 *
 * <br />In the documentation this is presented as a constant that accepts an arguement.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 * @param int|string $charCount Must be between 1 and 4000 or 'max'.
 * @return int Value to use in any place that accepts a SQLSRV_SQLTYPE_* constant to represent the nvarchar data type.
 */
function SQLSRV_SQLTYPE_NVARCHAR($charCount) {}

/**
 * Specifies a SQL Server decimal field.
 *
 * <br />In the documentation this is presented as a constant that accepts an arguement.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 * @param int $precision Must be between 1 and 38.
 * @param int $scale Must be between 1 and $precision.
 * @return int Value to use in any place that accepts a SQLSRV_SQLTYPE_* constant to represent the decimal data type.
 */
function SQLSRV_SQLTYPE_DECIMAL($precision, $scale) {}

/**
 * Specifies a SQL Server numeric field.
 *
 * <br />In the documentation this is presented as a constant that accepts an arguement.<br />
 *
 * Additional Information at {@link http://msdn.microsoft.com/en-us/library/cc296152.aspx SQLSRV Driver API Reference}<br />
 *
 * @link https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server
 * @param int $precision Must be between 1 and 38.
 * @param int $scale Must be between 1 and $precision.
 * @return int Value to use in any place that accepts a SQLSRV_SQLTYPE_* constant to represent the numeric data type.
 */
function SQLSRV_SQLTYPE_NUMERIC($precision, $scale) {}
<?php
/**
 * Copyright 2013-2016 Aerospike, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * @category   Database
 * @author     Ronen Botzer <rbotzer@aerospike.com>
 * @copyright  Copyright 2013-2016 Aerospike, Inc.
 * @license    http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2
 * @link       https://github.com/aerospike/aerospike-client-php/blob/master/doc/README.md#handling-unsupported-types
 * @filesource
 */

namespace Aerospike;

/**
 * \Aerospike\Bytes is a utility for wrapping PHP strings containing
 * potentially harmful bytes such as \0. By wrapping the binary-string, the
 * Aerospike client will serialize the data into an as_bytes rather than an
 * as_string.
 * This ensures that the string will not get truncated or otherwise lose data.
 * The main difference is that strings in the Aerospike cluster can have a
 * secondary index built over them, and queries executed against the index,
 * while bytes data cannot.
 *
 * @package    Aerospike
 * @author     Ronen Botzer <rbotzer@aerospike.com>
 */
class Bytes implements \Serializable
{
    /**
     * The container for the binary-string
     * @var string
     */
    public $s;

    /**
     * Constructor for \Aerospike\Bytes class.
     *
     * @param string $bin_str a PHP binary-string such as gzdeflate() produces.
     */
    public function __construct($bin_str) {
        $this->s = $bin_str;
    }

    /**
     * Returns a serialized representation of the binary-string.
     * Called by serialize()
     *
     * @return string
     */
    public function serialize() {
        return $this->s;
    }

    /**
     * Re-wraps the binary-string when called by unserialize().
     *
     * @param string $bin_str a PHP binary-string. Called by unserialize().
     * @return string
     */
    public function unserialize($bin_str) {
        return $this->s = $bin_str;
    }

    /**
     * Returns the binary-string held in the \Aerospike\Bytes object.
     *
     * @return string
     */
    public function __toString() {
        return $this->s;
    }

    /**
     * Unwraps an \Aerospike\Bytes object, returning the binary-string inside.
     *
     * @param \Aerospike\Bytes $bytes_wrap
     * @return string
     */
    public static function unwrap(Bytes $bytes_wrap) {
        return $bytes_wrap->s;
    }
}
<?php
/**
 * Copyright 2013-2017 Aerospike, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * @category   Database
 * @package    Aerospike
 * @author     Robert Marks <robert@aerospike.com>
 * @copyright  Copyright 2013-2018 Aerospike, Inc.
 * @license    http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2
 * @link       https://www.aerospike.com/docs/client/php/
 * @filesource
 */

use JetBrains\PhpStorm\Deprecated;

/**
 * The Aerospike client class
 *
 * The Aerospike config options for `php.ini`:
 * ```php
 * // The connection timeout in milliseconds.
 * aerospike.connect_timeout = 1000;
 * // The read operation timeout in milliseconds.
 * aerospike.read_timeout = 1000;
 * // The write operation timeout in milliseconds.
 * aerospike.write_timeout = 1000;
 * // Whether to send and store the record's (ns,set,key) data along with
 * // its (unique identifier) digest. 0: digest, 1: send
 * aerospike.key_policy = 0; // only digest
 * // The unsupported type handler. 0: none, 1: PHP, 2: user-defined
 * aerospike.serializer = 1; // php serializer

 * // Path to the user-defined Lua function modules.
 * aerospike.udf.lua_user_path = /usr/local/aerospike/usr-lua;
 * // Indicates if shared memory should be used for cluster tending.
 * // Recommended for multi-process cases such as FPM. { true, false }
 * aerospike.shm.use = false;
 * // Explicitly sets the shm key for this client to store shared-memory
 * // cluster tending results in.
 * aerospike.shm.key = 0xA8000000; // integer value
 * // Shared memory maximum number of server nodes allowed. Leave a cushion so
 * // new nodes can be added without needing a client restart.
 * aerospike.shm.max_nodes = 16;
 * // Shared memory maximum number of namespaces allowed. Leave a cushion for
 * // new namespaces.
 * aerospike.shm.max_namespaces = 8;
 * // Take over shared memory cluster tending if the cluster hasn't been tended
 * // by this threshold in seconds.
 * aerospike.shm.takeover_threshold_sec = 30;
 * // Control the batch protocol. 0: batch-index, 1: batch-direct
 * aerospike.use_batch_direct = 0;
 * // The client will compress records larger than this value in bytes for transport.
 * aerospike.compression_threshold = 0;
 * // Max size of the synchronous connection pool for each server node
 * aerospike.max_threads = 300;
 * // Number of threads stored in underlying thread pool that is used in
 * // batch/scan/query commands. In ZTS builds, this is always 0.
 * aerospike.thread_pool_size = 16;
 * // When turning on the optional logging in the client, this is the path to the log file.
 * aerospike.log_path = NULL;
 * aerospike.log_level = NULL;
 * aerospike.nesting_depth = 3;
 *
 * // session handler
 * session.save_handler = aerospike; // to use the Aerospike session handler
 * session.gc_maxlifetime = 1440; // the TTL of the record used to store the session in seconds
 * session.save_path = NULL; // should follow the format ns|set|addr:port[,addr:port[,...]]. Ex: "test|sess|127.0.0.1:3000". The host info of just one cluster node is necessary
 * ```
 * @author Robert Marks <robert@aerospike.com>
 */
class Aerospike
{
    // Lifecycle and Connection Methods

    /**
     * Construct an Aerospike client object, and connect to the cluster defined
     * in $config.
     *
     * Aerospike::isConnected() can be used to test whether the connection has
     * succeeded. If a config or connection error has occured, Aerospike::error()
     * and Aerospike::errorno() can be used to inspect it.
     *
     * ```php
     * $config = [
     *   "hosts" => [
     *     ["addr" => "localhost", "port" => 3000]
     *   ],
     *   "shm" => []
     * ];
     * // Set a default policy for write and read operations
     * $writeOpts = [Aerospike::OPT_POLICY_KEY => Aerospike::POLICY_KEY_SEND];
     * $readOpts = [Aerospike::OPT_TOTAL_TIMEOUT => 150];
     * $opts = [Aerospike::OPT_WRITE_DEFAULT_POL => $writeOpts, Aerospike::OPT_READ_DEFAULT_POL => $readOpts];
     * $client = new Aerospike($config, true, $opts);
     * if (!$client->isConnected()) {
     *   echo "Aerospike failed to connect[{$client->errorno()}]: {$client->error()}\n";
     *   exit(1);
     * }
     * ```
     * @see Aerospike php.ini config parameters
     * @link https://github.com/aerospike/aerospike-client-php/blob/master/doc/README.md#configuration-in-a-web-server-context Configuration in a Web Server Context
     * @param array $config holds cluster connection and client config information
     * * _hosts_ a **required** array of host pairs. One node or more (for failover)
     *        may be defined. Once a connection is established to the
     *        "seed" node, the client will retrieve the full list of nodes in
     *        the cluster, and manage its connections to them.
     * * _addr_ hostname or IP of the node
     * * _port_ the port of the node
     * * _user_ **required** for the Enterprise Edition
     * * _pass_ **required** for the Enterprise Edition
     * * _shm_ optional. Shared-memory cluster tending is enabled if an array
     *     (even an empty one) is provided. Disabled by default.
     * * _shm\_key_ explicitly sets the shm key for the cluster. It is
     *       otherwise implicitly evaluated per unique hostname, and can be
     *       inspected with shmKey(). (default: 0xA8000000)
     * * _shm\_max\_nodes_ maximum number of nodes allowed. Pad so new nodes
     *       can be added without configuration changes (default: 16)
     * * _shm\_max\_namespaces_ maximum number of namespaces allowed (default: 8)
     * * _shm\_takeover\_threshold\_sec_ take over tending if the cluster
     *       hasn't been checked for this many seconds (default: 30)
     * * _max\_threads_ (default: 300)
     * * _thread\_pool\_size_ should be at least the number of nodes in the cluster (default: 16) In ZTS builds this is set to 0
     * * _compression\_threshold_ client will compress records larger than this value for transport (default: 0)
     * * _tender\_interval_ polling interval in milliseconds for cluster tender (default: 1000)
     * * _cluster\_name_ if specified, only server nodes matching this name will be used when determining the cluster
     * * _rack\_aware_ Boolean: Track server rack data.  This field is useful when directing read commands to
     * the server node that contains the key and exists on the same rack as the client.
     * This serves to lower cloud provider costs when nodes are distributed across different
     * racks/data centers.
     * POLICY_REPLICA_PREFER_RACK must be set as the replica policy for reads and _rack\_id_ must be set toenable this functionality.
     * (Default: false)
     * * _rack\_id_ Integer. Rack where this client instance resides.
     *
     * _rack\_aware_, POLICY_REPLICA_PREFER_RACK and server rack configuration must also be
     * set to enable this functionality.
     *
     * Default: 0
     * * Aerospike::OPT_TLS_CONFIG an array of TLS setup parameters whose keys include
     * * * Aerospike::OPT_TLS_ENABLE boolean Whether or not to enable TLS.
     * * * Aerospike::OPT_OPT_TLS_CAFILE
     * * * Aerospike::OPT_TLS_CAPATH
     * * * Aerospike::OPT_TLS_PROTOCOLS
     * * * Aerospike::OPT_TLS_CIPHER_SUITE
     * * * Aerospike::OPT_TLS_CRL_CHECK
     * * * Aerospike::OPT_TLS_CRL_CHECK_ALL
     * * * Aerospike::OPT_TLS_CERT_BLACKLIST
     * * * Aerospike::OPT_TLS_LOG_SESSION_INFO
     * * * Aerospike::OPT_TLS_KEYFILE
     * * * Aerospike::OPT_TLS_CERTFILE
     * @param bool $persistent_connection In a multiprocess context, such as a
     *        web server, the client should be configured to use
     *        persistent connections. This allows for reduced overhead,
     *        saving on discovery of the cluster topology, fetching its partition
     *        map, and on opening connections to the nodes.
     * @param array $options An optional client config array whose keys include
     * * Aerospike::OPT_CONNECT_TIMEOUT
     * * Aerospike::OPT_READ_TIMEOUT
     * * Aerospike::OPT_WRITE_TIMEOUT
     * * Aerospike::OPT_POLICY_KEY
     * * Aerospike::OPT_POLICY_EXISTS
     * * Aerospike::OPT_SERIALIZER
     * * Aerospike::OPT_POLICY_COMMIT_LEVEL
     * * Aerospike::OPT_POLICY_REPLICA
     * * Aerospike::OPT_POLICY_READ_MODE_AP
     * * Aerospike::OPT_POLICY_READ_MODE_SC
     * * Aerospike::OPT_READ_DEFAULT_POL An array of default policies for read operations.
     * * Aerospike::OPT_WRITE_DEFAULT_POL An array of default policies for write operations.
     * * AEROSPIKE::OPT_REMOVE_DEFAULT_POL An array of default policies for remove operations.
     * * Aerospike::OPT_BATCH_DEFAULT_POL An array of default policies for batch operations.
     * * Aerospike::OPT_OPERATE_DEFAULT_POL An array of default policies for operate operations.
     * * Aerospike::OPT_QUERY_DEFAULT_POL An array of default policies for query operations.
     * * Aerospike::OPT_SCAN_DEFAULT_POL An array of default policies for scan operations.
     * * Aerospike::OPT_APPLY_DEFAULT_POL An array of default policies for apply operations.
     * @see Aerospike::OPT_CONNECT_TIMEOUT Aerospike::OPT_CONNECT_TIMEOUT options
     * @see Aerospike::OPT_READ_TIMEOUT Aerospike::OPT_READ_TIMEOUT options
     * @see Aerospike::OPT_WRITE_TIMEOUT Aerospike::OPT_WRITE_TIMEOUT options
     * @see Aerospike::OPT_POLICY_KEY Aerospike::OPT_POLICY_KEY options
     * @see Aerospike::OPT_POLICY_EXISTS Aerospike::OPT_POLICY_EXISTS options
     * @see Aerospike::OPT_SERIALIZER Aerospike::OPT_SERIALIZER options
     * @see Aerospike::OPT_POLICY_COMMIT_LEVEL Aerospike::OPT_POLICY_COMMIT_LEVEL options
     * @see Aerospike::OPT_POLICY_REPLICA Aerospike::OPT_POLICY_REPLICA options
     * @see Aerospike::OPT_POLICY_READ_MODE_AP Aerospike::OPT_POLICY_READ_MODE_AP options
     * @see Aerospike::OPT_POLICY_READ_MODE_SC Aerospike::OPT_POLICY_READ_MODE_SC options
     * @see Aerospike::isConnected() isConnected()
     * @see Aerospike::error() error()
     * @see Aerospike::errorno() errorno()
     */
    public function __construct(array $config, bool $persistent_connection = true, array $options = []) {}

    /**
     * Disconnect from the Aerospike cluster and clean up resources.
     *
     * No need to ever call this method explicilty.
     * @return void
     */
    public function __destruct() {}

    /**
     * Test whether the client is connected to the cluster.
     *
     * If a connection error has occured, Aerospike::error() and Aerospike::errorno()
     * can be used to inspect it.
     * ```php
     * if (!$client->isConnected()) {
     *   echo "Aerospike failed to connect[{$client->errorno()}]: {$client->error()}\n";
     *   exit(1);
     * }
     * ```
     * @see Aerospike::error() error()
     * @see Aerospike::errorno() errorno()
     * @return bool
     */
    public function isConnected() {}

    /**
     * Disconnect the client from all the cluster nodes.
     *
     * This method should be explicitly called when using non-persistent connections.
     * @see Aerospike::isConnected()
     * @see Aerospike::reconnect()
     * @return void
     */
    public function close() {}

    /**
     * Reconnect the client to the cluster nodes.
     *
     * Aerospike::isConnected() can be used to test whether the re-connection
     * succeded. If a connection error occured Aerospike::error() and
     * Aerospike::errorno() can be used to inspect it.
     * ```php
     * $client = new Aerospike($config, false);
     * $client->close();
     * $client->reconnect();
     * if (!$client->isConnected()) {
     *   echo "Aerospike failed to connect[{$client->errorno()}]: {$client->error()}\n";
     *   exit(1);
     * }
     * ```
     * @see Aerospike::error() error()
     * @see Aerospike::errorno() errorno()
     * @return void
     */
    public function reconnect() {}

    /**
     * Expose the shared memory key used by shared-memory cluster tending
     *
     * If shm cluster tending is enabled, Aerospike::shmKey will return the
     * value of the shm key being used by the client. If it was set explicitly
     * under the client's shm config parameter, or through the global
     * `aerospike.shm.key` we expect to see that value. Otherwise the implicit
     * value generated by the client will be returned
     * @return int|null null if not enabled
     */
    public function shmKey() {}

    /**
     * Return the error message associated with the last operation.
     *
     * If the operation was successful the return value should be an empty string.
     * ```php
     * $client = new Aerospike($config, false);
     * if (!$client->isConnected()) {
     *   echo "{$client->error()} [{$client->errorno()}]";
     *   exit(1);
     * }
     * ```
     * On connection error would show:
     * ```
     * Unable to connect to server [-1]
     * ```
     * @see Aerospike::OK Error Codes
     * @return string
     */
    public function error() {}

    /**
     * Return the error code associated with the last operation.
     * If the operation was successful the return value should be 0 (Aerospike::OK)
     * @see Aerospike::OK Error Codes
     * @return int
     */
    public function errorno() {}

    // Key-Value Methods.

    /**
     * Return an array that represents the record's key.
     *
     * This value can be passed as the $key arguement required by other
     * key-value methods.
     *
     * In Aerospike, a record is identified by the tuple (namespace, set,
     * primary key), or by the digest which results from hashing this tuple
     * through RIPEMD-160.
     *
     * ** Initializing a key **
     *
     * ```php
     * $key = $client->initKey("test", "users", 1234);
     * var_dump($key);
     * ```
     *
     * ```bash
     *array(3) {
     *  ["ns"]=>
     *  string(4) "test"
     *  ["set"]=>
     *  string(5) "users"
     *  ["key"]=>
     *  int(1234)
     *}
     * ```
     *
     * ** Setting a digest **
     *
     * ```php
     * $base64_encoded_digest = '7EV9CpdMSNVoWn76A9E33Iu95+M=';
     * $digest = base64_decode($base64_encoded_digest);
     * $key = $client->initKey("test", "users", $digest, true);
     * var_dump($key);
     * ```
     *
     * ```bash
     *array(3) {
     *  ["ns"]=>
     *  string(4) "test"
     *  ["set"]=>
     *  string(5) "users"
     *  ["digest"]=>
     *  string(20) "?E}
     *?LH?hZ~??7Ü‹???"
     *}
     * ```
     *
     * @link https://github.com/aerospike/aerospike-client-php/blob/master/doc/README.md#configuration-in-a-web-server-context Configuration in a Web Server Context
     * @param string $ns the namespace
     * @param string $set the set within the given namespace
     * @param int|string $pk The primary key in the application, or the RIPEMD-160 digest of the (namespce, set, primary-key) tuple
     * @param bool $is_digest True if the *$pk* argument is a digest
     * @return array
     * @see Aerospike::getKeyDigest() getKeyDigest()
     */
    public function initKey(string $ns, string $set, $pk, bool $is_digest = false) {}

    /**
     * Return the digest of hashing the (namespace, set, primary-key) tuple
     * with RIPEMD-160.
     *
     * The digest uniquely identifies the record in the cluster, and is used to
     * calculate a partition ID. Using the partition ID, the client can identify
     * the node holding the record's master partition or replica partition(s) by
     * looking it up against the cluster's partition map.
     *
     * ```php
     * $digest = $client->getKeyDigest("test", "users", 1);
     * $key = $client->initKey("test", "users", $digest, true);
     * var_dump($digest, $key);
     * ```
     *
     * ```bash
     * string(20) "9!?@%??;???Wp?'??Ag"
     * array(3) {
     *   ["ns"]=>
     *   string(4) "test"
     *   ["set"]=>
     *   string(5) "users"
     *   ["digest"]=>
     *   string(20) "9!?@%??;???Wp?'??Ag"
     * }
     * ```
     *
     * @link https://github.com/aerospike/aerospike-client-php/blob/master/doc/README.md#configuration-in-a-web-server-context Configuration in a Web Server Context
     * @param string $ns the namespace
     * @param string $set the set within the given namespace
     * @param int|string $pk The primary key in the application
     * @return string
     * @see Aerospike::initKey() initKey()
     */
    public function getKeyDigest(string $ns, string $set, $pk) {}

    /**
     * Write a record identified by the $key with $bins, an array of bin-name => bin-value pairs.
     *
     * By default Aerospike::put() behaves in a set-and-replace mode, similar to
     * how new keys are added to an array, or the value of existing ones is overwritten.
     * This behavior can be modified using the *$options* parameter.
     *
     * **Note:** a binary-string which includes a null-byte will get truncated
     * at the position of the **\0** character if it is not wrapped. For more
     * information and the workaround see 'Handling Unsupported Types'.
     *
     * **Example #1 Aerospike::put() default behavior example**
     * ```php
     * $key = $client->initKey("test", "users", 1234);
     * $bins = ["email" => "hey@example.com", "name" => "Hey There"];
     * // will ensure a record exists at the given key with the specified bins
     * $status = $client->put($key, $bins);
     * if ($status == Aerospike::OK) {
     *     echo "Record written.\n";
     * } else {
     *     echo "[{$client->errorno()}] ".$client->error();
     * }
     *
     * // Updating the record
     * $bins = ["name" => "You There", "age" => 33];
     * // will update the name bin, and create a new 'age' bin
     * $status = $client->put($key, $bins);
     * if ($status == Aerospike::OK) {
     *     echo "Record updated.\n";
     * } else {
     *     echo "[{$client->errorno()}] ".$client->error();
     * }
     * ```
     * ```
     * Record written.
     * Record updated.
     * ```
     *
     * **Example #2 Fail unless the put explicitly creates a new record**
     * ```php
     *
     * // This time we expect an error, due to the record already existing (assuming we
     * // ran Example #1)
     * $status = $client->put($key, $bins, 0, [Aerospike::OPT_POLICY_EXISTS => Aerospike::POLICY_EXISTS_CREATE]);
     *
     * if ($status == Aerospike::OK) {
     *     echo "Record written.\n";
     * } elseif ($status == Aerospike::ERR_RECORD_EXISTS) {
     *     echo "The Aerospike server already has a record with the given key.\n";
     * } else {
     *     echo "[{$client->errorno()}] ".$client->error();
     * }
     * ```
     * ```
     * The Aerospike cluster already has a record with the given key.
     * ```
     *
     * **Example #3 Fail if the record has been written since it was last read
     * (CAS)**
     * ```php
     * // Get the record metadata and note its generation
     * $client->exists($key, $metadata);
     * $gen = $metadata['generation'];
     * $gen_policy = [Aerospike::POLICY_GEN_EQ, $gen];
     * $res = $client->put($key, $bins, 0, [Aerospike::OPT_POLICY_GEN => $gen_policy]);
     *
     * if ($res == Aerospike::OK) {
     *     echo "Record written.\n";
     * } elseif ($res == Aerospike::ERR_RECORD_GENERATION) {
     *     echo "The record has been written since we last read it.\n";
     * } else {
     *     echo "[{$client->errorno()}] ".$client->error();
     * }
     * ?>
     * ```
     * ```
     * The record has been written since we last read it.
     * ```
     *
     * **Example #4 Handling binary strings**
     * ```php
     * $str = 'Glagnar\'s Human Rinds, "It\'s a bunch\'a munch\'a crunch\'a human!';
     * $deflated = new \Aerospike\Bytes(gzdeflate($str));
     * $wrapped = new \Aerospike\Bytes("trunc\0ated");
     *
     * $key = $client->initKey('test', 'demo', 'wrapped-bytes');
     * $status = $client->put($key, ['unwrapped'=>"trunc\0ated", 'wrapped'=> $wrapped, 'deflated' => $deflated]);
     * if ($status !== Aerospike::OK) {
     *     die($client->error());
     * }
     * $client->get($key, $record);
     * $wrapped = \Aerospike\Bytes::unwrap($record['bins']['wrapped']);
     * $deflated = $record['bins']['deflated'];
     * $inflated = gzinflate($deflated->s);
     * echo "$inflated\n";
     * echo "wrapped binary-string: ";
     * var_dump($wrapped);
     * $unwrapped = $record['bins']['unwrapped'];
     * echo "The binary-string that was given to put() without a wrapper: $unwrapped\n";
     * ```
     * ```
     * Glagnar's Human Rinds, "It's a bunch'a munch'a crunch'a human!
     * wrapped binary-string: string(10) "truncated"
     * The binary-string that was given to put() without a wrapper: trunc
     * ```
     * @link https://www.aerospike.com/docs/architecture/data-model.html Aerospike Data Model
     * @link https://www.aerospike.com/docs/guide/kvs.html Key-Value Store
     * @link https://github.com/aerospike/aerospike-client-php/blob/master/doc/README.md#handling-unsupported-types Handling Unsupported Types
     * @link https://www.aerospike.com/docs/client/c/usage/kvs/write.html#change-record-time-to-live-ttl Time-to-live
     * @link https://www.aerospike.com/docs/guide/glossary.html Glossary
     * @param array $key The key identifying the record. An array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param array $bins The array of bin names and values to write. **Bin names cannot be longer than 14 characters.** Binary data containing the null byte (**\0**) may get truncated. See 'Handling Unsupported Types' for more details and a workaround
     * @param int $ttl The record's time-to-live in seconds
     * @param array $options an optional array of write policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * * Aerospike::OPT_SERIALIZER
     * * Aerospike::OPT_POLICY_KEY
     * * Aerospike::OPT_POLICY_GEN
     * * Aerospike::OPT_POLICY_EXISTS
     * * Aerospike::OPT_POLICY_COMMIT_LEVEL
     * * Aerospike::COMPRESSION_THRESHOLD
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * @see Aerospike::OPT_WRITE_TIMEOUT Aerospike::OPT_WRITE_TIMEOUT options
     * @see Aerospike::OPT_SERIALIZER Aerospike::OPT_SERIALIZER options
     * @see Aerospike::OPT_POLICY_KEY Aerospike::OPT_POLICY_KEY options
     * @see Aerospike::OPT_POLICY_GEN Aerospike::OPT_POLICY_GEN options
     * @see Aerospike::OPT_POLICY_EXISTS Aerospike::OPT_POLICY_EXISTS options
     * @see Aerospike::OPT_POLICY_COMMIT_LEVEL Aerospike::OPT_POLICY_COMMIT_LEVEL options
     * @see Aerospike::COMPRESSION_THRESHOLD
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @see Aerospike::error() error()
     * @see Aerospike::errorno() errorno()
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function put(array $key, array $bins, int $ttl = 0, array $options = []) {}

    /**
     * Read a record with a given key, and store it in $record
     *
     * The bins returned in *$record* can be filtered by passing a *$select*
     * array of bin names. Non-existent bins will appear in the *$record* with a `NULL` value.
     *
     * **Example #1 Aerospike::get() default behavior example**
     * ```php
     * $key = $client->initKey("test", "users", 1234);
     * $status = $client->get($key, $record);
     * if ($status == Aerospike::OK) {
     *     var_dump($record);
     * } elseif ($status == Aerospike::ERR_RECORD_NOT_FOUND) {
     *     echo "A user with key ". $key['key']. " does not exist in the database\n";
     * } else {
     *     echo "[{$client->errorno()}] ".$client->error();
     * }
     * ```
     * ```
     * array(3) {
     *   ["key"]=>
     *   array(4) {
     *     ["digest"]=>
     *     string(40) "436a3b9fcafb96d12844ab1377c0ff0d7a0b70cc"
     *     ["namespace"]=>
     *     NULL
     *     ["set"]=>
     *     NULL
     *     ["key"]=>
     *     NULL
     *   }
     *   ["metadata"]=>
     *   array(2) {
     *     ["generation"]=>
     *     int(3)
     *     ["ttl"]=>
     *     int(12345)
     *   }
     *   ["bins"]=>
     *   array(3) {
     *     ["email"]=>
     *     string(9) "hey@example.com"
     *     ["name"]=>
     *     string(9) "You There"
     *     ["age"]=>
     *     int(33)
     *   }
     * }
     * ```
     * **Example #2 get the record with filtered bins**
     * ```php
     * // assuming this follows Example #1, getting a filtered record
     * $filter = ["email", "manager"];
     * unset($record);
     * $status = $client->get($key, $record, $filter);
     * if ($status == Aerospike::OK) {
     *     var_dump($record);
     * } else {
     *     echo "[{$client->errorno()}] ".$client->error();
     * }
     * ```
     * ```
     * array(3) {
     *   ["key"]=>
     *   array(4) {
     *     ["digest"]=>
     *     string(40) "436a3b9fcafb96d12844ab1377c0ff0d7a0b70cc"
     *     ["namespace"]=>
     *     NULL
     *     ["set"]=>
     *     NULL
     *     ["key"]=>
     *     NULL
     *   }
     *   ["metadata"]=>
     *   array(2) {
     *     ["generation"]=>
     *     int(3)
     *     ["ttl"]=>
     *     int(12344)
     *   }
     *   ["bins"]=>
     *   array(2) {
     *     ["email"]=>
     *     string(15) "hey@example.com"
     *     ["manager"]=>
     *     NULL
     *   }
     * }
     * ```
     * @link https://www.aerospike.com/docs/architecture/data-model.html Aerospike Data Model
     * @link https://www.aerospike.com/docs/guide/kvs.html Key-Value Store
     * @link https://www.aerospike.com/docs/guide/glossary.html Glossary
     * @param array $key The key identifying the record. An array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param array &$record a reference to a variable which will contain the retrieved record of `['key', metadata', 'bins]` with the structure:
     * ```
     * Array:
     *   key => Array
     *     ns => namespace
     *     set => set name
     *     key => primary-key, present if written with POLICY_KEY_SEND
     *     digest => the record's RIPEMD-160 digest, always present
     *   metadata => Array
     *     ttl => time in seconds until the record expires
     *     generation => the number of times the record has been written
     *   bins => Array of bin-name => bin-value pairs
     * ```
     * @param null|array $select only these bins out of the record (optional)
     * @param array $options an optional array of read policy options, whose keys include
     * * Aerospike::OPT_READ_TIMEOUT
     * * Aerospike::OPT_POLICY_KEY
     * * Aerospike::OPT_DESERIALIZE
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * * Aerospike::OPT_POLICY_REPLICA
     * * Aerospike::OPT_POLICY_READ_MODE_AP
     * * Aerospike::OPT_POLICY_READ_MODE_SC
     * @see Aerospike::OPT_READ_TIMEOUT Aerospike::OPT_READ_TIMEOUT options
     * @see Aerospike::OPT_POLICY_KEY Aerospike::OPT_POLICY_KEY options
     * @see Aerospike::OPT_DESERIALIZE Aerospike::OPT_DESERIALIZE option
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::OPT_POLICY_REPLICA Aerospike::OPT_POLICY_REPLICA options
     * @see Aerospike::OPT_POLICY_READ_MODE_AP Aerospike::OPT_POLICY_READ_MODE_AP options
     * @see Aerospike::OPT_POLICY_READ_MODE_SC Aerospike::OPT_POLICY_READ_MODE_SC options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @see Aerospike::error() error()
     * @see Aerospike::errorno() errorno()
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function get(array $key, &$record, ?array $select = null, array $options = []) {}

    /**
     * Get the metadata of a record with a given key, and store it in $metadata
     *
     * ```php
     * $key = $client->initKey("test", "users", 1234);
     * $status = $client->exists($key, $metadata);
     * if ($status == Aerospike::OK) {
     *     var_dump($metadata);
     * } elseif ($status == Aerospike::ERR_RECORD_NOT_FOUND) {
     *     echo "A user with key ". $key['key']. " does not exist in the database\n";
     * } else {
     *     echo "[{$client->errorno()}] ".$client->error();
     * }
     * ```
     * ```
     * array(2) {
     *   ["generation"]=>
     *   int(4)
     *   ["ttl"]=>
     *   int(1337)
     * }
     * ```
     * **or**
     * ```
     * A user with key 1234 does not exist in the database.
     * ```
     * @link https://www.aerospike.com/docs/guide/glossary.html Glossary
     * @param array $key The key identifying the record. An array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param array &$metadata a reference to a variable which will be filled with an array of `['ttl', 'generation']` values
     * @param array $options an optional array of read policy options, whose keys include
     * * Aerospike::OPT_READ_TIMEOUT
     * * Aerospike::OPT_DESERIALIZE
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * * Aerospike::OPT_POLICY_KEY
     * * Aerospike::OPT_POLICY_REPLICA
     * * Aerospike::OPT_POLICY_READ_MODE_AP
     * * Aerospike::OPT_POLICY_READ_MODE_SC
     * @see Aerospike::OPT_READ_TIMEOUT Aerospike::OPT_READ_TIMEOUT options
     * @see Aerospike::OPT_DESERIALIZE Aerospike::OPT_DESERIALIZE option
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::OPT_POLICY_KEY Aerospike::OPT_POLICY_KEY options
     * @see Aerospike::OPT_POLICY_REPLICA Aerospike::OPT_POLICY_REPLICA options
     * @see Aerospike::OPT_POLICY_READ_MODE_AP Aerospike::OPT_POLICY_READ_MODE_AP options
     * @see Aerospike::OPT_POLICY_READ_MODE_SC Aerospike::OPT_POLICY_READ_MODE_SC options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @see Aerospike::error() error()
     * @see Aerospike::errorno() errorno()
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function exists(array $key, &$metadata, array $options = []) {}

    /**
     * Touch the record identified by the $key, resetting its time-to-live.
     *
     * ```php
     * $key = $client->initKey("test", "users", 1234);
     * $status = $client->touch($key, 120);
     * if ($status == Aerospike::OK) {
     *     echo "Added 120 seconds to the record's expiration.\n"
     * } elseif ($status == Aerospike::ERR_RECORD_NOT_FOUND) {
     *     echo "A user with key ". $key['key']. " does not exist in the database\n";
     * } else {
     *     echo "[{$client->errorno()}] ".$client->error();
     * }
     * ```
     * ```
     * Added 120 seconds to the record's expiration.
     * ```
     * **or**
     * ```
     * A user with key 1234 does not exist in the database.
     * ```
     * @link https://www.aerospike.com/docs/client/c/usage/kvs/write.html#change-record-time-to-live-ttl Time-to-live
     * @link https://www.aerospike.com/docs/guide/FAQ.html FAQ
     * @link https://discuss.aerospike.com/t/records-ttl-and-evictions/737 Record TTL and Evictions
     * @param array $key The key identifying the record. An array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param int $ttl The record's time-to-live in seconds
     * @param array $options an optional array of write policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * * Aerospike::OPT_POLICY_KEY
     * * Aerospike::OPT_POLICY_GEN
     * * Aerospike::OPT_POLICY_COMMIT_LEVEL
     * * Aerospike::OPT_DESERIALIZE
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * @see Aerospike::OPT_WRITE_TIMEOUT Aerospike::OPT_WRITE_TIMEOUT options
     * @see Aerospike::OPT_POLICY_KEY Aerospike::OPT_POLICY_KEY options
     * @see Aerospike::OPT_POLICY_GEN Aerospike::OPT_POLICY_GEN options
     * @see Aerospike::OPT_POLICY_COMMIT_LEVEL Aerospike::OPT_POLICY_COMMIT_LEVEL options
     * @see Aerospike::OPT_DESERIALIZE Aerospike::OPT_DESERIALIZE option
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function touch(array $key, int $ttl = 0, array $options = []) {}

    /**
     * Remove the record identified by the $key.
     *
     * ```php
     * $key = $client->initKey("test", "users", 1234);
     * $status = $client->remove($key);
     * if ($status == Aerospike::OK) {
     *     echo "Record removed.\n";
     * } elseif ($status == Aerospike::ERR_RECORD_NOT_FOUND) {
     *     echo "A user with key ". $key['key']. " does not exist in the database\n";
     * } else {
     *     echo "[{$client->errorno()}] ".$client->error();
     * }
     * ```
     * ```
     * Record removed.
     * ```
     * @param array $key The key identifying the record. An array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param array $options an optional array of write policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * * Aerospike::OPT_POLICY_GEN
     * * Aerospike::OPT_POLICY_COMMIT_LEVEL
     * * Aerospike::OPT_POLICY_DURABLE_DELETE
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * @see Aerospike::OPT_WRITE_TIMEOUT Aerospike::OPT_WRITE_TIMEOUT options
     * @see Aerospike::OPT_POLICY_GEN Aerospike::OPT_POLICY_GEN options
     * @see Aerospike::OPT_POLICY_COMMIT_LEVEL Aerospike::OPT_POLICY_COMMIT_LEVEL options
     * @see Aerospike::OPT_POLICY_DURABLE_DELETE Aerospike::OPT_POLICY_DURABLE_DELETE options
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function remove(array $key, array $options = []) {}

    /**
     * Remove $bins from the record identified by the $key.
     *
     * ```php
     * $key = ["ns" => "test", "set" => "users", "key" => 1234];
     * $options = array(Aerospike::OPT_TTL => 3600);
     * $status = $client->removeBin($key, ["age"], $options);
     * if ($status == Aerospike::OK) {
     *     echo "Removed bin 'age' from the record.\n";
     * } elseif ($status == Aerospike::ERR_RECORD_NOT_FOUND) {
     *     echo "The database has no record with the given key.\n";
     * } else {
     *     echo "[{$client->errorno()}] ".$client->error();
     * }
     * ```
     * @param array $key The key identifying the record. An array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param array $bins A list of bin names to remove
     * @param array $options an optional array of write policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * * Aerospike::OPT_POLICY_KEY
     * * Aerospike::OPT_POLICY_GEN
     * * Aerospike::OPT_POLICY_COMMIT_LEVEL
     * * Aerospike::COMPRESSION_THRESHOLD
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * @see Aerospike::OPT_WRITE_TIMEOUT Aerospike::OPT_WRITE_TIMEOUT options
     * @see Aerospike::OPT_POLICY_KEY Aerospike::OPT_POLICY_KEY options
     * @see Aerospike::OPT_POLICY_GEN Aerospike::OPT_POLICY_GEN options
     * @see Aerospike::OPT_POLICY_COMMIT_LEVEL Aerospike::OPT_POLICY_COMMIT_LEVEL options
     * @see Aerospike::COMPRESSION_THRESHOLD
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function removeBin(array $key, array $bins, array $options = []) {}

    /**
     * Remove all the records from a namespace or set
     *
     * Remove records in a specified namespace/set efficiently. This method is
     * many orders of magnitude faster than deleting records one at a time.
     * **Note:** works with Aerospike Server versions >= 3.12
     * See {@link https://www.aerospike.com/docs/reference/info#truncate Truncate command information}
     *
     * This asynchronous server call may return before the truncation is complete.
     * The user can still write new records after the server returns because new
     * records will have last update times greater than the truncate cutoff
     * (set at the time of truncate call).
     *
     * The truncate command does not durably delete records in the Community Edition.
     * The Enterprise Edition provides durability through the truncate command.
     *
     * ```php
     * $secondsInDay = 24 * 60 * 60;
     *
     * // Multiply by 10 ^ 9 to get nanoseconds
     * $yesterday = 1000000000 * (time() - $secondsInDay);
     *
     * // Remove all records in test/truncateSet updated before 24 hours ago
     * $status = $client->truncate("test", "demoSet", $yesterday);
     *
     * // Truncate all records in test, regardless of update time
     * $status = $client->truncate("test", null, 0);
     * ```
     * @version 3.12 Requires server >= 3.12
     * @param string $ns the namespace
     * @param string $set the set within the given namespace
     * @param int    $nanos cutoff threshold indicating that records
     * last updated before the threshold will be removed. Units are in
     * nanoseconds since unix epoch (1970-01-01 00:00:00). A value of 0
     * indicates that all records in the set should be truncated
     * regardless of update time. The value must not be in the future.
     * @param array $options an optional array of write policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function truncate(string $ns, string $set, int $nanos, array $options = []) {}

    /**
     * Increment the value of $bin in the record identified by the $key by an
     * $offset.
     *
     * ```php
     * $key = $client->initKey("test", "users", 1234);
     * $options = [Aerospike::OPT_TTL => 7200];
     * $status = $client->increment($key, 'pto', -4, $options);
     * if ($status == Aerospike::OK) {
     *     echo "Decremented four vacation days from the user's PTO balance.\n";
     * } else {
     *     echo "[{$client->errorno()}] ".$client->error();
     * }
     * ```
     * @param array $key The key identifying the record. An array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param string $bin The name of the bin to increment
     * @param int|float $offset The value by which to increment the bin
     * @param array $options an optional array of write policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * * Aerospike::OPT_TTL
     * * Aerospike::OPT_POLICY_KEY
     * * Aerospike::OPT_POLICY_GEN
     * * Aerospike::OPT_POLICY_COMMIT_LEVEL
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * @see Aerospike::OPT_WRITE_TIMEOUT Aerospike::OPT_WRITE_TIMEOUT options
     * @see Aerospike::OPT_TTL Aerospike::OPT_TTL options
     * @see Aerospike::OPT_POLICY_KEY Aerospike::OPT_POLICY_KEY options
     * @see Aerospike::OPT_POLICY_GEN Aerospike::OPT_POLICY_GEN options
     * @see Aerospike::OPT_POLICY_COMMIT_LEVEL Aerospike::OPT_POLICY_COMMIT_LEVEL options
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function increment(array $key, string $bin, $offset, array $options = []) {}

    /**
     * Append a string $value to the one already in $bin, in the record identified by the $key.
     *
     * ```php
     * $key = $client->initKey("test", "users", 1234);
     * $options = [Aerospike::OPT_TTL => 3600];
     * $status = $client->append($key, 'name', ' Ph.D.', $options);
     * if ($status == Aerospike::OK) {
     *     echo "Added the Ph.D. suffix to the user.\n";
     * } else {
     *     echo "[{$client->errorno()}] ".$client->error();
     * }
     * ```
     * @param array $key The key identifying the record. An array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param string $bin The name of the bin
     * @param string $value The string value to append to the bin
     * @param array $options an optional array of write policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * * Aerospike::OPT_TTL
     * * Aerospike::OPT_POLICY_KEY
     * * Aerospike::OPT_POLICY_GEN
     * * Aerospike::OPT_POLICY_COMMIT_LEVEL
     * * Aerospike::OPT_DESERIALIZE
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * @see Aerospike::OPT_WRITE_TIMEOUT Aerospike::OPT_WRITE_TIMEOUT options
     * @see Aerospike::OPT_TTL Aerospike::OPT_TTL options
     * @see Aerospike::OPT_POLICY_KEY Aerospike::OPT_POLICY_KEY options
     * @see Aerospike::OPT_POLICY_GEN Aerospike::OPT_POLICY_GEN options
     * @see Aerospike::OPT_POLICY_COMMIT_LEVEL Aerospike::OPT_POLICY_COMMIT_LEVEL options
     * @see Aerospike::OPT_DESERIALIZE Aerospike::OPT_DESERIALIZE option
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function append(array $key, string $bin, string $value, array $options = []) {}

    /**
     * Prepend a string $value to the one already in $bin, in the record identified by the $key.
     *
     * ```php
     * $key = $client->initKey("test", "users", 1234);
     * $options = [Aerospike::OPT_TTL => 3600];
     * $status = $client->prepend($key, 'name', '*', $options);
     * if ($status == Aerospike::OK) {
     *     echo "Starred the user.\n";
     * } else {
     *     echo "[{$client->errorno()}] ".$client->error();
     * }
     * ```
     * @param array $key The key identifying the record. An array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param string $bin The name of the bin
     * @param string $value The string value to prepend to the bin
     * @param array $options an optional array of write policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * * Aerospike::OPT_TTL
     * * Aerospike::OPT_POLICY_KEY
     * * Aerospike::OPT_POLICY_GEN
     * * Aerospike::OPT_POLICY_COMMIT_LEVEL
     * * Aerospike::OPT_DESERIALIZE
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * @see Aerospike::OPT_WRITE_TIMEOUT Aerospike::OPT_WRITE_TIMEOUT options
     * @see Aerospike::OPT_TTL Aerospike::OPT_TTL options
     * @see Aerospike::OPT_POLICY_KEY Aerospike::OPT_POLICY_KEY options
     * @see Aerospike::OPT_POLICY_GEN Aerospike::OPT_POLICY_GEN options
     * @see Aerospike::OPT_POLICY_COMMIT_LEVEL Aerospike::OPT_POLICY_COMMIT_LEVEL options
     * @see Aerospike::OPT_DESERIALIZE Aerospike::OPT_DESERIALIZE option
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function prepend(array $key, string $bin, string $value, array $options = []) {}

    /**
     *  Perform multiple bin operations on a record with a given key, with write operations happening before read ones.
     *
     *  Non-existent bins being read will have a `NULL` value.
     *
     * Currently a call to operate() can include only one write operation per-bin.
     * For example, you cannot both append and prepend to the same bin, in the same call.
     *
     * Like other bin operations, operate() only works on existing records (i.e. ones that were previously created with a put()).
     *
     * **Example #1 Combining several write operations into one multi-op call**
     *
     * ```
     * [
     *   ["op" => Aerospike::OPERATOR_APPEND, "bin" => "name", "val" => " Ph.D."],
     *   ["op" => Aerospike::OPERATOR_INCR, "bin" => "age", "val" => 1],
     *   ["op" => Aerospike::OPERATOR_READ, "bin" => "age"]
     * ]
     * ```
     *
     * ```php
     * $config = ["hosts" => [["addr"=>"localhost", "port"=>3000]], "shm"=>[]];
     * $client = new Aerospike($config, true);
     * if (!$client->isConnected()) {
     *    echo "Aerospike failed to connect[{$client->errorno()}]: {$client->error()}\n";
     *    exit(1);
     * }
     *
     * $key = $client->initKey("test", "users", 1234);
     * $operations = [
     *   ["op" => Aerospike::OPERATOR_APPEND, "bin" => "name", "val" => " Ph.D."],
     *   ["op" => Aerospike::OPERATOR_INCR, "bin" => "age", "val" => 1],
     *   ["op" => Aerospike::OPERATOR_READ, "bin" => "age"],
     * ];
     * $options = [Aerospike::OPT_TTL => 600];
     * $status = $client->operate($key, $operations, $returned, $options);
     * if ($status == Aerospike::OK) {
     *     var_dump($returned);
     * } else {
     *     echo "[{$client->errorno()}] ".$client->error();
     * }
     * ```
     * ```
     * array(1) {
     *   ["age"]=>
     *   int(34)
     * }
     * ```
     *
     * **Example #2 Implementing an LRU by reading a bin and touching a record in the same operation**
     *
     * ```
     * [
     *   ["op" => Aerospike::OPERATOR_READ, "bin" => "age"],
     *   ["op" => Aerospike::OPERATOR_TOUCH, "ttl" => 20]
     * ]
     * ```
     * @link https://www.aerospike.com/docs/guide/kvs.html Key-Value Store
     * @link https://github.com/aerospike/aerospike-client-php/blob/master/doc/README.md#handling-unsupported-types Handling Unsupported Types
     * @link https://www.aerospike.com/docs/client/c/usage/kvs/write.html#change-record-time-to-live-ttl Time-to-live
     * @link https://www.aerospike.com/docs/guide/glossary.html Glossary
     * @param array $key The key identifying the record. An array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param array $operations The array of of one or more per-bin operations conforming to the following structure:
     * ```
     * Write Operation:
     *   op => Aerospike::OPERATOR_WRITE
     *   bin => bin name (cannot be longer than 14 characters)
     *   val => the value to store in the bin
     *
     * Increment Operation:
     *   op => Aerospike::OPERATOR_INCR
     *   bin => bin name
     *   val => the integer by which to increment the value in the bin
     *
     * Prepend Operation:
     *   op => Aerospike::OPERATOR_PREPEND
     *   bin => bin name
     *   val => the string to prepend the string value in the bin
     *
     * Append Operation:
     *   op => Aerospike::OPERATOR_APPEND
     *   bin => bin name
     *   val => the string to append the string value in the bin
     *
     * Read Operation:
     *   op => Aerospike::OPERATOR_READ
     *   bin => name of the bin we want to read after any write operations
     *
     * Touch Operation: reset the time-to-live of the record and increment its generation
     *                  (only combines with read operations)
     *   op => Aerospike::OPERATOR_TOUCH
     *   ttl => a positive integer value to set as time-to-live for the record
     *
     * Delete Operation:
     *   op => Aerospike::OPERATOR_DELETE
     *
     * List Append Operation:
     *   op => Aerospike::OP_LIST_APPEND,
     *   bin =>  "events",
     *   val =>  1234
     *
     * List Merge Operation:
     *   op => Aerospike::OP_LIST_MERGE,
     *   bin =>  "events",
     *   val =>  [ 123, 456 ]
     *
     * List Insert Operation:
     *   op => Aerospike::OP_LIST_INSERT,
     *   bin =>  "events",
     *   index =>  2,
     *   val =>  1234
     *
     * List Insert Items Operation:
     *   op => Aerospike::OP_LIST_INSERT_ITEMS,
     *   bin =>  "events",
     *   index =>  2,
     *   val =>  [ 123, 456 ]
     *
     * List Pop Operation:
     *   op => Aerospike::OP_LIST_POP, # returns a value
     *   bin =>  "events",
     *   index =>  2
     *
     * List Pop Range Operation:
     *   op => Aerospike::OP_LIST_POP_RANGE, # returns a value
     *   bin =>  "events",
     *   index =>  2,
     *   val =>  3 # remove 3 elements starting at index 2
     *
     * List Remove Operation:
     *   op => Aerospike::OP_LIST_REMOVE,
     *   bin =>  "events",
     *   index =>  2
     *
     * List Remove Range Operation:
     *   op => Aerospike::OP_LIST_REMOVE_RANGE,
     *   bin =>  "events",
     *   index =>  2,
     *   val =>  3 # remove 3 elements starting at index 2
     *
     * List Clear Operation:
     *   op => Aerospike::OP_LIST_CLEAR,
     *   bin =>  "events"
     *
     * List Set Operation:
     *   op => Aerospike::OP_LIST_SET,
     *   bin =>  "events",
     *   index =>  2,
     *   val =>  "latest event at index 2" # set this value at index 2
     *
     * List Get Operation:
     *   op => Aerospike::OP_LIST_GET, # returns a value
     *   bin =>  "events",
     *   index =>  2 # similar to Aerospike::OPERATOR_READ but only returns the value
     *                 at index 2 of the list, not the whole bin
     *
     * List Get Range Operation:
     *   op => Aerospike::OP_LIST_GET_RANGE, # returns a value
     *   bin =>  "events",
     *   index =>  2,
     *   val =>  3 # get 3 elements starting at index 2
     *
     * List Trim Operation:
     *   op => Aerospike::OP_LIST_TRIM,
     *   bin =>  "events",
     *   index =>  2,
     *   val =>  3 # remove all elements not in the range between index 2 and index 2 + 3
     *
     * List Size Operation:
     *   op => Aerospike::OP_LIST_SIZE, # returns a value
     *   bin =>  "events" # gets the size of a list contained in the bin
     *
     *
     * Map operations
     *
     * Map Policies:
     * Many of the following operations require a map policy, the policy is an array
     * containing any of the keys AEROSPIKE::OPT_MAP_ORDER, AEROSPIKE::OPT_MAP_WRITE_MODE
     *
     * the value for AEROSPIKE::OPT_MAP_ORDER should be one of AEROSPIKE::AS_MAP_UNORDERED , AEROSPIKE::AS_MAP_KEY_ORDERED , AEROSPIKE::AS_MAP_KEY_VALUE_ORDERED
     * the default value is currently AEROSPIKE::AS_MAP_UNORDERED
     *
     * the value for AEROSPIKE::OPT_MAP_WRITE_MODE should be one of: AEROSPIKE::AS_MAP_UPDATE, AEROSPIKE::AS_MAP_UPDATE_ONLY , AEROSPIKE::AS_MAP_CREATE_ONLY
     * the default value is currently AEROSPIKE::AS_MAP_UPDATE
     *
     * the value for AEROSPIKE::OPT_MAP_WRITE_FLAGS should be one of: AEROSPIKE::AS_MAP_WRITE_DEFAULT, AEROSPIKE::AS_MAP_WRITE_CREATE_ONLY, AEROSPIKE::AS_MAP_WRITE_UPDATE_ONLY, AEROSPIKE::AS_MAP_WRITE_NO_FAIL, AEROSPIKE::AS_MAP_WRITE_PARTIAL
     * the default value is currently AEROSPIKE::AS_MAP_WRITE_DEFAULT
     *
     * Map return types:
     * many of the map operations require a return_type entry.
     * this specifies the format in which the response should be returned. The options are:
     * AEROSPIKE::AS_MAP_RETURN_NONE # Do not return a result.
     * AEROSPIKE::AS_MAP_RETURN_INDEX # Return key index order.
     * AEROSPIKE::AS_MAP_RETURN_REVERSE_INDEX # Return reverse key order.
     * AEROSPIKE::AS_MAP_RETURN_RANK # Return value order.
     * AEROSPIKE::AS_MAP_RETURN_REVERSE_RANK # Return reserve value order.
     * AEROSPIKE::AS_MAP_RETURN_COUNT # Return count of items selected.
     * AEROSPIKE::AS_MAP_RETURN_KEY # Return key for single key read and key list for range read.
     * AEROSPIKE::AS_MAP_RETURN_VALUE # Return value for single key read and value list for range read.
     * AEROSPIKE::AS_MAP_RETURN_KEY_VALUE # Return key/value items. Will be of the form ['key1', 'val1', 'key2', 'val2', 'key3', 'val3]
     *
     * Map policy Operation:
     *   op => Aerospike::OP_MAP_SET_POLICY,
     *   bin =>  "map",
     *   map_policy =>  [ AEROSPIKE::OPT_MAP_ORDER => AEROSPIKE::AS_MAP_KEY_ORDERED]
     *
     * Map clear operation: (Remove all items from a map)
     *   op => AEROSPIKE::OP_MAP_CLEAR,
     *   bin => "bin_name"
     *
     *
     * Map Size Operation: Return the number of items in a map
     *   op => AEROSPIKE::OP_MAP_SIZE,
     *   bin => "bin_name"
     *
     * Map Get by Key operation
     *   op => AEROSPIKE::OP_MAP_GET_BY_KEY ,
     *   bin => "bin_name",
     *   key => "my_key",
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map Get By Key Range operation:
     *   op => AEROSPIKE::OP_MAP_GET_BY_KEY_RANGE ,
     *   bin => "bin_name",
     *   key => "aaa",
     *   range_end => "bbb"
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map Get By Value operation:
     *   op => AEROSPIKE::OP_MAP_GET_BY_VALUE ,
     *   bin => "bin_name",
     *   value => "my_val"
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map Get by Value Range operation:
     *   op => AEROSPIKE::OP_MAP_GET_BY_VALUE_RANGE ,
     *   bin => "bin_name",
     *   value => "value_a",
     *   range_end => "value_z",
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map Get By Index operation
     *   op => AEROSPIKE::OP_MAP_GET_BY_INDEX ,
     *   bin => "bin_name",
     *   index => 2,
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map Get by Index Range operation
     *   op => AEROSPIKE::OP_MAP_GET_BY_INDEX_RANGE,
     *   bin => "bin_name",
     *   index => 2,
     *   count => 2,
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map Get By Rank operation
     *   op => AEROSPIKE::OP_MAP_GET_BY_RANK ,
     *   bin => "bin_name",
     *   rank => -1, # get the item with the largest value
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map Get by Rank Range operation
     *   op => AEROSPIKE::OP_MAP_GET_BY_RANK_RANGE ,
     *   rank => -2 ,
     *   count => 2 ,
     *   bin => "bin_name",
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map Put operation
     *   op => AEROSPIKE::OP_MAP_PUT ,
     *   bin => "bin_name",
     *   key => "aero",
     *   val => "spike",
     *   map_policy => [ AEROSPIKE::OPT_MAP_ORDER => AEROSPIKE::AS_MAP_KEY_ORDERED]
     *
     * Map Put Items operations
     *  op => AEROSPIKE::OP_MAP_PUT_ITEMS ,
     *  bin => "bin_name",
     *  val => [1, "a", 1.5],
     *  map_policy => [ AEROSPIKE::OPT_MAP_ORDER => AEROSPIKE::AS_MAP_KEY_ORDERED]
     *
     * Map Increment operation
     *   op => AEROSPIKE::OP_MAP_INCREMENT ,
     *   bin => "bin_name",
     *   val => 5, #increment the value by 5
     *   key => "key_to_increment",
     *   map_policy => [ AEROSPIKE::OPT_MAP_ORDER => AEROSPIKE::AS_MAP_KEY_ORDERED]
     *
     * Map Decrement operation
     *   op => AEROSPIKE::OP_MAP_DECREMENT ,
     *   bin => "bin_name",
     *   key => "key_to_decrement",
     *   val => 5, #decrement by 5
     *   map_policy => [ AEROSPIKE::OPT_MAP_ORDER => AEROSPIKE::AS_MAP_KEY_ORDERED]
     *
     * Map Remove by Key operation
     *   op => AEROSPIKE::OP_MAP_REMOVE_BY_KEY ,
     *   bin => "bin_name",
     *   key => "key_to_remove",
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map Remove by Key list operation
     *   op => AEROSPIKE::OP_MAP_REMOVE_BY_KEY_LIST ,
     *   bin => "bin_name",
     *   key => ["key1", 2, "key3"],
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map remove by Key Range operation
     *   op => AEROSPIKE::OP_MAP_REMOVE_BY_KEY_RANGE ,
     *   bin => "bin",
     *   key => "a",
     *   range_end => "d",
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map remove by Value operation
     *   op => AEROSPIKE::OP_MAP_REMOVE_BY_VALUE ,
     *   bin => "bin_name",
     *   val => 5,
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map remove by value range operation
     *   op => AEROSPIKE::OP_MAP_REMOVE_BY_VALUE_RANGE ,
     *   bin => "bin_name",
     *   val => "a",
     *   range_end => "d"
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map remove by value list operation
     *  op => AEROSPIKE::OP_MAP_REMOVE_BY_VALUE_LIST ,
     *  bin => "bin_name",
     *  val => [1, 2, 3, 4],
     *  return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map Remove by Index operation
     *   op => AEROSPIKE::OP_MAP_REMOVE_BY_INDEX ,
     *   index => 2,
     *   bin => "bin_name",
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map Remove By Index Range operation
     *   op => AEROSPIKE::OP_MAP_REMOVE_BY_INDEX_RANGE ,
     *   bin => "bin_name",
     *   index => 3 ,
     *   count => 3 ,
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map Remove by Rank operation
     *   op => AEROSPIKE::OP_MAP_REMOVE_BY_RANK ,
     *   rank => -1 ,
     *   bin => "bin_name",
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map remove by rank range
     *   op => AEROSPIKE::OP_MAP_REMOVE_BY_RANK_RANGE,
     *   bin => "bin_name",
     *   rank => -1,
     *   count => return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     *
     *
     * ```
     *
     * @param array &$returned a pass-by-reference array of bins retrieved by read operations. If multiple operations exist for a specific bin name, the last operation will be the one placed as the value
     * @param array $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * * Aerospike::OPT_TTL
     * * Aerospike::OPT_POLICY_KEY
     * * Aerospike::OPT_POLICY_GEN
     * * Aerospike::OPT_POLICY_COMMIT_LEVEL
     * * Aerospike::OPT_POLICY_REPLICA
     * * Aerospike::OPT_POLICY_READ_MODE_AP
     * * Aerospike::OPT_POLICY_READ_MODE_SC
     * * Aerospike::OPT_POLICY_DURABLE_DELETE
     * * Aerospike::OPT_DESERIALIZE
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * @see Aerospike::OPT_WRITE_TIMEOUT Aerospike::OPT_WRITE_TIMEOUT options
     * @see Aerospike::OPT_TTL Aerospike::OPT_TTL options
     * @see Aerospike::OPT_POLICY_KEY Aerospike::OPT_POLICY_KEY options
     * @see Aerospike::OPT_POLICY_GEN Aerospike::OPT_POLICY_GEN options
     * @see Aerospike::OPT_POLICY_COMMIT_LEVEL Aerospike::OPT_POLICY_COMMIT_LEVEL options
     * @see Aerospike::OPT_POLICY_REPLICA Aerospike::OPT_POLICY_REPLICA options
     * @see Aerospike::OPT_POLICY_READ_MODE_AP Aerospike::OPT_POLICY_READ_MODE_AP options
     * @see Aerospike::OPT_POLICY_READ_MODE_SC Aerospike::OPT_POLICY_READ_MODE_SC options
     * @see Aerospike::OPT_POLICY_DURABLE_DELETE Aerospike::OPT_POLICY_DURABLE_DELETE options
     * @see Aerospike::OPT_DESERIALIZE Aerospike::OPT_DESERIALIZE option
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @see Aerospike::error() error()
     * @see Aerospike::errorno() errorno()
     * @see Aerospike::OPERATOR_WRITE Aerospike::OPERATOR_WRITE and other operators
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function operate(array $key, array $operations, &$returned, array $options = []) {}

    /**
     *  Perform multiple bin operations on a record with a given key, with write operations happening before read ones.
     *  The order of the resulting elements will correspond to the order of the operations in the parameters.
     *
     *  Non-existent bins being read will have a `NULL` value.
     *
     * Currently a call to operateOrdered() can include only one write operation per-bin.
     * For example, you cannot both append and prepend to the same bin, in the same call.
     *
     * Like other bin operations, operateOrdered() only works on existing records (i.e. ones that were previously created with a put()).
     *
     * **Example #1 Combining several write operations into one multi-op call**
     *
     * ```php
     * $config = ["hosts" => [["addr"=>"localhost", "port"=>3000]], "shm"=>[]];
     * $client = new Aerospike($config, true);
     * if (!$client->isConnected()) {
     *    echo "Aerospike failed to connect[{$client->errorno()}]: {$client->error()}\n";
     *    exit(1);
     * }
     *
     * $key = $client->initKey("test", "demo", "pk458");
     * $operations = [
     * array("op" => Aerospike::OP_LIST_APPEND, "bin" => "age", "val"=>49),
     * array("op" => Aerospike::OP_LIST_GET, "bin" => "age", "index"=>0),
     * array("op" => Aerospike::OP_LIST_POP, "bin" => "age", "index"=>0)
     * ];
     * $returned = "output value";
     * $status = $client->operateOrdered($key, $operations, $returned);
     *
     * if ($status == Aerospike::OK) {
     *     var_dump($returned);
     * } else {
     *     echo "[{$client->errorno()}] ".$client->error();
     * }
     * ```
     *
     * @link https://www.aerospike.com/docs/guide/kvs.html Key-Value Store
     * @link https://github.com/aerospike/aerospike-client-php/blob/master/doc/README.md#handling-unsupported-types Handling Unsupported Types
     * @link https://www.aerospike.com/docs/client/c/usage/kvs/write.html#change-record-time-to-live-ttl Time-to-live
     * @link https://www.aerospike.com/docs/guide/glossary.html Glossary
     * @param array $key The key identifying the record. An array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param array $operations The array of of one or more per-bin operations conforming to the following structure:
     * ```
     * Write Operation:
     *   op => Aerospike::OPERATOR_WRITE
     *   bin => bin name (cannot be longer than 14 characters)
     *   val => the value to store in the bin
     *
     * Increment Operation:
     *   op => Aerospike::OPERATOR_INCR
     *   bin => bin name
     *   val => the integer by which to increment the value in the bin
     *
     * Prepend Operation:
     *   op => Aerospike::OPERATOR_PREPEND
     *   bin => bin name
     *   val => the string to prepend the string value in the bin
     *
     * Append Operation:
     *   op => Aerospike::OPERATOR_APPEND
     *   bin => bin name
     *   val => the string to append the string value in the bin
     *
     * Read Operation:
     *   op => Aerospike::OPERATOR_READ
     *   bin => name of the bin we want to read after any write operations
     *
     * Touch Operation: reset the time-to-live of the record and increment its generation
     *                  (only combines with read operations)
     *   op => Aerospike::OPERATOR_TOUCH
     *   ttl => a positive integer value to set as time-to-live for the record
     *
     * Delete Operation:
     *   op => Aerospike::OPERATOR_DELETE
     *
     * List Append Operation:
     *   op => Aerospike::OP_LIST_APPEND,
     *   bin =>  "events",
     *   val =>  1234
     *
     * List Merge Operation:
     *   op => Aerospike::OP_LIST_MERGE,
     *   bin =>  "events",
     *   val =>  [ 123, 456 ]
     *
     * List Insert Operation:
     *   op => Aerospike::OP_LIST_INSERT,
     *   bin =>  "events",
     *   index =>  2,
     *   val =>  1234
     *
     * List Insert Items Operation:
     *   op => Aerospike::OP_LIST_INSERT_ITEMS,
     *   bin =>  "events",
     *   index =>  2,
     *   val =>  [ 123, 456 ]
     *
     * List Pop Operation:
     *   op => Aerospike::OP_LIST_POP, # returns a value
     *   bin =>  "events",
     *   index =>  2
     *
     * List Pop Range Operation:
     *   op => Aerospike::OP_LIST_POP_RANGE, # returns a value
     *   bin =>  "events",
     *   index =>  2,
     *   val =>  3 # remove 3 elements starting at index 2
     *
     * List Remove Operation:
     *   op => Aerospike::OP_LIST_REMOVE,
     *   bin =>  "events",
     *   index =>  2
     *
     * List Remove Range Operation:
     *   op => Aerospike::OP_LIST_REMOVE_RANGE,
     *   bin =>  "events",
     *   index =>  2,
     *   val =>  3 # remove 3 elements starting at index 2
     *
     * List Clear Operation:
     *   op => Aerospike::OP_LIST_CLEAR,
     *   bin =>  "events"
     *
     * List Set Operation:
     *   op => Aerospike::OP_LIST_SET,
     *   bin =>  "events",
     *   index =>  2,
     *   val =>  "latest event at index 2" # set this value at index 2
     *
     * List Get Operation:
     *   op => Aerospike::OP_LIST_GET, # returns a value
     *   bin =>  "events",
     *   index =>  2 # similar to Aerospike::OPERATOR_READ but only returns the value
     *                 at index 2 of the list, not the whole bin
     *
     * List Get Range Operation:
     *   op => Aerospike::OP_LIST_GET_RANGE, # returns a value
     *   bin =>  "events",
     *   index =>  2,
     *   val =>  3 # get 3 elements starting at index 2
     *
     * List Trim Operation:
     *   op => Aerospike::OP_LIST_TRIM,
     *   bin =>  "events",
     *   index =>  2,
     *   val =>  3 # remove all elements not in the range between index 2 and index 2 + 3
     *
     * List Size Operation:
     *   op => Aerospike::OP_LIST_SIZE, # returns a value
     *   bin =>  "events" # gets the size of a list contained in the bin
     *
     *
     * Map operations
     *
     * Map Policies:
     * Many of the following operations require a map policy, the policy is an array
     * containing any of the keys AEROSPIKE::OPT_MAP_ORDER, AEROSPIKE::OPT_MAP_WRITE_MODE
     *
     * the value for AEROSPIKE::OPT_MAP_ORDER should be one of AEROSPIKE::AS_MAP_UNORDERED , AEROSPIKE::AS_MAP_KEY_ORDERED , AEROSPIKE::AS_MAP_KEY_VALUE_ORDERED
     * the default value is currently AEROSPIKE::AS_MAP_UNORDERED
     *
     * the value for AEROSPIKE::OPT_MAP_WRITE_MODE should be one of: AEROSPIKE::AS_MAP_UPDATE, AEROSPIKE::AS_MAP_UPDATE_ONLY , AEROSPIKE::AS_MAP_CREATE_ONLY
     * the default value is currently AEROSPIKE::AS_MAP_UPDATE
     *
     * the value for AEROSPIKE::OPT_MAP_WRITE_FLAGS should be one of: AEROSPIKE::AS_MAP_WRITE_DEFAULT, AEROSPIKE::AS_MAP_WRITE_CREATE_ONLY, AEROSPIKE::AS_MAP_WRITE_UPDATE_ONLY, AEROSPIKE::AS_MAP_WRITE_NO_FAIL, AEROSPIKE::AS_MAP_WRITE_PARTIAL
     * the default value is currently AEROSPIKE::AS_MAP_WRITE_DEFAULT
     *
     * Map return types:
     * many of the map operations require a return_type entry.
     * this specifies the format in which the response should be returned. The options are:
     * AEROSPIKE::AS_MAP_RETURN_NONE # Do not return a result.
     * AEROSPIKE::AS_MAP_RETURN_INDEX # Return key index order.
     * AEROSPIKE::AS_MAP_RETURN_REVERSE_INDEX # Return reverse key order.
     * AEROSPIKE::AS_MAP_RETURN_RANK # Return value order.
     * AEROSPIKE::AS_MAP_RETURN_REVERSE_RANK # Return reserve value order.
     * AEROSPIKE::AS_MAP_RETURN_COUNT # Return count of items selected.
     * AEROSPIKE::AS_MAP_RETURN_KEY # Return key for single key read and key list for range read.
     * AEROSPIKE::AS_MAP_RETURN_VALUE # Return value for single key read and value list for range read.
     * AEROSPIKE::AS_MAP_RETURN_KEY_VALUE # Return key/value items. Will be of the form ['key1', 'val1', 'key2', 'val2', 'key3', 'val3]
     *
     * Map policy Operation:
     *   op => Aerospike::OP_MAP_SET_POLICY,
     *   bin =>  "map",
     *   map_policy =>  [ AEROSPIKE::OPT_MAP_ORDER => AEROSPIKE::AS_MAP_KEY_ORDERED]
     *
     * Map clear operation: (Remove all items from a map)
     *   op => AEROSPIKE::OP_MAP_CLEAR,
     *   bin => "bin_name"
     *
     *
     * Map Size Operation: Return the number of items in a map
     *   op => AEROSPIKE::OP_MAP_SIZE,
     *   bin => "bin_name"
     *
     * Map Get by Key operation
     *   op => AEROSPIKE::OP_MAP_GET_BY_KEY ,
     *   bin => "bin_name",
     *   key => "my_key",
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map Get By Key Range operation:
     *   op => AEROSPIKE::OP_MAP_GET_BY_KEY_RANGE ,
     *   bin => "bin_name",
     *   key => "aaa",
     *   range_end => "bbb"
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map Get By Value operation:
     *   op => AEROSPIKE::OP_MAP_GET_BY_VALUE ,
     *   bin => "bin_name",
     *   value => "my_val"
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map Get by Value Range operation:
     *   op => AEROSPIKE::OP_MAP_GET_BY_VALUE_RANGE ,
     *   bin => "bin_name",
     *   value => "value_a",
     *   range_end => "value_z",
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map Get By Index operation
     *   op => AEROSPIKE::OP_MAP_GET_BY_INDEX ,
     *   bin => "bin_name",
     *   index => 2,
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map Get by Index Range operation
     *   op => AEROSPIKE::OP_MAP_GET_BY_INDEX_RANGE,
     *   bin => "bin_name",
     *   index => 2,
     *   count => 2,
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map Get By Rank operation
     *   op => AEROSPIKE::OP_MAP_GET_BY_RANK ,
     *   bin => "bin_name",
     *   rank => -1, # get the item with the largest value
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map Get by Rank Range operation
     *   op => AEROSPIKE::OP_MAP_GET_BY_RANK_RANGE ,
     *   rank => -2 ,
     *   count => 2 ,
     *   bin => "bin_name",
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map Put operation
     *   op => AEROSPIKE::OP_MAP_PUT ,
     *   bin => "bin_name",
     *   key => "aero",
     *   val => "spike",
     *   map_policy => [ AEROSPIKE::OPT_MAP_ORDER => AEROSPIKE::AS_MAP_KEY_ORDERED]
     *
     * Map Put Items operations
     *  op => AEROSPIKE::OP_MAP_PUT_ITEMS ,
     *  bin => "bin_name",
     *  val => [1, "a", 1.5],
     *  map_policy => [ AEROSPIKE::OPT_MAP_ORDER => AEROSPIKE::AS_MAP_KEY_ORDERED]
     *
     * Map Increment operation
     *   op => AEROSPIKE::OP_MAP_INCREMENT ,
     *   bin => "bin_name",
     *   val => 5, #increment the value by 5
     *   key => "key_to_increment",
     *   map_policy => [ AEROSPIKE::OPT_MAP_ORDER => AEROSPIKE::AS_MAP_KEY_ORDERED]
     *
     * Map Decrement operation
     *   op => AEROSPIKE::OP_MAP_DECREMENT ,
     *   bin => "bin_name",
     *   key => "key_to_decrement",
     *   val => 5, #decrement by 5
     *   map_policy => [ AEROSPIKE::OPT_MAP_ORDER => AEROSPIKE::AS_MAP_KEY_ORDERED]
     *
     * Map Remove by Key operation
     *   op => AEROSPIKE::OP_MAP_REMOVE_BY_KEY ,
     *   bin => "bin_name",
     *   key => "key_to_remove",
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map Remove by Key list operation
     *   op => AEROSPIKE::OP_MAP_REMOVE_BY_KEY_LIST ,
     *   bin => "bin_name",
     *   key => ["key1", 2, "key3"],
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map remove by Key Range operation
     *   op => AEROSPIKE::OP_MAP_REMOVE_BY_KEY_RANGE ,
     *   bin => "bin",
     *   key => "a",
     *   range_end => "d",
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map remove by Value operation
     *   op => AEROSPIKE::OP_MAP_REMOVE_BY_VALUE ,
     *   bin => "bin_name",
     *   val => 5,
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map remove by value range operation
     *   op => AEROSPIKE::OP_MAP_REMOVE_BY_VALUE_RANGE ,
     *   bin => "bin_name",
     *   val => "a",
     *   range_end => "d"
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map remove by value list operation
     *  op => AEROSPIKE::OP_MAP_REMOVE_BY_VALUE_LIST ,
     *  bin => "bin_name",
     *  val => [1, 2, 3, 4],
     *  return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map Remove by Index operation
     *   op => AEROSPIKE::OP_MAP_REMOVE_BY_INDEX ,
     *   index => 2,
     *   bin => "bin_name",
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map Remove By Index Range operation
     *   op => AEROSPIKE::OP_MAP_REMOVE_BY_INDEX_RANGE ,
     *   bin => "bin_name",
     *   index => 3 ,
     *   count => 3 ,
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map Remove by Rank operation
     *   op => AEROSPIKE::OP_MAP_REMOVE_BY_RANK ,
     *   rank => -1 ,
     *   bin => "bin_name",
     *   return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     * Map remove by rank range
     *   op => AEROSPIKE::OP_MAP_REMOVE_BY_RANK_RANGE,
     *   bin => "bin_name",
     *   rank => -1,
     *   count => return_type => AEROSPIKE::MAP_RETURN_KEY_VALUE
     *
     *
     *
     * ```
     *
     * @param array &$returned a pass-by-reference array of bins retrieved by read operations. If multiple operations exist for a specific bin name, the last operation will be the one placed as the value
     * @param array $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * * Aerospike::OPT_TTL
     * * Aerospike::OPT_POLICY_KEY
     * * Aerospike::OPT_POLICY_GEN
     * * Aerospike::OPT_POLICY_COMMIT_LEVEL
     * * Aerospike::OPT_POLICY_REPLICA
     * * Aerospike::OPT_POLICY_READ_MODE_AP
     * * Aerospike::OPT_POLICY_READ_MODE_SC
     * * Aerospike::OPT_POLICY_DURABLE_DELETE
     * * Aerospike::OPT_DESERIALIZE
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * @see Aerospike::OPT_WRITE_TIMEOUT Aerospike::OPT_WRITE_TIMEOUT options
     * @see Aerospike::OPT_TTL Aerospike::OPT_TTL options
     * @see Aerospike::OPT_POLICY_KEY Aerospike::OPT_POLICY_KEY options
     * @see Aerospike::OPT_POLICY_GEN Aerospike::OPT_POLICY_GEN options
     * @see Aerospike::OPT_POLICY_COMMIT_LEVEL Aerospike::OPT_POLICY_COMMIT_LEVEL options
     * @see Aerospike::OPT_POLICY_REPLICA Aerospike::OPT_POLICY_REPLICA options
     * @see Aerospike::OPT_POLICY_READ_MODE_AP Aerospike::OPT_POLICY_READ_MODE_AP options
     * @see Aerospike::OPT_POLICY_READ_MODE_SC Aerospike::OPT_POLICY_READ_MODE_SC options
     * @see Aerospike::OPT_POLICY_DURABLE_DELETE Aerospike::OPT_POLICY_DURABLE_DELETE options
     * @see Aerospike::OPT_DESERIALIZE Aerospike::OPT_DESERIALIZE option
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @see Aerospike::error() error()
     * @see Aerospike::errorno() errorno()
     * @see Aerospike::OPERATOR_WRITE Aerospike::OPERATOR_WRITE and other operators
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function operateOrdered(array $key, array $operations, &$returned, array $options = []) {}

    /**
     * Count the number of elements in a list type bin
     *
     * @version 3.7 Requires server >= 3.7
     * @param array  $key The key identifying the record. An array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param string $bin
     * @param int    &$count pass-by-reference param
     * @param array  $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_READ_TIMEOUT
     * * Aerospike::OPT_POLICY_KEY
     * * Aerospike::OPT_POLICY_REPLICA
     * * Aerospike::OPT_POLICY_READ_MODE_AP
     * * Aerospike::OPT_POLICY_READ_MODE_SC
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * @see Aerospike::OPT_READ_TIMEOUT Aerospike::OPT_READ_TIMEOUT options
     * @see Aerospike::OPT_POLICY_KEY Aerospike::OPT_POLICY_KEY options
     * @see Aerospike::OPT_POLICY_REPLICA Aerospike::OPT_POLICY_REPLICA options
     * @see Aerospike::OPT_POLICY_READ_MODE_AP Aerospike::OPT_POLICY_READ_MODE_AP options
     * @see Aerospike::OPT_POLICY_READ_MODE_SC Aerospike::OPT_POLICY_READ_MODE_SC options
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @see Aerospike::error() error()
     * @see Aerospike::errorno() errorno()
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function listSize(array $key, $bin, &$count, array $options = []) {}

    /**
     * Add a single value (of any type) to the end of a list type bin
     *
     * @version 3.7 Requires server >= 3.7
     * @param array  $key The key identifying the record. An array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param string $bin
     * @param mixed  $value
     * @param array  $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * * Aerospike::OPT_TTL
     * * Aerospike::OPT_POLICY_KEY
     * * Aerospike::OPT_POLICY_GEN
     * * Aerospike::OPT_POLICY_COMMIT_LEVEL
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * @see Aerospike::OPT_WRITE_TIMEOUT Aerospike::OPT_WRITE_TIMEOUT options
     * @see Aerospike::OPT_TTL Aerospike::OPT_TTL options
     * @see Aerospike::OPT_POLICY_KEY Aerospike::OPT_POLICY_KEY options
     * @see Aerospike::OPT_POLICY_GEN Aerospike::OPT_POLICY_GEN options
     * @see Aerospike::OPT_POLICY_COMMIT_LEVEL Aerospike::OPT_POLICY_COMMIT_LEVEL options
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @see Aerospike::error() error()
     * @see Aerospike::errorno() errorno()
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function listAppend(array $key, $bin, $value, array $options = []) {}

    /**
     * Add several items to the end of a list type bin
     *
     * @version 3.7 Requires server >= 3.7
     * @param array  $key The key identifying the record. An array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param string $bin
     * @param array  $items
     * @param array  $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * * Aerospike::OPT_TTL
     * * Aerospike::OPT_POLICY_KEY
     * * Aerospike::OPT_POLICY_GEN
     * * Aerospike::OPT_POLICY_COMMIT_LEVEL
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * @see Aerospike::OPT_WRITE_TIMEOUT Aerospike::OPT_WRITE_TIMEOUT options
     * @see Aerospike::OPT_TTL Aerospike::OPT_TTL options
     * @see Aerospike::OPT_POLICY_KEY Aerospike::OPT_POLICY_KEY options
     * @see Aerospike::OPT_POLICY_GEN Aerospike::OPT_POLICY_GEN options
     * @see Aerospike::OPT_POLICY_COMMIT_LEVEL Aerospike::OPT_POLICY_COMMIT_LEVEL options
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @see Aerospike::error() error()
     * @see Aerospike::errorno() errorno()
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function listMerge(array $key, $bin, array $items, array $options = []) {}

    /**
     * Insert a single element (of any type) at a specified index of a list type bin
     *
     * @version 3.7 Requires server >= 3.7
     * @param array  $key The key identifying the record. An array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param string $bin
     * @param int    $index
     * @param mixed  $value
     * @param array  $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * * Aerospike::OPT_TTL
     * * Aerospike::OPT_POLICY_KEY
     * * Aerospike::OPT_POLICY_GEN
     * * Aerospike::OPT_POLICY_COMMIT_LEVEL
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * @see Aerospike::OPT_WRITE_TIMEOUT Aerospike::OPT_WRITE_TIMEOUT options
     * @see Aerospike::OPT_TTL Aerospike::OPT_TTL options
     * @see Aerospike::OPT_POLICY_KEY Aerospike::OPT_POLICY_KEY options
     * @see Aerospike::OPT_POLICY_GEN Aerospike::OPT_POLICY_GEN options
     * @see Aerospike::OPT_POLICY_COMMIT_LEVEL Aerospike::OPT_POLICY_COMMIT_LEVEL options
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @see Aerospike::error() error()
     * @see Aerospike::errorno() errorno()
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function listInsert(array $key, $bin, $index, $value, array $options = []) {}

    /**
     * Insert several elements at a specified index of a list type bin
     *
     * @version 3.7 Requires server >= 3.7
     * @param array  $key The key identifying the record. An array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param string $bin
     * @param int    $index
     * @param array  $elements
     * @param array  $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * * Aerospike::OPT_TTL
     * * Aerospike::OPT_POLICY_KEY
     * * Aerospike::OPT_POLICY_GEN
     * * Aerospike::OPT_POLICY_COMMIT_LEVEL
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * @see Aerospike::OPT_WRITE_TIMEOUT Aerospike::OPT_WRITE_TIMEOUT options
     * @see Aerospike::OPT_TTL Aerospike::OPT_TTL options
     * @see Aerospike::OPT_POLICY_KEY Aerospike::OPT_POLICY_KEY options
     * @see Aerospike::OPT_POLICY_GEN Aerospike::OPT_POLICY_GEN options
     * @see Aerospike::OPT_POLICY_COMMIT_LEVEL Aerospike::OPT_POLICY_COMMIT_LEVEL options
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @see Aerospike::error() error()
     * @see Aerospike::errorno() errorno()
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function listInsertItems(array $key, $bin, $index, array $elements, array $options = []) {}

    /**
     * Remove and get back the element at a specified index of a list type bin
     * Index -1 is the last item in the list, -3 is the third from last, 0 is the first in the list.
     *
     * @version 3.7 Requires server >= 3.7
     * @param array  $key The key identifying the record. An array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param string $bin
     * @param int    $index
     * @param mixed  &$element pass-by-reference param
     * @param array  $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * * Aerospike::OPT_TTL
     * * Aerospike::OPT_POLICY_KEY
     * * Aerospike::OPT_POLICY_GEN
     * * Aerospike::OPT_POLICY_COMMIT_LEVEL
     * * Aerospike::OPT_POLICY_DURABLE_DELETE
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * @see Aerospike::OPT_WRITE_TIMEOUT Aerospike::OPT_WRITE_TIMEOUT options
     * @see Aerospike::OPT_TTL Aerospike::OPT_TTL options
     * @see Aerospike::OPT_POLICY_DURABLE_DELETE Aerospike::OPT_POLICY_DURABLE_DELETE options
     * @see Aerospike::OPT_POLICY_KEY Aerospike::OPT_POLICY_KEY options
     * @see Aerospike::OPT_POLICY_GEN Aerospike::OPT_POLICY_GEN options
     * @see Aerospike::OPT_POLICY_COMMIT_LEVEL Aerospike::OPT_POLICY_COMMIT_LEVEL options
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @see Aerospike::error() error()
     * @see Aerospike::errorno() errorno()
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function listPop(array $key, $bin, $index, &$element, array $options = []) {}

    /**
     * Remove and get back several elements at a specified index range of a list type bin
     * Index -1 is the last item in the list, -3 is the third from last, 0 is the first in the list.
     *
     * @version 3.7 Requires server >= 3.7
     * @param array  $key The key identifying the record. An array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param string $bin
     * @param int    $index
     * @param int    $count
     * @param array  &$elements pass-by-reference param. After the method call it will be an array holding the popped elements.
     * @param array  $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * * Aerospike::OPT_TTL
     * * Aerospike::OPT_POLICY_KEY
     * * Aerospike::OPT_POLICY_GEN
     * * Aerospike::OPT_POLICY_COMMIT_LEVEL
     * * Aerospike::OPT_POLICY_DURABLE_DELETE
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * @see Aerospike::OPT_WRITE_TIMEOUT Aerospike::OPT_WRITE_TIMEOUT options
     * @see Aerospike::OPT_TTL Aerospike::OPT_TTL options
     * @see Aerospike::OPT_POLICY_KEY Aerospike::OPT_POLICY_KEY options
     * @see Aerospike::OPT_POLICY_GEN Aerospike::OPT_POLICY_GEN options
     * @see Aerospike::OPT_POLICY_COMMIT_LEVEL Aerospike::OPT_POLICY_COMMIT_LEVEL options
     * @see Aerospike::OPT_POLICY_DURABLE_DELETE Aerospike::OPT_POLICY_DURABLE_DELETE options
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @see Aerospike::error() error()
     * @see Aerospike::errorno() errorno()
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function listPopRange(array $key, $bin, $index, $count, &$elements, array $options = []) {}

    /**
     * Remove a list element at a specified index of a list type bin
     *
     * @version 3.7 Requires server >= 3.7
     * @param array  $key The key identifying the record. An array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param string $bin
     * @param int    $index
     * @param array  $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * * Aerospike::OPT_TTL
     * * Aerospike::OPT_POLICY_KEY
     * * Aerospike::OPT_POLICY_GEN
     * * Aerospike::OPT_POLICY_COMMIT_LEVEL
     * * Aerospike::OPT_POLICY_DURABLE_DELETE
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * @see Aerospike::OPT_WRITE_TIMEOUT Aerospike::OPT_WRITE_TIMEOUT options
     * @see Aerospike::OPT_TTL Aerospike::OPT_TTL options
     * @see Aerospike::OPT_POLICY_KEY Aerospike::OPT_POLICY_KEY options
     * @see Aerospike::OPT_POLICY_GEN Aerospike::OPT_POLICY_GEN options
     * @see Aerospike::OPT_POLICY_COMMIT_LEVEL Aerospike::OPT_POLICY_COMMIT_LEVEL options
     * @see Aerospike::OPT_POLICY_DURABLE_DELETE Aerospike::OPT_POLICY_DURABLE_DELETE options
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @see Aerospike::error() error()
     * @see Aerospike::errorno() errorno()
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function listRemove(array $key, $bin, $index, array $options = []) {}

    /**
     * Remove several list elements at a specified index range of a list type bin
     *
     * @version 3.7 Requires server >= 3.7
     * @param array  $key The key identifying the record. An array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param string $bin
     * @param int    $index
     * @param int    $count
     * @param array  $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * * Aerospike::OPT_TTL
     * * Aerospike::OPT_POLICY_KEY
     * * Aerospike::OPT_POLICY_GEN
     * * Aerospike::OPT_POLICY_COMMIT_LEVEL
     * * Aerospike::OPT_POLICY_DURABLE_DELETE
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * @see Aerospike::OPT_TTL Aerospike::OPT_TTL options
     * @see Aerospike::OPT_POLICY_KEY Aerospike::OPT_POLICY_KEY options
     * @see Aerospike::OPT_POLICY_GEN Aerospike::OPT_POLICY_GEN options
     * @see Aerospike::OPT_POLICY_COMMIT_LEVEL Aerospike::OPT_POLICY_COMMIT_LEVEL options
     * @see Aerospike::OPT_POLICY_DURABLE_DELETE Aerospike::OPT_POLICY_DURABLE_DELETE options
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @see Aerospike::error() error()
     * @see Aerospike::errorno() errorno()
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function listRemoveRange(array $key, $bin, $index, $count, array $options = []) {}

    /**
     * Trim the list, removing all elements not in the specified index range of a list type bin
     *
     * @version 3.7 Requires server >= 3.7
     * @param array  $key The key identifying the record. An array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param string $bin
     * @param int    $index
     * @param int    $count
     * @param array  $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * * Aerospike::OPT_TTL
     * * Aerospike::OPT_POLICY_KEY
     * * Aerospike::OPT_POLICY_GEN
     * * Aerospike::OPT_POLICY_COMMIT_LEVEL
     * * Aerospike::OPT_POLICY_DURABLE_DELETE
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * @see Aerospike::OPT_WRITE_TIMEOUT Aerospike::OPT_WRITE_TIMEOUT options
     * @see Aerospike::OPT_TTL Aerospike::OPT_TTL options
     * @see Aerospike::OPT_POLICY_KEY Aerospike::OPT_POLICY_KEY options
     * @see Aerospike::OPT_POLICY_GEN Aerospike::OPT_POLICY_GEN options
     * @see Aerospike::OPT_POLICY_COMMIT_LEVEL Aerospike::OPT_POLICY_COMMIT_LEVEL options
     * @see Aerospike::OPT_POLICY_DURABLE_DELETE Aerospike::OPT_POLICY_DURABLE_DELETE options
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @see Aerospike::error() error()
     * @see Aerospike::errorno() errorno()
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function listTrim(array $key, $bin, $index, $count, array $options = []) {}

    /**
     * Remove all the elements from a list type bin
     *
     * @version 3.7 Requires server >= 3.7
     * @param array  $key The key identifying the record. An array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param string $bin
     * @param array  $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * * Aerospike::OPT_TTL
     * * Aerospike::OPT_POLICY_KEY
     * * Aerospike::OPT_POLICY_GEN
     * * Aerospike::OPT_POLICY_COMMIT_LEVEL
     * * Aerospike::OPT_POLICY_DURABLE_DELETE
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * @see Aerospike::OPT_WRITE_TIMEOUT Aerospike::OPT_WRITE_TIMEOUT options
     * @see Aerospike::OPT_TTL Aerospike::OPT_TTL options
     * @see Aerospike::OPT_POLICY_KEY Aerospike::OPT_POLICY_KEY options
     * @see Aerospike::OPT_POLICY_GEN Aerospike::OPT_POLICY_GEN options
     * @see Aerospike::OPT_POLICY_COMMIT_LEVEL Aerospike::OPT_POLICY_COMMIT_LEVEL options
     * @see Aerospike::OPT_POLICY_DURABLE_DELETE Aerospike::OPT_POLICY_DURABLE_DELETE options
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @see Aerospike::error() error()
     * @see Aerospike::errorno() errorno()
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function listClear(array $key, $bin, array $options = []) {}

    /**
     * Set an element at a specified index of a list type bin
     *
     * @version 3.7 Requires server >= 3.7
     * @param array  $key The key identifying the record. An array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param string $bin
     * @param int    $index
     * @param mixed  $value
     * @param array  $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * * Aerospike::OPT_TTL
     * * Aerospike::OPT_POLICY_KEY
     * * Aerospike::OPT_POLICY_GEN
     * * Aerospike::OPT_POLICY_COMMIT_LEVEL
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * @see Aerospike::OPT_WRITE_TIMEOUT Aerospike::OPT_WRITE_TIMEOUT options
     * @see Aerospike::OPT_TTL Aerospike::OPT_TTL options
     * @see Aerospike::OPT_POLICY_KEY Aerospike::OPT_POLICY_KEY options
     * @see Aerospike::OPT_POLICY_GEN Aerospike::OPT_POLICY_GEN options
     * @see Aerospike::OPT_POLICY_COMMIT_LEVEL Aerospike::OPT_POLICY_COMMIT_LEVEL options
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @see Aerospike::error() error()
     * @see Aerospike::errorno() errorno()
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function listSet(array $key, $bin, $index, $value, array $options = []) {}

    /**
     * Get an element from a specified index of a list type bin
     *
     * @version 3.7 Requires server >= 3.7
     * @param array  $key The key identifying the record. An array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param string $bin
     * @param int    $index
     * @param array  &$element pass-by-reference param which will hold the returned element.
     * @param array  $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_READ_TIMEOUT
     * * Aerospike::OPT_POLICY_KEY
     * * Aerospike::OPT_POLICY_REPLICA
     * * Aerospike::OPT_POLICY_READ_MODE_AP
     * * Aerospike::OPT_POLICY_READ_MODE_SC
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * @see Aerospike::OPT_READ_TIMEOUT Aerospike::OPT_READ_TIMEOUT options
     * @see Aerospike::OPT_POLICY_KEY Aerospike::OPT_POLICY_KEY options
     * @see Aerospike::OPT_POLICY_REPLICA Aerospike::OPT_POLICY_REPLICA options
     * @see Aerospike::OPT_POLICY_READ_MODE_AP Aerospike::OPT_POLICY_READ_MODE_AP options
     * @see Aerospike::OPT_POLICY_READ_MODE_SC Aerospike::OPT_POLICY_READ_MODE_SC options
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @see Aerospike::error() error()
     * @see Aerospike::errorno() errorno()
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function listGet(array $key, $bin, $index, array &$element, array $options = []) {}

    /**
     * Get several elements starting at a specified index from a list type bin
     *
     * @version 3.7 Requires server >= 3.7
     * @param array  $key The key identifying the record. An array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param string $bin
     * @param int    $index
     * @param int    $count
     * @param array  &$elements pass-by-reference param which will hold an array of returned elements from the specified list bin.
     * @param array  $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_READ_TIMEOUT
     * * Aerospike::OPT_POLICY_KEY
     * * Aerospike::OPT_POLICY_REPLICA
     * * Aerospike::OPT_POLICY_READ_MODE_AP
     * * Aerospike::OPT_POLICY_READ_MODE_SC
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * @see Aerospike::OPT_READ_TIMEOUT Aerospike::OPT_READ_TIMEOUT options
     * @see Aerospike::OPT_POLICY_KEY Aerospike::OPT_POLICY_KEY options
     * @see Aerospike::OPT_POLICY_REPLICA Aerospike::OPT_POLICY_REPLICA options
     * @see Aerospike::OPT_POLICY_READ_MODE_AP Aerospike::OPT_POLICY_READ_MODE_AP options
     * @see Aerospike::OPT_POLICY_READ_MODE_SC Aerospike::OPT_POLICY_READ_MODE_SC options
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @see Aerospike::error() error()
     * @see Aerospike::errorno() errorno()
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function listGetRange(array $key, $bin, $index, $count, &$elements, array $options = []) {}

    // Batch Operation Methods

    /**
     * Read a batch of records from a list of given keys, and fill $records with the resulting indexed array
     *
     * Each record is an array consisting of *key*, *metadata* and *bins* (see: {@see Aerospike::get() get()}).
     * Non-existent records will have `NULL` for their *metadata* and *bins* fields.
     * The bins returned can be filtered by passing an array of bin names.
     *
     * **Note** that the protocol getMany() will use (batch-direct or batch-index)
     * is configurable through the config parameter `Aerospike::USE_BATCH_DIRECT`
     * or `php.ini` config parameter `aerospike.use_batch_direct`.
     * By default batch-index is used with servers that support it (version >= 3.6.0).
     *
     * **Example #1 Aerospike::getMany() default behavior example**
     * ```php
     * $config = ["hosts" => [["addr"=>"localhost", "port"=>3000]], "shm"=>[]];
     * $client = new Aerospike($config, true);
     * if (!$client->isConnected()) {
     *    echo "Aerospike failed to connect[{$client->errorno()}]: {$client->error()}\n";
     *    exit(1);
     * }
     *
     * $key1 = $client->initKey("test", "users", 1234);
     * $key2 = $client->initKey("test", "users", 1235); // this key does not exist
     * $key3 = $client->initKey("test", "users", 1236);
     * $keys = array($key1, $key2, $key3);
     * $status = $client->getMany($keys, $records);
     * if ($status == Aerospike::OK) {
     *     var_dump($records);
     * } else {
     *     echo "[{$client->errorno()}] ".$client->error();
     * }
     * ```
     * ```
     * array(3) {
     *   [0]=>
     *   array(3) {
     *     ["key"]=>
     *     array(4) {
     *       ["ns"]=>
     *       string(4) "test"
     *       ["set"]=>
     *       string(5) "users"
     *       ["key"]=>
     *       int(1234)
     *       ["digest"]=>
     *       string(20) "M?v2Kp???
     *
     * ?[??4?v
     *     }
     *     ["metadata"]=>
     *     array(2) {
     *       ["ttl"]=>
     *       int(4294967295)
     *       ["generation"]=>
     *       int(1)
     *     }
     *     ["bins"]=>
     *     array(3) {
     *       ["email"]=>
     *       string(15) "hey@example.com"
     *       ["name"]=>
     *       string(9) "You There"
     *       ["age"]=>
     *       int(33)
     *     }
     *   }
     *   [1]=>
     *   array(3) {
     *     ["key"]=>
     *     array(4) {
     *       ["ns"]=>
     *       string(4) "test"
     *       ["set"]=>
     *       string(5) "users"
     *       ["key"]=>
     *       int(1235)
     *       ["digest"]=>
     *       string(20) "?C??[?vwS??ƨ?????"
     *     }
     *     ["metadata"]=>
     *     NULL
     *     ["bins"]=>
     *     NULL
     *   }
     *   [2]=>
     *   array(3) {
     *     ["key"]=>
     *     array(4) {
     *       ["ns"]=>
     *       string(4) "test"
     *       ["set"]=>
     *       string(5) "users"
     *       ["key"]=>
     *       int(1236)
     *       ["digest"]=>
     *       string(20) "'?9?
     *                       ??????
     * ?	?"
     *     }
     *     ["metadata"]=>
     *     array(2) {
     *       ["ttl"]=>
     *       int(4294967295)
     *       ["generation"]=>
     *       int(1)
     *     }
     *     ["bins"]=>
     *     array(3) {
     *       ["email"]=>
     *       string(19) "thisguy@example.com"
     *       ["name"]=>
     *       string(8) "This Guy"
     *       ["age"]=>
     *       int(42)
     *     }
     *   }
     * }
     * ```
     * **Example #2 getMany records with filtered bins**
     * ```php
     * // assuming this follows Example #1
     *
     * $filter = ["email"];
     * $keys = [$key1, $key3];
     * $status = $client->getMany($keys, $records, $filter);
     * if ($status == Aerospike::OK) {
     *     var_dump($records);
     * } else {
     *     echo "[{$client->errorno()}] ".$client->error();
     * }
     * ```
     * ```
     * array(2) {
     *   [0]=>
     *   array(3) {
     *     ["key"]=>
     *     array(4) {
     *       ["ns"]=>
     *       string(4) "test"
     *       ["set"]=>
     *       string(5) "users"
     *       ["key"]=>
     *       int(1234)
     *       ["digest"]=>
     *       string(20) "M?v2Kp???
     *
     * ?[??4?v
     *     }
     *     ["metadata"]=>
     *     array(2) {
     *       ["ttl"]=>
     *       int(4294967295)
     *       ["generation"]=>
     *       int(4)
     *     }
     *     ["bins"]=>
     *     array(1) {
     *       ["email"]=>
     *       string(15) "hey@example.com"
     *     }
     *   }
     *   [1]=>
     *   array(3) {
     *     ["key"]=>
     *     array(4) {
     *       ["ns"]=>
     *       string(4) "test"
     *       ["set"]=>
     *       string(5) "users"
     *       ["key"]=>
     *       int(1236)
     *       ["digest"]=>
     *       string(20) "'?9?
     *                       ??????
     * ?	?"
     *     }
     *     ["metadata"]=>
     *     array(2) {
     *       ["ttl"]=>
     *       int(4294967295)
     *       ["generation"]=>
     *       int(4)
     *     }
     *     ["bins"]=>
     *     array(1) {
     *       ["email"]=>
     *       string(19) "thisguy@example.com"
     *     }
     *   }
     * }
     * ```
     * @param array $keys an array of initialized keys, each key an array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param array &$records a pass-by-reference variable which will hold an array of record values, each record an array of `['key', 'metadata', 'bins']`
     * @param array $select only these bins out of the record (optional)
     * @param array $options an optional array of read policy options, whose keys include
     * * Aerospike::OPT_READ_TIMEOUT
     * * Aerospike::USE_BATCH_DIRECT
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * * Aerospike::OPT_BATCH_CONCURRENT
     * * Aerospike::OPT_SEND_SET_NAME
     * * Aerospike::OPT_ALLOW_INLINE
     * @see Aerospike::USE_BATCH_DIRECT Aerospike::USE_BATCH_DIRECT options
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @see Aerospike::error() error()
     * @see Aerospike::errorno() errorno()
     * @see Aerospike::get() get()
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function getMany(array $keys, &$records, array $select = [], array $options = []) {}

    /**
     * Check if a batch of records exists in the database and fill $metdata with the results
     *
     * Checks for the existence a batch of given *keys* (see: {@see Aerospike::exists() exists()}),
     * and return an indexed array matching the order of the *keys*.
     * Non-existent records will have `NULL` for their *metadata*.
     *
     * **Note** that the protocol existsMany() will use (batch-direct or batch-index)
     * is configurable through the config parameter `Aerospike::USE_BATCH_DIRECT`
     * or `php.ini` config parameter `aerospike.use_batch_direct`.
     * By default batch-index is used with servers that support it (version >= 3.6.0).
     *
     * **Example #1 Aerospike::existsMany() default behavior example**
     * ```php
     * $config = ["hosts" => [["addr"=>"localhost", "port"=>3000]], "shm"=>[]];
     * $client = new Aerospike($config, true);
     * if (!$client->isConnected()) {
     *    echo "Aerospike failed to connect[{$client->errorno()}]: {$client->error()}\n";
     *    exit(1);
     * }
     *
     * $key1 = $client->initKey("test", "users", 1234);
     * $key2 = $client->initKey("test", "users", 1235); // this key does not exist
     * $key3 = $client->initKey("test", "users", 1236);
     * $keys = array($key1, $key2, $key3);
     * $status = $client->existsMany($keys, $metadata);
     * if ($status == Aerospike::OK) {
     *     var_dump($records);
     * } else {
     *     echo "[{$client->errorno()}] ".$client->error();
     * }
     * ```
     * ```
     * array(3) {
     *   [0]=>
     *   array(3) {
     *     ["key"]=>
     *     array(4) {
     *       ["ns"]=>
     *       string(4) "test"
     *       ["set"]=>
     *       string(5) "users"
     *       ["key"]=>
     *       int(1234)
     *       ["digest"]=>
     *       string(20) "M?v2Kp???
     *
     * ?[??4?v
     *     }
     *     ["metadata"]=>
     *     array(2) {
     *       ["ttl"]=>
     *       int(4294967295)
     *       ["generation"]=>
     *       int(1)
     *     }
     *   }
     *   [1]=>
     *   array(3) {
     *     ["key"]=>
     *     array(4) {
     *       ["ns"]=>
     *       string(4) "test"
     *       ["set"]=>
     *       string(5) "users"
     *       ["key"]=>
     *       int(1235)
     *       ["digest"]=>
     *       string(20) "?C??[?vwS??ƨ?????"
     *     }
     *     ["metadata"]=>
     *     NULL
     *   }
     *   [2]=>
     *   array(3) {
     *     ["key"]=>
     *     array(4) {
     *       ["ns"]=>
     *       string(4) "test"
     *       ["set"]=>
     *       string(5) "users"
     *       ["key"]=>
     *       int(1236)
     *       ["digest"]=>
     *       string(20) "'?9?
     *                       ??????
     * ?	?"
     *     }
     *     ["metadata"]=>
     *     array(2) {
     *       ["ttl"]=>
     *       int(4294967295)
     *       ["generation"]=>
     *       int(1)
     *     }
     *   }
     * }
     * ```
     * @param array $keys an array of initialized keys, each key an array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param array &$metadata a pass-by-reference array of metadata values, each an array of `['key', 'metadata']`
     * @param array $options an optional array of read policy options, whose keys include
     * * Aerospike::OPT_READ_TIMEOUT
     * * Aerospike::USE_BATCH_DIRECT
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * * Aerospike::OPT_BATCH_CONCURRENT
     * * Aerospike::OPT_SEND_SET_NAME
     * * Aerospike::OPT_ALLOW_INLINE
     * @see Aerospike::USE_BATCH_DIRECT Aerospike::USE_BATCH_DIRECT options
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @see Aerospike::error() error()
     * @see Aerospike::errorno() errorno()
     * @see Aerospike::exists() exists()
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function existsMany(array $keys, array &$metadata, array $options = []) {}

    // Scan and Query

    /**
     * Scan a namespace or set
     *
     * Scan a _ns.set_, and invoke a callback function *record_cb* on each
     * record streaming back from the cluster.
     *
     * Optionally select the bins to be returned. Non-existent bins in this list will appear in the
     * record with a NULL value.
     *
     * ```php
     * $options = [Aerospike::OPT_SCAN_PRIORITY => Aerospike::SCAN_PRIORITY_MEDIUM];
     * $processed = 0;
     * $status = $client->scan('test', 'users', function ($record) use (&$processed) {
     *     if (!is_null($record['bins']['email'])) echo $record['bins']['email']."\n";
     *     if ($processed++ > 19) return false; // halt the stream by returning a false
     * }, ['email'], $options);
     *
     * var_dump($status, $processed);
     * ```
     * ```
     * foo@example.com
     * :
     * bar@example.com
     * I think a sample of 20 records is enough
     * ```
     * @link https://www.aerospike.com/docs/architecture/data-model.html Aerospike Data Model
     * @link https://www.aerospike.com/docs/guide/scan.html Scans
     * @link https://www.aerospike.com/docs/operations/manage/scans/ Managing Scans
     * @param string   $ns the namespace
     * @param string   $set the set within the given namespace
     * @param callable $record_cb A callback function invoked for each record streaming back from the cluster
     * @param array    $select An array of bin names which are the subset to be returned
     * @param array    $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_READ_TIMEOUT
     * * Aerospike::OPT_SOCKET_TIMEOUT maximum socket idle time in milliseconds (0 means do not apply a socket idle timeout)
     * * Aerospike::OPT_SCAN_PRIORITY
     * * Aerospike::OPT_SCAN_PERCENTAGE of the records in the set to return
     * * Aerospike::OPT_SCAN_CONCURRENTLY whether to run the scan in parallel
     * * Aerospike::OPT_SCAN_NOBINS whether to not retrieve bins for the records
     * * Aerospike::OPT_SCAN_RPS_LIMIT limit the scan to process OPT_SCAN_RPS_LIMIT per second.
     *
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function scan(string $ns, string $set, callable $record_cb, array $select = [], array $options = []) {}

    /**
     * Query a secondary index on a namespace or set
     *
     * Query a _ns.set_ with a specified predicate, and invoke a callback function *record_cb* on each
     * record matched by the query and streaming back from the cluster.
     *
     * Optionally select the bins to be returned. Non-existent bins in this list will appear in the
     * record with a NULL value.
     *
     * ```php
     * $result = [];
     * $where = Aerospike::predicateBetween("age", 30, 39);
     * $status = $client->query("test", "users", $where, function ($record) use (&$result) {
     *     $result[] = $record['bins'];
     * });
     * if ($status !== Aerospike::OK) {
     *     echo "An error occured while querying[{$client->errorno()}] {$client->error()}\n";
     * } else {
     *     echo "The query returned ".count($result)." records\n";
     * }
     * ```
     * ```
     * foo@example.com
     * :
     * bar@example.com
     * I think a sample of 20 records is enough
     * ```
     * @link https://www.aerospike.com/docs/architecture/data-model.html Aerospike Data Model
     * @link https://www.aerospike.com/docs/guide/query.html Query
     * @link https://www.aerospike.com/docs/operations/manage/queries/index.html Managing Queries
     * @param string   $ns the namespace
     * @param string   $set the set within the given namespace
     * @param array $where the predicate for the query, usually created by the
     * predicate helper methods. The arrays conform to one of the following:
     * ```
     * Array:
     *   bin => bin name
     *   op => one of Aerospike::OP_EQ, Aerospike::OP_BETWEEN, Aerospike::OP_CONTAINS, Aerospike::OP_RANGE, etc
     *   val => scalar integer/string for OP_EQ and OP_CONTAINS or [$min, $max] for OP_BETWEEN and OP_RANGE
     *
     * or an empty array() for no predicate
     * ```
     * examples
     * ```
     * ["bin"=>"name", "op"=>Aerospike::OP_EQ, "val"=>"foo"]
     * ["bin"=>"age", "op"=>Aerospike::OP_BETWEEN, "val"=>[35,50]]
     * ["bin"=>"movies", "op"=>Aerospike::OP_CONTAINS, "val"=>"12 Monkeys"]
     * ["bin"=>"movies", "op"=>Aerospike::OP_RANGE, "val"=>[10,1000]]
     * [] // no predicate
     * ```
     * @param callable $record_cb A callback function invoked for each record streaming back from the cluster
     * @param array    $select An array of bin names which are the subset to be returned
     * @param array    $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_READ_TIMEOUT
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * * Aerospike::OPT_QUERY_NOBINS
     * @see Aerospike::predicateEquals()
     * @see Aerospike::predicateBetween()
     * @see Aerospike::predicateContains()
     * @see Aerospike::predicateRange()
     * @see Aerospike::predicateGeoContainsGeoJSONPoint()
     * @see Aerospike::predicateGeoWithinGeoJSONRegion()
     * @see Aerospike::predicateGeoContainsPoint()
     * @see Aerospike::predicateGeoWithinRadius()
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function query(string $ns, string $set, array $where, callable $record_cb, array $select = [], array $options = []) {}

    /**
     * Helper method for creating an EQUALS predicate
     * @param string     $bin name
     * @param int|string $val
     * @see Aerospike::query()
     * @see Aerospike::queryApply()
     * @see Aerospike::aggregate()
     * @return array expressing the predicate, to be used by query(), queryApply() or aggregate()
     * ```
     * Associative Array:
     *   bin => bin name
     *   op => Aerospike::OP_EQ
     *   val => scalar integer/string value
     * ```
     */
    public static function predicateEquals(string $bin, $val) {}

    /**
     * Helper method for creating a BETWEEN predicate
     * @param string $bin name
     * @param int    $min
     * @param int    $max
     * @see Aerospike::query()
     * @see Aerospike::queryApply()
     * @see Aerospike::aggregate()
     * @return array expressing the predicate, to be used by query(), queryApply() or aggregate()
     * ```
     * Associative Array:
     *   bin => bin name
     *   op  => Aerospike::OP_BETWEEN
     *   val => [min, max]
     * ```
     */
    public static function predicateBetween(string $bin, int $min, int $max) {}

    /**
     * Helper method for creating an CONTAINS predicate
     *
     * Similar to predicateEquals(), predicateContains() looks for an exact
     * match of a value inside a complex type - a list containing the value
     * (if the index type is *INDEX_TYPE_LIST*), the value contained in the keys
     * of a map (if the index type is *INDEX_TYPE_MAPKEYS*), or a record with the
     * given value contained in the values of a map (if the index type was
     * *INDEX_TYPE_MAPVALUES*).
     * @param string     $bin name
     * @param int        $index_type one of Aerospike::INDEX_TYPE_*
     * @param int|string $val
     * @see Aerospike::query()
     * @see Aerospike::queryApply()
     * @see Aerospike::aggregate()
     * @return array expressing the predicate, to be used by query(), queryApply() or aggregate()
     * ```
     * Associative Array:
     *   bin => bin name
     *   index_type => Aerospike::INDEX_TYPE_*
     *   op => Aerospike::OP_CONTAINS
     *   val => scalar integer/string value
     * ```
     */
    public static function predicateContains(string $bin, int $index_type, $val) {}

    /**
     * Helper method for creating a RANGE predicate
     *
     * Similar to predicateBetween(), predicateRange() looks for records with a
     * range of values inside a complex type - a list containing the values
     * (if the index type is *INDEX_TYPE_LIST*), the values contained in the keys
     * of a map (if the index type is *INDEX_TYPE_MAPKEYS*), or a record with the
     * given values contained in the values of a map (if the index type was
     * *INDEX_TYPE_MAPVALUES*)
     * @param string $bin name
     * @param int    $index_type one of Aerospike::INDEX_TYPE_*
     * @param int    $min
     * @param int    $max
     * @see Aerospike::query()
     * @see Aerospike::queryApply()
     * @see Aerospike::aggregate()
     * @return array expressing the predicate, to be used by query(), queryApply() or aggregate()
     * ```
     * Associative Array:
     *   bin => bin name
     *   index_type => Aerospike::INDEX_TYPE_*
     *   op  => Aerospike::OP_BETWEEN
     *   val => [min, max]
     * ```
     */
    public static function predicateRange(string $bin, int $index_type, int $min, int $max) {}

    /**
     * Helper method for creating a GEOCONTAINS point predicate
     * @param string $bin name
     * @param string $point GeoJSON string describing a point
     * @see Aerospike::query()
     * @see Aerospike::queryApply()
     * @see Aerospike::aggregate()
     * @return array expressing the predicate, to be used by query(), queryApply() or aggregate()
     * ```
     * Associative Array:
     *   bin => bin name
     *   op => Aerospike::OP_GEOCONTAINSPOINT
     *   val => GeoJSON string
     * ```
     */
    public static function predicateGeoContainsGeoJSONPoint(string $bin, string $point) {}

    /**
     * Helper method for creating a GEOCONTAINS point predicate
     * @param string $bin name
     * @param float  $long longitude of the point
     * @param float  $lat  latitude of the point
     * @see Aerospike::query()
     * @see Aerospike::queryApply()
     * @see Aerospike::aggregate()
     * @return array expressing the predicate, to be used by query(), queryApply() or aggregate()
     * ```
     * Associative Array:
     *   bin => bin name
     *   op => Aerospike::OP_GEOCONTAINSPOINT
     *   val => GeoJSON string produced from $long and $lat
     * ```
     */
    public static function predicateGeoContainsPoint(string $bin, float $long, float $lat) {}

    /**
     * Helper method for creating a GEOWITHIN region predicate
     * @param string $bin name
     * @param string $region GeoJSON string describing the region (polygon)
     * @see Aerospike::query()
     * @see Aerospike::queryApply()
     * @see Aerospike::aggregate()
     * @return array expressing the predicate, to be used by query(), queryApply() or aggregate()
     * ```
     * Associative Array:
     *   bin => bin name
     *   op => Aerospike::OP_GEOWITHINREGION
     *   val => GeoJSON string
     * ```
     */
    public static function predicateGeoWithinGeoJSONRegion(string $bin, string $region) {}

    /**
     * Helper method for creating a GEOWITHIN circle region predicate
     * @param string $bin name
     * @param float  $long longitude of the point
     * @param float  $lat  latitude of the point
     * @param float  $radiusMeter radius of the circle in meters
     * @see Aerospike::query()
     * @see Aerospike::queryApply()
     * @see Aerospike::aggregate()
     * @return array expressing the predicate, to be used by query(), queryApply() or aggregate()
     * ```
     * Associative Array:
     *   bin => bin name
     *   op => Aerospike::OP_GEOWITHINREGION
     *   val => GeoJSON string produced from $long, $lat and $radius
     * ```
     */
    public static function predicateGeoWithinRadius(string $bin, float $long, float $lat, float $radiusMeter) {}

    /**
     * Get the status of a background job triggered by Aerospike::scanApply or Aerospike::queryApply
     *
     * ```php
     * // after a queryApply() where $job_id was set:
     * do {
     *     time_nanosleep(0, 30000000); // pause 30ms
     *     $status = $client->jobInfo($job_id, Aerospike::JOB_QUERY, $job_info);
     *     var_dump($job_info);
     * } while($job_info['status'] != Aerospike::JOB_STATUS_COMPLETED);
     * ```
     *
     * @param int   $job_id  The Job ID
     * @param int   $job_type The type of the job, either Aerospike::JOB_QUERY, or Aerospike::JOB_SCAN
     * @param array &$info    The status of the background job filled (by reference) as an array of
     * ```
     * [
     *   'progress_pct' => progress percentage for the job
     *   'records_read' => number of records read by the job
     *   'status'       => one of Aerospike::STATUS_*
     * ]
     * ```
     * @param array  $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_READ_TIMEOUT
     * @see Aerospike::scanApply()
     * @see Aerospike::queryApply()
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function jobInfo(int $job_id, $job_type, array &$info, array $options = []) {}

    // UDF Methods

    /**
     * Register a UDF module with the cluster
     *
     * Note that modules containing stream UDFs need to also be copied to the
     * path described in `aerospike.udf.lua_user_path`, as the last reduce
     * iteration is run locally on the client (after reducing on all the nodes
     * of the cluster).
     *
     * Currently the only UDF language supported is Lua.
     * ```php
     * $status = $client->register('/path/to/my_udf.lua', 'my_udf.lua');
     * if ($status == Aerospike::OK) {
     *     echo "UDF module at $path is registered as my_udf on the Aerospike DB.\n";
     * } else {
     *     echo "[{$client->errorno()}] ".$client->error();
     * }
     * ```
     * @link https://www.aerospike.com/docs/udf/udf_guide.html UDF Development Guide
     * @param string $path the path to the Lua file on the client-side machine
     * @param string $module the name of the UDF module to register with the cluster
     * @param int    $language
     * @param array  $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * @see Aerospike::OPT_WRITE_TIMEOUT Aerospike::OPT_WRITE_TIMEOUT options
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function register($path, $module, $language = Aerospike::UDF_TYPE_LUA, $options = []) {}

    /**
     * Remove a UDF module from the cluster
     *
     * ```php
     * $status = $client->deregister('my_udf');
     * if ($status == Aerospike::OK) {
     *     echo "UDF module my_udf was removed from the Aerospike DB.\n";
     * } else {
     *     echo "[{$client->errorno()}] ".$client->error();
     * }
     * ```
     * @param string $module the name of the UDF module registered with the cluster
     * @param array  $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * @see Aerospike::OPT_WRITE_TIMEOUT Aerospike::OPT_WRITE_TIMEOUT
     * @see Aerospike::ERR_UDF_NOT_FOUND UDF error status codes
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function deregister($module, $options = []) {}

    /**
     * List the UDF modules registered with the cluster
     *
     * The modules array has the following structure:
     * ```
     * Array of:
     *   name => module name
     *   type => Aerospike::UDF_TYPE_*
     * ```
     * **Example**
     * ```php
     * $status = $client->listRegistered($modules);
     * if ($status == Aerospike::OK) {
     *     var_dump($modules);
     * } else {
     *     echo "[{$client->errorno()}] ".$client->error();
     * }
     * ```
     * ```
     * array(2) {
     *   [0]=>
     *   array(2) {
     *     ["name"]=>
     *     string(13) "my_record_udf"
     *     ["type"]=>
     *     int(0)
     *   }
     *   [1]=>
     *   array(2) {
     *     ["name"]=>
     *     string(13) "my_stream_udf"
     *     ["type"]=>
     *     int(0)
     *   }
     * }
     * ```
     * @param array &$modules pass-by-reference param
     * @param int   $language
     * @param array $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_READ_TIMEOUT
     * @see Aerospike::OPT_READ_TIMEOUT Aerospike::OPT_READ_TIMEOUT
     * @see Aerospike::OK Aerospike::OK and error status codes
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function listRegistered(&$modules, $language = Aerospike::UDF_TYPE_LUA, $options = []) {}

    /**
     * Get the code for a UDF module registered with the cluster
     *
     * Populates _code_ with the content of the matching UDF _module_ that was
     * previously registered with the server.
     *
     * **Example**
     * ```php
     * $status = $client->getRegistered('my_udf', $code);
     * if ($status == Aerospike::OK) {
     *     var_dump($code);
     * } elseif ($status == Aerospike::ERR_LUA_FILE_NOT_FOUND) {
     *     echo "The UDF module my_udf was not found to be registered with the server.\n";
     * }
     * ```
     * ```
     * string(351) "function startswith(rec, bin_name, prefix)
     *   if not aerospike:exists(rec) then
     *     return false
     *   end
     *   if not prefix then
     *     return true
     *   end
     *   if not rec[bin_name] then
     *     return false
     *   end
     *   local bin_val = rec[bin_name]
     *   l = prefix:len()
     *   if l > bin_val:len() then
     *     return false
     *   end
     *   ret = bin_val:sub(1, l) == prefix
     *   return ret
     * end
     * "
     * ```
     * @param string $module the name of the UDF module registered with the cluster
     * @param string &$code pass-by-reference param
     * @param string $language
     * @param array  $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_READ_TIMEOUT
     * @see Aerospike::OPT_READ_TIMEOUT Aerospike::OPT_READ_TIMEOUT
     * @see Aerospike::ERR_LUA_FILE_NOT_FOUND UDF error status codes
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function getRegistered($module, &$code, $language = Aerospike::UDF_TYPE_LUA, $options = []) {}

    /**
     * Apply a UDF to a record
     *
     * Applies the UDF _module.function_ to a record with a given _key_.
     * Arguments can be passed to the UDF and any returned value optionally captured.
     *
     * Currently the only UDF language supported is Lua.
     * ```php
     * $key = ["ns" => "test", "set" => "users", "key" => "1234"];
     * $status = $client->apply($key, 'my_udf', 'startswith', ['email', 'hey@'], $returned);
     * if ($status == Aerospike::OK) {
     *     if ($returned) {
     *         echo "The email of the user with key {$key['key']} starts with 'hey@'.\n";
     *     } else {
     *         echo "The email of the user with key {$key['key']} does not start with 'hey@'.\n";
     *     }
     * } elseif ($status == Aerospike::ERR_UDF_NOT_FOUND) {
     *     echo "The UDF module my_udf.lua was not registered with the Aerospike DB.\n";
     * } else {
     *     echo "[{$client->errorno()}] ".$client->error();
     * }
     * ```
     * ```
     * The email of the user with key 1234 starts with 'hey@'.
     * ```
     * @link https://www.aerospike.com/docs/udf/udf_guide.html UDF Development Guide
     * @link https://www.aerospike.com/docs/udf/developing_record_udfs.html Developing Record UDFs
     * @link https://www.aerospike.com/docs/udf/api_reference.html Lua UDF - API Reference
     * @param array $key The key identifying the record. An array with keys `['ns','set','key']` or `['ns','set','digest']`
     * @param string $module the name of the UDF module registered with the cluster
     * @param string $function the name of the UDF
     * @param array  $args optional arguments for the UDF
     * @param mixed  &$returned pass-by-reference param
     * @param array  $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * * Aerospike::OPT_POLICY_KEY
     * * Aerospike::OPT_SERIALIZER
     * * Aerospike::OPT_POLICY_DURABLE_DELETE
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * @see Aerospike::OPT_WRITE_TIMEOUT Aerospike::OPT_WRITE_TIMEOUT options
     * @see Aerospike::OPT_POLICY_KEY Aerospike::OPT_POLICY_KEY options
     * @see Aerospike::OPT_SERIALIZER Aerospike::OPT_SERIALIZER options
     * @see Aerospike::OPT_POLICY_DURABLE_DELETE Aerospike::OPT_POLICY_DURABLE_DELETE options
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::ERR_LUA UDF error status codes
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function apply(array $key, string $module, string $function, array $args = [], &$returned = null, $options = []) {}

    /**
     * Apply a UDF to each record in a scan
     *
     * Scan the *ns.set* and apply a UDF _module.function_ to each of its records.
     * Arguments can be passed to the UDF and any returned value optionally captured.
     *
     * Currently the only UDF language supported is Lua.
     * ```php
     * $status = $client->scanApply("test", "users", "my_udf", "mytransform", array(20), $job_id);
     * if ($status === Aerospike::OK) {
     *     var_dump("Job ID is $job_id");
     * } else if ($status === Aerospike::ERR_CLIENT) {
     *     echo "An error occured while initiating the BACKGROUND SCAN [{$client->errorno()}] ".$client->error();
     * } else {
     *     echo "An error occured while running the BACKGROUND SCAN [{$client->errorno()}] ".$client->error();
     * }
     * ```
     * ```
     * string(12) "Job ID is 1"
     * ```
     * @link https://www.aerospike.com/docs/udf/udf_guide.html UDF Development Guide
     * @link https://www.aerospike.com/docs/udf/developing_record_udfs.html Developing Record UDFs
     * @link https://www.aerospike.com/docs/udf/api_reference.html Lua UDF - API Reference
     * @param string $ns the namespace
     * @param string $set the set within the given namespace
     * @param string $module the name of the UDF module registered with the cluster
     * @param string $function the name of the UDF
     * @param array  $args optional arguments for the UDF
     * @param int    &$job_id pass-by-reference filled by the job ID of the scan
     * @param array  $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * * Aerospike::OPT_POLICY_DURABLE_DELETE
     * * Aerospike::OPT_READ_TIMEOUT
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * * Aerospike::OPT_FAIL_ON_CLUSTER_CHANGE
     * * Aerospike::OPT_SCAN_RPS_LIMIT
     * @see Aerospike::OPT_WRITE_TIMEOUT Aerospike::OPT_WRITE_TIMEOUT options
     * @see Aerospike::OPT_POLICY_DURABLE_DELETE Aerospike::OPT_POLICY_DURABLE_DELETE options
     * @see Aerospike::ERR_LUA UDF error status codes
     * @see Aerospike::jobInfo()
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function scanApply(string $ns, string $set, string $module, string $function, array $args, int &$job_id, array $options = []) {}

    /**
     * Apply a UDF to each record in a query
     *
     * Query the *ns.set* with a predicate, and apply a UDF _module.function_
     * to each of matched records.
     * Arguments can be passed to the UDF and any returned value optionally captured.
     *
     * Currently the only UDF language supported is Lua.
     * ```php
     * $where = Aerospike::predicateBetween("age", 30, 39);
     * $status = $client->queryApply("test", "users", "my_udf", "mytransform", [20], $job_id);
     * if ($status === Aerospike::OK) {
     *     var_dump("Job ID is $job_id");
     * } else if ($status === Aerospike::ERR_CLIENT) {
     *     echo "An error occured while initiating the BACKGROUND SCAN [{$client->errorno()}] ".$client->error();
     * } else {
     *     echo "An error occured while running the BACKGROUND SCAN [{$client->errorno()}] ".$client->error();
     * }
     * ```
     * ```
     * string(12) "Job ID is 1"
     * ```
     * @link https://www.aerospike.com/docs/udf/udf_guide.html UDF Development Guide
     * @link https://www.aerospike.com/docs/udf/developing_record_udfs.html Developing Record UDFs
     * @link https://www.aerospike.com/docs/udf/api_reference.html Lua UDF - API Reference
     * @param string $ns the namespace
     * @param string $set the set within the given namespace
     * @param array $where the predicate for the query, usually created by the
     * predicate methods. The arrays conform to one of the following:
     * ```
     * Array:
     *   bin => bin name
     *   op => one of Aerospike::OP_EQ, Aerospike::OP_BETWEEN, Aerospike::OP_CONTAINS, Aerospike::OP_RANGE, etc
     *   val => scalar integer/string for OP_EQ and OP_CONTAINS or [$min, $max] for OP_BETWEEN and OP_RANGE
     *
     * or an empty array() for no predicate
     * ```
     * examples
     * ```
     * ["bin"=>"name", "op"=>Aerospike::OP_EQ, "val"=>"foo"]
     * ["bin"=>"age", "op"=>Aerospike::OP_BETWEEN, "val"=>[35,50]]
     * ["bin"=>"movies", "op"=>Aerospike::OP_CONTAINS, "val"=>"12 Monkeys"]
     * ["bin"=>"movies", "op"=>Aerospike::OP_RANGE, "val"=>[10,1000]]
     * [] // no predicate
     * ```
     * @param string $module the name of the UDF module registered with the cluster
     * @param string $function the name of the UDF
     * @param array  $args optional arguments for the UDF
     * @param int    &$job_id pass-by-reference filled by the job ID of the scan
     * @param array  $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * * Aerospike::OPT_POLICY_DURABLE_DELETE
     * * Aerospike::OPT_READ_TIMEOUT
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * @see Aerospike::OPT_WRITE_TIMEOUT Aerospike::OPT_WRITE_TIMEOUT options
     * @see Aerospike::OPT_POLICY_DURABLE_DELETE Aerospike::OPT_POLICY_DURABLE_DELETE options
     * @see Aerospike::OPT_SLEEP_BETWEEN_RETRIES Aerospike::OPT_SLEEP_BETWEEN_RETRIES options
     * @see Aerospike::OPT_TOTAL_TIMEOUT Aerospike::OPT_TOTAL_TIMEOUT options
     * @see Aerospike::OPT_SOCKET_TIMEOUT Aerospike::OPT_SOCKET_TIMEOUT options
     * @see Aerospike::MAX_RETRIES Aerospike::MAX_RETRIES options
     * @see Aerospike::ERR_LUA UDF error status codes
     * @see Aerospike::jobInfo()
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function queryApply(string $ns, string $set, array $where, string $module, string $function, array $args, int &$job_id, array $options = []) {}

    /**
     * Apply a stream UDF to a scan or secondary index query
     *
     * Apply the UDF _module.function_ to the result of running a secondary
     * index query on _ns.set_. The aggregated _returned_ variable is then
     * filled, with its type depending on the UDF. It may be a string, integer
     * or array, and potentially an array of arrays, such as in the case the
     * UDF does not specify a reducer and there are multiple nodes in the
     * cluster, each sending back the result of its own aggregation.
     *
     * As with query(), if an empty array is given as the _where_ predicate a
     * 'scan aggregation' is initiated instead of a query, which means the
     * stream UDF is applied to all the records returned by the scan.
     *
     * **Note** that modules containing stream UDFs need to also be copied to the
     * path described in `aerospike.udf.lua_user_path`, as the last reduce
     * iteration is run locally on the client, after reducing on all the nodes
     * of the cluster.
     *
     * **Note** aggregate is currently unsupported in PHP built with ZTS enabled.
     * Attempting to use it in that environment will fail.
     *
     * Currently the only UDF language supported is Lua.
     *
     * **Example Stream UDF**
     *
     * Module registered as stream_udf.lua
     * ```
     * local function having_ge_threshold(bin_having, ge_threshold)
     *     debug("group_count::thresh_filter: %s >  %s ?", tostring(rec[bin_having]), tostring(ge_threshold))
     *     return function(rec)
     *         if rec[bin_having] < ge_threshold then
     *             return false
     *         end
     *         return true
     *     end
     * end
     *
     * local function count(group_by_bin)
     *   return function(group, rec)
     *     if rec[group_by_bin] then
     *       local bin_name = rec[group_by_bin]
     *       group[bin_name] = (group[bin_name] or 0) + 1
     *     end
     *     return group
     *   end
     * end
     *
     * local function add_values(val1, val2)
     *   return val1 + val2
     * end
     *
     * local function reduce_groups(a, b)
     *   return map.merge(a, b, add_values)
     * end
     *
     * function group_count(stream, group_by_bin, bin_having, ge_threshold)
     *   if bin_having and ge_threshold then
     *     local myfilter = having_ge_threshold(bin_having, ge_threshold)
     *     return stream : filter(myfilter) : aggregate(map{}, count(group_by_bin)) : reduce(reduce_groups)
     *   else
     *     return stream : aggregate(map{}, count(group_by_bin)) : reduce(reduce_groups)
     *   end
     * end
     * ```
     * **Example of aggregating a stream UDF to the result of a secondary index query**
     * ```php
     * // assuming test.users has a bin first_name, show the first name distribution
     * // for users in their twenties
     * $where = Aerospike::predicateBetween("age", 20, 29);
     * $status = $client->aggregate("test", "users", $where, "stream_udf", "group_count", ["first_name"], $names);
     * if ($status == Aerospike::OK) {
     *     var_dump($names);
     * } else {
     *     echo "An error occured while running the AGGREGATE [{$client->errorno()}] ".$client->error();
     * }
     * ```
     * ```
     * array(5) {
     *   ["Claudio"]=>
     *   int(1)
     *   ["Michael"]=>
     *   int(3)
     *   ["Jennifer"]=>
     *   int(2)
     *   ["Jessica"]=>
     *   int(3)
     *   ["Jonathan"]=>
     *   int(3)
     * }
     * ```
     * @link https://www.aerospike.com/docs/udf/udf_guide.html UDF Development Guide
     * @link https://www.aerospike.com/docs/udf/developing_stream_udfs.html Developing Stream UDFs
     * @link https://www.aerospike.com/docs/guide/aggregation.html Aggregation
     * @param string $ns the namespace
     * @param string $set the set within the given namespace
     * @param array $where the predicate for the query, usually created by the
     * predicate methods. The arrays conform to one of the following:
     * ```
     * Array:
     *   bin => bin name
     *   op => one of Aerospike::OP_EQ, Aerospike::OP_BETWEEN, Aerospike::OP_CONTAINS, Aerospike::OP_RANGE
     *   val => scalar integer/string for OP_EQ and OP_CONTAINS or [$min, $max] for OP_BETWEEN and OP_RANGE
     *
     * or an empty array() for no predicate
     * ```
     * examples
     * ```
     * ["bin"=>"name", "op"=>Aerospike::OP_EQ, "val"=>"foo"]
     * ["bin"=>"age", "op"=>Aerospike::OP_BETWEEN, "val"=>[35,50]]
     * ["bin"=>"movies", "op"=>Aerospike::OP_CONTAINS, "val"=>"12 Monkeys"]
     * ["bin"=>"movies", "op"=>Aerospike::OP_RANGE, "val"=>[10,1000]]
     * [] // no predicate
     * ```
     * @param string $module the name of the UDF module registered with the cluster
     * @param string $function the name of the UDF
     * @param array  $args optional arguments for the UDF
     * @param mixed  &$returned pass-by-reference param
     * @param array  $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_READ_TIMEOUT
     * * Aerospike::OPT_READ_TIMEOUT
     * * Aerospike::OPT_SLEEP_BETWEEN_RETRIES
     * * Aerospike::OPT_TOTAL_TIMEOUT
     * * Aerospike::OPT_MAX_RETRIES
     * * Aerospike::OPT_SOCKET_TIMEOUT
     * @see Aerospike::OPT_READ_TIMEOUT Aerospike::OPT_READ_TIMEOUT options
     * @see Aerospike::ERR_LUA UDF error status codes
     * @see Aerospike::predicateEquals()
     * @see Aerospike::predicateBetween()
     * @see Aerospike::predicateContains()
     * @see Aerospike::predicateRange()
     * @see Aerospike::predicateGeoContainsGeoJSONPoint()
     * @see Aerospike::predicateGeoWithinGeoJSONRegion()
     * @see Aerospike::predicateGeoContainsPoint()
     * @see Aerospike::predicateGeoWithinRadius()
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function aggregate(string $ns, string $set, array $where, string $module, string $function, array $args, &$returned, array $options = []) {}

    // Admin methods

    /**
     * Create a secondary index on a bin of a specified set
     *
     * Create a secondary index of a given *index_type* on a namespace *ns*, *set* and *bin* with a specified *name*
     * ```php
     * $status = $client->addIndex("test", "user", "email", "user_email_idx", Aerospike::INDEX_TYPE_DEFAULT, Aerospike::INDEX_STRING);
     * if ($status == Aerospike::OK) {
     *     echo "Index user_email_idx created on test.user.email\n";
     * } else if ($status == Aerospike::ERR_INDEX_FOUND) {
     *     echo "This index has already been created.\n";
     * } else {
     *     echo "[{$client->errorno()}] ".$client->error();
     * }
     *
     * $client->addIndex("test", "user", "movies", "user_movie_titles_idx", Aerospike::INDEX_TYPE_MAPKEYS, Aerospike::INDEX_STRING);
     * $client->addIndex("test", "user", "movies", "user_movie_views_idx", Aerospike::INDEX_TYPE_MAPVALUES, Aerospike::INDEX_NUMERIC);
     * $client->addIndex("test", "user", "aliases", "user_aliases_idx", Aerospike::INDEX_TYPE_LIST, Aerospike::INDEX_STRING);
     *
     * $client->info("sindex", $res);
     * echo($res);
     * ```
     * @param string $ns the namespace
     * @param string $set the set within the given namespace
     * @param string $bin the bin on which the secondary index is to be created
     * @param string $name the name of the index
     * @param int    $indexType one of *Aerospike::INDEX\_TYPE\_\**
     * @param int    $dataType one of *Aerospike::INDEX_NUMERIC* and *Aerospike::INDEX_STRING*
     * @param array  $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * @see Aerospike::INDEX_TYPE_DEFAULT
     * @see Aerospike::INDEX_STRING
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function addIndex(string $ns, string $set, string $bin, string $name, int $indexType, int $dataType, array $options = []) {}

    /**
     * Drop a secondary index
     *
     * ```php
     * $status = $client->dropIndex("test", "user_email_idx");
     * if ($status == Aerospike::OK) {
     *     echo "Index user_email_idx was dropped from namespace 'test'\n";
     * } else if ($status == Aerospike::ERR_INDEX_NOT_FOUND) {
     *     echo "No such index exists.\n";
     * } else {
     *     echo "[{$client->errorno()}] ".$client->error();
     * }
     * ```
     * @param string $ns the namespace
     * @param string $name the name of the index
     * @param array  $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_WRITE_TIMEOUT
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function dropIndex(string $ns, string $name, array $options = []) {}

    // Info Methods

    /**
     * Send an info request to a single cluster node
     *
     * Interface with the cluster's command and control functions.
     * A formatted request string is sent to a cluster node, and a formatted
     * response returned.
     *
     * A specific host can be optionally set, otherwise the request command is
     * sent to the host definded for client constructor.
     *
     * ```php
     * $client->info('bins/test', $response);
     * var_dump($response);
     * ```
     * ```
     * string(53) "bins/test	num-bin-names=2,bin-names-quota=32768,demo,characters"
     * ```
     * @link https://www.aerospike.com/docs/reference/info Info Command Reference
     * @param string $request  a formatted info command
     * @param string &$response a formatted response from the server, filled by reference
     * @param null|array $host an array holding the cluster node connection information cluster
     *                         and manage its connections to them. ```[ 'addr' => $addr , 'port' =>  $port ]```
     * @param array  $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_READ_TIMEOUT
     * @return int The status code of the operation. Compare to the Aerospike class status constants.
     */
    public function info(string $request, string &$response, ?array $host = null, array $options = []) {}

    /**
     * Send an info request to a single cluster node
     *
     * Interface with the cluster's command and control functions.
     * A formatted request string is sent to a cluster node, and a formatted
     * response returned.
     *
     * A specific host can be optionally set, otherwise the request command is
     * sent to the host definded for client constructor.
     *
     * ```php
     * $response = $client->infoMany('build');
     * var_dump($response);
     * ```
     * ```
     * array(3) {
     *   ["BB936F106CA0568"]=>
     *   string(6) "build  3.3.19"
     *   ["AE712F245BB9876"]=>
     *   string(6) "build  3.3.19"
     *   ["DCBA9AA34EE12FA"]=>
     *   string(6) "build  3.3.19"
     * }
     * ```
     * @link https://www.aerospike.com/docs/reference/info Info Command Reference
     * @param string $request  a formatted info command
     * @param null|array $host an array of _host_ arrays, each with ```[ 'addr' => $addr , 'port' =>  $port ]```
     * @param array  $options an optional array of policy options, whose keys include
     * * Aerospike::OPT_READ_TIMEOUT
     * @return array results in the format
     * ```
     * Array:
     *  NODE-ID => response string
     * ```
     */
    public function infoMany(string $request, ?array $host = null, array $options = []) {}

    /**
     * Get the addresses of the cluster nodes
     *
     * ```php
     * $nodes = $client->getNodes();
     * var_dump($nodes);
     * ```
     * ```
     * array(2) {
     *   [0]=>
     *   array(2) {
     *     ["addr"]=>
     *     string(15) "192.168.120.145"
     *     ["port"]=>
     *     string(4) "3000"
     *   }
     *   [1]=>
     *   array(2) {
     *     ["addr"]=>
     *     string(15) "192.168.120.144"
     *     ["port"]=>
     *     string(4) "3000"
     *   }
     * }
     * ```
     * @return array results in the format
     * ```
     * Array:
     *   Array:
     *     'addr' => the IP address of the node
     *     'port' => the port of the node
     * ```
     */
    public function getNodes() {}

    // Logging Methods

    /**
     * Set the logging threshold of the Aerospike object
     *
     * @param int $log_level one of `Aerospike::LOG_LEVEL_*` values
     * * Aerospike::LOG_LEVEL_OFF
     * * Aerospike::LOG_LEVEL_ERROR
     * * Aerospike::LOG_LEVEL_WARN
     * * Aerospike::LOG_LEVEL_INFO
     * * Aerospike::LOG_LEVEL_DEBUG
     * * Aerospike::LOG_LEVEL_TRACE
     * @see Aerospike::LOG_LEVEL_OFF Aerospike::LOG_LEVEL_* constants
     */
    public function setLogLevel(int $log_level) {}

    /**
     * Set a handler for log events
     *
     * Registers a callback method that will be triggered whenever a logging event above the declared log threshold occurs.
     *
     * ```php
     * $config = ["hosts" => [["addr"=>"localhost", "port"=>3000]], "shm"=>[]];
     * $client = new Aerospike($config, true);
     * if (!$client->isConnected()) {
     *   echo "Aerospike failed to connect[{$client->errorno()}]: {$client->error()}\n";
     *   exit(1);
     * }
     * $client->setLogLevel(Aerospike::LOG_LEVEL_DEBUG);
     * $client->setLogHandler(function ($level, $file, $function, $line) {
     *   switch ($level) {
     *     case Aerospike::LOG_LEVEL_ERROR:
     *       $lvl_str = 'ERROR';
     *       break;
     *     case Aerospike::LOG_LEVEL_WARN:
     *       $lvl_str = 'WARN';
     *       break;
     *     case Aerospike::LOG_LEVEL_INFO:
     *       $lvl_str = 'INFO';
     *       break;
     *     case Aerospike::LOG_LEVEL_DEBUG:
     *       $lvl_str = 'DEBUG';
     *       break;
     *     case Aerospike::LOG_LEVEL_TRACE:
     *       $lvl_str = 'TRACE';
     *       break;
     *     default:
     *       $lvl_str = '???';
     *   }
     *   error_log("[$lvl_str] in $function at $file:$line");
     * });
     * ```
     *
     * @see Aerospike::LOG_LEVEL_OFF Aerospike::LOG_LEVEL_* constants
     * @param callable $log_handler a callback function with the signature
     * ```php
     * function log_handler ( int $level, string $file, string $function, int $line ) : void
     * ```
     */
    public function setLogHandler(callable $log_handler) {}

    // Unsupported Type Handler Methods

    /**
     * Set a serialization handler for unsupported types
     *
     * Registers a callback method that will be triggered whenever a write method handles a value whose type is unsupported.
     * This is a static method and the *serialize_cb* handler is global across all instances of the Aerospike class.
     *
     * ```php
     * Aerospike::setSerializer(function ($val) {
     *   return gzcompress(json_encode($val));
     * });
     * ```
     *
     * @link https://github.com/aerospike/aerospike-client-php/tree/master/doc#handling-unsupported-types Handling Unsupported Types
     * @param callable $serialize_cb a callback invoked for each value of an unsupported type, when writing to the cluster. The function must follow the signature
     * ```php
     * function aerospike_serialize ( mixed $value ) : string
     * ```
     * @see Aerospike::OPT_SERIALIZER Aerospike::OPT_SERIALIZER options
     */
    public function setSerializer(callable $serialize_cb) {}

    /**
     * Set a deserialization handler for unsupported types
     *
     * Registers a callback method that will be triggered whenever a read method handles a value whose type is unsupported.
     * This is a static method and the *unserialize_cb* handler is global across all instances of the Aerospike class.
     *
     * ```php
     * Aerospike::setDeserializer(function ($val) {
     *   return json_decode(gzuncompress($val));
     * });
     * ```
     *
     * @link https://github.com/aerospike/aerospike-client-php/tree/master/doc#handling-unsupported-types Handling Unsupported Types
     * @param callable $unserialize_cb a callback invoked for each value of an unsupported type, when reading from the cluster. The function must follow the signature
     * ```php
     * // $value is binary data of type AS_BYTES_BLOB
     * function aerospike_deserialize ( string $value )
     * ```
     * @see Aerospike::OPT_SERIALIZER Aerospike::OPT_SERIALIZER options
     */
    public function setDeserializer(callable $unserialize_cb) {}

    /*
     * Options can be assigned values that modify default behavior
     * Used by the constructor, read, write, scan, query, apply, and info
     * operations.
     */

    /* Key used to specify an array of read policy defaults used in the constructor.
       See https://github.com/aerospike/aerospike-client-php/blob/master/doc/policies.md
    */
    public const OPT_READ_DEFAULT_POL = "OPT_READ_DEFAULT_POL";

    /* Key used to specify an array of write policy defaults used in the constructor.
       See https://github.com/aerospike/aerospike-client-php/blob/master/doc/policies.md
    */
    public const OPT_WRITE_DEFAULT_POL = "OPT_WRITE_DEFAULT_POL";

    /* Key used to specify an array of remove policy defaults used in the constructor.
       See https://github.com/aerospike/aerospike-client-php/blob/master/doc/policies.md
    */
    public const OPT_REMOVE_DEFAULT_POL = "OPT_REMOVE_DEFAULT_POL";

    /* Key used to specify an array of batch policy defaults used in the constructor.
       See https://github.com/aerospike/aerospike-client-php/blob/master/doc/policies.md
    */
    public const OPT_BATCH_DEFAULT_POL = "OPT_BATCH_DEFAULT_POL";

    /* Key used to specify an array of operate policy defaults used in the constructor.
       See https://github.com/aerospike/aerospike-client-php/blob/master/doc/policies.md
    */
    public const OPT_OPERATE_DEFAULT_POL = "OPT_OPERATE_DEFAULT_POL";

    /* Key used to specify an array of query policy defaults used in the constructor.
       See https://github.com/aerospike/aerospike-client-php/blob/master/doc/policies.md
    */
    public const OPT_QUERY_DEFAULT_POL = "OPT_QUERY_DEFAULT_POL";

    /* Key used to specify an array of scan policy defaults used in the constructor.
       See https://github.com/aerospike/aerospike-client-php/blob/master/doc/policies.md
    */
    public const OPT_SCAN_DEFAULT_POL = "OPT_SCAN_DEFAULT_POL";

    /* Key used to specify an array of apply policy defaults used in the constructor.
       See https://github.com/aerospike/aerospike-client-php/blob/master/doc/policies.md
    */
    public const OPT_APPLY_DEFAULT_POL = "OPT_APPLY_DEFAULT_POL";

    /*
    Key used in the options argument of the constructor used to point to an array of TLS
    configuration parameters. Use of TLS requires an enterprise version of the Aerospike Server.
    */
    public const OPT_TLS_CONFIG = "OPT_TLS_CONFIG";

    /* Key used in the OPT_TLS boolean Whether or not to enable TLS.
    */
    public const OPT_TLS_ENABLE = "OPT_TLS_ENABLE";

    /*
    Key used to specify a string path to a trusted CA certificate file. By default TLS will use system standard trusted CA certificates
    */
    public const OPT_OPT_TLS_CAFILE = "OPT_OPT_TLS_CAFILE";

    /*
    Key used to specify a Path to a directory of trusted certificates. See the OpenSSL SSL_CTX_load_verify_locations manual page for more information about the format of the directory.
    */
    public const OPT_TLS_CAPATH = "OPT_TLS_CAPATH";

    /*Key used to specify a string representation of allowed protocols. Specifies enabled protocols. This format is the same as Apache's SSLProtocol documented at https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslprotocol . If not specified the client will use "-all +TLSv1.2".
    */
    public const OPT_TLS_PROTOCOLS = "OPT_TLS_PROTOCOLS";

    /*
    Key used to specify a string. Specifies enabled cipher suites. The format is the same as OpenSSL's Cipher List Format documented at https://www.openssl.org/docs/manmaster/apps/ciphers.html .If not specified the OpenSSL default cipher suite described in the ciphers documentation will be used. If you are not sure what cipher suite to select this option is best left unspecified
    */
    public const OPT_TLS_CIPHER_SUITE = "OPT_TLS_CIPHER_SUITE";

    /*
    Key used to specify a boolean. Enable CRL checking for the certificate chain leaf certificate. An error occurs if a suitable CRL cannot be found. By default CRL checking is disabled.
    */
    public const OPT_TLS_CRL_CHECK = "OPT_TLS_CRL_CHECK";

    /*
    Key used to specify a bolean. Enable CRL checking for the entire certificate chain. An error occurs if a suitable CRL cannot be found. By default CRL checking is disabled.
    */
    public const OPT_TLS_CRL_CHECK_ALL = "OPT_TLS_CRL_CHECK_ALL";

    /* Key used to specify a path to a certificate blacklist file. The file should contain one line for each blacklisted certificate. Each line starts with the certificate serial number expressed in hex. Each entry may optionally specify the issuer name of the certificate (serial numbers are only required to be unique per issuer). Example records: 867EC87482B2 /C=US/ST=CA/O=Acme/OU=Engineering/CN=Test Chain CA E2D4B0E570F9EF8E885C065899886461 */
    public const OPT_TLS_CERT_BLACKLIST = "OPT_TLS_CERT_BLACKLIST";

    /* Boolean: Log session information for each connection. */
    public const OPT_TLS_LOG_SESSION_INFO = "OPT_TLS_LOG_SESSION_INFO";

    /*
    Path to the client's key for mutual authentication. By default mutual authentication is disabled.
    */
    public const OPT_TLS_KEYFILE = "OPT_TLS_KEYFILE";

    /* Path to the client's certificate chain file for mutual authentication. By default mutual authentication is disabled.
    */
    public const OPT_TLS_CERTFILE = "OPT_TLS_CERTFILE";

    /**
     * Defines the length of time (in milliseconds) the client waits on establishing a connection.
     * @const OPT_CONNECT_TIMEOUT value in milliseconds (default: 1000)
     */
    public const OPT_CONNECT_TIMEOUT = "OPT_CONNECT_TIMEOUT";

    /**
     * Defines the length of time (in milliseconds) the client waits on a read
     * operation.
     * @const OPT_READ_TIMEOUT value in milliseconds (default: 1000)
     */
    public const OPT_READ_TIMEOUT = "OPT_READ_TIMEOUT";

    /**
     * Defines the length of time (in milliseconds) the client waits on a write
     * operation.
     * @const OPT_WRITE_TIMEOUT value in milliseconds (default: 1000)
     */
    public const OPT_WRITE_TIMEOUT = "OPT_WRITE_TIMEOUT";

    /**
     * Sets the TTL of the record along with a write operation.
     *
     * * TTL > 0 sets the number of seconds into the future in which to expire the record.
     * * TTL = 0 uses the default TTL defined for the namespace.
     * * TTL = -1 means the record should never expire.
     * * TTL = -2 means the record's TTL should not be modified.
     * @const OPT_TTL value in seconds, or the special values 0, -1 or -2 (default: 0)
     */
    public const OPT_TTL = "OPT_TTL";

    /**
     * Accepts one of the POLICY_KEY_* values.
     *
     * {@link https://www.aerospike.com/docs/client/php/usage/kvs/record-structure.html Records}
     * are uniquely identified by their digest, and can optionally store the value of their primary key
     * (their unique ID in the application).
     * @const OPT_POLICY_KEY Key storage policy option (digest-only or send key)
     */
    public const OPT_POLICY_KEY = "OPT_POLICY_KEY";

    /**
     * Do not store the primary key with the record (default)
     * @const POLICY_KEY_DIGEST digest only
     */
    public const POLICY_KEY_DIGEST = 0;

    /**
     * Store the primary key with the record
     * @const POLICY_KEY_SEND store the primary key with the record
     */
    public const POLICY_KEY_SEND = 1;

    /**
     * Accepts one of the POLICY_EXISTS_* values.
     *
     * By default writes will try to create a record or update its bins, which
     * is a behavior similar to how arrays work in PHP. Setting a write with a
     * different POLICY\_EXISTS\_* value can simulate a more DML-like behavior,
     * similar to an RDBMS.
     * @const OPT_POLICY_EXISTS existence policy option
     */
    public const OPT_POLICY_EXISTS = "OPT_POLICY_EXISTS";

    /**
     * "CREATE_OR_UPDATE" behavior. Create the record if it does not exist,
     * or update its bins if it does. (default)
     * @const POLICY_EXISTS_IGNORE create or update behavior
     */
    public const POLICY_EXISTS_IGNORE = 0;

    /**
     * Create a record ONLY if it DOES NOT exist.
     * @const POLICY_EXISTS_CREATE create only behavior (fail otherwise)
     */
    public const POLICY_EXISTS_CREATE = 1;

    /**
     * Update a record ONLY if it exists.
     * @const POLICY_EXISTS_UPDATE update only behavior (fail otherwise)
     */
    public const POLICY_EXISTS_UPDATE = 2;

    /**
     * Replace a record ONLY if it exists.
     * @const POLICY_EXISTS_REPLACE replace only behavior (fail otherwise)
     */
    public const POLICY_EXISTS_REPLACE = 3;

    /**
     * Create the record if it does not exist, or replace its bins if it does.
     * @const POLICY_EXISTS_CREATE_OR_REPLACE create or replace behavior
     */
    public const POLICY_EXISTS_CREATE_OR_REPLACE = 4;

    /**
     * Set to an array( Aerospike::POLICY_GEN_* [, (int) $gen_value ] )
     *
     * Specifies the behavior of write opertions with regards to the record's
     * generation. Used to implement a check-and-set (CAS) pattern.
     * @const OPT_POLICY_GEN generation policy option
     */
    public const OPT_POLICY_GEN = "OPT_POLICY_GEN";

    /**
     * Do not consider generation for the write operation.
     * @const POLICY_GEN_IGNORE write a record, regardless of generation (default)
     */
    public const POLICY_GEN_IGNORE = 0;

    /**
     * Only write if the record was not modified since a given generation value.
     * @const POLICY_GEN_EQ write a record, ONLY if generations are equal
     */
    public const POLICY_GEN_EQ = 1;

    /**
     * @const POLICY_GEN_GT write a record, ONLY if local generation is greater-than remote generation
     */
    public const POLICY_GEN_GT = 2;

    /**
     * Set to one of the SERIALIZER_* values.
     *
     * Supported types, such as string, integer, and array get directly cast to
     * the matching Aerospike types, such as as_string, as_integer, and as_map.
     * Unsupported types, such as boolean, need a serializer to handle them.
     * @const OPT_SERIALIZER determines a handler for unsupported data types
     */
    public const OPT_SERIALIZER = "OPT_SERIALIZER";

    /**
     * Throw an exception instead of serializing unsupported types.
     * @const SERIALIZER_NONE throw an error when serialization is required
     */
    public const SERIALIZER_NONE = 0;

    /**
     * Use the built-in PHP serializer for any unsupported types.
     * @const SERIALIZER_PHP use the PHP serialize/unserialize functions (default)
     */
    public const SERIALIZER_PHP = 1;

    /**
     * Use a user-defined serializer for any unsupported types.
     * @const SERIALIZER_USER use a pair of functions written in PHP for serialization
     */
    public const SERIALIZER_USER = 2;

    /**
     * Accepts one of the POLICY_COMMIT_LEVEL_* values.
     *
     * One of the {@link https://www.aerospike.com/docs/architecture/consistency.html per-transaction consistency levels}.
     * Specifies the number of replicas required to be successfully committed
     * before returning success in a write operation to provide the desired
     * consistency level.
     * @const OPT_POLICY_COMMIT_LEVEL commit level policy option
     */
    public const OPT_POLICY_COMMIT_LEVEL = "OPT_POLICY_COMMIT_LEVEL";

    /**
     * Return succcess only after successfully committing all replicas.
     * @const POLICY_COMMIT_LEVEL_ALL write to the master and all replicas (default)
     */
    public const POLICY_COMMIT_LEVEL_ALL = 0;

    /**
     * Return succcess after successfully committing the master replica.
     * @const POLICY_COMMIT_LEVEL_MASTER master will asynchronously write to replicas
     */
    public const POLICY_COMMIT_LEVEL_MASTER = 1;

    /**
     * Accepts one of the POLICY_REPLICA_* values.
     *
     * One of the {@link https://www.aerospike.com/docs/architecture/consistency.html per-transaction consistency levels}.
     * Specifies which partition replica to read from.
     * @const OPT_POLICY_REPLICA replica policy option
     */
    public const OPT_POLICY_REPLICA = "OPT_POLICY_REPLICA";

    /**
     * Read from the partition master replica node.
     * @const POLICY_REPLICA_MASTER read from master
     */
    public const POLICY_REPLICA_MASTER = 0;

    /**
     * Read from an unspecified replica node.
     * @const POLICY_REPLICA_ANY read from any replica node
     */
    public const POLICY_REPLICA_ANY = 1;

    /**
     *   Always try node containing master partition first. If connection fails and
     *   `retry_on_timeout` is true, try node containing replica partition.
     *   Currently restricted to master and one replica. (default)
     * @const POLICY_REPLICA_SEQUENCE attempt to read from master first, then try the node containing replica partition if connection failed. (default)
     */
    public const POLICY_REPLICA_SEQUENCE = 2;

    /**
     * Try node on the same rack as the client first.  If there are no nodes on the
     * same rack, use POLICY_REPLICA_SEQUENCE instead.
     *
     * "rack_aware" must be set to true in the client constructor, and "rack_id" must match the server rack configuration
     * to enable this functionality.
     * @const POLICY_REPLICA_PREFER_RACK attemp to read from master first, then try the node containing replica partition if connection failed. (default)
     */
    public const POLICY_REPLICA_PREFER_RACK = 3;

    /**
     * Accepts one of the POLICY_READ_MODE_AP_* values.
     *
     * One of the {@link https://www.aerospike.com/docs/architecture/consistency.html per-transaction consistency levels}.
     * Specifies the number of replicas to be consulted in a read operation to
     * provide the desired consistency level in availability mode.
     * @const OPT_POLICY_READ_MODE_AP policy read option for availability namespaces
     */
    public const OPT_POLICY_READ_MODE_AP = "OPT_POLICY_READ_MODE_AP";

    /**
     * Involve a single replica in the operation.
     * @const POLICY_READ_MODE_AP_ONE (default)
     */
    public const POLICY_READ_MODE_AP_ONE = 0;

    /**
     * Involve all replicas in the operation.
     * @const AS_POLICY_READ_MODE_AP_ALL
     */
    public const AS_POLICY_READ_MODE_AP_ALL = 1;

    /**
     * Accepts one of the POLICY_READ_MODE_SC_* values.
     *
     * One of the {@link https://www.aerospike.com/docs/architecture/consistency.html per-transaction consistency levels}.
     * Specifies the number of replicas to be consulted in a read operation to
     * provide the desired consistency level.
     * @const OPT_POLICY_READ_MODE_SC policy read option for consistency namespaces
     */
    public const OPT_POLICY_READ_MODE_SC = "OPT_POLICY_READ_MODE_SC";

    /**
     * Always read from master. Record versions are local to session.
     * @const POLICY_READ_MODE_SC_SESSION (default)
     */
    public const POLICY_READ_MODE_SC_SESSION = 0;

    /**
     * Always read from master. Record versions are global and thus serialized.
     * @const POLICY_READ_MODE_SC_LINEARIZE
     */
    public const POLICY_READ_MODE_SC_LINEARIZE = 1;

    /**
     * Read from master or fully migrated replica. Record versions may not always increase.
     * @const POLICY_READ_MODE_SC_ALLOW_REPLICA
     */
    public const POLICY_READ_MODE_SC_ALLOW_REPLICA = 2;

    /**
     * Read from master or fully migrated replica. Unavailable partitions are allowed. Record versions may not always increase.
     * @const POLICY_READ_MODE_SC_ALLOW_UNAVAILABLE
     */
    public const POLICY_READ_MODE_SC_ALLOW_UNAVAILABLE = 3;

    /*
      * Should raw bytes representing a list or map be deserialized to an array.
      * Set to false for backup programs that just need access to raw bytes.
      * Default: true
      @const OPT_DESERIALIZE
    */
    public const OPT_DESERIALIZE = "deserialize";

    /**
     * Milliseconds to sleep between retries.  Enter zero to skip sleep.
     * const OPT_SLEEP_BETWEEN_RETRIES
     */
    public const OPT_SLEEP_BETWEEN_RETRIES = "sleep_between_retries";

    /**
     * Maximum number of retries before aborting the current transaction.
     * The initial attempt is not counted as a retry.
     * If OPT_MAX_RETRIES is exceeded, the transaction will return error ERR_TIMEOUT.
     * WARNING: Database writes that are not idempotent (such as "add")
     * should not be retried because the write operation may be performed
     * multiple times if the client timed out previous transaction attempts.
     * It's important to use a distinct write policy for non-idempotent
     * writes which sets OPT_MAX_RETRIES = 0;
     **/
    public const OPT_MAX_RETRIES = "OPT_MAX_RETRIES";

    /**
     * Total transaction timeout in milliseconds.
     * The OPT_TOTAL_TIMEOUT is tracked on the client and sent to the server along with
     * the transaction in the wire protocol.  The client will most likely timeout
     * first, but the server also has the capability to timeout the transaction.

     * If OPT_TOTAL_TIMEOUT is not zero and OPT_TOTAL_TIMEOUT is reached before the transaction
     * completes, the transaction will return error ERR_TIMEOUT.
     * If OPT_TOTAL_TIMEOUT is zero, there will be no total time limit.
     */
    public const OPT_TOTAL_TIMEOUT = "OPT_TOTAL_TIMEOUT";

    /**
     * Socket idle timeout in milliseconds when processing a database command.

     * If OPT_SOCKET_TIMEOUT is not zero and the socket has been idle for at least OPT_SOCKET_TIMEOUT,
     * both OPT_MAX_RETRIES and OPT_TOTAL_TIMEOUT are checked.  If OPT_MAX_RETRIES and OPT_TOTAL_TIMEOUT are not
     * exceeded, the transaction is retried.

     * If both OPT_SOCKET_TIMEOUT and OPT_TOTAL_TIMEOUT are non-zero and OPT_SOCKET_TIMEOUT > OPT_TOTAL_TIMEOUT,
     * then OPT_SOCKET_TIMEOUT will be set to OPT_TOTAL_TIMEOUT.  If OPT_SOCKET_TIMEOUT is zero, there will be
     * no socket idle limit.
     */
    public const OPT_SOCKET_TIMEOUT = "OPT_SOCKET_TIMEOUT";

    /**
     * Determine if batch commands to each server are run in parallel threads.
     */
    public const OPT_BATCH_CONCURRENT = "OPT_BATCH_CONCURRENT";

    /**
     * Allow batch to be processed immediately in the server's receiving thread when the server
     * deems it to be appropriate.  If false, the batch will always be processed in separate
     * transaction threads.  This field is only relevant for the new batch index protocol.
     *
     * For batch exists or batch reads of smaller sized records (<= 1K per record), inline
     * processing will be significantly faster on "in memory" namespaces.  The server disables
     * inline processing on disk based namespaces regardless of this policy field.
     *
     * Inline processing can introduce the possibility of unfairness because the server
     * can process the entire batch before moving onto the next command.
     * Default: true
     */
    public const OPT_ALLOW_INLINE = "OPT_ALLOW_INLINE";

    /**
     * Send set name field to server for every key in the batch for batch index protocol.
     * This is only necessary when authentication is enabled and security roles are defined
     * on a per set basis.
     * Default: false
     */
    public const OPT_SEND_SET_NAME = "OPT_SEND_SET_NAME";

    /**
     * Abort the scan if the cluster is not in a stable state. Default false
     */
    public const OPT_FAIL_ON_CLUSTER_CHANGE = "OPT_FAIL_ON_CLUSTER_CHANGE";

    /**
     * Accepts one of the SCAN_PRIORITY_* values.
     *
     * @const OPT_SCAN_PRIORITY The priority of the scan
     */
    public const OPT_SCAN_PRIORITY = "OPT_SCAN_PRIORITY";

    /**
     * The cluster will auto-adjust the priority of the scan.
     * @const SCAN_PRIORITY_AUTO auto-adjust the scan priority (default)
     */
    public const SCAN_PRIORITY_AUTO = "SCAN_PRIORITY_AUTO";

    /**
     * Set the scan as having low priority.
     * @const SCAN_PRIORITY_LOW low priority scan
     */
    public const SCAN_PRIORITY_LOW = "SCAN_PRIORITY_LOW";

    /**
     * Set the scan as having medium priority.
     * @const SCAN_PRIORITY_MEDIUM medium priority scan
     */
    public const SCAN_PRIORITY_MEDIUM = "SCAN_PRIORITY_MEDIUM";

    /**
     * Set the scan as having high priority.
     * @const SCAN_PRIORITY_HIGH high priority scan
     */
    public const SCAN_PRIORITY_HIGH = "SCAN_PRIORITY_HIGH";

    /**
     * Do not return the bins of the records matched by the scan.
     *
     * @const OPT_SCAN_NOBINS boolean value (default: false)
     */
    public const OPT_SCAN_NOBINS = "OPT_SCAN_NOBINS";

    /**
     * Set the scan to run over a given percentage of the possible records.
     *
     * @const OPT_SCAN_PERCENTAGE integer value from 1-100 (default: 100)
     */
    public const OPT_SCAN_PERCENTAGE = "OPT_SCAN_PERCENTAGE";

    /**
     * Scan all the nodes in the cluster concurrently.
     *
     * @const OPT_SCAN_CONCURRENTLY boolean value (default: false)
     */
    public const OPT_SCAN_CONCURRENTLY = "OPT_SCAN_CONCURRENTLY";

    /**
     * Do not return the bins of the records matched by the query.
     *
     * @const OPT_QUERY_NOBINS boolean value (default: false)
     */
    public const OPT_QUERY_NOBINS = "OPT_QUERY_NOBINS";

    /**
     * Revert to the older batch-direct protocol, instead of batch-index.
     *
     * @const USE_BATCH_DIRECT boolean value (default: false)
     */
    public const USE_BATCH_DIRECT = "USE_BATCH_DIRECT";

    /**
     * Set to true to enable durable delete for the operation.
     * Durable deletes are an Enterprise Edition feature
     *
     * @const OPT_POLICY_DURABLE_DELETE boolean value (default: false)
     */
    public const OPT_POLICY_DURABLE_DELETE = "OPT_POLICY_DURABLE_DELETE";

    /**
     * Map policy declaring the ordering of an Aerospike map type
     *
     * @see Aerospike::AS_MAP_UNORDERED
     * @see Aerospike::AS_MAP_KEY_ORDERED
     * @see Aerospike::AS_MAP_KEY_VALUE_ORDERED
     * @const OPT_MAP_ORDER
     */
    public const OPT_MAP_ORDER = "OPT_MAP_ORDER";

    /**
     * The Aerospike map is unordered
     * @const AS_MAP_UNORDERED (default)
     */
    public const AS_MAP_UNORDERED = "AS_MAP_UNORDERED";

    /**
     * The Aerospike map is ordered by key
     * @const AS_MAP_KEY_ORDERED
     */
    public const AS_MAP_KEY_ORDERED = "AS_MAP_KEY_ORDERED";

    /**
     * The Aerospike map is ordered by key and value
     * @const AS_MAP_KEY_VALUE_ORDERED
     */
    public const AS_MAP_KEY_VALUE_ORDERED = "AS_MAP_KEY_VALUE_ORDERED";

    /**
     * Map policy declaring the behavior of map write operations
     * @see Aerospike::AS_MAP_UPDATE
     * @see Aerospike::AS_MAP_UPDATE_ONLY
     * @see Aerospike::AS_MAP_CREATE_ONLY
     * @const OPT_MAP_WRITE_MODE
     */
    public const OPT_MAP_WRITE_MODE = "OPT_MAP_WRITE_MODE";

    /**
     * @const AS_MAP_UPDATE (default)
     */
    public const AS_MAP_UPDATE = "AS_MAP_UPDATE";

    /**
     * @const AS_MAP_UPDATE_ONLY
     */
    public const AS_MAP_UPDATE_ONLY = "AS_MAP_UPDATE_ONLY";

    /**
     * @const AS_MAP_CREATE_ONLY
     */
    public const AS_MAP_CREATE_ONLY = "AS_MAP_CREATE_ONLY";

    /**
     * Map policy flags declaring the behavior of map write operations
     * @see Aerospike::AS_MAP_WRITE_DEFAULT
     * @see Aerospike::AS_MAP_WRITE_CREATE_ONLY
     * @see Aerospike::AS_MAP_WRITE_UPDATE_ONLY
     * @see Aerospike::AS_MAP_WRITE_NO_FAIL
     * @see Aerospike::AS_MAP_WRITE_PARTIAL
     * @const OPT_MAP_WRITE_FLAGS
     */
    public const OPT_MAP_WRITE_FLAGS = "OPT_MAP_WRITE_FLAGS";

    /**
     * Default. Allow create or update.
     * @const AS_MAP_WRITE_DEFAULT (default)
     */
    public const AS_MAP_WRITE_DEFAULT = "AS_MAP_WRITE_DEFAULT";

    /**
     * If the key already exists, the item will be denied. If the key does not exist, a new item will be created.
     * @const AS_MAP_WRITE_CREATE_ONLY
     */
    public const AS_MAP_WRITE_CREATE_ONLY = "AS_MAP_WRITE_CREATE_ONLY";

    /**
     * If the key already exists, the item will be overwritten. If the key does not exist, the item will be denied.
     * @const AS_MAP_WRITE_UPDATE_ONLY
     */
    public const AS_MAP_WRITE_UPDATE_ONLY = "AS_MAP_WRITE_UPDATE_ONLY";

    /**
     * Do not raise error if a map item is denied due to write flag constraints (always succeed).
     * @const AS_MAP_WRITE_NO_FAIL
     */
    public const AS_MAP_WRITE_NO_FAIL = "AS_MAP_WRITE_NO_FAIL";

    /**
     * Allow other valid map items to be committed if a map item is denied due to write flag constraints.
     * @const AS_MAP_WRITE_PARTIAL
     */
    public const AS_MAP_WRITE_PARTIAL = "AS_MAP_WRITE_PARTIAL";

    /**
     * Do not return a result for the map operation (get and remove operations)
     * @link https://www.aerospike.com/docs/guide/cdt-map.html#map-apis Map Result Types
     * @const MAP_RETURN_NONE
     */
    public const MAP_RETURN_NONE = "AS_MAP_RETURN_NONE";

    /**
     * Return in key index order
     * @link https://www.aerospike.com/docs/guide/cdt-map.html#map-apis Map Result Types
     * @const AS_MAP_RETURN_INDEX
     */
    public const MAP_RETURN_INDEX = "AS_MAP_RETURN_INDEX";

    /**
     * Return in reverse key order
     * @link https://www.aerospike.com/docs/guide/cdt-map.html#map-apis Map Result Types
     * @const MAP_RETURN_REVERSE_INDEX
     */
    public const MAP_RETURN_REVERSE_INDEX = "AS_MAP_RETURN_REVERSE_INDEX";

    /**
     * Return in value order
     * @link https://www.aerospike.com/docs/guide/cdt-map.html#map-apis Map Result Types
     * @const MAP_RETURN_RANK
     */
    public const MAP_RETURN_RANK = "AS_MAP_RETURN_RANK";

    /**
     * Return in reverse value order
     * @link https://www.aerospike.com/docs/guide/cdt-map.html#map-apis Map Result Types
     * @const MAP_RETURN_REVERSE_RANK
     */
    public const MAP_RETURN_REVERSE_RANK = "AS_MAP_RETURN_REVERSE_RANK";

    /**
     * Return count of items selected
     * @link https://www.aerospike.com/docs/guide/cdt-map.html#map-apis Map Result Types
     * @const MAP_RETURN_COUNT
     */
    public const MAP_RETURN_COUNT = "AS_MAP_RETURN_COUNT";

    /**
     * Return key for single key read and key list for range read
     * @link https://www.aerospike.com/docs/guide/cdt-map.html#map-apis Map Result Types
     * @const MAP_RETURN_KEY
     */
    public const MAP_RETURN_KEY = "AS_MAP_RETURN_KEY";

    /**
     * Return value for single key read and value list for range read
     * @link https://www.aerospike.com/docs/guide/cdt-map.html#map-apis Map Result Types
     * @const MAP_RETURN_VALUE
     */
    public const MAP_RETURN_VALUE = "AS_MAP_RETURN_VALUE";

    /**
     * Return key/value items
     * Will be of the form ['key1', 'val1', 'key2', 'val2', 'key3', 'val3]
     * @link https://www.aerospike.com/docs/guide/cdt-map.html#map-apis Map Result Types
     * @const MAP_RETURN_KEY_VALUE
     */
    public const MAP_RETURN_KEY_VALUE = "AS_MAP_RETURN_KEY_VALUE";

    /**
     * @const LOG_LEVEL_OFF
     */
    public const LOG_LEVEL_OFF = "LOG_LEVEL_OFF";

    /**
     * @const LOG_LEVEL_ERROR
     */
    public const LOG_LEVEL_ERROR = "LOG_LEVEL_ERROR";

    /**
     * @const LOG_LEVEL_WARN
     */
    public const LOG_LEVEL_WARN = "LOG_LEVEL_WARN";

    /**
     * @const LOG_LEVEL_INFO
     */
    public const LOG_LEVEL_INFO = "LOG_LEVEL_INFO";

    /**
     * @const LOG_LEVEL_DEBUG
     */
    public const LOG_LEVEL_DEBUG = "LOG_LEVEL_DEBUG";

    /**
     * @const LOG_LEVEL_TRACE
     */
    public const LOG_LEVEL_TRACE = "LOG_LEVEL_TRACE";

    /**
     * Aerospike Status Codes
     *
     * Each Aerospike API method invocation returns a status code from the
     * server.
     *
     * The status codes map to the
     * {@link https://github.com/aerospike/aerospike-client-c/blob/master/src/include/aerospike/as_status.h status codes}
     * of the C client.
     *
     * @const OK Success
     */
    public const OK = "AEROSPIKE_OK";

    // -10 - -1 - Client Errors

    /**
     * Synchronous connection error
     * @const ERR_CONNECTION
     */
    public const ERR_CONNECTION = "AEROSPIKE_ERR_CONNECTION";

    /**
     * Node invalid or could not be found
     * @const ERR_TLS_ERROR
     */
    public const ERR_TLS_ERROR = "AEROSPIKE_ERR_TLS";

    /**
     * Node invalid or could not be found
     * @const ERR_INVALID_NODE
     */
    public const ERR_INVALID_NODE = "AEROSPIKE_ERR_INVALID_NODE";

    /**
     * Client hit the max asynchronous connections
     * @const ERR_NO_MORE_CONNECTIONS
     */
    public const ERR_NO_MORE_CONNECTIONS = "AEROSPIKE_ERR_NO_MORE_CONNECTIONS";

    /**
     * Asynchronous connection error
     * @const ERR_ASYNC_CONNECTION
     */
    public const ERR_ASYNC_CONNECTION = "AEROSPIKE_ERR_ASYNC_CONNECTION";

    /**
     * Query or scan was aborted in user's callback
     * @const ERR_CLIENT_ABORT
     */
    public const ERR_CLIENT_ABORT = "AEROSPIKE_ERR_CLIENT_ABORT";

    /**
     * Host name could not be found in DNS lookup
     * @const ERR_INVALID_HOST
     */
    public const ERR_INVALID_HOST = "AEROSPIKE_ERR_INVALID_HOST";

    /**
     * Invalid client API parameter
     * @const ERR_PARAM
     */
    public const ERR_PARAM = "AEROSPIKE_ERR_PARAM";

    /**
     * Generic client API usage error
     * @const ERR_CLIENT
     */
    public const ERR_CLIENT = "AEROSPIKE_ERR_CLIENT";

    // 1-49 - Basic Server Errors

    /**
     * Generic error returned by server
     * @const ERR_SERVER
     */
    public const ERR_SERVER = "AEROSPIKE_ERR_SERVER";

    /**
     * No record is found with the specified namespace/set/key combination.
     * May be returned by a read, or a write with OPT_POLICY_EXISTS
     * set to POLICY_EXISTS_UPDATE
     * @const ERR_RECORD_NOT_FOUND
     */
    public const ERR_RECORD_NOT_FOUND = "AEROSPIKE_ERR_RECORD_NOT_FOUND";

    /**
     * Generation of record does not satisfy the OPT_POLICY_GEN write policy
     * @const ERR_RECORD_GENERATION
     */
    public const ERR_RECORD_GENERATION = "AEROSPIKE_ERR_RECORD_GENERATION";

    /**
     * Illegal parameter sent from client. Check client parameters and verify
     * each is supported by current server version
     * @const ERR_REQUEST_INVALID
     */
    public const ERR_REQUEST_INVALID = "AEROSPIKE_ERR_REQUEST_INVALID";

    /**
     * The operation cannot be applied to the current bin on the server
     * @const ERR_OP_NOT_APPLICABLE
     */
    public const ERR_OP_NOT_APPLICABLE = "AEROSPIKE_ERR_OP_NOT_APPLICABLE";

    /**
     * Record already exists. May be returned by a write with the
     * OPT_POLICY_EXISTS write policy set to POLICY_EXISTS_CREATE
     * @const ERR_RECORD_EXISTS
     */
    public const ERR_RECORD_EXISTS = "AEROSPIKE_ERR_RECORD_EXISTS";

    /**
     * (future) For future write requests which specify 'BIN_CREATE_ONLY',
     * request failed because one of the bins in the write already exists
     * @const ERR_BIN_EXISTS
     */
    public const ERR_BIN_EXISTS = "AEROSPIKE_ERR_BIN_EXISTS";

    /**
     * On scan requests, the scan terminates because cluster is in migration.
     * Only occur when client requested 'fail_on_cluster_change' policy on scan
     * @const ERR_CLUSTER_CHANGE
     */
    public const ERR_CLUSTER_CHANGE = "AEROSPIKE_ERR_CLUSTER_CHANGE";

    /**
     * Occurs when stop_writes is true (either memory - stop-writes-pct -
     * or disk - min-avail-pct). Can also occur if memory cannot be allocated
     * anymore (but stop_writes should in general hit first). Namespace will no
     * longer be able to accept write requests
     * @const ERR_SERVER_FULL
     */
    public const ERR_SERVER_FULL = "AEROSPIKE_ERR_SERVER_FULL";

    /**
     * Request was not completed during the allocated time, thus aborted
     * @const ERR_TIMEOUT
     */
    public const ERR_TIMEOUT = "AEROSPIKE_ERR_TIMEOUT";

    /**
     * Write request is rejected because XDR is not running.
     * Only occur when XDR configuration xdr-stop-writes-noxdr is on
     * @const ERR_NO_XDR
     */
    #[Deprecated("Will be reused as ERR_ALWAYS_FORBIDDEN")]
    public const ERR_ALWAYS_FORBIDDEN = "AEROSPIKE_ERR_ALWAYS_FORBIDDEN";

    /**
     * Server is not accepting requests.
     * Occur during single node on a quick restart to join existing cluster
     * @const ERR_CLUSTER
     */
    public const ERR_CLUSTER = "AEROSPIKE_ERR_CLUSTER";

    /**
     * Operation is not allowed due to data type or namespace configuration incompatibility.
     * For example, append to a float data type, or insert a non-integer when
     * namespace is configured as data-in-index
     * @const ERR_BIN_INCOMPATIBLE_TYPE
     */
    public const ERR_BIN_INCOMPATIBLE_TYPE = "AEROSPIKE_ERR_BIN_INCOMPATIBLE_TYPE";

    /**
     * Attempt to write a record whose size is bigger than the configured write-block-size
     * @const ERR_RECORD_TOO_BIG
     */
    public const ERR_RECORD_TOO_BIG = "AEROSPIKE_ERR_RECORD_TOO_BIG";

    /**
     * Too many concurrent operations (> transaction-pending-limit) on the same record.
     * A "hot-key" situation
     * @const ERR_RECORD_BUSY
     */
    public const ERR_RECORD_BUSY = "AEROSPIKE_ERR_RECORD_BUSY";

    /**
     * Scan aborted by user on server
     * @const ERR_SCAN_ABORTED
     */
    public const ERR_SCAN_ABORTED = "AEROSPIKE_ERR_SCAN_ABORTED";

    /**
     * The client is trying to use a feature that does not yet exist in the
     * version of the server node it is talking to
     * @const ERR_UNSUPPORTED_FEATURE
     */
    public const ERR_UNSUPPORTED_FEATURE = "AEROSPIKE_ERR_UNSUPPORTED_FEATURE";

    /**
     * (future) For future write requests which specify 'REPLACE_ONLY',
     * request fail because specified bin name does not exist in record
     * @const ERR_BIN_NOT_FOUND
     */
    public const ERR_BIN_NOT_FOUND = "AEROSPIKE_ERR_BIN_NOT_FOUND";

    /**
     * Write request is rejected because one or more storage devices of the node are not keeping up
     * @const ERR_DEVICE_OVERLOAD
     */
    public const ERR_DEVICE_OVERLOAD = "AEROSPIKE_ERR_DEVICE_OVERLOAD";

    /**
     * For update request on records which has key stored, the incoming key does not match
     * the existing stored key. This indicates a RIPEMD160 key collision has happend (report as a bug)
     * @const ERR_RECORD_KEY_MISMATCH
     */
    public const ERR_RECORD_KEY_MISMATCH = "AEROSPIKE_ERR_RECORD_KEY_MISMATCH";

    /**
     * Namespace in request not found on server
     * @const ERR_NAMESPACE_NOT_FOUND
     */
    public const ERR_NAMESPACE_NOT_FOUND = "AEROSPIKE_ERR_NAMESPACE_NOT_FOUND";

    /**
     * Bin name length greater than 14 characters, or maximum number of unique bin names are exceeded
     * @const ERR_BIN_NAME
     */
    public const ERR_BIN_NAME = "AEROSPIKE_ERR_BIN_NAME";

    /**
     * Operation not allowed at this time.
     * For writes, the set is in the middle of being deleted, or the set's stop-write is reached;
     * For scan, too many concurrent scan jobs (> scan-max-active);
     * For XDR-ed cluster, fail writes which are not replicated from another datacenter
     * @const ERR_FAIL_FORBIDDEN
     */
    public const ERR_FAIL_FORBIDDEN = "AEROSPIKE_ERR_FORBIDDEN";

    /**
     * Target was not found for operations that requires a target to be found
     * @const ERR_FAIL_ELEMENT_NOT_FOUND
     */
    public const ERR_FAIL_ELEMENT_NOT_FOUND = "AEROSPIKE_ERR_FAIL_NOT_FOUND";

    /**
     * Target already exist for operations that requires the target to not exist
     * @const ERR_FAIL_ELEMENT_EXISTS
     */
    public const ERR_FAIL_ELEMENT_EXISTS = "AEROSPIKE_ERR_FAIL_ELEMENT_EXISTS";

    // 50-89 - Security Specific Errors

    /**
     * Security functionality not supported by connected server
     * @const ERR_SECURITY_NOT_SUPPORTED
     */
    public const ERR_SECURITY_NOT_SUPPORTED = "AEROSPIKE_ERR_SECURITY_NOT_SUPPORTED";

    /**
     * Security functionality not enabled by connected server
     * @const ERR_SECURITY_NOT_ENABLED
     */
    public const ERR_SECURITY_NOT_ENABLED = "AEROSPIKE_ERR_SECURITY_NOT_ENABLED";

    /**
     * Security scheme not supported
     * @const ERR_SECURITY_SCHEME_NOT_SUPPORTED
     */
    public const ERR_SECURITY_SCHEME_NOT_SUPPORTED = "AEROSPIKE_ERR_SECURITY_SCHEME_NOT_SUPPORTED";

    /**
     * Unrecognized security command
     * @const ERR_INVALID_COMMAND
     */
    public const ERR_INVALID_COMMAND = "AEROSPIKE_ERR_INVALID_COMMAND";

    /**
     * Field is not valid
     * @const ERR_INVALID_FIELD
     */
    public const ERR_INVALID_FIELD = "AEROSPIKE_ERR_INVALID_FIELD";

    /**
     * Security protocol not followed
     * @const ERR_ILLEGAL_STATE
     */
    public const ERR_ILLEGAL_STATE = "AEROSPIKE_ERR_ILLEGAL_STATE";

    /**
     * No user supplied or unknown user
     * @const ERR_INVALID_USER
     */
    public const ERR_INVALID_USER = "AEROSPIKE_ERR_INVALID_USER";

    /**
     * User already exists
     * @const ERR_USER_ALREADY_EXISTS
     */
    public const ERR_USER_ALREADY_EXISTS = "AEROSPIKE_ERR_USER_ALREADY_EXISTS";

    /**
     * Password does not exists or not recognized
     * @const ERR_INVALID_PASSWORD
     */
    public const ERR_INVALID_PASSWORD = "AEROSPIKE_ERR_INVALID_PASSWORD";

    /**
     * Expired password
     * @const ERR_EXPIRED_PASSWORD
     */
    public const ERR_EXPIRED_PASSWORD = "AEROSPIKE_ERR_EXPIRED_PASSWORD";

    /**
     * Forbidden password (e.g. recently used)
     * @const ERR_FORBIDDEN_PASSWORD
     */
    public const ERR_FORBIDDEN_PASSWORD = "AEROSPIKE_ERR_FORBIDDEN_PASSWORD";

    /**
     * Invalid credential or credential does not exist
     * @const ERR_INVALID_CREDENTIAL
     */
    public const ERR_INVALID_CREDENTIAL = "AEROSPIKE_ERR_INVALID_CREDENTIAL";

    /**
     * No role(s) or unknown role(s)
     * @const ERR_INVALID_ROLE
     */
    public const ERR_INVALID_ROLE = "AEROSPIKE_ERR_INVALID_ROLE";

    /**
     * Privilege is invalid
     * @const ERR_INVALID_PRIVILEGE
     */
    public const ERR_INVALID_PRIVILEGE = "AEROSPIKE_ERR_INVALID_PRIVILEGE";

    /**
     * User must be authenticated before performing database operations
     * @const ERR_NOT_AUTHENTICATED
     */
    public const ERR_NOT_AUTHENTICATED = "AEROSPIKE_ERR_NOT_AUTHENTICATED";

    /**
     * User does not possess the required role to perform the database operation
     * @const ERR_ROLE_VIOLATION
     */
    public const ERR_ROLE_VIOLATION = "AEROSPIKE_ERR_ROLE_VIOLATION";

    /**
     * Role already exists
     * @const ERR_ROLE_ALREADY_EXISTS
     */
    public const ERR_ROLE_ALREADY_EXISTS = "AEROSPIKE_ERR_ROLE_ALREADY_EXISTS";

    // 100-109 - UDF Specific Errors
    //
    /**
     * A user defined function failed to execute
     * @const ERR_UDF
     */
    public const ERR_UDF = "AEROSPIKE_ERR_UDF";

    /**
     * The UDF does not exist
     * @const ERR_UDF_NOT_FOUND
     */
    public const ERR_UDF_NOT_FOUND = "AEROSPIKE_ERR_UDF_NOT_FOUND";

    /**
     * The LUA file does not exist
     * @const ERR_LUA_FILE_NOT_FOUND
     */
    public const ERR_LUA_FILE_NOT_FOUND = "AEROSPIKE_ERR_LUA_FILE_NOT_FOUND";

    // 150-159 - Batch Specific Errors

    /**
     * Batch functionality has been disabled by configuring the batch-index-thread=0
     * @const ERR_BATCH_DISABLED
     */
    public const ERR_BATCH_DISABLED = "AEROSPIKE_ERR_BATCH_DISABLED";

    /**
     * Batch max requests has been exceeded
     * @const ERR_BATCH_MAX_REQUESTS_EXCEEDED
     */
    public const ERR_BATCH_MAX_REQUESTS_EXCEEDED = "AEROSPIKE_ERR_BATCH_MAX_REQUESTS_EXCEEDED";

    /**
     * All batch queues are full
     * @const ERR_BATCH_QUEUES_FULL
     */
    public const ERR_BATCH_QUEUES_FULL = "AEROSPIKE_ERR_BATCH_QUEUES_FULL";

    // 160-169 - Geo Specific Errors

    /**
     * GeoJSON is malformed or not supported
     * @const ERR_GEO_INVALID_GEOJSON
     */
    public const ERR_GEO_INVALID_GEOJSON = "AEROSPIKE_ERR_GEO_INVALID_GEOJSON";

    // 200-219 - Secondary Index Specific Errors

    /**
     * Secondary index already exists
     * @const ERR_INDEX_FOUND
     * Accepts one of the POLICY_KEY_* values.
     *
     * {@link https://www.aerospike.com/docs/client/php/usage/kvs/record-structure.html Records}
     * are uniquely identified by their digest, and can optionally store the value of their primary key
     * (their unique ID in the application).
     * @const OPT_POLICY_KEY Key storage policy option (digest-only or send key)
     */
    public const ERR_INDEX_FOUND = "AEROSPIKE_ERR_INDEX_FOUND";

    /**
     * Secondary index does not exist
     * @const ERR_INDEX_NOT_FOUND
     */
    public const ERR_INDEX_NOT_FOUND = "AEROSPIKE_ERR_INDEX_NOT_FOUND";

    /**
     * Secondary index memory space exceeded
     * @const ERR_INDEX_OOM
     */
    public const ERR_INDEX_OOM = "AEROSPIKE_ERR_INDEX_OOM";

    /**
     * Secondary index not available for query. Occurs when indexing creation has not finished
     * @const ERR_INDEX_NOT_READABLE
     */
    public const ERR_INDEX_NOT_READABLE = "AEROSPIKE_ERR_INDEX_NOT_READABLE";

    /**
     * Generic secondary index error
     * @const ERR_INDEX
     */
    public const ERR_INDEX = "AEROSPIKE_ERR_INDEX";

    /**
     * Index name maximun length exceeded
     * @const ERR_INDEX_NAME_MAXLEN
     */
    public const ERR_INDEX_NAME_MAXLEN = "AEROSPIKE_ERR_INDEX_NAME_MAXLEN";

    /**
     * Maximum number of indicies exceeded
     * @const ERR_INDEX_MAXCOUNT
     */
    public const ERR_INDEX_MAXCOUNT = "AEROSPIKE_ERR_INDEX_MAXCOUNT";

    /**
     * Secondary index query aborted
     * @const ERR_QUERY_ABORTED
     */
    public const ERR_QUERY_ABORTED = "AEROSPIKE_ERR_QUERY_ABORTED";

    /**
     * Secondary index queue full
     * @const ERR_QUERY_QUEUE_FULL
     */
    public const ERR_QUERY_QUEUE_FULL = "AEROSPIKE_ERR_QUERY_QUEUE_FULL";

    /**
     * Secondary index query timed out on server
     * @const ERR_QUERY_TIMEOUT
     */
    public const ERR_QUERY_TIMEOUT = "AEROSPIKE_ERR_QUERY_TIMEOUT";

    /**
     * Generic query error
     * @const ERR_QUERY
     */
    public const ERR_QUERY = "AEROSPIKE_ERR_QUERY";

    /**
     * write operator for the operate() method
     * @const OPERATOR_WRITE
     */
    public const OPERATOR_WRITE = "OPERATOR_WRITE";

    /**
     * read operator for the operate() method
     * @const OPERATOR_READ
     */
    public const OPERATOR_READ = "OPERATOR_READ";

    /**
     * increment operator for the operate() method
     * @const OPERATOR_INCR
     */
    public const OPERATOR_INCR = "OPERATOR_INCR";

    /**
     * prepend operator for the operate() method
     * @const OPERATOR_PREPEND
     */
    public const OPERATOR_PREPEND = "OPERATOR_PREPEND";

    /**
     * append operator for the operate() method
     * @const OPERATOR_APPEND
     */
    public const OPERATOR_APPEND = "OPERATOR_APPEND";

    /**
     * touch operator for the operate() method
     * @const OPERATOR_TOUCH
     */
    public const OPERATOR_TOUCH = "OPERATOR_TOUCH";

    /**
     * delete operator for the operate() method
     * @const OPERATOR_DELETE
     */
    public const OPERATOR_DELETE = "OPERATOR_DELETE";

    // List operation constants

    /**
     * list-append operator for the operate() method
     * @const OP_LIST_APPEND
     */
    public const OP_LIST_APPEND = "OP_LIST_APPEND";

    /**
     * list-merge operator for the operate() method
     * @const OP_LIST_MERGE
     */
    public const OP_LIST_MERGE = "OP_LIST_MERGE";

    /**
     * list-insert operator for the operate() method
     * @const OP_LIST_INSERT
     */
    public const OP_LIST_INSERT = "OP_LIST_INSERT";

    /**
     * list-insert-items operator for the operate() method
     * @const OP_LIST_INSERT_ITEMS
     */
    public const OP_LIST_INSERT_ITEMS = "OP_LIST_INSERT_ITEMS";

    /**
     * list-pop operator for the operate() method
     * @const OP_LIST_POP
     */
    public const OP_LIST_POP = "OP_LIST_POP";

    /**
     * list-pop-range operator for the operate() method
     * @const OP_LIST_POP_RANGE
     */
    public const OP_LIST_POP_RANGE = "OP_LIST_POP_RANGE";

    /**
     * list-remove operator for the operate() method
     * @const OP_LIST_REMOVE
     */
    public const OP_LIST_REMOVE = "OP_LIST_REMOVE";

    /**
     * list-remove-range operator for the operate() method
     * @const OP_LIST_REMOVE_RANGE
     */
    public const OP_LIST_REMOVE_RANGE = "OP_LIST_REMOVE_RANGE";

    /**
     * list-clear operator for the operate() method
     * @const OP_LIST_CLEAR
     */
    public const OP_LIST_CLEAR = "OP_LIST_CLEAR";

    /**
     * list-set operator for the operate() method
     * @const OP_LIST_SET
     */
    public const OP_LIST_SET = "OP_LIST_SET";

    /**
     * list-get operator for the operate() method
     * @const OP_LIST_GET
     */
    public const OP_LIST_GET = "OP_LIST_GET";

    /**
     * list-get-range operator for the operate() method
     * @const OP_LIST_GET_RANGE
     */
    public const OP_LIST_GET_RANGE = "OP_LIST_GET_RANGE";

    /**
     * list-trim operator for the operate() method
     * @const OP_LIST_TRIM
     */
    public const OP_LIST_TRIM = "OP_LIST_TRIM";

    /**
     * list-size operator for the operate() method
     * @const OP_LIST_SIZE
     */
    public const OP_LIST_SIZE = "OP_LIST_SIZE";

    // Map operation constants

    /**
     * map-size operator for the operate() method
     * @const OP_MAP_SIZE
     */
    public const OP_MAP_SIZE = "OP_MAP_SIZE";

    /**
     * map-size operator for the operate() method
     * @const OP_MAP_CLEAR
     */
    public const OP_MAP_CLEAR = "OP_MAP_CLEAR";

    /**
     * map-set-policy operator for the operate() method
     * @const OP_MAP_SET_POLICY
     */
    public const OP_MAP_SET_POLICY = "OP_MAP_SET_POLICY";

    /**
     * map-get-by-key operator for the operate() method
     * @const OP_MAP_GET_BY_KEY
     */
    public const OP_MAP_GET_BY_KEY = "OP_MAP_GET_BY_KEY";

    /**
     * map-get-by-key-range operator for the operate() method
     * @const OP_MAP_GET_BY_KEY_RANGE
     */
    public const OP_MAP_GET_BY_KEY_RANGE = "OP_MAP_GET_BY_KEY_RANGE";

    /**
     * map-get-by-value operator for the operate() method
     * @const OP_MAP_GET_BY_VALUE
     */
    public const OP_MAP_GET_BY_VALUE = "OP_MAP_GET_BY_VALUE";

    /**
     * map-get-by-value-range operator for the operate() method
     * @const OP_MAP_GET_BY_VALUE_RANGE
     */
    public const OP_MAP_GET_BY_VALUE_RANGE = "OP_MAP_GET_BY_VALUE_RANGE";

    /**
     * map-get-by-index operator for the operate() method
     * @const OP_MAP_GET_BY_INDEX
     */
    public const OP_MAP_GET_BY_INDEX = "OP_MAP_GET_BY_INDEX";

    /**
     * map-get-by-index-range operator for the operate() method
     * @const OP_MAP_GET_BY_INDEX_RANGE
     */
    public const OP_MAP_GET_BY_INDEX_RANGE = "OP_MAP_GET_BY_INDEX_RANGE";

    /**
     * map-get-by-rank operator for the operate() method
     * @const OP_MAP_GET_BY_RANK
     */
    public const OP_MAP_GET_BY_RANK = "OP_MAP_GET_BY_RANK";

    /**
     * map-get-by-rank-range operator for the operate() method
     * @const OP_MAP_GET_BY_RANK_RANGE
     */
    public const OP_MAP_GET_BY_RANK_RANGE = "OP_MAP_GET_BY_RANK_RANGE";

    /**
     * map-put  operator for the operate() method
     * @const OP_MAP_PUT
     */
    public const OP_MAP_PUT = "OP_MAP_PUT";

    /**
     * map-put-items operator for the operate() method
     * @const OP_MAP_PUT_ITEMS
     */
    public const OP_MAP_PUT_ITEMS = "OP_MAP_PUT_ITEMS";

    /**
     * map-increment operator for the operate() method
     * @const OP_MAP_INCREMENT
     */
    public const OP_MAP_INCREMENT = "OP_MAP_INCREMENT";

    /**
     * map-decrement operator for the operate() method
     * @const OP_MAP_DECREMENT
     */
    public const OP_MAP_DECREMENT = "OP_MAP_DECREMENT";

    /**
     * map-remove-by-key operator for the operate() method
     * @const OP_MAP_REMOVE_BY_KEY
     */
    public const OP_MAP_REMOVE_BY_KEY = "OP_MAP_REMOVE_BY_KEY";

    /**
     * map-remove-by-key-list operator for the operate() method
     * @const OP_MAP_REMOVE_BY_KEY_LIST
     */
    public const OP_MAP_REMOVE_BY_KEY_LIST = "OP_MAP_REMOVE_BY_KEY_LIST";

    /**
     * map-remove-by-key-range key operator for the operate() method
     * @const OP_MAP_REMOVE_BY_KEY_RANGE
     */
    public const OP_MAP_REMOVE_BY_KEY_RANGE = "OP_MAP_REMOVE_BY_KEY_RANGE";

    /**
     * map-remove-by-value operator for the operate() method
     * @const OP_MAP_REMOVE_BY_VALUE
     */
    public const OP_MAP_REMOVE_BY_VALUE = "OP_MAP_REMOVE_BY_VALUE";

    /**
     * map-remove-by-value operator for the operate() method
     * @const OP_MAP_REMOVE_BY_VALUE_RANGE
     */
    public const OP_MAP_REMOVE_BY_VALUE_RANGE = "OP_MAP_REMOVE_BY_VALUE_RANGE";

    /**
     * map-remove-by-value-list operator for the operate() method
     * @const OP_MAP_REMOVE_BY_VALUE_LIST
     */
    public const OP_MAP_REMOVE_BY_VALUE_LIST = "OP_MAP_REMOVE_BY_VALUE_LIST";

    /**
     * map-remove-by-index operator for the operate() method
     * @const OP_MAP_REMOVE_BY_INDEX
     */
    public const OP_MAP_REMOVE_BY_INDEX = "OP_MAP_REMOVE_BY_INDEX";

    /**
     * map-remove-by-index-range operator for the operate() method
     * @const OP_MAP_REMOVE_BY_INDEX_RANGE
     */
    public const OP_MAP_REMOVE_BY_INDEX_RANGE = "OP_MAP_REMOVE_BY_INDEX_RANGE";

    /**
     * map-remove-by-rank operator for the operate() method
     * @const OP_MAP_REMOVE_BY_RANK
     */
    public const OP_MAP_REMOVE_BY_RANK = "OP_MAP_REMOVE_BY_RANK";

    /**
     * map-remove-by-rank-range operator for the operate() method
     * @const OP_MAP_REMOVE_BY_RANK_RANGE
     */
    public const OP_MAP_REMOVE_BY_RANK_RANGE = "OP_MAP_REMOVE_BY_RANK_RANGE";

    // Query Predicate Operators

    /**
     * predicate operator for equality check of scalar integer or string value
     * @const OP_EQ
     * @see Aerospike::predicateEquals
     */
    public const OP_EQ = "=";

    /**
     * predicate operator matching whether an integer falls between a range of integer values
     * @const OP_BETWEEN
     * @see Aerospike::predicateBetween
     */
    public const OP_BETWEEN = "BETWEEN";

    /**
     * predicate operator for a whether a specific value is in an indexed list, mapkeys, or mapvalues
     * @const OP_CONTAINS
     * @see Aerospike::predicateContains
     */
    public const OP_CONTAINS = "CONTAINS";

    /**
     * predicate operator for whether an indexed list, mapkeys, or mapvalues has an integer value within a specified range
     * @const OP_RANGE
     * @see Aerospike::predicateRange
     */
    public const OP_RANGE = "RANGE";

    /**
     * geospatial predicate operator for points within a specified region
     * @const OP_GEOWITHINREGION
     */
    public const OP_GEOWITHINREGION = "GEOWITHIN";

    /**
     * geospatial predicate operator for regons containing a sepcified point
     * @const OP_GEOWITHINREGION
     */
    public const OP_GEOCONTAINSPOINT = "GEOCONTAINS";

    /**
     * Scan status is undefined
     */
    #[Deprecated('use JOB_STATUS_UNDEF along with jobInfo()')]
    public const SCAN_STATUS_UNDEF = "SCAN_STATUS_UNDEF";

    /**
     * Scan is currently running
     */
    #[Deprecated('use JOB_STATUS_INPROGRESS along with jobInfo()')]
    public const SCAN_STATUS_INPROGRESS = "SCAN_STATUS_INPROGRESS";

    /**
     * Scan completed successfully
     */
    #[Deprecated]
    public const SCAN_STATUS_ABORTED = "SCAN_STATUS_ABORTED";

    /**
     * Scan was aborted due to failure or the user
     */
    #[Deprecated('use JOB_STATUS_COMPLETED along with jobInfo()')]
    public const SCAN_STATUS_COMPLETED = "SCAN_STATUS_COMPLETED";

    // Status values returned by jobInfo()

    /**
     * Job status is undefined
     */
    public const JOB_STATUS_UNDEF = "JOB_STATUS_UNDEF";

    /**
     * Job is currently running
     */
    public const JOB_STATUS_INPROGRESS = "JOB_STATUS_INPROGRESS";

    /**
     * Job completed successfully
     */
    public const JOB_STATUS_COMPLETED = "JOB_STATUS_COMPLETED";

    // Index (container) types
    /**
     * The bin being indexed should contain scalar values such as string or integer
     * @const INDEX_TYPE_DEFAULT
     */
    public const INDEX_TYPE_DEFAULT = "INDEX_TYPE_DEFAULT";

    /**
     * The bin being indexed should contain a list
     * @const INDEX_TYPE_LIST
     */
    public const INDEX_TYPE_LIST = "INDEX_TYPE_LIST";

    /**
     * The bin being indexed should contain a map. The map keys will be indexed
     * @const INDEX_TYPE_MAPKEYS
     */
    public const INDEX_TYPE_MAPKEYS = "INDEX_TYPE_MAPKEYS";

    /**
     * The bin being indexed should contain a map. The map values will be indexed
     * @const INDEX_TYPE_MAPKEYS
     */
    public const INDEX_TYPE_MAPVALUES = "INDEX_TYPE_MAPVALUES";

    // Data type
    /**
     * If and only if the container type matches, the value should be of type string
     * @const INDEX_STRING
     */
    public const INDEX_STRING = "INDEX_STRING";

    /**
     * If and only if the container type matches, the value should be of type integer
     * @const INDEX_NUMERIC
     */
    public const INDEX_NUMERIC = "INDEX_NUMERIC";

    /**
     * If and only if the container type matches, the value should be GeoJSON
     * @const INDEX_GEO2DSPHERE
     */
    public const INDEX_GEO2DSPHERE = "INDEX_GEO2DSPHERE";

    /**
     * Declare the UDF module's language to be Lua
     * @const UDF_TYPE_LUA
     */
    public const UDF_TYPE_LUA = "UDF_TYPE_LUA";

    // Security role privileges

    /**
     * Privilege to read data
     * @const PRIV_READ
     * @link https://www.aerospike.com/docs/guide/security/access-control.html Access Control
     */
    public const PRIV_READ = "PRIV_READ";

    /**
     * Privilege to read and write data
     * @const PRIV_READ_WRITE
     * @link https://www.aerospike.com/docs/guide/security/access-control.html Access Control
     */
    public const PRIV_READ_WRITE = "PRIV_READ_WRITE";

    /**
     * Privilege to read, write and execute user-defined functions
     * @const PRIV_READ_WRITE_UDF
     * @link https://www.aerospike.com/docs/guide/security/access-control.html Access Control
     */
    public const PRIV_READ_WRITE_UDF = "PRIV_READ_WRITE_UDF";

    /**
     * Privilege to create and assign roles to users
     * @const PRIV_USER_ADMIN
     * @link https://www.aerospike.com/docs/guide/security/access-control.html Access Control
     */
    public const PRIV_USER_ADMIN = "PRIV_USER_ADMIN";

    /**
     * Privilege to manage indexes and UDFs, monitor and abort scan/query jobs, get server config
     * @const PRIV_DATA_ADMIN
     * @link https://www.aerospike.com/docs/guide/security/access-control.html Access Control
     */
    public const PRIV_DATA_ADMIN = "PRIV_DATA_ADMIN"; // can perform data admin functions that do not involve user admin

    /** Privilege to modify dynamic server configs, get config and stats, and all data admin privileges
     * @const PRIV_SYS_ADMIN
     * @link https://www.aerospike.com/docs/guide/security/access-control.html Access Control
     */
    public const PRIV_SYS_ADMIN = "PRIV_SYS_ADMIN"; // can perform sysadmin functions that do not involve user admin

    /*
        // TODO:
        // security methods
        public int createRole ( string $role, array $privileges [, array $options ] )
        public int grantPrivileges ( string $role, array $privileges [, array $options ] )
        public int revokePrivileges ( string $role, array $privileges [, array $options ] )
        public int queryRole ( string $role, array &$privileges [, array $options ] )
        public int queryRoles ( array &$roles [, array $options ] )
        public int dropRole ( string $role [, array $options ] )
        public int createUser ( string $user, string $password, array $roles [, array $options ] )
        public int setPassword ( string $user, string $password [, array $options ] )
        public int changePassword ( string $user, string $password [, array $options ] )
        public int grantRoles ( string $user, array $roles [, array $options ] )
        public int revokeRoles ( string $user, array $roles [, array $options ] )
        public int queryUser ( string $user, array &$roles [, array $options ] )
        public int queryUsers ( array &$roles [, array $options ] )
        public int dropUser ( string $user [, array $options ] )

     */
}
<?php

use JetBrains\PhpStorm\Pure;

/**
 * Zookeeper class.
 * @link https://www.php.net/manual/en/class.zookeeper.php
 */
class Zookeeper
{
    /* class constants */
    public const PERM_READ = 1;
    public const PERM_WRITE = 2;
    public const PERM_CREATE = 4;
    public const PERM_DELETE = 8;
    public const PERM_ADMIN = 16;
    public const PERM_ALL = 31;
    public const EPHEMERAL = 1;
    public const SEQUENCE = 2;
    public const EXPIRED_SESSION_STATE = -112;
    public const AUTH_FAILED_STATE = -113;
    public const CONNECTING_STATE = 1;
    public const ASSOCIATING_STATE = 2;
    public const CONNECTED_STATE = 3;
    public const NOTCONNECTED_STATE = 999;
    public const CREATED_EVENT = 1;
    public const DELETED_EVENT = 2;
    public const CHANGED_EVENT = 3;
    public const CHILD_EVENT = 4;
    public const SESSION_EVENT = -1;
    public const NOTWATCHING_EVENT = -2;
    public const LOG_LEVEL_ERROR = 1;
    public const LOG_LEVEL_WARN = 2;
    public const LOG_LEVEL_INFO = 3;
    public const LOG_LEVEL_DEBUG = 4;
    public const SYSTEMERROR = -1;
    public const RUNTIMEINCONSISTENCY = -2;
    public const DATAINCONSISTENCY = -3;
    public const CONNECTIONLOSS = -4;
    public const MARSHALLINGERROR = -5;
    public const UNIMPLEMENTED = -6;
    public const OPERATIONTIMEOUT = -7;
    public const BADARGUMENTS = -8;
    public const INVALIDSTATE = -9;

    /**
     * @since 3.5
     */
    public const NEWCONFIGNOQUORUM = -13;

    /**
     * @since 3.5
     */
    public const RECONFIGINPROGRESS = -14;
    public const OK = 0;
    public const APIERROR = -100;
    public const NONODE = -101;
    public const NOAUTH = -102;
    public const BADVERSION = -103;
    public const NOCHILDRENFOREPHEMERALS = -108;
    public const NODEEXISTS = -110;
    public const NOTEMPTY = -111;
    public const SESSIONEXPIRED = -112;
    public const INVALIDCALLBACK = -113;
    public const INVALIDACL = -114;
    public const AUTHFAILED = -115;
    public const CLOSING = -116;
    public const NOTHING = -117;
    public const SESSIONMOVED = -118;

    /**
     * Create a handle to used communicate with zookeeper.
     * If the host is provided, attempt to connect.
     *
     * @param string   $host
     * @param callable $watcher_cb
     * @param int      $recv_timeout
     *
     * @link https://www.php.net/manual/en/zookeeper.construct.php
     *
     * @throws ZookeeperException
     * @throws ZookeeperConnectionException when host is provided and when failed to connect to the host
     */
    public function __construct($host = '', $watcher_cb = null, $recv_timeout = 10000) {}

    /**
     * Create a handle to used communicate with zookeeper.
     *
     * @param string   $host
     * @param callable $watcher_cb
     * @param int      $recv_timeout
     *
     * @link https://www.php.net/manual/en/zookeeper.connect.php
     *
     * @throws ZookeeperException
     * @throws ZookeeperConnectionException when failed to connect to Zookeeper
     */
    public function connect($host, $watcher_cb = null, $recv_timeout = 10000) {}

    /**
     * Close the zookeeper handle and free up any resources.
     *
     * @link https://www.php.net/manual/en/zookeeper.close.php
     *
     * @throws ZookeeperException
     * @throws ZookeeperConnectionException when closing an uninitialized instance
     */
    public function close() {}

    /**
     * Create a node synchronously.
     *
     * @param string $path
     * @param string $value
     * @param array  $acl
     * @param int    $flags
     *
     * @return string
     *
     * @link https://www.php.net/manual/en/zookeeper.create.php
     *
     * @throws ZookeeperException
     * @throws ZookeeperNoNodeException when parent path does not exist
     */
    public function create($path, $value, $acl, $flags = null) {}

    /**
     * Delete a node in zookeeper synchronously.
     *
     * @param string $path
     * @param int    $version
     *
     * @return bool
     *
     * @link https://www.php.net/manual/en/zookeeper.delete.php
     *
     * @throws ZookeeperException
     * @throws ZookeeperNoNodeException when path does not exist
     */
    public function delete($path, $version = -1) {}

    /**
     * Sets the data associated with a node.
     *
     * @param string $path
     * @param string $data
     * @param int    $version
     * @param array  &$stat
     *
     * @return bool
     *
     * @link https://www.php.net/manual/en/zookeeper.set.php
     *
     * @throws ZookeeperException
     * @throws ZookeeperNoNodeException when path does not exist
     */
    public function set($path, $data, $version = -1, &$stat = null) {}

    /**
     * Gets the data associated with a node synchronously.
     *
     * @param string   $path
     * @param callable $watcher_cb
     * @param array    &$stat
     * @param int      $max_size
     *
     * @return string
     *
     * @link https://www.php.net/manual/en/zookeeper.get.php
     *
     * @throws ZookeeperException
     * @throws ZookeeperNoNodeException when path does not exist
     */
    public function get($path, $watcher_cb = null, &$stat = null, $max_size = 0) {}

    /**
     * Get children data of a path.
     *
     * @param string   $path
     * @param callable $watcher_cb
     *
     * @return array|false
     *
     * @link https://www.php.net/manual/en/zookeeper.getchildren.php
     *
     * @throws ZookeeperException       when connection not in connected status
     * @throws ZookeeperNoNodeException when path does not exist
     */
    #[Pure]
    public function getChildren($path, $watcher_cb = null) {}

    /**
     * Checks the existence of a node in zookeeper synchronously.
     *
     * @param string   $path
     * @param callable $watcher_cb
     *
     * @return bool
     *
     * @link https://www.php.net/manual/en/zookeeper.exists.php
     *
     * @throws ZookeeperException
     */
    public function exists($path, $watcher_cb = null) {}

    /**
     * Gets the acl associated with a node synchronously.
     *
     * @param string $path
     *
     * @return array
     *
     * @link https://www.php.net/manual/en/zookeeper.getacl.php
     *
     * @throws ZookeeperException when connection not in connected status
     */
    #[Pure]
    public function getAcl($path) {}

    /**
     * Sets the acl associated with a node synchronously.
     *
     * @param string $path
     * @param int    $version
     * @param array  $acls
     *
     * @link https://www.php.net/manual/en/zookeeper.setacl.php
     *
     * @return bool
     *
     * @throws ZookeeperException when connection not in connected status
     */
    public function setAcl($path, $version, $acls) {}

    /**
     * return the client session id, only valid if the connections is currently connected
     * (ie. last watcher state is ZOO_CONNECTED_STATE).
     *
     * @return int
     *
     * @link https://www.php.net/manual/en/zookeeper.getclientid.php
     *
     * @throws ZookeeperException
     * @throws ZookeeperConnectionException when connection not in connected status
     */
    #[Pure]
    public function getClientId() {}

    /**
     * Set a watcher function.
     *
     * @param callable $watcher_cb
     *
     * @return bool
     *
     * @link https://www.php.net/manual/en/zookeeper.setwatcher.php
     *
     * @throws ZookeeperException
     * @throws ZookeeperConnectionException when connection not in connected status
     */
    public function setWatcher($watcher_cb) {}

    /**
     * Get the state of the zookeeper connection.
     *
     * @return int
     *
     * @link https://www.php.net/manual/en/zookeeper.getstate.php
     *
     * @throws ZookeeperException
     * @throws ZookeeperConnectionException when connection not in connected status
     */
    #[Pure]
    public function getState() {}

    /**
     * Return the timeout for this session, only valid if the connections is currently connected
     * (ie. last watcher state is ZOO_CONNECTED_STATE). This value may change after a server reconnect.
     *
     * @return int
     *
     * @link https://www.php.net/manual/en/zookeeper.getrecvtimeout.php
     *
     * @throws ZookeeperException
     * @throws ZookeeperConnectionException when connection not in connected status
     */
    #[Pure]
    public function getRecvTimeout() {}

    /**
     * Specify application credentials.
     *
     * @param string   $scheme
     * @param string   $cert
     * @param callable $completion_cb
     *
     * @link https://www.php.net/manual/en/zookeeper.addauth.php
     *
     * @return bool
     *
     * @throws ZookeeperException
     * @throws ZookeeperConnectionException when connection not in connected status
     */
    public function addAuth($scheme, $cert, $completion_cb = null) {}

    /**
     * Checks if the current zookeeper connection state can be recovered.
     *
     * @return bool
     *
     * @link https://www.php.net/manual/en/zookeeper.isrecoverable.php
     *
     * @throws ZookeeperException
     * @throws ZookeeperConnectionException when connection not in connected status
     */
    public function isRecoverable() {}

    /**
     * Sets the stream to be used by the library for logging.
     *
     * TODO: might be able to set a stream like php://stderr or something
     *
     * @param resource $file
     *
     * @link https://www.php.net/manual/en/zookeeper.setlogstream.php
     *
     * @return bool
     */
    public function setLogStream($file) {}

    /**
     * Sets the debugging level for the library.
     *
     * @param int $level
     *
     * @link https://www.php.net/manual/en/zookeeper.setdebuglevel.php
     *
     * @return bool
     */
    public static function setDebugLevel($level) {}

    /**
     * Enable/disable quorum endpoint order randomization.
     *
     * @param bool $trueOrFalse
     *
     * @link https://www.php.net/manual/en/zookeeper.setdeterministicconnorder.php
     *
     * @return bool
     */
    public static function setDeterministicConnOrder($trueOrFalse) {}
}

class ZookeeperException extends Exception {}

class ZookeeperOperationTimeoutException extends ZookeeperException {}

class ZookeeperConnectionException extends ZookeeperException {}

class ZookeeperMarshallingException extends ZookeeperException {}

class ZookeeperAuthenticationException extends ZookeeperException {}

class ZookeeperSessionException extends ZookeeperException {}

class ZookeeperNoNodeException extends ZookeeperException {}
<?php

/**
 * Stubs for APC (apcu_bc nowadays) extension
 */

/**
 * @link https://php.net/manual/en/apc.constants.php
 */
define('APC_BIN_VERIFY_MD5', 1);
/**
 * @link https://php.net/manual/en/apc.constants.php
 */
define('APC_BIN_VERIFY_CRC32', 2);

/**
 * Retrieves cached information and meta-data from APC's data store
 * @link https://php.net/manual/en/function.apc-cache-info.php
 * @param string $type If cache_type is "user", information about the user cache will be returned.
 * If cache_type is "filehits", information about which files have been served from the bytecode
 * cache for the current request will be returned. This feature must be enabled at compile time
 * using --enable-filehits. If an invalid or no cache_type is specified, information about the
 * system cache (cached files) will be returned.
 * @param bool $limited If limited is TRUE, the return value will exclude the individual list
 * of cache entries. This is useful when trying to optimize calls for statistics gathering.
 * @return array|false Array of cached data (and meta-data) or FALSE on failure.
 */
function apc_cache_info($type = '', $limited = false) {}

/**
 * Clears the APC cache
 * @link https://php.net/manual/en/function.apc-clear-cache.php
 * @param string $cache_type If cache_type is "user", the user cache will be cleared;
 * otherwise, the system cache (cached files) will be cleared.
 * @return bool Returns TRUE on success or FALSE on failure.
 */
function apc_clear_cache($cache_type = '') {}

/**
 * Retrieves APC's Shared Memory Allocation information
 * @link https://php.net/manual/en/function.apc-sma-info.php
 * @param bool $limited When set to FALSE (default) apc_sma_info() will
 * return a detailed information about each segment.
 * @return array|false Array of Shared Memory Allocation data; FALSE on failure.
 */
function apc_sma_info($limited = false) {}

/**
 * Cache a variable in the data store
 * @link https://php.net/manual/en/function.apc-store.php
 * @param string|array $key String: Store the variable using this name. Keys are cache-unique,
 * so storing a second value with the same key will overwrite the original value.
 * Array: Names in key, variables in value.
 * @param mixed $var [optional] The variable to store
 * @param int $ttl [optional]  Time To Live; store var in the cache for ttl seconds. After the ttl has passed,
 * the stored variable will be expunged from the cache (on the next request). If no ttl is supplied
 * (or if the ttl is 0), the value will persist until it is removed from the cache manually,
 * or otherwise fails to exist in the cache (clear, restart, etc.).
 * @return bool|array Returns TRUE on success or FALSE on failure | array with error keys.
 */
function apc_store($key, $var, $ttl = 0) {}

/**
 * Fetch a stored variable from the cache
 * @link https://php.net/manual/en/function.apc-fetch.php
 * @param string|string[] $key The key used to store the value (with apc_store()).
 * If an array is passed then each element is fetched and returned.
 * @param bool|null &$success Set to TRUE in success and FALSE in failure.
 * @return mixed|false The stored variable or array of variables on success; FALSE on failure.
 */
function apc_fetch($key, &$success = null) {}

/**
 * Removes a stored variable from the cache
 * @link https://php.net/manual/en/function.apc-delete.php
 * @param string|string[]|APCIterator $key The key used to store the value (with apc_store()).
 * @return bool|string[] Returns TRUE on success or FALSE on failure. For array of keys returns list of failed keys.
 */
function apc_delete($key) {}

/**
 * Defines a set of constants for retrieval and mass-definition
 *
 * define() is notoriously slow. Since the main benefit of APC is to increase
 * the performance of scripts/applications, this mechanism is provided to streamline
 * the process of mass constant definition. However, this function does not perform
 * as well as anticipated. For a better-performing solution, try the hidef extension from PECL.
 *
 * @link https://php.net/manual/en/function.apc-define-constants.php
 * @param string $key The key serves as the name of the constant set being stored.
 * This key is used to retrieve the stored constants in apc_load_constants().
 * @param array $constants An associative array of constant_name => value pairs.
 * The constant_name must follow the normal constant naming rules. Value must evaluate to a scalar value.
 * @param bool $case_sensitive The default behaviour for constants is to be declared case-sensitive;
 * i.e. CONSTANT and Constant represent different values. If this parameter evaluates to FALSE
 * the constants will be declared as case-insensitive symbols.
 * @return bool Returns TRUE on success or FALSE on failure.
 */
function apc_define_constants($key, array $constants, $case_sensitive = true) {}

/**
 * Caches a variable in the data store, only if it's not already stored
 * @link https://php.net/manual/en/function.apc-add.php
 * @param string $key Store the variable using this name. Keys are cache-unique,
 * so attempting to use apc_add() to store data with a key that already exists will not
 * overwrite the existing data, and will instead return FALSE. (This is the only difference
 * between apc_add() and apc_store().)
 * @param mixed $var The variable to store
 * @param int $ttl Time To Live; store var in the cache for ttl seconds. After the ttl has passed,
 * the stored variable will be expunged from the cache (on the next request). If no ttl is supplied
 * (or if the ttl is 0), the value will persist until it is removed from the cache manually,
 * or otherwise fails to exist in the cache (clear, restart, etc.).
 * @return bool
 */
function apc_add($key, $var, $ttl = 0) {}

/**
 * Stores a file in the bytecode cache, bypassing all filters
 * @link https://php.net/manual/en/function.apc-compile-file.php
 * @param string|string[] $filename Full or relative path to a PHP file that will be
 * compiled and stored in the bytecode cache.
 * @param bool $atomic
 * @return bool Returns TRUE on success or FALSE on failure.
 */
function apc_compile_file($filename, $atomic = true) {}

/**
 * Loads a set of constants from the cache
 * @link https://php.net/manual/en/function.apc-load-constants.php
 * @param string $key The name of the constant set (that was stored
 * with apc_define_constants()) to be retrieved.
 * @param bool $case_sensitive The default behaviour for constants is to be declared case-sensitive;
 * i.e. CONSTANT and Constant represent different values. If this parameter evaluates to FALSE
 * the constants will be declared as case-insensitive symbols.
 * @return bool Returns TRUE on success or FALSE on failure.
 */
function apc_load_constants($key, $case_sensitive = true) {}

/**
 * Checks if APC key exists
 * @link https://php.net/manual/en/function.apc-exists.php
 * @param string|string[] $keys A string, or an array of strings, that contain keys.
 * @return bool|string[] Returns TRUE if the key exists, otherwise FALSE
 * Or if an array was passed to keys, then an array is returned that
 * contains all existing keys, or an empty array if none exist.
 */
function apc_exists($keys) {}

/**
 * Deletes the given files from the opcode cache
 *
 * Accepts a string, array of strings, or APCIterator object.
 * Returns True/False, or for an Array an Array of failed files.
 *
 * @link https://php.net/manual/en/function.apc-delete-file.php
 * @param string|string[]|APCIterator $keys
 * @return bool|string[]
 */
function apc_delete_file($keys) {}

/**
 * Increase a stored number
 * @link https://php.net/manual/en/function.apc-inc.php
 * @param string $key The key of the value being increased.
 * @param int $step The step, or value to increase.
 * @param bool|null &$success Optionally pass the success or fail boolean value to this referenced variable.
 * @return int|false Returns the current value of key's value on success, or FALSE on failure.
 */
function apc_inc($key, $step = 1, &$success = null) {}

/**
 * Decrease a stored number
 * @link https://php.net/manual/en/function.apc-dec.php
 * @param string $key The key of the value being decreased.
 * @param int $step The step, or value to decrease.
 * @param bool|null &$success Optionally pass the success or fail boolean value to this referenced variable.
 * @return int|false Returns the current value of key's value on success, or FALSE on failure.
 */
function apc_dec($key, $step = 1, &$success = null) {}

/**
 * Updates an old value with a new value
 * @link https://php.net/manual/en/function.apc-cas.php
 * @param string $key
 * @param int $old
 * @param int $new
 * @return bool
 */
function apc_cas($key, $old, $new) {}

/**
 * Returns a binary dump of the given files and user variables from the APC cache
 *
 * A NULL for files or user_vars signals a dump of every entry, while array() will dump nothing.
 *
 * @link https://php.net/manual/en/function.apc-bin-dump.php
 * @param string[]|null $files The files. Passing in NULL signals a dump of every entry, while passing in array() will dump nothing.
 * @param string[]|null $user_vars The user vars. Passing in NULL signals a dump of every entry, while passing in array() will dump nothing.
 * @return string|false|null Returns a binary dump of the given files and user variables from the APC cache, FALSE if APC is not enabled, or NULL if an unknown error is encountered.
 */
function apc_bin_dump($files = null, $user_vars = null) {}

/**
 * Output a binary dump of the given files and user variables from the APC cache to the named file
 * @link https://php.net/manual/en/function.apc-bin-dumpfile.php
 * @param string[]|null $files The file names being dumped.
 * @param string[]|null $user_vars The user variables being dumped.
 * @param string $filename The filename where the dump is being saved.
 * @param int $flags Flags passed to the filename stream. See the file_put_contents() documentation for details.
 * @param resource $context The context passed to the filename stream. See the file_put_contents() documentation for details.
 * @return int|false The number of bytes written to the file, otherwise FALSE if APC
 * is not enabled, filename is an invalid file name, filename can't be opened,
 * the file dump can't be completed (e.g., the hard drive is out of disk space),
 * or an unknown error was encountered.
 */
function apc_bin_dumpfile($files, $user_vars, $filename, $flags = 0, $context = null) {}

/**
 * Load the given binary dump into the APC file/user cache
 * @link https://php.net/manual/en/function.apc-bin-load.php
 * @param string $data The binary dump being loaded, likely from apc_bin_dump().
 * @param int $flags Either APC_BIN_VERIFY_CRC32, APC_BIN_VERIFY_MD5, or both.
 * @return bool Returns TRUE if the binary dump data was loaded with success, otherwise FALSE is returned.
 * FALSE is returned if APC is not enabled, or if the data is not a valid APC binary dump (e.g., unexpected size).
 */
function apc_bin_load($data, $flags = 0) {}

/**
 * Load the given binary dump from the named file into the APC file/user cache
 * @link https://php.net/manual/en/function.apc-bin-loadfile.php
 * @param string $filename The file name containing the dump, likely from apc_bin_dumpfile().
 * @param resource $context The files context.
 * @param int $flags Either APC_BIN_VERIFY_CRC32, APC_BIN_VERIFY_MD5, or both.
 * @return bool Returns TRUE on success, otherwise FALSE Reasons it may return FALSE include APC
 * is not enabled, filename is an invalid file name or empty, filename can't be opened,
 * the file dump can't be completed, or if the data is not a valid APC binary dump (e.g., unexpected size).
 */
function apc_bin_loadfile($filename, $context = null, $flags = 0) {}

/**
 * The APCIterator class
 *
 * The APCIterator class makes it easier to iterate over large APC caches.
 * This is helpful as it allows iterating over large caches in steps, while grabbing a defined number
 * of entries per lock instance, so it frees the cache locks for other activities rather than hold up
 * the entire cache to grab 100 (the default) entries. Also, using regular expression matching is more
 * efficient as it's been moved to the C level.
 *
 * @link https://php.net/manual/en/class.apciterator.php
 */
class APCIterator implements Iterator
{
    /**
     * Constructs an APCIterator iterator object
     * @link https://php.net/manual/en/apciterator.construct.php
     * @param string $cache The cache type, which will be 'user' or 'file'.
     * @param string|string[]|null $search A PCRE regular expression that matches against APC key names,
     * either as a string for a single regular expression, or as an array of regular expressions.
     * Or, optionally pass in NULL to skip the search.
     * @param int $format The desired format, as configured with one ore more of the APC_ITER_* constants.
     * @param int $chunk_size The chunk size. Must be a value greater than 0. The default value is 100.
     * @param int $list The type to list. Either pass in APC_LIST_ACTIVE  or APC_LIST_INACTIVE.
     */
    public function __construct($cache, $search = null, $format = APC_ITER_ALL, $chunk_size = 100, $list = APC_LIST_ACTIVE) {}

    /**
     * Rewinds back the iterator to the first element
     * @link https://php.net/manual/en/apciterator.rewind.php
     */
    public function rewind() {}

    /**
     * Checks if the current iterator position is valid
     * @link https://php.net/manual/en/apciterator.valid.php
     * @return bool Returns TRUE if the current iterator position is valid, otherwise FALSE.
     */
    public function valid() {}

    /**
     * Gets the current item from the APCIterator stack
     * @link https://php.net/manual/en/apciterator.current.php
     * @return mixed|false Returns the current item on success, or FALSE if no more items or exist, or on failure.
     */
    public function current() {}

    /**
     * Gets the current iterator key
     * @link https://php.net/manual/en/apciterator.key.php
     * @return string|int|false Returns the key on success, or FALSE upon failure.
     */
    public function key() {}

    /**
     * Moves the iterator pointer to the next element
     * @link https://php.net/manual/en/apciterator.next.php
     * @return bool Returns TRUE on success or FALSE on failure.
     */
    public function next() {}

    /**
     * Gets the total number of cache hits
     * @link https://php.net/manual/en/apciterator.gettotalhits.php
     * @return int|false The number of hits on success, or FALSE on failure.
     */
    public function getTotalHits() {}

    /**
     * Gets the total cache size
     * @link https://php.net/manual/en/apciterator.gettotalsize.php
     * @return int|bool The total cache size.
     */
    public function getTotalSize() {}

    /**
     * Get the total count
     * @link https://php.net/manual/en/apciterator.gettotalcount.php
     * @return int|bool The total count.
     */
    public function getTotalCount() {}
}

/**
 * Stubs for APCu 5.0.0
 */

/**
 * @link https://php.net/manual/en/apcu.constants.php
 */
define('APC_LIST_ACTIVE', 1);
/**
 * @link https://php.net/manual/en/apcu.constants.php
 */
define('APC_LIST_DELETED', 2);
/**
 * @link https://php.net/manual/en/apcu.constants.php
 */
define('APC_ITER_TYPE', 1);
/**
 * @link https://php.net/manual/en/apcu.constants.php
 */
define('APC_ITER_KEY', 2);
/**
 * @link https://php.net/manual/en/apcu.constants.php
 */
define('APC_ITER_FILENAME', 4);
/**
 * @link https://php.net/manual/en/apcu.constants.php
 */
define('APC_ITER_DEVICE', 8);
/**
 * @link https://php.net/manual/en/apcu.constants.php
 */
define('APC_ITER_INODE', 16);
/**
 * @link https://php.net/manual/en/apcu.constants.php
 */
define('APC_ITER_VALUE', 32);
/**
 * @link https://php.net/manual/en/apcu.constants.php
 */
define('APC_ITER_MD5', 64);
/**
 * @link https://php.net/manual/en/apcu.constants.php
 */
define('APC_ITER_NUM_HITS', 128);
/**
 * @link https://php.net/manual/en/apcu.constants.php
 */
define('APC_ITER_MTIME', 256);
/**
 * @link https://php.net/manual/en/apcu.constants.php
 */
define('APC_ITER_CTIME', 512);
/**
 * @link https://php.net/manual/en/apcu.constants.php
 */
define('APC_ITER_DTIME', 1024);
/**
 * @link https://php.net/manual/en/apcu.constants.php
 */
define('APC_ITER_ATIME', 2048);
/**
 * @link https://php.net/manual/en/apcu.constants.php
 */
define('APC_ITER_REFCOUNT', 4096);
/**
 * @link https://php.net/manual/en/apcu.constants.php
 */
define('APC_ITER_MEM_SIZE', 8192);
/**
 * @link https://php.net/manual/en/apcu.constants.php
 */
define('APC_ITER_TTL', 16384);
/**
 * @link https://php.net/manual/en/apcu.constants.php
 */
define('APC_ITER_NONE', 0);
/**
 * @link https://php.net/manual/en/apcu.constants.php
 */
define('APC_ITER_ALL', -1);

/**
 * Clears the APCu cache
 * @link https://php.net/manual/en/function.apcu-clear-cache.php
 *
 * @return bool Returns TRUE always.
 */
function apcu_clear_cache() {}

/**
 * Retrieves APCu Shared Memory Allocation information
 * @link https://php.net/manual/en/function.apcu-sma-info.php
 * @param bool $limited When set to FALSE (default) apcu_sma_info() will
 * return a detailed information about each segment.
 *
 * @return array|false Array of Shared Memory Allocation data; FALSE on failure.
 */
function apcu_sma_info($limited = false) {}

/**
 * Cache a variable in the data store
 * @link https://php.net/manual/en/function.apcu-store.php
 * @param string|string[] $key String: Store the variable using this name. Keys are cache-unique,
 * so storing a second value with the same key will overwrite the original value.
 * Array: Names in key, variables in value.
 * @param mixed $var [optional] The variable to store
 * @param int $ttl [optional]  Time To Live; store var in the cache for ttl seconds. After the ttl has passed,
 * the stored variable will be expunged from the cache (on the next request). If no ttl is supplied
 * (or if the ttl is 0), the value will persist until it is removed from the cache manually,
 * or otherwise fails to exist in the cache (clear, restart, etc.).
 * @return bool|array Returns TRUE on success or FALSE on failure | array with error keys.
 */
function apcu_store($key, $var, $ttl = 0) {}

/**
 * Fetch a stored variable from the cache
 * @link https://php.net/manual/en/function.apcu-fetch.php
 * @param string|string[] $key The key used to store the value (with apcu_store()).
 * If an array is passed then each element is fetched and returned.
 * @param bool|null &$success Set to TRUE in success and FALSE in failure.
 * @return mixed|false The stored variable or array of variables on success; FALSE on failure.
 */
function apcu_fetch($key, &$success = null) {}

/**
 * Removes a stored variable from the cache
 * @link https://php.net/manual/en/function.apcu-delete.php
 * @param string|string[]|APCUIterator $key The key used to store the value (with apcu_store()).
 * @return bool|string[] Returns TRUE on success or FALSE on failure. For array of keys returns list of failed keys.
 */
function apcu_delete($key) {}

/**
 * Caches a variable in the data store, only if it's not already stored
 * @link https://php.net/manual/en/function.apcu-add.php
 * @param string|array $key Store the variable using this name. Keys are cache-unique,
 * so attempting to use apcu_add() to store data with a key that already exists will not
 * overwrite the existing data, and will instead return FALSE. (This is the only difference
 * between apcu_add() and apcu_store().)
 * Array: Names in key, variables in value.
 * @param mixed $var The variable to store
 * @param int $ttl Time To Live; store var in the cache for ttl seconds. After the ttl has passed,
 * the stored variable will be expunged from the cache (on the next request). If no ttl is supplied
 * (or if the ttl is 0), the value will persist until it is removed from the cache manually,
 * or otherwise fails to exist in the cache (clear, restart, etc.).
 * @return bool|array Returns TRUE if something has effectively been added into the cache, FALSE otherwise.
 * Second syntax returns array with error keys.
 */
function apcu_add($key, $var, $ttl = 0) {}

/**
 * Checks if APCu key exists
 * @link https://php.net/manual/en/function.apcu-exists.php
 * @param string|string[] $keys A string, or an array of strings, that contain keys.
 * @return bool|string[] Returns TRUE if the key exists, otherwise FALSE
 * Or if an array was passed to keys, then an array is returned that
 * contains all existing keys, or an empty array if none exist.
 */
function apcu_exists($keys) {}

/**
 * Increase a stored number
 * @link https://php.net/manual/en/function.apcu-inc.php
 * @param string $key The key of the value being increased.
 * @param int $step The step, or value to increase.
 * @param int $ttl Time To Live; store var in the cache for ttl seconds. After the ttl has passed,
 * the stored variable will be expunged from the cache (on the next request). If no ttl is supplied
 * (or if the ttl is 0), the value will persist until it is removed from the cache manually,
 * or otherwise fails to exist in the cache (clear, restart, etc.).
 * @param bool|null &$success Optionally pass the success or fail boolean value to this referenced variable.
 * @return int|false Returns the current value of key's value on success, or FALSE on failure.
 */
function apcu_inc($key, $step = 1, &$success = null, $ttl = 0) {}

/**
 * Decrease a stored number
 * @link https://php.net/manual/en/function.apcu-dec.php
 * @param string $key The key of the value being decreased.
 * @param int $step The step, or value to decrease.
 * @param int $ttl Time To Live; store var in the cache for ttl seconds. After the ttl has passed,
 * the stored variable will be expunged from the cache (on the next request). If no ttl is supplied
 * (or if the ttl is 0), the value will persist until it is removed from the cache manually,
 * or otherwise fails to exist in the cache (clear, restart, etc.).
 * @param bool|null &$success Optionally pass the success or fail boolean value to this referenced variable.
 * @return int|false Returns the current value of key's value on success, or FALSE on failure.
 */
function apcu_dec($key, $step = 1, &$success = null, $ttl = 0) {}

/**
 * Updates an old value with a new value
 *
 * apcu_cas() updates an already existing integer value if the old parameter matches the currently stored value
 * with the value of the new parameter.
 *
 * @link https://php.net/manual/en/function.apcu-cas.php
 * @param string $key The key of the value being updated.
 * @param int $old The old value (the value currently stored).
 * @param int $new The new value to update to.
 * @return bool Returns TRUE on success or FALSE on failure.
 */
function apcu_cas($key, $old, $new) {}

/**
 * Atomically fetch or generate a cache entry
 *
 * <p>Atomically attempts to find key in the cache, if it cannot be found generator is called,
 * passing key as the only argument. The return value of the call is then cached with the optionally
 * specified ttl, and returned.
 * </p>
 *
 * <p>Note: When control enters <i>apcu_entry()</i> the lock for the cache is acquired exclusively, it is released when
 * control leaves apcu_entry(): In effect, this turns the body of generator into a critical section,
 * disallowing two processes from executing the same code paths concurrently.
 * In addition, it prohibits the concurrent execution of any other APCu functions,
 * since they will acquire the same lock.
 * </p>
 *
 * @link https://php.net/manual/en/function.apcu-entry.php
 *
 * @param string $key Identity of cache entry
 * @param callable $generator A callable that accepts key as the only argument and returns the value to cache.
 * <p>Warning
 * The only APCu function that can be called safely by generator is apcu_entry().</p>
 * @param int $ttl [optional] Time To Live; store var in the cache for ttl seconds.
 * After the ttl has passed, the stored variable will be expunged from the cache (on the next request).
 * If no ttl is supplied (or if the ttl is 0), the value will persist until it is removed from the cache manually,
 * or otherwise fails to exist in the cache (clear, restart, etc.).
 * @return mixed Returns the cached value
 * @since APCu 5.1.0
 */
function apcu_entry($key, callable $generator, $ttl = 0) {}

/**
 * Retrieves cached information from APCu's data store
 *
 * @link https://php.net/manual/en/function.apcu-cache-info.php
 *
 * @param bool $limited If limited is TRUE, the return value will exclude the individual list of cache entries.
 * This is useful when trying to optimize calls for statistics gathering.
 * @return array|false Array of cached data (and meta-data) or FALSE on failure
 */
function apcu_cache_info($limited = false) {}

/**
 * Whether APCu is usable in the current environment
 *
 * @link https://www.php.net/manual/en/function.apcu-enabled.php
 *
 * @return bool
 */
function apcu_enabled() {}

/**
 * @param string $key
 * @return array|null
 */
function apcu_key_info($key) {}

/**
 * The APCUIterator class
 *
 * The APCUIterator class makes it easier to iterate over large APCu caches.
 * This is helpful as it allows iterating over large caches in steps, while grabbing a defined number
 * of entries per lock instance, so it frees the cache locks for other activities rather than hold up
 * the entire cache to grab 100 (the default) entries. Also, using regular expression matching is more
 * efficient as it's been moved to the C level.
 *
 * @link https://php.net/manual/en/class.apcuiterator.php
 * @since APCu 5.0.0
 */
class APCUIterator implements Iterator
{
    /**
     * Constructs an APCUIterator iterator object
     * @link https://php.net/manual/en/apcuiterator.construct.php
     * @param string|string[]|null $search A PCRE regular expression that matches against APCu key names,
     * either as a string for a single regular expression, or as an array of regular expressions.
     * Or, optionally pass in NULL to skip the search.
     * @param int $format The desired format, as configured with one ore more of the APC_ITER_* constants.
     * @param int $chunk_size The chunk size. Must be a value greater than 0. The default value is 100.
     * @param int $list The type to list. Either pass in APC_LIST_ACTIVE  or APC_LIST_DELETED.
     */
    public function __construct($search = null, $format = APC_ITER_ALL, $chunk_size = 100, $list = APC_LIST_ACTIVE) {}

    /**
     * Rewinds back the iterator to the first element
     * @link https://php.net/manual/en/apcuiterator.rewind.php
     */
    public function rewind() {}

    /**
     * Checks if the current iterator position is valid
     * @link https://php.net/manual/en/apcuiterator.valid.php
     * @return bool Returns TRUE if the current iterator position is valid, otherwise FALSE.
     */
    public function valid() {}

    /**
     * Gets the current item from the APCUIterator stack
     * @link https://php.net/manual/en/apcuiterator.current.php
     * @return mixed|false Returns the current item on success, or FALSE if no more items or exist, or on failure.
     */
    public function current() {}

    /**
     * Gets the current iterator key
     * @link https://php.net/manual/en/apcuiterator.key.php
     * @return string|int|false Returns the key on success, or FALSE upon failure.
     */
    public function key() {}

    /**
     * Moves the iterator pointer to the next element
     * @link https://php.net/manual/en/apcuiterator.next.php
     * @return bool Returns TRUE on success or FALSE on failure.
     */
    public function next() {}

    /**
     * Gets the total number of cache hits
     * @link https://php.net/manual/en/apcuiterator.gettotalhits.php
     * @return int|false The number of hits on success, or FALSE on failure.
     */
    public function getTotalHits() {}

    /**
     * Gets the total cache size
     * @link https://php.net/manual/en/apcuiterator.gettotalsize.php
     * @return int|false The total cache size.
     */
    public function getTotalSize() {}

    /**
     * Get the total count
     * @link https://php.net/manual/en/apcuiterator.gettotalcount.php
     * @return int|false The total count.
     */
    public function getTotalCount() {}
}
<?php

// Stubs for ext-uv: https://github.com/bwoebi/php-uv

/**
 * Decrement reference.
 *
 * @param resource $uv_t resource handle.
 *
 * @return void
 */
function uv_unref($uv_t) {}

/**
 * Get last error code.
 *
 * @param resource|null $uv_loop uv loop handle.
 * @return int
 */
function uv_last_error($uv_loop = null): int {}

/**
 * Get error code name.
 *
 * @param int $error_code libuv error code.
 * @return string
 */
function uv_err_name(int $error_code): string {}

/**
 * Get error message.
 *
 * @param int $error_code libuv error code
 * @return string
 */
function uv_strerror(int $error_code): string {}

/**
 * @param resource $uv_loop uv loop handle.
 *
 * @return void
 */
function uv_update_time($uv_loop) {}

/**
 * Increment reference count.
 *
 * @param resource $uv_handle uv resource.
 *
 * @return void
 */
function uv_ref($uv_handle) {}

/**
 * Run event loop.
 *
 * @param resource|null $uv_loop uv_loop resource.
 *
 * @return void
 */
function uv_run($uv_loop = null) {}

/**
 * @param resource|null $uv_loop
 *
 * @return void
 */
function uv_run_once($uv_loop = null) {}

/**
 * Delete specified loop resource.
 *
 * @param resource $uv_loop uv_loop resource.
 *
 * @return void
 */
function uv_loop_delete($uv_loop) {}

/**
 * @return int
 */
function uv_now(): int {}

/**
 * Binds a name to a socket.
 *
 * @param resource $uv_tcp uv_tcp resource
 * @param resource $uv_sockaddr uv sockaddr4 resource.
 *
 * @return void
 */
function uv_tcp_bind($uv_tcp, $uv_sockaddr) {}

/**
 * Binds a name to a socket.
 *
 * @param resource $uv_tcp uv_tcp resource
 * @param resource $uv_sockaddr uv sockaddr6 resource.
 *
 * @return void
 */
function uv_tcp_bind6($uv_tcp, $uv_sockaddr) {}

/**
 * Send buffer to speicified uv resource.
 *
 * @param resource $handle uv resources (uv_tcp, uv_udp, uv_pipe ...etc.).
 * @param string $data buffer.
 * @param callable $callback callable variables. This callback expects (resource $handle, long $status).
 *
 * @return void
 */
function uv_write($handle, string $data, callable $callback) {}

/**
 * @param resource $handle
 * @param string $data
 * @param resource $send
 * @param callable $callback
 *
 * @return void
 */
function uv_write2($handle, string $data, $send, callable $callback) {}

/**
 * Set Nagel's flags for specified tcp resource.
 *
 * @param resource $handle libuv tcp resource.
 * @param bool $enable true means enabled. false means disabled.
 */
function uv_tcp_nodelay($handle, bool $enable) {}

/**
 * Accepts a connection on a socket.
 *
 * @param resource $server uv_tcp or uv_pipe server resource.
 * @param resource $client uv_tcp or uv_pipe client resource.
 *
 * @return void
 */
function uv_accept($server, $client) {}

/**
 * Shutdown uv handle.
 *
 * @param resource $handle uv resources (uv_tcp, uv_udp, uv_pipe ...etc.).
 * @param callable $callback callable variables. this callback expects (resource $handle, long $status).
 *
 * @return void
 */
function uv_shutdown($handle, callable $callback) {}

/**
 * Close uv handle.
 *
 * @param resource $handle uv resources (uv_tcp, uv_udp, uv_pipe ...etc.).
 * @param callable $callback callable variables. this callback expects (resource $handle, long $status).
 *
 * @return void
 */
function uv_close($handle, callable $callback) {}

/**
 * Starts read callback for uv resources.
 *
 * Note: You have to handle errors correctly. otherwise this will leak.
 * Note: if you want to use PHP's stream or socket resource. see uv_fs_poll_init and uv_fs_read.
 *
 * @param resource $handle uv resources (uv_tcp, uv_udp, uv_pipe ...etc.)
 * @param callable $callback callable variables. this callback parameter expects (resource $handle, long $nread, string buffer).
 */
function uv_read_start($handle, callable $callback) {}

/**
 * @param resource $handle
 * @param callable $callback
 *
 * @return void
 */
function uv_read2_start($handle, callable $callback) {}

/**
 * Stop read callback.
 *
 * @param resource $handle uv resource handle which started uv_read.
 *
 * @return void
 */
function uv_read_stop($handle) {}

/**
 * Create a ipv4 sockaddr.
 *
 * @param string $ipv4_addr ipv4 address
 * @param int $port port number.
 *
 * @return resource
 */
function uv_ip4_addr(string $ipv4_addr, int $port) {}

/**
 * Create a ipv6 sockaddr.
 *
 * @param string $ipv6_addr ipv6 address.
 * @param int $port port number.
 *
 * @return resource
 */
function uv_ip6_addr(string $ipv6_addr, int $port) {}

/**
 * Listens for a connection on a uv handle.
 *
 * @param resource $handle uv resource handle (tcp, udp and pipe).
 * @param int $backlog backlog.
 * @param callable $callback this callback parameter expects (resource $connection, long $status).
 *
 * @return void
 */
function uv_listen($handle, int $backlog, callable $callback) {}

/**
 * Connect to specified ip address and port.
 *
 * @param resource $handle requires uv_tcp_init() resource.
 * @param resource $ipv4_addr requires uv_sockaddr resource.
 * @param callable $callback callable variables. This callback expects (resource $tcp_handle, $status).
 *
 * @return void
 */
function uv_tcp_connect($handle, $ipv4_addr, callable $callback) {}

/**
 * Connect to specified ip address and port.
 *
 * @param resource $handle requires uv_tcp_init() resource.
 * @param resource $ipv6_addr requires uv_sockaddr resource.
 * @param callable $callback callable variables. This callback expects (resource $tcp_handle, $status).
 *
 * @return void
 */
function uv_tcp_connect6($handle, $ipv6_addr, callable $callback) {}

/**
 * Initialize timer handle.
 *
 * @param resource|null $loop uv_loop resource.
 *
 * @return resource
 */
function uv_timer_init($loop = null) {}

/**
 * Initialize timer handle.
 *
 * @param resource $timer uv_loop resource.
 * @param int $timeout periodical event starts when after this timeout. 1000 is 1 sec.
 * @param int $repeat repeat interval. 1000 is 1 sec.
 * @param callable $callback
 *
 * @return void
 */
function uv_timer_start($timer, int $timeout, int $repeat, callable $callback) {}

/**
 * stop specified timer.
 *
 * @param resource $timer uv timer resource.
 *
 * @return int
 */
function uv_timer_stop($timer): int {}

/**
 * Restart timer.
 *
 * @param resource $timer uv_timer resource.
 *
 * @return void
 */
function uv_timer_again($timer) {}

/**
 * Set repeat count.
 *
 * @param resource $timer uv_timer resource.
 * @param int $repeat repeat count.
 *
 * @return void
 */
function uv_timer_set_repeat($timer, int $repeat) {}

/**
 * Returns repeat interval.
 *
 * @param resource $timer uv_timer resource.
 *
 * @return int
 */
function uv_timer_get_repeat($timer): int {}

/**
 * Initialize uv idle handle.
 *
 * @param resource $loop uv_loop resource.
 *
 * @return resource initialized idle handle.
 */
function uv_idle_init($loop = null) {}

/**
 * start idle callback.
 *
 * @param resource $idle uv_idle resource.
 * @param callable $callback idle callback.
 *
 * @return void
 */
function uv_idle_start($idle, callable $callback) {}

/**
 * Stop idle callback.
 *
 * @param resource $idle uv_idle resource.
 *
 * @return void
 */
function uv_idle_stop($idle) {}

/**
 * @param resource $loop
 * @param callable $callback
 * @param string $node
 * @param string $service
 * @param array $hints
 *
 * @return void
 */
function uv_getaddrinfo($loop, callable $callback, string $node, string $service, array $hints) {}

/**
 * Create a tcp socket.
 *
 * @param resource|null $loop loop resource or null. if not specified loop resource then use uv_default_loop resource.
 *
 * @return resource uv resource which initialized for tcp.
 */
function uv_tcp_init($loop = null) {}

/**
 * Return default loop handle.
 *
 * @return resource
 */
function uv_default_loop() {}

/**
 * Create a new loop handle.
 *
 * @return resource
 */
function uv_loop_new() {}

/**
 * Create a udp socket.
 *
 * @param resource|null $loop loop resource or null. if not specified loop resource then use uv_default_loop resource.
 *
 * @return resource uv resource which initialized for udp.
 */
function uv_udp_init($loop = null) {}

/**
 * Listens for a connection on a uv udp handle.
 *
 * @param resource $resource uv resource handle (udp).
 * @param resource $address uv sockaddr(ipv4) resource.
 * @param int $flags unused.
 *
 * @return void
 */
function uv_udp_bind($resource, $address, int $flags) {}

/**
 * Listens for a connection on a uv udp handle.
 *
 * @param resource $resource uv resource handle (udp).
 * @param resource $address uv sockaddr(ipv6) resource.
 * @param int $flags Should be 0 or UV::UDP_IPV6ONLY.
 *
 * @return void
 */
function uv_udp_bind6($resource, $address, int $flags) {}

/**
 * Start receive callback.
 *
 * @param resource $handle uv resource handle (udp).
 * @param callable $callback this callback parameter expects (resource $stream, long $nread, string $buffer)..
 *
 * @return void
 */
function uv_udp_recv_start($handle, callable $callback) {}

/**
 * Stop receive callback.
 *
 * @param resource $handle
 *
 * @return void
 */
function uv_udp_recv_stop($handle) {}

/**
 * Join or leave udp muticast group.
 *
 * @param resource $handle uv resource handle (udp).
 * @param string $multicast_addr multicast address.
 * @param string $interface_addr interface address.
 * @param int $membership UV::JOIN_GROUP or UV::LEAVE_GROUP
 *
 * @return int
 */
function uv_udp_set_membership($handle, string $multicast_addr, string $interface_addr, int $membership): int {}

/**
 * Set multicast loop.
 *
 * @param resource $handle uv resource handle (udp).
 * @param int $enabled
 *
 * @return void
 */
function uv_udp_set_multicast_loop($handle, int $enabled) {}

/**
 * Set multicast ttl.
 *
 * @param resource $handle uv resource handle (udp).
 * @param int $ttl multicast ttl.
 *
 * @return void
 */
function uv_udp_set_multicast_ttl($handle, int $ttl) {}

/**
 * Set udp broadcast.
 *
 * @param resource $handle uv resource handle (udp).
 * @param bool $enabled
 *
 * @return void
 */
function uv_udp_set_broadcast($handle, bool $enabled) {}

/**
 * Send buffer to specified address.
 *
 * @param resource $handle uv resource handle (udp).
 * @param string $data data.
 * @param resource $uv_addr uv_ip4_addr.
 * @param callable $callback this callback parameter expects (resource $stream, long $status).
 *
 * @return void
 */
function uv_udp_send($handle, string $data, $uv_addr, callable $callback) {}

/**
 * Send buffer to specified address.
 *
 * @param resource $handle uv resource handle (udp).
 * @param string $data data.
 * @param resource $uv_addr6 uv_ip6_addr.
 * @param callable $callback this callback parameter expects (resource $stream, long $status).
 *
 * @return void
 */
function uv_udp_send6($handle, string $data, $uv_addr6, callable $callback) {}

/**
 * @param resource $handle
 *
 * @return bool
 */
function uv_is_active($handle): bool {}

/**
 * @param resource $handle
 *
 * @return bool
 */
function uv_is_readable($handle): bool {}

/**
 * @param resource $handle
 *
 * @return bool
 */
function uv_is_writable($handle): bool {}

/**
 * @param resource $loop
 * @param callable $closure
 * @param array|null $opaque
 *
 * @return bool
 */
function uv_walk($loop, callable $closure, array $opaque = null): bool {}

/**
 * @param resource $uv
 *
 * @return int
 */
function uv_guess_handle($uv): int {}

/**
 * Returns current uv type. (this is not libuv function. util for php-uv).
 *
 * @param resource $uv uv_handle.
 *
 * @return int  should return UV::IS_UV_* constatns. e.g) UV::IS_UV_TCP.
 */
function uv_handle_type($uv): int {}

/**
 * Initialize pipe resource.
 *
 * @param resource $loop uv_loop resource.
 * @param int $ipc when this pipe use for ipc, please set true otherwise false.
 *
 * @return resource
 */
function uv_pipe_init($loop, int $ipc) {}

/**
 * Open a pipe resource.
 *
 * @param resource $handle uv pipe handle.
 * @param int $pipe dunnno. maybe file descriptor.
 *
 * @return void
 */
function uv_pipe_open($handle, int $pipe) {}

/**
 * Create a named pipe.
 *
 * @param resource $handle uv pipe handle.
 * @param string $name dunnno. maybe file descriptor.
 *
 * @return int
 */
function uv_pipe_bind($handle, string $name): int {}

/**
 * Connect to named pipe.
 *
 * @param resource $handle uv pipe handle.
 * @param string $path named pipe path.
 * @param callable $callback this callback parameter expects (resource $pipe, long $status).
 *
 * @return void
 */
function uv_pipe_connect($handle, string $path, callable $callback) {}

/**
 * @param resource $handle
 * @param void $count
 *
 * @return void
 */
function uv_pipe_pending_instances($handle, $count) {}

/**
 * @param resource $loop
 * @param array $options
 * @param int $optmask
 *
 * @return resource
 */
function uv_ares_init_options($loop, array $options, int $optmask) {}

/**
 * @param resource $handle
 * @param string $name
 * @param int $flag
 * @param callable $callback
 *
 * @return void
 */
function ares_gethostbyname($handle, string $name, int $flag, callable $callback) {}

/**
 * Returns current loadaverage.
 *
 * Note: returns array on windows box. (does not support load average on windows).
 *
 * @return array
 */
function uv_loadavg(): array {}

/**
 * Returns current uptime.
 *
 * @return float
 */
function uv_uptime(): float {}

/**
 * Returns current free memory size.
 *
 * @return int
 */
function uv_get_free_memory(): int {}

/**
 * Returns total memory size.
 *
 * @return int
 */
function uv_get_total_memory(): int {}

/**
 * @return int
 */
function uv_hrtime(): int {}

/**
 * Returns current exepath. basically this will returns current php path.
 *
 * @return string
 */
function uv_exepath(): string {}

/**
 * Returns current cpu informations.
 *
 * @return array
 */
function uv_cpu_info(): array {}

/**
 * @return array
 */
function uv_interface_addresses(): array {}

/**
 * @param resource $fd
 * @param int $flags
 *
 * @return resource
 */
function uv_stdio_new($fd, int $flags) {}

/**
 * @param resource $loop
 * @param string $command
 * @param array $args
 * @param array $stdio
 * @param string $cwd
 * @param array $env
 * @param callable|null $callback
 * @param int|null $flags
 * @param array|null $options
 *
 * @return resource
 */
function uv_spawn($loop, string $command, array $args, array $stdio, string $cwd, array $env = [], ?callable $callback = null, ?int $flags = null, ?array $options = null) {}

/**
 * Send signal to specified uv process resource.
 *
 * @param resource $handle uv resource handle (process).
 * @param int $signal
 *
 * @return void
 */
function uv_process_kill($handle, int $signal) {}

/**
 * Send signal to specified pid.
 *
 * @param int $pid process id.
 * @param int $signal
 */
function uv_kill(int $pid, int $signal) {}

/**
 * Change working directory.
 *
 * @param string $directory
 * @return bool
 */
function uv_chdir(string $directory): bool {}

/**
 * Initialize rwlock resource.
 *
 * @return resource returns uv rwlock resource.
 */
function uv_rwlock_init() {}

/**
 * Set read lock.
 *
 * @param resource $handle uv resource handle (uv rwlock).
 */
function uv_rwlock_rdlock($handle) {}

/**
 * @param resource $handle
 *
 * @return bool
 */
function uv_rwlock_tryrdlock($handle): bool {}

/**
 * Unlock read lock.
 *
 * @param resource $handle uv resource handle (uv rwlock)
 *
 * @return void
 */
function uv_rwlock_rdunlock($handle) {}

/**
 * Set write lock.
 *
 * @param resource $handle uv resource handle (uv rwlock).
 *
 * @return void
 */
function uv_rwlock_wrlock($handle) {}

/**
 * @param resource $handle
 */
function uv_rwlock_trywrlock($handle) {}

/**
 * Unlock write lock.
 *
 * @param resource $handle uv resource handle (uv rwlock).
 */
function uv_rwlock_wrunlock($handle) {}

/**
 * Initialize mutex resource.
 *
 * @return resource uv mutex resource
 */
function uv_mutex_init() {}

/**
 * Lock mutex.
 *
 * @param resource $lock uv resource handle (uv mutex).
 *
 * @return void
 */
function uv_mutex_lock($lock) {}

/**
 * @param resource $lock
 *
 * @return bool
 */
function uv_mutex_trylock($lock): bool {}

/**
 * Initialize semaphore resource.
 *
 * @param int $value
 * @return resource
 */
function uv_sem_init(int $value) {}

/**
 * Post semaphore.
 *
 * @param resource $sem uv resource handle (uv sem).
 *
 * @return void
 */
function uv_sem_post($sem) {}

/**
 * @param resource $sem
 *
 * @return void
 */
function uv_sem_wait($sem) {}

/**
 * @param resource $sem
 *
 * @return void
 */
function uv_sem_trywait($sem) {}

/**
 * Initialize prepare resource.
 *
 * @param resource $loop uv loop handle.
 *
 * @return resource
 */
function uv_prepare_init($loop) {}

/**
 * Setup prepare loop callback. (pre loop callback)
 *
 * @param resource $handle uv resource handle (prepare)
 * @param callable $callback this callback parameter expects (resource $prepare, long $status).
 *
 * @return void
 */
function uv_prepare_start($handle, callable $callback) {}

/**
 * Stop prepare callback.
 *
 * @param resource $handle uv resource handle (prepare).
 *
 * @return void
 */
function uv_prepare_stop($handle) {}

/**
 * Setup check resource.
 *
 * @param resource $loop uv loop handle
 *
 * @return resource
 */
function uv_check_init($loop) {}

/**
 * Stats check loop callback. (after loop callback)
 *
 * @param resource $handle uv resource handle (check).
 * @param callable $callback this callback parameter expects (resource $check, long $status).
 *
 * @return void
 */
function uv_check_start($handle, callable $callback) {}

/**
 * Stop check callback.
 *
 * @param resource $handle uv resource handle (check).
 *
 * @return void
 */
function uv_check_stop($handle) {}

/**
 * Setup async callback.
 *
 * @param resource $loop uv loop resource
 * @param callable $callback
 *
 * @return resource uv async resource.
 */
function uv_async_init($loop, callable $callback) {}

/**
 * Send async callback immediately.
 *
 * @param resource $handle uv async handle.
 *
 * @return void
 */
function uv_async_send($handle) {}

/**
 * Execute callbacks in another thread (requires Thread Safe enabled PHP).
 *
 * @param resource $loop
 * @param callable $callback
 * @param callable $after_callback
 *
 * @return void
 */
function uv_queue_work($loop, callable $callback, callable $after_callback) {}

/**
 * Open specified file.
 *
 * @param resource $loop uv_loop resource.
 * @param string $path file path
 * @param int $flag file flag. this should be UV::O_RDONLY and some constants flag.
 * @param int $mode mode flag. this should be UV::S_IRWXU and some mode flag.
 * @param callable $callback this callback parameter expects (resource $stream).
 *
 * @return resource
 */
function uv_fs_open($loop, string $path, int $flag, int $mode, callable $callback) {}

/**
 * Async read.
 *
 * @param resource $loop uv loop handle
 * @param resource $fd this expects long $fd, resource $php_stream or resource $php_socket.
 * @param int $offset the offset position in the file at which reading should commence.
 * @param int $length the length in bytes that should be read starting at position $offset.
 * @param callable $callback this callback parameter expects (zval $fd, long $nread, string $buffer).
 *
 * @return void
 */
function uv_fs_read($loop, $fd, int $offset, int $length, callable $callback) {}

/**
 * Close specified file descriptor.
 *
 * @param resource $loop uv_loop resource.
 * @param resource $fd file descriptor. this expects long $fd, resource $php_stream or resource $php_socket.
 * @param callable $callback this callback parameter expects (resource $stream)
 *
 * @return void
 */
function uv_fs_close($loop, $fd, callable $callback) {}

/**
 * Write buffer to specified file descriptor.
 *
 * @param resource $loop uv_loop resource.
 * @param resource $fd file descriptor. this expects long $fd, resource $php_stream or resource $php_socket.
 * @param string $buffer buffer.
 * @param int $offset
 * @param callable $callback this callback parameter expects (resource $stream, long $result)
 *
 * @return void
 */
function uv_fs_write($loop, $fd, string $buffer, int $offset, callable $callback) {}

/**
 * Async fsync.
 *
 * @param resource $loop uv loop handle.
 * @param resource $fd
 * @param callable $callback
 *
 * @return void
 */
function uv_fs_fsync($loop, $fd, callable $callback) {}

/**
 * Async fdatasync.
 *
 * @param resource $loop uv loop handle.
 * @param resource $fd
 * @param callable $callback
 *
 * @return void
 */
function uv_fs_fdatasync($loop, $fd, callable $callback) {}

/**
 * Async ftruncate.
 *
 * @param resource $loop uv loop handle.
 * @param resource $fd
 * @param int $offset
 * @param callable $callback
 *
 * @return void
 */
function uv_fs_ftruncate($loop, $fd, int $offset, callable $callback) {}

/**
 * Async mkdir.
 *
 * @param resource $loop uv loop handle
 * @param string $path
 * @param int $mode
 * @param callable $callback
 *
 * @return void
 */
function uv_fs_mkdir($loop, string $path, int $mode, callable $callback) {}

/**
 * Async rmdir.
 *
 * @param resource $loop uv loop handle
 * @param string $path
 * @param callable $callback
 *
 * @return void
 */
function uv_fs_rmdir($loop, string $path, callable $callback) {}

/**
 * Async unlink.
 *
 * @param resource $loop uv loop handle
 * @param string $path
 * @param callable $callback
 *
 * @return void
 */
function uv_fs_unlink($loop, string $path, callable $callback) {}

/**
 * Async rename.
 *
 * @param resource $loop uv loop handle.
 * @param string $from
 * @param string $to
 * @param callable $callback
 *
 * @return void
 */
function uv_fs_rename($loop, string $from, string $to, callable $callback) {}

/**
 * Async utime.
 *
 * @param resource $loop uv loop handle.
 * @param string $path
 * @param int $utime
 * @param int $atime
 * @param callable $callback
 *
 * @return void
 */
function uv_fs_utime($loop, string $path, int $utime, int $atime, callable $callback) {}

/**
 * Async futime.
 *
 * @param resource $loop uv loop handle.
 * @param resource $fd
 * @param int $utime
 * @param int $atime
 * @param callable $callback
 *
 * @return void
 */
function uv_fs_futime($loop, $fd, int $utime, int $atime, callable $callback) {}

/**
 * Async chmod.
 *
 * @param resource $loop uv loop handle.
 * @param string $path
 * @param int $mode
 * @param callable $callback
 *
 * @return void
 */
function uv_fs_chmod($loop, string $path, int $mode, callable $callback) {}

/**
 * Async fchmod.
 *
 * @param resource $loop uv loop handle.
 * @param resource $fd
 * @param int $mode
 * @param callable $callback
 *
 * @return void
 */
function uv_fs_fchmod($loop, $fd, int $mode, callable $callback) {}

/**
 * Async chown.
 *
 * @param resource $loop uv loop handle.
 * @param string $path
 * @param int $uid
 * @param int $gid
 * @param callable $callback
 *
 * @return void
 */
function uv_fs_chown($loop, string $path, int $uid, int $gid, callable $callback) {}

/**
 * Async fchown.
 *
 * @param resource $loop uv loop handle.
 * @param resource $fd
 * @param int $uid
 * @param int $gid
 * @param callable $callback
 *
 * @return void
 */
function uv_fs_fchown($loop, $fd, int $uid, int $gid, callable $callback) {}

/**
 * Async link.
 *
 * @param resource $loop uv loop handle.
 * @param string $from
 * @param string $to
 * @param callable $callback
 *
 * @return void
 */
function uv_fs_link($loop, string $from, string $to, callable $callback) {}

/**
 * Async symlink.
 *
 * @param resource $loop uv loop handle.
 * @param string $from
 * @param string $to
 * @param int $flags
 * @param callable $callback
 *
 * @return void
 */
function uv_fs_symlink($loop, string $from, string $to, int $flags, callable $callback) {}

/**
 * Async readlink.
 *
 * @param resource $loop uv loop handle
 * @param string $path
 * @param callable $callback
 *
 * @return void
 */
function uv_fs_readlink($loop, string $path, callable $callback) {}

/**
 * Async stat.
 *
 * @param resource $loop uv loop handle
 * @param string $path
 * @param callable $callback this callback parameter expects (resource $stream, array $stat)
 *
 * @return void
 */
function uv_fs_stat($loop, string $path, callable $callback) {}

/**
 * Async lstat.
 *
 * @param resource $loop uv loop handle
 * @param string $path
 * @param callable $callback
 *
 * @return void
 */
function uv_fs_lstat($loop, string $path, callable $callback) {}

/**
 * Async fstat.
 *
 * @param resource $loop uv loop handle.
 * @param resource $fd
 * @param callable $callback
 *
 * @return void
 */
function uv_fs_fstat($loop, $fd, callable $callback) {}

/**
 * Async readdir.
 *
 * @param resource $loop  uv loop handle
 * @param string $path
 * @param int $flags
 * @param callable $callback
 *
 * @return void
 */
function uv_fs_readdir($loop, string $path, int $flags, callable $callback) {}

/**
 * Async sendfile.
 *
 * @param resource $loop uv loop handle
 * @param resource $in_fd
 * @param resource $out_fd
 * @param int $offset
 * @param int $length
 * @param callable $callback
 */
function uv_fs_sendfile($loop, $in_fd, $out_fd, int $offset, int $length, callable $callback) {}

/**
 * Initialize fs event.
 *
 * @param resource $loop uv loop handle
 * @param string $path
 * @param callable $callback
 * @param int $flags
 *
 * @return resource
 */
function uv_fs_event_init($loop, string $path, callable $callback, int $flags = 0) {}

/**
 * Initialize tty resource. you have to open tty your hand.
 *
 * @param resource $loop uv loop handle.
 * @param resource $fd
 * @param int $readable
 *
 * @return resource
 */
function uv_tty_init($loop, $fd, int $readable) {}

/**
 * @param resource $tty
 * @param int &$width
 * @param int &$height
 *
 * @return int
 */
function uv_tty_get_winsize($tty, int &$width, int &$height): int {}

/**
 * @param resource $tty
 * @param int $mode
 *
 * @return int
 */
function uv_tty_set_mode($tty, int $mode): int {}

/**
 * @return void
 */
function uv_tty_reset_mode() {}

/**
 * @param resource $uv_sockaddr
 *
 * @return string
 */
function uv_tcp_getsockname($uv_sockaddr): string {}

/**
 * @param resource $uv_sockaddr
 *
 * @return string
 */
function uv_tcp_getpeername($uv_sockaddr): string {}

/**
 * @param resource $uv_sockaddr
 *
 * @return string
 */
function uv_udp_getsockname($uv_sockaddr): string {}

/**
 * @return int
 */
function uv_resident_set_memory(): int {}

/**
 * @param resource $address
 *
 * @return string
 */
function uv_ip4_name($address): string {}

/**
 * @param resource $address
 *
 * @return string
 */
function uv_ip6_name($address): string {}

/**
 * Initialize poll.
 *
 * @param resource $uv_loop uv_loop resource.
 * @param resource $fd this expects long fd, PHP's stream or PHP's socket resource.
 *
 * @return resource uv resource which initialized poll.
 */
function uv_poll_init($uv_loop, $fd) {}

/**
 * Start polling.
 *
 * @param resource $handle uv poll resource.
 * @param int $events UV::READBLE and UV::WRITABLE flags.
 * @param callable $callback this callback parameter expects (resource $poll, long $status, long $events, mixed $connection). the connection parameter passes uv_poll_init'd fd.
 *
 * @return void
 */
function uv_poll_start($handle, int $events, callable $callback) {}

/**
 * @param resource $poll
 *
 * @return void
 */
function uv_poll_stop($poll) {}

/**
 * @param resource|null $uv_loop
 *
 * @return resource
 */
function uv_fs_poll_init($uv_loop = null) {}

/**
 * @param resource $handle
 * @param $callback
 * @param string $path
 * @param int $interval
 *
 * @return resource
 */
function uv_fs_poll_start($handle, $callback, string $path, int $interval) {}

/**
 * @param resource $poll
 *
 * @return void
 */
function uv_fs_poll_stop($poll) {}

/**
 * @param resource $uv_loop uv loop handle
 *
 * @return void
 */
function uv_stop($uv_loop) {}

/**
 * @param resource $sig_handle
 *
 * @return int
 */
function uv_signal_stop($sig_handle): int {}
<?php

class UV
{
    public const RUN_DEFAULT = 0;
    public const RUN_ONCE = 1;
    public const RUN_NOWAIT = 2;
    public const CHANGE = 2;
    public const RENAME = 1;
    public const READABLE = 1;
    public const WRITABLE = 2;
    public const O_RDONLY = 0;
    public const O_WRONLY = 1;
    public const O_RDWR = 2;
    public const O_CREAT = 64;
    public const O_EXCL = 128;
    public const O_TRUNC = 512;
    public const O_APPEND = 1024;
    public const S_IFDIR = 16384;
    public const S_IFREG = 32768;
    public const O_NOCTTY = 256;
    public const S_IRWXU = 448;
    public const S_IRUSR = 256;
    public const S_IWUSR = 128;
    public const S_IXUSR = 64;
    public const S_IRWXG = 56;
    public const S_IRGRP = 32;
    public const S_IWGRP = 16;
    public const S_IXGRP = 8;
    public const S_IRWXO = 7;
    public const S_IROTH = 4;
    public const S_IWOTH = 2;
    public const S_IXOTH = 1;
    public const SIG_IGN = 1;
    public const SIG_DFL = 0;
    public const SIG_ERR = -1;
    public const SIGHUP = 1;
    public const SIGINT = 2;
    public const SIGQUIT = 3;
    public const SIGILL = 4;
    public const SIGTRAP = 5;
    public const SIGABRT = 6;
    public const SIGIOT = 6;
    public const SIGBUS = 7;
    public const SIGFPE = 8;
    public const SIGKILL = 9;
    public const SIGUSR1 = 10;
    public const SIGSEGV = 11;
    public const SIGUSR2 = 12;
    public const SIGPIPE = 13;
    public const SIGALRM = 14;
    public const SIGTERM = 15;
    public const SIGSTKFLT = 16;
    public const SIGCHLD = 17;
    public const SIGCONT = 18;
    public const SIGSTOP = 19;
    public const SIGTSTP = 20;
    public const SIGTTIN = 21;
    public const SIGTTOU = 22;
    public const SIGURG = 23;
    public const SIGXCPU = 24;
    public const SIGXFSZ = 25;
    public const SIGVTALRM = 26;
    public const SIGPROF = 27;
    public const SIGWINCH = 28;
    public const SIGPOLL = 29;
    public const SIGIO = 29;
    public const SIGPWR = 30;
    public const SIGSYS = 31;
    public const SIGBABY = 31;
    public const AF_INET = 2;
    public const AF_INET6 = 10;
    public const AF_UNSPEC = 0;
    public const LEAVE_GROUP = 0;
    public const JOIN_GROUP = 1;
    public const IS_UV_TCP = 0;
    public const IS_UV_UDP = 1;
    public const IS_UV_PIPE = 2;
    public const IS_UV_IDLE = 3;
    public const IS_UV_TIMER = 4;
    public const IS_UV_ASYNC = 5;
    public const IS_UV_LOOP = 6;
    public const IS_UV_HANDLE = 7;
    public const IS_UV_STREAM = 8;
    public const IS_UV_ADDRINFO = 9;
    public const IS_UV_PROCESS = 10;
    public const IS_UV_PREPARE = 11;
    public const IS_UV_CHECK = 12;
    public const IS_UV_WORK = 13;
    public const IS_UV_FS = 14;
    public const IS_UV_FS_EVENT = 15;
    public const IS_UV_TTY = 16;
    public const IS_UV_FS_POLL = 17;
    public const IS_UV_POLL = 18;
    public const UNKNOWN_HANDLE = 0;
    public const FILE = 17;
    public const ASYNC = 1;
    public const CHECK = 2;
    public const FS_EVENT = 3;
    public const FS_POLL = 4;
    public const HANDLE = 5;
    public const IDLE = 6;
    public const NAMED_PIPE = 7;
    public const POLL = 8;
    public const PREPARE = 9;
    public const PROCESS = 10;
    public const STREAM = 11;
    public const TCP = 12;
    public const TIMER = 13;
    public const TTY = 14;
    public const UDP = 15;
    public const SIGNAL = 16;
    public const HANDLE_TYPE_MAX = 18;
    public const IGNORE = 0;
    public const CREATE_PIPE = 1;
    public const INHERIT_FD = 2;
    public const INHERIT_STREAM = 4;
    public const READABLE_PIPE = 16;
    public const WRITABLE_PIPE = 32;
    public const PROCESS_SETUID = 1;
    public const PROCESS_SETGID = 2;
    public const PROCESS_WINDOWS_VERBATIM_ARGUMENTS = 4;
    public const PROCESS_DETACHED = 8;
    public const E2BIG = -7;
    public const EACCES = -13;
    public const EADDRINUSE = -98;
    public const EADDRNOTAVAIL = -99;
    public const EAFNOSUPPORT = -97;
    public const EAGAIN = -11;
    public const EAI_ADDRFAMILY = -3000;
    public const EAI_AGAIN = -3001;
    public const EAI_BADFLAGS = -3002;
    public const EAI_BADHINTS = -3013;
    public const EAI_CANCELED = -3003;
    public const EAI_FAIL = -3004;
    public const EAI_FAMILY = -3005;
    public const EAI_MEMORY = -3006;
    public const EAI_NODATA = -3007;
    public const EAI_NONAME = -3008;
    public const EAI_OVERFLOW = -3009;
    public const EAI_PROTOCOL = -3014;
    public const EAI_SERVICE = -3010;
    public const EAI_SOCKTYPE = -3011;
    public const EALREADY = -114;
    public const EBADF = -9;
    public const EBUSY = -16;
    public const ECANCELED = -125;
    public const ECHARSET = -4080;
    public const ECONNABORTED = -103;
    public const ECONNREFUSED = -111;
    public const ECONNRESET = -104;
    public const EDESTADDRREQ = -89;
    public const EEXIST = -17;
    public const EFAULT = -14;
    public const EFBIG = -27;
    public const EHOSTUNREACH = -113;
    public const EINTR = -4;
    public const EINVAL = -22;
    public const EIO = -5;
    public const EISCONN = -106;
    public const EISDIR = -21;
    public const ELOOP = -40;
    public const EMFILE = -24;
    public const EMSGSIZE = -90;
    public const ENAMETOOLONG = -36;
    public const ENETDOWN = -100;
    public const ENETUNREACH = -101;
    public const ENFILE = -23;
    public const ENOBUFS = -105;
    public const ENODEV = -19;
    public const ENOENT = -2;
    public const ENOMEM = -12;
    public const ENONET = -64;
    public const ENOPROTOOPT = -92;
    public const ENOSPC = -28;
    public const ENOSYS = -38;
    public const ENOTCONN = -107;
    public const ENOTDIR = -20;
    public const ENOTEMPTY = -39;
    public const ENOTSOCK = -88;
    public const ENOTSUP = -95;
    public const EPERM = -1;
    public const EPIPE = -32;
    public const EPROTO = -71;
    public const EPROTONOSUPPORT = -93;
    public const EPROTOTYPE = -91;
    public const ERANGE = -34;
    public const EROFS = -30;
    public const ESHUTDOWN = -108;
    public const ESPIPE = -29;
    public const ESRCH = -3;
    public const ETIMEDOUT = -110;
    public const ETXTBSY = -26;
    public const EXDEV = -18;
    public const UNKNOWN = -4094;
    public const EOF = -4095;
    public const ENXIO = -6;
    public const EMLINK = -31;
    public const EHOSTDOWN = -112;
    public const EREMOTEIO = -121;
    public const ENOTTY = -25;
    public const EFTYPE = -4028;
}
<?php

// Start of odbc v.1.0
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;

/**
 * Toggle autocommit behaviour
 * @link https://php.net/manual/en/function.odbc-autocommit.php
 * @param resource $connection_id <p>The ODBC connection identifier,
 * see <b>odbc_connect</b> for details.</p>
 * @param bool $OnOff [optional] <p>
 * If <i>OnOff</i> is <b>TRUE</b>, auto-commit is enabled, if
 * it is <b>FALSE</b> auto-commit is disabled.
 * </p>
 * @return mixed Without the <i>OnOff</i> parameter, this function returns
 * auto-commit status for <i>connection_id</i>. Non-zero is
 * returned if auto-commit is on, 0 if it is off, or <b>FALSE</b> if an error
 * occurs.
 * <p>
 * If <i>OnOff</i> is set, this function returns <b>TRUE</b> on
 * success and <b>FALSE</b> on failure.
 * </p>
 */
function odbc_autocommit($connection_id, $OnOff = false) {}

/**
 * Handling of binary column data
 * @link https://php.net/manual/en/function.odbc-binmode.php
 * @param resource $result_id <p>
 * The result identifier.
 * </p>
 * <p>
 * If <i>result_id</i> is 0, the
 * settings apply as default for new results.
 * Default for longreadlen is 4096 and
 * <i>mode</i> defaults to
 * ODBC_BINMODE_RETURN. Handling of binary long
 * columns is also affected by <b>odbc_longreadlen</b>.
 * </p>
 * @param int $mode <p>
 * Possible values for <i>mode</i> are:
 * <b>ODBC_BINMODE_PASSTHRU</b>: Passthru BINARY data
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function odbc_binmode($result_id, $mode) {}

/**
 * Close an ODBC connection
 * @link https://php.net/manual/en/function.odbc-close.php
 * @param resource $connection_id <p>The ODBC connection identifier,
 * see <b>odbc_connect</b> for details.</p>
 * @return void No value is returned.
 */
function odbc_close($connection_id) {}

/**
 * Close all ODBC connections
 * @link https://php.net/manual/en/function.odbc-close-all.php
 * @return void No value is returned.
 */
function odbc_close_all() {}

/**
 * Lists the column names in specified tables
 * @link https://php.net/manual/en/function.odbc-columns.php
 * @param resource $connection_id <p>The ODBC connection identifier,
 * see <b>odbc_connect</b> for details.</p>
 * @param string $qualifier [optional] <p>
 * The qualifier.
 * </p>
 * @param string $schema [optional] <p>
 * The owner.
 * </p>
 * @param string $table_name [optional] <p>
 * The table name.
 * </p>
 * @param string $column_name [optional] <p>
 * The column name.
 * </p>
 * @return resource|false an ODBC result identifier or <b>FALSE</b> on failure.
 * <p>
 * The result set has the following columns:
 * TABLE_QUALIFIER
 * TABLE_SCHEM
 * TABLE_NAME
 * COLUMN_NAME
 * DATA_TYPE
 * TYPE_NAME
 * PRECISION
 * LENGTH
 * SCALE
 * RADIX
 * NULLABLE
 * REMARKS
 * </p>
 * <p>
 * The result set is ordered by TABLE_QUALIFIER, TABLE_SCHEM and
 * TABLE_NAME.
 * </p>
 */
function odbc_columns($connection_id, $qualifier = null, $schema = null, $table_name = null, $column_name = null) {}

/**
 * Commit an ODBC transaction
 * @link https://php.net/manual/en/function.odbc-commit.php
 * @param resource $connection_id <p>The ODBC connection identifier,
 * see <b>odbc_connect</b> for details.</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function odbc_commit($connection_id) {}

/**
 * Connect to a datasource
 * @link https://php.net/manual/en/function.odbc-connect.php
 * @param string $dsn <p>
 * The database source name for the connection. Alternatively, a
 * DSN-less connection string can be used.
 * </p>
 * @param string $user <p>
 * The username.
 * </p>
 * @param string $password <p>
 * The password.
 * </p>
 * @param int $cursor_type [optional] <p>
 * This sets the type of cursor to be used
 * for this connection. This parameter is not normally needed, but
 * can be useful for working around problems with some ODBC drivers.
 * </p>
 * <p>
 * The following constants are defined for cursortype:
 * SQL_CUR_USE_IF_NEEDED
 * </p>
 * @return resource|false an ODBC connection or (<b>FALSE</b>) on error.
 */
function odbc_connect($dsn, $user, $password, $cursor_type = null) {}

/**
 * Get cursorname
 * @link https://php.net/manual/en/function.odbc-cursor.php
 * @param resource $result_id <p>
 * The result identifier.
 * </p>
 * @return string the cursor name, as a string.
 */
function odbc_cursor($result_id) {}

/**
 * Returns information about a current connection
 * @link https://php.net/manual/en/function.odbc-data-source.php
 * @param resource $connection_id <p>The ODBC connection identifier,
 * see <b>odbc_connect</b> for details.</p>
 * @param int $fetch_type <p>
 * The <i>fetch_type</i> can be one of two constant types:
 * <b>SQL_FETCH_FIRST</b>, <b>SQL_FETCH_NEXT</b>.
 * Use <b>SQL_FETCH_FIRST</b> the first time this function is
 * called, thereafter use the <b>SQL_FETCH_NEXT</b>.
 * </p>
 * @return array|false <b>FALSE</b> on error, and an array upon success.
 */
#[ArrayShape(["server" => "string", "description" => "string"])]
function odbc_data_source($connection_id, $fetch_type) {}

/**
 * Execute a prepared statement
 * @link https://php.net/manual/en/function.odbc-execute.php
 * @param resource $result_id <p>
 * The result id resource, from <b>odbc_prepare</b>.
 * </p>
 * @param array $parameters_array [optional] <p>
 * Parameters in <i>parameter_array</i> will be
 * substituted for placeholders in the prepared statement in order.
 * Elements of this array will be converted to strings by calling this
 * function.
 * </p>
 * <p>
 * Any parameters in <i>parameter_array</i> which
 * start and end with single quotes will be taken as the name of a
 * file to read and send to the database server as the data for the
 * appropriate placeholder.
 * </p>
 * If you wish to store a string which actually begins and ends with
 * single quotes, you must add a space or other non-single-quote character
 * to the beginning or end of the parameter, which will prevent the
 * parameter from being taken as a file name. If this is not an option,
 * then you must use another mechanism to store the string, such as
 * executing the query directly with <b>odbc_exec</b>).
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function odbc_execute($result_id, array $parameters_array = null) {}

/**
 * Get the last error code
 * @link https://php.net/manual/en/function.odbc-error.php
 * @param resource $connection_id [optional] <p>The ODBC connection identifier,
 * see <b>odbc_connect</b> for details.</p>
 * @return string If <i>connection_id</i> is specified, the last state
 * of that connection is returned, else the last state of any connection
 * is returned.
 * <p>
 * This function returns meaningful value only if last odbc query failed
 * (i.e. <b>odbc_exec</b> returned <b>FALSE</b>).
 * </p>
 */
function odbc_error($connection_id = null) {}

/**
 * Get the last error message
 * @link https://php.net/manual/en/function.odbc-errormsg.php
 * @param resource $connection_id [optional] <p>The ODBC connection identifier,
 * see <b>odbc_connect</b> for details.</p>
 * @return string If <i>connection_id</i> is specified, the last state
 * of that connection is returned, else the last state of any connection
 * is returned.
 * <p>
 * This function returns meaningful value only if last odbc query failed
 * (i.e. <b>odbc_exec</b> returned <b>FALSE</b>).
 * </p>
 */
function odbc_errormsg($connection_id = null) {}

/**
 * Prepare and execute an SQL statement
 * @link https://php.net/manual/en/function.odbc-exec.php
 * @param resource $connection_id <p>The ODBC connection identifier,
 * see <b>odbc_connect</b> for details.</p>
 * @param string $query_string <p>
 * The SQL statement.
 * </p>
 * @param int $flags [optional] <p>
 * This parameter is currently not used.
 * </p>
 * @return resource|false an ODBC result identifier if the SQL command was executed
 * successfully, or <b>FALSE</b> on error.
 */
function odbc_exec($connection_id, $query_string, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $flags = null) {}

/**
 * Fetch a result row as an associative array
 * @link https://php.net/manual/en/function.odbc-fetch-array.php
 * @param resource $result <p>
 * The result resource from <b>odbc_exec</b>.
 * </p>
 * @param int $rownumber [optional] <p>
 * Optionally choose which row number to retrieve.
 * </p>
 * @return array|false an array that corresponds to the fetched row, or <b>FALSE</b> if there
 * are no more rows.
 */
function odbc_fetch_array($result, $rownumber = null) {}

/**
 * Fetch a result row as an object
 * @link https://php.net/manual/en/function.odbc-fetch-object.php
 * @param resource $result <p>
 * The result resource from <b>odbc_exec</b>.
 * </p>
 * @param int $rownumber [optional] <p>
 * Optionally choose which row number to retrieve.
 * </p>
 * @return object|false an object that corresponds to the fetched row, or <b>FALSE</b> if there
 * are no more rows.
 */
function odbc_fetch_object($result, $rownumber = null) {}

/**
 * Fetch a row
 * @link https://php.net/manual/en/function.odbc-fetch-row.php
 * @param resource $result_id <p>
 * The result identifier.
 * </p>
 * @param int $row_number [optional] <p>
 * If <i>row_number</i> is not specified,
 * <b>odbc_fetch_row</b> will try to fetch the next row in
 * the result set. Calls to <b>odbc_fetch_row</b> with and
 * without <i>row_number</i> can be mixed.
 * </p>
 * <p>
 * To step through the result more than once, you can call
 * <b>odbc_fetch_row</b> with
 * <i>row_number</i> 1, and then continue doing
 * <b>odbc_fetch_row</b> without
 * <i>row_number</i> to review the result. If a driver
 * doesn't support fetching rows by number, the
 * <i>row_number</i> parameter is ignored.
 * </p>
 * @return bool <b>TRUE</b> if there was a row, <b>FALSE</b> otherwise.
 */
function odbc_fetch_row($result_id, $row_number = null) {}

/**
 * Fetch one result row into array
 * @link https://php.net/manual/en/function.odbc-fetch-into.php
 * @param resource $result_id <p>
 * The result resource.
 * </p>
 * @param array &$result_array <p>
 * The result array
 * that can be of any type since it will be converted to type
 * array. The array will contain the column values starting at array
 * index 0.
 * </p>
 * @param int $rownumber [optional] <p>
 * The row number.
 * </p>
 * @return int the number of columns in the result;
 * <b>FALSE</b> on error.
 */
function odbc_fetch_into($result_id, array &$result_array, $rownumber = null) {}

/**
 * Get the length (precision) of a field
 * @link https://php.net/manual/en/function.odbc-field-len.php
 * @param resource $result_id <p>
 * The result identifier.
 * </p>
 * @param int $field_number <p>
 * The field number. Field numbering starts at 1.
 * </p>
 * @return int|false the field name as a string, or <b>FALSE</b> on error.
 */
function odbc_field_len($result_id, $field_number) {}

/**
 * Get the scale of a field
 * @link https://php.net/manual/en/function.odbc-field-scale.php
 * @param resource $result_id <p>
 * The result identifier.
 * </p>
 * @param int $field_number <p>
 * The field number. Field numbering starts at 1.
 * </p>
 * @return int|false the field scale as a integer, or <b>FALSE</b> on error.
 */
function odbc_field_scale($result_id, $field_number) {}

/**
 * Get the columnname
 * @link https://php.net/manual/en/function.odbc-field-name.php
 * @param resource $result_id <p>
 * The result identifier.
 * </p>
 * @param int $field_number <p>
 * The field number. Field numbering starts at 1.
 * </p>
 * @return string|false the field name as a string, or <b>FALSE</b> on error.
 */
function odbc_field_name($result_id, $field_number) {}

/**
 * Datatype of a field
 * @link https://php.net/manual/en/function.odbc-field-type.php
 * @param resource $result_id <p>
 * The result identifier.
 * </p>
 * @param int $field_number <p>
 * The field number. Field numbering starts at 1.
 * </p>
 * @return string|false the field type as a string, or <b>FALSE</b> on error.
 */
function odbc_field_type($result_id, $field_number) {}

/**
 * Return column number
 * @link https://php.net/manual/en/function.odbc-field-num.php
 * @param resource $result_id <p>
 * The result identifier.
 * </p>
 * @param string $field_name <p>
 * The field name.
 * </p>
 * @return int|false the field number as a integer, or <b>FALSE</b> on error.
 * Field numbering starts at 1.
 */
function odbc_field_num($result_id, $field_name) {}

/**
 * Free resources associated with a result
 * @link https://php.net/manual/en/function.odbc-free-result.php
 * @param resource $result_id <p>
 * The result identifier.
 * </p>
 * @return bool Always returns <b>TRUE</b>.
 */
function odbc_free_result($result_id) {}

/**
 * Retrieves information about data types supported by the data source
 * @link https://php.net/manual/en/function.odbc-gettypeinfo.php
 * @param resource $connection_id <p>The ODBC connection identifier,
 * see <b>odbc_connect</b> for details.</p>
 * @param int $data_type [optional] <p>
 * The data type, which can be used to restrict the information to a
 * single data type.
 * </p>
 * @return resource|false an ODBC result identifier or
 * <b>FALSE</b> on failure.
 * <p>
 * The result set has the following columns:
 * TYPE_NAME
 * DATA_TYPE
 * PRECISION
 * LITERAL_PREFIX
 * LITERAL_SUFFIX
 * CREATE_PARAMS
 * NULLABLE
 * CASE_SENSITIVE
 * SEARCHABLE
 * UNSIGNED_ATTRIBUTE
 * MONEY
 * AUTO_INCREMENT
 * LOCAL_TYPE_NAME
 * MINIMUM_SCALE
 * MAXIMUM_SCALE
 * </p>
 * <p>
 * The result set is ordered by DATA_TYPE and TYPE_NAME.
 * </p>
 */
function odbc_gettypeinfo($connection_id, $data_type = null) {}

/**
 * Handling of LONG columns
 * @link https://php.net/manual/en/function.odbc-longreadlen.php
 * @param resource $result_id <p>
 * The result identifier.
 * </p>
 * @param int $length <p>
 * The number of bytes returned to PHP is controlled by the parameter
 * length. If it is set to 0, Long column data is passed through to the
 * client.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function odbc_longreadlen($result_id, $length) {}

/**
 * Checks if multiple results are available
 * @link https://php.net/manual/en/function.odbc-next-result.php
 * @param resource $result_id <p>
 * The result identifier.
 * </p>
 * @return bool <b>TRUE</b> if there are more result sets, <b>FALSE</b> otherwise.
 */
function odbc_next_result($result_id) {}

/**
 * Number of columns in a result
 * @link https://php.net/manual/en/function.odbc-num-fields.php
 * @param resource $result_id <p>
 * The result identifier returned by <b>odbc_exec</b>.
 * </p>
 * @return int the number of fields, or -1 on error.
 */
function odbc_num_fields($result_id) {}

/**
 * Number of rows in a result
 * @link https://php.net/manual/en/function.odbc-num-rows.php
 * @param resource $result_id <p>
 * The result identifier returned by <b>odbc_exec</b>.
 * </p>
 * @return int the number of rows in an ODBC result.
 * This function will return -1 on error.
 */
function odbc_num_rows($result_id) {}

/**
 * Open a persistent database connection
 * @link https://php.net/manual/en/function.odbc-pconnect.php
 * @param string $dsn
 * @param string $user
 * @param string $password
 * @param int $cursor_type [optional]
 * @return resource|false an ODBC connection id or 0 (<b>FALSE</b>) on
 * error.
 */
function odbc_pconnect($dsn, $user, $password, $cursor_type = null) {}

/**
 * Prepares a statement for execution
 * @link https://php.net/manual/en/function.odbc-prepare.php
 * @param resource $connection_id <p>The ODBC connection identifier,
 * see <b>odbc_connect</b> for details.</p>
 * @param string $query_string <p>
 * The query string statement being prepared.
 * </p>
 * @return resource|false an ODBC result identifier if the SQL command was prepared
 * successfully. Returns <b>FALSE</b> on error.
 */
function odbc_prepare($connection_id, $query_string) {}

/**
 * Get result data
 * @link https://php.net/manual/en/function.odbc-result.php
 * @param resource $result_id <p>
 * The ODBC resource.
 * </p>
 * @param mixed $field <p>
 * The field name being retrieved. It can either be an integer containing
 * the column number of the field you want; or it can be a string
 * containing the name of the field.
 * </p>
 * @return mixed the string contents of the field, <b>FALSE</b> on error, <b>NULL</b> for
 * NULL data, or <b>TRUE</b> for binary data.
 */
function odbc_result($result_id, $field) {}

/**
 * Print result as HTML table
 * @link https://php.net/manual/en/function.odbc-result-all.php
 * @param resource $result_id <p>
 * The result identifier.
 * </p>
 * @param string $format [optional] <p>
 * Additional overall table formatting.
 * </p>
 * @return int|false the number of rows in the result or <b>FALSE</b> on error.
 * @deprecated 8.1
 */
function odbc_result_all($result_id, $format = null) {}

/**
 * Rollback a transaction
 * @link https://php.net/manual/en/function.odbc-rollback.php
 * @param resource $connection_id <p>The ODBC connection identifier,
 * see <b>odbc_connect</b> for details.</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function odbc_rollback($connection_id) {}

/**
 * Adjust ODBC settings
 * @link https://php.net/manual/en/function.odbc-setoption.php
 * @param resource $id <p>
 * Is a connection id or result id on which to change the settings.
 * For SQLSetConnectOption(), this is a connection id.
 * For SQLSetStmtOption(), this is a result id.
 * </p>
 * @param int $function <p>
 * Is the ODBC function to use. The value should be
 * 1 for SQLSetConnectOption() and
 * 2 for SQLSetStmtOption().
 * </p>
 * @param int $option <p>
 * The option to set.
 * </p>
 * @param int $param <p>
 * The value for the given <i>option</i>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function odbc_setoption($id, $function, $option, $param) {}

/**
 * Retrieves special columns
 * @link https://php.net/manual/en/function.odbc-specialcolumns.php
 * @param resource $connection_id <p>The ODBC connection identifier,
 * see <b>odbc_connect</b> for details.</p>
 * @param int $type When the type argument is <b>SQL_BEST_ROWID</b>,
 * <b>odbc_specialcolumns</b> returns the
 * column or columns that uniquely identify each row in the table.
 * When the type argument is <b>SQL_ROWVER</b>,
 * <b>odbc_specialcolumns</b> returns the column or columns in the
 * specified table, if any, that are automatically updated by the data source
 * when any value in the row is updated by any transaction.
 * @param string $qualifier <p>
 * The qualifier.
 * </p>
 * @param string $owner <p>
 * The owner.
 * </p>
 * @param string $table <p>
 * The table.
 * </p>
 * @param int $scope <p>
 * The scope, which orders the result set.
 * </p>
 * @param int $nullable <p>
 * The nullable option.
 * </p>
 * @return resource|false an ODBC result identifier or <b>FALSE</b> on
 * failure.
 * <p>
 * The result set has the following columns:
 * SCOPE
 * COLUMN_NAME
 * DATA_TYPE
 * TYPE_NAME
 * PRECISION
 * LENGTH
 * SCALE
 * PSEUDO_COLUMN
 * </p>
 */
function odbc_specialcolumns($connection_id, $type, $qualifier, $owner, $table, $scope, $nullable) {}

/**
 * Retrieve statistics about a table
 * @link https://php.net/manual/en/function.odbc-statistics.php
 * @param resource $connection_id <p>The ODBC connection identifier,
 * see <b>odbc_connect</b> for details.</p>
 * @param string $qualifier <p>
 * The qualifier.
 * </p>
 * @param string $owner <p>
 * The owner.
 * </p>
 * @param string $table_name <p>
 * The table name.
 * </p>
 * @param int $unique <p>
 * The unique attribute.
 * </p>
 * @param int $accuracy <p>
 * The accuracy.
 * </p>
 * @return resource|false an ODBC result identifier or <b>FALSE</b> on failure.
 * <p>
 * The result set has the following columns:
 * TABLE_QUALIFIER
 * TABLE_OWNER
 * TABLE_NAME
 * NON_UNIQUE
 * INDEX_QUALIFIER
 * INDEX_NAME
 * TYPE
 * SEQ_IN_INDEX
 * COLUMN_NAME
 * COLLATION
 * CARDINALITY
 * PAGES
 * FILTER_CONDITION
 * </p>
 */
function odbc_statistics($connection_id, $qualifier, $owner, $table_name, $unique, $accuracy) {}

/**
 * Get the list of table names stored in a specific data source
 * @link https://php.net/manual/en/function.odbc-tables.php
 * @param resource $connection_id <p>The ODBC connection identifier,
 * see <b>odbc_connect</b> for details.</p>
 * @param string $qualifier [optional] <p>
 * The qualifier.
 * </p>
 * @param string $owner [optional] <p>
 * The owner. Accepts search patterns ('%' to match zero or more
 * characters and '_' to match a single character).
 * </p>
 * @param string $name [optional] <p>
 * The name. Accepts search patterns ('%' to match zero or more
 * characters and '_' to match a single character).
 * </p>
 * @param string $types [optional] <p>
 * If <i>table_type</i> is not an empty string, it
 * must contain a list of comma-separated values for the types of
 * interest; each value may be enclosed in single quotes (') or
 * unquoted. For example, "'TABLE','VIEW'" or "TABLE, VIEW". If the
 * data source does not support a specified table type,
 * <b>odbc_tables</b> does not return any results for
 * that type.
 * </p>
 * @return resource|false an ODBC result identifier containing the information
 * or <b>FALSE</b> on failure.
 * <p>
 * The result set has the following columns:
 * TABLE_QUALIFIER
 * TABLE_OWNER
 * TABLE_NAME
 * TABLE_TYPE
 * REMARKS
 * </p>
 */
function odbc_tables($connection_id, $qualifier = null, $owner = null, $name = null, $types = null) {}

/**
 * Gets the primary keys for a table
 * @link https://php.net/manual/en/function.odbc-primarykeys.php
 * @param resource $connection_id <p>The ODBC connection identifier,
 * see <b>odbc_connect</b> for details.</p>
 * @param string $qualifier
 * @param string $owner
 * @param string $table
 * @return resource|false an ODBC result identifier or <b>FALSE</b> on failure.
 * <p>
 * The result set has the following columns:
 * TABLE_QUALIFIER
 * TABLE_OWNER
 * TABLE_NAME
 * COLUMN_NAME
 * KEY_SEQ
 * PK_NAME
 * </p>
 */
function odbc_primarykeys($connection_id, $qualifier, $owner, $table) {}

/**
 * Lists columns and associated privileges for the given table
 * @link https://php.net/manual/en/function.odbc-columnprivileges.php
 * @param resource $connection_id <p>The ODBC connection identifier,
 * see <b>odbc_connect</b> for details.</p>
 * @param string $qualifier <p>
 * The qualifier.
 * </p>
 * @param string $owner <p>
 * The owner.
 * </p>
 * @param string $table_name <p>
 * The table name.
 * </p>
 * @param string $column_name <p>
 * The <i>column_name</i> argument accepts search
 * patterns ('%' to match zero or more characters and '_' to match a
 * single character).
 * </p>
 * @return resource|false an ODBC result identifier or <b>FALSE</b> on failure.
 * This result identifier can be used to fetch a list of columns and
 * associated privileges.
 * <p>
 * The result set has the following columns:
 * TABLE_QUALIFIER
 * TABLE_OWNER
 * TABLE_NAME
 * GRANTOR
 * GRANTEE
 * PRIVILEGE
 * IS_GRANTABLE
 * </p>
 * <p>
 * The result set is ordered by TABLE_QUALIFIER, TABLE_OWNER and
 * TABLE_NAME.
 * </p>
 */
function odbc_columnprivileges($connection_id, $qualifier, $owner, $table_name, $column_name) {}

/**
 * Lists tables and the privileges associated with each table
 * @link https://php.net/manual/en/function.odbc-tableprivileges.php
 * @param resource $connection_id <p>The ODBC connection identifier,
 * see <b>odbc_connect</b> for details.</p>
 * @param string $qualifier <p>
 * The qualifier.
 * </p>
 * @param string $owner <p>
 * The owner. Accepts the following search patterns:
 * ('%' to match zero or more characters and '_' to match a single character)
 * </p>
 * @param string $name <p>
 * The name. Accepts the following search patterns:
 * ('%' to match zero or more characters and '_' to match a single character)
 * </p>
 * @return resource|false An ODBC result identifier or <b>FALSE</b> on failure.
 * <p>
 * The result set has the following columns:
 * TABLE_QUALIFIER
 * TABLE_OWNER
 * TABLE_NAME
 * GRANTOR
 * GRANTEE
 * PRIVILEGE
 * IS_GRANTABLE
 * </p>
 */
function odbc_tableprivileges($connection_id, $qualifier, $owner, $name) {}

/**
 * Retrieves a list of foreign keys
 * @link https://php.net/manual/en/function.odbc-foreignkeys.php
 * @param resource $connection_id <p>The ODBC connection identifier,
 * see <b>odbc_connect</b> for details.</p>
 * @param string $pk_qualifier <p>
 * The primary key qualifier.
 * </p>
 * @param string $pk_owner <p>
 * The primary key owner.
 * </p>
 * @param string $pk_table <p>
 * The primary key table.
 * </p>
 * @param string $fk_qualifier <p>
 * The foreign key qualifier.
 * </p>
 * @param string $fk_owner <p>
 * The foreign key owner.
 * </p>
 * @param string $fk_table <p>
 * The foreign key table.
 * </p>
 * @return resource|false an ODBC result identifier or <b>FALSE</b> on failure.
 * <p>
 * The result set has the following columns:
 * PKTABLE_QUALIFIER
 * PKTABLE_OWNER
 * PKTABLE_NAME
 * PKCOLUMN_NAME
 * FKTABLE_QUALIFIER
 * FKTABLE_OWNER
 * FKTABLE_NAME
 * FKCOLUMN_NAME
 * KEY_SEQ
 * UPDATE_RULE
 * DELETE_RULE
 * FK_NAME
 * PK_NAME
 * </p>
 * <p>
 * If <i>pk_table</i> contains a table name,
 * <b>odbc_foreignkeys</b> returns a result set
 * containing the primary key of the specified table and all of the
 * foreign keys that refer to it.
 * If <i>fk_table</i> contains a table name,
 * <b>odbc_foreignkeys</b> returns a result set
 * containing all of the foreign keys in the specified table and the
 * primary keys (in other tables) to which they refer.
 * If both <i>pk_table</i> and
 * <i>fk_table</i> contain table names,
 * <b>odbc_foreignkeys</b> returns the foreign keys in
 * the table specified in <i>fk_table</i> that refer
 * to the primary key of the table specified in
 * <i>pk_table</i>
 * </p>
 */
function odbc_foreignkeys($connection_id, $pk_qualifier, $pk_owner, $pk_table, $fk_qualifier, $fk_owner, $fk_table) {}

/**
 * Get the list of procedures stored in a specific data source
 * @link https://php.net/manual/en/function.odbc-procedures.php
 * @param resource $connection_id <p>The ODBC connection identifier,
 * see <b>odbc_connect</b> for details.</p>
 * @return resource|false <p>an ODBC
 * result identifier containing the information or <b>FALSE</b> on failure.
 * </p>
 * <p>
 * The result set has the following columns:
 * PROCEDURE_QUALIFIER
 * PROCEDURE_OWNER
 * PROCEDURE_NAME
 * NUM_INPUT_PARAMS
 * NUM_OUTPUT_PARAMS
 * NUM_RESULT_SETS
 * REMARKS
 * PROCEDURE_TYPE
 * </p>
 */
function odbc_procedures($connection_id) {}

/**
 * Retrieve information about parameters to procedures
 * @link https://php.net/manual/en/function.odbc-procedurecolumns.php
 * @param resource $connection_id <p>The ODBC connection identifier,
 * see <b>odbc_connect</b> for details.</p>
 * @return resource|false <p>the list of input and output parameters, as well as the
 * columns that make up the result set for the specified procedures.
 * Returns an ODBC result identifier or <b>FALSE</b> on failure.
 * </p>
 * <p>
 * The result set has the following columns:
 * PROCEDURE_QUALIFIER
 * PROCEDURE_OWNER
 * PROCEDURE_NAME
 * COLUMN_NAME
 * COLUMN_TYPE
 * DATA_TYPE
 * TYPE_NAME
 * PRECISION
 * LENGTH
 * SCALE
 * RADIX
 * NULLABLE
 * REMARKS
 * </p>
 */
function odbc_procedurecolumns($connection_id) {}

/**
 * Alias of <b>odbc_exec</b>
 * @link https://php.net/manual/en/function.odbc-do.php
 * @param $connection_id
 * @param $query
 * @param $flags [optional]
 */
function odbc_do($connection_id, $query, $flags) {}

/**
 * Alias of <b>odbc_field_len</b>
 * @link https://php.net/manual/en/function.odbc-field-precision.php
 * @param $result_id
 * @param $field_number
 */
function odbc_field_precision($result_id, $field_number) {}

define('ODBC_TYPE', "unixODBC");
define('ODBC_BINMODE_PASSTHRU', 0);
define('ODBC_BINMODE_RETURN', 1);
define('ODBC_BINMODE_CONVERT', 2);
define('SQL_ODBC_CURSORS', 110);
define('SQL_CUR_USE_DRIVER', 2);
define('SQL_CUR_USE_IF_NEEDED', 0);
define('SQL_CUR_USE_ODBC', 1);
define('SQL_CONCURRENCY', 7);
define('SQL_CONCUR_READ_ONLY', 1);
define('SQL_CONCUR_LOCK', 2);
define('SQL_CONCUR_ROWVER', 3);
define('SQL_CONCUR_VALUES', 4);
define('SQL_CURSOR_TYPE', 6);
define('SQL_CURSOR_FORWARD_ONLY', 0);
define('SQL_CURSOR_KEYSET_DRIVEN', 1);
define('SQL_CURSOR_DYNAMIC', 2);
define('SQL_CURSOR_STATIC', 3);
define('SQL_KEYSET_SIZE', 8);
define('SQL_FETCH_FIRST', 2);
define('SQL_FETCH_NEXT', 1);
define('SQL_CHAR', 1);
define('SQL_VARCHAR', 12);
define('SQL_LONGVARCHAR', -1);
define('SQL_DECIMAL', 3);
define('SQL_NUMERIC', 2);
define('SQL_BIT', -7);
define('SQL_TINYINT', -6);
define('SQL_SMALLINT', 5);
define('SQL_INTEGER', 4);
define('SQL_BIGINT', -5);
define('SQL_REAL', 7);
define('SQL_FLOAT', 6);
define('SQL_DOUBLE', 8);
define('SQL_BINARY', -2);
define('SQL_VARBINARY', -3);
define('SQL_LONGVARBINARY', -4);
define('SQL_DATE', 9);
define('SQL_TIME', 10);
define('SQL_TIMESTAMP', 11);
define('SQL_TYPE_DATE', 91);
define('SQL_TYPE_TIME', 92);
define('SQL_TYPE_TIMESTAMP', 93);
define('SQL_WCHAR', -8);
define('SQL_WVARCHAR', -9);
define('SQL_WLONGVARCHAR', -10);
define('SQL_BEST_ROWID', 1);
define('SQL_ROWVER', 2);
define('SQL_SCOPE_CURROW', 0);
define('SQL_SCOPE_TRANSACTION', 1);
define('SQL_SCOPE_SESSION', 2);
define('SQL_NO_NULLS', 0);
define('SQL_NULLABLE', 1);
define('SQL_INDEX_UNIQUE', 0);
define('SQL_INDEX_ALL', 1);
define('SQL_ENSURE', 1);
define('SQL_QUICK', 0);

// End of odbc v.1.0
<?php

namespace Elastic\Apm;

/**
 * Class ElasticApm is a facade (as in Facade design pattern) to the rest of Elastic APM public API.
 */
final class ElasticApm
{
    public const VERSION = '1.3.1';

    private function __construct() {}

    /**
     * Begins a new transaction and sets it as the current transaction.
     *
     * @param string      $name                      New transaction's name
     * @param string      $type                      New transaction's type
     * @param float|null  $timestamp                 Start time of the new transaction
     * @param string|null $serializedDistTracingData - DEPRECATED since version 1.3 -
     *                                               use newTransaction()->distributedTracingHeaderExtractor() instead
     *
     * @return TransactionInterface New transaction
     *
     * @see TransactionInterface::setName() For the description.
     * @see TransactionInterface::setType() For the description.
     * @see TransactionInterface::getTimestamp() For the description.
     */
    public static function beginCurrentTransaction(
        string $name,
        string $type,
        ?float $timestamp = null,
        ?string $serializedDistTracingData = null
    ): TransactionInterface {}

    /**
     * Begins a new transaction, sets as the current transaction,
     * runs the provided callback as the new transaction and automatically ends the new transaction.
     *
     * @param string      $name      New transaction's name
     * @param string      $type      New transaction's type
     * @param \Closure     $callback  Callback to execute as the new transaction
     * @param float|null  $timestamp Start time of the new transaction
     * @param string|null $serializedDistTracingData - DEPRECATED since version 1.3 -
     *                                               use newTransaction()->distributedTracingHeaderExtractor() instead
     *
     * @return mixed The return value of $callback
     *
     * @see             TransactionInterface::setName() For the description.
     * @see             TransactionInterface::setType() For the description.
     * @see             TransactionInterface::getTimestamp() For the description.
     */
    public static function captureCurrentTransaction(
        string $name,
        string $type,
        \Closure $callback,
        ?float $timestamp = null,
        ?string $serializedDistTracingData = null
    ) {}

    /**
     * Returns the current transaction.
     *
     * @return TransactionInterface The current transaction
     */
    public static function getCurrentTransaction(): TransactionInterface {}

    /**
     * If there is the current span then it returns the current span.
     * Otherwise if there is the current transaction then it returns the current transaction.
     * Otherwise it returns the noop execution segment.
     *
     * @return ExecutionSegmentInterface The current execution segment
     */
    public static function getCurrentExecutionSegment(): ExecutionSegmentInterface {}

    /**
     * Begins a new transaction.
     *
     * @param string      $name      New transaction's name
     * @param string      $type      New transaction's type
     * @param float|null  $timestamp Start time of the new transaction
     * @param string|null $serializedDistTracingData - DEPRECATED since version 1.3 -
     *                                               use newTransaction()->distributedTracingHeaderExtractor() instead
     *
     * @return TransactionInterface New transaction
     *
     * @see TransactionInterface::setName() For the description.
     * @see TransactionInterface::setType() For the description.
     * @see TransactionInterface::getTimestamp() For the description.
     */
    public static function beginTransaction(
        string $name,
        string $type,
        ?float $timestamp = null,
        ?string $serializedDistTracingData = null
    ): TransactionInterface {}

    /**
     * Begins a new transaction,
     * runs the provided callback as the new transaction and automatically ends the new transaction.
     *
     * @param string      $name      New transaction's name
     * @param string      $type      New transaction's type
     * @param \Closure     $callback  Callback to execute as the new transaction
     * @param float|null  $timestamp Start time of the new transaction
     * @param string|null $serializedDistTracingData - DEPRECATED since version 1.3 -
     *                                               use newTransaction()->distributedTracingHeaderExtractor() instead
     *
     * @return mixed The return value of $callback
     *
     * @see             TransactionInterface::setName() For the description.
     * @see             TransactionInterface::setType() For the description.
     * @see             TransactionInterface::getTimestamp() For the description.
     */
    public static function captureTransaction(
        string $name,
        string $type,
        \Closure $callback,
        ?float $timestamp = null,
        ?string $serializedDistTracingData = null
    ) {}

    /**
     * Advanced API to begin a new transaction
     *
     * @param string $name New transaction's name
     * @param string $type New transaction's type
     *
     * @return TransactionBuilderInterface New transaction builder
     *
     * @see TransactionInterface::setName() For the description.
     * @see TransactionInterface::setType() For the description.
     */
    public static function newTransaction(string $name, string $type): TransactionBuilderInterface {}

    /**
     * Creates an error based on the given Throwable instance
     * with the current execution segment (if there is one) as the parent.
     *
     * @param \Throwable $throwable
     *
     * @return string|null ID of the reported error event or null if no event was reported
     *                      (for example, because recording is disabled)
     *
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/errors/error.json
     */
    public static function createErrorFromThrowable(\Throwable $throwable): ?string {}

    /**
     * Creates an error based on the given data
     * with the current execution segment (if there is one) as the parent.
     *
     * @param CustomErrorData $customErrorData
     *
     * @return string|null ID of the reported error event or null if no event was reported
     *                      (for example, because recording is disabled)
     *
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/errors/error.json
     */
    public static function createCustomError(CustomErrorData $customErrorData): ?string {}

    /**
     * Pauses recording
     */
    public static function pauseRecording(): void {}

    /**
     * Resumes recording
     */
    public static function resumeRecording(): void {}

    /**
     * @deprecated      Deprecated since version 1.3 - use injectDistributedTracingHeaders() instead
     * @see             injectDistributedTracingHeaders() Use it instead of this method
     *
     * Returns distributed tracing data for the current span/transaction
     */
    public static function getSerializedCurrentDistributedTracingData(): string {}
}

/**
 * Class to gather optional parameters to start a new transaction
 *
 * @see             ElasticApm::beginCurrentTransaction()
 * @see             ElasticApm::captureCurrentTransaction()
 */
interface TransactionBuilderInterface
{
    /**
     * New transaction will be set as the current one
     *
     * @return TransactionBuilderInterface
     */
    public function asCurrent(): self;

    /**
     * Set start time of the new transaction
     *
     * @param float $timestamp
     *
     * @return TransactionBuilderInterface
     */
    public function timestamp(float $timestamp): self;

    /**
     * @param \Closure $headerExtractor
     *
     * @return TransactionBuilderInterface
     */
    public function distributedTracingHeaderExtractor(\Closure $headerExtractor): self;

    /**
     * Begins a new transaction.
     *
     * @return TransactionInterface New transaction
     */
    public function begin(): TransactionInterface;

    /**
     * Begins a new transaction,
     * runs the provided callback as the new transaction and automatically ends the new transaction.
     *
     * @param \Closure $callback
     *
     * @return mixed The return value of $callback
     */
    public function capture(\Closure $callback);
}

interface TransactionInterface extends ExecutionSegmentInterface
{
    /**
     * Transactions that are 'sampled' will include all available information
     * Transactions that are not sampled will not have 'spans' or 'context'.
     *
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/transactions/transaction.json#L72
     */
    public function isSampled(): bool;

    /**
     * Hex encoded 64 random bits ID of the parent transaction or span.
     * Only a root transaction of a trace does not have a parent ID, otherwise it needs to be set.
     *
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/transactions/transaction.json#L19
     */
    public function getParentId(): ?string;

    /**
     * Begins a new span with the current execution segment
     * as the new span's parent and sets as the new span as the current span for this transaction.
     * The current execution segment is the current span if there is one or this transaction itself otherwise.
     *
     * @param string      $name      New span's name.
     * @param string      $type      New span's type
     * @param string|null $subtype   New span's subtype
     * @param string|null $action    New span's action
     * @param float|null  $timestamp Start time of the new span
     *
     * @see SpanInterface::setName() For the description.
     * @see SpanInterface::setType() For the description.
     * @see SpanInterface::setSubtype() For the description.
     * @see SpanInterface::setAction() For the description.
     * @see SpanInterface::getTimestamp() For the description.
     *
     * @return SpanInterface New span
     */
    public function beginCurrentSpan(
        string $name,
        string $type,
        ?string $subtype = null,
        ?string $action = null,
        ?float $timestamp = null
    ): SpanInterface;

    /**
     * Begins a new span with the current execution segment as the new span's parent and
     * sets the new span as the current span for this transaction.
     * The current execution segment is the current span if there is one or this transaction itself otherwise.
     *
     * @param string      $name      New span's name
     * @param string      $type      New span's type
     * @param \Closure     $callback  Callback to execute as the new span
     * @param string|null $subtype   New span's subtype
     * @param string|null $action    New span's action
     * @param float|null  $timestamp Start time of the new span
     *
     * @see             SpanInterface::setName() For the description.
     * @see             SpanInterface::setType() For the description.
     * @see             SpanInterface::setSubtype() For the description.
     * @see             SpanInterface::setAction() For the description.
     * @see             SpanInterface::getTimestamp() For the description.
     *
     * @return mixed The return value of $callback
     */
    public function captureCurrentSpan(
        string $name,
        string $type,
        \Closure $callback,
        ?string $subtype = null,
        ?string $action = null,
        ?float $timestamp = null
    );

    /**
     * Returns the current span.
     *
     * @return SpanInterface The current span
     */
    public function getCurrentSpan(): SpanInterface;

    /**
     * Returns context (context allows to set labels, etc.)
     */
    public function context(): TransactionContextInterface;

    /**
     * The result of the transaction.
     * For HTTP-related transactions, this should be the status code formatted like 'HTTP 2xx'.
     *
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/transactions/transaction.json#L52
     *
     * @param string|null $result
     *
     * @return void
     */
    public function setResult(?string $result): void;

    /**
     * @see setResult() For the description
     */
    public function getResult(): ?string;

    /**
     * If the transaction does not have a parent ID yet,
     * calling this method generates a new ID,
     * sets it as the parent ID of this transaction, and returns it as a string.
     *
     * @return string
     */
    public function ensureParentId(): string;
}

interface SpanInterface extends ExecutionSegmentInterface
{
    /**
     * Hex encoded 64 random bits ID of the correlated transaction.
     *
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/spans/span.json#L14
     */
    public function getTransactionId(): string;

    /**
     * Hex encoded 64 random bits ID of the parent.
     * If this span is the root span of the correlated transaction the its parent is the correlated transaction
     * otherwise its parent is the parent span.
     *
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/spans/span.json#L24
     */
    public function getParentId(): string;

    /**
     * The specific kind of event within the sub-type represented by the span
     * e.g., 'query' for type/sub-type 'db'/'mysql', 'connect' for type/sub-type 'db'/'cassandra'
     *
     * The length of this string is limited to 1024.
     *
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/spans/span.json#L38
     *
     * @param string|null $action
     *
     * @return void
     */
    public function setAction(?string $action): void;

    /**
     * A further sub-division of the type
     * e.g., 'mysql', 'postgresql' or 'elasticsearch' for type 'db', 'http' for type 'external', etc.
     *
     * The length of this string is limited to 1024.
     *
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/spans/span.json#L33
     *
     * @param string|null $subtype
     */
    public function setSubtype(?string $subtype): void;

    /**
     * Returns context (context allows to set labels, etc.)
     */
    public function context(): SpanContextInterface;

    /**
     * Extended version of ExecutionSegmentInterface::end()
     *
     * @param int        $numberOfStackFramesToSkip Number of stack frames to skip when capturing stack trace.
     * @param float|null $duration                  In milliseconds with 3 decimal points.
     *
     * @see ExecutionSegmentInterface::end() For the description
     */
    public function endSpanEx(int $numberOfStackFramesToSkip, ?float $duration = null): void;
}

interface SpanContextInterface extends ExecutionSegmentContextInterface
{
    /**
     * Returns an object containing contextual data for database spans
     *
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/spans/span.json#L47
     */
    public function db(): SpanContextDbInterface;

    /**
     * Returns an object containing contextual data of the related http request
     *
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/spans/span.json#L69
     */
    public function http(): SpanContextHttpInterface;

    /**
     * Returns an object containing contextual data about the destination for spans
     *
     * @link https://github.com/elastic/apm-server/blob/7.6/docs/spec/spans/span.json#L44
     */
    public function destination(): SpanContextDestinationInterface;
}

interface SpanContextDbInterface
{
    /**
     * A database statement (e.g. query) for the given database type
     *
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/spans/span.json#L55
     *
     * @param string|null $statement
     *
     * @return void
     */
    public function setStatement(?string $statement): void;
}

interface SpanContextHttpInterface
{
    /**
     * The raw url of the correlating http request
     *
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/spans/span.json#L73
     *
     * @param string|null $url
     *
     * @return void
     */
    public function setUrl(?string $url): void;

    /**
     * The status code of the http request
     *
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/spans/span.json#L77
     *
     * @param int|null $statusCode
     *
     * @return void
     */
    public function setStatusCode(?int $statusCode): void;

    /**
     * The method of the http request
     *
     * The length of a value is limited to 1024.
     *
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/spans/span.json#L81
     *
     * @param string|null $method
     *
     * @return void
     */
    public function setMethod(?string $method): void;
}

/**
 * An object containing contextual data about the destination for spans
 *
 * @link https://github.com/elastic/apm-server/blob/7.6/docs/spec/spans/span.json#L44
 */
interface SpanContextDestinationInterface
{
    /**
     * Sets destination service context
     *
     * @link https://github.com/elastic/apm-server/blob/v7.11.0/docs/spec/v2/span.json#L106
     *
     * @param string $name
     * @param string $resource
     * @param string $type
     */
    public function setService(string $name, string $resource, string $type): void;
}

/**
 * This interface has functionality shared between Transaction and Span.
 */
interface ExecutionSegmentInterface
{
    /**
     * Hex encoded 64 random bits (== 8 bytes == 16 hex digits) ID.
     *
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/transactions/transaction.json#L9
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/spans/span.json#L9
     */
    public function getId(): string;

    /**
     * Hex encoded 128 random bits (== 16 bytes == 32 hex digits) ID of the correlated trace.
     *
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/transactions/transaction.json#L14
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/spans/span.json#L19
     */
    public function getTraceId(): string;

    /**
     * Recorded time of the event.
     * For events that have non-zero duration this time corresponds to the start of the event.
     * UTC based and in microseconds since Unix epoch.
     *
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/transactions/transaction.json#L6
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/spans/span.json#L6
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/timestamp_epoch.json#L7
     */
    public function getTimestamp(): float;

    /**
     * Begins a new span with this execution segment as the new span's parent.
     *
     * @param string      $name      New span's name
     * @param string      $type      New span's type
     * @param string|null $subtype   New span's subtype
     * @param string|null $action    New span's action
     * @param float|null  $timestamp Start time of the new span
     *
     * @see SpanInterface::setName() For the description.
     * @see SpanInterface::setType() For the description.
     * @see SpanInterface::setSubtype() For the description.
     * @see SpanInterface::setAction() For the description.
     * @see SpanInterface::setTimestamp() For the description.
     *
     * @return SpanInterface New span
     */
    public function beginChildSpan(
        string $name,
        string $type,
        ?string $subtype = null,
        ?string $action = null,
        ?float $timestamp = null
    ): SpanInterface;

    /**
     * Begins a new span with this execution segment as the new span's parent,
     * runs the provided callback as the new span and automatically ends the new span.
     *
     * @param string      $name      New span's name
     * @param string      $type      New span's type
     * @param \Closure     $callback  Callback to execute as the new span
     * @param string|null $subtype   New span's subtype
     * @param string|null $action    New span's action
     * @param float|null  $timestamp Start time of the new span
     *
     * @see             SpanInterface::setName() For the description.
     * @see             SpanInterface::setType() For the description.
     * @see             SpanInterface::setSubtype() For the description.
     * @see             SpanInterface::setAction() For the description.
     * @see             SpanInterface::setTimestamp() For the description.
     *
     * @return mixed The return value of $callback
     */
    public function captureChildSpan(
        string $name,
        string $type,
        \Closure $callback,
        ?string $subtype = null,
        ?string $action = null,
        ?float $timestamp = null
    );

    /**
     * - For transactions:
     *      The name of this transaction.
     *      Generic designation of a transaction in the scope of a single service (eg: 'GET /users/:id').
     *
     * - For spans:
     *      Generic designation of a span in the scope of a transaction.
     *
     * The length of this string is limited to 1024.
     *
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/transactions/transaction.json#L47
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/spans/span.json#L136
     *
     * @param string $name
     */
    public function setName(string $name): void;

    /**
     * Type is a keyword of specific relevance in the service's domain
     * e.g.,
     *      - For transaction: 'db', 'external' for a span and 'request', 'backgroundjob' for a transaction, etc.
     *      - For span: 'db.postgresql.query', 'template.erb', etc.
     *
     * The length of this string is limited to 1024.
     *
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/transactions/transaction.json#L57
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/spans/span.json#L149
     *
     * @param string $type
     */
    public function setType(string $type): void;

    /**
     * @deprecated      Deprecated since version 1.3 - use injectDistributedTracingHeaders() instead
     * @see             injectDistributedTracingHeaders() Use it instead of this method
     *
     * Returns distributed tracing data
     */
    public function getDistributedTracingData(): ?DistributedTracingData;

    /**
     * Returns distributed tracing data for the current span/transaction
     *
     * $headerInjector is callback to inject headers with signature
     *
     *      (string $headerName, string $headerValue): void
     *
     * @param \Closure $headerInjector Callback that actually injects header(s) for the underlying transport
     */
    public function injectDistributedTracingHeaders(\Closure $headerInjector): void;

    /**
     * Sets the end timestamp and finalizes this object's state.
     *
     * If any mutating method (for example any `set...` method is a mutating method)
     * is called on a instance which has already then a warning is logged.
     * For example, end() is a mutating method as well.
     *
     * @param float|null $duration In milliseconds with 3 decimal points.
     */
    public function end(?float $duration = null): void;

    /**
     * Returns true if this execution segment has already ended.
     */
    public function hasEnded(): bool;

    /**
     * Creates an error based on the given Throwable instance with this execution segment as the parent.
     *
     * @param \Throwable $throwable
     *
     * @return string|null ID of the reported error event or null if no event was reported
     *                      (for example, because recording is disabled)
     *
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/errors/error.json
     */
    public function createErrorFromThrowable(\Throwable $throwable): ?string;

    /**
     * Creates an error based on the given Throwable instance with this execution segment as the parent.
     *
     * @param CustomErrorData $customErrorData
     *
     * @return string|null ID of the reported error event or null if no event was reported
     *                      (for example, because recording is disabled)
     *
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/errors/error.json
     */
    public function createCustomError(CustomErrorData $customErrorData): ?string;

    /**
     * The outcome of the transaction/span: success, failure, or unknown.
     * Outcome may be one of a limited set of permitted values
     * describing the success or failure of the transaction/span.
     * This field can be used for calculating error rates for incoming/outgoing requests.
     *
     * @link https://github.com/elastic/apm-server/blob/v7.10.0/docs/spec/transactions/transaction.json#L59
     * @link https://github.com/elastic/apm-server/blob/v7.10.0/docs/spec/spans/span.json#L54
     * @link https://github.com/elastic/apm-server/blob/v7.10.0/docs/spec/outcome.json
     *
     * @param string|null $outcome
     *
     * @return void
     */
    public function setOutcome(?string $outcome): void;

    /**
     * @see setOutcome() For the description
     */
    public function getOutcome(): ?string;

    /**
     * Returns true if this execution segment is a no-op (for example when recording is disabled).
     */
    public function isNoop(): bool;

    /**
     * Discards this execution segment.
     */
    public function discard(): void;
}

final class DistributedTracingData
{
    /** @var string */
    public $traceId;

    /** @var string */
    public $parentId;

    /** @var bool */
    public $isSampled;

    /**
     * @deprecated Deprecated since version 1.3 - use injectHeaders() instead
     * @see             injectHeaders() Use it instead of this method
     *
     * Returns distributed tracing data for the current span/transaction
     */
    public function serializeToString(): string {}

    /**
     * Gets distributed tracing data for the current span/transaction
     *
     * $headerInjector is callback to inject headers with signature
     *
     *      (string $headerName, string $headerValue): void
     *
     * @param \Closure $headerInjector Callback that actually injects header(s) for the underlying transport
     */
    public function injectHeaders(\Closure $headerInjector): void {}
}

/**
 * Data to create custom error event
 *
 * @see  ElasticApm::createCustomError
 *
 * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/errors/error.json#L53
 *
 * Code in this file is part of implementation internals and thus it is not covered by the backward compatibility.
 */
class CustomErrorData
{
    /**
     * @var int|string|null
     *
     * The error code set when the error happened, e.g. database error code
     *
     * The length of a string value is limited to 1024.
     *
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/errors/error.json#L56
     */
    public $code = null;

    /**
     * @var string|null
     *
     * The original error message
     *
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/errors/error.json#L61
     */
    public $message = null;

    /**
     * @var string|null
     *
     * Describes the exception type's module namespace
     *
     * The length of a value is limited to 1024.
     *
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/errors/error.json#L65
     */
    public $module = null;

    /**
     * @var string|null
     *
     * The length of a value is limited to 1024.
     *
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/errors/error.json#L80
     */
    public $type = null;
}

interface TransactionContextInterface extends ExecutionSegmentContextInterface
{
    /**
     * Returns an object that can be used to collect information about HTTP request
     *
     * @link https://github.com/elastic/apm-server/blob/v7.0.0/docs/spec/context.json#L43
     * @link https://github.com/elastic/apm-server/blob/v7.0.0/docs/spec/request.json
     */
    public function request(): TransactionContextRequestInterface;
}

/**
 * This interface has functionality shared between Transaction and Span contexts'.
 */
interface ExecutionSegmentContextInterface
{
    /**
     * @param string                     $key
     * @param string|bool|int|float|null $value
     *
     * Labels is a flat mapping of user-defined labels with string keys and null, string, boolean or number values.
     *
     * The length of a key and a string value is limited to 1024.
     *
     * @return void
     *
     * @link    https://github.com/elastic/apm-server/blob/7.0/docs/spec/transactions/transaction.json#L40
     * @link    https://github.com/elastic/apm-server/blob/7.0/docs/spec/context.json#L46
     * @link    https://github.com/elastic/apm-server/blob/7.0/docs/spec/spans/span.json#L88
     * @link    https://github.com/elastic/apm-server/blob/7.0/docs/spec/tags.json
     */
    public function setLabel(string $key, $value): void;
}

interface TransactionContextRequestInterface
{
    /**
     * HTTP method
     *
     * The length of a value is limited to 1024.
     *
     * @link https://github.com/elastic/apm-server/blob/v7.0.0/docs/spec/request.json#L33
     *
     * @param string $method
     *
     * @return void
     */
    public function setMethod(string $method): void;

    /**
     * Returns an object that can be used to collect information about HTTP request's URL
     *
     * @link https://github.com/elastic/apm-server/blob/7.0/docs/spec/request.json#L50
     */
    public function url(): TransactionContextRequestUrlInterface;
}

interface TransactionContextRequestUrlInterface
{
    /**
     * The domain of the request, e.g. 'example.com'
     *
     * The length of a value is limited to 1024.
     *
     * @link https://github.com/elastic/apm-server/blob/v7.0.0/docs/spec/request.json#L69
     *
     * @param ?string $domain
     *
     * @return void
     */
    public function setDomain(?string $domain): void;

    /**
     * The full, possibly agent-assembled URL of the request
     *
     * The length of a value is limited to 1024.
     *
     * @link https://github.com/elastic/apm-server/blob/v7.0.0/docs/spec/request.json#L64
     *
     * @param ?string $full
     *
     * @return void
     */
    public function setFull(?string $full): void;

    /**
     * The raw, unparsed URL of the HTTP request line, e.g https://example.com:443/search?q=elasticsearch.
     * This URL may be absolute or relative.
     * For more details, see https://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.2
     *
     * The length of a value is limited to 1024.
     *
     * @link https://github.com/elastic/apm-server/blob/v7.0.0/docs/spec/request.json#L54
     *
     * @param ?string $original
     *
     * @return void
     */
    public function setOriginal(?string $original): void;

    /**
     * The path of the request, e.g. '/search'
     *
     * The length of a value is limited to 1024.
     *
     * @link https://github.com/elastic/apm-server/blob/v7.0.0/docs/spec/request.json#L79
     *
     * @param ?string $path
     *
     * @return void
     */
    public function setPath(?string $path): void;

    /**
     * The port of the request, e.g. 443
     *
     * @link https://github.com/elastic/apm-server/blob/v7.0.0/docs/spec/request.json#L74
     *
     * @param ?int $port
     *
     * @return void
     */
    public function setPort(?int $port): void;

    /**
     * The protocol of the request, e.g. 'http'
     *
     * The length of a value is limited to 1024.
     *
     * @link https://github.com/elastic/apm-server/blob/v7.0.0/docs/spec/request.json#L59
     *
     * @param ?string $protocol
     *
     * @return void
     */
    public function setProtocol(?string $protocol): void;

    /**
     * Sets the query string information of the request.
     * It is expected to have values delimited by ampersands.
     *
     * The length of a value is limited to 1024.
     *
     * @link https://github.com/elastic/apm-server/blob/v7.0.0/docs/spec/request.json#L84
     *
     * @param ?string $query
     *
     * @return void
     */
    public function setQuery(?string $query): void;
}
<?php

// Start of xmlwriter v.0.1

use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;

class XMLWriter
{
    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Create new xmlwriter using source uri for output
     * @link https://php.net/manual/en/function.xmlwriter-openuri.php
     * @param string $uri <p>
     * The URI of the resource for the output.
     * </p>
     * @return bool Object oriented style: Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * </p>
     * <p>
     * Procedural style: Returns a new xmlwriter resource for later use with the
     * xmlwriter functions on success, <b>FALSE</b> on error.
     */
    #[TentativeType]
    public function openUri(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $uri): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Create new xmlwriter using memory for string output
     * @link https://php.net/manual/en/function.xmlwriter-openmemory.php
     * @return bool Object oriented style: Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * </p>
     * <p>
     * Procedural style: Returns a new xmlwriter resource for later use with the
     * xmlwriter functions on success, <b>FALSE</b> on error.
     */
    #[TentativeType]
    public function openMemory(): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Toggle indentation on/off.
     * @link https://www.php.net/manual/en/xmlwriter.setindent.php
     * @param bool|int $enable <p>
     * Whether indentation is enabled or number of indent strings
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function setIndent(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $enable): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Set string used for indenting.
     * @link https://www.php.net/manual/en/xmlwriter.setindentstring.php
     * @param string $indentation <p>
     * The indentation string.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function setIndentString(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $indentation): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 1.0.0)<br/>
     * Create start comment
     * @link https://php.net/manual/en/function.xmlwriter-startcomment.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function startComment(): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 1.0.0)<br/>
     * Create end comment
     * @link https://php.net/manual/en/function.xmlwriter-endcomment.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function endComment(): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Create start attribute
     * @link https://php.net/manual/en/function.xmlwriter-startattribute.php
     * @param string $name <p>
     * The attribute name.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function startAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * End attribute
     * @link https://php.net/manual/en/function.xmlwriter-endattribute.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function endAttribute(): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Write full attribute
     * @link https://php.net/manual/en/function.xmlwriter-writeattribute.php
     * @param string $name <p>
     * The name of the attribute.
     * </p>
     * @param string $value <p>
     * The value of the attribute.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function writeAttribute(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value
    ): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Create start namespaced attribute
     * @link https://php.net/manual/en/function.xmlwriter-startattributens.php
     * @param string|null $prefix <p>
     * The namespace prefix.
     * </p>
     * @param string $name <p>
     * The attribute name.
     * </p>
     * @param string $namespace <p>
     * The namespace URI.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function startAttributeNs(
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $prefix,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace
    ): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Write full namespaced attribute
     * @link https://php.net/manual/en/function.xmlwriter-writeattributens.php
     * @param string|null $prefix <p>
     * The namespace prefix.
     * </p>
     * @param string $name <p>
     * The attribute name.
     * </p>
     * @param string $namespace <p>
     * The namespace URI.
     * </p>
     * @param string $value <p>
     * The attribute value.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function writeAttributeNs(
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $prefix,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value
    ): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Create start element tag
     * @link https://php.net/manual/en/function.xmlwriter-startelement.php
     * @param string $name <p>
     * The element name.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function startElement(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * End current element
     * @link https://php.net/manual/en/function.xmlwriter-endelement.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function endElement(): bool {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL xmlwriter &gt;= 2.0.4)<br/>
     * End current element
     * @link https://php.net/manual/en/function.xmlwriter-fullendelement.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function fullEndElement(): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Create start namespaced element tag
     * @link https://php.net/manual/en/function.xmlwriter-startelementns.php
     * @param string|null $prefix <p>
     * The namespace prefix.
     * </p>
     * @param string $name <p>
     * The element name.
     * </p>
     * @param string $namespace <p>
     * The namespace URI.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function startElementNs(
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $prefix,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace
    ): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Write full element tag
     * @link https://php.net/manual/en/function.xmlwriter-writeelement.php
     * @param string $name <p>
     * The element name.
     * </p>
     * @param string $content [optional] <p>
     * The element contents.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function writeElement(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $content = null
    ): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Write full namespaced element tag
     * @link https://php.net/manual/en/function.xmlwriter-writeelementns.php
     * @param string|null $prefix <p>
     * The namespace prefix.
     * </p>
     * @param string $name <p>
     * The element name.
     * </p>
     * @param string $namespace <p>
     * The namespace URI.
     * </p>
     * @param string $content [optional] <p>
     * The element contents.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function writeElementNs(
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $prefix,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $content = null
    ): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Create start PI tag
     * @link https://php.net/manual/en/function.xmlwriter-startpi.php
     * @param string $target <p>
     * The target of the processing instruction.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function startPi(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $target): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * End current PI
     * @link https://php.net/manual/en/function.xmlwriter-endpi.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function endPi(): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Writes a PI
     * @link https://php.net/manual/en/function.xmlwriter-writepi.php
     * @param string $target <p>
     * The target of the processing instruction.
     * </p>
     * @param string $content <p>
     * The content of the processing instruction.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function writePi(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $target,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $content
    ): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Create start CDATA tag
     * @link https://php.net/manual/en/function.xmlwriter-startcdata.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function startCdata(): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * End current CDATA
     * @link https://php.net/manual/en/function.xmlwriter-endcdata.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function endCdata(): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Write full CDATA tag
     * @link https://php.net/manual/en/function.xmlwriter-writecdata.php
     * @param string $content <p>
     * The contents of the CDATA.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function writeCdata(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $content): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Write text
     * @link https://php.net/manual/en/function.xmlwriter-text.php
     * @param string $content <p>
     * The contents of the text.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function text(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $content): bool {}

    /**
     * (PHP 5 &gt;= 5.2.0, PECL xmlwriter &gt;= 2.0.4)<br/>
     * Write a raw XML text
     * @link https://php.net/manual/en/function.xmlwriter-writeraw.php
     * @param string $content <p>
     * The text string to write.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function writeRaw(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $content): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Create document tag
     * @link https://php.net/manual/en/function.xmlwriter-startdocument.php
     * @param string $version [optional] <p>
     * The version number of the document as part of the XML declaration.
     * </p>
     * @param string $encoding [optional] <p>
     * The encoding of the document as part of the XML declaration.
     * </p>
     * @param string $standalone [optional] <p>
     * yes or no.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function startDocument(
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $version = '1.0',
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $encoding = null,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $standalone = null
    ): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * End current document
     * @link https://php.net/manual/en/function.xmlwriter-enddocument.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function endDocument(): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Write full comment tag
     * @link https://php.net/manual/en/function.xmlwriter-writecomment.php
     * @param string $content <p>
     * The contents of the comment.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function writeComment(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $content): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Create start DTD tag
     * @link https://php.net/manual/en/function.xmlwriter-startdtd.php
     * @param string $qualifiedName <p>
     * The qualified name of the document type to create.
     * </p>
     * @param string $publicId [optional] <p>
     * The external subset public identifier.
     * </p>
     * @param string $systemId [optional] <p>
     * The external subset system identifier.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function startDtd(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $publicId = null,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $systemId = null
    ): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * End current DTD
     * @link https://php.net/manual/en/function.xmlwriter-enddtd.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function endDtd(): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Write full DTD tag
     * @link https://php.net/manual/en/function.xmlwriter-writedtd.php
     * @param string $name <p>
     * The DTD name.
     * </p>
     * @param string $publicId [optional] <p>
     * The external subset public identifier.
     * </p>
     * @param string $systemId [optional] <p>
     * The external subset system identifier.
     * </p>
     * @param string $content [optional] <p>
     * The content of the DTD.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function writeDtd(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $publicId = null,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $systemId = null,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $content = null
    ): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Create start DTD element
     * @link https://php.net/manual/en/function.xmlwriter-startdtdelement.php
     * @param string $qualifiedName <p>
     * The qualified name of the document type to create.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function startDtdElement(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * End current DTD element
     * @link https://php.net/manual/en/function.xmlwriter-enddtdelement.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function endDtdElement(): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Write full DTD element tag
     * @link https://php.net/manual/en/function.xmlwriter-writedtdelement.php
     * @param string $name <p>
     * The name of the DTD element.
     * </p>
     * @param string $content <p>
     * The content of the element.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function writeDtdElement(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $content
    ): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Create start DTD AttList
     * @link https://php.net/manual/en/function.xmlwriter-startdtdattlist.php
     * @param string $name <p>
     * The attribute list name.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function startDtdAttlist(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * End current DTD AttList
     * @link https://php.net/manual/en/function.xmlwriter-enddtdattlist.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function endDtdAttlist(): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Write full DTD AttList tag
     * @link https://php.net/manual/en/function.xmlwriter-writedtdattlist.php
     * @param string $name <p>
     * The name of the DTD attribute list.
     * </p>
     * @param string $content <p>
     * The content of the DTD attribute list.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function writeDtdAttlist(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $content
    ): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Create start DTD Entity
     * @link https://php.net/manual/en/function.xmlwriter-startdtdentity.php
     * @param string $name <p>
     * The name of the entity.
     * </p>
     * @param bool $isParam
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function startDtdEntity(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $isParam
    ): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * End current DTD Entity
     * @link https://php.net/manual/en/function.xmlwriter-enddtdentity.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function endDtdEntity(): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Write full DTD Entity tag
     * @link https://php.net/manual/en/function.xmlwriter-writedtdentity.php
     * @param string $name <p>
     * The name of the entity.
     * </p>
     * @param string $content <p>
     * The content of the entity.
     * </p>
     * @param bool $pe
     * @param string $pubid
     * @param string $sysid
     * @param string $ndataid
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function writeDtdEntity(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $content,
        $pe,
        $pubid,
        $sysid,
        $ndataid
    ) {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
     * Returns current buffer
     * @link https://php.net/manual/en/function.xmlwriter-outputmemory.php
     * @param bool $flush [optional] <p>
     * Whether to flush the output buffer or not. Default is <b>TRUE</b>.
     * </p>
     * @return string the current buffer as a string.
     */
    #[TentativeType]
    public function outputMemory(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $flush = true): string {}

    /**
     * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 1.0.0)<br/>
     * Flush current buffer
     * @link https://php.net/manual/en/function.xmlwriter-flush.php
     * @param bool $empty [optional] <p>
     * Whether to empty the buffer or not. Default is <b>TRUE</b>.
     * </p>
     * @return string|int If you opened the writer in memory, this function returns the generated XML buffer,
     * Else, if using URI, this function will write the buffer and return the number of
     * written bytes.
     */
    #[TentativeType]
    public function flush(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $empty = true): string|int {}
}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Create new xmlwriter using source uri for output
 * @link https://php.net/manual/en/function.xmlwriter-openuri.php
 * @param string $uri <p>
 * The URI of the resource for the output.
 * </p>
 * @return false|resource|XMLWriter Object oriented style: Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * <p>
 * Procedural style: Returns a new xmlwriter resource for later use with the
 * xmlwriter functions on success, <b>FALSE</b> on error.
 * </p>
 */
#[LanguageLevelTypeAware(["8.0" => "XMLWriter|false"], default: "resource|false")]
function xmlwriter_open_uri(string $uri) {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Create new xmlwriter using memory for string output
 * @link https://php.net/manual/en/function.xmlwriter-openmemory.php
 * @return XMLWriter|false|resource Object oriented style: Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * <p>
 * Procedural style: Returns a new xmlwriter resource for later use with the
 * xmlwriter functions on success, <b>FALSE</b> on error.
 * </p>
 */
#[LanguageLevelTypeAware(["8.0" => "XMLWriter|false"], default: "resource|false")]
function xmlwriter_open_memory() {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Toggle indentation on/off
 * @link https://php.net/manual/en/function.xmlwriter-setindent.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @param bool $enable <p>
 * Whether indentation is enabled.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_set_indent(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer, bool $enable): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Set string used for indenting
 * @link https://php.net/manual/en/function.xmlwriter-setindentstring.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @param string $indentation <p>
 * The indentation string.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_set_indent_string(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer, string $indentation): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 1.0.0)<br/>
 * Create start comment
 * @link https://php.net/manual/en/function.xmlwriter-startcomment.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_start_comment(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 1.0.0)<br/>
 * Create end comment
 * @link https://php.net/manual/en/function.xmlwriter-endcomment.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_end_comment(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Create start attribute
 * @link https://php.net/manual/en/function.xmlwriter-startattribute.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @param string $name <p>
 * The attribute name.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_start_attribute(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer, string $name): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * End attribute
 * @link https://php.net/manual/en/function.xmlwriter-endattribute.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_end_attribute(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Write full attribute
 * @link https://php.net/manual/en/function.xmlwriter-writeattribute.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @param string $name <p>
 * The name of the attribute.
 * </p>
 * @param string $value <p>
 * The value of the attribute.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_write_attribute(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer, string $name, string $value): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Create start namespaced attribute
 * @link https://php.net/manual/en/function.xmlwriter-startattributens.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @param string|null $prefix <p>
 * The namespace prefix.
 * </p>
 * @param string $name <p>
 * The attribute name.
 * </p>
 * @param string|null $namespace <p>
 * The namespace URI.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_start_attribute_ns(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer, ?string $prefix, string $name, ?string $namespace): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Write full namespaced attribute
 * @link https://php.net/manual/en/function.xmlwriter-writeattributens.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @param string|null $prefix <p>
 * The namespace prefix.
 * </p>
 * @param string $name <p>
 * The attribute name.
 * </p>
 * @param string|null $namespace <p>
 * The namespace URI.
 * </p>
 * @param string $value <p>
 * The attribute value.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_write_attribute_ns(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer, ?string $prefix, string $name, ?string $namespace, string $value): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Create start element tag
 * @link https://php.net/manual/en/function.xmlwriter-startelement.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @param string $name <p>
 * The element name.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_start_element(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer, string $name): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * End current element
 * @link https://php.net/manual/en/function.xmlwriter-endelement.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_end_element(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer): bool {}

/**
 * (PHP 5 &gt;= 5.2.0, PECL xmlwriter &gt;= 2.0.4)<br/>
 * End current element
 * @link https://php.net/manual/en/function.xmlwriter-fullendelement.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_full_end_element(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Create start namespaced element tag
 * @link https://php.net/manual/en/function.xmlwriter-startelementns.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @param string|null $prefix <p>
 * The namespace prefix.
 * </p>
 * @param string $name <p>
 * The element name.
 * </p>
 * @param string|null $namespace <p>
 * The namespace URI.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_start_element_ns(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer, ?string $prefix, string $name, ?string $namespace): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Write full element tag
 * @link https://php.net/manual/en/function.xmlwriter-writeelement.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @param string $name <p>
 * The element name.
 * </p>
 * @param string|null $content [optional] <p>
 * The element contents.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_write_element(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer, string $name, ?string $content): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Write full namespaced element tag
 * @link https://php.net/manual/en/function.xmlwriter-writeelementns.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @param string|null $prefix <p>
 * The namespace prefix.
 * </p>
 * @param string $name <p>
 * The element name.
 * </p>
 * @param string|null $namespace <p>
 * The namespace URI.
 * </p>
 * @param string|null $content [optional] <p>
 * The element contents.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_write_element_ns(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer, ?string $prefix, string $name, ?string $namespace, ?string $content): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Create start PI tag
 * @link https://php.net/manual/en/function.xmlwriter-startpi.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @param string $target <p>
 * The target of the processing instruction.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_start_pi(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer, string $target): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * End current PI
 * @link https://php.net/manual/en/function.xmlwriter-endpi.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_end_pi(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Writes a PI
 * @link https://php.net/manual/en/function.xmlwriter-writepi.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @param string $target <p>
 * The target of the processing instruction.
 * </p>
 * @param string $content <p>
 * The content of the processing instruction.
 * </p>
 *
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_write_pi(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer, string $target, string $content): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Create start CDATA tag
 * @link https://php.net/manual/en/function.xmlwriter-startcdata.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_start_cdata(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * End current CDATA
 * @link https://php.net/manual/en/function.xmlwriter-endcdata.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_end_cdata(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Write full CDATA tag
 * @link https://php.net/manual/en/function.xmlwriter-writecdata.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @param string $content <p>
 * The contents of the CDATA.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_write_cdata(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer, string $content): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Write text
 * @link https://php.net/manual/en/function.xmlwriter-text.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @param string $content <p>
 * The contents of the text.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_text(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer, string $content): bool {}

/**
 * (PHP 5 &gt;= 5.2.0, PECL xmlwriter &gt;= 2.0.4)<br/>
 * Write a raw XML text
 * @link https://php.net/manual/en/function.xmlwriter-writeraw.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @param string $content <p>
 * The text string to write.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_write_raw(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer, string $content): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Create document tag
 * @link https://php.net/manual/en/function.xmlwriter-startdocument.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @param string|null $version [optional] <p>
 * The version number of the document as part of the XML declaration.
 * </p>
 * @param string|null $encoding [optional] <p>
 * The encoding of the document as part of the XML declaration.
 * </p>
 * @param string|null $standalone [optional] <p>
 * yes or no.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_start_document(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer, ?string $version = '1.0', ?string $encoding, ?string $standalone): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * End current document
 * @link https://php.net/manual/en/function.xmlwriter-enddocument.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_end_document(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Write full comment tag
 * @link https://php.net/manual/en/function.xmlwriter-writecomment.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @param string $content <p>
 * The contents of the comment.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_write_comment(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer, string $content): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Create start DTD tag
 * @link https://php.net/manual/en/function.xmlwriter-startdtd.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @param string $qualifiedName <p>
 * The qualified name of the document type to create.
 * </p>
 * @param string|null $publicId [optional] <p>
 * The external subset public identifier.
 * </p>
 * @param string|null $systemId [optional] <p>
 * The external subset system identifier.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_start_dtd(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer, string $qualifiedName, ?string $publicId, ?string $systemId): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * End current DTD
 * @link https://php.net/manual/en/function.xmlwriter-enddtd.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_end_dtd(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Write full DTD tag
 * @link https://php.net/manual/en/function.xmlwriter-writedtd.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @param string $name <p>
 * The DTD name.
 * </p>
 * @param string|null $publicId [optional] <p>
 * The external subset public identifier.
 * </p>
 * @param string|null $systemId [optional] <p>
 * The external subset system identifier.
 * </p>
 * @param string|null $content [optional] <p>
 * The content of the DTD.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_write_dtd(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer, string $name, ?string $publicId, ?string $systemId, ?string $content): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Create start DTD element
 * @link https://php.net/manual/en/function.xmlwriter-startdtdelement.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @param string $qualifiedName <p>
 * The qualified name of the document type to create.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_start_dtd_element(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer, string $qualifiedName): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * End current DTD element
 * @link https://php.net/manual/en/function.xmlwriter-enddtdelement.php
 * @param $writer
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_end_dtd_element(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Write full DTD element tag
 * @link https://php.net/manual/en/function.xmlwriter-writedtdelement.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @param string $name <p>
 * The name of the DTD element.
 * </p>
 * @param string $content <p>
 * The content of the element.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_write_dtd_element(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer, string $name, string $content): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Create start DTD AttList
 * @link https://php.net/manual/en/function.xmlwriter-startdtdattlist.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @param string $name <p>
 * The attribute list name.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_start_dtd_attlist(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer, string $name): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * End current DTD AttList
 * @link https://php.net/manual/en/function.xmlwriter-enddtdattlist.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_end_dtd_attlist(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Write full DTD AttList tag
 * @link https://php.net/manual/en/function.xmlwriter-writedtdattlist.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @param string $name <p>
 * The name of the DTD attribute list.
 * </p>
 * @param string $content <p>
 * The content of the DTD attribute list.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_write_dtd_attlist(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer, string $name, string $content): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Create start DTD Entity
 * @link https://php.net/manual/en/function.xmlwriter-startdtdentity.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @param string $name <p>
 * The name of the entity.
 * </p>
 * @param bool $isParam
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_start_dtd_entity(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer, string $name, bool $isParam): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * End current DTD Entity
 * @link https://php.net/manual/en/function.xmlwriter-enddtdentity.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_end_dtd_entity(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Write full DTD Entity tag
 * @link https://php.net/manual/en/function.xmlwriter-writedtdentity.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @param string $name <p>
 * The name of the entity.
 * </p>
 * @param string $content <p>
 * The content of the entity.
 * </p>
 * @param bool $isParam
 * @param string $publicId
 * @param string $systemId
 * @param string $notationData
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function xmlwriter_write_dtd_entity(
    #[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer,
    string $name,
    string $content,
    #[PhpStormStubsElementAvailable(from: '8.0')] bool $isParam = false,
    #[PhpStormStubsElementAvailable(from: '8.0')] ?string $publicId = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] ?string $systemId = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] ?string $notationData = null
): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 0.1.0)<br/>
 * Returns current buffer
 * @link https://php.net/manual/en/function.xmlwriter-outputmemory.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @param bool $flush [optional] <p>
 * Whether to flush the output buffer or not. Default is <b>TRUE</b>.
 * </p>
 * @return string the current buffer as a string.
 */
function xmlwriter_output_memory(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer, bool $flush = true): string {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL xmlwriter &gt;= 1.0.0)<br/>
 * Flush current buffer
 * @link https://php.net/manual/en/function.xmlwriter-flush.php
 * @param resource|XMLWriter $writer
 * <p>Only for procedural calls.
 * The XMLWriter {@link https://php.net/manual/en/language.types.resource.php" resource} that is being modified.
 * This resource comes from a call to {@link https://php.net/manual/en/function.xmlwriter-openuri.php" xmlwriter_open_uri()}
 * or {@link https://php.net/manual/en/function.xmlwriter-openmemory.php" xmlwriter_open_memory()}.</p>
 * @param bool $empty [optional] <p>
 * Whether to empty the buffer or not. Default is <b>TRUE</b>.
 * </p>
 * @return string|int If you opened the writer in memory, this function returns the generated XML buffer,
 * Else, if using URI, this function will write the buffer and return the number of
 * written bytes.
 */
function xmlwriter_flush(#[LanguageLevelTypeAware(["8.0" => "XMLWriter"], default: "resource")] $writer, bool $empty = true): string|int {}
<?php

// Start of wddx v.

/**
 * Serialize a single value into a WDDX packet
 * @link https://php.net/manual/en/function.wddx-serialize-value.php
 * @param mixed $var <p>
 * The value to be serialized
 * </p>
 * @param string $comment [optional] <p>
 * An optional comment string that appears in the packet header.
 * </p>
 * @return string|false the WDDX packet, or <b>FALSE</b> on error.
 * @removed 7.4
 */
function wddx_serialize_value($var, $comment = null) {}

/**
 * Serialize variables into a WDDX packet
 * @link https://php.net/manual/en/function.wddx-serialize-vars.php
 * @param mixed $var_name <p>
 * Can be either a string naming a variable or an array containing
 * strings naming the variables or another array, etc.
 * </p>
 * @param mixed ...$_ [optional]
 * @return string|false the WDDX packet, or <b>FALSE</b> on error.
 * @removed 7.4
 */
function wddx_serialize_vars($var_name, ...$_) {}

/**
 * Starts a new WDDX packet with structure inside it
 * @link https://php.net/manual/en/function.wddx-packet-start.php
 * @param string $comment [optional] <p>
 * An optional comment string.
 * </p>
 * @return resource|false a packet ID for use in later functions, or <b>FALSE</b> on error.
 * @removed 7.4
 */
function wddx_packet_start($comment = null) {}

/**
 * Ends a WDDX packet with the specified ID
 * @link https://php.net/manual/en/function.wddx-packet-end.php
 * @param resource $packet_id <p>
 * A WDDX packet, returned by <b>wddx_packet_start</b>.
 * </p>
 * @return string the string containing the WDDX packet.
 * @removed 7.4
 */
function wddx_packet_end($packet_id) {}

/**
 * Add variables to a WDDX packet with the specified ID
 * @link https://php.net/manual/en/function.wddx-add-vars.php
 * @param resource $packet_id <p>
 * A WDDX packet, returned by <b>wddx_packet_start</b>.
 * </p>
 * @param mixed $var_name <p>
 * Can be either a string naming a variable or an array containing
 * strings naming the variables or another array, etc.
 * </p>
 * @param mixed ...$_ [optional]
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * @removed 7.4
 */
function wddx_add_vars($packet_id, $var_name, ...$_) {}

/**
 * Unserializes a WDDX packet
 * @link https://php.net/manual/en/function.wddx-deserialize.php
 * @param string $packet <p>
 * A WDDX packet, as a string or stream.
 * </p>
 * @return mixed the deserialized value which can be a string, a number or an
 * array. Note that structures are deserialized into associative arrays.
 * @removed 7.4
 */
function wddx_deserialize($packet) {}

// End of wddx v.
<?php

use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Pure;

/**
 * Check for alphanumeric character(s)
 * @link https://php.net/manual/en/function.ctype-alnum.php
 * @param string $text <p>
 * The tested string.
 * </p>
 * @return bool <b>TRUE</b> if every character in <i>text</i> is either
 * a letter or a digit, <b>FALSE</b> otherwise.
 */
#[Pure]
function ctype_alnum(#[LanguageLevelTypeAware(['8.1' => 'string'], default: 'mixed')] mixed $text): bool {}

/**
 * Check for alphabetic character(s)
 * @link https://php.net/manual/en/function.ctype-alpha.php
 * @param string $text <p>
 * The tested string.
 * </p>
 * @return bool <b>TRUE</b> if every character in <i>text</i> is
 * a letter from the current locale, <b>FALSE</b> otherwise.
 */
#[Pure]
function ctype_alpha(#[LanguageLevelTypeAware(['8.1' => 'string'], default: 'mixed')] mixed $text): bool {}

/**
 * Check for control character(s)
 * @link https://php.net/manual/en/function.ctype-cntrl.php
 * @param string $text <p>
 * The tested string.
 * </p>
 * @return bool <b>TRUE</b> if every character in <i>text</i> is
 * a control character from the current locale, <b>FALSE</b> otherwise.
 */
#[Pure]
function ctype_cntrl(#[LanguageLevelTypeAware(['8.1' => 'string'], default: 'mixed')] mixed $text): bool {}

/**
 * Check for numeric character(s)
 * @link https://php.net/manual/en/function.ctype-digit.php
 * @param string $text <p>
 * The tested string.
 * </p>
 * @return bool <b>TRUE</b> if every character in the string
 * <i>text</i> is a decimal digit, <b>FALSE</b> otherwise.
 */
#[Pure]
function ctype_digit(#[LanguageLevelTypeAware(['8.1' => 'string'], default: 'mixed')] mixed $text): bool {}

/**
 * Check for lowercase character(s)
 * @link https://php.net/manual/en/function.ctype-lower.php
 * @param string $text <p>
 * The tested string.
 * </p>
 * @return bool <b>TRUE</b> if every character in <i>text</i> is
 * a lowercase letter in the current locale.
 */
#[Pure]
function ctype_lower(#[LanguageLevelTypeAware(['8.1' => 'string'], default: 'mixed')] mixed $text): bool {}

/**
 * Check for any printable character(s) except space
 * @link https://php.net/manual/en/function.ctype-graph.php
 * @param string $text <p>
 * The tested string.
 * </p>
 * @return bool <b>TRUE</b> if every character in <i>text</i> is
 * printable and actually creates visible output (no white space), <b>FALSE</b>
 * otherwise.
 */
#[Pure]
function ctype_graph(#[LanguageLevelTypeAware(['8.1' => 'string'], default: 'mixed')] mixed $text): bool {}

/**
 * Check for printable character(s)
 * @link https://php.net/manual/en/function.ctype-print.php
 * @param string $text <p>
 * The tested string.
 * </p>
 * @return bool <b>TRUE</b> if every character in <i>text</i>
 * will actually create output (including blanks). Returns <b>FALSE</b> if
 * <i>text</i> contains control characters or characters
 * that do not have any output or control function at all.
 */
#[Pure]
function ctype_print(#[LanguageLevelTypeAware(['8.1' => 'string'], default: 'mixed')] mixed $text): bool {}

/**
 * Check for any printable character which is not whitespace or an
 * alphanumeric character
 * @link https://php.net/manual/en/function.ctype-punct.php
 * @param string $text <p>
 * The tested string.
 * </p>
 * @return bool <b>TRUE</b> if every character in <i>text</i>
 * is printable, but neither letter, digit or blank, <b>FALSE</b> otherwise.
 */
#[Pure]
function ctype_punct(#[LanguageLevelTypeAware(['8.1' => 'string'], default: 'mixed')] mixed $text): bool {}

/**
 * Check for whitespace character(s)
 * @link https://php.net/manual/en/function.ctype-space.php
 * @param string $text <p>
 * The tested string.
 * </p>
 * @return bool <b>TRUE</b> if every character in <i>text</i>
 * creates some sort of white space, <b>FALSE</b> otherwise. Besides the
 * blank character this also includes tab, vertical tab, line feed,
 * carriage return and form feed characters.
 */
#[Pure]
function ctype_space(#[LanguageLevelTypeAware(['8.1' => 'string'], default: 'mixed')] mixed $text): bool {}

/**
 * Check for uppercase character(s)
 * @link https://php.net/manual/en/function.ctype-upper.php
 * @param string $text <p>
 * The tested string.
 * </p>
 * @return bool <b>TRUE</b> if every character in <i>text</i> is
 * an uppercase letter in the current locale.
 */
#[Pure]
function ctype_upper(#[LanguageLevelTypeAware(['8.1' => 'string'], default: 'mixed')] mixed $text): bool {}

/**
 * Check for character(s) representing a hexadecimal digit
 * @link https://php.net/manual/en/function.ctype-xdigit.php
 * @param string $text <p>
 * The tested string.
 * </p>
 * @return bool <b>TRUE</b> if every character in <i>text</i> is
 * a hexadecimal 'digit', that is a decimal digit or a character from
 * [A-Fa-f] , <b>FALSE</b> otherwise.
 */
#[Pure]
function ctype_xdigit(#[LanguageLevelTypeAware(['8.1' => 'string'], default: 'mixed')] mixed $text): bool {}
<?php

// Start of uopz v5.0.2

/**
 * Mark function as public, the default
 * @link https://secure.php.net/manual/en/uopz.constants.php#constant.zend-acc-public
 */
define('ZEND_ACC_PUBLIC', 1);

/**
 * Mark function as protected
 * @link https://secure.php.net/manual/en/uopz.constants.php#constant.zend-acc-protected
 */
define('ZEND_ACC_PROTECTED', 2);

/**
 * Mark function as private
 * @link https://secure.php.net/manual/en/uopz.constants.php#constant.zend-acc-private
 */
define('ZEND_ACC_PRIVATE', 4);

/**
 * Mark function as static
 * @link https://secure.php.net/manual/en/uopz.constants.php#constant.zend-acc-static
 */
define('ZEND_ACC_STATIC', 16);

/**
 * Mark function as final
 * @link https://secure.php.net/manual/en/uopz.constants.php#constant.zend-acc-final
 */
define('ZEND_ACC_FINAL', 32);

/**
 * Mark function as abstract
 * @link https://secure.php.net/manual/en/uopz.constants.php#constant.zend-acc-abstract
 */
define('ZEND_ACC_ABSTRACT', 64);

/**
 * Used for getting flags only
 * @link https://secure.php.net/manual/en/uopz.constants.php#constant.zend-acc-fetch
 */
define('ZEND_ACC_FETCH', PHP_INT_MAX);

/**
 * The bitmask of ZEND_ACC_PUBLIC | ZEND_ACC_PROTECTED | ZEND_ACC_PRIVATE
 */
define('ZEND_ACC_PPP_MASK', ZEND_ACC_PUBLIC|ZEND_ACC_PROTECTED|ZEND_ACC_PRIVATE);

/**
 * Adds non-existent method
 * @link  https://secure.php.net/manual/en/function.uopz-add-function.php
 * @param string $class The name of the class
 * @param string $function The name of the method
 * @param Closure $handler The Closure that defines the new method
 * @param int $flags Flags to set for the new method
 * @param bool $all Whether all classes that descend from class will also be affected
 * @return bool TRUE on success or FALSE on failure
 * @throws RuntimeException if the method to add already exists
 */
function uopz_add_function(...$arguments): bool {}

/**
 * Allows control over disabled exit opcode
 * @link https://secure.php.net/manual/en/function.uopz-allow-exit.php
 * @param bool $arguments Whether to allow the execution of exit opcodes or not.
 * @return void
 * @since 5.4
 */
function uopz_allow_exit(...$arguments): void {}

/**
 * Deletes previously added method
 * @link https://secure.php.net/manual/en/function.uopz-del-function.php
 * @param string $class The name of the class
 * @param string $function The name of the method
 * @param bool $all Whether all classes that descend from class will also be affected
 * @return bool TRUE on success or FALSE on failure
 * @throws RuntimeException if the method to delete has not been added by uopz_add_function()
 */
function uopz_del_function(...$arguments): bool {}

/**
 * Extend a class at runtime
 * @link https://secure.php.net/manual/en/function.uopz-extend.php
 * @param string $class The name of the class to extend
 * @param string $parent The name of the class to inherit
 * @return bool TRUE on success or FALSE on failure
 * @since 5.4
 */
function uopz_extend(...$arguments): bool {}

/**
 * Get or set flags on function or class
 * @link https://secure.php.net/manual/en/function.uopz-flags.php
 * @param string $class The name of a class
 * @param string $function The name of the function
 * @param int $flags A valid set of ZEND_ACC_ flags, ZEND_ACC_FETCH to read flags
 * @return int If setting, returns old flags, else returns flags
 * @since 5.4
 */
function uopz_flags(...$arguments): int {}

/**
 * Retrieve the last set exit status
 * @link https://secure.php.net/manual/en/function.uopz-get-exit-status.php
 * @return int|null The last exit status, or NULL if exit() has not been called
 * @since 5.4
 */
function uopz_get_exit_status(): ?int {}

/**
 * Gets previously set hook on method
 * @link https://secure.php.net/manual/en/function.uopz-get-hook.php
 * @param string $class The name of the class
 * @param string $function The name of the method
 * @return Closure|null The previously set hook, or NULL if no hook has been set
 */
function uopz_get_hook(...$arguments): ?Closure {}

/**
 * Get the current mock for a class
 * @link https://secure.php.net/manual/en/function.uopz-get-mock.php
 * @param string $arguments The name of the mocked class
 * @return string|object|null Either a string containing the name of the mock, or an object, or NULL if no mock has been set
 * @since 5.4
 */
function uopz_get_mock(...$arguments) {}

/**
 * Gets the value of a static class property, if class is given, or the value of an instance property, if instance is given
 * @link https://secure.php.net/manual/en/function.uopz-get-property.php
 * @param string|object $class The name of the class or the object instance
 * @param string $property The name of the property
 * @return mixed The value of the class or instance property, or NULL if the property is not defined
 */
function uopz_get_property(...$arguments) {}

/**
 * Gets a previous set return value for a function
 * @link https://secure.php.net/manual/en/function.uopz-get-return.php
 * @param string $class The name of the class containing the function
 * @param string $function The name of the function
 * @return mixed
 * @since 5.4
 */
function uopz_get_return(...$arguments) {}

/**
 * Gets the static variables from function or method scope
 * @link https://secure.php.net/manual/en/function.uopz-get-static.php
 * @param string $class The name of the class
 * @param string $function The name of the method
 * @return array|null An associative array of variable names mapped to their current values on success, or NULL if the method does not exist
 */
function uopz_get_static(...$arguments): ?array {}

/**
 * Implements an interface at runtime
 * @link https://secure.php.net/manual/en/function.uopz-implement.php
 * @param string $class The name of the class
 * @param string $interface The name of the interface
 * @return bool
 * @since 5.4
 */
function uopz_implement(...$arguments): bool {}

/**
 * Redefine a constant
 * @link https://secure.php.net/manual/en/function.uopz-redefine.php
 * @param string $class The name of the class containing the constant
 * @param string $constant The name of the constant
 * @param mixed $value The new value for the constant, must be a valid type for a constant variable
 * @return bool
 * @since 5.4
 */
function uopz_redefine(...$arguments): bool {}

/**
 * Sets hook to execute when entering a function or method
 * @link https://secure.php.net/manual/en/function.uopz-set-hook.php
 * @param string $class The name of the class
 * @param string $function The name of the method
 * @param Closure $hook A closure to execute when entering the method
 * @return bool TRUE on success or FALSE on failure
 */
function uopz_set_hook(...$arguments): bool {}

/**
 * Use mock instead of class for new objects
 * @link https://secure.php.net/manual/en/function.uopz-set-mock.php
 * @param string $class The name of the class to be mocked
 * @param string|object $mock The mock to use in the form of a string containing the name of the class to use or an object
 * @return void
 * @since 7.0
 */
function uopz_set_mock(...$arguments): void {}

/**
 * Sets the value of an existing static class property, if class is given, or the value of an existing instance property, if instance is given
 * @link https://secure.php.net/manual/en/function.uopz-set-property.php
 * @param string|object $class The name of the class or the object instance
 * @param string $property The name of the property
 * @param mixed $value The value to assign to the property
 * @return void
 */
function uopz_set_property(...$arguments): void {}

/**
 * Provide a return value for an existing function
 * @link https://secure.php.net/manual/en/function.uopz-set-return.php
 * @param string $class The name of the class containing the function
 * @param string $function The name of an existing function
 * @param mixed $value The value the function should return. If a Closure is provided and the execute flag is set, the Closure will be executed in place of the original function
 * @param bool $execute If true, and a Closure was provided as the value, the Closure will be executed in place of the original function.
 * @return bool
 * @since 7.0
 */
function uopz_set_return(...$arguments): bool {}

/**
 * Sets the static variables in function or method scope
 * @link https://secure.php.net/manual/en/function.uopz-set-static.php
 * @param string $class The name of the class
 * @param string $function The name of the method
 * @param array $static The associative array of variable names mapped to their values
 * @return void
 */
function uopz_set_static(...$arguments): void {}

/**
 * Undefine a constant
 * @link https://secure.php.net/manual/en/function.uopz-undefine.php
 * @param string $class The name of the class containing the constant
 * @param string $constant The name of the constant
 * @return bool
 * @since 5.4
 */
function uopz_undefine(...$arguments): bool {}

/**
 * Removes previously set hook on function or method
 * @link https://secure.php.net/manual/en/function.uopz-unset-hook.php
 * @param string $class The name of the class
 * @param string $function The name of the method
 * @return bool TRUE on success or FALSE on failure
 */
function uopz_unset_hook(...$arguments): bool {}

/**
 * Unset previously set mock
 * @link https://secure.php.net/manual/en/function.uopz-unset-mock.php
 * @param string $arguments The name of the mocked class
 * @return void
 * @since 7.0
 */
function uopz_unset_mock(...$arguments): void {}

/**
 * Unsets a previously set return value for a function
 * @link https://secure.php.net/manual/en/function.uopz-unset-return.php
 * @param string $class The name of the class containing the function
 * @param string $function The name of an existing function
 * @return bool
 * @since 7.0
 */
function uopz_unset_return(...$arguments): bool {}

function uopz_call_user_func(...$arguments) {}

function uopz_call_user_func_array(...$arguments) {}

// End of uopz v5.0.2
<?php

// Start of date v.5.3.2-0.dotdeb.1

define('DATE_ATOM', "Y-m-d\TH:i:sP");
define('DATE_COOKIE', "l, d-M-Y H:i:s T");

/**
 * This format is not compatible with ISO-8601, but is left this way for backward compatibility reasons.
 * Use DateTime::ATOM or DATE_ATOM for compatibility with ISO-8601 instead.
 * @deprecated
 */
define('DATE_ISO8601', "Y-m-d\TH:i:sO");
/** @since 8.2 */
define('DATE_ISO8601_EXPANDED', "X-m-d\\TH:i:sP");
define('DATE_RFC822', "D, d M y H:i:s O");
define('DATE_RFC850', "l, d-M-y H:i:s T");
define('DATE_RFC1036', "D, d M y H:i:s O");
define('DATE_RFC1123', "D, d M Y H:i:s O");
define('DATE_RFC2822', "D, d M Y H:i:s O");
define('DATE_RFC3339', "Y-m-d\TH:i:sP");
define('DATE_RFC3339_EXTENDED', "Y-m-d\TH:i:s.vP");
define('DATE_RFC7231', "D, d M Y H:i:s \G\M\T");
define('DATE_RSS', "D, d M Y H:i:s O");
define('DATE_W3C', "Y-m-d\TH:i:sP");

/**
 * Timestamp
 * @link https://php.net/manual/en/datetime.constants.php
 */
define('SUNFUNCS_RET_TIMESTAMP', 0);

/**
 * Hours:minutes (example: 08:02)
 * @link https://php.net/manual/en/datetime.constants.php
 */
define('SUNFUNCS_RET_STRING', 1);

/**
 * Hours as floating point number (example 8.75)
 * @link https://php.net/manual/en/datetime.constants.php
 */
define('SUNFUNCS_RET_DOUBLE', 2);

// End of date v.5.3.2-0.dotdeb.1
<?php

// Start of date v.5.3.2-0.dotdeb.1
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Pure;

/**
 * Parse about any English textual datetime description into a Unix timestamp
 * @link https://php.net/manual/en/function.strtotime.php
 * @param string $datetime <p>
 * The string to parse. Before PHP 5.0.0, microseconds weren't allowed in
 * the time, since PHP 5.0.0 they are allowed but ignored.
 * </p>
 * @param int|null $baseTimestamp [optional] <p>
 * Default value: null
 * The timestamp which is used as a base for the calculation of relative
 * dates.
 * </p>
 * @return int|false a timestamp on success, false otherwise. Previous to PHP 5.1.0,
 * this function would return -1 on failure.
 */
#[Pure(true)]
function strtotime(string $datetime, ?int $baseTimestamp): int|false {}

/**
 * Format a local time/date
 * @link https://php.net/manual/en/function.date.php
 * @param string $format <p>
 * The format of the outputted date string. See the formatting
 * options below. There are also several
 * predefined date constants
 * that may be used instead, so for example DATE_RSS
 * contains the format string 'D, d M Y H:i:s'.
 * </p>
 * <p>
 * <br>
 * The following characters are recognized in the
 * format parameter string:
 * <br><br>
 * <table>
 * <tr valign="top" colspan="3" bgcolor="silver">
 * <th>format character</th>
 * <th>Description</th>
 * <th>Example returned values</th>
 * </tr>
 * <tr valign="top">
 * <td><b>Day</b></td>
 * <td>---</td>
 * <td>---</td>
 * </tr>
 * <tr valign="top">
 * <td>d</td>
 * <td>Day of the month, 2 digits with leading zeros</td>
 * <td>01 to 31</td>
 * </tr>
 * <tr valign="top">
 * <td>D</td>
 * <td>A textual representation of a day, three letters</td>
 * <td>Mon through Sun</td>
 * </tr>
 * <tr valign="top">
 * <td>j</td>
 * <td>Day of the month without leading zeros</td>
 * <td>1 to 31</td>
 * </tr>
 * <tr valign="top">
 * <td>l (lowercase 'L')</td>
 * <td>A full textual representation of the day of the week</td>
 * <td>Sunday through Saturday</td>
 * </tr>
 * <tr valign="top">
 * <td>N</td>
 * <td>ISO-8601 numeric representation of the day of the week (added in
 * PHP 5.1.0)</td>
 * <td>1 (for Monday) through 7 (for Sunday)</td>
 * </tr>
 * <tr valign="top">
 * <td>S</td>
 * <td>English ordinal suffix for the day of the month, 2 characters</td>
 * <td>
 * st, nd, rd or
 * th. Works well with j
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>w</td>
 * <td>Numeric representation of the day of the week</td>
 * <td>0 (for Sunday) through 6 (for Saturday)</td>
 * </tr>
 * <tr valign="top">
 * <td>z</td>
 * <td>The day of the year (starting from 0)</td>
 * <td>0 through 365</td>
 * </tr>
 * <tr valign="top">
 * <td><b>Week</b></td>
 * <td>---</td>
 * <td>---</td>
 * </tr>
 * <tr valign="top">
 * <td>W</td>
 * <td>ISO-8601 week number of year, weeks starting on Monday (added in PHP 4.1.0)</td>
 * <td>Example: 42 (the 42nd week in the year)</td>
 * </tr>
 * <tr valign="top">
 * <td><b>Month</b></td>
 * <td>---</td>
 * <td>---</td>
 * </tr>
 * <tr valign="top">
 * <td>F</td>
 * <td>A full textual representation of a month, such as January or March</td>
 * <td>January through December</td>
 * </tr>
 * <tr valign="top">
 * <td>m</td>
 * <td>Numeric representation of a month, with leading zeros</td>
 * <td>01 through 12</td>
 * </tr>
 * <tr valign="top">
 * <td>M</td>
 * <td>A short textual representation of a month, three letters</td>
 * <td>Jan through Dec</td>
 * </tr>
 * <tr valign="top">
 * <td>n</td>
 * <td>Numeric representation of a month, without leading zeros</td>
 * <td>1 through 12</td>
 * </tr>
 * <tr valign="top">
 * <td>t</td>
 * <td>Number of days in the given month</td>
 * <td>28 through 31</td>
 * </tr>
 * <tr valign="top">
 * <td><b>Year</b></td>
 * <td>---</td>
 * <td>---</td>
 * </tr>
 * <tr valign="top">
 * <td>L</td>
 * <td>Whether it's a leap year</td>
 * <td>1 if it is a leap year, 0 otherwise.</td>
 * </tr>
 * <tr valign="top">
 * <td>o</td>
 * <td>ISO-8601 year number. This has the same value as
 * Y, except that if the ISO week number
 * (W) belongs to the previous or next year, that year
 * is used instead. (added in PHP 5.1.0)</td>
 * <td>Examples: 1999 or 2003</td>
 * </tr>
 * <tr valign="top">
 * <td>Y</td>
 * <td>A full numeric representation of a year, 4 digits</td>
 * <td>Examples: 1999 or 2003</td>
 * </tr>
 * <tr valign="top">
 * <td>y</td>
 * <td>A two digit representation of a year</td>
 * <td>Examples: 99 or 03</td>
 * </tr>
 * <tr valign="top">
 * <td><b>Time</b></td>
 * <td>---</td>
 * <td>---</td>
 * </tr>
 * <tr valign="top">
 * <td>a</td>
 * <td>Lowercase Ante meridiem and Post meridiem</td>
 * <td>am or pm</td>
 * </tr>
 * <tr valign="top">
 * <td>A</td>
 * <td>Uppercase Ante meridiem and Post meridiem</td>
 * <td>AM or PM</td>
 * </tr>
 * <tr valign="top">
 * <td>B</td>
 * <td>Swatch Internet time</td>
 * <td>000 through 999</td>
 * </tr>
 * <tr valign="top">
 * <td>g</td>
 * <td>12-hour format of an hour without leading zeros</td>
 * <td>1 through 12</td>
 * </tr>
 * <tr valign="top">
 * <td>G</td>
 * <td>24-hour format of an hour without leading zeros</td>
 * <td>0 through 23</td>
 * </tr>
 * <tr valign="top">
 * <td>h</td>
 * <td>12-hour format of an hour with leading zeros</td>
 * <td>01 through 12</td>
 * </tr>
 * <tr valign="top">
 * <td>H</td>
 * <td>24-hour format of an hour with leading zeros</td>
 * <td>00 through 23</td>
 * </tr>
 * <tr valign="top">
 * <td>i</td>
 * <td>Minutes with leading zeros</td>
 * <td>00 to 59</td>
 * </tr>
 * <tr valign="top">
 * <td>s</td>
 * <td>Seconds, with leading zeros</td>
 * <td>00 through 59</td>
 * </tr>
 * <tr valign="top">
 * <td>u</td>
 * <td>Microseconds (added in PHP 5.2.2)</td>
 * <td>Example: 654321</td>
 * </tr>
 * <tr valign="top">
 * <td><b>Timezone</b></td>
 * <td>---</td>
 * <td>---</td>
 * </tr>
 * <tr valign="top">
 * <td>e</td>
 * <td>Timezone identifier (added in PHP 5.1.0)</td>
 * <td>Examples: UTC, GMT, Atlantic/Azores</td>
 * </tr>
 * <tr valign="top">
 * <td>I (capital i)</td>
 * <td>Whether or not the date is in daylight saving time</td>
 * <td>1 if Daylight Saving Time, 0 otherwise.</td>
 * </tr>
 * <tr valign="top">
 * <td>O</td>
 * <td>Difference to Greenwich time (GMT) in hours</td>
 * <td>Example: +0200</td>
 * </tr>
 * <tr valign="top">
 * <td>P</td>
 * <td>Difference to Greenwich time (GMT) with colon between hours and minutes (added in PHP 5.1.3)</td>
 * <td>Example: +02:00</td>
 * </tr>
 * <tr valign="top">
 * <td>T</td>
 * <td>Timezone abbreviation</td>
 * <td>Examples: EST, MDT ...</td>
 * </tr>
 * <tr valign="top">
 * <td>Z</td>
 * <td>Timezone offset in seconds. The offset for timezones west of UTC is always
 * negative, and for those east of UTC is always positive.</td>
 * <td>-43200 through 50400</td>
 * </tr>
 * <tr valign="top">
 * <td><b>Full Date/Time</b></td>
 * <td>---</td>
 * <td>---</td>
 * </tr>
 * <tr valign="top">
 * <td>c</td>
 * <td>ISO 8601 date (added in PHP 5)</td>
 * <td>2004-02-12T15:19:21+00:00</td>
 * </tr>
 * <tr valign="top">
 * <td>r</td>
 * <td>RFC 2822 formatted date</td>
 * <td>Example: Thu, 21 Dec 2000 16:01:07 +0200</td>
 * </tr>
 * <tr valign="top">
 * <td>U</td>
 * <td>Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)</td>
 * <td>See also time</td>
 * </tr>
 * </table>
 * </p>
 * <p>
 * Unrecognized characters in the format string will be printed
 * as-is. The Z format will always return
 * 0 when using gmdate.
 * </p>
 * <p>
 * Since this function only accepts integer timestamps the
 * u format character is only useful when using the
 * date_format function with user based timestamps
 * created with date_create.
 * </p>
 * @param int|null $timestamp [optional] Default value: time(). The optional timestamp parameter is an integer Unix timestamp
 * that defaults to the current local time if a timestamp is not given.
 * @return string|false a formatted date string. If a non-numeric value is used for
 * timestamp, false is returned and an
 * E_WARNING level error is emitted.
 */
#[Pure(true)]
#[LanguageLevelTypeAware(["8.0" => "string"], default: "string|false")]
function date(string $format, ?int $timestamp) {}

/**
 * Format a local time/date as integer
 * @link https://php.net/manual/en/function.idate.php
 * @param string $format <p>
 * <table>
 * The following characters are recognized in the
 * format parameter string
 * <tr valign="top">
 * <td>format character</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>B</td>
 * <td>Swatch Beat/Internet Time</td>
 * </tr>
 * <tr valign="top">
 * <td>d</td>
 * <td>Day of the month</td>
 * </tr>
 * <tr valign="top">
 * <td>h</td>
 * <td>Hour (12 hour format)</td>
 * </tr>
 * <tr valign="top">
 * <td>H</td>
 * <td>Hour (24 hour format)</td>
 * </tr>
 * <tr valign="top">
 * <td>i</td>
 * <td>Minutes</td>
 * </tr>
 * <tr valign="top">
 * <td>I (uppercase i)</td>
 * <td>returns 1 if DST is activated,
 * 0 otherwise</td>
 * </tr>
 * <tr valign="top">
 * <td>L (uppercase l)</td>
 * <td>returns 1 for leap year,
 * 0 otherwise</td>
 * </tr>
 * <tr valign="top">
 * <td>m</td>
 * <td>Month number</td>
 * </tr>
 * <tr valign="top">
 * <td>s</td>
 * <td>Seconds</td>
 * </tr>
 * <tr valign="top">
 * <td>t</td>
 * <td>Days in current month</td>
 * </tr>
 * <tr valign="top">
 * <td>U</td>
 * <td>Seconds since the Unix Epoch - January 1 1970 00:00:00 UTC -
 * this is the same as time</td>
 * </tr>
 * <tr valign="top">
 * <td>w</td>
 * <td>Day of the week (0 on Sunday)</td>
 * </tr>
 * <tr valign="top">
 * <td>W</td>
 * <td>ISO-8601 week number of year, weeks starting on
 * Monday</td>
 * </tr>
 * <tr valign="top">
 * <td>y</td>
 * <td>Year (1 or 2 digits - check note below)</td>
 * </tr>
 * <tr valign="top">
 * <td>Y</td>
 * <td>Year (4 digits)</td>
 * </tr>
 * <tr valign="top">
 * <td>z</td>
 * <td>Day of the year</td>
 * </tr>
 * <tr valign="top">
 * <td>Z</td>
 * <td>Timezone offset in seconds</td>
 * </tr>
 * </table>
 * </p>
 * @param int|null $timestamp [optional]
 * @return int|false an integer.
 * <p>
 * As idate always returns an integer and
 * as they can't start with a "0", idate may return
 * fewer digits than you would expect. See the example below.
 * </p>
 */
#[Pure(true)]
function idate(string $format, ?int $timestamp): int|false {}

/**
 * Format a GMT/UTC date/time
 * @link https://php.net/manual/en/function.gmdate.php
 * @param string $format <p>
 * The format of the outputted date string. See the formatting
 * options for the date function.
 * </p>
 * @param int|null $timestamp [optional]
 * @return string|false a formatted date string. If a non-numeric value is used for
 * timestamp, false is returned and an
 * E_WARNING level error is emitted.
 */
#[Pure(true)]
#[LanguageLevelTypeAware(["8.0" => "string"], default: "string|false")]
function gmdate(string $format, ?int $timestamp) {}

/**
 * Get Unix timestamp for a date
 * @link https://php.net/manual/en/function.mktime.php
 * @param int $hour <p>
 * The number of the hour.
 * </p>
 * @param int|null $minute <p>
 * The number of the minute.
 * </p>
 * @param int|null $second <p>
 * The number of seconds past the minute.
 * </p>
 * @param int|null $month <p>
 * The number of the month.
 * </p>
 * @param int|null $day <p>
 * The number of the day.
 * </p>
 * @param int|null $year [optional] <p>
 * The number of the year, may be a two or four digit value,
 * with values between 0-69 mapping to 2000-2069 and 70-100 to
 * 1970-2000. On systems where time_t is a 32bit signed integer, as
 * most common today, the valid range for year
 * is somewhere between 1901 and 2038. However, before PHP 5.1.0 this
 * range was limited from 1970 to 2038 on some systems (e.g. Windows).
 * </p>
 * @param int $is_dst [optional] <p>
 * This parameter can be set to 1 if the time is during daylight savings time (DST),
 * 0 if it is not, or -1 (the default) if it is unknown whether the time is within
 * daylight savings time or not. If it's unknown, PHP tries to figure it out itself.
 * This can cause unexpected (but not incorrect) results.
 * Some times are invalid if DST is enabled on the system PHP is running on or
 * is_dst is set to 1. If DST is enabled in e.g. 2:00, all times
 * between 2:00 and 3:00 are invalid and mktime returns an undefined
 * (usually negative) value.
 * Some systems (e.g. Solaris 8) enable DST at midnight so time 0:30 of the day when DST
 * is enabled is evaluated as 23:30 of the previous day.
 * </p>
 * <p>
 * As of PHP 5.1.0, this parameter became deprecated. As a result, the
 * new timezone handling features should be used instead.
 * </p>
 * <p>
 * This parameter has been removed in PHP 7.0.0.
 * </p>
 * @return int|false mktime returns the Unix timestamp of the arguments
 * given.
 * If the arguments are invalid, the function returns false (before PHP 5.1
 * it returned -1).
 */
#[Pure(true)]
function mktime(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] int $hour = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] int $hour,
    ?int $minute = null,
    ?int $second = null,
    ?int $month = null,
    ?int $day = null,
    ?int $year = null,
    #[Deprecated('Use the new timezone handling functions instead', since: '5.3')]
    #[PhpStormStubsElementAvailable(from: '5.5', to: '5.6')] $is_dst = -1
): int|false {}

/**
 * Get Unix timestamp for a GMT date
 * @link https://php.net/manual/en/function.gmmktime.php
 * @param int $hour <p>
 * The hour
 * </p>
 * @param int $minute <p>
 * The minute
 * </p>
 * @param int $second <p>
 * The second
 * </p>
 * @param int $month <p>
 * The month
 * </p>
 * @param int $day <p>
 * The day
 * </p>
 * @param int $year <p>
 * The year
 * </p>
 * @param int $is_dst <p>
 * Parameters always represent a GMT date so is_dst
 * doesn't influence the result.
 * </p>
 * @return int|false a integer Unix timestamp.
 */
#[Pure(true)]
function gmmktime(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] int $hour = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] int $hour,
    ?int $minute = null,
    ?int $second = null,
    ?int $month = null,
    ?int $day = null,
    ?int $year = null,
    #[PhpStormStubsElementAvailable(from: '5.5', to: '5.6')] $is_dst = null
): int|false {}

/**
 * Validate a Gregorian date
 * @link https://php.net/manual/en/function.checkdate.php
 * @param int $month <p>
 * The month is between 1 and 12 inclusive.
 * </p>
 * @param int $day <p>
 * The day is within the allowed number of days for the given
 * month. Leap years
 * are taken into consideration.
 * </p>
 * @param int $year <p>
 * The year is between 1 and 32767 inclusive.
 * </p>
 * @return bool true if the date given is valid; otherwise returns false.
 */
#[Pure(true)]
function checkdate(int $month, int $day, int $year): bool {}

/**
 * Format a local time/date according to locale settings
 * The following characters are recognized in the
 * format parameter string
 * <table>
 * <tr valign="top" colspan="3" bgcolor="silver">
 * <th>format</th>
 * <th>Description</th>
 * <th>Example returned values</th>
 * <th>
 * Day</th>
 * </tr>
 * <tr valign="top">
 * <td>%a</td>
 * <td>An abbreviated textual representation of the day</td>
 * <td>Sun through Sat</td>
 * </tr>
 * <tr valign="top">
 * <td>%A</td>
 * <td>A full textual representation of the day</td>
 * <td>Sunday through Saturday</td>
 * </tr>
 * <tr valign="top">
 * <td>%d</td>
 * <td>Two-digit day of the month (with leading zeros)</td>
 * <td>01 to 31</td>
 * </tr>
 * <tr valign="top">
 * <td>%e</td>
 * <td>Day of the month, with a space preceding single digits</td>
 * <td> 1 to 31</td>
 * </tr>
 * <tr valign="top">
 * <td>%j</td>
 * <td>Day of the year, 3 digits with leading zeros</td>
 * <td>001 to 366</td>
 * </tr>
 * <tr valign="top">
 * <td>%u</td>
 * <td>ISO-8601 numeric representation of the day of the week</td>
 * <td>1 (for Monday) though 7 (for Sunday)</td>
 * </tr>
 * <tr valign="top">
 * <td>%w</td>
 * <td>Numeric representation of the day of the week</td>
 * <td>0 (for Sunday) through 6 (for Saturday)</td>
 * </tr>
 * <tr valign="top">
 * <th colspan="3" bgcolor="silver">Week</th>
 * </tr>
 * <tr valign="top">
 * <td>%U</td>
 * <td>Week number of the given year, starting with the first
 * Sunday as the first week</td>
 * <td>13 (for the 13th full week of the year)</td>
 * </tr>
 * <tr valign="top">
 * <td>%V</td>
 * <td>ISO-8601:1988 week number of the given year, starting with
 * the first week of the year with at least 4 weekdays, with Monday
 * being the start of the week</td>
 * <td>01 through 53 (where 53
 * accounts for an overlapping week)</td>
 * </tr>
 * <tr valign="top">
 * <td>%W</td>
 * <td>A numeric representation of the week of the year, starting
 * with the first Monday as the first week</td>
 * <td>46 (for the 46th week of the year beginning
 * with a Monday)</td>
 * </tr>
 * <tr valign="top">
 * <th colspan="3" bgcolor="silver">Month</th>
 * </tr>
 * <tr valign="top">
 * <td>%b</td>
 * <td>Abbreviated month name, based on the locale</td>
 * <td>Jan through Dec</td>
 * </tr>
 * <tr valign="top">
 * <td>%B</td>
 * <td>Full month name, based on the locale</td>
 * <td>January through December</td>
 * </tr>
 * <tr valign="top">
 * <td>%h</td>
 * <td>Abbreviated month name, based on the locale (an alias of %b)</td>
 * <td>Jan through Dec</td>
 * </tr>
 * <tr valign="top">
 * <td>%m</td>
 * <td>Two digit representation of the month</td>
 * <td>01 (for January) through 12 (for December)</td>
 * </tr>
 * <tr valign="top">
 * <th colspan="3" bgcolor="silver">Year</th>
 * </tr>
 * <tr valign="top">
 * <td>%C</td>
 * <td>Two digit representation of the century (year divided by 100, truncated to an integer)</td>
 * <td>19 for the 20th Century</td>
 * </tr>
 * <tr valign="top">
 * <td>%g</td>
 * <td>Two digit representation of the year going by ISO-8601:1988 standards (see %V)</td>
 * <td>Example: 09 for the week of January 6, 2009</td>
 * </tr>
 * <tr valign="top">
 * <td>%G</td>
 * <td>The full four-digit version of %g</td>
 * <td>Example: 2008 for the week of January 3, 2009</td>
 * </tr>
 * <tr valign="top">
 * <td>%y</td>
 * <td>Two digit representation of the year</td>
 * <td>Example: 09 for 2009, 79 for 1979</td>
 * </tr>
 * <tr valign="top">
 * <td>%Y</td>
 * <td>Four digit representation for the year</td>
 * <td>Example: 2038</td>
 * </tr>
 * <tr valign="top">
 * <th colspan="3" bgcolor="silver">Time</th>
 * </tr>
 * <tr valign="top">
 * <td>%H</td>
 * <td>Two digit representation of the hour in 24-hour format</td>
 * <td>00 through 23</td>
 * </tr>
 * <tr valign="top">
 * <td>%I</td>
 * <td>Two digit representation of the hour in 12-hour format</td>
 * <td>01 through 12</td>
 * </tr>
 * <tr valign="top">
 * <td>%l (lower-case 'L')</td>
 * <td>Hour in 12-hour format, with a space preceding single digits</td>
 * <td> 1 through 12</td>
 * </tr>
 * <tr valign="top">
 * <td>%M</td>
 * <td>Two digit representation of the minute</td>
 * <td>00 through 59</td>
 * </tr>
 * <tr valign="top">
 * <td>%p</td>
 * <td>UPPER-CASE 'AM' or 'PM' based on the given time</td>
 * <td>Example: AM for 00:31, PM for 22:23</td>
 * </tr>
 * <tr valign="top">
 * <td>%P</td>
 * <td>lower-case 'am' or 'pm' based on the given time</td>
 * <td>Example: am for 00:31, pm for 22:23</td>
 * </tr>
 * <tr valign="top">
 * <td>%r</td>
 * <td>Same as "%I:%M:%S %p"</td>
 * <td>Example: 09:34:17 PM for 21:34:17</td>
 * </tr>
 * <tr valign="top">
 * <td>%R</td>
 * <td>Same as "%H:%M"</td>
 * <td>Example: 00:35 for 12:35 AM, 16:44 for 4:44 PM</td>
 * </tr>
 * <tr valign="top">
 * <td>%S</td>
 * <td>Two digit representation of the second</td>
 * <td>00 through 59</td>
 * </tr>
 * <tr valign="top">
 * <td>%T</td>
 * <td>Same as "%H:%M:%S"</td>
 * <td>Example: 21:34:17 for 09:34:17 PM</td>
 * </tr>
 * <tr valign="top">
 * <td>%X</td>
 * <td>Preferred time representation based on locale, without the date</td>
 * <td>Example: 03:59:16 or 15:59:16</td>
 * </tr>
 * <tr valign="top">
 * <td>%z</td>
 * <td>Either the time zone offset from UTC or the abbreviation (depends
 * on operating system)</td>
 * <td>Example: -0500 or EST for Eastern Time</td>
 * </tr>
 * <tr valign="top">
 * <td>%Z</td>
 * <td>The time zone offset/abbreviation option NOT given by %z (depends
 * on operating system)</td>
 * <td>Example: -0500 or EST for Eastern Time</td>
 * </tr>
 * <tr valign="top">
 * <th colspan="3" bgcolor="silver">Time and Date Stamps</th>
 * </tr>
 * <tr valign="top">
 * <td>%c</td>
 * <td>Preferred date and time stamp based on local</td>
 * <td>Example: Tue Feb 5 00:45:10 2009 for
 * February 4, 2009 at 12:45:10 AM</td>
 * </tr>
 * <tr valign="top">
 * <td>%D</td>
 * <td>Same as "%m/%d/%y"</td>
 * <td>Example: 02/05/09 for February 5, 2009</td>
 * </tr>
 * <tr valign="top">
 * <td>%F</td>
 * <td>Same as "%Y-%m-%d" (commonly used in database datestamps)</td>
 * <td>Example: 2009-02-05 for February 5, 2009</td>
 * </tr>
 * <tr valign="top">
 * <td>%s</td>
 * <td>Unix Epoch Time timestamp (same as the time
 * function)</td>
 * <td>Example: 305815200 for September 10, 1979 08:40:00 AM</td>
 * </tr>
 * <tr valign="top">
 * <td>%x</td>
 * <td>Preferred date representation based on locale, without the time</td>
 * <td>Example: 02/05/09 for February 5, 2009</td>
 * </tr>
 * <tr valign="top">
 * <th colspan="3" bgcolor="silver">Miscellaneous</th>
 * </tr>
 * <tr valign="top">
 * <td>%n</td>
 * <td>A newline character ("\n")</td>
 * <td>---</td>
 * </tr>
 * <tr valign="top">
 * <td>%t</td>
 * <td>A Tab character ("\t")</td>
 * <td>---</td>
 * </tr>
 * <tr valign="top">
 * <td>%%</td>
 * <td>A literal percentage character ("%")</td>
 * <td>---</td>
 * </tr>
 * </table>
 * <p>
 * Maximum length of this parameter is 1023 characters.
 * </p>
 * Contrary to ISO-9899:1999, Sun Solaris starts with Sunday as 1.
 * As a result, %u may not function as described in this manual.
 * @link https://php.net/manual/en/function.strftime.php
 * @param string $format
 * @param int|null $timestamp [optional] defaults to the value of time()
 * Unix timestamp that defaults to the current local time if a timestamp is not given..
 * @return string|false a string formatted according format
 * using the given timestamp or the current
 * local time if no timestamp is given. Month and weekday names and
 * other language-dependent strings respect the current locale set
 * with setlocale.
 * @deprecated 8.1
 */
#[Deprecated(since: '8.1')]
function strftime(string $format, ?int $timestamp): string|false {}

/**
 * Format a GMT/UTC time/date according to locale settings
 * @link https://php.net/manual/en/function.gmstrftime.php
 * @param string $format <p>
 * See description in strftime.
 * </p>
 * @param int|null $timestamp [optional]
 * @return string|false a string formatted according to the given format string
 * using the given timestamp or the current
 * local time if no timestamp is given. Month and weekday names and
 * other language dependent strings respect the current locale set
 * with setlocale.
 * @deprecated 8.1
 */
#[Deprecated(since: '8.1')]
function gmstrftime(string $format, ?int $timestamp): string|false {}

/**
 * Return current Unix timestamp
 * @link https://php.net/manual/en/function.time.php
 * @return int <p>Returns the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT).</p>
 */
function time(): int {}

/**
 * Get the local time
 * @link https://php.net/manual/en/function.localtime.php
 * @param int|null $timestamp [optional]
 * @param bool $associative [optional] <p>
 * If set to false or not supplied then the array is returned as a regular,
 * numerically indexed array. If the argument is set to true then
 * localtime returns an associative array containing
 * all the different elements of the structure returned by the C
 * function call to localtime. The names of the different keys of
 * the associative array are as follows:
 * </p>
 * "tm_sec" - seconds
 * @return array
 */
#[Pure(true)]
#[ArrayShape([
    'tm_sec' => 'int',
    'tm_min' => 'int',
    'tm_hour' => 'int',
    'tm_mday' => 'int',
    'tm_mon' => 'int',
    'tm_year' => 'int',
    'tm_wday' => 'int',
    'tm_yday' => 'int',
    'tm_isdst' => 'int',
])]
function localtime(?int $timestamp, bool $associative = false): array {}

/**
 * Get date/time information
 * @link https://php.net/manual/en/function.getdate.php
 * @param int|null $timestamp [optional]
 * @return array an associative array of information related to
 * the timestamp. Elements from the returned
 * associative array are as follows:
 * </p>
 * <p>
 * <table>
 * Key elements of the returned associative array
 * <tr valign="top">
 * <td>Key</td>
 * <td>Description</td>
 * <td>Example returned values</td>
 * </tr>
 * <tr valign="top">
 * <td>"seconds"</td>
 * <td>Numeric representation of seconds</td>
 * <td>0 to 59</td>
 * </tr>
 * <tr valign="top">
 * <td>"minutes"</td>
 * <td>Numeric representation of minutes</td>
 * <td>0 to 59</td>
 * </tr>
 * <tr valign="top">
 * <td>"hours"</td>
 * <td>Numeric representation of hours</td>
 * <td>0 to 23</td>
 * </tr>
 * <tr valign="top">
 * <td>"mday"</td>
 * <td>Numeric representation of the day of the month</td>
 * <td>1 to 31</td>
 * </tr>
 * <tr valign="top">
 * <td>"wday"</td>
 * <td>Numeric representation of the day of the week</td>
 * <td>0 (for Sunday) through 6 (for Saturday)</td>
 * </tr>
 * <tr valign="top">
 * <td>"mon"</td>
 * <td>Numeric representation of a month</td>
 * <td>1 through 12</td>
 * </tr>
 * <tr valign="top">
 * <td>"year"</td>
 * <td>A full numeric representation of a year, 4 digits</td>
 * <td>Examples: 1999 or 2003</td>
 * </tr>
 * <tr valign="top">
 * <td>"yday"</td>
 * <td>Numeric representation of the day of the year</td>
 * <td>0 through 365</td>
 * </tr>
 * <tr valign="top">
 * <td>"weekday"</td>
 * <td>A full textual representation of the day of the week</td>
 * <td>Sunday through Saturday</td>
 * </tr>
 * <tr valign="top">
 * <td>"month"</td>
 * <td>A full textual representation of a month, such as January or March</td>
 * <td>January through December</td>
 * </tr>
 * <tr valign="top">
 * <td>0</td>
 * <td>
 * Seconds since the Unix Epoch, similar to the values returned by
 * time and used by date.
 * </td>
 * <td>
 * System Dependent, typically -2147483648 through
 * 2147483647.
 * </td>
 * </tr>
 * </table>
 */
#[Pure(true)]
#[ArrayShape([
    'seconds' => 'int',
    'minutes' => 'int',
    'hours' => 'int',
    'mday' => 'int',
    'wday' => 'int',
    'mon' => 'int',
    'year' => 'int',
    'yday' => 'int',
    'weekday' => 'int',
    'month' => 'string',
    0 => 'int',
])]
function getdate(?int $timestamp): array {}

/**
 * Returns new DateTime object
 * @link https://php.net/manual/en/function.date-create.php
 * @param string $datetime [optional] <p>
 * String in a format accepted by strtotime.
 * </p>
 * @param DateTimeZone|null $timezone [optional] <p>
 * Time zone of the time.
 * </p>
 * @return DateTime|false DateTime object on success or false on failure.
 */
#[Pure(true)]
function date_create(string $datetime = 'now', ?DateTimeZone $timezone): DateTime|false {}

/**
 * (PHP 5.5)<br/>
 * Alias:
 * {@see DateTimeImmutable::__construct}
 * Returns new DateTimeImmutable object
 * @link https://php.net/manual/en/function.date-create-immutable.php
 * @see DateTimeImmutable::__construct()
 * @param string $datetime [optional] <p>
 * String in a format accepted by strtotime.
 * </p>
 * @param DateTimeZone|null $timezone [optional] <p>
 * Time zone of the time.
 * </p>
 * @return DateTimeImmutable|false DateTime object on success or false on failure.
 */
#[Pure(true)]
function date_create_immutable(string $datetime = 'now', ?DateTimeZone $timezone): DateTimeImmutable|false {}

/**
 * Returns new DateTimeImmutable object formatted according to the specified format
 * @link https://php.net/manual/en/function.date-create-immutable-from-format.php
 * @param string $format
 * @param string $datetime
 * @param DateTimeZone|null $timezone [optional]
 * @return DateTimeImmutable|false
 */
#[Pure(true)]
function date_create_immutable_from_format(string $format, string $datetime, ?DateTimeZone $timezone): DateTimeImmutable|false {}

/**
 * Alias:
 * {@see DateTime::createFromFormat}
 * @link https://php.net/manual/en/function.date-create-from-format.php
 * @param string $format Format accepted by  <a href="https://secure.php.net/manual/en/function.date.php">date()</a>.
 * <p>If format does not contain the character ! then portions of the generated time which are not specified in format will be set to the current system time.</p>
 * <p>If format contains the character !, then portions of the generated time not provided in format, as well as values to the left-hand side of the !, will be set to corresponding values from the Unix epoch.</p>
 * <p>The Unix epoch is 1970-01-01 00:00:00 UTC.</p>
 * @param string $datetime String representing the time.
 * @param DateTimeZone|null $timezone [optional] A DateTimeZone object representing the desired time zone.
 * @return DateTime|false <p> Returns a new
 * {@see DateTime} instance or <b>FALSE</b> on failure.</p>
 */
#[Pure(true)]
function date_create_from_format(string $format, string $datetime, ?DateTimeZone $timezone): DateTime|false {}

/**
 * Returns associative array with detailed info about given date
 * @link https://php.net/manual/en/function.date-parse.php
 * @param string $datetime <p>
 * Date in format accepted by strtotime.
 * </p>
 * @return array|false array with information about the parsed date
 * on success or false on failure.
 */
#[Pure(true)]
#[LanguageLevelTypeAware(["8.0" => "array"], default: "array|false")]
#[ArrayShape([
    "year" => "int",
    "month" => "int",
    "day" => "int",
    "hour" => "int",
    "minute" => "int",
    "second" => "int",
    "fraction" => "double",
    "is_localtime" => "bool",
    "zone_type" => "int",
    "zone" => "int",
    "is_dst" => "bool",
    "tz_abbr" => "string",
    "tz_id" => "string",
    "relative" => "array",
    "warning_count" => "int",
    "warnings" => "array",
    "error_count" => "int",
    "errors" => "array"
])]
function date_parse(string $datetime): false|array {}

/**
 * Get info about given date formatted according to the specified format
 * @link https://php.net/manual/en/function.date-parse-from-format.php
 * @param string $format <p>
 * Format accepted by date with some extras.
 * </p>
 * @param string $datetime <p>
 * String representing the date.
 * </p>
 * @return array associative array with detailed info about given date.
 */
#[Pure(true)]
#[ArrayShape([
    'year' => 'int',
    'month' => 'int',
    'day' => 'int',
    'hour' => 'int',
    'minute' => 'int',
    'second' => 'int',
    'fraction' => 'double',
    'is_localtime' => 'bool',
    'zone_type' => 'int',
    'zone' => 'int',
    'is_dst' => 'bool',
    'tz_abbr' => 'string',
    'tz_id' => 'string',
    'relative' => 'array',
    'warning_count' => 'int',
    'warnings' => 'array',
    'error_count' => 'int',
    'errors' => 'array'
])]
function date_parse_from_format(string $format, string $datetime): array {}

/**
 * Returns the warnings and errors
 * Alias:
 * {@see DateTime::getLastErrors}
 * @link https://php.net/manual/en/function.date-get-last-errors.php
 * @return array|false <p>Returns array containing info about warnings and errors.</p>
 */
#[ArrayShape(["warning_count" => "int", "warnings" => "string[]", "error_count" => "int", "errors" => "string[]"])]
#[Pure(true)]
function date_get_last_errors(): array|false {}

/**
 * Alias:
 * {@see DateTime::format}
 * @link https://php.net/manual/en/function.date-format.php
 * @param DateTimeInterface $object
 * @param string $format
 * @return string|false formatted date string on success or <b>FALSE</b> on failure.
 */
#[Pure(true)]
#[LanguageLevelTypeAware(["8.0" => "string"], default: "string|false")]
function date_format(DateTimeInterface $object, string $format) {}

/**
 * Alter the timestamp of a DateTime object by incrementing or decrementing
 * in a format accepted by strtotime().
 * Alias:
 * {@see DateTime::modify}
 * @link https://php.net/manual/en/function.date-modify.php
 * @param DateTime $object A DateTime object returned by date_create(). The function modifies this object.
 * @param string $modifier A date/time string. Valid formats are explained in {@link https://secure.php.net/manual/en/datetime.formats.php Date and Time Formats}.
 * @return DateTime|false Returns the DateTime object for method chaining or <b>FALSE</b> on failure.
 */
function date_modify(DateTime $object, string $modifier): DateTime|false {}

/**
 * Alias:
 * {@see DateTime::add}
 * @link https://php.net/manual/en/function.date-add.php
 * @param DateTime $object <p>Procedural style only: A
 * {@see DateTime} object returned by
 * {@see date_create()}. The function modifies this object.</p>
 * @param DateInterval $interval <p>A
 * {@see DateInterval} object</p>
 * @return DateTime|false <p>Returns the
 * {@see DateTime} object for method chaining or <b>FALSE</b> on failure.</p>
 */
#[LanguageLevelTypeAware(["8.0" => "DateTime"], default: "DateTime|false")]
function date_add(DateTime $object, DateInterval $interval) {}

/**
 * Subtracts an amount of days, months, years, hours, minutes and seconds from a datetime object
 * Alias:
 * {@see DateTime::sub}
 * @link https://php.net/manual/en/function.date-sub.php
 * @param DateTime $object Procedural style only: A
 * {@see DateTime} object returned by
 * {@see date_create()}. The function modifies this object.
 * @param DateInterval $interval <p>A
 * {@see DateInterval} object</p>
 * @return DateTime|false <p>Returns the
 * {@see DateTime} object for method chaining or <b>FALSE</b> on failure.</p>
 */
#[LanguageLevelTypeAware(["8.0" => "DateTime"], default: "DateTime|false")]
function date_sub(DateTime $object, DateInterval $interval) {}

/**
 * Alias:
 * {@see DateTime::getTimezone}
 * @link https://php.net/manual/en/function.date-timezone-get.php
 * @param DateTimeInterface $object <p>Procedural style only: A
 * {@see DateTime} object
 * returned by
 * {@see date_create()}</p>
 * @return DateTimeZone|false
 * <p>
 * Returns a
 * {@see DateTimeZone} object on success
 * or <b>FALSE</b> on failure.
 * </p>
 */
#[Pure(true)]
function date_timezone_get(DateTimeInterface $object): DateTimeZone|false {}

/**
 * Sets the time zone for the datetime object
 * Alias:
 * {@see DateTime::setTimezone}
 * @link https://php.net/manual/en/function.date-timezone-set.php
 * @param DateTime|DateTimeInterface $object <p>A
 * {@see DateTime} object returned by
 * {@see date_create()}. The function modifies this object.</p>
 * @param DateTimeZone $timezone <p>A
 * {@see DateTimeZone} object representing the desired time zone.</p>
 * @return DateTime|false <p>Returns the
 * {@see DateTime} object for method chaining or <b>FALSE</b> on failure.</p>
 */
#[LanguageLevelTypeAware(["8.0" => "DateTime"], default: "DateTime|false")]
function date_timezone_set(#[LanguageLevelTypeAware(["8.0" => "DateTime"], default: "DateTimeInterface")] $object, DateTimeZone $timezone) {}

/**
 * Alias:
 * {@see DateTime::getOffset}
 * @link https://php.net/manual/en/function.date-offset-get.php
 * @param DateTimeInterface $object <p>Procedural style only: A {@see DateTime} object
 * returned by {@see date_create()}</p>
 * @return int|false <p>Returns the timezone offset in seconds from UTC on success or <b>FALSE</b> on failure.</p>
 */
#[Pure(true)]
#[LanguageLevelTypeAware(["8.0" => "int"], default: "int|false")]
function date_offset_get(DateTimeInterface $object) {}

/**
 * Returns the difference between two datetime objects
 * Alias:
 * {@see DateTime::diff}
 * @link https://php.net/manual/en/function.date-diff.php
 * @param DateTimeInterface $baseObject
 * @param DateTimeInterface $targetObject The date to compare to
 * @param bool $absolute [optional] Whether to return absolute difference.
 * @return DateInterval|false The DateInterval object representing the difference between the two dates or FALSE on failure.
 */
#[Pure(true)]
#[LanguageLevelTypeAware(["8.0" => "DateInterval"], default: "DateInterval|false")]
function date_diff(DateTimeInterface $baseObject, DateTimeInterface $targetObject, bool $absolute = false) {}

/**
 * Alias:
 * {@see DateTime::setTime}
 * @link https://php.net/manual/en/function.date-time-set.php
 * @param DateTime $object
 * @param int $hour
 * @param int $minute
 * @param int $second [optional]
 * @param int $microsecond [optional]
 * @return DateTime <p>Returns the
 * {@see DateTime} object for method chaining or <b>FALSE</b> on failure.</p>
 */
function date_time_set(
    DateTime $object,
    int $hour,
    int $minute,
    int $second = 0,
    #[PhpStormStubsElementAvailable(from: '7.1')] int $microsecond = 0
): DateTime {}

/**
 * Alias:
 * {@see DateTime::setDate}
 * @link https://php.net/manual/en/function.date-date-set.php
 * @param DateTime $object <p>Procedural style only: A {@see DateTime} object
 * returned by {@see date_create()}.
 * The function modifies this object.</p>
 * @param int $year <p>Year of the date.</p>
 * @param int $month <p>Month of the date.</p>
 * @param int $day <p>Day of the date.</p>
 * @return DateTime|false
 * <p>
 * Returns the
 * {@see DateTime} object for method chaining or <b>FALSE</b> on failure.
 * </p>
 */
#[LanguageLevelTypeAware(["8.0" => "DateTime"], default: "DateTime|false")]
function date_date_set(DateTime $object, int $year, int $month, int $day): DateTime|false {}

/**
 * Alias:
 * {@see DateTime::setISODate}
 * @link https://php.net/manual/en/function.date-isodate-set.php
 * @param DateTime $object
 * @param int $year <p>Year of the date</p>
 * @param int $week <p>Week of the date.</p>
 * @param int $dayOfWeek [optional] <p>Offset from the first day of the week.</p>
 * @return DateTime|false <p>
 * Returns the {@see DateTime} object for method chaining or <strong><code>FALSE</code></strong> on failure.
 * </p>
 */
#[LanguageLevelTypeAware(["8.0" => "DateTime"], default: "DateTime|false")]
function date_isodate_set(DateTime $object, int $year, int $week, int $dayOfWeek = 1) {}

/**
 * Sets the date and time based on an unix timestamp
 * Alias:
 * {@see DateTime::setTimestamp}
 * @link https://php.net/manual/en/function.date-timestamp-set.php
 * @param DateTime $object <p>Procedural style only: A
 * {@see DateTime} object returned by
 * {@see date_create()}. The function modifies this object.</p>
 * @param int $timestamp <p>Unix timestamp representing the date.</p>
 * @return DateTime|false
 * {@see DateTime} object for call chaining or <b>FALSE</b> on failure
 */
#[LanguageLevelTypeAware(["8.0" => "DateTime"], default: "DateTime|false")]
function date_timestamp_set(DateTime $object, int $timestamp): DateTime|false {}

/**
 * Gets the unix timestamp
 * Alias:
 * {@see DateTime::getTimestamp}
 * @link https://php.net/manual/en/function.date-timestamp-get.php
 * @param DateTimeInterface $object
 * @return int <p>Returns the Unix timestamp representing the date.</p>
 */
#[Pure(true)]
function date_timestamp_get(DateTimeInterface $object): int {}

/**
 * Returns new DateTimeZone object
 * @link https://php.net/manual/en/function.timezone-open.php
 * @param string $timezone <p>
 * Time zone identifier as full name (e.g. Europe/Prague) or abbreviation
 * (e.g. CET).
 * </p>
 * @return DateTimeZone|false DateTimeZone object on success or false on failure.
 */
#[Pure(true)]
function timezone_open(string $timezone): DateTimeZone|false {}

/**
 * Alias:
 * {@see DateTimeZone::getName}
 * @link https://php.net/manual/en/function.timezone-name-get.php
 * @param DateTimeZone $object <p>The
 * {@see DateTimeZone} for which to get a name.</p>
 * @return string One of the timezone names in the list of timezones.
 */
#[Pure]
function timezone_name_get(DateTimeZone $object): string {}

/**
 * Returns the timezone name from abbreviation
 * @link https://php.net/manual/en/function.timezone-name-from-abbr.php
 * @param string $abbr <p>
 * Time zone abbreviation.
 * </p>
 * @param int $utcOffset [optional] <p>
 * Offset from GMT in seconds. Defaults to -1 which means that first found
 * time zone corresponding to abbr is returned.
 * Otherwise exact offset is searched and only if not found then the first
 * time zone with any offset is returned.
 * </p>
 * @param int $isDST [optional] <p>
 * Daylight saving time indicator. If abbr doesn't
 * exist then the time zone is searched solely by
 * offset and isdst.
 * </p>
 * @return string|false time zone name on success or false on failure.
 * @since 5.1.3
 */
#[Pure(true)]
function timezone_name_from_abbr(string $abbr, int $utcOffset = -1, int $isDST = -1): string|false {}

/**
 * Alias:
 * {@link DateTimeZone::getOffset}
 * @link https://php.net/manual/en/function.timezone-offset-get.php
 * @param DateTimeZone $object <p>Procedural style only: A
 * {@see DateTimeZone} object
 * returned by
 * {@see timezone_open()}</p>
 * @param DateTimeInterface $datetime <p>DateTime that contains the date/time to compute the offset from.</p>
 * @return int|false <p>Returns time zone offset in seconds on success or <b>FALSE</b> on failure.</p>
 */
#[Pure(true)]
#[LanguageLevelTypeAware(["8.0" => "int"], default: "int|false")]
function timezone_offset_get(DateTimeZone $object, DateTimeInterface $datetime) {}

/**
 * Returns all transitions for the timezone
 * Alias:
 * {@see DateTimeZone::getTransitions}
 * @link https://php.net/manual/en/function.timezone-transitions-get.php
 * @param DateTimeZone $object <p>Procedural style only: A
 * {@see DateTimeZone} object returned by
 * {@see timezone_open()}</p>
 * @param int $timestampBegin [optional] <p>Begin timestamp</p>
 * @param int $timestampEnd [optional] <p>End timestamp</p>
 * @return array|false <p>Returns numerically indexed array containing associative array with all transitions on success or FALSE on failure.</p>
 */
#[Pure(true)]
function timezone_transitions_get(DateTimeZone $object, int $timestampBegin, int $timestampEnd): array|false {}

/**
 * Alias:
 * {@see DateTimeZone::getLocation}
 * @link https://php.net/manual/en/function.timezone-location-get.php
 * @param DateTimeZone $object <p>Procedural style only: A {@see DateTimeZone} object returned by {@see timezone_open()}</p>
 * @return array|false <p>Array containing location information about timezone.</p>
 */
#[Pure(true)]
#[ArrayShape([
    'country_code' => 'string',
    'latitude' => 'double',
    'longitude' => 'double',
    'comments' => 'string',
])]
function timezone_location_get(DateTimeZone $object): array|false {}

/**
 * Returns a numerically indexed array containing all defined timezone identifiers
 * Alias:
 * {@see DateTimeZone::listIdentifiers()}
 * @link https://php.net/manual/en/function.timezone-identifiers-list.php
 * @param int $timezoneGroup [optional] One of DateTimeZone class constants.
 * @param string|null $countryCode [optional] A two-letter ISO 3166-1 compatible country code.
 * Note: This option is only used when $timezoneGroup is set to DateTimeZone::PER_COUNTRY.
 * @return array|false Returns array on success or FALSE on failure.
 */
#[Pure(true)]
#[LanguageLevelTypeAware(["8.0" => "array"], default: "array|false")]
function timezone_identifiers_list(int $timezoneGroup = DateTimeZone::ALL, ?string $countryCode) {}

/**
 * Returns associative array containing dst, offset and the timezone name
 * Alias:
 * {@see DateTimeZone::listAbbreviations}
 * @link https://php.net/manual/en/function.timezone-abbreviations-list.php
 * @return array<string, list<array{dst: bool, offset: int, timezone_id: string|null}>>|false Array on success or <b>FALSE</b> on failure.
 */
#[Pure]
#[LanguageLevelTypeAware(["8.0" => "array"], default: "array|false")]
function timezone_abbreviations_list() {}

/**
 * Gets the version of the timezonedb
 * @link https://php.net/manual/en/function.timezone-version-get.php
 * @return string a string.
 */
#[Pure]
function timezone_version_get(): string {}

/**
 * Alias:
 * {@see DateInterval::createFromDateString}
 * @link https://php.net/manual/en/function.date-interval-create-from-date-string.php
 * @param string $datetime <p>A date with relative parts. Specifically, the relative formats supported by the parser used for
 * {@see strtotime()} and
 * {@see DateTime} will be used to construct the
 * {@see DateInterval}.</p>
 * @return DateInterval|false
 * <p>Returns a new DateInterval instance.</p>
 */
#[Pure(true)]
function date_interval_create_from_date_string(string $datetime): DateInterval|false {}

/**
 * Alias:
 * {@see DateInterval::format}
 * @link https://php.net/manual/en/function.date-interval-format.php
 * @param DateInterval $object
 * @param string $format
 * @return string
 */
#[Pure(true)]
function date_interval_format(DateInterval $object, string $format): string {}

/**
 * Sets the default timezone used by all date/time functions in a script
 * @link https://php.net/manual/en/function.date-default-timezone-set.php
 * @param string $timezoneId <p>
 * The timezone identifier, like UTC or
 * Europe/Lisbon. The list of valid identifiers is
 * available in the .
 * </p>
 * @return bool This function returns false if the
 * timezone_identifier isn't valid, or true
 * otherwise.
 */
function date_default_timezone_set(string $timezoneId): bool {}

/**
 * Gets the default timezone used by all date/time functions in a script
 * @link https://php.net/manual/en/function.date-default-timezone-get.php
 * @return string a string.
 */
#[Pure]
function date_default_timezone_get(): string {}

/**
 * Returns time of sunrise for a given day and location
 * @link https://php.net/manual/en/function.date-sunrise.php
 * @param int $timestamp <p>
 * The timestamp of the day from which the sunrise
 * time is taken.
 * </p>
 * @param int $returnFormat [optional] <p>
 * <table>
 * format constants
 * <tr valign="top">
 * <td>constant</td>
 * <td>description</td>
 * <td>example</td>
 * </tr>
 * <tr valign="top">
 * <td>SUNFUNCS_RET_STRING</td>
 * <td>returns the result as string</td>
 * <td>16:46</td>
 * </tr>
 * <tr valign="top">
 * <td>SUNFUNCS_RET_DOUBLE</td>
 * <td>returns the result as float</td>
 * <td>16.78243132</td>
 * </tr>
 * <tr valign="top">
 * <td>SUNFUNCS_RET_TIMESTAMP</td>
 * <td>returns the result as integer (timestamp)</td>
 * <td>1095034606</td>
 * </tr>
 * </table>
 * </p>
 * @param float|null $latitude [optional] <p>
 * Defaults to North, pass in a negative value for South.
 * See also: date.default_latitude
 * </p>
 * @param float|null $longitude [optional] <p>
 * Defaults to East, pass in a negative value for West.
 * See also: date.default_longitude
 * </p>
 * @param float|null $zenith [optional] <p>
 * Default: date.sunrise_zenith
 * </p>
 * @param float|null $utcOffset [optional]
 * @return string|int|float|false the sunrise time in a specified format on
 * success or false on failure.
 * @deprecated in 8.1.  Use {@link date_sun_info} instead
 */
#[Pure(true)]
#[Deprecated(reason: 'in 8.1.  Use date_sun_info instead', since: '8.1')]
function date_sunrise(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, ?float $latitude, ?float $longitude, ?float $zenith, ?float $utcOffset): string|int|float|false {}

/**
 * Returns time of sunset for a given day and location
 * @link https://php.net/manual/en/function.date-sunset.php
 * @param int $timestamp <p>
 * The timestamp of the day from which the sunset
 * time is taken.
 * </p>
 * @param int $returnFormat [optional] <p>
 * <table>
 * format constants
 * <tr valign="top">
 * <td>constant</td>
 * <td>description</td>
 * <td>example</td>
 * </tr>
 * <tr valign="top">
 * <td>SUNFUNCS_RET_STRING</td>
 * <td>returns the result as string</td>
 * <td>16:46</td>
 * </tr>
 * <tr valign="top">
 * <td>SUNFUNCS_RET_DOUBLE</td>
 * <td>returns the result as float</td>
 * <td>16.78243132</td>
 * </tr>
 * <tr valign="top">
 * <td>SUNFUNCS_RET_TIMESTAMP</td>
 * <td>returns the result as integer (timestamp)</td>
 * <td>1095034606</td>
 * </tr>
 * </table>
 * </p>
 * @param float|null $latitude [optional] <p>
 * Defaults to North, pass in a negative value for South.
 * See also: date.default_latitude
 * </p>
 * @param float|null $longitude [optional] <p>
 * Defaults to East, pass in a negative value for West.
 * See also: date.default_longitude
 * </p>
 * @param float|null $zenith [optional] <p>
 * Default: date.sunset_zenith
 * </p>
 * @param float|null $utcOffset [optional]
 * @return string|int|float|false the sunset time in a specified format on
 * success or false on failure.
 * @deprecated in 8.1.  Use {@link date_sun_info} instead
 */
#[Pure(true)]
#[Deprecated(reason: 'in 8.1.  Use date_sun_info instead', since: '8.1')]
function date_sunset(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, ?float $latitude, ?float $longitude, ?float $zenith, ?float $utcOffset): string|int|float|false {}

/**
 * Returns an array with information about sunset/sunrise and twilight begin/end
 * @link https://php.net/manual/en/function.date-sun-info.php
 * @param int $timestamp <p>
 * Timestamp.
 * </p>
 * @param float $latitude <p>
 * Latitude in degrees.
 * </p>
 * @param float $longitude <p>
 * Longitude in degrees.
 * </p>
 * @return array{
 *              sunrise: int|bool,
 *              sunset: int|bool,
 *              transit: int|bool,
 *              civil_twilight_begin: int|bool,
 *              civil_twilight_end: int|bool,
 *              nautical_twilight_begin: int|bool,
 *              nautical_twilight_end: int|bool,
 *              astronomical_twilight_begin: int|bool,
 *              astronomical_twilight_end: int|bool,
 *         }|false Returns array on success or <strong><code>false</code></strong> on failure. The structure of the array is detailed in the following list:
 * <table>
 * <tr><td>sunrise</td><td>The timestamp of the sunrise (zenith angle = 90°35&#039;).</td></tr>
 * <tr><td>sunset</td><td>The timestamp of the sunset (zenith angle = 90°35&#039;).</td></tr>
 * <tr><td>transit</td><td>The timestamp when the sun is at its zenith, i.e. has reached its topmost point.</td></tr>
 * <tr><td>civil_twilight_begin</td><td>The start of the civil dawn (zenith angle = 96°). It ends at <code>sunrise</code>.</td></tr>
 * <tr><td>civil_twilight_end</td><td>The end of the civil dusk (zenith angle = 96°). It starts at <code>sunset</code>.</td></tr>
 * <tr><td>nautical_twilight_begin</td><td>The start of the nautical dawn (zenith angle = 102°). It ends at <code>civil_twilight_begin</code>.</td></tr>
 * <tr><td>nautical_twilight_end</td><td>The end of the nautical dusk (zenith angle = 102°). It starts at <code>civil_twilight_end</code>.</td></tr>
 * <tr><td>astronomical_twilight_begin</td><td>The start of the astronomical dawn (zenith angle = 108°). It ends at <code>nautical_twilight_begin</code>.</td></tr>
 * <tr><td>astronomical_twilight_end</td><td>The end of the astronomical dusk (zenith angle = 108°). It starts at <code>nautical_twilight_end</code>.</td></tr>
 * </table>
 * <br>
 * The values of the array elements are either UNIX timestamps, <strong><code>false</code></strong> if the
 * sun is below the respective zenith for the whole day, or <strong><code>true</code></strong> if the sun is
 * above the respective zenith for the whole day.
 * @since 5.1.2
 */
#[Pure(true)]
#[LanguageLevelTypeAware(["8.0" => "array"], default: "array|false")]
#[ArrayShape([
    "sunrise" => "int",
    "sunset" => "int",
    "transit" => "int",
    "civil_twilight_begin" => "int",
    "civil_twilight_end" => "int",
    "nautical_twilight_begin" => "int",
    "nautical_twilight_end" => "int",
    "astronomical_twilight_begin" => "int",
    "astronomical_twilight_end" => "int"
])]
function date_sun_info(int $timestamp, float $latitude, float $longitude): array|false {}

// End of date v.5.3.2-0.dotdeb.1
<?php

use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Immutable;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;

/**
 * @since 5.5
 */
interface DateTimeInterface
{
    /**
     * @since 7.2
     */
    public const ATOM = 'Y-m-d\TH:i:sP';

    /**
     * @since 7.2
     */
    public const COOKIE = 'l, d-M-Y H:i:s T';

    /**
     * This format is not compatible with ISO-8601, but is left this way for backward compatibility reasons.
     * Use DateTime::ATOM or DATE_ATOM for compatibility with ISO-8601 instead.
     * @since 7.2
     * @deprecated
     */
    public const ISO8601 = 'Y-m-d\TH:i:sO';

    /**
     * @since 8.2
     */
    public const ISO8601_EXPANDED = DATE_ISO8601_EXPANDED;

    /**
     * @since 7.2
     */
    public const RFC822 = 'D, d M y H:i:s O';

    /**
     * @since 7.2
     */
    public const RFC850 = 'l, d-M-y H:i:s T';

    /**
     * @since 7.2
     */
    public const RFC1036 = 'D, d M y H:i:s O';

    /**
     * @since 7.2
     */
    public const RFC1123 = 'D, d M Y H:i:s O';

    /**
     * @since 7.2
     */
    public const RFC2822 = 'D, d M Y H:i:s O';

    /**
     * @since 7.2
     */
    public const RFC3339 = 'Y-m-d\TH:i:sP';

    /**
     * @since 7.2
     */
    public const RFC3339_EXTENDED = 'Y-m-d\TH:i:s.vP';

    /**
     * @since 7.2
     */
    public const RFC7231 = 'D, d M Y H:i:s \G\M\T';

    /**
     * @since 7.2
     */
    public const RSS = 'D, d M Y H:i:s O';

    /**
     * @since 7.2
     */
    public const W3C = 'Y-m-d\TH:i:sP';

    /* Methods */
    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Returns the difference between two DateTime objects
     * @link https://secure.php.net/manual/en/datetime.diff.php
     * @param DateTimeInterface $targetObject <p>The date to compare to.</p>
     * @param bool $absolute <p>Should the interval be forced to be positive?</p>
     * @return DateInterval
     * The https://secure.php.net/manual/en/class.dateinterval.php DateInterval} object representing the
     * difference between the two dates.
     */
    #[TentativeType]
    public function diff(
        DateTimeInterface $targetObject,
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $absolute = false
    ): DateInterval;

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Returns date formatted according to given format
     * @link https://secure.php.net/manual/en/datetime.format.php
     * @param string $format <p>
     * Format accepted by  {@link https://secure.php.net/manual/en/function.date.php date()}.
     * </p>
     * @return string
     * Returns the formatted date string on success or <b>FALSE</b> on failure.
     * Since PHP8, it always returns <b>STRING</b>.
     */
    #[TentativeType]
    public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format): string;

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Returns the timezone offset
     * @return int|false
     * Returns the timezone offset in seconds from UTC on success
     * or <b>FALSE</b> on failure. Since PHP8, it always returns <b>INT</b>.
     */
    #[LanguageLevelTypeAware(["8.0" => "int"], default: "int|false")]
    #[TentativeType]
    public function getOffset(): int;

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Gets the Unix timestamp
     * @return int
     * Returns the Unix timestamp representing the date.
     */
    #[TentativeType]
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: 'int|false')]
    public function getTimestamp();

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Return time zone relative to given DateTime
     * @link https://secure.php.net/manual/en/datetime.gettimezone.php
     * @return DateTimeZone|false
     * Returns a {@link https://secure.php.net/manual/en/class.datetimezone.php DateTimeZone} object on success
     * or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function getTimezone(): DateTimeZone|false;

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * The __wakeup handler
     * @link https://secure.php.net/manual/en/datetime.wakeup.php
     * @return void Initializes a DateTime object.
     */
    #[TentativeType]
    public function __wakeup(): void;

    #[PhpStormStubsElementAvailable(from: '8.2')]
    public function __serialize(): array;

    #[PhpStormStubsElementAvailable(from: '8.2')]
    public function __unserialize(array $data): void;
}

/**
 * @since 5.5
 */
class DateTimeImmutable implements DateTimeInterface
{
    /* Methods */
    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * @link https://secure.php.net/manual/en/datetimeimmutable.construct.php
     * @param string $datetime [optional]
     * <p>A date/time string. Valid formats are explained in {@link https://secure.php.net/manual/en/datetime.formats.php Date and Time Formats}.</p>
     * <p>Enter <b>NULL</b> here to obtain the current time when using the <em>$timezone</em> parameter.</p>
     * @param null|DateTimeZone $timezone [optional] <p>
     * A {@link https://secure.php.net/manual/en/class.datetimezone.php DateTimeZone} object representing the timezone of <em>$datetime</em>.
     * </p>
     * <p>If <em>$timezone</em> is omitted, the current timezone will be used.</p>
     * <blockquote><p><b>Note</b>:</p><p>
     * The <em>$timezone</em> parameter and the current timezone are ignored when the <em>$datetime</em> parameter either
     * is a UNIX timestamp (e.g. <em>@946684800</em>) or specifies a timezone (e.g. <em>2010-01-28T15:00:00+02:00</em>).
     * </p></blockquote>
     * @throws Exception Emits Exception in case of an error.
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $datetime = "now",
        #[LanguageLevelTypeAware(['8.0' => 'DateTimeZone|null'], default: 'DateTimeZone')] $timezone = null
    ) {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Adds an amount of days, months, years, hours, minutes and seconds
     * @param DateInterval $interval
     * @return static
     * @link https://secure.php.net/manual/en/datetimeimmutable.add.php
     */
    #[TentativeType]
    public function add(DateInterval $interval): DateTimeImmutable {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Returns new DateTimeImmutable object formatted according to the specified format
     * @link https://secure.php.net/manual/en/datetimeimmutable.createfromformat.php
     * @param string $format
     * @param string $datetime
     * @param null|DateTimeZone $timezone [optional]
     * @return DateTimeImmutable|false
     */
    #[TentativeType]
    public static function createFromFormat(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $datetime,
        #[LanguageLevelTypeAware(['8.0' => 'DateTimeZone|null'], default: 'DateTimeZone')] $timezone = null
    ): DateTimeImmutable|false {}

    /**
     * (PHP 5 &gt;=5.6.0)<br/>
     * Returns new DateTimeImmutable object encapsulating the given DateTime object
     * @link https://secure.php.net/manual/en/datetimeimmutable.createfrommutable.php
     * @param DateTime $object The mutable DateTime object that you want to convert to an immutable version. This object is not modified, but instead a new DateTimeImmutable object is created containing the same date time and timezone information.
     * @return DateTimeImmutable returns a new DateTimeImmutable instance.
     */
    #[TentativeType]
    #[LanguageLevelTypeAware(['8.2' => 'static'], default: 'DateTimeImmutable')]
    public static function createFromMutable(DateTime $object) {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Returns the warnings and errors
     * @link https://secure.php.net/manual/en/datetimeimmutable.getlasterrors.php
     * @return array|false Returns array containing info about warnings and errors.
     */
    #[ArrayShape(["warning_count" => "int", "warnings" => "string[]", "error_count" => "int", "errors" => "string[]"])]
    #[TentativeType]
    public static function getLastErrors(): array|false {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Alters the timestamp
     * @link https://secure.php.net/manual/en/datetimeimmutable.modify.php
     * @param string $modifier <p>A date/time string. Valid formats are explained in
     * {@link https://secure.php.net/manual/en/datetime.formats.php Date and Time Formats}.</p>
     * @return static|false Returns the newly created object or false on failure.
     * Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or <b>FALSE</b> on failure.
     */
    #[Pure]
    #[TentativeType]
    public function modify(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $modifier): DateTimeImmutable|false {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * The __set_state handler
     * @link https://secure.php.net/manual/en/datetimeimmutable.set-state.php
     * @param array $array <p>Initialization array.</p>
     * @return DateTimeImmutable
     * Returns a new instance of a {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object.
     */
    public static function __set_state(array $array) {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Sets the date
     * @link https://secure.php.net/manual/en/datetimeimmutable.setdate.php
     * @param int $year <p>Year of the date.</p>
     * @param int $month <p>Month of the date.</p>
     * @param int $day <p>Day of the date.</p>
     * @return static|false
     * Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function setDate(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $year,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $month,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $day
    ): DateTimeImmutable {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Sets the ISO date
     * @link https://php.net/manual/en/class.datetimeimmutable.php
     * @param int $year <p>Year of the date.</p>
     * @param int $week <p>Week of the date.</p>
     * @param int $dayOfWeek [optional] <p>Offset from the first day of the week.</p>
     * @return static|false
     * Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function setISODate(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $year,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $week,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $dayOfWeek = 1
    ): DateTimeImmutable {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Sets the time
     * @link https://secure.php.net/manual/en/datetimeimmutable.settime.php
     * @param int $hour <p> Hour of the time. </p>
     * @param int $minute <p> Minute of the time. </p>
     * @param int $second [optional] <p> Second of the time. </p>
     * @param int $microsecond [optional] <p> Microseconds of the time. Added since 7.1</p>
     * @return static|false
     * Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function setTime(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $hour,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $minute,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $second = 0,
        #[PhpStormStubsElementAvailable(from: '7.1')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $microsecond = 0
    ): DateTimeImmutable {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Sets the date and time based on an Unix timestamp
     * @link https://secure.php.net/manual/en/datetimeimmutable.settimestamp.php
     * @param int $timestamp <p>Unix timestamp representing the date.</p>
     * @return static
     * Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function setTimestamp(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestamp): DateTimeImmutable {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Sets the time zone
     * @link https://secure.php.net/manual/en/datetimeimmutable.settimezone.php
     * @param DateTimeZone $timezone <p>
     * A {@link https://secure.php.net/manual/en/class.datetimezone.php DateTimeZone} object representing the
     * desired time zone.
     * </p>
     * @return static
     * Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function setTimezone(DateTimeZone $timezone): DateTimeImmutable {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Subtracts an amount of days, months, years, hours, minutes and seconds
     * @link https://secure.php.net/manual/en/datetimeimmutable.sub.php
     * @param DateInterval $interval <p>
     * A {@link https://secure.php.net/manual/en/class.dateinterval.php DateInterval} object
     * </p>
     * @return static
     * Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function sub(DateInterval $interval): DateTimeImmutable {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Returns the difference between two DateTime objects
     * @link https://secure.php.net/manual/en/datetime.diff.php
     * @param DateTimeInterface $targetObject <p>The date to compare to.</p>
     * @param bool $absolute [optional] <p>Should the interval be forced to be positive?</p>
     * @return DateInterval|false
     * The {@link https://secure.php.net/manual/en/class.dateinterval.php DateInterval} object representing the
     * difference between the two dates or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function diff(
        #[LanguageLevelTypeAware(['8.0' => 'DateTimeInterface'], default: '')] $targetObject,
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $absolute = false
    ): DateInterval {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Returns date formatted according to given format
     * @link https://secure.php.net/manual/en/datetime.format.php
     * @param string $format <p>
     * Format accepted by  {@link https://secure.php.net/manual/en/function.date.php date()}.
     * </p>
     * @return string
     * Returns the formatted date string on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format): string {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Returns the timezone offset
     * @return int
     * Returns the timezone offset in seconds from UTC on success
     * or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function getOffset(): int {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Gets the Unix timestamp
     * @return int
     * Returns the Unix timestamp representing the date.
     */
    #[TentativeType]
    public function getTimestamp(): int {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Return time zone relative to given DateTime
     * @link https://secure.php.net/manual/en/datetime.gettimezone.php
     * @return DateTimeZone|false
     * Returns a {@link https://secure.php.net/manual/en/class.datetimezone.php DateTimeZone} object on success
     * or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function getTimezone(): DateTimeZone|false {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * The __wakeup handler
     * @link https://secure.php.net/manual/en/datetime.wakeup.php
     * @return void Initializes a DateTime object.
     */
    #[TentativeType]
    public function __wakeup(): void {}

    /**
     * @param DateTimeInterface $object
     * @return DateTimeImmutable
     * @since 8.0
     */
    public static function createFromInterface(DateTimeInterface $object): DateTimeImmutable {}

    #[PhpStormStubsElementAvailable(from: '8.2')]
    public function __serialize(): array {}

    #[PhpStormStubsElementAvailable(from: '8.2')]
    public function __unserialize(array $data): void {}
}

/**
 * Representation of date and time.
 * @link https://php.net/manual/en/class.datetime.php
 */
class DateTime implements DateTimeInterface
{
    /**
     * @removed 7.2
     */
    public const ATOM = 'Y-m-d\TH:i:sP';

    /**
     * @removed 7.2
     */
    public const COOKIE = 'l, d-M-Y H:i:s T';

    /**
     * @removed 7.2
     */
    public const ISO8601 = 'Y-m-d\TH:i:sO';

    /**
     * @removed 7.2
     */
    public const RFC822 = 'D, d M y H:i:s O';

    /**
     * @removed 7.2
     */
    public const RFC850 = 'l, d-M-y H:i:s T';

    /**
     * @removed 7.2
     */
    public const RFC1036 = 'D, d M y H:i:s O';

    /**
     * @removed 7.2
     */
    public const RFC1123 = 'D, d M Y H:i:s O';

    /**
     * @removed 7.2
     */
    public const RFC2822 = 'D, d M Y H:i:s O';

    /**
     * @removed 7.2
     */
    public const RFC3339 = 'Y-m-d\TH:i:sP';

    /**
     * @removed 7.2
     */
    public const RFC3339_EXTENDED = 'Y-m-d\TH:i:s.vP';

    /**
     * @removed 7.2
     */
    public const RFC7231 = 'D, d M Y H:i:s \G\M\T';

    /**
     * @removed 7.2
     */
    public const RSS = 'D, d M Y H:i:s O';

    /**
     * @removed 7.2
     */
    public const W3C = 'Y-m-d\TH:i:sP';

    /**
     * (PHP 5 &gt;=5.2.0)<br/>
     * @link https://php.net/manual/en/datetime.construct.php
     * @param string $datetime [optional]
     * <p>A date/time string. Valid formats are explained in {@link https://php.net/manual/en/datetime.formats.php Date and Time Formats}.</p>
     * <p>
     * Enter <b>now</b> here to obtain the current time when using
     * the <em>$timezone</em> parameter.
     * </p>
     * @param null|DateTimeZone $timezone [optional] <p>
     * A {@link https://php.net/manual/en/class.datetimezone.php DateTimeZone} object representing the
     * timezone of <em>$datetime</em>.
     * </p>
     * <p>
     * If <em>$timezone</em> is omitted,
     * the current timezone will be used.
     * </p>
     * <blockquote><p><b>Note</b>:
     * </p><p>
     * The <em>$timezone</em> parameter
     * and the current timezone are ignored when the
     * <em>$time</em> parameter either
     * is a UNIX timestamp (e.g. <em>@946684800</em>)
     * or specifies a timezone
     * (e.g. <em>2010-01-28T15:00:00+02:00</em>).
     * </p> <p></p></blockquote>
     * @throws Exception Emits Exception in case of an error.
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $datetime = 'now',
        #[LanguageLevelTypeAware(['8.0' => 'DateTimeZone|null'], default: 'DateTimeZone')] $timezone = null
    ) {}

    /**
     * @return void
     * @link https://php.net/manual/en/datetime.wakeup.php
     */
    #[TentativeType]
    public function __wakeup(): void {}

    /**
     * Returns date formatted according to given format.
     * @param string $format
     * @return string
     * @link https://php.net/manual/en/datetime.format.php
     */
    #[TentativeType]
    public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format): string {}

    /**
     * Alter the timestamp of a DateTime object by incrementing or decrementing
     * in a format accepted by strtotime().
     * @param string $modifier A date/time string. Valid formats are explained in <a href="https://secure.php.net/manual/en/datetime.formats.php">Date and Time Formats</a>.
     * @return static|false Returns the DateTime object for method chaining or FALSE on failure.
     * @link https://php.net/manual/en/datetime.modify.php
     */
    #[TentativeType]
    public function modify(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $modifier): DateTime|false {}

    /**
     * Adds an amount of days, months, years, hours, minutes and seconds to a DateTime object
     * @param DateInterval $interval
     * @return static
     * @link https://php.net/manual/en/datetime.add.php
     */
    #[TentativeType]
    public function add(DateInterval $interval): DateTime {}

    /**
     * @param DateTimeImmutable $object
     * @return DateTime
     * @since 7.3
     */
    #[TentativeType]
    #[LanguageLevelTypeAware(['8.2' => 'static'], default: 'DateTime')]
    public static function createFromImmutable(DateTimeImmutable $object) {}

    /**
     * Subtracts an amount of days, months, years, hours, minutes and seconds from a DateTime object
     * @param DateInterval $interval
     * @return static
     * @link https://php.net/manual/en/datetime.sub.php
     */
    #[TentativeType]
    public function sub(DateInterval $interval): DateTime {}

    /**
     * Get the TimeZone associated with the DateTime
     * @return DateTimeZone|false
     * @link https://php.net/manual/en/datetime.gettimezone.php
     */
    #[TentativeType]
    public function getTimezone(): DateTimeZone|false {}

    /**
     * Set the TimeZone associated with the DateTime
     * @param DateTimeZone $timezone
     * @return static
     * @link https://php.net/manual/en/datetime.settimezone.php
     */
    #[TentativeType]
    public function setTimezone(#[LanguageLevelTypeAware(['8.0' => 'DateTimeZone'], default: '')] $timezone): DateTime {}

    /**
     * Returns the timezone offset
     * @return int
     * @link https://php.net/manual/en/datetime.getoffset.php
     */
    #[TentativeType]
    public function getOffset(): int {}

    /**
     * Sets the current time of the DateTime object to a different time.
     * @param int $hour
     * @param int $minute
     * @param int $second
     * @param int $microsecond Added since 7.1
     * @return static
     * @link https://php.net/manual/en/datetime.settime.php
     */
    #[TentativeType]
    public function setTime(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $hour,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $minute,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $second = 0,
        #[PhpStormStubsElementAvailable(from: '7.1')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $microsecond = 0
    ): DateTime {}

    /**
     * Sets the current date of the DateTime object to a different date.
     * @param int $year
     * @param int $month
     * @param int $day
     * @return static
     * @link https://php.net/manual/en/datetime.setdate.php
     */
    #[TentativeType]
    public function setDate(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $year,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $month,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $day
    ): DateTime {}

    /**
     * Set a date according to the ISO 8601 standard - using weeks and day offsets rather than specific dates.
     * @param int $year
     * @param int $week
     * @param int $dayOfWeek
     * @return static
     * @link https://php.net/manual/en/datetime.setisodate.php
     */
    #[TentativeType]
    public function setISODate(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $year,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $week,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $dayOfWeek = 1
    ): DateTime {}

    /**
     * Sets the date and time based on a Unix timestamp.
     * @param int $timestamp
     * @return static
     * @link https://php.net/manual/en/datetime.settimestamp.php
     */
    #[TentativeType]
    public function setTimestamp(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestamp): DateTime {}

    /**
     * Gets the Unix timestamp.
     * @return int
     * @link https://php.net/manual/en/datetime.gettimestamp.php
     */
    #[TentativeType]
    public function getTimestamp(): int {}

    /**
     * Returns the difference between two DateTime objects represented as a DateInterval.
     * @param DateTimeInterface $targetObject The date to compare to.
     * @param bool $absolute [optional] Whether to return absolute difference.
     * @return DateInterval|false The DateInterval object representing the difference between the two dates.
     * @link https://php.net/manual/en/datetime.diff.php
     */
    #[TentativeType]
    public function diff(
        #[LanguageLevelTypeAware(['8.0' => 'DateTimeInterface'], default: '')] $targetObject,
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $absolute = false
    ): DateInterval {}

    /**
     * Parse a string into a new DateTime object according to the specified format
     * @param string $format Format accepted by date().
     * @param string $datetime String representing the time.
     * @param null|DateTimeZone $timezone A DateTimeZone object representing the desired time zone.
     * @return DateTime|false
     * @link https://php.net/manual/en/datetime.createfromformat.php
     */
    #[TentativeType]
    public static function createFromFormat(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $datetime,
        #[LanguageLevelTypeAware(['8.0' => 'DateTimeZone|null'], default: 'DateTimeZone')] $timezone = null
    ): DateTime|false {}

    /**
     * Returns an array of warnings and errors found while parsing a date/time string
     * @return array|false
     * @link https://php.net/manual/en/datetime.getlasterrors.php
     */
    #[ArrayShape(["warning_count" => "int", "warnings" => "string[]", "error_count" => "int", "errors" => "string[]"])]
    #[TentativeType]
    public static function getLastErrors(): array|false {}

    /**
     * The __set_state handler
     * @link https://php.net/manual/en/datetime.set-state.php
     * @param array $array <p>Initialization array.</p>
     * @return DateTime <p>Returns a new instance of a DateTime object.</p>
     */
    public static function __set_state($array) {}

    /**
     * @param DateTimeInterface $object
     * @return DateTime
     * @since 8.0
     */
    public static function createFromInterface(DateTimeInterface $object): DateTime {}

    #[PhpStormStubsElementAvailable(from: '8.2')]
    public function __serialize(): array {}

    #[PhpStormStubsElementAvailable(from: '8.2')]
    public function __unserialize(array $data): void {}
}

/**
 * Representation of time zone
 * @link https://php.net/manual/en/class.datetimezone.php
 */
class DateTimeZone
{
    public const AFRICA = 1;
    public const AMERICA = 2;
    public const ANTARCTICA = 4;
    public const ARCTIC = 8;
    public const ASIA = 16;
    public const ATLANTIC = 32;
    public const AUSTRALIA = 64;
    public const EUROPE = 128;
    public const INDIAN = 256;
    public const PACIFIC = 512;
    public const UTC = 1024;
    public const ALL = 2047;
    public const ALL_WITH_BC = 4095;
    public const PER_COUNTRY = 4096;

    /**
     * @param string $timezone
     * @link https://php.net/manual/en/datetimezone.construct.php
     * @throws Exception Emits Exception in case of an error.
     */
    public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $timezone) {}

    /**
     * Returns the name of the timezone
     * @return string
     * @link https://php.net/manual/en/datetimezone.getname.php
     */
    #[TentativeType]
    public function getName(): string {}

    /**
     * Returns location information for a timezone
     * @return array|false
     * @link https://php.net/manual/en/datetimezone.getlocation.php
     */
    #[TentativeType]
    #[ArrayShape([
        'country_code' => 'string',
        'latitude' => 'double',
        'longitude' => 'double',
        'comments' => 'string',
    ])]
    public function getLocation(): array|false {}

    /**
     * Returns the timezone offset from GMT
     * @param DateTimeInterface $datetime
     * @return int
     * @link https://php.net/manual/en/datetimezone.getoffset.php
     */
    #[TentativeType]
    public function getOffset(DateTimeInterface $datetime): int {}

    /**
     * Returns all transitions for the timezone
     * @param int $timestampBegin
     * @param int $timestampEnd
     * @return array|false
     * @link https://php.net/manual/en/datetimezone.gettransitions.php
     */
    #[TentativeType]
    public function getTransitions(
        #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $timestampBegin,
        #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $timestampEnd,
        #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestampBegin = null,
        #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestampEnd = null
    ): array|false {}

    /**
     * Returns associative array containing dst, offset and the timezone name
     * @return array<string, list<array{dst: bool, offset: int, timezone_id: string|null}>>
     * @link https://php.net/manual/en/datetimezone.listabbreviations.php
     */
    #[TentativeType]
    public static function listAbbreviations(): array {}

    /**
     * Returns a numerically indexed array with all timezone identifiers
     * @param int $timezoneGroup
     * @param string $countryCode
     * @return array|false Returns the array of timezone identifiers, or <b>FALSE</b> on failure. Since PHP8, always returns <b>array</b>.
     * @link https://php.net/manual/en/datetimezone.listidentifiers.php
     */
    #[LanguageLevelTypeAware(["8.0" => "array"], default: "array|false")]
    #[TentativeType]
    public static function listIdentifiers(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timezoneGroup = DateTimeZone::ALL,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $countryCode = null
    ): array {}

    /**
     * @link https://php.net/manual/en/datetime.wakeup.php
     */
    #[TentativeType]
    public function __wakeup(): void {}

    public static function __set_state($an_array) {}

    #[PhpStormStubsElementAvailable(from: '8.2')]
    public function __serialize(): array {}

    #[PhpStormStubsElementAvailable(from: '8.2')]
    public function __unserialize(array $data): void {}
}

/**
 * Representation of date interval. A date interval stores either a fixed amount of
 * time (in years, months, days, hours etc) or a relative time string in the format
 * that DateTime's constructor supports.
 * @link https://php.net/manual/en/class.dateinterval.php
 */
class DateInterval
{
    /**
     * Number of years
     * @var int
     */
    public $y;

    /**
     * Number of months
     * @var int
     */
    public $m;

    /**
     * Number of days
     * @var int
     */
    public $d;

    /**
     * Number of hours
     * @var int
     */
    public $h;

    /**
     * Number of minutes
     * @var int
     */
    public $i;

    /**
     * Number of seconds
     * @var int
     */
    public $s;

    /**
     * Number of microseconds
     * @since 7.1.0
     * @var float
     */
    public $f;

    /**
     * Is 1 if the interval is inverted and 0 otherwise
     * @var int
     */
    public $invert;

    /**
     * Total number of days the interval spans. If this is unknown, days will be FALSE.
     * @var int|false
     */
    public $days;

    /**
     * @param string $duration
     * @throws Exception when the $duration cannot be parsed as an interval.
     * @link https://php.net/manual/en/dateinterval.construct.php
     */
    public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $duration) {}

    /**
     * Formats the interval
     * @param string $format
     * @return string
     * @link https://php.net/manual/en/dateinterval.format.php
     */
    #[TentativeType]
    public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format): string {}

    /**
     * Sets up a DateInterval from the relative parts of the string
     * @param string $datetime
     * @return DateInterval|false Returns a new {@link https://www.php.net/manual/en/class.dateinterval.php DateInterval}
     * instance on success, or <b>FALSE</b> on failure.
     * @link https://php.net/manual/en/dateinterval.createfromdatestring.php
     */
    #[TentativeType]
    public static function createFromDateString(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $datetime): DateInterval|false {}

    #[TentativeType]
    public function __wakeup(): void {}

    public static function __set_state($an_array) {}

    #[PhpStormStubsElementAvailable(from: '8.2')]
    public function __serialize(): array {}

    #[PhpStormStubsElementAvailable(from: '8.2')]
    public function __unserialize(array $data): void {}
}

/**
 * Representation of date period.
 * @link https://php.net/manual/en/class.dateperiod.php
 * @template TDate of DateTimeInterface
 * @template TEnd of ?DateTimeInterface
 * @implements \IteratorAggregate<int, TDate>
 */
class DatePeriod implements IteratorAggregate
{
    public const EXCLUDE_START_DATE = 1;

    /**
     * @since 8.2
     */
    public const INCLUDE_END_DATE = 2;

    /**
     * Start date
     * @var DateTimeInterface
     */
    #[LanguageLevelTypeAware(['8.2' => 'DateTimeInterface|null'], default: '')]
    #[Immutable]
    public $start;

    /**
     * Current iterator value.
     * @var DateTimeInterface|null
     */
    #[LanguageLevelTypeAware(['8.2' => 'DateTimeInterface|null'], default: '')]
    public $current;

    /**
     * End date.
     * @var DateTimeInterface|null
     */
    #[LanguageLevelTypeAware(['8.2' => 'DateTimeInterface|null'], default: '')]
    #[Immutable]
    public $end;

    /**
     * The interval
     * @var DateInterval
     */
    #[LanguageLevelTypeAware(['8.2' => 'DateInterval|null'], default: '')]
    #[Immutable]
    public $interval;

    /**
     * Number of recurrences.
     * @var int
     */
    #[LanguageLevelTypeAware(['8.2' => 'int'], default: '')]
    #[Immutable]
    public $recurrences;

    /**
     * Start of period.
     * @var bool
     */
    #[LanguageLevelTypeAware(['8.2' => 'bool'], default: '')]
    #[Immutable]
    public $include_start_date;

    /**
     * @since 8.2
     */
    #[Immutable]
    public bool $include_end_date;

    /**
     * @param TDate $start
     * @param DateInterval $interval
     * @param TEnd $end
     * @param int $options Can be set to DatePeriod::EXCLUDE_START_DATE.
     * @link https://php.net/manual/en/dateperiod.construct.php
     */
    public function __construct(DateTimeInterface $start, DateInterval $interval, DateTimeInterface $end, $options = 0) {}

    /**
     * @param TDate $start
     * @param DateInterval $interval
     * @param int $recurrences Number of recurrences
     * @param int $options Can be set to DatePeriod::EXCLUDE_START_DATE.
     * @link https://php.net/manual/en/dateperiod.construct.php
     */
    public function __construct(DateTimeInterface $start, DateInterval $interval, $recurrences, $options = 0) {}

    /**
     * @param string $isostr String containing the ISO interval.
     * @param int $options Can be set to DatePeriod::EXCLUDE_START_DATE.
     * @link https://php.net/manual/en/dateperiod.construct.php
     */
    public function __construct($isostr, $options = 0) {}

    /**
     * Gets the interval
     * @return DateInterval
     * @link https://php.net/manual/en/dateperiod.getdateinterval.php
     * @since 5.6.5
     */
    #[TentativeType]
    public function getDateInterval(): DateInterval {}

    /**
     * Gets the end date
     * @return DateTimeInterface|null
     * @link https://php.net/manual/en/dateperiod.getenddate.php
     * @since 5.6.5
     * @return TEnd
     */
    #[TentativeType]
    public function getEndDate(): ?DateTimeInterface {}

    /**
     * Gets the start date
     * @return DateTimeInterface
     * @link https://php.net/manual/en/dateperiod.getstartdate.php
     * @since 5.6.5
     * @return TDate
     */
    #[TentativeType]
    public function getStartDate(): DateTimeInterface {}

    #[TentativeType]
    public static function __set_state(#[PhpStormStubsElementAvailable(from: '7.3')] array $array): DatePeriod {}

    #[TentativeType]
    public function __wakeup(): void {}

    /**
     * Get the number of recurrences
     * @return int|null
     * @link https://php.net/manual/en/dateperiod.getrecurrences.php
     * @since 7.2.17
     */
    #[TentativeType]
    public function getRecurrences(): ?int {}

    /**
     * @return \Iterator<int, TDate>
     * @since 8.0
     */
    public function getIterator(): Iterator {}

    #[PhpStormStubsElementAvailable(from: '8.2')]
    public function __serialize(): array {}

    #[PhpStormStubsElementAvailable(from: '8.2')]
    public function __unserialize(array $data): void {}
}
<?php

// Start of libxml v.
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Pure;

/**
 * Contains various information about errors thrown by libxml. The error codes
 * are described within the official
 * xmlError API documentation.
 * @link https://php.net/manual/en/class.libxmlerror.php
 */
class LibXMLError
{
    /**
     * <p style="margin-top:0;">
     * the severity of the error (one of the following constants:
     * <b><code>LIBXML_ERR_WARNING</code></b>,
     * <b><code>LIBXML_ERR_ERROR</code></b> or
     * <b><code>LIBXML_ERR_FATAL</code></b>)
     * </p>
     * @var int
     */
    public int $level;

    /**
     * <p style="margin-top:0;">
     * The error's code.
     * </p>
     * @var int
     */
    public int $code;

    /**
     * <p style="margin-top:0;">
     * The column where the error occurred.
     * </p>
     * <p><b>Note</b>:
     * </p><p>
     * This property isn't entirely implemented in libxml and therefore
     * 0 is often returned.
     * </p>
     * @var int
     */
    public int $column;

    /**
     * <p style="margin-top:0;">
     * The error message, if any.
     * </p>
     * @var string
     */
    public string $message;

    /**
     * <p style="margin-top:0;">The filename, or empty if the XML was loaded from a string.</p>
     * @var string
     */
    public string $file;

    /**
     * <p style="margin-top:0;">
     * The line where the error occurred.
     * </p>
     * @var int
     */
    public int $line;
}

/**
 * Set the streams context for the next libxml document load or write
 * @link https://php.net/manual/en/function.libxml-set-streams-context.php
 * @param resource $context <p>
 * The stream context resource (created with
 * <b>stream_context_create</b>)
 * </p>
 * @return void No value is returned.
 */
function libxml_set_streams_context($context): void {}

/**
 * Disable libxml errors and allow user to fetch error information as needed
 * @link https://php.net/manual/en/function.libxml-use-internal-errors.php
 * @param bool|null $use_errors <p>
 * Enable (<b>TRUE</b>) user error handling or disable (<b>FALSE</b>) user error handling. Disabling will also clear any existing libxml errors.
 * </p>
 * @return bool This function returns the previous value of
 * <i>use_errors</i>.
 */
function libxml_use_internal_errors(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] bool $use_errors = false,
    #[PhpStormStubsElementAvailable(from: '8.0')] ?bool $use_errors = null
): bool {}

/**
 * Retrieve last error from libxml
 * @link https://php.net/manual/en/function.libxml-get-last-error.php
 * @return LibXMLError|false a LibXMLError object if there is any error in the
 * buffer, <b>FALSE</b> otherwise.
 */
#[Pure(true)]
function libxml_get_last_error(): LibXMLError|false {}

/**
 * Clear libxml error buffer
 * @link https://php.net/manual/en/function.libxml-clear-errors.php
 * @return void No value is returned.
 */
function libxml_clear_errors(): void {}

/**
 * Retrieve array of errors
 * @link https://php.net/manual/en/function.libxml-get-errors.php
 * @return LibXMLError[] an array with LibXMLError objects if there are any
 * errors in the buffer, or an empty array otherwise.
 */
#[Pure(true)]
function libxml_get_errors(): array {}

/**
 * Disable the ability to load external entities
 * @link https://php.net/manual/en/function.libxml-disable-entity-loader.php
 * @param bool $disable [optional] <p>
 * Disable (<b>TRUE</b>) or enable (<b>FALSE</b>) libxml extensions (such as
 * ,
 * and ) to load external entities.
 * </p>
 * @return bool the previous value.
 * @since 5.2.11
 */
#[Deprecated(since: "8.0")]
function libxml_disable_entity_loader(bool $disable = true): bool {}

/**
 * Changes the default external entity loader
 * @link https://php.net/manual/en/function.libxml-set-external-entity-loader.php
 * @param callable|null $resolver_function <p>
 * A callable that takes three arguments. Two strings, a public id
 * and system id, and a context (an array with four keys) as the third argument.
 * This callback should return a resource, a string from which a resource can be
 * opened, or <b>NULL</b>.
 * </p>
 * @return bool
 * @since 5.4
 */
function libxml_set_external_entity_loader(?callable $resolver_function): bool {}

/**
 * Returns the currently installed external entity loader, i.e. the value which was passed to
 * libxml_set_external_entity_loader() or null if no loader was installed and the default entity loader will be used.
 * This allows libraries to save and restore the loader, controlling entity expansion without interfering with the rest
 * of the application.
 *
 * @return callable|null
 * @since 8.2
 */
function libxml_get_external_entity_loader(): ?callable {}

/**
 * libxml version like 20605 or 20617
 * @link https://php.net/manual/en/libxml.constants.php
 */
define('LIBXML_VERSION', 20901);

/**
 * libxml version like 2.6.5 or 2.6.17
 * @link https://php.net/manual/en/libxml.constants.php
 */
define('LIBXML_DOTTED_VERSION', "2.9.1");
define('LIBXML_LOADED_VERSION', 20901);

/**
 * Substitute entities
 * @link https://php.net/manual/en/libxml.constants.php
 */
define('LIBXML_NOENT', 2);

/**
 * Load the external subset
 * @link https://php.net/manual/en/libxml.constants.php
 */
define('LIBXML_DTDLOAD', 4);

/**
 * Default DTD attributes
 * @link https://php.net/manual/en/libxml.constants.php
 */
define('LIBXML_DTDATTR', 8);

/**
 * Validate with the DTD
 * @link https://php.net/manual/en/libxml.constants.php
 */
define('LIBXML_DTDVALID', 16);

/**
 * Suppress error reports
 * @link https://php.net/manual/en/libxml.constants.php
 */
define('LIBXML_NOERROR', 32);

/**
 * Suppress warning reports
 * @link https://php.net/manual/en/libxml.constants.php
 */
define('LIBXML_NOWARNING', 64);

/**
 * Remove blank nodes
 * @link https://php.net/manual/en/libxml.constants.php
 */
define('LIBXML_NOBLANKS', 256);

/**
 * Implement XInclude substitution
 * @link https://php.net/manual/en/libxml.constants.php
 */
define('LIBXML_XINCLUDE', 1024);

/**
 * Remove redundant namespaces declarations
 * @link https://php.net/manual/en/libxml.constants.php
 */
define('LIBXML_NSCLEAN', 8192);

/**
 * Merge CDATA as text nodes
 * @link https://php.net/manual/en/libxml.constants.php
 */
define('LIBXML_NOCDATA', 16384);

/**
 * Disable network access when loading documents
 * @link https://php.net/manual/en/libxml.constants.php
 */
define('LIBXML_NONET', 2048);

/**
 * Sets XML_PARSE_PEDANTIC flag, which enables pedentic error reporting.
 * @link https://php.net/manual/en/libxml.constants.php
 * @since 5.4
 */
define('LIBXML_PEDANTIC', 128);

/**
 * Activate small nodes allocation optimization. This may speed up your
 * application without needing to change the code.
 * <p>
 * Only available in Libxml &gt;= 2.6.21
 * </p>
 * @link https://php.net/manual/en/libxml.constants.php
 */
define('LIBXML_COMPACT', 65536);

/**
 * Allows line numbers greater than 65535 to be reported correctly.
 * <p>
 * Only available in Libxml &gt;= 2.9.0
 * </p>
 * @link https://php.net/manual/en/libxml.constants.php
 */
define('LIBXML_BIGLINES', 65535);

/**
 * Drop the XML declaration when saving a document
 * <p>
 * Only available in Libxml &gt;= 2.6.21
 * </p>
 * @link https://php.net/manual/en/libxml.constants.php
 */
define('LIBXML_NOXMLDECL', 2);

/**
 * Sets XML_PARSE_HUGE flag, which relaxes any hardcoded limit from the parser. This affects
 * limits like maximum depth of a document or the entity recursion, as well as limits of the
 * size of text nodes.
 * <p>
 * Only available in Libxml &gt;= 2.7.0 (as of PHP &gt;= 5.3.2 and PHP &gt;= 5.2.12)
 * </p>
 * @link https://php.net/manual/en/libxml.constants.php
 */
define('LIBXML_PARSEHUGE', 524288);

/**
 * Expand empty tags (e.g. &lt;br/&gt; to
 * &lt;br&gt;&lt;/br&gt;)
 * <p>
 * This option is currently just available in the
 * and
 * functions.
 * </p>
 * @link https://php.net/manual/en/libxml.constants.php
 */
define('LIBXML_NOEMPTYTAG', 4);

/**
 * Create default/fixed value nodes during XSD schema validation
 * <p>
 * Only available in Libxml &gt;= 2.6.14 (as of PHP &gt;= 5.5.2)
 * </p>
 * @link https://php.net/manual/en/libxml.constants.php
 */
define('LIBXML_SCHEMA_CREATE', 1);

/**
 * Sets HTML_PARSE_NOIMPLIED flag, which turns off the
 * automatic adding of implied html/body... elements.
 * <p>
 * Only available in Libxml &gt;= 2.7.7 (as of PHP &gt;= 5.4.0)
 * </p>
 * @link https://php.net/manual/en/libxml.constants.php
 */
define('LIBXML_HTML_NOIMPLIED', 8192);

/**
 * Sets HTML_PARSE_NODEFDTD flag, which prevents a default doctype
 * being added when one is not found.
 * <p>
 * Only available in Libxml &gt;= 2.7.8 (as of PHP &gt;= 5.4.0)
 * </p>
 * @link https://php.net/manual/en/libxml.constants.php
 */
define('LIBXML_HTML_NODEFDTD', 4);

/**
 * No errors
 * @link https://php.net/manual/en/libxml.constants.php
 */
define('LIBXML_ERR_NONE', 0);

/**
 * A simple warning
 * @link https://php.net/manual/en/libxml.constants.php
 */
define('LIBXML_ERR_WARNING', 1);

/**
 * A recoverable error
 * @link https://php.net/manual/en/libxml.constants.php
 */
define('LIBXML_ERR_ERROR', 2);

/**
 * A fatal error
 * @link https://php.net/manual/en/libxml.constants.php
 */
define('LIBXML_ERR_FATAL', 3);

// End of libxml v.
<?php
// Start of Phar v.2.0.1

use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;

/**
 * The PharException class provides a phar-specific exception class
 * for try/catch blocks.
 * @link https://php.net/manual/en/class.pharexception.php
 */
class PharException extends Exception {}

/**
 * The Phar class provides a high-level interface to accessing and creating
 * phar archives.
 * @link https://php.net/manual/en/class.phar.php
 */
class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, SeekableIterator, Countable, ArrayAccess
{
    public const BZ2 = 8192;
    public const GZ = 4096;
    public const NONE = 0;
    public const PHAR = 1;
    public const TAR = 2;
    public const ZIP = 3;
    public const COMPRESSED = 61440;
    public const PHP = 0;
    public const PHPS = 1;
    public const MD5 = 1;
    public const OPENSSL = 16;
    public const SHA1 = 2;
    public const SHA256 = 3;
    public const SHA512 = 4;
    public const OPENSSL_SHA256 = 5;
    public const OPENSSL_SHA512 = 6;

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * Construct a Phar archive object
     * @link https://php.net/manual/en/phar.construct.php
     * @param string $filename <p>
     * Path to an existing Phar archive or to-be-created archive. The file name's
     * extension must contain .phar.
     * </p>
     * @param int $flags [optional] <p>
     * Flags to pass to parent class <b>RecursiveDirectoryIterator</b>.
     * </p>
     * @param string $alias [optional] <p>
     * Alias with which this Phar archive should be referred to in calls to stream
     * functionality.
     * </p>
     * @throws BadMethodCallException If called twice.
     * @throws UnexpectedValueException If the phar archive can't be opened.
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FilesystemIterator::KEY_AS_PATHNAME|FilesystemIterator::CURRENT_AS_FILEINFO,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $alias = null,
        #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $fileformat = null
    ) {}

    public function __destruct() {}

    /**
     * (Unknown)<br/>
     * Add an empty directory to the phar archive
     * @link https://php.net/manual/en/phar.addemptydir.php
     * @param string $directory <p>
     * The name of the empty directory to create in the phar archive
     * </p>
     * @return void no return value, exception is thrown on failure.
     */
    #[TentativeType]
    public function addEmptyDir(
        #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $directory = '',
        #[PhpStormStubsElementAvailable(from: '8.0')] string $directory
    ): void {}

    /**
     * (Unknown)<br/>
     * Add a file from the filesystem to the phar archive
     * @link https://php.net/manual/en/phar.addfile.php
     * @param string $filename <p>
     * Full or relative path to a file on disk to be added
     * to the phar archive.
     * </p>
     * @param string $localName [optional] <p>
     * Path that the file will be stored in the archive.
     * </p>
     * @return void no return value, exception is thrown on failure.
     */
    #[TentativeType]
    public function addFile(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $localName = null
    ): void {}

    /**
     * (Unknown)<br/>
     * Add a file from the filesystem to the phar archive
     * @link https://php.net/manual/en/phar.addfromstring.php
     * @param string $localName <p>
     * Path that the file will be stored in the archive.
     * </p>
     * @param string $contents <p>
     * The file contents to store
     * </p>
     * @return void no return value, exception is thrown on failure.
     */
    #[TentativeType]
    public function addFromString(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName,
        #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $contents = '',
        #[PhpStormStubsElementAvailable(from: '8.0')] string $contents
    ): void {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 2.0.0)<br/>
     * Construct a phar archive from the files within a directory.
     * @link https://php.net/manual/en/phar.buildfromdirectory.php
     * @param string $directory <p>
     * The full or relative path to the directory that contains all files
     * to add to the archive.
     * </p>
     * @param $pattern $regex [optional] <p>
     * An optional pcre regular expression that is used to filter the
     * list of files. Only file paths matching the regular expression
     * will be included in the archive.
     * </p>
     * @return array <b>Phar::buildFromDirectory</b> returns an associative array
     * mapping internal path of file to the full path of the file on the
     * filesystem.
     */
    #[TentativeType]
    public function buildFromDirectory(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $directory,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern = null
    ): array {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 2.0.0)<br/>
     * Construct a phar archive from an iterator.
     * @link https://php.net/manual/en/phar.buildfromiterator.php
     * @param Traversable $iterator <p>
     * Any iterator that either associatively maps phar file to location or
     * returns SplFileInfo objects
     * </p>
     * @param string $baseDirectory [optional] <p>
     * For iterators that return SplFileInfo objects, the portion of each
     * file's full path to remove when adding to the phar archive
     * </p>
     * @return array <b>Phar::buildFromIterator</b> returns an associative array
     * mapping internal path of file to the full path of the file on the
     * filesystem.
     */
    #[TentativeType]
    public function buildFromIterator(
        Traversable $iterator,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $baseDirectory = null
    ): array {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 2.0.0)<br/>
     * Compresses all files in the current Phar archive
     * @link https://php.net/manual/en/phar.compressfiles.php
     * @param int $compression <p>
     * Compression must be one of Phar::GZ,
     * Phar::BZ2 to add compression, or Phar::NONE
     * to remove compression.
     * </p>
     * @return void No value is returned.
     */
    #[TentativeType]
    public function compressFiles(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $compression): void {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 2.0.0)<br/>
     * Decompresses all files in the current Phar archive
     * @link https://php.net/manual/en/phar.decompressfiles.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function decompressFiles() {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 2.0.0)<br/>
     * Compresses the entire Phar archive using Gzip or Bzip2 compression
     * @link https://php.net/manual/en/phar.compress.php
     * @param int $compression <p>
     * Compression must be one of Phar::GZ,
     * Phar::BZ2 to add compression, or Phar::NONE
     * to remove compression.
     * </p>
     * @param string $extension [optional] <p>
     * By default, the extension is .phar.gz
     * or .phar.bz2 for compressing phar archives, and
     * .phar.tar.gz or .phar.tar.bz2 for
     * compressing tar archives. For decompressing, the default file extensions
     * are .phar and .phar.tar.
     * </p>
     * @return static|null a <b>Phar</b> object.
     */
    #[TentativeType]
    public function compress(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $compression,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $extension = null
    ): ?Phar {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 2.0.0)<br/>
     * Decompresses the entire Phar archive
     * @link https://php.net/manual/en/phar.decompress.php
     * @param string $extension [optional] <p>
     * For decompressing, the default file extensions
     * are .phar and .phar.tar.
     * Use this parameter to specify another file extension. Be aware
     * that all executable phar archives must contain .phar
     * in their filename.
     * </p>
     * @return static|null A <b>Phar</b> object is returned.
     */
    #[TentativeType]
    public function decompress(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $extension = null): ?Phar {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 2.0.0)<br/>
     * Convert a phar archive to another executable phar archive file format
     * @link https://php.net/manual/en/phar.converttoexecutable.php
     * @param int $format [optional] <p>
     * This should be one of Phar::PHAR, Phar::TAR,
     * or Phar::ZIP. If set to <b>NULL</b>, the existing file format
     * will be preserved.
     * </p>
     * @param int $compression [optional] <p>
     * This should be one of Phar::NONE for no whole-archive
     * compression, Phar::GZ for zlib-based compression, and
     * Phar::BZ2 for bzip-based compression.
     * </p>
     * @param string $extension [optional] <p>
     * This parameter is used to override the default file extension for a
     * converted archive. Note that all zip- and tar-based phar archives must contain
     * .phar in their file extension in order to be processed as a
     * phar archive.
     * </p>
     * <p>
     * If converting to a phar-based archive, the default extensions are
     * .phar, .phar.gz, or .phar.bz2
     * depending on the specified compression. For tar-based phar archives, the
     * default extensions are .phar.tar, .phar.tar.gz,
     * and .phar.tar.bz2. For zip-based phar archives, the
     * default extension is .phar.zip.
     * </p>
     * @return Phar|null The method returns a <b>Phar</b> object on success and throws an
     * exception on failure.
     */
    #[TentativeType]
    public function convertToExecutable(
        #[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $format = 9021976,
        #[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $compression = 9021976,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $extension = null
    ): ?Phar {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 2.0.0)<br/>
     * Convert a phar archive to a non-executable tar or zip file
     * @link https://php.net/manual/en/phar.converttodata.php
     * @param int $format [optional] <p>
     * This should be one of Phar::TAR
     * or Phar::ZIP. If set to <b>NULL</b>, the existing file format
     * will be preserved.
     * </p>
     * @param int $compression [optional] <p>
     * This should be one of Phar::NONE for no whole-archive
     * compression, Phar::GZ for zlib-based compression, and
     * Phar::BZ2 for bzip-based compression.
     * </p>
     * @param string $extension [optional] <p>
     * This parameter is used to override the default file extension for a
     * converted archive. Note that .phar cannot be used
     * anywhere in the filename for a non-executable tar or zip archive.
     * </p>
     * <p>
     * If converting to a tar-based phar archive, the
     * default extensions are .tar, .tar.gz,
     * and .tar.bz2 depending on specified compression.
     * For zip-based archives, the
     * default extension is .zip.
     * </p>
     * @return PharData|null The method returns a <b>PharData</b> object on success and throws an
     * exception on failure.
     */
    #[TentativeType]
    public function convertToData(
        #[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $format = 9021976,
        #[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $compression = 9021976,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $extension = null
    ): ?PharData {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 2.0.0)<br/>
     * Copy a file internal to the phar archive to another new file within the phar
     * @link https://php.net/manual/en/phar.copy.php
     * @param string $to
     * @param string $from
     * @return bool returns <b>TRUE</b> on success, but it is safer to encase method call in a
     * try/catch block and assume success if no exception is thrown.
     */
    public function copy(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $to,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $from
    ) {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * Returns the number of entries (files) in the Phar archive
     * @link https://php.net/manual/en/phar.count.php
     * @param int $mode [optional]
     * @return int<0,max> The number of files contained within this phar, or 0 (the number zero)
     * if none.
     */
    #[TentativeType]
    public function count(#[PhpStormStubsElementAvailable(from: '8.0')] int $mode = COUNT_NORMAL): int {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 2.0.0)<br/>
     * Delete a file within a phar archive
     * @link https://php.net/manual/en/phar.delete.php
     * @param string $localName <p>
     * Path within an archive to the file to delete.
     * </p>
     * @return bool returns <b>TRUE</b> on success, but it is better to check for thrown exception,
     * and assume success if none is thrown.
     */
    public function delete(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName) {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.2.0)<br/>
     * Deletes the global metadata of the phar
     * @link https://php.net/manual/en/phar.delmetadata.php
     * @return bool returns <b>TRUE</b> on success, but it is better to check for thrown exception,
     * and assume success if none is thrown.
     */
    public function delMetadata() {}

    /**
     * (Unknown)<br/>
     * Extract the contents of a phar archive to a directory
     * @link https://php.net/manual/en/phar.extractto.php
     * @param string $directory <p>
     * Path within an archive to the file to delete.
     * </p>
     * @param string|array|null $files [optional] <p>
     * The name of a file or directory to extract, or an array of files/directories to extract
     * </p>
     * @param bool $overwrite [optional] <p>
     * Set to <b>TRUE</b> to enable overwriting existing files
     * </p>
     * @return bool returns <b>TRUE</b> on success, but it is better to check for thrown exception,
     * and assume success if none is thrown.
     */
    #[TentativeType]
    public function extractTo(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $directory,
        #[LanguageLevelTypeAware(['8.0' => 'array|string|null'], default: '')] $files = null,
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $overwrite = false
    ): bool {}

    /**
     * @return string|null
     * @see setAlias
     */
    #[TentativeType]
    public function getAlias(): ?string {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * Returns phar archive meta-data
     * @link https://php.net/manual/en/phar.getmetadata.php
     * @param array $unserializeOptions [optional] if is set to anything other than the default,
     * the resulting metadata won't be cached and this won't return the value from the cache
     * @return mixed any PHP variable that can be serialized and is stored as meta-data for the Phar archive,
     * or <b>NULL</b> if no meta-data is stored.
     */
    #[TentativeType]
    public function getMetadata(#[PhpStormStubsElementAvailable(from: '8.0')] array $unserializeOptions = []): mixed {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * Return whether phar was modified
     * @link https://php.net/manual/en/phar.getmodified.php
     * @return bool <b>TRUE</b> if the phar has been modified since opened, <b>FALSE</b> if not.
     */
    #[TentativeType]
    public function getModified(): bool {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * Return MD5/SHA1/SHA256/SHA512/OpenSSL signature of a Phar archive
     * @link https://php.net/manual/en/phar.getsignature.php
     * @return array Array with the opened archive's signature in hash key and MD5,
     * SHA-1,
     * SHA-256, SHA-512, or OpenSSL
     * in hash_type. This signature is a hash calculated on the
     * entire phar's contents, and may be used to verify the integrity of the archive.
     * A valid signature is absolutely required of all executable phar archives if the
     * phar.require_hash INI variable
     * is set to true.
     */
    #[ArrayShape(["hash" => "string", "hash_type" => "string"])]
    #[TentativeType]
    public function getSignature(): array|false {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * Return the PHP loader or bootstrap stub of a Phar archive
     * @link https://php.net/manual/en/phar.getstub.php
     * @return string a string containing the contents of the bootstrap loader (stub) of
     * the current Phar archive.
     */
    #[TentativeType]
    public function getStub(): string {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * Return version info of Phar archive
     * @link https://php.net/manual/en/phar.getversion.php
     * @return string The opened archive's API version. This is not to be confused with
     * the API version that the loaded phar extension will use to create
     * new phars. Each Phar archive has the API version hard-coded into
     * its manifest. See Phar file format
     * documentation for more information.
     */
    #[TentativeType]
    public function getVersion(): string {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.2.0)<br/>
     * Returns whether phar has global meta-data
     * @link https://php.net/manual/en/phar.hasmetadata.php
     * @return bool <b>TRUE</b> if meta-data has been set, and <b>FALSE</b> if not.
     */
    #[TentativeType]
    public function hasMetadata(): bool {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * Used to determine whether Phar write operations are being buffered, or are flushing directly to disk
     * @link https://php.net/manual/en/phar.isbuffering.php
     * @return bool <b>TRUE</b> if the write operations are being buffer, <b>FALSE</b> otherwise.
     */
    #[TentativeType]
    public function isBuffering(): bool {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 2.0.0)<br/>
     * Returns Phar::GZ or PHAR::BZ2 if the entire phar archive is compressed (.tar.gz/tar.bz and so on)
     * @link https://php.net/manual/en/phar.iscompressed.php
     * @return mixed Phar::GZ, Phar::BZ2 or <b>FALSE</b>
     */
    #[TentativeType]
    public function isCompressed(): int|false {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 2.0.0)<br/>
     * Returns true if the phar archive is based on the tar/phar/zip file format depending on the parameter
     * @link https://php.net/manual/en/phar.isfileformat.php
     * @param int $format <p>
     * Either Phar::PHAR, Phar::TAR, or
     * Phar::ZIP to test for the format of the archive.
     * </p>
     * @return bool <b>TRUE</b> if the phar archive matches the file format requested by the parameter
     */
    #[TentativeType]
    public function isFileFormat(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $format): bool {}

    /**
     * (Unknown)<br/>
     * Returns true if the phar archive can be modified
     * @link https://php.net/manual/en/phar.iswritable.php
     * @return bool <b>TRUE</b> if the phar archive can be modified
     */
    #[TentativeType]
    public function isWritable(): bool {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * determines whether a file exists in the phar
     * @link https://php.net/manual/en/phar.offsetexists.php
     * @param string $localName <p>
     * The filename (relative path) to look for in a Phar.
     * </p>
     * @return bool <b>TRUE</b> if the file exists within the phar, or <b>FALSE</b> if not.
     */
    #[TentativeType]
    public function offsetExists($localName): bool {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * Gets a <b>PharFileInfo</b> object for a specific file
     * @link https://php.net/manual/en/phar.offsetget.php
     * @param string $localName <p>
     * The filename (relative path) to look for in a Phar.
     * </p>
     * @return PharFileInfo A <b>PharFileInfo</b> object is returned that can be used to
     * iterate over a file's contents or to retrieve information about the current file.
     */
    #[TentativeType]
    public function offsetGet($localName): SplFileInfo {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * set the contents of an internal file to those of an external file
     * @link https://php.net/manual/en/phar.offsetset.php
     * @param string $localName <p>
     * The filename (relative path) to modify in a Phar.
     * </p>
     * @param string $value <p>
     * Content of the file.
     * </p>
     * @return void No return values.
     */
    #[TentativeType]
    public function offsetSet($localName, $value): void {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * remove a file from a phar
     * @link https://php.net/manual/en/phar.offsetunset.php
     * @param string $localName <p>
     * The filename (relative path) to modify in a Phar.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function offsetUnset($localName): void {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.2.1)<br/>
     * Set the alias for the Phar archive
     * @link https://php.net/manual/en/phar.setalias.php
     * @param string $alias <p>
     * A shorthand string that this archive can be referred to in phar
     * stream wrapper access.
     * </p>
     * @return bool
     */
    #[TentativeType]
    public function setAlias(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $alias): bool {}

    /**
     * (Unknown)<br/>
     * Used to set the PHP loader or bootstrap stub of a Phar archive to the default loader
     * @link https://php.net/manual/en/phar.setdefaultstub.php
     * @param string $index [optional] <p>
     * Relative path within the phar archive to run if accessed on the command-line
     * </p>
     * @param string $webIndex [optional] <p>
     * Relative path within the phar archive to run if accessed through a web browser
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function setDefaultStub(
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $index = null,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $webIndex = null
    ): bool {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * Sets phar archive meta-data
     * @link https://php.net/manual/en/phar.setmetadata.php
     * @param mixed $metadata <p>
     * Any PHP variable containing information to store that describes the phar archive
     * </p>
     * @return void No value is returned.
     */
    #[TentativeType]
    public function setMetadata(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $metadata): void {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.1.0)<br/>
     * set the signature algorithm for a phar and apply it.
     * @link https://php.net/manual/en/phar.setsignaturealgorithm.php
     * @param int $algo <p>
     * One of Phar::MD5,
     * Phar::SHA1, Phar::SHA256,
     * Phar::SHA512, or Phar::OPENSSL
     * </p>
     * @param string $privateKey [optional] <p>
     * The contents of an OpenSSL private key, as extracted from a certificate or
     * OpenSSL key file:
     * <code>
     * $private = openssl_get_privatekey(file_get_contents('private.pem'));
     * $pkey = '';
     * openssl_pkey_export($private, $pkey);
     * $p->setSignatureAlgorithm(Phar::OPENSSL, $pkey);
     * </code>
     * See phar introduction for instructions on
     * naming and placement of the public key file.
     * </p>
     * @return void No value is returned.
     */
    #[TentativeType]
    public function setSignatureAlgorithm(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $algo,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $privateKey = null
    ): void {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * Used to set the PHP loader or bootstrap stub of a Phar archive
     * @link https://php.net/manual/en/phar.setstub.php
     * @param string $stub <p>
     * A string or an open stream handle to use as the executable stub for this
     * phar archive.
     * </p>
     * @param int $length [optional] <p>
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function setStub(
        $stub,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $length = -1
    ) {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * Start buffering Phar write operations, do not modify the Phar object on disk
     * @link https://php.net/manual/en/phar.startbuffering.php
     * @return void No value is returned.
     */
    #[TentativeType]
    public function startBuffering(): void {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * Stop buffering write requests to the Phar archive, and save changes to disk
     * @link https://php.net/manual/en/phar.stopbuffering.php
     * @return void No value is returned.
     */
    #[TentativeType]
    public function stopBuffering(): void {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * Returns the api version
     * @link https://php.net/manual/en/phar.apiversion.php
     * @return string The API version string as in &#x00022;1.0.0&#x00022;.
     */
    final public static function apiVersion(): string {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * Returns whether phar extension supports compression using either zlib or bzip2
     * @link https://php.net/manual/en/phar.cancompress.php
     * @param int $compression [optional] <p>
     * Either Phar::GZ or Phar::BZ2 can be
     * used to test whether compression is possible with a specific compression
     * algorithm (zlib or bzip2).
     * </p>
     * @return bool <b>TRUE</b> if compression/decompression is available, <b>FALSE</b> if not.
     */
    final public static function canCompress(int $compression = 0): bool {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * Returns whether phar extension supports writing and creating phars
     * @link https://php.net/manual/en/phar.canwrite.php
     * @return bool <b>TRUE</b> if write access is enabled, <b>FALSE</b> if it is disabled.
     */
    final public static function canWrite(): bool {}

    /**
     * (Unknown)<br/>
     * Create a phar-file format specific stub
     * @link https://php.net/manual/en/phar.createdefaultstub.php
     * @param string|null $index [optional]
     * @param string|null $webIndex [optional]
     * @return string a string containing the contents of a customized bootstrap loader (stub)
     * that allows the created Phar archive to work with or without the Phar extension
     * enabled.
     */
    final public static function createDefaultStub(?string $index = null, ?string $webIndex = null): string {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.2.0)<br/>
     * Return array of supported compression algorithms
     * @link https://php.net/manual/en/phar.getsupportedcompression.php
     * @return string[] an array containing any of "GZ" or
     * "BZ2", depending on the availability of
     * the zlib extension or the
     * bz2 extension.
     */
    final public static function getSupportedCompression(): array {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.1.0)<br/>
     * Return array of supported signature types
     * @link https://php.net/manual/en/phar.getsupportedsignatures.php
     * @return string[] an array containing any of "MD5", "SHA-1",
     * "SHA-256", "SHA-512", or "OpenSSL".
     */
    final public static function getSupportedSignatures(): array {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 2.0.0)<br/>
     * instructs phar to intercept fopen, file_get_contents, opendir, and all of the stat-related functions
     * @link https://php.net/manual/en/phar.interceptfilefuncs.php
     * @return void
     */
    final public static function interceptFileFuncs(): void {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.2.0)<br/>
     * Returns whether the given filename is a valid phar filename
     * @link https://php.net/manual/en/phar.isvalidpharfilename.php
     * @param string $filename <p>
     * The name or full path to a phar archive not yet created
     * </p>
     * @param bool $executable [optional] <p>
     * This parameter determines whether the filename should be treated as
     * a phar executable archive, or a data non-executable archive
     * </p>
     * @return bool <b>TRUE</b> if the filename is valid, <b>FALSE</b> if not.
     */
    final public static function isValidPharFilename(string $filename, bool $executable = true): bool {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * Loads any phar archive with an alias
     * @link https://php.net/manual/en/phar.loadphar.php
     * @param string $filename <p>
     * the full or relative path to the phar archive to open
     * </p>
     * @param string|null $alias [optional] <p>
     * The alias that may be used to refer to the phar archive. Note
     * that many phar archives specify an explicit alias inside the
     * phar archive, and a <b>PharException</b> will be thrown if
     * a new alias is specified in this case.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    final public static function loadPhar(string $filename, ?string $alias = null): bool {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * Reads the currently executed file (a phar) and registers its manifest
     * @link https://php.net/manual/en/phar.mapphar.php
     * @param string|null $alias [optional] <p>
     * The alias that can be used in phar:// URLs to
     * refer to this archive, rather than its full path.
     * </p>
     * @param int $offset [optional] <p>
     * Unused variable, here for compatibility with PEAR's PHP_Archive.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    final public static function mapPhar(?string $alias = null, int $offset = 0): bool {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 2.0.0)<br/>
     * Returns the full path on disk or full phar URL to the currently executing Phar archive
     * @link https://php.net/manual/en/phar.running.php
     * @param bool $returnPhar <p>
     * If <b>FALSE</b>, the full path on disk to the phar
     * archive is returned. If <b>TRUE</b>, a full phar URL is returned.
     * </p>
     * @return string the filename if valid, empty string otherwise.
     */
    final public static function running(
        #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $returnPhar,
        #[PhpStormStubsElementAvailable(from: '7.0')] bool $returnPhar = true
    ): string {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 2.0.0)<br/>
     * Mount an external path or file to a virtual location within the phar archive
     * @link https://php.net/manual/en/phar.mount.php
     * @param string $pharPath <p>
     * The internal path within the phar archive to use as the mounted path location.
     * This must be a relative path within the phar archive, and must not already exist.
     * </p>
     * @param string $externalPath <p>
     * A path or URL to an external file or directory to mount within the phar archive
     * </p>
     * @return void No return. <b>PharException</b> is thrown on failure.
     */
    final public static function mount(string $pharPath, string $externalPath): void {}

    /**
     * (Unknown)<br/>
     * Defines a list of up to 4 $_SERVER variables that should be modified for execution
     * @link https://php.net/manual/en/phar.mungserver.php
     * @param array $variables <p>
     * an array containing as string indices any of
     * REQUEST_URI, PHP_SELF,
     * SCRIPT_NAME and SCRIPT_FILENAME.
     * Other values trigger an exception, and <b>Phar::mungServer</b>
     * is case-sensitive.
     * </p>
     * @return void No return.
     */
    final public static function mungServer(array $variables): void {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 2.0.0)<br/>
     * Completely remove a phar archive from disk and from memory
     * @link https://php.net/manual/en/phar.unlinkarchive.php
     * @param string $filename <p>
     * The path on disk to the phar archive.
     * </p>
     * @throws PharException
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    final public static function unlinkArchive(string $filename): bool {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 2.0.0)<br/>
     * mapPhar for web-based phars. front controller for web applications
     * @link https://php.net/manual/en/phar.webphar.php
     * @param null|string $alias [optional] <p>
     * The alias that can be used in phar:// URLs to
     * refer to this archive, rather than its full path.
     * </p>
     * @param string|null $index [optional] <p>
     * The location within the phar of the directory index.
     * </p>
     * @param null|string $fileNotFoundScript [optional] <p>
     * The location of the script to run when a file is not found. This
     * script should output the proper HTTP 404 headers.
     * </p>
     * @param null|array $mimeTypes [optional] <p>
     * An array mapping additional file extensions to MIME type.
     * If the default mapping is sufficient, pass an empty array.
     * By default, these extensions are mapped to these MIME types:
     * <code>
     * $mimes = array(
     * 'phps' => Phar::PHPS, // pass to highlight_file()
     * 'c' => 'text/plain',
     * 'cc' => 'text/plain',
     * 'cpp' => 'text/plain',
     * 'c++' => 'text/plain',
     * 'dtd' => 'text/plain',
     * 'h' => 'text/plain',
     * 'log' => 'text/plain',
     * 'rng' => 'text/plain',
     * 'txt' => 'text/plain',
     * 'xsd' => 'text/plain',
     * 'php' => Phar::PHP, // parse as PHP
     * 'inc' => Phar::PHP, // parse as PHP
     * 'avi' => 'video/avi',
     * 'bmp' => 'image/bmp',
     * 'css' => 'text/css',
     * 'gif' => 'image/gif',
     * 'htm' => 'text/html',
     * 'html' => 'text/html',
     * 'htmls' => 'text/html',
     * 'ico' => 'image/x-ico',
     * 'jpe' => 'image/jpeg',
     * 'jpg' => 'image/jpeg',
     * 'jpeg' => 'image/jpeg',
     * 'js' => 'application/x-javascript',
     * 'midi' => 'audio/midi',
     * 'mid' => 'audio/midi',
     * 'mod' => 'audio/mod',
     * 'mov' => 'movie/quicktime',
     * 'mp3' => 'audio/mp3',
     * 'mpg' => 'video/mpeg',
     * 'mpeg' => 'video/mpeg',
     * 'pdf' => 'application/pdf',
     * 'png' => 'image/png',
     * 'swf' => 'application/shockwave-flash',
     * 'tif' => 'image/tiff',
     * 'tiff' => 'image/tiff',
     * 'wav' => 'audio/wav',
     * 'xbm' => 'image/xbm',
     * 'xml' => 'text/xml',
     * );
     * </code>
     * </p>
     * @param null|callable $rewrite [optional] <p>
     * The rewrites function is passed a string as its only parameter and must return a string or <b>FALSE</b>.
     * </p>
     * <p>
     * If you are using fast-cgi or cgi then the parameter passed to the function is the value of the
     * $_SERVER['PATH_INFO'] variable. Otherwise, the parameter passed to the function is the value
     * of the $_SERVER['REQUEST_URI'] variable.
     * </p>
     * <p>
     * If a string is returned it is used as the internal file path. If <b>FALSE</b> is returned then webPhar() will
     * send a HTTP 403 Denied Code.
     * </p>
     * @return void No value is returned.
     */
    final public static function webPhar(
        ?string $alias = null,
        ?string $index = "index.php",
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: 'string')] $fileNotFoundScript = null,
        array $mimeTypes = null,
        ?callable $rewrite = null
    ): void {}

    /**
     * Returns whether current entry is a directory and not '.' or '..'
     * @link https://php.net/manual/en/recursivedirectoryiterator.haschildren.php
     * @param bool $allow_links [optional] <p>
     * </p>
     * @return bool whether the current entry is a directory, but not '.' or '..'
     */
    public function hasChildren($allow_links = false) {}

    /**
     * Returns an iterator for the current entry if it is a directory
     * @link https://php.net/manual/en/recursivedirectoryiterator.getchildren.php
     * @return mixed The filename, file information, or $this depending on the set flags.
     * See the FilesystemIterator
     * constants.
     */
    public function getChildren() {}

    /**
     * Rewinds back to the beginning
     * @link https://php.net/manual/en/filesystemiterator.rewind.php
     * @return void No value is returned.
     */
    public function rewind() {}

    /**
     * Move to the next file
     * @link https://php.net/manual/en/filesystemiterator.next.php
     * @return void No value is returned.
     */
    public function next() {}

    /**
     * Retrieve the key for the current file
     * @link https://php.net/manual/en/filesystemiterator.key.php
     * @return string the pathname or filename depending on the set flags.
     * See the FilesystemIterator constants.
     */
    public function key() {}

    /**
     * The current file
     * @link https://php.net/manual/en/filesystemiterator.current.php
     * @return mixed The filename, file information, or $this depending on the set flags.
     * See the FilesystemIterator constants.
     */
    public function current() {}

    /**
     * Check whether current DirectoryIterator position is a valid file
     * @link https://php.net/manual/en/directoryiterator.valid.php
     * @return bool <b>TRUE</b> if the position is valid, otherwise <b>FALSE</b>
     */
    public function valid() {}

    /**
     * Seek to a DirectoryIterator item
     * @link https://php.net/manual/en/directoryiterator.seek.php
     * @param int $position <p>
     * The zero-based numeric position to seek to.
     * </p>
     * @return void No value is returned.
     */
    public function seek($position) {}

    public function _bad_state_ex() {}
}

/**
 * The PharData class provides a high-level interface to accessing and creating
 * non-executable tar and zip archives. Because these archives do not contain
 * a stub and cannot be executed by the phar extension, it is possible to create
 * and manipulate regular zip and tar files using the PharData class even if
 * phar.readonly php.ini setting is 1.
 * @link https://php.net/manual/en/class.phardata.php
 */
class PharData extends Phar
{
    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 2.0.0)<br/>
     * Construct a non-executable tar or zip archive object
     * @link https://php.net/manual/en/phardata.construct.php
     * @param string $filename <p>
     * Path to an existing tar/zip archive or to-be-created archive
     * </p>
     * @param int $flags [optional] <p>
     * Flags to pass to <b>Phar</b> parent class
     * <b>RecursiveDirectoryIterator</b>.
     * </p>
     * @param string $alias [optional] <p>
     * Alias with which this Phar archive should be referred to in calls to stream
     * functionality.
     * </p>
     * @param int $format [optional] <p>
     * One of the
     * file format constants
     * available within the <b>Phar</b> class.
     * </p>
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FilesystemIterator::KEY_AS_PATHNAME|FilesystemIterator::CURRENT_AS_FILEINFO,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $alias = null,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $format = Phar::TAR
    ) {}

    /**
     * @param string $localName
     * @return bool
     */
    #[TentativeType]
    public function offsetExists($localName): bool {}

    /**
     * @param string $localName
     * @return SplFileInfo
     */
    #[TentativeType]
    public function offsetGet($localName): SplFileInfo {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 2.0.0)<br/>
     * set the contents of a file within the tar/zip to those of an external file or string
     * @link https://php.net/manual/en/phardata.offsetset.php
     * @param string $localName <p>
     * The filename (relative path) to modify in a tar or zip archive.
     * </p>
     * @param string $value <p>
     * Content of the file.
     * </p>
     * @return void No return values.
     */
    #[TentativeType]
    public function offsetSet($localName, $value): void {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 2.0.0)<br/>
     * remove a file from a tar/zip archive
     * @link https://php.net/manual/en/phardata.offsetunset.php
     * @param string $localName <p>
     * The filename (relative path) to modify in the tar/zip archive.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function offsetUnset($localName): void {}

    /**
     * Returns whether current entry is a directory and not '.' or '..'
     * @link https://php.net/manual/en/recursivedirectoryiterator.haschildren.php
     * @param bool $allow_links [optional] <p>
     * </p>
     * @return bool whether the current entry is a directory, but not '.' or '..'
     */
    public function hasChildren($allow_links = false) {}

    /**
     * Returns an iterator for the current entry if it is a directory
     * @link https://php.net/manual/en/recursivedirectoryiterator.getchildren.php
     * @return mixed The filename, file information, or $this depending on the set flags.
     * See the FilesystemIterator
     * constants.
     */
    public function getChildren() {}

    /**
     * Rewinds back to the beginning
     * @link https://php.net/manual/en/filesystemiterator.rewind.php
     * @return void No value is returned.
     */
    public function rewind() {}

    /**
     * Move to the next file
     * @link https://php.net/manual/en/filesystemiterator.next.php
     * @return void No value is returned.
     */
    public function next() {}

    /**
     * Retrieve the key for the current file
     * @link https://php.net/manual/en/filesystemiterator.key.php
     * @return string the pathname or filename depending on the set flags.
     * See the FilesystemIterator constants.
     */
    public function key() {}

    /**
     * The current file
     * @link https://php.net/manual/en/filesystemiterator.current.php
     * @return mixed The filename, file information, or $this depending on the set flags.
     * See the FilesystemIterator constants.
     */
    public function current() {}

    /**
     * Check whether current DirectoryIterator position is a valid file
     * @link https://php.net/manual/en/directoryiterator.valid.php
     * @return bool <b>TRUE</b> if the position is valid, otherwise <b>FALSE</b>
     */
    public function valid() {}

    /**
     * Seek to a DirectoryIterator item
     * @link https://php.net/manual/en/directoryiterator.seek.php
     * @param int $position <p>
     * The zero-based numeric position to seek to.
     * </p>
     * @return void No value is returned.
     */
    public function seek($position) {}
}

/**
 * The PharFileInfo class provides a high-level interface to the contents
 * and attributes of a single file within a phar archive.
 * @link https://php.net/manual/en/class.pharfileinfo.php
 */
class PharFileInfo extends SplFileInfo
{
    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * Construct a Phar entry object
     * @link https://php.net/manual/en/pharfileinfo.construct.php
     * @param string $filename <p>
     * The full url to retrieve a file. If you wish to retrieve the information
     * for the file my/file.php from the phar boo.phar,
     * the entry should be phar://boo.phar/my/file.php.
     * </p>
     */
    public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename) {}

    public function __destruct() {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * Sets file-specific permission bits
     * @link https://php.net/manual/en/pharfileinfo.chmod.php
     * @param int $perms <p>
     * permissions (see <b>chmod</b>)
     * </p>
     * @return void No value is returned.
     */
    #[TentativeType]
    public function chmod(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $perms): void {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 2.0.0)<br/>
     * Compresses the current Phar entry with either zlib or bzip2 compression
     * @link https://php.net/manual/en/pharfileinfo.compress.php
     * @param int $compression
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function compress(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $compression) {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 2.0.0)<br/>
     * Decompresses the current Phar entry within the phar
     * @link https://php.net/manual/en/pharfileinfo.decompress.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function decompress() {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.2.0)<br/>
     * Deletes the metadata of the entry
     * @link https://php.net/manual/en/pharfileinfo.delmetadata.php
     * @return bool <b>TRUE</b> if successful, <b>FALSE</b> if the entry had no metadata.
     * As with all functionality that modifies the contents of
     * a phar, the phar.readonly INI variable
     * must be off in order to succeed if the file is within a <b>Phar</b>
     * archive. Files within <b>PharData</b> archives do not have
     * this restriction.
     */
    public function delMetadata() {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * Returns the actual size of the file (with compression) inside the Phar archive
     * @link https://php.net/manual/en/pharfileinfo.getcompressedsize.php
     * @return int<0, max> The size in bytes of the file within the Phar archive on disk.
     */
    #[TentativeType]
    public function getCompressedSize(): int {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * Returns CRC32 code or throws an exception if CRC has not been verified
     * @link https://php.net/manual/en/pharfileinfo.getcrc32.php
     * @return int The <b>crc32</b> checksum of the file within the Phar archive.
     */
    #[TentativeType]
    public function getCRC32(): int {}

    #[TentativeType]
    public function getContent(): string {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * Returns file-specific meta-data saved with a file
     * @link https://php.net/manual/en/pharfileinfo.getmetadata.php
     * @param array $unserializeOptions [optional] if is set to anything other than the default,
     * the resulting metadata won't be cached and this won't return the value from the cache
     * @return mixed any PHP variable that can be serialized and is stored as meta-data for the file,
     * or <b>NULL</b> if no meta-data is stored.
     */
    #[TentativeType]
    public function getMetadata(#[PhpStormStubsElementAvailable(from: '8.0')] array $unserializeOptions = []): mixed {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * Returns the Phar file entry flags
     * @link https://php.net/manual/en/pharfileinfo.getpharflags.php
     * @return int The Phar flags (always 0 in the current implementation)
     */
    #[TentativeType]
    public function getPharFlags(): int {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.2.0)<br/>
     * Returns the metadata of the entry
     * @link https://php.net/manual/en/pharfileinfo.hasmetadata.php
     * @return bool <b>FALSE</b> if no metadata is set or is <b>NULL</b>, <b>TRUE</b> if metadata is not <b>NULL</b>
     */
    #[TentativeType]
    public function hasMetadata(): bool {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * Returns whether the entry is compressed
     * @link https://php.net/manual/en/pharfileinfo.iscompressed.php
     * @param int $compression [optional] <p>
     * One of <b>Phar::GZ</b> or <b>Phar::BZ2</b>,
     * defaults to any compression.
     * </p>
     * @return bool <b>TRUE</b> if the file is compressed within the Phar archive, <b>FALSE</b> if not.
     */
    #[TentativeType]
    public function isCompressed(#[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $compression = 9021976): bool {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * Returns whether file entry has had its CRC verified
     * @link https://php.net/manual/en/pharfileinfo.iscrcchecked.php
     * @return bool <b>TRUE</b> if the file has had its CRC verified, <b>FALSE</b> if not.
     */
    #[TentativeType]
    public function isCRCChecked(): bool {}

    /**
     * (PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)<br/>
     * Sets file-specific meta-data saved with a file
     * @link https://php.net/manual/en/pharfileinfo.setmetadata.php
     * @param mixed $metadata <p>
     * Any PHP variable containing information to store alongside a file
     * </p>
     * @return void No value is returned.
     */
    #[TentativeType]
    public function setMetadata(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $metadata): void {}
}
// End of Phar v.2.0.1
<?php

/**
 * Stub file - DO NOT INCLUDE! = For PHPStorm to analyse.
 */

/**
 * Begin constants.
 */
define('AppWindow', 1); // A fixed-size application window.
define('ModalDialog', 2); // A modal dialog box (requires to be closed before continuing to other tasks).
define('ModelessDialog', 3); // A modeless dialog box (other tasks can be performed while it is open).
define('NakedWindow', 4); // A fixed-size application window with no border and no title bar.
define('PopupWindow', 5); // A fixed-size application window that cannot be minimized.
define('ResizableWindow', 6); // A normal application window with a resizable border.
define('ToolDialog', 7); // A modeless dialog box with a small caption.
define('Accel', 8);
define('Calendar', 9);
define('CheckBox', 10);
define('ComboBox', 11);
define('EditBox', 12);
define('Frame', 13);
define('Gauge', 14);
define('HTMLControl', 15);
define('HyperLink', 16);
define('ImageButton', 17);
define('InvisibleArea', 18);
define('Label', 19);
define('ListBox', 20);
define('ListView', 21);
define('Menu', 22);
define('PushButton', 23);
define('RTFEditBox', 24);
define('RadioButton', 25);
define('ScrollBar', 26);
define('Slider', 27);
define('Spinner', 28);
define('StatusBar', 29);
define('TabControl', 30);
define('ToolBar', 31);
define('TreeView', 32);
define('Timer', Timer); // Doesnt really exist - Added for IDE help
//define('PopupMenu', PopupMenu); // Doesnt really exist - Added for IDE help
define('WBC_VERSION', '2010.10.14');
define('WBC_BORDER', 8);
define('WBC_BOTTOM', 8192);
define('WBC_CENTER', 2048);
define('WBC_CHECKBOXES', 65536);
define('WBC_CUSTOMDRAW', 268435456);
define('WBC_DEFAULTPOS', -2147483648);
define('WBC_DISABLED', 2);
define('WBC_ELLIPSIS', 131072);
define('WBC_ENABLED', 0);
define('WBC_GROUP', 524288);
define('WBC_IMAGE', 4);
define('WBC_INVISIBLE', 1);
define('WBC_LEFT', 0);
define('WBC_LINES', 128);
define('WBC_MASKED', 256);
define('WBC_MIDDLE', 0);
define('WBC_MULTILINE', 128);
define('WBC_NOTIFY', 16);
define('WBC_NUMBER', 1024);
define('WBC_READONLY', 64);
define('WBC_RIGHT', 32);
define('WBC_SINGLE', 1048576);
define('WBC_SORT', 262144);
define('WBC_TASKBAR', 512);
define('WBC_AUTOREPEAT', 512);
define('WBC_TOP', 4096);
define('WBC_VISIBLE', 0);
define('WBC_TRANSPARENT', 536870912);
define('WBC_DEFAULT', 8);
define('WBC_MULTISELECT', 1073741824);
define('WBC_NOHEADER', 268435456);
define('WBC_DBLCLICK', 64);
define('WBC_MOUSEMOVE', 128);
define('WBC_MOUSEDOWN', 256);
define('WBC_MOUSEUP', 512);
define('WBC_KEYDOWN', 1024);
define('WBC_KEYUP', 2048);
define('WBC_GETFOCUS', 4096);
define('WBC_RESIZE', 8192);
define('WBC_REDRAW', 16384);
define('WBC_HEADERSEL', 32768);
define('WBC_ALT', 32);
define('WBC_CONTROL', 8);
define('WBC_SHIFT', 4);
define('WBC_LBUTTON', 1);
define('WBC_MBUTTON', 16);
define('WBC_RBUTTON', 2);
define('WBC_BEEP', -1);
define('WBC_INFO', 64);
define('WBC_OK', 0);
define('WBC_OKCANCEL', 33);
define('WBC_QUESTION', 32);
define('WBC_STOP', 16);
define('WBC_WARNING', 48);
define('WBC_YESNO', 36);
define('WBC_YESNOCANCEL', 35);
define('WBC_MAXIMIZED', 2);
define('WBC_MINIMIZED', 1);
define('WBC_NORMAL', 0);
define('WBC_MINSIZE', 2);
define('WBC_MAXSIZE', 3);
define('WBC_TITLE', 1);

define('WBC_RTF_TEXT', 1);

define('IDABORT', 3);
define('IDCANCEL', 2);
define('IDCLOSE', 8);
define('IDDEFAULT', 0);
define('IDHELP', 9);
define('IDIGNORE', 5);
define('IDNO', 7);
define('IDOK', 1);
define('IDRETRY', 4);
define('IDYES', 6);
define('FTA_BOLD', 1);
define('FTA_ITALIC', 2);
define('FTA_NORMAL', 0);
define('FTA_REGULAR', 0);
define('FTA_STRIKEOUT', 8);
define('FTA_UNDERLINE', 4);
define('BLACK', 0);
define('BLUE', 16711680);
define('CYAN', 16776960);
define('DARKBLUE', 8388608);
define('DARKCYAN', 8421376);
define('DARKGRAY', 8421504);
define('DARKGREEN', 32768);
define('DARKMAGENTA', 8388736);
define('DARKRED', 128);
define('DARKYELLOW', 32896);
define('GREEN', 65280);
define('LIGHTGRAY', 12632256);
define('MAGENTA', 16711935);
define('RED', 255);
define('WHITE', 16777215);
define('YELLOW', 65535);
define('NOCOLOR', -1);
define('bgrBLACK', 0);
define('bgrBLUE', 255);
define('bgrCYAN', 65535);
define('bgrDARKBLUE', 128);
define('bgrDARKCYAN', 32896);
define('bgrDARKGRAY', 8421504);
define('bgrDARKGREEN', 32768);
define('bgrDARKMAGENTA', 8388736);
define('bgrDARKRED', 8388608);
define('bgrDARKYELLOW', 8421376);
define('bgrGREEN', 65280);
define('bgrLIGHTGRAY', 12632256);
define('bgrMAGENTA', 16711935);
define('bgrRED', 16711680);
define('bgrWHITE', 16777215);
define('bgrYELLOW', 16776960);
define('bgrNOCOLOR', -1);

// New @Wagy constants
define('WBC_LV_NONE', 0);
define('WBC_LV_FORE', 1);
define('WBC_LV_BACK', 2);
define('WBC_LV_DEFAULT', 0);
define('WBC_LV_DRAW', 1);
define('WBC_LV_COLUMNS', 2);

/**
 * Begin functions.
 */
/**
 * Enters the Windows main loop.
 * This function must be called if the application has a window.
 * The call to wb_main_loop() must be the last executable statement of the PHP script:
 * All statements after it will be ignored.
 * The return value is used for debugging purposes only and may be ignored.
 * @return void - For debugging
 */
function wb_main_loop() {}

/**
 * Looks for a file in the Windows and System directories, in this order.
 * If the file exists, return the complete path to it.
 * If not, return filename.
 *
 * @param $filename
 *
 * @return string
 */
function wb_find_file($filename) {}

/**
 * Creates and displays a message box under the style supplied and returns a value according to the button pressed.
 *
 * Value for style & What is displayed
 *
 * WBC_OK (the default) - An OK button.
 *
 * WBC_INFO - An information icon and an OK button.
 *
 * WBC_WARNING - An exclamation point icon and an OK button.
 *
 * WBC_STOP - A stop icon and an OK button.
 *
 * WBC_QUESTION - A question mark icon and an OK button.
 *
 * WBC_OKCANCEL - A question mark icon, an OK button and a Cancel button.
 *
 * WBC_YESNO - A question mark icon, a Yes button and a No button.
 *
 * WBC_YESNOCANCEL - A question mark icon, a Yes button, a No button and a Cancel button.
 *
 * @param $parent
 * @param $message
 * @param null $title
 * @param null $style
 *
 * @return int
 */
function wb_message_box($parent, $message, $title = null, $style = null) {}

/**
 * Loads and plays a sound file or system sound.
 * Parameter source may be a sound file name or a system sound constant.
 * Parameter command may be used used to play a WAV sound synchronously or in a loop.
 * A synchronous sound stops the currently playing sound and suspends the application control until it finishes.
 * A MIDI soundtrack always stops any currently playing MIDI soundtrack.
 * To stop one or more sounds, use function wb_stop_sound().
 *
 * Value of $source:
 * MIDI file name - Load and play the specified MIDI file.
 *
 * WBC_OK - Default system sound
 *
 * WBC_INFO - System information sound
 *
 * WBC_WARNING - Warning sound
 *
 * WBC_STOP - Error sound
 *
 * WBC_QUESTION - Question sound
 *
 * WBC_BEEP - Default beep (via the computer speaker)
 *
 * Value of $command:
 * null or empty - Load and play the specified WAV sound file.
 *
 * 'sync' - Load and play the specified WAV sound file synchronously.
 *
 * 'loop' - Load and loop the specified WAV sound file.
 *
 * Returns TRUE on success or FALSE otherwise.
 *
 * @param $source
 * @param null $command
 *
 * @return bool
 */
function wb_play_sound($source, $command = null) {}

/**
 * Stops one or more sounds that were started with wb_play_sound().
 *
 * null, empty or 'all' - Stop all sounds.
 *
 * 'wav' or 'wave' - Stop all WAV sounds.
 *
 * 'mid' or 'midi' - Stop all MIDI sounds.
 *
 * Returns TRUE on success or FALSE otherwise.
 *
 * @param null $command
 *
 * @return bool
 */
function wb_stop_sound($command = null) {}

/**
 * Opens or executes a command. The string passed to this function can be one of the following:.
 *
 * A WinBinder script.
 * An executable file.
 * A non-executable file associated with an application.
 * A folder name. Passing a null or empty string opens the current folder.
 * A help file or help file topic.
 * An URL, e-mail, newsgroup, or another Internet client application.
 *
 * Optional parameters can be passed to the command or application through the variable param.
 *
 * @param $command
 * @param null $param
 *
 * @return bool
 */
function wb_exec($command, $param = null) {}

/**
 * Returns information about the current system and application, according to the string info.
 *
 * The parameter info is not case-sensitive.
 *
 * "appmemory"    The total memory used by the application¹
 * "backgroundcolor"    The main face color for Windows dialog boxes and controls
 * "colordepth"    The current color depth in bits per pixel
 * "commandline"    The original Windows command line including the executable file
 * "computername"    The name of the computer inside the network
 * "consolemode"    1 indicates that console mode (DOS box) is active, 0 otherwise
 * "diskdrives"    The list of all available disk drives
 * "exepath"    The path to the main executable (PHP.EXE)
 * "fontpath"    The current font path
 * "freememory"    The available physical memory
 * "gdiobjects"    The number of currently allocated GDI handles
 * "instance"    The instance identifier of the current application
 * "osnumber"    The numeric OS version number
 * "ospath"    The current OS path
 * "osversion"    The complete OS version name
 * "pgmpath"    The default OS application path
 * "screenarea"    The total area (x, y, width, height) of the screen, in pixels
 * "systemfont"    The common (default) system font for dialog boxes
 * "systempath"    The OS system path
 * "temppath"    The path used by the OS to hold temporary files
 * "totalmemory"    The total physical memory installed
 * "username"    The name of the currently logged user
 * "userobjects"    The number of currently allocated USER handles
 * "workarea"    The valid area (x, y, width, height) of the screen, in pixels
 *
 * @param $info
 *
 * @return mixed
 */
function wb_get_system_info($info) {}

/**
 * Reads a string or integer value from the Windows registry item referenced by key, subkey and entry.
 * The subkey may contain forward or reverse slashes.
 * If entry is an empty string, a NULL value or is not supplied, the function retrieves the default value for the subkey.
 *
 * Values are always returned as strings.
 * If the requested entry is an empty string, an empty string is returned.
 * If the key does not exist in the registry, the function returns NULL.
 *
 * @param $key
 * @param $subkey
 * @param null $entry
 *
 * @return string|null
 */
function wb_get_registry_key($key, $subkey, $entry = null) {}

/**
 * Reads a string or integer value from the Windows registry item referenced by key, subkey and entry.
 * The subkey may contain forward or reverse slashes.
 * If entry is an empty string, a NULL value or is not supplied, the function retrieves the default value for the subkey.
 *
 * Values are always returned as strings.
 * If the requested entry is an empty string, an empty string is returned.
 * If the key does not exist in the registry, the function returns NULL.
 *
 * @param $key
 * @param $subkey
 * @param null $entry
 * @param null $value
 *
 * @return bool
 */
function wb_set_registry_key($key, $subkey, $entry = null, $value = null) {}

/**
 * Creates a timer in the specified window.
 * The timer must be given an integer id that must be unique to all timers and controls.
 * interval specifies the time-out value in milliseconds.
 * Timer events are passed to and processed by the window callback function.
 * A call to wb_destroy_timer() destroys the timer.
 *
 * Low resolution and high resolution timers
 *
 * This function supports both conventional (low-resolution) and multimedia (high-resolution) timers.
 * Use a non-negative id to specify a low-resolution timer or a negative id to specify a high-resolution timer.
 * Hi-res timers have a 10:1 increase in speed (resolution can go down to 1 ms opposed to 10 ms of a conventional timer) and much higher precision.
 *
 * NOTE: Only one high-resolution timer is allowed per application and it must be on the main window.
 *
 * @param $window
 * @param $id
 * @param $interval
 *
 * @return int
 */
function wb_create_timer($window, $id, $interval) {}

/**
 * This function creates a delay and verifies if mouse buttons are pressed and/or the keyboard state.
 * This function is useful for lengthy operations.
 * In this case, wb_wait guarantees that the message control is sent back to the main loop, avoiding an unpleasant "freezing" effect.
 * Using this function also provides an way to easily exit lengthy operations by constantly monitoring the keyboard and mouse.
 *
 * Parameters:
 * WBC_MOUSEDOWN
 * WBC_MOUSEUP
 * WBC_KEYDOWN
 * WBC_KEYUP
 *
 * @param null $window
 * @param null $pause
 * @param null $flags
 *
 * @return int
 */
function wb_wait($window = null, $pause = null, $flags = null) {}

/**
 * Destroys a timer created with wb_create_timer().
 * The window and the id parameters must be the same that were passed to wb_create_timer() when the timer was created.
 *
 * @param $window
 * @param $id
 *
 * @return bool
 */
function wb_destroy_timer($window, $id) {}

/**
 * Loads the image, icon or cursor file filename from disk and returns a handle to it.
 * If filename is an icon library, index specifies the index of the image inside the file. Default index is 0.
 *
 * If source is an icon or a cursor, if param is 0 (the default), the function returns a large icon or cursor
 * if param is 1, it returns a small icon or cursor; if param is -1, the function returns the default icon or cursor.
 *
 * NOTE: The resulting image must be destroyed by a call to wb_destroy_image().
 *
 * @param $filename
 * @param null $index
 * @param null $param
 *
 * @return int
 */
function wb_load_image($filename, $index = null, $param = null) {}

/**
 * Saves the bitmap image to file filename.
 * The image handle must have been obtained with wb_create_image(), wb_create_mask() or wb_load_image().
 *
 * Returns TRUE on success or FALSE if an error occurs.
 *
 * @param $image
 * @param $filename
 *
 * @return bool
 */
function wb_save_image($image, $filename) {}

/**
 * Creates a true-color image measuring width by height pixels.
 *
 * NOTE: The resulting image must be destroyed by a call to wb_destroy_image().
 *
 * @param int  $width
 * @param int  $height
 * @param null $dibbmi
 * @param null $dibbits
 *
 * @return int
 */
function wb_create_image($width = 0, $height = 0, $dibbmi = null, $dibbits = null) {}

/**
 * Creates a transparency mask of a true-color bitmap.
 * The mask returned is also a bitmap. The transparent color is set by transparent_color.
 *
 * NOTE: The resulting image must be destroyed by a call to wb_destroy_image().
 *
 * @param $bitmap
 * @param $transparent_color
 *
 * @return int
 */
function wb_create_mask($bitmap, $transparent_color) {}

/**
 * Destroys an image created by wb_create_image(), wb_create_mask() or wb_load_image().
 *
 * @param $image
 *
 * @return bool
 */
function wb_destroy_image($image) {}

/**
 * Returns a string of data containing a copy of the internal true-color representation of the given image.
 * If compress4to3 is TRUE, every fourth byte of the original 32-bit data is skipped, yielding a RGB (24-bit) data string.
 * This is required for image libraries such as FreeImage.
 *
 * @param $image
 * @param $compress4to3
 *
 * @return int
 */
function wb_get_image_data($image, $compress4to3) {}

/**
 * Returns the RGB color value of the pixel at the given coordinates. The first parameter, source, may be a WinBinder object, a window handle, a drawing surface or a bitmap.
 *
 * Returns NOCOLOR if an error occurs.
 *
 * @param $source
 * @param $xpos
 * @param $ypos
 *
 * @return int
 */
function wb_get_pixel($source, $xpos, $ypos) {}

/**
 * Draws a point of color, setting the RGB color value of the pixel that exists at the given coordinates.
 * The first parameter, source, may be a WinBinder object, a window handle, a drawing surface or a bitmap.
 *
 * Returns TRUE on success or FALSE if an error occurs.
 *
 * @param $source
 * @param $xpos
 * @param $ypos
 * @param $color
 *
 * @return bool
 */
function wb_draw_point($source, $xpos, $ypos, $color) {}

/**
 * Draws a straight line. The first parameter, target, may be a WinBinder object, a window handle, a drawing surface or a bitmap.
 *
 * The start and end points of the line are (x0, y0) and (x1, y1) respectively, in pixels.
 * color is a RGB color value and linewidth is the width of the line, in pixels.
 * A linewidth of zero sets the width to 1 pixel. Parameter linestyle accepts the values specified in the table below.
 *
 * 0    Solid line (the default style)
 * 1    Dotted line
 * 2-7    Dashed lines with increasing lengths
 * 8    Line with alternating dashes and dots
 * 9    Line with alternating dashes and double dots
 *
 * Returns TRUE on success or FALSE if an error occurs.
 *
 * @param $target
 * @param $x0
 * @param $y0
 * @param $x1
 * @param $y1
 * @param $color
 * @param null $linewidth
 * @param null $linestyle
 *
 * @return bool
 */
function wb_draw_line($target, $x0, $y0, $x1, $y1, $color, $linewidth = null, $linestyle = null) {}

/**
 * Draws a filled or hollow rectangle.
 * The first parameter, target, may be a WinBinder object, a window handle, a drawing surface or a bitmap.
 *
 * xpos and ypos are the coordinates of the upper-left corner of the rectangle, in pixels.
 * width and height are the dimensions of the rectangle. color is a RGB color value.
 * Set filled to FALSE to draw a border.
 * A linewidth of zero sets the width to 1 pixel.
 *
 * Returns TRUE on success or FALSE if an error occurs.
 *
 * @param $target
 * @param $xpos
 * @param $ypos
 * @param $width
 * @param $height
 * @param $color
 * @param null $filled
 * @param null $linewidth
 * @param null $linestyle
 *
 * @return bool
 */
function wb_draw_rect($target, $xpos, $ypos, $width, $height, $color, $filled = null, $linewidth = null, $linestyle = null) {}

/**
 * Draws a filled or hollow rectangle.
 * The first parameter, target, may be a WinBinder object, a window handle, a drawing surface or a bitmap.
 *
 * xpos and ypos are the coordinates of the upper-left corner of the rectangle, in pixels.
 * width and height are the dimensions of the rectangle. color is a RGB color value.
 * Set filled to FALSE to draw a border. In this case, linewidth sets the width of the border, in pixels.
 * A linewidth of zero sets the width to 1 pixel.
 *
 * Returns TRUE on success or FALSE if an error occurs.
 *
 * @param $target
 * @param $xpos
 * @param $ypos
 * @param $width
 * @param $height
 * @param $color
 * @param null $filled
 * @param null $linewidth
 * @param null $linestyle
 *
 * @return bool
 */
function wb_draw_ellipse($target, $xpos, $ypos, $width, $height, $color, $filled = null, $linewidth = null, $linestyle = null) {}

/**
 * Draws a string. The first parameter, target, may be a WinBinder object, a window handle, a drawing surface or a bitmap.
 *
 * The text parameter is the string to be drawn.
 * xpos and ypos are the coordinates of the upper-left corner, in pixels.
 * width and height optionally provide a limit to the drawing area.
 * If they are not provided or zero, there is no limit to the drawing area.
 * To use a specific font, an identifier created with wb_create_font() must be used as the font argument.
 * If font is NULL, negative or not given, the most recently created font is used.
 *
 * NOTE: To use the simplified call syntax (no width, no height) you must supply 4 or 5 parameters.
 *
 * @param $target
 * @param $text
 * @param $xpos
 * @param $ypos
 * @param null $width
 * @param null $height
 * @param null $font
 * @param null $flags
 *
 * @return int
 */
function wb_draw_text($target, $text, $xpos, $ypos, $width = null, $height = null, $font = null, $flags = null) {}

/**
 * Draws a bitmap. The first parameter, target, may be a WinBinder object, a window handle, a drawing surface or another bitmap.
 *
 * xpos and ypos are the coordinates of the upper-left corner, in pixels.
 * These parameters default to zero. width and height are the dimensions of the rectangle.
 * These parameters also default to zero. In this case the bitmap is drawn with its original size.
 * The parameter transparentcolor may be used to indicate which color is to be made transparent.
 * If is set to NOCOLOR (the default), no transparency is used and the image is opaque.
 * Parameters xoffset and yoffset are optionally used to specify where the image will be drawn.
 *
 * Returns TRUE on success or FALSE if an error occurs.
 *
 * @param $target
 * @param $bitmap
 * @param int  $xpos
 * @param int  $ypos
 * @param null $width
 * @param null $height
 * @param null $transparentcolor
 * @param null $xoffset
 * @param null $yoffset
 *
 * @return bool
 */
function wb_draw_image($target, $bitmap, $xpos = 0, $ypos = 0, $width = null, $height = null, $transparentcolor = null, $xoffset = null, $yoffset = null) {}

/**
 * Destroys a control created by wb_create_control().
 *
 * Returns TRUE on success or FALSE if an error occurs.
 *
 * Tip
 * It is often preferable to hide a control instead of destroying it. To hide a window, use wb_set_visible() with parameter visible set to FALSE.
 *
 * @param $control
 *
 * @return bool
 */
function wb_destroy_control($control) {}

/**
 * Retrieves the value of a control or control item. The item and subitem parameters are set to -1 if absent.
 *
 * @param null $wbobject
 * @param int  $item
 * @param int  $subitem
 *
 * @return mixed
 */
function wb_get_value($wbobject, $item = -1, $subitem = -1) {}

/**
 * Refreshes or redraws the WinBinder object wbobject, forcing an immediate redraw if the parameter now is TRUE (the default).
 * If now is FALSE, the redraw command is posted to the Windows message queue.
 *
 * Optional parameters xpos, ypos, width and height will make the function invalidate and redraw only the specified part of the screen or control.
 *
 * Returns TRUE on success or FALSE if an error occurs.
 *
 * @param $wbobject
 * @param null $now
 * @param null $xpos
 * @param null $ypos
 * @param null $width
 * @param null $height
 *
 * @return int
 */
function wb_refresh($wbobject, $now = null, $xpos = null, $ypos = null, $width = null, $height = null) {}

/**
 * Enables or disables control according to the value of enabled.
 *
 * Returns TRUE on success or FALSE if an error occurs.
 *
 * @param $control
 * @param $enabled
 *
 * @return bool
 */
function wb_set_enabled($control, $enabled) {}

/**
 * Assigns the image source to the WinBinder object wbobject.
 * Parameter source can be either an image, icon or cursor handle or a path to an image file name.
 * If a handle, it must have been obtained with wb_create_image(), wb_create_mask() or wb_load_image().
 * The optional parameter transparentcolor tells the function which color is to be considered transparent.
 * The default is NOCOLOR (no transparency).
 * index is used to select a specific image from a multi-image file (such as a DLL or executable).
 *
 * If source is an icon or a cursor, if param is 0 (the default), the function sets a large icon or cursor.
 * if param is 1, it sets a small icon or cursor; if param is -1, the function sets the default icon or cursor.
 * For minimized windows, this function will also change the icon that is displayed on the task bar.
 *
 * Returns TRUE on success or FALSE if an error occurs.
 *
 * @param $wbobject
 * @param $source
 * @param null $transparentcolor
 * @param null $index
 * @param null $param
 *
 * @return bool
 */
function wb_set_image($wbobject, $source, $transparentcolor = null, $index = null, $param = null) {}

/**
 * Retrieves a portion of the image already assigned to a control and assigns it to a item (and optional subitem).
 * The image must be previously assigned with wb_set_image(). The portion which is assigned is specified by index.
 *
 * Returns TRUE on success or FALSE if an error occurs.
 *
 * @param $wbobject
 * @param $index
 * @param null $item
 * @param null $subitem
 *
 * @return bool
 */
function wb_set_item_image($wbobject, $index, $item = null, $subitem = null) {}

/**
 * Deletes an item, a range of items, or all items from a control. Returns TRUE on success or FALSE if an error occurs.
 * Control classes.
 *
 * This function applies to the following control classes: ListBox, ComboBox, ListView and TreeView.
 *
 * $items can be:
 * integer    Deletes the specified item.
 * array of integers    Deletes the specified items.
 * zero    Deletes item zero.
 * null    Deletes all items.
 *
 * @param $ctrl
 * @param null $items
 *
 * @return bool
 */
function wb_delete_items($ctrl, $items = null) {}

/**
 * Returns an integer that corresponds to the class of the object (control, window or menu) passed as the parameter.
 * The class is passed as a parameter to functions wb_create_control() and wb_create_window().
 *
 * @param $wbobject
 *
 * @return int
 */
function wb_get_class($wbobject) {}

/**
 * Returns an integer handle that corresponds to the WinBinder object (control, toolbar item or menu item) wbobject that has the supplied identifier id.
 * This function is typically used to retrieve the handle of a child control in a dialog box or in a menu item.
 *
 * @param $wbobject
 * @param $id
 *
 * @return int
 */
function wb_get_control($wbobject, $id) {}

/**
 * Returns TRUE if wbobject is enabled or FALSE otherwise.
 *
 * @param $wbobject
 *
 * @return bool
 */
function wb_get_enabled($wbobject) {}

/**
 * Returns a handle to the window or control that has the keyboard focus.
 *
 * @return int
 */
function wb_get_focus() {}

/**
 * Returns the integer identifier of the wbobject control.
 *
 * @param $wbobject
 *
 * @return int
 */
function wb_get_id($wbobject) {}

/**
 * Returns the number of items of wbobject.
 *
 * ComboBox    The number of items
 * ListBox    The number of items
 * ListView    The number of rows
 *
 * @param $wbobject
 *
 * @return int
 */
function wb_get_item_count($wbobject) {}

/**
 * Returns the handle of the control parent if item specifies a control, or the node parent if item specifies a treeview node.
 *
 * @param $wbobject
 * @param null $item
 *
 * @return int
 */
function wb_get_parent($wbobject, $item = null) {}

/**
 * Returns a value or array with the indices or identifiers of the selected elements or items in wbobject.
 *
 * Retrieves:
 *
 * ComboBox    The index of the currently selected item.
 * ListBox    The index of the currently selected item. If multiselected only the last on will be returned (use getText for all items text)
 * ListView    An array with the indices of the selected items. ¹
 * TabControl    The index of the selected tab page.
 * TreeView    The handle of the currently selected node.
 * Window    0 (zero).
 * Other controls    0 (zero).
 *
 * @param $wbobject
 *
 * @return mixed
 */
function wb_get_selected($wbobject) {}

/**
 * Retrieves an integer representing the current state of a control item.
 * Retrieving states.
 *
 * This function currently returns the expanded or collapsed state of a treeview node indicated by item.
 * It returns TRUE if the node is expanded and FALSE if it is collapsed.
 *
 * @param $wbobject
 * @param null $item
 *
 * @return bool
 */
function wb_get_state($wbobject, $item = null) {}

/**
 * Tells whether an object is visible. Returns TRUE if wbobject is visible and FALSE otherwise.
 *
 * @param $wbobject
 *
 * @return bool
 */
function wb_get_visible($wbobject) {}

/**
 * Set or change the mouse cursor shape of a window, control, a whole class or application-wide. *
 * The cursor can be set for any window class and for control classes ImageButton, InvisibleArea (deprecated), HyperLink and EditBox.
 *
 * The source parameter can be a cursor handle from function wb_load_image() or one of the preset system cursors:
 * arrow, cross, finger, forbidden, help, ibeam, null (no cursor), sizeall, sizenesw, sizens, sizenwse, sizewe, uparrow, wait and waitarrow.
 *
 * @param $wbobject
 * @param $source
 *
 * @return bool
 */
function wb_set_cursor($wbobject, $source) {}

/**
 * Assigns the keyboard focus to wbobject. Returns TRUE on success or FALSE if an error occurs.
 *
 * @param $wbobject
 *
 * @return bool
 */
function wb_set_focus($wbobject) {}

/**
 * Assigns the callback function fn_handler to window.
 * The handler function may be a regular PHP function or class method that is used to process events for this particular window.
 * wb_set_handler() must be called whenever the window needs to process messages and events from its controls.
 *
 * To specify a function as the handler, pass the function name in fn_handler.
 * If the handler is a class method, fn_handler must be an array which first element is the name of the object and the second one is the method name.
 *
 * For additional information, see callback functions and window handlers.
 *
 * @param $window
 * @param $fn_handler
 *
 * @return bool|null
 */
function wb_set_handler($window, $fn_handler) {}

/**
 * Sets the location of an HTMLControl or sends a special command to it.
 *
 * Returns TRUE on success or FALSE if an error occurs (except when using "cmd:busy" as explained below).
 *
 * "cmd:back"    Go to previously visited page.
 * "cmd:forward"    Go to a page previously viewed before issuing the back command.
 * "cmd:refresh"    Redraw the current page.
 * "cmd:stop"    Stop the current action, like loading a page.
 * "cmd:busy"    Return TRUE if the browser is busy or FALSE if idle.
 * "cmd:blank"    Clear the page.
 *
 * @param $wbobject
 * @param $location
 *
 * @return bool
 */
function wb_set_location($wbobject, $location) {}

/**
 * Sets the valid range of values (vmin and vmax) of a control. Valid classes are Gauge, ScrollBar, Slider and Spinner.
 *
 * Returns TRUE on success or FALSE if an error occurs.
 *
 * @param $control
 * @param $vmin
 * @param $vmax
 *
 * @return bool
 */
function wb_set_range($control, $vmin, $vmax) {}

/**
 * Sets the state of a control item (a treeview node). Returns TRUE on success or FALSE if an error occurs.
 *
 * Setting states:
 * This function can currently set the expanded or collapsed state of the treeview node indicated by item.
 * Set state to TRUE to expand the node or FALSE to collapse it.
 *
 * @param $wbobject
 * @param $item
 * @param $state
 *
 * @return bool
 */
function wb_set_state($wbobject, $item, $state) {}

/**
 * Sets or resets one or more styles of the WinBinder object wbobject.
 * Only a limited set of styles is supported due to Windows limitations.
 *
 * AppWindow
 * ResizableWindow
 * PopupWindow
 * NakedWindow     WBC_TOP    Make the window a topmost window.
 *
 * ListView    WBC_LINES    Display grid lines around items
 * ListView WBC_CHECKBOXES    Display check boxes in the first column of all items
 * Slider    WBC_LINES    Show tick marks. The control must be created with the WBC_LINES style
 * TreeView    WBC_LINES    Draw dotted lines linking children objects to their parents
 *
 * @param $wbobject
 * @param $style
 * @param $set
 *
 * @return bool
 */
function wb_set_style($wbobject, $style, $set) {}

/**
 * Shows or hides the WinBinder object wbobject according to the value of visible.
 *
 * Returns TRUE on success or FALSE if an error occurs.
 *
 * @param $wbobject
 * @param $visible
 *
 * @return bool
 */
function wb_set_visible($wbobject, $visible) {}

/**
 * Sorts the contents of a control, a control item, a ListView column or a sub-item.
 * If the ascending parameter is TRUE (the default), the control or column is ordered starting with the lowest value or string, and vice-versa.
 *
 * The sorting criteria between two given items, item1 and item2, are as follows:
 *
 * String or number    String    Alphabetical order according to system locale
 * String or number    Empty    The non-empty item is always greater than the empty one
 * Number    Number    Numeric comparison
 *
 * In a ListView, wb_sort() sorts the column indexed by subitem. The index of the first column is zero.
 *
 * Returns TRUE on success or FALSE if an error occurs.
 *
 * @param $control
 * @param null $ascending
 * @param null $subitem
 *
 * @return bool
 */
function wb_sort($control, $ascending = null, $subitem = null) {}

/**
 * Retrieves an integer representing the level of a control item.
 *
 * Retrieving states:
 * This function currently returns the insertion level of the treeview node specified in item.
 *
 * @param $wbobject
 * @param $item
 *
 * @return int
 */
function wb_get_level($wbobject, $item) {}

/**
 * Creates a new font. name is the font name, height is its height in points (not pixels), and color is a RGB color value. flags can be a combination of the following values:.
 *
 * FTA_NORMAL
 * FTA_REGULAR
 * FTA_BOLD
 * FTA_ITALIC
 * FTA_UNDERLINE
 * FTA_STRIKEOUT
 *
 * Constants of FTA_NORMAL and FTA_REGULAR mean the same thing and are defined as zero.
 *
 * The function returns an integer value that is the font identifier.
 *
 * After use, the font must be destroyed by a call to wb_destroy_font() to prevent resource leaks.
 *
 * NOTE: The color parameter is not implemented yet.
 *
 * @param $name
 * @param $height
 * @param null $color
 * @param null $flags
 *
 * @return int
 */
function wb_create_font($name, $height, $color = null, $flags = null) {}

/**
 * Destroys a font.
 *
 * @param $nfont
 *
 * @return bool
 */
function wb_destroy_font($nfont) {}

/**
 * Sets the font of control. font is a unique integer value returned by wb_create_font().
 * If font is zero or not given, the most recently created font is used.
 * If font is a negative number, it means the system default font.
 *
 * Returns TRUE on success or FALSE if an error occurs.
 *
 * Tip:
 * To check the system font name and size, call wb_get_system_info() using ("systemfont") as the info parameter.
 *
 * @param $control
 * @param null $font
 * @param null $redraw
 *
 * @return bool
 */
function wb_set_font($control, $font = null, $redraw = null) {}

/**
 * Returns the address (as an integer pointer) of the variable var.
 * var can be a string, integer, boolean, or double.
 * This function is specially suited to use with wb_peek() and wb_poke().
 *
 * @param $var
 *
 * @return int
 */
function wb_get_address($var) {}

/**
 * Sends a Windows message to the HWND handle of the WinBinder object wbobject.
 * The parameters wparam and lparam, as well as the return value, depend on message.
 * See SendMessage() in the Windows API documentation for more information.
 *
 * The following constant may be used as the wbobject parameter:
 *
 * 0xFFFF
 *
 * This constant is the value of HWND_BROADCAST in the Windows API. For more information consult the Windows API documentation.
 *
 * @param $wbobject
 * @param $message
 * @param $wparam
 * @param $lparam
 *
 * @return int
 */
function wb_send_message($wbobject, $message, $wparam = 0, $lparam = 0) {}

/**
 * Gets the contents of a memory area pointed by address.
 * If length is empty or zero, returns bytes up to the first NUL character (zero-character) or up to 32767 bytes, whichever comes first.
 * If length is greater than zero, returns length bytes.
 *
 * @param $address
 * @param int $length
 *
 * @return string
 */
function wb_peek($address, $length = 0) {}

/**
 * Sets the contents of a memory area pointed by address.
 *
 * @param $address
 * @param $contents
 * @param null $length
 *
 * @return bool
 */
function wb_poke($address, $contents, $length = null) {}

/**
 * Loads a DLL into memory. Returns an integer identifying libname. If libname is NULL then returns the identifier of the last library returned. The function accepts fully qualified and raw names. Returns NULL if no library was found.
 *
 * Name expansion
 *
 * The function appends some characters to the library name until it finds the library, then it returns an identifier for that library,
 * or NULL if the library was not found. If libname is "LIB", for example, the function looks for the following files, in order:
 *
 * LIB
 * LIB.DLL
 * LIB32
 * LIB32.DLL
 * LIB.EXE
 * LIB32.EXE
 *
 * For each name, the function looks in the following locations:
 *
 * The application directory;
 * The current directory;
 * The 32-bit System directory (Usually C:\WINDOWS\SYSTEM32 or C:\WINNT\SYSTEM32);
 * The 16-bit System directory (Usually C:\WINDOWS\SYSTEM or C:\WINNT\SYSTEM);
 * The Windows directory (Usually C:\WINDOWS or C:\WINNT);
 * The directory list contained in the PATH environment variable.
 *
 * @param $libname
 *
 * @return int
 */
function wb_load_library($libname) {}

/**
 * Releases the DLL identified by idlib from memory. The idlib identifier must have been obtained with a call to wb_load_library().
 *
 * NOTE: calling this function is usually not necessary.
 *
 * @param $idlib
 *
 * @return bool
 */
function wb_release_library($idlib) {}

/**
 * Returns the address of a library function. fname is the function name and idlib identifies a library already loaded.
 * The idlib identifier must have been obtained with a call to wb_load_library().
 * If idlib is not set or is set to NULL, the last library sent to the function will be used.
 *
 * Name expansion:
 * The function prepends and appends some special characters to the function name until it finds the function name,
 * then it returns the function address or NULL if the function was not found.
 * These special characters are the most common ones encountered in various types of libraries.
 *
 * For example, if fname is set to "MyFunction", wb_get_function_address() looks for the following function names, in order:
 *
 * MyFunction
 * MyFunctionA
 * MyFunctionW
 * _MyFunction
 * _MyFunctionA
 * _MyFunctionW
 * MyFunction@0, MyFunction@4, MyFunction@8... until MyFunction@80
 * _MyFunction@0, _MyFunction@4, _MyFunction@8... until MyFunction@80
 *
 * The last two expansion options include a '@' character followed by the number of parameters times 4,
 * which is a standard way to store function names inside DLLs. The loop starts from zero ("@0") and ends when it reaches 20 parameters ("@80").
 *
 * NOTE: Function names, including the expansion characters, are limited to 255 characters.
 *
 * @param $fname
 * @param $idlib
 *
 * @return int
 */
function wb_get_function_address($fname, $idlib) {}

/**
 * Calls the DLL function pointed by address.
 * args is an optional array of parameters that must match those of the function being called.
 * Returns an integer that may be a valid value or a pointer to one object, according to the library function called.
 *
 * NOTE: Function arguments are limited to a maximum of 20.
 *
 * @param $address
 * @param array $args
 *
 * @return int
 */
function wb_call_function($address, $args = []) {}

/**
 * returns a pointer to MidiOutProc (can also be used for MidiInProc, WaveInProc, WaveOutProc
 * or any similar callback) for use with functions like midiOutOpen.
 *
 * @return int
 */
function wb_get_midi_callback() {}

/**
 * Enumerate windows, i think: https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-enumwindows
 *
 * @return int
 */
function wb_get_enum_callback() {}

/**
 * Unused, i think its https://docs.microsoft.com/en-us/windows/win32/api/winuser/nc-winuser-hookproc
 * @return int
 */
function wb_get_hook_callback() {}

/**
 * Destroys a window created by wb_create_window().
 *
 * Returns TRUE on success or FALSE if an error occurs.
 *
 * @param $window
 *
 * @return bool
 */
function wb_destroy_window($window) {}

/**
 * Gets the dimensions of a control, window, image or string.
 * The image handle must have been obtained with wb_create_image(), wb_create_mask() or wb_load_image().
 *
 * This function generally returns an array where the first element is the width and the second is the height.
 * Measurements are in pixels. If param is TRUE, the area returned will not include the title bar and borders.
 * Default is FALSE.
 *
 * The function will return the integer WBC_MINIMIZED instead of an array if the requested window is minimized, or NULL on error.
 *
 * If object is a ListView handle and param is TRUE, the function returns an array with the widths of the column headers.
 * If param is omitted or FALSE, the function behaves normally like described above
 *
 * If object is a text string, param is optionally used to pass the handle to a font created with wb_create_font().
 * If param is null or not used, the default font is used. Object types accepted
 *
 * object may be one of the following:
 *
 * A control handle
 * A window handle
 * An icon handle
 * A bitmap handle
 * The name of a bitmap file
 * The name of an icon file
 * A text string
 *
 * @param $object
 * @param null $param
 * @return array
 */
function wb_get_size($object, $param = null) {}

/**
 * Sizes the object wbobject to width and height pixels.
 *
 * Parameters width and height may be used as follows:
 *
 * Positive integer     window or control   Sets the window or control size to width and height pixels.
 * WBC_NORMAL           window              Restores the window, if it is not already.
 * WBC_MINIMIZED        window              Minimizes the window, if it is not already.
 * WBC_MAXIMIZED        window              Maximizes the window, if it is not already.
 * Array of integers    ListView            Changes the column widths of the control.
 *
 * @param $wbobject
 * @param $width
 * @param null $height
 *
 * @return bool
 */
function wb_set_size($wbobject, $width, $height = null) {}

/**
 * Moves the object wbobject to the coordinates xpos, ypos in relation to its parent window.
 * If both xpos and ypos have the value WBC_CENTER or are not given, the window is centered on its parent window.
 *
 * Returns TRUE on success or FALSE if an error occurs.
 *
 * @param $wbobject
 * @param null $xpos
 * @param null $ypos
 *
 * @return bool
 */
function wb_set_position($wbobject, $xpos = null, $ypos = null) {}

/**
 * Returns an array with the position of the control or window related to its parent, in pixels.
 * The first element is the horizontal position and the second is the vertical position.
 * If clientarea is TRUE, the area returned will not include the title bar and borders.
 *
 * The default is FALSE.
 *
 * @param $wbobject
 * @param null $clientarea
 *
 * @return array
 */
function wb_get_position($wbobject, $clientarea = null) {}

/**
 * Creates a window of class wclass. Click here for a list of the available window classes.
 * Windows created with this function must be destroyed with a call to wb_destroy_window().
 * Optional style flags may be passed through parameter style.
 * To enable additional messages in a particular window, include the WBC_NOTIFY style in the style parameter and use param to indicate
 * which additional notification messages you want to process.
 *
 * This function may set the text and/or the tooltip (small hint window) of the window when it is created.
 * To create a tooltip, text must be an array with two elements.
 * The first one is the new caption (or NULL if one is not required) and the second one is the new tooltip (or NULL if one is not required).
 * All classes support tooltips.
 *
 * Returns the handle of the newly created window or NULL or zero if an error occurs.
 *
 * @param $parent
 * @param $wclass
 * @param null $caption
 * @param null $xpos
 * @param null $ypos
 * @param null $width
 * @param null $height
 * @param null $style
 * @param null $param
 *
 * @return int
 */
function wb_create_window($parent, $wclass, $caption = null, $xpos = null, $ypos = null, $width = null, $height = null, $style = null, $param = null) {}

/**
 * Detects a running instance of a WinBinder application.
 *
 * Detecting running instances
 *
 * Each main window of all WinBinder applications stores a 32-bit identifier that is calculated according to the initial window caption
 * and is unique to that caption. wb_get_instance() will try to find, among all current top-level windows, a WinBinder window that was
 * created with the same caption. The function returns TRUE if it finds the existing window or FALSE if it is does not.
 *
 * The function is effective even of the caption of the first instance of the application is changed at runtime because the 32-bit identifier
 * does not change throughout the life of the application.
 *
 * If bringtofront is set to TRUE, the function optionally restores the window (if minimized)
 * and brings the corresponding window to the front of other windows.
 *
 * @param $caption
 * @param null $bringtofront
 *
 * @return bool
 */
function wb_get_instance($caption, $bringtofront = null) {}

/**
 * Returns an array with a list of the child controls in window or control wbobject. Each element is an integer identifier that represents a WinBinder object.
 *
 * @param $wbobject
 *
 * @return array
 */
function wb_get_item_list($wbobject) {}

/**
 * Sets a specific area in a window. Possible values for type are:.
 *
 * WBC_TITLE        Sets the area used to drag a borderless window with the mouse.
 *
 * WBC_MINSIZE      Sets the minimum window size in a resizable window.
 *                  Parameters x and y are ignored.
 *                  If width is zero, no minimum horizontal dimension is set.
 *                  if height is zero, no minimum vertical dimension is set.
 *
 * WBC_MAXSIZE      Sets the maximum window size in a resizable window.
 *                  Parameters x and y are ignored.
 *                  If width is zero, no maximum horizontal dimension is set.
 *                  if height is zero, no maximum vertical dimension is set.
 *
 * @param $window
 * @param $type
 * @param null $x
 * @param null $y
 * @param null $width
 * @param null $height
 *
 * @return bool
 */
function wb_set_area($window, $type, $x = null, $y = null, $width = null, $height = null) {}

/**
 * Displays the standard Select Path dialog box. Returns the name of the selected path, if any, or a blank string if the dialog box was canceled. Returns NULL if not successful.
 *
 * Parameters:
 *
 * parent is a handle to the WinBinder object that will serve as the parent for the dialog box.
 * title is an optional string to be displayed in the dialog box.
 * path is an optional folder used to initialize the dialog box.
 *
 * @param $parent
 * @param null $title
 * @param null $path
 *
 * @return string
 */
function wb_sys_dlg_path($parent, $title = null, $path = null) {}

/**
 * Displays the standard Select Color dialog box. Returns a RGB value which is the selected color value or NOCOLOR if the dialog box was canceled. Returns NULL if not successful.
 *
 * Parameters:
 *
 * parent is a handle to the WinBinder object that will serve as the parent for the dialog box.
 * title is currently ignored.
 * color is an optional RGB value used to initialize the dialog box.
 *
 * @param $parent
 * @param null $title
 * @param null $color
 *
 * @return int
 */
function wb_sys_dlg_color($parent, $title = null, $color = null) {}

/**
 * @param $parent
 * @param $accels
 *
 * @return int
 */
function wbtemp_set_accel_table($parent, $accels) {}

/**
 * @param $parent
 * @param $class
 * @param $caption
 * @param $xpos
 * @param $ypos
 * @param $width
 * @param $height
 * @param $id
 * @param $style
 * @param $lparam
 * @param $ntab
 *
 * @return int
 */
function wbtemp_create_control($parent, $class, $caption, $xpos, $ypos, $width, $height, $id, $style, $lparam, $ntab) {}

/**
 * @param $ctrl
 * @param $str
 *
 * @return int
 */
function wbtemp_create_item($ctrl, $str) {}

/**
 * @param $ctrl
 * @param $items
 * @param $clear
 * @param $param
 *
 * @return int
 */
function wbtemp_create_statusbar_items($ctrl, $items, $clear, $param) {}

/**
 * @param $ctrl
 * @param null $item - item can also be WBC_RTF_TEXT to get the RTF code of an RTF input
 *
 * @return int
 */
function wbtemp_get_text($ctrl, $item = null) {}

/**
 * @param $ctrl
 * @param $text
 * @param $item
 *
 * @return int
 */
function wbtemp_set_text($ctrl, $text, $item) {}

/**
 * @param $ctrl
 * @param $selitems
 *
 * @return int
 */
function wbtemp_select_tab($ctrl, $selitems) {}

/**
 * @param $ctrl
 * @param $value
 * @param $item
 *
 * @return int
 */
function wbtemp_set_value($ctrl, $value, $item = null) {}

/**
 * @param $ctrl
 * @param $item
 * @param $image
 * @param $value
 *
 * @return int
 */
function wbtemp_create_listview_item($ctrl, $item, $image, $value) {}

/**
 * @param $ctrl
 * @param $index
 * @param $value
 *
 * @return int
 */
function wbtemp_set_listview_item_checked($ctrl, $index, $value) {}

/**
 * Return TRUE if the item's checkbox is checked
 * @param $ctrl
 * @param $item
 * @return bool
 */
function wbtemp_get_listview_item_checked($ctrl, $item) {}

/**
 * @param $ctrl
 * @param $item
 * @param $subitem
 * @param $text
 *
 * @return int
 */
function wbtemp_set_listview_item_text($ctrl, $item, $subitem, $text) {}

/**
 * @param $ctrl
 * @param $item
 *
 * @return mixed
 */
function wbtemp_get_listview_text($ctrl, $item) {}

/**
 * Get the number of columns in the pwbo control,
 *
 * @param $ctrl
 *
 * @return int
 */
function wbtemp_get_listview_columns($ctrl) {}

/**
 * @param $ctrl
 * @param $i
 * @param $text
 * @param $width - If nWidth is negative, calculate width automatically
 * @param $align - WBC_LEFT, WBC_RIGHT, WBC_CENTER
 *
 * @return int
 */
function wbtemp_create_listview_column($ctrl, $i, $text, $width, $align) {}

/**
 * @param $ctrl
 *
 * @return int
 */
function wbtemp_clear_listview_columns($ctrl) {}

/**
 * @param $ctrl
 * @param $item
 * @param $selected
 *
 * @return int
 */
function wbtemp_select_listview_item($ctrl, $item, $selected) {}

/**
 * @param $ctrl
 * @param $bool
 *
 * @return int
 */
function wbtemp_select_all_listview_items($ctrl, $bool) {}

/**
 * @param $parent
 * @param $caption
 *
 * @return int
 */
function wbtemp_create_menu($parent, $caption) {}

/**
 * @param $ctrl
 * @param $item
 *
 * @return int
 */
function wbtemp_get_menu_item_checked($ctrl, $item) {}

/**
 * @param $ctrl
 * @param $selitems
 * @param $selected
 *
 * @return int
 */
function wbtemp_set_menu_item_checked($ctrl, $selitems, $selected) {}

/**
 * @param $ctrl
 * @param int $item
 * @param bool $selected
 *
 * @return int
 */
function wbtemp_set_menu_item_selected($ctrl, $item, $selected) {}

/**
 * @param $ctrl
 * @param $item
 * @param $imageHandle
 *
 * @return int
 */
function wbtemp_set_menu_item_image($ctrl, $item, $imageHandle) {}

/**
 * @param $parent
 * @param $caption
 * @param $width
 * @param $height
 * @param $lparam
 *
 * @return int
 */
function wbtemp_create_toolbar($parent, $caption, $width, $height, $lparam) {}

/**
 * @param $ctrl
 * @param $name
 * @param $value
 * @param $where
 * @param $image_index
 * @param $selected_image
 * @param $selected_image_index
 *
 * @return int
 */
function wbtemp_create_treeview_item($ctrl, $name, $value, $where = 0, $image_index = 0, $selected_image = 0, $selected_image_index = 0) {}

/**
 * @param $ctrl
 * @param $selitems
 *
 * @return int
 */
function wbtemp_set_treeview_item_selected($ctrl, $selitems) {}

/**
 * @param $ctrl
 * @param $item
 * @param $text
 *
 * @return bool
 */
function wbtemp_set_treeview_item_text($ctrl, $item, $text) {}

/**
 * @param $ctrl
 * @param $item
 * @param $value
 *
 * @return int
 */
function wbtemp_set_treeview_item_value($ctrl, $item, $value) {}

/**
 * @param $ctrl
 * @param $item
 *
 * @return int
 */
function wbtemp_get_treeview_item_text($ctrl, $item) {}

/**
 * @param $parent
 * @param null $title
 * @param null $filter
 * @param null $path
 * @param null $flags
 *
 * @return int
 */
function wbtemp_sys_dlg_open($parent, $title = null, $filter = null, $path = null, $flags = null) {}

/**
 * @param $wbObj
 * @param string $title
 * @param string $filter
 * @param string $path
 * @param string $filename
 * @param string $defext
 *
 * @return int
 */
function wbtemp_sys_dlg_save($wbObj, $title = '', $filter = '', $path = '', $filename = '', $defext = '') {}
<?php

// Start of mbstring v.

use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Pure;

/**
 * Perform case folding on a string
 * @link https://php.net/manual/en/function.mb-convert-case.php
 * @param string $string <p>
 * The string being converted.
 * </p>
 * @param int $mode <p>
 * The mode of the conversion. It can be one of
 * MB_CASE_UPPER,
 * MB_CASE_LOWER, or
 * MB_CASE_TITLE.
 * </p>
 * @param string|null $encoding [optional]
 * @return string A case folded version of string converted in the
 * way specified by mode.
 */
#[Pure]
function mb_convert_case(string $string, int $mode, ?string $encoding): string {}

/**
 * Make a string uppercase
 * @link https://php.net/manual/en/function.mb-strtoupper.php
 * @param string $string <p>
 * The string being uppercased.
 * </p>
 * @param string|null $encoding [optional]
 * @return string str with all alphabetic characters converted to uppercase.
 */
#[Pure]
function mb_strtoupper(string $string, ?string $encoding): string {}

/**
 * Make a string lowercase
 * @link https://php.net/manual/en/function.mb-strtolower.php
 * @param string $string <p>
 * The string being lowercased.
 * </p>
 * @param string|null $encoding [optional]
 * @return string str with all alphabetic characters converted to lowercase.
 */
#[Pure]
function mb_strtolower(string $string, ?string $encoding): string {}

/**
 * Set/Get current language
 * @link https://php.net/manual/en/function.mb-language.php
 * @param string|null $language [optional] <p>
 * Used for encoding
 * e-mail messages. Valid languages are "Japanese",
 * "ja","English","en" and "uni"
 * (UTF-8). mb_send_mail uses this setting to
 * encode e-mail.
 * </p>
 * <p>
 * Language and its setting is ISO-2022-JP/Base64 for
 * Japanese, UTF-8/Base64 for uni, ISO-8859-1/quoted printable for
 * English.
 * </p>
 * @return bool|string If language is set and
 * language is valid, it returns
 * true. Otherwise, it returns false.
 * When language is omitted, it returns the language
 * name as a string. If no language is set previously, it then returns
 * false.
 */
function mb_language(?string $language): string|bool {}

/**
 * Set/Get internal character encoding
 * @link https://php.net/manual/en/function.mb-internal-encoding.php
 * @param string|null $encoding [optional] <p>
 * encoding is the character encoding name
 * used for the HTTP input character encoding conversion, HTTP output
 * character encoding conversion, and the default character encoding
 * for string functions defined by the mbstring module.
 * </p>
 * @return bool|string If encoding is set, then
 * true on success or false on failure.
 * If encoding is omitted, then
 * the current character encoding name is returned.
 */
function mb_internal_encoding(?string $encoding): string|bool {}

/**
 * Detect HTTP input character encoding
 * @link https://php.net/manual/en/function.mb-http-input.php
 * @param string|null $type [optional] <p>
 * Input string specifies the input type.
 * "G" for GET, "P" for POST, "C" for COOKIE, "S" for string, "L" for list, and
 * "I" for the whole list (will return array).
 * If type is omitted, it returns the last input type processed.
 * </p>
 * @return array|false|string The character encoding name, as per the type.
 * If mb_http_input does not process specified
 * HTTP input, it returns false.
 */
#[Pure]
function mb_http_input(?string $type): array|string|false {}

/**
 * Set/Get HTTP output character encoding
 * @link https://php.net/manual/en/function.mb-http-output.php
 * @param string|null $encoding [optional] <p>
 * If encoding is set,
 * mb_http_output sets the HTTP output character
 * encoding to encoding.
 * </p>
 * <p>
 * If encoding is omitted,
 * mb_http_output returns the current HTTP output
 * character encoding.
 * </p>
 * @return bool|string If encoding is omitted,
 * mb_http_output returns the current HTTP output
 * character encoding. Otherwise,
 * true on success or false on failure.
 */
function mb_http_output(?string $encoding): string|bool {}

/**
 * Set/Get character encoding detection order
 * @link https://php.net/manual/en/function.mb-detect-order.php
 * @param array|string|null $encoding [optional] <p>
 * encoding_list is an array or
 * comma separated list of character encoding. ("auto" is expanded to
 * "ASCII, JIS, UTF-8, EUC-JP, SJIS")
 * </p>
 * <p>
 * If encoding_list is omitted, it returns
 * the current character encoding detection order as array.
 * </p>
 * <p>
 * This setting affects mb_detect_encoding and
 * mb_send_mail.
 * </p>
 * <p>
 * mbstring currently implements the following
 * encoding detection filters. If there is an invalid byte sequence
 * for the following encodings, encoding detection will fail.
 * </p>
 * UTF-8, UTF-7,
 * ASCII,
 * EUC-JP,SJIS,
 * eucJP-win, SJIS-win,
 * JIS, ISO-2022-JP
 * <p>
 * For ISO-8859-*, mbstring
 * always detects as ISO-8859-*.
 * </p>
 * <p>
 * For UTF-16, UTF-32,
 * UCS2 and UCS4, encoding
 * detection will fail always.
 * </p>
 * <p>
 * Useless detect order example
 * </p>
 * @return bool|string[] When setting the encoding detection order,
 * true is returned on success or FALSE on failure.
 * When getting the encoding detection order, an ordered array
 * of the encodings is returned.
 */
#[LanguageLevelTypeAware(['8.2' => 'array|true'], default: 'array|bool')]
function mb_detect_order(array|string|null $encoding = null): array|bool {}

/**
 * Set/Get substitution character
 * @link https://php.net/manual/en/function.mb-substitute-character.php
 * @param string|int|null $substitute_character [optional] <p>
 * Specify the Unicode value as an integer,
 * or as one of the following strings:</p><ul>
 * <li>"none" : no output</li>
 * <li>"long": Output character code value (Example: U+3000, JIS+7E7E)</li>
 * <li>"entity": Output character entity (Example: Ȁ)</li>
 * </ul>
 * @return bool|int|string If substchar is set, it returns true for success,
 * otherwise returns false.
 * If substchar is not set, it returns the Unicode value,
 * or "none" or "long".
 */
function mb_substitute_character(string|int|null $substitute_character = null): string|int|bool {}

/**
 * Parse GET/POST/COOKIE data and set global variable
 * @link https://php.net/manual/en/function.mb-parse-str.php
 * @param string $string <p>
 * The URL encoded data.
 * </p>
 * @param array &$result [optional] <p>
 * An array containing decoded and character encoded converted values.
 * </p>
 * @return bool true on success or false on failure.
 */
#[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')]
function mb_parse_str(string $string, &$result): bool {}

/**
 * Parse GET/POST/COOKIE data and set global variable
 * @link https://php.net/manual/en/function.mb-parse-str.php
 * @param string $string <p>
 * The URL encoded data.
 * </p>
 * @param array &$result <p>
 * An array containing decoded and character encoded converted values.
 * </p>
 * @return bool true on success or false on failure.
 */
#[PhpStormStubsElementAvailable(from: '8.0')]
function mb_parse_str(string $string, &$result): bool {}

/**
 * Callback function converts character encoding in output buffer
 * @link https://php.net/manual/en/function.mb-output-handler.php
 * @param string $string <p>
 * The contents of the output buffer.
 * </p>
 * @param int $status <p>
 * The status of the output buffer.
 * </p>
 * @return string The converted string.
 */
#[Pure]
function mb_output_handler(string $string, int $status): string {}

/**
 * Get MIME charset string
 * @link https://php.net/manual/en/function.mb-preferred-mime-name.php
 * @param string $encoding <p>
 * The encoding being checked.
 * </p>
 * @return string|false The MIME charset string for character encoding
 * encoding.
 */
#[Pure]
function mb_preferred_mime_name(string $encoding): string|false {}

/**
 * Get string length
 * @link https://php.net/manual/en/function.mb-strlen.php
 * @param string $string <p>
 * The string being checked for length.
 * </p>
 * @param string|null $encoding [optional]
 * @return int|false the number of characters in
 * string str having character encoding
 * encoding. A multi-byte character is
 * counted as 1.
 */
#[Pure]
#[LanguageLevelTypeAware(['8.0' => 'int'], default: 'int|false')]
function mb_strlen(string $string, #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: 'string')] $encoding) {}

/**
 * Find position of first occurrence of string in a string
 * @link https://php.net/manual/en/function.mb-strpos.php
 * @param string $haystack <p>
 * The string being checked.
 * </p>
 * @param string $needle <p>
 * The position counted from the beginning of haystack.
 * </p>
 * @param int<0,max> $offset [optional] <p>
 * The search offset. If it is not specified, 0 is used.
 * </p>
 * @param string|null $encoding [optional]
 * @return int<0,max>|false the numeric position of
 * the first occurrence of needle in the
 * haystack string. If
 * needle is not found, it returns false.
 */
#[Pure]
function mb_strpos(string $haystack, string $needle, int $offset = 0, ?string $encoding): int|false {}

/**
 * Find position of last occurrence of a string in a string
 * @link https://php.net/manual/en/function.mb-strrpos.php
 * @param string $haystack <p>
 * The string being checked, for the last occurrence
 * of needle
 * </p>
 * @param string $needle <p>
 * The string to find in haystack.
 * </p>
 * @param int $offset [optional] May be specified to begin searching an arbitrary number of characters into
 * the string. Negative values will stop searching at an arbitrary point
 * prior to the end of the string.
 * @param string|null $encoding [optional]
 * @return int|false the numeric position of
 * the last occurrence of needle in the
 * haystack string. If
 * needle is not found, it returns false.
 */
#[Pure]
function mb_strrpos(string $haystack, string $needle, int $offset = 0, ?string $encoding): int|false {}

/**
 * Finds position of first occurrence of a string within another, case insensitive
 * @link https://php.net/manual/en/function.mb-stripos.php
 * @param string $haystack <p>
 * The string from which to get the position of the first occurrence
 * of needle
 * </p>
 * @param string $needle <p>
 * The string to find in haystack
 * </p>
 * @param int $offset [optional] <p>
 * The position in haystack
 * to start searching
 * </p>
 * @param string|null $encoding [optional] <p>
 * Character encoding name to use.
 * If it is omitted, internal character encoding is used.
 * </p>
 * @return int|false Return the numeric position of the first occurrence of
 * needle in the haystack
 * string, or false if needle is not found.
 */
#[Pure]
function mb_stripos(string $haystack, string $needle, int $offset = 0, ?string $encoding): int|false {}

/**
 * Finds position of last occurrence of a string within another, case insensitive
 * @link https://php.net/manual/en/function.mb-strripos.php
 * @param string $haystack <p>
 * The string from which to get the position of the last occurrence
 * of needle
 * </p>
 * @param string $needle <p>
 * The string to find in haystack
 * </p>
 * @param int $offset [optional] <p>
 * The position in haystack
 * to start searching
 * </p>
 * @param string|null $encoding [optional] <p>
 * Character encoding name to use.
 * If it is omitted, internal character encoding is used.
 * </p>
 * @return int|false Return the numeric position of
 * the last occurrence of needle in the
 * haystack string, or false
 * if needle is not found.
 */
#[Pure]
function mb_strripos(string $haystack, string $needle, int $offset = 0, ?string $encoding): int|false {}

/**
 * Finds first occurrence of a string within another
 * @link https://php.net/manual/en/function.mb-strstr.php
 * @param string $haystack <p>
 * The string from which to get the first occurrence
 * of needle
 * </p>
 * @param string $needle <p>
 * The string to find in haystack
 * </p>
 * @param bool $before_needle [optional] <p>
 * Determines which portion of haystack
 * this function returns.
 * If set to true, it returns all of haystack
 * from the beginning to the first occurrence of needle.
 * If set to false, it returns all of haystack
 * from the first occurrence of needle to the end,
 * </p>
 * @param string|null $encoding [optional] <p>
 * Character encoding name to use.
 * If it is omitted, internal character encoding is used.
 * </p>
 * @return string|false the portion of haystack,
 * or false if needle is not found.
 */
#[Pure]
function mb_strstr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding): string|false {}

/**
 * Finds the last occurrence of a character in a string within another
 * @link https://php.net/manual/en/function.mb-strrchr.php
 * @param string $haystack <p>
 * The string from which to get the last occurrence
 * of needle
 * </p>
 * @param string $needle <p>
 * The string to find in haystack
 * </p>
 * @param bool $before_needle [optional] <p>
 * Determines which portion of haystack
 * this function returns.
 * If set to true, it returns all of haystack
 * from the beginning to the last occurrence of needle.
 * If set to false, it returns all of haystack
 * from the last occurrence of needle to the end,
 * </p>
 * @param string|null $encoding [optional] <p>
 * Character encoding name to use.
 * If it is omitted, internal character encoding is used.
 * </p>
 * @return string|false the portion of haystack.
 * or false if needle is not found.
 */
#[Pure]
function mb_strrchr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding): string|false {}

/**
 * Finds first occurrence of a string within another, case insensitive
 * @link https://php.net/manual/en/function.mb-stristr.php
 * @param string $haystack <p>
 * The string from which to get the first occurrence
 * of needle
 * </p>
 * @param string $needle <p>
 * The string to find in haystack
 * </p>
 * @param bool $before_needle [optional] <p>
 * Determines which portion of haystack
 * this function returns.
 * If set to true, it returns all of haystack
 * from the beginning to the first occurrence of needle.
 * If set to false, it returns all of haystack
 * from the first occurrence of needle to the end,
 * </p>
 * @param string|null $encoding [optional] <p>
 * Character encoding name to use.
 * If it is omitted, internal character encoding is used.
 * </p>
 * @return string|false the portion of haystack,
 * or false if needle is not found.
 */
#[Pure]
function mb_stristr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding): string|false {}

/**
 * Finds the last occurrence of a character in a string within another, case insensitive
 * @link https://php.net/manual/en/function.mb-strrichr.php
 * @param string $haystack <p>
 * The string from which to get the last occurrence
 * of needle
 * </p>
 * @param string $needle <p>
 * The string to find in haystack
 * </p>
 * @param bool $before_needle [optional] <p>
 * Determines which portion of haystack
 * this function returns.
 * If set to true, it returns all of haystack
 * from the beginning to the last occurrence of needle.
 * If set to false, it returns all of haystack
 * from the last occurrence of needle to the end,
 * </p>
 * @param string|null $encoding [optional] <p>
 * Character encoding name to use.
 * If it is omitted, internal character encoding is used.
 * </p>
 * @return string|false the portion of haystack.
 * or false if needle is not found.
 */
#[Pure]
function mb_strrichr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding): string|false {}

/**
 * Count the number of substring occurrences
 * @link https://php.net/manual/en/function.mb-substr-count.php
 * @param string $haystack <p>
 * The string being checked.
 * </p>
 * @param string $needle <p>
 * The string being found.
 * </p>
 * @param string|null $encoding [optional]
 * @return int The number of times the
 * needle substring occurs in the
 * haystack string.
 */
#[Pure]
function mb_substr_count(string $haystack, string $needle, ?string $encoding): int {}

/**
 * Get part of string
 * @link https://php.net/manual/en/function.mb-substr.php
 * @param string $string <p>
 * The string being checked.
 * </p>
 * @param int $start <p>
 * The first position used in str.
 * </p>
 * @param int|null $length [optional] <p>
 * The maximum length of the returned string.
 * </p>
 * @param string|null $encoding [optional]
 * @return string mb_substr returns the portion of
 * str specified by the
 * start and
 * length parameters.
 */
#[Pure]
function mb_substr(string $string, int $start, ?int $length, ?string $encoding): string {}

/**
 * Get part of string
 * @link https://php.net/manual/en/function.mb-strcut.php
 * @param string $string <p>
 * The string being cut.
 * </p>
 * @param int $start <p>
 * The position that begins the cut.
 * </p>
 * @param int|null $length [optional] <p>
 * The string being decoded.
 * </p>
 * @param string|null $encoding [optional]
 * @return string mb_strcut returns the portion of
 * str specified by the
 * start and
 * length parameters.
 */
#[Pure]
function mb_strcut(string $string, int $start, ?int $length, ?string $encoding): string {}

/**
 * Return width of string
 * @link https://php.net/manual/en/function.mb-strwidth.php
 * @param string $string <p>
 * The string being decoded.
 * </p>
 * @param string|null $encoding [optional]
 * @return int The width of string str.
 */
#[Pure]
function mb_strwidth(string $string, ?string $encoding): int {}

/**
 * Get truncated string with specified width
 * @link https://php.net/manual/en/function.mb-strimwidth.php
 * @param string $string <p>
 * The string being decoded.
 * </p>
 * @param int $start <p>
 * The start position offset. Number of
 * characters from the beginning of string. (First character is 0)
 * </p>
 * @param int $width <p>
 * The width of the desired trim.
 * </p>
 * @param string $trim_marker <p>
 * A string that is added to the end of string
 * when string is truncated.
 * </p>
 * @param string|null $encoding [optional]
 * @return string The truncated string. If trimmarker is set,
 * trimmarker is appended to the return value.
 */
#[Pure]
function mb_strimwidth(string $string, int $start, int $width, string $trim_marker = '', ?string $encoding): string {}

/**
 * Convert character encoding
 * @link https://php.net/manual/en/function.mb-convert-encoding.php
 * @param string|array $string <p>
 * The string being encoded.
 * </p>
 * @param string $to_encoding <p>
 * The type of encoding that str is being converted to.
 * </p>
 * @param string|string[]|null $from_encoding [optional] <p>
 * Is specified by character code names before conversion. It is either
 * an array, or a comma separated enumerated list.
 * If from_encoding is not specified, the internal
 * encoding will be used.
 * </p>
 * <p>
 * "auto" may be used, which expands to
 * "ASCII,JIS,UTF-8,EUC-JP,SJIS".
 * </p>
 * @return array|string|false The encoded string.
 */
#[Pure]
function mb_convert_encoding(array|string $string, string $to_encoding, array|string|null $from_encoding = null): array|string|false {}

/**
 * Detect character encoding
 * @link https://php.net/manual/en/function.mb-detect-encoding.php
 * @param string $string <p>
 * The string being detected.
 * </p>
 * @param string|string[]|null $encodings [optional] <p>
 * encoding_list is list of character
 * encoding. Encoding order may be specified by array or comma
 * separated list string.
 * </p>
 * <p>
 * If encoding_list is omitted,
 * detect_order is used.
 * </p>
 * @param bool $strict [optional] <p>
 * strict specifies whether to use
 * the strict encoding detection or not.
 * Default is false.
 * </p>
 * @return string|false The detected character encoding or false if the encoding cannot be
 * detected from the given string.
 */
#[Pure]
function mb_detect_encoding(string $string, array|string|null $encodings = null, bool $strict = false): string|false {}

/**
 * Returns an array of all supported encodings
 * @link https://php.net/manual/en/function.mb-list-encodings.php
 * @return string[] a numerically indexed array.
 */
#[Pure]
function mb_list_encodings(): array {}

/**
 * Get aliases of a known encoding type
 * @param string $encoding The encoding type being checked, for aliases.
 * @return string[]|false a numerically indexed array of encoding aliases on success, or FALSE on failure
 * @link https://php.net/manual/en/function.mb-encoding-aliases.php
 */
#[Pure]
#[LanguageLevelTypeAware(["8.0" => "array"], default: "array|false")]
function mb_encoding_aliases(string $encoding) {}

/**
 * Convert "kana" one from another ("zen-kaku", "han-kaku" and more)
 * @link https://php.net/manual/en/function.mb-convert-kana.php
 * @param string $string <p>
 * The string being converted.
 * </p>
 * @param string $mode [optional] <p>
 * The conversion option.
 * </p>
 * <p>
 * Specify with a combination of following options.
 * <table>
 * Applicable Conversion Options
 * <tr valign="top">
 * <td>Option</td>
 * <td>Meaning</td>
 * </tr>
 * <tr valign="top">
 * <td>r</td>
 * <td>
 * Convert "zen-kaku" alphabets to "han-kaku"
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>R</td>
 * <td>
 * Convert "han-kaku" alphabets to "zen-kaku"
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>n</td>
 * <td>
 * Convert "zen-kaku" numbers to "han-kaku"
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>N</td>
 * <td>
 * Convert "han-kaku" numbers to "zen-kaku"
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>a</td>
 * <td>
 * Convert "zen-kaku" alphabets and numbers to "han-kaku"
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>A</td>
 * <td>
 * Convert "han-kaku" alphabets and numbers to "zen-kaku"
 * (Characters included in "a", "A" options are
 * U+0021 - U+007E excluding U+0022, U+0027, U+005C, U+007E)
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>s</td>
 * <td>
 * Convert "zen-kaku" space to "han-kaku" (U+3000 -> U+0020)
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>S</td>
 * <td>
 * Convert "han-kaku" space to "zen-kaku" (U+0020 -> U+3000)
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>k</td>
 * <td>
 * Convert "zen-kaku kata-kana" to "han-kaku kata-kana"
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>K</td>
 * <td>
 * Convert "han-kaku kata-kana" to "zen-kaku kata-kana"
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>h</td>
 * <td>
 * Convert "zen-kaku hira-gana" to "han-kaku kata-kana"
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>H</td>
 * <td>
 * Convert "han-kaku kata-kana" to "zen-kaku hira-gana"
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>c</td>
 * <td>
 * Convert "zen-kaku kata-kana" to "zen-kaku hira-gana"
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>C</td>
 * <td>
 * Convert "zen-kaku hira-gana" to "zen-kaku kata-kana"
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>V</td>
 * <td>
 * Collapse voiced sound notation and convert them into a character. Use with "K","H"
 * </td>
 * </tr>
 * </table>
 * </p>
 * @param string|null $encoding [optional]
 * @return string The converted string.
 */
#[Pure]
function mb_convert_kana(string $string, string $mode = 'KV', ?string $encoding): string {}

/**
 * Encode string for MIME header
 * @link https://php.net/manual/en/function.mb-encode-mimeheader.php
 * @param string $string <p>
 * The string being encoded.
 * </p>
 * @param string|null $charset [optional] <p>
 * charset specifies the name of the character set
 * in which str is represented in. The default value
 * is determined by the current NLS setting (mbstring.language).
 * mb_internal_encoding should be set to same encoding.
 * </p>
 * @param string|null $transfer_encoding [optional] <p>
 * transfer_encoding specifies the scheme of MIME
 * encoding. It should be either "B" (Base64) or
 * "Q" (Quoted-Printable). Falls back to
 * "B" if not given.
 * </p>
 * @param string $newline [optional] <p>
 * linefeed specifies the EOL (end-of-line) marker
 * with which mb_encode_mimeheader performs
 * line-folding (a RFC term,
 * the act of breaking a line longer than a certain length into multiple
 * lines. The length is currently hard-coded to 74 characters).
 * Falls back to "\r\n" (CRLF) if not given.
 * </p>
 * @param int $indent <p>
 * Indentation of the first line (number of characters in the header
 * before str).
 * </p>
 * @return string A converted version of the string represented in ASCII.
 */
#[Pure]
function mb_encode_mimeheader(string $string, ?string $charset, ?string $transfer_encoding, string $newline = "\n", int $indent = 0): string {}

/**
 * Decode string in MIME header field
 * @link https://php.net/manual/en/function.mb-decode-mimeheader.php
 * @param string $string <p>
 * The string being decoded.
 * </p>
 * @return string The decoded string in internal character encoding.
 */
#[Pure]
function mb_decode_mimeheader(string $string): string {}

/**
 * Convert character code in variable(s)
 * @link https://php.net/manual/en/function.mb-convert-variables.php
 * @param string $to_encoding <p>
 * The encoding that the string is being converted to.
 * </p>
 * @param string|string[] $from_encoding <p>
 * from_encoding is specified as an array
 * or comma separated string, it tries to detect encoding from
 * from-coding. When from_encoding
 * is omitted, detect_order is used.
 * </p>
 * @param string|array|object &$var var is the reference to the variable being converted.
 * @param string|array|object &...$vars <p>
 * vars is the other references to the
 * variables being converted. String, Array and Object are accepted.
 * mb_convert_variables assumes all parameters
 * have the same encoding.
 * </p>
 * @return string|false The character encoding before conversion for success,
 * or false for failure.
 */
function mb_convert_variables(
    string $to_encoding,
    array|string $from_encoding,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] &$vars,
    #[PhpStormStubsElementAvailable(from: '8.0')] mixed &$var,
    mixed &...$vars
): string|false {}

/**
 * Encode character to HTML numeric string reference
 * @link https://php.net/manual/en/function.mb-encode-numericentity.php
 * @param string $string <p>
 * The string being encoded.
 * </p>
 * @param int[] $map <p>
 * convmap is array specifies code area to
 * convert.
 * </p>
 * @param null|string $encoding
 * @param bool $hex [optional]
 * @return string The converted string.
 */
#[Pure]
function mb_encode_numericentity(string $string, array $map, ?string $encoding = null, bool $hex = false): string {}

/**
 * Decode HTML numeric string reference to character
 * @link https://php.net/manual/en/function.mb-decode-numericentity.php
 * @param string $string <p>
 * The string being decoded.
 * </p>
 * @param int[] $map <p>
 * convmap is an array that specifies
 * the code area to convert.
 * </p>
 * @param null|string $encoding
 * @param bool $is_hex [optional] <p>
 * this parameter is not used.
 * </p>
 * @return string|false|null The converted string.
 */
#[Pure]
#[LanguageLevelTypeAware(['8.0' => 'string'], default: 'string|false|null')]
function mb_decode_numericentity(string $string, array $map, ?string $encoding = null, #[PhpStormStubsElementAvailable(from: '7.2', to: '7.4')] $is_hex = false) {}

/**
 * Send encoded mail
 * @link https://php.net/manual/en/function.mb-send-mail.php
 * @param string $to <p>
 * The mail addresses being sent to. Multiple
 * recipients may be specified by putting a comma between each
 * address in to.
 * This parameter is not automatically encoded.
 * </p>
 * @param string $subject <p>
 * The subject of the mail.
 * </p>
 * @param string $message <p>
 * The message of the mail.
 * </p>
 * @param string|array $additional_headers <p>
 * String or array to be inserted at the end of the email header. <br/>
 * Since 7.2.0 accepts an array. Its keys are the header names and its values are the respective header values.<br/>
 * This is typically used to add extra
 * headers. Multiple extra headers are separated with a
 * newline ("\n").
 * </p>
 * @param string|null $additional_params [optional] <p>
 * additional_parameter is a MTA command line
 * parameter. It is useful when setting the correct Return-Path
 * header when using sendmail.
 * </p>
 * @return bool true on success or false on failure.
 */
function mb_send_mail(string $to, string $subject, string $message, array|string $additional_headers = [], ?string $additional_params): bool {}

/**
 * Get internal settings of mbstring
 * @link https://php.net/manual/en/function.mb-get-info.php
 * @param string $type [optional] <p>
 * If type isn't specified or is specified to
 * "all", an array having the elements "internal_encoding",
 * "http_output", "http_input", "func_overload", "mail_charset",
 * "mail_header_encoding", "mail_body_encoding" will be returned.
 * </p>
 * <p>
 * If type is specified as "http_output",
 * "http_input", "internal_encoding", "func_overload",
 * the specified setting parameter will be returned.
 * </p>
 * @return array|string|int|false An array of type information if type
 * is not specified, otherwise a specific type.
 */
#[Pure]
#[ArrayShape([
    'internal_encoding' => 'string',
    'http_input' => 'string',
    'http_output' => 'string',
    'http_output_conv_mimetypes' => 'string',
    'mail_charset' => 'string',
    'mail_header_encoding' => 'string',
    'mail_body_encoding' => 'string',
    'illegal_chars' => 'string',
    'encoding_translation' => 'string',
    'language' => 'string',
    'detect_order' => 'string',
    'substitute_character' => 'string',
    'strict_detection' => 'string',
])]
function mb_get_info(string $type = 'all'): array|string|int|false {}

/**
 * Check if the string is valid for the specified encoding
 * @link https://php.net/manual/en/function.mb-check-encoding.php
 * @param string|string[]|null $value [optional] <p>
 * The byte stream to check. If it is omitted, this function checks
 * all the input from the beginning of the request.
 * </p>
 * @param string|null $encoding [optional] <p>
 * The expected encoding.
 * </p>
 * @return bool true on success or false on failure.
 * @since 5.1.3
 */
#[Pure]
function mb_check_encoding(array|string|null $value = null, ?string $encoding): bool {}

/**
 * Returns current encoding for multibyte regex as string
 * @link https://php.net/manual/en/function.mb-regex-encoding.php
 * @param string|null $encoding [optional]
 * @return bool|string If encoding is set, then Returns TRUE on success
 * or FALSE on failure. In this case, the internal character encoding
 * is NOT changed. If encoding is omitted, then the current character
 * encoding name for a multibyte regex is returned.
 */
function mb_regex_encoding(?string $encoding): string|bool {}

/**
 * Set/Get the default options for mbregex functions
 * @link https://php.net/manual/en/function.mb-regex-set-options.php
 * @param string|null $options [optional] <p>
 * The options to set.
 * </p>
 * @return string The previous options. If options is omitted,
 * it returns the string that describes the current options.
 */
function mb_regex_set_options(?string $options): string {}

/**
 * Regular expression match with multibyte support
 * @link https://php.net/manual/en/function.mb-ereg.php
 * @param string $pattern <p>
 * The search pattern.
 * </p>
 * @param string $string <p>
 * The search string.
 * </p>
 * @param string[] &$matches [optional] <p>
 * Contains a substring of the matched string.
 * </p>
 * @return bool
 */
function mb_ereg(string $pattern, string $string, &$matches): bool {}

/**
 * Regular expression match ignoring case with multibyte support
 * @link https://php.net/manual/en/function.mb-eregi.php
 * @param string $pattern <p>
 * The regular expression pattern.
 * </p>
 * @param string $string <p>
 * The string being searched.
 * </p>
 * @param string[] &$matches [optional] <p>
 * Contains a substring of the matched string.
 * </p>
 * @return bool|int
 */
#[LanguageLevelTypeAware(["8.0" => "bool"], default: "false|int")]
function mb_eregi(string $pattern, string $string, &$matches): bool {}

/**
 * Replace regular expression with multibyte support
 * @link https://php.net/manual/en/function.mb-ereg-replace.php
 * @param string $pattern <p>
 * The regular expression pattern.
 * </p>
 * <p>
 * Multibyte characters may be used in pattern.
 * </p>
 * @param string $replacement <p>
 * The replacement text.
 * </p>
 * @param string $string <p>
 * The string being checked.
 * </p>
 * @param string|null $options Matching condition can be set by option
 * parameter. If i is specified for this
 * parameter, the case will be ignored. If x is
 * specified, white space will be ignored. If m
 * is specified, match will be executed in multiline mode and line
 * break will be included in '.'. If p is
 * specified, match will be executed in POSIX mode, line break
 * will be considered as normal character. If e
 * is specified, replacement string will be
 * evaluated as PHP expression.
 * <p>PHP 7.1: The <i>e</i> modifier has been deprecated.</p>
 * @return string|false|null The resultant string on success, or false on error.
 */
#[Pure]
function mb_ereg_replace(string $pattern, string $replacement, string $string, ?string $options = null): string|false|null {}

/**
 * Perform a regular expresssion seach and replace with multibyte support using a callback
 * @link https://secure.php.net/manual/en/function.mb-ereg-replace-callback.php
 * @param string $pattern <p>
 * The regular expression pattern.
 * </p>
 * <p>
 * Multibyte characters may be used in <b>pattern</b>.
 * </p>
 * @param callable $callback <p>
 * A callback that will be called and passed an array of matched elements
 * in the  <b>subject</b> string. The callback should
 * return the replacement string.
 * </p>
 * <p>
 * You'll often need the <b>callback</b> function
 * for a <b>mb_ereg_replace_callback()</b> in just one place.
 * In this case you can use an anonymous function to
 * declare the callback within the call to
 * <b>mb_ereg_replace_callback()</b>. By doing it this way
 * you have all information for the call in one place and do not
 * clutter the function namespace with a callback function's name
 * not used anywhere else.
 * </p>
 * @param string $string <p>
 * The string being checked.
 * </p>
 * @param string $options <p>
 * Matching condition can be set by <em><b>option</b></em>
 * parameter. If <em>i</em> is specified for this
 * parameter, the case will be ignored. If <em>x</em> is
 * specified, white space will be ignored. If <em>m</em>
 * is specified, match will be executed in multiline mode and line
 * break will be included in '.'. If <em>p</em> is
 * specified, match will be executed in POSIX mode, line break
 * will be considered as normal character. Note that <em>e</em>
 * cannot be used for <b>mb_ereg_replace_callback()</b>.
 * </p>
 * @return string|false|null <p>
 * The resultant string on success, or <b>FALSE</b> on error.
 * </p>
 * @since 5.4.1
 */
function mb_ereg_replace_callback(string $pattern, callable $callback, string $string, ?string $options = null): string|false|null {}

/**
 * Replace regular expression with multibyte support ignoring case
 * @link https://php.net/manual/en/function.mb-eregi-replace.php
 * @param string $pattern <p>
 * The regular expression pattern. Multibyte characters may be used. The case will be ignored.
 * </p>
 * @param string $replacement <p>
 * The replacement text.
 * </p>
 * @param string $string <p>
 * The searched string.
 * </p>
 * @param string|null $options option has the same meaning as in
 * mb_ereg_replace.
 * <p>PHP 7.1: The <i>e</i> modifier has been deprecated.</p>
 * @return string|false|null The resultant string or false on error.
 */
#[Pure]
function mb_eregi_replace(
    string $pattern,
    string $replacement,
    string $string,
    #[PhpStormStubsElementAvailable(from: '7.0')] ?string $options = null
): string|false|null {}

/**
 * Split multibyte string using regular expression
 * @link https://php.net/manual/en/function.mb-split.php
 * @param string $pattern <p>
 * The regular expression pattern.
 * </p>
 * @param string $string <p>
 * The string being split.
 * </p>
 * @param int $limit [optional] If optional parameter limit is specified,
 * it will be split in limit elements as
 * maximum.
 * @return string[]|false The result as an array.
 */
#[Pure]
function mb_split(string $pattern, string $string, int $limit = -1): array|false {}

/**
 * Regular expression match for multibyte string
 * @link https://php.net/manual/en/function.mb-ereg-match.php
 * @param string $pattern <p>
 * The regular expression pattern.
 * </p>
 * @param string $string <p>
 * The string being evaluated.
 * </p>
 * @param string|null $options [optional] <p>
 * </p>
 * @return bool
 */
#[Pure]
function mb_ereg_match(string $pattern, string $string, ?string $options): bool {}

/**
 * Multibyte regular expression match for predefined multibyte string
 * @link https://php.net/manual/en/function.mb-ereg-search.php
 * @param string|null $pattern [optional] <p>
 * The search pattern.
 * </p>
 * @param string|null $options [optional] <p>
 * The search option.
 * </p>
 * @return bool
 */
#[Pure]
function mb_ereg_search(?string $pattern, ?string $options): bool {}

/**
 * Returns position and length of a matched part of the multibyte regular expression for a predefined multibyte string
 * @link https://php.net/manual/en/function.mb-ereg-search-pos.php
 * @param string|null $pattern [optional] <p>
 * The search pattern.
 * </p>
 * @param string|null $options [optional] <p>
 * The search option.
 * </p>
 * @return int[]|false An array containing two elements. The first
 * element is the offset, in bytes, where the match begins relative
 * to the start of the search string, and the second element is the
 * length in bytes of the match. If an error occurs, FALSE is returned.
 */
#[Pure]
function mb_ereg_search_pos(?string $pattern, ?string $options): array|false {}

/**
 * Returns the matched part of a multibyte regular expression
 * @link https://php.net/manual/en/function.mb-ereg-search-regs.php
 * @param string|null $pattern [optional] <p>
 * The search pattern.
 * </p>
 * @param string|null $options [optional] <p>
 * The search option.
 * </p>
 * @return string[]|false mb_ereg_search_regs() executes the multibyte
 * regular expression match, and if there are some matched part, it
 * returns an array including substring of matched part as first element,
 * the first grouped part with brackets as second element, the second grouped
 * part as third element, and so on. It returns FALSE on error.
 */
#[Pure]
function mb_ereg_search_regs(?string $pattern, ?string $options): array|false {}

/**
 * Setup string and regular expression for a multibyte regular expression match
 * @link https://php.net/manual/en/function.mb-ereg-search-init.php
 * @param string $string <p>
 * The search string.
 * </p>
 * @param string|null $pattern [optional] <p>
 * The search pattern.
 * </p>
 * @param string|null $options [optional] <p>
 * The search option.
 * </p>
 * @return bool
 */
function mb_ereg_search_init(string $string, ?string $pattern, ?string $options): bool {}

/**
 * Retrieve the result from the last multibyte regular expression match
 * @link https://php.net/manual/en/function.mb-ereg-search-getregs.php
 * @return string[]|false An array including the sub-string of matched
 * part by last mb_ereg_search(), mb_ereg_search_pos(), mb_ereg_search_regs().
 * If there are some matches, the first element will have the matched
 * sub-string, the second element will have the first part grouped with
 * brackets, the third element will have the second part grouped with
 * brackets, and so on. It returns FALSE on error;
 */
#[Pure]
function mb_ereg_search_getregs(): array|false {}

/**
 * Returns start point for next regular expression match
 * @link https://php.net/manual/en/function.mb-ereg-search-getpos.php
 * @return int
 */
#[Pure]
#[Deprecated(since: '7.3')]
function mb_ereg_search_getpos(): int {}

/**
 * Set start point of next regular expression match
 * @link https://php.net/manual/en/function.mb-ereg-search-setpos.php
 * @param int $offset <p>
 * The position to set.
 * </p>
 * @return bool
 */
#[Pure]
function mb_ereg_search_setpos(int $offset): bool {}

/**
 * @param $encoding [optional]
 * @see mb_regex_encoding
 * @removed 8.0
 */
#[Deprecated(replacement: "mb_regex_encoding(%parametersList%)", since: "7.3")]
function mbregex_encoding($encoding) {}

/**
 * @param string $pattern
 * @param string $string
 * @param array &$registers [optional]
 * @see mb_ereg
 * @removed 8.0
 */
#[Deprecated(replacement: 'mb_ereg(%parametersList%)', since: '7.3')]
function mbereg(string $pattern, string $string, array &$registers) {}

/**
 * @param string $pattern
 * @param string $string
 * @param array &$registers [optional]
 * @see mb_eregi
 * @removed 8.0
 */
#[Deprecated(replacement: "mb_eregi(%parametersList%)", since: "7.3")]
function mberegi(string $pattern, string $string, array &$registers) {}

/**
 * @param $pattern
 * @param $replacement
 * @param $string
 * @param $option [optional]
 * @see mb_ereg_replace
 * @removed 8.0
 */
#[Deprecated(replacement: 'mb_ereg_replace(%parametersList%)', since: '7.3')]
function mbereg_replace($pattern, $replacement, $string, $option) {}

/**
 * @param $pattern
 * @param $replacement
 * @param $string
 * @param string $option
 * @return string
 * @see mb_eregi_replace
 * @removed 8.0
 */
#[Deprecated(replacement: "mb_eregi_replace(%parametersList%)", since: "7.3")]
function mberegi_replace(
    $pattern,
    $replacement,
    $string,
    #[PhpStormStubsElementAvailable(from: '7.0')] string $option = "msri"
): string {}

/**
 * @param $pattern
 * @param $string
 * @param $limit [optional]
 * @see mb_split
 * @removed 8.0
 */
#[Deprecated(replacement: 'mb_split(%parametersList%)', since: '7.3')]
function mbsplit($pattern, $string, $limit) {}

/**
 * @param $pattern
 * @param $string
 * @param $option [optional]
 * @see mb_ereg_match
 * @removed 8.0
 */
#[Deprecated(replacement: "mb_ereg_match(%parametersList%)", since: "7.3")]
function mbereg_match($pattern, $string, $option) {}

/**
 * @param $pattern [optional]
 * @param $option [optional]
 * @see mb_ereg_search
 * @removed 8.0
 */
#[Deprecated("use mb_ereg_search instead", replacement: "mb_ereg_search(%parametersList%)", since: "7.3")]
function mbereg_search($pattern, $option) {}

/**
 * @param $pattern [optional]
 * @param $option [optional]
 * @see mb_ereg_search_pos
 * @removed 8.0
 */
#[Deprecated(replacement: "mb_ereg_search_pos(%parametersList%)", since: "7.3")]
function mbereg_search_pos($pattern, $option) {}

/**
 * @param $pattern [optional]
 * @param $option [optional]
 * @see mb_ereg_search_regs
 * @removed 8.0
 */
#[Deprecated(replacement: 'mb_ereg_search_regs(%parametersList%)', since: '7.3')]
function mbereg_search_regs($pattern, $option) {}

/**
 * @param $string
 * @param $pattern [optional]
 * @param $option [optional]
 * @see mb_ereg_search_init
 * @removed 8.0
 */
#[Deprecated(replacement: "mb_ereg_search_init(%parametersList%)", since: "7.3")]
function mbereg_search_init($string, $pattern, $option) {}

/**
 * @see mb_ereg_search_getregs
 * @removed 8.0
 */
#[Deprecated(replacement: 'mb_ereg_search_getregs(%parametersList%)', since: '7.3')]
function mbereg_search_getregs() {}

/**
 * @see mb_ereg_search_getpos
 * @removed 8.0
 */
#[Deprecated(replacement: "mb_ereg_search_getpos()", since: "7.3")]
function mbereg_search_getpos() {}

/**
 * Get a specific character.
 * @link https://www.php.net/manual/en/function.mb-chr.php
 * @param int $codepoint
 * @param string|null $encoding [optional]
 * @return string|false specific character or FALSE on failure.
 * @since 7.2
 */
#[Pure]
function mb_chr(int $codepoint, ?string $encoding): string|false {}

/**
 * Get code point of character
 * @link https://www.php.net/manual/en/function.mb-ord.php
 * @param string $string
 * @param string|null $encoding [optional]
 * @return int|false code point of character or FALSE on failure.
 * @since 7.2
 */
#[Pure]
function mb_ord(string $string, ?string $encoding): int|false {}

/**
 * Scrub broken multibyte strings.
 * @link https://www.php.net/manual/en/function.mb-scrub.php
 * @param string $string
 * @param string|null $encoding [optional]
 * @return string|false
 * @since 7.2
 */
#[Pure]
#[LanguageLevelTypeAware(["8.0" => "string"], default: "string|false")]
function mb_scrub(string $string, ?string $encoding): false|string {}

/**
 * @param $position
 * @see mb_ereg_search_setpos
 */
#[Deprecated(replacement: "mb_ereg_search_setpos(%parametersList%)", since: "7.3")]
#[Pure]
function mbereg_search_setpos($position) {}

/**
 * Function performs string splitting to an array of defined size chunks.
 * @param string $string <p>
 * The string to split into characters or chunks.
 * </p>
 * @param int $length [optional] <p>
 * If specified, each element of the returned array will be composed of multiple characters instead of a single character.
 * </p>
 * @param string|null $encoding [optional] <p>
 * Character encoding name to use.
 * If it is omitted, internal character encoding is used.
 * </p>
 * @return string[]|false
 * @since 7.4
 */
#[Pure]
#[LanguageLevelTypeAware(["8.0" => "array"], default: "array|false")]
function mb_str_split(string $string, int $length = 1, ?string $encoding) {}

/**
 * @removed 8.0
 */
define('MB_OVERLOAD_MAIL', 1);
/**
 * @removed 8.0
 */
define('MB_OVERLOAD_STRING', 2);
/**
 * @removed 8.0
 */
define('MB_OVERLOAD_REGEX', 4);
define('MB_CASE_UPPER', 0);
define('MB_CASE_LOWER', 1);
define('MB_CASE_TITLE', 2);
/**
 * @since 7.3
 */
define('MB_CASE_FOLD', 3);
/**
 * @since 7.3
 */
define('MB_CASE_UPPER_SIMPLE', 4);
/**
 * @since 7.3
 */
define('MB_CASE_LOWER_SIMPLE', 5);
/**
 * @since 7.3
 */
define('MB_CASE_TITLE_SIMPLE', 6);
/**
 * @since 7.3
 */
define('MB_CASE_FOLD_SIMPLE', 7);

/**
 * @since 7.4
 */
define('MB_ONIGURUMA_VERSION', '6.9.8');

// End of mbstring v.
<?php

// Start of PDO v.1.0.4dev
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;

/**
 * Represents an error raised by PDO. You should not throw a
 * <b>PDOException</b> from your own code.
 * @see https://php.net/manual/en/language.exceptions.php Exceptions in PHP
 * @link https://php.net/manual/en/class.pdoexception.php
 */
class PDOException extends RuntimeException
{
    #[LanguageLevelTypeAware(['8.1' => 'array|null'], default: '')]
    public $errorInfo;
    protected $code;
}

/**
 * Represents a connection between PHP and a database server.
 * @link https://php.net/manual/en/class.pdo.php
 */
class PDO
{
    /**
     * Represents the SQL NULL data type.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-null
     */
    public const PARAM_NULL = 0;

    /**
     * Represents the SQL INTEGER data type.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-int
     */
    public const PARAM_INT = 1;

    /**
     * Represents the SQL CHAR, VARCHAR, or other string data type.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-str
     */
    public const PARAM_STR = 2;

    /**
     * Represents the SQL large object data type.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-lob
     */
    public const PARAM_LOB = 3;

    /**
     * Represents a recordset type. Not currently supported by any drivers.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-stmt
     */
    public const PARAM_STMT = 4;

    /**
     * Represents a boolean data type.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-bool
     */
    public const PARAM_BOOL = 5;

    /**
     * Flag to denote a string uses the national character set.
     * @since 7.2
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-str-natl
     */
    public const PARAM_STR_NATL = 1073741824;

    /**
     * Flag to denote a string uses the regular character set.
     * @since 7.2
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-str-char
     */
    public const PARAM_STR_CHAR = 536870912;

    /**
     * Sets the default string parameter type, this can be one of PDO::PARAM_STR_NATL and PDO::PARAM_STR_CHAR.
     * @since 7.2
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-default-str-param
     */
    public const ATTR_DEFAULT_STR_PARAM = 21;

    /**
     * Specifies that a function created with PDO::sqliteCreateFunction() is deterministic, i.e. it always returns the same result given the same inputs within a single SQL statement.
     * @since 7.1.4
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.sqlite-deterministic
     */
    public const SQLITE_DETERMINISTIC = 2048;

    /**
     * @since 7.3
     */
    public const SQLITE_OPEN_READONLY = 1;

    /**
     * @since 7.3
     */
    public const SQLITE_OPEN_READWRITE = 2;

    /**
     * @since 7.3
     */
    public const SQLITE_OPEN_CREATE = 4;

    /**
     * @since 7.3
     */
    public const SQLITE_ATTR_OPEN_FLAGS = 1000;

    /**
     * Specifies that the parameter is an INOUT parameter for a stored
     * procedure. You must bitwise-OR this value with an explicit
     * PDO::PARAM_* data type.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-input-output
     */
    public const PARAM_INPUT_OUTPUT = 2147483648;

    /**
     * Allocation event
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-evt-alloc
     */
    public const PARAM_EVT_ALLOC = 0;

    /**
     * Deallocation event
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-evt-free
     */
    public const PARAM_EVT_FREE = 1;

    /**
     * Event triggered prior to execution of a prepared statement.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-evt-exec-pre
     */
    public const PARAM_EVT_EXEC_PRE = 2;

    /**
     * Event triggered subsequent to execution of a prepared statement.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-evt-exec-post
     */
    public const PARAM_EVT_EXEC_POST = 3;

    /**
     * Event triggered prior to fetching a result from a resultset.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-evt-fetch-pre
     */
    public const PARAM_EVT_FETCH_PRE = 4;

    /**
     * Event triggered subsequent to fetching a result from a resultset.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-evt-fetch-post
     */
    public const PARAM_EVT_FETCH_POST = 5;

    /**
     * Event triggered during bound parameter registration
     * allowing the driver to normalize the parameter name.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-evt-normalize
     */
    public const PARAM_EVT_NORMALIZE = 6;

    /**
     * Specifies that the fetch method shall return each row as an object with
     * variable names that correspond to the column names returned in the result
     * set. <b>PDO::FETCH_LAZY</b> creates the object variable names as they are accessed.
     * Not valid inside <b>PDOStatement::fetchAll</b>.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-lazy
     */
    public const FETCH_LAZY = 1;

    /**
     * Specifies that the fetch method shall return each row as an array indexed
     * by column name as returned in the corresponding result set. If the result
     * set contains multiple columns with the same name,
     * <b>PDO::FETCH_ASSOC</b> returns
     * only a single value per column name.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-assoc
     */
    public const FETCH_ASSOC = 2;

    /**
     * Specifies that the fetch method shall return each row as an array indexed
     * by column number as returned in the corresponding result set, starting at
     * column 0.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-num
     */
    public const FETCH_NUM = 3;

    /**
     * Specifies that the fetch method shall return each row as an array indexed
     * by both column name and number as returned in the corresponding result set,
     * starting at column 0.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-both
     */
    public const FETCH_BOTH = 4;

    /**
     * Specifies that the fetch method shall return each row as an object with
     * property names that correspond to the column names returned in the result
     * set.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-obj
     */
    public const FETCH_OBJ = 5;

    /**
     * Specifies that the fetch method shall return TRUE and assign the values of
     * the columns in the result set to the PHP variables to which they were
     * bound with the <b>PDOStatement::bindParam</b> or
     * <b>PDOStatement::bindColumn</b> methods.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-bound
     */
    public const FETCH_BOUND = 6;

    /**
     * Specifies that the fetch method shall return only a single requested
     * column from the next row in the result set.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-column
     */
    public const FETCH_COLUMN = 7;

    /**
     * Specifies that the fetch method shall return a new instance of the
     * requested class, mapping the columns to named properties in the class.
     * The magic
     * <b>__set</b>
     * method is called if the property doesn't exist in the requested class
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-class
     */
    public const FETCH_CLASS = 8;

    /**
     * Specifies that the fetch method shall update an existing instance of the
     * requested class, mapping the columns to named properties in the class.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-into
     */
    public const FETCH_INTO = 9;

    /**
     * Allows completely customize the way data is treated on the fly (only
     * valid inside <b>PDOStatement::fetchAll</b>).
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-func
     */
    public const FETCH_FUNC = 10;

    /**
     * Group return by values. Usually combined with
     * <b>PDO::FETCH_COLUMN</b> or
     * <b>PDO::FETCH_KEY_PAIR</b>.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-group
     */
    public const FETCH_GROUP = 65536;

    /**
     * Fetch only the unique values.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-unique
     */
    public const FETCH_UNIQUE = 196608;

    /**
     * Fetch a two-column result into an array where the first column is a key and the second column
     * is the value.
     * @since 5.2.3
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-key-pair
     */
    public const FETCH_KEY_PAIR = 12;

    /**
     * Determine the class name from the value of first column.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-classtype
     */
    public const FETCH_CLASSTYPE = 262144;

    /**
     * As <b>PDO::FETCH_INTO</b> but object is provided as a serialized string.
     * Available since PHP 5.1.0. Since PHP 5.3.0 the class constructor is never called if this
     * flag is set.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-serialize
     */
    public const FETCH_SERIALIZE = 524288;

    /**
     * Call the constructor before setting properties.
     * @since 5.2.0
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-props-late
     */
    public const FETCH_PROPS_LATE = 1048576;

    /**
     * Specifies that the fetch method shall return each row as an array indexed
     * by column name as returned in the corresponding result set. If the result
     * set contains multiple columns with the same name,
     * <b>PDO::FETCH_NAMED</b> returns
     * an array of values per column name.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-named
     */
    public const FETCH_NAMED = 11;

    /**
     * If this value is <b>FALSE</b>, PDO attempts to disable autocommit so that the
     * connection begins a transaction.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-autocommit
     */
    public const ATTR_AUTOCOMMIT = 0;

    /**
     * Setting the prefetch size allows you to balance speed against memory
     * usage for your application. Not all database/driver combinations support
     * setting of the prefetch size. A larger prefetch size results in
     * increased performance at the cost of higher memory usage.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-prefetch
     */
    public const ATTR_PREFETCH = 1;

    /**
     * Sets the timeout value in seconds for communications with the database.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-timeout
     */
    public const ATTR_TIMEOUT = 2;

    /**
     * @see https://php.net/manual/en/pdo.error-handling.php Errors and error handling
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-errmode
     */
    public const ATTR_ERRMODE = 3;

    /**
     * This is a read only attribute; it will return information about the
     * version of the database server to which PDO is connected.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-
     */
    public const ATTR_SERVER_VERSION = 4;

    /**
     * This is a read only attribute; it will return information about the
     * version of the client libraries that the PDO driver is using.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-client-version
     */
    public const ATTR_CLIENT_VERSION = 5;

    /**
     * This is a read only attribute; it will return some meta information about the
     * database server to which PDO is connected.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-server-info
     */
    public const ATTR_SERVER_INFO = 6;
    public const ATTR_CONNECTION_STATUS = 7;

    /**
     * Force column names to a specific case specified by the PDO::CASE_*
     * constants.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-case
     */
    public const ATTR_CASE = 8;

    /**
     * Get or set the name to use for a cursor. Most useful when using
     * scrollable cursors and positioned updates.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-cursor-name
     */
    public const ATTR_CURSOR_NAME = 9;

    /**
     * Selects the cursor type. PDO currently supports either
     * <b>PDO::CURSOR_FWDONLY</b> and
     * <b>PDO::CURSOR_SCROLL</b>. Stick with
     * <b>PDO::CURSOR_FWDONLY</b> unless you know that you need a
     * scrollable cursor.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-cursor
     */
    public const ATTR_CURSOR = 10;

    /**
     * Convert empty strings to SQL NULL values on data fetches.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-oracle-nulls
     */
    public const ATTR_ORACLE_NULLS = 11;

    /**
     * Request a persistent connection, rather than creating a new connection.
     * @see https://php.net/manual/en/pdo.connections.php Connections and Connection Management
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-persistent
     */
    public const ATTR_PERSISTENT = 12;

    /**
     * Sets the class name of which statements are returned as.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-statement-class
     */
    public const ATTR_STATEMENT_CLASS = 13;

    /**
     * Prepend the containing table name to each column name returned in the
     * result set. The table name and column name are separated by a decimal (.)
     * character. Support of this attribute is at the driver level; it may not
     * be supported by your driver.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-fetch-table-names
     */
    public const ATTR_FETCH_TABLE_NAMES = 14;

    /**
     * Prepend the containing catalog name to each column name returned in the
     * result set. The catalog name and column name are separated by a decimal
     * (.) character. Support of this attribute is at the driver level; it may
     * not be supported by your driver.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-fetch-catalog-names
     */
    public const ATTR_FETCH_CATALOG_NAMES = 15;

    /**
     * Returns the name of the driver.
     * <p>
     * using <b>PDO::ATTR_DRIVER_NAME</b>
     * <code>
     * if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql') {
     * echo "Running on mysql; doing something mysql specific here\n";
     * }
     * </code>
     * </p>
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-driver-name
     */
    public const ATTR_DRIVER_NAME = 16;

    /**
     * Forces all values fetched to be treated as strings.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-stringify-fetches
     */
    public const ATTR_STRINGIFY_FETCHES = 17;

    /**
     * Sets the maximum column name length.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-max-column-len
     */
    public const ATTR_MAX_COLUMN_LEN = 18;

    /**
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-emulate-prepares
     * @since 5.1.3
     */
    public const ATTR_EMULATE_PREPARES = 20;

    /**
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-default-fetch-mode
     * @since 5.2.0
     */
    public const ATTR_DEFAULT_FETCH_MODE = 19;

    /**
     * Do not raise an error or exception if an error occurs. The developer is
     * expected to explicitly check for errors. This is the default mode.
     * @see https://php.net/manual/en/pdo.error-handling.php  Errors and Error Handling
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.errmode-silent
     */
    public const ERRMODE_SILENT = 0;

    /**
     * Issue a PHP <b>E_WARNING</b> message if an error occurs.
     * @see https://php.net/manual/en/pdo.error-handling.php  Errors and Error Handling
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.errmode-warning
     */
    public const ERRMODE_WARNING = 1;

    /**
     * Throw a <b>PDOException</b> if an error occurs.
     * @see https://php.net/manual/en/pdo.error-handling.php  Errors and Error Handling
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.errmode-exception
     */
    public const ERRMODE_EXCEPTION = 2;

    /**
     * Leave column names as returned by the database driver.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.case-natural
     */
    public const CASE_NATURAL = 0;

    /**
     * Force column names to lower case.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.case-lower
     */
    public const CASE_LOWER = 2;

    /**
     * Force column names to upper case.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.case-upper
     */
    public const CASE_UPPER = 1;

    /**
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.null-natural
     */
    public const NULL_NATURAL = 0;

    /**
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.null-empty-string
     */
    public const NULL_EMPTY_STRING = 1;

    /**
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.null-to-string
     */
    public const NULL_TO_STRING = 2;

    /**
     * Corresponds to SQLSTATE '00000', meaning that the SQL statement was
     * successfully issued with no errors or warnings. This constant is for
     * your convenience when checking <b>PDO::errorCode</b> or
     * <b>PDOStatement::errorCode</b> to determine if an error
     * occurred. You will usually know if this is the case by examining the
     * return code from the method that raised the error condition anyway.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.err-none
     */
    public const ERR_NONE = '00000';

    /**
     * Fetch the next row in the result set. Valid only for scrollable cursors.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-ori-next
     */
    public const FETCH_ORI_NEXT = 0;

    /**
     * Fetch the previous row in the result set. Valid only for scrollable
     * cursors.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-ori-prior
     */
    public const FETCH_ORI_PRIOR = 1;

    /**
     * Fetch the first row in the result set. Valid only for scrollable cursors.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-ori-first
     */
    public const FETCH_ORI_FIRST = 2;

    /**
     * Fetch the last row in the result set. Valid only for scrollable cursors.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-ori-last
     */
    public const FETCH_ORI_LAST = 3;

    /**
     * Fetch the requested row by row number from the result set. Valid only
     * for scrollable cursors.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-ori-abs
     */
    public const FETCH_ORI_ABS = 4;

    /**
     * Fetch the requested row by relative position from the current position
     * of the cursor in the result set. Valid only for scrollable cursors.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-ori-rel
     */
    public const FETCH_ORI_REL = 5;

    /**
     * Specifies that the default fetch mode shall be used.
     * @since 8.0.7
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-default
     */
    public const FETCH_DEFAULT = 0;

    /**
     * Create a <b>PDOStatement</b> object with a forward-only cursor. This is the
     * default cursor choice, as it is the fastest and most common data access
     * pattern in PHP.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.cursor-fwdonly
     */
    public const CURSOR_FWDONLY = 0;

    /**
     * Create a <b>PDOStatement</b> object with a scrollable cursor. Pass the
     * PDO::FETCH_ORI_* constants to control the rows fetched from the result set.
     * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.cursor-scroll
     */
    public const CURSOR_SCROLL = 1;

    /**
     * If this attribute is set to <b>TRUE</b> on a
     * <b>PDOStatement</b>, the MySQL driver will use the
     * buffered versions of the MySQL API. If you're writing portable code, you
     * should use <b>PDOStatement::fetchAll</b> instead.
     * <p>
     * Forcing queries to be buffered in mysql
     * <code>
     * if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql') {
     * $stmt = $db->prepare('select * from foo',
     * array(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true));
     * } else {
     * die("my application only works with mysql; I should use \$stmt->fetchAll() instead");
     * }
     * </code>
     * </p>
     * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-use-buffered-query
     */
    public const MYSQL_ATTR_USE_BUFFERED_QUERY = 1000;

    /**
     * <p>
     * Enable LOAD LOCAL INFILE.
     * </p>
     * <p>
     * Note, this constant can only be used in the <i>driver_options</i>
     * array when constructing a new database handle.
     * </p>
     * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-local-infile
     */
    public const MYSQL_ATTR_LOCAL_INFILE = 1001;

    /**
     * <p>
     * Command to execute when connecting to the MySQL server. Will
     * automatically be re-executed when reconnecting.
     * </p>
     * <p>
     * Note, this constant can only be used in the <i>driver_options</i>
     * array when constructing a new database handle.
     * </p>
     * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-init-command
     */
    public const MYSQL_ATTR_INIT_COMMAND = 1002;

    /**
     * <p>
     * Maximum buffer size. Defaults to 1 MiB. This constant is not supported when
     * compiled against mysqlnd.
     * </p>
     * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-max-buffer-size
     */
    public const MYSQL_ATTR_MAX_BUFFER_SIZE = 1005;

    /**
     * <p>
     * Read options from the named option file instead of from
     * my.cnf. This option is not available if
     * mysqlnd is used, because mysqlnd does not read the mysql
     * configuration files.
     * </p>
     * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-read-default-file
     */
    public const MYSQL_ATTR_READ_DEFAULT_FILE = 1003;

    /**
     * <p>
     * Read options from the named group from my.cnf or the
     * file specified with <b>MYSQL_READ_DEFAULT_FILE</b>. This option
     * is not available if mysqlnd is used, because mysqlnd does not read the mysql
     * configuration files.
     * </p>
     * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-read-default-group
     */
    public const MYSQL_ATTR_READ_DEFAULT_GROUP = 1004;

    /**
     * <p>
     * Enable network communication compression. This is not supported when
     * compiled against mysqlnd.
     * </p>
     * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-compress
     */
    public const MYSQL_ATTR_COMPRESS = 1003;

    /**
     * <p>
     * Perform direct queries, don't use prepared statements.
     * </p>
     * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-direct-query
     */
    public const MYSQL_ATTR_DIRECT_QUERY = 1004;

    /**
     * <p>
     * Return the number of found (matched) rows, not the
     * number of changed rows.
     * </p>
     * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-found-rows
     */
    public const MYSQL_ATTR_FOUND_ROWS = 1005;

    /**
     * <p>
     * Permit spaces after function names. Makes all functions
     * names reserved words.
     * </p>
     * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-ignore-space
     */
    public const MYSQL_ATTR_IGNORE_SPACE = 1006;
    public const MYSQL_ATTR_SERVER_PUBLIC_KEY = 1012;

    /**
     * <p>
     * The file path to the SSL key.
     * </p>
     * @since 5.3.7
     * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-ssl-key
     */
    public const MYSQL_ATTR_SSL_KEY = 1007;

    /**
     * <p>
     * The file path to the SSL certificate.
     * </p>
     * @since 5.3.7
     * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-ssl-cert
     */
    public const MYSQL_ATTR_SSL_CERT = 1008;

    /**
     * <p>
     * The file path to the SSL certificate authority.
     * </p>
     * @since 5.3.7
     * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-ssl-ca
     */
    public const MYSQL_ATTR_SSL_CA = 1009;

    /**
     * <p>
     * The file path to the directory that contains the trusted SSL
     * CA certificates, which are stored in PEM format.
     * </p>
     * @since 5.3.7
     * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-ssl-capath
     */
    public const MYSQL_ATTR_SSL_CAPATH = 1010;

    /**
     * <p>
     * A list of one or more permissible ciphers to use for SSL encryption,
     * in a format understood by OpenSSL.
     * For example: DHE-RSA-AES256-SHA:AES128-SHA
     * </p>
     * @since 5.3.7
     * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-cipher
     */
    public const MYSQL_ATTR_SSL_CIPHER = 1011;

    /**
     * <p>
     * Disables multi query execution in both {@see PDO::prepare()} and {@see PDO::query()} when set to FALSE.
     * </p>
     * <p>
     * Note, this constant can only be used in the driver_options array when constructing a new database handle.
     * </p>
     * @since 5.5.21
     * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-multi-statements
     */
    public const MYSQL_ATTR_MULTI_STATEMENTS = 1013;

    /**
     * <p>
     * Disables SSL peer verification when set to FALSE.
     * </p>
     * @since 7.0.18
     * @since 7.1.4
     * @link https://bugs.php.net/bug.php?id=71003
     */
    public const MYSQL_ATTR_SSL_VERIFY_SERVER_CERT = 1014;

    /**
     * @since 8.1
     */
    public const MYSQL_ATTR_LOCAL_INFILE_DIRECTORY = 1015;

    #[Deprecated("Use PDO::ATTR_EMULATE_PREPARES instead")]
    public const PGSQL_ASSOC = 1;

    /**
     * @removed 7.1
     */
    public const PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT = 1000;

    /**
     * @since 5.6
     */
    public const PGSQL_ATTR_DISABLE_PREPARES = 1000;
    public const PGSQL_BAD_RESPONSE = 5;
    public const PGSQL_BOTH = 3;
    public const PGSQL_TRANSACTION_IDLE = 0;
    public const PGSQL_TRANSACTION_ACTIVE = 1;
    public const PGSQL_TRANSACTION_INTRANS = 2;
    public const PGSQL_TRANSACTION_INERROR = 3;
    public const PGSQL_TRANSACTION_UNKNOWN = 4;
    public const PGSQL_CONNECT_ASYNC = 4;
    public const PGSQL_CONNECT_FORCE_NEW = 2;
    public const PGSQL_CONNECTION_AUTH_OK = 5;
    public const PGSQL_CONNECTION_AWAITING_RESPONSE = 4;
    public const PGSQL_CONNECTION_BAD = 1;
    public const PGSQL_CONNECTION_OK = 0;
    public const PGSQL_CONNECTION_MADE = 3;
    public const PGSQL_CONNECTION_SETENV = 6;
    public const PGSQL_CONNECTION_SSL_STARTUP = 7;
    public const PGSQL_CONNECTION_STARTED = 2;
    public const PGSQL_COMMAND_OK = 1;
    public const PGSQL_CONV_FORCE_NULL = 4;
    public const PGSQL_CONV_IGNORE_DEFAULT = 2;
    public const PGSQL_CONV_IGNORE_NOT_NULL = 8;
    public const PGSQL_COPY_IN = 4;
    public const PGSQL_COPY_OUT = 3;
    public const PGSQL_DIAG_CONTEXT = 87;
    public const PGSQL_DIAG_INTERNAL_POSITION = 112;
    public const PGSQL_DIAG_INTERNAL_QUERY = 113;
    public const PGSQL_DIAG_MESSAGE_DETAIL = 68;
    public const PGSQL_DIAG_MESSAGE_HINT = 72;
    public const PGSQL_DIAG_MESSAGE_PRIMARY = 77;
    public const PGSQL_DIAG_SEVERITY = 83;
    public const PGSQL_DIAG_SOURCE_FILE = 70;
    public const PGSQL_DIAG_SOURCE_FUNCTION = 82;
    public const PGSQL_DIAG_SOURCE_LINE = 76;
    public const PGSQL_DIAG_SQLSTATE = 67;
    public const PGSQL_DIAG_STATEMENT_POSITION = 80;
    public const PGSQL_DML_ASYNC = 1024;
    public const PGSQL_DML_EXEC = 512;
    public const PGSQL_DML_NO_CONV = 256;
    public const PGSQL_DML_STRING = 2048;
    public const PGSQL_DML_ESCAPE = 4096;
    public const PGSQL_EMPTY_QUERY = 0;
    public const PGSQL_ERRORS_DEFAULT = 1;
    public const PGSQL_ERRORS_TERSE = 0;
    public const PGSQL_ERRORS_VERBOSE = 2;
    public const PGSQL_FATAL_ERROR = 7;
    public const PGSQL_NONFATAL_ERROR = 6;
    public const PGSQL_NOTICE_ALL = 2;
    public const PGSQL_NOTICE_CLEAR = 3;
    public const PGSQL_NOTICE_LAST = 1;
    public const PGSQL_NUM = 2;
    public const PGSQL_POLLING_ACTIVE = 4;
    public const PGSQL_POLLING_FAILED = 0;
    public const PGSQL_POLLING_OK = 3;
    public const PGSQL_POLLING_READING = 1;
    public const PGSQL_POLLING_WRITING = 2;
    public const PGSQL_SEEK_CUR = 1;
    public const PGSQL_SEEK_END = 2;
    public const PGSQL_SEEK_SET = 0;
    public const PGSQL_STATUS_LONG = 1;
    public const PGSQL_STATUS_STRING = 2;
    public const PGSQL_TUPLES_OK = 2;
    public const SQLSRV_TXN_READ_UNCOMMITTED = "READ_UNCOMMITTED";
    public const SQLSRV_TXN_READ_COMMITTED = "READ_COMMITTED";
    public const SQLSRV_TXN_REPEATABLE_READ = "REPEATABLE_READ";
    public const SQLSRV_TXN_SNAPSHOT = "SNAPSHOT";
    public const SQLSRV_TXN_SERIALIZABLE = "SERIALIZABLE";
    public const SQLSRV_ENCODING_BINARY = 2;
    public const SQLSRV_ENCODING_SYSTEM = 3;
    public const SQLSRV_ENCODING_UTF8 = 65001;
    public const SQLSRV_ENCODING_DEFAULT = 1;
    public const SQLSRV_ATTR_ENCODING = 1000;
    public const SQLSRV_ATTR_QUERY_TIMEOUT = 1001;
    public const SQLSRV_ATTR_DIRECT_QUERY = 1002;
    public const SQLSRV_ATTR_CURSOR_SCROLL_TYPE = 1003;
    public const SQLSRV_ATTR_CLIENT_BUFFER_MAX_KB_SIZE = 1004;
    public const SQLSRV_ATTR_FETCHES_NUMERIC_TYPE = 1005;
    public const SQLSRV_ATTR_FETCHES_DATETIME_TYPE = 1006;
    public const SQLSRV_ATTR_FORMAT_DECIMALS = 1007;
    public const SQLSRV_ATTR_DECIMAL_PLACES = 1008;
    public const SQLSRV_ATTR_DATA_CLASSIFICATION = 1009;
    public const SQLSRV_PARAM_OUT_DEFAULT_SIZE = -1;
    public const SQLSRV_CURSOR_KEYSET = 1;
    public const SQLSRV_CURSOR_DYNAMIC = 2;
    public const SQLSRV_CURSOR_STATIC = 3;
    public const SQLSRV_CURSOR_BUFFERED = 42;

    /**
     * @since 7.4
     */
    public const SQLITE_ATTR_READONLY_STATEMENT = 1001;

    /**
     * @since 7.4
     */
    public const SQLITE_ATTR_EXTENDED_RESULT_CODES = 1002;

    /**
     * Provides a way to specify the action on the database session.
     * @since 7.2.16
     * @since 7.3.3
     */
    public const OCI_ATTR_ACTION = 1000;

    /**
     * Provides a way to specify the client info on the database session.
     * @since 7.2.16
     * @since 7.3.3
     */
    public const OCI_ATTR_CLIENT_INFO = 1001;

    /**
     * Provides a way to specify the client identifier on the database session.
     * @since 7.2.16
     * @since 7.3.3
     */
    public const OCI_ATTR_CLIENT_IDENTIFIER = 1002;

    /**
     * Provides a way to specify the module on the database session.
     * @since 7.2.16
     * @since 7.3.3
     */
    public const OCI_ATTR_MODULE = 1003;

    /**
     * The number of milliseconds to wait for individual round trips to the database to complete before timing out.
     * @since 8.0
     */
    public const OCI_ATTR_CALL_TIMEOUT = 1004;

    /**
     * Sets the date format.
     */
    public const FB_ATTR_DATE_FORMAT = 1000;

    /**
     * Sets the time format.
     */
    public const FB_ATTR_TIME_FORMAT = 1001;

    /**
     * Sets the timestamp format.
     */
    public const FB_ATTR_TIMESTAMP_FORMAT = 1002;

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.1.0)<br/>
     * Creates a PDO instance representing a connection to a database
     * @link https://php.net/manual/en/pdo.construct.php
     * @param string $dsn
     * @param string $username [optional]
     * @param string $password [optional]
     * @param array $options [optional]
     * @throws PDOException if the attempt to connect to the requested database fails.
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $dsn,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $username = null,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $password = null,
        #[LanguageLevelTypeAware(['8.0' => 'array|null'], default: '')] $options = null
    ) {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.1.0)<br/>
     * Prepares a statement for execution and returns a statement object
     * @link https://php.net/manual/en/pdo.prepare.php
     * @param string $query <p>
     * This must be a valid SQL statement for the target database server.
     * </p>
     * @param array $options [optional] <p>
     * This array holds one or more key=&gt;value pairs to set
     * attribute values for the <b>PDOStatement</b> object that this method
     * returns. You would most commonly use this to set the
     * <b>PDO::ATTR_CURSOR</b> value to
     * <b>PDO::CURSOR_SCROLL</b> to request a scrollable cursor.
     * Some drivers have driver specific options that may be set at
     * prepare-time.
     * </p>
     * @return PDOStatement|false If the database server successfully prepares the statement,
     * <b>PDO::prepare</b> returns a
     * <b>PDOStatement</b> object.
     * If the database server cannot successfully prepare the statement,
     * <b>PDO::prepare</b> returns <b>FALSE</b> or emits
     * <b>PDOException</b> (depending on error handling).
     * </p>
     * <p>
     * Emulated prepared statements does not communicate with the database server
     * so <b>PDO::prepare</b> does not check the statement.
     */
    #[TentativeType]
    public function prepare(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $query,
        #[LanguageLevelTypeAware(['8.0' => 'array'], default: '')] $options = []
    ): PDOStatement|false {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.1.0)<br/>
     * Initiates a transaction
     * <p>
     * Turns off autocommit mode. While autocommit mode is turned off,
     * changes made to the database via the PDO object instance are not committed
     * until you end the transaction by calling {@link PDO::commit()}.
     * Calling {@link PDO::rollBack()} will roll back all changes to the database and
     * return the connection to autocommit mode.
     * </p>
     * <p>
     * Some databases, including MySQL, automatically issue an implicit COMMIT
     * when a database definition language (DDL) statement
     * such as DROP TABLE or CREATE TABLE is issued within a transaction.
     * The implicit COMMIT will prevent you from rolling back any other changes
     * within the transaction boundary.
     * </p>
     * @link https://php.net/manual/en/pdo.begintransaction.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @throws PDOException If there is already a transaction started or
     * the driver does not support transactions <br/>
     * <b>Note</b>: An exception is raised even when the <b>PDO::ATTR_ERRMODE</b>
     * attribute is not <b>PDO::ERRMODE_EXCEPTION</b>.
     */
    #[TentativeType]
    public function beginTransaction(): bool {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.1.0)<br/>
     * Commits a transaction
     * @link https://php.net/manual/en/pdo.commit.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @throws PDOException if there is no active transaction.
     */
    #[TentativeType]
    public function commit(): bool {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.1.0)<br/>
     * Rolls back a transaction
     * @link https://php.net/manual/en/pdo.rollback.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @throws PDOException if there is no active transaction.
     */
    #[TentativeType]
    public function rollBack(): bool {}

    /**
     * (PHP 5 &gt;= 5.3.3, Bundled pdo_pgsql, PHP 7)<br/>
     * Checks if inside a transaction
     * @link https://php.net/manual/en/pdo.intransaction.php
     * @return bool <b>TRUE</b> if a transaction is currently active, and <b>FALSE</b> if not.
     */
    #[TentativeType]
    public function inTransaction(): bool {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.1.0)<br/>
     * Set an attribute
     * @link https://php.net/manual/en/pdo.setattribute.php
     * @param int $attribute
     * @param mixed $value
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function setAttribute(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $attribute,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value
    ): bool {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.1.0)<br/>
     * Execute an SQL statement and return the number of affected rows
     * @link https://php.net/manual/en/pdo.exec.php
     * @param string $statement <p>
     * The SQL statement to prepare and execute.
     * </p>
     * <p>
     * Data inside the query should be properly escaped.
     * </p>
     * @return int|false <b>PDO::exec</b> returns the number of rows that were modified
     * or deleted by the SQL statement you issued. If no rows were affected,
     * <b>PDO::exec</b> returns 0.
     * </p>
     * This function may
     * return Boolean <b>FALSE</b>, but may also return a non-Boolean value which
     * evaluates to <b>FALSE</b>. Please read the section on Booleans for more
     * information. Use the ===
     * operator for testing the return value of this
     * function.
     * <p>
     * The following example incorrectly relies on the return value of
     * <b>PDO::exec</b>, wherein a statement that affected 0 rows
     * results in a call to <b>die</b>:
     * <code>
     * $db->exec() or die(print_r($db->errorInfo(), true));
     * </code>
     */
    #[TentativeType]
    public function exec(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $statement): int|false {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.2.0)<br/>
     * Executes an SQL statement, returning a result set as a PDOStatement object
     * @link https://php.net/manual/en/pdo.query.php
     * @param string $query <p>
     * The SQL statement to prepare and execute.
     * </p>
     * <p>
     * Data inside the query should be properly escaped.
     * </p>
     * @param int $fetchMode <p>
     * The fetch mode must be one of the PDO::FETCH_* constants.
     * </p>
     * @param mixed $arg3 <p>
     * The second and following parameters are the same as the parameters for PDOStatement::setFetchMode.
     * </p>
     * @param array $ctorargs [optional] <p>
     * Arguments of custom class constructor when the <i>mode</i>
     * parameter is set to <b>PDO::FETCH_CLASS</b>.
     * </p>
     * @return PDOStatement|false <b>PDO::query</b> returns a PDOStatement object, or <b>FALSE</b>
     * on failure.
     * @see PDOStatement::setFetchMode For a full description of the second and following parameters.
     */
    #[PhpStormStubsElementAvailable(to: '7.4')]
    public function query($query, $fetchMode = PDO::ATTR_DEFAULT_FETCH_MODE, $arg3 = null, $ctorargs = []) {}

    /**
     * (PHP 5 >= 5.1.0, PHP 7, PHP 8, PECL pdo &gt;= 0.2.0)<br/>
     * Executes an SQL statement, returning a result set as a PDOStatement object
     * @link https://php.net/manual/en/pdo.query.php
     * @param string $query <p>
     * The SQL statement to prepare and execute.
     * </p>
     * <p>
     * Data inside the query should be properly escaped.
     * </p>
     * @param int|null $fetchMode <p>
     * The fetch mode must be one of the PDO::FETCH_* constants.
     * </p>
     * @param mixed ...$fetch_mode_args <p>
     * Arguments of custom class constructor when the <i>mode</i>
     * parameter is set to <b>PDO::FETCH_CLASS</b>.
     * </p>
     * @return PDOStatement|false <b>PDO::query</b> returns a PDOStatement object, or <b>FALSE</b>
     * on failure.
     * @see PDOStatement::setFetchMode For a full description of the second and following parameters.
     */
    #[PhpStormStubsElementAvailable('8.0')]
    public function query(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $query,
        #[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $fetchMode = null,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] ...$fetch_mode_args
    ) {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.1.0)<br/>
     * Returns the ID of the last inserted row or sequence value
     * @link https://php.net/manual/en/pdo.lastinsertid.php
     * @param string $name [optional] <p>
     * Name of the sequence object from which the ID should be returned.
     * </p>
     * @return string|false If a sequence name was not specified for the <i>name</i>
     * parameter, <b>PDO::lastInsertId</b> returns a
     * string representing the row ID of the last row that was inserted into
     * the database.
     * </p>
     * <p>
     * If a sequence name was specified for the <i>name</i>
     * parameter, <b>PDO::lastInsertId</b> returns a
     * string representing the last value retrieved from the specified sequence
     * object.
     * </p>
     * <p>
     * If the PDO driver does not support this capability,
     * <b>PDO::lastInsertId</b> triggers an
     * IM001 SQLSTATE.
     */
    #[TentativeType]
    public function lastInsertId(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $name = null): string|false {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.1.0)<br/>
     * Fetch the SQLSTATE associated with the last operation on the database handle
     * @link https://php.net/manual/en/pdo.errorcode.php
     * @return mixed an SQLSTATE, a five characters alphanumeric identifier defined in
     * the ANSI SQL-92 standard. Briefly, an SQLSTATE consists of a
     * two characters class value followed by a three characters subclass value. A
     * class value of 01 indicates a warning and is accompanied by a return code
     * of SQL_SUCCESS_WITH_INFO. Class values other than '01', except for the
     * class 'IM', indicate an error. The class 'IM' is specific to warnings
     * and errors that derive from the implementation of PDO (or perhaps ODBC,
     * if you're using the ODBC driver) itself. The subclass value '000' in any
     * class indicates that there is no subclass for that SQLSTATE.
     * </p>
     * <p>
     * <b>PDO::errorCode</b> only retrieves error codes for operations
     * performed directly on the database handle. If you create a PDOStatement
     * object through <b>PDO::prepare</b> or
     * <b>PDO::query</b> and invoke an error on the statement
     * handle, <b>PDO::errorCode</b> will not reflect that error.
     * You must call <b>PDOStatement::errorCode</b> to return the error
     * code for an operation performed on a particular statement handle.
     * </p>
     * <p>
     * Returns <b>NULL</b> if no operation has been run on the database handle.
     */
    #[TentativeType]
    public function errorCode(): ?string {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.1.0)<br/>
     * Fetch extended error information associated with the last operation on the database handle
     * @link https://php.net/manual/en/pdo.errorinfo.php
     * @return array <b>PDO::errorInfo</b> returns an array of error information
     * about the last operation performed by this database handle. The array
     * consists of the following fields:
     * <tr valign="top">
     * <td>Element</td>
     * <td>Information</td>
     * </tr>
     * <tr valign="top">
     * <td>0</td>
     * <td>SQLSTATE error code (a five characters alphanumeric identifier defined
     * in the ANSI SQL standard).</td>
     * </tr>
     * <tr valign="top">
     * <td>1</td>
     * <td>Driver-specific error code.</td>
     * </tr>
     * <tr valign="top">
     * <td>2</td>
     * <td>Driver-specific error message.</td>
     * </tr>
     * </p>
     * <p>
     * If the SQLSTATE error code is not set or there is no driver-specific
     * error, the elements following element 0 will be set to <b>NULL</b>.
     * </p>
     * <p>
     * <b>PDO::errorInfo</b> only retrieves error information for
     * operations performed directly on the database handle. If you create a
     * PDOStatement object through <b>PDO::prepare</b> or
     * <b>PDO::query</b> and invoke an error on the statement
     * handle, <b>PDO::errorInfo</b> will not reflect the error
     * from the statement handle. You must call
     * <b>PDOStatement::errorInfo</b> to return the error
     * information for an operation performed on a particular statement handle.
     */
    #[ArrayShape([0 => "string", 1 => "int", 2 => "string"])]
    #[TentativeType]
    public function errorInfo(): array {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.2.0)<br/>
     * Retrieve a database connection attribute
     * @link https://php.net/manual/en/pdo.getattribute.php
     * @param int $attribute <p>
     * One of the PDO::ATTR_* constants. The constants that
     * apply to database connections are as follows:
     * PDO::ATTR_AUTOCOMMIT
     * PDO::ATTR_CASE
     * PDO::ATTR_CLIENT_VERSION
     * PDO::ATTR_CONNECTION_STATUS
     * PDO::ATTR_DRIVER_NAME
     * PDO::ATTR_ERRMODE
     * PDO::ATTR_ORACLE_NULLS
     * PDO::ATTR_PERSISTENT
     * PDO::ATTR_PREFETCH
     * PDO::ATTR_SERVER_INFO
     * PDO::ATTR_SERVER_VERSION
     * PDO::ATTR_TIMEOUT
     * </p>
     * @return mixed A successful call returns the value of the requested PDO attribute.
     * An unsuccessful call returns null.
     */
    #[TentativeType]
    public function getAttribute(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $attribute): mixed {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.2.1)<br/>
     * Quotes a string for use in a query.
     * @link https://php.net/manual/en/pdo.quote.php
     * @param string $string <p>
     * The string to be quoted.
     * </p>
     * @param int $type [optional] <p>
     * Provides a data type hint for drivers that have alternate quoting styles.
     * </p>
     * @return string|false a quoted string that is theoretically safe to pass into an
     * SQL statement. Returns <b>FALSE</b> if the driver does not support quoting in
     * this way.
     */
    #[TentativeType]
    public function quote(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = PDO::PARAM_STR
    ): string|false {}

    final public function __wakeup() {}

    final public function __sleep() {}

    /**
     * (PHP 5 &gt;= 5.1.3, PHP 7, PECL pdo &gt;= 1.0.3)<br/>
     * Return an array of available PDO drivers
     * @link https://php.net/manual/en/pdo.getavailabledrivers.php
     * @return array <b>PDO::getAvailableDrivers</b> returns an array of PDO driver names. If
     * no drivers are available, it returns an empty array.
     */
    #[TentativeType]
    public static function getAvailableDrivers(): array {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo_sqlite &gt;= 1.0.0)<br/>
     * Registers an aggregating User Defined Function for use in SQL statements
     * @link https://php.net/manual/en/pdo.sqlitecreateaggregate.php
     * @param string $function_name <p>
     * The name of the function used in SQL statements.
     * </p>
     * @param callable $step_func <p>
     * Callback function called for each row of the result set. Your PHP function should accumulate the result and store it in the aggregation context.
     * </p>
     * @param callable $finalize_func <p>
     * Callback function to aggregate the "stepped" data from each row. Once all the rows have been processed, this function will be called and it should then take the data from the aggregation context and return the result. This callback function should return a type understood by SQLite (i.e. scalar type).
     * </p>
     * @param int $num_args [optional] <p>
     * Hint to the SQLite parser if the callback function accepts a predetermined number of arguments.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function sqliteCreateAggregate($function_name, $step_func, $finalize_func, $num_args = -1) {}

    /**
     * (PHP 5 &gt;= 5.3.11, PHP 7)<br/>
     * Registers a User Defined Function for use as a collating function in SQL statements
     * @link https://php.net/manual/en/pdo.sqlitecreatecollation.php
     * @param string $name <p>
     * Name of the SQL collating function to be created or redefined.
     * </p>
     * @param callable $callback <p>
     * The name of a PHP function or user-defined function to apply as a callback, defining the behavior of the collation. It should accept two strings and return as strcmp() does, i.e. it should return -1, 1, or 0 if the first string sorts before, sorts after, or is equal to the second.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function sqliteCreateCollation($name, $callback) {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo_sqlite &gt;= 1.0.0)<br/>
     * Registers a User Defined Function for use in SQL statements
     * @link https://php.net/manual/en/pdo.sqlitecreatefunction.php
     * @param string $function_name <p>
     * The name of the function used in SQL statements.
     * </p>
     * @param callable $callback <p>
     * Callback function to handle the defined SQL function.
     * </p>
     * @param int $num_args [optional] <p>
     * The number of arguments that the SQL function takes. If this parameter is -1,
     * then the SQL function may take any number of arguments.
     * </p>
     * @param int $flags [optional] <p>
     * A bitwise conjunction of flags. Currently, only <b>PDO::SQLITE_DETERMINISTIC</b> is supported,
     * which specifies that the function always returns the same result given the same inputs within
     * a single SQL statement.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function sqliteCreateFunction($function_name, $callback, $num_args = -1, $flags = 0) {}

    /**
     * (PHP 5 &gt;= 5.3.3, PHP 7, PHP 8)<br/>
     * Copy data from PHP array into table
     * @link https://www.php.net/manual/en/pdo.pgsqlcopyfromarray.php
     * @param string $tableName <p>
     * String containing table name
     * </p>
     * @param array $rows <p>
     * Array of strings with fields separated by <i>separator</i>
     * </p>
     * @param string $separator <p>
     * Separator used in <i>rows</i> array
     * </p>
     * @param string $nullAs <p>
     * How to interpret null values
     * </p>
     * @param ?string $fields <p>
     * List of fields to insert
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function pgsqlCopyFromArray(string $tableName, array $rows, string $separator = "\t", string $nullAs = "\\\\N", ?string $fields = null): bool {}

    /**
     * (PHP 5 &gt;= 5.3.3, PHP 7, PHP 8)<br/>
     * Copy data from file into table
     * @link https://www.php.net/manual/en/pdo.pgsqlcopyfromfile.php
     * @param string $tableName <p>
     * String containing table name
     * </p>
     * @param string $filename <p>
     * Filename containing data to import
     * </p>
     * @param string $separator <p>
     * Separator used in file specified by <i>filename</i>
     * </p>
     * @param string $nullAs <p>
     * How to interpret null values
     * </p>
     * @param ?string $fields <p>
     * List of fields to insert
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function pgsqlCopyFromFile(string $tableName, string $filename, string $separator = "\t", string $nullAs = "\\\\N", ?string $fields = null): bool {}

    /**
     * (PHP 5 &gt;= 5.3.3, PHP 7, PHP 8)<br/>
     * Copy data from database table into PHP array
     * @link https://www.php.net/manual/en/pdo.pgsqlcopytoarray.php
     * @param string $tableName <p>
     * String containing table name
     * </p>
     * @param string $separator <p>
     * Separator used in rows
     * </p>
     * @param string $nullAs <p>
     * How to interpret null values
     * </p>
     * @param ?string $fields <p>
     * List of fields to insert
     * </p>
     * @return array|false returns an array of rows, or <b>FALSE</b> on failure.
     */
    public function pgsqlCopyToArray(string $tableName, string $separator = "\t", string $nullAs = "\\\\N", ?string $fields = null): array|false {}

    /**
     * (PHP 5 &gt;= 5.3.3, PHP 7, PHP 8)<br/>
     * Copy data from table into file
     * @link https://www.php.net/manual/en/pdo.pgsqlcopytofile.php
     * @param string $tableName <p>
     * String containing table name
     * </p>
     * @param string $filename <p>
     * Filename to export data
     * </p>
     * @param string $separator <p>
     * Separator used in file specified by <i>filename</i>
     * </p>
     * @param string $nullAs <p>
     * How to interpret null values
     * </p>
     * @param ?string $fields <p>
     * List of fields to insert
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function pgsqlCopyToFile(string $tableName, string $filename, string $separator = "\t", string $nullAs = "\\\\N", ?string $fields = null): bool {}

    /**
     * (PHP 5 &gt;= 5.1.2, PHP 7, PHP 8, PECL pdo_pgsql &gt;= 1.0.2)<br/>
     * Creates a new large object
     * @link https://www.php.net/manual/en/pdo.pgsqllobcreate.php
     * @return string|false returns the OID of the newly created large object on success,
     * or <b>FALSE</b> on failure.
     */
    public function pgsqlLOBCreate(): string|false {}

    /**
     * (PHP 5 &gt;= 5.1.2, PHP 7, PHP 8, PECL pdo_pgsql &gt;= 1.0.2)<br/>
     * Opens an existing large object stream
     * @link https://www.php.net/manual/en/pdo.pgsqllobopen.php
     * @param string $oid <p>
     * A large object identifier.
     * </p>
     * @param string $mode <p>
     * If mode is r, open the stream for reading. If mode is w, open the stream for writing.
     * </p>
     * @return resource|false returns a stream resource on success or <b>FALSE</b> on failure.
     */
    public function pgsqlLOBOpen(string $oid, string $mode = "rb") {}

    /**
     * (PHP 5 &gt;= 5.1.2, PHP 7, PHP 8, PECL pdo_pgsql &gt;= 1.0.2)<br/>
     * Deletes the large object
     * @link https://www.php.net/manual/en/pdo.pgsqllobunlink.php
     * @param string $oid <p>
     * A large object identifier.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function pgsqlLOBUnlink(string $oid): bool {}

    /**
     * (PHP 5 &gt;= 5.6.0, PHP 7, PHP 8)<br/>
     * Get asynchronous notification
     * @link https://www.php.net/manual/en/pdo.pgsqlgetnotify.php
     * @param int $fetchMode <p>
     * The format the result set should be returned as, represented as a <b>PDO::FETCH_*</b> constant.
     * </p>
     * @param int $timeoutMilliseconds <p>
     * The length of time to wait for a response, in milliseconds.
     * </p>
     * @return array|false if one or more notifications is pending, returns a single row,
     * with fields message and pid, otherwise <b>FALSE</b>.
     */
    public function pgsqlGetNotify(int $fetchMode = 1, int $timeoutMilliseconds = 0): array|false {}

    /**
     * (PHP 5 &gt;= 5.6.0, PHP 7, PHP 8)<br/>
     * Get the server PID
     * @link https://www.php.net/manual/en/pdo.pgsqlgetpid.php
     * @return int The server's PID.
     */
    public function pgsqlGetPid(): int {}
}

/**
 * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 1.0.0)<br/>
 * Represents a prepared statement and, after the statement is executed, an
 * associated result set.
 * @link https://php.net/manual/en/class.pdostatement.php
 */
class PDOStatement implements IteratorAggregate
{
    /**
     * @var string
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $queryString;

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.1.0)<br/>
     * Executes a prepared statement
     * @link https://php.net/manual/en/pdostatement.execute.php
     * @param array $params [optional] <p>
     * An array of values with as many elements as there are bound
     * parameters in the SQL statement being executed.
     * All values are treated as <b>PDO::PARAM_STR</b>.
     * </p>
     * <p>
     * You cannot bind multiple values to a single parameter; for example,
     * you cannot bind two values to a single named parameter in an IN()
     * clause.
     * </p>
     * <p>
     * You cannot bind more values than specified; if more keys exist in
     * <i>input_parameters</i> than in the SQL specified
     * in the <b>PDO::prepare</b>, then the statement will
     * fail and an error is emitted.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @throws PDOException On error if PDO::ERRMODE_EXCEPTION option is true.
     */
    #[TentativeType]
    public function execute(#[LanguageLevelTypeAware(['8.0' => 'array|null'], default: '')] $params = null): bool {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.1.0)<br/>
     * Fetches the next row from a result set
     * @link https://php.net/manual/en/pdostatement.fetch.php
     * @param int $mode [optional] <p>
     * Controls how the next row will be returned to the caller. This value
     * must be one of the PDO::FETCH_* constants,
     * defaulting to value of PDO::ATTR_DEFAULT_FETCH_MODE
     * (which defaults to PDO::FETCH_BOTH).
     * </p>
     * <p>
     * PDO::FETCH_ASSOC: returns an array indexed by column
     * name as returned in your result set
     * </p>
     * @param int $cursorOrientation [optional] <p>
     * For a PDOStatement object representing a scrollable cursor, this
     * value determines which row will be returned to the caller. This value
     * must be one of the PDO::FETCH_ORI_* constants,
     * defaulting to PDO::FETCH_ORI_NEXT. To request a
     * scrollable cursor for your PDOStatement object, you must set the
     * PDO::ATTR_CURSOR attribute to
     * PDO::CURSOR_SCROLL when you prepare the SQL
     * statement with <b>PDO::prepare</b>.
     * </p>
     * @param int $cursorOffset [optional]
     * @return mixed The return value of this function on success depends on the fetch type. In
     * all cases, <b>FALSE</b> is returned on failure.
     */
    #[TentativeType]
    public function fetch(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = PDO::FETCH_BOTH,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $cursorOrientation = PDO::FETCH_ORI_NEXT,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $cursorOffset = 0
    ): mixed {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.1.0)<br/>
     * Binds a parameter to the specified variable name
     * @link https://php.net/manual/en/pdostatement.bindparam.php
     * @param mixed $param <p>
     * Parameter identifier. For a prepared statement using named
     * placeholders, this will be a parameter name of the form
     * :name. For a prepared statement using
     * question mark placeholders, this will be the 1-indexed position of
     * the parameter.
     * </p>
     * @param mixed &$var <p>
     * Name of the PHP variable to bind to the SQL statement parameter.
     * </p>
     * @param int $type [optional] <p>
     * Explicit data type for the parameter using the PDO::PARAM_*
     * constants.
     * To return an INOUT parameter from a stored procedure,
     * use the bitwise OR operator to set the PDO::PARAM_INPUT_OUTPUT bits
     * for the <i>data_type</i> parameter.
     * </p>
     * @param int $maxLength [optional] <p>
     * Length of the data type. To indicate that a parameter is an OUT
     * parameter from a stored procedure, you must explicitly set the
     * length.
     * </p>
     * @param mixed $driverOptions [optional] <p>
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function bindParam(
        #[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $param,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] &$var,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = PDO::PARAM_STR,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $maxLength = null,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $driverOptions = null
    ): bool {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.1.0)<br/>
     * Bind a column to a PHP variable
     * @link https://php.net/manual/en/pdostatement.bindcolumn.php
     * @param mixed $column <p>
     * Number of the column (1-indexed) or name of the column in the result set.
     * If using the column name, be aware that the name should match the
     * case of the column, as returned by the driver.
     * </p>
     * @param mixed &$var <p>
     * Name of the PHP variable to which the column will be bound.
     * </p>
     * @param int $type [optional] <p>
     * Data type of the parameter, specified by the PDO::PARAM_* constants.
     * </p>
     * @param int $maxLength [optional] <p>
     * A hint for pre-allocation.
     * </p>
     * @param mixed $driverOptions [optional] <p>
     * Optional parameter(s) for the driver.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function bindColumn(
        #[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $column,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] &$var,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = PDO::PARAM_STR,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $maxLength = null,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $driverOptions = null
    ): bool {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 1.0.0)<br/>
     * Binds a value to a parameter
     * @link https://php.net/manual/en/pdostatement.bindvalue.php
     * @param mixed $param <p>
     * Parameter identifier. For a prepared statement using named
     * placeholders, this will be a parameter name of the form
     * :name. For a prepared statement using
     * question mark placeholders, this will be the 1-indexed position of
     * the parameter.
     * </p>
     * @param mixed $value <p>
     * The value to bind to the parameter.
     * </p>
     * @param int $type [optional] <p>
     * Explicit data type for the parameter using the PDO::PARAM_*
     * constants.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function bindValue(
        #[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $param,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = PDO::PARAM_STR
    ): bool {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.1.0)<br/>
     * Returns the number of rows affected by the last SQL statement
     * @link https://php.net/manual/en/pdostatement.rowcount.php
     * @return int the number of rows.
     */
    #[TentativeType]
    public function rowCount(): int {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.9.0)<br/>
     * Returns a single column from the next row of a result set
     * @link https://php.net/manual/en/pdostatement.fetchcolumn.php
     * @param int $column [optional] <p>
     * 0-indexed number of the column you wish to retrieve from the row. If
     * no value is supplied, <b>PDOStatement::fetchColumn</b>
     * fetches the first column.
     * </p>
     * @return mixed Returns a single column from the next row of a result
     * set or FALSE if there are no more rows.
     * </p>
     * <p>
     * There is no way to return another column from the same row if you
     * use <b>PDOStatement::fetchColumn</b> to retrieve data.
     */
    #[TentativeType]
    public function fetchColumn(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $column = 0): mixed {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.1.0)<br/>
     * Returns an array containing all of the result set rows
     * @link https://php.net/manual/en/pdostatement.fetchall.php
     * @param int $mode [optional] <p>
     * Controls the contents of the returned array as documented in
     * <b>PDOStatement::fetch</b>.
     * Defaults to value of <b>PDO::ATTR_DEFAULT_FETCH_MODE</b>
     * (which defaults to <b>PDO::FETCH_BOTH</b>)
     * </p>
     * <p>
     * To return an array consisting of all values of a single column from
     * the result set, specify <b>PDO::FETCH_COLUMN</b>. You
     * can specify which column you want with the
     * <i>column-index</i> parameter.
     * </p>
     * <p>
     * To fetch only the unique values of a single column from the result set,
     * bitwise-OR <b>PDO::FETCH_COLUMN</b> with
     * <b>PDO::FETCH_UNIQUE</b>.
     * </p>
     * <p>
     * To return an associative array grouped by the values of a specified
     * column, bitwise-OR <b>PDO::FETCH_COLUMN</b> with
     * <b>PDO::FETCH_GROUP</b>.
     * </p>
     * @param mixed ...$args <p>
     * Arguments of custom class constructor when the <i>fetch_style</i>
     * parameter is <b>PDO::FETCH_CLASS</b>.
     * </p>
     * @return array|false <b>PDOStatement::fetchAll</b> returns an array containing
     * all of the remaining rows in the result set. The array represents each
     * row as either an array of column values or an object with properties
     * corresponding to each column name.
     * An empty array is returned if there are zero results to fetch, or false on failure.
     * </p>
     * <p>
     * Using this method to fetch large result sets will result in a heavy
     * demand on system and possibly network resources. Rather than retrieving
     * all of the data and manipulating it in PHP, consider using the database
     * server to manipulate the result sets. For example, use the WHERE and
     * ORDER BY clauses in SQL to restrict results before retrieving and
     * processing them with PHP.
     */
    #[TentativeType]
    public function fetchAll(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = PDO::FETCH_BOTH,
        #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $fetch_argument = null,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] ...$args
    ): array {}

    /**
     * @template T
     *
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.2.4)<br/>
     * Fetches the next row and returns it as an object.
     * @link https://php.net/manual/en/pdostatement.fetchobject.php
     * @param class-string<T> $class [optional] <p>
     * Name of the created class.
     * </p>
     * @param array $constructorArgs [optional] <p>
     * Elements of this array are passed to the constructor.
     * </p>
     * @return T|stdClass|null an instance of the required class with property names that
     * correspond to the column names or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function fetchObject(
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $class = "stdClass",
        #[LanguageLevelTypeAware(['8.0' => 'array'], default: '')] $constructorArgs = []
    ): object|false {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.1.0)<br/>
     * Fetch the SQLSTATE associated with the last operation on the statement handle
     * @link https://php.net/manual/en/pdostatement.errorcode.php
     * @return string Identical to <b>PDO::errorCode</b>, except that
     * <b>PDOStatement::errorCode</b> only retrieves error codes
     * for operations performed with PDOStatement objects.
     */
    #[TentativeType]
    public function errorCode(): ?string {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.1.0)<br/>
     * Fetch extended error information associated with the last operation on the statement handle
     * @link https://php.net/manual/en/pdostatement.errorinfo.php
     * @return array <b>PDOStatement::errorInfo</b> returns an array of
     * error information about the last operation performed by this
     * statement handle. The array consists of the following fields:
     * <tr valign="top">
     * <td>Element</td>
     * <td>Information</td>
     * </tr>
     * <tr valign="top">
     * <td>0</td>
     * <td>SQLSTATE error code (a five characters alphanumeric identifier defined
     * in the ANSI SQL standard).</td>
     * </tr>
     * <tr valign="top">
     * <td>1</td>
     * <td>Driver specific error code.</td>
     * </tr>
     * <tr valign="top">
     * <td>2</td>
     * <td>Driver specific error message.</td>
     * </tr>
     */
    #[ArrayShape([0 => "string", 1 => "int", 2 => "string"])]
    #[TentativeType]
    public function errorInfo(): array {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.2.0)<br/>
     * Set a statement attribute
     * @link https://php.net/manual/en/pdostatement.setattribute.php
     * @param int $attribute
     * @param mixed $value
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function setAttribute(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $attribute,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value
    ): bool {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.2.0)<br/>
     * Retrieve a statement attribute
     * @link https://php.net/manual/en/pdostatement.getattribute.php
     * @param int $name
     * @return mixed the attribute value.
     */
    #[TentativeType]
    public function getAttribute(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $name): mixed {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.2.0)<br/>
     * Returns the number of columns in the result set
     * @link https://php.net/manual/en/pdostatement.columncount.php
     * @return int the number of columns in the result set represented by the
     * PDOStatement object. If there is no result set,
     * <b>PDOStatement::columnCount</b> returns 0.
     */
    #[TentativeType]
    public function columnCount(): int {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.2.0)<br/>
     * Returns metadata for a column in a result set
     * @link https://php.net/manual/en/pdostatement.getcolumnmeta.php
     * @param int $column <p>
     * The 0-indexed column in the result set.
     * </p>
     * @return array|false an associative array containing the following values representing
     * the metadata for a single column:
     * </p>
     * <table>
     * Column metadata
     * <tr valign="top">
     * <td>Name</td>
     * <td>Value</td>
     * </tr>
     * <tr valign="top">
     * <td>native_type</td>
     * <td>The PHP native type used to represent the column value.</td>
     * </tr>
     * <tr valign="top">
     * <td>driver:decl_type</td>
     * <td>The SQL type used to represent the column value in the database.
     * If the column in the result set is the result of a function, this value
     * is not returned by <b>PDOStatement::getColumnMeta</b>.
     * </td>
     * </tr>
     * <tr valign="top">
     * <td>flags</td>
     * <td>Any flags set for this column.</td>
     * </tr>
     * <tr valign="top">
     * <td>name</td>
     * <td>The name of this column as returned by the database.</td>
     * </tr>
     * <tr valign="top">
     * <td>table</td>
     * <td>The name of this column's table as returned by the database.</td>
     * </tr>
     * <tr valign="top">
     * <td>len</td>
     * <td>The length of this column. Normally -1 for
     * types other than floating point decimals.</td>
     * </tr>
     * <tr valign="top">
     * <td>precision</td>
     * <td>The numeric precision of this column. Normally
     * 0 for types other than floating point
     * decimals.</td>
     * </tr>
     * <tr valign="top">
     * <td>pdo_type</td>
     * <td>The type of this column as represented by the
     * PDO::PARAM_* constants.</td>
     * </tr>
     * </table>
     * <p>
     * Returns <b>FALSE</b> if the requested column does not exist in the result set,
     * or if no result set exists.
     */
    #[TentativeType]
    #[ArrayShape([
        "name" => "string",
        "len" => "int",
        "precision" => "int",
        "oci:decl_type" => "int|string",
        "native_type" => "string",
        "scale" => "int",
        "flags" => "array",
        "pdo_type" => "int"
    ])]
    public function getColumnMeta(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $column): array|false {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.2.0)<br/>
     * Set the default fetch mode for this statement
     * @link https://php.net/manual/en/pdostatement.setfetchmode.php
     * @param int $mode <p>
     * The fetch mode must be one of the PDO::FETCH_* constants.
     * </p>
     * @param null|string|object $className [optional] <p>
     * Class name or object
     * </p>
     * @param array $params [optional] <p> Constructor arguments. </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[PhpStormStubsElementAvailable(to: '7.4')]
    public function setFetchMode($mode, $className = null, $params = []) {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.2.0)<br/>
     * Set the default fetch mode for this statement
     * @link https://php.net/manual/en/pdostatement.setfetchmode.php
     * @param int $mode <p>
     * The fetch mode must be one of the PDO::FETCH_* constants.
     * </p>
     * @param string|object|null $className [optional] <p>
     * Class name or object
     * </p>
     * @param mixed ...$params <p> Constructor arguments. </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[PhpStormStubsElementAvailable('8.0')]
    public function setFetchMode($mode, $className = null, ...$params) {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.2.0)<br/>
     * Advances to the next rowset in a multi-rowset statement handle
     * @link https://php.net/manual/en/pdostatement.nextrowset.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function nextRowset(): bool {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.9.0)<br/>
     * Closes the cursor, enabling the statement to be executed again.
     * @link https://php.net/manual/en/pdostatement.closecursor.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function closeCursor(): bool {}

    /**
     * (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.9.0)<br/>
     * Dump an SQL prepared command
     * @link https://php.net/manual/en/pdostatement.debugdumpparams.php
     * @return bool|null No value is returned.
     */
    #[TentativeType]
    public function debugDumpParams(): ?bool {}

    final public function __wakeup() {}

    final public function __sleep() {}

    /**
     * @return Iterator
     * @since 8.0
     */
    public function getIterator(): Iterator {}
}

final class PDORow
{
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $queryString;
}

/**
 * (PHP 5 &gt;= 5.1.3, PHP 7, PECL pdo &gt;= 1.0.3)<br/>
 * Return an array of available PDO drivers
 * @link https://php.net/manual/en/pdo.getavailabledrivers.php
 * @return array <b>PDO::getAvailableDrivers</b> returns an array of PDO driver names. If
 * no drivers are available, it returns an empty array.
 */
#[Pure]
function pdo_drivers(): array {}

// End of PDO v.1.0.4dev
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright 2010-2023 JetBrains s.r.o.

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
<?php

// Start of FFI v.0.1.0

namespace {
    use FFI\CData;
    use FFI\CType;
    use FFI\ParserException;

    /**
     * FFI class provides access to a simple way to call native functions,
     * access native variables and create/access data structures defined
     * in C language.
     *
     * @since 7.4
     */
    class FFI
    {
        /**
         * The method creates a binding on the existing C function.
         *
         * All variables and functions defined by first arguments are bound
         * to corresponding native symbols in DSO library and then may be
         * accessed as FFI object methods and properties. C types of argument,
         * return value and variables are automatically converted to/from PHP
         * types (if possible). Otherwise, they are wrapped in a special CData
         * proxy object and may be accessed by elements.
         *
         * @param string $code The collection of C declarations.
         * @param string|null $lib DSO library.
         * @return FFI
         * @throws ParserException
         */
        public static function cdef(string $code = '', ?string $lib = null): FFI {}

        /**
         * <p>Instead of embedding of a long C definition into PHP string,
         * and creating FFI through FFI::cdef(), it's possible to separate
         * it into a C header file. Note, that C preprocessor directives
         * (e.g. #define or #ifdef) are not supported. And only a couple of
         * special macros may be used especially for FFI.</p>
         *
         * <code>
         *  #define FFI_LIB "libc.so.6"
         *
         *  int printf(const char *format, ...);
         * </code>
         *
         * Here, FFI_LIB specifies, that the given library should be loaded.
         *
         * <code>
         *  $ffi = FFI::load(__DIR__ . "/printf.h");
         *  $ffi->printf("Hello world!\n");
         * </code>
         *
         * @param string $filename
         * @return FFI|null
         */
        public static function load(string $filename): ?FFI {}

        /**
         * FFI definition parsing and shared library loading may take
         * significant time. It's not useful to do it on each HTTP request in
         * WEB environment. However, it's possible to pre-load FFI definitions
         * and libraries at php startup, and instantiate FFI objects when
         * necessary. Header files may be extended with FFI_SCOPE define
         * (default pre-loading scope is "C"). This name is going to be
         * used as FFI::scope() argument. It's possible to pre-load few
         * files into a single scope.
         *
         * <code>
         *  #define FFI_LIB "libc.so.6"
         *  #define FFI_SCOPE "libc"
         *
         *  int printf(const char *format, ...);
         * </code>
         *
         * These files are loaded through the same FFI::load() load function,
         * executed from file loaded by opcache.preload php.ini directive.
         *
         * <code>
         *  ffi.preload=/etc/php/ffi/printf.h
         * </code>
         *
         * Finally, FFI::scope() instantiate an FFI object, that implements
         * all C definition from the given scope.
         *
         * <code>
         *  $ffi = FFI::scope("libc");
         *  $ffi->printf("Hello world!\n");
         * </code>
         *
         * @param string $name
         * @return FFI
         */
        public static function scope(string $name): FFI {}

        /**
         * Method that creates an arbitrary C structure.
         *
         * @param string|CType $type
         * @param bool $owned
         * @param bool $persistent
         * @return CData|null
         * @throws ParserException
         */
        public static function new($type, bool $owned = true, bool $persistent = false): ?CData {}

        /**
         * Manually removes previously created "not-owned" data structure.
         *
         * @param CData $ptr
         * @return void
         */
        public static function free(CData $ptr): void {}

        /**
         * Casts given $pointer to another C type, specified by C declaration
         * string or FFI\CType object.
         *
         * This function may be called statically and use only predefined
         * types, or as a method of previously created FFI object. In last
         * case the first argument may reuse all type and tag names
         * defined in FFI::cdef().
         *
         * @param CType|string $type
         * @param CData|int|float|bool|null $ptr
         * @return CData|null
         */
        public static function cast($type, $ptr): ?CData {}

        /**
         * This function creates and returns a FFI\CType object, representng
         * type of the given C type declaration string.
         *
         * FFI::type() may be called statically and use only predefined types,
         * or as a method of previously created FFI object. In last case the
         * first argument may reuse all type and tag names defined in
         * FFI::cdef().
         *
         * @param string $type
         * @return CType|null
         */
        public static function type(string $type): ?CType {}

        /**
         * This function returns the FFI\CType object, representing the type of
         * the given FFI\CData object.
         *
         * @param CData $ptr
         * @return CType
         */
        public static function typeof(CData $ptr): CType {}

        /**
         * Constructs a new C array type with elements of $type and
         * dimensions specified by $dimensions.
         *
         * @param CType $type
         * @param int[] $dimensions
         * @return CType
         */
        public static function arrayType(CType $type, array $dimensions): CType {}

        /**
         * Returns C pointer to the given C data structure. The pointer is
         * not "owned" and won't be free. Anyway, this is a potentially
         * unsafe operation, because the life-time of the returned pointer
         * may be longer than life-time of the source object, and this may
         * cause dangling pointer dereference (like in regular C).
         *
         * @param CData $ptr
         * @return CData
         */
        public static function addr(CData $ptr): CData {}

        /**
         * Returns size of C data type of the given FFI\CData or FFI\CType.
         *
         * @param CData|CType $ptr
         * @return int
         */
        public static function sizeof($ptr): int {}

        /**
         * Returns size of C data type of the given FFI\CData or FFI\CType.
         *
         * @param CData|CType $ptr
         * @return int
         */
        public static function alignof($ptr): int {}

        /**
         * Copies $size bytes from memory area $source to memory area $target.
         * $source may be any native data structure (FFI\CData) or PHP string.
         *
         * @param CData $to
         * @param CData|string $from
         * @param int $size
         */
        public static function memcpy(CData $to, $from, int $size): void {}

        /**
         * Compares $size bytes from memory area $ptr1 and $ptr2.
         *
         * @param CData|string $ptr1
         * @param CData|string $ptr2
         * @param int $size
         * @return int
         */
        public static function memcmp($ptr1, $ptr2, int $size): int {}

        /**
         * Fills the $size bytes of the memory area pointed to by $target with
         * the constant byte $byte.
         *
         * @param CData $ptr
         * @param int $value
         * @param int $size
         */
        public static function memset(CData $ptr, int $value, int $size): void {}

        /**
         * Creates a PHP string from $size bytes of memory area pointed by
         * $source. If size is omitted, $source must be zero terminated
         * array of C chars.
         *
         * @param CData $ptr
         * @param int|null $size
         * @return string
         */
        public static function string(CData $ptr, ?int $size = null): string {}

        /**
         * Checks whether the FFI\CData is a null pointer.
         *
         * @param CData $ptr
         * @return bool
         */
        public static function isNull(CData $ptr): bool {}
    }
}

namespace FFI {
    /**
     * General FFI exception.
     *
     * @since 7.4
     */
    class Exception extends \Error {}

    /**
     * An exception that occurs when parsing invalid header files.
     *
     * @since 7.4
     */
    class ParserException extends Exception {}

    /**
     * Proxy object that provides access to compiled structures.
     *
     * In the case that CData is a wrapper over a scalar, it contains an
     * additional "cdata" property.
     *
     * @property int|float|bool|null|string|CData $cdata
     *
     * In the case that the CData is a wrapper over an arbitrary C structure,
     * then it allows reading and writing to the fields defined by
     * this structure.
     *
     * @method mixed __get(string $name)
     * @method mixed __set(string $name, mixed $value)
     *
     * In the case that CData is a wrapper over an array, it is an
     * implementation of the {@see \Traversable}, {@see \Countable},
     * and {@see \ArrayAccess}
     *
     * @mixin \Traversable
     * @mixin \Countable
     * @mixin \ArrayAccess
     *
     * In the case when CData is a wrapper over a function pointer, it can
     * be called.
     *
     * @method mixed __invoke(mixed ...$args)
     *
     * @since 7.4
     */
    class CData
    {
        /**
         * Note that this method does not physically exist and is only required
         * for correct type inference.
         *
         * @param int $offset
         * @return bool
         */
        private function offsetExists(int $offset) {}

        /**
         * Note that this method does not physically exist and is only required
         * for correct type inference.
         *
         * @param int $offset
         * @return CData|int|float|bool|null|string
         */
        private function offsetGet(int $offset) {}

        /**
         * Note that this method does not physically exist and is only required
         * for correct type inference.
         *
         * @param int $offset
         * @param CData|int|float|bool|null|string $value
         */
        private function offsetSet(int $offset, $value) {}

        /**
         * Note that this method does not physically exist and is only required
         * for correct type inference.
         *
         * @param int $offset
         */
        private function offsetUnset(int $offset) {}

        /**
         * Note that this method does not physically exist and is only required
         * for correct type inference.
         *
         * @return int
         */
        private function count(): int {}
    }

    /**
     * Class containing C type information.
     *
     * @since 7.4
     */
    class CType
    {
        /**
         * @since 8.1
         */
        public const TYPE_VOID = 0;

        /**
         * @since 8.1
         */
        public const TYPE_FLOAT = 1;

        /**
         * @since 8.1
         */
        public const TYPE_DOUBLE = 2;

        /**
         * Please note that this constant may NOT EXIST if there is
         * no long double support on the current platform.
         *
         * @since 8.1
         */
        public const TYPE_LONGDOUBLE = 3;

        /**
         * @since 8.1
         */
        public const TYPE_UINT8 = 4;

        /**
         * @since 8.1
         */
        public const TYPE_SINT8 = 5;

        /**
         * @since 8.1
         */
        public const TYPE_UINT16 = 6;

        /**
         * @since 8.1
         */
        public const TYPE_SINT16 = 7;

        /**
         * @since 8.1
         */
        public const TYPE_UINT32 = 8;

        /**
         * @since 8.1
         */
        public const TYPE_SINT32 = 9;

        /**
         * @since 8.1
         */
        public const TYPE_UINT64 = 10;

        /**
         * @since 8.1
         */
        public const TYPE_SINT64 = 11;

        /**
         * @since 8.1
         */
        public const TYPE_ENUM = 12;

        /**
         * @since 8.1
         */
        public const TYPE_BOOL = 13;

        /**
         * @since 8.1
         */
        public const TYPE_CHAR = 14;

        /**
         * @since 8.1
         */
        public const TYPE_POINTER = 15;

        /**
         * @since 8.1
         */
        public const TYPE_FUNC = 16;

        /**
         * @since 8.1
         */
        public const TYPE_ARRAY = 17;

        /**
         * @since 8.1
         */
        public const TYPE_STRUCT = 18;

        /**
         * @since 8.1
         */
        public const ATTR_CONST = 1;

        /**
         * @since 8.1
         */
        public const ATTR_INCOMPLETE_TAG = 2;

        /**
         * @since 8.1
         */
        public const ATTR_VARIADIC = 4;

        /**
         * @since 8.1
         */
        public const ATTR_INCOMPLETE_ARRAY = 8;

        /**
         * @since 8.1
         */
        public const ATTR_VLA = 16;

        /**
         * @since 8.1
         */
        public const ATTR_UNION = 32;

        /**
         * @since 8.1
         */
        public const ATTR_PACKED = 64;

        /**
         * @since 8.1
         */
        public const ATTR_MS_STRUCT = 128;

        /**
         * @since 8.1
         */
        public const ATTR_GCC_STRUCT = 256;

        /**
         * @since 8.1
         */
        public const ABI_DEFAULT = 0;

        /**
         * @since 8.1
         */
        public const ABI_CDECL = 1;

        /**
         * @since 8.1
         */
        public const ABI_FASTCALL = 2;

        /**
         * @since 8.1
         */
        public const ABI_THISCALL = 3;

        /**
         * @since 8.1
         */
        public const ABI_STDCALL = 4;

        /**
         * @since 8.1
         */
        public const ABI_PASCAL = 5;

        /**
         * @since 8.1
         */
        public const ABI_REGISTER = 6;

        /**
         * @since 8.1
         */
        public const ABI_MS = 7;

        /**
         * @since 8.1
         */
        public const ABI_SYSV = 8;

        /**
         * @since 8.1
         */
        public const ABI_VECTORCALL = 9;

        /**
         * Returns the name of the type.
         *
         * @since 8.0
         * @return string
         */
        public function getName(): string {}

        /**
         * Returns the identifier of the root type.
         *
         * Value may be one of:
         *  - {@see CType::TYPE_VOID}
         *  - {@see CType::TYPE_FLOAT}
         *  - {@see CType::TYPE_DOUBLE}
         *  - {@see CType::TYPE_LONGDOUBLE}
         *  - {@see CType::TYPE_UINT8}
         *  - {@see CType::TYPE_SINT8}
         *  - {@see CType::TYPE_UINT16}
         *  - {@see CType::TYPE_SINT16}
         *  - {@see CType::TYPE_UINT32}
         *  - {@see CType::TYPE_SINT32}
         *  - {@see CType::TYPE_UINT64}
         *  - {@see CType::TYPE_SINT64}
         *  - {@see CType::TYPE_ENUM}
         *  - {@see CType::TYPE_BOOL}
         *  - {@see CType::TYPE_CHAR}
         *  - {@see CType::TYPE_POINTER}
         *  - {@see CType::TYPE_FUNC}
         *  - {@see CType::TYPE_ARRAY}
         *  - {@see CType::TYPE_STRUCT}
         *
         * @since 8.1
         * @return int
         */
        public function getKind(): int {}

        /**
         * Returns the size of the type in bytes.
         *
         * @since 8.1
         * @return int
         */
        public function getSize(): int {}

        /**
         * Returns the alignment of the type in bytes.
         *
         * @since 8.1
         * @return int
         */
        public function getAlignment(): int {}

        /**
         * Returns the bit-mask of type attributes.
         *
         * @since 8.1
         * @return int
         */
        public function getAttributes(): int {}

        /**
         * Returns the identifier of the enum value type.
         *
         * Value may be one of:
         *  - {@see CType::TYPE_UINT32}
         *  - {@see CType::TYPE_UINT64}
         *
         * @since 8.1
         * @return int
         * @throws Exception In the case that the type is not an enumeration.
         */
        public function getEnumKind(): int {}

        /**
         * Returns the type of array elements.
         *
         * @since 8.1
         * @return CType
         * @throws Exception In the case that the type is not an array.
         */
        public function getArrayElementType(): CType {}

        /**
         * Returns the size of an array.
         *
         * @since 8.1
         * @return int
         * @throws Exception In the case that the type is not an array.
         */
        public function getArrayLength(): int {}

        /**
         * Returns the original type of the pointer.
         *
         * @since 8.1
         * @return CType
         * @throws Exception In the case that the type is not a pointer.
         */
        public function getPointerType(): CType {}

        /**
         * Returns the field string names of a structure or union.
         *
         * @since 8.1
         * @return array<string>
         * @throws Exception In the case that the type is not a struct or union.
         */
        public function getStructFieldNames(): array {}

        /**
         * Returns the offset of the structure by the name of this field. In
         * the case that the type is a union, then for each field of this type
         * the offset will be equal to 0.
         *
         * @since 8.1
         * @param string $name
         * @return int
         * @throws Exception In the case that the type is not a struct or union.
         */
        public function getStructFieldOffset(string $name): int {}

        /**
         * Returns the field type of a structure or union.
         *
         * @since 8.1
         * @param string $name
         * @return CType
         * @throws Exception In the case that the type is not a struct or union.
         */
        public function getStructFieldType(string $name): CType {}

        /**
         * Returns the application binary interface (ABI) identifier with which
         * you can call the function.
         *
         * Value may be one of:
         *  - {@see CType::ABI_DEFAULT}
         *  - {@see CType::ABI_CDECL}
         *  - {@see CType::ABI_FASTCALL}
         *  - {@see CType::ABI_THISCALL}
         *  - {@see CType::ABI_STDCALL}
         *  - {@see CType::ABI_PASCAL}
         *  - {@see CType::ABI_REGISTER}
         *  - {@see CType::ABI_MS}
         *  - {@see CType::ABI_SYSV}
         *  - {@see CType::ABI_VECTORCALL}
         *
         * @since 8.1
         * @return int
         * @throws Exception In the case that the type is not a function.
         */
        public function getFuncABI(): int {}

        /**
         * Returns the return type of the function.
         *
         * @since 8.1
         * @return CType
         * @throws Exception In the case that the type is not a function.
         */
        public function getFuncReturnType(): CType {}

        /**
         * Returns the number of arguments to the function.
         *
         * @since 8.1
         * @return int
         * @throws Exception In the case that the type is not a function.
         */
        public function getFuncParameterCount(): int {}

        /**
         * Returns the type of the function argument by its numeric index.
         *
         * @since 8.1
         * @param int $index
         * @return CType
         * @throws Exception In the case that the type is not a function.
         */
        public function getFuncParameterType(int $index): CType {}
    }
}
<?php

use JetBrains\PhpStorm\ExpectedValues;
use JetBrains\PhpStorm\Immutable;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;

/**
 * Ev is a singleton providing access to the default loop and to some common operations.
 */
final class Ev
{
    /**
     * Flag passed to create a loop: The default flags value
     */
    public const FLAG_AUTO = 0;

    /**
     * Flag passed to create a loop: If this flag used(or the program runs setuid or setgid), libev won't look at the
     * environment variable LIBEV_FLAGS. Otherwise(by default), LIBEV_FLAGS will override the flags completely if it is
     * found. Useful for performance tests and searching for bugs.
     */
    public const FLAG_NOENV = 16777216;

    /**
     * Flag passed to create a loop: Makes libev check for a fork in each iteration, instead of calling EvLoop::fork()
     * manually. This works by calling getpid() on every iteration of the loop, and thus this might slow down the event
     * loop with lots of loop iterations, but usually is not noticeable. This flag setting cannot be overridden or
     * specified in the LIBEV_FLAGS environment variable.
     */
    public const FLAG_FORKCHECK = 33554432;

    /**
     * Flag passed to create a loop: When this flag is specified, libev won't attempt to use the inotify API for its
     * ev_stat watchers. The flag can be useful to conserve inotify file descriptors, as otherwise each loop using
     * ev_stat watchers consumes one inotify handle.
     */
    public const FLAG_NOINOTIFY = 1048576;

    /**
     * Flag passed to create a loop: When this flag is specified, libev will attempt to use the signalfd API for its
     * ev_signal (and ev_child ) watchers. This API delivers signals synchronously, which makes it both faster and might
     * make it possible to get the queued signal data. It can also simplify signal handling with threads, as long as
     * signals are properly blocked in threads. Signalfd will not be used by default.
     */
    public const FLAG_SIGNALFD = 2097152;

    /**
     * Flag passed to create a loop: When this flag is specified, libev will avoid to modify the signal mask.
     * Specifically, this means having to make sure signals are unblocked before receiving them.
     *
     * This behaviour is useful for custom signal handling, or handling signals only in specific threads.
     */
    public const FLAG_NOSIGMASK = 4194304;

    /**
     * Flag passed to Ev::run() or EvLoop::run(): Means that event loop will look for new events, will handle those
     * events and any already outstanding ones, but will not wait and block the process in case there are no events and
     * will return after one iteration of the loop. This is sometimes useful to poll and handle new events while doing
     * lengthy calculations, to keep the program responsive.
     */
    public const RUN_NOWAIT = 1;

    /**
     * Flag passed to Ev::run() or EvLoop::run(): Means that event loop will look for new events (waiting if necessary)
     * and will handle those and any already outstanding ones. It will block the process until at least one new event
     * arrives (which could be an event internal to libev itself, so there is no guarantee that a user-registered
     * callback will be called), and will return after one iteration of the loop.
     */
    public const RUN_ONCE = 2;

    /**
     * Flag passed to Ev::stop() or EvLoop::stop(): Cancel the break operation.
     */
    public const BREAK_CANCEL = 0;

    /**
     * Flag passed to Ev::stop() or EvLoop::stop(): Makes the innermost Ev::run() or EvLoop::run() call return.
     */
    public const BREAK_ONE = 1;

    /**
     * Flag passed to Ev::stop() or EvLoop::stop(): Makes all nested Ev::run() or EvLoop::run() calls return.
     */
    public const BREAK_ALL = 2;

    /**
     * Lowest allowed watcher priority.
     */
    public const MINPRI = -2;

    /**
     * Highest allowed watcher priority.
     */
    public const MAXPRI = 2;

    /**
     * Event bitmask: The file descriptor in the EvIo watcher has become readable.
     */
    public const READ = 1;

    /**
     * Event bitmask: The file descriptor in the EvIo watcher has become writable.
     */
    public const WRITE = 2;

    /**
     * Event bitmask: EvTimer watcher has been timed out.
     */
    public const TIMER = 256;

    /**
     * Event bitmask: EvPeriodic watcher has been timed out.
     */
    public const PERIODIC = 512;

    /**
     * Event bitmask: A signal specified in EvSignal::__construct() has been received.
     */
    public const SIGNAL = 1024;

    /**
     * Event bitmask: The pid specified in EvChild::__construct() has received a status change.
     */
    public const CHILD = 2048;

    /**
     * Event bitmask: The path specified in EvStat watcher changed its attributes.
     */
    public const STAT = 4096;

    /**
     * Event bitmask: EvIdle watcher works when there is nothing to do with other watchers.
     */
    public const IDLE = 8192;

    /**
     * Event bitmask: All EvPrepare watchers are invoked just before Ev::run() starts. Thus, EvPrepare watchers are the
     * last watchers invoked before the event loop sleeps or polls for new events.
     */
    public const PREPARE = 16384;

    /**
     * Event bitmask: All EvCheck watchers are queued just after Ev::run() has gathered the new events, but before it
     * queues any callbacks for any received events. Thus, EvCheck watchers will be invoked before any other watchers
     * of the same or lower priority within an event loop iteration.
     */
    public const CHECK = 32768;

    /**
     * Event bitmask: The embedded event loop specified in the EvEmbed watcher needs attention.
     */
    public const EMBED = 65536;

    /**
     * Event bitmask: Not ever sent(or otherwise used) by libev itself, but can be freely used by libev users to signal
     * watchers (e.g. via EvWatcher::feed() ).
     */
    public const CUSTOM = 16777216;

    /**
     * Event bitmask: An unspecified error has occurred, the watcher has been stopped. This might happen because the
     * watcher could not be properly started because libev ran out of memory, a file descriptor was found to be closed
     * or any other problem. Libev considers these application bugs.
     */
    public const ERROR = -2147483648;

    /**
     * select(2) backend
     */
    public const BACKEND_SELECT = 1;

    /**
     * poll(2) backend
     */
    public const BACKEND_POLL = 2;

    /**
     * Linux-specific epoll(7) backend for both pre- and post-2.6.9 kernels
     */
    public const BACKEND_EPOLL = 4;

    /**
     * kqueue backend used on most BSD systems. EvEmbed watcher could be used to embed one loop(with kqueue backend)
     * into another. For instance, one can try to create an event loop with kqueue backend and use it for sockets only.
     */
    public const BACKEND_KQUEUE = 8;

    /**
     * Solaris 8 backend. This is not implemented yet.
     */
    public const BACKEND_DEVPOLL = 16;

    /**
     * Solaris 10 event port mechanism with a good scaling.
     */
    public const BACKEND_PORT = 32;

    /**
     * Try all backends(even currupted ones). It's not recommended to use it explicitly. Bitwise operators should be
     * applied here(e.g. Ev::BACKEND_ALL & ~ Ev::BACKEND_KQUEUE ) Use Ev::recommendedBackends() , or don't specify any
     * backends at all.
     */
    public const BACKEND_ALL = 255;

    /**
     * Not a backend, but a mask to select all backend bits from flags value to mask out any backends(e.g. when
     * modifying the LIBEV_FLAGS environment variable).
     */
    public const BACKEND_MASK = 65535;

    /* Methods */

    /**
     * Returns an integer describing the backend used by libev.
     *
     * Returns an integer describing the backend used by libev. See Ev::BACKEND_* flags
     *
     * @return int Bit mask describing the backend used by libev, see Ev::BACKEND_* flags.
     */
    final public static function backend() {}

    /**
     * Returns recursion depth
     *
     * The number of times Ev::run() was entered minus the number of times Ev::run() was exited normally, in other
     * words, the recursion depth. Outside Ev::run() , this number is 0 . In a callback, this number is 1 , unless
     * Ev::run() was invoked recursively (or from another thread), in which case it is higher.
     *
     * @return int Recursion depth of the default loop.
     */
    final public static function depth() {}

    /**
     * Returns the set of backends that are embeddable in other event loops.
     *
     * @return int Bit mask which can contain Ev::BACKEND_* flags combined using bitwise OR operator.
     */
    final public static function embeddableBackends() {}

    /**
     * Feed signal event into Ev
     *
     * Simulates a signal receive. It is safe to call this function at any time, from any context, including signal
     * handlers or random threads. Its main use is to customise signal handling in the process.
     *
     * Unlike Ev::feedSignalEvent() , this works regardless of which loop has registered the signal.
     *
     * @param int $signum Signal number. See signal(7) man page for details. You can use constants exported by pcntl
     *      extension.
     */
    final public static function feedSignal(int $signum) {}

    /**
     * Feed signal event into the default loop
     *
     * Feed signal event into the default loop. Ev will react to this call as if the signal specified by signal had
     * occurred.
     *
     * @param int $signum Signal number. See signal(7) man page for details. See also constants exported by pcntl
     *      extension.
     */
    final public static function feedSignalEvent(int $signum) {}

    /**
     * Return the number of times the default event loop has polled for new events.
     *
     * Return the number of times the event loop has polled for new events. Sometimes useful as a generation counter.
     *
     * @return int Number of polls of the default event loop.
     */
    final public static function iteration() {}

    /**
     * Returns the time when the last iteration of the default event loop has started.
     *
     * Returns the time when the last iteration of the default event loop has started. This is the time that timers
     * (EvTimer and EvPeriodic) are based on, and referring to it is usually faster then calling Ev::time().
     *
     * @return float Number of seconds(fractional) representing the time when the last iteration of the default event
     *      loop has started.
     */
    final public static function now() {}

    /**
     * Establishes the current time by querying the kernel, updating the time returned by Ev::now in the progress.
     *
     * Establishes the current time by querying the kernel, updating the time returned by Ev::now() in the progress.
     * This is a costly operation and is usually done automatically within Ev::run().
     *
     * This method is rarely useful, but when some event callback runs for a very long time without entering the event
     * loop, updating libev's consideration of the current time is a good idea.
     */
    final public static function nowUpdate() {}

    /**
     * Returns a bit mask of recommended backends for current platform.
     *
     * Returns the set of all backends compiled into this binary of libev and also recommended for this platform,
     * meaning it will work for most file descriptor types. This set is often smaller than the one returned by
     * Ev::supportedBackends(), as for example kqueue is broken on most BSD systems and will not be auto-detected
     * unless it is requested explicitly. This is the set of backends that libev will probe with no backends specified
     * explicitly.
     *
     * @return int Bit mask which can contain Ev::BACKEND_* flags combined using bitwise OR operator.
     */
    final public static function recommendedBackends() {}

    /**
     * Resume previously suspended default event loop.
     *
     * Ev::suspend() and Ev::resume() methods suspend and resume a loop correspondingly.
     *
     * All timer watchers will be delayed by the time spend between suspend and resume , and all periodic watchers will
     * be rescheduled(that is, they will lose any events that would have occurred while suspended).
     *
     * After calling Ev::suspend() it is not allowed to call any function on the given loop other than Ev::resume().
     * Also it is not allowed to call Ev::resume() without a previous call to Ev::suspend().
     *
     * Calling suspend / resume has the side effect of updating the event loop time (see Ev::nowUpdate()).
     */
    final public static function resume() {}

    /**
     * Begin checking for events and calling callbacks for the default loop.
     *
     * Begin checking for events and calling callbacks for the default loop . Returns when a callback calls Ev::stop()
     * method, or the flags are nonzero(in which case the return value is true) or when there are no active watchers
     * which reference the loop( EvWatcher::keepalive() is TRUE), in which case the return value will be FALSE. The
     * return value can generally be interpreted as if TRUE, there is more work left to do.
     *
     * @param int $flags One of the Ev::FLAG_* flags
     */
    final public static function run(int $flags = self::FLAG_AUTO) {}

    /**
     * Block the process for the given number of seconds.
     *
     * @param float $seconds Fractional number of seconds
     */
    final public static function sleep(float $seconds) {}

    /**
     * Stops the default event loop
     *
     * @param int $how One of the Ev::BREAK_* constants
     */
    final public static function stop(int $how = self::BREAK_ONE) {}

    /**
     * Returns the set of backends supported by current libev configuration.
     *
     * @return int Bit mask which can contain Ev::BACKEND_* flags combined using bitwise OR operator.
     */
    final public static function supportedBackends() {}

    /**
     * Suspend the default event loop.
     *
     * Ev::suspend() and Ev::resume() methods suspend and resume the default loop correspondingly.
     *
     * All timer watchers will be delayed by the time spend between suspend and resume , and all periodic watchers will
     * be rescheduled(that is, they will lose any events that would have occurred while suspended).
     *
     * After calling Ev::suspend() it is not allowed to call any function on the given loop other than Ev::resume().
     * Also it is not allowed to call Ev::resume() without a previous call to Ev::suspend().
     */
    final public static function suspend() {}

    /**
     * Returns the current time in fractional seconds since the epoch.
     *
     * Returns the current time in fractional seconds since the epoch. Consider using Ev::now()
     *
     * @return float The current time in fractional seconds since the epoch.
     */
    final public static function time() {}

    /**
     * Performs internal consistency checks (for debugging).
     *
     * Performs internal consistency checks (for debugging libev) and abort the program if any data structures were
     * found to be corrupted.
     */
    final public static function verify() {}
}

/**
 * Class EvWatcher
 */
abstract class EvWatcher
{
    /**
     * @var bool TRUE if the watcher is active. FALSE otherwise.
     */
    #[Immutable]
    public $is_active;

    /**
     * @var bool TRUE if the watcher is pending, i.e. it has outstanding events, but its callback
     *      has not yet been invoked. FALSE otherwise. As long, as a watcher is pending (but not active), one must not
     *      change its priority.
     */
    #[Immutable]
    public $is_pending;

    /**
     * Abstract constructor of a watcher object
     */
    abstract public function __construct();

    /**
     * @var mixed Custom user data associated with the watcher
     */
    public $data;

    /**
     * @var int Number between Ev::MINPRi and Ev::MAXPRI. Pending watchers with higher priority will be invoked before
     *      watchers with lower priority, but priority will not keep watchers from being executed (except for EvIdle
     *      watchers). EvIdle watchers provide functionality to suppress invocation when higher priority events are
     *      pending.
     */
    public $priority;

    /**
     * Clear watcher pending status.
     *
     * If the watcher is pending, this method clears its pending status and returns its revents bitset (as if its
     * callback was invoked). If the watcher isn't pending it does nothing and returns 0.
     *
     * Sometimes it can be useful to "poll" a watcher instead of waiting for its callback to be invoked, which can be
     * accomplished with this function.
     *
     * @return int In case if the watcher is pending, returns revents bitset as if the watcher callback had been
     *      invoked. Otherwise returns 0 .
     */
    public function clear() {}

    /**
     * Feeds the given revents set into the event loop.
     *
     * Feeds the given revents set into the event loop, as if the specified event had happened for the watcher.
     *
     * @param int $revents Bit mask of watcher received events.
     */
    public function feed(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $revents) {}

    /**
     * Returns the loop responsible for the watcher.
     *
     * @return EvLoop Event loop object responsible for the watcher.
     */
    public function getLoop() {}

    /**
     * Invokes the watcher callback with the given received events bit mask.
     *
     * @param int $revents Bit mask of watcher received events.
     */
    public function invoke(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $revents) {}

    /**
     * Configures whether to keep the loop from returning.
     *
     * Configures whether to keep the loop from returning. With keepalive value set to FALSE the watcher won't keep
     * Ev::run() / EvLoop::run() from returning even though the watcher is active.
     *
     * Watchers have keepalive value TRUE by default.
     *
     * Clearing keepalive status is useful when returning from Ev::run() / EvLoop::run() just because of the watcher
     * is undesirable. It could be a long running UDP socket watcher or so.
     *
     * @param bool $value With keepalive value set to FALSE the watcher won't keep Ev::run() / EvLoop::run() from
     *      returning even though the watcher is active.
     */
    public function keepalive(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $value = true) {}

    /**
     * Sets new callback for the watcher.
     *
     * @param callable $callback void callback ([ object $watcher = NULL [, int $revents = NULL ]] )
     */
    public function setCallback(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $callback) {}

    /**
     * Starts the watcher.
     *
     * Marks the watcher as active. Note that only active watchers will receive events.
     */
    public function start() {}

    /**
     * Stops the watcher.
     *
     * Marks the watcher as inactive. Note that only active watchers will receive events.
     */
    public function stop() {}
}

/**
 * Class EvCheck
 *
 * EvPrepare and EvCheck watchers are usually used in pairs. EvPrepare watchers get invoked before the process blocks,
 * EvCheck afterwards.
 *
 * It is not allowed to call EvLoop::run() or similar methods or functions that enter the current event loop from either
 * EvPrepare or EvCheck watchers. Other loops than the current one are fine, however. The rationale behind this is that
 * one don't need to check for recursion in those watchers, i.e. the sequence will always be: EvPrepare -> blocking ->
 * EvCheck , so having a watcher of each kind they will always be called in pairs bracketing the blocking call.
 *
 * The main purpose is to integrate other event mechanisms into libev and their use is somewhat advanced. They could be
 * used, for example, to track variable changes, implement custom watchers, integrate net-snmp or a coroutine library
 * and lots more. They are also occasionally useful to cache some data and want to flush it before blocking.
 *
 * It is recommended to give EvCheck watchers highest( Ev::MAXPRI ) priority, to ensure that they are being run before
 * any other watchers after the poll (this doesn’t matter for EvPrepare watchers).
 *
 * Also, EvCheck watchers should not activate/feed events. While libev fully supports this, they might get executed
 * before other EvCheck watchers did their job.
 */
final class EvCheck extends EvWatcher
{
    /**
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $callback,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $data = null,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $priority = 0
    ) {}

    /**
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     * @return EvCheck
     */
    final public static function createStopped(mixed $callback, mixed $data = null, int $priority = 0) {}
}

/**
 * Class EvChild
 *
 * EvChild watchers trigger when the process receives a SIGCHLD in response to some child status changes (most typically
 * when a child dies or exits). It is permissible to install an EvChild watcher after the child has been forked (which
 * implies it might have already exited), as long as the event loop isn't entered(or is continued from a watcher), i.e.
 * forking and then immediately registering a watcher for the child is fine, but forking and registering a watcher a few
 * event loop iterations later or in the next callback invocation is not.
 *
 * It is allowed to register EvChild watchers in the default loop only.
 */
final class EvChild extends EvWatcher
{
    /**
     * @var int The process ID this watcher watches out for, or 0, meaning any process ID.
     */
    #[Immutable]
    public $pid;

    /**
     * @var int The process ID that detected a status change.
     */
    #[Immutable]
    public $rpid;

    /**
     * @var int The process exit status caused by rpid.
     */
    #[Immutable]
    public $rstatus;

    /**
     * Constructs the EvChild watcher object.
     *
     * Call the callback when a status change for process ID pid (or any PID if pid is 0) has been received (a status
     * change happens when the process terminates or is killed, or, when trace is TRUE, additionally when it is stopped
     * or continued). In other words, when the process receives a SIGCHLD, Ev will fetch the outstanding exit/wait
     * status for all changed/zombie children and call the callback.
     *
     * It is valid to install a child watcher after an EvChild has exited but before the event loop has started its next
     * iteration. For example, first one calls fork , then the new child process might exit, and only then an EvChild
     * watcher is installed in the parent for the new PID .
     *
     * You can access both exit/tracing status and pid by using the rstatus and rpid properties of the watcher object.
     *
     * The number of PID watchers per PID is unlimited. All of them will be called.
     *
     * The EvChild::createStopped() method doesn't start(activate) the newly created watcher.
     *
     * @param int $pid  Wait for status changes of process PID(or any process if PID is specified as 0 ).
     * @param bool $trace If FALSE, only activate the watcher when the process terminates. Otherwise(TRUE) additionally
     *      activate the watcher when the process is stopped or continued.
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $pid,
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $trace,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $callback,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $data = null,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $priority = 0
    ) {}

    /**
     * Create instance of a stopped EvCheck watcher.
     *
     * The same as EvChild::__construct() , but doesn't start the watcher automatically.
     *
     * @param int $pid  Wait for status changes of process PID(or any process if PID is specified as 0 ).
     * @param bool $trace If FALSE, only activate the watcher when the process terminates. Otherwise(TRUE) additionally
     *      activate the watcher when the process is stopped or continued.
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     *
     * @return EvChild
     */
    final public static function createStopped(int $pid, bool $trace, mixed $callback, mixed $data = null, int $priority = 0) {}

    /**
     * Configures the watcher
     *
     * @param int $pid  Wait for status changes of process PID(or any process if PID is specified as 0 ).
     * @param bool $trace If FALSE, only activate the watcher when the process terminates. Otherwise(TRUE) additionally
     *      activate the watcher when the process is stopped or continued.
     */
    public function set(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $pid,
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $trace
    ) {}
}

/**
 * Class EvEmbed
 *
 * Used to embed one event loop into another.
 */
final class EvEmbed extends EvWatcher
{
    /**
     * @var EvLoop The embedded loop
     */
    #[Immutable]
    public $embed;

    /**
     * Constructs the EvEmbed object.
     *
     * This is a rather advanced watcher type that lets to embed one event loop into another(currently only IO events
     * are supported in the embedded loop, other types of watchers might be handled in a delayed or incorrect fashion
     * and must not be used).
     *
     * See the libev documentation for details.
     *
     * This watcher is most useful on BSD systems without working kqueue to still be able to handle a large number of
     * sockets.
     *
     * @param EvLoop $other The loop to embed, this loop must be embeddable(see Ev::embeddableBackends()).
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     */
    public function __construct(
        EvLoop $other,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $callback,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $data = null,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $priority = 0
    ) {}

    /**
     * Configures the watcher.
     *
     * @param EvLoop $other The loop to embed, this loop must be embeddable(see Ev::embeddableBackends()).
     */
    public function set(EvLoop $other) {}

    /**
     * Make a single, non-blocking sweep over the embedded loop.
     */
    public function sweep() {}

    /**
     * Create stopped EvEmbed watcher object
     *
     * The same as EvEmbed::__construct() , but doesn't start the watcher automatically.
     *
     * @param EvLoop $other The loop to embed, this loop must be embeddable(see Ev::embeddableBackends()).
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     *
     * @return EvEmbed
     */
    final public static function createStopped(EvLoop $other, mixed $callback, mixed $data = null, int $priority = 0) {}
}

/**
 * Class EvIo
 *
 * EvIo watchers check whether a file descriptor(or socket, or a stream castable to numeric file descriptor) is readable
 * or writable in each iteration of the event loop, or, more precisely, when reading would not block the process and
 * writing would at least be able to write some data. This behaviour is called level-triggering because events are kept
 * receiving as long as the condition persists. To stop receiving events just stop the watcher.
 *
 * The number of read and/or write event watchers per fd is unlimited. Setting all file descriptors to non-blocking mode
 * is also usually a good idea (but not required).
 *
 * Another thing to watch out for is that it is quite easy to receive false readiness notifications, i.e. the callback
 * might be called with Ev::READ but a subsequent read() will actually block because there is no data. It is very easy
 * to get into this situation. Thus it is best to always use non-blocking I/O: An extra read() returning EAGAIN (or
 * similar) is far preferable to a program hanging until some data arrives.
 *
 * If for some reason it is impossible to run the fd in non-blocking mode, then separately re-test whether a file
 * descriptor is really ready. Some people additionally use SIGALRM and an interval timer, just to be sure they won't
 * block infinitely.
 *
 * Always consider using non-blocking mode.
 */
final class EvIo extends EvWatcher
{
    /**
     * @var resource A stream opened with fopen() or similar functions, numeric file descriptor, or socket.
     */
    #[Immutable]
    public $fd;

    /**
     * @var int Ev::READ and/or Ev::WRITE. See the bit masks.
     */
    #[Immutable]
    #[ExpectedValues(flags: [Ev::READ, Ev::WRITE])]
    public $events;

    /**
     * Constructs EvIo watcher object.
     *
     * Constructs EvIo watcher object and starts the watcher automatically.
     *
     * @param resource $fd  A stream opened with fopen() or similar functions, numeric file descriptor, or socket.
     * @param int $events Ev::READ and/or Ev::WRITE. See the bit masks.
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $fd,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $events,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $callback,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $data = null,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $priority = 0
    ) {}

    /**
     * Configures the watcher.
     *
     * @param resource $fd  A stream opened with fopen() or similar functions, numeric file descriptor, or socket.
     * @param int $events Ev::READ and/or Ev::WRITE. See the bit masks.
     */
    public function set(
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $fd,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $events
    ) {}

    /**
     * Create stopped EvIo watcher object.
     *
     * The same as EvIo::__construct() , but doesn't start the watcher automatically.
     *
     * @param resource $fd  A stream opened with fopen() or similar functions, numeric file descriptor, or socket.
     * @param int $events Ev::READ and/or Ev::WRITE. See the bit masks.
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     *
     * @return EvIo
     */
    final public static function createStopped(mixed $fd, int $events, mixed $callback, mixed $data = null, int $priority = 0) {}
}

/**
 * Class EvPeriodic
 *
 * Periodic watchers are also timers of a kind, but they are very versatile.
 *
 * Unlike EvTimer, EvPeriodic watchers are not based on real time (or relative time, the physical time that passes) but
 * on wall clock time (absolute time, calendar or clock). The difference is that wall clock time can run faster or
 * slower than real time, and time jumps are not uncommon (e.g. when adjusting it).
 *
 * EvPeriodic watcher can be configured to trigger after some specific point in time. For example, if an EvPeriodic
 * watcher is configured to trigger "in 10 seconds" (e.g. EvLoop::now() + 10.0 , i.e. an absolute time, not a delay),
 * and the system clock is reset to January of the previous year , then it will take a year or more to trigger the event
 * (unlike an EvTimer , which would still trigger roughly 10 seconds after starting it as it uses a relative timeout).
 *
 * As with timers, the callback is guaranteed to be invoked only when the point in time where it is supposed to trigger
 * has passed. If multiple timers become ready during the same loop iteration then the ones with earlier time-out values
 * are invoked before ones with later time-out values (but this is no longer true when a callback calls EvLoop::run()
 * recursively).
 */
final class EvPeriodic extends EvWatcher
{
    /**
     * @var float When repeating, this contains the offset value, otherwise this is the absolute point in time (the
     *      offset value passed to EvPeriodic::set(), although libev might modify this value for better numerical
     *      stability).
     */
    public $offset;

    /**
     * @var float The current interval value. Can be modified any time, but changes only take effect when the periodic
     *      timer fires or EvPeriodic::again() is being called.
     */
    public $interval;

    /**
     * Constructs EvPeriodic watcher object.
     *
     * Constructs EvPeriodic watcher object and starts it automatically. EvPeriodic::createStopped() method creates
     * stopped periodic watcher.
     *
     * @param float $offset When repeating, this contains the offset value, otherwise this is the absolute point in
     *      time (the offset value passed to EvPeriodic::set(), although libev might modify this value for better
     *      numerical stability).
     * @param float $interval The current interval value. Can be modified any time, but changes only take effect when
     *      the periodic timer fires or EvPeriodic::again() is being called.
     * @param null|callable $reschedule_cb If set, tt must return the next time to trigger, based on the passed time value
     *      (that is, the lowest time value larger than or equal to the second argument). It will usually be called just
     *      before the callback will be triggered, but might be called at other times, too.
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'float'], default: '')] $offset,
        #[LanguageLevelTypeAware(['8.0' => 'float'], default: '')] $interval,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $reschedule_cb,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $callback,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $data = null,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $priority = 0
    ) {}

    /**
     * Simply stops and restarts the periodic watcher again.
     *
     * Simply stops and restarts the periodic watcher again. This is only useful when attributes are changed.
     *
     * @return void
     */
    public function again() {}

    /**
     * Returns the absolute time that this watcher is supposed to trigger next.
     *
     * When the watcher is active, returns the absolute time that this watcher is supposed to trigger next. This is not
     * the same as the offset argument to EvPeriodic::set() or EvPeriodic::__construct(), but indeed works even in
     * interval mode.
     *
     * @return float Rhe absolute time this watcher is supposed to trigger next in seconds.
     */
    public function at() {}

    /**
     * Create a stopped EvPeriodic watcher
     *
     * Create EvPeriodic object. Unlike EvPeriodic::__construct() this method doesn't start the watcher automatically.
     *
     * @param float $offset When repeating, this contains the offset value, otherwise this is the absolute point in
     *      time (the offset value passed to EvPeriodic::set(), although libev might modify this value for better
     *      numerical stability).
     * @param float $interval The current interval value. Can be modified any time, but changes only take effect when
     *      the periodic timer fires or EvPeriodic::again() is being called.
     * @param null|callable $reschedule_cb If set, tt must return the next time to trigger, based on the passed time value
     *      (that is, the lowest time value larger than or equal to the second argument). It will usually be called just
     *      before the callback will be triggered, but might be called at other times, too.
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     *
     * @return EvPeriodic
     */
    final public static function createStopped(float $offset, float $interval, mixed $reschedule_cb, mixed $callback, mixed $data = null, int $priority = 0) {}

    /**
     * Configures the watcher
     * @param float $offset The same meaning as for {@see EvPeriodic::__construct}
     * @param float $interval The same meaning as for {@see EvPeriodic::__construct}
     * @param null|callable $reschedule_cb The same meaning as for {@see EvPeriodic::__construct}
     * @return void
     */
    public function set(
        #[LanguageLevelTypeAware(['8.0' => 'float'], default: '')] $offset,
        #[LanguageLevelTypeAware(['8.0' => 'float'], default: '')] $interval,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $reschedule_cb = null
    ) {}
}

/**
 * Class EvPrepare
 *
 * EvPrepare and EvCheck watchers are usually used in pairs. EvPrepare watchers get invoked before the process blocks,
 * EvCheck afterwards.
 *
 * It is not allowed to call EvLoop::run() or similar methods or functions that enter the current event loop from either
 * EvPrepare or EvCheck watchers. Other loops than the current one are fine, however. The rationale behind this is that
 * one don't need to check for recursion in those watchers, i.e. the sequence will always be: EvPrepare -> blocking ->
 * EvCheck, so having a watcher of each kind they will always be called in pairs bracketing the blocking call.
 *
 * The main purpose is to integrate other event mechanisms into libev and their use is somewhat advanced. They could be
 * used, for example, to track variable changes, implement custom watchers, integrate net-snmp or a coroutine library
 * and lots more. They are also occasionally useful to cache some data and want to flush it before blocking.
 *
 * It is recommended to give EvCheck watchers highest (Ev::MAXPRI) priority, to ensure that they are being run before
 * any other watchers after the poll (this doesn’t matter for EvPrepare watchers).
 *
 * Also, EvCheck watchers should not activate/feed events. While libev fully supports this, they might get executed
 * before other EvCheck watchers did their job.
 */
final class EvPrepare extends EvWatcher
{
    /**
     * Constructs EvPrepare watcher object.
     *
     * Constructs EvPrepare watcher object and starts the watcher automatically. If you need a stopped watcher, consider
     * using EvPrepare::createStopped().
     *
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $callback,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $data = null,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $priority = 0
    ) {}

    /**
     * Creates a stopped instance of EvPrepare watcher.
     *
     * Creates a stopped instance of EvPrepare watcher. Unlike EvPrepare::__construct(), this method doesn't start the
     * watcher automatically.
     *
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     *
     * @return EvPrepare
     */
    final public static function createStopped(mixed $callback, mixed $data = null, int $priority = 0) {}
}

/**
 * Class EvSignal
 *
 * EvSignal watchers will trigger an event when the process receives a specific signal one or more times. Even though
 * signals are very asynchronous, libev will try its best to deliver signals synchronously, i.e. as part of the normal
 * event processing, like any other event.
 *
 * There is no limit for the number of watchers for the same signal, but only within the same loop, i.e. one can watch
 * for SIGINT in the default loop and for SIGIO in another loop, but it is not allowed to watch for SIGINT in both the
 * default loop and another loop at the same time. At the moment, SIGCHLD is permanently tied to the default loop.
 *
 * If possible and supported, libev will install its handlers with SA_RESTART (or equivalent) behaviour enabled, so
 * system calls should not be unduly interrupted. In case of a problem with system calls getting interrupted by signals,
 * all the signals can be blocked in an EvCheck watcher and unblocked in a EvPrepare watcher.
 */
final class EvSignal extends EvWatcher
{
    /**
     * @var int Signal number. See the constants exported by pcntl extension. See also signal(7) man page.
     */
    #[Immutable]
    public $signum;

    /**
     * Constructs EvSignal watcher object
     *
     * @param int $signum Signal number. See the constants exported by pcntl extension. See also signal(7) man page.
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $signum,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $callback,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $data = null,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $priority = 0
    ) {}

    /**
     * Configures the watcher.
     *
     * @param int $signum Signal number. See the constants exported by pcntl extension. See also signal(7) man page.
     */
    public function set(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $signum) {}

    /**
     * Creates a stopped instance of EvSignal watcher.
     *
     * Creates a stopped instance of EvSignal watcher. Unlike EvPrepare::__construct(), this method doesn't start the
     * watcher automatically.
     *
     * @param int $signum Signal number. See the constants exported by pcntl extension. See also signal(7) man page.
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     *
     * @return EvSignal
     */
    final public static function createStopped(int $signum, mixed $callback, mixed $data = null, int $priority = 0) {}
}

/**
 * Class EvStat
 *
 * EvStat monitors a file system path for attribute changes. It calls stat() on that path in regular intervals (or when
 * the OS signals it changed) and sees if it changed compared to the last time, invoking the callback if it did.
 *
 * The path does not need to exist: changing from "path exists" to "path does not exist" is a status change like any
 * other. The condition "path does not exist" is signified by the 'nlink' item being 0 (returned by EvStat::attr()
 * method).
 *
 * The path must not end in a slash or contain special components such as '.' or '..'. The path should be absolute: if
 * it is relative and the working directory changes, then the behaviour is undefined.
 *
 * Since there is no portable change notification interface available, the portable implementation simply calls stat()
 * regularly on the path to see if it changed somehow. For this case a recommended polling interval can be specified. If
 * one specifies a polling interval of 0.0 (highly recommended) then a suitable, unspecified default value will be used
 * (which could be expected to be around 5 seconds, although this might change dynamically). libev will also impose a
 * minimum interval which is currently around 0.1 , but that’s usually overkill.
 *
 * This watcher type is not meant for massive numbers of EvStat watchers, as even with OS-supported change
 * notifications, this can be resource-intensive.
 */
final class EvStat extends EvWatcher
{
    /**
     * @var float  Hint on how quickly a change is expected to be detected and should normally be
     *      specified as 0.0 to let libev choose a suitable value.
     */
    #[Immutable]
    public $interval;

    /**
     * @var string The path to wait for status changes on.
     */
    #[Immutable]
    public $path;

    /**
     * Constructs EvStat watcher object.
     *
     * Constructs EvStat watcher object and starts the watcher automatically.
     *
     * @param string $path The path to wait for status changes on.
     * @param float $interval Hint on how quickly a change is expected to be detected and should normally be specified
     *      as 0.0 to let libev choose a suitable value.
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $path,
        #[LanguageLevelTypeAware(['8.0' => 'float'], default: '')] $interval,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $callback,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $data = null,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $priority = 0
    ) {}

    /**
     * @return array The values most recently detect by Ev (without actual stat'ing). See stat(2) man page for details.
     */
    public function attr() {}

    /**
     * @return array Just like EvStat::attr() , but returns the previous set of values.
     */
    public function prev() {}

    /**
     * Configures the watcher.
     *
     * @param string $path The path to wait for status changes on.
     * @param float $interval Hint on how quickly a change is expected to be detected and should normally be specified
     *      as 0.0 to let libev choose a suitable value.
     */
    public function set(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $path,
        #[LanguageLevelTypeAware(['8.0' => 'float'], default: '')] $interval
    ) {}

    /**
     * Initiates the stat call.
     *
     * Initiates the stat call(updates internal cache). It stats (using lstat) the path specified in the watcher and
     * sets the internal cache to the values found.
     *
     * @return bool TRUE if path exists. Otherwise FALSE.
     */
    public function stat() {}

    /**
     * Create a stopped EvStat watcher object.
     *
     * Creates EvStat watcher object, but doesn't start it automatically (unlike EvStat::__construct()).
     *
     * @param string $path The path to wait for status changes on.
     * @param float $interval Hint on how quickly a change is expected to be detected and should normally be specified
     *      as 0.0 to let libev choose a suitable value.
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     *
     * @return EvStat
     */
    final public static function createStopped(string $path, float $interval, mixed $callback, mixed $data = null, int $priority = 0) {}
}

/**
 * Class EvTimer
 *
 * EvTimer watchers are simple relative timers that generate an event after a given time, and optionally repeating in
 * regular intervals after that.
 *
 * The timers are based on real time, that is, if one registers an event that times out after an hour and resets the
 * system clock to January last year, it will still time out after( roughly) one hour. "Roughly" because detecting time
 * jumps is hard, and some inaccuracies are unavoidable.
 *
 * The callback is guaranteed to be invoked only after its timeout has passed (not at, so on systems with very
 * low-resolution clocks this might introduce a small delay). If multiple timers become ready during the same loop
 * iteration then the ones with earlier time-out values are invoked before ones of the same priority with later time-out
 * values (but this is no longer true when a callback calls EvLoop::run() recursively).
 *
 * The timer itself will do a best-effort at avoiding drift, that is, if a timer is configured to trigger every 10
 * seconds, then it will normally trigger at exactly 10 second intervals. If, however, the script cannot keep up with
 * the timer (because it takes longer than those 10 seconds to do) the timer will not fire more than once per event loop
 * iteration.
 */
final class EvTimer extends EvWatcher
{
    /**
     * @var float If repeat is 0.0, then it will automatically be stopped once the timeout is reached. If it is
     *      positive, then the timer will automatically be configured to trigger again every repeat seconds later, until
     *      stopped manually.
     */
    public $repeat;

    /**
     * @var float The remaining time until a timer fires. If the timer is active, then this time is relative to the
     *      current event loop time, otherwise it's the timeout value currently configured.
     *
     *      That is, after instantiating an EvTimer with an after value of 5.0 and repeat value of 7.0, remaining
     *      returns 5.0. When the timer is started and one second passes, remaining will return 4.0 . When the timer
     *      expires and is restarted, it will return roughly 7.0 (likely slightly less as callback invocation takes some
     *      time too), and so on.
     */
    public $remaining;

    /**
     * Constructs an EvTimer watcher object.
     *
     * @param float $after Configures the timer to trigger after $after seconds.
     * @param float $repeat If repeat is 0.0, then it will automatically be stopped once the timeout is reached. If it
     *      is positive, then the timer will automatically be configured to trigger again every repeat seconds later,
     *      until stopped manually.
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'float'], default: '')] $after,
        #[LanguageLevelTypeAware(['8.0' => 'float'], default: '')] $repeat,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $callback,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $data = null,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $priority = 0
    ) {}

    /**
     * Restarts the timer watcher.
     *
     * This will act as if the timer timed out and restart it again if it is repeating. The exact semantics are:
     *
     * - if the timer is pending, its pending status is cleared.
     * - if the timer is started but non-repeating, stop it (as if it timed out).
     * - if the timer is repeating, either start it if necessary (with the repeat value), or reset the running timer to
     *   the repeat value.
     */
    public function again() {}

    /**
     * Configures the watcher.
     *
     * @param float $after Configures the timer to trigger after $after seconds.
     * @param float $repeat If repeat is 0.0, then it will automatically be stopped once the timeout is reached. If it
     *      is positive, then the timer will automatically be configured to trigger again every repeat seconds later,
     *      until stopped manually.
     */
    public function set(
        #[LanguageLevelTypeAware(['8.0' => 'float'], default: '')] $after,
        #[LanguageLevelTypeAware(['8.0' => 'float'], default: '')] $repeat
    ) {}

    /**
     * Creates a stopped EvTimer watcher object.
     *
     * @param float $after Configures the timer to trigger after $after seconds.
     * @param float $repeat If repeat is 0.0, then it will automatically be stopped once the timeout is reached. If it
     *      is positive, then the timer will automatically be configured to trigger again every repeat seconds later,
     *      until stopped manually.
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     *
     * @return EvTimer
     */
    final public static function createStopped(float $after, float $repeat, mixed $callback, mixed $data = null, int $priority = 0) {}
}

/**
 * Class EvIdle
 *
 * EvIdle watchers trigger events when no other events of the same or higher priority are pending (EvPrepare, EvCheck
 * and other EvIdle watchers do not count as receiving events).
 *
 * Thus, as long as the process is busy handling sockets or timeouts (or even signals) of the same or higher priority it
 * will not be triggered. But when the process is idle (or only lower-priority watchers are pending), the EvIdle
 * watchers are being called once per event loop iteration - until stopped, that is, or the process receives more events
 * and becomes busy again with higher priority stuff.
 *
 * Apart from keeping the process non-blocking (which is a useful on its own sometimes), EvIdle watchers are a good
 * place to do "pseudo-background processing", or delay processing stuff to after the event loop has handled all
 * outstanding events.
 *
 * The most noticeable effect is that as long as any idle watchers are active, the process will not block when waiting
 * for new events.
 */
final class EvIdle extends EvWatcher
{
    /**
     * Constructs an EvIdle instance.
     *
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     */
    public function __construct(mixed $callback, mixed $data = null, int $priority = 0) {}

    /**
     * Creates a stopped EvIdle instance.
     *
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     *
     * @return EvIdle
     */
    final public static function createStopped(mixed $callback, mixed $data = null, int $priority = 0) {}
}

/**
 * Class EvFork
 *
 * Fork watchers are called when a fork() was detected (usually because whoever signalled libev about it by calling
 * EvLoop::fork()). The invocation is done before the event loop blocks next and before EvCheck watchers are being
 * called, and only in the child after the fork. Note that if someone calls EvLoop::fork() in the wrong process, the
 * fork handlers will be invoked, too.
 */
final class EvFork extends EvWatcher
{
    /**
     * Constructs an EvFork instance.
     *
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     */
    public function __construct(EvLoop $loop, mixed $callback, mixed $data = null, int $priority = 0) {}

    /**
     * Creates a stopped EvFork instance.
     *
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     *
     * @return EvFork
     */
    final public static function createStopped(EvLoop $loop, mixed $callback, mixed $data = null, int $priority = 0) {}
}

/**
 * Class EvLoop
 *
 * Represents an event loop that is always distinct from the default loop. Unlike the default loop, it cannot handle
 * EvChild watchers.
 *
 * Having threads we have to create a loop per thread, and use the the default loop in the parent thread.
 *
 * The default event loop is initialized automatically by Ev. It is accessible via methods of the Ev class, or via
 * EvLoop::defaultLoop() method.
 */
final class EvLoop
{
    /**
     * @var int The Ev::BACKEND_* flag indicating the event backend in use.
     */
    #[Immutable]
    #[ExpectedValues(flags: [Ev::BACKEND_ALL, Ev::BACKEND_DEVPOLL, Ev::BACKEND_EPOLL, Ev::BACKEND_KQUEUE, Ev::BACKEND_MASK, Ev::BACKEND_POLL, Ev::BACKEND_PORT, Ev::BACKEND_SELECT])]
    public $backend;

    /**
     * @var bool TRUE if it is the default event loop.
     */
    #[Immutable]
    public $is_default_loop;

    /**
     * @var mixed Custom data attached to the loop.
     */
    public $data;

    /**
     * @var int The current iteration count of the loop. See Ev::iteration().
     */
    public $iteration;

    /**
     * @var int The number of pending watchers. 0 indicates that there are no watchers pending.
     */
    public $pending;

    /**
     * @var float Higher io_interval allows libev to spend more time collecting EvIo events, so more events can be
     *      handled per iteration, at the cost of increasing latency. Timeouts (both EvPeriodic and EvTimer) will not be
     *      affected. Setting this to a non-zero value will introduce an additional sleep() call into most loop
     *      iterations. The sleep time ensures that libev will not poll for EvIo events more often than once per this
     *      interval, on average. Many programs can usually benefit by setting the io_interval to a value near 0.1,
     *      which is often enough for interactive servers (not for games). It usually doesn't make much sense to set it
     *      to a lower value than 0.01, as this approaches the timing granularity of most systems.
     */
    public $io_interval;

    /**
     * @var float Higher timeout_interval allows libev to spend more time collecting timeouts, at the expense of
     *      increased latency/jitter/inexactness (the watcher callback will be called later). EvIo watchers will not be
     *      affected. Setting this to a non-null value will not introduce any overhead in libev.
     */
    public $timeout_interval;

    /**
     * @var int The recursion depth.
     */
    public $depth;

    /**
     * @param int $flags
     * @param mixed $data
     * @param float $io_interval
     * @param float $timeout_interval
     */
    public function __construct(int $flags = Ev::FLAG_AUTO, mixed $data = null, float $io_interval = 0.0, float $timeout_interval = 0.0) {}

    /**
     * Returns an integer describing the backend used by libev.
     *
     * @return int An integer describing the backend used by libev. See Ev::backend().
     */
    public function backend() {}

    /**
     * Creates EvCheck object associated with the current event loop instance.
     *
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     * @return EvCheck
     */
    final public function check(callable $callback, $data = null, $priority = 0) {}

    /**
     * Creates EvChild object associated with the current event loop instance;
     * @link https://www.php.net/manual/en/evloop.child.php
     * @param int $pid
     * @param bool $trace
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     * @return EvChild
     */
    final public function child(int $pid, bool $trace, mixed $callback, mixed $data = null, int $priority = 0) {}

    /**
     * Creates EvEmbed object associated with the current event loop instance.
     *
     * @param EvLoop $other
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     * @return EvEmbed
     */
    final public function embed(EvLoop $other, callable $callback, $data = null, $priority = 0) {}

    /**
     * Creates EvFork object associated with the current event loop instance.
     *
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     * @return EvFork
     */
    final public function fork(callable $callback, $data = null, $priority = 0) {}

    /**
     * Creates EvIdle object associated with the current event loop instance.
     *
     * @param callable $callback
     * @param null $data
     * @param int $priority
     * @return EvIdle
     */
    final public function idle(mixed $callback, mixed $data = null, int $priority = 0) {}

    /**
     * Invoke all pending watchers while resetting their pending state.
     */
    public function invokePending() {}

    /**
     * Creates EvIo object associated with the current event loop instance.
     *
     * @param resource $fd
     * @param int $events
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     * @return EvIo
     */
    final public function io(mixed $fd, int $events, mixed $callback, mixed $data = null, int $priority = 0) {}

    /**
     * Must be called after a fork.
     *
     * Must be called after a fork in the child, before entering or continuing the event loop. An alternative is to use
     * Ev::FLAG_FORKCHECK which calls this function automatically, at some performance loss (refer to the libev
     * documentation).
     */
    public function loopFork() {}

    /**
     * Returns the current "event loop time".
     *
     * Returns the current "event loop time", which is the time the event loop received events and started processing
     * them. This timestamp does not change as long as callbacks are being processed, and this is also the base time
     * used for relative timers. You can treat it as the timestamp of the event occurring (or more correctly, libev
     * finding out about it).
     *
     * @return float Time of the event loop in (fractional) seconds.
     */
    public function now() {}

    /**
     * Establishes the current time by querying the kernel, updating the time returned by Ev::now in the progress.
     *
     * Establishes the current time by querying the kernel, updating the time returned by Ev::now() in the progress.
     * This is a costly operation and is usually done automatically within Ev::run().
     *
     * This method is rarely useful, but when some event callback runs for a very long time without entering the event
     * loop, updating libev's consideration of the current time is a good idea.
     */
    public function nowUpdate() {}

    /**
     * Creates EvPeriodic object associated with the current event loop instance.
     *
     * @param float $offset
     * @param float $interval
     * @param callable $reschedule_cb
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     */
    final public function periodic(float $offset, float $interval, mixed $reschedule_cb, mixed $callback, mixed $data = null, int $priority = 0) {}

    /**
     * Creates EvPrepare object associated with the current event loop instance.
     *
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     */
    final public function prepare(callable $callback, $data = null, $priority = 0) {}

    /**
     * Resume previously suspended default event loop.
     *
     * EvLoop::suspend() and EvLoop::resume() methods suspend and resume a loop correspondingly.
     */
    public function resume() {}

    /**
     * Begin checking for events and calling callbacks for the loop.
     *
     * Begin checking for events and calling callbacks for the current event loop. Returns when a callback calls
     * Ev::stop() method, or the flags are nonzero (in which case the return value is true) or when there are no active
     * watchers which reference the loop (EvWatcher::keepalive() is TRUE), in which case the return value will be FALSE.
     * The return value can generally be interpreted as if TRUE, there is more work left to do.
     *
     * @param int $flags One of the Ev::RUN_* flags.
     */
    public function run(int $flags = Ev::FLAG_AUTO) {}

    /**
     * Creates EvSignal object associated with the current event loop instance.
     *
     * @param int $signum
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     * @return EvSignal
     */
    final public function signal(int $signum, mixed $callback, mixed $data = null, int $priority = 0) {}

    /**
     * Creates EvStats object associated with the current event loop instance.
     *
     * @param string $path
     * @param float $interval
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     * @return EvStat
     */
    final public function stat(string $path, float $interval, mixed $callback, mixed $data = null, int $priority = 0) {}

    /**
     * Stops the event loop.
     *
     * @param int $how One of the Ev::BREAK_* flags.
     */
    public function stop(int $how = Ev::BREAK_ALL) {}

    /**
     * Suspend the loop.
     *
     * EvLoop::suspend() and EvLoop::resume() methods suspend and resume a loop correspondingly.
     */
    public function suspend() {}

    /**
     * Creates EvTimer object associated with the current event loop instance.
     *
     * @param float $after
     * @param float $repeat
     * @param callable $callback
     * @param mixed $data
     * @param int $priority
     * @return EvTimer
     */
    final public function timer(float $after, float $repeat, mixed $callback, mixed $data = null, int $priority = 0) {}

    /**
     * Performs internal consistency checks (for debugging).
     *
     * Performs internal consistency checks (for debugging libev) and abort the program if any data structures were
     * found to be corrupted.
     */
    public function verify() {}

    /**
     * Returns or creates the default event loop.
     *
     * If the default event loop is not created, EvLoop::defaultLoop() creates it with the specified parameters.
     * Otherwise, it just returns the object representing previously created instance ignoring all the parameters.
     *
     * @param int $flags
     * @param mixed $data
     * @param float $io_interval
     * @param float $timeout_interval
     */
    public static function defaultLoop(
        int $flags = Ev::FLAG_AUTO,
        mixed $data = null,
        float $io_interval = 0.0,
        float $timeout_interval = 0.0
    ) {}
}
This file was automatically generated by Composer Patches (https://github.com/cweagans/composer-patches)
Patches applied to this directory:

0
Source: patches/PDO.patch


1
Source: patches/SessionHandler.patch


<?php

namespace Saxon;

/**
 * @link https://www.saxonica.com/saxon-c/documentation/index.html#!api/saxon_c_php_api
 */
class SaxonProcessor
{
    /**
     * Constructor
     *
     * @param bool $license Indicates whether the Processor requires features of Saxon that need a license file. If false, the method will creates a Configuration appropriate for Saxon HE (Home edition). If true, the method will create a Configuration appropriate to the version of the software that is running Saxon-PE or Saxon-EE.
     * @param string $cwd The cwd argument is used to manually set the current working directory used for executions of source files
     */
    public function __construct($license = false, $cwd = '') {}

    /**
     * Create an Xdm Atomic value from any of the main primitive types (i.e. bool, int, float, string)
     *
     * @param bool|int|float|string $primitive_type_val
     * @return XdmValue
     */
    public function createAtomicValue($primitive_type_val) {}

    /**
     * Create an {@link XdmNode} object.
     *
     * @param string $value The $value is a lexical representation of the XML document.
     * @return XdmNode
     */
    public function parseXmlFromString($value) {}

    /**
     * Create an {@link XdmNode} object.
     *
     * @param string $fileName Value is a string type and the file name to the XML document. File name can be relative or absolute. IF relative the cwd is used to resolve the file.
     * @return XdmNode
     */
    public function parseXmlFromFile($fileName) {}

    /**
     * Set the current working directory used to resolve against files
     *
     * @param string $cwd
     * @return void
     */
    public function setcwd($cwd) {}

    /**
     * Set the resources directory of where Saxon can locate data folder
     *
     * @param string $dir
     * @return void
     */
    public function setResourceDirectory($dir) {}

    /**
     * Set a configuration property specific to the processor in use. Properties specified here are common across all the processors.
     *
     * @param string $name
     * @param string $value
     * @return void
     * @link https://saxonica.com/documentation/index.html#!configuration/config-features
     */
    public function setConfigurationProperty($name, $value) {}

    /**
     * Create an {@link XsltProcessor} in the PHP environment. An {@link XsltProcessor} is used to compile and execute XSLT sytlesheets
     *
     * @return XsltProcessor
     */
    public function newXsltProcessor() {}

    /**
     * Create an {@link Xslt30Processor} in the PHP environment. An {@link Xslt30Processor} is used to compile and execute XSLT 3.0 stylesheets, but can also be used for XSLT 2.0 or 1.0 stylesheets. Use an {@link Xslt30Processor} instead of {@link XsltProcessor} for XSLT 3.0 processing.
     *
     * @return Xslt30Processor
     */
    public function newXslt30Processor() {}

    /**
     * Create an {@link XQueryProcessor} in the PHP environment. An {@link XQueryProcessor} is used to compile and execute XQuery queries
     *
     * @return XQueryProcessor
     */
    public function newXQueryProcessor() {}

    /**
     * Create an {@link XPathProcessor} in the PHP environment. An {@link XPathProcessor} is used to compile and execute XPath queries
     *
     * @return XPathProcessor
     */
    public function newXPathProcessor() {}

    /**
     * Create a {@link SchemaValidator} in the PHP environment. A {@link SchemaValidator} provides capabilities to load and cache XML schema definitions. You can also validate source documents with registered XML schema definitions
     *
     * @return SchemaValidator
     */
    public function newSchemaValidator() {}

    /**
     * Report the Java Saxon version
     *
     * @return string
     */
    public function version() {}

    /**
     * Enables the ability to use PHP functions as XSLT functions. Accepts as parameter the full path of the Saxon/C PHP Extension library. This is needed to do the callbacks.
     *
     * @param string $library The full path of the Saxon/C PHP Extension library. This is needed to do the callbacks.
     * @return void
     */
    public function registerPHPFunctions($library) {}
}

/**
 * @link https://www.saxonica.com/saxon-c/documentation/index.html#!api/saxon_c_php_api/saxon_c_php_xsltprocessor
 */
class XsltProcessor
{
    /**
     * Perform a one shot transformation. The result is stored in the supplied outputfile name.
     *
     * @param string $sourceFileName
     * @param string $stylesheetFileName
     * @param string $outputfileName
     * @return void
     */
    public function transformFileToFile($sourceFileName, $stylesheetFileName, $outputfileName) {}

    /**
     * Perform a one shot transformation. The result is returned as a string. If there are failures then a null is returned.
     *
     * @param string $sourceFileName
     * @param string $stylesheetFileName
     * @return string|null
     */
    public function transformFileToString($sourceFileName, $stylesheetFileName) {}

    /**
     * Perform a one shot transformation. The result is returned as an {@link XdmValue}.
     *
     * @param string $fileName
     * @return XdmValue
     */
    public function transformFileToValue($fileName) {}

    /**
     * Perform the transformation based upon cached stylesheet and source document.
     *
     * @return void
     */
    public function transformToFile() {}

    /**
     * @return string
     */
    public function transformToString() {}

    /**
     * Perform the transformation based upon cached stylesheet and any source document. Result returned as an {@link XdmValue} object. If there are failures then a null is returned
     *
     * @return XdmValue|null
     */
    public function transformToValue() {}

    /**
     * Compile a stylesheet supplied by file name
     *
     * @param string $fileName
     * @return void
     */
    public function compileFromFile($fileName) {}

    /**
     * Compile a stylesheet received as a string.
     *
     * @param string $str
     * @return void
     */
    public function compileFromString($str) {}

    /**
     * Compile a stylesheet received as an {@link XdmNode}.
     *
     * @param XdmNode $node
     * @return void
     */
    public function compileFromValue($node) {}

    /**
     * Set the output file name of where the transformation result is sent
     *
     * @param string $fileName
     * @return void
     */
    public function setOutputFile($fileName) {}

    /**
     * The source used for a query or stylesheet. Requires an {@link XdmValue} object
     *
     * @param XdmValue $value
     * @return void
     */
    public function setSourceFromXdmValue($value) {}

    /**
     * The source used for a query or stylesheet. Requires a file name as string
     *
     * @param string $filename
     * @return void
     */
    public function setSourceFromFile($filename) {}

    /**
     * Set the parameters required for XSLT stylesheet
     *
     * @param string $name
     * @param XdmValue $value
     * @return void
     */
    public function setParameter($name, $value) {}

    /**
     * Set properties for the stylesheet.
     *
     * @param string $name
     * @param string $value
     * @return void
     */
    public function setProperty($name, $value) {}

    /**
     * Clear parameter values set
     *
     * @return void
     */
    public function clearParameters() {}

    /**
     * Clear property values set
     *
     * @return void
     */
    public function clearProperties() {}

    /**
     * Clear any exception thrown
     *
     * @return void
     */
    public function exceptionClear() {}

    /**
     * Get the $i'th error code if there are any errors
     *
     * @param int $i
     * @return string
     */
    public function getErrorCode($i) {}

    /**
     * Get the $i'th error message if there are any errors
     *
     * @param int $i
     * @return string
     */
    public function getErrorMessage($i) {}

    /**
     * Get number of error during execution or evaluate of stylesheet
     *
     * @return int
     */
    public function getExceptionCount() {}
}

/**
 * @link https://www.saxonica.com/saxon-c/documentation/index.html#!api/saxon_c_php_api/saxon_c_php_xslt30processor
 */
class Xslt30Processor
{
    /**
     * File names to XSLT packages stored on filestore are added to a set of packages, which will be imported later for use when compiling.
     *
     * @param string[] $packageFileNames
     * @return void
     */
    public function addPackages($packageFileNames) {}

    /**
     * Invoke the most recently compiled stylsheet by applying templates to a supplied input sequence (the initial match selection), saving the results to the file specified in the $fileName argument.
     *
     * @param string|null $stylesheetFileName
     * @param string $fileName
     * @return void
     */
    public function applyTemplatesReturningFile($stylesheetFileName, $fileName) {}

    /**
     * Invoke a stylesheet by applying templates to a supplied input sequence (the initial match selection). The result is returned as a serialized string. The stylesheet file name can be supplied as an argument here. If null then the most recently compiled stylsheet is used.
     *
     * @param string $stylesheetFileName
     * @return string
     */
    public function applyTemplatesReturningString($stylesheetFileName) {}

    /**
     * Invoke a stylesheet by applying templates to a supplied input sequence (the initial match selection). The result is returned as an XdmValue object. The stylesheet file name can be supplied as an argument here. If null then the most recently compiled stylsheet is used.
     *
     * @param string $stylesheetFileName
     * @return XdmValue
     */
    public function applyTemplatesReturningValue($stylesheetFileName) {}

    /**
     * Get the stylesheet associated via the xml-stylesheet processing instruction (@link http://www.w3.org/TR/xml-stylesheet/) in the document specified in the $xmlFileName argument, and that match the given criteria. If there are several suitable xml-stylesheet processing instructions, then the returned source will identify a synthesized stylesheet module that imports all the referenced stylesheet modules.
     *
     * @param string $xmlFileName
     * @return void
     */
    public function compileFromAssociatedFile($xmlFileName) {}

    /**
     * Compile a stylesheet supplied as a file as specified by the $fileName argument.
     *
     * @param string $fileName
     * @return void
     */
    public function compileFromFile($fileName) {}

    /**
     * Compile a stylesheet received as a string.
     *
     * @param string $str
     * @return void
     */
    public function compileFromString($str) {}

    /**
     * Compile a stylesheet received as an {@link XdmValue}.
     *
     * @param XdmValue $node
     * @return string|null
     */
    public function compileFromValue($node) {}

    /**
     * Compile a stylesheet supplied as a file as specified by the $fileName argument, and save as an exported file (SEF).
     *
     * @param string $fileName
     * @param string $outputFileName
     * @return void
     */
    public function compileFromFileAndSave($fileName, $outputFileName) {}

    /**
     * Compile a stylesheet received as a string and save as an exported file (SEF).
     *
     * @param string $str
     * @param string $outputFileName
     * @return void
     */
    public function compileFromStringAndSave($str, $outputFileName) {}

    /**
     * Compile a stylesheet received as an {@link XdmNode} and save as an exported file (SEF).
     *
     * @param XdmNode $node
     * @param string $outputFileName
     * @return void
     */
    public function compileFromValueAndSave($node, $outputFileName) {}

    /**
     * Call a public user-defined function in the stylesheet. Here we wrap the result in an XML document, and send this document to a specified file. The function name is supplied as a string, and the values of the arguments to be supplied to the function are supplied as an array of {@link XdmValue} objects. These will be converted if necessary to the type as defined in the function signature, using the function conversion rules.
     *
     * @param string $functionName
     * @param XdmValue[] $arguments
     * @param string $outputFileName
     * @return void
     */
    public function callFunctionReturningFile($functionName, $arguments, $outputFileName) {}

    /**
     * Call a public user-defined function in the stylesheet. Here we wrap the result in an XML document, and serialize this document to a string value. The function name is supplied as a string, and the values of the arguments to be supplied to the function are supplied as an array of {@link XdmValue} objects. These will be converted if necessary to the type as defined in the function signature, using the function conversion rules.
     *
     * @param string $functionName
     * @param XdmValue[] $arguments
     * @return string
     */
    public function callFunctionReturningString($functionName, $arguments) {}

    /**
     * Call a public user-defined function in the stylesheet. Here we wrap the result in an XML document, and return the document as an {@link XdmValue}. The function name is supplied as a string, and the values of the arguments to be supplied to the function are supplied as an array of {@link XdmValue} objects. These will be converted if necessary to the type as defined in the function signature, using the function conversion rules.
     *
     * @param string $functionName
     * @param XdmValue[] $arguments
     * @return XdmValue
     */
    public function callFunctionReturningValue($functionName, $arguments) {}

    /**
     * Invoke a transformation by calling a named template, saving the results to the file specified in the $outputFileName argument. If the $templateName argument is null then the xsl:initial-template is used. Parameters supplied using setInitialTemplateParameters() are made available to the called template.
     *
     * @param string $stylesheetFileName
     * @param string|null $templateName
     * @param string $outputFileName
     * @return void
     */
    public function callTemplateReturningFile($stylesheetFileName, $templateName, $outputFileName) {}

    /**
     * Invoke a transformation by calling a named template, and return the result as a string. If the $templateName argument is null then the xsl:initial-template is used. Parameters supplied using {@link setInitialTemplateParameters()} are made available to the called template.
     *
     * @param string $stylesheetFileName
     * @param string|null $templateName
     * @return string
     */
    public function callTemplateReturningString($stylesheetFileName, $templateName) {}

    /**
     * Invoke a transformation by calling a named template, and return the result as an {@link XdmValue}. If the $templateName argument is null then the xsl:initial-template is used. Parameters supplied using {@link setInitialTemplateParameters()} are made available to the called template.
     *
     * @param string $stylesheetFileName
     * @param string|null $templateName
     * @return XdmValue
     */
    public function callTemplateReturningValue($stylesheetFileName, $templateName) {}

    /**
     * Perform a one shot transformation, saving the results to the file specified in the $outputFileName argument.
     *
     * @param string $sourceFileName
     * @param string $stylesheetFileName
     * @param string $outputFileName
     * @return void
     */
    public function transformFileToFile($sourceFileName, $stylesheetFileName, $outputFileName) {}

    /**
     * Perform a one shot transformation. The result is returned as an {@link XdmValue}.
     *
     * @param string $fileName
     * @return XdmValue|null
     */
    public function transformFileToValue($fileName) {}

    /**
     * Perform a one shot transformation. The result is returned as a string.
     *
     * @param string $fileName
     * @return string
     */
    public function transformFileToString($fileName) {}

    /**
     * Perform a one shot transformation, saving the results to the file as previously set (e.g. using {@link setOutputFile()}). The global context item may be supplied in the $context argument.
     *
     * @param XdmNode|null $context
     * @return void
     */
    public function transformToFile($context = null) {}

    /**
     * Perform a one shot transformation. The result is returned as a serialized string. The global context item may be supplied in the $context argument.
     *
     * @param XdmNode|null $context
     * @return string
     */
    public function transformToString($context = null) {}

    /**
     * Perform a one shot transformation. The result is returned as an {@link XdmValue} object. If there are failures then a null is returned. The global context item may be supplied in the $context argument.
     *
     * @param XdmNode|null $context
     * @return XdmValue
     */
    public function transformToValue($context = null) {}

    /**
     * Set parameters to be passed to the initial template. These are used whether the transformation is invoked by applying templates to an initial context item, or by invoking a named template. The parameters in question are the xsl:param elements appearing as children of the xsl:template element. The $tunnel argument should be set to true if these values are to be used for setting tunnel parameters.
     *
     * @param array $parameters
     * @param bool $tunnel
     * @return void
     */
    public function setInitialTemplateParameters($parameters, $tunnel) {}

    /**
     * Set the initial value to which templates are to be applied (equivalent to the 'select' attribute of xsl:apply-templates).
     *
     * @param XdmValue $value
     * @return void
     */
    public function setInitialMatchSelection($value) {}

    /**
     * Set the initial value to which templates are to be applied (equivalent to the 'select' attribute of xsl:apply-templates). This initial match selection is supplied as a file as specified by the $fileName argument.
     *
     * @param string $fileName
     * @return void
     */
    public function setInitialMatchSelectionAsFile($fileName) {}

    /**
     * Supply the context item to be used when evaluating global variables and parameters.
     *
     * @param XdmItem $item
     * @return void
     */
    public function setGlobalContextItem($item) {}

    /**
     * Supply the context item to be used when evaluating global variables and parameters, as a file as specified by the $fileName argument.
     *
     * @param string $fileName
     * @return void
     */
    public function setGlobalContextFromFile($fileName) {}

    /**
     * Set the output file to which the transformation result will be sent.
     *
     * @param string $fileName
     * @return void
     */
    public function setOutputFile($fileName) {}

    /**
     * Set the parameters required for the XSLT stylesheet.
     *
     * @param string $name
     * @param XdmValue $value
     * @return void
     */
    public function setParameter($name, $value) {}

    /**
     * Set properties for the XSLT processor.
     *
     * @param string $name
     * @param string $value
     * @return void
     */
    public function setProperty($name, $value) {}

    /**
     * Say whether just-in-time compilation of template rules should be used.
     *
     * @param bool $value
     * @return void
     */
    public function setJustInTimeCompilation($value) {}

    /**
     * Set true if the result of a transformation should be returned as a raw {@link XdmValue} result, rather than as a result tree (an {@link XdmNode} object with a Document node as its root).
     *
     * @param bool $value
     * @return void
     */
    public function setResultAsRawValue($value) {}

    /**
     * Clear parameter values set.
     *
     * @return void
     */
    public function clearParameters() {}

    /**
     * Clear property values set.
     *
     * @return void
     */
    public function clearProperties() {}

    /**
     * Clear any exceptions thrown.
     *
     * @return void
     */
    public function exceptionClear() {}

    /**
     * Get the i'th error code if there are any errors.
     *
     * @param int $i
     * @return string
     */
    public function getErrorCode($i) {}

    /**
     * Get the i'th error message if there are any errors.
     *
     * @param int $i
     * @return string
     */
    public function getErrorMessage($i) {}

    /**
     * Get the number of errors during execution or evaluation of a stylesheet.
     *
     * @return int
     */
    public function getExceptionCount() {}
}

/**
 * @link https://www.saxonica.com/saxon-c/documentation/index.html#!api/saxon_c_php_api/saxon_c_php_xqueryprocessor
 */
class XQueryProcessor
{
    /**
     * Compile and evaluate the query. Result returned as an XdmValue object. If there are failures then a null is returned
     *
     * @return XdmValue|null
     */
    public function runQueryToValue() {}

    /**
     * Compile and evaluate the query. Result returned as string. If there are failures then a null is returned
     *
     * @return string|null
     */
    public function runQueryToString() {}

    /**
     * Compile and evaluate the query. Save the result to file
     *
     * @param string $outfilename
     * @return void
     */
    public function runQueryToFile($outfilename) {}

    /**
     * query supplied as a string
     *
     * @param string $str
     * @return void
     */
    public function setQueryContent($str) {}

    /**
     * @param XdmItem $item
     * @return void
     */
    public function setQueryItem($item) {}

    /**
     * query supplied as a file
     *
     * @param string $filename
     * @return void
     */
    public function setQueryFile($filename) {}

    /**
     * Set the initial context item for the query. Supplied as filename
     *
     * @param string $fileName
     * @return void
     */
    public function setContextItemFromFile($fileName) {}

    /**
     * Set the initial context item for the query.
     * Any one of the objects are accepted: {@link XdmValue}, {@link XdmItem}, {@link XdmNode} and {@link XdmAtomicValue}.
     *
     * @param XdmValue|XdmItem|XdmNode|XdmAtomicValue $obj
     * @return void
     */
    public function setContextItem($obj) {}

    /**
     * Set the static base URI for a query expressions compiled using this XQuery Processor. The base URI is part of the static context, and is used to resolve any relative URIS appearing within a query
     *
     * @param string $uri
     * @return void
     */
    public function setQueryBaseURI($uri) {}

    /**
     * Declare a namespace binding as part of the static context for XPath expressions compiled using this XQuery processor
     *
     * @param string $prefix
     * @param string $namespace
     * @return void
     */
    public function declareNamespace($prefix, $namespace) {}

    /**
     * Set the parameters required for XQuery Processor
     *
     * @param string $name
     * @param XdmValue $value
     * @return void
     */
    public function setParameter($name, $value) {}

    /**
     * Set properties for Query.
     *
     * @param string $name
     * @param string $value
     * @return void
     */
    public function setProperty($name, $value) {}

    /**
     * Clear parameter values set
     *
     * @return void
     */
    public function clearParameters() {}

    /**
     * Clear property values set
     *
     * @return void
     */
    public function clearProperties() {}

    /**
     * Clear any exception thrown
     *
     * @return void
     */
    public function exceptionClear() {}

    /**
     * Get the $i'th error code if there are any errors
     *
     * @param int $i
     * @return string
     */
    public function getErrorCode($i) {}

    /**
     * Get the $i'th error message if there are any errors
     *
     * @param int $i
     * @return string
     */
    public function getErrorMessage($i) {}

    /**
     * Get number of error during execution or evaluate of query
     *
     * @return int
     */
    public function getExceptionCount() {}
}

/**
 * @link https://www.saxonica.com/saxon-c/documentation/index.html#!api/saxon_c_php_api/saxon_c_php_xpathprocessor
 */
class XPathProcessor
{
    /**
     * Set the context item from a {@link XdmItem}
     *
     * @param XdmItem $item
     * @return void
     */
    public function setContextItem($item) {}

    /**
     * Set the context item from file
     *
     * @param string $fileName
     * @return void
     */
    public function setContextFile($fileName) {}

    /**
     * Evaluate the XPath expression, returning the effective boolean value of the result.
     *
     * @param string $xpathStr
     * @return bool
     */
    public function effectiveBooleanValue($xpathStr) {}

    /**
     * Compile and evaluate an XPath expression, supplied as a character string. Result is an {@link XdmValue}
     *
     * @param string $xpathStr
     * @return XdmValue
     */
    public function evaluate($xpathStr) {}

    /**
     * Compile and evaluate an XPath expression whose result is expected to be a single item, with a given context item. The expression is supplied as a character string, and the result returned as an {@link XdmItem}. Return NULL if the expression returns an empty sequence. If the expression returns a sequence of more than one item, any items after the first are ignored.
     *
     * @param string $xpathStr
     * @return XdmItem|null
     */
    public function evaluateSingle($xpathStr) {}

    /**
     * Declare a namespace binding as part of the static context for XPath expressions compiled using this {@link XPathProcessor}
     *
     * @param $prefix
     * @param $namespace
     * @return void
     */
    public function declareNamespace($prefix, $namespace) {}

    /**
     * Set the static base URI for XPath expressions compiled using this XQuery Processor. The base URI is part of the static context, and is used to resolve any relative URIS appearing within a query
     *
     * @param string $uri
     * @return void
     */
    public function setBaseURI($uri) {}

    /**
     * Set the parameters required for XQuery Processor
     *
     * @param string $name
     * @param XdmValue $value
     * @return void
     */
    public function setParameter($name, $value) {}

    /**
     * Set properties for Query.
     *
     * @param string $name
     * @param string $value
     * @return void
     */
    public function setProperty($name, $value) {}

    /**
     * Clear parameter values set
     *
     * @return void
     */
    public function clearParameters() {}

    /**
     * Clear property values set
     *
     * @return void
     */
    public function clearProperties() {}

    /**
     * Clear any exception thrown
     *
     * @return void
     */
    public function exceptionClear() {}

    /**
     * Get the $i'th error code if there are any errors
     *
     * @param int $i
     * @return string
     */
    public function getErrorCode($i) {}

    /**
     * Get the $i'th error message if there are any errors
     *
     * @param int $i
     * @return string
     */
    public function getErrorMessage($i) {}

    /**
     * Get number of error during execution or evaluate of stylesheet and query, respectively
     *
     * @return int
     */
    public function getExceptionCount() {}
}

/**
 * @link https://www.saxonica.com/saxon-c/documentation/index.html#!api/saxon_c_php_api/saxon_c_php_schemavalidator
 */
class SchemaValidator
{
    /**
     * The instance document to be validated. Supplied as an Xdm Node
     *
     * @param XdmNode $node
     * @return void
     */
    public function setSourceNode($node) {}

    /**
     * The instance document to be validated. Supplied file name is resolved and accessed
     *
     * @param string $fileName
     * @return void
     */
    public function setOutputFile($fileName) {}

    /**
     * Register the Schema which is given as file name.
     *
     * @param string $fileName
     * @return void
     */
    public function registerSchemaFromFile($fileName) {}

    /**
     * Register the Schema which is given as a string representation.
     *
     * @param string $schemaStr
     * @return void
     */
    public function registerSchemaFromString($schemaStr) {}

    /**
     * Validate an instance document supplied as a Source object. Assume source document has already been supplied through accessor methods
     *
     * @param string|null $filename The name of the file to be validated. $filename can be null, in that case it is assumed source document has already been supplied through accessor methods
     * @return void
     */
    public function validate($filename = null) {}

    /**
     * Validate an instance document supplied as a Source object with the validated document returned to the calling program.
     *
     * @param string|null $filename The name of the file to be validated. $filename can be null, in that case it is assumed source document has already been supplied through accessor methods
     * @return XdmNode
     */
    public function validateToNode($filename = null) {}

    /**
     * Get the validation report produced after validating the source document. The reporting feature is switched on via setting the property on the {@link SchemaValidator): $validator->setProperty('report', 'true').
     *
     * @return XdmNode
     */
    public function getValidationReport() {}

    /**
     * Set the parameters required for XQuery Processor
     *
     * @param string $name
     * @param XdmValue $value
     * @return void
     */
    public function setParameter($name, $value) {}

    /**
     * Set properties for Schema Validator.
     *
     * @param string $name
     * @param string $value
     * @return void
     */
    public function setProperty($name, $value) {}

    /**
     * Clear parameter values set
     *
     * @return void
     */
    public function clearParameters() {}

    /**
     * Clear property values set
     *
     * @return void
     */
    public function clearProperties() {}

    /**
     * Clear any exception thrown
     *
     * @return void
     */
    public function exceptionClear() {}

    /**
     * Get the $i'th error code if there are any errors
     *
     * @param int $i
     * @return string
     */
    public function getErrorCode($i) {}

    /**
     * Get the $i'th error message if there are any errors
     *
     * @param int $i
     * @return string
     */
    public function getErrorMessage($i) {}

    /**
     * Get number of error during execution of the validator
     *
     * @return int
     */
    public function getExceptionCount() {}
}

/**
 * @link https://www.saxonica.com/saxon-c/documentation/index.html#!api/saxon_c_php_api/saxon_c_php_xdmvalue
 */
class XdmValue
{
    /**
     * Get the first item in the sequence
     *
     * @return XdmItem
     */
    public function getHead() {}

    /**
     * Get the n'th item in the value, counting from zero
     *
     * @param int $index
     * @return XdmItem
     */
    public function itemAt($index) {}

    /**
     * Get the number of items in the sequence
     *
     * @return int
     */
    public function size() {}

    /**
     * Add item to the sequence at the end.
     *
     * @param XdmItem $item
     */
    public function addXdmItem($item) {}
}

/**
 * @link https://www.saxonica.com/saxon-c/documentation/index.html#!api/saxon_c_php_api/saxon_c_php_xdmitem
 */
class XdmItem extends XdmValue
{
    /**
     * Get the string value of the item. For a node, this gets the string value of the node. For an atomic value, it has the same effect as casting the value to a string. In all cases the result is the same as applying the XPath string() function.
     *
     * @return string
     */
    public function getStringValue() {}

    /**
     * Determine whether the item is a node value or not.
     *
     * @return bool
     */
    public function isNode() {}

    /**
     * Determine whether the item is an atomic value or not.
     *
     * @return bool
     */
    public function isAtomic() {}

    /**
     * Provided the item is an atomic value we return the {@link XdmAtomicValue} otherwise return null
     *
     * @return XdmAtomicValue|null
     */
    public function getAtomicValue() {}

    /**
     * Provided the item is a node value we return the {@link XdmNode} otherwise return null
     *
     * @return XdmNode|null
     */
    public function getNodeValue() {}
}

/**
 * @link https://www.saxonica.com/saxon-c/documentation/index.html#!api/saxon_c_php_api/saxon_c_php_xdmnode
 */
class XdmNode extends XdmItem
{
    /**
     * Get the string value of the item. For a node, this gets the string value of the node.
     *
     * @return string
     */
    public function getStringValue() {}

    /**
     * Get the kind of node
     *
     * @return int
     */
    public function getNodeKind() {}

    /**
     * Get the name of the node, as a EQName
     *
     * @return string
     */
    public function getNodeName() {}

    /**
     * Determine whether the item is an atomic value or a node. This method will return FALSE as the item is not atomic
     *
     * @return false
     */
    public function isAtomic() {}

    /**
     * Get the count of child node at this current node
     *
     * @return int
     */
    public function getChildCount() {}

    /**
     * Get the count of attribute nodes at this node
     *
     * @return int
     */
    public function getAttributeCount() {}

    /**
     * Get the n'th child node at this node. If the child node selected does not exist then return null
     *
     * @param int $index
     * @return XdmNode|null
     */
    public function getChildNode($index) {}

    /**
     * Get the parent of this node. If parent node does not exist then return null
     *
     * @return XdmNode|null
     */
    public function getParent() {}

    /**
     * Get the n'th attribute node at this node. If the attribute node selected does not exist then return null
     *
     * @param int $index
     * @return XdmNode|null
     */
    public function getAttributeNode($index) {}

    /**
     * Get the n'th attribute node value at this node. If the attribute node selected does not exist then return null
     *
     * @param int $index
     * @return string|null
     */
    public function getAttributeValue($index) {}
}

/**
 * @link https://www.saxonica.com/saxon-c/documentation/index.html#!api/saxon_c_php_api/saxon_c_php_xdmatomicvalue
 */
class XdmAtomicValue extends XdmItem
{
    /**
     * Get the string value of the item. For an atomic value, it has the same effect as casting the value to a string. In all cases the result is the same as applying the XPath string() function.
     *
     * @return string
     */
    public function getStringValue() {}

    /**
     * Get the value converted to a boolean using the XPath casting rules
     *
     * @return bool
     */
    public function getBooleanValue() {}

    /**
     * Get the value converted to a float using the XPath casting rules. If the value is a string, the XSD 1.1 rules are used, which means that the string "+INF" is recognised
     *
     * @return float
     */
    public function getDoubleValue() {}

    /**
     * Get the value converted to an integer using the XPath casting rules
     *
     * @return int
     */
    public function getLongValue() {}

    /**
     * Determine whether the item is an atomic value or a node. Return TRUE if the item is an atomic value
     *
     * @return true
     */
    public function isAtomic() {}
}
<?php

// Start of xmlrpc v.0.51

/**
 * Generates XML for a PHP value
 * @link https://php.net/manual/en/function.xmlrpc-encode.php
 * @param mixed $value
 * @return string
 */
function xmlrpc_encode($value) {}

/**
 * Decodes XML into native PHP types
 * @link https://php.net/manual/en/function.xmlrpc-decode.php
 * @param string $xml <p>
 * XML response returned by XMLRPC method.
 * </p>
 * @param string $encoding [optional] <p>
 * Input encoding supported by iconv.
 * </p>
 * @return mixed either an array, or an integer, or a string, or a boolean according
 * to the response returned by the XMLRPC method.
 */
function xmlrpc_decode($xml, $encoding = "iso-8859-1") {}

/**
 * Decodes XML into native PHP types
 * @link https://php.net/manual/en/function.xmlrpc-decode-request.php
 * @param string $xml
 * @param string &$method
 * @param string $encoding [optional]
 * @return mixed
 */
function xmlrpc_decode_request($xml, &$method, $encoding = null) {}

/**
 * Generates XML for a method request
 * @link https://php.net/manual/en/function.xmlrpc-encode-request.php
 * @param string $method <p>
 * Name of the method to call.
 * </p>
 * @param mixed $params <p>
 * Method parameters compatible with method signature.
 * </p>
 * @param null|array $output_options [optional] <p>
 * Array specifying output options may contain (default values are
 * emphasised):
 * output_type: php, xml</p>
 * @return string a string containing the XML representation of the request.
 */
function xmlrpc_encode_request($method, $params, ?array $output_options = null) {}

/**
 * Gets xmlrpc type for a PHP value
 * @link https://php.net/manual/en/function.xmlrpc-get-type.php
 * @param mixed $value <p>
 * PHP value
 * </p>
 * @return string the XML-RPC type.
 */
function xmlrpc_get_type($value) {}

/**
 * Sets xmlrpc type, base64 or datetime, for a PHP string value
 * @link https://php.net/manual/en/function.xmlrpc-set-type.php
 * @param string &$value <p>
 * Value to set the type
 * </p>
 * @param string $type <p>
 * 'base64' or 'datetime'
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * If successful, <i>value</i> is converted to an object.
 */
function xmlrpc_set_type(&$value, $type) {}

/**
 * Determines if an array value represents an XMLRPC fault
 * @link https://php.net/manual/en/function.xmlrpc-is-fault.php
 * @param array $arg <p>
 * Array returned by <b>xmlrpc_decode</b>.
 * </p>
 * @return bool <b>TRUE</b> if the argument means fault, <b>FALSE</b> otherwise. Fault
 * description is available in $arg["faultString"], fault
 * code is in $arg["faultCode"].
 */
function xmlrpc_is_fault(array $arg) {}

/**
 * Creates an xmlrpc server
 * @link https://php.net/manual/en/function.xmlrpc-server-create.php
 * @return resource
 */
function xmlrpc_server_create() {}

/**
 * Destroys server resources
 * @link https://php.net/manual/en/function.xmlrpc-server-destroy.php
 * @param resource $server
 * @return int
 */
function xmlrpc_server_destroy($server) {}

/**
 * Register a PHP function to resource method matching method_name
 * @link https://php.net/manual/en/function.xmlrpc-server-register-method.php
 * @param resource $server
 * @param string $method_name
 * @param callable $function
 * @return bool
 */
function xmlrpc_server_register_method($server, $method_name, $function) {}

/**
 * Parses XML requests and call methods
 * @link https://php.net/manual/en/function.xmlrpc-server-call-method.php
 * @param resource $server
 * @param string $xml
 * @param mixed $user_data
 * @param null|array $output_options [optional]
 * @return string
 */
function xmlrpc_server_call_method($server, $xml, $user_data, ?array $output_options = null) {}

/**
 * Decodes XML into a list of method descriptions
 * @link https://php.net/manual/en/function.xmlrpc-parse-method-descriptions.php
 * @param string $xml
 * @return array
 */
function xmlrpc_parse_method_descriptions($xml) {}

/**
 * Adds introspection documentation
 * @link https://php.net/manual/en/function.xmlrpc-server-add-introspection-data.php
 * @param resource $server
 * @param array $desc
 * @return int
 */
function xmlrpc_server_add_introspection_data($server, array $desc) {}

/**
 * Register a PHP function to generate documentation
 * @link https://php.net/manual/en/function.xmlrpc-server-register-introspection-callback.php
 * @param resource $server
 * @param string $function
 * @return bool
 */
function xmlrpc_server_register_introspection_callback($server, $function) {}

// End of xmlrpc v.0.51
<?php

// Start of standard v.5.3.2-0.dotdeb.1

use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\ExpectedValues;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;

class __PHP_Incomplete_Class
{
    /**
     * @var string
     */
    public $__PHP_Incomplete_Class_Name;
}

class php_user_filter
{
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $filtername;

    #[LanguageLevelTypeAware(['8.1' => 'mixed'], default: '')]
    public $params;
    public $stream;

    /**
     * @link https://php.net/manual/en/php-user-filter.filter.php
     * @param resource $in <p> is a resource pointing to a <i>bucket brigade</i< which contains one or more <i>bucket</i> objects containing data to be filtered.</p>
     * @param resource $out <p>is a resource pointing to a second bucket brigade into which your modified buckets should be placed.</p>
     * @param int &$consumed <p>which must <i>always</i> be declared by reference, should be incremented by the length of the data which your filter reads in and alters. In most cases this means you will increment consumed by <i>$bucket->datalen</i> for each <i>$bucket</i>.</p>
     * @param bool $closing <p>If the stream is in the process of closing (and therefore this is the last pass through the filterchain), the closing parameter will be set to <b>TRUE</b>
     * @return int <p>
     * The <b>filter()</b> method must return one of
     * three values upon completion.
     * </p><table>
     *
     * <thead>
     * <tr>
     * <th>Return Value</th>
     * <th>Meaning</th>
     * </tr>
     *
     * </thead>
     *
     * <tbody class="tbody">
     * <tr>
     * <td><b>PSFS_PASS_ON</b></td>
     * <td>
     * Filter processed successfully with data available in the
     * <code class="parameter">out</code> <em>bucket brigade</em>.
     * </td>
     * </tr>
     *
     * <tr>
     * <td><b>PSFS_FEED_ME</b></td>
     * <td>
     * Filter processed successfully, however no data was available to
     * return. More data is required from the stream or prior filter.
     * </td>
     * </tr>
     *
     * <tr>
     * <td><b>PSFS_ERR_FATAL</b> (default)</td>
     * <td>
     * The filter experienced an unrecoverable error and cannot continue.
     * </td>
     * </tr>
     */
    #[TentativeType]
    public function filter(
        $in,
        $out,
        &$consumed,
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $closing
    ): int {}

    /**
     * @link https://php.net/manual/en/php-user-filter.oncreate.php
     * @return bool
     */
    #[TentativeType]
    public function onCreate(): bool {}

    /**
     * @link https://php.net/manual/en/php-user-filter.onclose.php
     */
    #[TentativeType]
    public function onClose(): void {}
}

/**
 * Instances of Directory are created by calling the dir() function, not by the new operator.
 */
class Directory
{
    /**
     * @var string The directory that was opened.
     */
    #[PhpStormStubsElementAvailable(to: '8.0')]
    public $path;

    /**
     * @var string The directory that was opened.
     */
    #[PhpStormStubsElementAvailable(from: '8.1')]
    public readonly string $path;

    /**
     * @var resource Can be used with other directory functions such as {@see readdir()}, {@see rewinddir()} and {@see closedir()}.
     */
    #[PhpStormStubsElementAvailable(to: '8.0')]
    public $handle;

    /**
     * @var resource Can be used with other directory functions such as {@see readdir()}, {@see rewinddir()} and {@see closedir()}.
     */
    #[PhpStormStubsElementAvailable(from: '8.1')]
    public readonly mixed $handle;

    /**
     * Close directory handle.
     * Same as closedir(), only dir_handle defaults to $this.
     * @param resource $dir_handle [optional]
     * @link https://secure.php.net/manual/en/directory.close.php
     */
    #[TentativeType]
    public function close(#[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $dir_handle = null): void {}

    /**
     * Rewind directory handle.
     * Same as rewinddir(), only dir_handle defaults to $this.
     * @param resource $dir_handle [optional]
     * @link https://secure.php.net/manual/en/directory.rewind.php
     */
    #[TentativeType]
    public function rewind(#[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $dir_handle = null): void {}

    /**
     * Read entry from directory handle.
     * Same as readdir(), only dir_handle defaults to $this.
     * @param resource $dir_handle [optional]
     * @return string|false
     * @link https://secure.php.net/manual/en/directory.read.php
     */
    #[TentativeType]
    public function read(#[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $dir_handle = null): string|false {}
}

/**
 * Returns the value of a constant
 * @link https://php.net/manual/en/function.constant.php
 * @param string $name <p>
 * The constant name.
 * </p>
 * @return mixed the value of the constant, or null if the constant is not
 * defined.
 */
#[Pure(true)]
function constant(string $name): mixed {}

/**
 * Convert binary data into hexadecimal representation
 * @link https://php.net/manual/en/function.bin2hex.php
 * @param string $string <p>
 * A string.
 * </p>
 * @return string the hexadecimal representation of the given string.
 */
#[Pure]
function bin2hex(string $string): string {}

/**
 * Delay execution
 * @link https://php.net/manual/en/function.sleep.php
 * @param int<0,max> $seconds <p>
 * Halt time in seconds.
 * </p>
 * @return int|false zero on success, or false on errors. If the call was interrupted
 * by a signal, sleep returns the number of seconds left
 * to sleep.
 */
#[LanguageLevelTypeAware(["8.0" => "int"], default: "int|false")]
function sleep(int $seconds) {}

/**
 * Delay execution in microseconds
 * @link https://php.net/manual/en/function.usleep.php
 * @param int<0,max> $microseconds <p>
 * Halt time in micro seconds. A micro second is one millionth of a
 * second.
 * </p>
 * @return void
 */
function usleep(int $microseconds): void {}

/**
 * Delay for a number of seconds and nanoseconds
 * @link https://php.net/manual/en/function.time-nanosleep.php
 * @param positive-int $seconds <p>
 * Must be a positive integer.
 * </p>
 * @param positive-int $nanoseconds <p>
 * Must be a positive integer less than 1 billion.
 * </p>
 * @return bool|array true on success or false on failure.
 * <p>
 * If the delay was interrupted by a signal, an associative array will be
 * returned with the components:
 * seconds - number of seconds remaining in
 * the delay
 * nanoseconds - number of nanoseconds
 * remaining in the delay
 * </p>
 */
#[ArrayShape(["seconds" => "int", "nanoseconds" => "int"])]
function time_nanosleep(int $seconds, int $nanoseconds): array|bool {}

/**
 * Make the script sleep until the specified time
 * @link https://php.net/manual/en/function.time-sleep-until.php
 * @param float $timestamp <p>
 * The timestamp when the script should wake.
 * </p>
 * @return bool true on success or false on failure.
 */
function time_sleep_until(float $timestamp): bool {}

/**
 * Parse a time/date generated with <function>strftime</function>
 * @link https://php.net/manual/en/function.strptime.php
 * @param string $timestamp <p>
 * The string to parse (e.g. returned from strftime)
 * </p>
 * @param string $format <p>
 * The format used in date (e.g. the same as
 * used in strftime).
 * </p>
 * <p>
 * For more information about the format options, read the
 * strftime page.
 * </p>
 * @return array|false an array or false on failure.
 * <p>
 * <table>
 * The following parameters are returned in the array
 * <tr valign="top">
 * <td>parameters</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>"tm_sec"</td>
 * <td>Seconds after the minute (0-61)</td>
 * </tr>
 * <tr valign="top">
 * <td>"tm_min"</td>
 * <td>Minutes after the hour (0-59)</td>
 * </tr>
 * <tr valign="top">
 * <td>"tm_hour"</td>
 * <td>Hour since midnight (0-23)</td>
 * </tr>
 * <tr valign="top">
 * <td>"tm_mday"</td>
 * <td>Day of the month (1-31)</td>
 * </tr>
 * <tr valign="top">
 * <td>"tm_mon"</td>
 * <td>Months since January (0-11)</td>
 * </tr>
 * <tr valign="top">
 * <td>"tm_year"</td>
 * <td>Years since 1900</td>
 * </tr>
 * <tr valign="top">
 * <td>"tm_wday"</td>
 * <td>Days since Sunday (0-6)</td>
 * </tr>
 * <tr valign="top">
 * <td>"tm_yday"</td>
 * <td>Days since January 1 (0-365)</td>
 * </tr>
 * <tr valign="top">
 * <td>"unparsed"</td>
 * <td>the date part which was not
 * recognized using the specified format</td>
 * </tr>
 * </table>
 * </p>
 * @deprecated 8.1
 */
#[Pure(true)]
#[Deprecated(since: '8.1')]
#[ArrayShape([
    'tm_sec' => 'int',
    'tm_min' => 'int',
    'tm_hour' => 'int',
    'tm_mday' => 'int',
    'tm_mon' => 'int',
    'tm_year' => 'int',
    'tm_wday' => 'int',
    'tm_yday' => 'int',
    'unparsed' => 'string'
])]
function strptime(string $timestamp, string $format): array|false {}

/**
 * Flush system output buffer
 * @link https://php.net/manual/en/function.flush.php
 * @return void
 */
function flush(): void {}

/**
 * Wraps a string to a given number of characters
 * @link https://php.net/manual/en/function.wordwrap.php
 * @param string $string <p>
 * The input string.
 * </p>
 * @param int $width [optional] <p>
 * The number of characters at which the string will be wrapped.
 * </p>
 * @param string $break [optional] <p>
 * The line is broken using the optional
 * break parameter.
 * </p>
 * @param bool $cut_long_words [optional] <p>
 * If the cut is set to true, the string is
 * always wrapped at or before the specified width. So if you have
 * a word that is larger than the given width, it is broken apart.
 * (See second example).
 * </p>
 * @return string the given string wrapped at the specified length.
 */
#[Pure]
function wordwrap(string $string, int $width = 75, string $break = "\n", bool $cut_long_words = false): string {}

/**
 * Convert special characters to HTML entities
 * @link https://php.net/manual/en/function.htmlspecialchars.php
 * @param string $string <p>
 * The {@link https://secure.php.net/manual/en/language.types.string.php string} being converted.
 * </p>
 * @param int $flags [optional] <p>
 * A bitmask of one or more of the following flags, which specify how to handle quotes,
 * invalid code unit sequences and the used document type. The default is
 * <em><b>ENT_COMPAT | ENT_HTML401</b></em>.
 * </p><table>
 * <caption><b>Available <em>flags</em> constants</b></caption>
 * <thead>
 * <tr>
 * <th>Constant Name</th>
 * <th>Description</th>
 * </tr>
 *
 * </thead>
 *
 * <tbody>
 * <tr>
 * <td><b>ENT_COMPAT</b></td>
 * <td>Will convert double-quotes and leave single-quotes alone.</td>
 * </tr>
 *
 * <tr>
 * <td><b>ENT_QUOTES</b></td>
 * <td>Will convert both double and single quotes.</td>
 * </tr>
 *
 * <tr>
 * <td><b>ENT_NOQUOTES</b></td>
 * <td>Will leave both double and single quotes unconverted.</td>
 * </tr>
 *
 * <tr>
 * <td><b>ENT_IGNORE</b></td>
 * <td>
 * Silently discard invalid code unit sequences instead of returning
 * an empty string. Using this flag is discouraged as it
 * {@link https://unicode.org/reports/tr36/#Deletion_of_Noncharacters »&nbsp;may have security implications}.
 * </td>
 * </tr>
 *
 * <tr>
 * <td><b>ENT_SUBSTITUTE</b></td>
 * <td>
 * Replace invalid code unit sequences with a Unicode Replacement Character
 * U+FFFD (UTF-8) or &amp;#FFFD; (otherwise) instead of returning an empty string.
 * </td>
 * </tr>
 *
 * <tr>
 * <td><b>ENT_DISALLOWED</b></td>
 * <td>
 * Replace invalid code points for the given document type with a
 * Unicode Replacement Character U+FFFD (UTF-8) or &amp;#FFFD;
 * (otherwise) instead of leaving them as is. This may be useful, for
 * instance, to ensure the well-formedness of XML documents with
 * embedded external content.
 * </td>
 * </tr>
 *
 * <tr>
 * <td><b>ENT_HTML401</b></td>
 * <td>
 * Handle code as HTML 4.01.
 * </td>
 * </tr>
 *
 * <tr>
 * <td><b>ENT_XML1</b></td>
 * <td>
 * Handle code as XML 1.
 * </td>
 * </tr>
 *
 * <tr>
 * <td><b>ENT_XHTML</b></td>
 * <td>
 * Handle code as XHTML.
 * </td>
 * </tr>
 *
 * <tr>
 * <td><b>ENT_HTML5</b></td>
 * <td>
 * Handle code as HTML 5.
 * </td>
 * </tr>
 *
 * </tbody>
 *
 * </table>
 * @param string|null $encoding <p>
 * Defines encoding used in conversion.
 * If omitted, the default value for this argument is ISO-8859-1 in
 * versions of PHP prior to 5.4.0, and UTF-8 from PHP 5.4.0 onwards.
 * </p>
 * <p>
 * For the purposes of this function, the encodings
 * <em>ISO-8859-1</em>, <em>ISO-8859-15</em>,
 * <em>UTF-8</em>, <em>cp866</em>,
 * <em>cp1251</em>, <em>cp1252</em>, and
 * <em>KOI8-R</em> are effectively equivalent, provided the
 * <em><b>string</b></em> itself is valid for the encoding, as
 * the characters affected by  <b>htmlspecialchars()</b> occupy
 * the same positions in all of these encodings.
 * </p>
 * @param bool $double_encode [optional] <p>
 * When <em><b>double_encode</b></em> is turned off PHP will not
 * encode existing html entities, the default is to convert everything.
 * </p>
 * @return string The converted string.
 */
#[Pure]
function htmlspecialchars(string $string, int $flags = ENT_QUOTES|ENT_SUBSTITUTE, ?string $encoding = null, bool $double_encode = true): string {}

/**
 * Convert all applicable characters to HTML entities
 * @link https://php.net/manual/en/function.htmlentities.php
 * @param string $string <p>
 * The input string.
 * </p>
 * @param int $flags [optional] <p>
 * Like htmlspecialchars, the optional second
 * quote_style parameter lets you define what will
 * be done with 'single' and "double" quotes. It takes on one of three
 * constants with the default being ENT_COMPAT:
 * <table>
 * Available quote_style constants
 * <tr valign="top">
 * <td>Constant Name</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>ENT_COMPAT</td>
 * <td>Will convert double-quotes and leave single-quotes alone.</td>
 * </tr>
 * <tr valign="top">
 * <td>ENT_QUOTES</td>
 * <td>Will convert both double and single quotes.</td>
 * </tr>
 * <tr valign="top">
 * <td>ENT_NOQUOTES</td>
 * <td>Will leave both double and single quotes unconverted.</td>
 * </tr>
 * </table>
 * </p>
 * @param string|null $encoding [optional] <p>
 * Like htmlspecialchars, it takes an optional
 * third argument charset which defines character
 * set used in conversion.
 * Presently, the ISO-8859-1 character set is used as the default.
 * </p>
 * @param bool $double_encode [optional] <p>
 * When double_encode is turned off PHP will not
 * encode existing html entities. The default is to convert everything.
 * </p>
 * @return string the encoded string.
 */
#[Pure]
function htmlentities(string $string, int $flags = ENT_QUOTES|ENT_SUBSTITUTE, ?string $encoding, bool $double_encode = true): string {}

/**
 * Convert HTML entities  to their corresponding characters
 * @link https://php.net/manual/en/function.html-entity-decode.php
 * @param string $string <p>
 * The input string.
 * </p>
 * @param int $flags [optional] <p>
 * The optional second quote_style parameter lets
 * you define what will be done with 'single' and "double" quotes. It takes
 * on one of three constants with the default being
 * ENT_COMPAT:
 * <table>
 * Available quote_style constants
 * <tr valign="top">
 * <td>Constant Name</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>ENT_COMPAT</td>
 * <td>Will convert double-quotes and leave single-quotes alone.</td>
 * </tr>
 * <tr valign="top">
 * <td>ENT_QUOTES</td>
 * <td>Will convert both double and single quotes.</td>
 * </tr>
 * <tr valign="top">
 * <td>ENT_NOQUOTES</td>
 * <td>Will leave both double and single quotes unconverted.</td>
 * </tr>
 * </table>
 * </p>
 * @param string|null $encoding [optional] <p>
 * The ISO-8859-1 character set is used as default for the optional third
 * charset. This defines the character set used in
 * conversion.
 * </p>
 * @return string the decoded string.
 */
#[Pure]
function html_entity_decode(string $string, int $flags = ENT_QUOTES|ENT_SUBSTITUTE, ?string $encoding): string {}

/**
 * Convert special HTML entities back to characters
 * @link https://php.net/manual/en/function.htmlspecialchars-decode.php
 * @param string $string <p>
 * The string to decode
 * </p>
 * @param int $flags [optional] <p>
 * The quote style. One of the following constants:
 * <table>
 * quote_style constants
 * <tr valign="top">
 * <td>Constant Name</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>ENT_COMPAT</td>
 * <td>Will convert double-quotes and leave single-quotes alone
 * (default)</td>
 * </tr>
 * <tr valign="top">
 * <td>ENT_QUOTES</td>
 * <td>Will convert both double and single quotes</td>
 * </tr>
 * <tr valign="top">
 * <td>ENT_NOQUOTES</td>
 * <td>Will leave both double and single quotes unconverted</td>
 * </tr>
 * </table>
 * </p>
 * @return string the decoded string.
 */
#[Pure]
function htmlspecialchars_decode(string $string, int $flags = ENT_QUOTES|ENT_SUBSTITUTE): string {}

/**
 * Returns the translation table used by <function>htmlspecialchars</function> and <function>htmlentities</function>
 * @link https://php.net/manual/en/function.get-html-translation-table.php
 * @param int $table <p>
 * There are two new constants (HTML_ENTITIES,
 * HTML_SPECIALCHARS) that allow you to specify the
 * table you want.
 * </p>
 * @param int $flags [optional] <p>
 * Like the htmlspecialchars and
 * htmlentities functions you can optionally specify
 * the quote_style you are working with.
 * See the description
 * of these modes in htmlspecialchars.
 * </p>
 * @param string $encoding [optional] <p>
 * Encoding to use.
 * If omitted, the default value for this argument is ISO-8859-1 in
 * versions of PHP prior to 5.4.0, and UTF-8 from PHP 5.4.0 onwards.
 * </p>
 *
 *
 * <p>
 * The following character sets are supported:
 * </p><table class="doctable table">
 * <caption><strong>Supported charsets</strong></caption>
 *
 * <thead>
 * <tr>
 * <th>Charset</th>
 * <th>Aliases</th>
 * <th>Description</th>
 * </tr>
 *
 * </thead>
 *
 * <tbody class="tbody">
 * <tr>
 * <td>ISO-8859-1</td>
 * <td>ISO8859-1</td>
 * <td>
 * Western European, Latin-1.
 * </td>
 * </tr>
 *
 * <tr>
 * <td>ISO-8859-5</td>
 * <td>ISO8859-5</td>
 * <td>
 * Little used cyrillic charset (Latin/Cyrillic).
 * </td>
 * </tr>
 *
 * <tr>
 * <td>ISO-8859-15</td>
 * <td>ISO8859-15</td>
 * <td>
 * Western European, Latin-9. Adds the Euro sign, French and Finnish
 * letters missing in Latin-1 (ISO-8859-1).
 * </td>
 * </tr>
 *
 * <tr>
 * <td>UTF-8</td>
 * <td class="empty">&nbsp;</td>
 * <td>
 * ASCII compatible multi-byte 8-bit Unicode.
 * </td>
 * </tr>
 *
 * <tr>
 * <td>cp866</td>
 * <td>ibm866, 866</td>
 * <td>
 * DOS-specific Cyrillic charset.
 * </td>
 * </tr>
 *
 * <tr>
 * <td>cp1251</td>
 * <td>Windows-1251, win-1251, 1251</td>
 * <td>
 * Windows-specific Cyrillic charset.
 * </td>
 * </tr>
 *
 * <tr>
 * <td>cp1252</td>
 * <td>Windows-1252, 1252</td>
 * <td>
 * Windows specific charset for Western European.
 * </td>
 * </tr>
 *
 * <tr>
 * <td>KOI8-R</td>
 * <td>koi8-ru, koi8r</td>
 * <td>
 * Russian.
 * </td>
 * </tr>
 *
 * <tr>
 * <td>BIG5</td>
 * <td>950</td>
 * <td>
 * Traditional Chinese, mainly used in Taiwan.
 * </td>
 * </tr>
 *
 * <tr>
 * <td>GB2312</td>
 * <td>936</td>
 * <td>
 * Simplified Chinese, national standard character set.
 * </td>
 * </tr>
 *
 * <tr>
 * <td>BIG5-HKSCS</td>
 * <td class="empty">&nbsp;</td>
 * <td>
 * Big5 with Hong Kong extensions, Traditional Chinese.
 * </td>
 * </tr>
 *
 * <tr>
 * <td>Shift_JIS</td>
 * <td>SJIS, SJIS-win, cp932, 932</td>
 * <td>
 * Japanese
 * </td>
 * </tr>
 *
 * <tr>
 * <td>EUC-JP</td>
 * <td>EUCJP, eucJP-win</td>
 * <td>
 * Japanese
 * </td>
 * </tr>
 *
 * <tr>
 * <td>MacRoman</td>
 * <td class="empty">&nbsp;</td>
 * <td>
 * Charset that was used by Mac OS.
 * </td>
 * </tr>
 *
 * <tr>
 * <td><em>''</em></td>
 * <td class="empty">&nbsp;</td>
 * <td>
 * An empty string activates detection from script encoding (Zend multibyte),
 * {@link https://php.net/manual/en/ini.core.php#ini.default-charset default_charset} and current
 * locale {@link https://php.net/manual/en/function.nl-langinfo.php nl_langinfo()} and
 * {@link https://php.net/manual/en/function.setlocale.php setlocale()}), in this order. Not recommended.
 * </td>
 * </tr>
 *
 * </tbody>
 *
 * </table>
 *
 * <blockquote><p><strong>Note</strong>:
 *
 * Any other character sets are not recognized. The default encoding will be
 * used instead and a warning will be emitted.
 *
 * </p></blockquote>
 * @return array the translation table as an array.
 */
#[Pure]
function get_html_translation_table(
    int $table = 0,
    int $flags = ENT_QUOTES|ENT_SUBSTITUTE,
    #[PhpStormStubsElementAvailable(from: '7.0')] string $encoding = "UTF-8"
): array {}

/**
 * Calculate the sha1 hash of a string
 * @link https://php.net/manual/en/function.sha1.php
 * @param string $string <p>
 * The input string.
 * </p>
 * @param bool $binary [optional] <p>
 * If the optional binary is set to true,
 * then the sha1 digest is instead returned in raw binary format with a
 * length of 20, otherwise the returned value is a 40-character
 * hexadecimal number.
 * </p>
 * @return string the sha1 hash as a string.
 */
#[Pure]
function sha1(string $string, bool $binary = false): string {}

/**
 * Calculate the sha1 hash of a file
 * @link https://php.net/manual/en/function.sha1-file.php
 * @param string $filename <p>
 * The filename
 * </p>
 * @param bool $binary [optional] <p>
 * When true, returns the digest in raw binary format with a length of
 * 20.
 * </p>
 * @return string|false a string on success, false otherwise.
 */
#[Pure(true)]
function sha1_file(string $filename, bool $binary = false): string|false {}

/**
 * Calculate the md5 hash of a string
 * @link https://php.net/manual/en/function.md5.php
 * @param string $string <p>
 * The string.
 * </p>
 * @param bool $binary [optional] <p>
 * If the optional raw_output is set to true,
 * then the md5 digest is instead returned in raw binary format with a
 * length of 16.
 * </p>
 * @return string the hash as a 32-character hexadecimal number.
 */
#[Pure]
function md5(string $string, bool $binary = false): string {}

/**
 * Calculates the md5 hash of a given file
 * @link https://php.net/manual/en/function.md5-file.php
 * @param string $filename <p>
 * The filename
 * </p>
 * @param bool $binary [optional] <p>
 * When true, returns the digest in raw binary format with a length of
 * 16.
 * </p>
 * @return string|false a string on success, false otherwise.
 */
#[Pure(true)]
function md5_file(string $filename, bool $binary = false): string|false {}

/**
 * Calculates the crc32 polynomial of a string
 * @link https://php.net/manual/en/function.crc32.php
 * @param string $string <p>
 * The data.
 * </p>
 * @return int the crc32 checksum of str as an integer..1
 */
#[Pure]
function crc32(string $string): int {}

/**
 * Parse a binary IPTC block into single tags.
 * Note: This function does not require the GD image library.
 * @link https://php.net/manual/en/function.iptcparse.php
 * @param string $iptc_block <p>
 * A binary IPTC block.
 * </p>
 * @return array|false an array using the tagmarker as an index and the value as the
 * value. It returns false on error or if no IPTC data was found.
 */
#[Pure]
function iptcparse(string $iptc_block): array|false {}

/**
 * Embeds binary IPTC data into a JPEG image.
 * Note: This function does not require the GD image library.
 * @link https://php.net/manual/en/function.iptcembed.php
 * @param string $iptc_data <p>
 * The data to be written.
 * </p>
 * @param string $filename <p>
 * Path to the JPEG image.
 * </p>
 * @param int $spool <p>
 * Spool flag. If the spool flag is less than 2 then the JPEG will
 * be returned as a string. Otherwise the JPEG will be printed to
 * STDOUT.
 * </p>
 * @return string|bool If spool is less than 2, the JPEG will be returned, or false on
 * failure. Otherwise returns true on success or false on failure.
 */
function iptcembed(string $iptc_data, string $filename, int $spool = 0): string|bool {}

/**
 * Get the size of an image
 * @link https://php.net/manual/en/function.getimagesize.php
 * @param string $filename <p>
 * This parameter specifies the file you wish to retrieve information
 * about. It can reference a local file or (configuration permitting) a
 * remote file using one of the supported streams.
 * </p>
 * @param array &$image_info [optional] <p>
 * This optional parameter allows you to extract some extended
 * information from the image file. Currently, this will return the
 * different JPG APP markers as an associative array.
 * Some programs use these APP markers to embed text information in
 * images. A very common one is to embed
 * IPTC information in the APP13 marker.
 * You can use the iptcparse function to parse the
 * binary APP13 marker into something readable.
 * </p>
 * @return array|false an array with 7 elements.
 * <p>
 * Index 0 and 1 contains respectively the width and the height of the image.
 * </p>
 * <p>
 * Some formats may contain no image or may contain multiple images. In these
 * cases, getimagesize might not be able to properly
 * determine the image size. getimagesize will return
 * zero for width and height in these cases.
 * </p>
 * <p>
 * Index 2 is one of the IMAGETYPE_XXX constants indicating
 * the type of the image.
 * </p>
 * <p>
 * Index 3 is a text string with the correct
 * height="yyy" width="xxx" string that can be used
 * directly in an IMG tag.
 * </p>
 * <p>
 * mime is the correspondant MIME type of the image.
 * This information can be used to deliver images with correct the HTTP
 * Content-type header:
 * getimagesize and MIME types
 * </p>
 * <p>
 * channels will be 3 for RGB pictures and 4 for CMYK
 * pictures.
 * </p>
 * <p>
 * bits is the number of bits for each color.
 * </p>
 * <p>
 * For some image types, the presence of channels and
 * bits values can be a bit
 * confusing. As an example, GIF always uses 3 channels
 * per pixel, but the number of bits per pixel cannot be calculated for an
 * animated GIF with a global color table.
 * </p>
 * <p>
 * On failure, false is returned.
 * </p>
 */
#[ArrayShape([0 => "int", 1 => "int", 2 => "int", 3 => "string", "bits" => "int", "channels" => "int", "mime" => "string"])]
function getimagesize(string $filename, &$image_info): array|false {}

/**
 * Get Mime-Type for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype
 * @link https://php.net/manual/en/function.image-type-to-mime-type.php
 * @param int $image_type <p>
 * One of the IMAGETYPE_XXX constants.
 * </p>
 * @return string The returned values are as follows
 * <table>
 * Returned values Constants
 * <tr valign="top">
 * <td>imagetype</td>
 * <td>Returned value</td>
 * </tr>
 * <tr valign="top">
 * <td>IMAGETYPE_GIF</td>
 * <td>image/gif</td>
 * </tr>
 * <tr valign="top">
 * <td>IMAGETYPE_JPEG</td>
 * <td>image/jpeg</td>
 * </tr>
 * <tr valign="top">
 * <td>IMAGETYPE_PNG</td>
 * <td>image/png</td>
 * </tr>
 * <tr valign="top">
 * <td>IMAGETYPE_SWF</td>
 * <td>application/x-shockwave-flash</td>
 * </tr>
 * <tr valign="top">
 * <td>IMAGETYPE_PSD</td>
 * <td>image/psd</td>
 * </tr>
 * <tr valign="top">
 * <td>IMAGETYPE_BMP</td>
 * <td>image/bmp</td>
 * </tr>
 * <tr valign="top">
 * <td>IMAGETYPE_TIFF_II (intel byte order)</td>
 * <td>image/tiff</td>
 * </tr>
 * <tr valign="top">
 * <td>
 * IMAGETYPE_TIFF_MM (motorola byte order)
 * </td>
 * <td>image/tiff</td>
 * </tr>
 * <tr valign="top">
 * <td>IMAGETYPE_JPC</td>
 * <td>application/octet-stream</td>
 * </tr>
 * <tr valign="top">
 * <td>IMAGETYPE_JP2</td>
 * <td>image/jp2</td>
 * </tr>
 * <tr valign="top">
 * <td>IMAGETYPE_JPX</td>
 * <td>application/octet-stream</td>
 * </tr>
 * <tr valign="top">
 * <td>IMAGETYPE_JB2</td>
 * <td>application/octet-stream</td>
 * </tr>
 * <tr valign="top">
 * <td>IMAGETYPE_SWC</td>
 * <td>application/x-shockwave-flash</td>
 * </tr>
 * <tr valign="top">
 * <td>IMAGETYPE_IFF</td>
 * <td>image/iff</td>
 * </tr>
 * <tr valign="top">
 * <td>IMAGETYPE_WBMP</td>
 * <td>image/vnd.wap.wbmp</td>
 * </tr>
 * <tr valign="top">
 * <td>IMAGETYPE_XBM</td>
 * <td>image/xbm</td>
 * </tr>
 * <tr valign="top">
 * <td>IMAGETYPE_ICO</td>
 * <td>image/vnd.microsoft.icon</td>
 * </tr>
 * </table>
 */
#[Pure]
function image_type_to_mime_type(int $image_type): string {}

/**
 * Get file extension for image type
 * @link https://php.net/manual/en/function.image-type-to-extension.php
 * @param int $image_type <p>
 * One of the IMAGETYPE_XXX constant.
 * </p>
 * @param bool $include_dot [optional] <p>
 * Removed since 8.0.
 * Whether to prepend a dot to the extension or not. Default to true.
 * </p>
 * @return string|false A string with the extension corresponding to the given image type, or false on failure.
 */
#[Pure]
function image_type_to_extension(int $image_type, bool $include_dot = true): string|false {}

/**
 * Outputs information about PHP's configuration
 * @link https://php.net/manual/en/function.phpinfo.php
 * @param int $flags [optional] <p>
 * The output may be customized by passing one or more of the
 * following constants bitwise values summed
 * together in the optional what parameter.
 * One can also combine the respective constants or bitwise values
 * together with the or operator.
 * </p>
 * <p>
 * <table>
 * phpinfo options
 * <tr valign="top">
 * <td>Name (constant)</td>
 * <td>Value</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>INFO_GENERAL</td>
 * <td>1</td>
 * <td>
 * The configuration line, "php.ini" location, build date, Web
 * Server, System and more.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>INFO_CREDITS</td>
 * <td>2</td>
 * <td>
 * PHP Credits. See also phpcredits.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>INFO_CONFIGURATION</td>
 * <td>4</td>
 * <td>
 * Current Local and Main values for PHP directives. See
 * also ini_get.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>INFO_MODULES</td>
 * <td>8</td>
 * <td>
 * Loaded modules and their respective settings. See also
 * get_loaded_extensions.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>INFO_ENVIRONMENT</td>
 * <td>16</td>
 * <td>
 * Environment Variable information that's also available in
 * $_ENV.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>INFO_VARIABLES</td>
 * <td>32</td>
 * <td>
 * Shows all
 * predefined variables from EGPCS (Environment, GET,
 * POST, Cookie, Server).
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>INFO_LICENSE</td>
 * <td>64</td>
 * <td>
 * PHP License information. See also the license FAQ.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>INFO_ALL</td>
 * <td>-1</td>
 * <td>
 * Shows all of the above.
 * </td>
 * </tr>
 * </table>
 * </p>
 * @return bool true on success or false on failure.
 */
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
function phpinfo(#[ExpectedValues(flags: [INFO_GENERAL, INFO_CREDITS, INFO_CONFIGURATION, INFO_MODULES, INFO_ENVIRONMENT, INFO_VARIABLES, INFO_LICENSE, INFO_ALL])] int $flags = INFO_ALL): bool {}

/**
 * Gets the current PHP version
 * @link https://php.net/manual/en/function.phpversion.php
 * @param string|null $extension [optional] <p>
 * An optional extension name.
 * </p>
 * @return string|false If the optional extension parameter is
 * specified, phpversion returns the version of that
 * extension, or false if there is no version information associated or
 * the extension isn't enabled.
 */
#[Pure]
function phpversion(?string $extension): string|false {}

/**
 * Prints out the credits for PHP
 * @link https://php.net/manual/en/function.phpcredits.php
 * @param int $flags [optional] <p>
 * To generate a custom credits page, you may want to use the
 * flags parameter.
 * </p>
 * <p>
 * <table>
 * Pre-defined phpcredits flags
 * <tr valign="top">
 * <td>name</td>
 * <td>description</td>
 * </tr>
 * <tr valign="top">
 * <td>CREDITS_ALL</td>
 * <td>
 * All the credits, equivalent to using: CREDITS_DOCS +
 * CREDITS_GENERAL + CREDITS_GROUP +
 * CREDITS_MODULES + CREDITS_FULLPAGE.
 * It generates a complete stand-alone HTML page with the appropriate tags.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>CREDITS_DOCS</td>
 * <td>The credits for the documentation team</td>
 * </tr>
 * <tr valign="top">
 * <td>CREDITS_FULLPAGE</td>
 * <td>
 * Usually used in combination with the other flags. Indicates
 * that a complete stand-alone HTML page needs to be
 * printed including the information indicated by the other
 * flags.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>CREDITS_GENERAL</td>
 * <td>
 * General credits: Language design and concept, PHP 4.0
 * authors and SAPI module.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>CREDITS_GROUP</td>
 * <td>A list of the core developers</td>
 * </tr>
 * <tr valign="top">
 * <td>CREDITS_MODULES</td>
 * <td>
 * A list of the extension modules for PHP, and their authors
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>CREDITS_SAPI</td>
 * <td>
 * A list of the server API modules for PHP, and their authors
 * </td>
 * </tr>
 * </table>
 * </p>
 * @return bool true on success or false on failure.
 */
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
function phpcredits(int $flags = CREDITS_ALL): bool {}

/**
 * Gets the logo guid
 * @removed 5.5
 * @link https://php.net/manual/en/function.php-logo-guid.php
 * @return string PHPE9568F34-D428-11d2-A769-00AA001ACF42.
 */
#[Pure]
function php_logo_guid(): string {}

/**
 * @removed 5.5
 */
function php_real_logo_guid() {}

/**
 * @removed 5.5
 */
function php_egg_logo_guid() {}

/**
 * Gets the Zend guid
 * @removed 5.5
 * @link https://php.net/manual/en/function.zend-logo-guid.php
 * @return string PHPE9568F35-D428-11d2-A769-00AA001ACF42.
 */
function zend_logo_guid(): string {}

/**
 * Returns the type of interface between web server and PHP
 * @link https://php.net/manual/en/function.php-sapi-name.php
 * @return string|false the interface type, as a lowercase string, or false on failure.
 * <p>
 * Although not exhaustive, the possible return values include
 * aolserver, apache,
 * apache2filter, apache2handler,
 * caudium, cgi (until PHP 5.3),
 * cgi-fcgi, cli,
 * continuity, embed,
 * isapi, litespeed,
 * milter, nsapi,
 * phttpd, pi3web, roxen,
 * thttpd, tux, and webjames.
 * </p>
 */
#[Pure]
#[ExpectedValues(['cli', 'phpdbg', 'embed', 'apache', 'apache2handler', 'cgi-fcgi', 'cli-server', 'fpm-fcgi', 'litespeed'])]
function php_sapi_name(): string|false {}

/**
 * Returns information about the operating system PHP is running on
 * @link https://php.net/manual/en/function.php-uname.php
 * @param string $mode [optional] <p>
 * mode is a single character that defines what
 * information is returned:
 * 'a': This is the default. Contains all modes in
 * the sequence "s n r v m".</p>
 * @return string the description, as a string.
 */
#[Pure(true)]
function php_uname(#[PhpStormStubsElementAvailable(from: '7.0')] string $mode = 'a'): string {}

/**
 * Return a list of .ini files parsed from the additional ini dir
 * @link https://php.net/manual/en/function.php-ini-scanned-files.php
 * @return string|false a comma-separated string of .ini files on success. Each comma is
 * followed by a newline. If the directive --with-config-file-scan-dir wasn't set,
 * false is returned. If it was set and the directory was empty, an
 * empty string is returned. If a file is unrecognizable, the file will
 * still make it into the returned string but a PHP error will also result.
 * This PHP error will be seen both at compile time and while using
 * php_ini_scanned_files.
 */
#[Pure]
function php_ini_scanned_files(): string|false {}

/**
 * Retrieve a path to the loaded php.ini file
 * @link https://php.net/manual/en/function.php-ini-loaded-file.php
 * @return string|false The loaded "php.ini" path, or false if one is not loaded.
 * @since 5.2.4
 */
#[Pure]
function php_ini_loaded_file(): string|false {}

/**
 * String comparisons using a "natural order" algorithm
 * @link https://php.net/manual/en/function.strnatcmp.php
 * @param string $string1 <p>
 * The first string.
 * </p>
 * @param string $string2 <p>
 * The second string.
 * </p>
 * @return int Similar to other string comparison functions, this one returns &lt; 0 if
 * str1 is less than str2; &gt;
 * 0 if str1 is greater than
 * str2, and 0 if they are equal.
 */
#[Pure]
function strnatcmp(string $string1, string $string2): int {}

/**
 * Case insensitive string comparisons using a "natural order" algorithm
 * @link https://php.net/manual/en/function.strnatcasecmp.php
 * @param string $string1 <p>
 * The first string.
 * </p>
 * @param string $string2 <p>
 * The second string.
 * </p>
 * @return int Similar to other string comparison functions, this one returns &lt; 0 if
 * str1 is less than str2 &gt;
 * 0 if str1 is greater than
 * str2, and 0 if they are equal.
 */
#[Pure]
function strnatcasecmp(string $string1, string $string2): int {}

/**
 * Count the number of substring occurrences
 * @link https://php.net/manual/en/function.substr-count.php
 * @param string $haystack <p>
 * The string to search in
 * </p>
 * @param string $needle <p>
 * The substring to search for
 * </p>
 * @param int $offset <p>
 * The offset where to start counting. If the offset is negative,
 * counting starts from the end of the string.
 * </p>
 * @param int|null $length [optional] <p>
 * The maximum length after the specified offset to search for the
 * substring. It outputs a warning if the offset plus the length is
 * greater than the haystack length. A negative length counts from
 * the end of haystack.
 * </p>
 * @return int<0,max> This functions returns an integer.
 */
#[Pure]
function substr_count(string $haystack, string $needle, int $offset = 0, ?int $length): int {}

/**
 * Finds the length of the initial segment of a string consisting
 * entirely of characters contained within a given mask.
 * @link https://php.net/manual/en/function.strspn.php
 * @param string $string <p>
 * The string to examine.
 * </p>
 * @param string $characters <p>
 * The list of allowable characters to include in counted segments.
 * </p>
 * @param int $offset <p>
 * The position in subject to
 * start searching.
 * </p>
 * <p>
 * If start is given and is non-negative,
 * then strspn will begin
 * examining subject at
 * the start'th position. For instance, in
 * the string 'abcdef', the character at
 * position 0 is 'a', the
 * character at position 2 is
 * 'c', and so forth.
 * </p>
 * <p>
 * If start is given and is negative,
 * then strspn will begin
 * examining subject at
 * the start'th position from the end
 * of subject.
 * </p>
 * @param int|null $length [optional] <p>
 * The length of the segment from subject
 * to examine.
 * </p>
 * <p>
 * If length is given and is non-negative,
 * then subject will be examined
 * for length characters after the starting
 * position.
 * </p>
 * <p>
 * If lengthis given and is negative,
 * then subject will be examined from the
 * starting position up to length
 * characters from the end of subject.
 * </p>
 * @return int the length of the initial segment of str1
 * which consists entirely of characters in str2.
 */
#[Pure]
function strspn(string $string, string $characters, int $offset = 0, ?int $length): int {}

/**
 * Find length of initial segment not matching mask
 * @link https://php.net/manual/en/function.strcspn.php
 * @param string $string <p>
 * The first string.
 * </p>
 * @param string $characters <p>
 * The second string.
 * </p>
 * @param int $offset <p>
 * The start position of the string to examine.
 * </p>
 * @param int|null $length [optional] <p>
 * The length of the string to examine.
 * </p>
 * @return int the length of the segment as an integer.
 */
#[Pure]
function strcspn(string $string, string $characters, int $offset = 0, ?int $length): int {}

/**
 * Tokenize string
 * Note that only the first call to strtok uses the string argument.
 * Every subsequent call to strtok only needs the token to use, as it keeps track of where it is in the current string.
 * To start over, or to tokenize a new string you simply call strtok with the string argument again to initialize it.
 * Note that you may put multiple tokens in the token parameter.
 * The string will be tokenized when any one of the characters in the argument are found.
 * @link https://php.net/manual/en/function.strtok.php
 * @param string $string <p>
 * The string being split up into smaller strings (tokens).
 * </p>
 * @param string|null $token <p>
 * The delimiter used when splitting up str.
 * </p>
 * @return string|false A string token.
 */
function strtok(
    string $string,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.0')] $token,
    #[PhpStormStubsElementAvailable(from: '7.1')] ?string $token = null
): string|false {}
<?php

use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\ExpectedValues;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Pure;

/**
 * Generate a system log message
 * @link https://php.net/manual/en/function.syslog.php
 * @param int $priority <p>
 * priority is a combination of the facility and
 * the level. Possible values are:
 * <table>
 * syslog Priorities (in descending order)
 * <tr valign="top">
 * <td>Constant</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>LOG_EMERG</td>
 * <td>system is unusable</td>
 * </tr>
 * <tr valign="top">
 * <td>LOG_ALERT</td>
 * <td>action must be taken immediately</td>
 * </tr>
 * <tr valign="top">
 * <td>LOG_CRIT</td>
 * <td>critical conditions</td>
 * </tr>
 * <tr valign="top">
 * <td>LOG_ERR</td>
 * <td>error conditions</td>
 * </tr>
 * <tr valign="top">
 * <td>LOG_WARNING</td>
 * <td>warning conditions</td>
 * </tr>
 * <tr valign="top">
 * <td>LOG_NOTICE</td>
 * <td>normal, but significant, condition</td>
 * </tr>
 * <tr valign="top">
 * <td>LOG_INFO</td>
 * <td>informational message</td>
 * </tr>
 * <tr valign="top">
 * <td>LOG_DEBUG</td>
 * <td>debug-level message</td>
 * </tr>
 * </table>
 * </p>
 * @param string $message <p>
 * The message to send, except that the two characters
 * %m will be replaced by the error message string
 * (strerror) corresponding to the present value of
 * errno.
 * </p>
 * @return bool true on success or false on failure.
 */
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
function syslog(int $priority, string $message): bool {}

/**
 * Close connection to system logger
 * @link https://php.net/manual/en/function.closelog.php
 * @return bool true on success or false on failure.
 */
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
function closelog(): bool {}

/**
 * Registers a function that will be called when PHP starts sending output.
 * The callback is executed just after PHP prepares all headers to be sent,<br>
 * and before any other output is sent, creating a window to manipulate the outgoing headers before being sent.
 * @link https://secure.php.net/manual/en/function.header-register-callback.php
 * @param callable $callback Function called just before the headers are sent.
 * @return bool true on success or false on failure.
 */
function header_register_callback(callable $callback): bool {}

/**
 * Get the size of an image from a string.
 * @param string $string The image data, as a string.
 * @param array &$image_info [optional] This optional parameter allows you to extract<br>
 * some extended information from the image file. Currently, this will <br>
 * return the different JPG APP markers as an associative array. <br>
 * Some programs use these APP markers to embed text information in images. <br>
 * A very common one is to embed » IPTC information in the APP13 marker. <br>
 * You can use the iptcparse() function to parse the binary APP13 marker into something readable.
 * @return array|false Returns an array with 7 elements.<br>
 * Index 0 and 1 contains respectively the width and the height of the image.<br>
 * Index 2 is one of the <b>IMAGETYPE_XXX</b> constants indicating the type of the image.<br>
 * Index 3 is a text string with the correct <b>height="yyy" width="xxx"</b> string<br>
 * that can be used directly in an IMG tag.<br>
 * On failure, FALSE is returned.
 * @link https://secure.php.net/manual/en/function.getimagesizefromstring.php
 * @since 5.4
 * @link https://secure.php.net/manual/en/function.getimagesizefromstring.php
 * @since 5.4
 */
#[ArrayShape([0 => 'int', 1 => 'int', 2 => 'int', 3 => 'string', 'bits' => 'int', 'channels' => 'int', 'mime' => 'string'])]
function getimagesizefromstring(string $string, &$image_info): array|false {}

/**
 * Set the stream chunk size.
 * @param resource $stream The target stream.
 * @param int $size The desired new chunk size.
 * @return int|false Returns the previous chunk size on success.<br>
 * Will return <b>FALSE</b> if chunk_size is less than 1 or greater than <b>PHP_INT_MAX</b>.
 * @link https://secure.php.net/manual/en/function.stream-set-chunk-size.php
 * @since 5.4
 */
#[LanguageLevelTypeAware(["8.0" => "int"], default: "int|false")]
function stream_set_chunk_size($stream, int $size) {}

/**
 * Initializes all syslog related variables
 * @link https://php.net/manual/en/function.define-syslog-variables.php
 * @return void
 * @removed 5.4
 */
#[Deprecated(since: '5.3')]
function define_syslog_variables() {}

/**
 * Calculate the metaphone key of a string
 * @link https://php.net/manual/en/function.metaphone.php
 * @param string $string <p>
 * The input string.
 * </p>
 * @param int $max_phonemes [optional] <p>
 * This parameter restricts the returned metaphone key to phonemes characters in length.
 * The default value of 0 means no restriction.
 * </p>
 * @return string|false the metaphone key as a string, or FALSE on failure
 */
#[Pure]
#[LanguageLevelTypeAware(["8.0" => "string"], default: "string|false")]
function metaphone(string $string, int $max_phonemes = 0): false|string {}

/**
 * Turn on output buffering
 * @link https://php.net/manual/en/function.ob-start.php
 * @param callable $callback [optional] <p>
 * An optional output_callback function may be
 * specified. This function takes a string as a parameter and should
 * return a string. The function will be called when
 * the output buffer is flushed (sent) or cleaned (with
 * ob_flush, ob_clean or similar
 * function) or when the output buffer
 * is flushed to the browser at the end of the request. When
 * output_callback is called, it will receive the
 * contents of the output buffer as its parameter and is expected to
 * return a new output buffer as a result, which will be sent to the
 * browser. If the output_callback is not a
 * callable function, this function will return false.
 * </p>
 * <p>
 * If the callback function has two parameters, the second parameter is
 * filled with a bit-field consisting of
 * PHP_OUTPUT_HANDLER_START,
 * PHP_OUTPUT_HANDLER_CONT and
 * PHP_OUTPUT_HANDLER_END.
 * </p>
 * <p>
 * If output_callback returns false original
 * input is sent to the browser.
 * </p>
 * <p>
 * The output_callback parameter may be bypassed
 * by passing a null value.
 * </p>
 * <p>
 * ob_end_clean, ob_end_flush,
 * ob_clean, ob_flush and
 * ob_start may not be called from a callback
 * function. If you call them from callback function, the behavior is
 * undefined. If you would like to delete the contents of a buffer,
 * return "" (a null string) from callback function.
 * You can't even call functions using the output buffering functions like
 * print_r($expression, true) or
 * highlight_file($filename, true) from a callback
 * function.
 * </p>
 * <p>
 * In PHP 4.0.4, ob_gzhandler was introduced to
 * facilitate sending gz-encoded data to web browsers that support
 * compressed web pages. ob_gzhandler determines
 * what type of content encoding the browser will accept and will return
 * its output accordingly.
 * </p>
 * @param int $chunk_size <p>
 * If the optional parameter chunk_size is passed, the
 * buffer will be flushed after any output call which causes the buffer's
 * length to equal or exceed chunk_size.
 * Default value 0 means that the function is called only in the end,
 * other special value 1 sets chunk_size to 4096.
 * </p>
 * @param int $flags [optional] <p>
 * The flags parameter is a bitmask that controls the operations that can be performed on the output buffer.
 * The default is to allow output buffers to be cleaned, flushed and removed, which can be set explicitly via
 * PHP_OUTPUT_HANDLER_CLEANABLE | PHP_OUTPUT_HANDLER_FLUSHABLE | PHP_OUTPUT_HANDLER_REMOVABLE, or PHP_OUTPUT_HANDLER_STDFLAGS as shorthand.
 * </p>
 * @return bool true on success or false on failure.
 */
function ob_start($callback, int $chunk_size = 0, int $flags = PHP_OUTPUT_HANDLER_STDFLAGS): bool {}

/**
 * Flush (send) the output buffer
 * @link https://php.net/manual/en/function.ob-flush.php
 * @return bool
 */
function ob_flush(): bool {}

/**
 * Clean (erase) the output buffer
 * @link https://php.net/manual/en/function.ob-clean.php
 * @return bool
 */
function ob_clean(): bool {}

/**
 * Flush (send) the output buffer and turn off output buffering
 * @link https://php.net/manual/en/function.ob-end-flush.php
 * @return bool true on success or false on failure. Reasons for failure are first that you called the
 * function without an active buffer or that for some reason a buffer could
 * not be deleted (possible for special buffer).
 */
function ob_end_flush(): bool {}

/**
 * Clean (erase) the output buffer and turn off output buffering
 * @link https://php.net/manual/en/function.ob-end-clean.php
 * @return bool true on success or false on failure. Reasons for failure are first that you called the
 * function without an active buffer or that for some reason a buffer could
 * not be deleted (possible for special buffer).
 */
function ob_end_clean(): bool {}

/**
 * Flush the output buffer, return it as a string and turn off output buffering
 * @link https://php.net/manual/en/function.ob-get-flush.php
 * @return string|false the output buffer or false if no buffering is active.
 */
function ob_get_flush(): string|false {}

/**
 * Get current buffer contents and delete current output buffer
 * @link https://php.net/manual/en/function.ob-get-clean.php
 * @return string|false the contents of the output buffer and end output buffering.
 * If output buffering isn't active then false is returned.
 */
function ob_get_clean(): string|false {}

/**
 * Return the length of the output buffer
 * @link https://php.net/manual/en/function.ob-get-length.php
 * @return int|false the length of the output buffer contents or false if no
 * buffering is active.
 */
function ob_get_length(): int|false {}

/**
 * Return the nesting level of the output buffering mechanism
 * @link https://php.net/manual/en/function.ob-get-level.php
 * @return int the level of nested output buffering handlers or zero if output
 * buffering is not active.
 */
function ob_get_level(): int {}

/**
 * Get status of output buffers
 * @link https://php.net/manual/en/function.ob-get-status.php
 * @param bool $full_status [optional] <p>
 * true to return all active output buffer levels. If false or not
 * set, only the top level output buffer is returned.
 * </p>
 * @return array If called without the full_status parameter
 * or with full_status = false a simple array
 * with the following elements is returned:
 * <pre>
 * Array
 * (
 *     [level] => 2
 *     [type] => 0
 *     [status] => 0
 *     [name] => URL-Rewriter
 *     [del] => 1
 * )
 * </pre>
 * <table>
 * <tr><th>Key</th><th>Value</th></tr>
 * <tr><td>level</td><td>Output nesting level</td></tr>
 * <tr><td>type</td><td><em>PHP_OUTPUT_HANDLER_INTERNAL (0)</em> or <em>PHP_OUTPUT_HANDLER_USER (1)</em></td></tr>
 * <tr><td>status</td><td>One of <em>PHP_OUTPUT_HANDLER_START</em> (0), <em>PHP_OUTPUT_HANDLER_CONT</em> (1) or <em>PHP_OUTPUT_HANDLER_END</em> (2)</td></tr>
 * <tr><td>name</td><td>Name of active output handler or &#039; default output handler&#039; if none is set</td></tr>
 * <tr><td>del</td><td>Erase-flag as set by ob_start()</td></tr>
 * </table>
 * <p>
 * If called with full_status = TRUE an array with one element for each active output buffer
 * level is returned. The output level is used as key of the top level array and each array
 * element itself is another array holding status information on one active output level.
 * </p>
 * <pre>
 * Array
 * (
 *     [0] => Array
 *         (
 *             [chunk_size] => 0
 *             [size] => 40960
 *             [block_size] => 10240
 *             [type] => 1
 *             [status] => 0
 *             [name] => default output handler
 *             [del] => 1
 *         )
 *
 *     [1] => Array
 *         (
 *             [chunk_size] => 0
 *             [size] => 40960
 *             [block_size] => 10240
 *             [type] => 0
 *             [buffer_size] => 0
 *             [status] => 0
 *             [name] => URL-Rewriter
 *             [del] => 1
 *         )
 *
 * )
 * </pre>
 * <p> The full output contains these additional elements:</p>
 * <table>
 * <tr><th>Key</th><th>Value</th></tr>
 * <tr><td>chunk_size</td><td>Chunk size as set by ob_start()</td></tr>
 * <tr><td>size</td><td>...</td></tr>
 * <tr><td>blocksize</td><td>...</td></tr>
 * </table>
 */
#[ArrayShape([
    "level" => "int",
    "type" => "int",
    "flags" => "int",
    "name" => "string",
    "del" => "int",
    "chunk_size" => "int",
    "buffer_size" => "int",
    "buffer_used" => "int",
])]
function ob_get_status(bool $full_status = false): array {}

/**
 * Return the contents of the output buffer
 * @link https://php.net/manual/en/function.ob-get-contents.php
 * @return string|false This will return the contents of the output buffer or false, if output
 * buffering isn't active.
 */
#[Pure(true)]
function ob_get_contents(): string|false {}

/**
 * Turn implicit flush on/off
 * @link https://php.net/manual/en/function.ob-implicit-flush.php
 * @param int|bool $enable [optional] <p>
 * 1|<b>TRUE</b> to turn implicit flushing on, 0|<b>FALSE</b> turns it off.
 * <br><br>default: 1|<b>TRUE</b>
 * </p>
 * @return void
 */
function ob_implicit_flush(#[LanguageLevelTypeAware(["8.0" => "bool"], default: "int")] $enable = true): void {}

/**
 * List all output handlers in use
 * @link https://php.net/manual/en/function.ob-list-handlers.php
 * @return array This will return an array with the output handlers in use (if any). If
 * output_buffering is enabled or
 * an anonymous function was used with ob_start,
 * ob_list_handlers will return "default output
 * handler".
 */
function ob_list_handlers(): array {}

/**
 * Sort an array by key
 * @link https://php.net/manual/en/function.ksort.php
 * @param array &$array <p>
 * The input array.
 * </p>
 * @param int $flags <p>
 * You may modify the behavior of the sort using the optional
 * parameter sort_flags, for details
 * see sort.
 * </p>
 * @return bool true on success or false on failure.
 */
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
function ksort(array &$array, int $flags = SORT_REGULAR): bool {}

/**
 * Sort an array by key in reverse order
 * @link https://php.net/manual/en/function.krsort.php
 * @param array &$array <p>
 * The input array.
 * </p>
 * @param int $flags <p>
 * You may modify the behavior of the sort using the optional parameter
 * sort_flags, for details see
 * sort.
 * </p>
 * @return bool true on success or false on failure.
 */
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
function krsort(array &$array, int $flags = SORT_REGULAR): bool {}

/**
 * Sort an array using a "natural order" algorithm
 * @link https://php.net/manual/en/function.natsort.php
 * @param array &$array <p>
 * The input array.
 * </p>
 * @return bool true on success or false on failure.
 */
function natsort(array &$array): bool {}

/**
 * Sort an array using a case insensitive "natural order" algorithm
 * @link https://php.net/manual/en/function.natcasesort.php
 * @param array &$array <p>
 * The input array.
 * </p>
 * @return bool true on success or false on failure.
 */
function natcasesort(array &$array): bool {}

/**
 * Sort an array and maintain index association
 * @link https://php.net/manual/en/function.asort.php
 * @param array &$array <p>
 * The input array.
 * </p>
 * @param int $flags <p>
 * You may modify the behavior of the sort using the optional
 * parameter sort_flags, for details
 * see sort.
 * </p>
 * @return bool true on success or false on failure.
 */
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
function asort(array &$array, int $flags = SORT_REGULAR): bool {}

/**
 * Sort an array in reverse order and maintain index association
 * @link https://php.net/manual/en/function.arsort.php
 * @param array &$array <p>
 * The input array.
 * </p>
 * @param int $flags <p>
 * You may modify the behavior of the sort using the optional parameter
 * sort_flags, for details see
 * sort.
 * </p>
 * @return bool true on success or false on failure.
 */
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
function arsort(array &$array, int $flags = SORT_REGULAR): bool {}

/**
 * Sort an array
 * @link https://php.net/manual/en/function.sort.php
 * @param array &$array <p>
 * The input array.
 * </p>
 * @param int $flags <p>
 * The optional second parameter sort_flags
 * may be used to modify the sorting behavior using these values.
 * </p>
 * <p>
 * Sorting type flags:<br>
 * SORT_REGULAR - compare items normally
 * (don't change types)</p>
 * @return bool true on success or false on failure.
 */
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
function sort(array &$array, int $flags = SORT_REGULAR): bool {}

/**
 * Sort an array in reverse order
 * @link https://php.net/manual/en/function.rsort.php
 * @param array &$array <p>
 * The input array.
 * </p>
 * @param int $flags <p>
 * You may modify the behavior of the sort using the optional
 * parameter sort_flags, for details see
 * sort.
 * </p>
 * @return bool true on success or false on failure.
 */
function rsort(array &$array, int $flags = SORT_REGULAR): bool {}

/**
 * Sort an array by values using a user-defined comparison function
 * @link https://php.net/manual/en/function.usort.php
 * @param array &$array <p>
 * The input array.
 * </p>
 * @param callable $callback <p>
 * The comparison function must return an integer less than, equal to, or
 * greater than zero if the first argument is considered to be
 * respectively less than, equal to, or greater than the second.
 * </p>
 * @return bool true on success or false on failure.
 */
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
function usort(array &$array, callable $callback): bool {}

/**
 * Sort an array with a user-defined comparison function and maintain index association
 * @link https://php.net/manual/en/function.uasort.php
 * @param array &$array <p>
 * The input array.
 * </p>
 * @param callable $callback <p>
 * See usort and uksort for
 * examples of user-defined comparison functions.
 * </p>
 * @return bool true on success or false on failure.
 */
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
function uasort(array &$array, callable $callback): bool {}

/**
 * Sort an array by keys using a user-defined comparison function
 * @link https://php.net/manual/en/function.uksort.php
 * @param array &$array <p>
 * The input array.
 * </p>
 * @param callable $callback <p>
 * The callback comparison function.
 * </p>
 * <p>
 * Function cmp_function should accept two
 * parameters which will be filled by pairs of array keys.
 * The comparison function must return an integer less than, equal
 * to, or greater than zero if the first argument is considered to
 * be respectively less than, equal to, or greater than the
 * second.
 * </p>
 * @return bool true on success or false on failure.
 */
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
function uksort(array &$array, callable $callback): bool {}

/**
 * Shuffle an array
 * @link https://php.net/manual/en/function.shuffle.php
 * @param array &$array <p>
 * The array.
 * </p>
 * @return bool true on success or false on failure.
 */
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
function shuffle(array &$array): bool {}

/**
 * Apply a user function to every member of an array
 * @link https://php.net/manual/en/function.array-walk.php
 * @param array|object &$array <p>
 * The input array.
 * </p>
 * @param callable $callback <p>
 * Typically, funcname takes on two parameters.
 * The array parameter's value being the first, and
 * the key/index second.
 * </p>
 * <p>
 * If funcname needs to be working with the
 * actual values of the array, specify the first parameter of
 * funcname as a
 * reference. Then,
 * any changes made to those elements will be made in the
 * original array itself.
 * </p>
 * <p>
 * Users may not change the array itself from the
 * callback function. e.g. Add/delete elements, unset elements, etc. If
 * the array that array_walk is applied to is
 * changed, the behavior of this function is undefined, and unpredictable.
 * </p>
 * @param mixed $arg [optional] <p>
 * If the optional userdata parameter is supplied,
 * it will be passed as the third parameter to the callback
 * funcname.
 * </p>
 * @return bool true on success or false on failure.
 */
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
function array_walk(object|array &$array, callable $callback, mixed $arg): bool {}

/**
 * Apply a user function recursively to every member of an array
 * @link https://php.net/manual/en/function.array-walk-recursive.php
 * @param array|object &$array <p>
 * The input array.
 * </p>
 * @param callable $callback <p>
 * Typically, funcname takes on two parameters.
 * The input parameter's value being the first, and
 * the key/index second.
 * </p>
 * <p>
 * If funcname needs to be working with the
 * actual values of the array, specify the first parameter of
 * funcname as a
 * reference. Then,
 * any changes made to those elements will be made in the
 * original array itself.
 * </p>
 * @param mixed $arg [optional] <p>
 * If the optional userdata parameter is supplied,
 * it will be passed as the third parameter to the callback
 * funcname.
 * </p>
 * @return bool true on success or false on failure.
 */
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
function array_walk_recursive(object|array &$array, callable $callback, mixed $arg): bool {}

/**
 * Counts all elements in an array, or something in an object.
 * <p>For objects, if you have SPL installed, you can hook into count() by implementing interface {@see Countable}.
 * The interface has exactly one method, {@see Countable::count()}, which returns the return value for the count() function.
 * Please see the {@see Array} section of the manual for a detailed explanation of how arrays are implemented and used in PHP.</p>
 * @link https://php.net/manual/en/function.count.php
 * @param array|Countable $value The array or the object.
 * @param int $mode [optional] If the optional mode parameter is set to
 * COUNT_RECURSIVE (or 1), count
 * will recursively count the array. This is particularly useful for
 * counting all the elements of a multidimensional array. count does not detect infinite recursion.
 * @return int<0,max> the number of elements in var, which is
 * typically an array, since anything else will have one
 * element.
 * <p>
 * If var is not an array or an object with
 * implemented Countable interface,
 * 1 will be returned.
 * There is one exception, if var is null,
 * 0 will be returned.
 * </p>
 * <p>
 * Caution: count may return 0 for a variable that isn't set,
 * but it may also return 0 for a variable that has been initialized with an
 * empty array. Use isset to test if a variable is set.
 * </p>
 */
#[Pure]
function count(Countable|array $value, int $mode = COUNT_NORMAL): int {}

/**
 * Set the internal pointer of an array to its last element
 * @link https://php.net/manual/en/function.end.php
 * @param array|object &$array <p>
 * The array. This array is passed by reference because it is modified by
 * the function. This means you must pass it a real variable and not
 * a function returning an array because only actual variables may be
 * passed by reference.
 * </p>
 * @return mixed|false the value of the last element or false for empty array.
 * @meta
 */
function end(object|array &$array): mixed {}

/**
 * Rewind the internal array pointer
 * @link https://php.net/manual/en/function.prev.php
 * @param array|object &$array <p>
 * The input array.
 * </p>
 * @return mixed|false the array value in the previous place that's pointed to by
 * the internal array pointer, or false if there are no more
 * elements.
 * @meta
 */
function prev(object|array &$array): mixed {}

/**
 * Advance the internal array pointer of an array
 * @link https://php.net/manual/en/function.next.php
 * @param array|object &$array <p>
 * The array being affected.
 * </p>
 * @return mixed|false the array value in the next place that's pointed to by the
 * internal array pointer, or false if there are no more elements.
 * @meta
 */
function next(object|array &$array): mixed {}

/**
 * Set the internal pointer of an array to its first element
 * @link https://php.net/manual/en/function.reset.php
 * @param array|object &$array <p>
 * The input array.
 * </p>
 * @return mixed|false the value of the first array element, or false if the array is
 * empty.
 * @meta
 */
function reset(object|array &$array): mixed {}

/**
 * Return the current element in an array
 * @link https://php.net/manual/en/function.current.php
 * @param array|object $array <p>
 * The array.
 * </p>
 * @return mixed|false The current function simply returns the
 * value of the array element that's currently being pointed to by the
 * internal pointer. It does not move the pointer in any way. If the
 * internal pointer points beyond the end of the elements list or the array is
 * empty, current returns false.
 * @meta
 */
#[Pure]
function current(object|array $array): mixed {}

/**
 * Fetch a key from an array
 * @link https://php.net/manual/en/function.key.php
 * @param array|object $array <p>
 * The array.
 * </p>
 * @return int|string|null The key function simply returns the
 * key of the array element that's currently being pointed to by the
 * internal pointer. It does not move the pointer in any way. If the
 * internal pointer points beyond the end of the elements list or the array is
 * empty, key returns null.
 */
#[Pure]
function key(object|array $array): string|int|null {}

/**
 * Find lowest value
 * @link https://php.net/manual/en/function.min.php
 * @param array|mixed $value Array to look through or first value to compare
 * @param mixed ...$values any comparable value
 * @return mixed min returns the numerically lowest of the
 * parameter values.
 */
#[Pure]
function min(
    #[PhpStormStubsElementAvailable(from: '8.0')] mixed $value,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] mixed $values,
    mixed ...$values
): mixed {}

/**
 * Find highest value
 * @link https://php.net/manual/en/function.max.php
 * @param array|mixed $value Array to look through or first value to compare
 * @param mixed ...$values any comparable value
 * @return mixed max returns the numerically highest of the
 * parameter values, either within a arg array or two arguments.
 */
#[Pure]
function max(
    #[PhpStormStubsElementAvailable(from: '8.0')] mixed $value,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] mixed $values,
    mixed ...$values
): mixed {}

/**
 * Checks if a value exists in an array
 * @link https://php.net/manual/en/function.in-array.php
 * @param mixed $needle <p>
 * The searched value.
 * </p>
 * <p>
 * If needle is a string, the comparison is done
 * in a case-sensitive manner.
 * </p>
 * @param array $haystack <p>
 * The array.
 * </p>
 * @param bool $strict [optional] <p>
 * If the third parameter strict is set to true
 * then the in_array function will also check the
 * types of the
 * needle in the haystack.
 * </p>
 * @return bool true if needle is found in the array,
 * false otherwise.
 */
#[Pure]
function in_array(mixed $needle, array $haystack, bool $strict = false): bool {}

/**
 * Searches the array for a given value and returns the first corresponding key if successful
 * @link https://php.net/manual/en/function.array-search.php
 * @param mixed $needle <p>
 * The searched value.
 * </p>
 * <p>
 * If needle is a string, the comparison is done
 * in a case-sensitive manner.
 * </p>
 * @param array $haystack <p>
 * The array.
 * </p>
 * @param bool $strict [optional] <p>
 * If the third parameter strict is set to true
 * then the array_search function will also check the
 * types of the
 * needle in the haystack.
 * </p>
 * @return int|string|false the key for needle if it is found in the
 * array, false otherwise.
 * </p>
 * <p>
 * If needle is found in haystack
 * more than once, the first matching key is returned. To return the keys for
 * all matching values, use array_keys with the optional
 * search_value parameter instead.
 */
#[Pure]
function array_search(mixed $needle, array $haystack, bool $strict = false): string|int|false {}

/**
 * Import variables into the current symbol table from an array
 * @link https://php.net/manual/en/function.extract.php
 * @param array &$array <p>
 * Note that prefix is only required if
 * extract_type is EXTR_PREFIX_SAME,
 * EXTR_PREFIX_ALL, EXTR_PREFIX_INVALID
 * or EXTR_PREFIX_IF_EXISTS. If
 * the prefixed result is not a valid variable name, it is not
 * imported into the symbol table. Prefixes are automatically separated from
 * the array key by an underscore character.
 * </p>
 * @param int $flags <p>
 * The way invalid/numeric keys and collisions are treated is determined
 * by the extract_type. It can be one of the
 * following values:
 * EXTR_OVERWRITE
 * If there is a collision, overwrite the existing variable.</p>
 * @param string $prefix <p>Only overwrite the variable if it already exists in the
 * current symbol table, otherwise do nothing. This is useful
 * for defining a list of valid variables and then extracting
 * only those variables you have defined out of
 * $_REQUEST, for example.</p>
 * @return int the number of variables successfully imported into the symbol
 * table.
 */
function extract(
    array &$array,
    #[ExpectedValues(flags: [
               EXTR_OVERWRITE,
               EXTR_SKIP,
               EXTR_PREFIX_SAME,
               EXTR_PREFIX_ALL,
               EXTR_PREFIX_INVALID,
               EXTR_IF_EXISTS,
               EXTR_PREFIX_IF_EXISTS,
               EXTR_REFS
           ])] int $flags = EXTR_OVERWRITE,
    string $prefix = ""
): int {}

/**
 * Create array containing variables and their values
 * @link https://php.net/manual/en/function.compact.php
 * @param mixed $var_name <p>
 * compact takes a variable number of parameters.
 * Each parameter can be either a string containing the name of the
 * variable, or an array of variable names. The array can contain other
 * arrays of variable names inside it; compact
 * handles it recursively.
 * </p>
 * @param mixed ...$var_names
 * @return array the output array with all the variables added to it.
 */
#[Pure]
function compact(#[PhpStormStubsElementAvailable(from: '8.0')] $var_name, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $var_names, ...$var_names): array {}

/**
 * Fill an array with values
 * @link https://php.net/manual/en/function.array-fill.php
 * @param int $start_index <p>
 * The first index of the returned array.
 * Supports non-negative indexes only.
 * </p>
 * @param int $count <p>
 * Number of elements to insert
 * </p>
 * @param mixed $value <p>
 * Value to use for filling
 * </p>
 * @return array the filled array
 */
#[Pure]
function array_fill(int $start_index, int $count, mixed $value): array {}

/**
 * Fill an array with values, specifying keys
 * @link https://php.net/manual/en/function.array-fill-keys.php
 * @param array $keys <p>
 * Array of values that will be used as keys. Illegal values
 * for key will be converted to string.
 * </p>
 * @param mixed $value <p>
 * Value to use for filling
 * </p>
 * @return array the filled array
 */
#[Pure]
function array_fill_keys(array $keys, mixed $value): array {}

/**
 * Create an array containing a range of elements
 * @link https://php.net/manual/en/function.range.php
 * @param mixed $start <p>
 * First value of the sequence.
 * </p>
 * @param mixed $end <p>
 * The sequence is ended upon reaching the end value.
 * </p>
 * @param positive-int|float $step [optional] <p>
 * If a step value is given, it will be used as the
 * increment between elements in the sequence. step
 * should be given as a positive number. If not specified,
 * step will default to 1.
 * </p>
 * @return array an array of elements from start to
 * end, inclusive.
 */
#[Pure]
function range($start, $end, int|float $step = 1): array {}

/**
 * Sort multiple or multi-dimensional arrays
 * @link https://php.net/manual/en/function.array-multisort.php
 * @param array &$array <p>
 * An array being sorted.
 * </p>
 * @param  &...$rest [optional] <p>
 * More arrays, optionally followed by sort order and flags.
 * Only elements corresponding to equivalent elements in previous arrays are compared.
 * In other words, the sort is lexicographical.
 * </p>
 * @return bool true on success or false on failure.
 */
function array_multisort(
    &$array,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $sort_order = SORT_ASC,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $sort_flags = SORT_REGULAR,
    &...$rest
): bool {}

/**
 * Push elements onto the end of array
 * Since 7.3.0 this function can be called with only one parameter.
 * For earlier versions at least two parameters are required.
 * @link https://php.net/manual/en/function.array-push.php
 * @param array &$array <p>
 * The input array.
 * </p>
 * @param mixed ...$values <p>
 * The pushed variables.
 * </p>
 * @return int the number of elements in the array.
 */
function array_push(
    array &$array,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')] $values,
    mixed ...$values
): int {}

/**
 * Pop the element off the end of array
 * @link https://php.net/manual/en/function.array-pop.php
 * @param array &$array <p>
 * The array to get the value from.
 * </p>
 * @return mixed|null the last value of array.
 * If array is empty (or is not an array),
 * null will be returned.
 * @meta
 */
function array_pop(array &$array): mixed {}

/**
 * Shift an element off the beginning of array
 * @link https://php.net/manual/en/function.array-shift.php
 * @param array &$array <p>
 * The input array.
 * </p>
 * @return mixed|null the shifted value, or null if array is
 * empty or is not an array.
 * @meta
 */
function array_shift(array &$array): mixed {}

/**
 * Prepend elements to the beginning of an array
 * Since 7.3.0 this function can be called with only one parameter.
 * For earlier versions at least two parameters are required.
 * @link https://php.net/manual/en/function.array-unshift.php
 * @param array &$array <p>
 * The input array.
 * </p>
 * @param mixed ...$values <p>
 * The prepended variables.
 * </p>
 * @return int the number of elements in the array.
 */
function array_unshift(array &$array, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')] $values, mixed ...$values): int {}

/**
 * Remove a portion of the array and replace it with something else
 * @link https://php.net/manual/en/function.array-splice.php
 * @param array &$array <p>
 * The input array.
 * </p>
 * @param int $offset <p>
 * If offset is positive then the start of removed
 * portion is at that offset from the beginning of the
 * input array. If offset
 * is negative then it starts that far from the end of the
 * input array.
 * </p>
 * @param int|null $length [optional] <p>
 * If length is omitted, removes everything
 * from offset to the end of the array. If
 * length is specified and is positive, then
 * that many elements will be removed. If
 * length is specified and is negative then
 * the end of the removed portion will be that many elements from
 * the end of the array. Tip: to remove everything from
 * offset to the end of the array when
 * replacement is also specified, use
 * count($input) for
 * length.
 * </p>
 * @param mixed $replacement <p>
 * If replacement array is specified, then the
 * removed elements are replaced with elements from this array.
 * </p>
 * <p>
 * If offset and length
 * are such that nothing is removed, then the elements from the
 * replacement array are inserted in the place
 * specified by the offset. Note that keys in
 * replacement array are not preserved.
 * </p>
 * <p>
 * If replacement is just one element it is
 * not necessary to put array()
 * around it, unless the element is an array itself.
 * </p>
 * @return array the array consisting of the extracted elements.
 */
function array_splice(array &$array, int $offset, ?int $length, mixed $replacement = []): array {}

/**
 * Extract a slice of the array
 * @link https://php.net/manual/en/function.array-slice.php
 * @param array $array <p>
 * The input array.
 * </p>
 * @param int $offset <p>
 * If offset is non-negative, the sequence will
 * start at that offset in the array. If
 * offset is negative, the sequence will
 * start that far from the end of the array.
 * </p>
 * @param int|null $length [optional] <p>
 * If length is given and is positive, then
 * the sequence will have that many elements in it. If
 * length is given and is negative then the
 * sequence will stop that many elements from the end of the
 * array. If it is omitted, then the sequence will have everything
 * from offset up until the end of the
 * array.
 * </p>
 * @param bool $preserve_keys [optional] <p>
 * Note that array_slice will reorder and reset the
 * array indices by default. You can change this behaviour by setting
 * preserve_keys to true.
 * </p>
 * @return array the slice.
 * @meta
 */
#[Pure]
function array_slice(array $array, int $offset, ?int $length, bool $preserve_keys = false): array {}

/**
 * Merges the elements of one or more arrays together (if the input arrays have the same string keys, then the later value for that key will overwrite the previous one; if the arrays contain numeric keys, the later value will be appended)
 * Since 7.4.0 this function can be called without any parameter, and it will return empty array.
 * @link https://php.net/manual/en/function.array-merge.php
 * @param array ...$arrays <p>
 * Variable list of arrays to merge.
 * </p>
 * @return array the resulting array.
 * @meta
 */
#[Pure]
function array_merge(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.3')] $array,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.0')] $arrays,
    array ...$arrays
): array {}
<?php

use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Pure;

/**
 * Runs the equivalent of the select() system call on the given
 * arrays of streams with a timeout specified by tv_sec and tv_usec
 * @link https://php.net/manual/en/function.stream-select.php
 * @param array|null &$read <p>
 * The streams listed in the read array will be watched to
 * see if characters become available for reading (more precisely, to see if
 * a read will not block - in particular, a stream resource is also ready on
 * end-of-file, in which case an fread will return
 * a zero length string).
 * </p>
 * @param array|null &$write <p>
 * The streams listed in the write array will be
 * watched to see if a write will not block.
 * </p>
 * @param array|null &$except <p>
 * The streams listed in the except array will be
 * watched for high priority exceptional ("out-of-band") data arriving.
 * </p>
 * <p>
 * When stream_select returns, the arrays
 * read, write and
 * except are modified to indicate which stream
 * resource(s) actually changed status.
 * </p>
 * You do not need to pass every array to
 * stream_select. You can leave it out and use an
 * empty array or null instead. Also do not forget that those arrays are
 * passed by reference and will be modified after
 * stream_select returns.
 * @param int|null $seconds <p>
 * The tv_sec and tv_usec
 * together form the timeout parameter,
 * tv_sec specifies the number of seconds while
 * tv_usec the number of microseconds.
 * The timeout is an upper bound on the amount of time
 * that stream_select will wait before it returns.
 * If tv_sec and tv_usec are
 * both set to 0, stream_select will
 * not wait for data - instead it will return immediately, indicating the
 * current status of the streams.
 * </p>
 * <p>
 * If tv_sec is null stream_select
 * can block indefinitely, returning only when an event on one of the
 * watched streams occurs (or if a signal interrupts the system call).
 * </p>
 * <p>
 * Using a timeout value of 0 allows you to
 * instantaneously poll the status of the streams, however, it is NOT a
 * good idea to use a 0 timeout value in a loop as it
 * will cause your script to consume too much CPU time.
 * </p>
 * <p>
 * It is much better to specify a timeout value of a few seconds, although
 * if you need to be checking and running other code concurrently, using a
 * timeout value of at least 200000 microseconds will
 * help reduce the CPU usage of your script.
 * </p>
 * <p>
 * Remember that the timeout value is the maximum time that will elapse;
 * stream_select will return as soon as the
 * requested streams are ready for use.
 * </p>
 * @param int $microseconds [optional] <p>
 * See tv_sec description.
 * </p>
 * @return int|false On success stream_select returns the number of
 * stream resources contained in the modified arrays, which may be zero if
 * the timeout expires before anything interesting happens. On error false
 * is returned and a warning raised (this can happen if the system call is
 * interrupted by an incoming signal).
 */
function stream_select(
    ?array &$read,
    ?array &$write,
    ?array &$except,
    ?int $seconds,
    #[LanguageLevelTypeAware(['8.1' => 'int|null'], default: 'int')] $microseconds
): int|false {}

/**
 * Create a stream context
 * @link https://php.net/manual/en/function.stream-context-create.php
 * @param null|array $options [optional] <p>
 * Must be an associative array of associative arrays in the format
 * $arr['wrapper']['option'] = $value.
 * </p>
 * <p>
 * Default to an empty array.
 * </p>
 * @param null|array $params [optional] <p>
 * Must be an associative array in the format
 * $arr['parameter'] = $value.
 * Refer to context parameters for
 * a listing of standard stream parameters.
 * </p>
 * @return resource A stream context resource.
 */
function stream_context_create(?array $options, ?array $params) {}

/**
 * Set parameters for a stream/wrapper/context
 * @link https://php.net/manual/en/function.stream-context-set-params.php
 * @param resource $context <p>
 * The stream or context to apply the parameters too.
 * </p>
 * @param array $params <p>
 * An array of parameters to set.
 * </p>
 * <p>
 * params should be an associative array of the structure:
 * $params['paramname'] = "paramvalue";.
 * </p>
 * @return bool true on success or false on failure.
 */
function stream_context_set_params($context, array $params): bool {}

/**
 * Retrieves parameters from a context
 * @link https://php.net/manual/en/function.stream-context-get-params.php
 * @param resource $context <p>
 * A stream resource or a
 * context resource
 * </p>
 * @return array an associate array containing all context options and parameters.
 */
#[ArrayShape(["notification" => "string", "options" => "array"])]
function stream_context_get_params($context): array {}

/**
 * Sets an option for a stream/wrapper/context
 * @link https://php.net/manual/en/function.stream-context-set-option.php
 * @param resource $context <p>
 * The stream or context resource to apply the options too.
 * </p>
 * @param string $wrapper_or_options
 * @param string $option_name
 * @param mixed $value
 * @return bool true on success or false on failure.
 */
function stream_context_set_option($context, string $wrapper_or_options, string $option_name, mixed $value): bool {}

/**
 * Sets an option for a stream/wrapper/context
 * @link https://php.net/manual/en/function.stream-context-set-option.php
 * @param resource $stream_or_context The stream or context resource to apply the options too.
 * @param array $options The options to set for the default context.
 * @return bool true on success or false on failure.
 */
function stream_context_set_option($stream_or_context, array $options): bool {}

/**
 * Retrieve options for a stream/wrapper/context
 * @link https://php.net/manual/en/function.stream-context-get-options.php
 * @param resource $stream_or_context <p>
 * The stream or context to get options from
 * </p>
 * @return array an associative array with the options.
 */
function stream_context_get_options($stream_or_context): array {}

/**
 * Retreive the default stream context
 * @link https://php.net/manual/en/function.stream-context-get-default.php
 * @param null|array $options [optional] options must be an associative
 * array of associative arrays in the format
 * $arr['wrapper']['option'] = $value.
 * <p>
 * As of PHP 5.3.0, the stream_context_set_default function
 * can be used to set the default context.
 * </p>
 * @return resource A stream context resource.
 */
function stream_context_get_default(?array $options) {}

/**
 * Set the default stream context
 * @link https://php.net/manual/en/function.stream-context-set-default.php
 * @param array $options <p>
 * The options to set for the default context.
 * </p>
 * <p>
 * options must be an associative
 * array of associative arrays in the format
 * $arr['wrapper']['option'] = $value.
 * </p>
 * @return resource the default stream context.
 */
function stream_context_set_default(array $options) {}

/**
 * Attach a filter to a stream
 * @link https://php.net/manual/en/function.stream-filter-prepend.php
 * @param resource $stream <p>
 * The target stream.
 * </p>
 * @param string $filter_name <p>
 * The filter name.
 * </p>
 * @param int $mode <p>
 * By default, stream_filter_prepend will
 * attach the filter to the read filter chain
 * if the file was opened for reading (i.e. File Mode:
 * r, and/or +). The filter
 * will also be attached to the write filter chain
 * if the file was opened for writing (i.e. File Mode:
 * w, a, and/or +).
 * STREAM_FILTER_READ,
 * STREAM_FILTER_WRITE, and/or
 * STREAM_FILTER_ALL can also be passed to the
 * read_write parameter to override this behavior.
 * See stream_filter_append for an example of
 * using this parameter.
 * </p>
 * @param mixed $params [optional] <p>
 * This filter will be added with the specified params
 * to the beginning of the list and will therefore be
 * called first during stream operations. To add a filter to the end of the
 * list, use stream_filter_append.
 * </p>
 * @return resource|false a resource which can be used to refer to this filter
 * instance during a call to stream_filter_remove.
 */
function stream_filter_prepend($stream, string $filter_name, int $mode = 0, mixed $params) {}

/**
 * Attach a filter to a stream
 * @link https://php.net/manual/en/function.stream-filter-append.php
 * @param resource $stream <p>
 * The target stream.
 * </p>
 * @param string $filter_name <p>
 * The filter name.
 * </p>
 * @param int $mode <p>
 * By default, stream_filter_append will
 * attach the filter to the read filter chain
 * if the file was opened for reading (i.e. File Mode:
 * r, and/or +). The filter
 * will also be attached to the write filter chain
 * if the file was opened for writing (i.e. File Mode:
 * w, a, and/or +).
 * STREAM_FILTER_READ,
 * STREAM_FILTER_WRITE, and/or
 * STREAM_FILTER_ALL can also be passed to the
 * read_write parameter to override this behavior.
 * </p>
 * @param mixed $params [optional] <p>
 * This filter will be added with the specified
 * params to the end of
 * the list and will therefore be called last during stream operations.
 * To add a filter to the beginning of the list, use
 * stream_filter_prepend.
 * </p>
 * @return resource|false a resource which can be used to refer to this filter
 * instance during a call to stream_filter_remove.
 */
function stream_filter_append($stream, string $filter_name, int $mode = 0, mixed $params) {}

/**
 * Remove a filter from a stream
 * @link https://php.net/manual/en/function.stream-filter-remove.php
 * @param resource $stream_filter <p>
 * The stream filter to be removed.
 * </p>
 * @return bool true on success or false on failure.
 */
function stream_filter_remove($stream_filter): bool {}

/**
 * Open Internet or Unix domain socket connection
 * @link https://php.net/manual/en/function.stream-socket-client.php
 * @param string $address <p>
 * Address to the socket to connect to.
 * </p>
 * @param int &$error_code [optional] <p>
 * Will be set to the system level error number if connection fails.
 * </p>
 * @param string &$error_message [optional] <p>
 * Will be set to the system level error message if the connection fails.
 * </p>
 * @param float|null $timeout [optional] <p>
 * Number of seconds until the connect() system call
 * should timeout.
 * This parameter only applies when not making asynchronous
 * connection attempts.
 * <p>
 * To set a timeout for reading/writing data over the socket, use the
 * stream_set_timeout, as the
 * timeout only applies while making connecting
 * the socket.
 * </p>
 * </p>
 * @param int $flags [optional] <p>
 * Bitmask field which may be set to any combination of connection flags.
 * Currently the select of connection flags is limited to
 * STREAM_CLIENT_CONNECT (default),
 * STREAM_CLIENT_ASYNC_CONNECT and
 * STREAM_CLIENT_PERSISTENT.
 * </p>
 * @param resource $context [optional] <p>
 * A valid context resource created with stream_context_create.
 * </p>
 * @return resource|false On success a stream resource is returned which may
 * be used together with the other file functions (such as
 * fgets, fgetss,
 * fwrite, fclose, and
 * feof), false on failure.
 */
function stream_socket_client(string $address, &$error_code, &$error_message, ?float $timeout, int $flags = STREAM_CLIENT_CONNECT, $context) {}

/**
 * Create an Internet or Unix domain server socket
 * @link https://php.net/manual/en/function.stream-socket-server.php
 * @param string $address <p>
 * The type of socket created is determined by the transport specified
 * using standard URL formatting: transport://target.
 * </p>
 * <p>
 * For Internet Domain sockets (AF_INET) such as TCP and UDP, the
 * target portion of the
 * remote_socket parameter should consist of a
 * hostname or IP address followed by a colon and a port number. For
 * Unix domain sockets, the target portion should
 * point to the socket file on the filesystem.
 * </p>
 * <p>
 * Depending on the environment, Unix domain sockets may not be available.
 * A list of available transports can be retrieved using
 * stream_get_transports. See
 * for a list of built-in transports.
 * </p>
 * @param int &$error_code [optional] <p>
 * If the optional errno and errstr
 * arguments are present they will be set to indicate the actual system
 * level error that occurred in the system-level socket(),
 * bind(), and listen() calls. If
 * the value returned in errno is
 * 0 and the function returned false, it is an
 * indication that the error occurred before the bind()
 * call. This is most likely due to a problem initializing the socket.
 * Note that the errno and
 * errstr arguments will always be passed by reference.
 * </p>
 * @param string &$error_message [optional] <p>
 * See errno description.
 * </p>
 * @param int $flags [optional] <p>
 * A bitmask field which may be set to any combination of socket creation
 * flags.
 * </p>
 * <p>
 * For UDP sockets, you must use STREAM_SERVER_BIND as
 * the flags parameter.
 * </p>
 * @param resource $context [optional] <p>
 * </p>
 * @return resource|false the created stream, or false on error.
 */
function stream_socket_server(string $address, &$error_code, &$error_message, int $flags = STREAM_SERVER_BIND|STREAM_SERVER_LISTEN, $context) {}

/**
 * Accept a connection on a socket created by {@see stream_socket_server}
 * @link https://php.net/manual/en/function.stream-socket-accept.php
 * @param resource $socket
 * @param float|null $timeout [optional] <p>
 * Override the default socket accept timeout. Time should be given in
 * seconds.
 * </p>
 * @param string &$peer_name [optional] <p>
 * Will be set to the name (address) of the client which connected, if
 * included and available from the selected transport.
 * </p>
 * <p>
 * Can also be determined later using
 * stream_socket_get_name.
 * </p>
 * @return resource|false Returns a stream to the accepted socket connection or FALSE on failure.
 */
function stream_socket_accept($socket, ?float $timeout, &$peer_name) {}

/**
 * Retrieve the name of the local or remote sockets
 * @link https://php.net/manual/en/function.stream-socket-get-name.php
 * @param resource $socket <p>
 * The socket to get the name of.
 * </p>
 * @param bool $remote <p>
 * If set to true the remote socket name will be returned, if set
 * to false the local socket name will be returned.
 * </p>
 * @return string|false The name of the socket or false on error.
 */
function stream_socket_get_name($socket, bool $remote): string|false {}

/**
 * Receives data from a socket, connected or not
 * @link https://php.net/manual/en/function.stream-socket-recvfrom.php
 * @param resource $socket <p>
 * The remote socket.
 * </p>
 * @param int $length <p>
 * The number of bytes to receive from the socket.
 * </p>
 * @param int $flags <p>
 * The value of flags can be any combination
 * of the following:
 * <table>
 * Possible values for flags
 * <tr valign="top">
 * <td>STREAM_OOB</td>
 * <td>
 * Process OOB (out-of-band) data.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>STREAM_PEEK</td>
 * <td>
 * Retrieve data from the socket, but do not consume the buffer.
 * Subsequent calls to fread or
 * stream_socket_recvfrom will see
 * the same data.
 * </td>
 * </tr>
 * </table>
 * </p>
 * @param string &$address [optional] <p>
 * If address is provided it will be populated with
 * the address of the remote socket.
 * </p>
 * @return string|false the read data, as a string, or false on error
 */
function stream_socket_recvfrom($socket, int $length, int $flags = 0, &$address): string|false {}

/**
 * Sends a message to a socket, whether it is connected or not
 * @link https://php.net/manual/en/function.stream-socket-sendto.php
 * @param resource $socket <p>
 * The socket to send data to.
 * </p>
 * @param string $data <p>
 * The data to be sent.
 * </p>
 * @param int $flags <p>
 * The value of flags can be any combination
 * of the following:
 * <table>
 * possible values for flags
 * <tr valign="top">
 * <td>STREAM_OOB</td>
 * <td>
 * Process OOB (out-of-band) data.
 * </td>
 * </tr>
 * </table>
 * </p>
 * @param string $address <p>
 * The address specified when the socket stream was created will be used
 * unless an alternate address is specified in address.
 * </p>
 * <p>
 * If specified, it must be in dotted quad (or [ipv6]) format.
 * </p>
 * @return int|false a result code, as an integer.
 */
function stream_socket_sendto($socket, string $data, int $flags = 0, string $address = ''): int|false {}

/**
 * Turns encryption on/off on an already connected socket
 * @link https://php.net/manual/en/function.stream-socket-enable-crypto.php
 * @param resource $stream <p>
 * The stream resource.
 * </p>
 * @param bool $enable <p>
 * Enable/disable cryptography on the stream.
 * </p>
 * @param int|null $crypto_method [optional] <p>
 * Setup encryption on the stream.
 * Valid methods are:<br>
 * STREAM_CRYPTO_METHOD_SSLv2_CLIENT</p>
 * @param resource $session_stream [optional] <p>
 * Seed the stream with settings from session_stream.
 * </p>
 * @return bool|int true on success, false if negotiation has failed or
 * 0 if there isn't enough data and you should try again
 * (only for non-blocking sockets).
 */
function stream_socket_enable_crypto($stream, bool $enable, ?int $crypto_method, $session_stream): int|bool {}

/**
 * Shutdown a full-duplex connection
 * @link https://php.net/manual/en/function.stream-socket-shutdown.php
 * @param resource $stream <p>
 * An open stream (opened with stream_socket_client,
 * for example)
 * </p>
 * @param int $mode <p>
 * One of the following constants: STREAM_SHUT_RD
 * (disable further receptions), STREAM_SHUT_WR
 * (disable further transmissions) or
 * STREAM_SHUT_RDWR (disable further receptions and
 * transmissions).
 * </p>
 * @return bool true on success or false on failure.
 * @since 5.2.1
 */
function stream_socket_shutdown($stream, int $mode): bool {}

/**
 * Creates a pair of connected, indistinguishable socket streams
 * @link https://php.net/manual/en/function.stream-socket-pair.php
 * @param int $domain <p>
 * The protocol family to be used: STREAM_PF_INET,
 * STREAM_PF_INET6 or
 * STREAM_PF_UNIX
 * </p>
 * @param int $type <p>
 * The type of communication to be used:
 * STREAM_SOCK_DGRAM,
 * STREAM_SOCK_RAW,
 * STREAM_SOCK_RDM,
 * STREAM_SOCK_SEQPACKET or
 * STREAM_SOCK_STREAM
 * </p>
 * @param int $protocol <p>
 * The protocol to be used: STREAM_IPPROTO_ICMP,
 * STREAM_IPPROTO_IP,
 * STREAM_IPPROTO_RAW,
 * STREAM_IPPROTO_TCP or
 * STREAM_IPPROTO_UDP
 * </p>
 * @return array|false an array with the two socket resources on success, or
 * false on failure.
 */
function stream_socket_pair(int $domain, int $type, int $protocol): array|false {}

/**
 * Copies data from one stream to another
 * @link https://php.net/manual/en/function.stream-copy-to-stream.php
 * @param resource $from <p>
 * The source stream
 * </p>
 * @param resource $to <p>
 * The destination stream
 * </p>
 * @param int|null $length [optional] <p>
 * Maximum bytes to copy
 * </p>
 * @param int $offset <p>
 * The offset where to start to copy data
 * </p>
 * @return int|false the total count of bytes copied, or false on failure.
 */
function stream_copy_to_stream($from, $to, ?int $length, int $offset = 0): int|false {}

/**
 * Reads remainder of a stream into a string
 * @link https://php.net/manual/en/function.stream-get-contents.php
 * @param resource $stream <p>
 * A stream resource (e.g. returned from fopen)
 * </p>
 * @param int|null $length <p>
 * The maximum bytes to read. Defaults to -1 (read all the remaining
 * buffer).
 * </p>
 * @param int $offset [optional] <p>
 * Seek to the specified offset before reading.
 * </p>
 * @return string|false a string or false on failure.
 */
function stream_get_contents($stream, ?int $length = null, int $offset = -1): string|false {}

/**
 * Tells whether the stream supports locking.
 * @link https://php.net/manual/en/function.stream-supports-lock.php
 * @param resource $stream <p>
 * The stream to check.
 * </p>
 * @return bool true on success or false on failure.
 */
function stream_supports_lock($stream): bool {}

/**
 * Gets line from file pointer and parse for CSV fields
 * @link https://php.net/manual/en/function.fgetcsv.php
 * @param resource $stream <p>
 * A valid file pointer to a file successfully opened by
 * fopen, popen, or
 * fsockopen.
 * </p>
 * @param int|null $length <p>
 * Must be greater than the longest line (in characters) to be found in
 * the CSV file (allowing for trailing line-end characters). It became
 * optional in PHP 5. Omitting this parameter (or setting it to 0 in PHP
 * 5.0.4 and later) the maximum line length is not limited, which is
 * slightly slower.
 * </p>
 * @param string $separator [optional] <p>
 * Set the field delimiter (one character only).
 * </p>
 * @param string $enclosure [optional] <p>
 * Set the field enclosure character (one character only).
 * </p>
 * @param string $escape [optional] <p>
 * Set the escape character (one character only). Defaults as a backslash.
 * </p>
 * @return array|false|null an indexed array containing the fields read.
 * <p>
 * A blank line in a CSV file will be returned as an array
 * comprising a single null field, and will not be treated
 * as an error.
 * </p>
 * <p>
 * fgetcsv returns null if an invalid
 * handle is supplied or false on other errors,
 * including end of file.
 * </p>
 */
#[LanguageLevelTypeAware(['8.0' => 'array|false'], default: 'array|false|null')]
function fgetcsv($stream, ?int $length = null, string $separator = ',', string $enclosure = '"', string $escape = '\\') {}

/**
 * Format line as CSV and write to file pointer
 * @link https://php.net/manual/en/function.fputcsv.php
 * @param resource $stream The file pointer must be valid, and must point to a file successfully opened by fopen() or fsockopen() (and not yet closed by fclose()).
 * @param array $fields <p>
 * An array of values.
 * </p>
 * @param string $separator [optional] <p>
 * The optional delimiter parameter sets the field
 * delimiter (one character only).
 * </p>
 * @param string $enclosure [optional] <p>
 * The optional enclosure parameter sets the field
 * enclosure (one character only).
 * </p>
 * @param string $escape [optional] <p>
 * The optional escape_char parameter sets the escape character (one character only).
 * </p>
 * @return int|false the length of the written string or false on failure.
 */
function fputcsv(
    $stream,
    array $fields,
    string $separator = ",",
    string $enclosure = '"',
    #[PhpStormStubsElementAvailable(from: '7.0')] string $escape = "\\",
    #[PhpStormStubsElementAvailable('8.1')] string $eol = PHP_EOL
): int|false {}

/**
 * Portable advisory file locking
 * @link https://php.net/manual/en/function.flock.php
 * @param resource $stream <p>
 * An open file pointer.
 * </p>
 * @param int $operation <p>
 * operation is one of the following:
 * LOCK_SH to acquire a shared lock (reader).</p>
 * @param int &$would_block [optional] <p>
 * The optional third argument is set to 1 if the lock would block
 * (EWOULDBLOCK errno condition).
 * </p>
 * @return bool true on success or false on failure.
 */
function flock($stream, int $operation, &$would_block): bool {}

/**
 * Extracts all meta tag content attributes from a file and returns an array
 * @link https://php.net/manual/en/function.get-meta-tags.php
 * @param string $filename <p>
 * The path to the HTML file, as a string. This can be a local file or an
 * URL.
 * </p>
 * <p>
 * What get_meta_tags parses
 * </p>
 * <pre>
 * <meta name="author" content="name">
 * <meta name="keywords" content="php documentation">
 * <meta name="DESCRIPTION" content="a php manual">
 * <meta name="geo.position" content="49.33;-86.59">
 * </head> <!-- parsing stops here -->
 * </pre>
 * <p>
 * (pay attention to line endings - PHP uses a native function to
 * parse the input, so a Mac file won't work on Unix).
 * </p>
 * @param bool $use_include_path [optional] <p>
 * Setting use_include_path to true will result
 * in PHP trying to open the file along the standard include path as per
 * the include_path directive.
 * This is used for local files, not URLs.
 * </p>
 * @return array|false an array with all the parsed meta tags.
 * <p>
 * The value of the name property becomes the key, the value of the content
 * property becomes the value of the returned array, so you can easily use
 * standard array functions to traverse it or access single values.
 * Special characters in the value of the name property are substituted with
 * '_', the rest is converted to lower case. If two meta tags have the same
 * name, only the last one is returned.
 * </p>
 */
#[Pure(true)]
function get_meta_tags(string $filename, bool $use_include_path = false): array|false {}

/**
 * Sets write file buffering on the given stream
 * @link https://php.net/manual/en/function.stream-set-write-buffer.php
 * @param resource $stream <p>
 * The file pointer.
 * </p>
 * @param int $size <p>
 * The number of bytes to buffer. If buffer
 * is 0 then write operations are unbuffered. This ensures that all writes
 * with fwrite are completed before other processes are
 * allowed to write to that output stream.
 * </p>
 * @return int 0 on success, or EOF if the request cannot be honored.
 * @see stream_set_read_buffer()
 */
function stream_set_write_buffer($stream, int $size): int {}

/**
 * Sets read file buffering on the given stream
 * @link https://php.net/manual/en/function.stream-set-read-buffer.php
 * @param resource $stream <p>
 * The file pointer.
 * </p>
 * @param int $size <p>
 * The number of bytes to buffer. If buffer
 * is 0 then write operations are unbuffered. This ensures that all writes
 * with fwrite are completed before other processes are
 * allowed to write to that output stream.
 * </p>
 * @return int 0 on success, or EOF if the request cannot be honored.
 * @see stream_set_write_buffer()
 */
function stream_set_read_buffer($stream, int $size): int {}

/**
 * Alias:
 * {@see stream_set_write_buffer}
 * <p>Sets the buffering for write operations on the given stream to buffer bytes.
 * Output using fwrite() is normally buffered at 8K.
 * This means that if there are two processes wanting to write to the same output stream (a file),
 * each is paused after 8K of data to allow the other to write.
 * </p>
 * @link https://php.net/manual/en/function.set-file-buffer.php
 * @param resource $stream The file pointer.
 * @param int $size The number of bytes to buffer. If buffer is 0 then write operations are unbuffered.
 * This ensures that all writes with fwrite() are completed before other processes are allowed to write to that output stream.
 * @return int
 */
function set_file_buffer($stream, int $size): int {}

/**
 * Alias:
 * {@see stream_set_blocking}
 * <p>Sets blocking or non-blocking mode on a stream.
 * This function works for any stream that supports non-blocking mode (currently, regular files and socket streams)
 * </p>
 * @link https://php.net/manual/en/function.set-socket-blocking.php
 * @param resource $socket
 * @param bool $mode If mode is FALSE, the given stream will be switched to non-blocking mode, and if TRUE, it will be switched to blocking mode.
 * This affects calls like fgets() and fread() that read from the stream.
 * In non-blocking mode an fgets() call will always return right away while in blocking mode it will wait for data to become available on the stream.
 * @return bool Returns TRUE on success or FALSE on failure.
 * @removed 7.0
 * @see stream_set_blocking()
 */
#[Deprecated(replacement: "stream_set_blocking(%parametersList%)", since: 5.3)]
function set_socket_blocking($socket, bool $mode): bool {}

/**
 * Set blocking/non-blocking mode on a stream
 * @link https://php.net/manual/en/function.stream-set-blocking.php
 * @param resource $stream <p>
 * The stream.
 * </p>
 * @param bool $enable <p>
 * If mode is FALSE, the given stream
 * will be switched to non-blocking mode, and if TRUE, it
 * will be switched to blocking mode. This affects calls like
 * fgets and fread
 * that read from the stream. In non-blocking mode an
 * fgets call will always return right away
 * while in blocking mode it will wait for data to become available
 * on the stream.
 * </p>
 * @return bool true on success or false on failure.
 */
function stream_set_blocking($stream, bool $enable): bool {}

/**
 * Alias:
 * {@see stream_set_blocking}
 * @link https://php.net/manual/en/function.socket-set-blocking.php
 * @param resource $stream <p>
 * The stream.
 * </p>
 * @param bool $enable <p>
 * If mode is FALSE, the given stream
 * will be switched to non-blocking mode, and if TRUE, it
 * will be switched to blocking mode. This affects calls like
 * fgets and fread
 * that read from the stream. In non-blocking mode an
 * fgets call will always return right away
 * while in blocking mode it will wait for data to become available
 * on the stream.
 * </p>
 * @return bool true on success or false on failure.
 */
function socket_set_blocking($stream, bool $enable): bool {}

/**
 * Retrieves header/meta data from streams/file pointers
 * @link https://php.net/manual/en/function.stream-get-meta-data.php
 * @param resource $stream <p>
 * The stream can be any stream created by fopen,
 * fsockopen and pfsockopen.
 * </p>
 * @return array The result array contains the following items:
 * <p>
 * timed_out (bool) - true if the stream
 * timed out while waiting for data on the last call to
 * fread or fgets.
 * </p>
 * <p>
 * blocked (bool) - true if the stream is
 * in blocking IO mode. See stream_set_blocking.
 * </p>
 * <p>
 * eof (bool) - true if the stream has reached
 * end-of-file. Note that for socket streams this member can be true
 * even when unread_bytes is non-zero. To
 * determine if there is more data to be read, use
 * feof instead of reading this item.
 * </p>
 * <p>
 * unread_bytes (int) - the number of bytes
 * currently contained in the PHP's own internal buffer.
 * </p>
 * You shouldn't use this value in a script.
 * <p>
 * stream_type (string) - a label describing
 * the underlying implementation of the stream.
 * </p>
 * <p>
 * wrapper_type (string) - a label describing
 * the protocol wrapper implementation layered over the stream.
 * See for more information about wrappers.
 * </p>
 * <p>
 * wrapper_data (mixed) - wrapper specific
 * data attached to this stream. See for
 * more information about wrappers and their wrapper data.
 * </p>
 * <p>
 * filters (array) - and array containing
 * the names of any filters that have been stacked onto this stream.
 * Documentation on filters can be found in the
 * Filters appendix.
 * </p>
 * <p>
 * mode (string) - the type of access required for
 * this stream (see Table 1 of the fopen() reference)
 * </p>
 * <p>
 * seekable (bool) - whether the current stream can
 * be seeked.
 * </p>
 * <p>
 * uri (string) - the URI/filename associated with this
 * stream.
 * </p>
 */
#[ArrayShape(["timed_out" => "bool", "blocked" => "bool", "eof" => "bool", "unread_bytes" => "int", "stream_type" => "string", "wrapper_type" => "string", "wrapper_data" => "mixed", "mode" => "string", "seekable" => "bool", "uri" => "string", "crypto" => "array", "mediatype" => "string"])]
function stream_get_meta_data($stream): array {}

/**
 * Gets line from stream resource up to a given delimiter
 * @link https://php.net/manual/en/function.stream-get-line.php
 * @param resource $stream <p>
 * A valid file handle.
 * </p>
 * @param int $length <p>
 * The number of bytes to read from the handle.
 * </p>
 * @param string $ending <p>
 * An optional string delimiter.
 * </p>
 * @return string|false a string of up to length bytes read from the file
 * pointed to by handle.
 * <p>
 * If an error occurs, returns false.
 * </p>
 */
function stream_get_line($stream, int $length, string $ending = ''): string|false {}

/**
 * Register a URL wrapper implemented as a PHP class
 * @link https://php.net/manual/en/function.stream-wrapper-register.php
 * @param string $protocol <p>
 * The wrapper name to be registered.
 * </p>
 * @param string $class <p>
 * The classname which implements the protocol.
 * </p>
 * @param int $flags <p>
 * Should be set to STREAM_IS_URL if
 * protocol is a URL protocol. Default is 0, local
 * stream.
 * </p>
 * @return bool true on success or false on failure.
 * <p>
 * stream_wrapper_register will return false if the
 * protocol already has a handler.
 * </p>
 */
function stream_wrapper_register(string $protocol, string $class, int $flags = 0): bool {}

/**
 * Alias:
 * {@see stream_wrapper_register}
 * <p>Register a URL wrapper implemented as a PHP class</p>
 * @link https://php.net/manual/en/function.stream-register-wrapper.php
 * @param string $protocol <p>
 * The wrapper name to be registered.
 * </p>
 * @param string $class <p>
 * The classname which implements the protocol.
 * </p>
 * @param int $flags [optional] <p>
 * Should be set to STREAM_IS_URL if
 * protocol is a URL protocol. Default is 0, local
 * stream.
 * </p>
 * @return bool true on success or false on failure.
 * <p>
 * stream_wrapper_register will return false if the
 * protocol already has a handler.
 * </p>
 */
function stream_register_wrapper(string $protocol, string $class, int $flags = 0): bool {}

/**
 * Resolve filename against the include path according to the same rules as fopen()/include().
 * @link https://php.net/manual/en/function.stream-resolve-include-path.php
 * @param string $filename The filename to resolve.
 * @return string|false containing the resolved absolute filename, or FALSE on failure.
 * @since 5.3.2
 */
function stream_resolve_include_path(string $filename): string|false {}

/**
 * Unregister a URL wrapper
 * @link https://php.net/manual/en/function.stream-wrapper-unregister.php
 * @param string $protocol <p>
 * </p>
 * @return bool true on success or false on failure.
 */
function stream_wrapper_unregister(string $protocol): bool {}

/**
 * Restores a previously unregistered built-in wrapper
 * @link https://php.net/manual/en/function.stream-wrapper-restore.php
 * @param string $protocol <p>
 * </p>
 * @return bool true on success or false on failure.
 */
function stream_wrapper_restore(string $protocol): bool {}

/**
 * Retrieve list of registered streams
 * @link https://php.net/manual/en/function.stream-get-wrappers.php
 * @return list<string> an indexed array containing the name of all stream wrappers
 * available on the running system.
 */
#[Pure(true)]
function stream_get_wrappers(): array {}

/**
 * Retrieve list of registered socket transports
 * @link https://php.net/manual/en/function.stream-get-transports.php
 * @return list<string> an indexed array of socket transports names.
 */
#[Pure(true)]
function stream_get_transports(): array {}

/**
 * Checks if a stream is a local stream
 * @link https://php.net/manual/en/function.stream-is-local.php
 * @param mixed $stream <p>
 * The stream resource or URL to check.
 * </p>
 * @return bool true on success or false on failure.
 * @since 5.2.4
 */
#[Pure]
function stream_is_local($stream): bool {}

/**
 * Fetches all the headers sent by the server in response to an HTTP request
 * @link https://php.net/manual/en/function.get-headers.php
 * @param string $url <p>
 * The target URL.
 * </p>
 * @param bool $associative [optional] <p>
 * If the optional format parameter is set to true,
 * get_headers parses the response and sets the
 * array's keys.
 * </p>
 * @param resource $context [optional]
 * @return array|false an indexed or associative array with the headers, or false on
 * failure.
 */
#[Pure(true)]
function get_headers(
    string $url,
    #[LanguageLevelTypeAware(['8.0' => 'bool'], default: 'int')] $associative = false,
    #[PhpStormStubsElementAvailable(from: '7.1')] $context = null
): array|false {}

/**
 * Set timeout period on a stream
 * @link https://php.net/manual/en/function.stream-set-timeout.php
 * @param resource $stream <p>
 * The target stream.
 * </p>
 * @param int $seconds <p>
 * The seconds part of the timeout to be set.
 * </p>
 * @param int $microseconds <p>
 * The microseconds part of the timeout to be set.
 * </p>
 * @return bool true on success or false on failure.
 */
function stream_set_timeout(
    $stream,
    int $seconds,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] int $microseconds,
    #[PhpStormStubsElementAvailable(from: '7.0')] int $microseconds = 0
): bool {}

/**
 * Alias:
 * {@see stream_set_timeout}
 * Set timeout period on a stream
 * @link https://php.net/manual/en/function.socket-set-timeout.php
 * @param resource $stream <p>
 * The target stream.
 * </p>
 * @param int $seconds <p>
 * The seconds part of the timeout to be set.
 * </p>
 * @param int $microseconds <p>
 * The microseconds part of the timeout to be set.
 * </p>
 * @return bool true on success or false on failure.
 */
function socket_set_timeout(
    $stream,
    int $seconds,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] int $microseconds,
    #[PhpStormStubsElementAvailable(from: '7.0')] int $microseconds = 0
): bool {}

/**
 * Alias:
 * {@see stream_get_meta_data}
 * Retrieves header/meta data from streams/file pointers
 * @link https://php.net/manual/en/function.socket-get-status.php
 * @param resource $stream <p>
 * The stream can be any stream created by fopen,
 * fsockopen and pfsockopen.
 * </p>
 * @return array The result array contains the following items:
 * <p>
 * timed_out (bool) - true if the stream
 * timed out while waiting for data on the last call to
 * fread or fgets.
 * </p>
 * <p>
 * blocked (bool) - true if the stream is
 * in blocking IO mode. See stream_set_blocking.
 * </p>
 * <p>
 * eof (bool) - true if the stream has reached
 * end-of-file. Note that for socket streams this member can be true
 * even when unread_bytes is non-zero. To
 * determine if there is more data to be read, use
 * feof instead of reading this item.
 * </p>
 * <p>
 * unread_bytes (int) - the number of bytes
 * currently contained in the PHP's own internal buffer.
 * </p>
 * You shouldn't use this value in a script.
 * <p>
 * stream_type (string) - a label describing
 * the underlying implementation of the stream.
 * </p>
 * <p>
 * wrapper_type (string) - a label describing
 * the protocol wrapper implementation layered over the stream.
 * See for more information about wrappers.
 * </p>
 * <p>
 * wrapper_data (mixed) - wrapper specific
 * data attached to this stream. See for
 * more information about wrappers and their wrapper data.
 * </p>
 * <p>
 * filters (array) - and array containing
 * the names of any filters that have been stacked onto this stream.
 * Documentation on filters can be found in the
 * Filters appendix.
 * </p>
 * <p>
 * mode (string) - the type of access required for
 * this stream (see Table 1 of the fopen() reference)
 * </p>
 * <p>
 * seekable (bool) - whether the current stream can
 * be seeked.
 * </p>
 * <p>
 * uri (string) - the URI/filename associated with this
 * stream.
 * </p>
 */
function socket_get_status($stream): array {}

/**
 * Returns canonicalized absolute pathname
 * @link https://php.net/manual/en/function.realpath.php
 * @param string $path <p>
 * The path being checked.
 * </p>
 * @return string|false the canonicalized absolute pathname on success. The resulting path
 * will have no symbolic link, '/./' or '/../' components.
 * <p>
 * realpath returns false on failure, e.g. if
 * the file does not exist.
 * </p>
 */
#[Pure(true)]
function realpath(string $path): string|false {}

/**
 * Match filename against a pattern
 * @link https://php.net/manual/en/function.fnmatch.php
 * @param string $pattern <p>
 * The shell wildcard pattern.
 * </p>
 * @param string $filename <p>
 * The tested string. This function is especially useful for filenames,
 * but may also be used on regular strings.
 * </p>
 * <p>
 * The average user may be used to shell patterns or at least in their
 * simplest form to '?' and '*'
 * wildcards so using fnmatch instead of
 * preg_match for
 * frontend search expression input may be way more convenient for
 * non-programming users.
 * </p>
 * @param int $flags <p>
 * The value of flags can be any combination of
 * the following flags, joined with the
 * binary OR (|) operator.
 * <table>
 * A list of possible flags for fnmatch
 * <tr valign="top">
 * <td>Flag</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>FNM_NOESCAPE</td>
 * <td>
 * Disable backslash escaping.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>FNM_PATHNAME</td>
 * <td>
 * Slash in string only matches slash in the given pattern.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>FNM_PERIOD</td>
 * <td>
 * Leading period in string must be exactly matched by period in the given pattern.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>FNM_CASEFOLD</td>
 * <td>
 * Caseless match. Part of the GNU extension.
 * </td>
 * </tr>
 * </table>
 * </p>
 * @return bool true if there is a match, false otherwise.
 */
#[Pure(true)]
function fnmatch(string $pattern, string $filename, int $flags = 0): bool {}
<?php

namespace {
    use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;

    /**
     * Creates an array.
     * @link https://php.net/manual/en/function.array.php
     * @param mixed ...$_ [optional] <p>
     * Syntax "index => values", separated by commas, define index and values.
     * index may be of type string or integer. When index is omitted, an integer index is automatically generated,
     * starting at 0. If index is an integer, next generated index will be the biggest integer index + 1.
     * Note that when two identical index are defined, the last overwrite the first.
     * </p>
     * <p>
     * Having a trailing comma after the last defined array entry, while unusual, is a valid syntax.
     * </p>
     * @return array an array of the parameters. The parameters can be given an index with the => operator.
     */
    function PS_UNRESERVE_PREFIX_array(...$_) {}

    /**
     * Assigns a list of variables in one operation.
     * @link https://php.net/manual/en/function.list.php
     * @param mixed $var1 <p>A variable.</p>
     * @param mixed ...$_ [optional] <p>Another variable ...</p>
     * @return array the assigned array.
     */
    function PS_UNRESERVE_PREFIX_list($var1, ...$_) {}

    /**
     * <p>Terminates execution of the script. Shutdown functions and object destructors will always be executed even if exit is called.</p>
     * <p>die is a language construct and it can be called without parentheses if no status is passed.</p>
     * @link https://php.net/manual/en/function.die.php
     * @param int|string $status [optional] <p>
     * If status is a string, this function prints the status just before exiting.
     * </p>
     * <p>
     * If status is an integer, that value will be used as the exit status and not printed. Exit statuses should be in the range 0 to 254,
     * the exit status 255 is reserved by PHP and shall not be used. The status 0 is used to terminate the program successfully.
     * </p>
     * <p>
     * Note: PHP >= 4.2.0 does NOT print the status if it is an integer.
     * </p>
     * @return void
     */
    function PS_UNRESERVE_PREFIX_die($status = "") {}

    /**
     * <p>Terminates execution of the script. Shutdown functions and object destructors will always be executed even if exit is called.</p>
     * <p>exit is a language construct and it can be called without parentheses if no status is passed.</p>
     * @link https://php.net/manual/en/function.exit.php
     * @param int|string $status [optional] <p>
     * If status is a string, this function prints the status just before exiting.
     * </p>
     * <p>
     * If status is an integer, that value will be used as the exit status and not printed. Exit statuses should be in the range 0 to 254,
     * the exit status 255 is reserved by PHP and shall not be used. The status 0 is used to terminate the program successfully.
     * </p>
     * <p>
     * Note: PHP >= 4.2.0 does NOT print the status if it is an integer.
     * </p>
     * @return void
     */
    function PS_UNRESERVE_PREFIX_exit($status = "") {}

    /**
     * Determine whether a variable is considered to be empty. A variable is considered empty if it does not exist or if its value
     * equals <b>FALSE</b>. <b>empty()</b> does not generate a warning if the variable does not exist.
     * @link https://php.net/manual/en/function.empty.php
     * @param mixed $var <p>Variable to be checked.</p>
     * <p>Note: Prior to PHP 5.5, <b>empty()</b> only supports variables; anything else will result in a parse error. In other words,
     * the following will not work: <b>empty(trim($name))</b>. Instead, use <b>trim($name) == false</b>.
     * </p>
     * <p>
     * No warning is generated if the variable does not exist. That means <b>empty()</b> is essentially the concise equivalent
     * to <b>!isset($var) || $var == false</b>.
     * </p>
     * @return bool <p><b>FALSE</b> if var exists and has a non-empty, non-zero value. Otherwise returns <b>TRUE</b>.<p>
     * <p>
     * The following things are considered to be empty:
     * <ul>
     * <li>"" (an empty string)</li>
     * <li>0 (0 as an integer)</li>
     * <li>0.0 (0 as a float)</li>
     * <li>"0" (0 as a string)</li>
     * <li><b>NULL</b></li>
     * <li><b>FALSE</b></li>
     * <li>array() (an empty array)</li>
     * <li>$var; (a variable declared, but without a value)</li>
     * </ul>
     * </p>
     */
    function PS_UNRESERVE_PREFIX_empty($var) {}

    /**
     * <p>Determine if a variable is set and is not <b>NULL</b>.</p>
     * <p>If a variable has been unset with unset(), it will no longer be set. <b>isset()</b> will return <b>FALSE</b> if testing a variable
     * that has been set to <b>NULL</b>. Also note that a null character ("\0") is not equivalent to the PHP <b>NULL</b> constant.</p>
     * <p>If multiple parameters are supplied then <b>isset()</b> will return <b>TRUE</b> only if all of the parameters are set.
     * Evaluation goes from left to right and stops as soon as an unset variable is encountered.</p>
     * @link https://php.net/manual/en/function.isset.php
     * @param mixed $var <p>The variable to be checked.</p>
     * @param mixed ...$_ [optional] <p>Another variable ...</p>
     * @return bool Returns <b>TRUE</b> if var exists and has value other than <b>NULL</b>, <b>FALSE</b> otherwise.
     */
    function PS_UNRESERVE_PREFIX_isset($var, ...$_) {}

    /**
     * <p>Destroys the specified variables.</p>
     * <p>The behavior of <b>unset()</b> inside of a function can vary depending on what type of variable you are attempting to destroy.</p>
     * @link https://php.net/manual/en/function.unset.php
     * @param mixed $var <p>The variable to be unset.</p>
     * @param mixed ...$_ [optional] <p>Another variable ...</p>
     * @return void
     */
    function PS_UNRESERVE_PREFIX_unset($var, ...$_) {}

    /**
     * <p>Evaluates the given code as PHP.</p>
     * <p>Caution: The <b>eval()</b> language construct is very dangerous because it allows execution of arbitrary PHP code. Its use thus is
     * discouraged. If you have carefully verified that there is no other option than to use this construct, pay special attention not to
     * pass any user provided data into it without properly validating it beforehand.</p>
     * @link https://php.net/manual/en/function.eval.php
     * @param string $code <p>
     * Valid PHP code to be evaluated.
     * </p>
     * <p>
     * The code must not be wrapped in opening and closing PHP tags, i.e. 'echo "Hi!";' must be passed instead of '<?php echo "Hi!"; ?>'.
     * It is still possible to leave and re-enter PHP mode though using the appropriate PHP tags, e.g.
     * 'echo "In PHP mode!"; ?>In HTML mode!<?php echo "Back in PHP mode!";'.
     * </p>
     * <p>
     * Apart from that the passed code must be valid PHP. This includes that all statements must be properly terminated using a semicolon.
     * 'echo "Hi!"' for example will cause a parse error, whereas 'echo "Hi!";' will work.
     * </p>
     * <p>
     * A return statement will immediately terminate the evaluation of the code.
     * </p>
     * <p>
     * The code will be executed in the scope of the code calling <b>eval()</b>. Thus any variables defined or changed in the <b>eval()</b>
     * call will remain visible after it terminates.
     * </p>
     * @return mixed <b>NULL</b> unless return is called in the evaluated code, in which case the value passed to return is returned.
     * As of PHP 7, if there is a parse error in the evaluated code, <b>eval()</b> throws a ParseError exception. Before PHP 7, in this
     * case <b>eval()</b> returned <b>FALSE</b> and execution of the following code continued normally. It is not possible to catch a parse
     * error in <b>eval()</b> using set_error_handler().
     */
    function PS_UNRESERVE_PREFIX_eval($code) {}

    /**
     * Generator objects are returned from generators, cannot be instantiated via new.
     * @link https://secure.php.net/manual/en/class.generator.php
     * @link https://wiki.php.net/rfc/generators
     *
     * @template-covariant TKey
     * @template-covariant TYield
     * @template TSend
     * @template-covariant TReturn
     *
     * @template-implements Iterator<TKey, TYield>
     */
    final class Generator implements Iterator
    {
        /**
         * Throws an exception if the generator is currently after the first yield.
         * @return void
         */
        public function rewind(): void {}

        /**
         * Returns false if the generator has been closed, true otherwise.
         * @return bool
         */
        public function valid(): bool {}

        /**
         * Returns whatever was passed to yield or null if nothing was passed or the generator is already closed.
         * @return TYield
         */
        public function current(): mixed {}

        /**
         * Returns the yielded key or, if none was specified, an auto-incrementing key or null if the generator is already closed.
         * @return TKey
         */
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: 'string|float|int|bool|null')]
        public function key() {}

        /**
         * Resumes the generator (unless the generator is already closed).
         * @return void
         */
        public function next(): void {}

        /**
         * Sets the return value of the yield expression and resumes the generator (unless the generator is already closed).
         * @param TSend $value
         * @return TYield|null
         */
        public function send(mixed $value): mixed {}

        /**
         * Throws an exception at the current suspension point in the generator.
         * @param Throwable $exception
         * @return TYield
         */
        public function PS_UNRESERVE_PREFIX_throw(Throwable $exception): mixed {}

        /**
         * Returns whatever was passed to return or null if nothing.
         * Throws an exception if the generator is still valid.
         * @link https://wiki.php.net/rfc/generator-return-expressions
         * @return TReturn
         * @since 7.0
         */
        public function getReturn(): mixed {}

        /**
         * Serialize callback
         * Throws an exception as generators can't be serialized.
         * @link https://php.net/manual/en/generator.wakeup.php
         * @return void
         */
        public function __wakeup() {}
    }

    class ClosedGeneratorException extends Exception {}
}

namespace ___PHPSTORM_HELPERS {
    class PS_UNRESERVE_PREFIX_this {}

    class PS_UNRESERVE_PREFIX_static {}

    class object
    {
        /**
         * PHP 5 allows developers to declare constructor methods for classes.
         * Classes which have a constructor method call this method on each newly-created object,
         * so it is suitable for any initialization that the object may need before it is used.
         *
         * Note: Parent constructors are not called implicitly if the child class defines a constructor.
         * In order to run a parent constructor, a call to parent::__construct() within the child constructor is required.
         *
         * param [ mixed $args [, $... ]]
         * @link https://php.net/manual/en/language.oop5.decon.php
         */
        public function __construct() {}

        /**
         * PHP 5 introduces a destructor concept similar to that of other object-oriented languages, such as C++.
         * The destructor method will be called as soon as all references to a particular object are removed or
         * when the object is explicitly destroyed or in any order in shutdown sequence.
         *
         * Like constructors, parent destructors will not be called implicitly by the engine.
         * In order to run a parent destructor, one would have to explicitly call parent::__destruct() in the destructor body.
         *
         * Note: Destructors called during the script shutdown have HTTP headers already sent.
         * The working directory in the script shutdown phase can be different with some SAPIs (e.g. Apache).
         *
         * Note: Attempting to throw an exception from a destructor (called in the time of script termination) causes a fatal error.
         *
         * @return void
         * @link https://php.net/manual/en/language.oop5.decon.php
         */
        public function __destruct() {}

        /**
         * is triggered when invoking inaccessible methods in an object context.
         *
         * @param string $name
         * @param array $arguments
         * @return mixed
         * @link https://php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.methods
         */
        public function __call(string $name, array $arguments) {}

        /**
         * is triggered when invoking inaccessible methods in a static context.
         *
         * @param string $name
         * @param array $arguments
         * @return mixed
         * @link https://php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.methods
         */
        public static function __callStatic(string $name, array $arguments) {}

        /**
         * is utilized for reading data from inaccessible members.
         *
         * @param string $name
         * @return mixed
         * @link https://php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.members
         */
        public function __get(string $name) {}

        /**
         * run when writing data to inaccessible members.
         *
         * @param string $name
         * @param mixed $value
         * @return void
         * @link https://php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.members
         */
        public function __set(string $name, $value): void {}

        /**
         * is triggered by calling isset() or empty() on inaccessible members.
         *
         * @param string $name
         * @return bool
         * @link https://php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.members
         */
        public function __isset(string $name): bool {}

        /**
         * is invoked when unset() is used on inaccessible members.
         *
         * @param string $name
         * @return void
         * @link https://php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.members
         */
        public function __unset(string $name): void {}

        /**
         * serialize() checks if your class has a function with the magic name __sleep.
         * If so, that function is executed prior to any serialization.
         * It can clean up the object and is supposed to return an array with the names of all variables of that object that should be serialized.
         * If the method doesn't return anything then NULL is serialized and E_NOTICE is issued.
         * The intended use of __sleep is to commit pending data or perform similar cleanup tasks.
         * Also, the function is useful if you have very large objects which do not need to be saved completely.
         *
         * @return string[]
         * @link https://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.sleep
         */
        public function __sleep(): array {}

        /**
         * unserialize() checks for the presence of a function with the magic name __wakeup.
         * If present, this function can reconstruct any resources that the object may have.
         * The intended use of __wakeup is to reestablish any database connections that may have been lost during
         * serialization and perform other reinitialization tasks.
         *
         * @return void
         * @link https://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.sleep
         */
        public function __wakeup(): void {}

        /**
         * The __toString method allows a class to decide how it will react when it is converted to a string.
         *
         * @return string
         * @link https://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.tostring
         */
        public function __toString(): string {}

        /**
         * The __invoke method is called when a script tries to call an object as a function.
         *
         * @return mixed
         * @link https://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.invoke
         */
        public function __invoke() {}

        /**
         * This method is called by var_dump() when dumping an object to get the properties that should be shown.
         * If the method isn't defined on an object, then all public, protected and private properties will be shown.
         *
         * @return array|null
         * @link https://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.debuginfo
         */
        public function __debugInfo(): ?array {}

        /**
         * This static method is called for classes exported by var_export() since PHP 5.1.0.
         * The only parameter of this method is an array containing exported properties in the form array('property' => value, ...).
         *
         * @param array $an_array
         * @return object
         * @link https://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.set-state
         */
        public static function __set_state(array $an_array): object {}

        /**
         * When an object is cloned, PHP 5 will perform a shallow copy of all of the object's properties.
         * Any properties that are references to other variables, will remain references.
         * Once the cloning is complete, if a __clone() method is defined,
         * then the newly created object's __clone() method will be called, to allow any necessary properties that need to be changed.
         * NOT CALLABLE DIRECTLY.
         *
         * @return void
         * @link https://php.net/manual/en/language.oop5.cloning.php
         */
        public function __clone(): void {}

        /**
         * Returns array containing all the necessary state of the object.
         * @since 7.4
         * @link https://wiki.php.net/rfc/custom_object_serialization
         */
        public function __serialize(): array {}

        /**
         * Restores the object state from the given data array.
         * @param array $data
         * @since 7.4
         * @link https://wiki.php.net/rfc/custom_object_serialization
         */
        public function __unserialize(array $data): void {}
    }
}
<?php

/**
 * @since 5.6
 */

use JetBrains\PhpStorm\ExpectedValues;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Pure;

define("ARRAY_FILTER_USE_BOTH", 1);

/**
 * @since 5.6
 */
define("ARRAY_FILTER_USE_KEY", 2);

/**
 * Merge two or more arrays recursively
 * @link https://php.net/manual/en/function.array-merge-recursive.php
 * @param array ...$arrays Variable list of arrays to recursively merge.
 * @return array An array of values resulted from merging the arguments together.
 */
#[Pure]
function array_merge_recursive(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.3')] array $arr1,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.0')] array $arrays,
    array ...$arrays
): array {}

/**
 * array_replace() replaces the values of the first array with the same values from all the following arrays.
 * If a key from the first array exists in the second array, its value will be replaced by the value from the second array.
 * If the key exists in the second array, and not the first, it will be created in the first array.
 * If a key only exists in the first array, it will be left as is. If several arrays are passed for replacement,
 * they will be processed in order, the later arrays overwriting the previous values.
 * array_replace() is not recursive : it will replace values in the first array by whatever type is in the second array.
 * @link https://php.net/manual/en/function.array-replace.php
 * @param array $array <p>
 * The array in which elements are replaced.
 * </p>
 * @param array ...$replacements <p>
 * The array from which elements will be extracted.
 * </p>
 * @return array or null if an error occurs.
 */
#[Pure]
function array_replace(
    array $array,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.0')] $replacements,
    array ...$replacements
): array {}

/**
 * Replaces elements from passed arrays into the first array recursively
 * @link https://php.net/manual/en/function.array-replace-recursive.php
 * @param array $array <p>
 * The array in which elements are replaced.
 * </p>
 * @param array ...$replacements <p>
 * The array from which elements will be extracted.
 * </p>
 * @return array an array, or null if an error occurs.
 */
#[Pure]
function array_replace_recursive(
    array $array,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.0')] $replacements,
    array ...$replacements
): array {}

/**
 * Return all the keys or a subset of the keys of an array
 * @link https://php.net/manual/en/function.array-keys.php
 * @param array $array <p>
 * An array containing keys to return.
 * </p>
 * @param mixed $filter_value [optional] <p>
 * If specified, then only keys containing these values are returned.
 * </p>
 * @param bool $strict [optional] <p>
 * Determines if strict comparison (===) should be used during the search.
 * </p>
 * @return int[]|string[] an array of all the keys in input.
 */
#[Pure]
function array_keys(array $array, mixed $filter_value, bool $strict = false): array {}

/**
 * Return all the values of an array
 * @link https://php.net/manual/en/function.array-values.php
 * @param array $array <p>
 * The array.
 * </p>
 * @return array an indexed array of values.
 * @meta
 */
#[Pure]
function array_values(array $array): array {}

/**
 * Counts all the values of an array
 * @link https://php.net/manual/en/function.array-count-values.php
 * @param array $array <p>
 * The array of values to count
 * </p>
 * @return array an associative array of values from input as
 * keys and their count as value.
 */
#[Pure]
function array_count_values(array $array): array {}

/**
 * (PHP 5 &gt;=5.5.0)<br/>
 * Return the values from a single column in the input array
 * @link https://secure.php.net/manual/en/function.array-column.php
 * @param array $array <p>A multi-dimensional array (record set) from which to pull a column of values.</p>
 * @param string|int|null $column_key <p>The column of values to return. This value may be the integer key of the column you wish to retrieve, or it may be the string key name for an associative array. It may also be NULL to return complete arrays (useful together with index_key to reindex the array).</p>
 * @param string|int|null $index_key [optional] <p>The column to use as the index/keys for the returned array. This value may be the integer key of the column, or it may be the string key name.</p>
 * @return array Returns an array of values representing a single column from the input array.
 * @since 5.5
 */
#[Pure]
function array_column(array $array, string|int|null $column_key, string|int|null $index_key = null): array {}

/**
 * Return an array with elements in reverse order
 * @link https://php.net/manual/en/function.array-reverse.php
 * @param array $array <p>
 * The input array.
 * </p>
 * @param bool $preserve_keys [optional] <p>
 * If set to true keys are preserved.
 * </p>
 * @return array the reversed array.
 * @meta
 */
#[Pure]
function array_reverse(array $array, bool $preserve_keys = false): array {}

/**
 * Iteratively reduce the array to a single value using a callback function
 * @link https://php.net/manual/en/function.array-reduce.php
 * @param array $array <p>
 * The input array.
 * </p>
 * @param callable $callback <p>
 * The callback function. Signature is <pre>callback ( mixed $carry , mixed $item ) : mixed</pre>
 * <blockquote>mixed <var>$carry</var> <p>The return value of the previous iteration; on the first iteration it holds the value of <var>$initial</var>.</p></blockquote>
 * <blockquote>mixed <var>$item</var> <p>Holds the current iteration value of the <var>$input</var></p></blockquote>
 * </p>
 * @param mixed $initial [optional] <p>
 * If the optional initial is available, it will
 * be used at the beginning of the process, or as a final result in case
 * the array is empty.
 * </p>
 * @return mixed the resulting value.
 * <p>
 * If the array is empty and initial is not passed,
 * array_reduce returns null.
 * </p>
 * <br/>
 * <p>
 * Example use:
 * <blockquote><pre>array_reduce(['2', '3', '4'], function($ax, $dx) { return $ax . ", {$dx}"; }, '1')  // Returns '1, 2, 3, 4'</pre></blockquote>
 * <blockquote><pre>array_reduce(['2', '3', '4'], function($ax, $dx) { return $ax + (int)$dx; }, 1)  // Returns 10</pre></blockquote>
 * <br/>
 * </p>
 * @meta
 */
function array_reduce(array $array, callable $callback, mixed $initial = null): mixed {}

/**
 * Pad array to the specified length with a value
 * @link https://php.net/manual/en/function.array-pad.php
 * @param array $array <p>
 * Initial array of values to pad.
 * </p>
 * @param int $length <p>
 * New size of the array.
 * </p>
 * @param mixed $value <p>
 * Value to pad if input is less than
 * pad_size.
 * </p>
 * @return array a copy of the input padded to size specified
 * by pad_size with value
 * pad_value. If pad_size is
 * positive then the array is padded on the right, if it's negative then
 * on the left. If the absolute value of pad_size is less than or equal to
 * the length of the input then no padding takes place.
 */
#[Pure]
function array_pad(array $array, int $length, mixed $value): array {}

/**
 * Exchanges all keys with their associated values in an array
 * @link https://php.net/manual/en/function.array-flip.php
 * @param int[]|string[] $array <p>
 * An array of key/value pairs to be flipped.
 * </p>
 * @return int[]|string[] Returns the flipped array.
 */
#[Pure]
function array_flip(array $array): array {}

/**
 * Changes the case of all keys in an array
 * @link https://php.net/manual/en/function.array-change-key-case.php
 * @param array $array <p>
 * The array to work on
 * </p>
 * @param int $case <p>
 * Either CASE_UPPER or
 * CASE_LOWER (default)
 * </p>
 * @return array an array with its keys lower or uppercased
 * @meta
 */
#[Pure]
function array_change_key_case(array $array, int $case = CASE_LOWER): array {}

/**
 * Pick one or more random keys out of an array
 * @link https://php.net/manual/en/function.array-rand.php
 * @param array $array <p>
 * The input array.
 * </p>
 * @param int $num [optional] <p>
 * Specifies how many entries you want to pick.
 * </p>
 * @return int|string|array If you are picking only one entry, array_rand
 * returns the key for a random entry. Otherwise, it returns an array
 * of keys for the random entries. This is done so that you can pick
 * random keys as well as values out of the array.
 */
function array_rand(array $array, int $num = 1): array|string|int {}

/**
 * Removes duplicate values from an array
 * @link https://php.net/manual/en/function.array-unique.php
 * @param array $array <p>
 * The input array.
 * </p>
 * @param int $flags [optional] <p>
 * The optional second parameter sort_flags
 * may be used to modify the sorting behavior using these values:
 * </p>
 * <p>
 * Sorting type flags:
 * </p><ul>
 * <li>
 * <b>SORT_REGULAR</b> - compare items normally
 * (don't change types)
 * </li>
 * <li>
 * <b>SORT_NUMERIC</b> - compare items numerically
 * </li>
 * <li>
 * <b>SORT_STRING</b> - compare items as strings
 * </li>
 * <li>
 * <b>SORT_LOCALE_STRING</b> - compare items as strings,
 * based on the current locale
 * </li>
 * </ul>
 * @return array the filtered array.
 * @meta
 */
#[Pure]
function array_unique(array $array, int $flags = SORT_STRING): array {}

/**
 * Computes the intersection of arrays
 * @link https://php.net/manual/en/function.array-intersect.php
 * @param array $array <p>
 * The array with main values to check.
 * </p>
 * @param array ...$arrays arrays to compare values against.
 * @return array an array containing all of the values in
 * array1 whose values exist in all of the parameters.
 * @meta
 */
#[Pure]
function array_intersect(array $array, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $arrays, array ...$arrays): array {}

/**
 * Computes the intersection of arrays using keys for comparison
 * @link https://php.net/manual/en/function.array-intersect-key.php
 * @param array $array <p>
 * The array with main keys to check.
 * </p>
 * @param array ...$arrays
 * @return array an associative array containing all the values and keys of
 * array1 which have keys that are present in all
 * arguments.
 * @meta
 */
#[Pure]
function array_intersect_key(array $array, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $arrays, array ...$arrays): array {}

/**
 * Computes the intersection of arrays using a callback function on the keys for comparison
 * @link https://php.net/manual/en/function.array-intersect-ukey.php
 * @param array $array <p>
 * Initial array for comparison of the arrays.
 * </p>
 * @param array $array2 <p>
 * First array to compare keys against.
 * </p>
 * @param callable $key_compare_func <p>
 * User supplied callback function to do the comparison.
 * </p>
 * @param ...$rest [optional]
 * @return array the values of array1 whose keys exist
 * in all the arguments.
 * @meta
 */
function array_intersect_ukey(
    array $array,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] array $array2,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] callable $key_compare_func,
    #[PhpStormStubsElementAvailable(from: '8.0')] ...$rest
): array {}

/**
 * Computes the intersection of arrays, compares data by a callback function
 * @link https://php.net/manual/en/function.array-uintersect.php
 * @param array $array <p>
 * The first array.
 * </p>
 * @param array $array2 <p>
 * The second array.
 * </p>
 * @param callable $data_compare_func <p>
 * The callback comparison function.
 * </p>
 * @param array ...$rest
 * <p>
 * The user supplied callback function is used for comparison.
 * It must return an integer less than, equal to, or greater than zero if
 * the first argument is considered to be respectively less than, equal
 * to, or greater than the second.
 * </p>
 * @return array an array containing all the values and keys of array1
 * that are present in all the arguments.
 * @meta
 */
function array_uintersect(
    array $array,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] array $array2,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] callable $data_compare_func,
    #[PhpStormStubsElementAvailable(from: '8.0')] ...$rest
): array {}

/**
 * Computes the intersection of arrays with additional index check
 * @link https://php.net/manual/en/function.array-intersect-assoc.php
 * @param array $array <p>
 * The array with main values to check.
 * </p>
 * @param array $arrays
 * @return array an associative array containing all the values and keys in
 * array1 that are present in all of the arguments.
 * @meta
 */
#[Pure]
function array_intersect_assoc(array $array, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $arrays, array ...$arrays): array {}

/**
 * Computes the intersection of arrays with additional index check, compares data by a callback function
 * @link https://php.net/manual/en/function.array-uintersect-assoc.php
 * @param array $array <p>
 * The first array.
 * </p>
 * @param array $array2 <p>
 * The second array.
 * </p>
 * @param callable $data_compare_func <p>
 * For comparison is used the user supplied callback function.
 * It must return an integer less than, equal
 * to, or greater than zero if the first argument is considered to
 * be respectively less than, equal to, or greater than the
 * second.
 * </p>
 * @param array ...$rest
 * @return array an array containing all the values and keys of
 * array1 that are present in all the arguments.
 * @meta
 */
function array_uintersect_assoc(
    array $array,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] array $array2,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] callable $data_compare_func,
    #[PhpStormStubsElementAvailable(from: '8.0')] ...$rest
): array {}

/**
 * Computes the intersection of arrays with additional index check, compares indexes by a callback function
 * @link https://php.net/manual/en/function.array-intersect-uassoc.php
 * @param array $array <p>
 * Initial array for comparison of the arrays.
 * </p>
 * @param array $array2 <p>
 * First array to compare keys against.
 * </p>
 * @param callable $key_compare_func <p>
 * User supplied callback function to do the comparison.
 * </p>
 * @param array ...$rest
 * @return array the values of array1 whose values exist
 * in all of the arguments.
 * @meta
 */
function array_intersect_uassoc(
    array $array,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] array $array2,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] callable $key_compare_func,
    #[PhpStormStubsElementAvailable(from: '8.0')] ...$rest
): array {}

/**
 * Computes the intersection of arrays with additional index check, compares data and indexes by separate callback functions
 * @link https://php.net/manual/en/function.array-uintersect-uassoc.php
 * @param array $array <p>
 * The first array.
 * </p>
 * @param array $array2 <p>
 * The second array.
 * </p>
 * @param callable $data_compare_func <p>
 * For comparison is used the user supplied callback function.
 * It must return an integer less than, equal
 * to, or greater than zero if the first argument is considered to
 * be respectively less than, equal to, or greater than the
 * second.
 * </p>
 * @param callable $key_compare_func <p>
 * Key comparison callback function.
 * </p>
 * @param array ...$rest
 * @return array an array containing all the values and keys of
 * array1 that are present in all the arguments.
 * @meta
 */
#[Pure]
function array_uintersect_uassoc(
    array $array,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] array $array2,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] callable $data_compare_func,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] callable $key_compare_func,
    #[PhpStormStubsElementAvailable(from: '8.0')] ...$rest
): array {}

/**
 * Computes the difference of arrays
 * @link https://php.net/manual/en/function.array-diff.php
 * @param array $array <p>
 * The array to compare from
 * </p>
 * @param array ...$arrays
 * @return array an array containing all the entries from
 * array1 that are not present in any of the other arrays.
 * @meta
 */
#[Pure]
function array_diff(array $array, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $arrays, array ...$arrays): array {}

/**
 * Computes the difference of arrays using keys for comparison
 * @link https://php.net/manual/en/function.array-diff-key.php
 * @param array $array <p>
 * The array to compare from
 * </p>
 * @param array $arrays <p>
 * An array to compare against
 * </p>
 * @return array an array containing all the values and keys from
 * array1 whose keys are not present in any of the
 * other arrays.
 * @meta
 */
#[Pure]
function array_diff_key(array $array, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $arrays, array ...$arrays): array {}

/**
 * Computes the difference of arrays using a callback function on the keys for comparison
 * @link https://php.net/manual/en/function.array-diff-ukey.php
 * @param array $array <p>
 * The array to compare from
 * </p>
 * @param array $array2 <p>
 * An array to compare against
 * </p>
 * @param callable $key_compare_func <p>
 * callback function to use.
 * The callback function must return an integer less than, equal
 * to, or greater than zero if the first argument is considered to
 * be respectively less than, equal to, or greater than the second.
 * </p>
 * @param array ...$rest [optional]
 * @return array an array containing all the values and keys from
 * array1 that are not present in any of the other arrays.
 * @meta
 */
function array_diff_ukey(
    array $array,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] array $array2,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] callable $key_compare_func,
    #[PhpStormStubsElementAvailable(from: '8.0')] ...$rest,
): array {}

/**
 * Computes the difference of arrays by using a callback function for data comparison
 * @link https://php.net/manual/en/function.array-udiff.php
 * @param array $array <p>
 * The first array.
 * </p>
 * @param array $array2 <p>
 * The second array.
 * </p>
 * @param callable $data_compare_func <p>
 * The callback comparison function.
 * </p>
 * <p>
 * The user supplied callback function is used for comparison.
 * It must return an integer less than, equal to, or greater than zero if
 * the first argument is considered to be respectively less than, equal
 * to, or greater than the second.
 * </p>
 * @param array ...$rest [optional]
 * @return array an array containing all the values and keys of array1
 * that are not present in any of the other arguments.
 * @meta
 */
function array_udiff(
    array $array,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] array $array2,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] callable $data_compare_func,
    #[PhpStormStubsElementAvailable(from: '8.0')] ...$rest,
): array {}

/**
 * Computes the difference of arrays with additional index check
 * @link https://php.net/manual/en/function.array-diff-assoc.php
 * @param array $array <p>
 * The array to compare from
 * </p>
 * @param array $arrays <p>
 * An array to compare against
 * </p>
 * @return array an array containing all the values from
 * array1 that are not present in any of the other arrays.
 * @meta
 */
#[Pure]
function array_diff_assoc(
    array $array,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $arrays,
    array ...$arrays
): array {}

/**
 * Computes the difference of arrays with additional index check, compares data by a callback function
 * @link https://php.net/manual/en/function.array-udiff-assoc.php
 * @param array $array <p>
 * The first array.
 * </p>
 * @param array $array2 <p>
 * The second array.
 * </p>
 * @param callable $data_compare_func <p>
 * The callback comparison function.
 * </p>
 * <p>
 * The user supplied callback function is used for comparison.
 * It must return an integer less than, equal to, or greater than zero if
 * the first argument is considered to be respectively less than, equal
 * to, or greater than the second.
 * </p>
 * @param array ...$rest [optional]
 * @return array array_udiff_assoc returns an array
 * containing all the values and keys from array1
 * that are not present in any of the other arguments.
 * Note that the keys are used in the comparison unlike
 * array_diff and array_udiff.
 * The comparison of arrays' data is performed by using an user-supplied
 * callback. In this aspect the behaviour is opposite to the behaviour of
 * array_diff_assoc which uses internal function for
 * comparison.
 * @meta
 */
function array_udiff_assoc(
    array $array,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] array $array2,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] callable $data_compare_func,
    #[PhpStormStubsElementAvailable(from: '8.0')] ...$rest,
): array {}

/**
 * Computes the difference of arrays with additional index check which is performed by a user supplied callback function
 * @link https://php.net/manual/en/function.array-diff-uassoc.php
 * @param array $array <p>
 * The array to compare from
 * </p>
 * @param array $array2 <p>
 * An array to compare against
 * </p>
 * @param callable $key_compare_func <p>
 * callback function to use.
 * The callback function must return an integer less than, equal
 * to, or greater than zero if the first argument is considered to
 * be respectively less than, equal to, or greater than the second.
 * </p>
 * @param array ...$rest [optional]
 * @return array an array containing all the values and keys from
 * array1 that are not present in any of the other arrays.
 * @meta
 */
function array_diff_uassoc(
    array $array,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] array $array2,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] callable $key_compare_func,
    #[PhpStormStubsElementAvailable(from: '8.0')] ...$rest,
): array {}

/**
 * Computes the difference of arrays with additional index check, compares data and indexes by a callback function
 * @link https://php.net/manual/en/function.array-udiff-uassoc.php
 * @param array $array <p>
 * The first array.
 * </p>
 * @param array $array2 <p>
 * The second array.
 * </p>
 * @param callable $data_compare_func <p>
 * The callback comparison function.
 * </p>
 * <p>
 * The user supplied callback function is used for comparison.
 * It must return an integer less than, equal to, or greater than zero if
 * the first argument is considered to be respectively less than, equal
 * to, or greater than the second.
 * </p>
 * <p>
 * The comparison of arrays' data is performed by using an user-supplied
 * callback : data_compare_func. In this aspect
 * the behaviour is opposite to the behaviour of
 * array_diff_assoc which uses internal function for
 * comparison.
 * </p>
 * @param callable $key_compare_func <p>
 * The comparison of keys (indices) is done also by the callback function
 * key_compare_func. This behaviour is unlike what
 * array_udiff_assoc does, since the latter compares
 * the indices by using an internal function.
 * </p>
 * @param array ...$rest [optional]
 * @return array an array containing all the values and keys from
 * array1 that are not present in any of the other
 * arguments.
 * @meta
 */
function array_udiff_uassoc(
    array $array,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] array $array2,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] callable $data_compare_func,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] callable $key_compare_func,
    #[PhpStormStubsElementAvailable(from: '8.0')] ...$rest
): array {}

/**
 * Calculate the sum of values in an array
 * @link https://php.net/manual/en/function.array-sum.php
 * @param array $array <p>
 * The input array.
 * </p>
 * @return int|float the sum of values as an integer or float.
 */
#[Pure]
function array_sum(array $array): int|float {}

/**
 * Calculate the product of values in an array
 * @link https://php.net/manual/en/function.array-product.php
 * @param array $array <p>
 * The array.
 * </p>
 * @return int|float the product as an integer or float.
 */
#[Pure]
function array_product(array $array): int|float {}

/**
 * Iterates over each value in the <b>array</b>
 * passing them to the <b>callback</b> function.
 * If the <b>callback</b> function returns true, the
 * current value from <b>array</b> is returned into
 * the result array. Array keys are preserved.
 * @link https://php.net/manual/en/function.array-filter.php
 * @param array $array <p>
 * The array to iterate over
 * </p>
 * @param callable|null $callback [optional] <p>
 * The callback function to use
 * </p>
 * <p>
 * If no callback is supplied, all entries of
 * input equal to false (see
 * converting to
 * boolean) will be removed.
 * </p>
 * @param int $mode [optional] <p>
 * Flag determining what arguments are sent to <i>callback</i>:
 * </p><ul>
 * <li>
 * <b>ARRAY_FILTER_USE_KEY</b> - pass key as the only argument
 * to <i>callback</i> instead of the value</span>
 * </li>
 * <li>
 * <b>ARRAY_FILTER_USE_BOTH</b> - pass both value and key as
 * arguments to <i>callback</i> instead of the value</span>
 * </li>
 * </ul>
 * @return array the filtered array.
 * @meta
 */
function array_filter(array $array, ?callable $callback, int $mode = 0): array {}

/**
 * Applies the callback to the elements of the given arrays
 * @link https://php.net/manual/en/function.array-map.php
 * @param callable|null $callback <p>
 * Callback function to run for each element in each array.
 * </p>
 * @param array $array <p>
 * An array to run through the callback function.
 * </p>
 * @param array ...$arrays
 * @return array an array containing all the elements of arr1
 * after applying the callback function to each one.
 * @meta
 */
function array_map(
    ?callable $callback,
    #[PhpStormStubsElementAvailable(from: '8.0')] array $array,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $arrays,
    array ...$arrays
): array {}

/**
 * Split an array into chunks
 * @link https://php.net/manual/en/function.array-chunk.php
 * @param array $array <p>
 * The array to work on
 * </p>
 * @param int $length <p>
 * The size of each chunk
 * </p>
 * @param bool $preserve_keys [optional] <p>
 * When set to true keys will be preserved.
 * Default is false which will reindex the chunk numerically
 * </p>
 * @return array a multidimensional numerically indexed array, starting with zero,
 * with each dimension containing size elements.
 */
#[Pure]
function array_chunk(array $array, int $length, bool $preserve_keys = false): array {}

/**
 * Creates an array by using one array for keys and another for its values
 * @link https://php.net/manual/en/function.array-combine.php
 * @param array $keys <p>
 * Array of keys to be used. Illegal values for key will be
 * converted to string.
 * </p>
 * @param array $values <p>
 * Array of values to be used
 * </p>
 * @return array|false the combined array, false if the number of elements
 * for each array isn't equal or if the arrays are empty.
 * @meta
 */
#[Pure]
#[LanguageLevelTypeAware(["8.0" => "array"], default: "array|false")]
function array_combine(array $keys, array $values) {}

/**
 * Checks if the given key or index exists in the array
 * @link https://php.net/manual/en/function.array-key-exists.php
 * @param int|string $key <p>
 * Value to check.
 * </p>
 * @param array|ArrayObject $array <p>
 * An array with keys to check.
 * </p>
 * @return bool true on success or false on failure.
 */
#[Pure]
function array_key_exists($key, #[LanguageLevelTypeAware(["8.0" => "array"], default: "array|ArrayObject")] $array): bool {}

/**
 * Gets the first key of an array
 *
 * Get the first key of the given array without affecting the internal array pointer.
 *
 * @link https://secure.php.net/array_key_first
 * @param array $array An array
 * @return string|int|null Returns the first key of array if the array is not empty; NULL otherwise.
 * @since 7.3
 */
#[Pure]
function array_key_first(array $array): string|int|null {}

/**
 * Gets the last key of an array
 *
 * Get the last key of the given array without affecting the internal array pointer.
 *
 * @link https://secure.php.net/array_key_last
 * @param array $array An array
 * @return string|int|null Returns the last key of array if the array is not empty; NULL otherwise.
 * @since 7.3
 */
#[Pure]
function array_key_last(array $array): string|int|null {}

/**
 * @link https://secure.php.net/array_is_list
 * @param array $array An array
 * @return bool return true if the array keys are 0 .. count($array)-1 in that order.
 * For other arrays, it returns false. For non-arrays, it throws a TypeError.
 * @since 8.1
 */
#[Pure]
function array_is_list(array $array): bool {}

/**
 * Alias:
 * {@see current}
 * @link https://php.net/manual/en/function.pos.php
 * @param array|ArrayAccess $array
 * @return mixed
 */
#[Pure]
function pos(object|array $array): mixed {}

/**
 * Alias:
 * {@see \count}
 * @link https://php.net/manual/en/function.sizeof.php
 * @param array|Countable $value
 * @param int $mode [optional]
 * @return int<0, max>
 */
#[Pure]
function sizeof(Countable|array $value, int $mode = COUNT_NORMAL): int {}

/**
 * Checks if the given key or index exists in the array. The name of this function is array_key_exists() in PHP > 4.0.6.
 * @link https://php.net/manual/en/function.array-key-exists.php
 * @param int|string $key <p>
 * Value to check.
 * </p>
 * @param array $array <p>
 * An array with keys to check.
 * </p>
 * @return bool true on success or false on failure.
 */
#[Pure]
function key_exists($key, array $array): bool {}

/**
 * Checks if assertion is <b>FALSE</b>
 * @link https://php.net/manual/en/function.assert.php
 * @param Throwable|string|null $assertion <p>
 * The assertion.
 * In PHP 5, this must be either a string to be evaluated or a boolean to be tested.
 * In PHP 7, this may also be any expression that returns a value,
 * which will be executed and the result used to indicate whether the assertion succeeded or failed.<br/>
 * Since 7.2.0 using string is deprecated.
 * </p>
 * @param string $description [optional]
 * <p>An optional description that will be included in the failure message if the assertion fails.</p>
 * @return bool false if the assertion is false, true otherwise.
 */
function assert(
    mixed $assertion,
    #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['7.0' => 'Throwable|string|null'], default: 'string')] $description = null
): bool {}

/**
 * AssertionError is thrown when an assertion made via {@see assert()} fails.
 * @link https://php.net/manual/en/class.assertionerror.php
 * @since 7.0
 */
class AssertionError extends Error {}

/**
 * Set/get the various assert flags
 * @link https://php.net/manual/en/function.assert-options.php
 * @param int $option <p>
 * <table>
 * Assert Options
 * <tr valign="top">
 * <td>Option</td>
 * <td>INI Setting</td>
 * <td>Default value</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>ASSERT_ACTIVE</td>
 * <td>assert.active</td>
 * <td>1</td>
 * <td>enable assert evaluation</td>
 * </tr>
 * <tr valign="top">
 * <td>ASSERT_WARNING</td>
 * <td>assert.warning</td>
 * <td>1</td>
 * <td>issue a PHP warning for each failed assertion</td>
 * </tr>
 * <tr valign="top">
 * <td>ASSERT_BAIL</td>
 * <td>assert.bail</td>
 * <td>0</td>
 * <td>terminate execution on failed assertions</td>
 * </tr>
 * <tr valign="top">
 * <td>ASSERT_QUIET_EVAL</td>
 * <td>assert.quiet_eval</td>
 * <td>0</td>
 * <td>
 * disable error_reporting during assertion expression
 * evaluation
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>ASSERT_CALLBACK</td>
 * <td>assert.callback</td>
 * <td>null</td>
 * <td>Callback to call on failed assertions</td>
 * </tr>
 * </table>
 * </p>
 * @param mixed $value [optional] <p>
 * An optional new value for the option.
 * </p>
 * @return mixed The original setting of any option.
 */
function assert_options(int $option, mixed $value): mixed {}

/**
 * Compares two "PHP-standardized" version number strings
 * @link https://php.net/manual/en/function.version-compare.php
 * @param string $version1 <p>
 * First version number.
 * </p>
 * @param string $version2 <p>
 * Second version number.
 * </p>
 * @param string|null $operator [optional] <p>
 * If you specify the third optional operator
 * argument, you can test for a particular relationship. The
 * possible operators are: &lt;,
 * lt, &lt;=,
 * le, &gt;,
 * gt, &gt;=,
 * ge, ==,
 * =, eq,
 * !=, &lt;&gt;,
 * ne respectively.
 * </p>
 * <p>
 * This parameter is case-sensitive, so values should be lowercase.
 * </p>
 * @return int|bool By default, version_compare returns
 * -1 if the first version is lower than the second,
 * 0 if they are equal, and
 * 1 if the second is lower.
 * </p>
 * <p>
 * When using the optional operator argument, the
 * function will return true if the relationship is the one specified
 * by the operator, false otherwise.
 */
#[ExpectedValues([-1, 0, 1, false, true])]
function version_compare(
    string $version1,
    string $version2,
    #[ExpectedValues(values: [
               "<",
               "lt",
               "<=",
               "le",
               ">",
               "gt",
               ">=",
               "ge",
               "==",
               "=",
               "eq",
               "!=",
               "<>",
               "ne"
           ])] ?string $operator
): int|bool {}

/**
 * Convert a pathname and a project identifier to a System V IPC key
 * @link https://php.net/manual/en/function.ftok.php
 * @param string $filename <p>
 * Path to an accessible file.
 * </p>
 * @param string $project_id <p>
 * Project identifier. This must be a one character string.
 * </p>
 * @return int On success the return value will be the created key value, otherwise
 * -1 is returned.
 */
#[Pure(true)]
function ftok(string $filename, string $project_id): int {}

/**
 * Perform the rot13 transform on a string
 * @link https://php.net/manual/en/function.str-rot13.php
 * @param string $string <p>
 * The input string.
 * </p>
 * @return string the ROT13 version of the given string.
 */
#[Pure]
function str_rot13(string $string): string {}

/**
 * Retrieve list of registered filters
 * @link https://php.net/manual/en/function.stream-get-filters.php
 * @return list<string> an indexed array containing the name of all stream filters
 * available.
 */
#[Pure(true)]
function stream_get_filters(): array {}

/**
 * Check if a stream is a TTY
 * @link https://php.net/manual/en/function.stream-isatty.php
 * @param resource $stream
 * @return bool
 * @since 7.2
 */
#[Pure]
function stream_isatty($stream): bool {}

/**
 * Register a user defined stream filter
 * @link https://php.net/manual/en/function.stream-filter-register.php
 * @param string $filter_name <p>
 * The filter name to be registered.
 * </p>
 * @param string $class <p>
 * To implement a filter, you need to define a class as an extension of
 * php_user_filter with a number of member functions
 * as defined below. When performing read/write operations on the stream
 * to which your filter is attached, PHP will pass the data through your
 * filter (and any other filters attached to that stream) so that the
 * data may be modified as desired. You must implement the methods
 * exactly as described below - doing otherwise will lead to undefined
 * behaviour.
 * </p>
 * intfilter
 * resourcein
 * resourceout
 * intconsumed
 * boolclosing
 * <p>
 * This method is called whenever data is read from or written to
 * the attached stream (such as with fread or fwrite).
 * in is a resource pointing to a bucket brigade
 * which contains one or more bucket objects containing data to be filtered.
 * out is a resource pointing to a second bucket brigade
 * into which your modified buckets should be placed.
 * consumed, which must always
 * be declared by reference, should be incremented by the length of the data
 * which your filter reads in and alters. In most cases this means you will
 * increment consumed by $bucket->datalen
 * for each $bucket. If the stream is in the process of closing
 * (and therefore this is the last pass through the filterchain),
 * the closing parameter will be set to true.
 * The filter method must return one of
 * three values upon completion.
 * <tr valign="top">
 * <td>Return Value</td>
 * <td>Meaning</td>
 * </tr>
 * <tr valign="top">
 * <td>PSFS_PASS_ON</td>
 * <td>
 * Filter processed successfully with data available in the
 * out bucket brigade.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>PSFS_FEED_ME</td>
 * <td>
 * Filter processed successfully, however no data was available to
 * return. More data is required from the stream or prior filter.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>PSFS_ERR_FATAL (default)</td>
 * <td>
 * The filter experienced an unrecoverable error and cannot continue.
 * </td>
 * </tr>
 * </p>
 * boolonCreate
 * This method is called during instantiation of the filter class
 * object. If your filter allocates or initializes any other resources
 * (such as a buffer), this is the place to do it. Your implementation of
 * this method should return false on failure, or true on success.
 * When your filter is first instantiated, and
 * yourfilter-&gt;onCreate() is called, a number of properties
 * will be available as shown in the table below.
 * <p>
 * <tr valign="top">
 * <td>Property</td>
 * <td>Contents</td>
 * </tr>
 * <tr valign="top">
 * <td>FilterClass-&gt;filtername</td>
 * <td>
 * A string containing the name the filter was instantiated with.
 * Filters may be registered under multiple names or under wildcards.
 * Use this property to determine which name was used.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>FilterClass-&gt;params</td>
 * <td>
 * The contents of the params parameter passed
 * to stream_filter_append
 * or stream_filter_prepend.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>FilterClass-&gt;stream</td>
 * <td>
 * The stream resource being filtered. Maybe available only during
 * filter calls when the
 * closing parameter is set to false.
 * </td>
 * </tr>
 * </p>
 * voidonClose
 * <p>
 * This method is called upon filter shutdown (typically, this is also
 * during stream shutdown), and is executed after
 * the flush method is called. If any resources
 * were allocated or initialized during onCreate()
 * this would be the time to destroy or dispose of them.
 * </p>
 * @return bool true on success or false on failure.
 * <p>
 * stream_filter_register will return false if the
 * filtername is already defined.
 * </p>
 */
function stream_filter_register(string $filter_name, string $class): bool {}

/**
 * Return a bucket object from the brigade for operating on
 * @link https://php.net/manual/en/function.stream-bucket-make-writeable.php
 * @param resource $brigade
 * @return object|null
 */
function stream_bucket_make_writeable($brigade): ?object {}

/**
 * Prepend bucket to brigade
 * @link https://php.net/manual/en/function.stream-bucket-prepend.php
 * @param resource $brigade
 * @param object $bucket
 * @return void
 */
function stream_bucket_prepend($brigade, object $bucket): void {}

/**
 * Append bucket to brigade
 * @link https://php.net/manual/en/function.stream-bucket-append.php
 * @param resource $brigade
 * @param object $bucket
 * @return void
 */
function stream_bucket_append($brigade, object $bucket): void {}

/**
 * Create a new bucket for use on the current stream
 * @link https://php.net/manual/en/function.stream-bucket-new.php
 * @param resource $stream
 * @param string $buffer
 * @return object
 */
function stream_bucket_new($stream, string $buffer): object {}

/**
 * Add URL rewriter values
 * @link https://php.net/manual/en/function.output-add-rewrite-var.php
 * @param string $name <p>
 * The variable name.
 * </p>
 * @param string $value <p>
 * The variable value.
 * </p>
 * @return bool true on success or false on failure.
 */
function output_add_rewrite_var(string $name, string $value): bool {}

/**
 * Reset URL rewriter values
 * <table>
 * <thead>
 * <tr>
 * <th>Version</th>
 * <th>Description</th>
 * </tr>
 *
 * </thead>
 *
 * <tbody>
 * <tr>
 * <td>7.1.0</td>
 * <td>
 * Before PHP 7.1.0, rewrite vars set by <span class="function"><a href="function.output-add-rewrite-var.php" class="function">output_add_rewrite_var()</a></span>
 * use the same Session module trans sid output buffer. Since PHP 7.1.0,
 * dedicated output buffer is used and {@see output_reset_rewrite_vars()}
 * only removes rewrite vars defined by {@see output_add_rewrite_var()}.
 * </td>
 * </tr>
 *
 * </tbody>
 *
 * </table>
 *
 * @link https://php.net/manual/en/function.output-reset-rewrite-vars.php
 * @return bool true on success or false on failure.
 */
function output_reset_rewrite_vars(): bool {}

/**
 * Returns directory path used for temporary files
 * @link https://php.net/manual/en/function.sys-get-temp-dir.php
 * @return string the path of the temporary directory.
 * @since 5.2.1
 */
function sys_get_temp_dir(): string {}

/**
 * Get the contents of the realpath cache.
 * @link https://php.net/manual/en/function.realpath-cache-get.php
 * @return array Returns an array of realpath cache entries. The keys are
 * original path entries, and the values are arrays of data items,
 * containing the resolved path, expiration date, and other options kept in
 * the cache.
 * @since 5.3.2
 */
#[Pure(true)]
function realpath_cache_get(): array {}

/**
 * Get the amount of memory used by the realpath cache.
 * @link https://php.net/manual/en/function.realpath-cache-size.php
 * @return int Returns how much memory realpath cache is using.
 * @since 5.3.2
 */
#[Pure(true)]
function realpath_cache_size(): int {}

/**
 * It returns the same result as (array) $object, with the
 * exception that it ignores overloaded array casts, such as used by
 * ArrayObject.
 * @param object $object
 * @return array returns the mangled object properties
 * @since 7.4
 */
function get_mangled_object_vars(object $object): array {}

/**
 * Get the type or object name of a variable
 *
 * @param mixed $value The variable being type checked.
 * @return string Possibles values for the returned string are:
 *  - "int"
 *  - "float"
 *  - "bool"
 *  - "string"
 *  - "array"
 *  - "null"
 *  - A class name for named classes
 *  - "class@anonymous" for an anonymous classes
 *  - "resource (xxx)" for any resources where "xxx" is a name of resource
 *  - "resource (closed)" for closed resources
 * @since 8.0
 */
#[Pure]
function get_debug_type(mixed $value): string {}

/**
 * A more obvious and type-safe form of "(int) $resource"
 *
 * @param resource $resource
 * @return int
 * @since 8.0
 */
#[Pure]
function get_resource_id($resource): int {}
<?php

use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Pure;

/**
 * Loads a php extension at runtime
 * @param string $extension_filename <p>
 * This parameter is only the filename of the
 * extension to load which also depends on your platform. For example,
 * the sockets extension (if compiled
 * as a shared module, not the default!) would be called
 * sockets.so on Unix platforms whereas it is called
 * php_sockets.dll on the Windows platform.
 * </p>
 * <p>
 * The directory where the extension is loaded from depends on your
 * platform:
 * </p>
 * <p>
 * Windows - If not explicitly set in the <i>php.ini</i>, the extension is
 * loaded from C:\php4\extensions\ (PHP 4) or
 * C:\php5\ (PHP 5) by default.
 * </p>
 * <p>
 * Unix - If not explicitly set in the <i>php.ini</i>, the default extension
 * directory depends on
 * whether PHP has been built with --enable-debug
 * or not</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. If the functionality of loading modules is not available
 * or has been disabled (either by setting
 * enable_dl off or by enabling safe mode
 * in <i>php.ini</i>) an <b>E_ERROR</b> is emitted
 * and execution is stopped. If <b>dl</b> fails because the
 * specified library couldn't be loaded, in addition to <b>FALSE</b> an
 * <b>E_WARNING</b> message is emitted.
 * Loads a PHP extension at runtime
 * @link https://php.net/manual/en/function.dl.php
 */
#[Deprecated(since: '5.3')]
function dl(string $extension_filename): bool {}

/**
 * Sets the process title
 * @link https://php.net/manual/en/function.cli-set-process-title.php
 * @param string $title <p>
 * The new title.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * @since 5.5
 */
function cli_set_process_title(string $title): bool {}

/**
 * Returns the current process title, as set by cli_set_process_title(). Note that this may not exactly match what is shown in ps or top, depending on your operating system.
 *
 * @link https://php.net/manual/en/function.cli-get-process-title.php
 * @return string|null Return a string with the current process title or <b>NULL</b> on error.
 * @since 5.5
 */
#[Pure(true)]
function cli_get_process_title(): ?string {}

/**
 * Verify that the contents of a variable is accepted by the iterable pseudo-type, i.e. that it is an array or an object implementing Traversable
 * @param mixed $value
 * @return bool
 * @since 7.1
 * @link https://php.net/manual/en/function.is-iterable.php
 */
#[Pure]
function is_iterable(mixed $value): bool {}

/**
 * Encodes an ISO-8859-1 string to UTF-8
 * @link https://php.net/manual/en/function.utf8-encode.php
 * @param string $string <p>
 * An ISO-8859-1 string.
 * </p>
 * @return string the UTF-8 translation of <i>data</i>.
 * @deprecated 8.2 Consider to use {@link mb_convert_encoding}, {@link UConverter::transcode()} or {@link iconv()}
 */
#[Pure]
#[Deprecated(replacement: "mb_convert_encoding(%parameter0%, 'UTF-8')", since: "8.2")]
function utf8_encode(string $string): string {}

/**
 * Converts a string with ISO-8859-1 characters encoded with UTF-8
 * to single-byte ISO-8859-1
 * @link https://php.net/manual/en/function.utf8-decode.php
 * @param string $string <p>
 * An UTF-8 encoded string.
 * </p>
 * @return string the ISO-8859-1 translation of <i>data</i>.
 * @deprecated 8.2 Consider to use {@link mb_convert_encoding}, {@link UConverter::transcode()} or {@link iconv()}
 */
#[Pure]
#[Deprecated(replacement: "mb_convert_encoding(%parameter0%, 'ISO-8859-1')", since: "8.2")]
function utf8_decode(string $string): string {}

/**
 * Clear the most recent error
 * @link https://php.net/manual/en/function.error-clear-last.php
 * @return void
 * @since 7.0
 */
function error_clear_last(): void {}

/**
 * Get process codepage
 * @link https://php.net/manual/en/function.sapi-windows-cp-get
 * @param string $kind The kind of operating system codepage to get, either 'ansi' or 'oem'. Any other value refers to the current codepage of the process.
 * @return int <p>
 * If <i>kind</i> is 'ansi', the current ANSI code page of the operating system is returned.
 * If <i>kind</i> is 'oem', the current OEM code page of the operating system is returned.
 * Otherwise, the current codepage of the process is returned.
 * </p>
 * @since 7.1
 */
function sapi_windows_cp_get(string $kind = ""): int {}

/**
 * Set process codepage
 * @link https://php.net/manual/en/function.sapi-windows-cp-set
 * @param int $codepage A codepage identifier.
 * @return bool Returns <i>true</i> on success or <i>false</i> on failure.
 * @since 7.1
 */
function sapi_windows_cp_set(int $codepage): bool {}

/**
 * Convert string from one codepage to another
 * @link https://php.net/manual/en/function.sapi-windows-cp-conv.php
 * @param int|string $in_codepage The codepage of the <i>subject</i> string. Either the codepage name or identifier.
 * @param int|string $out_codepage The codepage to convert the <i>subject</i> string to. Either the codepage name or identifier.
 * @param string $subject The string to convert.
 * @return string|null The <i>subject</i> string converted to <i>out_codepage</i>, or <b>null</b> on failure.
 * @since 7.1
 */
function sapi_windows_cp_conv(int|string $in_codepage, int|string $out_codepage, string $subject): ?string {}

/**
 * Indicates whether the codepage is utf-8 compatible
 * @link https://www.php.net/manual/en/function.sapi-windows-cp-is-utf8.php
 * @return bool
 * @since 7.1
 */
function sapi_windows_cp_is_utf8(): bool {}

/**
 * Get or set VT100 support for the specified stream associated to an output buffer of a Windows console.
 *
 * At startup, PHP tries to enable the VT100 feature of the STDOUT/STDERR streams.
 * By the way, if those streams are redirected to a file, the VT100 features may not be enabled.
 *
 * If VT100 support is enabled, it is possible to use control sequences as they are known from the VT100 terminal.
 * They allow the modification of the terminal's output. On Windows these sequences are called Console Virtual Terminal Sequences.
 *
 * <b>Warning</b> This function uses the <b>ENABLE_VIRTUAL_TERMINAL_PROCESSING</b> flag implemented in the Windows 10 API, so the VT100 feature may not be available on older Windows versions.
 *
 * @link https://php.net/manual/en/function.sapi-windows-vt100-support.php
 * @param resource $stream The stream on which the function will operate.
 * @param bool|null $enable <p>
 * If bool, the VT100 feature will be enabled (if true) or disabled (if false).
 * </p>
 * <p>
 * If <i>enable</i> is <b>null</b>, the function returns <b>true</b> if the stream <i>stream</i> has VT100 control codes enabled, <b>false</b> otherwise.
 * </p>
 * <p>
 * If <i>enable</i> is a bool, the function will try to enable or disable the VT100 features of the stream <i>stream</i>.
 * If the feature has been successfully enabled (or disabled), the function will return <b>true</b>, or <b>false</b> otherwise.
 * </p>
 * @return bool <p>
 * If <i>enable</i> is <b>null</b>: returns <b>true</b> if the VT100 feature is enabled, <b>false</b> otherwise.
 * </p>
 * <p>
 * If <i>enable</i> is a bool: Returns <b>true</b> on success or <b>false</b> on failure.
 * </p>
 * @since 7.2
 */
function sapi_windows_vt100_support($stream, ?bool $enable = null): bool {}

/**
 * Set or remove a CTRL event handler, which allows Windows CLI processes to intercept or ignore CTRL+C and CTRL+BREAK events.
 * Note that in multithreaded environments, this is only possible when called from the main thread.
 *
 * @link https://www.php.net/manual/en/function.sapi-windows-set-ctrl-handler.php
 * @param callable|null $handler <p>
 * A callback function to set or remove. If set, this function will be called whenever a CTRL+C or CTRL+BREAK event occurs.
 * </p>
 * <p>
 * The function is supposed to have the following signature:
 * <code>
 * handler(int $event): void
 * </code>
 * <code>event</code> The CTRL event which has been received; either <b>PHP_WINDOWS_EVENT_CTRL_C</b> or <b>PHP_WINDOWS_EVENT_CTRL_BREAK</b>.
 * </p>
 * <p>
 * Setting a <b>null</b> handler causes the process to ignore CTRL+C events, but not CTRL+BREAK events.
 * </p>
 * @param bool $add If <b>true</b>, the handler is set. If <b>false</b>, the handler is removed.
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * @since 7.4
 */
function sapi_windows_set_ctrl_handler(?callable $handler, bool $add = true): bool {}

/**
 * Send a CTRL event to another process.
 *
 * @link https://www.php.net/manual/en/function.sapi-windows-generate-ctrl-event.php
 * @param int $event The CTRL even to send; <b>either PHP_WINDOWS_EVENT_CTRL_C</b> or <b>PHP_WINDOWS_EVENT_CTRL_BREAK</b>.
 * @param int $pid [optional] The ID of the process to which to send the event to. If 0 is given, the event is sent to all processes of the process group.
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * @since 7.4
 */
function sapi_windows_generate_ctrl_event(int $event, int $pid = 0): bool {}

/**
 * The full path and filename of the file. If used inside an include,
 * the name of the included file is returned.
 * Since PHP 4.0.2, <b>__FILE__</b> always contains an
 * absolute path with symlinks resolved whereas in older versions it contained relative path
 * under some circumstances.
 * @link https://php.net/manual/en/language.constants.predefined.php
 */
define('__FILE__', '', true);

/**
 * The current line number of the file.
 * @link https://php.net/manual/en/language.constants.predefined.php
 */
define('__LINE__', 0, true);

/**
 * The class name. (Added in PHP 4.3.0) As of PHP 5 this constant
 * returns the class name as it was declared (case-sensitive). In PHP
 * 4 its value is always lowercased. The class name includes the namespace
 * it was declared in (e.g. Foo\Bar).
 * Note that as of PHP 5.4 __CLASS__ works also in traits. When used
 * in a trait method, __CLASS__ is the name of the class the trait
 * is used in.
 * @link https://php.net/manual/en/language.constants.predefined.php
 */
define('__CLASS__', '', true);

/**
 * The function name. (Added in PHP 4.3.0) As of PHP 5 this constant
 * returns the function name as it was declared (case-sensitive). In
 * PHP 4 its value is always lowercased.
 * @link https://php.net/manual/en/language.constants.predefined.php
 */
define('__FUNCTION__', '', true);

/**
 * The class method name. (Added in PHP 5.0.0) The method name is
 * returned as it was declared (case-sensitive).
 * @link https://php.net/manual/en/language.constants.predefined.php
 */
define('__METHOD__', '', true);

/**
 * The trait name. (Added in PHP 5.4.0) As of PHP 5.4 this constant
 * returns the trait as it was declared (case-sensitive). The trait name includes the namespace
 * it was declared in (e.g. Foo\Bar).
 * @since 5.4
 * @link https://php.net/manual/en/language.constants.predefined.php
 */
define('__TRAIT__', '', true);

/**
 * The directory of the file. If used inside an include,
 * the directory of the included file is returned. This is equivalent
 * to `dirname(__FILE__)`. This directory name
 * does not have a trailing slash unless it is the root directory.
 * @link https://php.net/manual/en/language.constants.predefined.php
 */
define('__DIR__', '', true);

/**
 * The name of the current namespace (case-sensitive). This constant
 * is defined in compile-time (Added in PHP 5.3.0).
 * @link https://php.net/manual/en/language.constants.predefined.php
 */
define('__NAMESPACE__', '', true);
<?php

use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\ReturnTypeContract as TypeContract;
use JetBrains\PhpStorm\Pure;

/**
 * Gets time of last page modification
 * @link https://php.net/manual/en/function.getlastmod.php
 * @return int|false the time of the last modification of the current
 * page. The value returned is a Unix timestamp, suitable for
 * feeding to date. Returns false on error.
 */
#[Pure(true)]
function getlastmod(): int|false {}

/**
 * Decodes data encoded with MIME base64
 * @link https://php.net/manual/en/function.base64-decode.php
 * @param string $string <p>
 * The encoded data.
 * </p>
 * @param bool $strict [optional] <p>
 * Returns false if input contains character from outside the base64
 * alphabet.
 * </p>
 * @return string|false the original data or false on failure. The returned data may be
 * binary.
 */
#[Pure]
function base64_decode(string $string, bool $strict = false): string|false {}

/**
 * Encodes data with MIME base64
 * @link https://php.net/manual/en/function.base64-encode.php
 * @param string $string <p>
 * The data to encode.
 * </p>
 * @return string The encoded data, as a string.
 */
#[Pure]
function base64_encode(string $string): string {}

/**
 * Uuencode a string
 * @link https://php.net/manual/en/function.convert-uuencode.php
 * @param string $string <p>
 * The data to be encoded.
 * </p>
 * @return string the uuencoded data.
 */
#[Pure]
function convert_uuencode(string $string): string {}

/**
 * Decode a uuencoded string
 * @link https://php.net/manual/en/function.convert-uudecode.php
 * @param string $string <p>
 * The uuencoded data.
 * </p>
 * @return string|false the decoded data as a string.
 */
#[Pure]
function convert_uudecode(string $string): string|false {}

/**
 * Absolute value
 * @link https://php.net/manual/en/function.abs.php
 * @param int|float $num <p>
 * The numeric value to process
 * </p>
 * @return float|int The absolute value of number. If the
 * argument number is
 * of type float, the return type is also float,
 * otherwise it is integer (as float usually has a
 * bigger value range than integer).
 */
#[Pure]
function abs(int|float $num): int|float {}

/**
 * Round fractions up
 * @link https://php.net/manual/en/function.ceil.php
 * @param int|float $num <p>
 * The value to round
 * </p>
 * @return float|false value rounded up to the next highest
 * integer.
 * The return value of ceil is still of type
 * float as the value range of float is
 * usually bigger than that of integer.
 */
#[Pure]
#[LanguageLevelTypeAware(["8.0" => "float"], default: "float|false")]
function ceil(int|float $num) {}
/**
 * Round fractions down
 * @link https://php.net/manual/en/function.floor.php
 * @param int|float $num <p>
 * The numeric value to round
 * </p>
 * @return float|false value rounded to the next lowest integer.
 * The return value of floor is still of type
 * float because the value range of float is
 * usually bigger than that of integer.
 */
#[Pure]
#[LanguageLevelTypeAware(["8.0" => "float"], default: "float|false")]
function floor(int|float $num) {}

/**
 * Returns the rounded value of val to specified precision (number of digits after the decimal point).
 * precision can also be negative or zero (default).
 * Note: PHP doesn't handle strings like "12,300.2" correctly by default. See converting from strings.
 * @link https://php.net/manual/en/function.round.php
 * @param int|float $num <p>
 * The value to round
 * </p>
 * @param int $precision [optional] <p>
 * The optional number of decimal digits to round to.
 * </p>
 * @param int $mode [optional] <p>
 * One of PHP_ROUND_HALF_UP,
 * PHP_ROUND_HALF_DOWN,
 * PHP_ROUND_HALF_EVEN, or
 * PHP_ROUND_HALF_ODD.
 * </p>
 * @return float The rounded value
 */
#[Pure]
function round(int|float $num, int $precision = 0, int $mode = PHP_ROUND_HALF_UP): float {}

/**
 * Sine
 * @link https://php.net/manual/en/function.sin.php
 * @param float $num <p>
 * A value in radians
 * </p>
 * @return float The sine of arg
 */
#[Pure]
function sin(float $num): float {}

/**
 * Cosine
 * @link https://php.net/manual/en/function.cos.php
 * @param float $num <p>
 * An angle in radians
 * </p>
 * @return float The cosine of arg
 */
#[Pure]
function cos(float $num): float {}

/**
 * Tangent
 * @link https://php.net/manual/en/function.tan.php
 * @param float $num <p>
 * The argument to process in radians
 * </p>
 * @return float The tangent of arg
 */
#[Pure]
function tan(float $num): float {}

/**
 * Arc sine
 * @link https://php.net/manual/en/function.asin.php
 * @param float $num <p>
 * The argument to process
 * </p>
 * @return float The arc sine of arg in radians
 */
#[Pure]
function asin(float $num): float {}

/**
 * Arc cosine
 * @link https://php.net/manual/en/function.acos.php
 * @param float $num <p>
 * The argument to process
 * </p>
 * @return float The arc cosine of arg in radians.
 */
#[Pure]
function acos(float $num): float {}

/**
 * Arc tangent
 * @link https://php.net/manual/en/function.atan.php
 * @param float $num <p>
 * The argument to process
 * </p>
 * @return float The arc tangent of arg in radians.
 */
#[Pure]
function atan(float $num): float {}

/**
 * Inverse hyperbolic tangent
 * @link https://php.net/manual/en/function.atanh.php
 * @param float $num <p>
 * The argument to process
 * </p>
 * @return float Inverse hyperbolic tangent of arg
 */
#[Pure]
function atanh(float $num): float {}

/**
 * Arc tangent of two variables
 * @link https://php.net/manual/en/function.atan2.php
 * @param float $y <p>
 * Dividend parameter
 * </p>
 * @param float $x <p>
 * Divisor parameter
 * </p>
 * @return float The arc tangent of y/x
 * in radians.
 */
#[Pure]
function atan2(float $y, float $x): float {}

/**
 * Hyperbolic sine
 * @link https://php.net/manual/en/function.sinh.php
 * @param float $num <p>
 * The argument to process
 * </p>
 * @return float The hyperbolic sine of arg
 */
#[Pure]
function sinh(float $num): float {}

/**
 * Hyperbolic cosine
 * @link https://php.net/manual/en/function.cosh.php
 * @param float $num <p>
 * The argument to process
 * </p>
 * @return float The hyperbolic cosine of arg
 */
#[Pure]
function cosh(float $num): float {}

/**
 * Hyperbolic tangent
 * @link https://php.net/manual/en/function.tanh.php
 * @param float $num <p>
 * The argument to process
 * </p>
 * @return float The hyperbolic tangent of arg
 */
#[Pure]
function tanh(float $num): float {}

/**
 * Inverse hyperbolic sine
 * @link https://php.net/manual/en/function.asinh.php
 * @param float $num <p>
 * The argument to process
 * </p>
 * @return float The inverse hyperbolic sine of arg
 */
#[Pure]
function asinh(float $num): float {}

/**
 * Inverse hyperbolic cosine
 * @link https://php.net/manual/en/function.acosh.php
 * @param float $num <p>
 * The value to process
 * </p>
 * @return float The inverse hyperbolic cosine of arg
 */
#[Pure]
function acosh(float $num): float {}

/**
 * Returns exp(number) - 1, computed in a way that is accurate even
 * when the value of number is close to zero
 * @link https://php.net/manual/en/function.expm1.php
 * @param float $num <p>
 * The argument to process
 * </p>
 * @return float 'e' to the power of arg minus one
 */
#[Pure]
function expm1(float $num): float {}

/**
 * Returns log(1 + number), computed in a way that is accurate even when
 * the value of number is close to zero
 * @link https://php.net/manual/en/function.log1p.php
 * @param float $num <p>
 * The argument to process
 * </p>
 * @return float log(1 + number)
 */
#[Pure]
function log1p(float $num): float {}

/**
 * Get value of pi
 * @link https://php.net/manual/en/function.pi.php
 * @return float The value of pi as float.
 */
#[Pure]
function pi(): float {}

/**
 * Finds whether a value is a legal finite number
 * @link https://php.net/manual/en/function.is-finite.php
 * @param float $num <p>
 * The value to check
 * </p>
 * @return bool true if val is a legal finite
 * number within the allowed range for a PHP float on this platform,
 * else false.
 */
#[Pure]
function is_finite(float $num): bool {}

/**
 * Finds whether a value is not a number
 * @link https://php.net/manual/en/function.is-nan.php
 * @param float $num <p>
 * The value to check
 * </p>
 * @return bool true if val is 'not a number',
 * else false.
 */
#[Pure]
function is_nan(float $num): bool {}

/**
 * Integer division
 * @link https://php.net/manual/en/function.intdiv.php
 * @param int $num1 <p>Number to be divided.</p>
 * @param int $num2 <p>Number which divides the <b><i>dividend</i></b></p>
 * @return int
 * @since 7.0
 * @throws DivisionByZeroError <p>if divisor is 0</p>
 * @throws ArithmeticError <p>if the <b><i>dividend</i></b> is <b>PHP_INT_MIN</b> and the <b><i>divisor</i></b> is -1</p>
 */
#[Pure]
function intdiv(int $num1, int $num2): int {}

/**
 * Finds whether a value is infinite
 * @link https://php.net/manual/en/function.is-infinite.php
 * @param float $num <p>
 * The value to check
 * </p>
 * @return bool true if val is infinite, else false.
 */
#[Pure]
function is_infinite(float $num): bool {}

/**
 * Exponential expression
 * @link https://php.net/manual/en/function.pow.php
 * @param mixed $num <p>
 * The base to use
 * </p>
 * @param mixed $exponent <p>
 * The exponent
 * </p>
 * @return object|int|float base raised to the power of exp.
 * If the result can be represented as integer it will be returned as type
 * integer, else it will be returned as type float.
 * If the power cannot be computed false will be returned instead.
 */
#[Pure]
function pow(mixed $num, mixed $exponent): object|int|float {}

/**
 * Calculates the exponent of <constant>e</constant>
 * @link https://php.net/manual/en/function.exp.php
 * @param float $num <p>
 * The argument to process
 * </p>
 * @return float 'e' raised to the power of arg
 */
#[Pure]
function exp(float $num): float {}

/**
 * Natural logarithm
 * @link https://php.net/manual/en/function.log.php
 * @param float $num <p>
 * The value to calculate the logarithm for
 * </p>
 * @param float $base [optional] <p>
 * The optional logarithmic base to use
 * (defaults to 'e' and so to the natural logarithm).
 * </p>
 * @return float The logarithm of arg to
 * base, if given, or the
 * natural logarithm.
 */
#[Pure]
function log(float $num, float $base = M_E): float {}

/**
 * Base-10 logarithm
 * @link https://php.net/manual/en/function.log10.php
 * @param float $num <p>
 * The argument to process
 * </p>
 * @return float The base-10 logarithm of arg
 */
#[Pure]
function log10(float $num): float {}

/**
 * Square root
 * @link https://php.net/manual/en/function.sqrt.php
 * @param float $num <p>
 * The argument to process
 * </p>
 * @return float The square root of arg
 * or the special value NAN for negative numbers.
 */
#[Pure]
function sqrt(float $num): float {}

/**
 * Calculate the length of the hypotenuse of a right-angle triangle
 * @link https://php.net/manual/en/function.hypot.php
 * @param float $x <p>
 * Length of first side
 * </p>
 * @param float $y <p>
 * Length of second side
 * </p>
 * @return float Calculated length of the hypotenuse
 */
#[Pure]
function hypot(float $x, float $y): float {}

/**
 * Converts the number in degrees to the radian equivalent
 * @link https://php.net/manual/en/function.deg2rad.php
 * @param float $num <p>
 * Angular value in degrees
 * </p>
 * @return float The radian equivalent of number
 */
#[Pure]
function deg2rad(float $num): float {}

/**
 * Converts the radian number to the equivalent number in degrees
 * @link https://php.net/manual/en/function.rad2deg.php
 * @param float $num <p>
 * A radian value
 * </p>
 * @return float The equivalent of number in degrees
 */
#[Pure]
function rad2deg(float $num): float {}

/**
 * Binary to decimal
 * @link https://php.net/manual/en/function.bindec.php
 * @param string $binary_string <p>
 * The binary string to convert
 * </p>
 * @return int|float The decimal value of binary_string
 */
#[Pure]
function bindec(string $binary_string): int|float {}

/**
 * Hexadecimal to decimal
 * @link https://php.net/manual/en/function.hexdec.php
 * @param string $hex_string <p>
 * The hexadecimal string to convert
 * </p>
 * @return int|float The decimal representation of hex_string
 */
#[Pure]
function hexdec(string $hex_string): int|float {}

/**
 * Octal to decimal
 * @link https://php.net/manual/en/function.octdec.php
 * @param string $octal_string <p>
 * The octal string to convert
 * </p>
 * @return int|float The decimal representation of octal_string
 */
#[Pure]
function octdec(string $octal_string): int|float {}

/**
 * Decimal to binary
 * @link https://php.net/manual/en/function.decbin.php
 * @param int $num <p>
 * Decimal value to convert
 * </p>
 * <table>
 * Range of inputs on 32-bit machines
 * <tr valign="top">
 * <td>positive number</td>
 * <td>negative number</td>
 * <td>return value</td>
 * </tr>
 * <tr valign="top">
 * <td>0</td>
 * <td></td>
 * <td>0</td>
 * </tr>
 * <tr valign="top">
 * <td>1</td>
 * <td></td>
 * <td>1</td>
 * </tr>
 * <tr valign="top">
 * <td>2</td>
 * <td></td>
 * <td>10</td>
 * </tr>
 * <tr valign="top">
 * ... normal progression ...</td>
 * </tr>
 * <tr valign="top">
 * <td>2147483646</td>
 * <td></td>
 * <td>1111111111111111111111111111110</td>
 * </tr>
 * <tr valign="top">
 * <td>2147483647 (largest signed integer)</td>
 * <td></td>
 * <td>1111111111111111111111111111111 (31 1's)</td>
 * </tr>
 * <tr valign="top">
 * <td>2147483648</td>
 * <td>-2147483648</td>
 * <td>10000000000000000000000000000000</td>
 * </tr>
 * <tr valign="top">
 * ... normal progression ...</td>
 * </tr>
 * <tr valign="top">
 * <td>4294967294</td>
 * <td>-2</td>
 * <td>11111111111111111111111111111110</td>
 * </tr>
 * <tr valign="top">
 * <td>4294967295 (largest unsigned integer)</td>
 * <td>-1</td>
 * <td>11111111111111111111111111111111 (32 1's)</td>
 * </tr>
 * </table>
 * <table>
 * Range of inputs on 64-bit machines
 * <tr valign="top">
 * <td>positive number</td>
 * <td>negative number</td>
 * <td>return value</td>
 * </tr>
 * <tr valign="top">
 * <td>0</td>
 * <td></td>
 * <td>0</td>
 * </tr>
 * <tr valign="top">
 * <td>1</td>
 * <td></td>
 * <td>1</td>
 * </tr>
 * <tr valign="top">
 * <td>2</td>
 * <td></td>
 * <td>10</td>
 * </tr>
 * <tr valign="top">
 * ... normal progression ...</td>
 * </tr>
 * <tr valign="top">
 * <td>9223372036854775806</td>
 * <td></td>
 * <td>111111111111111111111111111111111111111111111111111111111111110</td>
 * </tr>
 * <tr valign="top">
 * <td>9223372036854775807 (largest signed integer)</td>
 * <td></td>
 * <td>111111111111111111111111111111111111111111111111111111111111111 (31 1's)</td>
 * </tr>
 * <tr valign="top">
 * <td></td>
 * <td>-9223372036854775808</td>
 * <td>1000000000000000000000000000000000000000000000000000000000000000</td>
 * </tr>
 * <tr valign="top">
 * ... normal progression ...</td>
 * </tr>
 * <tr valign="top">
 * <td></td>
 * <td>-2</td>
 * <td>1111111111111111111111111111111111111111111111111111111111111110</td>
 * </tr>
 * <tr valign="top">
 * <td></td>
 * <td>-1</td>
 * <td>1111111111111111111111111111111111111111111111111111111111111111 (64 1's)</td>
 * </tr>
 * </table>
 * @return string Binary string representation of number
 */
#[Pure]
function decbin(int $num): string {}

/**
 * Decimal to octal
 * @link https://php.net/manual/en/function.decoct.php
 * @param int $num <p>
 * Decimal value to convert
 * </p>
 * @return string Octal string representation of number
 */
#[Pure]
function decoct(int $num): string {}

/**
 * Decimal to hexadecimal
 * @link https://php.net/manual/en/function.dechex.php
 * @param int $num <p>
 * Decimal value to convert
 * </p>
 * @return string Hexadecimal string representation of number
 */
#[Pure]
function dechex(int $num): string {}

/**
 * Convert a number between arbitrary bases
 * @link https://php.net/manual/en/function.base-convert.php
 * @param string $num <p>
 * The number to convert
 * </p>
 * @param int $from_base <p>
 * The base number is in
 * </p>
 * @param int $to_base <p>
 * The base to convert number to
 * </p>
 * @return string number converted to base tobase
 */
#[Pure]
function base_convert(string $num, int $from_base, int $to_base): string {}

/**
 * Format a number with grouped thousands
 * @link https://php.net/manual/en/function.number-format.php
 * @param float $num <p>
 * The number being formatted.
 * </p>
 * @param int $decimals [optional] <p>
 * Sets the number of decimal points.
 * </p>
 * @param string|null $decimal_separator [optional]
 * @param string|null $thousands_separator [optional]
 * @return string A formatted version of number.
 */
#[Pure]
function number_format(float $num, int $decimals = 0, ?string $decimal_separator = '.', ?string $thousands_separator = ','): string {}

/**
 * Returns the floating point remainder (modulo) of the division
 * of the arguments
 * @link https://php.net/manual/en/function.fmod.php
 * @param float $num1 <p>
 * The dividend
 * </p>
 * @param float $num2 <p>
 * The divisor
 * </p>
 * @return float The floating point remainder of
 * x/y
 */
#[Pure]
function fmod(float $num1, float $num2): float {}

/**
 * Performs a floating-point division under
 * IEEE 754 semantics. Division by zero is considered well-defined and
 * will return one of Inf, -Inf or NaN.
 * @param float $num1
 * @param float $num2
 * @return float
 * @since 8.0
 */
#[Pure]
function fdiv(float $num1, float $num2): float {}

/**
 * Converts a packed internet address to a human readable representation
 * @link https://php.net/manual/en/function.inet-ntop.php
 * @param string $ip <p>
 * A 32bit IPv4, or 128bit IPv6 address.
 * </p>
 * @return string|false a string representation of the address or false on failure.
 */
#[Pure]
function inet_ntop(string $ip): string|false {}

/**
 * Converts a human readable IP address to its packed in_addr representation
 * @link https://php.net/manual/en/function.inet-pton.php
 * @param string $ip <p>
 * A human readable IPv4 or IPv6 address.
 * </p>
 * @return string|false the in_addr representation of the given
 * address
 */
#[Pure]
function inet_pton(string $ip): string|false {}

/**
 * Converts a string containing an (IPv4) Internet Protocol dotted address into a long integer
 * @link https://php.net/manual/en/function.ip2long.php
 * @param string $ip <p>
 * A standard format address.
 * </p>
 * @return int|false the IPv4 address or false if ip_address
 * is invalid.
 */
#[Pure]
function ip2long(string $ip): int|false {}

/**
 * Converts an long integer address into a string in (IPv4) internet standard dotted format
 * @link https://php.net/manual/en/function.long2ip.php
 * @param int $ip <p>
 * A proper address representation.
 * </p>
 * @return string|false the Internet IP address as a string.
 */
#[Pure]
function long2ip(int $ip): string|false {}

/**
 * Gets the value of an environment variable
 * @link https://php.net/manual/en/function.getenv.php
 * @param string|null $name <p>
 * The variable name.
 * </p>
 * @param bool $local_only [optional] <p>
 * Set to true to only return local environment variables (set by the operating system or putenv).
 * </p>
 * @return string|array|false the value of the environment variable
 * varname or an associative array with all environment variables if no variable name
 * is provided, or false on an error.
 */
#[Pure(true)]
function getenv(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.0')] $varname,
    #[PhpStormStubsElementAvailable(from: '7.1')] ?string $name = null,
    #[PhpStormStubsElementAvailable(from: '5.6')] bool $local_only = false
): array|string|false {}

/**
 * Sets the value of an environment variable
 * @link https://php.net/manual/en/function.putenv.php
 * @param string $assignment <p>
 * The setting, like "FOO=BAR"
 * </p>
 * @return bool true on success or false on failure.
 */
function putenv(string $assignment): bool {}

/**
 * Gets options from the command line argument list
 * @link https://php.net/manual/en/function.getopt.php
 * @param string $short_options Each character in this string will be used as option characters and
 * matched against options passed to the script starting with a single
 * hyphen (-).
 * For example, an option string "x" recognizes an
 * option -x.
 * Only a-z, A-Z and 0-9 are allowed.
 * @param array $long_options An array of options. Each element in this array will be used as option
 * strings and matched against options passed to the script starting with
 * two hyphens (--).
 * For example, an longopts element "opt" recognizes an
 * option --opt.
 * Prior to PHP5.3.0 this parameter was only available on few systems
 * @param int &$rest_index [optional] If the optind parameter is present, then the index where argument parsing stopped will be written to this variable.
 * @return string[]|false[]|false This function will return an array of option / argument pairs or false on
 * failure.
 */
function getopt(
    string $short_options,
    array $long_options = [],
    #[PhpStormStubsElementAvailable(from: '7.1')] &$rest_index
): array|false {}

/**
 * Gets system load average
 * @link https://php.net/manual/en/function.sys-getloadavg.php
 * @return array|false an array with three samples (last 1, 5 and 15
 * minutes).
 * @since 5.1.3
 */
#[Pure(true)]
function sys_getloadavg(): array|false {}

/**
 * Return current Unix timestamp with microseconds
 * @link https://php.net/manual/en/function.microtime.php
 * @param bool $as_float [optional] <p>
 * When called without the optional argument, this function returns the string
 * "msec sec" where sec is the current time measured in the number of
 * seconds since the Unix Epoch (0:00:00 January 1, 1970 GMT), and
 * msec is the microseconds part.
 * Both portions of the string are returned in units of seconds.
 * </p>
 * <p>
 * If the optional get_as_float is set to
 * true then a float (in seconds) is returned.
 * </p>
 * @return string|float
 */
#[Pure(true)]
function microtime(#[TypeContract(true: "float", false: "string")] bool $as_float = false): string|float {}

/**
 * Get current time
 * @link https://php.net/manual/en/function.gettimeofday.php
 * @param bool $as_float [optional] <p>
 * When set to true, a float instead of an array is returned.
 * </p>
 * @return int[]|float By default an array is returned. If return_float
 * is set, then a float is returned.
 * </p>
 * <p>
 * Array keys:
 * "sec" - seconds since the Unix Epoch
 * "usec" - microseconds
 * "minuteswest" - minutes west of Greenwich
 * "dsttime" - type of dst correction
 */
#[Pure(true)]
#[ArrayShape(["sec" => "int", "usec" => "int", "minuteswest" => "int", "dsttime" => "int"])]
function gettimeofday(#[TypeContract(true: "float", false: "int[]")] bool $as_float = false): array|float {}

/**
 * Gets the current resource usages
 * @link https://php.net/manual/en/function.getrusage.php
 * @param int $mode <p>
 * If who is 1, getrusage will be called with
 * RUSAGE_CHILDREN.
 * </p>
 * @return array|false an associative array containing the data returned from the system
 * call. All entries are accessible by using their documented field names.
 */
#[Pure(true)]
function getrusage(int $mode = 0): array|false {}

/**
 * Generate a unique ID
 * @link https://php.net/manual/en/function.uniqid.php
 * @param string $prefix [optional] <p>
 * Can be useful, for instance, if you generate identifiers
 * simultaneously on several hosts that might happen to generate the
 * identifier at the same microsecond.
 * </p>
 * <p>
 * With an empty prefix, the returned string will
 * be 13 characters long. If more_entropy is
 * true, it will be 23 characters.
 * </p>
 * @param bool $more_entropy [optional] <p>
 * If set to true, uniqid will add additional
 * entropy (using the combined linear congruential generator) at the end
 * of the return value, which should make the results more unique.
 * </p>
 * @return string the unique identifier, as a string.
 */
function uniqid(string $prefix = "", bool $more_entropy = false): string {}

/**
 * Convert a quoted-printable string to an 8 bit string
 * @link https://php.net/manual/en/function.quoted-printable-decode.php
 * @param string $string <p>
 * The input string.
 * </p>
 * @return string the 8-bit binary string.
 */
#[Pure]
function quoted_printable_decode(string $string): string {}

/**
 * Convert a 8 bit string to a quoted-printable string
 * @link https://php.net/manual/en/function.quoted-printable-encode.php
 * @param string $string <p>
 * The input string.
 * </p>
 * @return string the encoded string.
 */
#[Pure]
function quoted_printable_encode(string $string): string {}

/**
 * Convert from one Cyrillic character set to another
 * @link https://php.net/manual/en/function.convert-cyr-string.php
 * @param string $str <p>
 * The string to be converted.
 * </p>
 * @param string $from <p>
 * The source Cyrillic character set, as a single character.
 * </p>
 * @param string $to <p>
 * The target Cyrillic character set, as a single character.
 * </p>
 * @return string the converted string.
 * @removed 8.0
 * @see mb_convert_string()
 * @see iconv()
 * @see UConverter
 */
#[Pure]
#[Deprecated(since: '7.4', reason: 'Us mb_convert_string(), iconv() or UConverter instead.')]
function convert_cyr_string(string $str, string $from, string $to): string {}

/**
 * Gets the name of the owner of the current PHP script
 * @link https://php.net/manual/en/function.get-current-user.php
 * @return string the username as a string.
 */
#[Pure(true)]
function get_current_user(): string {}

/**
 * Limits the maximum execution time
 * @link https://php.net/manual/en/function.set-time-limit.php
 * @param int $seconds <p>
 * The maximum execution time, in seconds. If set to zero, no time limit
 * is imposed.
 * </p>
 * @return bool Returns TRUE on success, or FALSE on failure.
 */
function set_time_limit(int $seconds): bool {}

/**
 * Gets the value of a PHP configuration option
 * @link https://php.net/manual/en/function.get-cfg-var.php
 * @param string $option <p>
 * The configuration option name.
 * </p>
 * @return array|string|false the current value of the PHP configuration variable specified by
 * option, or false if an error occurs.
 */
#[Pure]
function get_cfg_var(string $option): array|string|false {}

/**
 * Alias:
 * {@see set_magic_quotes_runtime}
 * @link https://php.net/manual/en/function.magic-quotes-runtime.php
 * @param bool $new_setting
 * @removed 7.0
 */
#[Deprecated(since: '5.3')]
function magic_quotes_runtime(bool $new_setting) {}

/**
 * Sets the current active configuration setting of magic_quotes_runtime
 * @link https://php.net/manual/en/function.set-magic-quotes-runtime.php
 * @param bool $new_setting <p>
 * false for off, true for on.
 * </p>
 * @return bool true on success or false on failure.
 * @removed 7.0
 */
#[Deprecated(reason: "This function has been DEPRECATED as of PHP 5.4.0. Raises an E_CORE_ERROR", since: "5.3")]
function set_magic_quotes_runtime(bool $new_setting): bool {}

/**
 * Gets the current configuration setting of magic quotes gpc
 * @link https://php.net/manual/en/function.get-magic-quotes-gpc.php
 * @return int 0 if magic quotes gpc are off, 1 otherwise.
 * @removed 8.0
 */
#[Deprecated(since: '7.4')]
function get_magic_quotes_gpc(): int {}

/**
 * Gets the current active configuration setting of magic_quotes_runtime
 * @link https://php.net/manual/en/function.get-magic-quotes-runtime.php
 * @return int 0 if magic quotes runtime is off, 1 otherwise.
 */
#[Deprecated(since: '7.4')]
function get_magic_quotes_runtime(): int {}

/**
 * Import GET/POST/Cookie variables into the global scope
 * @link https://php.net/manual/en/function.import-request-variables.php
 * @param string $types <p>
 * Using the types parameter, you can specify
 * which request variables to import. You can use 'G', 'P' and 'C'
 * characters respectively for GET, POST and Cookie. These characters are
 * not case sensitive, so you can also use any combination of 'g', 'p'
 * and 'c'. POST includes the POST uploaded file information.
 * </p>
 * <p>
 * Note that the order of the letters matters, as when using
 * "GP", the
 * POST variables will overwrite GET variables with the same name. Any
 * other letters than GPC are discarded.
 * </p>
 * @param string $prefix [optional] <p>
 * Variable name prefix, prepended before all variable's name imported
 * into the global scope. So if you have a GET value named
 * "userid", and provide a prefix
 * "pref_", then you'll get a global variable named
 * $pref_userid.
 * </p>
 * <p>
 * Although the prefix parameter is optional, you
 * will get an E_NOTICE level
 * error if you specify no prefix, or specify an empty string as a
 * prefix. This is a possible security hazard. Notice level errors are
 * not displayed using the default error reporting level.
 * </p>
 * @return bool true on success or false on failure.
 * @removed 5.4
 */
#[Deprecated(reason: "This function has been DEPRECATED as of PHP 5.3.0", since: "5.3")]
function import_request_variables(string $types, $prefix = null): bool {}

/**
 * Send an error message to the defined error handling routines
 * @link https://php.net/manual/en/function.error-log.php
 * @param string $message <p>
 * The error message that should be logged.
 * </p>
 * @param int $message_type <p>
 * Says where the error should go. The possible message types are as
 * follows:
 * </p>
 * <p>
 * <table>
 * error_log log types
 * <tr valign="top">
 * <td>0</td>
 * <td>
 * message is sent to PHP's system logger, using
 * the Operating System's system logging mechanism or a file, depending
 * on what the error_log
 * configuration directive is set to. This is the default option.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>1</td>
 * <td>
 * message is sent by email to the address in
 * the destination parameter. This is the only
 * message type where the fourth parameter,
 * extra_headers is used.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>2</td>
 * <td>
 * No longer an option.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>3</td>
 * <td>
 * message is appended to the file
 * destination. A newline is not automatically
 * added to the end of the message string.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>4</td>
 * <td>
 * message is sent directly to the SAPI logging
 * handler.
 * </td>
 * </tr>
 * </table>
 * </p>
 * @param string|null $destination [optional] <p>
 * The destination. Its meaning depends on the
 * message_type parameter as described above.
 * </p>
 * @param string|null $additional_headers [optional] <p>
 * The extra headers. It's used when the message_type
 * parameter is set to 1.
 * This message type uses the same internal function as
 * mail does.
 * </p>
 * @return bool true on success or false on failure.
 */
function error_log(string $message, int $message_type = 0, ?string $destination, ?string $additional_headers): bool {}
<?php
// Start of password v.
/**
 * <p>
 * <b>PASSWORD_BCRYPT</b> is used to create new password
 * hashes using the <b>CRYPT_BLOWFISH</b> algorithm.
 * </p>
 * <p>
 * This will always result in a hash using the "$2y$" crypt format,
 * which is always 60 characters wide.
 * </p>
 * <p>
 * Supported Options:
 * </p>
 * <ul>
 * <li>
 * <p>
 * <em>salt</em> - to manually provide a salt to use when hashing the password.
 * Note that this will override and prevent a salt from being automatically generated.
 * </p>
 * <p>
 * If omitted, a random salt will be generated by {@link "https://secure.php.net/manual/en/function.password-hash.php" password_hash()} for
 * each password hashed. This is the intended mode of operation.
 * </p>
 * </li>
 * <li>
 * <p>
 * <em>cost</em> - which denotes the algorithmic cost that should be used.
 * Examples of these values can be found on the {@link "https://secure.php.net/manual/en/function.crypt.php crypt()"} page.
 * </p>
 * <p>
 * If omitted, a default value of <em>10</em> will be used. This is a good
 * baseline cost, but you may want to consider increasing it depending on your hardware.
 * </p>
 * </li>
 * </ul>
 * @link https://secure.php.net/manual/en/password.constants.php
 */

use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;

define("PASSWORD_DEFAULT", "2y");

/**
 * <p>
 * The default cost used for the BCRYPT hashing algorithm.
 * </p>
 * <p>
 * Values for this constant:
 * </p>
 * <ul>
 * <li>
 * PHP 5.6.0 - <b>PASSWORD_BCRYPT_DEFAULT_COST</b>
 * </li>
 * </ul>
 */
define("PASSWORD_BCRYPT_DEFAULT_COST", 10);

/**
 * <p>
 * The default algorithm to use for hashing if no algorithm is provided.
 * This may change in newer PHP releases when newer, stronger hashing
 * algorithms are supported.
 * </p>
 * <p>
 * It is worth noting that over time this constant can (and likely will)
 * change. Therefore you should be aware that the length of the resulting
 * hash can change. Therefore, if you use <b>PASSWORD_DEFAULT</b>
 * you should store the resulting hash in a way that can store more than 60
 * characters (255 is the recommended width).
 * </p>
 * <p>
 * Values for this constant:
 * </p>
 * <ul>
 * <li>
 * PHP 5.5.0 - <b>PASSWORD_BCRYPT</b>
 * </li>
 * </ul>
 */
define("PASSWORD_BCRYPT", '2y');

/**
 * PASSWORD_ARGON2I is used to create new password hashes using the Argon2i algorithm.
 *
 * Supported Options:
 * <ul>
 * <li>memory_cost (integer) - Maximum memory (in bytes) that may be used to compute the Argon2 hash. Defaults to PASSWORD_ARGON2_DEFAULT_MEMORY_COST.</li>
 *
 * <li>time_cost (integer) - Maximum amount of time it may take to compute the Argon2 hash. Defaults to PASSWORD_ARGON2_DEFAULT_TIME_COST.</li>
 *
 * <li>threads (integer) - Number of threads to use for computing the Argon2 hash. Defaults to PASSWORD_ARGON2_DEFAULT_THREADS.</li>
 * </ul>
 * Available as of PHP 7.2.0.
 * @since 7.2
 */
define('PASSWORD_ARGON2I', 'argon2i');

/**
 * PASSWORD_ARGON2ID is used to create new password hashes using the Argon2id algorithm.
 *
 * Supported Options:
 * <ul>
 * <li>memory_cost (integer) - Maximum memory (in bytes) that may be used to compute the Argon2 hash. Defaults to PASSWORD_ARGON2_DEFAULT_MEMORY_COST.</li>
 *
 * <li>time_cost (integer) - Maximum amount of time it may take to compute the Argon2 hash. Defaults to PASSWORD_ARGON2_DEFAULT_TIME_COST.</li>
 *
 * <li>threads (integer) - Number of threads to use for computing the Argon2 hash. Defaults to PASSWORD_ARGON2_DEFAULT_THREADS.</li>
 * </ul>
 * Available as of PHP 7.3.0.
 * @since 7.3
 */
define('PASSWORD_ARGON2ID', 'argon2id');

/**
 * Default amount of memory in bytes that Argon2lib will use while trying to compute a hash.
 * Available as of PHP 7.2.0.
 * @since 7.2
 */
define('PASSWORD_ARGON2_DEFAULT_MEMORY_COST', 65536);

/**
 * Default amount of time that Argon2lib will spend trying to compute a hash.
 * Available as of PHP 7.2.0.
 * @since 7.2
 */
define('PASSWORD_ARGON2_DEFAULT_TIME_COST', 4);

/**
 * Default number of threads that Argon2lib will use.
 * Available as of PHP 7.2.0.
 * @since 7.2
 */
define('PASSWORD_ARGON2_DEFAULT_THREADS', 1);

/**
 * @since 7.4
 */
define('PASSWORD_ARGON2_PROVIDER', 'standard');

/**
 * Returns information about the given hash
 * @link https://secure.php.net/manual/en/function.password-get-info.php
 * @param string $hash A hash created by password_hash().
 * @return array|null Returns an associative array with three elements:
 * <ul>
 * <li>
 * <em>algo</em>, which will match a
 * {@link https://secure.php.net/manual/en/password.constants.php password algorithm constant}
 * </li>
 * <li>
 * <em>algoName</em>, which has the human readable name of the algorithm
 * </li>
 * <li>
 * <em>options</em>, which includes the options
 * provided when calling  @link https://secure.php.net/manual/en/function.password-hash.php" password_hash()
 * </li>
 * </ul>
 * @since 5.5
 */
#[ArrayShape(["algo" => "int", "algoName" => "string", "options" => "array"])]
#[LanguageLevelTypeAware(['8.0' => 'array'], default: '?array')]
function password_get_info(string $hash) {}

/**
 * (PHP 5 &gt;= 5.5.0, PHP 5)<br/>
 *
 * Creates a password hash.
 * @link https://secure.php.net/manual/en/function.password-hash.php
 * @param string $password The user's password.
 * @param string|int|null $algo A <a href="https://secure.php.net/manual/en/password.constants.php" class="link">password algorithm constant</a>  denoting the algorithm to use when hashing the password.
 * @param array $options [optional] <p> An associative array containing options. See the <a href="https://secure.php.net/manual/en/password.constants.php" class="link">password algorithm constants</a> for documentation on the supported options for each algorithm.</p>
 * If omitted, a random salt will be created and the default cost will be used.
 * <b>Warning</b>
 * <p>
 * The salt option has been deprecated as of PHP 7.0.0. It is now
 * preferred to simply use the salt that is generated by default.
 * </p>
 * @return string|false|null Returns the hashed password, or FALSE on failure, or null if the algorithm is invalid
 * @since 5.5
 */
#[LanguageLevelTypeAware(["8.0" => "string"], default: "string|false|null")]
function password_hash(string $password, string|int|null $algo, array $options = []) {}

/**
 * Checks if the given hash matches the given options.
 * @link https://secure.php.net/manual/en/function.password-needs-rehash.php
 * @param string $hash A hash created by password_hash().
 * @param string|int|null $algo A <a href="https://secure.php.net/manual/en/password.constants.php" class="link">password algorithm constant</a> denoting the algorithm to use when hashing the password.
 * @param array $options [optional] <p> An associative array containing options. See the password algorithm constants for documentation on the supported options for each algorithm.</p>
 * @return bool Returns TRUE if the hash should be rehashed to match the given algo and options, or FALSE otherwise.
 * @since 5.5
 */
function password_needs_rehash(string $hash, string|int|null $algo, array $options = []): bool {}

/**
 * Checks if the given hash matches the given options.
 * @link https://secure.php.net/manual/en/function.password-verify.php
 * @param string $password The user's password.
 * @param string $hash A hash created by password_hash().
 * @return bool Returns TRUE if the password and hash match, or FALSE otherwise.
 * @since 5.5
 */
function password_verify(string $password, string $hash): bool {}

/**
 * Return a complete list of all registered password hashing algorithms.
 * @return string[]
 * @since 7.4
 */
function password_algos(): array {}
// End of password v.
<?php

use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\ExpectedValues;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Pure;

/**
 * (PHP 5.5.0)<br/>
 * Get the boolean value of a variable
 * @param mixed $value <p>the scalar value being converted to a boolean.</p>
 * @return bool The boolean value of var.
 * @since 5.5
 */
#[Pure]
function boolval(mixed $value): bool {}

/**
 * Get the integer value of a variable
 * @link https://php.net/manual/en/function.intval.php
 * @param mixed $value <p>
 * The scalar value being converted to an integer
 * </p>
 * @param int $base [optional] <p>
 * The base for the conversion
 * </p>
 * @return int The integer value of var on success, or 0 on
 * failure. Empty arrays and objects return 0, non-empty arrays and
 * objects return 1.
 * </p>
 * <p>
 * The maximum value depends on the system. 32 bit systems have a
 * maximum signed integer range of -2147483648 to 2147483647. So for example
 * on such a system, intval('1000000000000') will return
 * 2147483647. The maximum signed integer value for 64 bit systems is
 * 9223372036854775807.
 * </p>
 * <p>
 * Strings will most likely return 0 although this depends on the
 * leftmost characters of the string. The common rules of
 * integer casting
 * apply.
 */
#[Pure]
function intval(mixed $value, int $base = 10): int {}

/**
 * Get float value of a variable
 * @link https://php.net/manual/en/function.floatval.php
 * @param mixed $value May be any scalar type. should not be used on objects, as doing so will emit an E_NOTICE level error and return 1.
 * @return float value of the given variable. Empty arrays return 0, non-empty arrays return 1.
 */
#[Pure]
function floatval(mixed $value): float {}

/**
 * (PHP 4.2.0, PHP 5)<br/>
 * Alias:
 * {@see floatval}
 * Get float value of a variable
 * @link https://php.net/manual/en/function.doubleval.php
 * @param mixed $value May be any scalar type. should not be used on objects, as doing so will emit an E_NOTICE level error and return 1.
 * @return float value of the given variable. Empty arrays return 0, non-empty arrays return 1.
 */
#[Pure]
function doubleval(mixed $value): float {}

/**
 * Get string value of a variable
 * @link https://php.net/manual/en/function.strval.php
 * @param mixed $value <p>
 * The variable that is being converted to a string.
 * </p>
 * <p>
 * $var may be any scalar type or an object that implements the __toString() method.
 * You cannot use strval() on arrays or objects that do not implement the __toString() method.
 * </p>
 * @return string The string value of var.
 */
#[Pure]
function strval(mixed $value): string {}

/**
 * Get the type of a variable
 * @link https://php.net/manual/en/function.gettype.php
 * @param mixed $value <p>
 * The variable being type checked.
 * </p>
 * @return string Possibles values for the returned string are:
 * "boolean"
 * "integer"
 * "double" (for historical reasons "double" is
 * returned in case of a float, and not simply
 * "float")
 * "string"
 * "array"
 * "object"
 * "resource"
 * "NULL"
 * "unknown type"
 * "resource (closed)" since 7.2.0
 */
#[Pure]
#[ExpectedValues([
    "boolean", "integer", "double", "string", "array", "object", "resource", "NULL", "unknown type", "resource (closed)"
])]
function gettype(mixed $value): string {}

/**
 * Set the type of a variable
 * @link https://php.net/manual/en/function.settype.php
 * @param mixed &$var <p>
 * The variable being converted.
 * </p>
 * @param string $type <p>
 * Possibles values of <b>type</b> are:
 * </p><ul>
 * <li>
 * "boolean" (or, since PHP 4.2.0, "bool")
 * </li>
 * <li>
 * "integer" (or, since PHP 4.2.0, "int")
 * </li>
 * <li>
 * "float" (only possible since PHP 4.2.0, for older versions use the
 * deprecated variant "double")
 * </li>
 * <li>
 * "string"
 * </li>
 * <li>
 * "array"
 * </li>
 * <li>
 * "object"
 * </li>
 * <li>
 * "null" (since PHP 4.2.0)
 * </li>
 * </ul>
 * @return bool true on success or false on failure.
 */
function settype(mixed &$var, #[ExpectedValues(["bool", "boolean", "int", "integer", "float", "double", "string", "array", "object", "null"])] string $type): bool {}

/**
 * Finds whether a variable is null.
 * @link https://php.net/manual/en/function.is-null.php
 * @param mixed $value <p>
 * The variable being evaluated.
 * </p>
 * @return bool true if var is null, false
 * otherwise.
 */
#[Pure]
function is_null(mixed $value): bool {}

/**
 * Finds whether a variable is a resource
 * @link https://php.net/manual/en/function.is-resource.php
 * @param mixed $value <p>
 * The variable being evaluated.
 * </p>
 * @return bool true if var is a resource,
 * false otherwise.
 */
#[Pure]
function is_resource(mixed $value): bool {}

/**
 * Finds out whether a variable is a boolean
 * @link https://php.net/manual/en/function.is-bool.php
 * @param mixed $value <p>
 * The variable being evaluated.
 * </p>
 * @return bool true if var is a boolean,
 * false otherwise.
 */
#[Pure]
function is_bool(mixed $value): bool {}

/**
 * Alias:
 * {@see is_int}
 * @link https://php.net/manual/en/function.is-long.php
 * @param mixed $value <p>
 * The variable being evaluated.
 * </p>
 * @return bool true if var is an integer,
 * false otherwise.
 */
#[Pure]
function is_long(mixed $value): bool {}

/**
 * Finds whether the type of a variable is float
 * @link https://php.net/manual/en/function.is-float.php
 * @param mixed $value <p>
 * The variable being evaluated.
 * </p>
 * @return bool true if var is a float,
 * false otherwise.
 */
#[Pure]
function is_float(mixed $value): bool {}

/**
 * Find whether the type of a variable is integer
 * @link https://php.net/manual/en/function.is-int.php
 * @param mixed $value <p>
 * The variable being evaluated.
 * </p>
 * @return bool true if var is an integer,
 * false otherwise.
 */
#[Pure]
function is_int(mixed $value): bool {}

/**
 * Alias:
 * {@see is_int}
 * @link https://php.net/manual/en/function.is-integer.php
 * @param mixed $value <p>
 * The variable being evaluated.
 * </p>
 * @return bool true if var is an integer,
 * false otherwise.
 */
#[Pure]
function is_integer(mixed $value): bool {}

/**
 * Alias:
 * {@see is_float}
 * @link https://php.net/manual/en/function.is-double.php
 * @param mixed $value <p>
 * The variable being evaluated.
 * </p>
 * @return bool true if var is a float,
 * false otherwise.
 */
#[Pure]
function is_double(mixed $value): bool {}

/**
 * Alias:
 * {@see is_float}
 * @link https://php.net/manual/en/function.is-real.php
 * @param mixed $var <p>
 * The variable being evaluated.
 * </p>
 * @return bool true if var is a float,
 * false otherwise.
 */
#[Pure]
#[Deprecated(since: '7.4')]
function is_real(mixed $var): bool {}

/**
 * Finds whether a variable is a number or a numeric string
 * @link https://php.net/manual/en/function.is-numeric.php
 * @param mixed $value <p>
 * The variable being evaluated.
 * </p>
 * @return bool true if var is a number or a numeric
 * string, false otherwise.
 */
#[Pure]
function is_numeric(mixed $value): bool {}

/**
 * Find whether the type of a variable is string
 * @link https://php.net/manual/en/function.is-string.php
 * @param mixed $value <p>
 * The variable being evaluated.
 * </p>
 * @return bool true if var is of type string,
 * false otherwise.
 */
#[Pure]
function is_string(mixed $value): bool {}

/**
 * Finds whether a variable is an array
 * @link https://php.net/manual/en/function.is-array.php
 * @param mixed $value <p>
 * The variable being evaluated.
 * </p>
 * @return bool true if var is an array,
 * false otherwise.
 */
#[Pure]
function is_array(mixed $value): bool {}

/**
 * Finds whether a variable is an object
 * @link https://php.net/manual/en/function.is-object.php
 * @param mixed $value <p>
 * The variable being evaluated.
 * </p>
 * @return bool true if var is an object, false otherwise.<br/>
 * Since 7.2.0 returns true for unserialized objects without a class definition (class of <b>__PHP_Incomplete_Class</b>).
 */
#[Pure]
function is_object(mixed $value): bool {}

/**
 * Finds whether a variable is a scalar
 * @link https://php.net/manual/en/function.is-scalar.php
 * @param mixed $value <p>
 * The variable being evaluated.
 * </p>
 * @return bool true if var is a scalar false
 * otherwise.
 */
#[Pure]
function is_scalar(mixed $value): bool {}

/**
 * Verify that the contents of a variable can be called as a function
 * @link https://php.net/manual/en/function.is-callable.php
 * @param callable|mixed $value <p>
 * The value to check
 * </p>
 * @param bool $syntax_only [optional] <p>
 * If set to <b>TRUE</b> the function only verifies that
 * name might be a function or method. It will only
 * reject simple variables that are not strings, or an array that does
 * not have a valid structure to be used as a callback. The valid ones
 * are supposed to have only 2 entries, the first of which is an object
 * or a string, and the second a string.
 * </p>
 * @param string &$callable_name [optional] <p>
 * Receives the "callable name". In the example below it is
 * "someClass::someMethod". Note, however, that despite the implication
 * that someClass::SomeMethod() is a callable static method, this is not
 * the case.
 * </p>
 * @return bool <b>TRUE</b> if $var is callable, <b>FALSE</b>
 * otherwise.
 */
function is_callable(mixed $value, bool $syntax_only = false, &$callable_name): bool {}

/**
 * Verify that the contents of a variable is a countable value
 * @link https://secure.php.net/is_countable
 *
 * @param mixed $value The value to check
 * @return bool <b>TRUE</b> if $var is countable, <b>FALSE</b> otherwise.
 * @since 7.3
 */
#[Pure]
function is_countable(mixed $value): bool {}

/**
 * Closes process file pointer
 * @link https://php.net/manual/en/function.pclose.php
 * @param resource $handle <p>
 * The file pointer must be valid, and must have been returned by a
 * successful call to popen.
 * </p>
 * @return int the termination status of the process that was run. In case of an error then -1 is returned.
 * <p>
 * If PHP has been compiled with <tt>--enable-sigchild</tt>, the return value of this function is undefined.
 * </p>
 */
function pclose($handle): int {}

/**
 * Opens process file pointer
 * @link https://php.net/manual/en/function.popen.php
 * @param string $command <p>
 * The command
 * </p>
 * @param string $mode <p>
 * The mode
 * </p>
 * @return resource|false a file pointer identical to that returned by
 * fopen, except that it is unidirectional (may
 * only be used for reading or writing) and must be closed with
 * pclose. This pointer may be used with
 * fgets, fgetss, and
 * fwrite.
 * </p>
 * <p>
 * If an error occurs, returns false.
 */
function popen(string $command, string $mode) {}

/**
 * Outputs a file
 * @link https://php.net/manual/en/function.readfile.php
 * @param string $filename <p>
 * The filename being read.
 * </p>
 * @param bool $use_include_path [optional] <p>
 * You can use the optional second parameter and set it to true, if
 * you want to search for the file in the include_path, too.
 * </p>
 * @param resource $context [optional] <p>
 * A context stream resource.
 * </p>
 * @return false|int the number of bytes read from the file, or FALSE on failure
 */
function readfile(string $filename, bool $use_include_path = false, $context): int|false {}

/**
 * Rewind the position of a file pointer
 * @link https://php.net/manual/en/function.rewind.php
 * @param resource $stream <p>
 * The file pointer must be valid, and must point to a file
 * successfully opened by fopen.
 * </p>
 * @return bool true on success or false on failure.
 */
function rewind($stream): bool {}

/**
 * Removes directory
 * @link https://php.net/manual/en/function.rmdir.php
 * @param string $directory <p>
 * Path to the directory.
 * </p>
 * @param resource $context [optional]
 * @return bool true on success or false on failure.
 */
function rmdir(string $directory, $context): bool {}

/**
 * Changes the current umask
 * @link https://php.net/manual/en/function.umask.php
 * @param int|null $mask [optional] <p>
 * The new umask.
 * </p>
 * @return int umask without arguments simply returns the
 * current umask otherwise the old umask is returned.
 */
function umask(?int $mask): int {}

/**
 * Closes an open file pointer
 * @link https://php.net/manual/en/function.fclose.php
 * @param resource $stream <p>
 * The file pointer must be valid, and must point to a file successfully
 * opened by fopen or fsockopen.
 * </p>
 * @return bool true on success or false on failure.
 */
function fclose($stream): bool {}

/**
 * Tests for end-of-file on a file pointer
 * @link https://php.net/manual/en/function.feof.php
 * @param resource $stream The file pointer must be valid, and must point to a file successfully opened by fopen() or fsockopen() (and not yet closed by fclose()).
 * @return bool true if the file pointer is at EOF or an error occurs
 * (including socket timeout); otherwise returns false.
 */
#[Pure(true)]
function feof($stream): bool {}

/**
 * Gets character from file pointer
 * @link https://php.net/manual/en/function.fgetc.php
 * @param resource $stream The file pointer must be valid, and must point to a file successfully opened by fopen() or fsockopen() (and not yet closed by fclose()).
 * @return string|false a string containing a single character read from the file pointed
 * to by handle. Returns false on EOF.
 */
function fgetc($stream): string|false {}

/**
 * Gets line from file pointer
 * @link https://php.net/manual/en/function.fgets.php
 * @param resource $stream The file pointer must be valid, and must point to a file successfully opened by fopen() or fsockopen() (and not yet closed by fclose()).
 * @param int|null $length [optional] <p>
 * Reading ends when length - 1 bytes have been
 * read, on a newline (which is included in the return value), or on EOF
 * (whichever comes first). If no length is specified, it will keep
 * reading from the stream until it reaches the end of the line.
 * </p>
 * <p>
 * Until PHP 4.3.0, omitting it would assume 1024 as the line length.
 * If the majority of the lines in the file are all larger than 8KB,
 * it is more resource efficient for your script to specify the maximum
 * line length.
 * </p>
 * @return string|false a string of up to length - 1 bytes read from
 * the file pointed to by handle.
 * </p>
 * <p>
 * If an error occurs, returns false.
 */
function fgets($stream, ?int $length): string|false {}

/**
 * Gets line from file pointer and strip HTML tags
 * @link https://php.net/manual/en/function.fgetss.php
 * @param resource $handle The file pointer must be valid, and must point to a file successfully opened by fopen() or fsockopen() (and not yet closed by fclose()).
 * @param null|int $length [optional] <p>
 * Length of the data to be retrieved.
 * </p>
 * @param string $allowable_tags [optional] <p>
 * You can use the optional third parameter to specify tags which should
 * not be stripped.
 * </p>
 * @return string|false a string of up to length - 1 bytes read from
 * the file pointed to by handle, with all HTML and PHP
 * code stripped.
 * </p>
 * <p>
 * If an error occurs, returns false.
 * @removed 8.0
 */
#[Deprecated(since: '7.3')]
function fgetss($handle, ?int $length = null, $allowable_tags = null): false|string {}

/**
 * Binary-safe file read
 * @link https://php.net/manual/en/function.fread.php
 * @param resource $stream &fs.file.pointer;
 * @param int $length <p>
 * Up to length number of bytes read.
 * </p>
 * @return string|false the read string or false on failure.
 */
function fread($stream, int $length): string|false {}

/**
 * Opens file or URL
 * @link https://php.net/manual/en/function.fopen.php
 * @param string $filename <p>
 * If filename is of the form "scheme://...", it
 * is assumed to be a URL and PHP will search for a protocol handler
 * (also known as a wrapper) for that scheme. If no wrappers for that
 * protocol are registered, PHP will emit a notice to help you track
 * potential problems in your script and then continue as though
 * filename specifies a regular file.
 * </p>
 * <p>
 * If PHP has decided that filename specifies
 * a local file, then it will try to open a stream on that file.
 * The file must be accessible to PHP, so you need to ensure that
 * the file access permissions allow this access.
 * If you have enabled "safemode",
 * or open_basedir further
 * restrictions may apply.
 * </p>
 * <p>
 * If PHP has decided that filename specifies
 * a registered protocol, and that protocol is registered as a
 * network URL, PHP will check to make sure that
 * allow_url_fopen is
 * enabled. If it is switched off, PHP will emit a warning and
 * the fopen call will fail.
 * </p>
 * <p>
 * The list of supported protocols can be found in . Some protocols (also referred to as
 * wrappers) support context
 * and/or "php.ini" options. Refer to the specific page for the
 * protocol in use for a list of options which can be set. (e.g.
 * "php.ini" value user_agent used by the
 * http wrapper).
 * </p>
 * <p>
 * On the Windows platform, be careful to escape any backslashes
 * used in the path to the file, or use forward slashes.
 * </p>
 * <pre>
 * <?php
 * $handle = fopen("c:\\folder\\resource.txt", "r");
 * ?>
 * </pre>
 * @param string $mode <p>
 * The mode parameter specifies the type of access
 * you require to the stream. It may be any of the following:
 * <table>
 * A list of possible modes for fopen
 * using mode
 * <tr valign="top">
 * <td>mode</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>'r'</td>
 * <td>
 * Open for reading only; place the file pointer at the
 * beginning of the file.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>'r+'</td>
 * <td>
 * Open for reading and writing; place the file pointer at
 * the beginning of the file.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>'w'</td>
 * <td>
 * Open for writing only; place the file pointer at the
 * beginning of the file and truncate the file to zero length.
 * If the file does not exist, attempt to create it.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>'w+'</td>
 * <td>
 * Open for reading and writing; place the file pointer at
 * the beginning of the file and truncate the file to zero
 * length. If the file does not exist, attempt to create it.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>'a'</td>
 * <td>
 * Open for writing only; place the file pointer at the end of
 * the file. If the file does not exist, attempt to create it.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>'a+'</td>
 * <td>
 * Open for reading and writing; place the file pointer at
 * the end of the file. If the file does not exist, attempt to
 * create it.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>'x'</td>
 * <td>
 * Create and open for writing only; place the file pointer at the
 * beginning of the file. If the file already exists, the
 * fopen call will fail by returning false and
 * generating an error of level E_WARNING. If
 * the file does not exist, attempt to create it. This is equivalent
 * to specifying O_EXCL|O_CREAT flags for the
 * underlying open(2) system call.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>'x+'</td>
 * <td>
 * Create and open for reading and writing; place the file pointer at
 * the beginning of the file. If the file already exists, the
 * fopen call will fail by returning false and
 * generating an error of level E_WARNING. If
 * the file does not exist, attempt to create it. This is equivalent
 * to specifying O_EXCL|O_CREAT flags for the
 * underlying open(2) system call.
 * </td>
 * </tr>
 * </table>
 * </p>
 * <p>
 * Different operating system families have different line-ending
 * conventions. When you write a text file and want to insert a line
 * break, you need to use the correct line-ending character(s) for your
 * operating system. Unix based systems use \n as the
 * line ending character, Windows based systems use \r\n
 * as the line ending characters and Macintosh based systems use
 * \r as the line ending character.
 * </p>
 * <p>
 * If you use the wrong line ending characters when writing your files, you
 * might find that other applications that open those files will "look
 * funny".
 * </p>
 * <p>
 * Windows offers a text-mode translation flag ('t')
 * which will transparently translate \n to
 * \r\n when working with the file. In contrast, you
 * can also use 'b' to force binary mode, which will not
 * translate your data. To use these flags, specify either
 * 'b' or 't' as the last character
 * of the mode parameter.
 * </p>
 * <p>
 * The default translation mode depends on the SAPI and version of PHP that
 * you are using, so you are encouraged to always specify the appropriate
 * flag for portability reasons. You should use the 't'
 * mode if you are working with plain-text files and you use
 * \n to delimit your line endings in your script, but
 * expect your files to be readable with applications such as notepad. You
 * should use the 'b' in all other cases.
 * </p>
 * <p>
 * If you do not specify the 'b' flag when working with binary files, you
 * may experience strange problems with your data, including broken image
 * files and strange problems with \r\n characters.
 * </p>
 * <p>
 * For portability, it is strongly recommended that you always
 * use the 'b' flag when opening files with fopen.
 * </p>
 * <p>
 * Again, for portability, it is also strongly recommended that
 * you re-write code that uses or relies upon the 't'
 * mode so that it uses the correct line endings and
 * 'b' mode instead.
 * </p>
 * @param bool $use_include_path [optional] <p>
 * The optional third use_include_path parameter
 * can be set to '1' or true if you want to search for the file in the
 * include_path, too.
 * </p>
 * @param resource $context [optional]
 * @return resource|false a file pointer resource on success, or false on error.
 */
function fopen(string $filename, string $mode, bool $use_include_path = false, $context) {}

/**
 * Output all remaining data on a file pointer
 * @link https://php.net/manual/en/function.fpassthru.php
 * @param resource $stream The file pointer must be valid, and must point to a file successfully opened by fopen() or fsockopen() (and not yet closed by fclose()).
 * @return int|false If an error occurs, fpassthru returns
 * false. Otherwise, fpassthru returns
 * the number of characters read from handle
 * and passed through to the output.
 */
#[LanguageLevelTypeAware(["8.0" => "int"], default: "int|false")]
function fpassthru($stream) {}

/**
 * Truncates a file to a given length
 * @link https://php.net/manual/en/function.ftruncate.php
 * @param resource $stream <p>
 * The file pointer.
 * </p>
 * <p>
 * The handle must be open for writing.
 * </p>
 * @param int $size <p>
 * The size to truncate to.
 * </p>
 * <p>
 * If size is larger than the file it is extended
 * with null bytes.
 * </p>
 * <p>
 * If size is smaller than the extra data
 * will be lost.
 * </p>
 * @return bool true on success or false on failure.
 */
function ftruncate($stream, int $size): bool {}

/**
 * Gets information about a file using an open file pointer
 * @link https://php.net/manual/en/function.fstat.php
 * @param resource $stream &fs.file.pointer;
 * @return array|false an array with the statistics of the file; the format of the array
 * is described in detail on the stat manual page.
 */
#[Pure(true)]
function fstat($stream): array|false {}

/**
 * Seeks on a file pointer
 * @link https://php.net/manual/en/function.fseek.php
 * @param resource $stream &fs.file.pointer;
 * @param int $offset <p>
 * The offset.
 * </p>
 * <p>
 * To move to a position before the end-of-file, you need to pass
 * a negative value in offset and
 * set whence
 * to SEEK_END.
 * </p>
 * @param int $whence [optional] <p>
 * whence values are:
 * SEEK_SET - Set position equal to offset bytes.
 * SEEK_CUR - Set position to current location plus offset.
 * SEEK_END - Set position to end-of-file plus offset.
 * </p>
 * <p>
 * If whence is not specified, it is assumed to be
 * SEEK_SET.
 * </p>
 * @return int Upon success, returns 0; otherwise, returns -1. Note that seeking
 * past EOF is not considered an error.
 */
function fseek($stream, int $offset, int $whence = SEEK_SET): int {}

/**
 * Returns the current position of the file read/write pointer
 * @link https://php.net/manual/en/function.ftell.php
 * @param resource $stream <p>
 * The file pointer must be valid, and must point to a file successfully
 * opened by fopen or popen.
 * ftell gives undefined results for append-only streams
 * (opened with "a" flag).
 * </p>
 * @return int|false the position of the file pointer referenced by
 * handle as an integer; i.e., its offset into the file stream.
 * </p>
 * <p>
 * If an error occurs, returns false.
 */
#[Pure(true)]
function ftell($stream): int|false {}

/**
 * Flushes the output to a file
 * @link https://php.net/manual/en/function.fflush.php
 * @param resource $stream The file pointer must be valid, and must point to a file successfully opened by fopen() or fsockopen() (and not yet closed by fclose()).
 * @return bool true on success or false on failure.
 */
function fflush($stream): bool {}

/**
 * Sync file to storage. Similar to fflush() but blocks until OS buffers have flushed.
 * @param resource $stream
 * @since 8.1
 */
function fsync($stream): bool {}

/**
 * Sync file data only to storage. Similar to fsync but does not flush modified metadata. POSIX only, aliased to fsync on Win32.
 * @param resource $stream
 * @since 8.1
 */
function fdatasync($stream): bool {}

/**
 * Binary-safe file write
 * @link https://php.net/manual/en/function.fwrite.php
 * @param resource $stream &fs.file.pointer;
 * @param string $data <p>
 * The string that is to be written.
 * </p>
 * @param int|null $length [optional] <p>
 * If the length argument is given, writing will
 * stop after length bytes have been written or
 * the end of string is reached, whichever comes
 * first.
 * </p>
 * <p>
 * Note that if the length argument is given,
 * then the magic_quotes_runtime
 * configuration option will be ignored and no slashes will be
 * stripped from string.
 * </p>
 * @return int|false the number of bytes written, or <b>FALSE</b> on error.
 */
function fwrite($stream, string $data, ?int $length): int|false {}

/**
 * Alias:
 * {@see fwrite}
 * @param resource $stream A file system pointer resource that is typically created using fopen().
 * @param string $data <p>
 * The string that is to be written.
 * </p>
 * @param int|null $length [optional] <p>
 * If the length argument is given, writing will
 * stop after length bytes have been written or
 * the end of string is reached, whichever comes
 * first.
 * </p>
 * <p>
 * Note that if the length argument is given,
 * then the magic_quotes_runtime
 * configuration option will be ignored and no slashes will be
 * stripped from string.
 * </p>
 * @return int|false the number of bytes written, or <b>FALSE</b> on error.
 * @see fwrite()
 * @link https://php.net/manual/en/function.fputs.php
 * Binary-safe file write
 */
function fputs($stream, string $data, ?int $length): int|false {}

/**
 * Attempts to create the directory specified by pathname.
 * @link https://php.net/manual/en/function.mkdir.php
 * @param string $directory <p>
 * The directory path.
 * </p>
 * @param int $permissions [optional] <p>
 * The mode is 0777 by default, which means the widest possible
 * access. For more information on modes, read the details
 * on the chmod page.
 * </p>
 * <p>
 * mode is ignored on Windows.
 * </p>
 * <p>
 * Note that you probably want to specify the mode as an octal number,
 * which means it should have a leading zero. The mode is also modified
 * by the current umask, which you can change using
 * umask().
 * </p>
 * @param bool $recursive [optional] <p>
 * Allows the creation of nested directories specified in the pathname. Default to false.
 * </p>
 * @param resource $context [optional]
 * @return bool true on success or false on failure.
 */
function mkdir(string $directory, int $permissions = 0777, bool $recursive = false, $context): bool {}

/**
 * Renames a file or directory
 * @link https://php.net/manual/en/function.rename.php
 * @param string $from <p>
 * </p>
 * <p>
 * The old name. The wrapper used in oldname
 * must match the wrapper used in
 * newname.
 * </p>
 * @param string $to <p>
 * The new name.
 * </p>
 * @param resource $context [optional]
 * @return bool true on success or false on failure.
 */
function rename(string $from, string $to, $context): bool {}

/**
 * Copies file
 * @link https://php.net/manual/en/function.copy.php
 * @param string $from <p>
 * Path to the source file.
 * </p>
 * @param string $to <p>
 * The destination path. If dest is a URL, the
 * copy operation may fail if the wrapper does not support overwriting of
 * existing files.
 * </p>
 * <p>
 * If the destination file already exists, it will be overwritten.
 * </p>
 * @param resource $context [optional] <p>
 * A valid context resource created with
 * stream_context_create.
 * </p>
 * @return bool true on success or false on failure.
 */
function copy(string $from, string $to, $context): bool {}

/**
 * Create file with unique file name
 * @link https://php.net/manual/en/function.tempnam.php
 * @param string $directory <p>
 * The directory where the temporary filename will be created.
 * </p>
 * @param string $prefix <p>
 * The prefix of the generated temporary filename.
 * </p>
 * Windows use only the first three characters of prefix.
 * @return string|false the new temporary filename, or false on
 * failure.
 */
function tempnam(string $directory, string $prefix): string|false {}

/**
 * Creates a temporary file
 * @link https://php.net/manual/en/function.tmpfile.php
 * @return resource|false a file handle, similar to the one returned by
 * fopen, for the new file or false on failure.
 */
function tmpfile() {}

/**
 * Reads entire file into an array
 * @link https://php.net/manual/en/function.file.php
 * @param string $filename <p>
 * Path to the file.
 * </p>
 * @param int $flags <p>
 * The optional parameter flags can be one, or
 * more, of the following constants:
 * <ul>
 * <li><tt>FILE_USE_INCLUDE_PATH</tt> - Search for the file in the include_path.</li>
 * <li><tt>FILE_IGNORE_NEW_LINES</tt> - Omit newline at the end of each array element</li>
 * <li><tt>FILE_SKIP_EMPTY_LINES</tt> - Skip empty lines</li>
 * </ul>
 * </p>
 * @param resource $context [optional] <p>
 * A context resource created with the
 * stream_context_create function.
 * </p>
 * @return array|false the file in an array. Each element of the array corresponds to a
 * line in the file, with the newline still attached. Upon failure,
 * file returns false.
 * <p>
 * Each line in the resulting array will include the line ending, unless
 * FILE_IGNORE_NEW_LINES is used, so you still need to
 * use rtrim if you do not want the line ending
 * present.
 * </p>
 */
#[Pure(true)]
function file(string $filename, int $flags = 0, $context): array|false {}

/**
 * Reads entire file into a string
 * @link https://php.net/manual/en/function.file-get-contents.php
 * @param string $filename <p>
 * Name of the file to read.
 * </p>
 * @param bool $use_include_path [optional] <p>
 * Note: As of PHP 5 the FILE_USE_INCLUDE_PATH constant can be
 * used to trigger include path search.
 * </p>
 * @param resource $context [optional] <p>
 * A valid context resource created with
 * stream_context_create. If you don't need to use a
 * custom context, you can skip this parameter by null.
 * </p>
 * @param int $offset [optional] <p>
 * The offset where the reading starts.
 * </p>
 * @param int|null $length [optional] <p>
 * Maximum length of data read. The default is to read until end
 * of file is reached.
 * </p>
 * @return string|false The function returns the read data or false on failure.
 */
#[Pure(true)]
function file_get_contents(string $filename, bool $use_include_path = false, $context, int $offset = 0, ?int $length): string|false {}

/**
 * Write a string to a file
 * @link https://php.net/manual/en/function.file-put-contents.php
 * @param string $filename <p>
 * Path to the file where to write the data.
 * </p>
 * @param mixed $data <p>
 * The data to write. Can be either a string, an
 * array or a stream resource.
 * </p>
 * <p>
 * If data is a stream resource, the
 * remaining buffer of that stream will be copied to the specified file.
 * This is similar with using stream_copy_to_stream.
 * </p>
 * <p>
 * You can also specify the data parameter as a single
 * dimension array. This is equivalent to
 * file_put_contents($filename, implode('', $array)).
 * </p>
 * @param int $flags [optional] <p>
 * The value of flags can be any combination of
 * the following flags (with some restrictions), joined with the binary OR
 * (|) operator.
 * </p>
 * <p>
 * <table>
 * Available flags
 * <tr valign="top">
 * <td>Flag</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>
 * FILE_USE_INCLUDE_PATH
 * </td>
 * <td>
 * Search for filename in the include directory.
 * See include_path for more
 * information.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>
 * FILE_APPEND
 * </td>
 * <td>
 * If file filename already exists, append
 * the data to the file instead of overwriting it. Mutually
 * exclusive with LOCK_EX since appends are atomic and thus there
 * is no reason to lock.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>
 * LOCK_EX
 * </td>
 * <td>
 * Acquire an exclusive lock on the file while proceeding to the
 * writing. Mutually exclusive with FILE_APPEND.
 * </td>
 * </tr>
 * </table>
 * </p>
 * @param resource $context [optional] <p>
 * A valid context resource created with
 * stream_context_create.
 * </p>
 * @return int|false The function returns the number of bytes that were written to the file, or
 * false on failure.
 */
function file_put_contents(string $filename, mixed $data, int $flags = 0, $context): int|false {}
<?php

use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\ReturnTypeContract as TypeContract;
use JetBrains\PhpStorm\Pure;

/**
 * Query language and locale information
 * @link https://php.net/manual/en/function.nl-langinfo.php
 * @param int $item <p>
 * item may be an integer value of the element or the
 * constant name of the element. The following is a list of constant names
 * for item that may be used and their description.
 * Some of these constants may not be defined or hold no value for certain
 * locales.</p>
 * nl_langinfo Constants
 * <table>
 * <tr valign="top">
 * <td>Constant</td>
 * <td>Description</td>
 * </tr>
 * <tr colspan="2" valign="top" bgcolor="silver">
 * <td >LC_TIME Category Constants</td>
 * </tr>
 * <tr valign="top">
 * <td>ABDAY_(1-7)</td>
 * <td>Abbreviated name of n-th day of the week.</td>
 * </tr>
 * <tr valign="top">
 * <td>DAY_(1-7)</td>
 * <td>Name of the n-th day of the week (DAY_1 = Sunday).</td>
 * </tr>
 * <tr valign="top">
 * <td>ABMON_(1-12)</td>
 * <td>Abbreviated name of the n-th month of the year.</td>
 * </tr>
 * <tr valign="top">
 * <td>MON_(1-12)</td>
 * <td>Name of the n-th month of the year.</td>
 * </tr>
 * <tr valign="top">
 * <td>AM_STR</td>
 * <td>String for Ante meridian.</td>
 * </tr>
 * <tr valign="top">
 * <td>PM_STR</td>
 * <td>String for Post meridian.</td>
 * </tr>
 * <tr valign="top">
 * <td>D_T_FMT</td>
 * <td>String that can be used as the format string for strftime to represent time and date.</td>
 * </tr>
 * <tr valign="top">
 * <td>D_FMT</td>
 * <td>String that can be used as the format string for strftime to represent date.</td>
 * </tr>
 * <tr valign="top">
 * <td>T_FMT</td>
 * <td>String that can be used as the format string for strftime to represent time.</td>
 * </tr>
 * <tr valign="top">
 * <td>T_FMT_AMPM</td>
 * <td>String that can be used as the format string for strftime to represent time in 12-hour format with ante/post meridian.</td>
 * </tr>
 * <tr valign="top">
 * <td>ERA</td>
 * <td>Alternate era.</td>
 * </tr>
 * <tr valign="top">
 * <td>ERA_YEAR</td>
 * <td>Year in alternate era format.</td>
 * </tr>
 * <tr valign="top">
 * <td>ERA_D_T_FMT</td>
 * <td>Date and time in alternate era format (string can be used in strftime).</td>
 * </tr>
 * <tr valign="top">
 * <td>ERA_D_FMT</td>
 * <td>Date in alternate era format (string can be used in strftime).</td>
 * </tr>
 * <tr valign="top">
 * <td>ERA_T_FMT</td>
 * <td>Time in alternate era format (string can be used in strftime).</td>
 * </tr>
 * <tr colspan="2" valign="top" bgcolor="silver">
 * <td>LC_MONETARY Category Constants</td>
 * </tr>
 * <tr valign="top">
 * <td>INT_CURR_SYMBOL</td>
 * <td>International currency symbol.</td>
 * </tr>
 * <tr valign="top">
 * <td>CURRENCY_SYMBOL</td>
 * <td>Local currency symbol.</td>
 * </tr>
 * <tr valign="top">
 * <td>CRNCYSTR</td>
 * <td>Same value as CURRENCY_SYMBOL.</td>
 * </tr>
 * <tr valign="top">
 * <td>MON_DECIMAL_POINT</td>
 * <td>Decimal point character.</td>
 * </tr>
 * <tr valign="top">
 * <td>MON_THOUSANDS_SEP</td>
 * <td>Thousands separator (groups of three digits).</td>
 * </tr>
 * <tr valign="top">
 * <td>MON_GROUPING</td>
 * <td>Like "grouping" element.</td>
 * </tr>
 * <tr valign="top">
 * <td>POSITIVE_SIGN</td>
 * <td>Sign for positive values.</td>
 * </tr>
 * <tr valign="top">
 * <td>NEGATIVE_SIGN</td>
 * <td>Sign for negative values.</td>
 * </tr>
 * <tr valign="top">
 * <td>INT_FRAC_DIGITS</td>
 * <td>International fractional digits.</td>
 * </tr>
 * <tr valign="top">
 * <td>FRAC_DIGITS</td>
 * <td>Local fractional digits.</td>
 * </tr>
 * <tr valign="top">
 * <td>P_CS_PRECEDES</td>
 * <td>Returns 1 if CURRENCY_SYMBOL precedes a positive value.</td>
 * </tr>
 * <tr valign="top">
 * <td>P_SEP_BY_SPACE</td>
 * <td>Returns 1 if a space separates CURRENCY_SYMBOL from a positive value.</td>
 * </tr>
 * <tr valign="top">
 * <td>N_CS_PRECEDES</td>
 * <td>Returns 1 if CURRENCY_SYMBOL precedes a negative value.</td>
 * </tr>
 * <tr valign="top">
 * <td>N_SEP_BY_SPACE</td>
 * <td>Returns 1 if a space separates CURRENCY_SYMBOL from a negative value.</td>
 * </tr>
 * <tr valign="top">
 * <td>P_SIGN_POSN</td>
 * <td>Returns 0 if parentheses surround the quantity and CURRENCY_SYMBOL.</td>
 * </tr>
 * </table>
 * @return string|false the element as a string, or false if item
 * is not valid.
 */
#[Pure(true)]
function nl_langinfo(int $item): string|false {}

/**
 * Calculate the soundex key of a string
 * @link https://php.net/manual/en/function.soundex.php
 * @param string $string <p>
 * The input string.
 * </p>
 * @return string the soundex key as a string.
 */
#[Pure]
function soundex(string $string): string {}

/**
 * Calculate Levenshtein distance between two strings
 * @link https://php.net/manual/en/function.levenshtein.php
 * Note: In its simplest form the function will take only the two strings
 * as parameter and will calculate just the number of insert, replace and
 * delete operations needed to transform str1 into str2.
 * Note: A second variant will take three additional parameters that define
 * the cost of insert, replace and delete operations. This is more general
 * and adaptive than variant one, but not as efficient.
 * @param string $string1 <p>
 * One of the strings being evaluated for Levenshtein distance.
 * </p>
 * @param string $string2 <p>
 * One of the strings being evaluated for Levenshtein distance.
 * </p>
 * @param int $insertion_cost [optional] <p>
 * Defines the cost of insertion.
 * </p>
 * @param int $replacement_cost [optional] <p>
 * Defines the cost of replacement.
 * </p>
 * @param int $deletion_cost [optional] <p>
 * Defines the cost of deletion.
 * </p>
 * @return int This function returns the Levenshtein-Distance between the
 * two argument strings or -1, if one of the argument strings
 * is longer than the limit of 255 characters.
 */
function levenshtein(string $string1, string $string2, int $insertion_cost = 1, int $replacement_cost = 1, int $deletion_cost = 1): int {}

/**
 * Generate a single-byte string from a number
 * @link https://php.net/manual/en/function.chr.php
 * @param int $codepoint <p>
 * The ascii code.
 * </p>
 * @return string the specified character.
 */
#[Pure]
function chr(int $codepoint): string {}

/**
 * Convert the first byte of a string to a value between 0 and 255
 * @link https://php.net/manual/en/function.ord.php
 * @param string $character <p>
 * A character.
 * </p>
 * @return int<0, 255> the ASCII value as an integer.
 */
#[Pure]
function ord(string $character): int {}

/**
 * Parses the string into variables
 * @link https://php.net/manual/en/function.parse-str.php
 * @param string $string <p>
 * The input string.
 * </p>
 * @param array &$result <p>
 * If the second parameter arr is present,
 * variables are stored in this variable as array elements instead.<br/>
 * Since 7.2.0 this parameter is not optional.
 * </p>
 * @return void
 */
function parse_str(
    string $string,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] &$result = [],
    #[PhpStormStubsElementAvailable(from: '8.0')] &$result
): void {}

/**
 * Parse a CSV string into an array
 * @link https://php.net/manual/en/function.str-getcsv.php
 * @param string $string <p>
 * The string to parse.
 * </p>
 * @param string $separator [optional] <p>
 * Set the field delimiter (one character only).
 * </p>
 * @param string $enclosure [optional] <p>
 * Set the field enclosure character (one character only).
 * </p>
 * @param string $escape [optional] <p>
 * Set the escape character (one character only).
 * Defaults as a backslash (\)
 * </p>
 * @return array an indexed array containing the fields read.
 */
#[Pure]
function str_getcsv(string $string, string $separator = ",", string $enclosure = '"', string $escape = "\\"): array {}

/**
 * Pad a string to a certain length with another string
 * @link https://php.net/manual/en/function.str-pad.php
 * @param string $string <p>
 * The input string.
 * </p>
 * @param int $length <p>
 * If the value of pad_length is negative,
 * less than, or equal to the length of the input string, no padding
 * takes place.
 * </p>
 * @param string $pad_string [optional] <p>
 * The pad_string may be truncated if the
 * required number of padding characters can't be evenly divided by the
 * pad_string's length.
 * </p>
 * @param int $pad_type [optional] <p>
 * Optional argument pad_type can be
 * STR_PAD_RIGHT, STR_PAD_LEFT,
 * or STR_PAD_BOTH. If
 * pad_type is not specified it is assumed to be
 * STR_PAD_RIGHT.
 * </p>
 * @return string the padded string.
 */
#[Pure]
function str_pad(string $string, int $length, string $pad_string = " ", int $pad_type = STR_PAD_RIGHT): string {}

/**
 * Alias:
 * {@see rtrim}
 * @param string $string The input string.
 * @param string $characters [optional]
 * @return string the modified string.
 * @link https://php.net/manual/en/function.chop.php
 * @see rtrim()
 */
#[Pure]
function chop(string $string, string $characters): string {}

/**
 * Alias:
 * {@see strstr}
 * @link https://php.net/manual/en/function.strchr.php
 * Note: This function is case-sensitive. For case-insensitive searches, use stristr().
 * Note: If you only want to determine if a particular needle occurs within haystack,
 * use the faster and less memory intensive function strpos() instead.
 *
 * @param string $haystack The input string.
 * @param string $needle If needle is not a string, it is converted to an integer and applied as the ordinal value of a character.
 * @param bool $before_needle [optional] If TRUE, strstr() returns the part of the haystack before the first occurrence of the needle (excluding the needle).
 * @return string|false Returns the portion of string, or FALSE if needle is not found.
 */
#[Pure]
function strchr(string $haystack, string $needle, bool $before_needle = false): string|false {}

/**
 * Return a formatted string
 * @link https://php.net/manual/en/function.sprintf.php
 * @param string $format <p>
 * The format string is composed of zero or more directives:
 * ordinary characters (excluding %) that are
 * copied directly to the result, and conversion
 * specifications, each of which results in fetching its
 * own parameter. This applies to both sprintf
 * and printf.
 * </p>
 * <p>
 * Each conversion specification consists of a percent sign
 * (%), followed by one or more of these
 * elements, in order:
 * An optional sign specifier that forces a sign
 * (- or +) to be used on a number. By default, only the - sign is used
 * on a number if it's negative. This specifier forces positive numbers
 * to have the + sign attached as well, and was added in PHP 4.3.0.</p>
 * @param string|int|float ...$values <p>
 * </p>
 * @return string a string produced according to the formatting string
 * format.
 */
#[Pure]
function sprintf(
    string $format,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $values,
    mixed ...$values
): string {}

/**
 * Output a formatted string
 * @link https://php.net/manual/en/function.printf.php
 * @param string $format <p>
 * See sprintf for a description of
 * format.
 * </p>
 * @param string|int|float ...$values [optional] <p>
 * </p>
 * @return int the length of the outputted string.
 */
function printf(string $format, mixed ...$values): int {}

/**
 * Output a formatted string
 * @link https://php.net/manual/en/function.vprintf.php
 * @param string $format <p>
 * See sprintf for a description of
 * format.
 * </p>
 * @param array $values <p>
 * </p>
 * @return int the length of the outputted string.
 */
function vprintf(string $format, array $values): int {}

/**
 * Return a formatted string
 * @link https://php.net/manual/en/function.vsprintf.php
 * @param string $format <p>
 * See sprintf for a description of
 * format.
 * </p>
 * @param array $values <p>
 * </p>
 * @return string Return array values as a formatted string according to
 * format (which is described in the documentation
 * for sprintf).
 */
#[Pure]
function vsprintf(string $format, array $values): string {}

/**
 * Write a formatted string to a stream
 * @link https://php.net/manual/en/function.fprintf.php
 * @param resource $stream &fs.file.pointer;
 * @param string $format <p>
 * See sprintf for a description of
 * format.
 * </p>
 * @param mixed ...$values [optional] <p>
 * </p>
 * @return int the length of the string written.
 */
function fprintf($stream, string $format, mixed ...$values): int {}

/**
 * Write a formatted string to a stream
 * @link https://php.net/manual/en/function.vfprintf.php
 * @param resource $stream <p>
 * </p>
 * @param string $format <p>
 * See sprintf for a description of
 * format.
 * </p>
 * @param array $values <p>
 * </p>
 * @return int the length of the outputted string.
 */
function vfprintf($stream, string $format, array $values): int {}

/**
 * Parses input from a string according to a format
 * @link https://php.net/manual/en/function.sscanf.php
 * @param string $string <p>
 * The input string being parsed.
 * </p>
 * @param string $format <p>
 * The interpreted format for str, which is
 * described in the documentation for sprintf with
 * following differences:
 * Function is not locale-aware.
 * F, g, G and
 * b are not supported.
 * D stands for decimal number.
 * i stands for integer with base detection.
 * n stands for number of characters processed so far.
 * </p>
 * @param mixed &...$vars [optional]
 * @return array|int|null If only
 * two parameters were passed to this function, the values parsed
 * will be returned as an array. Otherwise, if optional parameters are passed,
 * the function will return the number of assigned values. The optional
 * parameters must be passed by reference.
 */
function sscanf(string $string, string $format, #[TypeContract(exists: "int|null", notExists: "array|null")] mixed &...$vars): array|int|null {}

/**
 * Parses input from a file according to a format
 * @link https://php.net/manual/en/function.fscanf.php
 * @param resource $stream &fs.file.pointer;
 * @param string $format <p>
 * The specified format as described in the
 * sprintf documentation.
 * </p>
 * @param mixed &...$vars [optional]
 * @return array|int|false|null If only two parameters were passed to this function, the values parsed will be
 * returned as an array. Otherwise, if optional parameters are passed, the
 * function will return the number of assigned values. The optional
 * parameters must be passed by reference.
 */
function fscanf($stream, string $format, #[TypeContract(exists: "int|false|null", notExists: "array|false|null")] mixed &...$vars): array|int|false|null {}

/**
 * Parse a URL and return its components
 * @link https://php.net/manual/en/function.parse-url.php
 * @param string $url <p>
 * The URL to parse. Invalid characters are replaced by
 * _.
 * </p>
 * @param int $component [optional] <p>
 * Specify one of PHP_URL_SCHEME,
 * PHP_URL_HOST, PHP_URL_PORT,
 * PHP_URL_USER, PHP_URL_PASS,
 * PHP_URL_PATH, PHP_URL_QUERY
 * or PHP_URL_FRAGMENT to retrieve just a specific
 * URL component as a string.
 * </p>
 * @return array|string|int|null|false On seriously malformed URLs, parse_url() may return FALSE.
 * If the component parameter is omitted, an associative array is returned.
 * At least one element will be present within the array. Potential keys within this array are:
 * scheme - e.g. http
 * host
 * port
 * user
 * pass
 * path
 * query - after the question mark ?
 * fragment - after the hashmark #
 * </p>
 * <p>
 * If the component parameter is specified a
 * string is returned instead of an array.
 */
#[ArrayShape(["scheme" => "string", "host" => "string", "port" => "int", "user" => "string", "pass" => "string", "query" => "string", "path" => "string", "fragment" => "string"])]
#[Pure]
function parse_url(string $url, int $component = -1): array|string|int|false|null {}

/**
 * URL-encodes string
 * @link https://php.net/manual/en/function.urlencode.php
 * @param string $string <p>
 * The string to be encoded.
 * </p>
 * @return string a string in which all non-alphanumeric characters except
 * -_. have been replaced with a percent
 * (%) sign followed by two hex digits and spaces encoded
 * as plus (+) signs. It is encoded the same way that the
 * posted data from a WWW form is encoded, that is the same way as in
 * application/x-www-form-urlencoded media type. This
 * differs from the RFC 3986 encoding (see
 * rawurlencode) in that for historical reasons, spaces
 * are encoded as plus (+) signs.
 */
#[Pure]
function urlencode(string $string): string {}

/**
 * Decodes URL-encoded string
 * @link https://php.net/manual/en/function.urldecode.php
 * @param string $string <p>
 * The string to be decoded.
 * </p>
 * @return string the decoded string.
 */
#[Pure]
function urldecode(string $string): string {}

/**
 * URL-encode according to RFC 3986
 * @link https://php.net/manual/en/function.rawurlencode.php
 * @param string $string <p>
 * The URL to be encoded.
 * </p>
 * @return string a string in which all non-alphanumeric characters except
 * -_. have been replaced with a percent
 * (%) sign followed by two hex digits. This is the
 * encoding described in RFC 1738 for
 * protecting literal characters from being interpreted as special URL
 * delimiters, and for protecting URLs from being mangled by transmission
 * media with character conversions (like some email systems).
 */
#[Pure]
function rawurlencode(string $string): string {}

/**
 * Decode URL-encoded strings
 * @link https://php.net/manual/en/function.rawurldecode.php
 * @param string $string <p>
 * The URL to be decoded.
 * </p>
 * @return string the decoded URL, as a string.
 */
#[Pure]
function rawurldecode(string $string): string {}

/**
 * Generate URL-encoded query string
 * @link https://php.net/manual/en/function.http-build-query.php
 * @param object|array $data <p>
 * May be an array or object containing properties.
 * </p>
 * <p>
 * If query_data is an array, it may be a simple one-dimensional structure,
 * or an array of arrays (which in turn may contain other arrays).
 * </p>
 * <p>
 * If query_data is an object, then only public properties will be incorporated into the result.
 * </p>
 * @param string $numeric_prefix [optional] <p>
 * If numeric indices are used in the base array and this parameter is
 * provided, it will be prepended to the numeric index for elements in
 * the base array only.
 * </p>
 * <p>
 * This is meant to allow for legal variable names when the data is
 * decoded by PHP or another CGI application later on.
 * </p>
 * @param string|null $arg_separator <p>
 * arg_separator.output
 * is used to separate arguments, unless this parameter is specified,
 * and is then used.
 * </p>
 * @param int $encoding_type By default, PHP_QUERY_RFC1738.
 *  <p>If enc_type is PHP_QUERY_RFC1738, then encoding is performed per » RFC 1738 and the application/x-www-form-urlencoded media type,
 *  which implies that spaces are encoded as plus (+) signs.
 *  <p>If enc_type is PHP_QUERY_RFC3986, then encoding is performed according to » RFC 3986, and spaces will be percent encoded (%20).
 * @return string a URL-encoded string.
 */
#[Pure]
function http_build_query(object|array $data, string $numeric_prefix = "", ?string $arg_separator = null, int $encoding_type = PHP_QUERY_RFC1738): string {}

/**
 * Returns the target of a symbolic link
 * @link https://php.net/manual/en/function.readlink.php
 * @param string $path <p>
 * The symbolic link path.
 * </p>
 * @return string|false the contents of the symbolic link path or false on error.
 */
#[Pure(true)]
function readlink(string $path): string|false {}

/**
 * Gets information about a link
 * @link https://php.net/manual/en/function.linkinfo.php
 * @param string $path <p>
 * Path to the link.
 * </p>
 * @return int|false linkinfo returns the st_dev field
 * of the Unix C stat structure returned by the lstat
 * system call. Returns 0 or false in case of error.
 */
#[Pure(true)]
function linkinfo(string $path): int|false {}

/**
 * Creates a symbolic link
 * @link https://php.net/manual/en/function.symlink.php
 * @param string $target <p>
 * Target of the link.
 * </p>
 * @param string $link <p>
 * The link name.
 * </p>
 * @return bool true on success or false on failure.
 */
function symlink(string $target, string $link): bool {}

/**
 * Create a hard link
 * @link https://php.net/manual/en/function.link.php
 * @param string $target Target of the link.
 * @param string $link The link name.
 * @return bool true on success or false on failure.
 */
function link(string $target, string $link): bool {}

/**
 * Deletes a file
 * @link https://php.net/manual/en/function.unlink.php
 * @param string $filename <p>
 * Path to the file.
 * </p>
 * @param resource $context [optional]
 * @return bool true on success or false on failure.
 */
function unlink(string $filename, $context): bool {}

/**
 * Execute an external program
 * @link https://php.net/manual/en/function.exec.php
 * @param string $command <p>
 * The command that will be executed.
 * </p>
 * @param array &$output [optional] <p>
 * If the output argument is present, then the
 * specified array will be filled with every line of output from the
 * command. Trailing whitespace, such as \n, is not
 * included in this array. Note that if the array already contains some
 * elements, exec will append to the end of the array.
 * If you do not want the function to append elements, call
 * unset on the array before passing it to
 * exec.
 * </p>
 * @param int &$result_code [optional] <p>
 * If the return_var argument is present
 * along with the output argument, then the
 * return status of the executed command will be written to this
 * variable.
 * </p>
 * @return string|false The last line from the result of the command. If you need to execute a
 * command and have all the data from the command passed directly back without
 * any interference, use the passthru function.
 * </p>
 * <p>
 * To get the output of the executed command, be sure to set and use the
 * output parameter.
 */
function exec(string $command, &$output, &$result_code): string|false {}

/**
 * Execute an external program and display the output
 * @link https://php.net/manual/en/function.system.php
 * @param string $command <p>
 * The command that will be executed.
 * </p>
 * @param int &$result_code [optional] <p>
 * If the return_var argument is present, then the
 * return status of the executed command will be written to this
 * variable.
 * </p>
 * @return string|false the last line of the command output on success, and false
 * on failure.
 */
function system(string $command, &$result_code): string|false {}

/**
 * Escape shell metacharacters
 * @link https://php.net/manual/en/function.escapeshellcmd.php
 * @param string $command <p>
 * The command that will be escaped.
 * </p>
 * @return string The escaped string.
 */
#[Pure]
function escapeshellcmd(string $command): string {}

/**
 * Escape a string to be used as a shell argument
 * @link https://php.net/manual/en/function.escapeshellarg.php
 * @param string $arg <p>
 * The argument that will be escaped.
 * </p>
 * @return string The escaped string.
 */
#[Pure]
function escapeshellarg(string $arg): string {}

/**
 * Execute an external program and display raw output
 * @link https://php.net/manual/en/function.passthru.php
 * @param string $command <p>
 * The command that will be executed.
 * </p>
 * @param int &$result_code [optional] <p>
 * If the return_var argument is present, the
 * return status of the Unix command will be placed here.
 * </p>
 * @return bool|null null on success or false on failure.
 */
#[LanguageLevelTypeAware(['8.2' => 'null|false'], default: 'null|bool')]
function passthru(string $command, &$result_code): ?bool {}

/**
 * Execute command via shell and return the complete output as a string
 * @link https://php.net/manual/en/function.shell-exec.php
 * @param string $command <p>
 * The command that will be executed.
 * </p>
 * @return string|false|null The output from the executed command or NULL if an error occurred or the command produces no output.
 */
function shell_exec(string $command): string|false|null {}

/**
 * Execute a command and open file pointers for input/output
 * @link https://php.net/manual/en/function.proc-open.php
 * @param array|string $command <p>
 * Execute a command and open file pointers for input/output
 * </p>
 * <p>
 * As of PHP 7.4.0, cmd may be passed as array of command parameters.
 * In this case the process will be opened directly
 * (without going through a shell) and PHP will take care of any
 * necessary argument escaping.
 * </p>
 * @param array $descriptor_spec <p>
 * An indexed array where the key represents the descriptor number and the
 * value represents how PHP will pass that descriptor to the child
 * process. 0 is stdin, 1 is stdout, while 2 is stderr.
 * </p>
 * <p>
 * Each element can be:
 * An array describing the pipe to pass to the process. The first
 * element is the descriptor type and the second element is an option for
 * the given type. Valid types are pipe (the second
 * element is either r to pass the read end of the pipe
 * to the process, or w to pass the write end) and
 * file (the second element is a filename).
 * A stream resource representing a real file descriptor (e.g. opened file,
 * a socket, STDIN).
 * </p>
 * <p>
 * The file descriptor numbers are not limited to 0, 1 and 2 - you may
 * specify any valid file descriptor number and it will be passed to the
 * child process. This allows your script to interoperate with other
 * scripts that run as "co-processes". In particular, this is useful for
 * passing passphrases to programs like PGP, GPG and openssl in a more
 * secure manner. It is also useful for reading status information
 * provided by those programs on auxiliary file descriptors.
 * </p>
 * @param array &$pipes <p>
 * Will be set to an indexed array of file pointers that correspond to
 * PHP's end of any pipes that are created.
 * </p>
 * @param string|null $cwd [optional] <p>
 * The initial working dir for the command. This must be an
 * absolute directory path, or null
 * if you want to use the default value (the working dir of the current
 * PHP process)
 * </p>
 * @param array|null $env_vars [optional] <p>
 * An array with the environment variables for the command that will be
 * run, or null to use the same environment as the current PHP process
 * </p>
 * @param array|null $options [optional] <p>
 * Allows you to specify additional options. Currently supported options
 * include:
 * suppress_errors (windows only): suppresses errors generated by this
 * function when it's set to TRUE
 * generated by this function when it's set to true
 * bypass_shell (windows only): bypass cmd.exe shell when set to TRUE
 * context: stream context used when opening files
 * (created with stream_context_create)
 * blocking_pipes: (windows only): force blocking pipes when set to TRUE
 * create_process_group (windows only): allow the child process to handle
 * CTRL events when set to TRUE
 * create_new_console (windows only): the new process has a new console,
 * instead of inheriting its parent's console
 * </p>
 * @return resource|false a resource representing the process, which should be freed using
 * proc_close when you are finished with it. On failure
 * returns false.
 */
function proc_open(array|string $command, array $descriptor_spec, &$pipes, ?string $cwd, ?array $env_vars, ?array $options) {}

/**
 * Close a process opened by {@see proc_open} and return the exit code of that process
 * @link https://php.net/manual/en/function.proc-close.php
 * @param resource $process <p>
 * The proc_open resource that will
 * be closed.
 * </p>
 * @return int the termination status of the process that was run.
 */
function proc_close($process): int {}

/**
 * Kills a process opened by proc_open
 * @link https://php.net/manual/en/function.proc-terminate.php
 * @param resource $process <p>
 * The proc_open resource that will
 * be closed.
 * </p>
 * @param int $signal [optional] <p>
 * This optional parameter is only useful on POSIX
 * operating systems; you may specify a signal to send to the process
 * using the kill(2) system call. The default is
 * SIGTERM.
 * </p>
 * @return bool the termination status of the process that was run.
 */
function proc_terminate($process, int $signal = 15): bool {}

/**
 * Get information about a process opened by {@see proc_open}
 * @link https://php.net/manual/en/function.proc-get-status.php
 * @param resource $process <p>
 * The proc_open resource that will
 * be evaluated.
 * </p>
 * @return array|false An array of collected information on success, and false
 * on failure. The returned array contains the following elements:
 * </p>
 * <p>
 * <tr valign="top"><td>element</td><td>type</td><td>description</td></tr>
 * <tr valign="top">
 * <td>command</td>
 * <td>string</td>
 * <td>
 * The command string that was passed to proc_open.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>pid</td>
 * <td>int</td>
 * <td>process id</td>
 * </tr>
 * <tr valign="top">
 * <td>running</td>
 * <td>bool</td>
 * <td>
 * true if the process is still running, false if it has
 * terminated.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>signaled</td>
 * <td>bool</td>
 * <td>
 * true if the child process has been terminated by
 * an uncaught signal. Always set to false on Windows.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>stopped</td>
 * <td>bool</td>
 * <td>
 * true if the child process has been stopped by a
 * signal. Always set to false on Windows.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>exitcode</td>
 * <td>int</td>
 * <td>
 * The exit code returned by the process (which is only
 * meaningful if running is false).
 * Only first call of this function return real value, next calls return
 * -1.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>termsig</td>
 * <td>int</td>
 * <td>
 * The number of the signal that caused the child process to terminate
 * its execution (only meaningful if signaled is true).
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>stopsig</td>
 * <td>int</td>
 * <td>
 * The number of the signal that caused the child process to stop its
 * execution (only meaningful if stopped is true).
 * </td>
 * </tr>
 */
#[ArrayShape(["command" => "string", "pid" => "int", "running" => "bool", "signaled" => "bool", "stopped" => "bool", "exitcode" => "int", "termsig" => "int", "stopsig" => "int"])]
#[LanguageLevelTypeAware(["8.0" => "array"], default: "array|false")]
function proc_get_status($process) {}

/**
 * Change the priority of the current process. <br/>
 * Since 7.2.0 supported on Windows platforms.
 * @link https://php.net/manual/en/function.proc-nice.php
 * @param int $priority <p>
 * The increment value of the priority change.
 * </p>
 * @return bool true on success or false on failure.
 * If an error occurs, like the user lacks permission to change the priority,
 * an error of level E_WARNING is also generated.
 */
function proc_nice(int $priority): bool {}

/**
 * Get port number associated with an Internet service and protocol
 * @link https://php.net/manual/en/function.getservbyname.php
 * @param string $service <p>
 * The Internet service name, as a string.
 * </p>
 * @param string $protocol <p>
 * protocol is either "tcp"
 * or "udp" (in lowercase).
 * </p>
 * @return int|false the port number, or false if service or
 * protocol is not found.
 */
#[Pure]
function getservbyname(string $service, string $protocol): int|false {}

/**
 * Get Internet service which corresponds to port and protocol
 * @link https://php.net/manual/en/function.getservbyport.php
 * @param int $port <p>
 * The port number.
 * </p>
 * @param string $protocol <p>
 * protocol is either "tcp"
 * or "udp" (in lowercase).
 * </p>
 * @return string|false the Internet service name as a string.
 */
#[Pure]
function getservbyport(int $port, string $protocol): string|false {}

/**
 * Get protocol number associated with protocol name
 * @link https://php.net/manual/en/function.getprotobyname.php
 * @param string $protocol <p>
 * The protocol name.
 * </p>
 * @return int|false the protocol number or -1 if the protocol is not found.
 */
#[Pure]
function getprotobyname(string $protocol): int|false {}

/**
 * Get protocol name associated with protocol number
 * @link https://php.net/manual/en/function.getprotobynumber.php
 * @param int $protocol <p>
 * The protocol number.
 * </p>
 * @return string|false the protocol name as a string.
 */
#[Pure]
function getprotobynumber(int $protocol): string|false {}

/**
 * Gets PHP script owner's UID
 * @link https://php.net/manual/en/function.getmyuid.php
 * @return int|false the user ID of the current script, or false on error.
 */
#[Pure]
function getmyuid(): int|false {}

/**
 * Get PHP script owner's GID
 * @link https://php.net/manual/en/function.getmygid.php
 * @return int|false the group ID of the current script, or false on error.
 */
#[Pure]
function getmygid(): int|false {}

/**
 * Gets PHP's process ID
 * @link https://php.net/manual/en/function.getmypid.php
 * @return int|false the current PHP process ID, or false on error.
 */
#[Pure]
function getmypid(): int|false {}

/**
 * Gets the inode of the current script
 * @link https://php.net/manual/en/function.getmyinode.php
 * @return int|false the current script's inode as an integer, or false on error.
 */
#[Pure]
function getmyinode(): int|false {}
<?php

use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Pure;

/**
 * Open Internet or Unix domain socket connection
 * @link https://php.net/manual/en/function.fsockopen.php
 * @param string $hostname <p>
 * If you have compiled in OpenSSL support, you may prefix the
 * hostname with either ssl://
 * or tls:// to use an SSL or TLS client connection
 * over TCP/IP to connect to the remote host.
 * </p>
 * @param int $port <p>
 * The port number.
 * </p>
 * @param int &$error_code [optional] <p>
 * If provided, holds the system level error number that occurred in the
 * system-level connect() call.
 * </p>
 * <p>
 * If the value returned in errno is
 * 0 and the function returned false, it is an
 * indication that the error occurred before the
 * connect() call. This is most likely due to a
 * problem initializing the socket.
 * </p>
 * @param string &$error_message [optional] <p>
 * The error message as a string.
 * </p>
 * @param float|null $timeout [optional] <p>
 * The connection timeout, in seconds.
 * </p>
 * <p>
 * If you need to set a timeout for reading/writing data over the
 * socket, use stream_set_timeout, as the
 * timeout parameter to
 * fsockopen only applies while connecting the
 * socket.
 * </p>
 * @return resource|false fsockopen returns a file pointer which may be used
 * together with the other file functions (such as
 * fgets, fgetss,
 * fwrite, fclose, and
 * feof). If the call fails, it will return false
 */
function fsockopen(
    string $hostname,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.0')] int $port,
    #[PhpStormStubsElementAvailable(from: '7.1')] int $port = -1,
    &$error_code,
    &$error_message,
    ?float $timeout
) {}

/**
 * Open persistent Internet or Unix domain socket connection
 * @link https://php.net/manual/en/function.pfsockopen.php
 * @see fsockopen
 * @param string $hostname
 * @param int $port
 * @param int &$error_code [optional]
 * @param string &$error_message [optional]
 * @param float|null $timeout [optional]
 * @return resource|false
 */
function pfsockopen(
    string $hostname,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.0')] int $port,
    #[PhpStormStubsElementAvailable(from: '7.1')] int $port = -1,
    &$error_code,
    &$error_message,
    ?float $timeout
) {}

/**
 * Pack data into binary string
 * @link https://php.net/manual/en/function.pack.php
 * @param string $format <p>
 * The format string consists of format codes
 * followed by an optional repeater argument. The repeater argument can
 * be either an integer value or * for repeating to
 * the end of the input data. For a, A, h, H the repeat count specifies
 * how many characters of one data argument are taken, for @ it is the
 * absolute position where to put the next data, for everything else the
 * repeat count specifies how many data arguments are consumed and packed
 * into the resulting binary string.
 * </p>
 * <p>
 * Currently implemented formats are:
 * <table>
 * pack format characters
 * <tr valign="top">
 * <td>Code</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>a</td>
 * <td>NUL-padded string</td>
 * </tr>
 * <tr valign="top">
 * <td>A</td>
 * <td>SPACE-padded string</td></tr>
 * <tr valign="top">
 * <td>h</td>
 * <td>Hex string, low nibble first</td></tr>
 * <tr valign="top">
 * <td>H</td>
 * <td>Hex string, high nibble first</td></tr>
 * <tr valign="top"><td>c</td><td>signed char</td></tr>
 * <tr valign="top">
 * <td>C</td>
 * <td>unsigned char</td></tr>
 * <tr valign="top">
 * <td>s</td>
 * <td>signed short (always 16 bit, machine byte order)</td>
 * </tr>
 * <tr valign="top">
 * <td>S</td>
 * <td>unsigned short (always 16 bit, machine byte order)</td>
 * </tr>
 * <tr valign="top">
 * <td>n</td>
 * <td>unsigned short (always 16 bit, big endian byte order)</td>
 * </tr>
 * <tr valign="top">
 * <td>v</td>
 * <td>unsigned short (always 16 bit, little endian byte order)</td>
 * </tr>
 * <tr valign="top">
 * <td>i</td>
 * <td>signed integer (machine dependent size and byte order)</td>
 * </tr>
 * <tr valign="top">
 * <td>I</td>
 * <td>unsigned integer (machine dependent size and byte order)</td>
 * </tr>
 * <tr valign="top">
 * <td>l</td>
 * <td>signed long (always 32 bit, machine byte order)</td>
 * </tr>
 * <tr valign="top">
 * <td>L</td>
 * <td>unsigned long (always 32 bit, machine byte order)</td>
 * </tr>
 * <tr valign="top">
 * <td>N</td>
 * <td>unsigned long (always 32 bit, big endian byte order)</td>
 * </tr>
 * <tr valign="top">
 * <td>V</td>
 * <td>unsigned long (always 32 bit, little endian byte order)</td>
 * </tr>
 * <tr valign="top">
 * <td>f</td>
 * <td>float (machine dependent size and representation, both little and big endian)</td>
 * </tr>
 * <tr valign="top">
 * <td>d</td>
 * <td>double (machine dependent size and representation, both little and big endian)</td>
 * </tr>
 * <tr valign="top">
 * <td>x</td>
 * <td>NUL byte</td>
 * </tr>
 * <tr valign="top">
 * <td>X</td>
 * <td>Back up one byte</td>
 * </tr>
 * <tr valign="top">
 * <td>@</td>
 * <td>NUL-fill to absolute position</td>
 * </tr>
 * </table>
 * </p>
 * @param mixed ...$values <p>
 * </p>
 * @return string|false a binary string containing data or false if the format string contains errors
 */
#[Pure]
#[LanguageLevelTypeAware(["8.0" => "string"], default: "string|false")]
function pack(
    string $format,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.3')] $values,
    mixed ...$values
) {}

/**
 * Unpack data from binary string
 * @link https://php.net/manual/en/function.unpack.php
 * @param string $format <p>
 * See pack for an explanation of the format codes.
 * </p>
 * @param string $string <p>
 * The packed data.
 * </p>
 * @param int $offset [optional]
 * @return array|false an associative array containing unpacked elements of binary
 * string or false if the format string contains errors
 */
#[Pure]
function unpack(
    string $format,
    string $string,
    #[PhpStormStubsElementAvailable(from: '7.1')] int $offset = 0
): array|false {}

/**
 * Tells what the user's browser is capable of
 * @link https://php.net/manual/en/function.get-browser.php
 * @param string|null $user_agent [optional] <p>
 * The User Agent to be analyzed. By default, the value of HTTP
 * User-Agent header is used; however, you can alter this (i.e., look up
 * another browser's info) by passing this parameter.
 * </p>
 * <p>
 * You can bypass this parameter with a null value.
 * </p>
 * @param bool $return_array [optional] <p>
 * If set to true, this function will return an array
 * instead of an object.
 * </p>
 * @return array|object|false Returns false if browscap.ini can't be loaded or the user agent can't be found, otherwise the information is returned in an object or an array which will contain
 * various data elements representing, for instance, the browser's major and
 * minor version numbers and ID string; true/false values for features
 * such as frames, JavaScript, and cookies; and so forth.
 * </p>
 * <p>
 * The cookies value simply means that the browser
 * itself is capable of accepting cookies and does not mean the user has
 * enabled the browser to accept cookies or not. The only way to test if
 * cookies are accepted is to set one with setcookie,
 * reload, and check for the value.
 */
#[Pure(true)]
function get_browser(?string $user_agent, bool $return_array = false): object|array|false {}

/**
 * One-way string encryption (hashing)
 * @link https://php.net/manual/en/function.crypt.php
 * @param string $string <p>
 * The string to be encrypted.
 * </p>
 * @param string $salt <p>
 * An optional salt string to base the encryption on. If not provided,
 * one will be randomly generated by PHP each time you call this function.
 * PHP 5.6 or later raise E_NOTICE error if this parameter is omitted
 * </p>
 * <p>
 * If you are using the supplied salt, you should be aware that the salt
 * is generated once. If you are calling this function repeatedly, this
 * may impact both appearance and security.
 * </p>
 * @return string|null the encrypted string or <b>NULL</b> if an error occurs
 */
#[Pure]
#[PhpStormStubsElementAvailable(to: '7.4')]
function crypt($string, $salt): ?string {}

/**
 * One-way string encryption (hashing)
 * @link https://php.net/manual/en/function.crypt.php
 * @param string $string <p>
 * The string to be encrypted.
 * </p>
 * @param string $salt <p>
 * An optional salt string to base the encryption on. If not provided,
 * one will be randomly generated by PHP each time you call this function.
 * PHP 5.6 or later raise E_NOTICE error if this parameter is omitted
 * </p>
 * <p>
 * If you are using the supplied salt, you should be aware that the salt
 * is generated once. If you are calling this function repeatedly, this
 * may impact both appearance and security.
 * </p>
 * @return string the encrypted string or <b>NULL</b> if an error occurs
 */
#[Pure]
#[PhpStormStubsElementAvailable('8.0')]
function crypt(string $string, string $salt): string {}

/**
 * Open directory handle
 * @link https://php.net/manual/en/function.opendir.php
 * @param string $directory <p>
 * The directory path that is to be opened
 * </p>
 * @param resource $context [optional] <p>
 * For a description of the context parameter,
 * refer to the streams section of
 * the manual.
 * </p>
 * @return resource|false a directory handle resource on success, or
 * false on failure.
 * </p>
 * <p>
 * If path is not a valid directory or the
 * directory can not be opened due to permission restrictions or
 * filesystem errors, opendir returns false and
 * generates a PHP error of level
 * E_WARNING. You can suppress the error output of
 * opendir by prepending
 * '@' to the
 * front of the function name.
 */
function opendir(string $directory, $context) {}

/**
 * Close directory handle
 * @link https://php.net/manual/en/function.closedir.php
 * @param resource $dir_handle [optional] <p>
 * The directory handle resource previously opened
 * with opendir. If the directory handle is
 * not specified, the last link opened by opendir
 * is assumed.
 * </p>
 * @return void
 */
function closedir($dir_handle): void {}

/**
 * Change directory
 * @link https://php.net/manual/en/function.chdir.php
 * @param string $directory <p>
 * The new current directory
 * </p>
 * @return bool true on success or false on failure.
 */
function chdir(string $directory): bool {}

/**
 * Change the root directory
 * @link https://php.net/manual/en/function.chroot.php
 * @param string $directory <p>
 * The new directory
 * </p>
 * @return bool true on success or false on failure.
 */
function chroot(string $directory): bool {}

/**
 * Gets the current working directory
 * @link https://php.net/manual/en/function.getcwd.php
 * @return string|false <p>
 * the current working directory on success, or false on
 * failure. <br>
 * <br>
 * On some Unix variants, getcwd will return
 * false if any one of the parent directories does not have the
 * readable or search mode set, even if the current directory
 * does. See chmod for more information on
 * modes and permissions.
 * </p>
 */
#[Pure(true)]
function getcwd(): string|false {}

/**
 * Rewind directory handle
 * @link https://php.net/manual/en/function.rewinddir.php
 * @param resource $dir_handle [optional] <p>
 * The directory handle resource previously opened
 * with opendir. If the directory handle is
 * not specified, the last link opened by opendir
 * is assumed.
 * </p>
 * @see https://bugs.php.net/bug.php?id=75485
 */
function rewinddir($dir_handle): void {}

/**
 * Read entry from directory handle
 * @link https://php.net/manual/en/function.readdir.php
 * @param resource $dir_handle [optional] <p>
 * The directory handle resource previously opened
 * with opendir. If the directory handle is
 * not specified, the last link opened by opendir
 * is assumed.
 * </p>
 * @return string|false the filename on success or false on failure.
 */
function readdir($dir_handle): string|false {}

/**
 * Return an instance of the Directory class
 * @link https://php.net/manual/en/function.dir.php
 * @param string $directory <p>
 * Directory to open
 * </p>
 * @param resource $context [optional]
 * @return Directory|false an instance of Directory, or <b>NULL</b> with wrong
 * parameters, or <b>FALSE</b> in case of another error
 */
function dir(string $directory, $context): Directory|false {}

/**
 * Alias of dir()
 * @param string $directory
 * @param resource $context
 * @since 8.0
 * @return Directory|false
 * @see dir()
 */
function getdir(string $directory, $context = null): Directory|false {}

/**
 * List files and directories inside the specified path
 * @link https://php.net/manual/en/function.scandir.php
 * @param string $directory <p>
 * The directory that will be scanned.
 * </p>
 * @param int $sorting_order <p>
 * By default, the sorted order is alphabetical in ascending order. If
 * the optional sorting_order is set to non-zero,
 * then the sort order is alphabetical in descending order.
 * </p>
 * @param resource $context [optional] <p>
 * For a description of the context parameter,
 * refer to the streams section of
 * the manual.
 * </p>
 * @return array|false an array of filenames on success, or false on
 * failure. If directory is not a directory, then
 * boolean false is returned, and an error of level
 * E_WARNING is generated.
 */
function scandir(string $directory, int $sorting_order = 0, $context): array|false {}

/**
 * Find pathnames matching a pattern
 * @link https://php.net/manual/en/function.glob.php
 * @param string $pattern <p>
 * The pattern. No tilde expansion or parameter substitution is done.
 * </p>
 * @param int $flags <p>
 * Valid flags:
 * GLOB_MARK - Adds a slash to each directory returned
 * GLOB_NOSORT - Return files as they appear in the directory (no sorting). When this flag is not used, the pathnames are sorted alphabetically
 * GLOB_NOCHECK - Return the search pattern if no files matching it were found
 * GLOB_NOESCAPE - Backslashes do not quote metacharacters
 * GLOB_BRACE - Expands {a,b,c} to match 'a', 'b', or 'c'
 * GLOB_ONLYDIR - Return only directory entries which match the pattern
 * GLOB_ERR - Stop on read errors (like unreadable directories), by default errors are ignored.
 * @return array|false an array containing the matched files/directories, an empty array
 * if no file matched or false on error.
 * </p>
 * <p>
 * On some systems it is impossible to distinguish between empty match and an
 * error.</p>
 */
#[Pure(true)]
function glob(string $pattern, int $flags = 0): array|false {}

/**
 * Gets last access time of file
 * @link https://php.net/manual/en/function.fileatime.php
 * @param string $filename <p>
 * Path to the file.
 * </p>
 * @return int|false the time the file was last accessed, or false on failure.
 * The time is returned as a Unix timestamp.
 */
#[Pure(true)]
function fileatime(string $filename): int|false {}

/**
 * Gets inode change time of file
 * @link https://php.net/manual/en/function.filectime.php
 * @param string $filename <p>
 * Path to the file.
 * </p>
 * @return int|false the time the file was last changed, or false on failure.
 * The time is returned as a Unix timestamp.
 */
#[Pure(true)]
function filectime(string $filename): int|false {}

/**
 * Gets file group
 * @link https://php.net/manual/en/function.filegroup.php
 * @param string $filename <p>
 * Path to the file.
 * </p>
 * @return int|false the group ID of the file, or false in case
 * of an error. The group ID is returned in numerical format, use
 * posix_getgrgid to resolve it to a group name.
 * Upon failure, false is returned.
 */
#[Pure(true)]
function filegroup(string $filename): int|false {}

/**
 * Gets file inode
 * @link https://php.net/manual/en/function.fileinode.php
 * @param string $filename <p>
 * Path to the file.
 * </p>
 * @return int|false the inode number of the file, or false on failure.
 */
#[Pure(true)]
function fileinode(string $filename): int|false {}

/**
 * Gets file modification time
 * @link https://php.net/manual/en/function.filemtime.php
 * @param string $filename <p>
 * Path to the file.
 * </p>
 * @return int|false the time the file was last modified, or false on failure.
 * The time is returned as a Unix timestamp, which is
 * suitable for the date function.
 */
#[Pure(true)]
function filemtime(string $filename): int|false {}

/**
 * Gets file owner
 * @link https://php.net/manual/en/function.fileowner.php
 * @param string $filename <p>
 * Path to the file.
 * </p>
 * @return int|false the user ID of the owner of the file, or false on failure.
 * The user ID is returned in numerical format, use
 * posix_getpwuid to resolve it to a username.
 */
#[Pure(true)]
function fileowner(string $filename): int|false {}

/**
 * Gets file permissions
 * @link https://php.net/manual/en/function.fileperms.php
 * @param string $filename <p>
 * Path to the file.
 * </p>
 * @return int|false the permissions on the file, or false on failure.
 */
#[Pure(true)]
function fileperms(string $filename): int|false {}

/**
 * Gets file size
 * @link https://php.net/manual/en/function.filesize.php
 * @param string $filename <p>
 * Path to the file.
 * </p>
 * @return int|false the size of the file in bytes, or false (and generates an error
 * of level E_WARNING) in case of an error.
 */
#[Pure(true)]
function filesize(string $filename): int|false {}

/**
 * Gets file type
 * @link https://php.net/manual/en/function.filetype.php
 * @param string $filename <p>
 * Path to the file.
 * </p>
 * @return string|false the type of the file. Possible values are fifo, char,
 * dir, block, link, file, socket and unknown.
 * </p>
 * <p>
 * Returns false if an error occurs. filetype will also
 * produce an E_NOTICE message if the stat call fails
 * or if the file type is unknown.
 */
#[Pure(true)]
function filetype(string $filename): string|false {}

/**
 * Checks whether a file or directory exists
 * @link https://php.net/manual/en/function.file-exists.php
 * @param string $filename <p>
 * Path to the file or directory.
 * </p>
 * <p>
 * On windows, use //computername/share/filename or
 * \\computername\share\filename to check files on
 * network shares.
 * </p>
 * @return bool true if the file or directory specified by
 * filename exists; false otherwise.
 * </p>
 * <p>
 * This function will return false for symlinks pointing to non-existing
 * files.
 * </p>
 * <p>
 * This function returns false for files inaccessible due to safe mode restrictions. However these
 * files still can be included if
 * they are located in safe_mode_include_dir.
 * </p>
 * <p>
 * The check is done using the real UID/GID instead of the effective one.
 */
#[Pure(true)]
function file_exists(string $filename): bool {}

/**
 * Tells whether the filename is writable
 * @link https://php.net/manual/en/function.is-writable.php
 * @param string $filename <p>
 * The filename being checked.
 * </p>
 * @return bool true if the filename exists and is
 * writable.
 */
#[Pure(true)]
function is_writable(string $filename): bool {}

/**
 * Alias:
 * {@see is_writable}
 * @link https://php.net/manual/en/function.is-writeable.php
 * @param string $filename <p>
 * The filename being checked.
 * </p>
 * @return bool true if the filename exists and is
 * writable.
 */
#[Pure(true)]
function is_writeable(string $filename): bool {}

/**
 * Tells whether a file or a directory exists and is readable
 * @link https://php.net/manual/en/function.is-readable.php
 * @param string $filename <p>
 * Path to the file or directory.
 * </p>
 * @return bool true if the file or directory specified by
 * filename exists and is readable, false otherwise.
 */
#[Pure(true)]
function is_readable(string $filename): bool {}

/**
 * Tells whether the filename is executable
 * @link https://php.net/manual/en/function.is-executable.php
 * @param string $filename <p>
 * Path to the file.
 * </p>
 * @return bool true if the filename exists and is executable, or false on
 * error.
 */
#[Pure(true)]
function is_executable(string $filename): bool {}

/**
 * Tells whether the filename is a regular file
 * @link https://php.net/manual/en/function.is-file.php
 * @param string $filename <p>
 * Path to the file.
 * </p>
 * @return bool true if the filename exists and is a regular file, false
 * otherwise.
 */
#[Pure(true)]
function is_file(string $filename): bool {}

/**
 * Tells whether the filename is a directory
 * @link https://php.net/manual/en/function.is-dir.php
 * @param string $filename <p>
 * Path to the file. If filename is a relative
 * filename, it will be checked relative to the current working
 * directory. If filename is a symbolic or hard link
 * then the link will be resolved and checked.
 * </p>
 * @return bool true if the filename exists and is a directory, false
 * otherwise.
 */
#[Pure(true)]
function is_dir(string $filename): bool {}

/**
 * Tells whether the filename is a symbolic link
 * @link https://php.net/manual/en/function.is-link.php
 * @param string $filename <p>
 * Path to the file.
 * </p>
 * @return bool true if the filename exists and is a symbolic link, false
 * otherwise.
 */
#[Pure(true)]
function is_link(string $filename): bool {}

/**
 * Gives information about a file
 * @link https://php.net/manual/en/function.stat.php
 * @param string $filename <p>
 * Path to the file.
 * </p>
 * @return array|false <table>
 * stat and fstat result
 * format
 * <tr valign="top">
 * <td>Numeric</td>
 * <td>Associative (since PHP 4.0.6)</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>0</td>
 * <td>dev</td>
 * <td>device number</td>
 * </tr>
 * <tr valign="top">
 * <td>1</td>
 * <td>ino</td>
 * <td>inode number *</td>
 * </tr>
 * <tr valign="top">
 * <td>2</td>
 * <td>mode</td>
 * <td>inode protection mode</td>
 * </tr>
 * <tr valign="top">
 * <td>3</td>
 * <td>nlink</td>
 * <td>number of links</td>
 * </tr>
 * <tr valign="top">
 * <td>4</td>
 * <td>uid</td>
 * <td>userid of owner *</td>
 * </tr>
 * <tr valign="top">
 * <td>5</td>
 * <td>gid</td>
 * <td>groupid of owner *</td>
 * </tr>
 * <tr valign="top">
 * <td>6</td>
 * <td>rdev</td>
 * <td>device type, if inode device</td>
 * </tr>
 * <tr valign="top">
 * <td>7</td>
 * <td>size</td>
 * <td>size in bytes</td>
 * </tr>
 * <tr valign="top">
 * <td>8</td>
 * <td>atime</td>
 * <td>time of last access (Unix timestamp)</td>
 * </tr>
 * <tr valign="top">
 * <td>9</td>
 * <td>mtime</td>
 * <td>time of last modification (Unix timestamp)</td>
 * </tr>
 * <tr valign="top">
 * <td>10</td>
 * <td>ctime</td>
 * <td>time of last inode change (Unix timestamp)</td>
 * </tr>
 * <tr valign="top">
 * <td>11</td>
 * <td>blksize</td>
 * <td>blocksize of filesystem IO **</td>
 * </tr>
 * <tr valign="top">
 * <td>12</td>
 * <td>blocks</td>
 * <td>number of 512-byte blocks allocated **</td>
 * </tr>
 * </table>
 * * On Windows this will always be 0.
 * </p>
 * <p>
 * ** Only valid on systems supporting the st_blksize type - other
 * systems (e.g. Windows) return -1.
 * </p>
 * <p>
 * In case of error, stat returns false.
 */
#[Pure(true)]
#[ArrayShape([
    "dev" => "int",
    "ino" => "int",
    "mode" => "int",
    "nlink" => "int",
    "uid" => "int",
    "gid" => "int",
    "rdev" => "int",
    "size" => "int",
    "atime" => "int",
    "mtime" => "int",
    "ctime" => "int",
    "blksize" => "int",
    "blocks" => "int"
])]
function stat(string $filename): array|false {}

/**
 * Gives information about a file or symbolic link
 * @link https://php.net/manual/en/function.lstat.php
 * @see stat
 * @param string $filename <p>
 * Path to a file or a symbolic link.
 * </p>
 * @return array|false See the manual page for stat for information on
 * the structure of the array that lstat returns.
 * This function is identical to the stat function
 * except that if the filename parameter is a symbolic
 * link, the status of the symbolic link is returned, not the status of the
 * file pointed to by the symbolic link.
 */
#[Pure(true)]
function lstat(string $filename): array|false {}

/**
 * Changes file owner
 * @link https://php.net/manual/en/function.chown.php
 * @param string $filename <p>
 * Path to the file.
 * </p>
 * @param string|int $user <p>
 * A user name or number.
 * </p>
 * @return bool true on success or false on failure.
 */
function chown(string $filename, string|int $user): bool {}

/**
 * Changes file group
 * @link https://php.net/manual/en/function.chgrp.php
 * @param string $filename <p>
 * Path to the file.
 * </p>
 * @param string|int $group <p>
 * A group name or number.
 * </p>
 * @return bool true on success or false on failure.
 */
function chgrp(string $filename, string|int $group): bool {}

/**
 * Changes user ownership of symlink
 * @link https://php.net/manual/en/function.lchown.php
 * @param string $filename <p>
 * Path to the file.
 * </p>
 * @param string|int $user <p>
 * User name or number.
 * </p>
 * @return bool true on success or false on failure.
 * @since 5.1.2
 */
function lchown(string $filename, string|int $user): bool {}

/**
 * Changes group ownership of symlink
 * @link https://php.net/manual/en/function.lchgrp.php
 * @param string $filename <p>
 * Path to the symlink.
 * </p>
 * @param string|int $group <p>
 * The group specified by name or number.
 * </p>
 * @return bool true on success or false on failure.
 * @since 5.1.2
 */
function lchgrp(string $filename, string|int $group): bool {}

/**
 * Changes file mode
 * @link https://php.net/manual/en/function.chmod.php
 * @param string $filename <p>
 * Path to the file.
 * </p>
 * @param int $permissions <p>
 * Note that mode is not automatically
 * assumed to be an octal value, so strings (such as "g+w") will
 * not work properly. To ensure the expected operation,
 * you need to prefix mode with a zero (0):
 * </p>
 * <pre>
 * <?php
 * chmod("/somedir/somefile", 755);   // decimal; probably incorrect
 * chmod("/somedir/somefile", "u+rwx,go+rx"); // string; incorrect
 * chmod("/somedir/somefile", 0755);  // octal; correct value of mode
 * ?>
 * </pre>
 * <p>
 * The mode parameter consists of three octal
 * number components specifying access restrictions for the owner,
 * the user group in which the owner is in, and to everybody else in
 * this order. One component can be computed by adding up the needed
 * permissions for that target user base. Number 1 means that you
 * grant execute rights, number 2 means that you make the file
 * writeable, number 4 means that you make the file readable. Add
 * up these numbers to specify needed rights. You can also read more
 * about modes on Unix systems with 'man 1 chmod'
 * and 'man 2 chmod'.
 * </p>
 * @return bool true on success or false on failure.
 */
function chmod(string $filename, int $permissions): bool {}

/**
 * Sets access and modification time of file
 * @link https://php.net/manual/en/function.touch.php
 * @param string $filename <p>
 * The name of the file being touched.
 * </p>
 * @param int|null $mtime [optional] <p>
 * The touch time. If time is not supplied,
 * the current system time is used.
 * </p>
 * @param int|null $atime [optional] <p>
 * If present, the access time of the given filename is set to
 * the value of atime. Otherwise, it is set to
 * time.
 * </p>
 * @return bool true on success or false on failure.
 */
function touch(string $filename, ?int $mtime, ?int $atime): bool {}

/**
 * Clears file status cache
 * @link https://php.net/manual/en/function.clearstatcache.php
 * @param bool $clear_realpath_cache [optional] <p>
 * Whenever to clear realpath cache or not.
 * </p>
 * @param string $filename <p>
 * Clear realpath cache on a specific filename, only used if
 * clear_realpath_cache is true.
 * </p>
 * @return void
 */
function clearstatcache(bool $clear_realpath_cache = false, string $filename = ''): void {}

/**
 * Returns the total size of a filesystem or disk partition
 * @link https://php.net/manual/en/function.disk-total-space.php
 * @param string $directory <p>
 * A directory of the filesystem or disk partition.
 * </p>
 * @return float|false the total number of bytes as a float
 * or false on failure.
 */
#[Pure(true)]
function disk_total_space(string $directory): float|false {}

/**
 * Returns available space in directory
 * @link https://php.net/manual/en/function.disk-free-space.php
 * @param string $directory <p>
 * A directory of the filesystem or disk partition.
 * </p>
 * <p>
 * Given a file name instead of a directory, the behaviour of the
 * function is unspecified and may differ between operating systems and
 * PHP versions.
 * </p>
 * @return float|false the number of available bytes as a float
 * or false on failure.
 */
#[Pure(true)]
function disk_free_space(string $directory): float|false {}

/**
 * Alias of {@see disk_free_space}
 * @link https://php.net/manual/en/function.diskfreespace.php
 * @see disk_free_space
 * @param string $directory
 * @return float|false
 */
#[Pure(true)]
function diskfreespace(string $directory): float|false {}

/**
 * Send mail
 * @link https://php.net/manual/en/function.mail.php
 * @param string $to <p>
 * Receiver, or receivers of the mail.
 * </p>
 * <p>
 * The formatting of this string must comply with
 * RFC 2822. Some examples are:
 * user@example.com
 * user@example.com, anotheruser@example.com
 * User &lt;user@example.com&gt;
 * User &lt;user@example.com&gt;, Another User &lt;anotheruser@example.com&gt;
 * </p>
 * @param string $subject <p>
 * Subject of the email to be sent.
 * </p>
 * <p>
 * Subject must satisfy RFC 2047.
 * </p>
 * @param string $message <p>
 * Message to be sent.
 * </p>
 * <p>
 * Each line should be separated with a LF (\n). Lines should not be larger
 * than 70 characters.
 * </p>
 * <p>
 * <strong>Caution</strong>
 * (Windows only) When PHP is talking to a SMTP server directly, if a full
 * stop is found on the start of a line, it is removed. To counter-act this,
 * replace these occurrences with a double dot.
 * </p>
 * <pre>
 * <?php
 * $text = str_replace("\n.", "\n..", $text);
 * ?>
 * </pre>
 * @param string|array $additional_headers <p>
 * String or array to be inserted at the end of the email header.<br/>
 * Since 7.2.0 accepts an array. Its keys are the header names and its values are the respective header values.
 * </p>
 * <p>
 * This is typically used to add extra headers (From, Cc, and Bcc).
 * Multiple extra headers should be separated with a CRLF (\r\n).
 * </p>
 * <p>
 * When sending mail, the mail must contain
 * a From header. This can be set with the
 * additional_headers parameter, or a default
 * can be set in "php.ini".
 * </p>
 * <p>
 * Failing to do this will result in an error
 * message similar to Warning: mail(): "sendmail_from" not
 * set in php.ini or custom "From:" header missing.
 * The From header sets also
 * Return-Path under Windows.
 * </p>
 * <p>
 * If messages are not received, try using a LF (\n) only.
 * Some poor quality Unix mail transfer agents replace LF by CRLF
 * automatically (which leads to doubling CR if CRLF is used).
 * This should be a last resort, as it does not comply with
 * RFC 2822.
 * </p>
 * @param string $additional_params <p>
 * The additional_parameters parameter
 * can be used to pass additional flags as command line options to the
 * program configured to be used when sending mail, as defined by the
 * sendmail_path configuration setting. For example,
 * this can be used to set the envelope sender address when using
 * sendmail with the -f sendmail option.
 * </p>
 * <p>
 * The user that the webserver runs as should be added as a trusted user to the
 * sendmail configuration to prevent a 'X-Warning' header from being added
 * to the message when the envelope sender (-f) is set using this method.
 * For sendmail users, this file is /etc/mail/trusted-users.
 * </p>
 * @return bool true if the mail was successfully accepted for delivery, false otherwise.
 * <p>
 * It is important to note that just because the mail was accepted for delivery,
 * it does NOT mean the mail will actually reach the intended destination.
 * </p>
 */
function mail(string $to, string $subject, string $message, array|string $additional_headers = [], string $additional_params = ''): bool {}

/**
 * Calculate the hash value needed by EZMLM
 * @link https://php.net/manual/en/function.ezmlm-hash.php
 * @param string $addr <p>
 * The email address that's being hashed.
 * </p>
 * @return int The hash value of addr.
 * @removed 8.0
 */
#[Deprecated(since: '7.4')]
function ezmlm_hash(string $addr): int {}

/**
 * Open connection to system logger
 * @link https://php.net/manual/en/function.openlog.php
 * @param string $prefix <p>
 * The string ident is added to each message.
 * </p>
 * @param int $flags <p>
 * The option argument is used to indicate
 * what logging options will be used when generating a log message.
 * <table>
 * openlog Options
 * <tr valign="top">
 * <td>Constant</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>LOG_CONS</td>
 * <td>
 * if there is an error while sending data to the system logger,
 * write directly to the system console
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>LOG_NDELAY</td>
 * <td>
 * open the connection to the logger immediately
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>LOG_ODELAY</td>
 * <td>
 * (default) delay opening the connection until the first
 * message is logged
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>LOG_PERROR</td>
 * <td>print log message also to standard error</td>
 * </tr>
 * <tr valign="top">
 * <td>LOG_PID</td>
 * <td>include PID with each message</td>
 * </tr>
 * </table>
 * You can use one or more of this options. When using multiple options
 * you need to OR them, i.e. to open the connection
 * immediately, write to the console and include the PID in each message,
 * you will use: LOG_CONS | LOG_NDELAY | LOG_PID
 * </p>
 * @param int $facility <p>
 * The facility argument is used to specify what
 * type of program is logging the message. This allows you to specify
 * (in your machine's syslog configuration) how messages coming from
 * different facilities will be handled.
 * <table>
 * openlog Facilities
 * <tr valign="top">
 * <td>Constant</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>LOG_AUTH</td>
 * <td>
 * security/authorization messages (use
 * LOG_AUTHPRIV instead
 * in systems where that constant is defined)
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>LOG_AUTHPRIV</td>
 * <td>security/authorization messages (private)</td>
 * </tr>
 * <tr valign="top">
 * <td>LOG_CRON</td>
 * <td>clock daemon (cron and at)</td>
 * </tr>
 * <tr valign="top">
 * <td>LOG_DAEMON</td>
 * <td>other system daemons</td>
 * </tr>
 * <tr valign="top">
 * <td>LOG_KERN</td>
 * <td>kernel messages</td>
 * </tr>
 * <tr valign="top">
 * <td>LOG_LOCAL0 ... LOG_LOCAL7</td>
 * <td>reserved for local use, these are not available in Windows</td>
 * </tr>
 * <tr valign="top">
 * <td>LOG_LPR</td>
 * <td>line printer subsystem</td>
 * </tr>
 * <tr valign="top">
 * <td>LOG_MAIL</td>
 * <td>mail subsystem</td>
 * </tr>
 * <tr valign="top">
 * <td>LOG_NEWS</td>
 * <td>USENET news subsystem</td>
 * </tr>
 * <tr valign="top">
 * <td>LOG_SYSLOG</td>
 * <td>messages generated internally by syslogd</td>
 * </tr>
 * <tr valign="top">
 * <td>LOG_USER</td>
 * <td>generic user-level messages</td>
 * </tr>
 * <tr valign="top">
 * <td>LOG_UUCP</td>
 * <td>UUCP subsystem</td>
 * </tr>
 * </table>
 * </p>
 * <p>
 * LOG_USER is the only valid log type under Windows
 * operating systems
 * </p>
 * @return bool true on success or false on failure.
 */
#[LanguageLevelTypeAware(["8.2" => "true"], default: "bool")]
function openlog(string $prefix, int $flags, int $facility) {}
<?php

use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Pure;

/**
 * Get the last occurred error
 * @link https://php.net/manual/en/function.error-get-last.php
 * @return array|null an associative array describing the last error with keys "type",
 * "message", "file" and "line". Returns null if there hasn't been an error
 * yet.
 */
#[ArrayShape(["type" => "int", "message" => "string", "file" => "string", "line" => "int"])]
#[Pure(true)]
function error_get_last(): ?array {}

/**
 * Call the callback given by the first parameter
 * @link https://php.net/manual/en/function.call-user-func.php
 * @param callable $callback <p>
 * The function to be called. Class methods may also be invoked
 * statically using this function by passing
 * array($classname, $methodname) to this parameter.
 * Additionally class methods of an object instance may be called by passing
 * array($objectinstance, $methodname) to this parameter.
 * </p>
 * @param mixed ...$args [optional] <p>
 * Zero or more parameters to be passed to the function.
 * </p>
 * <p>
 * Note that the parameters for call_user_func are
 * not passed by reference.
 * call_user_func example and references
 * </p>
 * @return mixed the function result, or false on error.
 */
function call_user_func(callable $callback, mixed ...$args): mixed {}

/**
 * Call a callback with an array of parameters
 * @link https://php.net/manual/en/function.call-user-func-array.php
 * @param callable $callback <p>
 * The function to be called.
 * </p>
 * @param array $args <p>
 * The parameters to be passed to the function, as an indexed array.
 * </p>
 * @return mixed the function result, or false on error.
 */
function call_user_func_array(callable $callback, array $args): mixed {}

/**
 * Call a user method on an specific object
 * @link https://php.net/manual/en/function.call-user-method.php
 * @param string $method_name
 * @param object &$obj
 * @param mixed ...$parameter [optional]
 * @return mixed
 * @removed 7.0
 * @see call_user_func()
 */
#[Deprecated(reason: "use call_user_func() instead", since: "5.3")]
function call_user_method(string $method_name, object &$obj, ...$parameter): mixed {}

/**
 * Call a user method given with an array of parameters
 * @link https://php.net/manual/en/function.call-user-method-array.php
 * @param string $method_name
 * @param object &$obj
 * @param array $params
 * @return mixed
 * @removed 7.0
 * @see call_user_func()
 */
#[Deprecated(reason: "use call_user_func() instead", since: "5.3")]
function call_user_method_array(string $method_name, object &$obj, array $params): mixed {}

/**
 * Call a static method
 * @link https://php.net/manual/en/function.forward-static-call.php
 * @param callable $callback <p>
 * The function or method to be called. This parameter may be an array,
 * with the name of the class, and the method, or a string, with a function
 * name.
 * </p>
 * @param mixed ...$args [optional] <p>
 * Zero or more parameters to be passed to the function.
 * </p>
 * @return mixed the function result, or false on error.
 */
function forward_static_call(callable $callback, mixed ...$args): mixed {}

/**
 * Call a static method and pass the arguments as array
 * @link https://php.net/manual/en/function.forward-static-call-array.php
 * @param callable $callback <p>
 * The function or method to be called. This parameter may be an array,
 * with the name of the class, and the method, or a string, with a function
 * name.
 * </p>
 * @param array $args
 * @return mixed the function result, or false on error.
 */
function forward_static_call_array(callable $callback, array $args): mixed {}

/**
 * Generates a storable representation of a value
 * @link https://php.net/manual/en/function.serialize.php
 * @param mixed $value <p>
 * The value to be serialized. serialize
 * handles all types, except the resource-type.
 * You can even serialize arrays that contain
 * references to itself. Circular references inside the array/object you
 * are serializing will also be stored. Any other
 * reference will be lost.
 * </p>
 * <p>
 * When serializing objects, PHP will attempt to call the member function
 * __sleep prior to serialization.
 * This is to allow the object to do any last minute clean-up, etc. prior
 * to being serialized. Likewise, when the object is restored using
 * unserialize the __wakeup member function is called.
 * </p>
 * <p>
 * Object's private members have the class name prepended to the member
 * name; protected members have a '*' prepended to the member name.
 * These prepended values have null bytes on either side.
 * </p>
 * @return string a string containing a byte-stream representation of
 * value that can be stored anywhere.
 */
function serialize(mixed $value): string {}

/**
 * Creates a PHP value from a stored representation
 * @link https://php.net/manual/en/function.unserialize.php
 * @param string $data <p>
 * The serialized string.
 * </p>
 * <p>
 * If the variable being unserialized is an object, after successfully
 * reconstructing the object PHP will automatically attempt to call the
 * __wakeup member function (if it exists).
 * </p>
 * <p>
 * unserialize_callback_func directive
 * </p>
 * <p>
 * It's possible to set a callback-function which will be called,
 * if an undefined class should be instantiated during unserializing.
 * (to prevent getting an incomplete object "__PHP_Incomplete_Class".)
 * Use your "php.ini", ini_set or ".htaccess"
 * to define 'unserialize_callback_func'. Everytime an undefined class
 * should be instantiated, it'll be called. To disable this feature just
 * empty this setting.
 * </p>
 * @param array $options [optional]
 * <p>Any options to be provided to unserialize(), as an associative array.</p>
 * <p>
 * The 'allowed_classes' option key may be set to a value that is
 * either an array of class names which should be accepted, FALSE to
 * accept no classes, or TRUE to accept all classes. If this option is defined
 * and unserialize() encounters an object of a class that isn't to be accepted,
 * then the object will be instantiated as __PHP_Incomplete_Class instead.
 * Omitting this option is the same as defining it as TRUE: PHP will attempt
 * to instantiate objects of any class.
 * </p>
 * @return mixed <p>The converted value is returned, and can be a boolean,
 * integer, float, string,
 * array or object.
 * </p>
 * <p>
 * In case the passed string is not unserializeable, false is returned and
 * E_NOTICE is issued.</p>
 */
function unserialize(string $data, #[PhpStormStubsElementAvailable(from: '7.0')] array $options = []): mixed {}

/**
 * Dumps information about a variable
 * @link https://php.net/manual/en/function.var-dump.php
 * @param mixed $value <p>
 * The variable you want to export.
 * </p>
 * @param mixed ...$values [optional]
 * @return void
 */
#[PhpStormStubsElementAvailable(from: '8.0')]
function var_dump(mixed $value, mixed ...$values): void {}

/**
 * Dumps information about a variable
 * @link https://php.net/manual/en/function.var-dump.php
 * @param mixed ...$vars <p>
 * The variable you want to export.
 * </p>
 * @return void
 */
#[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')]
function var_dump(...$vars): void {}

/**
 * Outputs or returns a parsable string representation of a variable
 * @link https://php.net/manual/en/function.var-export.php
 * @param mixed $value <p>
 * The variable you want to export.
 * </p>
 * @param bool $return [optional] <p>
 * If used and set to true, var_export will return
 * the variable representation instead of outputting it.
 * </p>
 * @return string|null the variable representation when the return
 * parameter is used and evaluates to true. Otherwise, this function will
 * return null.
 */
function var_export(mixed $value, bool $return = false): ?string {}

/**
 * Dumps a string representation of an internal zend value to output
 * @link https://php.net/manual/en/function.debug-zval-dump.php
 * @param mixed $value The variable being evaluated.
 * @param mixed ...$values <p>
 * The other variable being evaluated.
 * </p>
 * @return void
 */
function debug_zval_dump(
    #[PhpStormStubsElementAvailable(from: '8.0')] mixed $value,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $values,
    mixed ...$values
): void {}

/**
 * Prints human-readable information about a variable
 * @link https://php.net/manual/en/function.print-r.php
 * @param mixed $value <p>
 * The expression to be printed.
 * </p>
 * @param bool $return [optional] <p>
 * If you would like to capture the output of print_r,
 * use the return parameter. If this parameter is set
 * to true, print_r will return its output, instead of
 * printing it (which it does by default).
 * </p>
 * @return string|true If given a string, integer or float,
 * the value itself will be printed. If given an array, values
 * will be presented in a format that shows keys and elements. Similar
 * notation is used for objects.
 */
function print_r(mixed $value, bool $return = false): string|true {}

/**
 * Returns the amount of memory allocated to PHP
 * @link https://php.net/manual/en/function.memory-get-usage.php
 * @param bool $real_usage [optional] <p>
 * Set this to true to get the real size of memory allocated from
 * system. If not set or false only the memory used by
 * emalloc() is reported.
 * </p>
 * @return int the memory amount in bytes.
 */
#[Pure(true)]
function memory_get_usage(bool $real_usage = false): int {}

/**
 * Returns the peak of memory allocated by PHP
 * @link https://php.net/manual/en/function.memory-get-peak-usage.php
 * @param bool $real_usage [optional] <p>
 * Set this to true to get the real size of memory allocated from
 * system. If not set or false only the memory used by
 * emalloc() is reported.
 * </p>
 * @return int the memory peak in bytes.
 */
#[Pure(true)]
function memory_get_peak_usage(bool $real_usage = false): int {}

/**
 * @since 8.2
 */
function memory_reset_peak_usage(): void {}

/**
 * Register a function for execution on shutdown
 * @link https://php.net/manual/en/function.register-shutdown-function.php
 * @param callable $callback <p>
 * The shutdown function to register.
 * </p>
 * <p>
 * The shutdown functions are called as the part of the request so that
 * it's possible to send the output from them. There is currently no way
 * to process the data with output buffering functions in the shutdown
 * function.
 * </p>
 * <p>
 * Shutdown functions are called after closing all opened output buffers
 * thus, for example, its output will not be compressed if zlib.output_compression is
 * enabled.
 * </p>
 * @param mixed ...$args [optional] <p>
 * It is possible to pass parameters to the shutdown function by passing
 * additional parameters.
 * </p>
 * @return bool|null
 */
#[LanguageLevelTypeAware(['8.2' => 'void'], default: 'null|bool')]
function register_shutdown_function(callable $callback, mixed ...$args): ?bool {}

/**
 * Register a function for execution on each tick
 * @link https://php.net/manual/en/function.register-tick-function.php
 * @param callable $callback <p>
 * The function name as a string, or an array consisting of an object and
 * a method.
 * </p>
 * @param mixed ...$args [optional] <p>
 * </p>
 * @return bool true on success or false on failure.
 */
function register_tick_function(callable $callback, mixed ...$args): bool {}

/**
 * De-register a function for execution on each tick
 * @link https://php.net/manual/en/function.unregister-tick-function.php
 * @param callable $callback <p>
 * The function name as a string, or an array consisting of an object and
 * a method.
 * </p>
 * @return void
 */
function unregister_tick_function(callable $callback): void {}

/**
 * Syntax highlighting of a file
 * @link https://php.net/manual/en/function.highlight-file.php
 * @param string $filename <p>
 * Path to the PHP file to be highlighted.
 * </p>
 * @param bool $return [optional] <p>
 * Set this parameter to true to make this function return the
 * highlighted code.
 * </p>
 * @return string|bool If return is set to true, returns the highlighted
 * code as a string instead of printing it out. Otherwise, it will return
 * true on success, false on failure.
 */
function highlight_file(string $filename, bool $return = false): string|bool {}

/**
 * Alias:
 * {@see highlight_file}
 * @link https://php.net/manual/en/function.show-source.php
 * @param string $filename
 * @param bool $return [optional]
 * @return string|bool
 */
function show_source(string $filename, bool $return = false): string|bool {}

/**
 * Syntax highlighting of a string
 * @link https://php.net/manual/en/function.highlight-string.php
 * @param string $string <p>
 * The PHP code to be highlighted. This should include the opening tag.
 * </p>
 * @param bool $return [optional] <p>
 * Set this parameter to true to make this function return the
 * highlighted code.
 * </p>
 * @return string|bool If return is set to true, returns the highlighted
 * code as a string instead of printing it out. Otherwise, it will return
 * true on success, false on failure.
 */
function highlight_string(string $string, bool $return = false): string|bool {}

/**
 * Get the system's high resolution time
 * @link https://secure.php.net/manual/en/function.hrtime.php
 * @param bool $as_number <p>Whether the high resolution time should be returned as array or number.<p>
 * @since 7.3
 * @return int[]|int|float|false Returns an array of integers in the form [seconds, nanoseconds], if the parameter get_as_number is false.
 * Otherwise the nanoseconds are returned as integer (64bit platforms) or float (32bit platforms).
 */
#[Pure(true)]
function hrtime(bool $as_number = false): array|int|float|false {}

/**
 * Return source with stripped comments and whitespace
 * @link https://php.net/manual/en/function.php-strip-whitespace.php
 * @param string $filename <p>
 * Path to the PHP file.
 * </p>
 * @return string The stripped source code will be returned on success, or an empty string
 * on failure.
 * </p>
 * <p>
 * This function works as described as of PHP 5.0.1. Before this it would
 * only return an empty string. For more information on this bug and its
 * prior behavior, see bug report
 * #29606.
 */
#[Pure(true)]
function php_strip_whitespace(string $filename): string {}

/**
 * Gets the value of a configuration option
 * @link https://php.net/manual/en/function.ini-get.php
 * @link https://php.net/manual/en/ini.list.php
 * @param string $option <p>
 * The configuration option name.
 * </p>
 * @return string|false the value of the configuration option as a string on success, or
 * an empty string on failure or for null values.
 */
#[Pure(true)]
function ini_get(string $option): string|false {}

/**
 * Gets all configuration options
 * @link https://php.net/manual/en/function.ini-get-all.php
 * @link https://php.net/manual/en/ini.list.php
 * @param string|null $extension [optional] <p>
 * An optional extension name. If set, the function return only options
 * specific for that extension.
 * </p>
 * @param bool $details [optional] <p>
 * Retrieve details settings or only the current value for each setting.
 * Default is true (retrieve details).
 * </p>
 * @return array|false an associative array with directive name as the array key.
 * <p>
 * When details is true (default) the array will
 * contain global_value (set in
 * "php.ini"), local_value (perhaps set with
 * ini_set or ".htaccess"), and
 * access (the access level).
 * </p>
 * <p>
 * When details is false the value will be the
 * current value of the option.
 * </p>
 * <p>
 * See the manual section
 * for information on what access levels mean.
 * </p>
 * <p>
 * It's possible for a directive to have multiple access levels, which is
 * why access shows the appropriate bitmask values.
 * </p>
 */
#[Pure(true)]
#[ArrayShape(["global_value" => "string", "local_value" => "string", "access" => "int"])]
function ini_get_all(?string $extension, #[PhpStormStubsElementAvailable(from: '7.0')] bool $details = true): array|false {}

/**
 * Sets the value of a configuration option
 * @link https://php.net/manual/en/function.ini-set.php
 * @link https://php.net/manual/en/ini.list.php
 * @param string $option <p>
 * </p>
 * <p>
 * Not all the available options can be changed using
 * ini_set. There is a list of all available options
 * in the appendix.
 * </p>
 * @param string $value <p>
 * The new value for the option.
 * </p>
 * @return string|false the old value on success, false on failure.
 */
function ini_set(string $option, #[LanguageLevelTypeAware(['8.1' => 'string|int|float|bool|null'], default: 'string')] $value): string|false {}

/**
 * Alias:
 * {@see ini_set}
 * @link https://php.net/manual/en/function.ini-alter.php
 * @link https://php.net/manual/en/ini.list.php
 * @param string $option
 * @param string $value
 * @return string|false
 */
function ini_alter(string $option, #[LanguageLevelTypeAware(['8.1' => 'string|int|float|bool|null'], default: 'string')] $value): string|false {}

/**
 * Restores the value of a configuration option
 * @link https://php.net/manual/en/function.ini-restore.php
 * @link https://php.net/manual/en/ini.list.php
 * @param string $option <p>
 * The configuration option name.
 * </p>
 * @return void
 */
function ini_restore(string $option): void {}

/**
 * @param string $shorthand
 * @return int
 * @since 8.2
 */
function ini_parse_quantity(string $shorthand): int {}

/**
 * Gets the current include_path configuration option
 * @link https://php.net/manual/en/function.get-include-path.php
 * @return string|false the path, as a string.
 */
#[Pure(true)]
function get_include_path(): string|false {}

/**
 * Sets the include_path configuration option
 * @link https://php.net/manual/en/function.set-include-path.php
 * @param string $include_path <p>
 * The new value for the include_path
 * </p>
 * @return string|false the old include_path on
 * success or false on failure.
 */
function set_include_path(string $include_path): string|false {}

/**
 * Restores the value of the include_path configuration option
 * @link https://php.net/manual/en/function.restore-include-path.php
 * @return void
 * @removed 8.0
 */
#[Deprecated(since: '7.4')]
function restore_include_path() {}

/**
 * Send a cookie
 * @link https://php.net/manual/en/function.setcookie.php
 * @param string $name <p>
 * The name of the cookie.
 * </p>
 * @param string $value [optional] <p>
 * The value of the cookie. This value is stored on the clients
 * computer; do not store sensitive information.
 * Assuming the name is 'cookiename', this
 * value is retrieved through $_COOKIE['cookiename']
 * </p>
 * @param int $expires_or_options [optional] <p>
 * The time the cookie expires. This is a Unix timestamp so is
 * in number of seconds since the epoch. In other words, you'll
 * most likely set this with the time function
 * plus the number of seconds before you want it to expire. Or
 * you might use mktime.
 * time()+60*60*24*30 will set the cookie to
 * expire in 30 days. If set to 0, or omitted, the cookie will expire at
 * the end of the session (when the browser closes).
 * </p>
 * <p>
 * <p>
 * You may notice the expire parameter takes on a
 * Unix timestamp, as opposed to the date format Wdy, DD-Mon-YYYY
 * HH:MM:SS GMT, this is because PHP does this conversion
 * internally.
 * </p>
 * <p>
 * expire is compared to the client's time which can
 * differ from server's time.
 * </p>
 * </p>
 * @param string $path [optional] <p>
 * The path on the server in which the cookie will be available on.
 * If set to '/', the cookie will be available
 * within the entire domain. If set to
 * '/foo/', the cookie will only be available
 * within the /foo/ directory and all
 * sub-directories such as /foo/bar/ of
 * domain. The default value is the
 * current directory that the cookie is being set in.
 * </p>
 * @param string $domain [optional] <p>
 * The domain that the cookie is available.
 * To make the cookie available on all subdomains of example.com
 * then you'd set it to '.example.com'. The
 * . is not required but makes it compatible
 * with more browsers. Setting it to www.example.com
 * will make the cookie only available in the www
 * subdomain. Refer to tail matching in the
 * spec for details.
 * </p>
 * @param bool $secure [optional] <p>
 * Indicates that the cookie should only be transmitted over a
 * secure HTTPS connection from the client. When set to true, the
 * cookie will only be set if a secure connection exists.
 * On the server-side, it's on the programmer to send this
 * kind of cookie only on secure connection (e.g. with respect to
 * $_SERVER["HTTPS"]).
 * </p>
 * @param bool $httponly [optional] <p>
 * When true the cookie will be made accessible only through the HTTP
 * protocol. This means that the cookie won't be accessible by
 * scripting languages, such as JavaScript. This setting can effectively
 * help to reduce identity theft through XSS attacks (although it is
 * not supported by all browsers). Added in PHP 5.2.0.
 * true or false
 * </p>
 * @return bool If output exists prior to calling this function,
 * setcookie will fail and return false. If
 * setcookie successfully runs, it will return true.
 * This does not indicate whether the user accepted the cookie.
 */
function setcookie(string $name, $value = "", $expires_or_options = 0, $path = "", $domain = "", $secure = false, $httponly = false): bool {}

/**
 * Send a cookie
 *
 * @link  https://php.net/manual/en/function.setcookie.php
 *
 * @param string $name The name of the cookie.
 * @param string $value [optional] The value of the cookie. This value is stored on the clients
 *                        computer; do not store sensitive information.
 *                        Assuming the name is 'cookiename', this value is retrieved through $_COOKIE['cookiename']
 * @param array $options [optional] An associative array which may have any of the keys expires, path, domain, secure,
 *                        httponly and samesite. The values have the same meaning as described for the parameters with
 *                        the same name. The value of the samesite element should be either Lax or Strict.
 *                        If any of the allowed options are not given, their default values are the same
 *                        as the default values of the explicit parameters. If the samesite element is omitted,
 *                        no SameSite cookie attribute is set.
 *
 * @return bool           If output exists prior to calling this function, setcookie will fail and return false. If
 *                        setcookie successfully runs, it will return true.
 *                        This does not indicate whether the user accepted the cookie.
 * @since 7.3
 */
function setcookie(string $name, $value = '', array $options = []): bool {}

/**
 * Send a cookie without urlencoding the cookie value
 * @link https://php.net/manual/en/function.setrawcookie.php
 * @param string $name
 * @param string $value [optional]
 * @param int $expires_or_options [optional]
 * @param string $path [optional]
 * @param string $domain [optional]
 * @param bool $secure [optional]
 * @param bool $httponly [optional]
 * @return bool true on success or false on failure.
 */
function setrawcookie(string $name, $value = '', $expires_or_options = 0, $path = "", $domain = "", $secure = false, $httponly = false): bool {}

/**
 * Send a cookie without urlencoding the cookie value
 *
 * @link https://php.net/manual/en/function.setrawcookie.php
 *
 * @param string $name The name of the cookie.
 * @param string $value [optional] The value of the cookie. This value is stored on the clients
 *                        computer; do not store sensitive information.
 *                        Assuming the name is 'cookiename', this value is retrieved through $_COOKIE['cookiename']
 * @param array $options [optional] An associative array which may have any of the keys expires, path, domain, secure,
 *                        httponly and samesite. The values have the same meaning as described for the parameters with
 *                        the same name. The value of the samesite element should be either Lax or Strict.
 *                        If any of the allowed options are not given, their default values are the same
 *                        as the default values of the explicit parameters. If the samesite element is omitted,
 *                        no SameSite cookie attribute is set.
 *
 * @return bool           If output exists prior to calling this function, setcookie will fail and return false. If
 *                        setcookie successfully runs, it will return true.
 *                        This does not indicate whether the user accepted the cookie.
 * @since 7.3
 */
function setrawcookie(string $name, $value = '', array $options = []): bool {}

/**
 * Send a raw HTTP header
 * @link https://php.net/manual/en/function.header.php
 * @param string $header <p>
 * The header string.
 * </p>
 * <p>
 * There are two special-case header calls. The first is a header
 * that starts with the string "HTTP/" (case is not
 * significant), which will be used to figure out the HTTP status
 * code to send. For example, if you have configured Apache to
 * use a PHP script to handle requests for missing files (using
 * the ErrorDocument directive), you may want to
 * make sure that your script generates the proper status code.
 * </p>
 * <p>
 * The second special case is the "Location:" header. Not only does
 * it send this header back to the browser, but it also returns a
 * REDIRECT (302) status code to the browser
 * unless the 201 or
 * a 3xx status code has already been set.
 * </p>
 * @param bool $replace [optional] <p>
 * The optional replace parameter indicates
 * whether the header should replace a previous similar header, or
 * add a second header of the same type. By default it will replace,
 * but if you pass in false as the second argument you can force
 * multiple headers of the same type. For example:
 * </p>
 * @param int $response_code <p>
 * Forces the HTTP response code to the specified value.
 * </p>
 * @return void
 */
function header(string $header, bool $replace = true, int $response_code = 0): void {}

/**
 * Remove previously set headers
 * @link https://php.net/manual/en/function.header-remove.php
 * @param string|null $name [optional] <p>
 * The header name to be removed.
 * </p>
 * This parameter is case-insensitive.
 * @return void
 */
function header_remove(?string $name): void {}

/**
 * Checks if or where headers have been sent
 * @link https://php.net/manual/en/function.headers-sent.php
 * @param string &$filename [optional] <p>
 * If the optional file and
 * line parameters are set,
 * headers_sent will put the PHP source file name
 * and line number where output started in the file
 * and line variables.
 * </p>
 * @param int &$line [optional] <p>
 * The line number where the output started.
 * </p>
 * @return bool headers_sent will return false if no HTTP headers
 * have already been sent or true otherwise.
 */
function headers_sent(&$filename, &$line): bool {}

/**
 * Returns a list of response headers sent (or ready to send)
 * @link https://php.net/manual/en/function.headers-list.php
 * @return array a numerically indexed array of headers.
 */
#[Pure]
function headers_list(): array {}

/**
 * Fetches all HTTP request headers from the current request
 * @link https://php.net/manual/en/function.apache-request-headers.php
 * @return array|false An associative array of all the HTTP headers in the current request, or <b>FALSE</b> on failure.
 */
#[Pure]
function apache_request_headers(): false|array {}

/**
 * Fetches all HTTP headers from the current request.
 * This function is an alias for apache_request_headers(). Please read the apache_request_headers() documentation for more information on how this function works.
 * @link https://php.net/manual/en/function.getallheaders.php
 * @return array|false An associative array of all the HTTP headers in the current request, or <b>FALSE</b> on failure.
 */
#[Pure]
function getallheaders(): false|array {}

/**
 * Check whether client disconnected
 * @link https://php.net/manual/en/function.connection-aborted.php
 * @return int 1 if client disconnected, 0 otherwise.
 */
#[Pure(true)]
function connection_aborted(): int {}

/**
 * Returns connection status bitfield
 * @link https://php.net/manual/en/function.connection-status.php
 * @return int the connection status bitfield, which can be used against the
 * CONNECTION_XXX constants to determine the connection
 * status.
 */
#[Pure(true)]
function connection_status(): int {}

/**
 * Set whether a client disconnect should abort script execution
 * @link https://php.net/manual/en/function.ignore-user-abort.php
 * @param bool|null $enable [optional] <p>
 * If set, this function will set the ignore_user_abort ini setting
 * to the given value. If not, this function will
 * only return the previous setting without changing it.
 * </p>
 * @return int the previous setting, as an integer.
 */
function ignore_user_abort(?bool $enable): int {}

/**
 * Parse a configuration file
 * @link https://php.net/manual/en/function.parse-ini-file.php
 * @param string $filename <p>
 * The filename of the ini file being parsed.
 * </p>
 * @param bool $process_sections [optional] <p>
 * By setting the process_sections
 * parameter to true, you get a multidimensional array, with
 * the section names and settings included. The default
 * for process_sections is false
 * </p>
 * @param int $scanner_mode [optional] <p>
 * Can either be INI_SCANNER_NORMAL (default) or
 * INI_SCANNER_RAW. If INI_SCANNER_RAW
 * is supplied, then option values will not be parsed.
 * </p>
 * <p>
 * As of PHP 5.6.1 can also be specified as <strong><code>INI_SCANNER_TYPED</code></strong>.
 * In this mode boolean, null and integer types are preserved when possible.
 * String values <em>"true"</em>, <em>"on"</em> and <em>"yes"</em>
 * are converted to <b>TRUE</b>. <em>"false"</em>, <em>"off"</em>, <em>"no"</em>
 * and <em>"none"</em> are considered <b>FALSE</b>. <em>"null"</em> is converted to <b>NULL</b>
 * in typed mode. Also, all numeric strings are converted to integer type if it is possible.
 * </p>
 * @return array|false The settings are returned as an associative array on success,
 * and false on failure.
 */
#[Pure(true)]
function parse_ini_file(string $filename, bool $process_sections = false, int $scanner_mode = INI_SCANNER_NORMAL): array|false {}

/**
 * Parse a configuration string
 * @link https://php.net/manual/en/function.parse-ini-string.php
 * @param string $ini_string <p>
 * The contents of the ini file being parsed.
 * </p>
 * @param bool $process_sections [optional] <p>
 * By setting the process_sections
 * parameter to true, you get a multidimensional array, with
 * the section names and settings included. The default
 * for process_sections is false
 * </p>
 * @param int $scanner_mode [optional] <p>
 * Can either be INI_SCANNER_NORMAL (default) or
 * INI_SCANNER_RAW. If INI_SCANNER_RAW
 * is supplied, then option values will not be parsed.
 * </p>
 * @return array|false The settings are returned as an associative array on success,
 * and false on failure.
 */
#[Pure]
function parse_ini_string(string $ini_string, bool $process_sections = false, int $scanner_mode = INI_SCANNER_NORMAL): array|false {}

/**
 * Tells whether the file was uploaded via HTTP POST
 * @link https://php.net/manual/en/function.is-uploaded-file.php
 * @param string $filename <p>
 * The filename being checked.
 * </p>
 * @return bool true on success or false on failure.
 */
#[Pure(true)]
function is_uploaded_file(string $filename): bool {}

/**
 * Moves an uploaded file to a new location
 * @link https://php.net/manual/en/function.move-uploaded-file.php
 * @param string $from <p>
 * The filename of the uploaded file.
 * </p>
 * @param string $to <p>
 * The destination of the moved file.
 * </p>
 * @return bool If filename is not a valid upload file,
 * then no action will occur, and
 * move_uploaded_file will return
 * false.
 * </p>
 * <p>
 * If filename is a valid upload file, but
 * cannot be moved for some reason, no action will occur, and
 * move_uploaded_file will return
 * false. Additionally, a warning will be issued.
 */
function move_uploaded_file(string $from, string $to): bool {}

/**
 * @return array|false
 * @since 7.3
 */
#[Pure]
#[ArrayShape(["description" => "string", "mac" => "string", "mtu" => "int", "unicast" => "array", "up" => "bool"])]
function net_get_interfaces(): array|false {}

/**
 * Get the Internet host name corresponding to a given IP address
 * @link https://php.net/manual/en/function.gethostbyaddr.php
 * @param string $ip <p>
 * The host IP address.
 * </p>
 * @return string|false the host name or the unmodified ip_address
 * on failure.
 */
#[Pure]
function gethostbyaddr(string $ip): string|false {}

/**
 * Get the IPv4 address corresponding to a given Internet host name
 * @link https://php.net/manual/en/function.gethostbyname.php
 * @param string $hostname <p>
 * The host name.
 * </p>
 * @return string the IPv4 address or a string containing the unmodified
 * hostname on failure.
 */
#[Pure]
function gethostbyname(string $hostname): string {}

/**
 * Get a list of IPv4 addresses corresponding to a given Internet host
 * name
 * @link https://php.net/manual/en/function.gethostbynamel.php
 * @param string $hostname <p>
 * The host name.
 * </p>
 * @return array|false an array of IPv4 addresses or false if
 * hostname could not be resolved.
 */
#[Pure]
function gethostbynamel(string $hostname): array|false {}

/**
 * Gets the host name
 * @link https://php.net/manual/en/function.gethostname.php
 * @return string|false a string with the hostname on success, otherwise false is
 * returned.
 */
#[Pure]
function gethostname(): string|false {}

/**
 * Alias:
 * {@see checkdnsrr}
 * @link https://php.net/manual/en/function.dns-check-record.php
 * @param string $hostname <p>
 * <b>host</b> may either be the IP address in
 * dotted-quad notation or the host name.
 * </p>
 * @param string $type [optional] <p>
 * <b>type</b> may be any one of: A, MX, NS, SOA,
 * PTR, CNAME, AAAA, A6, SRV, NAPTR, TXT or ANY.
 * </p>
 * @return bool Returns <b>TRUE</b> if any records are found; returns <b>FALSE</b> if no records were found or if an error occurred.
 */
function dns_check_record(string $hostname, string $type = 'MX'): bool {}

/**
 * Check DNS records corresponding to a given Internet host name or IP address
 * @link https://php.net/manual/en/function.checkdnsrr.php
 * @param string $hostname <p>
 * host may either be the IP address in
 * dotted-quad notation or the host name.
 * </p>
 * @param string $type [optional] <p>
 * type may be any one of: A, MX, NS, SOA,
 * PTR, CNAME, AAAA, A6, SRV, NAPTR, TXT or ANY.
 * </p>
 * @return bool true if any records are found; returns false if no records
 * were found or if an error occurred.
 */
#[Pure]
function checkdnsrr(string $hostname, string $type = 'MX'): bool {}

/**
 * Alias:
 * {@see getmxrr}
 * @link https://php.net/manual/en/function.dns-get-mx.php
 * @param string $hostname
 * @param array &$hosts
 * @param array &$weights [optional]
 * @return bool
 */
function dns_get_mx(string $hostname, &$hosts, &$weights): bool {}

/**
 * Get MX records corresponding to a given Internet host name
 * @link https://php.net/manual/en/function.getmxrr.php
 * @param string $hostname <p>
 * The Internet host name.
 * </p>
 * @param array &$hosts <p>
 * A list of the MX records found is placed into the array
 * mxhosts.
 * </p>
 * @param array &$weights [optional] <p>
 * If the weight array is given, it will be filled
 * with the weight information gathered.
 * </p>
 * @return bool true if any records are found; returns false if no records
 * were found or if an error occurred.
 */
function getmxrr(string $hostname, &$hosts, &$weights): bool {}

/**
 * Fetch DNS Resource Records associated with a hostname
 * @link https://php.net/manual/en/function.dns-get-record.php
 * @param string $hostname <p>
 * hostname should be a valid DNS hostname such
 * as "www.example.com". Reverse lookups can be generated
 * using in-addr.arpa notation, but
 * gethostbyaddr is more suitable for
 * the majority of reverse lookups.
 * </p>
 * <p>
 * Per DNS standards, email addresses are given in user.host format (for
 * example: hostmaster.example.com as opposed to hostmaster@example.com),
 * be sure to check this value and modify if necessary before using it
 * with a functions such as mail.
 * </p>
 * @param int $type [optional] <p>
 * By default, dns_get_record will search for any
 * resource records associated with hostname.
 * To limit the query, specify the optional type
 * parameter. May be any one of the following:
 * DNS_A, DNS_CNAME,
 * DNS_HINFO, DNS_MX,
 * DNS_NS, DNS_PTR,
 * DNS_SOA, DNS_TXT,
 * DNS_AAAA, DNS_SRV,
 * DNS_NAPTR, DNS_A6,
 * DNS_ALL or DNS_ANY.
 * </p>
 * <p>
 * Because of eccentricities in the performance of libresolv
 * between platforms, DNS_ANY will not
 * always return every record, the slower DNS_ALL
 * will collect all records more reliably.
 * </p>
 * @param array &$authoritative_name_servers [optional] <p>
 * Passed by reference and, if given, will be populated with Resource
 * Records for the Authoritative Name Servers.
 * </p>
 * @param array &$additional_records [optional] <p>
 * Passed by reference and, if given, will be populated with any
 * Additional Records.
 * </p>
 * @param bool $raw [optional] <p>
 * In case of raw mode, we query only the requested type
 * instead of looping type by type before going with the additional info stuff.
 * </p>
 * @return array|false This function returns an array of associative arrays. Each associative array contains
 * at minimum the following keys:
 * <table>
 * Basic DNS attributes
 * <tr valign="top">
 * <td>Attribute</td>
 * <td>Meaning</td>
 * </tr>
 * <tr valign="top">
 * <td>host</td>
 * <td>
 * The record in the DNS namespace to which the rest of the associated data refers.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>class</td>
 * <td>
 * dns_get_record only returns Internet class records and as
 * such this parameter will always return IN.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>type</td>
 * <td>
 * String containing the record type. Additional attributes will also be contained
 * in the resulting array dependant on the value of type. See table below.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>ttl</td>
 * <td>
 * "Time To Live" remaining for this record. This will not equal
 * the record's original ttl, but will rather equal the original ttl minus whatever
 * length of time has passed since the authoritative name server was queried.
 * </td>
 * </tr>
 * </table>
 * </p>
 * <p>
 * <table>
 * Other keys in associative arrays dependant on 'type'
 * <tr valign="top">
 * <td>Type</td>
 * <td>Extra Columns</td>
 * </tr>
 * <tr valign="top">
 * <td>A</td>
 * <td>
 * ip: An IPv4 addresses in dotted decimal notation.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>MX</td>
 * <td>
 * pri: Priority of mail exchanger.
 * Lower numbers indicate greater priority.
 * target: FQDN of the mail exchanger.
 * See also dns_get_mx.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>CNAME</td>
 * <td>
 * target: FQDN of location in DNS namespace to which
 * the record is aliased.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>NS</td>
 * <td>
 * target: FQDN of the name server which is authoritative
 * for this hostname.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>PTR</td>
 * <td>
 * target: Location within the DNS namespace to which
 * this record points.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>TXT</td>
 * <td>
 * txt: Arbitrary string data associated with this record.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>HINFO</td>
 * <td>
 * cpu: IANA number designating the CPU of the machine
 * referenced by this record.
 * os: IANA number designating the Operating System on
 * the machine referenced by this record.
 * See IANA's Operating System
 * Names for the meaning of these values.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>SOA</td>
 * <td>
 * mname: FQDN of the machine from which the resource
 * records originated.
 * rname: Email address of the administrative contain
 * for this domain.
 * serial: Serial # of this revision of the requested
 * domain.
 * refresh: Refresh interval (seconds) secondary name
 * servers should use when updating remote copies of this domain.
 * retry: Length of time (seconds) to wait after a
 * failed refresh before making a second attempt.
 * expire: Maximum length of time (seconds) a secondary
 * DNS server should retain remote copies of the zone data without a
 * successful refresh before discarding.
 * minimum-ttl: Minimum length of time (seconds) a
 * client can continue to use a DNS resolution before it should request
 * a new resolution from the server. Can be overridden by individual
 * resource records.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>AAAA</td>
 * <td>
 * ipv6: IPv6 address
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>A6(PHP &gt;= 5.1.0)</td>
 * <td>
 * masklen: Length (in bits) to inherit from the target
 * specified by chain.
 * ipv6: Address for this specific record to merge with
 * chain.
 * chain: Parent record to merge with
 * ipv6 data.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>SRV</td>
 * <td>
 * pri: (Priority) lowest priorities should be used first.
 * weight: Ranking to weight which of commonly prioritized
 * targets should be chosen at random.
 * target and port: hostname and port
 * where the requested service can be found.
 * For additional information see: RFC 2782
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>NAPTR</td>
 * <td>
 * order and pref: Equivalent to
 * pri and weight above.
 * flags, services, regex,
 * and replacement: Parameters as defined by
 * RFC 2915.
 * </td>
 * </tr>
 * </table>
 */
function dns_get_record(string $hostname, int $type = DNS_ANY, &$authoritative_name_servers, &$additional_records, bool $raw = false): array|false {}
<?php

/**
 * (PHP 5.1)<br/>
 * Halts the execution of the compiler. This can be useful to embed data in PHP scripts, like the installation files.
 * Byte position of the data start can be determined by the __COMPILER_HALT_OFFSET__ constant
 * which is defined only if there is a __halt_compiler() presented in the file.
 * <p> Note: __halt_compiler() can only be used from the outermost scope.</p>
 * @link https://php.net/manual/en/function.halt-compiler.php
 * @return void
 */
function PS_UNRESERVE_PREFIX___halt_compiler() {}

/**
 * (PHP 5.1)<br/>
 * Byte position of the data start, defined only if there is a __halt_compiler() presented in the file.
 * @link https://php.net/manual/en/function.halt-compiler.php
 * @return void
 */
define("__COMPILER_HALT_OFFSET__", 0);

/**
 * Convert hexadecimal string to its binary representation.
 *
 * If the hexadecimal input string is of odd length or invalid hexadecimal string an <code>E_WARNING</code> level error is emitted.
 *
 * @link https://php.net/manual/en/function.hex2bin.php
 * @param string $string Hexadecimal string to convert.
 * @return string|false The binary representation of the given data or <b>FALSE</b> on failure.
 * @see bin2hex()
 * @see unpack()
 * @since 5.4
 */
function hex2bin(string $string): string|false {};

/**
 * Get or Set the HTTP response code
 * @param int $response_code The optional response_code will set the response code.
 * @return int|bool The current response code. By default the return value is int(200).
 */
function http_response_code(int $response_code = 0): int|bool {}
<?php

use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\ExpectedValues;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Pure;

/**
 * Make a string uppercase
 * @link https://php.net/manual/en/function.strtoupper.php
 * @param string $string <p>
 * The input string.
 * </p>
 * @return string the uppercased string.
 */
#[Pure]
function strtoupper(string $string): string {}

/**
 * Make a string lowercase
 * @link https://php.net/manual/en/function.strtolower.php
 * @param string $string <p>
 * The input string.
 * </p>
 * @return string the lowercased string.
 */
#[Pure]
function strtolower(string $string): string {}

/**
 * Find the position of the first occurrence of a substring in a string
 * @link https://php.net/manual/en/function.strpos.php
 * @param string $haystack <p>
 * The string to search in
 * </p>
 * @param string $needle <p>
 * If <b>needle</b> is not a string, it is converted
 * to an integer and applied as the ordinal value of a character.
 * </p>
 * @param int<0,max> $offset [optional] <p>
 * If specified, search will start this number of characters counted from
 * the beginning of the string. Unlike {@see strrpos()} and {@see strripos()}, the offset cannot be negative.
 * </p>
 * @return int<0,max>|false <p>
 * Returns the position where the needle exists relative to the beginnning of
 * the <b>haystack</b> string (independent of search direction
 * or offset).
 * Also note that string positions start at 0, and not 1.
 * </p>
 * <p>
 * Returns <b>FALSE</b> if the needle was not found.
 * </p>
 */
#[Pure]
function strpos(string $haystack, string $needle, int $offset = 0): int|false {}

/**
 * Find position of first occurrence of a case-insensitive string
 * @link https://php.net/manual/en/function.stripos.php
 * @param string $haystack <p>
 * The string to search in
 * </p>
 * @param string $needle <p>
 * Note that the needle may be a string of one or
 * more characters.
 * </p>
 * <p>
 * If needle is not a string, it is converted to
 * an integer and applied as the ordinal value of a character.
 * </p>
 * @param int $offset <p>
 * The optional offset parameter allows you
 * to specify which character in haystack to
 * start searching. The position returned is still relative to the
 * beginning of haystack.
 * </p>
 * @return int|false If needle is not found,
 * stripos will return boolean false.
 */
#[Pure]
function stripos(string $haystack, string $needle, int $offset = 0): int|false {}

/**
 * Find the position of the last occurrence of a substring in a string
 * @link https://php.net/manual/en/function.strrpos.php
 * @param string $haystack <p>
 * The string to search in.
 * </p>
 * @param string $needle <p>
 * If <b>needle</b> is not a string, it is converted to an integer and applied as the ordinal value of a character.
 * </p>
 * @param int $offset [optional] <p>
 * If specified, search will start this number of characters counted from the beginning of the string. If the value is negative, search will instead start from that many characters from the end of the string, searching backwards.
 * </p>
 * @return int|false <p>
 * Returns the position where the needle exists relative to the beginning of
 * the <b>haystack</b> string (independent of search direction
 * or offset).
 * Also note that string positions start at 0, and not 1.
 * </p>
 * <p>
 * Returns <b>FALSE</b> if the needle was not found.
 * </p>
 */
#[Pure]
function strrpos(string $haystack, string $needle, int $offset = 0): int|false {}

/**
 * Find position of last occurrence of a case-insensitive string in a string
 * @link https://php.net/manual/en/function.strripos.php
 * @param string $haystack <p>
 * The string to search in
 * </p>
 * @param string $needle <p>
 * Note that the needle may be a string of one or
 * more characters.
 * </p>
 * @param int $offset <p>
 * The offset parameter may be specified to begin
 * searching an arbitrary number of characters into the string.
 * </p>
 * <p>
 * Negative offset values will start the search at
 * offset characters from the
 * start of the string.
 * </p>
 * @return int|false the numerical position of the last occurrence of
 * needle. Also note that string positions start at 0,
 * and not 1.
 * </p>
 * <p>
 * If needle is not found, false is returned.
 */
#[Pure]
function strripos(string $haystack, string $needle, int $offset = 0): int|false {}

/**
 * Reverse a string
 * @link https://php.net/manual/en/function.strrev.php
 * @param string $string <p>
 * The string to be reversed.
 * </p>
 * @return string the reversed string.
 */
#[Pure]
function strrev(string $string): string {}

/**
 * Convert logical Hebrew text to visual text
 * @link https://php.net/manual/en/function.hebrev.php
 * @param string $string <p>
 * A Hebrew input string.
 * </p>
 * @param int $max_chars_per_line <p>
 * This optional parameter indicates maximum number of characters per
 * line that will be returned.
 * </p>
 * @return string the visual string.
 */
#[Pure]
function hebrev(string $string, int $max_chars_per_line = 0): string {}

/**
 * Convert logical Hebrew text to visual text with newline conversion
 * @link https://php.net/manual/en/function.hebrevc.php
 * @param string $hebrew_text <p>
 * A Hebrew input string.
 * </p>
 * @param int $max_chars_per_line [optional] <p>
 * This optional parameter indicates maximum number of characters per
 * line that will be returned.
 * </p>
 * @return string the visual string.
 * @removed 8.0
 */
#[Deprecated(replacement: 'nl2br(hebrev(%parameter0%))', since: '7.4')]
function hebrevc(string $hebrew_text, $max_chars_per_line): string {}

/**
 * Inserts HTML line breaks before all newlines in a string
 * @link https://php.net/manual/en/function.nl2br.php
 * @param string $string <p>
 * The input string.
 * </p>
 * @param bool $use_xhtml [optional] <p>
 * Whether to use XHTML compatible line breaks or not.
 * </p>
 * @return string the altered string.
 */
#[Pure]
function nl2br(string $string, bool $use_xhtml = true): string {}

/**
 * Returns trailing name component of path
 * @link https://php.net/manual/en/function.basename.php
 * @param string $path <p>
 * A path.
 * </p>
 * <p>
 * On Windows, both slash (/) and backslash
 * (\) are used as directory separator character. In
 * other environments, it is the forward slash (/).
 * </p>
 * @param string $suffix <p>
 * If the filename ends in suffix this will also
 * be cut off.
 * </p>
 * @return string the base name of the given path.
 */
#[Pure]
function basename(string $path, string $suffix = ''): string {}

/**
 * Returns a parent directory's path
 * @link https://php.net/manual/en/function.dirname.php
 * @param string $path <p>
 * A path.
 * </p>
 * <p>
 * On Windows, both slash (/) and backslash
 * (\) are used as directory separator character. In
 * other environments, it is the forward slash (/).
 * </p>
 * @param int $levels <p>
 * The number of parent directories to go up.
 * This must be an integer greater than 0.
 * </p>
 * @return string the name of the directory. If there are no slashes in
 * path, a dot ('.') is returned,
 * indicating the current directory. Otherwise, the returned string is
 * path with any trailing
 * /component removed.
 */
#[Pure]
function dirname(string $path, #[PhpStormStubsElementAvailable(from: '7.0')] int $levels = 1): string {}

/**
 * Returns information about a file path
 * @link https://php.net/manual/en/function.pathinfo.php
 * @param string $path <p>
 * The path being checked.
 * </p>
 * @param int $flags [optional] <p>
 * You can specify which elements are returned with optional parameter
 * options. It composes from
 * PATHINFO_DIRNAME,
 * PATHINFO_BASENAME,
 * PATHINFO_EXTENSION and
 * PATHINFO_FILENAME. It
 * defaults to return all elements.
 * </p>
 * @return string|array{dirname: string, basename: string, extension: string, filename: string} The following associative array elements are returned:
 * dirname, basename,
 * extension (if any), and filename.
 * </p>
 * <p>
 * If options is used, this function will return a
 * string if not all elements are requested.
 */
#[Pure(true)]
#[ArrayShape(['dirname' => 'string', 'basename' => 'string', 'extension' => 'string', 'filename' => 'string'])]
function pathinfo(string $path, #[ExpectedValues(flags: [
    PATHINFO_DIRNAME,
    PATHINFO_BASENAME,
    PATHINFO_EXTENSION,
    PATHINFO_FILENAME
])] int $flags = PATHINFO_ALL): array|string {}

/**
 * Un-quotes a quoted string
 * @link https://php.net/manual/en/function.stripslashes.php
 * @param string $string <p>
 * The input string.
 * </p>
 * @return string a string with backslashes stripped off.
 * (\' becomes ' and so on.)
 * Double backslashes (\\) are made into a single
 * backslash (\).
 */
#[Pure]
function stripslashes(string $string): string {}

/**
 * Un-quote string quoted with <function>addcslashes</function>
 * @link https://php.net/manual/en/function.stripcslashes.php
 * @param string $string <p>
 * The string to be unescaped.
 * </p>
 * @return string the unescaped string.
 */
#[Pure]
function stripcslashes(string $string): string {}

/**
 * Find the first occurrence of a string
 * @link https://php.net/manual/en/function.strstr.php
 * @param string $haystack <p>
 * The input string.
 * </p>
 * @param string $needle <p>
 * If needle is not a string, it is converted to
 * an integer and applied as the ordinal value of a character.
 * </p>
 * @param bool $before_needle [optional] <p>
 * If true, strstr returns
 * the part of the haystack before the first
 * occurrence of the needle.
 * </p>
 * @return string|false the portion of string, or false if needle
 * is not found.
 */
#[Pure]
function strstr(string $haystack, string $needle, bool $before_needle = false): string|false {}

/**
 * Case-insensitive <function>strstr</function>
 * @link https://php.net/manual/en/function.stristr.php
 * @param string $haystack <p>
 * The string to search in
 * </p>
 * @param string $needle <p>
 * If needle is not a string, it is converted to
 * an integer and applied as the ordinal value of a character.
 * </p>
 * @param bool $before_needle [optional] <p>
 * If true, stristr
 * returns the part of the haystack before the
 * first occurrence of the needle.
 * </p>
 * @return string|false the matched substring. If needle is not
 * found, returns false.
 */
#[Pure]
function stristr(string $haystack, string $needle, bool $before_needle = false): string|false {}

/**
 * Find the last occurrence of a character in a string
 * @link https://php.net/manual/en/function.strrchr.php
 * @param string $haystack <p>
 * The string to search in
 * </p>
 * @param string $needle <p>
 * If <b>needle</b> contains more than one character,
 * only the first is used. This behavior is different from that of {@see strstr()}.
 * </p>
 * <p>
 * If <b>needle</b> is not a string, it is converted to
 * an integer and applied as the ordinal value of a character.
 * </p>
 * @return string|false <p>
 * This function returns the portion of string, or <b>FALSE</b> if
 * <b>needle</b> is not found.
 * </p>
 */
#[Pure]
function strrchr(string $haystack, string $needle): string|false {}

/**
 * Randomly shuffles a string
 * @link https://php.net/manual/en/function.str-shuffle.php
 * @param string $string <p>
 * The input string.
 * </p>
 * @return string the shuffled string.
 */
function str_shuffle(string $string): string {}

/**
 * Return information about words used in a string
 * @link https://php.net/manual/en/function.str-word-count.php
 * @param string $string <p>
 * The string
 * </p>
 * @param int $format [optional] <p>
 * Specify the return value of this function. The current supported values
 * are:
 * 0 - returns the number of words found
 * </p>
 * @param string|null $characters [optional] <p>
 * A list of additional characters which will be considered as 'word'
 * </p>
 * @return string[]|int an array or an integer, depending on the
 * format chosen.
 */
#[Pure]
function str_word_count(string $string, int $format = 0, ?string $characters): array|int {}

/**
 * Convert a string to an array
 * @link https://php.net/manual/en/function.str-split.php
 * @param string $string <p>
 * The input string.
 * </p>
 * @param int $length [optional] <p>
 * Maximum length of the chunk.
 * </p>
 * @return string[]|false <p>If the optional split_length parameter is
 * specified, the returned array will be broken down into chunks with each
 * being split_length in length, otherwise each chunk
 * will be one character in length.
 * </p>
 * <p>
 * <b>FALSE</b> is returned if split_length is less than 1.
 * If the split_length length exceeds the length of
 * string, the entire string is returned as the first
 * (and only) array element.
 * </p>
 */
#[Pure]
#[LanguageLevelTypeAware(["8.0" => "array"], default: "array|false")]
function str_split(string $string, int $length = 1): array|false {}

/**
 * Search a string for any of a set of characters
 * @link https://php.net/manual/en/function.strpbrk.php
 * @param string $string <p>
 * The string where char_list is looked for.
 * </p>
 * @param string $characters <p>
 * This parameter is case sensitive.
 * </p>
 * @return string|false a string starting from the character found, or false if it is
 * not found.
 */
#[Pure]
function strpbrk(
    string $string,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.0')] $char_list = '',
    #[PhpStormStubsElementAvailable(from: '7.1')] string $characters
): string|false {}

/**
 * Binary safe comparison of two strings from an offset, up to length characters
 * @link https://php.net/manual/en/function.substr-compare.php
 * @param string $haystack <p>
 * The main string being compared.
 * </p>
 * @param string $needle <p>
 * The secondary string being compared.
 * </p>
 * @param int $offset <p>
 * The start position for the comparison. If negative, it starts counting
 * from the end of the string.
 * </p>
 * @param int|null $length [optional] <p>
 * The length of the comparison.
 * </p>
 * @param bool $case_insensitive [optional] <p>
 * If case_insensitivity is true, comparison is
 * case insensitive.
 * </p>
 * @return int if less than 0 if main_str from position
 * offset is less than str, &gt;
 * 0 if it is greater than str, and 0 if they are equal.
 * If offset is equal to or greater than the length of
 * main_str or length is set and
 * is less than 1, substr_compare prints a warning and returns
 * false.
 */
#[Pure]
function substr_compare(string $haystack, string $needle, int $offset, ?int $length, bool $case_insensitive = false): int {}

/**
 * Locale based string comparison
 * @link https://php.net/manual/en/function.strcoll.php
 * @param string $string1 <p>
 * The first string.
 * </p>
 * @param string $string2 <p>
 * The second string.
 * </p>
 * @return int if less than 0 if str1 is less than
 * str2; &gt; 0 if
 * str1 is greater than
 * str2, and 0 if they are equal.
 */
#[Pure]
function strcoll(string $string1, string $string2): int {}

/**
 * Formats a number as a currency string
 * @link https://php.net/manual/en/function.money-format.php
 * @param string $format <p>
 * The format specification consists of the following sequence:<br>
 * a % character</p>
 * @param float $number <p>
 * The number to be formatted.
 * </p>
 * @return string|null the formatted string. Characters before and after the formatting
 * string will be returned unchanged.
 * Non-numeric number causes returning null and
 * emitting E_WARNING.
 * @removed 8.0
 * @see NumberFormatter
 */
#[Deprecated(reason: 'Use the NumberFormatter functionality', since: '7.4')]
function money_format(string $format, float $number): ?string {}

/**
 * Return part of a string
 * @link https://php.net/manual/en/function.substr.php
 * @param string $string <p>
 * The input string.
 * </p>
 * @param int $offset <p>
 * If start is non-negative, the returned string
 * will start at the start'th position in
 * string, counting from zero. For instance,
 * in the string 'abcdef', the character at
 * position 0 is 'a', the
 * character at position 2 is
 * 'c', and so forth.
 * </p>
 * <p>
 * If start is negative, the returned string
 * will start at the start'th character
 * from the end of string.
 * </p>
 * <p>
 * If string is less than or equal to
 * start characters long, false will be returned.
 * </p>
 * <p>
 * Using a negative start
 * </p>
 * <pre>
 * <?php
 * $rest = substr("abcdef", -1);    // returns "f"
 * $rest = substr("abcdef", -2);    // returns "ef"
 * $rest = substr("abcdef", -3, 1); // returns "d"
 * ?>
 * </pre>
 * @param int|null $length [optional] <p>
 * If length is given and is positive, the string
 * returned will contain at most length characters
 * beginning from start (depending on the length of
 * string).
 * </p>
 * <p>
 * If length is given and is negative, then that many
 * characters will be omitted from the end of string
 * (after the start position has been calculated when a
 * start is negative). If
 * start denotes a position beyond this truncation,
 * an empty string will be returned.
 * </p>
 * <p>
 * If length is given and is 0,
 * false or null an empty string will be returned.
 * </p>
 * Using a negative length:
 * <pre>
 * <?php
 * $rest = substr("abcdef", 0, -1);  // returns "abcde"
 * $rest = substr("abcdef", 2, -1);  // returns "cde"
 * $rest = substr("abcdef", 4, -4);  // returns false
 * $rest = substr("abcdef", -3, -1); // returns "de"
 * ?>
 * </pre>
 * @return string|false the extracted part of string or false on failure.
 */
#[Pure]
#[LanguageLevelTypeAware(["8.0" => "string"], default: "string|false")]
function substr(string $string, int $offset, ?int $length) {}

/**
 * Replace text within a portion of a string
 * @link https://php.net/manual/en/function.substr-replace.php
 * @param string[]|string $string <p>
 * The input string.
 * </p>
 * @param string[]|string $replace <p>
 * The replacement string.
 * </p>
 * @param int[]|int $offset <p>
 * If start is positive, the replacing will
 * begin at the start'th offset into
 * string.
 * </p>
 * <p>
 * If start is negative, the replacing will
 * begin at the start'th character from the
 * end of string.
 * </p>
 * @param int[]|int $length [optional] <p>
 * If given and is positive, it represents the length of the portion of
 * string which is to be replaced. If it is
 * negative, it represents the number of characters from the end of
 * string at which to stop replacing. If it
 * is not given, then it will default to strlen(
 * string ); i.e. end the replacing at the
 * end of string. Of course, if
 * length is zero then this function will have the
 * effect of inserting replacement into
 * string at the given
 * start offset.
 * </p>
 * @return string|string[] The result string is returned. If string is an
 * array then array is returned.
 */
#[Pure]
function substr_replace(array|string $string, array|string $replace, array|int $offset, array|int|null $length = null): array|string {}

/**
 * Quote meta characters
 * @link https://php.net/manual/en/function.quotemeta.php
 * @param string $string <p>
 * The input string.
 * </p>
 * @return string the string with meta characters quoted.
 */
#[Pure]
function quotemeta(string $string): string {}

/**
 * Make a string's first character uppercase
 * @link https://php.net/manual/en/function.ucfirst.php
 * @param string $string <p>
 * The input string.
 * </p>
 * @return string the resulting string.
 */
#[Pure]
function ucfirst(string $string): string {}

/**
 * Make a string's first character lowercase
 * @link https://php.net/manual/en/function.lcfirst.php
 * @param string $string <p>
 * The input string.
 * </p>
 * @return string the resulting string.
 */
#[Pure]
function lcfirst(string $string): string {}

/**
 * Uppercase the first character of each word in a string
 * @link https://php.net/manual/en/function.ucwords.php
 * @param string $string <p>
 * The input string.
 * </p>
 * @param string $separators [optional] <p>
 * The optional separators contains the word separator characters.
 * </p>
 * @return string the modified string.
 */
#[Pure]
function ucwords(string $string, string $separators = " \t\r\n\f\v"): string {}

/**
 * Translate characters or replace substrings
 * @link https://php.net/manual/en/function.strtr.php
 * @param string $string <p>
 * The string being translated.
 * </p>
 * @param string $from <p>
 * The string replacing from.
 * </p>
 * @param string $to <p>
 * The string being translated to to.
 * </p>
 * @return string This function returns a copy of str,
 * translating all occurrences of each character in
 * from to the corresponding character in
 * to.
 */
#[Pure]
function strtr(string $string, string $from, string $to): string {}

/**
 * Translate certain characters
 * @link https://php.net/manual/en/function.strtr.php
 * @param string $str The string being translated.
 * @param array $replace_pairs The replace_pairs parameter may be used as a substitute for to and from in which case it's an array in the form array('from' => 'to', ...).
 * @return string A copy of str, translating all occurrences of each character in from to the corresponding character in to.
 */
#[Pure]
function strtr(string $str, array $replace_pairs): string {}

/**
 * Quote string with slashes
 * @link https://php.net/manual/en/function.addslashes.php
 * @param string $string <p>
 * The string to be escaped.
 * </p>
 * @return string the escaped string.
 */
#[Pure]
function addslashes(string $string): string {}

/**
 * Quote string with slashes in a C style
 * @link https://php.net/manual/en/function.addcslashes.php
 * @param string $string <p>
 * The string to be escaped.
 * </p>
 * @param string $characters <p>
 * A list of characters to be escaped. If
 * charlist contains characters
 * \n, \r etc., they are
 * converted in C-like style, while other non-alphanumeric characters
 * with ASCII codes lower than 32 and higher than 126 converted to
 * octal representation.
 * </p>
 * <p>
 * When you define a sequence of characters in the charlist argument
 * make sure that you know what characters come between the
 * characters that you set as the start and end of the range.
 * </p>
 * <pre>
 * <?php
 * echo addcslashes('foo[ ]', 'A..z');
 * // output:  \f\o\o\[ \]
 * // All upper and lower-case letters will be escaped
 * // ... but so will the [\]^_`
 * ?>
 * </pre>
 * <p>
 * Also, if the first character in a range has a higher ASCII value
 * than the second character in the range, no range will be
 * constructed. Only the start, end and period characters will be
 * escaped. Use the ord function to find the
 * ASCII value for a character.
 * </p>
 * <pre>
 * <?php
 * echo addcslashes("zoo['.']", 'z..A');
 * // output:  \zoo['\.']
 * ?>
 * </pre>
 * <p>
 * Be careful if you choose to escape characters 0, a, b, f, n, r,
 * t and v. They will be converted to \0, \a, \b, \f, \n, \r, \t
 * and \v.
 * In PHP \0 (NULL), \r (carriage return), \n (newline), \f (form feed),
 * \v (vertical tab) and \t (tab) are predefined escape sequences,
 * while in C all of these are predefined escape sequences.
 * </p>
 * @return string the escaped string.
 */
#[Pure]
function addcslashes(string $string, string $characters): string {}

/**
 * Strip whitespace (or other characters) from the end of a string.
 * Without the second parameter, rtrim() will strip these characters:
 * <ul>
 * <li>" " (ASCII 32 (0x20)), an ordinary space.
 * <li>"\t" (ASCII 9 (0x09)), a tab.
 * <li>"\n" (ASCII 10 (0x0A)), a new line (line feed).
 * <li>"\r" (ASCII 13 (0x0D)), a carriage return.
 * <li>"\0" (ASCII 0 (0x00)), the NUL-byte.
 * <li>"\x0B" (ASCII 11 (0x0B)), a vertical tab.
 * </ul>
 * @link https://php.net/manual/en/function.rtrim.php
 * @param string $string <p>
 * The input string.
 * </p>
 * @param string $characters [optional] <p>
 * You can also specify the characters you want to strip, by means
 * of the charlist parameter.
 * Simply list all characters that you want to be stripped. With
 * .. you can specify a range of characters.
 * </p>
 * @return string the modified string.
 */
#[Pure]
function rtrim(string $string, string $characters = " \t\n\r\0\x0B"): string {}

/**
 * Replace all occurrences of the search string with the replacement string
 * @link https://php.net/manual/en/function.str-replace.php
 * @param string|string[] $search <p>
 * The value being searched for, otherwise known as the needle.
 * An array may be used to designate multiple needles.
 * </p>
 * @param string|string[] $replace <p>
 * The replacement value that replaces found search
 * values. An array may be used to designate multiple replacements.
 * </p>
 * @param string|string[] $subject <p>
 * The string or array being searched and replaced on,
 * otherwise known as the haystack.
 * </p>
 * <p>
 * If subject is an array, then the search and
 * replace is performed with every entry of
 * subject, and the return value is an array as
 * well.
 * </p>
 * @param int &$count [optional] If passed, this will hold the number of matched and replaced needles.
 * @return string|string[] This function returns a string or an array with the replaced values.
 */
function str_replace(array|string $search, array|string $replace, array|string $subject, &$count): array|string {}

/**
 * Case-insensitive version of <function>str_replace</function>.
 * @link https://php.net/manual/en/function.str-ireplace.php
 * @param mixed $search <p>
 * Every replacement with search array is
 * performed on the result of previous replacement.
 * </p>
 * @param array|string $replace <p>
 * </p>
 * @param array|string $subject <p>
 * If subject is an array, then the search and
 * replace is performed with every entry of
 * subject, and the return value is an array as
 * well.
 * </p>
 * @param int &$count [optional] <p>
 * The number of matched and replaced needles will
 * be returned in count which is passed by
 * reference.
 * </p>
 * @return string|string[] a string or an array of replacements.
 */
function str_ireplace(array|string $search, array|string $replace, array|string $subject, &$count): array|string {}

/**
 * Repeat a string
 * @link https://php.net/manual/en/function.str-repeat.php
 * @param string $string <p>
 * The string to be repeated.
 * </p>
 * @param int $times <p>
 * Number of time the input string should be
 * repeated.
 * </p>
 * <p>
 * multiplier has to be greater than or equal to 0.
 * If the multiplier is set to 0, the function
 * will return an empty string.
 * </p>
 * @return string the repeated string.
 */
#[Pure]
function str_repeat(string $string, int $times): string {}

/**
 * Return information about characters used in a string
 * @link https://php.net/manual/en/function.count-chars.php
 * @param string $string <p>
 * The examined string.
 * </p>
 * @param int $mode <p>
 * See return values.
 * </p>
 * @return int[]|string Depending on mode
 * count_chars returns one of the following:
 * 0 - an array with the byte-value as key and the frequency of
 * every byte as value.
 * 1 - same as 0 but only byte-values with a frequency greater
 * than zero are listed.
 * 2 - same as 0 but only byte-values with a frequency equal to
 * zero are listed.
 * 3 - a string containing all unique characters is returned.
 * 4 - a string containing all not used characters is returned.
 */
#[Pure]
function count_chars(string $string, int $mode = 0): array|string {}

/**
 * Split a string into smaller chunks
 * @link https://php.net/manual/en/function.chunk-split.php
 * @param string $string <p>
 * The string to be chunked.
 * </p>
 * @param int $length [optional] <p>
 * The chunk length.
 * </p>
 * @param string $separator [optional] <p>
 * The line ending sequence.
 * </p>
 * @return string the chunked string.
 */
#[Pure]
function chunk_split(string $string, int $length = 76, string $separator = "\r\n"): string {}

/**
 * Strip whitespace (or other characters) from the beginning and end of a string
 * @link https://php.net/manual/en/function.trim.php
 * @param string $string <p>
 * The string that will be trimmed.
 * </p>
 * @param string $characters [optional] <p>
 * Optionally, the stripped characters can also be specified using
 * the charlist parameter.
 * Simply list all characters that you want to be stripped. With
 * .. you can specify a range of characters.
 * </p>
 * @return string The trimmed string.
 */
#[Pure]
function trim(string $string, string $characters = " \t\n\r\0\x0B"): string {}

/**
 * Strip whitespace (or other characters) from the beginning of a string
 * @link https://php.net/manual/en/function.ltrim.php
 * @param string $string <p>
 * The input string.
 * </p>
 * @param string $characters [optional] <p>
 * You can also specify the characters you want to strip, by means of the
 * charlist parameter.
 * Simply list all characters that you want to be stripped. With
 * .. you can specify a range of characters.
 * </p>
 * @return string This function returns a string with whitespace stripped from the
 * beginning of str.
 * Without the second parameter,
 * ltrim will strip these characters:
 * " " (ASCII 32
 * (0x20)), an ordinary space.
 * "\t" (ASCII 9
 * (0x09)), a tab.
 * "\n" (ASCII 10
 * (0x0A)), a new line (line feed).
 * "\r" (ASCII 13
 * (0x0D)), a carriage return.
 * "\0" (ASCII 0
 * (0x00)), the NUL-byte.
 * "\x0B" (ASCII 11
 * (0x0B)), a vertical tab.
 */
#[Pure]
function ltrim(string $string, string $characters = " \t\n\r\0\x0B"): string {}

/**
 * Strip HTML and PHP tags from a string
 * @link https://php.net/manual/en/function.strip-tags.php
 * @param string $string <p>
 * The input string.
 * </p>
 * @param string[]|string|null $allowed_tags [optional] <p>
 * You can use the optional second parameter to specify tags which should
 * not be stripped.
 * </p>
 * <p>
 * HTML comments and PHP tags are also stripped. This is hardcoded and
 * can not be changed with allowable_tags.
 * </p>
 * @return string the stripped string.
 */
#[Pure]
function strip_tags(string $string, #[LanguageLevelTypeAware(["7.4" => "string[]|string|null"], default: "string|null")] $allowed_tags = null): string {}

/**
 * Calculate the similarity between two strings
 * @link https://php.net/manual/en/function.similar-text.php
 * @param string $string1 <p>
 * The first string.
 * </p>
 * @param string $string2 <p>
 * The second string.
 * </p>
 * @param float &$percent [optional] <p>
 * By passing a reference as third argument,
 * similar_text will calculate the similarity in
 * percent for you.
 * </p>
 * @return int the number of matching chars in both strings.
 */
function similar_text(string $string1, string $string2, &$percent): int {}

/**
 * Split a string by a string
 * @link https://php.net/manual/en/function.explode.php
 * @param string $separator <p>
 * The boundary string.
 * </p>
 * @param string $string <p>
 * The input string.
 * </p>
 * @param int $limit [optional] <p>
 * If limit is set and positive, the returned array will contain
 * a maximum of limit elements with the last
 * element containing the rest of string.
 * </p>
 * <p>
 * If the limit parameter is negative, all components
 * except the last -limit are returned.
 * </p>
 * <p>
 * If the limit parameter is zero, then this is treated as 1.
 * </p>
 * @return string[]|false If delimiter is an empty string (""),
 * explode will return false.
 * If delimiter contains a value that is not
 * contained in string and a negative
 * limit is used, then an empty array will be
 * returned. For any other limit, an array containing
 * string will be returned.
 */
#[Pure]
#[LanguageLevelTypeAware(["8.0" => "string[]"], default: "string[]|false")]
function explode(string $separator, string $string, int $limit) {}

/**
 * Join array elements with a string
 * @link https://php.net/manual/en/function.implode.php
 * @param array|string  $separator [optional]<p>
 * Defaults to an empty string. This is not the preferred usage of
 * implode as glue would be
 * the second parameter and thus, the bad prototype would be used.
 * </p>
 * @param array|null $array <p>
 * The array of strings to implode.
 * </p>
 * @return string a string containing a string representation of all the array
 * elements in the same order, with the glue string between each element.
 */
#[Pure]
function implode(array|string $separator = "", ?array $array): string {}

/**
 * Alias:
 * {@see implode}
 * @link https://php.net/manual/en/function.join.php
 * @param array|string  $separator [optional] <p>
 * Defaults to an empty string. This is not the preferred usage of
 * implode as glue would be
 * the second parameter and thus, the bad prototype would be used.
 * </p>
 * @param array|null $array <p>
 * The array of strings to implode.
 * </p>
 * @return string a string containing a string representation of all the array
 * elements in the same order, with the glue string between each element.
 */
#[Pure]
function join(array|string $separator = "", ?array $array): string {}

/**
 * Set locale information
 * @link https://php.net/manual/en/function.setlocale.php
 * @param int $category <p>
 * <em>category</em> is a named constant specifying the
 * category of the functions affected by the locale setting:
 * </p><ul>
 * <li>
 * <b>LC_ALL</b> for all of the below
 * </li>
 * <li>
 * <b>LC_COLLATE</b> for string comparison, see
 * {@see strcoll()}
 * </li>
 * <li>
 * <b>LC_CTYPE</b> for character classification and conversion, for
 * example {@see strtoupper()}
 * </li>
 * <li>
 * <b>LC_MONETARY</b> for {@see localeconv()}
 * </li>
 * <li>
 * <b>LC_NUMERIC</b> for decimal separator (See also
 * {@see localeconv()})
 * </li>
 * <li>
 * <b>LC_TIME</b> for date and time formatting with
 * {@see strftime()}
 *
 * </li>
 * <li>
 * <b>LC_MESSAGES</B> for system responses (available if PHP was compiled with
 * <em>libintl</em>)
 *
 * </li>
 * </ul>
 * @param string|string[]|int $locales <p>
 * If locale is null or the empty string
 * "", the locale names will be set from the
 * values of environment variables with the same names as the above
 * categories, or from "LANG".
 * </p>
 * <p>
 * If locale is "0",
 * the locale setting is not affected, only the current setting is returned.
 * </p>
 * <p>
 * If locale is an array or followed by additional
 * parameters then each array element or parameter is tried to be set as
 * new locale until success. This is useful if a locale is known under
 * different names on different systems or for providing a fallback
 * for a possibly not available locale.
 * </p>
 * @param string|string[] ...$rest
 * @return string|false <p>the new current locale, or false if the locale functionality is
 * not implemented on your platform, the specified locale does not exist or
 * the category name is invalid.
 * </p>
 * <p>
 * An invalid category name also causes a warning message. Category/locale
 * names can be found in RFC 1766
 * and ISO 639.
 * Different systems have different naming schemes for locales.
 * </p>
 * <p>
 * The return value of setlocale depends
 * on the system that PHP is running. It returns exactly
 * what the system setlocale function returns.</p>
 */
function setlocale(
    #[ExpectedValues([LC_ALL,  LC_COLLATE,  LC_CTYPE,  LC_MONETARY,  LC_NUMERIC,  LC_TIME,  LC_MESSAGES])] int $category,
    #[PhpStormStubsElementAvailable(from: '8.0')] $locales,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $rest,
    ...$rest
): string|false {}

/**
 * Get numeric formatting information
 * @link https://php.net/manual/en/function.localeconv.php
 * @return array localeconv returns data based upon the current locale
 * as set by setlocale. The associative array that is
 * returned contains the following fields:
 * <tr valign="top">
 * <td>Array element</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>decimal_point</td>
 * <td>Decimal point character</td>
 * </tr>
 * <tr valign="top">
 * <td>thousands_sep</td>
 * <td>Thousands separator</td>
 * </tr>
 * <tr valign="top">
 * <td>grouping</td>
 * <td>Array containing numeric groupings</td>
 * </tr>
 * <tr valign="top">
 * <td>int_curr_symbol</td>
 * <td>International currency symbol (i.e. USD)</td>
 * </tr>
 * <tr valign="top">
 * <td>currency_symbol</td>
 * <td>Local currency symbol (i.e. $)</td>
 * </tr>
 * <tr valign="top">
 * <td>mon_decimal_point</td>
 * <td>Monetary decimal point character</td>
 * </tr>
 * <tr valign="top">
 * <td>mon_thousands_sep</td>
 * <td>Monetary thousands separator</td>
 * </tr>
 * <tr valign="top">
 * <td>mon_grouping</td>
 * <td>Array containing monetary groupings</td>
 * </tr>
 * <tr valign="top">
 * <td>positive_sign</td>
 * <td>Sign for positive values</td>
 * </tr>
 * <tr valign="top">
 * <td>negative_sign</td>
 * <td>Sign for negative values</td>
 * </tr>
 * <tr valign="top">
 * <td>int_frac_digits</td>
 * <td>International fractional digits</td>
 * </tr>
 * <tr valign="top">
 * <td>frac_digits</td>
 * <td>Local fractional digits</td>
 * </tr>
 * <tr valign="top">
 * <td>p_cs_precedes</td>
 * <td>
 * true if currency_symbol precedes a positive value, false
 * if it succeeds one
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>p_sep_by_space</td>
 * <td>
 * true if a space separates currency_symbol from a positive
 * value, false otherwise
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>n_cs_precedes</td>
 * <td>
 * true if currency_symbol precedes a negative value, false
 * if it succeeds one
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>n_sep_by_space</td>
 * <td>
 * true if a space separates currency_symbol from a negative
 * value, false otherwise
 * </td>
 * </tr>
 * <td>p_sign_posn</td>
 * <td>
 * 0 - Parentheses surround the quantity and currency_symbol
 * 1 - The sign string precedes the quantity and currency_symbol
 * 2 - The sign string succeeds the quantity and currency_symbol
 * 3 - The sign string immediately precedes the currency_symbol
 * 4 - The sign string immediately succeeds the currency_symbol
 * </td>
 * </tr>
 * <td>n_sign_posn</td>
 * <td>
 * 0 - Parentheses surround the quantity and currency_symbol
 * 1 - The sign string precedes the quantity and currency_symbol
 * 2 - The sign string succeeds the quantity and currency_symbol
 * 3 - The sign string immediately precedes the currency_symbol
 * 4 - The sign string immediately succeeds the currency_symbol
 * </td>
 * </tr>
 * </p>
 * <p>
 * The p_sign_posn, and n_sign_posn contain a string
 * of formatting options. Each number representing one of the above listed conditions.
 * </p>
 * <p>
 * The grouping fields contain arrays that define the way numbers should be
 * grouped. For example, the monetary grouping field for the nl_NL locale (in
 * UTF-8 mode with the euro sign), would contain a 2 item array with the
 * values 3 and 3. The higher the index in the array, the farther left the
 * grouping is. If an array element is equal to CHAR_MAX,
 * no further grouping is done. If an array element is equal to 0, the previous
 * element should be used.
 */
#[ArrayShape(["decimal_point" => "string", "thousands_sep" => "string", "grouping" => "array", "int_curr_symbol" => "string", "currency_symbol" => "string", "mon_decimal_point" => "string", "mon_thousands_sep" => "string", "mon_grouping" => "string", "positive_sign" => "string", "negative_sign" => "string", "int_frac_digits" => "string", "frac_digits" => "string", "p_cs_precedes" => "bool", "p_sep_by_space" => "bool", "n_cs_precedes" => "bool", "n_sep_by_space" => "bool", "p_sign_posn" => "int", "n_sign_posn" => "int"])]
#[Pure(true)]
function localeconv(): array {}
<?php

// Start of standard v.5.3.1-0.dotdeb.1

define('CONNECTION_ABORTED', 1);
define('CONNECTION_NORMAL', 0);
define('CONNECTION_TIMEOUT', 2);
define('INI_USER', 1);
define('INI_PERDIR', 2);
define('INI_SYSTEM', 4);
define('INI_ALL', 7);

/**
 * Normal INI scanner mode
 * @link https://php.net/manual/en/filesystem.constants.php
 */
define('INI_SCANNER_NORMAL', 0);

/**
 * Typed INI scanner mode
 * @since 5.6.1
 * @link https://php.net/manual/en/function.parse-ini-file.php
 */
define('INI_SCANNER_TYPED', 2);

/**
 * Raw INI scanner mode
 * @link https://php.net/manual/en/filesystem.constants.php
 */
define('INI_SCANNER_RAW', 1);

define('PHP_URL_SCHEME', 0);
define('PHP_URL_HOST', 1);
define('PHP_URL_PORT', 2);
define('PHP_URL_USER', 3);
define('PHP_URL_PASS', 4);
define('PHP_URL_PATH', 5);
define('PHP_URL_QUERY', 6);
define('PHP_URL_FRAGMENT', 7);

/**
 * <i>e</i> constant
 */
define('M_E', 2.718281828459);

/**
 * {@link log}<sub>2</sub><i>e</i> constant
 */
define('M_LOG2E', 1.442695040889);

/**
 * {@link log}<sub>10</sub><i>e</i> constant
 */
define('M_LOG10E', 0.43429448190325);

/**
 * {@link log}<sub><i>e</i></sub>2 constant
 */
define('M_LN2', 0.69314718055995);

/**
 * {@link log}<sub><i>e</i></sub>10 constant
 */
define('M_LN10', 2.302585092994);

/**
 * &pi; constant
 */
define('M_PI', 3.1415926535898);

/**
 * &pi;/2 constant
 */
define('M_PI_2', 1.5707963267949);

/**
 * &pi;/4 constant
 */
define('M_PI_4', 0.78539816339745);

/**
 * 1/&pi; constant
 */
define('M_1_PI', 0.31830988618379);

/**
 * 2/&pi; constant
 */
define('M_2_PI', 0.63661977236758);

/**
 * {@link sqrt}(&pi;) constant
 */
define('M_SQRTPI', 1.7724538509055);

/**
 * 2/{@link sqrt}(&pi;) constant
 */
define('M_2_SQRTPI', 1.1283791670955);

/**
 * {@link log}<sub><i>e</i></sub>&pi; constant
 */
define('M_LNPI', 1.1447298858494);

/**
 * Euler constant
 */
define('M_EULER', 0.57721566490153);

/**
 * {@link sqrt}(2) constant
 */
define('M_SQRT2', 1.4142135623731);

/**
 * 1/{@link sqrt}(2) constant
 */
define('M_SQRT1_2', 0.70710678118655);

/**
 * {@link sqrt}(3) constant
 */
define('M_SQRT3', 1.7320508075689);

/**
 * The infinite
 */
define('INF', (float)INF);

/**
 * Not A Number
 */
define('NAN', (float)NAN);

/**
 * Round halves up
 * @link https://php.net/manual/en/math.constants.php
 */
define('PHP_ROUND_HALF_UP', 1);

/**
 * Round halves down
 * @link https://php.net/manual/en/math.constants.php
 */
define('PHP_ROUND_HALF_DOWN', 2);

/**
 * Round halves to even numbers
 * @link https://php.net/manual/en/math.constants.php
 */
define('PHP_ROUND_HALF_EVEN', 3);

/**
 * Round halves to odd numbers
 * @link https://php.net/manual/en/math.constants.php
 */
define('PHP_ROUND_HALF_ODD', 4);
define('INFO_GENERAL', 1);

/**
 * PHP Credits. See also phpcredits.
 * @link https://php.net/manual/en/info.constants.php
 */
define('INFO_CREDITS', 2);

/**
 * Current Local and Main values for PHP directives. See
 * also ini_get.
 * @link https://php.net/manual/en/info.constants.php
 */
define('INFO_CONFIGURATION', 4);

/**
 * Loaded modules and their respective settings.
 * @link https://php.net/manual/en/info.constants.php
 */
define('INFO_MODULES', 8);

/**
 * Environment Variable information that's also available in
 * $_ENV.
 * @link https://php.net/manual/en/info.constants.php
 */
define('INFO_ENVIRONMENT', 16);

/**
 * Shows all
 * predefined variables from EGPCS (Environment, GET,
 * POST, Cookie, Server).
 * @link https://php.net/manual/en/info.constants.php
 */
define('INFO_VARIABLES', 32);

/**
 * PHP License information. See also the license faq.
 * @link https://php.net/manual/en/info.constants.php
 */
define('INFO_LICENSE', 64);
define('INFO_ALL', 4294967295);

/**
 * A list of the core developers
 * @link https://php.net/manual/en/info.constants.php
 */
define('CREDITS_GROUP', 1);

/**
 * General credits: Language design and concept, PHP
 * authors and SAPI module.
 * @link https://php.net/manual/en/info.constants.php
 */
define('CREDITS_GENERAL', 2);

/**
 * A list of the server API modules for PHP, and their authors.
 * @link https://php.net/manual/en/info.constants.php
 */
define('CREDITS_SAPI', 4);

/**
 * A list of the extension modules for PHP, and their authors.
 * @link https://php.net/manual/en/info.constants.php
 */
define('CREDITS_MODULES', 8);

/**
 * The credits for the documentation team.
 * @link https://php.net/manual/en/info.constants.php
 */
define('CREDITS_DOCS', 16);

/**
 * Usually used in combination with the other flags. Indicates
 * that a complete stand-alone HTML page needs to be
 * printed including the information indicated by the other
 * flags.
 * @link https://php.net/manual/en/info.constants.php
 */
define('CREDITS_FULLPAGE', 32);

/**
 * The credits for the quality assurance team.
 * @link https://php.net/manual/en/info.constants.php
 */
define('CREDITS_QA', 64);

/**
 * The configuration line, "php.ini" location, build date, Web
 * Server, System and more.
 * @link https://php.net/manual/en/info.constants.php
 */
define('CREDITS_ALL', 4294967295);
define('HTML_SPECIALCHARS', 0);
define('HTML_ENTITIES', 1);

/**
 * Will convert double-quotes and leave single-quotes alone.
 * @link https://php.net/manual/en/function.htmlspecialchars.php
 */
define('ENT_COMPAT', 2);

/**
 * Will convert both double and single quotes.
 * @link https://php.net/manual/en/function.htmlspecialchars.php
 */
define('ENT_QUOTES', 3);

/**
 * Will leave both double and single quotes unconverted.
 * @link https://php.net/manual/en/function.htmlspecialchars.php
 */
define('ENT_NOQUOTES', 0);

/**
 * Silently discard invalid code unit sequences instead of returning an empty string.
 * Using this flag is discouraged as it may have security implications.
 * @link https://php.net/manual/en/function.htmlspecialchars.php
 */
define('ENT_IGNORE', 4);
define('STR_PAD_LEFT', 0);
define('STR_PAD_RIGHT', 1);
define('STR_PAD_BOTH', 2);
define('PATHINFO_DIRNAME', 1);
define('PATHINFO_BASENAME', 2);
define('PATHINFO_EXTENSION', 4);

/**
 * @link https://php.net/manual/en/filesystem.constants.php
 */
define('PATHINFO_FILENAME', 8);
define('PATHINFO_ALL', 15);
define('CHAR_MAX', 127);
define('LC_CTYPE', 0);
define('LC_NUMERIC', 1);
define('LC_TIME', 2);
define('LC_COLLATE', 3);
define('LC_MONETARY', 4);
define('LC_ALL', 6);
define('LC_MESSAGES', 5);
define('SEEK_SET', 0);
define('SEEK_CUR', 1);
define('SEEK_END', 2);

/**
 * Acquire a shared lock (reader).
 * @link https://www.php.net/manual/en/function.flock.php
 */
define('LOCK_SH', 1);

/**
 * Acquire an exclusive lock (writer).
 * @link https://www.php.net/manual/en/function.flock.php
 */
define('LOCK_EX', 2);

/**
 * Release lock (shared or exclusive).
 * @link https://www.php.net/manual/en/function.flock.php
 */
define('LOCK_UN', 3);

/**
 * Non-blocking operation while locking.
 * @link https://www.php.net/manual/en/function.flock.php
 */
define('LOCK_NB', 4);

/**
 * A connection with an external resource has been established.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_NOTIFY_CONNECT', 2);

/**
 * Additional authorization is required to access the specified resource.
 * Typical issued with severity level of
 * STREAM_NOTIFY_SEVERITY_ERR.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_NOTIFY_AUTH_REQUIRED', 3);

/**
 * Authorization has been completed (with or without success).
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_NOTIFY_AUTH_RESULT', 10);

/**
 * The mime-type of resource has been identified,
 * refer to message for a description of the
 * discovered type.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_NOTIFY_MIME_TYPE_IS', 4);

/**
 * The size of the resource has been discovered.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_NOTIFY_FILE_SIZE_IS', 5);

/**
 * The external resource has redirected the stream to an alternate
 * location. Refer to message.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_NOTIFY_REDIRECTED', 6);

/**
 * Indicates current progress of the stream transfer in
 * bytes_transferred and possibly
 * bytes_max as well.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_NOTIFY_PROGRESS', 7);

/**
 * A generic error occurred on the stream, consult
 * message and message_code
 * for details.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_NOTIFY_FAILURE', 9);

/**
 * There is no more data available on the stream.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_NOTIFY_COMPLETED', 8);

/**
 * A remote address required for this stream has been resolved, or the resolution
 * failed. See severity for an indication of which happened.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_NOTIFY_RESOLVE', 1);

/**
 * Normal, non-error related, notification.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_NOTIFY_SEVERITY_INFO', 0);

/**
 * Non critical error condition. Processing may continue.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_NOTIFY_SEVERITY_WARN', 1);

/**
 * A critical error occurred. Processing cannot continue.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_NOTIFY_SEVERITY_ERR', 2);

/**
 * Used with stream_filter_append and
 * stream_filter_prepend to indicate
 * that the specified filter should only be applied when
 * reading
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_FILTER_READ', 1);

/**
 * Used with stream_filter_append and
 * stream_filter_prepend to indicate
 * that the specified filter should only be applied when
 * writing
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_FILTER_WRITE', 2);

/**
 * This constant is equivalent to
 * STREAM_FILTER_READ | STREAM_FILTER_WRITE
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_FILTER_ALL', 3);

/**
 * Client socket opened with stream_socket_client
 * should remain persistent between page loads.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_CLIENT_PERSISTENT', 1);

/**
 * Open client socket asynchronously. This option must be used
 * together with the STREAM_CLIENT_CONNECT flag.
 * Used with stream_socket_client.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_CLIENT_ASYNC_CONNECT', 2);

/**
 * Open client socket connection. Client sockets should always
 * include this flag. Used with stream_socket_client.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_CLIENT_CONNECT', 4);

/**
 * Used with stream_socket_shutdown to disable
 * further receptions.
 * @since 5.2.1
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_SHUT_RD', 0);

/**
 * Used with stream_socket_shutdown to disable
 * further transmissions.
 * @since 5.2.1
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_SHUT_WR', 1);

/**
 * Used with stream_socket_shutdown to disable
 * further receptions and transmissions.
 * @since 5.2.1
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_SHUT_RDWR', 2);

/**
 * Internet Protocol Version 4 (IPv4).
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_PF_INET', 2);

/**
 * Internet Protocol Version 6 (IPv6).
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_PF_INET6', 10);

/**
 * Unix system internal protocols.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_PF_UNIX', 1);

/**
 * Provides a IP socket.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_IPPROTO_IP', 0);

/**
 * Provides a TCP socket.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_IPPROTO_TCP', 6);

/**
 * Provides a UDP socket.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_IPPROTO_UDP', 17);

/**
 * Provides a ICMP socket.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_IPPROTO_ICMP', 1);

/**
 * Provides a RAW socket.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_IPPROTO_RAW', 255);

/**
 * Provides sequenced, two-way byte streams with a transmission mechanism
 * for out-of-band data (TCP, for example).
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_SOCK_STREAM', 1);

/**
 * Provides datagrams, which are connectionless messages (UDP, for
 * example).
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_SOCK_DGRAM', 2);

/**
 * Provides a raw socket, which provides access to internal network
 * protocols and interfaces. Usually this type of socket is just available
 * to the root user.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_SOCK_RAW', 3);

/**
 * Provides a sequenced packet stream socket.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_SOCK_SEQPACKET', 5);

/**
 * Provides a RDM (Reliably-delivered messages) socket.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_SOCK_RDM', 4);
define('STREAM_PEEK', 2);
define('STREAM_OOB', 1);

/**
 * Tells a stream created with stream_socket_server
 * to bind to the specified target. Server sockets should always include this flag.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_SERVER_BIND', 4);

/**
 * Tells a stream created with stream_socket_server
 * and bound using the STREAM_SERVER_BIND flag to start
 * listening on the socket. Connection-orientated transports (such as TCP)
 * must use this flag, otherwise the server socket will not be enabled.
 * Using this flag for connect-less transports (such as UDP) is an error.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_SERVER_LISTEN', 8);

/**
 * Search for filename in include_path
 * @link https://php.net/manual/en/filesystem.constants.php
 */
define('FILE_USE_INCLUDE_PATH', 1);

/**
 * Strip EOL characters
 * @link https://php.net/manual/en/filesystem.constants.php
 */
define('FILE_IGNORE_NEW_LINES', 2);

/**
 * Skip empty lines
 * @link https://php.net/manual/en/filesystem.constants.php
 */
define('FILE_SKIP_EMPTY_LINES', 4);

/**
 * Append content to existing file.
 * @link https://php.net/manual/en/filesystem.constants.php
 */
define('FILE_APPEND', 8);
define('FILE_NO_DEFAULT_CONTEXT', 16);

/**
 * <p>
 * This constant has no effect prior to PHP 6. It is only available for
 * forward compatibility.
 * </p>
 * @since 5.2.7
 * @link https://php.net/manual/en/filesystem.constants.php
 * @deprecated 8.1
 */
define('FILE_TEXT', 0);

/**
 * <p>
 * This constant has no effect prior to PHP 6. It is only available for
 * forward compatibility.
 * </p>
 * @since 5.2.7
 * @link https://php.net/manual/en/filesystem.constants.php
 * @deprecated 8.1
 */
define('FILE_BINARY', 0);

/**
 * Disable backslash escaping.
 * @link https://php.net/manual/en/filesystem.constants.php
 */
define('FNM_NOESCAPE', 2);

/**
 * Slash in string only matches slash in the given pattern.
 * @link https://php.net/manual/en/filesystem.constants.php
 */
define('FNM_PATHNAME', 1);

/**
 * Leading period in string must be exactly matched by period in the given pattern.
 * @link https://php.net/manual/en/filesystem.constants.php
 */
define('FNM_PERIOD', 4);

/**
 * Caseless match. Part of the GNU extension.
 * @link https://php.net/manual/en/filesystem.constants.php
 */
define('FNM_CASEFOLD', 16);

/**
 * Return Code indicating that the
 * userspace filter returned buckets in $out.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('PSFS_PASS_ON', 2);

/**
 * Return Code indicating that the
 * userspace filter did not return buckets in $out
 * (i.e. No data available).
 * @link https://php.net/manual/en/stream.constants.php
 */
define('PSFS_FEED_ME', 1);

/**
 * Return Code indicating that the
 * userspace filter encountered an unrecoverable error
 * (i.e. Invalid data received).
 * @link https://php.net/manual/en/stream.constants.php
 */
define('PSFS_ERR_FATAL', 0);

/**
 * Regular read/write.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('PSFS_FLAG_NORMAL', 0);

/**
 * An incremental flush.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('PSFS_FLAG_FLUSH_INC', 1);

/**
 * Final flush prior to closing.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('PSFS_FLAG_FLUSH_CLOSE', 2);
define('ABDAY_1', 131072);
define('ABDAY_2', 131073);
define('ABDAY_3', 131074);
define('ABDAY_4', 131075);
define('ABDAY_5', 131076);
define('ABDAY_6', 131077);
define('ABDAY_7', 131078);
define('DAY_1', 131079);
define('DAY_2', 131080);
define('DAY_3', 131081);
define('DAY_4', 131082);
define('DAY_5', 131083);
define('DAY_6', 131084);
define('DAY_7', 131085);
define('ABMON_1', 131086);
define('ABMON_2', 131087);
define('ABMON_3', 131088);
define('ABMON_4', 131089);
define('ABMON_5', 131090);
define('ABMON_6', 131091);
define('ABMON_7', 131092);
define('ABMON_8', 131093);
define('ABMON_9', 131094);
define('ABMON_10', 131095);
define('ABMON_11', 131096);
define('ABMON_12', 131097);
define('MON_1', 131098);
define('MON_2', 131099);
define('MON_3', 131100);
define('MON_4', 131101);
define('MON_5', 131102);
define('MON_6', 131103);
define('MON_7', 131104);
define('MON_8', 131105);
define('MON_9', 131106);
define('MON_10', 131107);
define('MON_11', 131108);
define('MON_12', 131109);
define('AM_STR', 131110);
define('PM_STR', 131111);
define('D_T_FMT', 131112);
define('D_FMT', 131113);
define('T_FMT', 131114);
define('T_FMT_AMPM', 131115);
define('ERA', 131116);
define('ERA_D_T_FMT', 131120);
define('ERA_D_FMT', 131118);
define('ERA_T_FMT', 131121);
define('ALT_DIGITS', 131119);
define('CRNCYSTR', 262159);
define('RADIXCHAR', 65536);
define('THOUSEP', 65537);
define('YESEXPR', 327680);
define('NOEXPR', 327681);
define('YESSTR', 327682);
define('NOSTR', 327683);
define('CODESET', 14);
define('CRYPT_SALT_LENGTH', 123);
define('CRYPT_STD_DES', 1);
define('CRYPT_EXT_DES', 1);
define('CRYPT_MD5', 1);
define('CRYPT_BLOWFISH', 1);
define('CRYPT_SHA256', 1);
define('CRYPT_SHA512', 1);
define('DIRECTORY_SEPARATOR', "/");
define('PATH_SEPARATOR', ":");
define('GLOB_BRACE', 1024);
define('GLOB_MARK', 2);
define('GLOB_NOSORT', 4);
define('GLOB_NOCHECK', 16);
define('GLOB_NOESCAPE', 64);
define('GLOB_ERR', 1);
define('GLOB_ONLYDIR', 1073741824);
define('GLOB_AVAILABLE_FLAGS', 1073741911);
define('EXTR_OVERWRITE', 0);
define('EXTR_SKIP', 1);
define('EXTR_PREFIX_SAME', 2);
define('EXTR_PREFIX_ALL', 3);
define('EXTR_PREFIX_INVALID', 4);
define('EXTR_PREFIX_IF_EXISTS', 5);
define('EXTR_IF_EXISTS', 6);
define('EXTR_REFS', 256);

/**
 * SORT_ASC is used with
 * array_multisort to sort in ascending order.
 * @link https://php.net/manual/en/array.constants.php
 */
define('SORT_ASC', 4);

/**
 * SORT_DESC is used with
 * array_multisort to sort in descending order.
 * @link https://php.net/manual/en/array.constants.php
 */
define('SORT_DESC', 3);

/**
 * SORT_REGULAR is used to compare items normally.
 * @link https://php.net/manual/en/array.constants.php
 */
define('SORT_REGULAR', 0);

/**
 * SORT_NUMERIC is used to compare items numerically.
 * @link https://php.net/manual/en/array.constants.php
 */
define('SORT_NUMERIC', 1);

/**
 * SORT_STRING is used to compare items as strings.
 * @link https://php.net/manual/en/array.constants.php
 */
define('SORT_STRING', 2);

/**
 * SORT_LOCALE_STRING is used to compare items as
 * strings, based on the current locale.
 * @since 5.0.2
 * @link https://php.net/manual/en/array.constants.php
 */
define('SORT_LOCALE_STRING', 5);

/**
 * CASE_LOWER is used with
 * array_change_key_case and is used to convert array
 * keys to lower case. This is also the default case for
 * array_change_key_case.
 * @link https://php.net/manual/en/array.constants.php
 */
define('CASE_LOWER', 0);

/**
 * CASE_UPPER is used with
 * array_change_key_case and is used to convert array
 * keys to upper case.
 * @link https://php.net/manual/en/array.constants.php
 */
define('CASE_UPPER', 1);
define('COUNT_NORMAL', 0);
define('COUNT_RECURSIVE', 1);
define('ASSERT_ACTIVE', 1);
define('ASSERT_CALLBACK', 2);
define('ASSERT_BAIL', 3);
define('ASSERT_WARNING', 4);

/**
 * @removed 8.0
 */
define('ASSERT_QUIET_EVAL', 5);
define('ASSERT_EXCEPTION', 5);

/**
 * Flag indicating if the stream used the include path.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_USE_PATH', 1);
define('STREAM_IGNORE_URL', 2);
define('STREAM_ENFORCE_SAFE_MODE', 4);

/**
 * Flag indicating if the wrapper
 * is responsible for raising errors using trigger_error
 * during opening of the stream. If this flag is not set, you
 * should not raise any errors.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_REPORT_ERRORS', 8);

/**
 * This flag is useful when your extension really must be able to randomly
 * seek around in a stream. Some streams may not be seekable in their
 * native form, so this flag asks the streams API to check to see if the
 * stream does support seeking. If it does not, it will copy the stream
 * into temporary storage (which may be a temporary file or a memory
 * stream) which does support seeking.
 * Please note that this flag is not useful when you want to seek the
 * stream and write to it, because the stream you are accessing might
 * not be bound to the actual resource you requested.
 * If the requested resource is network based, this flag will cause the
 * opener to block until the whole contents have been downloaded.
 * @link https://www.php.net/manual/en/stream.constants.php
 */
define('STREAM_MUST_SEEK', 16);
define('STREAM_URL_STAT_LINK', 1);
define('STREAM_URL_STAT_QUIET', 2);
define('STREAM_MKDIR_RECURSIVE', 1);
define('STREAM_IS_URL', 1);
define('STREAM_OPTION_BLOCKING', 1);
define('STREAM_OPTION_READ_TIMEOUT', 4);
define('STREAM_OPTION_READ_BUFFER', 2);
define('STREAM_OPTION_WRITE_BUFFER', 3);
define('STREAM_BUFFER_NONE', 0);
define('STREAM_BUFFER_LINE', 1);
define('STREAM_BUFFER_FULL', 2);

/**
 * Stream casting, when stream_cast is called
 * otherwise (see above).
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_CAST_AS_STREAM', 0);

/**
 * Stream casting, for when stream_select is
 * calling stream_cast.
 * @link https://php.net/manual/en/stream.constants.php
 */
define('STREAM_CAST_FOR_SELECT', 3);

/**
 * Image type constant used by the {@link image_type_to_mime_type()} and {@link image_type_to_extension()} functions.
 * @link https://php.net/manual/en/image.constants.php
 */
define('IMAGETYPE_GIF', 1);

/**
 * Image type constant used by the {@link image_type_to_mime_type()} and {@link image_type_to_extension()} functions.
 * @link https://php.net/manual/en/image.constants.php
 */
define('IMAGETYPE_JPEG', 2);

/**
 * Image type constant used by the {@link image_type_to_mime_type()} and {@link image_type_to_extension()} functions.
 * @link https://php.net/manual/en/image.constants.php
 */
define('IMAGETYPE_PNG', 3);

/**
 * Image type constant used by the {@link image_type_to_mime_type()} and {@link image_type_to_extension()} functions.
 * @link https://php.net/manual/en/image.constants.php
 */
define('IMAGETYPE_SWF', 4);

/**
 * Image type constant used by the {@link image_type_to_mime_type()} and {@link image_type_to_extension()} functions.
 * @link https://php.net/manual/en/image.constants.php
 */
define('IMAGETYPE_PSD', 5);

/**
 * Image type constant used by the {@link image_type_to_mime_type()} and {@link image_type_to_extension()} functions.
 * @link https://php.net/manual/en/image.constants.php
 */
define('IMAGETYPE_BMP', 6);

/**
 * Image type constant used by the {@link image_type_to_mime_type()} and {@link image_type_to_extension()} functions.
 * @link https://php.net/manual/en/image.constants.php
 */
define('IMAGETYPE_TIFF_II', 7);

/**
 * Image type constant used by the {@link image_type_to_mime_type()} and {@link image_type_to_extension()} functions.
 * @link https://php.net/manual/en/image.constants.php
 */
define('IMAGETYPE_TIFF_MM', 8);

/**
 * Image type constant used by the {@link image_type_to_mime_type()} and {@link image_type_to_extension()} functions.
 * @link https://php.net/manual/en/image.constants.php
 */
define('IMAGETYPE_JPC', 9);

/**
 * Image type constant used by the {@link image_type_to_mime_type()} and {@link image_type_to_extension()} functions.
 * @link https://php.net/manual/en/image.constants.php
 */
define('IMAGETYPE_JP2', 10);

/**
 * Image type constant used by the {@link image_type_to_mime_type()} and {@link image_type_to_extension()} functions.
 * @link https://php.net/manual/en/image.constants.php
 */
define('IMAGETYPE_JPX', 11);

/**
 * Image type constant used by the {@link image_type_to_mime_type()} and {@link image_type_to_extension()} functions.
 * @link https://php.net/manual/en/image.constants.php
 */
define('IMAGETYPE_JB2', 12);

/**
 * Image type constant used by the {@link image_type_to_mime_type()} and {@link image_type_to_extension()} functions.
 * @link https://php.net/manual/en/image.constants.php
 */
define('IMAGETYPE_SWC', 13);

/**
 * Image type constant used by the {@link image_type_to_mime_type()} and {@link image_type_to_extension()} functions.
 * @link https://php.net/manual/en/image.constants.php
 */
define('IMAGETYPE_IFF', 14);

/**
 * Image type constant used by the {@link image_type_to_mime_type()} and {@link image_type_to_extension()} functions.
 * @link https://php.net/manual/en/image.constants.php
 */
define('IMAGETYPE_WBMP', 15);

/**
 * Image type constant used by the {@link image_type_to_mime_type()} and {@link image_type_to_extension()} functions.
 * @link https://php.net/manual/en/image.constants.php
 */
define('IMAGETYPE_JPEG2000', 9);

/**
 * Image type constant used by the {@link image_type_to_mime_type()} and {@link image_type_to_extension()} functions.
 * @link https://php.net/manual/en/image.constants.php
 */
define('IMAGETYPE_XBM', 16);

/**
 * Image type constant used by the {@link image_type_to_mime_type()} and {@link image_type_to_extension()} functions.
 * @link https://php.net/manual/en/image.constants.php
 */
define('IMAGETYPE_ICO', 17);

/**
 * Image type constant used by the {@link image_type_to_mime_type()} and {@link image_type_to_extension()} functions.
 * @link https://php.net/manual/en/image.constants.php
 * @since 7.1
 */
define('IMAGETYPE_WEBP', 18);
define('IMAGETYPE_UNKNOWN', 0);
define('IMAGETYPE_COUNT', 20);

/**
 * @since 8.1
 */
define('IMAGETYPE_AVIF', 19);
/**
 * IPv4 Address Resource
 * @link https://php.net/manual/en/network.constants.php
 */
define('DNS_A', 1);

define('DNS_CAA', 8192);

/**
 * Authoritative Name Server Resource
 * @link https://php.net/manual/en/network.constants.php
 */
define('DNS_NS', 2);

/**
 * Alias (Canonical Name) Resource
 * @link https://php.net/manual/en/network.constants.php
 */
define('DNS_CNAME', 16);

/**
 * Start of Authority Resource
 * @link https://php.net/manual/en/network.constants.php
 */
define('DNS_SOA', 32);

/**
 * Pointer Resource
 * @link https://php.net/manual/en/network.constants.php
 */
define('DNS_PTR', 2048);

/**
 * Host Info Resource (See IANA's
 * Operating System Names
 * for the meaning of these values)
 * @link https://php.net/manual/en/network.constants.php
 */
define('DNS_HINFO', 4096);

/**
 * Mail Exchanger Resource
 * @link https://php.net/manual/en/network.constants.php
 */
define('DNS_MX', 16384);

/**
 * Text Resource
 * @link https://php.net/manual/en/network.constants.php
 */
define('DNS_TXT', 32768);
define('DNS_SRV', 33554432);
define('DNS_NAPTR', 67108864);

/**
 * IPv6 Address Resource
 * @link https://php.net/manual/en/network.constants.php
 */
define('DNS_AAAA', 134217728);
define('DNS_A6', 16777216);

/**
 * Any Resource Record. On most systems
 * this returns all resource records, however
 * it should not be counted upon for critical
 * uses. Try DNS_ALL instead.
 * @link https://php.net/manual/en/network.constants.php
 */
define('DNS_ANY', 268435456);

/**
 * Iteratively query the name server for
 * each available record type.
 * @link https://php.net/manual/en/network.constants.php
 */
define('DNS_ALL', 251721779);

// End of standard v.5.3.1-0.dotdeb.1

//WI-11084 Constant not defined PHP_QUERY_RFC3986

/**
 * Encoding is performed per RFC 1738 and the application/x-www-form-urlencoded media type,
 * which implies that spaces are encoded as plus (+) signs.
 * @link https://php.net/manual/en/function.http-build-query.php
 */
define('PHP_QUERY_RFC1738', 1);
/**
 * Encoding is performed according to RFC 3986, and spaces will be percent encoded (%20).
 * @link https://php.net/manual/en/function.http-build-query.php
 */
define('PHP_QUERY_RFC3986', 2);

//WI-11254 Stubs for missing constants from PHP 5.4

/**
 * (PHP4, PHP5)
 * <p>Constant containing either the session name and session ID in the form of "name=ID" or
 * empty string if session ID was set in an appropriate session cookie.
 * This is the same id as the one returned by session_id().</p>
 * @see session_id()
 * @link https://php.net/manual/en/session.constants.php
 */
define('SID', "name=ID");
/**
 * Return value of session_status() if sessions are disabled.
 * @since 5.4
 * @link https://php.net/manual/en/function.session-status.php
 */
define('PHP_SESSION_DISABLED', 0);
/**
 * Return value of session_status() if sessions are enabled, but no session exists.
 * @since 5.4
 * @link https://php.net/manual/en/function.session-status.php
 */
define('PHP_SESSION_NONE', 1);
/**
 * Return value of session_status() if sessions are enabled, and a session exists.
 * @since 5.4
 * @link https://php.net/manual/en/function.session-status.php
 */
define('PHP_SESSION_ACTIVE', 2);

/**
 * Replace invalid code unit sequences with a Unicode Replacement Character
 * U+FFFD (UTF-8) or &#FFFD; (otherwise) instead of returning an empty string.
 * @since 5.4
 * @link https://php.net/manual/en/function.htmlspecialchars.php
 */
define('ENT_SUBSTITUTE', 8);
/**
 * Replace invalid code points for the given document type with
 * a Unicode Replacement Character U+FFFD (UTF-8) or &#FFFD;
 * (otherwise) instead of leaving them as is. This may be useful,
 * for instance, to ensure the well-formedness of XML documents
 * with embedded external content.
 * @since 5.4
 * @link https://php.net/manual/en/function.htmlspecialchars.php
 */
define('ENT_DISALLOWED', 128);
/**
 * Handle code as HTML 4.01.
 * @since 5.4
 * @link https://php.net/manual/en/function.htmlspecialchars.php
 */
define('ENT_HTML401', 0);
/**
 * Handle code as XML 1.
 * @since 5.4
 * @link https://php.net/manual/en/function.htmlspecialchars.php
 */
define('ENT_XML1', 16);
/**
 * Handle code as XHTML.
 * @since 5.4
 * @link https://php.net/manual/en/function.htmlspecialchars.php
 */
define('ENT_XHTML', 32);
/**
 * Handle code as HTML 5.
 * @since 5.4
 * @link https://php.net/manual/en/function.htmlspecialchars.php
 */
define('ENT_HTML5', 48);

/** @link https://php.net/manual/en/function.scandir.php */
define('SCANDIR_SORT_ASCENDING', 0);
/** @link https://php.net/manual/en/function.scandir.php */
define('SCANDIR_SORT_DESCENDING', 1);
/** @link https://php.net/manual/en/function.scandir.php */
define('SCANDIR_SORT_NONE', 2);

/**
 * SORT_NATURAL is used to compare items as strings using "natural ordering" like natsort().
 * @since 5.4
 * @link https://php.net/manual/en/array.constants.php
 */
define('SORT_NATURAL', 6);
/**
 * SORT_FLAG_CASE can be combined (bitwise OR) with SORT_STRING or SORT_NATURAL to sort strings case-insensitively.
 * @since 5.4
 * @link https://php.net/manual/en/array.constants.php
 */
define('SORT_FLAG_CASE', 8);

/** @link https://php.net/manual/en/streamwrapper.stream-metadata.php */
define('STREAM_META_TOUCH', 1);
/** @link https://php.net/manual/en/streamwrapper.stream-metadata.php */
define('STREAM_META_OWNER', 3);
/** @link https://php.net/manual/en/streamwrapper.stream-metadata.php */
define('STREAM_META_OWNER_NAME', 2);
/** @link https://php.net/manual/en/streamwrapper.stream-metadata.php */
define('STREAM_META_GROUP', 5);
/** @link https://php.net/manual/en/streamwrapper.stream-metadata.php */
define('STREAM_META_GROUP_NAME', 4);
/** @link https://php.net/manual/en/streamwrapper.stream-metadata.php */
define('STREAM_META_ACCESS', 6);

define('STREAM_CRYPTO_METHOD_SSLv2_CLIENT', 3);
define('STREAM_CRYPTO_METHOD_SSLv3_CLIENT', 5);
define('STREAM_CRYPTO_METHOD_SSLv23_CLIENT', 57);
define('STREAM_CRYPTO_METHOD_TLS_CLIENT', 121);
define('STREAM_CRYPTO_METHOD_SSLv2_SERVER', 2);
define('STREAM_CRYPTO_METHOD_SSLv3_SERVER', 4);
define('STREAM_CRYPTO_METHOD_SSLv23_SERVER', 120);
define('STREAM_CRYPTO_METHOD_TLS_SERVER', 120);

define("STREAM_CRYPTO_METHOD_ANY_CLIENT", 127);
define("STREAM_CRYPTO_METHOD_ANY_SERVER", 126);
define("STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT", 9);
define("STREAM_CRYPTO_METHOD_TLSv1_0_SERVER", 8);
define("STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT", 17);
define("STREAM_CRYPTO_METHOD_TLSv1_1_SERVER", 16);
define("STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT", 33);
define("STREAM_CRYPTO_METHOD_TLSv1_2_SERVER", 32);
/**
 * @since 7.4
 */
define("STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT", 65);
/**
 * @since 7.4
 */
define("STREAM_CRYPTO_METHOD_TLSv1_3_SERVER", 64);

define("STREAM_CRYPTO_PROTO_SSLv3", 4);
define("STREAM_CRYPTO_PROTO_TLSv1_0", 8);
define("STREAM_CRYPTO_PROTO_TLSv1_1", 16);
define("STREAM_CRYPTO_PROTO_TLSv1_2", 32);
/**
 * @since 7.4
 */
define("STREAM_CRYPTO_PROTO_TLSv1_3", 64);

/**
 * @since 7.1
 */
define("MT_RAND_MT19937", 0);
/**
 * @since 7.1
 */
define("MT_RAND_PHP", 1);

/**
 * system is unusable
 * @link https://php.net/manual/en/network.constants.php
 */
define('LOG_EMERG', 0);

/**
 * action must be taken immediately
 * @link https://php.net/manual/en/network.constants.php
 */
define('LOG_ALERT', 1);

/**
 * critical conditions
 * @link https://php.net/manual/en/network.constants.php
 */
define('LOG_CRIT', 2);

/**
 * error conditions
 * @link https://php.net/manual/en/network.constants.php
 */
define('LOG_ERR', 3);

/**
 * warning conditions
 * @link https://php.net/manual/en/network.constants.php
 */
define('LOG_WARNING', 4);

/**
 * normal, but significant, condition
 * @link https://php.net/manual/en/network.constants.php
 */
define('LOG_NOTICE', 5);

/**
 * informational message
 * @link https://php.net/manual/en/network.constants.php
 */
define('LOG_INFO', 6);

/**
 * debug-level message
 * @link https://php.net/manual/en/network.constants.php
 */
define('LOG_DEBUG', 7);

/**
 * kernel messages
 * @link https://php.net/manual/en/network.constants.php
 */
define('LOG_KERN', 0);

/**
 * generic user-level messages
 * @link https://php.net/manual/en/network.constants.php
 */
define('LOG_USER', 8);

/**
 * mail subsystem
 * @link https://php.net/manual/en/network.constants.php
 */
define('LOG_MAIL', 16);

/**
 * other system daemons
 * @link https://php.net/manual/en/network.constants.php
 */
define('LOG_DAEMON', 24);

/**
 * security/authorization messages (use <b>LOG_AUTHPRIV</b> instead
 * in systems where that constant is defined)
 * @link https://php.net/manual/en/network.constants.php
 */
define('LOG_AUTH', 32);

/**
 * messages generated internally by syslogd
 * @link https://php.net/manual/en/network.constants.php
 */
define('LOG_SYSLOG', 40);

/**
 * line printer subsystem
 * @link https://php.net/manual/en/network.constants.php
 */
define('LOG_LPR', 48);

/**
 * USENET news subsystem
 * @link https://php.net/manual/en/network.constants.php
 */
define('LOG_NEWS', 56);

/**
 * UUCP subsystem
 * @link https://php.net/manual/en/network.constants.php
 */
define('LOG_UUCP', 64);

/**
 * clock daemon (cron and at)
 * @link https://php.net/manual/en/network.constants.php
 */
define('LOG_CRON', 72);

/**
 * security/authorization messages (private)
 * @link https://php.net/manual/en/network.constants.php
 */
define('LOG_AUTHPRIV', 80);
define('LOG_LOCAL0', 128);
define('LOG_LOCAL1', 136);
define('LOG_LOCAL2', 144);
define('LOG_LOCAL3', 152);
define('LOG_LOCAL4', 160);
define('LOG_LOCAL5', 168);
define('LOG_LOCAL6', 176);
define('LOG_LOCAL7', 184);

/**
 * include PID with each message
 * @link https://php.net/manual/en/network.constants.php
 */
define('LOG_PID', 1);

/**
 * if there is an error while sending data to the system logger,
 * write directly to the system console
 * @link https://php.net/manual/en/network.constants.php
 */
define('LOG_CONS', 2);

/**
 * (default) delay opening the connection until the first
 * message is logged
 * @link https://php.net/manual/en/network.constants.php
 */
define('LOG_ODELAY', 4);

/**
 * open the connection to the logger immediately
 * @link https://php.net/manual/en/network.constants.php
 */
define('LOG_NDELAY', 8);
define('LOG_NOWAIT', 16);

/**
 * print log message also to standard error
 * @link https://php.net/manual/en/network.constants.php
 */
define('LOG_PERROR', 32);

/**
 * @since 8.2
 */
define('DECIMAL_POINT', 65536);
/**
 * @since 8.2
 */
define('THOUSANDS_SEP', 65537);
/**
 * @since 8.2
 */
define('GROUPING', 65538);

/**
 * @since 8.2
 */
define('ERA_YEAR', 131117);

/**
 * @since 8.2
 */
define('INT_CURR_SYMBOL', 262144);
/**
 * @since 8.2
 */
define('CURRENCY_SYMBOL', 262145);
/**
 * @since 8.2
 */
define('MON_DECIMAL_POINT', 262146);
/**
 * @since 8.2
 */
define('MON_THOUSANDS_SEP', 262147);
/**
 * @since 8.2
 */
define('MON_GROUPING', 262148);
/**
 * @since 8.2
 */
define('POSITIVE_SIGN', 262149);
/**
 * @since 8.2
 */
define('NEGATIVE_SIGN', 262150);
/**
 * @since 8.2
 */
define('INT_FRAC_DIGITS', 262151);
/**
 * @since 8.2
 */
define('FRAC_DIGITS', 262152);
/**
 * @since 8.2
 */
define('P_CS_PRECEDES', 262153);
/**
 * @since 8.2
 */
define('P_SEP_BY_SPACE', 262154);
/**
 * @since 8.2
 */
define('N_CS_PRECEDES', 262155);
/**
 * @since 8.2
 */
define('N_SEP_BY_SPACE', 262156);
/**
 * @since 8.2
 */
define('P_SIGN_POSN', 262157);
/**
 * @since 8.2
 */
define('N_SIGN_POSN', 262158);
<component name="InspectionProjectProfileManager">
  <profile version="1.0">
    <option name="myName" value="Project Default" />
    <inspection_tool class="LoggerInitializedWithForeignClass" enabled="false" level="WARNING" enabled_by_default="false">
      <option name="loggerClassName" value="org.apache.log4j.Logger,org.slf4j.LoggerFactory,org.apache.commons.logging.LogFactory,java.util.logging.Logger" />
      <option name="loggerFactoryMethodName" value="getLogger,getLogger,getLog,getLogger" />
    </inspection_tool>
    <inspection_tool class="PhpAssignmentInConditionInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpAssignmentReplaceableWithOperatorAssignmentInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpAssignmentReplaceableWithPrefixExpressionInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpCompoundNamespaceDepthInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpDivisionByZeroInspection" enabled="true" level="WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpDocSignatureInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
      <option name="ALLOW_MISSING_PARAMETERS" value="true" />
    </inspection_tool>
    <inspection_tool class="PhpFieldCanBePromotedInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpIncompatibleReturnTypeInspection" enabled="true" level="WARNING" enabled_by_default="true">
      <option name="STRICT_TYPE_CHECKING" value="true" />
    </inspection_tool>
    <inspection_tool class="PhpLongTypeFormInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpMethodOrClassCallIsNotCaseSensitiveInspection" enabled="true" level="WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpMissingStrictTypesDeclarationInspection" enabled="true" level="WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpMissingVisibilityInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpModifierOrderInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpMultipleClassDeclarationsInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
    <inspection_tool class="PhpNewClassMissingParameterListInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpOverridingMethodVisibilityInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpSeparateElseIfInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpShortOpenTagInspection" enabled="true" level="WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpStaticAsDynamicMethodCallInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpStrictTypeCheckingInspection" enabled="true" level="ERROR" enabled_by_default="true">
      <option name="ENABLE_WITHOUT_DECLARE_STRICT_DIRECTIVE" value="true" />
    </inspection_tool>
    <inspection_tool class="PhpSwitchCaseWithoutDefaultBranchInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpTooManyParametersInspection" enabled="true" level="WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpTraditionalSyntaxArrayLiteralInspection" enabled="true" level="WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpTraitsUseListInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpUndefinedCallbackInspection" enabled="true" level="WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpUndefinedClassConstantInspection" enabled="true" level="WARNING" enabled_by_default="true">
      <option name="DOWNGRADE_SEVERITY" value="true" />
      <option name="WARN_ON_MIXED" value="true" />
    </inspection_tool>
    <inspection_tool class="PhpUndefinedClassInspection" enabled="true" level="WARNING" enabled_by_default="true">
      <option name="DONT_REPORT_MULTI_RESOLVE" value="true" />
    </inspection_tool>
    <inspection_tool class="PhpUndefinedFieldInspection" enabled="true" level="WARNING" enabled_by_default="true">
      <option name="WARN_ON_MIXED" value="true" />
    </inspection_tool>
    <inspection_tool class="PhpUndefinedMethodInspection" enabled="true" level="WARNING" enabled_by_default="true">
      <option name="DOWNGRADE_SEVERITY" value="true" />
      <option name="WARN_ON_MIXED" value="true" />
    </inspection_tool>
    <inspection_tool class="PhpUnnecessaryDoubleQuotesInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpUnnecessaryParenthesesInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpUsageOfSilenceOperatorInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpVarUsageInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpVariableVariableInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
    <inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
      <option name="processCode" value="true" />
      <option name="processLiterals" value="true" />
      <option name="processComments" value="true" />
    </inspection_tool>
  </profile>
</component>
<?php
/**
 * This is a modern binding to the mature [libpq](http://www.postgresql.org/docs/current/static/libpq.html), the official PostgreSQL C-client library.
 *
 * ### Highlights:
 *
 * * Nearly 100% support for [asynchronous usage](pq/Connection/: Asynchronous Usage).
 * * Extended [type support by pg_type](pq/Types/: Overview).
 * * Fetching simple [multi-dimensional array maps](pq/Result/map).
 * * Working [Gateway implementation](https://bitbucket.org/m6w6/pq-gateway).
 */

namespace pq;

use pq;

/**
 * Fast import/export using COPY.
 */
class COPY
{
    /**
     * Start a COPY operation from STDIN to the PostgreSQL server.
     */
    public const FROM_STDIN = 0;

    /**
     * Start a COPY operation from the server to STDOUT.
     */
    public const TO_STDOUT = 1;

    /**
     * The connection to the PostgreSQL server.
     *
     * @public
     * @readonly
     * @var \pq\Connection
     */
    public $connection;

    /**
     * The expression of the COPY statement used to start the operation.
     *
     * @public
     * @readonly
     * @var string
     */
    public $expression;

    /**
     * The drection of the COPY operation (pq\COPY::FROM_STDIN or pq\COPY::TO_STDOUT).
     *
     * @public
     * @readonly
     * @var int
     */
    public $direction;

    /**
     * Any additional options used to start the COPY operation.
     *
     * @public
     * @readonly
     * @var string
     */
    public $options;

    /**
     * Start a COPY operation.
     *
     * @param \pq\Connection $conn The connection to use for the COPY operation.
     * @param string $expression The expression generating the data to copy.
     * @param int $direction Data direction (pq\COPY::FROM_STDIN or pq\COPY::TO_STDOUT).
     * @param string $options Any COPY options (see the [official PostgreSQL documentation](http://www.postgresql.org/docs/current/static/sql-copy.html) for details.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function __construct(pq\Connection $conn, string $expression, int $direction, string $options = null) {}

    /**
     * End the COPY operation to the server during pq\Result::COPY_IN state.
     *
     * @param string $error If set, the COPY operation will abort with provided message.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function end(string $error = null) {}

    /**
     * Receive data from the server during pq\Result::COPY_OUT state.
     *
     * @param string &$data Data read from the server.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     * @return bool success.
     */
    public function get(string &$data) {}

    /**
     * Send data to the server during pq\Result::COPY_IN state.
     *
     * @param string $data Data to send to the server.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function put(string $data) {}
}
/**
 * Request cancellation of an asynchronous query.
 */
class Cancel
{
    /**
     * The connection to cancel the query on.
     *
     * @public
     * @readonly
     * @var \pq\Connection
     */
    public $connection;

    /**
     * Create a new cancellation request for an [asynchronous](pq/Connection/: Asynchronous Usage) query.
     *
     * @param \pq\Connection $conn The connection to request cancellation on.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function __construct(pq\Connection $conn) {}

    /**
     * Perform the cancellation request.
     *
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function cancel() {}
}
/**
 * The connection to the PostgreSQL server.
 *
 * See the [General Usage](pq/Connection/: General Usage) page for an introduction on how to use this class.
 */
class Connection
{
    /**
     * (Re-)open a persistent connection.
     */
    public const PERSISTENT = 2;

    /**
     * If the connection is not already open, perform the connection attempt [asynchronously](pq/Connection/: Asynchronous Usage).
     */
    public const ASYNC = 1;

    /**
     * Everything well; if a connection has been newly and synchronously created, the connection will always have this status right after creation.
     */
    public const OK = 0;

    /**
     * Broken connection; consider pq\Connection::reset() or recreation.
     */
    public const BAD = 1;

    /**
     * Waiting for connection to be made.
     */
    public const STARTED = 2;

    /**
     * Connection okay; waiting to send.
     */
    public const MADE = 3;

    /**
     * Waiting for a response from the server.
     */
    public const AWAITING_RESPONSE = 4;

    /**
     * Received authentication; waiting for backend start-up to finish.
     */
    public const AUTH_OK = 5;

    /**
     * Negotiating SSL encryption.
     */
    public const SSL_STARTUP = 7;

    /**
     * Negotiating environment-driven parameter settings.
     */
    public const SETENV = 6;

    /**
     * No active transaction.
     */
    public const TRANS_IDLE = 0;

    /**
     * A transaction command is in progress.
     */
    public const TRANS_ACTIVE = 1;

    /**
     * Idling in a valid transaction block.
     */
    public const TRANS_INTRANS = 2;

    /**
     * Idling in a failed transaction block.
     */
    public const TRANS_INERROR = 3;

    /**
     * Bad connection.
     */
    public const TRANS_UNKNOWN = 4;

    /**
     * The connection procedure has failed.
     */
    public const POLLING_FAILED = 0;

    /**
     * Select for read-readiness.
     */
    public const POLLING_READING = 1;

    /**
     * Select for write-readiness.
     */
    public const POLLING_WRITING = 2;

    /**
     * The connection has been successfully made.
     */
    public const POLLING_OK = 3;

    /**
     * Register the event handler for notices.
     */
    public const EVENT_NOTICE = 'notice';

    /**
     * Register the event handler for any created results.
     */
    public const EVENT_RESULT = 'result';

    /**
     * Register the event handler for connection resets.
     */
    public const EVENT_RESET = 'reset';

    /**
     * A [connection status constant](pq/Connection#Connection.Status:) value.
     *
     * @public
     * @readonly
     * @var int
     */
    public $status;

    /**
     * A [transaction status constant](pq/Connection#Transaction.Status:) value.
     *
     * @public
     * @readonly
     * @var int
     */
    public $transactionStatus;

    /**
     * The server socket resource.
     *
     * @public
     * @readonly
     * @var resource
     */
    public $socket;

    /**
     * Whether the connection is busy with [asynchronous operations](pq/Connection/: Asynchronous Usage).
     *
     * @public
     * @readonly
     * @var bool
     */
    public $busy;

    /**
     * Any error message on failure.
     *
     * @public
     * @readonly
     * @var string
     */
    public $errorMessage;

    /**
     * List of registered event handlers.
     *
     * @public
     * @readonly
     * @var array
     */
    public $eventHandlers;

    /**
     * Connection character set.
     *
     * @public
     * @var string
     */
    public $encoding = null;

    /**
     * Whether to fetch [asynchronous](pq/Connection/: Asynchronous Usage) results in unbuffered mode, i.e. each row generates a distinct pq\Result.
     *
     * @public
     * @var bool
     */
    public $unbuffered = false;

    /**
     * Whether to set the underlying socket nonblocking, useful for asynchronous handling of writes. See also pq\Connection::flush().
     *
     * ### Connection Information:
     *
     * @public
     * @var bool
     */
    public $nonblocking = false;

    /**
     * The database name of the connection.
     *
     * @public
     * @readonly
     * @var string
     */
    public $db;

    /**
     * The user name of the connection.
     *
     * @public
     * @readonly
     * @var string
     */
    public $user;

    /**
     * The password of the connection.
     *
     * @public
     * @readonly
     * @var string
     */
    public $pass;

    /**
     * The server host name of the connection.
     *
     * @public
     * @readonly
     * @var string
     */
    public $host;

    /**
     * The port of the connection.
     *
     * @public
     * @readonly
     * @var string
     */
    public $port;

    /**
     * The command-line options passed in the connection request.
     *
     * ### Inheritable Defaults:
     *
     * @public
     * @readonly
     * @var string
     */
    public $options;

    /**
     * Default fetch type for future pq\Result instances.
     *
     * @public
     * @var int
     */
    public $defaultFetchType = \pq\Result::FETCH_ARRAY;

    /**
     * Default conversion bitmask for future pq\Result instances.
     *
     * @public
     * @var int
     */
    public $defaultAutoConvert = \pq\Result::CONV_ALL;

    /**
     * Default transaction isolation level for future pq\Transaction instances.
     *
     * @public
     * @var int
     */
    public $defaultTransactionIsolation = \pq\Transaction::READ_COMMITTED;

    /**
     * Default transaction readonlyness for future pq\Transaction instances.
     *
     * @public
     * @var bool
     */
    public $defaultTransactionReadonly = false;

    /**
     * Default transaction deferrability for future pq\Transaction instances.
     *
     * @public
     * @var bool
     */
    public $defaultTransactionDeferrable = false;

    /**
     * Create a new PostgreSQL connection.
     * See also [General Usage](pq/Connection/: General Usage).
     *
     * @param string $dsn A ***connection string*** as described [in the PostgreSQL documentation](http://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING).
     * @param int $flags See [connection flag constants](pq/Connection#Connection.Flags:).
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function __construct(string $dsn = "", int $flags = 0) {}

    /**
     * Declare a cursor for a query.
     *
     * @param string $name The identifying name of the cursor.
     * @param int $flags Any combination of pq\Cursor constants.
     * @param string $query The query for which to open a cursor.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\RuntimeException
     * @throws \pq\Exception\BadMethodCallException
     * @return \pq\Cursor an open cursor instance.
     */
    public function declare(string $name, int $flags, string $query) {}

    /**
     * [Asynchronously](pq/Connection/: Asynchronous Usage) declare a cursor for a query.
     *
     * > ***NOTE***:
     *   If pq\Connection::$unbuffered is TRUE, each call to pq\Connection::getResult() will generate a distinct pq\Result containing exactly one row.
     *
     * @param string $name The identifying name of the cursor.
     * @param int $flags Any combination of pq\Cursor constants.
     * @param string $query The query for which to open a cursor.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\RuntimeException
     * @throws \pq\Exception\BadMethodCallException
     * @return \pq\Cursor an open cursor instance.
     */
    public function declareAsync(string $name, int $flags, string $query) {}

    /**
     * Escape binary data for use within a query with the type bytea.
     *
     * ***NOTE:***
     * The result is not wrapped in single quotes.
     *
     * @param string $binary The binary data to escape.
     * @throws \pq\Exception\BadMethodCallException
     * @return string|false string the escaped binary data.
     * 		 or FALSE if escaping fails.
     */
    public function escapeBytea(string $binary) {}

    /**
     * [Execute one or multiple SQL queries](pq/Connection/: Executing Queries) on the connection.
     *
     * ***NOTE:***
     * Only the last result will be returned, if the query string contains more than one SQL query.
     *
     * @param string $query The queries to send to the server, separated by semi-colon.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     * @throws \pq\Exception\DomainException
     * @return \pq\Result
     */
    public function exec(string $query) {}

    /**
     * [Asynchronously](pq/Connection/: Asynchronous Usage) [execute an SQL query](pq/Connection: Executing Queries) on the connection.
     *
     * > ***NOTE***:
     *   If pq\Connection::$unbuffered is TRUE, each call to pq\Connection::getResult() will generate a distinct pq\Result containing exactly one row.
     *
     * @param string $query The query to send to the server.
     * @param callable $callback as function(pq\Result $res)
     *   The callback to execute when the query finishes.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function execAsync(string $query, callable $callback = null) {}

    /**
     * [Execute an SQL query](pq/Connection: Executing Queries) with properly escaped parameters substituted.
     *
     * @param string $query The query to execute.
     * @param array $params The parameter list to substitute.
     * @param array $types Corresponding list of type OIDs for the parameters.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\RuntimeException
     * @throws \pq\Exception\DomainException
     * @return \pq\Result
     */
    public function execParams(string $query, array $params, array $types = null) {}

    /**
     * [Asynchronously](pq/Connection/: Asynchronous Usage) [execute an SQL query](pq/Connection: Executing Queries) with properly escaped parameters substituted.
     *
     * > ***NOTE***:
     *   If pq\Connection::$unbuffered is TRUE, each call to pq\Connection::getResult() will generate a distinct pq\Result containing exactly one row.
     *
     * @param string $query The query to execute.
     * @param array $params The parameter list to substitute.
     * @param array $types Corresponding list of type OIDs for the parameters.
     * @param callable $cb as function(\pq\Result $res) : void
     *   Result handler callback.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\RuntimeException
     * @throws \pq\Exception\BadMethodCallException
     */
    public function execParamsAsync(string $query, array $params, array $types = null, callable $cb = null) {}

    /**
     * Flush pending writes on the connection.
     * Call after sending any command or data on a nonblocking connection.
     *
     * If it returns FALSE, wait for the socket to become read or write-ready.
     * If it becomes write-ready, call pq\Connection::flush() again.
     * If it becomes read-ready, call pq\Connection::poll(), then call pq\Connection::flush() again.
     * Repeat until pq\Connection::flush() returns TRUE.
     *
     * ***NOTE:***
     * This method was added in v1.1.0, resp. v2.1.0.
     *
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\RuntimeException
     * @return bool whether everything has been flushed.
     */
    public function flush() {}

    /**
     * Fetch the result of an [asynchronous](pq/Connection/: Asynchronous Usage) query.
     *
     * If the query hasn't finished yet, the call will block until the result is available.
     *
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @return \pq\Result|null NULL if there has not been a query
     * 		 or \pq\Result when the query has finished
     */
    public function getResult() {}

    /**
     * Listen on $channel for notifications.
     * See pq\Connection::unlisten().
     *
     * @param string $channel The channel to listen on.
     * @param callable $listener as function(string $channel, string $message, int $pid)
     *   A callback automatically called whenever a notification on $channel arrives.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function listen(string $channel, callable $listener) {}

    /**
     * [Asynchronously](pq/Connection/: Asynchronous Usage) start listening on $channel for notifications.
     * See pq\Connection::listen().
     *
     * @param string $channel The channel to listen on.
     * @param callable $listener as function(string $channel, string $message, int $pid)
     *   A callback automatically called whenever a notification on $channel arrives.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function listenAsync(string $channel, callable $listener) {}

    /**
     * Notify all listeners on $channel with $message.
     *
     * @param string $channel The channel to notify.
     * @param string $message The message to send.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function notify(string $channel, string $message) {}

    /**
     * [Asynchronously](pq/Connection/: Asynchronous Usage) start notifying all listeners on $channel with $message.
     *
     * @param string $channel The channel to notify.
     * @param string $message The message to send.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function notifyAsync(string $channel, string $message) {}

    /**
     * Stops listening for an event type.
     *
     * @param string $event Any pq\Connection::EVENT_*.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @return bool success.
     */
    public function off(string $event) {}

    /**
     * Listen for an event.
     *
     * @param string $event Any pq\Connection::EVENT_*.
     * @param callable $callback as function(pq\Connection $c[, pq\Result $r)
     *   The callback to invoke on event.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @return int number of previously attached event listeners.
     */
    public function on(string $event, callable $callback) {}

    /**
     * Poll an [asynchronously](pq/Connection/: Asynchronous Usage) operating connection.
     * See pq\Connection::resetAsync() for an usage example.
     *
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\RuntimeException
     * @throws \pq\Exception\BadMethodCallException
     * @return int pq\Connection::POLLING_* constant
     */
    public function poll() {}

    /**
     * Prepare a named statement for later execution with pq\Statement::execute().
     *
     * @param string $name The identifying name of the prepared statement.
     * @param string $query The query to prepare.
     * @param array $types An array of type OIDs for the substitution parameters.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     * @return \pq\Statement a prepared statement instance.
     */
    public function prepare(string $name, string $query, array $types = null) {}

    /**
     * [Asynchronously](pq/Connection/: Asynchronous Usage) prepare a named statement for later execution with pq\Statement::exec().
     *
     * > ***NOTE***:
     *   If pq\Connection::$unbuffered is TRUE, each call to pq\Connection::getResult() will generate a distinct pq\Result containing exactly one row.
     *
     * @param string $name The identifying name of the prepared statement.
     * @param string $query The query to prepare.
     * @param array $types An array of type OIDs for the substitution parameters.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     * @return \pq\Statement a prepared statement instance.
     */
    public function prepareAsync(string $name, string $query, array $types = null) {}

    /**
     * Quote a string for safe use in a query.
     * The result is truncated at any zero byte and wrapped in single quotes.
     *
     * ***NOTE:***
     * Beware of matching character encodings.
     *
     * @param string $payload The payload to quote for use in a query.
     * @throws \pq\Exception\BadMethodCallException
     * @return string|false string a single-quote wrapped string safe for literal use in a query.
     * 		 or FALSE if quoting fails.
     */
    public function quote(string $payload) {}

    /**
     * Quote an identifier for safe usage as name.
     *
     * ***NOTE:***
     * Beware of case-sensitivity.
     *
     * @param string $name The name to quote.
     * @throws \pq\Exception\BadMethodCallException
     * @return string|false string the quoted identifier.
     * 		 or FALSE if quoting fails.
     */
    public function quoteName(string $name) {}

    /**
     * Attempt to reset a possibly broken connection to a working state.
     *
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function reset() {}

    /**
     * [Asynchronously](pq/Connection/: Asynchronous Usage) reset a possibly broken connection to a working state.
     *
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function resetAsync() {}

    /**
     * Set a data type converter.
     *
     * @param \pq\Converter $converter An instance implementing pq\Converter.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     */
    public function setConverter(pq\Converter $converter) {}

    /**
     * Begin a transaction.
     *
     * @param int $isolation Any pq\Transaction isolation level constant
     *   (defaults to pq\Connection::$defaultTransactionIsolation).
     * @param bool $readonly Whether the transaction executes only reads
     *   (defaults to pq\Connection::$defaultTransactionReadonly).
     * @param bool $deferrable Whether the transaction is deferrable
     *   (defaults to pq\Connection::$defaultTransactionDeferrable).
     *
     * ***NOTE:***
     * A transaction can only be deferrable if it also is readonly and serializable.
     * See the official [PostgreSQL documentation](http://www.postgresql.org/docs/current/static/sql-set-transaction.html) for further information.
     *
     * @return \pq\Transaction a begun transaction instance.
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     * @throws \pq\Exception\InvalidArgumentException
     */
    public function startTransaction(int $isolation = \pq\Transaction::READ_COMMITTED, bool $readonly = false, bool $deferrable = false) {}

    /**
     * [Asynchronously](pq/Connection/: Asynchronous Usage) begin a transaction.
     *
     * @param int $isolation Any pq\Transaction isolation level constant
     *   (defaults to pq\Connection::$defaultTransactionIsolation).
     * @param bool $readonly Whether the transaction executes only reads
     *   (defaults to pq\Connection::$defaultTransactionReadonly).
     * @param bool $deferrable Whether the transaction is deferrable
     *   (defaults to pq\Connection::$defaultTransactionDeferrable).
     *
     * ***NOTE:***
     * A transaction can only be deferrable if it also is readonly and serializable.
     * See the official [PostgreSQL documentation](http://www.postgresql.org/docs/current/static/sql-set-transaction.html) for further information.
     *
     * @return \pq\Transaction an asynchronously begun transaction instance.
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     * @throws \pq\Exception\InvalidArgumentException
     */
    public function startTransactionAsync(int $isolation = \pq\Transaction::READ_COMMITTED, bool $readonly = false, bool $deferrable = false) {}

    /**
     * Trace protocol communication with the server.
     *
     * ***NOTE:***
     * Calling pq\Connection::trace() without argument or NULL stops tracing.
     *
     * @param resource $stream The resource to which the protocol trace will be output.
     *   (The stream must be castable to STDIO).
     * @throws \pq\Exception\BadMethodCallException
     * @return bool success.
     */
    public function trace($stream = null) {}

    /**
     * Unescape bytea data retrieved from the server.
     *
     * @param string $bytea Bytea data retrieved from the server.
     * @throws \pq\Exception\BadMethodCallException
     * @return string|false string unescaped binary data.
     * 		 or FALSE if unescaping fails.
     */
    public function unescapeBytea(string $bytea) {}

    /**
     * Stop listening for notifications on channel $channel.
     * See pq\Connection::listen().
     *
     * @param string $channel The name of a channel which is currently listened on.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function unlisten(string $channel) {}

    /**
     * [Asynchronously](pq/Connection/: Asynchronous Usage) stop listening for notifications on channel $channel.
     * See pq\Connection::unlisten() and pq\Connection::listenAsync().
     *
     * @param string $channel The name of a channel which is currently listened on.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function unlistenAsync(string $channel) {}

    /**
     * Stop applying a data type converter.
     *
     * @param \pq\Converter $converter A converter previously set with pq\Connection::setConverter().
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     */
    public function unsetConverter(pq\Converter $converter) {}
}
/**
 * Interface for type conversions.
 */
interface Converter
{
    /**
     * Convert a string received from the PostgreSQL server back to a PHP type.
     *
     * @param string $data String data received from the server.
     * @param int $type The type OID of the data. Irrelevant for single-type converters.
     * @return mixed the value converted to a PHP type.
     */
    public function convertFromString(string $data, int $type);

    /**
     * Convert a value to a string for use in a query.
     *
     * @param mixed $value The PHP value which should be converted to a string.
     * @param int $type The type OID the converter should handle. Irrelevant for singly-type converters.
     * @return string a textual representation of the value accepted by the PostgreSQL server.
     */
    public function convertToString($value, int $type);

    /**
     * Announce which types the implementing converter can handle.
     *
     * @return array OIDs of handled types.
     */
    public function convertTypes();
}
/**
 * Declare a cursor.
 */
class Cursor
{
    /**
     * Causes the cursor to return data in binary rather than in text format. You probably do not want to use that.
     */
    public const BINARY = 1;

    /**
     * The data returned by the cursor should be unaffected by updates to the tables underlying the cursor that take place after the cursor was opened.
     */
    public const INSENSITIVE = 2;

    /**
     * The cursor should stay usable after the transaction that created it was successfully committed.
     */
    public const WITH_HOLD = 4;

    /**
     * Force that rows can be retrieved in any order from the cursor.
     */
    public const SCROLL = 16;

    /**
     * Force that rows are only retrievable in sequiential order.
     *
     * ***NOTE:***
     * See the [notes in the official PostgreSQL documentation](http://www.postgresql.org/docs/current/static/sql-declare.html#SQL-DECLARE-NOTES) for more information.
     */
    public const NO_SCROLL = 32;

    /**
     * The connection the cursor was declared on.
     *
     * @public
     * @readonly
     * @var \pq\Connection
     */
    public $connection;

    /**
     * The identifying name of the cursor.
     *
     * @public
     * @readonly
     * @var string
     */
    public $name;

    /**
     * Declare a cursor.
     * See pq\Connection::declare().
     *
     * @param \pq\Connection $connection The connection on which the cursor should be declared.
     * @param string $name The name of the cursor.
     * @param int $flags See pq\Cursor constants.
     * @param string $query The query for which the cursor should be opened.
     * @param bool $async Whether to declare the cursor [asynchronously](pq/Connection/: Asynchronous Usage).
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function __construct(pq\Connection $connection, string $name, int $flags, string $query, bool $async) {}

    /**
     * Close an open cursor.
     * This is a no-op on already closed cursors.
     *
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function close() {}

    /**
     * [Asynchronously](pq/Connection/: Asynchronous Usage) close an open cursor.
     * See pq\Cursor::close().
     *
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function closeAsync() {}

    /**
     * Fetch rows from the cursor.
     * See pq\Cursor::move().
     *
     * @param string $spec What to fetch.
     *
     * ### Fetch argument:
     *
     * FETCH and MOVE usually accepts arguments like the following, where `count` is the number of rows:
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     * @return \pq\Result the fetched row(s).
     */
    public function fetch(string $spec = "1") {}

    /**
     * [Asynchronously](pq/Connection/: Asynchronous Usage) fetch rows from the cursor.
     * See pq\Cursor::fetch().
     *
     * @param string $spec What to fetch.
     * @param callable $callback as function(pq\Result $res)
     *   A callback to execute when the result is ready.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function fetchAsync(string $spec = "1", callable $callback = null) {}

    /**
     * Move the cursor.
     * See pq\Cursor::fetch().
     *
     * @param string $spec What to fetch.
     *
     * ### Fetch argument:
     *
     * FETCH and MOVE usually accepts arguments like the following, where `count` is the number of rows:
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     * @return \pq\Result command status.
     */
    public function move(string $spec = "1") {}

    /**
     * [Asynchronously](pq/Connection/: Asynchronous Usage) move the cursor.
     * See pq\Cursor::move().
     *
     * @param string $spec What to fetch.
     * @param callable $callback as function(pq\Result $res)
     *   A callback to execute when the command completed.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function moveAsync(string $spec = "1", callable $callback = null) {}

    /**
     * Reopen a cursor.
     * This is a no-op on already open cursors.
     *
     * ***NOTE:***
     * Only cursors closed by pq\Cursor::close() will be reopened.
     *
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function open() {}

    /**
     * [Asynchronously](pq/Connection/: Asynchronous Usage) reopen a cursor.
     * See pq\Cursor::open().
     *
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function openAsync() {}
}
/**
 * A simple DateTime wrapper with predefined formats which supports stringification and JSON.
 */
class DateTime extends \DateTime implements \JsonSerializable
{
    /**
     * The default format of any date/time type automatically converted by pq\Result (depends on the actual type of the column).
     *
     * @public
     * @var string
     */
    public $format = "Y-m-d H:i:s.uO";

    /**
     * Stringify the DateTime instance according to pq\DateTime::$format.
     *
     * @return string the DateTime as string.
     */
    public function __toString() {}

    /**
     * Serialize to JSON.
     * Alias of pq\DateTime::__toString().
     *
     * @return string the DateTime stringified according to pq\DateTime::$format.
     */
    public function jsonSerialize() {}
}
/**
 * A base interface for all pq\Exception classes.
 */
interface Exception
{
    /**
     * An invalid argument was passed to a method (pq\Exception\InvalidArgumentException).
     */
    public const INVALID_ARGUMENT = 0;

    /**
     * A runtime exception occurred (pq\Exception\RuntimeException).
     */
    public const RUNTIME = 1;

    /**
     * The connection failed (pq\Exception\RuntimeException).
     */
    public const CONNECTION_FAILED = 2;

    /**
     * An input/output exception occurred (pq\Exception\RuntimeException).
     */
    public const IO = 3;

    /**
     * Escaping an argument or identifier failed internally (pq\Exception\RuntimeException).
     */
    public const ESCAPE = 4;

    /**
     * An object's constructor was not called (pq\Exception\BadMethodCallException).
     */
    public const UNINITIALIZED = 6;

    /**
     * Calling this method was not expected (yet) (pq\Exception\BadMethodCallException).
     */
    public const BAD_METHODCALL = 5;

    /**
     * SQL syntax error (pq\Exception\DomainException).
     */
    public const SQL = 8;

    /**
     * Implementation domain error (pq\Exception\DomainException).
     */
    public const DOMAIN = 7;
}
/**
 * A *large object*.
 *
 * ***NOTE:***
 * Working with *large objects* requires an active transaction.
 */
class LOB
{
    /**
     * 0, representing an invalid OID.
     */
    public const INVALID_OID = 0;

    /**
     * Read/write mode.
     */
    public const RW = 393216;

    /**
     * The transaction wrapping the operations on the *large object*.
     *
     * @public
     * @readonly
     * @var \pq\Transaction
     */
    public $transaction;

    /**
     * The OID of the *large object*.
     *
     * @public
     * @readonly
     * @var int
     */
    public $oid;

    /**
     * The stream connected to the *large object*.
     *
     * @public
     * @readonly
     * @var resource
     */
    public $stream;

    /**
     * Open or create a *large object*.
     * See pq\Transaction::openLOB() and pq\Transaction::createLOB().
     *
     * @param \pq\Transaction $txn The transaction which wraps the *large object* operations.
     * @param int $oid The OID of the existing *large object* to open.
     * @param int $mode Access mode (read, write or read/write).
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function __construct(pq\Transaction $txn, int $oid = \pq\LOB::INVALID_OID, int $mode = \pq\LOB::RW) {}

    /**
     * Read a string of data from the current position of the *large object*.
     *
     * @param int $length The amount of bytes to read from the *large object*.
     * @param int &$read The amount of bytes actually read from the *large object*.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     * @return string the data read.
     */
    public function read(int $length = 0x1000, int &$read = null) {}

    /**
     * Seek to a position within the *large object*.
     *
     * @param int $offset The position to seek to.
     * @param int $whence From where to seek (SEEK_SET, SEEK_CUR or SEEK_END).
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     * @return int the new position.
     */
    public function seek(int $offset, int $whence = SEEK_SET) {}

    /**
     * Retrieve the current position within the *large object*.
     *
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     * @return int the current position.
     */
    public function tell() {}

    /**
     * Truncate the *large object*.
     *
     * @param int $length The length to truncate to.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function truncate(int $length = 0) {}

    /**
     * Write data to the *large object*.
     *
     * @param string $data The data that should be written to the current position.
     * @return int the number of bytes written.
     */
    public function write(string $data) {}
}
/**
 * A query result.
 *
 * See [Fetching Results](pq/Result/: Fetching Results) for a general overview.
 */
class Result implements \Traversable, \Countable
{
    /**
     * The query sent to the server was empty.
     */
    public const EMPTY_QUERY = 0;

    /**
     * The query did not generate a result set and completed successfully.
     */
    public const COMMAND_OK = 1;

    /**
     * The query successfully generated a result set.
     */
    public const TUPLES_OK = 2;

    /**
     * The result contains a single row of the result set when using pq\Connection::$unbuffered.
     */
    public const SINGLE_TUPLE = 9;

    /**
     * COPY data can be received from the server.
     */
    public const COPY_OUT = 3;

    /**
     * COPY data can be sent to the server.
     */
    public const COPY_IN = 4;

    /**
     * COPY in/out data transfer in progress.
     */
    public const COPY_BOTH = 8;

    /**
     * The server sent a bad response.
     */
    public const BAD_RESPONSE = 5;

    /**
     * A nonfatal error (notice or warning) occurred.
     */
    public const NONFATAL_ERROR = 6;

    /**
     * A fatal error occurred.
     */
    public const FATAL_ERROR = 7;

    /**
     * Fetch rows numerically indexed, where the index start with 0.
     */
    public const FETCH_ARRAY = 0;

    /**
     * Fetch rows associatively indexed by column name.
     */
    public const FETCH_ASSOC = 1;

    /**
     * Fetch rows as stdClass instance, where the column names are the property names.
     */
    public const FETCH_OBJECT = 2;

    /**
     * Automatically convert 'f' and 't' to FALSE and TRUE and vice versa.
     */
    public const CONV_BOOL = 1;

    /**
     * Automatically convert integral strings to either int if it fits into maximum integer size or else to float and vice versa.
     */
    public const CONV_INT = 2;

    /**
     * Automatically convert floating point numbers.
     */
    public const CONV_FLOAT = 4;

    /**
     * Do all scalar conversions listed above.
     */
    public const CONV_SCALAR = 15;

    /**
     * Automatically convert arrays.
     */
    public const CONV_ARRAY = 16;

    /**
     * Automatically convert date strings to pq\DateTime and vice versa.
     */
    public const CONV_DATETIME = 32;

    /**
     * Automatically convert JSON.
     */
    public const CONV_JSON = 256;

    /**
     * Do all of the above.
     */
    public const CONV_ALL = 65535;

    /**
     * A [status constant](pq/Result#Status.values:).
     *
     * @public
     * @readonly
     * @var int
     */
    public $status;

    /**
     * The accompanying status message.
     *
     * @public
     * @readonly
     * @var string
     */
    public $statusMessage;

    /**
     * Any error message if $status indicates an error.
     *
     * @public
     * @readonly
     * @var string
     */
    public $errorMessage;

    /**
     * The number of rows in the result set.
     *
     * @public
     * @readonly
     * @var int
     */
    public $numRows;

    /**
     * The number of fields in a single tuple of the result set.
     *
     * @public
     * @readonly
     * @var int
     */
    public $numCols;

    /**
     * The number of rows affected by a statement.
     *
     * @public
     * @readonly
     * @var int
     */
    public $affectedRows;

    /**
     * Error details. See [PQresultErrorField](https://www.postgresql.org/docs/current/static/libpq-exec.html#LIBPQ-PQRESULTERRORFIELD) docs.
     *
     * @public
     * @readonly
     * @var array
     */
    public $diag;

    /**
     * The [type of return value](pq/Result#Fetch.types:) the fetch methods should return when no fetch type argument was given. Defaults to pq\Connection::$defaultFetchType.
     *
     * @public
     * @var int
     */
    public $fetchType = \pq\Result::FETCH_ARRAY;

    /**
     * What [type of conversions](pq/Result#Conversion.bits:) to perform automatically.
     *
     * @public
     * @var int
     */
    public $autoConvert = \pq\Result::CONV_ALL;

    /**
     * Bind a variable to a result column.
     * See pq\Result::fetchBound().
     *
     * @param mixed $col The column name or index to bind to.
     * @param mixed $var The variable reference.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @return bool success.
     */
    public function bind($col, $var) {}

    /**
     * Count number of rows in this result set.
     *
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @return int the number of rows.
     */
    public function count() {}

    /**
     * Describe a prepared statement.
     *
     * ***NOTE:***
     * This will only return meaningful information for a result of pq\Statement::desc().
     *
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @return array list of parameter type OIDs for the prepared statement.
     */
    public function desc() {}

    /**
     * Fetch all rows at once.
     *
     * @param int $fetch_type The type the return value should have, see pq\Result::FETCH_* constants, defaults to pq\Result::$fetchType.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @return array all fetched rows.
     */
    public function fetchAll(int $fetch_type = null) {}

    /**
     * Fetch all rows of a single column.
     *
     * @param int $col The column name or index to fetch.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     * @return array list of column values.
     */
    public function fetchAllCols(int $col = 0) {}

    /**
     * Iteratively fetch a row into bound variables.
     * See pq\Result::bind().
     *
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     * @return array|null array the fetched row as numerically indexed array.
     * 		 or NULL when iteration ends.
     */
    public function fetchBound() {}

    /**
     * Iteratively fetch a single column.
     *
     * @param mixed $ref The variable where the column value will be stored in.
     * @param mixed $col The column name or index.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     * @return bool|null bool success.
     * 		 or NULL when iteration ends.
     */
    public function fetchCol($ref, $col = 0) {}

    /**
     * Iteratively fetch a row.
     *
     * @param int $fetch_type The type the return value should have, see pq\Result::FETCH_* constants, defaults to pq\Result::$fetchType.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     * @return array|array|object|null array numerically indexed for pq\Result::FETCH_ARRAY
     * 		 or array associatively indexed for pq\Result::FETCH_ASSOC
     * 		 or object stdClass instance for pq\Result::FETCH_OBJECT
     * 		 or NULL when iteration ends.
     */
    public function fetchRow(int $fetch_type = null) {}

    /**
     * Fetch the complete result set as a simple map, a *multi dimensional array*, each dimension indexed by a column.
     *
     * @param mixed $keys The the column indices/names used to index the map.
     * @param mixed $vals The column indices/names which should build up the leaf entry of the map.
     * @param int $fetch_type The type the return value should have, see pq\Result::FETCH_* constants, defaults to pq\Result::$fetchType.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     * @return array |object, the mapped columns.
     */
    public function map($keys = 0, $vals = null, int $fetch_type = null) {}
}
/**
 * A named prepared statement.
 * See pq\Connection::prepare().
 */
class Statement
{
    /**
     * The connection to the server.
     *
     * @public
     * @readonly
     * @var \pq\Connection
     */
    public $connection;

    /**
     * The identifiying name of the prepared statement.
     *
     * @public
     * @readonly
     * @var string
     */
    public $name;

    /**
     * The query string used to prepare the statement.
     *
     * @public
     * @readonly
     * @var string
     */
    public $query;

    /**
     * List of corresponding query parameter type OIDs for the prepared statement.
     *
     * @public
     * @readonly
     * @var array
     */
    public $types;

    /**
     * Prepare a new statement.
     * See pq\Connection::prepare().
     *
     * @param \pq\Connection $conn The connection to prepare the statement on.
     * @param string $name The name identifying this statement.
     * @param string $query The actual query to prepare.
     * @param array $types A list of corresponding query parameter type OIDs.
     * @param bool $async Whether to prepare the statement [asynchronously](pq/Connection/: Asynchronous Usage).
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     * @throws \pq\Exception\DomainException
     */
    public function __construct(pq\Connection $conn, string $name, string $query, array $types = null, bool $async = false) {}

    /**
     * Bind a variable to an input parameter.
     *
     * @param int $param_no The parameter index to bind to.
     * @param mixed &$param_ref The variable to bind.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     */
    public function bind(int $param_no, &$param_ref) {}

    /**
     * Free the server resources used by the prepared statement, so it can no longer be executed.
     * This is done implicitly when the object is destroyed.
     *
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function deallocate() {}

    /**
     * [Asynchronously](pq/Connection/: Asynchronous Usage) free the server resources used by the
     * prepared statement, so it can no longer be executed.
     *
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function deallocateAsync() {}

    /**
     * Describe the parameters of the prepared statement.
     *
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     * @throws \pq\Exception\DomainException
     * @return array list of type OIDs of the substitution parameters.
     */
    public function desc() {}

    /**
     * [Asynchronously](pq/Connection/: Asynchronous Usage) describe the parameters of the prepared statement.
     *
     * @param callable $callback as function(array $oids)
     *   A callback to receive list of type OIDs of the substitution parameters.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function descAsync(callable $callback) {}

    /**
     * Execute the prepared statement.
     *
     * @param array $params Any parameters to substitute in the prepared statement (defaults to any bou
     *   nd variables).
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     * @return \pq\Result the result of the execution of the prepared statement.
     */
    public function exec(array $params = null) {}

    /**
     * [Asynchronously](pq/Connection/: Asynchronous Usage) execute the prepared statement.
     *
     * @param array $params Any parameters to substitute in the prepared statement (defaults to any bou
     *   nd variables).
     * @param callable $cb as function(\pq\Result $res) : void
     *   Result handler callback.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function execAsync(array $params = null, callable $cb = null) {}

    /**
     * Re-prepare a statement that has been deallocated. This is a no-op on already open statements.
     *
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function prepare() {}

    /**
     * [Asynchronously](pq/Connection/: Asynchronous Usage) re-prepare a statement that has been
     * deallocated. This is a no-op on already open statements.
     *
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function prepareAsync() {}
}
/**
 * A database transaction.
 *
 * ***NOTE:***
 * Transactional properties like pq\Transaction::$isolation, pq\Transaction::$readonly and pq\Transaction::$deferrable can be changed after the transaction begun and the first query has been executed. Doing this will lead to appropriate `SET TRANSACTION` queries.
 */
class Transaction
{
    /**
     * Transaction isolation level where only rows committed before the transaction began can be seen.
     */
    public const READ_COMMITTED = 0;

    /**
     * Transaction isolation level where only rows committed before the first query was executed in this transaction.
     */
    public const REPEATABLE_READ = 1;

    /**
     * Transaction isolation level that guarantees serializable repeatability which might lead to serialization_failure on high concurrency.
     */
    public const SERIALIZABLE = 2;

    /**
     * The connection the transaction was started on.
     *
     * @public
     * @readonly
     * @var \pq\Connection
     */
    public $connection;

    /**
     * The transaction isolation level.
     *
     * @public
     * @var int
     */
    public $isolation = \pq\Transaction::READ_COMMITTED;

    /**
     * Whether this transaction performs read only queries.
     *
     * @public
     * @var bool
     */
    public $readonly = false;

    /**
     * Whether the transaction is deferrable. See pq\Connection::startTransaction().
     *
     * @public
     * @var bool
     */
    public $deferrable = false;

    /**
     * Start a transaction.
     * See pq\Connection::startTransaction().
     *
     * @param \pq\Connection $conn The connection to start the transaction on.
     * @param bool $async Whether to start the transaction [asynchronously](pq/Connection/: Asynchronous Usage).
     * @param int $isolation The transaction isolation level (defaults to pq\Connection::$defaultTransactionIsolation).
     * @param bool $readonly Whether the transaction is readonly (defaults to pq\Connection::$defaultTransactionReadonly).
     * @param bool $deferrable Whether the transaction is deferrable (defaults to pq\Connection::$defaultTransactionDeferrable).
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function __construct(pq\Connection $conn, bool $async = false, int $isolation = \pq\Transaction::READ_COMMITTED, bool $readonly = false, bool $deferrable = false) {}

    /**
     * Commit the transaction or release the previous savepoint.
     * See pq\Transaction::savepoint().
     *
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     * @throws \pq\Exception\DomainException
     */
    public function commit() {}

    /**
     * [Asynchronously](pq/Connection/: Asynchronous Usage) commit the transaction or release the previous savepoint.
     * See pq\Transaction::commit() and pq\Transaction::savepoint().
     *
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function commitAsync() {}

    /**
     * Create a new *large object* and open it.
     * See pq\Transaction::openLOB().
     *
     * @param int $mode How to open the *large object* (read, write or both; see pq\LOB constants).
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     * @return \pq\LOB instance of the new *large object*.
     */
    public function createLOB(int $mode = \pq\LOB::RW) {}

    /**
     * Export a *large object* to a local file.
     * See pq\Transaction::importLOB().
     *
     * @param int $oid The OID of the *large object*.
     * @param string $path The path of a local file to export to.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function exportLOB(int $oid, string $path) {}

    /**
     * Export a snapshot for transaction synchronization.
     * See pq\Transaction::importSnapshot().
     *
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     * @throws \pq\Exception\DomainException
     * @return string the snapshot identifier usable with pq\Transaction::importSnapshot().
     */
    public function exportSnapshot() {}

    /**
     * [Asynchronously](pq/Connection/: Asynchronous Usage) export a snapshot for transaction synchronization.
     * See pq\Transaction::exportSnapshot().
     *
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function exportSnapshotAsync() {}

    /**
     * Import a local file into a *large object*.
     *
     * @param string $local_path A path to a local file to import.
     * @param int $oid The target OID. A new *large object* will be created if INVALID_OID.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     * @return int the (new) OID of the *large object*.
     */
    public function importLOB(string $local_path, int $oid = \pq\LOB::INVALID_OID) {}

    /**
     * Import a snapshot from another transaction to synchronize with.
     * See pq\Transaction::exportSnapshot().
     *
     * ***NOTE:***
     * The transaction must have an isolation level of at least pq\Transaction::REPEATABLE_READ.
     *
     * @param string $snapshot_id The snapshot identifier obtained by exporting a snapshot from a transaction.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     * @throws \pq\Exception\DomainException
     */
    public function importSnapshot(string $snapshot_id) {}

    /**
     * [Asynchronously](pq/Connection/: Asynchronous Usage) import a snapshot from another transaction to synchronize with.
     * See pq\Transaction::importSnapshot().
     *
     * ***NOTE:***
     * The transaction must have an isolation level of at least pq\Transaction::REPEATABLE_READ.
     *
     * @param string $snapshot_id The snapshot identifier obtained by exporting a snapshot from a transaction.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function importSnapshotAsync(string $snapshot_id) {}

    /**
     * Open a *large object*.
     * See pq\Transaction::createLOB().
     *
     * @param int $oid The OID of the *large object*.
     * @param int $mode Operational mode; read, write or both.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     * @return \pq\LOB instance of the opened *large object*.
     */
    public function openLOB(int $oid, int $mode = \pq\LOB::RW) {}

    /**
     * Rollback the transaction or to the previous savepoint within this transaction.
     * See pq\Transaction::commit() and pq\Transaction::savepoint().
     *
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     * @throws \pq\Exception\DomainException
     */
    public function rollback() {}

    /**
     * [Asynchronously](pq/Connection/: Asynchronous Usage) rollback the transaction or to the previous savepoint within this transaction.
     * See pq\Transaction::rollback() and pq\Transaction::savepoint().
     *
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function rollbackAsync() {}

    /**
     * Create a `SAVEPOINT` within this transaction.
     *
     * ***NOTE:***
     * pq\Transaction tracks an internal counter as savepoint identifier.
     *
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function savepoint() {}

    /**
     * [Asynchronously](pq/Connection/: Asynchronous Usage) create a `SAVEPOINT` within this transaction.
     * See pq\Transaction::savepoint().
     *
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function savepointAsync() {}

    /**
     * Unlink a *large object*.
     * See pq\Transaction::createLOB().
     *
     * @param int $oid The OID of the *large object*.
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     * @return \pq\LOB instance of the opened *large object*.
     */
    public function unlinkLOB(int $oid) {}
}
/**
 * Accessor to the PostgreSQL `pg_type` relation.
 * See [here for an overview](pq/Types/: Overview).
 */
class Types implements \ArrayAccess
{
    /**
     * OID of the `bool` type.
     */
    public const BOOL = 16;

    /**
     * OID of the `bytea` type.
     */
    public const BYTEA = 17;

    /**
     * OID of the `char` type.
     */
    public const CHAR = 18;

    /**
     * OID of the `name` type.
     */
    public const NAME = 19;

    /**
     * OID of the `int8` type.
     */
    public const INT8 = 20;

    /**
     * OID of the `int2` type.
     */
    public const INT2 = 21;

    /**
     * OID of the `int2vector` type.
     */
    public const INT2VECTOR = 22;

    /**
     * OID of the `int4` type.
     */
    public const INT4 = 23;

    /**
     * OID of the `regproc` type.
     */
    public const REGPROC = 24;

    /**
     * OID of the `text` type.
     */
    public const TEXT = 25;

    /**
     * OID of the `oid` type.
     */
    public const OID = 26;

    /**
     * OID of the `tid` type.
     */
    public const TID = 27;

    /**
     * OID of the `xid` type.
     */
    public const XID = 28;

    /**
     * OID of the `cid` type.
     */
    public const CID = 29;

    /**
     * OID of the `oidvector` type.
     */
    public const OIDVECTOR = 30;

    /**
     * OID of the `pg_type` type.
     */
    public const PG_TYPE = 71;

    /**
     * OID of the `pg_attribute` type.
     */
    public const PG_ATTRIBUTE = 75;

    /**
     * OID of the `pg_proc` type.
     */
    public const PG_PROC = 81;

    /**
     * OID of the `pg_class` type.
     */
    public const PG_CLASS = 83;

    /**
     * OID of the `json` type.
     */
    public const JSON = 114;

    /**
     * OID of the `xml` type.
     */
    public const XML = 142;

    /**
     * OID of the `xmlarray` type.
     */
    public const XMLARRAY = 143;

    /**
     * OID of the `jsonarray` type.
     */
    public const JSONARRAY = 199;

    /**
     * OID of the `pg_node_tree` type.
     */
    public const PG_NODE_TREE = 194;

    /**
     * OID of the `smgr` type.
     */
    public const SMGR = 210;

    /**
     * OID of the `point` type.
     */
    public const POINT = 600;

    /**
     * OID of the `lseg` type.
     */
    public const LSEG = 601;

    /**
     * OID of the `path` type.
     */
    public const PATH = 602;

    /**
     * OID of the `box` type.
     */
    public const BOX = 603;

    /**
     * OID of the `polygon` type.
     */
    public const POLYGON = 604;

    /**
     * OID of the `line` type.
     */
    public const LINE = 628;

    /**
     * OID of the `linearray` type.
     */
    public const LINEARRAY = 629;

    /**
     * OID of the `float4` type.
     */
    public const FLOAT4 = 700;

    /**
     * OID of the `float8` type.
     */
    public const FLOAT8 = 701;

    /**
     * OID of the `abstime` type.
     */
    public const ABSTIME = 702;

    /**
     * OID of the `reltime` type.
     */
    public const RELTIME = 703;

    /**
     * OID of the `tinterval` type.
     */
    public const TINTERVAL = 704;

    /**
     * OID of the `unknown` type.
     */
    public const UNKNOWN = 705;

    /**
     * OID of the `circle` type.
     */
    public const CIRCLE = 718;

    /**
     * OID of the `circlearray` type.
     */
    public const CIRCLEARRAY = 719;

    /**
     * OID of the `money` type.
     */
    public const MONEY = 790;

    /**
     * OID of the `moneyarray` type.
     */
    public const MONEYARRAY = 791;

    /**
     * OID of the `macaddr` type.
     */
    public const MACADDR = 829;

    /**
     * OID of the `inet` type.
     */
    public const INET = 869;

    /**
     * OID of the `cidr` type.
     */
    public const CIDR = 650;

    /**
     * OID of the `boolarray` type.
     */
    public const BOOLARRAY = 1000;

    /**
     * OID of the `byteaarray` type.
     */
    public const BYTEAARRAY = 1001;

    /**
     * OID of the `chararray` type.
     */
    public const CHARARRAY = 1002;

    /**
     * OID of the `namearray` type.
     */
    public const NAMEARRAY = 1003;

    /**
     * OID of the `int2array` type.
     */
    public const INT2ARRAY = 1005;

    /**
     * OID of the `int2vectorarray` type.
     */
    public const INT2VECTORARRAY = 1006;

    /**
     * OID of the `int4array` type.
     */
    public const INT4ARRAY = 1007;

    /**
     * OID of the `regprocarray` type.
     */
    public const REGPROCARRAY = 1008;

    /**
     * OID of the `textarray` type.
     */
    public const TEXTARRAY = 1009;

    /**
     * OID of the `oidarray` type.
     */
    public const OIDARRAY = 1028;

    /**
     * OID of the `tidarray` type.
     */
    public const TIDARRAY = 1010;

    /**
     * OID of the `xidarray` type.
     */
    public const XIDARRAY = 1011;

    /**
     * OID of the `cidarray` type.
     */
    public const CIDARRAY = 1012;

    /**
     * OID of the `oidvectorarray` type.
     */
    public const OIDVECTORARRAY = 1013;

    /**
     * OID of the `bpchararray` type.
     */
    public const BPCHARARRAY = 1014;

    /**
     * OID of the `varchararray` type.
     */
    public const VARCHARARRAY = 1015;

    /**
     * OID of the `int8array` type.
     */
    public const INT8ARRAY = 1016;

    /**
     * OID of the `pointarray` type.
     */
    public const POINTARRAY = 1017;

    /**
     * OID of the `lsegarray` type.
     */
    public const LSEGARRAY = 1018;

    /**
     * OID of the `patharray` type.
     */
    public const PATHARRAY = 1019;

    /**
     * OID of the `boxarray` type.
     */
    public const BOXARRAY = 1020;

    /**
     * OID of the `float4array` type.
     */
    public const FLOAT4ARRAY = 1021;

    /**
     * OID of the `float8array` type.
     */
    public const FLOAT8ARRAY = 1022;

    /**
     * OID of the `abstimearray` type.
     */
    public const ABSTIMEARRAY = 1023;

    /**
     * OID of the `reltimearray` type.
     */
    public const RELTIMEARRAY = 1024;

    /**
     * OID of the `tintervalarray` type.
     */
    public const TINTERVALARRAY = 1025;

    /**
     * OID of the `polygonarray` type.
     */
    public const POLYGONARRAY = 1027;

    /**
     * OID of the `aclitem` type.
     */
    public const ACLITEM = 1033;

    /**
     * OID of the `aclitemarray` type.
     */
    public const ACLITEMARRAY = 1034;

    /**
     * OID of the `macaddrarray` type.
     */
    public const MACADDRARRAY = 1040;

    /**
     * OID of the `inetarray` type.
     */
    public const INETARRAY = 1041;

    /**
     * OID of the `cidrarray` type.
     */
    public const CIDRARRAY = 651;

    /**
     * OID of the `cstringarray` type.
     */
    public const CSTRINGARRAY = 1263;

    /**
     * OID of the `bpchar` type.
     */
    public const BPCHAR = 1042;

    /**
     * OID of the `varchar` type.
     */
    public const VARCHAR = 1043;

    /**
     * OID of the `date` type.
     */
    public const DATE = 1082;

    /**
     * OID of the `time` type.
     */
    public const TIME = 1083;

    /**
     * OID of the `timestamp` type.
     */
    public const TIMESTAMP = 1114;

    /**
     * OID of the `timestamparray` type.
     */
    public const TIMESTAMPARRAY = 1115;

    /**
     * OID of the `datearray` type.
     */
    public const DATEARRAY = 1182;

    /**
     * OID of the `timearray` type.
     */
    public const TIMEARRAY = 1183;

    /**
     * OID of the `timestamptz` type.
     */
    public const TIMESTAMPTZ = 1184;

    /**
     * OID of the `timestamptzarray` type.
     */
    public const TIMESTAMPTZARRAY = 1185;

    /**
     * OID of the `interval` type.
     */
    public const INTERVAL = 1186;

    /**
     * OID of the `intervalarray` type.
     */
    public const INTERVALARRAY = 1187;

    /**
     * OID of the `numericarray` type.
     */
    public const NUMERICARRAY = 1231;

    /**
     * OID of the `timetz` type.
     */
    public const TIMETZ = 1266;

    /**
     * OID of the `timetzarray` type.
     */
    public const TIMETZARRAY = 1270;

    /**
     * OID of the `bit` type.
     */
    public const BIT = 1560;

    /**
     * OID of the `bitarray` type.
     */
    public const BITARRAY = 1561;

    /**
     * OID of the `varbit` type.
     */
    public const VARBIT = 1562;

    /**
     * OID of the `varbitarray` type.
     */
    public const VARBITARRAY = 1563;

    /**
     * OID of the `numeric` type.
     */
    public const NUMERIC = 1700;

    /**
     * OID of the `refcursor` type.
     */
    public const REFCURSOR = 1790;

    /**
     * OID of the `refcursorarray` type.
     */
    public const REFCURSORARRAY = 2201;

    /**
     * OID of the `regprocedure` type.
     */
    public const REGPROCEDURE = 2202;

    /**
     * OID of the `regoper` type.
     */
    public const REGOPER = 2203;

    /**
     * OID of the `regoperator` type.
     */
    public const REGOPERATOR = 2204;

    /**
     * OID of the `regclass` type.
     */
    public const REGCLASS = 2205;

    /**
     * OID of the `regtype` type.
     */
    public const REGTYPE = 2206;

    /**
     * OID of the `regprocedurearray` type.
     */
    public const REGPROCEDUREARRAY = 2207;

    /**
     * OID of the `regoperarray` type.
     */
    public const REGOPERARRAY = 2208;

    /**
     * OID of the `regoperatorarray` type.
     */
    public const REGOPERATORARRAY = 2209;

    /**
     * OID of the `regclassarray` type.
     */
    public const REGCLASSARRAY = 2210;

    /**
     * OID of the `regtypearray` type.
     */
    public const REGTYPEARRAY = 2211;

    /**
     * OID of the `uuid` type.
     */
    public const UUID = 2950;

    /**
     * OID of the `uuidarray` type.
     */
    public const UUIDARRAY = 2951;

    /**
     * OID of the `tsvector` type.
     */
    public const TSVECTOR = 3614;

    /**
     * OID of the `gtsvector` type.
     */
    public const GTSVECTOR = 3642;

    /**
     * OID of the `tsquery` type.
     */
    public const TSQUERY = 3615;

    /**
     * OID of the `regconfig` type.
     */
    public const REGCONFIG = 3734;

    /**
     * OID of the `regdictionary` type.
     */
    public const REGDICTIONARY = 3769;

    /**
     * OID of the `tsvectorarray` type.
     */
    public const TSVECTORARRAY = 3643;

    /**
     * OID of the `gtsvectorarray` type.
     */
    public const GTSVECTORARRAY = 3644;

    /**
     * OID of the `tsqueryarray` type.
     */
    public const TSQUERYARRAY = 3645;

    /**
     * OID of the `regconfigarray` type.
     */
    public const REGCONFIGARRAY = 3735;

    /**
     * OID of the `regdictionaryarray` type.
     */
    public const REGDICTIONARYARRAY = 3770;

    /**
     * OID of the `txid_snapshot` type.
     */
    public const TXID_SNAPSHOT = 2970;

    /**
     * OID of the `txid_snapshotarray` type.
     */
    public const TXID_SNAPSHOTARRAY = 2949;

    /**
     * OID of the `int4range` type.
     */
    public const INT4RANGE = 3904;

    /**
     * OID of the `int4rangearray` type.
     */
    public const INT4RANGEARRAY = 3905;

    /**
     * OID of the `numrange` type.
     */
    public const NUMRANGE = 3906;

    /**
     * OID of the `numrangearray` type.
     */
    public const NUMRANGEARRAY = 3907;

    /**
     * OID of the `tsrange` type.
     */
    public const TSRANGE = 3908;

    /**
     * OID of the `tsrangearray` type.
     */
    public const TSRANGEARRAY = 3909;

    /**
     * OID of the `tstzrange` type.
     */
    public const TSTZRANGE = 3910;

    /**
     * OID of the `tstzrangearray` type.
     */
    public const TSTZRANGEARRAY = 3911;

    /**
     * OID of the `daterange` type.
     */
    public const DATERANGE = 3912;

    /**
     * OID of the `daterangearray` type.
     */
    public const DATERANGEARRAY = 3913;

    /**
     * OID of the `int8range` type.
     */
    public const INT8RANGE = 3926;

    /**
     * OID of the `int8rangearray` type.
     */
    public const INT8RANGEARRAY = 3927;

    /**
     * OID of the `record` type.
     */
    public const RECORD = 2249;

    /**
     * OID of the `recordarray` type.
     */
    public const RECORDARRAY = 2287;

    /**
     * OID of the `cstring` type.
     */
    public const CSTRING = 2275;

    /**
     * OID of the `any` type.
     */
    public const ANY = 2276;

    /**
     * OID of the `anyarray` type.
     */
    public const ANYARRAY = 2277;

    /**
     * OID of the `void` type.
     */
    public const VOID = 2278;

    /**
     * OID of the `trigger` type.
     */
    public const TRIGGER = 2279;

    /**
     * OID of the `event_trigger` type.
     */
    public const EVENT_TRIGGER = 3838;

    /**
     * OID of the `language_handler` type.
     */
    public const LANGUAGE_HANDLER = 2280;

    /**
     * OID of the `internal` type.
     */
    public const INTERNAL = 2281;

    /**
     * OID of the `opaque` type.
     */
    public const OPAQUE = 2282;

    /**
     * OID of the `anyelement` type.
     */
    public const ANYELEMENT = 2283;

    /**
     * OID of the `anynonarray` type.
     */
    public const ANYNONARRAY = 2776;

    /**
     * OID of the `anyenum` type.
     */
    public const ANYENUM = 3500;

    /**
     * OID of the `fdw_handler` type.
     */
    public const FDW_HANDLER = 3115;

    /**
     * OID of the `anyrange` type.
     */
    public const ANYRANGE = 3831;

    /**
     * The connection which was used to obtain type information.
     *
     * @public
     * @readonly
     * @var \pq\Connection
     */
    public $connection;

    /**
     * Create a new instance populated with information obtained from the `pg_type` relation.
     *
     * @param \pq\Connection $conn The connection to use.
     * @param array $namespaces Which namespaces to query (defaults to `public` and `pg_catalog`).
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function __construct(pq\Connection $conn, array $namespaces = null) {}

    /**
     * Refresh type information from `pg_type`.
     *
     * @param array $namespaces Which namespaces to query (defaults to `public` and `pg_catalog`).
     * @throws \pq\Exception\InvalidArgumentException
     * @throws \pq\Exception\BadMethodCallException
     * @throws \pq\Exception\RuntimeException
     */
    public function refresh(array $namespaces = null) {}
}

namespace pq\Exception;

/**
 * A method call was not expected.
 */
class BadMethodCallException extends \BadMethodCallException implements \pq\Exception {}
/**
 * Implementation or SQL syntax error.
 */
class DomainException extends \DomainException implements \pq\Exception
{
    /**
     * The SQLSTATE code, see the [official documentation](http://www.postgresql.org/docs/current/static/errcodes-appendix.html) for further information.
     *
     * @public
     * @readonly
     * @var string
     */
    public $sqlstate;
}
/**
 * An invalid argument was passed to a method.
 */
class InvalidArgumentException extends \InvalidArgumentException implements \pq\Exception {}
/**
 * A runtime exception occurred.
 */
class RuntimeException extends \RuntimeException implements \pq\Exception {}
<?php

// Start of mssql v.

/**
 * (PHP 4, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Open MS SQL server connection
 * @link https://php.net/manual/en/function.mssql-connect.php
 * @param string $servername [optional] <p>
 * The MS SQL server. It can also include a port number, e.g.
 * hostname:port (Linux), or
 * hostname,port (Windows).
 * </p>
 * @param string $username [optional] <p>
 * The username.
 * </p>
 * @param string $password [optional] <p>
 * The password.
 * </p>
 * @param bool $new_link [optional] <p>
 * If a second call is made to mssql_connect with the
 * same arguments, no new link will be established, but instead, the link
 * identifier of the already opened link will be returned. This parameter
 * modifies this behavior and makes mssql_connect
 * always open a new link, even if mssql_connect was
 * called before with the same parameters.
 * </p>
 * @return resource|false a MS SQL link identifier on success, or false on error.
 * @removed 7.0
 */
function mssql_connect($servername = null, $username = null, $password = null, $new_link = false) {}

/**
 * (PHP 4, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Open persistent MS SQL connection
 * @link https://php.net/manual/en/function.mssql-pconnect.php
 * @param string $servername [optional] <p>
 * The MS SQL server. It can also include a port number. e.g.
 * hostname:port.
 * </p>
 * @param string $username [optional] <p>
 * The username.
 * </p>
 * @param string $password [optional] <p>
 * The password.
 * </p>
 * @param bool $new_link [optional] <p>
 * If a second call is made to mssql_pconnect with
 * the same arguments, no new link will be established, but instead, the
 * link identifier of the already opened link will be returned. This
 * parameter modifies this behavior and makes
 * mssql_pconnect always open a new link, even if
 * mssql_pconnect was called before with the same
 * parameters.
 * </p>
 * @return resource|false a positive MS SQL persistent link identifier on success, or
 * false on error.
 * @removed 7.0
 */
function mssql_pconnect($servername = null, $username = null, $password = null, $new_link = false) {}

/**
 * (PHP 4, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Close MS SQL Server connection
 * @link https://php.net/manual/en/function.mssql-close.php
 * @param resource $link_identifier [optional] <p>
 * A MS SQL link identifier, returned by
 * mssql_connect.
 * </p>
 * <p>
 * This function will not close persistent links generated by
 * mssql_pconnect.
 * </p>
 * @return bool true on success or false on failure.
 * @removed 7.0
 */
function mssql_close($link_identifier = null) {}

/**
 * (PHP 4, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Select MS SQL database
 * @link https://php.net/manual/en/function.mssql-select-db.php
 * @param string $database_name <p>
 * The database name.
 * </p>
 * <p>
 * To escape the name of a database that contains spaces, hyphens ("-"),
 * or any other exceptional characters, the database name must be
 * enclosed in brackets, as is shown in the example, below. This
 * technique must also be applied when selecting a database name that is
 * also a reserved word (such as primary).
 * </p>
 * @param resource $link_identifier [optional] <p>
 * A MS SQL link identifier, returned by
 * mssql_connect or
 * mssql_pconnect.
 * </p>
 * <p>
 * If no link identifier is specified, the last opened link is assumed.
 * If no link is open, the function will try to establish a link as if
 * mssql_connect was called, and use it.
 * </p>
 * @return bool true on success or false on failure.
 * @removed 7.0
 */
function mssql_select_db($database_name, $link_identifier = null) {}

/**
 * (PHP 4, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Send MS SQL query
 * @link https://php.net/manual/en/function.mssql-query.php
 * @param string $query <p>
 * An SQL query.
 * </p>
 * @param resource $link_identifier [optional] <p>
 * A MS SQL link identifier, returned by
 * mssql_connect or
 * mssql_pconnect.
 * </p>
 * <p>
 * If the link identifier isn't specified, the last opened link is
 * assumed. If no link is open, the function tries to establish a link
 * as if mssql_connect was called, and use it.
 * </p>
 * @param int $batch_size [optional] <p>
 * The number of records to batch in the buffer.
 * </p>
 * @return resource|bool a MS SQL result resource on success, true if no rows were
 * returned, or false on error.
 * @removed 7.0
 */
function mssql_query($query, $link_identifier = null, $batch_size = 0) {}

/**
 * (PHP 4 &gt;= 4.0.4, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Returns the next batch of records
 * @link https://php.net/manual/en/function.mssql-fetch-batch.php
 * @param resource $result <p>
 * The result resource that is being evaluated. This result comes from a
 * call to mssql_query.
 * </p>
 * @return int the batch number as an integer.
 * @removed 7.0
 */
function mssql_fetch_batch($result) {}

/**
 * (PHP 4 &gt;= 4.0.4, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Returns the number of records affected by the query
 * @link https://php.net/manual/en/function.mssql-rows-affected.php
 * @param resource $link_identifier <p>
 * A MS SQL link identifier, returned by
 * mssql_connect or
 * mssql_pconnect.
 * </p>
 * @return int the number of records affected by last operation.
 * @removed 7.0
 */
function mssql_rows_affected($link_identifier) {}

/**
 * (PHP 4, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Free result memory
 * @link https://php.net/manual/en/function.mssql-free-result.php
 * @param resource $result <p>
 * The result resource that is being freed. This result comes from a
 * call to mssql_query.
 * </p>
 * @return bool true on success or false on failure.
 * @removed 7.0
 */
function mssql_free_result($result) {}

/**
 * (PHP 4, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Returns the last message from the server
 * @link https://php.net/manual/en/function.mssql-get-last-message.php
 * @return string last error message from server, or an empty string if
 * no error messages are returned from MSSQL.
 * @removed 7.0
 */
function mssql_get_last_message() {}

/**
 * (PHP 4, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Gets the number of rows in result
 * @link https://php.net/manual/en/function.mssql-num-rows.php
 * @param resource $result <p>
 * The result resource that is being evaluated. This result comes from a
 * call to mssql_query.
 * </p>
 * @return int the number of rows, as an integer.
 * @removed 7.0
 */
function mssql_num_rows($result) {}

/**
 * (PHP 4, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Gets the number of fields in result
 * @link https://php.net/manual/en/function.mssql-num-fields.php
 * @param resource $result <p>
 * The result resource that is being evaluated. This result comes from a
 * call to mssql_query.
 * </p>
 * @return int the number of fields, as an integer.
 * @removed 7.0
 */
function mssql_num_fields($result) {}

/**
 * (PHP 4, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Get field information
 * @link https://php.net/manual/en/function.mssql-fetch-field.php
 * @param resource $result <p>
 * The result resource that is being evaluated. This result comes from a
 * call to mssql_query.
 * </p>
 * @param int $field_offset [optional] <p>
 * The numerical field offset. If the field offset is not specified, the
 * next field that was not yet retrieved by this function is retrieved. The
 * field_offset starts at 0.
 * </p>
 * @return object an object containing field information.
 * @removed 7.0
 */
function mssql_fetch_field($result, $field_offset = -1) {}

/**
 * (PHP 4, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Get row as enumerated array
 * @link https://php.net/manual/en/function.mssql-fetch-row.php
 * @param resource $result <p>
 * The result resource that is being evaluated. This result comes from a
 * call to mssql_query.
 * </p>
 * @return array|false an array that corresponds to the fetched row, or false if there
 * are no more rows.
 * @removed 7.0
 */
function mssql_fetch_row($result) {}

/**
 * (PHP 4, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Fetch a result row as an associative array, a numeric array, or both
 * @link https://php.net/manual/en/function.mssql-fetch-array.php
 * @param resource $result <p>
 * The result resource that is being evaluated. This result comes from a
 * call to mssql_query.
 * </p>
 * @param int $result_type [optional] <p>
 * The type of array that is to be fetched. It's a constant and can take
 * the following values: MSSQL_ASSOC,
 * MSSQL_NUM, and
 * MSSQL_BOTH.
 * </p>
 * @return array|false an array that corresponds to the fetched row, or false if there
 * are no more rows.
 * @removed 7.0
 */
function mssql_fetch_array($result, $result_type = MSSQL_BOTH) {}

/**
 * (PHP 4 &gt;= 4.2.0, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Returns an associative array of the current row in the result
 * @link https://php.net/manual/en/function.mssql-fetch-assoc.php
 * @param resource $result_id <p>
 * The result resource that is being evaluated. This result comes from a
 * call to mssql_query.
 * </p>
 * @return array an associative array that corresponds to the fetched row, or
 * false if there are no more rows.
 * @removed 7.0
 */
function mssql_fetch_assoc($result_id) {}

/**
 * (PHP 4, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Fetch row as object
 * @link https://php.net/manual/en/function.mssql-fetch-object.php
 * @param resource $result <p>
 * The result resource that is being evaluated. This result comes from a
 * call to mssql_query.
 * </p>
 * @return object an object with properties that correspond to the fetched row, or
 * false if there are no more rows.
 * @removed 7.0
 */
function mssql_fetch_object($result) {}

/**
 * (PHP 4, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Get the length of a field
 * @link https://php.net/manual/en/function.mssql-field-length.php
 * @param resource $result <p>
 * The result resource that is being evaluated. This result comes from a
 * call to mssql_query.
 * </p>
 * @param int $offset [optional] <p>
 * The field offset, starts at 0. If omitted, the current field is used.
 * </p>
 * @return int|false The length of the specified field index on success or false on failure.
 * @removed 7.0
 */
function mssql_field_length($result, $offset = null) {}

/**
 * (PHP 4, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Get the name of a field
 * @link https://php.net/manual/en/function.mssql-field-name.php
 * @param resource $result <p>
 * The result resource that is being evaluated. This result comes from a
 * call to mssql_query.
 * </p>
 * @param int $offset [optional] <p>
 * The field offset, starts at 0. If omitted, the current field is used.
 * </p>
 * @return string|false The name of the specified field index on success or false on failure.
 * @removed 7.0
 */
function mssql_field_name($result, $offset = -1) {}

/**
 * (PHP 4, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Gets the type of a field
 * @link https://php.net/manual/en/function.mssql-field-type.php
 * @param resource $result <p>
 * The result resource that is being evaluated. This result comes from a
 * call to mssql_query.
 * </p>
 * @param int $offset [optional] <p>
 * The field offset, starts at 0. If omitted, the current field is used.
 * </p>
 * @return string|false The type of the specified field index on success or false on failure.
 * @removed 7.0
 */
function mssql_field_type($result, $offset = -1) {}

/**
 * (PHP 4, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Moves internal row pointer
 * @link https://php.net/manual/en/function.mssql-data-seek.php
 * @param resource $result_identifier <p>
 * The result resource that is being evaluated.
 * </p>
 * @param int $row_number <p>
 * The desired row number of the new result pointer.
 * </p>
 * @return bool true on success or false on failure.
 * @removed 7.0
 */
function mssql_data_seek($result_identifier, $row_number) {}

/**
 * (PHP 4, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Seeks to the specified field offset
 * @link https://php.net/manual/en/function.mssql-field-seek.php
 * @param resource $result <p>
 * The result resource that is being evaluated. This result comes from a
 * call to mssql_query.
 * </p>
 * @param int $field_offset <p>
 * The field offset, starts at 0.
 * </p>
 * @return bool true on success or false on failure.
 * @removed 7.0
 */
function mssql_field_seek($result, $field_offset) {}

/**
 * (PHP 4, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Get result data
 * @link https://php.net/manual/en/function.mssql-result.php
 * @param resource $result <p>
 * The result resource that is being evaluated. This result comes from a
 * call to mssql_query.
 * </p>
 * @param int $row <p>
 * The row number.
 * </p>
 * @param mixed $field <p>
 * Can be the field's offset, the field's name or the field's table dot
 * field's name (tablename.fieldname). If the column name has been
 * aliased ('select foo as bar from...'), it uses the alias instead of
 * the column name.
 * </p>
 * <p>
 * Specifying a numeric offset for the field
 * argument is much quicker than specifying a
 * fieldname or
 * tablename.fieldname argument.
 * </p>
 * @return string the contents of the specified cell.
 * @removed 7.0
 */
function mssql_result($result, $row, $field) {}

/**
 * (PHP 4 &gt;= 4.0.5, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Move the internal result pointer to the next result
 * @link https://php.net/manual/en/function.mssql-next-result.php
 * @param resource $result_id <p>
 * The result resource that is being evaluated. This result comes from a
 * call to mssql_query.
 * </p>
 * @return bool true if an additional result set was available or false
 * otherwise.
 * @removed 7.0
 */
function mssql_next_result($result_id) {}

/**
 * (PHP 4, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Sets the minimum error severity
 * @link https://php.net/manual/en/function.mssql-min-error-severity.php
 * @param int $severity <p>
 * The new error severity.
 * </p>
 * @return void
 * @removed 7.0
 */
function mssql_min_error_severity($severity) {}

/**
 * (PHP 4, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Sets the minimum message severity
 * @link https://php.net/manual/en/function.mssql-min-message-severity.php
 * @param int $severity <p>
 * The new message severity.
 * </p>
 * @return void
 * @removed 7.0
 */
function mssql_min_message_severity($severity) {}

/**
 * (PHP 4 &gt;= 4.0.7, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Initializes a stored procedure or a remote stored procedure
 * @link https://php.net/manual/en/function.mssql-init.php
 * @param string $sp_name <p>
 * Stored procedure name, like ownew.sp_name or
 * otherdb.owner.sp_name.
 * </p>
 * @param resource $link_identifier [optional] <p>
 * A MS SQL link identifier, returned by
 * mssql_connect.
 * </p>
 * @return resource|false a resource identifier "statement", used in subsequent calls to
 * mssql_bind and mssql_execute,
 * or false on errors.
 * @removed 7.0
 */
function mssql_init($sp_name, $link_identifier = null) {}

/**
 * (PHP 4 &gt;= 4.0.7, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Adds a parameter to a stored procedure or a remote stored procedure
 * @link https://php.net/manual/en/function.mssql-bind.php
 * @param resource $stmt <p>
 * Statement resource, obtained with mssql_init.
 * </p>
 * @param string $param_name <p>
 * The parameter name, as a string.
 * </p>
 * <p>
 * You have to include the @ character, like in the
 * T-SQL syntax. See the explanation included in
 * mssql_execute.
 * </p>
 * @param mixed &$var <p>
 * The PHP variable you'll bind the MSSQL parameter to. It is passed by
 * reference, to retrieve OUTPUT and RETVAL values after
 * the procedure execution.
 * </p>
 * @param int $type <p>
 * One of: SQLTEXT,
 * SQLVARCHAR, SQLCHAR,
 * SQLINT1, SQLINT2,
 * SQLINT4, SQLBIT,
 * SQLFLT4, SQLFLT8,
 * SQLFLTN.
 * </p>
 * @param bool $is_output [optional] <p>
 * Whether the value is an OUTPUT parameter or not. If it's an OUTPUT
 * parameter and you don't mention it, it will be treated as a normal
 * input parameter and no error will be thrown.
 * </p>
 * @param bool $is_null [optional] <p>
 * Whether the parameter is null or not. Passing the null value as
 * var will not do the job.
 * </p>
 * @param int $maxlen [optional] <p>
 * Used with char/varchar values. You have to indicate the length of the
 * data so if the parameter is a varchar(50), the type must be
 * SQLVARCHAR and this value 50.
 * </p>
 * @return bool true on success or false on failure.
 * @removed 7.0
 */
function mssql_bind($stmt, $param_name, &$var, $type, $is_output = false, $is_null = false, $maxlen = -1) {}

/**
 * (PHP 4 &gt;= 4.0.7, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Executes a stored procedure on a MS SQL server database
 * @link https://php.net/manual/en/function.mssql-execute.php
 * @param resource $stmt <p>
 * Statement handle obtained with mssql_init.
 * </p>
 * @param bool $skip_results [optional] <p>
 * Whenever to skip the results or not.
 * </p>
 * @return mixed
 * @removed 7.0
 */
function mssql_execute($stmt, $skip_results = false) {}

/**
 * (PHP 4 &gt;= 4.3.2, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Free statement memory
 * @link https://php.net/manual/en/function.mssql-free-statement.php
 * @param resource $stmt <p>
 * Statement resource, obtained with mssql_init.
 * </p>
 * @return bool true on success or false on failure.
 * @removed 7.0
 */
function mssql_free_statement($stmt) {}

/**
 * (PHP 4 &gt;= 4.0.7, PHP 5, PECL odbtp &gt;= 1.1.1)<br/>
 * Converts a 16 byte binary GUID to a string
 * @link https://php.net/manual/en/function.mssql-guid-string.php
 * @param string $binary <p>
 * A 16 byte binary GUID.
 * </p>
 * @param bool $short_format [optional] <p>
 * Whenever to use short format.
 * </p>
 * @return string the converted string on success.
 * @removed 7.0
 */
function mssql_guid_string($binary, $short_format = null) {}

/**
 * Return an associative array. Used on
 * mssql_fetch_array's
 * result_type parameter.
 * @link https://php.net/manual/en/mssql.constants.php
 */
define('MSSQL_ASSOC', 1);

/**
 * Return an array with numeric keys. Used on
 * mssql_fetch_array's
 * result_type parameter.
 * @link https://php.net/manual/en/mssql.constants.php
 */
define('MSSQL_NUM', 2);

/**
 * Return an array with both numeric keys and
 * keys with their field name. This is the
 * default value for mssql_fetch_array's
 * result_type parameter.
 * @link https://php.net/manual/en/mssql.constants.php
 */
define('MSSQL_BOTH', 3);

/**
 * Indicates the 'TEXT' type in MSSQL, used by
 * mssql_bind's type
 * parameter.
 * @link https://php.net/manual/en/mssql.constants.php
 */
define('SQLTEXT', 35);

/**
 * Indicates the 'VARCHAR' type in MSSQL, used by
 * mssql_bind's type
 * parameter.
 * @link https://php.net/manual/en/mssql.constants.php
 */
define('SQLVARCHAR', 39);

/**
 * Indicates the 'CHAR' type in MSSQL, used by
 * mssql_bind's type
 * parameter.
 * @link https://php.net/manual/en/mssql.constants.php
 */
define('SQLCHAR', 47);

/**
 * Represents one byte, with a range of -128 to 127.
 * @link https://php.net/manual/en/mssql.constants.php
 */
define('SQLINT1', 48);

/**
 * Represents two bytes, with a range of -32768
 * to 32767.
 * @link https://php.net/manual/en/mssql.constants.php
 */
define('SQLINT2', 52);

/**
 * Represents four bytes, with a range of -2147483648
 * to 2147483647.
 * @link https://php.net/manual/en/mssql.constants.php
 */
define('SQLINT4', 56);

/**
 * Indicates the 'BIT' type in MSSQL, used by
 * mssql_bind's type
 * parameter.
 * @link https://php.net/manual/en/mssql.constants.php
 */
define('SQLBIT', 50);

/**
 * Represents an four byte float.
 * @link https://php.net/manual/en/mssql.constants.php
 */
define('SQLFLT4', 59);

/**
 * Represents an eight byte float.
 * @link https://php.net/manual/en/mssql.constants.php
 */
define('SQLFLT8', 62);
define('SQLFLTN', 109);

// End of mssql v.
<?php
/**
 * @xglobal $GLOBALS array
 * Contains a reference to every variable which is currently available within the global scope of the script.
 *   The keys of this array are the names of the global variables.
 *   $GLOBALS has existed since PHP 3.
 *
 * <p><a href="https://secure.php.net/manual/en/reserved.variables.php">https://secure.php.net/manual/en/reserved.variables.php</a>
 */
$GLOBALS = [];

/**
 * @xglobal $_COOKIE array
 * Variables provided to the script via HTTP cookies. Analogous to the old $HTTP_COOKIE_VARS array
 * (which is still available, but deprecated).
 *
 * <p><a href="https://secure.php.net/manual/en/reserved.variables.php">
 * https://secure.php.net/manual/en/reserved.variables.php</a>
 */
$_COOKIE = [];

/**
 * @xglobal $_ENV array
 * @xglobal $HTTP_ENV_VARS array
 *
 * Variables provided to the script via the environment.
 * Analogous to the old $HTTP_ENV_VARS array (which is still available, but deprecated).
 *
 * <p><a href="https://secure.php.net/manual/en/reserved.variables.php">
 * https://secure.php.net/manual/en/reserved.variables.php</a>
 */
$_ENV = [];
/**
 * @deprecated 4.1
 * @removed 5.4
 */
$HTTP_ENV_VARS = [];

/**
 * @xglobal $_FILES array
 * @xglobal $HTTP_POST_FILES array
 *
 * Variables provided to the script via HTTP post file uploads. Analogous to the old $HTTP_POST_FILES array
 * (which is still available, but deprecated).
 * See POST method uploads for more information.
 *
 * <p><a href="https://secure.php.net/manual/en/reserved.variables.php">
 * https://secure.php.net/manual/en/reserved.variables.php</a>
 */
$_FILES = [];
/**
 * @deprecated 4.1
 * @removed 5.4
 */
$HTTP_POST_FILES = [];

/**
 * @xglobal $_GET array
 * @xglobal $HTTP_GET_VARS array
 *
 * Variables provided to the script via URL query string.
 *  Analogous to the old $HTTP_GET_VARS array (which is still available, but deprecated).
 *
 * <p><a href="https://secure.php.net/manual/en/reserved.variables.php">
 * https://secure.php.net/manual/en/reserved.variables.php</a>
 */
$_GET = [];
/**
 * @deprecated 4.1
 * @removed 5.4
 */
$HTTP_GET_VARS = [];

/**
 * @xglobal $_POST array
 * @xglobal $HTTP_POST_VARS array
 *
 * Variables provided to the script via HTTP POST. Analogous to the old $HTTP_POST_VARS array
 * (which is still available, but deprecated).
 * @link https://secure.php.net/manual/en/language.variables.predefined.php
 *
 * <p><a href="https://secure.php.net/manual/en/reserved.variables.php">
 * https://secure.php.net/manual/en/reserved.variables.php</a>
 */
$_POST = [];
/**
 * @deprecated 4.1
 * @removed 5.4
 */
$HTTP_POST_VARS = [];

/**
 *  @xglobal $_REQUEST array
 * Variables provided to the script via the GET, POST, and COOKIE input mechanisms,
 * and which therefore cannot be trusted.
 * The presence and order of variable inclusion in this array is defined according to the
 * PHP variables_order configuration directive.
 * This array has no direct analogue in versions of PHP prior to 4.1.0.
 * See also import_request_variables().
 * <p>
 * Caution
 *  <p>Since PHP 4.3.0, FILE information from $_FILES does not exist in $_REQUEST.
 * <p>
 * Note: When running on the command line , this will not include the argv and argc entries; these are present in the $_SERVER array.
 *
 *
 * <p><a href="https://secure.php.net/manual/en/reserved.variables.php">
 * https://secure.php.net/manual/en/reserved.variables.php</a>
 */
$_REQUEST = [];

/**
 * @xglobal $_SERVER array
 * @xglobal $HTTP_SERVER_VARS array
 *
 * Variables set by the web server or otherwise directly related to the execution environment of the current script.
 * Analogous to the old $HTTP_SERVER_VARS array (which is still available, but deprecated).
 *
 * <p><a href="https://secure.php.net/manual/en/reserved.variables.php">
 * https://secure.php.net/manual/en/reserved.variables.php</a>
 */
$_SERVER = [];
/**
 * @deprecated 4.1
 * @removed 5.4
 */
$HTTP_SERVER_VARS = [];

$_SERVER['PHP_SELF'] = '';
$_SERVER['argv'] = '';
$_SERVER['argc'] = '';
$_SERVER['GATEWAY_INTERFACE'] = 'CGI/1.1';
$_SERVER['SERVER_ADDR'] = '127.0.0.1';
$_SERVER['SERVER_NAME'] = 'localhost';
$_SERVER['SERVER_SOFTWARE'] = '';
$_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.0';
$_SERVER['REQUEST_METHOD'] = 'GET';
$_SERVER['REQUEST_TIME'] = '';
$_SERVER['QUERY_STRING'] = '';
$_SERVER['DOCUMENT_ROOT'] = '';
$_SERVER['HTTP_ACCEPT'] = '';
$_SERVER['HTTP_ACCEPT_CHARSET'] = 'iso-8859-1,*,utf-8';
$_SERVER['HTTP_ACCEPT_ENCODING'] = 'gzip';
$_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'en';
$_SERVER['HTTP_CONNECTION'] = 'Keep-Alive';
$_SERVER['HTTP_HOST'] = '';
$_SERVER['HTTP_REFERER'] = '';
$_SERVER['HTTP_USER_AGENT'] = 'Mozilla/4.5 [en] (X11; U; Linux 2.2.9 i586).';
$_SERVER['HTTPS'] = '';
$_SERVER['REMOTE_ADDR'] = '';
$_SERVER['REMOTE_HOST'] = '';
$_SERVER['REMOTE_PORT'] = '';
$_SERVER['SCRIPT_FILENAME'] = '';
$_SERVER['SERVER_ADMIN'] = '';
$_SERVER['SERVER_PORT'] = '80';
$_SERVER['SERVER_SIGNATURE'] = '';
$_SERVER['PATH_TRANSLATED'] = '';
$_SERVER['SCRIPT_NAME'] = '';
$_SERVER['REQUEST_URI'] = '/index.html';
$_SERVER['PHP_AUTH_DIGEST'] = '';
$_SERVER['PHP_AUTH_USER'] = '';
$_SERVER['PHP_AUTH_PW'] = '';
$_SERVER['AUTH_TYPE'] = '';
$_SERVER['PATH_INFO'] = '';
$_SERVER['ORIG_PATH_INFO'] = '';

/**
 *  @xglobal $_SESSION array
 *  @xglobal $HTTP_SESSION_VARS array
 *
 * Variables which are currently registered to a script's session.
 * Analogous to the old $HTTP_SESSION_VARS array (which is still available, but deprecated).
 * See the Session handling functions section for more information.
 *
 * <p><a href="https://secure.php.net/manual/en/reserved.variables.php">
 * https://secure.php.net/manual/en/reserved.variables.php</a>
 */
$_SESSION = [];
/**
 * @deprecated 4.1
 * @removed 5.4
 */
$HTTP_SESSION_VARS = [];

/**
 * @xglobal $argc int
 * @type int<1, max>
 *
 * The number of arguments passed to script
 *
 * <p><a href="https://secure.php.net/manual/en/reserved.variables.php">
 * https://secure.php.net/manual/en/reserved.variables.php</a>
 */
$argc = 0;

/**
 *  @xglobal $argv array
 *
 * Array of arguments passed to script
 *
 * <p><a href="https://secure.php.net/manual/en/reserved.variables.php">
 * https://secure.php.net/manual/en/reserved.variables.php</a>
 */
$argv = [1 + 1 => "a" . "b"];

/**
 * @xglobal $HTTP_RAW_POST_DATA string
 *
 * Raw POST data
 *
 * <p><a href="https://secure.php.net/manual/en/reserved.variables.php">
 * https://secure.php.net/manual/en/reserved.variables.php</a>
 *
 * @deprecated 5.6 Deprecated as of PHP 5.6.0. Use the php://input stream instead.
 * @removed 7.0
 */
$HTTP_RAW_POST_DATA = '';

/**
 * @xglobal $http_response_header array
 *
 * HTTP response headers
 *
 * <p><a href="https://secure.php.net/manual/en/reserved.variables.php">
 * https://secure.php.net/manual/en/reserved.variables.php</a>
 */
$http_response_header = [];

/**
 * @xglobal $php_errormsg string
 *  The previous error message
 *
 * <p><a href="https://secure.php.net/manual/en/reserved.variables.php">
 * https://secure.php.net/manual/en/reserved.variables.php</a>
 * @deprecated 7.2
 */
$php_errormsg = '';
<?php

// Start of oci8 v.2.0.7
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;

/**
 * OCI8 LOB functionality for large binary (BLOB) and character (CLOB) objects.
 * @link https://php.net/manual/en/class.OCI-Lob.php
 * @removed 8.0
 */
class OCI_Lob
{
    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Returns large object's contents
     * @link https://php.net/manual/en/oci-lob.load.php
     * @return string|false The contents of the object, or <b>FALSE</b> on errors.
     */
    public function load() {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Returns the current position of internal pointer of large object
     * @link https://php.net/manual/en/oci-lob.tell.php
     * @return int|false Current position of a LOB's internal pointer or <b>FALSE</b> if an
     * error occurred.
     */
    public function tell() {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Truncates large object
     * @link https://php.net/manual/en/oci-lob.truncate.php
     * @param int $length [optional] <p>
     * If provided, this method will truncate the LOB to
     * <i>length</i> bytes. Otherwise, it will completely
     * purge the LOB.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function truncate($length = 0) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Erases a specified portion of the internal LOB data
     * @link https://php.net/manual/en/oci-lob.erase.php
     * @param int $offset [optional]
     * @param int $length [optional]
     * @return int|false The actual number of characters/bytes erased or <b>FALSE</b> on failure.
     */
    public function erase($offset = null, $length = null) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Flushes/writes buffer of the LOB to the server
     * @link https://php.net/manual/en/oci-lob.flush.php
     * @param int $flag [optional] <p>
     * By default, resources are not freed, but using flag
     * <b>OCI_LOB_BUFFER_FREE</b> you can do it explicitly.
     * Be sure you know what you're doing - next read/write operation to the
     * same part of LOB will involve a round-trip to the server and initialize
     * new buffer resources. It is recommended to use
     * <b>OCI_LOB_BUFFER_FREE</b> flag only when you are not
     * going to work with the LOB anymore.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * </p>
     * <p>
     * Returns <b>FALSE</b> if buffering was not enabled or an error occurred.
     */
    public function flush($flag = null) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Changes current state of buffering for the large object
     * @link https://php.net/manual/en/oci-lob.setbuffering.php
     * @param bool $on_off <p>
     * <b>TRUE</b> for on and <b>FALSE</b> for off.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. Repeated calls to this method with the same flag will
     * return <b>TRUE</b>.
     */
    public function setbuffering($on_off) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Returns current state of buffering for the large object
     * @link https://php.net/manual/en/oci-lob.getbuffering.php
     * @return bool <b>FALSE</b> if buffering for the large object is off and <b>TRUE</b> if
     * buffering is used.
     */
    public function getbuffering() {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Moves the internal pointer to the beginning of the large object
     * @link https://php.net/manual/en/oci-lob.rewind.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function rewind() {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Reads part of the large object
     * @link https://php.net/manual/en/oci-lob.read.php
     * @param int $length <p>
     * The length of data to read, in bytes. Large values will be rounded down to 1 MB.
     * </p>
     * @return string|false The contents as a string, or <b>FALSE</b> on failure.
     */
    public function read($length) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Tests for end-of-file on a large object's descriptor
     * @link https://php.net/manual/en/oci-lob.eof.php
     * @return bool <b>TRUE</b> if internal pointer of large object is at the end of LOB.
     * Otherwise returns <b>FALSE</b>.
     */
    public function eof() {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Sets the internal pointer of the large object
     * @link https://php.net/manual/en/oci-lob.seek.php
     * @param int $offset <p>
     * Indicates the amount of bytes, on which internal pointer should be
     * moved from the position, pointed by <i>whence</i>.
     * </p>
     * @param int $whence [optional] <p>
     * May be one of:
     * <b>OCI_SEEK_SET</b> - sets the position equal to
     * <i>offset</i>
     * <b>OCI_SEEK_CUR</b> - adds <i>offset</i>
     * bytes to the current position
     * <b>OCI_SEEK_END</b> - adds <i>offset</i>
     * bytes to the end of large object (use negative value to move to a position
     * before the end of large object)
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function seek($offset, $whence = OCI_SEEK_SET) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Writes data to the large object
     * @link https://php.net/manual/en/oci-lob.write.php
     * @param string $data <p>
     * The data to write in the LOB.
     * </p>
     * @param int $length [optional] <p>
     * If this parameter is given, writing will stop after
     * <i>length</i> bytes have been written or the end of
     * <i>data</i> is reached, whichever comes first.
     * </p>
     * @return int|false The number of bytes written or <b>FALSE</b> on failure.
     */
    public function write($data, $length = null) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Appends data from the large object to another large object
     * @link https://php.net/manual/en/oci-lob.append.php
     * @param OCI_Lob $lob_from <p>
     * The copied LOB.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function append(#[LanguageLevelTypeAware(['8.0' => 'OCILob'], default: 'OCI_Lob')] $lob_from) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Returns size of large object
     * @link https://php.net/manual/en/oci-lob.size.php
     * @return int|false Length of large object value or <b>FALSE</b> on failure.
     * Empty objects have zero length.
     */
    public function size() {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Alias of {@see OCI_Lob::export}
     * @link https://php.net/manual/en/oci-lob.writetofile.php
     * @param $filename
     * @param $start [optional]
     * @param $length [optional]
     * @return bool TRUE on success or FALSE on failure.
     */
    public function writetofile($filename, $start, $length) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Exports LOB's contents to a file
     * @link https://php.net/manual/en/oci-lob.export.php
     * @param string $filename <p>
     * Path to the file.
     * </p>
     * @param int $start [optional] <p>
     * Indicates from where to start exporting.
     * </p>
     * @param int $length [optional] <p>
     * Indicates the length of data to be exported.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function export($filename, $start = null, $length = null) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Imports file data to the LOB
     * @link https://php.net/manual/en/oci-lob.import.php
     * @param string $filename <p>
     * Path to the file.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function import($filename) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Writes a temporary large object
     * @link https://php.net/manual/en/oci-lob.writetemporary.php
     * @param string $data <p>
     * The data to write.
     * </p>
     * @param int $lob_type [optional] <p>
     * Can be one of the following:
     * <b>OCI_TEMP_BLOB</b> is used to create temporary BLOBs
     * <b>OCI_TEMP_CLOB</b> is used to create
     * temporary CLOBs
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function writeTemporary($data, $lob_type = OCI_TEMP_CLOB) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Closes LOB descriptor
     * @link https://php.net/manual/en/oci-lob.close.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function close() {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Saves data to the large object
     * @link https://php.net/manual/en/oci-lob.save.php
     * @param string $data <p>
     * The data to be saved.
     * </p>
     * @param int $offset [optional] <p>
     * Can be used to indicate offset from the beginning of the large object.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function save($data, $offset = null) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Alias of {@see OCI_Lob::import}
     * @link https://php.net/manual/en/oci-lob.savefile.php
     * @param $filename
     * @return bool Return true on success and false on failure
     */
    public function savefile($filename) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Frees resources associated with the LOB descriptor
     * @link https://php.net/manual/en/oci-lob.free.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function free() {}
}

/**
 * OCI8 Collection functionality.
 * @link https://php.net/manual/en/class.OCI-Collection.php
 * @removed 8.0
 */
class OCI_Collection
{
    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Appends element to the collection
     * @link https://php.net/manual/en/oci-collection.append.php
     * @param mixed $value <p>
     * The value to be added to the collection. Can be a string or a number.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function append($value) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Returns value of the element
     * @link https://php.net/manual/en/oci-collection.getelem.php
     * @param int $index <p>
     * The element index. First index is 0.
     * </p>
     * @return mixed <b>FALSE</b> if such element doesn't exist; <b>NULL</b> if element is <b>NULL</b>;
     * string if element is column of a string datatype or number if element is
     * numeric field.
     */
    public function getelem($index) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Assigns a value to the element of the collection
     * @link https://php.net/manual/en/oci-collection.assignelem.php
     * @param int $index <p>
     * The element index. First index is 0.
     * </p>
     * @param mixed $value <p>
     * Can be a string or a number.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function assignelem($index, $value) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Assigns a value to the collection from another existing collection
     * @link https://php.net/manual/en/oci-collection.assign.php
     * @param OCI_Collection $from <p>
     * An instance of OCI-Collection.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function assign(#[LanguageLevelTypeAware(['8.0' => 'OCICollection'], default: 'OCI_Collection')] $from) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Returns size of the collection
     * @link https://php.net/manual/en/oci-collection.size.php
     * @return int|false The number of elements in the collection or <b>FALSE</b> on error.
     */
    public function size() {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Returns the maximum number of elements in the collection
     * @link https://php.net/manual/en/oci-collection.max.php
     * @return int|false The maximum number as an integer, or <b>FALSE</b> on errors.
     * </p>
     * <p>
     * If the returned value is 0, then the number of elements is not limited.
     */
    public function max() {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Trims elements from the end of the collection
     * @link https://php.net/manual/en/oci-collection.trim.php
     * @param int $num <p>
     * The number of elements to be trimmed.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function trim($num) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Frees the resources associated with the collection object
     * @link https://php.net/manual/en/oci-collection.free.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function free() {}
}

/**
 * Register a user-defined callback function for Oracle Database TAF.
 * @link https://www.php.net/manual/en/function.oci-register-taf-callback.php
 * @param resource $connection <p>
 * An Oracle connection identifier.
 * </p>
 * @param mixed $callbackFn [optional] <p>
 * A user-defined callback to register for Oracle TAF. It can be a string of the function name or a Closure (anonymous function).<br/>
 * The interface of a TAF user-defined callback function is as follows:<br/>
 * <i>userCallbackFn ( resource $connection , int $event , int $type ) : int</i><br/>
 * See the parameter description and an example on <a href="https://www.php.net/manual/en/oci8.taf.php">OCI8 Transparent Application Failover (TAF) Support</a> page.
 * </p>
 * @return bool TRUE on success or FALSE on failure.
 * @since 7.2
 */
function oci_register_taf_callback($connection, $callbackFn) {}

/**
 * Unregister a user-defined callback function for Oracle Database TAF.
 * @link https://www.php.net/manual/en/function.oci-unregister-taf-callback.php
 * @param resource $connection <p>
 * An Oracle connection identifier.
 * </p>
 * @return bool TRUE on success or FALSE on failure.
 * @since 7.2
 */
function oci_unregister_taf_callback($connection) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Associates a PHP variable with a column for query fetches
 * @link https://php.net/manual/en/function.oci-define-by-name.php
 * @param resource $statement <p>A valid OCI8 statement
 * identifier created by {@see oci_parse} and executed
 * by {@see oci_execute}, or a REF
 * CURSOR statement identifier.</p>
 * @param string $column_name <p>
 * The column name used in the query.
 * </p>
 * <p>
 * Use uppercase for Oracle's default, non-case sensitive column
 * names. Use the exact column name case for case-sensitive
 * column names.
 * </p>
 * @param mixed &$variable <p>
 * The PHP variable that will contain the returned column value.
 * </p>
 * @param int $type [optional] <p>
 * The data type to be returned. Generally not needed. Note that
 * Oracle-style data conversions are not performed. For example,
 * SQLT_INT will be ignored and the returned
 * data type will still be SQLT_CHR.
 * </p>
 * <p>
 * You can optionally use {@see oci_new_descriptor}
 * to allocate LOB/ROWID/BFILE descriptors.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function oci_define_by_name($statement, $column_name, &$variable, $type = SQLT_CHR) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Binds a PHP variable to an Oracle placeholder
 * @link https://php.net/manual/en/function.oci-bind-by-name.php
 * @param resource $statement <p>
 * A valid OCI8 statement identifier.
 * </p>
 * @param string $bv_name <p>
 * The colon-prefixed bind variable placeholder used in the
 * statement. The colon is optional
 * in <i>bv_name</i>. Oracle does not use question
 * marks for placeholders.
 * </p>
 * @param mixed &$variable <p>
 * The PHP variable to be associated with <i>bv_name</i>
 * </p>
 * @param int $maxlength [optional] <p>
 * Sets the maximum length for the data. If you set it to -1, this
 * function will use the current length
 * of <i>variable</i> to set the maximum
 * length. In this case the <i>variable</i> must
 * exist and contain data
 * when {@see oci_bind_by_name} is called.
 * </p>
 * @param int $type [optional] <p>
 * The datatype that Oracle will treat the data as. The
 * default <i>type</i> used
 * is <b>SQLT_CHR</b>. Oracle will convert the data
 * between this type and the database column (or PL/SQL variable
 * type), when possible.
 * </p>
 * <p>
 * If you need to bind an abstract datatype (LOB/ROWID/BFILE) you
 * need to allocate it first using the
 * {@see oci_new_descriptor} function. The
 * <i>length</i> is not used for abstract datatypes
 * and should be set to -1.
 * </p>
 * <p>
 * Possible values for <i>type</i> are:
 * </p>
 * <p>
 * <b>SQLT_BFILEE</b> or <b>OCI_B_BFILE</b>
 * - for BFILEs;
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function oci_bind_by_name($statement, $bv_name, &$variable, $maxlength = -1, $type = SQLT_CHR) {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL OCI8 &gt;= 1.2.0)<br/>
 * Binds a PHP array to an Oracle PL/SQL array parameter
 * @link https://php.net/manual/en/function.oci-bind-array-by-name.php
 * @param resource $statement <p>
 * A valid OCI statement identifier.
 * </p>
 * @param string $name <p>
 * The Oracle placeholder.
 * </p>
 * @param array &$var_array <p>
 * An array.
 * </p>
 * @param int $max_table_length <p>
 * Sets the maximum length both for incoming and result arrays.
 * </p>
 * @param int $max_item_length [optional] <p>
 * Sets maximum length for array items. If not specified or equals to -1,
 * {@see oci_bind_array_by_name} will find the longest
 * element in the incoming array and will use it as the maximum length.
 * </p>
 * @param int $type [optional] <p>
 * Should be used to set the type of PL/SQL array items. See list of
 * available types below:
 * </p>
 * <p>
 * <b>SQLT_NUM</b> - for arrays of NUMBER.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function oci_bind_array_by_name($statement, $name, array &$var_array, $max_table_length, $max_item_length = -1, $type = SQLT_AFC) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Checks if a field in the currently fetched row <b>NULL</b>
 * @link https://php.net/manual/en/function.oci-field-is-null.php
 * @param resource $statement <p>
 * A valid OCI statement identifier.
 * </p>
 * @param mixed $field <p>
 * Can be a field's index or a field's name (uppercased).
 * </p>
 * @return bool <b>TRUE</b> if <i>field</i> is <b>NULL</b>, <b>FALSE</b> otherwise.
 */
function oci_field_is_null($statement, $field) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Returns the name of a field from the statement
 * @link https://php.net/manual/en/function.oci-field-name.php
 * @param resource $statement <p>
 * A valid OCI statement identifier.
 * </p>
 * @param string|int $field <p>
 * Can be the field's index (1-based) or name.
 * </p>
 * @return string|false The name as a string, or <b>FALSE</b> on errors.
 */
function oci_field_name($statement, $field) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Returns field's size
 * @link https://php.net/manual/en/function.oci-field-size.php
 * @param resource $statement <p>
 * A valid OCI statement identifier.
 * </p>
 * @param mixed $field <p>
 * Can be the field's index (1-based) or name.
 * </p>
 * @return int|false The size of a <i>field</i> in bytes, or <b>FALSE</b> on
 * errors.
 */
function oci_field_size($statement, $field) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Tell the scale of the field
 * @link https://php.net/manual/en/function.oci-field-scale.php
 * @param resource $statement <p>
 * A valid OCI statement identifier.
 * </p>
 * @param string|int $field <p>
 * Can be the field's index (1-based) or name.
 * </p>
 * @return int|false The scale as an integer, or <b>FALSE</b> on errors.
 */
function oci_field_scale($statement, $field) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Tell the precision of a field
 * @link https://php.net/manual/en/function.oci-field-precision.php
 * @param resource $statement <p>
 * A valid OCI statement identifier.
 * </p>
 * @param string|int $field <p>
 * Can be the field's index (1-based) or name.
 * </p>
 * @return int|false The precision as an integer, or <b>FALSE</b> on errors.
 */
function oci_field_precision($statement, $field) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Returns field's data type
 * @link https://php.net/manual/en/function.oci-field-type.php
 * @param resource $statement <p>
 * A valid OCI statement identifier.
 * </p>
 * @param string|int $field <p>
 * Can be the field's index (1-based) or name.
 * </p>
 * @return mixed the field data type as a string, or <b>FALSE</b> on errors.
 */
function oci_field_type($statement, $field) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Tell the raw Oracle data type of the field
 * @link https://php.net/manual/en/function.oci-field-type-raw.php
 * @param resource $statement <p>
 * A valid OCI statement identifier.
 * </p>
 * @param int $field <p>
 * Can be the field's index (1-based) or name.
 * </p>
 * @return int|false Oracle's raw data type as a string, or <b>FALSE</b> on errors.
 */
function oci_field_type_raw($statement, $field) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Executes a statement
 * @link https://php.net/manual/en/function.oci-execute.php
 * @param resource $statement <p>
 * A valid OCI statement identifier.
 * </p>
 * @param int $mode [optional] <p>
 * An optional second parameter can be one of the following constants:
 * <table>
 * Execution Modes
 * <tr valign="top">
 * <td>Constant</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td><b>OCI_COMMIT_ON_SUCCESS</b></td>
 * <td>Automatically commit all outstanding changes for
 * this connection when the statement has succeeded. This
 * is the default.</td>
 * </tr>
 * <tr valign="top">
 * <td><b>OCI_DESCRIBE_ONLY</b></td>
 * <td>Make query meta data available to functions
 * like {@see oci_field_name} but do not
 * create a result set. Any subsequent fetch call such
 * as {@see oci_fetch_array} will
 * fail.</td>
 * </tr>
 * <tr valign="top">
 * <td><b>OCI_NO_AUTO_COMMIT</b></td>
 * <td>Do not automatically commit changes. Prior to PHP
 * 5.3.2 (PECL OCI8 1.4)
 * use <b>OCI_DEFAULT</b> which is equivalent
 * to <b>OCI_NO_AUTO_COMMIT</b>.</td>
 * </tr>
 * </table>
 * </p>
 * <p>
 * Using <b>OCI_NO_AUTO_COMMIT</b> mode starts or continues a
 * transaction. Transactions are automatically rolled back when
 * the connection is closed, or when the script ends. Explicitly
 * call {@see oci_commit} to commit a transaction,
 * or {@see oci_rollback} to abort it.
 * </p>
 * <p>
 * When inserting or updating data, using transactions is
 * recommended for relational data consistency and for performance
 * reasons.
 * </p>
 * <p>
 * If <b>OCI_NO_AUTO_COMMIT</b> mode is used for any
 * statement including queries, and
 * {@see oci_commit}
 * or {@see oci_rollback} is not subsequently
 * called, then OCI8 will perform a rollback at the end of the
 * script even if no data was changed. To avoid an unnecessary
 * rollback, many scripts do not
 * use <b>OCI_NO_AUTO_COMMIT</b> mode for queries or
 * PL/SQL. Be careful to ensure the appropriate transactional
 * consistency for the application when
 * using {@see oci_execute} with different modes in
 * the same script.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function oci_execute($statement, $mode = OCI_COMMIT_ON_SUCCESS) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Cancels reading from cursor
 * @link https://php.net/manual/en/function.oci-cancel.php
 * @param resource $statement <p>
 * An OCI statement.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function oci_cancel($statement) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Fetches the next row from a query into internal buffers
 * @link https://php.net/manual/en/function.oci-fetch.php
 * @param resource $statement <p>A valid OCI8 statement
 * identifier created by {@see oci_parse} and executed
 * by {@see oci_execute}, or a REF
 * CURSOR statement identifier.</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> if there are no more rows in the
 * <i>statement</i>.
 */
function oci_fetch($statement) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Returns the next row from a query as an object
 * @link https://php.net/manual/en/function.oci-fetch-object.php
 * @param resource $statement <p>A valid OCI8 statement
 * identifier created by {@see oci_parse} and executed
 * by {@see oci_execute}, or a REF
 * CURSOR statement identifier.</p>
 * @return object|false <p>An object. Each attribute of the object corresponds to a
 * column of the row. If there are no more rows in
 * the <i>statement</i> then <b>FALSE</b> is returned.
 * </p>
 * <p>
 * Any LOB columns are returned as LOB descriptors.
 * </p>
 * <p>
 * DATE columns are returned as strings formatted
 * to the current date format. The default format can be changed with
 * Oracle environment variables such as NLS_LANG or
 * by a previously executed ALTER SESSION SET
 * NLS_DATE_FORMAT command.
 * </p>
 * <p>
 * Oracle's default, non-case sensitive column names will have
 * uppercase attribute names. Case-sensitive column names will have
 * attribute names using the exact column case.
 * Use <b>var_dump</b> on the result object to verify
 * the appropriate case for attribute access.
 * </p>
 * <p>
 * Attribute values will be <b>NULL</b> for any NULL
 * data fields.
 * </p>
 */
function oci_fetch_object($statement) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Returns the next row from a query as a numeric array
 * @link https://php.net/manual/en/function.oci-fetch-row.php
 * @param resource $statement <p>A valid OCI8 statement
 * identifier created by {@see oci_parse} and executed
 * by {@see oci_execute}, or a REF
 * CURSOR statement identifier.</p>
 * @return array|false A numerically indexed array. If there are no more rows in
 * the <i>statement</i> then <b>FALSE</b> is returned.
 */
function oci_fetch_row($statement) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Returns the next row from a query as an associative array
 * @link https://php.net/manual/en/function.oci-fetch-assoc.php
 * @param resource $statement <p>A valid OCI8 statement
 * identifier created by {@see oci_parse} and executed
 * by {@see oci_execute}, or a REF
 * CURSOR statement identifier.</p>
 * @return array|false An associative array. If there are no more rows in
 * the <i>statement</i> then <b>FALSE</b> is returned.
 */
function oci_fetch_assoc($statement) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Returns the next row from a query as an associative or numeric array
 * @link https://php.net/manual/en/function.oci-fetch-array.php
 * @param resource $statement <p>A valid OCI8 statement
 * identifier created by {@see oci_parse} and executed
 * by {@see oci_execute}, or a REF
 * CURSOR statement identifier.</p>
 * <p>
 * Can also be a statement identifier returned by {@see oci_get_implicit_resultset}.
 * </p>
 * @param int $mode [optional] <p>
 * An optional second parameter can be any combination of the following
 * constants:
 * <table>
 * {@see oci_fetch_array} Modes
 * <tr valign="top">
 * <td>Constant</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td><b>OCI_BOTH</b></td>
 * <td>Returns an array with both associative and numeric
 * indices. This is the same
 * as <b>OCI_ASSOC</b>
 * + <b>OCI_NUM</b> and is the default
 * behavior.</td>
 * </tr>
 * <tr valign="top">
 * <td><b>OCI_ASSOC</b></td>
 * <td>Returns an associative array.</td>
 * </tr>
 * <tr valign="top">
 * <td><b>OCI_NUM</b></td>
 * <td>Returns a numeric array.</td>
 * </tr>
 * <tr valign="top">
 * <td><b>OCI_RETURN_NULLS</b></td>
 * <td>Creates elements for <b>NULL</b> fields. The element
 * values will be a PHP <b>NULL</b>.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>OCI_RETURN_LOBS</b></td>
 * <td>Returns the contents of LOBs instead of the LOB
 * descriptors.</td>
 * </tr>
 * </table>
 * </p>
 * <p>
 * The default <i>mode</i> is <b>OCI_BOTH</b>.
 * </p>
 * <p>
 * Use the addition operator &#x00022;+&#x00022; to specify more than
 * one mode at a time.
 * </p>
 * @return array|false <p>An array with associative and/or numeric indices. If there
 * are no more rows in the <i>statement</i> then
 * <b>FALSE</b> is returned.
 * </p>
 * <p>
 * By default, LOB columns are returned as LOB descriptors.
 * </p>
 * <p>
 * DATE columns are returned as strings formatted
 * to the current date format. The default format can be changed with
 * Oracle environment variables such as NLS_LANG or
 * by a previously executed ALTER SESSION SET
 * NLS_DATE_FORMAT command.
 * </p>
 * <p>
 * Oracle's default, non-case sensitive column names will have
 * uppercase associative indices in the result array. Case-sensitive
 * column names will have array indices using the exact column case.
 * Use <b>var_dump</b> on the result array to verify the
 * appropriate case to use for each query.
 * </p>
 * <p>
 * The table name is not included in the array index. If your query
 * contains two different columns with the same name,
 * use <b>OCI_NUM</b> or add a column alias to the query
 * to ensure name uniqueness, see example #7. Otherwise only one
 * column will be returned via PHP.
 * </p>
 */
function oci_fetch_array($statement, $mode = null) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Obsolete variant of {@see oci_fetch_array}, {@see oci_fetch_object},
 * {@see oci_fetch_assoc} and
 * {@see oci_fetch_row}
 * @link https://php.net/manual/en/function.ocifetchinto.php
 * @param resource $statement_resource
 * @param array &$result
 * @param int $mode [optional]
 * @return int|bool
 */
#[Deprecated(since: "5.4")]
function ocifetchinto($statement_resource, &$result, $mode = null) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Fetches multiple rows from a query into a two-dimensional array
 * @link https://php.net/manual/en/function.oci-fetch-all.php
 * @param resource $statement <p>A valid OCI8 statement
 * identifier created by {@see oci_parse} and executed
 * by {@see oci_execute}, or a REF
 * CURSOR statement identifier.</p>
 * @param array &$output <p>
 * The variable to contain the returned rows.
 * </p>
 * <p>
 * LOB columns are returned as strings, where Oracle supports
 * conversion.
 * </p>
 * <p>
 * See {@see oci_fetch_array} for more information
 * on how data and types are fetched.
 * </p>
 * @param int $skip [optional] <p>
 * The number of initial rows to discard when fetching the
 * result. The default value is 0, so the first row onwards is
 * returned.
 * </p>
 * @param int $maxrows [optional] <p>
 * The number of rows to return. The default is -1 meaning return
 * all the rows from <i>skip</i> + 1 onwards.
 * </p>
 * @param int $flags [optional] <p>
 * Parameter <i>flags</i> indicates the array
 * structure and whether associative arrays should be used.
 * <table>
 * {@see oci_fetch_all} Array Structure Modes
 * <tr valign="top">
 * <td>Constant</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td><b>OCI_FETCHSTATEMENT_BY_ROW</b></td>
 * <td>The outer array will contain one sub-array per query
 * row.</td>
 * </tr>
 * <tr valign="top">
 * <td><b>OCI_FETCHSTATEMENT_BY_COLUMN</b></td>
 * <td>The outer array will contain one sub-array per query
 * column. This is the default.</td>
 * </tr>
 * </table>
 * </p>
 * <p>
 * Arrays can be indexed by column heading or numerically.
 * <table>
 * {@see oci_fetch_all} Array Index Modes
 * <tr valign="top">
 * <td>Constant</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td><b>OCI_NUM</b></td>
 * <td>Numeric indexes are used for each column's array.</td>
 * </tr>
 * <tr valign="top">
 * <td><b>OCI_ASSOC</b></td>
 * <td>Associative indexes are used for each column's
 * array. This is the default.</td>
 * </tr>
 * </table>
 * </p>
 * <p>
 * Use the addition operator &#x00022;+&#x00022; to choose a combination
 * of array structure and index modes.
 * </p>
 * <p>
 * Oracle's default, non-case sensitive column names will have
 * uppercase array keys. Case-sensitive column names will have
 * array keys using the exact column case.
 * Use <b>var_dump</b>
 * on <i>output</i> to verify the appropriate case
 * to use for each query.
 * </p>
 * <p>
 * Queries that have more than one column with the same name
 * should use column aliases. Otherwise only one of the columns
 * will appear in an associative array.
 * </p>
 * @return int|false The number of rows in <i>output</i>, which
 * may be 0 or more, or <b>FALSE</b> on failure.
 */
function oci_fetch_all($statement, array &$output, $skip = 0, $maxrows = -1, $flags = OCI_FETCHSTATEMENT_BY_COLUMN|OCI_ASSOC) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Frees all resources associated with statement or cursor
 * @link https://php.net/manual/en/function.oci-free-statement.php
 * @param resource $statement <p>
 * A valid OCI statement identifier.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function oci_free_statement($statement) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Enables or disables internal debug output
 * @link https://php.net/manual/en/function.oci-internal-debug.php
 * @param bool $onoff <p>
 * Set this to <b>FALSE</b> to turn debug output off or <b>TRUE</b> to turn it on.
 * </p>
 * @removed 8.0
 * @return void No value is returned.
 */
function oci_internal_debug($onoff) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Returns the number of result columns in a statement
 * @link https://php.net/manual/en/function.oci-num-fields.php
 * @param resource $statement <p>
 * A valid OCI statement identifier.
 * </p>
 * @return int|false The number of columns as an integer, or <b>FALSE</b> on errors.
 */
function oci_num_fields($statement) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Prepares an Oracle statement for execution
 * @link https://php.net/manual/en/function.oci-parse.php
 * @param resource $connection <p>
 * An Oracle connection identifier, returned by
 * {@see oci_connect}, {@see oci_pconnect}, or {@see oci_new_connect}.
 * </p>
 * @param string $sql_text <p>
 * The SQL or PL/SQL statement.
 * </p>
 * <p>
 * SQL statements should not end with a
 * semi-colon (&#x00022;;&#x00022;). PL/SQL
 * statements should end with a semi-colon
 * (&#x00022;;&#x00022;).
 * </p>
 * @return resource|false A statement handle on success, or <b>FALSE</b> on error.
 */
function oci_parse($connection, $sql_text) {}

/**
 * (PECL OCI8 &gt;= 2.0.0)<br/>
 * Returns the next child statement resource from a parent statement resource that has Oracle Database 12c Implicit Result Sets
 * @link https://php.net/manual/en/function.oci-get-implicit-resultset.php
 * @param resource $statement <p>A valid OCI8 statement identifier created
 * by {@see oci_parse} and executed
 * by {@see oci_execute}. The statement
 * identifier may or may not be associated with a SQL statement
 * that returns Implicit Result Sets.
 * </p>
 * @return resource|false A statement handle for the next child statement available
 * on <i>statement</i>. Returns <b>FALSE</b> when child
 * statements do not exist, or all child statements have been returned
 * by previous calls
 * to {@see oci_get_implicit_resultset}.
 */
function oci_get_implicit_resultset($statement) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Allocates and returns a new cursor (statement handle)
 * @link https://php.net/manual/en/function.oci-new-cursor.php
 * @param resource $connection <p>
 * An Oracle connection identifier, returned by
 * {@see oci_connect} or {@see oci_pconnect}.
 * </p>
 * @return resource|false A new statement handle, or <b>FALSE</b> on error.
 */
function oci_new_cursor($connection) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Returns field's value from the fetched row
 * @link https://php.net/manual/en/function.oci-result.php
 * @param resource $statement
 * @param mixed $field <p>
 * Can be either use the column number (1-based) or the column name.
 * The case of the column name must be the case that Oracle meta data
 * describes the column as, which is uppercase for columns created
 * case insensitively.
 * </p>
 * @return mixed everything as strings except for abstract types (ROWIDs, LOBs and
 * FILEs). Returns <b>FALSE</b> on error.
 */
function oci_result($statement, $field) {}

/**
 * (PHP 5.3.7, PECL OCI8 &gt;= 1.4.6)<br/>
 * Returns the Oracle client library version
 * @link https://php.net/manual/en/function.oci-client-version.php
 * @return string the version number as a string.
 */
function oci_client_version() {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Returns the Oracle Database version
 * @link https://php.net/manual/en/function.oci-server-version.php
 * @param resource $connection
 * @return string|false The version information as a string or <b>FALSE</b> on error.
 */
function oci_server_version($connection) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Returns the type of a statement
 * @link https://php.net/manual/en/function.oci-statement-type.php
 * @param resource $statement <p>
 * A valid OCI8 statement identifier from {@see oci_parse}.
 * </p>
 * @return string|false The type of <i>statement</i> as one of the
 * following strings.
 * <table>
 * Statement type
 * <tr valign="top">
 * <td>Return String</td>
 * <td>Notes</td>
 * </tr>
 * <tr valign="top">
 * <td>ALTER</td>
 * <td></td>
 * </tr>
 * <tr valign="top">
 * <td>BEGIN</td>
 * <td></td>
 * </tr>
 * <tr valign="top">
 * <td>CALL</td>
 * <td>Introduced in PHP 5.2.1 (PECL OCI8 1.2.3)</td>
 * </tr>
 * <tr valign="top">
 * <td>CREATE</td>
 * <td></td>
 * </tr>
 * <tr valign="top">
 * <td>DECLARE</td>
 * <td></td>
 * </tr>
 * <tr valign="top">
 * <td>DELETE</td>
 * <td></td>
 * </tr>
 * <tr valign="top">
 * <td>DROP</td>
 * <td></td>
 * </tr>
 * <tr valign="top">
 * <td>INSERT</td>
 * <td></td>
 * </tr>
 * <tr valign="top">
 * <td>SELECT</td>
 * <td></td>
 * </tr>
 * <tr valign="top">
 * <td>UPDATE</td>
 * <td></td>
 * </tr>
 * <tr valign="top">
 * <td>UNKNOWN</td>
 * <td></td>
 * </tr>
 * </table>
 * </p>
 * <p>
 * Returns <b>FALSE</b> on error.
 */
function oci_statement_type($statement) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Returns number of rows affected during statement execution
 * @link https://php.net/manual/en/function.oci-num-rows.php
 * @param resource $statement <p>
 * A valid OCI statement identifier.
 * </p>
 * @return int|false The number of rows affected as an integer, or <b>FALSE</b> on errors.
 */
function oci_num_rows($statement) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Closes an Oracle connection
 * @link https://php.net/manual/en/function.oci-close.php
 * @param resource $connection <p>
 * An Oracle connection identifier returned by
 * {@see oci_connect}, {@see oci_pconnect},
 * or {@see oci_new_connect}.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function oci_close($connection) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Connect to an Oracle database
 * @link https://php.net/manual/en/function.oci-connect.php
 * @param string $username <p>
 * The Oracle user name.
 * </p>
 * @param string $password <p>
 * The password for <i>username</i>.
 * </p>
 * @param string $connection_string [optional] <p>Contains
 * the Oracle instance to connect to. It can be
 * an Easy Connect
 * string, or a Connect Name from
 * the tnsnames.ora file, or the name of a local
 * Oracle instance.
 * </p>
 * <p>
 * If not specified, PHP uses
 * environment variables such as <b>TWO_TASK</b> (on Linux)
 * or <b>LOCAL</b> (on Windows)
 * and <b>ORACLE_SID</b> to determine the
 * Oracle instance to connect to.
 * </p>
 * <p>
 * To use the Easy Connect naming method, PHP must be linked with Oracle
 * 10g or greater Client libraries. The Easy Connect string for Oracle
 * 10g is of the form:
 * [//]host_name[:port][/service_name]. From Oracle
 * 11g, the syntax is:
 * [//]host_name[:port][/service_name][:server_type][/instance_name].
 * Service names can be found by running the Oracle
 * utility lsnrctl status on the database server
 * machine.
 * </p>
 * <p>
 * The tnsnames.ora file can be in the Oracle Net
 * search path, which
 * includes $ORACLE_HOME/network/admin
 * and /etc. Alternatively
 * set TNS_ADMIN so
 * that $TNS_ADMIN/tnsnames.ora is read. Make sure
 * the web daemon has read access to the file.
 * </p>
 * @param string $character_set [optional] <p>Determines
 * the character set used by the Oracle Client libraries. The character
 * set does not need to match the character set used by the database. If
 * it doesn't match, Oracle will do its best to convert data to and from
 * the database character set. Depending on the character sets this may
 * not give usable results. Conversion also adds some time overhead.
 * </p>
 * <p>
 * If not specified, the
 * Oracle Client libraries determine a character set from
 * the <b>NLS_LANG</b> environment variable.
 * </p>
 * <p>
 * Passing this parameter can
 * reduce the time taken to connect.
 * </p>
 * <p>
 * @param int $session_mode [optional] This
 * parameter is available since version PHP 5 (PECL OCI8 1.1) and accepts the
 * following values: <b>OCI_DEFAULT</b>,
 * <b>OCI_SYSOPER</b> and <b>OCI_SYSDBA</b>.
 * If either <b>OCI_SYSOPER</b> or
 * <b>OCI_SYSDBA</b> were specified, this function will try
 * to establish privileged connection using external credentials.
 * Privileged connections are disabled by default. To enable them you
 * need to set oci8.privileged_connect
 * to On.
 * </p>
 * <p>
 * PHP 5.3 (PECL OCI8 1.3.4) introduced the
 * <b>OCI_CRED_EXT</b> mode value. This tells Oracle to use
 * External or OS authentication, which must be configured in the
 * database. The <b>OCI_CRED_EXT</b> flag can only be used
 * with username of &#x00022;/&#x00022; and a empty password.
 * oci8.privileged_connect
 * may be On or Off.
 * </p>
 * <p>
 * <b>OCI_CRED_EXT</b> may be combined with the
 * <b>OCI_SYSOPER</b> or
 * <b>OCI_SYSDBA</b> modes.
 * </p>
 * <p>
 * <b>OCI_CRED_EXT</b> is not supported on Windows for
 * security reasons.
 * </p>
 * @return resource|false A connection identifier or <b>FALSE</b> on error.
 */
function oci_connect($username, $password, $connection_string = null, $character_set = null, $session_mode = null) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Connect to the Oracle server using a unique connection
 * @link https://php.net/manual/en/function.oci-new-connect.php
 * @param string $username <p>
 * The Oracle user name.
 * </p>
 * @param string $password <p>
 * The password for <i>username</i>.
 * </p>
 * @param string $connection_string [optional] <p>Contains
 * the Oracle instance to connect to. It can be
 * an Easy Connect
 * string, or a Connect Name from
 * the tnsnames.ora file, or the name of a local
 * Oracle instance.
 * </p>
 * <p>
 * If not specified, PHP uses
 * environment variables such as <b>TWO_TASK</b> (on Linux)
 * or <b>LOCAL</b> (on Windows)
 * and <b>ORACLE_SID</b> to determine the
 * Oracle instance to connect to.
 * </p>
 * <p>
 * To use the Easy Connect naming method, PHP must be linked with Oracle
 * 10g or greater Client libraries. The Easy Connect string for Oracle
 * 10g is of the form:
 * [//]host_name[:port][/service_name]. From Oracle
 * 11g, the syntax is:
 * [//]host_name[:port][/service_name][:server_type][/instance_name].
 * Service names can be found by running the Oracle
 * utility lsnrctl status on the database server
 * machine.
 * </p>
 * <p>
 * The tnsnames.ora file can be in the Oracle Net
 * search path, which
 * includes $ORACLE_HOME/network/admin
 * and /etc. Alternatively
 * set TNS_ADMIN so
 * that $TNS_ADMIN/tnsnames.ora is read. Make sure
 * the web daemon has read access to the file.
 * </p>
 * @param string $character_set [optional] <p>Determines
 * the character set used by the Oracle Client libraries. The character
 * set does not need to match the character set used by the database. If
 * it doesn't match, Oracle will do its best to convert data to and from
 * the database character set. Depending on the character sets this may
 * not give usable results. Conversion also adds some time overhead.
 * </p>
 * <p>
 * If not specified, the
 * Oracle Client libraries determine a character set from
 * the <b>NLS_LANG</b> environment variable.
 * </p>
 * <p>
 * Passing this parameter can
 * reduce the time taken to connect.
 * </p>
 * @param int $session_mode [optional] <p>This
 * parameter is available since version PHP 5 (PECL OCI8 1.1) and accepts the
 * following values: <b>OCI_DEFAULT</b>,
 * <b>OCI_SYSOPER</b> and <b>OCI_SYSDBA</b>.
 * If either <b>OCI_SYSOPER</b> or
 * <b>OCI_SYSDBA</b> were specified, this function will try
 * to establish privileged connection using external credentials.
 * Privileged connections are disabled by default. To enable them you
 * need to set oci8.privileged_connect
 * to On.
 * </p>
 * <p>
 * PHP 5.3 (PECL OCI8 1.3.4) introduced the
 * <b>OCI_CRED_EXT</b> mode value. This tells Oracle to use
 * External or OS authentication, which must be configured in the
 * database. The <b>OCI_CRED_EXT</b> flag can only be used
 * with username of &#x00022;/&#x00022; and a empty password.
 * oci8.privileged_connect
 * may be On or Off.
 * </p>
 * <p>
 * <b>OCI_CRED_EXT</b> may be combined with the
 * <b>OCI_SYSOPER</b> or
 * <b>OCI_SYSDBA</b> modes.
 * </p>
 * <p>
 * <b>OCI_CRED_EXT</b> is not supported on Windows for
 * security reasons.
 * </p>
 * @return resource|false A connection identifier or <b>FALSE</b> on error.
 */
function oci_new_connect($username, $password, $connection_string = null, $character_set = null, $session_mode = null) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Connect to an Oracle database using a persistent connection
 * @link https://php.net/manual/en/function.oci-pconnect.php
 * @param string $username <p>
 * The Oracle user name.
 * </p>
 * @param string $password <p>
 * The password for <i>username</i>.
 * </p>
 * @param string $connection_string [optional] <p>Contains
 * the Oracle instance to connect to. It can be
 * an Easy Connect
 * string, or a Connect Name from
 * the tnsnames.ora file, or the name of a local
 * Oracle instance.
 * </p>
 * <p>
 * If not specified, PHP uses
 * environment variables such as <b>TWO_TASK</b> (on Linux)
 * or <b>LOCAL</b> (on Windows)
 * and <b>ORACLE_SID</b> to determine the
 * Oracle instance to connect to.
 * </p>
 * <p>
 * To use the Easy Connect naming method, PHP must be linked with Oracle
 * 10g or greater Client libraries. The Easy Connect string for Oracle
 * 10g is of the form:
 * [//]host_name[:port][/service_name]. From Oracle
 * 11g, the syntax is:
 * [//]host_name[:port][/service_name][:server_type][/instance_name].
 * Service names can be found by running the Oracle
 * utility lsnrctl status on the database server
 * machine.
 * </p>
 * <p>
 * The tnsnames.ora file can be in the Oracle Net
 * search path, which
 * includes $ORACLE_HOME/network/admin
 * and /etc. Alternatively
 * set TNS_ADMIN so
 * that $TNS_ADMIN/tnsnames.ora is read. Make sure
 * the web daemon has read access to the file.
 * </p>
 * @param string $character_set [optional] <p>Determines
 * the character set used by the Oracle Client libraries. The character
 * set does not need to match the character set used by the database. If
 * it doesn't match, Oracle will do its best to convert data to and from
 * the database character set. Depending on the character sets this may
 * not give usable results. Conversion also adds some time overhead.
 * </p>
 * <p>
 * If not specified, the
 * Oracle Client libraries determine a character set from
 * the <b>NLS_LANG</b> environment variable.
 * </p>
 * <p>
 * Passing this parameter can
 * reduce the time taken to connect.
 * </p>
 * @param int $session_mode [optional] <p>This
 * parameter is available since version PHP 5 (PECL OCI8 1.1) and accepts the
 * following values: <b>OCI_DEFAULT</b>,
 * <b>OCI_SYSOPER</b> and <b>OCI_SYSDBA</b>.
 * If either <b>OCI_SYSOPER</b> or
 * <b>OCI_SYSDBA</b> were specified, this function will try
 * to establish privileged connection using external credentials.
 * Privileged connections are disabled by default. To enable them you
 * need to set oci8.privileged_connect
 * to On.
 * </p>
 * <p>
 * PHP 5.3 (PECL OCI8 1.3.4) introduced the
 * <b>OCI_CRED_EXT</b> mode value. This tells Oracle to use
 * External or OS authentication, which must be configured in the
 * database. The <b>OCI_CRED_EXT</b> flag can only be used
 * with username of &#x00022;/&#x00022; and a empty password.
 * oci8.privileged_connect
 * may be On or Off.
 * </p>
 * <p>
 * <b>OCI_CRED_EXT</b> may be combined with the
 * <b>OCI_SYSOPER</b> or
 * <b>OCI_SYSDBA</b> modes.
 * </p>
 * <p>
 * <b>OCI_CRED_EXT</b> is not supported on Windows for
 * security reasons.
 * </p>
 * @return resource|false A connection identifier or <b>FALSE</b> on error.
 */
function oci_pconnect($username, $password, $connection_string = null, $character_set = null, $session_mode = null) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Returns the last error found
 * @link https://php.net/manual/en/function.oci-error.php
 * @param resource $resource [optional] <p>
 * For most errors, <i>resource</i> is the
 * resource handle that was passed to the failing function call.
 * For connection errors with {@see oci_connect},
 * {@see oci_new_connect} or
 * {@see oci_pconnect} do not pass <i>resource</i>.
 * </p>
 * @return array|false If no error is found, {@see oci_error} returns
 * <b>FALSE</b>. Otherwise, {@see oci_error} returns the
 * error information as an associative array.
 * </p>
 * <p>
 * <table>
 * {@see oci_error} Array Description
 * <tr valign="top">
 * <td>Array key</td>
 * <td>Type</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>code</td>
 * <td>integer</td>
 * <td>
 * The Oracle error number.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>message</td>
 * <td>string</td>
 * <td>
 * The Oracle error text.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>offset</td>
 * <td>integer</td>
 * <td>
 * The byte position of an error in the SQL statement. If there
 * was no statement, this is 0
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>sqltext</td>
 * <td>string</td>
 * <td>
 * The SQL statement text. If there was no statement, this is
 * an empty string.
 * </td>
 * </tr>
 * </table>
 */
#[ArrayShape(["code" => "int", "message" => "string", "offset" => "int", "sqltext" => "string"])]
function oci_error($resource = null) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Frees a descriptor
 * @link https://php.net/manual/en/function.oci-free-descriptor.php
 * @param resource $descriptor
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function oci_free_descriptor($descriptor) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Compares two LOB/FILE locators for equality
 * @link https://php.net/manual/en/function.oci-lob-is-equal.php
 * @param OCI_Lob $lob1 <p>
 * A LOB identifier.
 * </p>
 * @param OCI_Lob $lob2 <p>
 * A LOB identifier.
 * </p>
 * @return bool <b>TRUE</b> if these objects are equal, <b>FALSE</b> otherwise.
 */
function oci_lob_is_equal(
    #[LanguageLevelTypeAware(['8.0' => 'OCILob'], default: 'OCI_Lob')] $lob1,
    #[LanguageLevelTypeAware(['8.0' => 'OCILob'], default: 'OCI_Lob')] $lob2
) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Copies large object
 * @link https://php.net/manual/en/function.oci-lob-copy.php
 * @param OCI_Lob $lob_to <p>
 * The destination LOB.
 * </p>
 * @param OCI_Lob $lob_from <p>
 * The copied LOB.
 * </p>
 * @param int $length [optional] <p>
 * Indicates the length of data to be copied.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function oci_lob_copy(
    #[LanguageLevelTypeAware(['8.0' => 'OCILob'], default: 'OCI_Lob')] $lob_to,
    #[LanguageLevelTypeAware(['8.0' => 'OCILob'], default: 'OCI_Lob')] $lob_from,
    $length = 0
) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Commits the outstanding database transaction
 * @link https://php.net/manual/en/function.oci-commit.php
 * @param resource $connection <p>
 * An Oracle connection identifier, returned by
 * {@see oci_connect}, {@see oci_pconnect}, or {@see oci_new_connect}.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function oci_commit($connection) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Rolls back the outstanding database transaction
 * @link https://php.net/manual/en/function.oci-rollback.php
 * @param resource $connection <p>
 * An Oracle connection identifier, returned by
 * {@see oci_connect}, {@see oci_pconnect}
 * or {@see oci_new_connect}.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function oci_rollback($connection) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Initializes a new empty LOB or FILE descriptor
 * @link https://php.net/manual/en/function.oci-new-descriptor.php
 * @param resource $connection <p>
 * An Oracle connection identifier, returned by
 * {@see oci_connect} or {@see oci_pconnect}.
 * </p>
 * @param int $type [optional] <p>
 * Valid values for <i>type</i> are:
 * <b>OCI_DTYPE_FILE</b>, <b>OCI_DTYPE_LOB</b> and
 * <b>OCI_DTYPE_ROWID</b>.
 * </p>
 * @return OCI_Lob|OCILob|false A new LOB or FILE descriptor on success, <b>FALSE</b> on error.
 */
#[LanguageLevelTypeAware(['8.0' => 'OCILob|false'], default: 'OCI_Lob|false')]
function oci_new_descriptor($connection, $type = OCI_DTYPE_LOB) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Sets number of rows to be prefetched by queries
 * @link https://php.net/manual/en/function.oci-set-prefetch.php
 * @param resource $statement <p>A valid OCI8 statement
 * identifier created by {@see oci_parse} and executed
 * by {@see oci_execute}, or a REF
 * CURSOR statement identifier.</p>
 * @param int $rows <p>
 * The number of rows to be prefetched, &gt;= 0
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function oci_set_prefetch($statement, $rows) {}

/**
 * (PHP 5.3.2, PECL OCI8 &gt;= 1.4.0)<br/>
 * Sets the client identifier
 * @link https://php.net/manual/en/function.oci-set-client-identifier.php
 * @param resource $connection <p>An Oracle connection identifier,
 * returned by {@see oci_connect}, {@see oci_pconnect},
 * or {@see oci_new_connect}.</p>
 * @param string $client_identifier <p>
 * User chosen string up to 64 bytes long.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function oci_set_client_identifier($connection, $client_identifier) {}

/**
 * (PHP 5.3.2, PECL OCI8 &gt;= 1.4.0)<br/>
 * Sets the database edition
 * @link https://php.net/manual/en/function.oci-set-edition.php
 * @param string $edition <p>
 * Oracle Database edition name previously created with the SQL
 * "CREATE EDITION" command.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function oci_set_edition($edition) {}

/**
 * (PHP 5.3.2, PECL OCI8 &gt;= 1.4.0)<br/>
 * Sets the module name
 * @link https://php.net/manual/en/function.oci-set-module-name.php
 * @param resource $connection <p>An Oracle connection identifier,
 * returned by {@see oci_connect}, {@see oci_pconnect},
 * or {@see oci_new_connect}.</p>
 * @param string $module_name <p>
 * User chosen string up to 48 bytes long.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function oci_set_module_name($connection, $module_name) {}

/**
 * (PHP 5.3.2, PECL OCI8 &gt;= 1.4.0)<br/>
 * Sets the action name
 * @link https://php.net/manual/en/function.oci-set-action.php
 * @param resource $connection <p>An Oracle connection identifier,
 * returned by {@see oci_connect}, {@see oci_pconnect},
 * or {@see oci_new_connect}.</p>
 * @param string $action_name <p>
 * User chosen string up to 32 bytes long.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function oci_set_action($connection, $action_name) {}

/**
 * (PHP 5.3.2, PECL OCI8 &gt;= 1.4.0)<br/>
 * Sets the client information
 * @link https://php.net/manual/en/function.oci-set-client-info.php
 * @param resource $connection <p>An Oracle connection identifier,
 * returned by {@see oci_connect}, {@see oci_pconnect},
 * or {@see oci_new_connect}.</p>
 * @param string $client_info <p>
 * User chosen string up to 64 bytes long.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function oci_set_client_info($connection, $client_info) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Changes password of Oracle's user
 * @link https://php.net/manual/en/function.oci-password-change.php
 * @param resource $connection <p>
 * An Oracle connection identifier, returned by
 * {@see oci_connect} or {@see oci_pconnect}.
 * </p>
 * @param string $username <p>
 * The Oracle user name.
 * </p>
 * @param string $old_password <p>
 * The old password.
 * </p>
 * @param string $new_password <p>
 * The new password to be set.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function oci_password_change($connection, $username, $old_password, $new_password) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Allocates new collection object
 * @link https://php.net/manual/en/function.oci-new-collection.php
 * @param resource $connection <p>
 * An Oracle connection identifier, returned by
 * {@see oci_connect} or {@see oci_pconnect}.
 * </p>
 * @param string $tdo <p>
 * Should be a valid named type (uppercase).
 * </p>
 * @param string $schema [optional] <p>
 * Should point to the scheme, where the named type was created. The name
 * of the current user is the default value.
 * </p>
 * @return OCI_Collection|false A new <b>OCICollection</b> object or <b>FALSE</b> on
 * error.
 */
#[LanguageLevelTypeAware(['8.0' => 'OCICollection|false'], default: 'OCI_Collection|false')]
function oci_new_collection($connection, $tdo, $schema = null) {}

/**
 * Alias of {@see oci_free_statement()}
 * @link https://php.net/manual/en/function.ocifreecursor.php
 * @param $statement_resource
 * @return bool Returns TRUE on success or FALSE on failure.
 */
function oci_free_cursor($statement_resource) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of
 * {@see oci_free_statement}
 * @link https://php.net/manual/en/function.ocifreecursor.php
 * @param resource $statement_resource
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
#[Deprecated(replacement: "oci_free_statement", since: "5.4")]
function ocifreecursor($statement_resource) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of {@see oci_bind_by_name}
 * @link https://php.net/manual/en/function.ocibindbyname.php
 * @param resource $statement
 * @param string $column_name
 * @param mixed &$variable
 * @param int $maximum_length [optional]
 * @param int $type [optional]
 * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
#[Deprecated(replacement: "oci_bind_by_name", since: "5.4")]
function ocibindbyname($statement, $column_name, &$variable, $maximum_length = -1, $type = SQLT_CHR) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of {@see oci_define_by_name}
 * @link https://php.net/manual/en/function.ocidefinebyname.php
 * @param resource $statement <p>A valid OCI8 statement identifier created by {@see oci_parse()} and executed by {@see oci_execute()}, or a REF CURSOR statement identifier.</p>
 * @param string $column_name <p>The column name used in the query. Use uppercase for Oracle's default, non-case sensitive column names. Use the exact column name case for case-sensitive column names.</p>
 * @param mixed &$variable <p>The PHP variable that will contain the returned column value.</p>
 * @param int $type [optional] <p>The data type to be returned. Generally not needed. Note that Oracle-style data conversions are not performed. For example, SQLT_INT will be ignored and the returned data type will still be SQLT_CHR.
 * You can optionally use {@see oci_new_descriptor()} to allocate LOB/ROWID/BFILE descriptors.</p>
 * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
#[Deprecated(replacement: "oci_define_by_name", since: "5.4")]
function ocidefinebyname($statement, $column_name, &$variable, $type = SQLT_CHR) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of {@see oci_field_is_null}
 * @link https://php.net/manual/en/function.ocicolumnisnull.php
 * @param resource $statement
 * @param mixed $column_number_or_name
 * @return bool Returns TRUE if field is NULL, FALSE otherwise.
 */
#[Deprecated(replacement: "oci_field_is_null", since: "5.4")]
function ocicolumnisnull($statement, $column_number_or_name) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of {@see oci_field_name}
 * @link https://php.net/manual/en/function.ocicolumnname.php
 * @param resource $statement
 * @param mixed $column_number
 * @return string|false Returns the name as a string, or FALSE on errors.
 */
#[Deprecated(replacement: "oci_field_name", since: "5.4")]
function ocicolumnname($statement, $column_number) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of {@see oci_field_size}
 * @link https://php.net/manual/en/function.ocicolumnsize.php
 * @param resource $statement
 * @param mixed $column_number_or_name
 * @return int|false Returns the size of a field in bytes, or <b>FALSE</b> on errors.
 */
#[Deprecated(replacement: "oci_field_size", since: "5.4")]
function ocicolumnsize($statement, $column_number_or_name) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of {@see oci_field_scale}
 * @link https://php.net/manual/en/function.ocicolumnscale.php
 * @param resource $statement_resource
 * @param $column_number
 * @return int|false Returns the scale as an integer, or <b>FALSE</b> on errors.
 */
#[Deprecated(replacement: "oci_field_scale", since: "5.4")]
function ocicolumnscale($statement_resource, $column_number) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of {@see oci_field_precision}
 * @link https://php.net/manual/en/function.ocicolumnprecision.php
 * @param resource $statement_resource
 * @param string|int $column_number
 * @return int|false Returns the precision  as an integer, or <b>FALSE</b> on errors.
 */
#[Deprecated(replacement: "oci_field_precision", since: "5.4")]
function ocicolumnprecision($statement_resource, $column_number) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of {@see oci_field_type}
 * @link https://php.net/manual/en/function.ocicolumntype.php
 * @param resource $statement_resource
 * @param string|int $column_number
 * @return mixed|false Returns the field data type as a string, or FALSE on errors.
 */
#[Deprecated(replacement: "oci_field_type", since: "5.4")]
function ocicolumntype($statement_resource, $column_number) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of {@see oci_field_type_raw}
 * @link https://php.net/manual/en/function.ocicolumntyperaw.php
 * @param resource $statement_resource
 * @param string|int $column_number
 * @return int|false Returns Oracle's raw data type as a number, or FALSE on errors.
 */
#[Deprecated(replacement: "oci_field_type_raw", since: "5.4")]
function ocicolumntyperaw($statement_resource, $column_number) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of {@see oci_execute}
 * @link https://php.net/manual/en/function.ociexecute.php
 * @param $statement_resource
 * @param $mode [optional]
 * @return bool Returns TRUE on success or FALSE on failure
 */
#[Deprecated(replacement: "oci_execute", since: "5.4")]
function ociexecute($statement_resource, $mode = OCI_COMMIT_ON_SUCCESS) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of {@see oci_cancel}
 * @link https://php.net/manual/en/function.ocicancel.php
 * @param resource $statement_resource
 * @return bool Returns TRUE on success or FALSE on failure
 */
#[Deprecated(replacement: 'oci_cancel', since: "5.4")]
function ocicancel($statement_resource) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of {@see oci_fetch}
 * @link https://php.net/manual/en/function.ocifetch.php
 * @param resource $statement_resource
 * @return bool Returns TRUE on success or FALSE if there are no more rows in the statement.
 */
#[Deprecated(replacement: "oci_fetch", since: "5.4")]
function ocifetch($statement_resource) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of {@see oci_fetch_all}
 * @link https://php.net/manual/en/function.ocifetchstatement.php
 * @param resource $statement_resource
 * @param array &$output
 * @param int $skip [optional]
 * @param int $maximum_rows [optional]
 * @param int $flags [optional]
 * @return int|false Returns the number of rows in output, which may be 0 or more, or FALSE on failure.
 */
#[Deprecated(replacement: "oci_fetch_all", since: "5.4")]
function ocifetchstatement($statement_resource, &$output, $skip, $maximum_rows, $flags) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of {@see oci_free_statement}
 * @link https://php.net/manual/en/function.ocifreestatement.php
 * @param resource $statement_resource
 * @return bool Returns TRUE on success or FALSE on failure.
 */
#[Deprecated(replacement: "oci_free_statement", since: "5.4")]
function ocifreestatement($statement_resource) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of {@see oci_internal_debug}
 * @link https://php.net/manual/en/function.ociinternaldebug.php
 * @param bool $mode
 * @removed 8.0
 */
#[Deprecated(replacement: "oci_internal_debug", since: "5.4")]
function ociinternaldebug($mode) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of {@see oci_num_fields}
 * @link https://php.net/manual/en/function.ocinumcols.php
 * @param resource $statement_resource
 * @return int|false Returns the number of columns as an integer, or FALSE on errors.
 */
#[Deprecated(replacement: "oci_num_fields", since: "5.4")]
function ocinumcols($statement_resource) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of {@see oci_parse}
 * @link https://php.net/manual/en/function.ociparse.php
 * @param resource $connection_resource
 * @param string $sql_text
 * @return resource|false Returns a statement handle on success, or FALSE on error.
 */
#[Deprecated(replacement: "oci_parse", since: "5.4")]
function ociparse($connection_resource, $sql_text) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of {@see oci_new_cursor}
 * @link https://php.net/manual/en/function.ocinewcursor.php
 * @param resource $connection_resource
 * @return resource|false Returns a new statement handle, or FALSE on error.
 */
#[Deprecated(replacement: "oci_new_cursor", since: "5.4")]
function ocinewcursor($connection_resource) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of {@see oci_result}
 * @link https://php.net/manual/en/function.ociresult.php
 * @param resource $statement_resource
 * @param $column_number_or_name
 * @return false|mixed Returns everything as strings except for abstract types (ROWIDs, LOBs and FILEs). Returns FALSE on error.
 */
#[Deprecated(replacement: "oci_result", since: "5.4")]
function ociresult($statement_resource, $column_number_or_name) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of {@see oci_server_version}
 * @link https://php.net/manual/en/function.ociserverversion.php
 * @param $connection_resource
 * @return string|false Returns the version information as a string or FALSE on error.
 */
#[Deprecated(replacement: "oci_server_version", since: "5.4")]
function ociserverversion($connection_resource) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of {@see oci_statement_type}
 * @link https://php.net/manual/en/function.ocistatementtype.php
 * @param resource $statement_resource
 * @return string|false Returns everything as strings except for abstract types (ROWIDs, LOBs and FILEs). Returns FALSE on error.
 */
#[Deprecated(replacement: "oci_statement_type", since: "5.4")]
function ocistatementtype($statement_resource) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of {@see oci_num_rows}
 * @link https://php.net/manual/en/function.ocirowcount.php
 * @param resource $statement_resource
 * @return int|false Returns the number of rows affected as an integer, or FALSE on errors.
 */
#[Deprecated(replacement: "oci_num_rows", since: "5.4")]
function ocirowcount($statement_resource) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of {@see oci_close}
 * @link https://php.net/manual/en/function.ocilogoff.php
 * @param resource $connection_resource
 * @return bool Returns TRUE on success or FALSE on failure.
 */
#[Deprecated(replacement: "oci_close", since: "5.4")]
function ocilogoff($connection_resource) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of {@see oci_connect}
 * @link https://php.net/manual/en/function.ocilogon.php
 * @param string $username
 * @param string $password
 * @param string $connection_string [optional]
 * @param string $character_set [optional]
 * @param int $session_mode [optional]
 * @return resource|false Returns a connection identifier or FALSE on error.
 */
#[Deprecated(replacement: "oci_connect", since: "5.4")]
function ocilogon($username, $password, $connection_string, $character_set, $session_mode) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of
 * {@see oci_new_connect}
 * @link https://php.net/manual/en/function.ocinlogon.php
 * @param $username
 * @param $password
 * @param $connection_string [optional]
 * @param $character_set [optional]
 * @param $session_mode [optional]
 * @return resource|false <p>Returns a connection identifier or <b>FALSE</b> on error.</p>
 */
#[Deprecated(replacement: "oci_new_connect", since: "5.4")]
function ocinlogon($username, $password, $connection_string, $character_set, $session_mode) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of
 * {@see oci_pconnect}
 * @link https://php.net/manual/en/function.ociplogon.php
 * @param string $username <p>The Oracle user name.</p>
 * @param string $password <p> The password for username</p>
 * @param $connection_string [optional]
 * @param $character_set [optional]
 * @param $session_mode [optional]
 * @return resource|false <p>Returns a connection identifier or <b>FALSE</b> on error.</p>
 */
#[Deprecated(replacement: "oci_pconnect", since: "5.4")]
function ociplogon($username, $password, $connection_string, $character_set, $session_mode) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of
 * {@see oci_error}
 * @link https://php.net/manual/en/function.ocierror.php
 * @param resource $connection_or_statement_resource [optional] For most errors, resource is the resource handle that was passed to the failing function call.
 * For connection errors with oci_connect(), oci_new_connect() or oci_pconnect() do not pass resource.
 * @return array|false If no error is found, oci_error() returns FALSE. Otherwise, oci_error() returns the error information as an associative array.
 */
#[Deprecated(replacement: "oci_error", since: "5.4")]
function ocierror($connection_or_statement_resource) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of
 * {@see OCI-Lob::free}
 * @link https://php.net/manual/en/function.ocifreedesc.php
 * @param $lob_descriptor
 * @return bool <p>Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.</p>
 */
#[Deprecated(replacement: "OCI-Lob::free", since: "5.4")]
function ocifreedesc($lob_descriptor) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of
 * {@see OCI-Lob::save}
 * @link https://php.net/manual/en/function.ocisavelob.php
 * @param OCI_Lob|OCILob $lob_descriptor
 * @param string $data
 * @param int $offset [optional]
 * @return bool
 */
#[Deprecated(replacement: "OCI-Lob::save", since: "5.4")]
function ocisavelob(#[LanguageLevelTypeAware(['8.0' => 'OCILob'], default: 'OCI_Lob')] $lob_descriptor, $data, $offset) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of
 * {@see OCI_Lob::import}
 * @link https://php.net/manual/en/function.ocisavelobfile.php
 * @param OCI_Lob|OCILob $lob_descriptor
 * @param string $filename
 * @return bool
 */
#[Deprecated(replacement: "OCI_Lob::import", since: "5.4")]
function ocisavelobfile(#[LanguageLevelTypeAware(['8.0' => 'OCILob'], default: 'OCI_Lob')] $lob_descriptor, $filename) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of
 * {@see OCI_Lob::export}
 * @link https://php.net/manual/en/function.ociwritelobtofile.php
 * @param OCI_Lob|OCILob $lob_descriptor
 * @param string $filename <p>Path to the file.</p>
 * @param int $start [optional] <p>Indicates from where to start exporting.</p>
 * @param int $length [optional] <p>Indicates the length of data to be exported.</p>
 * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
#[Deprecated(replacement: "OCI_Lob::export", since: "5.4")]
function ociwritelobtofile(
    #[LanguageLevelTypeAware(['8.0' => 'OCILob'], default: 'OCI_Lob')] $lob_descriptor,
    $filename,
    $start,
    $length
) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of
 * {@see OCI_Lob::load}
 * @link https://php.net/manual/en/function.ociloadlob.php
 * @param OCI_Lob|OCILob $lob_descriptor
 * @return string|false <p>Returns the contents of the object, or <b>FALSE</b> on errors.</p>
 */
#[Deprecated(replacement: "OCI_Lob::load", since: "5.4")]
function ociloadlob(#[LanguageLevelTypeAware(['8.0' => 'OCILob'], default: 'OCI_Lob')] $lob_descriptor) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of
 * {@see oci_commit}
 * @link https://php.net/manual/en/function.ocicommit.php
 * @param $connection_resource <p>
 * An Oracle connection identifier, returned by
 * {@see oci_connect()},
 * {@see oci_pconnect()}, or
 * {@see oci_new_connect()}.
 * </p>
 * @return bool <p>Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.</p>
 */
#[Deprecated(replacement: "oci_commit", since: "5.4")]
function ocicommit($connection_resource) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of
 * {@see oci_rollback}
 * @link https://php.net/manual/en/function.ocirollback.php
 * @param resource $connection_resource
 * @return bool <p>Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.</p>
 */
#[Deprecated(replacement: "oci_rollback", since: "5.4")]
function ocirollback($connection_resource) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of
 * {@see oci_new_descriptor}
 * @link https://php.net/manual/en/function.ocinewdescriptor.php
 * @param resource $connection_resource <p>
 * An Oracle connection identifier, returned by
 * {@see oci_connect()} or {@see oci_pconnect()}.
 * </p>
 * @param $type [optional] <p>Valid values for type are: <b>OCI_DTYPE_FILE</b>, <b>OCI_DTYPE_LOB</b> and <b>OCI_DTYPE_ROWID</b>.</p>
 * @return OCI_LOB|false Returns a new LOB or FILE descriptor on success, FALSE on error.
 */
#[Deprecated(replacement: "oci_new_descriptor", since: "5.4")]
#[LanguageLevelTypeAware(['8.0' => 'OCILob|false'], default: 'OCI_Lob|false')]
function ocinewdescriptor($connection_resource, $type = OCI_DTYPE_LOB) {}

/**
 * (PHP 4, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of {@see oci_set_prefetch}
 * @link https://php.net/manual/en/function.ocisetprefetch.php
 * @param resource $statement_resource <p>A valid OCI8 statement
 * identifier created by
 * {@see oci_parse()} and executed
 * by
 * {@see oci_execute()}, or a <em>REF CURSOR</em> statement identifier.</p>
 * @param $number_of_rows
 * @return bool <p>Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.</p>
 */
#[Deprecated(replacement: "oci_set_prefetch", since: "5.4")]
function ocisetprefetch($statement_resource, $number_of_rows) {}

/**
 * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
 * Changes password of Oracle's user
 * @param resource|string $connection_resource_or_connection_string_or_dbname <p>An Oracle connection identifier, returned by
 * {@see oci_connect()} or
 * {@see oci_pconnect()}.</p>
 * @param string $username <p>The Oracle user name.</p>
 * @param string $old_password <p>The new password to be set.</p>
 * @param string $new_password <p>The new password to be set.</p>
 * @return resource|bool <p>Returns <b>TRUE</b> on success or <b>FALSE</b> on failure or <b>resource</b>, depending on the function parameters.</p>
 */
function ocipasswordchange($connection_resource_or_connection_string_or_dbname, $username, $old_password, $new_password) {}

/**
 * (PHP 4 &gt;= 4.0.7, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of {@see OCI_Collection::free}
 * @link https://php.net/manual/en/function.ocifreecollection.php
 * @param OCI_Collection|OCICollection $collection
 * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
#[Deprecated(replacement: "OCI_Collection::free", since: "5.4")]
function ocifreecollection(#[LanguageLevelTypeAware(['8.0' => 'OCICollection'], default: 'OCI_Collection')] $collection) {}

/**
 * (PHP 4 &gt;= 4.0.6, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of
 * {@see oci_new_collection}
 * @link https://php.net/manual/en/function.ocinewcollection.php
 * @param $connection_resource <p>
 * An Oracle connection identifier, returned by
 * {@see oci_connect()} or
 * {@see oci_pconnect()}.
 * @param $tdo <p>Should be a valid named type (uppercase).</p>
 * @param $schema <p>Should point to the scheme, where the named type was created. The name of the current user is the default value.</p>
 * </p>
 * @return OCI_Collection|false <p>Returns a new OCI_Collection object or FALSE on error.</p>
 */
#[Deprecated(replacement: "oci_new_collection", since: "5.4")]
#[LanguageLevelTypeAware(['8.0' => 'OCICollection|false'], default: 'OCI_Collection|false')]
function ocinewcollection($connection_resource, $tdo, $schema = null) {}

/**
 * (PHP 4 &gt;= 4.0.6, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of
 * (@see OCI_Collection::append)
 * @link https://php.net/manual/en/function.ocicollappend.php
 * @param OCI_Collection $collection
 * @param mixed $value <p>The value to be added to the collection. Can be a string or a number.</p>
 * @return bool <p>Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.</p>
 */
#[Deprecated(replacement: "OCI_Collection::append", since: "5.4")]
function ocicollappend(#[LanguageLevelTypeAware(['8.0' => 'OCICollection'], default: 'OCI_Collection')] $collection, $value) {}

/**
 * (PHP 4 &gt;= 4.0.6, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of
 * {@see OCI_COLLection::getElem}
 * @link https://php.net/manual/en/function.ocicollgetelem.php
 * @param OCI_Collection $collection
 * @param int $index <p>The element index. First index is 0.</p>
 * @return mixed <p>Returns <b>FALSE</b> if such element doesn't exist; <b>NULL</b> if element is <b>NULL</b>; string if element is column of a string datatype or number if element is numeric field.</p>
 */
#[Deprecated(replacement: "OCI_COLLection::getElem", since: "5.4")]
function ocicollgetelem(#[LanguageLevelTypeAware(['8.0' => 'OCICollection'], default: 'OCI_Collection')] $collection, $index) {}

/**
 * (PHP 4 &gt;= 4.0.6, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of {@see OCI_Collection::assignElem}
 * @link https://php.net/manual/en/function.ocicollassignelem.php
 * @param OCI_Collection $collection
 * @param $index <p>The element index. First index is 0.</p>
 * @param $value <p>Can be a string or a number.</p>
 * @return bool <p>Returns TRUE on success or FALSE on failure.</p>
 */
#[Deprecated(replacement: "OCI_Collection::assignElem", since: "5.4")]
function ocicollassignelem(#[LanguageLevelTypeAware(['8.0' => 'OCICollection'], default: 'OCI_Collection')] $collection, $index, $value) {}

/**
 * (PHP 4 &gt;= 4.0.6, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of
 * {@see OCI_COLLection::size}
 * @link https://php.net/manual/en/function.ocicollsize.php
 * @param OCI_Collection $collection
 * @return int|false <p>Returns the number of elements in the collection or <b>FALSE</b> on error.</p>
 */
#[Deprecated(replacement: "OCI_COLLection::size", since: "5.4")]
function ocicollsize(#[LanguageLevelTypeAware(['8.0' => 'OCICollection'], default: 'OCI_Collection')] $collection) {}

/**
 * (PHP 4 &gt;= 4.0.6, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of
 * {@see OCI_COLLection::max}
 * @link https://php.net/manual/en/function.ocicollmax.php
 * @param OCI_Collection $collection
 * @return int|false <p> Returns the maximum number as an integer, or <b>FALSE</b> on errors.
 * If the returned value is 0, then the number of elements is not limited.</p>
 */
#[Deprecated(replacement: "OCI_COLLection::max", since: "5.4")]
function ocicollmax(#[LanguageLevelTypeAware(['8.0' => 'OCICollection'], default: 'OCI_Collection')] $collection) {}

/**
 * (PHP 4 &gt;= 4.0.6, PHP 5, PECL OCI8 &gt;= 1.0.0)<br/>
 * Alias of
 * {@see OCI_Collection::trim}
 * @link https://php.net/manual/en/function.ocicolltrim.php
 * @param OCI_Collection $collection
 * @param int|float $number
 * @return bool Returns <b>TRUE</b> or <b>FALSE</b> on failure.
 */
#[Deprecated(replacement: "OCI_Collection::trim", since: "5.4")]
function ocicolltrim(#[LanguageLevelTypeAware(['8.0' => 'OCICollection'], default: 'OCI_Collection')] $collection, $number) {}

/**
 * (PHP 4 &gt;= 4.0.6, PECL OCI8 1.0)
 * Writes a temporary large object
 * Alias of {@see OCI-Lob::writeTemporary()}
 * @link https://php.net/manual/en/function.ociwritetemporarylob.php
 * @param OCI_Lob|OCILob $lob_descriptor
 * @param string $data <p>The data to write.</p>
 * @param int $lob_type <p>
 * Can be one of the following:
 * </p><ul>
 * <li>
 * <b>OCI_TEMP_BLOB</b> is used to create temporary BLOBs
 * </li>
 * <li>
 * <b>OCI_TEMP_CLOB</b> is used to create
 * temporary CLOBs
 * </li>
 * </ul>
 * @return bool <p>Returns TRUE on success or FALSE on failure.</p>
 */
#[Deprecated(replacement: "OCI-Lob::writeTemporary", since: "5.4")]
function ociwritetemporarylob(
    #[LanguageLevelTypeAware(['8.0' => 'OCILob'], default: 'OCI_Lob')] $lob_descriptor,
    $data,
    $lob_type = OCI_TEMP_CLOB
) {}

/**
 * (PHP 4 &gt;= 4.0.6, PECL OCI8 1.0)
 * Alias of {@see OCI-Lob::close()}
 * @link https://php.net/manual/en/function.ocicloselob.php
 * @param OCI_Lob|OCILob $lob_descriptor
 * @return bool <p>Returns TRUE on success or FALSE on failure.</p>
 */
#[Deprecated(replacement: "OCI-Lob::close()", since: "5.4")]
function ocicloselob(#[LanguageLevelTypeAware(['8.0' => 'OCILob'], default: 'OCI_Lob')] $lob_descriptor) {}

/**
 * (PHP 4 >= 4.0.6, PECL OCI8 1.0)
 * Alias of {@see OCI-Collection::assign()}
 * Assigns a value to the collection from another existing collection
 * @link https://php.net/manual/en/function.ocicollassign.php
 * @param OCI_Collection $to
 * @param OCI_Collection $from An instance of OCI-Collection.
 * @return bool <p>Returns TRUE on success or FALSE on failure.</p>
 */
#[Deprecated(replacement: "OCI-Collection::assign", since: "5.4")]
function ocicollassign(
    #[LanguageLevelTypeAware(['8.0' => 'OCICollection'], default: 'OCI_Collection')] $to,
    #[LanguageLevelTypeAware(['8.0' => 'OCICollection'], default: 'OCI_Collection')] $from
) {}
/**
 * See <b>OCI_NO_AUTO_COMMIT</b>.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_DEFAULT', 0);

/**
 * Used with {@see oci_connect} to connect with
 * the SYSOPER privilege. The <i>php.ini</i> setting
 * oci8.privileged_connect
 * should be enabled to use this.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_SYSOPER', 4);

/**
 * Used with {@see oci_connect} to connect with
 * the SYSDBA privilege. The <i>php.ini</i> setting
 * oci8.privileged_connect
 * should be enabled to use this.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_SYSDBA', 2);

/**
 * Used with {@see oci_connect} for using
 * Oracles' External or OS authentication. Introduced in PHP
 * 5.3 and PECL OCI8 1.3.4.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_CRED_EXT', -2147483648);

/**
 * Statement execution mode
 * for {@see oci_execute}. Use this mode if you
 * want meta data such as the column names but don't want to
 * fetch rows from the query.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_DESCRIBE_ONLY', 16);

/**
 * Statement execution mode for {@see oci_execute}
 * call. Automatically commit changes when the statement has
 * succeeded.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_COMMIT_ON_SUCCESS', 32);

/**
 * Statement execution mode
 * for {@see oci_execute}. The transaction is not
 * automatically committed when using this mode. For
 * readability in new code, use this value instead of the
 * older, equivalent <b>OCI_DEFAULT</b> constant.
 * Introduced in PHP 5.3.2 (PECL OCI8 1.4).
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_NO_AUTO_COMMIT', 0);

/**
 * Obsolete. Statement fetch mode. Used when the application
 * knows in advance exactly how many rows it will be fetching.
 * This mode turns prefetching off for Oracle release 8 or
 * later mode. The cursor is canceled after the desired rows
 * are fetched which may result in reduced server-side
 * resource usage.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_EXACT_FETCH', 2);

/**
 * Used with to set the seek position.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_SEEK_SET', 0);

/**
 * Used with to set the seek position.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_SEEK_CUR', 1);

/**
 * Used with to set the seek position.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_SEEK_END', 2);

/**
 * Used with to free
 * buffers used.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_LOB_BUFFER_FREE', 1);

/**
 * The same as <b>OCI_B_BFILE</b>.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('SQLT_BFILEE', 114);

/**
 * The same as <b>OCI_B_CFILEE</b>.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('SQLT_CFILEE', 115);

/**
 * The same as <b>OCI_B_CLOB</b>.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('SQLT_CLOB', 112);

/**
 * The same as <b>OCI_B_BLOB</b>.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('SQLT_BLOB', 113);

/**
 * The same as <b>OCI_B_ROWID</b>.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('SQLT_RDD', 104);

/**
 * The same as <b>OCI_B_INT</b>.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('SQLT_INT', 3);

/**
 * The same as <b>OCI_B_NUM</b>.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('SQLT_NUM', 2);

/**
 * The same as <b>OCI_B_CURSOR</b>.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('SQLT_RSET', 116);

/**
 * Used with {@see oci_bind_array_by_name} to bind arrays of
 * CHAR.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('SQLT_AFC', 96);

/**
 * Used with {@see oci_bind_array_by_name} to bind arrays of
 * VARCHAR2.
 * Also used with {@see oci_bind_by_name}.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('SQLT_CHR', 1);

/**
 * Used with {@see oci_bind_array_by_name} to bind arrays of
 * VARCHAR.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('SQLT_VCS', 9);

/**
 * Used with {@see oci_bind_array_by_name} to bind arrays of
 * VARCHAR2.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('SQLT_AVC', 97);

/**
 * Used with {@see oci_bind_array_by_name} to bind arrays of
 * STRING.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('SQLT_STR', 5);

/**
 * Used with {@see oci_bind_array_by_name} to bind arrays of
 * LONG VARCHAR.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('SQLT_LVC', 94);

/**
 * Used with {@see oci_bind_array_by_name} to bind arrays of
 * FLOAT.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('SQLT_FLT', 4);

/**
 * Not supported.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('SQLT_UIN', 68);

/**
 * Used with {@see oci_bind_by_name} to bind LONG values.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('SQLT_LNG', 8);

/**
 * Used with {@see oci_bind_by_name} to bind LONG RAW values.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('SQLT_LBI', 24);

/**
 * The same as <b>OCI_B_BIN</b>.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('SQLT_BIN', 23);

/**
 * Used with {@see oci_bind_array_by_name} to bind arrays of
 * LONG.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('SQLT_ODT', 156);

/**
 * Not supported.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('SQLT_BDOUBLE', 22);

/**
 * Not supported.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('SQLT_BFLOAT', 21);

/**
 * Used with {@see oci_bind_by_name} when binding
 * named data types. Note: in PHP &lt; 5.0 it was called
 * <b>OCI_B_SQLT_NTY</b>.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_B_NTY', 108);

/**
 * The same as <b>OCI_B_NTY</b>.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('SQLT_NTY', 108);

/**
 * Obsolete.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_SYSDATE', "SYSDATE");

/**
 * Used with {@see oci_bind_by_name} when binding
 * BFILEs.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_B_BFILE', 114);

/**
 * Used with {@see oci_bind_by_name} when binding
 * CFILEs.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_B_CFILEE', 115);

/**
 * Used with {@see oci_bind_by_name} when binding
 * CLOBs.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_B_CLOB', 112);

/**
 * Used with {@see oci_bind_by_name} when
 * binding BLOBs.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_B_BLOB', 113);

/**
 * Used with {@see oci_bind_by_name} when binding
 * ROWIDs.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_B_ROWID', 104);

/**
 * Used with {@see oci_bind_by_name} when binding
 * cursors, previously allocated
 * with {@see oci_new_descriptor}.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_B_CURSOR', 116);

/**
 * Used with {@see oci_bind_by_name} to bind RAW values.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_B_BIN', 23);

/**
 * Used with {@see oci_bind_array_by_name} to bind arrays of
 * INTEGER.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_B_INT', 3);

/**
 * Used with {@see oci_bind_array_by_name} to bind arrays of
 * NUMBER.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_B_NUM', 2);

/**
 * Default mode of {@see oci_fetch_all}.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_FETCHSTATEMENT_BY_COLUMN', 16);

/**
 * Alternative mode of {@see oci_fetch_all}.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_FETCHSTATEMENT_BY_ROW', 32);

/**
 * Used with {@see oci_fetch_all} and
 * {@see oci_fetch_array} to get results as an associative
 * array.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_ASSOC', 1);

/**
 * Used with {@see oci_fetch_all} and
 * {@see oci_fetch_array} to get results as an
 * enumerated array.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_NUM', 2);

/**
 * Used with {@see oci_fetch_all} and
 * {@see oci_fetch_array} to get results as an
 * array with both associative and number indices.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_BOTH', 3);

/**
 * Used with {@see oci_fetch_array} to get empty
 * array elements if the row items value is <b>NULL</b>.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_RETURN_NULLS', 4);

/**
 * Used with {@see oci_fetch_array} to get the
 * data value of the LOB instead of the descriptor.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_RETURN_LOBS', 8);

/**
 * This flag tells {@see oci_new_descriptor} to
 * initialize a new FILE descriptor.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_DTYPE_FILE', 56);

/**
 * This flag tells {@see oci_new_descriptor} to
 * initialize a new LOB descriptor.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_DTYPE_LOB', 50);

/**
 * This flag tells {@see oci_new_descriptor} to
 * initialize a new ROWID descriptor.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_DTYPE_ROWID', 54);

/**
 * The same as <b>OCI_DTYPE_FILE</b>.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_D_FILE', 56);

/**
 * The same as <b>OCI_DTYPE_LOB</b>.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_D_LOB', 50);

/**
 * The same as <b>OCI_DTYPE_ROWID</b>.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_D_ROWID', 54);

/**
 * Used with
 * to indicate that a temporary CLOB should be created.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_TEMP_CLOB', 2);

/**
 * Used with
 * to indicate that a temporary BLOB should be created.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_TEMP_BLOB', 1);

/**
 * (PECL OCI8 &gt;= 2.0.7)<br/>
 * The same as <b>OCI_B_BOL</b>.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('SQLT_BOL', 252);

/**
 * (PECL OCI8 &gt;= 2.0.7)<br/>
 * Used with {@see oci_bind_by_name} when
 * binding PL/SQL BOOLEAN.
 * @link https://php.net/manual/en/oci8.constants.php
 */
define('OCI_B_BOL', 252);

// End of oci8 v.2.0.7
<?php

// Start of oci8 v.3

/**
 * OCI8 LOB functionality for large binary (BLOB) and character (CLOB) objects.
 * @link https://php.net/manual/en/class.OCI-Lob.php
 * @since 8.0
 */
class OCILob
{
    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Returns large object's contents
     * @link https://php.net/manual/en/oci-lob.load.php
     * @return string|false The contents of the object, or <b>FALSE</b> on errors.
     */
    public function load() {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Returns the current position of internal pointer of large object
     * @link https://php.net/manual/en/oci-lob.tell.php
     * @return int|false Current position of a LOB's internal pointer or <b>FALSE</b> if an
     * error occurred.
     */
    public function tell() {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Truncates large object
     * @link https://php.net/manual/en/oci-lob.truncate.php
     * @param int $length [optional] <p>
     * If provided, this method will truncate the LOB to
     * <i>length</i> bytes. Otherwise, it will completely
     * purge the LOB.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function truncate($length = 0) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Erases a specified portion of the internal LOB data
     * @link https://php.net/manual/en/oci-lob.erase.php
     * @param int $offset [optional]
     * @param int $length [optional]
     * @return int|false The actual number of characters/bytes erased or <b>FALSE</b> on failure.
     */
    public function erase($offset = null, $length = null) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Flushes/writes buffer of the LOB to the server
     * @link https://php.net/manual/en/oci-lob.flush.php
     * @param int $flag [optional] <p>
     * By default, resources are not freed, but using flag
     * <b>OCI_LOB_BUFFER_FREE</b> you can do it explicitly.
     * Be sure you know what you're doing - next read/write operation to the
     * same part of LOB will involve a round-trip to the server and initialize
     * new buffer resources. It is recommended to use
     * <b>OCI_LOB_BUFFER_FREE</b> flag only when you are not
     * going to work with the LOB anymore.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * </p>
     * <p>
     * Returns <b>FALSE</b> if buffering was not enabled or an error occurred.
     */
    public function flush($flag = null) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Changes current state of buffering for the large object
     * @link https://php.net/manual/en/oci-lob.setbuffering.php
     * @param bool $on_off <p>
     * <b>TRUE</b> for on and <b>FALSE</b> for off.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. Repeated calls to this method with the same flag will
     * return <b>TRUE</b>.
     */
    public function setbuffering($on_off) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Returns current state of buffering for the large object
     * @link https://php.net/manual/en/oci-lob.getbuffering.php
     * @return bool <b>FALSE</b> if buffering for the large object is off and <b>TRUE</b> if
     * buffering is used.
     */
    public function getbuffering() {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Moves the internal pointer to the beginning of the large object
     * @link https://php.net/manual/en/oci-lob.rewind.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function rewind() {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Reads part of the large object
     * @link https://php.net/manual/en/oci-lob.read.php
     * @param int $length <p>
     * The length of data to read, in bytes. Large values will be rounded down to 1 MB.
     * </p>
     * @return string|false The contents as a string, or <b>FALSE</b> on failure.
     */
    public function read($length) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Tests for end-of-file on a large object's descriptor
     * @link https://php.net/manual/en/oci-lob.eof.php
     * @return bool <b>TRUE</b> if internal pointer of large object is at the end of LOB.
     * Otherwise returns <b>FALSE</b>.
     */
    public function eof() {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Sets the internal pointer of the large object
     * @link https://php.net/manual/en/oci-lob.seek.php
     * @param int $offset <p>
     * Indicates the amount of bytes, on which internal pointer should be
     * moved from the position, pointed by <i>whence</i>.
     * </p>
     * @param int $whence [optional] <p>
     * May be one of:
     * <b>OCI_SEEK_SET</b> - sets the position equal to
     * <i>offset</i>
     * <b>OCI_SEEK_CUR</b> - adds <i>offset</i>
     * bytes to the current position
     * <b>OCI_SEEK_END</b> - adds <i>offset</i>
     * bytes to the end of large object (use negative value to move to a position
     * before the end of large object)
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function seek($offset, $whence = OCI_SEEK_SET) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Writes data to the large object
     * @link https://php.net/manual/en/oci-lob.write.php
     * @param string $data <p>
     * The data to write in the LOB.
     * </p>
     * @param int $length [optional] <p>
     * If this parameter is given, writing will stop after
     * <i>length</i> bytes have been written or the end of
     * <i>data</i> is reached, whichever comes first.
     * </p>
     * @return int|false The number of bytes written or <b>FALSE</b> on failure.
     */
    public function write($data, $length = null) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Appends data from the large object to another large object
     * @link https://php.net/manual/en/oci-lob.append.php
     * @param OCILob $lob_from <p>
     * The copied LOB.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function append(OCILob $lob_from) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Returns size of large object
     * @link https://php.net/manual/en/oci-lob.size.php
     * @return int|false Length of large object value or <b>FALSE</b> on failure.
     * Empty objects have zero length.
     */
    public function size() {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Alias of {@see OCILob::export}
     * @link https://php.net/manual/en/oci-lob.writetofile.php
     * @param $filename
     * @param $start [optional]
     * @param $length [optional]
     * @return bool TRUE on success or FALSE on failure.
     */
    public function writetofile($filename, $start, $length) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Exports LOB's contents to a file
     * @link https://php.net/manual/en/oci-lob.export.php
     * @param string $filename <p>
     * Path to the file.
     * </p>
     * @param int $start [optional] <p>
     * Indicates from where to start exporting.
     * </p>
     * @param int $length [optional] <p>
     * Indicates the length of data to be exported.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function export($filename, $start = null, $length = null) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Imports file data to the LOB
     * @link https://php.net/manual/en/oci-lob.import.php
     * @param string $filename <p>
     * Path to the file.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function import($filename) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Writes a temporary large object
     * @link https://php.net/manual/en/oci-lob.writetemporary.php
     * @param string $data <p>
     * The data to write.
     * </p>
     * @param int $lob_type [optional] <p>
     * Can be one of the following:
     * <b>OCI_TEMP_BLOB</b> is used to create temporary BLOBs
     * <b>OCI_TEMP_CLOB</b> is used to create
     * temporary CLOBs
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function writeTemporary($data, $lob_type = OCI_TEMP_CLOB) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Closes LOB descriptor
     * @link https://php.net/manual/en/oci-lob.close.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function close() {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Saves data to the large object
     * @link https://php.net/manual/en/oci-lob.save.php
     * @param string $data <p>
     * The data to be saved.
     * </p>
     * @param int $offset [optional] <p>
     * Can be used to indicate offset from the beginning of the large object.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function save($data, $offset = null) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Alias of {@see OCILob::import}
     * @link https://php.net/manual/en/oci-lob.savefile.php
     * @param $filename
     * @return bool Return true on success and false on failure
     */
    public function savefile($filename) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Frees resources associated with the LOB descriptor
     * @link https://php.net/manual/en/oci-lob.free.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function free() {}
}

/**
 * OCI8 Collection functionality.
 * @link https://php.net/manual/en/class.OCICollection.php
 * @since 8.0
 */
class OCICollection
{
    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Appends element to the collection
     * @link https://php.net/manual/en/oci-collection.append.php
     * @param mixed $value <p>
     * The value to be added to the collection. Can be a string or a number.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function append($value) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Returns value of the element
     * @link https://php.net/manual/en/oci-collection.getelem.php
     * @param int $index <p>
     * The element index. First index is 0.
     * </p>
     * @return mixed <b>FALSE</b> if such element doesn't exist; <b>NULL</b> if element is <b>NULL</b>;
     * string if element is column of a string datatype or number if element is
     * numeric field.
     */
    public function getelem($index) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Assigns a value to the element of the collection
     * @link https://php.net/manual/en/oci-collection.assignelem.php
     * @param int $index <p>
     * The element index. First index is 0.
     * </p>
     * @param mixed $value <p>
     * Can be a string or a number.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function assignelem($index, $value) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Assigns a value to the collection from another existing collection
     * @link https://php.net/manual/en/oci-collection.assign.php
     * @param OCICollection $from <p>
     * An instance of OCICollection.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function assign(OCICollection $from) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Returns size of the collection
     * @link https://php.net/manual/en/oci-collection.size.php
     * @return int|false The number of elements in the collection or <b>FALSE</b> on error.
     */
    public function size() {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Returns the maximum number of elements in the collection
     * @link https://php.net/manual/en/oci-collection.max.php
     * @return int|false The maximum number as an integer, or <b>FALSE</b> on errors.
     * </p>
     * <p>
     * If the returned value is 0, then the number of elements is not limited.
     */
    public function max() {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Trims elements from the end of the collection
     * @link https://php.net/manual/en/oci-collection.trim.php
     * @param int $num <p>
     * The number of elements to be trimmed.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function trim($num) {}

    /**
     * (PHP 5, PECL OCI8 &gt;= 1.1.0)<br/>
     * Frees the resources associated with the collection object
     * @link https://php.net/manual/en/oci-collection.free.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function free() {}
}

/**
 * (PHP 7.2 &gt;= 7.2.14, PHP 8, PHP 7 &gt;= 7.3.1, PHP 8, PECL OCI8 &gt;= 2.2.0)<br/>
 * Sets a millisecond timeout for database calls
 * @link https://php.net/manual/en/function.oci-set-call-timout.php
 * @param resource $connection <p>An Oracle connection identifier,
 * returned by {@see oci_connect}, {@see oci_pconnect},
 * or {@see oci_new_connect}.</p>
 * @param int $time_out <p>The maximum time in milliseconds that any
 * single round-trip between PHP and Oracle Database may take.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function oci_set_call_timeout($connection, int $time_out) {}

/**
 * (PHP 7 &gt;== 7.2.14, PHP 8, PHP 7 &gt;= 7.3.1, PHP 8, PECL OCI8 &gt;= 2.2.0)
 * Sets the database operation
 * @link https://www.php.net/manual/en/function.oci-set-db-operation.php
 * @param resource $connection <p>An Oracle connection identifier,
 * returned by {@see oci_connect}, {@see oci_pconnect},
 * or {@see oci_new_connect}.</p>
 * @param string $dbop <p>User chosen string.</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function oci_set_db_operation($connection, string $dbop) {}
<?php

/**
 * @since 8.1
 */
final class GdFont {}
<?php

use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Pure;

/**
 * Retrieve information about the currently installed GD library
 * @link https://php.net/manual/en/function.gd-info.php
 * @return array an associative array.
 * <p>
 * <table>
 * Elements of array returned by <b>gd_info</b>
 * <tr valign="top">
 * <td>Attribute</td>
 * <td>Meaning</td>
 * </tr>
 * <tr valign="top">
 * <td>GD Version</td>
 * <td>string value describing the installed
 * libgd version.</td>
 * </tr>
 * <tr valign="top">
 * <td>FreeType Support</td>
 * <td>boolean value. <b>TRUE</b>
 * if FreeType Support is installed.</td>
 * </tr>
 * <tr valign="top">
 * <td>FreeType Linkage</td>
 * <td>string value describing the way in which
 * FreeType was linked. Expected values are: 'with freetype',
 * 'with TTF library', and 'with unknown library'. This element will
 * only be defined if FreeType Support evaluated to
 * <b>TRUE</b>.</td>
 * </tr>
 * <tr valign="top">
 * <td>T1Lib Support</td>
 * <td>boolean value. <b>TRUE</b>
 * if T1Lib support is included.</td>
 * </tr>
 * <tr valign="top">
 * <td>GIF Read Support</td>
 * <td>boolean value. <b>TRUE</b>
 * if support for reading GIF
 * images is included.</td>
 * </tr>
 * <tr valign="top">
 * <td>GIF Create Support</td>
 * <td>boolean value. <b>TRUE</b>
 * if support for creating GIF
 * images is included.</td>
 * </tr>
 * <tr valign="top">
 * <td>JPEG Support</td>
 * <td>boolean value. <b>TRUE</b>
 * if JPEG support is included.</td>
 * </tr>
 * <tr valign="top">
 * <td>PNG Support</td>
 * <td>boolean value. <b>TRUE</b>
 * if PNG support is included.</td>
 * </tr>
 * <tr valign="top">
 * <td>WBMP Support</td>
 * <td>boolean value. <b>TRUE</b>
 * if WBMP support is included.</td>
 * </tr>
 * <tr valign="top">
 * <td>XBM Support</td>
 * <td>boolean value. <b>TRUE</b>
 * if XBM support is included.</td>
 * </tr>
 * <tr valign="top">
 * <td>WebP Support</td>
 * <td>boolean value. <b>TRUE</b>
 * if WebP support is included.</td>
 * </tr>
 * </table>
 * </p>
 * <p>
 * Previous to PHP 5.3.0, the JPEG Support attribute was named
 * JPG Support.
 * </p>
 */
#[Pure]
#[ArrayShape([
    "GD Version" => "string",
    "FreeType Support" => "bool",
    "GIF Read Support" => "bool",
    "GIF Create Support" => "bool",
    "JPEG Support" => "bool",
    "PNG Support" => "bool",
    "WBMP Support" => "bool",
    "XPM Support" => "bool",
    "XBM Support" => "bool",
    "WebP Support" => "bool",
    "BMP Support" => "bool",
    "TGA Read Support" => "bool",
    "AVIF Support" => "bool",
    "JIS-mapped Japanese Font Support" => "bool"
])]
function gd_info(): array {}

/**
 * Draws an arc
 * @link https://php.net/manual/en/function.imagearc.php
 * @param resource|GdImage $image
 * @param int $center_x <p>
 * x-coordinate of the center.
 * </p>
 * @param int $center_y <p>
 * y-coordinate of the center.
 * </p>
 * @param int $width <p>
 * The arc width.
 * </p>
 * @param int $height <p>
 * The arc height.
 * </p>
 * @param int $start_angle <p>
 * The arc start angle, in degrees.
 * </p>
 * @param int $end_angle <p>
 * The arc end angle, in degrees.
 * 0° is located at the three-o'clock position, and the arc is drawn
 * clockwise.
 * </p>
 * @param int $color <p>
 * A color identifier created with
 * <b>imagecolorallocate</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function imagearc(GdImage $image, int $center_x, int $center_y, int $width, int $height, int $start_angle, int $end_angle, int $color): bool {}

/**
 * Draw an ellipse
 * @link https://php.net/manual/en/function.imageellipse.php
 * @param resource|GdImage $image
 * @param int $center_x <p>
 * x-coordinate of the center.
 * </p>
 * @param int $center_y <p>
 * y-coordinate of the center.
 * </p>
 * @param int $width <p>
 * The ellipse width.
 * </p>
 * @param int $height <p>
 * The ellipse height.
 * </p>
 * @param int $color <p>
 * The color of the ellipse. A color identifier created with
 * <b>imagecolorallocate</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function imageellipse(GdImage $image, int $center_x, int $center_y, int $width, int $height, int $color): bool {}

/**
 * Draw a character horizontally
 * @link https://php.net/manual/en/function.imagechar.php
 * @param resource|GdImage $image
 * @param int $font
 * @param int $x <p>
 * x-coordinate of the start.
 * </p>
 * @param int $y <p>
 * y-coordinate of the start.
 * </p>
 * @param string $char <p>
 * The character to draw.
 * </p>
 * @param int $color <p>
 * A color identifier created with
 * <b>imagecolorallocate</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function imagechar(
    GdImage $image,
    #[LanguageLevelTypeAware(['8.1' => 'GdFont|int'], default: 'int')] $font,
    int $x,
    int $y,
    string $char,
    int $color
): bool {}

/**
 * Draw a character vertically
 * @link https://php.net/manual/en/function.imagecharup.php
 * @param resource|GdImage $image
 * @param int $font
 * @param int $x <p>
 * x-coordinate of the start.
 * </p>
 * @param int $y <p>
 * y-coordinate of the start.
 * </p>
 * @param string $char <p>
 * The character to draw.
 * </p>
 * @param int $color <p>
 * A color identifier created with
 * <b>imagecolorallocate</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function imagecharup(
    GdImage $image,
    #[LanguageLevelTypeAware(['8.1' => 'GdFont|int'], default: 'int')] $font,
    int $x,
    int $y,
    string $char,
    int $color
): bool {}

/**
 * Get the index of the color of a pixel
 * @link https://php.net/manual/en/function.imagecolorat.php
 * @param resource|GdImage $image
 * @param int $x <p>
 * x-coordinate of the point.
 * </p>
 * @param int $y <p>
 * y-coordinate of the point.
 * </p>
 * @return int|false the index of the color or <b>FALSE</b> on failure
 */
#[Pure]
function imagecolorat(GdImage $image, int $x, int $y): int|false {}

/**
 * Allocate a color for an image
 * @link https://php.net/manual/en/function.imagecolorallocate.php
 * @param resource|GdImage $image
 * @param int $red <p>Value of red component.</p>
 * @param int $green <p>Value of green component.</p>
 * @param int $blue <p>Value of blue component.</p>
 * @return int|false A color identifier or <b>FALSE</b> if the allocation failed.
 */
function imagecolorallocate(GdImage $image, int $red, int $green, int $blue): int|false {}

/**
 * Copy the palette from one image to another
 * @link https://php.net/manual/en/function.imagepalettecopy.php
 * @param resource|GdImage $dst <p>
 * The destination image resource.
 * </p>
 * @param resource|GdImage $src <p>
 * The source image resource.
 * </p>
 * @return void No value is returned.
 */
function imagepalettecopy(GdImage $dst, GdImage $src): void {}

/**
 * Create a new image from the image stream in the string
 * @link https://php.net/manual/en/function.imagecreatefromstring.php
 * @param string $data <p>
 * A string containing the image data.
 * </p>
 * @return resource|GdImage|false An image resource will be returned on success. <b>FALSE</b> is returned if
 * the image type is unsupported, the data is not in a recognised format,
 * or the image is corrupt and cannot be loaded.
 */
#[Pure]
function imagecreatefromstring(string $data): GdImage|false {}

/**
 * Get the index of the closest color to the specified color
 * @link https://php.net/manual/en/function.imagecolorclosest.php
 * @param resource|GdImage $image
 * @param int $red <p>Value of red component.</p>
 * @param int $green <p>Value of green component.</p>
 * @param int $blue <p>Value of blue component.</p>
 * @return int|false the index of the closest color, in the palette of the image, to
 * the specified one or <b>FALSE</b> on failure
 */
#[Pure]
function imagecolorclosest(GdImage $image, int $red, int $green, int $blue): int {}

/**
 * Get the index of the color which has the hue, white and blackness
 * @link https://php.net/manual/en/function.imagecolorclosesthwb.php
 * @param resource|GdImage $image
 * @param int $red <p>Value of red component.</p>
 * @param int $green <p>Value of green component.</p>
 * @param int $blue <p>Value of blue component.</p>
 * @return int|false an integer with the index of the color which has
 * the hue, white and blackness nearest the given color or <b>FALSE</b> on failure
 */
#[Pure]
function imagecolorclosesthwb(GdImage $image, int $red, int $green, int $blue): int {}

/**
 * De-allocate a color for an image
 * @link https://php.net/manual/en/function.imagecolordeallocate.php
 * @param resource|GdImage $image
 * @param int $color <p>
 * The color identifier.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function imagecolordeallocate(GdImage $image, int $color): bool {}

/**
 * Get the index of the specified color or its closest possible alternative
 * @link https://php.net/manual/en/function.imagecolorresolve.php
 * @param resource|GdImage $image
 * @param int $red <p>Value of red component.</p>
 * @param int $green <p>Value of green component.</p>
 * @param int $blue <p>Value of blue component.</p>
 * @return int|false a color index or <b>FALSE</b> on failure
 */
#[Pure]
function imagecolorresolve(GdImage $image, int $red, int $green, int $blue): int {}

/**
 * Get the index of the specified color
 * @link https://php.net/manual/en/function.imagecolorexact.php
 * @param resource|GdImage $image
 * @param int $red <p>Value of red component.</p>
 * @param int $green <p>Value of green component.</p>
 * @param int $blue <p>Value of blue component.</p>
 * @return int|false the index of the specified color in the palette, -1 if the
 * color does not exist, or <b>FALSE</b> on failure
 */
#[Pure]
function imagecolorexact(GdImage $image, int $red, int $green, int $blue): int {}

/**
 * Set the color for the specified palette index
 * @link https://php.net/manual/en/function.imagecolorset.php
 * @param resource|GdImage $image
 * @param int $color <p>
 * An index in the palette.
 * </p>
 * @param int $red <p>Value of red component.</p>
 * @param int $green <p>Value of green component.</p>
 * @param int $blue <p>Value of blue component.</p>
 * @param int $alpha [optional] <p>
 * Value of alpha component.
 * </p>
 * @return bool|null
 */
#[LanguageLevelTypeAware(['8.2' => 'null|false'], default: 'null|bool')]
function imagecolorset(GdImage $image, int $color, int $red, int $green, int $blue, int $alpha = 0): ?bool {}

/**
 * Define a color as transparent
 * @link https://php.net/manual/en/function.imagecolortransparent.php
 * @param resource|GdImage $image
 * @param int $color [optional] <p>
 * A color identifier created with
 * <b>imagecolorallocate</b>.
 * </p>
 * @return int The identifier of the new (or current, if none is specified)
 * transparent color is returned. If <i>color</i>
 * is not specified, and the image has no transparent color, the
 * returned identifier will be -1.
 */
function imagecolortransparent(GdImage $image, ?int $color = null): int {}

/**
 * Find out the number of colors in an image's palette
 * @link https://php.net/manual/en/function.imagecolorstotal.php
 * @param resource|GdImage $image <p>
 * An image resource, returned by one of the image creation functions, such
 * as <b>imagecreatefromgif</b>.
 * </p>
 * @return int|false the number of colors in the specified image's palette, 0 for
 * truecolor images, or <b>FALSE</b> on failure
 */
#[Pure]
function imagecolorstotal(GdImage $image): int {}

/**
 * Get the colors for an index
 * @link https://php.net/manual/en/function.imagecolorsforindex.php
 * @param resource|GdImage $image
 * @param int $color <p>
 * The color index.
 * </p>
 * @return array|false an associative array with red, green, blue and alpha keys that
 * contain the appropriate values for the specified color index or <b>FALSE</b> on failure
 */
#[Pure]
#[LanguageLevelTypeAware(['8.0' => 'array'], default: 'array|false')]
#[ArrayShape(["red" => "int", "green" => "int", "blue" => "int", "alpha" => "int"])]
function imagecolorsforindex(GdImage $image, int $color) {}

/**
 * Copy part of an image
 * @link https://php.net/manual/en/function.imagecopy.php
 * @param resource|GdImage $dst_image <p>
 * Destination image link resource.
 * </p>
 * @param resource|GdImage $src_image <p>
 * Source image link resource.
 * </p>
 * @param int $dst_x <p>
 * x-coordinate of destination point.
 * </p>
 * @param int $dst_y <p>
 * y-coordinate of destination point.
 * </p>
 * @param int $src_x <p>
 * x-coordinate of source point.
 * </p>
 * @param int $src_y <p>
 * y-coordinate of source point.
 * </p>
 * @param int $src_width <p>
 * Source width.
 * </p>
 * @param int $src_height <p>
 * Source height.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagecopy(GdImage $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height): bool {}

/**
 * Copy and merge part of an image
 * @link https://php.net/manual/en/function.imagecopymerge.php
 * @param resource|GdImage $dst_image <p>
 * Destination image link resource.
 * </p>
 * @param resource|GdImage $src_image <p>
 * Source image link resource.
 * </p>
 * @param int $dst_x <p>
 * x-coordinate of destination point.
 * </p>
 * @param int $dst_y <p>
 * y-coordinate of destination point.
 * </p>
 * @param int $src_x <p>
 * x-coordinate of source point.
 * </p>
 * @param int $src_y <p>
 * y-coordinate of source point.
 * </p>
 * @param int $src_width <p>
 * Source width.
 * </p>
 * @param int $src_height <p>
 * Source height.
 * </p>
 * @param int $pct <p>
 * The two images will be merged according to pct
 * which can range from 0 to 100. When pct = 0,
 * no action is taken, when 100 this function behaves identically
 * to imagecopy for pallete images, while it
 * implements alpha transparency for true colour images.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagecopymerge(GdImage $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height, int $pct): bool {}

/**
 * Copy and merge part of an image with gray scale
 * @link https://php.net/manual/en/function.imagecopymergegray.php
 * @param resource|GdImage $dst_image <p>
 * Destination image link resource.
 * </p>
 * @param resource|GdImage $src_image <p>
 * Source image link resource.
 * </p>
 * @param int $dst_x <p>
 * x-coordinate of destination point.
 * </p>
 * @param int $dst_y <p>
 * y-coordinate of destination point.
 * </p>
 * @param int $src_x <p>
 * x-coordinate of source point.
 * </p>
 * @param int $src_y <p>
 * y-coordinate of source point.
 * </p>
 * @param int $src_width <p>
 * Source width.
 * </p>
 * @param int $src_height <p>
 * Source height.
 * </p>
 * @param int $pct <p>
 * The src_im will be changed to grayscale according
 * to pct where 0 is fully grayscale and 100 is
 * unchanged. When pct = 100 this function behaves
 * identically to imagecopy for pallete images, while
 * it implements alpha transparency for true colour images.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagecopymergegray(GdImage $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height, int $pct): bool {}

/**
 * Copy and resize part of an image
 * @link https://php.net/manual/en/function.imagecopyresized.php
 * @param resource|GdImage $dst_image
 * @param resource|GdImage $src_image
 * @param int $dst_x <p>
 * x-coordinate of destination point.
 * </p>
 * @param int $dst_y <p>
 * y-coordinate of destination point.
 * </p>
 * @param int $src_x <p>
 * x-coordinate of source point.
 * </p>
 * @param int $src_y <p>
 * y-coordinate of source point.
 * </p>
 * @param int $dst_width <p>
 * Destination width.
 * </p>
 * @param int $dst_height <p>
 * Destination height.
 * </p>
 * @param int $src_width <p>
 * Source width.
 * </p>
 * @param int $src_height <p>
 * Source height.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagecopyresized(GdImage $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_width, int $dst_height, int $src_width, int $src_height): bool {}

/**
 * Create a new palette based image
 * @link https://php.net/manual/en/function.imagecreate.php
 * @param int $width <p>
 * The image width.
 * </p>
 * @param int $height <p>
 * The image height.
 * </p>
 * @return resource|GdImage|false an image resource identifier on success, false on errors.
 */
#[Pure]
function imagecreate(int $width, int $height): GdImage|false {}

/**
 * Create a new true color image
 * @link https://php.net/manual/en/function.imagecreatetruecolor.php
 * @param int $width <p>
 * Image width.
 * </p>
 * @param int $height <p>
 * Image height.
 * </p>
 * @return resource|GdImage|false an image resource identifier on success, false on errors.
 */
#[Pure]
function imagecreatetruecolor(int $width, int $height): GdImage|false {}

/**
 * Finds whether an image is a truecolor image
 * @link https://php.net/manual/en/function.imageistruecolor.php
 * @param resource|GdImage $image
 * @return bool true if the image is truecolor, false
 * otherwise.
 */
#[Pure]
function imageistruecolor(GdImage $image): bool {}

/**
 * Convert a true color image to a palette image
 * @link https://php.net/manual/en/function.imagetruecolortopalette.php
 * @param resource|GdImage $image
 * @param bool $dither <p>
 * Indicates if the image should be dithered - if it is true then
 * dithering will be used which will result in a more speckled image but
 * with better color approximation.
 * </p>
 * @param int $num_colors <p>
 * Sets the maximum number of colors that should be retained in the palette.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagetruecolortopalette(GdImage $image, bool $dither, int $num_colors): bool {}

/**
 * Set the thickness for line drawing
 * @link https://php.net/manual/en/function.imagesetthickness.php
 * @param resource|GdImage $image
 * @param int $thickness <p>
 * Thickness, in pixels.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagesetthickness(GdImage $image, int $thickness): bool {}

/**
 * Draw a partial arc and fill it
 * @link https://php.net/manual/en/function.imagefilledarc.php
 * @param resource|GdImage $image
 * @param int $center_x <p>
 * x-coordinate of the center.
 * </p>
 * @param int $center_y <p>
 * y-coordinate of the center.
 * </p>
 * @param int $width <p>
 * The arc width.
 * </p>
 * @param int $height <p>
 * The arc height.
 * </p>
 * @param int $start_angle <p>
 * The arc start angle, in degrees.
 * </p>
 * @param int $end_angle <p>
 * The arc end angle, in degrees.
 * 0&deg; is located at the three-o'clock position, and the arc is drawn
 * clockwise.
 * </p>
 * @param int $color <p>
 * A color identifier created with
 * imagecolorallocate.
 * </p>
 * @param int $style <p>
 * A bitwise OR of the following possibilities:
 * IMG_ARC_PIE</p>
 * @return bool true on success or false on failure.
 */
function imagefilledarc(GdImage $image, int $center_x, int $center_y, int $width, int $height, int $start_angle, int $end_angle, int $color, int $style): bool {}

/**
 * Draw a filled ellipse
 * @link https://php.net/manual/en/function.imagefilledellipse.php
 * @param resource|GdImage $image
 * @param int $center_x <p>
 * x-coordinate of the center.
 * </p>
 * @param int $center_y <p>
 * y-coordinate of the center.
 * </p>
 * @param int $width <p>
 * The ellipse width.
 * </p>
 * @param int $height <p>
 * The ellipse height.
 * </p>
 * @param int $color <p>
 * The fill color. A color identifier created with
 * imagecolorallocate.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagefilledellipse(GdImage $image, int $center_x, int $center_y, int $width, int $height, int $color): bool {}

/**
 * Set the blending mode for an image
 * @link https://php.net/manual/en/function.imagealphablending.php
 * @param resource|GdImage $image
 * @param bool $enable <p>
 * Whether to enable the blending mode or not. On true color images
 * the default value is true otherwise the default value is false
 * </p>
 * @return bool true on success or false on failure.
 */
function imagealphablending(GdImage $image, bool $enable): bool {}

/**
 * Set the flag to save full alpha channel information (as opposed to single-color transparency) when saving PNG images
 * @link https://php.net/manual/en/function.imagesavealpha.php
 * @param resource|GdImage $image
 * @param bool $enable <p>
 * Whether to save the alpha channel or not. Default to false.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagesavealpha(GdImage $image, bool $enable): bool {}

/**
 * Allocate a color for an image
 * @link https://php.net/manual/en/function.imagecolorallocatealpha.php
 * @param resource|GdImage $image
 * @param int $red <p>
 * Value of red component.
 * </p>
 * @param int $green <p>
 * Value of green component.
 * </p>
 * @param int $blue <p>
 * Value of blue component.
 * </p>
 * @param int $alpha <p>
 * A value between 0 and 127.
 * 0 indicates completely opaque while
 * 127 indicates completely transparent.
 * </p>
 * @return int|false A color identifier or false if the allocation failed.
 */
function imagecolorallocatealpha(GdImage $image, int $red, int $green, int $blue, int $alpha): int|false {}

/**
 * Get the index of the specified color + alpha or its closest possible alternative
 * @link https://php.net/manual/en/function.imagecolorresolvealpha.php
 * @param resource|GdImage $image
 * @param int $red <p>
 * Value of red component.
 * </p>
 * @param int $green <p>
 * Value of green component.
 * </p>
 * @param int $blue <p>
 * Value of blue component.
 * </p>
 * @param int $alpha <p>
 * A value between 0 and 127.
 * 0 indicates completely opaque while
 * 127 indicates completely transparent.
 * </p>
 * @return int|false a color index or <b>FALSE</b> on failure
 */
#[Pure]
function imagecolorresolvealpha(GdImage $image, int $red, int $green, int $blue, int $alpha): int {}

/**
 * Get the index of the closest color to the specified color + alpha
 * @link https://php.net/manual/en/function.imagecolorclosestalpha.php
 * @param resource|GdImage $image
 * @param int $red <p>
 * Value of red component.
 * </p>
 * @param int $green <p>
 * Value of green component.
 * </p>
 * @param int $blue <p>
 * Value of blue component.
 * </p>
 * @param int $alpha <p>
 * A value between 0 and 127.
 * 0 indicates completely opaque while
 * 127 indicates completely transparent.
 * </p>
 * @return int|false the index of the closest color in the palette or
 * <b>FALSE</b> on failure
 */
#[Pure]
function imagecolorclosestalpha(GdImage $image, int $red, int $green, int $blue, int $alpha): int {}

/**
 * Get the index of the specified color + alpha
 * @link https://php.net/manual/en/function.imagecolorexactalpha.php
 * @param resource|GdImage $image
 * @param int $red <p>
 * Value of red component.
 * </p>
 * @param int $green <p>
 * Value of green component.
 * </p>
 * @param int $blue <p>
 * Value of blue component.
 * </p>
 * @param int $alpha <p>
 * A value between 0 and 127.
 * 0 indicates completely opaque while
 * 127 indicates completely transparent.
 * </p>
 * @return int|false the index of the specified color+alpha in the palette of the
 * image, -1 if the color does not exist in the image's palette, or <b>FALSE</b>
 * on failure
 */
#[Pure]
#[LanguageLevelTypeAware(['8.0' => 'int'], default: 'int|false')]
function imagecolorexactalpha(GdImage $image, int $red, int $green, int $blue, int $alpha) {}

/**
 * Copy and resize part of an image with resampling
 * @link https://php.net/manual/en/function.imagecopyresampled.php
 * @param resource|GdImage $dst_image
 * @param resource|GdImage $src_image
 * @param int $dst_x <p>
 * x-coordinate of destination point.
 * </p>
 * @param int $dst_y <p>
 * y-coordinate of destination point.
 * </p>
 * @param int $src_x <p>
 * x-coordinate of source point.
 * </p>
 * @param int $src_y <p>
 * y-coordinate of source point.
 * </p>
 * @param int $dst_width <p>
 * Destination width.
 * </p>
 * @param int $dst_height <p>
 * Destination height.
 * </p>
 * @param int $src_width <p>
 * Source width.
 * </p>
 * @param int $src_height <p>
 * Source height.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagecopyresampled(GdImage $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_width, int $dst_height, int $src_width, int $src_height): bool {}

/**
 * Rotate an image with a given angle
 * @link https://php.net/manual/en/function.imagerotate.php
 * @param resource|GdImage $image
 * @param float $angle <p>
 * Rotation angle, in degrees.
 * </p>
 * @param int $background_color <p>
 * Specifies the color of the uncovered zone after the rotation
 * </p>
 * @param bool $ignore_transparent [optional] <p>
 * If set and non-zero, transparent colors are ignored (otherwise kept).
 * </p>
 * @return resource|GdImage|false the rotated image or <b>FALSE</b> on failure
 */
function imagerotate(GdImage $image, float $angle, int $background_color, bool $ignore_transparent = false): GdImage|false {}

/**
 * Should antialias functions be used or not. <br/>
 * Before 7.2.0 it's only available if PHP iscompiled with the bundled version of the GD library.
 * @link https://php.net/manual/en/function.imageantialias.php
 * @param resource|GdImage $image
 * @param bool $enable <p>
 * Whether to enable antialiasing or not.
 * </p>
 * @return bool true on success or false on failure.
 */
function imageantialias(GdImage $image, bool $enable): bool {}

/**
 * Set the tile image for filling
 * @link https://php.net/manual/en/function.imagesettile.php
 * @param resource|GdImage $image
 * @param resource|GdImage $tile <p>
 * The image resource to be used as a tile.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagesettile(GdImage $image, GdImage $tile): bool {}

/**
 * Set the brush image for line drawing
 * @link https://php.net/manual/en/function.imagesetbrush.php
 * @param resource|GdImage $image
 * @param resource|GdImage $brush <p>
 * An image resource.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagesetbrush(GdImage $image, GdImage $brush): bool {}

/**
 * Set the style for line drawing
 * @link https://php.net/manual/en/function.imagesetstyle.php
 * @param resource|GdImage $image
 * @param int[] $style <p>
 * An array of pixel colors. You can use the
 * IMG_COLOR_TRANSPARENT constant to add a
 * transparent pixel.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagesetstyle(GdImage $image, array $style): bool {}

/**
 * Create a new image from file or URL
 * @link https://php.net/manual/en/function.imagecreatefrompng.php
 * @param string $filename <p>
 * Path to the PNG image.
 * </p>
 * @return resource|GdImage|false an image resource identifier on success, false on errors.
 */
function imagecreatefrompng(string $filename): GdImage|false {}

/**
 * Create a new image from file or URL
 * @link https://www.php.net/manual/function.imagecreatefromavif.php
 * @param string $filename Path to the AVIF raster image.
 * @return GdImage|false returns an image object representing the image obtained from the given filename
 * @since 8.1
 */
function imagecreatefromavif(string $filename): GdImage|false {}

/**
 * Create a new image from file or URL
 * @link https://php.net/manual/en/function.imagecreatefromgif.php
 * @param string $filename <p>
 * Path to the GIF image.
 * </p>
 * @return resource|GdImage|false an image resource identifier on success, false on errors.
 */
function imagecreatefromgif(string $filename): GdImage|false {}

/**
 * Create a new image from file or URL
 * @link https://php.net/manual/en/function.imagecreatefromjpeg.php
 * @param string $filename <p>
 * Path to the JPEG image.
 * </p>
 * @return resource|GdImage|false an image resource identifier on success, false on errors.
 */
function imagecreatefromjpeg(string $filename): GdImage|false {}

/**
 * Create a new image from file or URL
 * @link https://php.net/manual/en/function.imagecreatefromwbmp.php
 * @param string $filename <p>
 * Path to the WBMP image.
 * </p>
 * @return resource|GdImage|false an image resource identifier on success, false on errors.
 */
function imagecreatefromwbmp(string $filename): GdImage|false {}

/**
 * Create a new image from file or URL
 * @link https://php.net/manual/en/function.imagecreatefromwebp.php
 * @param string $filename <p>
 * Path to the WebP image.
 * </p>
 * @return resource|GdImage|false an image resource identifier on success, false on errors.
 * @since 5.4
 */
function imagecreatefromwebp(string $filename): GdImage|false {}

/**
 * Create a new image from file or URL
 * @link https://php.net/manual/en/function.imagecreatefromxbm.php
 * @param string $filename <p>
 * Path to the XBM image.
 * </p>
 * @return resource|GdImage|false an image resource identifier on success, false on errors.
 */
function imagecreatefromxbm(string $filename): GdImage|false {}

/**
 * Create a new image from file or URL
 * @link https://php.net/manual/en/function.imagecreatefromxpm.php
 * @param string $filename <p>
 * Path to the XPM image.
 * </p>
 * @return resource|GdImage|false an image resource identifier on success, false on errors.
 */
function imagecreatefromxpm(string $filename): GdImage|false {}

/**
 * Create a new image from GD file or URL
 * @link https://php.net/manual/en/function.imagecreatefromgd.php
 * @param string $filename <p>
 * Path to the GD file.
 * </p>
 * @return resource|GdImage|false an image resource identifier on success, false on errors.
 */
function imagecreatefromgd(string $filename): GdImage|false {}

/**
 * Create a new image from GD2 file or URL
 * @link https://php.net/manual/en/function.imagecreatefromgd2.php
 * @param string $filename <p>
 * Path to the GD2 image.
 * </p>
 * @return resource|GdImage|false an image resource identifier on success, false on errors.
 */
function imagecreatefromgd2(string $filename): GdImage|false {}

/**
 * Create a new image from a given part of GD2 file or URL
 * @link https://php.net/manual/en/function.imagecreatefromgd2part.php
 * @param string $filename <p>
 * Path to the GD2 image.
 * </p>
 * @param int $x <p>
 * x-coordinate of source point.
 * </p>
 * @param int $y <p>
 * y-coordinate of source point.
 * </p>
 * @param int $width <p>
 * Source width.
 * </p>
 * @param int $height <p>
 * Source height.
 * </p>
 * @return resource|GdImage|false an image resource identifier on success, false on errors.
 */
function imagecreatefromgd2part(string $filename, int $x, int $y, int $width, int $height): GdImage|false {}

/**
 * Output a PNG image to either the browser or a file
 * @link https://php.net/manual/en/function.imagepng.php
 * @param resource|GdImage $image
 * @param string $file [optional] <p>
 * The path to save the file to. If not set or null, the raw image stream
 * will be outputted directly.
 * </p>
 * <p>
 * null is invalid if the quality and
 * filters arguments are not used.
 * </p>
 * @param int $quality [optional] <p>
 * Compression level: from 0 (no compression) to 9.
 * </p>
 * @param int $filters [optional] <p>
 * Allows reducing the PNG file size. It is a bitmask field which may be
 * set to any combination of the PNG_FILTER_XXX
 * constants. PNG_NO_FILTER or
 * PNG_ALL_FILTERS may also be used to respectively
 * disable or activate all filters.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagepng(GdImage $image, $file = null, int $quality = -1, int $filters = -1): bool {}

/**
 * Output a WebP image to browser or file
 * @link https://php.net/manual/en/function.imagewebp.php
 * @param resource|GdImage $image
 * @param string $to [optional] <p>
 * The path to save the file to. If not set or null, the raw image stream
 * will be outputted directly.
 * </p>
 * @param int $quality [optional] <p>
 * quality ranges from 0 (worst quality, smaller file) to 100 (best quality, biggest file).
 * </p>
 * @return bool true on success or false on failure.
 * @since 5.4
 */
function imagewebp($image, $to = null, $quality = 80): bool {}

/**
 * Output image to browser or file
 * @link https://php.net/manual/en/function.imagegif.php
 * @param resource|GdImage $image
 * @param string $file [optional] <p>
 * The path to save the file to. If not set or null, the raw image stream
 * will be outputted directly.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagegif(GdImage $image, $file = null): bool {}

/**
 * Output image to browser or file
 * @link https://php.net/manual/en/function.imagejpeg.php
 * @param resource|GdImage $image
 * @param string $file [optional] <p>
 * The path to save the file to. If not set or null, the raw image stream
 * will be outputted directly.
 * </p>
 * <p>
 * To skip this argument in order to provide the
 * quality parameter, use null.
 * </p>
 * @param int $quality [optional] <p>
 * quality is optional, and ranges from 0 (worst
 * quality, smaller file) to 100 (best quality, biggest file). The
 * default is the default IJG quality value (about 75).
 * </p>
 * @return bool true on success or false on failure.
 */
function imagejpeg($image, $file = null, $quality = null): bool {}

/**
 * Output image to browser or file
 * @link https://php.net/manual/en/function.imagewbmp.php
 * @param resource|GdImage $image
 * @param string $file [optional] <p>
 * The path to save the file to. If not set or null, the raw image stream
 * will be outputted directly.
 * </p>
 * @param int $foreground_color [optional] <p>
 * You can set the foreground color with this parameter by setting an
 * identifier obtained from imagecolorallocate.
 * The default foreground color is black.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagewbmp(GdImage $image, $file = null, ?int $foreground_color = null): bool {}

/**
 * Output GD image to browser or file. <br/>
 * Since 7.2.0 allows to output truecolor images.
 * @link https://php.net/manual/en/function.imagegd.php
 * @param resource|GdImage $image
 * @param string|null $file [optional] <p>
 * The path to save the file to. If not set or null, the raw image stream
 * will be outputted directly.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagegd(GdImage $image, ?string $file = null): bool {}

/**
 * Output GD2 image to browser or file
 * @link https://php.net/manual/en/function.imagegd2.php
 * @param resource|GdImage $image
 * @param string|null $file [optional] <p>
 * The path to save the file to. If not set or null, the raw image stream
 * will be outputted directly.
 * </p>
 * @param int $chunk_size [optional] <p>
 * Chunk size.
 * </p>
 * @param int $mode [optional] <p>
 * Either IMG_GD2_RAW or
 * IMG_GD2_COMPRESSED. Default is
 * IMG_GD2_RAW.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagegd2(GdImage $image, ?string $file = null, int $chunk_size = null, int $mode = null): bool {}

/**
 * Destroy an image
 * @link https://php.net/manual/en/function.imagedestroy.php
 * @param resource|GdImage $image
 * @return bool true on success or false on failure.
 */
function imagedestroy(GdImage $image): bool {}

/**
 * Apply a gamma correction to a GD image
 * @link https://php.net/manual/en/function.imagegammacorrect.php
 * @param resource|GdImage $image
 * @param float $input_gamma <p>
 * The input gamma.
 * </p>
 * @param float $output_gamma <p>
 * The output gamma.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagegammacorrect(GdImage $image, float $input_gamma, float $output_gamma): bool {}

/**
 * Flood fill
 * @link https://php.net/manual/en/function.imagefill.php
 * @param resource|GdImage $image
 * @param int $x <p>
 * x-coordinate of start point.
 * </p>
 * @param int $y <p>
 * y-coordinate of start point.
 * </p>
 * @param int $color <p>
 * The fill color. A color identifier created with
 * imagecolorallocate.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagefill(GdImage $image, int $x, int $y, int $color): bool {}

/**
 * Draw a filled polygon
 * @link https://php.net/manual/en/function.imagefilledpolygon.php
 * @param resource|GdImage $image
 * @param int[] $points <p>
 * An array containing the x and y
 * coordinates of the polygons vertices consecutively.
 * </p>
 * @param int $num_points_or_color <p>
 * Total number of vertices, which must be at least 3.
 * </p>
 * @param int|null $color <p>
 * A color identifier created with
 * imagecolorallocate.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagefilledpolygon(
    GdImage $image,
    array $points,
    #[Deprecated(since: "8.1")] int $num_points_or_color,
    ?int $color
): bool {}

/**
 * Draw a filled polygon
 * @link https://php.net/manual/en/function.imagefilledpolygon.php
 * @param GdImage $image
 * @param int[] $points <p>
 * An array containing the x and y
 * coordinates of the polygons vertices consecutively.
 * </p>
 * @param int|null $color <p>
 * A color identifier created with
 * imagecolorallocate.
 * </p>
 * @return bool true on success or false on failure.
 */
#[PhpStormStubsElementAvailable(from: '8.0')]
function imagefilledpolygon(
    GdImage $image,
    array $points,
    ?int $color
): bool {}

/**
 * Draw a filled rectangle
 * @link https://php.net/manual/en/function.imagefilledrectangle.php
 * @param resource|GdImage $image
 * @param int $x1 <p>
 * x-coordinate for point 1.
 * </p>
 * @param int $y1 <p>
 * y-coordinate for point 1.
 * </p>
 * @param int $x2 <p>
 * x-coordinate for point 2.
 * </p>
 * @param int $y2 <p>
 * y-coordinate for point 2.
 * </p>
 * @param int $color <p>
 * The fill color. A color identifier created with
 * imagecolorallocate.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagefilledrectangle(GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color): bool {}

/**
 * Flood fill to specific color
 * @link https://php.net/manual/en/function.imagefilltoborder.php
 * @param resource|GdImage $image
 * @param int $x <p>
 * x-coordinate of start.
 * </p>
 * @param int $y <p>
 * y-coordinate of start.
 * </p>
 * @param int $border_color <p>
 * The border color. A color identifier created with
 * imagecolorallocate.
 * </p>
 * @param int $color <p>
 * The fill color. A color identifier created with
 * imagecolorallocate.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagefilltoborder(GdImage $image, int $x, int $y, int $border_color, int $color): bool {}

/**
 * Get font width
 * @link https://php.net/manual/en/function.imagefontwidth.php
 * @param int $font
 * @return int the width of the pixel
 */
#[Pure]
function imagefontwidth(#[LanguageLevelTypeAware(['8.1' => 'GdFont|int'], default: 'int')] $font): int {}

/**
 * Get font height
 * @link https://php.net/manual/en/function.imagefontheight.php
 * @param int $font
 * @return int the height of the pixel.
 */
#[Pure]
function imagefontheight(#[LanguageLevelTypeAware(['8.1' => 'GdFont|int'], default: 'int')] $font): int {}

/**
 * Enable or disable interlace
 * @link https://php.net/manual/en/function.imageinterlace.php
 * @param resource|GdImage $image
 * @param bool|null $enable [optional] <p>
 * If non-zero, the image will be interlaced, else the interlace bit is
 * turned off.
 * </p>
 * @return bool 1 if the interlace bit is set for the image,
 * 0 if it is not
 */
function imageinterlace(GdImage $image, ?bool $enable = null): bool {}

/**
 * Draw a line
 * @link https://php.net/manual/en/function.imageline.php
 * @param resource|GdImage $image
 * @param int $x1 <p>
 * x-coordinate for first point.
 * </p>
 * @param int $y1 <p>
 * y-coordinate for first point.
 * </p>
 * @param int $x2 <p>
 * x-coordinate for second point.
 * </p>
 * @param int $y2 <p>
 * y-coordinate for second point.
 * </p>
 * @param int $color <p>
 * The line color. A color identifier created with
 * imagecolorallocate.
 * </p>
 * @return bool true on success or false on failure.
 */
function imageline(GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color): bool {}

/**
 * Load a new font
 * @link https://php.net/manual/en/function.imageloadfont.php
 * @param string $filename <p>
 * The font file format is currently binary and architecture
 * dependent. This means you should generate the font files on the
 * same type of CPU as the machine you are running PHP on.
 * </p>
 * <p>
 * <table>
 * Font file format
 * <tr valign="top">
 * <td>byte position</td>
 * <td>C data type</td>
 * <td>description</td>
 * </tr>
 * <tr valign="top">
 * <td>byte 0-3</td>
 * <td>int</td>
 * <td>number of characters in the font</td>
 * </tr>
 * <tr valign="top">
 * <td>byte 4-7</td>
 * <td>int</td>
 * <td>
 * value of first character in the font (often 32 for space)
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>byte 8-11</td>
 * <td>int</td>
 * <td>pixel width of each character</td>
 * </tr>
 * <tr valign="top">
 * <td>byte 12-15</td>
 * <td>int</td>
 * <td>pixel height of each character</td>
 * </tr>
 * <tr valign="top">
 * <td>byte 16-</td>
 * <td>char</td>
 * <td>
 * array with character data, one byte per pixel in each
 * character, for a total of (nchars*width*height) bytes.
 * </td>
 * </tr>
 * </table>
 * </p>
 * @return int|false The font identifier which is always bigger than 5 to avoid conflicts with
 * built-in fonts or false on errors.
 */
#[LanguageLevelTypeAware(['8.1' => 'GdFont|false'], default: 'int|false')]
function imageloadfont(string $filename) {}

/**
 * Draws a polygon
 * @link https://php.net/manual/en/function.imagepolygon.php
 * @param resource|GdImage $image
 * @param int[] $points <p>
 * An array containing the polygon's vertices, e.g.:
 * <tr valign="top">
 * <td>points[0]</td>
 * <td>= x0</td>
 * </tr>
 * <tr valign="top">
 * <td>points[1]</td>
 * <td>= y0</td>
 * </tr>
 * <tr valign="top">
 * <td>points[2]</td>
 * <td>= x1</td>
 * </tr>
 * <tr valign="top">
 * <td>points[3]</td>
 * <td>= y1</td>
 * </tr>
 * </p>
 * @param int $num_points_or_color <p>
 * Total number of points (vertices).
 * </p>
 * @param int|null $color <p>
 * A color identifier created with
 * imagecolorallocate.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagepolygon(
    GdImage $image,
    array $points,
    int $num_points_or_color,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] ?int $color,
    #[PhpStormStubsElementAvailable(from: '8.0')] ?int $color = null
): bool {}

/**
 * Draw a rectangle
 * @link https://php.net/manual/en/function.imagerectangle.php
 * @param resource|GdImage $image
 * @param int $x1 <p>
 * Upper left x coordinate.
 * </p>
 * @param int $y1 <p>
 * Upper left y coordinate
 * 0, 0 is the top left corner of the image.
 * </p>
 * @param int $x2 <p>
 * Bottom right x coordinate.
 * </p>
 * @param int $y2 <p>
 * Bottom right y coordinate.
 * </p>
 * @param int $color <p>
 * A color identifier created with
 * imagecolorallocate.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagerectangle(GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color): bool {}

/**
 * Set a single pixel
 * @link https://php.net/manual/en/function.imagesetpixel.php
 * @param resource|GdImage $image
 * @param int $x <p>
 * x-coordinate.
 * </p>
 * @param int $y <p>
 * y-coordinate.
 * </p>
 * @param int $color <p>
 * A color identifier created with
 * imagecolorallocate.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagesetpixel(GdImage $image, int $x, int $y, int $color): bool {}

/**
 * Draw a string horizontally
 * @link https://php.net/manual/en/function.imagestring.php
 * @param resource|GdImage $image
 * @param int $font
 * @param int $x <p>
 * x-coordinate of the upper left corner.
 * </p>
 * @param int $y <p>
 * y-coordinate of the upper left corner.
 * </p>
 * @param string $string <p>
 * The string to be written.
 * </p>
 * @param int $color <p>
 * A color identifier created with
 * imagecolorallocate.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagestring(
    GdImage $image,
    #[LanguageLevelTypeAware(['8.1' => 'GdFont|int'], default: 'int')] $font,
    int $x,
    int $y,
    string $string,
    int $color
): bool {}

/**
 * Draw a string vertically
 * @link https://php.net/manual/en/function.imagestringup.php
 * @param resource|GdImage $image
 * @param int $font
 * @param int $x <p>
 * x-coordinate of the upper left corner.
 * </p>
 * @param int $y <p>
 * y-coordinate of the upper left corner.
 * </p>
 * @param string $string <p>
 * The string to be written.
 * </p>
 * @param int $color <p>
 * A color identifier created with
 * imagecolorallocate.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagestringup(
    GdImage $image,
    #[LanguageLevelTypeAware(['8.1' => 'GdFont|int'], default: 'int')] $font,
    int $x,
    int $y,
    string $string,
    int $color
): bool {}

/**
 * Get image width
 * @link https://php.net/manual/en/function.imagesx.php
 * @param resource|GdImage $image
 * @return int|false Return the width of the image or false on
 * errors.
 */
#[Pure]
function imagesx(GdImage $image): int {}

/**
 * Get image height
 * @link https://php.net/manual/en/function.imagesy.php
 * @param resource|GdImage $image
 * @return int|false Return the height of the image or false on
 * errors.
 */
#[Pure]
function imagesy(GdImage $image): int {}

/**
 * Draw a dashed line
 * @link https://php.net/manual/en/function.imagedashedline.php
 * @param resource|GdImage $image
 * @param int $x1 <p>
 * Upper left x coordinate.
 * </p>
 * @param int $y1 <p>
 * Upper left y coordinate 0, 0 is the top left corner of the image.
 * </p>
 * @param int $x2 <p>
 * Bottom right x coordinate.
 * </p>
 * @param int $y2 <p>
 * Bottom right y coordinate.
 * </p>
 * @param int $color <p>
 * The fill color. A color identifier created with
 * imagecolorallocate.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * @see imagesetstyle()
 * @see imageline()
 */
#[Deprecated("Use combination of imagesetstyle() and imageline() instead")]
function imagedashedline(GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color): bool {}

/**
 * Give the bounding box of a text using TrueType fonts
 * @link https://php.net/manual/en/function.imagettfbbox.php
 * @param float $size <p>
 * The font size. Depending on your version of GD, this should be
 * specified as the pixel size (GD1) or point size (GD2).
 * </p>
 * @param float $angle <p>
 * Angle in degrees in which text will be measured.
 * </p>
 * @param string $font_filename <p>
 * The name of the TrueType font file (can be a URL). Depending on
 * which version of the GD library that PHP is using, it may attempt to
 * search for files that do not begin with a leading '/' by appending
 * '.ttf' to the filename and searching along a library-defined font path.
 * </p>
 * @param string $text <p>
 * The string to be measured.
 * </p>
 * @return array|false imagettfbbox returns an array with 8
 * elements representing four points making the bounding box of the
 * text on success and false on error.
 * <tr valign="top">
 * <td>key</td>
 * <td>contents</td>
 * </tr>
 * <tr valign="top">
 * <td>0</td>
 * <td>lower left corner, X position</td>
 * </tr>
 * <tr valign="top">
 * <td>1</td>
 * <td>lower left corner, Y position</td>
 * </tr>
 * <tr valign="top">
 * <td>2</td>
 * <td>lower right corner, X position</td>
 * </tr>
 * <tr valign="top">
 * <td>3</td>
 * <td>lower right corner, Y position</td>
 * </tr>
 * <tr valign="top">
 * <td>4</td>
 * <td>upper right corner, X position</td>
 * </tr>
 * <tr valign="top">
 * <td>5</td>
 * <td>upper right corner, Y position</td>
 * </tr>
 * <tr valign="top">
 * <td>6</td>
 * <td>upper left corner, X position</td>
 * </tr>
 * <tr valign="top">
 * <td>7</td>
 * <td>upper left corner, Y position</td>
 * </tr>
 * </p>
 * <p>
 * The points are relative to the text regardless of the
 * angle, so "upper left" means in the top left-hand
 * corner seeing the text horizontally.
 */
#[Pure]
function imagettfbbox($size, $angle, $font_filename, $text) {}

/**
 * Write text to the image using TrueType fonts
 * @link https://php.net/manual/en/function.imagettftext.php
 * @param resource|GdImage $image
 * @param float $size <p>
 * The font size. Depending on your version of GD, this should be
 * specified as the pixel size (GD1) or point size (GD2).
 * </p>
 * @param float $angle <p>
 * The angle in degrees, with 0 degrees being left-to-right reading text.
 * Higher values represent a counter-clockwise rotation. For example, a
 * value of 90 would result in bottom-to-top reading text.
 * </p>
 * @param int $x <p>
 * The coordinates given by x and
 * y will define the basepoint of the first
 * character (roughly the lower-left corner of the character). This
 * is different from the imagestring, where
 * x and y define the
 * upper-left corner of the first character. For example, "top left"
 * is 0, 0.
 * </p>
 * @param int $y <p>
 * The y-ordinate. This sets the position of the fonts baseline, not the
 * very bottom of the character.
 * </p>
 * @param int $color <p>
 * The color index. Using the negative of a color index has the effect of
 * turning off antialiasing. See imagecolorallocate.
 * </p>
 * @param string $font_filename <p>
 * The path to the TrueType font you wish to use.
 * </p>
 * <p>
 * Depending on which version of the GD library PHP is using, when
 * font_filename does not begin with a leading
 * / then .ttf will be appended
 * to the filename and the library will attempt to search for that
 * filename along a library-defined font path.
 * </p>
 * <p>
 * When using versions of the GD library lower than 2.0.18, a space character,
 * rather than a semicolon, was used as the 'path separator' for different font files.
 * Unintentional use of this feature will result in the warning message:
 * Warning: Could not find/open font. For these affected versions, the
 * only solution is moving the font to a path which does not contain spaces.
 * </p>
 * <p>
 * In many cases where a font resides in the same directory as the script using it
 * the following trick will alleviate any include problems.
 * </p>
 * <pre>
 * <?php
 * // Set the enviroment variable for GD
 * putenv('GDFONTPATH=' . realpath('.'));
 *
 * // Name the font to be used (note the lack of the .ttf extension)
 * $font = 'SomeFont';
 * ?>
 * </pre>
 * <p>
 * <strong>Note:</strong>
 * <code>open_basedir</code> does <em>not</em> apply to font_filename.
 * </p>
 * @param string $text <p>
 * The text string in UTF-8 encoding.
 * </p>
 * <p>
 * May include decimal numeric character references (of the form:
 * &amp;#8364;) to access characters in a font beyond position 127.
 * The hexadecimal format (like &amp;#xA9;) is supported.
 * Strings in UTF-8 encoding can be passed directly.
 * </p>
 * <p>
 * Named entities, such as &amp;copy;, are not supported. Consider using
 * html_entity_decode
 * to decode these named entities into UTF-8 strings (html_entity_decode()
 * supports this as of PHP 5.0.0).
 * </p>
 * <p>
 * If a character is used in the string which is not supported by the
 * font, a hollow rectangle will replace the character.
 * </p>
 * @return array|false an array with 8 elements representing four points making the
 * bounding box of the text. The order of the points is lower left, lower
 * right, upper right, upper left. The points are relative to the text
 * regardless of the angle, so "upper left" means in the top left-hand
 * corner when you see the text horizontally.
 * Returns false on error.
 */
function imagettftext(GdImage $image, float $size, float $angle, int $x, int $y, int $color, string $font_filename, string $text, array $options = []): array|false {}

/**
 * Give the bounding box of a text using fonts via freetype2
 * @link https://php.net/manual/en/function.imageftbbox.php
 * @param float $size <p>
 * The font size. Depending on your version of GD, this should be
 * specified as the pixel size (GD1) or point size (GD2).
 * </p>
 * @param float $angle <p>
 * Angle in degrees in which text will be
 * measured.
 * </p>
 * @param string $font_filename <p>
 * The name of the TrueType font file (can be a URL). Depending on
 * which version of the GD library that PHP is using, it may attempt to
 * search for files that do not begin with a leading '/' by appending
 * '.ttf' to the filename and searching along a library-defined font path.
 * </p>
 * @param string $text <p>
 * The string to be measured.
 * </p>
 * @param array $extrainfo [optional] <p>
 * <table>
 * Possible array indexes for extrainfo
 * <tr valign="top">
 * <td>Key</td>
 * <td>Type</td>
 * <td>Meaning</td>
 * </tr>
 * <tr valign="top">
 * <td>linespacing</td>
 * <td>float</td>
 * <td>Defines drawing linespacing</td>
 * </tr>
 * </table>
 * </p>
 * @return array|false imageftbbox returns an array with 8
 * elements representing four points making the bounding box of the
 * text:
 * <tr valign="top">
 * <td>0</td>
 * <td>lower left corner, X position</td>
 * </tr>
 * <tr valign="top">
 * <td>1</td>
 * <td>lower left corner, Y position</td>
 * </tr>
 * <tr valign="top">
 * <td>2</td>
 * <td>lower right corner, X position</td>
 * </tr>
 * <tr valign="top">
 * <td>3</td>
 * <td>lower right corner, Y position</td>
 * </tr>
 * <tr valign="top">
 * <td>4</td>
 * <td>upper right corner, X position</td>
 * </tr>
 * <tr valign="top">
 * <td>5</td>
 * <td>upper right corner, Y position</td>
 * </tr>
 * <tr valign="top">
 * <td>6</td>
 * <td>upper left corner, X position</td>
 * </tr>
 * <tr valign="top">
 * <td>7</td>
 * <td>upper left corner, Y position</td>
 * </tr>
 * </p>
 * <p>
 * The points are relative to the text regardless of the
 * angle, so "upper left" means in the top left-hand
 * corner seeing the text horizontally.
 * Returns false on error.
 */
#[Pure]
function imageftbbox($size, $angle, $font_filename, $text, $extrainfo = null) {}

/**
 * Write text to the image using fonts using FreeType 2
 * @link https://php.net/manual/en/function.imagefttext.php
 * @param resource|GdImage $image
 * @param float $size <p>
 * The font size to use in points.
 * </p>
 * @param float $angle <p>
 * The angle in degrees, with 0 degrees being left-to-right reading text.
 * Higher values represent a counter-clockwise rotation. For example, a
 * value of 90 would result in bottom-to-top reading text.
 * </p>
 * @param int $x <p>
 * The coordinates given by x and
 * y will define the basepoint of the first
 * character (roughly the lower-left corner of the character). This
 * is different from the imagestring, where
 * x and y define the
 * upper-left corner of the first character. For example, "top left"
 * is 0, 0.
 * </p>
 * @param int $y <p>
 * The y-ordinate. This sets the position of the fonts baseline, not the
 * very bottom of the character.
 * </p>
 * @param int $color <p>
 * The index of the desired color for the text, see
 * imagecolorexact.
 * </p>
 * @param string $font_filename <p>
 * The path to the TrueType font you wish to use.
 * </p>
 * <p>
 * Depending on which version of the GD library PHP is using, when
 * font_filename does not begin with a leading
 * / then .ttf will be appended
 * to the filename and the library will attempt to search for that
 * filename along a library-defined font path.
 * </p>
 * <p>
 * When using versions of the GD library lower than 2.0.18, a space character,
 * rather than a semicolon, was used as the 'path separator' for different font files.
 * Unintentional use of this feature will result in the warning message:
 * Warning: Could not find/open font. For these affected versions, the
 * only solution is moving the font to a path which does not contain spaces.
 * </p>
 * <p>
 * In many cases where a font resides in the same directory as the script using it
 * the following trick will alleviate any include problems.
 * </p>
 * <pre>
 * <?php
 * // Set the enviroment variable for GD
 * putenv('GDFONTPATH=' . realpath('.'));
 *
 * // Name the font to be used (note the lack of the .ttf extension)
 * $font = 'SomeFont';
 * ?>
 * </pre>
 * <p>
 * <strong>Note:</strong>
 * <code>open_basedir</code> does <em>not</em> apply to font_filename.
 * </p>
 * @param string $text <p>
 * Text to be inserted into image.
 * </p>
 * @param array $extrainfo [optional] <p>
 * <table>
 * Possible array indexes for extrainfo
 * <tr valign="top">
 * <td>Key</td>
 * <td>Type</td>
 * <td>Meaning</td>
 * </tr>
 * <tr valign="top">
 * <td>linespacing</td>
 * <td>float</td>
 * <td>Defines drawing linespacing</td>
 * </tr>
 * </table>
 * </p>
 * @return array|false This function returns an array defining the four points of the box, starting in the lower left and moving counter-clockwise:
 * <tr valign="top">
 * <td>0</td>
 * <td>lower left x-coordinate</td>
 * </tr>
 * <tr valign="top">
 * <td>1</td>
 * <td>lower left y-coordinate</td>
 * </tr>
 * <tr valign="top">
 * <td>2</td>
 * <td>lower right x-coordinate</td>
 * </tr>
 * <tr valign="top">
 * <td>3</td>
 * <td>lower right y-coordinate</td>
 * </tr>
 * <tr valign="top">
 * <td>4</td>
 * <td>upper right x-coordinate</td>
 * </tr>
 * <tr valign="top">
 * <td>5</td>
 * <td>upper right y-coordinate</td>
 * </tr>
 * <tr valign="top">
 * <td>6</td>
 * <td>upper left x-coordinate</td>
 * </tr>
 * <tr valign="top">
 * <td>7</td>
 * <td>upper left y-coordinate</td>
 * </tr>
 * Returns false on error.
 */
function imagefttext($image, $size, $angle, $x, $y, $color, $font_filename, $text, $extrainfo = null) {}

/**
 * Load a PostScript Type 1 font from file
 * @link https://php.net/manual/en/function.imagepsloadfont.php
 * @param string $filename <p>
 * Path to the Postscript font file.
 * </p>
 * @return resource|GdImage|false In the case everything went right, a valid font index will be returned and
 * can be used for further purposes. Otherwise the function returns false.
 * @removed 7.0 This function was REMOVED in PHP 7.0.0.
 */
function imagepsloadfont($filename) {}

/**
 * Free memory used by a PostScript Type 1 font
 * @link https://php.net/manual/en/function.imagepsfreefont.php
 * @param resource|GdImage $font_index <p>
 * A font resource, returned by imagepsloadfont.
 * </p>
 * @return bool true on success or false on failure.
 * @removed 7.0
 */
function imagepsfreefont($font_index) {}

/**
 * Change the character encoding vector of a font
 * @link https://php.net/manual/en/function.imagepsencodefont.php
 * @param resource|GdImage $font_index <p>
 * A font resource, returned by imagepsloadfont.
 * </p>
 * @param string $encodingfile <p>
 * The exact format of this file is described in T1libs documentation.
 * T1lib comes with two ready-to-use files,
 * IsoLatin1.enc and
 * IsoLatin2.enc.
 * </p>
 * @return bool true on success or false on failure.
 * @removed 7.0
 */
function imagepsencodefont($font_index, $encodingfile) {}

/**
 * Extend or condense a font
 * @link https://php.net/manual/en/function.imagepsextendfont.php
 * @param resource|GdImage $font_index <p>
 * A font resource, returned by imagepsloadfont.
 * </p>
 * @param float $extend <p>
 * Extension value, must be greater than 0.
 * </p>
 * @return bool true on success or false on failure.
 * @removed 7.0
 */
function imagepsextendfont($font_index, $extend) {}

/**
 * Slant a font
 * @link https://php.net/manual/en/function.imagepsslantfont.php
 * @param resource|GdImage $font_index <p>
 * A font resource, returned by imagepsloadfont.
 * </p>
 * @param float $slant <p>
 * Slant level.
 * </p>
 * @return bool true on success or false on failure.
 * @removed 7.0 This function was REMOVED in PHP 7.0.0.
 */
function imagepsslantfont($font_index, $slant) {}

/**
 * Draws a text over an image using PostScript Type1 fonts
 * @link https://php.net/manual/en/function.imagepstext.php
 * @param resource|GdImage $image
 * @param string $text <p>
 * The text to be written.
 * </p>
 * @param resource|GdImage $font_index <p>
 * A font resource, returned by imagepsloadfont.
 * </p>
 * @param int $size <p>
 * size is expressed in pixels.
 * </p>
 * @param int $foreground <p>
 * The color in which the text will be painted.
 * </p>
 * @param int $background <p>
 * The color to which the text will try to fade in with antialiasing.
 * No pixels with the color background are
 * actually painted, so the background image does not need to be of solid
 * color.
 * </p>
 * @param int $x <p>
 * x-coordinate for the lower-left corner of the first character.
 * </p>
 * @param int $y <p>
 * y-coordinate for the lower-left corner of the first character.
 * </p>
 * @param int $space [optional] <p>
 * Allows you to change the default value of a space in a font. This
 * amount is added to the normal value and can also be negative.
 * Expressed in character space units, where 1 unit is 1/1000th of an
 * em-square.
 * </p>
 * @param int $tightness [optional] <p>
 * tightness allows you to control the amount
 * of white space between characters. This amount is added to the
 * normal character width and can also be negative.
 * Expressed in character space units, where 1 unit is 1/1000th of an
 * em-square.
 * </p>
 * @param float $angle [optional] <p>
 * angle is in degrees.
 * </p>
 * @param int $antialias_steps [optional] <p>
 * Allows you to control the number of colours used for antialiasing
 * text. Allowed values are 4 and 16. The higher value is recommended
 * for text sizes lower than 20, where the effect in text quality is
 * quite visible. With bigger sizes, use 4. It's less computationally
 * intensive.
 * </p>
 * @return array|false This function returns an array containing the following elements:
 * <tr valign="top">
 * <td>0</td>
 * <td>lower left x-coordinate</td>
 * </tr>
 * <tr valign="top">
 * <td>1</td>
 * <td>lower left y-coordinate</td>
 * </tr>
 * <tr valign="top">
 * <td>2</td>
 * <td>upper right x-coordinate</td>
 * </tr>
 * <tr valign="top">
 * <td>3</td>
 * <td>upper right y-coordinate</td>
 * </tr>
 * Returns false on error.
 * @removed 7.0 This function was REMOVED in PHP 7.0.0.
 */
function imagepstext($image, $text, $font_index, $size, $foreground, $background, $x, $y, $space = null, $tightness = null, $angle = null, $antialias_steps = null) {}

/**
 * Give the bounding box of a text rectangle using PostScript Type1 fonts
 * @link https://php.net/manual/en/function.imagepsbbox.php
 * @param string $text <p>
 * The text to be written.
 * </p>
 * @param resource|GdImage $font
 * @param int $size <p>
 * size is expressed in pixels.
 * </p>
 * @return array|false an array containing the following elements:
 * <tr valign="top">
 * <td>0</td>
 * <td>left x-coordinate</td>
 * </tr>
 * <tr valign="top">
 * <td>1</td>
 * <td>upper y-coordinate</td>
 * </tr>
 * <tr valign="top">
 * <td>2</td>
 * <td>right x-coordinate</td>
 * </tr>
 * <tr valign="top">
 * <td>3</td>
 * <td>lower y-coordinate</td>
 * </tr>
 * Returns false on error.
 * @removed 7.0
 */
function imagepsbbox($text, $font, $size) {}

/**
 * Return the image types supported by this PHP build
 * @link https://php.net/manual/en/function.imagetypes.php
 * @return int a bit-field corresponding to the image formats supported by the
 * version of GD linked into PHP. The following bits are returned,
 * IMG_BMP | IMG_GIF | IMG_JPG | IMG_PNG | IMG_WBMP | IMG_XPM | IMG_WEBP
 */
#[Pure]
function imagetypes(): int {}

/**
 * Convert JPEG image file to WBMP image file
 * @link https://php.net/manual/en/function.jpeg2wbmp.php
 * @param string $jpegname <p>
 * Path to JPEG file.
 * </p>
 * @param string $wbmpname <p>
 * Path to destination WBMP file.
 * </p>
 * @param int $dest_height <p>
 * Destination image height.
 * </p>
 * @param int $dest_width <p>
 * Destination image width.
 * </p>
 * @param int $threshold <p>
 * Threshold value, between 0 and 8 (inclusive).
 * </p>
 * @return bool true on success or false on failure.
 * @removed 8.0
 * @see imagecreatefromjpeg()
 */
#[Deprecated(reason: "Use imagecreatefromjpeg() and imagewbmp() instead", since: "7.2")]
function jpeg2wbmp($jpegname, $wbmpname, $dest_height, $dest_width, $threshold) {}

/**
 * Convert PNG image file to WBMP image file
 * @link https://php.net/manual/en/function.png2wbmp.php
 * @param string $pngname <p>
 * Path to PNG file.
 * </p>
 * @param string $wbmpname <p>
 * Path to destination WBMP file.
 * </p>
 * @param int $dest_height <p>
 * Destination image height.
 * </p>
 * @param int $dest_width <p>
 * Destination image width.
 * </p>
 * @param int $threshold <p>
 * Threshold value, between 0 and 8 (inclusive).
 * </p>
 * @return bool true on success or false on failure.
 * @removed 8.0
 * @see imagecreatefrompng()
 * @see imagewbmp()
 */
#[Deprecated("Use imagecreatefrompng() and imagewbmp() instead", since: "7.2")]
function png2wbmp($pngname, $wbmpname, $dest_height, $dest_width, $threshold) {}

/**
 * Output image to browser or file
 * @link https://php.net/manual/en/function.image2wbmp.php
 * @param resource|GdImage $image
 * @param string $filename [optional] <p>
 * Path to the saved file. If not given, the raw image stream will be
 * outputted directly.
 * </p>
 * @param int $threshold [optional] <p>
 * Threshold value, between 0 and 255 (inclusive).
 * </p>
 * @return bool true on success or false on failure.
 * @removed 8.0
 * @see imagewbmp()
 */
#[Deprecated(replacement: "imagewbmp(%parametersList%)", since: "7.3")]
function image2wbmp($image, $filename = null, $threshold = null) {}

/**
 * Set the alpha blending flag to use the bundled libgd layering effects
 * @link https://php.net/manual/en/function.imagelayereffect.php
 * @param resource|GdImage $image
 * @param int $effect <p>
 * One of the following constants:
 * IMG_EFFECT_REPLACE
 * Use pixel replacement (equivalent of passing true to
 * imagealphablending)</p>
 * @return bool true on success or false on failure.
 */
function imagelayereffect(GdImage $image, int $effect): bool {}

/**
 * Makes the colors of the palette version of an image more closely match the true color version
 * @link https://php.net/manual/en/function.imagecolormatch.php
 * @param resource|GdImage $image1 <p>
 * A truecolor image link resource.
 * </p>
 * @param resource|GdImage $image2 <p>
 * A palette image link resource pointing to an image that has the same
 * size as image1.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagecolormatch(GdImage $image1, GdImage $image2): bool {}

/**
 * Output XBM image to browser or file
 * @link https://php.net/manual/en/function.imagexbm.php
 * @param resource|GdImage $image
 * @param string|null $filename <p>
 * The path to save the file to. If not set or null, the raw image stream
 * will be outputted directly.
 * </p>
 * @param int|null $foreground_color [optional] <p>
 * You can set the foreground color with this parameter by setting an
 * identifier obtained from imagecolorallocate.
 * The default foreground color is black.
 * </p>
 * @return bool true on success or false on failure.
 */
function imagexbm(GdImage $image, ?string $filename, ?int $foreground_color = null): bool {}

/**
 * Applies a filter to an image
 * @link https://php.net/manual/en/function.imagefilter.php
 * @param resource|GdImage $image
 * @param int $filter <p>
 * filtertype can be one of the following:
 * IMG_FILTER_NEGATE: Reverses all colors of
 * the image.</p>
 * @param int ...$args
 * @return bool true on success or false on failure.
 */
function imagefilter(
    GdImage $image,
    int $filter,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $arg1 = null,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $arg2 = null,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $arg3 = null,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $arg4 = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] ...$args
): bool {}

/**
 * Apply a 3x3 convolution matrix, using coefficient and offset
 * @link https://php.net/manual/en/function.imageconvolution.php
 * @param resource|GdImage $image
 * @param array $matrix <p>
 * A 3x3 matrix: an array of three arrays of three floats.
 * </p>
 * @param float $divisor <p>
 * The divisor of the result of the convolution, used for normalization.
 * </p>
 * @param float $offset <p>
 * Color offset.
 * </p>
 * @return bool true on success or false on failure.
 */
function imageconvolution(GdImage $image, array $matrix, float $divisor, float $offset): bool {}

/**
 * @param resource|GdImage $image An image resource, returned by one of the image creation functions, such as {@see imagecreatetruecolor()}.
 * @param int|null $resolution_x The horizontal resolution in DPI.
 * @param int|null $resolution_y The vertical resolution in DPI.
 * @return array|bool When used as getter (that is without the optional parameters), it returns <b>TRUE</b> on success, or <b>FALSE</b> on failure. When used as setter (that is with one or both optional parameters given), it returns an indexed array of the horizontal and vertical resolution on success, or <b>FALSE</b> on failure.
 * @link https://php.net/manual/en/function.imageresolution.php
 * @since 7.2
 */
#[LanguageLevelTypeAware(['8.2' => 'array|true'], default: 'array|bool')]
function imageresolution(GdImage $image, ?int $resolution_x = null, ?int $resolution_y = null): array|bool {}

/**
 * <b>imagesetclip()</b> sets the current clipping rectangle, i.e. the area beyond which no pixels will be drawn.
 * @param resource|GdImage $image An image resource, returned by one of the image creation functions, such as {@see imagecreatetruecolor()}.
 * @param int $x1 The x-coordinate of the upper left corner.
 * @param int $y1 The y-coordinate of the upper left corner.
 * @param int $x2 The x-coordinate of the lower right corner.
 * @param int $y2 The y-coordinate of the lower right corner.
 * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * @link https://php.net/manual/en/function.imagesetclip.php
 * @see imagegetclip()
 * @since 7.2
 */
function imagesetclip(GdImage $image, int $x1, int $y1, int $x2, int $y2): bool {}

/**
 * <b>imagegetclip()</b> retrieves the current clipping rectangle, i.e. the area beyond which no pixels will be drawn.
 * @param resource|GdImage $image An image resource, returned by one of the image creation functions, such as {@see imagecreatetruecolor()}
 * @return array|false an indexed array with the coordinates of the clipping rectangle which has the following entries:
 * <ul>
 * <li>x-coordinate of the upper left corner</li>
 * <li>y-coordinate of the upper left corner</li>
 * <li>x-coordinate of the lower right corner</li>
 * <li>y-coordinate of the lower right corner</li>
 * </ul>
 * Returns <b>FALSE</b> on error.
 * @link https://php.net/manual/en/function.imagegetclip.php
 * @see imagesetclip()
 * @since 7.2
 */
function imagegetclip(GdImage $image): array {}

/**
 * <b>imageopenpolygon()</b> draws an open polygon on the given <b>image.</b> Contrary to {@see imagepolygon()}, no line is drawn between the last and the first point.
 * @param resource|GdImage $image An image resource, returned by one of the image creation functions, such as {@see imagecreatetruecolor()}.
 * @param int[] $points An array containing the polygon's vertices, e.g.:
 * <pre>
 * points[0]	= x0
 * points[1]	= y0
 * points[2]	= x1
 * points[3]	= y1
 * </pre>
 * @param int $num_points_or_color Total number of points (vertices).
 * @param int|null $color A color identifier created with {@see imagecolorallocate()}.
 * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * @link https://php.net/manual/en/function.imageopenpolygon.php
 * @since 7.2
 * @see imageplygon()
 */
function imageopenpolygon(
    GdImage $image,
    array $points,
    #[Deprecated(since: "8.1")] int $num_points_or_color,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] ?int $color,
    #[PhpStormStubsElementAvailable(from: '8.0')] ?int $color = null
): bool {}

/**
 * <b>imagecreatefrombmp()</b> returns an image identifier representing the image obtained from the given filename.
 * <b>TIP</b> A URL can be used as a filename with this function if the fopen wrappers have been enabled. See {@see fopen()} for more details on how to specify the filename. See the Supported Protocols and Wrappers for links to information about what abilities the various wrappers have, notes on their usage, and information on any predefined variables they may provide.
 * @param string $filename Path to the BMP image.
 * @return resource|GdImage|false Returns an image resource identifier on success, <b>FALSE</b> on errors.
 * @link https://php.net/manual/en/function.imagecreatefrombmp.php
 * @since 7.2
 */
function imagecreatefrombmp(string $filename): GdImage|false {}

/**
 * Outputs or saves a BMP version of the given <b>image</b>.
 * @param resource|GdImage $image An image resource, returned by one of the image creation functions, such as {@see imagecreatetruecolor()}.
 * @param mixed $file The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or <b>NULL</b>, the raw image stream will be outputted directly.
 * <br />
 * <b>Note:</b> <b>NULL</b> is invalid if the <b>compressed</b> arguments is not used.
 * @param bool $compressed Whether the BMP should be compressed with run-length encoding (RLE), or not.
 * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * <br />
 * <b>Caution</b> However, if libgd fails to output the image, this function returns <b>TRUE</b>.
 * @link https://php.net/manual/en/function.imagebmp.php
 * @since 7.2
 */
function imagebmp(GdImage $image, $file = null, bool $compressed = true): bool {}

/**
 * @param string $filename
 * @return resource|GdImage|false
 */
function imagecreatefromtga(string $filename): GdImage|false {}

/**
 * Captures the whole screen
 *
 * https://www.php.net/manual/en/function.imagegrabscreen.php
 *
 * @return resource|GdImage|false
 */
#[Pure]
function imagegrabscreen() {}

/**
 * Captures a window
 *
 * @link https://www.php.net/manual/en/function.imagegrabwindow.php
 *
 * @param int $handle
 * @param int|null $client_area
 * @return resource|GdImage|false
 */
#[Pure]
function imagegrabwindow($handle, $client_area = null) {}

/**
 * Gets the currently set interpolation method of the image.
 *
 * @link https://www.php.net/manual/en/function.imagegetinterpolation.php
 *
 * @param GdImage $image
 * @return int
 */
#[Pure]
function imagegetinterpolation(GdImage $image): int {}

/**
 * Used as a return value by {@see imagetypes()}
 * @link https://php.net/manual/en/image.constants.php#constant.img-gif
 */
define('IMG_GIF', 1);

/**
 * Used as a return value by {@see imagetypes()}
 * @link https://php.net/manual/en/image.constants.php#constant.img-jpg
 */
define('IMG_JPG', 2);

/**
 * Used as a return value by {@see imagetypes()}
 * <p>
 * This constant has the same value as {@see IMG_JPG}
 * </p>
 * @link https://php.net/manual/en/image.constants.php#constant.img-jpeg
 */
define('IMG_JPEG', 2);

/**
 * Used as a return value by {@see imagetypes()}
 * @link https://php.net/manual/en/image.constants.php#constant.img-png
 */
define('IMG_PNG', 4);

/**
 * Used as a return value by {@see imagetypes()}
 * @link https://php.net/manual/en/image.constants.php#constant.img-wbmp
 */
define('IMG_WBMP', 8);

/**
 * Used as a return value by {@see imagetypes()}
 * @link https://php.net/manual/en/image.constants.php#constant.img-xpm
 */
define('IMG_XPM', 16);

/**
 * Used as a return value by {@see imagetypes()}
 * @since 5.6.25
 * @since 7.0.10
 * @link https://php.net/manual/en/image.constants.php#constant.img-webp
 */
define('IMG_WEBP', 32);

/**
 * Used as a return value by {@see imagetypes()}
 * @since 7.2
 * @link https://php.net/manual/en/image.constants.php#constant.img-bmp
 */
define('IMG_BMP', 64);

/**
 * Special color option which can be used instead of color allocated with
 * {@see imagecolorallocate()} or {@see imagecolorallocatealpha()}
 * @link https://php.net/manual/en/image.constants.php#constant.img-color-tiled
 */
define('IMG_COLOR_TILED', -5);

/**
 * Special color option which can be used instead of color allocated with
 * {@see imagecolorallocate()} or {@see imagecolorallocatealpha()}
 * @link https://php.net/manual/en/image.constants.php#constant.img-color-styled
 */
define('IMG_COLOR_STYLED', -2);

/**
 * Special color option which can be used instead of color allocated with
 * {@see imagecolorallocate()} or {@see imagecolorallocatealpha()}
 * @link https://php.net/manual/en/image.constants.php#constant.img-color-brushed
 */
define('IMG_COLOR_BRUSHED', -3);

/**
 * Special color option which can be used instead of color allocated with
 * {@see imagecolorallocate()} or {@see imagecolorallocatealpha()}
 * @link https://php.net/manual/en/image.constants.php#constant.img-color-styledbrushed
 */
define('IMG_COLOR_STYLEDBRUSHED', -4);

/**
 * Special color option which can be used instead of color allocated with
 * {@see imagecolorallocate()} or {@see imagecolorallocatealpha()}
 * @link https://php.net/manual/en/image.constants.php#constant.img-color-transparent
 */
define('IMG_COLOR_TRANSPARENT', -6);

/**
 * A style constant used by the {@see imagefilledarc()} function.
 * <p>
 * This constant has the same value as {@see IMG_ARC_PIE}
 * </p>
 * @link https://php.net/manual/en/image.constants.php#constant.img-arc-rounded
 */
define('IMG_ARC_ROUNDED', 0);

/**
 * A style constant used by the {@see imagefilledarc()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.img-arc-pie
 */
define('IMG_ARC_PIE', 0);

/**
 * A style constant used by the {@see imagefilledarc()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.img-arc-chord
 */
define('IMG_ARC_CHORD', 1);

/**
 * A style constant used by the {@see imagefilledarc()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.img-arc-nofill
 */
define('IMG_ARC_NOFILL', 2);

/**
 * A style constant used by the {@see imagefilledarc()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.img-arc-edged
 */
define('IMG_ARC_EDGED', 4);

/**
 * A type constant used by the {@see imagegd2()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.img-gd2-raw
 */
define('IMG_GD2_RAW', 1);

/**
 * A type constant used by the {@see imagegd2()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.img-gd2-compressed
 */
define('IMG_GD2_COMPRESSED', 2);

/**
 * Alpha blending effect used by the {@see imagelayereffect()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.img-effect-replace
 */
define('IMG_EFFECT_REPLACE', 0);

/**
 * Alpha blending effect used by the {@see imagelayereffect()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.img-effect-alphablend
 */
define('IMG_EFFECT_ALPHABLEND', 1);

/**
 * Alpha blending effect used by the {@see imagelayereffect()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.img-effect-normal
 */
define('IMG_EFFECT_NORMAL', 2);

/**
 * Alpha blending effect used by the {@see imagelayereffect()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.img-effect-overlay
 */
define('IMG_EFFECT_OVERLAY', 3);

/**
 * Alpha blending effect used by the {@see imagelayereffect()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.img-effect-multiply
 * @since 7.2
 */
define('IMG_EFFECT_MULTIPLY', 4);

/**
 * When the bundled version of GD is used this is 1 otherwise
 * it's set to 0.
 * @link https://php.net/manual/en/image.constants.php
 */
define('GD_BUNDLED', 1);

/**
 * Special GD filter used by the {@see imagefilter()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.img-filter-negate
 */
define('IMG_FILTER_NEGATE', 0);

/**
 * Special GD filter used by the {@see imagefilter()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.img-filter-grayscale
 */
define('IMG_FILTER_GRAYSCALE', 1);

/**
 * Special GD filter used by the {@see imagefilter()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.img-filter-brightness
 */
define('IMG_FILTER_BRIGHTNESS', 2);

/**
 * Special GD filter used by the {@see imagefilter()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.img-filter-contrast
 */
define('IMG_FILTER_CONTRAST', 3);

/**
 * Special GD filter used by the {@see imagefilter()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.img-filter-colorize
 */
define('IMG_FILTER_COLORIZE', 4);

/**
 * Special GD filter used by the {@see imagefilter()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.img-filter-edgedetect
 */
define('IMG_FILTER_EDGEDETECT', 5);

/**
 * Special GD filter used by the {@see imagefilter()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.img-filter-gaussian-blur
 */
define('IMG_FILTER_GAUSSIAN_BLUR', 7);

/**
 * Special GD filter used by the {@see imagefilter()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.img-filter-selective-blur
 */
define('IMG_FILTER_SELECTIVE_BLUR', 8);

/**
 * Special GD filter used by the {@see imagefilter()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.img-filter-emboss
 */
define('IMG_FILTER_EMBOSS', 6);

/**
 * Special GD filter used by the {@see imagefilter()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.img-filter-mean-removal
 */
define('IMG_FILTER_MEAN_REMOVAL', 9);

/**
 * Special GD filter used by the {@see imagefilter()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.img-filter-smooth
 */
define('IMG_FILTER_SMOOTH', 10);

/**
 * Special GD filter used by the {@see imagefilter()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.img-filter-pixelate
 */
define('IMG_FILTER_PIXELATE', 11);

/**
 * Special GD filter used by the {@see imagefilter()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.img-filter-scatter
 * @since 7.4
 */
define('IMG_FILTER_SCATTER', 12);

/**
 * The GD version PHP was compiled against.
 * @since 5.2.4
 * @link https://php.net/manual/en/image.constants.php#constant.gd-version
 */
define('GD_VERSION', "2.0.35");

/**
 * The GD major version PHP was compiled against.
 * @since 5.2.4
 * @link https://php.net/manual/en/image.constants.php#constant.gd-major-version
 */
define('GD_MAJOR_VERSION', 2);

/**
 * The GD minor version PHP was compiled against.
 * @since 5.2.4
 * @link https://php.net/manual/en/image.constants.php#constant.gd-minor-version
 */
define('GD_MINOR_VERSION', 0);

/**
 * The GD release version PHP was compiled against.
 * @since 5.2.4
 * @link https://php.net/manual/en/image.constants.php#constant.gd-release-version
 */
define('GD_RELEASE_VERSION', 35);

/**
 * The GD "extra" version (beta/rc..) PHP was compiled against.
 * @since 5.2.4
 * @link https://php.net/manual/en/image.constants.php#constant.gd-extra-version
 */
define('GD_EXTRA_VERSION', "");

/**
 * A special PNG filter, used by the {@see imagepng()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.png-no-filter
 */
define('PNG_NO_FILTER', 0);

/**
 * A special PNG filter, used by the {@see imagepng()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.png-filter-none
 */
define('PNG_FILTER_NONE', 8);

/**
 * A special PNG filter, used by the {@see imagepng()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.png-filter-sub
 */
define('PNG_FILTER_SUB', 16);

/**
 * A special PNG filter, used by the {@see imagepng()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.png-filter-up
 */
define('PNG_FILTER_UP', 32);

/**
 * A special PNG filter, used by the {@see imagepng()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.png-filter-avg
 */
define('PNG_FILTER_AVG', 64);

/**
 * A special PNG filter, used by the {@see imagepng()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.png-filter-paeth
 */
define('PNG_FILTER_PAETH', 128);

/**
 * A special PNG filter, used by the {@see imagepng()} function.
 * @link https://php.net/manual/en/image.constants.php#constant.png-all-filters
 */
define('PNG_ALL_FILTERS', 248);

/**
 * An affine transformation type constant used by the {@see imageaffinematrixget()} function.
 * @since 5.5
 * @link https://php.net/manual/en/image.constants.php#constant.img-affine-translate
 */
define('IMG_AFFINE_TRANSLATE', 0);

/**
 * An affine transformation type constant used by the {@see imageaffinematrixget()} function.
 * @since 5.5
 * @link https://php.net/manual/en/image.constants.php#constant.img-affine-scale
 */
define('IMG_AFFINE_SCALE', 1);

/**
 * An affine transformation type constant used by the {@see imageaffinematrixget()} function.
 * @since 5.5
 * @link https://php.net/manual/en/image.constants.php#constant.img-affine-rotate
 */
define('IMG_AFFINE_ROTATE', 2);

/**
 * An affine transformation type constant used by the {@see imageaffinematrixget()} function.
 * @since 5.5
 * @link https://php.net/manual/en/image.constants.php#constant.img-affine-shear-horizontal
 */
define('IMG_AFFINE_SHEAR_HORIZONTAL', 3);

/**
 * An affine transformation type constant used by the {@see imageaffinematrixget()} function.
 * @since 5.5
 * @link https://php.net/manual/en/image.constants.php#constant.img-affine-shear-vertical
 */
define('IMG_AFFINE_SHEAR_VERTICAL', 4);

/**
 * Same as {@see IMG_CROP_TRANSPARENT}. Before PHP 7.4.0, the bundled libgd fell back to
 * {@see IMG_CROP_SIDES}, if the image had no transparent color.
 * Used together with {@see imagecropauto()}.
 * @since 5.5
 */
define('IMG_CROP_DEFAULT', 0);

/**
 * Crops out a transparent background.
 * Used together with {@see imagecropauto()}.
 * @since 5.5
 */
define('IMG_CROP_TRANSPARENT', 1);

/**
 * Crops out a black background.
 * Used together with {@see imagecropauto()}.
 * @since 5.5
 */
define('IMG_CROP_BLACK', 2);

/**
 * Crops out a white background.
 * Used together with {@see imagecropauto()}.
 * @since 5.5
 */
define('IMG_CROP_WHITE', 3);

/**
 * Uses the 4 corners of the image to attempt to detect the background to crop.
 * Used together with {@see imagecropauto()}.
 * @since 5.5
 */
define('IMG_CROP_SIDES', 4);

/**
 * Crops an image using the given <b>threshold</b> and <b>color</b>.
 * Used together with {@see imagecropauto()}.
 * @since 5.5
 */
define('IMG_CROP_THRESHOLD', 5);

/**
 * Used together with {@see imageflip()}
 * @since 5.5
 * @link https://php.net/manual/en/image.constants.php#constant.img-flip-both
 */
define('IMG_FLIP_BOTH', 3);

/**
 * Used together with {@see imageflip()}
 * @since 5.5
 * @link https://php.net/manual/en/image.constants.php#constant.img-flip-horizontal
 */
define('IMG_FLIP_HORIZONTAL', 1);

/**
 * Used together with {@see imageflip()}
 * @since 5.5
 * @link https://php.net/manual/en/image.constants.php#constant.img-flip-vertical
 */
define('IMG_FLIP_VERTICAL', 2);

/**
 * Used together with {@see imagesetinterpolation()}.
 * @link https://php.net/manual/en/image.constants.php#constant.img-bell
 * @since 5.5
 */
define('IMG_BELL', 1);

/**
 * Used together with {@see imagesetinterpolation()}.
 * @link https://php.net/manual/en/image.constants.php#constant.img-bessel
 * @since 5.5
 */
define('IMG_BESSEL', 2);

/**
 * Used together with {@see imagesetinterpolation()}.
 * @link https://php.net/manual/en/image.constants.php#constant.img-bicubic
 * @since 5.5
 */
define('IMG_BICUBIC', 4);

/**
 * Used together with {@see imagesetinterpolation()}.
 * @link https://php.net/manual/en/image.constants.php#constant.img-bicubic-fixed
 * @since 5.5
 */
define('IMG_BICUBIC_FIXED', 5);

/**
 * Used together with {@see imagesetinterpolation()}.
 * @link https://php.net/manual/en/image.constants.php#constant.img-bilinear-fixed
 * @since 5.5
 */
define('IMG_BILINEAR_FIXED', 3);

/**
 * Used together with {@see imagesetinterpolation()}.
 * @link https://php.net/manual/en/image.constants.php#constant.img-blackman
 * @since 5.5
 */
define('IMG_BLACKMAN', 6);

/**
 * Used together with {@see imagesetinterpolation()}.
 * @link https://php.net/manual/en/image.constants.php#constant.img-box
 * @since 5.5
 */
define('IMG_BOX', 7);

/**
 * Used together with {@see imagesetinterpolation()}.
 * @link https://php.net/manual/en/image.constants.php#constant.img-bspline
 * @since 5.5
 */
define('IMG_BSPLINE', 8);

/**
 * Used together with {@see imagesetinterpolation()}.
 * @link https://php.net/manual/en/image.constants.php#constant.img-catmullrom
 * @since 5.5
 */
define('IMG_CATMULLROM', 9);

/**
 * Used together with {@see imagesetinterpolation()}.
 * @link https://php.net/manual/en/image.constants.php#constant.img-gaussian
 * @since 5.5
 */
define('IMG_GAUSSIAN', 10);

/**
 * Used together with {@see imagesetinterpolation()}.
 * @link https://php.net/manual/en/image.constants.php#constant.img-generalized-cubic
 * @since 5.5
 */
define('IMG_GENERALIZED_CUBIC', 11);

/**
 * Used together with {@see imagesetinterpolation()}.
 * @link https://php.net/manual/en/image.constants.php#constant.img-hermite
 * @since 5.5
 */
define('IMG_HERMITE', 12);

/**
 * Used together with {@see imagesetinterpolation()}.
 * @link https://php.net/manual/en/image.constants.php#constant.img-hamming
 * @since 5.5
 */
define('IMG_HAMMING', 13);

/**
 * Used together with {@see imagesetinterpolation()}.
 * @link https://php.net/manual/en/image.constants.php#constant.img-hanning
 * @since 5.5
 */
define('IMG_HANNING', 14);

/**
 * Used together with {@see imagesetinterpolation()}.
 * @link https://php.net/manual/en/image.constants.php#constant.img-mitchell
 * @since 5.5
 */
define('IMG_MITCHELL', 15);

/**
 * Used together with {@see imagesetinterpolation()}.
 * @link https://php.net/manual/en/image.constants.php#constant.img-power
 * @since 5.5
 */
define('IMG_POWER', 17);

/**
 * Used together with {@see imagesetinterpolation()}.
 * @link https://php.net/manual/en/image.constants.php#constant.img-quadratic
 * @since 5.5
 */
define('IMG_QUADRATIC', 18);

/**
 * Used together with {@see imagesetinterpolation()}.
 * @link https://php.net/manual/en/image.constants.php#constant.img-sinc
 * @since 5.5
 */
define('IMG_SINC', 19);

/**
 * Used together with {@see imagesetinterpolation()}.
 * @link https://php.net/manual/en/image.constants.php#constant.img-nearest-neighbour
 * @since 5.5
 */
define('IMG_NEAREST_NEIGHBOUR', 16);

/**
 * Used together with {@see imagesetinterpolation()}.
 * @link https://php.net/manual/en/image.constants.php#constant.img-weighted4
 * @since 5.5
 */
define('IMG_WEIGHTED4', 21);

/**
 * Used together with {@see imagesetinterpolation()}.
 * @link https://php.net/manual/en/image.constants.php#constant.img-triangle
 * @since 5.5
 */
define('IMG_TRIANGLE', 20);

define('IMG_TGA', 128);

/**
 * @since 8.1
 */
define('IMG_AVIF', 256);

/**
 * @since 8.1
 */
define('IMG_WEBP_LOSSLESS', 101);

/**
 * Outputs or saves a AVIF Raster image from the given image
 * @link https://www.php.net/manual/function.imageavif.php
 * @param GdImage $image A GdImage object, returned by one of the image creation functions, such as imagecreatetruecolor().
 * @param resource|string|null $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or null, the raw image stream will be output directly.
 * @param int $quality quality is optional, and ranges from 0 (worst quality, smaller file) to 100 (best quality, larger file). If -1 is provided, the default value 30 is used.
 * @param int $speed speed is optional, and ranges from 0 (slow, smaller file) to 10 (fast, larger file). If -1 is provided, the default value 6 is used.
 * @return bool Returns true on success or false on failure. However, if libgd fails to output the image, this function returns true.
 * @since 8.1
 */
function imageavif(GdImage $image, string|null $file = null, int $quality = -1, int $speed = -1): bool {}

/**
 * Return an image containing the affine tramsformed src image, using an optional clipping area
 * @link https://secure.php.net/manual/en/function.imageaffine.php
 * @param resource|GdImage $image <p>An image resource, returned by one of the image creation functions,
 * such as {@link https://secure.php.net/manual/en/function.imagecreatetruecolor.php imagecreatetruecolor()}.</p>
 * @param array $affine <p>Array with keys 0 to 5.</p>
 * @param array|null $clip [optional] <p>Array with keys "x", "y", "width" and "height".</p>
 * @return resource|GdImage|false Return affined image resource on success or FALSE on failure.
 */
function imageaffine(GdImage $image, array $affine, ?array $clip = null): GdImage|false {}

/**
 * Concat two matrices (as in doing many ops in one go)
 * @link https://secure.php.net/manual/en/function.imageaffinematrixconcat.php
 * @param array $matrix1 <p>Array with keys 0 to 5.</p>
 * @param array $matrix2 <p>Array with keys 0 to 5.</p>
 * @return float[]|false Array with keys 0 to 5 and float values or <b>FALSE</b> on failure.
 * @since 5.5
 */
function imageaffinematrixconcat(array $matrix1, array $matrix2): array|false {}

/**
 * Return an image containing the affine tramsformed src image, using an optional clipping area
 * @link https://secure.php.net/manual/en/function.imageaffinematrixget.php
 * @param int $type <p> One of <b>IMG_AFFINE_*</b> constants.</p>
 * @param mixed $options
 * @return float[]|false Array with keys 0 to 5 and float values or <b>FALSE</b> on failure.
 * @since 5.5
 */
function imageaffinematrixget(
    int $type,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $options = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] $options
): array|false {}

/**
 * Crop an image using the given coordinates and size, x, y, width and height
 * @link https://secure.php.net/manual/en/function.imagecrop.php
 * @param resource|GdImage $image <p>
 * An image resource, returned by one of the image creation functions, such as {@link https://secure.php.net/manual/en/function.imagecreatetruecolor.php imagecreatetruecolor()}.
 * </p>
 * @param array $rectangle <p>Array with keys "x", "y", "width" and "height".</p>
 * @return resource|GdImage|false Return cropped image resource on success or FALSE on failure.
 * @since 5.5
 */
function imagecrop(GdImage $image, array $rectangle): GdImage|false {}

/**
 * Crop an image automatically using one of the available modes
 * @link https://secure.php.net/manual/en/function.imagecropauto.php
 * @param resource|GdImage $image <p>
 * An image resource, returned by one of the image creation functions, such as {@link https://secure.php.net/manual/en/function.imagecreatetruecolor.php imagecreatetruecolor()}.
 * </p>
 * @param int $mode [optional] <p>
 * One of <b>IMG_CROP_*</b> constants.
 * </p>
 * @param float $threshold [optional] <p>
 * Used <b>IMG_CROP_THRESHOLD</b> mode.
 * </p>
 * @param int $color [optional]
 * <p>
 * Used in <b>IMG_CROP_THRESHOLD</b> mode.
 * </p>
 * @return resource|GdImage|false Return cropped image resource on success or <b>FALSE</b> on failure.
 * @since 5.5
 */
function imagecropauto(GdImage $image, int $mode = IMG_CROP_DEFAULT, float $threshold = .5, int $color = -1): GdImage|false {}

/**
 * Flips an image using a given mode
 * @link https://secure.php.net/manual/en/function.imageflip.php
 * @param resource|GdImage $image <p>
 * An image resource, returned by one of the image creation functions, such as {@link https://secure.php.net/manual/en/function.imagecreatetruecolor.php imagecreatetruecolor()}.
 * </p>
 * @param int $mode <p>
 * Flip mode, this can be one of the <b>IMG_FLIP_*</b> constants:
 * </p>
 * <table>
 * <thead>
 * <tr>
 * <th>Constant</th>
 * <th>Meaning</th>
 * </tr>
 * </thead>
 * <tbody>
 * <tr>
 * <td><b>IMG_FLIP_HORIZONTAL</b></td>
 * <td>
 * Flips the image horizontally.
 * </td>
 * </tr>
 * <tr>
 * <td><b>IMG_FLIP_VERTICAL</b></td>
 * <td>
 * Flips the image vertically.
 * </td>
 * </tr>
 * <tr>
 * <td><b>IMG_FLIP_BOTH</b></td>
 * <td>
 * Flips the image both horizontally and vertically.
 * </td>
 * </tr>
 * </tbody>
 * </table>
 * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * @since 5.5
 */
function imageflip(GdImage $image, int $mode): bool {}

/**
 * Converts a palette based image to true color
 * @link https://secure.php.net/manual/en/function.imagepalettetotruecolor.php
 * @param resource|GdImage $image <p>
 * An image resource, returnd by one of the image creation functions, such as {@link https://secure.php.net/manual/en/function.imagecreatetruecolor.php imagecreatetruecolor()}.
 * </p>
 * @return bool Returns <b>TRUE</b> if the convertion was complete, or if the source image already is a true color image, otherwise <b>FALSE</b> is returned.
 * @since 5.5
 */
function imagepalettetotruecolor(GdImage $image): bool {}

/**
 * @param resource|GdImage $image <p>
 * An image resource, returnd by one of the image creation functions, such as {@link https://secure.php.net/manual/en/function.imagecreatetruecolor.php imagecreatetruecolor()}.
 * </p>
 * @param int $width
 * @param int $height [optional]
 * @param int $mode [optional] One of <b>IMG_NEAREST_NEIGHBOUR</b>, <b>IMG_BILINEAR_FIXED</b>, <b>IMG_BICUBIC</b>, <b>IMG_BICUBIC_FIXED</b> or anything else (will use two pass).
 * @return resource|GdImage|false Return scaled image resource on success or <b>FALSE</b> on failure.
 *@link https://secure.php.net/manual/en/function.imagescale.php
 * @since 5.5
 * Scale an image using the given new width and height
 */
function imagescale(GdImage $image, int $width, int $height = -1, int $mode = IMG_BILINEAR_FIXED): GdImage|false {}

/**
 * Set the interpolation method
 * @link https://secure.php.net/manual/en/function.imagesetinterpolation.php
 * @param resource|GdImage $image <p>
 * An image resource, returned by one of the image creation functions, such as {@link https://secure.php.net/manual/en/function.imagecreatetruecolor.php imagecreatetruecolor()}.
 * </p>
 * @param int $method <p>
 * The interpolation method, which can be one of the following:
 * <ul>
 * <li>
 * IMG_BELL: Bell filter.
 * </li>
 * <li>
 * IMG_BESSEL: Bessel filter.
 * </li>
 * <li>
 * IMG_BICUBIC: Bicubic interpolation.
 * </li>
 * <li>
 * IMG_BICUBIC_FIXED: Fixed point implementation of the bicubic interpolation.
 * </li>
 * <li>
 * IMG_BILINEAR_FIXED: Fixed point implementation of the  bilinear interpolation (<em>default (also on image creation)</em>).
 * </li>
 * <li>
 * IMG_BLACKMAN: Blackman window function.
 * </li>
 * <li>
 * IMG_BOX: Box blur filter.
 * </li>
 * <li>
 * IMG_BSPLINE: Spline interpolation.
 * </li>
 * <li>
 * IMG_CATMULLROM: Cubbic Hermite spline interpolation.
 * </li>
 * <li>
 * IMG_GAUSSIAN: Gaussian function.
 * </li>
 * <li>
 * IMG_GENERALIZED_CUBIC: Generalized cubic spline fractal interpolation.
 * </li>
 * <li>
 * IMG_HERMITE: Hermite interpolation.
 * </li>
 * <li>
 * IMG_HAMMING: Hamming filter.
 * </li>
 * <li>
 * IMG_HANNING: Hanning filter.
 * </li>
 * <li>
 * IMG_MITCHELL: Mitchell filter.
 * </li>
 * <li>
 * IMG_POWER: Power interpolation.
 * </li>
 * <li>
 * IMG_QUADRATIC: Inverse quadratic interpolation.
 * </li>
 * <li>
 * IMG_SINC: Sinc function.
 * </li>
 * <li>
 * IMG_NEAREST_NEIGHBOUR: Nearest neighbour interpolation.
 * </li>
 * <li>
 * IMG_WEIGHTED4: Weighting filter.
 * </li>
 * <li>
 * IMG_TRIANGLE: Triangle interpolation.
 * </li>
 * </ul>
 * </p>
 * @return bool Returns TRUE on success or FALSE on failure.
 * @since 5.5
 */
function imagesetinterpolation(GdImage $image, int $method = IMG_BILINEAR_FIXED): bool {}

/**
 * @since 8.0
 */
final class GdImage
{
    /**
     * You cannot initialize a GdImage object except through helper functions.
     */
    private function __construct() {}

    private function __clone() {}
}
<?php
/**
 * Stubs for WinCache extension by Microsoft (v1.1.0)
 * @link https://secure.php.net/manual/en/book.wincache.php
 * Windows Cache Extension for PHP is a PHP accelerator that is used to increase
 * the speed of PHP applications running on Windows and Windows Server.
 * Requirements:
 *   IIS WebServer
 *   FastCGI mode
 *   PHP 5.2.X, Non-thread-safe build
 *   PHP 5.3 X86, Non-thread-safe VC9 build
 *
 * Author: Andriy Bazanov
 * Date  : 2010-09-30
 */

/**
 * (PHP 5.2+; PECL wincache &gt;= 1.0.0)<br/>
 * Retrieves information about files cached in the file cache
 * @link https://secure.php.net/manual/en/function.wincache-fcache-fileinfo.php
 * @param bool $summaryonly [optional]
 * <p>Controls whether the returned array will contain information about individual
 * cache entries along with the file cache summary.</p>
 * @return array|false Array of meta data about file cache or FALSE on failure
 * <p>The array returned by this function contains the following elements:
 * <ul>
 * <li><em>total_cache_uptime</em> - total time in seconds that the file cache has been active</li>
 * <li><em>total_file_count</em> - total number of files that are currently in the file cache</li>
 * <li><em>total_hit_count</em> - number of times the files have been served from the file cache</li>
 * <li><em>total_miss_count</em> - number of times the files have not been found in the file cache</li>
 * <li><em>file_entries</em> - an array that contains the information about all the cached files:
 * <ul>
 * <li><em>file_name</em> - absolute file name of the cached file</li>
 * <li><em>add_time</em> - time in seconds since the file has been added to the file cache</li>
 * <li><em>use_time</em> - time in seconds since the file has been accessed in the file cache</li>
 * <li><em>last_check</em> - time in seconds since the file has been checked for modifications</li>
 * <li><em>hit_count</em> - number of times the file has been served from the cache</li>
 * <li><em>file_size</em> - size of the cached file in bytes</li>
 * </ul></li>
 * </ul></p>
 */
function wincache_fcache_fileinfo($summaryonly = false) {}

/**
 * (PHP 5.2+; PECL wincache &gt;= 1.0.0)<br/>
 * Retrieves information about memory usage by file cache.
 * @link https://secure.php.net/manual/en/function.wincache-fcache-meminfo.php
 * @return array|false Array of meta data about file cache memory usage or FALSE on failure
 * <p>The array returned by this function contains the following elements:
 * <ul>
 * <li><em>memory_total</em> - amount of memory in bytes allocated for the file cache</li>
 * <li><em>memory_free</em> - amount of free memory in bytes available for the file cache</li>
 * <li><em>num_used_blks</em> - number of memory blocks used by the file cache</li>
 * <li><em>num_free_blks</em> - number of free memory blocks available for the file cache</li>
 * <li><em>memory_overhead</em> - amount of memory in bytes used for the file cache internal structures</li>
 * </ul></p>
 */
function wincache_fcache_meminfo() {}

/**
 * (PHP 5.2+; PECL wincache &gt;= 1.1.0)<br/>
 * Obtains an exclusive lock on a given key.
 * <p>The execution of the current script will be blocked until the lock can be
 * obtained. Once the lock is obtained, the other scripts that try to request the
 * lock by using the same key will be blocked, until the current script releases
 * the lock by using wincache_unlock().</p>
 * @link https://secure.php.net/manual/en/function.wincache-lock.php
 * @param string $key Name of the key in the cache to get the lock on.
 * @param bool $isglobal [optional]
 * <p>Controls whether the scope of the lock is system-wide or local. Local locks
 * are scoped to the application pool in IIS FastCGI case or to all php processes
 * that have the same parent process identifier. </p>
 * @return bool Returns TRUE on success or FALSE on failure.
 */
function wincache_lock($key, $isglobal = false) {}

/**
 * (PHP 5.2+; PECL wincache &gt;= 1.0.0)<br/>
 * Retrieves information about opcode cache content and its usage
 * @link https://secure.php.net/manual/en/function.wincache-ocache-fileinfo.php
 * @param bool $summaryonly [optional]
 * <p>Controls whether the returned array will contain information about individual
 * cache entries along with the opcode cache summary.</p>
 * @return array|false Array of meta data about opcode cache or FALSE on failure
 * <p>The array returned by this function contains the following elements:
 * <ul>
 * <li><em>total_cache_uptime</em> - total time in seconds that the opcode cache has been active</li>
 * <li><em>total_file_count</em> - total number of files that are currently in the opcode cache</li>
 * <li><em>total_hit_count</em> - number of times the compiled opcode have been served from the cache</li>
 * <li><em>total_miss_count</em> - number of times the compiled opcode have not been found in the cache</li>
 * <li><em>is_local_cache</em> - true is the cache metadata is for a local cache instance, false
 * if the metadata is for the global cache</li>
 * <li><em>file_entries</em> - an array that contains the information about all the cached files:
 * <ul>
 * <li><em>file_name</em> - absolute file name of the cached file</li>
 * <li><em>add_time</em> - time in seconds since the file has been added to the opcode cache</li>
 * <li><em>use_time</em> - time in seconds since the file has been accessed in the opcode cache</li>
 * <li><em>last_check</em> - time in seconds since the file has been checked for modifications</li>
 * <li><em>hit_count</em> - number of times the file has been served from the cache</li>
 * <li><em>function_count</em> - number of functions in the cached file</li>
 * <li><em>class_count</em> - number of classes in the cached file</li>
 * </ul></li>
 * </ul></p>
 */
function wincache_ocache_fileinfo($summaryonly = false) {}

/**
 * (PHP 5.2+; PECL wincache &gt;= 1.0.0)<br/>
 * Retrieves information about memory usage by opcode cache.
 * @link https://secure.php.net/manual/en/function.wincache-ocache-meminfo.php
 * @return array|false Array of meta data about opcode cache memory usage or FALSE on failure
 * <p>The array returned by this function contains the following elements:
 * <ul>
 * <li><em>memory_total</em> - amount of memory in bytes allocated for the opcode cache</li>
 * <li><em>memory_free</em> - amount of free memory in bytes available for the opcode cache</li>
 * <li><em>num_used_blks</em> - number of memory blocks used by the opcode cache</li>
 * <li><em>num_free_blks</em> - number of free memory blocks available for the opcode cache</li>
 * <li><em>memory_overhead</em> - amount of memory in bytes used for the opcode cache internal structures</li>
 * </ul></p>
 */
function wincache_ocache_meminfo() {}

/**
 * (PHP 5.2+; PECL wincache &gt;= 1.0.0)<br/>
 * Refreshes the cache entries for the files, whose names were passed in the input argument.
 * <p>If no argument is specified then refreshes all the entries in the cache.</p>
 * @link https://secure.php.net/manual/en/function.wincache-refresh-if-changed.php
 * @param array $files [optional]
 * <p>An array of file names for files that need to be refreshed. An absolute
 * or relative file paths can be used.</p>
 * @return bool Returns TRUE on success or FALSE on failure.
 */
function wincache_refresh_if_changed(array $files) {}

/**
 * (PHP 5.2+; PECL wincache &gt;= 1.0.0)<br/>
 * Retrieves information about cached mappings between relative file paths and
 * corresponding absolute file paths.
 * @link https://secure.php.net/manual/en/function.wincache-rplist-fileinfo.php
 * @return array|false Array of meta data about the resolve file path cache or FALSE on failure
 * <p>The array returned by this function contains the following elements:
 * <ul>
 * <li><em>total_file_count</em> - total number of file path mappings stored in the cache</li>
 * <li><em>rplist_entries</em> - an array that contains the information about all the cached file paths:
 * <ul>
 * <li><em>resolve_path</em> - path to a file</li>
 * <li><em>subkey_data</em> - corresponding absolute path to a file</li>
 * </ul></li>
 * </ul></p>
 */
function wincache_rplist_fileinfo() {}

/**
 * (PHP 5.2+; PECL wincache &gt;= 1.0.0)<br/>
 * Retrieves information about memory usage by resolve file path cache.
 * @link https://secure.php.net/manual/en/function.wincache-rplist-meminfo.php
 * @return array|false Array of meta data that describes memory usage by resolve file path cache. or FALSE on failure
 * <p>The array returned by this function contains the following elements:
 * <ul>
 * <li><em>memory_total</em> - amount of memory in bytes allocated for the resolve file path cache</li>
 * <li><em>memory_free</em> - amount of free memory in bytes available for the resolve file path cache</li>
 * <li><em>num_used_blks</em> - number of memory blocks used by the resolve file path cache</li>
 * <li><em>num_free_blks</em> - number of free memory blocks available for the resolve file path cache</li>
 * <li><em>memory_overhead</em> - amount of memory in bytes used for the internal structures of resolve file path cache</li>
 * </ul></p>
 */
function wincache_rplist_meminfo() {}

/**
 * (PHP 5.2+; PECL wincache &gt;= 1.1.0)<br/>
 * Retrieves information about session cache content and its usage.
 * @link https://secure.php.net/manual/en/function.wincache-scache-info.php
 * @param bool $summaryonly [optional]
 * <p>Controls whether the returned array will contain information about individual
 * cache entries along with the session cache summary.</p>
 * @return array|false Array of meta data about session cache or FALSE on failure
 * <p>The array returned by this function contains the following elements:
 * <ul>
 * <li><em>total_cache_uptime</em> - total time in seconds that the session cache has been active</li>
 * <li><em>total_item_count</em> - total number of elements that are currently in the session cache</li>
 * <li><em>is_local_cache</em> - true is the cache metadata is for a local cache instance, false
 * if the metadata is for the global cache</li>
 * <li><em>total_hit_count</em> - number of times the data has been served from the cache</li>
 * <li><em>total_miss_count</em> - number of times the data has not been found in the cache</li>
 * <li><em>scache_entries</em> - an array that contains the information about all the cached items:
 * <ul>
 * <li><em>key_name</em> - name of the key which is used to store the data</li>
 * <li><em>value_type</em> - type of value stored by the key</li>
 * <li><em>use_time</em> - time in seconds since the file has been accessed in the opcode cache</li>
 * <li><em>last_check</em> - time in seconds since the file has been checked for modifications</li>
 * <li><em>ttl_seconds</em> - time remaining for the data to live in the cache, 0 meaning infinite</li>
 * <li><em>age_seconds</em> - time elapsed from the time data has been added in the cache</li>
 * <li><em>hitcount</em> - number of times data has been served from the cache</li>
 * </ul></li>
 * </ul></p>
 */
function wincache_scache_info($summaryonly = false) {}

/**
 * (PHP 5.2+; PECL wincache &gt;= 1.1.0)<br/>
 * Retrieves information about memory usage by session cache.
 * @link https://secure.php.net/manual/en/function.wincache-scache-meminfo.php
 * @return array|false Array of meta data about session cache memory usage or FALSE on failure
 * <p>The array returned by this function contains the following elements:
 * <ul>
 * <li><em>memory_total</em> - amount of memory in bytes allocated for the session cache</li>
 * <li><em>memory_free</em> - amount of free memory in bytes available for the session cache</li>
 * <li><em>num_used_blks</em> - number of memory blocks used by the session cache</li>
 * <li><em>num_free_blks</em> - number of free memory blocks available for the session cache</li>
 * <li><em>memory_overhead</em> - amount of memory in bytes used for the session cache internal structures</li>
 * </ul></p>
 */
function wincache_scache_meminfo() {}

/**
 * (PHP 5.2+; PECL wincache &gt;= 1.1.0)<br/>
 * Adds a variable in user cache, only if this variable doesn't already exist in the cache.
 * <p>The added variable remains in the user cache unless its time to live expires
 * or it is deleted by using wincache_ucache_delete() or wincache_ucache_clear() functions.</p>
 * @link https://secure.php.net/manual/en/function.wincache-ucache-add.php
 * @param string $key <p>Store the variable using this key name. If a variable with
 * same key is already present the function will fail and return FALSE. key is case
 * sensitive. To override the value even if key is present use wincache_ucache_set()
 * function instad. key can also take array of name =&gt; value pairs where names will
 * be used as keys. This can be used to add multiple values in the cache in one
 * operation, thus avoiding race condition.</p>
 * @param mixed $value <p>Value of a variable to store. Value supports all data
 * types except resources, such as file handles. This parameter is ignored if
 * first argument is an array. A general guidance is to pass NULL as value while
 * using array as key.</p>
 * @param int $ttl [optional]
 * <p>Time for the variable to live in the cache in seconds. After the value
 * specified in ttl has passed the stored variable will be deleted from the
 * cache. This parameter takes a default value of 0 which means the variable
 * will stay in the cache unless explicitly deleted by using wincache_ucache_delete()
 * or wincache_ucache_clear() functions.</p>
 * @return bool If key is string, the function returns TRUE on success and FALSE on failure.
 * <p>If key is an array, the function returns:
 * <ul>
 * <li>If all the name =&gt; value pairs in the array can be set, function returns an empty array;</li>
 * <li>If all the name =&gt; value pairs in the array cannot be set, function returns FALSE;</li>
 * <li>If some can be set while others cannot, function returns an array with name=&gt;value pair
 * for which the addition failed in the user cache.</li>
 * </ul></p>
 */
function wincache_ucache_add($key, $value, $ttl = 0) {}

/**
 * (PHP 5.2+; PECL wincache &gt;= 1.1.0)<br/>
 * Compares the variable associated with the <em>key</em> with <em>old_value</em>
 * and if it matches then assigns the <em>new_value</em> to it.
 * @link https://secure.php.net/manual/en/function.wincache-ucache-cas.php
 * @param string $key The key that is used to store the variable in the cache. key is case sensitive.
 * @param int $old_value Old value of the variable pointed by key in the user cache.
 * The value should be of type long, otherwise the function returns FALSE.
 * @param int $new_value New value which will get assigned to variable pointer by key
 * if a match is found. The value should be of type long, otherwise the function returns FALSE.
 * @return bool Returns TRUE on success or FALSE on failure.
 */
function wincache_ucache_cas($key, $old_value, $new_value) {}

/**
 * (PHP 5.2+; PECL wincache &gt;= 1.1.0)<br/>
 * Clears/deletes all the values stored in the user cache.
 * @link https://secure.php.net/manual/en/function.wincache-ucache-clear.php
 * @return bool Returns TRUE on success or FALSE on failure.
 */
function wincache_ucache_clear() {}

/**
 * (PHP 5.2+; PECL wincache &gt;= 1.1.0)<br/>
 * Decrements the value associated with the key by 1 or as specified by dec_by.
 * @link https://secure.php.net/manual/en/function.wincache-ucache-dec.php
 * @param string $key <p>The key that was used to store the variable in the cache.
 * key is case sensitive.</p>
 * @param int $dec_by <p>The value by which the variable associated with the key will
 * get decremented. If the argument is a floating point number it will be truncated
 * to nearest integer. The variable associated with the key should be of type long,
 * otherwise the function fails and returns FALSE.</p>
 * @param bool|null &$success [optional]
 * <p>Will be set to TRUE on success and FALSE on failure.</p>
 * @return int|false Returns the decremented value on success and FALSE on failure.
 */
function wincache_ucache_dec($key, $dec_by = 1, &$success) {}

/**
 * (PHP 5.2+; PECL wincache &gt;= 1.1.0)<br/>
 * Deletes the elements in the user cache pointed by key.
 * @link https://secure.php.net/manual/en/function.wincache-ucache-delete.php
 * @param string|string[] $key <p>The key that was used to store the variable in the cache.
 * key is case sensitive. key can be an array of keys.</p>
 * @return bool Returns TRUE on success or FALSE on failure.
 * <p>If key is an array then the function returns FALSE if every element of
 * the array fails to get deleted from the user cache, otherwise returns an
 * array which consists of all the keys that are deleted.</p>
 */
function wincache_ucache_delete($key) {}

/**
 * (PHP 5.2+; PECL wincache &gt;= 1.1.0)<br/>
 * Checks if a variable with the key exists in the user cache or not.
 * @link https://secure.php.net/manual/en/function.wincache-ucache-exists.php
 * @param string $key The key that was used to store the variable in the cache. key is case sensitive.
 * @return bool Returns TRUE if variable with the key exitsts, otherwise returns FALSE.
 */
function wincache_ucache_exists($key) {}

/**
 * (PHP 5.2+; PECL wincache &gt;= 1.1.0)<br/>
 * Gets a variable stored in the user cache.
 * @link https://secure.php.net/manual/en/function.wincache-ucache-get.php
 * @param string|string[] $key <p>The key that was used to store the variable in the cache.
 * key is case sensitive. key can be an array of keys. In this case the return
 * value will be an array of values of each element in the key array.</p>
 * @param bool|null &$success [optional]
 * <p>Will be set to TRUE on success and FALSE on failure.</p>
 * @return mixed <p>If key is a string, the function returns the value of the variable
 * stored with that key. The success is set to TRUE on success and to FALSE on failure.</p>
 * <p>The key is an array, the parameter success is always set to TRUE. The returned array
 * (name =&gt; value pairs) will contain only those name =&gt; value pairs for which the get
 * operation in user cache was successful. If none of the keys in the key array finds a
 * match in the user cache an empty array will be returned.</p>
 */
function wincache_ucache_get($key, &$success) {}

/**
 * (PHP 5.2+; PECL wincache &gt;= 1.1.0)<br/>
 * Increments the value associated with the key by 1 or as specified by inc_by.
 * @link https://secure.php.net/manual/en/function.wincache-ucache-inc.php
 * @param string $key <p>The key that was used to store the variable in the cache.
 * key is case sensitive.</p>
 * @param int $inc_by <p>The value by which the variable associated with the key will
 * get incremented. If the argument is a floating point number it will be truncated
 * to nearest integer. The variable associated with the key should be of type long,
 * otherwise the function fails and returns FALSE.</p>
 * @param bool|null &$success [optional]
 * <p>Will be set to TRUE on success and FALSE on failure.</p>
 * @return int|false Returns the incremented value on success and FALSE on failure.
 */
function wincache_ucache_inc($key, $inc_by = 1, &$success) {}

/**
 * (PHP 5.2+; PECL wincache &gt;= 1.1.0)<br/>
 * Retrieves information about data stored in the user cache.
 * @link https://secure.php.net/manual/en/function.wincache-ucache-info.php
 * @param bool $summaryonly [optional]
 * <p>Controls whether the returned array will contain information about
 * individual cache entries along with the user cache summary.</p>
 * @param null|string $key [optional]
 * <p>The key of an entry in the user cache. If specified then the returned array
 * will contain information only about that cache entry. If not specified and
 * summaryonly is set to false then the returned array will contain information
 * about all entries in the cache.</p>
 * @return array|false Array of meta data about user cache or FALSE on failure
 * <p>The array returned by this function contains the following elements:
 * <ul>
 * <li><em>total_cache_uptime</em> - total time in seconds that the user cache has been active</li>
 * <li><em>total_item_count</em> - total number of elements that are currently in the user cache</li>
 * <li><em>is_local_cache</em> - true is the cache metadata is for a local cache instance, false
 * if the metadata is for the global cache</li>
 * <li><em>total_hit_count</em> - number of times the data has been served from the cache</li>
 * <li><em>total_miss_count</em> - number of times the data has not been found in the cache</li>
 * <li><em>ucache_entries</em> - an array that contains the information about all the cached items:
 * <ul>
 * <li><em>key_name</em> - name of the key which is used to store the data</li>
 * <li><em>value_type</em> - type of value stored by the key</li>
 * <li><em>use_time</em> - time in seconds since the file has been accessed in the opcode cache</li>
 * <li><em>last_check</em> - time in seconds since the file has been checked for modifications</li>
 * <li><em>is_session</em> - indicates if the data is a session variable</li>
 * <li><em>ttl_seconds</em> - time remaining for the data to live in the cache, 0 meaning infinite</li>
 * <li><em>age_seconds</em> - time elapsed from the time data has been added in the cache</li>
 * <li><em>hitcount</em> - number of times data has been served from the cache</li>
 * </ul></li>
 * </ul></p>
 */
function wincache_ucache_info(bool $summaryonly = false, $key = null) {}

/**
 * (PHP 5.2+; PECL wincache &gt;= 1.1.0)<br/>
 * Retrieves information about memory usage by user cache.
 * @link https://secure.php.net/manual/en/function.wincache-ucache-meminfo.php
 * @return array|false Array of meta data about user cache memory usage or FALSE on failure
 * <p>The array returned by this function contains the following elements:
 * <ul>
 * <li><em>memory_total</em> - amount of memory in bytes allocated for the user cache</li>
 * <li><em>memory_free</em> - amount of free memory in bytes available for the user cache</li>
 * <li><em>num_used_blks</em> - number of memory blocks used by the user cache</li>
 * <li><em>num_free_blks</em> - number of free memory blocks available for the user cache</li>
 * <li><em>memory_overhead</em> - amount of memory in bytes used for the user cache internal structures</li>
 * </ul></p>
 */
function wincache_ucache_meminfo() {}

/**
 * (PHP 5.2+; PECL wincache &gt;= 1.1.0)<br/>
 * Adds a variable in user cache and overwrites a variable if it already exists in the cache.
 * <p>The added or updated variable remains in the user cache unless its time to
 * live expires or it is deleted by using wincache_ucache_delete() or
 * wincache_ucache_clear() functions.</p>
 * @link https://secure.php.net/manual/en/function.wincache-ucache-set.php
 * @param string|string[] $key <p>
 * Store the variable using this key name. If a variable with same key is already
 * present the function will overwrite the previous value with the new one. key
 * is case sensitive. key can also take array of name =&gt; value pairs where
 * names will be used as keys. This can be used to add multiple values in the
 * cache in one operation, thus avoiding race condition.</p>
 * @param mixed $value <p>
 * Value of a variable to store. Value supports all data types except resources,
 * such as file handles. This parameter is ignored if first argument is an array.
 * A general guidance is to pass NULL as value while using array as key.</p>
 * @param int $ttl [optional]<p>
 * Time for the variable to live in the cache in seconds. After the value specified
 * in ttl has passed the stored variable will be deleted from the cache. This
 * parameter takes a default value of 0 which means the variable will stay in the
 * cache unless explicitly deleted by using wincache_ucache_delete() or
 * wincache_ucache_clear() functions.</p>
 * @return bool <p>
 * If key is string, the function returns TRUE on success and FALSE on failure.</p>
 * <p>If key is an array, the function returns:
 * <ul style="list-style: square;">
 * <li>If all the name =&gt; value pairs in the array can be set, function
 * returns an empty array;</li>
 * <li>If all the name =&gt; value pairs in the array cannot be set, function
 * returns FALSE;</li>
 * <li>If some can be set while others cannot, function returns an array with
 * name=&gt;value pair for which the addition failed in the user cache.</li>
 * </ul></p>
 */
function wincache_ucache_set($key, $value, $ttl = 0) {}

/**
 * (PHP 5.2+; PECL wincache &gt;= 1.1.0)<br/>
 * Releases an exclusive lock that was obtained on a given key by using wincache_lock().
 * <p>If any other process was blocked waiting for the lock on this key, that process will be able to obtain the lock.</p>
 * @link https://secure.php.net/manual/en/function.wincache-unlock.php
 * @param string $key Name of the key in the cache to release the lock on.
 * @return bool Returns TRUE on success or FALSE on failure.
 */
function wincache_unlock($key) {}
<?php

/**
 * PHP Data Structure stubs, a PECL extension
 * @version 1.0.0
 * @author Dominic Guhl <dominic.guhl@posteo.de>
 * @copyright © 2019 PHP Documentation Group
 * @license CC-BY 3.0, https://www.php.net/manual/en/cc.license.php
 */

namespace Ds;

    use ArrayAccess;
    use Countable;
    use IteratorAggregate;
    use JsonSerializable;
    use OutOfBoundsException;
    use OutOfRangeException;
    use Traversable;
    use UnderflowException;

    /**
     * Collection is the base interface which covers functionality common to all
     * the data structures in this library. It guarantees that all structures
     * are traversable, countable, and can be converted to json using
     * json_encode().
     * @package Ds
     *
     * @template-covariant TKey
     * @template-covariant TValue
     * @extends IteratorAggregate<TKey, TValue>
     */
    interface Collection extends Countable, IteratorAggregate, JsonSerializable
    {
        /**
         * Removes all values from the collection.
         * @link https://www.php.net/manual/en/ds-collection.clear.php
         */
        public function clear(): void;

        /**
         * Returns a shallow copy of the collection.
         * @link https://www.php.net/manual/en/ds-collection.copy.php
         * @return Collection<TKey, TValue>
         */
        public function copy();

        /**
         * Returns whether the collection is empty.
         * @link https://www.php.net/manual/en/ds-collection.isempty.php
         * @return bool
         */
        public function isEmpty(): bool;

        /**
         * Converts the collection to an array.
         * <p><b>Note:</b> Casting to an array is not supported yet.</p>
         * @link https://www.php.net/manual/en/ds-collection.toarray.php
         * @return array<TValue> An array containing all the values in the same order as
         * the collection.
         */
        public function toArray(): array;
    }

    /**
     * Hashable is an interface which allows objects to be used as keys. It’s
     * an alternative to spl_object_hash(), which determines an object’s hash
     * based on its <b>handle:</b> this means that two objects that are considered
     * equal by an implicit definition would not treated as equal because they
     * are not the same instance.
     *
     * hash() is used to return a scalar value to be used as the object's hash
     * value, which determines where it goes in the hash table. While this value
     * does not have to be unique, objects which are equal must have the same
     * hash value.
     *
     * equals() is used to determine if two objects are equal. It's guaranteed
     * that the comparing object will be an instance of the same class as the
     * subject.
     * @package Ds
     */
    interface Hashable
    {
        /**
         * Determines whether another object is equal to the current instance.
         *
         * This method allows objects to be used as keys in structures such as
         * Ds\Map and Ds\Set, or any other lookup structure that honors this
         * interface.
         *
         * <b>Note:</b> It's guaranteed that $obj is an instance of the same class.
         *
         * <b>Caution:</b> It's important that objects which are equal also have the
         * same hash value.
         * @see https://www.php.net/manual/en/ds-hashable.hash.php
         * @link https://www.php.net/manual/en/ds-hashable.equals.php
         * @param object $obj The object to compare the current instance to,
         * which is always an instance of the same class.
         *
         * @return bool True if equal, false otherwise.
         */
        public function equals($obj): bool;

        /**
         * Returns a scalar value to be used as the hash value of the objects.
         *
         * While the hash value does not define equality, all objects that are
         * equal according to Ds\Hashable::equals() must have the same hash
         * value. Hash values of equal objects don't have to be unique, for
         * example you could just return TRUE for all objects and nothing
         * would break - the only implication would be that hash tables then
         * turn into linked lists because all your objects will be hashed to
         * the same bucket. It's therefore very important that you pick a good
         * hash value, such as an ID or email address.
         *
         * This method allows objects to be used as keys in structures such as
         * Ds\Map and Ds\Set, or any other lookup structure that honors this
         * interface.
         *
         * <b>Caution:</b> Do not pick a value that might change within the object,
         * such as a public property. Hash table lookups would fail because
         * the hash has changed.
         *
         * <b>Caution:</b> All objects that are equal must have the same hash value.
         *
         * @return mixed A scalar value to be used as this object's hash value.
         * @link https://www.php.net/manual/en/ds-hashable.hash.php
         */
        public function hash();
    }

    /**
     * A Sequence describes the behaviour of values arranged in a single,
     * linear dimension. Some languages refer to this as a "List". It’s
     * similar to an array that uses incremental integer keys, with the
     * exception of a few characteristics:
     * <ul>
     * <li>Values will always be indexed as [0, 1, 2, …, size - 1].</li>
     * <li>Only allowed to access values by index in the range [0, size - 1].</li>
     * </ul>
     * <br>
     * Use cases:
     * <ul>
     * <li>Wherever you would use an array as a list (not concerned with keys).</li>
     * <li>A more efficient alternative to SplDoublyLinkedList and SplFixedArray.</li>
     * </ul>
     * @package Ds
     * @template TValue
     * @extends Collection<int, TValue>
     */
    interface Sequence extends Collection, ArrayAccess
    {
        /**
         * Ensures that enough memory is allocated for a required capacity.
         * This removes the need to reallocate the internal as values are added.
         *
         * @param int $capacity The number of values for which capacity should
         * be allocated.<p><b>Note:</b> Capacity will stay the same if this value is
         * less than or equal to the current capacity.</p>
         * @link https://www.php.net/manual/en/ds-sequence.allocate.php
         */
        public function allocate(int $capacity): void;

        /**
         * Updates all values by applying a callback function to each value in
         * the sequence.
         * @param callable(TValue): TValue $callback A callable to apply to each value in the
         * sequence. The callback should return what the value should be
         * replaced by.
         * <code>callback ( mixed $value ) : mixed</code>
         * @link https://www.php.net/manual/en/ds-sequence.apply.php
         */
        public function apply(callable $callback): void;

        /**
         * Returns the current capacity.
         * @return int The current capacity.
         * @link https://www.php.net/manual/en/ds-sequence.capacity.php
         */
        public function capacity(): int;

        /**
         * Determines if the sequence contains all values.
         * @param TValue ...$values Values to check.
         * @return bool FALSE if any of the provided values are not in the
         * sequence, TRUE otherwise.
         * @link https://www.php.net/manual/en/ds-sequence.contains.php
         */
        public function contains(...$values): bool;

        /**
         * Creates a new sequence using a callable to determine which values
         * to include.
         * @param null|callable(TValue): bool $callback Optional callable which returns TRUE if the
         * value should be included, FALSE otherwise. If a callback is not
         * provided, only values which are TRUE (see converting to boolean) will
         * be included.
         * <code>callback ( mixed $value ) : bool</code>
         * @return Sequence<TValue> A new sequence containing all the values for which
         * either the callback returned TRUE, or all values that convert to
         * TRUE if a callback was not provided.
         * @link https://www.php.net/manual/en/ds-sequence.filter.php
         */
        public function filter(?callable $callback = null);

        /**
         * Returns the index of the value, or FALSE if not found.
         * @param TValue $value The value to find.
         * @return int|false The index of the value, or FALSE if not found.
         * @link https://www.php.net/manual/en/ds-sequence.find.php
         */
        public function find($value);

        /**
         * Returns the first value in the sequence.
         * @return TValue The first value in the sequence.
         * @throws UnderflowException if empty.
         * @link https://www.php.net/manual/en/ds-sequence.first.php
         */
        public function first();

        /**
         * Returns the value at a given index.
         * @param int $index The index to access, starting at 0.
         * @return TValue The value at the requested index.
         * @throws OutOfRangeException if the index is not valid.
         * @link https://www.php.net/manual/en/ds-sequence.get.php
         */
        public function get(int $index);

        /**
         * Inserts values into the sequence at a given index.
         *
         * @param int $index The index at which to insert. 0 <= index <= count
         * <p><b>Note:</b> You can insert at the index equal to the number of values.</p>
         * @param TValue ...$values The value or values to insert.
         * @throws OutOfRangeException if the index is not valid.
         * @link https://www.php.net/manual/en/ds-sequence.insert.php
         */
        public function insert(int $index, ...$values): void;

        /**
         * Joins all values together as a string using an optional separator
         * between each value.
         * @param string $glue An optional string to separate each value.
         * @return string All values of the sequence joined together as a
         * string.
         * @link https://www.php.net/manual/en/ds-sequence.join.php
         */
        public function join(string $glue = ''): string;

        /**
         * Returns the last value in the sequence.
         * @return TValue The last value in the sequence.
         * @throws UnderflowException if empty.
         * @link https://www.php.net/manual/en/ds-sequence.last.php
         */
        public function last();

        /**
         * Returns the result of applying a callback function to each value in
         * the sequence.
         * @template TNewValue
         * @param callable(TValue): TNewValue $callback A callable to apply to each value in the
         * sequence.
         * The callable should return what the new value will be in the new
         * sequence.
         * <code>callback ( mixed $value ) : mixed</code>
         * @return Sequence<TNewValue> The result of applying a callback to each value in
         * the sequence.<p><b>Note:</b> The values of the current instance won't be
         * affected.</p>
         * @link https://www.php.net/manual/en/ds-sequence.map.php
         */
        public function map(callable $callback): Sequence;

        /**
         * Returns the result of adding all given values to the sequence.
         * @template TValue2
         * @param iterable<TValue2> $values A traversable object or an array.
         * @return Sequence<TValue|TValue2> The result of adding all given values to the
         * sequence, effectively the same as adding the values to a copy,
         * then returning that copy.
         * @link https://www.php.net/manual/en/ds-sequence.merge.php
         */
        public function merge($values): Sequence;

        /**
         * Removes and returns the last value.
         * @return TValue The removed last value.
         * @throws UnderflowException if empty.
         * @link https://www.php.net/manual/en/ds-sequence.pop.php
         */
        public function pop();

        /**
         * Adds values to the end of the sequence.
         * @param TValue ...$values The values to add.
         */
        public function push(...$values): void;

        /**
         * Reduces the sequence to a single value using a callback function.
         * @template TCarry
         * @param callable(TCarry, TValue): TCarry $callback <p>
         * <code>
         * callback ( mixed $carry , mixed $value ) : mixed</code>
         * <b>$carry</b> The return value of the previous callback, or initial if it's
         * the first iteration.<br>
         * <b>$value</b> The value of the current iteration.
         * </p>
         * @param TCarry $initial The initial value of the carry value. Can be NULL.
         * @return TCarry The return value of the final callback.
         * @link https://www.php.net/manual/en/ds-sequence.reduce.php
         */
        public function reduce(callable $callback, $initial = null);

        /**
         * Removes and returns a value by index.
         * @param int $index The index of the value to remove.
         * @return TValue The value that was removed.
         * @link https://www.php.net/manual/en/ds-sequence.remove.php
         */
        public function remove(int $index);

        /**
         * Reverses the sequence in-place.
         * @link https://www.php.net/manual/en/ds-sequence.reverse.php
         */
        public function reverse(): void;

        /**
         * Returns a reversed copy of the sequence.
         * @return Sequence<TValue> A reversed copy of the sequence.
         * <p><b>Note:</b> The current instance is not affected.</p>
         */
        public function reversed();

        /**
         * Rotates the sequence by a given number of rotations, which is
         * equivalent to successively calling
         * $sequence->push($sequence->shift()) if the number of rotations is
         * positive, or $sequence->unshift($sequence->pop()) if negative.
         * @param int $rotations The number of times the sequence should be
         * rotated.
         * @link https://www.php.net/manual/en/ds-sequence.rotate.php
         */
        public function rotate(int $rotations): void;

        /**
         * Updates a value at a given index.
         * @param int $index The index of the value to update.
         * @param TValue $value The new value.
         * @throws OutOfRangeException if the index is not valid.
         * @link https://www.php.net/manual/en/ds-sequence.set.php
         */
        public function set(int $index, $value): void;

        /**
         * Removes and returns the first value.
         * @return TValue
         * @throws UnderflowException if empty.
         * @link https://www.php.net/manual/en/ds-sequence.shift.php
         */
        public function shift();

        /**
         * Creates a sub-sequence of a given range.
         * @param int $index The index at which the sub-sequence starts.
         * If positive, the sequence will start at that index in the sequence.
         * If negative, the sequence will start that far from the end.
         * @param int|null $length If a length is given and is positive, the
         * resulting sequence will have up to that many values in it. If the
         * length results in an overflow, only values up to the end of the
         * sequence will be included. If a length is given and is negative,
         * the sequence will stop that many values from the end. If a length
         * is not provided, the resulting sequence will contain all values
         * between the index and the end of the sequence.
         * @return Sequence<TValue> A sub-sequence of the given range.
         * @link https://www.php.net/manual/en/ds-sequence.slice.php
         */
        public function slice(int $index, int $length = null);

        /**
         * Sorts the sequence in-place, using an optional comparator function.
         * @param callable(TValue, TValue): int|null $comparator The comparison function must return
         * an integer less than, equal to, or greater than zero if the first
         * argument is considered to be respectively less than, equal to, or
         * greater than the second. Note that before PHP 7.0.0 this integer had
         * to be in the range from -2147483648 to 2147483647.<p>
         * <code>callback ( mixed $a, mixed $b ) : int</code></p>
         * <p><b>Caution:</b> Returning non-integer values from the comparison
         * function, such as float, will result in an internal cast to integer
         * of the callback's return value. So values such as 0.99 and 0.1 will
         * both be cast to an integer value of 0, which will compare such
         * values as equal.</p>
         * @link https://www.php.net/manual/en/ds-sequence.sort.php
         */
        public function sort(?callable $comparator = null): void;

        /**
         * Returns a sorted copy, using an optional comparator function.
         * @param callable(TValue, TValue): int|null $comparator The comparison function must return
         * an integer less than, equal to, or greater than zero if the first
         * argument is considered to be respectively less than, equal to, or
         * greater than the second. Note that before PHP 7.0.0 this integer had
         * to be in the range from -2147483648 to 2147483647.<p>
         * <code>callback ( mixed $a, mixed $b ) : int</code></p>
         * <p><b>Caution:</b> Returning non-integer values from the comparison
         * function, such as float, will result in an internal cast to integer
         * of the callback's return value. So values such as 0.99 and 0.1 will
         * both be cast to an integer value of 0, which will compare such
         * values as equal.</p>
         * @return Sequence<TValue> Returns a sorted copy of the sequence.
         * @link https://www.php.net/manual/en/ds-sequence.sort.php
         */
        public function sorted(?callable $comparator = null);

        /**
         * Returns the sum of all values in the sequence.
         * <p><b>Note:</b> Arrays and objects are considered equal to zero when
         * calculating the sum.</p>
         * @return float|int The sum of all the values in the sequence as
         * either a float or int depending on the values in the sequence.
         */
        public function sum(): float|int;

        /**
         * Adds values to the front of the sequence, moving all the current
         * values forward to make room for the new values.
         * @param TValue ...$values The values to add to the front of the sequence.
         * <p><b>Note:</b> Multiple values will be added in the same order that they
         * are passed.</p>
         */
        public function unshift(...$values): void;
    }

    /**
     * A Vector is a sequence of values in a contiguous buffer that grows and
     * shrinks automatically. It’s the most efficient sequential structure
     * because a value’s index is a direct mapping to its index in the buffer,
     * and the growth factor isn't bound to a specific multiple or exponent.
     * <br><br>
     * <p>
     * <h3>Strengths
     * <ul>
     * <li>Supports array syntax (square brackets).</li>
     * <li>Uses less overall memory than an array for the same number of values.</li>
     * <li>Automatically frees allocated memory when its size drops low enough.</li>
     * <li>Capacity does not have to be a power of 2.</li>
     * <li>get(), set(), push(), pop() are all O(1)</li>
     * </ul>
     * </p>
     * <h3>Weaknesses
     * <ul>
     * <li>shift(), unshift(), insert() and remove() are all O(n).</li>
     * </ul>
     *
     * @link https://www.php.net/manual/en/class.ds-vector.php
     *
     * @package Ds
     * @template TValue
     * @implements Sequence<TValue>
     */
    class Vector implements Sequence
    {
        public const MIN_CAPACITY = 10;

        /**
         * Creates a new instance, using either a traversable object or an array for the initial values.
         *
         * @param array<TValue> $values
         */
        public function __construct($values = []) {}

        /**
         * Ensures that enough memory is allocated for a required capacity.
         * This removes the need to reallocate the internal as values are added.
         * @param int $capacity The number of values for which capacity should
         * be allocated.
         * <p><b>Note:</b> Capacity will stay the same if this value is less than or
         * equal to the current capacity.</p>
         * @link https://www.php.net/manual/en/ds-vector.allocate.php
         */
        public function allocate(int $capacity): void {}

        /**
         * Updates all values by applying a callback function to each value in
         * the vector.
         * @param callable(TValue): TValue $callback
         * <code>callback ( mixed $value ) : mixed</code>
         * A callable to apply to each value in the vector. The callback should
         * return what the value should be replaced by.
         * @link https://www.php.net/manual/en/ds-vector.apply.php
         */
        public function apply(callable $callback): void {}

        /**
         * Returns the current capacity.
         * @return int The current capacity.
         * @link https://www.php.net/manual/en/ds-vector.capacity.php
         */
        public function capacity(): int {}

        /**
         * Removes all values from the vector.
         * @link https://www.php.net/manual/en/ds-vector.clear.php
         */
        public function clear(): void {}

        /**
         * Determines if the vector contains all values.
         * @param TValue ...$values Values to check.
         * @return bool FALSE if any of the provided values are not in the
         * vector, TRUE otherwise.
         * @link https://www.php.net/manual/en/ds-vector.contains.php
         */
        public function contains(...$values): bool {}

        /**
         *Returns a shallow copy of the vector.
         * @return Vector<TValue> Returns a shallow copy of the vector.
         */
        public function copy(): Vector {}

        /**
         * Creates a new vector using a callable to determine which values to
         * include.
         *
         * @param null|callable(TValue): bool $callback
         * Optional callable which returns TRUE if the value should be included,
         * FALSE otherwise. If a callback is not provided, only values which are
         * TRUE (see converting to boolean)  will be included.
         * <code>callback ( mixed $value ) : bool</code>
         * @return Vector<TValue> A new vector containing all the values for which
         * either the callback returned TRUE, or all values that convert to
         * TRUE if a callback was not provided.
         * @link https://www.php.net/manual/en/ds-vector.filter.php
         */
        public function filter(?callable $callback = null): Vector {}

        /**
         * Returns the index of the value, or FALSE if not found.
         * @param TValue $value The value to find.
         * @return int|false The index of the value, or FALSE if not found.
         * <p><b>Note:</b> Values will be compared by value and by type.</p>
         * @link https://www.php.net/manual/en/ds-vector.find.php
         */
        public function find($value) {}

        /**
         * Returns the first value in the vector.
         * @return TValue
         * @throws UnderflowException if empty.
         * @link https://www.php.net/manual/en/ds-vector.first.php
         */
        public function first() {}

        /**
         * Returns the value at a given index.
         * @param int $index The index to access, starting at 0.
         * @return TValue
         * @link https://www.php.net/manual/en/ds-vector.get.php
         */
        public function get(int $index) {}

        public function getIterator(): Traversable {}

        /**
         * Inserts values into the sequence at a given index.
         *
         * @param int $index The index at which to insert. 0 <= index <= count
         * Note:<br>
         * You can insert at the index equal to the number of values.
         * @param array<TValue> ...$values The value or values to insert.
         * @link https://www.php.net/manual/en/ds-vector.insert.php
         */
        public function insert(int $index, ...$values): void {}

        /**
         * Joins all values together as a string using an optional separator between each value.
         *
         * @param string|null $glue An optional string to separate each value.
         * @return string All values of the sequence joined together as a string.
         * @link https://www.php.net/manual/en/ds-vector.join.php
         */
        public function join(?string $glue = null): string {}

        /**
         * Returns the last value in the sequence.
         *
         * @return TValue The last value in the sequence.
         * @link https://www.php.net/manual/en/ds-vector.last.php
         */
        public function last() {}

        /**
         * Returns the result of applying a callback function to each value in the sequence.
         *
         * @template TNewValue
         * @param callable(TValue): TNewValue $callback A callable to apply to each value in the sequence.
         * <br>The callable should return what the new value will be in the new sequence.
         *
         * @return Vector<TNewValue>
         * @link https://www.php.net/manual/en/ds-vector.map.php
         */
        public function map(callable $callback): Vector {}

        /**
         * Returns the result of adding all given values to the sequence.
         *
         * @template TValue2
         * @param iterable<TValue2> $values A traversable object or an array.
         * @return Vector<TValue|TValue2> The result of adding all given values to the sequence, effectively the same as adding the
         * values to a copy, then returning that copy.<br>
         * Note:<br>
         * The current instance won't be affected.
         * @link https://www.php.net/manual/en/ds-vector.merge.php
         */
        public function merge($values): Vector {}

        /**
         * Removes and returns the last value.
         *
         * @return TValue
         * @link https://www.php.net/manual/en/ds-vector.pop.php
         */
        public function pop() {}

        /**
         * Adds values to the end of the sequence.
         * @param TValue ...$values
         * @link https://www.php.net/manual/en/ds-vector.push.php
         */
        public function push(...$values): void {}

        /**
         * Reduces the sequence to a single value using a callback function.
         * @template TCarry
         * @param callable(TCarry, TValue): TCarry $callback <br>
         * <code>callback ( mixed $carry , mixed $value ) : mixed</code><br>
         * <b>carry</b> The return value of the previous callback, or initial if it's the first iteration.<br>
         * <b>value</b> The value of the current iteration.
         * @param TCarry $initial The initial value of the carry value. Can be NULL.
         *
         * @return TCarry The return value of the final callback.
         *
         * @link https://www.php.net/manual/en/ds-vector.reduce.php
         */
        public function reduce(callable $callback, $initial = null) {}

        /**
         * Removes and returns a value by index.
         * @param int $index The index of the value to remove.
         * @return TValue The value that was removed.
         * @link https://www.php.net/manual/en/ds-vector.remove.php
         */
        public function remove(int $index) {}

        /**
         * Reverses the sequence in-place.
         * @link https://www.php.net/manual/en/ds-vector.reverse.php
         */
        public function reverse(): void {}

        /**
         * Returns a reversed copy of the sequence.
         * @return Vector<TValue> A reversed copy of the sequence.<br>
         * <b>Note:</b> The current instance is not affected.
         * @link https://www.php.net/manual/en/ds-vector.reversed.php
         */
        public function reversed(): Vector {}

        /**
         * Rotates the sequence by a given number of rotations, which is
         * equivalent to successively calling $sequence->push($sequence->shift())
         * if the number of rotations is positive, or $sequence->unshift($sequence->pop())
         * if negative.
         *
         * @link https://www.php.net/manual/en/ds-vector.rotate.php
         *
         * @param int $rotations The number of times the sequence should be rotated.
         */
        public function rotate(int $rotations): void {}

        /**
         * Updates a value at a given index.
         *
         * @link https://www.php.net/manual/en/ds-vector.set.php
         *
         * @param int $index The index of the value to update.
         * @param TValue $value The new value.
         *
         * @throws OutOfRangeException if the index is not valid.
         */
        public function set(int $index, $value): void {}

        /**
         * Removes and returns the first value.
         *
         * @link https://www.php.net/manual/en/ds-vector.shift.php
         *
         * @return TValue The first value, which was removed.
         * @throws UnderflowException if empty.
         */
        public function shift() {}

        /**
         * Creates a sub-sequence of a given range.
         * @link https://www.php.net/manual/en/ds-vector.slice.php
         * @param int $index The index at which the sub-sequence starts. If
         * positive, the sequence will start at that
         * index in the sequence. If negative, the sequence will start that
         * far from the end.
         * @param int|null $length If a length is given and is positive, the
         * resulting sequence will have up to that many values in it. If the
         * length results in an overflow, only values up to the end of the
         * sequence will be included. If a length is given and is negative,
         * the sequence will stop that many values from the end. If a length
         * is not provided, the resulting sequence will contain all values
         * between the index and the end of the sequence.
         * @return Vector<TValue>
         */
        public function slice(int $index, int $length = null): Vector {}

        /**
         * Sorts the sequence in-place, using an optional comparator function.
         * @link https://www.php.net/manual/en/ds-vector.sort.php
         * @param callable(TValue, TValue): int|null $comparator The comparison function must return an
         * integer less than, equal to, or greater
         * than zero if the first argument is considered to be respectively less than, equal to, or greater than the
         * second. Note that before PHP 7.0.0 this integer had to be in the
         * range from -2147483648 to 2147483647.<br>
         * <code>callback ( mixed $a, mixed $b ) : int</code>
         * <b>Caution:</b> Returning non-integer values from the comparison function,
         * such as float, will result in an
         * internal cast to integer of the callback's return value. So values
         * such as 0.99 and 0.1 will both be cast to an integer value of 0,
         * which will compare such values as equal.
         */
        public function sort(?callable $comparator = null): void {}

        /**
         * Returns a sorted copy, using an optional comparator function.
         * @link https://www.php.net/manual/en/ds-vector.sorted.php
         * @param callable(TValue, TValue): int|null $comparator The comparison function must return an integer less than, equal to, or
         * greater  than zero if the first argument is considered to be respectively less than, equal to, or greater
         * than the second. Note that before PHP 7.0.0 this integer had to be in the range from -2147483648 to
         * 2147483647.<br>
         * <code>callback ( mixed $a, mixed $b ) : int</code>
         * <b>Caution:</b> Returning non-integer values from the comparison function, such as float, will result in an
         * internal cast to integer of the callback's return value. So values such as 0.99 and 0.1 will both be cast to
         * an integer value of 0, which will compare such values as equal.
         * @return Vector<TValue> Returns a sorted copy of the sequence.
         */
        public function sorted(?callable $comparator = null): Vector {}

        /**
         * Returns the sum of all values in the sequence.<br>
         * <b>Note:</b> Arrays and objects are considered equal to zero when
         * calculating the sum.
         * @link https://www.php.net/manual/en/ds-vector.sum.php
         * @return float
         */
        public function sum(): float {}

        /**
         * Adds values to the front of the sequence, moving all the current
         * values forward to make room for the new values.
         * @param TValue ...$values The values to add to the front of the sequence.<br>
         * <b>Note:</b> Multiple values will be added in the same order that they are
         * passed.
         * @link https://www.php.net/manual/en/ds-vector.unshift.php
         */
        public function unshift($values): void {}

        /**
         * Count elements of an object
         * @link https://php.net/manual/en/ds-vector.count.php
         * @return int The custom count as an integer.
         * <p>
         * The return value is cast to an integer.
         * </p>
         * @since 5.1
         */
        public function count(): int {}

        /**
         * Returns whether the collection is empty.
         * @link https://www.php.net/manual/en/ds-vector.isempty.php
         * @return bool
         */
        public function isEmpty(): bool {}

        /**
         * Converts the collection to an array.
         * <p><b>Note:</b> Casting to an array is not supported yet.</p>
         * @link https://www.php.net/manual/en/ds-vector.toarray.php
         * @return array<TValue> An array containing all the values in the same order as
         * the collection.
         */
        public function toArray(): array {}

        /**
         * Specify data which should be serialized to JSON
         * @link https://php.net/manual/en/ds-vector.jsonserialize.php
         * @return mixed data which can be serialized by <b>json_encode</b>,
         * which is a value of any type other than a resource.
         * @since 5.4
         */
        public function jsonSerialize() {}

        /**
         * @param int $offset
         */
        public function offsetExists(mixed $offset): bool {}

        /**
         * @param int $offset
         *
         * @return TValue
         */
        public function offsetGet(mixed $offset) {}

        /**
         * @param int $offset
         * @param TValue $value
         */
        public function offsetSet(mixed $offset, mixed $value) {}

        /**
         * @param int $offset
         */
        public function offsetUnset(mixed $offset): void {}
    }

    /**
     * @template TValue
     * @implements Sequence<TValue>
     */
    class Deque implements Sequence
    {
        /**
         * Creates a new instance, using either a traversable object or an array for the initial values.
         * @param TValue ...$values A traversable object or an array to use for the initial values.
         *
         * @link https://www.php.net/manual/en/ds-deque.construct.php
         */
        public function __construct(...$values) {}

        /**
         * Count elements of an object
         * @link https://php.net/manual/en/countable.count.php
         * @return int The custom count as an integer.
         * <p>
         * The return value is cast to an integer.
         * </p>
         * @since 5.1
         */
        public function count(): int {}

        /**
         * Removes all values from the deque.
         * @link https://www.php.net/manual/en/ds-deque.clear.php
         */
        public function clear(): void {}

        /**
         * Returns a shallow copy of the deque.
         * @link https://www.php.net/manual/en/ds-deque.copy.php
         * @return Deque<TValue>
         */
        public function copy(): Collection {}

        public function getIterator(): Traversable {}

        /**
         * Returns whether the deque is empty.
         * @link https://www.php.net/manual/en/ds-deque.isempty.php
         * @return bool
         */
        public function isEmpty(): bool {}

        /**
         * Converts the deque to an array.
         * <p><b>Note:</b> Casting to an array is not supported yet.</p>
         * @link https://www.php.net/manual/en/ds-deque.toarray.php
         * @return array<TValue> An array containing all the values in the same order as
         * the deque.
         */
        public function toArray(): array {}

        /**
         * Ensures that enough memory is allocated for a required capacity.
         * This removes the need to reallocate the internal as values are added.
         *
         * @param int $capacity The number of values for which capacity should
         * be allocated.<p><b>Note:</b> Capacity will stay the same if this value is
         * less than or equal to the current capacity.</p>
         * <p><b>Note:</b> Capacity will always be rounded up to the nearest power of 2.</p>
         * @link https://www.php.net/manual/en/ds-deque.allocate.php
         */
        public function allocate(int $capacity): void {}

        /**
         * Updates all values by applying a callback function to each value in
         * the deque.
         * @param callable(TValue): TValue $callback A callable to apply to each value in the
         * deque. The callback should return what the value should be
         * replaced by.<p>
         * <code>callback ( mixed $value ) : mixed</code>
         * </p>
         * @link https://www.php.net/manual/en/ds-deque.apply.php
         */
        public function apply(callable $callback): void {}

        /**
         * Returns the current capacity.
         * @return int The current capacity.
         * @link https://www.php.net/manual/en/ds-deque.capacity.php
         */
        public function capacity(): int {}

        /**
         * Determines if the deque contains all values.
         * @param TValue $values Values to check.
         * @return bool FALSE if any of the provided values are not in the
         * deque, TRUE otherwise.
         * @link https://www.php.net/manual/en/ds-deque.contains.php
         */
        public function contains(...$values): bool {}

        /**
         * Creates a new deque using a callable to determine which values
         * to include.
         * @param null|callable(TValue): bool $callback Optional callable which returns TRUE if the
         * value should be included, FALSE otherwise. If a callback is not
         * provided, only values which are TRUE (see converting to boolean) will
         * be included.<p>
         * <code>callback ( mixed $value ) : bool</code>
         * </p>
         * @return Deque<TValue> A new deque containing all the values for which
         * either the callback returned TRUE, or all values that convert to
         * TRUE if a callback was not provided.
         * @link https://www.php.net/manual/en/ds-deque.filter.php
         */
        public function filter(?callable $callback = null): Deque {}

        /**
         * Returns the index of the value, or FALSE if not found.
         * @param TValue $value The value to find.
         * @return int|false The index of the value, or FALSE if not found.
         * @link https://www.php.net/manual/en/ds-deque.find.php
         */
        public function find($value) {}

        /**
         * Returns the first value in the deque.
         * @return TValue The first value in the deque.
         * @throws UnderflowException if empty.
         * @link https://www.php.net/manual/en/ds-deque.first.php
         */
        public function first() {}

        /**
         * Returns the value at a given index.
         * @param int $index The index to access, starting at 0.
         * @return TValue The value at the requested index.
         * @throws OutOfRangeException if the index is not valid.
         * @link https://www.php.net/manual/en/ds-deque.get.php
         */
        public function get(int $index) {}

        /**
         * Inserts values into the deque at a given index.
         *
         * @param int $index The index at which to insert. 0 <= index <= count
         * <p><b>Note:</b> You can insert at the index equal to the number of values.</p>
         * @param TValue ...$values The value or values to insert.
         * @throws OutOfRangeException if the index is not valid.
         * @link https://www.php.net/manual/en/ds-deque.insert.php
         */
        public function insert(int $index, ...$values): void {}

        /**
         * Joins all values together as a string using an optional separator
         * between each value.
         * @param string $glue An optional string to separate each value.
         * @return string All values of the deque joined together as a
         * string.
         * @link https://www.php.net/manual/en/ds-deque.join.php
         */
        public function join(string $glue = ''): string {}

        /**
         * Returns the last value in the deque.
         * @return TValue The last value in the deque.
         * @throws UnderflowException if empty.
         * @link https://www.php.net/manual/en/ds-deque.last.php
         */
        public function last() {}

        /**
         * Returns the result of applying a callback function to each value in
         * the deque.
         *
         * @template TNewValue
         * @param callable(TValue): TNewValue $callback A callable to apply to each value in the
         * deque.
         * The callable should return what the new value will be in the new
         * deque.
         * <code>callback ( mixed $value ) : mixed</code>
         *
         * @return Deque<TNewValue> The result of applying a callback to each value in
         * the deque.
         * <p><b>Note:</b> The values of the current instance won't be
         * affected.</p>
         * @link https://www.php.net/manual/en/ds-deque.map.php
         */
        public function map(callable $callback): Deque {}

        /**
         * Returns the result of adding all given values to the deque.
         * @template TValue2
         * @param iterable<TValue2> $values A traversable object or an array.
         * @return Deque<TValue|TValue2> The result of adding all given values to the
         * deque, effectively the same as adding the values to a copy,
         * then returning that copy.
         * @link https://www.php.net/manual/en/ds-deque.merge.php
         */
        public function merge($values): Deque {}

        /**
         * Removes and returns the last value.
         * @return TValue The removed last value.
         * @throws UnderflowException if empty.
         * @link https://www.php.net/manual/en/ds-deque.pop.php
         */
        public function pop() {}

        /**
         * Adds values to the end of the deque.
         * @param TValue ...$values The values to add.
         */
        public function push(...$values): void {}

        /**
         * Reduces the deque to a single value using a callback function.
         * @template TCarry
         * @param callable(TCarry, TValue): TCarry $callback
         * <code>callback ( mixed $carry , mixed $value ) : mixed</code>
         * <b>$carry</b> The return value of the previous callback, or initial if it's
         * the first iteration.<p>
         * <b>$value</b> The value of the current iteration.
         * </p>
         * @param TCarry $initial The initial value of the carry value. Can be NULL.
         * @return TCarry The return value of the final callback.
         * @link https://www.php.net/manual/en/ds-deque.reduce.php
         */
        public function reduce(callable $callback, $initial = null) {}

        /**
         * Removes and returns a value by index.
         * @param int $index The index of the value to remove.
         * @return TValue The value that was removed.
         * @link https://www.php.net/manual/en/ds-deque.remove.php
         */
        public function remove(int $index) {}

        /**
         * Reverses the deque in-place.
         * @link https://www.php.net/manual/en/ds-deque.reverse.php
         */
        public function reverse(): void {}

        /**
         * Returns a reversed copy of the deque.
         * @return Deque<TValue> A reversed copy of the deque.
         * <p><b>Note:</b> The current instance is not affected.</p>
         */
        public function reversed(): Deque {}

        /**
         * Rotates the deque by a given number of rotations, which is
         * equivalent to successively calling
         * $deque->push($deque->shift()) if the number of rotations is
         * positive, or $deque->unshift($deque->pop()) if negative.
         * @param int $rotations The number of times the deque should be
         * rotated.
         * @link https://www.php.net/manual/en/ds-deque.rotate.php
         */
        public function rotate(int $rotations): void {}

        /**
         * Updates a value at a given index.
         * @param int $index The index of the value to update.
         * @param TValue $value The new value.
         * @throws OutOfRangeException if the index is not valid.
         * @link https://www.php.net/manual/en/ds-deque.set.php
         */
        public function set(int $index, $value): void {}

        /**
         * Removes and returns the first value.
         * @return TValue
         * @throws UnderflowException if empty.
         * @link https://www.php.net/manual/en/ds-deque.shift.php
         */
        public function shift() {}

        /**
         * Creates a sub-deque of a given range.
         * @param int $index The index at which the sub-deque starts.
         * If positive, the deque will start at that index in the deque.
         * If negative, the deque will start that far from the end.
         * @param int|null $length If a length is given and is positive, the
         * resulting deque will have up to that many values in it. If the
         * length results in an overflow, only values up to the end of the
         * deque will be included. If a length is given and is negative,
         * the deque will stop that many values from the end. If a length
         * is not provided, the resulting deque will contain all values
         * between the index and the end of the deque.
         * @return Deque<TValue> A sub-deque of the given range.
         * @link https://www.php.net/manual/en/ds-deque.slice.php
         */
        public function slice(int $index, int $length = null): Deque {}

        /**
         * Sorts the deque in-place, using an optional comparator function.
         * @param callable(TValue, TValue): int|null $comparator The comparison function must return
         * an integer less than, equal to, or greater than zero if the first
         * argument is considered to be respectively less than, equal to, or
         * greater than the second. Note that before PHP 7.0.0 this integer had
         * to be in the range from -2147483648 to 2147483647.
         * <code>callback ( mixed $a, mixed $b ) : int</code>
         * <p><b>Caution:</b> Returning non-integer values from the comparison
         * function, such as float, will result in an internal cast to integer
         * of the callback's return value. So values such as 0.99 and 0.1 will
         * both be cast to an integer value of 0, which will compare such
         * values as equal.</p>
         * @link https://www.php.net/manual/en/ds-deque.sort.php
         */
        public function sort(?callable $comparator = null): void {}

        /**
         * Returns a sorted copy, using an optional comparator function.
         * @param callable(TValue, TValue): int|null $comparator The comparison function must return
         * an integer less than, equal to, or greater than zero if the first
         * argument is considered to be respectively less than, equal to, or
         * greater than the second. Note that before PHP 7.0.0 this integer had
         * to be in the range from -2147483648 to 2147483647.
         * <code>callback ( mixed $a, mixed $b ) : int</code>
         * <p><b>Caution:</b> Returning non-integer values from the comparison
         * function, such as float, will result in an internal cast to integer
         * of the callback's return value. So values such as 0.99 and 0.1 will
         * both be cast to an integer value of 0, which will compare such
         * values as equal.</p>
         * @return Deque<TValue> Returns a sorted copy of the deque.
         * @link https://www.php.net/manual/en/ds-deque.sort.php
         */
        public function sorted(?callable $comparator = null): Deque {}

        /**
         * Returns the sum of all values in the deque.
         * <p><b>Note:</b> Arrays and objects are considered equal to zero when
         * calculating the sum.</p>
         * @return float|int The sum of all the values in the deque as
         * either a float or int depending on the values in the deque.
         */
        public function sum(): float|int {}

        /**
         * Adds values to the front of the deque, moving all the current
         * values forward to make room for the new values.
         * @param TValue ...$values The values to add to the front of the deque.
         * <p><b>Note:</b> Multiple values will be added in the same order that they
         * are passed.</p>
         */
        public function unshift(...$values): void {}

        /**
         * Specify data which should be serialized to JSON
         * @link https://php.net/manual/en/ds-vector.jsonserialize.php
         * @return mixed data which can be serialized by <b>json_encode</b>,
         * which is a value of any type other than a resource.
         * @since 5.4
         */
        public function jsonSerialize() {}

        /**
         * @param int $offset
         */
        public function offsetExists(mixed $offset): bool {}

        /**
         * @param int $offset
         *
         * @return TValue
         */
        public function offsetGet(mixed $offset) {}

        /**
         * @param int $offset
         * @param TValue $value
         */
        public function offsetSet(mixed $offset, mixed $value) {}

        /**
         * @param int $offset
         */
        public function offsetUnset(mixed $offset): void {}
    }

    /**
     * @template TKey
     * @template TValue
     * @implements Collection<TKey, TValue>
     */
    class Map implements Collection, ArrayAccess
    {
        /**
         * Creates a new instance, using either a traversable object or an array for the initial values.
         * @param iterable<TKey, TValue> ...$values A traversable object or an array to use for the initial values.
         *
         * @link https://www.php.net/manual/en/ds-map.construct.php
         */
        public function __construct(...$values) {}

        /**
         * Allocates enough memory for a required capacity.
         *
         * @param int $capacity The number of values for which capacity should be allocated.<br>
         * <p><b>Note:</b> Capacity will stay the same if this value is less than or equal to the current capacity.</p>
         * Capacity will always be rounded up to the nearest power of 2.
         *
         * @link https://www.php.net/manual/en/ds-map.allocate.php
         */
        public function allocate(int $capacity) {}

        /**
         * Updates all values by applying a callback function to each value in the map.
         *
         * @param callable(TKey, TValue): TValue $callback A callable to apply to each value in the map. The callback should return what
         * the value should be replaced by.
         *
         * @link https://www.php.net/manual/en/ds-map.apply.php
         */
        public function apply(callable $callback) {}

        /**
         * Returns the current capacity.
         *
         * @return int
         *
         * @link https://www.php.net/manual/en/ds-map.capacity.php
         */
        public function capacity(): int {}

        /**
         * Count elements of an object
         * @link https://php.net/manual/en/countable.count.php
         * @return int The custom count as an integer.
         * </p>
         * <p>
         * The return value is cast to an integer.
         * @since 5.1
         */
        public function count(): int {}

        /**
         * Removes all values from the collection.
         * @link https://www.php.net/manual/en/ds-collection.clear.php
         */
        public function clear(): void {}

        /**
         * Returns a shallow copy of the collection.
         * @link https://www.php.net/manual/en/ds-collection.copy.php
         * @return Map<TKey, TValue>
         */
        public function copy(): Collection {}

        /**
         * Returns the result of removing all keys from the current instance that are present in a given map.
         *
         * A \ B = {x ∈ A | x ∉ B}
         *
         * @template TValue2
         * @param Map<TKey, TValue2> $map The map containing the keys to exclude in the resulting map.
         *
         * @return Map<TKey, TValue> The result of removing all keys from the current instance that are present in a given map.
         *
         * @link https://www.php.net/manual/en/ds-map.diff.php
         */
        public function diff(Map $map): Map {}

        /**
         * Creates a new map using a callable to determine which pairs to include
         *
         * @param null|callable(TKey, TValue): bool $callback Optional callable which returns TRUE if the pair should be included, FALSE
         * otherwise. If a callback is not provided, only values which are TRUE (see converting to boolean) will be included.
         *
         * @return Map<TKey, TValue>
         *
         * @link https://www.php.net/manual/en/ds-map.filter.php
         */
        public function filter(?callable $callback = null): Map {}

        /**
         * Returns the first pair in the map
         *
         * @return Pair<TKey, TValue> The first pair in the map.
         *
         * @throws UnderflowException if empty
         *
         * @link https://www.php.net/manual/en/ds-map.first.php
         */
        public function first(): Pair {}

        /**
         * Returns the value for a given key, or an optional default value if the key could not be found.
         * <p>
         * <b>Note:</b> Keys of type object are supported. If an object implements Ds\Hashable, equality will be
         * determined by the object's equals function. If an object does not implement Ds\Hashable, objects must be references to the same instance to be considered equal.
         * </p>
         * <p>
         * <b>Note:</b> You can also use array syntax to access values by key, eg. $map["key"].
         * </p>
         * <p>
         * <b>Caution:</b> Be careful when using array syntax. Scalar keys will be coerced to integers by the engine. For
         * example, $map["1"] will attempt to access int(1), while $map->get("1") will correctly look up the string key.
         * </p>
         *
         * @template TDefault
         * @param TKey $key The key to look up.
         * @param TDefault $default The optional default value, returned if the key could not be found.
         *
         * @return TValue|TDefault The value mapped to the given key, or the default value if provided and the key could not be found in the map.
         *
         * @throws OutOfBoundsException if the key could not be found and a default value was not provided.
         *
         * @link https://www.php.net/manual/en/ds-map.get.php
         */
        public function get($key, $default = null) {}

        public function getIterator(): Traversable {}

        /**
         * Determines whether the map contains a given key
         *
         * @param TKey $key The key to look for.
         *
         * @return bool Returns TRUE if the key could found, FALSE otherwise.
         *
         * @link https://www.php.net/manual/en/ds-map.hasKey.php
         */
        public function hasKey($key): bool {}

        /**
         * Determines whether the map contains a given value
         *
         * @param TValue $value The value to look for.
         *
         * @return bool Returns TRUE if the value could found, FALSE otherwise.
         *
         * @link https://www.php.net/manual/en/ds-map.hasValue.php
         */
        public function hasValue($value): bool {}

        /**
         * Creates a new map containing the pairs of the current instance whose
         * keys are also present in the given map. In other words, returns a
         * copy of the current instance with all keys removed that are not also
         * in the other map.
         *
         * A ∩ B = {x : x ∈ A ∧ x ∈ B}
         *
         * <p><b>Note:</b> Values from the current instance will be kept.</p>
         *
         * @template TKey2
         * @template TValue2
         * @param Map<TKey2, TValue2> $map The other map, containing the keys to intersect with.
         *
         * @return Map<TKey&TKey2, TValue> The key intersection of the current instance and another map.
         *
         * @link https://www.php.net/manual/en/ds-map.intersect.php
         */
        public function intersect(Map $map): Map {}

        /**
         * Returns whether the collection is empty.
         *
         * @link https://www.php.net/manual/en/ds-collection.isempty.php
         *
         * @return bool Returns TRUE if the map is empty, FALSE otherwise.
         *
         * @link https://www.php.net/manual/en/ds-map.isempty.php
         */
        public function isEmpty(): bool {}

        /**
         * Converts the map to an array.
         * <p><b>Note:</b> Casting to an array is not supported yet.</p>
         * <p><b>Caution:</b> Maps where non-scalar keys are can't be converted to an
         * array.
         * </p>
         * <p><b>Caution:</b> An array will treat all numeric keys as integers, eg.
         * "1" and 1 as keys in the map will only result in 1 being included in
         * the array.
         * </p>
         *
         * @link https://www.php.net/manual/en/ds-map.toarray.php
         * @return array<TValue> An array containing all the values in the same order as
         * the map.
         */
        public function toArray(): array {}

        /**
         * Specify data which should be serialized to JSON
         * @link https://php.net/manual/en/jsonserializable.jsonserialize.php
         * @return mixed data which can be serialized by <b>json_encode</b>,
         * which is a value of any type other than a resource.
         * @since 5.4
         */
        public function jsonSerialize() {}

        /**
         * Returns a set containing all the keys of the map, in the same order.
         * @link https://www.php.net/manual/en/ds-map.keys.php
         * @return Set<TKey> A Ds\Set containing all the keys of the map.
         */
        public function keys(): Set {}

        /**
         * Sorts the map in-place by key, using an optional comparator function.
         * @param callable(TKey, TKey):int|null $comparator The comparison function must return
         * an integer less than, equal to, or greater than zero if the first
         * argument is considered to be respectively less than, equal to, or
         * greater than the second. Note that before PHP 7.0.0 this integer had
         * to be in the range from -2147483648 to  2147483647.
         * <code>callback ( mixed $a, mixed $b ) : int</code>
         * <p><b>Caution:</b> Returning non-integer values from the comparison function, such
         * as float, will result in an internal cast to integer of the
         * callback's return value. So values such as 0.99 and 0.1 will both be
         * cast to an  integer value of 0, which will compare such values as
         * equal.</p>
         * @link https://www.php.net/manual/en/ds-map.ksort.php
         */
        public function ksort(?callable $comparator = null) {}

        /**
         * Returns a copy sorted by key, using an optional comparator function.
         * @param callable(TKey, TKey): int|null $comparator The comparison function must return
         * an integer less than, equal to, or greater than zero if the first
         * argument is considered to be respectively less than, equal to, or
         * greater than the second. Note that before PHP 7.0.0 this integer had
         * to be in the range from -2147483648 to 2147483647.
         * <code>callback ( mixed $a, mixed $b ) : int</code>
         * <p><b>Caution:</b> Returning non-integer values from the comparison function, such
         * as float, will result in an internal cast to integer of the
         * callback's return value. So values such as 0.99 and 0.1 will both be
         * cast to an  integer value of 0, which will compare such values as
         * equal.</p>
         * @return Map<TKeyK, TValueV> Returns a copy of the map, sorted by key.
         * @link https://www.php.net/manual/en/ds-map.ksorted.php
         */
        public function ksorted(?callable $comparator = null): Map {}

        /**
         * Returns the last pair of the map.
         * @return Pair<K,V> The last pair of the map.
         * @throws UnderflowException if empty
         * @link https://www.php.net/manual/en/ds-map.last.php
         */
        public function last(): Pair {}

        /**
         * Returns the result of applying a callback function to each value of
         * the map.
         * @template TNewValue
         * @param callable(TKey, TValue): TNewValue $callback A callable to apply to each value in the
         * map. The callable should return what the key will be mapped to in the
         * resulting map.
         * <code>callback ( mixed $key , mixed $value ) : mixed</code>
         * @return Map<TKey, TNewValue> The result of applying a callback to each value in the
         * map.
         *
         * <b>Note:</b> The keys and values of the current instance won't be affected.
         *
         * @link https://www.php.net/manual/en/ds-map.map.php
         */
        public function map(callable $callback): Map {}

        /**
         * Returns the result of associating all keys of a given traversable
         * object or array with their corresponding values, combined with the
         * current instance.
         * @template TKey2
         * @template TValue2
         * @param iterable<TKey2, TValue2> $values A traversable object or an array.
         * @return Map<TKey|TKey2, TValue|TValue2> The result of associating all keys of a given traversable
         * object or array with their corresponding values, combined with the
         * current instance.
         *
         * <b>Note:</b> The current instance won't be affected.
         *
         * @link https://www.php.net/manual/en/ds-map.merge.php
         */
        public function merge($values): Map {}

        /**
         * Returns a Ds\Sequence containing all the pairs of the map.
         *
         * @return Sequence<Pair<TKey, TValueV>> Ds\Sequence containing all the pairs of the map.
         *
         * @link https://www.php.net/manual/en/ds-map.pairs.php
         */
        public function pairs(): Sequence {}

        /**
         * Associates a key with a value, overwriting a previous association if
         * one exists.
         * @param TKey $key The key to associate the value with.
         * @param TValue $value The value to be associated with the key.
         *
         * <b>Note:</b> Keys of type object are supported. If an object implements
         * Ds\Hashable, equality will be determined by the object's equals
         * function. If an object does not implement Ds\Hashable, objects must
         * be references to the same instance to be considered equal.
         *
         * <b>Note:</b> You can also use array syntax to associate values by key, eg.
         * $map["key"] = $value.
         *
         * <b>Caution:</b> Be careful when using array syntax. Scalar keys will be
         * coerced to integers by the engine. For example, $map["1"] will
         * attempt to access int(1), while $map->get("1") will correctly look up
         * the string key.
         *
         * @link https://www.php.net/manual/en/ds-map.put.php
         */
        public function put($key, $value) {}

        /**
         * Associates all key-value pairs of a traversable object or array.
         *
         * <b>Note:</b> Keys of type object are supported. If an object implements
         * Ds\Hashable, equality will be determined
         * by the object's equals function. If an object does not implement
         * Ds\Hashable, objects must be references to the same instance to be
         * considered equal.
         *
         * @param iterable<TKey, TValue> $pairs traversable object or array.
         *
         * @link https://www.php.net/manual/en/ds-map.putall.php
         */
        public function putAll($pairs) {}

        /**
         * Reduces the map to a single value using a callback function.
         *
         * @template TCarry
         * @param callable(TCarry, TKey, TValue): TCarry $callback
         * <code>callback ( mixed $carry , mixed $key , mixed $value ) : mixed</code>
         * <b>carry</b> The return value of the previous callback, or initial if
         * it's the first iteration.
         * <b>key</b> The key of the current iteration.
         * <b>value</b> The value of the current iteration.
         *
         * @param TCarry $initial The initial value of the carry value. Can be
         * NULL.
         *
         * @return TCarry
         * @link https://www.php.net/manual/en/ds-map.reduce.php
         */
        public function reduce(callable $callback, $initial) {}

        /**
         * Removes and returns a value by key, or return an optional default
         * value if the key could not be found.
         *
         * @template TDefault
         * @param TKey $key The key to remove.
         * @param TDefault $default The optional default value, returned if the key
         * could not be found.
         *
         * <b>Note:</b> Keys of type object are supported. If an object implements
         * Ds\Hashable, equality will be determined
         * by the object's equals function. If an object does not implement
         * Ds\Hashable, objects must be references to the same instance to be
         * considered equal.
         *
         * <b>Note:</b> You can also use array syntax to access values by key, eg.
         * $map["key"].
         *
         * <b>Caution:</b> Be careful when using array syntax. Scalar keys will be
         * coerced to integers by the engine. For example, $map["1"] will
         * attempt to access int(1), while $map->get("1") will correctly look up
         * the string key.
         *
         * @return TValue|TDefault The value that was removed, or the default value if
         * provided and the key could not be found in the map.
         *
         * @throws OutOfBoundsException if the key could not be found and a
         * default value was not provided.
         *
         * @link https://www.php.net/manual/en/ds-map.remove.php
         */
        public function remove($key, $default = null) {}

        /**
         * Reverses the map in-place.
         *
         * @link https://www.php.net/manual/en/ds-map.reverse.php
         */
        public function reverse() {}

        /**
         * Returns a reversed copy of the map.
         *
         * @return Map<TKey, TValue> A reversed copy of the map.
         *
         * <p><b>Note:</b> The current instance is not affected.</p>
         *
         * @link https://www.php.net/manual/en/ds-map.reversed.php
         */
        public function reversed(): Map {}

        /**
         * Returns the pair at a given zero-based position.
         *
         * @param int $position The zero-based positional index to return.
         *
         * @return Pair<TKey, TValue> Returns the Ds\Pair at the given position.
         *
         * @throws OutOfRangeException if the position is not valid.
         *
         * @link https://www.php.net/manual/en/ds-map.skip.php
         */
        public function skip(int $position): Pair {}

        /**
         * Returns a subset of the map defined by a starting index and length.
         *
         * @param int $index The index at which the range starts. If positive,
         * the range will start at that index in the map. If negative, the range
         * will start that far from the end.
         *
         * @param int|null $length If a length is given and is positive, the
         * resulting map will have up to that many pairs in it. If a length is
         * given and is negative, the range will stop that many pairs from the
         * end. If the length results in an overflow, only pairs up to the end
         * of the map will be included. If a length is not provided, the
         * resulting map will contain all pairs between the index and the end of
         * the map.
         *
         * @return Map<TKey, TValue> A subset of the map defined by a starting index and
         * length.
         *
         * @link https://www.php.net/manual/en/ds-map.slice.php
         */
        public function slice(int $index, ?int $length = null): Map {}

        /**
         * Sorts the map in-place by value, using an optional comparator
         * function.
         *
         * @param callable(TValue, TValue): int|null $comparator The comparison function must return
         * an integer less than, equal to, or greater than zero if the first
         * argument is considered to be respectively less than, equal to, or
         * greater than the second. Note that before PHP 7.0.0 this integer had
         * to be in the range from -2147483648 to 2147483647.
         *
         * <code>callback ( mixed $a, mixed $b ) : int</code>
         *
         * <b>Caution:</b> Returning non-integer values from the comparison function,
         * such as float, will result in an internal cast to integer of the
         * callback's return value. So values such as 0.99 and 0.1 will both be
         * cast to an integer value of 0, which will compare such values as
         * equal.
         *
         * @link https://www.php.net/manual/en/ds-map.sort.php
         */
        public function sort(?callable $comparator = null) {}

        /**
         * Returns a copy, sorted by value using an optional comparator function.
         *
         * @param callable(TValue, TValue): int|null $comparator The comparison function must return
         * an integer less than, equal to, or greater than zero if the first
         * argument is considered to be respectively less than, equal to, or
         * greater than the second. Note that before PHP 7.0.0 this integer had
         * to be in the range from -2147483648 to 2147483647.
         *
         * <code>callback ( mixed $a, mixed $b ) : int</code>
         *
         * <b>Caution:</b> Returning non-integer values from the comparison function,
         * such as float, will result in an internal cast to integer of the
         * callback's return value. So values such as 0.99 and 0.1 will both be
         * cast to an integer value of 0, which will compare such values as
         * equal.
         *
         * @return Map<TKey, TValue>
         *
         * @link https://www.php.net/manual/en/ds-map.sorted.php
         */
        public function sorted(?callable $comparator = null): Map {}

        /**
         * Returns the sum of all values in the map.
         *
         * <b>Note:</b> Arrays and objects are considered equal to zero when
         * calculating the sum.
         *
         * @return float|int The sum of all the values in the map as either a
         * float or int depending on the values in the map.
         *
         * @link https://www.php.net/manual/en/ds-map.sum.php
         */
        public function sum(): float|int {}

        /**
         * Creates a new map using values from the current instance and another
         * map.
         *
         * A ∪ B = {x: x ∈ A ∨ x ∈ B}
         *
         * <p><b>Note:</b> Values of the current instance will be overwritten by those
         * provided where keys are equal.</p>
         *
         * @template TKey2
         * @template TValue2
         * @param Map<TKey2, TValue2> $map The other map, to combine with the current instance.
         *
         * @return Map<TKey|TKey2 , TValue|TValue2> A new map containing all the pairs of the current
         * instance as well as another map.
         *
         * @link https://www.php.net/manual/en/ds-map.union.php
         */
        public function union(Map $map): Map {}

        /**
         * Returns a sequence containing all the values of the map, in the same
         * order.
         *
         * @return Sequence<TValue> A Ds\Sequence containing all the values of the map.
         *
         * @link https://www.php.net/manual/en/ds-map.values.php
         */
        public function values(): Sequence {}

        /**
         * Creates a new map containing keys of the current instance as well as
         * another map, but not of both.
         *
         * A ⊖ B = {x : x ∈ (A \ B) ∪ (B \ A)}
         *
         * @template TKey2
         * @template TValue2
         * @param Map<TKey2, TValue2> $map The other map.
         *
         * @return Map<TKey|TKey2, TValue|TValue2> A new map containing keys in the current instance as well
         * as another map, but not in both.
         *
         * @link https://www.php.net/manual/en/ds-map.xor.php
         */
        public function xor(Map $map): Map {}

        /**
         * @param TKey $offset
         */
        public function offsetExists(mixed $offset): bool {}

        /**
         * @param TKey $offset
         *
         * @return TValue
         */
        public function offsetGet(mixed $offset) {}

        /**
         * @param TKey $offset
         * @param TValue $value
         */
        public function offsetSet(mixed $offset, mixed $value) {}

        /**
         * @param TKey $offset
         */
        public function offsetUnset(mixed $offset): void {}
    }

    /**
     * A pair is used by Ds\Map to pair keys with values.
     * @package Ds
     * @template-covariant TKey
     * @template-covariant TValue
     */
    class Pair implements JsonSerializable
    {
        /**
         * @var TKey
         */
        public $key;

        /**
         * @var TValue
         */
        public $value;

        /**
         * Creates a new instance using a given key and value.
         *
         * @param TKey $key
         * @param TValue $value
         *
         * @link https://php.net/manual/en/ds-pair.construct.php
         */
        public function __construct($key = null, $value = null) {}

        /**
         * Removes all values from the pair.
         *
         * @link https://php.net/manual/en/ds-pair.clear.php
         */
        public function clear() {}

        /**
         * Returns a shallow copy of the pair.
         *
         * @return Pair<TKey, TValue> Returns a shallow copy of the pair.
         *
         * @link https://php.net/manual/en/ds-pair.copy.php
         */
        public function copy(): Pair {}

        /**
         * Returns whether the pair is empty.
         *
         * @return bool Returns TRUE if the pair is empty, FALSE otherwise.
         *
         * @link https://php.net/manual/en/ds-pair.isempty.php
         */
        public function isEmpty(): bool {}

        /**
         * Converts the pair to an array.
         *
         * <p><b>Note:</b> Casting to an array is not supported yet.</p>
         *
         * @return array{key: TKey, value: TValue} An array containing all the values in the same order as
         * the pair.
         *
         * @link https://php.net/manual/en/ds-pair.toarray.php
         */
        public function toArray(): array {}

        /**
         * Specify data which should be serialized to JSON
         * @link https://php.net/manual/en/ds-pair.jsonserialize.php
         * @return mixed data which can be serialized by <b>json_encode</b>,
         * which is a value of any type other than a resource.
         */
        public function jsonSerialize() {}
    }

    /**
     * A Set is a sequence of unique values. This implementation uses the same
     * hash table as Ds\Map, where values are used as keys and the mapped value
     * is ignored.
     *
     * @link https://www.php.net/manual/en/class.ds-set.php
     *
     * @package Ds
     * @template TValue
     * @implements Collection<int, TValue>
     */
    class Set implements Collection, ArrayAccess
    {
        /**
         * Creates a new instance, using either a traversable object or an array
         * for the initial values.
         *
         * @param iterable<TValue> $values A traversable object of an array to
         * use the initial values.
         *
         * @link https://php.net/manual/en/ds-set.construct.php
         */
        public function __construct(iterable $values = []) {}

        /**
         * Adds all given values to the set that haven't already been added.
         *
         * <p><b>Note:</b> Values of type object are supported. If an object implements
         * Ds\Hashable, equality will be determined by the object's equals
         * function. If an object does not implement Ds\Hashable, objects must
         * be references to the same instance to be considered equal.
         *
         * <p><b>Caution:</b> All comparisons are strict (type and value).
         *
         * @param TValue ...$values Values to add to the set.
         *
         * @link https://php.net/manual/en/ds-set.add.php
         */
        public function add(...$values) {}

        /**
         * Allocates enough memory for a required capacity.
         *
         * @param int $capacity The number of values for which capacity should
         * be allocated.
         *
         * <p><b>Note:</b> Capacity will stay the same if this value is less than or
         * equal to the current capacity.
         *
         * <p>Capacity will always be rounded up to the nearest power of 2.
         *
         * @link https://php.net/manual/en/ds-set.allocate.php
         */
        public function allocate(int $capacity) {}

        /**
         * Determines if the set contains all values.
         *
         * <p>Values of type object are supported. If an object implements
         * Ds\Hashable, equality will be determined by the object's equals
         * function. If an object does not implement Ds\Hashable, objects must
         * be references to the same instance to be considered equal.
         *
         * <p><b>Caution:</b> All comparisons are strict (type and value).
         *
         * @param TValue ...$values Values to check.
         *
         * @return bool
         *
         * @link https://php.net/manual/en/ds-set.contains.php
         */
        public function contains(...$values): bool {}

        /**
         * Returns the current capacity.
         * @link https://www.php.net/manual/en/ds-set.capacity.php
         *
         * @return int
         */
        public function capacity(): int {}

        /**
         * Removes all values from the set.
         * @link https://www.php.net/manual/en/ds-set.clear.php
         */
        public function clear(): void {}

        /**
         * Count elements of an object
         * @link https://php.net/manual/en/ds-set.count.php
         * @return int The custom count as an integer.
         * </p>
         * <p>
         * The return value is cast to an integer.
         * @since 5.1
         */
        public function count(): int {}

        /**
         * Returns a shallow copy of the set.
         * @link https://www.php.net/manual/en/ds-set.copy.php
         * @return Set<TValue>
         */
        public function copy(): Set {}

        /**
         * Creates a new set using values that aren't in another set.
         *
         * A \ B = {x ∈ A | x ∉ B}
         *
         * @link https://www.php.net/manual/en/ds-set.diff.php
         *
         * @template TValue2
         * @param Set<TValue2> $set Set containing the values to exclude.
         *
         * @return Set<TValue> A new set containing all values that were not in the
         * other set.
         */
        public function diff(Set $set): Set {}

        /**
         * Creates a new set using a callable to determine which values to
         * include
         *
         * @link https://www.php.net/manual/en/ds-set.filter.php
         *
         * @param null|callable(TValue): bool $callback Optional callable which returns TRUE if the
         * value should be included, FALSE otherwise.
         * If a callback is not provided, only values which are TRUE (see
         * converting to boolean) will be included.
         *
         * @return Set<TValue> A new set containing all the values for which either the
         * callback returned TRUE, or all values that convert to TRUE if a
         * callback was not provided.
         */
        public function filter(?callable $callback = null): Set {}

        /**
         * Returns the first value in the set.
         *
         * @link https://www.php.net/manual/en/ds-set.first.php
         *
         * @return TValue The first value in the set.
         */
        public function first() {}

        /**
         * Returns the value at a given index.
         *
         * @link https://www.php.net/manual/en/ds-set.get.php
         *
         * @param int $index The index to access, starting at 0.
         *
         * @return TValue The value at the requested index.
         */
        public function get(int $index) {}

        public function getIterator(): Traversable {}

        /**
         * Creates a new set using values common to both the current instance
         * and another set. In other words, returns a copy of the current
         * instance with all values removed that are not in the other set.
         *
         * A ∩ B = {x : x ∈ A ∧ x ∈ B}
         *
         * @link https://www.php.net/manual/en/ds-set.intersect.php
         *
         * @template TValue2
         * @param Set<TValue2> $set The other set.
         * @return Set<TValue&TValue2> The intersection of the current instance and another set.
         */
        public function intersect(Set $set): Set {}

        /**
         * Returns whether the set is empty.
         * @link https://www.php.net/manual/en/ds-set.isempty.php
         *
         * @return bool
         */
        public function isEmpty(): bool {}

        /**
         * Joins all values together as a string using an optional separator
         * between each value.
         *
         * @link https://www.php.net/manual/en/ds-set.join.php
         *
         * @param null|string $glue An optional string to separate each value.
         *
         * @return string
         */
        public function join(?string $glue = null): string {}

        /**
         * Returns the result of applying a callback function to each value in
         * the set.
         * @template TNewValue
         * @param callable(TValue): TNewValue $callback A callable to apply to each value in the
         * set.
         * The callable should return what the new value will be in the new
         * set.
         * <code>callback ( mixed $value ) : mixed</code>
         * @return Set<TNewValue> The result of applying a callback to each value in
         * the set.
         * <p><b>Note:</b> The values of the current instance won't be affected.</p>
         */
        public function map(callable $callback): Set {}

        /**
         * Returns the result of adding all given values to the set.
         *
         * <p><b>Note:</b> The current instance won't be affected.</p>
         *
         * @link https://www.php.net/manual/en/ds-set.merge.php
         *
         * @template TValue2
         * @param iterable<TValue2> $values A traversable object or an array.
         *
         * @return Set<TValue|TValue2> The result of adding all given values to the set,
         * effectively the same as adding the values to a copy, then returning
         * that copy.
         */
        public function merge($values): Set {}

        /**
         * Reduces the set to a single value using a callback function.
         *
         * @link https://www.php.net/manual/en/ds-set.reduce.php
         *
         * @template TCarry
         * @param callable(TCarry, TValue): TCarry $callback
         * <code>callback ( mixed $carry , mixed $value ) : mixed</code>
         *  $carry  The return value of the previous callback, or initial if
         * it's the first iteration.
         *  $value   The value of the current iteration.
         *
         * @param TCarry $initial The initial value of the carry value. Can be
         * NULL.
         *
         * @return TCarry The return value of the final callback.
         */
        public function reduce(callable $callback, $initial = null) {}

        /**
         * Removes all given values from the set, ignoring any that are not in
         * the set.
         *
         * @link https://www.php.net/manual/en/ds-set.remove.php
         *
         * @param TValue ...$values The values to remove.
         */
        public function remove(...$values) {}

        /**
         * Reverses the set in-place.
         *
         * @link https://www.php.net/manual/en/ds-set.reverse.php
         */
        public function reverse() {}

        /**
         * Returns a reversed copy of the set.
         *
         * @link https://www.php.net/manual/en/ds-set.reversed.php
         *
         * <p><b>Note:</b> The current instance is not affected.</p>
         *
         * @return Set<TValue> A reversed copy of the set.
         */
        public function reversed(): Set {}

        /**
         * Returns a sub-set of a given range
         *
         * @param int $index The index at which the sub-set starts. If positive,
         * the set will start at that index in
         * the set. If negative, the set will start that far from the end.
         *
         * @param int|null $length If a length is given and is positive, the
         * resulting set will have up to that many values in it. If the length
         * results in an overflow, only values up to the end of the set will be
         * included. If a length is given and is negative, the set will stop
         * that many values from the end. If a length is not provided, the
         * resulting set will contain all values between the index and the end
         * of the set.
         *
         * @return Set<TValue> A sub-set of the given range.
         */
        public function slice(int $index, ?int $length = null): Set {}

        /**
         * Returns the last value in the set.
         *
         * @link https://www.php.net/manual/en/ds-set.last.php
         *
         * @return TValue The last value in the set.
         *
         * @throws UnderflowException if empty.
         */
        public function last() {}

        /**
         * Sorts the set in-place, using an optional comparator function.
         *
         * @param callable(TValue, TValue): int|null $comparator The comparison function must return
         * an integer less than, equal to, or greater than zero if the first
         * argument is considered to be respectively less than, equal to, or
         * greater than the second. Note that before PHP 7.0.0 this integer had
         * to be in the range from -2147483648 to 2147483647.
         * <code>callback ( mixed $a, mixed $b ) : int</code>
         * <note><b>Caution:</b> Returning non-integer values from the comparison
         * function, such as float, will result in an internal cast to integer
         * of the callback's return value. So values such as 0.99 and 0.1 will
         * both be cast to an integer value of 0, which will compare such values
         * as equal.</note>
         *
         * @link https://www.php.net/manual/en/ds-set.sort.php
         */
        public function sort(?callable $comparator = null) {}

        /**
         * Returns a sorted copy, using an optional comparator function.
         *
         * @link https://www.php.net/manual/en/ds-set.sorted.php
         *
         * @param null|callable(TValue, TValue): int $comparator The comparison function must return an
         * integer less than, equal to, or greater than zero if the first
         * argument is considered to be respectively less than, equal to, or
         * greater than the second. Note  that before PHP 7.0.0 this integer had
         * to be in the range from -2147483648 to 2147483647.
         *
         * <code>callback ( mixed $a, mixed $b ) : int</code>
         *
         * <p><b>Caution:</b> Returning non-integer values from the comparison
         * function, such as float, will result in an
         * internal cast to integer of the callback's return value. So values
         * such as 0.99 and 0.1 will both be cast to an integer value of 0,
         * which will compare such values as equal.</p>
         *
         * @return Set<TValue> Returns a sorted copy of the set.
         */
        public function sorted(?callable $comparator = null): Set {}

        /**
         * Returns the sum of all values in the set.
         *
         * <p><b>Note:</b> Arrays and objects are considered equal to zero when
         * calculating the sum.</p>
         *
         * @link https://www.php.net/manual/en/ds-set.sum.php
         *
         * @return float|int The sum of all the values in the set as either a
         * float or int depending on the values in the set.
         */
        public function sum(): float|int {}

        /**
         * Creates a new set that contains the values of the current instance as
         * well as the values of another set.
         *
         * A ∪ B = {x: x ∈ A ∨ x ∈ B}
         *
         * @link https://www.php.net/manual/en/ds-set.union.php
         *
         * @template TValue2
         * @param Set<TValue2> $set The other set, to combine with the current instance.
         *
         * @return Set<TValue|TValue2> A new set containing all the values of the current
         * instance as well as another set.
         */
        public function union(Set $set): Set {}

        /**
         * Creates a new set using values in either the current instance or in
         * another set, but not in both.
         *
         * A ⊖ B = {x : x ∈ (A \ B) ∪ (B \ A)}
         *
         * @link https://www.php.net/manual/en/ds-set.xor.php
         *
         * @template TValue2
         * @param Set<TValue2> $set The other set.
         *
         * @return Set<TValue|TValue2> A new set containing values in the current instance as
         * well as another set, but not in both.
         */
        public function xor(Set $set): Set {}

        /**
         * Converts the set to an array.
         * <p><b>Note:</b> Casting to an array is not supported yet.</p>
         * @link https://www.php.net/manual/en/ds-set.toarray.php
         * @return array<TValue> An array containing all the values in the same order as
         * the collection.
         */
        public function toArray(): array {}

        /**
         * Specify data which should be serialized to JSON
         * @link https://php.net/manual/en/ds-set.jsonserialize.php
         * @return mixed data which can be serialized by <b>json_encode</b>,
         * which is a value of any type other than a resource.
         * @since 5.4
         */
        public function jsonSerialize() {}

        /**
         * @param int $offset
         */
        public function offsetExists(mixed $offset): bool {}

        /**
         * @param int $offset
         *
         * @return TValue
         */
        public function offsetGet(mixed $offset) {}

        /**
         * @param int $offset
         * @param TValue $value
         */
        public function offsetSet(mixed $offset, mixed $value) {}

        /**
         * @param int $offset
         */
        public function offsetUnset(mixed $offset): void {}
    }

    /**
     * A Stack is a “last in, first out” or “LIFO” collection that only allows
     * access to the value at the top of the structure and iterates in that
     * order, destructively.
     *
     * @package Ds
     * @template TValue
     * @implements Collection<int, TValue>
     *
     * @link https://www.php.net/manual/en/class.ds-stack.php
     */
    class Stack implements Collection, ArrayAccess
    {
        /**
         * Creates a new instance, using either a traversable object or an array
         * for the initial values.
         *
         * @link https://www.php.net/manual/en/ds-stack.construct.php
         *
         * @param iterable<TValue> $values A traversable object or an
         * array to use for the initial values.
         */
        public function __construct($values = []) {}

        /**
         * Ensures that enough memory is allocated for a required capacity. This
         * removes the need to reallocate the internal as values are added.
         *
         * @link https://www.php.net/manual/en/ds-stack.allocate.php
         *
         * @param int $capacity The number of values for which capacity should
         * be allocated.
         *
         * <p><b>Note:</b> Capacity will stay the same if this value is less than or
         * equal to the current capacity.</p>
         */
        public function allocate(int $capacity) {}

        /**
         * Returns the current capacity.
         *
         * @link https://www.php.net/manual/en/ds-stack.capacity.php
         *
         * @return int The current capacity.
         */
        public function capacity(): int {}

        /**
         * Removes all values from the stack.
         * @link https://www.php.net/manual/en/ds-stack.clear.php
         */
        public function clear(): void {}

        /**
         * Count elements of an object
         * @link https://php.net/manual/en/ds-stack.count.php
         * @return int The custom count as an integer.
         * </p>
         * <p>
         * The return value is cast to an integer.
         * @since 5.1
         */
        public function count(): int {}

        /**
         * Returns a shallow copy of the collection.
         * @link https://www.php.net/manual/en/ds-stack.copy.php
         * @return Stack<TValue>
         */
        public function copy(): Stack {}

        public function getIterator(): Traversable {}

        /**
         * Returns whether the collection is empty.
         * @link https://www.php.net/manual/en/ds-stack.isempty.php
         * @return bool
         */
        public function isEmpty(): bool {}

        /**
         * Converts the collection to an array.
         * <p><b>Note:</b> Casting to an array is not supported yet.</p>
         * @link https://www.php.net/manual/en/ds-stack.toarray.php
         * @return array<TValue> An array containing all the values in the same order as
         * the collection.
         */
        public function toArray(): array {}

        /**
         * Specify data which should be serialized to JSON
         * @link https://php.net/manual/en/jsonserializable.jsonserialize.php
         * @return mixed data which can be serialized by <b>json_encode</b>,
         * which is a value of any type other than a resource.
         * @since 5.4
         */
        public function jsonSerialize() {}

        /**
         * Returns the value at the top of the stack, but does not remove it.
         *
         * @link https://www.php.net/manual/en/ds-queue.peek.php
         *
         * @return TValue The value at the top of the stack.
         *
         * @throws UnderflowException
         */
        public function peek() {}

        /**
         * Removes and returns the value at the top of the stack.
         *
         * @link https://www.php.net/manual/en/ds-queue.pop.php
         *
         * @return TValue The removed value which was at the top of the stack.
         *
         * @throws UnderflowException
         */
        public function pop() {}

        /**
         * Pushes values onto the stack.
         *
         * @link https://www.php.net/manual/en/ds-queue.push.php
         *
         * @param TValue ...$values The values to push onto the stack.
         */
        public function push(...$values) {}

        /**
         * @param int $offset
         */
        public function offsetExists(mixed $offset): bool {}

        /**
         * @param int $offset
         *
         * @return TValue
         */
        public function offsetGet(mixed $offset) {}

        /**
         * @param int $offset
         * @param TValue $value
         */
        public function offsetSet(mixed $offset, mixed $value) {}

        /**
         * @param int $offset
         */
        public function offsetUnset(mixed $offset): void {}
    }

    /**
     * A Queue is a “first in, first out” or “FIFO” collection that only allows
     * access to the value at the front of the queue and iterates in that order,
     * destructively.
     *
     * Uses a Ds\Vector internally.
     *
     * @package Ds
     * @template TValue
     * @implements Collection<int, TValue>
     */
    class Queue implements Collection, ArrayAccess
    {
        /**
         * Creates a new instance, using either a traversable object or an array
         * for the initial values.
         *
         * @link https://www.php.net/manual/en/ds-queue.construct.php
         *
         * @param iterable<TValue> $values A traversable object or an
         * array to use for the initial values.
         */
        public function __construct($values = []) {}

        /**
         * Ensures that enough memory is allocated for a required capacity. This
         * removes the need to reallocate the internal as values are added.
         *
         * @link https://www.php.net/manual/en/ds-queue.allocate.php
         *
         * @param int $capacity The number of values for which capacity should
         * be allocated.
         *
         * <p><b>Note:</b> Capacity will stay the same if this value is less than or
         * equal to the current capacity.</p>
         */
        public function allocate(int $capacity) {}

        /**
         * Returns the current capacity.
         *
         * @link https://www.php.net/manual/en/ds-queue.capacity.php
         *
         * @return int The current capacity.
         */
        public function capacity(): int {}

        /**
         * Removes all values from the queue.
         * @link https://www.php.net/manual/en/ds-queue.clear.php
         */
        public function clear(): void {}

        /**
         * Count elements of an object
         * @link https://php.net/manual/en/ds-queue.count.php
         * @return int The custom count as an integer.
         * </p>
         * <p>
         * The return value is cast to an integer.
         * @since 5.1
         */
        public function count(): int {}

        /**
         * Returns a shallow copy of the collection.
         * @link https://www.php.net/manual/en/ds-queue.copy.php
         * @return Queue<TValue>
         */
        public function copy(): Queue {}

        /**
         * @return Traversable<TValue>
         */
        public function getIterator(): Traversable {}

        /**
         * Returns whether the collection is empty.
         * @link https://www.php.net/manual/en/ds-queue.isempty.php
         * @return bool
         */
        public function isEmpty(): bool {}

        /**
         * Converts the collection to an array.
         * <p><b>Note:</b> Casting to an array is not supported yet.</p>
         * @link https://www.php.net/manual/en/ds-queue.toarray.php
         * @return array<TValue> An array containing all the values in the same order as
         * the collection.
         */
        public function toArray(): array {}

        /**
         * Specify data which should be serialized to JSON
         * @link https://php.net/manual/en/jsonserializable.jsonserialize.php
         * @return mixed data which can be serialized by <b>json_encode</b>,
         * which is a value of any type other than a resource.
         * @since 5.4
         */
        public function jsonSerialize() {}

        /**
         * Returns the value at the top of the queue, but does not remove it.
         *
         * @link https://www.php.net/manual/en/ds-queue.peek.php
         *
         * @return TValue The value at the top of the queue.
         *
         * @throws UnderflowException
         */
        public function peek() {}

        /**
         * Removes and returns the value at the top of the queue.
         *
         * @link https://www.php.net/manual/en/ds-queue.pop.php
         *
         * @return TValue The removed value which was at the top of the queue.
         *
         * @throws UnderflowException
         */
        public function pop() {}

        /**
         * Pushes values onto the queue.
         *
         * @link https://www.php.net/manual/en/ds-queue.push.php
         *
         * @param TValue ...$values The values to push onto the queue.
         */
        public function push(...$values) {}

        /**
         * @param int $offset
         */
        public function offsetExists(mixed $offset): bool {}

        /**
         * @param int $offset
         *
         * @return TValue
         */
        public function offsetGet(mixed $offset) {}

        /**
         * @param int $offset
         * @param TValue $value
         */
        public function offsetSet(mixed $offset, mixed $value) {}

        /**
         * @param int $offset
         */
        public function offsetUnset(mixed $offset): void {}
    }

    /**
     * A PriorityQueue is very similar to a Queue. Values are pushed into the
     * queue with an assigned priority, and the value with the highest priority
     * will always be at the front of the queue.
     *
     * Implemented using a max heap.
     *
     * @package Ds
     * @template TValue
     * @implements Collection<int, TValue>
     *
     * @link https://www.php.net/manual/en/class.ds-priorityqueue.php
     */
    class PriorityQueue implements Collection
    {
        public const MIN_CAPACITY = 8;

        /**
         * Count elements of an object
         * @link https://php.net/manual/en/countable.count.php
         * @return int The custom count as an integer.
         * </p>
         * <p>
         * The return value is cast to an integer.
         * @since 5.1
         */
        public function count(): int {}

        /**
         * Allocates enough memory for a required capacity
         * @link https://www.php.net/manual/en/ds-priorityqueue.allocate.php
         *
         * @param int $capacity
         */
        public function allocate(int $capacity): void {}

        /**
         * Returns the current capacity
         * @link https://www.php.net/manual/en/ds-priorityqueue.capacity.php
         *
         * @return int
         */
        public function capacity(): int {}

        /**
         * Removes all values from the collection.
         * @link https://www.php.net/manual/en/ds-collection.clear.php
         */
        public function clear(): void {}

        /**
         * Returns a shallow copy of the collection.
         * @link https://www.php.net/manual/en/ds-collection.copy.php
         * @return PriorityQueue<TValue>
         */
        public function copy() {}

        public function getIterator(): Traversable {}

        /**
         * Returns whether the collection is empty.
         * @link https://www.php.net/manual/en/ds-collection.isempty.php
         * @return bool
         */
        public function isEmpty(): bool {}

        /**
         * Returns the value at the front of the queue, but does not remove it.
         * @link https://www.php.net/manual/en/ds-priorityqueue.peek.php
         *
         * @return TValue The value at the front of the queue.
         * @throws UnderflowException if empty.
         */
        public function peek() {}

        /**
         * Removes and returns the value with the highest priority
         * @link https://www.php.net/manual/en/ds-priorityqueue.pop.php
         *
         * @return TValue The removed value which was at the front of the queue.
         * @throws UnderflowException if empty.
         */
        public function pop() {}

        /**
         * Pushes a value with a given priority into the queue.
         *
         * @param TValue $value
         * @param int $priority
         */
        public function push($value, int $priority) {}

        /**
         * Converts the collection to an array.
         * <p><b>Note:</b> Casting to an array is not supported yet.</p>
         * @link https://www.php.net/manual/en/ds-collection.toarray.php
         * @return array<TValue> An array containing all the values in the same order as
         * the collection.
         */
        public function toArray(): array {}

        /**
         * Specify data which should be serialized to JSON
         * @link https://php.net/manual/en/jsonserializable.jsonserialize.php
         * @return mixed data which can be serialized by <b>json_encode</b>,
         * which is a value of any type other than a resource.
         * @since 5.4
         */
        public function jsonSerialize() {}
    }
<?php
/**
 * Stubs for Zstandard
 * https://pecl.php.net/package/zstd
 * https://github.com/kjdev/php-ext-zstd
 */

namespace {
    /**
     * Minimal compress level value
     */
    define('ZSTD_COMPRESS_LEVEL_MIN', 1);

    /**
     * Maximal compress level value
     */
    define('ZSTD_COMPRESS_LEVEL_MAX', 22);

    /**
     * Default compress level value
     */
    define('ZSTD_COMPRESS_LEVEL_DEFAULT', 3);

    /**
     * libzstd version number
     */
    define('LIBZSTD_VERSION_NUMBER', 10405);

    /**
     * libzstd version string
     */
    define('LIBZSTD_VERSION_STRING', '1.4.5');

    /**
     * Zstandard compression.
     *
     * @param string $data The string to compress.
     * @param int $level The level of compression (1-22). (Defaults to 3, 0 for no compression).
     *                      A value smaller than 0 means a faster compression level. (Zstandard library 1.3.4 or later)
     *
     * @return string|false Returns the compressed data or FALSE if an error occurred.
     */
    function zstd_compress(string $data, int $level = 3): string|false {}

    /**
     * Zstandard decompression.
     *
     * @param string $data The compressed string.
     *
     * @return string|false Returns the decompressed data or FALSE if an error occurred.
     */
    function zstd_uncompress(string $data): string|false {}

    /**
     * Zstandard compression using a digested dictionary.
     *
     * @param string $data The string to compress.
     * @param string $dict The Dictionary data.
     *
     * @return string|false Returns the compressed data or FALSE if an error occurred.
     */
    function zstd_compress_dict(string $data, string $dict): string|false {}

    /**
     * Zstandard decompression using a digested dictionary.
     * An alias of {@see zstd_compress_dict}
     *
     * @param string $data The string to compress.
     * @param string $dict The Dictionary data.
     *
     * @return string|false Returns the compressed data or FALSE if an error occurred.
     */
    function zstd_compress_usingcdict(string $data, string $dict): string|false {}

    /**
     * Zstandard decompression using a digested dictionary.
     *
     * @param string $data The compressed string.
     * @param string $dict The Dictionary data.
     *
     * @return string|false Returns the decompressed data or FALSE if an error occurred.
     */
    function zstd_uncompress_dict(string $data, string $dict): string|false {}

    /**
     * Zstandard decompression using a digested dictionary.
     * An alias of {@see zstd_compress_dict}
     *
     * @param string $data The compressed string.
     * @param string $dict The Dictionary data.
     *
     * @return string|false Returns the decompressed data or FALSE if an error occurred.
     */
    function zstd_decompress_dict(string $data, string $dict): string|false {}

    /**
     * Zstandard decompression using a digested dictionary.
     * An alias of {@see zstd_compress_dict}
     *
     * @param string $data The compressed string.
     * @param string $dict The Dictionary data.
     *
     * @return string|false Returns the decompressed data or FALSE if an error occurred.
     */
    function zstd_uncompress_usingcdict(string $data, string $dict): string|false {}

    /**
     * Zstandard decompression using a digested dictionary.
     * An alias of {@see zstd_compress_dict}
     *
     * @param string $data The compressed string.
     * @param string $dict The Dictionary data.
     *
     * @return string|false Returns the decompressed data or FALSE if an error occurred.
     */
    function zstd_decompress_usingcdict(string $data, string $dict): string|false {}
}

namespace Zstd {
    /**
     * Zstandard compression.
     *
     * @param string $data The string to compress.
     * @param int $level The level of compression (1-22). (Defaults to 3, 0 for no compression).
     *                      A value smaller than 0 means a faster compression level. (Zstandard library 1.3.4 or later)
     *
     * @return string|false Returns the compressed data or FALSE if an error occurred.
     */
    function compress(string $data, int $level = 3): string|false {}

    /**
     * Zstandard decompression.
     *
     * @param string $data The compressed string.
     *
     * @return string|false Returns the decompressed data or FALSE if an error occurred.
     */
    function uncompress(string $data): string|false {}

    /**
     * Zstandard compression using a digested dictionary.
     *
     * @param string $data The string to compress.
     * @param string $dict The Dictionary data.
     *
     * @return string|false Returns the compressed data or FALSE if an error occurred.
     */
    function compress_dict(string $data, string $dict): string|false {}

    /**
     * Zstandard decompression using a digested dictionary.
     *
     * @param string $data The compressed string.
     * @param string $dict The Dictionary data.
     *
     * @return string|false Returns the decompressed data or FALSE if an error occurred.
     */
    function uncompress_dict(string $data, string $dict): string|false {}
}
<?php

namespace parallel;

use Closure;

/**
 * Each runtime represents a single PHP thread, the thread is created (and bootstrapped) upon construction. The thread
 * then waits for tasks to be scheduled: Scheduled tasks will be executed FIFO and then the thread will resume waiting
 * until more tasks are scheduled, or it's closed, killed, or destroyed by the normal scoping rules of PHP objects.
 *
 * Warning: When a runtime is destroyed by the normal scoping rules of PHP objects, it will first execute all of the
 * tasks that were scheduled, and block while doing so.
 *
 * When a new runtime is created, it does not share code with the thread (or process) that created it. This means it
 * doesn't have the same classes and functions loaded, nor the same autoloader set. In some cases, a very lightweight
 * runtime is desirable because the tasks that will be scheduled do not need access to the code in the parent thread.
 * In those cases where the tasks do need to access the same code, it is enough to set an autoloader as the bootstrap.
 *
 * Note: preloading may be used in conjunction with parallel, in this case preloaded code is available without
 * bootstrapping
 */
final class Runtime
{
    /* Create */

    /**
     * Shall construct a new runtime without bootstrapping.
     * Shall construct a bootstrapped runtime.
     *
     * @param null|string $bootstrap The location of a bootstrap file, generally an autoloader.
     *
     * @throws Runtime\Error if thread could not be created
     * @throws Runtime\Error\Bootstrap if bootstrapping failed
     */
    public function __construct(?string $bootstrap = null) {}

    /* Execute */

    /**
     * Shall schedule task for execution in parallel, passing argv at execution time.
     *
     * @param Closure $task    A Closure with specific characteristics.
     * @param null|array $argv An array of arguments with specific characteristics to be passed to task at execution
     *                         time.
     *
     * ### Task Characteristics
     * -----------------------------------------------------------------------------------------------------------------
     * Closures scheduled for parallel execution must not:
     *  - accept or return by reference
     *  - accept or return internal objects (see notes)
     *  - execute a limited set of instructions
     *
     * Instructions prohibited in Closures intended for parallel execution are:
     *  - yield
     *  - use by-reference
     *  - declare class
     *  - declare named function
     *
     * Note: Nested closures may yield or use by-reference, but must not contain class or named function declarations.
     * Note: No instructions are prohibited in the files which the task may include.
     *
     * ### Arguments Characteristics
     * -----------------------------------------------------------------------------------------------------------------
     * Arguments must not:
     *  - contain references
     *  - contain resources
     *  - contain internal objects (see notes)
     *
     * Note: In the case of file stream resources, the resource will be cast to the file descriptor and passed as int
     *     where possible, this is unsupported on Windows
     *
     * ### Internal Objects Notes
     * -----------------------------------------------------------------------------------------------------------------
     * Internal objects generally use a custom structure which cannot be copied by value safely, PHP currently lacks
     *     the mechanics to do this (without serialization) and so only objects that do not use a custom structure may
     *     be shared.
     *
     * Some internal objects do not use a custom structure, for example @see \parallel\Events\Event and so may be
     *     shared. Closures are a special kind of internal object and support being copied by value, and so may be
     *     shared. Channels are central to writing parallel code and support concurrent access and execution by
     *     necessity, and so may be shared.
     *
     * Warning: A user class that extends an internal class may use a custom structure as defined by the internal
     *     class, in which case they cannot be copied by value safely, and so may not be shared.
     *
     * @return Future|null The return Future must not be ignored when the task contains a return or throw
     *     statement.
     *
     * @throws Runtime\Error\Closed if \parallel\Runtime was closed.
     * @throws Runtime\Error\IllegalFunction if task is a closure created from an internal function.
     * @throws Runtime\Error\IllegalInstruction if task contains illegal instructions.
     * @throws Runtime\Error\IllegalParameter if task accepts or argv contains illegal variables.
     * @throws Runtime\Error\IllegalReturn if task returns illegally.
     */
    public function run(Closure $task, ?array $argv = null): ?Future {}

    /* Join */

    /**
     * Shall request that the runtime shutsdown.
     * Note: Tasks scheduled for execution will be executed before the shutdown occurs.
     *
     * @throws Runtime\Error\Closed if Runtime was already closed.
     */
    public function close(): void {}

    /**
     * Shall attempt to force the runtime to shutdown.
     *
     * Note: Tasks scheduled for execution will not be executed, the currently running task shall be interrupted.
     * Warning: Internal function calls in progress cannot be interrupted.
     *
     * @throws Runtime\Error\Closed if Runtime was closed.
     */
    public function kill(): void {}
}
<?php

namespace parallel;

use Throwable;

/**
 * A Future represents the return value or uncaught exception from a task, and exposes an API for cancellation.
 *
 * The behaviour of a future also allows it to be used as a simple synchronization point even where the task does not
 * return a value explicitly.
 *
 * @see https://www.php.net/manual/en/class.parallel-future.php
 */
final class Future
{
    /* Resolution */

    /**
     * Shall return (and if necessary wait for) return from task
     *
     * @return mixed
     *
     * @throws Future\Error if waiting failed (internal error).
     * @throws Future\Error\Killed if \parallel\Runtime executing task was killed.
     * @throws Future\Error\Cancelled if task was cancelled.
     * @throws Future\Error\Foreign if task raised an unrecognized uncaught exception.
     * @throws Throwable Shall rethrow \Throwable uncaught in task
     */
    public function value() {}

    /* State */

    /**
     * Shall indicate if the task is completed
     * @return bool
     */
    public function done(): bool {}

    /**
     * Shall indicate if the task was cancelled
     * @return bool
     */
    public function cancelled(): bool {}

    /* Cancellation */

    /**
     * Shall try to cancel the task
     * Note: If task is running, it will be interrupted.
     * Warning: Internal function calls in progress cannot be interrupted.
     *
     * @return bool
     *
     * @throws Future\Error\Killed if \parallel\Runtime executing task was killed.
     * @throws Future\Error\Cancelled if task was already cancelled.
     */
    public function cancel(): bool {}
}
<?php

namespace parallel\Sync\Error;

use parallel\Sync\Error;

class IllegalValue extends Error {}
<?php

namespace parallel\Sync;

class Error extends \parallel\Error {}
<?php

namespace parallel\Events\Input\Error;

use parallel\Events\Input\Error;

class IllegalValue extends Error {}
<?php

namespace parallel\Events\Input\Error;

use parallel\Events\Input\Error;

class Existence extends Error {}
<?php

namespace parallel\Events\Input;

class Error extends \parallel\Error {}
<?php

namespace parallel\Events\Error;

use parallel\Events\Error;

class Existence extends Error {}
<?php

namespace parallel\Events\Error;

use parallel\Events\Error;

class Timeout extends Error {}
<?php

namespace parallel\Events;

class Error extends \parallel\Error {}
<?php

namespace parallel\Events\Event;

final class Type
{
    /** Event::$object was read into Event::$value */
    public const Read = 1;

    /** Input for Event::$source written to Event::$object */
    public const Write = 2;

    /** Event::$object (Channel) was closed */
    public const Close = 3;

    /** Event::$object (Future) was cancelled */
    public const Cancel = 5;

    /** Runtime executing Event::$object (Future) was killed */
    public const Kill = 6;

    /** Event::$object (Future) raised error */
    public const Error = 4;
}
<?php

namespace parallel\Events\Event;

class Error extends \parallel\Error {}
<?php

namespace parallel\Events;

/**
 * When an Event is returned, @see Event::$object shall be removed from the loop that returned it, should the event be a
 * write event the Input for @see Event::$source shall also be removed.
 */
final class Event
{
    /**
     * Shall be one of Event\Type constants
     * @var int
     */
    public $type;

    /**
     * Shall be the source of the event (target name)
     * @var string
     */
    public $source;

    /**
     * Shall be either Future or Channel
     * @var object
     */
    public $object;

    /**
     * Shall be set for Read/Error events
     * @var mixed
     */
    public $value;
}
<?php

namespace parallel\Events;

/**
 * ### Events Input
 * ---------------------------------------------------------------------------------------------------------------------
 * An Input object is a container for data that the @see \parallel\Events object will write to @see \parallel\Channel
 * objects as they become available. Multiple event loops may share an Input container - parallel does not verify the
 * contents of the container when it is set as the input for a \parallel\Events object.
 *
 * Note: When a parallel\Events object performs a write, the target is removed from the input object as if
 * @see Input::remove() were called.
 */
final class Input
{
    /**
     * Shall set input for the given target
     *
     * @param string $target
     * @param mixed  $value
     *
     * @throws Input\Error\Existence if input for target already exists.
     * @throws Input\Error\IllegalValue if value is illegal (object, null).
     */
    public function add(string $target, $value): void {}

    /**
     * Shall remove input for the given target
     * @param string $target
     * @throws Input\Error\Existence if input for target does not exist.
     */
    public function remove(string $target): void {}

    /**
     * Shall remove input for all targets
     */
    public function clear(): void {}
}
<?php

namespace parallel\Future\Error;

use parallel\Error;

class Cancelled extends Error {}
<?php

namespace parallel\Future\Error;

use parallel\Error;

class Foreign extends Error {}
<?php

namespace parallel\Future\Error;

use parallel\Error;

class Killed extends Error {}
<?php

namespace parallel\Future;

class Error extends \parallel\Error {}
<?php

namespace parallel;

use Countable;
use parallel\Events\Event;
use parallel\Events\Input;
use Traversable;

/**
 * ### The Event Loop
 * ---------------------------------------------------------------------------------------------------------------------
 * The Event loop monitors the state of sets of futures and or channels (targets) in order to perform read
 * (Future::value(), Channel::recv()) and write (Channel::send()) operations as the targets become available and the
 * operations may be performed without blocking the event loop.
 */
final class Events implements Countable, Traversable
{
    /* Input */

    /**
     * Shall set input for this event loop
     * @param Events\Input $input
     */
    public function setInput(Input $input): void {}

    /* Targets */

    /**
     * Shall watch for events on the given channel
     * @param Channel $channel
     *
     * @throws Events\Error\Existence if channel was already added.
     */
    public function addChannel(Channel $channel): void {}

    /**
     * Shall watch for events on the given future
     *
     * @param string $name
     * @param Future $future
     *
     * @throws Events\Error\Existence if target with the given name was already added.
     */
    public function addFuture(string $name, Future $future): void {}

    /**
     * Shall remove the given target
     * @param string $target
     *
     * @throws Events\Error\Existence if target with the given name was not found.
     */
    public function remove(string $target): void {}

    /* Behaviour */

    /**
     * Shall set blocking mode
     *
     * By default when events are polled for, blocking will occur (at the PHP level) until the first event can be
     * returned: Setting blocking mode to false will cause poll to return control if the first target polled is not
     * ready.
     *
     * This differs from setting a timeout of 0 with @see Events::setTimeout(), since a timeout of 0, while
     * allowed, will cause an exception to be raised, which may be extremely slow or wasteful if what is really desired
     * is non-blocking behaviour.
     *
     * A non-blocking loop effects the return value of @see Events::poll(), such that it may be null before all events
     * have been processed.
     *
     * @param bool $blocking
     *
     * @throws Events\Error if loop has timeout set.
     */
    public function setBlocking(bool $blocking): void {}

    /* Behaviour */

    /**
     * Shall set the timeout in microseconds
     *
     * By default when events are polled for, blocking will occur (at the PHP level) until the first event can be
     * returned: Setting the timeout causes an exception to be thrown when the timeout is reached.
     *
     * This differs from setting blocking mode to false with @see Events::setBlocking(), which will not cause an
     * exception to be thrown.
     *
     * @throws Events\Error if loop is non-blocking.
     *
     * @param int $timeout
     */
    public function setTimeout(int $timeout): void {}

    /* Polling */

    /**
     * Shall poll for the next event
     *
     * Should there be no targets remaining, null shall be returned
     * Should this be a non-blocking loop, and blocking would occur, null shall be returned
     * Otherwise, the Event returned describes the event.
     *
     * @return Event|null
     *
     * @throws Events\Error\Timeout if timeout is used and reached.
     */
    public function poll(): ?Event {}

    /**
     * @return int
     */
    public function count(): int {}
}
<?php

namespace parallel;

class Error extends \Error {}
<?php

namespace parallel\Channel\Error;

use parallel\Channel\Error;

class IllegalValue extends Error {}
<?php

namespace parallel\Channel\Error;

use parallel\Channel\Error;

class Existence extends Error {}
<?php

namespace parallel\Channel\Error;

use parallel\Channel\Error;

class Closed extends Error {}
<?php

namespace parallel\Channel;

class Error extends \parallel\Error {}
<?php

namespace parallel;

/**
 * The Sync class provides access to low level synchronization primitives, mutex, condition variables, and allows the
 * implementation of semaphores.
 *
 * Synchronization for most applications is much better implemented using channels, however, in some cases authors of
 * low level code may find it useful to be able to access these lower level mechanisms.
 */
final class Sync
{
    /* Constructor */

    /**
     * Shall construct a new synchronization object with no value
     * Shall construct a new synchronization object containing the given scalar value
     *
     * @param string|int|float|bool $value
     *
     * @throws Sync\Error\IllegalValue if value is non-scalar.
     */
    public function __construct($value = null) {}

    /* Access */

    /**
     * Shall atomically return the synchronization objects value
     * @return string|int|float|bool
     */
    public function get() {}

    /**
     * Shall atomically set the value of the synchronization object
     * @param string|int|float|bool $value
     *
     * @throws Sync\Error\IllegalValue if value is non-scalar.
     */
    public function set($value) {}

    /* Synchronization */

    /**
     * Shall wait for notification on this synchronization object
     * @return bool
     */
    public function wait(): bool {}

    /**
     * Shall notify one (by default) or all threads waiting on the synchronization object
     * @param bool $all
     *
     * @return bool
     */
    public function notify(bool $all = null): bool {}

    /**
     * Shall exclusively enter into the critical code
     * @param callable $block
     */
    public function __invoke(callable $block) {}
}
<?php

namespace parallel\Runtime\Type;

class Unavailable {}
<?php

namespace parallel\Runtime\Error;

use parallel\Runtime\Error;

class Bootstrap extends Error {}
<?php

namespace parallel\Runtime\Error;

use parallel\Runtime\Error;

class IllegalParameter extends Error {}
<?php

namespace parallel\Runtime\Error;

use parallel\Runtime\Error;

class IllegalReturn extends Error {}
<?php

namespace parallel\Runtime\Error;

use parallel\Runtime\Error;

class IllegalVariable extends Error {}
<?php

namespace parallel\Runtime\Error;

use parallel\Runtime\Error;

class Killed extends Error {}
<?php

namespace parallel\Runtime\Error;

use parallel\Runtime\Error;

class Closed extends Error {}
<?php

namespace parallel\Runtime\Error;

use parallel\Runtime\Error;

class IllegalInstruction extends Error {}
<?php

namespace parallel\Runtime\Error;

use parallel\Runtime\Error;

class IllegalFunction extends Error {}
<?php

namespace parallel\Runtime\Object;

class Unavailable {}
<?php

namespace parallel\Runtime;

class Error extends \parallel\Error {}
<?php

namespace parallel;

/**
 * ### Unbuffered Channels
 * ---------------------------------------------------------------------------------------------------------------------
 * An unbuffered channel will block on calls to @see Channel::send() until there is a receiver, and block on calls
 * to @see Channel::recv() until there is a sender. This means an unbuffered channel is not only a way to share
 * data among tasks but also a simple method of synchronization.
 *
 *  An unbuffered channel is the fastest way to share data among tasks, requiring the least copying.
 *
 * ### Buffered Channels
 * ---------------------------------------------------------------------------------------------------------------------
 *  A buffered channel will not block on calls to @see Channel::send() until capacity is reached, calls to
 * @see Channel::recv() will block until there is data in the buffer.
 *
 * ### Closures over Channels
 * ---------------------------------------------------------------------------------------------------------------------
 * A powerful feature of parallel channels is that they allow the exchange of closures between tasks (and runtimes).
 *
 * When a closure is sent over a channel the closure is buffered, it doesn't change the buffering of the channel
 *     transmitting the closure, but it does effect the static scope inside the closure: The same closure sent to
 *     different runtimes, or the same runtime, will not share their static scope.
 *
 * This means that whenever a closure is executed that was transmitted by a channel, static state will be as it was
 *     when the closure was buffered.
 *
 * ### Anonymous Channels
 * ---------------------------------------------------------------------------------------------------------------------
 * The anonymous channel constructor allows the programmer to avoid assigning names to every channel: parallel will
 *     generate a unique name for anonymous channels.
 */
final class Channel
{
    /**
     * Constant for Infinitely Buffered
     */
    public const Infinite = -1;

    /* Anonymous Constructor */

    /**
     * Shall make an anonymous unbuffered channel
     * Shall make an anonymous buffered channel with the given capacity
     *
     * @param null|int $capacity May be Channel::Infinite or a positive integer
     */
    public function __construct(?int $capacity = null) {}

    /* Access */

    /**
     * Shall make an unbuffered channel with the given name
     * Shall make a buffered channel with the given name and capacity
     *
     * @param string $name     The name of the channel.
     * @param null|int $capacity May be Channel::Infinite or a positive integer
     *
     * @return Channel
     *
     * @throws Channel\Error\Existence if channel already exists.
     */
    public static function make(string $name, ?int $capacity = null): Channel {}

    /**
     * Shall open the channel with the given name
     *
     * @param string $name
     * @return Channel
     *
     * @throws Channel\Error\Existence if channel does not exist.
     */
    public static function open(string $name): Channel {}

    /* Sharing */

    /**
     * Shall send the given value on this channel
     * @param mixed $value
     *
     * @throws Channel\Error\Closed if channel is closed.
     * @throws Channel\Error\IllegalValue if value is illegal.
     */
    public function send($value): void {}

    /**
     * Shall recv a value from this channel
     * @return mixed
     *
     * @throws Channel\Error\Closed if channel is closed.
     */
    public function recv() {}

    /* Closing */

    /**
     * Shall close this channel
     * @throws Channel\Error\Closed if channel is closed.
     */
    public function close(): void {}

    /**
     * Returns name of channel
     * @return string
     */
    public function __toString(): string {}
}
<?php

namespace parallel;

use Closure;

/**
 * Shall use the provided file to bootstrap all runtimes created for automatic scheduling via @see run().
 *
 * @param string $file
 *
 * @throws Runtime\Error\Bootstrap if previously called for this process.
 * @throws Runtime\Error\Bootstrap if called after @see run().
 */
function bootstrap(string $file): void {}

/**
 * @see Runtime::run() for more details
 * @link https://www.php.net/manual/en/parallel.run
 * @param Closure $task
 * @param array   $argv
 *
 * ### Automatic Scheduling
 * ---------------------------------------------------------------------------------------------------------------------
 * If a \parallel\Runtime internally created and cached by a previous call to parallel\run() is idle, it will be used
 *     to execute the task. If no \parallel\Runtime is idle parallel will create and cache a \parallel\Runtime.
 *
 * Note: \parallel\Runtime objects created by the programmer are not used for automatic scheduling.
 *
 * @return Future|null
 *
 * @throws Runtime\Error\Closed if \parallel\Runtime was closed.
 * @throws Runtime\Error\IllegalFunction if task is a closure created from an internal function.
 * @throws Runtime\Error\IllegalInstruction if task contains illegal instructions.
 * @throws Runtime\Error\IllegalParameter if task accepts or argv contains illegal variables.
 * @throws Runtime\Error\IllegalReturn if task returns illegally.
 */
function run(Closure $task, array $argv = null): ?Future {}

#ifdef ZEND_DEBUG
/**
 * @return int
 */
function count(): int {}
#endif
<?php

// Start of judy.

/**
 * Class Judy.
 * @link https://php.net/manual/en/class.judy.php
 */
class Judy implements ArrayAccess
{
    /**
     * Define the Judy Array as a Bitset with keys as Integer and Values as a Boolean.
     * @link https://php.net/manual/en/class.judy.php#judy.constants.bitset
     */
    public const BITSET = 1;

    /**
     * Define the Judy Array with key/values as Integer, and Integer only.
     * @link https://php.net/manual/en/class.judy.php#judy.constants.int-to-int
     */
    public const INT_TO_INT = 2;

    /**
     * Define the Judy Array with keys as Integer and Values of any type.
     * @link https://php.net/manual/en/class.judy.php#judy.constants.int-to-mixed
     */
    public const INT_TO_MIXED = 3;

    /**
     * Define the Judy Array with keys as a String and Values as Integer, and Integer only.
     * @link https://php.net/manual/en/class.judy.php#judy.constants.string-to-int
     */
    public const STRING_TO_INT = 4;

    /**
     * Define the Judy Array with keys as a String and Values of any type.
     * @link https://php.net/manual/en/class.judy.php#judy.constants.string-to-mixed
     */
    public const STRING_TO_MIXED = 5;

    /**
     * (PECL judy &gt;= 0.1.1)<br/>
     * Construct a new Judy object. A Judy object can be accessed like a PHP Array.
     * @link https://php.net/manual/en/judy.construct.php
     * @param int $judy_type <p>The Judy type to be used.</p>
     */
    public function __construct($judy_type) {}

    /**
     * (PECL judy &gt;= 0.1.1)<br/>
     * Destruct a Judy object.
     * @link https://php.net/manual/en/judy.destruct.php
     */
    public function __destruct() {}

    /**
     * (PECL judy &gt;= 0.1.1)<br/>
     * Locate the Nth index present in the Judy array.
     * @link https://php.net/manual/en/judy.bycount.php
     * @param int $nth_index <p>Nth index to return. If nth_index equal 1, then it will return the first index in the array.</p>
     * @return int <p>Return the index at the given Nth position.</p>
     */
    public function byCount($nth_index) {}

    /**
     * (PECL judy &gt;= 0.1.1)<br/>
     * Count the number of elements in the Judy array.
     * @link https://php.net/manual/en/judy.count.php
     * @param int $index_start [optional] <p>Start counting from the given index. Default is first index.</p>
     * @param int $index_end [optional] <p>Stop counting when reaching this index. Default is last index.</p>
     * @return int <p>Return the number of elements.</p>
     */
    public function count($index_start = 0, $index_end = -1) {}

    /**
     * (PECL judy &gt;= 0.1.1)<br/>
     * Search (inclusive) for the first index present that is equal to or greater than the passed Index.
     * @link https://php.net/manual/en/judy.first.php
     * @param mixed $index [optional] <p>The index can be an integer or a string corresponding to the index where to start the search.</p>
     * @return mixed <p>Return the corresponding index in the array.</p>
     */
    public function first($index = 0) {}

    /**
     * (PECL judy &gt;= 0.1.1)<br/>
     * Search (inclusive) for the first absent index that is equal to or greater than the passed Index.
     * @link https://php.net/manual/en/judy.firstempty.php
     * @param mixed $index [optional] <p>The index can be an integer or a string corresponding to the index where to start the search.</p>
     * @return mixed <p>Return the corresponding index in the array.</p>
     */
    public function firstEmpty($index = 0) {}

    /**
     * (PECL judy &gt;= 0.1.1)<br/>
     * Free the entire Judy array.
     * @link https://php.net/manual/en/judy.free.php
     */
    public function free() {}

    /**
     * (PECL judy &gt;= 0.1.1)<br/>
     * Return an integer corresponding to the Judy type of the current object.
     * @link https://php.net/manual/en/judy.gettype.php
     * @return int <p>Return an integer corresponding to a Judy type.</p>
     */
    public function getType() {}

    /**
     * (PECL judy &gt;= 0.1.1)<br/>
     * Search (inclusive) for the last index present that is equal to or less than the passed Index.
     * @link https://php.net/manual/en/judy.last.php
     * @param int|string $index [optional] <p>The index can be an integer or a string corresponding to the index where to start the search.</p>
     * @return mixed <p>Return the corresponding index in the array.</p>
     */
    public function last($index = -1) {}

    /**
     * (PECL judy &gt;= 0.1.1)<br/>
     * Search (inclusive) for the last absent index that is equal to or less than the passed Index.
     * @link https://php.net/manual/en/judy.lastempty.php
     * @param int|string $index [optional] <p>The index can be an integer or a string corresponding to the index where to start the search.</p>
     * @return mixed <p>Return the corresponding index in the array.</p>
     */
    public function lastEmpty($index = -1) {}

    /**
     * (PECL judy &gt;= 0.1.1)<br/>
     * Return the memory used by the Judy array.
     * @link https://php.net/manual/en/judy.memoryusage.php
     * @return int <p>Return the memory used in bytes.</p>
     */
    public function memoryUsage() {}

    /**
     * (PECL judy &gt;= 0.1.1)<br/>
     * Search (exclusive) for the next index present that is greater than the passed Index.
     * @link https://php.net/manual/en/judy.next.php
     * @param mixed $index <p>The index can be an integer or a string corresponding to the index where to start the search.</p>
     * @return mixed <p>Return the corresponding index in the array.</p>
     */
    public function next($index) {}

    /**
     * (PECL judy &gt;= 0.1.1)<br/>
     * Search (exclusive) for the next absent index that is greater than the passed Index.
     * @link https://php.net/manual/en/judy.nextempty.php
     * @param int|string $index <p>The index can be an integer or a string corresponding to the index where to start the search.</p>
     * @return mixed <p>Return the corresponding index in the array.</p>
     */
    public function nextEmpty($index) {}

    /**
     * (PECL judy &gt;= 0.1.1)<br/>
     * Whether or not an offset exists.
     * @link https://php.net/manual/en/judy.offsetexists.php
     * @param mixed $offset <p>An offset to check for.</p>
     * @return bool <p>Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.</p>
     */
    public function offsetExists($offset) {}

    /**
     * (PECL judy &gt;= 0.1.1)<br/>
     * Returns the value at specified offset.
     * @link https://php.net/manual/en/judy.offsetget.php
     * @param mixed $offset <p>An offset to check for.</p>
     * @return mixed <p>Can return all value types.</p>
     */
    public function offsetGet($offset) {}

    /**
     * (PECL judy &gt;= 0.1.1)<br/>
     * Assigns a value to the specified offset.
     * @link https://php.net/manual/en/judy.offsetset.php
     * @param mixed $offset <p>The offset to assign the value to.</p>
     * @param mixed $value <p>The value to set.</p>
     */
    public function offsetSet($offset, $value) {}

    /**
     * (PECL judy &gt;= 0.1.1)<br/>
     * Unsets an offset.
     * @link https://php.net/manual/en/judy.offsetunset.php
     * @param mixed $offset <p>The offset to assign the value to.</p>
     */
    public function offsetUnset($offset) {}

    /**
     * (PECL judy &gt;= 0.1.1)<br/>
     * Search (exclusive) for the previous index present that is less than the passed Index.
     * @link https://php.net/manual/en/judy.prev.php
     * @param mixed $index <p>The index can be an integer or a string corresponding to the index where to start the search.</p>
     * @return mixed <p>Return the corresponding index in the array.</p>
     */
    public function prev($index) {}

    /**
     * (PECL judy &gt;= 0.1.1)<br/>
     * Search (exclusive) for the previous index absent that is less than the passed Index.
     * @link https://php.net/manual/en/judy.prevempty.php
     * @param mixed $index <p>The index can be an integer or a string corresponding to the index where to start the search.</p>
     * @return mixed <p>Return the corresponding index in the array.</p>
     */
    public function prevEmpty($index) {}

    /**
     * (PECL judy &gt;= 0.1.1)<br/>
     * Count the number of elements in the Judy array.<br/>
     * This method is an alias of      const count.
     * @link https://php.net/manual/en/judy.size.php
     * @param int $index_start [optional] <p>Start counting from the given index. Default is first index.</p>
     * @param int $index_end [optional] <p>Stop counting when reaching this index. Default is last index.</p>
     * @return int <p>Return the number of elements.</p>
     */
    public function size($index_start = 0, $index_end = -1) {}
}

// End of judy.
<?php

namespace Mosquitto;

/**
 * @link https://mosquitto-php.readthedocs.io/en/latest/client.html
 **/
class Client
{
    /** @const LOG_DEBUG Identifies a debug-level log message */
    public const LOG_DEBUG = 16;

    /** @const LOG_INFO Identifies an info-level log message */
    public const LOG_INFO = 1;

    /** @const LOG_NOTICE Identifies a notice-level log message */
    public const LOG_NOTICE = 2;

    /** @const LOG_WARNING Identifies a warning-level log message */
    public const LOG_WARNING = 4;

    /** @const LOG_ERR Identifies an error-level log message */
    public const LOG_ERR = 8;

    /** @const SSL_VERIFY_NONE Used with `setTlsInsecure`. Do not verify the identity of the server, thus making the connection insecure. */
    public const SSL_VERIFY_NONE = 0;

    /** @const SSL_VERIFY_PEER Used with `setTlsInsecure`. Verify the identity of the server. */
    public const SSL_VERIFY_PEER = 1;

    /**
     * Construct a new Client instance.
     *
     * @param string|null $id The client ID. If omitted or null, one will be generated at random.
     * @param bool $cleanSession Set to true to instruct the broker to clean all messages and subscriptions on disconnect. Must be true if the $id parameter is null.
     */
    public function __construct($id = null, $cleanSession = true) {}

    /**
     * Set the username and password to use on connecting to the broker. Must be called before `connect`.
     *
     * @param string $username Username to supply to the broker
     * @param string $password Password to supply to the broker
     */
    public function setCredentials($username, $password) {}

    /**
     * Configure the client for certificate based SSL/TLS support. Must be called before connect. Cannot be used in
     * conjunction with setTlsPSK.
     *
     * Define the Certificate Authority certificates to be trusted (ie. the server certificate must be signed
     * with one of these certificates) using $caFile. If the server you are connecting to requires clients
     * to provide a certificate, define $certFile and $keyFile with your client certificate and private key.
     * If your private key is encrypted, provide the password as the fourth parameter.
     *
     * @param string $caPath Path to the PEM encoded trusted CA certificate files, or to a directory containing them.
     * @param string|null $certFile Path to the PEM encoded certificate file for this client. Optional.
     * @param string|null $keyFile Path to a file containing the PEM encoded private key for this client. Required if certfile is set.
     * @param string|null $password The password for the keyfile, if it is encrypted. If null, the password will be asked for on the command line.
     * @return int|null
     */
    public function setTlsCertificates($caPath, $certFile = null, $keyFile = null, $password = null) {}

    /**
     * Configure verification of the server hostname in the server certificate. If `$value` is `true`, it is impossible
     * to guarantee that the host you are connecting to is not impersonating your server. Do not use this function in a
     * real system. Must be called before `connect`.
     *
     * @param bool $value If set to false, the default, certificate hostname checking is performed. If set to `true`, no hostname checking is performed and the connection is insecure.
     */
    public function setTlsInsecure($value) {}

    /**
     * Set advanced SSL/TLS options. Must be called before `connect`.
     *
     * @param int $certReqs Whether or not to verify the server. Can be Client::SSL_VERIFY_NONE, to disable certificate verification, or Client::SSL_VERIFY_PEER (the default), to verify the server certificate.
     * @param string|null $tlsVersion The TLS version to use. If `null`, a default is used. The default value depends on the version of OpenSSL the library was compiled against. Available options on OpenSSL >= 1.0.1 are `tlsv1.2`, `tlsv1.1` and `tlsv1`.
     * @param string|null $ciphers A string describing the ciphers available for use. See the `openssl ciphers` tool for more information. If `null`, the default set will be used.
     * @return int
     */
    public function setTlsOptions($certReqs, $tlsVersion = null, $ciphers = null) {}

    /**
     * Configure the client for pre-shared-key based TLS support. Must be called before `connect`. Cannot be used in
     * conjunction with setTlsCertificates.
     *
     * @param string $psk The pre-shared key in hex format with no leading "0x".
     * @param string $identity The identity of this client. May be used as the username depending on server settings.
     * @param string|null $ciphers Optional. A string describing the ciphers available for use. See the `openssl ciphers` tool for more information. If `null`, the default set will be used.
     * @return int
     */
    public function setTlsPSK($psk, $identity, $ciphers = null) {}

    /**
     * Set the client “last will and testament”, which will be sent on an unclean disconnection from the broker.
     * Must be called before `connect`.
     *
     * @param string $topic The topic on which to publish the will.
     * @param string $payload The data to send.
     * @param int $qos Optional. Default 0. Integer 0, 1, or 2 indicating the Quality of Service to be used.
     * @param bool $retain Optional. Default false. If true, the message will be retained.
     */
    public function setWill($topic, $payload, $qos = 0, $retain = false) {}

    /**
     * Remove a previously-set will. No parameters.
     */
    public function clearWill() {}

    /**
     * Control the behaviour of the client when it has unexpectedly disconnected in Client::loopForever().
     * The default behaviour if this method is not used is to repeatedly attempt to reconnect with a delay of 1 second
     * until the connection succeeds.
     *
     * @param int $reconnectDelay Set delay between successive reconnection attempts.
     * @param int $exponentialDelay Set max delay between successive reconnection attempts when exponential backoff is enabled
     * @param bool $exponentialBackoff Pass `true` to enable exponential backoff
     */
    public function setReconnectDelay($reconnectDelay, $exponentialDelay = 0, $exponentialBackoff = false) {}

    /**
     * Connect to an MQTT broker.
     *
     * @param string $host Hostname to connect to
     * @param int $port Optional. Port number to connect to. Defaults to 1883.
     * @param int $keepalive Optional. Number of sections after which the broker should PING the client if no messages have been received.
     * @param string|null $interface Optional. The address or hostname of a local interface to bind to for this connection.
     * @return int
     */
    public function connect($host, $port = 1883, $keepalive = 60, $interface = null) {}

    /**
     * Disconnect from the broker. No parameters.
     */
    public function disconnect() {}

    /**
     * Set the connect callback. This is called when the broker sends a CONNACK message in response to a connection.
     *
     * (int) $rc, (string) $message
     * function ($rc, $message) {}
     *
     * Response codes:
     * 0 = Success
     * 1 = Connection refused (unacceptable protocol version)
     * 2 = Connection refused (identifier rejected)
     * 3 = Connection refused (broker unavailable)
     * 4-255 = Reserved for future use
     *
     * @param callable $callback
     */
    public function onConnect($callback) {}

    /**
     * Set the disconnect callback. This is called when the broker has received the DISCONNECT command and has
     * disconnected the client.
     *
     * (int) $rc
     * function ($rc) {}
     *
     * Response codes:
     * 0 = requested by client
     * <0 = indicates an unexpected disconnection.
     *
     * @param callable $callback
     */
    public function onDisconnect($callback) {}

    /**
     * Set the logging callback.
     *
     * (int) $level, (string) $str
     * function ($level, $str) {}
     *
     * Log levels:
     * Client::LOG_DEBUG
     * Client::LOG_INFO
     * Client::LOG_NOTICE
     * Client::LOG_WARNING
     * Client::LOG_ERR
     *
     * @param callable $callback
     */
    public function onLog($callback) {}

    /**
     * Set the subscribe callback. This is called when the broker responds to a subscription request.
     *
     * (int) $mid, (int) $qosCount
     * function ($mid, $qosCount) {}
     *
     * @param callable $callback
     */
    public function onSubscribe($callback) {}

    /**
     * Set the unsubscribe callback. This is called when the broker responds to a unsubscribe request.
     *
     * (int) $mid
     * function ($mid) {}
     *
     * @param callable $callback
     */
    public function onUnsubscribe($callback) {}

    /**
     * Set the message callback. This is called when a message is received from the broker.
     *
     * (object) $message
     * function (Mosquitto\Message $message) {}
     *
     * @param callable $callback
     */
    public function onMessage($callback) {}

    /**
     * Set the publish callback. This is called when a message is published by the client itself.
     *
     * Warning: this may be called before the method publish returns the message id, so, you need to create a queue to
     * deal with the MID list.
     *
     * (int) $mid - the message id returned by `publish`
     * function ($mid) {}
     *
     * @param callable $callback
     */
    public function onPublish($callback) {}

    /**
     * Set the number of QoS 1 and 2 messages that can be “in flight” at one time. An in flight message is part way
     * through its delivery flow. Attempts to send further messages with publish will result in the messages
     * being queued until the number of in flight messages reduces.
     *
     * Set to 0 for no maximum.
     *
     * @param int $maxInFlightMessages
     */
    public function setMaxInFlightMessages($maxInFlightMessages) {}

    /**
     * Set the number of seconds to wait before retrying messages. This applies to publishing messages with QoS > 0.
     * May be called at any time.
     *
     * @param int $messageRetryPeriod The retry period
     */
    public function setMessageRetry($messageRetryPeriod) {}

    /**
     * Publish a message on a given topic.
     * Return the message ID returned by the broker. Warning: the message ID is not unique.
     *
     * @param string $topic The topic to publish on
     * @param string $payload The message payload
     * @param int $qos Integer value 0, 1 or 2 indicating the QoS for this message
     * @param bool $retain If true, retain this message
     * @return int
     */
    public function publish($topic, $payload, $qos = 0, $retain = false) {}

    /**
     * Subscribe to a topic.
     * Return the message ID of the subscription message, so this can be matched up in the `onSubscribe` callback.
     *
     * @param string $topic
     * @param int $qos
     * @return int
     */
    public function subscribe($topic, $qos) {}

    /**
     * Unsubscribe from a topic.
     * Return the message ID of the subscription message, so this can be matched up in the `onUnsubscribe` callback.
     *
     * @param string $topic
     * @param int $qos
     * @return int
     */
    public function unsubscribe($topic, $qos) {}

    /**
     * The main network loop for the client. You must call this frequently in order to keep communications between
     * the client and broker working. If incoming data is present it will then be processed. Outgoing commands,
     * from e.g. `publish`, are normally sent immediately that their function is called, but this is not always possible.
     * `loop` will also attempt to send any remaining outgoing messages, which also includes commands that are part
     * of the flow for messages with QoS > 0.
     *
     * @param int $timeout Optional. Number of milliseconds to wait for network activity. Pass 0 for instant timeout.
     */
    public function loop($timeout = 1000) {}

    /**
     * Call loop() in an infinite blocking loop. Callbacks will be called as required. This will handle reconnecting
     * if the connection is lost. Call `disconnect` in a callback to disconnect and return from the loop. Alternatively,
     * call `exitLoop` to exit the loop without disconnecting. You will need to re-enter the loop again afterwards
     * to maintain the connection.
     *
     * @param int $timeout Optional. Number of milliseconds to wait for network activity. Pass 0 for instant timeout.
     */
    public function loopForever($timeout = 1000) {}

    /**
     * Exit the `loopForever` event loop without disconnecting. You will need to re-enter the loop afterwards
     * in order to maintain the connection.
     */
    public function exitLoop() {}
}

/**
 * @link https://mosquitto-php.readthedocs.io/en/latest/message.html
 */
class Message
{
    /** @var string */
    public $topic;

    /** @var string */
    public $payload;

    /** @var int */
    public $mid;

    /** @var int */
    public $qos;

    /** @var bool */
    public $retain;

    /**
     * Returns true if the supplied topic matches the supplied description, and otherwise false.
     *
     * @param string $topic The topic to match
     * @param string $subscription The subscription to match
     * @return bool
     */
    public static function topicMatchesSub($topic, $subscription) {}

    /**
     * Tokenise a topic or subscription string into an array of strings representing the topic hierarchy.
     *
     * @param string $topic
     * @return array
     */
    public static function tokeniseTopic($topic) {}
}

/**
 * @link https://mosquitto-php.readthedocs.io/en/latest/exception.html
 */
class Exception extends \Exception {}
<?php

// Start of com_dotnet v.

/**
 * The COM class allows you to instantiate an OLE compatible COM object and call its methods and access its properties.
 * @link https://php.net/manual/en/class.com.php
 */
class COM
{
    /**
     * (PHP 4 &gt;= 4.1.0, PHP 5, PHP 7)<br/>
     * COM class constructor.
     * @param string $module_name
     * @param string $server_name [optional]
     * @param int $codepage [optional]
     * @param string $typelib [optional]
     */
    public function __construct($module_name, $server_name = null, $codepage = CP_ACP, $typelib = null) {}

    public function __get($name) {}

    public function __set($name, $value) {}

    public function __call($name, $args) {}
}

/**
 * The DOTNET class allows you to instantiate a class from a .Net assembly and call its methods and access its properties.
 * @link https://php.net/manual/en/class.dotnet.php
 */
class DOTNET
{
    /**
     * (PHP 4 &gt;= 4.1.0, PHP 5, PHP 7)<br/>
     * COM class constructor.
     * @param string $assembly_name
     * @param string $class_name
     * @param int $codepage [optional]
     */
    public function __construct($assembly_name, string $class_name, $codepage = CP_ACP) {}

    public function __get($name) {}

    public function __set($name, $value) {}

    public function __call($name, $args) {}
}

/**
 * The VARIANT is COM's equivalent of the PHP zval; it is a structure that can contain a value with a range of different possible types. The VARIANT class provided by the COM extension allows you to have more control over the way that PHP passes values to and from COM.
 * @link https://php.net/manual/en/class.variant.php
 */
class VARIANT
{
    /**
     * (PHP 4 &gt;= 4.1.0, PHP 5, PHP 7)<br/>
     * COM class constructor.
     * @param mixed $value [optional]
     * @param int $type [optional]
     * @param int $codepage [optional]
     */
    public function __construct($value = null, int $type = VT_EMPTY, $codepage = CP_ACP) {}

    public function __get($name) {}

    public function __set($name, $value) {}

    public function __call($name, $args) {}
}

/**
 * This extension will throw instances of the class com_exception whenever there is a potentially fatal error reported by COM. All COM exceptions have a well-defined code property that corresponds to the HRESULT return value from the various COM operations. You may use this code to make programmatic decisions on how to handle the exception.
 * @link https://php.net/manual/en/com.error-handling.php
 */
class com_exception extends \Exception {}

/**
 * (PHP 5, PHP 7)<br/>
 * Generate a globally unique identifier (GUID)
 * @link https://php.net/manual/en/function.com-create-guid.php
 * @return string
 */
function com_create_guid() {}

/**
 * (PHP 4 &gt;= 4.2.0, PHP 5, PHP 7)<br/>
 * Connect events from a COM object to a PHP object
 * @link https://php.net/manual/en/function.com-event-sink.php
 * @param \VARIANT $comobject
 * @param object $sinkobject
 * @param string $sinkinterface [optional]
 * @return bool
 */
function com_event_sink($comobject, $sinkobject, $sinkinterface = null) {}

/**
 * (PHP 5, PHP 7)<br/>
 * Returns a handle to an already running instance of a COM object
 * @link https://php.net/manual/en/function.com-get-active-object.php
 * @param string $progid
 * @param int $code_page [optional]
 * @return \VARIANT
 */
function com_get_active_object($progid, $code_page = CP_ACP) {}

/**
 * (PHP 4 &gt;= 4.1.0, PHP 5, PHP 7)<br/>
 * Loads a Typelib
 * @link https://php.net/manual/en/function.com-get-active-object.php
 * @param string $typelib_name
 * @param bool $case_insensitive [optional]
 * @return bool
 */
function com_load_typelib($typelib_name, $case_insensitive = true) {}

/**
 * (PHP 4 &gt;= 4.2.0, PHP 5, PHP 7)<br/>
 * Process COM messages, sleeping for up to timeoutms milliseconds
 * @link https://php.net/manual/en/function.com-message-pump.php
 * @param int $timeoutms [optional]
 * @return bool
 */
function com_message_pump($timeoutms = 0) {}

/**
 * (PHP 4 &gt;= 4.2.0, PHP 5, PHP 7)<br/>
 * Print out a PHP class definition for a dispatchable interface
 * @link https://php.net/manual/en/function.com-print-typeinfo.php
 * @param object $comobject
 * @param string $dispinterface [optional]
 * @param bool $wantsink [optional]
 * @return bool
 */
function com_print_typeinfo($comobject, $dispinterface = null, $wantsink = false) {}

/**
 * (PHP 5, PHP 7)<br/>
 * Returns the absolute value of a variant
 * @link https://php.net/manual/en/function.variant-abs.php
 * @param mixed $val
 * @return mixed
 */
function variant_abs($val) {}

/**
 * (PHP 5, PHP 7)<br/>
 * "Adds" two variant values together and returns the result
 * @link https://php.net/manual/en/function.variant-abs.php
 * @param mixed $left
 * @param mixed $right
 * @return mixed
 */
function variant_add($left, $right) {}

/**
 * (PHP 5, PHP 7)<br/>
 * Performs a bitwise AND operation between two variants
 * @link https://php.net/manual/en/function.variant-and.php
 * @param mixed $left
 * @param mixed $right
 * @return mixed
 */
function variant_and($left, $right) {}

/**
 * (PHP 5, PHP 7)<br/>
 * Convert a variant into a new variant object of another type
 * @link https://php.net/manual/en/function.variant-cast.php
 * @param \VARIANT $variant
 * @param int $type
 * @return \VARIANT
 */
function variant_cast($variant, $type) {}

/**
 * (PHP 5, PHP 7)<br/>
 * Concatenates two variant values together and returns the result
 * @link https://php.net/manual/en/function.variant-cat.php
 * @param mixed $left
 * @param mixed $right
 * @return mixed
 */
function variant_cat($left, $right) {}

/**
 * (PHP 5, PHP 7)<br/>
 * Compares two variants
 * @link https://php.net/manual/en/function.variant-cmp.php
 * @param mixed $left
 * @param mixed $right
 * @param int $lcid [optional]
 * @param int $flags [optional]
 * @return int
 */
function variant_cmp($left, $right, $lcid = null, $flags = null) {}

/**
 * (PHP 5, PHP 7)<br/>
 * Returns a variant date representation of a Unix timestamp
 * @link https://php.net/manual/en/function.variant-date-from-timestamp.php
 * @param int $timestamp
 * @return \VARIANT
 */
function variant_date_from_timestamp($timestamp) {}

/**
 * (PHP 5, PHP 7)<br/>
 * Converts a variant date/time value to Unix timestamp
 * @link https://php.net/manual/en/function.variant-date-to-timestamp.php
 * @param \VARIANT $variant
 * @return int
 */
function variant_date_to_timestamp($variant) {}

/**
 * (PHP 5, PHP 7)<br/>
 * Returns the result from dividing two variants
 * @link https://php.net/manual/en/function.variant-div.php
 * @param mixed $left
 * @param mixed $right
 * @return mixed
 */
function variant_div($left, $right) {}

/**
 * (PHP 5, PHP 7)<br/>
 * Performs a bitwise equivalence on two variants
 * @link https://php.net/manual/en/function.variant-eqv.php
 * @param mixed $left
 * @param mixed $right
 * @return mixed
 */
function variant_eqv($left, $right) {}

/**
 * (PHP 5, PHP 7)<br/>
 * Returns the integer portion of a variant
 * @link https://php.net/manual/en/function.variant-fix.php
 * @param mixed $variant
 * @return mixed
 */
function variant_fix($variant) {}

/**
 * (PHP 5, PHP 7)<br/>
 * Returns the type of a variant object
 * @link https://php.net/manual/en/function.variant-get-type.php
 * @param VARIANT $variant
 * @return int
 */
function variant_get_type($variant) {}

/**
 * (PHP 5, PHP 7)<br/>
 * Converts variants to integers and then returns the result from dividing them
 * @link https://php.net/manual/en/function.variant-idiv.php
 * @param mixed $left
 * @param mixed $right
 * @return mixed
 */
function variant_idiv($left, $right) {}

/**
 * (PHP 5, PHP 7)<br/>
 * Performs a bitwise implication on two variants
 * @link https://php.net/manual/en/function.variant-imp.php
 * @param mixed $left
 * @param mixed $right
 * @return mixed
 */
function variant_imp($left, $right) {}

/**
 * (PHP 5, PHP 7)<br/>
 * Returns the integer portion of a variant
 * @link https://php.net/manual/en/function.variant-int.php
 * @param mixed $variant
 * @return mixed
 */
function variant_int($variant) {}

/**
 * (PHP 5, PHP 7)<br/>
 * Divides two variants and returns only the remainder
 * @link https://php.net/manual/en/function.variant-mod.php
 * @param mixed $left
 * @param mixed $right
 * @return mixed
 */
function variant_mod($left, $right) {}

/**
 * (PHP 5, PHP 7)<br/>
 * Multiplies the values of the two variants
 * @link https://php.net/manual/en/function.variant-mul.php
 * @param mixed $left
 * @param mixed $right
 * @return mixed
 */
function variant_mul($left, $right) {}

/**
 * (PHP 5, PHP 7)<br/>
 * Performs logical negation on a variant
 * @link https://php.net/manual/en/function.variant-neg.php
 * @param mixed $variant
 * @return mixed
 */
function variant_neg($variant) {}

/**
 * (PHP 5, PHP 7)<br/>
 * Performs bitwise not negation on a variant
 * @link https://php.net/manual/en/function.variant-not.php
 * @param mixed $variant
 * @return mixed
 */
function variant_not($variant) {}

/**
 * (PHP 5, PHP 7)<br/>
 * Performs a logical disjunction on two variants
 * @link https://php.net/manual/en/function.variant-or.php
 * @param mixed $left
 * @param mixed $right
 * @return mixed
 */
function variant_or($left, $right) {}

/**
 * (PHP 5, PHP 7)<br/>
 * Returns the result of performing the power function with two variants
 * @link https://php.net/manual/en/function.variant-pow.php
 * @param mixed $left
 * @param mixed $right
 * @return mixed
 */
function variant_pow($left, $right) {}

/**
 * (PHP 5, PHP 7)<br/>
 * Rounds a variant to the specified number of decimal places
 * @link https://php.net/manual/en/function.variant-round.php
 * @param mixed $variant
 * @param int $decimals
 * @return mixed
 */
function variant_round($variant, $decimals) {}

/**
 * (PHP 5, PHP 7)<br/>
 * Convert a variant into another type "in-place"
 * @link https://php.net/manual/en/function.variant-set-type.php
 * @param VARIANT $variant
 * @param int $type
 * @return void
 */
function variant_set_type($variant, $type) {}

/**
 * (PHP 5, PHP 7)<br/>
 * Assigns a new value for a variant object
 * @link https://php.net/manual/en/function.variant-set.php
 * @param VARIANT $variant
 * @param mixed $value
 * @return void
 */
function variant_set($variant, $value) {}

/**
 * (PHP 5, PHP 7)<br/>
 * Subtracts the value of the right variant from the left variant value
 * @link https://php.net/manual/en/function.variant-sub.php
 * @param mixed $left
 * @param mixed $right
 * @return mixed
 */
function variant_sub($left, $right) {}

/**
 * (PHP 5, PHP 7)<br/>
 * Performs a logical exclusion on two variants
 * @link https://php.net/manual/en/function.variant-xor.php
 * @param mixed $left
 * @param mixed $right
 * @return mixed
 */
function variant_xor($left, $right) {}

define('CLSCTX_INPROC_SERVER', 1);
define('CLSCTX_INPROC_HANDLER', 2);
define('CLSCTX_LOCAL_SERVER', 4);
define('CLSCTX_REMOTE_SERVER', 16);
define('CLSCTX_SERVER', 21);
define('CLSCTX_ALL', 23);

define('VT_NULL', 1);
define('VT_EMPTY', 0);
define('VT_UI1', 17);
define('VT_I2', 2);
define('VT_I4', 3);
define('VT_R4', 4);
define('VT_R8', 5);
define('VT_BOOL', 11);
define('VT_ERROR', 10);
define('VT_CY', 6);
define('VT_DATE', 7);
define('VT_BSTR', 8);
define('VT_DECIMAL', 14);
define('VT_UNKNOWN', 13);
define('VT_DISPATCH', 9);
define('VT_VARIANT', 12);
define('VT_I1', 16);
define('VT_UI2', 18);
define('VT_UI4', 19);
define('VT_INT', 22);
define('VT_UINT', 23);
define('VT_ARRAY', 8192);
define('VT_BYREF', 16384);

define('CP_ACP', 0);
define('CP_MACCP', 2);
define('CP_OEMCP', 1);
define('CP_UTF7', 65000);
define('CP_UTF8', 65001);
define('CP_SYMBOL', 42);
define('CP_THREAD_ACP', 3);

define('VARCMP_LT', 0);
define('VARCMP_EQ', 1);
define('VARCMP_GT', 2);
define('VARCMP_NULL', 3);

define('NORM_IGNORECASE', 1);
define('NORM_IGNORENONSPACE', 2);
define('NORM_IGNORESYMBOLS', 4);
define('NORM_IGNOREWIDTH', 131072);
define('NORM_IGNOREKANATYPE', 65536);
define('NORM_IGNOREKASHIDA', 262144);

define('DISP_E_DIVBYZERO', -2147352558);
define('DISP_E_OVERFLOW', -2147352566);
define('MK_E_UNAVAILABLE', -2147221021);

// End of com v.
<?php

// Start of pdo_ibm v.1.2.3

function confirm_pdo_ibm_compiled() {}

// End of pdo_ibm v.1.2.3
<?php

/** @link https://github.com/krakjoe/pcov/blob/develop/README.md */

namespace {
    define('pcov\all', 0);
    define('pcov\inclusive', 1);
    define('pcov\exclusive', 2);
    define('pcov\version', '1.0.6');
}

namespace pcov
{
    /**
     * (PHP &gt;= 7.0, PECL pcov &gt;= 1.0.0)<br/>
     * Shall start recording coverage information
     * @return void
     */
    function start() {}

    /**
     * (PHP &gt;= 7.0, PECL pcov &gt;= 1.0.0)<br/>
     * Shall stop recording coverage information
     * @return void
     */
    function stop() {}

    /**
     * (PHP &gt;= 7.0, PECL pcov &gt;= 1.0.0)<br/>
     * Shall collect coverage information
     * @param int $type [optional] <p>
     * pcov\all shall collect coverage information for all files
     * pcov\inclusive shall collect coverage information for the specified files
     * pcov\exclusive shall collect coverage information for all but the specified files
     * </p>
     * @param array $filter <p>
     * path of files (realpath) that should be filtered
     * </p>
     * @return array
     */
    function collect(int $type = all, array $filter = []) {}

    /**
     * (PHP &gt;= 7.0, PECL pcov &gt;= 1.0.0)<br/>
     * Shall clear stored information
     * @param bool $files [optional] <p>
     * set true to clear file tables
     * Note: clearing the file tables may have surprising consequences
     * </p>
     * @return void
     */
    function clear(bool $files = false) {}

    /**
     * (PHP &gt;= 7.0, PECL pcov &gt;= 1.0.0)<br/>
     * Shall return list of files waiting to be collected
     * @return array
     */
    function waiting() {}

    /**
     * (PHP &gt;= 7.0, PECL pcov &gt;= 1.0.0)<br/>
     * Shall return the current size of the trace and cfg arena
     * @return int
     */
    function memory() {}
}
<?php

use JetBrains\PhpStorm\Deprecated;

/**
 * Returns the full list of error codes.
 * @return array
 */
function rd_kafka_get_err_descs() {}

/**
 * Retrieve the current number of threads in use by librdkafka.
 * @return int
 */
function rd_kafka_thread_cnt() {}

/**
 * @param int $err Error code
 *
 * @return string Returns the error as a string.
 */
function rd_kafka_err2str($err) {}

/**
 * @param int $errnox A system errno
 *
 * @return int Returns a kafka error code as an integer.
 */
#[Deprecated]
function rd_kafka_errno2err($errnox) {}

/**
 * @return int Returns the system errno as an integer.
 */
#[Deprecated]
function rd_kafka_errno() {}

/**
 * @param int $cnt
 *
 * @return int Returns the special offset as an integer.
 */
function rd_kafka_offset_tail($cnt) {}
<?php

namespace RdKafka;

class Message
{
    /**
     * @var int
     */
    public $err;

    /**
     * @var string
     */
    public $topic_name;

    /**
     * @var int
     */
    public $timestamp;

    /**
     * @var int
     */
    public $partition;

    /**
     * @var string
     */
    public $payload;

    /**
     * @var int
     */
    public $len;

    /**
     * @var string
     */
    public $key;

    /**
     * @var int
     */
    public $offset;

    /**
     * @var array
     */
    public $headers;
    public $opaque;

    /**
     * @return string
     */
    public function errstr() {}
}
<?php

namespace RdKafka;

class ConsumerTopic extends Topic
{
    private function __construct() {}

    /**
     * @param int $partition
     * @param int $timeout_ms
     *
     * @return Message|null
     */
    public function consume($partition, $timeout_ms) {}

    /**
     * @param int   $partition
     * @param int   $offset
     * @param Queue $queue
     *
     * @return void
     */
    public function consumeQueueStart($partition, $offset, $queue) {}

    /**
     * @param int $partition
     * @param int $offset
     *
     * @return void
     */
    public function consumeStart($partition, $offset) {}

    /**
     * @param int $partition
     *
     * @return void
     */
    public function consumeStop($partition) {}

    /**
     * @param int $partition
     * @param int $offset
     *
     * @return void
     */
    public function offsetStore($partition, $offset) {}

    public function consumeCallback($partition, $timeout_ms, $callback) {}

    public function consumeBatch($partition, $timeout_ms, $batch_size) {}
}
<?php

namespace RdKafka;

class KafkaConsumer
{
    /**
     * @param Conf $conf
     */
    public function __construct($conf) {}

    /**
     * @param TopicPartition[] $topic_partitions
     *
     * @throws Exception
     * @return void
     */
    public function assign($topic_partitions = null) {}

    /**
     * @param null|Message|TopicPartition[] $message_or_offsets
     *
     * @throws Exception
     * @return void
     */
    public function commit($message_or_offsets = null) {}

    /**
     * @param null|Message|TopicPartition[] $message_or_offsets
     *
     * @throws Exception
     * @return void
     */
    public function commitAsync($message_or_offsets = null) {}

    /**
     * @param int $timeout_ms
     *
     * @throws Exception
     * @throws \InvalidArgumentException
     * @return Message
     */
    public function consume($timeout_ms) {}

    /**
     * @throws Exception
     * @return TopicPartition[]
     */
    public function getAssignment() {}

    /**
     * @param bool               $all_topics
     * @param null|KafkaConsumerTopic $only_topic
     * @param int                $timeout_ms
     *
     * @throws Exception
     * @return Metadata
     */
    public function getMetadata($all_topics, $only_topic = null, $timeout_ms) {}

    /**
     * @return array
     */
    public function getSubscription() {}

    /**
     * @param array $topics
     *
     * @throws Exception
     * @return void
     */
    public function subscribe($topics) {}

    /**
     * @throws Exception
     * @return void
     */
    public function unsubscribe() {}

    /**
     * @param array $topic_partitions
     * @param int   $timeout_ms
     *
     * @return array
     */
    public function getCommittedOffsets($topic_partitions, $timeout_ms) {}

    /**
     * @param TopicPartition[] $topic_partitions
     * @param int $timeout_ms
     *
     * @return TopicPartition[]
     */
    public function offsetsForTimes($topic_partitions, $timeout_ms) {}

    /**
     * @param string $topic
     * @param int $partition
     * @param int &$low
     * @param int &$high
     * @param int $timeout_ms
     *
     * @return void
     */
    public function queryWatermarkOffsets($topic, $partition = 0, &$low = 0, &$high = 0, $timeout_ms = 0) {}

    /**
     * @param TopicPartition[] $topic_partitions
     */
    public function getOffsetPositions($topic_partitions) {}

    /**
     * @param string    $topic_name
     * @param null|TopicConf $topic_conf
     *
     * @return Topic
     */
    public function newTopic($topic_name, $topic_conf = null) {}

    /**
     * @return void
     */
    public function close() {}
}
<?php

namespace RdKafka;

class TopicPartition
{
    /**
     * @param string $topic
     * @param int    $partition
     * @param int    $offset
     */
    public function __construct($topic, $partition, $offset = null) {}

    /**
     * @return int
     */
    public function getOffset() {}

    /**
     * @return int
     */
    public function getPartition() {}

    /**
     * @return string
     */
    public function getTopic() {}

    /**
     * @param int $offset
     *
     * @return void
     */
    public function setOffset($offset) {}

    /**
     * @param int $partition
     *
     * @return void
     */
    public function setPartition($partition) {}

    /**
     * @param string $topic_name
     *
     * @return void
     */
    public function setTopic($topic_name) {}
}
<?php

namespace RdKafka;

use RdKafka\Metadata\Collection;
use RdKafka\Metadata\Topic;

class Metadata
{
    /**
     * @return Collection
     */
    public function getBrokers() {}

    /**
     * @return Collection|Topic[]
     */
    public function getTopics() {}

    /**
     * @return int
     */
    public function getOrigBrokerId() {}

    /**
     * @return string
     */
    public function getOrigBrokerName() {}
}
<?php

namespace RdKafka;

class KafkaConsumerTopic extends Topic
{
    private function __construct() {}

    /**
     * @param int $partition
     * @param int $offset
     *
     * @return void
     */
    public function offsetStore($partition, $offset) {}
}
<?php

namespace RdKafka;

/**
 * Configuration reference: https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md
 */
class Conf
{
    public function __construct() {}

    /**
     * @return array
     */
    public function dump() {}

    /**
     * @param string $name
     * @param string $value
     *
     * @return void
     */
    public function set($name, $value) {}

    /**
     * @param TopicConf $topic_conf
     *
     * @return void
     */
    public function setDefaultTopicConf($topic_conf) {}

    /**
     * @param callable $callback
     *
     * @return void
     */
    public function setDrMsgCb($callback) {}

    /**
     * @param callable $callback
     *
     * @return void
     */
    public function setErrorCb($callback) {}

    /**
     * @param callable $callback
     *
     * @return void
     */
    public function setRebalanceCb($callback) {}

    /**
     * @param callable $callback
     *
     * @return void
     */
    public function setStatsCb($callback) {}

    /**
     * @param callable $callback
     *
     * @return void
     */
    public function setOffsetCommitCb($callback) {}

    /**
     * @param callable $callback
     *
     * @return void
     */
    public function setConsumeCb($callback) {}

    /**
     * @param callable $callback
     *
     * @return void
     */
    public function setLogCb($callback) {}
}
<?php

namespace RdKafka;

/**
 * Configuration reference: https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md
 */
class TopicConf
{
    public function __construct() {}

    /**
     * @return array
     */
    public function dump() {}

    /**
     * @param string $name
     * @param string $value
     *
     * @return void
     */
    public function set($name, $value) {}

    /**
     * @param int $partitioner
     *
     * @return void
     */
    public function setPartitioner($partitioner) {}
}
<?php

namespace RdKafka;

abstract class Topic
{
    /**
     * @return string
     */
    public function getName() {}
}
<?php

namespace RdKafka\Metadata;

class Broker
{
    public function getId() {}

    public function getHost() {}

    public function getPort() {}
}
<?php

namespace RdKafka\Metadata;

class Partition
{
    /**
     * @return int
     */
    public function getId() {}

    /**
     * @return mixed
     */
    public function getErr() {}

    /**
     * @return mixed
     */
    public function getLeader() {}

    /**
     * @return mixed
     */
    public function getReplicas() {}

    /**
     * @return mixed
     */
    public function getIsrs() {}
}
<?php

namespace RdKafka\Metadata;

class Topic
{
    /**
     * @return string
     */
    public function getTopic() {}

    /**
     * @return Partition[]
     */
    public function getPartitions() {}

    /**
     * @return mixed
     */
    public function getErr() {}
}
<?php

namespace RdKafka\Metadata;

class Collection implements \Iterator, \Countable
{
    /**
     * @return mixed
     */
    public function current() {}

    /**
     * @return void
     */
    public function next() {}

    /**
     * @return mixed
     */
    public function key() {}

    /**
     * @return bool
     */
    public function valid() {}

    /**
     * @return void
     */
    public function rewind() {}

    /**
     * @return int
     */
    public function count() {}
}
<?php

namespace RdKafka;

class Producer extends \RdKafka
{
    /**
     * @param null|Conf $conf
     */
    public function __construct($conf = null) {}

    /**
     * @param string    $topic_name
     * @param null|TopicConf $topic_conf
     *
     * @return ProducerTopic
     */
    public function newTopic($topic_name, ?TopicConf $topic_conf = null) {}

    /**
     * @param int $timeout_ms
     *
     * @return void
     */
    public function initTransactions($timeout_ms) {}

    /**
     * @return void
     */
    public function beginTransaction() {}

    /**
     * @param int $timeout_ms
     *
     * @return void
     */
    public function commitTransaction($timeout_ms) {}

    /**
     * @param int $timeout_ms
     *
     * @return void
     */
    public function abortTransaction($timeout_ms) {}
}
<?php

namespace RdKafka;

class KafkaErrorException extends Exception
{
    /**
     * @param string $message
     * @param int $code
     * @param string $error_string
     * @param bool $isFatal
     * @param bool $isRetriable
     * @param bool $transactionRequiresAbort
     */
    public function __construct($message, $code, $error_string, $isFatal, $isRetriable, $transactionRequiresAbort) {}

    /**
     * @return string
     */
    public function getErrorString() {}

    /**
     * @return bool
     */
    public function isFatal() {}

    /**
     * @return bool
     */
    public function isRetriable() {}

    /**
     * @return bool
     */
    public function transactionRequiresAbort() {}
}
<?php

namespace RdKafka;

class Exception extends \Exception {}
<?php

namespace RdKafka;

class ProducerTopic extends Topic
{
    private function __construct() {}

    /**
     * @param int         $partition
     * @param int         $msgflags
     * @param string|null $payload
     * @param string|null $key
     * @param string|null $msg_opaque
     *
     * @return void
     */
    public function produce($partition, $msgflags, $payload = null, $key = null, $msg_opaque = null) {}

    /**
     * @param int         $partition
     * @param int         $msgflags
     * @param string|null $payload
     * @param string|null $key
     * @param array|null  $headers
     * @param int         $timestamp_ms
     * @param string|null $msg_opaque
     *
     * @return void
     */
    public function producev($partition, $msgflags, $payload = null, $key = null, $headers = null, $timestamp_ms = 0, $msg_opaque = null) {}
}
<?php

namespace RdKafka;

class Consumer extends \RdKafka
{
    /**
     * @param null|Conf $conf
     */
    public function __construct($conf = null) {}

    /**
     * @param string    $topic_name
     * @param null|TopicConf $topic_conf
     *
     * @return ConsumerTopic
     */
    public function newTopic($topic_name, ?TopicConf $topic_conf = null) {}

    /**
     * @return Queue
     */
    public function newQueue() {}
}
<?php

namespace RdKafka;

class Queue
{
    private function __construct() {}

    /**
     * @param int $timeout_ms
     *
     * @return Message|null
     */
    public function consume($timeout_ms) {}
}
<?php

const RD_KAFKA_RESP_ERR__BEGIN = -200;
const RD_KAFKA_RESP_ERR__BAD_MSG = -199;
const RD_KAFKA_RESP_ERR__BAD_COMPRESSION = -198;
const RD_KAFKA_RESP_ERR__DESTROY = -197;
const RD_KAFKA_RESP_ERR__FAIL = -196;
const RD_KAFKA_RESP_ERR__TRANSPORT = -195;
const RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = -194;
const RD_KAFKA_RESP_ERR__RESOLVE = -193;
const RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = -192;
const RD_KAFKA_RESP_ERR__PARTITION_EOF = -191;
const RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = -190;
const RD_KAFKA_RESP_ERR__FS = -189;
const RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = -188;
const RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = -187;
const RD_KAFKA_RESP_ERR__INVALID_ARG = -186;
const RD_KAFKA_RESP_ERR__TIMED_OUT = -185;
const RD_KAFKA_RESP_ERR__QUEUE_FULL = -184;
const RD_KAFKA_RESP_ERR__ISR_INSUFF = -183;
const RD_KAFKA_RESP_ERR__NODE_UPDATE = -182;
const RD_KAFKA_RESP_ERR__SSL = -181;
const RD_KAFKA_RESP_ERR__WAIT_COORD = -180;
const RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = -179;
const RD_KAFKA_RESP_ERR__IN_PROGRESS = -178;
const RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = -177;
const RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = -176;
const RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = -175;
const RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = -174;
const RD_KAFKA_RESP_ERR__CONFLICT = -173;
const RD_KAFKA_RESP_ERR__STATE = -172;
const RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = -171;
const RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = -170;
const RD_KAFKA_RESP_ERR__AUTHENTICATION = -169;
const RD_KAFKA_RESP_ERR__NO_OFFSET = -168;
const RD_KAFKA_RESP_ERR__OUTDATED = -167;
const RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = -166;
const RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = -165;
const RD_KAFKA_RESP_ERR__WAIT_CACHE = -164;
const RD_KAFKA_RESP_ERR__INTR = -163;
const RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = -162;
const RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = -161;
const RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = -160;
const RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = -159;
const RD_KAFKA_RESP_ERR__PARTIAL = -158;
const RD_KAFKA_RESP_ERR__END = -100;
const RD_KAFKA_RESP_ERR_UNKNOWN = -1;
const RD_KAFKA_RESP_ERR_NO_ERROR = 0;
const RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1;
const RD_KAFKA_RESP_ERR_INVALID_MSG = 2;
const RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3;
const RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4;
const RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5;
const RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6;
const RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7;
const RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8;
const RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9;
const RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10;
const RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11;
const RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12;
const RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13;
const RD_KAFKA_RESP_ERR_GROUP_LOAD_IN_PROGRESS = 14;
const RD_KAFKA_RESP_ERR_GROUP_COORDINATOR_NOT_AVAILABLE = 15;
const RD_KAFKA_RESP_ERR_NOT_COORDINATOR_FOR_GROUP = 16;
const RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17;
const RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18;
const RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19;
const RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20;
const RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21;
const RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22;
const RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23;
const RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24;
const RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25;
const RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26;
const RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27;
const RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28;
const RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29;
const RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30;
const RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31;
const RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32;
const RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33;
const RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34;
const RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35;
const RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36;
const RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37;
const RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38;
const RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39;
const RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40;
const RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41;
const RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42;
const RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43;
const RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44;
const RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45;
const RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46;
const RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47;
const RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48;
const RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49;
const RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50;
const RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51;
const RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52;
const RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53;
const RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54;
const RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55;
const RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS = 14;
const RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE = 15;
const RD_KAFKA_RESP_ERR_NOT_COORDINATOR = 16;
const RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56;
const RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57;
const RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58;
const RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59;
const RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60;
const RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61;
const RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62;
const RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63;
const RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64;
const RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65;
const RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66;
const RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67;
const RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68;
const RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69;
const RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70;
const RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71;
const RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72;
const RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73;
const RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74;
const RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75;
const RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76;
const RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77;
const RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78;
const RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79;
const RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80;
const RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81;
const RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID = 82;
const RD_KAFKA_RESP_ERR_ELIGIBLE_LEADERS_NOT_AVAILABLE = 83;
const RD_KAFKA_RESP_ERR_ELECTION_NOT_NEEDED = 84;
const RD_KAFKA_RESP_ERR_NO_REASSIGNMENT_IN_PROGRESS = 85;
const RD_KAFKA_RESP_ERR_GROUP_SUBSCRIBED_TO_TOPIC = 86;
const RD_KAFKA_RESP_ERR_INVALID_RECORD = 87;
const RD_KAFKA_RESP_ERR_UNSTABLE_OFFSET_COMMIT = 88;
const RD_KAFKA_RESP_ERR__READ_ONLY = -157;
const RD_KAFKA_RESP_ERR__NOENT = -156;
const RD_KAFKA_RESP_ERR__UNDERFLOW = -155;
const RD_KAFKA_RESP_ERR__INVALID_TYPE = -154;
const RD_KAFKA_RESP_ERR__RETRY = -153;
const RD_KAFKA_RESP_ERR__PURGE_QUEUE = -152;
const RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = -151;
const RD_KAFKA_RESP_ERR__FATAL = -150;
const RD_KAFKA_RESP_ERR__INCONSISTENT = -149;
const RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = -148;
const RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = -147;
const RD_KAFKA_RESP_ERR__UNKNOWN_BROKER = -146;
const RD_KAFKA_RESP_ERR__NOT_CONFIGURED = -145;
const RD_KAFKA_RESP_ERR__FENCED = -144;
const RD_KAFKA_RESP_ERR__APPLICATION = -143;
const RD_KAFKA_RESP_ERR__ASSIGNMENT_LOST = -142;
const RD_KAFKA_RESP_ERR__NOOP = -141;
const RD_KAFKA_RESP_ERR__AUTO_OFFSET_RESET = -140;
const RD_KAFKA_RESP_ERR_THROTTLING_QUOTA_EXCEEDED = 89;
const RD_KAFKA_RESP_ERR_PRODUCER_FENCED = 90;
const RD_KAFKA_RESP_ERR_RESOURCE_NOT_FOUND = 91;
const RD_KAFKA_RESP_ERR_DUPLICATE_RESOURCE = 92;
const RD_KAFKA_RESP_ERR_UNACCEPTABLE_CREDENTIAL = 93;
const RD_KAFKA_RESP_ERR_INCONSISTENT_VOTER_SET = 94;
const RD_KAFKA_RESP_ERR_INVALID_UPDATE_VERSION = 95;
const RD_KAFKA_RESP_ERR_FEATURE_UPDATE_FAILED = 96;
const RD_KAFKA_RESP_ERR_PRINCIPAL_DESERIALIZATION_FAILURE = 97;
const RD_KAFKA_CONSUMER = 1;
const RD_KAFKA_OFFSET_BEGINNING = -2;
const RD_KAFKA_OFFSET_END = -1;
const RD_KAFKA_OFFSET_STORED = -1000;
const RD_KAFKA_OFFSET_INVALID = -1001;
const RD_KAFKA_PARTITION_UA = -1;
const RD_KAFKA_PRODUCER = 0;
const RD_KAFKA_VERSION = 17236223;
const RD_KAFKA_BUILD_VERSION = 17236223;
const RD_KAFKA_CONF_UNKNOWN = -2;
const RD_KAFKA_CONF_INVALID = -1;
const RD_KAFKA_CONF_OK = 0;
const RD_KAFKA_MSG_PARTITIONER_RANDOM = 2;
const RD_KAFKA_MSG_PARTITIONER_CONSISTENT = 3;
const RD_KAFKA_MSG_PARTITIONER_CONSISTENT_RANDOM = 4;
const RD_KAFKA_MSG_PARTITIONER_MURMUR2 = 5;
const RD_KAFKA_MSG_PARTITIONER_MURMUR2_RANDOM = 6;
const RD_KAFKA_MSG_F_BLOCK = 4;
const RD_KAFKA_LOG_PRINT = 100;
const RD_KAFKA_LOG_SYSLOG = 101;
const RD_KAFKA_LOG_SYSLOG_PRINT = 102;
const RD_KAFKA_PURGE_F_QUEUE = 1;
const RD_KAFKA_PURGE_F_INFLIGHT = 2;
const RD_KAFKA_PURGE_F_NON_BLOCKING = 4;
<?php

use RdKafka\Exception;
use RdKafka\Metadata;
use RdKafka\Topic;
use RdKafka\TopicConf;
use RdKafka\TopicPartition;

abstract class RdKafka
{
    /**
     * @param string $broker_list
     *
     * @return int
     */
    public function addBrokers($broker_list) {}

    /**
     * @param bool  $all_topics
     * @param null|Topic $only_topic
     * @param int   $timeout_ms
     *
     * @throws Exception
     * @return Metadata
     */
    public function getMetadata($all_topics, $only_topic = null, $timeout_ms = 0) {}

    /**
     * @return int
     */
    public function getOutQLen() {}

    /**
     * @param string    $topic_name
     * @param null|TopicConf $topic_conf
     *
     * @return Topic
     */
    public function newTopic($topic_name, $topic_conf = null) {}

    /**
     * @param int $timeout_ms
     *
     * @return void
     */
    public function poll($timeout_ms) {}

    /**
     * @param int $level
     *
     * @return void
     */
    public function setLogLevel($level) {}

    /**
     * @param TopicPartition[] $topic_partitions
     * @param int $timeout_ms
     *
     * @return TopicPartition[]
     */
    public function offsetsForTimes($topic_partitions, $timeout_ms) {}

    /**
     * @param string $topic
     * @param int $partition
     * @param int $low
     * @param int $high
     * @param int $timeout_ms
     *
     * @return void
     */
    public function queryWatermarkOffsets($topic, $partition = 0, &$low = 0, &$high = 0, $timeout_ms = 0) {}

    /**
     * @param int $purge_flags
     *
     * @return int
     */
    public function purge($purge_flags) {}

    /**
     * @param int $timeout_ms
     *
     * @return int
     */
    public function flush($timeout_ms) {}

    public function metadata($all_topics, $only_topic = false, $timeout_ms = 0) {}

    public function setLogger($logger) {}

    public function outqLen() {}
}
<?php

// Start of recode v.

/**
 * Recode a string according to a recode request
 * @link https://php.net/manual/en/function.recode-string.php
 * @param string $request <p>
 * The desired recode request type
 * </p>
 * @param string $string <p>
 * The string to be recoded
 * </p>
 * @return string|false the recoded string or <b>FALSE</b>, if unable to
 * perform the recode request.
 * @removed 7.4
 */
function recode_string($request, $string) {}

/**
 * Recode from file to file according to recode request
 * @link https://php.net/manual/en/function.recode-file.php
 * @param string $request <p>
 * The desired recode request type
 * </p>
 * @param resource $input <p>
 * A local file handle resource for
 * the <i>input</i>
 * </p>
 * @param resource $output <p>
 * A local file handle resource for
 * the <i>output</i>
 * </p>
 * @return bool <b>FALSE</b>, if unable to comply, <b>TRUE</b> otherwise.
 * @removed 7.4
 */
function recode_file($request, $input, $output) {}

/**
 * Alias of <b>recode_string</b>
 * @link https://php.net/manual/en/function.recode.php
 * @param $request
 * @param $str
 * @removed 7.4
 */
function recode($request, $str) {}

// End of recode v.
<?php

// Start of uuid v.1.1.0

define('UUID_VARIANT_NCS', 0);
define('UUID_VARIANT_DCE', 1);
define('UUID_VARIANT_MICROSOFT', 2);
define('UUID_VARIANT_OTHER', 3);

define('UUID_TYPE_DEFAULT', 0);
define('UUID_TYPE_DCE', 4);
define('UUID_TYPE_NAME', 1);
define('UUID_TYPE_TIME', 1);
define('UUID_TYPE_SECURITY', 2);
define('UUID_TYPE_MD5', 3);
define('UUID_TYPE_RANDOM', 4);
define('UUID_TYPE_SHA1', 5);
define('UUID_TYPE_NULL', -1);
define('UUID_TYPE_INVALID', -42);

/**
 * Generate a new UUID
 *
 * @param int $uuid_type [optional] Type of UUID to generat
 * @return string The string representation of a UUID
 */
function uuid_create($uuid_type = UUID_TYPE_DEFAULT) {}

/**
 * Check whether a given UUID string is a valid UUID
 *
 * @param string $uuid The UUID string to validate
 * @return bool Whether or not the UUID was valid
 */
function uuid_is_valid($uuid) {}

/**
 * Compare two UUIDs
 *
 * Returns an integer less than, equal to, or greater than zero if $uuid1 is
 * found, respectively, to be lexicographically less than, equal, or greater
 * than $uuid2
 *
 * @param string $uuid1 First UUID
 * @param string $uuid2 Second UUID
 * @return int 0 if equal, otherwise a positive or negative integer
 */
function uuid_compare($uuid1, $uuid2) {}

/**
 * Check wheter an UUID is the NULL UUID 00000000-0000-0000-0000-000000000000
 *
 * @param string $uuid
 * @return bool Returns true if the UUID is null
 */
function uuid_is_null($uuid) {}

/**
 * Generate a MD5 hashed (predictable) UUID based on a well-known UUID
 *
 * This function is only availble if the PECL extension was compiled with a
 * version of libuuid that contains uuid_generate_md5.
 *
 * @param string $uuid_ns
 * @param string $name
 * @return string The new UUID
 */
function uuid_generate_md5($uuid_ns, $name) {}

/**
 * Generate a SHA1 hashed (predictable) UUID based on a well-known UUID
 *
 * This function is only available if the PECL extension was compiled with a
 * version of libuuid that contains uuid_generate_sha1.
 *
 * @param string $uuid_ns
 * @param string $name
 * @return string The new UUID
 */
function uuid_generate_sha1($uuid_ns, $name) {}

/**
 * Return the UUIDs type
 *
 * @param string $uuid
 * @return int Any one of the UUID_TYPE_* constants
 */
function uuid_type($uuid) {}

/**
 * Return the UUIDs variant
 *
 * @param string $uuid
 * @return int Any one of the UUID_VARIANT_* constants
 */
function uuid_variant($uuid) {}

/**
 * Extract creation time from a time based UUID as UNIX timestamp
 *
 * @param string $uuid
 * @return false|int Returns a unix timestamp on success or false on failure
 */
function uuid_time($uuid) {}

/**
 * Get UUID creator network MAC address
 *
 * @param string $uuid
 * @return false|string Returns the MAC address on succes or false on failure
 */
function uuid_mac($uuid) {}

/**
 * Converts a UUID string to the binary representation
 *
 * @param string $uuid
 * @return false|string Binary string of the UUID on success or false on failure
 */
function uuid_parse($uuid) {}

/**
 * Converts a UUID binary string to the human readable string
 *
 * @param string $uuid
 * @return false|string String UUID on success or false on failure
 */
function uuid_unparse($uuid) {}
<?php
declare(strict_types=1);

/**
 * Stubs for libvirt-php
 * https://libvirt.org/php/
 * https://github.com/inode64/phpstorm-stubs
 */

/* Domain metadata constants */
const VIR_DOMAIN_METADATA_DESCRIPTION = 0;
const VIR_DOMAIN_METADATA_TITLE = 1;
const VIR_DOMAIN_METADATA_ELEMENT = 2;
const VIR_DOMAIN_AFFECT_CURRENT = VIR_DOMAIN_AFFECT_CURRENT;
const VIR_DOMAIN_AFFECT_LIVE = 1;
const VIR_DOMAIN_AFFECT_CONFIG = 2;

const VIR_DOMAIN_STATS_STATE = 1;
const VIR_DOMAIN_STATS_CPU_TOTAL = 2;
const VIR_DOMAIN_STATS_BALLOON = 4;
const VIR_DOMAIN_STATS_VCPU = 8;
const VIR_DOMAIN_STATS_INTERFACE = 16;
const VIR_DOMAIN_STATS_BLOCK = 32;

/* XML constants */
const VIR_DOMAIN_XML_SECURE = 1;
const VIR_DOMAIN_XML_INACTIVE = 2;
const VIR_DOMAIN_XML_UPDATE_CPU = 4;
const VIR_DOMAIN_XML_MIGRATABLE = 8;

const VIR_NODE_CPU_STATS_ALL_CPUS = -1;

/* Domain constants */
const VIR_DOMAIN_NOSTATE = 0;
const VIR_DOMAIN_RUNNING = 1;
const VIR_DOMAIN_BLOCKED = 2;
const VIR_DOMAIN_PAUSED = 3;
const VIR_DOMAIN_SHUTDOWN = 4;
const VIR_DOMAIN_SHUTOFF = 5;
const VIR_DOMAIN_CRASHED = 6;
const VIR_DOMAIN_PMSUSPENDED = 7;

/* Volume constants */
const VIR_STORAGE_VOL_RESIZE_ALLOCATE = 1;
const VIR_STORAGE_VOL_RESIZE_DELTA = 2;
const VIR_STORAGE_VOL_RESIZE_SHRINK = 4;
const VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA = 1;
const VIR_STORAGE_VOL_CREATE_REFLINK = 2;

/* Domain vCPU flags */
const VIR_DOMAIN_VCPU_CONFIG = VIR_DOMAIN_AFFECT_CONFIG;
const VIR_DOMAIN_VCPU_CURRENT = VIR_DOMAIN_AFFECT_CURRENT;
const VIR_DOMAIN_VCPU_LIVE = VIR_DOMAIN_AFFECT_LIVE;
const VIR_DOMAIN_VCPU_MAXIMUM = 4;
const VIR_DOMAIN_VCPU_GUEST = 8;

/* Domain snapshot constants */
const VIR_SNAPSHOT_DELETE_CHILDREN = 1;
const VIR_SNAPSHOT_DELETE_METADATA_ONLY = 2;
const VIR_SNAPSHOT_DELETE_CHILDREN_ONLY = 4;
const VIR_SNAPSHOT_CREATE_REDEFINE = 1;
const VIR_SNAPSHOT_CREATE_CURRENT = 2;
const VIR_SNAPSHOT_CREATE_NO_METADATA = 4;
const VIR_SNAPSHOT_CREATE_HALT = 8;
const VIR_SNAPSHOT_CREATE_DISK_ONLY = 16;
const VIR_SNAPSHOT_CREATE_REUSE_EXT = 32;
const VIR_SNAPSHOT_CREATE_QUIESCE = 64;
const VIR_SNAPSHOT_CREATE_ATOMIC = 128;
const VIR_SNAPSHOT_CREATE_LIVE = 256;
const VIR_SNAPSHOT_LIST_DESCENDANTS = 1;
const VIR_SNAPSHOT_LIST_ROOTS = 1;
const VIR_SNAPSHOT_LIST_METADATA = 2;
const VIR_SNAPSHOT_LIST_LEAVES = 4;
const VIR_SNAPSHOT_LIST_NO_LEAVES = 8;
const VIR_SNAPSHOT_LIST_NO_METADATA = 16;
const VIR_SNAPSHOT_LIST_INACTIVE = 32;
const VIR_SNAPSHOT_LIST_ACTIVE = 64;
const VIR_SNAPSHOT_LIST_DISK_ONLY = 128;
const VIR_SNAPSHOT_LIST_INTERNAL = 256;
const VIR_SNAPSHOT_LIST_EXTERNAL = 512;
const VIR_SNAPSHOT_REVERT_RUNNING = 1;
const VIR_SNAPSHOT_REVERT_PAUSED = 2;
const VIR_SNAPSHOT_REVERT_FORCE = 4;

/* Create flags */
const VIR_DOMAIN_NONE = 0;
const VIR_DOMAIN_START_PAUSED = 1;
const VIR_DOMAIN_START_AUTODESTROY = 2;
const VIR_DOMAIN_START_BYPASS_CACHE = 4;
const VIR_DOMAIN_START_FORCE_BOOT = 8;
const VIR_DOMAIN_START_VALIDATE = 16;

/* Memory constants */
const VIR_MEMORY_VIRTUAL = 1;
const VIR_MEMORY_PHYSICAL = 2;

/* Version checking constants */
const VIR_VERSION_BINDING = 1;
const VIR_VERSION_LIBVIRT = 2;

/* Network constants */
const VIR_NETWORKS_ACTIVE = 1;
const VIR_NETWORKS_INACTIVE = 2;
const VIR_NETWORKS_ALL = VIR_NETWORKS_ACTIVE|VIR_NETWORKS_INACTIVE;
const VIR_CONNECT_LIST_NETWORKS_INACTIVE = 1;
const VIR_CONNECT_LIST_NETWORKS_ACTIVE = 2;
const VIR_CONNECT_LIST_NETWORKS_PERSISTENT = 4;
const VIR_CONNECT_LIST_NETWORKS_TRANSIENT = 8;
const VIR_CONNECT_LIST_NETWORKS_AUTOSTART = 16;
const VIR_CONNECT_LIST_NETWORKS_NO_AUTOSTART = 32;

/* Credential constants */
const VIR_CRED_USERNAME = 1;
const VIR_CRED_AUTHNAME = 2;
/* RFC 1766 languages */
const VIR_CRED_LANGUAGE = 3;
/* Client supplied a nonce */
const VIR_CRED_CNONCE = 4;
/* Passphrase secret */
const VIR_CRED_PASSPHRASE = 5;
/* Challenge response */
const VIR_CRED_ECHOPROMPT = 6;
/* Challenge response */
const VIR_CRED_NOECHOPROMPT = 7;
/* Authentication realm */
const VIR_CRED_REALM = 8;
/* Externally managed credential More may be added - expect the unexpected */
const VIR_CRED_EXTERNAL = 9;

/* Domain memory constants */
/* The total amount of memory written out to swap space (in kB). */
const VIR_DOMAIN_MEMORY_STAT_SWAP_IN = 0;
/* Page faults occur when a process makes a valid access to virtual memory that is not available. */
/* When servicing the page fault, if disk IO is * required, it is considered a major fault. If not, */
/* it is a minor fault. * These are expressed as the number of faults that have occurred. */
const VIR_DOMAIN_MEMORY_STAT_SWAP_OUT = 1;
const VIR_DOMAIN_MEMORY_STAT_MAJOR_FAULT = 2;
/* The amount of memory left completely unused by the system. Memory that is available but used for */
/* reclaimable caches should NOT be reported as free. This value is expressed in kB. */
const VIR_DOMAIN_MEMORY_STAT_MINOR_FAULT = 3;
/* The total amount of usable memory as seen by the domain. This value * may be less than the amount */
/* of memory assigned to the domain if a * balloon driver is in use or if the guest OS does not initialize */
/* all * assigned pages. This value is expressed in kB.  */
const VIR_DOMAIN_MEMORY_STAT_UNUSED = 4;
/* The number of statistics supported by this version of the interface. To add new statistics, add them */
/* to the enum and increase this value. */
const VIR_DOMAIN_MEMORY_STAT_AVAILABLE = 5;
/* Current balloon value (in KB). */
const VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON = 6;
/* Resident Set Size of the process running the domain. This value is in kB */
const VIR_DOMAIN_MEMORY_STAT_RSS = 7;
/* The number of statistics supported by this version of the interface. */
/* To add new statistics, add them to the enum and increase this value. */
const VIR_DOMAIN_MEMORY_STAT_NR = 8;

/* Job constants */
const VIR_DOMAIN_JOB_NONE = 0;
/* Job with a finite completion time */
const VIR_DOMAIN_JOB_BOUNDED = 1;
/* Job without a finite completion time */
const VIR_DOMAIN_JOB_UNBOUNDED = 2;
/* Job has finished but it's not cleaned up yet */
const VIR_DOMAIN_JOB_COMPLETED = 3;
/* Job hit error but it's not cleaned up yet */
const VIR_DOMAIN_JOB_FAILED = 4;
/* Job was aborted but it's not cleanup up yet */
const VIR_DOMAIN_JOB_CANCELLED = 5;

const VIR_DOMAIN_BLOCK_COMMIT_SHALLOW = 1;
const VIR_DOMAIN_BLOCK_COMMIT_DELETE = 2;
const VIR_DOMAIN_BLOCK_COMMIT_ACTIVE = 4;
const VIR_DOMAIN_BLOCK_COMMIT_RELATIVE = 8;
const VIR_DOMAIN_BLOCK_COMMIT_BANDWIDTH_BYTES = 16;

const VIR_DOMAIN_BLOCK_COPY_SHALLOW = 1;
const VIR_DOMAIN_BLOCK_COPY_REUSE_EXT = 2;

const VIR_DOMAIN_BLOCK_JOB_ABORT_ASYNC = 1;
const VIR_DOMAIN_BLOCK_JOB_ABORT_PIVOT = 2;
const VIR_DOMAIN_BLOCK_JOB_SPEED_BANDWIDTH_BYTES = 1;

const VIR_DOMAIN_BLOCK_JOB_INFO_BANDWIDTH_BYTES = 1;

const VIR_DOMAIN_BLOCK_JOB_TYPE_UNKNOWN = 0;
const VIR_DOMAIN_BLOCK_JOB_TYPE_PULL = 1;
const VIR_DOMAIN_BLOCK_JOB_TYPE_COPY = 2;
const VIR_DOMAIN_BLOCK_JOB_TYPE_COMMIT = 3;
const VIR_DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMIT = 4;

const VIR_DOMAIN_BLOCK_PULL_BANDWIDTH_BYTES = 128;

const VIR_DOMAIN_BLOCK_REBASE_SHALLOW = 1;
const VIR_DOMAIN_BLOCK_REBASE_REUSE_EXT = 2;
const VIR_DOMAIN_BLOCK_REBASE_COPY_RAW = 4;
const VIR_DOMAIN_BLOCK_REBASE_COPY = 8;
const VIR_DOMAIN_BLOCK_REBASE_RELATIVE = 16;
const VIR_DOMAIN_BLOCK_REBASE_COPY_DEV = 32;
const VIR_DOMAIN_BLOCK_REBASE_BANDWIDTH_BYTES = 64;

const VIR_DOMAIN_BLOCK_RESIZE_BYTES = 1;

/* Migration constants */
const VIR_MIGRATE_LIVE = 1;
/* direct source -> dest host control channel Note the less-common spelling that we're stuck with: */
/* VIR_MIGRATE_TUNNELLED should be VIR_MIGRATE_TUNNELED */
const VIR_MIGRATE_PEER2PEER = 2;
/* tunnel migration data over libvirtd connection */
const VIR_MIGRATE_TUNNELLED = 4;
/* persist the VM on the destination */
const VIR_MIGRATE_PERSIST_DEST = 8;
/* undefine the VM on the source */
const VIR_MIGRATE_UNDEFINE_SOURCE = 16;
/* pause on remote side */
const VIR_MIGRATE_PAUSED = 32;
/* migration with non-shared storage with full disk copy */
const VIR_MIGRATE_NON_SHARED_DISK = 64;
/* migration with non-shared storage with incremental copy (same base image shared between source and destination) */
const VIR_MIGRATE_NON_SHARED_INC = 128;
/* protect for changing domain configuration through the whole migration process; this will be used automatically
 when supported */
const VIR_MIGRATE_CHANGE_PROTECTION = 256;
/* force migration even if it is considered unsafe */
const VIR_MIGRATE_UNSAFE = 512;
/* offline migrate */
const VIR_MIGRATE_OFFLINE = 1024;
/* compress data during migration */
const VIR_MIGRATE_COMPRESSED = 2048;
/* abort migration on I/O errors happened during migration */
const VIR_MIGRATE_ABORT_ON_ERROR = 4096;
/* force convergence */
const VIR_MIGRATE_AUTO_CONVERGE = 8192;

/* Modify device allocation based on current domain state */
const VIR_DOMAIN_DEVICE_MODIFY_CURRENT = 0;
/* Modify live device allocation */
const VIR_DOMAIN_DEVICE_MODIFY_LIVE = 1;
/* Modify persisted device allocation */
const VIR_DOMAIN_DEVICE_MODIFY_CONFIG = 2;
/* Forcibly modify device (ex. force eject a cdrom) */
const VIR_DOMAIN_DEVICE_MODIFY_FORCE = 4;

/* REGISTER_LONG_CONSTANT */
const VIR_STORAGE_POOL_BUILD_NEW = 0;
/* Repair / reinitialize */
const VIR_STORAGE_POOL_BUILD_REPAIR = 1;
/* Extend existing pool */
const VIR_STORAGE_POOL_BUILD_RESIZE = 2;

/* Domain flags */
const VIR_DOMAIN_FLAG_FEATURE_ACPI = 1;
const VIR_DOMAIN_FLAG_FEATURE_APIC = 2;
const VIR_DOMAIN_FLAG_FEATURE_PAE = 4;
const VIR_DOMAIN_FLAG_CLOCK_LOCALTIME = 8;
const VIR_DOMAIN_FLAG_TEST_LOCAL_VNC = 16;
const VIR_DOMAIN_FLAG_SOUND_AC97 = 32;
const VIR_DOMAIN_DISK_FILE = 1;
const VIR_DOMAIN_DISK_BLOCK = 2;
const VIR_DOMAIN_DISK_ACCESS_ALL = 4;

const VIR_CONNECT_GET_ALL_DOMAINS_STATS_ACTIVE = 1;
const VIR_CONNECT_GET_ALL_DOMAINS_STATS_INACTIVE = 2;
const VIR_CONNECT_GET_ALL_DOMAINS_STATS_OTHER = 4;
const VIR_CONNECT_GET_ALL_DOMAINS_STATS_PAUSED = 8;
const VIR_CONNECT_GET_ALL_DOMAINS_STATS_PERSISTENT = 16;
const VIR_CONNECT_GET_ALL_DOMAINS_STATS_RUNNING = 32;
const VIR_CONNECT_GET_ALL_DOMAINS_STATS_SHUTOFF = 64;
const VIR_CONNECT_GET_ALL_DOMAINS_STATS_TRANSIENT = 128;
const VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS = 2 ^ 31;

const VIR_DOMAIN_MEM_CONFIG = VIR_DOMAIN_AFFECT_CONFIG;
const VIR_DOMAIN_MEM_CURRENT = VIR_DOMAIN_AFFECT_CURRENT;
const VIR_DOMAIN_MEM_LIVE = VIR_DOMAIN_AFFECT_LIVE;
const VIR_DOMAIN_MEM_MAXIMUM = 4;

const VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_LEASE = 0;
const VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_AGENT = 1;
const VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP = VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_LEASE;

/* Connect flags */
const VIR_CONNECT_FLAG_SOUNDHW_GET_NAMES = 1;

/* Keycodeset constants */
const VIR_KEYCODE_SET_LINUX = 0;
const VIR_KEYCODE_SET_XT = 1;
const VIR_KEYCODE_SET_ATSET1 = 6;
const VIR_KEYCODE_SET_ATSET2 = 2;
const VIR_KEYCODE_SET_ATSET3 = 3;
const VIR_KEYCODE_SET_OSX = 4;
const VIR_KEYCODE_SET_XT_KBD = 5;
const VIR_KEYCODE_SET_USB = 6;
const VIR_KEYCODE_SET_WIN32 = 7;
const VIR_KEYCODE_SET_RFB = 8;

/* virDomainUndefineFlagsValues */
const VIR_DOMAIN_UNDEFINE_MANAGED_SAVE = 1;
const VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA = 2;
const VIR_DOMAIN_UNDEFINE_NVRAM = 4;
const VIR_DOMAIN_UNDEFINE_KEEP_NVRAM = 8;

/* Connect functions */

/**
 * Function is used to connect to the specified libvirt daemon using the specified URL, user can also set the readonly
 * flag and/or set credentials for connection
 * @param string $url URI for connection
 * @param bool $readonly [optional] flag whether to use read-only connection or not, default true
 * @param array $credentials [optional] array of connection credentials
 * @return resource libvirt connection resource
 * @since 0.4.1(-1)
 */
function libvirt_connect(string $url, bool $readonly = true, array $credentials) {}

/**
 * Query statistics for all domains on a given connection
 * @param resource $conn resource for connection
 * @param int $stats [optional] the statistic groups from VIR_DOMAIN_STATS_*
 * @param int $flags [optional] the statistic groups from VIR_DOMAIN_STATS_*
 * @return array|false assoc array with statistics or false on error
 * @since 0.5.1(-1)
 */
function libvirt_connect_get_all_domain_stats($conn, int $stats = 0, int $flags = 0): array|false {}

/**
 * Function is used to get the capabilities information from the connection
 * @param resource $conn resource for connection
 * @param string|null $xpath [optional] xPath query to be applied on the result
 * @return string capabilities XML from the connection or FALSE for error
 * @since 0.4.1(-2)
 */
function libvirt_connect_get_capabilities($conn, ?string $xpath): string {}

/**
 * Function is used to get the emulator for requested connection/architecture
 * @param resource $conn libvirt connection resource
 * @param string|null $arch [optional] architecture string, can be NULL to get default
 * @return string path to the emulator
 * @since 0.4.5
 */
function libvirt_connect_get_emulator($conn, ?string $arch): string {}

/**
 * Function is used to get the information whether the connection is encrypted or not
 * @param resource $conn resource for connection
 * @return int 1 if encrypted, 0 if not encrypted, -1 on error
 * @since 0.4.1(-2)
 */
function libvirt_connect_get_encrypted($conn): int {}

/**
 * Function is used to get the hostname of the guest associated with the connection
 * @param resource $conn resource for connection
 * @return string|false hostname of the host node or FALSE for error
 * @since 0.4.1(-1)
 */
function libvirt_connect_get_hostname($conn): string|false {}

/**
 * Function is used to get the information about the hypervisor on the connection identified by the connection pointer
 * @param resource $conn libvirt-php: PHP API Reference guide
 * @return array array of hypervisor information if available
 */
function libvirt_connect_get_hypervisor($conn): array {}

/**
 * Function is used to get the information about the connection
 * @param resource $conn resource for connection
 * @return array array of information about the connection
 * @since 0.4.1(-2)
 */
function libvirt_connect_get_information($conn): array {}

/**
 * Function is used to get machine types supported by hypervisor on the connection
 * @param resource $conn resource for connection
 * @return array array of machine types for the connection incl. maxCpus if appropriate
 * @since 0.4.9
 */
function libvirt_connect_get_machine_types($conn): array {}

/**
 * Function is used to get maximum number of VCPUs per VM on the hypervisor connection
 * @param resource $conn resource for connection
 * @return int|false number of VCPUs available per VM on the connection or FALSE for error
 * @since 0.4.1(-2)
 */
function libvirt_connect_get_maxvcpus($conn): int|false {}

/**
 * Function is used to get NIC models for requested connection/architecture
 * @param resource $conn libvirt connection resource
 * @param string|null $arch [optional] architecture string, can be NULL to get default
 * @return array array of models
 * @since 0.4.9
 */
function libvirt_connect_get_nic_models($conn, ?string $arch): array {}

/**
 * Function is used to get the information whether the connection is secure or not
 * @param resource $conn resource for connection
 * @return int 1 if secure, 0 if not secure, -1 on error
 * @since 0.4.1(-2)
 */
function libvirt_connect_get_secure($conn): int {}

/**
 * Function is used to get sound hardware models for requested connection/architecture
 * @param resource $conn libvirt connection resource
 * @param string|null $arch [optional] architecture string, can be NULL to get default
 * @param int $flags [optional] flags for getting sound hardware. Can be either 0 or VIR_CONNECT_SOUNDHW_GET_NAMES
 * @return array array of models
 * @since 0.4.9
 */
function libvirt_connect_get_soundhw_models($conn, ?string $arch, int $flags = 0): array {}

/**
 * Function is used to get the system information from connection if available
 * @param resource $conn resource for connection
 * @return string|false XML description of system information from the connection or FALSE for error
 * @since 0.4.1(-2)
 */
function libvirt_connect_get_sysinfo($conn): string|false {}

/**
 * Function is used to get the connection URI. This is useful to check the hypervisor type of host machine
 * when using "null" uri to libvirt_connect()
 * @param resource $conn resource for connection
 * @return string|false connection URI string or FALSE for error
 * @since 0.4.1(-1)
 */
function libvirt_connect_get_uri($conn): string|false {}

/* Domain functions */

/**
 * Function is used to attach a virtual device to a domain
 * @param resource $res libvirt domain resource
 * @param string $xml XML description of one device
 * @param int $flags [optional] flags
 * @return bool TRUE for success, FALSE on error
 * @since 0.5.3
 */
function libvirt_domain_attach_device($res, string $xml, int $flags = 0): bool {}

/**
 * Function is used to commit block job
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @param string $disk path to the block device, or device shorthand
 * @param string|null $base [optional] path to backing file to merge into, or device shorthand, or NULL for default
 * @param string|null $top [optional] path to file within backing chain that contains data to be merged,
 *                                    or device shorthand, or NULL to merge all possible data
 * @param int $bandwidth [optional] specify bandwidth limit; flags determine the unit
 * @param int $flags [optional] bitwise-OR of VIR_DOMAIN_BLOCK_COMMIT_*
 * @return bool true on success fail on error
 * @since 0.5.2(-1)
 */
function libvirt_domain_block_commit($res, string $disk, ?string $base, ?string $top, int $bandwidth = 0, int $flags = 0): bool {}

/**
 * Function is used to abort block job
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @param string $path device path to resize
 * @param int $flags [optional] bitwise-OR of VIR_DOMAIN_BLOCK_JOB_ABORT_*
 * @return bool true on success fail on error
 * @since 0.5.1(-1)
 */
function libvirt_domain_block_job_abort($res, string $path, int $flags = 0): bool {}

/**
 * Function is used to attach a virtual device to a domain
 * @param resource $res libvirt domain resource
 * @param string $disk path to the block device, or device shorthand
 * @param int $flags [optional] bitwise-OR of VIR_DOMAIN_BLOCK_COMMIT_*
 * @return array Array with status virDomainGetBlockJobInfo and blockjob information
 * @since 0.5.2(-1)
 */
function libvirt_domain_block_job_info($res, string $disk, int $flags = 0): array {}

/**
 * Function is used to set speed of block job
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @param string $path device path to resize
 * @param int $bandwidth bandwidth
 * @param int $flags [optional] bitwise-OR of VIR_DOMAIN_BLOCK_JOB_SPEED_BANDWIDTH_*
 * @return bool true on success fail on error
 * @since 0.4.1(-1)
 */
function libvirt_domain_block_job_set_speed($res, string $path, int $bandwidth, int $flags = 0): bool {}

/**
 * Function is used to resize the domain's block device
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @param string $path device path to resize
 * @param int $size size of device
 * @param int $flags [optional] bitwise-OR of VIR_DOMAIN_BLOCK_RESIZE_*
 * @return bool true on success fail on error
 * @since 0.5.1(-1)
 */
function libvirt_domain_block_resize($res, string $path, int $size, int $flags = 0): bool {}

/**
 * Function is used to get the domain's block stats
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @param string $path device path to get statistics about
 * @return array domain block stats array, fields are rd_req, rd_bytes, wr_req, wr_bytes and errs
 * @since 0.4.1(-1)
 */
function libvirt_domain_block_stats($res, string $path): array {}

/**
 * Function is used to change the domain boot devices
 * @param resource $res libvirt domain resource
 * @param string $first first boot device to be set
 * @param string $second second boot device to be set
 * @param int $flags [optional] flags
 * @return resource new domain resource
 * @since 0.4.2
 */
function libvirt_domain_change_boot_devices($res, string $first, string $second, int $flags = 0) {}

/**
 * Function is used to change the domain memory allocation
 * @param resource $res libvirt domain resource
 * @param int $allocMem number of MiBs to be set as immediate memory value
 * @param int $allocMax number of MiBs to be set as the maximum allocation
 * @param int $flags [optional] flags
 * @return resource new domain resource
 * @since 0.4.2
 */
function libvirt_domain_change_memory($res, int $allocMem, int $allocMax, int $flags = 0) {}

/**
 * Function is used to change the VCPU count for the domain
 * @param resource $res libvirt domain resource
 * @param int $numCpus number of VCPUs to be set for the guest
 * @param int $flags [optional] flags for virDomainSetVcpusFlags
 *                              (available at http://libvirt.org/html/libvirt-libvirt.html#virDomainVcpuFlags)
 * @return bool true on success, false on error
 * @since 0.4.2
 */
function libvirt_domain_change_vcpus($res, int $numCpus, int $flags = 0): bool {}

/**
 * Function is used to dump core of the domain identified by it's resource
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @param string $to to
 * @return bool TRUE for success, FALSE on error
 * @since 0.4.1(-2)
 */
function libvirt_domain_core_dump($res, string $to): bool {}

/**
 * Function is used to create the domain identified by it's resource
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @return bool result of domain creation (startup)
 * @since 0.4.1(-1)
 */
function libvirt_domain_create($res): bool {}

/**
 * Function is used to create the domain identified by it's resource
 * @param resource $conn libvirt connection resource
 * @param string $xml XML string to create guest from
 * @param int $flags [optional] flags
 * @return resource newly started/created domain resource
 * @since 0.4.1(-1)
 */
function libvirt_domain_create_xml($conn, string $xml, int $flags = 0) {}

/**
 * Function is used to define the domain from XML string
 * @param resource $conn libvirt connection resource
 * @param string $xml XML string to define guest from
 * @return resource newly defined domain resource
 * @since 0.4.1(-1)
 */
function libvirt_domain_define_xml($conn, string $xml) {}

/**
 * Function is used to destroy the domain identified by it's resource
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @return bool result of domain destroy
 * @since 0.4.1(-1)
 */
function libvirt_domain_destroy($res): bool {}

/**
 * Function is used to detach a virtual device from a domain
 * @param resource $res libvirt domain resource
 * @param string $xml XML description of one device
 * @param int $flags [optional] flags to control how the device is attached. Defaults to VIR_DOMAIN_AFFECT_LIVE
 * @return bool TRUE for success, FALSE on error
 * @since 0.5.3
 */
function libvirt_domain_detach_device($res, string $xml, int $flags = VIR_DOMAIN_AFFECT_LIVE): bool {}

/**
 * Function is used to add the disk to the virtual machine using set of API functions to make it as simple
 * as possible for the user
 * @param resource $res libvirt domain resource
 * @param string $img string for the image file on the host system
 * @param string $dev string for the device to be presented to the guest (e.g. hda)
 * @param string $typ bus type for the device in the guest, usually 'ide' or 'scsi'
 * @param string $driver driver type to be specified, like 'raw' or 'qcow2'
 * @param int $flags [optional] flags for getting the XML description
 * @return resource new domain resource
 * @since 0.4.2
 */
function libvirt_domain_disk_add($res, string $img, string $dev, string $typ, string $driver, int $flags = 0) {}

/**
 * Function is used to remove the disk from the virtual machine using set of API functions to make it
 * as simple as possible
 * @param resource $res libvirt domain resource
 * @param string $dev string for the device to be removed from the guest (e.g. 'hdb')
 * @param int $flags [optional] flags for getting the XML description
 * @return resource new domain resource
 * @since 0.4.2
 */
function libvirt_domain_disk_remove($res, string $dev, int $flags = 0) {}

/**
 * Function is getting the autostart value for the domain
 * @param resource $res libvirt domain resource
 * @return int autostart value or -1
 * @since 0.4.1(-1)
 */
function libvirt_domain_get_autostart($res): int {}

/**
 * Function is used to get the domain's block device information
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @param string $dev device to get block information about
 * @return array domain block device information array of device, file or partition, capacity,
 *               allocation and physical size
 * @since 0.4.1(-1)
 */
function libvirt_domain_get_block_info($res, string $dev): array {}

/**
 * Function is used to get the domain's connection resource. This function should *not* be used!
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @return resource libvirt connection resource
 * @since 0.4.1(-1)
 */
function libvirt_domain_get_connect($res) {}

/**
 * Function is getting domain counts for all, active and inactive domains
 * @param resource $conn libvirt connection resource from libvirt_connect()
 * @return array array of total, active and inactive (but defined) domain counts
 * @since 0.4.1(-1)
 */
function libvirt_domain_get_counts($conn): array {}

/**
 * Function is used to get disk devices for the domain
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @return array|false list of domain disk devices
 * @since 0.4.4
 */
function libvirt_domain_get_disk_devices($res): array|false {}

/**
 * Function is used to get the domain's ID, applicable to running guests only
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @return int running domain ID or -1 if not running
 * @since 0.4.1(-1)
 */
function libvirt_domain_get_id($res): int {}

/**
 * Function is used to get the domain's information
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @return array domain information array
 * @since 0.4.4
 */
function libvirt_domain_get_info($res): array {}

/**
 * Function is used to get network interface devices for the domain
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @return array|false list of domain interface devices
 * @since 0.4.4
 */
function libvirt_domain_get_interface_devices($res): array|false {}

/**
 * Function is used get job information for the domain
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @return array job information array of type, time, data, mem and file fields
 * @since 0.4.1(-1)
 */
function libvirt_domain_get_job_info($res): array {}

/**
 * Function retrieve appropriate domain element given by $type
 * @param resource $res libvirt domain resource
 * @param int $type virDomainMetadataType type of description
 * @param string $uri XML namespace identifier
 * @param int $flags bitwise-OR of virDomainModificationImpact
 * @return string|null|false metadata string, NULL on error or FALSE on API not supported
 * @since 0.4.9
 */
function libvirt_domain_get_metadata($res, int $type, string $uri, int $flags = 0): string|null|false {}

/**
 * Function is used to get domain name from it's resource
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @return string domain name string
 * @since 0.4.1(-1)
 */
function libvirt_domain_get_name($res): string {}

/**
 * Function is used to get the domain's network information
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @param string $mac mac address of the network device
 * @return array domain network info array of MAC address, network name and type of NIC card
 * @since 0.4.1(-1)
 */
function libvirt_domain_get_network_info($res, string $mac): array {}

/**
 * This functions can be used to get the next free slot if you intend to add a new device identified
 * by slot to the domain, e.g. NIC device
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @return array next free slot number for the domain
 * @since 0.4.2
 */
function libvirt_domain_get_next_dev_ids($res): array {}

/**
 * Function get screen dimensions of the VNC window
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @param string $server server string of the host machine
 * @return array|false array of height and width on success, FALSE otherwise
 * @since 0.4.2
 */
function libvirt_domain_get_screen_dimensions($res, string $server): array|false {}

/**
 * Function uses gvnccapture (if available) to get the screenshot of the running domain
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @param string $server server string for the host machine
 * @param int $scancode [optional] integer value of the scancode to be send to refresh screen, default is 10
 * @return string PNG image binary data
 * @since 0.4.2
 */
function libvirt_domain_get_screenshot($res, string $server, int $scancode = 10): string {}

/**
 * Function is trying to get domain screenshot using libvirt virGetDomainScreenshot() API if available
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_get_by_*()
 * @param int $screenID [optional] monitor ID from where to take screenshot
 * @return array array of filename and mime type as type is hypervisor specific,
 *               caller is responsible for temporary file deletion
 * @since 0.4.5
 */
function libvirt_domain_get_screenshot_api($res, int $screenID = 0): array {}

/**
 * Function is used to get the domain's UUID in binary format
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @return string domain UUID in binary format
 * @since 0.4.1(-1)
 */
function libvirt_domain_get_uuid($res): string {}

/**
 * Function is used to get the domain's UUID in string format
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @return string domain UUID string
 * @since 0.4.1(-1)
 */
function libvirt_domain_get_uuid_string($res): string {}

/**
 * Function is used to get the domain's XML description
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @param string|null $xpath xPath expression string to get just this entry, can be NULL
 * @param int $flags [optional] flags
 * @return string domain XML description string or result of xPath expression
 * @since 0.4.2
 */
function libvirt_domain_get_xml_desc($res, ?string $xpath, int $flags = 0): string {}

/**
 * Function is used to get network interface addresses for the domain
 * @param resource $res libvirt domain resource
 * @param int $source one of the VIR_DOMAIN_ADDRESSES_SRC_* flags
 * @return array|false interface array of a domain holding information about addresses resembling
 *                     the virDomainInterface structure, false on error
 * @since 0.5.5
 */
function libvirt_domain_interface_addresses($res, int $source): array|false {}

/**
 * Function is used to get the domain's interface stats
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @param string $path path to interface device
 * @return array interface stats array of {tx|rx}_{bytes|packets|errs|drop} fields
 * @since 0.4.1(-1)
 */
function libvirt_domain_interface_stats($res, string $path): array {}

/**
 * Function is getting information whether domain identified by resource is active or not
 * @param resource $res libvirt domain resource
 * @return bool virDomainIsActive() result on the domain
 * @since 0.4.1(-1)
 */
function libvirt_domain_is_active($res): bool {}

/**
 * Function to get information whether domain is persistent or not
 * @param resource $res libvirt domain resource
 * @return bool TRUE for persistent, FALSE for not persistent, -1 on error
 * @since 0.4.9
 */
function libvirt_domain_is_persistent($res): bool {}

/**
 * Function is used to get domain by it's ID, applicable only to running guests
 * @param resource $conn libvirt connection resource from libvirt_connect()
 * @param string $id domain id to look for
 * @return resource libvirt domain resource
 * @since 0.4.1(-1)
 */
function libvirt_domain_lookup_by_id($conn, string $id) {}

/**
 * Function is used to lookup for domain by it's name
 * @param resource $res libvirt connection resource from libvirt_connect()
 * @param string $name domain name to look for
 * @return resource libvirt domain resource
 * @since 0.4.1(-1)
 */
function libvirt_domain_lookup_by_name($res, string $name) {}

/**
 * Function is used to lookup for domain by it's UUID in the binary format
 * @param resource $res libvirt connection resource from libvirt_connect()
 * @param string $uuid binary defined UUID to look for
 * @return resource libvirt domain resource
 * @since 0.4.1(-1)
 */
function libvirt_domain_lookup_by_uuid($res, string $uuid) {}

/**
 * Function is used to get the domain by it's UUID that's accepted in string format
 * @param resource $res libvirt connection resource from libvirt_connect()
 * @param string $uuid domain UUID [in string format] to look for
 * @return resource libvirt domain resource
 * @since 0.4.1(-1)
 */
function libvirt_domain_lookup_by_uuid_string($res, string $uuid) {}

/**
 * Function is used to managed save the domain (domain was unloaded from memory and it state saved to disk)
 * identified by it's resource
 * @param resource $res TRUE for success, FALSE on error
 * @return bool TRUE for success, FALSE on error
 * @since 0.4.1(-1)
 */
function libvirt_domain_managedsave($res): bool {}

/**
 * Function is used to get the domain's memory peek value
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @param int $start start
 * @param int $size size
 * @param int $flags flags
 * @return int domain memory peek
 * @since 0.4.1(-1)
 */
function libvirt_domain_memory_peek($res, int $start, int $size, int $flags = 0): int {}

/**
 * Function is used to get the domain's memory stats
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @param int $flags [optional] flags
 * @return array domain memory stats array (same fields as virDomainMemoryStats, please see libvirt documentation)
 * @since 0.4.1(-1)
 */
function libvirt_domain_memory_stats($res, int $flags = 0): array {}

/**
 * Function is used migrate domain to another domain
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @param string $dest_conn destination host connection object
 * @param int $flags migration flags
 * @param string $dname [optional] domain name to rename domain to on destination side
 * @param int $bandwidth [optional] migration bandwidth in Mbps
 * @return resource libvirt domain resource for migrated domain
 * @since 0.4.1(-1)
 */
function libvirt_domain_migrate($res, string $dest_conn, int $flags, string $dname, int $bandwidth = 0) {}

/**
 * Function is used migrate domain to another libvirt daemon specified by it's URI
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @param string $dest_uri destination URI to migrate to
 * @param int $flags migration flags
 * @param string $dname [optional] domain name to rename domain to on destination side
 * @param int $bandwidth [optional] migration bandwidth in Mbps
 * @return bool TRUE for success, FALSE on error
 * @since 0.4.1(-1)
 */
function libvirt_domain_migrate_to_uri($res, string $dest_uri, int $flags, string $dname, int $bandwidth = 0): bool {}

/**
 * Function is used migrate domain to another libvirt daemon specified by it's URI
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @param string $dconnuri URI for target libvirtd
 * @param string $miguri URI for invoking the migration
 * @param string $dxml XML config for launching guest on target
 * @param int $flags migration flags
 * @param string $dname [optional] domain name to rename domain to on destination side
 * @param int $bandwidth [optional] migration bandwidth in Mbps
 * @return bool TRUE for success, FALSE on error
 * @since 0.4.6(-1)
 */
function libvirt_domain_migrate_to_uri2($res, string $dconnuri, string $miguri, string $dxml, int $flags, string $dname, int $bandwidth = 0): bool {}

/**
 * Function is used to install a new virtual machine to the machine
 * @param resource $conn libvirt connection resource
 * @param string $name name of the new domain
 * @param string|null|false $arch optional architecture string, can be NULL to get default (or false)
 * @param int $memMB number of megabytes of RAM to be allocated for domain
 * @param int $maxmemMB maximum number of megabytes of RAM to be allocated for domain
 * @param int $vcpus number of VCPUs to be allocated to domain
 * @param string $iso_image installation ISO image for domain
 * @param array $disks array of disk devices for domain, consist of keys as 'path' (storage location),
 *                     'driver' (image type, e.g. 'raw' or 'qcow2'), 'bus' (e.g. 'ide', 'scsi'),
 *                     'dev' (device to be presented to the guest - e.g. 'hda'),
 *                     'size' (with 'M' or 'G' suffixes, like '10G' for 10 gigabytes image etc.) and
 *                     'flags' (VIR_DOMAIN_DISK_FILE or VIR_DOMAIN_DISK_BLOCK, optionally VIR_DOMAIN_DISK_ACCESS_ALL
 *                     to allow access to the disk for all users on the host system)
 * @param array $networks array of network devices for domain, consists of keys as 'mac' (for MAC address),
 *                        'network' (for network name) and optional 'model' for model of NIC device
 * @param int $flags [optional] bit array of flags
 * @return resource a new domain resource
 * @since 0.4.5
 */
function libvirt_domain_new($conn, string $name, string|null|false $arch, int $memMB, int $maxmemMB, int $vcpus, string $iso_image, array $disks, array $networks, int $flags = 0) {}

/**
 * Function is used to get the VNC server location for the newly created domain (newly started installation)
 * @return string|null a VNC server for a newly created domain resource (if any)
 * @since 0.4.5
 */
function libvirt_domain_new_get_vnc(): string|null {}

/**
 * Function is used to add the NIC card to the virtual machine using set of API functions to make it as simple
 * as possible for the user
 * @param resource $res libvirt domain resource
 * @param string $mac libvirt domain resource
 * @param string $network network name where to connect this NIC
 * @param string $model string of the NIC model
 * @param int $flags [optional] flags for getting the XML description
 * @return resource new domain resource
 * @since 0.4.2
 */
function libvirt_domain_nic_add($res, string $mac, string $network, string $model, int $flags = 0) {}

/**
 * Function is used to remove the NIC from the virtual machine using set of API functions to make it
 * as simple as possible
 * @param resource $res libvirt domain resource
 * @param string $dev string representation of the IP address to be removed (e.g. 54:52:00:xx:yy:zz)
 * @param int $flags [optional] flags for getting the XML description
 * @return resource new domain resource
 * @since 0.4.2
 */
function libvirt_domain_nic_remove($res, string $dev, int $flags = 0) {}

/**
 * Function is used to send qemu-ga command
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @param string $cmd command
 * @param int $timeout [optional] timeout
 * @param int $flags [optional] unknown
 * @return string|false String on success and FALSE on error
 * @since 0.5.2(-1)
 */
function libvirt_domain_qemu_agent_command($res, string $cmd, $timeout = -1, int $flags = 0): string|false {}

/**
 * Function is used to reboot the domain identified by it's resource
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @param int $flags [optional] flags
 * @return bool TRUE for success, FALSE on error
 * @since 0.4.1(-1)
 */
function libvirt_domain_reboot($res, int $flags = 0): bool {}

/**
 * Function is used to reset the domain identified by its resource
 * @param resource $res libvirt domain resource
 * @param int $flags [optional] @flags
 * @return bool true on success, false on error
 * @since 0.5.5
 */
function libvirt_domain_reset($res, int $flags = 0): bool {}

/**
 * Function is used to resume the domain identified by it's resource
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @return resource result of domain resume
 * @since 0.4.1(-1)
 */
function libvirt_domain_resume($res) {}

/**
 * Function sends keys to domain via libvirt API
 * @param resource $res libvirt domain resource
 * @param int $codeset the codeset of keycodes, from virKeycodeSet
 * @param int $holdtime the duration (in milliseconds) that the keys will be held
 * @param array $keycodes array of keycodes
 * @param int $flags [optional] extra flags; not used yet so callers should always pass 0
 * @return bool TRUE for success, FALSE for failure
 * @since 0.5.3
 */
function libvirt_domain_send_key_api($res, int $codeset, int $holdtime, array $keycodes, int $flags = 0): bool {}

/**
 * Function sends keys to the domain's VNC window
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @param string $server server string of the host machine
 * @param int $scancode integer scancode to be sent to VNC window
 * @return bool TRUE on success, FALSE otherwise
 * @since 0.4.2
 */
function libvirt_domain_send_keys($res, string $server, int $scancode): bool {}

/**
 * Function sends keys to the domain's VNC window
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @param string $server server string of the host machine
 * @param int $pos_x position on x-axis
 * @param int $pos_y position on y-axis
 * @param int $clicked mask of clicked buttons (0 for none, bit 1 for button #1, bit 8 for button #8)
 * @param bool $release [optional] boolean value (0 or 1) whether to release the buttons automatically once pressed,
 *                      default true
 * @return bool TRUE on success, FALSE otherwise
 * @since 0.4.2
 */
function libvirt_domain_send_pointer_event($res, string $server, int $pos_x, int $pos_y, int $clicked, bool $release = true): bool {}

/**
 * Function is setting the autostart value for the domain
 * @param resource $res libvirt domain resource
 * @param bool $flags flag to enable/disable autostart
 * @return bool TRUE on success, FALSE on error
 * @since 0.4.1(-1)
 */
function libvirt_domain_set_autostart($res, bool $flags): bool {}

/**
 * Function to set max memory for domain
 * @param resource $res libvirt domain resource
 * @param int $memory memory size in 1024 bytes (Kb)
 * @return bool TRUE for success, FALSE for failure
 * @since 0.5.1
 */
function libvirt_domain_set_max_memory($res, int $memory): bool {}

/**
 * Function to set memory for domain
 * @param resource $res libvirt domain resource
 * @param int $memory memory size in 1024 bytes (Kb)
 * @return bool TRUE for success, FALSE for failure
 * @since 0.5.1
 */
function libvirt_domain_set_memory($res, int $memory): bool {}

/**
 * Function to set max memory for domain
 * @param resource $res libvirt domain resource
 * @param int $memory memory size in 1024 bytes (Kb)
 * @param int $flags [optional] bitwise-OR VIR_DOMAIN_MEM_* flags
 * @return bool TRUE for success, FALSE for failure
 * @since 0.5.1
 */
function libvirt_domain_set_memory_flags($res, int $memory = 0, int $flags = 0): bool {}

/**
 * Function sets the appropriate domain element given by $type to the value of $metadata. No new lines are permitted
 * @param resource $res libvirt domain resource
 * @param int $type virDomainMetadataType type of description
 * @param string $metadata new metadata text
 * @param string $key XML namespace key or empty string (alias of NULL)
 * @param string $uri XML namespace identifier or empty string (alias of NULL)
 * @param int $flags bitwise-OR of virDomainModificationImpact
 * @return int -1 on error, 0 on success
 * @since 0.4.9
 */
function libvirt_domain_set_metadata($res, int $type, string $metadata, string $key, string $uri, int $flags = 0): int {}

/**
 * Function is used to shutdown the domain identified by it's resource
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @return bool TRUE for success, FALSE on error
 * @since 0.4.1(-1)
 */
function libvirt_domain_shutdown($res): bool {}

/**
 * Function is used to suspend the domain identified by it's resource
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @return bool TRUE for success, FALSE on error
 * @since 0.4.1(-1)
 */
function libvirt_domain_suspend($res): bool {}

/**
 * Function is used to undefine the domain identified by it's resource
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @return bool TRUE for success, FALSE on error
 * @since 0.4.1(-1)
 */
function libvirt_domain_undefine($res): bool {}

/**
 * Function is used to undefine(with flags) the domain identified by it's resource
 * @param resource $res libvirt domain resource
 * @param int $flags [optional] flags
 * @return bool TRUE if success, FALSE on error
 * @since 999 https://github.com/yzslab/php-libvirt-client
 */
function libvirt_domain_undefine_flags($res, int $flags = 0): bool {}

/**
 * Function is used to update the domain's devices from the XML string
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @param string $xml XML string for the update
 * @param int $flags Flags to update the device (VIR_DOMAIN_DEVICE_MODIFY_CURRENT, VIR_DOMAIN_DEVICE_MODIFY_LIVE,
 *                   VIR_DOMAIN_DEVICE_MODIFY_CONFIG, VIR_DOMAIN_DEVICE_MODIFY_FORCE)
 * @return bool TRUE for success, FALSE on error
 * @since 0.4.1(-1)
 */
function libvirt_domain_update_device($res, string $xml, int $flags): bool {}

/**
 * Function is used to convert native configuration data to libvirt domain XML
 * @param resource $conn libvirt connection resource
 * @param string $format configuration format converting from
 * @param string $config_data content of the native config file
 * @return string|false libvirt domain XML, FALSE on error
 * @since 0.5.3
 */
function libvirt_domain_xml_from_native($conn, string $format, string $config_data): string|false {}

/**
 * Function is used to convert libvirt domain XML to native configuration
 * @param resource $conn libvirt connection resource
 * @param string $format configuration format converting from
 * @param string $xml_data content of the libvirt domain xml file
 * @return string|false contents of the native data file, FALSE on error
 * @since 0.5.3
 */
function libvirt_domain_xml_to_native($conn, string $format, string $xml_data): string|false {}

/**
 * Function is used to get the result of xPath expression that's run against the domain
 * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
 * @param string $xpath xPath expression to parse against the domain
 * @param int $flags [optional] flags
 * @return array result of the expression in an array
 * @since 0.4.1(-1)
 */
function libvirt_domain_xml_xpath($res, string $xpath, int $flags = 0): array {}

/**
 * Function is used to list active domain IDs on the connection
 * @param resource $res libvirt connection resource
 * @return array libvirt active domain ids array for the connection
 * @since 0.4.1(-1)
 */
function libvirt_list_active_domain_ids($res): array {}

/**
 * Function is used to list active domain names on the connection
 * @param resource $res libvirt connection resource
 * @return array libvirt active domain names array for the connection
 * @since 0.4.1(-1)
 */
function libvirt_list_active_domains($res): array {}

/**
 * Function is used to list domain resources on the connection
 * @param resource $res libvirt connection resource
 * @return array libvirt domain resources array for the connection
 * @since 0.4.1(-1)
 */
function libvirt_list_domain_resources($res): array {}

/**
 * Function is used to list domains on the connection
 * @param resource $res libvirt connection resource
 * @return array libvirt domain names array for the connection
 * @since 0.4.1(-1)
 */
function libvirt_list_domains($res): array {}

/**
 * Function is used to list inactive domain names on the connection
 * @param resource $res libvirt connection resource
 * @return array libvirt inactive domain names array for the connection
 * @since 0.4.1(-1)
 */
function libvirt_list_inactive_domains($res): array {}

/* Network functions */

/**
 * Function is used to list networks on the connection
 * @param resource $conn libvirt connection resource
 * @param int $flags [optional] flags to filter the results for a smaller list of targeted networks
 *                              (bitwise-OR VIR_CONNECT_LIST_NETWORKS_* constants)
 * @return array libvirt network resources array for the connection
 * @since 0.5.3
 */
function libvirt_list_all_networks($conn, int $flags = VIR_CONNECT_LIST_NETWORKS_ACTIVE|VIR_CONNECT_LIST_NETWORKS_INACTIVE): array {}

/**
 * Function is used to list networks on the connection
 * @param resource $res libvirt connection resource
 * @param int $flags [optional] flags whether to list active,
 *                              inactive or all networks (VIR_NETWORKS_{ACTIVE|INACTIVE|ALL} constants)
 * @return array libvirt network names array for the connection
 * @since 0.4.1(-1)
 */
function libvirt_list_networks($res, int $flags = 0): array {}

/**
 * Function is used to define a new virtual network based on the XML description
 * @param resource $res libvirt connection resource
 * @param string $xml XML string definition of network to be defined
 * @return resource libvirt network resource of newly defined network
 * @since 0.4.2
 */
function libvirt_network_define_xml($res, string $xml) {}

/**
 * Function is used to get the network resource from name
 * @param resource $res libvirt connection resource
 * @param string $name network name string
 * @return resource libvirt network resource
 * @since 0.4.1(-1)
 */
function libvirt_network_get($res, string $name) {}

/**
 * Function is used to get the activity state of the network
 * @param resource $res libvirt network resource
 * @return int|false 1 when active, 0 when inactive, FALSE on error
 * @since 0.4.1(-1)
 */
function libvirt_network_get_active($res): int|false {}

/**
 * Function is getting the autostart value for the network
 * @param resource $res libvirt network resource
 * @return int autostart value or -1 on error
 * @since 0.5.4
 */
function libvirt_network_get_autostart($res): int {}

/**
 * Function is used to get the bridge associated with the network
 * @param resource $res libvirt network resource
 * @return string bridge name string
 * @since 0.4.1(-1)
 */
function libvirt_network_get_bridge($res): string {}

/**
 * Function is used to get the network information
 * @param resource $res libvirt network resource
 * @return array network information array
 * @since 0.4.1(-1)
 */
function libvirt_network_get_information($res): array {}

/**
 * Function is used to get network's name
 * @param resource $res libvirt network resource
 * @return string|false network name string or FALSE on failure
 * @since 0.5.3
 */
function libvirt_network_get_name($res): string|false {}

/**
 * Function is used to get network's UUID in binary format
 * @param resource $res libvirt network resource
 * @return string|false network UUID in binary format or FALSE on failure
 * @since 0.5.3
 */
function libvirt_network_get_uuid($res): string|false {}

/**
 * Function is used to get network's UUID in string format
 * @param resource $res libvirt network resource
 * @return string|false network UUID string or FALSE on failure
 * @since 0.5.3
 */
function libvirt_network_get_uuid_string($res): string|false {}

/**
 * Function is used to get the XML description for the network
 * @param resource $res libvirt network resource
 * @param string|null $xpath [optional] xPath expression string to get just this entry, can be NULL
 * @return string|false network XML string or result of xPath expression
 * @since 0.4.1(-1)
 */
function libvirt_network_get_xml_desc($res, ?string $xpath): string|false {}

/**
 * Function is used to set the activity state of the network
 * @param resource $res libvirt network resource
 * @param int $flags active
 * @return bool TRUE if success, FALSE on error
 * @since 0.4.1(-1)
 */
function libvirt_network_set_active($res, int $flags): bool {}

/**
 * Function is setting the autostart value for the network
 * @param resource $res libvirt network resource
 * @param int $flags flag to enable/disable autostart
 * @return bool TRUE on success, FALSE on error
 * @since 0.5.4
 */
function libvirt_network_set_autostart($res, int $flags): bool {}

/**
 * Function is used to undefine already defined network
 * @param resource $res libvirt network resource
 * @return bool TRUE for success, FALSE on error
 * @since 0.4.2
 */
function libvirt_network_undefine($res): bool {}

/* Node functions */

/**
 * Function is used to get the CPU stats per nodes
 * @param resource $conn resource for connection
 * @param int $cpunr [optional] CPU number to get information about,
 *                              defaults to VIR_NODE_CPU_STATS_ALL_CPUS to get information about all CPUs
 * @return array|false array of node CPU statistics including time (in seconds since UNIX epoch),
 *                     cpu number and total number of CPUs on node or FALSE for error
 * @since 0.4.6
 */
function libvirt_node_get_cpu_stats($conn, int $cpunr = VIR_NODE_CPU_STATS_ALL_CPUS): array|false {}

/**
 * Function is used to get the CPU stats for each CPU on the host node
 * @param resource $conn resource for connection
 * @param int $time [optional] time in seconds to get the information about, without aggregation for further processing
 * @return array|false array of node CPU statistics for each CPU including time (in seconds since UNIX epoch),
 *                           cpu number and total number of CPUs on node or FALSE for error
 * @since 0.4.6
 */
function libvirt_node_get_cpu_stats_for_each_cpu($conn, int $time = 0): array|false {}

/**
 * Function is used to get free memory available on the node
 * @param resource $conn libvirt connection resource
 * @return string|false The available free memory in bytes as string or FALSE for error
 * @since 0.5.3
 */
function libvirt_node_get_free_memory($conn): string|false {}

/**
 * Function is used to get the information about host node, mainly total memory installed,
 * total CPUs installed and model information are useful
 * @param resource $conn resource for connection
 * @return array|false array of node information or FALSE for error
 * @since 0.4.1(-1)
 */
function libvirt_node_get_info($conn): array|false {}

/**
 * Function is used to get the memory stats per node
 * @param resource $conn resource for connection
 * @return array array of node memory statistics including time (in seconds since UNIX epoch) or FALSE for error
 * @since 0.4.6
 */
function libvirt_node_get_mem_stats($conn): array {}

/* Nodedev functions */

/**
 * Function is used to list node devices on the connection
 * @param resource $res libvirt connection resource
 * @param string|null $cap [optional] capability string
 * @return array libvirt nodedev names array for the connection
 * @since 0.4.1(-1)
 */
function libvirt_list_nodedevs($res, ?string $cap): array {}

/**
 * Function is used to list node devices by capabilities
 * @param resource $res libvirt nodedev resource
 * @return array nodedev capabilities array
 * @since 0.4.1(-1)
 */
function libvirt_nodedev_capabilities($res): array {}

/**
 * Function is used to get the node device by it's name
 * @param resource $res libvirt connection resource
 * @param string $name name of the nodedev to get resource
 * @return resource libvirt nodedev resource
 * @since 0.4.1(-1)
 */
function libvirt_nodedev_get($res, string $name) {}

/**
 * Function is used to get the node device's information
 * @param resource $res libvirt nodedev resource
 * @return array nodedev information array
 * @since 0.4.1(-1)
 */
function libvirt_nodedev_get_information($res): array {}

/**
 * Function is used to get the node device's XML description
 * @param resource $res libvirt nodedev resource
 * @param string|null $xpath [optional] xPath expression string to get just this entry, can be NULL
 * @return string nodedev XML description string or result of xPath expression
 * @since 0.4.2
 */
function libvirt_nodedev_get_xml_desc($res, ?string $xpath): string {}

/* Nwfilter functions */

/**
 * Function is used to list nwfilters on the connection
 * @param resource $res libvirt domain resource
 * @return array libvirt nwfilter resources array for the connection
 * @since 0.5.4
 */
function libvirt_list_all_nwfilters($res): array {}

/**
 * Function is used to list nwfilters on the connection
 * @param resource $conn libvirt connection resource
 * @return array libvirt nwfilter names array for the connection
 * @since 0.5.4
 */
function libvirt_list_nwfilters($conn): array {}

/**
 * Function is used to define a new nwfilter based on the XML description
 * @param resource $conn libvirt connection resource
 * @param string $xml XML string definition of nwfilter to be defined
 * @return resource|false libvirt nwfilter resource of newly defined nwfilter or false on error
 * @since 0.5.4
 */
function libvirt_nwfilter_define_xml($conn, string $xml) {}

/**
 * Function is used to get nwfilter's name
 * @param resource $res libvirt nwfilter resource
 * @return string|false nwfilter name string or FALSE on failure
 * @since 0.5.4
 */
function libvirt_nwfilter_get_name($res): string|false {}

/**
 * Function is used to get nwfilter's UUID in binary format
 * @param resource $res libvirt nwfilter resource
 * @return string|false nwfilter UUID in binary format or FALSE on failure
 * @since 0.5.3
 */
function libvirt_nwfilter_get_uuid($res): string|false {}

/**
 * Function is used to get nwfilter's UUID in string format
 * @param resource $res libvirt nwfilter resource
 * @return string|false nwfilter UUID string or FALSE on failure
 * @since 0.5.4
 */
function libvirt_nwfilter_get_uuid_string($res): string|false {}

/**
 * Function is used to lookup for nwfilter identified by UUID string
 * @param resource $res libvirt nwfilter resource
 * @param string|null $xpath [optional] xPath expression string to get just this entry, can be NULL
 * @return string nwfilter XML string or result of xPath expression
 * @since 0.5.4
 */
function libvirt_nwfilter_get_xml_desc($res, ?string $xpath): string {}

/**
 * This functions is used to lookup for the nwfilter by it's name
 * @param resource $conn libvirt connection resource
 * @param string $name name of the nwfilter to get the resource
 * @return resource|false libvirt nwfilter resource
 * @since 0.5.4
 */
function libvirt_nwfilter_lookup_by_name($conn, string $name) {}

/**
 * Function is used to lookup for nwfilter identified by UUID string
 * @param resource $conn libvirt connection resource
 * @param string $uuid UUID string to look for nwfilter
 * @return resource|false libvirt nwfilter resource
 * @since 0.5.4
 */
function libvirt_nwfilter_lookup_by_uuid_string($conn, string $uuid) {}

/**
 * Function is used to undefine already defined nwfilter
 * @param resource $res libvirt nwfilter resource
 * @return bool true on success, false on error
 * @since 0.5.4
 */
function libvirt_nwfilter_undefine($res): bool {}

/* Libvirt functions */

/**
 * Function is used to check major, minor and micro (also sometimes called release) versions of libvirt-php
 * or libvirt itself. This could useful when you want your application to support only versions of libvirt
 * or libvirt-php higher than some version specified
 * @param int $major major version number to check for
 * @param int $minor minor version number to check for
 * @param int $micro micro (also release) version number to check for
 * @param int $type type of checking, VIR_VERSION_BINDING to check against libvirt-php binding or
 *                  VIR_VERSION_LIBVIRT to check against libvirt version
 * @return bool TRUE if version is equal or higher than required, FALSE if not,
 *              FALSE with error [for libvirt_get_last_error()] on unsupported version type check
 * @since 0.4.1(-1)
 */
function libvirt_check_version(int $major, int $minor, int $micro, int $type): bool {}

/**
 * Function to get the ISO images on path and return them in the array
 * @param string $path string of path where to look for the ISO images
 * @return array|false ISO image array on success, FALSE otherwise
 */
function libvirt_get_iso_images(string $path): array|false {}

/**
 * This function is used to get the last error coming either from libvirt or the PHP extension itself
 * @return string last error string
 */
function libvirt_get_last_error(): string {}

/**
 * This function is used to get the last error code coming either from libvirt or the PHP extension itself
 * @since 999 https://github.com/yzslab/php-libvirt-client
 * @return int last error code
 */
function libvirt_get_last_error_code(): int {}

/**
 * This function is used to get the what part of the library raised the last error
 * @since 999 https://github.com/yzslab/php-libvirt-client
 * @return int last error domain
 */
function libvirt_get_last_error_domain(): int {}

/**
 * Function to check for feature existence for working libvirt instance
 * @param string $name feature name
 * @return bool TRUE if feature is supported, FALSE otherwise
 * @since 0.4.1(-3)
 */
function libvirt_has_feature(string $name): bool {}

/**
 * Function is used to create the image of desired name, size and format.
 * The image will be created in the image path (libvirt.image_path INI variable). Works only o
 * @param resource $conn libvirt connection resource
 * @param string $name name of the image file that will be created in the libvirt.image_path directory
 * @param int $size size of the image in MiBs
 * @param string $format format of the image, may be raw, qcow or qcow2
 * @return string|false hostname of the host node or FALSE for error
 * @since 0.4.2
 */
function libvirt_image_create($conn, string $name, int $size, string $format): string|false {}

/**
 * Function is used to create the image of desired name, size and format.
 * The image will be created in the image path (libvirt.image_path INI variable). Works only on local systems!
 * @param resource $conn libvirt connection resource
 * @param string $image name of the image file that should be deleted
 * @return string|false hostname of the host node or FALSE for error
 * @since 0.4.2
 */
function libvirt_image_remove($conn, string $image): string|false {}

/**
 * Function to set the log file for the libvirt module instance
 * @param string|null $filename log filename or NULL to disable logging
 * @param int $maxsize [optional] maximum log file size argument in KiB, default value can be found in PHPInfo() output
 * @return bool TRUE if log file has been successfully set, FALSE otherwise
 * @since 0.4.2
 */
function libvirt_logfile_set(?string $filename, int $maxsize): bool {}

/**
 * Function to print the binding resources, although the resource information are printed,
 * they are returned in the return_value
 * @return resource bindings resource information
 * @since 0.4.2
 */
function libvirt_print_binding_resources() {}

/**
 * Function is used to get libvirt, driver and libvirt-php version numbers. Can be used for information purposes,
 * for version checking please use libvirt_check_version() defined below
 * @param string $type [optional] type string to identify driver to look at
 * @return array libvirt, type (driver) and connector (libvirt-php) version numbers array
 * @since 0.4.1(-1)
 */
function libvirt_version(string $type): array {}

/* Snapshot functions */

/**
 * Function is used to get the information whether domain has the current snapshot
 * @param resource $res libvirt domain resource
 * @param int $flags [optional] extra flags; not used yet so callers should always pass 0
 * @return bool TRUE is domain has the current snapshot, otherwise FALSE (you may need to check
 *              for error using libvirt_get_last_error())
 * @since 0.4.1(-2)
 */
function libvirt_domain_has_current_snapshot($res, int $flags = 0): bool {}

/**
 * This function creates the domain snapshot for the domain identified by it's resource
 * @param resource $res libvirt domain resource
 * @param int $flags [optional] libvirt snapshot flags
 * @return resource domain snapshot resource
 * @since 0.4.1(-2)
 */
function libvirt_domain_snapshot_create($res, int $flags = 0) {}

/**
 * Function is used to lookup the current snapshot for given domain
 * @param resource $res libvirt domain resource
 * @param int $flags [optional] libvirt snapshot flags
 * @return resource domain snapshot resource
 * @since 0.5.6
 */
function libvirt_domain_snapshot_current($res, int $flags = 0) {}

/**
 * Function is used to revert the domain state to the state identified by the snapshot
 * @param resource $res libvirt domain resource
 * @param int $flags [optional] 0 to delete just snapshot,
 *                              VIR_SNAPSHOT_DELETE_CHILDREN to delete snapshot children as well
 * @return bool TRUE on success, FALSE on error
 * @since 0.4.1(-2)
 */
function libvirt_domain_snapshot_delete($res, int $flags = 0): bool {}

/**
 * Function is used to get the XML description of the snapshot identified by it's resource
 * @param resource $res libvirt snapshot resource
 * @param int $flags [optional] libvirt snapshot flags
 * @return string XML description string for the snapshot
 * @since 0.4.1(-2)
 */
function libvirt_domain_snapshot_get_xml($res, int $flags = 0): string {}

/**
 * This functions is used to lookup for the snapshot by it's name
 * @param resource $res libvirt domain resource
 * @param string $name name of the snapshot to get the resource
 * @param int $flags [optional] libvirt snapshot flags
 * @return resource domain snapshot resource
 * @since 0.4.1(-2)
 */
function libvirt_domain_snapshot_lookup_by_name($res, string $name, int $flags = 0) {}

/**
 * Function is used to revert the domain state to the state identified by the snapshot
 * @param resource $res libvirt snapshot resource
 * @param int $flags [optional] libvirt snapshot flags
 * @return bool TRUE on success, FALSE on error
 * @since 0.4.1(-2)
 */
function libvirt_domain_snapshot_revert($res, int $flags = 0): bool {}

/**
 * Function is used to list domain snapshots for the domain specified by it's resource
 * @param resource $res libvirt domain resource
 * @param int $flags [optional] libvirt snapshot flags
 * @return array libvirt domain snapshot names array
 * @since 0.4.1(-2)
 */
function libvirt_list_domain_snapshots($res, int $flags = 0): array {}

/* Storage functions */

/**
 * Function is used to list active storage pools on the connection
 * @param resource $res libvirt connection resource
 * @return array libvirt storagepool names array for the connection
 * @since 0.4.1(-1)
 */
function libvirt_list_active_storagepools($res): array {}

/**
 * Function is used to list inactive storage pools on the connection
 * @param resource $res libvirt connection resource
 * @return array libvirt storagepool names array for the connection
 * @since 0.4.1(-1)
 */
function libvirt_list_inactive_storagepools($res): array {}

/**
 * Function is used to list storage pools on the connection
 * @param resource $res libvirt connection resource
 * @return array libvirt storagepool names array for the connection
 * @since 0.4.1(-1)
 */
function libvirt_list_storagepools($res): array {}

/**
 * Function is used to Build the underlying storage pool, e.g. create the destination directory for NFS
 * @param resource $res libvirt storagepool resource
 * @return bool TRUE if success, FALSE on error
 * @since 0.4.2
 */
function libvirt_storagepool_build($res): bool {}

/**
 * Function is used to create/start the storage pool
 * @param resource $res libvirt storagepool resource
 * @return bool TRUE if success, FALSE on error
 * @since 0.4.1(-1)
 */
function libvirt_storagepool_create($res): bool {}

/**
 * Function is used to define the storage pool from XML string and return it's resource
 * @param resource $res libvirt connection resource
 * @param string $xml XML string definition of storagepool
 * @param int $flags [optional] flags to define XML
 * @return resource libvirt storagepool resource
 * @since 0.4.1(-1)
 */
function libvirt_storagepool_define_xml($res, string $xml, int $flags = 0) {}

/**
 * Function is used to Delete the underlying storage pool, e.g. remove the destination directory for NFS
 * @param resource $res libvirt storagepool resource
 * @return bool TRUE if success, FALSE on error
 * @since 0.4.6
 */
function libvirt_storagepool_delete($res): bool {}

/**
 * Function is used to destroy the storage pool
 * @param resource $res libvirt storagepool resource
 * @return bool TRUE if success, FALSE on error
 * @since 0.4.1(-1)
 */
function libvirt_storagepool_destroy($res): bool {}

/**
 * Function is used to get autostart of the storage pool
 * @param resource $res libvirt storagepool resource
 * @return bool TRUE for autostart enabled, FALSE for autostart disabled, FALSE with last_error set for error
 * @since 0.4.1(-1)
 */
function libvirt_storagepool_get_autostart($res): bool {}

/**
 * Function is used to get information about the storage pool
 * @param resource $res libvirt storagepool resource
 * @return array storage pool information array of state, capacity, allocation and available space
 * @since 0.4.1(-1)
 */
function libvirt_storagepool_get_info($res): array {}

/**
 * Function is used to get storage pool name from the storage pool resource
 * @param resource $res libvirt storagepool resource
 * @return string storagepool name string
 * @since 0.4.1(-1)
 */
function libvirt_storagepool_get_name($res): string {}

/**
 * Function is used to get storage pool by UUID string
 * @param resource $res libvirt storagepool resource
 * @return string storagepool UUID string
 * @since 0.4.1(-1)
 */
function libvirt_storagepool_get_uuid_string($res): string {}

/**
 * Function is used to get storage volume count in the storage pool
 * @param resource $res libvirt storagepool resource
 * @return int number of volumes in the pool
 * @since 0.4.1(-1)
 */
function libvirt_storagepool_get_volume_count($res): int {}

/**
 * Function is used to get the XML description for the storage pool identified by res
 * @param resource $res libvirt storagepool resource
 * @param string|null $xpath [optional] xPath expression string to get just this entry, can be NULL
 * @return string storagepool XML description string or result of xPath expression
 * @since 0.4.2
 */
function libvirt_storagepool_get_xml_desc($res, ?string $xpath): string {}

/**
 * Function is used to get information whether storage pool is active or not
 * @param resource $res libvirt storagepool resource
 * @return bool result of virStoragePoolIsActive
 * @since 0.4.1(-1)
 */
function libvirt_storagepool_is_active($res): bool {}

/**
 * Function is used to list volumes in the specified storage pool
 * @param resource $res libvirt storagepool resource
 * @return array list of storage volume names in the storage pool in an array using default keys (indexes)
 * @since 0.4.1(-1)
 */
function libvirt_storagepool_list_volumes($res): array {}

/**
 * Function is used to lookup for storage pool by it's name
 * @param resource $res volume resource of storage pool
 * @param string $name storage pool name
 * @return resource libvirt storagepool resource
 * @since 0.4.1(-1)
 */
function libvirt_storagepool_lookup_by_name($res, string $name) {}

/**
 * Function is used to lookup for storage pool identified by UUID string
 * @param resource $res libvirt connection resource
 * @param string $uuid UUID string to look for storagepool
 * @return resource libvirt storagepool resource
 * @since 0.4.1(-1)
 */
function libvirt_storagepool_lookup_by_uuid_string($res, string $uuid) {}

/**
 * Function is used to lookup for storage pool by a volume
 * @param resource $res volume resource of storage pool
 * @return resource libvirt storagepool resource
 * @since 0.4.1(-1)
 */
function libvirt_storagepool_lookup_by_volume($res) {}

/**
 * Function is used to refresh the storage pool information
 * @param resource $res libvirt storagepool resource
 * @param int $flags [optional] refresh flags
 * @return bool TRUE if success, FALSE on error
 * @since 0.4.1(-1)
 */
function libvirt_storagepool_refresh($res, int $flags = 0): bool {}

/**
 * Function is used to set autostart of the storage pool
 * @param resource $res libvirt storagepool resource
 * @param bool $flags flags to set autostart
 * @return bool result on setting storagepool autostart value
 */
function libvirt_storagepool_set_autostart($res, bool $flags): bool {}

/**
 * Function is used to undefine the storage pool identified by it's resource
 * @param resource $res libvirt storagepool resource
 * @return bool TRUE if success, FALSE on error
 * @since 0.4.1(-1)
 */
function libvirt_storagepool_undefine($res): bool {}

/**
 * Function is used to create the new storage pool and return the handle to new storage pool
 * @param resource $res libvirt storagepool resource
 * @param string $xml XML string to create the storage volume in the storage pool
 * @param int $flags [optional] virStorageVolCreateXML flags
 * @return resource libvirt storagevolume resource
 * @since 0.4.1(-1)
 */
function libvirt_storagevolume_create_xml($res, string $xml, int $flags = 0) {}

/**
 * Function is used to clone the new storage volume into pool from the original volume
 * @param resource $pool libvirt storagepool resource
 * @param string $xml XML string to create the storage volume in the storage pool
 * @param resource $original_volume libvirt storagevolume resource
 * @return resource libvirt storagevolume resource
 * @since 0.4.1(-2)
 */
function libvirt_storagevolume_create_xml_from($pool, string $xml, $original_volume) {}

/**
 * Function is used to delete to volume identified by it's resource
 * @param resource $res libvirt storagevolume resource
 * @param int $flags [optional] flags for the storage volume deletion for virStorageVolDelete()
 * @return bool TRUE for success, FALSE on error
 * @since 0.4.2
 */
function libvirt_storagevolume_delete($res, int $flags = 0): bool {}

/**
 * Function is used to download volume identified by it's resource
 * @param resource $res libvirt storagevolume resource
 * @param resource $stream stream to use as output
 * @param int $offset [optional] position to start reading from
 * @param int $length [optional] limit on amount of data to download
 * @param int $flags [optional] flags for the storage volume download for virStorageVolDownload()
 * @return int
 * @since 0.5.0
 */
function libvirt_storagevolume_download($res, $stream, int $offset = 0, int $length = 0, int $flags = 0): int {}

/**
 * Function is used to get the storage volume information
 * @param resource $res libvirt storagevolume resource
 * @return array storage volume information array of type, allocation and capacity
 * @since 0.4.1(-1)
 */
function libvirt_storagevolume_get_info($res): array {}

/**
 * Function is used to get the storage volume name
 * @param resource $res libvirt storagevolume resource
 * @return string storagevolume name
 * @since 0.4.1(-2)
 */
function libvirt_storagevolume_get_name($res): string {}

/**
 * Function is used to get the storage volume path
 * @param resource $res libvirt storagevolume resource
 * @return string storagevolume path
 * @since 0.4.1(-2)
 */
function libvirt_storagevolume_get_path($res): string {}

/**
 * Function is used to get the storage volume XML description
 * @param resource $res libvirt storagevolume resource
 * @param string|null $xpath [optional] xPath expression string to get just this entry, can be NULL
 * @param int $flags [optional] flags
 * @return string storagevolume XML description or result of xPath expression
 * @since 0.4.2
 */
function libvirt_storagevolume_get_xml_desc($res, ?string $xpath, int $flags = 0): string {}

/**
 * Function is used to lookup for storage volume by it's name
 * @param resource $res libvirt storagepool resource
 * @param string $name name of the storage volume to look for
 * @return resource libvirt storagevolume resource
 * @since 0.4.1(-1)
 */
function libvirt_storagevolume_lookup_by_name($res, string $name) {}

/**
 * Function is used to lookup for storage volume by it's path
 * @param resource $res libvirt connection resource
 * @param string $path path of the storage volume to look for
 * @return resource libvirt storagevolume resource
 * @since 0.4.1(-2)
 */
function libvirt_storagevolume_lookup_by_path($res, string $path) {}

/**
 * Function is used to resize volume identified by it's resource
 * @param resource $res libvirt storagevolume resource
 * @param int $capacity capacity for the storage volume
 * @param int $flags [optional] flags for the storage volume resize for virStorageVolResize()
 * @return int
 * @since 0.5.0
 */
function libvirt_storagevolume_resize($res, int $capacity, int $flags = 0): int {}

/**
 * Function is used to upload volume identified by it's resource
 * @param resource $res libvirt storagevolume resource
 * @param resource $stream stream to use as input
 * @param int $offset [optional] position to start writing to
 * @param int $length [optional] limit on amount of data to upload
 * @param int $flags [optional] flags for the storage volume upload for virStorageVolUpload()
 * @return int
 * @since 0.5.0
 */
function libvirt_storagevolume_upload($res, $stream, int $offset = 0, int $length = 0, int $flags = 0): int {}

/* Stream functions */

/**
 * Function is used to abort transfer
 * @param resource $res libvirt stream resource from libvirt_stream_create()
 * @return int
 * @since 0.5.0
 */
function libvirt_stream_abort($res): int {}

/**
 * Function is used to close stream
 * @param resource $res libvirt stream resource from libvirt_stream_create()
 * @return int
 * @since 0.5.0
 */
function libvirt_stream_close($res): int {}

/**
 * Function is used to create new stream from libvirt conn
 * @param resource $res libvirt connection resource from libvirt_connect()
 * @return resource resource libvirt stream resource
 * @since 0.5.0
 */
function libvirt_stream_create($res) {}

/**
 * Function is used to finish transfer
 * @param resource $res libvirt stream resource from libvirt_stream_create()
 * @return int
 * @since 0.5.0
 */
function libvirt_stream_finish($res): int {}

/**
 * Function is used to close stream from libvirt conn
 * @param resource $res libvirt stream resource from libvirt_stream_create()
 * @param string $data buffer
 * @param int $len [optional] amount of data to receive
 * @return int
 * @since 0.5.0
 */
function libvirt_stream_recv($res, string $data, int $len = 0): int {}

/**
 * Function is used to close stream from libvirt conn
 * @param resource $res libvirt stream resource from libvirt_stream_create()
 * @param string $data buffer
 * @param int $length [optional] amount of data to send
 * @return int
 * @since 0.5.0
 */
function libvirt_stream_send($res, string $data, int $length = 0): int {}
<?php

// Start of interbase v.

/**
 * Open a connection to an InterBase database
 * @link https://php.net/manual/en/function.ibase-connect.php
 * @param string $database [optional] <p>
 * The database argument has to be a valid path to
 * database file on the server it resides on. If the server is not local,
 * it must be prefixed with either 'hostname:' (TCP/IP), '//hostname/'
 * (NetBEUI) or 'hostname@' (IPX/SPX), depending on the connection
 * protocol used.
 * </p>
 * @param string $username [optional] <p>
 * The user name. Can be set with the
 * ibase.default_user &php.ini; directive.
 * </p>
 * @param string $password [optional] <p>
 * The password for username. Can be set with the
 * ibase.default_password &php.ini; directive.
 * </p>
 * @param string $charset [optional] <p>
 * charset is the default character set for a
 * database.
 * </p>
 * @param int $buffers [optional] <p>
 * buffers is the number of database buffers to
 * allocate for the server-side cache. If 0 or omitted, server chooses
 * its own default.
 * </p>
 * @param int $dialect [optional] <p>
 * dialect selects the default SQL dialect for any
 * statement executed within a connection, and it defaults to the highest
 * one supported by client libraries. Functional only with InterBase 6
 * and up.
 * </p>
 * @param string $role [optional] <p>
 * Functional only with InterBase 5 and up.
 * </p>
 * @param int $sync [optional] <p>
 * </p>
 * @return resource|false an InterBase link identifier on success, or false on error.
 */
function ibase_connect($database = null, $username = null, $password = null, $charset = null, $buffers = null, $dialect = null, $role = null, $sync = null) {}

/**
 * Open a persistent connection to an InterBase database
 * @link https://php.net/manual/en/function.ibase-pconnect.php
 * @param string $database [optional] <p>
 * The database argument has to be a valid path to
 * database file on the server it resides on. If the server is not local,
 * it must be prefixed with either 'hostname:' (TCP/IP), '//hostname/'
 * (NetBEUI) or 'hostname@' (IPX/SPX), depending on the connection
 * protocol used.
 * </p>
 * @param string $username [optional] <p>
 * The user name. Can be set with the
 * ibase.default_user &php.ini; directive.
 * </p>
 * @param string $password [optional] <p>
 * The password for username. Can be set with the
 * ibase.default_password &php.ini; directive.
 * </p>
 * @param string $charset [optional] <p>
 * charset is the default character set for a
 * database.
 * </p>
 * @param int $buffers [optional] <p>
 * buffers is the number of database buffers to
 * allocate for the server-side cache. If 0 or omitted, server chooses
 * its own default.
 * </p>
 * @param int $dialect [optional] <p>
 * dialect selects the default SQL dialect for any
 * statement executed within a connection, and it defaults to the highest
 * one supported by client libraries. Functional only with InterBase 6
 * and up.
 * </p>
 * @param string $role [optional] <p>
 * Functional only with InterBase 5 and up.
 * </p>
 * @param int $sync [optional] <p>
 * </p>
 * @return resource|false an InterBase link identifier on success, or false on error.
 */
function ibase_pconnect($database = null, $username = null, $password = null, $charset = null, $buffers = null, $dialect = null, $role = null, $sync = null) {}

/**
 * Close a connection to an InterBase database
 * @link https://php.net/manual/en/function.ibase-close.php
 * @param resource $connection_id [optional] <p>
 * An InterBase link identifier returned from
 * ibase_connect. If omitted, the last opened link
 * is assumed.
 * </p>
 * @return bool true on success or false on failure.
 */
function ibase_close($connection_id = null) {}

/**
 * Drops a database
 * @link https://php.net/manual/en/function.ibase-drop-db.php
 * @param resource $connection [optional] <p>
 * An InterBase link identifier. If omitted, the last opened link is
 * assumed.
 * </p>
 * @return bool true on success or false on failure.
 */
function ibase_drop_db($connection = null) {}

/**
 * Execute a query on an InterBase database
 * @link https://php.net/manual/en/function.ibase-query.php
 * @param resource $link_identifier [optional] <p>
 * An InterBase link identifier. If omitted, the last opened link is
 * assumed.
 * </p>
 * @param string $query <p>
 * An InterBase query.
 * </p>
 * @param int $bind_args [optional] <p>
 * </p>
 * @return resource|bool If the query raises an error, returns false. If it is successful and
 * there is a (possibly empty) result set (such as with a SELECT query),
 * returns a result identifier. If the query was successful and there were
 * no results, returns true.
 * </p>
 * <p>
 * In PHP 5.0.0 and up, this function will return the number of rows
 * affected by the query for INSERT, UPDATE and DELETE statements. In order
 * to retain backward compatibility, it will return true for these
 * statements if the query succeeded without affecting any rows.
 */
function ibase_query($link_identifier = null, $query, $bind_args = null) {}

/**
 * Fetch a row from an InterBase database
 * @link https://php.net/manual/en/function.ibase-fetch-row.php
 * @param resource $result_identifier <p>
 * An InterBase result identifier.
 * </p>
 * @param int $fetch_flag [optional] <p>
 * fetch_flag is a combination of the constants
 * IBASE_TEXT and IBASE_UNIXTIME
 * ORed together. Passing IBASE_TEXT will cause this
 * function to return BLOB contents instead of BLOB ids. Passing
 * IBASE_UNIXTIME will cause this function to return
 * date/time values as Unix timestamps instead of as formatted strings.
 * </p>
 * @return array|false an array that corresponds to the fetched row, or false if there
 * are no more rows. Each result column is stored in an array offset,
 * starting at offset 0.
 */
function ibase_fetch_row($result_identifier, $fetch_flag = null) {}

/**
 * Fetch a result row from a query as an associative array
 * @link https://php.net/manual/en/function.ibase-fetch-assoc.php
 * @param resource $result <p>
 * The result handle.
 * </p>
 * @param int $fetch_flag [optional] <p>
 * fetch_flag is a combination of the constants
 * IBASE_TEXT and IBASE_UNIXTIME
 * ORed together. Passing IBASE_TEXT will cause this
 * function to return BLOB contents instead of BLOB ids. Passing
 * IBASE_UNIXTIME will cause this function to return
 * date/time values as Unix timestamps instead of as formatted strings.
 * </p>
 * @return array|false an associative array that corresponds to the fetched row.
 * Subsequent calls will return the next row in the result set, or false if
 * there are no more rows.
 */
function ibase_fetch_assoc($result, $fetch_flag = null) {}

/**
 * Get an object from a InterBase database
 * @link https://php.net/manual/en/function.ibase-fetch-object.php
 * @param resource $result_id <p>
 * An InterBase result identifier obtained either by
 * ibase_query or ibase_execute.
 * </p>
 * @param int $fetch_flag [optional] <p>
 * fetch_flag is a combination of the constants
 * IBASE_TEXT and IBASE_UNIXTIME
 * ORed together. Passing IBASE_TEXT will cause this
 * function to return BLOB contents instead of BLOB ids. Passing
 * IBASE_UNIXTIME will cause this function to return
 * date/time values as Unix timestamps instead of as formatted strings.
 * </p>
 * @return object|false an object with the next row information, or false if there are
 * no more rows.
 */
function ibase_fetch_object($result_id, $fetch_flag = null) {}

/**
 * Free a result set
 * @link https://php.net/manual/en/function.ibase-free-result.php
 * @param resource $result_identifier <p>
 * A result set created by ibase_query or
 * ibase_execute.
 * </p>
 * @return bool true on success or false on failure.
 */
function ibase_free_result($result_identifier) {}

/**
 * Assigns a name to a result set
 * @link https://php.net/manual/en/function.ibase-name-result.php
 * @param resource $result <p>
 * An InterBase result set.
 * </p>
 * @param string $name <p>
 * The name to be assigned.
 * </p>
 * @return bool true on success or false on failure.
 */
function ibase_name_result($result, $name) {}

/**
 * Prepare a query for later binding of parameter placeholders and execution
 * @link https://php.net/manual/en/function.ibase-prepare.php
 * @param string $query <p>
 * An InterBase query.
 * </p>
 * @return resource|false a prepared query handle, or false on error.
 */
function ibase_prepare($query) {}

/**
 * Execute a previously prepared query
 * @link https://php.net/manual/en/function.ibase-execute.php
 * @param resource $query <p>
 * An InterBase query prepared by ibase_prepare.
 * </p>
 * @param mixed ...$bind_arg [optional] <p>
 * </p>
 * @return resource|bool If the query raises an error, returns false. If it is successful and
 * there is a (possibly empty) result set (such as with a SELECT query),
 * returns a result identifier. If the query was successful and there were
 * no results, returns true.
 * </p>
 * <p>
 * In PHP 5.0.0 and up, this function returns the number of rows affected by
 * the query (if > 0 and applicable to the statement type). A query that
 * succeeded, but did not affect any rows (e.g. an UPDATE of a non-existent
 * record) will return true.
 */
function ibase_execute($query, ...$bind_arg) {}

/**
 * Free memory allocated by a prepared query
 * @link https://php.net/manual/en/function.ibase-free-query.php
 * @param resource $query <p>
 * A query prepared with ibase_prepare.
 * </p>
 * @return bool true on success or false on failure.
 */
function ibase_free_query($query) {}

/**
 * Increments the named generator and returns its new value
 * @link https://php.net/manual/en/function.ibase-gen-id.php
 * @param string $generator
 * @param int $increment [optional]
 * @param resource $link_identifier [optional]
 * @return mixed new generator value as integer, or as string if the value is too big.
 */
function ibase_gen_id($generator, $increment = null, $link_identifier = null) {}

/**
 * Get the number of fields in a result set
 * @link https://php.net/manual/en/function.ibase-num-fields.php
 * @param resource $result_id <p>
 * An InterBase result identifier.
 * </p>
 * @return int the number of fields as an integer.
 */
function ibase_num_fields($result_id) {}

/**
 * Return the number of parameters in a prepared query
 * @link https://php.net/manual/en/function.ibase-num-params.php
 * @param resource $query <p>
 * The prepared query handle.
 * </p>
 * @return int the number of parameters as an integer.
 */
function ibase_num_params($query) {}

/**
 * Return the number of rows that were affected by the previous query
 * @link https://php.net/manual/en/function.ibase-affected-rows.php
 * @param resource $link_identifier [optional] <p>
 * A transaction context. If link_identifier is a
 * connection resource, its default transaction is used.
 * </p>
 * @return int the number of rows as an integer.
 */
function ibase_affected_rows($link_identifier = null) {}

/**
 * Get information about a field
 * @link https://php.net/manual/en/function.ibase-field-info.php
 * @param resource $result <p>
 * An InterBase result identifier.
 * </p>
 * @param int $field_number <p>
 * Field offset.
 * </p>
 * @return array an array with the following keys: name,
 * alias, relation,
 * length and type.
 */
function ibase_field_info($result, $field_number) {}

/**
 * Return information about a parameter in a prepared query
 * @link https://php.net/manual/en/function.ibase-param-info.php
 * @param resource $query <p>
 * An InterBase prepared query handle.
 * </p>
 * @param int $param_number <p>
 * Parameter offset.
 * </p>
 * @return array an array with the following keys: name,
 * alias, relation,
 * length and type.
 */
function ibase_param_info($query, $param_number) {}

/**
 * Begin a transaction
 * @link https://php.net/manual/en/function.ibase-trans.php
 * @param int $trans_args [optional] <p>
 * trans_args can be a combination of
 * IBASE_READ,
 * IBASE_WRITE,
 * IBASE_COMMITTED,
 * IBASE_CONSISTENCY,
 * IBASE_CONCURRENCY,
 * IBASE_REC_VERSION,
 * IBASE_REC_NO_VERSION,
 * IBASE_WAIT and
 * IBASE_NOWAIT.
 * </p>
 * @param resource $link_identifier [optional] <p>
 * An InterBase link identifier. If omitted, the last opened link is
 * assumed.
 * </p>
 * @return resource|false a transaction handle, or false on error.
 */
function ibase_trans($trans_args = null, $link_identifier = null) {}

/**
 * Commit a transaction
 * @link https://php.net/manual/en/function.ibase-commit.php
 * @param resource $link_or_trans_identifier [optional] <p>
 * If called without an argument, this function commits the default
 * transaction of the default link. If the argument is a connection
 * identifier, the default transaction of the corresponding connection
 * will be committed. If the argument is a transaction identifier, the
 * corresponding transaction will be committed.
 * </p>
 * @return bool true on success or false on failure.
 */
function ibase_commit($link_or_trans_identifier = null) {}

/**
 * Roll back a transaction
 * @link https://php.net/manual/en/function.ibase-rollback.php
 * @param resource $link_or_trans_identifier [optional] <p>
 * If called without an argument, this function rolls back the default
 * transaction of the default link. If the argument is a connection
 * identifier, the default transaction of the corresponding connection
 * will be rolled back. If the argument is a transaction identifier, the
 * corresponding transaction will be rolled back.
 * </p>
 * @return bool true on success or false on failure.
 */
function ibase_rollback($link_or_trans_identifier = null) {}

/**
 * Commit a transaction without closing it
 * @link https://php.net/manual/en/function.ibase-commit-ret.php
 * @param resource $link_or_trans_identifier [optional] <p>
 * If called without an argument, this function commits the default
 * transaction of the default link. If the argument is a connection
 * identifier, the default transaction of the corresponding connection
 * will be committed. If the argument is a transaction identifier, the
 * corresponding transaction will be committed. The transaction context
 * will be retained, so statements executed from within this transaction
 * will not be invalidated.
 * </p>
 * @return bool true on success or false on failure.
 */
function ibase_commit_ret($link_or_trans_identifier = null) {}

/**
 * Roll back a transaction without closing it
 * @link https://php.net/manual/en/function.ibase-rollback-ret.php
 * @param resource $link_or_trans_identifier [optional] <p>
 * If called without an argument, this function rolls back the default
 * transaction of the default link. If the argument is a connection
 * identifier, the default transaction of the corresponding connection
 * will be rolled back. If the argument is a transaction identifier, the
 * corresponding transaction will be rolled back. The transaction context
 * will be retained, so statements executed from within this transaction
 * will not be invalidated.
 * </p>
 * @return bool true on success or false on failure.
 */
function ibase_rollback_ret($link_or_trans_identifier = null) {}

/**
 * Return blob length and other useful info
 * @link https://php.net/manual/en/function.ibase-blob-info.php
 * @param resource $link_identifier <p>
 * An InterBase link identifier. If omitted, the last opened link is
 * assumed.
 * </p>
 * @param string $blob_id <p>
 * A BLOB id.
 * </p>
 * @return array an array containing information about a BLOB. The information returned
 * consists of the length of the BLOB, the number of segments it contains, the size
 * of the largest segment, and whether it is a stream BLOB or a segmented BLOB.
 */
function ibase_blob_info($link_identifier, $blob_id) {}

/**
 * Create a new blob for adding data
 * @link https://php.net/manual/en/function.ibase-blob-create.php
 * @param resource $link_identifier [optional] <p>
 * An InterBase link identifier. If omitted, the last opened link is
 * assumed.
 * </p>
 * @return resource|false a BLOB handle for later use with
 * ibase_blob_add or false on failure.
 */
function ibase_blob_create($link_identifier = null) {}

/**
 * Add data into a newly created blob
 * @link https://php.net/manual/en/function.ibase-blob-add.php
 * @param resource $blob_handle <p>
 * A blob handle opened with ibase_blob_create.
 * </p>
 * @param string $data <p>
 * The data to be added.
 * </p>
 * @return void
 */
function ibase_blob_add($blob_handle, $data) {}

/**
 * Cancel creating blob
 * @link https://php.net/manual/en/function.ibase-blob-cancel.php
 * @param resource $blob_handle <p>
 * A BLOB handle opened with ibase_blob_create.
 * </p>
 * @return bool true on success or false on failure.
 */
function ibase_blob_cancel($blob_handle) {}

/**
 * Close blob
 * @link https://php.net/manual/en/function.ibase-blob-close.php
 * @param resource $blob_handle <p>
 * A BLOB handle opened with ibase_blob_create or
 * ibase_blob_open.
 * </p>
 * @return mixed If the BLOB was being read, this function returns true on success, if
 * the BLOB was being written to, this function returns a string containing
 * the BLOB id that has been assigned to it by the database. On failure, this
 * function returns false.
 */
function ibase_blob_close($blob_handle) {}

/**
 * Open blob for retrieving data parts
 * @link https://php.net/manual/en/function.ibase-blob-open.php
 * @param resource $link_identifier <p>
 * An InterBase link identifier. If omitted, the last opened link is
 * assumed.
 * </p>
 * @param string $blob_id <p>
 * A BLOB id.
 * </p>
 * @return resource|false a BLOB handle for later use with
 * ibase_blob_get or false on failure.
 */
function ibase_blob_open($link_identifier, $blob_id) {}

/**
 * Get len bytes data from open blob
 * @link https://php.net/manual/en/function.ibase-blob-get.php
 * @param resource $blob_handle <p>
 * A BLOB handle opened with ibase_blob_open.
 * </p>
 * @param int $len <p>
 * Size of returned data.
 * </p>
 * @return string|false at most len bytes from the BLOB, or false
 * on failure.
 */
function ibase_blob_get($blob_handle, $len) {}

/**
 * Output blob contents to browser
 * @link https://php.net/manual/en/function.ibase-blob-echo.php
 * @param string $blob_id <p>
 * </p>
 * @return bool true on success or false on failure.
 */
function ibase_blob_echo($blob_id) {}

/**
 * Create blob, copy file in it, and close it
 * @link https://php.net/manual/en/function.ibase-blob-import.php
 * @param resource $link_identifier <p>
 * An InterBase link identifier. If omitted, the last opened link is
 * assumed.
 * </p>
 * @param resource $file_handle <p>
 * The file handle is a handle returned by fopen.
 * </p>
 * @return string|false the BLOB id on success, or false on error.
 */
function ibase_blob_import($link_identifier, $file_handle) {}

/**
 * Return error messages
 * @link https://php.net/manual/en/function.ibase-errmsg.php
 * @return string|false the error message as a string, or false if no error occurred.
 */
function ibase_errmsg() {}

/**
 * Return an error code
 * @link https://php.net/manual/en/function.ibase-errcode.php
 * @return int|false the error code as an integer, or false if no error occurred.
 */
function ibase_errcode() {}

/**
 * Add a user to a security database (only for IB6 or later)
 * @link https://php.net/manual/en/function.ibase-add-user.php
 * @param resource $service_handle
 * @param string $user_name
 * @param string $password
 * @param string $first_name [optional]
 * @param string $middle_name [optional]
 * @param string $last_name [optional]
 * @return bool true on success or false on failure.
 */
function ibase_add_user($service_handle, $user_name, $password, $first_name = null, $middle_name = null, $last_name = null) {}

/**
 * Modify a user to a security database (only for IB6 or later)
 * @link https://php.net/manual/en/function.ibase-modify-user.php
 * @param resource $service_handle
 * @param string $user_name
 * @param string $password
 * @param string $first_name [optional]
 * @param string $middle_name [optional]
 * @param string $last_name [optional]
 * @return bool true on success or false on failure.
 */
function ibase_modify_user($service_handle, $user_name, $password, $first_name = null, $middle_name = null, $last_name = null) {}

/**
 * Delete a user from a security database (only for IB6 or later)
 * @link https://php.net/manual/en/function.ibase-delete-user.php
 * @param resource $service_handle
 * @param string $user_name
 * @return bool true on success or false on failure.
 */
function ibase_delete_user($service_handle, $user_name) {}

/**
 * Connect to the service manager
 * @link https://php.net/manual/en/function.ibase-service-attach.php
 * @param string $host
 * @param string $dba_username
 * @param string $dba_password
 * @return resource|false
 */
function ibase_service_attach($host, $dba_username, $dba_password) {}

/**
 * Disconnect from the service manager
 * @link https://php.net/manual/en/function.ibase-service-detach.php
 * @param resource $service_handle
 * @return bool true on success or false on failure.
 */
function ibase_service_detach($service_handle) {}

/**
 * Initiates a backup task in the service manager and returns immediately
 * @link https://php.net/manual/en/function.ibase-backup.php
 * @param resource $service_handle
 * @param string $source_db
 * @param string $dest_file
 * @param int $options [optional]
 * @param bool $verbose [optional]
 * @return mixed
 */
function ibase_backup($service_handle, $source_db, $dest_file, $options = null, $verbose = null) {}

/**
 * Initiates a restore task in the service manager and returns immediately
 * @link https://php.net/manual/en/function.ibase-restore.php
 * @param resource $service_handle
 * @param string $source_file
 * @param string $dest_db
 * @param int $options [optional]
 * @param bool $verbose [optional]
 * @return mixed
 */
function ibase_restore($service_handle, $source_file, $dest_db, $options = null, $verbose = null) {}

/**
 * Execute a maintenance command on the database server
 * @link https://php.net/manual/en/function.ibase-maintain-db.php
 * @param resource $service_handle
 * @param string $db
 * @param int $action
 * @param int $argument [optional]
 * @return bool true on success or false on failure.
 */
function ibase_maintain_db($service_handle, $db, $action, $argument = null) {}

/**
 * Request statistics about a database
 * @link https://php.net/manual/en/function.ibase-db-info.php
 * @param resource $service_handle
 * @param string $db
 * @param int $action
 * @param int $argument [optional]
 * @return string
 */
function ibase_db_info($service_handle, $db, $action, $argument = null) {}

/**
 * Request information about a database server
 * @link https://php.net/manual/en/function.ibase-server-info.php
 * @param resource $service_handle
 * @param int $action
 * @return string
 */
function ibase_server_info($service_handle, $action) {}

/**
 * Wait for an event to be posted by the database
 * @link https://php.net/manual/en/function.ibase-wait-event.php
 * @param string $event_name1 <p>
 * The event name.
 * </p>
 * @param string $event_name2 [optional] <p>
 * </p>
 * @param string ...$_ [optional]
 * @return string the name of the event that was posted.
 */
function ibase_wait_event($event_name1, $event_name2 = null, ...$_) {}

/**
 * Register a callback function to be called when events are posted
 * @link https://php.net/manual/en/function.ibase-set-event-handler.php
 * @param callable $event_handler <p>
 * The callback is called with the event name and the link resource as
 * arguments whenever one of the specified events is posted by the
 * database.
 * </p>
 * <p>
 * The callback must return false if the event handler should be
 * canceled. Any other return value is ignored. This function accepts up
 * to 15 event arguments.
 * </p>
 * @param string $event_name1 <p>
 * An event name.
 * </p>
 * @param string $event_name2 [optional] <p>
 * At most 15 events allowed.
 * </p>
 * @param string ...$_ [optional]
 * @return resource The return value is an event resource. This resource can be used to free
 * the event handler using ibase_free_event_handler.
 */
function ibase_set_event_handler($event_handler, $event_name1, $event_name2 = null, ...$_) {}

/**
 * Cancels a registered event handler
 * @link https://php.net/manual/en/function.ibase-free-event-handler.php
 * @param resource $event <p>
 * An event resource, created by
 * ibase_set_event_handler.
 * </p>
 * @return bool true on success or false on failure.
 */
function ibase_free_event_handler($event) {}

/**
 * This is an alias of ibase_connect
 * Open a connection to an InterBase database
 * @link https://php.net/manual/en/function.fbird-connect.php
 * @param string $database [optional] <p>
 * The database argument has to be a valid path to
 * database file on the server it resides on. If the server is not local,
 * it must be prefixed with either 'hostname:' (TCP/IP), '//hostname/'
 * (NetBEUI) or 'hostname@' (IPX/SPX), depending on the connection
 * protocol used.
 * </p>
 * @param string $username [optional] <p>
 * The user name. Can be set with the
 * fbird.default_user &php.ini; directive.
 * </p>
 * @param string $password [optional] <p>
 * The password for username. Can be set with the
 * fbird.default_password &php.ini; directive.
 * </p>
 * @param string $charset [optional] <p>
 * charset is the default character set for a
 * database.
 * </p>
 * @param int $buffers [optional] <p>
 * buffers is the number of database buffers to
 * allocate for the server-side cache. If 0 or omitted, server chooses
 * its own default.
 * </p>
 * @param int $dialect [optional] <p>
 * dialect selects the default SQL dialect for any
 * statement executed within a connection, and it defaults to the highest
 * one supported by client libraries. Functional only with InterBase 6
 * and up.
 * </p>
 * @param string $role [optional] <p>
 * Functional only with InterBase 5 and up.
 * </p>
 * @param int $sync [optional] <p>
 * </p>
 * @return resource|false an InterBase link identifier on success, or false on error.
 */
function fbird_connect($database = null, $username = null, $password = null, $charset = null, $buffers = null, $dialect = null, $role = null, $sync = null) {}

/**
 * This is an alias of ibase_pconnect
 * Open a persistent connection to an InterBase database
 * @link https://php.net/manual/en/function.fbird-pconnect.php
 * @param string $database [optional] <p>
 * The database argument has to be a valid path to
 * database file on the server it resides on. If the server is not local,
 * it must be prefixed with either 'hostname:' (TCP/IP), '//hostname/'
 * (NetBEUI) or 'hostname@' (IPX/SPX), depending on the connection
 * protocol used.
 * </p>
 * @param string $username [optional] <p>
 * The user name. Can be set with the
 * fbird.default_user &php.ini; directive.
 * </p>
 * @param string $password [optional] <p>
 * The password for username. Can be set with the
 * fbird.default_password &php.ini; directive.
 * </p>
 * @param string $charset [optional] <p>
 * charset is the default character set for a
 * database.
 * </p>
 * @param int $buffers [optional] <p>
 * buffers is the number of database buffers to
 * allocate for the server-side cache. If 0 or omitted, server chooses
 * its own default.
 * </p>
 * @param int $dialect [optional] <p>
 * dialect selects the default SQL dialect for any
 * statement executed within a connection, and it defaults to the highest
 * one supported by client libraries. Functional only with InterBase 6
 * and up.
 * </p>
 * @param string $role [optional] <p>
 * Functional only with InterBase 5 and up.
 * </p>
 * @param int $sync [optional] <p>
 * </p>
 * @return resource|false an InterBase link identifier on success, or false on error.
 */
function fbird_pconnect($database = null, $username = null, $password = null, $charset = null, $buffers = null, $dialect = null, $role = null, $sync = null) {}

/**
 * This is an alias of ibase_close
 * Close a connection to an InterBase database
 * @link https://php.net/manual/en/function.fbird-close.php
 * @param resource $connection_id [optional] <p>
 * An InterBase link identifier returned from
 * fbird_connect. If omitted, the last opened link
 * is assumed.
 * </p>
 * @return bool true on success or false on failure.
 */
function fbird_close($connection_id = null) {}

/**
 * This is an alias of ibase_drop_db
 * Drops a database
 * @link https://php.net/manual/en/function.fbird-drop-db.php
 * @param resource $connection [optional] <p>
 * An InterBase link identifier. If omitted, the last opened link is
 * assumed.
 * </p>
 * @return bool true on success or false on failure.
 */
function fbird_drop_db($connection = null) {}

/**
 * This is an alias of ibase_query
 * Execute a query on an InterBase database
 * @link https://php.net/manual/en/function.fbird-query.php
 * @param resource $link_identifier [optional] <p>
 * An InterBase link identifier. If omitted, the last opened link is
 * assumed.
 * </p>
 * @param string $query <p>
 * An InterBase query.
 * </p>
 * @param int $bind_args [optional] <p>
 * </p>
 * @return resource|bool If the query raises an error, returns false. If it is successful and
 * there is a (possibly empty) result set (such as with a SELECT query),
 * returns a result identifier. If the query was successful and there were
 * no results, returns true.
 * </p>
 * <p>
 * In PHP 5.0.0 and up, this function will return the number of rows
 * affected by the query for INSERT, UPDATE and DELETE statements. In order
 * to retain backward compatibility, it will return true for these
 * statements if the query succeeded without affecting any rows.
 */
function fbird_query($link_identifier = null, $query, $bind_args = null) {}

/**
 * This is an alias of ibase_fetch_row
 * Fetch a row from an InterBase database
 * @link https://php.net/manual/en/function.fbird-fetch-row.php
 * @param resource $result_identifier <p>
 * An InterBase result identifier.
 * </p>
 * @param int $fetch_flag [optional] <p>
 * fetch_flag is a combination of the constants
 * IBASE_TEXT and IBASE_UNIXTIME
 * ORed together. Passing IBASE_TEXT will cause this
 * function to return BLOB contents instead of BLOB ids. Passing
 * IBASE_UNIXTIME will cause this function to return
 * date/time values as Unix timestamps instead of as formatted strings.
 * </p>
 * @return array|false an array that corresponds to the fetched row, or false if there
 * are no more rows. Each result column is stored in an array offset,
 * starting at offset 0.
 */
function fbird_fetch_row($result_identifier, $fetch_flag = null) {}

/**
 * This is an alias of ibase_fetch_assoc
 * Fetch a result row from a query as an associative array
 * @link https://php.net/manual/en/function.fbird-fetch-assoc.php
 * @param resource $result <p>
 * The result handle.
 * </p>
 * @param int $fetch_flag [optional] <p>
 * fetch_flag is a combination of the constants
 * IBASE_TEXT and IBASE_UNIXTIME
 * ORed together. Passing IBASE_TEXT will cause this
 * function to return BLOB contents instead of BLOB ids. Passing
 * IBASE_UNIXTIME will cause this function to return
 * date/time values as Unix timestamps instead of as formatted strings.
 * </p>
 * @return array|false an associative array that corresponds to the fetched row.
 * Subsequent calls will return the next row in the result set, or false if
 * there are no more rows.
 */
function fbird_fetch_assoc($result, $fetch_flag = null) {}

/**
 * This is an alias of ibase_fetch_object
 * Get an object from a InterBase database
 * @link https://php.net/manual/en/function.fbird-fetch-object.php
 * @param resource $result_id <p>
 * An InterBase result identifier obtained either by
 * fbird_query or fbird_execute.
 * </p>
 * @param int $fetch_flag [optional] <p>
 * fetch_flag is a combination of the constants
 * IBASE_TEXT and IBASE_UNIXTIME
 * ORed together. Passing IBASE_TEXT will cause this
 * function to return BLOB contents instead of BLOB ids. Passing
 * IBASE_UNIXTIME will cause this function to return
 * date/time values as Unix timestamps instead of as formatted strings.
 * </p>
 * @return object|false an object with the next row information, or false if there are
 * no more rows.
 */
function fbird_fetch_object($result_id, $fetch_flag = null) {}

/**
 * This is an alias of ibase_free_result
 * Free a result set
 * @link https://php.net/manual/en/function.fbird-free-result.php
 * @param resource $result_identifier <p>
 * A result set created by fbird_query or
 * fbird_execute.
 * </p>
 * @return bool true on success or false on failure.
 */
function fbird_free_result($result_identifier) {}

/**
 * This is an alias of ibase_name_result
 * Assigns a name to a result set
 * @link https://php.net/manual/en/function.fbird-name-result.php
 * @param resource $result <p>
 * An InterBase result set.
 * </p>
 * @param string $name <p>
 * The name to be assigned.
 * </p>
 * @return bool true on success or false on failure.
 */
function fbird_name_result($result, $name) {}

/**
 * This is an alias of ibase_prepare
 * Prepare a query for later binding of parameter placeholders and execution
 * @link https://php.net/manual/en/function.fbird-prepare.php
 * @param string $query <p>
 * An InterBase query.
 * </p>
 * @return resource|false a prepared query handle, or false on error.
 */
function fbird_prepare($query) {}

/**
 * This is an alias of ibase_execute
 * Execute a previously prepared query
 * @link https://php.net/manual/en/function.fbird-execute.php
 * @param resource $query <p>
 * An InterBase query prepared by fbird_prepare.
 * </p>
 * @param mixed ...$bind_arg [optional]
 * @return resource|bool <p>If the query raises an error, returns false. If it is successful and
 * there is a (possibly empty) result set (such as with a SELECT query),
 * returns a result identifier. If the query was successful and there were
 * no results, returns true.
 * </p>
 * <p>
 * In PHP 5.0.0 and up, this function returns the number of rows affected by
 * the query (if > 0 and applicable to the statement type). A query that
 * succeeded, but did not affect any rows (e.g. an UPDATE of a non-existent
 * record) will return true.</p>
 */
function fbird_execute($query, ...$bind_arg) {}

/**
 * This is an alias of ibase_free_query
 * Free memory allocated by a prepared query
 * @link https://php.net/manual/en/function.fbird-free-query.php
 * @param resource $query <p>
 * A query prepared with fbird_prepare.
 * </p>
 * @return bool true on success or false on failure.
 */
function fbird_free_query($query) {}

/**
 * This is an alias of ibase_gen_id
 * Increments the named generator and returns its new value
 * @link https://php.net/manual/en/function.fbird-gen-id.php
 * @param string $generator
 * @param int $increment [optional]
 * @param resource $link_identifier [optional]
 * @return mixed new generator value as integer, or as string if the value is too big.
 */
function fbird_gen_id($generator, $increment = null, $link_identifier = null) {}

/**
 * This is an alias of ibase_num_fields
 * Get the number of fields in a result set
 * @link https://php.net/manual/en/function.fbird-num-fields.php
 * @param resource $result_id <p>
 * An InterBase result identifier.
 * </p>
 * @return int the number of fields as an integer.
 */
function fbird_num_fields($result_id) {}

/**
 * This is an alias of ibase_num_params
 * Return the number of parameters in a prepared query
 * @link https://php.net/manual/en/function.fbird-num-params.php
 * @param resource $query <p>
 * The prepared query handle.
 * </p>
 * @return int the number of parameters as an integer.
 */
function fbird_num_params($query) {}

/**
 * This is an alias of ibase_affected_rows
 * Return the number of rows that were affected by the previous query
 * @link https://php.net/manual/en/function.fbird-affected-rows.php
 * @param resource $link_identifier [optional] <p>
 * A transaction context. If link_identifier is a
 * connection resource, its default transaction is used.
 * </p>
 * @return int the number of rows as an integer.
 */
function fbird_affected_rows($link_identifier = null) {}

/**
 * This is an alias of ibase_field_info
 * Get information about a field
 * @link https://php.net/manual/en/function.fbird-field-info.php
 * @param resource $result <p>
 * An InterBase result identifier.
 * </p>
 * @param int $field_number <p>
 * Field offset.
 * </p>
 * @return array an array with the following keys: name,
 * alias, relation,
 * length and type.
 */
function fbird_field_info($result, $field_number) {}

/**
 * This is an alias of ibase_param_info
 * Return information about a parameter in a prepared query
 * @link https://php.net/manual/en/function.fbird-param-info.php
 * @param resource $query <p>
 * An InterBase prepared query handle.
 * </p>
 * @param int $param_number <p>
 * Parameter offset.
 * </p>
 * @return array an array with the following keys: name,
 * alias, relation,
 * length and type.
 */
function fbird_param_info($query, $param_number) {}

/**
 * This is an alias of ibase_trans
 * Begin a transaction
 * @link https://php.net/manual/en/function.fbird-trans.php
 * @param int $trans_args [optional] <p>
 * trans_args can be a combination of
 * IBASE_READ,
 * IBASE_WRITE,
 * IBASE_COMMITTED,
 * IBASE_CONSISTENCY,
 * IBASE_CONCURRENCY,
 * IBASE_REC_VERSION,
 * IBASE_REC_NO_VERSION,
 * IBASE_WAIT and
 * IBASE_NOWAIT.
 * </p>
 * @param resource $link_identifier [optional] <p>
 * An InterBase link identifier. If omitted, the last opened link is
 * assumed.
 * </p>
 * @return resource|false a transaction handle, or false on error.
 */
function fbird_trans($trans_args = null, $link_identifier = null) {}

/**
 * This is an alias of ibase_commit
 * Commit a transaction
 * @link https://php.net/manual/en/function.fbird-commit.php
 * @param resource $link_or_trans_identifier [optional] <p>
 * If called without an argument, this function commits the default
 * transaction of the default link. If the argument is a connection
 * identifier, the default transaction of the corresponding connection
 * will be committed. If the argument is a transaction identifier, the
 * corresponding transaction will be committed.
 * </p>
 * @return bool true on success or false on failure.
 */
function fbird_commit($link_or_trans_identifier = null) {}

/**
 * This is an alias of ibase_rollback
 * Roll back a transaction
 * @link https://php.net/manual/en/function.fbird-rollback.php
 * @param resource $link_or_trans_identifier [optional] <p>
 * If called without an argument, this function rolls back the default
 * transaction of the default link. If the argument is a connection
 * identifier, the default transaction of the corresponding connection
 * will be rolled back. If the argument is a transaction identifier, the
 * corresponding transaction will be rolled back.
 * </p>
 * @return bool true on success or false on failure.
 */
function fbird_rollback($link_or_trans_identifier = null) {}

/**
 * This is an alias of ibase_commit_ret
 * Commit a transaction without closing it
 * @link https://php.net/manual/en/function.fbird-commit-ret.php
 * @param resource $link_or_trans_identifier [optional] <p>
 * If called without an argument, this function commits the default
 * transaction of the default link. If the argument is a connection
 * identifier, the default transaction of the corresponding connection
 * will be committed. If the argument is a transaction identifier, the
 * corresponding transaction will be committed. The transaction context
 * will be retained, so statements executed from within this transaction
 * will not be invalidated.
 * </p>
 * @return bool true on success or false on failure.
 */
function fbird_commit_ret($link_or_trans_identifier = null) {}

/**
 * This is an alias of ibase_rollback_ret
 * Roll back a transaction without closing it
 * @link https://php.net/manual/en/function.fbird-rollback-ret.php
 * @param resource $link_or_trans_identifier [optional] <p>
 * If called without an argument, this function rolls back the default
 * transaction of the default link. If the argument is a connection
 * identifier, the default transaction of the corresponding connection
 * will be rolled back. If the argument is a transaction identifier, the
 * corresponding transaction will be rolled back. The transaction context
 * will be retained, so statements executed from within this transaction
 * will not be invalidated.
 * </p>
 * @return bool true on success or false on failure.
 */
function fbird_rollback_ret($link_or_trans_identifier = null) {}

/**
 * This is an alias of ibase_blob_info
 * Return blob length and other useful info
 * @link https://php.net/manual/en/function.fbird-blob-info.php
 * @param resource $link_identifier <p>
 * An InterBase link identifier. If omitted, the last opened link is
 * assumed.
 * </p>
 * @param string $blob_id <p>
 * A BLOB id.
 * </p>
 * @return array an array containing information about a BLOB. The information returned
 * consists of the length of the BLOB, the number of segments it contains, the size
 * of the largest segment, and whether it is a stream BLOB or a segmented BLOB.
 */
function fbird_blob_info($link_identifier, $blob_id) {}

/**
 * This is an alias of ibase_blob_create
 * Create a new blob for adding data
 * @link https://php.net/manual/en/function.fbird-blob-create.php
 * @param resource $link_identifier [optional] <p>
 * An InterBase link identifier. If omitted, the last opened link is
 * assumed.
 * </p>
 * @return resource|false a BLOB handle for later use with
 * fbird_blob_add or false on failure.
 */
function fbird_blob_create($link_identifier = null) {}

/**
 * This is an alias of ibase_blob_add
 * Add data into a newly created blob
 * @link https://php.net/manual/en/function.fbird-blob-add.php
 * @param resource $blob_handle <p>
 * A blob handle opened with fbird_blob_create.
 * </p>
 * @param string $data <p>
 * The data to be added.
 * </p>
 * @return void
 */
function fbird_blob_add($blob_handle, $data) {}

/**
 * This is an alias of ibase_blob_cancel
 * Cancel creating blob
 * @link https://php.net/manual/en/function.fbird-blob-cancel.php
 * @param resource $blob_handle <p>
 * A BLOB handle opened with fbird_blob_create.
 * </p>
 * @return bool true on success or false on failure.
 */
function fbird_blob_cancel($blob_handle) {}

/**
 * This is an alias of ibase_blob_close
 * Close blob
 * @link https://php.net/manual/en/function.fbird-blob-close.php
 * @param resource $blob_handle <p>
 * A BLOB handle opened with fbird_blob_create or
 * fbird_blob_open.
 * </p>
 * @return mixed If the BLOB was being read, this function returns true on success, if
 * the BLOB was being written to, this function returns a string containing
 * the BLOB id that has been assigned to it by the database. On failure, this
 * function returns false.
 */
function fbird_blob_close($blob_handle) {}

/**
 * This is an alias of ibase_blob_open
 * Open blob for retrieving data parts
 * @link https://php.net/manual/en/function.fbird-blob-open.php
 * @param resource $link_identifier <p>
 * An InterBase link identifier. If omitted, the last opened link is
 * assumed.
 * </p>
 * @param string $blob_id <p>
 * A BLOB id.
 * </p>
 * @return resource|false a BLOB handle for later use with
 * fbird_blob_get or false on failure.
 */
function fbird_blob_open($link_identifier, $blob_id) {}

/**
 * This is an alias of ibase_blob_get
 * Get len bytes data from open blob
 * @link https://php.net/manual/en/function.fbird-blob-get.php
 * @param resource $blob_handle <p>
 * A BLOB handle opened with fbird_blob_open.
 * </p>
 * @param int $len <p>
 * Size of returned data.
 * </p>
 * @return string|false at most len bytes from the BLOB, or false
 * on failure.
 */
function fbird_blob_get($blob_handle, $len) {}

/**
 * This is an alias of ibase_blob_echo
 * Output blob contents to browser
 * @link https://php.net/manual/en/function.fbird-blob-echo.php
 * @param string $blob_id <p>
 * </p>
 * @return bool true on success or false on failure.
 */
function fbird_blob_echo($blob_id) {}

/**
 * This is an alias of ibase_blob_import
 * Create blob, copy file in it, and close it
 * @link https://php.net/manual/en/function.fbird-blob-import.php
 * @param resource $link_identifier <p>
 * An InterBase link identifier. If omitted, the last opened link is
 * assumed.
 * </p>
 * @param resource $file_handle <p>
 * The file handle is a handle returned by fopen.
 * </p>
 * @return string|false the BLOB id on success, or false on error.
 */
function fbird_blob_import($link_identifier, $file_handle) {}

/**
 * This is an alias of ibase_errmsg
 * Return error messages
 * @link https://php.net/manual/en/function.fbird-errmsg.php
 * @return string|false the error message as a string, or false if no error occurred.
 */
function fbird_errmsg() {}

/**
 * This is an alias of ibase_errcode
 * Return an error code
 * @link https://php.net/manual/en/function.fbird-errcode.php
 * @return int|false the error code as an integer, or false if no error occurred.
 */
function fbird_errcode() {}

/**
 * This is an alias of ibase_add_user
 * Add a user to a security database (only for IB6 or later)
 * @link https://php.net/manual/en/function.fbird-add-user.php
 * @param resource $service_handle
 * @param string $user_name
 * @param string $password
 * @param string $first_name [optional]
 * @param string $middle_name [optional]
 * @param string $last_name [optional]
 * @return bool true on success or false on failure.
 */
function fbird_add_user($service_handle, $user_name, $password, $first_name = null, $middle_name = null, $last_name = null) {}

/**
 * This is an alias of ibase_modify_user
 * Modify a user to a security database (only for IB6 or later)
 * @link https://php.net/manual/en/function.fbird-modify-user.php
 * @param resource $service_handle
 * @param string $user_name
 * @param string $password
 * @param string $first_name [optional]
 * @param string $middle_name [optional]
 * @param string $last_name [optional]
 * @return bool true on success or false on failure.
 */
function fbird_modify_user($service_handle, $user_name, $password, $first_name = null, $middle_name = null, $last_name = null) {}

/**
 * This is an alias of ibase_delete_user
 * Delete a user from a security database (only for IB6 or later)
 * @link https://php.net/manual/en/function.fbird-delete-user.php
 * @param resource $service_handle
 * @param string $user_name
 * @return bool true on success or false on failure.
 */
function fbird_delete_user($service_handle, $user_name) {}

/**
 * This is an alias of ibase_service_attach
 * Connect to the service manager
 * @link https://php.net/manual/en/function.fbird-service-attach.php
 * @param string $host
 * @param string $dba_username
 * @param string $dba_password
 * @return resource|false
 */
function fbird_service_attach($host, $dba_username, $dba_password) {}

/**
 * This is an alias of ibase_service_detach
 * Disconnect from the service manager
 * @link https://php.net/manual/en/function.fbird-service-detach.php
 * @param resource $service_handle
 * @return bool true on success or false on failure.
 */
function fbird_service_detach($service_handle) {}

/**
 * This is an alias of ibase_backup
 * Initiates a backup task in the service manager and returns immediately
 * @link https://php.net/manual/en/function.fbird-backup.php
 * @param resource $service_handle
 * @param string $source_db
 * @param string $dest_file
 * @param int $options [optional]
 * @param bool $verbose [optional]
 * @return mixed
 */
function fbird_backup($service_handle, $source_db, $dest_file, $options = null, $verbose = null) {}

/**
 * This is an alias of ibase_restore
 * Initiates a restore task in the service manager and returns immediately
 * @link https://php.net/manual/en/function.fbird-restore.php
 * @param resource $service_handle
 * @param string $source_file
 * @param string $dest_db
 * @param int $options [optional]
 * @param bool $verbose [optional]
 * @return mixed
 */
function fbird_restore($service_handle, $source_file, $dest_db, $options = null, $verbose = null) {}

/**
 * This is an alias of ibase_maintain_db
 * Execute a maintenance command on the database server
 * @link https://php.net/manual/en/function.fbird-maintain-db.php
 * @param resource $service_handle
 * @param string $db
 * @param int $action
 * @param int $argument [optional]
 * @return bool true on success or false on failure.
 */
function fbird_maintain_db($service_handle, $db, $action, $argument = null) {}

/**
 * This is an alias of ibase_db_info
 * Request statistics about a database
 * @link https://php.net/manual/en/function.fbird-db-info.php
 * @param resource $service_handle
 * @param string $db
 * @param int $action
 * @param int $argument [optional]
 * @return string
 */
function fbird_db_info($service_handle, $db, $action, $argument = null) {}

/**
 * This is an alias of ibase_server_info
 * Request information about a database server
 * @link https://php.net/manual/en/function.fbird-server-info.php
 * @param resource $service_handle
 * @param int $action
 * @return string
 */
function fbird_server_info($service_handle, $action) {}

/**
 * This is an alias of ibase_wait_event
 * Wait for an event to be posted by the database
 * @link https://php.net/manual/en/function.fbird-wait-event.php
 * @param string $event_name1 <p>
 * The event name.
 * </p>
 * @param string $event_name2 [optional] <p>
 * </p>
 * @param string ...$_ [optional]
 * @return string the name of the event that was posted.
 */
function fbird_wait_event($event_name1, $event_name2 = null, ...$_) {}

/**
 * This is an alias of ibase_set_event_handler
 * Register a callback function to be called when events are posted
 * @link https://php.net/manual/en/function.fbird-set-event-handler.php
 * @param callable $event_handler <p>
 * The callback is called with the event name and the link resource as
 * arguments whenever one of the specified events is posted by the
 * database.
 * </p>
 * <p>
 * The callback must return false if the event handler should be
 * canceled. Any other return value is ignored. This function accepts up
 * to 15 event arguments.
 * </p>
 * @param string $event_name1 <p>
 * An event name.
 * </p>
 * @param string $event_name2 [optional] <p>
 * At most 15 events allowed.
 * </p>
 * @param string ...$_ [optional]
 * @return resource The return value is an event resource. This resource can be used to free
 * the event handler using fbird_free_event_handler.
 */
function fbird_set_event_handler($event_handler, $event_name1, $event_name2 = null, ...$_) {}

/**
 * This is an alias of ibase_free_event_handler
 * Cancels a registered event handler
 * @link https://php.net/manual/en/function.fbird-free-event-handler.php
 * @param resource $event <p>
 * An event resource, created by
 * fbird_set_event_handler.
 * </p>
 * @return bool true on success or false on failure.
 */
function fbird_free_event_handler($event) {}

/**
 * The default transaction settings are to be used.
 * This default is determined by the client library, which defines it as IBASE_WRITE|IBASE_CONCURRENCY|IBASE_WAIT in most cases.
 * @link https://www.php.net/manual/en/ibase.constants.php
 */
define('IBASE_DEFAULT', 0);
/**
 * @link https://www.php.net/manual/en/ibase.constants.php
 */
define('IBASE_CREATE', 0);
/**
 * Causes BLOB contents to be fetched inline, instead of being fetched as BLOB identifiers.
 * @link https://www.php.net/manual/en/ibase.constants.php
 */
define('IBASE_TEXT', 1);
/**
 * Also available as IBASE_TEXT for backward compatibility.
 * Causes BLOB contents to be fetched inline, instead of being fetched as BLOB identifiers.
 * @link https://www.php.net/manual/en/ibase.constants.php
 */
define('IBASE_FETCH_BLOBS', 1);
/**
 * Causes arrays to be fetched inline. Otherwise, array identifiers are returned.
 * Array identifiers can only be used as arguments to INSERT operations, as no functions to handle array identifiers are currently available.
 * @link https://www.php.net/manual/en/ibase.constants.php
 */
define('IBASE_FETCH_ARRAYS', 2);
/**
 * Causes date and time fields not to be returned as strings, but as UNIX timestamps (the number of seconds since the epoch, which is 1-Jan-1970 0:00 UTC).
 * Might be problematic if used with dates before 1970 on some systems.
 * @link https://www.php.net/manual/en/ibase.constants.php
 */
define('IBASE_UNIXTIME', 4);
/**
 * Starts a read-write transaction.
 * @link https://www.php.net/manual/en/ibase.constants.php
 */
define('IBASE_WRITE', 1);
/**
 * Starts a read-only transaction.
 * @link https://www.php.net/manual/en/ibase.constants.php
 */
define('IBASE_READ', 2);
/**
 * Starts a transaction with the isolation level set to 'read committed'.
 * This flag should be combined with either <b>IBASE_REC_VERSION</b> or <b>IBASE_REC_NO_VERSION</b>.
 * This isolation level allows access to changes that were committed after the transaction was started.
 * If <b>IBASE_REC_NO_VERSION</b> was specified, only the latest version of a row can be read.
 * If <b>IBASE_REC_VERSION</b> was specified, a row can even be read when a modification to it is pending in a concurrent transaction.
 * @link https://www.php.net/manual/en/ibase.constants.php
 */
define('IBASE_COMMITTED', 8);
/**
 * Starts a transaction with the isolation level set to 'consistency',
 * which means the transaction cannot read from tables that are being modified by other concurrent transactions.
 * @link https://www.php.net/manual/en/ibase.constants.php
 */
define('IBASE_CONSISTENCY', 16);
/**
 * Starts a transaction with the isolation level set to 'concurrency' (or 'snapshot'),
 * which means the transaction has access to all tables,
 * but cannot see changes that were committed by other transactions after the transaction was started.
 * @link https://www.php.net/manual/en/ibase.constants.php
 */
define('IBASE_CONCURRENCY', 4);
/**
 * Row can even be read when a modification to it is pending in a concurrent transaction.
 * @link https://www.php.net/manual/en/ibase.constants.php
 */
define('IBASE_REC_VERSION', 64);
/**
 * Only the latest version of a row can be read
 * @link https://www.php.net/manual/en/ibase.constants.php
 */
define('IBASE_REC_NO_VERSION', 32);
/**
 * Indicated that a transaction should fail immediately when a conflict occurs.
 * @link https://www.php.net/manual/en/ibase.constants.php
 */
define('IBASE_NOWAIT', 256);
/**
 * Indicated that a transaction should wait and retry when a conflict occurs.
 * @link https://www.php.net/manual/en/ibase.constants.php
 */
define('IBASE_WAIT', 128);
define('IBASE_BKP_IGNORE_CHECKSUMS', 1);
define('IBASE_BKP_IGNORE_LIMBO', 2);
define('IBASE_BKP_METADATA_ONLY', 4);
define('IBASE_BKP_NO_GARBAGE_COLLECT', 8);
define('IBASE_BKP_OLD_DESCRIPTIONS', 16);
define('IBASE_BKP_NON_TRANSPORTABLE', 32);

/**
 * Options to ibase_backup
 * @link https://php.net/manual/en/ibase.constants.php
 */
define('IBASE_BKP_CONVERT', 64);
define('IBASE_RES_DEACTIVATE_IDX', 256);
define('IBASE_RES_NO_SHADOW', 512);
define('IBASE_RES_NO_VALIDITY', 1024);
define('IBASE_RES_ONE_AT_A_TIME', 2048);
define('IBASE_RES_REPLACE', 4096);
define('IBASE_RES_CREATE', 8192);

/**
 * Options to ibase_restore
 * @link https://php.net/manual/en/ibase.constants.php
 */
define('IBASE_RES_USE_ALL_SPACE', 16384);
define('IBASE_PRP_PAGE_BUFFERS', 5);
define('IBASE_PRP_SWEEP_INTERVAL', 6);
define('IBASE_PRP_SHUTDOWN_DB', 7);
define('IBASE_PRP_DENY_NEW_TRANSACTIONS', 10);
define('IBASE_PRP_DENY_NEW_ATTACHMENTS', 9);
define('IBASE_PRP_RESERVE_SPACE', 11);
define('IBASE_PRP_RES_USE_FULL', 35);
define('IBASE_PRP_RES', 36);
define('IBASE_PRP_WRITE_MODE', 12);
define('IBASE_PRP_WM_ASYNC', 37);
define('IBASE_PRP_WM_SYNC', 38);
define('IBASE_PRP_ACCESS_MODE', 13);
define('IBASE_PRP_AM_READONLY', 39);
define('IBASE_PRP_AM_READWRITE', 40);
define('IBASE_PRP_SET_SQL_DIALECT', 14);
define('IBASE_PRP_ACTIVATE', 256);
define('IBASE_PRP_DB_ONLINE', 512);
define('IBASE_RPR_CHECK_DB', 16);
define('IBASE_RPR_IGNORE_CHECKSUM', 32);
define('IBASE_RPR_KILL_SHADOWS', 64);
define('IBASE_RPR_MEND_DB', 4);
define('IBASE_RPR_VALIDATE_DB', 1);
define('IBASE_RPR_FULL', 128);

/**
 * Options to ibase_maintain_db
 * @link https://php.net/manual/en/ibase.constants.php
 */
define('IBASE_RPR_SWEEP_DB', 2);
define('IBASE_STS_DATA_PAGES', 1);
define('IBASE_STS_DB_LOG', 2);
define('IBASE_STS_HDR_PAGES', 4);
define('IBASE_STS_IDX_PAGES', 8);

/**
 * Options to ibase_db_info
 * @link https://php.net/manual/en/ibase.constants.php
 */
define('IBASE_STS_SYS_RELATIONS', 16);
define('IBASE_SVC_SERVER_VERSION', 55);
define('IBASE_SVC_IMPLEMENTATION', 56);
define('IBASE_SVC_GET_ENV', 59);
define('IBASE_SVC_GET_ENV_LOCK', 60);
define('IBASE_SVC_GET_ENV_MSG', 61);
define('IBASE_SVC_USER_DBPATH', 58);
define('IBASE_SVC_SVR_DB_INFO', 50);

/**
 * Options to ibase_server_info
 * @link https://php.net/manual/en/ibase.constants.php
 */
define('IBASE_SVC_GET_USERS', 68);

// End of interbase v.
<?php

// Start of ncurses v.

/**
 * Add character at current position and advance cursor
 * @link https://php.net/manual/en/function.ncurses-addch.php
 * @param int $ch <p>
 * </p>
 * @return int
 */
function ncurses_addch($ch) {}

/**
 * Set fore- and background color
 * @link https://php.net/manual/en/function.ncurses-color-set.php
 * @param int $pair <p>
 * </p>
 * @return int
 */
function ncurses_color_set($pair) {}

/**
 * Delete a ncurses window
 * @link https://php.net/manual/en/function.ncurses-delwin.php
 * @param resource $window <p>
 * </p>
 * @return bool
 */
function ncurses_delwin($window) {}

/**
 * Stop using ncurses, clean up the screen
 * @link https://php.net/manual/en/function.ncurses-end.php
 * @return int
 */
function ncurses_end() {}

/**
 * Read a character from keyboard
 * @link https://php.net/manual/en/function.ncurses-getch.php
 * @return int
 */
function ncurses_getch() {}

/**
 * Check if terminal has colors
 * @link https://php.net/manual/en/function.ncurses-has-colors.php
 * @return bool Return true if the terminal has color capacities, false otherwise.
 */
function ncurses_has_colors() {}

/**
 * Initialize ncurses
 * @link https://php.net/manual/en/function.ncurses-init.php
 * @return void
 */
function ncurses_init() {}

/**
 * Allocate a color pair
 * @link https://php.net/manual/en/function.ncurses-init-pair.php
 * @param int $pair <p>
 * </p>
 * @param int $fg <p>
 * </p>
 * @param int $bg <p>
 * </p>
 * @return int
 */
function ncurses_init_pair($pair, $fg, $bg) {}

/**
 * Gets the RGB value for color
 * @link https://php.net/manual/en/function.ncurses-color-content.php
 * @param int $color <p>
 * </p>
 * @param int &$r <p>
 * </p>
 * @param int &$g <p>
 * </p>
 * @param int &$b <p>
 * </p>
 * @return int
 */
function ncurses_color_content($color, &$r, &$g, &$b) {}

/**
 * Gets the RGB value for color
 * @link https://php.net/manual/en/function.ncurses-pair-content.php
 * @param int $pair <p>
 * </p>
 * @param int &$f <p>
 * </p>
 * @param int &$b <p>
 * </p>
 * @return int
 */
function ncurses_pair_content($pair, &$f, &$b) {}

/**
 * Move output position
 * @link https://php.net/manual/en/function.ncurses-move.php
 * @param int $y <p>
 * </p>
 * @param int $x <p>
 * </p>
 * @return int
 */
function ncurses_move($y, $x) {}

/**
 * Create a new window
 * @link https://php.net/manual/en/function.ncurses-newwin.php
 * @param int $rows <p>
 * Number of rows
 * </p>
 * @param int $cols <p>
 * Number of columns
 * </p>
 * @param int $y <p>
 * y-ccordinate of the origin
 * </p>
 * @param int $x <p>
 * x-ccordinate of the origin
 * </p>
 * @return resource a resource ID for the new window.
 */
function ncurses_newwin($rows, $cols, $y, $x) {}

/**
 * Refresh screen
 * @link https://php.net/manual/en/function.ncurses-refresh.php
 * @param int $ch <p>
 * </p>
 * @return int
 */
function ncurses_refresh($ch) {}

/**
 * Start using colors
 * @link https://php.net/manual/en/function.ncurses-start-color.php
 * @return int
 */
function ncurses_start_color() {}

/**
 * Start using 'standout' attribute
 * @link https://php.net/manual/en/function.ncurses-standout.php
 * @return int
 */
function ncurses_standout() {}

/**
 * Stop using 'standout' attribute
 * @link https://php.net/manual/en/function.ncurses-standend.php
 * @return int
 */
function ncurses_standend() {}

/**
 * Returns baudrate of terminal
 * @link https://php.net/manual/en/function.ncurses-baudrate.php
 * @return int
 */
function ncurses_baudrate() {}

/**
 * Let the terminal beep
 * @link https://php.net/manual/en/function.ncurses-beep.php
 * @return int
 */
function ncurses_beep() {}

/**
 * Check if we can change terminals colors
 * @link https://php.net/manual/en/function.ncurses-can-change-color.php
 * @return bool Return true if the terminal has color capabilities and you can change
 * the colors, false otherwise.
 */
function ncurses_can_change_color() {}

/**
 * Switch of input buffering
 * @link https://php.net/manual/en/function.ncurses-cbreak.php
 * @return bool true or NCURSES_ERR if any error occurred.
 */
function ncurses_cbreak() {}

/**
 * Clear screen
 * @link https://php.net/manual/en/function.ncurses-clear.php
 * @return bool
 */
function ncurses_clear() {}

/**
 * Clear screen from current position to bottom
 * @link https://php.net/manual/en/function.ncurses-clrtobot.php
 * @return bool
 */
function ncurses_clrtobot() {}

/**
 * Clear screen from current position to end of line
 * @link https://php.net/manual/en/function.ncurses-clrtoeol.php
 * @return bool
 */
function ncurses_clrtoeol() {}

/**
 * Saves terminals (program) mode
 * @link https://php.net/manual/en/function.ncurses-def-prog-mode.php
 * @return bool false on success, otherwise true.
 */
function ncurses_def_prog_mode() {}

/**
 * Resets the prog mode saved by def_prog_mode
 * @link https://php.net/manual/en/function.ncurses-reset-prog-mode.php
 * @return int
 */
function ncurses_reset_prog_mode() {}

/**
 * Saves terminals (shell) mode
 * @link https://php.net/manual/en/function.ncurses-def-shell-mode.php
 * @return bool false on success, true otherwise.
 */
function ncurses_def_shell_mode() {}

/**
 * Resets the shell mode saved by def_shell_mode
 * @link https://php.net/manual/en/function.ncurses-reset-shell-mode.php
 * @return int
 */
function ncurses_reset_shell_mode() {}

/**
 * Delete character at current position, move rest of line left
 * @link https://php.net/manual/en/function.ncurses-delch.php
 * @return bool false on success, true otherwise.
 */
function ncurses_delch() {}

/**
 * Delete line at current position, move rest of screen up
 * @link https://php.net/manual/en/function.ncurses-deleteln.php
 * @return bool false on success, otherwise true.
 */
function ncurses_deleteln() {}

/**
 * Write all prepared refreshes to terminal
 * @link https://php.net/manual/en/function.ncurses-doupdate.php
 * @return bool
 */
function ncurses_doupdate() {}

/**
 * Activate keyboard input echo
 * @link https://php.net/manual/en/function.ncurses-echo.php
 * @return bool false on success, true if any error occurred.
 */
function ncurses_echo() {}

/**
 * Erase terminal screen
 * @link https://php.net/manual/en/function.ncurses-erase.php
 * @return bool
 */
function ncurses_erase() {}

/**
 * Erase window contents
 * @link https://php.net/manual/en/function.ncurses-werase.php
 * @param resource $window <p>
 * </p>
 * @return int
 */
function ncurses_werase($window) {}

/**
 * Returns current erase character
 * @link https://php.net/manual/en/function.ncurses-erasechar.php
 * @return string The current erase char, as a string.
 */
function ncurses_erasechar() {}

/**
 * Flash terminal screen (visual bell)
 * @link https://php.net/manual/en/function.ncurses-flash.php
 * @return bool false on success, otherwise true.
 */
function ncurses_flash() {}

/**
 * Flush keyboard input buffer
 * @link https://php.net/manual/en/function.ncurses-flushinp.php
 * @return bool false on success, otherwise true.
 */
function ncurses_flushinp() {}

/**
 * Check for insert- and delete-capabilities
 * @link https://php.net/manual/en/function.ncurses-has-ic.php
 * @return bool true if the terminal has insert/delete-capabilities, false
 * otherwise.
 */
function ncurses_has_ic() {}

/**
 * Check for line insert- and delete-capabilities
 * @link https://php.net/manual/en/function.ncurses-has-il.php
 * @return bool true if the terminal has insert/delete-line capabilities,
 * false otherwise.
 */
function ncurses_has_il() {}

/**
 * Get character and attribute at current position
 * @link https://php.net/manual/en/function.ncurses-inch.php
 * @return string the character, as a string.
 */
function ncurses_inch() {}

/**
 * Insert a line, move rest of screen down
 * @link https://php.net/manual/en/function.ncurses-insertln.php
 * @return int
 */
function ncurses_insertln() {}

/**
 * Ncurses is in endwin mode, normal screen output may be performed
 * @link https://php.net/manual/en/function.ncurses-isendwin.php
 * @return bool true, if ncurses_endwin has been called
 * without any subsequent calls to ncurses_wrefresh,
 * false otherwise.
 */
function ncurses_isendwin() {}

/**
 * Returns current line kill character
 * @link https://php.net/manual/en/function.ncurses-killchar.php
 * @return string the kill character, as a string.
 */
function ncurses_killchar() {}

/**
 * Translate newline and carriage return / line feed
 * @link https://php.net/manual/en/function.ncurses-nl.php
 * @return bool
 */
function ncurses_nl() {}

/**
 * Switch terminal to cooked mode
 * @link https://php.net/manual/en/function.ncurses-nocbreak.php
 * @return bool true if any error occurred, otherwise false.
 */
function ncurses_nocbreak() {}

/**
 * Switch off keyboard input echo
 * @link https://php.net/manual/en/function.ncurses-noecho.php
 * @return bool true if any error occurred, false otherwise.
 */
function ncurses_noecho() {}

/**
 * Do not translate newline and carriage return / line feed
 * @link https://php.net/manual/en/function.ncurses-nonl.php
 * @return bool
 */
function ncurses_nonl() {}

/**
 * Switch terminal out of raw mode
 * @link https://php.net/manual/en/function.ncurses-noraw.php
 * @return bool true if any error occurred, otherwise false.
 */
function ncurses_noraw() {}

/**
 * Switch terminal into raw mode
 * @link https://php.net/manual/en/function.ncurses-raw.php
 * @return bool true if any error occurred, otherwise false.
 */
function ncurses_raw() {}

/**
 * Enables/Disable 8-bit meta key information
 * @link https://php.net/manual/en/function.ncurses-meta.php
 * @param resource $window <p>
 * </p>
 * @param $bit8 bool <p>
 * </p>
 * @return int
 */
function ncurses_meta($window, $bit8) {}

/**
 * Restores saved terminal state
 * @link https://php.net/manual/en/function.ncurses-resetty.php
 * @return bool Always returns false.
 */
function ncurses_resetty() {}

/**
 * Saves terminal state
 * @link https://php.net/manual/en/function.ncurses-savetty.php
 * @return bool Always returns false.
 */
function ncurses_savetty() {}

/**
 * Returns a logical OR of all attribute flags supported by terminal
 * @link https://php.net/manual/en/function.ncurses-termattrs.php
 * @return bool
 */
function ncurses_termattrs() {}

/**
 * Assign terminal default colors to color id -1
 * @link https://php.net/manual/en/function.ncurses-use-default-colors.php
 * @return bool
 */
function ncurses_use_default_colors() {}

/**
 * Returns current soft label key attribute
 * @link https://php.net/manual/en/function.ncurses-slk-attr.php
 * @return int The attribute, as an integer.
 */
function ncurses_slk_attr() {}

/**
 * Clears soft labels from screen
 * @link https://php.net/manual/en/function.ncurses-slk-clear.php
 * @return bool true on errors, false otherwise.
 */
function ncurses_slk_clear() {}

/**
 * Copies soft label keys to virtual screen
 * @link https://php.net/manual/en/function.ncurses-slk-noutrefresh.php
 * @return bool
 */
function ncurses_slk_noutrefresh() {}

/**
 * Copies soft label keys to screen
 * @link https://php.net/manual/en/function.ncurses-slk-refresh.php
 * @return int
 */
function ncurses_slk_refresh() {}

/**
 * Restores soft label keys
 * @link https://php.net/manual/en/function.ncurses-slk-restore.php
 * @return int
 */
function ncurses_slk_restore() {}

/**
 * Forces output when ncurses_slk_noutrefresh is performed
 * @link https://php.net/manual/en/function.ncurses-slk-touch.php
 * @return int
 */
function ncurses_slk_touch() {}

/**
 * Turn off the given attributes
 * @link https://php.net/manual/en/function.ncurses-attroff.php
 * @param int $attributes <p>
 * </p>
 * @return int
 */
function ncurses_attroff($attributes) {}

/**
 * Turn on the given attributes
 * @link https://php.net/manual/en/function.ncurses-attron.php
 * @param int $attributes <p>
 * </p>
 * @return int
 */
function ncurses_attron($attributes) {}

/**
 * Set given attributes
 * @link https://php.net/manual/en/function.ncurses-attrset.php
 * @param int $attributes <p>
 * </p>
 * @return int
 */
function ncurses_attrset($attributes) {}

/**
 * Set background property for terminal screen
 * @link https://php.net/manual/en/function.ncurses-bkgd.php
 * @param int $attrchar <p>
 * </p>
 * @return int
 */
function ncurses_bkgd($attrchar) {}

/**
 * Set cursor state
 * @link https://php.net/manual/en/function.ncurses-curs-set.php
 * @param int $visibility <p>
 * </p>
 * @return int
 */
function ncurses_curs_set($visibility) {}

/**
 * Delay output on terminal using padding characters
 * @link https://php.net/manual/en/function.ncurses-delay-output.php
 * @param int $milliseconds <p>
 * </p>
 * @return int
 */
function ncurses_delay_output($milliseconds) {}

/**
 * Single character output including refresh
 * @link https://php.net/manual/en/function.ncurses-echochar.php
 * @param int $character <p>
 * </p>
 * @return int
 */
function ncurses_echochar($character) {}

/**
 * Put terminal into halfdelay mode
 * @link https://php.net/manual/en/function.ncurses-halfdelay.php
 * @param int $tenth <p>
 * </p>
 * @return int
 */
function ncurses_halfdelay($tenth) {}

/**
 * Check for presence of a function key on terminal keyboard
 * @link https://php.net/manual/en/function.ncurses-has-key.php
 * @param int $keycode <p>
 * </p>
 * @return int
 */
function ncurses_has_key($keycode) {}

/**
 * Insert character moving rest of line including character at current position
 * @link https://php.net/manual/en/function.ncurses-insch.php
 * @param int $character <p>
 * </p>
 * @return int
 */
function ncurses_insch($character) {}

/**
 * Insert lines before current line scrolling down (negative numbers delete and scroll up)
 * @link https://php.net/manual/en/function.ncurses-insdelln.php
 * @param int $count <p>
 * </p>
 * @return int
 */
function ncurses_insdelln($count) {}

/**
 * Set timeout for mouse button clicks
 * @link https://php.net/manual/en/function.ncurses-mouseinterval.php
 * @param int $milliseconds <p>
 * </p>
 * @return int
 */
function ncurses_mouseinterval($milliseconds) {}

/**
 * Sleep
 * @link https://php.net/manual/en/function.ncurses-napms.php
 * @param int $milliseconds <p>
 * </p>
 * @return int
 */
function ncurses_napms($milliseconds) {}

/**
 * Scroll window content up or down without changing current position
 * @link https://php.net/manual/en/function.ncurses-scrl.php
 * @param int $count <p>
 * </p>
 * @return int
 */
function ncurses_scrl($count) {}

/**
 * Turn off the given attributes for soft function-key labels
 * @link https://php.net/manual/en/function.ncurses-slk-attroff.php
 * @param int $intarg <p>
 * </p>
 * @return int
 */
function ncurses_slk_attroff($intarg) {}

/**
 * Turn on the given attributes for soft function-key labels
 * @link https://php.net/manual/en/function.ncurses-slk-attron.php
 * @param int $intarg <p>
 * </p>
 * @return int
 */
function ncurses_slk_attron($intarg) {}

/**
 * Set given attributes for soft function-key labels
 * @link https://php.net/manual/en/function.ncurses-slk-attrset.php
 * @param int $intarg <p>
 * </p>
 * @return int
 */
function ncurses_slk_attrset($intarg) {}

/**
 * Sets color for soft label keys
 * @link https://php.net/manual/en/function.ncurses-slk-color.php
 * @param int $intarg <p>
 * </p>
 * @return int
 */
function ncurses_slk_color($intarg) {}

/**
 * Initializes soft label key functions
 * @link https://php.net/manual/en/function.ncurses-slk-init.php
 * @param int $format <p>
 * If ncurses_initscr eventually uses a line from
 * stdscr to emulate the soft labels, then this parameter determines how
 * the labels are arranged of the screen.
 * </p>
 * <p>
 * 0 indicates a 3-2-3 arrangement of the labels, 1 indicates a 4-4
 * arrangement and 2 indicates the PC like 4-4-4 mode, but in addition an
 * index line will be created.
 * </p>
 * @return bool
 */
function ncurses_slk_init($format) {}

/**
 * Sets function key labels
 * @link https://php.net/manual/en/function.ncurses-slk-set.php
 * @param int $labelnr <p>
 * </p>
 * @param string $label <p>
 * </p>
 * @param int $format <p>
 * </p>
 * @return bool
 */
function ncurses_slk_set($labelnr, $label, $format) {}

/**
 * Specify different filedescriptor for typeahead checking
 * @link https://php.net/manual/en/function.ncurses-typeahead.php
 * @param int $fd <p>
 * </p>
 * @return int
 */
function ncurses_typeahead($fd) {}

/**
 * Put a character back into the input stream
 * @link https://php.net/manual/en/function.ncurses-ungetch.php
 * @param int $keycode <p>
 * </p>
 * @return int
 */
function ncurses_ungetch($keycode) {}

/**
 * Display the string on the terminal in the video attribute mode
 * @link https://php.net/manual/en/function.ncurses-vidattr.php
 * @param int $intarg <p>
 * </p>
 * @return int
 */
function ncurses_vidattr($intarg) {}

/**
 * Refresh window on terminal screen
 * @link https://php.net/manual/en/function.ncurses-wrefresh.php
 * @param resource $window <p>
 * </p>
 * @return int
 */
function ncurses_wrefresh($window) {}

/**
 * Control use of extended names in terminfo descriptions
 * @link https://php.net/manual/en/function.ncurses-use-extended-names.php
 * @param bool $flag <p>
 * </p>
 * @return int
 */
function ncurses_use_extended_names($flag) {}

/**
 * Control screen background
 * @link https://php.net/manual/en/function.ncurses-bkgdset.php
 * @param int $attrchar <p>
 * </p>
 * @return void
 */
function ncurses_bkgdset($attrchar) {}

/**
 * Set LINES for iniscr() and newterm() to 1
 * @link https://php.net/manual/en/function.ncurses-filter.php
 * @return void
 */
function ncurses_filter() {}

/**
 * Do not flush on signal characters
 * @link https://php.net/manual/en/function.ncurses-noqiflush.php
 * @return void
 */
function ncurses_noqiflush() {}

/**
 * Flush on signal characters
 * @link https://php.net/manual/en/function.ncurses-qiflush.php
 * @return void
 */
function ncurses_qiflush() {}

/**
 * Set timeout for special key sequences
 * @link https://php.net/manual/en/function.ncurses-timeout.php
 * @param int $millisec <p>
 * </p>
 * @return void
 */
function ncurses_timeout($millisec) {}

/**
 * Control use of environment information about terminal size
 * @link https://php.net/manual/en/function.ncurses-use-env.php
 * @param bool $flag <p>
 * </p>
 * @return void
 */
function ncurses_use_env($flag) {}

/**
 * Output text at current position
 * @link https://php.net/manual/en/function.ncurses-addstr.php
 * @param string $text <p>
 * </p>
 * @return int
 */
function ncurses_addstr($text) {}

/**
 * Apply padding information to the string and output it
 * @link https://php.net/manual/en/function.ncurses-putp.php
 * @param string $text <p>
 * </p>
 * @return int
 */
function ncurses_putp($text) {}

/**
 * Dump screen content to file
 * @link https://php.net/manual/en/function.ncurses-scr-dump.php
 * @param string $filename <p>
 * </p>
 * @return int
 */
function ncurses_scr_dump($filename) {}

/**
 * Initialize screen from file dump
 * @link https://php.net/manual/en/function.ncurses-scr-init.php
 * @param string $filename <p>
 * </p>
 * @return int
 */
function ncurses_scr_init($filename) {}

/**
 * Restore screen from file dump
 * @link https://php.net/manual/en/function.ncurses-scr-restore.php
 * @param string $filename <p>
 * </p>
 * @return int
 */
function ncurses_scr_restore($filename) {}

/**
 * Inherit screen from file dump
 * @link https://php.net/manual/en/function.ncurses-scr-set.php
 * @param string $filename <p>
 * </p>
 * @return int
 */
function ncurses_scr_set($filename) {}

/**
 * Move current position and add character
 * @link https://php.net/manual/en/function.ncurses-mvaddch.php
 * @param int $y <p>
 * </p>
 * @param int $x <p>
 * </p>
 * @param int $c <p>
 * </p>
 * @return int
 */
function ncurses_mvaddch($y, $x, $c) {}

/**
 * Move position and add attributed string with specified length
 * @link https://php.net/manual/en/function.ncurses-mvaddchnstr.php
 * @param int $y <p>
 * </p>
 * @param int $x <p>
 * </p>
 * @param string $s <p>
 * </p>
 * @param int $n <p>
 * </p>
 * @return int
 */
function ncurses_mvaddchnstr($y, $x, $s, $n) {}

/**
 * Add attributed string with specified length at current position
 * @link https://php.net/manual/en/function.ncurses-addchnstr.php
 * @param string $s <p>
 * </p>
 * @param int $n <p>
 * </p>
 * @return int
 */
function ncurses_addchnstr($s, $n) {}

/**
 * Move position and add attributed string
 * @link https://php.net/manual/en/function.ncurses-mvaddchstr.php
 * @param int $y <p>
 * </p>
 * @param int $x <p>
 * </p>
 * @param string $s <p>
 * </p>
 * @return int
 */
function ncurses_mvaddchstr($y, $x, $s) {}

/**
 * Add attributed string at current position
 * @link https://php.net/manual/en/function.ncurses-addchstr.php
 * @param string $s <p>
 * </p>
 * @return int
 */
function ncurses_addchstr($s) {}

/**
 * Move position and add string with specified length
 * @link https://php.net/manual/en/function.ncurses-mvaddnstr.php
 * @param int $y <p>
 * </p>
 * @param int $x <p>
 * </p>
 * @param string $s <p>
 * </p>
 * @param int $n <p>
 * </p>
 * @return int
 */
function ncurses_mvaddnstr($y, $x, $s, $n) {}

/**
 * Add string with specified length at current position
 * @link https://php.net/manual/en/function.ncurses-addnstr.php
 * @param string $s <p>
 * </p>
 * @param int $n <p>
 * </p>
 * @return int
 */
function ncurses_addnstr($s, $n) {}

/**
 * Move position and add string
 * @link https://php.net/manual/en/function.ncurses-mvaddstr.php
 * @param int $y <p>
 * </p>
 * @param int $x <p>
 * </p>
 * @param string $s <p>
 * </p>
 * @return int
 */
function ncurses_mvaddstr($y, $x, $s) {}

/**
 * Move position and delete character, shift rest of line left
 * @link https://php.net/manual/en/function.ncurses-mvdelch.php
 * @param int $y <p>
 * </p>
 * @param int $x <p>
 * </p>
 * @return int
 */
function ncurses_mvdelch($y, $x) {}

/**
 * Move position and get character at new position
 * @link https://php.net/manual/en/function.ncurses-mvgetch.php
 * @param int $y <p>
 * </p>
 * @param int $x <p>
 * </p>
 * @return int
 */
function ncurses_mvgetch($y, $x) {}

/**
 * Move position and get attributed character at new position
 * @link https://php.net/manual/en/function.ncurses-mvinch.php
 * @param int $y <p>
 * </p>
 * @param int $x <p>
 * </p>
 * @return int
 */
function ncurses_mvinch($y, $x) {}

/**
 * Add string at new position in window
 * @link https://php.net/manual/en/function.ncurses-mvwaddstr.php
 * @param resource $window <p>
 * </p>
 * @param int $y <p>
 * </p>
 * @param int $x <p>
 * </p>
 * @param string $text <p>
 * </p>
 * @return int
 */
function ncurses_mvwaddstr($window, $y, $x, $text) {}

/**
 * Insert string at current position, moving rest of line right
 * @link https://php.net/manual/en/function.ncurses-insstr.php
 * @param string $text <p>
 * </p>
 * @return int
 */
function ncurses_insstr($text) {}

/**
 * Reads string from terminal screen
 * @link https://php.net/manual/en/function.ncurses-instr.php
 * @param string &$buffer <p>
 * The characters. Attributes will be stripped.
 * </p>
 * @return int the number of characters.
 */
function ncurses_instr(&$buffer) {}

/**
 * Set new position and draw a horizontal line using an attributed character and max. n characters long
 * @link https://php.net/manual/en/function.ncurses-mvhline.php
 * @param int $y <p>
 * </p>
 * @param int $x <p>
 * </p>
 * @param int $attrchar <p>
 * </p>
 * @param int $n <p>
 * </p>
 * @return int
 */
function ncurses_mvhline($y, $x, $attrchar, $n) {}

/**
 * Move cursor immediately
 * @link https://php.net/manual/en/function.ncurses-mvcur.php
 * @param int $old_y <p>
 * </p>
 * @param int $old_x <p>
 * </p>
 * @param int $new_y <p>
 * </p>
 * @param int $new_x <p>
 * </p>
 * @return int
 */
function ncurses_mvcur($old_y, $old_x, $new_y, $new_x) {}

/**
 * Set new RGB value for color
 * @link https://php.net/manual/en/function.ncurses-init-color.php
 * @param int $color <p>
 * </p>
 * @param int $r <p>
 * </p>
 * @param int $g <p>
 * </p>
 * @param int $b <p>
 * </p>
 * @return int
 */
function ncurses_init_color($color, $r, $g, $b) {}

/**
 * Draw a border around the screen using attributed characters
 * @link https://php.net/manual/en/function.ncurses-border.php
 * @param int $left <p>
 * </p>
 * @param int $right <p>
 * </p>
 * @param int $top <p>
 * </p>
 * @param int $bottom <p>
 * </p>
 * @param int $tl_corner <p>
 * Top left corner
 * </p>
 * @param int $tr_corner <p>
 * Top right corner
 * </p>
 * @param int $bl_corner <p>
 * Bottom left corner
 * </p>
 * @param int $br_corner <p>
 * Bottom right corner
 * </p>
 * @return int
 */
function ncurses_border($left, $right, $top, $bottom, $tl_corner, $tr_corner, $bl_corner, $br_corner) {}

/**
 * Define default colors for color 0
 * @link https://php.net/manual/en/function.ncurses-assume-default-colors.php
 * @param int $fg <p>
 * </p>
 * @param int $bg <p>
 * </p>
 * @return int
 */
function ncurses_assume_default_colors($fg, $bg) {}

/**
 * Define a keycode
 * @link https://php.net/manual/en/function.ncurses-define-key.php
 * @param string $definition <p>
 * </p>
 * @param int $keycode <p>
 * </p>
 * @return int
 */
function ncurses_define_key($definition, $keycode) {}

/**
 * Draw a horizontal line at current position using an attributed character and max. n characters long
 * @link https://php.net/manual/en/function.ncurses-hline.php
 * @param int $charattr <p>
 * </p>
 * @param int $n <p>
 * </p>
 * @return int
 */
function ncurses_hline($charattr, $n) {}

/**
 * Draw a vertical line at current position using an attributed character and max. n characters long
 * @link https://php.net/manual/en/function.ncurses-vline.php
 * @param int $charattr <p>
 * </p>
 * @param int $n <p>
 * </p>
 * @return int
 */
function ncurses_vline($charattr, $n) {}

/**
 * Enable or disable a keycode
 * @link https://php.net/manual/en/function.ncurses-keyok.php
 * @param int $keycode <p>
 * </p>
 * @param bool $enable <p>
 * </p>
 * @return int
 */
function ncurses_keyok($keycode, $enable) {}

/**
 * Returns terminals (short)-name
 * @link https://php.net/manual/en/function.ncurses-termname.php
 * @return string|null the shortname of the terminal, truncated to 14 characters.
 * On errors, returns null.
 */
function ncurses_termname() {}

/**
 * Returns terminals description
 * @link https://php.net/manual/en/function.ncurses-longname.php
 * @return string|null the description, as a string truncated to 128 characters.
 * On errors, returns null.
 */
function ncurses_longname() {}

/**
 * Sets mouse options
 * @link https://php.net/manual/en/function.ncurses-mousemask.php
 * @param int $newmask <p>
 * Mouse mask options can be set with the following predefined constants:
 * <p>NCURSES_BUTTON1_PRESSED</p>
 * @param int &$oldmask <p>
 * This will be set to the previous value of the mouse event mask.
 * </p>
 * @return int a mask to indicated which of the in parameter
 * newmask specified mouse events can be reported. On
 * complete failure, it returns 0.
 * </p>
 */
function ncurses_mousemask($newmask, &$oldmask) {}

/**
 * Reads mouse event
 * @link https://php.net/manual/en/function.ncurses-getmouse.php
 * @param array &$mevent <p>
 * Event options will be delivered in this parameter which has to be an
 * array, passed by reference (see example below).
 * </p>
 * <p>
 * On success an associative array with following keys will be delivered:
 * <p>
 * "id" : Id to distinguish multiple devices
 * </p>
 * @return bool false if a mouse event is actually visible in the given window,
 * otherwise returns true.
 * </p>
 */
function ncurses_getmouse(array &$mevent) {}

/**
 * Pushes mouse event to queue
 * @link https://php.net/manual/en/function.ncurses-ungetmouse.php
 * @param array $mevent <p>
 * An associative array specifying the event options:
 * <b>"id"</b> : Id to distinguish multiple devices
 * </p>
 * @return bool false on success, true otherwise.
 */
function ncurses_ungetmouse(array $mevent) {}

/**
 * Transforms coordinates
 * @link https://php.net/manual/en/function.ncurses-mouse-trafo.php
 * @param int &$y <p>
 * </p>
 * @param int &$x <p>
 * </p>
 * @param bool $toscreen <p>
 * </p>
 * @return bool
 */
function ncurses_mouse_trafo(&$y, &$x, $toscreen) {}

/**
 * Transforms window/stdscr coordinates
 * @link https://php.net/manual/en/function.ncurses-wmouse-trafo.php
 * @param resource $window <p>
 * </p>
 * @param int &$y <p>
 * </p>
 * @param int &$x <p>
 * </p>
 * @param bool $toscreen <p>
 * </p>
 * @return bool
 */
function ncurses_wmouse_trafo($window, &$y, &$x, $toscreen) {}

/**
 * Outputs text at current position in window
 * @link https://php.net/manual/en/function.ncurses-waddstr.php
 * @param resource $window <p>
 * </p>
 * @param string $str <p>
 * </p>
 * @param int $n [optional] <p>
 * </p>
 * @return int
 */
function ncurses_waddstr($window, $str, $n = null) {}

/**
 * Copies window to virtual screen
 * @link https://php.net/manual/en/function.ncurses-wnoutrefresh.php
 * @param resource $window <p>
 * </p>
 * @return int
 */
function ncurses_wnoutrefresh($window) {}

/**
 * Clears window
 * @link https://php.net/manual/en/function.ncurses-wclear.php
 * @param resource $window <p>
 * </p>
 * @return int
 */
function ncurses_wclear($window) {}

/**
 * Sets windows color pairings
 * @link https://php.net/manual/en/function.ncurses-wcolor-set.php
 * @param resource $window <p>
 * </p>
 * @param int $color_pair <p>
 * </p>
 * @return int
 */
function ncurses_wcolor_set($window, $color_pair) {}

/**
 * Reads a character from keyboard (window)
 * @link https://php.net/manual/en/function.ncurses-wgetch.php
 * @param resource $window <p>
 * </p>
 * @return int
 */
function ncurses_wgetch($window) {}

/**
 * Turns keypad on or off
 * @link https://php.net/manual/en/function.ncurses-keypad.php
 * @param resource $window <p>
 * </p>
 * @param bool $bf <p>
 * </p>
 * @return int
 */
function ncurses_keypad($window, $bf) {}

/**
 * Moves windows output position
 * @link https://php.net/manual/en/function.ncurses-wmove.php
 * @param resource $window <p>
 * </p>
 * @param int $y <p>
 * </p>
 * @param int $x <p>
 * </p>
 * @return int
 */
function ncurses_wmove($window, $y, $x) {}

/**
 * Creates a new pad (window)
 * @link https://php.net/manual/en/function.ncurses-newpad.php
 * @param int $rows <p>
 * </p>
 * @param int $cols <p>
 * </p>
 * @return resource
 */
function ncurses_newpad($rows, $cols) {}

/**
 * Copies a region from a pad into the virtual screen
 * @link https://php.net/manual/en/function.ncurses-prefresh.php
 * @param resource $pad <p>
 * </p>
 * @param int $pminrow <p>
 * </p>
 * @param int $pmincol <p>
 * </p>
 * @param int $sminrow <p>
 * </p>
 * @param int $smincol <p>
 * </p>
 * @param int $smaxrow <p>
 * </p>
 * @param int $smaxcol <p>
 * </p>
 * @return int
 */
function ncurses_prefresh($pad, $pminrow, $pmincol, $sminrow, $smincol, $smaxrow, $smaxcol) {}

/**
 * Copies a region from a pad into the virtual screen
 * @link https://php.net/manual/en/function.ncurses-pnoutrefresh.php
 * @param resource $pad <p>
 * </p>
 * @param int $pminrow <p>
 * </p>
 * @param int $pmincol <p>
 * </p>
 * @param int $sminrow <p>
 * </p>
 * @param int $smincol <p>
 * </p>
 * @param int $smaxrow <p>
 * </p>
 * @param int $smaxcol <p>
 * </p>
 * @return int
 */
function ncurses_pnoutrefresh($pad, $pminrow, $pmincol, $sminrow, $smincol, $smaxrow, $smaxcol) {}

/**
 * Enter standout mode for a window
 * @link https://php.net/manual/en/function.ncurses-wstandout.php
 * @param resource $window <p>
 * </p>
 * @return int
 */
function ncurses_wstandout($window) {}

/**
 * End standout mode for a window
 * @link https://php.net/manual/en/function.ncurses-wstandend.php
 * @param resource $window <p>
 * </p>
 * @return int
 */
function ncurses_wstandend($window) {}

/**
 * Set the attributes for a window
 * @link https://php.net/manual/en/function.ncurses-wattrset.php
 * @param resource $window <p>
 * </p>
 * @param int $attrs <p>
 * </p>
 * @return int
 */
function ncurses_wattrset($window, $attrs) {}

/**
 * Turns on attributes for a window
 * @link https://php.net/manual/en/function.ncurses-wattron.php
 * @param resource $window <p>
 * </p>
 * @param int $attrs <p>
 * </p>
 * @return int
 */
function ncurses_wattron($window, $attrs) {}

/**
 * Turns off attributes for a window
 * @link https://php.net/manual/en/function.ncurses-wattroff.php
 * @param resource $window <p>
 * </p>
 * @param int $attrs <p>
 * </p>
 * @return int
 */
function ncurses_wattroff($window, $attrs) {}

/**
 * Adds character at current position in a window and advance cursor
 * @link https://php.net/manual/en/function.ncurses-waddch.php
 * @param resource $window <p>
 * </p>
 * @param int $ch <p>
 * </p>
 * @return int
 */
function ncurses_waddch($window, $ch) {}

/**
 * Draws a border around the window using attributed characters
 * @link https://php.net/manual/en/function.ncurses-wborder.php
 * @param resource $window <p>
 * The window on which we operate
 * </p>
 * @param int $left <p>
 * </p>
 * @param int $right <p>
 * </p>
 * @param int $top <p>
 * </p>
 * @param int $bottom <p>
 * </p>
 * @param int $tl_corner <p>
 * Top left corner
 * </p>
 * @param int $tr_corner <p>
 * Top right corner
 * </p>
 * @param int $bl_corner <p>
 * Bottom left corner
 * </p>
 * @param int $br_corner <p>
 * Bottom right corner
 * </p>
 * @return int
 */
function ncurses_wborder($window, $left, $right, $top, $bottom, $tl_corner, $tr_corner, $bl_corner, $br_corner) {}

/**
 * Draws a horizontal line in a window at current position using an attributed character and max. n characters long
 * @link https://php.net/manual/en/function.ncurses-whline.php
 * @param resource $window <p>
 * </p>
 * @param int $charattr <p>
 * </p>
 * @param int $n <p>
 * </p>
 * @return int
 */
function ncurses_whline($window, $charattr, $n) {}

/**
 * Draws a vertical line in a window at current position using an attributed character and max. n characters long
 * @link https://php.net/manual/en/function.ncurses-wvline.php
 * @param resource $window <p>
 * </p>
 * @param int $charattr <p>
 * </p>
 * @param int $n <p>
 * </p>
 * @return int
 */
function ncurses_wvline($window, $charattr, $n) {}

/**
 * Returns the current cursor position for a window
 * @link https://php.net/manual/en/function.ncurses-getyx.php
 * @param resource $window <p>
 * </p>
 * @param int &$y <p>
 * </p>
 * @param int &$x <p>
 * </p>
 * @return void
 */
function ncurses_getyx($window, &$y, &$x) {}

/**
 * Returns the size of a window
 * @link https://php.net/manual/en/function.ncurses-getmaxyx.php
 * @param resource $window <p>
 * The measured window
 * </p>
 * @param int &$y <p>
 * This will be set to the window height
 * </p>
 * @param int &$x <p>
 * This will be set to the window width
 * </p>
 * @return void
 */
function ncurses_getmaxyx($window, &$y, &$x) {}

/**
 * Refreshes the virtual screen to reflect the relations between panels in the stack
 * @link https://php.net/manual/en/function.ncurses-update-panels.php
 * @return void
 */
function ncurses_update_panels() {}

/**
 * Returns the window associated with panel
 * @link https://php.net/manual/en/function.ncurses-panel-window.php
 * @param resource $panel <p>
 * </p>
 * @return resource
 */
function ncurses_panel_window($panel) {}

/**
 * Returns the panel below panel
 * @link https://php.net/manual/en/function.ncurses-panel-below.php
 * @param resource $panel <p>
 * </p>
 * @return resource
 */
function ncurses_panel_below($panel) {}

/**
 * Returns the panel above panel
 * @link https://php.net/manual/en/function.ncurses-panel-above.php
 * @param resource $panel <p>
 * </p>
 * @return resource If panel is null, returns the bottom panel in the stack.
 */
function ncurses_panel_above($panel) {}

/**
 * Replaces the window associated with panel
 * @link https://php.net/manual/en/function.ncurses-replace-panel.php
 * @param resource $panel <p>
 * </p>
 * @param resource $window <p>
 * </p>
 * @return int
 */
function ncurses_replace_panel($panel, $window) {}

/**
 * Moves a panel so that its upper-left corner is at [startx, starty]
 * @link https://php.net/manual/en/function.ncurses-move-panel.php
 * @param resource $panel <p>
 * </p>
 * @param int $startx <p>
 * </p>
 * @param int $starty <p>
 * </p>
 * @return int
 */
function ncurses_move_panel($panel, $startx, $starty) {}

/**
 * Moves a visible panel to the bottom of the stack
 * @link https://php.net/manual/en/function.ncurses-bottom-panel.php
 * @param resource $panel <p>
 * </p>
 * @return int
 */
function ncurses_bottom_panel($panel) {}

/**
 * Moves a visible panel to the top of the stack
 * @link https://php.net/manual/en/function.ncurses-top-panel.php
 * @param resource $panel <p>
 * </p>
 * @return int
 */
function ncurses_top_panel($panel) {}

/**
 * Places an invisible panel on top of the stack, making it visible
 * @link https://php.net/manual/en/function.ncurses-show-panel.php
 * @param resource $panel <p>
 * </p>
 * @return int
 */
function ncurses_show_panel($panel) {}

/**
 * Remove panel from the stack, making it invisible
 * @link https://php.net/manual/en/function.ncurses-hide-panel.php
 * @param resource $panel <p>
 * </p>
 * @return int
 */
function ncurses_hide_panel($panel) {}

/**
 * Remove panel from the stack and delete it (but not the associated window)
 * @link https://php.net/manual/en/function.ncurses-del-panel.php
 * @param resource $panel <p>
 * </p>
 * @return bool
 */
function ncurses_del_panel($panel) {}

/**
 * Create a new panel and associate it with window
 * @link https://php.net/manual/en/function.ncurses-new-panel.php
 * @param resource $window <p>
 * </p>
 * @return resource
 */
function ncurses_new_panel($window) {}

define('NCURSES_COLOR_BLACK', 0);
define('NCURSES_COLOR_RED', 1);
define('NCURSES_COLOR_GREEN', 2);
define('NCURSES_COLOR_YELLOW', 3);
define('NCURSES_COLOR_BLUE', 4);
define('NCURSES_COLOR_MAGENTA', 5);
define('NCURSES_COLOR_CYAN', 6);
define('NCURSES_COLOR_WHITE', 7);
define('NCURSES_KEY_DOWN', 258);
define('NCURSES_KEY_UP', 259);
define('NCURSES_KEY_LEFT', 260);
define('NCURSES_KEY_RIGHT', 261);
define('NCURSES_KEY_HOME', 262);
define('NCURSES_KEY_END', 360);
define('NCURSES_KEY_BACKSPACE', 263);
define('NCURSES_KEY_MOUSE', 409);
define('NCURSES_KEY_F0', 264);
define('NCURSES_KEY_F1', 265);
define('NCURSES_KEY_F2', 266);
define('NCURSES_KEY_F3', 267);
define('NCURSES_KEY_F4', 268);
define('NCURSES_KEY_F5', 269);
define('NCURSES_KEY_F6', 270);
define('NCURSES_KEY_F7', 271);
define('NCURSES_KEY_F8', 272);
define('NCURSES_KEY_F9', 273);
define('NCURSES_KEY_F10', 274);
define('NCURSES_KEY_F11', 275);
define('NCURSES_KEY_F12', 276);
define('NCURSES_KEY_DL', 328);
define('NCURSES_KEY_IL', 329);
define('NCURSES_KEY_DC', 330);
define('NCURSES_KEY_IC', 331);
define('NCURSES_KEY_EIC', 332);
define('NCURSES_KEY_CLEAR', 333);
define('NCURSES_KEY_EOS', 334);
define('NCURSES_KEY_EOL', 335);
define('NCURSES_KEY_SF', 336);
define('NCURSES_KEY_SR', 337);
define('NCURSES_KEY_NPAGE', 338);
define('NCURSES_KEY_PPAGE', 339);
define('NCURSES_KEY_STAB', 340);
define('NCURSES_KEY_CTAB', 341);
define('NCURSES_KEY_CATAB', 342);
define('NCURSES_KEY_ENTER', 343);
define('NCURSES_KEY_SRESET', 344);
define('NCURSES_KEY_RESET', 345);
define('NCURSES_KEY_PRINT', 346);
define('NCURSES_KEY_LL', 347);
define('NCURSES_KEY_A1', 348);
define('NCURSES_KEY_A3', 349);
define('NCURSES_KEY_B2', 350);
define('NCURSES_KEY_C1', 351);
define('NCURSES_KEY_C3', 352);
define('NCURSES_KEY_BTAB', 353);
define('NCURSES_KEY_BEG', 354);
define('NCURSES_KEY_CANCEL', 355);
define('NCURSES_KEY_CLOSE', 356);
define('NCURSES_KEY_COMMAND', 357);
define('NCURSES_KEY_COPY', 358);
define('NCURSES_KEY_CREATE', 359);
define('NCURSES_KEY_EXIT', 361);
define('NCURSES_KEY_FIND', 362);
define('NCURSES_KEY_HELP', 363);
define('NCURSES_KEY_MARK', 364);
define('NCURSES_KEY_MESSAGE', 365);
define('NCURSES_KEY_MOVE', 366);
define('NCURSES_KEY_NEXT', 367);
define('NCURSES_KEY_OPEN', 368);
define('NCURSES_KEY_OPTIONS', 369);
define('NCURSES_KEY_PREVIOUS', 370);
define('NCURSES_KEY_REDO', 371);
define('NCURSES_KEY_REFERENCE', 372);
define('NCURSES_KEY_REFRESH', 373);
define('NCURSES_KEY_REPLACE', 374);
define('NCURSES_KEY_RESTART', 375);
define('NCURSES_KEY_RESUME', 376);
define('NCURSES_KEY_SAVE', 377);
define('NCURSES_KEY_SBEG', 378);
define('NCURSES_KEY_SCANCEL', 379);
define('NCURSES_KEY_SCOMMAND', 380);
define('NCURSES_KEY_SCOPY', 381);
define('NCURSES_KEY_SCREATE', 382);
define('NCURSES_KEY_SDC', 383);
define('NCURSES_KEY_SDL', 384);
define('NCURSES_KEY_SELECT', 385);
define('NCURSES_KEY_SEND', 386);
define('NCURSES_KEY_SEOL', 387);
define('NCURSES_KEY_SEXIT', 388);
define('NCURSES_KEY_SFIND', 389);
define('NCURSES_KEY_SHELP', 390);
define('NCURSES_KEY_SHOME', 391);
define('NCURSES_KEY_SIC', 392);
define('NCURSES_KEY_SLEFT', 393);
define('NCURSES_KEY_SMESSAGE', 394);
define('NCURSES_KEY_SMOVE', 395);
define('NCURSES_KEY_SNEXT', 396);
define('NCURSES_KEY_SOPTIONS', 397);
define('NCURSES_KEY_SPREVIOUS', 398);
define('NCURSES_KEY_SPRINT', 399);
define('NCURSES_KEY_SREDO', 400);
define('NCURSES_KEY_SREPLACE', 401);
define('NCURSES_KEY_SRIGHT', 402);
define('NCURSES_KEY_SRSUME', 403);
define('NCURSES_KEY_SSAVE', 404);
define('NCURSES_KEY_SSUSPEND', 405);
define('NCURSES_KEY_SUNDO', 406);
define('NCURSES_KEY_SUSPEND', 407);
define('NCURSES_KEY_UNDO', 408);
define('NCURSES_KEY_RESIZE', 410);
define('NCURSES_A_NORMAL', 0);
define('NCURSES_A_STANDOUT', 65536);
define('NCURSES_A_UNDERLINE', 131072);
define('NCURSES_A_REVERSE', 262144);
define('NCURSES_A_BLINK', 524288);
define('NCURSES_A_DIM', 1048576);
define('NCURSES_A_BOLD', 2097152);
define('NCURSES_A_PROTECT', 16777216);
define('NCURSES_A_INVIS', 8388608);
define('NCURSES_A_ALTCHARSET', 4194304);
define('NCURSES_A_CHARTEXT', 255);
define('NCURSES_BUTTON1_PRESSED', 2);
define('NCURSES_BUTTON1_RELEASED', 1);
define('NCURSES_BUTTON1_CLICKED', 4);
define('NCURSES_BUTTON1_DOUBLE_CLICKED', 8);
define('NCURSES_BUTTON1_TRIPLE_CLICKED', 16);
define('NCURSES_BUTTON2_PRESSED', 128);
define('NCURSES_BUTTON2_RELEASED', 64);
define('NCURSES_BUTTON2_CLICKED', 256);
define('NCURSES_BUTTON2_DOUBLE_CLICKED', 512);
define('NCURSES_BUTTON2_TRIPLE_CLICKED', 1024);
define('NCURSES_BUTTON3_PRESSED', 8192);
define('NCURSES_BUTTON3_RELEASED', 4096);
define('NCURSES_BUTTON3_CLICKED', 16384);
define('NCURSES_BUTTON3_DOUBLE_CLICKED', 32768);
define('NCURSES_BUTTON3_TRIPLE_CLICKED', 65536);
define('NCURSES_BUTTON4_PRESSED', 524288);
define('NCURSES_BUTTON4_RELEASED', 262144);
define('NCURSES_BUTTON4_CLICKED', 1048576);
define('NCURSES_BUTTON4_DOUBLE_CLICKED', 2097152);
define('NCURSES_BUTTON4_TRIPLE_CLICKED', 4194304);
define('NCURSES_BUTTON_SHIFT', 33554432);
define('NCURSES_BUTTON_CTRL', 16777216);
define('NCURSES_BUTTON_ALT', 67108864);
define('NCURSES_ALL_MOUSE_EVENTS', 134217727);
define('NCURSES_REPORT_MOUSE_POSITION', 134217728);

// End of ncurses v.
<?php

// Start of suhosin v.0.9.32.1

/**
 * Encrypts a cookie value according to current cookie encrpytion setting
 * @link https://php.net/manual/en/function.suhosin-encrypt-cookie.php
 * @param string $name <p>
 * Cookie name.
 * </p>
 * @param string $value <p>
 * Cookie value.
 * </p>
 * @return string|false the encrypted string or false on failure.
 */
function suhosin_encrypt_cookie($name, $value) {}

/**
 * Returns an array containing the raw cookie values
 * @link https://php.net/manual/en/function.suhosin-get-raw-cookies.php
 * @return array an array containing the raw cookie values.
 */
function suhosin_get_raw_cookies() {}
<?php
/**
 * Start of mysqli extension stubs v.0.1
 * @link https://php.net/manual/en/book.mysqli.php
 */

use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;

/**
 * mysqli_sql_exception
 */
final class mysqli_sql_exception extends RuntimeException
{
    /**
     * The sql state with the error.
     *
     * @var string
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    protected $sqlstate;

    /**
     * The error code
     *
     * @var int
     */
    protected $code;

    /**
     * @since 8.1
     */
    public function getSqlState(): string {}
}

/**
 * MySQLi Driver.
 * @link https://php.net/manual/en/class.mysqli-driver.php
 */
final class mysqli_driver
{
    /**
     * @var string
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $client_info;

    /**
     * @var string
     */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $client_version;

    /**
     * @var string
     */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $driver_version;

    /**
     * @var string
     */
    public $embedded;

    /**
     * @var bool
     */
    #[LanguageLevelTypeAware(['8.1' => 'bool'], default: '')]
    public $reconnect;

    /**
     * @var int
     */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $report_mode;
}

/**
 * Represents a connection between PHP and a MySQL database.
 * @link https://php.net/manual/en/class.mysqli.php
 */
class mysqli
{
    /**
     * @var int
     */
    #[LanguageLevelTypeAware(['8.1' => 'string|int'], default: '')]
    public $affected_rows;

    /**
     * @var string
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $client_info;

    /**
     * @var int
     */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $client_version;

    /**
     * @var int
     */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $connect_errno;

    /**
     * @var string
     */
    #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
    public $connect_error;

    /**
     * @var int
     */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $errno;

    /**
     * @var string
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $error;

    /**
     * @var int
     */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $field_count;

    /**
     * @var string
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $host_info;

    /**
     * @var string
     */
    #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
    public $info;

    /**
     * @var int|string
     */
    #[LanguageLevelTypeAware(['8.1' => 'int|string'], default: '')]
    public $insert_id;

    /**
     * @var string
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $server_info;

    /**
     * @var int
     */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $server_version;

    /**
     * @var string
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $sqlstate;

    /**
     * @var string
     */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $protocol_version;

    /**
     * @var int
     */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $thread_id;

    /**
     * @var int
     */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $warning_count;

    /**
     * @var array A list of errors, each as an associative array containing the errno, error, and sqlstate.
     * @link https://secure.php.net/manual/en/mysqli.error-list.php
     */
    #[LanguageLevelTypeAware(['8.1' => 'array'], default: '')]
    public $error_list;
    public $stat;

    /**
     * Open a new connection to the MySQL server
     * @link https://php.net/manual/en/mysqli.construct.php
     * @param string $hostname [optional] Can be either a host name or an IP address. Passing the NULL value or the string "localhost" to this parameter, the local host is assumed. When possible, pipes will be used instead of the TCP/IP protocol. Prepending host by p: opens a persistent connection. mysqli_change_user() is automatically called on connections opened from the connection pool. Defaults to ini_get("mysqli.default_host")
     * @param string $username [optional] The MySQL user name. Defaults to ini_get("mysqli.default_user")
     * @param string $password [optional] If not provided or NULL, the MySQL server will attempt to authenticate the user against those user records which have no password only. This allows one username to be used with different permissions (depending on if a password as provided or not). Defaults to ini_get("mysqli.default_pw")
     * @param string $database [optional] If provided will specify the default database to be used when performing queries. Defaults to ""
     * @param int $port [optional] Specifies the port number to attempt to connect to the MySQL server. Defaults to ini_get("mysqli.default_port")
     * @param string $socket [optional] Specifies the socket or named pipe that should be used. Defaults to ini_get("mysqli.default_socket")
     */
    public function __construct(
        ?string $hostname = null,
        ?string $username = null,
        ?string $password = null,
        ?string $database = null,
        ?int $port = null,
        ?string $socket = null
    ) {}

    /**
     * Turns on or off auto-committing database modifications
     * @link https://php.net/manual/en/mysqli.autocommit.php
     * @param bool $enable <p>
     * Whether to turn on auto-commit or not.
     * </p>
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function autocommit(bool $enable): bool {}

    /**
     * Starts a transaction
     * @link https://secure.php.net/manual/en/mysqli.begin-transaction.php
     * @param int $flags [optional]
     * @param string $name [optional]
     * @return bool true on success or false on failure.
     * @since 5.5
     */
    #[TentativeType]
    public function begin_transaction(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = 0,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $name = null
    ): bool {}

    /**
     * Changes the user of the specified database connection
     * @link https://php.net/manual/en/mysqli.change-user.php
     * @param string $username <p>
     * The MySQL user name.
     * </p>
     * @param string $password <p>
     * The MySQL password.
     * </p>
     * @param string $database <p>
     * The database to change to.
     * </p>
     * <p>
     * If desired, the null value may be passed resulting in only changing
     * the user and not selecting a database. To select a database in this
     * case use the <b>mysqli_select_db</b> function.
     * </p>
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function change_user(string $username, string $password, ?string $database): bool {}

    /**
     * Returns the current character set of the database connection
     * @link https://php.net/manual/en/mysqli.character-set-name.php
     * @return string The current character set of the connection
     */
    #[TentativeType]
    public function character_set_name(): string {}

    /**
     * @removed 5.4
     */
    #[Deprecated(since: '5.3')]
    public function client_encoding() {}

    /**
     * Closes a previously opened database connection
     * @link https://php.net/manual/en/mysqli.close.php
     * @return bool true on success or false on failure.
     */
    public function close() {}

    /**
     * Commits the current transaction
     * @link https://php.net/manual/en/mysqli.commit.php
     * @param int $flags A bitmask of MYSQLI_TRANS_COR_* constants.
     * @param string $name If provided then COMMIT $name is executed.
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function commit(int $flags = 0, ?string $name = null): bool {}

    /**
     * @link https://php.net/manual/en/function.mysqli-connect.php
     * @param string|null $hostname [optional]
     * @param string|null $username [optional]
     * @param string|null $password [optional]
     * @param string|null $database [optional]
     * @param int|null $port [optional]
     * @param string|null $socket [optional]
     * @return bool
     */
    #[TentativeType]
    public function connect(
        ?string $hostname = null,
        ?string $username = null,
        ?string $password = null,
        ?string $database = null,
        ?int $port = null,
        ?string $socket = null
    ): bool {}

    /**
     * Dump debugging information into the log
     * @link https://php.net/manual/en/mysqli.dump-debug-info.php
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function dump_debug_info(): bool {}

    /**
     * Performs debugging operations
     * @link https://php.net/manual/en/mysqli.debug.php
     * @param string $options <p>
     * A string representing the debugging operation to perform
     * </p>
     * @return bool true.
     */
    public function debug(string $options) {}

    /**
     * Returns a character set object
     * @link https://php.net/manual/en/mysqli.get-charset.php
     * @return object|null The function returns a character set object with the following properties:
     * <i>charset</i>
     * <p>Character set name</p>
     * <i>collation</i>
     * <p>Collation name</p>
     * <i>dir</i>
     * <p>Directory the charset description was fetched from (?) or "" for built-in character sets</p>
     * <i>min_length</i>
     * <p>Minimum character length in bytes</p>
     * <i>max_length</i>
     * <p>Maximum character length in bytes</p>
     * <i>number</i>
     * <p>Internal character set number</p>
     * <i>state</i>
     * <p>Character set status (?)</p>
     */
    #[TentativeType]
    public function get_charset(): ?object {}

    /**
     * @param mysqli $mysql
     * @param string $query
     * @param array|null $params
     * @return mysqli_result|bool
     * @see mysqli_execute_query
     * @since 8.2
     */
    public function execute_query(string $query, ?array $params = null): mysqli_result|bool {}

    /**
     * Returns the MySQL client version as a string
     * @link https://php.net/manual/en/mysqli.get-client-info.php
     * @return string A string that represents the MySQL client library version
     */
    #[TentativeType]
    public function get_client_info(): string {}

    /**
     * Returns statistics about the client connection
     * @link https://php.net/manual/en/mysqli.get-connection-stats.php
     * @return array an array with connection stats.
     */
    #[TentativeType]
    public function get_connection_stats(): array {}

    /**
     * Returns the version of the MySQL server
     * @link https://php.net/manual/en/mysqli.get-server-info.php
     * @return string A character string representing the server version.
     */
    #[TentativeType]
    public function get_server_info(): string {}

    /**
     * Get result of SHOW WARNINGS
     * @link https://php.net/manual/en/mysqli.get-warnings.php
     * @return mysqli_warning|false
     */
    #[TentativeType]
    public function get_warnings(): mysqli_warning|false {}

    /**
     * Initializes MySQLi object
     * @link https://php.net/manual/en/mysqli.init.php
     * @return bool|null
     * @deprecated 8.1
     */
    public function init() {}

    /**
     * Asks the server to kill a MySQL thread
     * @link https://php.net/manual/en/mysqli.kill.php
     * @param int $process_id
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function kill(int $process_id): bool {}

    /**
     * Performs one or more queries on the database
     * @link https://php.net/manual/en/mysqli.multi-query.php
     * @param string $query <p>
     * A string containing the queries to be executed.
     * Multiple queries must be separated by a semicolon.
     * </p>
     * <p>
     * If the query contains any variable input then parameterized
     * prepared statements should be used instead. Alternatively,
     * the data must be properly formatted and all strings must be
     * escaped using the <b>mysqli_real_escape_string</b> function.
     * </p>
     * @return bool false if the first statement failed.
     * To retrieve subsequent errors from other statements you have to call
     * <b>mysqli_next_result</b> first.
     */
    #[TentativeType]
    public function multi_query(string $query): bool {}

    /**
     * @link https://php.net/manual/en/mysqli.construct.php
     * @param string $host [optional]
     * @param string $username [optional]
     * @param string $password [optional]
     * @param string $database [optional]
     * @param int $port [optional]
     * @param string $socket [optional]
     *
     * @removed 8.0
     */
    public function mysqli($host = null, $username = null, $password = null, $database = null, $port = null, $socket = null) {}

    /**
     * Check if there are any more query results from a multi query
     * @link https://php.net/manual/en/mysqli.more-results.php
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function more_results(): bool {}

    /**
     * Prepare next result from multi_query
     * @link https://php.net/manual/en/mysqli.next-result.php
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function next_result(): bool {}

    /**
     * Set options
     * @link https://php.net/manual/en/mysqli.options.php
     * @param int $option <p>
     * The option that you want to set. It can be one of the following values:
     * <table>
     * Valid options
     * <tr valign="top">
     * <td>Name</td>
     * <td>Description</td>
     * </tr>
     * <tr valign="top">
     * <td><b>MYSQLI_OPT_CONNECT_TIMEOUT</b></td>
     * <td>connection timeout in seconds (supported on Windows with TCP/IP since PHP 5.3.1)</td>
     * </tr>
     * <tr valign="top">
     * <td><b>MYSQLI_OPT_LOCAL_INFILE</b></td>
     * <td>enable/disable use of LOAD LOCAL INFILE</td>
     * </tr>
     * <tr valign="top">
     * <td><b>MYSQLI_INIT_COMMAND</b></td>
     * <td>command to execute after when connecting to MySQL server</td>
     * </tr>
     * <tr valign="top">
     * <td><b>MYSQLI_READ_DEFAULT_FILE</b></td>
     * <td>
     * Read options from named option file instead of my.cnf
     * </td>
     * </tr>
     * <tr valign="top">
     * <td><b>MYSQLI_READ_DEFAULT_GROUP</b></td>
     * <td>
     * Read options from the named group from my.cnf
     * or the file specified with <b>MYSQL_READ_DEFAULT_FILE</b>
     * </td>
     * </tr>
     * <tr valign="top">
     * <td><b>MYSQLI_SERVER_PUBLIC_KEY</b></td>
     * <td>
     * RSA public key file used with the SHA-256 based authentication.
     * </td>
     * </tr>
     * </table>
     * </p>
     * @param string|int $value <p>
     * The value for the option.
     * </p>
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function options(int $option, $value): bool {}

    /**
     * Pings a server connection, or tries to reconnect if the connection has gone down
     * @link https://php.net/manual/en/mysqli.ping.php
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function ping(): bool {}

    /**
     * Prepares an SQL statement for execution
     * @link https://php.net/manual/en/mysqli.prepare.php
     * @param string $query <p>
     * The query, as a string. It must consist of a single SQL statement.
     * </p>
     * <p>
     * The SQL statement may contain zero or more parameter markers
     * represented by question mark (?) characters
     * at the appropriate positions.
     * </p>
     * <p>
     * The markers are legal only in certain places in SQL statements.
     * For example, they are permitted in the VALUES()
     * list of an INSERT statement (to specify column
     * values for a row), or in a comparison with a column in a
     * WHERE clause to specify a comparison value.
     * </p>
     * <p>
     * However, they are not permitted for identifiers (such as table or
     * column names), or to specify both operands of a binary operator such as the = equal
     * sign. The latter restriction is necessary because it would be
     * impossible to determine the parameter type.
     * In general, parameters are legal
     * only in Data Manipulation Language (DML) statements, and not in Data
     * Definition Language (DDL) statements.
     * </p>
     * @return mysqli_stmt|false <b>mysqli_prepare</b> returns a statement object or false if an error occurred.
     */
    #[TentativeType]
    public function prepare(string $query): mysqli_stmt|false {}

    /**
     * Performs a query on the database
     * @link https://php.net/manual/en/mysqli.query.php
     * @param string $query <p>
     * The query string.
     * </p>
     * <p>
     * If the query contains any variable input then parameterized
     * prepared statements should be used instead. Alternatively,
     * the data must be properly formatted and all strings must be
     * escaped using the <b>mysqli_real_escape_string</b> function.
     * </p>
     * @param int $result_mode [optional] <p>
     * The result mode can be one of 3 constants indicating
     * how the result will be returned from the MySQL server.
     * </p>
     * <p>
     * <b>MYSQLI_STORE_RESULT</b> (default) - returns a <b>mysqli_result</b>
     * object with buffered result set.
     * </p>
     * <p>
     * <b>MYSQLI_USE_RESULT</b> - returns a <b>mysqli_result</b> object
     * with unbuffered result set. As long as there are pending records
     * waiting to be fetched, the connection line will be busy and all
     * subsequent calls will return error Commands out of sync. To avoid
     * the error all records must be fetched from the server or the result
     * set must be discarded by calling <b>mysqli_free_result</b>.
     * </p>
     * <p>
     * <b>MYSQLI_ASYNC</b> (available with mysqlnd) - the query is performed
     * asynchronously and no result set is immediately returned.
     * <b>mysqli_poll</b> is then used to get results from such queries.
     * Used in combination with either
     * <b>MYSQLI_STORE_RESULT</b> or <b>MYSQLI_USE_RESULT</b> constant.
     * </p>
     * @return mysqli_result|bool Returns false on failure.
     * For successful queries which produce a result set,
     * such as SELECT, SHOW, DESCRIBE or EXPLAIN,
     * <b>mysqli_query</b> will return a <b>mysqli_result</b> object.
     * For other successful queries <b>mysqli_query</b> will
     * return true.
     */
    #[TentativeType]
    public function query(
        string $query,
        #[PhpStormStubsElementAvailable(from: '7.1')] int $result_mode = MYSQLI_STORE_RESULT
    ): mysqli_result|bool {}

    /**
     * Opens a connection to a mysql server
     * @link https://php.net/manual/en/mysqli.real-connect.php
     * @param string $hostname [optional] <p>
     * Can be either a host name or an IP address. Passing the null value
     * or the string "localhost" to this parameter, the local host is
     * assumed. When possible, pipes will be used instead of the TCP/IP
     * protocol.
     * </p>
     * @param string $username [optional] <p>
     * The MySQL user name.
     * </p>
     * @param string $password [optional] <p>
     * If provided or null, the MySQL server will attempt to authenticate
     * the user against those user records which have no password only. This
     * allows one username to be used with different permissions (depending
     * on if a password as provided or not).
     * </p>
     * @param string $database [optional] <p>
     * If provided will specify the default database to be used when
     * performing queries.
     * </p>
     * @param int $port [optional] <p>
     * Specifies the port number to attempt to connect to the MySQL server.
     * </p>
     * @param string $socket [optional] <p>
     * Specifies the socket or named pipe that should be used.
     * </p>
     * <p>
     * Specifying the <i>socket</i> parameter will not
     * explicitly determine the type of connection to be used when
     * connecting to the MySQL server. How the connection is made to the
     * MySQL database is determined by the <i>host</i>
     * parameter.
     * </p>
     * @param int $flags [optional] <p>
     * With the parameter <i>flags</i> you can set different
     * connection options:
     * </p>
     * <table>
     * Supported flags
     * <tr valign="top">
     * <td>Name</td>
     * <td>Description</td>
     * </tr>
     * <tr valign="top">
     * <td><b>MYSQLI_CLIENT_COMPRESS</b></td>
     * <td>Use compression protocol</td>
     * </tr>
     * <tr valign="top">
     * <td><b>MYSQLI_CLIENT_FOUND_ROWS</b></td>
     * <td>return number of matched rows, not the number of affected rows</td>
     * </tr>
     * <tr valign="top">
     * <td><b>MYSQLI_CLIENT_IGNORE_SPACE</b></td>
     * <td>Allow spaces after function names. Makes all function names reserved words.</td>
     * </tr>
     * <tr valign="top">
     * <td><b>MYSQLI_CLIENT_INTERACTIVE</b></td>
     * <td>
     * Allow interactive_timeout seconds (instead of
     * wait_timeout seconds) of inactivity before closing the connection
     * </td>
     * </tr>
     * <tr valign="top">
     * <td><b>MYSQLI_CLIENT_SSL</b></td>
     * <td>Use SSL (encryption)</td>
     * </tr>
     * </table>
     * <p>
     * For security reasons the <b>MULTI_STATEMENT</b> flag is
     * not supported in PHP. If you want to execute multiple queries use the
     * <b>mysqli_multi_query</b> function.
     * </p>
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function real_connect(
        ?string $hostname = null,
        ?string $username = null,
        ?string $password = null,
        ?string $database = null,
        ?int $port = null,
        ?string $socket = null,
        int $flags = null
    ): bool {}

    /**
     * Escapes special characters in a string for use in an SQL statement, taking into account the current charset of the connection
     * @link https://php.net/manual/en/mysqli.real-escape-string.php
     * @param string $string <p>
     * The string to be escaped.
     * </p>
     * <p>
     * Characters encoded are NUL (ASCII 0), \n, \r, \, ', ", and
     * Control-Z.
     * </p>
     * @return string an escaped string.
     */
    #[TentativeType]
    public function real_escape_string(string $string): string {}

    /**
     * Poll connections
     * @link https://php.net/manual/en/mysqli.poll.php
     * @param array &$read <p>
     * </p>
     * @param array &$error <p>
     * </p>
     * @param array &$reject <p>
     * </p>
     * @param int $seconds <p>
     * Number of seconds to wait, must be non-negative.
     * </p>
     * @param int $microseconds [optional] <p>
     * Number of microseconds to wait, must be non-negative.
     * </p>
     * @return int|false number of ready connections in success, false otherwise.
     */
    #[TentativeType]
    public static function poll(?array &$read, ?array &$error, array &$reject, int $seconds, int $microseconds = 0): int|false {}

    /**
     * Get result from async query
     * @link https://php.net/manual/en/mysqli.reap-async-query.php
     * @return mysqli_result|false mysqli_result in success, false otherwise.
     */
    #[TentativeType]
    public function reap_async_query(): mysqli_result|bool {}

    /**
     * Escapes special characters in a string for use in an SQL statement, taking into account the current charset of the connection
     * @param string $string The string to be escaped.
     * Characters encoded are NUL (ASCII 0), \n, \r, \, ', ", and Control-Z.
     * @return string
     * @link https://secure.php.net/manual/en/mysqli.real-escape-string.php
     */
    #[TentativeType]
    public function escape_string(string $string): string {}

    /**
     * Execute an SQL query
     * @link https://php.net/manual/en/mysqli.real-query.php
     * @param string $query <p>
     * The query, as a string.
     * </p>
     * <p>
     * If the query contains any variable input then parameterized
     * prepared statements should be used instead. Alternatively,
     * the data must be properly formatted and all strings must be
     * escaped using the <b>mysqli_real_escape_string</b> function.
     * </p>
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function real_query(string $query): bool {}

    /**
     * Removes the named savepoint from the set of savepoints of the current transaction
     * @link https://php.net/manual/en/mysqli.release-savepoint.php
     * @param string $name The identifier of the savepoint.
     * @return bool Returns TRUE on success or FALSE on failure.
     * @since 5.5
     */
    #[TentativeType]
    public function release_savepoint(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {}

    /**
     * Rolls back current transaction
     * @link https://php.net/manual/en/mysqli.rollback.php
     * @param int $flags [optional] A bitmask of MYSQLI_TRANS_COR_* constants.
     * @param string $name [optional] If provided then ROLLBACK $name is executed.
     * @return bool true on success or false on failure.
     * @since 5.5 Added flags and name parameters.
     */
    #[TentativeType]
    public function rollback(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = 0,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $name = null
    ): bool {}

    /**
     * Set a named transaction savepoint
     * @link https://secure.php.net/manual/en/mysqli.savepoint.php
     * @param string $name
     * @return bool Returns TRUE on success or FALSE on failure.
     * @since 5.5
     */
    #[TentativeType]
    public function savepoint(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {}

    /**
     * Selects the default database for database queries
     * @link https://php.net/manual/en/mysqli.select-db.php
     * @param string $database <p>
     * The database name.
     * </p>
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function select_db(string $database): bool {}

    /**
     * Sets the client character set
     * @link https://php.net/manual/en/mysqli.set-charset.php
     * @param string $charset <p>
     * The desired character set.
     * </p>
     * @return bool true on success or false on failure
     */
    #[TentativeType]
    public function set_charset(string $charset): bool {}

    /**
     * @link https://php.net/manual/en/function.mysqli-set-opt
     * @param int $option
     * @param string|int $value
     */
    #[TentativeType]
    public function set_opt(int $option, $value): bool {}

    /**
     * Used for establishing secure connections using SSL
     * @link https://secure.php.net/manual/en/mysqli.ssl-set.php
     * @param string $key <p>
     * The path name to the key file.
     * </p>
     * @param string $certificate <p>
     * The path name to the certificate file.
     * </p>
     * @param string $ca_certificate <p>
     * The path name to the certificate authority file.
     * </p>
     * @param string $ca_path <p>
     * The pathname to a directory that contains trusted SSL CA certificates in PEM format.
     * </p>
     * @param string $cipher_algos <p>
     * A list of allowable ciphers to use for SSL encryption.
     * </p>
     * @return bool This function always returns TRUE value.
     */
    public function ssl_set(?string $key, ?string $certificate, ?string $ca_certificate, ?string $ca_path, ?string $cipher_algos) {}

    /**
     * Gets the current system status
     * @link https://php.net/manual/en/mysqli.stat.php
     * @return string|false A string describing the server status. false if an error occurred.
     */
    #[TentativeType]
    public function stat(): string|false {}

    /**
     * Initializes a statement and returns an object for use with mysqli_stmt_prepare
     * @link https://php.net/manual/en/mysqli.stmt-init.php
     * @return mysqli_stmt an object.
     */
    #[TentativeType]
    public function stmt_init(): mysqli_stmt|false {}

    /**
     * Transfers a result set from the last query
     * @link https://php.net/manual/en/mysqli.store-result.php
     * @param int $mode [optional] The option that you want to set
     * @return mysqli_result|false a buffered result object or false if an error occurred.
     * </p>
     * <p>
     * <b>mysqli_store_result</b> returns false in case the query
     * didn't return a result set (if the query was, for example an INSERT
     * statement). This function also returns false if the reading of the
     * result set failed. You can check if you have got an error by checking
     * if <b>mysqli_error</b> doesn't return an empty string, if
     * <b>mysqli_errno</b> returns a non zero value, or if
     * <b>mysqli_field_count</b> returns a non zero value.
     * Also possible reason for this function returning false after
     * successful call to <b>mysqli_query</b> can be too large
     * result set (memory for it cannot be allocated). If
     * <b>mysqli_field_count</b> returns a non-zero value, the
     * statement should have produced a non-empty result set.
     */
    #[TentativeType]
    public function store_result(int $mode = 0): mysqli_result|false {}

    /**
     * Returns whether thread safety is given or not
     * @link https://php.net/manual/en/mysqli.thread-safe.php
     * @return bool true if the client library is thread-safe, otherwise false.
     */
    #[TentativeType]
    public function thread_safe(): bool {}

    /**
     * Initiate a result set retrieval
     * @link https://php.net/manual/en/mysqli.use-result.php
     * @return mysqli_result|false an unbuffered result object or false if an error occurred.
     */
    #[TentativeType]
    public function use_result(): mysqli_result|false {}

    /**
     * @link https://php.net/manual/en/mysqli.refresh
     * @param int $flags MYSQLI_REFRESH_*
     * @return bool TRUE if the refresh was a success, otherwise FALSE
     * @since 5.3
     */
    #[TentativeType]
    public function refresh(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): bool {}
}

/**
 * Represents one or more MySQL warnings.
 * @link https://php.net/manual/en/class.mysqli-warning.php
 */
final class mysqli_warning
{
    /**
     * @var string
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $message;

    /**
     * @var string
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $sqlstate;

    /**
     * @var int
     */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $errno;

    /**
     * The __construct purpose
     * @link https://php.net/manual/en/mysqli-warning.construct.php
     */
    #[PhpStormStubsElementAvailable(from: '8.0')]
    private function __construct() {}

    /**
     * The __construct purpose
     * @link https://php.net/manual/en/mysqli-warning.construct.php
     */
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')]
    protected function __construct() {}

    /**
     * Move to the next warning
     * @link https://php.net/manual/en/mysqli-warning.next.php
     * @return bool True if it successfully moved to the next warning
     */
    public function next(): bool {}
}

/**
 * Represents the result set obtained from a query against the database.
 * Implements Traversable since 5.4
 * @link https://php.net/manual/en/class.mysqli-result.php
 */
class mysqli_result implements IteratorAggregate
{
    /**
     * @var int
     */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $current_field;

    /**
     * @var int
     */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $field_count;

    /**
     * @var array|null
     */
    #[LanguageLevelTypeAware(['8.1' => 'array|null'], default: '')]
    public $lengths;

    /**
     * @var int
     */
    #[LanguageLevelTypeAware(['8.1' => 'int|string'], default: '')]
    public $num_rows;

    /**
     * @var mixed
     */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $type;

    /**
     * Constructor (no docs available)
     * @param object $mysql
     * @param int $result_mode [optional]
     */
    public function __construct(
        #[PhpStormStubsElementAvailable(from: '8.0')] mysqli $mysql,
        #[PhpStormStubsElementAvailable(from: '8.0')] int $result_mode = MYSQLI_STORE_RESULT
    ) {}

    /**
     * Frees the memory associated with a result
     * @return void
     * @link https://php.net/manual/en/mysqli-result.free.php
     */
    #[TentativeType]
    public function close(): void {}

    /**
     * Frees the memory associated with a result
     * @link https://php.net/manual/en/mysqli-result.free.php
     * @return void
     */
    #[TentativeType]
    public function free(): void {}

    /**
     * Adjusts the result pointer to an arbitrary row in the result
     * @link https://php.net/manual/en/mysqli-result.data-seek.php
     * @param int $offset <p>
     * The field offset. Must be between zero and the total number of rows
     * minus one (0..<b>mysqli_num_rows</b> - 1).
     * </p>
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function data_seek(int $offset): bool {}

    /**
     * Returns the next field in the result set
     * @link https://php.net/manual/en/mysqli-result.fetch-field.php
     * @return object|false an object which contains field definition information or false
     * if no field information is available.
     * </p>
     * <p>
     * <table>
     * Object properties
     * <tr valign="top">
     * <td>Property</td>
     * <td>Description</td>
     * </tr>
     * <tr valign="top">
     * <td>name</td>
     * <td>The name of the column</td>
     * </tr>
     * <tr valign="top">
     * <td>orgname</td>
     * <td>Original column name if an alias was specified</td>
     * </tr>
     * <tr valign="top">
     * <td>table</td>
     * <td>The name of the table this field belongs to (if not calculated)</td>
     * </tr>
     * <tr valign="top">
     * <td>orgtable</td>
     * <td>Original table name if an alias was specified</td>
     * </tr>
     * <tr valign="top">
     * <td>def</td>
     * <td>Reserved for default value, currently always ""</td>
     * </tr>
     * <tr valign="top">
     * <td>db</td>
     * <td>Database (since PHP 5.3.6)</td>
     * </tr>
     * <tr valign="top">
     * <td>catalog</td>
     * <td>The catalog name, always "def" (since PHP 5.3.6)</td>
     * </tr>
     * <tr valign="top">
     * <td>max_length</td>
     * <td>The maximum width of the field for the result set.</td>
     * </tr>
     * <tr valign="top">
     * <td>length</td>
     * <td>The width of the field, as specified in the table definition.</td>
     * </tr>
     * <tr valign="top">
     * <td>charsetnr</td>
     * <td>The character set number for the field.</td>
     * </tr>
     * <tr valign="top">
     * <td>flags</td>
     * <td>An integer representing the bit-flags for the field.</td>
     * </tr>
     * <tr valign="top">
     * <td>type</td>
     * <td>The data type used for this field</td>
     * </tr>
     * <tr valign="top">
     * <td>decimals</td>
     * <td>The number of decimals used (for integer fields)</td>
     * </tr>
     * </table>
     */
    #[TentativeType]
    public function fetch_field(): object|false {}

    /**
     * Returns an array of objects representing the fields in a result set
     * @link https://php.net/manual/en/mysqli-result.fetch-fields.php
     * @return array an array of objects containing field definition information.
     * </p>
     * <p>
     * <table>
     * Object properties
     * <tr valign="top">
     * <td>Property</td>
     * <td>Description</td>
     * </tr>
     * <tr valign="top">
     * <td>name</td>
     * <td>The name of the column</td>
     * </tr>
     * <tr valign="top">
     * <td>orgname</td>
     * <td>Original column name if an alias was specified</td>
     * </tr>
     * <tr valign="top">
     * <td>table</td>
     * <td>The name of the table this field belongs to (if not calculated)</td>
     * </tr>
     * <tr valign="top">
     * <td>orgtable</td>
     * <td>Original table name if an alias was specified</td>
     * </tr>
     * <tr valign="top">
     * <td>def</td>
     * <td>The default value for this field, represented as a string</td>
     * </tr>
     * <tr valign="top">
     * <td>max_length</td>
     * <td>The maximum width of the field for the result set.</td>
     * </tr>
     * <tr valign="top">
     * <td>length</td>
     * <td>The width of the field, as specified in the table definition.</td>
     * </tr>
     * <tr valign="top">
     * <td>charsetnr</td>
     * <td>The character set number for the field.</td>
     * </tr>
     * <tr valign="top">
     * <td>flags</td>
     * <td>An integer representing the bit-flags for the field.</td>
     * </tr>
     * <tr valign="top">
     * <td>type</td>
     * <td>The data type used for this field</td>
     * </tr>
     * <tr valign="top">
     * <td>decimals</td>
     * <td>The number of decimals used (for integer fields)</td>
     * </tr>
     * </table>
     */
    #[TentativeType]
    public function fetch_fields(): array {}

    /**
     * Fetch meta-data for a single field
     * @link https://php.net/manual/en/mysqli-result.fetch-field-direct.php
     * @param int $index <p>
     * The field number. This value must be in the range from
     * 0 to number of fields - 1.
     * </p>
     * @return object|false an object which contains field definition information or false
     * if no field information for specified fieldnr is
     * available.
     * </p>
     * <p>
     * <table>
     * Object attributes
     * <tr valign="top">
     * <td>Attribute</td>
     * <td>Description</td>
     * </tr>
     * <tr valign="top">
     * <td>name</td>
     * <td>The name of the column</td>
     * </tr>
     * <tr valign="top">
     * <td>orgname</td>
     * <td>Original column name if an alias was specified</td>
     * </tr>
     * <tr valign="top">
     * <td>table</td>
     * <td>The name of the table this field belongs to (if not calculated)</td>
     * </tr>
     * <tr valign="top">
     * <td>orgtable</td>
     * <td>Original table name if an alias was specified</td>
     * </tr>
     * <tr valign="top">
     * <td>def</td>
     * <td>The default value for this field, represented as a string</td>
     * </tr>
     * <tr valign="top">
     * <td>max_length</td>
     * <td>The maximum width of the field for the result set.</td>
     * </tr>
     * <tr valign="top">
     * <td>length</td>
     * <td>The width of the field, as specified in the table definition.</td>
     * </tr>
     * <tr valign="top">
     * <td>charsetnr</td>
     * <td>The character set number for the field.</td>
     * </tr>
     * <tr valign="top">
     * <td>flags</td>
     * <td>An integer representing the bit-flags for the field.</td>
     * </tr>
     * <tr valign="top">
     * <td>type</td>
     * <td>The data type used for this field</td>
     * </tr>
     * <tr valign="top">
     * <td>decimals</td>
     * <td>The number of decimals used (for integer fields)</td>
     * </tr>
     * </table>
     */
    #[TentativeType]
    public function fetch_field_direct(int $index): object|false {}

    /**
     * Fetches all result rows as an associative array, a numeric array, or both
     * @link https://php.net/manual/en/mysqli-result.fetch-all.php
     * @param int $mode [optional] <p>
     * This optional parameter is a constant indicating what type of array
     * should be produced from the current row data. The possible values for
     * this parameter are the constants MYSQLI_ASSOC,
     * MYSQLI_NUM, or MYSQLI_BOTH.
     * </p>
     * @return array an array of associative or numeric arrays holding result rows.
     */
    #[TentativeType]
    public function fetch_all(#[PhpStormStubsElementAvailable(from: '7.0')] int $mode = MYSQLI_NUM): array {}

    /**
     * Fetch the next row of a result set as an associative, a numeric array, or both
     * @link https://php.net/manual/en/mysqli-result.fetch-array.php
     * @param int $mode [optional] <p>
     * This optional parameter is a constant indicating what type of array
     * should be produced from the current row data. The possible values for
     * this parameter are the constants <b>MYSQLI_ASSOC</b>,
     * <b>MYSQLI_NUM</b>, or <b>MYSQLI_BOTH</b>.
     * </p>
     * <p>
     * By using the <b>MYSQLI_ASSOC</b> constant this function
     * will behave identically to the <b>mysqli_fetch_assoc</b>,
     * while <b>MYSQLI_NUM</b> will behave identically to the
     * <b>mysqli_fetch_row</b> function. The final option
     * <b>MYSQLI_BOTH</b> will create a single array with the
     * attributes of both.
     * </p>
     * @return array|false|null an array representing the fetched row, null if there
     * are no more rows in the result set, or false on failure.
     */
    #[TentativeType]
    public function fetch_array(int $mode = MYSQLI_BOTH): array|false|null {}

    /**
     * Fetch the next row of a result set as an associative array
     * @link https://php.net/manual/en/mysqli-result.fetch-assoc.php
     * @return array|false|null an associative array representing the fetched row,
     * where each key in the array represents the name of one of the result set's columns, null if there
     * are no more rows in the result set, or false on failure.
     */
    #[TentativeType]
    public function fetch_assoc(): array|false|null {}

    /**
     * @template T
     *
     * Fetch the next row of a result set as an object
     * @link https://php.net/manual/en/mysqli-result.fetch-object.php
     * @param class-string<T> $class [optional] <p>
     * The name of the class to instantiate, set the properties of and return.
     * If not specified, a <b>stdClass</b> object is returned.
     * </p>
     * @param null|array $constructor_args [optional] <p>
     * An optional array of parameters to pass to the constructor
     * for <i>class_name</i> objects.
     * </p>
     * @return T|stdClass|false|null an object representing the fetched row, where each property
     * represents the name of the result set's column, null if there
     * are no more rows in the result set, or false on failure.
     */
    #[TentativeType]
    public function fetch_object(string $class = 'stdClass', array $constructor_args = null): object|false|null {}

    /**
     * Fetch the next row of a result set as an enumerated array
     * @link https://php.net/manual/en/mysqli-result.fetch-row.php
     * @return array|false|null an enumerated array representing
     * the fetched row, null if there
     * are no more rows in the result set, or false on failure.
     */
    #[TentativeType]
    public function fetch_row(): array|false|null {}

    /**
     * Fetch a single column from the next row of a result set
     *
     * @param int $column [optional] <p>
     * 0-indexed number of the column you wish to retrieve from the row.
     * If no value is supplied, the first column will be returned.
     * </p>
     * @return string|int|float|false|null a single column from
     * the next row of a result set or false if there are no more rows.
     */
    #[PhpStormStubsElementAvailable('8.1')]
    public function fetch_column(int $column = 0): string|int|float|false|null {}

    /**
     * Set result pointer to a specified field offset
     * @link https://php.net/manual/en/mysqli-result.field-seek.php
     * @param int $index <p>
     * The field number. This value must be in the range from
     * 0 to number of fields - 1.
     * </p>
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function field_seek(int $index): bool {}

    /**
     * Frees the memory associated with a result
     * @return void
     * @link https://php.net/manual/en/mysqli-result.free.php
     */
    #[TentativeType]
    public function free_result(): void {}

    /**
     * @return Iterator
     * @since 8.0
     */
    public function getIterator(): Iterator {}
}

/**
 * Represents a prepared statement.
 * @link https://php.net/manual/en/class.mysqli-stmt.php
 */
class mysqli_stmt
{
    /**
     * @var int
     */
    #[LanguageLevelTypeAware(['8.1' => 'int|string'], default: '')]
    public $affected_rows;

    /**
     * @var int
     */
    #[LanguageLevelTypeAware(['8.1' => 'int|string'], default: '')]
    public $insert_id;

    /**
     * @var int
     */
    #[LanguageLevelTypeAware(['8.1' => 'int|string'], default: '')]
    public $num_rows;

    /**
     * @var int
     */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $param_count;

    /**
     * @var int
     */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $field_count;

    /**
     * @var int
     */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $errno;

    /**
     * @var string
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $error;

    /**
     * @var array
     */
    #[LanguageLevelTypeAware(['8.1' => 'array'], default: '')]
    public $error_list;

    /**
     * @var string
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $sqlstate;

    /**
     * @var string
     */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    public $id;

    /**
     * mysqli_stmt constructor
     * @param mysqli $mysql
     * @param string $query [optional]
     */
    public function __construct($mysql, $query) {}

    /**
     * Used to get the current value of a statement attribute
     * @link https://php.net/manual/en/mysqli-stmt.attr-get.php
     * @param int $attribute The attribute that you want to get.
     * @return int Returns the value of the attribute.
     */
    #[TentativeType]
    public function attr_get(int $attribute): int {}

    /**
     * Used to modify the behavior of a prepared statement
     * @link https://php.net/manual/en/mysqli-stmt.attr-set.php
     * @param int $attribute <p>
     * The attribute that you want to set. It can have one of the following values:
     * <table>
     * Attribute values
     * <tr valign="top">
     * <td>Character</td>
     * <td>Description</td>
     * </tr>
     * <tr valign="top">
     * <td>MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH</td>
     * <td>
     * If set to 1, causes <b>mysqli_stmt_store_result</b> to
     * update the metadata MYSQL_FIELD->max_length value.
     * </td>
     * </tr>
     * <tr valign="top">
     * <td>MYSQLI_STMT_ATTR_CURSOR_TYPE</td>
     * <td>
     * Type of cursor to open for statement when <b>mysqli_stmt_execute</b>
     * is invoked. <i>mode</i> can be MYSQLI_CURSOR_TYPE_NO_CURSOR
     * (the default) or MYSQLI_CURSOR_TYPE_READ_ONLY.
     * </td>
     * </tr>
     * <tr valign="top">
     * <td>MYSQLI_STMT_ATTR_PREFETCH_ROWS</td>
     * <td>
     * Number of rows to fetch from server at a time when using a cursor.
     * <i>mode</i> can be in the range from 1 to the maximum
     * value of unsigned long. The default is 1.
     * </td>
     * </tr>
     * </table>
     * </p>
     * <p>
     * If you use the MYSQLI_STMT_ATTR_CURSOR_TYPE option with
     * MYSQLI_CURSOR_TYPE_READ_ONLY, a cursor is opened for the
     * statement when you invoke <b>mysqli_stmt_execute</b>. If there
     * is already an open cursor from a previous <b>mysqli_stmt_execute</b> call,
     * it closes the cursor before opening a new one. <b>mysqli_stmt_reset</b>
     * also closes any open cursor before preparing the statement for re-execution.
     * <b>mysqli_stmt_free_result</b> closes any open cursor.
     * </p>
     * <p>
     * If you open a cursor for a prepared statement, <b>mysqli_stmt_store_result</b>
     * is unnecessary.
     * </p>
     * @param int $value <p>The value to assign to the attribute.</p>
     * @return bool
     */
    #[TentativeType]
    public function attr_set(int $attribute, int $value): bool {}

    /**
     * Binds variables to a prepared statement as parameters
     * @link https://php.net/manual/en/mysqli-stmt.bind-param.php
     * @param string $types <p>
     * A string that contains one or more characters which specify the types
     * for the corresponding bind variables:
     * <table>
     * Type specification chars
     * <tr valign="top">
     * <td>Character</td>
     * <td>Description</td>
     * </tr>
     * <tr valign="top">
     * <td>i</td>
     * <td>corresponding variable has type integer</td>
     * </tr>
     * <tr valign="top">
     * <td>d</td>
     * <td>corresponding variable has type double</td>
     * </tr>
     * <tr valign="top">
     * <td>s</td>
     * <td>corresponding variable has type string</td>
     * </tr>
     * <tr valign="top">
     * <td>b</td>
     * <td>corresponding variable is a blob and will be sent in packets</td>
     * </tr>
     * </table>
     * </p>
     * @param mixed &$var1 <p>
     * The number of variables and length of string
     * types must match the parameters in the statement.
     * </p>
     * @param mixed &...$_ [optional]
     * @return bool true on success or false on failure.
     */
    public function bind_param($types, &$var1, &...$_) {}

    /**
     * Binds variables to a prepared statement for result storage
     * @link https://php.net/manual/en/mysqli-stmt.bind-result.php
     * @param mixed &$var1 The variable to be bound.
     * @param mixed &...$_ The variables to be bound.
     * @return bool true on success or false on failure.
     */
    public function bind_result(&$var1, &...$_) {}

    /**
     * Closes a prepared statement
     * @link https://php.net/manual/en/mysqli-stmt.close.php
     * @return bool true on success or false on failure.
     */
    public function close() {}

    /**
     * Seeks to an arbitrary row in statement result set
     * @link https://php.net/manual/en/mysqli-stmt.data-seek.php
     * @param int $offset <p>
     * Must be between zero and the total number of rows minus one (0..
     * <b>mysqli_stmt_num_rows</b> - 1).
     * </p>
     * @return void
     */
    #[TentativeType]
    public function data_seek(int $offset): void {}

    /**
     * Executes a prepared statement
     * @link https://php.net/manual/en/mysqli-stmt.execute.php
     * @param array|null $params [optional] An optional list array with as many elements
     * as there are bound parameters in the SQL statement being executed. Each value is treated as a string.
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function execute(#[PhpStormStubsElementAvailable('8.1')] ?array $params = null): bool {}

    /**
     * Fetch results from a prepared statement into the bound variables
     * @link https://php.net/manual/en/mysqli-stmt.fetch.php
     * @return bool|null
     */
    #[TentativeType]
    public function fetch(): ?bool {}

    /**
     * Get result of SHOW WARNINGS
     * @link https://php.net/manual/en/mysqli-stmt.get-warnings.php
     * @return object|false
     */
    #[TentativeType]
    public function get_warnings(): mysqli_warning|false {}

    /**
     * Returns result set metadata from a prepared statement
     * @link https://php.net/manual/en/mysqli-stmt.result-metadata.php
     * @return mysqli_result|false a result object or false if an error occurred.
     */
    #[TentativeType]
    public function result_metadata(): mysqli_result|false {}

    /**
     * Check if there are more query results from a multiple query
     * @link https://php.net/manual/en/mysqli-stmt.more-results.php
     * @return bool
     */
    #[TentativeType]
    public function more_results(): bool {}

    /**
     * Reads the next result from a multiple query
     * @link https://php.net/manual/en/mysqli-stmt.next-result.php
     * @return bool
     */
    #[TentativeType]
    public function next_result(): bool {}

    /**
     * Return the number of rows in statements result set
     * @link https://php.net/manual/en/mysqli-stmt.num-rows.php
     * @return string|int An integer representing the number of rows in result set.
     */
    #[TentativeType]
    public function num_rows(): string|int {}

    /**
     * Send data in blocks
     * @link https://php.net/manual/en/mysqli-stmt.send-long-data.php
     * @param int $param_num <p>
     * Indicates which parameter to associate the data with. Parameters are
     * numbered beginning with 0.
     * </p>
     * @param string $data <p>
     * A string containing data to be sent.
     * </p>
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function send_long_data(int $param_num, string $data): bool {}

    /**
     * No documentation available
     * @removed 5.4
     */
    #[Deprecated(since: '5.3')]
    public function stmt() {}

    /**
     * Frees stored result memory for the given statement handle
     * @link https://php.net/manual/en/mysqli-stmt.free-result.php
     * @return void
     */
    #[TentativeType]
    public function free_result(): void {}

    /**
     * Resets a prepared statement
     * @link https://php.net/manual/en/mysqli-stmt.reset.php
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function reset(): bool {}

    /**
     * Prepare an SQL statement for execution
     * @link https://php.net/manual/en/mysqli-stmt.prepare.php
     * @param string $query <p>
     * The query, as a string. It must consist of a single SQL statement.
     * </p>
     * <p>
     * The SQL statement may contain zero or more parameter markers
     * represented by question mark (?) characters at the appropriate positions.
     * </p>
     * <p>
     * The markers are legal only in certain places in SQL statements.
     * For example, they are permitted in the VALUES() list of an INSERT statement
     * (to specify column values for a row), or in a comparison with a column in
     * a WHERE clause to specify a comparison value.
     * </p>
     * <p>
     * However, they are not permitted for identifiers (such as table or column names),
     * or to specify both operands of a binary operator such as the =
     * equal sign. The latter restriction is necessary because it would be impossible
     * to determine the parameter type. In general, parameters are legal only in Data
     * Manipulation Language (DML) statements, and not in Data Definition Language
     * (DDL) statements.
     * </p>
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function prepare(string $query): bool {}

    /**
     * Stores a result set in an internal buffer
     * @link https://php.net/manual/en/mysqli-stmt.store-result.php
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function store_result(): bool {}

    /**
     * Gets a result set from a prepared statement as a mysqli_result object
     * @link https://php.net/manual/en/mysqli-stmt.get-result.php
     * @return mysqli_result|false Returns a resultset or FALSE on failure
     */
    #[TentativeType]
    public function get_result(): mysqli_result|false {}
}

/**
 * Gets the number of affected rows in a previous MySQL operation
 * @link https://secure.php.net/manual/en/mysqli.affected-rows.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return string|int An integer greater than zero indicates the number of rows affected or retrieved.
 * Zero indicates that no records were updated for an UPDATE statement,
 * no rows matched the WHERE clause in the query or that no query has yet been executed. -1 indicates that the query returned an error
 * or that <b>mysqli_affected_rows</b> was called for an unbuffered SELECT query.
 */
function mysqli_affected_rows(mysqli $mysql): string|int {}

/**
 * Turns on or off auto-committing database modifications
 * @link https://secure.php.net/manual/en/mysqli.autocommit.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @param bool $enable Whether to turn on auto-commit or not.
 * @return bool
 */
function mysqli_autocommit(mysqli $mysql, bool $enable): bool {}

/**
 * Starts a transaction
 * @link https://secure.php.net/manual/en/mysqli.begin-transaction.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @param int $flags [optional]
 * @param string|null $name [optional]
 * @return bool true on success or false on failure.
 * @since 5.5
 */
function mysqli_begin_transaction(mysqli $mysql, int $flags = 0, ?string $name): bool {}

/**
 * Changes the user of the specified database connection
 * @link https://php.net/manual/en/mysqli.change-user.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @param string $username The MySQL user name.
 * @param string $password The MySQL password.
 * @param string|null $database The database to change to. If desired, the NULL value may be passed resulting in only changing the user and not selecting a database.
 * @return bool
 */
function mysqli_change_user(mysqli $mysql, string $username, string $password, ?string $database): bool {}

/**
 * Returns the current character set of the database connection
 * @link https://php.net/manual/en/mysqli.character-set-name.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return string The current character set of the connection
 */
function mysqli_character_set_name(mysqli $mysql): string {}

/**
 * Closes a previously opened database connection
 * @link https://php.net/manual/en/mysqli.close.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return bool
 */
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
function mysqli_close(mysqli $mysql): bool {}

/**
 * Commits the current transaction
 * @link https://php.net/manual/en/mysqli.commit.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @param int $flags [optional] A bitmask of MYSQLI_TRANS_COR_* constants
 * @param string|null $name [optional] If provided then COMMITname is executed
 * @return bool
 */
function mysqli_commit(mysqli $mysql, int $flags = 0, ?string $name = null): bool {}

/**
 * Open a new connection to the MySQL server
 * Alias of <b>mysqli::__construct</b>
 * @link https://php.net/manual/en/mysqli.construct.php
 * @param string|null $hostname Can be either a host name or an IP address. Passing the NULL value or the string "localhost" to this parameter, the local host is assumed. When possible, pipes will be used instead of the TCP/IP protocol.
 * @param string|null $username The MySQL user name.
 * @param string|null $password If not provided or NULL, the MySQL server will attempt to authenticate the user against those user records which have no password only.
 * @param string|null $database If provided will specify the default database to be used when performing queries.
 * @param int|null $port Specifies the port number to attempt to connect to the MySQL server.
 * @param string|null $socket Specifies the socket or named pipe that should be used.
 * @return mysqli|false object which represents the connection to a MySQL Server or false if an error occurred.
 */
function mysqli_connect(?string $hostname = null, ?string $username = null, ?string $password = null, ?string $database = null, ?int $port = null, ?string $socket = null): mysqli|false {}

/**
 * Returns the error code from last connect call
 * @link https://php.net/manual/en/mysqli.connect-errno.php
 * @return int Last error code number from the last call to mysqli_connect(). Zero means no error occurred.
 */
function mysqli_connect_errno(): int {}

/**
 * Returns a string description of the last connect error
 * @link https://php.net/manual/en/mysqli.connect-error.php
 * @return string|null Last error message string from the last call to mysqli_connect().
 */
function mysqli_connect_error(): ?string {}

/**
 * Adjusts the result pointer to an arbitrary row in the result
 * @link https://php.net/manual/en/mysqli-result.data-seek.php
 * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
 * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
 * @param int $offset
 * @return bool Returns TRUE on success or FALSE on failure.
 */
function mysqli_data_seek(mysqli_result $result, int $offset): bool {}

/**
 * Dump debugging information into the log
 * @link https://php.net/manual/en/mysqli.dump-debug-info.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return bool
 */
function mysqli_dump_debug_info(mysqli $mysql): bool {}

/**
 * Performs debugging operations using the Fred Fish debugging library.
 * @link https://php.net/manual/en/mysqli.debug.php
 * @param string $options
 * @return bool
 */
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
function mysqli_debug(string $options): bool {}

/**
 * Returns the error code for the most recent function call
 * @link https://php.net/manual/en/mysqli.errno.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return int An error code value for the last call, if it failed. zero means no error occurred.
 */
function mysqli_errno(mysqli $mysql): int {}

/**
 * Returns a list of errors from the last command executed
 * @link https://php.net/manual/en/mysqli.error-list.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return array A list of errors, each as an associative array containing the errno, error, and sqlstate.
 * @since 5.4
 */
#[ArrayShape([
    "errno" => "int",
    "sqlstate" => "string",
    "error" => "string",
])]
function mysqli_error_list(mysqli $mysql): array {}

/**
 * Returns a list of errors from the last statement executed
 * @link https://secure.php.net/manual/en/mysqli-stmt.error-list.php
 * @param mysqli_stmt $statement A statement identifier returned by mysqli_stmt_init().
 * @return array A list of errors, each as an associative array containing the errno, error, and sqlstate.
 * @since 5.4
 */
function mysqli_stmt_error_list(mysqli_stmt $statement): array {}

/**
 * Returns a string description of the last error
 * @link https://secure.php.net/manual/en/mysqli.error.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return string
 */
function mysqli_error(mysqli $mysql): string {}

/**
 * Executes a prepared statement
 * @link https://php.net/manual/en/mysqli-stmt.execute.php
 * @param mysqli_stmt $statement
 * @param array|null $params [optional] An optional list array with as many elements
 * as there are bound parameters in the SQL statement being executed. Each value is treated as a string.
 * @return bool true on success or false on failure.
 */
function mysqli_stmt_execute(mysqli_stmt $statement, #[PhpStormStubsElementAvailable('8.1')] ?array $params = null): bool {}

/**
 * Executes a prepared statement
 * Alias for <b>mysqli_stmt_execute</b>
 * @link https://php.net/manual/en/function.mysqli-execute.php
 * @param mysqli_stmt $statement
 * @param array|null $params [optional] An optional list array with as many elements
 * as there are bound parameters in the SQL statement being executed. Each value is treated as a string.
 * @return bool
 */
#[Deprecated(since: '5.3')]
function mysqli_execute(mysqli_stmt $statement, #[PhpStormStubsElementAvailable('8.1')] ?array $params = null): bool {}

/**
 * @param mysqli $mysql
 * @param string $query
 * @param array|null $params
 * @return mysqli_result|bool
 * @since 8.2
 */
function mysqli_execute_query(mysqli $mysql, string $query, ?array $params = null): mysqli_result|bool {}

/**
 * Returns the next field in the result set
 * @link https://secure.php.net/manual/en/mysqli-result.fetch-field.php
 * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
 * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
 * @return object|false Returns an object which contains field definition information or FALSE if no field information is available.
 */
function mysqli_fetch_field(mysqli_result $result): object|false {}

/**
 * Returns an array of objects representing the fields in a result set
 * @link https://secure.php.net/manual/en/mysqli-result.fetch-fields.php
 * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
 * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
 * @return array Returns an array of objects which contains field definition information.
 */
function mysqli_fetch_fields(mysqli_result $result): array {}

/**
 * Fetch meta-data for a single field
 * @link https://secure.php.net/manual/en/mysqli-result.fetch-field-direct.php
 * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
 * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
 * @param int $index The field number. This value must be in the range from 0 to number of fields - 1.
 * @return object|false Returns an object which contains field definition information or FALSE if no field information for specified fieldnr is available.
 */
function mysqli_fetch_field_direct(mysqli_result $result, int $index): object|false {}

/**
 * Returns the lengths of the columns of the current row in the result set
 * @link https://php.net/manual/en/mysqli-result.lengths.php
 * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
 * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
 * @return int[]|false An array of integers representing the size of each column (not including any terminating null characters). FALSE if an error occurred.
 */
function mysqli_fetch_lengths(mysqli_result $result): array|false {}

/**
 * Fetch all result rows as an associative array, a numeric array, or both
 * @link https://php.net/manual/en/mysqli-result.fetch-all.php
 * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
 * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
 * @param int $mode
 * @return array Returns an array of associative or numeric arrays holding result rows.
 */
function mysqli_fetch_all(
    mysqli_result $result,
    #[PhpStormStubsElementAvailable(from: '7.0')] int $mode = MYSQLI_NUM
): array {}

/**
 * Fetch the next row of a result set as an associative, a numeric array, or both
 * @link https://php.net/manual/en/mysqli-result.fetch-array.php
 * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
 * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
 * @param int $mode
 * @return array|false|null an array representing the fetched row,
 * null if there are no more rows in the result set, or false on failure.
 */
function mysqli_fetch_array(mysqli_result $result, int $mode = MYSQLI_BOTH): array|false|null {}

/**
 * Fetch the next row of a result set as an associative array
 * @link https://php.net/manual/en/mysqli-result.fetch-assoc.php
 * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
 * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
 * @return array|false|null an associative array representing the fetched row,
 * where each key in the array represents the name of one of the result set's columns,
 * null if there are no more rows in the result set, or false on failure.
 */
function mysqli_fetch_assoc(mysqli_result $result): array|null|false {}

/**
 * @template T
 *
 * Fetch the next row of a result set as an object
 * @link https://php.net/manual/en/mysqli-result.fetch-object.php
 * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
 * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
 * @param class-string<T> $class [optional] The name of the class to instantiate, set the properties of and return. If not specified, a stdClass object is returned.
 * @param array $constructor_args [optional] An optional array of parameters to pass to the constructor for class_name objects.
 * @return T|stdClass|null|false an object representing the fetched row,
 * where each property represents the name of the result set's column,
 * null if there are no more rows in the result set, or false on failure.
 */
function mysqli_fetch_object(mysqli_result $result, string $class = 'stdClass', array $constructor_args = []): object|null|false {}

/**
 * Fetch the next row of a result set as an enumerated array
 * @link https://php.net/manual/en/mysqli-result.fetch-row.php
 * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
 * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
 * @return array|null|false an enumerated array representing the fetched row,
 * null if there are no more rows in the result set, or false on failure.
 * @link https://php.net/manual/en/mysqli-result.fetch-row.php
 */
function mysqli_fetch_row(mysqli_result $result): array|false|null {}

/**
 * Fetch a single column from the next row of a result set
 * @link https://php.net/manual/en/mysqli-result.fetch-column.php
 * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
 * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
 * @param int $column [optional] <p>
 * 0-indexed number of the column you wish to retrieve from the row.
 * If no value is supplied, the first column will be returned.
 * </p>
 * @return string|int|float|false|null a single column from
 * the next row of a result set or false if there are no more rows.
 */
#[PhpStormStubsElementAvailable('8.1')]
function mysqli_fetch_column(mysqli_result $result, int $column = 0): string|int|float|false|null {}

/**
 * Returns the number of columns for the most recent query
 * @link https://php.net/manual/en/mysqli.field-count.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return int An integer representing the number of fields in a result set.
 */
function mysqli_field_count(mysqli $mysql): int {}

/**
 * Set result pointer to a specified field offset
 * @link https://php.net/manual/en/mysqli-result.field-seek.php
 * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
 * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
 * @param int $index The field number. This value must be in the range from 0 to number of fields - 1.
 * @return bool
 */
function mysqli_field_seek(mysqli_result $result, int $index): bool {}

/**
 * Get current field offset of a result pointer
 * @link https://php.net/manual/en/mysqli-result.current-field.php
 * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
 * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
 * @return int
 */
function mysqli_field_tell(mysqli_result $result): int {}

/**
 * Frees the memory associated with a result
 * @link https://php.net/manual/en/mysqli-result.free.php
 * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
 * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
 * @return void
 */
function mysqli_free_result(mysqli_result $result): void {}

/**
 * Returns client Zval cache statistics
 * Available only with mysqlnd.
 * @link https://php.net/manual/en/function.mysqli-get-cache-stats.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return array|false an array with client Zval cache stats if success, false otherwise.
 * @removed 5.4
 */
function mysqli_get_cache_stats(mysqli $mysql) {}

/**
 * Returns statistics about the client connection
 * @link https://php.net/manual/en/mysqli.get-connection-stats.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return array an array with connection stats.
 */
function mysqli_get_connection_stats(mysqli $mysql): array {}

/**
 * Returns client per-process statistics
 * @link https://php.net/manual/en/function.mysqli-get-client-stats.php
 * @return array an array with client stats.
 */
function mysqli_get_client_stats(): array {}

/**
 * Returns a character set object
 * @link https://php.net/manual/en/mysqli.get-charset.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return object|null
 */
function mysqli_get_charset(mysqli $mysql): ?object {}

/**
 * Get MySQL client info
 * @link https://php.net/manual/en/mysqli.get-client-info.php
 * @param mysqli|null $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return string|null A string that represents the MySQL client library version
 */
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '?string')]
function mysqli_get_client_info(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.1')] mysqli $mysql,
    #[PhpStormStubsElementAvailable(from: '8.0')] ?mysqli $mysql = null
) {}

/**
 * Returns the MySQL client version as an integer
 * @link https://php.net/manual/en/mysqli.get-client-version.php
 * @return int
 */
function mysqli_get_client_version(#[PhpStormStubsElementAvailable(from: '5.3', to: '7.3')] $link): int {}

/**
 * Returns a string representing the type of connection used
 * @link https://php.net/manual/en/mysqli.get-host-info.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return string A character string representing the server hostname and the connection type.
 */
function mysqli_get_host_info(mysqli $mysql): string {}

/**
 * Return information about open and cached links
 * @link https://php.net/manual/en/function.mysqli-get-links-stats.php
 * @return array mysqli_get_links_stats() returns an associative array with three elements, keyed as follows:
 * <dl>
 * <dt>
 * <code>total</code></dt>
 * <dd>
 * <p>
 * An integer indicating the total number of open links in
 * any state.
 * </p>
 * </dd>
 *
 * <dt>
 * <code>active_plinks</code></dt>
 * <dd>
 * <p>
 * An integer representing the number of active persistent
 * connections.
 * </p>
 * </dd>
 *
 * <dt>
 * <code>cached_plinks</code></dt>
 * <dd>
 * <p>
 * An integer representing the number of inactive persistent
 * connections.
 * </p>
 * </dd>
 *
 * </dl>
 * @since 5.6
 */
#[ArrayShape(["total" => "int", "active_plinks" => "int", "cached_plinks" => "int"])]
function mysqli_get_links_stats(): array {}

/**
 * Returns the version of the MySQL protocol used
 * @link https://php.net/manual/en/mysqli.get-proto-info.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return int Returns an integer representing the protocol version
 */
function mysqli_get_proto_info(mysqli $mysql): int {}

/**
 * Returns the version of the MySQL server
 * @link https://php.net/manual/en/mysqli.get-server-info.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return string A character string representing the server version.
 */
function mysqli_get_server_info(mysqli $mysql): string {}

/**
 * Returns the version of the MySQL server as an integer
 * @link https://php.net/manual/en/mysqli.get-server-version.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return int An integer representing the server version.
 * The form of this version number is main_version * 10000 + minor_version * 100 + sub_version (i.e. version 4.1.0 is 40100).
 */
function mysqli_get_server_version(mysqli $mysql): int {}

/**
 * Get result of SHOW WARNINGS
 * @link https://php.net/manual/en/mysqli.get-warnings.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return mysqli_warning|false
 */
function mysqli_get_warnings(mysqli $mysql): mysqli_warning|false {}

/**
 * Initializes MySQLi and returns a resource for use with mysqli_real_connect()
 * @link https://php.net/manual/en/mysqli.init.php
 * @return mysqli|false
 * @see mysqli_real_connect()
 */
function mysqli_init(): mysqli|false {}

/**
 * Retrieves information about the most recently executed query
 * @link https://php.net/manual/en/mysqli.info.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return string|null A character string representing additional information about the most recently executed query.
 */
function mysqli_info(mysqli $mysql): ?string {}

/**
 * Returns the value generated for an AUTO_INCREMENT column by the last query
 * @link https://php.net/manual/en/mysqli.insert-id.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return int|string The value of the AUTO_INCREMENT field that was updated by the previous query. Returns zero if there was no previous query on the connection or if the query did not update an AUTO_INCREMENT value.
 * If the number is greater than the maximum int value, it will be returned as a string.
 */
function mysqli_insert_id(mysqli $mysql): string|int {}

/**
 * Asks the server to kill a MySQL thread
 * @link https://php.net/manual/en/mysqli.kill.php
 * @see mysqli_thread_id()
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @param int $process_id
 * @return bool
 */
function mysqli_kill(mysqli $mysql, int $process_id): bool {}

/**
 * Unsets user defined handler for load local infile command
 * @link https://php.net/manual/en/mysqli.set-local-infile-default.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return void
 * @removed 5.5
 */
function mysqli_set_local_infile_default(mysqli $mysql) {}

/**
 * Set callback function for LOAD DATA LOCAL INFILE command
 * @link https://php.net/manual/en/mysqli.set-local-infile-handler.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @param callable $read_func
 * @return bool
 * @removed 5.5
 */
function mysqli_set_local_infile_handler(mysqli $mysql, callable $read_func): bool {}

/**
 * Check if there are any more query results from a multi query
 * @link https://php.net/manual/en/mysqli.more-results.php
 * @see mysqli_multi_query()
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return bool
 */
function mysqli_more_results(mysqli $mysql): bool {}

/**
 * Performs one or more queries on the database
 * @link https://php.net/manual/en/mysqli.multi-query.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @param string $query A string containing the queries to be executed. Multiple queries must be separated by a semicolon.
 * @return bool Returns FALSE if the first statement failed. To retrieve subsequent errors from other statements you have to call mysqli_next_result() first.
 */
function mysqli_multi_query(
    mysqli $mysql,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.0')] string $query,
    #[PhpStormStubsElementAvailable(from: '7.1', to: '7.4')] string $query = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] string $query
): bool {}

/**
 * Prepare next result from multi_query
 * @link https://php.net/manual/en/mysqli.next-result.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return bool
 */
function mysqli_next_result(mysqli $mysql): bool {}

/**
 * Gets the number of fields in the result set
 * @link https://php.net/manual/en/mysqli-result.field-count.php
 * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
 * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
 * @return int
 */
function mysqli_num_fields(mysqli_result $result): int {}

/**
 * Gets the number of rows in a result
 * @link https://php.net/manual/en/mysqli-result.num-rows.php
 * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
 * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
 * @return string|int Returns number of rows in the result set.
 */
function mysqli_num_rows(mysqli_result $result): string|int {}

/**
 * Set options
 * @link https://php.net/manual/en/mysqli.options.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @param int $option
 * @param string|int $value
 * @return bool
 */
function mysqli_options(mysqli $mysql, int $option, $value): bool {}

/**
 * Pings a server connection, or tries to reconnect if the connection has gone down
 * @link https://php.net/manual/en/mysqli.ping.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return bool
 */
function mysqli_ping(mysqli $mysql): bool {}

/**
 * Poll connections
 * @link https://php.net/manual/en/mysqli.poll.php
 * @param array|null &$read
 * @param array|null &$error
 * @param array &$reject
 * @param int $seconds
 * @param int $microseconds [optional]
 * @return int|false number of ready connections upon success, FALSE otherwise.
 */
function mysqli_poll(?array &$read, ?array &$error, array &$reject, int $seconds, int $microseconds = 0): int|false {}

/**
 * Prepares an SQL statement for execution
 * @link https://php.net/manual/en/mysqli.prepare.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @param string $query The query, as a string. It must consist of a single SQL statement.
 * The SQL statement may contain zero or more parameter markers represented by question mark (?) characters at the appropriate positions.
 * @return mysqli_stmt|false A statement object or FALSE if an error occurred.
 */
function mysqli_prepare(mysqli $mysql, string $query): mysqli_stmt|false {}

/**
 * Enables or disables internal report functions
 * @link https://php.net/manual/en/function.mysqli-report.php
 * @param int $flags <p>
 * <table>
 * Supported flags
 * <tr valign="top">
 * <td>Name</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td><b>MYSQLI_REPORT_OFF</b></td>
 * <td>Turns reporting off</td>
 * </tr>
 * <tr valign="top">
 * <td><b>MYSQLI_REPORT_ERROR</b></td>
 * <td>Report errors from mysqli function calls</td>
 * </tr>
 * <tr valign="top">
 * <td><b>MYSQLI_REPORT_STRICT</b></td>
 * <td>
 * Throw <b>mysqli_sql_exception</b> for errors
 * instead of warnings
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>MYSQLI_REPORT_INDEX</b></td>
 * <td>Report if no index or bad index was used in a query</td>
 * </tr>
 * <tr valign="top">
 * <td><b>MYSQLI_REPORT_ALL</b></td>
 * <td>Set all options (report all)</td>
 * </tr>
 * </table>
 * </p>
 * @return bool
 */
function mysqli_report(int $flags): bool {}

/**
 * Performs a query on the database
 * @link https://php.net/manual/en/mysqli.query.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @param string $query An SQL query
 * @param int $result_mode
 * @return mysqli_result|bool
 * For successful SELECT, SHOW, DESCRIBE or EXPLAIN queries, mysqli_query() will return a mysqli_result object.
 * For other successful queries mysqli_query() will return TRUE.
 * Returns FALSE on failure.
 */
function mysqli_query(
    mysqli $mysql,
    string $query,
    #[PhpStormStubsElementAvailable(from: '7.1')] int $result_mode = MYSQLI_STORE_RESULT
): mysqli_result|bool {}

/**
 * Opens a connection to a mysql server
 * @link https://php.net/manual/en/mysqli.real-connect.php
 * @see mysqli_connect()
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @param string|null $hostname [optional]
 * @param string|null $username [optional]
 * @param string|null $password [optional]
 * @param string|null $database [optional]
 * @param int|null $port [optional]
 * @param string|null $socket [optional]
 * @param int $flags
 * @return bool
 */
function mysqli_real_connect(mysqli $mysql, ?string $hostname, ?string $username, ?string $password, ?string $database, ?int $port, ?string $socket, int $flags = 0): bool {}

/**
 * Escapes special characters in a string for use in an SQL statement, taking into account the current charset of the connection
 * @link https://php.net/manual/en/mysqli.real-escape-string.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @param string $string The string to be escaped. Characters encoded are NUL (ASCII 0), \n, \r, \, ', ", and Control-Z.
 * @return string
 */
function mysqli_real_escape_string(mysqli $mysql, string $string): string {}

/**
 * Execute an SQL query
 * @link https://php.net/manual/en/mysqli.real-query.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @param string $query
 * @return bool
 */
function mysqli_real_query(
    mysqli $mysql,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.0')] string $query,
    #[PhpStormStubsElementAvailable(from: '7.1', to: '7.4')] string $query = null,
    #[PhpStormStubsElementAvailable(from: '8.0')] string $query
): bool {}

/**
 * Get result from async query
 * Available only with mysqlnd.
 * @link https://php.net/manual/en/mysqli.reap-async-query.php
 * @see mysqli_poll()
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return mysqli_result|bool mysqli_result in success, FALSE otherwise.
 */
function mysqli_reap_async_query(mysqli $mysql): mysqli_result|bool {}

/**
 * Removes the named savepoint from the set of savepoints of the current transaction
 * @link https://secure.php.net/manual/en/mysqli.release-savepoint.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @param string $name
 * @return bool Returns TRUE on success or FALSE on failure.
 * @since 5.5
 */
function mysqli_release_savepoint(mysqli $mysql, string $name): bool {}

/**
 * Rolls back current transaction
 * @link https://php.net/manual/en/mysqli.rollback.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @param int $flags [optional] A bitmask of MYSQLI_TRANS_COR_* constants
 * @param string|null $name [optional] If provided then ROLLBACKname is executed
 * @return bool
 */
function mysqli_rollback(mysqli $mysql, int $flags = 0, ?string $name): bool {}

/**
 * Set a named transaction savepoint
 * @link https://secure.php.net/manual/en/mysqli.savepoint.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @param string $name
 * @return bool Returns TRUE on success or FALSE on failure.
 * @since 5.5
 */
function mysqli_savepoint(mysqli $mysql, string $name): bool {}

/**
 * Selects the default database for database queries
 * @link https://php.net/manual/en/mysqli.select-db.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @param string $database
 * @return bool
 */
function mysqli_select_db(mysqli $mysql, string $database): bool {}

/**
 * Sets the client character set
 * @link https://php.net/manual/en/mysqli.set-charset.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @param string $charset
 * @return bool
 */
function mysqli_set_charset(mysqli $mysql, string $charset): bool {}

/**
 * Returns the total number of rows changed, deleted, inserted, or matched by the last statement executed
 * @link https://php.net/manual/en/mysqli-stmt.affected-rows.php
 * @param mysqli_stmt $statement
 * @return int|string If the number of affected rows is greater than maximum PHP int value, the number of affected rows will be returned as a string value.
 */
function mysqli_stmt_affected_rows(mysqli_stmt $statement): string|int {}

/**
 * Used to get the current value of a statement attribute
 * @link https://php.net/manual/en/mysqli-stmt.attr-get.php
 * @param mysqli_stmt $statement
 * @param int $attribute
 * @return int|false Returns FALSE if the attribute is not found, otherwise returns the value of the attribute.
 */
#[LanguageLevelTypeAware(["8.0" => "int"], default: "int|false")]
function mysqli_stmt_attr_get(mysqli_stmt $statement, int $attribute): false|int {}

/**
 * Used to modify the behavior of a prepared statement
 * @link https://php.net/manual/en/mysqli-stmt.attr-set.php
 * @param mysqli_stmt $statement
 * @param int $attribute
 * @param int $value
 * @return bool
 */
function mysqli_stmt_attr_set(mysqli_stmt $statement, int $attribute, int $value): bool {}

/**
 * Returns the number of fields in the given statement
 * @link https://php.net/manual/en/mysqli-stmt.field-count.php
 * @param mysqli_stmt $statement
 * @return int
 */
function mysqli_stmt_field_count(mysqli_stmt $statement): int {}

/**
 * Initializes a statement and returns an object for use with mysqli_stmt_prepare
 * @link https://php.net/manual/en/mysqli.stmt-init.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return mysqli_stmt|false
 */
function mysqli_stmt_init(mysqli $mysql): mysqli_stmt|false {}

/**
 * Prepares an SQL statement for execution
 * @link https://php.net/manual/en/mysqli-stmt.prepare.php
 * @param mysqli_stmt $statement
 * @param string $query
 * @return bool
 */
function mysqli_stmt_prepare(mysqli_stmt $statement, string $query): bool {}

/**
 * Returns result set metadata from a prepared statement
 * @link https://php.net/manual/en/mysqli-stmt.result-metadata.php
 * @param mysqli_stmt $statement
 * @return mysqli_result|false Returns a result object or FALSE if an error occurred
 */
function mysqli_stmt_result_metadata(mysqli_stmt $statement): mysqli_result|false {}

/**
 * Send data in blocks
 * @link https://php.net/manual/en/mysqli-stmt.send-long-data.php
 * @param mysqli_stmt $statement
 * @param int $param_num
 * @param string $data
 * @return bool
 */
function mysqli_stmt_send_long_data(mysqli_stmt $statement, int $param_num, string $data): bool {}

/**
 * Binds variables to a prepared statement as parameters
 * @link https://php.net/manual/en/mysqli-stmt.bind-param.php
 * @param mysqli_stmt $statement A statement identifier returned by mysqli_stmt_init()
 * @param string $types <p>
 * A string that contains one or more characters which specify the types
 * for the corresponding bind variables:
 * <table>
 * Type specification chars
 * <tr valign="top">
 * <td>Character</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>i</td>
 * <td>corresponding variable has type integer</td>
 * </tr>
 * <tr valign="top">
 * <td>d</td>
 * <td>corresponding variable has type double</td>
 * </tr>
 * <tr valign="top">
 * <td>s</td>
 * <td>corresponding variable has type string</td>
 * </tr>
 * <tr valign="top">
 * <td>b</td>
 * <td>corresponding variable is a blob and will be sent in packets</td>
 * </tr>
 * </table>
 * </p>
 * @param mixed &$var1 <p>
 * The number of variables and length of string
 * types must match the parameters in the statement.
 * </p>
 * @param mixed &...$vars
 * @return bool true on success or false on failure.
 */
function mysqli_stmt_bind_param(
    mysqli_stmt $statement,
    string $types,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] mixed &$vars,
    mixed &...$vars
): bool {}

/**
 * Binds variables to a prepared statement for result storage
 * @link https://php.net/manual/en/mysqli-stmt.bind-result.php
 * @param mysqli_stmt $statement Statement
 * @param mixed &...$vars The variables to be bound.
 * @return bool
 */
function mysqli_stmt_bind_result(
    mysqli_stmt $statement,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] mixed &$vars,
    mixed &...$vars
): bool {}

/**
 * Fetch results from a prepared statement into the bound variables
 * @link https://php.net/manual/en/mysqli-stmt.fetch.php
 * @param mysqli_stmt $statement
 * @return bool|null
 */
function mysqli_stmt_fetch(mysqli_stmt $statement): ?bool {}

/**
 * Frees stored result memory for the given statement handle
 * @link https://php.net/manual/en/mysqli-stmt.free-result.php
 * @param mysqli_stmt $statement
 * @return void
 */
function mysqli_stmt_free_result(mysqli_stmt $statement): void {}

/**
 * Gets a result set from a prepared statement as a mysqli_result object
 * @link https://php.net/manual/en/mysqli-stmt.get-result.php
 * @param mysqli_stmt $statement
 * @return mysqli_result|false Returns false on failure. For successful queries which produce a result set,
 * such as SELECT, SHOW, DESCRIBE or EXPLAIN, mysqli_stmt_get_result() will return a mysqli_result object.
 * For other successful queries, mysqli_stmt_get_result() will return false.
 */
function mysqli_stmt_get_result(mysqli_stmt $statement): mysqli_result|false {}

/**
 * Get result of SHOW WARNINGS
 * @link https://php.net/manual/en/mysqli-stmt.get-warnings.php
 * @param mysqli_stmt $statement
 * @return mysqli_warning|false (not documented, but it's probably a mysqli_warning object)
 */
function mysqli_stmt_get_warnings(mysqli_stmt $statement): mysqli_warning|false {}

/**
 * Get the ID generated from the previous INSERT operation
 * @link https://php.net/manual/en/mysqli-stmt.insert-id.php
 * @param mysqli_stmt $statement
 * @return string|int
 */
function mysqli_stmt_insert_id(mysqli_stmt $statement): string|int {}

/**
 * Resets a prepared statement
 * @link https://php.net/manual/en/mysqli-stmt.reset.php
 * @param mysqli_stmt $statement
 * @return bool
 */
function mysqli_stmt_reset(mysqli_stmt $statement): bool {}

/**
 * Returns the number of parameter for the given statement
 * @link https://php.net/manual/en/mysqli-stmt.param-count.php
 * @param mysqli_stmt $statement
 * @return int
 */
function mysqli_stmt_param_count(mysqli_stmt $statement): int {}

/**
 * Returns the SQLSTATE error from previous MySQL operation
 * @link https://php.net/manual/en/mysqli.sqlstate.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return string Returns a string containing the SQLSTATE error code for the last error. The error code consists of five characters. '00000' means no error.
 */
function mysqli_sqlstate(mysqli $mysql): string {}

/**
 * Gets the current system status
 * @link https://php.net/manual/en/mysqli.stat.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return string|false A string describing the server status. FALSE if an error occurred.
 */
function mysqli_stat(mysqli $mysql): string|false {}

/**
 * Used for establishing secure connections using SSL
 * @link https://secure.php.net/manual/en/mysqli.ssl-set.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @param string|null $key The path name to the key file
 * @param string|null $certificate The path name to the certificate file
 * @param string|null $ca_certificate The path name to the certificate authority file
 * @param string|null $ca_path The pathname to a directory that contains trusted SSL CA certificates in PEM format
 * @param string|null $cipher_algos A list of allowable ciphers to use for SSL encryption
 * @return bool This function always returns TRUE value.
 */
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
function mysqli_ssl_set(
    mysqli $mysql,
    #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: 'string')] $key,
    #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: 'string')] $certificate,
    #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: 'string')] $ca_certificate,
    #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: 'string')] $ca_path,
    #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: 'string')] $cipher_algos
): bool {}

/**
 * Closes a prepared statement
 * @link https://php.net/manual/en/mysqli-stmt.close.php
 * @param mysqli_stmt $statement
 * @return bool
 */
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
function mysqli_stmt_close(mysqli_stmt $statement): bool {}

/**
 * Seeks to an arbitrary row in statement result set
 * @link https://php.net/manual/en/mysqli-stmt.data-seek.php
 * @param mysqli_stmt $statement
 * @param int $offset
 * @return void
 */
function mysqli_stmt_data_seek(mysqli_stmt $statement, int $offset): void {}

/**
 * Returns the error code for the most recent statement call
 * @link https://php.net/manual/en/mysqli-stmt.errno.php
 * @param mysqli_stmt $statement
 * @return int
 */
function mysqli_stmt_errno(mysqli_stmt $statement): int {}

/**
 * Returns a string description for last statement error
 * @link https://php.net/manual/en/mysqli-stmt.error.php
 * @param mysqli_stmt $statement
 * @return string
 */
function mysqli_stmt_error(mysqli_stmt $statement): string {}

/**
 * Check if there are more query results from a multiple query
 * @link https://php.net/manual/en/mysqli-stmt.more-results.php
 * @param mysqli_stmt $statement
 * @return bool
 */
function mysqli_stmt_more_results(mysqli_stmt $statement): bool {}

/**
 * Reads the next result from a multiple query
 * @link https://php.net/manual/en/mysqli-stmt.next-result.php
 * @param mysqli_stmt $statement
 * @return bool
 */
function mysqli_stmt_next_result(mysqli_stmt $statement): bool {}

/**
 * Return the number of rows in statements result set
 * @link https://php.net/manual/en/mysqli-stmt.num-rows.php
 * @param mysqli_stmt $statement
 * @return string|int
 */
function mysqli_stmt_num_rows(mysqli_stmt $statement): string|int {}

/**
 * Returns SQLSTATE error from previous statement operation
 * @link https://php.net/manual/en/mysqli-stmt.sqlstate.php
 * @param mysqli_stmt $statement
 * @return string Returns a string containing the SQLSTATE error code for the last error. The error code consists of five characters. '00000' means no error.
 */
function mysqli_stmt_sqlstate(mysqli_stmt $statement): string {}

/**
 * Transfers a result set from a prepared statement
 * @link https://php.net/manual/en/mysqli-stmt.store-result.php
 * @param mysqli_stmt $statement
 * @return bool
 */
function mysqli_stmt_store_result(mysqli_stmt $statement): bool {}

/**
 * Transfers a result set from the last query
 * @link https://php.net/manual/en/mysqli.store-result.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @param int $mode [optional] The option that you want to set
 * @return mysqli_result|false
 */
function mysqli_store_result(mysqli $mysql, int $mode = 0): mysqli_result|false {}

/**
 * Returns the thread ID for the current connection
 * @link https://php.net/manual/en/mysqli.thread-id.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return int Returns the Thread ID for the current connection.
 */
function mysqli_thread_id(mysqli $mysql): int {}

/**
 * Returns whether thread safety is given or not
 * @link https://php.net/manual/en/mysqli.thread-safe.php
 * @return bool
 */
function mysqli_thread_safe(): bool {}

/**
 * Initiate a result set retrieval
 * @link https://php.net/manual/en/mysqli.use-result.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return mysqli_result|false
 */
function mysqli_use_result(mysqli $mysql): mysqli_result|false {}

/**
 * Returns the number of warnings from the last query for the given link
 * @link https://php.net/manual/en/mysqli.warning-count.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return int
 */
function mysqli_warning_count(mysqli $mysql): int {}

/**
 * Flushes tables or caches, or resets the replication server information
 * @link https://php.net/manual/en/mysqli.refresh.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @param int $flags
 * @return bool
 */
function mysqli_refresh(mysqli $mysql, int $flags): bool {}

/**
 * Alias for <b>mysqli_stmt_bind_param</b>
 * @link https://php.net/manual/en/function.mysqli-bind-param.php
 * @param mysqli_stmt $statement
 * @param string $types
 * @removed 5.4
 */
#[Deprecated(since: '5.3')]
function mysqli_bind_param(mysqli_stmt $statement, string $types) {}

/**
 * Alias for <b>mysqli_stmt_bind_result</b>
 * @link https://php.net/manual/en/function.mysqli-bind-result.php
 * @param mysqli_stmt $statement
 * @param string $types
 * @param mixed &$var1
 * @removed 5.4
 */
#[Deprecated(since: '5.3')]
function mysqli_bind_result(mysqli_stmt $statement, string $types, mixed &$var1) {}

/**
 * Alias of <b>mysqli_character_set_name</b>
 * @link https://php.net/manual/en/function.mysqli-client-encoding.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @return string
 * @removed 5.4
 */
#[Deprecated(since: '5.3')]
function mysqli_client_encoding(mysqli $mysql): string {}

/**
 * Alias of <b>mysqli_real_escape_string</b>
 * @link https://php.net/manual/en/function.mysqli-escape-string.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @param string $string The string to be escaped
 * @return string
 */
function mysqli_escape_string(
    mysqli $mysql,
    string $string,
    #[PhpStormStubsElementAvailable(from: '7.1', to: '7.4')] $resultmode = null
): string {}

/**
 * Alias for <b>mysqli_stmt_fetch</b>
 * @link https://php.net/manual/en/function.mysqli-fetch.php
 * @param mysqli_stmt $statement
 * @return bool
 * @removed 5.4
 */
#[Deprecated(since: '5.3')]
function mysqli_fetch(mysqli_stmt $statement): bool {}

/**
 * Alias for <b>mysqli_stmt_param_count</b>
 * @link https://php.net/manual/en/function.mysqli-param-count.php
 * @param mysqli_stmt $statement
 * @return int
 * @removed 5.4
 */
#[Deprecated(since: '5.3')]
function mysqli_param_count(mysqli_stmt $statement): int {}

/**
 * Alias for <b>mysqli_stmt_result_metadata</b>
 * @link https://php.net/manual/en/function.mysqli-get-metadata.php
 * @param mysqli_stmt $statement
 * @return mysqli_result|false Returns a result object or FALSE if an error occurred
 * @removed 5.4
 */
#[Deprecated(since: '5.3')]
function mysqli_get_metadata(mysqli_stmt $statement): false|mysqli_result {}

/**
 * Alias for <b>mysqli_stmt_send_long_data</b>
 * @link https://php.net/manual/en/function.mysqli-send-long-data.php
 * @param mysqli_stmt $statement
 * @param int $param_num
 * @param string $data
 * @return bool
 * @removed 5.4
 */
#[Deprecated(since: '5.3')]
function mysqli_send_long_data(mysqli_stmt $statement, int $param_num, string $data): bool {}

/**
 * Alias of <b>mysqli_options</b>
 * @link https://php.net/manual/en/function.mysqli-set-opt.php
 * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
 * @param int $option
 * @param string|int $value
 * @return bool
 */
function mysqli_set_opt(
    #[PhpStormStubsElementAvailable(from: '8.0')] mysqli $mysql,
    #[PhpStormStubsElementAvailable(from: '8.0')] int $option,
    #[PhpStormStubsElementAvailable(from: '8.0')] $value
): bool {}

/**
 * <p>
 * Read options from the named group from my.cnf
 * or the file specified with <b>MYSQLI_READ_DEFAULT_FILE</b>
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_READ_DEFAULT_GROUP', 5);

/**
 * <p>
 * Read options from the named option file instead of from my.cnf
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_READ_DEFAULT_FILE', 4);

/**
 * <p>
 * Connect timeout in seconds
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_OPT_CONNECT_TIMEOUT', 0);

/**
 * <p>
 * Enables command LOAD LOCAL INFILE
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_OPT_LOCAL_INFILE', 8);

/**
 * <p>
 * RSA public key file used with the SHA-256 based authentication.
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_SERVER_PUBLIC_KEY', 35);

/**
 * <p>
 * Command to execute when connecting to MySQL server. Will automatically be re-executed when reconnecting.
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_INIT_COMMAND', 3);
define('MYSQLI_OPT_NET_CMD_BUFFER_SIZE', 202);
define('MYSQLI_OPT_NET_READ_BUFFER_SIZE', 203);
define('MYSQLI_OPT_INT_AND_FLOAT_NATIVE', 201);

/**
 * <p>
 * Use SSL (encrypted protocol). This option should not be set by application programs;
 * it is set internally in the MySQL client library
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_CLIENT_SSL', 2048);

/**
 * <p>
 * Use compression protocol
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_CLIENT_COMPRESS', 32);

/**
 * <p>
 * Allow interactive_timeout seconds
 * (instead of wait_timeout seconds) of inactivity before
 * closing the connection. The client's session
 * wait_timeout variable will be set to
 * the value of the session interactive_timeout variable.
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_CLIENT_INTERACTIVE', 1024);

/**
 * <p>
 * Allow spaces after function names. Makes all functions names reserved words.
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_CLIENT_IGNORE_SPACE', 256);

/**
 * <p>
 * Don't allow the db_name.tbl_name.col_name syntax.
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_CLIENT_NO_SCHEMA', 16);
define('MYSQLI_CLIENT_FOUND_ROWS', 2);

/**
 * <p>
 * For using buffered resultsets
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_STORE_RESULT', 0);

/**
 * <p>
 * For using unbuffered resultsets
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_USE_RESULT', 1);
define('MYSQLI_ASYNC', 8);

/**
 * <p>
 * Columns are returned into the array having the fieldname as the array index.
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_ASSOC', 1);

/**
 * <p>
 * Columns are returned into the array having an enumerated index.
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_NUM', 2);

/**
 * <p>
 * Columns are returned into the array having both a numerical index and the fieldname as the associative index.
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_BOTH', 3);

/**
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH', 0);

/**
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_STMT_ATTR_CURSOR_TYPE', 1);

/**
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_CURSOR_TYPE_NO_CURSOR', 0);

/**
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_CURSOR_TYPE_READ_ONLY', 1);

/**
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_CURSOR_TYPE_FOR_UPDATE', 2);

/**
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_CURSOR_TYPE_SCROLLABLE', 4);

/**
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_STMT_ATTR_PREFETCH_ROWS', 2);

/**
 * <p>
 * Indicates that a field is defined as NOT NULL
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_NOT_NULL_FLAG', 1);

/**
 * <p>
 * Field is part of a primary index
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_PRI_KEY_FLAG', 2);

/**
 * <p>
 * Field is part of a unique index.
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_UNIQUE_KEY_FLAG', 4);

/**
 * <p>
 * Field is part of an index.
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_MULTIPLE_KEY_FLAG', 8);

/**
 * <p>
 * Field is defined as BLOB
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_BLOB_FLAG', 16);

/**
 * <p>
 * Field is defined as UNSIGNED
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_UNSIGNED_FLAG', 32);

/**
 * <p>
 * Field is defined as ZEROFILL
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_ZEROFILL_FLAG', 64);

/**
 * <p>
 * Field is defined as AUTO_INCREMENT
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_AUTO_INCREMENT_FLAG', 512);

/**
 * <p>
 * Field is defined as TIMESTAMP
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TIMESTAMP_FLAG', 1024);

/**
 * <p>
 * Field is defined as SET
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_SET_FLAG', 2048);

/**
 * <p>
 * Field is defined as NUMERIC
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_NUM_FLAG', 32768);

/**
 * <p>
 * Field is part of an multi-index
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_PART_KEY_FLAG', 16384);

/**
 * <p>
 * Field is part of GROUP BY
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_GROUP_FLAG', 32768);

/**
 * <p>
 * Field is defined as ENUM. Available since PHP 5.3.0.
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_ENUM_FLAG', 256);
define('MYSQLI_BINARY_FLAG', 128);
define('MYSQLI_NO_DEFAULT_VALUE_FLAG', 4096);
define('MYSQLI_ON_UPDATE_NOW_FLAG', 8192);

define('MYSQLI_TRANS_START_READ_ONLY', 4);
define('MYSQLI_TRANS_START_READ_WRITE', 2);
define('MYSQLI_TRANS_START_WITH_CONSISTENT_SNAPSHOT', 1);
/**
 * <p>
 * Field is defined as DECIMAL
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_DECIMAL', 0);

/**
 * <p>
 * Field is defined as TINYINT
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_TINY', 1);

/**
 * <p>
 * Field is defined as SMALLINT
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_SHORT', 2);

/**
 * <p>
 * Field is defined as INT
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_LONG', 3);

/**
 * <p>
 * Field is defined as FLOAT
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_FLOAT', 4);

/**
 * <p>
 * Field is defined as DOUBLE
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_DOUBLE', 5);

/**
 * <p>
 * Field is defined as DEFAULT NULL
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_NULL', 6);

/**
 * <p>
 * Field is defined as TIMESTAMP
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_TIMESTAMP', 7);

/**
 * <p>
 * Field is defined as BIGINT
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_LONGLONG', 8);

/**
 * <p>
 * Field is defined as MEDIUMINT
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_INT24', 9);

/**
 * <p>
 * Field is defined as DATE
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_DATE', 10);

/**
 * <p>
 * Field is defined as TIME
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_TIME', 11);

/**
 * <p>
 * Field is defined as DATETIME
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_DATETIME', 12);

/**
 * <p>
 * Field is defined as YEAR
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_YEAR', 13);

/**
 * <p>
 * Field is defined as DATE
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_NEWDATE', 14);

/**
 * <p>
 * Field is defined as ENUM
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_ENUM', 247);

/**
 * <p>
 * Field is defined as SET
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_SET', 248);

/**
 * <p>
 * Field is defined as TINYBLOB
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_TINY_BLOB', 249);

/**
 * <p>
 * Field is defined as MEDIUMBLOB
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_MEDIUM_BLOB', 250);

/**
 * <p>
 * Field is defined as LONGBLOB
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_LONG_BLOB', 251);

/**
 * <p>
 * Field is defined as BLOB
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_BLOB', 252);

/**
 * <p>
 * Field is defined as VARCHAR
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_VAR_STRING', 253);

/**
 * <p>
 * Field is defined as STRING
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_STRING', 254);

/**
 * <p>
 * Field is defined as CHAR
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_CHAR', 1);

/**
 * <p>
 * Field is defined as INTERVAL
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_INTERVAL', 247);

/**
 * <p>
 * Field is defined as GEOMETRY
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_GEOMETRY', 255);

/**
 * <p>
 * Precision math DECIMAL or NUMERIC field (MySQL 5.0.3 and up)
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_NEWDECIMAL', 246);

/**
 * <p>
 * Field is defined as BIT (MySQL 5.0.3 and up)
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_TYPE_BIT', 16);

/**
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_SET_CHARSET_NAME', 7);

/**
 * <p>
 * No more data available for bind variable
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_NO_DATA', 100);

/**
 * <p>
 * Data truncation occurred. Available since PHP 5.1.0 and MySQL 5.0.5.
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_DATA_TRUNCATED', 101);

/**
 * <p>
 * Report if no index or bad index was used in a query.
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_REPORT_INDEX', 4);

/**
 * <p>
 * Report errors from mysqli function calls.
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_REPORT_ERROR', 1);

/**
 * <p>
 * Throw a mysqli_sql_exception for errors instead of warnings.
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_REPORT_STRICT', 2);

/**
 * <p>
 * Set all options on (report all).
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_REPORT_ALL', 255);

/**
 * <p>
 * Turns reporting off.
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_REPORT_OFF', 0);

/**
 * <p>
 * Is set to 1 if <b>mysqli_debug</b> functionality is enabled.
 * </p>
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_DEBUG_TRACE_ENABLED', 0);

/**
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_SERVER_QUERY_NO_GOOD_INDEX_USED', 16);

/**
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_SERVER_QUERY_NO_INDEX_USED', 32);

/**
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_REFRESH_GRANT', 1);

/**
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_REFRESH_LOG', 2);

/**
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_REFRESH_TABLES', 4);

/**
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_REFRESH_HOSTS', 8);

/**
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_REFRESH_STATUS', 16);

/**
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_REFRESH_THREADS', 32);

/**
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_REFRESH_SLAVE', 64);

/**
 * @link https://php.net/manual/en/mysqli.constants.php
 */
define('MYSQLI_REFRESH_MASTER', 128);

define('MYSQLI_SERVER_QUERY_WAS_SLOW', 2048);
define('MYSQLI_REFRESH_BACKUP_LOG', 2097152);

// End of mysqli v.0.1

/** @link https://php.net/manual/en/mysqli.constants.php */
define('MYSQLI_OPT_SSL_VERIFY_SERVER_CERT', 21);
/** @link https://php.net/manual/en/mysqli.constants.php */
define('MYSQLI_SET_CHARSET_DIR', 6);
/** @link https://php.net/manual/en/mysqli.constants.php */
define('MYSQLI_SERVER_PS_OUT_PARAMS', 4096);

define('MYSQLI_CLIENT_SSL_VERIFY_SERVER_CERT', 1073741824);

define('MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT', 64);
define('MYSQLI_CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS', 4194304);
define('MYSQLI_OPT_CAN_HANDLE_EXPIRED_PASSWORDS', 37);
define('MYSQLI_OPT_READ_TIMEOUT', 11);
define('MYSQLI_STORE_RESULT_COPY_DATA', 16);
define('MYSQLI_TYPE_JSON', 245);
define('MYSQLI_TRANS_COR_AND_CHAIN', 1);
define('MYSQLI_TRANS_COR_AND_NO_CHAIN', 2);
define('MYSQLI_TRANS_COR_RELEASE', 4);
define('MYSQLI_TRANS_COR_NO_RELEASE', 8);
define('MYSQLI_OPT_LOAD_DATA_LOCAL_DIR', 43);
define('MYSQLI_REFRESH_REPLICA', 64);
/**
 * @since 8.1
 */
define('MYSQLI_IS_MARIADB', 0);
<?php

/**
 * @see https://github.com/libgeos/php-geos/blob/master/tests/000_General.phpt
 */
define('GEOSBUF_CAP_ROUND', 1);

define('GEOSBUF_CAP_FLAT', 2);

define('GEOSBUF_CAP_SQUARE', 3);

define('GEOSBUF_JOIN_ROUND', 1);

define('GEOSBUF_JOIN_MITRE', 2);

define('GEOSBUF_JOIN_BEVEL', 3);

define('GEOS_POINT', 0);

define('GEOS_LINESTRING', 1);

define('GEOS_LINEARRING', 2);

define('GEOS_POLYGON', 3);

define('GEOS_MULTIPOINT', 4);

define('GEOS_MULTILINESTRING', 5);

define('GEOS_MULTIPOLYGON', 6);

define('GEOS_GEOMETRYCOLLECTION', 7);

define('GEOSVALID_ALLOW_SELFTOUCHING_RING_FORMING_HOLE', 1);

define('GEOSRELATE_BNR_MOD2', 1);

define('GEOSRELATE_BNR_OGC', 1);

define('GEOSRELATE_BNR_ENDPOINT', 2);

define('GEOSRELATE_BNR_MULTIVALENT_ENDPOINT', 3);

define('GEOSRELATE_BNR_MONOVALENT_ENDPOINT', 4);

/**
 * @return string
 */
function GEOSVersion(): string {}

/**
 * @param GEOSGeometry $geom1
 * @param GEOSGeometry $geom2
 * @return GEOSGeometry
 * @throws Exception
 */
function GEOSSharedPaths(GEOSGeometry $geom1, GEOSGeometry $geom2): GEOSGeometry {}

/**
 * @param GEOSGeometry $geom
 * @return array
 * @throws Exception
 */
function GEOSLineMerge(GEOSGeometry $geom): array {}

/**
 * @param string $matrix
 * @param string $pattern
 * @return bool
 * @throws Exception
 */
function GEOSRelateMatch(string $matrix, string $pattern): bool {}

/**
 * @param GEOSGeometry $geom
 * @return array
 *    - 'rings'
 *        Type: array of GEOSGeometry
 *        Rings that can be formed by the costituent
 *        linework of geometry.
 *    - 'cut_edges' (optional)
 *        Type: array of GEOSGeometry
 *        Edges which are connected at both ends but
 *        which do not form part of polygon.
 *    - 'dangles'
 *        Type: array of GEOSGeometry
 *        Edges which have one or both ends which are
 *        not incident on another edge endpoint
 *    - 'invalid_rings'
 *        Type: array of GEOSGeometry
 *        Edges which form rings which are invalid
 *        (e.g. the component lines contain a self-intersection)
 * @throws Exception
 */
function GEOSPolygonize(GEOSGeometry $geom): array {}

/**
 * Class GEOSWKTReader
 * @see https://github.com/libgeos/php-geos/blob/master/tests/003_WKTReader.phpt
 */
class GEOSWKTReader
{
    /**
     * GEOSWKTReader constructor.
     */
    public function __construct() {}

    /**
     * @param string $wkt
     * @return GEOSGeometry
     * @throws Exception
     */
    public function read(string $wkt): GEOSGeometry {}
}

/**
 * Class GEOSWKTWriter
 * @see https://github.com/libgeos/php-geos/blob/master/tests/002_WKTWriter.phpt
 */
class GEOSWKTWriter
{
    /**
     * GEOSWKTWriter constructor.
     */
    public function __construct() {}

    /**
     * @param GEOSGeometry $geom
     * @return string
     * @throws Exception
     */
    public function write(GEOSGeometry $geom): string {}

    /**
     * @param bool $trim
     */
    public function setTrim(bool $trim): void {}

    /**
     * @param int $precision
     */
    public function setRoundingPrecision(int $precision): void {}

    /**
     * @param int $dimension
     * @throws Exception
     */
    public function setOutputDimension(int $dimension): void {}

    /**
     * @return int
     */
    public function getOutputDimension(): int {}

    /**
     * @param bool $old3d
     */
    public function setOld3D(bool $old3d): void {}
}

/**
 * Class GEOSGeometry
 * @see https://github.com/libgeos/php-geos/blob/master/tests/001_Geometry.phpt
 */
class GEOSGeometry
{
    /**
     * GEOSGeometry constructor.
     */
    public function __construct() {}

    /**
     * @return string
     * @throws Exception
     */
    public function __toString(): string {}

    /**
     * @param GEOSGeometry $geom
     * @return GEOSGeometry
     * @throws Exception
     */
    public function project(GEOSGeometry $geom): GEOSGeometry {}

    /**
     * @param float $distance
     * @param bool $normalized
     * @return GEOSGeometry
     * @throws Exception
     */
    public function interpolate(float $distance, bool $normalized = false): GEOSGeometry {}

    /**
     * @param float $distance
     * @param array $styleArray
     *    Keys supported:
     *    'quad_segs'
     *         Type: int
     *         Number of segments used to approximate
     *         a quarter circle (defaults to 8).
     *    'endcap'
     *         Type: long
     *         Endcap style (defaults to GEOSBUF_CAP_ROUND)
     *    'join'
     *         Type: long
     *         Join style (defaults to GEOSBUF_JOIN_ROUND)
     *    'mitre_limit'
     *         Type: double
     *         mitre ratio limit (only affects joins with GEOSBUF_JOIN_MITRE style)
     *         'miter_limit' is also accepted as a synonym for 'mitre_limit'.
     *    'single_sided'
     *         Type: bool
     *         If true buffer lines only on one side, so that the input line
     *         will be a portion of the boundary of the returned polygon.
     *         Only applies to lineal input. Defaults to false.
     * @return GEOSGeometry
     * @throws Exception
     */
    public function buffer(float $distance, array $styleArray = [
        'quad_segs' => 8,
        'endcap' => GEOSBUF_CAP_ROUND,
        'join' => GEOSBUF_JOIN_ROUND,
        'mitre_limit' => 5.0,
        'single_sided' => false
    ]): GEOSGeometry {}

    /**
     * @param float $distance
     * @param array $styleArray
     *    Keys supported:
     *    'quad_segs'
     *         Type: int
     *         Number of segments used to approximate
     *         a quarter circle (defaults to 8).
     *    'join'
     *         Type: long
     *         Join style (defaults to GEOSBUF_JOIN_ROUND)
     *    'mitre_limit'
     *         Type: double
     *         mitre ratio limit (only affects joins with GEOSBUF_JOIN_MITRE style)
     *         'miter_limit' is also accepted as a synonym for 'mitre_limit'.
     * @return GEOSGeometry
     * @throws Exception
     */
    public function offsetCurve(float $distance, array $styleArray = [
        'quad_segs' => 8,
        'join' => GEOSBUF_JOIN_ROUND,
        'mitre_limit' => 5.0
    ]): GEOSGeometry {}

    /**
     * @return GEOSGeometry
     * @throws Exception
     */
    public function envelope(): GEOSGeometry {}

    /**
     * @param GEOSGeometry $geom
     * @return GEOSGeometry
     * @throws Exception
     */
    public function intersection(GEOSGeometry $geom): GEOSGeometry {}

    /**
     * @return GEOSGeometry
     * @throws Exception
     */
    public function convexHull(): GEOSGeometry {}

    /**
     * @param GEOSGeometry $geom
     * @return GEOSGeometry
     * @throws Exception
     */
    public function difference(GEOSGeometry $geom): GEOSGeometry {}

    /**
     * @param GEOSGeometry $geom
     * @return GEOSGeometry
     * @throws Exception
     */
    public function symDifference(GEOSGeometry $geom): GEOSGeometry {}

    /**
     * @return GEOSGeometry
     * @throws Exception
     */
    public function boundary(): GEOSGeometry {}

    /**
     * @param GEOSGeometry|null $geom
     * @return GEOSGeometry
     * @throws Exception
     */
    public function union(GEOSGeometry $geom = null): GEOSGeometry {}

    /**
     * @return GEOSGeometry
     * @throws Exception
     */
    public function pointOnSurface(): GEOSGeometry {}

    /**
     * @return GEOSGeometry
     * @throws Exception
     */
    public function centroid(): GEOSGeometry {}

    /**
     * @param GEOSGeometry $geom
     * @param string|null $pattern
     * @return bool|string
     * @throws Exception
     */
    public function relate(GEOSGeometry $geom, string $pattern = null) {}

    /**
     * @param GEOSGeometry $geom
     * @param int $rule
     * @return string
     * @throws Exception
     */
    public function relateBoundaryNodeRule(GEOSGeometry $geom, int $rule = GEOSRELATE_BNR_OGC): string {}

    /**
     * @param float $tolerance
     * @param bool $preserveTopology
     * @return GEOSGeometry
     * @throws Exception
     */
    public function simplify(float $tolerance, bool $preserveTopology = false): GEOSGeometry {}

    /**
     * @return GEOSGeometry
     * @throws Exception
     */
    public function normalize(): GEOSGeometry {}

    /**
     * @param float $gridSize
     * @param int $flags
     * @return GEOSGeometry
     * @throws Exception
     */
    public function setPrecision(float $gridSize, int $flags = 0): GEOSGeometry {}

    /**
     * @return float
     */
    public function getPrecision(): float {}

    /**
     * @return GEOSGeometry
     * @throws Exception
     */
    public function extractUniquePoints(): GEOSGeometry {}

    /**
     * @param GEOSGeometry $geom
     * @return bool
     * @throws Exception
     */
    public function disjoint(GEOSGeometry $geom): bool {}

    /**
     * @param GEOSGeometry $geom
     * @return bool
     * @throws Exception
     */
    public function touches(GEOSGeometry $geom): bool {}

    /**
     * @param GEOSGeometry $geom
     * @return bool
     * @throws Exception
     */
    public function intersects(GEOSGeometry $geom): bool {}

    /**
     * @param GEOSGeometry $geom
     * @return bool
     * @throws Exception
     */
    public function crosses(GEOSGeometry $geom): bool {}

    /**
     * @param GEOSGeometry $geom
     * @return bool
     * @throws Exception
     */
    public function within(GEOSGeometry $geom): bool {}

    /**
     * @param GEOSGeometry $geom
     * @return bool
     * @throws Exception
     */
    public function contains(GEOSGeometry $geom): bool {}

    /**
     * @param GEOSGeometry $geom
     * @return bool
     * @throws Exception
     */
    public function overlaps(GEOSGeometry $geom): bool {}

    /**
     * @param GEOSGeometry $geom
     * @return bool
     * @throws Exception
     */
    public function covers(GEOSGeometry $geom): bool {}

    /**
     * @param GEOSGeometry $geom
     * @return bool
     * @throws Exception
     */
    public function coveredBy(GEOSGeometry $geom): bool {}

    /**
     * @param GEOSGeometry $geom
     * @return bool
     * @throws Exception
     */
    public function equals(GEOSGeometry $geom): bool {}

    /**
     * @param GEOSGeometry $geom
     * @param float $tolerance
     * @return bool
     * @throws Exception
     */
    public function equalsExact(GEOSGeometry $geom, float $tolerance = 0): bool {}

    /**
     * @return bool
     * @throws Exception
     */
    public function isEmpty(): bool {}

    /**
     * @return array
     * @throws Exception
     */
    public function checkValidity(): array {}

    /**
     * @return bool
     * @throws Exception
     */
    public function isSimple(): bool {}

    /**
     * @return bool
     * @throws Exception
     */
    public function isRing(): bool {}

    /**
     * @return bool
     * @throws Exception
     */
    public function hasZ(): bool {}

    /**
     * @return bool
     * @throws Exception
     */
    public function isClosed(): bool {}

    /**
     * @return string
     * @throws Exception
     */
    public function typeName(): string {}

    /**
     * @return int
     * @throws Exception
     */
    public function typeId(): int {}

    /**
     * @return int
     */
    public function getSRID(): int {}

    /**
     * @param int $srid
     * @throws Exception
     */
    public function setSRID(int $srid): void {}

    /**
     * @return int
     * @throws Exception
     */
    public function numGeometries(): int {}

    /**
     * @param int $n
     * @return GEOSGeometry
     * @throws Exception
     */
    public function geometryN(int $n): GEOSGeometry {}

    /**
     * @return int
     * @throws Exception
     */
    public function numInteriorRings(): int {}

    /**
     * @return int
     * @throws Exception
     */
    public function numPoints(): int {}

    /**
     * @return float
     * @throws Exception
     */
    public function getX(): float {}

    /**
     * @return float
     * @throws Exception
     */
    public function getY(): float {}

    /**
     * @param int $n
     * @return GEOSGeometry
     * @throws Exception
     */
    public function interiorRingN(int $n): GEOSGeometry {}

    /**
     * @return GEOSGeometry
     * @throws Exception
     */
    public function exteriorRing(): GEOSGeometry {}

    /**
     * @return int
     * @throws Exception
     */
    public function numCoordinates(): int {}

    /**
     * @return int
     * @throws Exception
     */
    public function dimension(): int {}

    /**
     * @return int
     * @throws Exception
     */
    public function coordinateDimension(): int {}

    /**
     * @param int $n
     * @return GEOSGeometry
     * @throws Exception
     */
    public function pointN(int $n): GEOSGeometry {}

    /**
     * @return GEOSGeometry
     * @throws Exception
     */
    public function startPoint(): GEOSGeometry {}

    /**
     * @return GEOSGeometry
     * @throws Exception
     */
    public function endPoint(): GEOSGeometry {}

    /**
     * @return float
     * @throws Exception
     */
    public function area(): float {}

    /**
     * @return float
     * @throws Exception
     */
    public function length(): float {}

    /**
     * @param GEOSGeometry $geom
     * @return float
     * @throws Exception
     */
    public function distance(GEOSGeometry $geom): float {}

    /**
     * @param GEOSGeometry $geom
     * @return float
     * @throws Exception
     */
    public function hausdorffDistance(GEOSGeometry $geom): float {}

    /**
     * @param GEOSGeometry $geom
     * @param float $tolerance
     * @return GEOSGeometry
     */
    public function snapTo(GEOSGeometry $geom, float $tolerance): GEOSGeometry {}

    /**
     * @return GEOSGeometry
     * @throws Exception
     */
    public function node(): GEOSGeometry {}

    /**
     * @param float $tolerance Snapping tolerance to use for improved robustness
     * @param bool $onlyEdges if true, will return a MULTILINESTRING,
     *     otherwise (the default) it will return a GEOMETRYCOLLECTION containing triangular POLYGONs.
     * @return GEOSGeometry
     * @throws Exception
     */
    public function delaunayTriangulation(float $tolerance = 0.0, bool $onlyEdges = false): GEOSGeometry {}

    /**
     * @param float $tolerance Snapping tolerance to use for improved robustness
     * @param bool $onlyEdges If true will return a MULTILINESTRING,
     *     otherwise (the default) it will return a GEOMETRYCOLLECTION containing POLYGONs.
     * @param GEOSGeometry|null $extent Clip returned diagram by the extent of the given geometry
     * @return GEOSGeometry
     * @throws Exception
     */
    public function voronoiDiagram(float $tolerance = 0.0, bool $onlyEdges = false, GEOSGeometry $extent = null): GEOSGeometry {}

    /**
     * @param float $xmin
     * @param float $ymin
     * @param float $xmax
     * @param float $ymax
     * @return GEOSGeometry
     * @throws Exception
     */
    public function clipByRect(float $xmin, float $ymin, float $xmax, float $ymax): GEOSGeometry {}
}

/**
 * Class GEOSWKBWriter
 * @see https://github.com/libgeos/php-geos/blob/master/tests/004_WKBWriter.phpt
 */
class GEOSWKBWriter
{
    /**
     * GEOSWKBWriter constructor.
     */
    public function __construct() {}

    /**
     * @return int
     */
    public function getOutputDimension(): int {}

    /**
     * @param int $dimension
     * @throws Exception
     */
    public function setOutputDimension(int $dimension): void {}

    /**
     * @return int
     */
    public function getByteOrder(): int {}

    /**
     * @param int $byteOrder
     * @throws Exception
     */
    public function setByteOrder(int $byteOrder): void {}

    /**
     * @return int
     */
    public function getIncludeSRID(): int {}

    /**
     * @param int $srid
     * @throws Exception
     */
    public function setIncludeSRID(int $srid): void {}

    /**
     * @param GEOSGeometry $geom
     * @return string
     * @throws Exception
     */
    public function write(GEOSGeometry $geom): string {}

    /**
     * @param GEOSGeometry $geom
     * @return string
     * @throws Exception
     */
    public function writeHEX(GEOSGeometry $geom): string {}
}

/**
 * Class GEOSWKBReader
 * @see https://github.com/libgeos/php-geos/blob/master/tests/005_WKBReader.phpt
 */
class GEOSWKBReader
{
    /**
     * GEOSWKBReader constructor.
     */
    public function __construct() {}

    /**
     * @param string $wkb
     * @return GEOSGeometry
     * @throws Exception
     */
    public function read(string $wkb): GEOSGeometry {}

    /**
     * @param string $wkb
     * @return GEOSGeometry
     * @throws Exception
     */
    public function readHEX(string $wkb): GEOSGeometry {}
}
<?php
/**
 * Helper autocomplete for php solr extension.
 *
 * @author Pierre-Julien Mazenot <pj.mazenot@gmail.com>
 * @link   https://github.com/pjmazenot/phpsolr-phpdoc
 */

/**
 * (PECL solr &gt;= 0.9.2)<br/>
 * Class SolrIllegalOperationException<br/>
 * This object is thrown when an illegal or unsupported operation is performed on an object.
 * @link https://php.net/manual/en/class.solrillegaloperationexception.php
 */
class SolrIllegalOperationException extends SolrException
{
    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns internal information where the Exception was thrown
     * @link https://php.net/manual/en/solrillegaloperationexception.getinternalinfo.php
     * @return array <p>
     * Returns an array containing internal information where the error was thrown. Used only for debugging by extension
     * developers.
     * </p>
     */
    public function getInternalInfo() {}
}
<?php
/**
 * Helper autocomplete for php solr extension.
 *
 * @author Pierre-Julien Mazenot <pj.mazenot@gmail.com>
 * @link   https://github.com/pjmazenot/phpsolr-phpdoc
 */

/**
 * (PECL solr &gt;= 2.2.0)<br/>
 * Class SolrMissingMandatoryParameterException<br/>
 * @link https://php.net/manual/en/class.solrmissingmandatoryparameterexception.php
 */
class SolrMissingMandatoryParameterException extends SolrException {}
<?php
/**
 * Helper autocomplete for php solr extension.
 *
 * @author Pierre-Julien Mazenot <pj.mazenot@gmail.com>
 * @link   https://github.com/pjmazenot/phpsolr-phpdoc
 */

/**
 * (PECL solr &gt;= 0.9.2)<br/>
 * Class SolrClientException<br/>
 * An exception thrown when there is an error while making a request to the server from the client.
 * @link https://php.net/manual/en/class.solrclientexception.php
 */
class SolrClientException extends SolrException
{
    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns internal information where the Exception was thrown
     * @link https://php.net/manual/en/solrclientexception.getinternalinfo.php
     * @return array <p>
     * Returns an array containing internal information where the error was thrown. Used only for debugging by extension
     * developers.
     * </p>
     */
    public function getInternalInfo() {}
}
<?php
/**
 * Helper autocomplete for php solr extension.
 *
 * @author Pierre-Julien Mazenot <pj.mazenot@gmail.com>
 * @link   https://github.com/pjmazenot/phpsolr-phpdoc
 */

/**
 * (PECL solr &gt;= 0.9.2)<br/>
 * Class SolrIllegalArgumentException<br/>
 * This object is thrown when an illegal or invalid argument is passed to a method.
 * @link https://php.net/manual/en/class.solrillegalargumentexception.php
 */
class SolrIllegalArgumentException extends SolrException
{
    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns internal information where the Exception was thrown
     * @link https://php.net/manual/en/solrillegalargumentexception.getinternalinfo.php
     * @return array <p>
     * Returns an array containing internal information where the error was thrown. Used only for debugging by extension
     * developers.
     * </p>
     */
    public function getInternalInfo() {}
}
<?php
/**
 * Helper autocomplete for php solr extension.
 *
 * @author Pierre-Julien Mazenot <pj.mazenot@gmail.com>
 * @link   https://github.com/pjmazenot/phpsolr-phpdoc
 */

/**
 * (PECL solr &gt;= 1.1.0, &gt;=2.0.0)<br/>
 * Class SolrServerException<br/>
 * An exception thrown when there is an error produced by the Solr Server itself.
 * @link https://php.net/manual/en/class.solrserverexception.php
 */
class SolrServerException extends SolrException
{
    /**
     * (PECL solr &gt;= 1.1.0, &gt;=2.0.0)<br/>
     * Returns internal information where the Exception was thrown
     * @link https://php.net/manual/en/solrserverexception.getinternalinfo.php
     * @return array <p>
     * Returns an array containing internal information where the error was thrown. Used only for debugging by extension
     * developers.
     * </p>
     */
    public function getInternalInfo() {}
}
<?php
/**
 * Helper autocomplete for php solr extension.
 *
 * @author Pierre-Julien Mazenot <pj.mazenot@gmail.com>
 * @link   https://github.com/pjmazenot/phpsolr-phpdoc
 */

/**
 * (PECL solr &gt;= 0.9.2)<br/>
 * Class SolrException<br/>
 * This is the base class for all exception thrown by the Solr extension classes.
 * @link https://php.net/manual/en/class.solrexception.php
 */
class SolrException extends Exception
{
    /** @var int The line in c-space source file where exception was generated */
    protected $sourceline;

    /** @var string The c-space source file where exception was generated */
    protected $sourcefile;

    /** @var string The c-space function where exception was generated */
    protected $zif_name;

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns internal information where the Exception was thrown
     * @link https://php.net/manual/en/solrexception.getinternalinfo.php
     * @return array <p>
     * Returns an array containing internal information where the error was thrown. Used only for debugging by extension
     * developers.
     * </p>
     */
    public function getInternalInfo() {}
}
<?php
/**
 * Helper autocomplete for php solr extension.
 *
 * @author Pierre-Julien Mazenot <pj.mazenot@gmail.com>
 * @link   https://github.com/pjmazenot/phpsolr-phpdoc
 */

/**
 * (PECL solr &gt;= 2.2.0)<br/>
 * Class SolrCollapseFunction
 * @link https://php.net/manual/en/class.solrcollapsefunction.php
 */
class SolrCollapseFunction
{
    /** @var string */
    public const NULLPOLICY_IGNORE = 'ignore';

    /** @var string */
    public const NULLPOLICY_EXPAND = 'expand';

    /** @var string */
    public const NULLPOLICY_COLLAPSE = 'collapse';

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * SolrCollapseFunction constructor.
     * @link https://php.net/manual/en/solrcollapsefunction.construct.php
     * @param string $field [optional] <p>
     * The field name to collapse on.<br/>
     * In order to collapse a result. The field type must be a single valued String, Int or Float.
     * </p>
     */
    public function __construct($field) {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Returns the field that is being collapsed on.
     * @link https://php.net/manual/en/solrcollapsefunction.getfield.php
     * @return string
     */
    public function getField() {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Returns collapse hint
     * @link https://php.net/manual/en/solrcollapsefunction.gethint.php
     * @return string
     */
    public function getHint() {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Returns max parameter
     * @link https://php.net/manual/en/solrcollapsefunction.getmax.php
     * @return string
     */
    public function getMax() {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Returns min parameter
     * @link https://php.net/manual/en/solrcollapsefunction.getmin.php
     * @return string
     */
    public function getMin() {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Returns null policy
     * @link https://php.net/manual/en/solrcollapsefunction.getnullpolicy.php
     * @return string
     */
    public function getNullPolicy() {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Returns size parameter
     * @link https://php.net/manual/en/solrcollapsefunction.getsize.php
     * @return int
     */
    public function getSize() {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Sets the field to collapse on
     * @link https://php.net/manual/en/solrcollapsefunction.setfield.php
     * @param string $fieldName <p>
     * The field name to collapse on. In order to collapse a result. The field type must be a single valued String, Int
     * or Float.
     * </p>
     * @return SolrCollapseFunction
     */
    public function setField($fieldName) {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Sets collapse hint
     * @link https://php.net/manual/en/solrcollapsefunction.sethint.php
     * @param string $hint <p>
     * Currently there is only one hint available "top_fc", which stands for top level FieldCache
     * </p>
     * @return SolrCollapseFunction
     */
    public function setHint($hint) {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Selects the group heads by the max value of a numeric field or function query.
     * @link https://php.net/manual/en/solrcollapsefunction.setmax.php
     * @param string $max
     * @return SolrCollapseFunction
     */
    public function setMax($max) {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Sets the initial size of the collapse data structures when collapsing on a numeric field only
     * @link https://php.net/manual/en/solrcollapsefunction.setmin.php
     * @param string $min
     * @return SolrCollapseFunction
     */
    public function setMin($min) {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Sets the NULL Policy
     * @link https://php.net/manual/en/solrcollapsefunction.setnullpolicy.php
     * @param string $nullPolicy
     * @return SolrCollapseFunction
     */
    public function setNullPolicy($nullPolicy) {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Sets the initial size of the collapse data structures when collapsing on a numeric field only.
     * @link https://php.net/manual/en/solrcollapsefunction.setsize.php
     * @param int $size
     * @return SolrCollapseFunction
     */
    public function setSize($size) {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Returns a string representing the constructed collapse function
     * @link https://php.net/manual/en/solrcollapsefunction.tostring.php
     * @return string
     */
    public function __toString() {}
}
<?php
/**
 * Helper autocomplete for php solr extension.
 *
 * @author Pierre-Julien Mazenot <pj.mazenot@gmail.com>
 * @link   https://github.com/pjmazenot/phpsolr-phpdoc
 */

/**
 * (PECL solr &gt;= 0.9.2)<br/>
 * Class SolrQuery<br/>
 * This class represents a collection of name-value pairs sent to the Solr server during a request.
 * @link https://php.net/manual/en/class.solrquery.php
 */
class SolrQuery extends SolrModifiableParams implements Serializable
{
    /** @var int Used to specify that the sorting should be in acending order */
    public const ORDER_ASC = 0;

    /** @var int Used to specify that the sorting should be in descending order */
    public const ORDER_DESC = 1;

    /** @var int Used to specify that the facet should sort by index */
    public const FACET_SORT_INDEX = 0;

    /** @var int Used to specify that the facet should sort by count */
    public const FACET_SORT_COUNT = 1;

    /** @var int Used in the TermsComponent */
    public const TERMS_SORT_INDEX = 0;

    /** @var int Used in the TermsComponent */
    public const TERMS_SORT_COUNT = 1;

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Overrides main filter query, determines which documents to include in the main group.
     * @link https://php.net/manual/en/solrquery.addexpandfilterquery.php
     * @param string $fq
     * @return SolrQuery <p>
     * Returns a SolrQuery object.
     * </p>
     */
    public function addExpandFilterQuery($fq) {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Orders the documents within the expanded groups (expand.sort parameter).
     * @link https://php.net/manual/en/solrquery.addexpandsortfield.php
     * @param string $field <p>
     * Field name
     * </p>
     * @param string $order [optional] <p>
     * Order ASC/DESC, utilizes SolrQuery::ORDER_* constants.
     * </p>
     * <p>
     * Default: SolrQuery::ORDER_DESC
     * </p>
     * @return SolrQuery <p>
     * Returns a SolrQuery object.
     * </p>
     */
    public function addExpandSortField($field, $order) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Maps to facet.date
     * @link https://php.net/manual/en/solrquery.addfacetdatefield.php
     * @param string $dateField <p>
     * The name of the date field.
     * </p>
     * @return SolrQuery <p>
     * Returns a SolrQuery object.
     * </p>
     */
    public function addFacetDateField($dateField) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Adds another facet.date.other parameter
     * @link https://php.net/manual/en/solrquery.addfacetdateother.php
     * @param string $value <p>
     * The value to use.
     * </p>
     * @param string $field_override <p>
     * The field name for the override.
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function addFacetDateOther($value, $field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Adds another field to the facet
     * @link https://php.net/manual/en/solrquery.addfacetfield.php
     * @param string $field <p>
     * The name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function addFacetField($field) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Adds a facet query
     * @link https://php.net/manual/en/solrquery.addfacetquery.php
     * @param string $facetQuery <p>
     * The facet query
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function addFacetQuery($facetQuery) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Specifies which fields to return in the result
     * @link https://php.net/manual/en/solrquery.addfield.php
     * @param string $field <p>
     * The name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns a SolrQuery object.
     * </p>
     */
    public function addField($field) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Specifies a filter query
     * @link https://php.net/manual/en/solrquery.addfilterquery.php
     * @param string $fq <p>
     * The filter query
     * </p>
     * @return SolrQuery <p>
     * Returns a SolrQuery object.
     * </p>
     */
    public function addFilterQuery($fq) {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Add a field to be used to group results.
     * @link https://php.net/manual/en/solrquery.addgroupfield.php
     * @param string $value
     * @return SolrQuery <p>
     * Returns a SolrQuery object.
     * </p>
     */
    public function addGroupField($value) {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Allows grouping results based on the unique values of a function query (group.func parameter).
     * @link https://php.net/manual/en/solrquery.addgroupfunction.php
     * @param string $value
     * @return SolrQuery <p>
     * Returns a SolrQuery object.
     * </p>
     */
    public function addGroupFunction($value) {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Allows grouping of documents that match the given query.
     * @link https://php.net/manual/en/solrquery.addgroupquery.php
     * @param string $value
     * @return SolrQuery <p>
     * Returns a SolrQuery object.
     * </p>
     */
    public function addGroupQuery($value) {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Add a group sort field (group.sort parameter).
     * @link https://php.net/manual/en/solrquery.addgroupsortfield.php
     * @param string $field <p>
     * Field name
     * </p>
     * @param int $order <p>
     * Order ASC/DESC, utilizes SolrQuery::ORDER_* constants
     * </p>
     * @return SolrQuery <p>
     * Returns a SolrQuery object.
     * </p>
     */
    public function addGroupSortField($field, $order) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Maps to hl.fl
     * @link https://php.net/manual/en/solrquery.addhighlightfield.php
     * @param string $field <p>
     * Name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function addHighlightField($field) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sets a field to use for similarity
     * @link https://php.net/manual/en/solrquery.addmltfield.php
     * @param string $field <p>
     * The name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function addMltField($field) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Maps to mlt.qf
     * @link https://php.net/manual/en/solrquery.addmltqueryfield.php
     * @param string $field <p>
     * The name of the field
     * </p>
     * @param float $boost <p>
     * Its boost value
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function addMltQueryField($field, $boost) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Used to control how the results should be sorted
     * @link https://php.net/manual/en/solrquery.addsortfield.php
     * @param string $field <p>
     * The name of the field
     * </p>
     * @param int $order <p>
     * The sort direction. This should be either SolrQuery::ORDER_ASC or SolrQuery::ORDER_DESC.
     * </p>
     * @return SolrQuery <p>
     * Returns a SolrQuery object.
     * </p>
     */
    public function addSortField($field, $order = SolrQuery::ORDER_DESC) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Requests a return of sub results for values within the given facet
     * @link https://php.net/manual/en/solrquery.addstatsfacet.php
     * @param string $field <p>
     * The name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function addStatsFacet($field) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Maps to stats.field parameter
     * @link https://php.net/manual/en/solrquery.addstatsfield.php
     * @param string $field <p>
     * The name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function addStatsField($field) {}

    /**
     * (No version information available, might only be in Git)<br/>
     * Collapses the result set to a single document per group
     * @link https://php.net/manual/en/solrquery.collapse.php
     * @param SolrCollapseFunction $collapseFunction
     * @return SolrQuery <p>
     * Returns a SolrQuery object.
     * </p>
     */
    public function collapse(SolrCollapseFunction $collapseFunction) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * SolrQuery constructor.
     * @link https://php.net/manual/en/solrquery.construct.php
     * @param string $q <p>
     * Optional search query
     * </p>
     */
    public function __construct($q = '') {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Destructor
     * @link https://php.net/manual/en/solrquery.destruct.php
     */
    public function __destruct() {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Returns true if group expanding is enabled
     * @link https://php.net/manual/en/solrquery.getexpand.php
     * @return bool <p>
     * Returns <b>TRUE</b> if group expanding is enabled
     * </p>
     */
    public function getExpand() {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Returns the expand filter queries
     * @link https://php.net/manual/en/solrquery.getexpandfilterqueries.php
     * @return array <p>
     * Returns the expand filter queries
     * </p>
     */
    public function getExpandFilterQueries() {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Returns the expand query expand.q parameter
     * @link https://php.net/manual/en/solrquery.getexpandquery.php
     * @return array <p>
     * Returns the expand query expand.q parameter
     * </p>
     */
    public function getExpandQuery() {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Returns The number of rows to display in each group (expand.rows)
     * @link https://php.net/manual/en/solrquery.getexpandrows.php
     * @return int <p>
     * Returns The number of rows to display in each group (expand.rows)
     * </p>
     */
    public function getExpandRows() {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Returns an array of fields
     * @link https://php.net/manual/en/solrquery.getexpandsortfields.php
     * @return array <p>
     * Returns an array of fields
     * </p>
     */
    public function getExpandSortFields() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the value of the facet parameter
     * @link https://php.net/manual/en/solrquery.getfacet.php
     * @return bool|null <p>
     * Returns a boolean on success and <b>NULL</b> if not set
     * </p>
     */
    public function getFacet() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the value for the facet.date.end parameter
     * @link https://php.net/manual/en/solrquery.getfacetdateend.php
     * @param string $field_override [optional] <p>
     * The name of the field
     * </p>
     * @return string|null <p>
     * Returns a string on success and <b>NULL</b> if not set
     * </p>
     */
    public function getFacetDateEnd($field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns all the facet.date fields
     * @link https://php.net/manual/en/solrquery.getfacetdatefields.php
     * @return array|null <p>
     * Returns all the facet.date fields as an array or <b>NULL</b> if none was set
     * </p>
     */
    public function getFacetDateFields() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the value of the facet.date.gap parameter
     * @link https://php.net/manual/en/solrquery.getfacetdategap.php
     * @param string $field_override [optional] <p>
     * The name of the field
     * </p>
     * @return string|null <p>
     * Returns a string on success and <b>NULL</b> if not set
     * </p>
     */
    public function getFacetDateGap($field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the value of the facet.date.hardend parameter
     * @link https://php.net/manual/en/solrquery.getfacetdatehardend.php
     * @param string $field_override [optional] <p>
     * The name of the field
     * </p>
     * @return string|null <p>
     * Returns a string on success and <b>NULL</b> if not set
     * </p>
     */
    public function getFacetDateHardEnd($field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the value for the facet.date.other parameter
     * @link https://php.net/manual/en/solrquery.getfacetdatehardend.php
     * @param string $field_override [optional] <p>
     * The name of the field
     * </p>
     * @return array|null <p>
     * Returns an array on success and <b>NULL</b> if not set
     * </p>
     */
    public function getFacetDateOther($field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the lower bound for the first date range for all date faceting on this field
     * @link https://php.net/manual/en/solrquery.getfacetdatestart.php
     * @param string $field_override [optional] <p>
     * The name of the field
     * </p>
     * @return string|null <p>
     * Returns a string on success and <b>NULL</b> if not set
     * </p>
     */
    public function getFacetDateStart($field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns all the facet fields
     * @link https://php.net/manual/en/solrquery.getfacetfields.php
     * @return array|null <p>
     * Returns an array of all the fields and <b>NULL</b> if none was set
     * </p>
     */
    public function getFacetFields() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the maximum number of constraint counts that should be returned for the facet fields
     * @link https://php.net/manual/en/solrquery.getfacetlimit.php
     * @param string $field_override [optional] <p>
     * The name of the field
     * </p>
     * @return int|null <p>
     * Returns an integer on success and <b>NULL</b> if not set
     * </p>
     */
    public function getFacetLimit($field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the value of the facet.method parameter
     * @link https://php.net/manual/en/solrquery.getfacetmethod.php
     * @param string $field_override [optional] <p>
     * The name of the field
     * </p>
     * @return string|null <p>
     * Returns a string on success and <b>NULL</b> if not set
     * </p>
     */
    public function getFacetMethod($field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the minimum counts for facet fields should be included in the response
     * @link https://php.net/manual/en/solrquery.getfacetmincount.php
     * @param string $field_override [optional] <p>
     * The name of the field
     * </p>
     * @return int|null <p>
     * Returns an integer on success and <b>NULL</b> if not set
     * </p>
     */
    public function getFacetMinCount($field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the current state of the facet.missing parameter
     * @link https://php.net/manual/en/solrquery.getfacetmissing.php
     * @param string $field_override [optional] <p>
     * The name of the field
     * </p>
     * @return string|null <p>
     * Returns a boolean on success and <b>NULL</b> if not set
     * </p>
     */
    public function getFacetMissing($field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns an offset into the list of constraints to be used for pagination
     * @link https://php.net/manual/en/solrquery.getfacetoffset.php
     * @param string $field_override [optional] <p>
     * The name of the field
     * </p>
     * @return int|null <p>
     * Returns an integer on success and <b>NULL</b> if not set
     * </p>
     */
    public function getFacetOffset($field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the facet prefix
     * @link https://php.net/manual/en/solrquery.getfacetprefix.php
     * @param string $field_override [optional] <p>
     * The name of the field
     * </p>
     * @return string|null <p>
     * Returns a string on success and <b>NULL</b> if not set
     * </p>
     */
    public function getFacetPrefix($field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns all the facet queries
     * @link https://php.net/manual/en/solrquery.getfacetqueries.php
     * @return string|null <p>
     * Returns an array on success and <b>NULL</b> if not set
     * </p>
     */
    public function getFacetQueries() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the facet sort type
     * @link https://php.net/manual/en/solrquery.getfacetsort.php
     * @param string $field_override [optional] <p>
     * The name of the field
     * </p>
     * @return int|null <p>
     * Returns an integer (SolrQuery::FACET_SORT_INDEX or SolrQuery::FACET_SORT_COUNT) on success or <b>NULL</b> if not
     * set.
     * </p>
     */
    public function getFacetSort($field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the list of fields that will be returned in the response
     * @link https://php.net/manual/en/solrquery.getfields.php
     * @return string|null <p>
     * Returns an array on success and <b>NULL</b> if not set
     * </p>
     */
    public function getFields() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns an array of filter queries
     * @link https://php.net/manual/en/solrquery.getfilterqueries.php
     * @return string|null <p>
     * Returns an array on success and <b>NULL</b> if not set
     * </p>
     */
    public function getFilterQueries() {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Returns true if grouping is enabled
     * https://secure.php.net/manual/en/solrquery.getgroup.php
     * @return bool <p>
     * Returns true if grouping is enabled
     * </p>
     */
    public function getGroup() {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Returns group cache percent value
     * @link https://php.net/manual/en/solrquery.getgroupcachepercent.php
     * @return int <p>
     * Returns group cache percent value
     * </p>
     */
    public function getGroupCachePercent() {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Returns the group.facet parameter value
     * @link https://php.net/manual/en/solrquery.getgroupfacet.php
     * @return bool <p>
     * Returns the group.facet parameter value
     * </p>
     */
    public function getGroupFacet() {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Returns group fields (group.field parameter values)
     * @link https://php.net/manual/en/solrquery.getgroupfields.php
     * @return array <p>
     * Returns group fields (group.field parameter values)
     * </p>
     */
    public function getGroupFields() {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Returns the group.format value
     * @link https://php.net/manual/en/solrquery.getgroupformat.php
     * @return string <p>
     * Returns the group.format value
     * </p>
     */
    public function getGroupFormat() {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Returns group functions (group.func parameter values)
     * @link https://php.net/manual/en/solrquery.getgroupfunctions.php
     * @return array <p>
     * Returns group functions (group.func parameter values)
     * </p>
     */
    public function getGroupFunctions() {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Returns the group.limit value
     * @link https://php.net/manual/en/solrquery.getgrouplimit.php
     * @return int <p>
     * Returns the group.limit value
     * </p>
     */
    public function getGroupLimit() {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Returns the group.main value
     * @link https://php.net/manual/en/solrquery.getgroupmain.php
     * @return bool <p>
     * Returns the group.main value
     * </p>
     */
    public function getGroupMain() {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Returns the group.ngroups value
     * @link https://php.net/manual/en/solrquery.getgroupngroups.php
     * @return bool <p>
     * Returns the group.ngroups value
     * </p>
     */
    public function getGroupNGroups() {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Returns the group.offset value
     * @link https://php.net/manual/en/solrquery.getgroupoffset.php
     * @return bool <p>
     * Returns the group.offset value
     * </p>
     */
    public function getGroupOffset() {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Returns all the group.query parameter values
     * @link https://php.net/manual/en/solrquery.getgroupqueries.php
     * @return array <p>
     * Returns all the group.query parameter values
     * </p>
     */
    public function getGroupQueries() {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Returns the group.sort value
     * @link https://php.net/manual/en/solrquery.getgroupsortfields.php
     * @return array <p>
     * Returns all the group.sort parameter values
     * </p>
     */
    public function getGroupSortFields() {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Returns the group.truncate value
     * @link https://php.net/manual/en/solrquery.getgrouptruncate.php
     * @return bool <p>
     * Returns the group.truncate value
     * </p>
     */
    public function getGroupTruncate() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the state of the hl parameter
     * @link https://php.net/manual/en/solrquery.gethighlight.php
     * @return bool <p>
     * Returns the state of the hl parameter
     * </p>
     */
    public function getHighlight() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the highlight field to use as backup or default
     * @link https://php.net/manual/en/solrquery.gethighlightalternatefield.php
     * @param string $field_override [optional] <p>
     * The name of the field
     * </p>
     * @return string|null <p>
     * Returns a string on success and <b>NULL</b> if not set
     * </p>
     */
    public function getHighlightAlternateField($field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns all the fields that Solr should generate highlighted snippets for
     * @link https://php.net/manual/en/solrquery.gethighlightfields.php
     * @return array|null <p>
     * Returns an array on success and <b>NULL</b> if not set
     * </p>
     */
    public function getHighlightFields() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the formatter for the highlighted output
     * @link https://php.net/manual/en/solrquery.gethighlightformatter.php
     * @param string $field_override [optional] <p>
     * The name of the field
     * </p>
     * @return string|null <p>
     * Returns a string on success and <b>NULL</b> if not set
     * </p>
     */
    public function getHighlightFormatter($field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the text snippet generator for highlighted text
     * @link https://php.net/manual/en/solrquery.gethighlightfragmenter.php
     * @param string $field_override [optional] <p>
     * The name of the field
     * </p>
     * @return string|null <p>
     * Returns a string on success and <b>NULL</b> if not set
     * </p>
     */
    public function getHighlightFragmenter($field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the number of characters of fragments to consider for highlighting
     * @link https://php.net/manual/en/solrquery.gethighlightfragsize.php
     * @param string $field_override [optional] <p>
     * The name of the field
     * </p>
     * @return int|null <p>
     * Returns an integer on success and <b>NULL</b> if not set
     * </p>
     */
    public function getHighlightFragsize($field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns whether or not to enable highlighting for range/wildcard/fuzzy/prefix queries
     * @link https://php.net/manual/en/solrquery.gethighlighthighlightmultiterm.php
     * @return bool|null <p>
     * Returns a boolean on success and <b>NULL</b> if not set
     * </p>
     */
    public function getHighlightHighlightMultiTerm() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the maximum number of characters of the field to return
     * @link https://php.net/manual/en/solrquery.gethighlightmaxalternatefieldlength.php
     * @param string $field_override [optional] <p>
     * The name of the field
     * </p>
     * @return int|null <p>
     * Returns an integer on success and <b>NULL</b> if not set
     * </p>
     */
    public function getHighlightMaxAlternateFieldLength($field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the maximum number of characters into a document to look for suitable snippets
     * @link https://php.net/manual/en/solrquery.gethighlightmaxanalyzedchars.php
     * @return int|null <p>
     * Returns an integer on success and <b>NULL</b> if not set
     * </p>
     */
    public function getHighlightMaxAnalyzedChars() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns whether or not the collapse contiguous fragments into a single fragment
     * @link https://php.net/manual/en/solrquery.gethighlightmergecontiguous.php
     * @param string $field_override [optional] <p>
     * The name of the field
     * </p>
     * @return bool|null <p>
     * Returns a boolean on success and <b>NULL</b> if not set
     * </p>
     */
    public function getHighlightMergeContiguous($field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the maximum number of characters from a field when using the regex fragmenter
     * @link https://php.net/manual/en/solrquery.gethighlightregexmaxanalyzedchars.php
     * @return int|null <p>
     * Returns an integer on success and <b>NULL</b> if not set
     * </p>
     */
    public function getHighlightRegexMaxAnalyzedChars() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the regular expression for fragmenting
     * @link https://php.net/manual/en/solrquery.gethighlightregexpattern.php
     * @return string <p>
     * Returns a string on success and <b>NULL</b> if not set
     * </p>
     */
    public function getHighlightRegexPattern() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the deviation factor from the ideal fragment size
     * @link https://php.net/manual/en/solrquery.gethighlightregexslop.php
     * @return float|null <p>
     * Returns a double on success and <b>NULL</b> if not set.
     * </p>
     */
    public function getHighlightRegexSlop() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns if a field will only be highlighted if the query matched in this particular field
     * @link https://php.net/manual/en/solrquery.gethighlightrequirefieldmatch.php
     * @return bool|null <p>
     * Returns a boolean on success and <b>NULL</b> if not set
     * </p>
     */
    public function getHighlightRequireFieldMatch() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the text which appears after a highlighted term
     * @link https://php.net/manual/en/solrquery.gethighlightsimplepost.php
     * @param string $field_override [optional] <p>
     * The name of the field
     * </p>
     * @return string|null <p>
     * Returns a string on success and <b>NULL</b> if not set
     * </p>
     */
    public function getHighlightSimplePost($field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the text which appears before a highlighted term
     * @link https://php.net/manual/en/solrquery.gethighlightsimplepre.php
     * @param string $field_override [optional] <p>
     * The name of the field
     * </p>
     * @return string|null <p>
     * Returns a string on success and <b>NULL</b> if not set
     * </p>
     */
    public function getHighlightSimplePre($field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the maximum number of highlighted snippets to generate per field
     * @link https://php.net/manual/en/solrquery.gethighlightsnippets.php
     * @param string $field_override [optional] <p>
     * The name of the field
     * </p>
     * @return int|null <p>
     * Returns an integer on success and <b>NULL</b> if not set
     * </p>
     */
    public function getHighlightSnippets($field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the state of the hl.usePhraseHighlighter parameter
     * @link https://php.net/manual/en/solrquery.gethighlightusephrasehighlighter.php
     * @return bool|null <p>
     * Returns a boolean on success and <b>NULL</b> if not set
     * </p>
     */
    public function getHighlightUsePhraseHighlighter() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns whether or not MoreLikeThis results should be enabled
     * @link https://php.net/manual/en/solrquery.getmlt.php
     * @return bool|null <p>
     * Returns a boolean on success and <b>NULL</b> if not set
     * </p>
     */
    public function getMlt() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns whether or not the query will be boosted by the interesting term relevance
     * @link https://php.net/manual/en/solrquery.getmltboost.php
     * @return bool|null <p>
     * Returns a boolean on success and <b>NULL</b> if not set
     * </p>
     */
    public function getMltBoost() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the number of similar documents to return for each result
     * @link https://php.net/manual/en/solrquery.getmltcount.php
     * @return int|null <p>
     * Returns an integer on success and <b>NULL</b> if not set
     * </p>
     */
    public function getMltCount() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns all the fields to use for similarity
     * @link https://php.net/manual/en/solrquery.getmltfields.php
     * @return array <p>
     * Returns an array on success and <b>NULL</b> if not set
     * </p>
     */
    public function getMltFields() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the maximum number of query terms that will be included in any generated query
     * @link https://php.net/manual/en/solrquery.getmltmaxnumqueryterms.php
     * @return int|null <p>
     * Returns an integer on success and <b>NULL</b> if not set
     * </p>
     */
    public function getMltMaxNumQueryTerms() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the maximum number of tokens to parse in each document field that is not stored with TermVector support
     * @link https://php.net/manual/en/solrquery.getmltmaxnumtokens.php
     * @return int <p>
     * Returns an integer on success and <b>NULL</b> if not set
     * </p>
     */
    public function getMltMaxNumTokens() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the maximum word length above which words will be ignored
     * @link https://php.net/manual/en/solrquery.getmltmaxwordlength.php
     * @return int|null <p>
     * Returns an integer on success and <b>NULL</b> if not set
     * </p>
     */
    public function getMltMaxWordLength() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the threshold frequency at which words will be ignored which do not occur in at least this many docs
     * @link https://php.net/manual/en/solrquery.getmltmindocfrequency.php
     * @return int|null <p>
     * Returns an integer on success and <b>NULL</b> if not set
     * </p>
     */
    public function getMltMinDocFrequency() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the frequency below which terms will be ignored in the source document
     * @link https://php.net/manual/en/solrquery.getmltmintermfrequency.php
     * @return int|null <p>
     * Returns an integer on success and <b>NULL</b> if not set
     * </p>
     */
    public function getMltMinTermFrequency() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the minimum word length below which words will be ignored
     * @link https://php.net/manual/en/solrquery.getmltminwordlength.php
     * @return int <p>
     * Returns an integer on success and <b>NULL</b> if not set
     * </p>
     */
    public function getMltMinWordLength() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the query fields and their boosts
     * @link https://php.net/manual/en/solrquery.getmltqueryfields.php
     * @return array|null <p>
     * Returns an array on success and <b>NULL</b> if not set
     * </p>
     */
    public function getMltQueryFields() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the main query
     * @link https://php.net/manual/en/solrquery.getquery.php
     * @return string <p>
     * Returns a string on success and <b>NULL</b> if not set
     * </p>
     */
    public function getQuery() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the maximum number of documents
     * @link https://php.net/manual/en/solrquery.getrows.php
     * @return int|null <p>
     * Returns an integer on success and <b>NULL</b> if not set
     * </p>
     */
    public function getRows() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns all the sort fields
     * @link https://php.net/manual/en/solrquery.getsortfields.php
     * @return array <p>
     * Returns an array on success and <b>NULL</b> if none of the parameters was set.
     * </p>
     */
    public function getSortFields() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the offset in the complete result set
     * @link https://php.net/manual/en/solrquery.getstart.php
     * @return int|null <p>
     * Returns an integer on success and <b>NULL</b> if not set
     * </p>
     */
    public function getStart() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns whether or not stats is enabled
     * @link https://php.net/manual/en/solrquery.getstats.php
     * @return bool|null <p>
     * Returns a boolean on success and <b>NULL</b> if not set
     * </p>
     */
    public function getStats() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns all the stats facets that were set
     * @link https://php.net/manual/en/solrquery.getstatsfacets.php
     * @return array|null <p>
     * Returns an array on success and <b>NULL</b> if not set
     * </p>
     */
    public function getStatsFacets() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns all the statistics fields
     * @link https://php.net/manual/en/solrquery.getstatsfields.php
     * @return array|null <p>
     * Returns an array on success and <b>NULL</b> if not set
     * </p>
     */
    public function getStatsFields() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns whether or not the TermsComponent is enabled
     * @link https://php.net/manual/en/solrquery.getterms.php
     * @return bool|null <p>
     * Returns a boolean on success and <b>NULL</b> if not set
     * </p>
     */
    public function getTerms() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the field from which the terms are retrieved
     * @link https://php.net/manual/en/solrquery.gettermsfield.php
     * @return string|null <p>
     * Returns a string on success and <b>NULL</b> if not set
     * </p>
     */
    public function getTermsField() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns whether or not to include the lower bound in the result set
     * @link https://php.net/manual/en/solrquery.gettermsincludelowerbound.php
     * @return bool|null <p>
     * Returns a boolean on success and <b>NULL</b> if not set
     * </p>
     */
    public function getTermsIncludeLowerBound() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns whether or not to include the upper bound term in the result set
     * @link https://php.net/manual/en/solrquery.gettermsincludeupperbound.php
     * @return bool|null <p>
     * Returns a boolean on success and <b>NULL</b> if not set
     * </p>
     */
    public function getTermsIncludeUpperBound() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the maximum number of terms Solr should return
     * @link https://php.net/manual/en/solrquery.gettermslimit.php
     * @return int|null <p>
     * Returns an integer on success and <b>NULL</b> if not set
     * </p>
     */
    public function getTermsLimit() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the term to start at
     * @link https://php.net/manual/en/solrquery.gettermslowerbound.php
     * @return string|null <p>
     * Returns a string on success and <b>NULL</b> if not set
     * </p>
     */
    public function getTermsLowerBound() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the maximum document frequency
     * @link https://php.net/manual/en/solrquery.gettermsmaxcount.php
     * @return int|null <p>
     * Returns an integer on success and <b>NULL</b> if not set
     * </p>
     */
    public function getTermsMaxCount() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the minimum document frequency to return in order to be included
     * @link https://php.net/manual/en/solrquery.gettermsmincount.php
     * @return int|null <p>
     * Returns an integer on success and <b>NULL</b> if not set
     * </p>
     */
    public function getTermsMinCount() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the term prefix
     * @link https://php.net/manual/en/solrquery.gettermsprefix.php
     * @return string|null <p>
     * Returns a string on success and <b>NULL</b> if not set
     * </p>
     */
    public function getTermsPrefix() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Whether or not to return raw characters
     * @link https://php.net/manual/en/solrquery.gettermsreturnraw.php
     * @return bool|null <p>
     * Returns a boolean on success and <b>NULL</b> if not set
     * </p>
     */
    public function getTermsReturnRaw() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns an integer indicating how terms are sorted
     * @link https://php.net/manual/en/solrquery.gettermssort.php
     * @return int|null <p>
     * Returns an integer on success and <b>NULL</b> if not set<br/>
     * SolrQuery::TERMS_SORT_INDEX indicates that the terms are returned by index order.<br/>
     * SolrQuery::TERMS_SORT_COUNT implies that the terms are sorted by term frequency (highest count first)
     * </p>
     */
    public function getTermsSort() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the term to stop at
     * @link https://php.net/manual/en/solrquery.gettermsupperbound.php
     * @return string|null <p>
     * Returns a string on success and <b>NULL</b> if not set
     * </p>
     */
    public function getTermsUpperBound() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the time in milliseconds allowed for the query to finish
     * @link https://php.net/manual/en/solrquery.gettimeallowed.php
     * @return int|null <p>
     * Returns an integer on success and <b>NULL</b> if not set
     * </p>
     */
    public function getTimeAllowed() {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Removes an expand filter query
     * @link https://php.net/manual/en/solrquery.removeexpandfilterquery.php
     * @param string $fq
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function removeExpandFilterQuery($fq) {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Removes an expand sort field from the expand.sort parameter.
     * @link https://php.net/manual/en/solrquery.removeexpandsortfield.php
     * @param string $field <p>
     * Field name
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function removeExpandSortField($field) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Removes one of the facet date fields
     * @link https://php.net/manual/en/solrquery.removefacetdatefield.php
     * @param string $field <p>
     * The name of the date field to remove
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function removeFacetDateField($field) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Removes one of the facet.date.other parameters
     * @link https://php.net/manual/en/solrquery.removefacetdateother.php
     * @param string $value <p>
     * The value
     * </p>
     * @param string $field_override [optional] <p>
     * The name of the field.
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function removeFacetDateOther($value, $field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Removes one of the facet.date parameters
     * @link https://php.net/manual/en/solrquery.removefacetfield.php
     * @param string $field <p>
     * The name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function removeFacetField($field) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Removes one of the facet.query parameters
     * @link https://php.net/manual/en/solrquery.removefacetquery.php
     * @param string $value <p>
     * The value
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function removeFacetQuery($value) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Removes a field from the list of fields
     * @link https://php.net/manual/en/solrquery.removefield.php
     * @param string $field <p>
     * The name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function removeField($field) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Removes a filter query
     * @link https://php.net/manual/en/solrquery.removefilterquery.php
     * @param string $fq
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function removeFilterQuery($fq) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Removes one of the fields used for highlighting
     * @link https://php.net/manual/en/solrquery.removehighlightfield.php
     * @param string $field <p>
     * The name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function removeHighlightField($field) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Removes one of the moreLikeThis fields
     * @link https://php.net/manual/en/solrquery.removemltfield.php
     * @param string $field <p>
     * The name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function removeMltField($field) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Removes one of the moreLikeThis query fields
     * @link https://php.net/manual/en/solrquery.removemltqueryfield.php
     * @param string $queryField <p>
     * The query field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function removeMltQueryField($queryField) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Removes one of the sort fields
     * @link https://php.net/manual/en/solrquery.removesortfield.php
     * @param string $field <p>
     * The name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function removeSortField($field) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Removes one of the stats.facet parameters
     * @link https://php.net/manual/en/solrquery.removestatsfacet.php
     * @param string $value <p>
     * The value
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function removeStatsFacet($value) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Removes one of the stats.field parameters
     * @link https://php.net/manual/en/solrquery.removestatsfield.php
     * @param string $field <p>
     * The name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function removeStatsField($field) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Toggles the echoHandler parameter
     * @link https://php.net/manual/en/solrquery.setechohandler.php
     * @param bool $flag <p>
     * <b>TRUE</b> or <b>FALSE</b>
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setEchoHandler($flag) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Determines what kind of parameters to include in the response
     * @link https://php.net/manual/en/solrquery.setechoparams.php
     * @param string $type <p>
     * The type of parameters to include:
     * </p>
     * <ul>
     * <li><b>none</b>: don't include any request parameters for debugging</li>
     * <li><b>explicit</b>: include the parameters explicitly specified by the client in the request</li>
     * <li><b>all</b>: include all parameters involved in this request, either specified explicitly by the client, or
     * implicit because of the request handler configuration.</li>
     * </ul>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setEchoParams($type) {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Enables/Disables the Expand Component
     * @link https://php.net/manual/en/solrquery.setexpand.php
     * @param bool $value <p>
     * Bool flag
     * </b>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setExpand($value) {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Sets the expand.q parameter
     * @link https://php.net/manual/en/solrquery.setexpandquery.php
     * @param string $q
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setExpandQuery($q) {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Sets the number of rows to display in each group (expand.rows). Server Default 5
     * @link https://php.net/manual/en/solrquery.setexpandrows.php
     * @param int $value
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setExpandRows($value) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sets the explainOther common query parameter
     * @link https://php.net/manual/en/solrquery.setexplainother.php
     * @param string $query <p>
     * The Lucene query to identify a set of documents
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setExplainOther($query) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Maps to the facet parameter. Enables or disables facetting
     * @link https://php.net/manual/en/solrquery.setfacet.php
     * @param bool $flag <p>
     * <b>TRUE</b> enables faceting and <b>FALSE</b> disables it.
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setFacet($flag) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Maps to facet.date.end
     * @link https://php.net/manual/en/solrquery.setfacetdateend.php
     * @param string $value <p>
     * See facet.date.end
     * </p>
     * @param string $field_override [optional] <p>
     * Name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setFacetDateEnd($value, $field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Maps to facet.date.gap
     * @link https://php.net/manual/en/solrquery.setfacetdategap.php
     * @param string $value <p>
     * See facet.date.gap
     * </p>
     * @param string $field_override [optional] <p>
     * Name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setFacetDateGap($value, $field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Maps to facet.date.hardend
     * @link https://php.net/manual/en/solrquery.setfacetdatehardend.php
     * @param bool $value <p>
     * See facet.date.hardend
     * </p>
     * @param string $field_override [optional] <p>
     * Name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setFacetDateHardEnd($value, $field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Maps to facet.date.start
     * @link https://php.net/manual/en/solrquery.setfacetdatestart.php
     * @param string $value <p>
     * See facet.date.start
     * </p>
     * @param string $field_override [optional] <p>
     * Name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setFacetDateStart($value, $field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sets the minimum document frequency used for determining term count
     * @link https://php.net/manual/en/solrquery.setfacetenumcachemindefaultfrequency.php
     * @param int $frequency <p>
     * The minimum frequency
     * </p>
     * @param string $field_override [optional] <p>
     * Name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setFacetEnumCacheMinDefaultFrequency($frequency, $field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Maps to facet.limit
     * @link https://php.net/manual/en/solrquery.setfacetlimit.php
     * @param int $limit <p>
     * The maximum number of constraint counts
     * </p>
     * @param string $field_override [optional] <p>
     * Name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setFacetLimit($limit, $field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Specifies the type of algorithm to use when faceting a field
     * @link https://php.net/manual/en/solrquery.setfacetmethod.php
     * @param string $method <p>
     * The method to use.
     * </p>
     * @param string $field_override [optional] <p>
     * Name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setFacetMethod($method, $field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Maps to facet.mincount
     * @link https://php.net/manual/en/solrquery.setfacetmincount.php
     * @param int $mincount <p>
     * The minimum count
     * </p>
     * @param string $field_override [optional] <p>
     * Name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setFacetMinCount($mincount, $field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Maps to facet.missing
     * @link https://php.net/manual/en/solrquery.setfacetmissing.php
     * @param bool $flag <p>
     * <b>TRUE</b> turns this feature on. <b>FALSE</b> disables it.
     * </p>
     * @param string $field_override [optional] <p>
     * Name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setFacetMissing($flag, $field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sets the offset into the list of constraints to allow for pagination
     * @link https://php.net/manual/en/solrquery.setfacetoffset.php
     * @param int $offset <p>
     * The offset
     * </p>
     * @param string $field_override [optional] <p>
     * Name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setFacetOffset($offset, $field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Specifies a string prefix with which to limits the terms on which to facet
     * @link https://php.net/manual/en/solrquery.setfacetprefix.php
     * @param string $prefix <p>
     * The prefix string
     * </p>
     * @param string $field_override [optional] <p>
     * Name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setFacetPrefix($prefix, $field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Determines the ordering of the facet field constraints
     * @link https://php.net/manual/en/solrquery.setfacetsort.php
     * @param int $facetSort <p>
     * Use SolrQuery::FACET_SORT_INDEX for sorting by index order or SolrQuery::FACET_SORT_COUNT for sorting by count.
     * </p>
     * @param string $field_override [optional] <p>
     * Name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setFacetSort($facetSort, $field_override) {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Enable/Disable result grouping (group parameter)
     * @link https://php.net/manual/en/solrquery.setgroup.php
     * @param bool $value
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setGroup($value) {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Enables caching for result grouping
     * @link https://php.net/manual/en/solrquery.setgroupcachepercent.php
     * @param int $percent <p>
     * Setting this parameter to a number greater than 0 enables caching for result grouping. Result Grouping executes
     * two searches; this option caches the second search. The server default value is 0. Testing has shown that group
     * caching only improves search time with Boolean, wildcard, and fuzzy queries. For simple queries like term or
     * "match all" queries, group caching degrades performance. group.cache.percent parameter.
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setGroupCachePercent($percent) {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Sets group.facet parameter
     * @link https://php.net/manual/en/solrquery.setgroupfacet.php
     * @param bool $value
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setGroupFacet($value) {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Sets the group format, result structure (group.format parameter).
     * @link https://php.net/manual/en/solrquery.setgroupformat.php
     * @param string $value <p>
     * Sets the group.format parameter. If this parameter is set to simple, the grouped documents are presented in a
     * single flat list, and the start and rows parameters affect the numbers of documents instead of groups.<br/>
     * Accepts: grouped/simple
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setGroupFormat($value) {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Specifies the number of results to return for each group. The server default value is 1.
     * @link https://php.net/manual/en/solrquery.setgrouplimit.php
     * @param int $value
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setGroupLimit($value) {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * If true, the result of the first field grouping command is used as the main result list in the response, using
     * group.format=simple.
     * @link https://php.net/manual/en/solrquery.setgroupmain.php
     * @param string $value
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setGroupMain($value) {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * If true, Solr includes the number of groups that have matched the query in the results.
     * @link https://php.net/manual/en/solrquery.setgroupngroups.php
     * @param bool $value
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setGroupNGroups($value) {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Sets the group.offset parameter.
     * @link https://php.net/manual/en/solrquery.setgroupoffset.php
     * @param int $value
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setGroupOffset($value) {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * If true, facet counts are based on the most relevant document of each group matching the query.
     * @link https://php.net/manual/en/solrquery.setgrouptruncate.php
     * @param bool $value
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setGroupTruncate($value) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Enables or disables highlighting
     * @link https://php.net/manual/en/solrquery.sethighlight.php
     * @param bool $flag <p>
     * Setting it to <b>TRUE</b> enables highlighted snippets to be generated in the query response.<br/>
     * Setting it to <b>FALSE</b> disables highlighting
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setHighlight($flag) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Specifies the backup field to use
     * @link https://php.net/manual/en/solrquery.sethighlightalternatefield.php
     * @param string $field <p>
     * The name of the backup field
     * </p>
     * @param string $field_override [optional] <p>
     * Name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setHighlightAlternateField($field, $field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Specify a formatter for the highlight output
     * @link https://php.net/manual/en/solrquery.sethighlightformatter.php
     * @param string $formatter <p>
     * Currently the only legal value is "simple"
     * </p>
     * @param string $field_override [optional] <p>
     * Name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setHighlightFormatter($formatter, $field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sets a text snippet generator for highlighted text
     * @link https://php.net/manual/en/solrquery.sethighlightfragmenter.php
     * @param string $fragmenter <p>
     * The standard fragmenter is gap. Another option is regex, which tries to create fragments that resembles a certain
     * regular expression
     * </p>
     * @param string $field_override [optional] <p>
     * Name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setHighlightFragmenter($fragmenter, $field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * The size of fragments to consider for highlighting
     * @link https://php.net/manual/en/solrquery.sethighlightfragsize.php
     * @param int $size <p>
     * The size, in characters, of fragments to consider for highlighting
     * </p>
     * @param string $field_override [optional] <p>
     * Name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setHighlightFragsize($size, $field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Use SpanScorer to highlight phrase terms
     * @link https://php.net/manual/en/solrquery.sethighlighthighlightmultiterm.php
     * @param bool $flag <p>
     * Whether or not to use SpanScorer to highlight phrase terms only when they appear within the query phrase in the
     * document.
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setHighlightHighlightMultiTerm($flag) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sets the maximum number of characters of the field to return
     * @link https://php.net/manual/en/solrquery.sethighlightmaxalternatefieldlength.php
     * @param int $fieldLength <p>
     * The length of the field
     * </p>
     * <p>
     * If SolrQuery::setHighlightAlternateField() was passed the value <b>TRUE</b>, this parameter specifies the maximum
     * number of characters of the field to return
     * </p>
     * <p>
     * Any value less than or equal to 0 means unlimited.
     * </p>
     * @param string $field_override [optional] <p>
     * Name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setHighlightMaxAlternateFieldLength($fieldLength, $field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Specifies the number of characters into a document to look for suitable snippets
     * @link https://php.net/manual/en/solrquery.sethighlightmaxanalyzedchars.php
     * @param int $value <p>
     * The number of characters into a document to look for suitable snippets
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setHighlightMaxAnalyzedChars($value) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Whether or not to collapse contiguous fragments into a single fragment
     * @link https://php.net/manual/en/solrquery.sethighlightmergecontiguous.php
     * @param bool $flag <p>
     * Whether or not to collapse contiguous fragments into a single fragment
     * </p>
     * @param string $field_override [optional] <p>
     * Name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setHighlightMergeContiguous($flag, $field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Specify the maximum number of characters to analyze
     * @link https://php.net/manual/en/solrquery.sethighlightregexmaxanalyzedchars.php
     * @param int $maxAnalyzedChars <p>
     * The maximum number of characters to analyze from a field when using the regex fragmenter
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setHighlightRegexMaxAnalyzedChars($maxAnalyzedChars) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Specify the regular expression for fragmenting
     * @link https://php.net/manual/en/solrquery.sethighlightregexpattern.php
     * @param string $value <p>
     * The regular expression for fragmenting. This could be used to extract sentences
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setHighlightRegexPattern($value) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sets the factor by which the regex fragmenter can stray from the ideal fragment size
     * @link https://php.net/manual/en/solrquery.sethighlightregexslop.php
     * @param float $factor <p>
     * The factor by which the regex fragmenter can stray from the ideal fragment size (specified by
     * SolrQuery::setHighlightFragsize) to accommodate the regular expression.
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setHighlightRegexSlop($factor) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Require field matching during highlighting
     * @link https://php.net/manual/en/solrquery.sethighlightrequirefieldmatch.php
     * @param bool $flag <p>
     * If <b>TRUE</b>, then a field will only be highlighted if the query matched in this particular field.<br/>
     * This will only work if SolrQuery::setHighlightUsePhraseHighlighter() was set to <b>TRUE</b>.
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setHighlightRequireFieldMatch($flag) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sets the text which appears after a highlighted term
     * @link https://php.net/manual/en/solrquery.sethighlightsimplepost.php
     * @param string $simplePost <p>
     * Sets the text which appears after a highlighted term. The default is &lt;/em&gt;
     * </p>
     * @param string $field_override [optional] <p>
     * Name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setHighlightSimplePost($simplePost, $field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sets the text which appears before a highlighted term
     * @link https://php.net/manual/en/solrquery.sethighlightsimplepre.php
     * @param string $simplePre <p>
     * Sets the text which appears before a highlighted term. The default is &lt;em&gt;
     * </p>
     * @param string $field_override [optional] <p>
     * Name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setHighlightSimplePre($simplePre, $field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sets the maximum number of highlighted snippets to generate per field
     * @link https://php.net/manual/en/solrquery.sethighlightsnippets.php
     * @param int $value <p>
     * The maximum number of highlighted snippets to generate per field
     * </p>
     * @param string $field_override [optional] <p>
     * Name of the field
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setHighlightSnippets($value, $field_override) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Whether to highlight phrase terms only when they appear within the query phrase
     * @link https://php.net/manual/en/solrquery.sethighlightusephrasehighlighter.php
     * @param bool $flag <p>
     * Whether or not to use SpanScorer to highlight phrase terms only when they appear within the query phrase in the
     * document.
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setHighlightUsePhraseHighlighter($flag) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Enables or disables moreLikeThis
     * @link https://php.net/manual/en/solrquery.setmlt.php
     * @param bool $flag <p>
     * <b>TRUE</b> enables it and <b>FALSE</b> turns it off.
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setMlt($flag) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Set if the query will be boosted by the interesting term relevance
     * @link https://php.net/manual/en/solrquery.setmltboost.php
     * @param bool $flag <p>
     * Sets to <b>TRUE</b> or <b>FALSE</b>
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setMltBoost($flag) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Set the number of similar documents to return for each result
     * @link https://php.net/manual/en/solrquery.setmltcount.php
     * @param int $count <p>
     * The number of similar documents to return for each result
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setMltCount($count) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sets the maximum number of query terms included
     * @link https://php.net/manual/en/solrquery.setmltmaxnumqueryterms.php
     * @param int $value <p>
     * The maximum number of query terms that will be included in any generated query
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setMltMaxNumQueryTerms($value) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Specifies the maximum number of tokens to parse
     * @link https://php.net/manual/en/solrquery.setmltmaxnumtokens.php
     * @param int $value <p>
     * The maximum number of tokens to parse
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setMltMaxNumTokens($value) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sets the maximum word length
     * @link https://php.net/manual/en/solrquery.setmltmaxwordlength.php
     * @param int $maxWordLength <p>
     * The maximum word length above which words will be ignored
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setMltMaxWordLength($maxWordLength) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sets the mltMinDoc frequency
     * @link https://php.net/manual/en/solrquery.setmltmindocfrequency.php
     * @param int $minDocFrequency <p>
     * Sets the frequency at which words will be ignored which do not occur in at least this many docs.
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setMltMinDocFrequency($minDocFrequency) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sets the frequency below which terms will be ignored in the source docs
     * @link https://php.net/manual/en/solrquery.setmltmintermfrequency.php
     * @param int $minTermFrequency <p>
     * The frequency below which terms will be ignored in the source docs
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setMltMinTermFrequency($minTermFrequency) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sets the minimum word length
     * @link https://php.net/manual/en/solrquery.setmltminwordlength.php
     * @param int $minWordLength <p>
     * The minimum word length below which words will be ignored
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setMltMinWordLength($minWordLength) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Exclude the header from the returned results
     * @link https://php.net/manual/en/solrquery.setomitheader.php
     * @param bool $flag <p>
     * <b>TRUE</b> excludes the header from the result.
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setOmitHeader($flag) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sets the search query
     * @link https://php.net/manual/en/solrquery.setquery.php
     * @param string $query <p>
     * The search query
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setQuery($query) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Specifies the maximum number of rows to return in the result
     * @link https://php.net/manual/en/solrquery.setrows.php
     * @param int $rows <p>
     * The maximum number of rows to return
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setRows($rows) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Flag to show debug information
     * @link https://php.net/manual/en/solrquery.setshowdebuginfo.php
     * @param bool $flag <p>
     * Whether to show debug info. <b>TRUE</b> or <b>FALSE</b>
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setShowDebugInfo($flag) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Specifies the number of rows to skip
     * @link https://php.net/manual/en/solrquery.setstart.php
     * @param int $start <p>
     * The number of rows to skip.
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setStart($start) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Enables or disables the Stats component
     * @link https://php.net/manual/en/solrquery.setstats.php
     * @param bool $flag <p>
     * <b>TRUE</b> turns on the stats component and <b>FALSE</b> disables it.
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setStats($flag) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Enables or disables the TermsComponent
     * @link https://php.net/manual/en/solrquery.setterms.php
     * @param bool $flag <p>
     * <b>TRUE</b> enables it. <b>FALSE</b> turns it off
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setTerms($flag) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sets the name of the field to get the Terms from
     * @link https://php.net/manual/en/solrquery.settermsfield.php
     * @param string $fieldname <p>
     * The field name
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setTermsField($fieldname) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Include the lower bound term in the result set
     * @link https://php.net/manual/en/solrquery.settermsincludelowerbound.php
     * @param bool $flag <p>
     * Include the lower bound term in the result set
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setTermsIncludeLowerBound($flag) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Include the upper bound term in the result set
     * @link https://php.net/manual/en/solrquery.settermsincludeupperbound.php
     * @param bool $flag <p>
     * <b>TRUE</b> or <b>FALSE</b>
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setTermsIncludeUpperBound($flag) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sets the maximum number of terms to return
     * @link https://php.net/manual/en/solrquery.settermslimit.php
     * @param int $limit <p>
     * The maximum number of terms to return. All the terms will be returned if the limit is negative.
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setTermsLimit($limit) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Specifies the Term to start from
     * @link https://php.net/manual/en/solrquery.settermslowerbound.php
     * @param string $lowerBound <p>
     * The lower bound Term
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setTermsLowerBound($lowerBound) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sets the maximum document frequency
     * @link https://php.net/manual/en/solrquery.settermsmaxcount.php
     * @param int $frequency <p>
     * The maximum document frequency.
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setTermsMaxCount($frequency) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sets the minimum document frequency
     * @link https://php.net/manual/en/solrquery.settermsmincount.php
     * @param int $frequency <p>
     * The minimum frequency
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setTermsMinCount($frequency) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Restrict matches to terms that start with the prefix
     * @link https://php.net/manual/en/solrquery.settermsprefix.php
     * @param string $prefix <p>
     * Restrict matches to terms that start with the prefix
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setTermsPrefix($prefix) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Return the raw characters of the indexed term
     * @link https://php.net/manual/en/solrquery.settermsreturnraw.php
     * @param bool $flag <p>
     * <b>TRUE</b> or <b>FALSE</b>
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setTermsReturnRaw($flag) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Specifies how to sort the returned terms
     * @link https://php.net/manual/en/solrquery.settermssort.php
     * @param int $sortType <p>
     * If SolrQuery::TERMS_SORT_COUNT, sorts the terms by the term frequency (highest count first).<br/>
     * If SolrQuery::TERMS_SORT_INDEX, returns the terms in index order
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setTermsSort($sortType) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sets the term to stop at
     * @link https://php.net/manual/en/solrquery.settermsupperbound.php
     * @param string $upperBound <p>
     * The term to stop at
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setTermsUpperBound($upperBound) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * The time allowed for search to finish
     * @link https://php.net/manual/en/solrquery.settimeallowed.php
     * @param int $timeAllowed <p>
     * The time allowed for a search to finish. This value only applies to the search and not to requests in general.
     * Time is in milliseconds. Values less than or equal to zero implies no time restriction. Partial results may be
     * returned, if there are any.
     * </p>
     * @return SolrQuery <p>
     * Returns the current SolrQuery object, if the return value is used.
     * </p>
     */
    public function setTimeAllowed($timeAllowed) {}
}
<?php
/**
 * Helper autocomplete for php solr extension.
 *
 * @author Pierre-Julien Mazenot <pj.mazenot@gmail.com>
 * @link   https://github.com/pjmazenot/phpsolr-phpdoc
 */

/**
 * (PECL solr &gt;= 0.9.2)<br/>
 * Class SolrModifiableParams<br/>
 * This class represents a collection of name-value pairs sent to the Solr server during a request.
 * @link https://php.net/manual/en/class.solrmodifiableparams.php
 */
class SolrModifiableParams extends SolrParams implements Serializable
{
    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * SolrModifiableParams constructor.
     * @link https://php.net/manual/en/solrmodifiableparams.construct.php
     */
    public function __construct() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Destructor
     * @link https://php.net/manual/en/solrmodifiableparams.destruct.php
     */
    public function __destruct() {}
}
<?php
/**
 * Helper autocomplete for php solr extension.
 *
 * @author Pierre-Julien Mazenot <pj.mazenot@gmail.com>
 * @link   https://github.com/pjmazenot/phpsolr-phpdoc
 */

/**
 * (PECL solr &gt;= 0.9.2)<br/>
 * Class SolrParams<br/>
 * This class represents a a collection of name-value pairs sent to the Solr server during a request.
 * @link https://php.net/manual/en/class.solrparams.php
 */
abstract class SolrParams implements Serializable
{
    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * This is an alias for SolrParams::addParam
     * @link https://php.net/manual/en/solrparams.add.php
     * @param string $name <p>
     * The name of the parameter
     * </p>
     * @param string $value <p>
     * The value of the parameter
     * </p>
     * @return SolrParams|false <p>
     * Returns a SolrParams instance on success and <b>FALSE</b> on failure.
     * </p>
     */
    public function add($name, $value) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Adds a parameter to the object
     * @link https://php.net/manual/en/solrparams.addparam.php
     * @param string $name <p>
     * The name of the parameter
     * </p>
     * @param string $value <p>
     * The value of the parameter
     * </p>
     * @return SolrParams|false <p>
     * Returns a SolrParams instance on success and <b>FALSE</b> on failure.
     * </p>
     */
    public function addParam($name, $value) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * This is an alias for SolrParams::getParam
     * @link https://php.net/manual/en/solrparams.get.php
     * @param string $param_name <p>
     * The name of the parameter
     * </p>
     * @return mixed <p>
     * Returns an array or string depending on the type of parameter
     * </p>
     */
    final public function get($param_name) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns a parameter value
     * @link https://php.net/manual/en/solrparams.getparam.php
     * @param string $param_name <p>
     * The name of the parameter
     * </p>
     * @return mixed <p>
     * Returns an array or string depending on the type of parameter
     * </p>
     */
    final public function getParam($param_name) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns an array of non URL-encoded parameters
     * @link https://php.net/manual/en/solrparams.getparams.php
     * @return array <p>
     * Returns an array of non URL-encoded parameters
     * </p>
     */
    final public function getParams() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns an array of URL-encoded parameters
     * @link https://php.net/manual/en/solrparams.getpreparedparams.php
     * @return array <p>
     * Returns an array of URL-encoded parameters
     * </p>
     */
    final public function getPreparedParams() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Used for custom serialization
     * @link https://php.net/manual/en/solrparams.serialize.php
     * @return string <p>
     * Used for custom serialization
     * </p>
     */
    final public function serialize() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * An alias of SolrParams::setParam
     * @link https://php.net/manual/en/solrparams.set.php
     * @param string $name <p>
     * The name of the parameter
     * </p>
     * @param string $value <p>
     * The parameter value
     * </p>
     * @return SolrParams|false <p>
     * Returns a SolrParams instance on success and <b>FALSE</b> on failure.
     * </p>
     */
    final public function set($name, $value) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sets the parameter to the specified value
     * @link https://php.net/manual/en/solrparams.setparam.php
     * @param string $name <p>
     * The name of the parameter
     * </p>
     * @param string $value <p>
     * The parameter value
     * </p>
     * @return SolrParams|false <p>
     * Returns a SolrParams instance on success and <b>FALSE</b> on failure.
     * </p>
     */
    public function setParam($name, $value) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns all the name-value pair parameters in the object
     * @link https://php.net/manual/en/solrparams.tostring.php
     * @param bool $url_encode <p>
     * Whether to return URL-encoded values
     * </p>
     * @return string|false <p>
     * Returns a string on success and <b>FALSE</b> on failure.
     * </p>
     */
    final public function toString($url_encode = false) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Used for custom serialization
     * @link https://php.net/manual/en/solrparams.unserialize.php
     * @param string $serialized <p>
     * The serialized representation of the object
     * </p>
     */
    final public function unserialize($serialized) {}
}
<?php
/**
 * Helper autocomplete for php solr extension.
 *
 * @author Pierre-Julien Mazenot <pj.mazenot@gmail.com>
 * @link   https://github.com/pjmazenot/phpsolr-phpdoc
 */

/**
 * (PECL solr &gt;= 2.1.0)<br/>
 * Version not present on php.net documentation, determined here by using PECL solr changelog:
 * https://pecl.php.net/package-changelog.php?package=solr&release=2.1.0 <br/>
 * Class SolrDisMaxQuery<br/>
 * @link https://php.net/manual/en/class.solrdismaxquery.php
 */
class SolrDisMaxQuery extends SolrQuery implements Serializable
{
    /**
     * (PECL solr &gt;= 2.1.0)<br/>
     * Adds a Phrase Bigram Field (pf2 parameter)
     * @link https://php.net/manual/en/solrdismaxquery.addbigramphrasefield.php
     * @param string $field <p>
     * Field name
     * </p>
     * @param string $boost [optional] <p>
     * Boost value. Boosts documents with matching terms.
     * </p>
     * @param string $slop [optional] <p>
     * Field Slop
     * </p>
     * @return SolrDisMaxQuery
     */
    public function addBigramPhraseField($field, $boost, $slop) {}

    /**
     * (PECL solr &gt;= 2.1.0)<br/>
     * Adds a boost query field with value and optional boost (bq parameter)
     * @link https://php.net/manual/en/solrdismaxquery.addboostquery.php
     * @param string $field <p>
     * Field name
     * </p>
     * @param string $value
     * @param string $boost [optional] <p>
     * Boost value. Boosts documents with matching terms.
     * </p>
     * @return SolrDisMaxQuery
     */
    public function addBoostQuery($field, $value, $boost) {}

    /**
     * (PECL solr &gt;= 2.1.0)<br/>
     * Adds a Phrase Field (pf parameter)
     * @link https://php.net/manual/en/solrdismaxquery.addphrasefield.php
     * @param string $field <p>
     * Field name
     * </p>
     * @param string $boost [optional] <p>
     * Boost value. Boosts documents with matching terms.
     * </p>
     * @param string $slop [optional] <p>
     * Field Slop
     * </p>
     * @return SolrDisMaxQuery
     */
    public function addPhraseField($field, $boost, $slop) {}

    /**
     * (PECL solr &gt;= 2.1.0)<br/>
     * Add a query field with optional boost (qf parameter)
     * @link https://php.net/manual/en/solrdismaxquery.addqueryfield.php
     * @param string $field <p>
     * Field name
     * </p>
     * @param string $boost [optional] <p>
     * Boost value. Boosts documents with matching terms.
     * </p>
     * @return SolrDisMaxQuery
     */
    public function addQueryField($field, $boost) {}

    /**
     * (PECL solr &gt;= 2.1.0)<br/>
     * Adds a Trigram Phrase Field (pf3 parameter)
     * @link https://php.net/manual/en/solrdismaxquery.addtrigramphrasefield.php
     * @param string $field <p>
     * Field name
     * </p>
     * @param string $boost [optional] <p>
     * Boost value. Boosts documents with matching terms.
     * </p>
     * @param string $slop [optional] <p>
     * Field Slop
     * </p>
     * @return SolrDisMaxQuery
     */
    public function addTrigramPhraseField($field, $boost, $slop) {}

    /**
     * (PECL solr &gt;= 2.1.0)<br/>
     * Adds a field to User Fields Parameter (uf)
     * @link https://php.net/manual/en/solrdismaxquery.adduserfield.php
     * @param string $field <p>
     * Field name
     * </p>
     * @return SolrDisMaxQuery
     */
    public function addUserField($field) {}

    /**
     * (PECL solr &gt;= 2.1.0)<br/>
     * Removes phrase bigram field (pf2 parameter)
     * @link https://php.net/manual/en/solrdismaxquery.removebigramphrasefield.php
     * @param string $field <p>
     * Field name
     * </p>
     * @return SolrDisMaxQuery
     */
    public function removeBigramPhraseField($field) {}

    /**
     * (PECL solr &gt;= 2.1.0)<br/>
     * Removes a boost query partial by field name (bq)
     * @link https://php.net/manual/en/solrdismaxquery.removeboostquery.php
     * @param string $field <p>
     * Field name
     * </p>
     * @return SolrDisMaxQuery
     */
    public function removeBoostQuery($field) {}

    /**
     * (PECL solr &gt;= 2.1.0)<br/>
     * Removes a Phrase Field (pf parameter)
     * @link https://php.net/manual/en/solrdismaxquery.removephrasefield.php
     * @param string $field <p>
     * Field name
     * </p>
     * @return SolrDisMaxQuery
     */
    public function removePhraseField($field) {}

    /**
     * (PECL solr &gt;= 2.1.0)<br/>
     * Removes a Query Field (qf parameter)
     * @link https://php.net/manual/en/solrdismaxquery.removequeryfield.php
     * @param string $field <p>
     * Field name
     * </p>
     * @return SolrDisMaxQuery
     */
    public function removeQueryField($field) {}

    /**
     * (PECL solr &gt;= 2.1.0)<br/>
     * Removes a Trigram Phrase Field (pf3 parameter)
     * @link https://php.net/manual/en/solrdismaxquery.removetrigramphrasefield.php
     * @param string $field <p>
     * Field name
     * </p>
     * @return SolrDisMaxQuery
     */
    public function removeTrigramPhraseField($field) {}

    /**
     * (PECL solr &gt;= 2.1.0)<br/>
     * Removes a field from The User Fields Parameter (uf)
     * <div>
     * <b>Warning</b><br/>
     * This function is currently not documented; only its argument list is available.
     * </div>
     * @link https://php.net/manual/en/solrdismaxquery.removeuserfield.php
     * @param string $field <p>
     * Field name
     * </p>
     * @return SolrDisMaxQuery
     */
    public function removeUserField($field) {}

    /**
     * (PECL solr &gt;= 2.1.0)<br/>
     * Sets Bigram Phrase Fields and their boosts (and slops) using pf2 parameter
     * @link https://php.net/manual/en/solrdismaxquery.setbigramphrasefields.php
     * @param string $fields <p>
     * Fields boosts (slops)
     * </p>
     * @return SolrDisMaxQuery
     */
    public function setBigramPhraseFields($fields) {}

    /**
     * (PECL solr &gt;= 2.1.0)<br/>
     * Sets Bigram Phrase Slop (ps2 parameter)
     * @link https://php.net/manual/en/solrdismaxquery.setbigramphraseslop.php
     * @param string $slop <p>
     * A default slop for Bigram phrase fields.
     * </p>
     * @return SolrDisMaxQuery
     */
    public function setBigramPhraseSlop($slop) {}

    /**
     * (PECL solr &gt;= 2.1.0)<br/>
     * Sets a Boost Function (bf parameter).
     * @link https://php.net/manual/en/solrdismaxquery.setboostfunction.php
     * @param string $function <p>
     * Functions (with optional boosts) that will be included in the user's query to influence the score. Any function
     * supported natively by Solr can be used, along with a boost value. e.g.:<br/>
     * recip(rord(myfield),1,2,3)^1.5
     * </p>
     * @return SolrDisMaxQuery
     */
    public function setBoostFunction($function) {}

    /**
     * (PECL solr &gt;= 2.1.0)<br/>
     * Directly Sets Boost Query Parameter (bq)
     * @link https://php.net/manual/en/solrdismaxquery.setboostquery.php
     * @param string $q
     * @return SolrDisMaxQuery
     */
    public function setBoostQuery($q) {}

    /**
     * (PECL solr &gt;= 2.1.0)<br/>
     * Set Minimum "Should" Match (mm)
     * @link https://php.net/manual/en/solrdismaxquery.setminimummatch.php
     * @param string $value <p>
     * Minimum match value/expression<br/>
     * Set Minimum "Should" Match parameter (mm). If the default query operator is AND then mm=100%, if the default
     * query operator (q.op) is OR, then mm=0%.
     * </p>
     * @return SolrDisMaxQuery
     */
    public function setMinimumMatch($value) {}

    /**
     * (PECL solr &gt;= 2.1.0)<br/>
     * Sets Phrase Fields and their boosts (and slops) using pf2 parameter
     * @link https://php.net/manual/en/solrdismaxquery.setphrasefields.php
     * @param string $fields <p>
     * Fields, boosts [, slops]
     * </p>
     * @return SolrDisMaxQuery
     */
    public function setPhraseFields($fields) {}

    /**
     * (PECL solr &gt;= 2.1.0)<br/>
     * Sets the default slop on phrase queries (ps parameter)
     * @link https://php.net/manual/en/solrdismaxquery.setphraseslop.php
     * @param string $slop <p>
     * Sets the default amount of slop on phrase queries built with "pf", "pf2" and/or "pf3" fields (affects boosting).
     * "ps" parameter
     * </p>
     * @return SolrDisMaxQuery
     */
    public function setPhraseSlop($slop) {}

    /**
     * (PECL solr &gt;= 2.1.0)<br/>
     * Set Query Alternate (q.alt parameter)
     * @link https://php.net/manual/en/solrdismaxquery.setqueryalt.php
     * @param string $q <p>
     * Query String
     * </p>
     * @return SolrDisMaxQuery
     */
    public function setQueryAlt($q) {}

    /**
     * (PECL solr &gt;= 2.1.0)<br/>
     * Specifies the amount of slop permitted on phrase queries explicitly included in the user's query string (qf
     * parameter)
     * @link https://php.net/manual/en/solrdismaxquery.setqueryphraseslop.php
     * @param string $slop <p>
     * Amount of slop<br/>
     * The Query Phrase Slop is the amount of slop permitted on phrase queries explicitly included in the user's query
     * string with the qf parameter.<br/>
     * <br/>
     * slop refers to the number of positions one token needs to be moved in relation to another token in order to match
     * a phrase specified in a query.
     * </p>
     * @return SolrDisMaxQuery
     */
    public function setQueryPhraseSlop($slop) {}

    /**
     * (PECL solr &gt;= 2.1.0)<br/>
     * Sets Tie Breaker parameter (tie parameter)
     * @link https://php.net/manual/en/solrdismaxquery.settiebreaker.php
     * @param string $tieBreaker <p>
     * The tie parameter specifies a float value (which should be something much less than 1) to use as tiebreaker in
     * DisMax queries.
     * </p>
     * @return SolrDisMaxQuery
     */
    public function setTieBreaker($tieBreaker) {}

    /**
     * (PECL solr &gt;= 2.1.0)<br/>
     * Directly Sets Trigram Phrase Fields (pf3 parameter)
     * @link https://php.net/manual/en/solrdismaxquery.settrigramphrasefields.php
     * @param string $fields <p>
     * Trigram Phrase Fields
     * </p>
     * @return SolrDisMaxQuery
     */
    public function setTrigramPhraseFields($fields) {}

    /**
     * (PECL solr &gt;= 2.1.0)<br/>
     * Sets Trigram Phrase Slop (ps3 parameter)
     * @link https://php.net/manual/en/solrdismaxquery.settrigramphraseslop.php
     * @param string $slop <p>
     * Phrase slop
     * </p>
     * @return SolrDisMaxQuery
     */
    public function setTrigramPhraseSlop($slop) {}

    /**
     * (PECL solr &gt;= 2.1.0)<br/>
     * Sets User Fields parameter (uf)
     * @link https://php.net/manual/en/solrdismaxquery.setuserfields.php
     * @param string $fields <p>
     * Fields names separated by space<br/>
     * This parameter supports wildcards.
     * </p>
     * @return SolrDisMaxQuery
     */
    public function setUserFields($fields) {}

    /**
     * (PECL solr &gt;= 2.1.0)<br/>
     * Switch QueryParser to be DisMax Query Parser
     * @link https://php.net/manual/en/solrdismaxquery.usedismaxqueryparser.php
     * @return SolrDisMaxQuery
     */
    public function useDisMaxQueryParser() {}

    /**
     * (PECL solr &gt;= 2.1.0)<br/>
     * Switch QueryParser to be EDisMax<br/>
     * By default the query builder uses edismax, if it was switched using
     * SolrDisMaxQuery::useDisMaxQueryParser(), it can be switched back using this method.
     * @link https://php.net/manual/en/solrdismaxquery.useedismaxqueryparser.php
     * @return SolrDisMaxQuery
     */
    public function useEDisMaxQueryParser() {}
}
<?php
/**
 * Helper autocomplete for php solr extension.
 *
 * @author Pierre-Julien Mazenot <pj.mazenot@gmail.com>
 * @link   https://github.com/pjmazenot/phpsolr-phpdoc
 */

/**
 * (PECL solr &gt;= 0.9.1)<br/>
 * Returns the current version of the Apache Solr extension
 * @link https://php.net/manual/en/function.solr-get-version.php
 * @return string|false <p>
 * It returns a string on success and <b>FALSE</b> on failure.
 * </p>
 */
function solr_get_version() {}
<?php
/**
 * Helper autocomplete for php solr extension.
 *
 * @author Pierre-Julien Mazenot <pj.mazenot@gmail.com>
 * @link   https://github.com/pjmazenot/phpsolr-phpdoc
 */

/**
 * (PECL solr &gt;= 0.9.2)<br/>
 * Class SolrClient<br/>
 * This class is used to send requests to a Solr server. Currently, cloning and serialization of SolrClient instances is
 * not supported.
 * @link https://php.net/manual/en/class.solrclient.php
 */
final class SolrClient
{
    /** @var int Used when updating the search servlet. */
    public const SEARCH_SERVLET_TYPE = 1;

    /** @var int Used when updating the update servlet. */
    public const UPDATE_SERVLET_TYPE = 2;

    /** @var int Used when updating the threads servlet. */
    public const THREADS_SERVLET_TYPE = 4;

    /** @var int Used when updating the ping servlet. */
    public const PING_SERVLET_TYPE = 8;

    /** @var int Used when updating the terms servlet. */
    public const TERMS_SERVLET_TYPE = 16;

    /** @var int Used when retrieving system information from the system servlet. */
    public const SYSTEM_SERVLET_TYPE = 32;

    /** @var string This is the initial value for the search servlet. */
    public const DEFAULT_SEARCH_SERVLET = 'select';

    /** @var string This is the initial value for the update servlet. */
    public const DEFAULT_UPDATE_SERVLET = 'update';

    /** @var string This is the initial value for the threads servlet. */
    public const DEFAULT_THREADS_SERVLET = 'admin/threads';

    /** @var string This is the initial value for the ping servlet. */
    public const DEFAULT_PING_SERVLET = 'admin/ping';

    /** @var string This is the initial value for the terms servlet used for the TermsComponent. */
    public const DEFAULT_TERMS_SERVLET = 'terms';

    /** @var string This is the initial value for the system servlet used to obtain Solr Server information. */
    public const DEFAULT_SYSTEM_SERVLET = 'admin/system';

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Adds a document to the index
     * @link https://php.net/manual/en/solrclient.adddocument.php
     * @param SolrInputDocument $doc <p>
     * The SolrInputDocument instance.
     * </p>
     * @param bool $overwrite [optional] <p>
     * Whether to overwrite existing document or not. If <b>FALSE</b> there will be duplicates (several documents with
     * the same ID).
     * </p>
     * <div>
     * <b>Warning</b><br/>
     * PECL Solr < 2.0 $allowDups was used instead of $overwrite, which does the same functionality with exact opposite
     * bool flag.<br/>
     * <br/>
     * $allowDups = false is the same as $overwrite = true
     * </div>
     * @param int $commitWithin [optional] <p>
     * Number of milliseconds within which to auto commit this document. Available since Solr 1.4 . Default (0) means
     * disabled.
     * </p>
     * <p>
     * When this value specified, it leaves the control of when to do the commit to Solr itself, optimizing number of
     * commits to a minimum while still fulfilling the update latency requirements, and Solr will automatically do a
     * commit when the oldest add in the buffer is due.
     * </p>
     * @return SolrUpdateResponse <p>
     * Returns a SolrUpdateResponse object or throws an Exception on failure.
     * </p>
     * @throws SolrClientException <p>
     * Throws SolrClientException if the client had failed, or there was a connection issue.
     * </p>
     * @throws SolrServerException <p>
     * Throws SolrServerException if the Solr Server had failed to satisfy the request.
     * </p>
     */
    public function addDocument(SolrInputDocument $doc, $overwrite = true, $commitWithin = 0) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Adds a collection of SolrInputDocument instances to the index
     * @link https://php.net/manual/en/solrclient.adddocuments.php
     * @param array $docs <p>
     * An array containing the collection of SolrInputDocument instances. This array must be an actual variable.
     * </p>
     * @param bool $overwrite [optional] <p>
     * Whether to overwrite existing document or not. If <b>FALSE</b> there will be duplicates (several documents with
     * the same ID).
     * </p>
     * <div>
     * <b>Warning</b><br/>
     * PECL Solr < 2.0 $allowDups was used instead of $overwrite, which does the same functionality with exact opposite
     * bool flag.<br/>
     * <br/>
     * $allowDups = false is the same as $overwrite = true
     * </div>
     * @param int $commitWithin [optional] <p>
     * Number of milliseconds within which to auto commit this document. Available since Solr 1.4 . Default (0) means
     * disabled.
     * </p>
     * <p>
     * When this value specified, it leaves the control of when to do the commit to Solr itself, optimizing number of
     * commits to a minimum while still fulfilling the update latency requirements, and Solr will automatically do a
     * commit when the oldest add in the buffer is due.
     * </p>
     * @return SolrUpdateResponse <p>
     * Returns a SolrUpdateResponse object or throws an Exception on failure.
     * </p>
     * @throws SolrClientException <p>
     * Throws SolrClientException if the client had failed, or there was a connection issue.
     * </p>
     * @throws SolrServerException <p>
     * Throws SolrServerException if the Solr Server had failed to satisfy the request.
     * </p>
     */
    public function addDocuments(array $docs, $overwrite = true, $commitWithin = 0) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Finalizes all add/deletes made to the index
     * @link https://php.net/manual/en/solrclient.commit.php
     * @param bool $softCommit [optional] <p>
     * This will refresh the 'view' of the index in a more performant manner, but without "on-disk" guarantees.
     * (Solr4.0+)
     * </p>
     * <p>
     * A soft commit is much faster since it only makes index changes visible and does not fsync index files or write a
     * new index descriptor. If the JVM crashes or there is a loss of power, changes that occurred after the last hard
     * commit will be lost. Search collections that have near-real-time requirements (that want index changes to be
     * quickly visible to searches) will want to soft commit often but hard commit less frequently.
     * </p>
     * @param bool $waitSearcher [optional] <p>
     * block until a new searcher is opened and registered as the main query searcher, making the changes visible.
     * </p>
     * @param bool $expungeDeletes [optional] <p>
     * Merge segments with deletes away. (Solr1.4+)
     * </p>
     * @return SolrUpdateResponse <p>
     * Returns a SolrUpdateResponse object or throws an Exception on failure.
     * </p>
     * @throws SolrClientException <p>
     * Throws SolrClientException if the client had failed, or there was a connection issue.
     * </p>
     * @throws SolrServerException <p>
     * Throws SolrServerException if the Solr Server had failed to satisfy the request.
     * </p>
     */
    public function commit($softCommit = false, $waitSearcher = true, $expungeDeletes = false) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * SolrClient constructor.
     * @link https://php.net/manual/en/solrclient.construct.php
     * @param array $clientOptions <p>
     * This is an array containing one of the following keys :
     * </p>
     * <ul>
     * <li><b>secure</b>: (Boolean value indicating whether or not to connect in secure mode)</li>
     * <li><b>hostname</b>: (The hostname for the Solr server)</li>
     * <li><b>port</b>: (The port number)</li>
     * <li><b>path</b>: (The path to solr)</li>
     * <li><b>wt</b>: (The name of the response writer e.g. xml, json)</li>
     * <li><b>login</b>: (The username used for HTTP Authentication, if any)</li>
     * <li><b>password</b>: (The HTTP Authentication password)</li>
     * <li><b>proxy_host</b>: (The hostname for the proxy server, if any)</li>
     * <li><b>proxy_port</b>: (The proxy port)</li>
     * <li><b>proxy_login</b>: (The proxy username)</li>
     * <li><b>proxy_password</b>: (The proxy password)</li>
     * <li><b>timeout</b>: (This is maximum time in seconds allowed for the http data transfer operation. Default is 30
     * seconds)</li>
     * <li><b>ssl_cert</b>: (File name to a PEM-formatted file containing the private key + private certificate
     * (concatenated in that order) )</li>
     * <li><b>ssl_key</b>: (File name to a PEM-formatted private key file only)</li>
     * <li><b>ssl_keypassword</b>: (Password for private key)</li>
     * <li><b>ssl_cainfo</b>: (Name of file holding one or more CA certificates to verify peer with)</li>
     * <li><b>ssl_capath</b>: (Name of directory holding multiple CA certificates to verify peer with )</li>
     * </ul>
     * <p>
     * Please note the if the ssl_cert file only contains the private certificate, you have to specify a separate
     * ssl_key file.
     * </p>
     * <p>
     * The ssl_keypassword option is required if the ssl_cert or ssl_key options are set.
     * </p>
     * @throws SolrIllegalArgumentException
     */
    public function __construct(array $clientOptions) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Delete by Id
     * @link https://php.net/manual/en/solrclient.deletebyid.php
     * @param string $id <p>
     * The value of the uniqueKey field declared in the schema
     * </p>
     * @return SolrUpdateResponse <p>
     * Returns a SolrUpdateResponse on success and throws an exception on failure.
     * </p>
     * @throws SolrClientException <p>
     * Throws SolrClientException if the client had failed, or there was a connection issue.
     * </p>
     * @throws SolrServerException <p>
     * Throws SolrServerException if the Solr Server had failed to satisfy the request.
     * </p>
     */
    public function deleteById($id) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Deletes by Ids
     * @link https://php.net/manual/en/solrclient.deletebyids.php
     * @param array $ids <p>
     * An array of IDs representing the uniqueKey field declared in the schema for each document to be deleted. This
     * must be an actual php variable.
     * </p>
     * @return SolrUpdateResponse <p>
     * Returns a SolrUpdateResponse on success and throws an exception on failure.
     * </p>
     * @throws SolrClientException <p>
     * Throws SolrClientException if the client had failed, or there was a connection issue.
     * </p>
     * @throws SolrServerException <p>
     * Throws SolrServerException if the Solr Server had failed to satisfy the request.
     * </p>
     */
    public function deleteByIds(array $ids) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Removes all documents matching any of the queries
     * @link https://php.net/manual/en/solrclient.deletebyqueries.php
     * @param array $queries <p>
     * The array of queries. This must be an actual php variable.
     * </p>
     * @return SolrUpdateResponse <p>
     * Returns a SolrUpdateResponse on success and throws an exception on failure.
     * </p>
     * @throws SolrClientException <p>
     * Throws SolrClientException if the client had failed, or there was a connection issue.
     * </p>
     * @throws SolrServerException <p>
     * Throws SolrServerException if the Solr Server had failed to satisfy the request.
     * </p>
     */
    public function deleteByQueries(array $queries) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Deletes all documents matching the given query
     * @link https://php.net/manual/en/solrclient.deletebyquery.php
     * @param string $query <p>
     * The query
     * </p>
     * @return SolrUpdateResponse <p>
     * Returns a SolrUpdateResponse on success and throws an exception on failure.
     * </p>
     * @throws SolrClientException <p>
     * Throws SolrClientException if the client had failed, or there was a connection issue.
     * </p>
     * @throws SolrServerException <p>
     * Throws SolrServerException if the Solr Server had failed to satisfy the request.
     * </p>
     */
    public function deleteByQuery($query) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Destructor for SolrClient
     * @link https://php.net/manual/en/solrclient.destruct.php
     */
    public function __destruct() {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Get Document By Id. Utilizes Solr Realtime Get (RTG).
     * @link https://php.net/manual/en/solrclient.getbyid.php
     * @param string $id <p>
     * Document ID
     * </p>
     * @return SolrQueryResponse
     */
    public function getById($id) {}

    /**
     * (PECL solr &gt;= 2.2.0)<br/>
     * Get Documents by their Ids. Utilizes Solr Realtime Get (RTG).
     * @link https://php.net/manual/en/solrclient.getbyids.php
     * @param array $ids <p>
     * Document ids
     * </p>
     * @return SolrQueryResponse
     */
    public function getByIds(array $ids) {}

    /**
     * (PECL solr &gt;= 0.9.7)<br/>
     * Returns the debug data for the last connection attempt
     * @link https://php.net/manual/en/solrclient.getdebug.php
     * @return string <p>
     * Returns a string on success and null if there is nothing to return.
     * </p>
     */
    public function getDebug() {}

    /**
     * (PECL solr &gt;= 0.9.6)<br/>
     * Returns the client options set internally
     * @link https://php.net/manual/en/solrclient.getoptions.php
     * @return array <p>
     * Returns an array containing all the options for the SolrClient object set internally.
     * </p>
     */
    public function getOptions() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Defragments the index
     * @link https://php.net/manual/en/solrclient.optimize.php
     * @param int $maxSegments <p>
     * Optimizes down to at most this number of segments. Since Solr 1.3
     * </p>
     * @param bool $softCommit <p>
     * This will refresh the 'view' of the index in a more performant manner, but without "on-disk" guarantees.
     * (Solr4.0+)
     * </p>
     * @param bool $waitSearcher <p>
     * Block until a new searcher is opened and registered as the main query searcher, making the changes visible.
     * </p>
     * @return SolrUpdateResponse <p>
     * Returns a SolrUpdateResponse on success and throws an exception on failure.
     * </p>
     * @throws SolrClientException <p>
     * Throws SolrClientException if the client had failed, or there was a connection issue.
     * </p>
     * @throws SolrServerException <p>
     * Throws SolrServerException if the Solr Server had failed to satisfy the request.
     * </p>
     */
    public function optimize($maxSegments = 1, $softCommit = true, $waitSearcher = true) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Checks if Solr server is still up
     * @link https://php.net/manual/en/solrclient.ping.php
     * @return SolrPingResponse <p>
     * Returns a SolrPingResponse object on success and throws an exception on failure.
     * </p>
     * @throws SolrClientException <p>
     * Throws SolrClientException if the client had failed, or there was a connection issue.
     * </p>
     * @throws SolrServerException <p>
     * Throws SolrServerException if the Solr Server had failed to satisfy the request.
     * </p>
     */
    public function ping() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sends a query to the server
     * @link https://php.net/manual/en/solrclient.query.php
     * @param SolrParams $query <p>
     * A SolrParams object. It is recommended to use SolrQuery for advanced queries.
     * </p>
     * @return SolrQueryResponse <p>
     * Returns a SolrUpdateResponse on success and throws an exception on failure.
     * </p>
     * @throws SolrClientException <p>
     * Throws SolrClientException if the client had failed, or there was a connection issue.
     * </p>
     * @throws SolrServerException <p>
     * Throws SolrServerException if the Solr Server had failed to satisfy the request.
     * </p>
     */
    public function query(SolrParams $query) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sends a raw update request
     * @link https://php.net/manual/en/solrclient.request.php
     * @param string $raw_request <p>
     * An XML string with the raw request to the server.
     * </p>
     * @return SolrUpdateResponse <p>
     * Returns a SolrUpdateResponse on success and throws an exception on failure.
     * </p>
     * @throws SolrIllegalArgumentException <p>
     * Throws SolrIllegalArgumentException if raw_request was an empty string.
     * </p>
     * @throws SolrClientException <p>
     * Throws SolrClientException if the client had failed, or there was a connection issue.
     * </p>
     * @throws SolrServerException <p>
     * Throws SolrServerException if the Solr Server had failed to satisfy the request.
     * </p>
     */
    public function request($raw_request) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Rollbacks all add/deletes made to the index since the last commit
     * @link https://php.net/manual/en/solrclient.rollback.php
     * @return SolrUpdateResponse <p>
     * Returns a SolrUpdateResponse on success and throws an exception on failure.
     * </p>
     * @throws SolrClientException <p>
     * Throws SolrClientException if the client had failed, or there was a connection issue.
     * </p>
     * @throws SolrServerException <p>
     * Throws SolrServerException if the Solr Server had failed to satisfy the request.
     * </p>
     */
    public function rollback() {}

    /**
     * (PECL solr &gt;= 0.9.11)<br/>
     * Sets the response writer used to prepare the response from Solr
     * @link https://php.net/manual/en/solrclient.setresponsewriter.php
     * @param string $responseWriter <p>
     * One of the following:
     * </p>
     * <ul>
     * <li>json</li>
     * <li>phps</li>
     * <li>xml</li>
     * </ul>
     */
    public function setResponseWriter($responseWriter) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Changes the specified servlet type to a new value
     * @link https://php.net/manual/en/solrclient.setservlet.php
     * @param int $type <p>
     * One of the following :
     * </p>
     * <ul>
     * <li>SolrClient::SEARCH_SERVLET_TYPE</li>
     * <li>SolrClient::UPDATE_SERVLET_TYPE</li>
     * <li>SolrClient::THREADS_SERVLET_TYPE</li>
     * <li>SolrClient::PING_SERVLET_TYPE</li>
     * <li>SolrClient::TERMS_SERVLET_TYPE</li>
     * </ul>
     * @param string $value <p>
     * The new value for the servlet
     * </p>
     * @return bool <p>
     * Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * </p>
     */
    public function setServlet($type, $value) {}

    /**
     * (PECL solr &gt;= 2.0.0)<br/>
     * Retrieve Solr Server information
     * @link https://php.net/manual/en/solrclient.system.php
     * @return SolrGenericResponse <p>
     * Returns a SolrGenericResponse object on success.
     * </p>
     * @throws SolrClientException <p>
     * Throws SolrClientException if the client had failed, or there was a connection issue.
     * </p>
     * @throws SolrServerException <p>
     * Throws SolrServerException if the Solr Server had failed to satisfy the request.
     * </p>
     */
    public function system() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Checks the threads status
     * @link https://php.net/manual/en/solrclient.threads.php
     * @return SolrGenericResponse <p>
     * Returns a SolrGenericResponse object on success.
     * </p>
     * @throws SolrClientException <p>
     * Throws SolrClientException if the client had failed, or there was a connection issue.
     * </p>
     * @throws SolrServerException <p>
     * Throws SolrServerException if the Solr Server had failed to satisfy the request.
     * </p>
     */
    public function threads() {}
}
<?php
/**
 * Helper autocomplete for php solr extension.
 *
 * @author Pierre-Julien Mazenot <pj.mazenot@gmail.com>
 * @link   https://github.com/pjmazenot/phpsolr-phpdoc
 */

/**
 * (PECL solr &gt;= 0.9.2)<br/>
 * Class SolrInputDocument<br/>
 * This class represents a Solr document that is about to be submitted to the Solr index.
 * @link https://php.net/manual/en/class.solrinputdocument.php
 */
final class SolrInputDocument
{
    /** @var int Sorts the fields in ascending order. */
    public const SORT_DEFAULT = 1;

    /** @var int Sorts the fields in ascending order. */
    public const SORT_ASC = 1;

    /** @var int Sorts the fields in descending order. */
    public const SORT_DESC = 2;

    /** @var int Sorts the fields by name */
    public const SORT_FIELD_NAME = 1;

    /** @var int Sorts the fields by number of values. */
    public const SORT_FIELD_VALUE_COUNT = 2;

    /** @var int Sorts the fields by boost value. */
    public const SORT_FIELD_BOOST_VALUE = 4;

    /**
     * (PECL solr &gt;= 2.3.0)<br/>
     * Adds a child document for block indexing
     * @link https://php.net/manual/en/solrinputdocument.addchilddocument.php
     * @param SolrInputDocument $child <p>
     * A SolrInputDocument object.
     * </p>
     * @throws SolrIllegalArgumentException
     * @throws SolrException
     */
    public function addChildDocument(SolrInputDocument $child) {}

    /**
     * (PECL solr &gt;= 2.3.0)<br/>
     * Adds an array of child documents
     * @link https://php.net/manual/en/solrinputdocument.addchilddocuments.php
     * @param array &$docs <p>
     * An array of SolrInputDocument objects.
     * </p>
     * @throws SolrIllegalArgumentException
     * @throws SolrException
     */
    public function addChildDocuments(array &$docs) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Adds a field to the document
     * @link https://php.net/manual/en/solrinputdocument.addfield.php
     * @param string $fieldName <p>
     * The name of the field
     * </p>
     * @param string $fieldValue <p>
     * The value for the field.
     * </p>
     * @param float $fieldBoostValue [optional] <p>
     * The index time boost for the field. Though this cannot be negative, you can still pass values less than 1.0 but
     * they must be greater than zero.
     * </p>
     * @return bool <p>
     * Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * </p>
     */
    public function addField($fieldName, $fieldValue, $fieldBoostValue = 0.0) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Resets the input document
     * @link https://php.net/manual/en/solrinputdocument.clear.php
     * @return bool <p>
     * Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * </p>
     */
    public function clear() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Creates a copy of a SolrDocument
     * @link https://php.net/manual/en/solrinputdocument.clone.php
     */
    public function __clone() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * SolrInputDocument constructor.
     * @link https://php.net/manual/en/solrinputdocument.construct.php
     */
    public function __construct() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Removes a field from the document
     * @link https://php.net/manual/en/solrinputdocument.construct.php
     * @param string $fieldName <p>
     * The name of the field.
     * </p>
     * @return bool <p>
     * Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * </p>
     */
    public function deleteField($fieldName) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Destructor
     * @link https://php.net/manual/en/solrinputdocument.destruct.php
     */
    public function __destruct() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Checks if a field exists
     * @link https://php.net/manual/en/solrinputdocument.fieldexists.php
     * @param string $fieldName <p>
     * Name of the field.
     * </p>
     * @return bool <p>
     * Returns <b>TRUE</b> if the field was found and <b>FALSE</b> if it was not found.
     * </p>
     */
    public function fieldExists($fieldName) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Retrieves the current boost value for the document
     * @link https://php.net/manual/en/solrinputdocument.getboost.php
     * @return float|false <p>
     * Returns the boost value on success and <b>FALSE</b> on failure.
     * </p>
     */
    public function getBoost() {}

    /**
     * (PECL solr &gt;= 2.3.0)<br/>
     * Returns an array of child documents (SolrInputDocument)
     * @link https://php.net/manual/en/solrinputdocument.getchilddocuments.php
     * @return SolrInputDocument[]
     */
    public function getChildDocuments() {}

    /**
     * (PECL solr &gt;= 2.3.0)<br/>
     * Returns the number of child documents
     * @link https://php.net/manual/en/solrinputdocument.getchilddocumentscount.php
     * @return int
     */
    public function getChildDocumentsCount() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Retrieves a field by name
     * @link https://php.net/manual/en/solrinputdocument.getfield.php
     * @param string $fieldName <p>
     * The name of the field.
     * </p>
     * @return SolrDocumentField|false Returns a SolrDocumentField object on success and <b>FALSE</b> on failure.
     */
    public function getField($fieldName) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Retrieves the boost value for a particular field
     * @link https://php.net/manual/en/solrinputdocument.getfieldboost.php
     * @param string $fieldName <p>
     * The name of the field.
     * </p>
     * @return float|false <p>
     * Returns the boost value for the field or <b>FALSE</b> if there was an error.
     * </p>
     */
    public function getFieldBoost($fieldName) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the number of fields in the document
     * @link https://php.net/manual/en/solrinputdocument.getfieldcount.php
     * @return int|false <p>
     * Returns an integer on success or <b>FALSE</b> on failure.
     * </p>
     */
    public function getFieldCount() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns an array containing all the fields in the document
     * @link https://php.net/manual/en/solrinputdocument.getfieldnames.php
     * @return array|false <p>
     * Returns an array on success and <b>FALSE</b> on failure.
     * </p>
     */
    public function getFieldNames() {}

    /**
     * (PECL solr &gt;= 2.3.0)<br/>
     * Checks whether the document has any child documents
     * @link https://php.net/manual/en/solrinputdocument.haschilddocuments.php
     * @return bool <p>
     * Returns <b>TRUE</b> if the document has any child documents
     * </p>
     */
    public function hasChildDocuments() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Merges one input document into another
     * @link https://php.net/manual/en/solrinputdocument.merge.php
     * @param SolrInputDocument $sourceDoc <p>
     * The source document.
     * </p>
     * @param bool $overwrite [optional] <p>
     * If this is <b>TRUE</b> it will replace matching fields in the destination document.
     * </p>
     * @return bool <p>
     * Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. In the future, this will be modified to return the
     * number of fields in the new document.
     * </p>
     */
    public function merge(SolrInputDocument $sourceDoc, $overwrite = true) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * This is an alias of SolrInputDocument::clear
     * @link https://php.net/manual/en/solrinputdocument.reset.php
     * @return bool <p>
     * Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * </p>
     */
    public function reset() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sets the boost value for this document
     * @link https://php.net/manual/en/solrinputdocument.setboost.php
     * @param float $documentBoostValue <p>
     * The index-time boost value for this document.
     * </p>
     * @return bool <p>
     * Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * </p>
     */
    public function setBoost($documentBoostValue) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sets the index-time boost value for a field
     * https://php.net/manual/en/solrinputdocument.setfieldboost.php
     * @param string $fieldName <p>
     * The name of the field.
     * </p>
     * @param float $fieldBoostValue <p>
     * The index time boost value.
     * </p>
     */
    public function setFieldBoost($fieldName, $fieldBoostValue) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sorts the fields within the document
     * @link https://php.net/manual/en/solrinputdocument.sort.php
     * @param int $sortOrderBy <p>
     * The sort criteria, must be one of :
     * <ul>
     * <li>SolrInputDocument::SORT_FIELD_NAME</li>
     * <li>SolrInputDocument::SORT_FIELD_BOOST_VALUE</li>
     * <li>SolrInputDocument::SORT_FIELD_VALUE_COUNT</li>
     * </ul>
     * </p>
     * @param int $sortDirection [optional] <p>
     * The sort direction, can be one of :
     * <ul>
     * <li>SolrInputDocument::SORT_DEFAULT</li>
     * <li>SolrInputDocument::SORT_ASC</li>
     * <li>SolrInputDocument::SORT_DESC</li>
     * </ul>
     * </p>
     * @return bool <p>
     * Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * </p>
     */
    public function sort($sortOrderBy, $sortDirection = SolrInputDocument::SORT_ASC) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns an array representation of the input document
     * @link https://php.net/manual/en/solrinputdocument.toarray.php
     * @return array|false <p>
     * Returns an array containing the fields. It returns FALSE on failure.
     * </p>
     */
    public function toArray() {}
}
<?php
/**
 * Helper autocomplete for php solr extension.
 *
 * @author Pierre-Julien Mazenot <pj.mazenot@gmail.com>
 * @link   https://github.com/pjmazenot/phpsolr-phpdoc
 */

/**
 * (PECL solr &gt;= 0.9.2)<br/>
 * Class SolrDocument<br/>
 * This class represents a Solr document retrieved from a query response.
 * @link https://php.net/manual/en/class.solrinputdocument.php
 */
final class SolrDocument implements ArrayAccess, Iterator, Serializable
{
    /** @var int Sorts the fields in ascending order. */
    public const SORT_DEFAULT = 1;

    /** @var int Sorts the fields in ascending order. */
    public const SORT_ASC = 1;

    /** @var int Sorts the fields in descending order. */
    public const SORT_DESC = 2;

    /** @var int Sorts the fields by name */
    public const SORT_FIELD_NAME = 1;

    /** @var int Sorts the fields by number of values. */
    public const SORT_FIELD_VALUE_COUNT = 2;

    /** @var int Sorts the fields by boost value. */
    public const SORT_FIELD_BOOST_VALUE = 4;

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Adds a field to the document
     * @link https://php.net/manual/en/solrdocument.addfield.php
     * @param string $fieldName <p>
     * The name of the field
     * </p>
     * @param string $fieldValue <p>
     * The value for the field.
     * </p>
     * @return bool <p>
     * Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * </p>
     */
    public function addField($fieldName, $fieldValue) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Drops all the fields in the document
     * @link https://php.net/manual/en/solrdocument.clear.php
     * @return bool <p>
     * Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * </p>
     */
    public function clear() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Creates a copy of a SolrDocument object
     * @link https://php.net/manual/en/solrdocument.clone.php
     */
    public function __clone() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * SolrDocument constructor.
     * @link https://php.net/manual/en/solrdocument.construct.php
     */
    public function __construct() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Retrieves the current field
     * @link https://php.net/manual/en/solrdocument.current.php
     * @return SolrDocumentField <p>
     * Returns the field
     * </p>
     */
    public function current() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Removes a field from the document
     * @link https://php.net/manual/en/solrdocument.deletefield.php
     * @param string $fieldName <p>
     * The name of the field.
     * </p>
     * @return bool <p>
     * Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * </p>
     */
    public function deleteField($fieldName) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Destructor
     * @link https://php.net/manual/en/solrdocument.destruct.php
     */
    public function __destruct() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Checks if a field exists in the document
     * @link https://php.net/manual/en/solrdocument.fieldexists.php
     * @param string $fieldName <p>
     * Name of the field.
     * </p>
     * @return bool <p>
     * Returns <b>TRUE</b> if the field is present and <b>FALSE</b> if it does not.
     * </p>
     */
    public function fieldExists($fieldName) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Access the field as a property
     * @link https://php.net/manual/en/solrdocument.get.php
     * @param string $fieldName <p>
     * The name of the field.
     * </p>
     * @return SolrDocumentField <p>
     * Returns a SolrDocumentField instance.
     * </p>
     */
    public function __get($fieldName) {}

    /**
     * (PECL solr &gt;= 2.3.0)<br/>
     * Returns an array of child documents (SolrInputDocument)
     * @link https://php.net/manual/en/solrdocument.getchilddocuments.php
     * @return SolrInputDocument[]
     */
    public function getChildDocuments() {}

    /**
     * (PECL solr &gt;= 2.3.0)<br/>
     * Returns the number of child documents
     * @link https://php.net/manual/en/solrdocument.getchilddocumentscount.php
     * @return int
     */
    public function getChildDocumentsCount() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Retrieves a field by name
     * @link https://php.net/manual/en/solrdocument.getfield.php
     * @param string $fieldName <p>
     * The name of the field.
     * </p>
     * @return SolrDocumentField|false Returns a SolrDocumentField object on success and <b>FALSE</b> on failure
     */
    public function getField($fieldName) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the number of fields in this document
     * @link https://php.net/manual/en/solrdocument.getfieldcount.php
     * @return int|false <p>
     * Returns an integer on success and <b>FALSE</b> on failure.
     * </p>
     */
    public function getFieldCount() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns an array containing all the fields in the document
     * @link https://php.net/manual/en/solrdocument.getfieldnames.php
     * @return array|false <p>
     * Returns an array on success and <b>FALSE</b> on failure.
     * </p>
     */
    public function getFieldNames() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns a SolrInputDocument equivalent of the object
     * @link https://php.net/manual/en/solrdocument.getinputdocument.php
     * @return SolrInputDocument <p>
     * Returns a SolrInputDocument on success and <b>NULL</b> on failure.
     * </p>
     */
    public function getInputDocument() {}

    /**
     * (PECL solr &gt;= 2.3.0)<br/>
     * Checks whether the document has any child documents
     * @link https://php.net/manual/en/solrdocument.haschilddocuments.php
     * @return bool <p>
     * Returns <b>TRUE</b> if the document has any child documents
     * </p>
     */
    public function hasChildDocuments() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Checks if a field exists
     * @link https://php.net/manual/en/solrdocument.isset.php
     * @param string $fieldName <p>
     * Name of the field.
     * </p>
     * @return bool <p>
     * Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * </p>
     */
    public function __isset($fieldName) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Retrieves the current key
     * @link https://php.net/manual/en/solrdocument.key.php
     * @return string <p>
     * Returns the current key.
     * </p>
     */
    public function key() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Merges one input document into another
     * @link https://php.net/manual/en/solrdocument.merge.php
     * @param SolrInputDocument $sourceDoc <p>
     * The source document.
     * </p>
     * @param bool $overwrite [optional] <p>
     * If this is <b>TRUE</b> then fields with the same name in the destination document will be overwritten.
     * </p>
     * @return bool <p>
     * Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * </p>
     */
    public function merge(SolrInputDocument $sourceDoc, $overwrite = true) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Moves the internal pointer to the next field
     * @link https://php.net/manual/en/solrdocument.next.php
     */
    public function next() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Checks if a particular field exists
     * @link https://php.net/manual/en/solrdocument.offsetexists.php
     * @param string $fieldName <p>
     * The name of the field.
     * </p>
     * @return bool <p>
     * Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * </p>
     */
    public function offsetExists($fieldName) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Retrieves a field
     * @link https://php.net/manual/en/solrdocument.offsetget.php
     * @param string $fieldName <p>
     * The name of the field.
     * </p>
     * @return SolrDocumentField <p>
     * Returns a SolrDocumentField object.
     * </p>
     */
    public function offsetGet($fieldName) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Adds a field to the document
     * @link https://php.net/manual/en/solrdocument.offsetset.php
     * @param string $fieldName <p>
     * The name of the field.
     * </p>
     * @param string $fieldValue <p>
     * The value for this field.
     * </p>
     * @return bool
     */
    public function offsetSet($fieldName, $fieldValue) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Removes a field
     * @link https://php.net/manual/en/solrdocument.offsetunset.php
     * @param string $fieldName <p>
     * The name of the field.
     * </p>
     */
    public function offsetUnset($fieldName) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * This is an alias of SolrDocument::clear
     * @link https://php.net/manual/en/solrdocument.reset.php
     * @return bool <p>
     * Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * </p>
     */
    public function reset() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Resets the internal pointer to the beginning
     * @link https://php.net/manual/en/solrdocument.rewind.php
     */
    public function rewind() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Used for custom serialization
     * @link https://php.net/manual/en/solrdocument.serialize.php
     * @return string <p>
     * Returns a string representing the serialized Solr document.
     * </p>
     */
    public function serialize() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Adds another field to the document
     * @link https://php.net/manual/en/solrdocument.set.php
     * @param string $fieldName <p>
     * Name of the field.
     * </p>
     * @param string $fieldValue <p>
     * Field value.
     * </p>
     * @return bool <p>
     * Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * </p>
     */
    public function __set($fieldName, $fieldValue) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sorts the fields within the document
     * @link https://php.net/manual/en/solrdocument.sort.php
     * @param int $sortOrderBy <p>
     * The sort criteria, must be one of :
     * <ul>
     * <li>SolrDocument::SORT_FIELD_NAME</li>
     * <li>SolrDocument::SORT_FIELD_BOOST_VALUE</li>
     * <li>SolrDocument::SORT_FIELD_VALUE_COUNT</li>
     * </ul>
     * </p>
     * @param int $sortDirection [optional] <p>
     * The sort direction, can be one of :
     * <ul>
     * <li>SolrDocument::SORT_DEFAULT</li>
     * <li>SolrDocument::SORT_ASC</li>
     * <li>SolrDocument::SORT_DESC</li>
     * </ul>
     * </p>
     * @return bool <p>
     * Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * </p>
     */
    public function sort($sortOrderBy, $sortDirection = SolrInputDocument::SORT_ASC) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns an array representation of the document
     * @link https://secure.php.net/manual/en/solrdocument.toarray.php
     * @return array <p>
     * Returns an array representation of the document.
     * </p>
     */
    public function toArray() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Custom serialization of SolrDocument objects
     * @link https://php.net/manual/en/solrdocument.unserialize.php
     * @param string $serialized <p>
     * An XML representation of the document.
     * </p>
     */
    public function unserialize($serialized) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Removes a field from the document
     * @link https://php.net/manual/en/solrdocument.unset.php
     * @param string $fieldName <p>
     * The name of the field.
     * </p>
     * @return bool <p>
     * Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * </p>
     */
    public function __unset($fieldName) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Checks if the current position internally is still valid
     * @link https://php.net/manual/en/solrdocument.valid.php
     * @return bool <p>
     * Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * </p>
     */
    public function valid() {}
}
<?php
/**
 * Helper autocomplete for php solr extension.
 *
 * @author Pierre-Julien Mazenot <pj.mazenot@gmail.com>
 * @link   https://github.com/pjmazenot/phpsolr-phpdoc
 */

/**
 * (PECL solr &gt;= 0.9.2)<br/>
 * Class SolrDocumentField<br/>
 * This class represents a field in a Solr document. All its properties are read-only.
 * @link https://php.net/manual/en/class.solrdocumentfield.php
 */
final class SolrDocumentField
{
    /** @var string [readonly] The name of the field. */
    public $name;

    /** @var string [readonly] The boost value for the field */
    public $boost;

    /** @var string [readonly] An array of values for this field */
    public $values;

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * SolrDocument constructor.
     * @link https://php.net/manual/en/solrdocumentfield.construct.php
     */
    public function __construct() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Destructor
     * @link https://php.net/manual/en/solrdocumentfield.destruct.php
     */
    public function __destruct() {}
}
<?php
/**
 * Helper autocomplete for php solr extension.
 *
 * @author Pierre-Julien Mazenot <pj.mazenot@gmail.com>
 * @link   https://github.com/pjmazenot/phpsolr-phpdoc
 */

/*
 * Solr Predefined Constants
 * The constants below are defined by this extension, and will only be available when the extension has either been
 * compiled into PHP or dynamically loaded at runtime.
 * @link https://php.net/manual/en/solr.constants.php
 */

define('SOLR_MAJOR_VERSION', 2);
define('SOLR_MINOR_VERSION', 4);
define('SOLR_PATCH_VERSION', 0);
define('SOLR_EXTENSION_VERSION', '2.4.0');
<?php
/**
 * Helper autocomplete for php solr extension.
 *
 * @author Pierre-Julien Mazenot <pj.mazenot@gmail.com>
 * @link   https://github.com/pjmazenot/phpsolr-phpdoc
 */

/**
 * (PECL solr &gt;= 0.9.2)<br/>
 * Class SolrUtils<br/>
 * Contains utility methods for retrieving the current extension version and preparing query phrases.
 * Also contains method for escaping query strings and parsing XML responses.
 * @link https://php.net/manual/en/class.solrutils.php
 */
abstract class SolrUtils
{
    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Parses an response XML string into a SolrObject
     * @link https://php.net/manual/en/solrutils.digestxmlresponse.php
     * @param string $xmlresponse <p>
     * The XML response string from the Solr server.
     * </p>
     * @param int $parse_mode [optional] <p>
     * Use SolrResponse::PARSE_SOLR_OBJ or SolrResponse::PARSE_SOLR_DOC
     * </p>
     * @return SolrObject <p>
     * Returns the SolrObject representing the XML response.
     * </p>
     * <p>
     * If the parse_mode parameter is set to SolrResponse::PARSE_SOLR_OBJ Solr documents will be parses as SolrObject instances.
     * </p>
     * <p>
     * If it is set to SolrResponse::PARSE_SOLR_DOC, they will be parsed as SolrDocument instances.
     * </p>
     * @throws SolrException
     */
    public static function digestXmlResponse($xmlresponse, $parse_mode = 0) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Escapes a lucene query string
     * @link https://php.net/manual/en/solrutils.escapequerychars.php
     * @param string $str <p>
     * This is the query string to be escaped.
     * </p>
     * @return string|false <p>
     * Returns the escaped string or <b>FALSE</b> on failure.
     * </p>
     */
    public static function escapeQueryChars($str) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the current version of the Solr extension
     * @link https://php.net/manual/en/solrutils.getsolrversion.php
     * @return string <p>
     * The current version of the Apache Solr extension.
     * </p>
     */
    public static function getSolrVersion() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Prepares a phrase from an unescaped lucene string
     * @link https://php.net/manual/en/solrutils.queryphrase.php
     * @param string $str <p>
     * The lucene phrase.
     * </p>
     * @return string <p>
     * Returns the phrase contained in double quotes.
     * </p>
     */
    public static function queryPhrase($str) {}
}
<?php
/**
 * Helper autocomplete for php solr extension.
 *
 * @author Pierre-Julien Mazenot <pj.mazenot@gmail.com>
 * @link   https://github.com/pjmazenot/phpsolr-phpdoc
 */

/**
 * (PECL solr &gt;= 0.9.2)<br/>
 * Class SolrObject<br/>
 * This class represents an object whose properties can also by accessed using the array syntax. All its properties are
 * read-only.
 * @link https://php.net/manual/en/class.solrobject.php
 */
final class SolrObject implements ArrayAccess
{
    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * SolrObject constructor.
     * @link https://php.net/manual/en/solrobject.construct.php
     */
    public function __construct() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Destructor
     * @link https://php.net/manual/en/solrobject.destruct.php
     */
    public function __destruct() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns an array of all the names of the properties
     * @link https://php.net/manual/en/solrobject.getpropertynames.php
     * @return array <p>
     * Returns an array.
     * </p>
     */
    public function getPropertyNames() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Checks if the property exists
     * @link https://php.net/manual/en/solrobject.offsetexists.php
     * @param string $property_name <p>
     * The name of the property.
     * </p>
     * @return bool <p>
     * Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * </p>
     */
    public function offsetExists($property_name) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Used to retrieve a property
     * @link https://php.net/manual/en/solrobject.offsetget.php
     * @param string $property_name <p>
     * The name of the property.
     * </p>
     * @return SolrDocumentField <p>
     * Returns the property value.
     * </p>
     */
    public function offsetGet($property_name) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sets the value for a property
     * @link https://php.net/manual/en/solrobject.offsetset.php
     * @param string $property_name <p>
     * The name of the property.
     * </p>
     * @param string $property_value <p>
     * The new value.
     * </p>
     */
    public function offsetSet($property_name, $property_value) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Unsets the value for the property
     * @link https://php.net/manual/en/solrobject.offsetunset.php
     * @param string $property_name <p>
     * The name of the property.
     * </p>
     * @return bool
     */
    public function offsetUnset($property_name) {}
}
<?php
/**
 * Helper autocomplete for php solr extension.
 *
 * @author Pierre-Julien Mazenot <pj.mazenot@gmail.com>
 * @link   https://github.com/pjmazenot/phpsolr-phpdoc
 */

/**
 * (PECL solr &gt;= 0.9.2)<br/>
 * Class SolrResponse<br/>
 * This class represents a response from the Solr server.
 * @link https://php.net/manual/en/class.solrresponse.php
 */
abstract class SolrResponse
{
    /** @var int Documents should be parsed as SolrObject instances */
    public const PARSE_SOLR_OBJ = 0;

    /** @var int Documents should be parsed as SolrDocument instances. */
    public const PARSE_SOLR_DOC = 1;

    /** @var int The http status of the response. */
    protected $http_status;

    /** @var int Whether to parse the solr documents as SolrObject or SolrDocument instances. */
    protected $parser_mode;

    /** @var bool Was there an error during the request */
    protected $success;

    /** @var string Detailed message on http status */
    protected $http_status_message;

    /** @var string The request URL */
    protected $http_request_url;

    /** @var string A string of raw headers sent during the request. */
    protected $http_raw_request_headers;

    /** @var string The raw request sent to the server */
    protected $http_raw_request;

    /** @var string Response headers from the Solr server. */
    protected $http_raw_response_headers;

    /** @var string The response message from the server. */
    protected $http_raw_response;

    /** @var string The response in PHP serialized format. */
    protected $http_digested_response;

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the XML response as serialized PHP data
     * @link https://php.net/manual/en/solrresponse.getdigestedresponse.php
     * @return string <p>
     * Returns the XML response as serialized PHP data
     * </p>
     */
    public function getDigestedResponse() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the HTTP status of the response
     * @link https://php.net/manual/en/solrresponse.gethttpstatus.php
     * @return int <p>
     * Returns the HTTP status of the response.
     * </p>
     */
    public function getHttpStatus() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns more details on the HTTP status
     * @link https://php.net/manual/en/solrresponse.gethttpstatusmessage.php
     * @return string <p>
     * Returns more details on the HTTP status
     * </p>
     */
    public function getHttpStatusMessage() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the raw request sent to the Solr server
     * @link https://php.net/manual/en/solrresponse.getrawrequest.php
     * @return string <p>
     * Returns the raw request sent to the Solr server
     * </p>
     */
    public function getRawRequest() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the raw request headers sent to the Solr server
     * @link https://php.net/manual/en/solrresponse.getrawrequestheaders.php
     * @return string <p>
     * Returns the raw request headers sent to the Solr server
     * </p>
     */
    public function getRawRequestHeaders() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the raw response from the server
     * @link https://php.net/manual/en/solrresponse.getrawresponse.php
     * @return string <p>
     * Returns the raw response from the server.
     * </p>
     */
    public function getRawResponse() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the raw response headers from the server
     * @link https://php.net/manual/en/solrresponse.getrawresponseheaders.php
     * @return string <p>
     * Returns the raw response headers from the server.
     * </p>
     */
    public function getRawResponseHeaders() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the full URL the request was sent to
     * @link https://php.net/manual/en/solrresponse.getrequesturl.php
     * @return string <p>
     * Returns the full URL the request was sent to
     * </p>
     */
    public function getRequestUrl() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns a SolrObject representing the XML response from the server
     * @link https://php.net/manual/en/solrresponse.getresponse.php
     * @return SolrObject <p>
     * Returns a SolrObject representing the XML response from the server
     * </p>
     */
    public function getResponse() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Sets the parse mode
     * @link https://php.net/manual/en/solrresponse.setparsemode.php
     * @param int $parser_mode <ul>
     * <li>SolrResponse::PARSE_SOLR_DOC parses documents in SolrDocument instances. </li>
     * <li>SolrResponse::PARSE_SOLR_OBJ parses document into SolrObjects.</li>
     * </ul>
     * @return bool <p>
     * Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * </p>
     */
    public function setParseMode($parser_mode = 0) {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Was the request a success
     * @link https://php.net/manual/en/solrresponse.success.php
     * @return bool <p>
     * Returns <b>TRUE</b> if it was successful and <b>FALSE</b> if it was not.
     * </p>
     */
    public function success() {}
}
<?php
/**
 * Helper autocomplete for php solr extension.
 *
 * @author Pierre-Julien Mazenot <pj.mazenot@gmail.com>
 * @link   https://github.com/pjmazenot/phpsolr-phpdoc
 */

/**
 * (PECL solr &gt;= 0.9.2)<br/>
 * Class SolrPingResponse<br/>
 * This class represents a response to a ping request to the server
 * @link https://php.net/manual/en/class.solrpingresponse.php
 */
final class SolrPingResponse extends SolrResponse
{
    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * SolrPingResponse constructor.
     * @link https://php.net/manual/en/solrpingresponse.construct.php
     */
    public function __construct() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Destructor
     * @link https://php.net/manual/en/solrpingresponse.destruct.php
     */
    public function __destruct() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Returns the response from the server
     * @link https://php.net/manual/en/solrpingresponse.getresponse.php
     * @return string <p>
     * Returns an empty string. (Returns the response from the server. This should be empty because the request as a
     * HEAD request.)
     * </p>
     */
    public function getResponse() {}
}
<?php
/**
 * Helper autocomplete for php solr extension.
 *
 * @author Pierre-Julien Mazenot <pj.mazenot@gmail.com>
 * @link   https://github.com/pjmazenot/phpsolr-phpdoc
 */

/**
 * (PECL solr &gt;= 0.9.2)<br/>
 * Class SolrUpdateResponse<br/>
 * This class represents a response to an update request.
 * @link https://php.net/manual/en/class.solrupdateresponse.php
 */
final class SolrUpdateResponse extends SolrResponse
{
    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * SolrUpdateResponse constructor.
     * @link https://php.net/manual/en/solrupdateresponse.construct.php
     */
    public function __construct() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Destructor
     * @link https://php.net/manual/en/solrupdateresponse.destruct.php
     */
    public function __destruct() {}
}
<?php
/**
 * Helper autocomplete for php solr extension.
 *
 * @author Pierre-Julien Mazenot <pj.mazenot@gmail.com>
 * @link   https://github.com/pjmazenot/phpsolr-phpdoc
 */

/**
 * (PECL solr &gt;= 0.9.2)<br/>
 * Class SolrGenericResponse<br/>
 * This class represents a response from the solr server.
 * @link https://php.net/manual/en/class.solrgenericresponse.php
 */
final class SolrGenericResponse extends SolrResponse
{
    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * SolrGenericResponse constructor.
     * @link https://php.net/manual/en/solrgenericresponse.construct.php
     */
    public function __construct() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Destructor
     * @link https://php.net/manual/en/solrgenericresponse.destruct.php
     */
    public function __destruct() {}
}
<?php
/**
 * Helper autocomplete for php solr extension.
 *
 * @author Pierre-Julien Mazenot <pj.mazenot@gmail.com>
 * @link   https://github.com/pjmazenot/phpsolr-phpdoc
 */

/**
 * (PECL solr &gt;= 0.9.2)<br/>
 * Class SolrQueryResponse<br/>
 * This class represents a response to a query request.
 * @link https://php.net/manual/en/class.solrqueryresponse.php
 */
final class SolrQueryResponse extends SolrResponse
{
    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * SolrQueryResponse constructor.
     * @link https://php.net/manual/en/solrqueryresponse.construct.php
     */
    public function __construct() {}

    /**
     * (PECL solr &gt;= 0.9.2)<br/>
     * Destructor
     * @link https://php.net/manual/en/solrqueryresponse.destruct.php
     */
    public function __destruct() {}
}
<?php

// Start of zlib v.2.0
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Pure;

/**
 * Output a gz-file
 * @link https://php.net/manual/en/function.readgzfile.php
 * @param string $filename <p>
 * The file name. This file will be opened from the filesystem and its
 * contents written to standard output.
 * </p>
 * @param int $use_include_path [optional] <p>
 * You can set this optional parameter to 1, if you
 * want to search for the file in the include_path too.
 * </p>
 * @return int|false the number of (uncompressed) bytes read from the file, or FALSE on error
 */
function readgzfile(string $filename, int $use_include_path = 0): int|false {}

/**
 * Rewind the position of a gz-file pointer
 * @link https://php.net/manual/en/function.gzrewind.php
 * @param resource $stream <p>
 * The gz-file pointer. It must be valid, and must point to a file
 * successfully opened by <b>gzopen</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function gzrewind($stream): bool {}

/**
 * Close an open gz-file pointer
 * @link https://php.net/manual/en/function.gzclose.php
 * @param resource $stream <p>
 * The gz-file pointer. It must be valid, and must point to a file
 * successfully opened by <b>gzopen</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function gzclose($stream): bool {}

/**
 * Test for EOF on a gz-file pointer
 * @link https://php.net/manual/en/function.gzeof.php
 * @param resource $stream <p>
 * The gz-file pointer. It must be valid, and must point to a file
 * successfully opened by <b>gzopen</b>.
 * </p>
 * @return bool <b>TRUE</b> if the gz-file pointer is at EOF or an error occurs;
 * otherwise returns <b>FALSE</b>.
 */
function gzeof($stream): bool {}

/**
 * Get character from gz-file pointer
 * @link https://php.net/manual/en/function.gzgetc.php
 * @param resource $stream <p>
 * The gz-file pointer. It must be valid, and must point to a file
 * successfully opened by <b>gzopen</b>.
 * </p>
 * @return string|false The uncompressed character or <b>FALSE</b> on EOF (unlike <b>gzeof</b>).
 */
function gzgetc($stream): string|false {}

/**
 * Get line from file pointer
 * @link https://php.net/manual/en/function.gzgets.php
 * @param resource $stream <p>
 * The gz-file pointer. It must be valid, and must point to a file
 * successfully opened by <b>gzopen</b>.
 * </p>
 * @param int|null $length <p>
 * The length of data to get.
 * </p>
 * @return string|false The uncompressed string, or <b>FALSE</b> on error.
 */
function gzgets($stream, ?int $length = null): string|false {}

/**
 * Get line from gz-file pointer and strip HTML tags
 * @link https://php.net/manual/en/function.gzgetss.php
 * @param resource $zp <p>
 * The gz-file pointer. It must be valid, and must point to a file
 * successfully opened by <b>gzopen</b>.
 * </p>
 * @param int $length [optional] <p>
 * The length of data to get.
 * </p>
 * @param string $allowable_tags [optional] <p>
 * You can use this optional parameter to specify tags which should not
 * be stripped.
 * </p>
 * @return string|false The uncompressed and striped string, or <b>FALSE</b> on error.
 * @removed 8.0
 */
#[Deprecated(since: "7.3")]
function gzgetss($zp, int $length, $allowable_tags) {}

/**
 * Binary-safe gz-file read
 * @link https://php.net/manual/en/function.gzread.php
 * @param resource $stream <p>
 * The gz-file pointer. It must be valid, and must point to a file
 * successfully opened by <b>gzopen</b>.
 * </p>
 * @param int $length <p>
 * The number of bytes to read.
 * </p>
 * @return string|false The data that have been read.
 */
function gzread($stream, int $length): string|false {}

/**
 * Open gz-file
 * @link https://php.net/manual/en/function.gzopen.php
 * @param string $filename <p>
 * The file name.
 * </p>
 * @param string $mode <p>
 * As in <b>fopen</b> (rb or
 * wb) but can also include a compression level
 * (wb9) or a strategy: f for
 * filtered data as in wb6f, h for
 * Huffman only compression as in wb1h.
 * (See the description of deflateInit2
 * in zlib.h for
 * more information about the strategy parameter.)
 * </p>
 * @param int $use_include_path [optional] <p>
 * You can set this optional parameter to 1, if you
 * want to search for the file in the include_path too.
 * </p>
 * @return resource|false a file pointer to the file opened, after that, everything you read
 * from this file descriptor will be transparently decompressed and what you
 * write gets compressed.
 * </p>
 * <p>
 * If the open fails, the function returns <b>FALSE</b>.
 */
function gzopen(string $filename, string $mode, int $use_include_path = 0) {}

/**
 * Output all remaining data on a gz-file pointer
 * @link https://php.net/manual/en/function.gzpassthru.php
 * @param resource $stream <p>
 * The gz-file pointer. It must be valid, and must point to a file
 * successfully opened by <b>gzopen</b>.
 * </p>
 * @return int The number of uncompressed characters read from <i>gz</i>
 * and passed through to the input, or <b>FALSE</b> on error.
 */
function gzpassthru($stream): int {}

/**
 * Seek on a gz-file pointer
 * @link https://php.net/manual/en/function.gzseek.php
 * @param resource $stream <p>
 * The gz-file pointer. It must be valid, and must point to a file
 * successfully opened by <b>gzopen</b>.
 * </p>
 * @param int $offset <p>
 * The seeked offset.
 * </p>
 * @param int $whence [optional] <p>
 * <i>whence</i> values are:
 * <b>SEEK_SET</b> - Set position equal to <i>offset</i> bytes.
 * <b>SEEK_CUR</b> - Set position to current location plus <i>offset</i>.
 * </p>
 * <p>
 * If <i>whence</i> is not specified, it is assumed to be
 * <b>SEEK_SET</b>.
 * </p>
 * @return int Upon success, returns 0; otherwise, returns -1. Note that seeking
 * past EOF is not considered an error.
 */
function gzseek($stream, int $offset, int $whence = SEEK_SET): int {}

/**
 * Tell gz-file pointer read/write position
 * @link https://php.net/manual/en/function.gztell.php
 * @param resource $stream <p>
 * The gz-file pointer. It must be valid, and must point to a file
 * successfully opened by <b>gzopen</b>.
 * </p>
 * @return int|false The position of the file pointer or <b>FALSE</b> if an error occurs.
 */
function gztell($stream): int|false {}

/**
 * Binary-safe gz-file write
 * @link https://php.net/manual/en/function.gzwrite.php
 * @param resource $stream <p>
 * The gz-file pointer. It must be valid, and must point to a file
 * successfully opened by <b>gzopen</b>.
 * </p>
 * @param string $data <p>
 * The string to write.
 * </p>
 * @param int|null $length [optional] <p>
 * The number of uncompressed bytes to write. If supplied, writing will
 * stop after <i>length</i> (uncompressed) bytes have been
 * written or the end of <i>string</i> is reached,
 * whichever comes first.
 * </p>
 * <p>
 * Note that if the <i>length</i> argument is given,
 * then the magic_quotes_runtime
 * configuration option will be ignored and no slashes will be
 * stripped from <i>string</i>.
 * </p>
 * @return int|false the number of (uncompressed) bytes written to the given gz-file
 * stream.
 */
function gzwrite($stream, string $data, ?int $length): int|false {}

/**
 * Alias of <b>gzwrite</b>
 * @link https://php.net/manual/en/function.gzputs.php
 * @param resource $stream
 * @param string $data
 * @param int|null $length [optional]
 * @return int|false
 */
function gzputs($stream, string $data, ?int $length): int|false {}

/**
 * Read entire gz-file into an array
 * @link https://php.net/manual/en/function.gzfile.php
 * @param string $filename <p>
 * The file name.
 * </p>
 * @param int $use_include_path [optional] <p>
 * You can set this optional parameter to 1, if you
 * want to search for the file in the include_path too.
 * </p>
 * @return array|false An array containing the file, one line per cell.
 */
function gzfile(string $filename, int $use_include_path = 0): array|false {}

/**
 * Compress a string
 * @link https://php.net/manual/en/function.gzcompress.php
 * @param string $data <p>
 * The data to compress.
 * </p>
 * @param int $level [optional] <p>
 * The level of compression. Can be given as 0 for no compression up to 9
 * for maximum compression.
 * </p>
 * <p>
 * If -1 is used, the default compression of the zlib library is used which is 6.
 * </p>
 * @param int $encoding [optional] <p>
 * One of <b>ZLIB_ENCODING_*</b> constants.
 * </p>
 * @return string|false The compressed string or <b>FALSE</b> if an error occurred.
 */
#[Pure]
function gzcompress(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_DEFLATE): string|false {}

/**
 * Uncompress a compressed string
 * @link https://php.net/manual/en/function.gzuncompress.php
 * @param string $data <p>
 * The data compressed by <b>gzcompress</b>.
 * </p>
 * @param int $max_length [optional] <p>
 * The maximum length of data to decode.
 * </p>
 * @return string|false The original uncompressed data or <b>FALSE</b> on error.
 * <p>
 * The function will return an error if the uncompressed data is more than
 * 32768 times the length of the compressed input <i>data</i>
 * or more than the optional parameter <i>length</i>.
 * </p>
 */
#[Pure]
function gzuncompress(string $data, int $max_length = 0): string|false {}

/**
 * Deflate a string
 * @link https://php.net/manual/en/function.gzdeflate.php
 * @param string $data <p>
 * The data to deflate.
 * </p>
 * @param int $level [optional] <p>
 * The level of compression. Can be given as 0 for no compression up to 9
 * for maximum compression. If not given, the default compression level will
 * be the default compression level of the zlib library.
 * </p>
 * @param int $encoding [optional] <p>
 * One of <b>ZLIB_ENCODING_*</b> constants.
 * </p>
 * @return string|false The deflated string or <b>FALSE</b> if an error occurred.
 */
#[Pure]
function gzdeflate(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_RAW): string|false {}

/**
 * Inflate a deflated string
 * @link https://php.net/manual/en/function.gzinflate.php
 * @param string $data <p>
 * The data compressed by <b>gzdeflate</b>.
 * </p>
 * @param int $max_length [optional] <p>
 * The maximum length of data to decode.
 * </p>
 * @return string|false The original uncompressed data or <b>FALSE</b> on error.
 * <p>
 * The function will return an error if the uncompressed data is more than
 * 32768 times the length of the compressed input <i>data</i>
 * or more than the optional parameter <i>length</i>.
 * </p>
 */
#[Pure]
function gzinflate(string $data, int $max_length = 0): string|false {}

/**
 * Create a gzip compressed string
 * @link https://php.net/manual/en/function.gzencode.php
 * @param string $data <p>
 * The data to encode.
 * </p>
 * @param int $level [optional] <p>
 * The level of compression. Can be given as 0 for no compression up to 9
 * for maximum compression. If not given, the default compression level will
 * be the default compression level of the zlib library.
 * </p>
 * @param int $encoding [optional] <p>
 * The encoding mode. Can be <b>FORCE_GZIP</b> (the default)
 * or <b>FORCE_DEFLATE</b>.
 * </p>
 * <p>
 * Prior to PHP 5.4.0, using <b>FORCE_DEFLATE</b> results in
 * a standard zlib deflated string (inclusive zlib headers) after a gzip
 * file header but without the trailing crc32 checksum.
 * </p>
 * <p>
 * In PHP 5.4.0 and later, <b>FORCE_DEFLATE</b> generates
 * RFC 1950 compliant output, consisting of a zlib header, the deflated
 * data, and an Adler checksum.
 * </p>
 * @return string|false The encoded string, or <b>FALSE</b> if an error occurred.
 */
#[Pure]
function gzencode(string $data, int $level = -1, int $encoding = FORCE_GZIP): string|false {}

/**
 * Decodes a gzip compressed string
 * @link https://php.net/manual/en/function.gzdecode.php
 * @param string $data <p>
 * The data to decode, encoded by <b>gzencode</b>.
 * </p>
 * @param int $max_length <p>
 * The maximum length of data to decode.
 * </p>
 * @return string|false The decoded string, or <b>FALSE</b> if an error occurred.
 * @since 5.4
 */
#[Pure]
function gzdecode(string $data, int $max_length = 0): string|false {}

/**
 * Compress data with the specified encoding
 * @link https://php.net/manual/en/function.zlib-encode.php
 * @param string $data <p>
 * </p>
 * @param int $encoding <p>
 * </p>
 * @param int $level [optional] default -1 <p>
 * </p>
 * @return string|false
 * @since 5.4
 */
#[Pure]
function zlib_encode(string $data, int $encoding, int $level = -1): string|false {}

/**
 * Uncompress any raw/gzip/zlib encoded data
 * @link https://php.net/manual/en/function.zlib-decode.php
 * @param string $data <p>
 * </p>
 * @param int $max_length <p>
 * </p>
 * @return string|false
 * @since 5.4
 */
#[Pure]
function zlib_decode(string $data, int $max_length = 0): string|false {}

/**
 * Returns the coding type used for output compression
 * @link https://php.net/manual/en/function.zlib-get-coding-type.php
 * @return string|false Possible return values are gzip, deflate,
 * or <b>FALSE</b>.
 */
#[Pure]
function zlib_get_coding_type(): string|false {}

/**
 * ob_start callback function to gzip output buffer
 * @link https://php.net/manual/en/function.ob-gzhandler.php
 * @param string $data
 * @param int $flags
 * @return string|false
 */
function ob_gzhandler(string $data, int $flags): string|false {}

/**
 * Initialize an incremental deflate context
 * @link https://php.net/manual/en/function.deflate-init.php
 * @param int $encoding <p>
 * One of the <b>ZLIB_ENCODING_*</b> constants.
 * </p>
 * @param array $options <p>
 * An associative array which may contain the following elements:
 * <b>level</b>The compression level in range -1..9; defaults to -1.
 * <b>memory</b>The compression memory level in range 1..9; defaults to 8.
 * <b>window</b>The zlib window size (logarithmic) in range 8..15; defaults
 * to 15. <b>strategy</b>One of <b>ZLIB_FILTERED</b>, <b>ZLIB_HUFFMAN_ONLY</b>,
 * <b>ZLIB_RLE</b>, <b>ZLIB_FIXED</b> or <b>ZLIB_DEFAULT_STRATEGY</b> (the
 * default). <b>dictionary</b>A string or an array of strings of the preset
 * dictionary (default: no preset dictionary).</p>
 * @return resource|false|DeflateContext <p>
 * Returns a deflate context resource (zlib.deflate) on success, or
 * <b>FALSE</b> on failure.
 * </p>
 * @since 7.0
 */
#[Pure]
#[LanguageLevelTypeAware(["8.0" => "DeflateContext|false"], default: "resource|false")]
function deflate_init(int $encoding, array $options = []) {}

/**
 * Incrementally deflate data
 * @link https://php.net/manual/en/function.deflate-add.php
 * @param DeflateContext|resource $context <p>
 * A context created with <b>deflate_init()</b>.
 * </p>
 * @param string $data <p>
 * A chunk of data to compress.
 * </p>
 * @param int $flush_mode [optional] <p>
 * One of <b>ZLIB_BLOCK</b>, <b>ZLIB_NO_FLUSH</b>, <b>ZLIB_PARTIAL_FLUSH</b>,
 * <b>ZLIB_SYNC_FLUSH</b> (default), <b>ZLIB_FULL_FLUSH</b>,
 * <b>ZLIB_FINISH</b>. Normally you will want to set <b>ZLIB_NO_FLUSH</b> to
 * maximize compression, and <b>ZLIB_FINISH</b> to terminate with
 * the last chunk of data.
 * </p>
 * @return string|false <p>
 * Returns a chunk of compressed data, or <b>FALSE</b> on failure.
 * </p>
 * @since 7.0
 */
function deflate_add(#[LanguageLevelTypeAware(["8.0" => "DeflateContext"], default: "resource")] $context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH): string|false {}

/**
 * Initialize an incremental inflate context
 * @link https://php.net/manual/en/function.inflate-init.php
 * @param int $encoding <p>
 * One of the ZLIB_ENCODING_* constants.
 * </p>
 * @param array $options [optional] <p>
 * An associative array which may contain the following elements:
 * <b>level</b>The compression level in range -1..9; defaults to -1.
 * <b>memory</b>The compression memory level in range 1..9; defaults to 8.
 * <b>window</b>The zlib window size (logarithmic) in range 8..15; defaults
 * to 15. <b>strategy</b>One of <b>ZLIB_FILTERED</b>, <b>ZLIB_HUFFMAN_ONLY</b>,
 * <b>ZLIB_RLE</b>, <b>ZLIB_FIXED</b> or <b>ZLIB_DEFAULT_STRATEGY</b> (the
 * default). <b>dictionary</b>A string or an array of strings of the preset
 * dictionary (default: no preset dictionary).</p>
 * @return resource|false|InflateContext <p>
 * Returns an inflate context resource (zlib.inflate) on success, or
 * <b>FALSE</b> on failure.
 * </p>
 * @since 7.0
 */
#[Pure]
#[LanguageLevelTypeAware(["8.0" => "InflateContext|false"], default: "resource|false")]
function inflate_init(int $encoding, array $options = []) {}

/**
 * Incrementally inflate encoded data
 * @link https://php.net/manual/en/function.inflate-add.php
 * @param InflateContext|resource $context <p>
 * A context created with <b>inflate_init()</b>.
 * </p>
 * @param string $data <p>
 * A chunk of compressed data.
 * </p>
 * @param int $flush_mode [optional] <p>
 * One of <b>ZLIB_BLOCK</b>, <b>ZLIB_NO_FLUSH</b>, <b>ZLIB_PARTIAL_FLUSH</b>,
 * <b>ZLIB_SYNC_FLUSH</b> (default), <b>ZLIB_FULL_FLUSH</b>,
 * <b>ZLIB_FINISH</b>. Normally you will want to set <b>ZLIB_NO_FLUSH</b> to
 * maximize compression, and <b>ZLIB_FINISH</b> to terminate with
 * the last chunk of data.
 * </p>
 * @return string|false <p>
 * Returns a chunk of uncompressed data, or <b>FALSE</b> on failure.
 * </p>
 * @since 7.0
 */
function inflate_add(#[LanguageLevelTypeAware(["8.0" => "InflateContext"], default: "resource")] $context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH): string|false {}

/**
 * Get number of bytes read so far
 * @param InflateContext|resource $context
 * @return int
 * @since 7.2
 */
#[Pure]
function inflate_get_read_len(#[LanguageLevelTypeAware(["8.0" => "InflateContext"], default: "resource")] $context): int {}

/**
 * Get decompression status
 * @param InflateContext|resource $context
 * @return int
 * @since 7.2
 */
#[Pure]
function inflate_get_status(#[LanguageLevelTypeAware(["8.0" => "InflateContext"], default: "resource")] $context): int {}

/**
 * @since 8.0
 */
final class InflateContext
{
    /**
     * Use inflate_init() instead
     * @see inflate_init()
     */
    private function __construct() {}
}

/**
 * @since 8.0
 */
final class DeflateContext
{
    /**
     * Use deflate_init() instead
     * @see deflate_init()
     */
    private function __construct() {}
}

define('FORCE_GZIP', 31);
define('FORCE_DEFLATE', 15);
/** @link https://php.net/manual/en/zlib.constants.php */
define('ZLIB_ENCODING_RAW', -15);
/** @link https://php.net/manual/en/zlib.constants.php */
define('ZLIB_ENCODING_GZIP', 31);
/** @link https://php.net/manual/en/zlib.constants.php */
define('ZLIB_ENCODING_DEFLATE', 15);

define('ZLIB_NO_FLUSH', 0);
define('ZLIB_PARTIAL_FLUSH', 1);
define('ZLIB_SYNC_FLUSH', 2);
define('ZLIB_FULL_FLUSH', 3);
define('ZLIB_BLOCK', 5);
define('ZLIB_FINISH', 4);

define('ZLIB_FILTERED', 1);
define('ZLIB_HUFFMAN_ONLY', 2);
define('ZLIB_RLE', 3);
define('ZLIB_FIXED', 4);
define('ZLIB_DEFAULT_STRATEGY', 0);
define('ZLIB_OK', 0);
define('ZLIB_STREAM_END', 1);
define('ZLIB_NEED_DICT', 2);
define('ZLIB_ERRNO', -1);
define('ZLIB_STREAM_ERROR', -2);
define('ZLIB_DATA_ERROR', -3);
define('ZLIB_MEM_ERROR', -4);
define('ZLIB_BUF_ERROR', -5);
define('ZLIB_VERSION_ERROR', -6);

define('ZLIB_VERSION', 'zlib_version_string'); // This is set to the zlib version
define('ZLIB_VERNUM', 'zlib_version_string'); // This is set to the zlib version
<?php
/**
 * Support Vector Machine Library

 * LibSVM is an efficient solver for SVM classification and regression problems. The svm extension wraps this in a PHP interface for easy use in PHP scripts.
 * @since 7.0
 * @link https://www.php.net/manual/en/class.svm.php
 */
class SVM
{
    /* Constants */
    /**
     * @const The basic C_SVC SVM type. The default, and a good starting point
     */
    public const C_SVC = 0;

    /**
     * @const NU_SVC type uses a different, more flexible, error weighting
     */
    public const NU_SVC = 1;

    /**
     * @const One class SVM type. Train just on a single class, using outliers as negative examples
     */
    public const ONE_CLASS = 2;

    /**
     * @const A SVM type for regression (predicting a value rather than just a class)
     */
    public const EPSILON_SVR = 3;

    /**
     * @const A NU style SVM regression type
     */
    public const NU_SVR = 4;

    /**
     * @const A very simple kernel, can work well on large document classification problems
     */
    public const KERNEL_LINEAR = 0;

    /**
     * @const A polynomial kernel
     */
    public const KERNEL_POLY = 1;

    /**
     * @const The common Gaussian RBD kernel. Handles non-linear problems well and is a good default for classification
     */
    public const KERNEL_RBF = 2;

    /**
     * @const A kernel based on the sigmoid function. Using this makes the SVM very similar to a two layer sigmoid based neural network
     */
    public const KERNEL_SIGMOID = 3;

    /**
     * @const A precomputed kernel - currently unsupported.
     */
    public const KERNEL_PRECOMPUTED = 4;

    /**
     * @const The options key for the SVM type
     */
    public const OPT_TYPE = 101;

    /**
     * @const The options key for the kernel type
     */
    public const OPT_KERNEL_TYPE = 102;

    /**
     * @const OPT_DEGREE
     */
    public const OPT_DEGREE = 103;

    /**
     * @const Training parameter, boolean, for whether to use the shrinking heuristics
     */
    public const OPT_SHRINKING = 104;

    /**
     * @const Training parameter, boolean, for whether to collect and use probability estimates
     */
    public const OPT_PROPABILITY = 105;

    /**
     * @const Algorithm parameter for Poly, RBF and Sigmoid kernel types.
     */
    public const OPT_GAMMA = 201;

    /**
     * @const The option key for the nu parameter, only used in the NU_ SVM types
     */
    public const OPT_NU = 202;

    /**
     * @const The option key for the Epsilon parameter, used in epsilon regression
     */
    public const OPT_EPS = 203;

    /**
     * @const Training parameter used by Episilon SVR regression
     */
    public const OPT_P = 204;

    /**
     * @const Algorithm parameter for poly and sigmoid kernels
     */
    public const OPT_COEF_ZERO = 205;

    /**
     * @const The option for the cost parameter that controls tradeoff between errors and generality - effectively the penalty for misclassifying training examples.
     */
    public const OPT_C = 206;

    /**
     * @const Memory cache size, in MB
     */
    public const OPT_CACHE_SIZE = 207;

    /* Methods */
    /**
     * Construct a new SVM object
     *
     * Constructs a new SVM object ready to accept training data.
     * @throws SVMException Throws SVMException if the libsvm library could not be loaded
     * @link https://www.php.net/manual/en/svm.construct.php
     */
    public function __construct() {}

    /**
     * Test training params on subsets of the training data
     *
     * Crossvalidate can be used to test the effectiveness of the current parameter set on a subset of the training data. Given a problem set and a n "folds", it separates the problem set into n subsets, and the repeatedly trains on one subset and tests on another. While the accuracy will generally be lower than a SVM trained on the enter data set, the accuracy score returned should be relatively useful, so it can be used to test different training parameters.
     * @param array $problem The problem data. This can either be in the form of an array, the URL of an SVMLight formatted file, or a stream to an opened SVMLight formatted datasource.
     * @param int $number_of_folds The number of sets the data should be divided into and cross tested. A higher number means smaller training sets and less reliability. 5 is a good number to start with.
     * @return float The correct percentage, expressed as a floating point number from 0-1. In the case of NU_SVC or EPSILON_SVR kernels the mean squared error will returned instead.
     * @link https://www.php.net/manual/en/svm.crossvalidate.php
     */
    public function crossvalidate(array $problem, int $number_of_folds): float {}

    /**
     * Return the current training parameters
     *
     * Retrieve an array containing the training parameters. The parameters will be keyed on the predefined SVM constants.
     * @return array Returns an array of configuration settings.
     * @link https://www.php.net/manual/en/svm.getoptions.php
     */
    public function getOptions(): array {}

    /**
     * Set training parameters
     *
     * Set one or more training parameters.
     * @param array $params An array of training parameters, keyed on the SVM constants.
     * @return bool Return true on success, throws SVMException on error.
     * @throws SVMException
     * @link https://www.php.net/manual/en/svm.setoptions.php
     */
    public function setOptions(array $params): bool {}

    /**
     * Create a SVMModel based on training data
     *
     * Train a support vector machine based on the supplied training data.
     * @param array $problem The problem can be provided in three different ways. An array, where the data should start with the class label (usually 1 or -1) then followed by a sparse data set of dimension => data pairs. A URL to a file containing a SVM Light formatted problem, with the each line being a new training example, the start of each line containing the class (1, -1) then a series of tab separated data values shows as key:value. A opened stream pointing to a data source formatted as in the file above.
     * @param array|null $weights Weights are an optional set of weighting parameters for the different classes, to help account for unbalanced training sets. For example, if the classes were 1 and -1, and -1 had significantly more example than one, the weight for -1 could be 0.5. Weights should be in the range 0-1.
     * @return SVMModel Returns an SVMModel that can be used to classify previously unseen data. Throws SVMException on error
     * @throws SMVException
     * @link https://www.php.net/manual/en/svm.train.php
     */
    public function train(array $problem, array $weights = null): SVMModel {}
}
<?php

/**
 * The SVMModel is the end result of the training process. It can be used to classify previously unseen data.
 * @since 7.0
 * @link https://www.php.net/manual/en/class.svmmodel.php
 */
class SVMModel
{
    /* Methods */
    /**
     * Returns true if the model has probability information
     *
     * @return bool Return a boolean value
     * @link https://www.php.net/manual/en/svmmodel.checkprobabilitymodel.php
     */
    public function checkProbabilityModel(): bool {}

    /**
     * Construct a new SVMModel
     *
     * Build a new SVMModel. Models will usually be created from the SVM::train function, but then saved models may be restored directly.
     * @param string $filename The filename for the saved model file this model should load.
     * @throws Throws SVMException on error
     * @link https://www.php.net/manual/en/svmmodel.construct.php
     */
    public function __construct(string $filename = '') {}

    /**
     * Get the labels the model was trained on
     *
     * Return an array of labels that the model was trained on. For regression and one class models an empty array is returned.
     * @return array Return an array of labels
     * @link https://www.php.net/manual/en/svmmodel.getlabels.php
     */
    public function getLabels(): array {}

    /**
     * Returns the number of classes the model was trained with
     *
     * Returns the number of classes the model was trained with, will return 2 for one class and regression models.
     * @return int Return an integer number of classes
     * @link https://www.php.net/manual/en/svmmodel.getnrclass.php
     */
    public function getNrClass(): int {}

    /**
     * Get the SVM type the model was trained with
     *
     * Returns an integer value representing the type of the SVM model used, e.g SVM::C_SVC.
     * @return int Return an integer SVM type
     * @link https://www.php.net/manual/en/svmmodel.getsvmtype.php
     */
    public function getSvmType(): int {}

    /**
     * Get the sigma value for regression types
     *
     * For regression models, returns a sigma value. If there is no probability information or the model is not SVR, 0 is returned.
     * @return float Returns a sigma value
     * @link https://www.php.net/manual/en/svmmodel.getsvrprobability.php
     */
    public function getSvrProbability(): float {}

    /**
     * Load a saved SVM Model
     * @param string $filename The filename of the model.
     * @return bool Returns true on success.
     * @throws SVMException
     * @link https://www.php.net/manual/en/svmmodel.load.php
     */
    public function load(string $filename): bool {}

    /**
     * Return class probabilities for previous unseen data
     *
     * This function accepts an array of data and attempts to predict the class, as with the predict function. Additionally, however, this function returns an array of probabilities, one per class in the model, which represent the estimated chance of the data supplied being a member of that class. Requires that the model to be used has been trained with the probability parameter set to true.
     * @param array $data The array to be classified. This should be a series of key => value pairs in increasing key order, but not necessarily continuous.
     * @return float the predicted value. This will be a class label in the case of classification, a real value in the case of regression. Throws SVMException on error
     * @throws SVMException Throws SVMException on error
     * @link https://www.php.net/manual/en/svmmodel.predict-probability.php
     */
    public function predict_probability(array $data): float {}

    /**
     * Predict a value for previously unseen data
     *
     * This function accepts an array of data and attempts to predict the class or regression value based on the model extracted from previously trained data.
     * @param array $data The array to be classified. This should be a series of key => value pairs in increasing key order, but not necessarily continuous.
     * @return float the predicted value. This will be a class label in the case of classification, a real value in the case of regression. Throws SVMException on error
     * @throws SVMException Throws SVMException on error
     * @link https://www.php.net/manual/en/svmmodel.predict.php
     */
    public function predict(array $data): float {}

    /**
     * Save a model to a file, for later use
     * @param string $filename The file to save the model to.
     * @return bool Throws SVMException on error. Returns true on success.
     * @throws SVMException Throws SVMException on error
     * @link https://www.php.net/manual/en/svmmodel.save.php
     */
    public function save(string $filename): bool {}
}
<?php

// Start of xml v.
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Pure;

/**
 * Create an XML parser
 * @link https://php.net/manual/en/function.xml-parser-create.php
 * @param string|null $encoding [optional] <p>
 * The optional <i>encoding</i> specifies the character
 * encoding for the input/output in PHP 4. Starting from PHP 5, the input
 * encoding is automatically detected, so that the
 * <i>encoding</i> parameter specifies only the output
 * encoding. In PHP 4, the default output encoding is the same as the
 * input charset. If empty string is passed, the parser attempts to identify
 * which encoding the document is encoded in by looking at the heading 3 or
 * 4 bytes. In PHP 5.0.0 and 5.0.1, the default output charset is
 * ISO-8859-1, while in PHP 5.0.2 and upper is UTF-8. The supported
 * encodings are ISO-8859-1, UTF-8 and
 * US-ASCII.
 * </p>
 * @return resource|false|XMLParser a resource handle for the new XML parser.
 */
#[Pure]
#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "resource")]
function xml_parser_create(?string $encoding) {}

/**
 * Create an XML parser with namespace support
 * @link https://php.net/manual/en/function.xml-parser-create-ns.php
 * @param string|null $encoding [optional] <p>
 * The optional <i>encoding</i> specifies the character
 * encoding for the input/output in PHP 4. Starting from PHP 5, the input
 * encoding is automatically detected, so that the
 * <i>encoding</i> parameter specifies only the output
 * encoding. In PHP 4, the default output encoding is the same as the
 * input charset. In PHP 5.0.0 and 5.0.1, the default output charset is
 * ISO-8859-1, while in PHP 5.0.2 and upper is UTF-8. The supported
 * encodings are ISO-8859-1, UTF-8 and
 * US-ASCII.
 * </p>
 * @param string $separator [optional] <p>
 * With a namespace aware parser tag parameters passed to the various
 * handler functions will consist of namespace and tag name separated by
 * the string specified in <i>separator</i>.
 * </p>
 * @return resource|false|XMLParser a resource handle for the new XML parser.
 */
#[Pure]
#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "resource")]
function xml_parser_create_ns(?string $encoding, string $separator = ':') {}

/**
 * Use XML Parser within an object
 * @link https://php.net/manual/en/function.xml-set-object.php
 * @param XMLParser|resource $parser <p>
 * A reference to the XML parser to use inside the object.
 * </p>
 * @param object $object <p>
 * The object where to use the XML parser.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
#[LanguageLevelTypeAware(["8.2" => "true"], default: "bool")]
function xml_set_object(#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "resource")] $parser, object $object) {}

/**
 * Set up start and end element handlers
 * @link https://php.net/manual/en/function.xml-set-element-handler.php
 * @param XMLParser|resource $parser <p>
 * A reference to the XML parser to set up start and end element handler functions.
 * </p>
 * @param callable $start_handler <p>
 * The function named by <i>start_element_handler</i>
 * must accept three parameters:
 * <b>start_element_handler</b>
 * <b>resource<i>parser</i></b>
 * <b>string<i>name</i></b>
 * <b>array<i>attribs</i></b>
 * <i>parser</i>
 * The first parameter, parser, is a
 * reference to the XML parser calling the handler.</p>
 * @param callable $end_handler <p>
 * The function named by <i>end_element_handler</i>
 * must accept two parameters:
 * <b>end_element_handler</b>
 * <b>resource<i>parser</i></b>
 * <b>string<i>name</i></b>
 * <i>parser</i>
 * The first parameter, parser, is a
 * reference to the XML parser calling the handler.</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
#[LanguageLevelTypeAware(["8.2" => "true"], default: "bool")]
function xml_set_element_handler(#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "resource")] $parser, $start_handler, $end_handler) {}

/**
 * Set up character data handler
 * @link https://php.net/manual/en/function.xml-set-character-data-handler.php
 * @param XMLParser|resource $parser <p>
 * A reference to the XML parser to set up character data handler function.
 * </p>
 * @param callable $handler <p>
 * <i>handler</i> is a string containing the name of a
 * function that must exist when <b>xml_parse</b> is called
 * for <i>parser</i>.
 * </p>
 * <p>
 * The function named by <i>handler</i> must accept
 * two parameters:
 * <b>handler</b>
 * <b>resource<i>parser</i></b>
 * <b>string<i>data</i></b>
 * <i>parser</i>
 * The first parameter, parser, is a
 * reference to the XML parser calling the handler.</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
#[LanguageLevelTypeAware(["8.2" => "true"], default: "bool")]
function xml_set_character_data_handler(#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "resource")] $parser, $handler) {}

/**
 * Set up processing instruction (PI) handler
 * @link https://php.net/manual/en/function.xml-set-processing-instruction-handler.php
 * @param XMLParser|resource $parser <p>
 * A reference to the XML parser to set up processing instruction (PI) handler function.
 * </p>
 * @param callable $handler <p>
 * <i>handler</i> is a string containing the name of a
 * function that must exist when <b>xml_parse</b> is called
 * for <i>parser</i>.
 * </p>
 * <p>
 * The function named by <i>handler</i> must accept
 * three parameters:
 * <b>handler</b>
 * <b>resource<i>parser</i></b>
 * <b>string<i>target</i></b>
 * <b>string<i>data</i></b>
 * <i>parser</i>
 * The first parameter, parser, is a
 * reference to the XML parser calling the handler.</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
#[LanguageLevelTypeAware(["8.2" => "true"], default: "bool")]
function xml_set_processing_instruction_handler(#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "resource")] $parser, $handler) {}

/**
 * Set up default handler
 * @link https://php.net/manual/en/function.xml-set-default-handler.php
 * @param XMLParser|resource $parser <p>
 * A reference to the XML parser to set up default handler function.
 * </p>
 * @param callable $handler <p>
 * <i>handler</i> is a string containing the name of a
 * function that must exist when <b>xml_parse</b> is called
 * for <i>parser</i>.
 * </p>
 * <p>
 * The function named by <i>handler</i> must accept
 * two parameters:
 * <b>handler</b>
 * <b>resource<i>parser</i></b>
 * <b>string<i>data</i></b>
 * <i>parser</i>
 * The first parameter, parser, is a
 * reference to the XML parser calling the handler.</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
#[LanguageLevelTypeAware(["8.2" => "true"], default: "bool")]
function xml_set_default_handler(#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "resource")] $parser, $handler) {}

/**
 * Set up unparsed entity declaration handler
 * @link https://php.net/manual/en/function.xml-set-unparsed-entity-decl-handler.php
 * @param XMLParser|resource $parser <p>
 * A reference to the XML parser to set up unparsed entity declaration handler function.
 * </p>
 * @param callable $handler <p>
 * <i>handler</i> is a string containing the name of a
 * function that must exist when <b>xml_parse</b> is called
 * for <i>parser</i>.
 * </p>
 * <p>
 * The function named by <i>handler</i> must accept six
 * parameters:
 * <b>handler</b>
 * <b>resource<i>parser</i></b>
 * <b>string<i>entity_name</i></b>
 * <b>string<i>base</i></b>
 * <b>string<i>system_id</i></b>
 * <b>string<i>public_id</i></b>
 * <b>string<i>notation_name</i></b>
 * <i>parser</i>
 * The first parameter, parser, is a
 * reference to the XML parser calling the
 * handler.</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
#[LanguageLevelTypeAware(["8.2" => "true"], default: "bool")]
function xml_set_unparsed_entity_decl_handler(#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "resource")] $parser, $handler) {}

/**
 * Set up notation declaration handler
 * @link https://php.net/manual/en/function.xml-set-notation-decl-handler.php
 * @param XMLParser|resource $parser <p>
 * A reference to the XML parser to set up notation declaration handler function.
 * </p>
 * @param callable $handler <p>
 * <i>handler</i> is a string containing the name of a
 * function that must exist when <b>xml_parse</b> is called
 * for <i>parser</i>.
 * </p>
 * <p>
 * The function named by <i>handler</i> must accept
 * five parameters:
 * <b>handler</b>
 * <b>resource<i>parser</i></b>
 * <b>string<i>notation_name</i></b>
 * <b>string<i>base</i></b>
 * <b>string<i>system_id</i></b>
 * <b>string<i>public_id</i></b>
 * <i>parser</i>
 * The first parameter, parser, is a
 * reference to the XML parser calling the handler.</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
#[LanguageLevelTypeAware(["8.2" => "true"], default: "bool")]
function xml_set_notation_decl_handler(#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "resource")] $parser, $handler) {}

/**
 * Set up external entity reference handler
 * @link https://php.net/manual/en/function.xml-set-external-entity-ref-handler.php
 * @param XMLParser|resource $parser <p>
 * A reference to the XML parser to set up external entity reference handler function.
 * </p>
 * @param callable $handler <p>
 * <i>handler</i> is a string containing the name of a
 * function that must exist when <b>xml_parse</b> is called
 * for <i>parser</i>.
 * </p>
 * <p>
 * The function named by <i>handler</i> must accept
 * five parameters, and should return an integer value.If the
 * value returned from the handler is <b>FALSE</b> (which it will be if no
 * value is returned), the XML parser will stop parsing and
 * <b>xml_get_error_code</b> will return
 * <b>XML_ERROR_EXTERNAL_ENTITY_HANDLING</b>.
 * <b>handler</b>
 * <b>resource<i>parser</i></b>
 * <b>string<i>open_entity_names</i></b>
 * <b>string<i>base</i></b>
 * <b>string<i>system_id</i></b>
 * <b>string<i>public_id</i></b>
 * <i>parser</i>
 * The first parameter, parser, is a
 * reference to the XML parser calling the handler.</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
#[LanguageLevelTypeAware(["8.2" => "true"], default: "bool")]
function xml_set_external_entity_ref_handler(#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "resource")] $parser, $handler) {}

/**
 * Set up start namespace declaration handler
 * @link https://php.net/manual/en/function.xml-set-start-namespace-decl-handler.php
 * @param XMLParser|resource $parser <p>
 * A reference to the XML parser.
 * </p>
 * @param callable $handler <p>
 * <i>handler</i> is a string containing the name of a
 * function that must exist when <b>xml_parse</b> is called
 * for <i>parser</i>.
 * </p>
 * <p>
 * The function named by <i>handler</i> must accept
 * three parameters, and should return an integer value. If the
 * value returned from the handler is <b>FALSE</b> (which it will be if no
 * value is returned), the XML parser will stop parsing and
 * <b>xml_get_error_code</b> will return
 * <b>XML_ERROR_EXTERNAL_ENTITY_HANDLING</b>.
 * <b>handler</b>
 * <b>resource<i>parser</i></b>
 * <b>string<i>prefix</i></b>
 * <b>string<i>uri</i></b>
 * <i>parser</i>
 * The first parameter, parser, is a
 * reference to the XML parser calling the handler.</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
#[LanguageLevelTypeAware(["8.2" => "true"], default: "bool")]
function xml_set_start_namespace_decl_handler(#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "resource")] $parser, $handler) {}

/**
 * Set up end namespace declaration handler
 * @link https://php.net/manual/en/function.xml-set-end-namespace-decl-handler.php
 * @param XMLParser|resource $parser <p>
 * A reference to the XML parser.
 * </p>
 * @param callable $handler <p>
 * <i>handler</i> is a string containing the name of a
 * function that must exist when <b>xml_parse</b> is called
 * for <i>parser</i>.
 * </p>
 * <p>
 * The function named by <i>handler</i> must accept
 * two parameters, and should return an integer value. If the
 * value returned from the handler is <b>FALSE</b> (which it will be if no
 * value is returned), the XML parser will stop parsing and
 * <b>xml_get_error_code</b> will return
 * <b>XML_ERROR_EXTERNAL_ENTITY_HANDLING</b>.
 * <b>handler</b>
 * <b>resource<i>parser</i></b>
 * <b>string<i>prefix</i></b>
 * <i>parser</i>
 * The first parameter, parser, is a
 * reference to the XML parser calling the handler.</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
#[LanguageLevelTypeAware(["8.2" => "true"], default: "bool")]
function xml_set_end_namespace_decl_handler(#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "resource")] $parser, $handler) {}

/**
 * Start parsing an XML document
 * @link https://php.net/manual/en/function.xml-parse.php
 * @param XMLParser|resource $parser <p>
 * A reference to the XML parser to use.
 * </p>
 * @param string $data <p>
 * Chunk of data to parse. A document may be parsed piece-wise by
 * calling <b>xml_parse</b> several times with new data,
 * as long as the <i>is_final</i> parameter is set and
 * <b>TRUE</b> when the last data is parsed.
 * </p>
 * @param bool $is_final [optional] <p>
 * If set and <b>TRUE</b>, <i>data</i> is the last piece of
 * data sent in this parse.
 * </p>
 * @return int 1 on success or 0 on failure.
 * <p>
 * For unsuccessful parses, error information can be retrieved with
 * <b>xml_get_error_code</b>,
 * <b>xml_error_string</b>,
 * <b>xml_get_current_line_number</b>,
 * <b>xml_get_current_column_number</b> and
 * <b>xml_get_current_byte_index</b>.
 * </p>
 * <p>
 * Entity errors are reported at the end of the data thus only if
 * <i>is_final</i> is set and <b>TRUE</b>.
 * </p>
 */
function xml_parse(#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "resource")] $parser, string $data, bool $is_final = false): int {}

/**
 * Parse XML data into an array structure
 * @link https://php.net/manual/en/function.xml-parse-into-struct.php
 * @param XMLParser|resource $parser <p>
 * A reference to the XML parser.
 * </p>
 * @param string $data <p>
 * A string containing the XML data.
 * </p>
 * @param array &$values <p>
 * An array containing the values of the XML data
 * </p>
 * @param array &$index [optional] <p>
 * An array containing pointers to the location of the appropriate values in the $values.
 * </p>
 * @return int <b>xml_parse_into_struct</b> returns 0 for failure and 1 for
 * success. This is not the same as <b>FALSE</b> and <b>TRUE</b>, be careful with
 * operators such as ===.
 */
function xml_parse_into_struct(#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "resource")] $parser, string $data, &$values, &$index): int {}

/**
 * Get XML parser error code
 * @link https://php.net/manual/en/function.xml-get-error-code.php
 * @param XMLParser|resource $parser <p>
 * A reference to the XML parser to get error code from.
 * </p>
 * @return int|false Returns one of the error codes listed in the error codes
 * section.
 */
#[Pure]
#[LanguageLevelTypeAware(["8.0" => "int"], default: "int|false")]
function xml_get_error_code(#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "resource")] $parser) {}

/**
 * Get XML parser error string
 * @link https://php.net/manual/en/function.xml-error-string.php
 * @param int $error_code <p>
 * An error code from <b>xml_get_error_code</b>.
 * </p>
 * @return string|null a string with a textual description of the error
 * <i>code</i>, or <b>FALSE</b> if no description was found.
 */
#[Pure]
function xml_error_string(int $error_code): ?string {}

/**
 * Get current line number for an XML parser
 * @link https://php.net/manual/en/function.xml-get-current-line-number.php
 * @param XMLParser|resource $parser <p>
 * A reference to the XML parser to get line number from.
 * </p>
 * @return int|false This function returns <b>FALSE</b> if <i>parser</i> does
 * not refer to a valid parser, or else it returns which line the
 * parser is currently at in its data buffer.
 */
#[Pure]
#[LanguageLevelTypeAware(["8.0" => "int"], default: "int|false")]
function xml_get_current_line_number(#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "resource")] $parser) {}

/**
 * Get current column number for an XML parser
 * @link https://php.net/manual/en/function.xml-get-current-column-number.php
 * @param XMLParser|resource $parser <p>
 * A reference to the XML parser to get column number from.
 * </p>
 * @return int|false This function returns <b>FALSE</b> if <i>parser</i> does
 * not refer to a valid parser, or else it returns which column on
 * the current line (as given by
 * <b>xml_get_current_line_number</b>) the parser is
 * currently at.
 */
#[Pure]
#[LanguageLevelTypeAware(["8.0" => "int"], default: "int|false")]
function xml_get_current_column_number(#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "resource")] $parser) {}

/**
 * Get current byte index for an XML parser
 * @link https://php.net/manual/en/function.xml-get-current-byte-index.php
 * @param XMLParser|resource $parser <p>
 * A reference to the XML parser to get byte index from.
 * </p>
 * @return int|false This function returns <b>FALSE</b> if <i>parser</i> does
 * not refer to a valid parser, or else it returns which byte index
 * the parser is currently at in its data buffer (starting at 0).
 */
#[Pure]
#[LanguageLevelTypeAware(["8.0" => "int"], default: "int|false")]
function xml_get_current_byte_index(#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "resource")] $parser) {}

/**
 * Free an XML parser
 * @link https://php.net/manual/en/function.xml-parser-free.php
 * @param XMLParser|resource $parser A reference to the XML parser to free.
 * @return bool This function returns <b>FALSE</b> if <i>parser</i> does not
 * refer to a valid parser, or else it frees the parser and returns <b>TRUE</b>.
 */
function xml_parser_free(#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "resource")] $parser): bool {}

/**
 * Set options in an XML parser
 * @link https://php.net/manual/en/function.xml-parser-set-option.php
 * @param XMLParser|resource $parser <p>
 * A reference to the XML parser to set an option in.
 * </p>
 * @param int $option <p>
 * Which option to set. See below.
 * </p>
 * <p>
 * The following options are available:
 * <table>
 * XML parser options
 * <tr valign="top">
 * <td>Option constant</td>
 * <td>Data type</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td><b>XML_OPTION_CASE_FOLDING</b></td>
 * <td>integer</td>
 * <td>
 * Controls whether case-folding is enabled for this
 * XML parser. Enabled by default.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>XML_OPTION_SKIP_TAGSTART</b></td>
 * <td>integer</td>
 * <td>
 * Specify how many characters should be skipped in the beginning of a
 * tag name.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>XML_OPTION_SKIP_WHITE</b></td>
 * <td>integer</td>
 * <td>
 * Whether to skip values consisting of whitespace characters.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>XML_OPTION_TARGET_ENCODING</b></td>
 * <td>string</td>
 * <td>
 * Sets which target encoding to
 * use in this XML parser.By default, it is set to the same as the
 * source encoding used by <b>xml_parser_create</b>.
 * Supported target encodings are ISO-8859-1,
 * US-ASCII and UTF-8.
 * </td>
 * </tr>
 * </table>
 * </p>
 * @param mixed $value <p>
 * The option's new value.
 * </p>
 * @return bool This function returns <b>FALSE</b> if <i>parser</i> does not
 * refer to a valid parser, or if the option could not be set. Else the
 * option is set and <b>TRUE</b> is returned.
 */
function xml_parser_set_option(#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "resource")] $parser, int $option, $value): bool {}

/**
 * Get options from an XML parser
 * @link https://php.net/manual/en/function.xml-parser-get-option.php
 * @param XMLParser|resource $parser A reference to the XML parser to get an option from.
 * @param int $option Which option to fetch. <b>XML_OPTION_CASE_FOLDING</b>
 * and <b>XML_OPTION_TARGET_ENCODING</b> are available.
 * See <b>xml_parser_set_option</b> for their description.
 * @return string|int This function returns <b>FALSE</b> if <i>parser</i> does
 * not refer to a valid parser or if <i>option</i> isn't
 * valid (generates also a <b>E_WARNING</b>).
 * Else the option's value is returned.
 */
#[Pure]
function xml_parser_get_option(#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "resource")] $parser, int $option): string|int {}

define('XML_ERROR_NONE', 0);
define('XML_ERROR_NO_MEMORY', 1);
define('XML_ERROR_SYNTAX', 2);
define('XML_ERROR_NO_ELEMENTS', 3);
define('XML_ERROR_INVALID_TOKEN', 4);
define('XML_ERROR_UNCLOSED_TOKEN', 5);
define('XML_ERROR_PARTIAL_CHAR', 6);
define('XML_ERROR_TAG_MISMATCH', 7);
define('XML_ERROR_DUPLICATE_ATTRIBUTE', 8);
define('XML_ERROR_JUNK_AFTER_DOC_ELEMENT', 9);
define('XML_ERROR_PARAM_ENTITY_REF', 10);
define('XML_ERROR_UNDEFINED_ENTITY', 11);
define('XML_ERROR_RECURSIVE_ENTITY_REF', 12);
define('XML_ERROR_ASYNC_ENTITY', 13);
define('XML_ERROR_BAD_CHAR_REF', 14);
define('XML_ERROR_BINARY_ENTITY_REF', 15);
define('XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF', 16);
define('XML_ERROR_MISPLACED_XML_PI', 17);
define('XML_ERROR_UNKNOWN_ENCODING', 18);
define('XML_ERROR_INCORRECT_ENCODING', 19);
define('XML_ERROR_UNCLOSED_CDATA_SECTION', 20);
define('XML_ERROR_EXTERNAL_ENTITY_HANDLING', 21);
define('XML_OPTION_CASE_FOLDING', 1);
define('XML_OPTION_TARGET_ENCODING', 2);
define('XML_OPTION_SKIP_TAGSTART', 3);
define('XML_OPTION_SKIP_WHITE', 4);

/**
 * Holds the SAX implementation method.
 * Can be libxml or expat.
 * @link https://php.net/manual/en/xml.constants.php
 */
define('XML_SAX_IMPL', "libxml");

/**
 * @since 8.0
 */
final class XMLParser {}

// End of xml v.
<?php

/**
 * Abstract parent class for all SPL types.
 *
 * @link https://php.net/manual/en/class.spltype.php
 */
abstract class SplType
{
    /**
     * @var null Default value
     * @link https://php.net/manual/en/class.spltype.php#spltype.constants.default
     */
    public const __default = null;

    /**
     * Creates a new value of some type
     *
     * @param mixed $initial_value
     * @param bool $strict  If set to true then will throw UnexpectedValueException if value of other type will be assigned. True by default
     * @link https://php.net/manual/en/spltype.construct.php
     */
    public function __construct($initial_value = self::__default, $strict = true) {}
}

/**
 * The SplInt class is used to enforce strong typing of the integer type.
 *
 * @link https://php.net/manual/en/class.splint.php
 */
class SplInt extends SplType
{
    /**
     * @link https://php.net/manual/en/class.splint.php#splint.constants.default
     */
    public const __default = 0;
}

/**
 * The SplFloat class is used to enforce strong typing of the float type.
 *
 * @link https://php.net/manual/en/class.splfloat.php
 */
class SplFloat extends SplType
{
    public const __default = 0;
}

/**
 * SplEnum gives the ability to emulate and create enumeration objects natively in PHP.
 *
 * @link https://php.net/manual/en/class.splenum.php
 */
class SplEnum extends SplType
{
    /**
     * @link https://php.net/manual/en/class.splenum.php#splenum.constants.default
     */
    public const __default = null;

    /**
     * Returns all consts (possible values) as an array.
     *
     * @param bool $include_default Whether to include __default constant (property). False by default.
     * @return array
     * @link https://php.net/manual/en/splenum.getconstlist.php
     */
    public function getConstList($include_default = false) {}
}

/**
 * The SplBool class is used to enforce strong typing of the bool type.
 *
 * @link https://php.net/manual/en/class.splbool.php
 */
class SplBool extends SplEnum
{
    /**
     * @link https://php.net/manual/en/class.splbool.php#splbool.constants.default
     */
    public const __default = false;

    /**
     * @link https://php.net/manual/en/class.splbool.php#splbool.constants.false
     */
    public const false = false;

    /**
     * @link https://php.net/manual/en/class.splbool.php#splbool.constants.true
     */
    public const true = true;
}

/**
 * The SplString class is used to enforce strong typing of the string type.
 *
 * @link https://php.net/manual/en/class.splstring.php
 */
class SplString extends SplType
{
    /**
     * @link https://php.net/manual/en/class.splstring.php#splstring.constants.default
     */
    public const __default = 0;
}
<?php

/**
 * @link https://github.com/kjdev/php-ext-snappy#function--snappy_compress
 *
 * @param string $data The data to compress.
 * @return string|false The compressed string or FALSE if an error occurred.
 */
function snappy_compress(string $data): string|false {}

/**
 * @link https://github.com/kjdev/php-ext-snappy#function--snappy_uncompress
 *
 * @param string $data The data to compress.
 * @return string|false The original uncompressed data or FALSE on error.
 */
function snappy_uncompress(string $data): string|false {}
<?php
/**
 * Stubs for uploadprogress extension
 * @link https://pecl.php.net/package/uploadprogress
 */

/**
 * @param string $identifier
 * @param string $fieldname
 * @param int $maxlen
 * @return string|null
 * @since PECL uploadprogress >= 0.9.0
 */
function uploadprogress_get_contents(string $identifier, string $fieldname, int $maxlen = -1): ?string {}

/**
 * @param string $identifier
 * @return array|null
 * @since PECL uploadprogress >= 0.3.0
 */
function uploadprogress_get_info(string $identifier): ?array {}
<?php

use JetBrains\PhpStorm\Pure;

/**
 * @link https://php.net/manual/en/class.gmagick.php
 */
class Gmagick
{
    public const COLOR_BLACK = 0;
    public const COLOR_BLUE = 0;
    public const COLOR_CYAN = 0;
    public const COLOR_GREEN = 0;
    public const COLOR_RED = 0;
    public const COLOR_YELLOW = 0;
    public const COLOR_MAGENTA = 0;
    public const COLOR_OPACITY = 0;
    public const COLOR_ALPHA = 0;
    public const COLOR_FUZZ = 0;
    public const GMAGICK_EXTNUM = 0;
    public const COMPOSITE_DEFAULT = 0;
    public const COMPOSITE_UNDEFINED = 0;
    public const COMPOSITE_NO = 0;
    public const COMPOSITE_ADD = 0;
    public const COMPOSITE_ATOP = 0;
    public const COMPOSITE_BUMPMAP = 0;
    public const COMPOSITE_CLEAR = 0;
    public const COMPOSITE_COLORIZE = 0;
    public const COMPOSITE_COPYBLACK = 0;
    public const COMPOSITE_COPYBLUE = 0;
    public const COMPOSITE_COPY = 0;
    public const COMPOSITE_COPYCYAN = 0;
    public const COMPOSITE_COPYGREEN = 0;
    public const COMPOSITE_COPYMAGENTA = 0;
    public const COMPOSITE_COPYOPACITY = 0;
    public const COMPOSITE_COPYRED = 0;
    public const COMPOSITE_COPYYELLOW = 0;
    public const COMPOSITE_DARKEN = 0;
    public const COMPOSITE_DIFFERENCE = 0;
    public const COMPOSITE_DISPLACE = 0;
    public const COMPOSITE_DISSOLVE = 0;
    public const COMPOSITE_HUE = 0;
    public const COMPOSITE_IN = 0;
    public const COMPOSITE_LIGHTEN = 0;
    public const COMPOSITE_LUMINIZE = 0;
    public const COMPOSITE_MINUS = 0;
    public const COMPOSITE_MODULATE = 0;
    public const COMPOSITE_MULTIPLY = 0;
    public const COMPOSITE_OUT = 0;
    public const COMPOSITE_OVER = 0;
    public const COMPOSITE_OVERLAY = 0;
    public const COMPOSITE_PLUS = 0;
    public const COMPOSITE_REPLACE = 0;
    public const COMPOSITE_SATURATE = 0;
    public const COMPOSITE_SCREEN = 0;
    public const COMPOSITE_SUBTRACT = 0;
    public const COMPOSITE_THRESHOLD = 0;
    public const COMPOSITE_XOR = 0;
    public const COMPOSITE_DIVIDE = 0;
    public const COMPOSITE_HARDLIGHT = 0;
    public const COMPOSITE_EXCLUSION = 0;
    public const COMPOSITE_COLORDODGE = 0;
    public const COMPOSITE_COLORBURN = 0;
    public const COMPOSITE_SOFTLIGHT = 0;
    public const COMPOSITE_LINEARBURN = 0;
    public const COMPOSITE_LINEARDODGE = 0;
    public const COMPOSITE_LINEARLIGHT = 0;
    public const COMPOSITE_VIVIDLIGHT = 0;
    public const COMPOSITE_PINLIGHT = 0;
    public const COMPOSITE_HARDMIX = 0;
    public const MONTAGEMODE_FRAME = 0;
    public const MONTAGEMODE_UNFRAME = 0;
    public const MONTAGEMODE_CONCATENATE = 0;
    public const STYLE_NORMAL = 0;
    public const STYLE_ITALIC = 0;
    public const STYLE_OBLIQUE = 0;
    public const STYLE_ANY = 0;
    public const FILTER_UNDEFINED = 0;
    public const FILTER_POINT = 0;
    public const FILTER_BOX = 0;
    public const FILTER_TRIANGLE = 0;
    public const FILTER_HERMITE = 0;
    public const FILTER_HANNING = 0;
    public const FILTER_HAMMING = 0;
    public const FILTER_BLACKMAN = 0;
    public const FILTER_GAUSSIAN = 0;
    public const FILTER_QUADRATIC = 0;
    public const FILTER_CUBIC = 0;
    public const FILTER_CATROM = 0;
    public const FILTER_MITCHELL = 0;
    public const FILTER_LANCZOS = 0;
    public const FILTER_BESSEL = 0;
    public const FILTER_SINC = 0;
    public const IMGTYPE_UNDEFINED = 0;
    public const IMGTYPE_BILEVEL = 0;
    public const IMGTYPE_GRAYSCALE = 0;
    public const IMGTYPE_GRAYSCALEMATTE = 0;
    public const IMGTYPE_PALETTE = 0;
    public const IMGTYPE_PALETTEMATTE = 0;
    public const IMGTYPE_TRUECOLOR = 0;
    public const IMGTYPE_TRUECOLORMATTE = 0;
    public const IMGTYPE_COLORSEPARATION = 0;
    public const IMGTYPE_COLORSEPARATIONMATTE = 0;
    public const IMGTYPE_OPTIMIZE = 0;
    public const RESOLUTION_UNDEFINED = 0;
    public const RESOLUTION_PIXELSPERINCH = 0;
    public const RESOLUTION_PIXELSPERCENTIMETER = 0;
    public const COMPRESSION_UNDEFINED = 0;
    public const COMPRESSION_NO = 0;
    public const COMPRESSION_BZIP = 0;
    public const COMPRESSION_FAX = 0;
    public const COMPRESSION_GROUP4 = 0;
    public const COMPRESSION_JPEG = 0;
    public const COMPRESSION_LOSSLESSJPEG = 0;
    public const COMPRESSION_LZW = 0;
    public const COMPRESSION_RLE = 0;
    public const COMPRESSION_ZIP = 0;
    public const COMPRESSION_GROUP3 = 0;
    public const COMPRESSION_LZMA = 0;
    public const COMPRESSION_JPEG2000 = 0;
    public const COMPRESSION_JBIG1 = 0;
    public const COMPRESSION_JBIG2 = 0;
    public const INTERLACE_NONE = 0;
    public const INTERLACE_LINE = 0;
    public const INTERLACE_PLANE = 0;
    public const INTERLACE_PARTITION = 0;
    public const PAINT_POINT = 0;
    public const PAINT_REPLACE = 0;
    public const PAINT_FLOODFILL = 0;
    public const PAINT_FILLTOBORDER = 0;
    public const PAINT_RESET = 0;
    public const GRAVITY_NORTHWEST = 0;
    public const GRAVITY_NORTH = 0;
    public const GRAVITY_NORTHEAST = 0;
    public const GRAVITY_WEST = 0;
    public const GRAVITY_CENTER = 0;
    public const GRAVITY_EAST = 0;
    public const GRAVITY_SOUTHWEST = 0;
    public const GRAVITY_SOUTH = 0;
    public const GRAVITY_SOUTHEAST = 0;
    public const STRETCH_NORMAL = 0;
    public const STRETCH_ULTRACONDENSED = 0;
    public const STRETCH_CONDENSED = 0;
    public const STRETCH_SEMICONDENSED = 0;
    public const STRETCH_SEMIEXPANDED = 0;
    public const STRETCH_EXPANDED = 0;
    public const STRETCH_EXTRAEXPANDED = 0;
    public const STRETCH_ULTRAEXPANDED = 0;
    public const STRETCH_ANY = 0;
    public const STRETCH_EXTRACONDENSED = 0;
    public const ALIGN_UNDEFINED = 0;
    public const ALIGN_LEFT = 0;
    public const ALIGN_CENTER = 0;
    public const ALIGN_RIGHT = 0;
    public const DECORATION_NO = 0;
    public const DECORATION_UNDERLINE = 0;
    public const DECORATION_OVERLINE = 0;
    public const DECORATION_LINETROUGH = 0;
    public const NOISE_UNIFORM = 0;
    public const NOISE_GAUSSIAN = 0;
    public const NOISE_MULTIPLICATIVEGAUSSIAN = 0;
    public const NOISE_IMPULSE = 0;
    public const NOISE_LAPLACIAN = 0;
    public const NOISE_POISSON = 0;
    public const NOISE_RANDOM = 0;
    public const CHANNEL_UNDEFINED = 0;
    public const CHANNEL_RED = 0;
    public const CHANNEL_GRAY = 0;
    public const CHANNEL_CYAN = 0;
    public const CHANNEL_GREEN = 0;
    public const CHANNEL_MAGENTA = 0;
    public const CHANNEL_BLUE = 0;
    public const CHANNEL_YELLOW = 0;
    public const CHANNEL_OPACITY = 0;
    public const CHANNEL_MATTE = 0;
    public const CHANNEL_BLACK = 0;
    public const CHANNEL_INDEX = 0;
    public const CHANNEL_ALL = 0;
    public const CHANNEL_DEFAULT = 0;
    public const METRIC_UNDEFINED = 0;
    public const METRIC_MEANABSOLUTEERROR = 0;
    public const METRIC_MEANSQUAREERROR = 0;
    public const METRIC_PEAKABSOLUTEERROR = 0;
    public const METRIC_PEAKSIGNALTONOISERATIO = 0;
    public const METRIC_ROOTMEANSQUAREDERROR = 0;
    public const PIXEL_CHAR = 0;
    public const PIXEL_DOUBLE = 0;
    public const PIXEL_FLOAT = 0;
    public const PIXEL_INTEGER = 0;
    public const PIXEL_LONG = 0;
    public const PIXEL_SHORT = 0;
    public const COLORSPACE_UNDEFINED = 0;
    public const COLORSPACE_RGB = 0;
    public const COLORSPACE_GRAY = 0;
    public const COLORSPACE_TRANSPARENT = 0;
    public const COLORSPACE_OHTA = 0;
    public const COLORSPACE_LAB = 0;
    public const COLORSPACE_XYZ = 0;
    public const COLORSPACE_YCBCR = 0;
    public const COLORSPACE_YCC = 0;
    public const COLORSPACE_YIQ = 0;
    public const COLORSPACE_YPBPR = 0;
    public const COLORSPACE_YUV = 0;
    public const COLORSPACE_CMYK = 0;
    public const COLORSPACE_SRGB = 0;
    public const COLORSPACE_HSL = 0;
    public const COLORSPACE_HWB = 0;
    public const COLORSPACE_REC601LUMA = 0;
    public const COLORSPACE_REC709LUMA = 0;
    public const COLORSPACE_CINEONLOGRGB = 0;
    public const COLORSPACE_REC601YCBCR = 0;
    public const COLORSPACE_REC709YCBCR = 0;
    public const VIRTUALPIXELMETHOD_UNDEFINED = 0;
    public const VIRTUALPIXELMETHOD_CONSTANT = 0;
    public const VIRTUALPIXELMETHOD_EDGE = 0;
    public const VIRTUALPIXELMETHOD_MIRROR = 0;
    public const VIRTUALPIXELMETHOD_TILE = 0;
    public const PREVIEW_UNDEFINED = 0;
    public const PREVIEW_ROTATE = 0;
    public const PREVIEW_SHEAR = 0;
    public const PREVIEW_ROLL = 0;
    public const PREVIEW_HUE = 0;
    public const PREVIEW_SATURATION = 0;
    public const PREVIEW_BRIGHTNESS = 0;
    public const PREVIEW_GAMMA = 0;
    public const PREVIEW_SPIFF = 0;
    public const PREVIEW_DULL = 0;
    public const PREVIEW_GRAYSCALE = 0;
    public const PREVIEW_QUANTIZE = 0;
    public const PREVIEW_DESPECKLE = 0;
    public const PREVIEW_REDUCENOISE = 0;
    public const PREVIEW_ADDNOISE = 0;
    public const PREVIEW_SHARPEN = 0;
    public const PREVIEW_BLUR = 0;
    public const PREVIEW_THRESHOLD = 0;
    public const PREVIEW_EDGEDETECT = 0;
    public const PREVIEW_SPREAD = 0;
    public const PREVIEW_SOLARIZE = 0;
    public const PREVIEW_SHADE = 0;
    public const PREVIEW_RAISE = 0;
    public const PREVIEW_SEGMENT = 0;
    public const PREVIEW_SWIRL = 0;
    public const PREVIEW_IMPLODE = 0;
    public const PREVIEW_WAVE = 0;
    public const PREVIEW_OILPAINT = 0;
    public const PREVIEW_CHARCOALDRAWING = 0;
    public const PREVIEW_JPEG = 0;
    public const RENDERINGINTENT_UNDEFINED = 0;
    public const RENDERINGINTENT_SATURATION = 0;
    public const RENDERINGINTENT_PERCEPTUAL = 0;
    public const RENDERINGINTENT_ABSOLUTE = 0;
    public const RENDERINGINTENT_RELATIVE = 0;
    public const INTERLACE_UNDEFINED = 0;
    public const INTERLACE_NO = 0;
    public const FILLRULE_UNDEFINED = 0;
    public const FILLRULE_EVENODD = 0;
    public const FILLRULE_NONZERO = 0;
    public const PATHUNITS_USERSPACE = 0;
    public const PATHUNITS_USERSPACEONUSE = 0;
    public const PATHUNITS_OBJECTBOUNDINGBOX = 0;
    public const LINECAP_UNDEFINED = 0;
    public const LINECAP_BUTT = 0;
    public const LINECAP_ROUND = 0;
    public const LINECAP_SQUARE = 0;
    public const LINEJOIN_UNDEFINED = 0;
    public const LINEJOIN_MITER = 0;
    public const LINEJOIN_ROUND = 0;
    public const LINEJOIN_BEVEL = 0;
    public const RESOURCETYPE_UNDEFINED = 0;
    public const RESOURCETYPE_AREA = 0;
    public const RESOURCETYPE_DISK = 0;
    public const RESOURCETYPE_FILE = 0;
    public const RESOURCETYPE_MAP = 0;
    public const RESOURCETYPE_MEMORY = 0;
    public const RESOURCETYPE_PIXELS = 0;
    public const RESOURCETYPE_THREADS = 0;
    public const RESOURCETYPE_WIDTH = 0;
    public const RESOURCETYPE_HEIGHT = 0;
    public const DISPOSE_UNDEFINED = 0;
    public const DISPOSE_NONE = 0;
    public const DISPOSE_BACKGROUND = 0;
    public const DISPOSE_PREVIOUS = 0;
    public const ORIENTATION_UNDEFINED = 0;
    public const ORIENTATION_TOPLEFT = 0;
    public const ORIENTATION_TOPRIGHT = 0;
    public const ORIENTATION_BOTTOMRIGHT = 0;
    public const ORIENTATION_BOTTOMLEFT = 0;
    public const ORIENTATION_LEFTTOP = 0;
    public const ORIENTATION_RIGHTTOP = 0;
    public const ORIENTATION_RIGHTBOTTOM = 0;
    public const ORIENTATION_LEFTBOTTOM = 0;
    public const QUANTUM_DEPTH = 0;
    public const QUANTUM = 0;
    public const VERSION_LIB = 0;
    public const VERSION_NUM = 0;
    public const VERSION_TXT = '';

    /**
     * The Gmagick constructor.
     *
     * @link https://php.net/manual/en/gmagick.construct.php
     *
     * @param string $filename [optional] The path to an image to load or array of paths.
     */
    public function __construct($filename = null) {}

    /**
     * Adds new image to Gmagick object from the current position of the source object.
     * After the operation iterator position is moved at the end of the list.
     *
     * @link https://php.net/manual/en/gmagick.addimage.php
     *
     * @param Gmagick $Gmagick The source Gmagick object.
     *
     * @return Gmagick The Gmagick object with image added.
     *
     * @throws GmagickException On error.
     */
    public function addimage($Gmagick) {}

    /**
     * Adds random noise to the image.
     *
     * @link https://php.net/manual/en/gmagick.addnoiseimage.php
     *
     * @param int $NOISE The type of the noise. One of the Gmagick::NOISE_* constants.
     *
     * @return Gmagick The Gmagick object with noise added.
     *
     * @throws GmagickException On error.
     */
    public function addnoiseimage($NOISE) {}

    /**
     * Annotates an image with text.
     *
     * @link https://php.net/manual/en/gmagick.annotateimage.php
     *
     * @param GmagickDraw $GmagickDraw The GmagickDraw object that contains settings for drawing the text.
     * @param float       $x           Horizontal offset in pixels to the left of text.
     * @param float       $y           Vertical offset in pixels to the baseline of text.
     * @param float       $angle       The angle at which to write the text.
     * @param string      $text        The string to draw.
     *
     * @return Gmagick The Gmagick object with annotation made.
     *
     * @throws GmagickException On error.
     */
    public function annotateimage($GmagickDraw, $x, $y, $angle, $text) {}

    /**
     * Adds blur filter to image.
     *
     * @link https://php.net/manual/en/gmagick.blurimage.php
     *
     * @param float $radius  Blur radius.
     * @param float $sigma   Standard deviation
     * @param int   $channel [optional]
     *
     * @return Gmagick The blurred Gmagick object.
     *
     * @throws GmagickException On error.
     */
    public function blurimage($radius, $sigma, $channel = null) {}

    /**
     * Surrounds the image with a border of the color defined by the bordercolor GmagickPixel object or a color string.
     *
     * @link https://php.net/manual/en/gmagick.borderimage.php
     *
     * @param GmagickPixel $color  GmagickPixel object or a string containing the border color.
     * @param int          $width  Border width.
     * @param int          $height Border height.
     *
     * @return Gmagick The Gmagick object with border defined.
     *
     * @throws GmagickException On error.
     */
    public function borderimage($color, $width, $height) {}

    /**
     * Simulates a charcoal drawing.
     *
     * @link https://php.net/manual/en/gmagick.charcoalimage.php
     *
     * @param float $radius The radius of the Gaussian, in pixels, not counting the center pixel.
     * @param float $sigma  The standard deviation of the Gaussian, in pixels.
     *
     * @return Gmagick The Gmagick object with charcoal simulation.
     *
     * @throws GmagickException On error.
     */
    public function charcoalimage($radius, $sigma) {}

    /**
     * Removes a region of an image and collapses the image to occupy the removed portion.
     *
     * @link https://php.net/manual/en/gmagick.chopimage.php
     *
     * @param int $width  Width of the chopped area.
     * @param int $height Height of the chopped area.
     * @param int $x      X origo of the chopped area.
     * @param int $y      Y origo of the chopped area.
     *
     * @return Gmagick The chopped Gmagick object.
     *
     * @throws GmagickException On error.
     */
    public function chopimage($width, $height, $x, $y) {}

    /**
     * Clears all resources associated to Gmagick object.
     *
     * @link https://php.net/manual/en/gmagick.clear.php
     *
     * @return Gmagick The cleared Gmagick object.
     *
     * @throws GmagickException On error.
     */
    public function clear() {}

    /**
     * Adds a comment to your image.
     *
     * @link https://php.net/manual/en/gmagick.commentimage.php
     *
     * @param string $comment The comment to add.
     *
     * @return Gmagick The Gmagick object with comment added.
     *
     * @throws GmagickException On error.
     */
    public function commentimage($comment) {}

    /**
     * Composite one image onto another at the specified offset.
     *
     * @link https://php.net/manual/en/gmagick.compositeimage.php
     *
     * @param Gmagick $source  Gmagick object which holds the composite image.
     * @param int     $COMPOSE Composite operator.
     * @param int     $x       The column offset of the composited image.
     * @param int     $y       The row offset of the composited image.
     *
     * @return Gmagick The Gmagick object with compositions.
     *
     * @throws GmagickException On error.
     */
    public function compositeimage($source, $COMPOSE, $x, $y) {}

    /**
     * Extracts a region of the image.
     *
     * @link https://php.net/manual/en/gmagick.cropimage.php
     *
     * @param int $width  The width of the crop.
     * @param int $height The height of the crop.
     * @param int $x      The X coordinate of the cropped region's top left corner.
     * @param int $y      The Y coordinate of the cropped region's top left corner.
     *
     * @return Gmagick The cropped Gmagick object.
     *
     * @throws GmagickException On error.
     */
    public function cropimage($width, $height, $x, $y) {}

    /**
     * Creates a fixed size thumbnail by first scaling the image down and cropping a specified area from the center.
     *
     * @link https://php.net/manual/en/gmagick.cropthumbnailimage.php
     *
     * @param int $width  The width of the thumbnail.
     * @param int $height The Height of the thumbnail.
     *
     * @return Gmagick The cropped Gmagick object.
     *
     * @throws GmagickException On error.
     */
    public function cropthumbnailimage($width, $height) {}

    /**
     * Returns reference to the current gmagick object with image pointer at the correct sequence.
     *
     * @link https://php.net/manual/en/gmagick.current.php
     *
     * @return Gmagick Returns self on success.
     *
     * @throws GmagickException On error.
     */
    public function current() {}

    /**
     * Displaces an image's colormap by a given number of positions.
     * If you cycle the colormap a number of times you can produce a psychedelic effect.
     *
     * @link https://php.net/manual/en/gmagick.cyclecolormapimage.php
     *
     * @param int $displace The amount to displace the colormap.
     *
     * @return Gmagick Returns self on success.
     *
     * @throws GmagickException On error.
     */
    public function cyclecolormapimage($displace) {}

    /**
     * Compares each image with the next in a sequence.
     * Returns the maximum bounding region of any pixel differences it discovers.
     *
     * @link https://php.net/manual/en/gmagick.deconstructimages.php
     *
     * @return Gmagick Returns a new Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function deconstructimages() {}

    /**
     * Reduces the speckle noise in an image while preserving the edges of the original image.
     *
     * @link https://php.net/manual/en/gmagick.despeckleimage.php
     *
     * @return Gmagick The despeckled Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function despeckleimage() {}

    /**
     * Destroys the Gmagick object and frees all resources associated with it.
     *
     * @link https://php.net/manual/en/gmagick.destroy.php
     *
     * @return bool Returns TRUE on success.
     *
     * @throws GmagickException On error.
     */
    public function destroy() {}

    /**
     * Renders the GmagickDraw object on the current image.
     *
     * @link https://php.net/manual/en/gmagick.drawimage.php
     *
     * @param GmagickDraw $GmagickDraw The drawing operations to render on the image.
     *
     * @return Gmagick The drawn Gmagick object.
     *
     * @throws GmagickException On error.
     */
    public function drawimage($GmagickDraw) {}

    /**
     * Enhance edges within the image with a convolution filter of the given radius.
     * Use radius 0 and it will be auto-selected.
     *
     * @link https://php.net/manual/en/gmagick.edgeimage.php
     *
     * @param float $radius The radius of the operation.
     *
     * @return Gmagick The Gmagick object with edges enhanced.
     *
     * @throws GmagickException On error.
     */
    public function edgeimage($radius) {}

    /**
     * Returns a grayscale image with a three-dimensional effect.
     * We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma).
     * For reasonable results, radius should be larger than sigma.
     * Use a radius of 0 and it will choose a suitable radius for you.
     *
     * @link https://php.net/manual/en/gmagick.embossimage.php
     *
     * @param float $radius The radius of the effect.
     * @param float $sigma  The sigma of the effect.
     *
     * @return Gmagick The embossed Gmagick object.
     *
     * @throws GmagickException On error.
     */
    public function embossimage($radius, $sigma) {}

    /**
     * Applies a digital filter that improves the quality of a noisy image.
     *
     * @link https://php.net/manual/en/gmagick.enhanceimage.php
     *
     * @return Gmagick The enhanced Gmagick object.
     *
     * @throws GmagickException On error.
     */
    public function enhanceimage() {}

    /**
     * Equalizes the image histogram.
     *
     * @link https://php.net/manual/en/gmagick.equalizeimage.php
     *
     * @return Gmagick The equalized Gmagick object.
     *
     * @throws GmagickException On error.
     */
    public function equalizeimage() {}

    /**
     * Creates a vertical mirror image by reflecting the pixels around the central x-axis.
     *
     * @link https://php.net/manual/en/gmagick.flipimage.php
     *
     * @return Gmagick The flipped Gmagick object.
     *
     * @throws GmagickException On error.
     */
    public function flipimage() {}

    /**
     * Creates a horizontal mirror image by reflecting the pixels around the central y-axis.
     *
     * @link https://php.net/manual/en/gmagick.flopimage.php
     *
     * @return Gmagick The flopped Gmagick object.
     *
     * @throws GmagickException On error.
     */
    public function flopimage() {}

    /**
     * Adds a simulated three-dimensional border around the image.
     * The width and height specify the border width of the vertical and horizontal sides of the frame.
     * The inner and outer bevels indicate the width of the inner and outer shadows of the frame.
     *
     * @link https://php.net/manual/en/gmagick.frameimage.php
     *
     * @param GmagickPixel $color       GmagickPixel object or a float representing the matte color.
     * @param int          $width       The width of the border.
     * @param int          $height      The height of the border.
     * @param int          $inner_bevel The inner bevel width.
     * @param int          $outer_bevel The outer bevel width.
     *
     * @return Gmagick The framed Gmagick object.
     *
     * @throws GmagickException On error.
     */
    public function frameimage($color, $width, $height, $inner_bevel, $outer_bevel) {}

    /**
     * Gamma-corrects an image.
     * The same image viewed on different devices will have perceptual differences in the way the image's intensities
     * are represented on the screen. Specify individual gamma levels for the red, green, and blue channels,
     * or adjust all three with the gamma parameter. Values typically range from 0.8 to 2.3.
     *
     * @link https://php.net/manual/en/gmagick.gammaimage.php
     *
     * @param float $gamma The amount of gamma-correction.
     *
     * @return Gmagick The gamma corrected Gmagick object.
     *
     * @throws GmagickException On error.
     */
    public function gammaimage($gamma) {}

    /**
     * Returns the GraphicsMagick API copyright as a string.
     *
     * @link https://php.net/manual/en/gmagick.getcopyright.php
     *
     * @return string Returns a string containing the copyright notice of GraphicsMagick and Magickwand C API.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getcopyright() {}

    /**
     * Returns the filename associated with an image sequence.
     *
     * @link https://php.net/manual/en/gmagick.getfilename.php
     *
     * @return string Returns a string on success.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getfilename() {}

    /**
     * Returns the image background color.
     *
     * @link https://php.net/manual/en/gmagick.getimagebackgroundcolor.php
     *
     * @return GmagickPixel Returns a GmagickPixel set to the background color of the image.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimagebackgroundcolor() {}

    /**
     * Returns the chromaticity blue primary point for the image.
     *
     * @link https://php.net/manual/en/gmagick.getimageblueprimary.php
     *
     * @return array Array consisting of "x" and "y" coordinates of point.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimageblueprimary() {}

    /**
     * Returns the image border color.
     *
     * @link https://php.net/manual/en/gmagick.getimagebordercolor.php
     *
     * @return GmagickPixel GmagickPixel object representing the color of the border.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimagebordercolor() {}

    /**
     * Gets the depth for a particular image channel.
     *
     * @link https://php.net/manual/en/gmagick.getimagechanneldepth.php
     *
     * @param int $channel_type
     *
     * @return int Depth of image channel.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimagechanneldepth($channel_type) {}

    /**
     * Returns the color of the specified colormap index.
     *
     * @link https://php.net/manual/en/gmagick.getimagecolors.php
     *
     * @return int The number of colors in image.
     *
     * @throws GmagickException On error
     */
    #[Pure]
    public function getimagecolors() {}

    /**
     * Gets the image colorspace.
     *
     * @link https://php.net/manual/en/gmagick.getimagecolorspace.php
     *
     * @return int Colorspace
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimagecolorspace() {}

    /**
     * Returns the composite operator associated with the image.
     *
     * @link https://php.net/manual/en/gmagick.getimagecompose.php
     *
     * @return int Returns the composite operator associated with the image.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimagecompose() {}

    /**
     * Gets the image delay.
     *
     * @link https://php.net/manual/en/gmagick.getimagedelay.php
     *
     * @return int Returns the composite operator associated with the image.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimagedelay() {}

    /**
     * Gets the depth of the image.
     *
     * @link https://php.net/manual/en/gmagick.getimagedepth.php
     *
     * @return int Image depth.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimagedepth() {}

    /**
     * Gets the image disposal method.
     *
     * @link https://php.net/manual/en/gmagick.getimagedispose.php
     *
     * @return int Returns the dispose method on success.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimagedispose() {}

    /**
     * Gets the extrema for the image.
     *
     * @link https://php.net/manual/en/gmagick.getimageextrema.php
     *
     * @return array Returns an associative array with the keys "min" and "max".
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimageextrema() {}

    /**
     * Returns the filename of a particular image in a sequence.
     *
     * @link https://php.net/manual/en/gmagick.getimagefilename.php
     *
     * @return string Returns a string with the filename of the image
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimagefilename() {}

    /**
     * Returns the format of a particular image in a sequence.
     *
     * @link https://php.net/manual/en/gmagick.getimageformat.php
     *
     * @return string Returns a string containing the image format on success.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimageformat() {}

    /**
     * Gets the image gamma.
     *
     * @link https://php.net/manual/en/gmagick.getimagegamma.php
     *
     * @return float Returns the image gamma on success.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimagegamma() {}

    /**
     * Returns the chromaticy green primary point.
     *
     * @link https://php.net/manual/en/gmagick.getimagegreenprimary.php
     *
     * @return array Returns an array with the keys "x" and "y" on success.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimagegreenprimary() {}

    /**
     * Returns the image height.
     *
     * @link https://php.net/manual/en/gmagick.getimageheight.php
     *
     * @return int Returns the image height in pixels.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimageheight() {}

    /**
     * Gets the image histogram.
     *
     * @link https://php.net/manual/en/gmagick.getimagehistogram.php
     *
     * @return array Returns the image histogram as an array of GmagickPixel objects.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimagehistogram() {}

    /**
     * Returns the index of the current active image within the Gmagick object.
     *
     * @link https://php.net/manual/en/gmagick.getimageindex.php
     *
     * @return int Index of current active image.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimageindex() {}

    /**
     * Gets the image interlace scheme.
     *
     * @link https://php.net/manual/en/gmagick.getimageinterlacescheme.php
     *
     * @return int Returns the interlace scheme as an integer on success.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimageinterlacescheme() {}

    /**
     * Gets the image iterations.
     *
     * @link https://php.net/manual/en/gmagick.getimageiterations.php
     *
     * @return int Returns the image iterations as an integer.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimageiterations() {}

    /**
     * Checks if the image has a matte channel.
     *
     * @link https://php.net/manual/en/gmagick.getimagematte.php
     *
     * @return bool Returns TRUE if the image has a matte channel, otherwise FALSE.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimagematte() {}

    /**
     * Returns the image matte color.
     *
     * @link https://php.net/manual/en/gmagick.getimagemattecolor.php
     *
     * @return GmagickPixel Returns GmagickPixel object on success.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimagemattecolor() {}

    /**
     * Returns the named image profile.
     *
     * @link https://php.net/manual/en/gmagick.getimageprofile.php
     *
     * @param string $name
     *
     * @return string Returns a string containing the image profile.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimageprofile($name) {}

    /**
     * Returns the chromaticity red primary point.
     *
     * @link https://php.net/manual/en/gmagick.getimageredprimary.php
     *
     * @return array Returns the chromaticity red primary point as an array with the keys "x" and "y".
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimageredprimary() {}

    /**
     * Gets the image rendering intent.
     *
     * @link https://php.net/manual/en/gmagick.getimagerenderingintent.php
     *
     * @return int Extracts a region of the image and returns it as a a new wand.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimagerenderingintent() {}

    /**
     * Gets the image X and Y resolution.
     *
     * @link https://php.net/manual/en/gmagick.getimageresolution.php
     *
     * @return array Returns the resolution as an array.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimageresolution() {}

    /**
     * Gets the image scene.
     *
     * @link https://php.net/manual/en/gmagick.getimagescene.php
     *
     * @return int Returns the image scene.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimagescene() {}

    /**
     * Generates an SHA-256 message digest for the image pixel stream.
     *
     * @link https://php.net/manual/en/gmagick.getimagesignature.php
     *
     * @return string Returns a string containing the SHA-256 hash of the file.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimagesignature() {}

    /**
     * Gets the potential image type.
     *
     * @link https://php.net/manual/en/gmagick.getimagetype.php
     *
     * @return int Returns the potential image type.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimagetype() {}

    /**
     * Gets the image units of resolution.
     *
     * @link https://php.net/manual/en/gmagick.getimageunits.php
     *
     * @return int Returns the image units of resolution.
     */
    #[Pure]
    public function getimageunits() {}

    /**
     * Returns the chromaticity white point.
     *
     * @link https://php.net/manual/en/gmagick.getimagewhitepoint.php
     *
     * @return array Returns the chromaticity white point as an associative array with the keys "x" and "y".
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimagewhitepoint() {}

    /**
     * Returns the width of the image.
     *
     * @link https://php.net/manual/en/gmagick.getimagewidth.php
     *
     * @return int Returns the image width.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getimagewidth() {}

    /**
     * Returns the GraphicsMagick package name.
     *
     * @link https://php.net/manual/en/gmagick.getpackagename.php
     *
     * @return string Returns the GraphicsMagick package name as a string.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getpackagename() {}

    /**
     * Returns the Gmagick quantum depth.
     *
     * @link https://php.net/manual/en/gmagick.getquantumdepth.php
     *
     * @return array Returns the Gmagick quantum depth.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getquantumdepth() {}

    /**
     * Returns the GraphicsMagick release date as a string.
     *
     * @link https://php.net/manual/en/gmagick.getreleasedate.php
     *
     * @return string Returns the GraphicsMagick release date as a string.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getreleasedate() {}

    /**
     * Gets the horizontal and vertical sampling factor.
     *
     * @link https://php.net/manual/en/gmagick.getsamplingfactors.php
     *
     * @return array Returns an associative array with the horizontal and vertical sampling factors of the image.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getsamplingfactors() {}

    /**
     * Returns the size associated with the Gmagick object.
     *
     * @link https://php.net/manual/en/gmagick.getsize.php
     *
     * @return array Returns the size associated with the Gmagick object as an array with the keys "columns" and "rows".
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getsize() {}

    /**
     * Returns the GraphicsMagick API version.
     *
     * @link https://php.net/manual/en/gmagick.getversion.php
     *
     * @return array Returns the GraphicsMagick API version as a string and as a number.
     *
     * @throws GmagickException On error.
     */
    #[Pure]
    public function getversion() {}

    /**
     * Checks if the object has more images.
     *
     * @link https://php.net/manual/en/gmagick.hasnextimage.php
     *
     * @return bool Returns TRUE if the object has more images when traversing the list in the forward direction, returns FALSE if there are none.
     *
     * @throws GmagickException On error.
     */
    public function hasnextimage() {}

    /**
     * Checks if the object has a previous image.
     *
     * @link https://php.net/manual/en/gmagick.haspreviousimage.php
     *
     * @return bool Returns TRUE if the object has more images when traversing the list in the reverse direction, returns FALSE if there are none.
     *
     * @throws GmagickException On error.
     */
    public function haspreviousimage() {}

    /**
     * Creates a new image that is a copy of an existing one with the image pixels "imploded" by the specified percentage.
     *
     * @link https://php.net/manual/en/gmagick.implodeimage.php
     *
     * @param float $radius The radius of the implode.
     *
     * @return mixed Returns imploded Gmagick object.
     *
     * @throws GmagickException On error.
     */
    public function implodeimage($radius) {}

    /**
     * Adds a label to an image.
     *
     * @link https://php.net/manual/en/gmagick.labelimage.php
     *
     * @param string $label The label to add.
     *
     * @return mixed Gmagick with label.
     *
     * @throws GmagickException On error.
     */
    public function labelimage($label) {}

    /**
     * Adjusts the levels of an image.
     *
     * Adjusts the levels of an image by scaling the colors falling between specified white and black points to the
     * full available quantum range. The parameters provided represent the black, mid, and white points. The black
     * point specifies the darkest color in the image. Colors darker than the black point are set to zero. Mid point
     * specifies a gamma correction to apply to the image. White point specifies the lightest color in the image.
     * Colors brighter than the white point are set to the maximum quantum value.
     *
     * @link https://php.net/manual/en/gmagick.levelimage.php
     *
     * @param float $blackPoint The image black point.
     * @param float $gamma      The gamma value.
     * @param float $whitePoint The image white point.
     * @param int   $channel    Provide any channel constant that is valid for your channel mode.
     *                          To apply to more than one channel, combine channeltype constants using bitwise operators.
     *                          Refer to this list of channel constants.
     *
     * @return mixed Gmagick object with image levelled.
     *
     * @throws GmagickException On error.
     */
    public function levelimage($blackPoint, $gamma, $whitePoint, $channel = false) {}

    /**
     * Scales an image proportionally 2x.
     *
     * @link https://php.net/manual/en/gmagick.magnifyimage.php
     *
     * @return mixed Magnified Gmagick object.
     *
     * @throws GmagickException On error.
     */
    public function magnifyimage() {}

    /**
     * Replaces the colors of an image with the closest color from a reference image.
     *
     * @link https://php.net/manual/en/gmagick.mapimage.php
     *
     * @param gmagick $gmagick The reference image.
     * @param bool    $dither  Set this integer value to something other than zero to dither the mapped image.
     *
     * @return Gmagick Gmagick object.
     *
     * @throws GmagickException On error.
     */
    public function mapimage($gmagick, $dither) {}

    /**
     * Applies a digital filter that improves the quality of a noisy image.
     * Each pixel is replaced by the median in a set of neighboring pixels as defined by radius.
     *
     * @link https://php.net/manual/en/gmagick.medianfilterimage.php
     *
     * @param float $radius The radius of the pixel neighborhood.
     *
     * @return void Gmagick object with median filter applied.
     *
     * @throws GmagickException On error.
     */
    public function medianfilterimage($radius) {}

    /**
     * Scales an image proportionally to half its size.
     *
     * @link https://php.net/manual/en/gmagick.minifyimage.php
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function minifyimage() {}

    /**
     * Controls the brightness, saturation, and hue.
     *
     * @link https://php.net/manual/en/gmagick.modulateimage.php
     *
     * Lets you control the brightness, saturation, and hue of an image.
     * Hue is the percentage of absolute rotation from the current position.
     * For example 50 results in a counter-clockwise rotation of 90 degrees,
     * 150 results in a clockwise rotation of 90 degrees, with 0 and 200 both resulting in a rotation of 180 degrees.
     *
     * @param float $brightness The percent change in brightness (-100 thru +100).
     * @param float $saturation The percent change in saturation (-100 thru +100).
     * @param float $hue        The percent change in hue (-100 thru +100).
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function modulateimage($brightness, $saturation, $hue) {}

    /**
     * Simulates motion blur.
     *
     * We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma).
     * For reasonable results, radius should be larger than sigma.
     * Use a radius of 0 and MotionBlurImage() selects a suitable radius for you.
     * Angle gives the angle of the blurring motion.
     *
     * @link https://php.net/manual/en/gmagick.motionblurimage.php
     *
     * @param float $radius The radius of the Gaussian, in pixels, not counting the center pixel.
     * @param float $sigma  The standard deviation of the Gaussian, in pixels.
     * @param float $angle  Apply the effect along this angle.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function motionblurimage($radius, $sigma, $angle) {}

    /**
     * Creates a new image.
     *
     * @link https://php.net/manual/en/gmagick.newimage.php
     *
     * @param int    $width      Width of the new image
     * @param int    $height     Height of the new image.
     * @param string $background The background color used for this image.
     * @param string $format     [optional] Image format.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function newimage($width, $height, $background, $format = null) {}

    /**
     * Moves to the next image.
     *
     * Associates the next image in the image list with an Gmagick object.
     *
     * @link https://php.net/manual/en/gmagick.nextimage.php
     *
     * @return bool True on success, false on failure.
     */
    public function nextimage() {}

    /**
     * Enhances the contrast of a color image.
     *
     * @link https://php.net/manual/en/gmagick.normalizeimage.php
     *
     * @param int $channel [optional] Identify which channel to normalize.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function normalizeimage($channel = null) {}

    /**
     * Simulates an oil painting.
     *
     * Applies a special effect filter that simulates an oil painting.
     * Each pixel is replaced by the most frequent color occurring in a circular region defined by radius.
     *
     * @link https://php.net/manual/en/gmagick.oilpaintimage.php
     *
     * @param float $radius The radius of the circular neighborhood.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function oilpaintimage($radius) {}

    /**
     * Move to the previous image in the object.
     *
     * Associates the previous image in an image list with the Gmagick object.
     *
     * @link https://php.net/manual/en/gmagick.previousimage.php
     *
     * @return bool True on success, false on failure.
     *
     * @throws GmagickException On error.
     */
    public function previousimage() {}

    /**
     * Adds or removes a profile from an image.
     *
     * Adds or removes a ICC, IPTC, or generic profile from an image.
     * If the profile is NULL, it is removed from the image otherwise added.
     * Use a name of '*' and a profile of NULL to remove all profiles from the image.
     *
     * @link https://php.net/manual/en/gmagick.profileimage.php
     *
     * @param string $name    Name of profile to add or remove: ICC, IPTC, or generic profile.
     * @param string $profile The profile.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function profileimage($name, $profile) {}

    /**
     * Analyzes the colors within a reference image.
     *
     * Analyzes the colors within a reference image and chooses a fixed number of colors to represent the image.
     * The goal of the algorithm is to minimize the color difference between the input and output image while minimizing the processing time.
     *
     * @link https://php.net/manual/en/gmagick.quantizeimage.php
     *
     * @param int  $numColors    The number of colors.
     * @param int  $colorspace   Perform color reduction in this colorspace, typically RGBColorspace.
     * @param int  $treeDepth    Normally, this integer value is zero or one.
     *                           A zero or one tells Quantize to choose a optimal tree depth of Log4(number_colors).
     *                           A tree of this depth generally allows the best representation of the reference image
     *                           with the least amount of memory and the fastest computational speed.
     *                           In some cases, such as an image with low color dispersion (a few number of colors),
     *                           a value other than Log4(number_colors) is required.
     *                           To expand the color tree completely, use a value of 8.
     * @param bool $dither       A value other than zero distributes the difference between an original image and the
     *                           corresponding color reduced algorithm to neighboring pixels along a Hilbert curve.
     * @param bool $measureError A value other than zero measures the difference between the original and quantized
     *                           images. This difference is the total quantization error. The error is computed by
     *                           summing over all pixels in an image the distance squared in RGB space between each
     *                           reference pixel value and its quantized value.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function quantizeimage($numColors, $colorspace, $treeDepth, $dither, $measureError) {}

    /**
     * The quantizeimages purpose.
     *
     * Analyzes the colors within a sequence of images and chooses a fixed number of colors to represent the image.
     * The goal of the algorithm is to minimize the color difference between the input and output image while minimizing the processing time.
     *
     * @link https://php.net/manual/en/gmagick.quantizeimages.php
     *
     * @param int  $numColors    The number of colors.
     * @param int  $colorspace   Perform color reduction in this colorspace, typically RGBColorspace.
     * @param int  $treeDepth    Normally, this integer value is zero or one.
     *                           A zero or one tells Quantize to choose a optimal tree depth of Log4(number_colors).
     *                           A tree of this depth generally allows the best representation of the reference image
     *                           with the least amount of memory and the fastest computational speed.
     *                           In some cases, such as an image with low color dispersion (a few number of colors),
     *                           a value other than Log4(number_colors) is required.
     *                           To expand the color tree completely, use a value of 8.
     * @param bool $dither       A value other than zero distributes the difference between an original image and the
     *                           corresponding color reduced algorithm to neighboring pixels along a Hilbert curve.
     * @param bool $measureError A value other than zero measures the difference between the original and quantized
     *                           images. This difference is the total quantization error. The error is computed by
     *                           summing over all pixels in an image the distance squared in RGB space between eac
     *                           reference pixel value and its quantized value.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function quantizeimages($numColors, $colorspace, $treeDepth, $dither, $measureError) {}

    /**
     * Returns an array representing the font metrics.
     *
     * @link https://php.net/manual/en/gmagick.queryfontmetrics.php
     *
     * @param GmagickDraw $draw
     * @param string      $text
     *
     * @return array
     *
     * @throws GmagickException On error.
     */
    public function queryfontmetrics($draw, $text) {}

    /**
     * Returns fonts supported by Gmagick.
     *
     * @link https://php.net/manual/en/gmagick.queryfonts.php
     *
     * @param string $pattern [optional]
     *
     * @return array
     *
     * @throws GmagickException On error.
     */
    public function queryfonts($pattern = '*') {}

    /**
     * Returns formats supported by Gmagick.
     *
     * @link https://php.net/manual/en/gmagick.queryformats.php
     *
     * @param string $pattern [optional]
     *
     * @return array
     *
     * @throws GmagickException On error.
     */
    public function queryformats($pattern = '*') {}

    /**
     * Radial blurs an image.
     *
     * @link https://php.net/manual/en/gmagick.radialblurimage.php
     *
     * @param float $angle   The angle of the blur in degrees.
     * @param int   $channel [optional] Related channel.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function radialblurimage($angle, $channel = Gmagick::CHANNEL_DEFAULT) {}

    /**
     * Creates a simulated 3d button-like effect.
     *
     * Creates a simulated three-dimensional button-like effect by lightening and darkening the edges of the image.
     * Members width and height of raise_info define the width of the vertical and horizontal edge of the effect.
     *
     * @link https://php.net/manual/en/gmagick.raiseimage.php
     *
     * @param int  $width  Width of the area to raise.
     * @param int  $height Height of the area to raise.
     * @param int  $x      X coordinate.
     * @param int  $y      Y coordinate.
     * @param bool $raise  A value other than zero creates a 3-D raise effect, otherwise it has a lowered effect.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function raiseimage($width, $height, $x, $y, $raise) {}

    /**
     * Reads image from filename.
     *
     * This is an alias for readimage().
     *
     * @link https://php.net/manual/en/gmagick.read.php
     *
     * @param string $filename The image filename.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function read($filename) {}

    /**
     * Reads image from filename.
     *
     * @link https://php.net/manual/en/gmagick.readimage.php
     *
     * @param string $filename The image filename.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function readimage($filename) {}

    /**
     * Reads image from a binary string.
     *
     * @link https://php.net/manual/en/gmagick.readimageblob.php
     *
     * @param string $imageContents Content of image.
     * @param string $filename      [optional] The image filename.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function readimageblob($imageContents, $filename = null) {}

    /**
     * Reads an image or image sequence from an open file descriptor.
     *
     * @link https://php.net/manual/en/gmagick.readimagefile.php
     *
     * @param resource $fp       The file descriptor.
     * @param string   $filename [optional]
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function readimagefile($fp, $filename = null) {}

    /**
     * Smooths the contours of an image.
     *
     * Smooths the contours of an image while still preserving edge information.
     * The algorithm works by replacing each pixel with its neighbor closest in value.
     * A neighbor is defined by radius.
     * Use a radius of 0 and Gmagick::reduceNoiseImage() selects a suitable radius for you.
     *
     * @link https://php.net/manual/en/gmagick.reducenoiseimage.php
     *
     * @param float $radius The radius of the pixel neighborhood.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function reducenoiseimage($radius) {}

    /**
     * Removes an image from the image list.
     *
     * @link https://php.net/manual/en/gmagick.removeimage.php
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function removeimage() {}

    /**
     * Removes the named image profile and returns it.
     *
     * @link https://php.net/manual/en/gmagick.removeimageprofile.php
     *
     * @param string $name Name of profile to return: ICC, IPTC, or generic profile.
     *
     * @return string The named profile.
     *
     * @throws GmagickException On error.
     */
    public function removeimageprofile($name) {}

    /**
     * Resample image to desired resolution.
     *
     * @link https://php.net/manual/en/gmagick.resampleimage.php
     *
     * @param float $xResolution The new image x resolution.
     * @param float $yResolution The new image y resolution.
     * @param int   $filter      The image filter to use.
     * @param float $blur        The blur factor where larger than 1 is blurry, smaller than 1 is sharp.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function resampleimage($xResolution, $yResolution, $filter, $blur) {}

    /**
     * Scales an image to the desired dimensions with a filter.
     *
     * @link https://php.net/manual/en/gmagick.resizeimage.php
     *
     * @param int   $width  The number of columns in the scaled image.
     * @param int   $height The number of rows in the scaled image.
     * @param int   $filter Image filter to use.
     * @param float $blur   The blur factor where larger than 1 is blurry, lesser than 1 is sharp.
     * @param bool  $fit    [optional]
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function resizeimage($width, $height, $filter, $blur, $fit = false) {}

    /**
     * Offsets an image as defined by x and y.
     *
     * @link https://php.net/manual/en/gmagick.rollimage.php
     *
     * @param int $x The x offset.
     * @param int $y The y offset.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function rollimage($x, $y) {}

    /**
     * Rotates an image the specified number of degrees.
     *
     * Empty triangles left over from rotating the image are filled with the background color.
     *
     * @link https://php.net/manual/en/gmagick.rotateimage.php
     *
     * @param mixed $color   The background pixel.
     * @param float $degrees The number of degrees to rotate the image.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function rotateimage($color, $degrees) {}

    /**
     * Scales the size of an image to the given dimensions.
     *
     * The other parameter will be calculated if 0 is passed as either param.
     *
     * @link https://php.net/manual/en/gmagick.scaleimage.php
     *
     * @param int  $width  The number of columns in the scaled image.
     * @param int  $height The number of rows in the scaled image.
     * @param bool $fit    [optional]
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function scaleimage($width, $height, $fit = false) {}

    /**
     * Separates a channel from the image and returns a grayscale image.
     *
     * A channel is a particular color component of each pixel in the image.
     *
     * @link https://php.net/manual/en/gmagick.separateimagechannel.php
     *
     * @param int $channel Identify which channel to extract:
     *                     RedChannel, GreenChannel, BlueChannel, OpacityChannel,
     *                     CyanChannel, MagentaChannel, YellowChannel, BlackChannel.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function separateimagechannel($channel) {}

    /**
     * Sets the object's default compression quality.
     *
     * @link https://php.net/manual/en/gmagick.setcompressionquality.php
     *
     * @param int $quality [optional]
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setCompressionQuality($quality = 75) {}

    /**
     * Sets the filename before you read or write the image.
     *
     * @link https://php.net/manual/en/gmagick.setfilename.php
     *
     * @param string $filename The image filename.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setfilename($filename) {}

    /**
     * Sets the image background color.
     *
     * @link https://php.net/manual/en/gmagick.setimagebackgroundcolor.php
     *
     * @param GmagickPixel $color The background pixel wand.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setimagebackgroundcolor($color) {}

    /**
     * Sets the image chromaticity blue primary point.
     *
     * @link https://php.net/manual/en/gmagick.setimageblueprimary.php
     *
     * @param float $x The blue primary x-point.
     * @param float $y The blue primary y-point.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setimageblueprimary($x, $y) {}

    /**
     * Sets the image border color.
     *
     * @link https://php.net/manual/en/gmagick.setimagebordercolor.php
     *
     * @param GmagickPixel $color The border pixel wand.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setimagebordercolor(GmagickPixel $color) {}

    /**
     * Sets the depth of a particular image channel.
     *
     * @link https://php.net/manual/en/gmagick.setimagechanneldepth.php
     *
     * @param int $channel Identify which channel to extract: RedChannel, GreenChannel, BlueChannel,
     *                     OpacityChannel, CyanChannel, MagentaChannel, YellowChannel, BlackChannel.
     * @param int $depth   The image depth in bits.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setimagechanneldepth($channel, $depth) {}

    /**
     * Sets the image colorspace.
     *
     * @link https://php.net/manual/en/gmagick.setimagecolorspace.php
     *
     * @param int $colorspace The image colorspace: UndefinedColorspace, RGBColorspace, GRAYColorspace,
     *                        TransparentColorspace, OHTAColorspace, XYZColorspace, YCbCrColorspace, YCCColorspace,
     *                        YIQColorspace, YPbPrColorspace, YPbPrColorspace, YUVColorspace, CMYKColorspace,
     *                        sRGBColorspace, HSLColorspace, or HWBColorspace.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setimagecolorspace($colorspace) {}

    /**
     * Sets the image composite operator.
     *
     * @link https://php.net/manual/en/gmagick.setimagecompose.php
     *
     * @param int $composite The image composite operator.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setimagecompose($composite) {}

    /**
     * Sets the image delay.
     *
     * @link https://php.net/manual/en/gmagick.setimagedelay.php
     *
     * @param int $delay The image delay in 1/100th of a second.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setimagedelay($delay) {}

    /**
     * Sets the image depth.
     *
     * @link https://php.net/manual/en/gmagick.setimagedepth.php
     *
     * @param int $depth The image depth in bits: 8, 16, or 32.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setimagedepth($depth) {}

    /**
     * Sets the image disposal method.
     *
     * @link https://php.net/manual/en/gmagick.setimagedispose.php
     *
     * @param int $disposeType The image disposal type.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setimagedispose($disposeType) {}

    /**
     * Sets the filename of a particular image in a sequence.
     *
     * @link https://php.net/manual/en/gmagick.setimagefilename.php
     *
     * @param string $filename The image filename.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setimagefilename($filename) {}

    /**
     * Sets the format of a particular image in a sequence.
     *
     * @link https://php.net/manual/en/gmagick.setimageformat.php
     *
     * @param string $imageFormat The image format.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setimageformat($imageFormat) {}

    /**
     * Sets the image gamma.
     *
     * @link https://php.net/manual/en/gmagick.setimagegamma.php
     *
     * @param float $gamma The image gamma.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setimagegamma($gamma) {}

    /**
     * Sets the image chromaticity green primary point.
     *
     * @link https://php.net/manual/en/gmagick.setimagegreenprimary.php
     *
     * @param float $x The chromaticity green primary x-point.
     * @param float $y The chromaticity green primary y-point.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setimagegreenprimary($x, $y) {}

    /**
     * Sets the iterator to the position in the image list specified with the index parameter.
     *
     * @link https://php.net/manual/en/gmagick.setimageindex.php
     *
     * @param int $index The scene number.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setimageindex($index) {}

    /**
     * Sets the interlace scheme of the image.
     *
     * @link https://php.net/manual/en/gmagick.setimageinterlacescheme.php
     *
     * @param int $interlace The image interlace scheme: NoInterlace, LineInterlace, PlaneInterlace, PartitionInterlace.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setimageinterlacescheme($interlace) {}

    /**
     * Sets the image iterations.
     *
     * @link https://php.net/manual/en/gmagick.setimageiterations.php
     *
     * @param int $iterations
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setimageiterations($iterations) {}

    /**
     * Adds a named profile to the Gmagick object.
     *
     * If a profile with the same name already exists, it is replaced.
     * This method differs from the Gmagick::profileimage() method in that it does not apply any CMS color profiles.
     *
     * @link https://php.net/manual/en/gmagick.setimageprofile.php
     *
     * @param string $name    Name of profile to add or remove: ICC, IPTC, or generic profile.
     * @param string $profile The profile.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setimageprofile($name, $profile) {}

    /**
     * Sets the image chromaticity red primary point.
     *
     * @link https://php.net/manual/en/gmagick.setimageredprimary.php
     *
     * @param float $x The red primary x-point.
     * @param float $y The red primary y-point.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setimageredprimary($x, $y) {}

    /**
     * Sets the image rendering intent.
     *
     * @link https://php.net/manual/en/gmagick.setimagerenderingintent.php
     *
     * @param int $rendering_intent The image rendering intent: UndefinedIntent, SaturationIntent,
     *                              PerceptualIntent, AbsoluteIntent, or RelativeIntent.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setimagerenderingintent($rendering_intent) {}

    /**
     * Sets the image resolution.
     *
     * @link https://php.net/manual/en/gmagick.setimageresolution.php
     *
     * @param float $xResolution The image x resolution.
     * @param float $yResolution The image y resolution.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setimageresolution($xResolution, $yResolution) {}

    /**
     * Sets the image scene.
     *
     * @link https://php.net/manual/en/gmagick.setimagescene.php
     *
     * @param int $scene The image scene number.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setimagescene($scene) {}

    /**
     * Sets the image type.
     *
     * @link https://php.net/manual/en/gmagick.setimagetype.php
     *
     * @param int $imgType The image type: UndefinedType, BilevelType, GrayscaleType, GrayscaleMatteType, PaletteType,
     *                     PaletteMatteType, TrueColorType, TrueColorMatteType, ColorSeparationType,
     *                     ColorSeparationMatteType, or OptimizeType.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setimagetype($imgType) {}

    /**
     * Sets the image units of resolution.
     *
     * @link https://php.net/manual/en/gmagick.setimageunits.php
     *
     * @param int $resolution The image units of resolution : Undefinedresolution, PixelsPerInchResolution,
     *                        or PixelsPerCentimeterResolution.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setimageunits($resolution) {}

    /**
     * Sets the image chromaticity white point.
     *
     * @link https://php.net/manual/en/gmagick.setimagewhitepoint.php
     *
     * @param float $x The white x-point.
     * @param float $y The white y-point.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setimagewhitepoint($x, $y) {}

    /**
     * Sets the image sampling factors.
     *
     * @link https://php.net/manual/en/gmagick.setsamplingfactors.php
     *
     * @param array $factors An array of doubles representing the sampling factor
     *                       for each color component (in RGB order).
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setsamplingfactors($factors) {}

    /**
     * Sets the size of the Gmagick object.
     *
     * Set it before you read a raw image format such as RGB, GRAY, or CMYK.
     *
     * @link https://php.net/manual/en/gmagick.setsize.php
     *
     * @param int $columns The width in pixels.
     * @param int $rows    The height in pixels.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function setsize($columns, $rows) {}

    /**
     * Slides one edge of an image along the X or Y axis, creating a parallelogram.
     *
     * An X direction shear slides an edge along the X axis, while a Y direction shear slides an edge along the Y axis.
     * The amount of the shear is controlled by a shear angle. For X direction shears, x_shear is measured relative to
     * the Y axis, and similarly, for Y direction shears y_shear is measured relative to the X axis. Empty triangles
     * left over from shearing the image are filled with the background color.
     *
     * @link https://php.net/manual/en/gmagick.shearimage.php
     *
     * @param mixed $color  The background pixel wand.
     * @param float $xShear The number of degrees to shear the image.
     * @param float $yShear The number of degrees to shear the image.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function shearimage($color, $xShear, $yShear) {}

    /**
     * Applies a solarizing effect to the image.
     *
     * Applies a special effect to the image, similar to the effect achieved in a photo darkroom by selectively
     * exposing areas of photo sensitive paper to light. Threshold ranges from 0 to QuantumRange and is a measure of
     * the extent of the solarization.
     *
     * @link https://php.net/manual/en/gmagick.solarizeimage.php
     *
     * @param int $threshold Define the extent of the solarization.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function solarizeimage($threshold) {}

    /**
     * Randomly displaces each pixel in a block.
     *
     * Special effects method that randomly displaces each pixel in a block defined by the radius parameter.
     *
     * @link https://php.net/manual/en/gmagick.spreadimage.php
     *
     * @param float $radius Choose a random pixel in a neighborhood of this extent.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function spreadimage($radius) {}

    /**
     * Strips an image of all profiles and comments.
     *
     * @link https://php.net/manual/en/gmagick.stripimage.php
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function stripimage() {}

    /**
     * Swirls the pixels about the center of the image.
     *
     * Swirls the pixels about the center of the image, where degrees indicates the sweep of the arc through which
     * each pixel is moved. You get a more dramatic effect as the degrees move from 1 to 360.
     *
     * @link https://php.net/manual/en/gmagick.swirlimage.php
     *
     * @param float $degrees Define the tightness of the swirling effect.
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function swirlimage($degrees) {}

    /**
     * Changes the size of an image to the given dimensions and removes any associated profiles.
     *
     * The goal is to produce small low cost thumbnail images suited for display on the Web.
     * If TRUE is given as a third parameter then columns and rows parameters are used as maximums for each side.
     * Both sides will be scaled down until the match or are smaller than the parameter given for the side.
     *
     * @link https://php.net/manual/en/gmagick.thumbnailimage.php
     *
     * @param int  $width  Image width.
     * @param int  $height Image height.
     * @param bool $fit    [optional]
     *
     * @return Gmagick The Gmagick object on success.
     *
     * @throws GmagickException On error.
     */
    public function thumbnailimage($width, $height, $fit = false) {}

    /**
     * Remove edges that are the background color from the image.
     *
     * @link https://php.net/manual/en/gmagick.trimimage.php
     *
     * @param float $fuzz By default target must match a particular pixel color exactly. However, in many cases two
     *                    colors may differ by a small amount. The fuzz member of image defines how much tolerance is
     *                    acceptable to consider two colors as the same. This parameter represents the variation on the
     *                    quantum range.
     *
     * @return Gmagick The Gmagick object.
     *
     * @throws GmagickException On error.
     */
    public function trimimage($fuzz) {}

    /**
     * Writes an image to the specified filename.
     *
     * Writes an image to the specified filename. If the filename parameter is NULL, the image is written to the
     * filename set by Gmagick::ReadImage() or Gmagick::SetImageFilename().
     *
     * This is an alias for writeimage().
     *
     * @link https://php.net/manual/en/gmagick.write.php
     *
     * @param string $filename The image filename.
     *
     * @return Gmagick The Gmagick object.
     *
     * @throws GmagickException On error.
     */
    public function write($filename) {}

    /**
     * Writes an image to the specified filename.
     *
     * Writes an image to the specified filename. If the filename parameter is NULL, the image is written to the
     * filename set by Gmagick::ReadImage() or Gmagick::SetImageFilename().
     *
     * @link https://php.net/manual/en/gmagick.writeimage.php
     *
     * @param string $filename   The image filename.
     * @param bool   $all_frames [optional]
     *
     * @return Gmagick The Gmagick object.
     *
     * @throws GmagickException On error.
     */
    public function writeimage($filename, $all_frames = false) {}
}

/**
 * @link https://php.net/manual/en/class.gmagickdraw.php
 */
class GmagickDraw
{
    /**
     * Draws text on the image.
     *
     * @link https://php.net/manual/en/gmagickdraw.annotate.php
     *
     * @param float  $x    x ordinate to left of text.
     * @param float  $y    y ordinate to text baseline.
     * @param string $text text to draw.
     *
     * @return GmagickDraw The GmagickDraw object on success.
     */
    public function annotate($x, $y, $text) {}

    /**
     * Draws an arc falling within a specified bounding rectangle on the image.
     *
     * @link https://php.net/manual/en/gmagickdraw.arc.php
     *
     * @param float $sx starting x ordinate of bounding rectangle.
     * @param float $sy starting y ordinate of bounding rectangle.
     * @param float $ex ending x ordinate of bounding rectangle.
     * @param float $ey ending y ordinate of bounding rectangle.
     * @param float $sd starting degrees of rotation.
     * @param float $ed ending degrees of rotation.
     *
     * @return GmagickDraw The GmagickDraw object on success.
     */
    public function arc($sx, $sy, $ex, $ey, $sd, $ed) {}

    /**
     * Draws a bezier curve through a set of points on the image.
     *
     * @link https://php.net/manual/en/gmagickdraw.bezier.php
     *
     * @param array $coordinate_array Coordinates array.
     *
     * @return GmagickDraw The GmagickDraw object on success.
     */
    public function bezier(array $coordinate_array) {}

    /**
     * Draws an ellipse on the image.
     *
     * @link https://php.net/manual/en/gmagickdraw.ellipse.php
     *
     * @param float $ox    origin x ordinate.
     * @param float $oy    origin y ordinate.
     * @param float $rx    radius in x.
     * @param float $ry    radius in y.
     * @param float $start starting rotation in degrees.
     * @param float $end   ending rotation in degrees.
     *
     * @return GmagickDraw The GmagickDraw object on success.
     */
    public function ellipse($ox, $oy, $rx, $ry, $start, $end) {}

    /**
     * Returns the fill color used for drawing filled objects.
     *
     * @link https://php.net/manual/en/gmagickdraw.getfillcolor.php
     *
     * @return GmagickPixel The GmagickPixel fill color used for drawing filled objects.
     */
    #[Pure]
    public function getfillcolor() {}

    /**
     * Returns the opacity used when drawing.
     *
     * @link https://php.net/manual/en/gmagickdraw.getfillopacity.php
     *
     * @return float The opacity used when drawing using the fill color or fill texture. Fully opaque is 1.0.
     */
    #[Pure]
    public function getfillopacity() {}

    /**
     * Returns a string specifying the font used when annotating with text.
     *
     * @link https://php.net/manual/en/gmagickdraw.getfont.php
     *
     * @return string|false A string on success and false if no font is set.
     */
    #[Pure]
    public function getfont() {}

    /**
     * Returns the font pointsize used when annotating with text.
     *
     * @link https://php.net/manual/en/gmagickdraw.getfontsize.php
     *
     * @return float The font size associated with the current GmagickDraw object.
     */
    #[Pure]
    public function getfontsize() {}

    /**
     * Returns the font style used when annotating with text.
     *
     * @link https://php.net/manual/en/gmagickdraw.getfontstyle.php
     *
     * @return int The font style constant (STYLE_) associated with the GmagickDraw object or 0 if no style is set.
     */
    #[Pure]
    public function getfontstyle() {}

    /**
     * Returns the font weight used when annotating with text.
     *
     * @link https://php.net/manual/en/gmagickdraw.getfontweight.php
     *
     * @return int An int on success and 0 if no weight is set.
     */
    #[Pure]
    public function getfontweight() {}

    /**
     * Returns the color used for stroking object outlines.
     *
     * @link https://php.net/manual/en/gmagickdraw.getstrokecolor.php
     *
     * @return GmagickPixel Returns an GmagickPixel object which describes the color.
     */
    #[Pure]
    public function getstrokecolor() {}

    /**
     * Returns the opacity of stroked object outlines.
     *
     * @link https://php.net/manual/en/gmagickdraw.getstrokeopacity.php
     *
     * @return float Returns a float describing the opacity.
     */
    #[Pure]
    public function getstrokeopacity() {}

    /**
     * Returns the width of the stroke used to draw object outlines.
     *
     * @link https://php.net/manual/en/gmagickdraw.getstrokewidth.php
     *
     * @return float Returns a float describing the stroke width.
     */
    #[Pure]
    public function getstrokewidth() {}

    /**
     * Returns the decoration applied when annotating with text.
     *
     * @link https://php.net/manual/en/gmagickdraw.gettextdecoration.php
     *
     * @return int Returns one of the DECORATION_ constants and 0 if no decoration is set.
     */
    #[Pure]
    public function gettextdecoration() {}

    /**
     * Returns the code set used for text annotations.
     *
     * @link https://php.net/manual/en/gmagickdraw.gettextencoding.php
     *
     * @return string|false Returns a string specifying the code set or false if text encoding is not set.
     */
    #[Pure]
    public function gettextencoding() {}

    /**
     * Draws a line on the image using the current stroke color, stroke opacity, and stroke width.
     *
     * @link https://php.net/manual/en/gmagickdraw.line.php
     *
     * @param float $sx starting x ordinate.
     * @param float $sy starting y ordinate.
     * @param float $ex ending x ordinate.
     * @param float $ey ending y ordinate.
     *
     * @return GmagickDraw The GmagickDraw object on success.
     */
    public function line($sx, $sy, $ex, $ey) {}

    /**
     * Draws a point using the current stroke color and stroke thickness at the specified coordinates.
     *
     * @link https://php.net/manual/en/gmagickdraw.point.php
     *
     * @param float $x target x coordinate.
     * @param float $y target y coordinate.
     *
     * @return GmagickDraw The GmagickDraw object on success.
     */
    public function point($x, $y) {}

    /**
     * Draws a polygon using the current stroke, stroke width, and fill color or texture, using the specified array of coordinates.
     *
     * @link https://php.net/manual/en/gmagickdraw.polygon.php
     *
     * @param array $coordinates The array of coordinates.
     *
     * @return GmagickDraw The GmagickDraw object on success.
     */
    public function polygon(array $coordinates) {}

    /**
     * Draws a polyline using the current stroke, stroke width, and fill color or texture, using the specified array of coordinates.
     *
     * @link https://php.net/manual/en/gmagickdraw.polyline.php
     *
     * @param array $coordinate_array The array of coordinates.
     *
     * @return GmagickDraw The GmagickDraw object on success.
     */
    public function polyline(array $coordinate_array) {}

    /**
     * Draws a rectangle given two coordinates and using the current stroke, stroke width, and fill settings.
     *
     * @link https://php.net/manual/en/gmagickdraw.rectangle.php
     *
     * @param float $x1 x ordinate of first coordinate.
     * @param float $y1 y ordinate of first coordinate.
     * @param float $x2 x ordinate of second coordinate.
     * @param float $y2 y ordinate of second coordinate.
     *
     * @return GmagickDraw The GmagickDraw object on success.
     */
    public function rectangle($x1, $y1, $x2, $y2) {}

    /**
     * Applies the specified rotation to the current coordinate space.
     *
     * @link https://php.net/manual/en/gmagickdraw.rotate.php
     *
     * @param float $degrees degrees of rotation.
     *
     * @return GmagickDraw The GmagickDraw object on success.
     */
    public function rotate($degrees) {}

    /**
     * Draws a rounded rectangle given two coordinates, x and y corner radiuses and using the current stroke, stroke width, and fill settings.
     *
     * @link https://php.net/manual/en/gmagickdraw.roundrectangle.php
     *
     * @param float $x1 x ordinate of first coordinate.
     * @param float $y1 y ordinate of first coordinate.
     * @param float $x2 x ordinate of second coordinate.
     * @param float $y2 y ordinate of second coordinate.
     * @param float $rx radius of corner in horizontal direction.
     * @param float $ry radius of corner in vertical direction.
     *
     * @return GmagickDraw The GmagickDraw object on success.
     */
    public function roundrectangle($x1, $y1, $x2, $y2, $rx, $ry) {}

    /**
     * Adjusts the scaling factor to apply in the horizontal and vertical directions to the current coordinate space.
     *
     * @link https://php.net/manual/en/gmagickdraw.scale.php
     *
     * @param float $x horizontal scale factor.
     * @param float $y vertical scale factor.
     *
     * @return GmagickDraw The GmagickDraw object on success.
     */
    public function scale($x, $y) {}

    /**
     * Sets the fill color to be used for drawing filled objects.
     *
     * @link https://php.net/manual/en/gmagickdraw.setfillcolor.php
     *
     * @param GmagickPixel|string $color GmagickPixel indicating color to use for filling.
     *
     * @return GmagickDraw The GmagickDraw object on success.
     */
    public function setfillcolor($color) {}

    /**
     * Sets the opacity to use when drawing using the fill color or fill texture. Setting it to 1.0 will make fill full opaque.
     *
     * @link https://php.net/manual/en/gmagickdraw.setfillopacity.php
     *
     * @param float $fill_opacity The fill opacity.
     *
     * @return GmagickDraw The GmagickDraw object on success.
     */
    public function setfillopacity($fill_opacity) {}

    /**
     * Sets the fully-specified font to use when annotating with text.
     *
     * @link https://php.net/manual/en/gmagickdraw.setfont.php
     *
     * @param string $font The font name.
     *
     * @return GmagickDraw The GmagickDraw object on success.
     */
    public function setfont($font) {}

    /**
     * Sets the font pointsize to use when annotating with text.
     *
     * @link https://php.net/manual/en/gmagickdraw.setfontsize.php
     *
     * @param float $pointsize The text pointsize.
     *
     * @return GmagickDraw The GmagickDraw object on success.
     */
    public function setfontsize($pointsize) {}

    /**
     * Sets the font style to use when annotating with text.
     *
     * The AnyStyle enumeration acts as a wild-card "don't care" option.
     *
     * @link https://php.net/manual/en/gmagickdraw.setfontstyle.php
     *
     * @param int $style The font style (NormalStyle, ItalicStyle, ObliqueStyle, AnyStyle).
     *
     * @return GmagickDraw The GmagickDraw object on success.
     */
    public function setfontstyle($style) {}

    /**
     * Sets the font weight to use when annotating with text.
     *
     * @link https://php.net/manual/en/gmagickdraw.setfontweight.php
     *
     * @param int $weight The font weight (valid range 100-900).
     *
     * @return GmagickDraw The GmagickDraw object on success.
     */
    public function setfontweight($weight) {}

    /**
     * Sets the color used for stroking object outlines.
     *
     * @link https://php.net/manual/en/gmagickdraw.setstrokecolor.php
     *
     * @param GmagickPixel|string $color GmagickPixel representing the color for the stroke.
     *
     * @return GmagickDraw The GmagickDraw object on success.
     */
    public function setstrokecolor($color) {}

    /**
     * Specifies the opacity of stroked object outlines.
     *
     * @link https://php.net/manual/en/gmagickdraw.setstrokeopacity.php
     *
     * @param float $stroke_opacity Stroke opacity. The value 1.0 is opaque.
     *
     * @return GmagickDraw The GmagickDraw object on success.
     */
    public function setstrokeopacity($stroke_opacity) {}

    /**
     * Sets the width of the stroke used to draw object outlines.
     *
     * @link https://php.net/manual/en/gmagickdraw.setstrokewidth.php
     *
     * @param float $width The stroke width.
     *
     * @return GmagickDraw The GmagickDraw object on success.
     */
    public function setstrokewidth($width) {}

    /**
     * Specifies a decoration to be applied when annotating with text.
     *
     * @link https://php.net/manual/en/gmagickdraw.settextdecoration.php
     *
     * @param int $decoration The text decoration.
     *                        One of NoDecoration, UnderlineDecoration, OverlineDecoration, or LineThroughDecoration.
     *
     * @return GmagickDraw The GmagickDraw object on success.
     */
    public function settextdecoration($decoration) {}

    /**
     * Specifies the code set to use for text annotations.
     *
     * The only character encoding which may be specified at this time is "UTF-8" for representing Unicode as a
     * sequence of bytes. Specify an empty string to set text encoding to the system's default. Successful text
     * annotation using Unicode may require fonts designed to support Unicode.
     *
     * @link https://php.net/manual/en/gmagickdraw.settextencoding.php
     *
     * @param string $encoding The text encoding.
     *
     * @return GmagickDraw The GmagickDraw object on success.
     */
    public function settextencoding($encoding) {}
}

class GmagickException extends \Exception {}

/**
 * @link https://php.net/manual/en/class.gmagickpixel.php
 */
class GmagickPixel
{
    /**
     * The GmagickPixel constructor.
     *
     * If a color is specified, the object is constructed and then initialised with that color before being returned.
     *
     * @link https://php.net/manual/en/gmagickpixel.construct.php
     *
     * @param string $color [optional] The optional color string to use as the initial value of this object.
     */
    public function __construct($color = null) {}

    /**
     * Returns the color described by the GmagickPixel object.
     *
     * If the color has an opacity channel set, this is provided as a fourth value in the list.
     *
     * @link https://php.net/manual/en/gmagickpixel.getcolor.php
     *
     * @param bool $as_array        [optional] True to indicate return of array instead of string.
     * @param bool $normalize_array [optional] Normalize the color values.
     *
     * @return mixed A string or array of channel values, each normalized if TRUE is given as param.
     *
     * @throws GmagickPixelException On error.
     */
    #[Pure]
    public function getcolor($as_array = null, $normalize_array = null) {}

    /**
     * Returns the color count associated with this color.
     *
     * @link https://php.net/manual/en/gmagickpixel.getcolorcount.php
     *
     * @return int The color count as an integer.
     *
     * @throws GmagickPixelException On failure.
     */
    #[Pure]
    public function getcolorcount() {}

    /**
     * Gets the normalized value of the provided color channel.
     *
     * @link https://php.net/manual/en/gmagickpixel.getcolorvalue.php
     *
     * @param int $color The channel to check, specified as one of the Gmagick channel constants.
     *
     * @return float The value of the color channel specified, as a floating-point number between 0 and 1.
     *
     * @throws GmagickPixelException On error.
     */
    #[Pure]
    public function getcolorvalue($color) {}

    /**
     * Sets the color.
     *
     * Sets the color described by the GmagickPixel object,
     * with a string (e.g. "blue", "#0000ff", "rgb(0,0,255)", "cmyk(100,100,100,10)", etc.).
     *
     * @link https://php.net/manual/en/gmagickpixel.setcolor.php
     *
     * @param string $color The color definition to use in order to initialise the GmagickPixel object.
     *
     * @return GmagickPixel The GmagickPixel object on success.
     */
    public function setcolor($color) {}

    /**
     * Sets the normalized value of one of the channels.
     *
     * Sets the value of the specified channel of this object to the provided value, which should be between 0 and 1.
     * This function can be used to provide an opacity channel to a GmagickPixel object.
     *
     * @link https://php.net/manual/en/gmagickpixel.setcolorvalue.php
     *
     * @param int   $color One of the Gmagick channel color constants.
     * @param float $value The value to set this channel to, ranging from 0 to 1.
     *
     * @return GmagickPixel The GmagickPixel object on success.
     */
    public function setcolorvalue($color, $value) {}
}

class GmagickPixelException extends \Exception {}
<?php
/**
 * sync PECL extension stubs v.0.1
 * @link https://php.net/manual/en/book.sync.php
 */
/**
 * SyncMutex
 *
 * A cross-platform, native implementation of named and unnamed countable mutex objects.
 * A mutex is a mutual exclusion object that restricts access to a shared resource (e.g. a file) to a single instance. Countable mutexes acquire the mutex a single time and internally track the number of times the mutex is locked. The mutex is unlocked as soon as it goes out of scope or is unlocked the same number of times that it was locked.
 *
 * @link https://php.net/manual/en/class.syncmutex.php
 */
class SyncMutex
{
    /**
     * Constructs a new SyncMutex object
     *
     * Constructs a named or unnamed countable mutex.
     *
     * @param string $name [optional] The name of the mutex if this is a named mutex object. If the name already exists, it must be able to be opened by the current user that the process is running as or an exception will be thrown with a meaningless error message.
     * @throws Exception if the mutex cannot be created or opened
     * @link https://php.net/manual/en/syncmutex.construct.php
     */
    public function __construct($name) {}

    /**
     * Waits for an exclusive lock
     *
     * Obtains an exclusive lock on a SyncMutex object. If the lock is already acquired, then this increments an internal counter.
     *
     * @param int $wait [optional] The number of milliseconds to wait for the exclusive lock. A value of -1 is infinite.
     * @return bool TRUE if the lock was obtained, FALSE otherwise.
     * @see SyncMutex::unlock()
     * @link https://php.net/manual/en/syncmutex.lock.php
     */
    public function lock($wait = -1) {}

    /**
     * Unlocks the mutex
     *
     * Decreases the internal counter of a SyncMutex object. When the internal counter reaches zero, the actual lock on the object is released.
     *
     * @param bool $all [optional] Specifies whether or not to set the internal counter to zero and therefore release the lock.
     * @return bool TRUE if the unlock operation was successful, FALSE otherwise.
     * @see SyncMutex::lock()
     * @link https://php.net/manual/en/syncmutex.unlock.php
     */
    public function unlock($all = false) {}
    }

/**
 * SyncSemaphore
 *
 * A cross-platform, native implementation of named and unnamed semaphore objects.
 * A semaphore restricts access to a limited resource to a limited number of instances. Semaphores differ from mutexes in that they can allow more than one instance to access a resource at one time while a mutex only allows one instance at a time.
 *
 * @link https://php.net/manual/en/class.syncsemaphore.php
 */
class SyncSemaphore
{
    /**
     * Constructs a new SyncSemaphore object
     *
     * Constructs a named or unnamed semaphore.
     *
     * @param string $name       [optional] The name of the semaphore if this is a named semaphore object. Note: If the name already exists, it must be able to be opened by the current user that the process is running as or an exception will be thrown with a meaningless error message.
     * @param int    $initialval [optional] The initial value of the semaphore. This is the number of locks that may be obtained.
     * @param bool   $autounlock [optional] Specifies whether or not to automatically unlock the semaphore at the conclusion of the PHP script. Warning: If an object is: A named semaphore with an autounlock of FALSE, the object is locked, and the PHP script concludes before the object is unlocked, then the underlying semaphore will end up in an inconsistent state.
     * @throws Exception if the semaphore cannot be created or opened
     * @link https://php.net/manual/en/syncsemaphore.construct.php
     */
    public function __construct($name, $initialval = 1, $autounlock = true) {}

    /**
     * Decreases the count of the semaphore or waits
     *
     * Decreases the count of a SyncSemaphore object or waits until the semaphore becomes non-zero.
     *
     * @param int $wait The number of milliseconds to wait for the semaphore. A value of -1 is infinite.
     * @return bool TRUE if the lock operation was successful, FALSE otherwise.
     * @see SyncSemaphore::unlock()
     * @link https://php.net/manual/en/syncsemaphore.lock.php
     */
    public function lock($wait = -1) {}

    /**
     * Increases the count of the semaphore
     *
     * Increases the count of a SyncSemaphore object.
     *
     * @param int &$prevcount Returns the previous count of the semaphore.
     * @return bool TRUE if the unlock operation was successful, FALSE otherwise.
     * @see SyncSemaphore::lock()
     * @link https://php.net/manual/en/syncsemaphore.unlock.php
     */
    public function unlock(&$prevcount = 0) {}
    }

/**
 * SyncEvent
 *
 * A cross-platform, native implementation of named and unnamed event objects. Both automatic and manual event objects are supported.
 * An event object waits, without polling, for the object to be fired/set. One instance waits on the event object while another instance fires/sets the event. Event objects are useful wherever a long-running process would otherwise poll a resource (e.g. checking to see if uploaded data needs to be processed).
 *
 * @link https://php.net/manual/en/class.syncevent.php
 */
class SyncEvent
{
    /**
     * SyncEvent constructor.
     *
     * @param string $name    The name of the event if this is a named event object. Note: If the name already exists, it must be able to be opened by the current user that the process is running as or an exception will be thrown with a meaningless error message.
     * @param bool   $manual  [optional] Specifies whether or not the event object must be reset manually. Note: Manual reset event objects allow all waiting processes through until the object is reset.
     * @param bool   $prefire [optional] Specifies whether or not to prefire (signal) the event object. Note: Only has impact if the calling process/thread is the first to create the object.
     * @throws Exception if the event object cannot be created or opened
     * @since 1.0.0
     * @since 1.1.0 Added $prefire
     * @link https://php.net/manual/en/syncevent.construct.php
     */
    public function __construct(string $name, bool $manual = false, bool $prefire = false) {}

    /**
     * Fires/sets the event
     *
     * Fires/sets a SyncEvent object. Lets multiple threads through that are waiting if the event object was created with a manual value of TRUE.
     *
     * @return bool TRUE if the event was fired, FALSE otherwise.
     * @see SyncEvent::wait()
     * @link https://php.net/manual/en/syncevent.fire.php
     */
    public function fire() {}

    /**
     * Resets a manual event
     *
     * Resets a SyncEvent object that has been fired/set. Only valid for manual event objects.
     *
     * @return bool TRUE if the object was successfully reset, FALSE otherwise.
     * @link https://php.net/manual/en/syncevent.reset.php
     */
    public function reset() {}

    /**
     * Waits for the event to be fired/set
     *
     * Waits for the SyncEvent object to be fired.
     *
     * @param int $wait The number of milliseconds to wait for the event to be fired. A value of -1 is infinite.
     * @return bool TRUE if the event was fired, FALSE otherwise.
     * @see SyncEvent::fire()
     * @link https://php.net/manual/en/syncevent.wait.php
     */
    public function wait($wait = -1) {}
    }

/**
 * SyncReaderWriter
 *
 * A cross-platform, native implementation of named and unnamed reader-writer objects.
 * A reader-writer object allows many readers or one writer to access a resource. This is an efficient solution for managing resources where access will primarily be read-only but exclusive write access is occasionally necessary.
 *
 * @link https://php.net/manual/en/class.syncreaderwriter.php
 */
class SyncReaderWriter
{
    /**
     * Constructs a new SyncReaderWriter object
     *
     * Constructs a named or unnamed reader-writer object.
     *
     * @param string $name       [optional] The name of the reader-writer if this is a named reader-writer object. Note: If the name already exists, it must be able to be opened by the current user that the process is running as or an exception will be thrown with a meaningless error message.
     * @param bool   $autounlock [optional] Specifies whether or not to automatically unlock the reader-writer at the conclusion of the PHP script. Warning: If an object is: A named reader-writer with an autounlock of FALSE, the object is locked for either reading or writing, and the PHP script concludes before the object is unlocked, then the underlying objects will end up in an inconsistent state.
     * @throws Exception if the reader-writer cannot be created or opened.
     * @link https://php.net/manual/en/syncreaderwriter.construct.php
     */
    public function __construct($name, $autounlock = true) {}

    /**
     * Waits for a read lock
     *
     * Obtains a read lock on a SyncReaderWriter object.
     *
     * @param int $wait [optional] The number of milliseconds to wait for a lock. A value of -1 is infinite.
     * @return bool TRUE if the lock was obtained, FALSE otherwise.
     * @see SyncReaderWriter::readunlock()
     * @link https://php.net/manual/en/syncreaderwriter.readlock.php
     */
    public function readlock($wait = -1) {}

    /**
     * Releases a read lock
     *
     * Releases a read lock on a SyncReaderWriter object.
     *
     * @return bool TRUE if the unlock operation was successful, FALSE otherwise.
     * @see SyncReaderWriter::readlock()
     * @link https://php.net/manual/en/syncreaderwriter.readunlock.php
     */
    public function readunlock() {}

    /**
     * Waits for an exclusive write lock
     *
     * Obtains an exclusive write lock on a SyncReaderWriter object.
     *
     * @param int $wait [optional] The number of milliseconds to wait for a lock. A value of -1 is infinite.
     * @return bool TRUE if the lock was obtained, FALSE otherwise.
     * @see SyncReaderWriter::writeunlock()
     * @link https://php.net/manual/en/syncreaderwriter.writelock.php
     */
    public function writelock($wait = -1) {}

    /**
     * Releases a write lock
     *
     * Releases a write lock on a SyncReaderWriter object.
     *
     * @return bool TRUE if the unlock operation was successful, FALSE otherwise.
     * @see SyncReaderWriter::writelock()
     * @link https://php.net/manual/en/syncreaderwriter.writeunlock.php
     */
    public function writeunlock() {}
    }

/**
 * SyncSharedMemory
 *
 * A cross-platform, native, consistent implementation of named shared memory objects.
 * Shared memory lets two separate processes communicate without the need for complex pipes or sockets. There are several integer-based shared memory implementations for PHP. Named shared memory is an alternative.
 * Synchronization objects (e.g. SyncMutex) are still required to protect most uses of shared memory.
 *
 * @since 1.1.0
 * @link https://php.net/manual/en/class.syncsharedmemory.php
 */
class SyncSharedMemory
{
    /**
     * Constructs a new SyncSharedMemory object
     *
     * Constructs a named shared memory object.
     *
     * @param string $name The name of the shared memory object. Note: If the name already exists, it must be able to be opened by the current user that the process is running as or an exception will be thrown with a meaningless error message.
     * @param int    $size The size, in bytes, of shared memory to reserve. Note: The amount of memory cannot be resized later. Request sufficient storage up front.
     * @throws Exception if the shared memory object cannot be created or opened.
     * @link https://php.net/manual/en/syncsharedmemory.construct.php
     */
    public function __construct($name, $size) {}

    /**
     * Check to see if the object is the first instance system-wide of named shared memory
     *
     * Retrieves the system-wide first instance status of a SyncSharedMemory object.
     *
     * @return bool TRUE if the object is the first instance system-wide, FALSE otherwise.
     * @link https://php.net/manual/en/syncsharedmemory.first.php
     */
    public function first() {}

    /**
     * Copy data from named shared memory
     *
     * Copies data from named shared memory.
     *
     * @param int $start  [optional] The start/offset, in bytes, to begin reading. Note: If the value is negative, the starting position will begin at the specified number of bytes from the end of the shared memory segment.
     * @param int $length [optional] The number of bytes to read. Note: If unspecified, reading will stop at the end of the shared memory segment. If the value is negative, reading will stop the specified number of bytes from the end of the shared memory segment.
     * @return string containing the data read from shared memory.
     * @see SyncSharedMemory::write()
     * @link https://php.net/manual/en/syncsharedmemory.read.php
     */
    public function read($start = 0, $length) {}

    /**
     * Returns the size of the named shared memory
     *
     * Retrieves the shared memory size of a SyncSharedMemory object.
     *
     * @return int containing the size of the shared memory. This will be the same size that was passed to the constructor.
     * @link https://php.net/manual/en/syncsharedmemory.size.php
     */
    public function size() {}

    /**
     * Copy data to named shared memory
     *
     * Copies data to named shared memory.
     *
     * @param string $string The data to write to shared memoy. Note: If the size of the data exceeds the size of the shared memory, the number of bytes written returned will be less than the length of the input.
     * @param int    $start  The start/offset, in bytes, to begin writing. Note: If the value is negative, the starting position will begin at the specified number of bytes from the end of the shared memory segment.
     * @return int containing the number of bytes written to shared memory.
     * @link https://php.net/manual/en/syncsharedmemory.write.php
     */
    public function write($string, $start = 0) {}
    }
<?php

// Start of sysvsem v.
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;

/**
 * Get a semaphore id
 * @link https://php.net/manual/en/function.sem-get.php
 * @param int $key
 * @param int $max_acquire [optional] <p>
 * The number of processes that can acquire the semaphore simultaneously
 * is set to <i>max_acquire</i>.
 * </p>
 * @param int $permissions [optional] <p>
 * The semaphore permissions. Actually this value is
 * set only if the process finds it is the only process currently
 * attached to the semaphore.
 * </p>
 * @param bool $auto_release [optional] <p>
 * Specifies if the semaphore should be automatically released on request
 * shutdown.
 * </p>
 * @return resource|false|SysvSemaphore a positive semaphore identifier on success, or <b>FALSE</b> on
 * error.
 */
#[LanguageLevelTypeAware(["8.0" => "SysvSemaphore|false"], default: "resource|false")]
function sem_get(int $key, int $max_acquire = 1, int $permissions = 0666, bool $auto_release = true) {}

/**
 * Acquire a semaphore
 * @link https://php.net/manual/en/function.sem-acquire.php
 * @param SysvSemaphore|resource $semaphore <p>
 * <i>sem_identifier</i> is a semaphore resource,
 * obtained from <b>sem_get</b>.
 * </p>
 * @param bool $non_blocking [optional] <p>
 * Specifies if the process shouldn't wait for the semaphore to be acquired.
 * If set to <i>true</i>, the call will return <i>false</i> immediately if a
 * semaphore cannot be immediately acquired.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function sem_acquire(#[LanguageLevelTypeAware(["8.0" => "SysvSemaphore"], default: "resource")] $semaphore, bool $non_blocking = false): bool {}

/**
 * Release a semaphore
 * @link https://php.net/manual/en/function.sem-release.php
 * @param SysvSemaphore|resource $semaphore <p>
 * A Semaphore resource handle as returned by
 * <b>sem_get</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function sem_release(#[LanguageLevelTypeAware(["8.0" => "SysvSemaphore"], default: "resource")] $semaphore): bool {}

/**
 * Remove a semaphore
 * @link https://php.net/manual/en/function.sem-remove.php
 * @param SysvSemaphore|resource $semaphore <p>
 * A semaphore resource identifier as returned
 * by <b>sem_get</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function sem_remove(#[LanguageLevelTypeAware(["8.0" => "SysvSemaphore"], default: "resource")] $semaphore): bool {}

/**
 * @since 8.0
 */
final class SysvSemaphore
{
    /**
     * Cannot directly construct SysvSemaphore, use sem_get() instead
     * @see sem_get()
     */
    private function __construct() {}
}

// End of sysvsem v.
<?php

/**
 * The constants below are defined by this extension,
 * and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.
 * @link https://secure.php.net/manual/en/yar.constants.php
 */
define('YAR_VERSION', '2.2.0');
define('YAR_CLIENT_PROTOCOL_HTTP', 1);
define('YAR_OPT_PACKAGER', 1);
define('YAR_OPT_TIMEOUT', 4);
define('YAR_OPT_CONNECT_TIMEOUT', 8);
define('YAR_OPT_PERSISTENT', 2);
/**
 * @since 2.0.4
 */
define('YAR_OPT_HEADER', 16);
define('YAR_PACKAGER_PHP', 'PHP');
define('YAR_PACKAGER_JSON', 'JSON');
define('YAR_ERR_OUTPUT', 8);
define('YAR_ERR_OKEY', 0);
define('YAR_ERR_TRANSPORT', 16);
define('YAR_ERR_REQUEST', 4);
define('YAR_ERR_PROTOCOL', 2);
define('YAR_ERR_PACKAGER', 1);
define('YAR_ERR_EXCEPTION', 64);

define('YAR_CLIENT_PROTOCOL_TCP', 2);
define('YAR_CLIENT_PROTOCOL_UNIX', 4);

define('YAR_OPT_RESOLVE', 32);
/**
 * Class Yar_Server
 * Date 2018/6/9 下午3:02
 * @author weizhimiao001@lianjia.com
 * @link https://secure.php.net/manual/en/class.yar-server.php
 */
class Yar_Server
{
    protected $_executor;

    /**
     * Register a server
     * Set up a Yar HTTP RPC Server, All the public methods of $obj will be register as a RPC service.
     *
     * Yar_Server constructor.
     * @param object $obj An Object, all public methods of its will be registered as RPC services.
     * @link https://secure.php.net/manual/en/yar-server.construct.php
     */
    final public function __construct($obj, $protocol = null) {}

    /**
     * Start RPC Server
     * Start a RPC HTTP server, and ready for accpet RPC requests.
     * Note:
     *  Usual RPC calls will be issued as HTTP POST requests.
     *  If a HTTP GET request is issued to the uri,
     *  the service information (commented section above) will be printed on the page
     * @return bool
     * @link https://secure.php.net/manual/en/yar-server.handle.php
     */
    public function handle() {}
}

class Yar_Client
{
    protected $_protocol;
    protected $_uri;
    protected $_options;
    protected $_running;

    /**
     * Call service
     * Issue a call to remote RPC method.
     *
     * @param string $method Remote RPC method name.
     * @param array $parameters Parameters.
     * @link https://secure.php.net/manual/en/yar-client.call.php
     */
    public function __call($method, $parameters) {}

    /**
     * Create a client
     * Yar_Client constructor.
     * @param string $url Yar Server URL.
     * @link https://secure.php.net/manual/en/yar-client.construct.php
     */
    final public function __construct($url, $async = null) {}

    public function call($method, $parameters) {}

    /**
     * Set calling contexts
     *
     * @param int $type it can be:
     * - YAR_OPT_PACKAGER,
     * - YAR_OPT_PERSISTENT (Need server support),
     * - YAR_OPT_TIMEOUT,
     * - YAR_OPT_CONNECT_TIMEOUT
     * - YAR_OPT_HEADER (Since 2.0.4)
     * @param $value
     * @return static|false Returns $this on success or FALSE on failure.
     * @link https://secure.php.net/manual/en/yar-client.setopt.php
     */
    public function setOpt($type, $value) {}

    public function getOpt($type) {}
}

class Yar_Concurrent_Client
{
    protected static $_callstack;
    protected static $_callback;
    protected static $_error_callback;
    protected static $_start;

    /**
     * Register a concurrent call
     * @param string $uri The RPC server URI(http, tcp)
     * @param string $method Service name(aka the method name)
     * @param array $parameters Parameters
     * @param callable $callback A function callback, which will be called while the response return.
     * @param callable $error_callback A function callback, which will be called while the response return.
     * @param array $options
     * @return int An unique id, can be used to identified which call it is.
     * @link https://secure.php.net/manual/en/yar-concurrent-client.call.php
     */
    public static function call($uri, $method, $parameters, callable $callback = null, callable $error_callback, array $options) {}

    /**
     * Send all calls
     * @param callable $callback
     *  If this callback is set, then Yar will call this callback after all calls are sent and before any response return, with a $callinfo NULL.
     *  Then, if user didn't specify callback when registering concurrent call, this callback will be used to handle response, otherwise, the callback specified while registering will be used.
     * @param callable $error_callback
     *  If this callback is set, then Yar will call this callback while error occurred.
     * @return bool
     * @link https://secure.php.net/manual/en/yar-concurrent-client.loop.php
     */
    public static function loop($callback = null, $error_callback = null) {}

    /**
     * Clean all registered calls
     * Clean all registered calls
     * @return bool
     * @link https://secure.php.net/manual/en/yar-concurrent-client.reset.php
     */
    public static function reset() {}
}

/**
 * Class Yar_Server_Exception
 * Date 2018/6/9 下午3:06
 * @author weizhimiao001@lianjia.com
 * @link https://secure.php.net/manual/en/class.yar-server-exception.php
 */
class Yar_Server_Exception extends Exception
{
    protected $_type;

    /**
     * Retrieve exception's type
     * Get the exception original type threw by server
     * @return string
     * @link https://secure.php.net/manual/en/yar-server-exception.gettype.php
     */
    public function getType() {}
}

/**
 * Class Yar_Client_Exception
 * Date 2018/6/9 下午3:05
 * @author weizhimiao001@lianjia.com
 * @link https://secure.php.net/manual/en/class.yar-client-exception.php
 */
class Yar_Client_Exception extends Exception
{
    /**
     * Retrieve exception's type
     * @return string "Yar_Exception_Client".
     * @link https://secure.php.net/manual/en/yar-client-exception.gettype.php
     */
    public function getType() {}
}

class Yar_Server_Request_Exception extends Yar_Server_Exception {}

class Yar_Server_Protocol_Exception extends Yar_Server_Exception {}

class Yar_Server_Packager_Exception extends Yar_Server_Exception {}

class Yar_Server_Output_Exception extends Yar_Server_Exception {}

class Yar_Client_Transport_Exception extends Yar_Client_Exception {}

class Yar_Client_Packager_Exception extends Yar_Client_Exception {}

class Yar_Client_Protocol_Exception extends Yar_Client_Exception {}
<?php

// Start of pdo_sqlite v.1.0.1
// End of pdo_sqlite v.1.0.1
<?php

// Start of SPL v.0.2
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;

/**
 * Exception that represents error in the program logic. This kind of
 * exception should lead directly to a fix in your code.
 * @link https://php.net/manual/en/class.logicexception.php
 */
class LogicException extends Exception {}

/**
 * Exception thrown if a callback refers to an undefined function or if some
 * arguments are missing.
 * @link https://php.net/manual/en/class.badfunctioncallexception.php
 */
class BadFunctionCallException extends LogicException {}

/**
 * Exception thrown if a callback refers to an undefined method or if some
 * arguments are missing.
 * @link https://php.net/manual/en/class.badmethodcallexception.php
 */
class BadMethodCallException extends BadFunctionCallException {}

/**
 * Exception thrown if a value does not adhere to a defined valid data domain.
 * @link https://php.net/manual/en/class.domainexception.php
 */
class DomainException extends LogicException {}

/**
 * Exception thrown if an argument is not of the expected type.
 * @link https://php.net/manual/en/class.invalidargumentexception.php
 */
class InvalidArgumentException extends LogicException {}

/**
 * Exception thrown if a length is invalid.
 * @link https://php.net/manual/en/class.lengthexception.php
 */
class LengthException extends LogicException {}

/**
 * Exception thrown when an illegal index was requested. This represents
 * errors that should be detected at compile time.
 * @link https://php.net/manual/en/class.outofrangeexception.php
 */
class OutOfRangeException extends LogicException {}

/**
 * Exception thrown if an error which can only be found on runtime occurs.
 * @link https://php.net/manual/en/class.runtimeexception.php
 */
class RuntimeException extends Exception {}

/**
 * Exception thrown if a value is not a valid key. This represents errors
 * that cannot be detected at compile time.
 * @link https://php.net/manual/en/class.outofboundsexception.php
 */
class OutOfBoundsException extends RuntimeException {}

/**
 * Exception thrown when adding an element to a full container.
 * @link https://php.net/manual/en/class.overflowexception.php
 */
class OverflowException extends RuntimeException {}

/**
 * Exception thrown to indicate range errors during program execution.
 * Normally this means there was an arithmetic error other than
 * under/overflow. This is the runtime version of
 * <b>DomainException</b>.
 * @link https://php.net/manual/en/class.rangeexception.php
 */
class RangeException extends RuntimeException {}

/**
 * Exception thrown when performing an invalid operation on an empty container, such as removing an element.
 * @link https://php.net/manual/en/class.underflowexception.php
 */
class UnderflowException extends RuntimeException {}

/**
 * Exception thrown if a value does not match with a set of values. Typically
 * this happens when a function calls another function and expects the return
 * value to be of a certain type or value not including arithmetic or buffer
 * related errors.
 * @link https://php.net/manual/en/class.unexpectedvalueexception.php
 */
class UnexpectedValueException extends RuntimeException {}

/**
 * The EmptyIterator class for an empty iterator.
 * @link https://secure.php.net/manual/en/class.emptyiterator.php
 */
class EmptyIterator implements Iterator
{
    /**
     * Return the current element
     * @link https://php.net/manual/en/iterator.current.php
     * @return mixed Can return any type.
     */
    #[TentativeType]
    public function current(): never {}

    /**
     * Move forward to next element
     * @link https://php.net/manual/en/iterator.next.php
     * @return void Any returned value is ignored.
     */
    #[TentativeType]
    public function next(): void {}

    /**
     * Return the key of the current element
     * @link https://php.net/manual/en/iterator.key.php
     * @return mixed The key of the current element.
     */
    #[TentativeType]
    public function key(): never {}

    /**
     * Checks if current position is valid
     * @link https://php.net/manual/en/iterator.valid.php
     * @return bool The return value will be casted to boolean and then evaluated.
     * Returns true on success or false on failure.
     */
    #[TentativeType]
    #[LanguageLevelTypeAware(['8.2' => 'false'], default: 'bool')]
    public function valid() {}

    /**
     * Rewind the Iterator to the first element
     * @link https://php.net/manual/en/iterator.rewind.php
     * @return void Any returned value is ignored.
     */
    #[TentativeType]
    public function rewind(): void {}
}

/**
 * Filtered iterator using the callback to determine which items are accepted or rejected.
 * @link https://secure.php.net/manual/en/class.callbackfilteriterator.php
 * @since 5.4
 */
class CallbackFilterIterator extends FilterIterator
{
    /**
     * Creates a filtered iterator using the callback to determine which items are accepted or rejected.
     * @param Iterator $iterator The iterator to be filtered.
     * @param callable $callback The callback, which should return TRUE to accept the current item or FALSE otherwise.
     * May be any valid callable value.
     * The callback should accept up to three arguments: the current item, the current key and the iterator, respectively.
     * <code> function my_callback($current, $key, $iterator) </code>
     * @link https://secure.php.net/manual/en/callbackfilteriterator.construct.php
     */
    public function __construct(Iterator $iterator, callable $callback) {}

    /**
     * This method calls the callback with the current value, current key and the inner iterator.
     * The callback is expected to return TRUE if the current item is to be accepted, or FALSE otherwise.
     * @link https://secure.php.net/manual/en/callbackfilteriterator.accept.php
     * @return bool true if the current element is acceptable, otherwise false.
     */
    #[TentativeType]
    public function accept(): bool {}
}

/**
 * (PHP 5 >= 5.4.0)<br>
 * RecursiveCallbackFilterIterator from a RecursiveIterator
 * @link https://secure.php.net/manual/en/class.recursivecallbackfilteriterator.php
 * @since 5.4
 */
class RecursiveCallbackFilterIterator extends CallbackFilterIterator implements RecursiveIterator
{
    /**
     * Create a RecursiveCallbackFilterIterator from a RecursiveIterator
     * @param RecursiveIterator $iterator The recursive iterator to be filtered.
     * @param callable $callback The callback, which should return TRUE to accept the current item or FALSE otherwise. See Examples.
     * May be any valid callable value.
     * @link https://www.php.net/manual/en/recursivecallbackfilteriterator.construct.php
     */
    public function __construct(
        RecursiveIterator $iterator,
        #[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback
    ) {}

    /**
     * Check whether the inner iterator's current element has children
     * @link https://php.net/manual/en/recursiveiterator.haschildren.php
     * @return bool Returns TRUE if the current element has children, FALSE otherwise.
     */
    #[TentativeType]
    public function hasChildren(): bool {}

    /**
     * Returns an iterator for the current entry.
     * @link https://secure.php.net/manual/en/recursivecallbackfilteriterator.haschildren.php
     * @return RecursiveCallbackFilterIterator containing the children.
     */
    #[TentativeType]
    public function getChildren(): RecursiveCallbackFilterIterator {}
}

/**
 * Classes implementing <b>RecursiveIterator</b> can be used to iterate
 * over iterators recursively.
 * @link https://php.net/manual/en/class.recursiveiterator.php
 */
interface RecursiveIterator extends Iterator
{
    /**
     * Returns if an iterator can be created for the current entry.
     * @link https://php.net/manual/en/recursiveiterator.haschildren.php
     * @return bool true if the current entry can be iterated over, otherwise returns false.
     */
    #[TentativeType]
    public function hasChildren(): bool;

    /**
     * Returns an iterator for the current entry.
     * @link https://php.net/manual/en/recursiveiterator.getchildren.php
     * @return RecursiveIterator|null An iterator for the current entry.
     */
    #[TentativeType]
    public function getChildren(): ?RecursiveIterator;
}

/**
 * Can be used to iterate through recursive iterators.
 * @link https://php.net/manual/en/class.recursiveiteratoriterator.php
 */
class RecursiveIteratorIterator implements OuterIterator
{
    /**
     * The default. Lists only leaves in iteration.
     */
    public const LEAVES_ONLY = 0;

    /**
     * Lists leaves and parents in iteration with parents coming first.
     */
    public const SELF_FIRST = 1;

    /**
     * Lists leaves and parents in iteration with leaves coming first.
     */
    public const CHILD_FIRST = 2;

    /**
     * Special flag: Ignore exceptions thrown in accessing children.
     */
    public const CATCH_GET_CHILD = 16;

    /**
     * Construct a RecursiveIteratorIterator
     * @link https://php.net/manual/en/recursiveiteratoriterator.construct.php
     * @param Traversable $iterator
     * @param int $mode [optional] The operation mode. See class constants for details.
     * @param int $flags [optional] A bitmask of special flags. See class constants for details.
     * @since 5.1.3
     */
    public function __construct(
        Traversable $iterator,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = self::LEAVES_ONLY,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = 0
    ) {}

    /**
     * Rewind the iterator to the first element of the top level inner iterator
     * @link https://php.net/manual/en/recursiveiteratoriterator.rewind.php
     * @return void
     */
    #[TentativeType]
    public function rewind(): void {}

    /**
     * Check whether the current position is valid
     * @link https://php.net/manual/en/recursiveiteratoriterator.valid.php
     * @return bool true if the current position is valid, otherwise false
     */
    #[TentativeType]
    public function valid(): bool {}

    /**
     * Access the current key
     * @link https://php.net/manual/en/recursiveiteratoriterator.key.php
     * @return mixed The key of the current element.
     */
    #[TentativeType]
    public function key(): mixed {}

    /**
     * Access the current element value
     * @link https://php.net/manual/en/recursiveiteratoriterator.current.php
     * @return mixed The current elements value.
     */
    #[TentativeType]
    public function current(): mixed {}

    /**
     * Move forward to the next element
     * @link https://php.net/manual/en/recursiveiteratoriterator.next.php
     * @return void
     */
    #[TentativeType]
    public function next(): void {}

    /**
     * Get the current depth of the recursive iteration
     * @link https://php.net/manual/en/recursiveiteratoriterator.getdepth.php
     * @return int The current depth of the recursive iteration.
     */
    #[TentativeType]
    public function getDepth(): int {}

    /**
     * The current active sub iterator
     * @link https://php.net/manual/en/recursiveiteratoriterator.getsubiterator.php
     * @param int $level [optional]
     * @return RecursiveIterator|null The current active sub iterator.
     */
    #[TentativeType]
    public function getSubIterator(#[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $level): ?RecursiveIterator {}

    /**
     * Get inner iterator
     * @link https://php.net/manual/en/recursiveiteratoriterator.getinneriterator.php
     * @return RecursiveIterator The current active sub iterator.
     */
    #[TentativeType]
    public function getInnerIterator(): RecursiveIterator {}

    /**
     * Begin Iteration
     * @link https://php.net/manual/en/recursiveiteratoriterator.beginiteration.php
     * @return void
     */
    #[TentativeType]
    public function beginIteration(): void {}

    /**
     * End Iteration
     * @link https://php.net/manual/en/recursiveiteratoriterator.enditeration.php
     * @return void
     */
    #[TentativeType]
    public function endIteration(): void {}

    /**
     * Has children
     * @link https://php.net/manual/en/recursiveiteratoriterator.callhaschildren.php
     * @return bool true if the element has children, otherwise false
     */
    #[TentativeType]
    public function callHasChildren(): bool {}

    /**
     * Get children
     * @link https://php.net/manual/en/recursiveiteratoriterator.callgetchildren.php
     * @return RecursiveIterator|null A <b>RecursiveIterator</b>.
     */
    #[TentativeType]
    public function callGetChildren(): ?RecursiveIterator {}

    /**
     * Begin children
     * @link https://php.net/manual/en/recursiveiteratoriterator.beginchildren.php
     * @return void
     */
    #[TentativeType]
    public function beginChildren(): void {}

    /**
     * End children
     * @link https://php.net/manual/en/recursiveiteratoriterator.endchildren.php
     * @return void
     */
    #[TentativeType]
    public function endChildren(): void {}

    /**
     * Next element
     * @link https://php.net/manual/en/recursiveiteratoriterator.nextelement.php
     * @return void
     */
    #[TentativeType]
    public function nextElement(): void {}

    /**
     * Set max depth
     * @link https://php.net/manual/en/recursiveiteratoriterator.setmaxdepth.php
     * @param int $maxDepth [optional] <p>
     * The maximum allowed depth. Default -1 is used
     * for any depth.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function setMaxDepth(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $maxDepth = -1): void {}

    /**
     * Get max depth
     * @link https://php.net/manual/en/recursiveiteratoriterator.getmaxdepth.php
     * @return int|false The maximum accepted depth, or false if any depth is allowed.
     */
    #[TentativeType]
    public function getMaxDepth(): int|false {}
}

/**
 * Classes implementing <b>OuterIterator</b> can be used to iterate
 * over iterators.
 * @link https://php.net/manual/en/class.outeriterator.php
 */
interface OuterIterator extends Iterator
{
    /**
     * Returns the inner iterator for the current entry.
     * @link https://php.net/manual/en/outeriterator.getinneriterator.php
     * @return Iterator|null The inner iterator for the current entry.
     */
    #[TentativeType]
    public function getInnerIterator(): ?Iterator;
}

/**
 * This iterator wrapper allows the conversion of anything that is
 * Traversable into an Iterator.
 * It is important to understand that most classes that do not implement
 * Iterators have reasons as most likely they do not allow the full
 * Iterator feature set. If so, techniques should be provided to prevent
 * misuse, otherwise expect exceptions or fatal errors.
 * @link https://php.net/manual/en/class.iteratoriterator.php
 */
class IteratorIterator implements OuterIterator
{
    /**
     * Create an iterator from anything that is traversable
     * @link https://php.net/manual/en/iteratoriterator.construct.php
     * @param Traversable $iterator
     * @param string|null $class [optional]
     */
    public function __construct(Traversable $iterator, #[PhpStormStubsElementAvailable(from: '8.0')] ?string $class = '') {}

    /**
     * Get the inner iterator
     * @link https://php.net/manual/en/iteratoriterator.getinneriterator.php
     * @return Iterator|null The inner iterator as passed to IteratorIterator::__construct.
     */
    #[TentativeType]
    public function getInnerIterator(): ?Iterator {}

    /**
     * Rewind to the first element
     * @link https://php.net/manual/en/iteratoriterator.rewind.php
     * @return void
     */
    #[TentativeType]
    public function rewind(): void {}

    /**
     * Checks if the iterator is valid
     * @link https://php.net/manual/en/iteratoriterator.valid.php
     * @return bool true if the iterator is valid, otherwise false
     */
    #[TentativeType]
    public function valid(): bool {}

    /**
     * Get the key of the current element
     * @link https://php.net/manual/en/iteratoriterator.key.php
     * @return mixed The key of the current element.
     */
    #[TentativeType]
    public function key(): mixed {}

    /**
     * Get the current value
     * @link https://php.net/manual/en/iteratoriterator.current.php
     * @return mixed The value of the current element.
     */
    #[TentativeType]
    public function current(): mixed {}

    /**
     * Forward to the next element
     * @link https://php.net/manual/en/iteratoriterator.next.php
     * @return void
     */
    #[TentativeType]
    public function next(): void {}
}

/**
 * This abstract iterator filters out unwanted values. This class should be extended to
 * implement custom iterator filters. The <b>FilterIterator::accept</b>
 * must be implemented in the subclass.
 * @link https://php.net/manual/en/class.filteriterator.php
 */
abstract class FilterIterator extends IteratorIterator
{
    /**
     * Check whether the current element of the iterator is acceptable
     * @link https://php.net/manual/en/filteriterator.accept.php
     * @return bool true if the current element is acceptable, otherwise false.
     */
    #[TentativeType]
    abstract public function accept(): bool;

    /**
     * Construct a filterIterator
     * @link https://php.net/manual/en/filteriterator.construct.php
     * @param Iterator $iterator
     */
    public function __construct(Iterator $iterator) {}

    /**
     * Rewind the iterator
     * @link https://php.net/manual/en/filteriterator.rewind.php
     * @return void
     */
    #[TentativeType]
    public function rewind(): void {}

    /**
     * Check whether the current element is valid
     * @link https://php.net/manual/en/filteriterator.valid.php
     * @return bool true if the current element is valid, otherwise false
     */
    public function valid(): bool {}

    /**
     * Get the current key
     * @link https://php.net/manual/en/filteriterator.key.php
     * @return mixed The key of the current element.
     */
    public function key(): mixed {}

    /**
     * Get the current element value
     * @link https://php.net/manual/en/filteriterator.current.php
     * @return mixed The current element value.
     */
    public function current(): mixed {}

    /**
     * Move the iterator forward
     * @link https://php.net/manual/en/filteriterator.next.php
     * @return void
     */
    #[TentativeType]
    public function next(): void {}

    /**
     * Get the inner iterator
     * @link https://php.net/manual/en/filteriterator.getinneriterator.php
     * @return Iterator The inner iterator.
     */
    public function getInnerIterator(): Iterator {}
}

/**
 * This abstract iterator filters out unwanted values for a <b>RecursiveIterator</b>.
 * This class should be extended to implement custom filters.
 * The <b>RecursiveFilterIterator::accept</b> must be implemented in the subclass.
 * @link https://php.net/manual/en/class.recursivefilteriterator.php
 */
abstract class RecursiveFilterIterator extends FilterIterator implements RecursiveIterator
{
    /**
     * Create a RecursiveFilterIterator from a RecursiveIterator
     * @link https://php.net/manual/en/recursivefilteriterator.construct.php
     * @param RecursiveIterator $iterator
     */
    public function __construct(RecursiveIterator $iterator) {}

    /**
     * Check whether the inner iterator's current element has children
     * @link https://php.net/manual/en/recursivefilteriterator.haschildren.php
     * @return bool true if the inner iterator has children, otherwise false
     */
    #[TentativeType]
    public function hasChildren(): bool {}

    /**
     * Return the inner iterator's children contained in a RecursiveFilterIterator
     * @link https://php.net/manual/en/recursivefilteriterator.getchildren.php
     * @return RecursiveFilterIterator|null containing the inner iterator's children.
     */
    #[TentativeType]
    public function getChildren(): ?RecursiveFilterIterator {}
}

/**
 * This extended FilterIterator allows a recursive iteration using RecursiveIteratorIterator that only shows those elements which have children.
 * @link https://php.net/manual/en/class.parentiterator.php
 */
class ParentIterator extends RecursiveFilterIterator
{
    /**
     * Determines acceptability
     * @link https://php.net/manual/en/parentiterator.accept.php
     * @return bool true if the current element is acceptable, otherwise false.
     */
    #[TentativeType]
    public function accept(): bool {}

    /**
     * Constructs a ParentIterator
     * @link https://php.net/manual/en/parentiterator.construct.php
     * @param RecursiveIterator $iterator
     */
    public function __construct(RecursiveIterator $iterator) {}

    /**
     * Check whether the inner iterator's current element has children
     * @link https://php.net/manual/en/recursivefilteriterator.haschildren.php
     * @return bool true if the inner iterator has children, otherwise false
     */
    public function hasChildren() {}

    /**
     * Return the inner iterator's children contained in a RecursiveFilterIterator
     * @link https://php.net/manual/en/recursivefilteriterator.getchildren.php
     * @return ParentIterator containing the inner iterator's children.
     */
    public function getChildren() {}
}

/**
 * The Seekable iterator.
 * @link https://php.net/manual/en/class.seekableiterator.php
 */
interface SeekableIterator extends Iterator
{
    /**
     * Seeks to a position
     * @link https://php.net/manual/en/seekableiterator.seek.php
     * @param int $offset <p>
     * The position to seek to.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function seek(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset): void;
}

/**
 * The <b>LimitIterator</b> class allows iteration over
 * a limited subset of items in an <b>Iterator</b>.
 * @link https://php.net/manual/en/class.limititerator.php
 */
class LimitIterator extends IteratorIterator
{
    /**
     * Construct a LimitIterator
     * @link https://php.net/manual/en/limititerator.construct.php
     * @param Iterator $iterator The iterator to limit.
     * @param int $offset [optional] The offset to start at. Must be zero or greater.
     * @param int $limit [optional] The number of items to iterate. Must be -1 or greater. -1, the default, means no limit.
     */
    public function __construct(
        Iterator $iterator,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset = 0,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $limit = -1
    ) {}

    /**
     * Rewind the iterator to the specified starting offset
     * @link https://php.net/manual/en/limititerator.rewind.php
     * @return void
     */
    #[TentativeType]
    public function rewind(): void {}

    /**
     * Check whether the current element is valid
     * @link https://php.net/manual/en/limititerator.valid.php
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function valid(): bool {}

    /**
     * Get current key
     * @link https://php.net/manual/en/limititerator.key.php
     * @return mixed The key of the current element.
     */
    public function key(): mixed {}

    /**
     * Get current element
     * @link https://php.net/manual/en/limititerator.current.php
     * @return mixed the current element or null if there is none.
     */
    public function current(): mixed {}

    /**
     * Move the iterator forward
     * @link https://php.net/manual/en/limititerator.next.php
     * @return void
     */
    #[TentativeType]
    public function next(): void {}

    /**
     * Seek to the given position
     * @link https://php.net/manual/en/limititerator.seek.php
     * @param int $offset <p>
     * The position to seek to.
     * </p>
     * @return int the offset position after seeking.
     */
    #[TentativeType]
    public function seek(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset): int {}

    /**
     * Return the current position
     * @link https://php.net/manual/en/limititerator.getposition.php
     * @return int The current position.
     */
    #[TentativeType]
    public function getPosition(): int {}

    /**
     * Get inner iterator
     * @link https://php.net/manual/en/limititerator.getinneriterator.php
     * @return Iterator The inner iterator passed to <b>LimitIterator::__construct</b>.
     */
    public function getInnerIterator(): Iterator {}
}

/**
 * This object supports cached iteration over another iterator.
 * @link https://php.net/manual/en/class.cachingiterator.php
 */
class CachingIterator extends IteratorIterator implements ArrayAccess, Countable, Stringable
{
    /**
     * String conversion flag (mutually exclusive): Uses the current element for the iterator's string conversion.
     * This converts the current element to a string only once, regardless of whether it is needed or not.
     */
    public const CALL_TOSTRING = 1;

    /**
     * String conversion flag (mutually exclusive). Uses the current key for the iterator's string conversion.
     */
    public const TOSTRING_USE_KEY = 2;

    /**
     * String conversion flag (mutually exclusive). Uses the current element for the iterator's string conversion.
     * This converts the current element to a string only when (and every time) it is needed.
     */
    public const TOSTRING_USE_CURRENT = 4;

    /**
     * String conversion flag (mutually exclusive). Forwards the string conversion to the inner iterator.
     * This converts the inner iterator to a string only once, regardless of whether it is needed or not.
     */
    public const TOSTRING_USE_INNER = 8;

    /**
     * Ignore exceptions thrown in accessing children. Only used with {@see RecursiveCachingIterator}.
     */
    public const CATCH_GET_CHILD = 16;

    /**
     * Cache all read data. This is needed to use {@see CachingIterator::getCache}, and ArrayAccess and Countable methods.
     */
    public const FULL_CACHE = 256;

    /**
     * Constructs a new CachingIterator.
     * @link https://php.net/manual/en/cachingiterator.construct.php
     * @param Iterator $iterator The iterator to cache.
     * @param int $flags [optional] A bitmask of flags. See CachingIterator class constants for details.
     */
    public function __construct(Iterator $iterator, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = self::CALL_TOSTRING) {}

    /**
     * Rewind the iterator
     * @link https://php.net/manual/en/cachingiterator.rewind.php
     * @return void
     */
    #[TentativeType]
    public function rewind(): void {}

    /**
     * Check whether the current element is valid
     * @link https://php.net/manual/en/cachingiterator.valid.php
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function valid(): bool {}

    /**
     * Return the key for the current element
     * @link https://php.net/manual/en/cachingiterator.key.php
     * @return mixed The key of the current element.
     */
    public function key(): mixed {}

    /**
     * Return the current element
     * @link https://php.net/manual/en/cachingiterator.current.php
     * @return mixed
     */
    public function current(): mixed {}

    /**
     * Move the iterator forward
     * @link https://php.net/manual/en/cachingiterator.next.php
     * @return void
     */
    #[TentativeType]
    public function next(): void {}

    /**
     * Check whether the inner iterator has a valid next element
     * @link https://php.net/manual/en/cachingiterator.hasnext.php
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function hasNext(): bool {}

    /**
     * Return the string representation of the current iteration based on the flag being used.
     * @link https://php.net/manual/en/cachingiterator.tostring.php
     * @return string The string representation of the current iteration based on the flag being used.
     */
    #[TentativeType]
    public function __toString(): string {}

    /**
     * Returns the inner iterator
     * @link https://php.net/manual/en/cachingiterator.getinneriterator.php
     * @return Iterator an object implementing the Iterator interface.
     */
    public function getInnerIterator(): Iterator {}

    /**
     * Get flags used
     * @link https://php.net/manual/en/cachingiterator.getflags.php
     * @return int Bitmask of the flags
     */
    #[TentativeType]
    public function getFlags(): int {}

    /**
     * The setFlags purpose
     * @link https://php.net/manual/en/cachingiterator.setflags.php
     * @param int $flags Bitmask of the flags to set.
     * @return void
     */
    #[TentativeType]
    public function setFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): void {}

    /**
     * Internal cache array index to retrieve.
     * @link https://php.net/manual/en/cachingiterator.offsetget.php
     * @param string $key The index of the element to retrieve.
     * @return mixed
     * @throws BadMethodCallException when the {@see CachingIterator::FULL_CACHE} flag is not being used.
     */
    #[TentativeType]
    public function offsetGet($key): mixed {}

    /**
     * Set an element on the internal cache array.
     * @link https://php.net/manual/en/cachingiterator.offsetset.php
     * @param string $key The index of the element to be set.
     * @param string $value The new value for the <i>index</i>.
     * @return void
     * @throws BadMethodCallException when the {@see CachingIterator::FULL_CACHE} flag is not being used.
     */
    #[TentativeType]
    public function offsetSet($key, #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {}

    /**
     * Remove an element from the internal cache array.
     * @link https://php.net/manual/en/cachingiterator.offsetunset.php
     * @param string $key The index of the element to be unset.
     * @return void
     * @throws BadMethodCallException when the {@see CachingIterator::FULL_CACHE} flag is not being used.
     */
    #[TentativeType]
    public function offsetUnset($key): void {}

    /**
     * Return whether an element at the index exists on the internal cache array.
     * @link https://php.net/manual/en/cachingiterator.offsetexists.php
     * @param string $key The index being checked.
     * @return bool true if an entry referenced by the offset exists, false otherwise.
     * @throws BadMethodCallException when the {@see CachingIterator::FULL_CACHE} flag is not being used.
     */
    #[TentativeType]
    public function offsetExists($key): bool {}

    /**
     * Retrieve the contents of the cache
     * @link https://php.net/manual/en/cachingiterator.getcache.php
     * @return array An array containing the cache items.
     * @throws BadMethodCallException when the {@see CachingIterator::FULL_CACHE} flag is not being used.
     */
    #[TentativeType]
    public function getCache(): array {}

    /**
     * The number of elements in the iterator
     * @link https://php.net/manual/en/cachingiterator.count.php
     * @return int The count of the elements iterated over.
     * @throws BadMethodCallException when the {@see CachingIterator::FULL_CACHE} flag is not being used.
     * @since 5.2.2
     */
    #[TentativeType]
    public function count(): int {}
}

/**
 * ...
 * @link https://php.net/manual/en/class.recursivecachingiterator.php
 */
class RecursiveCachingIterator extends CachingIterator implements RecursiveIterator
{
    /**
     * Constructs a new RecursiveCachingIterator.
     * @link https://php.net/manual/en/recursivecachingiterator.construct.php
     * @param Iterator $iterator The iterator to cache.
     * @param int $flags [optional] A bitmask of flags. See CachingIterator class constants for details.
     */
    public function __construct(Iterator $iterator, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = self::CALL_TOSTRING) {}

    /**
     * Check whether the current element of the inner iterator has children
     * @link https://php.net/manual/en/recursivecachingiterator.haschildren.php
     * @return bool true if the inner iterator has children, otherwise false
     */
    #[TentativeType]
    public function hasChildren(): bool {}

    /**
     * Return the inner iterator's children as a RecursiveCachingIterator
     * @link https://php.net/manual/en/recursivecachingiterator.getchildren.php
     * @return RecursiveCachingIterator|null The inner iterator's children, as a RecursiveCachingIterator.
     */
    #[TentativeType]
    public function getChildren(): ?RecursiveCachingIterator {}
}

/**
 * This iterator cannot be rewinded.
 * @link https://php.net/manual/en/class.norewinditerator.php
 */
class NoRewindIterator extends IteratorIterator
{
    /**
     * Construct a NoRewindIterator
     * @link https://php.net/manual/en/norewinditerator.construct.php
     * @param Iterator $iterator
     */
    public function __construct(Iterator $iterator) {}

    /**
     * Prevents the rewind operation on the inner iterator.
     * @link https://php.net/manual/en/norewinditerator.rewind.php
     * @return void
     */
    #[TentativeType]
    public function rewind(): void {}

    /**
     * Validates the iterator
     * @link https://php.net/manual/en/norewinditerator.valid.php
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function valid(): bool {}

    /**
     * Get the current key
     * @link https://php.net/manual/en/norewinditerator.key.php
     * @return mixed The key of the current element.
     */
    #[TentativeType]
    public function key(): mixed {}

    /**
     * Get the current value
     * @link https://php.net/manual/en/norewinditerator.current.php
     * @return mixed The current value.
     */
    #[TentativeType]
    public function current(): mixed {}

    /**
     * Forward to the next element
     * @link https://php.net/manual/en/norewinditerator.next.php
     * @return void
     */
    #[TentativeType]
    public function next(): void {}

    /**
     * Get the inner iterator
     * @link https://php.net/manual/en/norewinditerator.getinneriterator.php
     * @return Iterator The inner iterator, as passed to <b>NoRewindIterator::__construct</b>.
     */
    public function getInnerIterator(): Iterator {}
}

/**
 * An Iterator that iterates over several iterators one after the other.
 * @link https://php.net/manual/en/class.appenditerator.php
 */
class AppendIterator extends IteratorIterator
{
    /**
     * Constructs an AppendIterator
     * @link https://php.net/manual/en/appenditerator.construct.php
     */
    public function __construct() {}

    /**
     * Appends an iterator
     * @link https://php.net/manual/en/appenditerator.append.php
     * @param Iterator $iterator <p>
     * The iterator to append.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function append(Iterator $iterator): void {}

    /**
     * Rewinds the Iterator
     * @link https://php.net/manual/en/appenditerator.rewind.php
     * @return void
     */
    #[TentativeType]
    public function rewind(): void {}

    /**
     * Checks validity of the current element
     * @link https://php.net/manual/en/appenditerator.valid.php
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function valid(): bool {}

    /**
     * Gets the current key
     * @link https://php.net/manual/en/appenditerator.key.php
     * @return mixed The key of the current element.
     */
    public function key(): mixed {}

    /**
     * Gets the current value
     * @link https://php.net/manual/en/appenditerator.current.php
     * @return mixed The current value if it is valid or null otherwise.
     */
    #[TentativeType]
    public function current(): mixed {}

    /**
     * Moves to the next element
     * @link https://php.net/manual/en/appenditerator.next.php
     * @return void
     */
    #[TentativeType]
    public function next(): void {}

    /**
     * Gets an inner iterator
     * @link https://php.net/manual/en/appenditerator.getinneriterator.php
     * @return Iterator the current inner Iterator.
     */
    public function getInnerIterator(): Iterator {}

    /**
     * Gets an index of iterators
     * @link https://php.net/manual/en/appenditerator.getiteratorindex.php
     * @return int|null The index of iterators.
     */
    #[TentativeType]
    public function getIteratorIndex(): ?int {}

    /**
     * The getArrayIterator method
     * @link https://php.net/manual/en/appenditerator.getarrayiterator.php
     * @return ArrayIterator containing the appended iterators.
     */
    #[TentativeType]
    public function getArrayIterator(): ArrayIterator {}
}

/**
 * The <b>InfiniteIterator</b> allows one to
 * infinitely iterate over an iterator without having to manually
 * rewind the iterator upon reaching its end.
 * @link https://php.net/manual/en/class.infiniteiterator.php
 */
class InfiniteIterator extends IteratorIterator
{
    /**
     * Constructs an InfiniteIterator
     * @link https://php.net/manual/en/infiniteiterator.construct.php
     * @param Iterator $iterator
     */
    public function __construct(Iterator $iterator) {}

    /**
     * Moves the inner Iterator forward or rewinds it
     * @link https://php.net/manual/en/infiniteiterator.next.php
     * @return void
     */
    #[TentativeType]
    public function next(): void {}
}

/**
 * This iterator can be used to filter another iterator based on a regular expression.
 * @link https://php.net/manual/en/class.regexiterator.php
 */
class RegexIterator extends FilterIterator
{
    /**
     * Return all matches for the current entry @see preg_match_all
     */
    public const ALL_MATCHES = 2;

    /**
     * Return the first match for the current entry @see preg_match
     */
    public const GET_MATCH = 1;

    /**
     * Only execute match (filter) for the current entry @see preg_match
     */
    public const MATCH = 0;

    /**
     * Replace the current entry (Not fully implemented yet) @see preg_replace
     */
    public const REPLACE = 4;

    /**
     * Returns the split values for the current entry @see preg_split
     */
    public const SPLIT = 3;

    /**
     * Special flag: Match the entry key instead of the entry value.
     */
    public const USE_KEY = 1;
    public const INVERT_MATCH = 2;

    #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
    public $replacement;

    /**
     * Create a new RegexIterator
     * @link https://php.net/manual/en/regexiterator.construct.php
     * @param Iterator $iterator The iterator to apply this regex filter to.
     * @param string $pattern The regular expression to match.
     * @param int $mode [optional] Operation mode, see RegexIterator::setMode() for a list of modes.
     * @param int $flags [optional] Special flags, see RegexIterator::setFlags() for a list of available flags.
     * @param int $pregFlags [optional] The regular expression flags. These flags depend on the operation mode parameter
     */
    public function __construct(
        Iterator $iterator,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = self::MATCH,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = 0,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $pregFlags = 0
    ) {}

    /**
     * Get accept status
     * @link https://php.net/manual/en/regexiterator.accept.php
     * @return bool true if a match, false otherwise.
     */
    #[TentativeType]
    public function accept(): bool {}

    /**
     * Returns operation mode.
     * @link https://php.net/manual/en/regexiterator.getmode.php
     * @return int the operation mode.
     */
    #[TentativeType]
    public function getMode(): int {}

    /**
     * Sets the operation mode.
     * @link https://php.net/manual/en/regexiterator.setmode.php
     * @param int $mode <p>
     * The operation mode.
     * </p>
     * <p>
     * The available modes are listed below. The actual
     * meanings of these modes are described in the
     * predefined constants.
     * <table>
     * <b>RegexIterator</b> modes
     * <tr valign="top">
     * <td>value</td>
     * <td>constant</td>
     * </tr>
     * <tr valign="top">
     * <td>0</td>
     * <td>
     * RegexIterator::MATCH
     * </td>
     * </tr>
     * <tr valign="top">
     * <td>1</td>
     * <td>
     * RegexIterator::GET_MATCH
     * </td>
     * </tr>
     * <tr valign="top">
     * <td>2</td>
     * <td>
     * RegexIterator::ALL_MATCHES
     * </td>
     * </tr>
     * <tr valign="top">
     * <td>3</td>
     * <td>
     * RegexIterator::SPLIT
     * </td>
     * </tr>
     * <tr valign="top">
     * <td>4</td>
     * <td>
     * RegexIterator::REPLACE
     * </td>
     * </tr>
     * </table>
     * </p>
     * @return void
     */
    #[TentativeType]
    public function setMode(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode): void {}

    /**
     * Get flags
     * @link https://php.net/manual/en/regexiterator.getflags.php
     * @return int the set flags.
     */
    #[TentativeType]
    public function getFlags(): int {}

    /**
     * Sets the flags.
     * @link https://php.net/manual/en/regexiterator.setflags.php
     * @param int $flags <p>
     * The flags to set, a bitmask of class constants.
     * </p>
     * <p>
     * The available flags are listed below. The actual
     * meanings of these flags are described in the
     * predefined constants.
     * <table>
     * <b>RegexIterator</b> flags
     * <tr valign="top">
     * <td>value</td>
     * <td>constant</td>
     * </tr>
     * <tr valign="top">
     * <td>1</td>
     * <td>
     * RegexIterator::USE_KEY
     * </td>
     * </tr>
     * </table>
     * </p>
     * @return void
     */
    #[TentativeType]
    public function setFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): void {}

    /**
     * Returns current regular expression
     * @link https://secure.php.net/manual/en/regexiterator.getregex.php
     * @return string
     * @since 5.4
     */
    #[TentativeType]
    public function getRegex(): string {}

    /**
     * Returns the regular expression flags.
     * @link https://php.net/manual/en/regexiterator.getpregflags.php
     * @return int a bitmask of the regular expression flags.
     */
    #[TentativeType]
    public function getPregFlags(): int {}

    /**
     * Sets the regular expression flags.
     * @link https://php.net/manual/en/regexiterator.setpregflags.php
     * @param int $pregFlags <p>
     * The regular expression flags. See <b>RegexIterator::__construct</b>
     * for an overview of available flags.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function setPregFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $pregFlags): void {}
}

/**
 * This recursive iterator can filter another recursive iterator via a regular expression.
 * @link https://php.net/manual/en/class.recursiveregexiterator.php
 */
class RecursiveRegexIterator extends RegexIterator implements RecursiveIterator
{
    /**
     * Creates a new RecursiveRegexIterator.
     * @link https://php.net/manual/en/recursiveregexiterator.construct.php
     * @param RecursiveIterator $iterator The iterator to apply this regex filter to.
     * @param string $pattern The regular expression to match.
     * @param int $mode [optional] Operation mode, see RegexIterator::setMode() for a list of modes.
     * @param int $flags [optional] Special flags, see RegexIterator::setFlags() for a list of available flags.
     * @param int $pregFlags [optional] The regular expression flags. These flags depend on the operation mode parameter
     */
    public function __construct(
        RecursiveIterator $iterator,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = self::MATCH,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = 0,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $pregFlags = 0
    ) {}

    /**
     * Returns whether an iterator can be obtained for the current entry.
     * @link https://php.net/manual/en/recursiveregexiterator.haschildren.php
     * @return bool true if an iterator can be obtained for the current entry, otherwise returns false.
     */
    #[TentativeType]
    public function hasChildren(): bool {}

    /**
     * Returns an iterator for the current entry.
     * @link https://php.net/manual/en/recursiveregexiterator.getchildren.php
     * @return RecursiveRegexIterator An iterator for the current entry, if it can be iterated over by the inner iterator.
     */
    #[TentativeType]
    public function getChildren(): RecursiveRegexIterator {}
}

/**
 * Allows iterating over a <b>RecursiveIterator</b> to generate an ASCII graphic tree.
 * @link https://php.net/manual/en/class.recursivetreeiterator.php
 */
class RecursiveTreeIterator extends RecursiveIteratorIterator
{
    public const BYPASS_CURRENT = 4;
    public const BYPASS_KEY = 8;
    public const PREFIX_LEFT = 0;
    public const PREFIX_MID_HAS_NEXT = 1;
    public const PREFIX_MID_LAST = 2;
    public const PREFIX_END_HAS_NEXT = 3;
    public const PREFIX_END_LAST = 4;
    public const PREFIX_RIGHT = 5;

    /**
     * Construct a RecursiveTreeIterator
     * @link https://php.net/manual/en/recursivetreeiterator.construct.php
     * @param RecursiveIterator|IteratorAggregate $iterator
     * @param int $flags [optional] Flags to control the behavior of the RecursiveTreeIterator object.
     * @param int $cachingIteratorFlags [optional] Flags to affect the behavior of the {@see RecursiveCachingIterator} used internally.
     * @param int $mode [optional] Flags to affect the behavior of the {@see RecursiveIteratorIterator} used internally.
     */
    public function __construct(
        $iterator,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = self::BYPASS_KEY,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $cachingIteratorFlags = CachingIterator::CATCH_GET_CHILD,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = self::SELF_FIRST
    ) {}

    /**
     * Rewind iterator
     * @link https://php.net/manual/en/recursivetreeiterator.rewind.php
     * @return void
     */
    public function rewind(): void {}

    /**
     * Check validity
     * @link https://php.net/manual/en/recursivetreeiterator.valid.php
     * @return bool true if the current position is valid, otherwise false
     */
    public function valid(): bool {}

    /**
     * Get the key of the current element
     * @link https://php.net/manual/en/recursivetreeiterator.key.php
     * @return string the current key prefixed and postfixed.
     */
    #[TentativeType]
    public function key(): mixed {}

    /**
     * Get current element
     * @link https://php.net/manual/en/recursivetreeiterator.current.php
     * @return string the current element prefixed and postfixed.
     */
    #[TentativeType]
    public function current(): mixed {}

    /**
     * Move to next element
     * @link https://php.net/manual/en/recursivetreeiterator.next.php
     * @return void
     */
    public function next(): void {}

    /**
     * Begin iteration
     * @link https://php.net/manual/en/recursivetreeiterator.beginiteration.php
     * @return RecursiveIterator A <b>RecursiveIterator</b>.
     */
    public function beginIteration() {}

    /**
     * End iteration
     * @link https://php.net/manual/en/recursivetreeiterator.enditeration.php
     * @return void
     */
    public function endIteration() {}

    /**
     * Has children
     * @link https://php.net/manual/en/recursivetreeiterator.callhaschildren.php
     * @return bool true if there are children, otherwise false
     */
    public function callHasChildren() {}

    /**
     * Get children
     * @link https://php.net/manual/en/recursivetreeiterator.callgetchildren.php
     * @return RecursiveIterator A <b>RecursiveIterator</b>.
     */
    public function callGetChildren() {}

    /**
     * Begin children
     * @link https://php.net/manual/en/recursivetreeiterator.beginchildren.php
     * @return void
     */
    public function beginChildren() {}

    /**
     * End children
     * @link https://php.net/manual/en/recursivetreeiterator.endchildren.php
     * @return void
     */
    public function endChildren() {}

    /**
     * Next element
     * @link https://php.net/manual/en/recursivetreeiterator.nextelement.php
     * @return void
     */
    public function nextElement() {}

    /**
     * Get the prefix
     * @link https://php.net/manual/en/recursivetreeiterator.getprefix.php
     * @return string the string to place in front of current element
     */
    #[TentativeType]
    public function getPrefix(): string {}

    /**
     * @param string $postfix
     */
    #[TentativeType]
    public function setPostfix(#[PhpStormStubsElementAvailable(from: '7.3')] string $postfix): void {}

    /**
     * Set a part of the prefix
     * @link https://php.net/manual/en/recursivetreeiterator.setprefixpart.php
     * @param int $part <p>
     * One of the RecursiveTreeIterator::PREFIX_* constants.
     * </p>
     * @param string $value <p>
     * The value to assign to the part of the prefix specified in <i>part</i>.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function setPrefixPart(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $part,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value
    ): void {}

    /**
     * Get current entry
     * @link https://php.net/manual/en/recursivetreeiterator.getentry.php
     * @return string the part of the tree built for the current element.
     */
    #[TentativeType]
    public function getEntry(): string {}

    /**
     * Get the postfix
     * @link https://php.net/manual/en/recursivetreeiterator.getpostfix.php
     * @return string to place after the current element.
     */
    #[TentativeType]
    public function getPostfix(): string {}
}

/**
 * This class allows objects to work as arrays.
 * @link https://php.net/manual/en/class.arrayobject.php
 * @template TKey
 * @template TValue
 * @template-implements IteratorAggregate<TKey, TValue>
 * @template-implements ArrayAccess<TKey, TValue>
 */
class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Countable
{
    /**
     * Properties of the object have their normal functionality when accessed as list (var_dump, foreach, etc.).
     */
    public const STD_PROP_LIST = 1;

    /**
     * Entries can be accessed as properties (read and write).
     */
    public const ARRAY_AS_PROPS = 2;

    /**
     * Construct a new array object
     * @link https://php.net/manual/en/arrayobject.construct.php
     * @param array<TValue>|object $array The input parameter accepts an array or an Object.
     * @param int $flags Flags to control the behaviour of the ArrayObject object.
     * @param class-string<ArrayIterator> $iteratorClass Specify the class that will be used for iteration of the ArrayObject object. ArrayIterator is the default class used.
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'object|array'], default: '')] $array = [],
        #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = 0,
        #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $iteratorClass = "ArrayIterator"
    ) {}

    /**
     * Returns whether the requested index exists
     * @link https://php.net/manual/en/arrayobject.offsetexists.php
     * @param TKey $key <p>
     * The index being checked.
     * </p>
     * @return bool true if the requested index exists, otherwise false
     */
    #[TentativeType]
    public function offsetExists(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $key): bool {}

    /**
     * Returns the value at the specified index
     * @link https://php.net/manual/en/arrayobject.offsetget.php
     * @param TKey $key <p>
     * The index with the value.
     * </p>
     * @return mixed|false The value at the specified index or false.
     */
    #[TentativeType]
    public function offsetGet(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $key): mixed {}

    /**
     * Sets the value at the specified index to newval
     * @link https://php.net/manual/en/arrayobject.offsetset.php
     * @param TKey $key <p>
     * The index being set.
     * </p>
     * @param TValue $value <p>
     * The new value for the <i>index</i>.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function offsetSet(
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $key,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value
    ): void {}

    /**
     * Unsets the value at the specified index
     * @link https://php.net/manual/en/arrayobject.offsetunset.php
     * @param TKey $key <p>
     * The index being unset.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function offsetUnset(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $key): void {}

    /**
     * Appends the value
     * @link https://php.net/manual/en/arrayobject.append.php
     * @param TValue $value <p>
     * The value being appended.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function append(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {}

    /**
     * Creates a copy of the ArrayObject.
     * @link https://php.net/manual/en/arrayobject.getarraycopy.php
     * @return array<TValue> a copy of the array. When the <b>ArrayObject</b> refers to an object
     * an array of the public properties of that object will be returned.
     */
    #[TentativeType]
    public function getArrayCopy(): array {}

    /**
     * Get the number of public properties in the ArrayObject
     * When the <b>ArrayObject</b> is constructed from an array all properties are public.
     * @link https://php.net/manual/en/arrayobject.count.php
     * @return int The number of public properties in the ArrayObject.
     */
    #[TentativeType]
    public function count(): int {}

    /**
     * Gets the behavior flags.
     * @link https://php.net/manual/en/arrayobject.getflags.php
     * @return int the behavior flags of the ArrayObject.
     */
    #[TentativeType]
    public function getFlags(): int {}

    /**
     * Sets the behavior flags.
     * @link https://php.net/manual/en/arrayobject.setflags.php
     * @param int $flags <p>
     * The new ArrayObject behavior.
     * It takes on either a bitmask, or named constants. Using named
     * constants is strongly encouraged to ensure compatibility for future
     * versions.
     * </p>
     * <p>
     * The available behavior flags are listed below. The actual
     * meanings of these flags are described in the
     * predefined constants.
     * <table>
     * ArrayObject behavior flags
     * <tr valign="top">
     * <td>value</td>
     * <td>constant</td>
     * </tr>
     * <tr valign="top">
     * <td>1</td>
     * <td>
     * ArrayObject::STD_PROP_LIST
     * </td>
     * </tr>
     * <tr valign="top">
     * <td>2</td>
     * <td>
     * ArrayObject::ARRAY_AS_PROPS
     * </td>
     * </tr>
     * </table>
     * </p>
     * @return void
     */
    #[TentativeType]
    public function setFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): void {}

    /**
     * Sort the entries by value
     * @link https://php.net/manual/en/arrayobject.asort.php
     * @param int $flags [optional]
     * @return bool
     */
    #[TentativeType]
    public function asort(#[PhpStormStubsElementAvailable(from: '8.0')] int $flags = SORT_REGULAR): bool {}

    /**
     * Sort the entries by key
     * @link https://php.net/manual/en/arrayobject.ksort.php
     * @param int $flags [optional]
     * @return bool
     */
    #[TentativeType]
    public function ksort(#[PhpStormStubsElementAvailable(from: '8.0')] int $flags = SORT_REGULAR): bool {}

    /**
     * Sort the entries with a user-defined comparison function and maintain key association
     * @link https://php.net/manual/en/arrayobject.uasort.php
     * @param callable(TValue, TValue):int $callback <p>
     * Function <i>cmp_function</i> should accept two
     * parameters which will be filled by pairs of entries.
     * The comparison function must return an integer less than, equal
     * to, or greater than zero if the first argument is considered to
     * be respectively less than, equal to, or greater than the
     * second.
     * </p>
     * @return bool
     */
    #[TentativeType]
    public function uasort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback): bool {}

    /**
     * Sort the entries by keys using a user-defined comparison function
     * @link https://php.net/manual/en/arrayobject.uksort.php
     * @param callable(TValue, TValue):int $callback <p>
     * The callback comparison function.
     * </p>
     * <p>
     * Function <i>cmp_function</i> should accept two
     * parameters which will be filled by pairs of entry keys.
     * The comparison function must return an integer less than, equal
     * to, or greater than zero if the first argument is considered to
     * be respectively less than, equal to, or greater than the
     * second.
     * </p>
     * @return bool
     */
    #[TentativeType]
    public function uksort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback): bool {}

    /**
     * Sort entries using a "natural order" algorithm
     * @link https://php.net/manual/en/arrayobject.natsort.php
     * @return bool
     */
    #[TentativeType]
    public function natsort(): bool {}

    /**
     * Sort an array using a case insensitive "natural order" algorithm
     * @link https://php.net/manual/en/arrayobject.natcasesort.php
     * @return bool
     */
    #[TentativeType]
    public function natcasesort(): bool {}

    /**
     * Unserialize an ArrayObject
     * @link https://php.net/manual/en/arrayobject.unserialize.php
     * @param string $data <p>
     * The serialized <b>ArrayObject</b>.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function unserialize(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): void {}

    /**
     * Serialize an ArrayObject
     * @link https://php.net/manual/en/arrayobject.serialize.php
     * @return string The serialized representation of the <b>ArrayObject</b>.
     */
    #[TentativeType]
    public function serialize(): string {}

    /**
     * @return array
     * @since 7.4
     */
    #[TentativeType]
    public function __debugInfo(): array {}

    /**
     * @return array
     * @since 7.4
     */
    #[TentativeType]
    public function __serialize(): array {}

    /**
     * @param array $data
     * @since 7.4
     */
    #[TentativeType]
    public function __unserialize(array $data): void {}

    /**
     * Create a new iterator from an ArrayObject instance
     * @link https://php.net/manual/en/arrayobject.getiterator.php
     * @return ArrayIterator<TKey, TValue> An iterator from an <b>ArrayObject</b>.
     */
    #[TentativeType]
    public function getIterator(): Iterator {}

    /**
     * Exchange the array for another one.
     * @link https://php.net/manual/en/arrayobject.exchangearray.php
     * @param mixed $array <p>
     * The new array or object to exchange with the current array.
     * </p>
     * @return array the old array.
     */
    #[TentativeType]
    public function exchangeArray(#[LanguageLevelTypeAware(['8.0' => 'object|array'], default: '')] $array): array {}

    /**
     * Sets the iterator classname for the ArrayObject.
     * @link https://php.net/manual/en/arrayobject.setiteratorclass.php
     * @param class-string<ArrayIterator> $iteratorClass <p>
     * The classname of the array iterator to use when iterating over this object.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function setIteratorClass(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $iteratorClass): void {}

    /**
     * Gets the iterator classname for the ArrayObject.
     * @link https://php.net/manual/en/arrayobject.getiteratorclass.php
     * @return class-string<ArrayIterator> the iterator class name that is used to iterate over this object.
     */
    #[TentativeType]
    public function getIteratorClass(): string {}
}

/**
 * This iterator allows to unset and modify values and keys while iterating
 * over Arrays and Objects.
 * @link https://php.net/manual/en/class.arrayiterator.php
 */
class ArrayIterator implements SeekableIterator, ArrayAccess, Serializable, Countable
{
    public const STD_PROP_LIST = 1;
    public const ARRAY_AS_PROPS = 2;

    /**
     * Construct an ArrayIterator
     * @link https://php.net/manual/en/arrayiterator.construct.php
     * @param array $array The array or object to be iterated on.
     * @param int $flags Flags to control the behaviour of the ArrayObject object.
     * @see ArrayObject::setFlags()
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'object|array'], default: '')] $array = [],
        #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = 0,
        #[PhpStormStubsElementAvailable(from: '7.0', to: '7.1')] $iterator_class = null
    ) {}

    /**
     * Check if offset exists
     * @link https://php.net/manual/en/arrayiterator.offsetexists.php
     * @param string $key <p>
     * The offset being checked.
     * </p>
     * @return bool true if the offset exists, otherwise false
     */
    #[TentativeType]
    public function offsetExists(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $key): bool {}

    /**
     * Get value for an offset
     * @link https://php.net/manual/en/arrayiterator.offsetget.php
     * @param string $key <p>
     * The offset to get the value from.
     * </p>
     * @return mixed The value at offset <i>index</i>.
     */
    #[TentativeType]
    public function offsetGet(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $key): mixed {}

    /**
     * Set value for an offset
     * @link https://php.net/manual/en/arrayiterator.offsetset.php
     * @param string $key <p>
     * The index to set for.
     * </p>
     * @param string $value <p>
     * The new value to store at the index.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function offsetSet(
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $key,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value
    ): void {}

    /**
     * Unset value for an offset
     * @link https://php.net/manual/en/arrayiterator.offsetunset.php
     * @param string $key <p>
     * The offset to unset.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function offsetUnset(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $key): void {}

    /**
     * Append an element
     * @link https://php.net/manual/en/arrayiterator.append.php
     * @param mixed $value <p>
     * The value to append.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function append(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {}

    /**
     * Get array copy
     * @link https://php.net/manual/en/arrayiterator.getarraycopy.php
     * @return array A copy of the array, or array of public properties
     * if ArrayIterator refers to an object.
     */
    #[TentativeType]
    public function getArrayCopy(): array {}

    /**
     * Count elements
     * @link https://php.net/manual/en/arrayiterator.count.php
     * @return int<0,max> The number of elements or public properties in the associated
     * array or object, respectively.
     */
    #[TentativeType]
    public function count(): int {}

    /**
     * Get flags
     * @link https://php.net/manual/en/arrayiterator.getflags.php
     * @return int The current flags.
     */
    #[TentativeType]
    public function getFlags(): int {}

    /**
     * Set behaviour flags
     * @link https://php.net/manual/en/arrayiterator.setflags.php
     * @param string $flags <p>
     * A bitmask as follows:
     * 0 = Properties of the object have their normal functionality
     * when accessed as list (var_dump, foreach, etc.).
     * 1 = Array indices can be accessed as properties in read/write.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function setFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): void {}

    /**
     * Sort array by values
     * @link https://php.net/manual/en/arrayiterator.asort.php
     * @param int $flags [optional]
     * @return bool
     */
    #[TentativeType]
    public function asort(#[PhpStormStubsElementAvailable(from: '8.0')] int $flags = SORT_REGULAR): bool {}

    /**
     * Sort array by keys
     * @link https://php.net/manual/en/arrayiterator.ksort.php
     * @param int $flags [optional]
     * @return bool
     */
    #[TentativeType]
    public function ksort(#[PhpStormStubsElementAvailable(from: '8.0')] int $flags = SORT_REGULAR): bool {}

    /**
     * User defined sort
     * @link https://php.net/manual/en/arrayiterator.uasort.php
     * @param callable $callback <p>
     * The compare function used for the sort.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function uasort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback): bool {}

    /**
     * User defined sort
     * @link https://php.net/manual/en/arrayiterator.uksort.php
     * @param callable $callback <p>
     * The compare function used for the sort.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function uksort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback): bool {}

    /**
     * Sort an array naturally
     * @link https://php.net/manual/en/arrayiterator.natsort.php
     * @return bool
     */
    #[TentativeType]
    public function natsort(): bool {}

    /**
     * Sort an array naturally, case insensitive
     * @link https://php.net/manual/en/arrayiterator.natcasesort.php
     * @return bool
     */
    #[TentativeType]
    public function natcasesort(): bool {}

    /**
     * Unserialize
     * @link https://php.net/manual/en/arrayiterator.unserialize.php
     * @param string $data <p>
     * The serialized ArrayIterator object to be unserialized.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function unserialize(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): void {}

    /**
     * Serialize
     * @link https://php.net/manual/en/arrayiterator.serialize.php
     * @return string The serialized <b>ArrayIterator</b>.
     */
    #[TentativeType]
    public function serialize(): string {}

    /**
     * Rewind array back to the start
     * @link https://php.net/manual/en/arrayiterator.rewind.php
     * @return void
     */
    #[TentativeType]
    public function rewind(): void {}

    /**
     * Return current array entry
     * @link https://php.net/manual/en/arrayiterator.current.php
     * @return mixed The current array entry.
     */
    #[TentativeType]
    public function current(): mixed {}

    /**
     * Return current array key
     * @link https://php.net/manual/en/arrayiterator.key.php
     * @return string|int|null The key of the current element.
     */
    #[TentativeType]
    public function key(): string|int|null {}

    /**
     * Move to next entry
     * @link https://php.net/manual/en/arrayiterator.next.php
     * @return void
     */
    #[TentativeType]
    public function next(): void {}

    /**
     * Check whether array contains more entries
     * @link https://php.net/manual/en/arrayiterator.valid.php
     * @return bool
     */
    #[TentativeType]
    public function valid(): bool {}

    /**
     * Seek to position
     * @link https://php.net/manual/en/arrayiterator.seek.php
     * @param int $offset <p>
     * The position to seek to.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function seek(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset): void {}

    /**
     * @return array
     * @since 7.4
     */
    #[TentativeType]
    public function __debugInfo(): array {}

    /**
     * @return array
     * @since 7.4
     */
    #[TentativeType]
    public function __serialize(): array {}

    /**
     * @param array $data
     * @since 7.4
     */
    #[TentativeType]
    public function __unserialize(array $data): void {}
}

/**
 * This iterator allows to unset and modify values and keys while iterating over Arrays and Objects
 * in the same way as the ArrayIterator. Additionally it is possible to iterate
 * over the current iterator entry.
 * @link https://php.net/manual/en/class.recursivearrayiterator.php
 */
class RecursiveArrayIterator extends ArrayIterator implements RecursiveIterator
{
    public const CHILD_ARRAYS_ONLY = 4;

    /**
     * Returns whether current entry is an array or an object.
     * @link https://php.net/manual/en/recursivearrayiterator.haschildren.php
     * @return bool true if the current entry is an array or an object,
     * otherwise false is returned.
     */
    #[TentativeType]
    public function hasChildren(): bool {}

    /**
     * Returns an iterator for the current entry if it is an array or an object.
     * @link https://php.net/manual/en/recursivearrayiterator.getchildren.php
     * @return RecursiveArrayIterator|null An iterator for the current entry, if it is an array or object.
     */
    #[TentativeType]
    public function getChildren(): ?RecursiveArrayIterator {}
}
<?php

// Start of SPL v.0.2
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Pure;

/**
 * Return available SPL classes
 * @link https://php.net/manual/en/function.spl-classes.php
 * @return array
 */
#[Pure]
function spl_classes(): array {}

/**
 * Default implementation for __autoload()
 * @link https://php.net/manual/en/function.spl-autoload.php
 * @param string $class <p>
 * </p>
 * @param string|null $file_extensions [optional] <p>
 * By default it checks all include paths to
 * contain filenames built up by the lowercase class name appended by the
 * filename extensions .inc and .php.
 * </p>
 * @return void
 * @since 5.1.2
 */
function spl_autoload(string $class, ?string $file_extensions): void {}

/**
 * Register and return default file extensions for spl_autoload
 * @link https://php.net/manual/en/function.spl-autoload-extensions.php
 * @param string|null $file_extensions [optional] <p>
 * When calling without an argument, it simply returns the current list
 * of extensions each separated by comma. To modify the list of file
 * extensions, simply invoke the functions with the new list of file
 * extensions to use in a single string with each extensions separated
 * by comma.
 * </p>
 * @return string A comma delimited list of default file extensions for
 * spl_autoload.
 * @since 5.1.2
 */
function spl_autoload_extensions(?string $file_extensions): string {}

/**
 * Register given function as __autoload() implementation
 * @link https://php.net/manual/en/function.spl-autoload-register.php
 * @param callable|null $callback [optional] <p>
 * The autoload function being registered.
 * If no parameter is provided, then the default implementation of
 * spl_autoload will be registered.
 * </p>
 * @param bool $throw This parameter specifies whether spl_autoload_register() should throw exceptions when the
 * autoload_function cannot be registered. Ignored since since 8.0.
 * @param bool $prepend If true, spl_autoload_register() will prepend the autoloader on the autoload stack instead of
 * appending it.
 * @return bool true on success or false on failure.
 * @throws TypeError Since 8.0.
 * @since 5.1.2
 */
function spl_autoload_register(?callable $callback, bool $throw = true, bool $prepend = false): bool {}

/**
 * Unregister given function as __autoload() implementation
 * @link https://php.net/manual/en/function.spl-autoload-unregister.php
 * @param callable $callback <p>
 * The autoload function being unregistered.
 * </p>
 * @return bool true on success or false on failure.
 * @since 5.1.2
 */
function spl_autoload_unregister(callable $callback): bool {}

/**
 * Return all registered __autoload() functions
 * @link https://php.net/manual/en/function.spl-autoload-functions.php
 * @return array|false An array of all registered __autoload functions.
 * If the autoload stack is not activated then the return value is false.
 * If no function is registered the return value will be an empty array.
 * @since 5.1.2
 */
#[LanguageLevelTypeAware(["8.0" => "array"], default: "array|false")]
function spl_autoload_functions() {}

/**
 * Try all registered __autoload() functions to load the requested class
 * @link https://php.net/manual/en/function.spl-autoload-call.php
 * @param string $class <p>
 * The class name being searched.
 * </p>
 * @return void
 * @since 5.1.2
 */
function spl_autoload_call(string $class): void {}

/**
 * Return the parent classes of the given class
 * @link https://php.net/manual/en/function.class-parents.php
 * @param object|string $object_or_class <p>
 * An object (class instance) or a string (class name).
 * </p>
 * @param bool $autoload [optional] <p>
 * Whether to allow this function to load the class automatically through
 * the __autoload magic
 * method.
 * </p>
 * @return string[]|false An array on success, or false on error.
 */
#[Pure]
function class_parents($object_or_class, bool $autoload = true): array|false {}

/**
 * Return the interfaces which are implemented by the given class
 * @link https://php.net/manual/en/function.class-implements.php
 * @param object|string $object_or_class <p>
 * An object (class instance) or a string (class name).
 * </p>
 * @param bool $autoload [optional] <p>
 * Whether to allow this function to load the class automatically through
 * the __autoload magic
 * method.
 * </p>
 * @return string[]|false An array on success, or false on error.
 */
#[Pure]
function class_implements($object_or_class, bool $autoload = true): array|false {}

/**
 * Return hash id for given object
 * @link https://php.net/manual/en/function.spl-object-hash.php
 * @param object $object
 * @return string A string that is unique for each object and is always the same for
 * the same object.
 */
#[Pure]
function spl_object_hash(object $object): string {}

/**
 * Copy the iterator into an array
 * @link https://php.net/manual/en/function.iterator-to-array.php
 * @param Traversable $iterator <p>
 * The iterator being copied.
 * </p>
 * @param bool $preserve_keys [optional] <p>
 * Whether to use the iterator element keys as index.
 * </p>
 * @return array An array containing the elements of the iterator.
 */
function iterator_to_array(#[LanguageLevelTypeAware(['8.2' => 'Traversable|array'], default: 'Traversable')] $iterator, bool $preserve_keys = true): array {}

/**
 * Count the elements in an iterator
 * @link https://php.net/manual/en/function.iterator-count.php
 * @param Traversable $iterator <p>
 * The iterator being counted.
 * </p>
 * @return int The number of elements in iterator.
 */
#[Pure]
function iterator_count(#[LanguageLevelTypeAware(['8.2' => 'Traversable|array'], default: 'Traversable')] $iterator): int {}

/**
 * Call a function for every element in an iterator
 * @link https://php.net/manual/en/function.iterator-apply.php
 * @param Traversable $iterator <p>
 * The class to iterate over.
 * </p>
 * @param callable $callback <p>
 * The callback function to call on every element.
 * The function must return true in order to
 * continue iterating over the iterator.
 * </p>
 * @param array|null $args [optional] <p>
 * Arguments to pass to the callback function.
 * </p>
 * @return int the iteration count.
 */
function iterator_apply(Traversable $iterator, callable $callback, ?array $args): int {}

// End of SPL v.0.2

/**
 * Return the traits used by the given class
 * @param object|string $object_or_class An object (class instance) or a string (class name).
 * @param bool $autoload Whether to allow this function to load the class automatically through the __autoload() magic method.
 * @return string[]|false An array on success, or false on error.
 * @link https://php.net/manual/en/function.class-uses.php
 * @see class_parents()
 * @see get_declared_traits()
 * @since 5.4
 */
function class_uses($object_or_class, bool $autoload = true): array|false {}

/**
 * return the integer object handle for given object
 * @param object $object
 * @return int
 * @since 7.2
 */
function spl_object_id(object $object): int {}
<?php

// Start of SPL v.0.2
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;

/**
 * The SplFileInfo class offers a high-level object oriented interface to
 * information for an individual file.
 * @link https://php.net/manual/en/class.splfileinfo.php
 */
class SplFileInfo implements Stringable
{
    /**
     * Construct a new SplFileInfo object
     * @link https://php.net/manual/en/splfileinfo.construct.php
     * @param string $filename
     * @since 5.1.2
     */
    public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename) {}

    /**
     * Gets the path without filename
     * @link https://php.net/manual/en/splfileinfo.getpath.php
     * @return string the path to the file.
     * @since 5.1.2
     */
    #[TentativeType]
    public function getPath(): string {}

    /**
     * Gets the filename
     * @link https://php.net/manual/en/splfileinfo.getfilename.php
     * @return string The filename.
     * @since 5.1.2
     */
    #[TentativeType]
    public function getFilename(): string {}

    /**
     * Gets the file extension
     * @link https://php.net/manual/en/splfileinfo.getextension.php
     * @return string a string containing the file extension, or an
     * empty string if the file has no extension.
     * @since 5.3.6
     */
    #[TentativeType]
    public function getExtension(): string {}

    /**
     * Gets the base name of the file
     * @link https://php.net/manual/en/splfileinfo.getbasename.php
     * @param string $suffix [optional] <p>
     * Optional suffix to omit from the base name returned.
     * </p>
     * @return string the base name without path information.
     * @since 5.2.2
     */
    #[TentativeType]
    public function getBasename(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $suffix = null): string {}

    /**
     * Gets the path to the file
     * @link https://php.net/manual/en/splfileinfo.getpathname.php
     * @return string The path to the file.
     * @since 5.1.2
     */
    #[TentativeType]
    public function getPathname(): string {}

    /**
     * Gets file permissions
     * @link https://php.net/manual/en/splfileinfo.getperms.php
     * @return int|false The file permissions on success, or <b>FALSE</b> on failure.
     * @since 5.1.2
     */
    #[TentativeType]
    public function getPerms(): int|false {}

    /**
     * Gets the inode for the file
     * @link https://php.net/manual/en/splfileinfo.getinode.php
     * @return int|false The inode number for the filesystem object on success, or <b>FALSE</b> on failure.
     * @since 5.1.2
     */
    #[TentativeType]
    public function getInode(): int|false {}

    /**
     * Gets file size
     * @link https://php.net/manual/en/splfileinfo.getsize.php
     * @return int|false The filesize in bytes on success, or <b>FALSE</b> on failure.
     * @since 5.1.2
     */
    #[TentativeType]
    public function getSize(): int|false {}

    /**
     * Gets the owner of the file
     * @link https://php.net/manual/en/splfileinfo.getowner.php
     * @return int|false The owner id in numerical format on success, or <b>FALSE</b> on failure.
     * @since 5.1.2
     */
    #[TentativeType]
    public function getOwner(): int|false {}

    /**
     * Gets the file group
     * @link https://php.net/manual/en/splfileinfo.getgroup.php
     * @return int|false The group id in numerical format on success, or <b>FALSE</b> on failure.
     * @since 5.1.2
     */
    #[TentativeType]
    public function getGroup(): int|false {}

    /**
     * Gets last access time of the file
     * @link https://php.net/manual/en/splfileinfo.getatime.php
     * @return int|false The time the file was last accessed on success, or <b>FALSE</b> on failure.
     * @since 5.1.2
     */
    #[TentativeType]
    public function getATime(): int|false {}

    /**
     * Gets the last modified time
     * @link https://php.net/manual/en/splfileinfo.getmtime.php
     * @return int|false The last modified time for the file, in a Unix timestamp on success, or <b>FALSE</b> on failure.
     * @since 5.1.2
     */
    #[TentativeType]
    public function getMTime(): int|false {}

    /**
     * Gets the inode change time
     * @link https://php.net/manual/en/splfileinfo.getctime.php
     * @return int|false The last change time, in a Unix timestamp on success, or <b>FALSE</b> on failure.
     * @since 5.1.2
     */
    #[TentativeType]
    public function getCTime(): int|false {}

    /**
     * Gets file type
     * @link https://php.net/manual/en/splfileinfo.gettype.php
     * @return string|false A string representing the type of the entry. May be one of file, link, dir, block, fifo, char, socket, or unknown, or <b>FALSE</b> on failure.
     * May be one of file, link,
     * or dir
     * @since 5.1.2
     */
    #[TentativeType]
    public function getType(): string|false {}

    /**
     * Tells if the entry is writable
     * @link https://php.net/manual/en/splfileinfo.iswritable.php
     * @return bool true if writable, false otherwise;
     * @since 5.1.2
     */
    #[TentativeType]
    public function isWritable(): bool {}

    /**
     * Tells if file is readable
     * @link https://php.net/manual/en/splfileinfo.isreadable.php
     * @return bool true if readable, false otherwise.
     * @since 5.1.2
     */
    #[TentativeType]
    public function isReadable(): bool {}

    /**
     * Tells if the file is executable
     * @link https://php.net/manual/en/splfileinfo.isexecutable.php
     * @return bool true if executable, false otherwise.
     * @since 5.1.2
     */
    #[TentativeType]
    public function isExecutable(): bool {}

    /**
     * Tells if the object references a regular file
     * @link https://php.net/manual/en/splfileinfo.isfile.php
     * @return bool true if the file exists and is a regular file (not a link), false otherwise.
     * @since 5.1.2
     */
    #[TentativeType]
    public function isFile(): bool {}

    /**
     * Tells if the file is a directory
     * @link https://php.net/manual/en/splfileinfo.isdir.php
     * @return bool true if a directory, false otherwise.
     * @since 5.1.2
     */
    #[TentativeType]
    public function isDir(): bool {}

    /**
     * Tells if the file is a link
     * @link https://php.net/manual/en/splfileinfo.islink.php
     * @return bool true if the file is a link, false otherwise.
     * @since 5.1.2
     */
    #[TentativeType]
    public function isLink(): bool {}

    /**
     * Gets the target of a link
     * @link https://php.net/manual/en/splfileinfo.getlinktarget.php
     * @return string|false The target of the filesystem link on success, or <b>FALSE</b> on failure.
     * @since 5.2.2
     */
    #[TentativeType]
    public function getLinkTarget(): string|false {}

    /**
     * Gets absolute path to file
     * @link https://php.net/manual/en/splfileinfo.getrealpath.php
     * @return string|false the path to the file, or <b>FALSE</b> if the file does not exist.
     * @since 5.2.2
     */
    #[TentativeType]
    public function getRealPath(): string|false {}

    /**
     * Gets an SplFileInfo object for the file
     * @link https://php.net/manual/en/splfileinfo.getfileinfo.php
     * @param string $class [optional] <p>
     * Name of an <b>SplFileInfo</b> derived class to use.
     * </p>
     * @return SplFileInfo An <b>SplFileInfo</b> object created for the file.
     * @since 5.1.2
     */
    #[TentativeType]
    public function getFileInfo(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $class = null): SplFileInfo {}

    /**
     * Gets an SplFileInfo object for the path
     * @link https://php.net/manual/en/splfileinfo.getpathinfo.php
     * @param string $class [optional] <p>
     * Name of an <b>SplFileInfo</b> derived class to use.
     * </p>
     * @return SplFileInfo|null A <b>SplFileInfo</b> object for the parent path of the file on success, or <b>NULL</b> on failure.
     * @since 5.1.2
     */
    #[TentativeType]
    public function getPathInfo(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $class = null): ?SplFileInfo {}

    /**
     * Gets an SplFileObject object for the file
     * @link https://php.net/manual/en/splfileinfo.openfile.php
     * @param string $mode [optional] <p>
     * The mode for opening the file. See the <b>fopen</b>
     * documentation for descriptions of possible modes. The default
     * is read only.
     * </p>
     * @param bool $useIncludePath [optional] <p>
     * </p>
     * @param resource $context [optional] <p>
     * </p>
     * @return SplFileObject The opened file as an <b>SplFileObject</b> object.
     * @since 5.1.2
     */
    #[TentativeType]
    public function openFile(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $mode = 'r',
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $useIncludePath = false,
        $context = null
    ): SplFileObject {}

    /**
     * Sets the class name used with <b>SplFileInfo::openFile</b>
     * @link https://php.net/manual/en/splfileinfo.setfileclass.php
     * @param string $class [optional] <p>
     * The class name to use when openFile() is called.
     * </p>
     * @return void
     * @since 5.1.2
     */
    #[TentativeType]
    public function setFileClass(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $class = SplFileObject::class): void {}

    /**
     * Sets the class used with getFileInfo and getPathInfo
     * @link https://php.net/manual/en/splfileinfo.setinfoclass.php
     * @param string $class [optional] <p>
     * The class name to use.
     * </p>
     * @return void
     * @since 5.1.2
     */
    #[TentativeType]
    public function setInfoClass(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $class = SplFileInfo::class): void {}

    /**
     * Returns the path to the file as a string
     * @link https://php.net/manual/en/splfileinfo.tostring.php
     * @return string the path to the file.
     * @since 5.1.2
     */
    #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')]
    public function __toString() {}

    #[TentativeType]
    final public function _bad_state_ex(): void {}

    public function __wakeup() {}

    /**
     * @return array
     * @since 7.4
     */
    #[TentativeType]
    public function __debugInfo(): array {}
}

/**
 * The DirectoryIterator class provides a simple interface for viewing
 * the contents of filesystem directories.
 * @link https://php.net/manual/en/class.directoryiterator.php
 */
class DirectoryIterator extends SplFileInfo implements SeekableIterator
{
    /**
     * Constructs a new directory iterator from a path
     * @link https://php.net/manual/en/directoryiterator.construct.php
     * @param string $directory
     * @throws UnexpectedValueException if the path cannot be opened.
     * @throws RuntimeException if the path is an empty string.
     */
    public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $directory) {}

    /**
     * Determine if current DirectoryIterator item is '.' or '..'
     * @link https://php.net/manual/en/directoryiterator.isdot.php
     * @return bool true if the entry is . or ..,
     * otherwise false
     */
    #[TentativeType]
    public function isDot(): bool {}

    /**
     * Rewind the DirectoryIterator back to the start
     * @link https://php.net/manual/en/directoryiterator.rewind.php
     * @return void
     */
    #[TentativeType]
    public function rewind(): void {}

    /**
     * Check whether current DirectoryIterator position is a valid file
     * @link https://php.net/manual/en/directoryiterator.valid.php
     * @return bool true if the position is valid, otherwise false
     */
    #[TentativeType]
    public function valid(): bool {}

    /**
     * Return the key for the current DirectoryIterator item
     * @link https://php.net/manual/en/directoryiterator.key.php
     * @return string The key for the current <b>DirectoryIterator</b> item.
     */
    #[TentativeType]
    public function key(): mixed {}

    /**
     * Return the current DirectoryIterator item.
     * @link https://php.net/manual/en/directoryiterator.current.php
     * @return DirectoryIterator The current <b>DirectoryIterator</b> item.
     */
    #[TentativeType]
    public function current(): mixed {}

    /**
     * Move forward to next DirectoryIterator item
     * @link https://php.net/manual/en/directoryiterator.next.php
     * @return void
     */
    #[TentativeType]
    public function next(): void {}

    /**
     * Seek to a DirectoryIterator item
     * @link https://php.net/manual/en/directoryiterator.seek.php
     * @param int $offset <p>
     * The zero-based numeric position to seek to.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function seek(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset): void {}
}

/**
 * The Filesystem iterator
 * @link https://php.net/manual/en/class.filesystemiterator.php
 */
class FilesystemIterator extends DirectoryIterator
{
    public const CURRENT_MODE_MASK = 240;
    public const CURRENT_AS_PATHNAME = 32;
    public const CURRENT_AS_FILEINFO = 0;
    public const CURRENT_AS_SELF = 16;
    public const KEY_MODE_MASK = 3840;
    public const KEY_AS_PATHNAME = 0;
    public const FOLLOW_SYMLINKS = 16384;
    public const KEY_AS_FILENAME = 256;
    public const NEW_CURRENT_AND_KEY = 256;
    public const SKIP_DOTS = 4096;
    public const UNIX_PATHS = 8192;
    public const OTHER_MODE_MASK = 28672;

    /**
     * Constructs a new filesystem iterator
     * @link https://php.net/manual/en/filesystemiterator.construct.php
     * @param string $directory
     * @param int $flags [optional]
     * @throws UnexpectedValueException if the path cannot be found.
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $directory,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FilesystemIterator::KEY_AS_PATHNAME|FilesystemIterator::CURRENT_AS_FILEINFO|FilesystemIterator::SKIP_DOTS
    ) {}

    /**
     * Rewinds back to the beginning
     * @link https://php.net/manual/en/filesystemiterator.rewind.php
     * @return void
     */
    #[TentativeType]
    public function rewind(): void {}

    /**
     * Move to the next file
     * @link https://php.net/manual/en/filesystemiterator.next.php
     * @return void
     */
    public function next() {}

    /**
     * Retrieve the key for the current file
     * @link https://php.net/manual/en/filesystemiterator.key.php
     * @return string the pathname or filename depending on the set flags.
     * See the FilesystemIterator constants.
     */
    #[TentativeType]
    public function key(): string {}

    /**
     * The current file
     * @link https://php.net/manual/en/filesystemiterator.current.php
     * @return string|SplFileInfo|self The filename, file information, or $this depending on the set flags.
     * See the FilesystemIterator constants.
     */
    #[TentativeType]
    public function current(): SplFileInfo|FilesystemIterator|string {}

    /**
     * Get the handling flags
     * @link https://php.net/manual/en/filesystemiterator.getflags.php
     * @return int The integer value of the set flags.
     */
    #[TentativeType]
    public function getFlags(): int {}

    /**
     * Sets handling flags
     * @link https://php.net/manual/en/filesystemiterator.setflags.php
     * @param int $flags <p>
     * The handling flags to set.
     * See the FilesystemIterator constants.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function setFlags(
        #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $flags = null,
        #[PhpStormStubsElementAvailable(from: '8.0')] int $flags
    ): void {}
}

/**
 * The <b>RecursiveDirectoryIterator</b> provides
 * an interface for iterating recursively over filesystem directories.
 * @link https://php.net/manual/en/class.recursivedirectoryiterator.php
 */
class RecursiveDirectoryIterator extends FilesystemIterator implements RecursiveIterator
{
    /**
     * Constructs a RecursiveDirectoryIterator
     * @link https://php.net/manual/en/recursivedirectoryiterator.construct.php
     * @param string $directory
     * @param int $flags [optional]
     * @throws UnexpectedValueException if the path cannot be found or is not a directory.
     * @since 5.1.2
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $directory,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FilesystemIterator::KEY_AS_PATHNAME|FilesystemIterator::CURRENT_AS_FILEINFO
    ) {}

    /**
     * Returns whether current entry is a directory and not '.' or '..'
     * @link https://php.net/manual/en/recursivedirectoryiterator.haschildren.php
     * @param bool $allowLinks [optional] <p>
     * </p>
     * @return bool whether the current entry is a directory, but not '.' or '..'
     */
    #[TentativeType]
    public function hasChildren(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $allowLinks = false): bool {}

    /**
     * Returns an iterator for the current entry if it is a directory
     * @link https://php.net/manual/en/recursivedirectoryiterator.getchildren.php
     * @return RecursiveDirectoryIterator An iterator for the current entry, if it is a directory.
     */
    #[TentativeType]
    public function getChildren(): RecursiveDirectoryIterator {}

    /**
     * Get sub path
     * @link https://php.net/manual/en/recursivedirectoryiterator.getsubpath.php
     * @return string The sub path (sub directory).
     */
    #[TentativeType]
    public function getSubPath(): string {}

    /**
     * Get sub path and name
     * @link https://php.net/manual/en/recursivedirectoryiterator.getsubpathname.php
     * @return string The sub path (sub directory) and filename.
     */
    #[TentativeType]
    public function getSubPathname(): string {}

    /**
     * Rewinds back to the beginning
     * @link https://php.net/manual/en/filesystemiterator.rewind.php
     * @return void
     */
    public function rewind() {}

    /**
     * Move to the next file
     * @link https://php.net/manual/en/filesystemiterator.next.php
     * @return void
     */
    public function next() {}

    /**
     * Retrieve the key for the current file
     * @link https://php.net/manual/en/filesystemiterator.key.php
     * @return string the pathname or filename depending on the set flags.
     * See the FilesystemIterator constants.
     */
    public function key() {}

    /**
     * The current file
     * @link https://php.net/manual/en/filesystemiterator.current.php
     * @return string|SplFileInfo|self The filename, file information, or $this depending on the set flags.
     * See the FilesystemIterator constants.
     */
    public function current() {}
}

/**
 * Iterates through a file system in a similar fashion to
 * <b>glob</b>.
 * @link https://php.net/manual/en/class.globiterator.php
 */
class GlobIterator extends FilesystemIterator implements Countable
{
    /**
     * Construct a directory using glob
     * @link https://php.net/manual/en/globiterator.construct.php
     * @param $pattern
     * @param int $flags [optional]
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FilesystemIterator::KEY_AS_PATHNAME|FilesystemIterator::CURRENT_AS_FILEINFO
    ) {}

    /**
     * Get the number of directories and files
     * @link https://php.net/manual/en/globiterator.count.php
     * @return int<0,max> The number of returned directories and files, as an
     * integer.
     */
    #[TentativeType]
    public function count(): int {}
}

/**
 * The SplFileObject class offers an object oriented interface for a file.
 * @link https://php.net/manual/en/class.splfileobject.php
 */
class SplFileObject extends SplFileInfo implements RecursiveIterator, SeekableIterator
{
    /**
     * Drop newlines at the end of a line.
     */
    public const DROP_NEW_LINE = 1;

    /**
     * Read on rewind/next.
     */
    public const READ_AHEAD = 2;

    /**
     * Skip empty lines in the file. This requires the {@see READ_AHEAD} flag to work as expected.
     */
    public const SKIP_EMPTY = 4;

    /**
     * Read lines as CSV rows.
     */
    public const READ_CSV = 8;

    /**
     * Construct a new file object.
     *
     * @link  https://php.net/manual/en/splfileobject.construct.php
     *
     * @param string $filename The file to open
     * @param string $mode [optional] The mode in which to open the file. See {@see fopen} for a list of allowed modes.
     * @param bool $useIncludePath [optional] Whether to search in the include_path for filename
     * @param resource $context [optional] A valid context resource created with {@see stream_context_create}
     *
     * @throws RuntimeException When the filename cannot be opened
     * @throws LogicException When the filename is a directory
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $mode = 'r',
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $useIncludePath = false,
        $context = null
    ) {}

    /**
     * Rewind the file to the first line
     * @link https://php.net/manual/en/splfileobject.rewind.php
     * @return void
     */
    #[TentativeType]
    public function rewind(): void {}

    /**
     * Reached end of file
     * @link https://php.net/manual/en/splfileobject.eof.php
     * @return bool true if file is at EOF, false otherwise.
     */
    #[TentativeType]
    public function eof(): bool {}

    /**
     * Not at EOF
     * @link https://php.net/manual/en/splfileobject.valid.php
     * @return bool true if not reached EOF, false otherwise.
     */
    #[TentativeType]
    public function valid(): bool {}

    /**
     * Gets line from file
     * @link https://php.net/manual/en/splfileobject.fgets.php
     * @return string a string containing the next line from the file.
     */
    #[TentativeType]
    public function fgets(): string {}

    /**
     * Read from file
     * @link https://php.net/manual/en/splfileobject.fread.php
     * @param int $length <p>
     * The number of bytes to read.
     * </p>
     * @return string|false returns the string read from the file or FALSE on failure.
     * @since 5.5.11
     */
    #[TentativeType]
    public function fread(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $length): string|false {}

    /**
     * Gets line from file and parse as CSV fields
     * @link https://php.net/manual/en/splfileobject.fgetcsv.php
     * @param string $separator [optional] <p>
     * The field delimiter (one character only). Defaults as a comma or the value set using <b>SplFileObject::setCsvControl</b>.
     * </p>
     * @param string $enclosure [optional] <p>
     * The field enclosure character (one character only). Defaults as a double quotation mark or the value set using <b>SplFileObject::setCsvControl</b>.
     * </p>
     * @param string $escape [optional] <p>
     * The escape character (one character only). Defaults as a backslash (\) or the value set using <b>SplFileObject::setCsvControl</b>.
     * </p>
     * @return array|false|null an indexed array containing the fields read, or false on error.
     * </p>
     * <p>
     * A blank line in a CSV file will be returned as an array
     * comprising a single null field unless using <b>SplFileObject::SKIP_EMPTY | SplFileObject::DROP_NEW_LINE</b>,
     * in which case empty lines are skipped.
     */
    #[TentativeType]
    #[LanguageLevelTypeAware(['8.1' => 'array|false'], default: 'array|false|null')]
    public function fgetcsv(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $separator = ",",
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $enclosure = "\"",
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $escape = "\\"
    ) {}

    /**
     * Write a field array as a CSV line
     * @link https://php.net/manual/en/splfileobject.fputcsv.php
     * @param array $fields An array of values
     * @param string $separator [optional] <p>
     * The field delimiter (one character only). Defaults as a comma or the value set using <b>SplFileObject::setCsvControl</b>.
     * </p>
     * @param string $enclosure [optional] <p>
     * The field enclosure character (one character only). Defaults as a double quotation mark or the value set using <b>SplFileObject::setCsvControl</b>.
     * </p>
     * @param string $escape The optional escape parameter sets the escape character (one character only).
     * @return int|false Returns the length of the written string or FALSE on failure.
     * @since 5.4
     */
    #[TentativeType]
    public function fputcsv(
        array $fields,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $separator = ',',
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $enclosure = '"',
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $escape = "\\",
        #[PhpStormStubsElementAvailable('8.1')] string $eol = PHP_EOL
    ): int|false {}

    /**
     * Set the delimiter and enclosure character for CSV
     * @link https://php.net/manual/en/splfileobject.setcsvcontrol.php
     * @param string $separator [optional] <p>
     * The field delimiter (one character only).
     * </p>
     * @param string $enclosure [optional] <p>
     * The field enclosure character (one character only).
     * </p>
     * @param string $escape [optional] <p>
     * The field escape character (one character only).
     * </p>
     * @return void
     */
    #[TentativeType]
    public function setCsvControl(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $separator = ",",
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $enclosure = "\"",
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $escape = "\\"
    ): void {}

    /**
     * Get the delimiter and enclosure character for CSV
     * @link https://php.net/manual/en/splfileobject.getcsvcontrol.php
     * @return array an indexed array containing the delimiter and enclosure character.
     */
    #[TentativeType]
    public function getCsvControl(): array {}

    /**
     * Portable file locking
     * @link https://php.net/manual/en/splfileobject.flock.php
     * @param int $operation <p>
     * <i>operation</i> is one of the following:
     * <b>LOCK_SH</b> to acquire a shared lock (reader).
     * </p>
     * @param int &$wouldBlock [optional] <p>
     * Set to 1 if the lock would block (EWOULDBLOCK errno condition).
     * </p>
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function flock(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $operation, &$wouldBlock = null): bool {}

    /**
     * Flushes the output to the file
     * @link https://php.net/manual/en/splfileobject.fflush.php
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function fflush(): bool {}

    /**
     * Return current file position
     * @link https://php.net/manual/en/splfileobject.ftell.php
     * @return int|false the position of the file pointer as an integer, or false on error.
     */
    #[TentativeType]
    public function ftell(): int|false {}

    /**
     * Seek to a position
     * @link https://php.net/manual/en/splfileobject.fseek.php
     * @param int $offset <p>
     * The offset. A negative value can be used to move backwards through the file which
     * is useful when SEEK_END is used as the <i>whence</i> value.
     * </p>
     * @param int $whence [optional] <p>
     * <i>whence</i> values are:
     * <b>SEEK_SET</b> - Set position equal to <i>offset</i> bytes.
     * <b>SEEK_CUR</b> - Set position to current location plus <i>offset</i>.
     * <b>SEEK_END</b> - Set position to end-of-file plus <i>offset</i>.
     * </p>
     * <p>
     * If <i>whence</i> is not specified, it is assumed to be <b>SEEK_SET</b>.
     * </p>
     * @return int 0 if the seek was successful, -1 otherwise. Note that seeking
     * past EOF is not considered an error.
     */
    #[TentativeType]
    public function fseek(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $whence = SEEK_SET
    ): int {}

    /**
     * Gets character from file
     * @link https://php.net/manual/en/splfileobject.fgetc.php
     * @return string|false a string containing a single character read from the file or false on EOF.
     */
    #[TentativeType]
    public function fgetc(): string|false {}

    /**
     * Output all remaining data on a file pointer
     * @link https://php.net/manual/en/splfileobject.fpassthru.php
     * @return int the number of characters read from <i>handle</i>
     * and passed through to the output.
     */
    #[TentativeType]
    public function fpassthru(): int {}

    /**
     * Gets line from file and strip HTML tags
     * @link https://php.net/manual/en/splfileobject.fgetss.php
     * @param string $allowable_tags [optional] <p>
     * You can use the optional third parameter to specify tags which should
     * not be stripped.
     * </p>
     * @return string|false a string containing the next line of the file with HTML and PHP
     * code stripped, or false on error.
     * @removed 8.0
     */
    #[Deprecated(since: '7.3')]
    public function fgetss($allowable_tags = null) {}

    /**
     * Parses input from file according to a format
     * @link https://php.net/manual/en/splfileobject.fscanf.php
     * @param string $format <p>
     * The specified format as described in the <b>sprintf</b> documentation.
     * </p>
     * @param mixed &...$vars [optional] <p>
     * The optional assigned values.
     * </p>
     * @return array|int If only one parameter is passed to this method, the values parsed will be
     * returned as an array. Otherwise, if optional parameters are passed, the
     * function will return the number of assigned values. The optional
     * parameters must be passed by reference.
     */
    #[TentativeType]
    public function fscanf(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] &...$vars
    ): array|int|null {}

    /**
     * Write to file
     * @link https://php.net/manual/en/splfileobject.fwrite.php
     * @param string $data <p>
     * The string to be written to the file.
     * </p>
     * @param int $length [optional] <p>
     * If the <i>length</i> argument is given, writing will
     * stop after <i>length</i> bytes have been written or
     * the end of <i>string</i> is reached, whichever comes
     * first.
     * </p>
     * @return int|false the number of bytes written, or 0 (false since 7.4) on error.
     */
    #[LanguageLevelTypeAware(['7.4' => 'int|false'], default: 'int')]
    #[TentativeType]
    public function fwrite(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $length = null
    ): int|false {}

    /**
     * Gets information about the file
     * @link https://php.net/manual/en/splfileobject.fstat.php
     * @return array an array with the statistics of the file; the format of the array
     * is described in detail on the <b>stat</b> manual page.
     */
    #[TentativeType]
    public function fstat(): array {}

    /**
     * Truncates the file to a given length
     * @link https://php.net/manual/en/splfileobject.ftruncate.php
     * @param int $size <p>
     * The size to truncate to.
     * </p>
     * <p>
     * If <i>size</i> is larger than the file it is extended with null bytes.
     * </p>
     * <p>
     * If <i>size</i> is smaller than the file, the extra data will be lost.
     * </p>
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function ftruncate(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $size): bool {}

    /**
     * Retrieve current line of file
     * @link https://php.net/manual/en/splfileobject.current.php
     * @return string|array|false Retrieves the current line of the file. If the <b>SplFileObject::READ_CSV</b> flag is set, this method returns an array containing the current line parsed as CSV data.
     */
    #[TentativeType]
    public function current(): string|array|false {}

    /**
     * Get line number
     * @link https://php.net/manual/en/splfileobject.key.php
     * @return int the current line number.
     */
    #[TentativeType]
    public function key(): int {}

    /**
     * Read next line
     * @link https://php.net/manual/en/splfileobject.next.php
     * @return void
     */
    #[TentativeType]
    public function next(): void {}

    /**
     * Sets flags for the SplFileObject
     * @link https://php.net/manual/en/splfileobject.setflags.php
     * @param int $flags <p>
     * Bit mask of the flags to set. See
     * SplFileObject constants
     * for the available flags.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function setFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): void {}

    /**
     * Gets flags for the SplFileObject
     * @link https://php.net/manual/en/splfileobject.getflags.php
     * @return int an integer representing the flags.
     */
    #[TentativeType]
    public function getFlags(): int {}

    /**
     * Set maximum line length
     * @link https://php.net/manual/en/splfileobject.setmaxlinelen.php
     * @param int $maxLength <p>
     * The maximum length of a line.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function setMaxLineLen(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $maxLength): void {}

    /**
     * Get maximum line length
     * @link https://php.net/manual/en/splfileobject.getmaxlinelen.php
     * @return int<0, max> the maximum line length if one has been set with
     * <b>SplFileObject::setMaxLineLen</b>, default is 0.
     */
    #[TentativeType]
    public function getMaxLineLen(): int {}

    /**
     * SplFileObject does not have children
     * @link https://php.net/manual/en/splfileobject.haschildren.php
     * @return bool false
     * @since 5.1.2
     */
    #[TentativeType]
    #[LanguageLevelTypeAware(['8.2' => 'false'], default: 'bool')]
    public function hasChildren() {}

    /**
     * No purpose
     * @link https://php.net/manual/en/splfileobject.getchildren.php
     * @return null|RecursiveIterator An SplFileObject does not have children so this method returns NULL.
     */
    #[TentativeType]
    #[LanguageLevelTypeAware(['8.2' => 'null'], default: 'null|RecursiveIterator')]
    public function getChildren() {}

    /**
     * Seek to specified line
     * @link https://php.net/manual/en/splfileobject.seek.php
     * @param int $line <p>
     * The zero-based line number to seek to.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function seek(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $line): void {}

    /**
     * Alias of <b>SplFileObject::fgets</b>
     * @link https://php.net/manual/en/splfileobject.getcurrentline.php
     * @return string Returns a string containing the next line from the file.
     * @since 5.1.2
     */
    #[TentativeType]
    public function getCurrentLine(): string {}

    /**
     * Alias of <b>SplFileObject::current</b>
     * @link https://php.net/manual/en/splfileobject.tostring.php
     */
    #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')]
    public function __toString() {}
}

/**
 * The SplTempFileObject class offers an object oriented interface for a temporary file.
 * @link https://php.net/manual/en/class.spltempfileobject.php
 */
class SplTempFileObject extends SplFileObject
{
    /**
     * Construct a new temporary file object
     * @link https://php.net/manual/en/spltempfileobject.construct.php
     * @param int $maxMemory [optional]
     * @throws RuntimeException if an error occurs.
     * @since 5.1.2
     */
    public function __construct(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $maxMemory = 2097152) {}
}

/**
 * @template TValue
 * The SplDoublyLinkedList class provides the main functionalities of a doubly linked list.
 * @link https://php.net/manual/en/class.spldoublylinkedlist.php
 * @template-implements Iterator<int, TValue>
 * @template-implements ArrayAccess<int, TValue>
 */
class SplDoublyLinkedList implements Iterator, Countable, ArrayAccess, Serializable
{
    public const IT_MODE_LIFO = 2;
    public const IT_MODE_FIFO = 0;
    public const IT_MODE_DELETE = 1;
    public const IT_MODE_KEEP = 0;

    /**
     * Add/insert a new value at the specified index
     * @param mixed $index The index where the new value is to be inserted.
     * @param mixed $value The new value for the index.
     * @return void
     * @link https://php.net/spldoublylinkedlist.add
     * @since 5.5
     */
    #[TentativeType]
    public function add(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value
    ): void {}

    /**
     * Pops a node from the end of the doubly linked list
     * @link https://php.net/manual/en/spldoublylinkedlist.pop.php
     * @return mixed The value of the popped node.
     */
    #[TentativeType]
    public function pop(): mixed {}

    /**
     * Shifts a node from the beginning of the doubly linked list
     * @link https://php.net/manual/en/spldoublylinkedlist.shift.php
     * @return mixed The value of the shifted node.
     */
    #[TentativeType]
    public function shift(): mixed {}

    /**
     * Pushes an element at the end of the doubly linked list
     * @link https://php.net/manual/en/spldoublylinkedlist.push.php
     * @param mixed $value <p>
     * The value to push.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function push(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {}

    /**
     * Prepends the doubly linked list with an element
     * @link https://php.net/manual/en/spldoublylinkedlist.unshift.php
     * @param mixed $value <p>
     * The value to unshift.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function unshift(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {}

    /**
     * Peeks at the node from the end of the doubly linked list
     * @link https://php.net/manual/en/spldoublylinkedlist.top.php
     * @return mixed The value of the last node.
     */
    #[TentativeType]
    public function top(): mixed {}

    /**
     * Peeks at the node from the beginning of the doubly linked list
     * @link https://php.net/manual/en/spldoublylinkedlist.bottom.php
     * @return mixed The value of the first node.
     */
    #[TentativeType]
    public function bottom(): mixed {}

    /**
     * Counts the number of elements in the doubly linked list.
     * @link https://php.net/manual/en/spldoublylinkedlist.count.php
     * @return int the number of elements in the doubly linked list.
     */
    #[TentativeType]
    public function count(): int {}

    /**
     * Checks whether the doubly linked list is empty.
     * @link https://php.net/manual/en/spldoublylinkedlist.isempty.php
     * @return bool whether the doubly linked list is empty.
     */
    #[TentativeType]
    public function isEmpty(): bool {}

    /**
     * Sets the mode of iteration
     * @link https://php.net/manual/en/spldoublylinkedlist.setiteratormode.php
     * @param int $mode <p>
     * There are two orthogonal sets of modes that can be set:
     * </p>
     * The direction of the iteration (either one or the other):
     * <b>SplDoublyLinkedList::IT_MODE_LIFO</b> (Stack style)
     * @return int
     */
    #[TentativeType]
    public function setIteratorMode(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode): int {}

    /**
     * Returns the mode of iteration
     * @link https://php.net/manual/en/spldoublylinkedlist.getiteratormode.php
     * @return int the different modes and flags that affect the iteration.
     */
    #[TentativeType]
    public function getIteratorMode(): int {}

    /**
     * Returns whether the requested $index exists
     * @link https://php.net/manual/en/spldoublylinkedlist.offsetexists.php
     * @param mixed $index <p>
     * The index being checked.
     * </p>
     * @return bool true if the requested <i>index</i> exists, otherwise false
     */
    #[TentativeType]
    public function offsetExists($index): bool {}

    /**
     * Returns the value at the specified $index
     * @link https://php.net/manual/en/spldoublylinkedlist.offsetget.php
     * @param mixed $index <p>
     * The index with the value.
     * </p>
     * @return mixed The value at the specified <i>index</i>.
     */
    #[TentativeType]
    public function offsetGet($index): mixed {}

    /**
     * Sets the value at the specified $index to $newval
     * @link https://php.net/manual/en/spldoublylinkedlist.offsetset.php
     * @param mixed $index <p>
     * The index being set.
     * </p>
     * @param mixed $value <p>
     * The new value for the <i>index</i>.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function offsetSet($index, #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {}

    /**
     * Unsets the value at the specified $index
     * @link https://php.net/manual/en/spldoublylinkedlist.offsetunset.php
     * @param mixed $index <p>
     * The index being unset.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function offsetUnset($index): void {}

    /**
     * Rewind iterator back to the start
     * @link https://php.net/manual/en/spldoublylinkedlist.rewind.php
     * @return void
     */
    #[TentativeType]
    public function rewind(): void {}

    /**
     * Return current array entry
     * @link https://php.net/manual/en/spldoublylinkedlist.current.php
     * @return mixed The current node value.
     */
    #[TentativeType]
    public function current(): mixed {}

    /**
     * Return current node index
     * @link https://php.net/manual/en/spldoublylinkedlist.key.php
     * @return string|float|int|bool|null The current node index.
     */
    #[TentativeType]
    public function key(): int {}

    /**
     * Move to next entry
     * @link https://php.net/manual/en/spldoublylinkedlist.next.php
     * @return void
     */
    #[TentativeType]
    public function next(): void {}

    /**
     * Move to previous entry
     * @link https://php.net/manual/en/spldoublylinkedlist.prev.php
     * @return void
     */
    #[TentativeType]
    public function prev(): void {}

    /**
     * Check whether the doubly linked list contains more nodes
     * @link https://php.net/manual/en/spldoublylinkedlist.valid.php
     * @return bool true if the doubly linked list contains any more nodes, false otherwise.
     */
    #[TentativeType]
    public function valid(): bool {}

    /**
     * Unserializes the storage
     * @link https://php.net/manual/en/spldoublylinkedlist.serialize.php
     * @param string $data The serialized string.
     * @return void
     * @since 5.4
     */
    #[TentativeType]
    public function unserialize(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): void {}

    /**
     * Serializes the storage
     * @link https://php.net/manual/en/spldoublylinkedlist.unserialize.php
     * @return string The serialized string.
     * @since 5.4
     */
    #[TentativeType]
    public function serialize(): string {}

    /**
     * @return array
     * @since 7.4
     */
    #[TentativeType]
    public function __debugInfo(): array {}

    /**
     * @return array
     * @since 7.4
     */
    #[TentativeType]
    public function __serialize(): array {}

    /**
     * @param array $data
     * @since 7.4
     */
    #[TentativeType]
    public function __unserialize(array $data): void {}
}

/**
 * @template TValue
 * The SplQueue class provides the main functionalities of a queue implemented using a doubly linked list.
 * @link https://php.net/manual/en/class.splqueue.php
 */
class SplQueue extends SplDoublyLinkedList
{
    /**
     * Adds an element to the queue.
     * @link https://php.net/manual/en/splqueue.enqueue.php
     * @param TValue $value <p>
     * The value to enqueue.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function enqueue(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {}

    /**
     * Dequeues a node from the queue
     * @link https://php.net/manual/en/splqueue.dequeue.php
     * @return TValue The value of the dequeued node.
     */
    #[TentativeType]
    public function dequeue(): mixed {}

    /**
     * Sets the mode of iteration
     * @link https://php.net/manual/en/spldoublylinkedlist.setiteratormode.php
     * @param int $mode <p>
     * There are two orthogonal sets of modes that can be set:
     * </p>
     * The direction of the iteration (either one or the other):
     * <b>SplDoublyLinkedList::IT_MODE_LIFO</b> (Stack style)
     * @return void
     */
    public function setIteratorMode($mode) {}
}

/**
 * @template TValue
 * The SplStack class provides the main functionalities of a stack implemented using a doubly linked list.
 * @link https://php.net/manual/en/class.splstack.php
 * @template-extends SplDoublyLinkedList<TValue>
 */
class SplStack extends SplDoublyLinkedList
{
    /**
     * Sets the mode of iteration
     * @link https://php.net/manual/en/spldoublylinkedlist.setiteratormode.php
     * @param int $mode <p>
     * There are two orthogonal sets of modes that can be set:
     * </p>
     * The direction of the iteration (either one or the other):
     * <b>SplDoublyLinkedList::IT_MODE_LIFO</b> (Stack style)
     * @return void
     */
    public function setIteratorMode($mode) {}
}

/**
 * @template TValue
 * The SplHeap class provides the main functionalities of an Heap.
 * @link https://php.net/manual/en/class.splheap.php
 * @template-implements Iterator<int, TValue>
 */
abstract class SplHeap implements Iterator, Countable
{
    /**
     * Extracts a node from top of the heap and sift up.
     * @link https://php.net/manual/en/splheap.extract.php
     * @return mixed The value of the extracted node.
     */
    #[TentativeType]
    public function extract(): mixed {}

    /**
     * Inserts an element in the heap by sifting it up.
     * @link https://php.net/manual/en/splheap.insert.php
     * @param TValue $value <p>
     * The value to insert.
     * </p>
     * @return bool
     */
    #[TentativeType]
    public function insert(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): bool {}

    /**
     * Peeks at the node from the top of the heap
     * @link https://php.net/manual/en/splheap.top.php
     * @return TValue The value of the node on the top.
     */
    #[TentativeType]
    public function top(): mixed {}

    /**
     * Counts the number of elements in the heap.
     * @link https://php.net/manual/en/splheap.count.php
     * @return int the number of elements in the heap.
     */
    #[TentativeType]
    public function count(): int {}

    /**
     * Checks whether the heap is empty.
     * @link https://php.net/manual/en/splheap.isempty.php
     * @return bool whether the heap is empty.
     */
    #[TentativeType]
    public function isEmpty(): bool {}

    /**
     * Rewind iterator back to the start (no-op)
     * @link https://php.net/manual/en/splheap.rewind.php
     * @return void
     */
    #[TentativeType]
    public function rewind(): void {}

    /**
     * Return current node pointed by the iterator
     * @link https://php.net/manual/en/splheap.current.php
     * @return TValue The current node value.
     */
    #[TentativeType]
    public function current(): mixed {}

    /**
     * Return current node index
     * @link https://php.net/manual/en/splheap.key.php
     * @return int The current node index.
     */
    #[TentativeType]
    public function key(): int {}

    /**
     * Move to the next node
     * @link https://php.net/manual/en/splheap.next.php
     * @return void
     */
    #[TentativeType]
    public function next(): void {}

    /**
     * Check whether the heap contains more nodes
     * @link https://php.net/manual/en/splheap.valid.php
     * @return bool true if the heap contains any more nodes, false otherwise.
     */
    #[TentativeType]
    public function valid(): bool {}

    /**
     * Recover from the corrupted state and allow further actions on the heap.
     * @link https://php.net/manual/en/splheap.recoverfromcorruption.php
     * @return bool
     */
    #[TentativeType]
    public function recoverFromCorruption(): bool {}

    /**
     * Compare elements in order to place them correctly in the heap while sifting up.
     * @link https://php.net/manual/en/splheap.compare.php
     * @param mixed $value1 <p>
     * The value of the first node being compared.
     * </p>
     * @param mixed $value2 <p>
     * The value of the second node being compared.
     * </p>
     * @return int Result of the comparison, positive integer if <i>value1</i> is greater than <i>value2</i>, 0 if they are equal, negative integer otherwise.
     * </p>
     * <p>
     * Having multiple elements with the same value in a Heap is not recommended. They will end up in an arbitrary relative position.
     */
    abstract protected function compare($value1, $value2);

    /**
     * @return bool
     */
    #[TentativeType]
    public function isCorrupted(): bool {}

    /**
     * @return array
     * @since 7.4
     */
    #[TentativeType]
    public function __debugInfo(): array {}
}

/**
 * @template TValue
 * The SplMinHeap class provides the main functionalities of a heap, keeping the minimum on the top.
 * @link https://php.net/manual/en/class.splminheap.php
 * @template-extends SplHeap<TValue>
 */
class SplMinHeap extends SplHeap
{
    /**
     * Compare elements in order to place them correctly in the heap while sifting up.
     * @link https://php.net/manual/en/splminheap.compare.php
     * @param TValue $value1 <p>
     * The value of the first node being compared.
     * </p>
     * @param TValue $value2 <p>
     * The value of the second node being compared.
     * </p>
     * @return int Result of the comparison, positive integer if <i>value1</i> is lower than <i>value2</i>, 0 if they are equal, negative integer otherwise.
     * </p>
     * <p>
     * Having multiple elements with the same value in a Heap is not recommended. They will end up in an arbitrary relative position.
     */
    #[TentativeType]
    protected function compare(
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value1,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value2
    ): int {}

    /**
     * Extracts a node from top of the heap and sift up.
     * @link https://php.net/manual/en/splheap.extract.php
     * @return TValue The value of the extracted node.
     */
    public function extract() {}

    /**
     * Inserts an element in the heap by sifting it up.
     * @link https://php.net/manual/en/splheap.insert.php
     * @param TValue $value <p>
     * The value to insert.
     * </p>
     * @return void
     */
    public function insert($value) {}

    /**
     * Peeks at the node from the top of the heap
     * @link https://php.net/manual/en/splheap.top.php
     * @return TValue The value of the node on the top.
     */
    public function top() {}

    /**
     * Counts the number of elements in the heap.
     * @link https://php.net/manual/en/splheap.count.php
     * @return int the number of elements in the heap.
     */
    public function count() {}

    /**
     * Checks whether the heap is empty.
     * @link https://php.net/manual/en/splheap.isempty.php
     * @return bool whether the heap is empty.
     */
    public function isEmpty() {}

    /**
     * Rewind iterator back to the start (no-op)
     * @link https://php.net/manual/en/splheap.rewind.php
     * @return void
     */
    public function rewind() {}

    /**
     * Return current node pointed by the iterator
     * @link https://php.net/manual/en/splheap.current.php
     * @return TValue The current node value.
     */
    public function current() {}

    /**
     * Return current node index
     * @link https://php.net/manual/en/splheap.key.php
     * @return int The current node index.
     */
    public function key() {}

    /**
     * Move to the next node
     * @link https://php.net/manual/en/splheap.next.php
     * @return void
     */
    public function next() {}

    /**
     * Check whether the heap contains more nodes
     * @link https://php.net/manual/en/splheap.valid.php
     * @return bool true if the heap contains any more nodes, false otherwise.
     */
    public function valid() {}

    /**
     * Recover from the corrupted state and allow further actions on the heap.
     * @link https://php.net/manual/en/splheap.recoverfromcorruption.php
     * @return void
     */
    public function recoverFromCorruption() {}
}

/**
 * @template TValue
 * The SplMaxHeap class provides the main functionalities of a heap, keeping the maximum on the top.
 * @link https://php.net/manual/en/class.splmaxheap.php
 * @template-extends SplHeap<TValue>
 */
class SplMaxHeap extends SplHeap
{
    /**
     * Compare elements in order to place them correctly in the heap while sifting up.
     * @link https://php.net/manual/en/splmaxheap.compare.php
     * @param TValue $value1 <p>
     * The value of the first node being compared.
     * </p>
     * @param TValue $value2 <p>
     * The value of the second node being compared.
     * </p>
     * @return int Result of the comparison, positive integer if <i>value1</i> is greater than <i>value2</i>, 0 if they are equal, negative integer otherwise.
     * </p>
     * <p>
     * Having multiple elements with the same value in a Heap is not recommended. They will end up in an arbitrary relative position.
     */
    #[TentativeType]
    protected function compare(
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value1,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value2
    ): int {}
}

/**
 * @template TPriority
 * @template TValue
 * The SplPriorityQueue class provides the main functionalities of an
 * prioritized queue, implemented using a heap.
 * @link https://php.net/manual/en/class.splpriorityqueue.php
 * @template-implements Iterator<int, TValue>
 */
class SplPriorityQueue implements Iterator, Countable
{
    public const EXTR_BOTH = 3;
    public const EXTR_PRIORITY = 2;
    public const EXTR_DATA = 1;

    /**
     * Compare priorities in order to place elements correctly in the heap while sifting up.
     * @link https://php.net/manual/en/splpriorityqueue.compare.php
     * @param TPriority $priority1 <p>
     * The priority of the first node being compared.
     * </p>
     * @param TPriority $priority2 <p>
     * The priority of the second node being compared.
     * </p>
     * @return int Result of the comparison, positive integer if <i>priority1</i> is greater than <i>priority2</i>, 0 if they are equal, negative integer otherwise.
     * </p>
     * <p>
     * Multiple elements with the same priority will get dequeued in no particular order.
     */
    #[TentativeType]
    public function compare(
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $priority1,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $priority2
    ): int {}

    /**
     * Inserts an element in the queue by sifting it up.
     * @link https://php.net/manual/en/splpriorityqueue.insert.php
     * @param TValue $value <p>
     * The value to insert.
     * </p>
     * @param TPriority $priority <p>
     * The associated priority.
     * </p>
     * @return true
     */
    public function insert(
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $priority
    ) {}

    /**
     * Sets the mode of extraction
     * @link https://php.net/manual/en/splpriorityqueue.setextractflags.php
     * @param int $flags <p>
     * Defines what is extracted by <b>SplPriorityQueue::current</b>,
     * <b>SplPriorityQueue::top</b> and
     * <b>SplPriorityQueue::extract</b>.
     * </p>
     * <b>SplPriorityQueue::EXTR_DATA</b> (0x00000001): Extract the data
     * @return int
     */
    #[TentativeType]
    public function setExtractFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): int {}

    /**
     * Peeks at the node from the top of the queue
     * @link https://php.net/manual/en/splpriorityqueue.top.php
     * @return TValue The value or priority (or both) of the top node, depending on the extract flag.
     */
    #[TentativeType]
    public function top(): mixed {}

    /**
     * Extracts a node from top of the heap and sift up.
     * @link https://php.net/manual/en/splpriorityqueue.extract.php
     * @return TValue The value or priority (or both) of the extracted node, depending on the extract flag.
     */
    #[TentativeType]
    public function extract(): mixed {}

    /**
     * Counts the number of elements in the queue.
     * @link https://php.net/manual/en/splpriorityqueue.count.php
     * @return int the number of elements in the queue.
     */
    #[TentativeType]
    public function count(): int {}

    /**
     * Checks whether the queue is empty.
     * @link https://php.net/manual/en/splpriorityqueue.isempty.php
     * @return bool whether the queue is empty.
     */
    #[TentativeType]
    public function isEmpty(): bool {}

    /**
     * Rewind iterator back to the start (no-op)
     * @link https://php.net/manual/en/splpriorityqueue.rewind.php
     * @return void
     */
    #[TentativeType]
    public function rewind(): void {}

    /**
     * Return current node pointed by the iterator
     * @link https://php.net/manual/en/splpriorityqueue.current.php
     * @return TValue The value or priority (or both) of the current node, depending on the extract flag.
     */
    #[TentativeType]
    public function current(): mixed {}

    /**
     * Return current node index
     * @link https://php.net/manual/en/splpriorityqueue.key.php
     * @return int The current node index.
     */
    #[TentativeType]
    public function key(): int {}

    /**
     * Move to the next node
     * @link https://php.net/manual/en/splpriorityqueue.next.php
     * @return void
     */
    #[TentativeType]
    public function next(): void {}

    /**
     * Check whether the queue contains more nodes
     * @link https://php.net/manual/en/splpriorityqueue.valid.php
     * @return bool true if the queue contains any more nodes, false otherwise.
     */
    #[TentativeType]
    public function valid(): bool {}

    /**
     * Recover from the corrupted state and allow further actions on the queue.
     * @link https://php.net/manual/en/splpriorityqueue.recoverfromcorruption.php
     * @return void
     */
    public function recoverFromCorruption() {}

    /**
     * @return bool
     */
    #[TentativeType]
    public function isCorrupted(): bool {}

    /**
     * @return int
     */
    #[TentativeType]
    public function getExtractFlags(): int {}

    /**
     * @return array
     * @since 7.4
     */
    #[TentativeType]
    public function __debugInfo(): array {}
}

/**
 * @template TValue
 * The SplFixedArray class provides the main functionalities of array. The
 * main differences between a SplFixedArray and a normal PHP array is that
 * the SplFixedArray is of fixed length and allows only integers within
 * the range as indexes. The advantage is that it allows a faster array
 * implementation.
 * @link https://php.net/manual/en/class.splfixedarray.php
 * @template-implements Iterator<int, TValue>
 * @template-implements ArrayAccess<int, TValue>
 * @template-implements IteratorAggregate<int, TValue>
 */
class SplFixedArray implements Iterator, ArrayAccess, Countable, IteratorAggregate, JsonSerializable
{
    /**
     * Constructs a new fixed array
     * @link https://php.net/manual/en/splfixedarray.construct.php
     * @param int $size [optional]
     */
    public function __construct(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $size = 0) {}

    /**
     * Returns the size of the array
     * @link https://php.net/manual/en/splfixedarray.count.php
     * @return int the size of the array.
     */
    #[TentativeType]
    public function count(): int {}

    /**
     * Returns a PHP array from the fixed array
     * @link https://php.net/manual/en/splfixedarray.toarray.php
     * @return TValue[] a PHP array, similar to the fixed array.
     */
    #[TentativeType]
    public function toArray(): array {}

    /**
     * Import a PHP array in a <b>SplFixedArray</b> instance
     * @link https://php.net/manual/en/splfixedarray.fromarray.php
     * @param array $array <p>
     * The array to import.
     * </p>
     * @param bool $preserveKeys [optional] <p>
     * Try to save the numeric indexes used in the original array.
     * </p>
     * @return SplFixedArray an instance of <b>SplFixedArray</b>
     * containing the array content.
     */
    #[TentativeType]
    public static function fromArray(
        #[LanguageLevelTypeAware(['8.0' => 'array'], default: '')] $array,
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $preserveKeys = true
    ): SplFixedArray {}

    /**
     * Gets the size of the array
     * @link https://php.net/manual/en/splfixedarray.getsize.php
     * @return int the size of the array, as an integer.
     */
    #[TentativeType]
    public function getSize(): int {}

    /**
     * Change the size of an array
     * @link https://php.net/manual/en/splfixedarray.setsize.php
     * @param int $size <p>
     * The new array size.
     * </p>
     * @return bool
     */
    public function setSize(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $size) {}

    /**
     * Returns whether the requested index exists
     * @link https://php.net/manual/en/splfixedarray.offsetexists.php
     * @param int $index <p>
     * The index being checked.
     * </p>
     * @return bool true if the requested <i>index</i> exists, otherwise false
     */
    #[TentativeType]
    public function offsetExists($index): bool {}

    /**
     * Returns the value at the specified index
     * @link https://php.net/manual/en/splfixedarray.offsetget.php
     * @param int $index <p>
     * The index with the value.
     * </p>
     * @return TValue The value at the specified <i>index</i>.
     */
    #[TentativeType]
    public function offsetGet($index): mixed {}

    /**
     * Sets a new value at a specified index
     * @link https://php.net/manual/en/splfixedarray.offsetset.php
     * @param int $index <p>
     * The index being set.
     * </p>
     * @param TValue $value <p>
     * The new value for the <i>index</i>.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function offsetSet($index, #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {}

    /**
     * Unsets the value at the specified $index
     * @link https://php.net/manual/en/splfixedarray.offsetunset.php
     * @param int $index <p>
     * The index being unset.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function offsetUnset($index): void {}

    /**
     * Rewind iterator back to the start
     * @link https://php.net/manual/en/splfixedarray.rewind.php
     * @return void
     */
    public function rewind() {}

    /**
     * Return current array entry
     * @link https://php.net/manual/en/splfixedarray.current.php
     * @return TValue The current element value.
     */
    public function current() {}

    /**
     * Return current array index
     * @link https://php.net/manual/en/splfixedarray.key.php
     * @return int The current array index.
     */
    public function key() {}

    /**
     * Move to next entry
     * @link https://php.net/manual/en/splfixedarray.next.php
     * @return void
     */
    public function next() {}

    /**
     * Check whether the array contains more elements
     * @link https://php.net/manual/en/splfixedarray.valid.php
     * @return bool true if the array contains any more elements, false otherwise.
     */
    #[TentativeType]
    public function valid(): bool {}

    #[TentativeType]
    public function __wakeup(): void {}

    #[PhpStormStubsElementAvailable(from: '8.2')]
    public function __serialize(): array {}

    /**
     * @param array $data
     */
    #[PhpStormStubsElementAvailable(from: '8.2')]
    public function __unserialize(array $data): void {}

    /**
     * @return Traversable<int, TValue>
     */
    public function getIterator(): Iterator {}

    public function jsonSerialize(): array {}
}

/**
 * The <b>SplObserver</b> interface is used alongside
 * <b>SplSubject</b> to implement the Observer Design Pattern.
 * @link https://php.net/manual/en/class.splobserver.php
 */
interface SplObserver
{
    /**
     * Receive update from subject
     * @link https://php.net/manual/en/splobserver.update.php
     * @param SplSubject $subject <p>
     * The <b>SplSubject</b> notifying the observer of an update.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function update(SplSubject $subject): void;
}

/**
 * The <b>SplSubject</b> interface is used alongside
 * <b>SplObserver</b> to implement the Observer Design Pattern.
 * @link https://php.net/manual/en/class.splsubject.php
 */
interface SplSubject
{
    /**
     * Attach an SplObserver
     * @link https://php.net/manual/en/splsubject.attach.php
     * @param SplObserver $observer <p>
     * The <b>SplObserver</b> to attach.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function attach(SplObserver $observer): void;

    /**
     * Detach an observer
     * @link https://php.net/manual/en/splsubject.detach.php
     * @param SplObserver $observer <p>
     * The <b>SplObserver</b> to detach.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function detach(SplObserver $observer): void;

    /**
     * Notify an observer
     * @link https://php.net/manual/en/splsubject.notify.php
     * @return void
     */
    #[TentativeType]
    public function notify(): void;
}

/**
 * @template TObject of object
 * @template TValue
 * The SplObjectStorage class provides a map from objects to data or, by
 * ignoring data, an object set. This dual purpose can be useful in many
 * cases involving the need to uniquely identify objects.
 * @link https://php.net/manual/en/class.splobjectstorage.php
 * @template-implements Iterator<int, TObject>
 * @template-implements ArrayAccess<TObject, TValue>
 */
class SplObjectStorage implements Countable, Iterator, Serializable, ArrayAccess
{
    /**
     * Adds an object in the storage
     * @link https://php.net/manual/en/splobjectstorage.attach.php
     * @param TObject $object <p>
     * The object to add.
     * </p>
     * @param TValue $info [optional] <p>
     * The data to associate with the object.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function attach(
        #[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $info = null
    ): void {}

    /**
     * Removes an object from the storage
     * @link https://php.net/manual/en/splobjectstorage.detach.php
     * @param TObject $object <p>
     * The object to remove.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function detach(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object): void {}

    /**
     * Checks if the storage contains a specific object
     * @link https://php.net/manual/en/splobjectstorage.contains.php
     * @param TObject $object <p>
     * The object to look for.
     * </p>
     * @return bool true if the object is in the storage, false otherwise.
     */
    #[TentativeType]
    public function contains(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object): bool {}

    /**
     * Adds all objects from another storage
     * @link https://php.net/manual/en/splobjectstorage.addall.php
     * @param SplObjectStorage<TObject, TValue> $storage <p>
     * The storage you want to import.
     * </p>
     * @return int
     */
    #[TentativeType]
    public function addAll(#[LanguageLevelTypeAware(['8.0' => 'SplObjectStorage'], default: '')] $storage): int {}

    /**
     * Removes objects contained in another storage from the current storage
     * @link https://php.net/manual/en/splobjectstorage.removeall.php
     * @param SplObjectStorage<TObject, TValue> $storage <p>
     * The storage containing the elements to remove.
     * </p>
     * @return int
     */
    #[TentativeType]
    public function removeAll(#[LanguageLevelTypeAware(['8.0' => 'SplObjectStorage'], default: '')] $storage): int {}

    /**
     * Removes all objects except for those contained in another storage from the current storage
     * @link https://php.net/manual/en/splobjectstorage.removeallexcept.php
     * @param SplObjectStorage<TObject, TValue> $storage <p>
     * The storage containing the elements to retain in the current storage.
     * </p>
     * @return int
     * @since 5.3.6
     */
    #[TentativeType]
    public function removeAllExcept(#[LanguageLevelTypeAware(['8.0' => 'SplObjectStorage'], default: '')] $storage): int {}

    /**
     * Returns the data associated with the current iterator entry
     * @link https://php.net/manual/en/splobjectstorage.getinfo.php
     * @return TValue The data associated with the current iterator position.
     */
    #[TentativeType]
    public function getInfo(): mixed {}

    /**
     * Sets the data associated with the current iterator entry
     * @link https://php.net/manual/en/splobjectstorage.setinfo.php
     * @param TValue $info <p>
     * The data to associate with the current iterator entry.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function setInfo(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $info): void {}

    /**
     * Returns the number of objects in the storage
     * @link https://php.net/manual/en/splobjectstorage.count.php
     * @param int $mode [optional]
     * @return int The number of objects in the storage.
     */
    #[TentativeType]
    public function count(#[PhpStormStubsElementAvailable(from: '8.0')] int $mode = COUNT_NORMAL): int {}

    /**
     * Rewind the iterator to the first storage element
     * @link https://php.net/manual/en/splobjectstorage.rewind.php
     * @return void
     */
    #[TentativeType]
    public function rewind(): void {}

    /**
     * Returns if the current iterator entry is valid
     * @link https://php.net/manual/en/splobjectstorage.valid.php
     * @return bool true if the iterator entry is valid, false otherwise.
     */
    #[TentativeType]
    public function valid(): bool {}

    /**
     * Returns the index at which the iterator currently is
     * @link https://php.net/manual/en/splobjectstorage.key.php
     * @return int The index corresponding to the position of the iterator.
     */
    #[TentativeType]
    public function key(): int {}

    /**
     * Returns the current storage entry
     * @link https://php.net/manual/en/splobjectstorage.current.php
     * @return TObject The object at the current iterator position.
     */
    #[TentativeType]
    public function current(): object {}

    /**
     * Move to the next entry
     * @link https://php.net/manual/en/splobjectstorage.next.php
     * @return void
     */
    #[TentativeType]
    public function next(): void {}

    /**
     * Unserializes a storage from its string representation
     * @link https://php.net/manual/en/splobjectstorage.unserialize.php
     * @param string $data <p>
     * The serialized representation of a storage.
     * </p>
     * @return void
     * @since 5.2.2
     */
    #[TentativeType]
    public function unserialize(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): void {}

    /**
     * Serializes the storage
     * @link https://php.net/manual/en/splobjectstorage.serialize.php
     * @return string A string representing the storage.
     * @since 5.2.2
     */
    #[TentativeType]
    public function serialize(): string {}

    /**
     * Checks whether an object exists in the storage
     * @link https://php.net/manual/en/splobjectstorage.offsetexists.php
     * @param TObject $object <p>
     * The object to look for.
     * </p>
     * @return bool true if the object exists in the storage,
     * and false otherwise.
     */
    #[TentativeType]
    public function offsetExists($object): bool {}

    /**
     * Associates data to an object in the storage
     * @link https://php.net/manual/en/splobjectstorage.offsetset.php
     * @param TObject $object <p>
     * The object to associate data with.
     * </p>
     * @param TValue $info [optional] <p>
     * The data to associate with the object.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function offsetSet(
        #[LanguageLevelTypeAware(['8.1' => 'mixed'], default: '')] $object,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $info = null
    ): void {}

    /**
     * Removes an object from the storage
     * @link https://php.net/manual/en/splobjectstorage.offsetunset.php
     * @param TObject $object <p>
     * The object to remove.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function offsetUnset($object): void {}

    /**
     * Returns the data associated with an <type>object</type>
     * @link https://php.net/manual/en/splobjectstorage.offsetget.php
     * @param TObject $object <p>
     * The object to look for.
     * </p>
     * @return TValue The data previously associated with the object in the storage.
     */
    #[TentativeType]
    public function offsetGet($object): mixed {}

    /**
     * Calculate a unique identifier for the contained objects
     * @link https://php.net/manual/en/splobjectstorage.gethash.php
     * @param TObject $object <p>
     * object whose identifier is to be calculated.
     * </p>
     * @return string A string with the calculated identifier.
     * @since 5.4
     */
    #[TentativeType]
    public function getHash(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object): string {}

    /**
     * @return array
     * @since 7.4
     */
    #[TentativeType]
    public function __serialize(): array {}

    /**
     * @param array $data
     * @since 7.4
     */
    #[TentativeType]
    public function __unserialize(array $data): void {}

    /**
     * @return array
     * @since 7.4
     */
    #[TentativeType]
    public function __debugInfo(): array {}
}

/**
 * An Iterator that sequentially iterates over all attached iterators
 * @link https://php.net/manual/en/class.multipleiterator.php
 */
class MultipleIterator implements Iterator
{
    public const MIT_NEED_ANY = 0;
    public const MIT_NEED_ALL = 1;
    public const MIT_KEYS_NUMERIC = 0;
    public const MIT_KEYS_ASSOC = 2;

    /**
     * Constructs a new MultipleIterator
     * @link https://php.net/manual/en/multipleiterator.construct.php
     * @param int $flags Defaults to MultipleIterator::MIT_NEED_ALL | MultipleIterator::MIT_KEYS_NUMERIC
     */
    public function __construct(
        #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $flags,
        #[PhpStormStubsElementAvailable(from: '8.0')] int $flags = MultipleIterator::MIT_NEED_ALL|MultipleIterator::MIT_KEYS_NUMERIC
    ) {}

    /**
     * Gets the flag information
     * @link https://php.net/manual/en/multipleiterator.getflags.php
     * @return int Information about the flags, as an integer.
     */
    #[TentativeType]
    public function getFlags(): int {}

    /**
     * Sets flags
     * @link https://php.net/manual/en/multipleiterator.setflags.php
     * @param int $flags <p>
     * The flags to set, according to the
     * Flag Constants
     * </p>
     * @return void
     */
    #[TentativeType]
    public function setFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): void {}

    /**
     * Attaches iterator information
     * @link https://php.net/manual/en/multipleiterator.attachiterator.php
     * @param Iterator $iterator <p>
     * The new iterator to attach.
     * </p>
     * @param int|string|null $info [optional] <p>
     * The associative information for the Iterator, which must be an
     * integer, a string, or null.
     * </p>
     * @return void Description...
     */
    #[TentativeType]
    public function attachIterator(Iterator $iterator, #[LanguageLevelTypeAware(['8.0' => 'int|string|null'], default: '')] $info = null): void {}

    /**
     * Detaches an iterator
     * @link https://php.net/manual/en/multipleiterator.detachiterator.php
     * @param Iterator $iterator <p>
     * The iterator to detach.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function detachIterator(Iterator $iterator): void {}

    /**
     * Checks if an iterator is attached
     * @link https://php.net/manual/en/multipleiterator.containsiterator.php
     * @param Iterator $iterator <p>
     * The iterator to check.
     * </p>
     * @return bool true on success or false on failure.
     */
    #[TentativeType]
    public function containsIterator(Iterator $iterator): bool {}

    /**
     * Gets the number of attached iterator instances
     * @link https://php.net/manual/en/multipleiterator.countiterators.php
     * @return int The number of attached iterator instances (as an integer).
     */
    #[TentativeType]
    public function countIterators(): int {}

    /**
     * Rewinds all attached iterator instances
     * @link https://php.net/manual/en/multipleiterator.rewind.php
     * @return void
     */
    #[TentativeType]
    public function rewind(): void {}

    /**
     * Checks the validity of sub iterators
     * @link https://php.net/manual/en/multipleiterator.valid.php
     * @return bool true if one or all sub iterators are valid depending on flags,
     * otherwise false
     */
    #[TentativeType]
    public function valid(): bool {}

    /**
     * Gets the registered iterator instances
     * @link https://php.net/manual/en/multipleiterator.key.php
     * @return array An array of all registered iterator instances,
     * or false if no sub iterator is attached.
     */
    #[TentativeType]
    public function key(): array {}

    /**
     * Gets the registered iterator instances
     * @link https://php.net/manual/en/multipleiterator.current.php
     * @return array An array containing the current values of each attached iterator,
     * or false if no iterators are attached.
     * @throws RuntimeException if mode MIT_NEED_ALL is set and at least one attached iterator is not valid.
     * @throws InvalidArgumentException if a key is NULL and MIT_KEYS_ASSOC is set.
     */
    #[TentativeType]
    public function current(): array {}

    /**
     * Moves all attached iterator instances forward
     * @link https://php.net/manual/en/multipleiterator.next.php
     * @return void
     */
    #[TentativeType]
    public function next(): void {}

    /**
     * @return array
     * @since 7.4
     */
    #[TentativeType]
    public function __debugInfo(): array {}
}
<?php

// Start of Zend Cache v.

/**
 * Stores a serializable variable into Shared Memory Cache
 *
 * @param string $key the data's key. Possibly prefixed with namespace
 * @param mixed $value can be any PHP object that can be serialized.
 * @param int $ttl [optional] time to live in seconds. ZendCache keeps the objects in the cache as long as the TTL is no expired, once expired it will be removed from the cache
 *
 * @return bool FALSE when stored failed, TRUE otherwise
 */
function zend_shm_cache_store($key, $value, $ttl = 0) {}

/**
 * Retrieves data stored in the Shared Memory Cache.
 * If the key is not found, returns null.
 *
 * @param string $key the data's key. Possibly prefixed with namespace
 *
 * @return mixed|null NULL when no data matching the key is found, else it returns the stored data
 */
function zend_shm_cache_fetch($key) {}

/**
 * Delete a key from the Shared Memory cache
 *
 * @param string $key the data's key. Possibly prefixed with namespace
 *
 * @return mixed|null when no data matching the key is found, else it returns the stored data
 */
function zend_shm_cache_delete($key) {}

/**
 * Clear the entire Shared Memory cache or just the provided namespace.
 *
 * @param string $namespace [optional] Namespace to clear. If blank or is not passed, it will clear entire cache.
 *
 * @return bool TRUE on success, FALSE otherwise
 */
function zend_shm_cache_clear($namespace = '') {}

/**
 * Provide the user information about the memory data cache
 *
 * @return array|false FALSE when on failure
 */
function zend_shm_cache_info() {}

/**
 * Stores a serializable variable into Disk Cache
 *
 * @param string $key the data's key. Possibly prefixed with namespace
 * @param mixed $value can be any PHP object that can be serialized
 * @param int $ttl [optional] time to live in seconds. ZendCache keeps the objects in the cache as long as the TTL is no expired, once expired it will be removed from the cache
 *
 * @return bool FALSE when stored failed, TRUE otherwise
 */
function zend_disk_cache_store($key, $value, $ttl = 0) {}

/**
 * Retrieves data stored in the Shared Memory Cache
 *
 * @param string $key the data's key. Possibly prefixed with namespace
 *
 * @return mixed|null NULL when no data matching the key is found, else it returns the stored data
 */
function zend_disk_cache_fetch($key) {}

/**
 * Delete a key from the cache
 *
 * @param string $key the data's key. Possibly prefixed with namespace
 *
 * @return mixed|null when no data matching the key is found, else it returns the stored data
 */
function zend_disk_cache_delete($key) {}

/**
 * Clear the entire Disk Memory cache or just the provided namespace.
 *
 * @param string $namespace [optional] Namespace to clear. If blank or is not passed, it will clear entire cache.
 *
 * @return bool TRUE on success, FALSE otherwise
 */
function zend_disk_cache_clear($namespace = '') {}

/**
 * Provide the user information about the memory data cache
 *
 * @return array|false FALSE when on failure
 */
function zend_disk_cache_info() {}

// End of Zend Cache v.
<?php
/**
 * Stubs for stomp
 * https://pecl.php.net/package/stomp
 */
class Stomp
{
    /**
     * Connect to server
     *
     * @param string $broker The broker URI
     * @param string $username The username
     * @param string $password The password
     * @param array  $headers additional headers (example: receipt).
     */
    public function __construct($broker = null, $username = null, $password = null, array $headers = []) {}

    /**
     * Get the current stomp session ID
     *
     * @return string|false stomp session ID if it exists, or FALSE otherwise
     */
    public function getSessionId() {}

    /**
     * Close stomp connection
     *
     * @return bool TRUE on success, or FALSE on failure
     */
    public function disconnect() {}

    /**
     * Sends a message to a destination in the messaging system
     *
     * @param string            $destination indicates where to send the message
     * @param string|StompFrame $msg message to be sent
     * @param array             $headers additional headers (example: receipt).
     * @return bool TRUE on success, or FALSE on failure
     */
    public function send($destination, $msg, array $headers = []) {}

    /**
     * Register to listen to a given destination
     *
     * @param string $destination indicates which destination to subscribe to
     * @param array  $headers additional headers (example: receipt).
     * @return bool TRUE on success, or FALSE on failure
     */
    public function subscribe($destination, array $headers = []) {}

    /**
     * Remove an existing subscription
     *
     * @param string $destination indicates which subscription to remove
     * @param array  $headers additional headers (example: receipt).
     * @return bool TRUE on success, or FALSE on failure
     */
    public function unsubscribe($destination, array $headers = []) {}

    /**
     * Indicate whether or not there is a frame ready to read
     *
     * @return bool TRUE if there is one, or FALSE otherwise
     */
    public function hasFrame() {}

    /**
     * Read the next frame
     *
     * @param string $className name of the class to instantiate.
     * @return object|false on success, or FALSE on failure
     */
    public function readFrame($className = 'stompFrame') {}

    /**
     * Start a transaction
     *
     * @param string $transaction_id transaction id
     * @return bool TRUE on success, or FALSE on failure
     */
    public function begin($transaction_id) {}

    /**
     * Commit a transaction in progress
     *
     * @param string $transaction_id transaction id
     * @return bool TRUE on success, or FALSE on failure
     */
    public function commit($transaction_id) {}

    /**
     * Roll back a transaction in progress
     *
     * @param string $transaction_id transaction id
     * @return bool TRUE on success, or FALSE on failure
     */
    public function abort($transaction_id) {}

    /**
     * Acknowledge consumption of a message from a subscription using client acknowledgment
     *
     * @param string|StompFrame $msg message/messageId to be acknowledged
     * @param array             $headers additional headers (example: receipt).
     * @return bool TRUE on success, or FALSE on failure
     */
    public function ack($msg, array $headers = []) {}

    /**
     * Get the last stomp error
     *
     * @return string|false Error message, or FALSE if no error
     */
    public function error() {}

    /**
     * Set timeout
     *
     * @param int $seconds the seconds part of the timeout to be set
     * @param int $microseconds the microseconds part of the timeout to be set
     * @return void
     */
    public function setTimeout($seconds, $microseconds = 0) {}

    /**
     * Get timeout
     *
     * @return array Array with timeout informations
     */
    public function getTimeout() {}
}

class StompFrame
{
    /**
     * Frame Command
     * @var string
     */
    public $command;

    /**
     * Frame headers
     * @var array
     */
    public $headers;

    /**
     * Frame body
     * @var string
     */
    public $body;
}

class StompException extends Exception
{
    /**
     * Get the stomp server error details
     *
     * @return string
     */
    public function getDetails() {}
}

/**
 * Get the current version of the stomp extension
 *
 * @return string version
 */
function stomp_version() {}

/**
 * Opens a connection
 *
 * @param string $broker broker URI
 * @param string $username The username
 * @param string $password The password
 * @param array  $headers additional headers (example: receipt).
 * @return resource|false stomp connection identifier on success, or FALSE on failure
 */
function stomp_connect($broker = null, $username = null, $password = null, array $headers = []) {}

/**
 * Gets the current stomp session ID
 *
 * @param resource $link identifier returned by stomp_connect
 * @return string|false stomp session ID if it exists, or FALSE otherwise
 */
function stomp_get_session_id($link) {}

/**
 * Closes stomp connection
 *
 * @param resource $link identifier returned by stomp_connect
 * @return bool TRUE on success, or FALSE on failure
 */
function stomp_close($link) {}

/**
 * Sends a message to a destination in the messaging system
 *
 * @param resource         $link identifier returned by stomp_connect
 * @param string            $destination indicates where to send the message
 * @param string|StompFrame $msg message to be sent
 * @param array             $headers additional headers (example: receipt).
 * @return bool TRUE on success, or FALSE on failure
 */
function stomp_send($link, $destination, $msg, array $headers = []) {}

/**
 * Registers to listen to a given destination
 *
 * @param resource $link identifier returned by stomp_connect
 * @param string    $destination indicates which destination to subscribe to
 * @param array     $headers additional headers (example: receipt).
 * @return bool TRUE on success, or FALSE on failure
 */
function stomp_subscribe($link, $destination, array $headers = []) {}

/**
 * Removes an existing subscription
 *
 * @param resource $link identifier returned by stomp_connect
 * @param string    $destination indicates which subscription to remove
 * @param array     $headers additional headers (example: receipt).
 * @return bool TRUE on success, or FALSE on failure
 */
function stomp_unsubscribe($link, $destination, array $headers = []) {}

/**
 * Indicates whether or not there is a frame ready to read
 *
 * @param resource $link identifier returned by stomp_connect
 * @return bool TRUE if there is one, or FALSE otherwise
 */
function stomp_has_frame($link) {}

/**
 * Reads the next frame
 *
 * @param resource $link identifier returned by stomp_connect
 * @return array|false on success, or FALSE on failure
 */
function stomp_read_frame($link) {}

/**
 * Starts a transaction
 *
 * @param resource $link identifier returned by stomp_connect
 * @param string    $transaction_id transaction id
 * @return bool TRUE on success, or FALSE on failure
 */
function stomp_begin($link, $transaction_id) {}

/**
 * Commits a transaction in progress
 *
 * @param resource $link identifier returned by stomp_connect
 * @param string    $transaction_id transaction id
 * @return bool TRUE on success, or FALSE on failure
 */
function stomp_commit($link, $transaction_id) {}

/**
 * Rolls back a transaction in progress
 *
 * @param resource $link identifier returned by stomp_connect
 * @param string    $transaction_id transaction id
 * @return bool TRUE on success, or FALSE on failure
 */
function stomp_abort($link, $transaction_id) {}

/**
 * Acknowledge consumption of a message from a subscription using client acknowledgment
 *
 * @param resource         $link identifier returned by stomp_connect
 * @param string|StompFrame $msg message/messageId to be acknowledged
 * @param array             $headers additional headers (example: receipt).
 * @return bool TRUE on success, or FALSE on failure
 */
function stomp_ack($link, $msg, array $headers = []) {}

/**
 * Gets the last stomp error
 *
 * @param resource $link identifier returned by stomp_connect
 * @return string|false Error message, or FALSE if no error
 */
function stomp_error($link) {}

/**
 * Set timeout
 *
 * @param resource $link identifier returned by stomp_connect
 * @param int       $seconds the seconds part of the timeout to be set
 * @param int       $microseconds the microseconds part of the timeout to be set
 * @return void
 */
function stomp_set_timeout($link, $seconds, $microseconds = 0) {}

/**
 * Get timeout
 *
 * @param resource $link identifier returned by stomp_connect
 * @return array Array with timeout informations
 */
function stomp_get_timeout($link) {}
#!/usr/bin/env bash
echo "Installing composer packages..."
docker-compose -f docker-compose.yml run test_runner composer install --ignore-platform-reqs
echo "Checking stub map..."
docker-compose -f docker-compose.yml run test_runner vendor/bin/phpunit --testsuite Check_Stub_Map
phpVersions=("7.1" "7.2" "7.3" "7.4" "8.0" "8.1")
for i in "${phpVersions[@]}"
do
  export PHP_VERSION=$i
  SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
  cd "$SCRIPT_DIR" || exit
  echo "Building docker container for PHP_$i..."
  docker-compose -f docker-compose.yml build
  echo "Dumping reflection data to file $SCRIPT_DIR/ReflectionData.json for PHP_$i..."
  docker-compose -f docker-compose.yml run -e PHP_VERSION="$i" php_under_test /usr/local/bin/php tests/Tools/dump-reflection-to-file.php ReflectionData.json
  echo "Running tests agains PHP_$i..."
  docker-compose -f docker-compose.yml run -e PHP_VERSION="$i" test_runner vendor/bin/phpunit --testsuite PHP_"$i"
  echo "Removing file $SCRIPT_DIR/ReflectionData.json with reflection data for PHP_$i..."
  rm -f "$SCRIPT_DIR/ReflectionData.json"
done
<?php
/**
 * Radius constants
 * @link https://secure.php.net/manual/en/radius.constants.php
 */
/** The maximum length of MPPE keys. */
define('RADIUS_MPPE_KEY_LEN', 16);

/*
 * RADIUS Options
 * @link https://secure.php.net/manual/en/radius.constants.options.php
 */

/** When set, this option will result in the attribute value being salt-encrypted. */
define('RAD_OPTION_TAG', 1);
/** When set, this option will result in the attribute value being tagged with the value of the tag parameter. */
define('RADIUS_OPTION_SALT', 2);

/*
 * RADIUS Packet Types
 * @link https://secure.php.net/manual/en/radius.constants.packets.php
 */

/** An Access-Request, used to authenticate a user against a RADIUS server. Access request packets must include a <b>RADIUS_NAS_IP_ADDRESS</b> or a <b>RADIUS_NAS_IDENTIFIER</b> attribute, must also include a <b>RADIUS_USER_PASSWORD</b>, <b>RADIUS_CHAP_PASSWORD</b> or a <b>RADIUS_STATE</b> attribute, and should include a <b>RADIUS_USER_NAME</b> attribute. */
define('RADIUS_ACCESS_REQUEST', 1);

/** An Access-Accept response to an Access-Request indicating that the RADIUS server authenticated the user successfully. */
define('RADIUS_ACCESS_ACCEPT', 2);

/** An Access-Reject response to an Access-Request indicating that the RADIUS server could not authenticate the user. */
define('RADIUS_ACCESS_REJECT', 3);

/** An Accounting-Request, used to convey accounting information for a service to the RADIUS server. */
define('RADIUS_ACCOUNTING_REQUEST', 4);

/** An Accounting-Response response to an Accounting-Request. */
define('RADIUS_ACCOUNTING_RESPONSE', 5);

/** An Access-Challenge response to an Access-Request indicating that the RADIUS server requires further information in another Access-Request before authenticating the user. */
define('RADIUS_ACCESS_CHALLENGE', 11);

/**
 * A Disconnect-Request, sent from the RADIUS server to indicate that the user session must be terminated.
 * @since 1.3.0
 */
define('RADIUS_DISCONNECT_REQUEST', 40);

/**
 * A Disconnect-ACK, sent to the RADIUS server to indicate that the user session has been terminated.
 * @since 1.3.0
 */
define('RADIUS_DISCONNECT_ACK', 41);

/**
 * A Disconnect-NAK, sent to the RADIUS server to indicate that the user session could not be terminated.
 * @since 1.3.0
 */
define('RADIUS_DISCONNECT_NAK', 42);

/**
 * A CoA-Request, sent from the RADIUS server to indicate that the authorisations within the user session have changed. A response must be sent in the form of a CoA-ACK or a CoA-NAK.
 * @since 1.3.0
 */
define('RADIUS_COA_REQUEST', 43);

/**
 * A CoA-ACK, sent to the RADIUS server to indicate that the user authorisations have been updated.
 * @since 1.3.0
 */
define('RADIUS_COA_ACK', 44);

/**
 * A CoA-NAK, sent to the RADIUS server to indicate that the user authorisations could not be updated.
 * @since 1.3.0
 */
define('RADIUS_COA_NAK', 45);

/*
 * RADIUS Attribute Types
 * @link https://secure.php.net/manual/en/radius.constants.attributes.php
 */

/** The User-Name attribute. The attribute value is expected to be a string containing the name of the user being authenticated, and can be set using {@see radius_put_attr()}. */
define('RADIUS_USER_NAME', 1);

/**
 * The User-Password attribute. The attribute value is expected to be a string containing the user's password, and can be set using {@see radius_put_attr()}. This value will be obfuscated on transmission as described in section 5.2 of RFC 2865.
 * @link https://secure.php.net/manual/en/radius.constants.attributes.php */
define('RADIUS_USER_PASSWORD', 2);

/** The Chap-Password attribute. The attribute value is expected to be a string with the first byte containing the CHAP identifier, and the subsequent 16 bytes containing the MD5 hash of the CHAP identifier, the plaintext password and the CHAP challenge value concatenated together. Note that the CHAP challenge value should also be sent separately in a <b>{@see RADIUS_CHAP_CHALLENGE}</b> attribute. */
define('RADIUS_CHAP_PASSWORD', 3);

/** The NAS-IP-Address attribute. The attribute value is expected to the IP address of the RADIUS client encoded as an integer, which can be set using {@see radius_put_addr()}. */
define('RADIUS_NAS_IP_ADDRESS', 4);

/** The NAS-Port attribute. The attribute value is expected to be the physical port of the user on the RADIUS client encoded as an integer, which can be set using {@see radius_put_int()}. */
define('RADIUS_NAS_PORT', 5);

/**
 * The Service-Type attribute. The attribute value indicates the service type the user is requesting, and is expected to be an integer, which can be set using {@see radius_put_int()}.
 * A number of constants are provided to represent the possible values of this attribute. They include:
 * - RADIUS_LOGIN
 * - RADIUS_FRAMED
 * - RADIUS_CALLBACK_LOGIN
 * - RADIUS_CALLBACK_FRAMED
 * - RADIUS_OUTBOUND
 * - RADIUS_ADMINISTRATIVE
 * - RADIUS_NAS_PROMPT
 * - RADIUS_AUTHENTICATE_ONLY
 * - RADIUS_CALLBACK_NAS_PROMPT
 */
define('RADIUS_SERVICE_TYPE', 6);
define('RADIUS_LOGIN', 1);
define('RADIUS_FRAMED', 2);
define('RADIUS_CALLBACK_LOGIN', 3);
define('RADIUS_CALLBACK_FRAMED', 4);
define('RADIUS_OUTBOUND', 5);
define('RADIUS_ADMINISTRATIVE', 6);
define('RADIUS_NAS_PROMPT', 7);
define('RADIUS_AUTHENTICATE_ONLY', 8);
define('RADIUS_CALLBACK_NAS_PROMPT', 9);

/**
 * The Framed-Protocol attribute. The attribute value is expected to be an integer indicating the framing to be used for framed access, and can be set using {@see radius_put_int()}. The possible attribute values include these constants:
 * - RADIUS_PPP
 * - RADIUS_SLIP
 * - RADIUS_ARAP
 * - RADIUS_GANDALF
 * - RADIUS_XYLOGICS
 */
define('RADIUS_FRAMED_PROTOCOL', 7);
define('RADIUS_PPP', 1);
define('RADIUS_SLIP', 2);
define('RADIUS_ARAP', 3);
define('RADIUS_GANDALF', 4);
define('RADIUS_XYLOGICS', 5);

/** The Framed-IP-Address attribute. The attribute value is expected to be the address of the user's network encoded as an integer, which can be set using {@see radius_put_addr()} and retrieved using {@see radius_cvt_addr()}. */
define('RADIUS_FRAMED_IP_ADDRESS', 8);

/** The Framed-IP-Netmask attribute. The attribute value is expected to be the netmask of the user's network encoded as an integer, which can be set using {@see radius_put_addr()} and retrieved using {@see radius_cvt_addr()}. */
define('RADIUS_FRAMED_IP_NETMASK', 9);

/**
 * The Framed-Routing attribute. The attribute value is expected to be an integer indicating the routing method for the user, which can be set using {@see radius_put_int()}.<br>
 * <br>
 * Possible values include:
 * - 0: No routing
 * - 1: Send routing packets
 * - 2: Listen for routing packets
 * - 3: Send and listen
 */
define('RADIUS_FRAMED_ROUTING', 10);

/** The Filter-ID attribute. The attribute value is expected to be an implementation-specific, human-readable string of filters, which can be set using {@see radius_put_attr()}.*/
define('RADIUS_FILTER_ID', 11);

/** The Framed-MTU attribute. The attribute value is expected to be an integer indicating the MTU to be configured for the user, and can be set using {@see radius_put_int()}.*/
define('RADIUS_FRAMED_MTU', 12);

/** The Framed-Compression attribute. The attribute value is expected to be an integer indicating the compression protocol to be used, and can be set using radius_put_int(). Possible values include these constants:
 * - <b>RADIUS_COMP_NONE</b>: No compression
 * - <b>RADIUS_COMP_VJ</b>: VJ TCP/IP header compression
 * - <b>RADIUS_COMP_IPXHDR</b>: IPX header compression
 * - <b>RADIUS_COMP_STAC_LZS</b>: Stac-LZS compression (added in PECL radius 1.3.0b2)
 */
define('RADIUS_FRAMED_COMPRESSION', 13);
define('RADIUS_COMP_NONE', 0);
define('RADIUS_COMP_VJ', 1);
define('RADIUS_COMP_IPXHDR', 2);

/** The Login-IP-Host attribute. The attribute value is expected to the IP address to connect the user to, encoded as an integer, which can be set using {@see radius_put_addr()}. */
define('RADIUS_LOGIN_IP_HOST', 14);

/** The Login-Service attribute. The attribute value is an integer indicating the service to connect the user to on the login host. The value can be converted to a PHP integer via {@see radius_cvt_int()}.*/
define('RADIUS_LOGIN_SERVICE', 15);
define('RADIUS_LOGIN_TCP_PORT', 16);
define('RADIUS_REPLY_MESSAGE', 18);
define('RADIUS_CALLBACK_NUMBER', 19);
define('RADIUS_CALLBACK_ID', 20);
define('RADIUS_FRAMED_ROUTE', 22);
define('RADIUS_FRAMED_IPX_NETWORK', 23);
define('RADIUS_STATE', 24);
define('RADIUS_CLASS', 25);
define('RADIUS_VENDOR_SPECIFIC', 26);
define('RADIUS_SESSION_TIMEOUT', 27);
define('RADIUS_IDLE_TIMEOUT', 28);
define('RADIUS_TERMINATION_ACTION', 29);
define('RADIUS_CALLED_STATION_ID', 30);
define('RADIUS_CALLING_STATION_ID', 31);
define('RADIUS_NAS_IDENTIFIER', 32);
define('RADIUS_PROXY_STATE', 33);
define('RADIUS_LOGIN_LAT_SERVICE', 34);
define('RADIUS_LOGIN_LAT_NODE', 35);
define('RADIUS_LOGIN_LAT_GROUP', 36);
define('RADIUS_FRAMED_APPLETALK_LINK', 37);
define('RADIUS_FRAMED_APPLETALK_NETWORK', 38);
define('RADIUS_FRAMED_APPLETALK_ZONE', 39);
define('RADIUS_CHAP_CHALLENGE', 60);
define('RADIUS_NAS_PORT_TYPE', 61);
define('RADIUS_ASYNC', 0);
define('RADIUS_SYNC', 1);
define('RADIUS_ISDN_SYNC', 2);
define('RADIUS_ISDN_ASYNC_V120', 3);
define('RADIUS_ISDN_ASYNC_V110', 4);
define('RADIUS_VIRTUAL', 5);
define('RADIUS_PIAFS', 6);
define('RADIUS_HDLC_CLEAR_CHANNEL', 7);
define('RADIUS_X_25', 8);
define('RADIUS_X_75', 9);
define('RADIUS_G_3_FAX', 10);
define('RADIUS_SDSL', 11);
define('RADIUS_ADSL_CAP', 12);
define('RADIUS_ADSL_DMT', 13);
define('RADIUS_IDSL', 14);
define('RADIUS_ETHERNET', 15);
define('RADIUS_XDSL', 16);
define('RADIUS_CABLE', 17);
define('RADIUS_WIRELESS_OTHER', 18);
define('RADIUS_WIRELESS_IEEE_802_11', 19);
define('RADIUS_PORT_LIMIT', 62);
define('RADIUS_LOGIN_LAT_PORT', 63);
define('RADIUS_CONNECT_INFO', 77);
define('RADIUS_NAS_IPV6_ADDRESS', 95);
define('RADIUS_FRAMED_INTERFACE_ID', 96);
define('RADIUS_FRAMED_IPV6_PREFIX', 97);
define('RADIUS_LOGIN_IPV6_HOST', 98);
define('RADIUS_FRAMED_IPV6_ROUTE', 99);
define('RADIUS_FRAMED_IPV6_POOL', 100);
define('RADIUS_ERROR_CAUSE', 101);
define('RADIUS_ERROR_CAUSE_RESIDUAL_SESSION_CONTEXT_REMOVED', 201);
define('RADIUS_ERROR_CAUSE_INVALID_EAP_PACKET', 202);
define('RADIUS_ERROR_CAUSE_UNSUPPORTED_ATTRIBUTE', 401);
define('RADIUS_ERROR_CAUSE_MISSING_ATTRIBUTE', 402);
define('RADIUS_ERROR_CAUSE_NAS_IDENTIFICATION_MISMATCH', 403);
define('RADIUS_ERROR_CAUSE_INVALID_REQUEST', 404);
define('RADIUS_ERROR_CAUSE_UNSUPPORTED_SERVICE', 405);
define('RADIUS_ERROR_CAUSE_UNSUPPORTED_EXCEPTION', 406);
define('RADIUS_ERROR_CAUSE_ADMINISTRATIVELY_PROHIBITED', 501);
define('RADIUS_ERROR_CAUSE_REQUEST_NOT_ROUTABLE', 502);
define('RADIUS_ERROR_CAUSE_SESSION_CONTEXT_NOT_FOUND', 503);
define('RADIUS_ERROR_CAUSE_SESSION_CONTEXT_NOT_REMOVABLE', 504);
define('RADIUS_ERROR_CAUSE_OTHER_PROXY_PROCESSING_ERROR', 505);
define('RADIUS_ERROR_CAUSE_RESOURCES_UNAVAILABLE', 506);
define('RADIUS_ERROR_CAUSE_REQUEST_INITIATED', 507);
define('RADIUS_ACCT_STATUS_TYPE', 40);
define('RADIUS_START', 1);
define('RADIUS_STOP', 2);
define('RADIUS_ACCOUNTING_ON', 7);
define('RADIUS_ACCOUNTING_OFF', 8);
define('RADIUS_ACCT_DELAY_TIME', 41);
define('RADIUS_ACCT_INPUT_OCTETS', 42);
define('RADIUS_ACCT_OUTPUT_OCTETS', 43);
define('RADIUS_ACCT_SESSION_ID', 44);
define('RADIUS_ACCT_AUTHENTIC', 45);
define('RADIUS_AUTH_RADIUS', 1);
define('RADIUS_AUTH_LOCAL', 2);
define('RADIUS_AUTH_REMOTE', 3);
define('RADIUS_ACCT_SESSION_TIME', 46);
define('RADIUS_ACCT_INPUT_PACKETS', 47);
define('RADIUS_ACCT_OUTPUT_PACKETS', 48);
define('RADIUS_ACCT_TERMINATE_CAUSE', 49);
define('RADIUS_TERM_USER_REQUEST', 1);
define('RADIUS_TERM_LOST_CARRIER', 2);
define('RADIUS_TERM_LOST_SERVICE', 3);
define('RADIUS_TERM_IDLE_TIMEOUT', 4);
define('RADIUS_TERM_SESSION_TIMEOUT', 5);
define('RADIUS_TERM_ADMIN_RESET', 6);
define('RADIUS_TERM_ADMIN_REBOOT', 7);
define('RADIUS_TERM_PORT_ERROR', 8);
define('RADIUS_TERM_NAS_ERROR', 9);
define('RADIUS_TERM_NAS_REQUEST', 10);
define('RADIUS_TERM_NAS_REBOOT', 11);
define('RADIUS_TERM_PORT_UNNEEDED', 12);
define('RADIUS_TERM_PORT_PREEMPTED', 13);
define('RADIUS_TERM_PORT_SUSPENDED', 14);
define('RADIUS_TERM_SERVICE_UNAVAILABLE', 15);
define('RADIUS_TERM_CALLBACK', 16);
define('RADIUS_TERM_USER_ERROR', 17);
define('RADIUS_TERM_HOST_REQUEST', 18);
define('RADIUS_ACCT_MULTI_SESSION_ID', 50);
define('RADIUS_ACCT_LINK_COUNT', 51);
define('RADIUS_VENDOR_MICROSOFT', 311);
define('RADIUS_MICROSOFT_MS_CHAP_RESPONSE', 1);
define('RADIUS_MICROSOFT_MS_CHAP_ERROR', 2);
define('RADIUS_MICROSOFT_MS_CHAP_PW_1', 3);
define('RADIUS_MICROSOFT_MS_CHAP_PW_2', 4);
define('RADIUS_MICROSOFT_MS_CHAP_LM_ENC_PW', 5);
define('RADIUS_MICROSOFT_MS_CHAP_NT_ENC_PW', 6);
define('RADIUS_MICROSOFT_MS_MPPE_ENCRYPTION_POLICY', 7);
define('RADIUS_MICROSOFT_MS_MPPE_ENCRYPTION_TYPES', 8);
define('RADIUS_MICROSOFT_MS_RAS_VENDOR', 9);
define('RADIUS_MICROSOFT_MS_CHAP_DOMAIN', 10);
define('RADIUS_MICROSOFT_MS_CHAP_CHALLENGE', 11);
define('RADIUS_MICROSOFT_MS_CHAP_MPPE_KEYS', 12);
define('RADIUS_MICROSOFT_MS_BAP_USAGE', 13);
define('RADIUS_MICROSOFT_MS_LINK_UTILIZATION_THRESHOLD', 14);
define('RADIUS_MICROSOFT_MS_LINK_DROP_TIME_LIMIT', 15);
define('RADIUS_MICROSOFT_MS_MPPE_SEND_KEY', 16);
define('RADIUS_MICROSOFT_MS_MPPE_RECV_KEY', 17);
define('RADIUS_MICROSOFT_MS_RAS_VERSION', 18);
define('RADIUS_MICROSOFT_MS_OLD_ARAP_PASSWORD', 19);
define('RADIUS_MICROSOFT_MS_NEW_ARAP_PASSWORD', 20);
define('RADIUS_MICROSOFT_MS_ARAP_PASSWORD_CHANGE_REASON', 21);
define('RADIUS_MICROSOFT_MS_FILTER', 22);
define('RADIUS_MICROSOFT_MS_ACCT_AUTH_TYPE', 23);
define('RADIUS_MICROSOFT_MS_ACCT_EAP_TYPE', 24);
define('RADIUS_MICROSOFT_MS_CHAP2_RESPONSE', 25);
define('RADIUS_MICROSOFT_MS_CHAP2_SUCCESS', 26);
define('RADIUS_MICROSOFT_MS_CHAP2_PW', 27);
define('RADIUS_MICROSOFT_MS_PRIMARY_DNS_SERVER', 28);
define('RADIUS_MICROSOFT_MS_SECONDARY_DNS_SERVER', 29);
define('RADIUS_MICROSOFT_MS_PRIMARY_NBNS_SERVER', 30);
define('RADIUS_MICROSOFT_MS_SECONDARY_NBNS_SERVER', 31);
define('RADIUS_MICROSOFT_MS_ARAP_CHALLENGE', 33);
define('RADIUS_OPTION_NONE', RADIUS_OPTION_NONE);
define('RADIUS_OPTION_TAGGED', RADIUS_OPTION_TAGGED);

/**
 * Creates a Radius handle for accounting
 * @link https://secure.php.net/manual/en/function.radius-acct-open.php
 * @return resource|false Returns a handle on success, <b>FALSE</b> on error. This function only fails if insufficient memory is available.
 * @since 1.1.0
 */
function radius_acct_open() {}

/**
 * <b>radius_add_server()</b> may be called multiple times, and it may be used together with {@see radius_config()}. At most 10 servers may be specified. When multiple servers are given, they are tried in round-robin fashion until a valid response is received, or until each server's max_tries limit has been reached.
 * @link https://secure.php.net/manual/en/function.radius-add-server.php
 * @param resource $radius_handle
 * @param string $hostname The <b>hostname</b> parameter specifies the server host, either as a fully qualified domain name or as a dotted-quad IP address in text form.
 * @param int $port The <b>port</b> specifies the UDP port to contact on the server.<br>
 *                  If port is given as 0, the library looks up the radius/udp or radacct/udp service in the network services database, and uses the port found there.<br>
 *                  If no entry is found, the library uses the standard Radius ports, 1812 for authentication and 1813 for accounting.
 * @param string $secret The shared secret for the server host is passed to the <b>secret</b> parameter. The Radius protocol ignores all but the leading 128 bytes of the shared secret.
 * @param int $timeout The timeout for receiving replies from the server is passed to the <b>timeout</b> parameter, in units of seconds.
 * @param int $max_tries The maximum number of repeated requests to make before giving up is passed into the <b>max_tries</b>.
 * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * @see radius_config()
 * @since 1.1.0
 */
function radius_add_server($radius_handle, $hostname, $port, $secret, $timeout, $max_tries) {}

/**
 * Creates a Radius handle for authentication
 * @link https://secure.php.net/manual/en/function.radius-auth-open.php
 * @return resource|false Returns a handle on success, <b>FALSE</b> on error. This function only fails if insufficient memory is available.
 * @since 1.1.0
 */
function radius_auth_open() {}

/**
 * Free all resources. It is not needed to call this function because php frees all resources at the end of each request.
 * @link https://secure.php.net/manual/en/function.radius-close.php
 * @param resource $radius_handle
 * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * @since 1.1.0
 */
function radius_close($radius_handle) {}

/**
 * Before issuing any Radius requests, the library must be made aware of the servers it can contact. The easiest way to configure the library is to call <b>radius_config()</b>. <b>radius_config()</b> causes the library to read a configuration file whose format is described in radius.conf.
 * @link https://secure.php.net/manual/en/function.radius-config.php
 * @link https://www.freebsd.org/cgi/man.cgi?query=radius.conf
 * @param resource $radius_handle
 * @param string $file The pathname of the configuration file is passed as the file argument to {@see radius_config()}. The library can also be configured programmatically by calls to <b>{@see radius_add_server()}</b>.
 * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * @see radius_add_server()
 * @since 1.1.0
 */
function radius_config($radius_handle, $file) {}

/**
 * A Radius request consists of a code specifying the kind of request, and zero or more attributes which provide additional information. To begin constructing a new request, call <b>radius_create_request()</b>.<br />
 * <b>Note:</b> Attention: You must call this function, before you can put any attribute!
 * @link https://secure.php.net/manual/en/function.radius-create-request.php
 * @param resource $radius_handle
 * @param int $type Type is <b>RADIUS_ACCESS_REQUEST</b> or <b>RADIUS_ACCOUNTING_REQUEST</b>.
 * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * @see radius_send_request()
 * @since 1.1.0
 */
function radius_create_request($radius_handle, $type) {}
<?php

// Start of pdo_mysql v.1.0.2
// End of pdo_mysql v.1.0.2
<?php

// Start of memcached v.3.1.5
use JetBrains\PhpStorm\Deprecated;

/**
 * Represents a connection to a set of memcached servers.
 * @link https://php.net/manual/en/class.memcached.php
 */
class Memcached
{
    /**
     * <p>Enables or disables payload compression. When enabled,
     * item values longer than a certain threshold (currently 100 bytes) will be
     * compressed during storage and decompressed during retrieval
     * transparently.</p>
     * <p>Type: boolean, default: <b>TRUE</b>.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const OPT_COMPRESSION = -1001;
    public const OPT_COMPRESSION_TYPE = -1004;

    /**
     * <p>This can be used to create a "domain" for your item keys. The value
     * specified here will be prefixed to each of the keys. It cannot be
     * longer than 128 characters and will reduce the
     * maximum available key size. The prefix is applied only to the item keys,
     * not to the server keys.</p>
     * <p>Type: string, default: "".</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const OPT_PREFIX_KEY = -1002;

    /**
     * <p>
     * Specifies the serializer to use for serializing non-scalar values.
     * The valid serializers are <b>Memcached::SERIALIZER_PHP</b>
     * or <b>Memcached::SERIALIZER_IGBINARY</b>. The latter is
     * supported only when memcached is configured with
     * --enable-memcached-igbinary option and the
     * igbinary extension is loaded.
     * </p>
     * <p>Type: integer, default: <b>Memcached::SERIALIZER_PHP</b>.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const OPT_SERIALIZER = -1003;

    /**
     * <p>Indicates whether igbinary serializer support is available.</p>
     * <p>Type: boolean.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const HAVE_IGBINARY = false;

    /**
     * <p>Indicates whether JSON serializer support is available.</p>
     * <p>Type: boolean.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const HAVE_JSON = false;

    /**
     * <p>Indicates whether msgpack serializer support is available.</p>
     * <p>Type: boolean.</p>
     * Available as of Memcached 3.0.0.
     * @since 3.0.0
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const HAVE_MSGPACK = false;

    /**
     * <p>Indicate whether set_encoding_key is available</p>
     * <p>Type: boolean.</p>
     * @link https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/memcached-api.php, https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/php_memcached.c#L4387
     */
    public const HAVE_ENCODING = false;

    /**
     * Feature support
     */
    public const HAVE_SESSION = true;
    public const HAVE_SASL = false;

    /**
     * <p>Specifies the hashing algorithm used for the item keys. The valid
     * values are supplied via <b>Memcached::HASH_*</b> constants.
     * Each hash algorithm has its advantages and its disadvantages. Go with the
     * default if you don't know or don't care.</p>
     * <p>Type: integer, default: <b>Memcached::HASH_DEFAULT</b></p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const OPT_HASH = 2;

    /**
     * <p>The default (Jenkins one-at-a-time) item key hashing algorithm.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const HASH_DEFAULT = 0;

    /**
     * <p>MD5 item key hashing algorithm.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const HASH_MD5 = 1;

    /**
     * <p>CRC item key hashing algorithm.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const HASH_CRC = 2;

    /**
     * <p>FNV1_64 item key hashing algorithm.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const HASH_FNV1_64 = 3;

    /**
     * <p>FNV1_64A item key hashing algorithm.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const HASH_FNV1A_64 = 4;

    /**
     * <p>FNV1_32 item key hashing algorithm.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const HASH_FNV1_32 = 5;

    /**
     * <p>FNV1_32A item key hashing algorithm.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const HASH_FNV1A_32 = 6;

    /**
     * <p>Hsieh item key hashing algorithm.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const HASH_HSIEH = 7;

    /**
     * <p>Murmur item key hashing algorithm.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const HASH_MURMUR = 8;

    /**
     * <p>Specifies the method of distributing item keys to the servers.
     * Currently supported methods are modulo and consistent hashing. Consistent
     * hashing delivers better distribution and allows servers to be added to
     * the cluster with minimal cache losses.</p>
     * <p>Type: integer, default: <b>Memcached::DISTRIBUTION_MODULA.</b></p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const OPT_DISTRIBUTION = 9;

    /**
     * <p>Modulo-based key distribution algorithm.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const DISTRIBUTION_MODULA = 0;

    /**
     * <p>Consistent hashing key distribution algorithm (based on libketama).</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const DISTRIBUTION_CONSISTENT = 1;
    public const DISTRIBUTION_VIRTUAL_BUCKET = 6;

    /**
     * <p>Enables or disables compatibility with libketama-like behavior. When
     * enabled, the item key hashing algorithm is set to MD5 and distribution is
     * set to be weighted consistent hashing distribution. This is useful
     * because other libketama-based clients (Python, Ruby, etc.) with the same
     * server configuration will be able to access the keys transparently.
     * </p>
     * <p>
     * It is highly recommended to enable this option if you want to use
     * consistent hashing, and it may be enabled by default in future
     * releases.
     * </p>
     * <p>Type: boolean, default: <b>FALSE</b>.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const OPT_LIBKETAMA_COMPATIBLE = 16;
    public const OPT_LIBKETAMA_HASH = 17;
    public const OPT_TCP_KEEPALIVE = 32;

    /**
     * <p>Enables or disables buffered I/O. Enabling buffered I/O causes
     * storage commands to "buffer" instead of being sent. Any action that
     * retrieves data causes this buffer to be sent to the remote connection.
     * Quitting the connection or closing down the connection will also cause
     * the buffered data to be pushed to the remote connection.</p>
     * <p>Type: boolean, default: <b>FALSE</b>.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const OPT_BUFFER_WRITES = 10;

    /**
     * <p>Enable the use of the binary protocol. Please note that you cannot
     * toggle this option on an open connection.</p>
     * <p>Type: boolean, default: <b>FALSE</b>.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const OPT_BINARY_PROTOCOL = 18;

    /**
     * <p>Enables or disables asynchronous I/O. This is the fastest transport
     * available for storage functions.</p>
     * <p>Type: boolean, default: <b>FALSE</b>.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const OPT_NO_BLOCK = 0;

    /**
     * <p>Enables or disables the no-delay feature for connecting sockets (may
     * be faster in some environments).</p>
     * <p>Type: boolean, default: <b>FALSE</b>.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const OPT_TCP_NODELAY = 1;

    /**
     * <p>The maximum socket send buffer in bytes.</p>
     * <p>Type: integer, default: varies by platform/kernel
     * configuration.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const OPT_SOCKET_SEND_SIZE = 4;

    /**
     * <p>The maximum socket receive buffer in bytes.</p>
     * <p>Type: integer, default: varies by platform/kernel
     * configuration.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const OPT_SOCKET_RECV_SIZE = 5;

    /**
     * <p>In non-blocking mode this set the value of the timeout during socket
     * connection, in milliseconds.</p>
     * <p>Type: integer, default: 1000.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const OPT_CONNECT_TIMEOUT = 14;

    /**
     * <p>The amount of time, in seconds, to wait until retrying a failed
     * connection attempt.</p>
     * <p>Type: integer, default: 0.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const OPT_RETRY_TIMEOUT = 15;

    /**
     * <p>Socket sending timeout, in microseconds. In cases where you cannot
     * use non-blocking I/O this will allow you to still have timeouts on the
     * sending of data.</p>
     * <p>Type: integer, default: 0.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const OPT_SEND_TIMEOUT = 19;

    /**
     * <p>Socket reading timeout, in microseconds. In cases where you cannot
     * use non-blocking I/O this will allow you to still have timeouts on the
     * reading of data.</p>
     * <p>Type: integer, default: 0.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const OPT_RECV_TIMEOUT = 20;

    /**
     * <p>Timeout for connection polling, in milliseconds.</p>
     * <p>Type: integer, default: 1000.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const OPT_POLL_TIMEOUT = 8;

    /**
     * <p>Enables or disables caching of DNS lookups.</p>
     * <p>Type: boolean, default: <b>FALSE</b>.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const OPT_CACHE_LOOKUPS = 6;

    /**
     * <p>Specifies the failure limit for server connection attempts. The
     * server will be removed after this many continuous connection
     * failures.</p>
     * <p>Type: integer, default: 0.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const OPT_SERVER_FAILURE_LIMIT = 21;
    public const OPT_AUTO_EJECT_HOSTS = 28;
    public const OPT_HASH_WITH_PREFIX_KEY = 25;
    public const OPT_NOREPLY = 26;
    public const OPT_SORT_HOSTS = 12;
    public const OPT_VERIFY_KEY = 13;
    public const OPT_USE_UDP = 27;
    public const OPT_NUMBER_OF_REPLICAS = 29;
    public const OPT_RANDOMIZE_REPLICA_READ = 30;
    public const OPT_CORK = 31;
    public const OPT_REMOVE_FAILED_SERVERS = 35;
    public const OPT_DEAD_TIMEOUT = 36;
    public const OPT_SERVER_TIMEOUT_LIMIT = 37;
    public const OPT_MAX = 38;
    public const OPT_IO_BYTES_WATERMARK = 23;
    public const OPT_IO_KEY_PREFETCH = 24;
    public const OPT_IO_MSG_WATERMARK = 22;
    public const OPT_LOAD_FROM_FILE = 34;
    public const OPT_SUPPORT_CAS = 7;
    public const OPT_TCP_KEEPIDLE = 33;
    public const OPT_USER_DATA = 11;

    /**
     * libmemcached result codes
     */
    /**
     * <p>The operation was successful.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const RES_SUCCESS = 0;

    /**
     * <p>The operation failed in some fashion.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const RES_FAILURE = 1;

    /**
     * <p>DNS lookup failed.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const RES_HOST_LOOKUP_FAILURE = 2;

    /**
     * <p>Failed to read network data.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const RES_UNKNOWN_READ_FAILURE = 7;

    /**
     * <p>Bad command in memcached protocol.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const RES_PROTOCOL_ERROR = 8;

    /**
     * <p>Error on the client side.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const RES_CLIENT_ERROR = 9;

    /**
     * <p>Error on the server side.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const RES_SERVER_ERROR = 10;

    /**
     * <p>Failed to write network data.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const RES_WRITE_FAILURE = 5;

    /**
     * <p>Failed to do compare-and-swap: item you are trying to store has been
     * modified since you last fetched it.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const RES_DATA_EXISTS = 12;

    /**
     * <p>Item was not stored: but not because of an error. This normally
     * means that either the condition for an "add" or a "replace" command
     * wasn't met, or that the item is in a delete queue.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const RES_NOTSTORED = 14;

    /**
     * <p>Item with this key was not found (with "get" operation or "cas"
     * operations).</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const RES_NOTFOUND = 16;

    /**
     * <p>Partial network data read error.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const RES_PARTIAL_READ = 18;

    /**
     * <p>Some errors occurred during multi-get.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const RES_SOME_ERRORS = 19;

    /**
     * <p>Server list is empty.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const RES_NO_SERVERS = 20;

    /**
     * <p>End of result set.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const RES_END = 21;

    /**
     * <p>System error.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const RES_ERRNO = 26;

    /**
     * <p>The operation was buffered.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const RES_BUFFERED = 32;

    /**
     * <p>The operation timed out.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const RES_TIMEOUT = 31;

    /**
     * <p>Bad key.</p>
     * @link https://php.net/manual/en/memcached.constants.php, http://docs.libmemcached.org/index.html
     */
    /**
     * <p>MEMCACHED_BAD_KEY_PROVIDED: The key provided is not a valid key.</p>
     */
    public const RES_BAD_KEY_PROVIDED = 33;

    /**
     * <p>MEMCACHED_STORED: The requested object has been successfully stored on the server.</p>
     */
    public const RES_STORED = 15;

    /**
     * <p>MEMCACHED_DELETED: The object requested by the key has been deleted.</p>
     */
    public const RES_DELETED = 22;

    /**
     * <p>MEMCACHED_STAT: A “stat” command has been returned in the protocol.</p>
     */
    public const RES_STAT = 24;

    /**
     * <p>MEMCACHED_ITEM: An item has been fetched (this is an internal error only).</p>
     */
    public const RES_ITEM = 25;

    /**
     * <p>MEMCACHED_NOT_SUPPORTED: The given method is not supported in the server.</p>
     */
    public const RES_NOT_SUPPORTED = 28;

    /**
     * <p>MEMCACHED_FETCH_NOTFINISHED: A request has been made, but the server has not finished the fetch of the last request.</p>
     */
    public const RES_FETCH_NOTFINISHED = 30;

    /**
     * <p>MEMCACHED_SERVER_MARKED_DEAD: The requested server has been marked dead.</p>
     */
    public const RES_SERVER_MARKED_DEAD = 35;

    /**
     * <p>MEMCACHED_UNKNOWN_STAT_KEY: The server you are communicating with has a stat key which has not be defined in the protocol.</p>
     */
    public const RES_UNKNOWN_STAT_KEY = 36;

    /**
     * <p>MEMCACHED_INVALID_HOST_PROTOCOL: The server you are connecting too has an invalid protocol. Most likely you are connecting to an older server that does not speak the binary protocol.</p>
     */
    public const RES_INVALID_HOST_PROTOCOL = 34;

    /**
     * <p>MEMCACHED_MEMORY_ALLOCATION_FAILURE: An error has occurred while trying to allocate memory.</p>
     */
    public const RES_MEMORY_ALLOCATION_FAILURE = 17;

    /**
     * <p>MEMCACHED_E2BIG: Item is too large for the server to store.</p>
     */
    public const RES_E2BIG = 37;

    /**
     * <p>MEMCACHED_KEY_TOO_BIG: The key that has been provided is too large for the given server.</p>
     */
    public const RES_KEY_TOO_BIG = 39;

    /**
     * <p>MEMCACHED_SERVER_TEMPORARILY_DISABLED</p>
     */
    public const RES_SERVER_TEMPORARILY_DISABLED = 47;

    /**
     * <p>MEMORY_ALLOCATION_FAILURE: An error has occurred while trying to allocate memory.
     *
     * #if defined(LIBMEMCACHED_VERSION_HEX) && LIBMEMCACHED_VERSION_HEX >= 0x01000008</p>
     */
    public const RES_SERVER_MEMORY_ALLOCATION_FAILURE = 48;

    /**
     * <p>MEMCACHED_AUTH_PROBLEM: An unknown issue has occured during authentication.</p>
     */
    public const RES_AUTH_PROBLEM = 40;

    /**
     * <p>MEMCACHED_AUTH_FAILURE: The credentials provided are not valid for this server.</p>
     */
    public const RES_AUTH_FAILURE = 41;

    /**
     * <p>MEMCACHED_AUTH_CONTINUE: Authentication has been paused.</p>
     */
    public const RES_AUTH_CONTINUE = 42;

    /**
     * <p>MEMCACHED_CONNECTION_FAILURE: A unknown error has occured while trying to connect to a server.</p>
     */
    public const RES_CONNECTION_FAILURE = 3;

    /**
     * MEMCACHED_CONNECTION_BIND_FAILURE: We were not able to bind() to the socket.
     */
    #[Deprecated('Deprecated since version 0.30(libmemcached)')]
    public const RES_CONNECTION_BIND_FAILURE = 4;

    /**
     * <p>MEMCACHED_READ_FAILURE: A read failure has occurred.</p>
     */
    public const RES_READ_FAILURE = 6;

    /**
     * <p>MEMCACHED_DATA_DOES_NOT_EXIST: The data requested with the key given was not found.</p>
     */
    public const RES_DATA_DOES_NOT_EXIST = 13;

    /**
     * <p>MEMCACHED_VALUE: A value has been returned from the server (this is an internal condition only).</p>
     */
    public const RES_VALUE = 23;

    /**
     * <p>MEMCACHED_FAIL_UNIX_SOCKET: A connection was not established with the server via a unix domain socket.</p>
     */
    public const RES_FAIL_UNIX_SOCKET = 27;

    /**
     * No key was provided.</p>
     */
    #[Deprecated('Deprecated since version 0.30 (libmemcached). Use MEMCACHED_BAD_KEY_PROVIDED instead.')]
    public const RES_NO_KEY_PROVIDED = 29;

    /**
     * <p>MEMCACHED_INVALID_ARGUMENTS: The arguments supplied to the given function were not valid.</p>
     */
    public const RES_INVALID_ARGUMENTS = 38;

    /**
     * <p>MEMCACHED_PARSE_ERROR: An error has occurred while trying to parse the configuration string. You should use memparse to determine what the error was.</p>
     */
    public const RES_PARSE_ERROR = 43;

    /**
     * <p>MEMCACHED_PARSE_USER_ERROR: An error has occurred in parsing the configuration string.</p>
     */
    public const RES_PARSE_USER_ERROR = 44;

    /**
     * <p>MEMCACHED_DEPRECATED: The method that was requested has been deprecated.</p>
     */
    public const RES_DEPRECATED = 45;

    //unknow
    public const RES_IN_PROGRESS = 46;

    /**
     * <p>MEMCACHED_MAXIMUM_RETURN: This in an internal only state.</p>
     */
    public const RES_MAXIMUM_RETURN = 49;

    /**
     * Server callbacks, if compiled with --memcached-protocol
     * @link https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/memcached-api.php
     */
    public const ON_CONNECT = 0;
    public const ON_ADD = 1;
    public const ON_APPEND = 2;
    public const ON_DECREMENT = 3;
    public const ON_DELETE = 4;
    public const ON_FLUSH = 5;
    public const ON_GET = 6;
    public const ON_INCREMENT = 7;
    public const ON_NOOP = 8;
    public const ON_PREPEND = 9;
    public const ON_QUIT = 10;
    public const ON_REPLACE = 11;
    public const ON_SET = 12;
    public const ON_STAT = 13;
    public const ON_VERSION = 14;

    /**
     * Constants used when compiled with --memcached-protocol
     * @link https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/memcached-api.php
     */
    public const RESPONSE_SUCCESS = 0;
    public const RESPONSE_KEY_ENOENT = 1;
    public const RESPONSE_KEY_EEXISTS = 2;
    public const RESPONSE_E2BIG = 3;
    public const RESPONSE_EINVAL = 4;
    public const RESPONSE_NOT_STORED = 5;
    public const RESPONSE_DELTA_BADVAL = 6;
    public const RESPONSE_NOT_MY_VBUCKET = 7;
    public const RESPONSE_AUTH_ERROR = 32;
    public const RESPONSE_AUTH_CONTINUE = 33;
    public const RESPONSE_UNKNOWN_COMMAND = 129;
    public const RESPONSE_ENOMEM = 130;
    public const RESPONSE_NOT_SUPPORTED = 131;
    public const RESPONSE_EINTERNAL = 132;
    public const RESPONSE_EBUSY = 133;
    public const RESPONSE_ETMPFAIL = 134;

    /**
     * <p>Failed to create network socket.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const RES_CONNECTION_SOCKET_CREATE_FAILURE = 11;

    /**
     * <p>Payload failure: could not compress/decompress or serialize/unserialize the value.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const RES_PAYLOAD_FAILURE = -1001;

    /**
     * <p>The default PHP serializer.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const SERIALIZER_PHP = 1;

    /**
     * <p>The igbinary serializer.
     * Instead of textual representation it stores PHP data structures in a
     * compact binary form, resulting in space and time gains.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const SERIALIZER_IGBINARY = 2;

    /**
     * <p>The JSON serializer. Requires PHP 5.2.10+.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const SERIALIZER_JSON = 3;
    public const SERIALIZER_JSON_ARRAY = 4;

    /**
     * <p>The msgpack serializer.</p>
     * @link https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/memcached-api.php
     */
    public const SERIALIZER_MSGPACK = 5;
    public const COMPRESSION_FASTLZ = 2;
    public const COMPRESSION_ZLIB = 1;

    /**
     * <p>A flag for <b>Memcached::getMulti</b> and
     * <b>Memcached::getMultiByKey</b> to ensure that the keys are
     * returned in the same order as they were requested in. Non-existing keys
     * get a default value of NULL.</p>
     * @link https://php.net/manual/en/memcached.constants.php
     */
    public const GET_PRESERVE_ORDER = 1;

    /**
     * A flag for <b>Memcached::get()</b>, <b>Memcached::getMulti()</b> and
     * <b>Memcached::getMultiByKey()</b> to ensure that the CAS token values are returned as well.
     * @link https://php.net/manual/en/memcached.constants.php
     * @since 3.0.0
     */
    public const GET_EXTENDED = 2;
    public const GET_ERROR_RETURN_VALUE = false;

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Create a Memcached instance
     * @link https://php.net/manual/en/memcached.construct.php, https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/php_memcached.c
     * @param string $persistent_id [optional]
     * @param callable $on_new_object_cb [optional]
     * @param string $connection_str [optional]
     */
    public function __construct($persistent_id = '', $on_new_object_cb = null, $connection_str = '') {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Return the result code of the last operation
     * @link https://php.net/manual/en/memcached.getresultcode.php
     * @return int Result code of the last Memcached operation.
     */
    public function getResultCode() {}

    /**
     * (PECL memcached &gt;= 1.0.0)<br/>
     * Return the message describing the result of the last operation
     * @link https://php.net/manual/en/memcached.getresultmessage.php
     * @return string Message describing the result of the last Memcached operation.
     */
    public function getResultMessage() {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Retrieve an item
     * @link https://php.net/manual/en/memcached.get.php
     * @param string $key <p>
     * The key of the item to retrieve.
     * </p>
     * @param callable $cache_cb [optional] <p>
     * Read-through caching callback or <b>NULL</b>.
     * </p>
     * @param int $flags [optional] <p>
     * The flags for the get operation.
     * </p>
     * @return mixed the value stored in the cache or <b>FALSE</b> otherwise.
     * The <b>Memcached::getResultCode</b> will return
     * <b>Memcached::RES_NOTFOUND</b> if the key does not exist.
     */
    public function get($key, callable $cache_cb = null, $flags = 0) {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Retrieve an item from a specific server
     * @link https://php.net/manual/en/memcached.getbykey.php
     * @param string $server_key <p>
     * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
     * </p>
     * @param string $key <p>
     * The key of the item to fetch.
     * </p>
     * @param callable $cache_cb [optional] <p>
     * Read-through caching callback or <b>NULL</b>
     * </p>
     * @param int $flags [optional] <p>
     * The flags for the get operation.
     * </p>
     * @return mixed the value stored in the cache or <b>FALSE</b> otherwise.
     * The <b>Memcached::getResultCode</b> will return
     * <b>Memcached::RES_NOTFOUND</b> if the key does not exist.
     */
    public function getByKey($server_key, $key, callable $cache_cb = null, $flags = 0) {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Retrieve multiple items
     * @link https://php.net/manual/en/memcached.getmulti.php
     * @param array $keys <p>
     * Array of keys to retrieve.
     * </p>
     * @param int $flags [optional] <p>
     * The flags for the get operation.
     * </p>
     * @return mixed the array of found items or <b>FALSE</b> on failure.
     * Use <b>Memcached::getResultCode</b> if necessary.
     */
    public function getMulti(array $keys, $flags = 0) {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Retrieve multiple items from a specific server
     * @link https://php.net/manual/en/memcached.getmultibykey.php
     * @param string $server_key <p>
     * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
     * </p>
     * @param array $keys <p>
     * Array of keys to retrieve.
     * </p>
     * @param int $flags [optional] <p>
     * The flags for the get operation.
     * </p>
     * @return array|false the array of found items or <b>FALSE</b> on failure.
     * Use <b>Memcached::getResultCode</b> if necessary.
     */
    public function getMultiByKey($server_key, array $keys, $flags = 0) {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Request multiple items
     * @link https://php.net/manual/en/memcached.getdelayed.php
     * @param array $keys <p>
     * Array of keys to request.
     * </p>
     * @param bool $with_cas [optional] <p>
     * Whether to request CAS token values also.
     * </p>
     * @param callable $value_cb [optional] <p>
     * The result callback or <b>NULL</b>.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * Use <b>Memcached::getResultCode</b> if necessary.
     */
    public function getDelayed(array $keys, $with_cas = null, callable $value_cb = null) {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Request multiple items from a specific server
     * @link https://php.net/manual/en/memcached.getdelayedbykey.php
     * @param string $server_key <p>
     * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
     * </p>
     * @param array $keys <p>
     * Array of keys to request.
     * </p>
     * @param bool $with_cas [optional] <p>
     * Whether to request CAS token values also.
     * </p>
     * @param callable $value_cb [optional] <p>
     * The result callback or <b>NULL</b>.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * Use <b>Memcached::getResultCode</b> if necessary.
     */
    public function getDelayedByKey($server_key, array $keys, $with_cas = null, callable $value_cb = null) {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Fetch the next result
     * @link https://php.net/manual/en/memcached.fetch.php
     * @return array|false the next result or <b>FALSE</b> otherwise.
     * The <b>Memcached::getResultCode</b> will return
     * <b>Memcached::RES_END</b> if result set is exhausted.
     */
    public function fetch() {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Fetch all the remaining results
     * @link https://php.net/manual/en/memcached.fetchall.php
     * @return array|false the results or <b>FALSE</b> on failure.
     * Use <b>Memcached::getResultCode</b> if necessary.
     */
    public function fetchAll() {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Store an item
     * @link https://php.net/manual/en/memcached.set.php
     * @param string $key <p>
     * The key under which to store the value.
     * </p>
     * @param mixed $value <p>
     * The value to store.
     * </p>
     * @param int $expiration [optional] <p>
     * The expiration time, defaults to 0. See Expiration Times for more info.
     * </p>
     * @param int $udf_flags [optional]
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * Use <b>Memcached::getResultCode</b> if necessary.
     */
    public function set($key, $value, $expiration = 0, $udf_flags = 0) {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Store an item on a specific server
     * @link https://php.net/manual/en/memcached.setbykey.php
     * @param string $server_key <p>
     * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
     * </p>
     * @param string $key <p>
     * The key under which to store the value.
     * </p>
     * @param mixed $value <p>
     * The value to store.
     * </p>
     * @param int $expiration [optional] <p>
     * The expiration time, defaults to 0. See Expiration Times for more info.
     * </p>
     * @param int $udf_flags [optional]
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * Use <b>Memcached::getResultCode</b> if necessary.
     */
    public function setByKey($server_key, $key, $value, $expiration = 0, $udf_flags = 0) {}

    /**
     * (PECL memcached &gt;= 2.0.0)<br/>
     * Set a new expiration on an item
     * @link https://php.net/manual/en/memcached.touch.php
     * @param string $key <p>
     * The key under which to store the value.
     * </p>
     * @param int $expiration <p>
     * The expiration time, defaults to 0. See Expiration Times for more info.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * Use <b>Memcached::getResultCode</b> if necessary.
     */
    public function touch($key, $expiration = 0) {}

    /**
     * (PECL memcached &gt;= 2.0.0)<br/>
     * Set a new expiration on an item on a specific server
     * @link https://php.net/manual/en/memcached.touchbykey.php
     * @param string $server_key <p>
     * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
     * </p>
     * @param string $key <p>
     * The key under which to store the value.
     * </p>
     * @param int $expiration <p>
     * The expiration time, defaults to 0. See Expiration Times for more info.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * Use <b>Memcached::getResultCode</b> if necessary.
     */
    public function touchByKey($server_key, $key, $expiration) {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Store multiple items
     * @link https://php.net/manual/en/memcached.setmulti.php
     * @param array $items <p>
     * An array of key/value pairs to store on the server.
     * </p>
     * @param int $expiration [optional] <p>
     * The expiration time, defaults to 0. See Expiration Times for more info.
     * </p>
     * @param int $udf_flags [optional]
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * Use <b>Memcached::getResultCode</b> if necessary.
     */
    public function setMulti(array $items, $expiration = 0, $udf_flags = 0) {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Store multiple items on a specific server
     * @link https://php.net/manual/en/memcached.setmultibykey.php
     * @param string $server_key <p>
     * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
     * </p>
     * @param array $items <p>
     * An array of key/value pairs to store on the server.
     * </p>
     * @param int $expiration [optional] <p>
     * The expiration time, defaults to 0. See Expiration Times for more info.
     * </p>
     * @param int $udf_flags [optional]
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * Use <b>Memcached::getResultCode</b> if necessary.
     */
    public function setMultiByKey($server_key, array $items, $expiration = 0, $udf_flags = 0) {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Compare and swap an item
     * @link https://php.net/manual/en/memcached.cas.php
     * @param float $cas_token <p>
     * Unique value associated with the existing item. Generated by memcache.
     * </p>
     * @param string $key <p>
     * The key under which to store the value.
     * </p>
     * @param mixed $value <p>
     * The value to store.
     * </p>
     * @param int $expiration [optional] <p>
     * The expiration time, defaults to 0. See Expiration Times for more info.
     * </p>
     * @param int $udf_flags [optional]
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * The <b>Memcached::getResultCode</b> will return
     * <b>Memcached::RES_DATA_EXISTS</b> if the item you are trying
     * to store has been modified since you last fetched it.
     */
    public function cas($cas_token, $key, $value, $expiration = 0, $udf_flags = 0) {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Compare and swap an item on a specific server
     * @link https://php.net/manual/en/memcached.casbykey.php
     * @param float $cas_token <p>
     * Unique value associated with the existing item. Generated by memcache.
     * </p>
     * @param string $server_key <p>
     * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
     * </p>
     * @param string $key <p>
     * The key under which to store the value.
     * </p>
     * @param mixed $value <p>
     * The value to store.
     * </p>
     * @param int $expiration [optional] <p>
     * The expiration time, defaults to 0. See Expiration Times for more info.
     * </p>
     * @param int $udf_flags [optional]
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * The <b>Memcached::getResultCode</b> will return
     * <b>Memcached::RES_DATA_EXISTS</b> if the item you are trying
     * to store has been modified since you last fetched it.
     */
    public function casByKey($cas_token, $server_key, $key, $value, $expiration = 0, $udf_flags = 0) {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Add an item under a new key
     * @link https://php.net/manual/en/memcached.add.php
     * @param string $key <p>
     * The key under which to store the value.
     * </p>
     * @param mixed $value <p>
     * The value to store.
     * </p>
     * @param int $expiration [optional] <p>
     * The expiration time, defaults to 0. See Expiration Times for more info.
     * </p>
     * @param int $udf_flags [optional]
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * The <b>Memcached::getResultCode</b> will return
     * <b>Memcached::RES_NOTSTORED</b> if the key already exists.
     */
    public function add($key, $value, $expiration = 0, $udf_flags = 0) {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Add an item under a new key on a specific server
     * @link https://php.net/manual/en/memcached.addbykey.php
     * @param string $server_key <p>
     * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
     * </p>
     * @param string $key <p>
     * The key under which to store the value.
     * </p>
     * @param mixed $value <p>
     * The value to store.
     * </p>
     * @param int $expiration [optional] <p>
     * The expiration time, defaults to 0. See Expiration Times for more info.
     * </p>
     * @param int $udf_flags [optional]
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * The <b>Memcached::getResultCode</b> will return
     * <b>Memcached::RES_NOTSTORED</b> if the key already exists.
     */
    public function addByKey($server_key, $key, $value, $expiration = 0, $udf_flags = 0) {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Append data to an existing item
     * @link https://php.net/manual/en/memcached.append.php
     * @param string $key <p>
     * The key under which to store the value.
     * </p>
     * @param string $value <p>
     * The string to append.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * The <b>Memcached::getResultCode</b> will return
     * <b>Memcached::RES_NOTSTORED</b> if the key does not exist.
     */
    public function append($key, $value) {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Append data to an existing item on a specific server
     * @link https://php.net/manual/en/memcached.appendbykey.php
     * @param string $server_key <p>
     * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
     * </p>
     * @param string $key <p>
     * The key under which to store the value.
     * </p>
     * @param string $value <p>
     * The string to append.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * The <b>Memcached::getResultCode</b> will return
     * <b>Memcached::RES_NOTSTORED</b> if the key does not exist.
     */
    public function appendByKey($server_key, $key, $value) {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Prepend data to an existing item
     * @link https://php.net/manual/en/memcached.prepend.php
     * @param string $key <p>
     * The key of the item to prepend the data to.
     * </p>
     * @param string $value <p>
     * The string to prepend.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * The <b>Memcached::getResultCode</b> will return
     * <b>Memcached::RES_NOTSTORED</b> if the key does not exist.
     */
    public function prepend($key, $value) {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Prepend data to an existing item on a specific server
     * @link https://php.net/manual/en/memcached.prependbykey.php
     * @param string $server_key <p>
     * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
     * </p>
     * @param string $key <p>
     * The key of the item to prepend the data to.
     * </p>
     * @param string $value <p>
     * The string to prepend.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * The <b>Memcached::getResultCode</b> will return
     * <b>Memcached::RES_NOTSTORED</b> if the key does not exist.
     */
    public function prependByKey($server_key, $key, $value) {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Replace the item under an existing key
     * @link https://php.net/manual/en/memcached.replace.php
     * @param string $key <p>
     * The key under which to store the value.
     * </p>
     * @param mixed $value <p>
     * The value to store.
     * </p>
     * @param int $expiration [optional] <p>
     * The expiration time, defaults to 0. See Expiration Times for more info.
     * </p>
     * @param int $udf_flags [optional]
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * The <b>Memcached::getResultCode</b> will return
     * <b>Memcached::RES_NOTSTORED</b> if the key does not exist.
     */
    public function replace($key, $value, $expiration = null, $udf_flags = 0) {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Replace the item under an existing key on a specific server
     * @link https://php.net/manual/en/memcached.replacebykey.php
     * @param string $server_key <p>
     * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
     * </p>
     * @param string $key <p>
     * The key under which to store the value.
     * </p>
     * @param mixed $value <p>
     * The value to store.
     * </p>
     * @param int $expiration [optional] <p>
     * The expiration time, defaults to 0. See Expiration Times for more info.
     * </p>
     * @param int $udf_flags [optional]
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * The <b>Memcached::getResultCode</b> will return
     * <b>Memcached::RES_NOTSTORED</b> if the key does not exist.
     */
    public function replaceByKey($server_key, $key, $value, $expiration = null, $udf_flags = 0) {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Delete an item
     * @link https://php.net/manual/en/memcached.delete.php
     * @param string $key <p>
     * The key to be deleted.
     * </p>
     * @param int $time [optional] <p>
     * The amount of time the server will wait to delete the item.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * The <b>Memcached::getResultCode</b> will return
     * <b>Memcached::RES_NOTFOUND</b> if the key does not exist.
     */
    public function delete($key, $time = 0) {}

    /**
     * (PECL memcached &gt;= 2.0.0)<br/>
     * Delete multiple items
     * @link https://php.net/manual/en/memcached.deletemulti.php
     * @param array $keys <p>
     * The keys to be deleted.
     * </p>
     * @param int $time [optional] <p>
     * The amount of time the server will wait to delete the items.
     * </p>
     * @return array Returns array indexed by keys and where values are indicating whether operation succeeded or not.
     * The <b>Memcached::getResultCode</b> will return
     * <b>Memcached::RES_NOTFOUND</b> if the key does not exist.
     */
    public function deleteMulti(array $keys, $time = 0) {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Delete an item from a specific server
     * @link https://php.net/manual/en/memcached.deletebykey.php
     * @param string $server_key <p>
     * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
     * </p>
     * @param string $key <p>
     * The key to be deleted.
     * </p>
     * @param int $time [optional] <p>
     * The amount of time the server will wait to delete the item.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * The <b>Memcached::getResultCode</b> will return
     * <b>Memcached::RES_NOTFOUND</b> if the key does not exist.
     */
    public function deleteByKey($server_key, $key, $time = 0) {}

    /**
     * (PECL memcached &gt;= 2.0.0)<br/>
     * Delete multiple items from a specific server
     * @link https://php.net/manual/en/memcached.deletemultibykey.php
     * @param string $server_key <p>
     * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
     * </p>
     * @param array $keys <p>
     * The keys to be deleted.
     * </p>
     * @param int $time [optional] <p>
     * The amount of time the server will wait to delete the items.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * The <b>Memcached::getResultCode</b> will return
     * <b>Memcached::RES_NOTFOUND</b> if the key does not exist.
     */
    public function deleteMultiByKey($server_key, array $keys, $time = 0) {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Increment numeric item's value
     * @link https://php.net/manual/en/memcached.increment.php
     * @param string $key <p>
     * The key of the item to increment.
     * </p>
     * @param int $offset [optional] <p>
     * The amount by which to increment the item's value.
     * </p>
     * @param int $initial_value [optional] <p>
     * The value to set the item to if it doesn't currently exist.
     * </p>
     * @param int $expiry [optional] <p>
     * The expiry time to set on the item.
     * </p>
     * @return int|false new item's value on success or <b>FALSE</b> on failure.
     */
    public function increment($key, $offset = 1, $initial_value = 0, $expiry = 0) {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Decrement numeric item's value
     * @link https://php.net/manual/en/memcached.decrement.php
     * @param string $key <p>
     * The key of the item to decrement.
     * </p>
     * @param int $offset [optional] <p>
     * The amount by which to decrement the item's value.
     * </p>
     * @param int $initial_value [optional] <p>
     * The value to set the item to if it doesn't currently exist.
     * </p>
     * @param int $expiry [optional] <p>
     * The expiry time to set on the item.
     * </p>
     * @return int|false item's new value on success or <b>FALSE</b> on failure.
     */
    public function decrement($key, $offset = 1, $initial_value = 0, $expiry = 0) {}

    /**
     * (PECL memcached &gt;= 2.0.0)<br/>
     * Increment numeric item's value, stored on a specific server
     * @link https://php.net/manual/en/memcached.incrementbykey.php
     * @param string $server_key <p>
     * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
     * </p>
     * @param string $key <p>
     * The key of the item to increment.
     * </p>
     * @param int $offset [optional] <p>
     * The amount by which to increment the item's value.
     * </p>
     * @param int $initial_value [optional] <p>
     * The value to set the item to if it doesn't currently exist.
     * </p>
     * @param int $expiry [optional] <p>
     * The expiry time to set on the item.
     * </p>
     * @return int|false new item's value on success or <b>FALSE</b> on failure.
     */
    public function incrementByKey($server_key, $key, $offset = 1, $initial_value = 0, $expiry = 0) {}

    /**
     * (PECL memcached &gt;= 2.0.0)<br/>
     * Decrement numeric item's value, stored on a specific server
     * @link https://php.net/manual/en/memcached.decrementbykey.php
     * @param string $server_key <p>
     * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
     * </p>
     * @param string $key <p>
     * The key of the item to decrement.
     * </p>
     * @param int $offset [optional] <p>
     * The amount by which to decrement the item's value.
     * </p>
     * @param int $initial_value [optional] <p>
     * The value to set the item to if it doesn't currently exist.
     * </p>
     * @param int $expiry [optional] <p>
     * The expiry time to set on the item.
     * </p>
     * @return int|false item's new value on success or <b>FALSE</b> on failure.
     */
    public function decrementByKey($server_key, $key, $offset = 1, $initial_value = 0, $expiry = 0) {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Add a server to the server pool
     * @link https://php.net/manual/en/memcached.addserver.php
     * @param string $host <p>
     * The hostname of the memcache server. If the hostname is invalid, data-related
     * operations will set
     * <b>Memcached::RES_HOST_LOOKUP_FAILURE</b> result code.
     * </p>
     * @param int $port <p>
     * The port on which memcache is running. Usually, this is
     * 11211.
     * </p>
     * @param int $weight [optional] <p>
     * The weight of the server relative to the total weight of all the
     * servers in the pool. This controls the probability of the server being
     * selected for operations. This is used only with consistent distribution
     * option and usually corresponds to the amount of memory available to
     * memcache on that server.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function addServer($host, $port, $weight = 0) {}

    /**
     * (PECL memcached &gt;= 0.1.1)<br/>
     * Add multiple servers to the server pool
     * @link https://php.net/manual/en/memcached.addservers.php
     * @param array $servers
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function addServers(array $servers) {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Get the list of the servers in the pool
     * @link https://php.net/manual/en/memcached.getserverlist.php
     * @return array The list of all servers in the server pool.
     */
    public function getServerList() {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Map a key to a server
     * @link https://php.net/manual/en/memcached.getserverbykey.php
     * @param string $server_key <p>
     * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
     * </p>
     * @return array an array containing three keys of host,
     * port, and weight on success or <b>FALSE</b>
     * on failure.
     * Use <b>Memcached::getResultCode</b> if necessary.
     */
    public function getServerByKey($server_key) {}

    /**
     * (PECL memcached &gt;= 2.0.0)<br/>
     * Clears all servers from the server list
     * @link https://php.net/manual/en/memcached.resetserverlist.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function resetServerList() {}

    /**
     * (PECL memcached &gt;= 2.0.0)<br/>
     * Close any open connections
     * @link https://php.net/manual/en/memcached.quit.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function quit() {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Get server pool statistics
     * @link https://php.net/manual/en/memcached.getstats.php
     * @param string $type <p>items, slabs, sizes ...</p>
     * @return array|false Array of server statistics, one entry per server.
     */
    public function getStats($type = null) {}

    /**
     * (PECL memcached &gt;= 0.1.5)<br/>
     * Get server pool version info
     * @link https://php.net/manual/en/memcached.getversion.php
     * @return array Array of server versions, one entry per server.
     */
    public function getVersion() {}

    /**
     * (PECL memcached &gt;= 2.0.0)<br/>
     * Gets the keys stored on all the servers
     * @link https://php.net/manual/en/memcached.getallkeys.php
     * @return array|false the keys stored on all the servers on success or <b>FALSE</b> on failure.
     */
    public function getAllKeys() {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Invalidate all items in the cache
     * @link https://php.net/manual/en/memcached.flush.php
     * @param int $delay [optional] <p>
     * Numer of seconds to wait before invalidating the items.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * Use <b>Memcached::getResultCode</b> if necessary.
     */
    public function flush($delay = 0) {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Retrieve a Memcached option value
     * @link https://php.net/manual/en/memcached.getoption.php
     * @param int $option <p>
     * One of the Memcached::OPT_* constants.
     * </p>
     * @return mixed the value of the requested option, or <b>FALSE</b> on
     * error.
     */
    public function getOption($option) {}

    /**
     * (PECL memcached &gt;= 0.1.0)<br/>
     * Set a Memcached option
     * @link https://php.net/manual/en/memcached.setoption.php
     * @param int $option
     * @param mixed $value
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function setOption($option, $value) {}

    /**
     * (PECL memcached &gt;= 2.0.0)<br/>
     * Set Memcached options
     * @link https://php.net/manual/en/memcached.setoptions.php
     * @param array $options <p>
     * An associative array of options where the key is the option to set and
     * the value is the new value for the option.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function setOptions(array $options) {}

    /**
     * (PECL memcached &gt;= 2.0.0)<br/>
     * Set the credentials to use for authentication
     * @link https://secure.php.net/manual/en/memcached.setsaslauthdata.php
     * @param string $username <p>
     * The username to use for authentication.
     * </p>
     * @param string $password <p>
     * The password to use for authentication.
     * </p>
     * @return void
     */
    public function setSaslAuthData(string $username, string $password) {}

    /**
     * (PECL memcached &gt;= 2.0.0)<br/>
     * Check if a persitent connection to memcache is being used
     * @link https://php.net/manual/en/memcached.ispersistent.php
     * @return bool true if Memcache instance uses a persistent connection, false otherwise.
     */
    public function isPersistent() {}

    /**
     * (PECL memcached &gt;= 2.0.0)<br/>
     * Check if the instance was recently created
     * @link https://php.net/manual/en/memcached.ispristine.php
     * @return bool the true if instance is recently created, false otherwise.
     */
    public function isPristine() {}

    /**
     * (PECL memcached &gt;= 3.2.0)<br/>
     * Check if the given key is valid.
     * @param string $key
     * @return bool
     */
    public function checkKey($key) {}

    /**
     * Flush and send buffered commands
     * @link https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/php_memcached.c
     * @return bool
     */
    public function flushBuffers() {}

    /**
     * Sets AES encryption key (libmemcached 1.0.6 and higher)
     * @link https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/php_memcached.c
     * @param string $key
     * @return bool
     */
    public function setEncodingKey($key) {}

    /**
     * Returns the last disconnected server. Was added in 0.34 according to libmemcached's Changelog
     * @link https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/php_memcached.c
     * @return array|false
     */
    public function getLastDisconnectedServer() {}

    /**
     * Returns the last error errno that occurred
     * @link https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/php_memcached.c
     * @return int
     */
    public function getLastErrorErrno() {}

    /**
     * Returns the last error code that occurred
     * @link https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/php_memcached.c
     * @return int
     */
    public function getLastErrorCode() {}

    /**
     * Returns the last error message that occurred
     * @link https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/php_memcached.c
     * @return string
     */
    public function getLastErrorMessage() {}

    /**
     * Sets the memcached virtual buckets
     * @link https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/php_memcached.c
     * @param array $host_map
     * @param array $forward_map
     * @param int $replicas
     * @return bool
     */
    public function setBucket(array $host_map, array $forward_map, $replicas) {}
}

/**
 * @link https://php.net/manual/en/class.memcachedexception.php
 */
class MemcachedException extends RuntimeException
{
    #[\JetBrains\PhpStorm\Pure]
    public function __construct($errmsg = "", $errcode = 0) {}
}
// End of memcached v.3.1.5
<?php

// Start of iconv v.
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Pure;

/**
 * Convert string to requested character encoding
 * @link https://php.net/manual/en/function.iconv.php
 * @param string $from_encoding <p>
 * The input charset.
 * </p>
 * @param string $to_encoding <p>
 * The output charset.
 * </p>
 * <p>
 * If you append the string //TRANSLIT to
 * <i>out_charset</i> transliteration is activated. This
 * means that when a character can't be represented in the target charset,
 * it can be approximated through one or several similarly looking
 * characters. If you append the string //IGNORE,
 * characters that cannot be represented in the target charset are silently
 * discarded. Otherwise, <i>str</i> is cut from the first
 * illegal character and an <b>E_NOTICE</b> is generated.
 * </p>
 * @param string $string <p>
 * The string to be converted.
 * </p>
 * @return string|false the converted string or <b>FALSE</b> on failure.
 */
#[Pure]
function iconv(string $from_encoding, string $to_encoding, string $string): string|false {}

/**
 * Convert character encoding as output buffer handler
 * @link https://php.net/manual/en/function.ob-iconv-handler.php
 * @param string $contents
 * @param int $status
 * @return string See <b>ob_start</b> for information about this handler
 * return values.
 */
#[Pure]
function ob_iconv_handler(string $contents, int $status): string {}

/**
 * Retrieve internal configuration variables of iconv extension
 * @link https://php.net/manual/en/function.iconv-get-encoding.php
 * @param string $type [optional] <p>
 * The value of the optional <i>type</i> can be:
 * all
 * input_encoding
 * output_encoding
 * internal_encoding
 * </p>
 * @return string|string[]|false the current value of the internal configuration variable if
 * successful or <b>FALSE</b> on failure.
 * <p>
 * If <i>type</i> is omitted or set to "all",
 * <b>iconv_get_encoding</b> returns an array that
 * stores all these variables.
 * </p>
 */
#[Pure]
#[ArrayShape(["input_encoding" => "string", "output_encoding" => "string", "internal_encoding" => "string"])]
function iconv_get_encoding(string $type = "all"): array|string|false {}

/**
 * Set current setting for character encoding conversion
 * @link https://php.net/manual/en/function.iconv-set-encoding.php
 * @param string $type <p>
 * The value of <i>type</i> can be any one of these:
 * input_encoding
 * output_encoding
 * internal_encoding
 * </p>
 * @param string $encoding <p>
 * The character set.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function iconv_set_encoding(string $type, string $encoding): bool {}

/**
 * Returns the character count of string
 * @link https://php.net/manual/en/function.iconv-strlen.php
 * @param string $string <p>
 * The string.
 * </p>
 * @param string|null $encoding <p>
 * If <i>charset</i> parameter is omitted,
 * <i>str</i> is assumed to be encoded in
 * iconv.internal_encoding.
 * </p>
 * @return int|false the character count of <i>str</i>, as an integer. False on error.
 */
#[Pure]
function iconv_strlen(string $string, ?string $encoding = null): int|false {}

/**
 * Cut out part of a string
 * @link https://php.net/manual/en/function.iconv-substr.php
 * @param string $string <p>
 * The original string.
 * </p>
 * @param int $offset <p>
 * If <i>offset</i> is non-negative,
 * <b>iconv_substr</b> cuts the portion out of
 * <i>str</i> beginning at <i>offset</i>'th
 * character, counting from zero.
 * </p>
 * <p>
 * If <i>offset</i> is negative,
 * <b>iconv_substr</b> cuts out the portion beginning
 * at the position, <i>offset</i> characters
 * away from the end of <i>str</i>.
 * </p>
 * @param int|null $length [optional] <p>
 * If <i>length</i> is given and is positive, the return
 * value will contain at most <i>length</i> characters
 * of the portion that begins at <i>offset</i>
 * (depending on the length of <i>string</i>).
 * </p>
 * <p>
 * If negative <i>length</i> is passed,
 * <b>iconv_substr</b> cuts the portion out of
 * <i>str</i> from the <i>offset</i>'th
 * character up to the character that is
 * <i>length</i> characters away from the end of the string.
 * In case <i>offset</i> is also negative, the start position
 * is calculated beforehand according to the rule explained above.
 * </p>
 * @param string|null $encoding <p>
 * If <i>charset</i> parameter is omitted,
 * <i>string</i> are assumed to be encoded in
 * iconv.internal_encoding.
 * </p>
 * <p>
 * Note that <i>offset</i> and <i>length</i>
 * parameters are always deemed to represent offsets that are
 * calculated on the basis of the character set determined by
 * <i>charset</i>, whilst the counterpart
 * <b>substr</b> always takes these for byte offsets.
 * </p>
 * @return string|false the portion of <i>str</i> specified by the
 * <i>offset</i> and <i>length</i> parameters.
 * <p>
 * If <i>str</i> is shorter than <i>offset</i>
 * characters long, <b>FALSE</b> will be returned.
 * </p>
 */
#[Pure]
function iconv_substr(string $string, int $offset, ?int $length, ?string $encoding = null): string|false {}

/**
 * Finds position of first occurrence of a needle within a haystack
 * @link https://php.net/manual/en/function.iconv-strpos.php
 * @param string $haystack <p>
 * The entire string.
 * </p>
 * @param string $needle <p>
 * The searched substring.
 * </p>
 * @param int $offset [optional] <p>
 * The optional <i>offset</i> parameter specifies
 * the position from which the search should be performed.
 * </p>
 * @param string|null $encoding <p>
 * If <i>charset</i> parameter is omitted,
 * <i>string</i> are assumed to be encoded in
 * iconv.internal_encoding.
 * </p>
 * @return int<0,max>|false the numeric position of the first occurrence of
 * <i>needle</i> in <i>haystack</i>.
 * <p>
 * If <i>needle</i> is not found,
 * <b>iconv_strpos</b> will return <b>FALSE</b>.
 * </p>
 */
#[Pure]
function iconv_strpos(string $haystack, string $needle, int $offset = 0, ?string $encoding = null): int|false {}

/**
 * Finds the last occurrence of a needle within a haystack
 * @link https://php.net/manual/en/function.iconv-strrpos.php
 * @param string $haystack <p>
 * The entire string.
 * </p>
 * @param string $needle <p>
 * The searched substring.
 * </p>
 * @param string|null $encoding <p>
 * If <i>charset</i> parameter is omitted,
 * <i>string</i> are assumed to be encoded in
 * iconv.internal_encoding.
 * </p>
 * @return int|false the numeric position of the last occurrence of
 * <i>needle</i> in <i>haystack</i>.
 * <p>
 * If <i>needle</i> is not found,
 * <b>iconv_strrpos</b> will return <b>FALSE</b>.
 * </p>
 */
#[Pure]
function iconv_strrpos(string $haystack, string $needle, ?string $encoding = null): int|false {}

/**
 * Composes a MIME header field
 * @link https://php.net/manual/en/function.iconv-mime-encode.php
 * @param string $field_name <p>
 * The field name.
 * </p>
 * @param string $field_value <p>
 * The field value.
 * </p>
 * @param array $options <p>
 * You can control the behaviour of <b>iconv_mime_encode</b>
 * by specifying an associative array that contains configuration items
 * to the optional third parameter <i>preferences</i>.
 * The items supported by <b>iconv_mime_encode</b> are
 * listed below. Note that item names are treated case-sensitive.
 * <table>
 * Configuration items supported by <b>iconv_mime_encode</b>
 * <tr valign="top">
 * <td>Item</td>
 * <td>Type</td>
 * <td>Description</td>
 * <td>Default value</td>
 * <td>Example</td>
 * </tr>
 * <tr valign="top">
 * <td>scheme</td>
 * <td>string</td>
 * <td>
 * Specifies the method to encode a field value by. The value of
 * this item may be either "B" or "Q", where "B" stands for
 * base64 encoding scheme and "Q" stands for
 * quoted-printable encoding scheme.
 * </td>
 * <td>B</td>
 * <td>B</td>
 * </tr>
 * <tr valign="top">
 * <td>input-charset</td>
 * <td>string</td>
 * <td>
 * Specifies the character set in which the first parameter
 * <i>field_name</i> and the second parameter
 * <i>field_value</i> are presented. If not given,
 * <b>iconv_mime_encode</b> assumes those parameters
 * are presented to it in the
 * iconv.internal_encoding
 * ini setting.
 * </td>
 * <td>
 * iconv.internal_encoding
 * </td>
 * <td>ISO-8859-1</td>
 * </tr>
 * <tr valign="top">
 * <td>output-charset</td>
 * <td>string</td>
 * <td>
 * Specifies the character set to use to compose the
 * MIME header.
 * </td>
 * <td>
 * iconv.internal_encoding
 * </td>
 * <td>UTF-8</td>
 * </tr>
 * <tr valign="top">
 * <td>line-length</td>
 * <td>integer</td>
 * <td>
 * Specifies the maximum length of the header lines. The resulting
 * header is "folded" to a set of multiple lines in case
 * the resulting header field would be longer than the value of this
 * parameter, according to
 * RFC2822 - Internet Message Format.
 * If not given, the length will be limited to 76 characters.
 * </td>
 * <td>76</td>
 * <td>996</td>
 * </tr>
 * <tr valign="top">
 * <td>line-break-chars</td>
 * <td>string</td>
 * <td>
 * Specifies the sequence of characters to append to each line
 * as an end-of-line sign when "folding" is performed on a long header
 * field. If not given, this defaults to "\r\n"
 * (CR LF). Note that
 * this parameter is always treated as an ASCII string regardless
 * of the value of input-charset.
 * </td>
 * <td>\r\n</td>
 * <td>\n</td>
 * </tr>
 * </table>
 * </p>
 * @return string|false an encoded MIME field on success,
 * or <b>FALSE</b> if an error occurs during the encoding.
 */
#[Pure]
function iconv_mime_encode(string $field_name, string $field_value, array $options = []): string|false {}

/**
 * Decodes a MIME header field
 * @link https://php.net/manual/en/function.iconv-mime-decode.php
 * @param string $string <p>
 * The encoded header, as a string.
 * </p>
 * @param int $mode [optional] <p>
 * <i>mode</i> determines the behaviour in the event
 * <b>iconv_mime_decode</b> encounters a malformed
 * MIME header field. You can specify any combination
 * of the following bitmasks.
 * <table>
 * Bitmasks acceptable to <b>iconv_mime_decode</b>
 * <tr valign="top">
 * <td>Value</td>
 * <td>Constant</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>1</td>
 * <td>ICONV_MIME_DECODE_STRICT</td>
 * <td>
 * If set, the given header is decoded in full conformance with the
 * standards defined in RFC2047.
 * This option is disabled by default because there are a lot of
 * broken mail user agents that don't follow the specification and don't
 * produce correct MIME headers.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>2</td>
 * <td>ICONV_MIME_DECODE_CONTINUE_ON_ERROR</td>
 * <td>
 * If set, <b>iconv_mime_decode_headers</b>
 * attempts to ignore any grammatical errors and continue to process
 * a given header.
 * </td>
 * </tr>
 * </table>
 * </p>
 * @param string|null $encoding <p>
 * The optional <i>charset</i> parameter specifies the
 * character set to represent the result by. If omitted,
 * iconv.internal_encoding
 * will be used.
 * </p>
 * @return string|false a decoded MIME field on success,
 * or <b>FALSE</b> if an error occurs during the decoding.
 */
#[Pure]
function iconv_mime_decode(string $string, int $mode = 0, ?string $encoding = null): string|false {}

/**
 * Decodes multiple MIME header fields at once
 * @link https://php.net/manual/en/function.iconv-mime-decode-headers.php
 * @param string $headers <p>
 * The encoded headers, as a string.
 * </p>
 * @param int $mode [optional] <p>
 * <i>mode</i> determines the behaviour in the event
 * <b>iconv_mime_decode_headers</b> encounters a malformed
 * MIME header field. You can specify any combination
 * of the following bitmasks.
 * <br>
 * Bitmasks acceptable to <b>iconv_mime_decode_headers</b></p>
 * <table>
 * <tr valign="top">
 * <td>Value</td>
 * <td>Constant</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>1</td>
 * <td>ICONV_MIME_DECODE_STRICT</td>
 * <td>
 * If set, the given header is decoded in full conformance with the
 * standards defined in RFC2047.
 * This option is disabled by default because there are a lot of
 * broken mail user agents that don't follow the specification and don't
 * produce correct MIME headers.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>2</td>
 * <td>ICONV_MIME_DECODE_CONTINUE_ON_ERROR</td>
 * <td>
 * If set, <b>iconv_mime_decode_headers</b>
 * attempts to ignore any grammatical errors and continue to process
 * a given header.
 * </td>
 * </tr>
 * </table>
 * @param string|null $encoding <p>
 * The optional <i>charset</i> parameter specifies the
 * character set to represent the result by. If omitted,
 * iconv.internal_encoding
 * will be used.
 * </p>
 * @return array|false an associative array that holds a whole set of
 * MIME header fields specified by
 * <i>encoded_headers</i> on success, or <b>FALSE</b>
 * if an error occurs during the decoding.
 * <p>
 * Each key of the return value represents an individual
 * field name and the corresponding element represents a field value.
 * If more than one field of the same name are present,
 * <b>iconv_mime_decode_headers</b> automatically incorporates
 * them into a numerically indexed array in the order of occurrence.
 * </p>
 */
#[Pure]
function iconv_mime_decode_headers(string $headers, int $mode = 0, ?string $encoding = null): array|false {}

/**
 * string
 * @link https://php.net/manual/en/iconv.constants.php
 */
define('ICONV_IMPL', "libiconv");

/**
 * string
 * @link https://php.net/manual/en/iconv.constants.php
 */
define('ICONV_VERSION', 2.17);

/**
 * integer
 * @link https://php.net/manual/en/iconv.constants.php
 */
define('ICONV_MIME_DECODE_STRICT', 1);

/**
 * integer
 * @link https://php.net/manual/en/iconv.constants.php
 */
define('ICONV_MIME_DECODE_CONTINUE_ON_ERROR', 2);

// End of iconv v.
<?php
/**
 * Stubs for PECL/rrd extension
 * Description taken from official documenation
 * @link     https://php.net/manual/en/book.rrd.php
 * @author   Olegs Capligins <shader@dautkom.lv>
 */

// start of PECL/rrd v1.0

/**
 * Gets latest error message
 * @link https://php.net/manual/en/function.rrd-error.php
 * @return string Latest error message.
 * @since PECL rrd >= 0.9.0
 */
function rrd_error() {}

/**
 * Creates rrd database file
 * @link https://php.net/manual/en/function.rrd-create.php
 * @param string $filename <p>
 * Filename for newly created rrd file.
 * </p>
 * @param array $options <p>
 * Options for rrd create - list of strings. See man page of rrd create for whole list of options.
 * </p>
 * @return bool TRUE on success or FALSE on failure.
 * @since PECL rrd >= 0.9.0
 */
function rrd_create($filename, $options) {}

/**
 * Gets data for graph output from RRD database file as array. This function has same result as rrd_graph(), but fetched data are returned as array, no image file is created.
 * @link https://php.net/manual/en/function.rrd-fetch.php
 * @param string $file <p>
 * RRD database file name.
 * </p>
 * @param array $options <p>
 * Array of options for resolution specification.
 * </p>
 * @return array Array with information about retrieved graph data.
 * @since PECL rrd >= 0.9.0
 */
function rrd_fetch($file, $options) {}

/**
 * Gets the timestamp of the first sample from from the specified RRA of the RRD file.
 * @link https://php.net/manual/en/function.rrd-first.php
 * @param string $file <p>
 * RRD database file name.
 * </p>
 * @param int $raaindex <p>
 * The index number of the RRA that is to be examined. Default value is 0.
 * </p>
 * @return int|false Integer as unix timestamp, FALSE if some error occurs.
 * @since PECL rrd >= 0.9.0
 */
function rrd_first($file, $raaindex = 0) {}

/**
 * Creates image from a data.
 * @link https://php.net/manual/en/function.rrd-graph.php
 * @param string $file <p>
 * The filename to output the graph to. This will generally end in either .png, .svg or .eps, depending on the format you want to output.
 * </p>
 * @param array $options <p>
 * Options for generating image. See man page of rrd graph for all possible options. All options (data definitions, variable definitions, etc.) are allowed.
 * </p>
 * @return array|false If image is created successfully an array with information about generated image is returned, FALSE when error occurs.
 * @since PECL rrd >= 0.9.0
 */
function rrd_graph($file, $options) {}

/**
 * Returns information about particular RRD database file.
 * @link https://php.net/manual/en/function.rrd-info.php
 * @param string $file <p>
 * RRD database file name.
 * </p>
 * @return array|false Array with information about requsted RRD file, FALSE when error occurs.
 * @since PECL rrd >= 0.9.0
 */
function rrd_info($file) {}

/**
 * Returns the UNIX timestamp of the most recent update of the RRD database.
 * @link https://php.net/manual/en/function.rrd-last.php
 * @param string $file <p>
 * RRD database file name.
 * </p>
 * @return int Integer as unix timestamp of the most recent data from the RRD database.
 * @since PECL rrd >= 0.9.0
 */
function rrd_last($file) {}

/**
 * Gets array of the UNIX timestamp and the values stored for each date in the most recent update of the RRD database file.
 * @link https://php.net/manual/en/function.rrd-lastupdate.php
 * @param string $file <p>
 * RRD database file name.
 * </p>
 * @return array|false Array of information about last update, FALSE when error occurs.
 * @since PECL rrd >= 0.9.0
 */
function rrd_lastupdate($file) {}

/**
 * Restores the RRD file from the XML dump.
 * @link https://php.net/manual/en/function.rrd-restore.php
 * @param string $xml_file <p>
 * XML filename with the dump of the original RRD database file.
 * </p>
 * @param string $rrd_file <p>
 * Restored RRD database file name.
 * </p>
 * @param array $options <p>
 * Array of options for restoring. See man page for rrd restore.
 * </p>
 * @return bool Returns TRUE on success, FALSE otherwise.
 * @since PECL rrd >= 0.9.0
 */
function rrd_restore($xml_file, $rrd_file, $options = []) {}

/**
 * Change some options in the RRD dabase header file. E.g. renames the source for the data etc.
 * @link https://php.net/manual/en/function.rrd-tune.php
 * @param string $file <p>
 * RRD database file name.
 * </p>
 * @param array $options <p>
 * Options with RRD database file properties which will be changed. See rrd tune man page for details.
 * </p>
 * @return bool Returns TRUE on success, FALSE otherwise.
 * @since PECL rrd >= 0.9.0
 */
function rrd_tune($file, $options) {}

/**
 * Updates the RRD database file. The input data is time interpolated according to the properties of the RRD database file.
 * @link https://php.net/manual/en/function.rrd-update.php
 * @param string $file <p>
 * RRD database file name. This database will be updated.
 * </p>
 * @param array $options <p>
 * Options for updating the RRD database. This is list of strings. See man page of rrd update for whole list of options.
 * </p>
 * @return bool Updates the RRD database file. The input data is time interpolated according to the properties of the RRD database file.
 * @since PECL rrd >= 0.9.0
 */
function rrd_update($file, $options) {}

/**
 * Returns information about underlying rrdtool library.
 * @link https://php.net/manual/en/function.rrd-version.php
 * @return string String with rrdtool version number e.g. "1.4.3".
 * @since PECL rrd >= 1.0.0
 */
function rrd_version() {}

/**
 * Exports the information about RRD database file. This data can be converted to XML file via user space PHP script and then restored back as RRD database file.
 * @link https://php.net/manual/en/function.rrd-xport.php
 * @param array $options <p>
 * Array of options for the export, see rrd xport man page.
 * </p>
 * @return array|false Array with information about RRD database file, FALSE when error occurs.
 * @since PECL rrd >= 0.9.0
 */
function rrd_xport($options) {}

/**
 * Close any outstanding connection to rrd caching daemon <p>
 * This function is automatically called when the whole PHP process is terminated. It depends on used SAPI. For example, it's called automatically at the end of command line script.</p><p>
 * It's up user whether he wants to call this function at the end of every request or otherwise.</p>
 * @link https://php.net/manual/en/function.rrdc-disconnect.php
 * @return void
 * @since PECL rrd >= 1.1.2
 */
function rrd_disconnect() {}

/**
 * Close any outstanding connection to rrd caching daemon.
 * This function is automatically called when the whole PHP process is terminated. It depends on used SAPI.
 * For example, it's called automatically at the end of command line script.
 * It's up user whether he wants to call this function at the end of every request or otherwise.
 */
function rrdc_disconnect() {}

/**
 * Class for creation of RRD database file.
 * @link https://php.net/manual/en/class.rrdcreator.php
 * @since PECL rrd >= 0.9.0
 */
class RRDCreator
{
    /**
     * Adds RRA - archive of data values for each data source. <p>
     * Archive consists of a number of data values or statistics for each of the defined data-sources (DS). Data sources are defined by method RRDCreator::addDataSource(). You need call this method for each requested archive.
     * </p>
     * @link https://php.net/manual/en/rrdcreator.addarchive.php
     * @see RRDCreator::addDataSource()
     * @param string $description <p>
     * Class for creation of RRD database file.
     * </p>
     * @return void
     * @since PECL rrd >= 0.9.0
     */
    public function addArchive($description) {}

    /**
     * Adds data source definition for RRD database.<p>
     * RRD can accept input from several data sources (DS), e.g incoming and outgoing traffic. This method adds data source by description. You need call this method for each data source.
     * </p>
     * @link https://php.net/manual/en/rrdcreator.adddatasource.php
     * @param string $description <p>
     * Definition of data source - DS. This has same format as DS definition in rrd create command. See man page of rrd create for more details.
     * </p>
     * @return void
     * @since PECL rrd >= 0.9.0
     */
    public function addDataSource($description) {}

    /**
     * Creates new RRDCreator instance.
     * @link https://php.net/manual/en/rrdcreator.construct.php
     * @param string $path <p>
     * Path for newly created RRD database file.
     * </p>
     * @param string $startTime <p>
     * Time for the first value in RRD database. Parameter supports all formats which are supported by rrd create call.
     * </p>
     * @param int $step <p>
     * Base interval in seconds with which data will be fed into the RRD database.
     * </p>
     * @since PECL rrd >= 0.9.0
     */
    public function __construct($path, $startTime = '', $step = 0) {}

    /**
     * Saves the RRD database into file, which name is defined by RRDCreator::__construct()
     * @link https://php.net/manual/en/rrdcreator.save.php
     * @see RRDCreator::__construct()
     * @return bool TRUE on success or FALSE on failure.
     * @since PECL rrd >= 0.9.0
     */
    public function save() {}
}

/**
 * Class for exporting data from RRD database to image file.
 * @link https://php.net/manual/en/class.rrdgraph.php
 * @since PECL rrd >= 0.9.0
 */
class RRDGraph
{
    /**
     * Creates new RRDGraph instance. This instance is responsible for rendering the result of RRD database query into image.
     * @link https://php.net/manual/en/rrdgraph.construct.php
     * @param string $path <p>
     * Full path for the newly created image.
     * </p>
     * @since PECL rrd >= 0.9.0
     */
    public function __construct($path) {}

    /**
     * Saves the result of RRD database query into image defined by RRDGraph::__construct().
     * @link https://php.net/manual/en/rrdgraph.save.php
     * @return array|false Array with information about generated image is returned, FALSE if error occurs.
     * @since PECL rrd >= 0.9.0
     */
    public function save() {}

    /**
     * Saves the RRD database query into image and returns the verbose information about generated graph. <p>
     * If "-" is used as image filename, image data are also returned in result array.
     * </p>
     * @link https://php.net/manual/en/rrdgraph.saveverbose.php
     * @return array|false Array with detailed information about generated image is returned, optionally with image data, FALSE if error occurs.
     * @since PECL rrd >= 0.9.0
     */
    public function saveVerbose() {}

    /**
     * Sets the options for rrd graph export
     * @link https://php.net/manual/en/rrdgraph.setoptions.php
     * @param array $options <p>
     * List of options for the image generation from the RRD database file. It can be list of strings or list of strings with keys for better readability. Read the rrd graph man pages for list of available options.
     * </p>
     * @return void
     * @since PECL rrd >= 0.9.0
     */
    public function setOptions($options) {}
}

/**
 * Class for updating RDD database file.
 * @link https://php.net/manual/en/class.rrdupdater.php
 * @since PECL rrd >= 0.9.0
 */
class RRDUpdater
{
    /**
     * Creates new RRDUpdater instance. This instance is responsible for updating the RRD database file.
     * RRDUpdater constructor.
     * @link https://php.net/manual/en/rrdupdater.construct.php
     * @param string $path <p>
     * Filesystem path for RRD database file, which will be updated.
     * </p>
     * @since PECL rrd >= 0.9.0
     */
    public function __construct($path) {}

    /**
     * Update the RRD file defined via RRDUpdater::__construct(). The file is updated with a specific values.
     * @link https://php.net/manual/en/rrdupdater.update.php
     * @param array $values <p>
     * Data for update. Key is data source name.
     * </p>
     * @param string $time <p>
     * Time value for updating the RRD with a particulat data. Default value is current time.
     * </p>
     * @return bool TRUE on success or FALSE on failure.
     * @throws \Exception on error
     * @since PECL rrd >= 0.9.0
     */
    public function update($values, $time = '') {}
}

// end of PECL/rrd v1.0
<?php
/**
 * Stubs for AMQP
 * https://pecl.php.net/package/amqp
 * https://github.com/pdezwart/php-amqp
 */

use JetBrains\PhpStorm\Deprecated;

/**
 * Passing in this constant as a flag will forcefully disable all other flags.
 * Use this if you want to temporarily disable the amqp.auto_ack ini setting.
 */
define('AMQP_NOPARAM', 0);

/**
 * Passing in this constant as a flag to proper methods will forcefully ignore all other flags.
 * Do not send basic.consume request during AMQPQueue::consume(). Use this if you want to run callback on top of previously
 * declared consumers.
 */
define('AMQP_JUST_CONSUME', 1);

/**
 * Durable exchanges and queues will survive a broker restart, complete with all of their data.
 */
define('AMQP_DURABLE', 2);

/**
 * Passive exchanges and queues will not be redeclared, but the broker will throw an error if the exchange or queue does not exist.
 */
define('AMQP_PASSIVE', 4);

/**
 * Valid for queues only, this flag indicates that only one client can be listening to and consuming from this queue.
 */
define('AMQP_EXCLUSIVE', 8);

/**
 * For exchanges, the auto delete flag indicates that the exchange will be deleted as soon as no more queues are bound
 * to it. If no queues were ever bound the exchange, the exchange will never be deleted. For queues, the auto delete
 * flag indicates that the queue will be deleted as soon as there are no more listeners subscribed to it. If no
 * subscription has ever been active, the queue will never be deleted. Note: Exclusive queues will always be
 * automatically deleted with the client disconnects.
 */
define('AMQP_AUTODELETE', 16);

/**
 * Clients are not allowed to make specific queue bindings to exchanges defined with this flag.
 */
define('AMQP_INTERNAL', 32);

/**
 * When passed to the consume method for a clustered environment, do not consume from the local node.
 */
define('AMQP_NOLOCAL', 64);

/**
 * When passed to the {@link AMQPQueue::get()} and {@link AMQPQueue::consume()} methods as a flag,
 * the messages will be immediately marked as acknowledged by the server upon delivery.
 */
define('AMQP_AUTOACK', 128);

/**
 * Passed on queue creation, this flag indicates that the queue should be deleted if it becomes empty.
 */
define('AMQP_IFEMPTY', 256);

/**
 * Passed on queue or exchange creation, this flag indicates that the queue or exchange should be
 * deleted when no clients are connected to the given queue or exchange.
 */
define('AMQP_IFUNUSED', 512);

/**
 * When publishing a message, the message must be routed to a valid queue. If it is not, an error will be returned.
 */
define('AMQP_MANDATORY', 1024);

/**
 * When publishing a message, mark this message for immediate processing by the broker. (High priority message.)
 */
define('AMQP_IMMEDIATE', 2048);

/**
 * If set during a call to {@link AMQPQueue::ack()}, the delivery tag is treated as "up to and including", so that multiple
 * messages can be acknowledged with a single method. If set to zero, the delivery tag refers to a single message.
 * If the AMQP_MULTIPLE flag is set, and the delivery tag is zero, this indicates acknowledgement of all outstanding
 * messages.
 */
define('AMQP_MULTIPLE', 4096);

/**
 * If set during a call to {@link AMQPExchange::bind()}, the server will not respond to the method.The client should not wait
 * for a reply method. If the server could not complete the method it will raise a channel or connection exception.
 */
define('AMQP_NOWAIT', 8192);

/**
 * If set during a call to {@link AMQPQueue::nack()}, the message will be placed back to the queue.
 */
define('AMQP_REQUEUE', 16384);

/**
 * A direct exchange type.
 */
define('AMQP_EX_TYPE_DIRECT', 'direct');

/**
 * A fanout exchange type.
 */
define('AMQP_EX_TYPE_FANOUT', 'fanout');

/**
 * A topic exchange type.
 */
define('AMQP_EX_TYPE_TOPIC', 'topic');

/**
 * A header exchange type.
 */
define('AMQP_EX_TYPE_HEADERS', 'headers');

/**
 * The error number of OS socket timeout.
 */
define('AMQP_OS_SOCKET_TIMEOUT_ERRNO', 536870947);

/**
 * The maximum number of channels that can be open on a connection.
 */
define('PHP_AMQP_MAX_CHANNELS', 256);

/**
 * SASL PLAIN authentication. This is enabled by default in the RabbitMQ server and clients, and is the default for most other clients.
 */
define('AMQP_SASL_METHOD_PLAIN', 0);

/**
 * Authentication happens using an out-of-band mechanism such as x509 certificate peer verification, client IP address range, or similar. Such mechanisms are usually provided by RabbitMQ plugins.
 */
define('AMQP_SASL_METHOD_EXTERNAL', 1);

/**
 * stub class representing AMQPBasicProperties from pecl-amqp
 */
class AMQPBasicProperties
{
    /**
     * @param string $content_type
     * @param string $content_encoding
     * @param array  $headers
     * @param int    $delivery_mode
     * @param int    $priority
     * @param string $correlation_id
     * @param string $reply_to
     * @param string $expiration
     * @param string $message_id
     * @param int    $timestamp
     * @param string $type
     * @param string $user_id
     * @param string $app_id
     * @param string $cluster_id
     */
    public function __construct(
        $content_type = "",
        $content_encoding = "",
        array $headers = [],
        $delivery_mode = 2,
        $priority = 0,
        $correlation_id = "",
        $reply_to = "",
        $expiration = "",
        $message_id = "",
        $timestamp = 0,
        $type = "",
        $user_id = "",
        $app_id = "",
        $cluster_id = ""
    ) {}

    /**
     * Get the message content type.
     *
     * @return string The content type of the message.
     */
    public function getContentType() {}

    /**
     * Get the content encoding of the message.
     *
     * @return string The content encoding of the message.
     */
    public function getContentEncoding() {}

    /**
     * Get the headers of the message.
     *
     * @return array An array of key value pairs associated with the message.
     */
    public function getHeaders() {}

    /**
     * Get the delivery mode of the message.
     *
     * @return int The delivery mode of the message.
     */
    public function getDeliveryMode() {}

    /**
     * Get the priority of the message.
     *
     * @return int The message priority.
     */
    public function getPriority() {}

    /**
     * Get the message correlation id.
     *
     * @return string The correlation id of the message.
     */
    public function getCorrelationId() {}

    /**
     * Get the reply-to address of the message.
     *
     * @return string The contents of the reply to field.
     */
    public function getReplyTo() {}

    /**
     * Get the expiration of the message.
     *
     * @return string The message expiration.
     */
    public function getExpiration() {}

    /**
     * Get the message id of the message.
     *
     * @return string The message id
     */
    public function getMessageId() {}

    /**
     * Get the timestamp of the message.
     *
     * @return string The message timestamp.
     */
    public function getTimestamp() {}

    /**
     * Get the message type.
     *
     * @return string The message type.
     */
    public function getType() {}

    /**
     * Get the message user id.
     *
     * @return string The message user id.
     */
    public function getUserId() {}

    /**
     * Get the application id of the message.
     *
     * @return string The application id of the message.
     */
    public function getAppId() {}

    /**
     * Get the cluster id of the message.
     *
     * @return string The cluster id of the message.
     */
    public function getClusterId() {}
}

/**
 * stub class representing AMQPChannel from pecl-amqp
 */
class AMQPChannel
{
    /**
     * Commit a pending transaction.
     *
     * @throws AMQPChannelException    If no transaction was started prior to
     *                                 calling this method.
     * @throws AMQPConnectionException If the connection to the broker was lost.
     *
     * @return bool TRUE on success or FALSE on failure.
     */
    public function commitTransaction() {}

    /**
     * Create an instance of an AMQPChannel object.
     *
     * @param AMQPConnection $amqp_connection An instance of AMQPConnection
     *                                        with an active connection to a
     *                                        broker.
     *
     * @throws AMQPConnectionException        If the connection to the broker
     *                                        was lost.
     */
    public function __construct(AMQPConnection $amqp_connection) {}

    /**
     * Check the channel connection.
     *
     * @return bool Indicates whether the channel is connected.
     */
    public function isConnected() {}

    /**
     * Closes the channel.
     */
    public function close() {}

    /**
     * Return internal channel ID
     *
     * @return int
     */
    public function getChannelId() {}

    /**
     * Set the Quality Of Service settings for the given channel.
     *
     * Specify the amount of data to prefetch in terms of window size (octets)
     * or number of messages from a queue during a AMQPQueue::consume() or
     * AMQPQueue::get() method call. The client will prefetch data up to size
     * octets or count messages from the server, whichever limit is hit first.
     * Setting either value to 0 will instruct the client to ignore that
     * particular setting. A call to AMQPChannel::qos() will overwrite any
     * values set by calling AMQPChannel::setPrefetchSize() and
     * AMQPChannel::setPrefetchCount(). If the call to either
     * AMQPQueue::consume() or AMQPQueue::get() is done with the AMQP_AUTOACK
     * flag set, the client will not do any prefetching of data, regardless of
     * the QOS settings.
     *
     * @param int $size   The window size, in octets, to prefetch.
     * @param int $count  The number of messages to prefetch.
     * @param bool    $global TRUE for global, FALSE for consumer. FALSE by default.
     *
     * @throws AMQPConnectionException If the connection to the broker was lost.
     *
     * @return bool TRUE on success or FALSE on failure.
     */
    public function qos($size, $count, $global = false) {}

    /**
     * Rollback a transaction.
     *
     * Rollback an existing transaction. AMQPChannel::startTransaction() must
     * be called prior to this.
     *
     * @throws AMQPChannelException    If no transaction was started prior to
     *                                 calling this method.
     * @throws AMQPConnectionException If the connection to the broker was lost.
     *
     * @return bool TRUE on success or FALSE on failure.
     */
    public function rollbackTransaction() {}

    /**
     * Set the number of messages to prefetch from the broker for each consumer.
     *
     * Set the number of messages to prefetch from the broker during a call to
     * AMQPQueue::consume() or AMQPQueue::get().
     *
     * @param int $count The number of messages to prefetch.
     *
     * @throws AMQPConnectionException If the connection to the broker was lost.
     *
     * @return bool TRUE on success or FALSE on failure.
     */
    public function setPrefetchCount($count) {}

    /**
     * Get the number of messages to prefetch from the broker for each consumer.
     *
     * @return int
     */
    public function getPrefetchCount() {}

    /**
     * Set the window size to prefetch from the broker for each consumer.
     *
     * Set the prefetch window size, in octets, during a call to
     * AMQPQueue::consume() or AMQPQueue::get(). Any call to this method will
     * automatically set the prefetch message count to 0, meaning that the
     * prefetch message count setting will be ignored. If the call to either
     * AMQPQueue::consume() or AMQPQueue::get() is done with the AMQP_AUTOACK
     * flag set, this setting will be ignored.
     *
     * @param int $size The window size, in octets, to prefetch.
     *
     * @throws AMQPConnectionException If the connection to the broker was lost.
     *
     * @return bool TRUE on success or FALSE on failure.
     */
    public function setPrefetchSize($size) {}

    /**
     * Get the window size to prefetch from the broker for each consumer.
     *
     * @return int
     */
    public function getPrefetchSize() {}

    /**
     * Set the number of messages to prefetch from the broker across all consumers.
     *
     * Set the number of messages to prefetch from the broker during a call to
     * AMQPQueue::consume() or AMQPQueue::get().
     *
     * @param int $count The number of messages to prefetch.
     *
     * @throws AMQPConnectionException If the connection to the broker was lost.
     *
     * @return bool TRUE on success or FALSE on failure.
     */
    public function setGlobalPrefetchCount($count) {}

    /**
     * Get the number of messages to prefetch from the broker across all consumers.
     *
     * @return int
     */
    public function getGlobalPrefetchCount() {}

    /**
     * Set the window size to prefetch from the broker for all consumers.
     *
     * Set the prefetch window size, in octets, during a call to
     * AMQPQueue::consume() or AMQPQueue::get(). Any call to this method will
     * automatically set the prefetch message count to 0, meaning that the
     * prefetch message count setting will be ignored. If the call to either
     * AMQPQueue::consume() or AMQPQueue::get() is done with the AMQP_AUTOACK
     * flag set, this setting will be ignored.
     *
     * @param int $size The window size, in octets, to prefetch.
     *
     * @throws AMQPConnectionException If the connection to the broker was lost.
     *
     * @return bool TRUE on success or FALSE on failure.
     */
    public function setGlobalPrefetchSize($size) {}

    /**
     * Get the window size to prefetch from the broker for all consumers.
     *
     * @return int
     */
    public function getGlobalPrefetchSize() {}

    /**
     * Start a transaction.
     *
     * This method must be called on the given channel prior to calling
     * AMQPChannel::commitTransaction() or AMQPChannel::rollbackTransaction().
     *
     * @throws AMQPConnectionException If the connection to the broker was lost.
     *
     * @return bool TRUE on success or FALSE on failure.
     */
    public function startTransaction() {}

    /**
     * Get the AMQPConnection object in use
     *
     * @return AMQPConnection
     */
    public function getConnection() {}

    /**
     * Redeliver unacknowledged messages.
     *
     * @param bool $requeue
     */
    public function basicRecover($requeue = true) {}

    /**
     * Set the channel to use publisher acknowledgements. This can only used on a non-transactional channel.
     */
    public function confirmSelect() {}

    /**
     * Set callback to process basic.ack and basic.nac AMQP server methods (applicable when channel in confirm mode).
     *
     * @param callable|null $ack_callback
     * @param callable|null $nack_callback
     *
     * Callback functions with all arguments have the following signature:
     *
     *      function ack_callback(int $delivery_tag, bool $multiple) : bool;
     *      function nack_callback(int $delivery_tag, bool $multiple, bool $requeue) : bool;
     *
     * and should return boolean false when wait loop should be canceled.
     *
     * Note, basic.nack server method will only be delivered if an internal error occurs in the Erlang process
     * responsible for a queue (see https://www.rabbitmq.com/confirms.html for details).
     */
    public function setConfirmCallback(callable $ack_callback = null, callable $nack_callback = null) {}

    /**
     * Wait until all messages published since the last call have been either ack'd or nack'd by the broker.
     *
     * Note, this method also catch all basic.return message from server.
     *
     * @param float $timeout Timeout in seconds. May be fractional.
     *
     * @throws AMQPQueueException If timeout occurs.
     */
    public function waitForConfirm($timeout = 0.0) {}

    /**
     * Set callback to process basic.return AMQP server method
     *
     * @param callable|null $return_callback
     *
     * Callback function with all arguments has the following signature:
     *
     *      function callback(int $reply_code,
     *                        string $reply_text,
     *                        string $exchange,
     *                        string $routing_key,
     *                        AMQPBasicProperties $properties,
     *                        string $body) : bool;
     *
     * and should return boolean false when wait loop should be canceled.
     */
    public function setReturnCallback(callable $return_callback = null) {}

    /**
     * Start wait loop for basic.return AMQP server methods
     *
     * @param float $timeout Timeout in seconds. May be fractional.
     *
     * @throws AMQPQueueException If timeout occurs.
     */
    public function waitForBasicReturn($timeout = 0.0) {}

    /**
     * Return array of current consumers where key is consumer and value is AMQPQueue consumer is running on
     *
     * @return AMQPQueue[]
     */
    public function getConsumers() {}
}

/**
 * stub class representing AMQPChannelException from pecl-amqp
 */
class AMQPChannelException extends AMQPException {}

/**
 * stub class representing AMQPConnection from pecl-amqp
 */
class AMQPConnection
{
    /**
     * Establish a transient connection with the AMQP broker.
     *
     * This method will initiate a connection with the AMQP broker.
     *
     * @throws AMQPConnectionException
     * @return bool TRUE on success or throw an exception on failure.
     */
    public function connect() {}

    /**
     * Create an instance of AMQPConnection.
     *
     * Creates an AMQPConnection instance representing a connection to an AMQP
     * broker. A connection will not be established until
     * AMQPConnection::connect() is called.
     *
     *  $credentials = array(
     *      'host'  => amqp.host The host to connect too. Note: Max 1024 characters.
     *      'port'  => amqp.port Port on the host.
     *      'vhost' => amqp.vhost The virtual host on the host. Note: Max 128 characters.
     *      'login' => amqp.login The login name to use. Note: Max 128 characters.
     *      'password' => amqp.password Password. Note: Max 128 characters.
     *      'read_timeout'  => Timeout in for income activity. Note: 0 or greater seconds. May be fractional.
     *      'write_timeout' => Timeout in for outcome activity. Note: 0 or greater seconds. May be fractional.
     *      'connect_timeout' => Connection timeout. Note: 0 or greater seconds. May be fractional.
     *      'rpc_timeout' => RPC timeout. Note: 0 or greater seconds. May be fractional.
     *
     *      Connection tuning options (see http://www.rabbitmq.com/amqp-0-9-1-reference.html#connection.tune for details):
     *      'channel_max' => Specifies highest channel number that the server permits. 0 means standard extension limit
     *                       (see PHP_AMQP_MAX_CHANNELS constant)
     *      'frame_max'   => The largest frame size that the server proposes for the connection, including frame header
     *                       and end-byte. 0 means standard extension limit (depends on librabbimq default frame size limit)
     *      'heartbeat'   => The delay, in seconds, of the connection heartbeat that the server wants.
     *                       0 means the server does not want a heartbeat. Note, librabbitmq has limited heartbeat support,
     *                       which means heartbeats checked only during blocking calls.
     *
     *      TLS support (see https://www.rabbitmq.com/ssl.html for details):
     *      'cacert' => Path to the CA cert file in PEM format..
     *      'cert'   => Path to the client certificate in PEM foramt.
     *      'key'    => Path to the client key in PEM format.
     *      'verify' => Enable or disable peer verification. If peer verification is enabled then the common name in the
     *                  server certificate must match the server name. Peer verification is enabled by default.
     * )
     *
     * @param array $credentials Optional array of credential information for
     *                           connecting to the AMQP broker.
     */
    public function __construct(array $credentials = []) {}

    /**
     * Closes the transient connection with the AMQP broker.
     *
     * This method will close an open connection with the AMQP broker.
     *
     * @return bool true if connection was successfully closed, false otherwise.
     */
    public function disconnect() {}

    /**
     * Get the configured host.
     *
     * @return string The configured hostname of the broker
     */
    public function getHost() {}

    /**
     * Get the configured login.
     *
     * @return string The configured login as a string.
     */
    public function getLogin() {}

    /**
     * Get the configured password.
     *
     * @return string The configured password as a string.
     */
    public function getPassword() {}

    /**
     * Get the configured port.
     *
     * @return int The configured port as an integer.
     */
    public function getPort() {}

    /**
     * Get the configured vhost.
     *
     * @return string The configured virtual host as a string.
     */
    public function getVhost() {}

    /**
     * Check whether the connection to the AMQP broker is still valid.
     *
     * It does so by checking the return status of the last connect-command.
     *
     * @return bool True if connected, false otherwise.
     */
    public function isConnected() {}

    /**
     * Establish a persistent connection with the AMQP broker.
     *
     * This method will initiate a connection with the AMQP broker
     * or reuse an existing one if present.
     *
     * @throws AMQPConnectionException
     * @return bool TRUE on success or throws an exception on failure.
     */
    public function pconnect() {}

    /**
     * Closes a persistent connection with the AMQP broker.
     *
     * This method will close an open persistent connection with the AMQP
     * broker.
     *
     * @return bool true if connection was found and closed,
     *                 false if no persistent connection with this host,
     *                 port, vhost and login could be found,
     */
    public function pdisconnect() {}

    /**
     * Close any open transient connections and initiate a new one with the AMQP broker.
     *
     * @return bool TRUE on success or FALSE on failure.
     */
    public function reconnect() {}

    /**
     * Close any open persistent connections and initiate a new one with the AMQP broker.
     *
     * @return bool TRUE on success or FALSE on failure.
     */
    public function preconnect() {}

    /**
     * Set the hostname used to connect to the AMQP broker.
     *
     * @param string $host The hostname of the AMQP broker.
     *
     * @throws AMQPConnectionException If host is longer then 1024 characters.
     *
     * @return bool TRUE on success or FALSE on failure.
     */
    public function setHost($host) {}

    /**
     * Set the login string used to connect to the AMQP broker.
     *
     * @param string $login The login string used to authenticate
     *                      with the AMQP broker.
     *
     * @throws AMQPConnectionException If login is longer then 32 characters.
     *
     * @return bool TRUE on success or FALSE on failure.
     */
    public function setLogin($login) {}

    /**
     * Set the password string used to connect to the AMQP broker.
     *
     * @param string $password The password string used to authenticate
     *                         with the AMQP broker.
     *
     * @throws AMQPConnectionException If password is longer then 32characters.
     *
     * @return bool TRUE on success or FALSE on failure.
     */
    public function setPassword($password) {}

    /**
     * Set the port used to connect to the AMQP broker.
     *
     * @param int $port The port used to connect to the AMQP broker.
     *
     * @throws AMQPConnectionException If port is longer not between
     *                                 1 and 65535.
     *
     * @return bool TRUE on success or FALSE on failure.
     */
    public function setPort($port) {}

    /**
     * Sets the virtual host to which to connect on the AMQP broker.
     *
     * @param string $vhost The virtual host to use on the AMQP
     *                      broker.
     *
     * @throws AMQPConnectionException If host is longer then 32 characters.
     *
     * @return bool true on success or false on failure.
     */
    public function setVhost($vhost) {}

    /**
     * Sets the interval of time to wait for income activity from AMQP broker
     *
     * @param float $timeout
     *
     * @throws AMQPConnectionException If timeout is less than 0.
     *
     * @return bool
     */
    #[Deprecated(replacement: "%class%->setReadTimout(%parameter0%)")]
    public function setTimeout($timeout) {}

    /**
     * Get the configured interval of time to wait for income activity
     * from AMQP broker
     *
     * @return float
     */
    #[Deprecated(replacement: '%class%->getReadTimout(%parameter0%)')]
    public function getTimeout() {}

    /**
     * Sets the interval of time to wait for income activity from AMQP broker
     *
     * @param float $timeout
     *
     * @throws AMQPConnectionException If timeout is less than 0.
     *
     * @return bool
     */
    public function setReadTimeout($timeout) {}

    /**
     * Get the configured interval of time to wait for income activity
     * from AMQP broker
     *
     * @return float
     */
    public function getReadTimeout() {}

    /**
     * Sets the interval of time to wait for outcome activity to AMQP broker
     *
     * @param float $timeout
     *
     * @throws AMQPConnectionException If timeout is less than 0.
     *
     * @return bool
     */
    public function setWriteTimeout($timeout) {}

    /**
     * Get the configured interval of time to wait for outcome activity
     * to AMQP broker
     *
     * @return float
     */
    public function getWriteTimeout() {}

    /**
     * Sets the interval of time to wait for RPC activity to AMQP broker
     *
     * @param float $timeout
     *
     * @throws AMQPConnectionException If timeout is less than 0.
     *
     * @return bool
     */
    public function setRpcTimeout($timeout) {}

    /**
     * Get the configured interval of time to wait for RPC activity
     * to AMQP broker
     *
     * @return float
     */
    public function getRpcTimeout() {}

    /**
     * Return last used channel id during current connection session.
     *
     * @return int
     */
    public function getUsedChannels() {}

    /**
     * Get the maximum number of channels the connection can handle.
     *
     * When connection is connected, effective connection value returned, which is normally the same as original
     * correspondent value passed to constructor, otherwise original value passed to constructor returned.
     *
     * @return int
     */
    public function getMaxChannels() {}

    /**
     * Get max supported frame size per connection in bytes.
     *
     * When connection is connected, effective connection value returned, which is normally the same as original
     * correspondent value passed to constructor, otherwise original value passed to constructor returned.
     *
     * @return int
     */
    public function getMaxFrameSize() {}

    /**
     * Get number of seconds between heartbeats of the connection in seconds.
     *
     * When connection is connected, effective connection value returned, which is normally the same as original
     * correspondent value passed to constructor, otherwise original value passed to constructor returned.
     *
     * @return int
     */
    public function getHeartbeatInterval() {}

    /**
     * Whether connection persistent.
     *
     * When connection is not connected, boolean false always returned
     *
     * @return bool
     */
    public function isPersistent() {}

    /**
     * Get path to the CA cert file in PEM format
     *
     * @return string
     */
    public function getCACert() {}

    /**
     * Set path to the CA cert file in PEM format
     *
     * @param string $cacert
     */
    public function setCACert($cacert) {}

    /**
     * Get path to the client certificate in PEM format
     *
     * @return string
     */
    public function getCert() {}

    /**
     * Set path to the client certificate in PEM format
     *
     * @param string $cert
     */
    public function setCert($cert) {}

    /**
     * Get path to the client key in PEM format
     *
     * @return string
     */
    public function getKey() {}

    /**
     * Set path to the client key in PEM format
     *
     * @param string $key
     */
    public function setKey($key) {}

    /**
     * Get whether peer verification enabled or disabled
     *
     * @return bool
     */
    public function getVerify() {}

    /**
     * Enable or disable peer verification
     *
     * @param bool $verify
     */
    public function setVerify($verify) {}

    /**
     * set authentication method
     *
     * @param int $method AMQP_SASL_METHOD_PLAIN | AMQP_SASL_METHOD_EXTERNAL
     */
    public function setSaslMethod($method) {}

    /**
     * Get authentication mechanism configuration
     *
     * @return int AMQP_SASL_METHOD_PLAIN | AMQP_SASL_METHOD_EXTERNAL
     */
    public function getSaslMethod() {}
}

/**
 * stub class representing AMQPConnectionException from pecl-amqp
 */
class AMQPConnectionException extends AMQPException {}

/**
 * stub class representing AMQPDecimal from pecl-amqp
 */
final class AMQPDecimal
{
    public const EXPONENT_MIN = 0;
    public const EXPONENT_MAX = 255;
    public const SIGNIFICAND_MIN = 0;
    public const SIGNIFICAND_MAX = 4294967295;

    /**
     * @param $exponent
     * @param $significand
     *
     * @throws AMQPExchangeValue
     */
    public function __construct($exponent, $significand) {}

    /** @return int */
    public function getExponent() {}

    /** @return int */
    public function getSignificand() {}
}

/**
 * stub class representing AMQPEnvelope from pecl-amqp
 */
class AMQPEnvelope extends AMQPBasicProperties
{
    public function __construct() {}

    /**
     * Get the body of the message.
     *
     * @return string The contents of the message body.
     */
    public function getBody() {}

    /**
     * Get the routing key of the message.
     *
     * @return string The message routing key.
     */
    public function getRoutingKey() {}

    /**
     * Get the consumer tag of the message.
     *
     * @return string The consumer tag of the message.
     */
    public function getConsumerTag() {}

    /**
     * Get the delivery tag of the message.
     *
     * @return int The delivery tag of the message.
     */
    public function getDeliveryTag() {}

    /**
     * Get the exchange name on which the message was published.
     *
     * @return string The exchange name on which the message was published.
     */
    public function getExchangeName() {}

    /**
     * Whether this is a redelivery of the message.
     *
     * Whether this is a redelivery of a message. If this message has been
     * delivered and AMQPEnvelope::nack() was called, the message will be put
     * back on the queue to be redelivered, at which point the message will
     * always return TRUE when this method is called.
     *
     * @return bool TRUE if this is a redelivery, FALSE otherwise.
     */
    public function isRedelivery() {}

    /**
     * Get a specific message header.
     *
     * @param string $header_key Name of the header to get the value from.
     *
     * @return string|false The contents of the specified header or FALSE
     *                        if not set.
     */
    public function getHeader($header_key) {}

    /**
     * Check whether specific message header exists.
     *
     * @param string $header_key Name of the header to check.
     *
     * @return bool
     */
    public function hasHeader($header_key) {}
}

/**
 * stub class representing AMQPEnvelopeException from pecl-amqp
 */
class AMQPEnvelopeException extends AMQPException
{
    /**
     * @var AMQPEnvelope
     */
    public $envelope;
}

/**
 * stub class representing AMQPException from pecl-amqp
 */
class AMQPException extends Exception {}

/**
 * stub class representing AMQPExchange from pecl-amqp
 */
class AMQPExchange
{
    /**
     * Bind to another exchange.
     *
     * Bind an exchange to another exchange using the specified routing key.
     *
     * @param string $exchange_name Name of the exchange to bind.
     * @param string $routing_key   The routing key to use for binding.
     * @param array  $arguments     Additional binding arguments.
     *
     * @throws AMQPExchangeException   On failure.
     * @throws AMQPChannelException    If the channel is not open.
     * @throws AMQPConnectionException If the connection to the broker was lost.
     * @return bool TRUE on success or FALSE on failure.
     */
    public function bind($exchange_name, $routing_key = '', array $arguments = []) {}

    /**
     * Remove binding to another exchange.
     *
     * Remove a routing key binding on an another exchange from the given exchange.
     *
     * @param string $exchange_name Name of the exchange to bind.
     * @param string $routing_key   The routing key to use for binding.
     * @param array  $arguments     Additional binding arguments.
     *
     * @throws AMQPExchangeException   On failure.
     * @throws AMQPChannelException    If the channel is not open.
     * @throws AMQPConnectionException If the connection to the broker was lost.
     * @return bool TRUE on success or FALSE on failure.
     */
    public function unbind($exchange_name, $routing_key = '', array $arguments = []) {}

    /**
     * Create an instance of AMQPExchange.
     *
     * Returns a new instance of an AMQPExchange object, associated with the
     * given AMQPChannel object.
     *
     * @param AMQPChannel $amqp_channel A valid AMQPChannel object, connected
     *                                  to a broker.
     *
     * @throws AMQPExchangeException   When amqp_channel is not connected to
     *                                 a broker.
     * @throws AMQPConnectionException If the connection to the broker was
     *                                 lost.
     */
    public function __construct(AMQPChannel $amqp_channel) {}

    /**
     * Declare a new exchange on the broker.
     *
     * @throws AMQPExchangeException   On failure.
     * @throws AMQPChannelException    If the channel is not open.
     * @throws AMQPConnectionException If the connection to the broker was lost.
     *
     * @return bool TRUE on success or FALSE on failure.
     */
    public function declareExchange() {}

    /**
     * Delete the exchange from the broker.
     *
     * @param string  $exchangeName Optional name of exchange to delete.
     * @param int $flags        Optionally AMQP_IFUNUSED can be specified
     *                              to indicate the exchange should not be
     *                              deleted until no clients are connected to
     *                              it.
     *
     * @throws AMQPExchangeException   On failure.
     * @throws AMQPChannelException    If the channel is not open.
     * @throws AMQPConnectionException If the connection to the broker was lost.
     *
     * @return bool TRUE on success or FALSE on failure.
     */
    public function delete($exchangeName = null, $flags = AMQP_NOPARAM) {}

    /**
     * Get the argument associated with the given key.
     *
     * @param string $key The key to look up.
     *
     * @return string|int|false The string or integer value associated
     *                             with the given key, or FALSE if the key
     *                             is not set.
     */
    public function getArgument($key) {}

    /**
     * Check whether argument associated with the given key exists.
     *
     * @param string $key The key to look up.
     *
     * @return bool
     */
    public function hasArgument($key) {}

    /**
     * Get all arguments set on the given exchange.
     *
     * @return array An array containing all of the set key/value pairs.
     */
    public function getArguments() {}

    /**
     * Get all the flags currently set on the given exchange.
     *
     * @return int An integer bitmask of all the flags currently set on this
     *             exchange object.
     */
    public function getFlags() {}

    /**
     * Get the configured name.
     *
     * @return string The configured name as a string.
     */
    public function getName() {}

    /**
     * Get the configured type.
     *
     * @return string The configured type as a string.
     */
    public function getType() {}

    /**
     * Publish a message to an exchange.
     *
     * Publish a message to the exchange represented by the AMQPExchange object.
     *
     * @param string  $message     The message to publish.
     * @param string  $routing_key The optional routing key to which to
     *                             publish to.
     * @param int $flags       One or more of AMQP_MANDATORY and
     *                             AMQP_IMMEDIATE.
     * @param array   $attributes  One of content_type, content_encoding,
     *                             message_id, user_id, app_id, delivery_mode,
     *                             priority, timestamp, expiration, type
     *                             or reply_to, headers.
     *
     * @throws AMQPExchangeException   On failure.
     * @throws AMQPChannelException    If the channel is not open.
     * @throws AMQPConnectionException If the connection to the broker was lost.
     *
     * @return bool TRUE on success or FALSE on failure.
     */
    public function publish(
        $message,
        $routing_key = null,
        $flags = AMQP_NOPARAM,
        array $attributes = []
    ) {}

    /**
     * Set the value for the given key.
     *
     * @param string         $key   Name of the argument to set.
     * @param string|int $value Value of the argument to set.
     *
     * @return bool TRUE on success or FALSE on failure.
     */
    public function setArgument($key, $value) {}

    /**
     * Set all arguments on the exchange.
     *
     * @param array $arguments An array of key/value pairs of arguments.
     *
     * @return bool TRUE on success or FALSE on failure.
     */
    public function setArguments(array $arguments) {}

    /**
     * Set the flags on an exchange.
     *
     * @param int|null $flags A bitmask of flags. This call currently only
     *                       considers the following flags:
     *                       AMQP_DURABLE, AMQP_PASSIVE
     *                       (and AMQP_DURABLE, if librabbitmq version >= 0.5.3)
     *
     * @return void
     */
    public function setFlags($flags) {}

    /**
     * Set the name of the exchange.
     *
     * @param string $exchange_name The name of the exchange to set as string.
     *
     * @return void
     */
    public function setName($exchange_name) {}

    /**
     * Set the type of the exchange.
     *
     * Set the type of the exchange. This can be any of AMQP_EX_TYPE_DIRECT,
     * AMQP_EX_TYPE_FANOUT, AMQP_EX_TYPE_HEADERS or AMQP_EX_TYPE_TOPIC.
     *
     * @param string $exchange_type The type of exchange as a string.
     *
     * @return void
     */
    public function setType($exchange_type) {}

    /**
     * Get the AMQPChannel object in use
     *
     * @return AMQPChannel
     */
    public function getChannel() {}

    /**
     * Get the AMQPConnection object in use
     *
     * @return AMQPConnection
     */
    public function getConnection() {}
}

/**
 * stub class representing AMQPExchangeException from pecl-amqp
 */
class AMQPExchangeException extends AMQPException {}

/**
 * stub class representing AMQPQueue from pecl-amqp
 */
class AMQPQueue
{
    /**
     * Acknowledge the receipt of a message.
     *
     * This method allows the acknowledgement of a message that is retrieved
     * without the AMQP_AUTOACK flag through AMQPQueue::get() or
     * AMQPQueue::consume()
     *
     * @param int $delivery_tag The message delivery tag of which to
     *                              acknowledge receipt.
     * @param int $flags        The only valid flag that can be passed is
     *                              AMQP_MULTIPLE.
     *
     * @throws AMQPChannelException    If the channel is not open.
     * @throws AMQPConnectionException If the connection to the broker was lost.
     *
     * @return bool
     */
    public function ack($delivery_tag, $flags = AMQP_NOPARAM) {}

    /**
     * Bind the given queue to a routing key on an exchange.
     *
     * @param string $exchange_name Name of the exchange to bind to.
     * @param string $routing_key   Pattern or routing key to bind with.
     * @param array  $arguments     Additional binding arguments.
     *
     * @throws AMQPChannelException    If the channel is not open.
     * @throws AMQPConnectionException If the connection to the broker was lost.
     *
     * @return bool
     */
    public function bind($exchange_name, $routing_key = null, array $arguments = []) {}

    /**
     * Cancel a queue that is already bound to an exchange and routing key.
     *
     * @param string $consumer_tag The consumer tag cancel. If no tag provided,
     *                             or it is empty string, the latest consumer
     *                             tag on this queue will be used and after
     *                             successful request it will set to null.
     *                             If it also empty, no `basic.cancel`
     *                             request will be sent. When consumer_tag give
     *                             and it equals to latest consumer_tag on queue,
     *                             it will be interpreted as latest consumer_tag usage.
     *
     * @throws AMQPChannelException    If the channel is not open.
     * @throws AMQPConnectionException If the connection to the broker was lost.
     *
     * @return bool
     */
    public function cancel($consumer_tag = '') {}

    /**
     * Create an instance of an AMQPQueue object.
     *
     * @param AMQPChannel $amqp_channel The amqp channel to use.
     *
     * @throws AMQPQueueException      When amqp_channel is not connected to a
     *                                 broker.
     * @throws AMQPConnectionException If the connection to the broker was lost.
     */
    public function __construct(AMQPChannel $amqp_channel) {}

    /**
     * Consume messages from a queue.
     *
     * Blocking function that will retrieve the next message from the queue as
     * it becomes available and will pass it off to the callback.
     *
     * @param callable|null $callback    A callback function to which the
     *                              consumed message will be passed. The
     *                              function must accept at a minimum
     *                              one parameter, an AMQPEnvelope object,
     *                              and an optional second parameter
     *                              the AMQPQueue object from which callback
     *                              was invoked. The AMQPQueue::consume() will
     *                              not return the processing thread back to
     *                              the PHP script until the callback
     *                              function returns FALSE.
     *                              If the callback is omitted or null is passed,
     *                              then the messages delivered to this client will
     *                              be made available to the first real callback
     *                              registered. That allows one to have a single
     *                              callback consuming from multiple queues.
     * @param int $flags        A bitmask of any of the flags: AMQP_AUTOACK,
     *                              AMQP_JUST_CONSUME. Note: when AMQP_JUST_CONSUME
     *                              flag used all other flags are ignored and
     *                              $consumerTag parameter has no sense.
     *                              AMQP_JUST_CONSUME flag prevent from sending
     *                              `basic.consume` request and just run $callback
     *                              if it provided. Calling method with empty $callback
     *                              and AMQP_JUST_CONSUME makes no sense.
     * @param string   $consumerTag A string describing this consumer. Used
     *                              for canceling subscriptions with cancel().
     *
     * @throws AMQPChannelException    If the channel is not open.
     * @throws AMQPConnectionException If the connection to the broker was lost.
     * @throws AMQPEnvelopeException   When no queue found for envelope.
     * @throws AMQPQueueException      If timeout occurs or queue is not exists.
     *
     * @return void
     */
    public function consume(
        callable $callback = null,
        $flags = AMQP_NOPARAM,
        $consumerTag = null
    ) {}

    /**
     * Declare a new queue on the broker.
     *
     * @throws AMQPChannelException    If the channel is not open.
     * @throws AMQPConnectionException If the connection to the broker was lost.
     * @throws AMQPQueueException      On failure.
     *
     * @return int the message count.
     */
    public function declareQueue() {}

    /**
     * Delete a queue from the broker.
     *
     * This includes its entire contents of unread or unacknowledged messages.
     *
     * @param int $flags        Optionally AMQP_IFUNUSED can be specified
     *                              to indicate the queue should not be
     *                              deleted until no clients are connected to
     *                              it.
     *
     * @throws AMQPChannelException    If the channel is not open.
     * @throws AMQPConnectionException If the connection to the broker was lost.
     *
     * @return int The number of deleted messages.
     */
    public function delete($flags = AMQP_NOPARAM) {}

    /**
     * Retrieve the next message from the queue.
     *
     * Retrieve the next available message from the queue. If no messages are
     * present in the queue, this function will return FALSE immediately. This
     * is a non blocking alternative to the AMQPQueue::consume() method.
     * Currently, the only supported flag for the flags parameter is
     * AMQP_AUTOACK. If this flag is passed in, then the message returned will
     * automatically be marked as acknowledged by the broker as soon as the
     * frames are sent to the client.
     *
     * @param int $flags A bitmask of supported flags for the
     *                       method call. Currently, the only the
     *                       supported flag is AMQP_AUTOACK. If this
     *                       value is not provided, it will use the
     *                       value of ini-setting amqp.auto_ack.
     *
     * @throws AMQPChannelException    If the channel is not open.
     * @throws AMQPConnectionException If the connection to the broker was lost.
     * @throws AMQPQueueException      If queue is not exist.
     *
     * @return AMQPEnvelope|false
     */
    public function get($flags = AMQP_NOPARAM) {}

    /**
     * Get the argument associated with the given key.
     *
     * @param string $key The key to look up.
     *
     * @return string|int|false The string or integer value associated
     *                             with the given key, or false if the key
     *                             is not set.
     */
    public function getArgument($key) {}

    /**
     * Get all set arguments as an array of key/value pairs.
     *
     * @return array An array containing all of the set key/value pairs.
     */
    public function getArguments() {}

    /**
     * Get all the flags currently set on the given queue.
     *
     * @return int An integer bitmask of all the flags currently set on this
     *             exchange object.
     */
    public function getFlags() {}

    /**
     * Get the configured name.
     *
     * @return string The configured name as a string.
     */
    public function getName() {}

    /**
     * Mark a message as explicitly not acknowledged.
     *
     * Mark the message identified by delivery_tag as explicitly not
     * acknowledged. This method can only be called on messages that have not
     * yet been acknowledged, meaning that messages retrieved with by
     * AMQPQueue::consume() and AMQPQueue::get() and using the AMQP_AUTOACK
     * flag are not eligible. When called, the broker will immediately put the
     * message back onto the queue, instead of waiting until the connection is
     * closed. This method is only supported by the RabbitMQ broker. The
     * behavior of calling this method while connected to any other broker is
     * undefined.
     *
     * @param int $delivery_tag Delivery tag of last message to reject.
     * @param int $flags        AMQP_REQUEUE to requeue the message(s),
     *                              AMQP_MULTIPLE to nack all previous
     *                              unacked messages as well.
     *
     * @throws AMQPChannelException    If the channel is not open.
     * @throws AMQPConnectionException If the connection to the broker was lost.
     *
     * @return bool
     */
    public function nack($delivery_tag, $flags = AMQP_NOPARAM) {}

    /**
     * Mark one message as explicitly not acknowledged.
     *
     * Mark the message identified by delivery_tag as explicitly not
     * acknowledged. This method can only be called on messages that have not
     * yet been acknowledged, meaning that messages retrieved with by
     * AMQPQueue::consume() and AMQPQueue::get() and using the AMQP_AUTOACK
     * flag are not eligible.
     *
     * @param int $delivery_tag Delivery tag of the message to reject.
     * @param int $flags        AMQP_REQUEUE to requeue the message(s).
     *
     * @throws AMQPChannelException    If the channel is not open.
     * @throws AMQPConnectionException If the connection to the broker was lost.
     *
     * @return bool
     */
    public function reject($delivery_tag, $flags = AMQP_NOPARAM) {}

    /**
     * Purge the contents of a queue.
     *
     * @throws AMQPChannelException    If the channel is not open.
     * @throws AMQPConnectionException If the connection to the broker was lost.
     *
     * @return bool
     */
    public function purge() {}

    /**
     * Set a queue argument.
     *
     * @param string $key   The key to set.
     * @param mixed  $value The value to set.
     *
     * @return bool
     */
    public function setArgument($key, $value) {}

    /**
     * Set all arguments on the given queue.
     *
     * All other argument settings will be wiped.
     *
     * @param array $arguments An array of key/value pairs of arguments.
     *
     * @return bool
     */
    public function setArguments(array $arguments) {}

    /**
     * Check whether a queue has specific argument.
     *
     * @param string $key   The key to check.
     *
     * @return bool
     */
    public function hasArgument($key) {}

    /**
     * Set the flags on the queue.
     *
     * @param int $flags A bitmask of flags:
     *                       AMQP_DURABLE, AMQP_PASSIVE,
     *                       AMQP_EXCLUSIVE, AMQP_AUTODELETE.
     *
     * @return bool
     */
    public function setFlags($flags) {}

    /**
     * Set the queue name.
     *
     * @param string $queue_name The name of the queue.
     *
     * @return bool
     */
    public function setName($queue_name) {}

    /**
     * Remove a routing key binding on an exchange from the given queue.
     *
     * @param string $exchange_name The name of the exchange on which the
     *                              queue is bound.
     * @param string $routing_key   The binding routing key used by the
     *                              queue.
     * @param array  $arguments     Additional binding arguments.
     *
     * @throws AMQPChannelException    If the channel is not open.
     * @throws AMQPConnectionException If the connection to the broker was lost.
     *
     * @return bool
     */
    public function unbind($exchange_name, $routing_key = null, array $arguments = []) {}

    /**
     * Get the AMQPChannel object in use
     *
     * @return AMQPChannel
     */
    public function getChannel() {}

    /**
     * Get the AMQPConnection object in use
     *
     * @return AMQPConnection
     */
    public function getConnection() {}

    /**
     * Get latest consumer tag. If no consumer available or the latest on was canceled null will be returned.
     *
     * @return string|null
     */
    public function getConsumerTag() {}
}

/**
 * stub class representing AMQPQueueException from pecl-amqp
 */
class AMQPQueueException extends AMQPException {}

/**
 * stub class representing AMQPTimestamp from pecl-amqp
 */
final class AMQPTimestamp
{
    public const MIN = "0";
    public const MAX = "18446744073709551616";

    /**
     * @param string $timestamp
     *
     * @throws AMQPExchangeValue
     */
    public function __construct($timestamp) {}

    /** @return string */
    public function getTimestamp() {}

    /** @return string */
    public function __toString() {}
}

/**
 * stub class representing AMQPExchangeValue from pecl-amqp
 */
class AMQPExchangeValue extends AMQPException {}
<?php

// Start of Zend Extensions

/**
 * causes a job to fail logically
 * can be used to indicate an error in the script logic (e.g. database connection problem)
 * @param string $error_string the error string to display
 */
function set_job_failed($error_string) {};

/**
 * returns array containing following fields:
 * "license_ok" - whether license allows use of JobQueue
 * "expires" - license expiration date
 */
function jobqueue_license_info() {};

/**
 * Create Java object
 *
 * @return object
 * @param string $class
 */
function java($class) {}

/**
 * Return Java exception object for last exception
 * @return object|false Java Exception object, if there was an exception, false otherwise
 */
function java_last_exception_get() {}

/**
 * Clear last Java exception object record.
 * @return void
 */
function java_last_exception_clear() {}

/**
 * Set case sensitivity for Java calls.
 * @param bool $ignore if set, Java attribute and method names would be resolved disregarding case. NOTE: this does not make any Java functions case insensi
tive, just things like $foo->bar and $foo->bar() would match Bar too.
 * @return void
 */
function java_set_ignore_case($ignore) {}

/**
 * Set encoding for strings received by Java from PHP. Default is UTF-8.
 * @param string $encoding
 * @return array
 */
function java_set_encoding($encoding) {}

/**
 * Control if exceptions are thrown on Java exception. Only for PHP5.
 * @param bool $throw If true, PHP exception is thrown when Java exception happens. If set to false, use java_last_exception_get() to check for exception.
 * @return void
 */
function java_throw_exceptions($throw) {}

/**
 * Reload Jar's that were dynamically loaded
 *
 * @return array
 * @param string $new_jarpath
 */
function java_reload($new_jarpath) {}

/**
 * Add to Java's classpath in runtime
 *
 * @return array
 * @param string $new_classpath
 */
function java_require($new_classpath) {}

/**
 * Shown if loader is enabled
 * @return bool
 */
function zend_loader_enabled() {}

/**
 * Returns true if the current file is a Zend-encoded file.
 * @return bool
 */
function zend_loader_file_encoded() {}

/**
 * Returns license (array with fields) if the current file has a valid license and is encoded, otherwise it returns false.
 * @return array
 */
function zend_loader_file_licensed() {}

/**
 * Returns the name of the file currently being executed.
 * @return string
 */
function zend_loader_current_file() {}

/**
 * Dynamically loads a license for applications encoded with Zend SafeGuard. The Override controls if it will override old licenses for the same product.
 * @param string $license_file
 * @param bool $override [optional]
 * @return bool
 */
function zend_loader_install_license($license_file, $override) {}

/**
 * Obfuscate and return the given function name with the internal obfuscation function.
 * @param string $function_name
 * @return string
 */
function zend_obfuscate_function_name($function_name) {}

/**
 * Obfuscate and return the given class name with the internal obfuscation function.
 * @param string $class_name
 * @return string
 */
function zend_obfuscate_class_name($class_name) {}

/**
 * Returns the current obfuscation level support (set by zend_optimizer.obfuscation_level_support)
 * @return int
 */
function zend_current_obfuscation_level() {}

/**
 * Start runtime-obfuscation support that allows limited mixing of obfuscated and un-obfuscated code.
 * @return void
 */
function zend_runtime_obfuscate() {}

/**
 * Returns array of the host ids. If all_ids is true, then all IDs are returned, otehrwise only IDs considered "primary" are returned.
 * @param bool $all_ids [optional]
 * @return array
 */
function zend_get_id($all_ids = false) {}

/**
 * Returns Optimizer version. Alias: zend_loader_version()
 * @return string
 */
function zend_optimizer_version() {}

// End of Zend Extensions
<?php

// Start of Zend Extensions

class ZendAPI_Queue
{
    public $_jobqueue_url;

    /**
     * Constructor for a job queue connection
     *
     * @param string $queue_url Full address where the queue is in the form host:port
     * @return ZendAPI_Queue
     *
     * @removed 8.0
     */
    public function zendapi_queue($queue_url) {}

    /**
     * Open a connection to a job queue
     *
     * @param string $password For authentication, password must be specified to connect to a queue
     * @param int $application_id Optional, if set, all subsequent calls to job related methods will use this application id (unless explicitly specified otherwise). I.e. When adding new job,
        unless this job already set an application id, the job will be assigned the queue application id
     * @return bool Success
     */
    public function login($password, $application_id = null) {}

    /**
     * Insert a new job to the queue, the Job is passed by reference because
        its new job ID and status will be set in the Job object
     * If the returned job id is 0 it means the job could be added to the queue
     *
     * @param Job $job The Job we want to insert to the queue (by ref.)
     * @return int The inserted job id
     */
    public function addJob($job) {}

    /**
     * Return a Job object that describing a job in the queue
     *
     * @param int $job_id The job id
     * @return Job Object describing a job in the queue
     */
    public function getJob($job_id) {}

    /**
     * Update an existing job in the queue with it's new properties. If job doesn't exists,
        a new job will be added. Job is passed by reference and it's updated from the queue.
     *
     * @param Job $job The Job object, the ID of the given job is the id of the job we try to update.
        If the given Job doesn't have an assigned ID, a new job will be added
     * @return int The id of the updated job
     */
    public function updateJob($job) {}

    /**
     * Remove a job from the queue
     *
     * @param int|int[] $job_id The job id or array of job ids we want to remove from the queue
     * @return bool Success/Failure
     */
    public function removeJob($job_id) {}

    /**
     * Suspend a job in the queue (without removing it)
     *
     * @param int|int[] $job_id The job id or array of job ids we want to suspend
     * @return bool Success/Failure
     */
    public function suspendJob($job_id) {}

    /**
     * Resume a suspended job in the queue
     *
     * @param int|int[] $job_id The job id or array of job ids we want to resume
     * @return bool Success/Failure (if the job wasn't suspended, the function will return false)
     */
    public function resumeJob($job_id) {}

    /**
     * Requeue failed job back to the queue.
     *
     * @param Job $job  job object to re-query
     * @return bool - true or false.
     */
    public function requeueJob($job) {}

    /**
     * returns job statistics
     * @return array with the following:
                         "total_complete_jobs"
                         "total_incomplete_jobs"
                         "average_time_in_queue"  [msec]
                         "average_waiting_time"   [sec]
                         "added_jobs_in_window"
                         "activated_jobs_in_window"
                         "completed_jobs_in_window"
     * moving window size can be set through ini file
     */
    public function getStatistics() {}

    /**
     * Returns whether a script exists in the document root
     * @param string $path relative script path
     * @return bool - TRUE if script exists in the document root FALSE otherwise
     */
    public function isScriptExists($path) {}

    /**
     * Returns whether the queue is suspended
     * @return bool - TRUE if job is suspended FALSE otherwise
     */
    public function isSuspend() {}

    /**
     * Return a list of jobs in the queue according to the options given in the filter_options parameter, doesn't return jobs in "final states" (failed, complete)
     * If application id is set for this queue, only jobs with this application id will be returned
     *
     * @param array $filter_options Array of optional filter options to filter the jobs we want to get
        from the queue. If not set, all jobs will be returned.<br>
     *     Options can be: priority, application_id, name, status, recurring.
     * @param int $max_jobs  Maximum jobs to retrieve. Default is -1, getting all jobs available.
     * @param bool $with_globals_and_output Whether gets the global variables dataand job output.
     *     Default is false.
     * @return array  Jobs that satisfies filter_options.
     */
    public function getJobsInQueue($filter_options = null, $max_jobs = -1, $with_globals_and_output = false) {}

    /**
     * Return the number of jobs in the queue according to the options given in the filter_options parameter
     * @param array $filter_options Array of optional filter options to filter the jobs we want to get from the queue. If not set, all jobs will be counted.<br>
     *     Options can be: priority, application_id, host, name, status, recurring.
     * @return int  Number of jobs that satisfy filter_options.
     */
    public function getNumOfJobsInQueue($filter_options = null) {}

    /**
     * Return all the hosts that jobs were submitted from.
     * @return array
     */
    public function getAllhosts() {}

    /**
     * Return all the application ids exists in queue.
     * @return array
     */
    public function getAllApplicationIDs() {}

    /**
     * Return finished jobs (either failed or successed) between time range allowing paging.
     * Jobs are sorted by job id descending.
     *
     * @param int $status Filter to jobs by status, 1-success, 0-failed either logical or execution.
     * @param int $start_time UNIX timestamp. Get only jobs finished after $start_time.
     * @param int $end_time UNIX timestamp. Get only jobs finished before $end_time.
     * @param int $index Get jobs starting from the $index-th place.
     * @param int $count Get only $count jobs.
     * @param int &$total Pass by reference. Return the total number of jobs statisifed the query criteria.
     *
     * @return array of jobs.
     */
    public function getHistoricJobs($status, $start_time, $end_time, $index, $count, &$total) {}

    /**
     * Suspends queue operation
     * @return bool - TRUE if successful FALSE otherwise
     */
    public function suspendQueue() {}

    /**
     * Resumes queue operation
     * @return bool - TRUE if successful FALSE otherwise
     */
    public function resumeQueue() {}

    /**
     * Return description of the last error occurred in the queue object. After every
     *    method invoked an error string describing the error is store in the queue object.
     * @return string
     */
    public function getLastError() {}

    /**
     * Sets a new maximum time for keeping historic jobs
     * @return bool - TRUE if successful FALSE otherwise
     */
    public function setMaxHistoryTime() {}
}

/**
 * Describing a job in a queue
 * In order to add/modify a job in the queue, a Job class must be created/retrieved and than saved in a queue
 *
 * For simplicity, a job can be added directly to a queue and without creating an instant of a Queue object
 */
class ZendAPI_Job
{
    /**
     * Unique id of the Job in the job queue
     *
     * @var int
     */
    public $_id;

    /**
     * Full path of the script that this job calls when it's processed
     *
     * @var string
     */
    public $_script;

    /**
     * The host that the job was submit from
     *
     * @var string
     */
    public $_host;

    /**
     * A short string describing the job
     *
     * @var string
     */
    public $_name;

    /**
     * The job output after executing
     *
     * @var string
     */
    public $_output;

    /**
     * The status of the job
     * By default, the job status is waiting to being execute.
     * The status is determent by the queue and can not be modify by the user.
     *
     * @var int
     */
    public $_status = JOB_QUEUE_STATUS_WAITING;

    /**
     * The application id of the job
     * If the application id is not set, this job may get an application id automatically from the queue
     * (if the queue was assigned one). By default it is null (which indicates no application id is assigned)
     *
     * @var string
     */
    public $_application_id = null;

    /**
     * The priority of the job, options are the priority constants
     * By default the priority is set to normal (JOB_QUEUE_PRIORITY_NORMAL)
     *
     * @var int
     */
    public $_priority = JOB_QUEUE_PRIORITY_NORMAL;

    /**
     * Array holding all the variables that the user wants the job's script to have when it's called
     * The structure is variable_name => variable_value
        i.e. if the user_variables array is array('my_var' => 8), when the script is called,
        a global variable called $my_var will have the int value of 8
     * By default there are no variables that we want to add to the job's script
     *
     * @var array
     */
    public $_user_variables = [];

    /**
     * Bit mask holding the global variables that the user want the job's script to have when it's called
     * Options are prefixed with "JOB_QUEUE_SAVE_" and may be:
        POST|GET|COOKIE|SESSION|RAW_POST|SERVER|FILES|ENV
     * By default there are no global variables we want to add to the job's script
     * i.e. In order to save the current GET and COOKIE global variables,
        this property should be JOB_QUEUE_SAVE_GET|JOB_QUEUE_SAVE_COOKIE (or the integer 6)
        In that case (of GET and COOKIE), when the job is added, the current $_GET and
        $_COOKIE variables  should be saved, and when the job's script is called,
        those global variables should be populated
     *
     * @var int
     */
    public $_global_variables = 0;

    /**
     * The job may have a dependency (another job that must be performed before this job)
     * This property hold the id of the job that must be performed. if this variable is an array of integers,
        it means that there are several jobs that must be performed before this job
     * By default there are no dependencies
     *
     * @var mixed (int|array)
     */
    public $_predecessor = null;

    /**
     * The time that this job should be performed, this variables is the UNIX timestamp.
     * If set to 0, it means that the job should be performed now (or at least as soon as possible)
     * By default there is no scheduled time, which means we want to perform the job as soon as possible
     *
     * @var int
     */
    public $_scheduled_time = 0;

         /**
          * The job running frequency in seconds. The job should run every _internal seconds
          * This property applys only to recurrent job.
          * By default, its value is 0 e.g. run it only once.
          *
          * @var int
          */
         public $_interval = 0;

     /**
      * UNIX timestamp that it's the last time this job should occurs. If _interval was set, and _end_time
      * was not, then this job will run forever.
      * By default there is no end_time, so recurrent job will run forever. If the job is not recurrent
      * (occurs only once) then the job will run at most once. If end_time has reached and the job was not
      * execute yet, it will not run.
      *
      * @var int
      */
     public $_end_time = null;

     /**
      * A bit that determine whether job can be deleted from history. When set, removeJob will not
      * delete the job from history.
      *
      * @var int
      */
     public $_preserved = 0;

    /**
     * Instantiate a Job object, describe all the information and properties of a job
     *
     * @param string $script relative path (relative to document root supplied in ini file) of the script this job should call when it's executing
     * @return Job
     *
     * @removed 8.0
     */
    public function ZendAPI_Job($script) {}

    /**
     * Add the job the the specified queue (without instantiating a JobQueue object)
     * This function should be used for extreme simplicity of the user when adding a single job,
            when the user want to insert more than one job and/or manipulating other jobs (or job tasks)
            he should create and use the JobQueue object
     * Actually what this function do is to create a new JobQueue, login to it (with the given parameters),
            add this job to it and logout
     *
     * @param string $jobqueue_url Full address of the queue we want to connect to
     * @param string $password For authentication, the queue password
     * @return int|false The added job id or false on failure
     */
    public function addJobToQueue($jobqueue_url, $password) {}

    /**
     * Set a new priority to the job
     *
     * @param int $priority Priority options are constants with the "JOB_QUEUE_PRIORITY_" prefix
     */
    public function setJobPriority($priority) {}

    // All properties SET functions
    public function setJobName($name) {}

    public function setScript($script) {}

    public function setApplicationID($app_id) {}

    public function setUserVariables($vars) {}

    public function setGlobalVariables($vars) {}

    public function setJobDependency($job_id) {}

    public function setScheduledTime($timestamp) {}

    public function setRecurrenceData($interval, $end_time = null) {}

    public function setPreserved($preserved) {}

    /**
     * Get the job properties
     *
     * @return array The same format of job options array as in the Job constructor
     */
    public function getProperties() {}

    /**
     * Get the job output
     *
     * @return mixed An HTML representing the job output
     */
    public function getOutput() {}

    // All properties GET functions
    public function getID() {}

    public function getHost() {}

    public function getScript() {}

    public function getJobPriority() {}

    public function getJobName() {}

    public function getApplicationID() {}

    public function getUserVariables() {}

    public function getGlobalVariables() {}

    public function getJobDependency() {}

    public function getScheduledTime() {}

    public function getInterval() {}

    public function getEndTime() {}

    public function getPreserved() {}

    /**
     * Get the current status of the job
     * If this job was created and not returned from a queue (using the JobQueue::GetJob() function),
     *  the function will return false
     * The status is one of the constants with the "JOB_QUEUE_STATUS_" prefix.
     * E.g. job was performed and failed, job is waiting etc.
     *
     * @return int|false
     */
    public function getJobStatus() {}

     /**
      * Get how much seconds there are until the next time the job will run.
      * If the job is not recurrence or it past its end time, then return 0.
      *
      * @return int
      */
     public function getTimeToNextRepeat() {}

     /**
      * For recurring job get the status of the last execution. For simple job,
      * getLastPerformedStatus is equivalent to getJobStatus.
      * jobs that haven't been executed yet will return STATUS_WAITING
      * @return int
      */
     public function getLastPerformedStatus() {}
}

/**
 * Disable/enable the Code Acceleration functionality at run time.
 * @param bool $status If false, Acceleration is disabled, if true - enabled
 * @return void
 */
function accelerator_set_status($status) {}

/**
 * Disables output caching for currently running scripts.
 * @return void
 */
function output_cache_disable() {}

/**
 * Does not allow the cache to perform compression on the output of the current page.
 * This output will not be compressed, even if the global set tings would normally allow
 * compression on files of this type.
 * @return void
 */
function output_cache_disable_compression() {}

/**
 * Gets the code’s return value from the cache if it is there, if not - run function and cache the value.
 * @param string $key cache key
 * @param string $function PHP expression
 * @param int $lifetime data lifetime in cache (seconds)
 * @return string function's return
 */
function output_cache_fetch($key, $function, $lifetime) {}

/**
 * If they cache for the key exists, output it, otherwise capture expression output, cache and pass it out.
 * @param string $key cache key
 * @param string $function PHP expression
 * @param int $lifetime data lifetime in cache (seconds)
 * @return mixed expression output
 */
function output_cache_output($key, $function, $lifetime) {}

/**
 * Removes all the cache data for the given filename.
 * @param string $filename full script path on local filesystem
 * @return bool true if OK, false if something went wrong
 */
function output_cache_remove($filename) {}

/**
 * Remove cache data for the script with given URL (all dependent data is removed)
 * @param string $url the local url for the script
 * @return bool true if OK
 */
function output_cache_remove_url($url) {}

/**
 * Remove item from PHP API cache by key
 * @param string $key cache key as given to output_cache_get/output_cache_put
 * @return bool true if OK
 */
function output_cache_remove_key($key) {}

/**
 * Puts data in cache according to the assigned key.
 * @param string $key cache key
 * @param mixed $data cached data (must not contain objects or resources)
 * @return bool true if OK
 */
function output_cache_put($key, $data) {}

/**
 * Gets cached data according to the assigned key.
 * @param string $key cache key
 * @param int $lifetime cache validity time (seconds)
 * @return mixed|false cached data if cache exists, false otherwise
 */
function output_cache_get($key, $lifetime) {}

/**
 * If data for assigned key exists, this function outputs it and returns a value of true.
 * If not, it starts capturing the output. To be used in pair with output_cache_stop.
 * @param string $key cache key
 * @param int $lifetime cache validity time (seconds)
 * @return bool true if cached data exists
 */
function output_cache_exists($key, $lifetime) {}

/**
 * If output was captured by output_cache_exists, this function stops the output capture and stores
 * the data under the key that was given to output_cache_exists().
 * @return void
 */
function output_cache_stop() {}

/**
 * Should be called from a custom error handler to pass the error to the monitor.
 * The user function needs to accept two parameters: the error code, and a string describing the error.
 * Then there are two optional parameters that may be supplied: the filename in which the error occurred
 * and the line number  in which the error occurred.
 * @param int $errno
 * @param string $errstr
 * @param string $errfile
 * @param int $errline
 * @return void
 */
function monitor_pass_error($errno, $errstr, $errfile, $errline) {}

/**
 * Limited in the database to 255 chars
 * @param string $hint
 * @return void
 */
function monitor_set_aggregation_hint($hint) {}

/**
 * Creates a custom event with class $class, text $text and possibly severity and other user data
 * @param string $class
 * @param string $text
 * @param int $severe [optional]
 * @param mixed $user_data [optional]
 * @return void
 */
function monitor_custom_event($class, $text, $severe = null, $user_data = null) {}

/**
 * Create an HTTPERROR event
 * @param int $error_code the http error code to be associated with this event
 * @param string $url the URL to be associated with this event
 * @param int $severe [optional] the severety of the event: 0 - not severe, 1 - severe
 * @return void
 */
function monitor_httperror_event($error_code, $url, $severe = null) {}

/**
 * Returns an array containing information about
 * <li>module loading status (and cause of error if module failed to load)
 * <li>module license status (and cause of error if license not valid)
 * @return array
 */
function monitor_license_info() {}

/**
 * Allow you to register a user function as an event handler.When a monitor event is triggerd
 * all the user event handler are called and the return value from the handler is saved in
 * an array keyed by the name the event handler was registered under. The event handlers
 * results array is saved in the event_extra_data table.
 * @param string $event_handler_func The callback function that will be call when the event is triggered, object methods may also be invoked statically using t
his function by passing array($objectname, $methodname) to the function parameter
 * @param string $handler_register_name [optional] The name this function is registered under - if none is supplied, the function will be registered under it's own name
 * @param int $event_type_mask The mask of event types that the handler should be called on by default it's set to MONITOR_EVENT_ALL.
 * @return bool TRUE on success and FALSE if an error occurs.
 */
function register_event_handler($event_handler_func, $handler_register_name, $event_type_mask) {}

/**
 * Allow you to unregister an event handler.
 * @param string $handler_name the name you registered with the handler you now wish to unregister.
 * @return bool TRUE on success and FALSE if no handler we registered under the given name.
 */
function unregister_event_handler($handler_name) {}

/**
 * Send a file using ZDS
 * @param string $filename path to the file
 * @param string $mime_type [optional] MIME type of the file, if omitted, taken from configured MIME types file
 * @param string $custom_headers [optional] user defined headers that will be send instead of regular ZDS headers. few basic essential headers will be send anyway
 * @return void|false FALSE if sending file failed, does not return otherwise
 */
function zend_send_file($filename, $mime_type, $custom_headers) {}

/**
 * Send a buffer using ZDS
 * @param string $buffer the content that will be send
 * @param string $mime_type [optional] MIME type of the buffer, if omitted, taken from configured MIME types file
 * @param string $custom_headers [optional] user defined headers that will be send instead of regular ZDS headers. few basic essential headers will be send anyway
 * @return void|false FALSE if sending file failed, does not return otherwise
 */
function zend_send_buffer($buffer, $mime_type, $custom_headers) {}

class java
{
    /**
     * Create Java object
     *
     * @param string $classname
     * @return java
     *
     * @removed 8.0
     */
    public function java($classname) {}
};

class JavaException
{
    /**
     * Get Java exception that led to this exception
     *
     * @return object
     */
    public function getCause() {}
};
<?php

// Start of Zend Extensions

// Constants for jobs status
define('JOB_QUEUE_STATUS_SUCCESS', 1);             // Job was processed and succeeded
define('JOB_QUEUE_STATUS_WAITING', 2);             // Job is waiting for being processed (was not scheduled)
define('JOB_QUEUE_STATUS_SUSPENDED', 3);           // Job was suspended
define('JOB_QUEUE_STATUS_SCHEDULED', 4);           // Job is scheduled and waiting in queue
define('JOB_QUEUE_STATUS_WAITING_PREDECESSOR', 5); // Job is waiting for it's predecessor to be completed
define('JOB_QUEUE_STATUS_IN_PROCESS', 6);          // Job is in process in Queue
define('JOB_QUEUE_STATUS_EXECUTION_FAILED', 7);    // Job execution failed in the ZendEnabler
define('JOB_QUEUE_STATUS_LOGICALLY_FAILED', 8);    // Job was processed and failed logically either
                                                   // because of job_fail command or script parse or
                                                   // fatal error

// Constants for different priorities of jobs
define('JOB_QUEUE_PRIORITY_LOW', 0);
define('JOB_QUEUE_PRIORITY_NORMAL', 1);
define('JOB_QUEUE_PRIORITY_HIGH', 2);
define('JOB_QUEUE_PRIORITY_URGENT', 3);

// Constants for saving global variables bit mask
define('JOB_QUEUE_SAVE_POST', 1);
define('JOB_QUEUE_SAVE_GET', 2);
define('JOB_QUEUE_SAVE_COOKIE', 4);
define('JOB_QUEUE_SAVE_SESSION', 8);
define('JOB_QUEUE_SAVE_RAW_POST', 16);
define('JOB_QUEUE_SAVE_SERVER', 32);
define('JOB_QUEUE_SAVE_FILES', 64);
define('JOB_QUEUE_SAVE_ENV', 128);

// End of Zend Extensions
<?php

// Start of sysvmsg v.
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;

/**
 * Create or attach to a message queue
 * @link https://php.net/manual/en/function.msg-get-queue.php
 * @param int $key <p>
 * Message queue numeric ID
 * </p>
 * @param int $permissions [optional] <p>
 * Queue permissions. Default to 0666. If the message queue already
 * exists, the <i>perms</i> will be ignored.
 * </p>
 * @return resource|SysvMessageQueue|false a resource handle that can be used to access the System V message queue.
 */
#[LanguageLevelTypeAware(["8.0" => "SysvMessageQueue|false"], default: "resource|false")]
function msg_get_queue(int $key, int $permissions = 0666) {}

/**
 * Send a message to a message queue
 * @link https://php.net/manual/en/function.msg-send.php
 * @param SysvMessageQueue|resource $queue
 * @param int $message_type
 * @param mixed $message
 * @param bool $serialize [optional] <p>
 * The optional <i>serialize</i> controls how the
 * <i>message</i> is sent. <i>serialize</i>
 * defaults to <b>TRUE</b> which means that the <i>message</i> is
 * serialized using the same mechanism as the session module before being
 * sent to the queue. This allows complex arrays and objects to be sent to
 * other PHP scripts, or if you are using the WDDX serializer, to any WDDX
 * compatible client.
 * </p>
 * @param bool $blocking [optional] <p>
 * If the message is too large to fit in the queue, your script will wait
 * until another process reads messages from the queue and frees enough
 * space for your message to be sent.
 * This is called blocking; you can prevent blocking by setting the
 * optional <i>blocking</i> parameter to <b>FALSE</b>, in which
 * case <b>msg_send</b> will immediately return <b>FALSE</b> if the
 * message is too big for the queue, and set the optional
 * <i>errorcode</i> to <b>MSG_EAGAIN</b>,
 * indicating that you should try to send your message again a little
 * later on.
 * </p>
 * @param int &$error_code [optional]
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * <p>
 * Upon successful completion the message queue data structure is updated as
 * follows: <i>msg_lspid</i> is set to the process-ID of the
 * calling process, <i>msg_qnum</i> is incremented by 1 and
 * <i>msg_stime</i> is set to the current time.
 * </p>
 */
function msg_send(#[LanguageLevelTypeAware(["8.0" => "SysvMessageQueue"], default: "resource")] $queue, int $message_type, $message, bool $serialize = true, bool $blocking = true, &$error_code): bool {}

/**
 * Receive a message from a message queue
 * @link https://php.net/manual/en/function.msg-receive.php
 * @param SysvMessageQueue|resource $queue
 * @param int $desired_message_type <p>
 * If <i>desiredmsgtype</i> is 0, the message from the front
 * of the queue is returned. If <i>desiredmsgtype</i> is
 * greater than 0, then the first message of that type is returned.
 * If <i>desiredmsgtype</i> is less than 0, the first
 * message on the queue with the lowest type less than or equal to the
 * absolute value of <i>desiredmsgtype</i> will be read.
 * If no messages match the criteria, your script will wait until a suitable
 * message arrives on the queue. You can prevent the script from blocking
 * by specifying <b>MSG_IPC_NOWAIT</b> in the
 * <i>flags</i> parameter.
 * </p>
 * @param int &$received_message_type <p>
 * The type of the message that was received will be stored in this
 * parameter.
 * </p>
 * @param int $max_message_size <p>
 * The maximum size of message to be accepted is specified by the
 * <i>maxsize</i>; if the message in the queue is larger
 * than this size the function will fail (unless you set
 * <i>flags</i> as described below).
 * </p>
 * @param mixed &$message <p>
 * The received message will be stored in <i>message</i>,
 * unless there were errors receiving the message.
 * </p>
 * @param bool $unserialize [optional] <p>
 * If set to
 * <b>TRUE</b>, the message is treated as though it was serialized using the
 * same mechanism as the session module. The message will be unserialized
 * and then returned to your script. This allows you to easily receive
 * arrays or complex object structures from other PHP scripts, or if you
 * are using the WDDX serializer, from any WDDX compatible source.
 * </p>
 * <p>
 * If <i>unserialize</i> is <b>FALSE</b>, the message will be
 * returned as a binary-safe string.
 * </p>
 * @param int $flags [optional] <p>
 * The optional <i>flags</i> allows you to pass flags to the
 * low-level msgrcv system call. It defaults to 0, but you may specify one
 * or more of the following values (by adding or ORing them together).
 * <table>
 * Flag values for msg_receive
 * <tr valign="top">
 * <td><b>MSG_IPC_NOWAIT</b></td>
 * <td>If there are no messages of the
 * <i>desiredmsgtype</i>, return immediately and do not
 * wait. The function will fail and return an integer value
 * corresponding to <b>MSG_ENOMSG</b>.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>MSG_EXCEPT</b></td>
 * <td>Using this flag in combination with a
 * <i>desiredmsgtype</i> greater than 0 will cause the
 * function to receive the first message that is not equal to
 * <i>desiredmsgtype</i>.</td>
 * </tr>
 * <tr valign="top">
 * <td><b>MSG_NOERROR</b></td>
 * <td>
 * If the message is longer than <i>maxsize</i>,
 * setting this flag will truncate the message to
 * <i>maxsize</i> and will not signal an error.
 * </td>
 * </tr>
 * </table>
 * </p>
 * @param int $error_code [optional] <p>
 * If the function fails, the optional <i>errorcode</i>
 * will be set to the value of the system errno variable.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * <p>
 * Upon successful completion the message queue data structure is updated as
 * follows: msg_lrpid is set to the process-ID of the
 * calling process, msg_qnum is decremented by 1 and
 * msg_rtime is set to the current time.
 * </p>
 */
function msg_receive(#[LanguageLevelTypeAware(["8.0" => "SysvMessageQueue"], default: "resource")] $queue, int $desired_message_type, &$received_message_type, int $max_message_size, mixed &$message, bool $unserialize = true, int $flags = 0, &$error_code): bool {}

/**
 * Destroy a message queue
 * @link https://php.net/manual/en/function.msg-remove-queue.php
 * @param SysvMessageQueue|resource $queue <p>
 * Message queue resource handle
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function msg_remove_queue(#[LanguageLevelTypeAware(["8.0" => "SysvMessageQueue"], default: "resource")] $queue): bool {}

/**
 * Returns information from the message queue data structure
 * @link https://php.net/manual/en/function.msg-stat-queue.php
 * @param SysvMessageQueue|resource $queue <p>
 * Message queue resource handle
 * </p>
 * @return array|false The return value is an array whose keys and values have the following
 * meanings:
 * <table>
 * Array structure for msg_stat_queue
 * <tr valign="top">
 * <td>msg_perm.uid</td>
 * <td>
 * The uid of the owner of the queue.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>msg_perm.gid</td>
 * <td>
 * The gid of the owner of the queue.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>msg_perm.mode</td>
 * <td>
 * The file access mode of the queue.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>msg_stime</td>
 * <td>
 * The time that the last message was sent to the queue.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>msg_rtime</td>
 * <td>
 * The time that the last message was received from the queue.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>msg_ctime</td>
 * <td>
 * The time that the queue was last changed.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>msg_qnum</td>
 * <td>
 * The number of messages waiting to be read from the queue.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>msg_qbytes</td>
 * <td>
 * The maximum number of bytes allowed in one message queue. On
 * Linux, this value may be read and modified via
 * /proc/sys/kernel/msgmnb.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>msg_lspid</td>
 * <td>
 * The pid of the process that sent the last message to the queue.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>msg_lrpid</td>
 * <td>
 * The pid of the process that received the last message from the queue.
 * </td>
 * </tr>
 * </table>
 */
#[ArrayShape([
    "msg_perm.uid" => "int",
    "msg_perm.gid" => "int",
    "msg_perm.mode" => "int",
    "msg_stime" => "int",
    "msg_rtime" => "int",
    "msg_ctime" => "int",
    "msg_qnum" => "int",
    "msg_qbytes" => "int",
    "msg_lspid" => "int",
    "msg_lrpid" => "int",
])]
function msg_stat_queue(#[LanguageLevelTypeAware(["8.0" => "SysvMessageQueue"], default: "resource")] $queue): array|false {}

/**
 * Set information in the message queue data structure
 * @link https://php.net/manual/en/function.msg-set-queue.php
 * @param SysvMessageQueue|resource $queue <p>
 * Message queue resource handle
 * </p>
 * @param array $data <p>
 * You specify the values you require by setting the value of the keys
 * that you require in the <i>data</i> array.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function msg_set_queue(#[LanguageLevelTypeAware(["8.0" => "SysvMessageQueue"], default: "resource")] $queue, array $data): bool {}

/**
 * Check whether a message queue exists
 * @link https://php.net/manual/en/function.msg-queue-exists.php
 * @param int $key <p>
 * Queue key.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function msg_queue_exists(int $key): bool {}

define('MSG_IPC_NOWAIT', 1);
define('MSG_EAGAIN', 11);
define('MSG_ENOMSG', 42);
define('MSG_NOERROR', 2);
define('MSG_EXCEPT', 4);

/**
 * @since 8.0
 */
final class SysvMessageQueue
{
    /**
     * Cannot directly construct SysvMessageQueue, use msg_get_queue() instead
     * @see msg_get_queue()
     */
    private function __construct() {}
}

// End of sysvmsg v.
<?php

// Start of openssl v.
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;

/**
 * Frees a private key
 * @link https://php.net/manual/en/function.openssl-pkey-free.php
 * @param OpenSSLAsymmetricKey|resource $key <p>
 * Resource holding the key.
 * </p>
 * @return void
 */
#[Deprecated(since: '8.0')]
function openssl_pkey_free(#[LanguageLevelTypeAware(["8.0" => "OpenSSLAsymmetricKey"], default: "resource")] $key): void {}

/**
 * Generates a new private key
 * @link https://php.net/manual/en/function.openssl-pkey-new.php
 * @param array|null $options [optional] <p>
 * You can finetune the key generation (such as specifying the number of
 * bits) using <i>configargs</i>. See
 * <b>openssl_csr_new</b> for more information about
 * <i>configargs</i>.
 * </p>
 * @return OpenSSLAsymmetricKey|resource|false a resource identifier for the pkey on success, or false on
 * error.
 */
#[LanguageLevelTypeAware(["8.0" => "OpenSSLAsymmetricKey|false"], default: "resource|false")]
function openssl_pkey_new(?array $options) {}

/**
 * Gets an exportable representation of a key into a string
 * @link https://php.net/manual/en/function.openssl-pkey-export.php
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $key
 * @param string &$output
 * @param string|null $passphrase [optional] <p>
 * The key is optionally protected by <i>passphrase</i>.
 * </p>
 * @param array|null $options [optional] <p>
 * <i>configargs</i> can be used to fine-tune the export
 * process by specifying and/or overriding options for the openssl
 * configuration file. See <b>openssl_csr_new</b> for more
 * information about <i>configargs</i>.
 * </p>
 * @return bool true on success or false on failure.
 */
function openssl_pkey_export(
    #[LanguageLevelTypeAware(['8.0' => 'OpenSSLAsymmetricKey|OpenSSLCertificate|array|string'], default: 'resource|array|string')] $key,
    &$output,
    ?string $passphrase,
    ?array $options
): bool {}

/**
 * Gets an exportable representation of a key into a file
 * @link https://php.net/manual/en/function.openssl-pkey-export-to-file.php
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $key
 * @param string $output_filename <p>
 * Path to the output file.
 * </p>
 * @param string|null $passphrase [optional] <p>
 * The key can be optionally protected by a
 * <i>passphrase</i>.
 * </p>
 * @param array|null $options [optional] <p>
 * <i>configargs</i> can be used to fine-tune the export
 * process by specifying and/or overriding options for the openssl
 * configuration file. See <b>openssl_csr_new</b> for more
 * information about <i>configargs</i>.
 * </p>
 * @return bool true on success or false on failure.
 */
function openssl_pkey_export_to_file(
    #[LanguageLevelTypeAware(['8.0' => 'OpenSSLAsymmetricKey|OpenSSLCertificate|array|string'], default: 'resource|array|string')] $key,
    string $output_filename,
    ?string $passphrase,
    ?array $options
): bool {}

/**
 * Get a private key
 * @link https://php.net/manual/en/function.openssl-pkey-get-private.php
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key
 * <p>
 * <b><em>key</em></b> can be one of the following:
 * <ol>
 * <li>a string having the format
 * <var>file://path/to/file.pem</var>. The named file must
 * contain a PEM encoded certificate/private key (it may contain both).
 * </li>
 * <li>A PEM formatted private key.</li>
 * </ol></p>
 * @param string|null $passphrase <p>
 * The optional parameter <b><em>passphrase</em></b> must be used
 * if the specified key is encrypted (protected by a passphrase).
 * </p>
 * @return OpenSSLAsymmetricKey|resource|false Returns a positive key resource identifier on success, or <b>FALSE</b> on error.
 */
#[LanguageLevelTypeAware(["8.0" => "OpenSSLAsymmetricKey|false"], default: "resource|false")]
function openssl_pkey_get_private(
    #[LanguageLevelTypeAware(['8.0' => 'OpenSSLAsymmetricKey|OpenSSLCertificate|array|string'], default: 'resource|array|string')] $private_key,
    ?string $passphrase = null
) {}

/**
 * Extract public key from certificate and prepare it for use
 * @link https://php.net/manual/en/function.openssl-pkey-get-public.php
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $public_key <p><em><b>certificate</b></em> can be one of the following:
 * <ol>
 * <li>an X.509 certificate resource</li>
 * <li>a string having the format
 * <var>file://path/to/file.pem</var>. The named file must
 * contain a PEM encoded certificate/public key (it may contain both).
 * </li>
 * <li>A PEM formatted public key.</li>
 * </ol></p>
 * @return OpenSSLAsymmetricKey|resource|false a positive key resource identifier on success, or false on error.
 */
#[LanguageLevelTypeAware(["8.0" => "OpenSSLAsymmetricKey|false"], default: "resource|false")]
function openssl_pkey_get_public(#[LanguageLevelTypeAware(['8.0' => 'OpenSSLAsymmetricKey|OpenSSLCertificate|array|string'], default: 'resource|array|string')] $public_key) {}

/**
 * Returns an array with the key details
 * @link https://php.net/manual/en/function.openssl-pkey-get-details.php
 * @param OpenSSLAsymmetricKey|resource $key <p>
 * Resource holding the key.
 * </p>
 * @return array|false an array with the key details in success or false in failure.
 * Returned array has indexes bits (number of bits),
 * key (string representation of the public key) and
 * type (type of the key which is one of
 * <b>OPENSSL_KEYTYPE_RSA</b>,
 * <b>OPENSSL_KEYTYPE_DSA</b>,
 * <b>OPENSSL_KEYTYPE_DH</b>,
 * <b>OPENSSL_KEYTYPE_EC</b> or -1 meaning unknown).
 * </p>
 * <p>
 * Depending on the key type used, additional details may be returned. Note that
 * some elements may not always be available.
 */
#[ArrayShape(["bits" => "int", "key" => "string", "rsa" => "array", "dsa" => "array", "dh" => "array", "type" => "int"])]
function openssl_pkey_get_details(#[LanguageLevelTypeAware(["8.0" => "OpenSSLAsymmetricKey"], default: "resource")] $key): array|false {}

/**
 * Free key resource
 * @link https://php.net/manual/en/function.openssl-free-key.php
 * @param OpenSSLAsymmetricKey|resource $key
 * @return void
 */
#[Deprecated(since: '8.0')]
function openssl_free_key(#[LanguageLevelTypeAware(["8.0" => "OpenSSLAsymmetricKey"], default: "resource")] $key): void {}

/**
 * Alias of <b>openssl_pkey_get_private</b>
 * @link https://php.net/manual/en/function.openssl-get-privatekey.php
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key
 * <p>
 * <b><em>key</em></b> can be one of the following:
 * <ol>
 * <li>a string having the format
 * <var>file://path/to/file.pem</var>. The named file must
 * contain a PEM encoded certificate/private key (it may contain both).
 * </li>
 * <li>A PEM formatted private key.</li>
 * </ol></p>
 * @param string|null $passphrase [optional] <p>
 * The optional parameter <b><em>passphrase</em></b> must be used
 * if the specified key is encrypted (protected by a passphrase).
 * </p>
 * @return OpenSSLAsymmetricKey|resource|false Returns a positive key resource identifier on success, or <b>FALSE</b> on error.
 */
#[LanguageLevelTypeAware(["8.0" => "OpenSSLAsymmetricKey|false"], default: "resource|false")]
function openssl_get_privatekey(
    #[LanguageLevelTypeAware(['8.0' => 'OpenSSLAsymmetricKey|OpenSSLCertificate|array|string'], default: 'resource|array|string')] $private_key,
    ?string $passphrase
) {}

/**
 * Alias of <b>openssl_pkey_get_public</b>
 * @link https://php.net/manual/en/function.openssl-get-publickey.php
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $public_key <p>
 * <em><b>certificate</b></em> can be one of the following:
 * <ol>
 * <li>an X.509 certificate resource</li>
 * <li>a string having the format
 * <var>file://path/to/file.pem</var>. The named file must
 * contain a PEM encoded certificate/public key (it may contain both).
 * </li>
 * <li>A PEM formatted public key.</li>
 * </ol></p>
 * @return OpenSSLAsymmetricKey|false a positive key resource identifier on success, or FALSE on error.
 */
#[LanguageLevelTypeAware(["8.0" => "OpenSSLAsymmetricKey|false"], default: "resource|false")]
function openssl_get_publickey(#[LanguageLevelTypeAware(['8.0' => 'OpenSSLAsymmetricKey|OpenSSLCertificate|array|string'], default: 'resource|array|string')] $public_key) {}

/**
 * Generate a new signed public key and challenge
 * @link https://php.net/manual/en/function.openssl-spki-new.php
 * @param OpenSSLAsymmetricKey|resource $private_key <p>
 * <b>privkey</b> should be set to a private key that was
 * previously generated by {@link https://php.net/en/manual/function.openssl-pkey-new.php openssl_pkey_new()} (or
 * otherwise obtained from the other openssl_pkey family of functions).
 * The corresponding public portion of the key will be used to sign the
 * CSR.
 * </p>
 * @param string $challenge <p>The challenge associated to associate with the SPKAC</p>
 * @param int $digest_algo <p>The digest algorithm. See openssl_get_md_method().</p>
 * @return string|false Returns a signed public key and challenge string or NULL on failure.
 * @since 5.6
 */
function openssl_spki_new(#[LanguageLevelTypeAware(["8.0" => "OpenSSLAsymmetricKey"], default: "resource")] $private_key, string $challenge, int $digest_algo = 2): string|false {}

/**
 * Verifies a signed public key and challenge
 * @link https://php.net/manual/en/function.openssl-spki-verify.php
 * @param string $spki <p>Expects a valid signed public key and challenge</p>
 * @return bool Returns a boolean on success or failure.
 * @since 5.6
 */
function openssl_spki_verify(string $spki): bool {}

/**
 * Exports the challenge associated with a signed public key and challenge
 * @link https://php.net/manual/en/function.openssl-spki-export-challenge.php
 * @param string $spki <p>Expects a valid signed public key and challenge</p>
 * @return string|false Returns the associated challenge string or NULL on failure.
 * @since 5.6
 */
function openssl_spki_export_challenge(string $spki): string|false {}

/**
 * Exports a valid PEM formatted public key signed public key and challenge
 * @link https://php.net/manual/en/function.openssl-spki-export.php
 * @param string $spki <p>Expects a valid signed public key and challenge</p>
 * @return string|false Returns the associated PEM formatted public key or NULL on failure.
 * @since 5.6
 */
function openssl_spki_export(string $spki): string|false {}
/**
 * Parse an X.509 certificate and return a resource identifier for
 * it
 * @link https://php.net/manual/en/function.openssl-x509-read.php
 * @param OpenSSLCertificate|string|resource $certificate
 * @return OpenSSLCertificate|resource|false a resource identifier on success or false on failure.
 */
#[LanguageLevelTypeAware(["8.0" => "OpenSSLCertificate|false"], default: "resource|false")]
function openssl_x509_read(#[LanguageLevelTypeAware(["8.0" => "OpenSSLCertificate|string"], default: "resource|string")] $certificate) {}

/**
 * @param string $certificate
 * @param string $digest_algo [optional] hash method
 * @param bool $binary [optional]
 * @return string|false <b>FALSE</b> on failure
 * @since 5.6
 */
function openssl_x509_fingerprint(#[LanguageLevelTypeAware(["8.0" => "OpenSSLCertificate|string"], default: "resource|string")] $certificate, string $digest_algo = 'sha1', bool $binary = false): string|false {}
/**
 * Free certificate resource
 * @link https://php.net/manual/en/function.openssl-x509-free.php
 * @param OpenSSLCertificate|resource|string $certificate
 * @return void
 */
#[Deprecated(since: '8.0')]
function openssl_x509_free(#[LanguageLevelTypeAware(["8.0" => "OpenSSLCertificate"], default: "resource|string")] $certificate): void {}

/**
 * Parse an X509 certificate and return the information as an array
 * @link https://php.net/manual/en/function.openssl-x509-parse.php
 * @param OpenSSLCertificate|string|resource $certificate
 * @param bool $short_names [optional] <p>
 * <i>shortnames</i> controls how the data is indexed in the
 * array - if <i>shortnames</i> is true (the default) then
 * fields will be indexed with the short name form, otherwise, the long name
 * form will be used - e.g.: CN is the shortname form of commonName.
 * </p>
 * @return array|false The structure of the returned data is (deliberately) not
 * yet documented, as it is still subject to change.
 */
#[ArrayShape([
    'name' => 'string',
    'subject' => 'string',
    'hash' => 'string',
    'issuer' => 'string',
    'version' => 'int',
    'serialNumber' => 'string',
    'serialNumberHex' => 'string',
    'validFrom' => 'string',
    'validTo' => 'string',
    'validFrom_time_t' => 'int',
    'validTo_time_t' => 'int',
    'alias' => 'string',
    'signatureTypeSN' => 'string',
    'signatureTypeLN' => 'string',
    'signatureTypeNID' => 'int',
    'purposes' => 'array',
    'extensions' => 'array'
])]
function openssl_x509_parse(
    #[LanguageLevelTypeAware(["8.0" => "OpenSSLCertificate|string"], default: "resource|string")] $certificate,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.0')] bool $shortname,
    #[PhpStormStubsElementAvailable(from: '7.1')] bool $short_names = true
): array|false {}

/**
 * Verifies if a certificate can be used for a particular purpose
 * @link https://php.net/manual/en/function.openssl-x509-checkpurpose.php
 * @param OpenSSLCertificate|string|resource $certificate <p>
 * The examined certificate.
 * </p>
 * @param int $purpose <p>
 * <table>
 * <b>openssl_x509_checkpurpose</b> purposes
 * <tr valign="top">
 * <td>Constant</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>X509_PURPOSE_SSL_CLIENT</td>
 * <td>Can the certificate be used for the client side of an SSL
 * connection?</td>
 * </tr>
 * <tr valign="top">
 * <td>X509_PURPOSE_SSL_SERVER</td>
 * <td>Can the certificate be used for the server side of an SSL
 * connection?</td>
 * </tr>
 * <tr valign="top">
 * <td>X509_PURPOSE_NS_SSL_SERVER</td>
 * <td>Can the cert be used for Netscape SSL server?</td>
 * </tr>
 * <tr valign="top">
 * <td>X509_PURPOSE_SMIME_SIGN</td>
 * <td>Can the cert be used to sign S/MIME email?</td>
 * </tr>
 * <tr valign="top">
 * <td>X509_PURPOSE_SMIME_ENCRYPT</td>
 * <td>Can the cert be used to encrypt S/MIME email?</td>
 * </tr>
 * <tr valign="top">
 * <td>X509_PURPOSE_CRL_SIGN</td>
 * <td>Can the cert be used to sign a certificate revocation list
 * (CRL)?</td>
 * </tr>
 * <tr valign="top">
 * <td>X509_PURPOSE_ANY</td>
 * <td>Can the cert be used for Any/All purposes?</td>
 * </tr>
 * </table>
 * These options are not bitfields - you may specify one only!
 * </p>
 * @param array $ca_info <p>
 * <i>cainfo</i> should be an array of trusted CA files/dirs
 * as described in Certificate
 * Verification.
 * </p>
 * @param string|null $untrusted_certificates_file [optional] <p>
 * If specified, this should be the name of a PEM encoded file holding
 * certificates that can be used to help verify the certificate, although
 * no trust is placed in the certificates that come from that file.
 * </p>
 * @return int|bool true if the certificate can be used for the intended purpose,
 * false if it cannot, or -1 on error.
 */
function openssl_x509_checkpurpose(
    #[LanguageLevelTypeAware(["8.0" => "OpenSSLCertificate|string"], default: "resource|string")] $certificate,
    int $purpose,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.0')] array $ca_info,
    #[PhpStormStubsElementAvailable(from: '7.1')] array $ca_info = [],
    ?string $untrusted_certificates_file
): int|bool {}

/**
 * Checks if a private key corresponds to a certificate
 * @link https://php.net/manual/en/function.openssl-x509-check-private-key.php
 * @param OpenSSLCertificate|string|resource $certificate <p>
 * The certificate.
 * </p>
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key <p>
 * The private key.
 * </p>
 * @return bool true if <i>key</i> is the private key that
 * corresponds to <i>cert</i>, or false otherwise.
 */
function openssl_x509_check_private_key(
    #[LanguageLevelTypeAware(["8.0" => "OpenSSLCertificate|string"], default: "resource|string")] $certificate,
    #[LanguageLevelTypeAware(['8.0' => 'OpenSSLAsymmetricKey|OpenSSLCertificate|array|string'], default: 'resource|array|string')] $private_key
): bool {}

/**
 * Exports a certificate as a string
 * @link https://php.net/manual/en/function.openssl-x509-export.php
 * @param OpenSSLCertificate|string|resource $certificate
 * @param string &$output <p>
 * On success, this will hold the PEM.
 * </p>
 * @param bool $no_text [optional]
 * @return bool true on success or false on failure.
 */
function openssl_x509_export(#[LanguageLevelTypeAware(["8.0" => "OpenSSLCertificate|string"], default: "resource|string")] $certificate, &$output, bool $no_text = true): bool {}

/**
 * Exports a certificate to file
 * @link https://php.net/manual/en/function.openssl-x509-export-to-file.php
 * @param OpenSSLCertificate|string|resource $certificate
 * @param string $output_filename <p>
 * Path to the output file.
 * </p>
 * @param bool $no_text [optional]
 * @return bool true on success or false on failure.
 */
function openssl_x509_export_to_file(#[LanguageLevelTypeAware(["8.0" => "OpenSSLCertificate|string"], default: "resource|string")] $certificate, string $output_filename, bool $no_text = true): bool {}

/**
 * Verifies digital signature of x509 certificate against a public key
 * @link https://www.php.net/manual/en/function.openssl-x509-verify.php
 * @param OpenSSLCertificate|string|resource $certificate
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $public_key
 * @return int Returns 1 if the signature is correct, 0 if it is incorrect, and -1 on error.
 * @since 7.4
 */
function openssl_x509_verify(
    #[LanguageLevelTypeAware(["8.0" => "OpenSSLCertificate|string"], default: "resource|string")] $certificate,
    #[LanguageLevelTypeAware(['8.0' => 'OpenSSLAsymmetricKey|OpenSSLCertificate|array|string'], default: 'resource|array|string')] $public_key
): int {}

/**
 * Exports a PKCS#12 Compatible Certificate Store File to variable.
 * @link https://php.net/manual/en/function.openssl-pkcs12-export.php
 * @param OpenSSLCertificate|string|resource $certificate
 * @param string &$output <p>
 * On success, this will hold the PKCS#12.
 * </p>
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key <p>
 * Private key component of PKCS#12 file.
 * </p>
 * @param string $passphrase <p>
 * Encryption password for unlocking the PKCS#12 file.
 * </p>
 * @param array $options
 * @return bool true on success or false on failure.
 * @since 5.2.2
 */
function openssl_pkcs12_export(
    #[LanguageLevelTypeAware(["8.0" => "OpenSSLCertificate|string"], default: "resource|string")] $certificate,
    &$output,
    #[LanguageLevelTypeAware(['8.0' => 'OpenSSLAsymmetricKey|OpenSSLCertificate|array|string'], default: 'resource|array|string')] $private_key,
    string $passphrase,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.0')] $args,
    #[PhpStormStubsElementAvailable(from: '7.1')] array $options = []
): bool {}

/**
 * Exports a PKCS#12 Compatible Certificate Store File
 * @link https://php.net/manual/en/function.openssl-pkcs12-export-to-file.php
 * @param OpenSSLCertificate|string|resource $certificate
 * @param string $output_filename <p>
 * Path to the output file.
 * </p>
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key <p>
 * Private key component of PKCS#12 file.
 * </p>
 * @param string $passphrase <p>
 * Encryption password for unlocking the PKCS#12 file.
 * </p>
 * @param array $options
 * @return bool true on success or false on failure.
 * @since 5.2.2
 */
function openssl_pkcs12_export_to_file(#[LanguageLevelTypeAware(["8.0" => "OpenSSLCertificate|string"], default: "resource|string")] $certificate, string $output_filename, $private_key, string $passphrase, array $options = []): bool {}

/**
 * Parse a PKCS#12 Certificate Store into an array
 * @link https://php.net/manual/en/function.openssl-pkcs12-read.php
 * @param string $pkcs12
 * @param array &$certificates <p>
 * On success, this will hold the Certificate Store Data.
 * </p>
 * @param string $passphrase <p>
 * Encryption password for unlocking the PKCS#12 file.
 * </p>
 * @return bool true on success or false on failure.
 * @since 5.2.2
 */
function openssl_pkcs12_read(string $pkcs12, &$certificates, string $passphrase): bool {}

/**
 * Generates a CSR
 * @link https://php.net/manual/en/function.openssl-csr-new.php
 * @param array $distinguished_names <p>
 * The Distinguished Name to be used in the certificate.
 * </p>
 * @param OpenSSLAsymmetricKey &$private_key <p>
 * <i>privkey</i> should be set to a private key that was
 * previously generated by <b>openssl_pkey_new</b> (or
 * otherwise obtained from the other openssl_pkey family of functions).
 * The corresponding public portion of the key will be used to sign the
 * CSR.
 * </p>
 * @param array|null $options [optional] <p>
 * By default, the information in your system openssl.conf
 * is used to initialize the request; you can specify a configuration file
 * section by setting the config_section_section key of
 * <i>configargs</i>. You can also specify an alternative
 * openssl configuration file by setting the value of the
 * config key to the path of the file you want to use.
 * The following keys, if present in <i>configargs</i>
 * behave as their equivalents in the openssl.conf, as
 * listed in the table below.
 * <table>
 * Configuration overrides
 * <tr valign="top">
 * <td><i>configargs</i> key</td>
 * <td>type</td>
 * <td>openssl.conf equivalent</td>
 * <td>description</td>
 * </tr>
 * <tr valign="top">
 * <td>digest_alg</td>
 * <td>string</td>
 * <td>default_md</td>
 * <td>Selects which digest method to use</td>
 * </tr>
 * <tr valign="top">
 * <td>x509_extensions</td>
 * <td>string</td>
 * <td>x509_extensions</td>
 * <td>Selects which extensions should be used when creating an x509
 * certificate</td>
 * </tr>
 * <tr valign="top">
 * <td>req_extensions</td>
 * <td>string</td>
 * <td>req_extensions</td>
 * <td>Selects which extensions should be used when creating a CSR</td>
 * </tr>
 * <tr valign="top">
 * <td>private_key_bits</td>
 * <td>integer</td>
 * <td>default_bits</td>
 * <td>Specifies how many bits should be used to generate a private
 * key</td>
 * </tr>
 * <tr valign="top">
 * <td>private_key_type</td>
 * <td>integer</td>
 * <td>none</td>
 * <td>Specifies the type of private key to create. This can be one
 * of <b>OPENSSL_KEYTYPE_DSA</b>,
 * <b>OPENSSL_KEYTYPE_DH</b> or
 * <b>OPENSSL_KEYTYPE_RSA</b>.
 * The default value is <b>OPENSSL_KEYTYPE_RSA</b> which
 * is currently the only supported key type.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>encrypt_key</td>
 * <td>boolean</td>
 * <td>encrypt_key</td>
 * <td>Should an exported key (with passphrase) be encrypted?</td>
 * </tr>
 * <tr valign="top">
 * <td>encrypt_key_cipher</td>
 * <td>integer</td>
 * <td>none</td>
 * <td>
 * One of cipher constants.
 * </td>
 * </tr>
 * </table>
 * </p>
 * @param array|null $extra_attributes [optional] <p>
 * <i>extraattribs</i> is used to specify additional
 * configuration options for the CSR. Both <i>dn</i> and
 * <i>extraattribs</i> are associative arrays whose keys are
 * converted to OIDs and applied to the relevant part of the request.
 * </p>
 * @return OpenSSLCertificateSigningRequest|resource|false the CSR.
 */
#[LanguageLevelTypeAware(["8.0" => "OpenSSLCertificateSigningRequest|false"], default: "resource|false")]
function openssl_csr_new(
    array $distinguished_names,
    #[LanguageLevelTypeAware(['8.0' => 'OpenSSLAsymmetricKey'], default: 'resource')] &$private_key,
    ?array $options,
    ?array $extra_attributes
) {}

/**
 * Exports a CSR as a string
 * @link https://php.net/manual/en/function.openssl-csr-export.php
 * @param OpenSSLCertificateSigningRequest|string|resource $csr
 * @param string &$output
 * @param bool $no_text [optional]
 * @return bool true on success or false on failure.
 */
function openssl_csr_export(#[LanguageLevelTypeAware(["8.0" => "OpenSSLCertificateSigningRequest|string"], default: "resource|string")] $csr, &$output, bool $no_text = true): bool {}

/**
 * Exports a CSR to a file
 * @link https://php.net/manual/en/function.openssl-csr-export-to-file.php
 * @param OpenSSLCertificateSigningRequest|string|resource $csr
 * @param string $output_filename <p>
 * Path to the output file.
 * </p>
 * @param bool $no_text [optional]
 * @return bool true on success or false on failure.
 */
function openssl_csr_export_to_file(#[LanguageLevelTypeAware(["8.0" => "OpenSSLCertificateSigningRequest|string"], default: "resource|string")] $csr, string $output_filename, bool $no_text = true): bool {}

/**
 * Sign a CSR with another certificate (or itself) and generate a certificate
 * @link https://php.net/manual/en/function.openssl-csr-sign.php
 * @param OpenSSLCertificateSigningRequest|string|resource $csr <p>
 * A CSR previously generated by <b>openssl_csr_new</b>.
 * It can also be the path to a PEM encoded CSR when specified as
 * file://path/to/csr or an exported string generated
 * by <b>openssl_csr_export</b>.
 * </p>
 * @param OpenSSLCertificate|resource|string|null $ca_certificate <p>
 * The generated certificate will be signed by <i>cacert</i>.
 * If <i>cacert</i> is null, the generated certificate
 * will be a self-signed certificate.
 * </p>
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key <p>
 * <i>priv_key</i> is the private key that corresponds to
 * <i>cacert</i>.
 * </p>
 * @param int $days <p>
 * <i>days</i> specifies the length of time for which the
 * generated certificate will be valid, in days.
 * </p>
 * @param array|null $options [optional] <p>
 * You can finetune the CSR signing by <i>configargs</i>.
 * See <b>openssl_csr_new</b> for more information about
 * <i>configargs</i>.
 * </p>
 * @param int $serial [optional] <p>
 * An optional the serial number of issued certificate. If not specified
 * it will default to 0.
 * </p>
 * @return OpenSSLCertificate|resource|false an x509 certificate resource on success, false on failure.
 */
#[LanguageLevelTypeAware(["8.0" => "OpenSSLCertificate|false"], default: "resource|false")]
function openssl_csr_sign(
    #[LanguageLevelTypeAware(["8.0" => "OpenSSLCertificateSigningRequest|string"], default: "resource|string")] $csr,
    #[LanguageLevelTypeAware(["8.0" => "OpenSSLCertificate|string|null"], default: "resource|string|null")] $ca_certificate,
    #[LanguageLevelTypeAware(["8.0" => "OpenSSLAsymmetricKey|OpenSSLCertificate|array|string"], default: "resource|array|string")] $private_key,
    int $days,
    ?array $options,
    int $serial = 0
) {}

/**
 * Returns the subject of a CERT
 * @link https://php.net/manual/en/function.openssl-csr-get-subject.php
 * @param OpenSSLCertificateSigningRequest|string|resource $csr
 * @param bool $short_names [optional]
 * @return array|false
 */
function openssl_csr_get_subject(
    #[LanguageLevelTypeAware(["8.0" => "OpenSSLCertificateSigningRequest|string"], default: "resource|string")] $csr,
    #[PhpStormStubsElementAvailable(from: '7.1')] bool $short_names = true
): array|false {}

/**
 * Returns the public key of a CERT
 * @link https://php.net/manual/en/function.openssl-csr-get-public-key.php
 * @param OpenSSLCertificateSigningRequest|string|resource $csr
 * @param bool $short_names [optional]
 * @return OpenSSLAsymmetricKey|resource|false
 */
#[LanguageLevelTypeAware(["8.0" => "OpenSSLAsymmetricKey|false"], default: "resource|false")]
function openssl_csr_get_public_key(
    #[LanguageLevelTypeAware(["8.0" => "OpenSSLCertificateSigningRequest|string"], default: "resource|string")] $csr,
    #[PhpStormStubsElementAvailable(from: '7.1')] bool $short_names = true
) {}

/**
 * Computes a digest
 * @link https://php.net/manual/en/function.openssl-digest.php
 * @param string $data <p>
 * The data.
 * </p>
 * @param string $digest_algo <p>
 * The digest method.
 * </p>
 * @param bool $binary [optional] <p>
 * Setting to true will return as raw output data, otherwise the return
 * value is binhex encoded.
 * </p>
 * @return string|false the digested hash value on success or false on failure.
 */
function openssl_digest(string $data, string $digest_algo, bool $binary = false): string|false {}

/**
 * Encrypts data
 * @link https://php.net/manual/en/function.openssl-encrypt.php
 * @param string $data <p>
 * The data.
 * </p>
 * @param string $cipher_algo <p>
 * The cipher method. For a list of available cipher methods, use {@see openssl_get_cipher_methods()}.
 * </p>
 * @param string $passphrase <p>
 * The key.
 * </p>
 * @param int $options [optional] <p>
 * options is a bitwise disjunction of the flags OPENSSL_RAW_DATA and OPENSSL_ZERO_PADDING.
 * </p>
 * @param string $iv [optional] <p>
 * A non-NULL Initialization Vector.
 * </p>
 * @param string &$tag [optional] <p>The authentication tag passed by reference when using AEAD cipher mode (GCM or CCM).</p>
 * @param string $aad [optional] <p>Additional authentication data.</p>
 * @param int $tag_length [optional] <p>
 * The length of the authentication tag. Its value can be between 4 and 16 for GCM mode.
 * </p>
 * @return string|false the encrypted string on success or false on failure.
 */
function openssl_encrypt(
    string $data,
    string $cipher_algo,
    string $passphrase,
    int $options = 0,
    string $iv = "",
    #[PhpStormStubsElementAvailable(from: '7.1')] &$tag,
    #[PhpStormStubsElementAvailable(from: '7.1')] string $aad = "",
    #[PhpStormStubsElementAvailable(from: '7.1')] int $tag_length = 16
): string|false {}

/**
 * Decrypts data
 * @link https://php.net/manual/en/function.openssl-decrypt.php
 * @param string $data <p>
 * The data.
 * </p>
 * @param string $cipher_algo <p>
 * The cipher method.
 * </p>
 * @param string $passphrase <p>
 * The password.
 * </p>
 * @param int $options [optional] <p>
 * Setting to true will take a raw encoded string,
 * otherwise a base64 string is assumed for the
 * <i>data</i> parameter.
 * </p>
 * @param string $iv [optional] <p>
 * A non-NULL Initialization Vector.
 * </p>
 * @param string|null $tag <p>
 * The authentication tag in AEAD cipher mode. If it is incorrect, the authentication fails and the function returns <b>FALSE</b>.
 * </p>
 * @param string $aad [optional] <p>Additional authentication data.</p>
 * @return string|false The decrypted string on success or false on failure.
 */
function openssl_decrypt(
    string $data,
    string $cipher_algo,
    string $passphrase,
    int $options = 0,
    string $iv = "",
    #[PhpStormStubsElementAvailable(from: '7.1')] #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: 'string')] $tag = null,
    #[PhpStormStubsElementAvailable(from: '7.1')] string $aad = ""
): string|false {}

/**
 * (PHP 5 &gt;= PHP 5.3.3)<br/>
 * Gets the cipher iv length
 * @link https://php.net/manual/en/function.openssl-cipher-iv-length.php
 * @param string $cipher_algo <p>
 * The method.
 * </p>
 * @return int|false the cipher length on success, or false on failure.
 */
function openssl_cipher_iv_length(string $cipher_algo): int|false {}

/**
 * This function works in exactly the same way as openssl_cipher_iv_length but for a key length. This is especially
 * useful to make sure that the right key length is provided to openssl_encrypt and openssl_decrypt.
 * @param string $cipher_algo
 * @return int|false
 * @since 8.2
 */
function openssl_cipher_key_length(string $cipher_algo): int|false {}

/**
 * Generate signature
 * @link https://php.net/manual/en/function.openssl-sign.php
 * @param string $data
 * @param string &$signature <p>
 * If the call was successful the signature is returned in
 * <i>signature</i>.
 * </p>
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key
 * @param string|int $algorithm [optional] <p>
 * For more information see the list of Signature Algorithms.
 * </p>
 * @return bool true on success or false on failure.
 */
function openssl_sign(
    string $data,
    &$signature,
    #[LanguageLevelTypeAware(['8.0' => 'OpenSSLAsymmetricKey|OpenSSLCertificate|array|string'], default: 'resource|array|string')] $private_key,
    string|int $algorithm = OPENSSL_ALGO_SHA1
): bool {}

/**
 * Verify signature
 * @link https://php.net/manual/en/function.openssl-verify.php
 * @param string $data
 * @param string $signature
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $public_key
 * @param string|int $algorithm [optional] <p>
 * For more information see the list of Signature Algorithms.
 * </p>
 * @return int|false 1 if the signature is correct, 0 if it is incorrect, and
 * -1 on error.
 */
function openssl_verify(
    string $data,
    string $signature,
    #[LanguageLevelTypeAware(['8.0' => 'OpenSSLAsymmetricKey|OpenSSLCertificate|array|string'], default: 'resource|array|string')] $public_key,
    string|int $algorithm = OPENSSL_ALGO_SHA1
): int|false {}

/**
 * Seal (encrypt) data
 * @link https://php.net/manual/en/function.openssl-seal.php
 * @param string $data
 * @param string &$sealed_data
 * @param array &$encrypted_keys
 * @param array $public_key
 * @param string $cipher_algo
 * @param string &$iv
 * @return int|false the length of the sealed data on success, or false on error.
 * If successful the sealed data is returned in
 * <i>sealed_data</i>, and the envelope keys in
 * <i>env_keys</i>.
 */
function openssl_seal(
    string $data,
    &$sealed_data,
    &$encrypted_keys,
    array $public_key,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] string $cipher_algo = '',
    #[PhpStormStubsElementAvailable(from: '8.0')] string $cipher_algo,
    #[PhpStormStubsElementAvailable(from: '7.0')] &$iv = null
): int|false {}

/**
 * Open sealed data
 * @link https://php.net/manual/en/function.openssl-open.php
 * @param string $data
 * @param string &$output <p>
 * If the call is successful the opened data is returned in this
 * parameter.
 * </p>
 * @param string $encrypted_key
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key
 * @param string $cipher_algo The cipher method.
 * @param string|null $iv [optional] The initialization vector.
 * @return bool true on success or false on failure.
 */
function openssl_open(
    string $data,
    &$output,
    string $encrypted_key,
    #[LanguageLevelTypeAware(['8.0' => 'OpenSSLAsymmetricKey|OpenSSLCertificate|array|string'], default: 'resource|array|string')] $private_key,
    #[PhpStormStubsElementAvailable(from: '7.0', to: '7.4')] string $cipher_algo = '',
    #[PhpStormStubsElementAvailable(from: '8.0')] string $cipher_algo,
    #[PhpStormStubsElementAvailable(from: '7.0')] ?string $iv
): bool {}

/**
 * Generates a PKCS5 v2 PBKDF2 string, defaults to SHA-1
 * @link https://secure.php.net/manual/en/function.openssl-pbkdf2.php
 * @param string $password
 * @param string $salt
 * @param int $key_length
 * @param int $iterations
 * @param string $digest_algo [optional]
 * @return string|false Returns string or FALSE on failure.
 * @since 5.5
 */
function openssl_pbkdf2(string $password, string $salt, int $key_length, int $iterations, string $digest_algo = 'sha1'): string|false {}

/**
 * Verifies the signature of an S/MIME signed message
 * @link https://php.net/manual/en/function.openssl-pkcs7-verify.php
 * @param string $input_filename <p>
 * Path to the message.
 * </p>
 * @param int $flags <p>
 * <i>flags</i> can be used to affect how the signature is
 * verified - see PKCS7 constants
 * for more information.
 * </p>
 * @param string|null $signers_certificates_filename [optional] <p>
 * If the <i>outfilename</i> is specified, it should be a
 * string holding the name of a file into which the certificates of the
 * persons that signed the messages will be stored in PEM format.
 * </p>
 * @param array $ca_info <p>
 * If the <i>cainfo</i> is specified, it should hold
 * information about the trusted CA certificates to use in the verification
 * process - see certificate
 * verification for more information about this parameter.
 * </p>
 * @param string|null $untrusted_certificates_filename [optional] <p>
 * If the <i>extracerts</i> is specified, it is the filename
 * of a file containing a bunch of certificates to use as untrusted CAs.
 * </p>
 * @param string|null $content [optional] <p>
 * You can specify a filename with <i>content</i> that will
 * be filled with the verified data, but with the signature information
 * stripped.
 * @param string|null $output_filename [optional]
 * </p>
 * @return bool|int true if the signature is verified, false if it is not correct
 * (the message has been tampered with, or the signing certificate is invalid),
 * or -1 on error.
 */
function openssl_pkcs7_verify(
    string $input_filename,
    int $flags,
    ?string $signers_certificates_filename,
    array $ca_info = [],
    ?string $untrusted_certificates_filename,
    ?string $content,
    #[PhpStormStubsElementAvailable("7.2")] ?string $output_filename
): int|bool {}

/**
 * Decrypts an S/MIME encrypted message
 * @link https://php.net/manual/en/function.openssl-pkcs7-decrypt.php
 * @param string $input_filename
 * @param string $output_filename <p>
 * The decrypted message is written to the file specified by
 * <i>outfilename</i>.
 * </p>
 * @param OpenSSLCertificate|string|resource $certificate
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string|null $private_key [optional]
 * @return bool true on success or false on failure.
 */
function openssl_pkcs7_decrypt(
    string $input_filename,
    string $output_filename,
    $certificate,
    #[LanguageLevelTypeAware(['8.0' => 'OpenSSLAsymmetricKey|OpenSSLCertificate|array|string|null'], default: 'resource|array|string|null')] $private_key
): bool {}

/**
 * Sign an S/MIME message
 * @link https://php.net/manual/en/function.openssl-pkcs7-sign.php
 * @param string $input_filename
 * @param string $output_filename
 * @param OpenSSLCertificate|string|resource $certificate
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key
 * @param array|null $headers <p>
 * <i>headers</i> is an array of headers that
 * will be prepended to the data after it has been signed (see
 * <b>openssl_pkcs7_encrypt</b> for more information about
 * the format of this parameter).
 * </p>
 * @param int $flags [optional] <p>
 * <i>flags</i> can be used to alter the output - see PKCS7 constants.
 * </p>
 * @param string|null $untrusted_certificates_filename [optional] <p>
 * <i>extracerts</i> specifies the name of a file containing
 * a bunch of extra certificates to include in the signature which can for
 * example be used to help the recipient to verify the certificate that you used.
 * </p>
 * @return bool true on success or false on failure.
 */
function openssl_pkcs7_sign(
    string $input_filename,
    string $output_filename,
    #[LanguageLevelTypeAware(["8.0" => "OpenSSLCertificate|string"], default: "resource|string")] $certificate,
    #[LanguageLevelTypeAware(['8.0' => 'OpenSSLAsymmetricKey|OpenSSLCertificate|array|string'], default: 'resource|array|string')] $private_key,
    ?array $headers,
    int $flags = PKCS7_DETACHED,
    ?string $untrusted_certificates_filename
): bool {}

/**
 * Encrypt an S/MIME message
 * @link https://php.net/manual/en/function.openssl-pkcs7-encrypt.php
 * @param string $input_filename
 * @param string $output_filename
 * @param OpenSSLCertificate|array|string|resource $certificate <p>
 * Either a lone X.509 certificate, or an array of X.509 certificates.
 * </p>
 * @param array|null $headers <p>
 * <i>headers</i> is an array of headers that
 * will be prepended to the data after it has been encrypted.
 * </p>
 * <p>
 * <i>headers</i> can be either an associative array
 * keyed by header name, or an indexed array, where each element contains
 * a single header line.
 * </p>
 * @param int $flags [optional] <p>
 * <i>flags</i> can be used to specify options that affect
 * the encoding process - see PKCS7
 * constants.
 * </p>
 * @param int $cipher_algo [optional] <p>
 * One of cipher constants.
 * </p>
 * @return bool true on success or false on failure.
 */
function openssl_pkcs7_encrypt(
    string $input_filename,
    string $output_filename,
    #[LanguageLevelTypeAware(["8.0" => "OpenSSLCertificate|array|string"], default: "resource|array|string")] $certificate,
    ?array $headers,
    int $flags = 0,
    int $cipher_algo = OPENSSL_CIPHER_AES_128_CBC
): bool {}

/**
 * Encrypts data with private key
 * @link https://php.net/manual/en/function.openssl-private-encrypt.php
 * @param string $data
 * @param string &$encrypted_data
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key
 * @param int $padding [optional] <p>
 * <i>padding</i> can be one of
 * <b>OPENSSL_PKCS1_PADDING</b>,
 * <b>OPENSSL_NO_PADDING</b>.
 * </p>
 * @return bool true on success or false on failure.
 */
function openssl_private_encrypt(
    string $data,
    &$encrypted_data,
    #[LanguageLevelTypeAware(['8.0' => 'OpenSSLAsymmetricKey|OpenSSLCertificate|array|string'], default: 'resource|array|string')] $private_key,
    int $padding = OPENSSL_PKCS1_PADDING
): bool {}

/**
 * Decrypts data with private key
 * @link https://php.net/manual/en/function.openssl-private-decrypt.php
 * @param string $data
 * @param string &$decrypted_data
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key <p>
 * <i>key</i> must be the private key corresponding that
 * was used to encrypt the data.
 * </p>
 * @param int $padding [optional] <p>
 * <i>padding</i> can be one of
 * <b>OPENSSL_PKCS1_PADDING</b>,
 * <b>OPENSSL_SSLV23_PADDING</b>,
 * <b>OPENSSL_PKCS1_OAEP_PADDING</b>,
 * <b>OPENSSL_NO_PADDING</b>.
 * </p>
 * @return bool true on success or false on failure.
 */
function openssl_private_decrypt(
    string $data,
    &$decrypted_data,
    #[LanguageLevelTypeAware(['8.0' => 'OpenSSLAsymmetricKey|OpenSSLCertificate|array|string'], default: 'resource|array|string')] $private_key,
    int $padding = OPENSSL_PKCS1_PADDING
): bool {}

/**
 * Encrypts data with public key
 * @link https://php.net/manual/en/function.openssl-public-encrypt.php
 * @param string $data
 * @param string &$encrypted_data <p>
 * This will hold the result of the encryption.
 * </p>
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $public_key <p>
 * The public key.
 * </p>
 * @param int $padding [optional] <p>
 * <i>padding</i> can be one of
 * <b>OPENSSL_PKCS1_PADDING</b>,
 * <b>OPENSSL_SSLV23_PADDING</b>,
 * <b>OPENSSL_PKCS1_OAEP_PADDING</b>,
 * <b>OPENSSL_NO_PADDING</b>.
 * </p>
 * @return bool true on success or false on failure.
 */
function openssl_public_encrypt(
    string $data,
    &$encrypted_data,
    #[LanguageLevelTypeAware(['8.0' => 'OpenSSLAsymmetricKey|OpenSSLCertificate|array|string'], default: 'resource|array|string')] $public_key,
    int $padding = OPENSSL_PKCS1_PADDING
): bool {}

/**
 * Decrypts data with public key
 * @link https://php.net/manual/en/function.openssl-public-decrypt.php
 * @param string $data
 * @param string &$decrypted_data
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $public_key <p>
 * <i>key</i> must be the public key corresponding that
 * was used to encrypt the data.
 * </p>
 * @param int $padding [optional] <p>
 * <i>padding</i> can be one of
 * <b>OPENSSL_PKCS1_PADDING</b>,
 * <b>OPENSSL_NO_PADDING</b>.
 * </p>
 * @return bool true on success or false on failure.
 */
function openssl_public_decrypt(
    string $data,
    &$decrypted_data,
    #[LanguageLevelTypeAware(['8.0' => 'OpenSSLAsymmetricKey|OpenSSLCertificate|array|string'], default: 'resource|array|string')] $public_key,
    int $padding = OPENSSL_PKCS1_PADDING
): bool {}

/**
 * Gets available digest methods
 * @link https://php.net/manual/en/function.openssl-get-md-methods.php
 * @param bool $aliases [optional] <p>
 * Set to true if digest aliases should be included within the
 * returned array.
 * </p>
 * @return array An array of available digest methods.
 */
function openssl_get_md_methods(bool $aliases = false): array {}

/**
 * Gets available cipher methods
 * @link https://php.net/manual/en/function.openssl-get-cipher-methods.php
 * @param bool $aliases [optional] <p>
 * Set to true if cipher aliases should be included within the
 * returned array.
 * </p>
 * @return array An array of available cipher methods.
 */
function openssl_get_cipher_methods(bool $aliases = false): array {}

/**
 * Computes shared secret for public value of remote DH key and local DH key
 * @link https://php.net/manual/en/function.openssl-dh-compute-key.php
 * @param string $public_key <p>
 * Public key
 * </p>
 * @param OpenSSLAsymmetricKey|resource $private_key <p>
 * DH key
 * </p>
 * @return string|false computed key on success or false on failure.
 * @since 5.3
 */
function openssl_dh_compute_key(string $public_key, #[LanguageLevelTypeAware(["8.0" => "OpenSSLAsymmetricKey"], default: "resource")] $private_key): string|false {}

/**
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $public_key
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key
 * @param int $key_length
 * @return string|false
 * @since 7.3
 */
function openssl_pkey_derive(
    $public_key,
    #[LanguageLevelTypeAware(['8.0' => 'OpenSSLAsymmetricKey|OpenSSLCertificate|array|string'], default: 'resource|array|string')] $private_key,
    int $key_length = 0
): string|false {}

/**
 * Generates a string of pseudo-random bytes, with the number of bytes determined by the length parameter.
 * <p>It also indicates if a cryptographically strong algorithm was used to produce the pseudo-random bytes,
 * and does this via the optional crypto_strong parameter. It's rare for this to be FALSE, but some systems may be broken or old.</p>
 * @link https://php.net/manual/en/function.openssl-random-pseudo-bytes.php
 * @param positive-int $length <p>
 * The length of the desired string of bytes. Must be a positive integer. PHP will
 * try to cast this parameter to a non-null integer to use it.
 * </p>
 * @param bool &$strong_result [optional]<p>
 * If passed into the function, this will hold a boolean value that determines
 * if the algorithm used was "cryptographically strong", e.g., safe for usage with GPG,
 * passwords, etc. true if it did, otherwise false
 * </p>
 * @return string|false the generated string of bytes on success, or false on failure.
 */
#[LanguageLevelTypeAware(["7.4" => "string"], default: "string|false")]
function openssl_random_pseudo_bytes(int $length, &$strong_result) {}

/**
 * Return openSSL error message
 * @link https://php.net/manual/en/function.openssl-error-string.php
 * @return string|false an error message string, or false if there are no more error
 * messages to return.
 */
function openssl_error_string(): string|false {}

/**
 * Retrieve the available certificate locations
 * @link https://php.net/manual/en/function.openssl-get-cert-locations.php
 * @return array an array with the available certificate locations
 * @since 5.6
 */
#[ArrayShape([
    'default_cert_file' => 'string',
    'default_cert_file_env' => 'string',
    'default_cert_dir' => 'string',
    'default_cert_dir_env' => 'string',
    'default_private_dir' => 'string',
    'default_default_cert_area' => 'string',
    'ini_cafile' => 'string',
    'ini_capath' => 'string'
])]
function openssl_get_cert_locations(): array {}

function openssl_get_curve_names(): array|false {}

/**
 * @param string $data
 * @param array &$certificates
 * @return bool
 * @since 7.2
 */
function openssl_pkcs7_read(string $data, &$certificates): bool {}

/**
 * Verifies that the data block is intact, the signer is who they say they are, and returns the certs of the signers.
 * @param string $input_filename
 * @param int $flags [optional]
 * @param string|null $certificates [optional]
 * @param array $ca_info
 * @param string|null $untrusted_certificates_filename [optional]
 * @param string|null $content [optional]
 * @param string|null $pk7 [optional]
 * @param string|null $sigfile [optional]
 * @param int $encoding [optional]
 * @return bool
 * @since 8.0
 */
function openssl_cms_verify(string $input_filename, int $flags = 0, ?string $certificates, array $ca_info = [], ?string $untrusted_certificates_filename, ?string $content, ?string $pk7, ?string $sigfile, int $encoding = OPENSSL_ENCODING_SMIME): bool {}

/**
 * Encrypts the message in the file with the certificates and outputs the result to the supplied file.
 * @param string $input_filename
 * @param string $output_filename
 * @param resource|string|array $certificate
 * @param null|array $headers
 * @param int $flags
 * @param int $encoding
 * @param int $cipher_algo
 * @return bool
 * @since 8.0
 */
function openssl_cms_encrypt(string $input_filename, string $output_filename, $certificate, ?array $headers, int $flags = 0, int $encoding = OPENSSL_ENCODING_SMIME, int $cipher_algo = OPENSSL_CIPHER_AES_128_CBC): bool {}

/**
 * Signs the MIME message in the file with a cert and key and output the result to the supplied file.
 * @param string $input_filename
 * @param string $output_filename
 * @param OpenSSLCertificate|string $certificate
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key
 * @param array|null $headers
 * @param int $flags [optional]
 * @param int $encoding [optional]
 * @param string|null $untrusted_certificates_filename [optional]
 * @return bool
 * @since 8.0
 */
function openssl_cms_sign(string $input_filename, string $output_filename, OpenSSLCertificate|string $certificate, $private_key, ?array $headers, int $flags = 0, int $encoding = OPENSSL_ENCODING_SMIME, ?string $untrusted_certificates_filename): bool {}

/**
 * Decrypts the S/MIME message in the file and outputs the results to the supplied file.
 * @param string $input_filename
 * @param string $output_filename
 * @param resource|string $certificate
 * @param resource|string|array $private_key
 * @param int $encoding
 * @return bool
 * @since 8.0
 */
function openssl_cms_decrypt(string $input_filename, string $output_filename, $certificate, $private_key = null, int $encoding = OPENSSL_ENCODING_SMIME): bool {}

/**
 * Exports the CMS file to an array of PEM certificates.
 * @param string $input_filename
 * @param array &$certificates
 * @return bool
 * @since 8.0
 */
function openssl_cms_read(string $input_filename, &$certificates): bool {}

define('OPENSSL_VERSION_TEXT', "OpenSSL 1.0.0e 6 Sep 2011");
define('OPENSSL_VERSION_NUMBER', 268435551);
define('X509_PURPOSE_SSL_CLIENT', 1);
define('X509_PURPOSE_SSL_SERVER', 2);
define('X509_PURPOSE_NS_SSL_SERVER', 3);
define('X509_PURPOSE_SMIME_SIGN', 4);
define('X509_PURPOSE_SMIME_ENCRYPT', 5);
define('X509_PURPOSE_CRL_SIGN', 6);
define('X509_PURPOSE_ANY', 7);

/**
 * Used as default algorithm by <b>openssl_sign</b> and
 * <b>openssl_verify</b>.
 * @link https://php.net/manual/en/openssl.constants.php
 */
define('OPENSSL_ALGO_SHA1', 1);
define('OPENSSL_ALGO_MD5', 2);
define('OPENSSL_ALGO_MD4', 3);
define('OPENSSL_ALGO_MD2', 4);
define('OPENSSL_ALGO_DSS1', 5);
define('OPENSSL_ALGO_SHA224', 6);
define('OPENSSL_ALGO_SHA256', 7);
define('OPENSSL_ALGO_SHA384', 8);
define('OPENSSL_ALGO_SHA512', 9);
define('OPENSSL_ALGO_RMD160', 10);
/**
 * When signing a message, use cleartext signing with the MIME
 * type "multipart/signed". This is the default
 * if you do not specify any <i>flags</i> to
 * <b>openssl_pkcs7_sign</b>.
 * If you turn this option off, the message will be signed using
 * opaque signing, which is more resistant to translation by mail relays
 * but cannot be read by mail agents that do not support S/MIME.
 * @link https://php.net/manual/en/openssl.constants.php
 */
define('PKCS7_DETACHED', 64);

/**
 * Adds text/plain content type headers to encrypted/signed
 * message. If decrypting or verifying, it strips those headers from
 * the output - if the decrypted or verified message is not of MIME type
 * text/plain then an error will occur.
 * @link https://php.net/manual/en/openssl.constants.php
 */
define('PKCS7_TEXT', 1);

/**
 * When verifying a message, certificates (if
 * any) included in the message are normally searched for the
 * signing certificate. With this option only the
 * certificates specified in the <i>extracerts</i>
 * parameter of <b>openssl_pkcs7_verify</b> are
 * used. The supplied certificates can still be used as
 * untrusted CAs however.
 * @link https://php.net/manual/en/openssl.constants.php
 */
define('PKCS7_NOINTERN', 16);

/**
 * Do not verify the signers certificate of a signed
 * message.
 * @link https://php.net/manual/en/openssl.constants.php
 */
define('PKCS7_NOVERIFY', 32);

/**
 * Do not chain verification of signers certificates: that is
 * don't use the certificates in the signed message as untrusted CAs.
 * @link https://php.net/manual/en/openssl.constants.php
 */
define('PKCS7_NOCHAIN', 8);

/**
 * When signing a message the signer's certificate is normally
 * included - with this option it is excluded. This will reduce the
 * size of the signed message but the verifier must have a copy of the
 * signers certificate available locally (passed using the
 * <i>extracerts</i> to
 * <b>openssl_pkcs7_verify</b> for example).
 * @link https://php.net/manual/en/openssl.constants.php
 */
define('PKCS7_NOCERTS', 2);

/**
 * Normally when a message is signed, a set of attributes are
 * included which include the signing time and the supported symmetric
 * algorithms. With this option they are not included.
 * @link https://php.net/manual/en/openssl.constants.php
 */
define('PKCS7_NOATTR', 256);

/**
 * Normally the input message is converted to "canonical" format
 * which is effectively using CR and LF
 * as end of line: as required by the S/MIME specification. When this
 * option is present, no translation occurs. This is useful when
 * handling binary data which may not be in MIME format.
 * @link https://php.net/manual/en/openssl.constants.php
 */
define('PKCS7_BINARY', 128);

/**
 * Don't try and verify the signatures on a message
 * @link https://php.net/manual/en/openssl.constants.php
 */
define('PKCS7_NOSIGS', 4);
define('OPENSSL_PKCS1_PADDING', 1);
define('OPENSSL_SSLV23_PADDING', 2);
define('OPENSSL_NO_PADDING', 3);
define('OPENSSL_PKCS1_OAEP_PADDING', 4);
define('OPENSSL_CIPHER_RC2_40', 0);
define('OPENSSL_CIPHER_RC2_128', 1);
define('OPENSSL_CIPHER_RC2_64', 2);
define('OPENSSL_CIPHER_DES', 3);
define('OPENSSL_CIPHER_3DES', 4);
define('OPENSSL_KEYTYPE_RSA', 0);
define('OPENSSL_KEYTYPE_DSA', 1);
define('OPENSSL_KEYTYPE_DH', 2);
define('OPENSSL_KEYTYPE_EC', 3);

/**
 * Whether SNI support is available or not.
 * @link https://php.net/manual/en/openssl.constants.php
 */
define('OPENSSL_TLSEXT_SERVER_NAME', 1);

// End of openssl v.

/** @link https://php.net/manual/en/openssl.ciphers.php */
define('OPENSSL_CIPHER_AES_128_CBC', 5);
/** @link https://php.net/manual/en/openssl.ciphers.php */
define('OPENSSL_CIPHER_AES_192_CBC', 6);
/** @link https://php.net/manual/en/openssl.ciphers.php */
define('OPENSSL_CIPHER_AES_256_CBC', 7);
define('OPENSSL_RAW_DATA', 1);
define('OPENSSL_ZERO_PADDING', 2);
define('OPENSSL_DONT_ZERO_PAD_KEY', 4);

/**
 * @since 8.0
 */
define('OPENSSL_CMS_DETACHED', 64);
/**
 * @since 8.0
 */
define('OPENSSL_CMS_TEXT', 1);
/**
 * @since 8.0
 */
define('OPENSSL_CMS_NOINTERN', 16);
/**
 * @since 8.0
 */
define('OPENSSL_CMS_NOVERIFY', 32);
/**
 * @since 8.0
 */
define('OPENSSL_CMS_NOCERTS', 2);
/**
 * @since 8.0
 */
define('OPENSSL_CMS_NOATTR', 256);
/**
 * @since 8.0
 */
define('OPENSSL_CMS_BINARY', 128);
/**
 * @since 8.0
 */
define('OPENSSL_CMS_NOSIGS', 12);
/**
 * @since 8.0
 */
define('OPENSSL_ENCODING_DER', 0);
/**
 * @since 8.0
 */
define('OPENSSL_ENCODING_SMIME', 1);
/**
 * @since 8.0
 */
define('OPENSSL_ENCODING_PEM', 2);

define('OPENSSL_DEFAULT_STREAM_CIPHERS', "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:" .
"ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:" .
"DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:" .
"ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:" .
"ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:" .
"DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:" .
"AES256-GCM-SHA384:AES128:AES256:HIGH:!SSLv2:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!RC4:!ADH");

/**
 * @since 8.0
 */
final class OpenSSLCertificate
{
    /**
     * Cannot directly construct OpenSSLCertificate, use openssl_x509_read() instead
     * @see openssl_x509_read()
     */
    private function __construct() {}
}

/**
 * @since 8.0
 */
final class OpenSSLCertificateSigningRequest
{
    /**
     * Cannot directly construct OpenSSLCertificateSigningRequest, use openssl_csr_new() instead
     * @see openssl_csr_new()
     */
    private function __construct() {}
}

/**
 * @since 8.0
 */
final class OpenSSLAsymmetricKey
{
    /**
     * Cannot directly construct OpenSSLAsymmetricKey, use openssl_pkey_new() instead
     * @see openssl_pkey_new()
     */
    private function __construct() {}
}
<?php
/*
 * Mongo extension stubs
 * Gathered from https://secure.php.net/manual/en/book.mongo.php
 * Maintainer: Alexander Makarov, sam@rmcreative.ru, max@upgradeyour.com
 *
 * MongoClient: https://github.com/djsipe/PHP-Stubs
 */

use JetBrains\PhpStorm\Deprecated;

/**
 * A connection between PHP and MongoDB. This class is used to create and manage connections
 * See MongoClient::__construct() and the section on connecting for more information about creating connections.
 * @link https://secure.php.net/manual/en/class.mongoclient.php
 */
class MongoClient
{
    public const VERSION = '3.x';
    public const DEFAULT_HOST = "localhost";
    public const DEFAULT_PORT = 27017;
    public const RP_PRIMARY = "primary";
    public const RP_PRIMARY_PREFERRED = "primaryPreferred";
    public const RP_SECONDARY = "secondary";
    public const RP_SECONDARY_PREFERRED = "secondaryPreferred";
    public const RP_NEAREST = "nearest";

    /* Properties */
    public $connected = false;
    public $status = null;
    protected $server = null;
    protected $persistent = null;

    /* Methods */
    /**
     * Creates a new database connection object
     * @link https://php.net/manual/en/mongo.construct.php
     * @param string $server [optional] The server name.
     * @param array $options [optional] An array of options for the connection. Currently
     *        available options include: "connect" If the constructor should connect before
     *        returning. Default is true. "timeout" For how long the driver should try to
     *        connect to the database (in milliseconds). "replicaSet" The name of the replica
     *        set to connect to. If this is given, the master will be determined by using the
     *        ismaster database command on the seeds, so the driver may end up connecting to a
     *        server that was not even listed. See the replica set example below for details.
     *        "username" The username can be specified here, instead of including it in the
     *        host list. This is especially useful if a username has a ":" in it. This
     *        overrides a username set in the host list. "password" The password can be
     *        specified here, instead of including it in the host list. This is especially
     *        useful if a password has a "@" in it. This overrides a password set in the host
     *        list. "db" The database to authenticate against can be specified here, instead
     *        of including it in the host list. This overrides a database given in the host
     *        list  "fsync" When "fsync" is set, all write operations will block until the database has flushed the changes to disk. This makes the write operations slower, but it guarantees that writes have succeeded and that the operations can be recovered in case of total system failure.
     *        If the MongoDB server has journaling enabled, this option is identical to "journal". If journaling is not enabled, this option ensures that write operations will be synced to database files on disk.
     *        "journal"
     *        When "journal" is set, all write operations will block until the database has flushed the changes to the journal on disk. This makes the write operations slower, but it guarantees that writes have succeeded and that the operations can be recovered in case of total system failure.
     *        Note: If this option is used and journaling is disabled, MongoDB 2.6+ will raise an error and the write will fail; older server versions will simply ignore the option.
     *        "gssapiServiceName"
     *        Sets the » Kerberos service principal. Only applicable when authMechanism=GSSAPI. Defaults to "mongodb".
     *        "password"
     *        The password can be specified here, instead of including it in the host list. This is especially useful if a password has a "@" in it. This overrides a password set in the host list.
     *        "readPreference"
     *        Specifies the read preference type. Read preferences provide you with control from which secondaries data can be read from.
     *        Allowed values are: MongoClient::RP_PRIMARY, MongoClient::RP_PRIMARY_PREFERRED, MongoClient::RP_SECONDARY, MongoClient::RP_SECONDARY_PREFERRED and MongoClient::RP_NEAREST.
     *        See the documentation on read preferences for more information.
     *        "readPreferenceTags"
     *        Specifies the read preference tags as an array of strings. Tags can be used in combination with the readPreference option to further control which secondaries data might be read from.
     *        See the documentation on read preferences for more information.
     *        "replicaSet"
     *        The name of the replica set to connect to. If this is given, the primary will be automatically be determined. This means that the driver may end up connecting to a server that was not even listed. See the replica set example below for details.
     *        "secondaryAcceptableLatencyMS"
     *        When reading from a secondary (using ReadPreferences), do not read from secondaries known to be more then secondaryAcceptableLatencyMS away from us. Defaults to 15
     *        "socketTimeoutMS"
     *        How long a socket operation (read or write) can take before timing out in milliseconds. Defaults to 30000 (30 seconds).
     *        If -1 is specified, socket operations may block indefinitely. This option may also be set on a per-operation basis using MongoCursor::timeout() for queries or the "socketTimeoutMS" option for write methods.
     *        Note: This is a client-side timeout. If a write operation times out, there is no way to know if the server actually handled the write or not, as a MongoCursorTimeoutException will be thrown in lieu of returning a write result.
     *        "ssl"
     *        A boolean to specify whether you want to enable SSL for the connections to MongoDB. Extra options such as certificates can be set with SSL context options.
     *        "username"
     *        The username can be specified here, instead of including it in the host list. This is especially useful if a username has a ":" in it. This overrides a username set in the host list.
     *        "w"
     *        The w option specifies the Write Concern for the driver, which determines how long the driver blocks when writing. The default value is 1.
     *        This option is applicable when connecting to both single servers and replica sets. A positive value controls how many nodes must acknowledge the write instruction before the driver continues. A value of 1 would require the single server or primary (in a replica set) to acknowledge the write operation. A value of 3 would cause the driver to block until the write has been applied to the primary as well as two secondary servers (in a replica set).
     *        A string value is used to control which tag sets are taken into account for write concerns. "majority" is special and ensures that the write operation has been applied to the majority (more than 50%) of the participating nodes.
     *        "wTimeoutMS" This option specifies the time limit, in milliseconds, for write concern acknowledgement. It is only applicable for write operations where "w" is greater than 1, as the timeout pertains to replication. If the write concern is not satisfied within the time limit, a MongoCursorException will be thrown. A value of 0 may be specified to block indefinitely. The default value is 10000 (ten seconds).
     * @param array $driver_options [optional] <p>
     *         An array of options for the MongoDB driver. Options include setting
     *         connection {@link https://php.net/manual/en/mongo.connecting.ssl.php#mongo.connecting.context.ssl context options for SSL}
     *         or {@link https://php.net/manual/en/context.mongodb.php logging callbacks}.
     *         </p><ul>
     *         <li>
     *         <p>
     *         <em>"context"</em>
     *         </p>
     *         <p>
     *         The Stream Context to attach to all new connections. This allows you
     *         for example to configure SSL certificates and are described at
     *         {@link https://php.net/manual/en/context.ssl.php SSL context options}. See the
     *         {@link https://php.net/manual/en/mongo.connecting.ssl.php#mongo.connecting.context.ssl Connecting over SSL} tutorial.
     *         </p>
     *         </li>
     *         </ul>
     * @throws MongoConnectionException
     */
    public function __construct($server = "mongodb://localhost:27017", array $options = ["connect" => true], $driver_options) {}

    /**
     * (PECL mongo &gt;= 1.3.0)<br/>
     * Closes this database connection
     * This method does not need to be called, except in unusual circumstances.
     * The driver will cleanly close the database connection when the Mongo object goes out of scope.
     * @link https://secure.php.net/manual/en/mongoclient.close.php
     * @param bool|string $connection [optional] <p>
     * If connection is not given, or <b>FALSE</b> then connection that would be selected for writes would be closed. In a single-node configuration, that is then the whole connection, but if you are connected to a replica set, close() will only close the connection to the primary server.
     * If connection is <b>TRUE</b> then all connections as known by the connection manager will be closed. This can include connections that are not referenced in the connection string used to create the object that you are calling close on.
     * If connection is a string argument, then it will only close the connection identified by this hash. Hashes are identifiers for a connection and can be obtained by calling {@see MongoClient::getConnections()}.
     * </p>
     * @return bool If the connection was successfully closed.
     */
    public function close($connection) {}

    /**
     * Connects to a database server
     *
     * @link https://secure.php.net/manual/en/mongoclient.connect.php
     *
     * @throws MongoConnectionException
     * @return bool If the connection was successful.
     */
    public function connect() {}

    /**
     * Drops a database
     *
     * @link https://secure.php.net/manual/en/mongoclient.dropdb.php
     * @param mixed $db The database to drop. Can be a MongoDB object or the name of the database.
     * @return array The database response.
     */
    #[Deprecated(replacement: "%class%->drop()")]
    public function dropDB($db) {}

    /**
     * (PECL mongo &gt;= 1.3.0)<br/>
     * Gets a database
     * @link https://php.net/manual/en/mongoclient.get.php
     * @param string $dbname The database name.
     * @return MongoDB The database name.
     */
    public function __get($dbname) {}

    /**
     * Get connections
     * Returns an array of all open connections, and information about each of the servers
     * @return array
     */
    public static function getConnections() {}

    /**
     * Get hosts
     * This method is only useful with a connection to a replica set. It returns the status of all of the hosts in the
     * set. Without a replica set, it will just return an array with one element containing the host that you are
     * connected to.
     * @return array
     */
    public function getHosts() {}

    /**
     * Get read preference
     * Get the read preference for this connection
     * @return array
     */
    public function getReadPreference() {}

    /**
     * (PECL mongo &gt;= 1.5.0)<br/>
     * Get the write concern for this connection
     * @return array <p>This function returns an array describing the write concern.
     * The array contains the values w for an integer acknowledgement level or string mode,
     * and wtimeout denoting the maximum number of milliseconds to wait for the server to satisfy the write concern.</p>
     */
    public function getWriteConcern() {}

    /**
     * Kills a specific cursor on the server
     * @link https://secure.php.net/manual/en/mongoclient.killcursor.php
     * @param string $server_hash <p>
     * The server hash that has the cursor. This can be obtained through
     * {@link https://secure.php.net/manual/en/mongocursor.info.php MongoCursor::info()}.
     * </p>
     * @param int|MongoInt64 $id
     * <p>
     * The ID of the cursor to kill. You can either supply an {@link https://secure.php.net/manual/en/language.types.integer.php int}
     * containing the 64 bit cursor ID, or an object of the
     * {@link https://secure.php.net/manual/en/class.mongoint64.php MongoInt64} class. The latter is necessary on 32
     * bit platforms (and Windows).
     * </p>
     */
    public function killCursor($server_hash, $id) {}

    /**
     * (PECL mongo &gt;= 1.3.0)<br/>
     * Lists all of the databases available
     * @link https://php.net/manual/en/mongoclient.listdbs.php
     * @return array Returns an associative array containing three fields. The first field is databases, which in turn contains an array. Each element of the array is an associative array corresponding to a database, giving the database's name, size, and if it's empty. The other two fields are totalSize (in bytes) and ok, which is 1 if this method ran successfully.
     */
    public function listDBs() {}

    /**
     * (PECL mongo &gt;= 1.3.0)<br/>
     * Gets a database collection
     * @link https://secure.php.net/manual/en/mongoclient.selectcollection.php
     * @param string $db The database name.
     * @param string $collection The collection name.
     * @throws Exception Throws Exception if the database or collection name is invalid.
     * @return MongoCollection Returns a new collection object.
     */
    public function selectCollection($db, $collection) {}

    /**
     * (PECL mongo &gt;= 1.3.0)<br/>
     * Gets a database
     * @link https://secure.php.net/manual/en/mongo.selectdb.php
     * @param string $name The database name.
     * @throws InvalidArgumentException
     * @return MongoDB Returns a new db object.
     */
    public function selectDB($name) {}

    /**
     * (PECL mongo &gt;= 1.3.0)<br/>
     * Set read preference
     * @param string $readPreference
     * @param array $tags
     * @return bool
     */
    public function setReadPreference($readPreference, $tags = null) {}

    /**
     * (PECL mongo &gt;= 1.1.0)<br/>
     * Choose a new secondary for slaveOkay reads
     * @link https://secure.php.net/manual/en/mongo.switchslave.php
     * @return string The address of the secondary this connection is using for reads. This may be the same as the previous address as addresses are randomly chosen. It may return only one address if only one secondary (or only the primary) is available.
     * For example, if we had a three member replica set with a primary, secondary, and arbiter this method would always return the address of the secondary. If the secondary became unavailable, this method would always return the address of the primary. If the primary also became unavailable, this method would throw an exception, as an arbiter cannot handle reads.
     * @throws MongoException (error code 15) if it is called on a non-replica-set connection. It will also throw MongoExceptions if it cannot find anyone (primary or secondary) to read from (error code 16).
     */
    public function switchSlave() {}

    /**
     * String representation of this connection
     * @link https://secure.php.net/manual/en/mongoclient.tostring.php
     * @return string Returns hostname and port for this connection.
     */
    public function __toString() {}
}

/**
 * The connection point between MongoDB and PHP.
 * This class is used to initiate a connection and for database server commands.
 * @link https://secure.php.net/manual/en/class.mongo.php
 * Relying on this feature is highly discouraged. Please use MongoClient instead.
 * @see MongoClient
 */
#[Deprecated("This class has been DEPRECATED as of version 1.3.0.")]
class Mongo extends MongoClient
{
    /**
     * (PECL mongo &gt;= 1.2.0)<br/>
     * Get pool size for connection pools
     * @link https://php.net/manual/en/mongo.getpoolsize.php
     * @return int Returns the current pool size.
     * @see MongoPool::getSize()
     */
    #[Deprecated('This feature has been DEPRECATED as of version 1.2.3. Relying on this feature is highly discouraged. Please use MongoPool::getSize() instead.')]
    public function getPoolSize() {}

    /**
     * (PECL mongo &gt;= 1.1.0)<br/>
     * Returns the address being used by this for slaveOkay reads
     * @link https://php.net/manual/en/mongo.getslave.php
     * @return bool <p>The address of the secondary this connection is using for reads.
     * </p>
     * <p>
     * This returns <b>NULL</b> if this is not connected to a replica set or not yet
     * initialized.
     * </p>
     */
    public function getSlave() {}

    /**
     * (PECL mongo &gt;= 1.1.0)<br/>
     * Get slaveOkay setting for this connection
     * @link https://php.net/manual/en/mongo.getslaveokay.php
     * @return bool Returns the value of slaveOkay for this instance.
     */
    public function getSlaveOkay() {}

    /**
     * Connects to paired database server
     * @link https://secure.php.net/manual/en/mongo.pairconnect.php
     * @throws MongoConnectionException
     * @return bool
     */
    #[Deprecated('Pass a string of the form "mongodb://server1,server2" to the constructor instead of using this method.')]
    public function pairConnect() {}

    /**
     * (PECL mongo &gt;= 1.2.0)<br/>
     * Returns information about all connection pools.
     * @link https://php.net/manual/en/mongo.pooldebug.php
     * @return array  Each connection pool has an identifier, which starts with the host. For each pool, this function shows the following fields:
     * <p><b>in use</b></p>
     * <p>The number of connections currently being used by MongoClient instances.
     * in pool
     * The number of connections currently in the pool (not being used).</p>
     * <p><b>remaining</b></p>
     *
     * <p>The number of connections that could be created by this pool. For example, suppose a pool had 5 connections remaining and 3 connections in the pool. We could create 8 new instances of MongoClient before we exhausted this pool (assuming no instances of MongoClient went out of scope, returning their connections to the pool).
     *
     * A negative number means that this pool will spawn unlimited connections.
     *
     * Before a pool is created, you can change the max number of connections by calling Mongo::setPoolSize(). Once a pool is showing up in the output of this function, its size cannot be changed.</p>
     * <p><b>timeout</b></p>
     *
     * <p>The socket timeout for connections in this pool. This is how long connections in this pool will attempt to connect to a server before giving up.</p>
     * @see MongoPool::info()
     */
    #[Deprecated('@deprecated This feature has been DEPRECATED as of version 1.2.3. Relying on this feature is highly discouraged. Please use MongoPool::info() instead.')]
    public function poolDebug() {}

    /**
     * (PECL mongo &gt;= 1.1.0)<br/>
     * Change slaveOkay setting for this connection
     * @link https://php.net/manual/en/mongo.setslaveokay.php
     * @param bool $ok [optional] <p class="para">
     * If reads should be sent to secondary members of a replica set for all
     * possible queries using this {@see MongoClient} instance.
     * </p>
     * @return bool returns the former value of slaveOkay for this instance.
     */
    public function setSlaveOkay($ok) {}

    /**
     *(PECL mongo &gt;= 1.2.0)<br/>
     * Set the size for future connection pools.
     * @link https://php.net/manual/en/mongo.setpoolsize.php
     * @param int $size <p>The max number of connections future pools will be able to create. Negative numbers mean that the pool will spawn an infinite number of connections.</p>
     * @return bool Returns the former value of pool size.
     * @see MongoPool::setSize()
     */
    #[Deprecated('Relying on this feature is highly discouraged. Please use MongoPool::setSize() instead.')]
    public function setPoolSize($size) {}

    /**
     * Creates a persistent connection with a database server
     * @link https://secure.php.net/manual/en/mongo.persistconnect.php
     * @param string $username A username used to identify the connection.
     * @param string $password A password used to identify the connection.
     * @throws MongoConnectionException
     * @return bool If the connection was successful.
     */
    #[Deprecated('Pass array("persist" => $id) to the constructor instead of using this method.')]
    public function persistConnect($username = "", $password = "") {}

    /**
     * Creates a persistent connection with paired database servers
     * @link https://secure.php.net/manual/en/mongo.pairpersistconnect.php
     * @param string $username A username used to identify the connection.
     * @param string $password A password used to identify the connection.
     * @throws MongoConnectionException
     * @return bool If the connection was successful.
     */
    #[Deprecated('Pass "mongodb://server1,server2" and array("persist" => $id) to the constructor instead of using this method.')]
    public function pairPersistConnect($username = "", $password = "") {}

    /**
     * Connects with a database server
     *
     * @link https://secure.php.net/manual/en/mongo.connectutil.php
     * @throws MongoConnectionException
     * @return bool If the connection was successful.
     */
    protected function connectUtil() {}

   /**
    * Check if there was an error on the most recent db operation performed
    * @link https://secure.php.net/manual/en/mongo.lasterror.php
    * @return array|null Returns the error, if there was one, or NULL.
    * @see MongoDB::lastError()
    */
   #[Deprecated('Use MongoDB::lastError() instead.')]
    public function lastError() {}

   /**
    * Checks for the last error thrown during a database operation
    * @link https://secure.php.net/manual/en/mongo.preverror.php
    * @return array Returns the error and the number of operations ago it occurred.
    * @see MongoDB::prevError()
    */
   #[Deprecated('Use MongoDB::prevError() instead.')]
    public function prevError() {}

    /**
     * Clears any flagged errors on the connection
     * @link https://secure.php.net/manual/en/mongo.reseterror.php
     * @return array Returns the database response.
     * @see MongoDB::resetError()
     */
    #[Deprecated('Use MongoDB::resetError() instead.')]
    public function resetError() {}

    /**
     * Creates a database error on the database.
     * @link https://secure.php.net/manual/en/mongo.forceerror.php
     * @return bool The database response.
     * @see MongoDB::forceError()
     */
    #[Deprecated('Use MongoDB::forceError() instead.')]
    public function forceError() {}
}

/**
 * Instances of this class are used to interact with a database.
 * @link https://secure.php.net/manual/en/class.mongodb.php
 */
class MongoDB
{
    /**
     * Profiling is off.
     * @link https://php.net/manual/en/class.mongodb.php#mongodb.constants.profiling-off
     */
    public const PROFILING_OFF = 0;

    /**
     * Profiling is on for slow operations (>100 ms).
     * @link https://php.net/manual/en/class.mongodb.php#mongodb.constants.profiling-slow
     */
    public const PROFILING_SLOW = 1;

    /**
     * Profiling is on for all operations.
     * @link https://php.net/manual/en/class.mongodb.php#mongodb.constants.profiling-on
     */
    public const PROFILING_ON = 2;

    /**
     * @var int
     * <p>
     * The number of servers to replicate a change to before returning success.
     * Inherited by instances of {@link https://php.net/manual/en/class.mongocollection.php MongoCollection} derived
     * from this.  <em>w</em> functionality is only available in
     * version 1.5.1+ of the MongoDB server and 1.0.8+ of the driver.
     * </p>
     * <p>
     * <em>w</em> is used whenever you need to adjust the
     * acknowledgement level
     * ( {@link https://php.net/manual/en/mongocollection.insert.php MongoCollection::insert()},
     * {@link https://php.net/manual/en/mongocollection.update.php MongoCollection::update()},
     * {@link https://php.net/manual/en/mongocollection.remove.php MongoCollection::remove()},
     * {@link https://php.net/manual/en/mongocollection.save.php MongoCollection::save()}, and
     * {@link https://php.net/manual/en/mongocollection.ensureindex.php MongoCollection::ensureIndex()} all support this
     * option). With the default value (1), an acknowledged operation will return once
     * the database server has the operation. If the server goes down before
     * the operation has been replicated to a secondary, it is possible to lose
     * the operation forever. Thus, you can specify <em>w</em> to be
     * higher than one and guarantee that at least one secondary has the
     * operation before it is considered successful.
     * </p>
     * <p>
     * For example, if <em>w</em> is 2, the primary and one secondary
     * must have a record of the operation or the driver will throw a
     * {@link https://php.net/manual/en/class.mongocursorexception.php MongoCursorException}. It is tempting to set
     * <em>w</em> to the total number of secondaries + primary, but
     * then if one secondary is down the operation will fail and an exception
     * will be thrown, so usually <em>w=2</em> is safest (primary and
     * one secondary).
     * </p>
     */
    public $w = 1;

    /**
     * @var int <p>
     * T he number of milliseconds to wait for <em>MongoDB::$w</em>
     * replications to take place.  Inherited by instances of
     * {@link https://secure.php.net/manual/en/class.mongocollection.php MongoCollection} derived from this.
     * <em>w</em> functionality is only available in version 1.5.1+ of
     * the MongoDB server and 1.0.8+ of the driver.
     * </p>
     * <p>
     * Unless <em>wtimeout</em> is set, the server waits forever for
     * replicating to <em>w</em> servers to finish.  The driver
     * defaults to waiting for 10 seconds, you can change this value to alter
     * its behavior.
     * </p>
     */
    public $wtimeout = 10000;

    /**
     * (PECL mongo &gt;= 0.9.0)<br/>
     * Creates a new database
     * This method is not meant to be called directly. The preferred way to create an instance of MongoDB is through {@see Mongo::__get()} or {@see Mongo::selectDB()}.
     * @link https://secure.php.net/manual/en/mongodb.construct.php
     * @param MongoClient $conn Database connection.
     * @param string $name Database name.
     * @throws Exception
     */
    public function __construct($conn, $name) {}

    /**
     * The name of this database
     * @link https://secure.php.net/manual/en/mongodb.--tostring.php
     * @return string Returns this database's name.
     */
    public function __toString() {}

    /**
     * (PECL mongo &gt;= 1.0.2)<br/>
     * Gets a collection
     * @link https://secure.php.net/manual/en/mongodb.get.php
     * @param string $name The name of the collection.
     * @return MongoCollection
     */
    public function __get($name) {}

    /**
     * (PECL mongo &gt;= 1.3.0)<br/>
     * @link https://secure.php.net/manual/en/mongodb.getcollectionnames.php
     * Get all collections from this database
     * @param bool $includeSystemCollections [optional] Include system collections.
     * @return array Returns the names of the all the collections in the database as an
     * {@link https://secure.php.net/manual/en/language.types.array.php array}.
     */
    public function getCollectionNames($includeSystemCollections = false) {}

    /**
     * (PECL mongo &gt;= 0.9.0)<br/>
     * Fetches toolkit for dealing with files stored in this database
     * @link https://secure.php.net/manual/en/mongodb.getgridfs.php
     * @param string $prefix [optional] The prefix for the files and chunks collections.
     * @return MongoGridFS Returns a new gridfs object for this database.
     */
    public function getGridFS($prefix = "fs") {}

    /**
     * (PECL mongo &gt;= 0.9.0)<br/>
     * Gets this database's profiling level
     * @link https://secure.php.net/manual/en/mongodb.getprofilinglevel.php
     * @return int Returns the profiling level.
     */
    public function getProfilingLevel() {}

    /**
     * (PECL mongo &gt;= 1.1.0)<br/>
     * Get slaveOkay setting for this database
     * @link https://secure.php.net/manual/en/mongodb.getslaveokay.php
     * @return bool Returns the value of slaveOkay for this instance.
     */
    public function getSlaveOkay() {}

    /**
     * (PECL mongo &gt;= 0.9.0)<br/>
     * Sets this database's profiling level
     * @link https://secure.php.net/manual/en/mongodb.setprofilinglevel.php
     * @param int $level Profiling level.
     * @return int Returns the previous profiling level.
     */
    public function setProfilingLevel($level) {}

    /**
     * (PECL mongo &gt;= 0.9.0)<br/>
     * Drops this database
     * @link https://secure.php.net/manual/en/mongodb.drop.php
     * @return array Returns the database response.
     */
    public function drop() {}

    /**
     * Repairs and compacts this database
     * @link https://secure.php.net/manual/en/mongodb.repair.php
     * @param bool $preserve_cloned_files [optional] <p>If cloned files should be kept if the repair fails.</p>
     * @param bool $backup_original_files [optional] <p>If original files should be backed up.</p>
     * @return array <p>Returns db response.</p>
     */
    public function repair($preserve_cloned_files = false, $backup_original_files = false) {}

    /**
     * (PECL mongo &gt;= 0.9.0)<br/>
     * Gets a collection
     * @link https://secure.php.net/manual/en/mongodb.selectcollection.php
     * @param string $name <b>The collection name.</b>
     * @throws Exception if the collection name is invalid.
     * @return MongoCollection <p>
     * Returns a new collection object.
     * </p>
     */
    public function selectCollection($name) {}

    /**
     * (PECL mongo &gt;= 1.1.0)<br/>
     * Change slaveOkay setting for this database
     * @link https://php.net/manual/en/mongodb.setslaveokay.php
     * @param bool $ok [optional] <p>
     * If reads should be sent to secondary members of a replica set for all
     * possible queries using this {@link https://secure.php.net/manual/en/class.mongodb.php MongoDB} instance.
     * </p>
     * @return bool Returns the former value of slaveOkay for this instance.
     */
    public function setSlaveOkay($ok = true) {}

    /**
     * Creates a collection
     * @link https://secure.php.net/manual/en/mongodb.createcollection.php
     * @param string $name The name of the collection.
     * @param array $options [optional] <p>
     * <p>
     * An array containing options for the collections. Each option is its own
     * element in the options array, with the option name listed below being
     * the key of the element. The supported options depend on the MongoDB
     * server version. At the moment, the following options are supported:
     * </p>
     * <p>
     * <b>capped</b>
     * <p>
     * If the collection should be a fixed size.
     * </p>
     * </p>
     * <p>
     * <b>size</b>
     * <p>
     * If the collection is fixed size, its size in bytes.</p></p>
     * <p><b>max</b>
     * <p>If the collection is fixed size, the maximum number of elements to store in the collection.</p></p>
     * <i>autoIndexId</i>
     *
     * <p>
     * If capped is <b>TRUE</b> you can specify <b>FALSE</b> to disable the
     * automatic index created on the <em>_id</em> field.
     * Before MongoDB 2.2, the default value for
     * <em>autoIndexId</em> was <b>FALSE</b>.
     * </p>
     * </p>
     * @return MongoCollection <p>Returns a collection object representing the new collection.</p>
     */
    public function createCollection($name, $options) {}

    /**
     * (PECL mongo &gt;= 0.9.0)<br/>
     * Drops a collection
     * @link https://secure.php.net/manual/en/mongodb.dropcollection.php
     * @param MongoCollection|string $coll MongoCollection or name of collection to drop.
     * @return array Returns the database response.
     * @see MongoCollection::drop()
     */
    #[Deprecated('Use MongoCollection::drop() instead.')]
    public function dropCollection($coll) {}

    /**
     * (PECL mongo &gt;= 0.9.0)<br/>
     * Get a list of collections in this database
     * @link https://secure.php.net/manual/en/mongodb.listcollections.php
     * @param bool $includeSystemCollections [optional] <p>Include system collections.</p>
     * @return array Returns a list of MongoCollections.
     */
    public function listCollections($includeSystemCollections = false) {}

    /**
     * (PECL mongo &gt;= 0.9.0)<br/>
     * Creates a database reference
     * @link https://secure.php.net/manual/en/mongodb.createdbref.php
     * @param string $collection The collection to which the database reference will point.
     * @param mixed $document_or_id <p>
     * If an array or object is given, its <em>_id</em> field will be
     * used as the reference ID. If a {@see MongoId} or scalar
     * is given, it will be used as the reference ID.
     * </p>
     * @return array <p>Returns a database reference array.</p>
     * <p>
     * If an array without an <em>_id</em> field was provided as the
     * <em>document_or_id</em> parameter, <b>NULL</b> will be returned.
     * </p>
     */
    public function createDBRef($collection, $document_or_id) {}

    /**
     * (PECL mongo &gt;= 0.9.0)<br/>
     * Fetches the document pointed to by a database reference
     * @link https://secure.php.net/manual/en/mongodb.getdbref.php
     * @param array $ref A database reference.
     * @return array Returns the document pointed to by the reference.
     */
    public function getDBRef(array $ref) {}

    /**
     * (PECL mongo &gt;= 1.5.0)<br/>
     * Get the write concern for this database
     * @link https://php.net/manual/en/mongodb.getwriteconcern.php
     * @return array <p>This function returns an array describing the write concern.
     * The array contains the values w for an integer acknowledgement level or string mode,
     * and wtimeout denoting the maximum number of milliseconds to wait for the server to satisfy the write concern.</p>
     */
    public function getWriteConcern() {}

    /**
     * (PECL mongo &gt;= 0.9.3)<br/>
     * Runs JavaScript code on the database server.
     * @link https://secure.php.net/manual/en/mongodb.execute.php
     * @param MongoCode|string $code Code to execute.
     * @param array $args [optional] Arguments to be passed to code.
     * @return array Returns the result of the evaluation.
     */
    public function execute($code, array $args = []) {}

    /**
     * Execute a database command
     * @link https://secure.php.net/manual/en/mongodb.command.php
     * @param array $data The query to send.
     * @param array $options [optional] <p>
     * This parameter is an associative array of the form
     * <em>array("optionname" =&gt; &lt;boolean&gt;, ...)</em>. Currently
     * supported options are:
     * </p><ul>
     * <li><p><em>"timeout"</em></p><p>Deprecated alias for <em>"socketTimeoutMS"</em>.</p></li>
     * </ul>
     * @return array Returns database response.
     * Every database response is always maximum one document,
     * which means that the result of a database command can never exceed 16MB.
     * The resulting document's structure depends on the command,
     * but most results will have the ok field to indicate success or failure and results containing an array of each of the resulting documents.
     */
    public function command(array $data, $options) {}

    /**
     * (PECL mongo &gt;= 0.9.5)<br/>
     * Check if there was an error on the most recent db operation performed
     * @link https://secure.php.net/manual/en/mongodb.lasterror.php
     * @return array Returns the error, if there was one.
     */
    public function lastError() {}

    /**
     * (PECL mongo &gt;= 0.9.5)<br/>
     * Checks for the last error thrown during a database operation
     * @link https://secure.php.net/manual/en/mongodb.preverror.php
     * @return array Returns the error and the number of operations ago it occurred.
     */
    public function prevError() {}

    /**
     * (PECL mongo &gt;= 0.9.5)<br/>
     * Clears any flagged errors on the database
     * @link https://secure.php.net/manual/en/mongodb.reseterror.php
     * @return array Returns the database response.
     */
    public function resetError() {}

    /**
     * (PECL mongo &gt;= 0.9.5)<br/>
     * Creates a database error
     * @link https://secure.php.net/manual/en/mongodb.forceerror.php
     * @return bool Returns the database response.
     */
    public function forceError() {}

    /**
     * (PECL mongo &gt;= 1.0.1)<br/>
     * Log in to this database
     *
     * @link https://secure.php.net/manual/en/mongodb.authenticate.php
     *
     * @param string $username The username.
     * @param string $password The password (in plaintext).
     *
     * @return array <p>Returns database response. If the login was successful, it will return 1.</p>
     * <p>
     * <span style="color: #0000BB">&lt;?php<br></span>
     * <span style="color: #007700">array(</span>
     * <span style="color: #DD0000">"ok"&nbsp;</span>
     * <span style="color: #007700">=&gt;&nbsp;</span>
     * <span style="color: #0000BB">1</span>
     * <span style="color: #007700">);<br></span>
     * <span style="color: #0000BB">?&gt;</span>
     * </p>
     * <p> If something went wrong, it will return </p>
     * <p>
     * <span style="color: #0000BB">&lt;?php<br></span>
     * <span style="color: #007700">array(</span>
     * <span style="color: #DD0000">"ok"&nbsp;</span>
     * <span style="color: #007700">=&gt;&nbsp;</span>
     * <span style="color: #0000BB">0</span>
     * <span style="color: #007700">,&nbsp;</span>
     * <span style="color: #DD0000">"errmsg"&nbsp;</span>
     * <span style="color: #007700">=&gt;&nbsp;</span>
     * <span style="color: #DD0000">"auth&nbsp;fails"</span>
     * <span style="color: #007700">);<br></span>
     * <span style="color: #0000BB">?&gt;</span>
     * </p>
     * <p>("auth fails" could be another message, depending on database version and
     * what went wrong)</p>
     */
    public function authenticate($username, $password) {}

    /**
     * (PECL mongo &gt;= 1.3.0)<br/>
     * Get the read preference for this database
     * @link https://secure.php.net/manual/en/mongodb.getreadpreference.php
     * @return array This function returns an array describing the read preference. The array contains the values type for the string read preference mode (corresponding to the MongoClient constants), and tagsets containing a list of all tag set criteria. If no tag sets were specified, tagsets will not be present in the array.
     */
    public function getReadPreference() {}

    /**
     * (PECL mongo &gt;= 1.3.0)<br/>
     * Set the read preference for this database
     * @link https://secure.php.net/manual/en/mongodb.setreadpreference.php
     * @param string $read_preference <p>The read preference mode: <b>MongoClient::RP_PRIMARY</b>, <b>MongoClient::RP_PRIMARY_PREFERRED</b>, <b>MongoClient::RP_SECONDARY</b>, <b>MongoClient::RP_SECONDARY_PREFERRED</b>, or <b>MongoClient::RP_NEAREST</b>.</p>
     * @param array $tags [optional] <p>An array of zero or more tag sets, where each tag set is itself an array of criteria used to match tags on replica set members.</p>
     * @return bool Returns <b>TRUE</b> on success, or <b>FALSE</b> otherwise.
     */
    public function setReadPreference($read_preference, array $tags) {}

    /**
     * (PECL mongo &gt;= 1.5.0)<br/>
     * @link https://php.net/manual/en/mongodb.setwriteconcern.php
     * Set the write concern for this database
     * @param mixed $w <p>The write concern. This may be an integer denoting the number of servers required to acknowledge the write, or a string mode (e.g. "majority").</p>
     * @param int $wtimeout [optional] <p>The maximum number of milliseconds to wait for the server to satisfy the write concern.</p>
     * @return bool Returns <b>TRUE</b> on success, or <b>FALSE</b> otherwise.
     */
    public function setWriteConcern($w, $wtimeout) {}
}

/**
 * Represents a database collection.
 * @link https://secure.php.net/manual/en/class.mongocollection.php
 */
class MongoCollection
{
    /**
     * @link https://php.net/manual/en/class.mongocollection.php#mongocollection.constants.ascending
     */
    public const ASCENDING = 1;

    /**
     * @link https://php.net/manual/en/class.mongocollection.php#mongocollection.constants.descending
     */
    public const DESCENDING = -1;

    /**
     * @var MongoDB
     */
    public $db = null;

    /**
     * @var int <p>
     * The number of servers to replicate a change to before returning success.
     * Value is inherited from the parent database. The
     * {@link https://secure.php.net/manual/en/class.mongodb.php MongoDB} class has a more detailed description of
     * how <em>w</em> works.
     * </p>
     */
    public $w;

    /**
     * @var int <p>
     * The number of milliseconds to wait for <em>$this-&gt;w</em>
     * replications to take place.  Value is inherited from the parent database.
     * The {@link https://secure.php.net/manual/en/class.mongodb.php MongoDB} class has a more detailed description
     * of how <em>wtimeout</em> works.
     * </p>
     */
    public $wtimeout;

    /**
     * Creates a new collection
     * @link https://secure.php.net/manual/en/mongocollection.construct.php
     * @param MongoDB $db Parent database.
     * @param string $name Name for this collection.
     * @throws Exception
     */
    public function __construct(MongoDB $db, $name) {}

    /**
     * String representation of this collection
     * @link https://secure.php.net/manual/en/mongocollection.--tostring.php
     * @return string Returns the full name of this collection.
     */
    public function __toString() {}

    /**
     * Gets a collection
     * @link https://secure.php.net/manual/en/mongocollection.get.php
     * @param string $name The next string in the collection name.
     * @return MongoCollection
     */
    public function __get($name) {}

    /**
     * (PECL mongo &gt;= 1.3.0)<br/>
     * <p>
     * The MongoDB
     * {@link https://docs.mongodb.org/manual/applications/aggregation/ aggregation framework}
     * provides a means to calculate aggregated values without having to use
     * MapReduce. While MapReduce is powerful, it is often more difficult than
     * necessary for many simple aggregation tasks, such as totaling or averaging
     * field values.
     * </p>
     * <p>
     * This method accepts either a variable amount of pipeline operators, or a
     * single array of operators constituting the pipeline.
     * </p>
     * @link https://secure.php.net/manual/en/mongocollection.aggregate.php
     * @param array $pipeline <p> An array of pipeline operators, or just the first operator. </p>
     * @param array $op [optional] <p> The second pipeline operator.</p>
     * @param array $pipelineOperators [optional] <p> Additional pipeline operators. </p>
     * @return array The result of the aggregation as an array. The ok will be set to 1 on success, 0 on failure.
     */
    public function aggregate(array $pipeline, array $op, array $pipelineOperators) {}

    /**
     * (PECL mongo &gt;= 1.5.0)<br/>
     *
     * <p>
     * With this method you can execute Aggregation Framework pipelines and retrieve the results
     * through a cursor, instead of getting just one document back as you would with
     * {@link https://php.net/manual/en/mongocollection.aggregate.php MongoCollection::aggregate()}.
     * This method returns a {@link https://php.net/manual/en/class.mongocommandcursor.php MongoCommandCursor} object.
     * This cursor object implements the {@link https://php.net/manual/en/class.iterator.php Iterator} interface
     * just like the {@link https://php.net/manual/en/class.mongocursor.php MongoCursor} objects that are returned
     * by the {@link https://php.net/manual/en/mongocollection.find.php MongoCollection::find()} method
     * </p>
     *
     * @link https://php.net/manual/en/mongocollection.aggregatecursor.php
     *
     * @param array $pipeline          <p> The Aggregation Framework pipeline to execute. </p>
     * @param array $options            [optional] <p> Options for the aggregation command </p>
     *
     * @return MongoCommandCursor Returns a {@link https://php.net/manual/en/class.mongocommandcursor.php MongoCommandCursor} object
     */
    public function aggregateCursor(array $pipeline, array $options) {}

    /**
     * Returns this collection's name
     * @link https://secure.php.net/manual/en/mongocollection.getname.php
     * @return string
     */
    public function getName() {}

    /**
     * (PECL mongo &gt;= 1.1.0)<br/>
     * <p>
     * See {@link https://secure.php.net/manual/en/mongo.queries.php the query section} of this manual for
     * information on distributing reads to secondaries.
     * </p>
     * @link https://secure.php.net/manual/en/mongocollection.getslaveokay.php
     * @return bool Returns the value of slaveOkay for this instance.
     */
    public function getSlaveOkay() {}

    /**
     * (PECL mongo &gt;= 1.1.0)<br/>
     * <p>
     * See {@link https://secure.php.net/manual/en/mongo.queries.php the query section} of this manual for
     * information on distributing reads to secondaries.
     * </p>
     * @link https://secure.php.net/manual/en/mongocollection.setslaveokay.php
     * @param bool $ok [optional] <p>
     * If reads should be sent to secondary members of a replica set for all
     * possible queries using this {@link https://secure.php.net/manual/en/class.mongocollection.php MongoCollection}
     * instance.
     * @return bool Returns the former value of slaveOkay for this instance.
     * </p>
     */
    public function setSlaveOkay($ok = true) {}

    /**
     * (PECL mongo &gt;= 1.3.0)<br/>
     * @link https://secure.php.net/manual/en/mongocollection.getreadpreference.php
     * @return array This function returns an array describing the read preference. The array contains the values <em>type</em> for the string read preference mode
     * (corresponding to the {@link https://secure.php.net/manual/en/class.mongoclient.php MongoClient} constants), and <em>tagsets</em> containing a list of all tag set criteria. If no tag sets were specified, <em>tagsets</em> will not be present in the array.
     */
    public function getReadPreference() {}

    /**
     * (PECL mongo &gt;= 1.3.0)<br/>
     * @param string $read_preference <p>The read preference mode: <b>MongoClient::RP_PRIMARY</b>, <b>MongoClient::RP_PRIMARY_PREFERRED</b>, <b>MongoClient::RP_SECONDARY</b>, <b>MongoClient::RP_SECONDARY_PREFERRED</b>, or <b>MongoClient::RP_NEAREST</b>.</p>
     * @param array $tags [optional] <p>An array of zero or more tag sets, where each tag set is itself an array of criteria used to match tags on replica set members.<p>
     * @return bool Returns <b>TRUE</b> on success, or <b>FALSE</b> otherwise.
     */
    public function setReadPreference($read_preference, array $tags) {}

    /**
     * Drops this collection
     * @link https://secure.php.net/manual/en/mongocollection.drop.php
     * @return array Returns the database response.
     */
    public function drop() {}

    /**
     * Validates this collection
     * @link https://secure.php.net/manual/en/mongocollection.validate.php
     * @param bool $scan_data Only validate indices, not the base collection.
     * @return array Returns the database's evaluation of this object.
     */
    public function validate($scan_data = false) {}

    /**
     * Inserts an array into the collection
     * @link https://secure.php.net/manual/en/mongocollection.insert.php
     * @param array|object $a An array or object. If an object is used, it may not have protected or private properties.
     * Note: If the parameter does not have an _id key or property, a new MongoId instance will be created and assigned to it.
     * This special behavior does not mean that the parameter is passed by reference.
     * @param array $options Options for the insert.
     * <dl>
     * <dt>"w"</dt>
     * <dd>See WriteConcerns. The default value for MongoClient is 1.</dd>
     * <dt>"fsync"</dt>
     * <dd>Boolean, defaults to FALSE. Forces the insert to be synced to disk before returning success. If TRUE, an acknowledged insert is implied and will override setting w to 0.</dd>
     * <dt>"timeout"</dt>
     * <dd>Integer, defaults to MongoCursor::$timeout. If "safe" is set, this sets how long (in milliseconds) for the client to wait for a database response. If the database does not respond within the timeout period, a MongoCursorTimeoutException will be thrown.</dd>
     * <dt>"safe"</dt>
     * <dd>Deprecated. Please use the WriteConcern w option.</dd>
     * </dl>
     * @throws MongoException if the inserted document is empty or if it contains zero-length keys. Attempting to insert an object with protected and private properties will cause a zero-length key error.
     * @throws MongoCursorException if the "w" option is set and the write fails.
     * @throws MongoCursorTimeoutException if the "w" option is set to a value greater than one and the operation takes longer than MongoCursor::$timeout milliseconds to complete. This does not kill the operation on the server, it is a client-side timeout. The operation in MongoCollection::$wtimeout is milliseconds.
     * @return bool|array Returns an array containing the status of the insertion if the "w" option is set.
     * Otherwise, returns TRUE if the inserted array is not empty (a MongoException will be thrown if the inserted array is empty).
     * If an array is returned, the following keys may be present:
     * <dl>
     * <dt>ok</dt>
     * <dd>This should almost be 1 (unless last_error itself failed).</dd>
     * <dt>err</dt>
     * <dd>If this field is non-null, an error occurred on the previous operation. If this field is set, it will be a string describing the error that occurred.</dd>
     * <dt>code</dt>
     * <dd>If a database error occurred, the relevant error code will be passed back to the client.</dd>
     * <dt>errmsg</dt>
     * <dd>This field is set if something goes wrong with a database command. It is coupled with ok being 0. For example, if w is set and times out, errmsg will be set to "timed out waiting for slaves" and ok will be 0. If this field is set, it will be a string describing the error that occurred.</dd>
     * <dt>n</dt>
     * <dd>If the last operation was an update, upsert, or a remove, the number of documents affected will be returned. For insert operations, this value is always 0.</dd>
     * <dt>wtimeout</dt>
     * <dd>If the previous option timed out waiting for replication.</dd>
     * <dt>waited</dt>
     * <dd>How long the operation waited before timing out.</dd>
     * <dt>wtime</dt>
     * <dd>If w was set and the operation succeeded, how long it took to replicate to w servers.</dd>
     * <dt>upserted</dt>
     * <dd>If an upsert occurred, this field will contain the new record's _id field. For upserts, either this field or updatedExisting will be present (unless an error occurred).</dd>
     * <dt>updatedExisting</dt>
     * <dd>If an upsert updated an existing element, this field will be true. For upserts, either this field or upserted will be present (unless an error occurred).</dd>
     * </dl>
     */
    public function insert($a, array $options = []) {}

    /**
     * Inserts multiple documents into this collection
     * @link https://secure.php.net/manual/en/mongocollection.batchinsert.php
     * @param array $a An array of arrays.
     * @param array $options Options for the inserts.
     * @throws MongoCursorException
     * @return array|bool if "safe" is set, returns an associative array with the status of the inserts ("ok") and any error that may have occurred ("err"). Otherwise, returns TRUE if the batch insert was successfully sent, FALSE otherwise.
     */
    public function batchInsert(array $a, array $options = []) {}

    /**
     * Update records based on a given criteria
     * @link https://secure.php.net/manual/en/mongocollection.update.php
     * @param array $criteria Description of the objects to update.
     * @param array $newobj The object with which to update the matching records.
     * @param array $options This parameter is an associative array of the form
     *        array("optionname" => boolean, ...).
     *
     *        Currently supported options are:
     *          "upsert": If no document matches $$criteria, a new document will be created from $$criteria and $$new_object (see upsert example).
     *
     *          "multiple": All documents matching $criteria will be updated. MongoCollection::update has exactly the opposite behavior of MongoCollection::remove- it updates one document by
     *          default, not all matching documents. It is recommended that you always specify whether you want to update multiple documents or a single document, as the
     *          database may change its default behavior at some point in the future.
     *
     *          "safe" Can be a boolean or integer, defaults to false. If false, the program continues executing without waiting for a database response. If true, the program will wait for
     *          the database response and throw a MongoCursorException if the update did not succeed. If you are using replication and the master has changed, using "safe" will make the driver
     *          disconnect from the master, throw and exception, and attempt to find a new master on the next operation (your application must decide whether or not to retry the operation on the new master).
     *          If you do not use "safe" with a replica set and the master changes, there will be no way for the driver to know about the change so it will continuously and silently fail to write.
     *          If safe is an integer, will replicate the update to that many machines before returning success (or throw an exception if the replication times out, see wtimeout).
     *          This overrides the w variable set on the collection.
     *
     *         "fsync": Boolean, defaults to false. Forces the update to be synced to disk before returning success. If true, a safe update is implied and will override setting safe to false.
     *
     *         "timeout" Integer, defaults to MongoCursor::$timeout. If "safe" is set, this sets how long (in milliseconds) for the client to wait for a database response. If the database does
     *         not respond within the timeout period, a MongoCursorTimeoutException will be thrown
     * @throws MongoCursorException
     * @return bool
     */
    public function update(array $criteria, array $newobj, array $options = []) {}

    /**
     * (PECL mongo &gt;= 0.9.0)<br/>
     * Remove records from this collection
     * @link https://secure.php.net/manual/en/mongocollection.remove.php
     * @param array $criteria [optional] <p>Query criteria for the documents to delete.</p>
     * @param array $options [optional] <p>An array of options for the remove operation. Currently available options
     * include:
     * </p><ul>
     * <li><p><em>"w"</em></p><p>See {@link https://secure.php.net/manual/en/mongo.writeconcerns.php Write Concerns}. The default value for <b>MongoClient</b> is <em>1</em>.</p></li>
     * <li>
     * <p>
     * <em>"justOne"</em>
     * </p>
     * <p>
     * Specify <strong><code>TRUE</code></strong> to limit deletion to just one document. If <strong><code>FALSE</code></strong> or
     * omitted, all documents matching the criteria will be deleted.
     * </p>
     * </li>
     * <li><p><em>"fsync"</em></p><p>Boolean, defaults to <b>FALSE</b>. If journaling is enabled, it works exactly like <em>"j"</em>. If journaling is not enabled, the write operation blocks until it is synced to database files on disk. If <strong><code>TRUE</code></strong>, an acknowledged insert is implied and this option will override setting <em>"w"</em> to <em>0</em>.</p><blockquote class="note"><p><strong class="note">Note</strong>: <span class="simpara">If journaling is enabled, users are strongly encouraged to use the <em>"j"</em> option instead of <em>"fsync"</em>. Do not use <em>"fsync"</em> and <em>"j"</em> simultaneously, as that will result in an error.</p></blockquote></li>
     * <li><p><em>"j"</em></p><p>Boolean, defaults to <b>FALSE</b>. Forces the write operation to block until it is synced to the journal on disk. If <strong><code>TRUE</code></strong>, an acknowledged write is implied and this option will override setting <em>"w"</em> to <em>0</em>.</p><blockquote class="note"><p><strong class="note">Note</strong>: <span class="simpara">If this option is used and journaling is disabled, MongoDB 2.6+ will raise an error and the write will fail; older server versions will simply ignore the option.</p></blockquote></li>
     * <li><p><em>"socketTimeoutMS"</em></p><p>This option specifies the time limit, in milliseconds, for socket communication. If the server does not respond within the timeout period, a <b>MongoCursorTimeoutException</b> will be thrown and there will be no way to determine if the server actually handled the write or not. A value of <em>-1</em> may be specified to block indefinitely. The default value for <b>MongoClient</b> is <em>30000</em> (30 seconds).</p></li>
     * <li><p><em>"w"</em></p><p>See {@link https://secure.php.net/manual/en/mongo.writeconcerns.php Write Concerns}. The default value for <b>MongoClient</b> is <em>1</em>.</p></li>
     * <li><p><em>"wTimeoutMS"</em></p><p>This option specifies the time limit, in milliseconds, for {@link https://secure.php.net/manual/en/mongo.writeconcerns.php write concern} acknowledgement. It is only applicable when <em>"w"</em> is greater than <em>1</em>, as the timeout pertains to replication. If the write concern is not satisfied within the time limit, a <a href="class.mongocursorexception.php" class="classname">MongoCursorException</a> will be thrown. A value of <em>0</em> may be specified to block indefinitely. The default value for {@link https://secure.php.net/manual/en/class.mongoclient.php MongoClient} is <em>10000</em> (ten seconds).</p></li>
     * </ul>
     *
     * <p>
     * The following options are deprecated and should no longer be used:
     * </p><ul>
     * <li><p><em>"safe"</em></p><p>Deprecated. Please use the {@link https://secure.php.net/manual/en/mongo.writeconcerns.php write concern} <em>"w"</em> option.</p></li>
     * <li><p><em>"timeout"</em></p><p>Deprecated alias for <em>"socketTimeoutMS"</em>.</p></li>
     * <li><p><b>"wtimeout"</b></p><p>Deprecated alias for <em>"wTimeoutMS"</em>.</p></li></ul>
     * @throws MongoCursorException
     * @throws MongoCursorTimeoutException
     * @return bool|array <p>Returns an array containing the status of the removal if the
     * <em>"w"</em> option is set. Otherwise, returns <b>TRUE</b>.
     * </p>
     * <p>
     * Fields in the status array are described in the documentation for
     * <b>MongoCollection::insert()</b>.
     * </p>
     */
    public function remove(array $criteria = [], array $options = []) {}

    /**
     * Querys this collection
     * @link https://secure.php.net/manual/en/mongocollection.find.php
     * @param array $query The fields for which to search.
     * @param array $fields Fields of the results to return.
     * @return MongoCursor
     */
    public function find(array $query = [], array $fields = []) {}

    /**
     * Retrieve a list of distinct values for the given key across a collection
     * @link https://secure.php.net/manual/en/mongocollection.distinct.php
     * @param string $key The key to use.
     * @param array $query An optional query parameters
     * @return array|false Returns an array of distinct values, or <b>FALSE</b> on failure
     */
    public function distinct($key, array $query = null) {}

    /**
     * Update a document and return it
     * @link https://secure.php.net/manual/en/mongocollection.findandmodify.php
     * @param array $query The query criteria to search for.
     * @param array $update The update criteria.
     * @param array $fields Optionally only return these fields.
     * @param array $options An array of options to apply, such as remove the match document from the DB and return it.
     * @return array Returns the original document, or the modified document when new is set.
     */
    public function findAndModify(array $query, array $update = null, array $fields = null, array $options = null) {}

    /**
     * Querys this collection, returning a single element
     * @link https://secure.php.net/manual/en/mongocollection.findone.php
     * @param array $query The fields for which to search.
     * @param array $fields Fields of the results to return.
     * @param array $options This parameter is an associative array of the form array("name" => `<value>`, ...).
     * @return array|null
     */
    public function findOne(array $query = [], array $fields = [], array $options = []) {}

    /**
     * Creates an index on the given field(s), or does nothing if the index already exists
     * @link https://secure.php.net/manual/en/mongocollection.createindex.php
     * @param array $keys Field or fields to use as index.
     * @param array $options [optional] This parameter is an associative array of the form array("optionname" => `<boolean>`, ...).
     * @return array Returns the database response.
     */
    public function createIndex(array $keys, array $options = []) {}

    /**
     * Creates an index on the given field(s), or does nothing if the index already exists
     * @link https://secure.php.net/manual/en/mongocollection.ensureindex.php
     * @param array $keys Field or fields to use as index.
     * @param array $options [optional] This parameter is an associative array of the form array("optionname" => `<boolean>`, ...).
     * @return true always true
     * @see MongoCollection::createIndex()
     */
    #[Deprecated('Use MongoCollection::createIndex() instead.')]
    public function ensureIndex(array $keys, array $options = []) {}

    /**
     * Deletes an index from this collection
     * @link https://secure.php.net/manual/en/mongocollection.deleteindex.php
     * @param string|array $keys Field or fields from which to delete the index.
     * @return array Returns the database response.
     */
    public function deleteIndex($keys) {}

    /**
     * Delete all indexes for this collection
     * @link https://secure.php.net/manual/en/mongocollection.deleteindexes.php
     * @return array Returns the database response.
     */
    public function deleteIndexes() {}

    /**
     * Returns an array of index names for this collection
     * @link https://secure.php.net/manual/en/mongocollection.getindexinfo.php
     * @return array Returns a list of index names.
     */
    public function getIndexInfo() {}

    /**
     * Counts the number of documents in this collection
     * @link https://secure.php.net/manual/en/mongocollection.count.php
     * @param array|stdClass $query
     * @return int Returns the number of documents matching the query.
     */
    public function count($query = []) {}

    /**
     * Saves an object to this collection
     * @link https://secure.php.net/manual/en/mongocollection.save.php
     * @param array|object $a Array to save. If an object is used, it may not have protected or private properties.
     * Note: If the parameter does not have an _id key or property, a new MongoId instance will be created and assigned to it.
     * See MongoCollection::insert() for additional information on this behavior.
     * @param array $options Options for the save.
     * <dl>
     * <dt>"w"
     * <dd>See WriteConcerns. The default value for MongoClient is 1.
     * <dt>"fsync"
     * <dd>Boolean, defaults to FALSE. Forces the insert to be synced to disk before returning success. If TRUE, an acknowledged insert is implied and will override setting w to 0.
     * <dt>"timeout"
     * <dd>Integer, defaults to MongoCursor::$timeout. If "safe" is set, this sets how long (in milliseconds) for the client to wait for a database response. If the database does not respond within the timeout period, a MongoCursorTimeoutException will be thrown.
     * <dt>"safe"
     * <dd>Deprecated. Please use the WriteConcern w option.
     * </dl>
     * @throws MongoException if the inserted document is empty or if it contains zero-length keys. Attempting to insert an object with protected and private properties will cause a zero-length key error.
     * @throws MongoCursorException if the "w" option is set and the write fails.
     * @throws MongoCursorTimeoutException if the "w" option is set to a value greater than one and the operation takes longer than MongoCursor::$timeout milliseconds to complete. This does not kill the operation on the server, it is a client-side timeout. The operation in MongoCollection::$wtimeout is milliseconds.
     * @return array|bool If w was set, returns an array containing the status of the save.
     * Otherwise, returns a boolean representing if the array was not empty (an empty array will not be inserted).
     */
    public function save($a, array $options = []) {}

    /**
     * Creates a database reference
     * @link https://secure.php.net/manual/en/mongocollection.createdbref.php
     * @param array $a Object to which to create a reference.
     * @return array Returns a database reference array.
     */
    public function createDBRef(array $a) {}

    /**
     * Fetches the document pointed to by a database reference
     * @link https://secure.php.net/manual/en/mongocollection.getdbref.php
     * @param array $ref A database reference.
     * @return array Returns the database document pointed to by the reference.
     */
    public function getDBRef(array $ref) {}

    /**
     * @param  mixed $keys
     * @return string
     */
    protected static function toIndexString($keys) {}

    /**
     * Performs an operation similar to SQL's GROUP BY command
     * @link https://secure.php.net/manual/en/mongocollection.group.php
     * @param mixed $keys Fields to group by. If an array or non-code object is passed, it will be the key used to group results.
     * @param array $initial Initial value of the aggregation counter object.
     * @param MongoCode $reduce A function that aggregates (reduces) the objects iterated.
     * @param array $condition An condition that must be true for a row to be considered.
     * @return array
     */
    public function group($keys, array $initial, MongoCode $reduce, array $condition = []) {}
}

/**
 * Result object for database query.
 * @link https://secure.php.net/manual/en/class.mongocursor.php
 */
class MongoCursor implements Iterator
{
    /**
     * @link https://php.net/manual/en/class.mongocursor.php#mongocursor.props.slaveokay
     * @var bool
     */
    public static $slaveOkay = false;

    /**
     * @var int <p>
     * Set timeout in milliseconds for all database responses. Use
     * <em>-1</em> to wait forever. Can be overridden with
     * {link https://secure.php.net/manual/en/mongocursor.timeout.php MongoCursor::timeout()}. This does not cause the
     * MongoDB server to cancel the operation; it only instructs the driver to
     * stop waiting for a response and throw a
     * {@link https://php.net/manual/en/class.mongocursortimeoutexception.php MongoCursorTimeoutException} after a set time.
     * </p>
     */
    public static $timeout = 30000;

    /**
     * Create a new cursor
     * @link https://secure.php.net/manual/en/mongocursor.construct.php
     * @param MongoClient $connection Database connection.
     * @param string $ns Full name of database and collection.
     * @param array $query Database query.
     * @param array $fields Fields to return.
     */
    public function __construct($connection, $ns, array $query = [], array $fields = []) {}

    /**
     * (PECL mongo &gt;= 1.2.11)<br/>
     * Sets whether this cursor will wait for a while for a tailable cursor to return more data
     * @param bool $wait [optional] <p>If the cursor should wait for more data to become available.</p>
     * @return MongoCursor Returns this cursor.
     */
    public function awaitData($wait = true) {}

    /**
     * Checks if there are any more elements in this cursor
     * @link https://secure.php.net/manual/en/mongocursor.hasnext.php
     * @throws MongoConnectionException
     * @throws MongoCursorTimeoutException
     * @return bool Returns true if there is another element
     */
    public function hasNext() {}

    /**
     * Return the next object to which this cursor points, and advance the cursor
     * @link https://secure.php.net/manual/en/mongocursor.getnext.php
     * @throws MongoConnectionException
     * @throws MongoCursorTimeoutException
     * @return array Returns the next object
     */
    public function getNext() {}

    /**
     * (PECL mongo &gt;= 1.3.3)<br/>
     * @link https://secure.php.net/manual/en/mongocursor.getreadpreference.php
     * @return array This function returns an array describing the read preference. The array contains the values <em>type</em> for the string
     * read preference mode (corresponding to the {@link https://secure.php.net/manual/en/class.mongoclient.php MongoClient} constants), and <em>tagsets</em> containing a list of all tag set criteria. If no tag sets were specified, <em>tagsets</em> will not be present in the array.
     */
    public function getReadPreference() {}

    /**
     * Limits the number of results returned
     * @link https://secure.php.net/manual/en/mongocursor.limit.php
     * @param int $num The number of results to return.
     * @throws MongoCursorException
     * @return MongoCursor Returns this cursor
     */
    public function limit($num) {}

    /**
     * (PECL mongo &gt;= 1.2.0)<br/>
     * @link https://secure.php.net/manual/en/mongocursor.partial.php
     * @param bool $okay [optional] <p>If receiving partial results is okay.</p>
     * @return MongoCursor Returns this cursor.
     */
    public function partial($okay = true) {}

    /**
     * (PECL mongo &gt;= 1.2.1)<br/>
     * @link https://secure.php.net/manual/en/mongocursor.setflag.php
     * @param int $flag <p>
     * Which flag to set. You can not set flag 6 (EXHAUST) as the driver does
     * not know how to handle them. You will get a warning if you try to use
     * this flag. For available flags, please refer to the wire protocol
     * {@link https://www.mongodb.org/display/DOCS/Mongo+Wire+Protocol#MongoWireProtocol-OPQUERY documentation}.
     * </p>
     * @param bool $set [optional] <p>Whether the flag should be set (<b>TRUE</b>) or unset (<b>FALSE</b>).</p>
     * @return MongoCursor
     */
    public function setFlag($flag, $set = true) {}

    /**
     * (PECL mongo &gt;= 1.3.3)<br/>
     * @link https://secure.php.net/manual/en/mongocursor.setreadpreference.php
     * @param string $read_preference <p>The read preference mode: MongoClient::RP_PRIMARY, MongoClient::RP_PRIMARY_PREFERRED, MongoClient::RP_SECONDARY, MongoClient::RP_SECONDARY_PREFERRED, or MongoClient::RP_NEAREST.</p>
     * @param array $tags [optional] <p>The read preference mode: MongoClient::RP_PRIMARY, MongoClient::RP_PRIMARY_PREFERRED, MongoClient::RP_SECONDARY, MongoClient::RP_SECONDARY_PREFERRED, or MongoClient::RP_NEAREST.</p>
     * @return MongoCursor Returns this cursor.
     */
    public function setReadPreference($read_preference, array $tags) {}

    /**
     * Skips a number of results
     * @link https://secure.php.net/manual/en/mongocursor.skip.php
     * @param int $num The number of results to skip.
     * @throws MongoCursorException
     * @return MongoCursor Returns this cursor
     */
    public function skip($num) {}

    /**
     * Sets whether this query can be done on a slave
     * This method will override the static class variable slaveOkay.
     * @link https://secure.php.net/manual/en/mongocursor.slaveOkay.php
     * @param bool $okay If it is okay to query the slave.
     * @throws MongoCursorException
     * @return MongoCursor Returns this cursor
     */
    public function slaveOkay($okay = true) {}

    /**
     * Sets whether this cursor will be left open after fetching the last results
     * @link https://secure.php.net/manual/en/mongocursor.tailable.php
     * @param bool $tail If the cursor should be tailable.
     * @return MongoCursor Returns this cursor
     */
    public function tailable($tail = true) {}

    /**
     * Sets whether this cursor will timeout
     * @link https://secure.php.net/manual/en/mongocursor.immortal.php
     * @param bool $liveForever If the cursor should be immortal.
     * @throws MongoCursorException
     * @return MongoCursor Returns this cursor
     */
    public function immortal($liveForever = true) {}

    /**
     * Sets a client-side timeout for this query
     * @link https://secure.php.net/manual/en/mongocursor.timeout.php
     * @param int $ms The number of milliseconds for the cursor to wait for a response. By default, the cursor will wait forever.
     * @throws MongoCursorTimeoutException
     * @return MongoCursor Returns this cursor
     */
    public function timeout($ms) {}

    /**
     * Checks if there are documents that have not been sent yet from the database for this cursor
     * @link https://secure.php.net/manual/en/mongocursor.dead.php
     * @return bool Returns if there are more results that have not been sent to the client, yet.
     */
    public function dead() {}

    /**
     * Use snapshot mode for the query
     * @link https://secure.php.net/manual/en/mongocursor.snapshot.php
     * @throws MongoCursorException
     * @return MongoCursor Returns this cursor
     */
    public function snapshot() {}

    /**
     * Sorts the results by given fields
     * @link https://secure.php.net/manual/en/mongocursor.sort.php
     * @param array $fields An array of fields by which to sort. Each element in the array has as key the field name, and as value either 1 for ascending sort, or -1 for descending sort
     * @throws MongoCursorException
     * @return MongoCursor Returns the same cursor that this method was called on
     */
    public function sort(array $fields) {}

    /**
     * Gives the database a hint about the query
     * @link https://secure.php.net/manual/en/mongocursor.hint.php
     * @param mixed $key_pattern Indexes to use for the query.
     * @throws MongoCursorException
     * @return MongoCursor Returns this cursor
     */
    public function hint($key_pattern) {}

    /**
     * Adds a top-level key/value pair to a query
     * @link https://secure.php.net/manual/en/mongocursor.addoption.php
     * @param string $key Fieldname to add.
     * @param mixed $value Value to add.
     * @throws MongoCursorException
     * @return MongoCursor Returns this cursor
     */
    public function addOption($key, $value) {}

    /**
     * Execute the query
     * @link https://secure.php.net/manual/en/mongocursor.doquery.php
     * @throws MongoConnectionException if it cannot reach the database.
     * @return void
     */
    protected function doQuery() {}

    /**
     * Returns the current element
     * @link https://secure.php.net/manual/en/mongocursor.current.php
     * @return array
     */
    public function current() {}

    /**
     * Returns the current result's _id
     * @link https://secure.php.net/manual/en/mongocursor.key.php
     * @return string The current result's _id as a string.
     */
    public function key() {}

    /**
     * Advances the cursor to the next result
     * @link https://secure.php.net/manual/en/mongocursor.next.php
     * @throws MongoConnectionException
     * @throws MongoCursorTimeoutException
     * @return void
     */
    public function next() {}

    /**
     * Returns the cursor to the beginning of the result set
     * @throws MongoConnectionException
     * @throws MongoCursorTimeoutException
     * @return void
     */
    public function rewind() {}

    /**
     * Checks if the cursor is reading a valid result.
     * @link https://secure.php.net/manual/en/mongocursor.valid.php
     * @return bool If the current result is not null.
     */
    public function valid() {}

    /**
     * Clears the cursor
     * @link https://secure.php.net/manual/en/mongocursor.reset.php
     * @return void
     */
    public function reset() {}

    /**
     * Return an explanation of the query, often useful for optimization and debugging
     * @link https://secure.php.net/manual/en/mongocursor.explain.php
     * @return array Returns an explanation of the query.
     */
    public function explain() {}

    /**
     * Counts the number of results for this query
     * @link https://secure.php.net/manual/en/mongocursor.count.php
     * @param bool $all Send cursor limit and skip information to the count function, if applicable.
     * @return int The number of documents returned by this cursor's query.
     */
    public function count($all = false) {}

    /**
     * Sets the fields for a query
     * @link https://secure.php.net/manual/en/mongocursor.fields.php
     * @param array $f Fields to return (or not return).
     * @throws MongoCursorException
     * @return MongoCursor
     */
    public function fields(array $f) {}

    /**
     * Gets the query, fields, limit, and skip for this cursor
     * @link https://secure.php.net/manual/en/mongocursor.info.php
     * @return array The query, fields, limit, and skip for this cursor as an associative array.
     */
    public function info() {}

    /**
     * PECL mongo >= 1.0.11
     * Limits the number of elements returned in one batch.
     * <p>A cursor typically fetches a batch of result objects and store them locally.
     * This method sets the batchSize value to configure the amount of documents retrieved from the server in one data packet.
     * However, it will never return more documents than fit in the max batch size limit (usually 4MB).
     * </p>
     *
     * @param int $batchSize The number of results to return per batch. Each batch requires a round-trip to the server.
     * <p>If batchSize is 2 or more, it represents the size of each batch of objects retrieved.
     * It can be adjusted to optimize performance and limit data transfer.
     * </p>
     *
     * <p>If batchSize is 1 or negative, it will limit of number returned documents to the absolute value of batchSize,
     * and the cursor will be closed. For example if batchSize is -10, then the server will return a maximum of 10
     * documents and as many as can fit in 4MB, then close the cursor.
     * </p>
     * <b>Warning</b>
     * <p>A batchSize of 1 is special, and means the same as -1, i.e. a value of 1 makes the cursor only capable of returning one document.
     * </p>
     * <p>Note that this feature is different from MongoCursor::limit() in that documents must fit within a maximum size,
     * and it removes the need to send a request to close the cursor server-side.
     * The batch size can be changed even after a cursor is iterated, in which case the setting will apply on the next batch retrieval.
     * </p>
     * <p>This cannot override MongoDB's limit on the amount of data it will return to the client (i.e.,
     * if you set batch size to 1,000,000,000, MongoDB will still only return 4-16MB of results per batch).
     * </p>
     * <p>To ensure consistent behavior, the rules of MongoCursor::batchSize() and MongoCursor::limit() behave a little complex
     * but work "as expected". The rules are: hard limits override soft limits with preference given to MongoCursor::limit() over
     * MongoCursor::batchSize(). After that, whichever is set and lower than the other will take precedence.
     * See below. section for some examples.
     * </p>
     *
     * @return MongoCursor Returns this cursor.
     * @link https://secure.php.net/manual/en/mongocursor.batchsize.php
     */
    public function batchSize($batchSize) {}

    /**
     * (PECL mongo >= 1.5.0)
     * Sets a server-side timeout for this query
     * @link https://php.net/manual/en/mongocursor.maxtimems.php
     * @param int $ms <p>
     * Specifies a cumulative time limit in milliseconds to be allowed by the
     * server for processing operations on the cursor.
     * </p>
     * @return MongoCursor This cursor.
     */
    public function maxTimeMS($ms) {}
}

class MongoCommandCursor implements MongoCursorInterface
{
    /**
     * Return the current element
     * @link https://php.net/manual/en/iterator.current.php
     * @return mixed Can return any type.
     * @since 5.0.0
     */
    public function current() {}

    /**
     * Move forward to next element
     * @link https://php.net/manual/en/iterator.next.php
     * @return void Any returned value is ignored.
     * @since 5.0.0
     */
    public function next() {}

    /**
     * Return the key of the current element
     * @link https://php.net/manual/en/iterator.key.php
     * @return mixed scalar on success, or null on failure.
     * @since 5.0.0
     */
    public function key() {}

    /**
     * Checks if current position is valid
     * @link https://php.net/manual/en/iterator.valid.php
     * @return bool The return value will be casted to boolean and then evaluated.
     * Returns true on success or false on failure.
     * @since 5.0.0
     */
    public function valid() {}

    /**
     * Rewind the Iterator to the first element
     * @link https://php.net/manual/en/iterator.rewind.php
     * @return void Any returned value is ignored.
     * @since 5.0.0
     */
    public function rewind() {}

    public function batchSize(int $batchSize): MongoCursorInterface {}

    public function dead(): bool {}

    public function info(): array {}

    public function getReadPreference(): array {}

    public function setReadPreference(string $read_preference, array $tags = null): MongoCursorInterface {}

    public function timeout(int $ms): MongoCursorInterface {}
}

interface MongoCursorInterface extends Iterator
{
    public function batchSize(int $batchSize): MongoCursorInterface;

    public function dead(): bool;

    public function info(): array;

    public function getReadPreference(): array;

    public function setReadPreference(string $read_preference, array $tags = null): MongoCursorInterface;

    public function timeout(int $ms): MongoCursorInterface;
}

class MongoGridFS extends MongoCollection
{
    public const ASCENDING = 1;
    public const DESCENDING = -1;

    /**
     * @link https://php.net/manual/en/class.mongogridfs.php#mongogridfs.props.chunks
     * @var MongoCollection
     */
    public $chunks;

    /**
     * @link https://php.net/manual/en/class.mongogridfs.php#mongogridfs.props.filesname
     * @var string
     */
    protected $filesName;

    /**
     * @link https://php.net/manual/en/class.mongogridfs.php#mongogridfs.props.chunksname
     * @var string
     */
    protected $chunksName;

    /**
     * Files as stored across two collections, the first containing file meta
     * information, the second containing chunks of the actual file. By default,
     * fs.files and fs.chunks are the collection names used.
     *
     * @link https://php.net/manual/en/mongogridfs.construct.php
     * @param MongoDB $db Database
     * @param string $prefix [optional] <p>Optional collection name prefix.</p>
     * @param mixed $chunks  [optional]
     */
    public function __construct($db, $prefix = "fs", $chunks = "fs") {}

    /**
     * Drops the files and chunks collections
     * @link https://php.net/manual/en/mongogridfs.drop.php
     * @return array The database response
     */
    public function drop() {}

    /**
     * @link https://php.net/manual/en/mongogridfs.find.php
     * @param array $query The query
     * @param array $fields Fields to return
     * @return MongoGridFSCursor A MongoGridFSCursor
     */
    public function find(array $query = [], array $fields = []) {}

    /**
     * Stores a file in the database
     * @link https://php.net/manual/en/mongogridfs.storefile.php
     * @param string|resource $filename The name of the file
     * @param array $extra Other metadata to add to the file saved
     * @param array $options Options for the store. "safe": Check that this store succeeded
     * @return mixed Returns the _id of the saved object
     */
    public function storeFile($filename, $extra = [], $options = []) {}

    /**
     * Chunkifies and stores bytes in the database
     * @link https://php.net/manual/en/mongogridfs.storebytes.php
     * @param string $bytes A string of bytes to store
     * @param array $extra Other metadata to add to the file saved
     * @param array $options Options for the store. "safe": Check that this store succeeded
     * @return mixed The _id of the object saved
     */
    public function storeBytes($bytes, $extra = [], $options = []) {}

    /**
     * Returns a single file matching the criteria
     * @link https://secure.php.net/manual/en/mongogridfs.findone.php
     * @param array $query The fields for which to search.
     * @param array $fields Fields of the results to return.
     * @return MongoGridFSFile|null
     */
    public function findOne(array $query = [], array $fields = []) {}

    /**
     * Removes files from the collections
     * @link https://secure.php.net/manual/en/mongogridfs.remove.php
     * @param array $criteria Description of records to remove.
     * @param array $options Options for remove. Valid options are: "safe"- Check that the remove succeeded.
     * @throws MongoCursorException
     * @return bool
     */
    public function remove(array $criteria = [], array $options = []) {}

    /**
     * Delete a file from the database
     * @link https://php.net/manual/en/mongogridfs.delete.php
     * @param mixed $id _id of the file to remove
     * @return bool Returns true if the remove was successfully sent to the database.
     */
    public function delete($id) {}

    /**
     * Saves an uploaded file directly from a POST to the database
     * @link https://secure.php.net/manual/en/mongogridfs.storeupload.php
     * @param string $name The name attribute of the uploaded file, from <code>&#x3C;input type=&#x22;file&#x22; name=&#x22;something&#x22;/&#x3E;</code>
     * @param array $metadata An array of extra fields for the uploaded file.
     * @return mixed Returns the _id of the uploaded file.
     */
    public function storeUpload($name, array $metadata = []) {}

    /**
     * Retrieve a file from the database
     * @link https://secure.php.net/manual/en/mongogridfs.get.php
     * @param mixed $id _id of the file to find.
     * @return MongoGridFSFile|null Returns the file, if found, or NULL.
     */
    public function get($id) {}

    /**
     * Stores a file in the database
     * @link https://php.net/manual/en/mongogridfs.put.php
     * @param string $filename The name of the file
     * @param array $extra Other metadata to add to the file saved
     * @return mixed Returns the _id of the saved object
     */
    public function put($filename, array $extra = []) {}
}

class MongoGridFSFile
{
    /**
     * @link https://php.net/manual/en/class.mongogridfsfile.php#mongogridfsfile.props.file
     * @var array|null
     */
    public $file;

    /**
     * @link https://php.net/manual/en/class.mongogridfsfile.php#mongogridfsfile.props.gridfs
     * @var MongoGridFS|null
     */
    protected $gridfs;

    /**
     * @link https://php.net/manual/en/mongogridfsfile.construct.php
     * @param MongoGridFS $gridfs The parent MongoGridFS instance
     * @param array $file A file from the database
     */
    public function __construct($gridfs, array $file) {}

    /**
     * Returns this file's filename
     * @link https://php.net/manual/en/mongogridfsfile.getfilename.php
     * @return string Returns the filename
     */
    public function getFilename() {}

    /**
     * Returns this file's size
     * @link https://php.net/manual/en/mongogridfsfile.getsize.php
     * @return int Returns this file's size
     */
    public function getSize() {}

    /**
     * Writes this file to the filesystem
     * @link https://php.net/manual/en/mongogridfsfile.write.php
     * @param string $filename The location to which to write the file (path+filename+extension). If none is given, the stored filename will be used.
     * @return int Returns the number of bytes written
     */
    public function write($filename = null) {}

    /**
     * This will load the file into memory. If the file is bigger than your memory, this will cause problems!
     * @link https://php.net/manual/en/mongogridfsfile.getbytes.php
     * @return string Returns a string of the bytes in the file
     */
    public function getBytes() {}

    /**
     * This method returns a stream resource that can be used to read the stored file with all file functions in PHP.
     * The contents of the file are pulled out of MongoDB on the fly, so that the whole file does not have to be loaded into memory first.
     * At most two GridFSFile chunks will be loaded in memory.
     *
     * @link https://php.net/manual/en/mongogridfsfile.getresource.php
     * @return resource Returns a resource that can be used to read the file with
     */
    public function getResource() {}
}

class MongoGridFSCursor extends MongoCursor implements Traversable, Iterator
{
    /**
     * @var bool
     */
    public static $slaveOkay;

    /**
     * @link https://php.net/manual/en/class.mongogridfscursor.php#mongogridfscursor.props.gridfs
     * @var MongoGridFS|null
     */
    protected $gridfs;

    /**
     * Create a new cursor
     * @link https://php.net/manual/en/mongogridfscursor.construct.php
     * @param MongoGridFS $gridfs Related GridFS collection
     * @param resource $connection Database connection
     * @param string $ns Full name of database and collection
     * @param array $query Database query
     * @param array $fields Fields to return
     */
    public function __construct($gridfs, $connection, $ns, $query, $fields) {}

    /**
     * Return the next file to which this cursor points, and advance the cursor
     * @link https://php.net/manual/en/mongogridfscursor.getnext.php
     * @return MongoGridFSFile Returns the next file
     */
    public function getNext() {}

    /**
     * Returns the current file
     * @link https://php.net/manual/en/mongogridfscursor.current.php
     * @return MongoGridFSFile The current file
     */
    public function current() {}

    /**
     * Returns the current result's filename
     * @link https://php.net/manual/en/mongogridfscursor.key.php
     * @return string The current results filename
     */
    public function key() {}
}

/**
 * A unique identifier created for database objects.
 * @link https://secure.php.net/manual/en/class.mongoid.php
 */
class MongoId
{
     /**
      * @var string <p> Note: The property name begins with a $ character. It may be accessed using
      * {@link https://php.net/manual/en/language.types.string.php#language.types.string.parsing.complex complex variable parsed syntax} (e.g. $mongoId->{'$id'}).</p>
      */
     public $id = null;

    /**
     * (PECL mongo &gt;= 0.8.0)
     * Creates a new id
     * @link https://secure.php.net/manual/en/mongoid.construct.php
     * @param MongoId|string $id [optional] A string to use as the id. Must be 24 hexadecimal characters. If an invalid string is passed to this constructor, the constructor will ignore it and create a new id value.
     */
    public function __construct($id = null) {}

    /**
     * (PECL mongo &gt;= 0.8.0)
     * Check if a value is a valid ObjectId
     * @link https://php.net/manual/en/mongoid.isvalid.php
     * @param mixed $value The value to check for validity.
     * @return bool <p>
     * Returns <b>TRUE</b> if <i>value</i> is a
     * MongoId instance or a string consisting of exactly 24
     * hexadecimal characters; otherwise, <b>FALSE</b> is returned.
     * </p>
     */
    public static function isValid($value) {}

    /**
     * (PECL mongo &gt;= 0.8.0)
     * Returns a hexadecimal representation of this id
     * @link https://secure.php.net/manual/en/mongoid.tostring.php
     * @return string This id.
     */
    public function __toString() {}

    /**
     * (PECL mongo &gt;= 1.0.11)
     * Gets the incremented value to create this id
     * @link https://php.net/manual/en/mongoid.getinc.php
     * @return int Returns the incremented value used to create this MongoId.
     */
    public function getInc() {}

    /**
     * (PECL mongo &gt;= 1.0.11)
     * Gets the process ID
     * @link https://php.net/manual/en/mongoid.getpid.php
     * @return int Returns the PID of the MongoId.
     */
    public function getPID() {}

    /**
     * (PECL mongo &gt;= 1.0.1)
     * Gets the number of seconds since the epoch that this id was created
     * @link https://secure.php.net/manual/en/mongoid.gettimestamp.php
     * @return int
     */
    public function getTimestamp() {}

    /**
     * (PECL mongo &gt;= 1.0.8)
     * Gets the hostname being used for this machine's ids
     * @link https://secure.php.net/manual/en/mongoid.gethostname.php
     * @return string Returns the hostname.
     */
    public static function getHostname() {}

    /**
     * (PECL mongo &gt;= 1.0.8)
     * Create a dummy MongoId
     * @link https://php.net/manual/en/mongoid.set-state.php
     * @param array $props <p>Theoretically, an array of properties used to create the new id. However, as MongoId instances have no properties, this is not used.</p>
     * @return MongoId A new id with the value "000000000000000000000000".
     */
    public static function __set_state(array $props) {}
}

class MongoCode
{
    /**
     * @var string
     */
    public $code;

    /**
     * @var array
     */
    public $scope;

    /**
     * .
     *
     * @link https://php.net/manual/en/mongocode.construct.php
     * @param string $code A string of code
     * @param array $scope The scope to use for the code
     */
    public function __construct($code, array $scope = []) {}

    /**
     * Returns this code as a string
     * @return string
     */
    public function __toString() {}
}

class MongoRegex
{
    /**
     * @link https://php.net/manual/en/class.mongoregex.php#mongoregex.props.regex
     * @var string
     */
    public $regex;

    /**
     * @link https://php.net/manual/en/class.mongoregex.php#mongoregex.props.flags
     * @var string
     */
    public $flags;

    /**
     * Creates a new regular expression.
     *
     * @link https://php.net/manual/en/mongoregex.construct.php
     * @param string $regex Regular expression string of the form /expr/flags
     */
    public function __construct($regex) {}

    /**
     * Returns a string representation of this regular expression.
     * @return string This regular expression in the form "/expr/flags".
     */
    public function __toString() {}
}

class MongoDate
{
    /**
     * @link https://php.net/manual/en/class.mongodate.php#mongodate.props.sec
     * @var int
     */
    public $sec;

    /**
     * @link https://php.net/manual/en/class.mongodate.php#mongodate.props.usec
     * @var int
     */
    public $usec;

    /**
     * Creates a new date. If no parameters are given, the current time is used.
     *
     * @link https://php.net/manual/en/mongodate.construct.php
     * @param int $sec Number of seconds since January 1st, 1970
     * @param int $usec Microseconds
     */
    public function __construct($sec = 0, $usec = 0) {}

    /**
     * Returns a DateTime object representing this date
     * @link https://php.net/manual/en/mongodate.todatetime.php
     * @return DateTime
     */
    public function toDateTime() {}

    /**
     * Returns a string representation of this date
     * @return string
     */
    public function __toString() {}
}

class MongoBinData
{
    /**
     * Generic binary data.
     * @link https://php.net/manual/en/class.mongobindata.php#mongobindata.constants.custom
     */
    public const GENERIC = 0x0;

    /**
     * Function
     * @link https://php.net/manual/en/class.mongobindata.php#mongobindata.constants.func
     */
    public const FUNC = 0x1;

    /**
     * Generic binary data (deprecated in favor of MongoBinData::GENERIC)
     * @link https://php.net/manual/en/class.mongobindata.php#mongobindata.constants.byte-array
     */
    public const BYTE_ARRAY = 0x2;

    /**
     * Universally unique identifier (deprecated in favor of MongoBinData::UUID_RFC4122)
     * @link https://php.net/manual/en/class.mongobindata.php#mongobindata.constants.uuid
     */
    public const UUID = 0x3;

    /**
     * Universally unique identifier (according to » RFC 4122)
     * @link https://php.net/manual/en/class.mongobindata.php#mongobindata.constants.custom
     */
    public const UUID_RFC4122 = 0x4;

    /**
     * MD5
     * @link https://php.net/manual/en/class.mongobindata.php#mongobindata.constants.md5
     */
    public const MD5 = 0x5;

    /**
     * User-defined type
     * @link https://php.net/manual/en/class.mongobindata.php#mongobindata.constants.custom
     */
    public const CUSTOM = 0x80;

    /**
     * @link https://php.net/manual/en/class.mongobindata.php#mongobindata.props.bin
     * @var string
     */
    public $bin;

    /**
     * @link https://php.net/manual/en/class.mongobindata.php#mongobindata.props.type
     * @var int
     */
    public $type;

    /**
     * Creates a new binary data object.
     *
     * @link https://php.net/manual/en/mongobindata.construct.php
     * @param string $data Binary data
     * @param int $type Data type
     */
    public function __construct($data, $type = 2) {}

    /**
     * Returns the string representation of this binary data object.
     * @return string
     */
    public function __toString() {}
}

class MongoDBRef
{
    /**
     * @var string
     */
    protected static $refKey = '$ref';

    /**
     * @var string
     */
    protected static $idKey = '$id';

    /**
     * If no database is given, the current database is used.
     *
     * @link https://php.net/manual/en/mongodbref.create.php
     * @param string $collection Collection name (without the database name)
     * @param mixed $id The _id field of the object to which to link
     * @param string $database Database name
     * @return array Returns the reference
     */
    public static function create($collection, $id, $database = null) {}

    /**
     * This not actually follow the reference, so it does not determine if it is broken or not.
     * It merely checks that $ref is in valid database reference format (in that it is an object or array with $ref and $id fields).
     *
     * @link https://php.net/manual/en/mongodbref.isref.php
     * @param mixed $ref Array or object to check
     * @return bool Returns true if $ref is a reference
     */
    public static function isRef($ref) {}

    /**
     * Fetches the object pointed to by a reference
     * @link https://php.net/manual/en/mongodbref.get.php
     * @param MongoDB $db Database to use
     * @param array $ref Reference to fetch
     * @return array|null Returns the document to which the reference refers or null if the document does not exist (the reference is broken)
     */
    public static function get($db, $ref) {}
}

class MongoWriteBatch
{
    public const COMMAND_INSERT = 1;
    public const COMMAND_UPDATE = 2;
    public const COMMAND_DELETE = 3;

    /**
     * <p>(PECL mongo &gt;= 1.5.0)</p>
     * MongoWriteBatch constructor.
     * @link https://php.net/manual/en/mongowritebatch.construct.php
     * @param MongoCollection $collection The {@see MongoCollection} to execute the batch on.
     * Its {@link https://php.net/manual/en/mongo.writeconcerns.php write concern}
     * will be copied and used as the default write concern if none is given as <code >$write_options</code> or during
     * {@see MongoWriteBatch::execute()}.
     * @param string $batch_type [optional] <p>
     * One of:
     * </p><ul>
     * <li class="member"><em>0</em> - make an MongoWriteBatch::COMMAND_INSERT batch</li>
     * <li class="member"><em>1</em> - make an MongoWriteBatch::COMMAND_UPDATE batch</li>
     * <li class="member"><em>2</em> - make a  MongoWriteBatch::COMMAND_DELETE batch</li>
     * </ul>
     * @param array $write_options [optional]
     * <p> An array of Write Options.</p><table><thead><tr><th>key</th><th>value meaning</th></tr>
     * </thead>
     * <tbody><tr><td>w (int|string)</td><td>{@link https://php.net/manual/en/mongo.writeconcerns.php Write concern} value</td></tr>
     * <tr><td>wtimeout (int)</td><td>{@link https://php.net/manual/en/mongo.writeconcerns.php Maximum time to wait for replication}</td></tr>
     * <tr><td>ordered</td><td>Determins if MongoDB must apply this batch in order (sequentally, one item at a time) or can rearrange it.
     * Defaults to <strong><code>TRUE</code></strong></td></tr>
     * <tr><td>j (bool)</td><td>Wait for journaling on the primary. This value is discouraged, use WriteConcern instead</td></tr>
     * <tr><td>fsync (bool)</td><td>Wait for fsync on the primary. This value is discouraged, use WriteConcern instead</td></tr>
     * </tbody></table>
     */
    protected function __construct($collection, $batch_type, $write_options) {}

    /**
     * <p>(PECL mongo &gt;= 1.5.0)</p>
     * Adds a write operation to a batch
     * @link https://php.net/manual/en/mongowritebatch.add.php
     * @param array $item <p>
     * An array that describes a write operation. The structure of this value
     * depends on the batch's operation type.
     * </p><table>
     * <thead>
     * <tr>
     * <th>Batch type</th>
     * <th>Argument expectation</th>
     * </tr>
     *
     * </thead>
     *
     * <tbody>
     * <tr>
     * <td><strong><code>MongoWriteBatch::COMMAND_INSERT</code></strong></td>
     * <td>
     * The document to add.
     * </td>
     * </tr>
     * <tr>
     * <td><strong><code>MongoWriteBatch::COMMAND_UPDATE</code></strong></td>
     * <td>
     * <p>Raw update operation.</p>
     * <p>Required keys are <em>"q"</em> and <em>"u"</em>, which correspond to the
     * <code>$criteria</code> and <code>$new_object</code> parameters of {@see MongoCollection::update()}, respectively.</p>
     * <p>Optional keys are <em>"multi"</em> and <em>"upsert"</em>, which correspond to the
     * <em>"multiple"</em> and <em>"upsert"</em> options for {@see MongoCollection::update()}, respectively.
     * If unspecified, both options default to <strong><code>FALSE</code></strong>.</p>
     * </td>
     * </tr>
     * <tr>
     * <td><strong><code>MongoWriteBatch::COMMAND_DELETE</code></strong></td>
     * <td>
     * <p class="para">Raw delete operation.</p>
     * <p>Required keys are: <em>"q"</em> and <em>"limit"</em>, which correspond to the <code>$criteria</code> parameter
     * and <em>"justOne"</em> option of {@see MongoCollection::remove()}, respectively.</p>
     * <p>The <em>"limit"</em> option is an integer; however, MongoDB only supports <em>0</em> (i.e. remove all matching
     * ocuments) and <em>1</em> (i.e. remove at most one matching document) at this time.</p>
     * </td>
     * </tr>
     * </tbody>
     * </table>
     * @return bool <b>Returns TRUE on success and throws an exception on failure.</b>
     */
    public function add(array $item) {}

    /**
     * <p>(PECL mongo &gt;= 1.5.0)</p>
     * Executes a batch of write operations
     * @link https://php.net/manual/en/mongowritebatch.execute.php
     * @param array $write_options See {@see MongoWriteBatch::__construct}
     * @return array Returns an array containing statistical information for the full batch.
     * If the batch had to be split into multiple batches, the return value will aggregate the values from individual batches and return only the totals.
     * If the batch was empty, an array containing only the 'ok' field is returned (as <b>TRUE</b>) although nothing will be shipped over the wire (NOOP).
     */
    final public function execute(array $write_options) {}
}

class MongoUpdateBatch extends MongoWriteBatch
{
    /**
     * <p>(PECL mongo &gt;= 1.5.0)</p>
     * MongoUpdateBatch constructor.
     * @link https://php.net/manual/en/mongoupdatebatch.construct.php
     * @param MongoCollection $collection <p>The MongoCollection to execute the batch on.
     * Its write concern will be copied and used as the default write concern
     * if none is given as $write_options or during {@see MongoWriteBatch::execute()}.</p>
     * @param array $write_options <p class="para">An array of Write Options.</p><table class="doctable informaltable"><thead><tr><th>key</th><th>value meaning</th></tr>
     * </thead>
     * <tbody class="tbody"><tr><td>w (int|string)</td><td>{@link https://php.net/manual/en/mongo.writeconcerns.php Write concern} value</td></tr>
     * <tr><td>wtimeout (int)</td><td>{@link https://php.net/manual/en/mongo.writeconcerns.php Maximum time to wait for replication}</td></tr>
     * <tr><td>ordered</td><td>Determins if MongoDB must apply this batch in order (sequentally, one item at a time) or can rearrange it. Defaults to <strong><code>TRUE</code></strong></td></tr>
     * <tr><td>j (bool)</td><td>Wait for journaling on the primary. This value is discouraged, use WriteConcern instead</td></tr>
     * <tr><td>fsync (bool)</td><td>Wait for fsync on the primary. This value is discouraged, use WriteConcern instead</td></tr>
     * </tbody></table>
     */
    public function __construct(MongoCollection $collection, array $write_options) {}
}

class MongoException extends Exception {}

class MongoCursorException extends MongoException {}

class MongoCursorTimeoutException extends MongoCursorException {}

class MongoConnectionException extends MongoException {}

class MongoGridFSException extends MongoException {}

/**
 * <p>(PECL mongo &gt;= 1.5.0)</p>
 * @link https://php.net/manual/en/class.mongowriteconcernexception.php#class.mongowriteconcernexception
 */
class MongoWriteConcernException extends MongoCursorException
{
    /**
     * Get the error document
     * @link https://php.net/manual/en/mongowriteconcernexception.getdocument.php
     * @return array <p>A MongoDB document, if available, as an array.</p>
     */
    public function getDocument() {}
}

/**
 * <p>(PECL mongo &gt;= 1.5.0)</p>
 * @link https://php.net/manual/en/class.mongoexecutiontimeoutexception.php
 */
class MongoExecutionTimeoutException extends MongoException {}

/**
 * <p>(PECL mongo &gt;= 1.5.0)</p>
 */
class MongoProtocolException extends MongoException {}

/**
 * <p>(PECL mongo &gt;= 1.5.0)</p>
 * @link https://php.net/manual/en/class.mongoduplicatekeyexception.php
 */
class MongoDuplicateKeyException extends MongoWriteConcernException {}

/**
 * <p>(PECL mongo &gt;= 1.3.0)</p>
 * @link https://php.net/manual/en/class.mongoresultexception.php#mongoresultexception.props.document
 */
class MongoResultException extends MongoException
{
    /**
     * <p>(PECL mongo &gt;= 1.3.0)</p>
     * Retrieve the full result document
     * https://secure.php.net/manual/en/mongoresultexception.getdocument.php
     * @return array <p>The full result document as an array, including partial data if available and additional keys.</p>
     */
    public function getDocument() {}
    public $document;
}

class MongoTimestamp
{
    /**
     * @link https://php.net/manual/en/class.mongotimestamp.php#mongotimestamp.props.sec
     * @var int
     */
    public $sec;

    /**
     * @link https://php.net/manual/en/class.mongotimestamp.php#mongotimestamp.props.inc
     * @var int
     */
    public $inc;

    /**
     * Creates a new timestamp. If no parameters are given, the current time is used
     * and the increment is automatically provided. The increment is set to 0 when the
     * module is loaded and is incremented every time this constructor is called
     * (without the $inc parameter passed in).
     *
     * @link https://php.net/manual/en/mongotimestamp.construct.php
     * @param int $sec [optional] Number of seconds since January 1st, 1970
     * @param int $inc [optional] Increment
     */
    public function __construct($sec = 0, $inc) {}

    /**
     * @return string
     */
    public function __toString() {}
}

class MongoInt32
{
    /**
     * @link https://php.net/manual/en/class.mongoint32.php#mongoint32.props.value
     * @var string
     */
    public $value;

    /**
     * Creates a new 32-bit number with the given value.
     *
     * @link https://php.net/manual/en/mongoint32.construct.php
     * @param string $value A number
     */
    public function __construct($value) {}

    /**
     * @return string
     */
    public function __toString() {}
}

class MongoInt64
{
    /**
     * @link https://php.net/manual/en/class.mongoint64.php#mongoint64.props.value
     * @var string
     */
    public $value;

    /**
     * Creates a new 64-bit number with the given value.
     *
     * @link https://php.net/manual/en/mongoint64.construct.php
     * @param string $value A number
     */
    public function __construct($value) {}

    /**
     * @return string
     */
    public function __toString() {}
}

class MongoLog
{
    /**
     * @link https://php.net/manual/en/class.mongolog.php#mongolog.constants.none
     */
    public const NONE = 0;

    /**
     * @link https://php.net/manual/en/class.mongolog.php#mongolog.constants.all
     */
    public const ALL = 0;

    /**
     * @link https://php.net/manual/en/class.mongolog.php#mongolog.constants.warning
     */
    public const WARNING = 0;

    /**
     * @link https://php.net/manual/en/class.mongolog.php#mongolog.constants.info
     */
    public const INFO = 0;

    /**
     * @link https://php.net/manual/en/class.mongolog.php#mongolog.constants.fine
     */
    public const FINE = 0;

    /**
     * @link https://php.net/manual/en/class.mongolog.php#mongolog.constants.rs
     */
    public const RS = 0;

    /**
     * @link https://php.net/manual/en/class.mongolog.php#mongolog.constants.pool
     */
    public const POOL = 0;

    /**
     * @link https://php.net/manual/en/class.mongolog.php#mongolog.constants.io
     */
    public const IO = 0;

    /**
     * @link https://php.net/manual/en/class.mongolog.php#mongolog.constants.server
     */
    public const SERVER = 0;

    /**
     * @link https://php.net/manual/en/class.mongolog.php#mongolog.constants.parse
     */
    public const PARSE = 0;
    public const CON = 2;

    /**
     * (PECL mongo &gt;= 1.3.0)<br/>
     * <p>
     * This function will set a callback function to be called for {@link https://secure.php.net/manual/en/class.mongolog.php MongoLog} events
     * instead of triggering warnings.
     * </p>
     * @link https://secure.php.net/manual/en/mongolog.setcallback.php
     * @param callable $log_function   <p>
     * The function to be called on events.
     * </p>
     * <p>
     * The function should have the following prototype
     * </p>
     *
     * <em>log_function</em> ( <em>int</em> <em>$module</em> , <em>int</em> <em>$level</em>, <em>string</em> <em>$message</em>)
     * <ul>
     * <li>
     * <b><i>module</i></b>
     *
     * <p>One of the {@link https://secure.php.net/manual/en/class.mongolog.php#mongolog.constants.module MongoLog module constants}.</p>
     * </li>
     * <li>
     * <b><i>level</i></b>
     *
     * <p>One of the {@link https://secure.php.net/manual/en/class.mongolog.php#mongolog.constants.level MongoLog level constants}.</p>
     * </li>
     * <li>
     * <b><i>message</i></b>
     *
     * <p>The log message itself.</p></li>
     * <ul>
     * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public static function setCallback(callable $log_function) {}

    /**
     * This function can be used to set how verbose logging should be and the types of
     * activities that should be logged. Use the constants described in the MongoLog
     * section with bitwise operators to specify levels.
     *
     * @link https://php.net/manual/en/mongolog.setlevel.php
     * @param int $level The levels you would like to log
     * @return void
     */
    public static function setLevel($level) {}

    /**
     * This can be used to see the log level. Use the constants described in the
     * MongoLog section with bitwise operators to check the level.
     *
     * @link https://php.net/manual/en/mongolog.getlevel.php
     * @return int Returns the current level
     */
    public static function getLevel() {}

    /**
     * This function can be used to set which parts of the driver's functionality
     * should be logged. Use the constants described in the MongoLog section with
     * bitwise operators to specify modules.
     *
     * @link https://php.net/manual/en/mongolog.setmodule.php
     * @param int $module The module(s) you would like to log
     * @return void
     */
    public static function setModule($module) {}

    /**
     * This function can be used to see which parts of the driver's functionality are
     * being logged. Use the constants described in the MongoLog section with bitwise
     * operators to check if specific modules are being logged.
     *
     * @link https://php.net/manual/en/mongolog.getmodule.php
     * @return int Returns the modules currently being logged
     */
    public static function getModule() {}
}

class MongoPool
{
    /**
     * Returns an array of information about all connection pools.
     *
     * @link https://php.net/manual/en/mongopool.info.php
     * @return array Each connection pool has an identifier, which starts with the host. For
     *         each pool, this function shows the following fields: $in use The number of
     *         connections currently being used by Mongo instances. $in pool The number of
     *         connections currently in the pool (not being used). $remaining The number of
     *         connections that could be created by this pool. For example, suppose a pool had
     *         5 connections remaining and 3 connections in the pool. We could create 8 new
     *         instances of Mongo before we exhausted this pool (assuming no instances of Mongo
     *         went out of scope, returning their connections to the pool). A negative number
     *         means that this pool will spawn unlimited connections. Before a pool is created,
     *         you can change the max number of connections by calling Mongo::setPoolSize. Once
     *         a pool is showing up in the output of this function, its size cannot be changed.
     *         $total The total number of connections allowed for this pool. This should be
     *         greater than or equal to "in use" + "in pool" (or -1). $timeout The socket
     *         timeout for connections in this pool. This is how long connections in this pool
     *         will attempt to connect to a server before giving up. $waiting If you have
     *         capped the pool size, workers requesting connections from the pool may block
     *         until other workers return their connections. This field shows how many
     *         milliseconds workers have blocked for connections to be released. If this number
     *         keeps increasing, you may want to use MongoPool::setSize to add more connections
     *         to your pool
     */
    public static function info() {}

    /**
     * Sets the max number of connections new pools will be able to create.
     *
     * @link https://php.net/manual/en/mongopool.setsize.php
     * @param int $size The max number of connections future pools will be able to
     *        create. Negative numbers mean that the pool will spawn an infinite number of
     *        connections
     * @return bool Returns the former value of pool size
     */
    public static function setSize($size) {}

    /**
     * .
     *
     * @link https://php.net/manual/en/mongopool.getsize.php
     * @return int Returns the current pool size
     */
    public static function getSize() {}
}

class MongoMaxKey {}

class MongoMinKey {}
<?php

// Start of pcntl v.
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Pure;

/**
 * Forks the currently running process
 * @link https://php.net/manual/en/function.pcntl-fork.php
 * @return int On success, the PID of the child process is returned in the
 * parent's thread of execution, and a 0 is returned in the child's
 * thread of execution. On failure, a -1 will be returned in the
 * parent's context, no child process will be created, and a PHP
 * error is raised.
 */
function pcntl_fork(): int {}

/**
 * Waits on or returns the status of a forked child
 * @link https://php.net/manual/en/function.pcntl-waitpid.php
 * @param int $process_id <p>
 * The value of <i>pid</i> can be one of the following:
 * <table>
 * possible values for <i>pid</i>
 * <tr valign="top">
 * <td>&lt; -1</td>
 * <td>
 * wait for any child process whose process group ID is equal to
 * the absolute value of <i>pid</i>.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>-1</td>
 * <td>
 * wait for any child process; this is the same behaviour that
 * the wait function exhibits.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>0</td>
 * <td>
 * wait for any child process whose process group ID is equal to
 * that of the calling process.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>&gt; 0</td>
 * <td>
 * wait for the child whose process ID is equal to the value of
 * <i>pid</i>.
 * </td>
 * </tr>
 * </table>
 * </p>
 * <p>
 * Specifying -1 as the <i>pid</i> is
 * equivalent to the functionality <b>pcntl_wait</b> provides
 * (minus <i>options</i>).
 * </p>
 * @param int &$status <p>
 * <b>pcntl_waitpid</b> will store status information
 * in the <i>status</i> parameter which can be
 * evaluated using the following functions:
 * <b>pcntl_wifexited</b>,
 * <b>pcntl_wifstopped</b>,
 * <b>pcntl_wifsignaled</b>,
 * <b>pcntl_wexitstatus</b>,
 * <b>pcntl_wtermsig</b> and
 * <b>pcntl_wstopsig</b>.
 * </p>
 * @param int $flags [optional] <p>
 * The value of <i>options</i> is the value of zero
 * or more of the following two global constants
 * OR'ed together:
 * <table>
 * possible values for <i>options</i>
 * <tr valign="top">
 * <td>WNOHANG</td>
 * <td>
 * return immediately if no child has exited.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>WUNTRACED</td>
 * <td>
 * return for children which are stopped, and whose status has
 * not been reported.
 * </td>
 * </tr>
 * </table>
 * </p>
 * @param array &$resource_usage
 * @return int <b>pcntl_waitpid</b> returns the process ID of the
 * child which exited, -1 on error or zero if <b>WNOHANG</b> was used and no
 * child was available
 */
function pcntl_waitpid(
    int $process_id,
    &$status,
    int $flags = 0,
    #[PhpStormStubsElementAvailable(from: '7.0')] &$resource_usage
= []
): int {}

/**
 * Waits on or returns the status of a forked child
 * @link https://php.net/manual/en/function.pcntl-wait.php
 * @param int &$status <p>
 * <b>pcntl_wait</b> will store status information
 * in the <i>status</i> parameter which can be
 * evaluated using the following functions:
 * <b>pcntl_wifexited</b>,
 * <b>pcntl_wifstopped</b>,
 * <b>pcntl_wifsignaled</b>,
 * <b>pcntl_wexitstatus</b>,
 * <b>pcntl_wtermsig</b> and
 * <b>pcntl_wstopsig</b>.
 * </p>
 * @param int $flags [optional] <p>
 * If wait3 is available on your system (mostly BSD-style systems), you can
 * provide the optional <i>flags</i> parameter. If this
 * parameter is not provided, wait will be used for the system call. If
 * wait3 is not available, providing a value for <i>flags
 * </i> will have no effect. The value of <i>flags
 * </i> is the value of zero or more of the following two constants
 * OR'ed together:
 * <table>
 * Possible values for <i>flags</i>
 * <tr valign="top">
 * <td>WNOHANG</td>
 * <td>
 * Return immediately if no child has exited.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>WUNTRACED</td>
 * <td>
 * Return for children which are stopped, and whose status has
 * not been reported.
 * </td>
 * </tr>
 * </table>
 * </p>
 * @param array &$resource_usage
 * @return int <b>pcntl_wait</b> returns the process ID of the
 * child which exited, -1 on error or zero if WNOHANG was provided as an
 * option (on wait3-available systems) and no child was available.
 */
function pcntl_wait(
    &$status,
    int $flags = 0,
    #[PhpStormStubsElementAvailable(from: '7.0')] &$resource_usage
= []
): int {}

/**
 * Installs a signal handler
 * @link https://php.net/manual/en/function.pcntl-signal.php
 * @param int $signal <p>
 * The signal number.
 * </p>
 * @param callable|int $handler <p>
 * The signal handler. This may be either a callable, which
 * will be invoked to handle the signal, or either of the two global
 * constants <b>SIG_IGN</b> or <b>SIG_DFL</b>,
 * which will ignore the signal or restore the default signal handler
 * respectively.
 * </p>
 * <p>
 * If a callable is given, it must implement the following
 * signature:
 * </p>
 * <p>
 * void<b>handler</b>
 * <b>int<i>signo</i></b>
 * <i>signo</i>
 * The signal being handled.</p>
 * @param bool $restart_syscalls [optional] <p>
 * Specifies whether system call restarting should be used when this
 * signal arrives.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pcntl_signal(int $signal, $handler, bool $restart_syscalls = true): bool {}

/**
 * Calls signal handlers for pending signals
 * @link https://php.net/manual/en/function.pcntl-signal-dispatch.php
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pcntl_signal_dispatch(): bool {}

/**
 * Checks if status code represents a normal exit
 * @link https://php.net/manual/en/function.pcntl-wifexited.php
 * @param int $status <p>The <i>status</i>
 * parameter is the status parameter supplied to a successful
 * call to <b>pcntl_waitpid</b>.</p>
 * @return bool <b>TRUE</b> if the child status code represents a normal exit, <b>FALSE</b>
 * otherwise.
 */
#[Pure]
function pcntl_wifexited(int $status): bool {}

/**
 * Checks whether the child process is currently stopped
 * @link https://php.net/manual/en/function.pcntl-wifstopped.php
 * @param int $status <p>The <i>status</i>
 * parameter is the status parameter supplied to a successful
 * call to <b>pcntl_waitpid</b>.</p>
 * @return bool <b>TRUE</b> if the child process which caused the return is
 * currently stopped, <b>FALSE</b> otherwise.
 */
#[Pure]
function pcntl_wifstopped(int $status): bool {}

/**
 * Checks whether the status code represents a termination due to a signal
 * @link https://php.net/manual/en/function.pcntl-wifsignaled.php
 * @param int $status <p>The <i>status</i>
 * parameter is the status parameter supplied to a successful
 * call to <b>pcntl_waitpid</b>.</p>
 * @return bool <b>TRUE</b> if the child process exited because of a signal which was
 * not caught, <b>FALSE</b> otherwise.
 */
#[Pure]
function pcntl_wifsignaled(int $status): bool {}

/**
 * Returns the return code of a terminated child
 * @link https://php.net/manual/en/function.pcntl-wexitstatus.php
 * @param int $status <p>The <i>status</i>
 * parameter is the status parameter supplied to a successful
 * call to <b>pcntl_waitpid</b>.</p>
 * @return int|false the return code, as an integer.
 */
#[Pure]
function pcntl_wexitstatus(int $status): int|false {}

/**
 * @param int $status
 * @return bool
 */
#[Pure]
function pcntl_wifcontinued(int $status): bool {}

/**
 * Returns the signal which caused the child to terminate
 * @link https://php.net/manual/en/function.pcntl-wtermsig.php
 * @param int $status <p>The <i>status</i>
 * parameter is the status parameter supplied to a successful
 * call to <b>pcntl_waitpid</b>.</p>
 * @return int|false the signal number, as an integer.
 */
#[Pure]
function pcntl_wtermsig(int $status): int|false {}

/**
 * Returns the signal which caused the child to stop
 * @link https://php.net/manual/en/function.pcntl-wstopsig.php
 * @param int $status <p>The <i>status</i>
 * parameter is the status parameter supplied to a successful
 * call to <b>pcntl_waitpid</b>.</p>
 * @return int|false the signal number.
 */
#[Pure]
function pcntl_wstopsig(int $status): int|false {}

/**
 * Executes specified program in current process space
 * @link https://php.net/manual/en/function.pcntl-exec.php
 * @param string $path <p>
 * <i>path</i> must be the path to a binary executable or a
 * script with a valid path pointing to an executable in the shebang (
 * #!/usr/local/bin/perl for example) as the first line. See your system's
 * man execve(2) page for additional information.
 * </p>
 * @param array $args <p>
 * <i>args</i> is an array of argument strings passed to the
 * program.
 * </p>
 * @param array $env_vars <p>
 * <i>envs</i> is an array of strings which are passed as
 * environment to the program. The array is in the format of name => value,
 * the key being the name of the environmental variable and the value being
 * the value of that variable.
 * </p>
 * @return bool <b>FALSE</b> on error and does not return on success.
 */
function pcntl_exec(string $path, array $args = [], array $env_vars = []): bool {}

/**
 * Set an alarm clock for delivery of a signal
 * @link https://php.net/manual/en/function.pcntl-alarm.php
 * @param int $seconds <p>
 * The number of seconds to wait. If <i>seconds</i> is
 * zero, no new alarm is created.
 * </p>
 * @return int the time in seconds that any previously scheduled alarm had
 * remaining before it was to be delivered, or 0 if there
 * was no previously scheduled alarm.
 */
function pcntl_alarm(int $seconds): int {}

/**
 * Retrieve the error number set by the last pcntl function which failed
 * @link https://php.net/manual/en/function.pcntl-get-last-error.php
 * @return int error code.
 * @since 5.3.4
 */
#[Pure(true)]
function pcntl_get_last_error(): int {}

/**
 * Alias of <b>pcntl_get_last_error</b>
 * @link https://php.net/manual/en/function.pcntl-errno.php
 * @return int error code.
 * @since 5.3.4
 */
#[Pure(true)]
function pcntl_errno(): int {}

/**
 * Retrieve the system error message associated with the given errno
 * @link https://php.net/manual/en/function.pcntl-strerror.php
 * @param int $error_code <p>
 * </p>
 * @return string|false error description on success or <b>FALSE</b> on failure.
 * @since 5.3.4
 */
#[Pure]
#[LanguageLevelTypeAware(["8.0" => "string"], default: "string|false")]
function pcntl_strerror(int $error_code): false|string {}

/**
 * Get the priority of any process
 * @link https://php.net/manual/en/function.pcntl-getpriority.php
 * @param int|null $process_id [optional] <p>
 * If not specified, the pid of the current process  (getmypid()) is used.
 * </p>
 * @param int $mode [optional] <p>
 * One of <b>PRIO_PGRP</b>, <b>PRIO_USER</b>
 * or <b>PRIO_PROCESS</b>.
 * </p>
 * @return int|false <b>pcntl_getpriority</b> returns the priority of the process
 * or <b>FALSE</b> on error. A lower numerical value causes more favorable
 * scheduling.
 */
#[Pure]
function pcntl_getpriority(?int $process_id, int $mode = PRIO_PROCESS): int|false {}

/**
 * Change the priority of any process
 * @link https://php.net/manual/en/function.pcntl-setpriority.php
 * @param int $priority <p>
 * <i>priority</i> is generally a value in the range
 * -20 to 20. The default priority
 * is 0 while a lower numerical value causes more
 * favorable scheduling. Because priority levels can differ between
 * system types and kernel versions, please see your system's setpriority(2)
 * man page for specific details.
 * </p>
 * @param int|null $process_id [optional] <p>
 * If not specified, the pid of the current process (getmypid()) is used.
 * </p>
 * @param int $mode [optional] <p>
 * One of <b>PRIO_PGRP</b>, <b>PRIO_USER</b>
 * or <b>PRIO_PROCESS</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pcntl_setpriority(int $priority, ?int $process_id, int $mode = PRIO_PROCESS): bool {}

/**
 * Sets and retrieves blocked signals
 * @link https://php.net/manual/en/function.pcntl-sigprocmask.php
 * @param int $mode <p>
 * Sets the behavior of <b>pcntl_sigprocmask</b>. Possible
 * values:
 * <b>SIG_BLOCK</b>: Add the signals to the
 * currently blocked signals.
 * <b>SIG_UNBLOCK</b>: Remove the signals from the
 * currently blocked signals.
 * <b>SIG_SETMASK</b>: Replace the currently
 * blocked signals by the given list of signals.
 * </p>
 * @param array $signals <p>
 * List of signals.
 * </p>
 * @param array &$old_signals [optional] <p>
 * The <i>old_signals</i> parameter is set to an array
 * containing the list of the previously blocked signals.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function pcntl_sigprocmask(int $mode, array $signals, &$old_signals): bool {}

/**
 * Waits for signals
 * @link https://php.net/manual/en/function.pcntl-sigwaitinfo.php
 * @param array $signals <p>
 * Array of signals to wait for.
 * </p>
 * @param array &$info <p>
 * The <i>info</i> parameter is set to an array containing
 * informations about the signal.
 * </p>
 * <p>
 * The following elements are set for all signals:
 * signo: Signal number
 * errno: An error number
 * code: Signal code
 * </p>
 * <p>
 * The following elements may be set for the <b>SIGCHLD</b> signal:
 * status: Exit value or signal
 * utime: User time consumed
 * stime: System time consumed
 * pid: Sending process ID
 * uid: Real user ID of sending process
 * </p>
 * <p>
 * The following elements may be set for the <b>SIGILL</b>,
 * <b>SIGFPE</b>, <b>SIGSEGV</b> and
 * <b>SIGBUS</b> signals:
 * addr: Memory location which caused fault
 * </p>
 * <p>
 * The following element may be set for the <b>SIGPOLL</b>
 * signal:
 * band: Band event
 * fd: File descriptor number
 * </p>
 * @return int|false On success, <b>pcntl_sigwaitinfo</b> returns a signal number.
 */
function pcntl_sigwaitinfo(array $signals, &$info = []): int|false {}

/**
 * Waits for signals, with a timeout
 * @link https://php.net/manual/en/function.pcntl-sigtimedwait.php
 * @param array $signals <p>
 * Array of signals to wait for.
 * </p>
 * @param array &$info <p>
 * The <i>siginfo</i> is set to an array containing
 * informations about the signal. See
 * <b>pcntl_sigwaitinfo</b>.
 * </p>
 * @param int $seconds [optional] <p>
 * Timeout in seconds.
 * </p>
 * @param int $nanoseconds [optional] <p>
 * Timeout in nanoseconds.
 * </p>
 * @return int|false On success, <b>pcntl_sigtimedwait</b> returns a signal number.
 */
function pcntl_sigtimedwait(array $signals, &$info = [], int $seconds = 0, int $nanoseconds = 0): int|false {}

/**
 * Enable/disable asynchronous signal handling or return the old setting.<br>
 * If the <b>enable</b> parameter is omitted, it returns whether asynchronous
 * signal handling is enabled.
 * @link https://www.php.net/manual/en/function.pcntl-async-signals.php
 *
 * @param bool|null $enable <p>
 * Whether asynchronous signal handling should be enabled.
 * </p>
 *
 * @return bool
 * @since 7.1
 */
function pcntl_async_signals(
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] ?bool $enable,
    #[PhpStormStubsElementAvailable(from: '8.0')] ?bool $enable = null
): bool {}

/**
 * Get the current handler for specified signal.
 * @link https://www.php.net/manual/en/function.pcntl-signal-get-handler.php
 *
 * @param int $signal <p>
 * The signal number.
 * </p>
 *
 * @return bool|resource
 * @since 7.1
 */
function pcntl_signal_get_handler(int $signal) {}

/**
 * @param int $flags
 * @return bool
 * @since 7.4
 */
function pcntl_unshare(int $flags): bool {}

define('WNOHANG', 1);
define('WUNTRACED', 2);
define('WCONTINUED', 8);
define('SIG_IGN', 1);
define('SIG_DFL', 0);
define('SIG_ERR', -1);
define('SIGHUP', 1);
define('SIGINT', 2);
define('SIGQUIT', 3);
define('SIGILL', 4);
define('SIGTRAP', 5);
define('SIGABRT', 6);
define('SIGIOT', 6);
define('SIGBUS', 7);
define('SIGFPE', 8);
define('SIGKILL', 9);
define('SIGUSR1', 10);
define('SIGSEGV', 11);
define('SIGUSR2', 12);
define('SIGPIPE', 13);
define('SIGALRM', 14);
define('SIGTERM', 15);
define('SIGSTKFLT', 16);
define('SIGCLD', 17);
define('SIGCHLD', 17);
define('SIGCONT', 18);
define('SIGSTOP', 19);
define('SIGTSTP', 20);
define('SIGTTIN', 21);
define('SIGTTOU', 22);
define('SIGURG', 23);
define('SIGXCPU', 24);
define('SIGXFSZ', 25);
define('SIGVTALRM', 26);
define('SIGPROF', 27);
define('SIGWINCH', 28);
define('SIGPOLL', 29);
define('SIGIO', 29);
define('SIGPWR', 30);
define('SIGSYS', 31);
define('SIGBABY', 31);
define('PRIO_PGRP', 1);
define('PRIO_USER', 2);
define('PRIO_PROCESS', 0);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('SIG_BLOCK', 0);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('SIG_UNBLOCK', 1);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('SIG_SETMASK', 2);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('SIGRTMIN', 35);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('SIGRTMAX', 64);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('SI_USER', 0);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('SI_KERNEL', 128);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('SI_QUEUE', -1);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('SI_TIMER', -2);
define('SI_MESGQ', -3);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('SI_ASYNCIO', -4);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('SI_SIGIO', -5);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('SI_TKILL', -6);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('CLD_EXITED', 1);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('CLD_KILLED', 2);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('CLD_DUMPED', 3);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('CLD_TRAPPED', 4);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('CLD_STOPPED', 5);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('CLD_CONTINUED', 6);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('TRAP_BRKPT', 1);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('TRAP_TRACE', 2);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('POLL_IN', 1);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('POLL_OUT', 2);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('POLL_MSG', 3);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('POLL_ERR', 4);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('POLL_PRI', 5);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('POLL_HUP', 6);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('ILL_ILLOPC', 1);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('ILL_ILLOPN', 2);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('ILL_ILLADR', 3);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('ILL_ILLTRP', 4);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('ILL_PRVOPC', 5);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('ILL_PRVREG', 6);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('ILL_COPROC', 7);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('ILL_BADSTK', 8);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('FPE_INTDIV', 1);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('FPE_INTOVF', 2);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('FPE_FLTDIV', 3);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('FPE_FLTOVF', 4);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('FPE_FLTUND', 5);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('FPE_FLTRES', 6);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('FPE_FLTINV', 7);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('FPE_FLTSUB', 8);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('SEGV_MAPERR', 1);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('SEGV_ACCERR', 2);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('BUS_ADRALN', 1);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('BUS_ADRERR', 2);

/**
 * @link https://php.net/manual/en/pcntl.constants.php
 */
define('BUS_OBJERR', 3);
define('PCNTL_EINTR', 4);
define('PCNTL_ECHILD', 10);
define('PCNTL_EINVAL', 22);
define('PCNTL_EAGAIN', 11);
define('PCNTL_ESRCH', 3);
define('PCNTL_EACCES', 13);
define('PCNTL_EPERM', 1);
define('PCNTL_ENOMEM', 12);
define('PCNTL_E2BIG', 7);
define('PCNTL_EFAULT', 14);
define('PCNTL_EIO', 5);
define('PCNTL_EISDIR', 21);
define('PCNTL_ELIBBAD', 80);
define('PCNTL_ELOOP', 40);
define('PCNTL_EMFILE', 24);
define('PCNTL_ENAMETOOLONG', 36);
define('PCNTL_ENFILE', 23);
define('PCNTL_ENOENT', 2);
define('PCNTL_ENOEXEC', 8);
define('PCNTL_ENOTDIR', 20);
define('PCNTL_ETXTBSY', 26);

/**
 * @since 7.4
 */
define('PCNTL_ENOSPC', 28);

/**
 * @since 7.4
 */
define('PCNTL_EUSERS', 87);

/**
 * @since 7.4
 */
define('CLONE_NEWNS', 131072);

/**
 * @since 7.4
 */
define('CLONE_NEWIPC', 134217728);

/**
 * @since 7.4
 */
define('CLONE_NEWUTS', 67108864);

/**
 * @since 7.4
 */
define('CLONE_NEWNET', 1073741824);

/**
 * @since 7.4
 */
define('CLONE_NEWPID', 536870912);

/**
 * @since 7.4
 */
define('CLONE_NEWUSER', 268435456);

/**
 * @since 7.4
 */
define('CLONE_NEWCGROUP', 33554432);

// End of pcntl v.
<?php

define('OAUTH_SIG_METHOD_RSASHA1', 'RSA-SHA1');
define('OAUTH_SIG_METHOD_HMACSHA1', 'HMAC-SHA1');
define('OAUTH_SIG_METHOD_HMACSHA256', 'HMAC-SHA256');

define('OAUTH_AUTH_TYPE_AUTHORIZATION', 3);
define('OAUTH_AUTH_TYPE_NONE', 2);
define('OAUTH_AUTH_TYPE_URI', 1);
define('OAUTH_AUTH_TYPE_FORM', 2);

define('OAUTH_HTTP_METHOD_GET', 'GET');
define('OAUTH_HTTP_METHOD_POST', 'POST');
define('OAUTH_HTTP_METHOD_PUT', 'PUT');
define('OAUTH_HTTP_METHOD_HEAD', 'HEAD');
define('OAUTH_HTTP_METHOD_DELETE', 'DELETE');

define('OAUTH_REQENGINE_STREAMS', 1);
define('OAUTH_REQENGINE_CURL', 2);

define('OAUTH_OK', 0);
define('OAUTH_BAD_NONCE', 4);
define('OAUTH_BAD_TIMESTAMP', 8);
define('OAUTH_CONSUMER_KEY_UNKNOWN', 16);
define('OAUTH_CONSUMER_KEY_REFUSED', 32);
define('OAUTH_INVALID_SIGNATURE', 64);
define('OAUTH_TOKEN_USED', 128);
define('OAUTH_TOKEN_EXPIRED', 256);
define('OAUTH_TOKEN_REJECTED', 1024);
define('OAUTH_VERIFIER_INVALID', 2048);
define('OAUTH_PARAMETER_ABSENT', 4096);
define('OAUTH_SIGNATURE_METHOD_REJECTED', 8192);

/**
 * Generate a Signature Base String
 *
 * @param string $http_method
 * @param string $uri
 * @param array $request_parameters
 * @return string
 */
function oauth_get_sbs($http_method, $uri, $request_parameters = []) {}

/**
 * Encode a URI to RFC 3986
 *
 * @param string $uri
 * @return string
 */
function oauth_urlencode($uri) {}

/**
 * The OAuth extension provides a simple interface to interact with data providers using the OAuth HTTP specification to protect private resources.
 */
class OAuth
{
    /**
     * @var bool
     */
    public $debug;

    /**
     * @var bool
     */
    public $sslChecks;

    /**
     * @var array
     */
    public $debugInfo;

    /**
     * Create a new OAuth object
     * @param string $consumer_key
     * @param string $consumer_secret
     * @param string $signature_method
     * @param int $auth_type
     * @throws \OAuthException
     */
    public function __construct($consumer_key, $consumer_secret, $signature_method = OAUTH_SIG_METHOD_HMACSHA1, $auth_type = OAUTH_AUTH_TYPE_AUTHORIZATION) {}

    /**
     * Turn off verbose debugging
     * @return bool
     */
    public function disableDebug() {}

    /**
     * Turn off redirects
     * @return void
     */
    public function disableRedirects() {}

    /**
     * Turn off SSL checks
     * @return bool
     */
    public function disableSSLChecks() {}

    /**
     * Turn on verbose debugging
     * @return bool
     */
    public function enableDebug() {}

    /**
     * Turn on redirects
     * @return bool
     */
    public function enableRedirects() {}

    /**
     * Turn on SSL checks
     * @return bool
     */
    public function enableSSLChecks() {}

    /**
     * Set the timeout
     * @param int $timeout Time in milliseconds
     * @return void
     */
    public function setTimeout($timeout) {}

    /**
     * Fetch an OAuth-protected resource
     * @param string $protected_resource_url
     * @param array $extra_parameters
     * @param string $http_method
     * @param array $http_headers
     * @throws \OAuthException
     * @return mixed
     */
    public function fetch($protected_resource_url, $extra_parameters = [], $http_method = null, $http_headers = []) {}

    /**
     * Fetch an access token
     * @param string $access_token_url
     * @param string $auth_session_handle
     * @param string $verifier_token
     * @throws \OAuthException
     * @return array
     */
    public function getAccessToken($access_token_url, $auth_session_handle = null, $verifier_token = null) {}

    /**
     * Get CA information
     * @return array
     */
    public function getCAPath() {}

    /**
     * Get the last response
     * @return string
     */
    public function getLastResponse() {}

    /**
     * Get headers for last response
     * @return string|false
     */
    public function getLastResponseHeaders() {}

    /**
     * Get HTTP information about the last response
     * @return array
     */
    public function getLastResponseInfo() {}

    /**
     * Generate OAuth header string signature
     * @param string $http_method
     * @param string $url
     * @param mixed  $extra_parameters
     * @return string|false
     */
    public function getRequestHeader($http_method, $url, $extra_parameters = '') {}

    /**
     * Fetch a request token
     * @param string $request_token_url
     * @param string $callback_url
     * @param string $http_method
     * @throws \OAuthException
     * @return array
     */
    public function getRequestToken($request_token_url, $callback_url = null, $http_method = 'GET') {}

    /**
     * Set authorization type
     * @param int $auth_type
     * @return bool
     */
    public function setAuthType($auth_type) {}

    /**
     * Set CA path and info
     * @param string $ca_path
     * @param string $ca_info
     * @return mixed
     */
    public function setCAPath($ca_path = null, $ca_info = null) {}

    /**
     * Set the nonce for subsequent requests
     * @param string $nonce
     * @return mixed
     */
    public function setNonce($nonce) {}

    /**
     * @param int $reqengine
     * @return void
     */
    public function setRequestEngine($reqengine) {}

    /**
     * Set the RSA certificate
     * @param string $cert
     * @return mixed
     */
    public function setRSACertificate($cert) {}

    /**
     * Set the timestamp
     * @param string $timestamp
     * @return mixed
     */
    public function setTimestamp($timestamp) {}

    /**
     * Set the token and secret
     * @param string $token
     * @param string $token_secret
     * @return bool
     */
    public function setToken($token, $token_secret) {}

    /**
     * Set the OAuth version
     * @param string $version
     * @return bool
     */
    public function setVersion($version) {}
}

class OAuthException extends Exception
{
    /**
     * The response of the exception which occurred, if any
     * @var string
     */
    public $lastResponse;

    /**
     * @var array
     */
    public $debugInfo;
}

;

/**
 * Manages an OAuth provider class.
 */
class OAuthProvider
{
    /**
     * @param string $req_params
     * @return bool
     */
    final public function addRequiredParameter($req_params) {}

    /**
     * @return void
     */
    public function callconsumerHandler() {}

    /**
     * @return void
     */
    public function callTimestampNonceHandler() {}

    /**
     * @return void
     */
    public function calltokenHandler() {}

    /**
     * @param string $uri
     * @param string $method
     * @return void
     */
    public function checkOAuthRequest($uri = '', $method = '') {}

    /**
     * @param array $params_array
     */
    public function __construct($params_array) {}

    /**
     * @param callable $callback_function
     * @return void
     */
    public function consumerHandler($callback_function) {}

    /**
     * @param int $size
     * @param bool $strong
     * @return string
     */
    final public static function generateToken($size, $strong = false) {}

    /**
     * @param mixed $params_array
     * @return void
     */
    public function is2LeggedEndpoint($params_array) {}

    /**
     * @param bool $will_issue_request_token
     * @return void
     */
    public function isRequestTokenEndpoint($will_issue_request_token) {}

    /**
     * @param string $req_params
     * @return bool
     */
    final public function removeRequiredParameter($req_params) {}

    /**
     * @param string $oauthexception
     * @param bool $send_headers
     * @return string
     */
    final public static function reportProblem($oauthexception, $send_headers = true) {}

    /**
     * @param string $param_key
     * @param mixed $param_val
     * @return bool
     */
    final public function setParam($param_key, $param_val = null) {}

    /**
     * @param string $path
     * @return bool
     */
    final public function setRequestTokenPath($path) {}

    /**
     * @param callable $callback_function
     * @return void
     */
    public function timestampNonceHandler($callback_function) {}

    /**
     * @param callable $callback_function
     * @return void
     */
    public function tokenHandler($callback_function) {}
}
<?php

// Start of snmp v.0.1

/**
 * Represents SNMP session.
 * @link https://php.net/manual/en/class.snmp.php
 */
class SNMP
{
    /**
     * @var int Maximum OID per GET/SET/GETBULK request
     * @link https://secure.php.net/manual/en/class.snmp.php#snmp.props.max-oids
     */
    public $max_oids;

    /**
     * @var int Controls the method how the SNMP values will be returned
     * <dl>
     * <dt>SNMP_VALUE_LIBRARY</dt><dd>The return values will be as returned by the Net-SNMP library.</dd>
     * <dt>SNMP_VALUE_PLAIN</dt><dd>The return values will be the plain value without the SNMP type hint.</dd>
     * <dt>SNMP_VALUE_OBJECT</dt><dd>The return values will be objects with the properties "value" and "type", where the latter is one of the SNMP_OCTET_STR, SNMP_COUNTER etc. constants. The way "value" is returned is based on which one of SNMP_VALUE_LIBRARY, SNMP_VALUE_PLAIN is set</dd>
     * <dl>
     * @link https://secure.php.net/manual/en/class.snmp.php#snmp.props.max-oids
     */
    public $valueretrieval;

    /**
     * @var bool Value of quick_print within the NET-SNMP library
     * <p>Sets the value of quick_print within the NET-SNMP library. When this is set (1), the SNMP library will return 'quick printed' values. This means that just the value will be printed. When quick_print is not enabled (default) the UCD SNMP library prints extra information including the type of the value (i.e. IpAddress or OID). Additionally, if quick_print is not enabled, the library prints additional hex values for all strings of three characters or less.
     * @link https://secure.php.net/manual/en/class.snmp.php#snmp.props.quick-print
     */
    public $quick_print;

    /**
     * @var bool Controls the way enum values are printed
     * <p>Parameter toggles if walk/get etc. should automatically lookup enum values in the MIB and return them together with their human readable string.
     * @link https://secure.php.net/manual/en/class.snmp.php#snmp.props.enum-print
     */
    public $enum_print;

    /**
     * @var int Controls OID output format
     * <p>OID .1.3.6.1.2.1.1.3.0 representation for various oid_output_format values
     * <dl>
     * <dt>SNMP_OID_OUTPUT_FULL</dt><dd>.iso.org.dod.internet.mgmt.mib-2.system.sysUpTime.sysUpTimeInstance</dd>
     * <dt>SNMP_OID_OUTPUT_NUMERIC</dt><dd>.1.3.6.1.2.1.1.3.0</dd>
     * <dt>SNMP_OID_OUTPUT_MODULE</dt><dd>DISMAN-EVENT-MIB::sysUpTimeInstance</dd>
     * <dt>SNMP_OID_OUTPUT_SUFFIX</dt><dd>sysUpTimeInstance</dd>
     * <dt>SNMP_OID_OUTPUT_UCD</dt><dd>system.sysUpTime.sysUpTimeInstance</dd>
     * <dt>SNMP_OID_OUTPUT_NONE</dt><dd>Undefined</dd>
     * </dl>
     * @link https://secure.php.net/manual/en/class.snmp.php#snmp.props.oid-output-format
     */
    public $oid_output_format;

    /**
     * @var bool Controls disabling check for increasing OID while walking OID tree
     * <p> Some SNMP agents are known for returning OIDs out of order but can complete the walk anyway. Other agents return OIDs that are out of order and can cause SNMP::walk() to loop indefinitely until memory limit will be reached. PHP SNMP library by default performs OID increasing check and stops walking on OID tree when it detects possible loop with issuing warning about non-increasing OID faced. Set oid_increasing_check to <b>FALSE</b> to disable this check.
     * @link https://secure.php.net/manual/en/class.snmp.php#snmp.props.oid-increasing-check
     */
    public $oid_increasing_check;

    /**
     * @var int Controls which failures will raise SNMPException instead of warning. Use bitwise OR'ed SNMP::ERRNO_* constants. By default all SNMP exceptions are disabled.
     * @link https://secure.php.net/manual/en/class.snmp.php#snmp.props.exceptions-enabled
     */
    public $exceptions_enabled;

    /**
     * @var array Read-only property with remote agent configuration: hostname, port, default timeout, default retries count
     * @link https://secure.php.net/manual/en/class.snmp.php#snmp.props.info
     */
    public $info;
    public const VERSION_1 = 0;
    public const VERSION_2c = 1;
    public const VERSION_2C = 1;
    public const VERSION_3 = 3;
    public const ERRNO_NOERROR = 0;
    public const ERRNO_ANY = 126;
    public const ERRNO_GENERIC = 2;
    public const ERRNO_TIMEOUT = 4;
    public const ERRNO_ERROR_IN_REPLY = 8;
    public const ERRNO_OID_NOT_INCREASING = 16;
    public const ERRNO_OID_PARSING_ERROR = 32;
    public const ERRNO_MULTIPLE_SET_QUERIES = 64;

    /**
     * Creates SNMP instance representing session to remote SNMP agent
     * @link https://php.net/manual/en/snmp.construct.php
     * @param int $version <p>SNMP protocol version:
     * <b>SNMP::VERSION_1</b>,
     * <b>SNMP::VERSION_2C</b>,
     * <b>SNMP::VERSION_3</b>.</p>
     * @param string $hostname The SNMP agent. <i>hostname</i> may be suffixed with
     * optional <acronym title="Simple Network Management Protocol">SNMP</acronym> agent port after colon. IPv6 addresses must be enclosed in square
     * brackets if used with port. If FQDN is used for <i>hostname</i>
     * it will be resolved by php-snmp library, not by Net-SNMP engine. Usage
     * of IPv6 addresses when specifying FQDN may be forced by enclosing FQDN
     * into square brackets. Here it is some examples:
     * <table>
     * <tbody>
     * <tr><td>IPv4 with default port</td><td>127.0.0.1</td></tr>
     * <tr><td>IPv6 with default port</td><td>::1 or [::1]</td></tr>
     * <tr><td>IPv4 with specific port</td><td>127.0.0.1:1161</td></tr>
     * <tr><td>IPv6 with specific port</td><td>[::1]:1161</td></tr>
     * <tr><td>FQDN with default port</td><td>host.domain</td></tr>
     * <tr><td>FQDN with specific port</td><td>host.domain:1161</td></tr>
     * <tr><td>FQDN with default port, force usage of IPv6 address</td><td>[host.domain]</td></tr>
     * <tr><td>FQDN with specific port, force usage of IPv6 address</td><td>[host.domain]:1161</td></tr>
     * </tbody>
     * </table>
     * @param string $community <p>The purpuse of <i>community</i> is
     * <acronym title="Simple Network Management Protocol">SNMP</acronym> version specific:</p>
     * <table>
     * <tbody>
     * <tr><td>SNMP::VERSION_1</td><td><acronym title="Simple Network Management Protocol">SNMP</acronym> community</td></tr>
     * <tr><td>SNMP::VERSION_2C</td><td><acronym title="Simple Network Management Protocol">SNMP</acronym> community</td></tr>
     * <tr><td>SNMP::VERSION_3</td><td><acronym title="Simple Network Management Protocol">SNMP</acronym>v3 securityName</td></tr>
     * </tbody>
     * </table>
     * @param int $timeout [optional] The number of microseconds until the first timeout.
     * @param int $retries [optional] The number of retries in case timeout occurs.
     * @since 5.4
     */
    public function __construct($version, $hostname, $community, $timeout = 1000000, $retries = 5) {}

    /**
     * Close SNMP session
     * @link https://php.net/manual/en/snmp.close.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @since 5.4
     */
    public function close() {}

    /**
     * Configures security-related SNMPv3 session parameters
     * @link https://php.net/manual/en/snmp.setsecurity.php
     * @param string $sec_level the security level (noAuthNoPriv|authNoPriv|authPriv)
     * @param string $auth_protocol [optional] the authentication protocol (MD5 or SHA)
     * @param string $auth_passphrase [optional] the authentication pass phrase
     * @param string $priv_protocol [optional] the privacy protocol (DES or AES)
     * @param string $priv_passphrase [optional] the privacy pass phrase
     * @param string $contextName [optional] the context name
     * @param string $contextEngineID [optional] the context EngineID
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @since 5.4
     */
    public function setSecurity($sec_level, $auth_protocol, $auth_passphrase, $priv_protocol, $priv_passphrase, $contextName, $contextEngineID) {}

    /**
     * Fetch an SNMP object
     * @link https://php.net/manual/en/snmp.get.php
     * @param mixed $object_id The SNMP object (OID) or objects
     * @param bool $preserve_keys [optional] When object_id is a array and preserve_keys set to <b>TRUE</b> keys in results will be taken exactly as in object_id, otherwise SNMP::oid_output_format property is used to determinate the form of keys.
     * @return mixed SNMP objects requested as string or array
     * depending on <i>object_id</i> type or <b>FALSE</b> on error.
     * @since 5.4
     */
    public function get($object_id, $preserve_keys = false) {}

    /**
     * Fetch an SNMP object which
     * follows the given object id
     * @link https://php.net/manual/en/snmp.getnext.php
     * @param mixed $object_id <p>
     * The <acronym title="Simple Network Management Protocol">SNMP</acronym> object (OID) or objects
     * </p>
     * @return mixed SNMP objects requested as string or array
     * depending on <i>object_id</i> type or <b>FALSE</b> on error.
     * @since 5.4
     */
    public function getnext($object_id) {}

    /**
     * Fetch SNMP object subtree
     * @link https://php.net/manual/en/snmp.walk.php
     * @param string $object_id <p>Root of subtree to be fetched</p>
     * @param bool $suffix_as_keys [optional] <p>By default full OID notation is used for keys in output array. If set to <b>TRUE</b> subtree prefix will be removed from keys leaving only suffix of object_id.</p>
     * @param int $max_repetitions [optional] <p>This specifies the maximum number of iterations over the repeating variables. The default is to use this value from SNMP object.</p>
     * @param int $non_repeaters [optional] <p>This specifies the number of supplied variables that should not be iterated over. The default is to use this value from SNMP object.</p>
     * @return array|false associative array of the SNMP object ids and their values on success or <b>FALSE</b> on error.
     * When a SNMP error occures <b>SNMP::getErrno</b> and
     * <b>SNMP::getError</b> can be used for retrieving error
     * number (specific to SNMP extension, see class constants) and error message
     * respectively.
     * @since 5.4
     */
    public function walk($object_id, $suffix_as_keys = false, $max_repetitions, $non_repeaters) {}

    /**
     * Set the value of an SNMP object
     * @link https://php.net/manual/en/snmp.set.php
     * @param string $object_id <p>The SNMP object id</p>
     * @since 5.4
     *
     * <p>When count of OIDs in object_id array is greater than
     * max_oids object property set method will have to use multiple queries
     * to perform requested value updates. In this case type and value checks
     * are made per-chunk so second or subsequent requests may fail due to
     * wrong type or value for OID requested. To mark this a warning is
     * raised when count of OIDs in object_id array is greater than max_oids.
     * When count of OIDs in object_id array is greater than max_oids object property set method will have to use multiple queries to perform requested value updates. In this case type and value checks are made per-chunk so second or subsequent requests may fail due to wrong type or value for OID requested. To mark this a warning is raised when count of OIDs in object_id array is greater than max_oids.</p>
     * @param mixed $type <p>The MIB defines the type of each object id. It has to be specified as a single character from the below list.</p>
     * <b>types:</b>
     * <table>
     * <tbody>
     * <tr><td>=</td><td>The type is taken from the MIB</td></tr>
     * <tr><td>i</td><td>INTEGER</td> </tr>
     * <tr><td>u</td><td>INTEGER</td></tr>
     * <tr><td>s</td><td>STRING</td></tr>
     * <tr><td>x</td><td>HEX STRING</td></tr>
     * <tr><td>d</td><td>DECIMAL STRING</td></tr>
     * <tr><td>n</td><td>NULLOBJ</td></tr>
     * <tr><td>o</td><td>OBJID</td></tr>
     * <tr><td>t</td><td>TIMETICKS</td></tr>
     * <tr><td>a</td><td>IPADDRESS</td></tr>
     * <tr><td>b</td><td>BITS</td></tr>
     * </tbody>
     * </table>
     * <p>
     * If <b>OPAQUE_SPECIAL_TYPES</b> was defined while compiling the SNMP library, the following are also valid:
     * </p>
     * <b>types:</b>
     * <table>
     * <tbody>
     * <tr><td>U</td><td>unsigned int64</td></tr>
     * <tr><td>I</td><td>signed int64</td></tr>
     * <tr><td>F</td><td>float</td></tr>
     * <tr><td>D</td><td>double</td></tr>
     * </tbody>
     * </table>
     * <p>
     * Most of these will use the obvious corresponding ASN.1 type.  's', 'x', 'd' and 'b' are all different ways of specifying an OCTET STRING value, and
     * the 'u' unsigned type is also used for handling Gauge32 values.
     * </p>
     *
     * <p>
     * If the MIB-Files are loaded by into the MIB Tree with "snmp_read_mib" or by specifying it in the libsnmp config, '=' may be used as
     * the <i>type</i> parameter for all object ids as the type can then be automatically read from the MIB.
     * </p>
     *
     * <p>
     * Note that there are two ways to set a variable of the type BITS like e.g.
     * "SYNTAX    BITS {telnet(0), ftp(1), http(2), icmp(3), snmp(4), ssh(5), https(6)}":
     * </p>
     * <ul>
     * <li>
     * Using type "b" and a list of bit numbers. This method is not recommended since GET query for the same OID would return e.g. 0xF8.
     * </li>
     * <li>
     * Using type "x" and a hex number but without(!) the usual "0x" prefix.
     * </li>
     * </ul>
     * <p>
     * See examples section for more details.
     * </p>
     * @param mixed $value <p>
     * The new value.</p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function set($object_id, $type, $value) {}

    /**
     * Get last error code
     * @link https://php.net/manual/en/snmp.geterrno.php
     * @return int one of SNMP error code values described in constants chapter.
     * @since 5.4
     */
    public function getErrno() {}

    /**
     * Get last error message
     * @link https://php.net/manual/en/snmp.geterror.php
     * @return string String describing error from last SNMP request.
     * @since 5.4
     */
    public function getError() {}
}

/**
 * Represents an error raised by SNMP. You should not throw a
 * <b>SNMPException</b> from your own code.
 * See Exceptions for more
 * information about Exceptions in PHP.
 * @link https://php.net/manual/en/class.snmpexception.php
 */
class SNMPException extends RuntimeException
{
    /**
     * @var string Textual error message. Exception::getMessage() to access it.
     */
    protected $message;

    /**
     * @var string SNMP library error code. Use Exception::getCode() to access it.
     */
    protected $code;
}

/**
 * Fetch an SNMP object
 * @link https://php.net/manual/en/function.snmpget.php
 * @param string $hostname <p>
 * The SNMP agent.
 * </p>
 * @param string $community <p>
 * The read community.
 * </p>
 * @param string $object_id <p>
 * The SNMP object.
 * </p>
 * @param int $timeout [optional] <p>
 * The number of microseconds until the first timeout.
 * </p>
 * @param int $retries [optional] <p>
 * The number of times to retry if timeouts occur.
 * </p>
 * @return string|false SNMP object value on success or <b>FALSE</b> on error.
 */
function snmpget($hostname, $community, $object_id, $timeout = 1000000, $retries = 5) {}

/**
 * Fetch the SNMP object which follows the given object id
 * @link https://php.net/manual/en/function.snmpgetnext.php
 * @param string $host <p>The hostname of the SNMP agent (server).</p>
 * @param string $community <p>The read community.</p>
 * @param string $object_id <p>The SNMP object id which precedes the wanted one.</p>
 * @param int $timeout [optional] <p>The number of microseconds until the first timeout.</p>
 * @param int $retries [optional] <p>The number of times to retry if timeouts occur.</p>
 * @return string|false SNMP object value on success or <b>FALSE</b> on error.
 * In case of an error, an E_WARNING message is shown.
 */
function snmpgetnext($host, $community, $object_id, $timeout = 1000000, $retries = 5) {}

/**
 * Fetch all the SNMP objects from an agent
 * @link https://php.net/manual/en/function.snmpwalk.php
 * @param string $hostname <p>
 * The SNMP agent (server).
 * </p>
 * @param string $community <p>
 * The read community.
 * </p>
 * @param string $object_id <p>
 * If <b>NULL</b>, <i>object_id</i> is taken as the root of
 * the SNMP objects tree and all objects under that tree are returned as
 * an array.
 * </p>
 * <p>
 * If <i>object_id</i> is specified, all the SNMP objects
 * below that <i>object_id</i> are returned.
 * </p>
 * @param int $timeout [optional] <p>
 * The number of microseconds until the first timeout.
 * </p>
 * @param int $retries [optional] <p>The number of times to retry if timeouts occur.</p>
 * @return array an array of SNMP object values starting from the
 * <i>object_id</i> as root or <b>FALSE</b> on error.
 */
function snmpwalk($hostname, $community, $object_id, $timeout = 1000000, $retries = 5) {}

/**
 * Return all objects including their respective object ID within the specified one
 * @link https://php.net/manual/en/function.snmprealwalk.php
 * @param string $host <p>The hostname of the SNMP agent (server).</p>
 * @param string $community <p>The read community.</p>
 * @param string $object_id <p>The SNMP object id which precedes the wanted one.</p>
 * @param int $timeout [optional] <p>The number of microseconds until the first timeout.</p>
 * @param int $retries [optional] <p>The number of times to retry if timeouts occur.</p>
 * @return array|false an associative array of the SNMP object ids and their values on success or <b>FALSE</b> on error.
 * In case of an error, an E_WARNING message is shown.
 */
function snmprealwalk($host, $community, $object_id, $timeout = 1000000, $retries = 5) {}

/**
 * Query for a tree of information about a network entity
 * @link https://php.net/manual/en/function.snmpwalkoid.php
 * @param string $hostname <p>
 * The SNMP agent.
 * </p>
 * @param string $community <p>
 * The read community.
 * </p>
 * @param string $object_id <p>
 * If <b>NULL</b>, <i>object_id</i> is taken as the root of
 * the SNMP objects tree and all objects under that tree are returned as
 * an array.
 * </p>
 * <p>
 * If <i>object_id</i> is specified, all the SNMP objects
 * below that <i>object_id</i> are returned.
 * </p>
 * @param int $timeout [optional] <p>
 * The number of microseconds until the first timeout.
 * </p>
 * @param int $retries [optional] <p>
 * The number of times to retry if timeouts occur.
 * </p>
 * @return array an associative array with object ids and their respective
 * object value starting from the <i>object_id</i>
 * as root or <b>FALSE</b> on error.
 */
function snmpwalkoid($hostname, $community, $object_id, $timeout = 1000000, $retries = 5) {}

/**
 * Set the value of an SNMP object
 * @link https://php.net/manual/en/function.snmpset.php
 * @param string $host <p>
 * The hostname of the SNMP agent (server).
 * </p>
 * @param string $community <p>
 * The write community.
 * </p>
 * @param string $object_id <p>
 * The SNMP object id.
 * </p>
 * @param string $type The MIB defines the type of each object id. It has to be specified as a single character from the below list.
 * </p>
 * types
 * <tr valign="top"><td>=</td><td>The type is taken from the MIB</td></tr>
 * <tr valign="top"><td>i</td><td>INTEGER</td> </tr>
 * <tr valign="top"><td>u</td><td>INTEGER</td></tr>
 * <tr valign="top"><td>s</td><td>STRING</td></tr>
 * <tr valign="top"><td>x</td><td>HEX STRING</td></tr>
 * <tr valign="top"><td>d</td><td>DECIMAL STRING</td></tr>
 * <tr valign="top"><td>n</td><td>NULLOBJ</td></tr>
 * <tr valign="top"><td>o</td><td>OBJID</td></tr>
 * <tr valign="top"><td>t</td><td>TIMETICKS</td></tr>
 * <tr valign="top"><td>a</td><td>IPADDRESS</td></tr>
 * <tr valign="top"><td>b</td><td>BITS</td></tr>
 * </table>
 * If <b>OPAQUE_SPECIAL_TYPES</b> was defined while compiling the SNMP library, the following are also valid:
 * </p>
 * types
 * <tr valign="top"><td>U</td><td>unsigned int64</td></tr>
 * <tr valign="top"><td>I</td><td>signed int64</td></tr>
 * <tr valign="top"><td>F</td><td>float</td></tr>
 * <tr valign="top"><td>D</td><td>double</td></tr>
 * </table>
 * Most of these will use the obvious corresponding ASN.1 type. &#x00027;s&#x00027;, &#x00027;x&#x00027;, &#x00027;d&#x00027; and &#x00027;b&#x00027; are all different ways of specifying an OCTET STRING value, and
 * the &#x00027;u&#x00027; unsigned type is also used for handling Gauge32 values.
 * </p>
 * If the MIB-Files are loaded by into the MIB Tree with "snmp_read_mib" or by specifying it in the libsnmp config, &#x00027;=&#x00027; may be used as
 * the <i>type</i> parameter for all object ids as the type can then be automatically read from the MIB.
 * </p>
 * Note that there are two ways to set a variable of the type BITS like e.g.
 * "SYNTAX BITS {telnet(0), ftp(1), http(2), icmp(3), snmp(4), ssh(5), https(6)}":
 * </p>
 * Using type "b" and a list of bit numbers. This method is not recommended since GET query for the same OID would return e.g. 0xF8.
 * Using type "x" and a hex number but without(!) the usual "0x" prefix.
 * See examples section for more details.
 * </p>
 * @param mixed $value <p>
 * The new value.
 * </p>
 * @param int $timeout [optional] <p>
 * The number of microseconds until the first timeout.
 * </p>
 * @param int $retries [optional] <p>
 * The number of times to retry if timeouts occur.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * <p>
 * If the SNMP host rejects the data type, an E_WARNING message like "Warning: Error in packet. Reason: (badValue) The value given has the wrong type or length." is shown.
 * If an unknown or invalid OID is specified the warning probably reads "Could not add variable".
 * </p>
 */
function snmpset($host, $community, $object_id, $type, $value, $timeout = 1000000, $retries = 5) {}

/**
 * Fetches the current value of the UCD library's quick_print setting
 * @link https://php.net/manual/en/function.snmp-get-quick-print.php
 * @return bool <b>TRUE</b> if quick_print is on, <b>FALSE</b> otherwise.
 */
function snmp_get_quick_print() {}

/**
 * Set the value of <i>quick_print</i> within the UCD SNMP library
 * @link https://php.net/manual/en/function.snmp-set-quick-print.php
 * @param bool $quick_print
 * @return bool No value is returned.
 */
function snmp_set_quick_print($quick_print) {}

/**
 * Return all values that are enums with their enum value instead of the raw integer
 * @link https://php.net/manual/en/function.snmp-set-enum-print.php
 * @param int $enum_print <p>
 * As the value is interpreted as boolean by the Net-SNMP library, it can only be "0" or "1".
 * </p>
 * @return bool
 */
function snmp_set_enum_print($enum_print) {}

/**
 * Set the OID output format
 * @link https://php.net/manual/en/function.snmp-set-oid-output-format.php
 * @param int $oid_format [optional] <table>
 * OID .1.3.6.1.2.1.1.3.0 representation for various <i>oid_format</i> values
 * <tr valign="top"><td><b>SNMP_OID_OUTPUT_FULL</b></td><td>.iso.org.dod.internet.mgmt.mib-2.system.sysUpTime.sysUpTimeInstance</td></tr>
 * <tr valign="top"><td><b>SNMP_OID_OUTPUT_NUMERIC</b></td><td>.1.3.6.1.2.1.1.3.0</td> </tr>
 * </table>
 * <p>Begining from PHP 5.4.0 four additional constants available:
 * <table>
 * <tr valign="top"><td><b>SNMP_OID_OUTPUT_MODULE</b></td><td>DISMAN-EVENT-MIB::sysUpTimeInstance</td></tr>
 * <tr valign="top"><td><b>SNMP_OID_OUTPUT_SUFFIX</b></td><td>sysUpTimeInstance</td></tr>
 * <tr valign="top"><td><b>SNMP_OID_OUTPUT_UCD</b></td><td>system.sysUpTime.sysUpTimeInstance</td></tr>
 * <tr valign="top"><td><b>SNMP_OID_OUTPUT_NONE</b></td><td>Undefined</td></tr>
 * </table>
 * </p>
 * @return bool No value is returned.
 */
function snmp_set_oid_output_format($oid_format = SNMP_OID_OUTPUT_MODULE) {}

/**
 * Set the oid output format
 * @link https://php.net/manual/en/function.snmp-set-oid-numeric-print.php
 * @param int $oid_format
 * @return void
 */
function snmp_set_oid_numeric_print($oid_format) {}

/**
 * Fetch an SNMP object
 * @link https://php.net/manual/en/function.snmp2-get.php
 * @param string $host <p>
 * The SNMP agent.
 * </p>
 * @param string $community <p>
 * The read community.
 * </p>
 * @param string $object_id <p>
 * The SNMP object.
 * </p>
 * @param int $timeout [optional] <p>
 * The number of microseconds until the first timeout.
 * </p>
 * @param int $retries [optional] <p>
 * The number of times to retry if timeouts occur.
 * </p>
 * @return string|false SNMP object value on success or <b>FALSE</b> on error.
 */
function snmp2_get($host, $community, $object_id, $timeout = 1000000, $retries = 5) {}

/**
 * Fetch the SNMP object which follows the given object id
 * @link https://php.net/manual/en/function.snmp2-getnext.php
 * @param string $host <p>
 * The hostname of the SNMP agent (server).
 * </p>
 * @param string $community <p>
 * The read community.
 * </p>
 * @param string $object_id <p>
 * The SNMP object id which precedes the wanted one.
 * </p>
 * @param int $timeout [optional] <p>
 * The number of microseconds until the first timeout.
 * </p>
 * @param int $retries [optional] <p>
 * The number of times to retry if timeouts occur.
 * </p>
 * @return string|false SNMP object value on success or <b>FALSE</b> on error.
 * In case of an error, an E_WARNING message is shown.
 */
function snmp2_getnext($host, $community, $object_id, $timeout = 1000000, $retries = 5) {}

/**
 * Fetch all the SNMP objects from an agent
 * @link https://php.net/manual/en/function.snmp2-walk.php
 * @param string $host <p>
 * The SNMP agent (server).
 * </p>
 * @param string $community <p>
 * The read community.
 * </p>
 * @param string $object_id <p>
 * If <b>NULL</b>, <i>object_id</i> is taken as the root of
 * the SNMP objects tree and all objects under that tree are returned as
 * an array.
 * </p>
 * <p>
 * If <i>object_id</i> is specified, all the SNMP objects
 * below that <i>object_id</i> are returned.
 * </p>
 * @param int $timeout [optional] <p>
 * The number of microseconds until the first timeout.
 * </p>
 * @param int $retries [optional] <p>
 * The number of times to retry if timeouts occur.
 * </p>
 * @return array an array of SNMP object values starting from the
 * <i>object_id</i> as root or <b>FALSE</b> on error.
 */
function snmp2_walk($host, $community, $object_id, $timeout = 1000000, $retries = 5) {}

/**
 * Return all objects including their respective object ID within the specified one
 * @link https://php.net/manual/en/function.snmp2-real-walk.php
 * @param string $host <p>
 * The hostname of the SNMP agent (server).
 * </p>
 * @param string $community <p>
 * The read community.
 * </p>
 * @param string $object_id <p>
 * The SNMP object id which precedes the wanted one.
 * </p>
 * @param int $timeout [optional] <p>
 * The number of microseconds until the first timeout.
 * </p>
 * @param int $retries [optional] <p>
 * The number of times to retry if timeouts occur.
 * </p>
 * @return array|false an associative array of the SNMP object ids and their values on success or <b>FALSE</b> on error.
 * In case of an error, an E_WARNING message is shown.
 */
function snmp2_real_walk($host, $community, $object_id, $timeout = 1000000, $retries = 5) {}

/**
 * Set the value of an SNMP object
 * @link https://php.net/manual/en/function.snmp2-set.php
 * @param string $host <p>
 * The hostname of the SNMP agent (server).
 * </p>
 * @param string $community <p>
 * The write community.
 * </p>
 * @param string $object_id <p>
 * The SNMP object id.
 * </p>
 * @param string $type <p>The MIB defines the type of each object id. It has to be specified as a single character from the below list.
 * </p>
 * <p>types:</p>
 * <table>
 * <tr valign="top"><td>=</td><td>The type is taken from the MIB</td></tr>
 * <tr valign="top"><td>i</td><td>INTEGER</td> </tr>
 * <tr valign="top"><td>u</td><td>INTEGER</td></tr>
 * <tr valign="top"><td>s</td><td>STRING</td></tr>
 * <tr valign="top"><td>x</td><td>HEX STRING</td></tr>
 * <tr valign="top"><td>d</td><td>DECIMAL STRING</td></tr>
 * <tr valign="top"><td>n</td><td>NULLOBJ</td></tr>
 * <tr valign="top"><td>o</td><td>OBJID</td></tr>
 * <tr valign="top"><td>t</td><td>TIMETICKS</td></tr>
 * <tr valign="top"><td>a</td><td>IPADDRESS</td></tr>
 * <tr valign="top"><td>b</td><td>BITS</td></tr>
 * </table>
 * <p>If <b>OPAQUE_SPECIAL_TYPES</b> was defined while compiling the SNMP library, the following are also valid:
 * </p>
 * <p>types:</p>
 * <table>
 * <tr valign="top"><td>U</td><td>unsigned int64</td></tr>
 * <tr valign="top"><td>I</td><td>signed int64</td></tr>
 * <tr valign="top"><td>F</td><td>float</td></tr>
 * <tr valign="top"><td>D</td><td>double</td></tr>
 * </table>
 * <p>Most of these will use the obvious corresponding ASN.1 type. &#x00027;s&#x00027;, &#x00027;x&#x00027;, &#x00027;d&#x00027; and &#x00027;b&#x00027; are all different ways of specifying an OCTET STRING value, and
 * the &#x00027;u&#x00027; unsigned type is also used for handling Gauge32 values.
 * </p><p>
 * If the MIB-Files are loaded by into the MIB Tree with "snmp_read_mib" or by specifying it in the libsnmp config, &#x00027;=&#x00027; may be used as
 * the <i>type</i> parameter for all object ids as the type can then be automatically read from the MIB.
 * </p>
 * Note that there are two ways to set a variable of the type BITS like e.g.
 * "SYNTAX BITS {telnet(0), ftp(1), http(2), icmp(3), snmp(4), ssh(5), https(6)}":
 * </p>
 * Using type "b" and a list of bit numbers. This method is not recommended since GET query for the same OID would return e.g. 0xF8.
 * Using type "x" and a hex number but without(!) the usual "0x" prefix.
 * See examples section for more details.
 * </p>
 * @param string $value <p>
 * The new value.
 * </p>
 * @param int $timeout [optional] <p>
 * The number of microseconds until the first timeout.
 * </p>
 * @param int $retries [optional] <p>
 * The number of times to retry if timeouts occur.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * <p>
 * If the SNMP host rejects the data type, an E_WARNING message like "Warning: Error in packet. Reason: (badValue) The value given has the wrong type or length." is shown.
 * If an unknown or invalid OID is specified the warning probably reads "Could not add variable".
 * </p>
 */
function snmp2_set($host, $community, $object_id, $type, $value, $timeout = 1000000, $retries = 5) {}

/**
 * Fetch an SNMP object
 * @link https://php.net/manual/en/function.snmp3-get.php
 * @param string $host <p>
 * The hostname of the SNMP agent (server).
 * </p>
 * @param string $sec_name <p>
 * the security name, usually some kind of username
 * </p>
 * @param string $sec_level <p>
 * the security level (noAuthNoPriv|authNoPriv|authPriv)
 * </p>
 * @param string $auth_protocol <p>
 * the authentication protocol (MD5 or SHA)
 * </p>
 * @param string $auth_passphrase <p>
 * the authentication pass phrase
 * </p>
 * @param string $priv_protocol <p>
 * the privacy protocol (DES or AES)
 * </p>
 * @param string $priv_passphrase <p>
 * the privacy pass phrase
 * </p>
 * @param string $object_id <p>
 * The SNMP object id.
 * </p>
 * @param int $timeout [optional] <p>
 * The number of microseconds until the first timeout.
 * </p>
 * @param int $retries [optional] <p>
 * The number of times to retry if timeouts occur.
 * </p>
 * @return string|false SNMP object value on success or <b>FALSE</b> on error.
 */
function snmp3_get($host, $sec_name, $sec_level, $auth_protocol, $auth_passphrase, $priv_protocol, $priv_passphrase, $object_id, $timeout = 1000000, $retries = 5) {}

/**
 * Fetch the SNMP object which follows the given object id
 * @link https://php.net/manual/en/function.snmp3-getnext.php
 * @param string $host <p>
 * The hostname of the
 * SNMP agent (server).
 * </p>
 * @param string $sec_name <p>
 * the security name, usually some kind of username
 * </p>
 * @param string $sec_level <p>
 * the security level (noAuthNoPriv|authNoPriv|authPriv)
 * </p>
 * @param string $auth_protocol <p>
 * the authentication protocol (MD5 or SHA)
 * </p>
 * @param string $auth_passphrase <p>
 * the authentication pass phrase
 * </p>
 * @param string $priv_protocol <p>
 * the privacy protocol (DES or AES)
 * </p>
 * @param string $priv_passphrase <p>
 * the privacy pass phrase
 * </p>
 * @param string $object_id <p>
 * The SNMP object id.
 * </p>
 * @param int $timeout [optional] <p>
 * The number of microseconds until the first timeout.
 * </p>
 * @param int $retries [optional] <p>
 * The number of times to retry if timeouts occur.
 * </p>
 * @return string|false SNMP object value on success or <b>FALSE</b> on error.
 * In case of an error, an E_WARNING message is shown.
 */
function snmp3_getnext($host, $sec_name, $sec_level, $auth_protocol, $auth_passphrase, $priv_protocol, $priv_passphrase, $object_id, $timeout = 1000000, $retries = 5) {}

/**
 * Fetch all the SNMP objects from an agent
 * @link https://php.net/manual/en/function.snmp3-walk.php
 * @param string $host <p>
 * The hostname of the SNMP agent (server).
 * </p>
 * @param string $sec_name <p>
 * the security name, usually some kind of username
 * </p>
 * @param string $sec_level <p>
 * the security level (noAuthNoPriv|authNoPriv|authPriv)
 * </p>
 * @param string $auth_protocol <p>
 * the authentication protocol (MD5 or SHA)
 * </p>
 * @param string $auth_passphrase <p>
 * the authentication pass phrase
 * </p>
 * @param string $priv_protocol <p>
 * the privacy protocol (DES or AES)
 * </p>
 * @param string $priv_passphrase <p>
 * the privacy pass phrase
 * </p>
 * @param string $object_id <p>
 * If <b>NULL</b>, <i>object_id</i> is taken as the root of
 * the SNMP objects tree and all objects under that tree are returned as
 * an array.
 * </p>
 * <p>
 * If <i>object_id</i> is specified, all the SNMP objects
 * below that <i>object_id</i> are returned.
 * </p>
 * @param int $timeout [optional] <p>
 * The number of microseconds until the first timeout.
 * </p>
 * @param int $retries [optional] <p>
 * The number of times to retry if timeouts occur.
 * </p>
 * @return array an array of SNMP object values starting from the
 * <i>object_id</i> as root or <b>FALSE</b> on error.
 */
function snmp3_walk($host, $sec_name, $sec_level, $auth_protocol, $auth_passphrase, $priv_protocol, $priv_passphrase, $object_id, $timeout = 1000000, $retries = 5) {}

/**
 * Return all objects including their respective object ID within the specified one
 * @link https://php.net/manual/en/function.snmp3-real-walk.php
 * @param string $host <p>
 * The hostname of the
 * SNMP agent (server).
 * </p>
 * @param string $sec_name <p>
 * the security name, usually some kind of username
 * </p>
 * @param string $sec_level <p>
 * the security level (noAuthNoPriv|authNoPriv|authPriv)
 * </p>
 * @param string $auth_protocol <p>
 * the authentication protocol (MD5 or SHA)
 * </p>
 * @param string $auth_passphrase <p>
 * the authentication pass phrase
 * </p>
 * @param string $priv_protocol <p>
 * the privacy protocol (DES or AES)
 * </p>
 * @param string $priv_passphrase <p>
 * the privacy pass phrase
 * </p>
 * @param string $object_id <p>
 * The SNMP object id.
 * </p>
 * @param int $timeout [optional] <p>
 * The number of microseconds until the first timeout.
 * </p>
 * @param int $retries [optional] <p>
 * The number of times to retry if timeouts occur.
 * </p>
 * @return array an associative array of the
 * SNMP object ids and their values on success or <b>FALSE</b> on error.
 * In case of an error, an E_WARNING message is shown.
 */
function snmp3_real_walk($host, $sec_name, $sec_level, $auth_protocol, $auth_passphrase, $priv_protocol, $priv_passphrase, $object_id, $timeout = null, $retries = null) {}

/**
 * Set the value of an SNMP object
 * @link https://php.net/manual/en/function.snmp3-set.php
 * @param string $host <p>
 * The hostname of the SNMP agent (server).
 * </p>
 * @param string $sec_name <p>
 * the security name, usually some kind of username
 * </p>
 * @param string $sec_level <p>
 * the security level (noAuthNoPriv|authNoPriv|authPriv)
 * </p>
 * @param string $auth_protocol <p>
 * the authentication protocol (MD5 or SHA)
 * </p>
 * @param string $auth_passphrase <p>
 * the authentication pass phrase
 * </p>
 * @param string $priv_protocol <p>
 * the privacy protocol (DES or AES)
 * </p>
 * @param string $priv_passphrase <p>
 * the privacy pass phrase
 * </p>
 * @param string $object_id <p>
 * The SNMP object id.
 * </p>
 * @param string $type <p>The MIB defines the type of each object id. It has to be specified as a single character from the below list.</p>
 * <p>types:</p>
 * <table>
 * <tr valign="top"><td>=</td><td>The type is taken from the MIB</td></tr>
 * <tr valign="top"><td>i</td><td>INTEGER</td></tr>
 * <tr valign="top"><td>u</td><td>INTEGER</td></tr>
 * <tr valign="top"><td>s</td><td>STRING</td></tr>
 * <tr valign="top"><td>x</td><td>HEX STRING</td></tr>
 * <tr valign="top"><td>d</td><td>DECIMAL STRING</td></tr>
 * <tr valign="top"><td>n</td><td>NULLOBJ</td></tr>
 * <tr valign="top"><td>o</td><td>OBJID</td></tr>
 * <tr valign="top"><td>t</td><td>TIMETICKS</td></tr>
 * <tr valign="top"><td>a</td><td>IPADDRESS</td></tr>
 * <tr valign="top"><td>b</td><td>BITS</td></tr>
 * </table>
 * <p>If <b>OPAQUE_SPECIAL_TYPES</b> was defined while compiling the SNMP library, the following are also valid:
 * </p>
 * <p>types:</p>
 * <table>
 * <tr valign="top"><td>U</td><td>unsigned int64</td></tr>
 * <tr valign="top"><td>I</td><td>signed int64</td></tr>
 * <tr valign="top"><td>F</td><td>float</td></tr>
 * <tr valign="top"><td>D</td><td>double</td></tr>
 * </table>
 * <p>Most of these will use the obvious corresponding ASN.1 type. &#x00027;s&#x00027;, &#x00027;x&#x00027;, &#x00027;d&#x00027; and &#x00027;b&#x00027; are all different ways of specifying an OCTET STRING value, and
 * the &#x00027;u&#x00027; unsigned type is also used for handling Gauge32 values.
 * </p>
 * <p>
 * If the MIB-Files are loaded by into the MIB Tree with "snmp_read_mib" or by specifying it in the libsnmp config, &#x00027;=&#x00027; may be used as
 * the <i>type</i> parameter for all object ids as the type can then be automatically read from the MIB.
 * </p>
 * <p>
 * Note that there are two ways to set a variable of the type BITS like e.g.
 * "SYNTAX BITS {telnet(0), ftp(1), http(2), icmp(3), snmp(4), ssh(5), https(6)}":
 * </p>
 * <p>
 * Using type "b" and a list of bit numbers. This method is not recommended since GET query for the same OID would return e.g. 0xF8.
 * Using type "x" and a hex number but without(!) the usual "0x" prefix.
 * See examples section for more details.
 * </p>
 * @param string $value <p>
 * The new value
 * </p>
 * @param int $timeout [optional] <p>
 * The number of microseconds until the first timeout.
 * </p>
 * @param int $retries [optional] <p>
 * The number of times to retry if timeouts occur.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * <p>
 * If the SNMP host rejects the data type, an E_WARNING message like "Warning: Error in packet. Reason: (badValue) The value given has the wrong type or length." is shown.
 * If an unknown or invalid OID is specified the warning probably reads "Could not add variable".
 * </p>
 */
function snmp3_set($host, $sec_name, $sec_level, $auth_protocol, $auth_passphrase, $priv_protocol, $priv_passphrase, $object_id, $type, $value, $timeout = 1000000, $retries = 5) {}

/**
 * Specify the method how the SNMP values will be returned
 * @link https://php.net/manual/en/function.snmp-set-valueretrieval.php
 * @param int $method <table>
 * types
 * <tr valign="top">
 * <td>SNMP_VALUE_LIBRARY</td>
 * <td>The return values will be as returned by the Net-SNMP library.</td>
 * </tr>
 * <tr valign="top">
 * <td>SNMP_VALUE_PLAIN</td>
 * <td>The return values will be the plain value without the SNMP type hint.</td>
 * </tr>
 * <tr valign="top">
 * <td>SNMP_VALUE_OBJECT</td>
 * <td>
 * The return values will be objects with the properties "value" and "type", where the latter
 * is one of the SNMP_OCTET_STR, SNMP_COUNTER etc. constants. The
 * way "value" is returned is based on which one of constants
 * <b>SNMP_VALUE_LIBRARY</b>, <b>SNMP_VALUE_PLAIN</b> is set.
 * </td>
 * </tr>
 * </table>
 * @return bool
 */
function snmp_set_valueretrieval($method) {}

/**
 * Return the method how the SNMP values will be returned
 * @link https://php.net/manual/en/function.snmp-get-valueretrieval.php
 * @return int OR-ed combitantion of constants ( <b>SNMP_VALUE_LIBRARY</b> or
 * <b>SNMP_VALUE_PLAIN</b> ) with
 * possible SNMP_VALUE_OBJECT set.
 */
function snmp_get_valueretrieval() {}

/**
 * Reads and parses a MIB file into the active MIB tree
 * @link https://php.net/manual/en/function.snmp-read-mib.php
 * @param string $filename <p>The filename of the MIB.</p>
 * @return bool
 */
function snmp_read_mib($filename) {}

/**
 * As of 5.4
 * @link https://php.net/manual/en/snmp.constants.php
 */
define('SNMP_OID_OUTPUT_SUFFIX', 1);

/**
 * As of 5.4
 * @link https://php.net/manual/en/snmp.constants.php
 */
define('SNMP_OID_OUTPUT_MODULE', 2);

/**
 * As of 5.2
 * @link https://php.net/manual/en/snmp.constants.php
 */
define('SNMP_OID_OUTPUT_FULL', 3);

/**
 * As of 5.2
 * @link https://php.net/manual/en/snmp.constants.php
 */
define('SNMP_OID_OUTPUT_NUMERIC', 4);

/**
 * As of 5.4
 * @link https://php.net/manual/en/snmp.constants.php
 */
define('SNMP_OID_OUTPUT_UCD', 5);

/**
 * As of 5.4
 * @link https://php.net/manual/en/snmp.constants.php
 */
define('SNMP_OID_OUTPUT_NONE', 6);
define('SNMP_VALUE_LIBRARY', 0);
define('SNMP_VALUE_PLAIN', 1);
define('SNMP_VALUE_OBJECT', 2);
define('SNMP_BIT_STR', 3);
define('SNMP_OCTET_STR', 4);
define('SNMP_OPAQUE', 68);
define('SNMP_NULL', 5);
define('SNMP_OBJECT_ID', 6);
define('SNMP_IPADDRESS', 64);
define('SNMP_COUNTER', 66);
define('SNMP_UNSIGNED', 66);
define('SNMP_TIMETICKS', 67);
define('SNMP_UINTEGER', 71);
define('SNMP_INTEGER', 2);
define('SNMP_COUNTER64', 70);

// End of snmp v.0.1
<?php

use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;

/**
 * <p>IntlChar provides access to a number of utility methods that can be used to access information about Unicode characters.</p>
 * <p>The methods and constants adhere closely to the names and behavior used by the underlying ICU library.</p>
 * @since 7.0
 */
class IntlChar
{
    public const UNICODE_VERSION = 13.0;
    public const CODEPOINT_MIN = 0;
    public const CODEPOINT_MAX = 1114111;
    public const FOLD_CASE_DEFAULT = 0;
    public const FOLD_CASE_EXCLUDE_SPECIAL_I = 1;
    public const PROPERTY_ALPHABETIC = 0;
    public const PROPERTY_BINARY_START = 0;
    public const PROPERTY_ASCII_HEX_DIGIT = 1;
    public const PROPERTY_BIDI_CONTROL = 2;
    public const PROPERTY_BIDI_MIRRORED = 3;
    public const PROPERTY_DASH = 4;
    public const PROPERTY_DEFAULT_IGNORABLE_CODE_POINT = 5;
    public const PROPERTY_DEPRECATED = 6;
    public const PROPERTY_DIACRITIC = 7;
    public const PROPERTY_EXTENDER = 8;
    public const PROPERTY_FULL_COMPOSITION_EXCLUSION = 9;
    public const PROPERTY_GRAPHEME_BASE = 10;
    public const PROPERTY_GRAPHEME_EXTEND = 11;
    public const PROPERTY_GRAPHEME_LINK = 12;
    public const PROPERTY_HEX_DIGIT = 13;
    public const PROPERTY_HYPHEN = 14;
    public const PROPERTY_ID_CONTINUE = 15;
    public const PROPERTY_ID_START = 16;
    public const PROPERTY_IDEOGRAPHIC = 17;
    public const PROPERTY_IDS_BINARY_OPERATOR = 18;
    public const PROPERTY_IDS_TRINARY_OPERATOR = 19;
    public const PROPERTY_JOIN_CONTROL = 20;
    public const PROPERTY_LOGICAL_ORDER_EXCEPTION = 21;
    public const PROPERTY_LOWERCASE = 22;
    public const PROPERTY_MATH = 23;
    public const PROPERTY_NONCHARACTER_CODE_POINT = 24;
    public const PROPERTY_QUOTATION_MARK = 25;
    public const PROPERTY_RADICAL = 26;
    public const PROPERTY_SOFT_DOTTED = 27;
    public const PROPERTY_TERMINAL_PUNCTUATION = 28;
    public const PROPERTY_UNIFIED_IDEOGRAPH = 29;
    public const PROPERTY_UPPERCASE = 30;
    public const PROPERTY_WHITE_SPACE = 31;
    public const PROPERTY_XID_CONTINUE = 32;
    public const PROPERTY_XID_START = 33;
    public const PROPERTY_CASE_SENSITIVE = 34;
    public const PROPERTY_S_TERM = 35;
    public const PROPERTY_VARIATION_SELECTOR = 36;
    public const PROPERTY_NFD_INERT = 37;
    public const PROPERTY_NFKD_INERT = 38;
    public const PROPERTY_NFC_INERT = 39;
    public const PROPERTY_NFKC_INERT = 40;
    public const PROPERTY_SEGMENT_STARTER = 41;
    public const PROPERTY_PATTERN_SYNTAX = 42;
    public const PROPERTY_PATTERN_WHITE_SPACE = 43;
    public const PROPERTY_POSIX_ALNUM = 44;
    public const PROPERTY_POSIX_BLANK = 45;
    public const PROPERTY_POSIX_GRAPH = 46;
    public const PROPERTY_POSIX_PRINT = 47;
    public const PROPERTY_POSIX_XDIGIT = 48;
    public const PROPERTY_CASED = 49;
    public const PROPERTY_CASE_IGNORABLE = 50;
    public const PROPERTY_CHANGES_WHEN_LOWERCASED = 51;
    public const PROPERTY_CHANGES_WHEN_UPPERCASED = 52;
    public const PROPERTY_CHANGES_WHEN_TITLECASED = 53;
    public const PROPERTY_CHANGES_WHEN_CASEFOLDED = 54;
    public const PROPERTY_CHANGES_WHEN_CASEMAPPED = 55;
    public const PROPERTY_CHANGES_WHEN_NFKC_CASEFOLDED = 56;
    public const PROPERTY_BINARY_LIMIT = 65;
    public const PROPERTY_BIDI_CLASS = 4096;
    public const PROPERTY_INT_START = 4096;
    public const PROPERTY_BLOCK = 4097;
    public const PROPERTY_CANONICAL_COMBINING_CLASS = 4098;
    public const PROPERTY_DECOMPOSITION_TYPE = 4099;
    public const PROPERTY_EAST_ASIAN_WIDTH = 4100;
    public const PROPERTY_GENERAL_CATEGORY = 4101;
    public const PROPERTY_JOINING_GROUP = 4102;
    public const PROPERTY_JOINING_TYPE = 4103;
    public const PROPERTY_LINE_BREAK = 4104;
    public const PROPERTY_NUMERIC_TYPE = 4105;
    public const PROPERTY_SCRIPT = 4106;
    public const PROPERTY_HANGUL_SYLLABLE_TYPE = 4107;
    public const PROPERTY_NFD_QUICK_CHECK = 4108;
    public const PROPERTY_NFKD_QUICK_CHECK = 4109;
    public const PROPERTY_NFC_QUICK_CHECK = 4110;
    public const PROPERTY_NFKC_QUICK_CHECK = 4111;
    public const PROPERTY_LEAD_CANONICAL_COMBINING_CLASS = 4112;
    public const PROPERTY_TRAIL_CANONICAL_COMBINING_CLASS = 4113;
    public const PROPERTY_GRAPHEME_CLUSTER_BREAK = 4114;
    public const PROPERTY_SENTENCE_BREAK = 4115;
    public const PROPERTY_WORD_BREAK = 4116;
    public const PROPERTY_BIDI_PAIRED_BRACKET_TYPE = 4117;
    public const PROPERTY_INT_LIMIT = 4121;
    public const PROPERTY_GENERAL_CATEGORY_MASK = 8192;
    public const PROPERTY_MASK_START = 8192;
    public const PROPERTY_MASK_LIMIT = 8193;
    public const PROPERTY_NUMERIC_VALUE = 12288;
    public const PROPERTY_DOUBLE_START = 12288;
    public const PROPERTY_DOUBLE_LIMIT = 12289;
    public const PROPERTY_AGE = 16384;
    public const PROPERTY_STRING_START = 16384;
    public const PROPERTY_BIDI_MIRRORING_GLYPH = 16385;
    public const PROPERTY_CASE_FOLDING = 16386;
    public const PROPERTY_ISO_COMMENT = 16387;
    public const PROPERTY_LOWERCASE_MAPPING = 16388;
    public const PROPERTY_NAME = 16389;
    public const PROPERTY_SIMPLE_CASE_FOLDING = 16390;
    public const PROPERTY_SIMPLE_LOWERCASE_MAPPING = 16391;
    public const PROPERTY_SIMPLE_TITLECASE_MAPPING = 16392;
    public const PROPERTY_SIMPLE_UPPERCASE_MAPPING = 16393;
    public const PROPERTY_TITLECASE_MAPPING = 16394;
    public const PROPERTY_UNICODE_1_NAME = 16395;
    public const PROPERTY_UPPERCASE_MAPPING = 16396;
    public const PROPERTY_BIDI_PAIRED_BRACKET = 16397;
    public const PROPERTY_STRING_LIMIT = 16398;
    public const PROPERTY_SCRIPT_EXTENSIONS = 28672;
    public const PROPERTY_OTHER_PROPERTY_START = 28672;
    public const PROPERTY_OTHER_PROPERTY_LIMIT = 28673;
    public const PROPERTY_INVALID_CODE = -1;
    public const CHAR_CATEGORY_UNASSIGNED = 0;
    public const CHAR_CATEGORY_GENERAL_OTHER_TYPES = 0;
    public const CHAR_CATEGORY_UPPERCASE_LETTER = 1;
    public const CHAR_CATEGORY_LOWERCASE_LETTER = 2;
    public const CHAR_CATEGORY_TITLECASE_LETTER = 3;
    public const CHAR_CATEGORY_MODIFIER_LETTER = 4;
    public const CHAR_CATEGORY_OTHER_LETTER = 5;
    public const CHAR_CATEGORY_NON_SPACING_MARK = 6;
    public const CHAR_CATEGORY_ENCLOSING_MARK = 7;
    public const CHAR_CATEGORY_COMBINING_SPACING_MARK = 8;
    public const CHAR_CATEGORY_DECIMAL_DIGIT_NUMBER = 9;
    public const CHAR_CATEGORY_LETTER_NUMBER = 10;
    public const CHAR_CATEGORY_OTHER_NUMBER = 11;
    public const CHAR_CATEGORY_SPACE_SEPARATOR = 12;
    public const CHAR_CATEGORY_LINE_SEPARATOR = 13;
    public const CHAR_CATEGORY_PARAGRAPH_SEPARATOR = 14;
    public const CHAR_CATEGORY_CONTROL_CHAR = 15;
    public const CHAR_CATEGORY_FORMAT_CHAR = 16;
    public const CHAR_CATEGORY_PRIVATE_USE_CHAR = 17;
    public const CHAR_CATEGORY_SURROGATE = 18;
    public const CHAR_CATEGORY_DASH_PUNCTUATION = 19;
    public const CHAR_CATEGORY_START_PUNCTUATION = 20;
    public const CHAR_CATEGORY_END_PUNCTUATION = 21;
    public const CHAR_CATEGORY_CONNECTOR_PUNCTUATION = 22;
    public const CHAR_CATEGORY_OTHER_PUNCTUATION = 23;
    public const CHAR_CATEGORY_MATH_SYMBOL = 24;
    public const CHAR_CATEGORY_CURRENCY_SYMBOL = 25;
    public const CHAR_CATEGORY_MODIFIER_SYMBOL = 26;
    public const CHAR_CATEGORY_OTHER_SYMBOL = 27;
    public const CHAR_CATEGORY_INITIAL_PUNCTUATION = 28;
    public const CHAR_CATEGORY_FINAL_PUNCTUATION = 29;
    public const CHAR_CATEGORY_CHAR_CATEGORY_COUNT = 30;
    public const CHAR_DIRECTION_LEFT_TO_RIGHT = 0;
    public const CHAR_DIRECTION_RIGHT_TO_LEFT = 1;
    public const CHAR_DIRECTION_EUROPEAN_NUMBER = 2;
    public const CHAR_DIRECTION_EUROPEAN_NUMBER_SEPARATOR = 3;
    public const CHAR_DIRECTION_EUROPEAN_NUMBER_TERMINATOR = 4;
    public const CHAR_DIRECTION_ARABIC_NUMBER = 5;
    public const CHAR_DIRECTION_COMMON_NUMBER_SEPARATOR = 6;
    public const CHAR_DIRECTION_BLOCK_SEPARATOR = 7;
    public const CHAR_DIRECTION_SEGMENT_SEPARATOR = 8;
    public const CHAR_DIRECTION_WHITE_SPACE_NEUTRAL = 9;
    public const CHAR_DIRECTION_OTHER_NEUTRAL = 10;
    public const CHAR_DIRECTION_LEFT_TO_RIGHT_EMBEDDING = 11;
    public const CHAR_DIRECTION_LEFT_TO_RIGHT_OVERRIDE = 12;
    public const CHAR_DIRECTION_RIGHT_TO_LEFT_ARABIC = 13;
    public const CHAR_DIRECTION_RIGHT_TO_LEFT_EMBEDDING = 14;
    public const CHAR_DIRECTION_RIGHT_TO_LEFT_OVERRIDE = 15;
    public const CHAR_DIRECTION_POP_DIRECTIONAL_FORMAT = 16;
    public const CHAR_DIRECTION_DIR_NON_SPACING_MARK = 17;
    public const CHAR_DIRECTION_BOUNDARY_NEUTRAL = 18;
    public const CHAR_DIRECTION_FIRST_STRONG_ISOLATE = 19;
    public const CHAR_DIRECTION_LEFT_TO_RIGHT_ISOLATE = 20;
    public const CHAR_DIRECTION_RIGHT_TO_LEFT_ISOLATE = 21;
    public const CHAR_DIRECTION_POP_DIRECTIONAL_ISOLATE = 22;
    public const CHAR_DIRECTION_CHAR_DIRECTION_COUNT = 23;
    public const BLOCK_CODE_NO_BLOCK = 0;
    public const BLOCK_CODE_BASIC_LATIN = 1;
    public const BLOCK_CODE_LATIN_1_SUPPLEMENT = 2;
    public const BLOCK_CODE_LATIN_EXTENDED_A = 3;
    public const BLOCK_CODE_LATIN_EXTENDED_B = 4;
    public const BLOCK_CODE_IPA_EXTENSIONS = 5;
    public const BLOCK_CODE_SPACING_MODIFIER_LETTERS = 6;
    public const BLOCK_CODE_COMBINING_DIACRITICAL_MARKS = 7;
    public const BLOCK_CODE_GREEK = 8;
    public const BLOCK_CODE_CYRILLIC = 9;
    public const BLOCK_CODE_ARMENIAN = 10;
    public const BLOCK_CODE_HEBREW = 11;
    public const BLOCK_CODE_ARABIC = 12;
    public const BLOCK_CODE_SYRIAC = 13;
    public const BLOCK_CODE_THAANA = 14;
    public const BLOCK_CODE_DEVANAGARI = 15;
    public const BLOCK_CODE_BENGALI = 16;
    public const BLOCK_CODE_GURMUKHI = 17;
    public const BLOCK_CODE_GUJARATI = 18;
    public const BLOCK_CODE_ORIYA = 19;
    public const BLOCK_CODE_TAMIL = 20;
    public const BLOCK_CODE_TELUGU = 21;
    public const BLOCK_CODE_KANNADA = 22;
    public const BLOCK_CODE_MALAYALAM = 23;
    public const BLOCK_CODE_SINHALA = 24;
    public const BLOCK_CODE_THAI = 25;
    public const BLOCK_CODE_LAO = 26;
    public const BLOCK_CODE_TIBETAN = 27;
    public const BLOCK_CODE_MYANMAR = 28;
    public const BLOCK_CODE_GEORGIAN = 29;
    public const BLOCK_CODE_HANGUL_JAMO = 30;
    public const BLOCK_CODE_ETHIOPIC = 31;
    public const BLOCK_CODE_CHEROKEE = 32;
    public const BLOCK_CODE_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS = 33;
    public const BLOCK_CODE_OGHAM = 34;
    public const BLOCK_CODE_RUNIC = 35;
    public const BLOCK_CODE_KHMER = 36;
    public const BLOCK_CODE_MONGOLIAN = 37;
    public const BLOCK_CODE_LATIN_EXTENDED_ADDITIONAL = 38;
    public const BLOCK_CODE_GREEK_EXTENDED = 39;
    public const BLOCK_CODE_GENERAL_PUNCTUATION = 40;
    public const BLOCK_CODE_SUPERSCRIPTS_AND_SUBSCRIPTS = 41;
    public const BLOCK_CODE_CURRENCY_SYMBOLS = 42;
    public const BLOCK_CODE_COMBINING_MARKS_FOR_SYMBOLS = 43;
    public const BLOCK_CODE_LETTERLIKE_SYMBOLS = 44;
    public const BLOCK_CODE_NUMBER_FORMS = 45;
    public const BLOCK_CODE_ARROWS = 46;
    public const BLOCK_CODE_MATHEMATICAL_OPERATORS = 47;
    public const BLOCK_CODE_MISCELLANEOUS_TECHNICAL = 48;
    public const BLOCK_CODE_CONTROL_PICTURES = 49;
    public const BLOCK_CODE_OPTICAL_CHARACTER_RECOGNITION = 50;
    public const BLOCK_CODE_ENCLOSED_ALPHANUMERICS = 51;
    public const BLOCK_CODE_BOX_DRAWING = 52;
    public const BLOCK_CODE_BLOCK_ELEMENTS = 53;
    public const BLOCK_CODE_GEOMETRIC_SHAPES = 54;
    public const BLOCK_CODE_MISCELLANEOUS_SYMBOLS = 55;
    public const BLOCK_CODE_DINGBATS = 56;
    public const BLOCK_CODE_BRAILLE_PATTERNS = 57;
    public const BLOCK_CODE_CJK_RADICALS_SUPPLEMENT = 58;
    public const BLOCK_CODE_KANGXI_RADICALS = 59;
    public const BLOCK_CODE_IDEOGRAPHIC_DESCRIPTION_CHARACTERS = 60;
    public const BLOCK_CODE_CJK_SYMBOLS_AND_PUNCTUATION = 61;
    public const BLOCK_CODE_HIRAGANA = 62;
    public const BLOCK_CODE_KATAKANA = 63;
    public const BLOCK_CODE_BOPOMOFO = 64;
    public const BLOCK_CODE_HANGUL_COMPATIBILITY_JAMO = 65;
    public const BLOCK_CODE_KANBUN = 66;
    public const BLOCK_CODE_BOPOMOFO_EXTENDED = 67;
    public const BLOCK_CODE_ENCLOSED_CJK_LETTERS_AND_MONTHS = 68;
    public const BLOCK_CODE_CJK_COMPATIBILITY = 69;
    public const BLOCK_CODE_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A = 70;
    public const BLOCK_CODE_CJK_UNIFIED_IDEOGRAPHS = 71;
    public const BLOCK_CODE_YI_SYLLABLES = 72;
    public const BLOCK_CODE_YI_RADICALS = 73;
    public const BLOCK_CODE_HANGUL_SYLLABLES = 74;
    public const BLOCK_CODE_HIGH_SURROGATES = 75;
    public const BLOCK_CODE_HIGH_PRIVATE_USE_SURROGATES = 76;
    public const BLOCK_CODE_LOW_SURROGATES = 77;
    public const BLOCK_CODE_PRIVATE_USE_AREA = 78;
    public const BLOCK_CODE_PRIVATE_USE = 78;
    public const BLOCK_CODE_CJK_COMPATIBILITY_IDEOGRAPHS = 79;
    public const BLOCK_CODE_ALPHABETIC_PRESENTATION_FORMS = 80;
    public const BLOCK_CODE_ARABIC_PRESENTATION_FORMS_A = 81;
    public const BLOCK_CODE_COMBINING_HALF_MARKS = 82;
    public const BLOCK_CODE_CJK_COMPATIBILITY_FORMS = 83;
    public const BLOCK_CODE_SMALL_FORM_VARIANTS = 84;
    public const BLOCK_CODE_ARABIC_PRESENTATION_FORMS_B = 85;
    public const BLOCK_CODE_SPECIALS = 86;
    public const BLOCK_CODE_HALFWIDTH_AND_FULLWIDTH_FORMS = 87;
    public const BLOCK_CODE_OLD_ITALIC = 88;
    public const BLOCK_CODE_GOTHIC = 89;
    public const BLOCK_CODE_DESERET = 90;
    public const BLOCK_CODE_BYZANTINE_MUSICAL_SYMBOLS = 91;
    public const BLOCK_CODE_MUSICAL_SYMBOLS = 92;
    public const BLOCK_CODE_MATHEMATICAL_ALPHANUMERIC_SYMBOLS = 93;
    public const BLOCK_CODE_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B = 94;
    public const BLOCK_CODE_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT = 95;
    public const BLOCK_CODE_TAGS = 96;
    public const BLOCK_CODE_CYRILLIC_SUPPLEMENT = 97;
    public const BLOCK_CODE_CYRILLIC_SUPPLEMENTARY = 97;
    public const BLOCK_CODE_TAGALOG = 98;
    public const BLOCK_CODE_HANUNOO = 99;
    public const BLOCK_CODE_BUHID = 100;
    public const BLOCK_CODE_TAGBANWA = 101;
    public const BLOCK_CODE_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A = 102;
    public const BLOCK_CODE_SUPPLEMENTAL_ARROWS_A = 103;
    public const BLOCK_CODE_SUPPLEMENTAL_ARROWS_B = 104;
    public const BLOCK_CODE_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B = 105;
    public const BLOCK_CODE_SUPPLEMENTAL_MATHEMATICAL_OPERATORS = 106;
    public const BLOCK_CODE_KATAKANA_PHONETIC_EXTENSIONS = 107;
    public const BLOCK_CODE_VARIATION_SELECTORS = 108;
    public const BLOCK_CODE_SUPPLEMENTARY_PRIVATE_USE_AREA_A = 109;
    public const BLOCK_CODE_SUPPLEMENTARY_PRIVATE_USE_AREA_B = 110;
    public const BLOCK_CODE_LIMBU = 111;
    public const BLOCK_CODE_TAI_LE = 112;
    public const BLOCK_CODE_KHMER_SYMBOLS = 113;
    public const BLOCK_CODE_PHONETIC_EXTENSIONS = 114;
    public const BLOCK_CODE_MISCELLANEOUS_SYMBOLS_AND_ARROWS = 115;
    public const BLOCK_CODE_YIJING_HEXAGRAM_SYMBOLS = 116;
    public const BLOCK_CODE_LINEAR_B_SYLLABARY = 117;
    public const BLOCK_CODE_LINEAR_B_IDEOGRAMS = 118;
    public const BLOCK_CODE_AEGEAN_NUMBERS = 119;
    public const BLOCK_CODE_UGARITIC = 120;
    public const BLOCK_CODE_SHAVIAN = 121;
    public const BLOCK_CODE_OSMANYA = 122;
    public const BLOCK_CODE_CYPRIOT_SYLLABARY = 123;
    public const BLOCK_CODE_TAI_XUAN_JING_SYMBOLS = 124;
    public const BLOCK_CODE_VARIATION_SELECTORS_SUPPLEMENT = 125;
    public const BLOCK_CODE_ANCIENT_GREEK_MUSICAL_NOTATION = 126;
    public const BLOCK_CODE_ANCIENT_GREEK_NUMBERS = 127;
    public const BLOCK_CODE_ARABIC_SUPPLEMENT = 128;
    public const BLOCK_CODE_BUGINESE = 129;
    public const BLOCK_CODE_CJK_STROKES = 130;
    public const BLOCK_CODE_COMBINING_DIACRITICAL_MARKS_SUPPLEMENT = 131;
    public const BLOCK_CODE_COPTIC = 132;
    public const BLOCK_CODE_ETHIOPIC_EXTENDED = 133;
    public const BLOCK_CODE_ETHIOPIC_SUPPLEMENT = 134;
    public const BLOCK_CODE_GEORGIAN_SUPPLEMENT = 135;
    public const BLOCK_CODE_GLAGOLITIC = 136;
    public const BLOCK_CODE_KHAROSHTHI = 137;
    public const BLOCK_CODE_MODIFIER_TONE_LETTERS = 138;
    public const BLOCK_CODE_NEW_TAI_LUE = 139;
    public const BLOCK_CODE_OLD_PERSIAN = 140;
    public const BLOCK_CODE_PHONETIC_EXTENSIONS_SUPPLEMENT = 141;
    public const BLOCK_CODE_SUPPLEMENTAL_PUNCTUATION = 142;
    public const BLOCK_CODE_SYLOTI_NAGRI = 143;
    public const BLOCK_CODE_TIFINAGH = 144;
    public const BLOCK_CODE_VERTICAL_FORMS = 145;
    public const BLOCK_CODE_NKO = 146;
    public const BLOCK_CODE_BALINESE = 147;
    public const BLOCK_CODE_LATIN_EXTENDED_C = 148;
    public const BLOCK_CODE_LATIN_EXTENDED_D = 149;
    public const BLOCK_CODE_PHAGS_PA = 150;
    public const BLOCK_CODE_PHOENICIAN = 151;
    public const BLOCK_CODE_CUNEIFORM = 152;
    public const BLOCK_CODE_CUNEIFORM_NUMBERS_AND_PUNCTUATION = 153;
    public const BLOCK_CODE_COUNTING_ROD_NUMERALS = 154;
    public const BLOCK_CODE_SUNDANESE = 155;
    public const BLOCK_CODE_LEPCHA = 156;
    public const BLOCK_CODE_OL_CHIKI = 157;
    public const BLOCK_CODE_CYRILLIC_EXTENDED_A = 158;
    public const BLOCK_CODE_VAI = 159;
    public const BLOCK_CODE_CYRILLIC_EXTENDED_B = 160;
    public const BLOCK_CODE_SAURASHTRA = 161;
    public const BLOCK_CODE_KAYAH_LI = 162;
    public const BLOCK_CODE_REJANG = 163;
    public const BLOCK_CODE_CHAM = 164;
    public const BLOCK_CODE_ANCIENT_SYMBOLS = 165;
    public const BLOCK_CODE_PHAISTOS_DISC = 166;
    public const BLOCK_CODE_LYCIAN = 167;
    public const BLOCK_CODE_CARIAN = 168;
    public const BLOCK_CODE_LYDIAN = 169;
    public const BLOCK_CODE_MAHJONG_TILES = 170;
    public const BLOCK_CODE_DOMINO_TILES = 171;
    public const BLOCK_CODE_SAMARITAN = 172;
    public const BLOCK_CODE_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED = 173;
    public const BLOCK_CODE_TAI_THAM = 174;
    public const BLOCK_CODE_VEDIC_EXTENSIONS = 175;
    public const BLOCK_CODE_LISU = 176;
    public const BLOCK_CODE_BAMUM = 177;
    public const BLOCK_CODE_COMMON_INDIC_NUMBER_FORMS = 178;
    public const BLOCK_CODE_DEVANAGARI_EXTENDED = 179;
    public const BLOCK_CODE_HANGUL_JAMO_EXTENDED_A = 180;
    public const BLOCK_CODE_JAVANESE = 181;
    public const BLOCK_CODE_MYANMAR_EXTENDED_A = 182;
    public const BLOCK_CODE_TAI_VIET = 183;
    public const BLOCK_CODE_MEETEI_MAYEK = 184;
    public const BLOCK_CODE_HANGUL_JAMO_EXTENDED_B = 185;
    public const BLOCK_CODE_IMPERIAL_ARAMAIC = 186;
    public const BLOCK_CODE_OLD_SOUTH_ARABIAN = 187;
    public const BLOCK_CODE_AVESTAN = 188;
    public const BLOCK_CODE_INSCRIPTIONAL_PARTHIAN = 189;
    public const BLOCK_CODE_INSCRIPTIONAL_PAHLAVI = 190;
    public const BLOCK_CODE_OLD_TURKIC = 191;
    public const BLOCK_CODE_RUMI_NUMERAL_SYMBOLS = 192;
    public const BLOCK_CODE_KAITHI = 193;
    public const BLOCK_CODE_EGYPTIAN_HIEROGLYPHS = 194;
    public const BLOCK_CODE_ENCLOSED_ALPHANUMERIC_SUPPLEMENT = 195;
    public const BLOCK_CODE_ENCLOSED_IDEOGRAPHIC_SUPPLEMENT = 196;
    public const BLOCK_CODE_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C = 197;
    public const BLOCK_CODE_MANDAIC = 198;
    public const BLOCK_CODE_BATAK = 199;
    public const BLOCK_CODE_ETHIOPIC_EXTENDED_A = 200;
    public const BLOCK_CODE_BRAHMI = 201;
    public const BLOCK_CODE_BAMUM_SUPPLEMENT = 202;
    public const BLOCK_CODE_KANA_SUPPLEMENT = 203;
    public const BLOCK_CODE_PLAYING_CARDS = 204;
    public const BLOCK_CODE_MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS = 205;
    public const BLOCK_CODE_EMOTICONS = 206;
    public const BLOCK_CODE_TRANSPORT_AND_MAP_SYMBOLS = 207;
    public const BLOCK_CODE_ALCHEMICAL_SYMBOLS = 208;
    public const BLOCK_CODE_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D = 209;
    public const BLOCK_CODE_ARABIC_EXTENDED_A = 210;
    public const BLOCK_CODE_ARABIC_MATHEMATICAL_ALPHABETIC_SYMBOLS = 211;
    public const BLOCK_CODE_CHAKMA = 212;
    public const BLOCK_CODE_MEETEI_MAYEK_EXTENSIONS = 213;
    public const BLOCK_CODE_MEROITIC_CURSIVE = 214;
    public const BLOCK_CODE_MEROITIC_HIEROGLYPHS = 215;
    public const BLOCK_CODE_MIAO = 216;
    public const BLOCK_CODE_SHARADA = 217;
    public const BLOCK_CODE_SORA_SOMPENG = 218;
    public const BLOCK_CODE_SUNDANESE_SUPPLEMENT = 219;
    public const BLOCK_CODE_TAKRI = 220;
    public const BLOCK_CODE_BASSA_VAH = 221;
    public const BLOCK_CODE_CAUCASIAN_ALBANIAN = 222;
    public const BLOCK_CODE_COPTIC_EPACT_NUMBERS = 223;
    public const BLOCK_CODE_COMBINING_DIACRITICAL_MARKS_EXTENDED = 224;
    public const BLOCK_CODE_DUPLOYAN = 225;
    public const BLOCK_CODE_ELBASAN = 226;
    public const BLOCK_CODE_GEOMETRIC_SHAPES_EXTENDED = 227;
    public const BLOCK_CODE_GRANTHA = 228;
    public const BLOCK_CODE_KHOJKI = 229;
    public const BLOCK_CODE_KHUDAWADI = 230;
    public const BLOCK_CODE_LATIN_EXTENDED_E = 231;
    public const BLOCK_CODE_LINEAR_A = 232;
    public const BLOCK_CODE_MAHAJANI = 233;
    public const BLOCK_CODE_MANICHAEAN = 234;
    public const BLOCK_CODE_MENDE_KIKAKUI = 235;
    public const BLOCK_CODE_MODI = 236;
    public const BLOCK_CODE_MRO = 237;
    public const BLOCK_CODE_MYANMAR_EXTENDED_B = 238;
    public const BLOCK_CODE_NABATAEAN = 239;
    public const BLOCK_CODE_OLD_NORTH_ARABIAN = 240;
    public const BLOCK_CODE_OLD_PERMIC = 241;
    public const BLOCK_CODE_ORNAMENTAL_DINGBATS = 242;
    public const BLOCK_CODE_PAHAWH_HMONG = 243;
    public const BLOCK_CODE_PALMYRENE = 244;
    public const BLOCK_CODE_PAU_CIN_HAU = 245;
    public const BLOCK_CODE_PSALTER_PAHLAVI = 246;
    public const BLOCK_CODE_SHORTHAND_FORMAT_CONTROLS = 247;
    public const BLOCK_CODE_SIDDHAM = 248;
    public const BLOCK_CODE_SINHALA_ARCHAIC_NUMBERS = 249;
    public const BLOCK_CODE_SUPPLEMENTAL_ARROWS_C = 250;
    public const BLOCK_CODE_TIRHUTA = 251;
    public const BLOCK_CODE_WARANG_CITI = 252;
    public const BLOCK_CODE_COUNT = 309;
    public const BLOCK_CODE_INVALID_CODE = -1;
    public const BPT_NONE = 0;
    public const BPT_OPEN = 1;
    public const BPT_CLOSE = 2;
    public const BPT_COUNT = 3;
    public const EA_NEUTRAL = 0;
    public const EA_AMBIGUOUS = 1;
    public const EA_HALFWIDTH = 2;
    public const EA_FULLWIDTH = 3;
    public const EA_NARROW = 4;
    public const EA_WIDE = 5;
    public const EA_COUNT = 6;
    public const UNICODE_CHAR_NAME = 0;
    public const UNICODE_10_CHAR_NAME = 1;
    public const EXTENDED_CHAR_NAME = 2;
    public const CHAR_NAME_ALIAS = 3;
    public const CHAR_NAME_CHOICE_COUNT = 4;
    public const SHORT_PROPERTY_NAME = 0;
    public const LONG_PROPERTY_NAME = 1;
    public const PROPERTY_NAME_CHOICE_COUNT = 2;
    public const DT_NONE = 0;
    public const DT_CANONICAL = 1;
    public const DT_COMPAT = 2;
    public const DT_CIRCLE = 3;
    public const DT_FINAL = 4;
    public const DT_FONT = 5;
    public const DT_FRACTION = 6;
    public const DT_INITIAL = 7;
    public const DT_ISOLATED = 8;
    public const DT_MEDIAL = 9;
    public const DT_NARROW = 10;
    public const DT_NOBREAK = 11;
    public const DT_SMALL = 12;
    public const DT_SQUARE = 13;
    public const DT_SUB = 14;
    public const DT_SUPER = 15;
    public const DT_VERTICAL = 16;
    public const DT_WIDE = 17;
    public const DT_COUNT = 18;
    public const JT_NON_JOINING = 0;
    public const JT_JOIN_CAUSING = 1;
    public const JT_DUAL_JOINING = 2;
    public const JT_LEFT_JOINING = 3;
    public const JT_RIGHT_JOINING = 4;
    public const JT_TRANSPARENT = 5;
    public const JT_COUNT = 6;
    public const JG_NO_JOINING_GROUP = 0;
    public const JG_AIN = 1;
    public const JG_ALAPH = 2;
    public const JG_ALEF = 3;
    public const JG_BEH = 4;
    public const JG_BETH = 5;
    public const JG_DAL = 6;
    public const JG_DALATH_RISH = 7;
    public const JG_E = 8;
    public const JG_FEH = 9;
    public const JG_FINAL_SEMKATH = 10;
    public const JG_GAF = 11;
    public const JG_GAMAL = 12;
    public const JG_HAH = 13;
    public const JG_TEH_MARBUTA_GOAL = 14;
    public const JG_HAMZA_ON_HEH_GOAL = 14;
    public const JG_HE = 15;
    public const JG_HEH = 16;
    public const JG_HEH_GOAL = 17;
    public const JG_HETH = 18;
    public const JG_KAF = 19;
    public const JG_KAPH = 20;
    public const JG_KNOTTED_HEH = 21;
    public const JG_LAM = 22;
    public const JG_LAMADH = 23;
    public const JG_MEEM = 24;
    public const JG_MIM = 25;
    public const JG_NOON = 26;
    public const JG_NUN = 27;
    public const JG_PE = 28;
    public const JG_QAF = 29;
    public const JG_QAPH = 30;
    public const JG_REH = 31;
    public const JG_REVERSED_PE = 32;
    public const JG_SAD = 33;
    public const JG_SADHE = 34;
    public const JG_SEEN = 35;
    public const JG_SEMKATH = 36;
    public const JG_SHIN = 37;
    public const JG_SWASH_KAF = 38;
    public const JG_SYRIAC_WAW = 39;
    public const JG_TAH = 40;
    public const JG_TAW = 41;
    public const JG_TEH_MARBUTA = 42;
    public const JG_TETH = 43;
    public const JG_WAW = 44;
    public const JG_YEH = 45;
    public const JG_YEH_BARREE = 46;
    public const JG_YEH_WITH_TAIL = 47;
    public const JG_YUDH = 48;
    public const JG_YUDH_HE = 49;
    public const JG_ZAIN = 50;
    public const JG_FE = 51;
    public const JG_KHAPH = 52;
    public const JG_ZHAIN = 53;
    public const JG_BURUSHASKI_YEH_BARREE = 54;
    public const JG_FARSI_YEH = 55;
    public const JG_NYA = 56;
    public const JG_ROHINGYA_YEH = 57;
    public const JG_MANICHAEAN_ALEPH = 58;
    public const JG_MANICHAEAN_AYIN = 59;
    public const JG_MANICHAEAN_BETH = 60;
    public const JG_MANICHAEAN_DALETH = 61;
    public const JG_MANICHAEAN_DHAMEDH = 62;
    public const JG_MANICHAEAN_FIVE = 63;
    public const JG_MANICHAEAN_GIMEL = 64;
    public const JG_MANICHAEAN_HETH = 65;
    public const JG_MANICHAEAN_HUNDRED = 66;
    public const JG_MANICHAEAN_KAPH = 67;
    public const JG_MANICHAEAN_LAMEDH = 68;
    public const JG_MANICHAEAN_MEM = 69;
    public const JG_MANICHAEAN_NUN = 70;
    public const JG_MANICHAEAN_ONE = 71;
    public const JG_MANICHAEAN_PE = 72;
    public const JG_MANICHAEAN_QOPH = 73;
    public const JG_MANICHAEAN_RESH = 74;
    public const JG_MANICHAEAN_SADHE = 75;
    public const JG_MANICHAEAN_SAMEKH = 76;
    public const JG_MANICHAEAN_TAW = 77;
    public const JG_MANICHAEAN_TEN = 78;
    public const JG_MANICHAEAN_TETH = 79;
    public const JG_MANICHAEAN_THAMEDH = 80;
    public const JG_MANICHAEAN_TWENTY = 81;
    public const JG_MANICHAEAN_WAW = 82;
    public const JG_MANICHAEAN_YODH = 83;
    public const JG_MANICHAEAN_ZAYIN = 84;
    public const JG_STRAIGHT_WAW = 85;
    public const JG_COUNT = 102;
    public const GCB_OTHER = 0;
    public const GCB_CONTROL = 1;
    public const GCB_CR = 2;
    public const GCB_EXTEND = 3;
    public const GCB_L = 4;
    public const GCB_LF = 5;
    public const GCB_LV = 6;
    public const GCB_LVT = 7;
    public const GCB_T = 8;
    public const GCB_V = 9;
    public const GCB_SPACING_MARK = 10;
    public const GCB_PREPEND = 11;
    public const GCB_REGIONAL_INDICATOR = 12;
    public const GCB_COUNT = 18;
    public const WB_OTHER = 0;
    public const WB_ALETTER = 1;
    public const WB_FORMAT = 2;
    public const WB_KATAKANA = 3;
    public const WB_MIDLETTER = 4;
    public const WB_MIDNUM = 5;
    public const WB_NUMERIC = 6;
    public const WB_EXTENDNUMLET = 7;
    public const WB_CR = 8;
    public const WB_EXTEND = 9;
    public const WB_LF = 10;
    public const WB_MIDNUMLET = 11;
    public const WB_NEWLINE = 12;
    public const WB_REGIONAL_INDICATOR = 13;
    public const WB_HEBREW_LETTER = 14;
    public const WB_SINGLE_QUOTE = 15;
    public const WB_DOUBLE_QUOTE = 16;
    public const WB_COUNT = 23;
    public const SB_OTHER = 0;
    public const SB_ATERM = 1;
    public const SB_CLOSE = 2;
    public const SB_FORMAT = 3;
    public const SB_LOWER = 4;
    public const SB_NUMERIC = 5;
    public const SB_OLETTER = 6;
    public const SB_SEP = 7;
    public const SB_SP = 8;
    public const SB_STERM = 9;
    public const SB_UPPER = 10;
    public const SB_CR = 11;
    public const SB_EXTEND = 12;
    public const SB_LF = 13;
    public const SB_SCONTINUE = 14;
    public const SB_COUNT = 15;
    public const LB_UNKNOWN = 0;
    public const LB_AMBIGUOUS = 1;
    public const LB_ALPHABETIC = 2;
    public const LB_BREAK_BOTH = 3;
    public const LB_BREAK_AFTER = 4;
    public const LB_BREAK_BEFORE = 5;
    public const LB_MANDATORY_BREAK = 6;
    public const LB_CONTINGENT_BREAK = 7;
    public const LB_CLOSE_PUNCTUATION = 8;
    public const LB_COMBINING_MARK = 9;
    public const LB_CARRIAGE_RETURN = 10;
    public const LB_EXCLAMATION = 11;
    public const LB_GLUE = 12;
    public const LB_HYPHEN = 13;
    public const LB_IDEOGRAPHIC = 14;
    public const LB_INSEPARABLE = 15;
    public const LB_INSEPERABLE = 15;
    public const LB_INFIX_NUMERIC = 16;
    public const LB_LINE_FEED = 17;
    public const LB_NONSTARTER = 18;
    public const LB_NUMERIC = 19;
    public const LB_OPEN_PUNCTUATION = 20;
    public const LB_POSTFIX_NUMERIC = 21;
    public const LB_PREFIX_NUMERIC = 22;
    public const LB_QUOTATION = 23;
    public const LB_COMPLEX_CONTEXT = 24;
    public const LB_SURROGATE = 25;
    public const LB_SPACE = 26;
    public const LB_BREAK_SYMBOLS = 27;
    public const LB_ZWSPACE = 28;
    public const LB_NEXT_LINE = 29;
    public const LB_WORD_JOINER = 30;
    public const LB_H2 = 31;
    public const LB_H3 = 32;
    public const LB_JL = 33;
    public const LB_JT = 34;
    public const LB_JV = 35;
    public const LB_CLOSE_PARENTHESIS = 36;
    public const LB_CONDITIONAL_JAPANESE_STARTER = 37;
    public const LB_HEBREW_LETTER = 38;
    public const LB_REGIONAL_INDICATOR = 39;
    public const LB_COUNT = 43;
    public const NT_NONE = 0;
    public const NT_DECIMAL = 1;
    public const NT_DIGIT = 2;
    public const NT_NUMERIC = 3;
    public const NT_COUNT = 4;
    public const HST_NOT_APPLICABLE = 0;
    public const HST_LEADING_JAMO = 1;
    public const HST_VOWEL_JAMO = 2;
    public const HST_TRAILING_JAMO = 3;
    public const HST_LV_SYLLABLE = 4;
    public const HST_LVT_SYLLABLE = 5;
    public const HST_COUNT = 6;
    public const NO_NUMERIC_VALUE = -123456789;

    /**
     * Check a binary Unicode property for a code point
     * @link https://php.net/manual/en/intlchar.hasbinaryproperty.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @param int $property The Unicode property to lookup (see the IntlChar::PROPERTY_* constants).
     * @return bool|null Returns TRUE or FALSE according to the binary Unicode property value for codepoint.
     * Also FALSE if property is out of bounds or if the Unicode version does not have data for the property at all, or not for this code point.
     * Or NULL if <em>codepoint</em> is out of bounds.
     * @since 7.0
     */
    #[Pure]
    #[TentativeType]
    public static function hasBinaryProperty(
        #[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property
    ): ?bool {}

    /**
     * @link https://php.net/manual/en/intlchar.charage.php
     * Get the "age" of the code point
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return array|null The Unicode version number, as an array. For example, version 1.3.31.2 would be represented as [1, 3, 31, 2].
     * Or NULL if <em>codepoint</em> is out of bounds.
     * @since 7.0
     */
    #[TentativeType]
    public static function charAge(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?array {}

    /**
     * @link https://php.net/manual/en/intlchar.chardigitvalue.php
     * Get the decimal digit value of a decimal digit character
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return int|null The decimal digit value of codepoint, or -1 if it is not a decimal digit character.
     * Or NULL if <em>codepoint</em> is out of bounds.
     * @since 7.0
     */
    #[TentativeType]
    public static function charDigitValue(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?int {}

    /**
     * Get bidirectional category value for a code point
     * @link https://php.net/manual/en/intlchar.chardirection.php
     * @param int|string $codepoint <p>The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")</p>
     * @return int|null <p>The bidirectional category value; one of the following constants:
     * </p>
     * <ul>
     * <li><b> IntlChar::CHAR_DIRECTION_LEFT_TO_RIGHT </b></li>
     * <li><b> IntlChar::CHAR_DIRECTION_RIGHT_TO_LEFT </b></li>
     * <li><b> IntlChar::CHAR_DIRECTION_EUROPEAN_NUMBER </b></li>
     * <li><b> IntlChar::CHAR_DIRECTION_EUROPEAN_NUMBER_SEPARATOR </b></li>
     * <li><b> IntlChar::CHAR_DIRECTION_EUROPEAN_NUMBER_TERMINATOR </b></li>
     * <li><b> IntlChar::CHAR_DIRECTION_ARABIC_NUMBER </b></li>
     * <li><b> IntlChar::CHAR_DIRECTION_COMMON_NUMBER_SEPARATOR </b></li>
     * <li><b> IntlChar::CHAR_DIRECTION_BLOCK_SEPARATOR </b></li>
     * <li><b> IntlChar::CHAR_DIRECTION_SEGMENT_SEPARATOR </b></li>
     * <li><b> IntlChar::CHAR_DIRECTION_WHITE_SPACE_NEUTRAL </b></li>
     * <li><b> IntlChar::CHAR_DIRECTION_OTHER_NEUTRAL </b></li>
     * <li><b> IntlChar::CHAR_DIRECTION_LEFT_TO_RIGHT_EMBEDDING </b></li>
     * <li><b> IntlChar::CHAR_DIRECTION_LEFT_TO_RIGHT_OVERRIDE </b></li>
     * <li><b> IntlChar::CHAR_DIRECTION_RIGHT_TO_LEFT_ARABIC </b></li>
     * <li><b> IntlChar::CHAR_DIRECTION_RIGHT_TO_LEFT_EMBEDDING </b></li>
     * <li><b> IntlChar::CHAR_DIRECTION_RIGHT_TO_LEFT_OVERRIDE </b></li>
     * <li><b> IntlChar::CHAR_DIRECTION_POP_DIRECTIONAL_FORMAT </b></li>
     * <li><b> IntlChar::CHAR_DIRECTION_DIR_NON_SPACING_MARK </b></li>
     * <li><b> IntlChar::CHAR_DIRECTION_BOUNDARY_NEUTRAL </b></li>
     * <li><b> IntlChar::CHAR_DIRECTION_FIRST_STRONG_ISOLATE </b></li>
     * <li><b> IntlChar::CHAR_DIRECTION_LEFT_TO_RIGHT_ISOLATE </b></li>
     * <li><b> IntlChar::CHAR_DIRECTION_RIGHT_TO_LEFT_ISOLATE </b></li>
     * <li><b> IntlChar::CHAR_DIRECTION_POP_DIRECTIONAL_ISOLATE </b></li>
     * <li><b> IntlChar::CHAR_DIRECTION_CHAR_DIRECTION_COUNT </b></li>
     * </ul>
     * Or NULL if <em>codepoint</em> is out of bounds.
     * @since 7.0
     */
    #[TentativeType]
    public static function charDirection(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?int {}

    /**
     * @link https://php.net/manual/en/intlchar.charfromname.php
     * Find Unicode character by name and return its code point value
     * @param string $name <p>Full name of the Unicode character.</p>
     * @param int $type [optional] <p>
     * Which set of names to use for the lookup. Can be any of these constants:
     * </p><ul>
     * <li><b> IntlChar::UNICODE_CHAR_NAME </b> (default)</li>
     * <li><b> IntlChar::UNICODE_10_CHAR_NAME </b></li>
     * <li><b> IntlChar::EXTENDED_CHAR_NAME </b></li>
     * <li><b> IntlChar::CHAR_NAME_ALIAS </b></li>
     * <li><b> IntlChar::CHAR_NAME_CHOICE_COUNT </b></li>
     * </ul>
     * @return int|null The Unicode value of the code point with the given name (as an integer), or NULL if there is no such code point.
     * @since 7.0
     */
    #[TentativeType]
    public static function charFromName(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = IntlChar::UNICODE_CHAR_NAME
    ): ?int {}

    /**
     * @link https://php.net/manual/en/intlchar.charmirror.php
     * Get the "mirror-image" character for a code point
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return int|string|null Returns another Unicode code point that may serve as a mirror-image substitute, or codepoint itself if there is no such mapping or codepoint does not have the Bidi_Mirrored property.
     * The return type will be integer unless the code point was passed as a UTF-8 string, in which case a string will be returned.
     * Or NULL if <em>codepoint</em> will be out of bound.
     */
    #[TentativeType]
    public static function charMirror(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): string|int|null {}

    /**
     * Retrieve the name of a Unicode character
     * @link https://php.net/manual/en/intlchar.charname.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @param int $type [optional] Which set of names to use for the lookup. Can be any of these constants:
     * <ul>
     * <li><b> IntlChar::UNICODE_CHAR_NAME </b> (default)</li>
     * <li><b> IntlChar::UNICODE_10_CHAR_NAME </b></li>
     * <li><b> IntlChar::EXTENDED_CHAR_NAME </b></li>
     * <li><b> IntlChar::CHAR_NAME_ALIAS </b></li>
     * <li><b> IntlChar::CHAR_NAME_CHOICE_COUNT </b></li>
     * </ul>
     * @return string|null The corresponding name, or an empty string if there is no name for this character, or NULL if <em>codepoint</em> is out of bounds.
     * @since 7.0
     */
    #[TentativeType]
    public static function charName(
        #[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = IntlChar::UNICODE_CHAR_NAME
    ): ?string {}

    /**
     * Get the general category value for a code point
     * @link https://php.net/manual/en/intlchar.chartype.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return int|null Returns the general category type, which may be one of the following constants:
     * </p><ul>
     * <li><b> IntlChar::CHAR_CATEGORY_UNASSIGNED </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_GENERAL_OTHER_TYPES </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_UPPERCASE_LETTER </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_LOWERCASE_LETTER </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_TITLECASE_LETTER </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_MODIFIER_LETTER </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_OTHER_LETTER </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_NON_SPACING_MARK </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_ENCLOSING_MARK </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_COMBINING_SPACING_MARK </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_DECIMAL_DIGIT_NUMBER </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_LETTER_NUMBER </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_OTHER_NUMBER </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_SPACE_SEPARATOR </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_LINE_SEPARATOR </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_PARAGRAPH_SEPARATOR </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_CONTROL_CHAR </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_FORMAT_CHAR </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_PRIVATE_USE_CHAR </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_SURROGATE </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_DASH_PUNCTUATION </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_START_PUNCTUATION </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_END_PUNCTUATION </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_CONNECTOR_PUNCTUATION </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_OTHER_PUNCTUATION </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_MATH_SYMBOL </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_CURRENCY_SYMBOL </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_MODIFIER_SYMBOL </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_OTHER_SYMBOL </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_INITIAL_PUNCTUATION </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_FINAL_PUNCTUATION </b></li>
     * <li><b> IntlChar::CHAR_CATEGORY_CHAR_CATEGORY_COUNT </b></li></ul>
     * <p>Or NULL if <em>codepoint</em> is out of bound.</p
     * @since 7.0
     */
    #[TentativeType]
    public static function charType(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?int {}

    /**
     * Return Unicode character by code point value
     * @link https://php.net/manual/en/intlchar.chr.php
     * @param mixed $codepoint <p>The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")</p>
     * @return string|null A string containing the single character specified by the Unicode code point value.
     * Or NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function chr(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?string {}

    /**
     * Get the decimal digit value of a code point for a given radix
     * @link https://php.net/manual/en/intlchar.digit.php
     * @param int|string $codepoint <p>The integer codepoint value (e.g. <em>0x2603</em> for <em>U+2603 SNOWMAN</em>), or the character encoded as a UTF-8 string (e.g. <em>"\u{2603}"</em>)</p>
     * @param int $base <p>The radix (defaults to 10).</p>
     * @return int|false|null Returns the numeric value represented by the character in the specified radix,
     * or <b>FALSE</b> if there is no value or if the value exceeds the radix,
     * or <b>NULL</b> if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function digit(
        #[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $base = 10
    ): int|false|null {}

    /**
     * Enumerate all assigned Unicode characters within a range
     * @link https://php.net/manual/en/intlchar.enumcharnames.php
     * @param int|string $start The first code point in the enumeration range.
     * @param int|string $end One more than the last code point in the enumeration range (the first one after the range).
     * @param callable $callback <p>
     * The function that is to be called for each character name.  The following three arguments will be passed into it:
     * </p><ul>
     * <li>integer <em>$codepoint</em> - The numeric code point value</li>
     * <li>integer <em>$nameChoice</em> - The same value as the <b>nameChoice</b> parameter below</li>
     * <li>string <em>$name</em> - The name of the character</li>
     * </ul>
     * @param int $type [optional]  <p>
     * Selector for which kind of names to enumerate.  Can be any of these constants:
     * </p><ul>
     * <li><b>IntlChar::UNICODE_CHAR_NAME</b> (default)</li>
     * <li><b>IntlChar::UNICODE_10_CHAR_NAME</b></li>
     * <li><b>IntlChar::EXTENDED_CHAR_NAME</b></li>
     * <li><b>IntlChar::CHAR_NAME_ALIAS</b></li>
     * <li><b>IntlChar::CHAR_NAME_CHOICE_COUNT</b></li>
     * </ul>
     * @since 7.0
     */
    #[TentativeType]
    public static function enumCharNames(
        #[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $start,
        #[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $end,
        #[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = IntlChar::UNICODE_CHAR_NAME
    ): ?bool {}

    /**
     * Enumerate all code points with their Unicode general categories
     * @link https://php.net/manual/en/intlchar.enumchartypes.php
     * @param callable $callback <p>
     * The function that is to be called for each contiguous range of code points with the same general category.
     * The following three arguments will be passed into it:
     * </p><ul>
     * <li>integer <em>$start</em> - The starting code point of the range</li>
     * <li>integer <em>$end</em> - The ending code point of the range</li>
     * <li>integer <em>$name</em> - The category type (one of the <em>IntlChar::CHAR_CATEGORY_*</em> constants)</li>
     * </ul>
     * @since 7.0
     */
    #[TentativeType]
    public static function enumCharTypes(
        #[PhpStormStubsElementAvailable(from: '7.0', to: '7.4')] $callback = null,
        #[PhpStormStubsElementAvailable(from: '8.0')] callable $callback
    ): void {}

    /**
     * Perform case folding on a code point
     * @link https://php.net/manual/en/intlchar.foldcase.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @param int $options [optional] Either IntlChar::FOLD_CASE_DEFAULT (default) or IntlChar::FOLD_CASE_EXCLUDE_SPECIAL_I.
     * @return int|string|null Returns the Simple_Case_Folding of the code point, if any; otherwise the code point itself.
     * Returns NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function foldCase(
        #[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = IntlChar::FOLD_CASE_DEFAULT
    ): string|int|null {}

    /**
     * Get character representation for a given digit and radix
     * @link https://php.net/manual/en/intlchar.fordigit.php
     * @param int $digit <p>The number to convert to a character.</p>
     * @param int $base [optional] <p>The radix (defaults to 10).</p>
     * @return int The character representation (as a string) of the specified digit in the specified radix.
     * @since 7.0
     */
    #[TentativeType]
    public static function forDigit(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $digit,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $base = 10
    ): int {}

    /**
     * Get the paired bracket character for a code point
     * @link https://php.net/manual/en/intlchar.getbidipairedbracket.php
     * @param int|string $codepoint <p>The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")</p>
     * @return int|string|null  Returns the paired bracket code point, or <em>codepoint</em> itself if there is no such mapping.
     * The return type will be integer unless the code point was passed as a UTF-8 string, in which case a string will be returned.
     * Or NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function getBidiPairedBracket(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): string|int|null {}

    /**
     * Get the Unicode allocation block containing a code point
     * @link https://php.net/manual/en/intlchar.getblockcode.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return int|null Returns the block value for <em>codepoint</em>, or NULL if <em>codepoint</em> is out of bound.
     * See the <em>IntlChar::BLOCK_CODE_*</em> constants for possible return values.
     * @since 7.0
     */
    #[TentativeType]
    public static function getBlockCode(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?int {}

    /**
     * Get the combining class of a code point
     * @link https://php.net/manual/en/intlchar.getcombiningclass.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return int|null Returns the combining class of the character.
     * Or NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function getCombiningClass(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?int {}

    /**
     * Get the FC_NFKC_Closure property for a code point
     * @link https://php.net/manual/en/intlchar.getfc-nfkc-closure.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return string|false|null Returns the FC_NFKC_Closure property string for the codepoint, or an empty string if there is none,
     * or NULL if <em>codepoint</em> is out of bound,
     * or FALSE if there was an error.
     * @since 7.0
     */
    #[TentativeType]
    public static function getFC_NFKC_Closure(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): string|false|null {}

    /**
     * Get the max value for a Unicode property
     * @link https://php.net/manual/en/intlchar.getintpropertymaxvalue.php
     * @param int $property The Unicode property to lookup (see the IntlChar::PROPERTY_* constants).
     * @return int The maximum value returned by {@see IntlChar::getIntPropertyValue()} for a Unicode property. <=0 if the property selector is out of range.
     * @since 7.0
     */
    #[TentativeType]
    public static function getIntPropertyMaxValue(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property): int {}

    /**
     * Get the min value for a Unicode property
     * @link https://php.net/manual/en/intlchar.getintpropertyminvalue.php
     * @param int $property The Unicode property to lookup (see the IntlChar::PROPERTY_* constants).
     * @return int The minimum value returned by {@see IntlChar::getIntPropertyValue()} for a Unicode property. 0 if the property selector is out of range.
     * @since 7.0
     */
    #[TentativeType]
    public static function getIntPropertyMinValue(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property): int {}

    /**
     * Get the value for a Unicode property for a code point
     * @link https://php.net/manual/en/intlchar.getintpropertyvalue.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @param int $property The Unicode property to lookup (see the IntlChar::PROPERTY_* constants).
     * @return int|null <p>
     * Returns the numeric value that is directly the property value or, for enumerated properties, corresponds to the
     * numeric value of the enumerated constant of the respective property value enumeration type.
     * </p>
     * <p>
     * Returns <em>0</em> or <em>1</em> (for <b>FALSE</b><b>/</b><b>TRUE</B>) for binary Unicode properties.
     * </p>
     * <p>
     * Returns a bit-mask for mask properties.
     * </p>
     * <p>
     * Returns <em>0</em> if <em>property</em> is out of bounds or if the Unicode version does not
     * have data for the property at all, or not for this code point.
     * </p>
     * <p>
     * Returns NULL if <em>codepoint</em> is out of bound.
     * </p>
     * @since 7.0
     */
    #[TentativeType]
    public static function getIntPropertyValue(
        #[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property
    ): ?int {}

    /**
     * Get the numeric value for a Unicode code point
     * @link https://php.net/manual/en/intlchar.getnumericvalue.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return float|null Numeric value of codepoint, or float(-123456789) if none is defined, or NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function getNumericValue(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?float {}

    /**
     * Get the property constant value for a given property name
     * @link https://php.net/manual/en/intlchar.getpropertyenum.php
     * @param string $alias The property name to be matched. The name is compared using "loose matching" as described in PropertyAliases.txt.
     * @return int Returns an IntlChar::PROPERTY_ constant value, or <b>IntlChar::PROPERTY_INVALID_CODE</b> if the given name does not match any property.
     * @since 7.0
     */
    #[TentativeType]
    public static function getPropertyEnum(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $alias): int {}

    /**
     * Get the Unicode name for a property
     * @link https://php.net/manual/en/intlchar.getpropertyname.php
     * @param int $property <p>The Unicode property to lookup (see the IntlChar::PROPERTY_* constants).</p>
     * <p><b>IntlChar::PROPERTY_INVALID_CODE</b> should not be used. Also, if property is out of range, FALSE is returned.</p>
     * @param int $type <p> Selector for which name to get. If out of range, FALSE is returned.</p>
     * <p>All properties have a long name. Most have a short name, but some do not. Unicode allows for additional names; if present these will be returned by adding 1, 2, etc. to <b>IntlChar::LONG_PROPERTY_NAME</b>.</p>
     * @return string|false <p>
     * Returns the name, or <b>FALSE</b> if either the <em>property</em> or the <em>nameChoice</em>
     * is out of range.
     * </p>
     * <p>
     * If a given <em>nameChoice</em> returns <b>FALSE</b>, then all larger values of
     * <em>nameChoice</em> will return <b>FALSE</b>, with one exception: if <b>FALSE</b> is returned for
     * <b>IntlChar::SHORT_PROPERTY_NAME</b>, then <b>IntlChar::LONG_PROPERTY_NAME</b>
     * (and higher) may still return a non-<b>FALSE</b> value.
     * </p>
     * @since 7.0
     */
    #[TentativeType]
    public static function getPropertyName(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = IntlChar::LONG_PROPERTY_NAME
    ): string|false {}

    /**
     * Get the property value for a given value name
     * @link https://php.net/manual/en/intlchar.getpropertyvalueenum.php
     * @param int $property <p>The Unicode property to lookup (see the IntlChar::PROPERTY_* constants).
     * If out of range, or this method doesn't work with the given value, IntlChar::PROPERTY_INVALID_CODE is returned</p>
     * @param string $name <p> The value name to be matched. The name is compared using "loose matching" as described in PropertyValueAliases.txt.</p>
     * @return int Returns the corresponding value integer, or IntlChar::PROPERTY_INVALID_CODE if the given name does not match any value of the given property, or if the property is invalid.
     * @since 7.0
     */
    #[TentativeType]
    public static function getPropertyValueEnum(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name
    ): int {}

    /**
     * Get the Unicode name for a property value
     * @link https://php.net/manual/en/intlchar.getpropertyvaluename.php
     * @param int $property <p>
     * The Unicode property to lookup (see the IntlChar::PROPERTY_* constants).
     * If out of range, or this method doesn't work with the given value, FALSE is returned.
     * </p>
     * @param int $value <p>
     * Selector for a value for the given property. If out of range, <b>FALSE</b> is returned.
     * </p>
     * <p>
     * In general, valid values range from <em>0</em> up to some maximum. There are a couple exceptions:
     * </p><ul>
     * <li>
     * <b>IntlChar::PROPERTY_BLOCK</b> values begin at the non-zero value <b>IntlChar::BLOCK_CODE_BASIC_LATIN</b>
     * </li>
     * <li>
     * <b>IntlChar::PROPERTY_CANONICAL_COMBINING_CLASS</b> values are not contiguous and range from 0..240.
     * </li>
     * </ul>
     * @param int $type [optional] <p>
     * Selector for which name to get. If out of range, FALSE is returned.
     * All values have a long name. Most have a short name, but some do not. Unicode allows for additional names; if present these will be returned by adding 1, 2, etc. to IntlChar::LONG_PROPERTY_NAME.
     * </p>
     * @return  string|false Returns the name, or FALSE if either the property or the nameChoice is out of range.
     * If a given nameChoice returns FALSE, then all larger values of nameChoice will return FALSE, with one exception: if FALSE is returned for IntlChar::SHORT_PROPERTY_NAME, then IntlChar::LONG_PROPERTY_NAME (and higher) may still return a non-FALSE value.
     * @since 7.0
     */
    #[TentativeType]
    public static function getPropertyValueName(
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $value,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = IntlChar::LONG_PROPERTY_NAME
    ): string|false {}

    /**
     * Get the Unicode version
     * @link https://php.net/manual/en/intlchar.getunicodeversion.php
     * @return array An array containing the Unicode version number.
     * @since 7.0
     */
    #[TentativeType]
    public static function getUnicodeVersion(): array {}

    /**
     * Check if code point is an alphanumeric character
     * @link https://php.net/manual/en/intlchar.isalnum.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return bool|null Returns TRUE if codepoint is an alphanumeric character, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function isalnum(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Check if code point is a letter character
     * @link https://php.net/manual/en/intlchar.isalpha.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return bool|null Returns TRUE if codepoint is a letter character, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function isalpha(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Check if code point is a base character
     * @link https://php.net/manual/en/intlchar.isbase.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return bool|null Returns TRUE if codepoint is a base character, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function isbase(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Check if code point is a "blank" or "horizontal space" character
     * @link https://php.net/manual/en/intlchar.isblank.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return bool|null Returns TRUE if codepoint is either a "blank" or "horizontal space" character, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function isblank(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Check if code point is a control character
     * @link https://php.net/manual/en/intlchar.iscntrl.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return bool|null Returns TRUE if codepoint is a control character, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function iscntrl(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Check whether the code point is defined
     * @link https://php.net/manual/en/intlchar.isdefined.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return bool|null Returns TRUE if codepoint is a defined character, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function isdefined(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Check if code point is a digit character
     * @link https://php.net/manual/en/intlchar.isdigit.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return bool|null Returns TRUE if codepoint is a digit character, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function isdigit(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Check if code point is a graphic character
     * @link https://php.net/manual/en/intlchar.isgraph.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return bool|null Returns TRUE if codepoint is a "graphic" character, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function isgraph(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Check if code point is an ignorable character
     * @link https://php.net/manual/en/intlchar.isidignorable.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return bool|null Returns TRUE if codepoint is ignorable in identifiers, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function isIDIgnorable(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Check if code point is permissible in an identifier
     * @link https://php.net/manual/en/intlchar.isidpart.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return bool|null Returns TRUE if codepoint is the code point may occur in an identifier, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function isIDPart(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Check if code point is permissible as the first character in an identifier
     * @link https://php.net/manual/en/intlchar.isidstart.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return bool|null Returns TRUE if codepoint may start an identifier, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function isIDStart(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Check if code point is an ISO control code
     * @link https://php.net/manual/en/intlchar.isisocontrol.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return bool|null Returns TRUE if codepoint is an ISO control code, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function isISOControl(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Check if code point is permissible in a Java identifier
     * @link https://php.net/manual/en/intlchar.isjavaidpart.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return bool|null Returns TRUE if codepoint may occur in a Java identifier, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function isJavaIDPart(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Check if code point is permissible as the first character in a Java identifier
     * @link https://php.net/manual/en/intlchar.isjavaidstart.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return bool|null Returns TRUE if codepoint may start a Java identifier, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function isJavaIDStart(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Check if code point is a space character according to Java
     * @link https://php.net/manual/en/intlchar.isjavaspacechar.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return bool|null Returns TRUE if codepoint is a space character according to Java, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function isJavaSpaceChar(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Check if code point is a lowercase letter
     * @link https://php.net/manual/en/intlchar.islower.php
     * @param int|string $codepoint <p>The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN),
     * or the character encoded as a UTF-8 string (e.g. "\u{2603}")</p>
     * @return bool|null Returns TRUE if codepoint is an Ll lowercase letter, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function islower(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Check if code point has the Bidi_Mirrored property
     * @link https://php.net/manual/en/intlchar.ismirrored.php
     * @param int|string $codepoint <p>The integer codepoint value (e.g. <em>0x2603</em> for <em>U+2603 SNOWMAN</em>), or the character encoded as a UTF-8 string (e.g. <em>"\u{2603}"</em>)</p>
     * @return bool|null Returns TRUE if codepoint has the Bidi_Mirrored property, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function isMirrored(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Check if code point is a printable character
     * @link https://php.net/manual/en/intlchar.isprint.php
     * @param int|string $codepoint <p>The integer codepoint value (e.g. <em>0x2603</em> for <em>U+2603 SNOWMAN</em>), or the character encoded as a UTF-8 string (e.g. <em>"\u{2603}"</em>)</p>
     * @return bool|null Returns TRUE if codepoint is a printable character, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function isprint(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Check if code point is punctuation character
     * @link https://php.net/manual/en/intlchar.ispunct.php
     * @param int|string $codepoint <p>The integer codepoint value (e.g. <em>0x2603</em> for <em>U+2603 SNOWMAN</em>),
     * or the character encoded as a UTF-8 string (e.g. <em>"\u{2603}"</em>)</p>
     * @return bool|null Returns TRUE if codepoint is a punctuation character, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function ispunct(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Check if code point is a space character
     * @link https://php.net/manual/en/intlchar.isspace.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return bool|null Returns TRUE if codepoint is a space character, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function isspace(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Check if code point is a titlecase letter
     * @link https://php.net/manual/en/intlchar.istitle.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return bool|null Returns TRUE if codepoint is a titlecase letter, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function istitle(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Check if code point has the Alphabetic Unicode property
     * @link https://php.net/manual/en/intlchar.isualphabetic.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return bool|null Returns TRUE if codepoint has the Alphabetic Unicode property, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function isUAlphabetic(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Check if code point has the Lowercase Unicode property
     * @link https://php.net/manual/en/intlchar.isulowercase.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return bool|null Returns TRUE if codepoint has the Lowercase Unicode property, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function isULowercase(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Check if code point has the general category "Lu" (uppercase letter)
     * @link https://php.net/manual/en/intlchar.isupper.php
     * @param int|string $codepoint <p>The integer codepoint value (e.g. <em>0x2603</em> for <em>U+2603 SNOWMAN</em>),
     * or the character encoded as a UTF-8 string (e.g. <em>"\u{2603}"</em>)</p>
     * @return bool|null Returns TRUE if codepoint is an Lu uppercase letter, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function isupper(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Check if code point has the Uppercase Unicode property
     * @link https://php.net/manual/en/intlchar.isuuppercase.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return bool|null Returns TRUE if codepoint has the Uppercase Unicode property, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function isUUppercase(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Check if code point has the White_Space Unicode property
     * @link https://php.net/manual/en/intlchar.isuwhitespace.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return bool|null Returns TRUE if codepoint has the White_Space Unicode property, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function isUWhiteSpace(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Check if code point is a whitespace character according to ICU
     * @link https://php.net/manual/en/intlchar.iswhitespace.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return bool|null Returns TRUE if codepoint is a whitespace character according to ICU, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function isWhitespace(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Check if code point is a hexadecimal digit
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return bool|null Returns TRUE if codepoint is a hexadecimal character, FALSE if not, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function isxdigit(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}

    /**
     * Return Unicode code point value of character
     * @link https://php.net/manual/en/intlchar.ord.php
     * @param int|string $character <p>A Unicode character.</p>
     * @return int|null Returns the Unicode code point value as an integer, NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function ord(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $character): ?int {}

    /**
     * Make Unicode character lowercase
     * @link https://php.net/manual/en/intlchar.tolower.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return int|string|null Returns the Simple_Lowercase_Mapping of the code point, if any; otherwise the code point itself.
     * The return type will be integer unless the code point was passed as a UTF-8 string, in which case a string will be returned.
     * Or NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function tolower(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): string|int|null {}

    /**
     * Make Unicode character titlecase
     * @link https://php.net/manual/en/intlchar.totitle.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return int|string|null  Returns the Simple_Titlecase_Mapping of the code point, if any; otherwise the code point itself.
     * The return type will be integer unless the code point was passed as a UTF-8 string, in which case a string will be returned.
     * Or NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function totitle(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): string|int|null {}

    /**
     * Make Unicode character uppercase
     * @link https://php.net/manual/en/intlchar.toupper.php
     * @param int|string $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")
     * @return int|string|null Returns the Simple_Uppercase_Mapping of the code point, if any; otherwise the code point itself.
     * The return type will be integer unless the code point was passed as a UTF-8 string, in which case a string will be returned.
     * Or NULL if <em>codepoint</em> is out of bound.
     * @since 7.0
     */
    #[TentativeType]
    public static function toupper(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): string|int|null {}
}
<?php

// Start of intl v.1.1.0

use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\ExpectedValues as EV;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware as TypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable as ElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;

class Collator
{
    public const DEFAULT_VALUE = -1;
    public const PRIMARY = 0;
    public const SECONDARY = 1;
    public const TERTIARY = 2;
    public const DEFAULT_STRENGTH = 2;
    public const QUATERNARY = 3;
    public const IDENTICAL = 15;
    public const OFF = 16;
    public const ON = 17;
    public const SHIFTED = 20;
    public const NON_IGNORABLE = 21;
    public const LOWER_FIRST = 24;
    public const UPPER_FIRST = 25;

    /**
     * <p>
     * Sort strings with different accents from the back of the string. This
     * attribute is automatically set to
     * On
     * for the French locales and a few others. Users normally would not need
     * to explicitly set this attribute. There is a string comparison
     * performance cost when it is set On,
     * but sort key length is unaffected. Possible values are:
     * <b>Collator::ON</b>
     * <b>Collator::OFF</b>(default)
     * <b>Collator::DEFAULT_VALUE</b>
     * </p>
     * <p>
     * FRENCH_COLLATION rules
     * <p>
     * F=OFF cote &lt; coté &lt; côte &lt; côté
     * F=ON cote &lt; côte &lt; coté &lt; côté
     * </p>
     * </p>
     * @link https://php.net/manual/en/class.collator.php#intl.collator-constants
     */
    public const FRENCH_COLLATION = 0;

    /**
     * <p>
     * The Alternate attribute is used to control the handling of the so called
     * variable characters in the UCA: whitespace, punctuation and symbols. If
     * Alternate is set to NonIgnorable
     * (N), then differences among these characters are of the same importance
     * as differences among letters. If Alternate is set to
     * Shifted
     * (S), then these characters are of only minor importance. The
     * Shifted value is often used in combination with
     * Strength
     * set to Quaternary. In such a case, whitespace, punctuation, and symbols
     * are considered when comparing strings, but only if all other aspects of
     * the strings (base letters, accents, and case) are identical. If
     * Alternate is not set to Shifted, then there is no difference between a
     * Strength of 3 and a Strength of 4. For more information and examples,
     * see Variable_Weighting in the
     * UCA.
     * The reason the Alternate values are not simply
     * On and Off
     * is that additional Alternate values may be added in the future. The UCA
     * option Blanked is expressed with Strength set to 3, and Alternate set to
     * Shifted. The default for most locales is NonIgnorable. If Shifted is
     * selected, it may be slower if there are many strings that are the same
     * except for punctuation; sort key length will not be affected unless the
     * strength level is also increased.
     * </p>
     * <p>
     * Possible values are:
     * <b>Collator::NON_IGNORABLE</b>(default)
     * <b>Collator::SHIFTED</b>
     * <b>Collator::DEFAULT_VALUE</b>
     * </p>
     * <p>
     * ALTERNATE_HANDLING rules
     * <p>
     * S=3, A=N di Silva &lt; Di Silva &lt; diSilva &lt; U.S.A. &lt; USA
     * S=3, A=S di Silva = diSilva &lt; Di Silva &lt; U.S.A. = USA
     * S=4, A=S di Silva &lt; diSilva &lt; Di Silva &lt; U.S.A. &lt; USA
     * </p>
     * </p>
     * @link https://php.net/manual/en/class.collator.php#intl.collator-constants
     */
    public const ALTERNATE_HANDLING = 1;

    /**
     * <p>
     * The Case_First attribute is used to control whether uppercase letters
     * come before lowercase letters or vice versa, in the absence of other
     * differences in the strings. The possible values are
     * Uppercase_First
     * (U) and Lowercase_First
     * (L), plus the standard Default
     * and Off.
     * There is almost no difference between the Off and Lowercase_First
     * options in terms of results, so typically users will not use
     * Lowercase_First: only Off or Uppercase_First. (People interested in the
     * detailed differences between X and L should consult the Collation
     * Customization). Specifying either L or U won't affect string comparison
     * performance, but will affect the sort key length.
     * </p>
     * <p>
     * Possible values are:
     * <b>Collator::OFF</b>(default)
     * <b>Collator::LOWER_FIRST</b>
     * <b>Collator::UPPER_FIRST</b>
     * <b>Collator:DEFAULT</b>
     * </p>
     * <p>
     * CASE_FIRST rules
     * <p>
     * C=X or C=L "china" &lt; "China" &lt; "denmark" &lt; "Denmark"
     * C=U "China" &lt; "china" &lt; "Denmark" &lt; "denmark"
     * </p>
     * </p>
     * @link https://php.net/manual/en/class.collator.php#intl.collator-constants
     */
    public const CASE_FIRST = 2;

    /**
     * <p>
     * The Case_Level attribute is used when ignoring accents but not case. In
     * such a situation, set Strength to be Primary,
     * and Case_Level to be On.
     * In most locales, this setting is Off by default. There is a small
     * string comparison performance and sort key impact if this attribute is
     * set to be On.
     * </p>
     * <p>
     * Possible values are:
     * <b>Collator::OFF</b>(default)
     * <b>Collator::ON</b>
     * <b>Collator::DEFAULT_VALUE</b>
     * </p>
     * <p>
     * CASE_LEVEL rules
     * <p>
     * S=1, E=X role = Role = rôle
     * S=1, E=O role = rôle &lt; Role
     * </p>
     * </p>
     * @link https://php.net/manual/en/class.collator.php#intl.collator-constants
     */
    public const CASE_LEVEL = 3;

    /**
     * <p>
     * The Normalization setting determines whether text is thoroughly
     * normalized or not in comparison. Even if the setting is off (which is
     * the default for many locales), text as represented in common usage will
     * compare correctly (for details, see UTN #5). Only if the accent marks
     * are in noncanonical order will there be a problem. If the setting is
     * On,
     * then the best results are guaranteed for all possible text input.
     * There is a medium string comparison performance cost if this attribute
     * is On,
     * depending on the frequency of sequences that require normalization.
     * There is no significant effect on sort key length. If the input text is
     * known to be in NFD or NFKD normalization forms, there is no need to
     * enable this Normalization option.
     * </p>
     * <p>
     * Possible values are:
     * <b>Collator::OFF</b>(default)
     * <b>Collator::ON</b>
     * <b>Collator::DEFAULT_VALUE</b>
     * </p>
     * @link https://php.net/manual/en/class.collator.php#intl.collator-constants
     */
    public const NORMALIZATION_MODE = 4;

    /**
     * <p>
     * The ICU Collation Service supports many levels of comparison (named
     * "Levels", but also known as "Strengths"). Having these categories
     * enables ICU to sort strings precisely according to local conventions.
     * However, by allowing the levels to be selectively employed, searching
     * for a string in text can be performed with various matching conditions.
     * For more detailed information, see
     * <b>collator_set_strength</b> chapter.
     * </p>
     * <p>
     * Possible values are:
     * <b>Collator::PRIMARY</b>
     * <b>Collator::SECONDARY</b>
     * <b>Collator::TERTIARY</b>(default)
     * <b>Collator::QUATERNARY</b>
     * <b>Collator::IDENTICAL</b>
     * <b>Collator::DEFAULT_VALUE</b>
     * </p>
     * @link https://php.net/manual/en/class.collator.php#intl.collator-constants
     */
    public const STRENGTH = 5;

    /**
     * <p>
     * Compatibility with JIS x 4061 requires the introduction of an additional
     * level to distinguish Hiragana and Katakana characters. If compatibility
     * with that standard is required, then this attribute should be set
     * On,
     * and the strength set to Quaternary. This will affect sort key length
     * and string comparison string comparison performance.
     * </p>
     * <p>
     * Possible values are:
     * <b>Collator::OFF</b>(default)
     * <b>Collator::ON</b>
     * <b>Collator::DEFAULT_VALUE</b>
     * </p>
     * @link https://php.net/manual/en/class.collator.php#intl.collator-constants
     */
    public const HIRAGANA_QUATERNARY_MODE = 6;

    /**
     * <p>
     * When turned on, this attribute generates a collation key for the numeric
     * value of substrings of digits. This is a way to get '100' to sort AFTER
     * '2'.
     * </p>
     * <p>
     * Possible values are:
     * <b>Collator::OFF</b>(default)
     * <b>Collator::ON</b>
     * <b>Collator::DEFAULT_VALUE</b>
     * </p>
     * @link https://php.net/manual/en/class.collator.php#intl.collator-constants
     */
    public const NUMERIC_COLLATION = 7;
    public const SORT_REGULAR = 0;
    public const SORT_STRING = 1;
    public const SORT_NUMERIC = 2;

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Create a collator
     * @link https://php.net/manual/en/collator.construct.php
     * @param string $locale
     */
    #[Pure]
    public function __construct(#[TypeAware(['8.0' => 'string'], default: '')] $locale) {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Create a collator
     * @link https://php.net/manual/en/collator.create.php
     * @param string $locale <p>
     * The locale containing the required collation rules. Special values for
     * locales can be passed in - if null is passed for the locale, the
     * default locale collation rules will be used. If empty string ("") or
     * "root" are passed, UCA rules will be used.
     * </p>
     * @return Collator|null Return new instance of <b>Collator</b> object, or <b>NULL</b>
     * on error.
     */
    #[TentativeType]
    public static function create(#[TypeAware(['8.0' => 'string'], default: '')] $locale): ?Collator {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Compare two Unicode strings
     * @link https://php.net/manual/en/collator.compare.php
     * @param string $string1 <p>
     * The first string to compare.
     * </p>
     * @param string $string2 <p>
     * The second string to compare.
     * </p>
     * @return int|false Return comparison result:</p>
     * <p>
     * <p>
     * 1 if <i>str1</i> is greater than
     * <i>str2</i> ;
     * </p>
     * <p>
     * 0 if <i>str1</i> is equal to
     * <i>str2</i>;
     * </p>
     * <p>
     * -1 if <i>str1</i> is less than
     * <i>str2</i> .
     * </p>
     * On error
     * boolean
     * <b>FALSE</b>
     * is returned.
     */
    #[Pure]
    #[TentativeType]
    public function compare(
        #[TypeAware(['8.0' => 'string'], default: '')] $string1,
        #[TypeAware(['8.0' => 'string'], default: '')] $string2
    ): int|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Sort array using specified collator
     * @link https://php.net/manual/en/collator.sort.php
     * @param string[] &$array <p>
     * Array of strings to sort.
     * </p>
     * @param int $flags [optional] <p>
     * Optional sorting type, one of the following:
     * </p>
     * <p>
     * <b>Collator::SORT_REGULAR</b>
     * - compare items normally (don't change types)
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function sort(
        array &$array,
        #[TypeAware(['8.0' => 'int'], default: '')] #[EV([Collator::SORT_REGULAR])] $flags = null
    ): bool {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Sort array using specified collator and sort keys
     * @link https://php.net/manual/en/collator.sortwithsortkeys.php
     * @param string[] &$array <p>Array of strings to sort</p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function sortWithSortKeys(
        array &$array,
        #[ElementAvailable(from: '5.3', to: '5.6')] $flags = []
    ): bool {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Sort array maintaining index association
     * @link https://php.net/manual/en/collator.asort.php
     * @param string[] &$array <p>Array of strings to sort.</p>
     * @param int $flags [optional] <p>
     * Optional sorting type, one of the following:
     * <b>Collator::SORT_REGULAR</b>
     * - compare items normally (don't change types)
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function asort(
        array &$array,
        #[TypeAware(['8.0' => 'int'], default: '')] #[EV([Collator::SORT_REGULAR])] $flags = null
    ): bool {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Get collation attribute value
     * @link https://php.net/manual/en/collator.getattribute.php
     * @param int $attribute <p>
     * Attribute to get value for.
     * </p>
     * @return int|false Attribute value, or boolean <b>FALSE</b> on error.
     */
    #[Pure]
    #[TentativeType]
    public function getAttribute(#[TypeAware(['8.0' => 'int'], default: '')] $attribute): int|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Set collation attribute
     * @link https://php.net/manual/en/collator.setattribute.php
     * @param int $attribute <p>Attribute.</p>
     * @param int $value <p>
     * Attribute value.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function setAttribute(
        #[TypeAware(['8.0' => 'int'], default: '')] $attribute,
        #[TypeAware(['8.0' => 'int'], default: '')] $value
    ): bool {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Get current collation strength
     * @link https://php.net/manual/en/collator.getstrength.php
     * @return int current collation strength, or boolean <b>FALSE</b> on error.
     */
    #[Pure]
    #[TentativeType]
    public function getStrength(): int {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Set collation strength
     * @link https://php.net/manual/en/collator.setstrength.php
     * @param int $strength <p>Strength to set.</p>
     * <p>
     * Possible values are:
     * <b>Collator::PRIMARY</b>
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function setStrength(#[TypeAware(['8.0' => 'int'], default: '')] #[EV([Collator::PRIMARY])] $strength) {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Get collator's last error code
     * @link https://php.net/manual/en/collator.geterrorcode.php
     * @return int|false Error code returned by the last Collator API function call.
     */
    #[Pure]
    #[TentativeType]
    public function getErrorCode(): int|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Get the locale name of the collator
     * @link https://php.net/manual/en/collator.getlocale.php
     * @param int $type <p>
     * You can choose between valid and actual locale (
     * <b>Locale::VALID_LOCALE</b> and
     * <b>Locale::ACTUAL_LOCALE</b>,
     * respectively).
     * </p>
     * @return string|false Real locale name from which the collation data comes. If the collator was
     * instantiated from rules or an error occurred, returns
     * boolean <b>FALSE</b>.
     */
    #[Pure]
    #[TentativeType]
    public function getLocale(
        #[TypeAware(['8.0' => 'int'], default: '')]
        #[EV([Locale::VALID_LOCALE, Locale::ACTUAL_LOCALE])]
        $type
    ): string|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Get text for collator's last error code
     * @link https://php.net/manual/en/collator.geterrormessage.php
     * @return string|false Description of an error occurred in the last Collator API function call.
     */
    #[Pure]
    #[TentativeType]
    public function getErrorMessage(): string|false {}

    /**
     * (PHP 5 &gt;= 5.3.2, PECL intl &gt;= 1.0.3)<br/>
     * Get sorting key for a string
     * @link https://php.net/manual/en/collator.getsortkey.php
     * @param string $string <p>
     * The string to produce the key from.
     * </p>
     * @return string|false the collation key for the string. Collation keys can be compared directly instead of strings.
     */
    #[Pure]
    #[TentativeType]
    public function getSortKey(
        #[TypeAware(['8.0' => 'string'], default: '')] $string,
        #[ElementAvailable(from: '5.3', to: '5.6')] $arg2
    ): string|false {}
}

class NumberFormatter
{
    public const CURRENCY_ACCOUNTING = 12;

    /**
     * Decimal format defined by pattern
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const PATTERN_DECIMAL = 0;

    /**
     * Decimal format
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const DECIMAL = 1;

    /**
     * Currency format
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const CURRENCY = 2;

    /**
     * Percent format
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const PERCENT = 3;

    /**
     * Scientific format
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const SCIENTIFIC = 4;

    /**
     * Spellout rule-based format
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const SPELLOUT = 5;

    /**
     * Ordinal rule-based format
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const ORDINAL = 6;

    /**
     * Duration rule-based format
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const DURATION = 7;

    /**
     * Rule-based format defined by pattern
     * @link https://php.net/manual/en/class.locale.php#intl.locale-constants
     */
    public const PATTERN_RULEBASED = 9;

    /**
     * Alias for PATTERN_DECIMAL
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const IGNORE = 0;

    /**
     * Default format for the locale
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const DEFAULT_STYLE = 1;

    /**
     * Rounding mode to round towards positive infinity.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const ROUND_CEILING = 0;

    /**
     * Rounding mode to round towards negative infinity.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const ROUND_FLOOR = 1;

    /**
     * Rounding mode to round towards zero.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const ROUND_DOWN = 2;

    /**
     * Rounding mode to round away from zero.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const ROUND_UP = 3;

    /**
     * Rounding mode to round towards the "nearest neighbor" unless both
     * neighbors are equidistant, in which case, round towards the even
     * neighbor.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const ROUND_HALFEVEN = 4;

    /**
     * Rounding mode to round towards "nearest neighbor" unless both neighbors
     * are equidistant, in which case round down.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const ROUND_HALFDOWN = 5;

    /**
     * Rounding mode to round towards "nearest neighbor" unless both neighbors
     * are equidistant, in which case round up.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const ROUND_HALFUP = 6;

    /**
     * Pad characters inserted before the prefix.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const PAD_BEFORE_PREFIX = 0;

    /**
     * Pad characters inserted after the prefix.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const PAD_AFTER_PREFIX = 1;

    /**
     * Pad characters inserted before the suffix.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const PAD_BEFORE_SUFFIX = 2;

    /**
     * Pad characters inserted after the suffix.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const PAD_AFTER_SUFFIX = 3;

    /**
     * Parse integers only.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const PARSE_INT_ONLY = 0;

    /**
     * Use grouping separator.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const GROUPING_USED = 1;

    /**
     * Always show decimal point.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const DECIMAL_ALWAYS_SHOWN = 2;

    /**
     * Maximum integer digits.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const MAX_INTEGER_DIGITS = 3;

    /**
     * Minimum integer digits.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const MIN_INTEGER_DIGITS = 4;

    /**
     * Integer digits.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const INTEGER_DIGITS = 5;

    /**
     * Maximum fraction digits.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const MAX_FRACTION_DIGITS = 6;

    /**
     * Minimum fraction digits.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const MIN_FRACTION_DIGITS = 7;

    /**
     * Fraction digits.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const FRACTION_DIGITS = 8;

    /**
     * Multiplier.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const MULTIPLIER = 9;

    /**
     * Grouping size.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const GROUPING_SIZE = 10;

    /**
     * Rounding Mode.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const ROUNDING_MODE = 11;

    /**
     * Rounding increment.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const ROUNDING_INCREMENT = 12;

    /**
     * The width to which the output of format() is padded.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const FORMAT_WIDTH = 13;

    /**
     * The position at which padding will take place. See pad position
     * constants for possible argument values.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const PADDING_POSITION = 14;

    /**
     * Secondary grouping size.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const SECONDARY_GROUPING_SIZE = 15;

    /**
     * Use significant digits.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const SIGNIFICANT_DIGITS_USED = 16;

    /**
     * Minimum significant digits.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const MIN_SIGNIFICANT_DIGITS = 17;

    /**
     * Maximum significant digits.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const MAX_SIGNIFICANT_DIGITS = 18;

    /**
     * Lenient parse mode used by rule-based formats.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const LENIENT_PARSE = 19;

    /**
     * Positive prefix.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const POSITIVE_PREFIX = 0;

    /**
     * Positive suffix.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const POSITIVE_SUFFIX = 1;

    /**
     * Negative prefix.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const NEGATIVE_PREFIX = 2;

    /**
     * Negative suffix.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const NEGATIVE_SUFFIX = 3;

    /**
     * The character used to pad to the format width.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const PADDING_CHARACTER = 4;

    /**
     * The ISO currency code.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const CURRENCY_CODE = 5;

    /**
     * The default rule set. This is only available with rule-based
     * formatters.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const DEFAULT_RULESET = 6;

    /**
     * The public rule sets. This is only available with rule-based
     * formatters. This is a read-only attribute. The public rulesets are
     * returned as a single string, with each ruleset name delimited by ';'
     * (semicolon).
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const PUBLIC_RULESETS = 7;

    /**
     * The decimal separator.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const DECIMAL_SEPARATOR_SYMBOL = 0;

    /**
     * The grouping separator.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const GROUPING_SEPARATOR_SYMBOL = 1;

    /**
     * The pattern separator.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const PATTERN_SEPARATOR_SYMBOL = 2;

    /**
     * The percent sign.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const PERCENT_SYMBOL = 3;

    /**
     * Zero.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const ZERO_DIGIT_SYMBOL = 4;

    /**
     * Character representing a digit in the pattern.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const DIGIT_SYMBOL = 5;

    /**
     * The minus sign.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const MINUS_SIGN_SYMBOL = 6;

    /**
     * The plus sign.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const PLUS_SIGN_SYMBOL = 7;

    /**
     * The currency symbol.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const CURRENCY_SYMBOL = 8;

    /**
     * The international currency symbol.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const INTL_CURRENCY_SYMBOL = 9;

    /**
     * The monetary separator.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const MONETARY_SEPARATOR_SYMBOL = 10;

    /**
     * The exponential symbol.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const EXPONENTIAL_SYMBOL = 11;

    /**
     * Per mill symbol.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const PERMILL_SYMBOL = 12;

    /**
     * Escape padding character.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const PAD_ESCAPE_SYMBOL = 13;

    /**
     * Infinity symbol.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const INFINITY_SYMBOL = 14;

    /**
     * Not-a-number symbol.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const NAN_SYMBOL = 15;

    /**
     * Significant digit symbol.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const SIGNIFICANT_DIGIT_SYMBOL = 16;

    /**
     * The monetary grouping separator.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const MONETARY_GROUPING_SEPARATOR_SYMBOL = 17;

    /**
     * Derive the type from variable type
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const TYPE_DEFAULT = 0;

    /**
     * Format/parse as 32-bit integer
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const TYPE_INT32 = 1;

    /**
     * Format/parse as 64-bit integer
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const TYPE_INT64 = 2;

    /**
     * Format/parse as floating point value
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const TYPE_DOUBLE = 3;

    /**
     * Format/parse as currency value
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const TYPE_CURRENCY = 4;

    /**
     * @link https://www.php.net/manual/en/class.numberformatter.php
     * @param string $locale
     * @param int $style
     * @param string $pattern [optional]
     */
    #[Pure]
    public function __construct(
        #[TypeAware(['8.0' => 'string'], default: '')] $locale,
        #[TypeAware(['8.0' => 'int'], default: '')] $style,
        #[TypeAware(['8.0' => 'string|null'], default: '')] $pattern = null
    ) {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Create a number formatter
     * @link https://php.net/manual/en/numberformatter.create.php
     * @param string $locale <p>
     * Locale in which the number would be formatted (locale name, e.g. en_CA).
     * </p>
     * @param int $style <p>
     * Style of the formatting, one of the
     * format style constants. If
     * <b>NumberFormatter::PATTERN_DECIMAL</b>
     * or <b>NumberFormatter::PATTERN_RULEBASED</b>
     * is passed then the number format is opened using the given pattern,
     * which must conform to the syntax described in
     * ICU DecimalFormat
     * documentation or
     * ICU RuleBasedNumberFormat
     * documentation, respectively.
     * </p>
     * @param string $pattern [optional] <p>
     * Pattern string if the chosen style requires a pattern.
     * </p>
     * @return NumberFormatter|false <b>NumberFormatter</b> object or <b>FALSE</b> on error.
     */
    #[TentativeType]
    public static function create(
        #[TypeAware(['8.0' => 'string'], default: '')] $locale,
        #[TypeAware(['8.0' => 'int'], default: '')] #[EV([NumberFormatter::PATTERN_DECIMAL, NumberFormatter::PATTERN_RULEBASED])] $style,
        #[TypeAware(['8.0' => 'string|null'], default: '')] $pattern = null
    ): ?NumberFormatter {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Format a number
     * @link https://php.net/manual/en/numberformatter.format.php
     * @param int|float $num <p>
     * The value to format. Can be integer or float,
     * other values will be converted to a numeric value.
     * </p>
     * @param int $type [optional] <p>
     * The
     * formatting type to use.
     * </p>
     * @return string|false the string containing formatted value, or <b>FALSE</b> on error.
     */
    #[Pure]
    #[TentativeType]
    public function format(
        #[TypeAware(['8.0' => 'int|float'], default: '')] $num,
        #[TypeAware(['8.0' => 'int'], default: '')] $type = null
    ): string|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Parse a number
     * @link https://php.net/manual/en/numberformatter.parse.php
     * @param string $string
     * @param int $type [optional] <p>
     * The
     * formatting type to use. By default,
     * <b>NumberFormatter::TYPE_DOUBLE</b> is used.
     * </p>
     * @param int &$offset [optional] <p>
     * Offset in the string at which to begin parsing. On return, this value
     * will hold the offset at which parsing ended.
     * </p>
     * @return mixed The value of the parsed number or <b>FALSE</b> on error.
     */
    #[TentativeType]
    public function parse(
        #[TypeAware(['8.0' => 'string'], default: '')] $string,
        #[TypeAware(['8.0' => 'int'], default: '')] $type = NumberFormatter::TYPE_DOUBLE,
        &$offset = null
    ): int|float|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Format a currency value
     * @link https://php.net/manual/en/numberformatter.formatcurrency.php
     * @param float $amount <p>
     * The numeric currency value.
     * </p>
     * @param string $currency <p>
     * The 3-letter ISO 4217 currency code indicating the currency to use.
     * </p>
     * @return string|false String representing the formatted currency value.
     */
    #[Pure]
    #[TentativeType]
    public function formatCurrency(
        #[TypeAware(['8.0' => 'float'], default: '')] $amount,
        #[TypeAware(['8.0' => 'string'], default: '')] $currency
    ): string|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Parse a currency number
     * @link https://php.net/manual/en/numberformatter.parsecurrency.php
     * @param string $string
     * @param string &$currency <p>
     * Parameter to receive the currency name (3-letter ISO 4217 currency
     * code).
     * </p>
     * @param int &$offset [optional] <p>
     * Offset in the string at which to begin parsing. On return, this value
     * will hold the offset at which parsing ended.
     * </p>
     * @return float|false The parsed numeric value or <b>FALSE</b> on error.
     */
    #[TentativeType]
    public function parseCurrency(#[TypeAware(['8.0' => 'string'], default: '')] $string, &$currency, &$offset = null): float|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Set an attribute
     * @link https://php.net/manual/en/numberformatter.setattribute.php
     * @param int $attribute <p>
     * Attribute specifier - one of the
     * numeric attribute constants.
     * </p>
     * @param int $value <p>
     * The attribute value.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function setAttribute(
        #[TypeAware(['8.0' => 'int'], default: '')] $attribute,
        #[TypeAware(['8.0' => 'int|float'], default: '')] $value
    ): bool {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Get an attribute
     * @link https://php.net/manual/en/numberformatter.getattribute.php
     * @param int $attribute <p>
     * Attribute specifier - one of the
     * numeric attribute constants.
     * </p>
     * @return int|float|false Return attribute value on success, or <b>FALSE</b> on error.
     */
    #[Pure]
    #[TentativeType]
    public function getAttribute(#[TypeAware(['8.0' => 'int'], default: '')] $attribute): int|float|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Set a text attribute
     * @link https://php.net/manual/en/numberformatter.settextattribute.php
     * @param int $attribute <p>
     * Attribute specifier - one of the
     * text attribute
     * constants.
     * </p>
     * @param string $value <p>
     * Text for the attribute value.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function setTextAttribute(
        #[TypeAware(['8.0' => 'int'], default: '')] $attribute,
        #[TypeAware(['8.0' => 'string'], default: '')] $value
    ): bool {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Get a text attribute
     * @link https://php.net/manual/en/numberformatter.gettextattribute.php
     * @param int $attribute <p>
     * Attribute specifier - one of the
     * text attribute constants.
     * </p>
     * @return string|false Return attribute value on success, or <b>FALSE</b> on error.
     */
    #[Pure]
    #[TentativeType]
    public function getTextAttribute(#[TypeAware(['8.0' => 'int'], default: '')] $attribute): string|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Set a symbol value
     * @link https://php.net/manual/en/numberformatter.setsymbol.php
     * @param int $symbol <p>
     * Symbol specifier, one of the
     * format symbol constants.
     * </p>
     * @param string $value <p>
     * Text for the symbol.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function setSymbol(
        #[TypeAware(['8.0' => 'int'], default: '')] $symbol,
        #[TypeAware(['8.0' => 'string'], default: '')] $value
    ): bool {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Get a symbol value
     * @link https://php.net/manual/en/numberformatter.getsymbol.php
     * @param int $symbol <p>
     * Symbol specifier, one of the
     * format symbol constants.
     * </p>
     * @return string|false The symbol string or <b>FALSE</b> on error.
     */
    #[Pure]
    #[TentativeType]
    public function getSymbol(#[TypeAware(['8.0' => 'int'], default: '')] $symbol): string|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Set formatter pattern
     * @link https://php.net/manual/en/numberformatter.setpattern.php
     * @param string $pattern <p>
     * Pattern in syntax described in
     * ICU DecimalFormat
     * documentation.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function setPattern(#[TypeAware(['8.0' => 'string'], default: '')] $pattern): bool {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Get formatter pattern
     * @link https://php.net/manual/en/numberformatter.getpattern.php
     * @return string|false Pattern string that is used by the formatter, or <b>FALSE</b> if an error happens.
     */
    #[Pure]
    #[TentativeType]
    public function getPattern(): string|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Get formatter locale
     * @link https://php.net/manual/en/numberformatter.getlocale.php
     * @param int $type [optional] <p>
     * You can choose between valid and actual locale (
     * <b>Locale::VALID_LOCALE</b>,
     * <b>Locale::ACTUAL_LOCALE</b>,
     * respectively). The default is the actual locale.
     * </p>
     * @return string The locale name used to create the formatter.
     */
    #[Pure]
    #[TentativeType]
    public function getLocale(
        #[TypeAware(['8.0' => 'int'], default: '')] #[EV([Locale::VALID_LOCALE, Locale::ACTUAL_LOCALE])] $type = null
    ): string|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Get formatter's last error code.
     * @link https://php.net/manual/en/numberformatter.geterrorcode.php
     * @return int error code from last formatter call.
     */
    #[Pure]
    #[TentativeType]
    public function getErrorCode(): int {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Get formatter's last error message.
     * @link https://php.net/manual/en/numberformatter.geterrormessage.php
     * @return string error message from last formatter call.
     */
    #[Pure]
    #[TentativeType]
    public function getErrorMessage(): string {}
}

class Normalizer
{
    public const NFKC_CF = 48;
    public const FORM_KC_CF = 48;

    /**
     * Default normalization options
     * @link https://secure.php.net/manual/en/class.normalizer.php
     */
    public const OPTION_DEFAULT = "";

    /**
     * No decomposition/composition
     * @link https://secure.php.net/manual/en/class.normalizer.php
     * @removed 8.0
     */
    public const NONE = "1";

    /**
     * Normalization Form D (NFD) - Canonical Decomposition
     * @link https://secure.php.net/manual/en/class.normalizer.php
     */
    public const FORM_D = 4;
    public const NFD = 4;

    /**
     * Normalization Form KD (NFKD) - Compatibility Decomposition
     * @link https://secure.php.net/manual/en/class.normalizer.php
     */
    public const FORM_KD = 8;
    public const NFKD = 8;

    /**
     * Normalization Form C (NFC) - Canonical Decomposition followed by
     * Canonical Composition
     * @link https://secure.php.net/manual/en/class.normalizer.php
     */
    public const FORM_C = 16;
    public const NFC = 16;

    /**
     * Normalization Form KC (NFKC) - Compatibility Decomposition, followed by
     * Canonical Composition
     * @link https://secure.php.net/manual/en/class.normalizer.php
     */
    public const FORM_KC = 32;
    public const NFKC = 32;

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Normalizes the input provided and returns the normalized string
     * @link https://php.net/manual/en/normalizer.normalize.php
     * @param string $string <p>The input string to normalize</p>
     * @param int $form <p>One of the normalization forms.</p>
     * @return string|false The normalized string or <b>FALSE</b> if an error occurred.
     */
    #[TentativeType]
    public static function normalize(
        #[TypeAware(['8.0' => 'string'], default: '')] $string,
        #[ElementAvailable(from: '5.3', to: '5.6')] $form,
        #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'int'], default: '')] $form = Normalizer::FORM_C,
        #[ElementAvailable(from: '5.3', to: '5.6')] $arg3
    ): string|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Checks if the provided string is already in the specified normalization form.
     * @link https://php.net/manual/en/normalizer.isnormalized.php
     * @param string $string <p>The input string to normalize</p>
     * @param int $form <p>
     * One of the normalization forms.
     * </p>
     * @return bool <b>TRUE</b> if normalized, <b>FALSE</b> otherwise or if there an error
     */
    #[TentativeType]
    public static function isNormalized(
        #[TypeAware(['8.0' => 'string'], default: '')] $string,
        #[ElementAvailable(from: '5.3', to: '5.6')] $form,
        #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'int'], default: '')] $form = Normalizer::FORM_C,
        #[ElementAvailable(from: '5.3', to: '5.6')] $arg3
    ): bool {}

    /**
     * @param string $string <p>The input string to normalize</p>
     * @param string $form
     * @return string|null <p>Returns a string containing the Decomposition_Mapping property, if present in the UCD.
     * Returns null if there is no Decomposition_Mapping property for the character.</p>
     * @link https://www.php.net/manual/en/normalizer.getrawdecomposition.php
     * @since 7.3
     */
    #[TentativeType]
    public static function getRawDecomposition(
        string $string,
        #[ElementAvailable(from: '8.0')] int $form = 16
    ): ?string {}
}

class Locale
{
    /**
     * This is locale the data actually comes from.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const ACTUAL_LOCALE = 0;

    /**
     * This is the most specific locale supported by ICU.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const VALID_LOCALE = 1;

    /**
     * Used as locale parameter with the methods of the various locale affected classes,
     * such as NumberFormatter. This constant would make the methods to use default
     * locale.
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const DEFAULT_LOCALE = null;

    /**
     * Language subtag
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const LANG_TAG = "language";

    /**
     * Extended language subtag
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const EXTLANG_TAG = "extlang";

    /**
     * Script subtag
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const SCRIPT_TAG = "script";

    /**
     * Region subtag
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const REGION_TAG = "region";

    /**
     * Variant subtag
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const VARIANT_TAG = "variant";

    /**
     * Grandfathered Language subtag
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const GRANDFATHERED_LANG_TAG = "grandfathered";

    /**
     * Private subtag
     * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
     */
    public const PRIVATE_TAG = "private";

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Gets the default locale value from the INTL global 'default_locale'
     * @link https://php.net/manual/en/locale.getdefault.php
     * @return string The current runtime locale
     */
    #[TentativeType]
    public static function getDefault(): string {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * sets the default runtime locale
     * @link https://php.net/manual/en/locale.setdefault.php
     * @param string $locale <p>
     * Is a BCP 47 compliant language tag containing the
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public static function setDefault(#[TypeAware(['8.0' => 'string'], default: '')] $locale) {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Gets the primary language for the input locale
     * @link https://php.net/manual/en/locale.getprimarylanguage.php
     * @param string $locale <p>
     * The locale to extract the primary language code from
     * </p>
     * @return string|null The language code associated with the language or <b>NULL</b> in case of error.
     */
    #[TentativeType]
    public static function getPrimaryLanguage(#[TypeAware(['8.0' => 'string'], default: '')] $locale): ?string {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Gets the script for the input locale
     * @link https://php.net/manual/en/locale.getscript.php
     * @param string $locale <p>
     * The locale to extract the script code from
     * </p>
     * @return string|null The script subtag for the locale or <b>NULL</b> if not present
     */
    #[TentativeType]
    public static function getScript(#[TypeAware(['8.0' => 'string'], default: '')] $locale): ?string {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Gets the region for the input locale
     * @link https://php.net/manual/en/locale.getregion.php
     * @param string $locale <p>
     * The locale to extract the region code from
     * </p>
     * @return string|null The region subtag for the locale or <b>NULL</b> if not present
     */
    #[TentativeType]
    public static function getRegion(#[TypeAware(['8.0' => 'string'], default: '')] $locale): ?string {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Gets the keywords for the input locale
     * @link https://php.net/manual/en/locale.getkeywords.php
     * @param string $locale <p>
     * The locale to extract the keywords from
     * </p>
     * @return array|false|null Associative array containing the keyword-value pairs for this locale
     */
    #[TentativeType]
    public static function getKeywords(#[TypeAware(['8.0' => 'string'], default: '')] $locale): array|false|null {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Returns an appropriately localized display name for script of the input locale
     * @link https://php.net/manual/en/locale.getdisplayscript.php
     * @param string $locale <p>
     * The locale to return a display script for
     * </p>
     * @param string $displayLocale <p>
     * Optional format locale to use to display the script name
     * </p>
     * @return string Display name of the script for the $locale in the format appropriate for
     * $in_locale.
     */
    #[TentativeType]
    public static function getDisplayScript(
        #[TypeAware(['8.0' => 'string'], default: '')] $locale,
        #[ElementAvailable(from: '5.3', to: '5.6')] $displayLocale,
        #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null
    ): string|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Returns an appropriately localized display name for region of the input locale
     * @link https://php.net/manual/en/locale.getdisplayregion.php
     * @param string $locale <p>
     * The locale to return a display region for.
     * </p>
     * @param string $displayLocale <p>
     * Optional format locale to use to display the region name
     * </p>
     * @return string display name of the region for the $locale in the format appropriate for
     * $in_locale.
     */
    #[TentativeType]
    public static function getDisplayRegion(
        #[TypeAware(['8.0' => 'string'], default: '')] $locale,
        #[ElementAvailable(from: '5.3', to: '5.6')] $displayLocale,
        #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null
    ): string|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Returns an appropriately localized display name for the input locale
     * @link https://php.net/manual/en/locale.getdisplayname.php
     * @param string $locale <p>
     * The locale to return a display name for.
     * </p>
     * @param string $displayLocale <p>optional format locale</p>
     * @return string|false Display name of the locale in the format appropriate for $in_locale.
     */
    #[TentativeType]
    public static function getDisplayName(
        #[TypeAware(['8.0' => 'string'], default: '')] $locale,
        #[ElementAvailable(from: '5.3', to: '5.6')] $displayLocale,
        #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null
    ): string|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Returns an appropriately localized display name for language of the inputlocale
     * @link https://php.net/manual/en/locale.getdisplaylanguage.php
     * @param string $locale <p>
     * The locale to return a display language for
     * </p>
     * @param string $displayLocale <p>
     * Optional format locale to use to display the language name
     * </p>
     * @return string|false display name of the language for the $locale in the format appropriate for
     * $in_locale.
     */
    #[TentativeType]
    public static function getDisplayLanguage(
        #[TypeAware(['8.0' => 'string'], default: '')] $locale,
        #[ElementAvailable(from: '5.3', to: '5.6')] $displayLocale,
        #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null
    ): string|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Returns an appropriately localized display name for variants of the input locale
     * @link https://php.net/manual/en/locale.getdisplayvariant.php
     * @param string $locale <p>
     * The locale to return a display variant for
     * </p>
     * @param string $displayLocale <p>
     * Optional format locale to use to display the variant name
     * </p>
     * @return string|false Display name of the variant for the $locale in the format appropriate for
     * $in_locale.
     */
    #[TentativeType]
    public static function getDisplayVariant(
        #[TypeAware(['8.0' => 'string'], default: '')] $locale,
        #[ElementAvailable(from: '5.3', to: '5.6')] $displayLocale,
        #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null
    ): string|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Returns a correctly ordered and delimited locale ID
     * @link https://php.net/manual/en/locale.composelocale.php
     * @param array $subtags <p>
     * an array containing a list of key-value pairs, where the keys identify
     * the particular locale ID subtags, and the values are the associated
     * subtag values.
     * <p>
     * The 'variant' and 'private' subtags can take maximum 15 values
     * whereas 'extlang' can take maximum 3 values.e.g. Variants are allowed
     * with the suffix ranging from 0-14. Hence the keys for the input array
     * can be variant0, variant1, ...,variant14. In the returned locale id,
     * the subtag is ordered by suffix resulting in variant0 followed by
     * variant1 followed by variant2 and so on.
     * </p>
     * <p>
     * The 'variant', 'private' and 'extlang' multiple values can be specified both
     * as array under specific key (e.g. 'variant') and as multiple numbered keys
     * (e.g. 'variant0', 'variant1', etc.).
     * </p>
     * </p>
     * @return string The corresponding locale identifier.
     */
    #[TentativeType]
    public static function composeLocale(array $subtags): string|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Returns a key-value array of locale ID subtag elements.
     * @link https://php.net/manual/en/locale.parselocale.php
     * @param string $locale <p>
     * The locale to extract the subtag array from. Note: The 'variant' and
     * 'private' subtags can take maximum 15 values whereas 'extlang' can take
     * maximum 3 values.
     * </p>
     * @return array an array containing a list of key-value pairs, where the keys
     * identify the particular locale ID subtags, and the values are the
     * associated subtag values. The array will be ordered as the locale id
     * subtags e.g. in the locale id if variants are '-varX-varY-varZ' then the
     * returned array will have variant0=&gt;varX , variant1=&gt;varY ,
     * variant2=&gt;varZ
     */
    #[TentativeType]
    public static function parseLocale(#[TypeAware(['8.0' => 'string'], default: '')] $locale): ?array {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Gets the variants for the input locale
     * @link https://php.net/manual/en/locale.getallvariants.php
     * @param string $locale <p>
     * The locale to extract the variants from
     * </p>
     * @return array|null The array containing the list of all variants subtag for the locale
     * or <b>NULL</b> if not present
     */
    #[TentativeType]
    public static function getAllVariants(#[TypeAware(['8.0' => 'string'], default: '')] $locale): ?array {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Checks if a language tag filter matches with locale
     * @link https://php.net/manual/en/locale.filtermatches.php
     * @param string $languageTag <p>
     * The language tag to check
     * </p>
     * @param string $locale <p>
     * The language range to check against
     * </p>
     * @param bool $canonicalize <p>
     * If true, the arguments will be converted to canonical form before
     * matching.
     * </p>
     * @return bool <b>TRUE</b> if $locale matches $langtag <b>FALSE</b> otherwise.
     */
    #[TentativeType]
    public static function filterMatches(
        #[TypeAware(['8.0' => 'string'], default: '')] $languageTag,
        #[TypeAware(['8.0' => 'string'], default: '')] $locale,
        #[ElementAvailable(from: '5.3', to: '5.6')] $canonicalize,
        #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'bool'], default: '')] $canonicalize = false
    ): ?bool {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Searches the language tag list for the best match to the language
     * @link https://php.net/manual/en/locale.lookup.php
     * @param array $languageTag <p>
     * An array containing a list of language tags to compare to
     * <i>locale</i>. Maximum 100 items allowed.
     * </p>
     * @param string $locale <p>
     * The locale to use as the language range when matching.
     * </p>
     * @param bool $canonicalize <p>
     * If true, the arguments will be converted to canonical form before
     * matching.
     * </p>
     * @param string $defaultLocale <p>
     * The locale to use if no match is found.
     * </p>
     * @return string The closest matching language tag or default value.
     */
    #[TentativeType]
    public static function lookup(
        array $languageTag,
        #[TypeAware(['8.0' => 'string'], default: '')] $locale,
        #[ElementAvailable(from: '5.3', to: '5.6')] $canonicalize,
        #[ElementAvailable(from: '5.3', to: '5.6')] $defaultLocale,
        #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'bool'], default: '')] $canonicalize = false,
        #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'string|null'], default: '')] $defaultLocale = null
    ): ?string {}

    /**
     * @link https://php.net/manual/en/locale.canonicalize.php
     * @param string $locale
     * @return string
     */
    #[TentativeType]
    public static function canonicalize(#[TypeAware(['8.0' => 'string'], default: '')] $locale): ?string {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Tries to find out best available locale based on HTTP "Accept-Language" header
     * @link https://php.net/manual/en/locale.acceptfromhttp.php
     * @param string $header <p>
     * The string containing the "Accept-Language" header according to format in RFC 2616.
     * </p>
     * @return string The corresponding locale identifier.
     */
    #[TentativeType]
    public static function acceptFromHttp(#[TypeAware(['8.0' => 'string'], default: '')] $header): string|false {}
}

class MessageFormatter
{
    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Constructs a new Message Formatter
     * @link https://php.net/manual/en/messageformatter.create.php
     * @param string $locale <p>
     * The locale to use when formatting arguments
     * </p>
     * @param string $pattern <p>
     * The pattern string to stick arguments into.
     * The pattern uses an 'apostrophe-friendly' syntax; it is run through
     * umsg_autoQuoteApostrophe
     * before being interpreted.
     * </p>
     * @throws IntlException on failure.
     */
    #[Pure]
    public function __construct(
        #[TypeAware(['8.0' => 'string'], default: '')] $locale,
        #[TypeAware(['8.0' => 'string'], default: '')] $pattern
    ) {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Constructs a new Message Formatter
     * @link https://php.net/manual/en/messageformatter.create.php
     * @param string $locale <p>
     * The locale to use when formatting arguments
     * </p>
     * @param string $pattern <p>
     * The pattern string to stick arguments into.
     * The pattern uses an 'apostrophe-friendly' syntax; it is run through
     * umsg_autoQuoteApostrophe
     * before being interpreted.
     * </p>
     * @return MessageFormatter|null The formatter object
     */
    #[TentativeType]
    public static function create(
        #[TypeAware(['8.0' => 'string'], default: '')] $locale,
        #[TypeAware(['8.0' => 'string'], default: '')] $pattern
    ): ?MessageFormatter {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Format the message
     * @link https://php.net/manual/en/messageformatter.format.php
     * @param array $values <p>
     * Arguments to insert into the format string
     * </p>
     * @return string|false The formatted string, or <b>FALSE</b> if an error occurred
     */
    #[Pure]
    #[TentativeType]
    public function format(array $values): string|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Quick format message
     * @link https://php.net/manual/en/messageformatter.formatmessage.php
     * @param string $locale <p>
     * The locale to use for formatting locale-dependent parts
     * </p>
     * @param string $pattern <p>
     * The pattern string to insert things into.
     * The pattern uses an 'apostrophe-friendly' syntax; it is run through
     * umsg_autoQuoteApostrophe
     * before being interpreted.
     * </p>
     * @param array $values <p>
     * The array of values to insert into the format string
     * </p>
     * @return string|false The formatted pattern string or <b>FALSE</b> if an error occurred
     */
    #[TentativeType]
    public static function formatMessage(
        #[TypeAware(['8.0' => 'string'], default: '')] $locale,
        #[TypeAware(['8.0' => 'string'], default: '')] $pattern,
        array $values
    ): string|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Parse input string according to pattern
     * @link https://php.net/manual/en/messageformatter.parse.php
     * @param string $string <p>
     * The string to parse
     * </p>
     * @return array|false An array containing the items extracted, or <b>FALSE</b> on error
     */
    #[Pure]
    #[TentativeType]
    public function parse(#[TypeAware(['8.0' => 'string'], default: '')] $string): array|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Quick parse input string
     * @link https://php.net/manual/en/messageformatter.parsemessage.php
     * @param string $locale <p>
     * The locale to use for parsing locale-dependent parts
     * </p>
     * @param string $pattern <p>
     * The pattern with which to parse the <i>value</i>.
     * </p>
     * @param string $message <p>
     * The string to parse, conforming to the <i>pattern</i>.
     * </p>
     * @return array|false An array containing items extracted, or <b>FALSE</b> on error
     */
    #[TentativeType]
    public static function parseMessage(
        #[TypeAware(['8.0' => 'string'], default: '')] $locale,
        #[TypeAware(['8.0' => 'string'], default: '')] $pattern,
        #[TypeAware(['8.0' => 'string'], default: '')] $message
    ): array|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Set the pattern used by the formatter
     * @link https://php.net/manual/en/messageformatter.setpattern.php
     * @param string $pattern <p>
     * The pattern string to use in this message formatter.
     * The pattern uses an 'apostrophe-friendly' syntax; it is run through
     * umsg_autoQuoteApostrophe
     * before being interpreted.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function setPattern(#[TypeAware(['8.0' => 'string'], default: '')] $pattern): bool {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Get the pattern used by the formatter
     * @link https://php.net/manual/en/messageformatter.getpattern.php
     * @return string The pattern string for this message formatter
     */
    #[Pure]
    #[TentativeType]
    public function getPattern(): string|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Get the locale for which the formatter was created.
     * @link https://php.net/manual/en/messageformatter.getlocale.php
     * @return string The locale name
     */
    #[Pure]
    #[TentativeType]
    public function getLocale(): string {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Get the error code from last operation
     * @link https://php.net/manual/en/messageformatter.geterrorcode.php
     * @return int The error code, one of UErrorCode values. Initial value is U_ZERO_ERROR.
     */
    #[Pure]
    #[TentativeType]
    public function getErrorCode(): int {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Get the error text from the last operation
     * @link https://php.net/manual/en/messageformatter.geterrormessage.php
     * @return string Description of the last error.
     */
    #[Pure]
    #[TentativeType]
    public function getErrorMessage(): string {}
}

class IntlDateFormatter
{
    /**
     * Completely specified style (Tuesday, April 12, 1952 AD or 3:30:42pm PST)
     * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants
     */
    public const FULL = 0;

    /**
     * Long style (January 12, 1952 or 3:30:32pm)
     * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants
     */
    public const LONG = 1;

    /**
     * Medium style (Jan 12, 1952)
     * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants
     */
    public const MEDIUM = 2;

    /**
     * Most abbreviated style, only essential data (12/13/52 or 3:30pm)
     * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants
     */
    public const SHORT = 3;

    /**
     * Do not include this element
     * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants
     */
    public const NONE = -1;

    /**
     * Gregorian Calendar
     * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants
     */
    public const GREGORIAN = 1;

    /**
     * Non-Gregorian Calendar
     * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants
     */
    public const TRADITIONAL = 0;
    public const RELATIVE_FULL = 128;
    public const RELATIVE_LONG = 129;
    public const RELATIVE_MEDIUM = 130;
    public const RELATIVE_SHORT = 131;

    /**
     * @param string|null $locale
     * @param int $dateType
     * @param int $timeType
     * @param mixed|null $timezone [optional]
     * @param mixed|null $calendar [optional]
     * @param string $pattern [optional]
     */
    #[Pure]
    public function __construct(
        #[TypeAware(['8.0' => 'string|null'], default: '')] $locale,
        #[ElementAvailable(from: '5.3', to: '8.0')] #[TypeAware(['8.0' => 'int'], default: '')] $dateType,
        #[ElementAvailable(from: '5.3', to: '8.0')] #[TypeAware(['8.0' => 'int'], default: '')] $timeType,
        #[ElementAvailable(from: '8.1')] int $dateType = 0,
        #[ElementAvailable(from: '8.1')] int $timeType = 0,
        $timezone = null,
        $calendar = null,
        #[TypeAware(['8.0' => 'string|null'], default: '')] $pattern = ''
    ) {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Create a date formatter
     * @link https://php.net/manual/en/intldateformatter.create.php
     * @param string $locale <p>
     * Locale to use when formatting or parsing; default is specified in the ini setting intl.default_locale.
     * </p>
     * @param int $dateType <p>
     * Date type to use (<b>none</b>,
     * <b>short</b>, <b>medium</b>,
     * <b>long</b>, <b>full</b>).
     * This is one of the
     * IntlDateFormatter constants.
     * </p>
     * @param int $timeType <p>
     * Time type to use (<b>none</b>,
     * <b>short</b>, <b>medium</b>,
     * <b>long</b>, <b>full</b>).
     * This is one of the
     * IntlDateFormatter constants.
     * </p>
     * @param string $timezone [optional] <p>
     * Time zone ID, default is system default.
     * </p>
     * @param int $calendar [optional] <p>
     * Calendar to use for formatting or parsing; default is Gregorian.
     * This is one of the
     * IntlDateFormatter calendar constants.
     * </p>
     * @param string $pattern [optional] <p>
     * Optional pattern to use when formatting or parsing.
     * Possible patterns are documented at http://userguide.icu-project.org/formatparse/datetime.
     * </p>
     * @return IntlDateFormatter
     */
    #[TentativeType]
    public static function create(
        #[TypeAware(['8.0' => 'string|null'], default: '')] $locale,
        #[ElementAvailable(from: '5.3', to: '8.0')] #[TypeAware(['8.0' => 'int'], default: '')] $dateType,
        #[ElementAvailable(from: '5.3', to: '8.0')] #[TypeAware(['8.0' => 'int'], default: '')] $timeType,
        #[ElementAvailable(from: '8.1')] int $dateType = 0,
        #[ElementAvailable(from: '8.1')] int $timeType = 0,
        $timezone = null,
        #[TypeAware(['8.0' => 'IntlCalendar|int|null'], default: '')] $calendar = null,
        #[TypeAware(['8.0' => 'string|null'], default: '')] $pattern = ''
    ): ?IntlDateFormatter {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Get the datetype used for the IntlDateFormatter
     * @link https://php.net/manual/en/intldateformatter.getdatetype.php
     * @return int|false The current date type value of the formatter.
     */
    #[Pure]
    #[TentativeType]
    public function getDateType(): int|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Get the timetype used for the IntlDateFormatter
     * @link https://php.net/manual/en/intldateformatter.gettimetype.php
     * @return int|false The current date type value of the formatter.
     */
    #[Pure]
    #[TentativeType]
    public function getTimeType(): int|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Get the calendar used for the IntlDateFormatter
     * @link https://php.net/manual/en/intldateformatter.getcalendar.php
     * @return int|false The calendar being used by the formatter.
     */
    #[Pure]
    #[TentativeType]
    public function getCalendar(): int|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * sets the calendar used to the appropriate calendar, which must be
     * @link https://php.net/manual/en/intldateformatter.setcalendar.php
     * @param int $calendar <p>
     * The calendar to use.
     * Default is <b>IntlDateFormatter::GREGORIAN</b>.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function setCalendar(#[TypeAware(['8.0' => 'IntlCalendar|int|null'], default: '')] $calendar): bool {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Get the timezone-id used for the IntlDateFormatter
     * @link https://php.net/manual/en/intldateformatter.gettimezoneid.php
     * @return string|false ID string for the time zone used by this formatter.
     */
    #[Pure]
    #[TentativeType]
    public function getTimeZoneId(): string|false {}

    /**
     * (PHP 5 &gt;= 5.5.0, PECL intl &gt;= 3.0.0)<br/>
     * Get copy of formatter's calendar object
     * @link https://secure.php.net/manual/en/intldateformatter.getcalendarobject.php
     * @return IntlCalendar|false|null A copy of the internal calendar object used by this formatter.
     */
    #[Pure]
    #[TentativeType]
    public function getCalendarObject(): IntlCalendar|false|null {}

    /**
     * (PHP 5 &gt;= 5.5.0, PECL intl &gt;= 3.0.0)<br/>
     *  Get formatter's timezone
     * @link https://secure.php.net/manual/en/intldateformatter.gettimezone.php
     * @return IntlTimeZone|false The associated IntlTimeZone object or FALSE on failure.
     */
    #[Pure]
    #[TentativeType]
    public function getTimeZone(): IntlTimeZone|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Sets the time zone to use
     * @link https://php.net/manual/en/intldateformatter.settimezoneid.php
     * @param string $zone <p>
     * The time zone ID string of the time zone to use.
     * If <b>NULL</b> or the empty string, the default time zone for the runtime is used.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @removed 7.0
     * @see IntlDateFormatter::setTimeZone()
     */
    #[Deprecated(replacement: "%class%->setTimeZone(%parametersList%)", since: "5.5")]
    public function setTimeZoneId($zone) {}

    /**
     * (PHP 5 &gt;= 5.5.0, PECL intl &gt;= 3.0.0)<br/>
     * Sets formatter's timezone
     * @link https://php.net/manual/en/intldateformatter.settimezone.php
     * @param mixed $timezone <p>
     * The timezone to use for this formatter. This can be specified in the
     * following forms:
     * <ul>
     * <li>
     * <p>
     * <b>NULL</b>, in which case the default timezone will be used, as specified in
     * the ini setting {@link "https://secure.php.net/manual/en/datetime.configuration.php#ini.date.timezone" date.timezone} or
     * through the function  {@link "https://secure.php.net/manual/en/function.date-default-timezone-set.php" date_default_timezone_set()} and as
     * returned by {@link "https://secure.php.net/manual/en/function.date-default-timezone-get.php" date_default_timezone_get()}.
     * </p>
     * </li>
     * <li>
     * <p>
     * An {@link "https://secure.php.net/manual/en/class.intltimezone.php" IntlTimeZone}, which will be used directly.
     * </p>
     * </li>
     * <li>
     * <p>
     * A {@link "https://secure.php.net/manual/en/class.datetimezone.php" DateTimeZone}. Its identifier will be extracted
     * and an ICU timezone object will be created; the timezone will be backed
     * by ICU's database, not PHP's.
     * </p>
     * </li>
     * <li>
     * <p>
     * A {@link "https://secure.php.net/manual/en/language.types.string.php" string}, which should be a valid ICU timezone identifier.
     * See <b>IntlTimeZone::createTimeZoneIDEnumeration()</b>. Raw offsets such as <em>"GMT+08:30"</em> are also accepted.
     * </p>
     * </li>
     * </ul>
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function setTimeZone($timezone): ?bool {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Set the pattern used for the IntlDateFormatter
     * @link https://php.net/manual/en/intldateformatter.setpattern.php
     * @param string $pattern <p>
     * New pattern string to use.
     * Possible patterns are documented at http://userguide.icu-project.org/formatparse/datetime.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * Bad formatstrings are usually the cause of the failure.
     */
    #[TentativeType]
    public function setPattern(#[TypeAware(['8.0' => 'string'], default: '')] $pattern): bool {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Get the pattern used for the IntlDateFormatter
     * @link https://php.net/manual/en/intldateformatter.getpattern.php
     * @return string The pattern string being used to format/parse.
     */
    #[Pure]
    #[TentativeType]
    public function getPattern(): string|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Get the locale used by formatter
     * @link https://php.net/manual/en/intldateformatter.getlocale.php
     * @param int $type [optional]
     * @return string|false the locale of this formatter or 'false' if error
     */
    #[Pure]
    #[TentativeType]
    public function getLocale(
        #[ElementAvailable(from: '8.0')]
        #[TypeAware(['8.0' => 'int'], default: '')]
        $type = null
    ): string|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Set the leniency of the parser
     * @link https://php.net/manual/en/intldateformatter.setlenient.php
     * @param bool $lenient <p>
     * Sets whether the parser is lenient or not, default is <b>TRUE</b> (lenient).
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function setLenient(#[TypeAware(['8.0' => 'bool'], default: '')] $lenient): void {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Get the lenient used for the IntlDateFormatter
     * @link https://php.net/manual/en/intldateformatter.islenient.php
     * @return bool <b>TRUE</b> if parser is lenient, <b>FALSE</b> if parser is strict. By default the parser is lenient.
     */
    #[Pure]
    #[TentativeType]
    public function isLenient(): bool {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Format the date/time value as a string
     * @link https://php.net/manual/en/intldateformatter.format.php
     * @param mixed $datetime <p>
     * Value to format. This may be a <b>DateTime</b> object,
     * an integer representing a Unix timestamp value (seconds
     * since epoch, UTC) or an array in the format output by
     * <b>localtime</b>.
     * </p>
     * @return string|false The formatted string or, if an error occurred, <b>FALSE</b>.
     */
    #[TentativeType]
    public function format(
        #[ElementAvailable(from: '5.3', to: '7.4')] $datetime = null,
        #[ElementAvailable(from: '8.0')] $datetime,
        #[ElementAvailable(from: '5.3', to: '7.4')] $array = null
    ): string|false {}

    /**
     * (PHP 5 &gt;= 5.5.0, PECL intl &gt;= 3.0.0)<br/>
     * Formats an object
     * @link https://secure.php.net/manual/en/intldateformatter.formatobject.php
     * @param object $datetime <p>
     * An object of type {@link "https://secure.php.net/manual/en/class.intlcalendar.php" IntlCalendar} or {@link "https://secure.php.net/manual/en/class.datetime.php" DateTime}. The timezone information in the object will be used.
     * </p>
     * @param mixed $format [optional] <p>
     * How to format the date/time. This can either be an {@link "https://secure.php.net/manual/en/language.types.array.php" array} with
     * two elements (first the date style, then the time style, these being one
     * of the constants <b>IntlDateFormatter::NONE</b>,
     * <b>IntlDateFormatter::SHORT</b>,
     * <b>IntlDateFormatter::MEDIUM</b>,
     * <b>IntlDateFormatter::LONG</b>,
     * <b>IntlDateFormatter::FULL</b>), a long with
     * the value of one of these constants (in which case it will be used both
     * for the time and the date) or a {@link "https://secure.php.net/manual/en/language.types.string.php" string} with the format
     * described in {@link "http://www.icu-project.org/apiref/icu4c/classSimpleDateFormat.html#details" the ICU documentation}.
     * If <b>NULL</b>, the default style will be used.
     * </p>
     * @param string|null $locale [optional] <p>
     * The locale to use, or <b>NULL</b> to use the {@link "https://secure.php.net/manual/en/intl.configuration.php#ini.intl.default-locale" default one}.</p>
     * @return string|false A string with result or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public static function formatObject($datetime, $format = null, #[TypeAware(['8.0' => 'string|null'], default: '')] $locale = null): string|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Parse string to a timestamp value
     * @link https://php.net/manual/en/intldateformatter.parse.php
     * @param string $string <p>
     * string to convert to a time
     * </p>
     * @param int &$offset [optional] <p>
     * Position at which to start the parsing in $value (zero-based).
     * If no error occurs before $value is consumed, $parse_pos will contain -1
     * otherwise it will contain the position at which parsing ended (and the error occurred).
     * This variable will contain the end position if the parse fails.
     * If $parse_pos > strlen($value), the parse fails immediately.
     * </p>
     * @return int|float|false timestamp parsed value
     */
    #[TentativeType]
    public function parse(#[TypeAware(['8.0' => 'string'], default: '')] $string, &$offset = null): int|float|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Parse string to a field-based time value
     * @link https://php.net/manual/en/intldateformatter.localtime.php
     * @param string $string <p>
     * string to convert to a time
     * </p>
     * @param int &$offset [optional] <p>
     * Position at which to start the parsing in $value (zero-based).
     * If no error occurs before $value is consumed, $parse_pos will contain -1
     * otherwise it will contain the position at which parsing ended .
     * If $parse_pos > strlen($value), the parse fails immediately.
     * </p>
     * @return array|false Localtime compatible array of integers : contains 24 hour clock value in tm_hour field
     */
    #[TentativeType]
    public function localtime(#[TypeAware(['8.0' => 'string'], default: '')] $string, &$offset = null): array|false {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Get the error code from last operation
     * @link https://php.net/manual/en/intldateformatter.geterrorcode.php
     * @return int The error code, one of UErrorCode values. Initial value is U_ZERO_ERROR.
     */
    #[Pure]
    #[TentativeType]
    public function getErrorCode(): int {}

    /**
     * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
     * Get the error text from the last operation.
     * @link https://php.net/manual/en/intldateformatter.geterrormessage.php
     * @return string Description of the last error.
     */
    #[Pure]
    #[TentativeType]
    public function getErrorMessage(): string {}
}

class ResourceBundle implements IteratorAggregate, Countable
{
    /**
     * @link https://www.php.net/manual/en/resourcebundle.create.php
     * @param string $locale <p>Locale for which the resources should be loaded (locale name, e.g. en_CA).</p>
     * @param string $bundle <p>The directory where the data is stored or the name of the .dat file.</p>
     * @param bool $fallback [optional] <p>Whether locale should match exactly or fallback to parent locale is allowed.</p>
     */
    #[Pure]
    public function __construct(
        #[TypeAware(['8.0' => 'string|null'], default: '')] $locale,
        #[TypeAware(['8.0' => 'string|null'], default: '')] $bundle,
        #[TypeAware(['8.0' => 'bool'], default: '')] $fallback = true
    ) {}

    /**
     * (PHP &gt;= 5.3.2, PECL intl &gt;= 2.0.0)<br/>
     * Create a resource bundle
     * @link https://php.net/manual/en/resourcebundle.create.php
     * @param string $locale <p>
     * Locale for which the resources should be loaded (locale name, e.g. en_CA).
     * </p>
     * @param string $bundle <p>
     * The directory where the data is stored or the name of the .dat file.
     * </p>
     * @param bool $fallback [optional] <p>
     * Whether locale should match exactly or fallback to parent locale is allowed.
     * </p>
     * @return ResourceBundle|null <b>ResourceBundle</b> object or <b>null</b> on error.
     */
    #[TentativeType]
    public static function create(
        #[TypeAware(['8.0' => 'string|null'], default: '')] $locale,
        #[TypeAware(['8.0' => 'string|null'], default: '')] $bundle,
        #[TypeAware(['8.0' => 'bool'], default: '')] $fallback = true
    ): ?ResourceBundle {}

    /**
     * (PHP &gt;= 5.3.2, PECL intl &gt;= 2.0.0)<br/>
     * Get data from the bundle
     * @link https://php.net/manual/en/resourcebundle.get.php
     * @param string|int $index <p>
     * Data index, must be string or integer.
     * </p>
     * @param bool $fallback
     * @return mixed the data located at the index or <b>NULL</b> on error. Strings, integers and binary data strings
     * are returned as corresponding PHP types, integer array is returned as PHP array. Complex types are
     * returned as <b>ResourceBundle</b> object.
     */
    #[Pure]
    #[TentativeType]
    public function get($index, #[TypeAware(['8.0' => 'bool'], default: '')] $fallback = true): mixed {}

    /**
     * (PHP &gt;= 5.3.2, PECL intl &gt;= 2.0.0)<br/>
     * Get number of elements in the bundle
     * @link https://php.net/manual/en/resourcebundle.count.php
     * @return int<0,max> number of elements in the bundle.
     */
    #[Pure]
    #[TentativeType]
    public function count(): int {}

    /**
     * (PHP &gt;= 5.3.2, PECL intl &gt;= 2.0.0)<br/>
     * Get supported locales
     * @link https://php.net/manual/en/resourcebundle.locales.php
     * @param string $bundle <p>
     * Path of ResourceBundle for which to get available locales, or
     * empty string for default locales list.
     * </p>
     * @return array the list of locales supported by the bundle.
     */
    #[TentativeType]
    public static function getLocales(#[TypeAware(['8.0' => 'string'], default: '')] $bundle): array|false {}

    /**
     * (PHP &gt;= 5.3.2, PECL intl &gt;= 2.0.0)<br/>
     * Get bundle's last error code.
     * @link https://php.net/manual/en/resourcebundle.geterrorcode.php
     * @return int error code from last bundle object call.
     */
    #[Pure]
    #[TentativeType]
    public function getErrorCode(): int {}

    /**
     * (PHP &gt;= 5.3.2, PECL intl &gt;= 2.0.0)<br/>
     * Get bundle's last error message.
     * @link https://php.net/manual/en/resourcebundle.geterrormessage.php
     * @return string error message from last bundle object's call.
     */
    #[Pure]
    #[TentativeType]
    public function getErrorMessage(): string {}

    /**
     * @return Traversable
     * @since 8.0
     */
    #[Pure]
    public function getIterator(): Iterator {}
}

/**
 * @since 5.4
 */
class Transliterator
{
    public const FORWARD = 0;
    public const REVERSE = 1;

    /**
     * Starting 8.2 $id is readonly to unlock subclassing it
     */
    #[TypeAware(['8.1' => 'string'], default: '')]
    public $id;

    /**
     * (PHP &gt;= 5.4.0, PECL intl &gt;= 2.0.0)<br/>
     * Private constructor to deny instantiation
     * @link https://php.net/manual/en/transliterator.construct.php
     */
    final private function __construct() {}

    /**
     * (PHP &gt;= 5.4.0, PECL intl &gt;= 2.0.0)<br/>
     * Create a transliterator
     * @link https://php.net/manual/en/transliterator.create.php
     * @param string $id <p>
     * The id.
     * </p>
     * @param int $direction [optional] <p>
     * The direction, defaults to
     * Transliterator::FORWARD.
     * May also be set to
     * Transliterator::REVERSE.
     * </p>
     * @return Transliterator|null a <b>Transliterator</b> object on success,
     * or <b>NULL</b> on failure.
     */
    #[TentativeType]
    public static function create(
        #[TypeAware(['8.0' => 'string'], default: '')] $id,
        #[TypeAware(['8.0' => 'int'], default: '')] #[EV([Transliterator::FORWARD, Transliterator::REVERSE])] $direction = null
    ): ?Transliterator {}

    /**
     * (PHP &gt;= 5.4.0, PECL intl &gt;= 2.0.0)<br/>
     * Create transliterator from rules
     * @link https://php.net/manual/en/transliterator.createfromrules.php
     * @param string $rules <p>
     * The rules.
     * </p>
     * @param int $direction [optional] <p>
     * The direction, defaults to
     * {@see Transliterator::FORWARD}.
     * May also be set to
     * {@see Transliterator::REVERSE}.
     * </p>
     * @return Transliterator|null a <b>Transliterator</b> object on success,
     * or <b>NULL</b> on failure.
     */
    #[TentativeType]
    public static function createFromRules(
        #[TypeAware(['8.0' => 'string'], default: '')] $rules,
        #[TypeAware(['8.0' => 'int'], default: '')] #[EV([Transliterator::FORWARD, Transliterator::REVERSE])] $direction = null
    ): ?Transliterator {}

    /**
     * (PHP &gt;= 5.4.0, PECL intl &gt;= 2.0.0)<br/>
     * Create an inverse transliterator
     * @link https://php.net/manual/en/transliterator.createinverse.php
     * @return Transliterator|null a <b>Transliterator</b> object on success,
     * or <b>NULL</b> on failure
     */
    #[Pure]
    #[TentativeType]
    public function createInverse(): ?Transliterator {}

    /**
     * (PHP &gt;= 5.4.0, PECL intl &gt;= 2.0.0)<br/>
     * Get transliterator IDs
     * @link https://php.net/manual/en/transliterator.listids.php
     * @return array|false An array of registered transliterator IDs on success,
     * or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public static function listIDs(): array|false {}

    /**
     * (PHP &gt;= 5.4.0, PECL intl &gt;= 2.0.0)<br/>
     * Transliterate a string
     * @link https://php.net/manual/en/transliterator.transliterate.php
     * @param string $string <p>
     * The string to be transformed.
     * </p>
     * @param int $start [optional] <p>
     * The start index (in UTF-16 code units) from which the string will start
     * to be transformed, inclusive. Indexing starts at 0. The text before will
     * be left as is.
     * </p>
     * @param int $end [optional] <p>
     * The end index (in UTF-16 code units) until which the string will be
     * transformed, exclusive. Indexing starts at 0. The text after will be
     * left as is.
     * </p>
     * @return string|false The transfomed string on success, or <b>FALSE</b> on failure.
     */
    #[Pure]
    #[TentativeType]
    public function transliterate(
        #[TypeAware(['8.0' => 'string'], default: '')] $string,
        #[TypeAware(['8.0' => 'int'], default: '')] $start = null,
        #[TypeAware(['8.0' => 'int'], default: '')] $end = -1
    ): string|false {}

    /**
     * (PHP &gt;= 5.4.0, PECL intl &gt;= 2.0.0)<br/>
     * Get last error code
     * @link https://php.net/manual/en/transliterator.geterrorcode.php
     * @return int|false The error code on success,
     * or <b>FALSE</b> if none exists, or on failure.
     */
    #[Pure]
    #[TentativeType]
    public function getErrorCode(): int|false {}

    /**
     * (PHP &gt;= 5.4.0, PECL intl &gt;= 2.0.0)<br/>
     * Get last error message
     * @link https://php.net/manual/en/transliterator.geterrormessage.php
     * @return string|false The error code on success,
     * or <b>FALSE</b> if none exists, or on failure.
     */
    #[Pure]
    #[TentativeType]
    public function getErrorMessage(): string|false {}
}

/**
 * @link https://php.net/manual/en/class.spoofchecker.php
 */
class Spoofchecker
{
    public const SINGLE_SCRIPT_CONFUSABLE = 1;
    public const MIXED_SCRIPT_CONFUSABLE = 2;
    public const WHOLE_SCRIPT_CONFUSABLE = 4;
    public const ANY_CASE = 8;
    public const SINGLE_SCRIPT = 16;
    public const INVISIBLE = 32;
    public const CHAR_LIMIT = 64;
    public const ASCII = 268435456;
    public const HIGHLY_RESTRICTIVE = 805306368;
    public const MODERATELY_RESTRICTIVE = 1073741824;
    public const MINIMALLY_RESTRICTIVE = 1342177280;
    public const UNRESTRICTIVE = 1610612736;
    public const SINGLE_SCRIPT_RESTRICTIVE = 536870912;

    /**
     * (PHP &gt;= 5.4.0, PECL intl &gt;= 2.0.0)<br/>
     * Constructor
     * @link https://php.net/manual/en/spoofchecker.construct.php
     */
    #[Pure]
    public function __construct() {}

    /**
     * (PHP &gt;= 5.4.0, PECL intl &gt;= 2.0.0)<br/>
     * Checks if a given text contains any suspicious characters
     * @link https://php.net/manual/en/spoofchecker.issuspicious.php
     * @param string $string <p>
     * </p>
     * @param string &$errorCode [optional] <p>
     * </p>
     * @return bool
     */
    #[TentativeType]
    public function isSuspicious(#[TypeAware(['8.0' => 'string'], default: '')] $string, &$errorCode = null): bool {}

    /**
     * (PHP &gt;= 5.4.0, PECL intl &gt;= 2.0.0)<br/>
     * Checks if a given text contains any confusable characters
     * @link https://php.net/manual/en/spoofchecker.areconfusable.php
     * @param string $string1 <p>
     * </p>
     * @param string $string2 <p>
     * </p>
     * @param string &$errorCode [optional] <p>
     * </p>
     * @return bool
     */
    #[TentativeType]
    public function areConfusable(
        #[TypeAware(['8.0' => 'string'], default: '')] $string1,
        #[TypeAware(['8.0' => 'string'], default: '')] $string2,
        &$errorCode = null
    ): bool {}

    /**
     * (PHP &gt;= 5.4.0, PECL intl &gt;= 2.0.0)<br/>
     * Locales to use when running checks
     * @link https://php.net/manual/en/spoofchecker.setallowedlocales.php
     * @param string $locales <p>
     * </p>
     * @return void
     */
    #[TentativeType]
    public function setAllowedLocales(#[TypeAware(['8.0' => 'string'], default: '')] $locales): void {}

    /**
     * (PHP &gt;= 5.4.0, PECL intl &gt;= 2.0.0)<br/>
     * Set the checks to run
     * @link https://php.net/manual/en/spoofchecker.setchecks.php
     * @param int $checks <p>
     * </p>
     * @return void
     */
    #[TentativeType]
    public function setChecks(#[TypeAware(['8.0' => 'int'], default: '')] $checks): void {}

    #[TentativeType]
    public function setRestrictionLevel(int $level): void {}
}

/**
 * @since 5.5
 */
class IntlGregorianCalendar extends IntlCalendar
{
    /**
     * @link https://www.php.net/manual/en/intlgregoriancalendar.construct
     * @param int $timezoneOrYear [optional]
     * @param int $localeOrMonth [optional]
     * @param int $day [optional]
     * @param int $hour [optional]
     * @param int $minute [optional]
     * @param int $second [optional]
     */
    public function __construct($timezoneOrYear, $localeOrMonth, $day, $hour, $minute, $second) {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * @param mixed $timeZone
     * @param string $locale
     * @return IntlGregorianCalendar
     */
    public static function createInstance($timeZone = null, $locale = null) {}

    /**
     * @param float $timestamp
     */
    #[TentativeType]
    public function setGregorianChange(#[TypeAware(['8.0' => 'float'], default: '')] $timestamp): bool {}

    /**
     * @return float
     */
    #[Pure]
    #[TentativeType]
    public function getGregorianChange(): float {}

    /**
     * @param int $year
     * @return bool
     */
    #[Pure]
    #[TentativeType]
    public function isLeapYear(#[TypeAware(['8.0' => 'int'], default: '')] $year): bool {}
}

/**
 * @since 5.5
 */
class IntlCalendar
{
    /* Constants */
    public const FIELD_ERA = 0;
    public const FIELD_YEAR = 1;
    public const FIELD_MONTH = 2;
    public const FIELD_WEEK_OF_YEAR = 3;
    public const FIELD_WEEK_OF_MONTH = 4;
    public const FIELD_DATE = 5;
    public const FIELD_DAY_OF_YEAR = 6;
    public const FIELD_DAY_OF_WEEK = 7;
    public const FIELD_DAY_OF_WEEK_IN_MONTH = 8;
    public const FIELD_AM_PM = 9;
    public const FIELD_HOUR = 10;
    public const FIELD_HOUR_OF_DAY = 11;
    public const FIELD_MINUTE = 12;
    public const FIELD_SECOND = 13;
    public const FIELD_MILLISECOND = 14;
    public const FIELD_ZONE_OFFSET = 15;
    public const FIELD_DST_OFFSET = 16;
    public const FIELD_YEAR_WOY = 17;
    public const FIELD_DOW_LOCAL = 18;
    public const FIELD_EXTENDED_YEAR = 19;
    public const FIELD_JULIAN_DAY = 20;
    public const FIELD_MILLISECONDS_IN_DAY = 21;
    public const FIELD_IS_LEAP_MONTH = 22;
    public const FIELD_FIELD_COUNT = 23;
    public const FIELD_DAY_OF_MONTH = 5;
    public const DOW_SUNDAY = 1;
    public const DOW_MONDAY = 2;
    public const DOW_TUESDAY = 3;
    public const DOW_WEDNESDAY = 4;
    public const DOW_THURSDAY = 5;
    public const DOW_FRIDAY = 6;
    public const DOW_SATURDAY = 7;
    public const DOW_TYPE_WEEKDAY = 0;
    public const DOW_TYPE_WEEKEND = 1;
    public const DOW_TYPE_WEEKEND_OFFSET = 2;
    public const DOW_TYPE_WEEKEND_CEASE = 3;
    public const WALLTIME_FIRST = 1;
    public const WALLTIME_LAST = 0;
    public const WALLTIME_NEXT_VALID = 2;

    /* Methods */

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Add a (signed) amount of time to a field
     * @link https://secure.php.net/manual/en/intlcalendar.add.php
     * @param int $field <p>
     * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}.
     * These are integer values between <em>0</em> and
     * <b>IntlCalendar::FIELD_COUNT</b>.
     * </p>
     * @param int $value <p>The signed amount to add to the current field. If the amount is positive, the instant will be moved forward; if it is negative, the instant wil be moved into the past. The unit is implicit to the field type.
     * For instance, hours for <b>IntlCalendar::FIELD_HOUR_OF_DAY</b>.</p>
     * @return bool Returns TRUE on success or FALSE on failure.
     */
    #[TentativeType]
    public function add(
        #[TypeAware(['8.0' => 'int'], default: '')] $field,
        #[TypeAware(['8.0' => 'int'], default: '')] $value
    ): bool {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Whether this object's time is after that of the passed object
     * https://secure.php.net/manual/en/intlcalendar.after.php
     * @param IntlCalendar $other <p>The calendar whose time will be checked against this object's time.</p>
     * @return bool
     * Returns <b>TRUE</b> if this object's current time is after that of the
     * <em>calendar</em> argument's time. Returns <b>FALSE</b> otherwise.
     * Also returns <b>FALSE</b> on failure. You can use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or
     * {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to detect error conditions.
     */
    #[Pure]
    #[TentativeType]
    public function after(IntlCalendar $other): bool {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Whether this object's time is before that of the passed object
     * @link https://secure.php.net/manual/en/intlcalendar.before.php
     * @param IntlCalendar $other <p> The calendar whose time will be checked against this object's time.</p>
     * @return bool
     * Returns <b>TRUE</B> if this object's current time is before that of the
     * <em>calendar</em> argument's time. Returns <b>FALSE</b> otherwise.
     * Also returns <b>FALSE</b> on failure. You can use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or
     * {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to detect error conditions.
     */
    #[Pure]
    #[TentativeType]
    public function before(IntlCalendar $other): bool {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Clear a field or all fields
     * @link https://secure.php.net/manual/en/intlcalendar.clear.php
     * @param int $field [optional] <p>
     * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
     * values between <em>0</em> and
     * <b>IntlCalendar::FIELD_COUNT</b>.
     * </p>
     * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. Failure can only occur is invalid arguments are provided.
     */
    public function clear(#[TypeAware(['8.0' => 'int|null'], default: '')] $field = null) {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Private constructor for disallowing instantiation
     * @link https://secure.php.net/manual/en/intlcalendar.construct.php
     */
    private function __construct() {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Create a new IntlCalendar
     * @link https://secure.php.net/manual/en/intlcalendar.createinstance.php
     * @param mixed $timezone [optional] <p> <p>
     * The timezone to use.
     * </p>
     *
     * <ul>
     * <li>
     * <p>
     * <b>NULL</b>, in which case the default timezone will be used, as specified in
     * the ini setting {@link https://secure.php.net/manual/en/datetime.configuration.php#ini.date.timezone date.timezone} or
     * through the function  {@link https://secure.php.net/manual/en/function.date-default-timezone-set.php date_default_timezone_set()} and as
     * returned by {@link https://secure.php.net/manual/en/function.date-default-timezone-get.php date_default_timezone_get()}.
     * </p>
     * </li>
     * <li>
     * <p>
     * An {@link https://secure.php.net/manual/en/class.intltimezone.php IntlTimeZone}, which will be used directly.
     * </p>
     * </li>
     * <li>
     * <p>
     * A {@link https://secure.php.net/manual/en/class.datetimezone.php DateTimeZone}. Its identifier will be extracted
     * and an ICU timezone object will be created; the timezone will be backed
     * by ICU's database, not PHP's.
     * </p>
     * </li>
     * <li>
     * <p>
     * A {@link https://secure.php.net/manual/en/language.types.string.php string}, which should be a valid ICU timezone identifier.
     * See  <b>IntlTimeZone::createTimeZoneIDEnumeration()</b>. Raw
     * offsets such as <em>"GMT+08:30"</em> are also accepted.
     * </p>
     * </li>
     * </ul>
     * </p>
     * @param string|null $locale [optional] <p>
     * A locale to use or <b>NULL</b> to use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.default-locale the default locale}.
     * </p>
     * @return IntlCalendar|null
     * The created {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} instance or <b>NULL</b> on
     * failure.
     */
    #[TentativeType]
    public static function createInstance($timezone = null, #[TypeAware(['8.0' => 'string|null'], default: '')] $locale = null): ?IntlCalendar {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Compare time of two IntlCalendar objects for equality
     * @link https://secure.php.net/manual/en/intlcalendar.equals.php
     * @param IntlCalendar $other
     * @return bool <p>
     * Returns <b>TRUE</b> if the current time of both this and the passed in
     * {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} object are the same, or <b>FALSE</b>
     * otherwise. The value <b>FALSE</b> can also be returned on failure. This can only
     * happen if bad arguments are passed in. In any case, the two cases can be
     * distinguished by calling  {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()}.
     * </p>
     */
    #[Pure]
    #[TentativeType]
    public function equals(#[TypeAware(['8.0' => 'IntlCalendar'], default: '')] $other): bool {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Calculate difference between given time and this object's time
     * @link https://secure.php.net/manual/en/intlcalendar.fielddifference.php
     * @param float $timestamp <p>
     * The time against which to compare the quantity represented by the
     * <em>field</em>. For the result to be positive, the time
     * given for this parameter must be ahead of the time of the object the
     * method is being invoked on.
     * </p>
     * @param int $field <p>
     * The field that represents the quantity being compared.
     * </p>
     *
     * <p>
     * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
     * values between <em>0</em> and
     * <b>IntlCalendar::FIELD_COUNT</b>.
     * </p>
     * @return int Returns a (signed) difference of time in the unit associated with the
     * specified field or <b>FALSE</b> on failure.
     */
    #[Pure]
    #[TentativeType]
    public function fieldDifference(
        #[TypeAware(['8.0' => 'float'], default: '')] $timestamp,
        #[TypeAware(['8.0' => 'int'], default: '')] $field
    ): int|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a2)<br/>
     * Create an IntlCalendar from a DateTime object or string
     * @link https://secure.php.net/manual/en/intlcalendar.fromdatetime.php
     * @param mixed $datetime <p>
     * A {@link https://secure.php.net/manual/en/class.datetime.php DateTime} object or a {@link https://secure.php.net/manual/en/language.types.string.php string} that
     * can be passed to  {@link https://secure.php.net/manual/en/datetime.construct.php DateTime::__construct()}.
     * </p>
     * @param $locale [optional]
     * @return IntlCalendar|null
     * The created {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} object or <b>NULL</b> in case of
     * failure. If a {@link https://secure.php.net/manual/en/language.types.string.php string} is passed, any exception that occurs
     * inside the {@link https://secure.php.net/manual/en/class.datetime.php DateTime} constructor is propagated.
     */
    #[TentativeType]
    public static function fromDateTime(
        #[TypeAware(['8.0' => 'DateTime|string'], default: '')] $datetime,
        #[TypeAware(['8.0' => 'string|null'], default: '')] #[ElementAvailable(from: '8.0')] $locale
    ): ?IntlCalendar {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get the value for a field
     * @link https://secure.php.net/manual/en/intlcalendar.get.php
     * @param int $field <p>
     * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
     * values between <em>0</em> and
     * <b>IntlCalendar::FIELD_COUNT</b>.
     * </p>
     * @return int An integer with the value of the time field.
     */
    #[Pure]
    #[TentativeType]
    public function get(#[TypeAware(['8.0' => 'int'], default: '')] $field): int|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * The maximum value for a field, considering the object's current time
     * @link https://secure.php.net/manual/en/intlcalendar.getactualmaximum.php
     * @param int $field <p>
     * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
     * values between <em>0</em> and
     * <b>IntlCalendar::FIELD_COUNT</b>.
     * </p>
     * @return int
     * An {@link https://secure.php.net/manual/en/language.types.integer.php int} representing the maximum value in the units associated
     * with the given <em>field</em> or <b>FALSE</b> on failure.
     */
    #[Pure]
    #[TentativeType]
    public function getActualMaximum(#[TypeAware(['8.0' => 'int'], default: '')] $field): int|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * The minimum value for a field, considering the object's current time
     * @link https://secure.php.net/manual/en/intlcalendar.getactualminimum.php
     * @param int $field <p>
     * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}.
     * These are integer values between <em>0</em> and
     * <b>IntlCalendar::FIELD_COUNT</b>.
     * </p>
     * @return int
     * An {@link https://secure.php.net/manual/en/language.types.integer.php int} representing the minimum value in the field's
     * unit or <b>FALSE</b> on failure.
     */
    #[Pure]
    #[TentativeType]
    public function getActualMinimum(#[TypeAware(['8.0' => 'int'], default: '')] $field): int|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get array of locales for which there is data
     * @link https://secure.php.net/manual/en/intlcalendar.getavailablelocales.php
     * @return string[] An array of strings, one for which locale.
     */
    #[TentativeType]
    public static function getAvailableLocales(): array {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Tell whether a day is a weekday, weekend or a day that has a transition between the two
     * @param int $dayOfWeek <p>
     * One of the constants <b>IntlCalendar::DOW_SUNDAY</b>,
     * <b>IntlCalendar::DOW_MONDAY</b>, ...,
     * <b>IntlCalendar::DOW_SATURDAY</b>.
     * </p>
     * @return int|false
     * Returns one of the constants
     * <b>IntlCalendar::DOW_TYPE_WEEKDAY</b>,
     * <b>IntlCalendar::DOW_TYPE_WEEKEND</b>,
     * <b>IntlCalendar::DOW_TYPE_WEEKEND_OFFSET</b> or
     * <b>IntlCalendar::DOW_TYPE_WEEKEND_CEASE</b> or <b>FALSE</b> on failure.
     */
    #[Pure]
    #[TentativeType]
    public function getDayOfWeekType(#[TypeAware(['8.0' => 'int'], default: '')] $dayOfWeek): int|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get last error code on the object
     * @link https://secure.php.net/manual/en/intlcalendar.geterrorcode.php
     * @return int|false An ICU error code indicating either success, failure or a warning.
     */
    #[Pure]
    #[TentativeType]
    public function getErrorCode(): int|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get last error message on the object
     * @link https://secure.php.net/manual/en/intlcalendar.geterrormessage.php
     * @return string|false The error message associated with last error that occurred in a function call on this object, or a string indicating the non-existance of an error.
     */
    #[Pure]
    #[TentativeType]
    public function getErrorMessage(): string|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get the first day of the week for the calendar's locale
     * @link https://secure.php.net/manual/en/intlcalendar.getfirstdayofweek.php
     * @return int|false
     * One of the constants <b>IntlCalendar::DOW_SUNDAY</b>,
     * <b>IntlCalendar::DOW_MONDAY</b>, ...,
     * <b>IntlCalendar::DOW_SATURDAY</b> or <b>FALSE</b> on failure.
     */
    #[Pure]
    #[TentativeType]
    public function getFirstDayOfWeek(): int|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get the largest local minimum value for a field
     * @link https://secure.php.net/manual/en/intlcalendar.getgreatestminimum.php
     * @param int $field
     * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
     * values between <em>0</em> and
     * <b>IntlCalendar::FIELD_COUNT</b>.
     * @return int|false
     * An {@link https://secure.php.net/manual/en/language.types.integer.php int} representing a field value, in the field's
     * unit, or <b>FALSE</b> on failure.
     */
    #[Pure]
    #[TentativeType]
    public function getGreatestMinimum(#[TypeAware(['8.0' => 'int'], default: '')] $field): int|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get set of locale keyword values
     * @param string $keyword <p>
     * The locale keyword for which relevant values are to be queried. Only
     * <em>'calendar'</em> is supported.
     * </p>
     * @param string $locale <p>
     * The locale onto which the keyword/value pair are to be appended.
     * </p>
     * @param bool $onlyCommon
     * <p>
     * Whether to show only the values commonly used for the specified locale.
     * </p>
     * @return Iterator|false An iterator that yields strings with the locale keyword values or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public static function getKeywordValuesForLocale(
        #[TypeAware(['8.0' => 'string'], default: '')] $keyword,
        #[TypeAware(['8.0' => 'string'], default: '')] $locale,
        #[TypeAware(['8.0' => 'bool'], default: '')] $onlyCommon
    ): IntlIterator|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get the smallest local maximum for a field
     * @link https://secure.php.net/manual/en/intlcalendar.getleastmaximum.php
     * @param int $field <p>
     * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
     * values between <em>0</em> and
     * <b>IntlCalendar::FIELD_COUNT</b>.
     * </p>
     * @return int|false
     * An {@link https://secure.php.net/manual/en/language.types.integer.ph int} representing a field value in the field's
     * unit or <b>FALSE</b> on failure.
     */
    #[Pure]
    #[TentativeType]
    public function getLeastMaximum(#[TypeAware(['8.0' => 'int'], default: '')] $field): int|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get the locale associated with the object
     * @link https://secure.php.net/manual/en/intlcalendar.getlocale.php
     * @param int $type <p>
     * Whether to fetch the actual locale (the locale from which the calendar
     * data originates, with <b>Locale::ACTUAL_LOCALE</b>) or the
     * valid locale, i.e., the most specific locale supported by ICU relatively
     * to the requested locale – see <b>Locale::VALID_LOCALE</b>.
     * From the most general to the most specific, the locales are ordered in
     * this fashion – actual locale, valid locale, requested locale.
     * </p>
     * @return string
     */
    #[Pure]
    #[TentativeType]
    public function getLocale(#[TypeAware(['8.0' => 'int'], default: '')] $type): string|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get the global maximum value for a field
     * @link https://secure.php.net/manual/en/intlcalendar.getmaximum.php
     * @param int $field <p>
     * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
     * values between <em>0</em> and
     * <b>IntlCalendar::FIELD_COUNT</b>.
     * </p>
     * @return int|false
     */
    #[Pure]
    #[TentativeType]
    public function getMaximum(#[TypeAware(['8.0' => 'int'], default: '')] $field): int|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get minimal number of days the first week in a year or month can have
     * @link https://secure.php.net/manual/en/intlcalendar.getminimaldaysinfirstweek.php
     * @return int|false
     * An {@link https://secure.php.net/manual/en/language.types.integer.php  int} representing a number of days or <b>FALSE</b> on failure.
     */
    #[Pure]
    #[TentativeType]
    public function getMinimalDaysInFirstWeek(): int|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get the global minimum value for a field
     * @link https://secure.php.net/manual/en/intlcalendar.getminimum.php
     * @param int $field <p>
     * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field}. These are integer
     * values between <em>0</em> and
     * <b>IntlCalendar::FIELD_COUNT</b>.
     * </p>
     * @return int|false
     * An int representing a value for the given field in the field's unit or FALSE on failure.
     */
    #[Pure]
    #[TentativeType]
    public function getMinimum(#[TypeAware(['8.0' => 'int'], default: '')] $field): int|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get number representing the current time
     * @return float A float representing a number of milliseconds since the epoch, not counting leap seconds.
     */
    #[TentativeType]
    public static function getNow(): float {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get behavior for handling repeating wall time
     * @link https://secure.php.net/manual/en/intlcalendar.getrepeatedwalltimeoption.php
     * @return int
     * One of the constants <b>IntlCalendar::WALLTIME_FIRST</b> or
     * <b>IntlCalendar::WALLTIME_LAST</b>.
     */
    #[Pure]
    #[TentativeType]
    public function getRepeatedWallTimeOption(): int {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get behavior for handling skipped wall time
     * @link https://secure.php.net/manual/en/intlcalendar.getskippedwalltimeoption.php
     * @return int
     * One of the constants <b>IntlCalendar::WALLTIME_FIRST</b>,
     * <b>IntlCalendar::WALLTIME_LAST</b> or
     * <b>IntlCalendar::WALLTIME_NEXT_VALID</b>.
     */
    #[Pure]
    #[TentativeType]
    public function getSkippedWallTimeOption(): int {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get time currently represented by the object
     * @return float|false
     * A {@link https://secure.php.net/manual/en/language.types.float.php float} representing the number of milliseconds elapsed since the
     * reference time (1 Jan 1970 00:00:00 UTC).
     */
    #[Pure]
    #[TentativeType]
    public function getTime(): float|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get the object's timezone
     * @link https://secure.php.net/manual/en/intlcalendar.gettimezone.php
     * @return IntlTimeZone|false
     * An {@link https://secure.php.net/manual/en/class.intltimezone.php IntlTimeZone} object corresponding to the one used
     * internally in this object.
     */
    #[Pure]
    #[TentativeType]
    public function getTimeZone(): IntlTimeZone|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get the calendar type
     * @link https://secure.php.net/manual/en/intlcalendar.gettype.php
     * @return string
     * A {@link https://secure.php.net/manual/en/language.types.string.php string} representing the calendar type, such as
     * <em>'gregorian'</em>, <em>'islamic'</em>, etc.
     */
    #[Pure]
    #[TentativeType]
    public function getType(): string {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get time of the day at which weekend begins or ends
     * @link https://secure.php.net/manual/en/intlcalendar.getweekendtransition.php
     * @param string $dayOfWeek <p>
     * One of the constants <b>IntlCalendar::DOW_SUNDAY</b>,
     * <b>IntlCalendar::DOW_MONDAY</b>, ...,
     * <b>IntlCalendar::DOW_SATURDAY</b>.
     * </p>
     * @return int|false
     * The number of milliseconds into the day at which the the weekend begins or
     * ends or <b>FALSE</b> on failure.
     */
    #[Pure]
    #[TentativeType]
    public function getWeekendTransition(#[TypeAware(['8.0' => 'int'], default: '')] $dayOfWeek): int|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Whether the object's time is in Daylight Savings Time
     * @link https://secure.php.net/manual/en/intlcalendar.indaylighttime.php
     * @return bool
     * Returns <b>TRUE</b> if the date is in Daylight Savings Time, <b>FALSE</b> otherwise.
     * The value <b>FALSE</b> may also be returned on failure, for instance after
     * specifying invalid field values on non-lenient mode; use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or query
     * {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to disambiguate.
     */
    #[Pure]
    #[TentativeType]
    public function inDaylightTime(): bool {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Whether another calendar is equal but for a different time
     * @link https://secure.php.net/manual/en/intlcalendar.isequivalentto.php
     * @param IntlCalendar $other The other calendar against which the comparison is to be made.
     * @return bool
     * Assuming there are no argument errors, returns <b>TRUE</b> iif the calendars are equivalent except possibly for their set time.
     */
    #[Pure]
    #[TentativeType]
    public function isEquivalentTo(IntlCalendar $other): bool {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Whether date/time interpretation is in lenient mode
     * @link https://secure.php.net/manual/en/intlcalendar.islenient.php
     * @return bool
     * A {@link https://secure.php.net/manual/en/language.types.boolean.php bool} representing whether the calendar is set to lenient mode.
     */
    #[Pure]
    #[TentativeType]
    public function isLenient(): bool {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Whether a certain date/time is in the weekend
     * @link https://secure.php.net/manual/en/intlcalendar.isweekend.php
     * @param float|null $timestamp [optional] <p>
     * An optional timestamp representing the number of milliseconds since the
     * epoch, excluding leap seconds. If <b>NULL</b>, this object's current time is
     * used instead.
     * </p>
     * @return bool
     * <p> A {@link https://secure.php.net/manual/en/language.types.boolean.php bool} indicating whether the given or this object's time occurs
     * in a weekend.
     * </p>
     * <p>
     * The value <b>FALSE</b> may also be returned on failure, for instance after giving
     * a date out of bounds on non-lenient mode; use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or query
     * {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to disambiguate.</p>
     */
    #[Pure]
    #[TentativeType]
    public function isWeekend(#[TypeAware(['8.0' => 'float|null'], default: '')] $timestamp = null): bool {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Add value to field without carrying into more significant fields
     * @link https://secure.php.net/manual/en/intlcalendar.roll.php
     * @param int $field
     * <p>One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time
     * {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
     * values between <em>0</em> and
     * <b>IntlCalendar::FIELD_COUNT</b>.
     * </p>
     * @param mixed $value <p>
     * The (signed) amount to add to the field, <b>TRUE</b> for rolling up (adding
     * <em>1</em>), or <b>FALSE</b> for rolling down (subtracting
     * <em>1</em>).
     * </p>
     * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function roll(#[TypeAware(['8.0' => 'int'], default: '')] $field, $value): bool {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Whether a field is set
     * @link https://secure.php.net/manual/en/intlcalendar.isset.php
     * @param int $field <p>
     * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time
     * {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}.
     * These are integer values between <em>0</em> and
     * <b>IntlCalendar::FIELD_COUNT</b>.
     * </p>
     * @return bool Assuming there are no argument errors, returns <b>TRUE</b> iif the field is set.
     */
    #[TentativeType]
    public function PS_UNRESERVE_PREFIX_isSet(#[TypeAware(['8.0' => 'int'], default: '')] $field): bool {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Set a time field or several common fields at once
     * @link https://secure.php.net/manual/en/intlcalendar.set.php
     * @param int $year <p>
     * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
     * values between <em>0</em> and
     * <b>IntlCalendar::FIELD_COUNT</b>.
     * </p>
     * @param int $month <p>
     * The new value for <b>IntlCalendar::FIELD_MONTH</b>.
     * </p>
     * @param int $dayOfMonth [optional] <p>
     * The new value for <b>IntlCalendar::FIELD_DAY_OF_MONTH</b>.
     * The month sequence is zero-based, i.e., January is represented by 0,
     * February by 1, ..., December is 11 and Undecember (if the calendar has
     * it) is 12.
     * </p>
     * @param int $hour [optional]
     * <p>
     * The new value for <b>IntlCalendar::FIELD_HOUR_OF_DAY</b>.
     * </p>
     * @param int $minute [optional]
     * <p>
     * The new value for <b>IntlCalendar::FIELD_MINUTE</b>.
     * </p>
     * @param int $second [optional] <p>
     * The new value for <b>IntlCalendar::FIELD_SECOND</b>.
     * </p>
     * @return bool Returns <b>TRUE</b> on success and <b>FALSE</b> on failure.
     */
    public function set($year, $month, $dayOfMonth = null, $hour = null, $minute = null, $second = null) {}

    /**
     * (PHP 5 >= 5.5.0 PECL intl >= 3.0.0a1)<br/>
     * Set a time field or several common fields at once
     * @link https://secure.php.net/manual/en/intlcalendar.set.php
     * @param int $field One of the IntlCalendar date/time field constants. These are integer values between 0 and IntlCalendar::FIELD_COUNT.
     * @param int $value The new value of the given field.
     * @return bool Returns <b>TRUE</b> on success and <b>FALSE</b> on failure.
     * @since 5.5
     */
    public function set($field, $value) {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Set the day on which the week is deemed to start
     * @link https://secure.php.net/manual/en/intlcalendar.setfirstdayofweek.php
     * @param int $dayOfWeek <p>
     * One of the constants <b>IntlCalendar::DOW_SUNDAY</b>,
     * <b>IntlCalendar::DOW_MONDAY</b>, ...,
     * <b>IntlCalendar::DOW_SATURDAY</b>.
     * </p>
     * @return bool Returns TRUE on success. Failure can only happen due to invalid parameters.
     */
    public function setFirstDayOfWeek(#[TypeAware(['8.0' => 'int'], default: '')] $dayOfWeek) {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Set whether date/time interpretation is to be lenient
     * @link https://secure.php.net/manual/en/intlcalendar.setlenient.php
     * @param bool $lenient <p>
     * Use <b>TRUE</b> to activate the lenient mode; <b>FALSE</b> otherwise.
     * </p>
     * @return bool Returns <b>TRUE</b> on success. Failure can only happen due to invalid parameters.
     */
    public function setLenient(#[TypeAware(['8.0' => 'bool'], default: '')] $lenient) {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Set behavior for handling repeating wall times at negative timezone offset transitions
     * @link https://secure.php.net/manual/en/intlcalendar.setrepeatedwalltimeoption.php
     * @param int $option <p>
     * One of the constants <b>IntlCalendar::WALLTIME_FIRST</b> or
     * <b>IntlCalendar::WALLTIME_LAST</b>.
     * </p>
     * @return bool
     * Returns <b>TRUE</b> on success. Failure can only happen due to invalid parameters.
     */
    public function setRepeatedWallTimeOption(#[TypeAware(['8.0' => 'int'], default: '')] $option) {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Set behavior for handling skipped wall times at positive timezone offset transitions
     * @link https://secure.php.net/manual/en/intlcalendar.setskippedwalltimeoption.php
     * @param int $option <p>
     * One of the constants <b>IntlCalendar::WALLTIME_FIRST</b>,
     * <b>IntlCalendar::WALLTIME_LAST</b> or
     * <b>IntlCalendar::WALLTIME_NEXT_VALID</b>.
     * </p>
     * @return bool
     * <p>
     * Returns <b>TRUE</b> on success. Failure can only happen due to invalid parameters.
     * </p>
     */
    public function setSkippedWallTimeOption(#[TypeAware(['8.0' => 'int'], default: '')] $option) {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Set the calendar time in milliseconds since the epoch
     * @link https://secure.php.net/manual/en/intlcalendar.settime.php
     * @param float $timestamp <p>
     * An instant represented by the number of number of milliseconds between
     * such instant and the epoch, ignoring leap seconds.
     * </p>
     * @return bool
     * Returns <b>TRUE</b> on success and <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function setTime(#[TypeAware(['8.0' => 'float'], default: '')] $timestamp): bool {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Set the timezone used by this calendar
     * @link https://secure.php.net/manual/en/intlcalendar.settimezone.php
     * @param mixed $timezone <p>
     * The new timezone to be used by this calendar. It can be specified in the
     * following ways:
     *
     * </p><ul>
     * <li>
     * <p>
     * <b>NULL</b>, in which case the default timezone will be used, as specified in
     * the ini setting {@link https://secure.php.net/manual/en/datetime.configuration.php#ini.date.timezone date.timezone} or
     * through the function  {@link https://secure.php.net/manual/en/function.date-default-timezone-set.php date_default_timezone_set()} and as
     * returned by  {@link https://secure.php.net/manual/en/function.date-default-timezone-get.php date_default_timezone_get()}.
     * </p>
     * </li>
     * <li>
     * <p>
     * An {@link https://secure.php.net/manual/en/class.intltimezone.php IntlTimeZone}, which will be used directly.
     * </p>
     * </li>
     * <li>
     * <p>
     * A {@link https://secure.php.net/manual/en/class.datetimezone.php DateTimeZone}. Its identifier will be extracted
     * and an ICU timezone object will be created; the timezone will be backed
     * by ICU's database, not PHP's.
     * </p>
     * </li>
     * <li>
     * <p>
     * A {@link https://secure.php.net/manual/en/language.types.string.php string}, which should be a valid ICU timezone identifier.
     * See  b>IntlTimeZone::createTimeZoneIDEnumeration()</b>. Raw
     * offsets such as <em>"GMT+08:30"</em> are also accepted.
     * </p>
     * </li>
     * </ul>
     * @return bool Returns <b>TRUE</b> on success and <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function setTimeZone($timezone): bool {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a2)<br/>
     * Convert an IntlCalendar into a DateTime object
     * @link https://secure.php.net/manual/en/intlcalendar.todatetime.php
     * @return DateTime|false
     * A {@link https://secure.php.net/manual/en/class.datetime.php DateTime} object with the same timezone as this
     * object (though using PHP's database instead of ICU's) and the same time,
     * except for the smaller precision (second precision instead of millisecond).
     * Returns <b>FALSE</b> on failure.
     */
    #[Pure]
    #[TentativeType]
    public function toDateTime(): DateTime|false {}

    /**
     * @link https://www.php.net/manual/en/intlcalendar.setminimaldaysinfirstweek.php
     * @param int $days
     * @return bool
     */
    public function setMinimalDaysInFirstWeek(#[TypeAware(['8.0' => 'int'], default: '')] $days) {}
}

/**
 * @since 5.5
 */
class IntlIterator implements Iterator
{
    #[TentativeType]
    public function current(): mixed {}

    #[TentativeType]
    public function key(): mixed {}

    #[TentativeType]
    public function next(): void {}

    #[TentativeType]
    public function rewind(): void {}

    #[TentativeType]
    public function valid(): bool {}
}

/**
 * @since 5.5
 */
class IntlException extends Exception {}

/**
 * @since 5.5
 */
class IntlTimeZone
{
    /* Constants */
    public const DISPLAY_SHORT = 1;
    public const DISPLAY_LONG = 2;
    public const DISPLAY_SHORT_GENERIC = 3;
    public const DISPLAY_LONG_GENERIC = 4;
    public const DISPLAY_SHORT_GMT = 5;
    public const DISPLAY_LONG_GMT = 6;
    public const DISPLAY_SHORT_COMMONLY_USED = 7;
    public const DISPLAY_GENERIC_LOCATION = 8;
    public const TYPE_ANY = 0;
    public const TYPE_CANONICAL = 1;
    public const TYPE_CANONICAL_LOCATION = 2;

    /* Methods */

    private function __construct() {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get the number of IDs in the equivalency group that includes the given ID
     * @link https://secure.php.net/manual/en/intltimezone.countequivalentids.php
     * @param string $timezoneId
     * @return int|false number of IDs or <b>FALSE</b> on failure
     */
    #[TentativeType]
    public static function countEquivalentIDs(#[TypeAware(['8.0' => 'string'], default: '')] $timezoneId): int|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Create a new copy of the default timezone for this host
     * @link https://secure.php.net/manual/en/intltimezone.createdefault.php
     * @return IntlTimeZone
     */
    #[TentativeType]
    public static function createDefault(): IntlTimeZone {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get an enumeration over time zone IDs associated with the given country or offset
     * @link https://secure.php.net/manual/en/intltimezone.createenumeration.php
     * @param mixed $countryOrRawOffset [optional]
     * @return IntlIterator|false an iterator or <b>FALSE</b> on failure
     */
    #[TentativeType]
    public static function createEnumeration($countryOrRawOffset): IntlIterator|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Create a timezone object for the given ID
     * @link https://secure.php.net/manual/en/intltimezone.createtimezone.php
     * @param string $timezoneId
     * @return IntlTimeZone|null a timezone object or <b>NULL</b> on failure
     */
    #[TentativeType]
    public static function createTimeZone(#[TypeAware(['8.0' => 'string'], default: '')] $timezoneId): ?IntlTimeZone {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Get an enumeration over system time zone IDs with the given filter conditions
     * @link https://secure.php.net/manual/en/intltimezone.createtimezoneidenumeration.php
     * @param int $type
     * @param string|null $region [optional]
     * @param int $rawOffset [optional]
     * @return IntlIterator|false an iterator or <b>FALSE</b> on failure
     */
    #[TentativeType]
    public static function createTimeZoneIDEnumeration(
        #[TypeAware(['8.0' => 'int'], default: '')] $type,
        #[TypeAware(['8.0' => 'string|null'], default: '')] $region = null,
        #[TypeAware(['8.0' => 'int|null'], default: '')] $rawOffset = 0
    ): IntlIterator|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Create a timezone object from DateTimeZone
     * @link https://secure.php.net/manual/en/intltimezone.fromdatetimezone.php
     * @param DateTimeZone $timezone
     * @return IntlTimeZone|null a timezone object or <b>NULL</b> on failure
     */
    #[TentativeType]
    public static function fromDateTimeZone(#[TypeAware(['8.0' => 'DateTimeZone'], default: '')] $timezone): ?IntlTimeZone {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get the canonical system timezone ID or the normalized custom time zone ID for the given time zone ID
     * @link https://secure.php.net/manual/en/intltimezone.getcanonicalid.php
     * @param string $timezoneId
     * @param bool &$isSystemId [optional]
     * @return string|false the timezone ID or <b>FALSE</b> on failure
     */
    #[TentativeType]
    public static function getCanonicalID(#[TypeAware(['8.0' => 'string'], default: '')] $timezoneId, &$isSystemId): string|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get a name of this time zone suitable for presentation to the user
     * @param bool $dst [optional]
     * @param int $style [optional]
     * @param string $locale [optional]
     * @return string|false the timezone name or <b>FALSE</b> on failure
     */
    #[Pure]
    #[TentativeType]
    public function getDisplayName(
        #[TypeAware(['8.0' => 'bool'], default: '')] $dst = false,
        #[TypeAware(['8.0' => 'int'], default: '')] $style = 2,
        #[TypeAware(['8.0' => 'string|null'], default: '')] $locale
    ): string|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get the amount of time to be added to local standard time to get local wall clock time
     * @link https://secure.php.net/manual/en/intltimezone.getequivalentid.php
     * @return int
     */
    #[Pure]
    #[TentativeType]
    public function getDSTSavings(): int {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get an ID in the equivalency group that includes the given ID
     * @link https://secure.php.net/manual/en/intltimezone.getequivalentid.php
     * @param string $timezoneId
     * @param int $offset
     * @return string|false the time zone ID or <b>FALSE</b> on failure
     */
    #[TentativeType]
    public static function getEquivalentID(
        #[TypeAware(['8.0' => 'string'], default: '')] $timezoneId,
        #[TypeAware(['8.0' => 'int'], default: '')] $offset
    ): string|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get last error code on the object
     * @link https://secure.php.net/manual/en/intltimezone.geterrorcode.php
     * @return int
     */
    #[Pure]
    #[TentativeType]
    public function getErrorCode(): int|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get last error message on the object
     * @link https://secure.php.net/manual/en/intltimezone.geterrormessage.php
     * @return string|false
     */
    #[Pure]
    #[TentativeType]
    public function getErrorMessage(): string|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Create GMT (UTC) timezone
     * @link https://secure.php.net/manual/en/intltimezone.getgmt.php
     * @return IntlTimeZone
     */
    #[TentativeType]
    public static function getGMT(): IntlTimeZone {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get timezone ID
     * @return string
     */
    #[Pure]
    #[TentativeType]
    public function getID(): string|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get the time zone raw and GMT offset for the given moment in time
     * @link https://secure.php.net/manual/en/intltimezone.getoffset.php
     * @param float $timestamp
     *   moment in time for which to return offsets, in units of milliseconds from
     *   January 1, 1970 0:00 GMT, either GMT time or local wall time, depending on
     *   `local'.
     * @param bool $local
     *   if true, `date' is local wall time; otherwise it is in GMT time.
     * @param int &$rawOffset
     *   output parameter to receive the raw offset, that is, the offset not
     *   including DST adjustments
     * @param int &$dstOffset
     *   output parameter to receive the DST offset, that is, the offset to be added
     *   to `rawOffset' to obtain the total offset between local and GMT time. If
     *   DST is not in effect, this value is zero; otherwise it is a positive value,
     *   typically one hour.
     * @return bool boolean indication of success
     */
    #[TentativeType]
    public function getOffset(
        #[TypeAware(['8.0' => 'float'], default: '')] $timestamp,
        #[TypeAware(['8.0' => 'bool'], default: '')] $local,
        &$rawOffset,
        &$dstOffset
    ): bool {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get the raw GMT offset (before taking daylight savings time into account
     * @link https://secure.php.net/manual/en/intltimezone.getrawoffset.php
     * @return int
     */
    #[Pure]
    #[TentativeType]
    public function getRawOffset(): int {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Get the region code associated with the given system time zone ID
     * @link https://secure.php.net/manual/en/intltimezone.getregion.php
     * @param string $timezoneId
     * @return string|false region or <b>FALSE</b> on failure
     */
    #[TentativeType]
    public static function getRegion(#[TypeAware(['8.0' => 'string'], default: '')] $timezoneId): string|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Get the timezone data version currently used by ICU
     * @link https://secure.php.net/manual/en/intltimezone.gettzdataversion.php
     * @return string
     */
    #[TentativeType]
    public static function getTZDataVersion(): string|false {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Get the "unknown" time zone
     * @link https://secure.php.net/manual/en/intltimezone.getunknown.php
     * @return IntlTimeZone
     */
    #[TentativeType]
    public static function getUnknown(): IntlTimeZone {}

    /**
     * (PHP 7 &gt;=7.1.0)<br/>
     * Translates a system timezone (e.g. "America/Los_Angeles") into a Windows
     * timezone (e.g. "Pacific Standard Time").
     * @link https://secure.php.net/manual/en/intltimezone.getwindowsid.php
     * @param string $timezoneId
     * @return string|false the Windows timezone or <b>FALSE</b> on failure
     * @since 7.1
     */
    #[TentativeType]
    public static function getWindowsID(string $timezoneId): string|false {}

    /**
     * @link https://www.php.net/manual/en/intltimezone.getidforwindowsid.php
     * @param string $timezoneId
     * @param string|null $region
     * @return string|false the Windows timezone or <b>FALSE</b> on failure
     * @since 7.1
     */
    #[TentativeType]
    public static function getIDForWindowsID(string $timezoneId, ?string $region = null): string|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Check if this zone has the same rules and offset as another zone
     * @link https://secure.php.net/manual/en/intltimezone.hassamerules.php
     * @param IntlTimeZone $other
     * @return bool
     */
    #[Pure]
    #[TentativeType]
    public function hasSameRules(IntlTimeZone $other): bool {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Convert to DateTimeZone object
     * @link https://secure.php.net/manual/en/intltimezone.todatetimezone.php
     * @return DateTimeZone|false the DateTimeZone object or <b>FALSE</b> on failure
     */
    #[Pure]
    #[TentativeType]
    public function toDateTimeZone(): DateTimeZone|false {}

    /**
     * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
     * Check if this time zone uses daylight savings time
     * @link https://secure.php.net/manual/en/intltimezone.usedaylighttime.php
     * @return bool
     */
    #[TentativeType]
    public function useDaylightTime(): bool {}
}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Create a collator
 * @link https://php.net/manual/en/collator.create.php
 * @param string $locale <p>
 * The locale containing the required collation rules. Special values for
 * locales can be passed in - if null is passed for the locale, the
 * default locale collation rules will be used. If empty string ("") or
 * "root" are passed, UCA rules will be used.
 * </p>
 * @return Collator|null Return new instance of <b>Collator</b> object, or <b>NULL</b>
 * on error.
 */
#[Pure]
function collator_create(string $locale): ?Collator {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Compare two Unicode strings
 * @link https://php.net/manual/en/collator.compare.php
 * @param Collator $object
 * @param string $string1 <p>
 * The first string to compare.
 * </p>
 * @param string $string2 <p>
 * The second string to compare.
 * </p>
 * @return int|false Return comparison result:</p>
 * <p>
 * <p>
 * 1 if <i>string1</i> is greater than
 * <i>string2</i> ;
 * </p>
 * <p>
 * 0 if <i>string1</i> is equal to
 * <i>string2</i>;
 * </p>
 * <p>
 * -1 if <i>string1</i> is less than
 * <i>string2</i> .
 * </p>
 * On error
 * boolean
 * <b>FALSE</b>
 * is returned.
 */
#[Pure]
function collator_compare(Collator $object, string $string1, string $string2): int|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get collation attribute value
 * @link https://php.net/manual/en/collator.getattribute.php
 * @param Collator $object
 * @param int $attribute <p>
 * Attribute to get value for.
 * </p>
 * @return int|false Attribute value, or boolean <b>FALSE</b> on error.
 */
#[Pure]
function collator_get_attribute(Collator $object, int $attribute): int|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Set collation attribute
 * @link https://php.net/manual/en/collator.setattribute.php
 * @param Collator $object
 * @param int $attribute <p>Attribute.</p>
 * @param int $value <p>
 * Attribute value.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function collator_set_attribute(Collator $object, int $attribute, int $value): bool {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get current collation strength
 * @link https://php.net/manual/en/collator.getstrength.php
 * @param Collator $object
 * @return int|false current collation strength, or boolean <b>FALSE</b> on error.
 */
#[Pure]
function collator_get_strength(Collator $object): int {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Set collation strength
 * @link https://php.net/manual/en/collator.setstrength.php
 * @param Collator $object
 * @param int $strength <p>Strength to set.</p>
 * <p>
 * Possible values are:
 * <b>Collator::PRIMARY</b>
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function collator_set_strength(Collator $object, int $strength): bool {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Sort array using specified collator
 * @link https://php.net/manual/en/collator.sort.php
 * @param Collator $object
 * @param string[] &$array <p>
 * Array of strings to sort.
 * </p>
 * @param int $flags <p>
 * Optional sorting type, one of the following:
 * </p>
 * <p>
 * <b>Collator::SORT_REGULAR</b>
 * - compare items normally (don't change types)
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function collator_sort(Collator $object, array &$array, int $flags = 0): bool {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Sort array using specified collator and sort keys
 * @link https://php.net/manual/en/collator.sortwithsortkeys.php
 * @param Collator $object
 * @param string[] &$array <p>Array of strings to sort</p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function collator_sort_with_sort_keys(
    Collator $object,
    array &$array,
    #[ElementAvailable(from: '5.3', to: '5.6')] $sort_flags = []
): bool {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Sort array maintaining index association
 * @link https://php.net/manual/en/collator.asort.php
 * @param Collator $object
 * @param string[] &$array <p>Array of strings to sort.</p>
 * @param int $flags <p>
 * Optional sorting type, one of the following:
 * <b>Collator::SORT_REGULAR</b>
 * - compare items normally (don't change types)
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function collator_asort(Collator $object, array &$array, int $flags = 0): bool {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get the locale name of the collator
 * @link https://php.net/manual/en/collator.getlocale.php
 * @param Collator $object
 * @param int $type <p>
 * You can choose between valid and actual locale (
 * <b>Locale::VALID_LOCALE</b> and
 * <b>Locale::ACTUAL_LOCALE</b>,
 * respectively). The default is the actual locale.
 * </p>
 * @return string|false Real locale name from which the collation data comes. If the collator was
 * instantiated from rules or an error occurred, returns
 * boolean <b>FALSE</b>.
 */
#[Pure]
function collator_get_locale(Collator $object, int $type): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get collator's last error code
 * @link https://php.net/manual/en/collator.geterrorcode.php
 * @param Collator $object
 * @return int|false Error code returned by the last Collator API function call.
 */
#[Pure(true)]
function collator_get_error_code(Collator $object): int|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get text for collator's last error code
 * @link https://php.net/manual/en/collator.geterrormessage.php
 * @param Collator $object
 * @return string|false Description of an error occurred in the last Collator API function call.
 */
#[Pure]
function collator_get_error_message(Collator $object): string|false {}

/**
 * (PHP 5 &gt;= 5.3.2, PHP 7, PECL intl &gt;= 1.0.3)<br/>
 * Get sorting key for a string
 * @link https://php.net/manual/en/collator.getsortkey.php
 * @param Collator $object
 * @param string $string <p>
 * The string to produce the key from.
 * </p>
 * @return string|false the collation key for the string. Collation keys can be compared directly instead of strings.
 */
#[Pure]
function collator_get_sort_key(
    Collator $object,
    string $string,
    #[ElementAvailable(from: '5.3', to: '5.6')] $arg3
): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Create a number formatter
 * @link https://php.net/manual/en/numberformatter.create.php
 * @param string $locale <p>
 * Locale in which the number would be formatted (locale name, e.g. en_CA).
 * </p>
 * @param int $style <p>
 * Style of the formatting, one of the
 * format style constants. If
 * <b>NumberFormatter::PATTERN_DECIMAL</b>
 * or <b>NumberFormatter::PATTERN_RULEBASED</b>
 * is passed then the number format is opened using the given pattern,
 * which must conform to the syntax described in
 * ICU DecimalFormat
 * documentation or
 * ICU RuleBasedNumberFormat
 * documentation, respectively.
 * </p>
 * @param string|null $pattern [optional] <p>
 * Pattern string if the chosen style requires a pattern.
 * </p>
 * @return NumberFormatter|false|null <b>NumberFormatter</b> object or <b>FALSE</b> on error.
 */
#[Pure]
function numfmt_create(string $locale, int $style, #[TypeAware(['8.0' => 'string|null'], default: 'string')] $pattern = null): ?NumberFormatter {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Format a number
 * @link https://php.net/manual/en/numberformatter.format.php
 * @param NumberFormatter $formatter
 * @param int|float $num <p>
 * The value to format. Can be integer or float,
 * other values will be converted to a numeric value.
 * </p>
 * @param int $type <p>
 * The
 * formatting type to use.
 * </p>
 * @return string|false the string containing formatted value, or <b>FALSE</b> on error.
 */
#[Pure]
function numfmt_format(NumberFormatter $formatter, int|float $num, int $type = 0): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Parse a number
 * @link https://php.net/manual/en/numberformatter.parse.php
 * @param NumberFormatter $formatter
 * @param string $string
 * @param int $type [optional] <p>
 * The
 * formatting type to use. By default,
 * <b>NumberFormatter::TYPE_DOUBLE</b> is used.
 * </p>
 * @param int &$offset [optional] <p>
 * Offset in the string at which to begin parsing. On return, this value
 * will hold the offset at which parsing ended.
 * </p>
 * @return int|float|false The value of the parsed number or <b>FALSE</b> on error.
 */
#[Pure]
function numfmt_parse(NumberFormatter $formatter, string $string, int $type = NumberFormatter::TYPE_DOUBLE, &$offset = null): int|float|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Format a currency value
 * @link https://php.net/manual/en/numberformatter.formatcurrency.php
 * @param NumberFormatter $formatter
 * @param float $amount <p>
 * The numeric currency value.
 * </p>
 * @param string $currency <p>
 * The 3-letter ISO 4217 currency code indicating the currency to use.
 * </p>
 * @return string|false String representing the formatted currency value.
 */
#[Pure]
function numfmt_format_currency(NumberFormatter $formatter, float $amount, string $currency): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Parse a currency number
 * @link https://php.net/manual/en/numberformatter.parsecurrency.php
 * @param NumberFormatter $formatter
 * @param string $string
 * @param string &$currency <p>
 * Parameter to receive the currency name (3-letter ISO 4217 currency
 * code).
 * </p>
 * @param int &$offset [optional] <p>
 * Offset in the string at which to begin parsing. On return, this value
 * will hold the offset at which parsing ended.
 * </p>
 * @return float|false The parsed numeric value or <b>FALSE</b> on error.
 */
function numfmt_parse_currency(NumberFormatter $formatter, string $string, &$currency, &$offset = null): float|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Set an attribute
 * @link https://php.net/manual/en/numberformatter.setattribute.php
 * @param NumberFormatter $formatter
 * @param int $attribute <p>
 * Attribute specifier - one of the
 * numeric attribute constants.
 * </p>
 * @param int|float $value <p>
 * The attribute value.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function numfmt_set_attribute(NumberFormatter $formatter, int $attribute, int|float $value): bool {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get an attribute
 * @link https://php.net/manual/en/numberformatter.getattribute.php
 * @param NumberFormatter $formatter
 * @param int $attribute <p>
 * Attribute specifier - one of the
 * numeric attribute constants.
 * </p>
 * @return int|float|false Return attribute value on success, or <b>FALSE</b> on error.
 */
#[Pure]
function numfmt_get_attribute(NumberFormatter $formatter, int $attribute): int|float|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Set a text attribute
 * @link https://php.net/manual/en/numberformatter.settextattribute.php
 * @param NumberFormatter $formatter
 * @param int $attribute <p>
 * Attribute specifier - one of the
 * text attribute
 * constants.
 * </p>
 * @param string $value <p>
 * Text for the attribute value.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function numfmt_set_text_attribute(NumberFormatter $formatter, int $attribute, string $value): bool {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get a text attribute
 * @link https://php.net/manual/en/numberformatter.gettextattribute.php
 * @param NumberFormatter $formatter
 * @param int $attribute <p>
 * Attribute specifier - one of the
 * text attribute constants.
 * </p>
 * @return string|false Return attribute value on success, or <b>FALSE</b> on error.
 */
#[Pure]
function numfmt_get_text_attribute(NumberFormatter $formatter, int $attribute): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Set a symbol value
 * @link https://php.net/manual/en/numberformatter.setsymbol.php
 * @param NumberFormatter $formatter
 * @param int $symbol <p>
 * Symbol specifier, one of the
 * format symbol constants.
 * </p>
 * @param string $value <p>
 * Text for the symbol.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function numfmt_set_symbol(NumberFormatter $formatter, int $symbol, string $value): bool {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get a symbol value
 * @link https://php.net/manual/en/numberformatter.getsymbol.php
 * @param NumberFormatter $formatter
 * @param int $symbol <p>
 * Symbol specifier, one of the
 * format symbol constants.
 * </p>
 * @return string|false The symbol string or <b>FALSE</b> on error.
 */
#[Pure]
function numfmt_get_symbol(NumberFormatter $formatter, int $symbol): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Set formatter pattern
 * @link https://php.net/manual/en/numberformatter.setpattern.php
 * @param NumberFormatter $formatter
 * @param string $pattern <p>
 * Pattern in syntax described in
 * ICU DecimalFormat
 * documentation.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function numfmt_set_pattern(NumberFormatter $formatter, string $pattern): bool {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get formatter pattern
 * @link https://php.net/manual/en/numberformatter.getpattern.php
 * @param NumberFormatter $formatter
 * @return string|false Pattern string that is used by the formatter, or <b>FALSE</b> if an error happens.
 */
#[Pure]
function numfmt_get_pattern(NumberFormatter $formatter): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get formatter locale
 * @link https://php.net/manual/en/numberformatter.getlocale.php
 * @param NumberFormatter $formatter
 * @param int $type <p>
 * You can choose between valid and actual locale (
 * <b>Locale::VALID_LOCALE</b>,
 * <b>Locale::ACTUAL_LOCALE</b>,
 * respectively). The default is the actual locale.
 * </p>
 * @return string|false The locale name used to create the formatter.
 */
#[Pure]
function numfmt_get_locale(NumberFormatter $formatter, int $type = 0): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get formatter's last error code.
 * @link https://php.net/manual/en/numberformatter.geterrorcode.php
 * @param NumberFormatter $formatter
 * @return int error code from last formatter call.
 */
#[Pure(true)]
function numfmt_get_error_code(NumberFormatter $formatter): int {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get formatter's last error message.
 * @link https://php.net/manual/en/numberformatter.geterrormessage.php
 * @param NumberFormatter $formatter
 * @return string error message from last formatter call.
 */
#[Pure(true)]
function numfmt_get_error_message(NumberFormatter $formatter): string {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Normalizes the input provided and returns the normalized string
 * @link https://php.net/manual/en/normalizer.normalize.php
 * @param string $string <p>The input string to normalize</p>
 * @param int $form [optional] <p>One of the normalization forms.</p>
 * @return string|false The normalized string or <b>FALSE</b> if an error occurred.
 */
#[Pure]
function normalizer_normalize(string $string, int $form = Normalizer::FORM_C): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Checks if the provided string is already in the specified normalization
 * form.
 * @link https://php.net/manual/en/normalizer.isnormalized.php
 * @param string $string <p>The input string to normalize</p>
 * @param int $form [optional] <p>
 * One of the normalization forms.
 * </p>
 * @return bool <b>TRUE</b> if normalized, <b>FALSE</b> otherwise or if there an error
 */
#[Pure]
function normalizer_is_normalized(string $string, int $form = Normalizer::FORM_C): bool {}

/**
 * Gets the default locale value from the intl global 'default_locale'
 * @link https://php.net/manual/en/function.locale-get-default.php
 * @return string a string with the current Locale.
 */
#[Pure]
function locale_get_default(): string {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Set the default runtime Locale
 * @link https://php.net/manual/en/function.locale-set-default.php
 * @param string $locale <p>
 * The new Locale name. A comprehensive list of the supported locales is
 * available at .
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function locale_set_default(string $locale): bool {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Gets the primary language for the input locale
 * @link https://php.net/manual/en/locale.getprimarylanguage.php
 * @param string $locale <p>
 * The locale to extract the primary language code from
 * </p>
 * @return string|null The language code associated with the language or <b>NULL</b> in case of error.
 */
#[Pure]
function locale_get_primary_language(string $locale): ?string {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Gets the script for the input locale
 * @link https://php.net/manual/en/locale.getscript.php
 * @param string $locale <p>
 * The locale to extract the script code from
 * </p>
 * @return string|null The script subtag for the locale or <b>NULL</b> if not present
 */
#[Pure]
function locale_get_script(string $locale): ?string {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Gets the region for the input locale
 * @link https://php.net/manual/en/locale.getregion.php
 * @param string $locale <p>
 * The locale to extract the region code from
 * </p>
 * @return string|null The region subtag for the locale or <b>NULL</b> if not present
 */
#[Pure]
function locale_get_region(string $locale): ?string {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Gets the keywords for the input locale
 * @link https://php.net/manual/en/locale.getkeywords.php
 * @param string $locale <p>
 * The locale to extract the keywords from
 * </p>
 * @return array|false|null Associative array containing the keyword-value pairs for this locale
 */
#[Pure]
function locale_get_keywords(string $locale): array|false|null {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Returns an appropriately localized display name for script of the input locale
 * @link https://php.net/manual/en/locale.getdisplayscript.php
 * @param string $locale <p>
 * The locale to return a display script for
 * </p>
 * @param string|null $displayLocale <p>
 * Optional format locale to use to display the script name
 * </p>
 * @return string|false Display name of the script for the $locale in the format appropriate for
 * $in_locale.
 */
#[Pure]
function locale_get_display_script(
    string $locale,
    #[ElementAvailable(from: '5.3', to: '5.6')] ?string $displayLocale,
    #[ElementAvailable(from: '7.0')] ?string $displayLocale = null
): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Returns an appropriately localized display name for region of the input locale
 * @link https://php.net/manual/en/locale.getdisplayregion.php
 * @param string $locale <p>
 * The locale to return a display region for.
 * </p>
 * @param string|null $displayLocale <p>
 * Optional format locale to use to display the region name
 * </p>
 * @return string|false display name of the region for the $locale in the format appropriate for
 * $in_locale.
 */
#[Pure]
function locale_get_display_region(
    string $locale,
    #[ElementAvailable(from: '5.3', to: '5.6')] ?string $displayLocale,
    #[ElementAvailable(from: '7.0')] ?string $displayLocale = null
): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Returns an appropriately localized display name for the input locale
 * @link https://php.net/manual/en/locale.getdisplayname.php
 * @param string $locale <p>
 * The locale to return a display name for.
 * </p>
 * @param string|null $displayLocale <p>optional format locale</p>
 * @return string|false Display name of the locale in the format appropriate for $in_locale.
 */
#[Pure]
function locale_get_display_name(
    string $locale,
    #[ElementAvailable(from: '5.3', to: '5.6')] ?string $displayLocale,
    #[ElementAvailable(from: '7.0')] ?string $displayLocale = null
): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Returns an appropriately localized display name for language of the inputlocale
 * @link https://php.net/manual/en/locale.getdisplaylanguage.php
 * @param string $locale <p>
 * The locale to return a display language for
 * </p>
 * @param string|null $displayLocale <p>
 * Optional format locale to use to display the language name
 * </p>
 * @return string|false display name of the language for the $locale in the format appropriate for
 * $in_locale.
 */
#[Pure]
function locale_get_display_language(
    string $locale,
    #[ElementAvailable(from: '5.3', to: '5.6')] ?string $displayLocale,
    #[ElementAvailable(from: '7.0')] ?string $displayLocale = null
): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Returns an appropriately localized display name for variants of the input locale
 * @link https://php.net/manual/en/locale.getdisplayvariant.php
 * @param string $locale <p>
 * The locale to return a display variant for
 * </p>
 * @param string|null $displayLocale <p>
 * Optional format locale to use to display the variant name
 * </p>
 * @return string|false Display name of the variant for the $locale in the format appropriate for
 * $in_locale.
 */
#[Pure]
function locale_get_display_variant(
    string $locale,
    #[ElementAvailable(from: '5.3', to: '5.6')] ?string $displayLocale,
    #[ElementAvailable(from: '7.0')] ?string $displayLocale = null
): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Returns a correctly ordered and delimited locale ID
 * @link https://php.net/manual/en/locale.composelocale.php
 * @param string[] $subtags <p>
 * an array containing a list of key-value pairs, where the keys identify
 * the particular locale ID subtags, and the values are the associated
 * subtag values.
 * <p>
 * The 'variant' and 'private' subtags can take maximum 15 values
 * whereas 'extlang' can take maximum 3 values.e.g. Variants are allowed
 * with the suffix ranging from 0-14. Hence the keys for the input array
 * can be variant0, variant1, ...,variant14. In the returned locale id,
 * the subtag is ordered by suffix resulting in variant0 followed by
 * variant1 followed by variant2 and so on.
 * </p>
 * <p>
 * The 'variant', 'private' and 'extlang' multiple values can be specified both
 * as array under specific key (e.g. 'variant') and as multiple numbered keys
 * (e.g. 'variant0', 'variant1', etc.).
 * </p>
 * </p>
 * @return string|false The corresponding locale identifier.
 */
#[Pure]
function locale_compose(array $subtags): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Returns a key-value array of locale ID subtag elements.
 * @link https://php.net/manual/en/locale.parselocale.php
 * @param string $locale <p>
 * The locale to extract the subtag array from. Note: The 'variant' and
 * 'private' subtags can take maximum 15 values whereas 'extlang' can take
 * maximum 3 values.
 * </p>
 * @return string[]|null an array containing a list of key-value pairs, where the keys
 * identify the particular locale ID subtags, and the values are the
 * associated subtag values. The array will be ordered as the locale id
 * subtags e.g. in the locale id if variants are '-varX-varY-varZ' then the
 * returned array will have variant0=&gt;varX , variant1=&gt;varY ,
 * variant2=&gt;varZ
 */
#[Pure]
function locale_parse(string $locale): ?array {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Gets the variants for the input locale
 * @link https://php.net/manual/en/locale.getallvariants.php
 * @param string $locale <p>
 * The locale to extract the variants from
 * </p>
 * @return array|null The array containing the list of all variants subtag for the locale
 * or <b>NULL</b> if not present
 */
#[Pure]
function locale_get_all_variants(string $locale): ?array {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Checks if a language tag filter matches with locale
 * @link https://php.net/manual/en/locale.filtermatches.php
 * @param string $languageTag <p>
 * The language tag to check
 * </p>
 * @param string $locale <p>
 * The language range to check against
 * </p>
 * @param bool $canonicalize <p>
 * If true, the arguments will be converted to canonical form before
 * matching.
 * </p>
 * @return bool|null <b>TRUE</b> if $locale matches $langtag <b>FALSE</b> otherwise.
 */
#[Pure]
function locale_filter_matches(
    string $languageTag,
    string $locale,
    #[ElementAvailable(from: '5.3', to: '5.6')] bool $canonicalize,
    #[ElementAvailable(from: '7.0')] bool $canonicalize = false
): ?bool {}

/**
 * Canonicalize the locale string
 * @param string $locale
 *
 * @return null|string
 */
#[Pure]
function locale_canonicalize(string $locale): ?string {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Searches the language tag list for the best match to the language
 * @link https://php.net/manual/en/locale.lookup.php
 * @param string[] $languageTag <p>
 * An array containing a list of language tags to compare to
 * <i>locale</i>. Maximum 100 items allowed.
 * </p>
 * @param string $locale <p>
 * The locale to use as the language range when matching.
 * </p>
 * @param bool $canonicalize <p>
 * If true, the arguments will be converted to canonical form before
 * matching.
 * </p>
 * @param string|null $defaultLocale <p>
 * The locale to use if no match is found.
 * </p>
 * @return string|null The closest matching language tag or default value.
 */
#[Pure]
function locale_lookup(
    array $languageTag,
    string $locale,
    #[ElementAvailable(from: '5.3', to: '5.6')] bool $canonicalize,
    #[ElementAvailable(from: '5.3', to: '5.6')] ?string $defaultLocale,
    #[ElementAvailable(from: '7.0')] bool $canonicalize = false,
    #[ElementAvailable(from: '7.0')] ?string $defaultLocale = null,
): ?string {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Tries to find out best available locale based on HTTP "Accept-Language" header
 * @link https://php.net/manual/en/locale.acceptfromhttp.php
 * @param string $header <p>
 * The string containing the "Accept-Language" header according to format in RFC 2616.
 * </p>
 * @return string|false The corresponding locale identifier.
 */
#[Pure]
function locale_accept_from_http(string $header): string|false {}

/**
 * Constructs a new message formatter
 * @param string $locale
 * @param string $pattern
 * @return MessageFormatter|null
 */
#[Pure]
function msgfmt_create(string $locale, string $pattern): ?MessageFormatter {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Format the message
 * @link https://php.net/manual/en/messageformatter.format.php
 * @param MessageFormatter $formatter
 * @param array $values <p>
 * Arguments to insert into the format string
 * </p>
 * @return string|false The formatted string, or <b>FALSE</b> if an error occurred
 */
#[Pure]
function msgfmt_format(MessageFormatter $formatter, array $values): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Quick format message
 * @link https://php.net/manual/en/messageformatter.formatmessage.php
 * @param string $locale <p>
 * The locale to use for formatting locale-dependent parts
 * </p>
 * @param string $pattern <p>
 * The pattern string to insert things into.
 * The pattern uses an 'apostrophe-friendly' syntax; it is run through
 * umsg_autoQuoteApostrophe
 * before being interpreted.
 * </p>
 * @param array $values <p>
 * The array of values to insert into the format string
 * </p>
 * @return string|false The formatted pattern string or <b>FALSE</b> if an error occurred
 */
#[Pure]
function msgfmt_format_message(string $locale, string $pattern, array $values): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Parse input string according to pattern
 * @link https://php.net/manual/en/messageformatter.parse.php
 * @param MessageFormatter $formatter
 * @param string $string <p>
 * The string to parse
 * </p>
 * @return array|false An array containing the items extracted, or <b>FALSE</b> on error
 */
#[Pure]
function msgfmt_parse(MessageFormatter $formatter, string $string): array|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Quick parse input string
 * @link https://php.net/manual/en/messageformatter.parsemessage.php
 * @param string $locale <p>
 * The locale to use for parsing locale-dependent parts
 * </p>
 * @param string $pattern <p>
 * The pattern with which to parse the <i>value</i>.
 * </p>
 * @param string $message <p>
 * The string to parse, conforming to the <i>pattern</i>.
 * </p>
 * @return array|false An array containing items extracted, or <b>FALSE</b> on error
 */
#[Pure]
function msgfmt_parse_message(string $locale, string $pattern, string $message): array|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Set the pattern used by the formatter
 * @link https://php.net/manual/en/messageformatter.setpattern.php
 * @param MessageFormatter $formatter
 * @param string $pattern <p>
 * The pattern string to use in this message formatter.
 * The pattern uses an 'apostrophe-friendly' syntax; it is run through
 * umsg_autoQuoteApostrophe
 * before being interpreted.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function msgfmt_set_pattern(MessageFormatter $formatter, string $pattern): bool {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get the pattern used by the formatter
 * @link https://php.net/manual/en/messageformatter.getpattern.php
 * @param MessageFormatter $formatter
 * @return string|false The pattern string for this message formatter
 */
#[Pure]
function msgfmt_get_pattern(MessageFormatter $formatter): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get the locale for which the formatter was created.
 * @link https://php.net/manual/en/messageformatter.getlocale.php
 * @param MessageFormatter $formatter
 * @return string The locale name
 */
#[Pure]
function msgfmt_get_locale(MessageFormatter $formatter): string {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get the error code from last operation
 * @link https://php.net/manual/en/messageformatter.geterrorcode.php
 * @param MessageFormatter $formatter
 * @return int The error code, one of UErrorCode values. Initial value is U_ZERO_ERROR.
 */
#[Pure(true)]
function msgfmt_get_error_code(MessageFormatter $formatter): int {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get the error text from the last operation
 * @link https://php.net/manual/en/messageformatter.geterrormessage.php
 * @param MessageFormatter $formatter
 * @return string Description of the last error.
 */
#[Pure(true)]
function msgfmt_get_error_message(MessageFormatter $formatter): string {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Create a date formatter
 * @link https://php.net/manual/en/intldateformatter.create.php
 * @param string|null $locale <p>
 * Locale to use when formatting or parsing.
 * </p>
 * @param int $dateType <p>
 * Date type to use (<b>none</b>,
 * <b>short</b>, <b>medium</b>,
 * <b>long</b>, <b>full</b>).
 * This is one of the
 * IntlDateFormatter constants.
 * </p>
 * @param int $timeType <p>
 * Time type to use (<b>none</b>,
 * <b>short</b>, <b>medium</b>,
 * <b>long</b>, <b>full</b>).
 * This is one of the
 * IntlDateFormatter constants.
 * </p>
 * @param string|null $timezone [optional] <p>
 * Time zone ID, default is system default.
 * </p>
 * @param IntlCalendar|int|null $calendar [optional] <p>
 * Calendar to use for formatting or parsing; default is Gregorian.
 * This is one of the
 * IntlDateFormatter calendar constants.
 * </p>
 * @param string|null $pattern [optional] <p>
 * Optional pattern to use when formatting or parsing.
 * Possible patterns are documented at http://userguide.icu-project.org/formatparse/datetime.
 * </p>
 * @return IntlDateFormatter|null
 */
#[Pure]
function datefmt_create(
    ?string $locale,
    #[ElementAvailable(from: '5.3', to: '8.0')] int $dateType,
    #[ElementAvailable(from: '8.1')] int $dateType = 0,
    #[ElementAvailable(from: '5.3', to: '8.0')] int $timeType,
    #[ElementAvailable(from: '8.1')] int $timeType = 0,
    $timezone = null,
    IntlCalendar|int|null $calendar = null,
    #[TypeAware(['8.0' => 'string|null'], default: 'string')] $pattern = null
): ?IntlDateFormatter {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get the datetype used for the IntlDateFormatter
 * @link https://php.net/manual/en/intldateformatter.getdatetype.php
 * @param IntlDateFormatter $formatter
 * @return int|false The current date type value of the formatter.
 */
#[Pure]
function datefmt_get_datetype(IntlDateFormatter $formatter): int|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get the timetype used for the IntlDateFormatter
 * @link https://php.net/manual/en/intldateformatter.gettimetype.php
 * @param IntlDateFormatter $formatter
 * @return int|false The current date type value of the formatter.
 */
#[Pure]
function datefmt_get_timetype(IntlDateFormatter $formatter): int|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get the calendar type used for the IntlDateFormatter
 * @link https://php.net/manual/en/intldateformatter.getcalendar.php
 * @param IntlDateFormatter $formatter
 * @return int|false The calendar being used by the formatter.
 */
#[Pure]
function datefmt_get_calendar(IntlDateFormatter $formatter): int|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * sets the calendar used to the appropriate calendar, which must be
 * @link https://php.net/manual/en/intldateformatter.setcalendar.php
 * @param IntlDateFormatter $formatter $mf
 * @param IntlCalendar|int|null $calendar <p>
 * The calendar to use.
 * Default is <b>IntlDateFormatter::GREGORIAN</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function datefmt_set_calendar(IntlDateFormatter $formatter, IntlCalendar|int|null $calendar): bool {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get the locale used by formatter
 * @link https://php.net/manual/en/intldateformatter.getlocale.php
 * @param IntlDateFormatter $formatter
 * @param int $type [optional]
 * @return string|false the locale of this formatter or 'false' if error
 */
#[Pure]
function datefmt_get_locale(
    IntlDateFormatter $formatter,
    #[ElementAvailable(from: '8.0')] int $type = ULOC_ACTUAL_LOCALE
): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get the timezone-id used for the IntlDateFormatter
 * @link https://php.net/manual/en/intldateformatter.gettimezoneid.php
 * @param IntlDateFormatter $formatter
 * @return string|false ID string for the time zone used by this formatter.
 */
#[Pure]
function datefmt_get_timezone_id(IntlDateFormatter $formatter): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 3.0.0)<br/>
 * Get copy of formatter's calendar object
 * @link https://secure.php.net/manual/en/intldateformatter.getcalendarobject.php
 * @param IntlDateFormatter $formatter
 * @return IntlCalendar|false|null A copy of the internal calendar object used by this formatter.
 */
#[Pure]
function datefmt_get_calendar_object(IntlDateFormatter $formatter): IntlCalendar|false|null {}

/**
 * (PHP 5 &gt;= 5.5.0, PECL intl &gt;= 3.0.0)<br/>
 *  Get formatter's timezone
 * @link https://secure.php.net/manual/en/intldateformatter.gettimezone.php
 * @param IntlDateFormatter $formatter
 * @return IntlTimeZone|false The associated IntlTimeZone object or FALSE on failure.
 */
#[Pure]
function datefmt_get_timezone(IntlDateFormatter $formatter): IntlTimeZone|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Sets the time zone to use
 * @link https://php.net/manual/en/intldateformatter.settimezoneid.php
 * @param MessageFormatter $mf
 * @param string $zone <p>
 * The time zone ID string of the time zone to use.
 * If <b>NULL</b> or the empty string, the default time zone for the runtime is used.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * @removed 7.0
 * @see datefmt_set_timezone()
 */
#[Deprecated(replacement: "datefmt_set_timezone(%parametersList%)", since: "5.5")]
function datefmt_set_timezone_id(MessageFormatter $mf, $zone) {}

/**
 * (PHP 5 &gt;= 5.5.0, PECL intl &gt;= 3.0.0)<br/>
 * Sets formatter's timezone
 * @link https://php.net/manual/en/intldateformatter.settimezone.php
 * @param IntlDateFormatter $formatter
 * @param IntlTimeZone|DateTimeZone|string|null $timezone <p>
 * The timezone to use for this formatter. This can be specified in the
 * following forms:
 * <ul>
 * <li>
 * <p>
 * <b>NULL</b>, in which case the default timezone will be used, as specified in
 * the ini setting {@link "https://secure.php.net/manual/en/datetime.configuration.php#ini.date.timezone" date.timezone} or
 * through the function  {@link "https://secure.php.net/manual/en/function.date-default-timezone-set.php" date_default_timezone_set()} and as
 * returned by {@link "https://secure.php.net/manual/en/function.date-default-timezone-get.php" date_default_timezone_get()}.
 * </p>
 * </li>
 * <li>
 * <p>
 * An {@link "https://secure.php.net/manual/en/class.intltimezone.php" IntlTimeZone}, which will be used directly.
 * </p>
 * </li>
 * <li>
 * <p>
 * A {@link "https://secure.php.net/manual/en/class.datetimezone.php" DateTimeZone}. Its identifier will be extracted
 * and an ICU timezone object will be created; the timezone will be backed
 * by ICU's database, not PHP's.
 * </p>
 * </li>
 * <li>
 * <p>
 * A {@link "https://secure.php.net/manual/en/language.types.string.php" string}, which should be a valid ICU timezone identifier.
 * See <b>IntlTimeZone::createTimeZoneIDEnumeration()</b>. Raw offsets such as <em>"GMT+08:30"</em> are also accepted.
 * </p>
 * </li>
 * </ul>
 * </p>
 * @return bool|null <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function datefmt_set_timezone(IntlDateFormatter $formatter, $timezone): ?bool {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get the pattern used for the IntlDateFormatter
 * @link https://php.net/manual/en/intldateformatter.getpattern.php
 * @param IntlDateFormatter $formatter
 * @return string|false The pattern string being used to format/parse.
 */
#[Pure]
function datefmt_get_pattern(IntlDateFormatter $formatter): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Set the pattern used for the IntlDateFormatter
 * @link https://php.net/manual/en/intldateformatter.setpattern.php
 * @param IntlDateFormatter $formatter
 * @param string $pattern <p>
 * New pattern string to use.
 * Possible patterns are documented at http://userguide.icu-project.org/formatparse/datetime.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * Bad formatstrings are usually the cause of the failure.
 */
function datefmt_set_pattern(IntlDateFormatter $formatter, string $pattern): bool {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get the lenient used for the IntlDateFormatter
 * @link https://php.net/manual/en/intldateformatter.islenient.php
 * @param IntlDateFormatter $formatter
 * @return bool <b>TRUE</b> if parser is lenient, <b>FALSE</b> if parser is strict. By default the parser is lenient.
 */
#[Pure]
function datefmt_is_lenient(IntlDateFormatter $formatter): bool {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Set the leniency of the parser
 * @link https://php.net/manual/en/intldateformatter.setlenient.php
 * @param IntlDateFormatter $formatter
 * @param bool $lenient <p>
 * Sets whether the parser is lenient or not, default is <b>TRUE</b> (lenient).
 * </p>
 * @return void
 */
function datefmt_set_lenient(
    IntlDateFormatter $formatter,
    #[ElementAvailable(from: '8.0')] bool $lenient
): void {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Format the date/time value as a string
 * @link https://php.net/manual/en/intldateformatter.format.php
 * @param IntlDateFormatter $formatter
 * @param object|array|string|int|float $datetime <p>
 * Value to format. This may be a <b>DateTime</b> object,
 * an integer representing a Unix timestamp value (seconds
 * since epoch, UTC) or an array in the format output by
 * <b>localtime</b>.
 * </p>
 * @return string|false The formatted string or, if an error occurred, <b>FALSE</b>.
 */
#[Pure]
function datefmt_format(
    #[TypeAware(['8.0' => 'IntlDateFormatter'], default: '')] #[ElementAvailable(from: '5.3', to: '7.4')] $formatter = null,
    #[TypeAware(['8.0' => 'IntlDateFormatter'], default: '')] #[ElementAvailable(from: '8.0')] $formatter,
    #[ElementAvailable(from: '5.3', to: '7.4')] $datetime = null,
    #[ElementAvailable(from: '8.0')] $datetime
): string|false {}

/**
 * (PHP 5 &gt;= 5.5.0, PECL intl &gt;= 3.0.0)<br/>
 * Formats an object
 * @link https://secure.php.net/manual/en/intldateformatter.formatobject.php
 * @param IntlCalendar|DateTimeInterface $datetime <p>
 * An object of type IntlCalendar or DateTime. The timezone information in the object will be used.
 * </p>
 * @param array|int|string|null $format [optional] <p>
 * How to format the date/time. This can either be an {https://secure.php.net/manual/en/language.types.array.php array}  with
 * two elements (first the date style, then the time style, these being one
 * of the constants <b>IntlDateFormatter::NONE</b>,
 * <b>IntlDateFormatter::SHORT</b>,
 * <b>IntlDateFormatter::MEDIUM</b>,
 * <b>IntlDateFormatter::LONG</b>,
 * <b>IntlDateFormatter::FULL</b>), a long with
 * the value of one of these constants (in which case it will be used both
 * for the time and the date) or a {@link https://secure.php.net/manual/en/language.types.string.php} with the format
 * described in {@link http://www.icu-project.org/apiref/icu4c/classSimpleDateFormat.html#details the ICU documentation}
 * documentation. If <b>NULL</b>, the default style will be used.
 * </p>
 * @param string|null $locale [optional] <p>
 * The locale to use, or NULL to use the default one.</p>
 * @return string|false The formatted string or, if an error occurred, <b>FALSE</b>.
 */
#[Pure]
function datefmt_format_object($datetime, $format = null, ?string $locale = null): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Parse string to a timestamp value
 * @link https://php.net/manual/en/intldateformatter.parse.php
 * @param IntlDateFormatter $formatter
 * @param string $string <p>
 * string to convert to a time
 * </p>
 * @param int &$offset [optional] <p>
 * Position at which to start the parsing in $value (zero-based).
 * If no error occurs before $value is consumed, $parse_pos will contain -1
 * otherwise it will contain the position at which parsing ended (and the error occurred).
 * This variable will contain the end position if the parse fails.
 * If $parse_pos > strlen($value), the parse fails immediately.
 * </p>
 * @return int|float|false timestamp parsed value
 */
function datefmt_parse(IntlDateFormatter $formatter, string $string, &$offset = null): int|float|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Parse string to a field-based time value
 * @link https://php.net/manual/en/intldateformatter.localtime.php
 * @param IntlDateFormatter $formatter
 * @param string $string <p>
 * string to convert to a time
 * </p>
 * @param int &$offset [optional] <p>
 * Position at which to start the parsing in $value (zero-based).
 * If no error occurs before $value is consumed, $parse_pos will contain -1
 * otherwise it will contain the position at which parsing ended .
 * If $parse_pos > strlen($value), the parse fails immediately.
 * </p>
 * @return array|false Localtime compatible array of integers : contains 24 hour clock value in tm_hour field
 */
function datefmt_localtime(IntlDateFormatter $formatter, string $string, &$offset = null): array|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get the error code from last operation
 * @link https://php.net/manual/en/intldateformatter.geterrorcode.php
 * @param IntlDateFormatter $formatter
 * @return int The error code, one of UErrorCode values. Initial value is U_ZERO_ERROR.
 */
#[Pure(true)]
function datefmt_get_error_code(IntlDateFormatter $formatter): int {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get the error text from the last operation.
 * @link https://php.net/manual/en/intldateformatter.geterrormessage.php
 * @param IntlDateFormatter $formatter
 * @return string Description of the last error.
 */
#[Pure(true)]
function datefmt_get_error_message(IntlDateFormatter $formatter): string {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get string length in grapheme units
 * @link https://php.net/manual/en/function.grapheme-strlen.php
 * @param string $string <p>
 * The string being measured for length. It must be a valid UTF-8 string.
 * </p>
 * @return int|false|null The length of the string on success, and 0 if the string is empty.
 */
#[Pure]
function grapheme_strlen(string $string): int|false|null {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Find position (in grapheme units) of first occurrence of a string
 * @link https://php.net/manual/en/function.grapheme-strpos.php
 * @param string $haystack <p>
 * The string to look in. Must be valid UTF-8.
 * </p>
 * @param string $needle <p>
 * The string to look for. Must be valid UTF-8.
 * </p>
 * @param int $offset [optional] <p>
 * The optional $offset parameter allows you to specify where in $haystack to
 * start searching as an offset in grapheme units (not bytes or characters).
 * The position returned is still relative to the beginning of haystack
 * regardless of the value of $offset.
 * </p>
 * @return int|false the position as an integer. If needle is not found, strpos() will return boolean FALSE.
 */
#[Pure]
function grapheme_strpos(string $haystack, string $needle, int $offset = 0): int|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Find position (in grapheme units) of first occurrence of a case-insensitive string
 * @link https://php.net/manual/en/function.grapheme-stripos.php
 * @param string $haystack <p>
 * The string to look in. Must be valid UTF-8.
 * </p>
 * @param string $needle <p>
 * The string to look for. Must be valid UTF-8.
 * </p>
 * @param int $offset [optional] <p>
 * The optional $offset parameter allows you to specify where in haystack to
 * start searching as an offset in grapheme units (not bytes or characters).
 * The position returned is still relative to the beginning of haystack
 * regardless of the value of $offset.
 * </p>
 * @return int|false the position as an integer. If needle is not found, grapheme_stripos() will return boolean FALSE.
 */
#[Pure]
function grapheme_stripos(string $haystack, string $needle, int $offset = 0): int|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Find position (in grapheme units) of last occurrence of a string
 * @link https://php.net/manual/en/function.grapheme-strrpos.php
 * @param string $haystack <p>
 * The string to look in. Must be valid UTF-8.
 * </p>
 * @param string $needle <p>
 * The string to look for. Must be valid UTF-8.
 * </p>
 * @param int $offset [optional] <p>
 * The optional $offset parameter allows you to specify where in $haystack to
 * start searching as an offset in grapheme units (not bytes or characters).
 * The position returned is still relative to the beginning of haystack
 * regardless of the value of $offset.
 * </p>
 * @return int|false the position as an integer. If needle is not found, grapheme_strrpos() will return boolean FALSE.
 */
#[Pure]
function grapheme_strrpos(string $haystack, string $needle, int $offset = 0): int|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Find position (in grapheme units) of last occurrence of a case-insensitive string
 * @link https://php.net/manual/en/function.grapheme-strripos.php
 * @param string $haystack <p>
 * The string to look in. Must be valid UTF-8.
 * </p>
 * @param string $needle <p>
 * The string to look for. Must be valid UTF-8.
 * </p>
 * @param int $offset [optional] <p>
 * The optional $offset parameter allows you to specify where in $haystack to
 * start searching as an offset in grapheme units (not bytes or characters).
 * The position returned is still relative to the beginning of haystack
 * regardless of the value of $offset.
 * </p>
 * @return int|false the position as an integer. If needle is not found, grapheme_strripos() will return boolean FALSE.
 */
#[Pure]
function grapheme_strripos(string $haystack, string $needle, int $offset = 0): int|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Return part of a string
 * @link https://php.net/manual/en/function.grapheme-substr.php
 * @param string $string <p>
 * The input string. Must be valid UTF-8.
 * </p>
 * @param int $offset <p>
 * Start position in default grapheme units.
 * If $start is non-negative, the returned string will start at the
 * $start'th position in $string, counting from zero. If $start is negative,
 * the returned string will start at the $start'th grapheme unit from the
 * end of string.
 * </p>
 * @param int $length [optional] <p>
 * Length in grapheme units.
 * If $length is given and is positive, the string returned will contain
 * at most $length grapheme units beginning from $start (depending on the
 * length of string). If $length is given and is negative, then
 * that many grapheme units will be omitted from the end of string (after the
 * start position has been calculated when a start is negative). If $start
 * denotes a position beyond this truncation, <b>FALSE</b> will be returned.
 * </p>
 * @return string|false <p>the extracted part of $string,<br />
 * or <strong>FALSE</strong> if $length is negative and $start denotes a position beyond truncation $length,<br />
 * or also <strong>FALSE</strong> if $start denotes a position beyond $string length</p>
 */
#[Pure]
function grapheme_substr(string $string, int $offset, ?int $length = null): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Returns part of haystack string from the first occurrence of needle to the end of haystack.
 * @link https://php.net/manual/en/function.grapheme-strstr.php
 * @param string $haystack <p>
 * The input string. Must be valid UTF-8.
 * </p>
 * @param string $needle <p>
 * The string to look for. Must be valid UTF-8.
 * </p>
 * @param bool $beforeNeedle [optional] <p>
 * If <b>TRUE</b>, grapheme_strstr() returns the part of the
 * haystack before the first occurrence of the needle (excluding the needle).
 * </p>
 * @return string|false the portion of string, or FALSE if needle is not found.
 */
#[Pure]
function grapheme_strstr(string $haystack, string $needle, bool $beforeNeedle = false): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Returns part of haystack string from the first occurrence of case-insensitive needle to the end of haystack.
 * @link https://php.net/manual/en/function.grapheme-stristr.php
 * @param string $haystack <p>
 * The input string. Must be valid UTF-8.
 * </p>
 * @param string $needle <p>
 * The string to look for. Must be valid UTF-8.
 * </p>
 * @param bool $beforeNeedle [optional] <p>
 * If <b>TRUE</b>, grapheme_strstr() returns the part of the
 * haystack before the first occurrence of the needle (excluding needle).
 * </p>
 * @return string|false the portion of $haystack, or FALSE if $needle is not found.
 */
#[Pure]
function grapheme_stristr(string $haystack, string $needle, bool $beforeNeedle = false): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Function to extract a sequence of default grapheme clusters from a text buffer, which must be encoded in UTF-8.
 * @link https://php.net/manual/en/function.grapheme-extract.php
 * @param string $haystack <p>
 * String to search.
 * </p>
 * @param int $size <p>
 * Maximum number items - based on the $extract_type - to return.
 * </p>
 * @param int $type <p>
 * Defines the type of units referred to by the $size parameter:
 * </p>
 * <p>
 * GRAPHEME_EXTR_COUNT (default) - $size is the number of default
 * grapheme clusters to extract.
 * GRAPHEME_EXTR_MAXBYTES - $size is the maximum number of bytes
 * returned.
 * GRAPHEME_EXTR_MAXCHARS - $size is the maximum number of UTF-8
 * characters returned.
 * </p>
 * @param int $offset [optional] <p>
 * Starting position in $haystack in bytes - if given, it must be zero or a
 * positive value that is less than or equal to the length of $haystack in
 * bytes. If $start does not point to the first byte of a UTF-8
 * character, the start position is moved to the next character boundary.
 * </p>
 * @param int &$next [optional] <p>
 * Reference to a value that will be set to the next starting position.
 * When the call returns, this may point to the first byte position past the end of the string.
 * </p>
 * @return string|false A string starting at offset $start and ending on a default grapheme cluster
 * boundary that conforms to the $size and $extract_type specified.
 */
function grapheme_extract(string $haystack, int $size, int $type = 0, int $offset = 0, &$next = null): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PHP 7, PECL intl &gt;= 1.0.2, PHP 7, PECL idn &gt;= 0.1)<br/>
 * Convert domain name to IDNA ASCII form.
 * @link https://php.net/manual/en/function.idn-to-ascii.php
 * @param string $domain <p>
 * Domain to convert. In PHP 5 must be UTF-8 encoded.
 * If e.g. an ISO-8859-1 (aka Western Europe latin1) encoded string is
 * passed it will be converted into an ACE encoded "xn--" string.
 * It will not be the one you expected though!
 * </p>
 * @param int $flags [optional] <p>
 * Conversion options - combination of IDNA_* constants (except IDNA_ERROR_* constants).
 * </p>
 * @param int $variant [optional] <p>
 * Either INTL_IDNA_VARIANT_2003 for IDNA 2003 or INTL_IDNA_VARIANT_UTS46 for UTS #46.
 * </p>
 * @param array &$idna_info [optional] <p>
 * This parameter can be used only if INTL_IDNA_VARIANT_UTS46 was used for variant.
 * In that case, it will be filled with an array with the keys 'result',
 * the possibly illegal result of the transformation, 'isTransitionalDifferent',
 * a boolean indicating whether the usage of the transitional mechanisms of UTS #46
 * either has or would have changed the result and 'errors',
 * which is an int representing a bitset of the error constants IDNA_ERROR_*.
 * </p>
 * @return string|false The ACE encoded version of the domain name or <b>FALSE</b> on failure.
 */
function idn_to_ascii(string $domain, int $flags = 0, int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PHP 7, PECL intl &gt;= 1.0.2, PHP 7, PECL idn &gt;= 0.1)<br/>
 * Convert domain name from IDNA ASCII to Unicode.
 * @link https://php.net/manual/en/function.idn-to-utf8.php
 * @param string $domain <p>
 * Domain to convert in IDNA ASCII-compatible format.
 * The ASCII encoded domain name. Looks like "xn--..." if the it originally contained non-ASCII characters.
 * </p>
 * @param int $flags [optional] <p>
 * Conversion options - combination of IDNA_* constants (except IDNA_ERROR_* constants).
 * </p>
 * @param int $variant [optional] <p>
 * Either INTL_IDNA_VARIANT_2003 for IDNA 2003 or INTL_IDNA_VARIANT_UTS46 for UTS #46.
 * </p>
 * @param array &$idna_info [optional] <p>
 * This parameter can be used only if INTL_IDNA_VARIANT_UTS46 was used for variant.
 * In that case, it will be filled with an array with the keys 'result',
 * the possibly illegal result of the transformation, 'isTransitionalDifferent',
 * a boolean indicating whether the usage of the transitional mechanisms of UTS #46
 * either has or would have changed the result and 'errors',
 * which is an int representing a bitset of the error constants IDNA_ERROR_*.
 * </p>
 * @return string|false The UTF-8 encoded version of the domain name or <b>FALSE</b> on failure.
 * RFC 3490 4.2 states though "ToUnicode never fails. If any step fails, then the original input
 * sequence is returned immediately in that step."
 */
function idn_to_utf8(string $domain, int $flags = 0, int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info): string|false {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Create a new IntlCalendar
 * @link https://secure.php.net/manual/en/intlcalendar.createinstance.php
 * @param IntlTimeZone|DateTimeZone|string|null $timezone [optional] <p> <p>
 * The timezone to use.
 * </p>
 *
 * <ul>
 * <li>
 * <p>
 * <b>NULL</b>, in which case the default timezone will be used, as specified in
 * the ini setting {@link https://secure.php.net/manual/en/datetime.configuration.php#ini.date.timezone date.timezone} or
 * through the function  {@link https://secure.php.net/manual/en/function.date-default-timezone-set.php date_default_timezone_set()} and as
 * returned by {@link https://secure.php.net/manual/en/function.date-default-timezone-get.php date_default_timezone_get()}.
 * </p>
 * </li>
 * <li>
 * <p>
 * An {@link https://secure.php.net/manual/en/class.intltimezone.php IntlTimeZone}, which will be used directly.
 * </p>
 * </li>
 * <li>
 * <p>
 * A {@link https://secure.php.net/manual/en/class.datetimezone.php DateTimeZone}. Its identifier will be extracted
 * and an ICU timezone object will be created; the timezone will be backed
 * by ICU's database, not PHP's.
 * </p>
 * </li>
 * <li>
 * <p>
 * A {@link https://secure.php.net/manual/en/language.types.string.php string}, which should be a valid ICU timezone identifier.
 * See  <b>IntlTimeZone::createTimeZoneIDEnumeration()</b>. Raw
 * offsets such as <em>"GMT+08:30"</em> are also accepted.
 * </p>
 * </li>
 * </ul>
 * </p>
 * @param string|null $locale [optional] <p>
 * A locale to use or <b>NULL</b> to use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.default-locale the default locale}.
 * </p>
 * @return IntlCalendar|null
 * The created {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} instance or <b>NULL</b> on
 * failure.
 * @since 5.5
 */
#[Pure]
function intlcal_create_instance($timezone = null, ?string $locale = null): ?IntlCalendar {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get set of locale keyword values
 * @param string $keyword <p>
 * The locale keyword for which relevant values are to be queried. Only
 * <em>'calendar'</em> is supported.
 * </p>
 * @param string $locale <p>
 * The locale onto which the keyword/value pair are to be appended.
 * </p>
 * @param bool $onlyCommon
 * <p>
 * Whether to show only the values commonly used for the specified locale.
 * </p>
 * @return IntlIterator|false An iterator that yields strings with the locale keyword values or <b>FALSE</b> on failure.
 * @since 5.5
 */
#[Pure]
function intlcal_get_keyword_values_for_locale(string $keyword, string $locale, bool $onlyCommon): IntlIterator|false {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get number representing the current time
 * @link https://secure.php.net/manual/en/intlcalendar.getnow.php
 * @return float A float representing a number of milliseconds since the epoch, not counting leap seconds.
 * @since 5.5
 */
#[Pure(true)]
function intlcal_get_now(): float {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get array of locales for which there is data
 * @link https://secure.php.net/manual/en/intlcalendar.getavailablelocales.php
 * @return string[] An array of strings, one for which locale.
 * @since 5.5
 */
#[Pure]
function intlcal_get_available_locales(): array {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get the value for a field
 * @link https://secure.php.net/manual/en/intlcalendar.get.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param int $field <p>
 * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
 * values between <em>0</em> and
 * <b>IntlCalendar::FIELD_COUNT</b>.
 * </p>
 * @return int An integer with the value of the time field.
 * @since 5.5
 */
#[Pure]
function intl_get($calendar, $field) {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get time currently represented by the object
 * @param IntlCalendar $calendar <p>The calendar whose time will be checked against this object's time.</p>
 * @return float
 * A {@link https://secure.php.net/manual/en/language.types.float.php float} representing the number of milliseconds elapsed since the
 * reference time (1 Jan 1970 00:00:00 UTC).
 * @since 5.5
 */
#[Pure]
#[TypeAware(['8.0' => 'float|false'], default: 'float')]
function intlcal_get_time(IntlCalendar $calendar) {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Set the calendar time in milliseconds since the epoch
 * @link https://secure.php.net/manual/en/intlcalendar.settime.php
 * @param IntlCalendar $calendar <p>
 * The IntlCalendar resource.
 * </p>
 * @param float $timestamp <p>
 * An instant represented by the number of number of milliseconds between
 * such instant and the epoch, ignoring leap seconds.
 * </p>
 * @return bool
 * Returns <b>TRUE</b> on success and <b>FALSE</b> on failure.
 * @since 5.5
 */
function intlcal_set_time(IntlCalendar $calendar, float $timestamp): bool {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Add a (signed) amount of time to a field
 * @link https://secure.php.net/manual/en/intlcalendar.add.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param int $field <p>
 * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}.
 * These are integer values between <em>0</em> and
 * <b>IntlCalendar::FIELD_COUNT</b>.
 * </p>
 * @param int $value <p>The signed amount to add to the current field. If the amount is positive, the instant will be moved forward; if it is negative, the instant wil be moved into the past. The unit is implicit to the field type.
 * For instance, hours for IntlCalendar::FIELD_HOUR_OF_DAY.</p>
 * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * @since 5.5
 */
function intlcal_add(IntlCalendar $calendar, int $field, int $value): bool {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Set the timezone used by this calendar
 * @link https://secure.php.net/manual/en/intlcalendar.settimezone.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param IntlTimeZone|DateTimeZone|string|null $timezone <p>
 * The new timezone to be used by this calendar. It can be specified in the
 * following ways:
 *
 * </p><ul>
 * <li>
 * <p>
 * <b>NULL</b>, in which case the default timezone will be used, as specified in
 * the ini setting {@link https://secure.php.net/manual/en/datetime.configuration.php#ini.date.timezone date.timezone} or
 * through the function  {@link https://secure.php.net/manual/en/function.date-default-timezone-set.php date_default_timezone_set()} and as
 * returned by  {@link https://secure.php.net/manual/en/function.date-default-timezone-get.php date_default_timezone_get()}.
 * </p>
 * </li>
 * <li>
 * <p>
 * An {@link https://secure.php.net/manual/en/class.intltimezone.php IntlTimeZone}, which will be used directly.
 * </p>
 * </li>
 * <li>
 * <p>
 * A {@link https://secure.php.net/manual/en/class.datetimezone.php DateTimeZone}. Its identifier will be extracted
 * and an ICU timezone object will be created; the timezone will be backed
 * by ICU's database, not PHP's.
 * </p>
 * </li>
 * <li>
 * <p>
 * A {@link https://secure.php.net/manual/en/language.types.string.php string}, which should be a valid ICU timezone identifier.
 * See  <b>IntlTimeZone::createTimeZoneIDEnumeration()</b>. Raw
 * offsets such as <em>"GMT+08:30"</em> are also accepted.
 * </p>
 * </li>
 * </ul>
 * @return bool Returns <b>TRUE</b> on success and <b>FALSE</b> on failure.
 * @since 5.5
 */
function intlcal_set_time_zone(IntlCalendar $calendar, $timezone): bool {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Whether this object's time is after that of the passed object
 * https://secure.php.net/manual/en/intlcalendar.after.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param IntlCalendar $other <p>The calendar whose time will be checked against this object's time.</p>
 * @return bool
 * Returns <b>TRUE</b> if this object's current time is after that of the
 * <em>calendar</em> argument's time. Returns <b>FALSE</b> otherwise.
 * Also returns <b>FALSE</b> on failure. You can use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or
 * {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to detect error conditions.
 * @since 5.5
 */
#[Pure]
function intlcal_after(IntlCalendar $calendar, IntlCalendar $other): bool {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Whether this object's time is before that of the passed object
 * @link https://secure.php.net/manual/en/intlcalendar.before.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param IntlCalendar $other <p> The calendar whose time will be checked against this object's time.</p>
 * @return bool
 * <p>
 * Returns <b>TRUE</B> if this object's current time is before that of the
 * <em>calendar</em> argument's time. Returns <b>FALSE</b> otherwise.
 * Also returns <b>FALSE</b> on failure. You can use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or
 * {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to detect error conditions.
 * </p>
 * @since 5.5
 */
#[Pure]
function intlcal_before(IntlCalendar $calendar, IntlCalendar $other): bool {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Set a time field or several common fields at once
 * @link https://secure.php.net/manual/en/intlcalendar.set.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param int $year <p>
 * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
 * values between <em>0</em> and
 * <b>IntlCalendar::FIELD_COUNT</b>.
 * </p>
 * @param int $month <p>
 * The new value for <b>IntlCalendar::FIELD_MONTH</b>.
 * </p>
 * @param int $dayOfMonth [optional] <p>
 * The new value for <b>IntlCalendar::FIELD_DAY_OF_MONTH</b>.
 * The month sequence is zero-based, i.e., January is represented by 0,
 * February by 1, ..., December is 11 and Undecember (if the calendar has
 * it) is 12.
 * </p>
 * @param int $hour [optional]
 * <p>
 * The new value for <b>IntlCalendar::FIELD_HOUR_OF_DAY</b>.
 * </p>
 * @param int $minute [optional]
 * <p>
 * The new value for <b>IntlCalendar::FIELD_MINUTE</b>.
 * </p>
 * @param int $second [optional] <p>
 * The new value for <b>IntlCalendar::FIELD_SECOND</b>.
 * </p>
 * @return bool Returns <b>TRUE</b> on success and <b>FALSE</b> on failure.
 * @since 5.5
 */
function intlcal_set(IntlCalendar $calendar, int $year, int $month, int $dayOfMonth = null, int $hour = null, int $minute = null, int $second = null): bool {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Add value to field without carrying into more significant fields
 * @link https://secure.php.net/manual/en/intlcalendar.roll.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param int $field <p>One of the
 * {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time
 * {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}.
 * These are integer values between <em>0</em> and
 * <b>IntlCalendar::FIELD_COUNT</b>.
 * </p>
 * @param int|bool $value <p>
 * The (signed) amount to add to the field, <b>TRUE</b> for rolling up (adding
 * <em>1</em>), or <b>FALSE</b> for rolling down (subtracting
 * <em>1</em>).
 * </p>
 * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * @since 5.5
 */
function intlcal_roll(
    IntlCalendar $calendar,
    int $field,
    #[ElementAvailable(from: '5.3', to: '7.4')] $value = null,
    #[ElementAvailable(from: '8.0')] $value
): bool {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Clear a field or all fields
 * @link https://secure.php.net/manual/en/intlcalendar.clear.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param int|null $field [optional] <p>
 * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
 * values between <em>0</em> and
 * <b>IntlCalendar::FIELD_COUNT</b>.
 * </p>
 * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. Failure can only occur is invalid arguments are provided.
 * @since 5.5
 */
function intlcal_clear(IntlCalendar $calendar, ?int $field = null): bool {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Calculate difference between given time and this object's time
 * @link https://secure.php.net/manual/en/intlcalendar.fielddifference.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param float $timestamp <p>
 * The time against which to compare the quantity represented by the
 * <em>field</em>. For the result to be positive, the time
 * given for this parameter must be ahead of the time of the object the
 * method is being invoked on.
 * </p>
 * @param int $field <p>
 * The field that represents the quantity being compared.
 * </p>
 *
 * <p>
 * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
 * values between <em>0</em> and
 * <b>IntlCalendar::FIELD_COUNT</b>.
 * </p>
 * @return int Returns a (signed) difference of time in the unit associated with the
 * specified field or <b>FALSE</b> on failure.
 * @since 5.5
 */
#[Pure]
#[TypeAware(['8.0' => 'int|false'], default: 'int')]
function intlcal_field_difference(IntlCalendar $calendar, float $timestamp, int $field) {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * The maximum value for a field, considering the object's current time
 * @link https://secure.php.net/manual/en/intlcalendar.getactualmaximum.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param int $field <p>
 * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
 * values between <em>0</em> and
 * <b>IntlCalendar::FIELD_COUNT</b>.
 * </p>
 * @return int
 * An {@link https://secure.php.net/manual/en/language.types.integer.php int} representing the maximum value in the units associated
 * with the given <em>field</em> or <b>FALSE</b> on failure.
 * @since 5.5
 */
#[Pure]
#[TypeAware(['8.0' => 'int|false'], default: 'int')]
function intlcal_get_actual_maximum(IntlCalendar $calendar, int $field) {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * The minimum value for a field, considering the object's current time
 * @link https://secure.php.net/manual/en/intlcalendar.getactualminimum.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param int $field <p>
 * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}.
 * These are integer values between <em>0</em> and
 * <b>IntlCalendar::FIELD_COUNT</b>.
 * </p>
 * @return int
 * An {@link https://secure.php.net/manual/en/language.types.integer.php int} representing the minimum value in the field's
 * unit or <b>FALSE</b> on failure.
 * @since 5.5
 */
#[Pure]
#[TypeAware(['8.0' => 'int|false'], default: 'int')]
function intlcal_get_actual_minimum(IntlCalendar $calendar, int $field) {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * @link https://secure.php.net/manual/en/intlcalendar.getdayofweektype.php
 * Tell whether a day is a weekday, weekend or a day that has a transition between the two
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param int $dayOfWeek <p>
 * One of the constants <b>IntlCalendar::DOW_SUNDAY</b>,
 * <b>IntlCalendar::DOW_MONDAY</b>, ...,
 * <b>IntlCalendar::DOW_SATURDAY</b>.
 * </p>
 * @return int
 * Returns one of the constants
 * <b>IntlCalendar::DOW_TYPE_WEEKDAY</b>,
 * <b>IntlCalendar::DOW_TYPE_WEEKEND</b>,
 * <b>IntlCalendar::DOW_TYPE_WEEKEND_OFFSET</b> or
 * <b>IntlCalendar::DOW_TYPE_WEEKEND_CEASE</b> or <b>FALSE</b> on failure.
 * @since 5.5
 */
#[Pure]
#[TypeAware(['8.0' => 'int|false'], default: 'int')]
function intlcal_get_day_of_week_type(IntlCalendar $calendar, int $dayOfWeek) {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get the first day of the week for the calendar's locale
 * @link https://secure.php.net/manual/en/intlcalendar.getfirstdayofweek.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @return int
 * One of the constants <b>IntlCalendar::DOW_SUNDAY</b>,
 * <b>IntlCalendar::DOW_MONDAY</b>, ...,
 * <b>IntlCalendar::DOW_SATURDAY</b> or <b>FALSE</b> on failure.
 * @since 5.5
 */
#[Pure]
#[TypeAware(['8.0' => 'int|false'], default: 'int')]
function intlcal_get_first_day_of_week(IntlCalendar $calendar) {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get the largest local minimum value for a field
 * @link https://secure.php.net/manual/en/intlcalendar.getgreatestminimum.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param int $field <p>
 * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
 * values between <em>0</em> and
 * <b>IntlCalendar::FIELD_COUNT</b>.</p>
 * @return int
 * An {@link https://secure.php.net/manual/en/language.types.integer.php int} representing a field value, in the field's
 * unit, or <b>FALSE</b> on failure.
 * @since 5.5
 */
#[Pure]
function intlcal_greates_minimum($calendar, $field) {}

/**
 * (PHP &gt;= 5.5.0, PECL intl &gt;= 3.0.0a1)<br/>
 * Gets the value for a specific field.
 * @link https://www.php.net/manual/en/intlcalendar.get.php
 * @param IntlCalendar $calendar <p>
 * The IntlCalendar resource.
 * </p>
 * @param int $field <p>
 * One of the IntlCalendar date/time field constants. These are integer values between 0 and IntlCalendar::FIELD_COUNT.
 * </p>
 * @return int An integer with the value of the time field.
 */
#[Pure]
#[TypeAware(['8.0' => 'int|false'], default: 'int')]
function intlcal_get(IntlCalendar $calendar, int $field) {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get the smallest local maximum for a field
 * @link https://secure.php.net/manual/en/intlcalendar.getleastmaximum.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param int $field <p>
 * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
 * values between <em>0</em> and
 * <b>IntlCalendar::FIELD_COUNT</b>.
 * </p>
 * @return int
 * <p>An {@link https://secure.php.net/manual/en/language.types.integer.ph int} representing a field value in the field's
 * unit or <b>FALSE</b> on failure.
 * </p>
 * @since 5.5
 */
#[Pure]
#[TypeAware(['8.0' => 'int|false'], default: 'int')]
function intlcal_get_least_maximum(IntlCalendar $calendar, int $field) {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get the largest local minimum value for a field
 * @link https://secure.php.net/manual/en/intlcalendar.getgreatestminimum.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param int $field <p>
 * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
 * values between <em>0</em> and
 * <b>IntlCalendar::FIELD_COUNT</b>.</p>
 * @return int
 * An {@link https://secure.php.net/manual/en/language.types.integer.php int} representing a field value, in the field's
 * unit, or <b>FALSE</b> on failure.
 * @since 5.5
 */
#[Pure]
#[TypeAware(['8.0' => 'int|false'], default: 'int')]
function intlcal_get_greatest_minimum(IntlCalendar $calendar, int $field) {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get the locale associated with the object
 * @link https://secure.php.net/manual/en/intlcalendar.getlocale.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param int $type <p>
 * Whether to fetch the actual locale (the locale from which the calendar
 * data originates, with <b>Locale::ACTUAL_LOCALE</b>) or the
 * valid locale, i.e., the most specific locale supported by ICU relatively
 * to the requested locale – see <b>Locale::VALID_LOCALE</b>.
 * From the most general to the most specific, the locales are ordered in
 * this fashion – actual locale, valid locale, requested locale.
 * </p>
 * @return string
 * A locale string or <b>FALSE</b> on failure.
 * @since 5.5
 */
#[Pure]
#[TypeAware(['8.0' => 'string|false'], default: 'string')]
function intlcal_get_locale(IntlCalendar $calendar, int $type) {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get the global maximum value for a field
 * @link https://secure.php.net/manual/en/intlcalendar.getmaximum.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param int $field <p>
 * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
 * values between <em>0</em> and
 * <b>IntlCalendar::FIELD_COUNT</b>.
 * </p>
 * @return int|false
 * @since 5.5
 */
#[Pure]
function intcal_get_maximum($calendar, $field) {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * @link https://secure.php.net/manual/en/intlcalendar.getminimaldaysinfirstweek.php
 * Get minimal number of days the first week in a year or month can have
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @return int
 * An {@link https://secure.php.net/manual/en/language.types.integer.php  int} representing a number of days or <b>FALSE</b> on failure.
 * @since 5.5
 */
#[Pure]
#[TypeAware(['8.0' => 'int|false'], default: 'int')]
function intlcal_get_minimal_days_in_first_week(IntlCalendar $calendar) {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get the global minimum value for a field
 * @link https://secure.php.net/manual/en/intlcalendar.getminimum.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param int $field <p>
 * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field}. These are integer
 * values between <em>0</em> and
 * <b>IntlCalendar::FIELD_COUNT</b>.
 * </p>
 * @return int
 * An int representing a value for the given field in the field's unit or FALSE on failure.
 * @since 5.5
 */
#[Pure]
#[TypeAware(['8.0' => 'int|false'], default: 'int')]
function intlcal_get_minimum(IntlCalendar $calendar, int $field) {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get the object's timezone
 * @link https://secure.php.net/manual/en/intlcalendar.gettimezone.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @return IntlTimeZone|false
 * An {@link https://secure.php.net/manual/en/class.intltimezone.php IntlTimeZone} object corresponding to the one used
 * internally in this object.
 * @since 5.5
 */
#[Pure]
function intlcal_get_time_zone(IntlCalendar $calendar): IntlTimeZone|false {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get the calendar type
 * @link https://secure.php.net/manual/en/intlcalendar.gettype.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @return string
 * A {@link https://secure.php.net/manual/en/language.types.string.php string} representing the calendar type, such as
 * <em>'gregorian'</em>, <em>'islamic'</em>, etc.
 * @since 5.5
 */
#[Pure]
function intlcal_get_type(IntlCalendar $calendar): string {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get time of the day at which weekend begins or ends
 * @link https://secure.php.net/manual/en/intlcalendar.getweekendtransition.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param string $dayOfWeek <p>
 * One of the constants <b>IntlCalendar::DOW_SUNDAY</b>,
 * <b>IntlCalendar::DOW_MONDAY</b>, ...,
 * <b>IntlCalendar::DOW_SATURDAY</b>.
 * </p>
 * @return int
 * The number of milliseconds into the day at which the the weekend begins or
 * ends or <b>FALSE</b> on failure.
 * @since 5.5
 */
#[Pure]
#[TypeAware(['8.0' => 'int|false'], default: 'int')]
function intlcal_get_weekend_transition(IntlCalendar $calendar, int $dayOfWeek) {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Whether the object's time is in Daylight Savings Time
 * @link https://secure.php.net/manual/en/intlcalendar.indaylighttime.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @return bool
 * Returns <b>TRUE</b> if the date is in Daylight Savings Time, <b>FALSE</b> otherwise.
 * The value <b>FALSE</b> may also be returned on failure, for instance after
 * specifying invalid field values on non-lenient mode; use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or query
 * {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to disambiguate.
 * @since 5.5
 */
#[Pure]
function intlcal_in_daylight_time(IntlCalendar $calendar): bool {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Whether date/time interpretation is in lenient mode
 * @link https://secure.php.net/manual/en/intlcalendar.islenient.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @return bool
 * A {@link https://secure.php.net/manual/en/language.types.boolean.php bool} representing whether the calendar is set to lenient mode.
 * @since 5.5
 */
#[Pure]
function intlcal_is_lenient(IntlCalendar $calendar): bool {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Whether a field is set
 * @link https://secure.php.net/manual/en/intlcalendar.isset.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param int $field <p>
 * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
 * values between <em>0</em> and
 * <b>IntlCalendar::FIELD_COUNT</b>.
 * </p>
 * @return bool Assuming there are no argument errors, returns <b>TRUE</b> iif the field is set.
 * @since 5.5
 */
#[Pure]
function intlcal_is_set(IntlCalendar $calendar, int $field): bool {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get the global maximum value for a field
 * @link https://secure.php.net/manual/en/intlcalendar.getmaximum.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param int $field <p>
 * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
 * values between <em>0</em> and
 * <b>IntlCalendar::FIELD_COUNT</b>.
 * </p>
 * @return int|false
 * @since 5.5
 */
#[Pure]
#[TypeAware(['8.0' => 'int|false'], default: 'int')]
function intlcal_get_maximum(IntlCalendar $calendar, int $field) {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Whether another calendar is equal but for a different time
 * @link https://secure.php.net/manual/en/intlcalendar.isequivalentto.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param IntlCalendar $other The other calendar against which the comparison is to be made.
 * @return bool
 * Assuming there are no argument errors, returns <b>TRUE</b> iif the calendars are equivalent except possibly for their set time.
 * @since 5.5
 */
#[Pure]
function intlcal_is_equivalent_to(IntlCalendar $calendar, IntlCalendar $other): bool {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Whether a certain date/time is in the weekend
 * @link https://secure.php.net/manual/en/intlcalendar.isweekend.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param float|null $timestamp [optional] <p>
 * An optional timestamp representing the number of milliseconds since the
 * epoch, excluding leap seconds. If <b>NULL</b>, this object's current time is
 * used instead.
 * </p>
 * @return bool
 * <p> A {@link https://secure.php.net/manual/en/language.types.boolean.php bool} indicating whether the given or this object's time occurs
 * in a weekend.
 * </p>
 * <p>
 * The value <b>FALSE</b> may also be returned on failure, for instance after giving
 * a date out of bounds on non-lenient mode; use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or query
 * {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to disambiguate.</p>
 * @since 5.5
 */
#[Pure]
function intlcal_is_weekend(IntlCalendar $calendar, ?float $timestamp = null): bool {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Set the day on which the week is deemed to start
 * @link https://secure.php.net/manual/en/intlcalendar.setfirstdayofweek.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param int $dayOfWeek <p>
 * One of the constants <b>IntlCalendar::DOW_SUNDAY</b>,
 * <b>IntlCalendar::DOW_MONDAY</b>, ...,
 * <b>IntlCalendar::DOW_SATURDAY</b>.
 * </p>
 * @return bool Returns TRUE on success. Failure can only happen due to invalid parameters.
 * @since 5.5
 */
function intlcal_set_first_day_of_week(IntlCalendar $calendar, int $dayOfWeek): bool {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Set whether date/time interpretation is to be lenient
 * @link https://secure.php.net/manual/en/intlcalendar.setlenient.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param bool $lenient <p>
 * Use <b>TRUE</b> to activate the lenient mode; <b>FALSE</b> otherwise.
 * </p>
 * @return bool Returns <b>TRUE</b> on success. Failure can only happen due to invalid parameters.
 * @since 5.5
 */
function intlcal_set_lenient(IntlCalendar $calendar, bool $lenient): bool {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get behavior for handling repeating wall time
 * @link https://secure.php.net/manual/en/intlcalendar.getrepeatedwalltimeoption.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @return int
 * One of the constants <b>IntlCalendar::WALLTIME_FIRST</b> or
 * <b>IntlCalendar::WALLTIME_LAST</b>.
 * @since 5.5
 */
#[Pure]
function intlcal_get_repeated_wall_time_option(IntlCalendar $calendar): int {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Compare time of two IntlCalendar objects for equality
 * @link https://secure.php.net/manual/en/intlcalendar.equals.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param IntlCalendar $other
 * @return bool <p>
 * Returns <b>TRUE</b> if the current time of both this and the passed in
 * {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} object are the same, or <b>FALSE</b>
 * otherwise. The value <b>FALSE</b> can also be returned on failure. This can only
 * happen if bad arguments are passed in. In any case, the two cases can be
 * distinguished by calling  {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()}.
 * </p>
 * @since 5.5
 */
#[Pure]
function intlcal_equals(IntlCalendar $calendar, IntlCalendar $other): bool {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get behavior for handling skipped wall time
 * @link https://secure.php.net/manual/en/intlcalendar.getskippedwalltimeoption.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @return int
 * One of the constants <b>IntlCalendar::WALLTIME_FIRST</b>,
 * <b>IntlCalendar::WALLTIME_LAST</b> or
 * <b>IntlCalendar::WALLTIME_NEXT_VALID</b>.
 * @since 5.5
 */
#[Pure]
function intlcal_get_skipped_wall_time_option(IntlCalendar $calendar): int {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Set behavior for handling repeating wall times at negative timezone offset transitions
 * @link https://secure.php.net/manual/en/intlcalendar.setrepeatedwalltimeoption.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param int $option <p>
 * One of the constants <b>IntlCalendar::WALLTIME_FIRST</b> or
 * <b>IntlCalendar::WALLTIME_LAST</b>.
 * </p>
 * @return bool
 * Returns <b>TRUE</b> on success. Failure can only happen due to invalid parameters.
 * @since 5.5
 */
function intlcal_set_repeated_wall_time_option(IntlCalendar $calendar, int $option): bool {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Set behavior for handling skipped wall times at positive timezone offset transitions
 * @link https://secure.php.net/manual/en/intlcalendar.setskippedwalltimeoption.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @param int $option <p>
 * One of the constants <b>IntlCalendar::WALLTIME_FIRST</b>,
 * <b>IntlCalendar::WALLTIME_LAST</b> or
 * <b>IntlCalendar::WALLTIME_NEXT_VALID</b>.
 * </p>
 * @return bool
 * <p>
 * Returns <b>TRUE</b> on success. Failure can only happen due to invalid parameters.
 * </p>
 * @since 5.5
 */
function intlcal_set_skipped_wall_time_option(IntlCalendar $calendar, int $option): bool {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a2)<br/>
 * Create an IntlCalendar from a DateTime object or string
 * @link https://secure.php.net/manual/en/intlcalendar.fromdatetime.php
 * @param DateTime|string $datetime <p>
 * A {@link https://secure.php.net/manual/en/class.datetime.php DateTime} object or a {@link https://secure.php.net/manual/en/language.types.string.php string} that
 * can be passed to  {@link https://secure.php.net/manual/en/datetime.construct.php DateTime::__construct()}.
 * </p>
 * @param null|string $locale
 * @return IntlCalendar|null
 * The created {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} object or <b>NULL</b> in case of
 * failure. If a {@link https://secure.php.net/manual/en/language.types.string.php string} is passed, any exception that occurs
 * inside the {@link https://secure.php.net/manual/en/class.datetime.php DateTime} constructor is propagated.
 * @since 5.5
 */
#[Pure]
function intlcal_from_date_time(
    DateTime|string $datetime,
    #[ElementAvailable(from: '8.0')] ?string $locale = null
): ?IntlCalendar {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a2)<br/>
 * Convert an IntlCalendar into a DateTime object
 * @link https://secure.php.net/manual/en/intlcalendar.todatetime.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @return DateTime|false
 * A {@link https://secure.php.net/manual/en/class.datetime.php DateTime} object with the same timezone as this
 * object (though using PHP's database instead of ICU's) and the same time,
 * except for the smaller precision (second precision instead of millisecond).
 * Returns <b>FALSE</b> on failure.
 * @since 5.5
 */
#[Pure]
function intlcal_to_date_time(IntlCalendar $calendar): DateTime|false {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get last error code on the object
 * @link https://secure.php.net/manual/en/intlcalendar.geterrorcode.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @return int|false An ICU error code indicating either success, failure or a warning.
 * @since 5.5
 */
#[Pure(true)]
function intlcal_get_error_code(IntlCalendar $calendar): int|false {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get last error message on the object
 * @link https://secure.php.net/manual/en/intlcalendar.geterrormessage.php
 * @param IntlCalendar $calendar <p>
 * The calendar object, on the procedural style interface.
 * </p>
 * @return string|false The error message associated with last error that occurred in a function call on this object, or a string indicating the non-existance of an error.
 * @since 5.5
 */
#[Pure(true)]
function intlcal_get_error_message(IntlCalendar $calendar): string|false {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get the number of IDs in the equivalency group that includes the given ID
 * @link https://secure.php.net/manual/en/intltimezone.countequivalentids.php
 * @param string $timezoneId
 * @return int|false
 * @since 5.5
 */
#[Pure]
function intltz_count_equivalent_ids(string $timezoneId): int|false {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Create a new copy of the default timezone for this host
 * @link https://secure.php.net/manual/en/intltimezone.createdefault.php
 * @return IntlTimeZone
 * @since 5.5
 */
#[Pure]
function intlz_create_default() {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * @link https://secure.php.net/manual/en/intltimezone.createenumeration.php
 * @param IntlTimeZone|string|int|float|null $countryOrRawOffset [optional]
 * @return IntlIterator|false
 * @since 5.5
 */
#[Pure]
function intltz_create_enumeration($countryOrRawOffset): IntlIterator|false {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * @link https://secure.php.net/manual/en/intltimezone.createtimezone.php
 * @param string $timezoneId
 * @return IntlTimeZone|null
 * @since 5.5
 */
#[Pure]
function intltz_create_time_zone(string $timezoneId): ?IntlTimeZone {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * @link https://secure.php.net/manual/en/intltimezone.fromdatetimezone.php
 * @param DateTimeZone $timezone
 * @return IntlTimeZone|null
 * @since 5.5
 */
#[Pure]
function intltz_from_date_time_zone(DateTimeZone $timezone): ?IntlTimeZone {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get the canonical system timezone ID or the normalized custom time zone ID for the given time zone ID
 * @link https://secure.php.net/manual/en/intltimezone.getcanonicalid.php
 * @param string $timezoneId
 * @param bool &$isSystemId [optional]
 * @return string|false
 * @since 5.5
 */
#[Pure]
function intltz_get_canonical_id(string $timezoneId, &$isSystemId): string|false {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get a name of this time zone suitable for presentation to the user
 * @param IntlTimeZone $timezone - <p>
 * The time zone object, on the procedural style interface.
 * </p>
 * @param bool $dst [optional]
 * @param int $style [optional]
 * @param string|null $locale [optional]
 * @return string|false
 * @since 5.5
 */
#[Pure]
function intltz_get_display_name(IntlTimeZone $timezone, bool $dst = false, int $style = 2, ?string $locale): string|false {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get the amount of time to be added to local standard time to get local wall clock time
 * @param IntlTimeZone $timezone - <p>
 * The time zone object, on the procedural style interface.
 * </p>
 * @return int
 * @link https://secure.php.net/manual/en/intltimezone.getequivalentid.php
 * @since 5.5
 */
#[Pure]
function intltz_get_dst_savings(IntlTimeZone $timezone): int {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get an ID in the equivalency group that includes the given ID
 * @link https://secure.php.net/manual/en/intltimezone.getequivalentid.php
 * @param string $timezoneId
 * @param int $offset
 * @return string|false
 * @since 5.5
 */
#[Pure]
function intltz_get_equivalent_id(string $timezoneId, int $offset): string|false {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get last error code on the object
 * @link https://secure.php.net/manual/en/intltimezone.geterrorcode.php
 * @param IntlTimeZone $timezone - <p>
 * The time zone object, on the procedural style interface.
 * </p>
 * @return int|false
 * @since 5.5
 */
#[Pure(true)]
function intltz_get_error_code(IntlTimeZone $timezone): int|false {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get last error message on the object
 * @link https://secure.php.net/manual/en/intltimezone.geterrormessage.php
 * @param IntlTimeZone $timezone - <p>
 * The time zone object, on the procedural style interface.
 * </p>
 * @return string|false
 * @since 5.5
 */
#[Pure(true)]
function intltz_get_error_message(IntlTimeZone $timezone): string|false {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Create GMT (UTC) timezone
 * @link https://secure.php.net/manual/en/intltimezone.getgmt.php
 * @return IntlTimeZone
 * @since 5.5
 */
#[Pure]
function intltz_getGMT(): IntlTimeZone {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get timezone ID
 * @link https://secure.php.net/manual/en/intltimezone.getid.php
 * @param IntlTimeZone $timezone
 * @return string|false
 * @since 5.5
 */
#[Pure]
function intltz_get_id(IntlTimeZone $timezone): string|false {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get the time zone raw and GMT offset for the given moment in time
 * @link https://secure.php.net/manual/en/intltimezone.getoffset.php
 * @param IntlTimeZone $timezone
 * @param float $timestamp
 * @param bool $local
 * @param int &$rawOffset
 * @param int &$dstOffset
 * @return bool
 * @since 5.5
 */
#[Pure]
function intltz_get_offset(IntlTimeZone $timezone, float $timestamp, bool $local, &$rawOffset, &$dstOffset): bool {}

/**
 * Get the raw GMT offset (before taking daylight savings time into account
 * @link https://secure.php.net/manual/en/intltimezone.getrawoffset.php
 * @param IntlTimeZone $timezone
 * @return int
 */
#[Pure]
function intltz_get_raw_offset(IntlTimeZone $timezone): int {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Get the timezone data version currently used by ICU
 * @link https://secure.php.net/manual/en/intltimezone.gettzdataversion.php
 * @return string|false
 * @since 5.5
 */
#[Pure]
function intltz_get_tz_data_version(): string|false {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Check if this zone has the same rules and offset as another zone
 * @link https://secure.php.net/manual/en/intltimezone.hassamerules.php
 * @param IntlTimeZone $timezone
 * @param IntlTimeZone $other
 * @return bool
 * @since 5.5
 */
#[Pure]
function intltz_has_same_rules(
    IntlTimeZone $timezone,
    #[ElementAvailable(from: '5.5', to: '7.4')] IntlTimeZone $other = null,
    #[ElementAvailable(from: '8.0')] IntlTimeZone $other
): bool {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Convert to DateTimeZone object
 * @link https://secure.php.net/manual/en/intltimezone.todatetimezone.php
 * @param IntlTimeZone $timezone
 * @return DateTimeZone|false
 * @since 5.5
 */
#[Pure]
function intltz_to_date_time_zone(IntlTimeZone $timezone): DateTimeZone|false {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * Check if this time zone uses daylight savings time
 * @link https://secure.php.net/manual/en/intltimezone.usedaylighttime.php
 * @param IntlTimeZone $timezone
 * @return bool
 * @since 5.5
 */
#[Pure]
function intltz_use_daylight_time(IntlTimeZone $timezone): bool {}

/**
 * (PHP 5 &gt;=5.5.0 PECL intl &gt;= 3.0.0a1)<br/>
 * @param DateTimeZone|IntlTimeZone|string|int|null $timezoneOrYear
 * @param string|null $localeOrMonth
 * @param int $day
 * @param int $hour
 * @param int $minute
 * @param int $second
 * @return IntlGregorianCalendar|null
 * @since 5.5
 */
#[Pure]
function intlgregcal_create_instance($timezoneOrYear = null, $localeOrMonth = null, $day = null, $hour = null, $minute = null, $second = null): ?IntlGregorianCalendar {}

/**
 * @param IntlGregorianCalendar $calendar
 * @param float $timestamp
 * @return bool
 */
function intlgregcal_set_gregorian_change(IntlGregorianCalendar $calendar, float $timestamp): bool {}

/**
 * @param IntlGregorianCalendar $calendar
 * @return float
 */
#[Pure]
function intlgregcal_get_gregorian_change(IntlGregorianCalendar $calendar): float {}

/**
 * @param IntlGregorianCalendar $calendar
 * @param int $year
 * @return bool
 */
#[Pure]
function intlgregcal_is_leap_year(IntlGregorianCalendar $calendar, int $year): bool {}

/**
 * (PHP &gt;= 5.3.2, PECL intl &gt;= 2.0.0)<br/>
 * Create a resource bundle
 * @link https://php.net/manual/en/resourcebundle.create.php
 * @param string|null $locale <p>
 * Locale for which the resources should be loaded (locale name, e.g. en_CA).
 * </p>
 * @param string|null $bundle <p>
 * The directory where the data is stored or the name of the .dat file.
 * </p>
 * @param bool $fallback [optional] <p>
 * Whether locale should match exactly or fallback to parent locale is allowed.
 * </p>
 * @return ResourceBundle|false|null <b>ResourceBundle</b> object or <b>FALSE</b> on error.
 */
#[Pure]
function resourcebundle_create(?string $locale, ?string $bundle, bool $fallback = true): ?ResourceBundle {}

/**
 * (PHP &gt;= 5.3.2, PECL intl &gt;= 2.0.0)<br/>
 * Get data from the bundle
 * @link https://php.net/manual/en/resourcebundle.get.php
 * @param ResourceBundle $bundle
 * @param string|int $index <p>
 * Data index, must be string or integer.
 * </p>
 * @param bool $fallback
 * @return mixed the data located at the index or <b>NULL</b> on error. Strings, integers and binary data strings
 * are returned as corresponding PHP types, integer array is returned as PHP array. Complex types are
 * returned as <b>ResourceBundle</b> object.
 */
#[Pure]
function resourcebundle_get(ResourceBundle $bundle, $index, bool $fallback = true): mixed {}

/**
 * (PHP &gt;= 5.3.2, PECL intl &gt;= 2.0.0)<br/>
 * Get number of elements in the bundle
 * @link https://php.net/manual/en/resourcebundle.count.php
 * @param ResourceBundle $bundle
 * @return int number of elements in the bundle.
 */
#[Pure]
function resourcebundle_count(ResourceBundle $bundle): int {}

/**
 * (PHP &gt;= 5.3.2, PECL intl &gt;= 2.0.0)<br/>
 * Get supported locales
 * @link https://php.net/manual/en/resourcebundle.locales.php
 * @param string $bundle <p>
 * Path of ResourceBundle for which to get available locales, or
 * empty string for default locales list.
 * </p>
 * @return array|false the list of locales supported by the bundle.
 */
#[Pure]
function resourcebundle_locales(string $bundle): array|false {}

/**
 * (PHP &gt;= 5.3.2, PECL intl &gt;= 2.0.0)<br/>
 * Get bundle's last error code.
 * @link https://php.net/manual/en/resourcebundle.geterrorcode.php
 * @param $bundle
 * @return int error code from last bundle object call.
 */
#[Pure(true)]
function resourcebundle_get_error_code(ResourceBundle $bundle): int {}

/**
 * (PHP &gt;= 5.3.2, PECL intl &gt;= 2.0.0)<br/>
 * Get bundle's last error message.
 * @link https://php.net/manual/en/resourcebundle.geterrormessage.php
 * @param $bundle
 * @return string error message from last bundle object's call.
 */
#[Pure(true)]
function resourcebundle_get_error_message(ResourceBundle $bundle): string {}

/**
 * (PHP &gt;= 5.4.0, PECL intl &gt;= 2.0.0)<br/>
 * Create a transliterator
 * @link https://php.net/manual/en/transliterator.create.php
 * @param string $id <p>
 * The id.
 * </p>
 * @param int $direction <p>
 * The direction, defaults to
 * Transliterator::FORWARD.
 * May also be set to
 * Transliterator::REVERSE.
 * </p>
 * @return Transliterator|null a <b>Transliterator</b> object on success,
 * or <b>NULL</b> on failure.
 * @since 5.4
 */
#[Pure]
function transliterator_create(string $id, int $direction = 0): ?Transliterator {}

/**
 * (PHP &gt;= 5.4.0, PECL intl &gt;= 2.0.0)<br/>
 * Create transliterator from rules
 * @link https://php.net/manual/en/transliterator.createfromrules.php
 * @param string $rules <p>
 * The rules.
 * </p>
 * @param int $direction <p>
 * The direction, defaults to
 * Transliterator::FORWARD.
 * May also be set to
 * Transliterator::REVERSE.
 * </p>
 * @return Transliterator|null a <b>Transliterator</b> object on success,
 * or <b>NULL</b> on failure.
 * @since 5.4
 */
#[Pure]
function transliterator_create_from_rules(string $rules, int $direction = 0): ?Transliterator {}

/**
 * (PHP &gt;= 5.4.0, PECL intl &gt;= 2.0.0)<br/>
 * Get transliterator IDs
 * @link https://php.net/manual/en/transliterator.listids.php
 * @return string[]|false An array of registered transliterator IDs on success,
 * or <b>FALSE</b> on failure.
 * @since 5.4
 */
#[Pure]
function transliterator_list_ids(): array|false {}

/**
 * (PHP &gt;= 5.4.0, PECL intl &gt;= 2.0.0)<br/>
 * Create an inverse transliterator
 * @link https://php.net/manual/en/transliterator.createinverse.php
 * @param Transliterator $transliterator
 * @return Transliterator|null a <b>Transliterator</b> object on success,
 * or <b>NULL</b> on failure
 * @since 5.4
 */
#[Pure]
function transliterator_create_inverse(Transliterator $transliterator): ?Transliterator {}

/**
 * (PHP &gt;= 5.4.0, PECL intl &gt;= 2.0.0)<br/>
 * Transliterate a string
 * @link https://php.net/manual/en/transliterator.transliterate.php
 * @param Transliterator|string $transliterator
 * @param string $string <p>
 * The string to be transformed.
 * </p>
 * @param int $start <p>
 * The start index (in UTF-16 code units) from which the string will start
 * to be transformed, inclusive. Indexing starts at 0. The text before will
 * be left as is.
 * </p>
 * @param int $end <p>
 * The end index (in UTF-16 code units) until which the string will be
 * transformed, exclusive. Indexing starts at 0. The text after will be
 * left as is.
 * </p>
 * @return string|false The transfomed string on success, or <b>FALSE</b> on failure.
 * @since 5.4
 */
#[Pure]
function transliterator_transliterate(Transliterator|string $transliterator, string $string, int $start = 0, int $end = -1): string|false {}

/**
 * (PHP &gt;= 5.4.0, PECL intl &gt;= 2.0.0)<br/>
 * Get last error code
 * @link https://php.net/manual/en/transliterator.geterrorcode.php
 * @param Transliterator $transliterator
 * @return int|false The error code on success,
 * or <b>FALSE</b> if none exists, or on failure.
 * @since 5.4
 */
#[Pure(true)]
function transliterator_get_error_code(Transliterator $transliterator): int|false {}

/**
 * (PHP &gt;= 5.4.0, PECL intl &gt;= 2.0.0)<br/>
 * Get last error message
 * @link https://php.net/manual/en/transliterator.geterrormessage.php
 * @param Transliterator $transliterator
 * @return string|false The error code on success,
 * or <b>FALSE</b> if none exists, or on failure.
 * @since 5.4
 */
#[Pure(true)]
function transliterator_get_error_message(Transliterator $transliterator): string|false {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get the last error code
 * @link https://php.net/manual/en/function.intl-get-error-code.php
 * @return int Error code returned by the last API function call.
 */
#[Pure(true)]
function intl_get_error_code(): int {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get description of the last error
 * @link https://php.net/manual/en/function.intl-get-error-message.php
 * @return string Description of an error occurred in the last API function call.
 */
#[Pure(true)]
function intl_get_error_message(): string {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Check whether the given error code indicates failure
 * @link https://php.net/manual/en/function.intl-is-failure.php
 * @param int $errorCode <p>
 * is a value that returned by functions:
 * <b>intl_get_error_code</b>,
 * <b>collator_get_error_code</b> .
 * </p>
 * @return bool <b>TRUE</b> if it the code indicates some failure, and <b>FALSE</b>
 * in case of success or a warning.
 */
#[Pure]
function intl_is_failure(int $errorCode): bool {}

/**
 * (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
 * Get symbolic name for a given error code
 * @link https://php.net/manual/en/function.intl-error-name.php
 * @param int $errorCode <p>
 * ICU error code.
 * </p>
 * @return string The returned string will be the same as the name of the error code
 * constant.
 */
#[Pure]
function intl_error_name(int $errorCode): string {}

/**
 * Gets the Decomposition_Mapping property for the given UTF-8 encoded code point
 *
 * @link https://www.php.net/manual/en/normalizer.getrawdecomposition.php
 *
 * @param string $string
 * @param int $form
 * @return string|null
 *
 * @since 7.3
 */
#[Pure]
function normalizer_get_raw_decomposition(string $string, #[ElementAvailable(from: '8.0')] int $form = Normalizer::FORM_C): ?string {}

/**
 * @return IntlTimeZone
 * @since 5.5
 */
#[Pure]
function intltz_create_default(): IntlTimeZone {}

/**
 * @return IntlTimeZone
 * @since 5.5
 */
#[Pure]
function intltz_get_gmt(): IntlTimeZone {}

/**
 * @return IntlTimeZone
 * @since 5.5
 */
#[Pure]
function intltz_get_unknown(): IntlTimeZone {}

/**
 * @param int $type
 * @param null|string $region
 * @param null|int $rawOffset
 * @return IntlIterator|false
 * @since 5.5
 */
#[Pure]
function intltz_create_time_zone_id_enumeration(int $type, ?string $region = null, ?int $rawOffset = null): IntlIterator|false {}

/**
 * @param string $timezoneId
 * @return string|false
 * @since 5.5
 */
#[Pure]
function intltz_get_region(string $timezoneId): string|false {}

/**
 * Set minimal number of days the first week in a year or month can have
 *
 * @link https://www.php.net/manual/en/intlcalendar.setminimaldaysinfirstweek.php
 *
 * @param IntlCalendar $calendar
 * @param int $days
 * @return bool
 *
 * @since 5.5.1
 */
function intlcal_set_minimal_days_in_first_week(IntlCalendar $calendar, int $days): bool {}

function intltz_get_windows_id(string $timezoneId): string|false {}

function intltz_get_id_for_windows_id(string $timezoneId, ?string $region = null): string|false {}

/**
 * Limit on locale length, set to 80 in PHP code. Locale names longer
 * than this limit will not be accepted.
 * @link https://php.net/manual/en/intl.constants.php
 */
define('INTL_MAX_LOCALE_LEN', 156);
define('INTL_ICU_VERSION', "72.1");
define('INTL_ICU_DATA_VERSION', "72.1");
define('ULOC_ACTUAL_LOCALE', 0);
define('ULOC_VALID_LOCALE', 1);
define('GRAPHEME_EXTR_COUNT', 0);
define('GRAPHEME_EXTR_MAXBYTES', 1);
define('GRAPHEME_EXTR_MAXCHARS', 2);
define('U_USING_FALLBACK_WARNING', -128);
define('U_ERROR_WARNING_START', -128);
define('U_USING_DEFAULT_WARNING', -127);
define('U_SAFECLONE_ALLOCATED_WARNING', -126);
define('U_STATE_OLD_WARNING', -125);
define('U_STRING_NOT_TERMINATED_WARNING', -124);
define('U_SORT_KEY_TOO_SHORT_WARNING', -123);
define('U_AMBIGUOUS_ALIAS_WARNING', -122);
define('U_DIFFERENT_UCA_VERSION', -121);
define('U_ERROR_WARNING_LIMIT', -119);
define('U_ZERO_ERROR', 0);
define('U_ILLEGAL_ARGUMENT_ERROR', 1);
define('U_MISSING_RESOURCE_ERROR', 2);
define('U_INVALID_FORMAT_ERROR', 3);
define('U_FILE_ACCESS_ERROR', 4);
define('U_INTERNAL_PROGRAM_ERROR', 5);
define('U_MESSAGE_PARSE_ERROR', 6);
define('U_MEMORY_ALLOCATION_ERROR', 7);
define('U_INDEX_OUTOFBOUNDS_ERROR', 8);
define('U_PARSE_ERROR', 9);
define('U_INVALID_CHAR_FOUND', 10);
define('U_TRUNCATED_CHAR_FOUND', 11);
define('U_ILLEGAL_CHAR_FOUND', 12);
define('U_INVALID_TABLE_FORMAT', 13);
define('U_INVALID_TABLE_FILE', 14);
define('U_BUFFER_OVERFLOW_ERROR', 15);
define('U_UNSUPPORTED_ERROR', 16);
define('U_RESOURCE_TYPE_MISMATCH', 17);
define('U_ILLEGAL_ESCAPE_SEQUENCE', 18);
define('U_UNSUPPORTED_ESCAPE_SEQUENCE', 19);
define('U_NO_SPACE_AVAILABLE', 20);
define('U_CE_NOT_FOUND_ERROR', 21);
define('U_PRIMARY_TOO_LONG_ERROR', 22);
define('U_STATE_TOO_OLD_ERROR', 23);
define('U_TOO_MANY_ALIASES_ERROR', 24);
define('U_ENUM_OUT_OF_SYNC_ERROR', 25);
define('U_INVARIANT_CONVERSION_ERROR', 26);
define('U_INVALID_STATE_ERROR', 27);
define('U_COLLATOR_VERSION_MISMATCH', 28);
define('U_USELESS_COLLATOR_ERROR', 29);
define('U_NO_WRITE_PERMISSION', 30);
define('U_STANDARD_ERROR_LIMIT', 32);
define('U_BAD_VARIABLE_DEFINITION', 65536);
define('U_PARSE_ERROR_START', 65536);
define('U_MALFORMED_RULE', 65537);
define('U_MALFORMED_SET', 65538);
define('U_MALFORMED_SYMBOL_REFERENCE', 65539);
define('U_MALFORMED_UNICODE_ESCAPE', 65540);
define('U_MALFORMED_VARIABLE_DEFINITION', 65541);
define('U_MALFORMED_VARIABLE_REFERENCE', 65542);
define('U_MISMATCHED_SEGMENT_DELIMITERS', 65543);
define('U_MISPLACED_ANCHOR_START', 65544);
define('U_MISPLACED_CURSOR_OFFSET', 65545);
define('U_MISPLACED_QUANTIFIER', 65546);
define('U_MISSING_OPERATOR', 65547);
define('U_MISSING_SEGMENT_CLOSE', 65548);
define('U_MULTIPLE_ANTE_CONTEXTS', 65549);
define('U_MULTIPLE_CURSORS', 65550);
define('U_MULTIPLE_POST_CONTEXTS', 65551);
define('U_TRAILING_BACKSLASH', 65552);
define('U_UNDEFINED_SEGMENT_REFERENCE', 65553);
define('U_UNDEFINED_VARIABLE', 65554);
define('U_UNQUOTED_SPECIAL', 65555);
define('U_UNTERMINATED_QUOTE', 65556);
define('U_RULE_MASK_ERROR', 65557);
define('U_MISPLACED_COMPOUND_FILTER', 65558);
define('U_MULTIPLE_COMPOUND_FILTERS', 65559);
define('U_INVALID_RBT_SYNTAX', 65560);
define('U_INVALID_PROPERTY_PATTERN', 65561);
define('U_MALFORMED_PRAGMA', 65562);
define('U_UNCLOSED_SEGMENT', 65563);
define('U_ILLEGAL_CHAR_IN_SEGMENT', 65564);
define('U_VARIABLE_RANGE_EXHAUSTED', 65565);
define('U_VARIABLE_RANGE_OVERLAP', 65566);
define('U_ILLEGAL_CHARACTER', 65567);
define('U_INTERNAL_TRANSLITERATOR_ERROR', 65568);
define('U_INVALID_ID', 65569);
define('U_INVALID_FUNCTION', 65570);
define('U_PARSE_ERROR_LIMIT', 65571);
define('U_UNEXPECTED_TOKEN', 65792);
define('U_FMT_PARSE_ERROR_START', 65792);
define('U_MULTIPLE_DECIMAL_SEPARATORS', 65793);
define('U_MULTIPLE_DECIMAL_SEPERATORS', 65793);
define('U_MULTIPLE_EXPONENTIAL_SYMBOLS', 65794);
define('U_MALFORMED_EXPONENTIAL_PATTERN', 65795);
define('U_MULTIPLE_PERCENT_SYMBOLS', 65796);
define('U_MULTIPLE_PERMILL_SYMBOLS', 65797);
define('U_MULTIPLE_PAD_SPECIFIERS', 65798);
define('U_PATTERN_SYNTAX_ERROR', 65799);
define('U_ILLEGAL_PAD_POSITION', 65800);
define('U_UNMATCHED_BRACES', 65801);
define('U_UNSUPPORTED_PROPERTY', 65802);
define('U_UNSUPPORTED_ATTRIBUTE', 65803);
define('U_FMT_PARSE_ERROR_LIMIT', 65812);
define('U_BRK_INTERNAL_ERROR', 66048);
define('U_BRK_ERROR_START', 66048);
define('U_BRK_HEX_DIGITS_EXPECTED', 66049);
define('U_BRK_SEMICOLON_EXPECTED', 66050);
define('U_BRK_RULE_SYNTAX', 66051);
define('U_BRK_UNCLOSED_SET', 66052);
define('U_BRK_ASSIGN_ERROR', 66053);
define('U_BRK_VARIABLE_REDFINITION', 66054);
define('U_BRK_MISMATCHED_PAREN', 66055);
define('U_BRK_NEW_LINE_IN_QUOTED_STRING', 66056);
define('U_BRK_UNDEFINED_VARIABLE', 66057);
define('U_BRK_INIT_ERROR', 66058);
define('U_BRK_RULE_EMPTY_SET', 66059);
define('U_BRK_UNRECOGNIZED_OPTION', 66060);
define('U_BRK_MALFORMED_RULE_TAG', 66061);
define('U_BRK_ERROR_LIMIT', 66062);
define('U_REGEX_INTERNAL_ERROR', 66304);
define('U_REGEX_ERROR_START', 66304);
define('U_REGEX_RULE_SYNTAX', 66305);
define('U_REGEX_INVALID_STATE', 66306);
define('U_REGEX_BAD_ESCAPE_SEQUENCE', 66307);
define('U_REGEX_PROPERTY_SYNTAX', 66308);
define('U_REGEX_UNIMPLEMENTED', 66309);
define('U_REGEX_MISMATCHED_PAREN', 66310);
define('U_REGEX_NUMBER_TOO_BIG', 66311);
define('U_REGEX_BAD_INTERVAL', 66312);
define('U_REGEX_MAX_LT_MIN', 66313);
define('U_REGEX_INVALID_BACK_REF', 66314);
define('U_REGEX_INVALID_FLAG', 66315);
define('U_REGEX_LOOK_BEHIND_LIMIT', 66316);
define('U_REGEX_SET_CONTAINS_STRING', 66317);
define('U_REGEX_ERROR_LIMIT', 66326);
define('U_IDNA_PROHIBITED_ERROR', 66560);
define('U_IDNA_ERROR_START', 66560);
define('U_IDNA_UNASSIGNED_ERROR', 66561);
define('U_IDNA_CHECK_BIDI_ERROR', 66562);
define('U_IDNA_STD3_ASCII_RULES_ERROR', 66563);
define('U_IDNA_ACE_PREFIX_ERROR', 66564);
define('U_IDNA_VERIFICATION_ERROR', 66565);
define('U_IDNA_LABEL_TOO_LONG_ERROR', 66566);
define('U_IDNA_ZERO_LENGTH_LABEL_ERROR', 66567);
define('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR', 66568);
define('U_IDNA_ERROR_LIMIT', 66569);
define('U_STRINGPREP_PROHIBITED_ERROR', 66560);
define('U_STRINGPREP_UNASSIGNED_ERROR', 66561);
define('U_STRINGPREP_CHECK_BIDI_ERROR', 66562);
define('U_ERROR_LIMIT', 66818);

/**
 * Prohibit processing of unassigned codepoints in the input for IDN
 * functions and do not check if the input conforms to domain name ASCII rules.
 * @link https://php.net/manual/en/intl.constants.php
 */
define('IDNA_DEFAULT', 0);

/**
 * Allow processing of unassigned codepoints in the input for IDN functions.
 * @link https://php.net/manual/en/intl.constants.php
 */
define('IDNA_ALLOW_UNASSIGNED', 1);

/**
 * Check if the input for IDN functions conforms to domain name ASCII rules.
 * @link https://php.net/manual/en/intl.constants.php
 */
define('IDNA_USE_STD3_RULES', 2);

/**
 * Check whether the input conforms to the BiDi rules.
 * Ignored by the IDNA2003 implementation, which always performs this check.
 * @link https://php.net/manual/en/intl.constants.php
 */
define('IDNA_CHECK_BIDI', 4);

/**
 * Check whether the input conforms to the CONTEXTJ rules.
 * Ignored by the IDNA2003 implementation, as this check is new in IDNA2008.
 * @link https://php.net/manual/en/intl.constants.php
 */
define('IDNA_CHECK_CONTEXTJ', 8);

/**
 * Option for nontransitional processing in
 * <b>idn_to_ascii</b>. Transitional processing is activated
 * by default. This option is ignored by the IDNA2003 implementation.
 * @link https://php.net/manual/en/intl.constants.php
 */
define('IDNA_NONTRANSITIONAL_TO_ASCII', 16);

/**
 * Option for nontransitional processing in
 * <b>idn_to_utf8</b>. Transitional processing is activated
 * by default. This option is ignored by the IDNA2003 implementation.
 * @link https://php.net/manual/en/intl.constants.php
 */
define('IDNA_NONTRANSITIONAL_TO_UNICODE', 32);

/**
 * Use IDNA 2003 algorithm in {@see idn_to_utf8} and
 * {@see idn_to_ascii}. This is the default.
 * @link https://php.net/manual/en/intl.constants.php
 * @deprecated 7.2 Use {@see INTL_IDNA_VARIANT_UTS46} instead.
 */
define('INTL_IDNA_VARIANT_2003', 0);

/**
 * Use UTS #46 algorithm in <b>idn_to_utf8</b> and
 * <b>idn_to_ascii</b>.
 * @link https://php.net/manual/en/intl.constants.php
 */
define('INTL_IDNA_VARIANT_UTS46', 1);

/**
 * Errors reported in a bitset returned by the UTS #46 algorithm in
 * <b>idn_to_utf8</b> and
 * <b>idn_to_ascii</b>.
 * @link https://php.net/manual/en/intl.constants.php
 */
define('IDNA_ERROR_EMPTY_LABEL', 1);
/**
 * @link https://secure.php.net/manual/en/migration54.global-constants.php
 * @since 5.4
 */
define('IDNA_ERROR_LABEL_TOO_LONG', 2);
/**
 * @link https://secure.php.net/manual/en/migration54.global-constants.php
 * @since 5.4
 */
define('IDNA_ERROR_DOMAIN_NAME_TOO_LONG', 4);
/**
 * @link https://secure.php.net/manual/en/migration54.global-constants.php
 * @since 5.4
 */
define('IDNA_ERROR_LEADING_HYPHEN', 8);
/**
 * @link https://secure.php.net/manual/en/migration54.global-constants.php
 * @since 5.4
 */
define('IDNA_ERROR_TRAILING_HYPHEN', 16);
/**
 * @link https://secure.php.net/manual/en/migration54.global-constants.php
 * @since 5.4
 */
define('IDNA_ERROR_HYPHEN_3_4', 32);
/**
 * @link https://secure.php.net/manual/en/migration54.global-constants.php
 * @since 5.4
 */
define('IDNA_ERROR_LEADING_COMBINING_MARK', 64);
/**
 * @link https://secure.php.net/manual/en/migration54.global-constants.php
 * @since 5.4
 */
define('IDNA_ERROR_DISALLOWED', 128);
/**
 * @link https://secure.php.net/manual/en/migration54.global-constants.php
 * @since 5.4
 */
define('IDNA_ERROR_PUNYCODE', 256);
/**
 * @link https://secure.php.net/manual/en/migration54.global-constants.php
 * @since 5.4
 */
define('IDNA_ERROR_LABEL_HAS_DOT', 512);
/**
 * @link https://secure.php.net/manual/en/migration54.global-constants.php
 * @since 5.4
 */
define('IDNA_ERROR_INVALID_ACE_LABEL', 1024);
/**
 * @link https://secure.php.net/manual/en/migration54.global-constants.php
 * @since 5.4
 */
define('IDNA_ERROR_BIDI', 2048);
/**
 * @link https://secure.php.net/manual/en/migration54.global-constants.php
 * @since 5.4
 */
define('IDNA_ERROR_CONTEXTJ', 4096);

/**
 * @since 5.5
 */
class IntlBreakIterator implements IteratorAggregate
{
    /* Constants */
    public const DONE = -1;
    public const WORD_NONE = 0;
    public const WORD_NONE_LIMIT = 100;
    public const WORD_NUMBER = 100;
    public const WORD_NUMBER_LIMIT = 200;
    public const WORD_LETTER = 200;
    public const WORD_LETTER_LIMIT = 300;
    public const WORD_KANA = 300;
    public const WORD_KANA_LIMIT = 400;
    public const WORD_IDEO = 400;
    public const WORD_IDEO_LIMIT = 500;
    public const LINE_SOFT = 0;
    public const LINE_SOFT_LIMIT = 100;
    public const LINE_HARD = 100;
    public const LINE_HARD_LIMIT = 200;
    public const SENTENCE_TERM = 0;
    public const SENTENCE_TERM_LIMIT = 100;
    public const SENTENCE_SEP = 100;
    public const SENTENCE_SEP_LIMIT = 200;

    /* Methods */
    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Private constructor for disallowing instantiation
     */
    private function __construct() {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Create break iterator for boundaries of combining character sequences
     * @link https://secure.php.net/manual/en/intlbreakiterator.createcharacterinstance.php
     * @param string $locale
     * @return IntlBreakIterator
     */
    #[TentativeType]
    public static function createCharacterInstance(#[TypeAware(['8.0' => 'string|null'], default: '')] $locale = null): ?IntlBreakIterator {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Create break iterator for boundaries of code points
     * @link https://secure.php.net/manual/en/intlbreakiterator.createcodepointinstance.php
     * @return IntlCodePointBreakIterator
     */
    #[TentativeType]
    public static function createCodePointInstance(): IntlCodePointBreakIterator {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Create break iterator for logically possible line breaks
     * @link https://secure.php.net/manual/en/intlbreakiterator.createlineinstance.php
     * @param string $locale [optional]
     * @return IntlBreakIterator|null
     */
    #[TentativeType]
    public static function createLineInstance(#[TypeAware(['8.0' => 'string|null'], default: '')] $locale): ?IntlBreakIterator {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Create break iterator for sentence breaks
     * @link https://secure.php.net/manual/en/intlbreakiterator.createsentenceinstance.php
     * @param string $locale [optional]
     * @return IntlBreakIterator|null
     */
    #[TentativeType]
    public static function createSentenceInstance(#[TypeAware(['8.0' => 'string|null'], default: '')] $locale): ?IntlBreakIterator {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Create break iterator for title-casing breaks
     * @link https://secure.php.net/manual/en/intlbreakiterator.createtitleinstance.php
     * @param string $locale [optional]
     * @return IntlBreakIterator|null
     */
    #[TentativeType]
    public static function createTitleInstance(#[TypeAware(['8.0' => 'string|null'], default: '')] $locale): ?IntlBreakIterator {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Create break iterator for word breaks
     * @link https://secure.php.net/manual/en/intlbreakiterator.createwordinstance.php
     * @param string $locale [optional]
     * @return IntlBreakIterator|null
     */
    #[TentativeType]
    public static function createWordInstance(#[TypeAware(['8.0' => 'string|null'], default: '')] $locale): ?IntlBreakIterator {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Get index of current position
     * @link https://secure.php.net/manual/en/intlbreakiterator.current.php
     * @return int
     */
    #[Pure]
    #[TentativeType]
    public function current(): int {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Set position to the first character in the text
     * @link https://secure.php.net/manual/en/intlbreakiterator.first.php
     */
    #[TentativeType]
    public function first(): int {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Advance the iterator to the first boundary following specified offset
     * @link https://secure.php.net/manual/en/intlbreakiterator.following.php
     * @param int $offset
     */
    #[TentativeType]
    public function following(#[TypeAware(['8.0' => 'int'], default: '')] $offset): int {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Get last error code on the object
     * @link https://secure.php.net/manual/en/intlbreakiterator.geterrorcode.php
     * @return int
     */
    #[Pure]
    #[TentativeType]
    public function getErrorCode(): int {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Get last error message on the object
     * @link https://secure.php.net/manual/en/intlbreakiterator.geterrormessage.php
     * @return string
     */
    #[Pure]
    #[TentativeType]
    public function getErrorMessage(): string {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Get the locale associated with the object
     * @link https://secure.php.net/manual/en/intlbreakiterator.getlocale.php
     * @param string $type
     */
    #[Pure]
    #[TentativeType]
    public function getLocale(#[TypeAware(['8.0' => 'int'], default: '')] $type): string|false {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Create iterator for navigating fragments between boundaries
     * @link https://secure.php.net/manual/en/intlbreakiterator.getpartsiterator.php
     * @param int $type [optional]
     * <p>
     * Optional key type. Possible values are:
     * </p><ul>
     * <li>
     * {@see IntlPartsIterator::KEY_SEQUENTIAL}
     * - The default. Sequentially increasing integers used as key.
     * </li>
     * <li>
     * {@see IntlPartsIterator::KEY_LEFT}
     * - Byte offset left of current part used as key.
     * </li>
     * <li>
     * {@see IntlPartsIterator::KEY_RIGHT}
     * - Byte offset right of current part used as key.
     * </li>
     * </ul>
     */
    #[Pure]
    #[TentativeType]
    public function getPartsIterator(
        #[TypeAware(['8.0' => 'int'], default: '')]
        #[EV([IntlPartsIterator::KEY_SEQUENTIAL, IntlPartsIterator::KEY_LEFT, IntlPartsIterator::KEY_RIGHT])]
        $type = IntlPartsIterator::KEY_SEQUENTIAL
    ): IntlPartsIterator {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Get the text being scanned
     * @link https://secure.php.net/manual/en/intlbreakiterator.gettext.php
     */
    #[Pure]
    #[TentativeType]
    public function getText(): ?string {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Tell whether an offset is a boundary's offset
     * @link https://secure.php.net/manual/en/intlbreakiterator.isboundary.php
     * @param int $offset
     */
    #[Pure]
    #[TentativeType]
    public function isBoundary(#[TypeAware(['8.0' => 'int'], default: '')] $offset): bool {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Set the iterator position to index beyond the last character
     * @link https://secure.php.net/manual/en/intlbreakiterator.last.php
     * @return int
     */
    #[TentativeType]
    public function last(): int {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * @link https://secure.php.net/manual/en/intlbreakiterator.next.php
     * @param int $offset [optional]
     * @return int
     */
    #[TentativeType]
    public function next(#[TypeAware(['8.0' => 'int|null'], default: '')] $offset = null): int {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * @link https://secure.php.net/manual/en/intlbreakiterator.preceding.php
     * @param int $offset
     */
    #[TentativeType]
    public function preceding(#[TypeAware(['8.0' => 'int'], default: '')] $offset): int {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Set the iterator position to the boundary immediately before the current
     * @link https://secure.php.net/manual/en/intlbreakiterator.previous.php
     * @return int
     */
    #[TentativeType]
    public function previous(): int {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Set the text being scanned
     * @link https://secure.php.net/manual/en/intlbreakiterator.settext.php
     * @param string $text
     */
    #[TentativeType]
    public function setText(#[TypeAware(['8.0' => 'string'], default: '')] $text): ?bool {}

    /**
     * @since 8.0
     * @return Iterator
     */
    #[Pure]
    public function getIterator(): Iterator {}
}

class IntlRuleBasedBreakIterator extends IntlBreakIterator implements Traversable
{
    /* Methods */
    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * @link https://secure.php.net/manual/en/intlbreakiterator.construct.php
     * @param string $rules
     * @param string $compiled [optional]
     */
    #[Pure]
    public function __construct(
        #[TypeAware(['8.0' => 'string'], default: '')] $rules,
        #[TypeAware(['8.0' => 'bool'], default: '')] $compiled = false
    ) {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Create break iterator for boundaries of combining character sequences
     * @link https://secure.php.net/manual/en/intlbreakiterator.createcharacterinstance.php
     * @param string $locale
     * @return IntlRuleBasedBreakIterator
     */
    public static function createCharacterInstance($locale) {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Create break iterator for boundaries of code points
     * @link https://secure.php.net/manual/en/intlbreakiterator.createcodepointinstance.php
     * @return IntlRuleBasedBreakIterator
     */
    public static function createCodePointInstance() {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Create break iterator for logically possible line breaks
     * @link https://secure.php.net/manual/en/intlbreakiterator.createlineinstance.php
     * @param string $locale [optional]
     * @return IntlRuleBasedBreakIterator
     */
    public static function createLineInstance($locale) {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Create break iterator for sentence breaks
     * @link https://secure.php.net/manual/en/intlbreakiterator.createsentenceinstance.php
     * @param string $locale [optional]
     * @return IntlRuleBasedBreakIterator
     */
    public static function createSentenceInstance($locale) {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Create break iterator for title-casing breaks
     * @link https://secure.php.net/manual/en/intlbreakiterator.createtitleinstance.php
     * @param string $locale [optional]
     * @return IntlRuleBasedBreakIterator
     */
    public static function createTitleInstance($locale) {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Create break iterator for word breaks
     * @link https://secure.php.net/manual/en/intlbreakiterator.createwordinstance.php
     * @param string $locale [optional]
     * @return IntlRuleBasedBreakIterator
     */
    public static function createWordInstance($locale) {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * @link https://secure.php.net/manual/en/intlrulebasedbreakiterator.getbinaryrules.php
     * Get the binary form of compiled rules
     * @return string
     */
    #[Pure]
    #[TentativeType]
    public function getBinaryRules(): string|false {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * @link https://secure.php.net/manual/en/intlrulebasedbreakiterator.getrules.php
     * Get the rule set used to create this object
     * @return string|false
     */
    #[Pure]
    #[TentativeType]
    public function getRules(): string|false {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * @link https://secure.php.net/manual/en/intlrulebasedbreakiterator.getrulesstatus.php
     * Get the largest status value from the break rules that determined the current break position
     * @return int
     */
    #[Pure]
    #[TentativeType]
    public function getRuleStatus(): int {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * @link https://secure.php.net/manual/en/intlrulebasedbreakiterator.getrulestatusvec.php
     * Get the status values from the break rules that determined the current break position
     * @return array|false
     */
    #[Pure]
    #[TentativeType]
    public function getRuleStatusVec(): array|false {}
}

/**
 * @link https://www.php.net/manual/en/class.intlpartsiterator.php
 * @since 5.5
 */
class IntlPartsIterator extends IntlIterator implements Iterator
{
    public const KEY_SEQUENTIAL = 0;
    public const KEY_LEFT = 1;
    public const KEY_RIGHT = 2;

    /**
     * @return IntlBreakIterator
     */
    #[Pure]
    #[TentativeType]
    public function getBreakIterator(): IntlBreakIterator {}

    /**
     * @since 8.1
     */
    #[TentativeType]
    public function getRuleStatus(): int {}
}

class IntlCodePointBreakIterator extends IntlBreakIterator implements Traversable
{
    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Get last code point passed over after advancing or receding the iterator
     * @link https://secure.php.net/manual/en/intlcodepointbreakiterator.getlastcodepoint.php
     * @return int
     */
    #[Pure]
    #[TentativeType]
    public function getLastCodePoint(): int {}
}

class UConverter
{
    /* Constants */
    public const REASON_UNASSIGNED = 0;
    public const REASON_ILLEGAL = 1;
    public const REASON_IRREGULAR = 2;
    public const REASON_RESET = 3;
    public const REASON_CLOSE = 4;
    public const REASON_CLONE = 5;
    public const UNSUPPORTED_CONVERTER = -1;
    public const SBCS = 0;
    public const DBCS = 1;
    public const MBCS = 2;
    public const LATIN_1 = 3;
    public const UTF8 = 4;
    public const UTF16_BigEndian = 5;
    public const UTF16_LittleEndian = 6;
    public const UTF32_BigEndian = 7;
    public const UTF32_LittleEndian = 8;
    public const EBCDIC_STATEFUL = 9;
    public const ISO_2022 = 10;
    public const LMBCS_1 = 11;
    public const LMBCS_2 = 12;
    public const LMBCS_3 = 13;
    public const LMBCS_4 = 14;
    public const LMBCS_5 = 15;
    public const LMBCS_6 = 16;
    public const LMBCS_8 = 17;
    public const LMBCS_11 = 18;
    public const LMBCS_16 = 19;
    public const LMBCS_17 = 20;
    public const LMBCS_18 = 21;
    public const LMBCS_19 = 22;
    public const LMBCS_LAST = 22;
    public const HZ = 23;
    public const SCSU = 24;
    public const ISCII = 25;
    public const US_ASCII = 26;
    public const UTF7 = 27;
    public const BOCU1 = 28;
    public const UTF16 = 29;
    public const UTF32 = 30;
    public const CESU8 = 31;
    public const IMAP_MAILBOX = 32;

    /* Methods */
    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Create UConverter object
     * @link https://php.net/manual/en/uconverter.construct.php
     * @param string $destination_encoding
     * @param string $source_encoding
     */
    #[Pure]
    public function __construct(
        #[TypeAware(['8.0' => 'string|null'], default: '')] $destination_encoding = null,
        #[TypeAware(['8.0' => 'string|null'], default: '')] $source_encoding = null
    ) {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Convert string from one charset to anothe
     * @link https://php.net/manual/en/uconverter.convert.php
     * @param string $str
     * @param bool $reverse [optional]
     * @return string|false
     */
    #[Pure]
    #[TentativeType]
    public function convert(
        #[TypeAware(['8.0' => 'string'], default: '')] $str,
        #[TypeAware(['8.0' => 'bool'], default: '')] $reverse = false
    ): string|false {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Default "from" callback function
     * @link https://php.net/manual/en/uconverter.fromucallback.php
     * @param int $reason
     * @param string $source
     * @param string $codePoint
     * @param int &$error
     * @return array|string|int|null
     */
    #[TentativeType]
    public function fromUCallback(
        #[TypeAware(['8.0' => 'int'], default: '')] $reason,
        #[TypeAware(['8.0' => 'array'], default: '')] $source,
        #[TypeAware(['8.0' => 'int'], default: '')] $codePoint,
        &$error
    ): array|string|int|null {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Get the aliases of the given name
     * @link https://php.net/manual/en/uconverter.getaliases.php
     * @param string $name
     * @return array|false|null
     */
    #[TentativeType]
    public static function getAliases(
        #[ElementAvailable(from: '5.5', to: '5.6')] $name = '',
        #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'string'], default: '')] $name
    ): array|false|null {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Get the available canonical converter names
     * @link https://php.net/manual/en/uconverter.getavailable.php
     * @return array
     */
    #[TentativeType]
    public static function getAvailable(): array {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Get the destination encoding
     * @link https://php.net/manual/en/uconverter.getdestinationencoding.php
     * @return string|false|null
     */
    #[Pure]
    #[TentativeType]
    public function getDestinationEncoding(): string|false|null {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Get the destination converter type
     * @link https://php.net/manual/en/uconverter.getdestinationtype.php
     * @return int|false|null
     */
    #[Pure]
    #[TentativeType]
    public function getDestinationType(): int|false|null {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Get last error code on the object
     * @link https://php.net/manual/en/uconverter.geterrorcode.php
     * @return int
     */
    #[Pure]
    #[TentativeType]
    public function getErrorCode(): int {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Get last error message on the object
     * @link https://php.net/manual/en/uconverter.geterrormessage.php
     * @return string|null
     */
    #[Pure]
    #[TentativeType]
    public function getErrorMessage(): ?string {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Get the source encoding
     * @link https://php.net/manual/en/uconverter.getsourceencoding.php
     * @return string|false|null
     */
    #[Pure]
    #[TentativeType]
    public function getSourceEncoding(): string|false|null {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Get the source convertor type
     * @link https://php.net/manual/en/uconverter.getsourcetype.php
     * @return int|false|null
     */
    #[Pure]
    #[TentativeType]
    public function getSourceType(): int|false|null {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Get standards associated to converter names
     * @link https://php.net/manual/en/uconverter.getstandards.php
     * @return array|null
     */
    #[Pure]
    #[TentativeType]
    public static function getStandards(): ?array {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Get substitution chars
     * @link https://php.net/manual/en/uconverter.getsubstchars.php
     * @return string|false|null
     */
    #[Pure]
    #[TentativeType]
    public function getSubstChars(): string|false|null {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Get string representation of the callback reason
     * @link https://php.net/manual/en/uconverter.reasontext.php
     * @param int $reason
     * @return string
     */
    #[Pure]
    #[TentativeType]
    public static function reasonText(
        #[ElementAvailable(from: '5.3', to: '7.4')] $reason = 0,
        #[ElementAvailable(from: '8.0')] int $reason
    ): string {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Set the destination encoding
     * @link https://php.net/manual/en/uconverter.setdestinationencoding.php
     * @param string $encoding
     * @return bool
     */
    #[TentativeType]
    public function setDestinationEncoding(#[TypeAware(['8.0' => 'string'], default: '')] $encoding): bool {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Set the source encoding
     * @link https://php.net/manual/en/uconverter.setsourceencoding.php
     * @param string $encoding
     * @return bool
     */
    #[TentativeType]
    public function setSourceEncoding(#[TypeAware(['8.0' => 'string'], default: '')] $encoding): bool {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Set the substitution chars
     * @link https://php.net/manual/en/uconverter.setsubstchars.php
     * @param string $chars
     * @return bool
     */
    #[TentativeType]
    public function setSubstChars(#[TypeAware(['8.0' => 'string'], default: '')] $chars): bool {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Default "to" callback function
     * @link https://php.net/manual/en/uconverter.toucallback.php
     * @param int $reason
     * @param string $source
     * @param string $codeUnits
     * @param int &$error
     * @return array|string|int|null
     */
    #[TentativeType]
    public function toUCallback(
        #[TypeAware(['8.0' => 'int'], default: '')] $reason,
        #[TypeAware(['8.0' => 'string'], default: '')] $source,
        #[TypeAware(['8.0' => 'string'], default: '')] $codeUnits,
        &$error
    ): array|string|int|null {}

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Convert string from one charset to another
     * @link https://php.net/manual/en/uconverter.transcode.php
     * @param string $str
     * @param string $toEncoding
     * @param string $fromEncoding
     * @param array $options
     * @return string|false
     */
    #[TentativeType]
    public static function transcode(
        #[TypeAware(['8.0' => 'string'], default: '')] $str,
        #[TypeAware(['8.0' => 'string'], default: '')] $toEncoding,
        #[TypeAware(['8.0' => 'string'], default: '')] $fromEncoding,
        ?array $options = []
    ): string|false {}
}
// End of intl v.1.1.0
<?php

/**
 * @since 8.1
 */
class IntlDatePatternGenerator
{
    public function __construct(?string $locale = null) {}

    public static function create(?string $locale = null): ?IntlDatePatternGenerator {}

    public function getBestPattern(string $skeleton): string|false {}
}
<?php
/**
 * Indicates that the pattern is a glob-style string pattern.
 * @link https://www.php.net/manual/en/expect.constants.php
 */
const EXP_GLOB = 1;
/**
 * Indicates that the pattern is an exact string.
 * @link https://www.php.net/manual/en/expect.constants.php
 */
const EXP_EXACT = 2;
/**
 * Indicates that the pattern is a regexp-style string pattern.
 * @link https://www.php.net/manual/en/expect.constants.php
 */
const EXP_REGEXP = 3;
/**
 * Value, returned by <em>expect_expectl()</em>, when <b>EOF</b> is reached.
 * @link https://www.php.net/manual/en/expect.constants.php
 */
const EXP_EOF = -11;
/**
 * Value, returned by <em>expect_expectl()</em> upon timeout of seconds, specified in value of <b>expect.timeout</b>
 * @link https://www.php.net/manual/en/expect.constants.php
 */
const EXP_TIMEOUT = -2;
/**
 * Value, returned by <em>expect_expectl()</em> if no pattern have been matched.
 * @link https://www.php.net/manual/en/expect.constants.php
 */
const EXP_FULLBUFFER = -5;

/**
 * Execute command via Bourne shell, and open the PTY stream to the process
 *
 * @param string $command Command to execute.
 * @return resource|false Returns an open PTY stream to the processes stdio, stdout, and stderr.
 *                        On failure this function returns FALSE.
 * @since PECL expect >= 0.1.0
 * @link https://www.php.net/manual/en/function.expect-popen.php
 */
function expect_popen(string $command)
{
    unset($command);
    return false;
}

/**
 * Waits until the output from a process matches one of the patterns, a specified time period has passed,
 * or an EOF is seen.
 *
 * If match is provided, then it is filled with the result of search. The matched string can be found in match[0].
 * The match substrings (according to the parentheses) in the original pattern can be found in match[1], match[2],
 * and so on, up to match[9] (the limitation of libexpect).
 *
 * @param resource $expect An Expect stream, previously opened with expect_popen()
 * @param array $cases <p>An array of expect cases. Each expect case is an indexed array, as described in the following table:</p>
 * <p>
 * <tr valign="top">
 * <td>Index Key</td>
 * <td>Value Type</td>
 * <td>Description</td>
 * <td>Is Mandatory</td>
 * <td>Default Value</td>
 * </tr>
 * <tr valign="top">
 * <td>0</td>
 * <td>string</td>
 * <td>pattern, that will be matched against the output from the stream</td>
 * <td>Yes</td>
 * <td></td>
 * </tr>
 * <tr valign="top">
 * <td>1</td>
 * <td>mixed</td>
 * <td>value, that will be returned by this function, if the pattern matches</td>
 * <td>Yes</td>
 * <td></td>
 * </tr>
 * <tr valign="top">
 * <td>2</td>
 * <td>integer</td>
 * <td>pattern type, one of: <b>EXP_GLOB</b>, <b>EXP_EXACT</b> or <b>EXP_REGEXP</b></td>
 * <td>No</td>
 * <td><b>EXP_GLOB</b></td>
 * </tr>
 * </p>
 * @param array &$match
 *
 * @return int Returns value associated with the pattern that was matched.
 * 			   On failure this function returns: <b>EXP_EOF</b>, <b>EXP_TIMEOUT</b> or <b>EXP_FULLBUFFER</b>
 * @since PECL expect >= 0.1.0
 * @link https://www.php.net/manual/en/function.expect-expectl.php
 */
function expect_expectl($expect, array $cases, array &$match = []): int
{
    unset($expect, $cases, $match);
    return 0;
}
<?php

namespace Crypto;

/**
 * Class providing cipher algorithms
 */
class Cipher
{
    public const MODE_ECB = 1;
    public const MODE_CBC = 2;
    public const MODE_CFB = 3;
    public const MODE_OFB = 4;
    public const MODE_CTR = 5;
    public const MODE_GCM = 6;
    public const MODE_CCM = 7;
    public const MODE_XTS = 65537;

    /**
     * Returns cipher algorithms
     * @param bool $aliases
     * @param string $prefix
     * @return string
     */
    public static function getAlgorithms($aliases = false, $prefix = null) {}

    /**
     * Finds out whether algorithm exists
     * @param string $algorithm
     * @return bool
     */
    public static function hasAlgorithm($algorithm) {}

    /**
     * Finds out whether the cipher mode is defined in the used OpenSSL library
     * @param int $mode
     * @return bool
     */
    public static function hasMode($mode) {}

    /**
     * Cipher magic method for calling static methods
     * @param string $name
     * @param array $arguments
     */
    public static function __callStatic($name, $arguments) {}

    /**
     * Cipher constructor
     * @param string $algorithm
     * @param int $mode
     * @param string $key_size
     */
    public function __construct($algorithm, $mode = null, $key_size = null) {}

    /**
     * Returns cipher algorithm string
     * @return string
     */
    public function getAlgorithmName() {}

    /**
     * Initializes cipher encryption
     * @param string $key
     * @param string $iv
     * @return bool
     */
    public function encryptInit($key, $iv = null) {}

    /**
     * Updates cipher encryption
     * @param string $data
     * @return string
     */
    public function encryptUpdate($data) {}

    /**
     * Finalizes cipher encryption
     * @return string
     */
    public function encryptFinish() {}

    /**
     * Encrypts text to ciphertext
     * @param string $data
     * @param string $key
     * @param string $iv
     * @return string
     */
    public function encrypt($data, $key, $iv = null) {}

    /**
     * Initializes cipher decryption
     * @param string $key
     * @param string $iv
     * @return null
     */
    public function decryptInit($key, $iv = null) {}

    /**
     * Updates cipher decryption
     * @param string $data
     * @return string
     */
    public function decryptUpdate($data) {}

    /**
     * Finalizes cipher decryption
     * @return string
     */
    public function decryptFinish() {}

    /**
     * Decrypts ciphertext to decrypted text
     * @param string $data
     * @param string $key
     * @param string $iv
     * @return string
     */
    public function decrypt($data, $key, $iv = null) {}

    /**
     * Returns cipher block size
     * @return int
     */
    public function getBlockSize() {}

    /**
     * Returns cipher key length
     * @return int
     */
    public function getKeyLength() {}

    /**
     * Returns cipher IV length
     * @return int
     */
    public function getIVLength() {}

    /**
     * Returns cipher mode
     * @return int
     */
    public function getMode() {}

    /**
     * Returns authentication tag
     * @return string
     */
    public function getTag() {}

    /**
     * Sets authentication tag
     * @param string $tag
     * @return bool
     */
    public function setTag($tag) {}

    /**
     * Set authentication tag length
     * @param int $tag_length
     * @return bool
     */
    public function setTagLength($tag_length) {}

    /**
     * Sets additional application data for authenticated encryption
     * @param string $aad
     * @return bool
     */
    public function setAAD($aad) {}
}

/**
 * Exception class for cipher errors
 */
class CipherException extends \Exception
{
    /**
     * Cipher '%s' algorithm not found
     */
    public const ALGORITHM_NOT_FOUND = 1;

    /**
     * Cipher static method '%s' not found
     */
    public const STATIC_METHOD_NOT_FOUND = 2;

    /**
     * Cipher static method %s can accept max two arguments
     */
    public const STATIC_METHOD_TOO_MANY_ARGS = 3;

    /**
     * Cipher mode not found
     */
    public const MODE_NOT_FOUND = 4;

    /**
     * Cipher mode %s is not available in installed OpenSSL library
     */
    public const MODE_NOT_AVAILABLE = 5;

    /**
     * The authentication is not supported for %s cipher mode
     */
    public const AUTHENTICATION_NOT_SUPPORTED = 6;

    /**
     * Invalid length of key for cipher '%s' algorithm (required length: %d)
     */
    public const KEY_LENGTH_INVALID = 7;

    /**
     * Invalid length of initial vector for cipher '%s' algorithm (required length: %d)
     */
    public const IV_LENGTH_INVALID = 8;

    /**
     * AAD setter has to be called before encryption or decryption
     */
    public const AAD_SETTER_FORBIDDEN = 9;

    /**
     * AAD setter failed
     */
    public const AAD_SETTER_FAILED = 10;

    /**
     * AAD length can't exceed max integer length
     */
    public const AAD_LENGTH_HIGH = 11;

    /**
     * Tag getter has to be called after encryption
     */
    public const TAG_GETTER_FORBIDDEN = 12;

    /**
     * Tag setter has to be called before decryption
     */
    public const TAG_SETTER_FORBIDDEN = 13;

    /**
     * Tag getter failed
     */
    public const TAG_GETTER_FAILED = 14;

    /**
     * Tag setter failed
     */
    public const TAG_SETTER_FAILED = 15;

    /**
     * Tag length setter has to be called before encryption
     */
    public const TAG_LENGTH_SETTER_FORBIDDEN = 16;

    /**
     * Tag length can't be lower than 32 bits (4 characters)
     */
    public const TAG_LENGTH_LOW = 17;

    /**
     * Tag length can't exceed 128 bits (16 characters)
     */
    public const TAG_LENGTH_HIGH = 18;

    /**
     * Tag verification failed
     */
    public const TAG_VERIFY_FAILED = 19;

    /**
     * Initialization of cipher algorithm failed
     */
    public const INIT_ALG_FAILED = 20;

    /**
     * Initialization of cipher context failed
     */
    public const INIT_CTX_FAILED = 21;

    /**
     * Cipher object is already used for decryption
     */
    public const INIT_ENCRYPT_FORBIDDEN = 22;

    /**
     * Cipher object is already used for encryption
     */
    public const INIT_DECRYPT_FORBIDDEN = 23;

    /**
     * Updating of cipher failed
     */
    public const UPDATE_FAILED = 24;

    /**
     * Cipher object is not initialized for encryption
     */
    public const UPDATE_ENCRYPT_FORBIDDEN = 25;

    /**
     * Cipher object is not initialized for decryption
     */
    public const UPDATE_DECRYPT_FORBIDDEN = 26;

    /**
     * Finalizing of cipher failed
     */
    public const FINISH_FAILED = 27;

    /**
     * Cipher object is not initialized for encryption
     */
    public const FINISH_ENCRYPT_FORBIDDEN = 28;

    /**
     * Cipher object is not initialized for decryption
     */
    public const FINISH_DECRYPT_FORBIDDEN = 29;

    /**
     * Input data length can't exceed max integer length
     */
    public const INPUT_DATA_LENGTH_HIGH = 30;
}

/**
 * Class providing hash algorithms
 */
class Hash
{
    /**
     * Returns hash algorithms
     * @param bool $aliases
     * @param string $prefix
     * @return string
     */
    public static function getAlgorithms($aliases = false, $prefix = null) {}

    /**
     * Finds out whether algorithm exists
     * @param string $algorithm
     * @return bool
     */
    public static function hasAlgorithm($algorithm) {}

    /**
     * Hash magic method for calling static methods
     * @param string $name
     * @param array $arguments
     */
    public static function __callStatic($name, $arguments) {}

    /**
     * Hash constructor
     * @param string $algorithm
     */
    public function __construct($algorithm) {}

    /**
     * Returns hash algorithm string
     * @return string
     */
    public function getAlgorithmName() {}

    /**
     * Updates hash
     * @param string $data
     * @return null
     */
    public function update($data) {}

    /**
     * Return hash digest in raw foramt
     * @return string
     */
    public function digest() {}

    /**
     * Return hash digest in hex format
     * @return string
     */
    public function hexdigest() {}

    /**
     * Returns hash block size
     * @return int
     */
    public function getBlockSize() {}

    /**
     * Returns hash size
     * @return int
     */
    public function getSize() {}
}

/**
 * Exception class for hash errors
 */
class HashException extends \Exception
{
    /**
     * Hash algorithm '%s' not found
     */
    public const HASH_ALGORITHM_NOT_FOUND = 1;

    /**
     * Hash static method '%s' not found
     */
    public const STATIC_METHOD_NOT_FOUND = 2;

    /**
     * Hash static method %s can accept max one argument
     */
    public const STATIC_METHOD_TOO_MANY_ARGS = 3;

    /**
     * Initialization of hash failed
     */
    public const INIT_FAILED = 4;

    /**
     * Updating of hash context failed
     */
    public const UPDATE_FAILED = 5;

    /**
     * Creating of hash digest failed
     */
    public const DIGEST_FAILED = 6;

    /**
     * Input data length can't exceed max integer length
     */
    public const INPUT_DATA_LENGTH_HIGH = 7;
}

/**
 * Abstract class for MAC subclasses
 */
abstract class MAC extends Hash
{
    /**
     * Create a MAC (used by MAC subclasses - HMAC and CMAC)
     * @param string $algorithm
     * @param string $key
     */
    public function __construct($algorithm, $key) {}
}

/**
 * Exception class for MAC errors
 */
class MACException extends HashException
{
    /**
     * MAC algorithm '%s' not found
     */
    public const MAC_ALGORITHM_NOT_FOUND = 1;

    /**
     * The key length for MAC is invalid
     */
    public const KEY_LENGTH_INVALID = 2;
}

/**
 * Class providing HMAC functionality
 */
class HMAC extends MAC {}

/**
 * Class providing CMAC functionality
 */
class CMAC extends MAC {}

/**
 * Abstract class for KDF subclasses
 */
abstract class KDF
{
    /**
     * KDF constructor
     * @param int $length
     * @param string $salt
     */
    public function __construct($length, $salt = null) {}

    /**
     * Get key length
     * @return int
     */
    public function getLength() {}

    /**
     * Set key length
     * @param int $length
     * @return bool
     */
    public function setLength($length) {}

    /**
     * Get salt
     * @return string
     */
    public function getSalt() {}

    /**
     * Set salt
     * @param string $salt
     * @return bool
     */
    public function setSalt($salt) {}
}

/**
 * Exception class for KDF errors
 */
class KDFException
{
    /**
     * The key length is too low
     */
    public const KEY_LENGTH_LOW = 1;

    /**
     * The key length is too high
     */
    public const KEY_LENGTH_HIGH = 2;

    /**
     * The salt is too long
     */
    public const SALT_LENGTH_HIGH = 3;

    /**
     * The password is too long
     */
    public const PASSWORD_LENGTH_INVALID = 4;

    /**
     * KDF derivation failed
     */
    public const DERIVATION_FAILED = 5;
}

/**
 * Class providing PBKDF2 functionality
 */
class PBKDF2 extends KDF
{
    /**
     * KDF constructor
     * @param string $hashAlgorithm
     * @param int $length
     * @param string $salt
     * @param int $iterations
     */
    public function __construct($hashAlgorithm, $length, $salt = null, $iterations = 1000) {}

    /**
     * Deriver hash for password
     * @param string $password
     * @return string
     */
    public function derive($password) {}

    /**
     * Get iterations
     * @return int
     */
    public function getIterations() {}

    /**
     * Set iterations
     * @param int $iterations
     * @return bool
     */
    public function setIterations($iterations) {}

    /**
     * Get hash algorithm
     * @return string
     */
    public function getHashAlgorithm() {}

    /**
     * Set hash algorithm
     * @param string $hashAlgorithm
     * @return bool
     */
    public function setHashAlgorithm($hashAlgorithm) {}
}

/**
 * Exception class for PBKDF2 errors
 */
class PBKDF2Exception extends KDFException
{
    /**
     * Hash algorithm '%s' not found
     */
    public const HASH_ALGORITHM_NOT_FOUND = 1;

    /**
     * Iterations count is too high
     */
    public const ITERATIONS_HIGH = 2;
}

/**
 * Class for base64 encoding and docoding
 */
class Base64
{
    /**
     * Encodes string $data to base64 encoding
     * @param string $data
     * @return string
     */
    public function encode($data) {}

    /**
     * Decodes base64 string $data to raw encoding
     * @param string $data
     * @return string
     */
    public function decode($data) {}

    /**
     * Base64 constructor
     */
    public function __construct() {}

    /**
     * Encodes block of characters from $data and saves the reminder of the last block
     * to the encoding context
     * @param string $data
     */
    public function encodeUpdate($data) {}

    /**
     * Encodes characters that left in the encoding context
     */
    public function encodeFinish() {}

    /**
     * Decodes block of characters from $data and saves the reminder of the last block
     * to the encoding context
     * @param string $data
     */
    public function decodeUpdate($data) {}

    /**
     * Decodes characters that left in the encoding context
     */
    public function decodeFinish() {}
}

/**
 * Exception class for base64 errors
 */
class Base64Exception extends \Exception
{
    /**
     * The object is already used for decoding
     */
    public const ENCODE_UPDATE_FORBIDDEN = 1;

    /**
     * The object has not been initialized for encoding
     */
    public const ENCODE_FINISH_FORBIDDEN = 2;

    /**
     * The object is already used for encoding
     */
    public const DECODE_UPDATE_FORBIDDEN = 3;

    /**
     * The object has not been initialized for decoding
     */
    public const DECODE_FINISH_FORBIDDEN = 4;

    /**
     * Base64 decoded string does not contain valid characters
     */
    public const DECODE_UPDATE_FAILED = 5;

    /**
     * Input data length can't exceed max integer length
     */
    public const INPUT_DATA_LENGTH_HIGH = 6;
}

/**
 * Class for generating random numbers
 */
class Rand
{
    /**
     * Generates pseudo random bytes
     * @param int $num
     * @param bool $must_be_strong
     * @param bool &$returned_strong_result
     * @return string
     */
    public static function generate($num, $must_be_strong = true, &$returned_strong_result = true) {}

    /**
     * Mixes bytes in $buf into PRNG state
     * @param string $buf
     * @param float $entropy [optional] The default value is (float) strlen($buf)
     * @return null
     */
    public static function seed($buf, $entropy) {}

    /**
     * Cleans up PRNG state
     * @return null
     */
    public static function cleanup() {}

    /**
     * Reads a number of bytes from file $filename and adds them to the PRNG. If
     * max_bytes is non-negative, up to to max_bytes are read; if $max_bytes is
     * negative, the complete file is read
     * @param string $filename
     * @param int $max_bytes
     * @return int
     */
    public static function loadFile($filename, $max_bytes = -1) {}

    /**
     * Writes a number of random bytes (currently 1024) to file $filename which can be
     * used to initializethe PRNG by calling Crypto\Rand::loadFile() in a later session
     * @param string $filename
     * @return int
     */
    public static function writeFile($filename) {}
}

/**
 * Exception class for rand errors
 */
class RandException extends \Exception
{
    /**
     * The PRNG state is not yet unpredictable
     */
    public const GENERATE_PREDICTABLE = 1;

    /**
     * The bytes written were generated without appropriate seed
     */
    public const FILE_WRITE_PREDICTABLE = 2;

    /**
     * The requested number of bytes is too high
     */
    public const REQUESTED_BYTES_NUMBER_TOO_HIGH = 3;

    /**
     * The supplied seed length is too high
     */
    public const SEED_LENGTH_TOO_HIGH = 4;
}
<?php

use JetBrains\PhpStorm\ExpectedValues;

/** GNUPG Constants
 * @link https://php.net/manual/en/gnupg.constants.php
 */
define('GNUPG_SIG_MODE_NORMAL', 0);
define('GNUPG_SIG_MODE_DETACH', 1);
define('GNUPG_SIG_MODE_CLEAR', 2);
define('GNUPG_VALIDITY_UNKNOWN', 0);
define('GNUPG_VALIDITY_UNDEFINED', 1);
define('GNUPG_VALIDITY_NEVER', 2);
define('GNUPG_VALIDITY_MARGINAL', 3);
define('GNUPG_VALIDITY_FULL', 4);
define('GNUPG_VALIDITY_ULTIMATE', 5);
define('GNUPG_PROTOCOL_OpenPGP', 0);
define('GNUPG_PROTOCOL_CMS', 1);
define('GNUPG_SIGSUM_VALID', 1);
define('GNUPG_SIGSUM_GREEN', 2);
define('GNUPG_SIGSUM_RED', 4);
define('GNUPG_SIGSUM_KEY_REVOKED', 16);
define('GNUPG_SIGSUM_KEY_EXPIRED', 32);
define('GNUPG_SIGSUM_SIG_EXPIRED', 64);
define('GNUPG_SIGSUM_KEY_MISSING', 128);
define('GNUPG_SIGSUM_CRL_MISSING', 256);
define('GNUPG_SIGSUM_CRL_TOO_OLD', 512);
define('GNUPG_SIGSUM_BAD_POLICY', 1024);
define('GNUPG_SIGSUM_SYS_ERROR', 2048);
define('GNUPG_ERROR_WARNING', 1);
define('GNUPG_ERROR_EXCEPTION', 2);
define('GNUPG_ERROR_SILENT', 3);
define('GNUPG_PK_RSA', 1);
define('GNUPG_PK_RSA_E', 2);
define('GNUPG_PK_RSA_S', 3);
define('GNUPG_PK_DSA', 17);
define('GNUPG_PK_ELG', 20);
define('GNUPG_PK_ELG_E', 16);
define('GNUPG_PK_ECC', 18);
define('GNUPG_PK_ECDSA', 301);
define('GNUPG_PK_ECDH', 302);
define('GNUPG_PK_EDDSA', 303);
define('GNUPG_GPGME_VERSION', '1.15.1');

/**
 * GNUPG Encryption Class
 * @link https://php.net/manual/en/book.gnupg.php
 * Class gnupg
 */
class gnupg
{
    public const SIG_MODE_NORMAL = 0;
    public const SIG_MODE_DETACH = 1;
    public const SIG_MODE_CLEAR = 2;
    public const VALIDITY_UNKNOWN = 0;
    public const VALIDITY_UNDEFINED = 1;
    public const VALIDITY_NEVER = 2;
    public const VALIDITY_MARGINAL = 3;
    public const VALIDITY_FULL = 4;
    public const VALIDITY_ULTIMATE = 5;
    public const PROTOCOL_OpenPGP = 0;
    public const PROTOCOL_CMS = 1;
    public const SIGSUM_VALID = 1;
    public const SIGSUM_GREEN = 2;
    public const SIGSUM_RED = 4;
    public const SIGSUM_KEY_REVOKED = 16;
    public const SIGSUM_KEY_EXPIRED = 32;
    public const SIGSUM_SIG_EXPIRED = 64;
    public const SIGSUM_KEY_MISSING = 128;
    public const SIGSUM_CRL_MISSING = 256;
    public const SIGSUM_CRL_TOO_OLD = 512;
    public const SIGSUM_BAD_POLICY = 1024;
    public const SIGSUM_SYS_ERROR = 2048;
    public const ERROR_WARNING = 1;
    public const ERROR_EXCEPTION = 2;
    public const ERROR_SILENT = 3;
    public const PK_RSA = 1;
    public const PK_RSA_E = 2;
    public const PK_RSA_S = 3;
    public const PK_DSA = 17;
    public const PK_ELG = 20;
    public const PK_ELG_E = 16;
    public const PK_ECC = 18;
    public const PK_ECDSA = 301;
    public const PK_ECDH = 302;
    public const PK_EDDSA = 303;

    public function __construct($options = null) {}

    /**
     * Add a key for decryption
     * @link https://php.net/manual/en/function.gnupg-adddecryptkey.php
     *
     * @param string $kye
     * @param string $passphrase
     *
     * @return bool
     */
    public function adddecryptkey($kye, $passphrase) {}

    /**
     * Verifies a signed text
     * @link https://php.net/manual/en/function.gnupg-verify.php
     *
     * @param string $text
     * @param string $signature
     * @param string &$plaintext
     *
     * @return array|false On success, this function returns information about the signature.
     *               On failure, this function returns false.
     */
    public function verify($text, $signature, &$plaintext = null) {}

    /**
     * Add a key for encryption
     * @link https://php.net/manual/en/function.gnupg-addencryptkey.php
     *
     * @param string $kye
     *
     * @return bool
     */
    public function addencryptkey($kye) {}

    /**
     * Add a key for signing
     * @link https://php.net/manual/en/function.gnupg-addsignkey.php
     *
     * @param string $kye
     * @param string $passphrase
     *
     * @return bool
     */
    public function addsignkey($kye, $passphrase = null) {}

    public function deletekey($kye, $allow_secret) {}

    public function gettrustlist($pattern) {}

    public function listsignatures($kyeid) {}

    /**
     * Removes all keys which were set for decryption before
     * @link https://php.net/manual/en/function.gnupg-cleardecryptkeys.php
     *
     * @return bool
     */
    public function cleardecryptkeys() {}

    /**
     * Removes all keys which were set for encryption before
     * @link https://php.net/manual/en/function.gnupg-clearencryptkeys.php
     *
     * @return bool
     */
    public function clearencryptkeys() {}

    /**
     * Removes all keys which were set for signing before
     * @link https://php.net/manual/en/function.gnupg-clearsignkeys.php
     *
     * @return bool
     */
    public function clearsignkeys() {}

    /**
     * Decrypts a given text
     * @link https://php.net/manual/en/function.gnupg-decrypt.php
     *
     * @param string $enctext
     *
     * @return string|false On success, this function returns the decrypted text.
     *                On failure, this function returns false.
     */
    public function decrypt($enctext) {}

    /**
     * Decrypts and verifies a given text
     * @link https://php.net/manual/en/function.gnupg-decryptverify.php
     *
     * @param string $enctext
     * @param string &$plaintext
     *
     * @return array|false On success, this function returns information about the signature and
     *               fills the  parameter with the decrypted text.
     *               On failure, this function returns false.
     */
    public function decryptverify($enctext, &$plaintext) {}

    /**
     * Encrypts a given text
     * @link https://php.net/manual/en/function.gnupg-encrypt.php
     *
     * @param string $text
     *
     * @return string|false On success, this function returns the encrypted text.
     *                On failure, this function returns false.
     */
    public function encrypt($text) {}

    /**
     * Encrypts and signs a given text
     * @link https://php.net/manual/en/function.gnupg-encryptsign.php
     *
     * @param string $text
     *
     * @return string|false On success, this function returns the encrypted and signed text.
     *                On failure, this function returns false.
     */
    public function encryptsign($text) {}

    /**
     * Exports a key
     * @link https://php.net/manual/en/function.gnupg-export.php
     *
     * @param string $pattern
     *
     * @return string|false On success, this function returns the keydata.
     *                On failure, this function returns false.
     */
    public function export($pattern) {}

    /**
     * Returns the errortext, if a function fails
     * @link https://php.net/manual/en/function.gnupg-geterror.php
     *
     * @return string|false Returns an errortext, if an error has occurred, otherwise false.
     */
    public function geterror() {}

    /**
     * Returns the currently active protocol for all operations
     * @link https://php.net/manual/en/function.gnupg-getprotocol.php
     *
     * @return int Returns the currently active protocol, which can be one of
     *             or
     *             .
     */
    public function getprotocol() {}

    /**
     * Imports a key
     * @link https://php.net/manual/en/function.gnupg-import.php
     *
     * @param string $kye
     *
     * @return array|false On success, this function returns and info-array about the importprocess.
     *               On failure, this function returns false.
     */
    public function import($kye) {}

    /**
     * Initialize a connection
     * @link https://php.net/manual/en/function.gnupg-init.php
     *
     * @return resource A GnuPG ``resource`` connection used by other GnuPG functions.
     */
    public function init() {}

    /**
     * Returns an array with information about all keys that matches the given pattern
     * @link https://php.net/manual/en/function.gnupg-keyinfo.php
     *
     * @param string $pattern
     *
     * @return array Returns an array with information about all keys that matches the given
     *               pattern or false, if an error has occurred.
     */
    public function keyinfo($pattern, $secret_only = false) {}

    /**
     * Toggle armored output
     * @link https://php.net/manual/en/function.gnupg-setarmor.php
     *
     * @param int $armor
     *
     * @return bool
     */
    public function setarmor($armor) {}

    /**
     * Sets the mode for error_reporting
     * @link https://php.net/manual/en/function.gnupg-seterrormode.php
     *
     * @param int $errnmode
     *
     * @return void
     */
    public function seterrormode($errnmode) {}

    /**
     * Sets the mode for signing
     * @link https://php.net/manual/en/function.gnupg-setsignmode.php
     *
     * @param int $signmode
     *
     * @return bool
     */
    public function setsignmode($signmode) {}

    /**
     * Signs a given text
     * @link https://php.net/manual/en/function.gnupg-sign.php
     *
     * @param string $text
     *
     * @return string|false On success, this function returns the signed text or the signature.
     *                On failure, this function returns false.
     */
    public function sign($text) {}

    public function getengineinfo() {}

    public function geterrorinfo() {}
}

class gnupg_keylistiterator implements Iterator
{
    public function __construct() {}

    public function current() {}

    public function key() {}

    public function next() {}

    public function rewind() {}

    public function valid() {}
}

/**
 * Initialize a connection
 * @link https://www.php.net/manual/en/function.gnupg-init.php
 * @param $options
 * @return resource
 */
function gnupg_init($options = null) {}

/**
 * Returns an array with information about all keys that matches the given pattern
 * @link https://www.php.net/manual/en/function.gnupg-keyinfo.php
 * @param resource $res The gnupg identifier, from a call to gnupg_init() or gnupg.
 * @param string $pattern The pattern being checked against the keys.
 * @return array|false Returns an array with information about all keys that matches the given pattern
 * or false, if an error has occurred.
 */
function gnupg_keyinfo($res, $pattern, $secret_only = false) {}

/**
 * Signs a given text
 * @link https://www.php.net/manual/en/function.gnupg-sign.php
 * @param resource $res The gnupg identifier, from a call to gnupg_init() or gnupg.
 * @param string $text The plain text being signed.
 * @return string|false On success, this function returns the signed text or the signature.
 * On failure, this function returns false.
 */
function gnupg_sign($res, $text) {}

/**
 * Removes all keys which were set for signing before
 * @link https://www.php.net/manual/en/function.gnupg-clearsignkeys.php
 * @param resource $res The gnupg identifier, from a call to gnupg_init() or gnupg.
 * @return bool Returns true on success or false on failure.
 */
function gnupg_clearsignkeys($res) {}

/**
 * Verifies a signed text
 * @link https://www.php.net/manual/en/function.gnupg-verify.php
 * @param resource $res The gnupg identifier, from a call to gnupg_init() or gnupg.
 * @param string $text The signed text.
 * @param string|false $signature The signature. To verify a clearsigned text, set signature to false.
 * @param string &$plaintext The plain text. If this optional parameter is passed, it is filled with the plain text.
 * @return array|false On success, this function returns information about the signature.
 * On failure, this function returns false.
 */
function gnupg_verify($res, $text, $signature, &$plaintext = '') {}

/**
 * Removes all keys which were set for encryption before
 * @link https://www.php.net/manual/en/function.gnupg-clearencryptkeys.php
 * @param resource $res The gnupg identifier, from a call to gnupg_init() or gnupg.
 * @return bool Returns true on success or false on failure.
 */
function gnupg_clearencryptkeys($res) {}

/**
 * Removes all keys which were set for decryption before
 * @link https://www.php.net/manual/en/function.gnupg-cleardecryptkeys.php
 * @param resource $res The gnupg identifier, from a call to gnupg_init() or gnupg.
 * @return bool Returns true on success or false on failure.
 */
function gnupg_cleardecryptkeys($res) {}

/**
 * Add a key for decryption
 * @link https://www.php.net/manual/en/function.gnupg-adddecryptkey.php
 * @param resource $res The gnupg identifier, from a call to gnupg_init() or gnupg.
 * @param string $kye The fingerprint key.
 * @param string $passphrase The pass phrase.
 * @return bool Returns true on success or false on failure.
 */
function gnupg_adddecryptkey($res, $kye, $passphrase) {}

/**
 * Add a key for encryption
 * @link https://www.php.net/manual/en/function.gnupg-addencryptkey.php
 * @param resource $res The gnupg identifier, from a call to gnupg_init() or gnupg.
 * @param string $kye The fingerprint key.
 * @return bool Returns true on success or false on failure.
 */
function gnupg_addencryptkey($res, $kye) {}

/**
 * Toggle armored output
 * @link https://www.php.net/manual/en/function.gnupg-setarmor.php
 * @param resource $res The gnupg identifier, from a call to gnupg_init() or gnupg.
 * @param int $armor Pass a non-zero integer-value to this function to enable armored-output (default).
 * Pass 0 to disable armored output.
 * @return bool Returns true on success or false on failure.
 */
function gnupg_setarmor($res, $armor) {}

/**
 * Encrypts a given text
 * @link https://www.php.net/manual/en/function.gnupg-encrypt.php
 * @param resource $res The gnupg identifier, from a call to gnupg_init() or gnupg.
 * @param string $text The text being encrypted.
 * @return string|false On success, this function returns the encrypted text. On failure, this function returns false.
 */
function gnupg_encrypt($res, $text) {}

/**
 * Decrypts a given text
 * @link https://www.php.net/manual/en/function.gnupg-decrypt.php
 * @param resource $res The gnupg identifier, from a call to gnupg_init() or gnupg.
 * @param string $enctext The text being decrypted.
 * @return string|false On success, this function returns the decrypted text. On failure, this function returns false.
 */
function gnupg_decrypt($res, $enctext) {}

/**
 * Exports a key
 * @link https://www.php.net/manual/en/function.gnupg-export.php
 * @param resource $res The gnupg identifier, from a call to gnupg_init() or gnupg.
 * @param string $pattern The fingerprint key.
 * @return string|false On success, this function returns the keydata. On failure, this function returns false.
 */
function gnupg_export($res, $pattern) {}

/**
 * Imports a key
 * @link https://www.php.net/manual/en/function.gnupg-import.php
 * @param resource $res The gnupg identifier, from a call to gnupg_init() or gnupg.
 * @param string $kye The data key that is being imported.
 * @return array|false On success, this function returns and info-array about the importprocess.
 * On failure, this function returns false.
 */
function gnupg_import($res, $kye) {}

function gnupg_getengineinfo($res) {}

/**
 * Returns the currently active protocol for all operations
 * @link https://www.php.net/manual/en/function.gnupg-getprotocol.php
 * @param resource $res The gnupg identifier, from a call to gnupg_init() or gnupg.
 * @return int Returns the currently active protocol, which can be one of GNUPG_PROTOCOL_OpenPGP or GNUPG_PROTOCOL_CMS.
 */
function gnupg_getprotocol($res) {}

/**
 * Sets the mode for signing
 * @link https://www.php.net/manual/en/function.gnupg-setsignmode.php
 * @param resource $res The gnupg identifier, from a call to gnupg_init() or gnupg.
 * @param int $signmode The mode for signing. Takes a constant indicating what type of signature should be produced.
 * The possible values are GNUPG_SIG_MODE_NORMAL, GNUPG_SIG_MODE_DETACH and GNUPG_SIG_MODE_CLEAR.
 * By default GNUPG_SIG_MODE_CLEAR is used.
 * @return bool Returns true on success or false on failure.
 */
function gnupg_setsignmode($res, #[ExpectedValues([GNUPG_SIG_MODE_NORMAL|GNUPG_SIG_MODE_DETACH|GNUPG_SIG_MODE_CLEAR])] $signmode) {}

/**
 * Encrypts and signs a given text
 * @link https://www.php.net/manual/en/function.gnupg-encryptsign.php
 * @param resource $res The gnupg identifier, from a call to gnupg_init() or gnupg.
 * @param string $text The text being encrypted.
 * @return string|false On success, this function returns the encrypted and signed text.
 * On failure, this function returns false.
 */
function gnupg_encryptsign($res, $text) {}

/**
 * Decrypts and verifies a given text and returns information about the signature.
 * @link https://www.php.net/manual/en/function.gnupg-decryptverify.php
 * @param resource $res The gnupg identifier, from a call to gnupg_init() or gnupg.
 * @param string $enctext The text being decrypted.
 * @param string &$plaintext The parameter plaintext gets filled with the decrypted text.
 * @return array|false On success, this function returns information about the signature and fills the plaintext parameter
 * with the decrypted text. On failure, this function returns false.
 */
function gnupg_decryptverify($res, $enctext, &$plaintext) {}

/**
 * Returns the errortext, if a function fails
 * @link https://www.php.net/manual/en/function.gnupg-geterror.php
 * @param resource $res The gnupg identifier, from a call to gnupg_init() or gnupg.
 * @return string|false Returns an errortext, if an error has occurred, otherwise false.
 */
function gnupg_geterror($res) {}

function gnupg_geterrorinfo($res) {}

/**
 * Add a key for signing
 * @link https://www.php.net/manual/en/function.gnupg-addsignkey.php
 * @param resource $res The gnupg identifier, from a call to gnupg_init() or gnupg.
 * @param string $kye The fingerprint key.
 * @param string $passphrase The pass phrase.
 * @return bool Returns true on success or false on failure.
 */
function gnupg_addsignkey($res, $kye, $passphrase) {}
function gnupg_deletekey($res, $kye, $allow_secret) {}
function gnupg_gettrustlist($res, $pattern) {}
function gnupg_listsignatures($res, $kyeid) {}

/**
 * Sets the mode for error_reporting
 * @link https://www.php.net/manual/en/function.gnupg-seterrormode.php
 * @param resource $res The gnupg identifier, from a call to gnupg_init() or gnupg.
 * @param int $errnmode The error mode. takes a constant indicating what type of error_reporting should be used.
 * The possible values are GNUPG_ERROR_WARNING, GNUPG_ERROR_EXCEPTION and GNUPG_ERROR_SILENT. By default GNUPG_ERROR_SILENT is used.
 */
function gnupg_seterrormode($res, #[ExpectedValues([GNUPG_ERROR_WARNING|GNUPG_ERROR_EXCEPTION|GNUPG_ERROR_SILENT])] $errnmode) {}
<?php
/**
 * Couchbase extension stubs
 * Gathered from https://docs.couchbase.com/sdk-api/couchbase-php-client-3.2.2/index.html
 * Maintainer: sergey@couchbase.com
 *
 * https://github.com/couchbase/php-couchbase/tree/master/api
 */

/**
 * INI entries:
 *
 * * `couchbase.log_level` (string), default: `"WARN"`
 *
 *   controls amount of information, the module will send to PHP error log. Accepts the following values in order of
 *   increasing verbosity: `"FATAL"`, `"ERROR"`, `"WARN"`, `"INFO"`, `"DEBUG"`, `"TRACE"`.
 *
 * * `couchbase.encoder.format` (string), default: `"json"`
 *
 *   selects serialization format for default encoder (\Couchbase\defaultEncoder). Accepts the following values:
 *   * `"json"` - encodes objects and arrays as JSON object (using `json_encode()`), primitives written in stringified form,
 *      which is allowed for most of the JSON parsers as valid values. For empty arrays JSON array preferred, if it is
 *      necessary, use `new stdClass()` to persist empty JSON object. Note, that only JSON format considered supported by
 *      all Couchbase SDKs, everything else is private implementation (i.e. `"php"` format won't be readable by .NET SDK).
 *   * `"php"` - uses PHP serialize() method to encode the document.
 *
 * * `couchbase.encoder.compression` (string), default: `"none"`
 *
 *   selects compression algorithm. Also see related compression options below. Accepts the following values:
 *   * `"fastlz"` - uses FastLZ algorithm. The module might be configured to use system fastlz library during build,
 *     othewise vendored version will be used. This algorithm is always available.
 *   * `"zlib"` - uses compression implemented by libz. Might not be available, if the system didn't have libz headers
 *     during build phase. In this case \Couchbase\HAVE_ZLIB will be false.
 *   * `"off"` or `"none"` - compression will be disabled, but the library will still read compressed values.
 *
 * * `couchbase.encoder.compression_threshold` (int), default: `0`
 *
 *   controls minimum size of the document value in bytes to use compression. For example, if threshold 100 bytes,
 *   and the document size is 50, compression will be disabled for this particular document.
 *
 * * `couchbase.encoder.compression_factor` (float), default: `0.0`
 *
 *   controls the minimum ratio of the result value and original document value to proceed with persisting compressed
 *   bytes. For example, the original document consists of 100 bytes. In this case factor 1.0 will require compressor
 *   to yield values not larger than 100 bytes (100/1.0), and 1.5 -- not larger than 66 bytes (100/1.5).
 *
 * * `couchbase.decoder.json_arrays` (boolean), default: `true`
 *
 *   controls the form of the documents, returned by the server if they were in JSON format. When true, it will generate
 *   arrays of arrays, otherwise instances of stdClass.
 *
 * * `couchbase.pool.max_idle_time_sec` (int), default: `60`
 *
 *   controls the maximum interval the underlying connection object could be idle, i.e. without any data/query
 *   operations. All connections which idle more than this interval will be closed automatically. Cleanup function
 *   executed after each request using RSHUTDOWN hook.
 *
 * * `couchbase.allow_fallback_to_bucket_connection` (boolean), default: `false`
 *
 *   allows the library to switch to bucket connection when the connection string includes bucket name. It is useful
 *   when the application connects to older Couchbase Server, that does not have G3CP feature.
 *
 * @package Couchbase
 */

namespace Couchbase;

use JsonSerializable;
use Exception;
use Throwable;
use DateTimeInterface;

/**
 * An object which contains meta information of the document needed to enforce query consistency.
 */
interface MutationToken
{
    /**
     * Returns bucket name
     *
     * @return string
     */
    public function bucketName();

    /**
     * Returns partition number
     *
     * @return int
     */
    public function partitionId();

    /**
     * Returns UUID of the partition
     *
     * @return string
     */
    public function partitionUuid();

    /**
     * Returns the sequence number inside partition
     *
     * @return string
     */
    public function sequenceNumber();
}

/**
 * Interface for retrieving metadata such as errors and metrics generated during N1QL queries.
 */
interface QueryMetaData
{
    /**
     * Returns the query execution status
     *
     * @return string|null
     */
    public function status(): ?string;

    /**
     * Returns the identifier associated with the query
     *
     * @return string|null
     */
    public function requestId(): ?string;

    /**
     * Returns the client context id associated with the query
     *
     * @return string|null
     */
    public function clientContextId(): ?string;

    /**
     * Returns the signature of the query
     *
     * @return array|null
     */
    public function signature(): ?array;

    /**
     * Returns any warnings generated during query execution
     *
     * @return array|null
     */
    public function warnings(): ?array;

    /**
     * Returns any errors generated during query execution
     *
     * @return array|null
     */
    public function errors(): ?array;

    /**
     * Returns metrics generated during query execution such as timings and counts
     *
     * @return array|null
     */
    public function metrics(): ?array;

    /**
     * Returns the profile of the query if enabled
     *
     * @return array|null
     */
    public function profile(): ?array;
}

/**
 * Interface for retrieving metadata such as error counts and metrics generated during search queries.
 */
interface SearchMetaData
{
    /**
     * Returns the number of pindexes successfully queried
     *
     * @return int|null
     */
    public function successCount(): ?int;

    /**
     * Returns the number of errors messages reported by individual pindexes
     *
     * @return int|null
     */
    public function errorCount(): ?int;

    /**
     * Returns the time taken to complete the query
     *
     * @return int|null
     */
    public function took(): ?int;

    /**
     * Returns the total number of matches for this result
     *
     * @return int|null
     */
    public function totalHits(): ?int;

    /**
     * Returns the highest score of all documents for this search query.
     *
     * @return float|null
     */
    public function maxScore(): ?float;

    /**
     * Returns the metrics generated during execution of this search query.
     *
     * @return array|null
     */
    public function metrics(): ?array;
}

/**
 * Interface for retrieving metadata generated during view queries.
 */
interface ViewMetaData
{
    /**
     * Returns the total number of rows returned by this view query
     *
     * @return int|null
     */
    public function totalRows(): ?int;

    /**
     * Returns debug information for this view query if enabled
     *
     * @return array|null
     */
    public function debug(): ?array;
}

/**
 * Base interface for all results generated by KV operations.
 */
interface Result
{
    /**
     * Returns the CAS value for the document
     *
     * @return string|null
     */
    public function cas(): ?string;
}

/**
 * Interface for results created by the get operation.
 */
interface GetResult extends Result
{
    /**
     * Returns the content of the document fetched
     *
     * @return array|null
     */
    public function content(): ?array;

    /**
     * Returns the document expiration time or null if the document does not expire.
     *
     * Note, that this function will return expiry only when GetOptions had withExpiry set to true.
     *
     * @return DateTimeInterface|null
     */
    public function expiryTime(): ?DateTimeInterface;
}

/**
 * Interface for results created by the getReplica operation.
 */
interface GetReplicaResult extends Result
{
    /**
     * Returns the content of the document fetched
     *
     * @return array|null
     */
    public function content(): ?array;

    /**
     * Returns whether or not the document came from a replica server
     *
     * @return bool
     */
    public function isReplica(): bool;
}

/**
 * Interface for results created by the exists operation.
 */
interface ExistsResult extends Result
{
    /**
     * Returns whether or not the document exists
     *
     * @return bool
     */
    public function exists(): bool;
}

/**
 * Interface for results created by operations that perform mutations.
 */
interface MutationResult extends Result
{
    /**
     * Returns the mutation token generated during the mutation
     *
     * @return MutationToken|null
     */
    public function mutationToken(): ?MutationToken;
}

/**
 * Interface for results created by the counter operation.
 */
interface CounterResult extends MutationResult
{
    /**
     * Returns the new value of the counter
     *
     * @return int
     */
    public function content(): int;
}

/**
 * Interface for results created by the lookupIn operation.
 */
interface LookupInResult extends Result
{
    /**
     * Returns the value located at the index specified
     *
     * @param int $index the index to retrieve content from
     * @return object|null
     */
    public function content(int $index): ?object;

    /**
     * Returns whether or not the path at the index specified exists
     *
     * @param int $index the index to check for existence
     * @return bool
     */
    public function exists(int $index): bool;

    /**
     * Returns any error code for the path at the index specified
     *
     * @param int $index the index to retrieve the error code for
     * @return int
     */
    public function status(int $index): int;

    /**
     * Returns the document expiration time or null if the document does not expire.
     *
     * Note, that this function will return expiry only when LookupInOptions had withExpiry set to true.
     *
     * @return DateTimeInterface|null
     */
    public function expiryTime(): ?DateTimeInterface;
}

/**
 * Interface for results created by the mutateIn operation.
 */
interface MutateInResult extends MutationResult
{
    /**
     * Returns any value located at the index specified
     *
     * @param int $index the index to retrieve content from
     * @return array|null
     */
    public function content(int $index): ?array;
}

/**
 * Interface for retrieving results from N1QL queries.
 */
interface QueryResult
{
    /**
     * Returns metadata generated during query execution such as errors and metrics
     *
     * @return QueryMetaData|null
     */
    public function metaData(): ?QueryMetaData;

    /**
     * Returns the rows returns during query execution
     *
     * @return array|null
     */
    public function rows(): ?array;
}

/**
 * Interface for retrieving results from analytics queries.
 */
interface AnalyticsResult
{
    /**
     * Returns metadata generated during query execution
     *
     * @return QueryMetaData|null
     */
    public function metaData(): ?QueryMetaData;

    /**
     * Returns the rows returned during query execution
     *
     * @return array|null
     */
    public function rows(): ?array;
}

/**
 * A range (or bucket) for a term search facet result.
 * Counts the number of occurrences of a given term.
 */
interface TermFacetResult
{
    /**
     * @return string
     */
    public function term(): string;

    /**
     * @return int
     */
    public function count(): int;
}

/**
 * A range (or bucket) for a numeric range facet result. Counts the number of matches
 * that fall into the named range (which can overlap with other user-defined ranges).
 */
interface NumericRangeFacetResult
{
    /**
     * @return string
     */
    public function name(): string;

    /**
     * @return int|float|null
     */
    public function min();

    /**
     * @return int|float|null
     */
    public function max();

    /**
     * @return int
     */
    public function count(): int;
}

/**
 * A range (or bucket) for a date range facet result. Counts the number of matches
 * that fall into the named range (which can overlap with other user-defined ranges).
 */
interface DateRangeFacetResult
{
    /**
     * @return string
     */
    public function name(): string;

    /**
     * @return string|null
     */
    public function start(): ?string;

    /**
     * @return string|null
     */
    public function end(): ?string;

    /**
     * @return int
     */
    public function count(): int;
}

/**
 * Interface representing facet results.
 *
 * Only one method might return non-null value among terms(), numericRanges() and dateRanges().
 */
interface SearchFacetResult
{
    /**
     * The field the SearchFacet was targeting.
     *
     * @return string
     */
    public function field(): string;

    /**
     * The total number of *valued* facet results. Total = other() + terms (but doesn't include * missing()).
     *
     * @return int
     */
    public function total(): int;

    /**
     * The number of results that couldn't be faceted, missing the adequate value. Not matter how many more
     * buckets are added to the original facet, these result won't ever be included in one.
     *
     * @return int
     */
    public function missing(): int;

    /**
     * The number of results that could have been faceted (because they have a value for the facet's field) but
     * weren't, due to not having a bucket in which they belong. Adding a bucket can result in these results being
     * faceted.
     *
     * @return int
     */
    public function other(): int;

    /**
     * @return array of pairs string name to TermFacetResult
     */
    public function terms(): ?array;

    /**
     * @return array of pairs string name to NumericRangeFacetResult
     */
    public function numericRanges(): ?array;

    /**
     * @return array of pairs string name to DateRangeFacetResult
     */
    public function dateRanges(): ?array;
}

/**
 * Interface for retrieving results from search queries.
 */
interface SearchResult
{
    /**
     * Returns metadata generated during query execution
     *
     * @return SearchMetaData|null
     */
    public function metaData(): ?SearchMetaData;

    /**
     * Returns any facets returned by the query
     *
     * Array contains instances of SearchFacetResult
     * @return array|null
     */
    public function facets(): ?array;

    /**
     * Returns any rows returned by the query
     *
     * @return array|null
     */
    public function rows(): ?array;
}

/**
 * Interface for retrieving results from view queries.
 */
interface ViewResult
{
    /**
     * Returns metadata generated during query execution
     *
     * @return ViewMetaData|null
     */
    public function metaData(): ?ViewMetaData;

    /**
     * Returns any rows returned by the query
     *
     * @return array|null
     */
    public function rows(): ?array;
}

/**
 * Object for accessing a row returned as a part of the results from a viery query.
 */
class ViewRow
{
    /**
     * Returns the id of the row
     *
     * @return string|null
     */
    public function id(): ?string {}

    /**
     * Returns the key of the document
     */
    public function key() {}

    /**
     * Returns the value of the row
     */
    public function value() {}

    /**
     * Returns the corresponding document for the row, if enabled
     */
    public function document() {}
}

/**
 *  Base exception for exceptions that are thrown originating from Couchbase operations.
 */
class BaseException extends Exception implements Throwable
{
    /**
     * Returns the underling reference string, if any
     *
     * @return string|null
     */
    public function ref(): ?string {}

    /**
     * Returns the underling error context, if any
     *
     * @return object|null
     */
    public function context(): ?object {}
}

class RequestCanceledException extends BaseException implements Throwable {}

class RateLimitedException extends BaseException implements Throwable {}

class QuotaLimitedException extends BaseException implements Throwable {}

/**
 *  Thrown for exceptions that originate from underlying Http operations.
 */
class HttpException extends BaseException implements Throwable {}

class ParsingFailureException extends HttpException implements Throwable {}

class IndexNotFoundException extends HttpException implements Throwable {}

class PlanningFailureException extends HttpException implements Throwable {}

class IndexFailureException extends HttpException implements Throwable {}

class KeyspaceNotFoundException extends HttpException implements Throwable {}

/**
 *  Thrown for exceptions that originate from query operations.
 */
class QueryException extends HttpException implements Throwable {}

/**
 *  Thrown for exceptions that originate from query operations.
 */
class QueryErrorException extends QueryException implements Throwable {}

class DmlFailureException extends QueryException implements Throwable {}

class PreparedStatementException extends QueryException implements Throwable {}

class QueryServiceException extends QueryException implements Throwable {}

/**
 *  Thrown for exceptions that originate from search operations.
 */
class SearchException extends HttpException implements Throwable {}

/**
 *  Thrown for exceptions that originate from analytics operations.
 */
class AnalyticsException extends HttpException implements Throwable {}

/**
 *  Thrown for exceptions that originate from view operations.
 */
class ViewException extends HttpException implements Throwable {}

class PartialViewException extends HttpException implements Throwable {}

class BindingsException extends BaseException implements Throwable {}

class InvalidStateException extends BaseException implements Throwable {}

/**
 *  Base for exceptions that originate from key value operations
 */
class KeyValueException extends BaseException implements Throwable {}

/**
 *  Occurs when the requested document could not be found.
 */
class DocumentNotFoundException extends KeyValueException implements Throwable {}

/**
 *  Occurs when an attempt is made to insert a document but a document with that key already exists.
 */
class KeyExistsException extends KeyValueException implements Throwable {}

/**
 *  Occurs when a document has gone over the maximum size allowed by the server.
 */
class ValueTooBigException extends KeyValueException implements Throwable {}

/**
 *  Occurs when a mutation operation is attempted against a document that is locked.
 */
class KeyLockedException extends KeyValueException implements Throwable {}

/**
 *  Occurs when an operation has failed for a reason that is temporary.
 */
class TempFailException extends KeyValueException implements Throwable {}

/**
 *  Occurs when a sub-document operation targets a path which does not exist in the specified document.
 */
class PathNotFoundException extends KeyValueException implements Throwable {}

/**
 *  Occurs when a sub-document operation expects a path not to exists, but the path was found in the document.
 */
class PathExistsException extends KeyValueException implements Throwable {}

/**
 *  Occurs when a sub-document counter operation is performed and the specified delta is not valid.
 */
class InvalidRangeException extends KeyValueException implements Throwable {}

/**
 *  Occurs when a multi-operation sub-document operation is performed on a soft-deleted document.
 */
class KeyDeletedException extends KeyValueException implements Throwable {}

/**
 *  Occurs when an operation has been performed with a cas value that does not the value on the server.
 */
class CasMismatchException extends KeyValueException implements Throwable {}

/**
 *  Occurs when an invalid configuration has been specified for an operation.
 */
class InvalidConfigurationException extends BaseException implements Throwable {}

/**
 *  Occurs when the requested service is not available.
 */
class ServiceMissingException extends BaseException implements Throwable {}

/**
 *  Occurs when various generic network errors occur.
 */
class NetworkException extends BaseException implements Throwable {}

/**
 *  Occurs when an operation does not receive a response in a timely manner.
 */
class TimeoutException extends BaseException implements Throwable {}

/**
 *  Occurs when the specified bucket does not exist.
 */
class BucketMissingException extends BaseException implements Throwable {}

/**
 *  Occurs when the specified scope does not exist.
 */
class ScopeMissingException extends BaseException implements Throwable {}

/**
 *  Occurs when the specified collection does not exist.
 */
class CollectionMissingException extends BaseException implements Throwable {}

/**
 *  Occurs when authentication has failed.
 */
class AuthenticationException extends BaseException implements Throwable {}

/**
 *  Occurs when an operation is attempted with bad input.
 */
class BadInputException extends BaseException implements Throwable {}

/**
 *  Occurs when the specified durability could not be met for a mutation operation.
 */
class DurabilityException extends BaseException implements Throwable {}

/**
 *  Occurs when a subdocument operation could not be completed.
 */
class SubdocumentException extends BaseException implements Throwable {}

class QueryIndex
{
    public function name(): string {}

    public function isPrimary(): bool {}

    public function type(): string {}

    public function state(): string {}

    public function keyspace(): string {}

    public function indexKey(): array {}

    public function condition(): ?string {}
}

class CreateQueryIndexOptions
{
    public function condition(string $condition): CreateQueryIndexOptions {}

    public function ignoreIfExists(bool $shouldIgnore): CreateQueryIndexOptions {}

    public function numReplicas(int $number): CreateQueryIndexOptions {}

    public function deferred(bool $isDeferred): CreateQueryIndexOptions {}
}

class CreateQueryPrimaryIndexOptions
{
    public function indexName(string $name): CreateQueryPrimaryIndexOptions {}

    public function ignoreIfExists(bool $shouldIgnore): CreateQueryPrimaryIndexOptions {}

    public function numReplicas(int $number): CreateQueryPrimaryIndexOptions {}

    public function deferred(bool $isDeferred): CreateQueryPrimaryIndexOptions {}
}

class DropQueryIndexOptions
{
    public function ignoreIfNotExists(bool $shouldIgnore): DropQueryIndexOptions {}
}

class DropQueryPrimaryIndexOptions
{
    public function indexName(string $name): DropQueryPrimaryIndexOptions {}

    public function ignoreIfNotExists(bool $shouldIgnore): DropQueryPrimaryIndexOptions {}
}

class WatchQueryIndexesOptions
{
    public function watchPrimary(bool $shouldWatch): WatchQueryIndexesOptions {}
}

class QueryIndexManager
{
    public function getAllIndexes(string $bucketName): array {}

    public function createIndex(string $bucketName, string $indexName, array $fields, CreateQueryIndexOptions $options = null) {}

    public function createPrimaryIndex(string $bucketName, CreateQueryPrimaryIndexOptions $options = null) {}

    public function dropIndex(string $bucketName, string $indexName, DropQueryIndexOptions $options = null) {}

    public function dropPrimaryIndex(string $bucketName, DropQueryPrimaryIndexOptions $options = null) {}

    public function watchIndexes(string $bucketName, array $indexNames, int $timeout, WatchQueryIndexesOptions $options = null) {}

    public function buildDeferredIndexes(string $bucketName) {}
}

class CreateAnalyticsDataverseOptions
{
    public function ignoreIfExists(bool $shouldIgnore): CreateAnalyticsDataverseOptions {}
}

class DropAnalyticsDataverseOptions
{
    public function ignoreIfNotExists(bool $shouldIgnore): DropAnalyticsDataverseOptions {}
}

class CreateAnalyticsDatasetOptions
{
    public function ignoreIfExists(bool $shouldIgnore): CreateAnalyticsDatasetOptions {}

    public function condition(string $condition): CreateAnalyticsDatasetOptions {}

    public function dataverseName(string $dataverseName): CreateAnalyticsDatasetOptions {}
}

class DropAnalyticsDatasetOptions
{
    public function ignoreIfNotExists(bool $shouldIgnore): DropAnalyticsDatasetOptions {}

    public function dataverseName(string $dataverseName): DropAnalyticsDatasetOptions {}
}

class CreateAnalyticsIndexOptions
{
    public function ignoreIfExists(bool $shouldIgnore): CreateAnalyticsIndexOptions {}

    public function dataverseName(string $dataverseName): CreateAnalyticsIndexOptions {}
}

class DropAnalyticsIndexOptions
{
    public function ignoreIfNotExists(bool $shouldIgnore): DropAnalyticsIndexOptions {}

    public function dataverseName(string $dataverseName): DropAnalyticsIndexOptions {}
}

class ConnectAnalyticsLinkOptions
{
    public function linkName(bstring $linkName): ConnectAnalyticsLinkOptions {}

    public function dataverseName(string $dataverseName): ConnectAnalyticsLinkOptions {}
}

class DisconnectAnalyticsLinkOptions
{
    public function linkName(bstring $linkName): DisconnectAnalyticsLinkOptions {}

    public function dataverseName(string $dataverseName): DisconnectAnalyticsLinkOptions {}
}

class CreateAnalyticsLinkOptions
{
    public function timeout(int $arg): CreateAnalyticsLinkOptions {}
}

class ReplaceAnalyticsLinkOptions
{
    public function timeout(int $arg): ReplaceAnalyticsLinkOptions {}
}

class DropAnalyticsLinkOptions
{
    public function timeout(int $arg): DropAnalyticsLinkOptions {}
}

interface AnalyticsLinkType
{
    public const COUCHBASE = "couchbase";
    public const S3 = "s3";
    public const AZURE_BLOB = "azureblob";
}

class GetAnalyticsLinksOptions
{
    public function timeout(int $arg): DropAnalyticsLinkOptions {}

    /**
     * @param string $tupe restricts the results to the given link type.
     *
     * @see AnalyticsLinkType::COUCHBASE
     * @see AnalyticsLinkType::S3
     * @see AnalyticsLinkType::AZURE_BLOB
     */
    public function linkType(string $type): DropAnalyticsLinkOptions {}

    /**
     * @param string $dataverse restricts the results to a given dataverse, can be given in the form of "namepart" or "namepart1/namepart2".
     */
    public function dataverse(string $dataverse): DropAnalyticsLinkOptions {}

    /**
     * @param string $name restricts the results to the link with the specified name. If set then dataverse must also be set.
     */
    public function name(string $name): DropAnalyticsLinkOptions {}
}

interface AnalyticsEncryptionLevel
{
    public const NONE = "none";
    public const HALF = "half";
    public const FULL = "full";
}

class EncryptionSettings
{
    /**
     * Sets encryption level.
     *
     * @param string $level Accepted values are 'none', 'half', 'full'.
     *
     * @see AnalyticsEncryptionLevel::NONE
     * @see AnalyticsEncryptionLevel::HALF
     * @see AnalyticsEncryptionLevel::FULL
     *
     * @return EncryptionSettings
     */
    public function level(string $level) {}

    public function certificate(string $certificate) {}

    public function clientCertificate(string $certificate) {}

    public function clientKey(string $key) {}
}

interface AnalyticsLink {}

class CouchbaseRemoteAnalyticsLink implements AnalyticsLink
{
    /**
     * Sets name of the link
     *
     * @param string $name
     * @return CouchbaseRemoteAnalyticsLink
     */
    public function name(string $name): CouchbaseRemoteAnalyticsLink {}

    /**
     * Sets dataverse this link belongs to
     *
     * @param string $dataverse
     * @return CouchbaseRemoteAnalyticsLink
     */
    public function dataverse(string $dataverse): CouchbaseRemoteAnalyticsLink {}

    /**
     * Sets the hostname of the target Couchbase cluster
     *
     * @param string $hostname
     * @return CouchbaseRemoteAnalyticsLink
     */
    public function hostname(string $hostname): CouchbaseRemoteAnalyticsLink {}

    /**
     * Sets the username to use for authentication with the remote cluster.
     *
     * Optional if client-certificate authentication is being used.
     *
     * @param string $username
     * @return CouchbaseRemoteAnalyticsLink
     */
    public function username(string $username): CouchbaseRemoteAnalyticsLink {}

    /**
     * Sets the password to use for authentication with the remote cluster.
     *
     * Optional if client-certificate authentication is being used.
     *
     * @param string $password
     * @return CouchbaseRemoteAnalyticsLink
     */
    public function password(string $password): CouchbaseRemoteAnalyticsLink {}

    /**
     * Sets settings for connection encryption
     *
     * @param EncryptionSettings $settings
     * @return CouchbaseRemoteAnalyticsLink
     */
    public function encryption(EncryptionSettings $settings): CouchbaseRemoteAnalyticsLink {}
}

class AzureBlobExternalAnalyticsLink implements AnalyticsLink
{
    /**
     * Sets name of the link
     *
     * @param string $name
     * @return AzureBlobExternalAnalyticsLink
     */
    public function name(string $name): AzureBlobExternalAnalyticsLink {}

    /**
     * Sets dataverse this link belongs to
     *
     * @param string $dataverse
     * @return AzureBlobExternalAnalyticsLink
     */
    public function dataverse(string $dataverse): AzureBlobExternalAnalyticsLink {}

    /**
     * Sets the connection string can be used as an authentication method, '$connectionString' contains other
     * authentication methods embedded inside the string. Only a single authentication method can be used.
     * (e.g. "AccountName=myAccountName;AccountKey=myAccountKey").
     *
     * @param string $connectionString
     * @return AzureBlobExternalAnalyticsLink
     */
    public function connectionString(string $connectionString): AzureBlobExternalAnalyticsLink {}

    /**
     * Sets Azure blob storage account name
     *
     * @param string $accountName
     * @return AzureBlobExternalAnalyticsLink
     */
    public function accountName(string $accountName): AzureBlobExternalAnalyticsLink {}

    /**
     * Sets Azure blob storage account key
     *
     * @param string $accountKey
     * @return AzureBlobExternalAnalyticsLink
     */
    public function accountKey(string $accountKey): AzureBlobExternalAnalyticsLink {}

    /**
     * Sets token that can be used for authentication
     *
     * @param string $signature
     * @return AzureBlobExternalAnalyticsLink
     */
    public function sharedAccessSignature(string $signature): AzureBlobExternalAnalyticsLink {}

    /**
     * Sets Azure blob storage endpoint
     *
     * @param string $blobEndpoint
     * @return AzureBlobExternalAnalyticsLink
     */
    public function blobEndpoint(string $blobEndpoint): AzureBlobExternalAnalyticsLink {}

    /**
     * Sets Azure blob endpoint suffix
     *
     * @param string $suffix
     * @return AzureBlobExternalAnalyticsLink
     */
    public function endpointSuffix(string $suffix): AzureBlobExternalAnalyticsLink {}
}

class S3ExternalAnalyticsLink implements AnalyticsLink
{
    /**
     * Sets name of the link
     *
     * @param string $name
     * @return S3ExternalAnalyticsLink
     */
    public function name(string $name): S3ExternalAnalyticsLink {}

    /**
     * Sets dataverse this link belongs to
     *
     * @param string $dataverse
     * @return S3ExternalAnalyticsLink
     */
    public function dataverse(string $dataverse): S3ExternalAnalyticsLink {}

    /**
     * Sets AWS S3 access key ID
     *
     * @param string $accessKeyId
     * @return S3ExternalAnalyticsLink
     */
    public function accessKeyId(string $accessKeyId): S3ExternalAnalyticsLink {}

    /**
     * Sets AWS S3 secret key
     *
     * @param string $secretAccessKey
     * @return S3ExternalAnalyticsLink
     */
    public function secretAccessKey(string $secretAccessKey): S3ExternalAnalyticsLink {}

    /**
     * Sets AWS S3 region
     *
     * @param string $region
     * @return S3ExternalAnalyticsLink
     */
    public function region(string $region): S3ExternalAnalyticsLink {}

    /**
     * Sets AWS S3 token if temporary credentials are provided. Only available in 7.0+
     *
     * @param string $sessionToken
     * @return S3ExternalAnalyticsLink
     */
    public function sessionToken(string $sessionToken): S3ExternalAnalyticsLink {}

    /**
     * Sets AWS S3 service endpoint
     *
     * @param string $serviceEndpoint
     * @return S3ExternalAnalyticsLink
     */
    public function serviceEndpoint(string $serviceEndpoint): S3ExternalAnalyticsLink {}
}

class AnalyticsIndexManager
{
    public function createDataverse(string $dataverseName, CreateAnalyticsDataverseOptions $options = null) {}

    public function dropDataverse(string $dataverseName, DropAnalyticsDataverseOptions $options = null) {}

    public function createDataset(string $datasetName, string $bucketName, CreateAnalyticsDatasetOptions $options = null) {}

    public function dropDataset(string $datasetName, DropAnalyticsDatasetOptions $options = null) {}

    public function getAllDatasets() {}

    public function createIndex(string $datasetName, string $indexName, array $fields, CreateAnalyticsIndexOptions $options = null) {}

    public function dropIndex(string $datasetName, string $indexName, DropAnalyticsIndexOptions $options = null) {}

    public function getAllIndexes() {}

    public function connectLink(ConnectAnalyticsLinkOptions $options = null) {}

    public function disconnectLink(DisconnectAnalyticsLinkOptions $options = null) {}

    public function getPendingMutations() {}

    public function createLink(AnalyticsLink $link, CreateAnalyticsLinkOptions $options = null) {}

    public function replaceLink(AnalyticsLink $link, ReplaceAnalyticsLinkOptions $options = null) {}

    public function dropLink(string $linkName, string $dataverseName, DropAnalyticsLinkOptions $options = null) {}

    public function getLinks(GetAnalyticsLinksOptions $options = null) {}
}

class SearchIndex implements JsonSerializable
{
    public function jsonSerialize() {}

    public function type(): string {}

    public function uuid(): string {}

    public function params(): array {}

    public function sourceType(): string {}

    public function sourceUuid(): string {}

    public function sourceName(): string {}

    public function sourceParams(): array {}

    public function setType(string $type): SearchIndex {}

    public function setUuid(string $uuid): SearchIndex {}

    public function setParams(string $params): SearchIndex {}

    public function setSourceType(string $type): SearchIndex {}

    public function setSourceUuid(string $uuid): SearchIndex {}

    public function setSourcename(string $params): SearchIndex {}

    public function setSourceParams(string $params): SearchIndex {}
}

class SearchIndexManager
{
    public function getIndex(string $name): SearchIndex {}

    public function getAllIndexes(): array {}

    public function upsertIndex(SearchIndex $indexDefinition) {}

    public function dropIndex(string $name) {}

    public function getIndexedDocumentsCount(string $indexName): int {}

    public function pauseIngest(string $indexName) {}

    public function resumeIngest(string $indexName) {}

    public function allowQuerying(string $indexName) {}

    public function disallowQuerying(string $indexName) {}

    public function freezePlan(string $indexName) {}

    public function unfreezePlan(string $indexName) {}

    public function analyzeDocument(string $indexName, $document) {}
}

/**
 * Cluster is an object containing functionality for performing cluster level operations
 * against a cluster and for access to buckets.
 */
class Cluster
{
    public function __construct(string $connstr, ClusterOptions $options) {}

    /**
     * Returns a new bucket object.
     *
     * @param string $name the name of the bucket
     * @return Bucket
     */
    public function bucket(string $name): Bucket {}

    /**
     * Executes a N1QL query against the cluster.
     * Note: On Couchbase Server versions < 6.5 a bucket must be opened before using query.
     *
     * @param string $statement the N1QL query statement to execute
     * @param QueryOptions $options the options to use when executing the query
     * @return QueryResult
     */
    public function query(string $statement, QueryOptions $options = null): QueryResult {}

    /**
     * Executes an analytics query against the cluster.
     * Note: On Couchbase Server versions < 6.5 a bucket must be opened before using analyticsQuery.
     *
     * @param string $statement the analytics query statement to execute
     * @param AnalyticsOptions $options the options to use when executing the query
     * @return AnalyticsResult
     */
    public function analyticsQuery(string $statement, AnalyticsOptions $options = null): AnalyticsResult {}

    /**
     * Executes a full text search query against the cluster.
     * Note: On Couchbase Server versions < 6.5 a bucket must be opened before using searchQuery.
     *
     * @param string $indexName the fts index to use for the query
     * @param SearchQuery $query the search query to execute
     * @param SearchOptions $options the options to use when executing the query
     * @return SearchResult
     */
    public function searchQuery(string $indexName, SearchQuery $query, SearchOptions $options = null): SearchResult {}

    /**
     * Creates a new bucket manager object for managing buckets.
     *
     * @return BucketManager
     */
    public function buckets(): BucketManager {}

    /**
     * Creates a new user manager object for managing users and groups.
     *
     * @return UserManager
     */
    public function users(): UserManager {}

    /**
     * Creates a new query index manager object for managing analytics query indexes.
     *
     * @return AnalyticsIndexManager
     */
    public function analyticsIndexes(): AnalyticsIndexManager {}

    /**
     * Creates a new query index manager object for managing N1QL query indexes.
     *
     * @return QueryIndexManager
     */
    public function queryIndexes(): QueryIndexManager {}

    /**
     * Creates a new search index manager object for managing search query indexes.
     *
     * @return SearchIndexManager
     */
    public function searchIndexes(): SearchIndexManager {}
}

interface EvictionPolicy
{
    /**
     * During ejection, everything (including key, metadata, and value) will be ejected.
     *
     * Full Ejection reduces the memory overhead requirement, at the cost of performance.
     *
     * This value is only valid for buckets of type COUCHBASE.
     */
    public const FULL = "fullEviction";

    /**
     * During ejection, only the value will be ejected (key and metadata will remain in memory).
     *
     * Value Ejection needs more system memory, but provides better performance than Full Ejection.
     *
     * This value is only valid for buckets of type COUCHBASE.
     */
    public const VALUE_ONLY = "valueOnly";

    /**
     * Couchbase Server keeps all data until explicitly deleted, but will reject
     * any new data if you reach the quota (dedicated memory) you set for your bucket.
     *
     * This value is only valid for buckets of type EPHEMERAL.
     */
    public const NO_EVICTION = "noEviction";

    /**
     * When the memory quota is reached, Couchbase Server ejects data that has not been used recently.
     *
     * This value is only valid for buckets of type EPHEMERAL.
     */
    public const NOT_RECENTLY_USED = "nruEviction";
}

interface StorageBackend
{
    public const COUCHSTORE = "couchstore";
    public const MAGMA = "magma";
}

class BucketSettings
{
    public function name(): string {}

    public function flushEnabled(): bool {}

    public function ramQuotaMb(): int {}

    public function numReplicas(): int {}

    public function replicaIndexes(): bool {}

    public function bucketType(): string {}

    public function evictionPolicy(): string {}

    public function storageBackend(): string {}

    public function maxTtl(): int {}

    public function compressionMode(): string {}

    public function setName(string $name): BucketSettings {}

    public function enableFlush(bool $enable): BucketSettings {}

    public function setRamQuotaMb(int $sizeInMb): BucketSettings {}

    public function setNumReplicas(int $numReplicas): BucketSettings {}

    public function enableReplicaIndexes(bool $enable): BucketSettings {}

    public function setBucketType(string $type): BucketSettings {}

    /**
     * Configures eviction policy for the bucket.
     *
     * @param string $policy eviction policy. Use constants FULL, VALUE_ONLY,
     *   NO_EVICTION, NOT_RECENTLY_USED.
     *
     * @see \EvictionPolicy::FULL
     * @see \EvictionPolicy::VALUE_ONLY
     * @see \EvictionPolicy::NO_EVICTION
     * @see \EvictionPolicy::NOT_RECENTLY_USED
     */
    public function setEvictionPolicy(string $policy): BucketSettings {}

    /**
     * Configures storage backend for the bucket.
     *
     * @param string $policy storage backend. Use constants COUCHSTORE, MAGMA.
     *
     * @see \StorageBackend::COUCHSTORE
     * @see \StorageBackend::MAGMA
     */
    public function setStorageBackend(string $policy): BucketSettings {}

    public function setMaxTtl(int $ttlSeconds): BucketSettings {}

    public function setCompressionMode(string $mode): BucketSettings {}

    /**
     * Retrieves minimal durability level configured for the bucket
     *
     * @see \DurabilityLevel::NONE
     * @see \DurabilityLevel::MAJORITY
     * @see \DurabilityLevel::MAJORITY_AND_PERSIST_TO_ACTIVE
     * @see \DurabilityLevel::PERSIST_TO_MAJORITY
     */
    public function minimalDurabilityLevel(): int {}

    /**
     * Configures minimal durability level for the bucket
     *
     * @param int $durabilityLevel durability level.
     *
     * @see \DurabilityLevel::NONE
     * @see \DurabilityLevel::MAJORITY
     * @see \DurabilityLevel::MAJORITY_AND_PERSIST_TO_ACTIVE
     * @see \DurabilityLevel::PERSIST_TO_MAJORITY
     */
    public function setMinimalDurabilityLevel(int $durabilityLevel): BucketSettings {}
}

class BucketManager
{
    public function createBucket(BucketSettings $settings) {}

    public function removeBucket(string $name) {}

    public function getBucket(string $name): BucketSettings {}

    public function getAllBuckets(): array {}

    public function flush(string $name) {}
}

class Role
{
    public function name(): string {}

    public function bucket(): ?string {}

    public function scope(): ?string {}

    public function collection(): ?string {}

    public function setName(string $name): Role {}

    public function setBucket(string $bucket): Role {}

    public function setScope(string $bucket): Role {}

    public function setCollection(string $bucket): Role {}
}

class RoleAndDescription
{
    public function role(): Role {}

    public function displayName(): string {}

    public function description(): string {}
}

class Origin
{
    public function type(): string {}

    public function name(): string {}
}

class RoleAndOrigin
{
    public function role(): Role {}

    public function origins(): array {}
}

class User
{
    public function username(): string {}

    public function displayName(): string {}

    public function groups(): array {}

    public function roles(): array {}

    public function setUsername(string $username): User {}

    public function setPassword(string $password): User {}

    public function setDisplayName(string $name): User {}

    public function setGroups(array $groups): User {}

    public function setRoles(array $roles): User {}
}

class Group
{
    public function name(): string {}

    public function description(): string {}

    public function roles(): array {}

    public function ldapGroupReference(): ?string {}

    public function setName(string $name): Group {}

    public function setDescription(string $description): Group {}

    public function setRoles(array $roles): Group {}
}

class UserAndMetadata
{
    public function domain(): string {}

    public function user(): User {}

    public function effectiveRoles(): array {}

    public function passwordChanged(): string {}

    public function externalGroups(): array {}
}

class GetAllUsersOptions
{
    public function domainName(string $name): GetAllUsersOptions {}
}

class GetUserOptions
{
    public function domainName(string $name): GetUserOptions {}
}

class DropUserOptions
{
    public function domainName(string $name): DropUserOptions {}
}

class UpsertUserOptions
{
    public function domainName(string $name): DropUserOptions {}
}

class UserManager
{
    public function getUser(string $name, GetUserOptions $options = null): UserAndMetadata {}

    public function getAllUsers(GetAllUsersOptions $options = null): array {}

    public function upsertUser(User $user, UpsertUserOptions $options = null) {}

    public function dropUser(string $name, DropUserOptions $options = null) {}

    public function getRoles(): array {}

    public function getGroup(string $name): Group {}

    public function getAllGroups(): array {}

    public function upsertGroup(Group $group) {}

    public function dropGroup(string $name) {}
}

/**
 * BinaryCollection is an object containing functionality for performing KeyValue operations against the server with binary documents.
 */
class BinaryCollection
{
    /**
     * Get the name of the binary collection.
     *
     * @return string
     */
    public function name(): string {}

    /**
     * Appends a value to a document.
     *
     * @param string $id the key of the document
     * @param string $value the value to append
     * @param AppendOptions $options the options to use for the operation
     * @return MutationResult
     */
    public function append(string $id, string $value, AppendOptions $options = null): MutationResult {}

    /**
     * Prepends a value to a document.
     *
     * @param string $id the key of the document
     * @param string $value the value to prepend
     * @param PrependOptions $options the options to use for the operation
     * @return MutationResult
     */
    public function prepend(string $id, string $value, PrependOptions $options = null): MutationResult {}

    /**
     * Increments a counter document by a value.
     *
     * @param string $id the key of the document
     * @param IncrementOptions $options the options to use for the operation
     * @return CounterResult
     */
    public function increment(string $id, IncrementOptions $options = null): CounterResult {}

    /**
     * Decrements a counter document by a value.
     *
     * @param string $id the key of the document
     * @param DecrementOptions $options the options to use for the operation
     * @return CounterResult
     */
    public function decrement(string $id, DecrementOptions $options = null): CounterResult {}
}

/**
 * Collection is an object containing functionality for performing KeyValue operations against the server.
 */
class Collection
{
    /**
     * Get the name of the collection.
     *
     * @return string
     */
    public function name(): string {}

    /**
     * Gets a document from the server.
     *
     * This can take 3 paths, a standard full document fetch, a subdocument full document fetch also
     * fetching document expiry (when withExpiry is set), or a subdocument fetch (when projections are
     * used).
     *
     * @param string $id the key of the document to fetch
     * @param GetOptions $options the options to use for the operation
     * @return GetResult
     */
    public function get(string $id, GetOptions $options = null): GetResult {}

    /**
     * Checks if a document exists on the server.
     *
     * @param string $id the key of the document to check if exists
     * @param ExistsOptions $options the options to use for the operation
     * @return ExistsResult
     */
    public function exists(string $id, ExistsOptions $options = null): ExistsResult {}

    /**
     * Gets a document from the server, locking the document so that no other processes can
     * perform mutations against it.
     *
     * @param string $id the key of the document to get
     * @param int $lockTime the length of time to lock the document in ms
     * @param GetAndLockOptions $options the options to use for the operation
     * @return GetResult
     */
    public function getAndLock(string $id, int $lockTime, GetAndLockOptions $options = null): GetResult {}

    /**
     * Gets a document from the server and simultaneously updates its expiry time.
     *
     * @param string $id the key of the document
     * @param int $expiry the length of time to update the expiry to in ms
     * @param GetAndTouchOptions $options the options to use for the operation
     * @return GetResult
     */
    public function getAndTouch(string $id, int $expiry, GetAndTouchOptions $options = null): GetResult {}

    /**
     * Gets a document from any replica server in the cluster.
     *
     * @param string $id the key of the document
     * @param GetAnyReplicaOptions $options the options to use for the operation
     * @return GetReplicaResult
     */
    public function getAnyReplica(string $id, GetAnyReplicaOptions $options = null): GetReplicaResult {}

    /**
     * Gets a document from the active server and all replica servers in the cluster.
     * Returns an array of documents, one per server.
     *
     * @param string $id the key of the document
     * @param GetAllReplicasOptions $options the options to use for the operation
     * @return array
     */
    public function getAllReplicas(string $id, GetAllReplicasOptions $options = null): array {}

    /**
     * Creates a document if it doesn't exist, otherwise updates it.
     *
     * @param string $id the key of the document
     * @param mixed $value the value to use for the document
     * @param UpsertOptions $options the options to use for the operation
     * @return MutationResult
     */
    public function upsert(string $id, $value, UpsertOptions $options = null): MutationResult {}

    /**
     * Inserts a document if it doesn't exist, errors if it does exist.
     *
     * @param string $id the key of the document
     * @param mixed $value the value to use for the document
     * @param InsertOptions $options the options to use for the operation
     * @return MutationResult
     */
    public function insert(string $id, $value, InsertOptions $options = null): MutationResult {}

    /**
     * Replaces a document if it exists, errors if it doesn't exist.
     *
     * @param string $id the key of the document
     * @param mixed $value the value to use for the document
     * @param ReplaceOptions $options the options to use for the operation
     * @return MutationResult
     */
    public function replace(string $id, $value, ReplaceOptions $options = null): MutationResult {}

    /**
     * Removes a document.
     *
     * @param string $id the key of the document
     * @param RemoveOptions $options the options to use for the operation
     * @return MutationResult
     */
    public function remove(string $id, RemoveOptions $options = null): MutationResult {}

    /**
     * Unlocks a document which was locked using getAndLock. This frees the document to be
     * modified by other processes.
     *
     * @param string $id the key of the document
     * @param string $cas the current cas value of the document
     * @param UnlockOptions $options the options to use for the operation
     * @return Result
     */
    public function unlock(string $id, string $cas, UnlockOptions $options = null): Result {}

    /**
     * Touches a document, setting a new expiry time.
     *
     * @param string $id the key of the document
     * @param int $expiry the expiry time for the document in ms
     * @param TouchOptions $options the options to use for the operation
     * @return MutationResult
     */
    public function touch(string $id, int $expiry, TouchOptions $options = null): MutationResult {}

    /**
     * Performs a set of subdocument lookup operations against the document.
     *
     * @param string $id the key of the document
     * @param array $specs the LookupInSpecs to perform against the document
     * @param LookupInOptions $options the options to use for the operation
     * @return LookupInResult
     */
    public function lookupIn(string $id, array $specs, LookupInOptions $options = null): LookupInResult {}

    /**
     * Performs a set of subdocument lookup operations against the document.
     *
     * @param string $id the key of the document
     * @param array $specs the MutateInSpecs to perform against the document
     * @param MutateInOptions $options the options to use for the operation
     * @return MutateInResult
     */
    public function mutateIn(string $id, array $specs, MutateInOptions $options = null): MutateInResult {}

    /**
     * Retrieves a group of documents. If the document does not exist, it will not raise an exception, but rather fill
     * non-null value in error() property of the corresponding result object.
     *
     * @param array $ids array of IDs, organized like this ["key1", "key2", ...]
     * @param GetOptions $options the options to use for the operation
     * @return array array of GetResult, one for each of the entries
     */
    public function getMulti(array $ids, RemoveOptions $options = null): array {}

    /**
     * Removes a group of documents. If second element of the entry (CAS) is null, then the operation will
     * remove the document unconditionally.
     *
     * @param array $entries array of arrays, organized like this [["key1", "encodedCas1"], ["key2", , "encodedCas2"], ...] or ["key1", "key2", ...]
     * @param RemoveOptions $options the options to use for the operation
     * @return array array of MutationResult, one for each of the entries
     */
    public function removeMulti(array $entries, RemoveOptions $options = null): array {}

    /**
     * Creates a group of documents if they don't exist, otherwise updates them.
     *
     * @param array $entries array of arrays, organized like this [["key1", $value1], ["key2", $value2], ...]
     * @param UpsertOptions $options the options to use for the operation
     * @return array array of MutationResult, one for each of the entries
     */
    public function upsertMulti(array $entries, UpsertOptions $options = null): array {}

    /**
     * Creates and returns a BinaryCollection object for use with binary type documents.
     *
     * @return BinaryCollection
     */
    public function binary(): BinaryCollection {}
}

/**
 * Scope is an object for providing access to collections.
 */
class Scope
{
    public function __construct(Bucket $bucket, string $name) {}

    /**
     * Returns the name of the scope.
     *
     * @return string
     */
    public function name(): string {}

    /**
     * Returns a new Collection object representing the collection specified.
     *
     * @param string $name the name of the collection
     * @return Collection
     */
    public function collection(string $name): Collection {}

    /**
     * Executes a N1QL query against the cluster with scopeName set implicitly.
     *
     * @param string $statement the N1QL query statement to execute
     * @param QueryOptions $options the options to use when executing the query
     * @return QueryResult
     */
    public function query(string $statement, QueryOptions $options = null): QueryResult {}

    /**
     * Executes an analytics query against the cluster with scopeName set implicitly.
     *
     * @param string $statement the analytics query statement to execute
     * @param AnalyticsOptions $options the options to use when executing the query
     * @return AnalyticsResult
     */
    public function analyticsQuery(string $statement, AnalyticsOptions $options = null): AnalyticsResult {}
}

class ScopeSpec
{
    public function name(): string {}

    public function collections(): array {}
}

class CollectionSpec
{
    public function name(): string {}

    public function scopeName(): string {}

    public function setName(string $name): CollectionSpec {}

    public function setScopeName(string $name): CollectionSpec {}

    public function setMaxExpiry(int $ms): CollectionSpec {}
}

class CollectionManager
{
    public function getScope(string $name): ScopeSpec {}

    public function getAllScopes(): array {}

    public function createScope(string $name) {}

    public function dropScope(string $name) {}

    public function createCollection(CollectionSpec $collection) {}

    public function dropCollection(CollectionSpec $collection) {}
}

/**
 * Bucket is an object containing functionality for performing bucket level operations
 * against a cluster and for access to scopes and collections.
 */
class Bucket
{
    /**
     * Returns a new Scope object representing the default scope.
     *
     * @return Scope
     */
    public function defaultScope(): Scope {}

    /**
     * Returns a new Collection object representing the default collectiom.
     *
     * @return Collection
     */
    public function defaultCollection(): Collection {}

    /**
     * Returns a new Scope object representing the given scope.
     *
     * @param string $name the name of the scope
     * @return Scope
     */
    public function scope(string $name): Scope {}

    /**
     * Sets the default transcoder to be used when fetching or sending data.
     *
     * @param callable $encoder the encoder to use to encode data when sending data to the server
     * @param callable $decoder the decoder to use to decode data when retrieving data from the server
     */
    public function setTranscoder(callable $encoder, callable $decoder) {}

    /**
     * Returns the name of the Bucket.
     *
     * @return string
     */
    public function name(): string {}

    /**
     * Executes a view query against the cluster.
     *
     * @param string $designDoc the design document to use for the query
     * @param string $viewName the view to use for the query
     * @param ViewOptions $options the options to use when executing the query
     * @return ViewResult
     */
    public function viewQuery(string $designDoc, string $viewName, ViewOptions $options = null): ViewResult {}

    /**
     * Creates a new CollectionManager object for managing collections and scopes.
     *
     * @return CollectionManager
     */
    public function collections(): CollectionManager {}

    /**
     * Creates a new ViewIndexManager object for managing views and design documents.
     *
     * @return ViewIndexManager
     */
    public function viewIndexes(): ViewIndexManager {}

    /**
     * Executes a ping for each service against each node in the cluster. This can be used for determining
     * the current health of the cluster.
     *
     * @param mixed $services the services to ping against
     * @param mixed $reportId a name which will be included within the ping result
     */
    public function ping($services, $reportId) {}

    /**
     * Returns diagnostics information about connections that the SDK has to the cluster. This does not perform
     * any operations.
     *
     * @param mixed $reportId a name which will be included within the ping result
     */
    public function diagnostics($reportId) {}
}

class View
{
    public function name(): string {}

    public function map(): string {}

    public function reduce(): string {}

    public function setName(string $name): View {}

    public function setMap(string $mapJsCode): View {}

    public function setReduce(string $reduceJsCode): View {}
}

class DesignDocument
{
    public function name(): string {}

    public function views(): array {}

    public function setName(string $name): DesignDocument {}

    public function setViews(array $views): DesignDocument {}
}

class ViewIndexManager
{
    public function getAllDesignDocuments(): array {}

    public function getDesignDocument(string $name): DesignDocument {}

    public function dropDesignDocument(string $name) {}

    public function upsertDesignDocument(DesignDocument $document) {}
}

/**
 * MutationState is an object which holds and aggregates mutation tokens across operations.
 */
class MutationState
{
    public function __construct() {}

    /**
     * Adds the result of a mutation operation to this mutation state.
     *
     * @param MutationResult $source the result object to add to this state
     * @return MutationState
     */
    public function add(MutationResult $source): MutationState {}
}

class AnalyticsOptions
{
    public function timeout(int $arg): AnalyticsOptions {}

    public function namedParameters(array $pairs): AnalyticsOptions {}

    public function positionalParameters(array $args): AnalyticsOptions {}

    public function raw(string $key, $value): AnalyticsOptions {}

    public function clientContextId(string $value): AnalyticsOptions {}

    public function priority(bool $urgent): AnalyticsOptions {}

    public function readonly(bool $arg): AnalyticsOptions {}

    public function scanConsistency(string $arg): AnalyticsOptions {}
}

/**
 * LookupInSpec is an interface for providing subdocument lookup operations.
 */
interface LookupInSpec {}

/**
 * Indicates a path for a value to be retrieved from a document.
 */
class LookupGetSpec implements LookupInSpec
{
    public function __construct(string $path, bool $isXattr = false) {}
}

/**
 * Indicates to retrieve the count of array items or dictionary keys within a path in a document.
 */
class LookupCountSpec implements LookupInSpec
{
    public function __construct(string $path, bool $isXattr = false) {}
}

/**
 * Indicates to check if a path exists in a document.
 */
class LookupExistsSpec implements LookupInSpec
{
    public function __construct(string $path, bool $isXattr = false) {}
}

/**
 * Indicates to retreive a whole document.
 */
class LookupGetFullSpec implements LookupInSpec
{
    public function __construct() {}
}

/**
 * MutateInSpec is an interface for providing subdocument mutation operations.
 */
interface MutateInSpec {}

/**
 * Indicates to insert a value at a path in a document.
 */
class MutateInsertSpec implements MutateInSpec
{
    public function __construct(string $path, $value, bool $isXattr, bool $createPath, bool $expandMacros) {}
}

/**
 * Indicates to replace a value at a path if it doesn't exist, otherwise create the path, in a document.
 */
class MutateUpsertSpec implements MutateInSpec
{
    public function __construct(string $path, $value, bool $isXattr, bool $createPath, bool $expandMacros) {}
}

/**
 * Indicates to replace a value at a path if it doesn't exist in a document.
 */
class MutateReplaceSpec implements MutateInSpec
{
    public function __construct(string $path, $value, bool $isXattr) {}
}

/**
 * Indicates to remove a value at a path in a document.
 */
class MutateRemoveSpec implements MutateInSpec
{
    public function __construct(string $path, bool $isXattr) {}
}

/**
 * Indicates to append a value to an array at a path in a document.
 */
class MutateArrayAppendSpec implements MutateInSpec
{
    public function __construct(string $path, array $values, bool $isXattr, bool $createPath, bool $expandMacros) {}
}

/**
 * Indicates to prepend a value to an array at a path in a document.
 */
class MutateArrayPrependSpec implements MutateInSpec
{
    public function __construct(string $path, array $values, bool $isXattr, bool $createPath, bool $expandMacros) {}
}

/**
 * Indicates to insert a value into an array at a path in a document.
 */
class MutateArrayInsertSpec implements MutateInSpec
{
    public function __construct(string $path, array $values, bool $isXattr, bool $createPath, bool $expandMacros) {}
}

/**
 * Indicates to add a value into an array at a path in a document so long as that value does not already exist
 * in the array.
 */
class MutateArrayAddUniqueSpec implements MutateInSpec
{
    public function __construct(string $path, $value, bool $isXattr, bool $createPath, bool $expandMacros) {}
}

/**
 * Indicates to increment or decrement a counter value at a path in a document.
 */
class MutateCounterSpec implements MutateInSpec
{
    public function __construct(string $path, int $delta, bool $isXattr, bool $createPath) {}
}

class SearchOptions implements JsonSerializable
{
    public function jsonSerialize() {}

    /**
     * Sets the server side timeout in milliseconds
     *
     * @param int $ms the server side timeout to apply
     * @return SearchOptions
     */
    public function timeout(int $ms): SearchOptions {}

    /**
     * Add a limit to the query on the number of hits it can return
     *
     * @param int $limit the maximum number of hits to return
     * @return SearchOptions
     */
    public function limit(int $limit): SearchOptions {}

    /**
     * Set the number of hits to skip (eg. for pagination).
     *
     * @param int $skip the number of results to skip
     * @return SearchOptions
     */
    public function skip(int $skip): SearchOptions {}

    /**
     * Activates the explanation of each result hit in the response
     *
     * @param bool $explain
     * @return SearchOptions
     */
    public function explain(bool $explain): SearchOptions {}

    /**
     * If set to true, the server will not perform any scoring on the hits
     *
     * @param bool $disabled
     * @return SearchOptions
     */
    public function disableScoring(bool $disabled): SearchOptions {}

    /**
     * Sets the consistency to consider for this FTS query to AT_PLUS and
     * uses the MutationState to parameterize the consistency.
     *
     * This replaces any consistency tuning previously set.
     *
     * @param MutationState $state the mutation state information to work with
     * @return SearchOptions
     */
    public function consistentWith(string $index, MutationState $state): SearchOptions {}

    /**
     * Configures the list of fields for which the whole value should be included in the response.
     *
     * If empty, no field values are included. This drives the inclusion of the fields in each hit.
     * Note that to be highlighted, the fields must be stored in the FTS index.
     *
     * @param string[] $fields
     * @return SearchOptions
     */
    public function fields(array $fields): SearchOptions {}

    /**
     * Adds one SearchFacet-s to the query
     *
     * This is an additive operation (the given facets are added to any facet previously requested),
     * but if an existing facet has the same name it will be replaced.
     *
     * Note that to be faceted, a field's value must be stored in the FTS index.
     *
     * @param SearchFacet[] $facets
     * @return SearchOptions
     *
     * @see \SearchFacet
     * @see \TermSearchFacet
     * @see \NumericRangeSearchFacet
     * @see \DateRangeSearchFacet
     */
    public function facets(array $facets): SearchOptions {}

    /**
     * Configures the list of fields (including special fields) which are used for sorting purposes.
     * If empty, the default sorting (descending by score) is used by the server.
     *
     * The list of sort fields can include actual fields (like "firstname" but then they must be stored in the
     * index, configured in the server side mapping). Fields provided first are considered first and in a "tie" case
     * the next sort field is considered. So sorting by "firstname" and then "lastname" will first sort ascending by
     * the firstname and if the names are equal then sort ascending by lastname. Special fields like "_id" and
     * "_score" can also be used. If prefixed with "-" the sort order is set to descending.
     *
     * If no sort is provided, it is equal to sort("-_score"), since the server will sort it by score in descending
     * order.
     *
     * @param array $specs sort the fields that should take part in the sorting.
     * @return SearchOptions
     */
    public function sort(array $specs): SearchOptions {}

    /**
     * Configures the highlighting of matches in the response
     *
     * @param string $style highlight style to apply. Use constants HIGHLIGHT_HTML,
     *   HIGHLIGHT_ANSI, HIGHLIGHT_SIMPLE.
     * @param string ...$fields the optional fields on which to highlight.
     *   If none, all fields where there is a match are highlighted.
     * @return SearchOptions
     *
     * @see \SearchHighlightMode::HTML
     * @see \SearchHighlightMode::ANSI
     * @see \SearchHighlightMode::SIMPLE
     */
    public function highlight(string $style = null, array $fields = null): SearchOptions {}

    /**
     * Configures the list of collections to use for restricting results.
     *
     * @param string[] $collectionNames
     * @return SearchOptions
     */
    public function collections(array $collectionNames): SearchOptions {}
}

interface SearchHighlightMode
{
    public const HTML = "html";
    public const ANSI = "ansi";
    public const SIMPLE = "simple";
}

/**
 * Common interface for all classes, which could be used as a body of SearchQuery
 *
 * Represents full text search query
 *
 * @see https://developer.couchbase.com/documentation/server/4.6/sdk/php/full-text-searching-with-sdk.html
 *   Searching from the SDK
 */
interface SearchQuery {}

/**
 * A FTS query that queries fields explicitly indexed as boolean.
 */
class BooleanFieldSearchQuery implements JsonSerializable, SearchQuery
{
    public function jsonSerialize() {}

    public function __construct(bool $arg) {}

    /**
     * @param float $boost
     * @return BooleanFieldSearchQuery
     */
    public function boost(float $boost): BooleanFieldSearchQuery {}

    /**
     * @param string $field
     * @return BooleanFieldSearchQuery
     */
    public function field(string $field): BooleanFieldSearchQuery {}
}

/**
 * A compound FTS query that allows various combinations of sub-queries.
 */
class BooleanSearchQuery implements JsonSerializable, SearchQuery
{
    public function jsonSerialize() {}

    public function __construct() {}

    /**
     * @param float $boost
     * @return BooleanSearchQuery
     */
    public function boost($boost): BooleanSearchQuery {}

    /**
     * @param ConjunctionSearchQuery $query
     * @return BooleanSearchQuery
     */
    public function must(ConjunctionSearchQuery $query): BooleanSearchQuery {}

    /**
     * @param DisjunctionSearchQuery $query
     * @return BooleanSearchQuery
     */
    public function mustNot(DisjunctionSearchQuery $query): BooleanSearchQuery {}

    /**
     * @param DisjunctionSearchQuery $query
     * @return BooleanSearchQuery
     */
    public function should(DisjunctionSearchQuery $query): BooleanSearchQuery {}
}

/**
 * A compound FTS query that performs a logical AND between all its sub-queries (conjunction).
 */
class ConjunctionSearchQuery implements JsonSerializable, SearchQuery
{
    public function jsonSerialize() {}

    public function __construct(array $queries) {}

    /**
     * @param float $boost
     * @return ConjunctionSearchQuery
     */
    public function boost($boost): ConjunctionSearchQuery {}

    /**
     * @param SearchQuery ...$queries
     * @return ConjunctionSearchQuery
     */
    public function every(SearchQuery ...$queries): ConjunctionSearchQuery {}
}

/**
 * A FTS query that matches documents on a range of values. At least one bound is required, and the
 * inclusiveness of each bound can be configured.
 */
class DateRangeSearchQuery implements JsonSerializable, SearchQuery
{
    public function jsonSerialize() {}

    public function __construct() {}

    /**
     * @param float $boost
     * @return DateRangeSearchQuery
     */
    public function boost(float $boost): DateRangeSearchQuery {}

    /**
     * @param string $field
     * @return DateRangeSearchQuery
     */
    public function field(string $field): DateRangeSearchQuery {}

    /**
     * @param int|string $start The strings will be taken verbatim and supposed to be formatted with custom date
     *      time formatter (see dateTimeParser). Integers interpreted as unix timestamps and represented as RFC3339
     *      strings.
     * @param bool $inclusive
     * @return DateRangeSearchQuery
     */
    public function start($start, bool $inclusive = false): DateRangeSearchQuery {}

    /**
     * @param int|string $end The strings will be taken verbatim and supposed to be formatted with custom date
     *      time formatter (see dateTimeParser). Integers interpreted as unix timestamps and represented as RFC3339
     *      strings.
     * @param bool $inclusive
     * @return DateRangeSearchQuery
     */
    public function end($end, bool $inclusive = false): DateRangeSearchQuery {}

    /**
     * @param string $dateTimeParser
     * @return DateRangeSearchQuery
     */
    public function dateTimeParser(string $dateTimeParser): DateRangeSearchQuery {}
}

/**
 * A compound FTS query that performs a logical OR between all its sub-queries (disjunction). It requires that a
 * minimum of the queries match. The minimum is configurable (default 1).
 */
class DisjunctionSearchQuery implements JsonSerializable, SearchQuery
{
    public function jsonSerialize() {}

    public function __construct(array $queries) {}

    /**
     * @param float $boost
     * @return DisjunctionSearchQuery
     */
    public function boost(float $boost): DisjunctionSearchQuery {}

    /**
     * @param SearchQuery ...$queries
     * @return DisjunctionSearchQuery
     */
    public function either(SearchQuery ...$queries): DisjunctionSearchQuery {}

    /**
     * @param int $min
     * @return DisjunctionSearchQuery
     */
    public function min(int $min): DisjunctionSearchQuery {}
}

/**
 * A FTS query that matches on Couchbase document IDs. Useful to restrict the search space to a list of keys (by using
 * this in a compound query).
 */
class DocIdSearchQuery implements JsonSerializable, SearchQuery
{
    public function jsonSerialize() {}

    public function __construct() {}

    /**
     * @param float $boost
     * @return DocIdSearchQuery
     */
    public function boost(float $boost): DocIdSearchQuery {}

    /**
     * @param string $field
     * @return DocIdSearchQuery
     */
    public function field(string $field): DocIdSearchQuery {}

    /**
     * @param string ...$documentIds
     * @return DocIdSearchQuery
     */
    public function docIds(string ...$documentIds): DocIdSearchQuery {}
}

/**
 * A FTS query which allows to match geo bounding boxes.
 */
class GeoBoundingBoxSearchQuery implements JsonSerializable, SearchQuery
{
    public function jsonSerialize() {}

    public function __construct(float $top_left_longitude, float $top_left_latitude, float $buttom_right_longitude, float $buttom_right_latitude) {}

    /**
     * @param float $boost
     * @return GeoBoundingBoxSearchQuery
     */
    public function boost(float $boost): GeoBoundingBoxSearchQuery {}

    /**
     * @param string $field
     * @return GeoBoundingBoxSearchQuery
     */
    public function field(string $field): GeoBoundingBoxSearchQuery {}
}

/**
 * A FTS query that finds all matches from a given location (point) within the given distance.
 *
 * Both the point and the distance are required.
 */
class GeoDistanceSearchQuery implements JsonSerializable, SearchQuery
{
    public function jsonSerialize() {}

    public function __construct(float $longitude, float $latitude, string $distance = null) {}

    /**
     * @param float $boost
     * @return GeoDistanceSearchQuery
     */
    public function boost(float $boost): GeoDistanceSearchQuery {}

    /**
     * @param string $field
     * @return GeoDistanceSearchQuery
     */
    public function field(string $field): GeoDistanceSearchQuery {}
}

class Coordinate implements JsonSerializable
{
    public function jsonSerialize() {}

    /**
     * @param float $longitude
     * @param float $latitude
     *
     * @see GeoPolygonQuery
     */
    public function __construct(float $longitude, float $latitude) {}
}

/**
 * A FTS query that finds all matches within the given polygon area.
 */
class GeoPolygonQuery implements JsonSerializable, SearchQuery
{
    public function jsonSerialize() {}

    /**
     * @param array $coordinates list of objects of type Coordinate
     *
     * @see Coordinate
     */
    public function __construct(array $coordinates) {}

    /**
     * @param float $boost
     * @return GeoPolygonQuery
     */
    public function boost(float $boost): GeoPolygonQuery {}

    /**
     * @param string $field
     * @return GeoPolygonQuery
     */
    public function field(string $field): GeoPolygonQuery {}
}

/**
 * A FTS query that matches all indexed documents (usually for debugging purposes).
 */
class MatchAllSearchQuery implements JsonSerializable, SearchQuery
{
    public function jsonSerialize() {}

    public function __construct() {}

    /**
     * @param float $boost
     * @return MatchAllSearchQuery
     */
    public function boost(float $boost): MatchAllSearchQuery {}
}

/**
 * A FTS query that matches 0 document (usually for debugging purposes).
 */
class MatchNoneSearchQuery implements JsonSerializable, SearchQuery
{
    public function jsonSerialize() {}

    public function __construct() {}

    /**
     * @param float $boost
     * @return MatchNoneSearchQuery
     */
    public function boost(float $boost): MatchNoneSearchQuery {}
}

/**
 * A FTS query that matches several given terms (a "phrase"), applying further processing
 * like analyzers to them.
 */
class MatchPhraseSearchQuery implements JsonSerializable, SearchQuery
{
    public function jsonSerialize() {}

    public function __construct(string $value) {}

    /**
     * @param float $boost
     * @return MatchPhraseSearchQuery
     */
    public function boost(float $boost): MatchPhraseSearchQuery {}

    /**
     * @param string $field
     * @return MatchPhraseSearchQuery
     */
    public function field(string $field): MatchPhraseSearchQuery {}

    /**
     * @param string $analyzer
     * @return MatchPhraseSearchQuery
     */
    public function analyzer(string $analyzer): MatchPhraseSearchQuery {}
}

/**
 * A FTS query that matches a given term, applying further processing to it
 * like analyzers, stemming and even #fuzziness(int).
 */
class MatchSearchQuery implements JsonSerializable, SearchQuery
{
    public function jsonSerialize() {}

    public function __construct(string $value) {}

    /**
     * @param float $boost
     * @return MatchSearchQuery
     */
    public function boost(float $boost): MatchSearchQuery {}

    /**
     * @param string $field
     * @return MatchSearchQuery
     */
    public function field(string $field): MatchSearchQuery {}

    /**
     * @param string $analyzer
     * @return MatchSearchQuery
     */
    public function analyzer(string $analyzer): MatchSearchQuery {}

    /**
     * @param int $prefixLength
     * @return MatchSearchQuery
     */
    public function prefixLength(int $prefixLength): MatchSearchQuery {}

    /**
     * @param int $fuzziness
     * @return MatchSearchQuery
     */
    public function fuzziness(int $fuzziness): MatchSearchQuery {}
}

/**
 * A FTS query that matches documents on a range of values. At least one bound is required, and the
 * inclusiveness of each bound can be configured.
 */
class NumericRangeSearchQuery implements JsonSerializable, SearchQuery
{
    public function jsonSerialize() {}

    public function __construct() {}

    /**
     * @param float $boost
     * @return NumericRangeSearchQuery
     */
    public function boost(float $boost): NumericRangeSearchQuery {}

    /**
     * @param string $field
     * @return NumericRangeSearchQuery
     */
    public function field($field): NumericRangeSearchQuery {}

    /**
     * @param float $min
     * @param bool $inclusive
     * @return NumericRangeSearchQuery
     */
    public function min(float $min, bool $inclusive = false): NumericRangeSearchQuery {}

    /**
     * @param float $max
     * @param bool $inclusive
     * @return NumericRangeSearchQuery
     */
    public function max(float $max, bool $inclusive = false): NumericRangeSearchQuery {}
}

/**
 * A FTS query that matches several terms (a "phrase") as is. The order of the terms mater and no further processing is
 * applied to them, so they must appear in the index exactly as provided.  Usually for debugging purposes, prefer
 * MatchPhraseQuery.
 */
class PhraseSearchQuery implements JsonSerializable, SearchQuery
{
    public function jsonSerialize() {}

    public function __construct(string ...$terms) {}

    /**
     * @param float $boost
     * @return PhraseSearchQuery
     */
    public function boost(float $boost): PhraseSearchQuery {}

    /**
     * @param string $field
     * @return PhraseSearchQuery
     */
    public function field(string $field): PhraseSearchQuery {}
}

/**
 * A FTS query that allows for simple matching on a given prefix.
 */
class PrefixSearchQuery implements JsonSerializable, SearchQuery
{
    public function jsonSerialize() {}

    public function __construct(string $prefix) {}

    /**
     * @param float $boost
     * @return PrefixSearchQuery
     */
    public function boost(float $boost): PrefixSearchQuery {}

    /**
     * @param string $field
     * @return PrefixSearchQuery
     */
    public function field(string $field): PrefixSearchQuery {}
}

/**
 * A FTS query that performs a search according to the "string query" syntax.
 */
class QueryStringSearchQuery implements JsonSerializable, SearchQuery
{
    public function jsonSerialize() {}

    public function __construct(string $query_string) {}

    /**
     * @param float $boost
     * @return QueryStringSearchQuery
     */
    public function boost(float $boost): QueryStringSearchQuery {}
}

/**
 * A FTS query that allows for simple matching of regular expressions.
 */
class RegexpSearchQuery implements JsonSerializable, SearchQuery
{
    public function jsonSerialize() {}

    public function __construct(string $regexp) {}

    /**
     * @param float $boost
     * @return RegexpSearchQuery
     */
    public function boost(float $boost): RegexpSearchQuery {}

    /**
     * @param string $field
     * @return RegexpSearchQuery
     */
    public function field(string $field): RegexpSearchQuery {}
}

/**
 * A facet that gives the number of occurrences of the most recurring terms in all hits.
 */
class TermSearchQuery implements JsonSerializable, SearchQuery
{
    public function jsonSerialize() {}

    public function __construct(string $term) {}

    /**
     * @param float $boost
     * @return TermSearchQuery
     */
    public function boost(float $boost): TermSearchQuery {}

    /**
     * @param string $field
     * @return TermSearchQuery
     */
    public function field(string $field): TermSearchQuery {}

    /**
     * @param int $prefixLength
     * @return TermSearchQuery
     */
    public function prefixLength(int $prefixLength): TermSearchQuery {}

    /**
     * @param int $fuzziness
     * @return TermSearchQuery
     */
    public function fuzziness(int $fuzziness): TermSearchQuery {}
}

/**
 * A FTS query that matches documents on a range of values. At least one bound is required, and the
 * inclusiveness of each bound can be configured.
 */
class TermRangeSearchQuery implements JsonSerializable, SearchQuery
{
    public function jsonSerialize() {}

    public function __construct() {}

    /**
     * @param float $boost
     * @return TermRangeSearchQuery
     */
    public function boost(float $boost): TermRangeSearchQuery {}

    /**
     * @param string $field
     * @return TermRangeSearchQuery
     */
    public function field(string $field): TermRangeSearchQuery {}

    /**
     * @param string $min
     * @param bool $inclusive
     * @return TermRangeSearchQuery
     */
    public function min(string $min, bool $inclusive = true): TermRangeSearchQuery {}

    /**
     * @param string $max
     * @param bool $inclusive
     * @return TermRangeSearchQuery
     */
    public function max(string $max, bool $inclusive = false): TermRangeSearchQuery {}
}

/**
 * A FTS query that allows for simple matching using wildcard characters (* and ?).
 */
class WildcardSearchQuery implements JsonSerializable, SearchQuery
{
    public function jsonSerialize() {}

    public function __construct(string $wildcard) {}

    /**
     * @param float $boost
     * @return WildcardSearchQuery
     */
    public function boost(float $boost): WildcardSearchQuery {}

    /**
     * @param string $field
     * @return WildcardSearchQuery
     */
    public function field(string $field): WildcardSearchQuery {}
}

/**
 * Common interface for all search facets
 *
 * @see \SearchQuery::addFacet()
 * @see \TermSearchFacet
 * @see \DateRangeSearchFacet
 * @see \NumericRangeSearchFacet
 */
interface SearchFacet {}

/**
 * A facet that gives the number of occurrences of the most recurring terms in all hits.
 */
class TermSearchFacet implements JsonSerializable, SearchFacet
{
    public function jsonSerialize() {}

    public function __construct(string $field, int $limit) {}
}

/**
 * A facet that categorizes hits into numerical ranges (or buckets) provided by the user.
 */
class NumericRangeSearchFacet implements JsonSerializable, SearchFacet
{
    public function jsonSerialize() {}

    public function __construct(string $field, int $limit) {}

    /**
     * @param string $name
     * @param float $min
     * @param float $max
     * @return NumericRangeSearchFacet
     */
    public function addRange(string $name, float $min = null, float $max = null): NumericRangeSearchFacet {}
}

/**
 * A facet that categorizes hits inside date ranges (or buckets) provided by the user.
 */
class DateRangeSearchFacet implements JsonSerializable, SearchFacet
{
    public function jsonSerialize() {}

    public function __construct(string $field, int $limit) {}

    /**
     * @param string $name
     * @param int|string $start
     * @param int|string $end
     * @return DateRangeSearchFacet
     */
    public function addRange(string $name, $start = null, $end = null): DateRangeSearchFacet {}
}

/**
 * Base interface for all FTS sort options in querying.
 */
interface SearchSort {}

/**
 * Sort by a field in the hits.
 */
class SearchSortField implements JsonSerializable, SearchSort
{
    public function jsonSerialize() {}

    public function __construct(string $field) {}

    /**
     * Direction of the sort
     *
     * @param bool $descending
     *
     * @return SearchSortField
     */
    public function descending(bool $descending): SearchSortField {}

    /**
     * Set type of the field
     *
     * @param string type the type
     *
     * @see SearchSortType::AUTO
     * @see SearchSortType::STRING
     * @see SearchSortType::NUMBER
     * @see SearchSortType::DATE
     */
    public function type(string $type): SearchSortField {}

    /**
     * Set mode of the sort
     *
     * @param string mode the mode
     *
     * @see SearchSortMode::MIN
     * @see SearchSortMode::MAX
     */
    public function mode(string $mode): SearchSortField {}

    /**
     * Set where the hits with missing field will be inserted
     *
     * @param string missing strategy for hits with missing fields
     *
     * @see SearchSortMissing::FIRST
     * @see SearchSortMissing::LAST
     */
    public function missing(string $missing): SearchSortField {}
}

interface SearchSortType
{
    public const AUTO = "auto";
    public const STRING = "string";
    public const NUMBER = "number";
    public const DATE = "date";
}

interface SearchSortMode
{
    public const DEFAULT = "default";
    public const MIN = "min";
    public const MAX = "max";
}

interface SearchSortMissing
{
    public const FIRST = "first";
    public const LAST = "last";
}

/**
 * Sort by a location and unit in the hits.
 */
class SearchSortGeoDistance implements JsonSerializable, SearchSort
{
    public function jsonSerialize() {}

    public function __construct(string $field, float $logitude, float $latitude) {}

    /**
     * Direction of the sort
     *
     * @param bool $descending
     *
     * @return SearchSortGeoDistance
     */
    public function descending(bool $descending): SearchSortGeoDistance {}

    /**
     * Name of the units
     *
     * @param string $unit
     *
     * @return SearchSortGeoDistance
     */
    public function unit(string $unit): SearchSortGeoDistance {}
}

/**
 * Sort by the document identifier.
 */
class SearchSortId implements JsonSerializable, SearchSort
{
    public function jsonSerialize() {}

    public function __construct() {}

    /**
     * Direction of the sort
     *
     * @param bool $descending
     *
     * @return SearchSortId
     */
    public function descending(bool $descending): SearchSortId {}
}

/**
 * Sort by the hit score.
 */
class SearchSortScore implements JsonSerializable, SearchSort
{
    public function jsonSerialize() {}

    public function __construct() {}

    /**
     * Direction of the sort
     *
     * @param bool $descending
     *
     * @return SearchSortScore
     */
    public function descending(bool $descending): SearchSortScore {}
}

class GetOptions
{
    /**
     * Sets the operation timeout in milliseconds.
     *
     * @param int $arg the operation timeout to apply
     * @return GetOptions
     */
    public function timeout(int $arg): GetOptions {}

    /**
     * Sets whether to include document expiry with the document content.
     *
     * When used this option will transparently transform the Get
     * operation into a subdocument operation performing a full document
     * fetch as well as the expiry.
     *
     * @param bool $arg whether or not to include document expiry
     * @return GetOptions
     */
    public function withExpiry(bool $arg): GetOptions {}

    /**
     * Sets whether to cause the Get operation to only fetch the fields
     * from the document indicated by the paths provided.
     *
     * When used this option will transparently transform the Get
     * operation into a subdocument operation fetching only the required
     * fields.
     *
     * @param array $arg the array of field names
     * @return GetOptions
     */
    public function project(array $arg): GetOptions {}

    /**
     * Associate custom transcoder with the request.
     *
     * @param callable $arg decoding function with signature (returns decoded value):
     *
     *   `function decoder(string $bytes, int $flags, int $datatype): mixed`
     */
    public function decoder(callable $arg): GetOptions {}
}

class GetAndTouchOptions
{
    /**
     * Sets the operation timeout in milliseconds.
     *
     * @param int $arg the operation timeout to apply
     * @return GetAndTouchOptions
     */
    public function timeout(int $arg): GetAndTouchOptions {}

    /**
     * Associate custom transcoder with the request.
     *
     * @param callable $arg decoding function with signature (returns decoded value):
     *
     *   `function decoder(string $bytes, int $flags, int $datatype): mixed`
     */
    public function decoder(callable $arg): GetAndTouchOptions {}
}

class GetAndLockOptions
{
    /**
     * Sets the operation timeout in milliseconds.
     *
     * @param int $arg the operation timeout to apply
     * @return GetAndLockOptions
     */
    public function timeout(int $arg): GetAndLockOptions {}

    /**
     * Associate custom transcoder with the request.
     *
     * @param callable $arg decoding function with signature (returns decoded value):
     *
     *   `function decoder(string $bytes, int $flags, int $datatype): mixed`
     */
    public function decoder(callable $arg): GetAndLockOptions {}
}

class GetAllReplicasOptions
{
    /**
     * Sets the operation timeout in milliseconds.
     *
     * @param int $arg the operation timeout to apply
     * @return GetAllReplicasOptions
     */
    public function timeout(int $arg): GetAllReplicasOptions {}

    /**
     * Associate custom transcoder with the request.
     *
     * @param callable $arg decoding function with signature (returns decoded value):
     *
     *   `function decoder(string $bytes, int $flags, int $datatype): mixed`
     */
    public function decoder(callable $arg): GetAllReplicasOptions {}
}

class GetAnyReplicaOptions
{
    /**
     * Sets the operation timeout in milliseconds.
     *
     * @param int $arg the operation timeout to apply
     * @return GetAnyReplicaOptions
     */
    public function timeout(int $arg): GetAnyReplicaOptions {}

    /**
     * Associate custom transcoder with the request.
     *
     * @param callable $arg decoding function with signature (returns decoded value):
     *
     *   `function decoder(string $bytes, int $flags, int $datatype): mixed`
     */
    public function decoder(callable $arg): GetAnyReplicaOptions {}
}

class ExistsOptions
{
    /**
     * Sets the operation timeout in milliseconds.
     *
     * @param int $arg the operation timeout to apply
     * @return ExistsOptions
     */
    public function timeout(int $arg): ExistsOptions {}
}

class UnlockOptions
{
    /**
     * Sets the operation timeout in milliseconds.
     *
     * @param int $arg the operation timeout to apply
     * @return UnlockOptions
     */
    public function timeout(int $arg): UnlockOptions {}
}

class InsertOptions
{
    /**
     * Sets the operation timeout in milliseconds.
     *
     * @param int $arg the operation timeout to apply
     * @return InsertOptions
     */
    public function timeout(int $arg): InsertOptions {}

    /**
     * Sets the expiry time for the document.
     *
     * @param int $arg the expiry time in ms
     * @return InsertOptions
     */
    public function expiry(int $arg): InsertOptions {}

    /**
     * Sets the durability level to enforce when writing the document.
     *
     * @param int $arg the durability level to enforce
     * @return InsertOptions
     */
    public function durabilityLevel(int $arg): InsertOptions {}

    /**
     * Associate custom transcoder with the request.
     *
     * @param callable $arg encoding function with signature (returns tuple of bytes, flags and datatype):
     *
     *   `function encoder($value): [string $bytes, int $flags, int $datatype]`
     */
    public function encoder(callable $arg): InsertOptions {}
}

class UpsertOptions
{
    /**
     * Sets the operation timeout in milliseconds.
     *
     * @param int $arg the operation timeout to apply
     * @return UpsertOptions
     */
    public function timeout(int $arg): UpsertOptions {}

    /**
     * Sets the expiry time for the document.
     *
     * @param int|DateTimeInterface $arg the relative expiry time in seconds or DateTimeInterface object for absolute point in time
     * @return UpsertOptions
     */
    public function expiry(mixed $arg): UpsertOptions {}

    /**
     * Sets whether the original expiration should be preserved (by default Replace operation updates expiration).
     *
     * @param bool $shouldPreserve if true, the expiration time will not be updated
     * @return UpsertOptions
     */
    public function preserveExpiry(bool $shouldPreserve): UpsertOptions {}

    /**
     * Sets the durability level to enforce when writing the document.
     *
     * @param int $arg the durability level to enforce
     * @return UpsertOptions
     */
    public function durabilityLevel(int $arg): UpsertOptions {}

    /**
     * Associate custom transcoder with the request.
     *
     * @param callable $arg encoding function with signature (returns tuple of bytes, flags and datatype):
     *
     *   `function encoder($value): [string $bytes, int $flags, int $datatype]`
     */
    public function encoder(callable $arg): UpsertOptions {}
}

class ReplaceOptions
{
    /**
     * Sets the operation timeout in milliseconds.
     *
     * @param int $arg the operation timeout to apply
     * @return ReplaceOptions
     */
    public function timeout(int $arg): ReplaceOptions {}

    /**
     * Sets the expiry time for the document.
     *
     * @param int|DateTimeInterface $arg the relative expiry time in seconds or DateTimeInterface object for absolute point in time
     * @return ReplaceOptions
     */
    public function expiry(mixed $arg): ReplaceOptions {}

    /**
     * Sets whether the original expiration should be preserved (by default Replace operation updates expiration).
     *
     * @param bool $shouldPreserve if true, the expiration time will not be updated
     * @return ReplaceOptions
     */
    public function preserveExpiry(bool $shouldPreserve): ReplaceOptions {}

    /**
     * Sets the cas value for the operation.
     *
     * @param string $arg the cas value
     * @return ReplaceOptions
     */
    public function cas(string $arg): ReplaceOptions {}

    /**
     * Sets the durability level to enforce when writing the document.
     *
     * @param int $arg the durability level to enforce
     * @return ReplaceOptions
     */
    public function durabilityLevel(int $arg): ReplaceOptions {}

    /**
     * Associate custom transcoder with the request.
     *
     * @param callable $arg encoding function with signature (returns tuple of bytes, flags and datatype):
     *
     *   `function encoder($value): [string $bytes, int $flags, int $datatype]`
     */
    public function encoder(callable $arg): ReplaceOptions {}
}

class AppendOptions
{
    /**
     * Sets the operation timeout in milliseconds.
     *
     * @param int $arg the operation timeout to apply
     * @return AppendOptions
     */
    public function timeout(int $arg): AppendOptions {}

    /**
     * Sets the durability level to enforce when writing the document.
     *
     * @param int $arg the durability level to enforce
     * @return AppendOptions
     */
    public function durabilityLevel(int $arg): AppendOptions {}
}

class PrependOptions
{
    /**
     * Sets the operation timeout in milliseconds.
     *
     * @param int $arg the operation timeout to apply
     * @return PrependOptions
     */
    public function timeout(int $arg): PrependOptions {}

    /**
     * Sets the durability level to enforce when writing the document.
     *
     * @param int $arg the durability level to enforce
     * @return PrependOptions
     */
    public function durabilityLevel(int $arg): PrependOptions {}
}

/**
 * An object which contains levels of durability that can be enforced when
 * using mutation operations.
 */
interface DurabilityLevel
{
    /**
     * Apply no durability level.
     */
    public const NONE = 0;

    /**
     * Apply a durability level where the document must be written to memory
     * on a majority of nodes in the cluster.
     */
    public const MAJORITY = 1;

    /**
     * Apply a durability level where the document must be written to memory
     * on a majority of nodes in the cluster and written to disk on the
     * active node.
     */
    public const MAJORITY_AND_PERSIST_TO_ACTIVE = 2;

    /**
     * Apply a durability level where the document must be written to disk
     * on a majority of nodes in the cluster.
     */
    public const PERSIST_TO_MAJORITY = 3;
}

class TouchOptions
{
    /**
     * Sets the operation timeout in milliseconds.
     *
     * @param int $arg the operation timeout to apply
     * @return TouchOptions
     */
    public function timeout(int $arg): TouchOptions {}
}

class IncrementOptions
{
    /**
     * Sets the operation timeout in milliseconds.
     *
     * @param int $arg the operation timeout to apply
     * @return IncrementOptions
     */
    public function timeout(int $arg): IncrementOptions {}

    /**
     * Sets the expiry time for the document.
     *
     * @param int|DateTimeInterface $arg the relative expiry time in seconds or DateTimeInterface object for absolute point in time
     * @return IncrementOptions
     */
    public function expiry(mixed $arg): IncrementOptions {}

    /**
     * Sets the durability level to enforce when writing the document.
     *
     * @param int $arg the durability level to enforce
     * @return IncrementOptions
     */
    public function durabilityLevel(int $arg): IncrementOptions {}

    /**
     * Sets the value to increment the counter by.
     *
     * @param int $arg the value to increment by
     * @return IncrementOptions
     */
    public function delta(int $arg): IncrementOptions {}

    /**
     * Sets the value to initialize the counter to if the document does
     * not exist.
     *
     * @param int $arg the initial value to use if counter does not exist
     * @return IncrementOptions
     */
    public function initial(int $arg): IncrementOptions {}
}

class DecrementOptions
{
    /**
     * Sets the operation timeout in milliseconds.
     *
     * @param int $arg the operation timeout to apply
     * @return DecrementOptions
     */
    public function timeout(int $arg): DecrementOptions {}

    /**
     * Sets the expiry time for the document.
     *
     * @param int|DateTimeInterface $arg the relative expiry time in seconds or DateTimeInterface object for absolute point in time
     * @return DecrementOptions
     */
    public function expiry(mixed $arg): DecrementOptions {}

    /**
     * Sets the durability level to enforce when writing the document.
     *
     * @param int $arg the durability level to enforce
     * @return DecrementOptions
     */
    public function durabilityLevel(int $arg): DecrementOptions {}

    /**
     * Sets the value to decrement the counter by.
     *
     * @param int $arg the value to decrement by
     * @return DecrementOptions
     */
    public function delta(int $arg): DecrementOptions {}

    /**
     * Sets the value to initialize the counter to if the document does
     * not exist.
     *
     * @param int $arg the initial value to use if counter does not exist
     * @return DecrementOptions
     */
    public function initial(int $arg): DecrementOptions {}
}

class RemoveOptions
{
    /**
     * Sets the operation timeout in milliseconds.
     *
     * @param int $arg the operation timeout to apply
     * @return RemoveOptions
     */
    public function timeout(int $arg): RemoveOptions {}

    /**
     * Sets the durability level to enforce when writing the document.
     *
     * @param int $arg the durability level to enforce
     * @return RemoveOptions
     */
    public function durabilityLevel(int $arg): RemoveOptions {}

    /**
     * Sets the cas value to use when performing this operation.
     *
     * @param string $arg the cas value to use
     * @return RemoveOptions
     */
    public function cas(string $arg): RemoveOptions {}
}

class LookupInOptions
{
    /**
     * Sets the operation timeout in milliseconds.
     *
     * @param int $arg the operation timeout to apply
     * @return LookupInOptions
     */
    public function timeout(int $arg): LookupInOptions {}

    /**
     * Sets whether to include document expiry with the document content.
     *
     * When used this option will add one extra subdocument path into
     * the LookupIn operation. This can cause the set of subdocument paths
     * to exceed the maximum number (16) of paths allowed in a subdocument
     * operation.
     *
     * @param bool $arg whether or not to include document expiry
     * @return LookupInOptions
     */
    public function withExpiry(bool $arg): LookupInOptions {}
}

class MutateInOptions
{
    /**
     * Sets the operation timeout in milliseconds.
     *
     * @param int $arg the operation timeout to apply
     * @return MutateInOptions
     */
    public function timeout(int $arg): MutateInOptions {}

    /**
     * Sets the cas value to use when performing this operation.
     *
     * @param string $arg the cas value to use
     * @return MutateInOptions
     */
    public function cas(string $arg): MutateInOptions {}

    /**
     * Sets the expiry time for the document.
     *
     * @param int|DateTimeInterface $arg the relative expiry time in seconds or DateTimeInterface object for absolute point in time
     * @return MutateInOptions
     */
    public function expiry(mixed $arg): MutateInOptions {}

    /**
     * Sets whether the original expiration should be preserved (by default Replace operation updates expiration).
     *
     * @param bool $shouldPreserve if true, the expiration time will not be updated
     * @return MutateInOptions
     */
    public function preserveExpiry(bool $shouldPreserve): MutateInOptions {}

    /**
     * Sets the durability level to enforce when writing the document.
     *
     * @param int $arg the durability level to enforce
     * @return MutateInOptions
     */
    public function durabilityLevel(int $arg): MutateInOptions {}

    /**
     * Sets the document level action to use when performing the operation.
     *
     * @param int $arg the store semantic to use
     * @return MutateInOptions
     */
    public function storeSemantics(int $arg): MutateInOptions {}
}

/**
 * An object which contains how to define the document level action to take
 * during a MutateIn operation.
 */
interface StoreSemantics
{
    /**
     * Replace the document, and fail if it does not exist.
     */
    public const REPLACE = 0;

    /**
     * Replace the document or create it if it does not exist.
     */
    public const UPSERT = 1;

    /**
     * Create the document or fail if it already exists.
     */
    public const INSERT = 2;
}

class ViewOptions
{
    public function timeout(int $arg): ViewOptions {}

    public function includeDocuments(bool $arg, int $maxConcurrentDocuments = 10): ViewOptions {}

    public function key($arg): ViewOptions {}

    public function keys(array $args): ViewOptions {}

    public function limit(int $arg): ViewOptions {}

    public function skip(int $arg): ViewOptions {}

    public function scanConsistency(int $arg): ViewOptions {}

    public function order(int $arg): ViewOptions {}

    public function reduce(bool $arg): ViewOptions {}

    public function group(bool $arg): ViewOptions {}

    public function groupLevel(int $arg): ViewOptions {}

    public function range($start, $end, $inclusiveEnd = false): ViewOptions {}

    public function idRange($start, $end, $inclusiveEnd = false): ViewOptions {}

    public function raw(string $key, $value): ViewOptions {}
}

interface ViewConsistency
{
    public const NOT_BOUNDED = 0;
    public const REQUEST_PLUS = 1;
    public const UPDATE_AFTER = 2;
}

interface ViewOrdering
{
    public const ASCENDING = 0;
    public const DESCENDING = 1;
}

class QueryOptions
{
    /**
     * Sets the operation timeout in milliseconds.
     *
     * @param int $arg the operation timeout to apply
     * @return QueryOptions
     */
    public function timeout(int $arg): QueryOptions {}

    /**
     * Sets the mutation state to achieve consistency with for read your own writes (RYOW).
     *
     * @param MutationState $arg the mutation state to achieve consistency with
     * @return QueryOptions
     */
    public function consistentWith(MutationState $arg): QueryOptions {}

    /**
     * Sets the scan consistency.
     *
     * @param int $arg the scan consistency level
     * @return QueryOptions
     */
    public function scanConsistency(int $arg): QueryOptions {}

    /**
     * Sets the maximum buffered channel size between the indexer client and the query service for index scans.
     *
     * @param int $arg the maximum buffered channel size
     * @return QueryOptions
     */
    public function scanCap(int $arg): QueryOptions {}

    /**
     * Sets the maximum number of items each execution operator can buffer between various operators.
     *
     * @param int $arg the maximum number of items each execution operation can buffer
     * @return QueryOptions
     */
    public function pipelineCap(int $arg): QueryOptions {}

    /**
     * Sets the number of items execution operators can batch for fetch from the KV service.
     *
     * @param int $arg the pipeline batch size
     * @return QueryOptions
     */
    public function pipelineBatch(int $arg): QueryOptions {}

    /**
     * Sets the maximum number of index partitions, for computing aggregation in parallel.
     *
     * @param int $arg the number of index partitions
     * @return QueryOptions
     */
    public function maxParallelism(int $arg): QueryOptions {}

    /**
     * Sets the query profile mode to use.
     *
     * @param int $arg the query profile mode
     * @return QueryOptions
     */
    public function profile(int $arg): QueryOptions {}

    /**
     * Sets whether or not this query is readonly.
     *
     * @param bool $arg whether the query is readonly
     * @return QueryOptions
     */
    public function readonly(bool $arg): QueryOptions {}

    /**
     * Sets whether or not this query allowed to use FlexIndex (full text search integration).
     *
     * @param bool $arg whether the FlexIndex allowed
     * @return QueryOptions
     */
    public function flexIndex(bool $arg): QueryOptions {}

    /**
     * Sets whether or not this query is adhoc.
     *
     * @param bool $arg whether the query is adhoc
     * @return QueryOptions
     */
    public function adhoc(bool $arg): QueryOptions {}

    /**
     * Sets the named parameters for this query.
     *
     * @param array $pairs the associative array of parameters
     * @return QueryOptions
     */
    public function namedParameters(array $pairs): QueryOptions {}

    /**
     * Sets the positional parameters for this query.
     *
     * @param array $args the array of parameters
     * @return QueryOptions
     */
    public function positionalParameters(array $args): QueryOptions {}

    /**
     * Sets any extra query parameters that the SDK does not provide an option for.
     *
     * @param string $key the name of the parameter
     * @param string $value the value of the parameter
     * @return QueryOptions
     */
    public function raw(string $key, $value): QueryOptions {}

    /**
     * Sets the client context id for this query.
     *
     * @param string $arg the client context id
     * @return QueryOptions
     */
    public function clientContextId(string $arg): QueryOptions {}

    /**
     * Sets whether or not to return metrics with the query.
     *
     * @param bool $arg whether to return metrics
     * @return QueryOptions
     */
    public function metrics(bool $arg): QueryOptions {}

    /**
     * Associate scope name with query
     *
     * @param string $arg the name of the scope
     * @return QueryOptions
     */
    public function scopeName(string $arg): QueryOptions {}

    /**
     * Associate scope qualifier (also known as `query_context`) with the query.
     *
     * The qualifier must be in form `${bucketName}.${scopeName}` or `default:${bucketName}.${scopeName}`
     *
     * @param string $arg the scope qualifier
     * @return QueryOptions
     */
    public function scopeQualifier(string $arg): QueryOptions {}
}

/**
 * Set of values for the scan consistency level of a query.
 */
interface QueryScanConsistency
{
    /**
     * Set scan consistency to not bounded
     */
    public const NOT_BOUNDED = 1;

    /**
     * Set scan consistency to not request plus
     */
    public const REQUEST_PLUS = 2;

    /**
     * Set scan consistency to statement plus
     */
    public const STATEMENT_PLUS = 3;
}

/**
 * Set of values for setting the profile mode of a query.
 */
interface QueryProfile
{
    /**
     * Set profiling to off
     */
    public const OFF = 1;

    /**
     * Set profiling to include phase timings
     */
    public const PHASES = 2;

    /**
     * Set profiling to include execution timings
     */
    public const TIMINGS = 3;
}

class ClusterOptions
{
    public function credentials(string $username, string $password): ClusterOptions {}
}

/**
 * Provides an interface for recording values.
 */
interface ValueRecorder
{
    /**
     * Records a new value.
     *
     * @param int $value The value to record.
     */
    public function recordValue(int $value): void;
}

/**
 * Providers an interface to create value recorders for recording metrics.
 */
interface Meter
{
    /**
     * Creates a new value recorder for a metric with the specified tags.
     *
     * @param string $name The name of the metric.
     * @param array $tags The tags to associate with the metric.
     *
     * @return ValueRecorder
     */
    public function valueRecorder(string $name, array $tags): ValueRecorder;
}

/**
 * Implements a no-op meter which performs no metrics instrumentation.  Note that
 * to reduce the performance impact of using this meter, this class is not
 * actually used by the SDK, and simply acts as a placeholder which triggers a
 * native implementation to be used instead.
 */
class NoopMeter implements Meter
{
    public function valueRecorder(string $name, array $tags): ValueRecorder {}
}

/**
 * Implements a default meter which logs metrics on a regular basis.  Note that
 * to reduce the performance impact of using this meter, this class is not
 * actually used by the SDK, and simply acts as a placeholder which triggers a
 * native implementation to be used instead.
 */
class LoggingMeter implements Meter
{
    /**
     * @param int $duration duration in microseconds how often the metrics should be flushed in the log.
     */
    public function flushInterval(int $duration): LoggingMeter {}

    public function valueRecorder(string $name, array $tags): ValueRecorder {}
}

/**
 * Represents a span of time an event occurs over.
 */
interface RequestSpan
{
    /**
     * Adds an tag to this span.
     *
     * @param string $key The key of the tag to add.
     * @param int|string $value The value to assign to the tag.
     */
    public function addTag(string $key, $value): void;

    /**
     * Ends this span.
     */
    public function end(): void;
}

/**
 * Represents a tracer capable of creating trace spans.
 */
interface RequestTracer
{
    /**
     * Creates a new request span.
     *
     * @param string $name The name of the span.
     * @param string|null $parent The parent of the span, if one exists.
     */
    public function requestSpan(string $name, RequestSpan $parent = null);
}

/**
 * This implements a basic default tracer which keeps track of operations
 * which falls outside a specified threshold.  Note that to reduce the
 * performance impact of using this tracer, this class is not actually
 * used by the SDK, and simply acts as a placeholder which triggers a
 * native implementation to be used instead.
 */
class ThresholdLoggingTracer implements RequestTracer
{
    public function requestSpan(string $name, RequestSpan $parent = null) {}

    /**
     * Specifies how often aggregated trace information should be logged,
     * specified in microseconds.
     */
    public function emitInterval(int $duration) {}

    /**
     * Specifies the threshold for when a kv request should be included
     * in the aggregated metrics, specified in microseconds.
     */
    public function kvThreshold(int $duration) {}

    /**
     * Specifies the threshold for when a query request should be included
     * in the aggregated metrics, specified in microseconds.
     */
    public function queryThreshold(int $duration) {}

    /**
     * Specifies the threshold for when a views request should be included
     * in the aggregated metrics, specified in microseconds.
     */
    public function viewsThreshold(int $duration) {}

    /**
     * Specifies the threshold for when a search request should be included
     * in the aggregated metrics, specified in microseconds.
     */
    public function searchThreshold(int $duration) {}

    /**
     * Specifies the threshold for when an analytics request should be included
     * in the aggregated metrics, specified in microseconds.
     */
    public function analyticsThreshold(int $duration) {}

    /**
     * Specifies the number of entries which should be kept between each
     * logging interval.
     */
    public function sampleSize(int $size) {}
}

/**
 * Implements a no-op tracer which performs no work.  Note that to reduce the
 * performance impact of using this tracer, this class is not actually
 * used by the SDK, and simply acts as a placeholder which triggers a
 * native implementation to be used instead.
 */
class NoopTracer implements RequestTracer
{
    public function requestSpan(string $name, RequestSpan $parent = null) {}
}

/**
 * vim: ts=4 sts=4 sw=4 et
 */
<?php

// Start of Core v.5.3.6-13ubuntu3.2
use JetBrains\PhpStorm\ExpectedValues;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;

/**
 * Created by typecasting to object.
 * @link https://php.net/manual/en/reserved.classes.php
 */
class stdClass {}

/**
 * @link https://wiki.php.net/rfc/iterable
 */
interface iterable {}

/**
 * Interface to detect if a class is traversable using foreach.
 * Abstract base interface that cannot be implemented alone.
 * Instead it must be implemented by either {@see IteratorAggregate} or {@see Iterator}.
 *
 * @link https://php.net/manual/en/class.traversable.php
 * @template TKey
 * @template-covariant TValue
 *
 * @template-implements iterable<TKey, TValue>
 */
interface Traversable extends iterable {}

/**
 * Interface to create an external Iterator.
 * @link https://php.net/manual/en/class.iteratoraggregate.php
 * @template TKey
 * @template-covariant TValue
 * @template-implements Traversable<TKey, TValue>
 */
interface IteratorAggregate extends Traversable
{
    /**
     * Retrieve an external iterator
     * @link https://php.net/manual/en/iteratoraggregate.getiterator.php
     * @return Traversable<TKey, TValue>|TValue[] An instance of an object implementing <b>Iterator</b> or
     * <b>Traversable</b>
     * @throws Exception on failure.
     */
    #[TentativeType]
    public function getIterator(): Traversable;
}

/**
 * Interface for external iterators or objects that can be iterated
 * themselves internally.
 * @link https://php.net/manual/en/class.iterator.php
 * @template TKey
 * @template-covariant TValue
 * @template-implements Traversable<TKey, TValue>
 */
interface Iterator extends Traversable
{
    /**
     * Return the current element
     * @link https://php.net/manual/en/iterator.current.php
     * @return TValue Can return any type.
     */
    #[TentativeType]
    public function current(): mixed;

    /**
     * Move forward to next element
     * @link https://php.net/manual/en/iterator.next.php
     * @return void Any returned value is ignored.
     */
    #[TentativeType]
    public function next(): void;

    /**
     * Return the key of the current element
     * @link https://php.net/manual/en/iterator.key.php
     * @return TKey|null TKey on success, or null on failure.
     */
    #[TentativeType]
    public function key(): mixed;

    /**
     * Checks if current position is valid
     * @link https://php.net/manual/en/iterator.valid.php
     * @return bool The return value will be casted to boolean and then evaluated.
     * Returns true on success or false on failure.
     */
    #[TentativeType]
    public function valid(): bool;

    /**
     * Rewind the Iterator to the first element
     * @link https://php.net/manual/en/iterator.rewind.php
     * @return void Any returned value is ignored.
     */
    #[TentativeType]
    public function rewind(): void;
}

/**
 * Interface to provide accessing objects as arrays.
 * @link https://php.net/manual/en/class.arrayaccess.php
 * @template TKey
 * @template TValue
 */
interface ArrayAccess
{
    /**
     * Whether a offset exists
     * @link https://php.net/manual/en/arrayaccess.offsetexists.php
     * @param mixed $offset <p>
     * An offset to check for.
     * </p>
     * @return bool true on success or false on failure.
     * </p>
     * <p>
     * The return value will be casted to boolean if non-boolean was returned.
     */
    #[TentativeType]
    public function offsetExists(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $offset): bool;

    /**
     * Offset to retrieve
     * @link https://php.net/manual/en/arrayaccess.offsetget.php
     * @param mixed $offset <p>
     * The offset to retrieve.
     * </p>
     * @return TValue Can return all value types.
     */
    #[TentativeType]
    public function offsetGet(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $offset): mixed;

    /**
     * Offset to set
     * @link https://php.net/manual/en/arrayaccess.offsetset.php
     * @param TKey $offset <p>
     * The offset to assign the value to.
     * </p>
     * @param TValue $value <p>
     * The value to set.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function offsetSet(
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $offset,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value
    ): void;

    /**
     * Offset to unset
     * @link https://php.net/manual/en/arrayaccess.offsetunset.php
     * @param TKey $offset <p>
     * The offset to unset.
     * </p>
     * @return void
     */
    #[TentativeType]
    public function offsetUnset(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $offset): void;
}

/**
 * Interface for customized serializing.<br>
 * As of PHP 8.1.0, a class which implements Serializable without also implementing `__serialize()` and `__unserialize()`
 * will generate a deprecation warning.
 * @link https://php.net/manual/en/class.serializable.php
 */
interface Serializable
{
    /**
     * String representation of object.
     * @link https://php.net/manual/en/serializable.serialize.php
     * @return string|null The string representation of the object or null
     * @throws Exception Returning other type than string or null
     */
    public function serialize();

    /**
     * Constructs the object.
     * @link https://php.net/manual/en/serializable.unserialize.php
     * @param string $data The string representation of the object.
     * @return void
     */
    public function unserialize(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data);
}

/**
 * Throwable is the base interface for any object that can be thrown via a throw statement in PHP 7,
 * including Error and Exception.
 * @link https://php.net/manual/en/class.throwable.php
 * @since 7.0
 */
interface Throwable extends Stringable
{
    /**
     * Gets the message
     * @link https://php.net/manual/en/throwable.getmessage.php
     * @return string
     * @since 7.0
     */
    public function getMessage(): string;

    /**
     * Gets the exception code
     * @link https://php.net/manual/en/throwable.getcode.php
     * @return int <p>
     * Returns the exception code as integer in
     * {@see Exception} but possibly as other type in
     * {@see Exception} descendants (for example as
     * string in {@see PDOException}).
     * </p>
     * @since 7.0
     */
    public function getCode();

    /**
     * Gets the file in which the exception occurred
     * @link https://php.net/manual/en/throwable.getfile.php
     * @return string Returns the name of the file from which the object was thrown.
     * @since 7.0
     */
    public function getFile(): string;

    /**
     * Gets the line on which the object was instantiated
     * @link https://php.net/manual/en/throwable.getline.php
     * @return int Returns the line number where the thrown object was instantiated.
     * @since 7.0
     */
    public function getLine(): int;

    /**
     * Gets the stack trace
     * @link https://php.net/manual/en/throwable.gettrace.php
     * @return array <p>
     * Returns the stack trace as an array in the same format as
     * {@see debug_backtrace()}.
     * </p>
     * @since 7.0
     */
    public function getTrace(): array;

    /**
     * Gets the stack trace as a string
     * @link https://php.net/manual/en/throwable.gettraceasstring.php
     * @return string Returns the stack trace as a string.
     * @since 7.0
     */
    public function getTraceAsString(): string;

    /**
     * Returns the previous Throwable
     * @link https://php.net/manual/en/throwable.getprevious.php
     * @return null|Throwable Returns the previous {@see Throwable} if available, or <b>NULL</b> otherwise.
     * @since 7.0
     */
    #[LanguageLevelTypeAware(['8.0' => 'Throwable|null'], default: '')]
    public function getPrevious();

    /**
     * Gets a string representation of the thrown object
     * @link https://php.net/manual/en/throwable.tostring.php
     * @return string <p>Returns the string representation of the thrown object.</p>
     * @since 7.0
     */
    public function __toString();
}

/**
 * Exception is the base class for
 * all Exceptions.
 * @link https://php.net/manual/en/class.exception.php
 */
class Exception implements Throwable
{
    /** The error message */
    protected $message;

    /** The error code */
    protected $code;

    /** The filename where the error happened  */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    protected $file;

    /** The line where the error happened */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    protected $line;

    /**
     * Clone the exception
     * Tries to clone the Exception, which results in Fatal error.
     * @link https://php.net/manual/en/exception.clone.php
     * @return void
     */
    #[PhpStormStubsElementAvailable(from: "5.4", to: "8.0")]
    final private function __clone(): void {}

    /**
     * Clone the exception
     * Tries to clone the Exception, which results in Fatal error.
     * @link https://php.net/manual/en/exception.clone.php
     * @return void
     */
    #[PhpStormStubsElementAvailable("8.1")]
    private function __clone(): void {}

    /**
     * Construct the exception. Note: The message is NOT binary safe.
     * @link https://php.net/manual/en/exception.construct.php
     * @param string $message [optional] The Exception message to throw.
     * @param int $code [optional] The Exception code.
     * @param null|Throwable $previous [optional] The previous throwable used for the exception chaining.
     */
    #[Pure]
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $message = "",
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $code = 0,
        #[LanguageLevelTypeAware(['8.0' => 'Throwable|null'], default: 'Throwable')] $previous = null
    ) {}

    /**
     * Gets the Exception message
     * @link https://php.net/manual/en/exception.getmessage.php
     * @return string the Exception message as a string.
     */
    #[Pure]
    final public function getMessage(): string {}

    /**
     * Gets the Exception code
     * @link https://php.net/manual/en/exception.getcode.php
     * @return mixed|int the exception code as integer in
     * <b>Exception</b> but possibly as other type in
     * <b>Exception</b> descendants (for example as
     * string in <b>PDOException</b>).
     */
    #[Pure]
    final public function getCode() {}

    /**
     * Gets the file in which the exception occurred
     * @link https://php.net/manual/en/exception.getfile.php
     * @return string the filename in which the exception was created.
     */
    #[Pure]
    final public function getFile(): string {}

    /**
     * Gets the line in which the exception occurred
     * @link https://php.net/manual/en/exception.getline.php
     * @return int the line number where the exception was created.
     */
    #[Pure]
    final public function getLine(): int {}

    /**
     * Gets the stack trace
     * @link https://php.net/manual/en/exception.gettrace.php
     * @return array the Exception stack trace as an array.
     */
    #[Pure]
    final public function getTrace(): array {}

    /**
     * Returns previous Exception
     * @link https://php.net/manual/en/exception.getprevious.php
     * @return null|Throwable Returns the previous {@see Throwable} if available, or <b>NULL</b> otherwise.
     * or null otherwise.
     */
    #[Pure]
    final public function getPrevious(): ?Throwable {}

    /**
     * Gets the stack trace as a string
     * @link https://php.net/manual/en/exception.gettraceasstring.php
     * @return string the Exception stack trace as a string.
     */
    #[Pure]
    final public function getTraceAsString(): string {}

    /**
     * String representation of the exception
     * @link https://php.net/manual/en/exception.tostring.php
     * @return string the string representation of the exception.
     */
    #[TentativeType]
    public function __toString(): string {}

    #[TentativeType]
    public function __wakeup(): void {}
}

/**
 * Error is the base class for all internal PHP error exceptions.
 * @link https://php.net/manual/en/class.error.php
 * @since 7.0
 */
class Error implements Throwable
{
    /** The error message */
    protected $message;

    /** The error code */
    protected $code;

    /** The filename where the error happened  */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    protected $file;

    /** The line where the error happened */
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    protected $line;

    /**
     * Construct the error object.
     * @link https://php.net/manual/en/error.construct.php
     * @param string $message [optional] The Error message to throw.
     * @param int $code [optional] The Error code.
     * @param null|Throwable $previous [optional] The previous throwable used for the exception chaining.
     */
    #[Pure]
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $message = "",
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $code = 0,
        #[LanguageLevelTypeAware(['8.0' => 'Throwable|null'], default: 'Throwable')] $previous = null
    ) {}

    /***
     * Gets the message
     * @link https://php.net/manual/en/throwable.getmessage.php
     * @return string
     * @since 7.0
     */
    final public function getMessage(): string {}

    /**
     * Gets the exception code
     * @link https://php.net/manual/en/throwable.getcode.php
     * @return int <p>
     * Returns the exception code as integer in
     * {@see Exception} but possibly as other type in
     * {@see Exception} descendants (for example as
     * string in {@see PDOException}).
     * </p>
     * @since 7.0
     */
    final public function getCode() {}

    /**
     * Gets the file in which the exception occurred
     * @link https://php.net/manual/en/throwable.getfile.php
     * @return string Returns the name of the file from which the object was thrown.
     * @since 7.0
     */
    final public function getFile(): string {}

    /**
     * Gets the line on which the object was instantiated
     * @link https://php.net/manual/en/throwable.getline.php
     * @return int Returns the line number where the thrown object was instantiated.
     * @since 7.0
     */
    final public function getLine(): int {}

    /**
     * Gets the stack trace
     * @link https://php.net/manual/en/throwable.gettrace.php
     * @return array <p>
     * Returns the stack trace as an array in the same format as
     * {@see debug_backtrace()}.
     * </p>
     * @since 7.0
     */
    final public function getTrace(): array {}

    /**
     * Gets the stack trace as a string
     * @link https://php.net/manual/en/throwable.gettraceasstring.php
     * @return string Returns the stack trace as a string.
     * @since 7.0
     */
    final public function getTraceAsString(): string {}

    /**
     * Returns the previous Throwable
     * @link https://php.net/manual/en/throwable.getprevious.php
     * @return null|Throwable Returns the previous {@see Throwable} if available, or <b>NULL</b> otherwise.
     * @since 7.0
     */
    final public function getPrevious(): ?Throwable {}

    /**
     * Gets a string representation of the thrown object
     * @link https://php.net/manual/en/throwable.tostring.php
     * @return string <p>Returns the string representation of the thrown object.</p>
     * @since 7.0
     */
    public function __toString(): string {}

    /**
     * Clone the error
     * Error can not be clone, so this method results in fatal error.
     * @return void
     * @link https://php.net/manual/en/error.clone.php
     */
    #[PhpStormStubsElementAvailable(from: "7.0", to: "8.0")]
    final private function __clone(): void {}

    /**
     * Clone the error
     * Error can not be clone, so this method results in fatal error.
     * @return void
     * @link https://php.net/manual/en/error.clone.php
     */
    #[PhpStormStubsElementAvailable('8.1')]
    private function __clone(): void {}

    #[TentativeType]
    public function __wakeup(): void {}
}

class ValueError extends Error {}

/**
 * There are three scenarios where a TypeError may be thrown.
 * The first is where the argument type being passed to a function does not match its corresponding declared
 * parameter type. The second is where a value being returned from a function does not match the declared function return type. The third is where an
 * invalid number of arguments are passed to a built-in PHP function (strict mode only).
 * @link https://php.net/manual/en/class.typeerror.php
 * @since 7.0
 */
class TypeError extends Error {}

/**
 * ParseError is thrown when an error occurs while parsing PHP code, such as when {@see eval()} is called.
 * @link https://php.net/manual/en/class.parseerror.php
 * @since 7.0
 */
class ParseError extends CompileError {}

/**
 * ArgumentCountError is thrown when too few arguments are passed to a user
 * defined routine.
 *
 * @since 7.1
 * @see https://php.net/migration71.incompatible#migration71.incompatible.too-few-arguments-exception
 */
class ArgumentCountError extends TypeError {}

/**
 * ArithmeticError is thrown when an error occurs while performing mathematical operations.
 * In PHP 7.0, these errors include attempting to perform a bitshift by a negative amount,
 * and any call to {@see intdiv()} that would result in a value outside the possible bounds of an integer.
 * @link https://php.net/manual/en/class.arithmeticerror.php
 * @since 7.0
 */
class ArithmeticError extends Error {}

/**
 * Class CompileError
 * @link https://secure.php.net/manual/en/class.compileerror.php
 * @since 7.3
 */
class CompileError extends Error {}

/**
 * DivisionByZeroError is thrown when an attempt is made to divide a number by zero.
 * @link https://php.net/manual/en/class.divisionbyzeroerror.php
 * @since 7.0
 */
class DivisionByZeroError extends ArithmeticError {}

/**
 * @since 8.0
 */
class UnhandledMatchError extends Error {}

/**
 * An Error Exception.
 * @link https://php.net/manual/en/class.errorexception.php
 */
class ErrorException extends Exception
{
    #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
    protected $severity;

    /**
     * Constructs the exception
     * @link https://php.net/manual/en/errorexception.construct.php
     * @param string $message [optional] The Exception message to throw.
     * @param int $code [optional] The Exception code.
     * @param int $severity [optional] The severity level of the exception.
     * @param string $filename [optional] The filename where the exception is thrown.
     * @param int $line [optional] The line number where the exception is thrown.
     * @param Exception $previous [optional] The previous exception used for the exception chaining.
     */
    #[Pure]
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $message = "",
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $code = 0,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $severity = 1,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $filename = __FILE__,
        #[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $line = __LINE__,
        #[LanguageLevelTypeAware(['8.0' => 'Throwable|null'], default: 'Throwable')] $previous = null
    ) {}

    /**
     * Gets the exception severity
     * @link https://php.net/manual/en/errorexception.getseverity.php
     * @return int the severity level of the exception.
     */
    final public function getSeverity(): int {}
}

/**
 * Class used to represent anonymous functions.
 * <p>Anonymous functions, implemented in PHP 5.3, yield objects of this type.
 * This fact used to be considered an implementation detail, but it can now be relied upon.
 * Starting with PHP 5.4, this class has methods that allow further control of the anonymous function after it has been created.
 * <p>Besides the methods listed here, this class also has an __invoke method.
 * This is for consistency with other classes that implement calling magic, as this method is not used for calling the function.
 * @link https://secure.php.net/manual/en/class.closure.php
 */
final class Closure
{
    /**
     * This method exists only to disallow instantiation of the Closure class.
     * Objects of this class are created in the fashion described on the anonymous functions page.
     * @link https://secure.php.net/manual/en/closure.construct.php
     */
    private function __construct() {}

    /**
     * This is for consistency with other classes that implement calling magic,
     * as this method is not used for calling the function.
     * @param mixed ...$_ [optional]
     * @return mixed
     * @link https://secure.php.net/manual/en/class.closure.php
     */
    public function __invoke(...$_) {}

    /**
     * Duplicates the closure with a new bound object and class scope
     * @link https://secure.php.net/manual/en/closure.bindto.php
     * @param object|null $newThis The object to which the given anonymous function should be bound, or NULL for the closure to be unbound.
     * @param mixed $newScope The class scope to which associate the closure is to be associated, or 'static' to keep the current one.
     * If an object is given, the type of the object will be used instead.
     * This determines the visibility of protected and private methods of the bound object.
     * @return Closure|false Returns the newly created Closure object or FALSE on failure
     */
    public function bindTo(?object $newThis, object|string|null $newScope = 'static'): ?Closure {}

    /**
     * This method is a static version of Closure::bindTo().
     * See the documentation of that method for more information.
     * @link https://secure.php.net/manual/en/closure.bind.php
     * @param Closure $closure The anonymous functions to bind.
     * @param object|null $newThis The object to which the given anonymous function should be bound, or NULL for the closure to be unbound.
     * @param mixed $newScope The class scope to which associate the closure is to be associated, or 'static' to keep the current one.
     * If an object is given, the type of the object will be used instead.
     * This determines the visibility of protected and private methods of the bound object.
     * @return Closure|false Returns the newly created Closure object or FALSE on failure
     */
    public static function bind(Closure $closure, ?object $newThis, object|string|null $newScope = 'static'): ?Closure {}

    /**
     * Temporarily binds the closure to newthis, and calls it with any given parameters.
     * @link https://php.net/manual/en/closure.call.php
     * @param object $newThis The object to bind the closure to for the duration of the call.
     * @param mixed $args [optional] Zero or more parameters, which will be given as parameters to the closure.
     * @return mixed
     * @since 7.0
     */
    public function call(object $newThis, mixed ...$args): mixed {}

    /**
     * @param callable $callback
     * @return Closure
     * @since 7.1
     */
    public static function fromCallable(callable $callback): Closure {}
}

/**
 * Classes implementing <b>Countable</b> can be used with the
 * <b>count</b> function.
 * @link https://php.net/manual/en/class.countable.php
 */
interface Countable
{
    /**
     * Count elements of an object
     * @link https://php.net/manual/en/countable.count.php
     * @return int<0,max> The custom count as an integer.
     * <p>
     * The return value is cast to an integer.
     * </p>
     */
    #[TentativeType]
    public function count(): int;
}

/**
 * Weak references allow the programmer to retain a reference to an
 * object which does not prevent the object from being destroyed.
 * They are useful for implementing cache like structures.
 * @template T of object
 * @link https://www.php.net/manual/en/class.weakreference.php
 * @since 7.4
 */
final class WeakReference
{
    /**
     * This method exists only to disallow instantiation of the WeakReference
     * class. Weak references are to be instantiated with the factory method
     * <b>WeakReference::create()</b>.
     */
    public function __construct() {}

    /**
     * Create a new weak reference.
     * @link https://www.php.net/manual/en/weakreference.create.php
     * @template TIn of object
     * @param TIn $object Any object.
     * @return WeakReference<TIn> The freshly instantiated object.
     * @since 7.4
     */
    public static function create(object $object): WeakReference {}

    /**
     * Gets a weakly referenced object. If the object has already been
     * destroyed, NULL is returned.
     * @link https://www.php.net/manual/en/weakreference.get.php
     * @return T|null
     * @since 7.4
     */
    public function get(): ?object {}
}

/**
 * Weak maps allow creating a map from objects to arbitrary values
 * (similar to SplObjectStorage) without preventing the objects that are used
 * as keys from being garbage collected. If an object key is garbage collected,
 * it will simply be removed from the map.
 *
 * @since 8.0
 *
 * @template TKey of object
 * @template TValue
 * @template-implements IteratorAggregate<TKey, TValue>
 */
final class WeakMap implements ArrayAccess, Countable, IteratorAggregate
{
    /**
     * Returns {@see true} if the value for the object is contained in
     * the {@see WeakMap} and {@see false} instead.
     *
     * @param TKey $object Any object
     * @return bool
     */
    public function offsetExists($object): bool {}

    /**
     * Returns the existsing value by an object.
     *
     * @param TKey $object Any object
     * @return TValue Value associated with the key object
     */
    public function offsetGet($object): mixed {}

    /**
     * Sets a new value for an object.
     *
     * @param TKey $object Any object
     * @param TValue $value Any value
     * @return void
     */
    public function offsetSet($object, mixed $value): void {}

    /**
     * Force removes an object value from the {@see WeakMap} instance.
     *
     * @param TKey $object Any object
     * @return void
     */
    public function offsetUnset($object): void {}

    /**
     * Returns an iterator in the "[object => mixed]" format.
     *
     * @return Traversable<TKey, TValue>
     */
    public function getIterator(): Iterator {}

    /**
     * Returns the number of items in the {@see WeakMap} instance.
     *
     * @return int<0,max>
     */
    public function count(): int {}
}

/**
 * Stringable interface denotes a class as having a __toString() method.
 *
 * @since 8.0
 */
interface Stringable
{
    /**
     * Magic method {@see https://www.php.net/manual/en/language.oop5.magic.php#object.tostring}
     * allows a class to decide how it will react when it is treated like a string.
     *
     * @return string Returns string representation of the object that
     * implements this interface (and/or "__toString" magic method).
     */
    public function __toString(): string;
}

/**
 * @since 8.0
 */
#[Attribute(Attribute::TARGET_CLASS)]
final class Attribute
{
    public int $flags;

    /**
     * Marks that attribute declaration is allowed only in classes.
     */
    public const TARGET_CLASS = 1;

    /**
     * Marks that attribute declaration is allowed only in functions.
     */
    public const TARGET_FUNCTION = 2;

    /**
     * Marks that attribute declaration is allowed only in class methods.
     */
    public const TARGET_METHOD = 4;

    /**
     * Marks that attribute declaration is allowed only in class properties.
     */
    public const TARGET_PROPERTY = 8;

    /**
     * Marks that attribute declaration is allowed only in class constants.
     */
    public const TARGET_CLASS_CONSTANT = 16;

    /**
     * Marks that attribute declaration is allowed only in function or method parameters.
     */
    public const TARGET_PARAMETER = 32;

    /**
     * Marks that attribute declaration is allowed anywhere.
     */
    public const TARGET_ALL = 63;

    /**
     * Notes that an attribute declaration in the same place is
     * allowed multiple times.
     */
    public const IS_REPEATABLE = 64;

    /**
     * @param int $flags A value in the form of a bitmask indicating the places
     * where attributes can be defined.
     */
    public function __construct(#[ExpectedValues(flagsFromClass: Attribute::class)] int $flags = self::TARGET_ALL) {}
}

/**
 * @since 8.0
 */
final class InternalIterator implements Iterator
{
    private function __construct() {}

    public function current(): mixed {}

    public function next(): void {}

    public function key(): mixed {}

    public function valid(): bool {}

    public function rewind(): void {}
}

/**
 * @since 8.1
 */
interface UnitEnum
{
    public readonly string $name;

    /**
     * @return static[]
     */
    #[Pure]
    public static function cases(): array;
}

/**
 * @since 8.1
 */
interface BackedEnum extends UnitEnum
{
    public readonly int|string $value;

    /**
     * @param int|string $value
     * @return static
     */
    #[Pure]
    public static function from(int|string $value): static;

    /**
     * @param int|string $value
     * @return static|null
     */
    #[Pure]
    public static function tryFrom(int|string $value): ?static;
}

/**
 * @since 8.1
 * @internal
 *
 * Internal interface to ensure precise type inference
 */
interface IntBackedEnum extends BackedEnum
{
    public readonly int $value;

    /**
     * @param int $value
     * @return static
     */
    #[Pure]
    public static function from(int $value): static;

    /**
     * @param int $value
     * @return static|null
     */
    #[Pure]
    public static function tryFrom(int $value): ?static;
}

/**
 * @since 8.1
 * @internal
 *
 * Internal interface to ensure precise type inference
 */
interface StringBackedEnum extends BackedEnum
{
    public readonly string $value;

    #[Pure]
    public static function from(string $value): static;

    #[Pure]
    public static function tryFrom(string $value): ?static;
}

/**
 * @since 8.1
 *
 * @template TStart
 * @template TResume
 * @template TReturn
 * @template TSuspend
 */
final class Fiber
{
    /**
     * @param callable $callback Function to invoke when starting the fiber.
     */
    public function __construct(callable $callback) {}

    /**
     * Starts execution of the fiber. Returns when the fiber suspends or terminates.
     *
     * @param TStart ...$args Arguments passed to fiber function.
     *
     * @return TSuspend|null Value from the first suspension point or NULL if the fiber returns.
     *
     * @throws FiberError If the fiber has already been started.
     * @throws Throwable If the fiber callable throws an uncaught exception.
     */
    public function start(mixed ...$args): mixed {}

    /**
     * Resumes the fiber, returning the given value from {@see Fiber::suspend()}.
     * Returns when the fiber suspends or terminates.
     *
     * @param TResume $value
     *
     * @return TSuspend|null Value from the next suspension point or NULL if the fiber returns.
     *
     * @throws FiberError If the fiber has not started, is running, or has terminated.
     * @throws Throwable If the fiber callable throws an uncaught exception.
     */
    public function resume(mixed $value = null): mixed {}

    /**
     * Throws the given exception into the fiber from {@see Fiber::suspend()}.
     * Returns when the fiber suspends or terminates.
     *
     * @param Throwable $exception
     *
     * @return TSuspend|null Value from the next suspension point or NULL if the fiber returns.
     *
     * @throws FiberError If the fiber has not started, is running, or has terminated.
     * @throws Throwable If the fiber callable throws an uncaught exception.
     */
    public function throw(Throwable $exception): mixed {}

    /**
     * @return bool True if the fiber has been started.
     */
    public function isStarted(): bool {}

    /**
     * @return bool True if the fiber is suspended.
     */
    public function isSuspended(): bool {}

    /**
     * @return bool True if the fiber is currently running.
     */
    public function isRunning(): bool {}

    /**
     * @return bool True if the fiber has completed execution (returned or threw).
     */
    public function isTerminated(): bool {}

    /**
     * @return TReturn Return value of the fiber callback. NULL is returned if the fiber does not have a return statement.
     *
     * @throws FiberError If the fiber has not terminated or the fiber threw an exception.
     */
    public function getReturn(): mixed {}

    /**
     * @return self|null Returns the currently executing fiber instance or NULL if in {main}.
     */
    public static function getCurrent(): ?Fiber {}

    /**
     * Suspend execution of the fiber. The fiber may be resumed with {@see Fiber::resume()} or {@see Fiber::throw()}.
     *
     * Cannot be called from {main}.
     *
     * @param TSuspend $value Value to return from {@see Fiber::resume()} or {@see Fiber::throw()}.
     *
     * @return TResume Value provided to {@see Fiber::resume()}.
     *
     * @throws FiberError Thrown if not within a fiber (i.e., if called from {main}).
     * @throws Throwable Exception provided to {@see Fiber::throw()}.
     */
    public static function suspend(mixed $value = null): mixed {}
}

/**
 * @since 8.1
 */
final class FiberError extends Error
{
    public function __construct() {}
}

/**
 * @since 8.1
 */
#[Attribute(Attribute::TARGET_METHOD)]
final class ReturnTypeWillChange
{
    public function __construct() {}
}

/**
 * @since 8.2
 */
#[Attribute(Attribute::TARGET_CLASS)]
final class AllowDynamicProperties
{
    public function __construct() {}
}

/**
 * @since 8.2
 */
#[Attribute(Attribute::TARGET_PARAMETER)]
final class SensitiveParameter
{
    public function __construct() {}
}

/**
 * @since 8.2
 */
final class SensitiveParameterValue
{
    private readonly mixed $value;

    public function __construct(mixed $value) {}

    public function getValue(): mixed {}

    public function __debugInfo(): array {}
}
<?php

// Start of Core v.5.3.6-13ubuntu3.2
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Pure;

/**
 * Gets the version of the current Zend engine
 * @link https://php.net/manual/en/function.zend-version.php
 * @return string the Zend Engine version number, as a string.
 */
#[Pure]
function zend_version(): string {}

/**
 * Returns the number of arguments passed to the function
 * @link https://php.net/manual/en/function.func-num-args.php
 * @return int the number of arguments passed into the current user-defined
 * function.
 */
#[Pure]
function func_num_args(): int {}

/**
 * Return an item from the argument list
 * @link https://php.net/manual/en/function.func-get-arg.php
 * @param int $position <p>
 * The argument offset. Function arguments are counted starting from
 * zero.
 * </p>
 * @return mixed|false the specified argument, or false on error.
 */
#[Pure]
function func_get_arg(int $position): mixed {}

/**
 * Returns an array comprising a function's argument list
 * @link https://php.net/manual/en/function.func-get-args.php
 * @return array an array in which each element is a copy of the corresponding
 * member of the current user-defined function's argument list.
 */
#[Pure]
function func_get_args(): array {}

/**
 * Get string length
 * @link https://php.net/manual/en/function.strlen.php
 * @param string $string <p>
 * The string being measured for length.
 * </p>
 * @return int<0,max> The length of the <i>string</i> on success,
 * and 0 if the <i>string</i> is empty.
 */
#[Pure]
function strlen(string $string): int {}

/**
 * Binary safe string comparison
 * @link https://php.net/manual/en/function.strcmp.php
 * @param string $string1 <p>
 * The first string.
 * </p>
 * @param string $string2 <p>
 * The second string.
 * </p>
 * @return int less 0 if <i>str1</i> is less than
 * <i>str2</i>; &gt; 0 if <i>str1</i>
 * is greater than <i>str2</i>, and 0 if they are
 * equal.
 */
#[Pure]
function strcmp(string $string1, string $string2): int {}

/**
 * Binary safe string comparison of the first n characters
 * @link https://php.net/manual/en/function.strncmp.php
 * @param string $string1 <p>
 * The first string.
 * </p>
 * @param string $string2 <p>
 * The second string.
 * </p>
 * @param int $length <p>
 * Number of characters to use in the comparison.
 * </p>
 * @return int less 0 if <i>str1</i> is less than
 * <i>str2</i>; &gt; 0 if <i>str1</i>
 * is greater than <i>str2</i>, and 0 if they are
 * equal.
 */
#[Pure]
function strncmp(string $string1, string $string2, int $length): int {}

/**
 * Binary safe case-insensitive string comparison
 * @link https://php.net/manual/en/function.strcasecmp.php
 * @param string $string1 <p>
 * The first string
 * </p>
 * @param string $string2 <p>
 * The second string
 * </p>
 * @return int less than 0 if <i>str1</i> is less than
 * <i>str2</i>; &gt; 0 if <i>str1</i>
 * is greater than <i>str2</i>, and 0 if they are
 * equal.
 */
#[Pure]
function strcasecmp(string $string1, string $string2): int {}

/**
 * Binary safe case-insensitive string comparison of the first n characters
 * @link https://php.net/manual/en/function.strncasecmp.php
 * @param string $string1 <p>
 * The first string.
 * </p>
 * @param string $string2 <p>
 * The second string.
 * </p>
 * @param int $length <p>
 * The length of strings to be used in the comparison.
 * </p>
 * @return int less than 0 if <i>str1</i> is less than
 * <i>str2</i>; &gt; 0 if <i>str1</i> is
 * greater than <i>str2</i>, and 0 if they are equal.
 */
#[Pure]
function strncasecmp(string $string1, string $string2, int $length): int {}

/**
 * The function returns {@see true} if the passed $haystack starts from the
 * $needle string or {@see false} otherwise.
 *
 * @param string $haystack
 * @param string $needle
 * @return bool
 * @since 8.0
 */
#[Pure]
function str_starts_with(string $haystack, string $needle): bool {}

/**
 * The function returns {@see true} if the passed $haystack ends with the
 * $needle string or {@see false} otherwise.
 *
 * @param string $haystack
 * @param string $needle
 * @return bool
 * @since 8.0
 */
#[Pure]
function str_ends_with(string $haystack, string $needle): bool {}

/**
 * Checks if $needle is found in $haystack and returns a boolean value
 * (true/false) whether or not the $needle was found.
 *
 * @param string $haystack
 * @param string $needle
 * @return bool
 * @since 8.0
 */
#[Pure]
function str_contains(string $haystack, string $needle): bool {}

/**
 * Return the current key and value pair from an array and advance the array cursor
 * @link https://php.net/manual/en/function.each.php
 * @param array|ArrayObject &$array <p>
 * The input array.
 * </p>
 * @return array the current key and value pair from the array
 * <i>array</i>. This pair is returned in a four-element
 * array, with the keys 0, 1,
 * key, and value. Elements
 * 0 and key contain the key name of
 * the array element, and 1 and value
 * contain the data.
 * </p>
 * <p>
 * If the internal pointer for the array points past the end of the
 * array contents, <b>each</b> returns
 * false.
 * @removed 8.0
 */
#[Deprecated(reason: "Use a foreach loop instead", since: "7.2")]
function each(&$array): array {}

/**
 * Sets which PHP errors are reported
 * @link https://php.net/manual/en/function.error-reporting.php
 * @param int|null $error_level [optional] <p>
 * The new error_reporting
 * level. It takes on either a bitmask, or named constants. Using named
 * constants is strongly encouraged to ensure compatibility for future
 * versions. As error levels are added, the range of integers increases,
 * so older integer-based error levels will not always behave as expected.
 * </p>
 * <p>
 * The available error level constants and the actual
 * meanings of these error levels are described in the
 * predefined constants.
 * <table>
 * error_reporting level constants and bit values
 * <tr valign="top">
 * <td>value</td>
 * <td>constant</td>
 * </tr>
 * <tr valign="top">
 * <td>1</td>
 * <td>
 * E_ERROR
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>2</td>
 * <td>
 * E_WARNING
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>4</td>
 * <td>
 * E_PARSE
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>8</td>
 * <td>
 * E_NOTICE
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>16</td>
 * <td>
 * E_CORE_ERROR
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>32</td>
 * <td>
 * E_CORE_WARNING
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>64</td>
 * <td>
 * E_COMPILE_ERROR
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>128</td>
 * <td>
 * E_COMPILE_WARNING
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>256</td>
 * <td>
 * E_USER_ERROR
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>512</td>
 * <td>
 * E_USER_WARNING
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>1024</td>
 * <td>
 * E_USER_NOTICE
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>32767</td>
 * <td>
 * E_ALL
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>2048</td>
 * <td>
 * E_STRICT
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>4096</td>
 * <td>
 * E_RECOVERABLE_ERROR
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>8192</td>
 * <td>
 * E_DEPRECATED
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>16384</td>
 * <td>
 * E_USER_DEPRECATED
 * </td>
 * </tr>
 * </table>
 * </p>
 * @return int the old error_reporting
 * level or the current level if no <i>level</i> parameter is
 * given.
 */
function error_reporting(?int $error_level): int {}

/**
 * Defines a named constant
 * @link https://php.net/manual/en/function.define.php
 * @param string $constant_name <p>
 * The name of the constant.
 * </p>
 * @param null|array|bool|int|float|string $value <p>
 * The value of the constant.
 * In PHP 5, value must be a scalar value (integer, float, string, boolean, or null).
 * In PHP 7, array values are also accepted.
 * It is possible to define resource constants,
 * however it is not recommended and may cause unpredictable behavior.
 * </p>
 * @param bool $case_insensitive [optional] <p>
 * If set to true, the constant will be defined case-insensitive.
 * The default behavior is case-sensitive; i.e.
 * CONSTANT and Constant represent
 * different values.
 * Defining case-insensitive constants is deprecated as of PHP 7.3.0.
 * </p>
 * <p>
 * Case-insensitive constants are stored as lower-case.
 * </p>
 * @return bool true on success or false on failure.
 */
function define(
    string $constant_name,
    #[LanguageLevelTypeAware(['8.1' => 'mixed'], default: 'null|array|bool|int|float|string')] $value,
    #[Deprecated(since: "7.3")] bool $case_insensitive = false
): bool {}

/**
 * Checks whether a given named constant exists
 * @link https://php.net/manual/en/function.defined.php
 * @param string $constant_name <p>
 * The constant name.
 * </p>
 * @return bool true if the named constant given by <i>name</i>
 * has been defined, false otherwise.
 */
#[Pure(true)]
function defined(string $constant_name): bool {}

/**
 * Returns the name of the class of an object
 * @link https://php.net/manual/en/function.get-class.php
 * @param object $object [optional] <p>
 * The tested object. This parameter may be omitted when inside a class.
 * </p>
 * @return string <p>The name of the class of which <i>object</i> is an
 * instance.
 * If <i>object</i> is omitted when inside a class, the
 * name of that class is returned.</p>
 */
#[Pure]
function get_class(object $object): string {}

/**
 * the "Late Static Binding" class name
 * @link https://php.net/manual/en/function.get-called-class.php
 * @return string
 */
#[Pure]
function get_called_class(): string {}

/**
 * Retrieves the parent class name for object or class
 * @link https://php.net/manual/en/function.get-parent-class.php
 * @param object|string $object_or_class [optional] <p>
 * The tested object or class name
 * </p>
 * @return string|false <p>The name of the parent class of the class of which
 * <i>object</i> is an instance or the name.
 * </p>
 * <p>
 * If the object does not have a parent false will be returned.
 * </p>
 * <p>
 * If called without parameter outside object, this function returns false.</p>
 */
#[Pure]
function get_parent_class(object|string $object_or_class): string|false {}

/**
 * Checks if the class method exists
 * @link https://php.net/manual/en/function.method-exists.php
 * @param object|string $object_or_class <p>
 * An object instance or a class name
 * </p>
 * @param string $method <p>
 * The method name
 * </p>
 * @return bool true if the method given by <i>method_name</i>
 * has been defined for the given <i>object</i>, false
 * otherwise.
 */
#[Pure]
function method_exists($object_or_class, string $method): bool {}

/**
 * Checks if the object or class has a property
 * @link https://php.net/manual/en/function.property-exists.php
 * @param object|string $object_or_class <p>
 * The class name or an object of the class to test for
 * </p>
 * @param string $property <p>
 * The name of the property
 * </p>
 * @return bool true if the property exists, false if it doesn't exist or
 * null in case of an error.
 */
#[Pure]
function property_exists($object_or_class, string $property): bool {}

/**
 * Checks if the trait exists
 * @param string $trait Name of the trait to check
 * @param bool $autoload [optional] Whether to autoload if not already loaded.
 * @return bool Returns TRUE if trait exists, FALSE if not, NULL in case of an error.
 * @link https://secure.php.net/manual/en/function.trait-exists.php
 * @since 5.4
 */
function trait_exists(string $trait, bool $autoload = true): bool {}

/**
 * Checks if the class has been defined
 * @link https://php.net/manual/en/function.class-exists.php
 * @param string $class <p>
 * The class name. The name is matched in a case-insensitive manner.
 * </p>
 * @param bool $autoload [optional] <p>
 * Whether or not to call autoload by default.
 * </p>
 * @return bool true if <i>class_name</i> is a defined class,
 * false otherwise.
 */
function class_exists(string $class, bool $autoload = true): bool {}

/**
 * Checks if the interface has been defined
 * @link https://php.net/manual/en/function.interface-exists.php
 * @param string $interface <p>
 * The interface name
 * </p>
 * @param bool $autoload [optional] <p>
 * Whether to call autoload or not by default.
 * </p>
 * @return bool true if the interface given by
 * <i>interface_name</i> has been defined, false otherwise.
 * @since 5.0.2
 */
function interface_exists(string $interface, bool $autoload = true): bool {}

/**
 * Return true if the given function has been defined
 * @link https://php.net/manual/en/function.function-exists.php
 * @param string $function <p>
 * The function name, as a string.
 * </p>
 * @return bool true if <i>function_name</i> exists and is a
 * function, false otherwise.
 * </p>
 * <p>
 * This function will return false for constructs, such as
 * <b>include_once</b> and <b>echo</b>.
 */
#[Pure(true)]
function function_exists(string $function): bool {}

/**
 * Checks if the enum has been defined
 * @link https://php.net/manual/en/function.enum-exists.php
 * @param string $enum <p>
 * The enum name. The name is matched in a case-insensitive manner.
 * </p>
 * @param bool $autoload [optional] <p>
 * Whether or not to call autoload by default.
 * </p>
 * @return bool true if <i>enum</i> is a defined enum,
 * false otherwise.
 * @since 8.1
 */
function enum_exists(string $enum, bool $autoload = true): bool {}

/**
 * Creates an alias for a class
 * @link https://php.net/manual/en/function.class-alias.php
 * @param string $class The original class.
 * @param string $alias The alias name for the class.
 * @param bool $autoload [optional] Whether to autoload if the original class is not found.
 * @return bool true on success or false on failure.
 */
function class_alias(string $class, string $alias, bool $autoload = true): bool {}

/**
 * Returns an array with the names of included or required files
 * @link https://php.net/manual/en/function.get-included-files.php
 * @return string[] an array of the names of all files.
 * <p>
 * The script originally called is considered an "included file," so it will
 * be listed together with the files referenced by
 * <b>include</b> and family.
 * </p>
 * <p>
 * Files that are included or required multiple times only show up once in
 * the returned array.
 * </p>
 */
#[Pure(true)]
function get_included_files(): array {}

/**
 * Alias of <b>get_included_files</b>
 * @link https://php.net/manual/en/function.get-required-files.php
 * @return string[]
 */
#[Pure(true)]
function get_required_files(): array {}

/**
 * checks if the object has this class as one of its parents or implements it
 * @link https://php.net/manual/en/function.is-subclass-of.php
 * @param object|string $object_or_class <p>
 * A class name or an object instance
 * </p>
 * @param string $class <p>
 * The class name
 * </p>
 * @param bool $allow_string [optional] <p>
 * If this parameter set to false, string class name as object is not allowed.
 * This also prevents from calling autoloader if the class doesn't exist.
 * </p>
 * @return bool This function returns true if the object <i>object</i>,
 * belongs to a class which is a subclass of
 * <i>class_name</i>, false otherwise.
 */
#[Pure]
function is_subclass_of(mixed $object_or_class, string $class, bool $allow_string = true): bool {}

/**
 * Checks if the object is of this class or has this class as one of its parents
 * @link https://php.net/manual/en/function.is-a.php
 * @param object|string $object_or_class <p>
 * The tested object
 * </p>
 * @param string $class <p>
 * The class name
 * </p>
 * @param bool $allow_string [optional] <p>
 * If this parameter set to <b>FALSE</b>, string class name as <em><b>object</b></em>
 * is not allowed. This also prevents from calling autoloader if the class doesn't exist.
 * </p>
 * @return bool <b>TRUE</b> if the object is of this class or has this class as one of
 * its parents, <b>FALSE</b> otherwise.
 */
#[Pure]
function is_a(mixed $object_or_class, string $class, bool $allow_string = false): bool {}

/**
 * Get the default properties of the class
 * @link https://php.net/manual/en/function.get-class-vars.php
 * @param string $class <p>
 * The class name
 * </p>
 * @return array an associative array of declared properties visible from the
 * current scope, with their default value.
 * The resulting array elements are in the form of
 * varname => value.
 */
#[Pure]
function get_class_vars(string $class): array {}

/**
 * Gets the properties of the given object
 * @link https://php.net/manual/en/function.get-object-vars.php
 * @param object $object <p>
 * An object instance.
 * </p>
 * @return array an associative array of defined object accessible non-static properties
 * for the specified <i>object</i> in scope. If a property have
 * not been assigned a value, it will be returned with a null value.
 */
#[Pure]
function get_object_vars(object $object): array {}

/**
 * Gets the class methods' names
 * @link https://php.net/manual/en/function.get-class-methods.php
 * @param object|string $object_or_class <p>
 * The class name or an object instance
 * </p>
 * @return string[] an array of method names defined for the class specified by
 * <i>class_name</i>. In case of an error, it returns null.
 */
#[Pure]
function get_class_methods(object|string $object_or_class): array {}

/**
 * Generates a user-level error/warning/notice message
 * @link https://php.net/manual/en/function.trigger-error.php
 * @param string $message <p>
 * The designated error message for this error. It's limited to 1024
 * characters in length. Any additional characters beyond 1024 will be
 * truncated.
 * </p>
 * @param int $error_level [optional] <p>
 * The designated error type for this error. It only works with the E_USER
 * family of constants, and will default to <b>E_USER_NOTICE</b>.
 * </p>
 * @return bool This function returns false if wrong <i>error_type</i> is
 * specified, true otherwise.
 */
function trigger_error(string $message, int $error_level = E_USER_NOTICE): bool {}

/**
 * Alias of <b>trigger_error</b>
 * @link https://php.net/manual/en/function.user-error.php
 * @param string $message
 * @param int $error_level [optional]
 * @return bool This function returns false if wrong <i>error_type</i> is
 * specified, true otherwise.
 */
function user_error(string $message, int $error_level = E_USER_NOTICE): bool {}

/**
 * Sets a user-defined error handler function
 * @link https://php.net/manual/en/function.set-error-handler.php
 * @param callable|null $callback <p>
 * The user function needs to accept two parameters: the error code, and a
 * string describing the error. Then there are three optional parameters
 * that may be supplied: the filename in which the error occurred, the
 * line number in which the error occurred, and the context in which the
 * error occurred (an array that points to the active symbol table at the
 * point the error occurred). The function can be shown as:
 * </p>
 * <p>
 * <b>handler</b>
 * <b>int<i>errno</i></b>
 * <b>string<i>errstr</i></b>
 * <b>string<i>errfile</i></b>
 * <b>int<i>errline</i></b>
 * <b>array<i>errcontext</i></b>
 * <i>errno</i>
 * The first parameter, <i>errno</i>, contains the
 * level of the error raised, as an integer.</p>
 * @param int $error_levels [optional] <p>
 * Can be used to mask the triggering of the
 * <i>error_handler</i> function just like the error_reporting ini setting
 * controls which errors are shown. Without this mask set the
 * <i>error_handler</i> will be called for every error
 * regardless to the setting of the error_reporting setting.
 * </p>
 * @return callable|null a string containing the previously defined error handler (if any). If
 * the built-in error handler is used null is returned. null is also returned
 * in case of an error such as an invalid callback. If the previous error handler
 * was a class method, this function will return an indexed array with the class
 * and the method name.
 */
function set_error_handler(?callable $callback, int $error_levels = E_ALL|E_STRICT) {}

/**
 * Restores the previous error handler function
 * @link https://php.net/manual/en/function.restore-error-handler.php
 * @return bool This function always returns true.
 */
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
function restore_error_handler(): bool {}

/**
 * Sets a user-defined exception handler function
 * @link https://php.net/manual/en/function.set-exception-handler.php
 * @param callable|null $callback <p>
 * Name of the function to be called when an uncaught exception occurs.
 * This function must be defined before calling
 * <b>set_exception_handler</b>. This handler function
 * needs to accept one parameter, which will be the exception object that
 * was thrown.
 * NULL may be passed instead, to reset this handler to its default state.
 * </p>
 * @return callable|null the name of the previously defined exception handler, or null on error. If
 * no previous handler was defined, null is also returned.
 */
function set_exception_handler(?callable $callback) {}

/**
 * Restores the previously defined exception handler function
 * @link https://php.net/manual/en/function.restore-exception-handler.php
 * @return bool This function always returns true.
 */
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
function restore_exception_handler(): bool {}

/**
 * Returns an array with the name of the defined classes
 * @link https://php.net/manual/en/function.get-declared-classes.php
 * @return string[] an array of the names of the declared classes in the current script.
 * <p>
 * Note that depending on what extensions you have compiled or
 * loaded into PHP, additional classes could be present. This means that
 * you will not be able to define your own classes using these
 * names. There is a list of predefined classes in the Predefined Classes section of
 * the appendices.
 * </p>
 */
#[Pure(true)]
function get_declared_classes(): array {}

/**
 * Returns an array of all declared interfaces
 * @link https://php.net/manual/en/function.get-declared-interfaces.php
 * @return string[] an array of the names of the declared interfaces in the current
 * script.
 */
#[Pure(true)]
function get_declared_interfaces(): array {}

/**
 * Returns an array of all declared traits
 * @return array with names of all declared traits in values. Returns NULL in case of a failure.
 * @link https://secure.php.net/manual/en/function.get-declared-traits.php
 * @see class_uses()
 * @since 5.4
 */
#[Pure(true)]
function get_declared_traits(): array {}

/**
 * Returns an array of all defined functions
 * @link https://php.net/manual/en/function.get-defined-functions.php
 * @param bool $exclude_disabled [optional] Whether disabled functions should be excluded from the return value.
 * @return array an multidimensional array containing a list of all defined
 * functions, both built-in (internal) and user-defined. The internal
 * functions will be accessible via $arr["internal"], and
 * the user defined ones using $arr["user"] (see example
 * below).
 */
#[Pure(true)]
function get_defined_functions(#[PhpStormStubsElementAvailable(from: '7.1')] bool $exclude_disabled = true): array {}

/**
 * Returns an array of all defined variables
 * @link https://php.net/manual/en/function.get-defined-vars.php
 * @return array A multidimensional array with all the variables.
 */
#[Pure(true)]
function get_defined_vars(): array {}

/**
 * Create an anonymous (lambda-style) function
 * @link https://php.net/manual/en/function.create-function.php
 * @param string $args <p>
 * The function arguments.
 * </p>
 * @param string $code <p>
 * The function code.
 * </p>
 * @return string|false a unique function name as a string, or false on error.
 * @removed 8.0
 */
#[Deprecated(reason: "Use anonymous functions instead", since: "7.2")]
function create_function(string $args, string $code): false|string {}

/**
 * Returns the resource type
 * @link https://php.net/manual/en/function.get-resource-type.php
 * @param resource $resource <p>
 * The evaluated resource handle.
 * </p>
 * @return string If the given <i>handle</i> is a resource, this function
 * will return a string representing its type. If the type is not identified
 * by this function, the return value will be the string
 * Unknown.
 */
function get_resource_type($resource): string {}

/**
 * Returns an array with the names of all modules compiled and loaded
 * @link https://php.net/manual/en/function.get-loaded-extensions.php
 * @param bool $zend_extensions [optional] <p>
 * Only return Zend extensions, if not then regular extensions, like
 * mysqli are listed. Defaults to false (return regular extensions).
 * </p>
 * @return string[] an indexed array of all the modules names.
 */
#[Pure]
function get_loaded_extensions(bool $zend_extensions = false): array {}

/**
 * Find out whether an extension is loaded
 * @link https://php.net/manual/en/function.extension-loaded.php
 * @param string $extension <p>
 * The extension name.
 * </p>
 * <p>
 * You can see the names of various extensions by using
 * <b>phpinfo</b> or if you're using the
 * CGI or CLI version of
 * PHP you can use the -m switch to
 * list all available extensions:
 * <pre>
 * $ php -m
 * [PHP Modules]
 * xml
 * tokenizer
 * standard
 * sockets
 * session
 * posix
 * pcre
 * overload
 * mysql
 * mbstring
 * ctype
 * [Zend Modules]
 * </pre>
 * </p>
 * @return bool true if the extension identified by <i>name</i>
 * is loaded, false otherwise.
 */
#[Pure]
function extension_loaded(string $extension): bool {}

/**
 * Returns an array with the names of the functions of a module
 * @link https://php.net/manual/en/function.get-extension-funcs.php
 * @param string $extension <p>
 * The module name.
 * </p>
 * <p>
 * This parameter must be in lowercase.
 * </p>
 * @return string[]|false an array with all the functions, or false if
 * <i>module_name</i> is not a valid extension.
 */
#[Pure]
function get_extension_funcs(string $extension): array|false {}

/**
 * Returns an associative array with the names of all the constants and their values
 * @link https://php.net/manual/en/function.get-defined-constants.php
 * @param bool $categorize [optional] <p>
 * Causing this function to return a multi-dimensional
 * array with categories in the keys of the first dimension and constants
 * and their values in the second dimension.
 * <code>
 * define("MY_CONSTANT", 1);
 * print_r(get_defined_constants(true));
 * </code>
 * The above example will output something similar to:
 * <pre>
 * Array
 * (
 * [Core] => Array
 * (
 * [E_ERROR] => 1
 * [E_WARNING] => 2
 * [E_PARSE] => 4
 * [E_NOTICE] => 8
 * [E_CORE_ERROR] => 16
 * [E_CORE_WARNING] => 32
 * [E_COMPILE_ERROR] => 64
 * [E_COMPILE_WARNING] => 128
 * [E_USER_ERROR] => 256
 * [E_USER_WARNING] => 512
 * [E_USER_NOTICE] => 1024
 * [E_STRICT] => 2048
 * [E_RECOVERABLE_ERROR] => 4096
 * [E_DEPRECATED] => 8192
 * [E_USER_DEPRECATED] => 16384
 * [E_ALL] => 32767
 * [TRUE] => 1
 * )
 * [pcre] => Array
 * (
 * [PREG_PATTERN_ORDER] => 1
 * [PREG_SET_ORDER] => 2
 * [PREG_OFFSET_CAPTURE] => 256
 * [PREG_SPLIT_NO_EMPTY] => 1
 * [PREG_SPLIT_DELIM_CAPTURE] => 2
 * [PREG_SPLIT_OFFSET_CAPTURE] => 4
 * [PREG_GREP_INVERT] => 1
 * )
 * [user] => Array
 * (
 * [MY_CONSTANT] => 1
 * )
 * )
 * </pre>
 * </p>
 * @return array
 */
#[Pure(true)]
function get_defined_constants(bool $categorize = false): array {}

/**
 * Generates a backtrace
 * @link https://php.net/manual/en/function.debug-backtrace.php
 * @param int $options [optional] <p>
 * As of 5.3.6, this parameter is a bitmask for the following options:</p>
 * <b>debug_backtrace</b> options
 * <table>
 * <tr valign="top">
 * <td>DEBUG_BACKTRACE_PROVIDE_OBJECT</td>
 * <td>
 * Whether or not to populate the "object" index.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>DEBUG_BACKTRACE_IGNORE_ARGS</td>
 * <td>
 * Whether or not to omit the "args" index, and thus all the function/method arguments,
 * to save memory.
 * </td>
 * </tr>
 * </table>
 * <p>
 * Before 5.3.6, the only values recognized are true or false, which are the same as
 * setting or not setting the <b>DEBUG_BACKTRACE_PROVIDE_OBJECT</b> option respectively.
 * </p>
 * @param int $limit [optional] <p>
 * As of 5.4.0, this parameter can be used to limit the number of stack frames returned.
 * By default (<i>limit</i>=0) it returns all stack frames.
 * </p>
 * @return array <p>an array of associative arrays. The possible returned elements
 * are as follows:
 * </p>
 * <p>
 * Possible returned elements from <b>debug_backtrace</b>
 * </p>
 * <table>
 * <tr valign="top">
 * <td>Name</td>
 * <td>Type</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>function</td>
 * <td>string</td>
 * <td>
 * The current function name. See also
 * __FUNCTION__.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>line</td>
 * <td>integer</td>
 * <td>
 * The current line number. See also
 * __LINE__.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>file</td>
 * <td>string</td>
 * <td>
 * The current file name. See also
 * __FILE__.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>class</td>
 * <td>string</td>
 * <td>
 * The current class name. See also
 * __CLASS__
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>object</td>
 * <td>object</td>
 * <td>
 * The current object.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>type</td>
 * <td>string</td>
 * <td>
 * The current call type. If a method call, "->" is returned. If a static
 * method call, "::" is returned. If a function call, nothing is returned.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>args</td>
 * <td>array</td>
 * <td>
 * If inside a function, this lists the functions arguments. If
 * inside an included file, this lists the included file name(s).
 * </td>
 * </tr>
 * </table>
 */
function debug_backtrace(int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT, int $limit = 0): array {}

/**
 * Prints a backtrace
 * @link https://php.net/manual/en/function.debug-print-backtrace.php
 * @param int $options [optional] <p>
 * As of 5.3.6, this parameter is a bitmask for the following options:
 * <b>debug_print_backtrace</b> options
 * <table>
 * <tr valign="top">
 * <td><b>DEBUG_BACKTRACE_IGNORE_ARGS</b></td>
 * <td>
 * Whether or not to omit the "args" index, and thus all the function/method arguments,
 * to save memory.
 * </td>
 * </tr>
 * </table>
 * </p>
 * @param int $limit [optional] <p>
 * As of 5.4.0, this parameter can be used to limit the number of stack frames printed.
 * By default (<i>limit</i> = 0) it prints all stack frames.
 * </p>
 * @return void
 */
function debug_print_backtrace(
    int $options = 0,
    #[PhpStormStubsElementAvailable(from: '7.0')] int $limit = 0
): void {}

/**
 * Forces collection of any existing garbage cycles
 * @link https://php.net/manual/en/function.gc-collect-cycles.php
 * @return int number of collected cycles.
 */
function gc_collect_cycles(): int {}

/**
 * Returns status of the circular reference collector
 * @link https://php.net/manual/en/function.gc-enabled.php
 * @return bool true if the garbage collector is enabled, false otherwise.
 */
#[Pure(true)]
function gc_enabled(): bool {}

/**
 * Activates the circular reference collector
 * @link https://php.net/manual/en/function.gc-enable.php
 * @return void
 */
function gc_enable(): void {}

/**
 * Deactivates the circular reference collector
 * @link https://php.net/manual/en/function.gc-disable.php
 * @return void
 */
function gc_disable(): void {}

/**
 * Gets information about the garbage collector
 * @link https://php.net/manual/en/function.gc-status.php
 * @return int[] associative array with the following elements:
 * <ul>
 * <li>"runs"</li>
 * <li>"collected"</li>
 * <li>"threshold"</li>
 * <li>"roots"</li>
 * </ul>
 * @since 7.3
 */
#[ArrayShape(["runs" => "int", "collected" => "int", "threshold" => "int", "roots" => "int"])]
#[Pure(true)]
function gc_status(): array {}

/**
 * Reclaims memory used by the Zend Engine memory manager
 * @link https://php.net/manual/en/function.gc-mem-caches.php
 * @return int Returns the number of bytes freed.
 * @since 7.0
 */
function gc_mem_caches(): int {}

/**
 * Returns active resources
 * @link https://php.net/manual/en/function.get-resources.php
 * @param string|null $type [optional]<p>
 *
 * If defined, this will cause get_resources() to only return resources of the given type. A list of resource types is available.
 *
 * If the string Unknown is provided as the type, then only resources that are of an unknown type will be returned.
 *
 * If omitted, all resources will be returned.
 * </p>
 * @return resource[] Returns an array of currently active resources, indexed by resource number.
 * @since 7.0
 */
#[Pure(true)]
function get_resources(?string $type): array {}
<?php

// Start of Core v.5.3.6-13ubuntu3.2

/**
 * Fatal run-time errors. These indicate errors that can not be
 * recovered from, such as a memory allocation problem.
 * Execution of the script is halted.
 * @link https://php.net/manual/en/errorfunc.constants.php
 */
define('E_ERROR', 1);

/**
 * Catchable fatal error. It indicates that a probably dangerous error
 * occurred, but did not leave the Engine in an unstable state. If the error
 * is not caught by a user defined handle (see also
 * <b>set_error_handler</b>), the application aborts as it
 * was an <b>E_ERROR</b>.
 * @link https://php.net/manual/en/errorfunc.constants.php
 */
define('E_RECOVERABLE_ERROR', 4096);

/**
 * Run-time warnings (non-fatal errors). Execution of the script is not
 * halted.
 * @link https://php.net/manual/en/errorfunc.constants.php
 */
define('E_WARNING', 2);

/**
 * Compile-time parse errors. Parse errors should only be generated by
 * the parser.
 * @link https://php.net/manual/en/errorfunc.constants.php
 */
define('E_PARSE', 4);

/**
 * Run-time notices. Indicate that the script encountered something that
 * could indicate an error, but could also happen in the normal course of
 * running a script.
 * @link https://php.net/manual/en/errorfunc.constants.php
 */
define('E_NOTICE', 8);

/**
 * Enable to have PHP suggest changes
 * to your code which will ensure the best interoperability
 * and forward compatibility of your code.
 * @link https://php.net/manual/en/errorfunc.constants.php
 */
define('E_STRICT', 2048);

/**
 * Run-time notices. Enable this to receive warnings about code
 * that will not work in future versions.
 * @link https://php.net/manual/en/errorfunc.constants.php
 */
define('E_DEPRECATED', 8192);

/**
 * Fatal errors that occur during PHP's initial startup. This is like an
 * <b>E_ERROR</b>, except it is generated by the core of PHP.
 * @link https://php.net/manual/en/errorfunc.constants.php
 */
define('E_CORE_ERROR', 16);

/**
 * Warnings (non-fatal errors) that occur during PHP's initial startup.
 * This is like an <b>E_WARNING</b>, except it is generated
 * by the core of PHP.
 * @link https://php.net/manual/en/errorfunc.constants.php
 */
define('E_CORE_WARNING', 32);

/**
 * Fatal compile-time errors. This is like an <b>E_ERROR</b>,
 * except it is generated by the Zend Scripting Engine.
 * @link https://php.net/manual/en/errorfunc.constants.php
 */
define('E_COMPILE_ERROR', 64);

/**
 * Compile-time warnings (non-fatal errors). This is like an
 * <b>E_WARNING</b>, except it is generated by the Zend
 * Scripting Engine.
 * @link https://php.net/manual/en/errorfunc.constants.php
 */
define('E_COMPILE_WARNING', 128);

/**
 * User-generated error message. This is like an
 * <b>E_ERROR</b>, except it is generated in PHP code by
 * using the PHP function <b>trigger_error</b>.
 * @link https://php.net/manual/en/errorfunc.constants.php
 */
define('E_USER_ERROR', 256);

/**
 * User-generated warning message. This is like an
 * <b>E_WARNING</b>, except it is generated in PHP code by
 * using the PHP function <b>trigger_error</b>.
 * @link https://php.net/manual/en/errorfunc.constants.php
 */
define('E_USER_WARNING', 512);

/**
 * User-generated notice message. This is like an
 * <b>E_NOTICE</b>, except it is generated in PHP code by
 * using the PHP function <b>trigger_error</b>.
 * @link https://php.net/manual/en/errorfunc.constants.php
 */
define('E_USER_NOTICE', 1024);

/**
 * User-generated warning message. This is like an
 * <b>E_DEPRECATED</b>, except it is generated in PHP code by
 * using the PHP function <b>trigger_error</b>.
 * @link https://php.net/manual/en/errorfunc.constants.php
 */
define('E_USER_DEPRECATED', 16384);

/**
 * All errors and warnings, as supported, except of level
 * <b>E_STRICT</b> prior to PHP 5.4.0.
 * Value of <b>E_ALL</b> is 32767 since PHP 5.4.x,
 * 30719 in PHP 5.3.x, 6143 in PHP 5.2.x, 2047 previously
 * @link https://php.net/manual/en/errorfunc.constants.php
 */
define('E_ALL', 32767);
define('DEBUG_BACKTRACE_PROVIDE_OBJECT', 1);
define('DEBUG_BACKTRACE_IGNORE_ARGS', 2);
define('S_MEMORY', 1);
define('S_VARS', 4);
define('S_FILES', 8);
define('S_INCLUDE', 16);
define('S_SQL', 32);
define('S_EXECUTOR', 64);
define('S_MAIL', 128);
define('S_SESSION', 256);
define('S_MISC', 2);
define('S_INTERNAL', 536870912);
define('S_ALL', 511);

define('true', (bool)1, true);
define('false', (bool)0, true);
define('null', null, true);
define('ZEND_THREAD_SAFE', false);
define('ZEND_DEBUG_BUILD', false);
define('PHP_WINDOWS_VERSION_BUILD', 0);
define('PHP_WINDOWS_VERSION_MAJOR', 0);
define('PHP_WINDOWS_VERSION_MINOR', 0);
define('PHP_WINDOWS_VERSION_PLATFORM', 0);
define('PHP_WINDOWS_VERSION_PRODUCTTYPE', 0);
define('PHP_WINDOWS_VERSION_SP_MAJOR', 0);
define('PHP_WINDOWS_VERSION_SP_MINOR', 0);
define('PHP_WINDOWS_VERSION_SUITEMASK', 0);
define('PHP_WINDOWS_NT_DOMAIN_CONTROLLER', 2);
define('PHP_WINDOWS_NT_SERVER', 3);
define('PHP_WINDOWS_NT_WORKSTATION', 1);
/**
 * @since 7.4
 */
define('PHP_WINDOWS_EVENT_CTRL_C', 0);
/**
 * @since 7.4
 */
define('PHP_WINDOWS_EVENT_CTRL_BREAK', 1);
define('PHP_VERSION', "5.3.6-13ubuntu3.2");
define('PHP_MAJOR_VERSION', 5);
define('PHP_MINOR_VERSION', 3);
define('PHP_RELEASE_VERSION', 6);
define('PHP_EXTRA_VERSION', "-13ubuntu3.2");
define('PHP_VERSION_ID', 50306);
define('PHP_ZTS', 0);
define('PHP_DEBUG', 0);
define('PHP_OS', "Linux");
/**
 * The operating system family PHP was built for. Either of 'Windows', 'BSD', 'Darwin', 'Solaris', 'Linux' or 'Unknown'. Available as of PHP 7.2.0.
 * @since 7.2
 */
define('PHP_OS_FAMILY', "Linux");
define('PHP_SAPI', "cli");
/**
 * @since 7.4
 */
define('PHP_CLI_PROCESS_TITLE', 1);
define('DEFAULT_INCLUDE_PATH', ".:/usr/share/php:/usr/share/pear");
define('PEAR_INSTALL_DIR', "/usr/share/php");
define('PEAR_EXTENSION_DIR', "/usr/lib/php5/20090626");
define('PHP_EXTENSION_DIR', "/usr/lib/php5/20090626");
/**
 * Specifies where the binaries were installed into.
 * @link https://php.net/manual/en/reserved.constants.php
 */
define('PHP_BINARY', '/usr/local/php/bin/php');
define('PHP_PREFIX', "/usr");
define('PHP_BINDIR', "/usr/bin");
define('PHP_LIBDIR', "/usr/lib/php5");
define('PHP_DATADIR', "/usr/share");
define('PHP_SYSCONFDIR', "/etc");
define('PHP_LOCALSTATEDIR', "/var");
define('PHP_CONFIG_FILE_PATH', "/etc/php5/cli");
define('PHP_CONFIG_FILE_SCAN_DIR', "/etc/php5/cli/conf.d");
define('PHP_SHLIB_SUFFIX', "so");
define('PHP_EOL', "\n");
define('SUHOSIN_PATCH', 1);
define('SUHOSIN_PATCH_VERSION', "0.9.10");
define('PHP_MAXPATHLEN', 4096);
define('PHP_INT_MAX', 9223372036854775807);
define('PHP_INT_MIN', -9223372036854775808);
define('PHP_INT_SIZE', 8);
/**
 * Number of decimal digits that can be rounded into a float and back without precision loss. Available as of PHP 7.2.0.
 * @since 7.2
 */
define('PHP_FLOAT_DIG', 15);
/**
 * Smallest representable positive number x, so that x + 1.0 != 1.0. Available as of PHP 7.2.0.
 * @since 7.2
 */
define('PHP_FLOAT_EPSILON', 2.2204460492503e-16);

/**
 * Largest representable floating point number. Available as of PHP 7.2.0.
 * @since 7.2
 */
define('PHP_FLOAT_MAX', 1.7976931348623e+308);
/**
 * Smallest representable floating point number. Available as of PHP 7.2.0.
 * @since 7.2
 */
define('PHP_FLOAT_MIN', 2.2250738585072e-308);
define('ZEND_MULTIBYTE', 0);
define('PHP_OUTPUT_HANDLER_START', 1);
define('PHP_OUTPUT_HANDLER_CONT', 2);
define('PHP_OUTPUT_HANDLER_END', 4);
define('UPLOAD_ERR_OK', 0);
define('UPLOAD_ERR_INI_SIZE', 1);
define('UPLOAD_ERR_FORM_SIZE', 2);
define('UPLOAD_ERR_PARTIAL', 3);
define('UPLOAD_ERR_NO_FILE', 4);
define('UPLOAD_ERR_NO_TMP_DIR', 6);
define('UPLOAD_ERR_CANT_WRITE', 7);
define('UPLOAD_ERR_EXTENSION', 8);
define('STDIN', fopen('php://stdin', 'r'));
define('STDOUT', fopen('php://stdout', 'w'));
define('STDERR', fopen('php://stderr', 'w'));

define('PHP_FD_SETSIZE', 1024);

/** @link https://php.net/manual/en/outcontrol.constants.php */
define('PHP_OUTPUT_HANDLER_WRITE', 0);
/** @link https://php.net/manual/en/outcontrol.constants.php */
define('PHP_OUTPUT_HANDLER_FLUSH', 4);
/** @link https://php.net/manual/en/outcontrol.constants.php */
define('PHP_OUTPUT_HANDLER_CLEAN', 2);
/** @link https://php.net/manual/en/outcontrol.constants.php */
define('PHP_OUTPUT_HANDLER_FINAL', 8);
/** @link https://php.net/manual/en/outcontrol.constants.php */
define('PHP_OUTPUT_HANDLER_CLEANABLE', 16);
/** @link https://php.net/manual/en/outcontrol.constants.php */
define('PHP_OUTPUT_HANDLER_FLUSHABLE', 32);
/** @link https://php.net/manual/en/outcontrol.constants.php */
define('PHP_OUTPUT_HANDLER_REMOVABLE', 64);
/** @link https://php.net/manual/en/outcontrol.constants.php */
define('PHP_OUTPUT_HANDLER_STDFLAGS', 112);
/** @link https://php.net/manual/en/outcontrol.constants.php */
define('PHP_OUTPUT_HANDLER_STARTED', 4096);
/** @link https://php.net/manual/en/outcontrol.constants.php */
define('PHP_OUTPUT_HANDLER_DISABLED', 8192);

/**
 * Specifies where the manpages were installed into.
 * @since 5.3.7
 * @link https://php.net/manual/en/reserved.constants.php
 */
define('PHP_MANDIR', '/usr/local/php/php/man');
<?php

// Start of tidy v.2.0

/**
 * An HTML node in an HTML file, as detected by tidy.
 * @link https://php.net/manual/en/class.tidy.php
 */
class tidy
{
    /**
     * @var string  The last warnings and errors from TidyLib
     */
    public $errorBuffer;

    /**
     * (PHP 5, PECL tidy &gt;= 0.5.2)<br/>
     * Returns the value of the specified configuration option for the tidy document
     * @link https://php.net/manual/en/tidy.getopt.php
     * @param string $option <p>
     * You will find a list with each configuration option and their types
     * at: http://tidy.sourceforge.net/docs/quickref.html.
     * </p>
     * @return mixed the value of the specified <i>option</i>.
     * The return type depends on the type of the specified one.
     */
    public function getOpt($option) {}

    /**
     * (PHP 5, PECL tidy &gt;= 0.5.2)<br/>
     * Execute configured cleanup and repair operations on parsed markup
     * @link https://php.net/manual/en/tidy.cleanrepair.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function cleanRepair() {}

    /**
     * (PHP 5, PECL tidy &gt;= 0.5.2)<br/>
     * Parse markup in file or URI
     * @link https://php.net/manual/en/tidy.parsefile.php
     * @param string $filename <p>
     * If the <i>filename</i> parameter is given, this function
     * will also read that file and initialize the object with the file,
     * acting like <b>tidy_parse_file</b>.
     * </p>
     * @param mixed $config [optional] <p>
     * The config <i>config</i> can be passed either as an
     * array or as a string. If a string is passed, it is interpreted as the
     * name of the configuration file, otherwise, it is interpreted as the
     * options themselves.
     * </p>
     * <p>
     * For an explanation about each option, see
     * http://tidy.sourceforge.net/docs/quickref.html.
     * </p>
     * @param string|null $encoding [optional] <p>
     * The <i>encoding</i> parameter sets the encoding for
     * input/output documents. The possible values for encoding are:
     * ascii, latin0, latin1,
     * raw, utf8, iso2022,
     * mac, win1252, ibm858,
     * utf16, utf16le, utf16be,
     * big5, and shiftjis.
     * </p>
     * @param bool $use_include_path [optional] <p>
     * Search for the file in the include_path.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function parseFile($filename, $config = null, $encoding = null, $use_include_path = false) {}

    /**
     * (PHP 5, PECL tidy &gt;= 0.5.2)<br/>
     * Parse a document stored in a string
     * @link https://php.net/manual/en/tidy.parsestring.php
     * @param string $input <p>
     * The data to be parsed.
     * </p>
     * @param mixed $config [optional] <p>
     * The config <i>config</i> can be passed either as an
     * array or as a string. If a string is passed, it is interpreted as the
     * name of the configuration file, otherwise, it is interpreted as the
     * options themselves.
     * </p>
     * <p>
     * For an explanation about each option, visit http://tidy.sourceforge.net/docs/quickref.html.
     * </p>
     * @param string|null $encoding [optional] <p>
     * The <i>encoding</i> parameter sets the encoding for
     * input/output documents. The possible values for encoding are:
     * ascii, latin0, latin1,
     * raw, utf8, iso2022,
     * mac, win1252, ibm858,
     * utf16, utf16le, utf16be,
     * big5, and shiftjis.
     * </p>
     * @return bool a new <b>tidy</b> instance.
     */
    public function parseString($input, $config = null, $encoding = null) {}

    /**
     * (PHP 5, PECL tidy &gt;= 0.7.0)<br/>
     * Repair a string using an optionally provided configuration file
     * @link https://php.net/manual/en/tidy.repairstring.php
     * @param string $data <p>
     * The data to be repaired.
     * </p>
     * @param mixed $config [optional] <p>
     * The config <i>config</i> can be passed either as an
     * array or as a string. If a string is passed, it is interpreted as the
     * name of the configuration file, otherwise, it is interpreted as the
     * options themselves.
     * </p>
     * <p>
     * Check http://tidy.sourceforge.net/docs/quickref.html for
     * an explanation about each option.
     * </p>
     * @param string|null $encoding [optional] <p>
     * The <i>encoding</i> parameter sets the encoding for
     * input/output documents. The possible values for encoding are:
     * ascii, latin0, latin1,
     * raw, utf8, iso2022,
     * mac, win1252, ibm858,
     * utf16, utf16le, utf16be,
     * big5, and shiftjis.
     * </p>
     * @return string the repaired string.
     */
    public function repairString($data, $config = null, $encoding = null) {}

    /**
     * (PHP 5, PECL tidy &gt;= 0.7.0)<br/>
     * Repair a file and return it as a string
     * @link https://php.net/manual/en/tidy.repairfile.php
     * @param string $filename <p>
     * The file to be repaired.
     * </p>
     * @param mixed $config [optional] <p>
     * The config <i>config</i> can be passed either as an
     * array or as a string. If a string is passed, it is interpreted as the
     * name of the configuration file, otherwise, it is interpreted as the
     * options themselves.
     * </p>
     * <p>
     * Check http://tidy.sourceforge.net/docs/quickref.html for an
     * explanation about each option.
     * </p>
     * @param string|null $encoding [optional] <p>
     * The <i>encoding</i> parameter sets the encoding for
     * input/output documents. The possible values for encoding are:
     * ascii, latin0, latin1,
     * raw, utf8, iso2022,
     * mac, win1252, ibm858,
     * utf16, utf16le, utf16be,
     * big5, and shiftjis.
     * </p>
     * @param bool $use_include_path [optional] <p>
     * Search for the file in the include_path.
     * </p>
     * @return string the repaired contents as a string.
     */
    public function repairFile($filename, $config = null, $encoding = null, $use_include_path = false) {}

    /**
     * (PHP 5, PECL tidy &gt;= 0.5.2)<br/>
     * Run configured diagnostics on parsed and repaired markup
     * @link https://php.net/manual/en/tidy.diagnose.php
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function diagnose() {}

    /**
     * (PHP 5, PECL tidy &gt;= 0.5.2)<br/>
     * Get release date (version) for Tidy library
     * @link https://php.net/manual/en/tidy.getrelease.php
     * @return string a string with the release date of the Tidy library.
     */
    public function getRelease() {}

    /**
     * (PHP 5, PECL tidy &gt;= 0.7.0)<br/>
     * Get current Tidy configuration
     * @link https://php.net/manual/en/tidy.getconfig.php
     * @return array an array of configuration options.
     * </p>
     * <p>
     * For an explanation about each option, visit http://tidy.sourceforge.net/docs/quickref.html.
     */
    public function getConfig() {}

    /**
     * (PHP 5, PECL tidy &gt;= 0.5.2)<br/>
     * Get status of specified document
     * @link https://php.net/manual/en/tidy.getstatus.php
     * @return int 0 if no error/warning was raised, 1 for warnings or accessibility
     * errors, or 2 for errors.
     */
    public function getStatus() {}

    /**
     * (PHP 5, PECL tidy &gt;= 0.5.2)<br/>
     * Get the Detected HTML version for the specified document
     * @link https://php.net/manual/en/tidy.gethtmlver.php
     * @return int the detected HTML version.
     * </p>
     * <p>
     * This function is not yet implemented in the Tidylib itself, so it always
     * return 0.
     */
    public function getHtmlVer() {}

    /**
     * Returns the documentation for the given option name
     * @link https://php.net/manual/en/tidy.getoptdoc.php
     * @param string $optname <p>
     * The option name
     * </p>
     * @return string a string if the option exists and has documentation available, or
     * <b>FALSE</b> otherwise.
     */
    public function getOptDoc($optname) {}

    /**
     * (PHP 5, PECL tidy &gt;= 0.5.2)<br/>
     * Indicates if the document is a XHTML document
     * @link https://php.net/manual/en/tidy.isxhtml.php
     * @return bool This function returns <b>TRUE</b> if the specified tidy
     * <i>object</i> is a XHTML document, or <b>FALSE</b> otherwise.
     * </p>
     * <p>
     * This function is not yet implemented in the Tidylib itself, so it always
     * return <b>FALSE</b>.
     */
    public function isXhtml() {}

    /**
     * (PHP 5, PECL tidy &gt;= 0.5.2)<br/>
     * Indicates if the document is a generic (non HTML/XHTML) XML document
     * @link https://php.net/manual/en/tidy.isxml.php
     * @return bool This function returns <b>TRUE</b> if the specified tidy
     * <i>object</i> is a generic XML document (non HTML/XHTML),
     * or <b>FALSE</b> otherwise.
     * </p>
     * <p>
     * This function is not yet implemented in the Tidylib itself, so it always
     * return <b>FALSE</b>.
     */
    public function isXml() {}

    /**
     * (PHP 5, PECL tidy 0.5.2-1.0.0)<br/>
     * Returns a <b>tidyNode</b> object representing the root of the tidy parse tree
     * @link https://php.net/manual/en/tidy.root.php
     * @return tidyNode the <b>tidyNode</b> object.
     */
    public function root() {}

    /**
     * (PHP 5, PECL tidy 0.5.2-1.0.0)<br/>
     * Returns a <b>tidyNode</b> object starting from the &lt;head&gt; tag of the tidy parse tree
     * @link https://php.net/manual/en/tidy.head.php
     * @return tidyNode the <b>tidyNode</b> object.
     */
    public function head() {}

    /**
     * (PHP 5, PECL tidy 0.5.2-1.0.0)<br/>
     * Returns a <b>tidyNode</b> object starting from the &lt;html&gt; tag of the tidy parse tree
     * @link https://php.net/manual/en/tidy.html.php
     * @return tidyNode the <b>tidyNode</b> object.
     */
    public function html() {}

    /**
     * (PHP 5, PECL tidy 0.5.2-1.0)<br/>
     * Returns a <b>tidyNode</b> object starting from the &lt;body&gt; tag of the tidy parse tree
     * @link https://php.net/manual/en/tidy.body.php
     * @return tidyNode a <b>tidyNode</b> object starting from the
     * &lt;body&gt; tag of the tidy parse tree.
     */
    public function body() {}

    /**
     * (PHP 5, PECL tidy &gt;= 0.5.2)<br/>
     * Constructs a new <b>tidy</b> object
     * @link https://php.net/manual/en/tidy.construct.php
     * @param string $filename [optional] <p>
     * If the <i>filename</i> parameter is given, this function
     * will also read that file and initialize the object with the file,
     * acting like <b>tidy_parse_file</b>.
     * </p>
     * @param mixed $config [optional] <p>
     * The config <i>config</i> can be passed either as an
     * array or as a string. If a string is passed, it is interpreted as the
     * name of the configuration file, otherwise, it is interpreted as the
     * options themselves.
     * </p>
     * <p>
     * For an explanation about each option, visit http://tidy.sourceforge.net/docs/quickref.html.
     * </p>
     * @param string|null $encoding [optional] <p>
     * The <i>encoding</i> parameter sets the encoding for
     * input/output documents. The possible values for encoding are:
     * ascii, latin0, latin1,
     * raw, utf8, iso2022,
     * mac, win1252, ibm858,
     * utf16, utf16le, utf16be,
     * big5, and shiftjis.
     * </p>
     * @param bool $use_include_path [optional] <p>
     * Search for the file in the include_path.
     * </p>
     */
    public function __construct($filename = null, $config = null, $encoding = null, $use_include_path = null) {}
}

/**
 * An HTML node in an HTML file, as detected by tidy.
 * @link https://php.net/manual/en/class.tidynode.php
 */
final class tidyNode
{
    /**
     * <p style="margin-top:0;">The HTML representation of the node, including the surrounding tags.</p>
     * @var string
     */
    public $value;

    /**
     * <p style="margin-top:0;">The name of the HTML node</p>
     * @var string
     */
    public $name;

    /**
     * <p style="margin-top:0;">The type of the tag (one of the constants above, e.g. <b><code>TIDY_NODETYPE_PHP</code></b>)</p>
     * @var int
     */
    public $type;

    /**
     * <p style="margin-top:0;">The line number at which the tags is located in the file</p>
     * @var int
     */
    public $line;

    /**
     * <p style="margin-top:0;">The column number at which the tags is located in the file</p>
     * @var int
     */
    public $column;

    /**
     * <p style="margin-top:0;">Indicates if the node is a proprietary tag</p>
     * @var bool
     */
    public $proprietary;

    /**
     * <p style="margin-top:0;">The ID of the tag (one of the constants above, e.g. <b><code>TIDY_TAG_FRAME</code></b>)</p>
     * @var int
     */
    public $id;

    /**
     * <p style="margin-top:0;">
     * An array of string, representing
     * the attributes names (as keys) of the current node.
     * </p>
     * @var array
     */
    public $attribute;

    /**
     * <p style="margin-top:0;">
     * An array of <b>tidyNode</b>, representing
     * the children of the current node.
     * </p>
     * @var array
     */
    public $child;

    /**
     * Checks if a node has children
     * @link https://php.net/manual/en/tidynode.haschildren.php
     * @return bool <b>TRUE</b> if the node has children, <b>FALSE</b> otherwise.
     * @since 5.0.1
     */
    public function hasChildren() {}

    /**
     * Checks if a node has siblings
     * @link https://php.net/manual/en/tidynode.hassiblings.php
     * @return bool <b>TRUE</b> if the node has siblings, <b>FALSE</b> otherwise.
     * @since 5.0.1
     */
    public function hasSiblings() {}

    /**
     * Checks if a node represents a comment
     * @link https://php.net/manual/en/tidynode.iscomment.php
     * @return bool <b>TRUE</b> if the node is a comment, <b>FALSE</b> otherwise.
     * @since 5.0.1
     */
    public function isComment() {}

    /**
     * Checks if a node is part of a HTML document
     * @link https://php.net/manual/en/tidynode.ishtml.php
     * @return bool <b>TRUE</b> if the node is part of a HTML document, <b>FALSE</b> otherwise.
     * @since 5.0.1
     */
    public function isHtml() {}

    /**
     * Checks if a node represents text (no markup)
     * @link https://php.net/manual/en/tidynode.istext.php
     * @return bool <b>TRUE</b> if the node represent a text, <b>FALSE</b> otherwise.
     * @since 5.0.1
     */
    public function isText() {}

    /**
     * Checks if this node is JSTE
     * @link https://php.net/manual/en/tidynode.isjste.php
     * @return bool <b>TRUE</b> if the node is JSTE, <b>FALSE</b> otherwise.
     * @since 5.0.1
     */
    public function isJste() {}

    /**
     * Checks if this node is ASP
     * @link https://php.net/manual/en/tidynode.isasp.php
     * @return bool <b>TRUE</b> if the node is ASP, <b>FALSE</b> otherwise.
     * @since 5.0.1
     */
    public function isAsp() {}

    /**
     * Checks if a node is PHP
     * @link https://php.net/manual/en/tidynode.isphp.php
     * @return bool <b>TRUE</b> if the current node is PHP code, <b>FALSE</b> otherwise.
     * @since 5.0.1
     */
    public function isPhp() {}

    /**
     * Returns the parent node of the current node
     * @link https://php.net/manual/en/tidynode.getparent.php
     * @return tidyNode a tidyNode if the node has a parent, or <b>NULL</b>
     * otherwise.
     * @since 5.2.2
     */
    public function getParent() {}

    private function __construct() {}
}

/**
 * (PHP 5, PECL tidy &gt;= 0.5.2)<br/>
 * Returns the value of the specified configuration option for the tidy document
 * @link https://php.net/manual/en/tidy.getopt.php
 * @param tidy $object <p>
 * The <b>Tidy</b> object.
 * </p>
 * @param string $option <p>
 * You will find a list with each configuration option and their types
 * at: http://tidy.sourceforge.net/docs/quickref.html.
 * </p>
 * @return mixed the value of the specified <i>option</i>.
 * The return type depends on the type of the specified one.
 */
function tidy_getopt(tidy $object, $option) {}

/**
 * (PHP 5, PECL tidy &gt;= 0.5.2)<br/>
 * Parse a document stored in a string
 * @link https://php.net/manual/en/tidy.parsestring.php
 * @param string $input <p>
 * The data to be parsed.
 * </p>
 * @param mixed $config [optional] <p>
 * The config <i>config</i> can be passed either as an
 * array or as a string. If a string is passed, it is interpreted as the
 * name of the configuration file, otherwise, it is interpreted as the
 * options themselves.
 * </p>
 * <p>
 * For an explanation about each option, visit http://tidy.sourceforge.net/docs/quickref.html.
 * </p>
 * @param string|null $encoding [optional] <p>
 * The <i>encoding</i> parameter sets the encoding for
 * input/output documents. The possible values for encoding are:
 * ascii, latin0, latin1,
 * raw, utf8, iso2022,
 * mac, win1252, ibm858,
 * utf16, utf16le, utf16be,
 * big5, and shiftjis.
 * </p>
 * @return tidy a new <b>tidy</b> instance.
 */
function tidy_parse_string($input, $config = null, $encoding = null) {}

/**
 * (PHP 5, PECL tidy &gt;= 0.5.2)<br/>
 * Parse markup in file or URI
 * @link https://php.net/manual/en/tidy.parsefile.php
 * @param string $filename <p>
 * If the <i>filename</i> parameter is given, this function
 * will also read that file and initialize the object with the file,
 * acting like <b>tidy_parse_file</b>.
 * </p>
 * @param mixed $config [optional] <p>
 * The config <i>config</i> can be passed either as an
 * array or as a string. If a string is passed, it is interpreted as the
 * name of the configuration file, otherwise, it is interpreted as the
 * options themselves.
 * </p>
 * <p>
 * For an explanation about each option, see
 * http://tidy.sourceforge.net/docs/quickref.html.
 * </p>
 * @param string|null $encoding [optional] <p>
 * The <i>encoding</i> parameter sets the encoding for
 * input/output documents. The possible values for encoding are:
 * ascii, latin0, latin1,
 * raw, utf8, iso2022,
 * mac, win1252, ibm858,
 * utf16, utf16le, utf16be,
 * big5, and shiftjis.
 * </p>
 * @param bool $use_include_path [optional] <p>
 * Search for the file in the include_path.
 * </p>
 * @return tidy a new <b>tidy</b> instance.
 */
function tidy_parse_file($filename, $config = null, $encoding = null, $use_include_path = false) {}

/**
 * (PHP 5, PECL tidy &gt;= 0.5.2)<br/>
 * Return a string representing the parsed tidy markup
 * @link https://php.net/manual/en/function.tidy-get-output.php
 * @param tidy $object <p>
 * The <b>Tidy</b> object.
 * </p>
 * @return string the parsed tidy markup.
 */
function tidy_get_output(tidy $object) {}

/**
 * (PHP 5, PECL tidy &gt;= 0.5.2)<br/>
 * Return warnings and errors which occurred parsing the specified document
 * @link https://php.net/manual/en/tidy.props.errorbuffer.php
 * @param tidy $object <p>
 * The <b>Tidy</b> object.
 * </p>
 * @return mixed the error buffer as a string.
 */
function tidy_get_error_buffer(tidy $object) {}

/**
 * (PHP 5, PECL tidy &gt;= 0.5.2)<br/>
 * Execute configured cleanup and repair operations on parsed markup
 * @link https://php.net/manual/en/tidy.cleanrepair.php
 * @param tidy $object The Tidy object.
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function tidy_clean_repair(tidy $object) {}

/**
 * (PHP 5, PECL tidy &gt;= 0.7.0)<br/>
 * Repair a string using an optionally provided configuration file
 * @link https://php.net/manual/en/tidy.repairstring.php
 * @param string $data <p>
 * The data to be repaired.
 * </p>
 * @param mixed $config [optional] <p>
 * The config <i>config</i> can be passed either as an
 * array or as a string. If a string is passed, it is interpreted as the
 * name of the configuration file, otherwise, it is interpreted as the
 * options themselves.
 * </p>
 * <p>
 * Check http://tidy.sourceforge.net/docs/quickref.html for
 * an explanation about each option.
 * </p>
 * @param string|null $encoding [optional] <p>
 * The <i>encoding</i> parameter sets the encoding for
 * input/output documents. The possible values for encoding are:
 * ascii, latin0, latin1,
 * raw, utf8, iso2022,
 * mac, win1252, ibm858,
 * utf16, utf16le, utf16be,
 * big5, and shiftjis.
 * </p>
 * @return string the repaired string.
 */
function tidy_repair_string($data, $config = null, $encoding = null) {}

/**
 * (PHP 5, PECL tidy &gt;= 0.7.0)<br/>
 * Repair a file and return it as a string
 * @link https://php.net/manual/en/tidy.repairfile.php
 * @param string $filename <p>
 * The file to be repaired.
 * </p>
 * @param mixed $config [optional] <p>
 * The config <i>config</i> can be passed either as an
 * array or as a string. If a string is passed, it is interpreted as the
 * name of the configuration file, otherwise, it is interpreted as the
 * options themselves.
 * </p>
 * <p>
 * Check http://tidy.sourceforge.net/docs/quickref.html for an
 * explanation about each option.
 * </p>
 * @param string|null $encoding [optional] <p>
 * The <i>encoding</i> parameter sets the encoding for
 * input/output documents. The possible values for encoding are:
 * ascii, latin0, latin1,
 * raw, utf8, iso2022,
 * mac, win1252, ibm858,
 * utf16, utf16le, utf16be,
 * big5, and shiftjis.
 * </p>
 * @param bool $use_include_path [optional] <p>
 * Search for the file in the include_path.
 * </p>
 * @return string the repaired contents as a string.
 */
function tidy_repair_file($filename, $config = null, $encoding = null, $use_include_path = false) {}

/**
 * (PHP 5, PECL tidy &gt;= 0.5.2)<br/>
 * Run configured diagnostics on parsed and repaired markup
 * @link https://php.net/manual/en/tidy.diagnose.php
 * @param tidy $object <p>
 * The <b>Tidy</b> object.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function tidy_diagnose(tidy $object) {}

/**
 * (PHP 5, PECL tidy &gt;= 0.5.2)<br/>
 * Get release date (version) for Tidy library
 * @link https://php.net/manual/en/tidy.getrelease.php
 * @return string a string with the release date of the Tidy library.
 */
function tidy_get_release() {}

/**
 * (PHP 5, PECL tidy &gt;= 0.7.0)<br/>
 * Get current Tidy configuration
 * @link https://php.net/manual/en/tidy.getconfig.php
 * @param tidy $object <p>
 * The <b>Tidy</b> object.
 * </p>
 * @return array an array of configuration options.
 * <p>
 * For an explanation about each option, visit http://tidy.sourceforge.net/docs/quickref.html.
 * </p>
 */
function tidy_get_config(tidy $object) {}

/**
 * (PHP 5, PECL tidy &gt;= 0.5.2)<br/>
 * Get status of specified document
 * @link https://php.net/manual/en/tidy.getstatus.php
 * @param tidy $object <p>
 * The <b>Tidy</b> object.
 * </p>
 * @return int 0 if no error/warning was raised, 1 for warnings or accessibility
 * errors, or 2 for errors.
 */
function tidy_get_status(tidy $object) {}

/**
 * (PHP 5, PECL tidy &gt;= 0.5.2)<br/>
 * Get the Detected HTML version for the specified document
 * @link https://php.net/manual/en/tidy.gethtmlver.php
 * @param tidy $object <p>
 * The <b>Tidy</b> object.
 * </p>
 * @return int the detected HTML version.
 * <p>
 * This function is not yet implemented in the Tidylib itself, so it always
 * return 0.
 * </p>
 */
function tidy_get_html_ver(tidy $object) {}

/**
 * (PHP 5, PECL tidy &gt;= 0.5.2)<br/>
 * Indicates if the document is a XHTML document
 * @link https://php.net/manual/en/tidy.isxhtml.php
 * @param tidy $object <p>
 * The <b>Tidy</b> object.
 * </p>
 * @return bool This function returns <b>TRUE</b> if the specified tidy
 * <i>object</i> is a XHTML document, or <b>FALSE</b> otherwise.
 * </p>
 * <p>
 * This function is not yet implemented in the Tidylib itself, so it always
 * return <b>FALSE</b>.
 */
function tidy_is_xhtml(tidy $object) {}

/**
 * (PHP 5, PECL tidy &gt;= 0.5.2)<br/>
 * Indicates if the document is a generic (non HTML/XHTML) XML document
 * @link https://php.net/manual/en/tidy.isxml.php
 * @param tidy $object <p>
 * The <b>Tidy</b> object.
 * </p>
 * @return bool This function returns <b>TRUE</b> if the specified tidy
 * <i>object</i> is a generic XML document (non HTML/XHTML),
 * or <b>FALSE</b> otherwise.
 * </p>
 * <p>
 * This function is not yet implemented in the Tidylib itself, so it always
 * return <b>FALSE</b>.
 */
function tidy_is_xml(tidy $object) {}

/**
 * (PHP 5, PECL tidy &gt;= 0.5.2)<br/>
 * Returns the Number of Tidy errors encountered for specified document
 * @link https://php.net/manual/en/function.tidy-error-count.php
 * @param tidy $object <p>
 * The <b>Tidy</b> object.
 * </p>
 * @return int the number of errors.
 */
function tidy_error_count(tidy $object) {}

/**
 * (PHP 5, PECL tidy &gt;= 0.5.2)<br/>
 * Returns the Number of Tidy warnings encountered for specified document
 * @link https://php.net/manual/en/function.tidy-warning-count.php
 * @param tidy $object <p>
 * The <b>Tidy</b> object.
 * </p>
 * @return int the number of warnings.
 */
function tidy_warning_count(tidy $object) {}

/**
 * (PHP 5, PECL tidy &gt;= 0.5.2)<br/>
 * Returns the Number of Tidy accessibility warnings encountered for specified document
 * @link https://php.net/manual/en/function.tidy-access-count.php
 * @param tidy $object <p>
 * The <b>Tidy</b> object.
 * </p>
 * @return int the number of warnings.
 */
function tidy_access_count(tidy $object) {}

/**
 * (PHP 5, PECL tidy &gt;= 0.5.2)<br/>
 * Returns the Number of Tidy configuration errors encountered for specified document
 * @link https://php.net/manual/en/function.tidy-config-count.php
 * @param tidy $object <p>
 * The <b>Tidy</b> object.
 * </p>
 * @return int the number of errors.
 */
function tidy_config_count(tidy $object) {}

/**
 * Returns the documentation for the given option name
 * @link https://php.net/manual/en/tidy.getoptdoc.php
 * @param tidy $object <p>
 * The <b>Tidy</b> object.
 * </p>
 * @param string $optname <p>
 * The option name
 * </p>
 * @return string a string if the option exists and has documentation available, or
 * <b>FALSE</b> otherwise.
 */
function tidy_get_opt_doc(tidy $object, $optname) {}

/**
 * (PHP 5, PECL tidy 0.5.2-1.0.0)<br/>
 * Returns a <b>tidyNode</b> object representing the root of the tidy parse tree
 * @link https://php.net/manual/en/tidy.root.php
 * @param tidy $object <p>
 * The <b>Tidy</b> object.
 * </p>
 * @return tidyNode the <b>tidyNode</b> object.
 */
function tidy_get_root(tidy $object) {}

/**
 * (PHP 5, PECL tidy 0.5.2-1.0.0)<br/>
 * Returns a <b>tidyNode</b> object starting from the &lt;head&gt; tag of the tidy parse tree
 * @link https://php.net/manual/en/tidy.head.php
 * @param tidy $object <p>
 * The <b>Tidy</b> object.
 * </p>
 * @return tidyNode the <b>tidyNode</b> object.
 */
function tidy_get_head(tidy $object) {}

/**
 * (PHP 5, PECL tidy 0.5.2-1.0.0)<br/>
 * Returns a <b>tidyNode</b> object starting from the &lt;html&gt; tag of the tidy parse tree
 * @link https://php.net/manual/en/tidy.html.php
 * @param tidy $object <p>
 * The <b>Tidy</b> object.
 * </p>
 * @return tidyNode the <b>tidyNode</b> object.
 */
function tidy_get_html(tidy $object) {}

/**
 * (PHP 5, PECL tidy 0.5.2-1.0)<br/>
 * Returns a <b>tidyNode</b> object starting from the &lt;body&gt; tag of the tidy parse tree
 * @link https://php.net/manual/en/tidy.body.php
 * @param tidy $object <p>
 * The <b>Tidy</b> object.
 * </p>
 * @return tidyNode a <b>tidyNode</b> object starting from the
 * &lt;body&gt; tag of the tidy parse tree.
 */
function tidy_get_body(tidy $object) {}

/**
 * ob_start callback function to repair the buffer
 * @link https://php.net/manual/en/function.ob-tidyhandler.php
 * @param string $input <p>
 * The buffer.
 * </p>
 * @param int $mode [optional] <p>
 * The buffer mode.
 * </p>
 * @return string the modified buffer.
 */
function ob_tidyhandler($input, $mode = null) {}

/**
 * description
 * @link https://php.net/manual/en/tidy.constants.php
 */
define('TIDY_TAG_UNKNOWN', 0);
define('TIDY_TAG_A', 1);
define('TIDY_TAG_ABBR', 2);
define('TIDY_TAG_ACRONYM', 3);
define('TIDY_TAG_ADDRESS', 4);
define('TIDY_TAG_ALIGN', 5);
define('TIDY_TAG_APPLET', 6);
define('TIDY_TAG_AREA', 7);
define('TIDY_TAG_B', 8);
define('TIDY_TAG_BASE', 9);
define('TIDY_TAG_BASEFONT', 10);
define('TIDY_TAG_BDO', 11);
define('TIDY_TAG_BGSOUND', 12);
define('TIDY_TAG_BIG', 13);
define('TIDY_TAG_BLINK', 14);
define('TIDY_TAG_BLOCKQUOTE', 15);
define('TIDY_TAG_BODY', 16);
define('TIDY_TAG_BR', 17);
define('TIDY_TAG_BUTTON', 18);
define('TIDY_TAG_CAPTION', 19);
define('TIDY_TAG_CENTER', 20);
define('TIDY_TAG_CITE', 21);
define('TIDY_TAG_CODE', 22);
define('TIDY_TAG_COL', 23);
define('TIDY_TAG_COLGROUP', 24);
define('TIDY_TAG_COMMENT', 25);
define('TIDY_TAG_DD', 26);
define('TIDY_TAG_DEL', 27);
define('TIDY_TAG_DFN', 28);
define('TIDY_TAG_DIR', 29);
define('TIDY_TAG_DIV', 30);
define('TIDY_TAG_DL', 31);
define('TIDY_TAG_DT', 32);
define('TIDY_TAG_EM', 33);
define('TIDY_TAG_EMBED', 34);
define('TIDY_TAG_FIELDSET', 35);
define('TIDY_TAG_FONT', 36);
define('TIDY_TAG_FORM', 37);
define('TIDY_TAG_FRAME', 38);
define('TIDY_TAG_FRAMESET', 39);
define('TIDY_TAG_H1', 40);
define('TIDY_TAG_H2', 41);
define('TIDY_TAG_H3', 42);
define('TIDY_TAG_H4', 43);
define('TIDY_TAG_H5', 44);
define('TIDY_TAG_H6', 45);
define('TIDY_TAG_HEAD', 46);
define('TIDY_TAG_HR', 47);
define('TIDY_TAG_HTML', 48);
define('TIDY_TAG_I', 49);
define('TIDY_TAG_IFRAME', 50);
define('TIDY_TAG_ILAYER', 51);
define('TIDY_TAG_IMG', 52);
define('TIDY_TAG_INPUT', 53);
define('TIDY_TAG_INS', 54);
define('TIDY_TAG_ISINDEX', 55);
define('TIDY_TAG_KBD', 56);
define('TIDY_TAG_KEYGEN', 57);
define('TIDY_TAG_LABEL', 58);
define('TIDY_TAG_LAYER', 59);
define('TIDY_TAG_LEGEND', 60);
define('TIDY_TAG_LI', 61);
define('TIDY_TAG_LINK', 62);
define('TIDY_TAG_LISTING', 63);
define('TIDY_TAG_MAP', 64);
define('TIDY_TAG_MARQUEE', 65);
define('TIDY_TAG_MENU', 66);
define('TIDY_TAG_META', 67);
define('TIDY_TAG_MULTICOL', 68);
define('TIDY_TAG_NOBR', 69);
define('TIDY_TAG_NOEMBED', 70);
define('TIDY_TAG_NOFRAMES', 71);
define('TIDY_TAG_NOLAYER', 72);
define('TIDY_TAG_NOSAVE', 73);
define('TIDY_TAG_NOSCRIPT', 74);
define('TIDY_TAG_OBJECT', 75);
define('TIDY_TAG_OL', 76);
define('TIDY_TAG_OPTGROUP', 77);
define('TIDY_TAG_OPTION', 78);
define('TIDY_TAG_P', 79);
define('TIDY_TAG_PARAM', 80);
define('TIDY_TAG_PLAINTEXT', 81);
define('TIDY_TAG_PRE', 82);
define('TIDY_TAG_Q', 83);
define('TIDY_TAG_RB', 84);
define('TIDY_TAG_RBC', 85);
define('TIDY_TAG_RP', 86);
define('TIDY_TAG_RT', 87);
define('TIDY_TAG_RTC', 88);
define('TIDY_TAG_RUBY', 89);
define('TIDY_TAG_S', 90);
define('TIDY_TAG_SAMP', 91);
define('TIDY_TAG_SCRIPT', 92);
define('TIDY_TAG_SELECT', 93);
define('TIDY_TAG_SERVER', 94);
define('TIDY_TAG_SERVLET', 95);
define('TIDY_TAG_SMALL', 96);
define('TIDY_TAG_SPACER', 97);
define('TIDY_TAG_SPAN', 98);
define('TIDY_TAG_STRIKE', 99);
define('TIDY_TAG_STRONG', 100);
define('TIDY_TAG_STYLE', 101);
define('TIDY_TAG_SUB', 102);
define('TIDY_TAG_SUP', 103);
define('TIDY_TAG_TABLE', 104);
define('TIDY_TAG_TBODY', 105);
define('TIDY_TAG_TD', 106);
define('TIDY_TAG_TEXTAREA', 107);
define('TIDY_TAG_TFOOT', 108);
define('TIDY_TAG_TH', 109);
define('TIDY_TAG_THEAD', 110);
define('TIDY_TAG_TITLE', 111);
define('TIDY_TAG_TR', 112);
define('TIDY_TAG_TT', 113);
define('TIDY_TAG_U', 114);
define('TIDY_TAG_UL', 115);
define('TIDY_TAG_VAR', 116);
define('TIDY_TAG_WBR', 117);
define('TIDY_TAG_XMP', 118);
/**
 * @since 7.4
 */
define('TIDY_TAG_ARTICLE', 123);
/**
 * @since 7.4
 */
define('TIDY_TAG_ASIDE', 124);
/**
 * @since 7.4
 */
define('TIDY_TAG_AUDIO', 125);
/**
 * @since 7.4
 */
define('TIDY_TAG_BDI', 126);
/**
 * @since 7.4
 */
define('TIDY_TAG_CANVAS', 127);
/**
 * @since 7.4
 */
define('TIDY_TAG_COMMAND', 128);
/**
 * @since 7.4
 */
define('TIDY_TAG_DATALIST', 129);
/**
 * @since 7.4
 */
define('TIDY_TAG_DETAILS', 130);
/**
 * @since 7.4
 */
define('TIDY_TAG_DIALOG', 131);
/**
 * @since 7.4
 */
define('TIDY_TAG_FIGCAPTION', 132);
/**
 * @since 7.4
 */
define('TIDY_TAG_FIGURE', 133);
/**
 * @since 7.4
 */
define('TIDY_TAG_FOOTER', 134);
/**
 * @since 7.4
 */
define('TIDY_TAG_HEADER', 135);
/**
 * @since 7.4
 */
define('TIDY_TAG_HGROUP', 136);
/**
 * @since 7.4
 */
define('TIDY_TAG_MAIN', 137);
/**
 * @since 7.4
 */
define('TIDY_TAG_MARK', 138);
/**
 * @since 7.4
 */
define('TIDY_TAG_MENUITEM', 139);
/**
 * @since 7.4
 */
define('TIDY_TAG_METER', 140);
/**
 * @since 7.4
 */
define('TIDY_TAG_NAV', 141);
/**
 * @since 7.4
 */
define('TIDY_TAG_OUTPUT', 142);
/**
 * @since 7.4
 */
define('TIDY_TAG_PROGRESS', 143);
/**
 * @since 7.4
 */
define('TIDY_TAG_SECTION', 144);
/**
 * @since 7.4
 */
define('TIDY_TAG_SOURCE', 145);
/**
 * @since 7.4
 */
define('TIDY_TAG_SUMMARY', 146);
/**
 * @since 7.4
 */
define('TIDY_TAG_TEMPLATE', 147);
/**
 * @since 7.4
 */
define('TIDY_TAG_TIME', 148);
/**
 * @since 7.4
 */
define('TIDY_TAG_TRACK', 149);
/**
 * @since 7.4
 */
define('TIDY_TAG_VIDEO', 150);

/**
 * root node
 * @link https://php.net/manual/en/tidy.constants.php
 */
define('TIDY_NODETYPE_ROOT', 0);

/**
 * doctype
 * @link https://php.net/manual/en/tidy.constants.php
 */
define('TIDY_NODETYPE_DOCTYPE', 1);

/**
 * HTML comment
 * @link https://php.net/manual/en/tidy.constants.php
 */
define('TIDY_NODETYPE_COMMENT', 2);

/**
 * Processing Instruction
 * @link https://php.net/manual/en/tidy.constants.php
 */
define('TIDY_NODETYPE_PROCINS', 3);

/**
 * Text
 * @link https://php.net/manual/en/tidy.constants.php
 */
define('TIDY_NODETYPE_TEXT', 4);

/**
 * start tag
 * @link https://php.net/manual/en/tidy.constants.php
 */
define('TIDY_NODETYPE_START', 5);

/**
 * end tag
 * @link https://php.net/manual/en/tidy.constants.php
 */
define('TIDY_NODETYPE_END', 6);

/**
 * empty tag
 * @link https://php.net/manual/en/tidy.constants.php
 */
define('TIDY_NODETYPE_STARTEND', 7);

/**
 * CDATA
 * @link https://php.net/manual/en/tidy.constants.php
 */
define('TIDY_NODETYPE_CDATA', 8);

/**
 * XML section
 * @link https://php.net/manual/en/tidy.constants.php
 */
define('TIDY_NODETYPE_SECTION', 9);

/**
 * ASP code
 * @link https://php.net/manual/en/tidy.constants.php
 */
define('TIDY_NODETYPE_ASP', 10);

/**
 * JSTE code
 * @link https://php.net/manual/en/tidy.constants.php
 */
define('TIDY_NODETYPE_JSTE', 11);

/**
 * PHP code
 * @link https://php.net/manual/en/tidy.constants.php
 */
define('TIDY_NODETYPE_PHP', 12);

/**
 * XML declaration
 * @link https://php.net/manual/en/tidy.constants.php
 */
define('TIDY_NODETYPE_XMLDECL', 13);

// End of tidy v.2.0
<?php

// Start of lua v2.0.6.
// The actual lua version is different from the PECL package version

/**
 * @link https://secure.php.net/manual/en/class.lua.php
 */
class Lua
{
    /**
     * @var string
     *
     * @link https://secure.php.net/manual/en/class.lua.php#lua.constants.lua-version
     */
    public const LUA_VERSION = '5.1.4';

    /**
     * @param null|string $lua_script_file
     * @link https://secure.php.net/manual/en/lua.construct.php
     */
    public function __construct(?string $lua_script_file = null) {}

    /**
     * @link https://secure.php.net/manual/en/lua.assign.php
     *
     * @param string $name
     * @param mixed $value
     *
     * @return $this|null Returns $this or NULL on failure.
     */
    public function assign(string $name, $value) {}

    /**
     * @link https://secure.php.net/manual/en/lua.call.php
     *
     * @param callable $lua_func Function name in lua
     * @param array $args Arguments passed to the Lua function
     * @param bool $use_self Whether to use self
     *
     * @return mixed|false Returns result of the called function, null for wrong arguments or FALSE on other failure.
     */
    public function call(callable $lua_func, array $args = [], bool $use_self = false) {}

    /**
     * @link https://secure.php.net/manual/en/lua.eval.php
     *
     * @param string $statements
     *
     * @return mixed|false Returns result of evaled code, NULL for wrong arguments or FALSE on other failure.
     */
    public function eval(string $statements) {}

    /**
     * @link https://secure.php.net/manual/en/lua.include.php
     *
     * @param string $file
     *
     * @return mixed|false Returns result of included code, NULL for wrong arguments or FALSE on other failure.
     */
    public function include(string $file) {}

    /**
     * @link https://secure.php.net/manual/en/lua.getversion.php
     *
     * @return string Returns Lua::LUA_VERSION
     */
    public function getVersion(): string {}

    /**
     * @link https://secure.php.net/manual/en/lua.registercallback.php
     *
     * @param string $name
     * @param callable $function A valid PHP function callback
     *
     * @return $this|null|false Returns $this, NULL for wrong arguments or FALSE on other failure.
     */
    public function registerCallback(string $name, callable $function) {}
}
<?php

// Start of yaml v.1.2.0

/**
 * Scalar entity styles usable by yaml_parse() callback methods.
 * @link https://php.net/manual/en/yaml.constants.php
 */
define('YAML_ANY_SCALAR_STYLE', 0);
define('YAML_PLAIN_SCALAR_STYLE', 1);
define('YAML_SINGLE_QUOTED_SCALAR_STYLE', 2);
define('YAML_DOUBLE_QUOTED_SCALAR_STYLE', 3);
define('YAML_LITERAL_SCALAR_STYLE', 4);
define('YAML_FOLDED_SCALAR_STYLE', 5);

/**
 * Common tags usable by yaml_parse() callback methods.
 * @link https://php.net/manual/en/yaml.constants.php
 */
define('YAML_NULL_TAG', 'tag:yaml.org,2002:null');
define('YAML_BOOL_TAG', 'tag:yaml.org,2002:bool');
define('YAML_STR_TAG', 'tag:yaml.org,2002:str');
define('YAML_INT_TAG', 'tag:yaml.org,2002:int');
define('YAML_FLOAT_TAG', 'tag:yaml.org,2002:float');
define('YAML_TIMESTAMP_TAG', 'tag:yaml.org,2002:timestamp');
define('YAML_SEQ_TAG', 'tag:yaml.org,2002:seq');
define('YAML_MAP_TAG', 'tag:yaml.org,2002:map');
define('YAML_PHP_TAG', '!php/object');

/**
 * Encoding types for yaml_emit()
 * @link https://php.net/manual/en/yaml.constants.php
 */
define('YAML_ANY_ENCODING', 0);
define('YAML_UTF8_ENCODING', 1);
define('YAML_UTF16LE_ENCODING', 2);
define('YAML_UTF16BE_ENCODING', 3);

/**
 * Let emitter choose linebreak character.
 * @link https://php.net/manual/en/yaml.constants.php
 */
define('YAML_ANY_BREAK', 0);
/**
 * Use \r as break character (Mac style).
 * @link https://php.net/manual/en/yaml.constants.php
 */
define('YAML_CR_BREAK', 1);
/**
 * Use \n as break character (Unix style).
 * @link https://php.net/manual/en/yaml.constants.php
 */
define('YAML_LN_BREAK', 2);
/**
 * Use \r\n as break character (DOS style).
 * @link https://php.net/manual/en/yaml.constants.php
 */
define('YAML_CRLN_BREAK', 3);

define('YAML_MERGE_TAG', 'tag:yaml.org,2002:merge');
define('YAML_BINARY_TAG', 'tag:yaml.org,2002:binary');

/**
 * (PHP 5 &gt;= 5.2.0, PECL yaml &gt;= 0.5.0)<br/>
 * Send the YAML representation of a value to a file
 * @link https://php.net/manual/en/function.yaml-emit-file.php
 * @param string $filename Path to the file.
 * @param mixed $data The data being encoded. Can be any type except a resource.
 * @param int $encoding Output character encoding chosen from YAML_ANY_ENCODING, YAML_UTF8_ENCODING, YAML_UTF16LE_ENCODING, YAML_UTF16BE_ENCODING.
 * @param int $linebreak Output linebreak style chosen from YAML_ANY_BREAK, YAML_CR_BREAK, YAML_LN_BREAK, YAML_CRLN_BREAK.
 * @param array $callbacks [optional] Content handlers for YAML nodes. Associative array of YAML tag => callable mappings. See parse callbacks for more details.
 * @return bool Returns TRUE on success.
 */
function yaml_emit_file($filename, $data, $encoding = YAML_ANY_ENCODING, $linebreak = YAML_ANY_BREAK, array $callbacks = []) {}

/**
 * (PHP 5 &gt;= 5.2.0, PECL yaml &gt;= 0.5.0)<br/>
 * @link https://php.net/manual/en/function.yaml-emit.php
 * @param mixed $data The data being encoded. Can be any type except a resource.
 * @param int $encoding [optional] Output character encoding chosen from YAML_ANY_ENCODING, YAML_UTF8_ENCODING, YAML_UTF16LE_ENCODING, YAML_UTF16BE_ENCODING.
 * @param int $linebreak [optional] Output linebreak style chosen from YAML_ANY_BREAK, YAML_CR_BREAK, YAML_LN_BREAK, YAML_CRLN_BREAK.
 * @param array $callbacks [optional] Content handlers for YAML nodes. Associative array of YAML tag => callable mappings. See parse callbacks for more details.
 * @return string Returns a YAML encoded string on success.
 */
function yaml_emit($data, $encoding = YAML_ANY_ENCODING, $linebreak = YAML_ANY_BREAK, array $callbacks = []) {}

/**
 * (PHP 5 &gt;= 5.2.0, PECL yaml &gt;= 0.4.0)<br/>
 * Parse a YAML stream from a file
 * @link https://php.net/manual/en/function.yaml-parse-file.php
 * @param string $filename Path to the file.
 * @param int $pos [optional] Document to extract from stream (-1 for all documents, 0 for first document, ...).
 * @param int &$ndocs [optional] If ndocs is provided, then it is filled with the number of documents found in stream.
 * @param array $callbacks [optional] Content handlers for YAML nodes. Associative array of YAML tag => callable mappings. See parse callbacks for more details.
 * @return mixed|false Returns the value encoded in input in appropriate PHP type or FALSE on failure. If pos is -1 an array will be returned with one entry for each document found in the stream.
 */
function yaml_parse_file($filename, $pos = 0, &$ndocs = null, array $callbacks = []) {}

/**
 * (PHP 5 &gt;= 5.2.0, PECL yaml &gt;= 0.4.0)<br/>
 * Parse a Yaml stream from a URL
 * @link https://php.net/manual/en/function.yaml-parse-url.php
 * @param string $url url should be of the form "scheme://...". PHP will search for a protocol handler (also known as a wrapper) for that scheme. If no wrappers for that protocol are registered, PHP will emit a notice to help you track potential problems in your script and then continue as though filename specifies a regular file.
 * @param int $pos [optional] Document to extract from stream (-1 for all documents, 0 for first document, ...).
 * @param int &$ndocs [optional] If ndocs is provided, then it is filled with the number of documents found in stream.
 * @param array $callbacks [optional] Content handlers for YAML nodes. Associative array of YAML tag => callable mappings. See parse callbacks for more details.
 * @return mixed|false Returns the value encoded in input in appropriate PHP type or FALSE on failure. If pos is -1 an array will be returned with one entry for each document found in the stream.
 */
function yaml_parse_url($url, $pos = 0, &$ndocs = null, array $callbacks = []) {}

/**
 * (PHP 5 &gt;= 5.2.0, PECL yaml &gt;= 0.4.0)<br/>
 * Parse a YAML stream
 * @link https://php.net/manual/en/function.yaml-parse.php
 * @param string $input The string to parse as a YAML document stream.
 * @param int $pos [optional] Document to extract from stream (-1 for all documents, 0 for first document, ...).
 * @param int &$ndocs [optional] If ndocs is provided, then it is filled with the number of documents found in stream.
 * @param array $callbacks [optional] Content handlers for YAML nodes. Associative array of YAML tag => callable mappings. See parse callbacks for more details.
 * @return mixed|false Returns the value encoded in input in appropriate PHP type or FALSE on failure. If pos is -1 an array will be returned with one entry for each document found in the stream.
 */
function yaml_parse($input, $pos = 0, &$ndocs = null, array $callbacks = []) {}
<?php
/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_DEFAULT_TCP_HOST', '127.0.0.1');

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_DEFAULT_TCP_PORT', 4730);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_DEFAULT_SOCKET_TIMEOUT', 10);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_DEFAULT_SOCKET_SEND_SIZE', 32768);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_DEFAULT_SOCKET_RECV_SIZE', 32768);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_MAX_ERROR_SIZE', 1024);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_PACKET_HEADER_SIZE', 12);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_JOB_HANDLE_SIZE', 64);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_OPTION_SIZE', 64);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_UNIQUE_SIZE', 64);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_MAX_COMMAND_ARGS', 8);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_ARGS_BUFFER_SIZE', 128);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_SEND_BUFFER_SIZE', 8192);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_RECV_BUFFER_SIZE', 8192);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_WAIT_TIMEOUT', 10000);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_SUCCESS', 0);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_IO_WAIT', 1);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_SHUTDOWN', 2);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_SHUTDOWN_GRACEFUL', 3);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_ERRNO', 4);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_EVENT', 5);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_TOO_MANY_ARGS', 6);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_NO_ACTIVE_FDS', 7);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_INVALID_MAGIC', 8);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_INVALID_COMMAND', 9);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_INVALID_PACKET', 10);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_UNEXPECTED_PACKET', 11);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_GETADDRINFO', 12);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_NO_SERVERS', 13);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_LOST_CONNECTION', 14);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_MEMORY_ALLOCATION_FAILURE', 15);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_JOB_EXISTS', 16);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_JOB_QUEUE_FULL', 17);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_SERVER_ERROR', 18);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORK_ERROR', 19);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORK_DATA', 20);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORK_WARNING', 21);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORK_STATUS', 22);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORK_EXCEPTION', 23);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORK_FAIL', 24);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_NOT_CONNECTED', 25);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COULD_NOT_CONNECT', 26);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_SEND_IN_PROGRESS', 27);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_RECV_IN_PROGRESS', 28);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_NOT_FLUSHING', 29);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_DATA_TOO_LARGE', 30);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_INVALID_FUNCTION_NAME', 31);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_INVALID_WORKER_FUNCTION', 32);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_NO_REGISTERED_FUNCTIONS', 34);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_NO_JOBS', 35);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_ECHO_DATA_CORRUPTION', 36);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_NEED_WORKLOAD_FN', 37);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_PAUSE', 38);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_UNKNOWN_STATE', 39);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_PTHREAD', 40);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_PIPE_EOF', 41);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_QUEUE_ERROR', 42);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_FLUSH_DATA', 43);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_SEND_BUFFER_TOO_SMALL', 44);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_IGNORE_PACKET', 45);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_UNKNOWN_OPTION', 46);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_TIMEOUT', 47);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_MAX_RETURN', 49);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_VERBOSE_NEVER', 0);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_VERBOSE_FATAL', 1);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_VERBOSE_ERROR', 2);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_VERBOSE_INFO', 3);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_VERBOSE_DEBUG', 4);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_VERBOSE_CRAZY', 5);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_VERBOSE_MAX', 6);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_NON_BLOCKING', 0);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_DONT_TRACK_PACKETS', 1);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CON_READY', 0);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CON_PACKET_IN_USE', 1);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CON_EXTERNAL_FD', 2);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CON_IGNORE_LOST_CONNECTION', 3);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CON_CLOSE_AFTER_FLUSH', 4);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CON_SEND_STATE_NONE', 0);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CON_RECV_STATE_READ_DATA', 2);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_MAGIC_TEXT', 0);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_MAGIC_REQUEST', 1);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_MAGIC_RESPONSE', 2);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_TEXT', 0);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_CAN_DO', 1);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_CANT_DO', 2);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_RESET_ABILITIES', 3);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_PRE_SLEEP', 4);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_UNUSED', 5);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_NOOP', 6);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_SUBMIT_JOB', 7);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_JOB_CREATED', 8);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_GRAB_JOB', 9);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_NO_JOB', 10);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_JOB_ASSIGN', 11);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_WORK_STATUS', 12);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_WORK_COMPLETE', 13);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_WORK_FAIL', 14);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_GET_STATUS', 15);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_ECHO_REQ', 16);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_ECHO_RES', 17);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_SUBMIT_JOB_BG', 18);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_ERROR', 19);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_STATUS_RES', 20);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_SUBMIT_JOB_HIGH', 21);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_SET_CLIENT_ID', 22);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_CAN_DO_TIMEOUT', 23);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_ALL_YOURS', 24);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_WORK_EXCEPTION', 25);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_OPTION_REQ', 26);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_OPTION_RES', 27);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_WORK_DATA', 28);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_WORK_WARNING', 29);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_GRAB_JOB_UNIQ', 30);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_JOB_ASSIGN_UNIQ', 31);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_SUBMIT_JOB_HIGH_BG', 32);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_SUBMIT_JOB_LOW', 33);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_SUBMIT_JOB_LOW_BG', 34);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_SUBMIT_JOB_SCHED', 35);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_SUBMIT_JOB_EPOCH', 36);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_MAX', 37);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_TASK_STATE_NEW', 0);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_TASK_STATE_SUBMIT', 1);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_TASK_STATE_WORKLOAD', 2);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_TASK_STATE_WORK', 3);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_TASK_STATE_CREATED', 4);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_TASK_STATE_DATA', 5);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_TASK_STATE_WARNING', 6);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_TASK_STATE_STATUS', 7);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_TASK_STATE_COMPLETE', 8);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_TASK_STATE_EXCEPTION', 9);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_TASK_STATE_FAIL', 10);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_TASK_STATE_FINISHED', 11);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_JOB_PRIORITY_HIGH', 0);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_JOB_PRIORITY_NORMAL', 1);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_JOB_PRIORITY_LOW', 2);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_JOB_PRIORITY_MAX', 3);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CLIENT_ALLOCATED', 1);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CLIENT_NON_BLOCKING', 2);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CLIENT_TASK_IN_USE', 4);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CLIENT_UNBUFFERED_RESULT', 8);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CLIENT_NO_NEW', 16);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CLIENT_FREE_TASKS', 32);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CLIENT_STATE_IDLE', 0);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CLIENT_STATE_NEW', 1);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CLIENT_STATE_SUBMIT', 2);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CLIENT_STATE_PACKET', 3);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_ALLOCATED', 1);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_NON_BLOCKING', 2);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_PACKET_INIT', 4);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_GRAB_JOB_IN_USE', 8);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_PRE_SLEEP_IN_USE', 16);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_WORK_JOB_IN_USE', 32);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_CHANGE', 64);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_GRAB_UNIQ', 128);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_TIMEOUT_RETURN', 256);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_STATE_START', 0);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_STATE_FUNCTION_SEND', 1);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_STATE_CONNECT', 2);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_STATE_GRAB_JOB_SEND', 3);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_STATE_GRAB_JOB_RECV', 4);

/**
 * @link https://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_STATE_PRE_SLEEP', 5);

function gearman_version() {}

function gearman_bugreport() {}

/**
 * @param $verbose
 */
function gearman_verbose_name($verbose) {}

/**
 * @param $client_object
 */
function gearman_client_return_code($client_object) {}

/**
 * @param $client_object
 */
function gearman_client_create($client_object) {}

/**
 * @param $client_object
 */
function gearman_client_clone($client_object) {}

/**
 * @param $client_object
 */
function gearman_client_error($client_object) {}

/**
 * @param $client_object
 */
function gearman_client_errno($client_object) {}

/**
 * @param $client_object
 */
function gearman_client_options($client_object) {}

/**
 * @param $client_object
 * @param $option
 */
function gearman_client_set_options($client_object, $option) {}

/**
 * @param $client_object
 * @param $option
 */
function gearman_client_add_options($client_object, $option) {}

/**
 * @param $client_object
 * @param $option
 */
function gearman_client_remove_options($client_object, $option) {}

/**
 * @param $client_object
 */
function gearman_client_timeout($client_object) {}

/**
 * @param $client_object
 * @param $timeout
 */
function gearman_client_set_timeout($client_object, $timeout) {}

/**
 * @param $client_object
 */
function gearman_client_context($client_object) {}

/**
 * @param $client_object
 * @param $context
 */
function gearman_client_set_context($client_object, $context) {}

/**
 * @param $client_object
 * @param $host
 * @param $port
 */
function gearman_client_add_server($client_object, $host, $port) {}

/**
 * @param $client_object
 * @param $servers
 */
function gearman_client_add_servers($client_object, $servers) {}

/**
 * @param $client_object
 */
function gearman_client_wait($client_object) {}

/**
 * @param $client_object
 * @param $function_name
 * @param $workload
 * @param $unique
 */
function gearman_client_do($client_object, $function_name, $workload, $unique) {}

/**
 * @param $client_object
 * @param $function_name
 * @param $workload
 * @param $unique
 */
function gearman_client_do_high($client_object, $function_name, $workload, $unique) {}

/**
 * @param $client_object
 * @param string $function_name
 * @param string $workload
 * @param string $unique
 */
function gearman_client_do_normal($client_object, $function_name, $workload, $unique) {}

/**
 * @param $client_object
 * @param $function_name
 * @param $workload
 * @param $unique
 */
function gearman_client_do_low($client_object, $function_name, $workload, $unique) {}

/**
 * @param $client_object
 */
function gearman_client_do_job_handle($client_object) {}

/**
 * @param $client_object
 */
function gearman_client_do_status($client_object) {}

/**
 * @param $client_object
 * @param $function_name
 * @param $workload
 * @param $unique
 */
function gearman_client_do_background($client_object, $function_name, $workload, $unique) {}

/**
 * @param $client_object
 * @param $function_name
 * @param $workload
 * @param $unique
 */
function gearman_client_do_high_background($client_object, $function_name, $workload, $unique) {}

/**
 * @param $client_object
 * @param $function_name
 * @param $workload
 * @param $unique
 */
function gearman_client_do_low_background($client_object, $function_name, $workload, $unique) {}

/**
 * @param $client_object
 * @param $job_handle
 */
function gearman_client_job_status($client_object, $job_handle) {}

/**
 * @param $client_object
 * @param $workload
 */
function gearman_client_echo($client_object, $workload) {}

/**
 * @param $client_object
 * @param $function_name
 * @param $workload
 * @param $context
 * @param $unique
 */
function gearman_client_add_task($client_object, $function_name, $workload, $context, $unique) {}

/**
 * @param $client_object
 * @param $function_name
 * @param $workload
 * @param $context
 * @param $unique
 */
function gearman_client_add_task_high($client_object, $function_name, $workload, $context, $unique) {}

/**
 * @param $client_object
 * @param $function_name
 * @param $workload
 * @param $context
 * @param $unique
 */
function gearman_client_add_task_low($client_object, $function_name, $workload, $context, $unique) {}

/**
 * @param $client_object
 * @param $function_name
 * @param $workload
 * @param $context
 * @param $unique
 */
function gearman_client_add_task_background($client_object, $function_name, $workload, $context, $unique) {}

/**
 * @param $client_object
 * @param $function_name
 * @param $workload
 * @param $context
 * @param $unique
 */
function gearman_client_add_task_high_background($client_object, $function_name, $workload, $context, $unique) {}

/**
 * @param $client_object
 * @param $function_name
 * @param $workload
 * @param $context
 * @param $unique
 */
function gearman_client_add_task_low_background($client_object, $function_name, $workload, $context, $unique) {}

/**
 * @param $client_object
 * @param $job_handle
 * @param $context
 */
function gearman_client_add_task_status($client_object, $job_handle, $context) {}

/**
 * @param $client_object
 * @param $callback
 */
function gearman_client_set_workload_fn($client_object, $callback) {}

/**
 * @param $client_object
 * @param $callback
 */
function gearman_client_set_created_fn($client_object, $callback) {}

/**
 * @param $client_object
 * @param $callback
 */
function gearman_client_set_data_fn($client_object, $callback) {}

/**
 * @param $client_object
 * @param $callback
 */
function gearman_client_set_warning_fn($client_object, $callback) {}

/**
 * @param $client_object
 * @param $callback
 */
function gearman_client_set_status_fn($client_object, $callback) {}

/**
 * @param $client_object
 * @param $callback
 */
function gearman_client_set_complete_fn($client_object, $callback) {}

/**
 * @param $client_object
 * @param $callback
 */
function gearman_client_set_exception_fn($client_object, $callback) {}

/**
 * @param $client_object
 * @param $callback
 */
function gearman_client_set_fail_fn($client_object, $callback) {}

/**
 * @param $client_object
 */
function gearman_client_clear_fn($client_object) {}

/**
 * @param $data
 */
function gearman_client_run_tasks($data) {}

/**
 * @param $task_object
 */
function gearman_task_return_code($task_object) {}

/**
 * @param $task_object
 */
function gearman_task_function_name($task_object) {}

/**
 * @param $task_object
 */
function gearman_task_unique($task_object) {}

/**
 * @param $task_object
 */
function gearman_task_job_handle($task_object) {}

/**
 * @param $task_object
 */
function gearman_task_is_known($task_object) {}

/**
 * @param $task_object
 */
function gearman_task_is_running($task_object) {}

/**
 * @param $task_object
 */
function gearman_task_numerator($task_object) {}

/**
 * @param $task_object
 */
function gearman_task_denominator($task_object) {}

/**
 * @param $task_object
 * @param $data
 */
function gearman_task_send_workload($task_object, $data) {}

/**
 * @param $task_object
 */
function gearman_task_data($task_object) {}

/**
 * @param $task_object
 */
function gearman_task_data_size($task_object) {}

/**
 * @param $task_object
 * @param $data_len
 */
function gearman_task_recv_data($task_object, $data_len) {}

/**
 * @param $worker_object
 */
function gearman_worker_return_code($worker_object) {}

function gearman_worker_create() {}

/**
 * @param $worker_object
 */
function gearman_worker_clone($worker_object) {}

/**
 * @param $worker_object
 */
function gearman_worker_error($worker_object) {}

/**
 * @param $worker_object
 */
function gearman_worker_errno($worker_object) {}

/**
 * @param $worker_object
 */
function gearman_worker_options($worker_object) {}

/**
 * @param $worker_object
 * @param $option
 */
function gearman_worker_set_options($worker_object, $option) {}

/**
 * @param $worker_object
 * @param $option
 */
function gearman_worker_add_options($worker_object, $option) {}

/**
 * @param $worker_object
 * @param $option
 */
function gearman_worker_remove_options($worker_object, $option) {}

/**
 * @param $worker_object
 */
function gearman_worker_timeout($worker_object) {}

/**
 * @param $worker_object
 * @param $timeout
 */
function gearman_worker_set_timeout($worker_object, $timeout) {}

/**
 * @param $worker_object
 * @param $host
 * @param $port
 */
function gearman_worker_add_server($worker_object, $host, $port) {}

/**
 * @param $worker_object
 * @param $servers
 */
function gearman_worker_add_servers($worker_object, $servers) {}

/**
 * @param $worker_object
 */
function gearman_worker_wait($worker_object) {}

/**
 * @param $worker_object
 * @param $function_name
 * @param $timeout
 */
function gearman_worker_register($worker_object, $function_name, $timeout) {}

/**
 * @param $worker_object
 * @param $function_name
 */
function gearman_worker_unregister($worker_object, $function_name) {}

/**
 * @param $worker_object
 */
function gearman_worker_unregister_all($worker_object) {}

/**
 * @param $worker_object
 */
function gearman_worker_grab_job($worker_object) {}

/**
 * @param $worker_object
 * @param $function_name
 * @param $function
 * @param $data
 * @param $timeout
 */
function gearman_worker_add_function($worker_object, $function_name, $function, $data, $timeout) {}

/**
 * @param $worker_object
 */
function gearman_worker_work($worker_object) {}

/**
 * @param $worker_object
 * @param $workload
 */
function gearman_worker_echo($worker_object, $workload) {}

/**
 * @param $job_object
 */
function gearman_job_return_code($job_object) {}

/**
 * @param $job_object
 * @param $data
 */
function gearman_job_send_data($job_object, $data) {}

/**
 * @param $job_object
 * @param $warning
 */
function gearman_job_send_warning($job_object, $warning) {}

/**
 * @param $job_object
 * @param $numerator
 * @param $denominator
 */
function gearman_job_send_status($job_object, $numerator, $denominator) {}

/**
 * @param $job_object
 * @param $result
 */
function gearman_job_send_complete($job_object, $result) {}

/**
 * @param $job_object
 * @param $exception
 */
function gearman_job_send_exception($job_object, $exception) {}

/**
 * @param $job_object
 */
function gearman_job_send_fail($job_object) {}

/**
 * Get the job handle
 * @param $job_object
 */
function gearman_job_handle($job_object) {}

/**
 * @param $job_object
 */
function gearman_job_function_name($job_object) {}

/**
 * @param $job_object
 */
function gearman_job_unique($job_object) {}

/**
 * @param $job_object
 */
function gearman_job_workload($job_object) {}

/**
 * @param $job_object
 */
function gearman_job_workload_size($job_object) {}

/**
 * Class: GearmanClient
 */
class GearmanClient
{
    /**
     * Creates a GearmanClient instance representing a client that connects to the job
     * server and submits tasks to complete.
     *
     * @link https://php.net/manual/en/gearmanclient.construct.php
     */
    public function __construct() {}

    /**
     * Returns the last Gearman return code.
     *
     * @link https://php.net/manual/en/gearmanclient.returncode.php
     * @return int A valid Gearman return code
     */
    public function returnCode() {}

    /**
     * Returns an error string for the last error encountered.
     *
     * @link https://php.net/manual/en/gearmanclient.error.php
     * @return string A human readable error string
     */
    public function error() {}

    /**
     * Value of errno in the case of a GEARMAN_ERRNO return value.
     *
     * @link https://php.net/manual/en/gearmanclient.geterrno.php
     * @return int A valid Gearman errno
     */
    public function getErrno() {}

    public function options() {}

    /**
     * Sets one or more client options.
     *
     * @link https://php.net/manual/en/gearmanclient.setoptions.php
     * @param int $options The options to be set
     * @return bool Always returns true
     */
    public function setOptions($options) {}

    /**
     * Adds one or more options to those already set.
     *
     * @link https://php.net/manual/en/gearmanclient.addoptions.php
     * @param int $options The options to add
     * @return bool Always returns true
     */
    public function addOptions($options) {}

    /**
     * Removes (unsets) one or more options.
     *
     * @link https://php.net/manual/en/gearmanclient.removeoptions.php
     * @param int $options The options to be removed (unset)
     * @return bool Always returns true
     */
    public function removeOptions($options) {}

    /**
     * Returns the timeout in milliseconds to wait for I/O activity.
     *
     * @link https://php.net/manual/en/gearmanclient.timeout.php
     * @return int Timeout in milliseconds to wait for I/O activity. A negative value means an
     *         infinite timeout
     */
    public function timeout() {}

    /**
     * Sets the timeout for socket I/O activity.
     *
     * @link https://php.net/manual/en/gearmanclient.settimeout.php
     * @param int $timeout An interval of time in milliseconds
     * @return bool Always returns true
     */
    public function setTimeout($timeout) {}

    /**
     * Get the application context previously set with GearmanClient::setContext.
     *
     * @link https://php.net/manual/en/gearmanclient.context.php
     * @return string The same context data structure set with GearmanClient::setContext
     */
    public function context() {}

    /**
     * Sets an arbitrary string to provide application context that can later be
     * retrieved by GearmanClient::context.
     *
     * @link https://php.net/manual/en/gearmanclient.setcontext.php
     * @param string $context Arbitrary context data
     * @return bool Always returns true
     */
    public function setContext($context) {}

    /**
     * Adds a job server to a list of servers that can be used to run a task. No socket
     * I/O happens here; the server is simply added to the list.
     *
     * @link https://php.net/manual/en/gearmanclient.addserver.php
     * @param string $host
     * @param int $port
     * @return bool
     */
    public function addServer($host = '127.0.0.1', $port = 4730) {}

    /**
     * Adds a list of job servers that can be used to run a task. No socket I/O happens
     * here; the servers are simply added to the full list of servers.
     *
     * @link https://php.net/manual/en/gearmanclient.addservers.php
     * @param string $servers A comma-separated list of servers, each server specified
     *        in the format host:port
     * @return bool
     */
    public function addServers($servers = '127.0.0.1:4730') {}

    public function wait() {}

    /**
     * Runs a single high priority task and returns a string representation of the
     * result. It is up to the GearmanClient and GearmanWorker to agree on the format
     * of the result. High priority tasks will get precedence over normal and low
     * priority tasks in the job queue.
     *
     * @link https://php.net/manual/en/gearmanclient.dohigh.php
     * @param string $function_name
     * @param string $workload
     * @param string $unique
     * @return string A string representing the results of running a task
     */
    public function doHigh($function_name, $workload, $unique = null) {}

    /**
     * Runs a single task and returns a string representation of the
     * result. It is up to the GearmanClient and GearmanWorker to agree on the format
     * of the result. Normal and high priority tasks will get precedence over low
     * priority tasks in the job queue.
     *
     * @link https://php.net/manual/en/gearmanclient.dolow.php
     * @param string $function_name
     * @param string $workload
     * @param string $unique
     * @return string A string representing the results of running a task
     */
    public function doNormal($function_name, $workload, $unique = null) {}

    /**
     * Runs a single low priority task and returns a string representation of the
     * result. It is up to the GearmanClient and GearmanWorker to agree on the format
     * of the result. Normal and high priority tasks will get precedence over low
     * priority tasks in the job queue.
     *
     * @link https://php.net/manual/en/gearmanclient.dolow.php
     * @param string $function
     * @param string $workload
     * @param string|null $unique
     * @return string A string representing the results of running a task
     */
    public function doLow($function, $workload, $unique = null) {}

    /**
     * Gets that job handle for a running task. This should be used between repeated
     * GearmanClient::do calls. The job handle can then be used to get information on
     * the task.
     *
     * @link https://php.net/manual/en/gearmanclient.dojobhandle.php
     * @return string The job handle for the running task
     */
    public function doJobHandle() {}

    /**
     * Returns the status for the running task. This should be used between repeated
     * GearmanClient::do calls.
     *
     * @link https://php.net/manual/en/gearmanclient.dostatus.php
     * @return array An array representing the percentage completion given as a fraction, with
     *         the first element the numerator and the second element the denomintor
     */
    public function doStatus() {}

    /**
     * Runs a task in the background, returning a job handle which can be used to get
     * the status of the running task.
     *
     * @link https://php.net/manual/en/gearmanclient.dobackground.php
     * @param string $function
     * @param string $workload
     * @param string|null $unique
     * @return string The job handle for the submitted task
     */
    public function doBackground($function, $workload, $unique = null) {}

    /**
     * Runs a high priority task in the background, returning a job handle which can be
     * used to get the status of the running task. High priority tasks take precedence
     * over normal and low priority tasks in the job queue.
     *
     * @link https://php.net/manual/en/gearmanclient.dohighbackground.php
     * @param string $function
     * @param string $workload
     * @param string|null $unique
     * @return string The job handle for the submitted task
     */
    public function doHighBackground($function, $workload, $unique = null) {}

    /**
     * Runs a low priority task in the background, returning a job handle which can be
     * used to get the status of the running task. Normal and high priority tasks take
     * precedence over low priority tasks in the job queue.
     *
     * @link https://php.net/manual/en/gearmanclient.dolowbackground.php
     * @param string $function
     * @param string $workload
     * @param string|null $unique
     * @return string The job handle for the submitted task
     */
    public function doLowBackground($function, $workload, $unique = null) {}

    /**
     * Object oriented style (method):.
     *
     * @link https://php.net/manual/en/gearmanclient.jobstatus.php
     * @param string $job_handle
     * @return array An array containing status information for the job corresponding to the
     *         supplied job handle. The first array element is a boolean indicating whether the
     *         job is even known, the second is a boolean indicating whether the job is still
     *         running, and the third and fourth elements correspond to the numerator and
     *         denominator of the fractional completion percentage, respectively
     */
    public function jobStatus($job_handle) {}

    /**
     * Adds a task to be run in parallel with other tasks. Call this method for all the
     * tasks to be run in parallel, then call GearmanClient::runTasks to perform the
     * work. Note that enough workers need to be available for the tasks to all run in
     * parallel.
     *
     * @link https://php.net/manual/en/gearmanclient.addtask.php
     * @param string $function_name
     * @param string $workload
     * @param mixed $context
     * @param string $unique
     * @return GearmanTask|false A GearmanTask object or false if the task could not be added
     */
    public function addTask($function_name, $workload, $context = null, $unique = null) {}

    /**
     * Adds a high priority task to be run in parallel with other tasks. Call this
     * method for all the high priority tasks to be run in parallel, then call
     * GearmanClient::runTasks to perform the work. Tasks with a high priority will be
     * selected from the queue before those of normal or low priority.
     *
     * @link https://php.net/manual/en/gearmanclient.addtaskhigh.php
     * @param string $function_name
     * @param string $workload
     * @param mixed $context
     * @param string $unique
     * @return GearmanTask|false A GearmanTask object or false if the task could not be added
     */
    public function addTaskHigh($function_name, $workload, $context = null, $unique = null) {}

    /**
     * Adds a low priority background task to be run in parallel with other tasks. Call
     * this method for all the tasks to be run in parallel, then call
     * GearmanClient::runTasks to perform the work. Tasks with a low priority will be
     * selected from the queue after those of normal or low priority.
     *
     * @link https://php.net/manual/en/gearmanclient.addtasklow.php
     * @param string $function_name
     * @param string $workload
     * @param mixed $context
     * @param string $unique
     * @return GearmanTask|false A GearmanTask object or false if the task could not be added
     */
    public function addTaskLow($function_name, $workload, $context = null, $unique = null) {}

    /**
     * Adds a background task to be run in parallel with other tasks. Call this method
     * for all the tasks to be run in parallel, then call GearmanClient::runTasks to
     * perform the work.
     *
     * @link https://php.net/manual/en/gearmanclient.addtaskbackground.php
     * @param string $function_name
     * @param string $workload
     * @param mixed $context
     * @param string $unique
     * @return GearmanTask|false A GearmanTask object or false if the task could not be added
     */
    public function addTaskBackground($function_name, $workload, $context = null, $unique = null) {}

    /**
     * Adds a high priority background task to be run in parallel with other tasks.
     * Call this method for all the tasks to be run in parallel, then call
     * GearmanClient::runTasks to perform the work. Tasks with a high priority will be
     * selected from the queue before those of normal or low priority.
     *
     * @link https://php.net/manual/en/gearmanclient.addtaskhighbackground.php
     * @param string $function_name
     * @param string $workload
     * @param mixed $context
     * @param string $unique
     * @return GearmanTask|false A GearmanTask object or false if the task could not be added
     */
    public function addTaskHighBackground($function_name, $workload, $context = null, $unique = null) {}

    /**
     * Adds a low priority background task to be run in parallel with other tasks. Call
     * this method for all the tasks to be run in parallel, then call
     * GearmanClient::runTasks to perform the work. Tasks with a low priority will be
     * selected from the queue after those of normal or high priority.
     *
     * @link https://php.net/manual/en/gearmanclient.addtasklowbackground.php
     * @param string $function_name
     * @param string $workload
     * @param mixed $context
     * @param string $unique
     * @return GearmanTask|false A GearmanTask object or false if the task could not be added
     */
    public function addTaskLowBackground($function_name, $workload, $context = null, $unique = null) {}

    /**
     * Used to request status information from the Gearman server, which will call the
     * specified status callback (set using GearmanClient::setStatusCallback).
     *
     * @link https://php.net/manual/en/gearmanclient.addtaskstatus.php
     * @param string $job_handle The job handle for the task to get status for
     * @param string $context Data to be passed to the status callback, generally a
     *        reference to an array or object
     * @return GearmanTask A GearmanTask object
     */
    public function addTaskStatus($job_handle, $context = null) {}

    /**
     * Sets a function to be called when a worker needs to send back data prior to job
     * completion. A worker can do this when it needs to send updates, send partial
     * results, or flush data during long running jobs. The callback should accept a
     * single argument, a GearmanTask object.
     *
     * @link https://php.net/manual/en/gearmanclient.setworkloadcallback.php
     * @param callable $callback A function to call
     * @return bool
     */
    public function setWorkloadCallback($callback) {}

    /**
     * Sets a function to be called when a task is received and queued by the Gearman
     * job server. The callback should accept a single argument, a GearmanClient oject.
     *
     * @link https://php.net/manual/en/gearmanclient.setcreatedcallback.php
     * @param string $callback A function to call
     * @return bool
     */
    public function setCreatedCallback($callback) {}

    /**
     * Sets the callback function for accepting data packets for a task. The callback
     * function should take a single argument, a GearmanTask object.
     *
     * @link https://php.net/manual/en/gearmanclient.setdatacallback.php
     * @param callable $callback A function or method to call
     * @return bool
     */
    public function setDataCallback($callback) {}

    /**
     * Sets a function to be called when a worker sends a warning. The callback should
     * accept a single argument, a GearmanTask object.
     *
     * @link https://php.net/manual/en/gearmanclient.setwarningcallback.php
     * @param callable $callback A function to call
     * @return bool
     */
    public function setWarningCallback($callback) {}

    /**
     * Sets a callback function used for getting updated status information from a
     * worker. The function should accept a single argument, a GearmanTask object.
     *
     * @link https://php.net/manual/en/gearmanclient.setstatuscallback.php
     * @param callable $callback A function to call
     * @return bool
     */
    public function setStatusCallback($callback) {}

    /**
     * Use to set a function to be called when a task is completed. The callback
     * function should accept a single argument, a GearmanTask oject.
     *
     * @link https://php.net/manual/en/gearmanclient.setcompletecallback.php
     * @param callable $callback A function to be called
     * @return bool
     */
    public function setCompleteCallback($callback) {}

    /**
     * Specifies a function to call when a worker for a task sends an exception.
     *
     * @link https://php.net/manual/en/gearmanclient.setexceptioncallback.php
     * @param callable $callback Function to call when the worker throws an exception
     * @return bool
     */
    public function setExceptionCallback($callback) {}

    /**
     * Sets the callback function to be used when a task does not complete
     * successfully. The function should accept a single argument, a GearmanTask object.
     *
     * @link https://php.net/manual/en/gearmanclient.setfailcallback.php
     * @param callable $callback A function to call
     * @return bool
     */
    public function setFailCallback($callback) {}

    /**
     * Clears all the task callback functions that have previously been set.
     *
     * @link https://php.net/manual/en/gearmanclient.clearcallbacks.php
     * @return bool Always returns true
     */
    public function clearCallbacks() {}

    /**
     * For a set of tasks previously added with GearmanClient::addTask,
     * GearmanClient::addTaskHigh, GearmanClient::addTaskLow,
     * GearmanClient::addTaskBackground, GearmanClient::addTaskHighBackground, or
     * GearmanClient::addTaskLowBackground, this call starts running the tasks in
     * parallel.
     *
     * @link https://php.net/manual/en/gearmanclient.runtasks.php
     * @return bool
     */
    public function runTasks() {}

    /**
     * Sends some arbitrary data to all job servers to see if they echo it back.
     * The data sent is not used or processed in any other way. Primarily used for testing and debugging.
     *
     * @link https://php.net/manual/en/gearmanclient.ping.php
     * @param string $workload
     * @return bool
     */
    public function ping($workload) {}
}

/**
 * Class: GearmanTask
 */
class GearmanTask
{
    /**
     * Returns the last Gearman return code for this task.
     *
     * @link https://php.net/manual/en/gearmantask.returncode.php
     * @return int A valid Gearman return code
     */
    public function returnCode() {}

    /**
     * Returns the name of the function this task is associated with, i.e., the
     * function the Gearman worker calls.
     *
     * @link https://php.net/manual/en/gearmantask.functionname.php
     * @return string A function name
     */
    public function functionName() {}

    /**
     * Returns the unique identifier for this task. This is assigned by the
     * GearmanClient, as opposed to the job handle which is set by the Gearman job
     * server.
     *
     * @link https://php.net/manual/en/gearmantask.unique.php
     * @return string|false The unique identifier, or false if no identifier is assigned
     */
    public function unique() {}

    /**
     * Returns the job handle for this task.
     *
     * @link https://php.net/manual/en/gearmantask.jobhandle.php
     * @return string The opaque job handle
     */
    public function jobHandle() {}

    /**
     * Gets the status information for whether or not this task is known to the job
     * server.
     *
     * @link https://php.net/manual/en/gearmantask.isknown.php
     * @return bool true if the task is known, false otherwise
     */
    public function isKnown() {}

    /**
     * Indicates whether or not this task is currently running.
     *
     * @link https://php.net/manual/en/gearmantask.isrunning.php
     * @return bool true if the task is running, false otherwise
     */
    public function isRunning() {}

    /**
     * Returns the numerator of the percentage of the task that is complete expressed
     * as a fraction.
     *
     * @link https://php.net/manual/en/gearmantask.tasknumerator.php
     * @return int|false A number between 0 and 100, or false if cannot be determined
     */
    public function taskNumerator() {}

    /**
     * Returns the denominator of the percentage of the task that is complete expressed
     * as a fraction.
     *
     * @link https://php.net/manual/en/gearmantask.taskdenominator.php
     * @return int|false A number between 0 and 100, or false if cannot be determined
     */
    public function taskDenominator() {}

    /**
     * .
     *
     * @link https://php.net/manual/en/gearmantask.sendworkload.php
     * @param string $data Data to send to the worker
     * @return int|false The length of data sent, or false if the send failed
     */
    public function sendWorkload($data) {}

    /**
     * Returns data being returned for a task by a worker.
     *
     * @link https://php.net/manual/en/gearmantask.data.php
     * @return string|false The serialized data, or false if no data is present
     */
    public function data() {}

    /**
     * Returns the size of the data being returned for a task.
     *
     * @link https://php.net/manual/en/gearmantask.datasize.php
     * @return int|false The data size, or false if there is no data
     */
    public function dataSize() {}

    /**
     * .
     *
     * @link https://php.net/manual/en/gearmantask.recvdata.php
     * @param int $data_len Length of data to be read
     * @return array|false An array whose first element is the length of data read and the second is
     *         the data buffer. Returns false if the read failed
     */
    public function recvData($data_len) {}
}

/**
 * Class: GearmanWorker
 */
class GearmanWorker
{
    /**
     * Creates a GearmanWorker instance representing a worker that connects to the job
     * server and accepts tasks to run.
     *
     * @link https://php.net/manual/en/gearmanworker.construct.php
     */
    public function __construct() {}

    /**
     * Returns the last Gearman return code.
     *
     * @link https://php.net/manual/en/gearmanworker.returncode.php
     * @return int A valid Gearman return code
     */
    public function returnCode() {}

    /**
     * Returns an error string for the last error encountered.
     *
     * @link https://php.net/manual/en/gearmanworker.error.php
     * @return string An error string
     */
    public function error() {}

    /**
     * Returns the value of errno in the case of a GEARMAN_ERRNO return value.
     *
     * @link https://php.net/manual/en/gearmanworker.geterrno.php
     * @return int A valid errno
     */
    public function getErrno() {}

    /**
     * Gets the options previously set for the worker.
     *
     * @link https://php.net/manual/en/gearmanworker.options.php
     * @return int The options currently set for the worker
     */
    public function options() {}

    /**
     * Sets one or more options to the supplied value.
     *
     * @link https://php.net/manual/en/gearmanworker.setoptions.php
     * @param int $option The options to be set
     * @return bool Always returns true
     */
    public function setOptions($option) {}

    /**
     * Adds one or more options to the options previously set.
     *
     * @link https://php.net/manual/en/gearmanworker.addoptions.php
     * @param int $option The options to be added
     * @return bool Always returns true
     */
    public function addOptions($option) {}

    /**
     * Removes (unsets) one or more worker options.
     *
     * @link https://php.net/manual/en/gearmanworker.removeoptions.php
     * @param int $option The options to be removed (unset)
     * @return bool Always returns true
     */
    public function removeOptions($option) {}

    /**
     * Returns the current time to wait, in milliseconds, for socket I/O activity.
     *
     * @link https://php.net/manual/en/gearmanworker.timeout.php
     * @return int A time period is milliseconds. A negative value indicates an infinite
     *         timeout
     */
    public function timeout() {}

    /**
     * Sets the interval of time to wait for socket I/O activity.
     *
     * @link https://php.net/manual/en/gearmanworker.settimeout.php
     * @param int $timeout An interval of time in milliseconds. A negative value
     *        indicates an infinite timeout
     * @return bool Always returns true
     */
    public function setTimeout($timeout) {}

    /**
     * Give the worker an identifier so it can be tracked when asking gearmand for
     * the list of available workers.
     *
     * @link https://php.net/manual/en/gearmanworker.setid.php
     * @param string $id A string identifier
     * @return bool Returns TRUE on success or FALSE on failure
     */
    public function setId($id) {}

    /**
     * Adds a job server to this worker. This goes into a list of servers than can be
     * used to run jobs. No socket I/O happens here.
     *
     * @link https://php.net/manual/en/gearmanworker.addserver.php
     * @param string $host
     * @param int $port
     * @return bool
     */
    public function addServer($host = '127.0.0.1', $port = 4730) {}

    /**
     * Adds one or more job servers to this worker. These go into a list of servers
     * that can be used to run jobs. No socket I/O happens here.
     *
     * @link https://php.net/manual/en/gearmanworker.addservers.php
     * @param string $servers A comma separated list of job servers in the format
     *        host:port. If no port is specified, it defaults to 4730
     * @return bool
     */
    public function addServers($servers = '127.0.0.1:4730') {}

    /**
     * Causes the worker to wait for activity from one of the Gearman job servers when
     * operating in non-blocking I/O mode. On failure, issues a E_WARNING with the last
     * Gearman error encountered.
     *
     * @link https://php.net/manual/en/gearmanworker.wait.php
     * @return bool
     */
    public function wait() {}

    /**
     * Registers a function name with the job server with an optional timeout. The
     * timeout specifies how many seconds the server will wait before marking a job as
     * failed. If the timeout is set to zero, there is no timeout.
     *
     * @link https://php.net/manual/en/gearmanworker.register.php
     * @param string $function_name The name of a function to register with the job
     *        server
     * @param int $timeout An interval of time in seconds
     * @return bool A standard Gearman return value
     */
    public function register($function_name, $timeout) {}

    /**
     * Unregisters a function name with the job servers ensuring that no more jobs (for
     * that function) are sent to this worker.
     *
     * @link https://php.net/manual/en/gearmanworker.unregister.php
     * @param string $function_name The name of a function to register with the job
     *        server
     * @return bool A standard Gearman return value
     */
    public function unregister($function_name) {}

    /**
     * Unregisters all previously registered functions, ensuring that no more jobs are
     * sent to this worker.
     *
     * @link https://php.net/manual/en/gearmanworker.unregisterall.php
     * @return bool A standard Gearman return value
     */
    public function unregisterAll() {}

    public function grabJob() {}

    /**
     * Registers a function name with the job server and specifies a callback
     * corresponding to that function. Optionally specify extra application context
     * data to be used when the callback is called and a timeout.
     *
     * @link https://php.net/manual/en/gearmanworker.addfunction.php
     * @param string $function_name The name of a function to register with the job
     *        server
     * @param callable $function A callback that gets called when a job for the
     *        registered function name is submitted
     * @param mixed $context A reference to arbitrary application context data that can
     *        be modified by the worker function
     * @param int $timeout An interval of time in seconds
     * @return bool
     */
    public function addFunction($function_name, $function, $context = null, $timeout = 0) {}

    /**
     * Waits for a job to be assigned and then calls the appropriate callback function.
     * Issues an E_WARNING with the last Gearman error if the return code is not one of
     * GEARMAN_SUCCESS, GEARMAN_IO_WAIT, or GEARMAN_WORK_FAIL.
     *
     * @link https://php.net/manual/en/gearmanworker.work.php
     * @return bool
     */
    public function work() {}
}

/**
 * Class: GearmanJob
 */
class GearmanJob
{
    /**
     * Returns the last return code issued by the job server.
     *
     * @link https://php.net/manual/en/gearmanjob.returncode.php
     * @return int A valid Gearman return code
     */
    public function returnCode() {}

    /**
     * Sets the return value for this job, indicates how the job completed.
     *
     * @link https://php.net/manual/en/gearmanjob.setreturn.php
     * @param int $gearman_return_t A valid Gearman return value
     * @return bool Description
     */
    public function setReturn($gearman_return_t) {}

    /**
     * Sends data to the job server (and any listening clients) for this job.
     *
     * @link https://php.net/manual/en/gearmanjob.senddata.php
     * @param string $data Arbitrary serialized data
     * @return bool
     */
    public function sendData($data) {}

    /**
     * Sends a warning for this job while it is running.
     *
     * @link https://php.net/manual/en/gearmanjob.sendwarning.php
     * @param string $warning A warning messages
     * @return bool
     */
    public function sendWarning($warning) {}

    /**
     * Sends status information to the job server and any listening clients. Use this
     * to specify what percentage of the job has been completed.
     *
     * @link https://php.net/manual/en/gearmanjob.sendstatus.php
     * @param int $numerator The numerator of the percentage completed expressed as a
     *        fraction
     * @param int $denominator The denominator of the percentage completed expressed as
     *        a fraction
     * @return bool
     */
    public function sendStatus($numerator, $denominator) {}

    /**
     * Sends result data and the complete status update for this job.
     *
     * @link https://php.net/manual/en/gearmanjob.sendcomplete.php
     * @param string $result Serialized result data
     * @return bool
     */
    public function sendComplete($result) {}

    /**
     * Sends the supplied exception when this job is running.
     *
     * @link https://php.net/manual/en/gearmanjob.sendexception.php
     * @param string $exception An exception description
     * @return bool
     */
    public function sendException($exception) {}

    /**
     * Sends failure status for this job, indicating that the job failed in a known way
     * (as opposed to failing due to a thrown exception).
     *
     * @link https://php.net/manual/en/gearmanjob.sendfail.php
     * @return bool
     */
    public function sendFail() {}

    /**
     * Returns the opaque job handle assigned by the job server.
     *
     * @link https://php.net/manual/en/gearmanjob.handle.php
     * @return string An opaque job handle
     */
    public function handle() {}

    /**
     * Returns the function name for this job. This is the function the work will
     * execute to perform the job.
     *
     * @link https://php.net/manual/en/gearmanjob.functionname.php
     * @return string The name of a function
     */
    public function functionName() {}

    /**
     * Returns the unique identifiter for this job. The identifier is assigned by the
     * client.
     *
     * @link https://php.net/manual/en/gearmanjob.unique.php
     * @return string An opaque unique identifier
     */
    public function unique() {}

    /**
     * Returns the workload for the job. This is serialized data that is to be
     * processed by the worker.
     *
     * @link https://php.net/manual/en/gearmanjob.workload.php
     * @return string Serialized data
     */
    public function workload() {}

    /**
     * Returns the size of the job's work load (the data the worker is to process) in
     * bytes.
     *
     * @link https://php.net/manual/en/gearmanjob.workloadsize.php
     * @return int The size in bytes
     */
    public function workloadSize() {}
}

/**
 * Class: GearmanException
 */
class GearmanException extends Exception {}
<?php

declare(strict_types=1);

/**
 * Gets the current Swoole version. This information is also available in the predefined constant SWOOLE_VERSION.
 *
 * @return string returns a string containing the version of Swoole
 */
function swoole_version() {}

/**
 * Gets the number of CPU cores.
 *
 * @return int returns the number of CPU cores
 */
function swoole_cpu_num() {}

/**
 * @return mixed
 */
function swoole_last_error() {}

/**
 * @param $domain_name[required]
 * @param $timeout[optional]
 * @param $type[optional]
 * @return mixed
 */
function swoole_async_dns_lookup_coro($domain_name, $timeout = null, $type = null) {}

/**
 * @param $settings[required]
 * @return mixed
 */
function swoole_async_set($settings) {}

/**
 * @return int|false
 */
function swoole_coroutine_create(callable $func, ...$params) {}

/**
 * Defers the execution of a callback function until the surrounding function of a coroutine returns.
 *
 * @return void
 * @example
 * <pre>
 * swoole_coroutine_create(function () {  // The surrounding function of a coroutine.
 *   echo '1';
 *   swoole_coroutine_defer(function () { // The callback function to be deferred.
 *     echo '3';
 *   });
 *   echo '2';
 * });
 * <pre>
 */
function swoole_coroutine_defer(callable $callback) {}

/**
 * @param $domain[required]
 * @param $type[required]
 * @param $protocol[required]
 * @return mixed
 */
function swoole_coroutine_socketpair($domain, $type, $protocol) {}

/**
 * @param $count[optional]
 * @param $sleep_time[optional]
 * @return mixed
 */
function swoole_test_kernel_coroutine($count = null, $sleep_time = null) {}

/**
 * @param $read_array[required]
 * @param $write_array[required]
 * @param $error_array[required]
 * @param $timeout[optional]
 * @return mixed
 */
function swoole_client_select(&$read_array, &$write_array, &$error_array, $timeout = null) {}

/**
 * @param $read_array[required]
 * @param $write_array[required]
 * @param $error_array[required]
 * @param $timeout[optional]
 * @return mixed
 */
function swoole_select(&$read_array, &$write_array, &$error_array, $timeout = null) {}

/**
 * @param $process_name[required]
 * @return mixed
 */
function swoole_set_process_name($process_name) {}

/**
 * @return mixed
 */
function swoole_get_local_ip() {}

/**
 * @return mixed
 */
function swoole_get_local_mac() {}

/**
 * @param $errno[required]
 * @param $error_type[optional]
 * @return mixed
 */
function swoole_strerror($errno, $error_type = null) {}

/**
 * @return mixed
 */
function swoole_errno() {}

/**
 * @return mixed
 */
function swoole_clear_error() {}

/**
 * @return void
 */
function swoole_error_log(int $level, string $msg) {}

/**
 * @return void
 * @since 4.8.1
 */
function swoole_error_log_ex(int $level, int $error, string $msg) {}

/**
 * @return void
 * @since 4.8.1
 */
function swoole_ignore_error(int $error) {}

/**
 * @param $data[required]
 * @param $type[optional]
 * @return mixed
 */
function swoole_hashcode($data, $type = null) {}

/**
 * @param $suffix[required]
 * @param $mime_type[required]
 * @return mixed
 */
function swoole_mime_type_add($suffix, $mime_type) {}

/**
 * @param $suffix[required]
 * @param $mime_type[required]
 * @return mixed
 */
function swoole_mime_type_set($suffix, $mime_type) {}

/**
 * @param $suffix[required]
 * @return mixed
 */
function swoole_mime_type_delete($suffix) {}

/**
 * @param $filename[required]
 * @return mixed
 */
function swoole_mime_type_get($filename) {}

/**
 * @param $filename[required]
 * @return mixed
 */
function swoole_get_mime_type($filename) {}

/**
 * @param $filename[required]
 * @return mixed
 */
function swoole_mime_type_exists($filename) {}

/**
 * @return mixed
 */
function swoole_mime_type_list() {}

/**
 * @return mixed
 */
function swoole_clear_dns_cache() {}

/**
 * @param $str[required]
 * @param $offset[required]
 * @param $length[optional]
 * @param $options[optional]
 * @return mixed
 */
function swoole_substr_unserialize($str, $offset, $length = null, $options = null) {}

/**
 * @param $json[required]
 * @param $offset[required]
 * @param $length[optional]
 * @param $associative[optional]
 * @param $depth[optional]
 * @param $flags[optional]
 * @return mixed
 */
function swoole_substr_json_decode($json, $offset, $length = null, $associative = null, $depth = null, $flags = null) {}

/**
 * @return mixed
 */
function swoole_internal_call_user_shutdown_begin() {}

/**
 * Get all PHP objects of current call stack.
 *
 * @return array|false Return an array of objects back; return FALSE when no objects exist or when error happens.
 * @since 4.8.1
 */
function swoole_get_objects() {}

/**
 * Get status information of current call stack.
 *
 * @return array The array contains two fields: "object_num" (# of objects) and "resource_num" (# of resources).
 * @since 4.8.1
 */
function swoole_get_vm_status() {}

/**
 * @return array|false Return the specified object back; return FALSE when no object found or when error happens.
 * @since 4.8.1
 */
function swoole_get_object_by_handle(int $handle) {}

/**
 * This function is an alias of function swoole_coroutine_create(); it's available only when directive
 * "swoole.use_shortname" is not explicitly turned off.
 *
 * @return int|false
 * @see swoole_coroutine_create()
 */
function go(callable $func, ...$params) {}

/**
 * Defers the execution of a callback function until the surrounding function of a coroutine returns.
 *
 * This function is an alias of function swoole_coroutine_defer(); it's available only when directive
 * "swoole.use_shortname" is not explicitly turned off.
 *
 * @return void
 * @see swoole_coroutine_defer()
 *
 * @example
 * <pre>
 * go(function () {      // The surrounding function of a coroutine.
 *   echo '1';
 *   defer(function () { // The callback function to be deferred.
 *     echo '3';
 *   });
 *   echo '2';
 * });
 * <pre>
 */
function defer(callable $callback) {}

/**
 * @param $fd[required]
 * @param $read_callback[required]
 * @param $write_callback[optional]
 * @param $events[optional]
 * @return mixed
 */
function swoole_event_add($fd, $read_callback, $write_callback = null, $events = null) {}

/**
 * @param $fd[required]
 * @return mixed
 */
function swoole_event_del($fd) {}

/**
 * @param $fd[required]
 * @param $read_callback[optional]
 * @param $write_callback[optional]
 * @param $events[optional]
 * @return mixed
 */
function swoole_event_set($fd, $read_callback = null, $write_callback = null, $events = null) {}

/**
 * @param $fd[required]
 * @param $events[optional]
 * @return mixed
 */
function swoole_event_isset($fd, $events = null) {}

/**
 * @return mixed
 */
function swoole_event_dispatch() {}

/**
 * This function is an alias of method \Swoole\Event::defer().
 *
 * @return true
 * @see \Swoole\Event::defer()
 */
function swoole_event_defer(callable $callback) {}

/**
 * @param $callback[required]
 * @param $before[optional]
 * @return mixed
 */
function swoole_event_cycle($callback, $before = null) {}

/**
 * @param $fd[required]
 * @param $data[required]
 * @return mixed
 */
function swoole_event_write($fd, $data) {}

/**
 * @return mixed
 */
function swoole_event_wait() {}

/**
 * @return mixed
 */
function swoole_event_exit() {}

/**
 * This function is an alias of method \Swoole\Timer::set().
 *
 * @return void
 * @see \Swoole\Timer::set()
 */
function swoole_timer_set(array $settings) {}

/**
 * This function is an alias of method \Swoole\Timer::after().
 *
 * @return int
 * @see \Swoole\Timer::after()
 */
function swoole_timer_after(int $ms, callable $callback, ...$params) {}

/**
 * This function is an alias of method \Swoole\Timer::tick().
 *
 * @return int
 * @see \Swoole\Timer::tick()
 */
function swoole_timer_tick(int $ms, callable $callback, ...$params) {}

/**
 * This function is an alias of method \Swoole\Timer::exists().
 *
 * @return bool
 * @see \Swoole\Timer::exists()
 */
function swoole_timer_exists(int $timer_id) {}

/**
 * This function is an alias of method \Swoole\Timer::info().
 *
 * @return array
 * @see \Swoole\Timer::info()
 */
function swoole_timer_info(int $timer_id) {}

/**
 * This function is an alias of method \Swoole\Timer::stats().
 *
 * @return array
 * @see \Swoole\Timer::stats()
 */
function swoole_timer_stats() {}

/**
 * This function is an alias of method \Swoole\Timer::list().
 *
 * @return \Swoole\timer\Iterator
 * @see \Swoole\Timer::list()
 */
function swoole_timer_list() {}

/**
 * This function is an alias of method \Swoole\Timer::clear().
 *
 * @return bool
 * @see \Swoole\Timer::clear()
 */
function swoole_timer_clear(int $timer_id) {}

/**
 * This function is an alias of method \Swoole\Timer::clearAll().
 *
 * @return bool
 * @see \Swoole\Timer::clearAll()
 */
function swoole_timer_clear_all() {}
<?php

declare(strict_types=1);

namespace Swoole;

class ExitException extends Exception
{
    private $flags = 0;
    private $status = 0;

    /**
     * @return mixed
     */
    public function getFlags() {}

    /**
     * @return mixed
     */
    public function getStatus() {}
}
<?php

declare(strict_types=1);

namespace Swoole\WebSocket;

class CloseFrame extends Frame
{
    public $opcode = 8;
    public $code = 1000;
    public $reason = '';
}
<?php

declare(strict_types=1);

namespace Swoole\WebSocket;

class Server extends \Swoole\Http\Server
{
    /**
     * @param mixed $fd
     * @param mixed $data
     * @param mixed|null $opcode
     * @param mixed|null $flags
     * @return mixed
     */
    public function push($fd, $data, $opcode = null, $flags = null) {}

    /**
     * @param mixed $fd
     * @param mixed|null $code
     * @param mixed|null $reason
     * @return mixed
     */
    public function disconnect($fd, $code = null, $reason = null) {}

    /**
     * @param mixed $fd
     * @return mixed
     */
    public function isEstablished($fd) {}

    /**
     * @param mixed $data
     * @param mixed|null $opcode
     * @param mixed|null $flags
     * @return mixed
     */
    public static function pack($data, $opcode = null, $flags = null) {}

    /**
     * @param mixed $data
     * @return mixed
     */
    public static function unpack($data) {}
}
<?php

declare(strict_types=1);

namespace Swoole\WebSocket;

class Frame
{
    public $fd = 0;
    public $data = '';
    public $opcode = 1;
    public $flags = 1;
    public $finish;

    public function __toString(): string {}

    /**
     * @param mixed $data
     * @param mixed|null $opcode
     * @param mixed|null $flags
     * @return mixed
     */
    public static function pack($data, $opcode = null, $flags = null) {}

    /**
     * @param mixed $data
     * @return mixed
     */
    public static function unpack($data) {}
}
<?php

declare(strict_types=1);

namespace Swoole\Atomic;

class Long
{
    public function __construct(int $value = 0) {}

    /**
     * @return int
     */
    public function add(int $add_value = 1) {}

    /**
     * @return int
     */
    public function sub(int $sub_value = 1) {}

    /**
     * @return int
     */
    public function get() {}

    public function set(int $value) {}

    /**
     * @return bool
     */
    public function cmpset(int $cmp_value, int $new_value) {}
}
<?php

declare(strict_types=1);

namespace Swoole;

class Runtime
{
    /**
     * To enable/disable runtime hooks in coroutines.
     *
     * For backward-compatible reason, there are four different ways to call this method:
     *   #1. Swoole\Runtime::enableCoroutine();             // Enable runtime hooks represented by constant SWOOLE_HOOK_ALL.
     *   #2. Swoole\Runtime::enableCoroutine($flags);       // Enable specified runtime hooks.
     *   #3. Swoole\Runtime::enableCoroutine(true, $flags); // Enable specified runtime hooks.
     *   #4. Swoole\Runtime::enableCoroutine(false);        // Disable runtime hooks.
     * Following statements are of the same (when used to disable runtime hooks):
     *   Swoole\Runtime::enableCoroutine(0);       // #2
     *   Swoole\Runtime::enableCoroutine(true, 0); // #3
     *   Swoole\Runtime::enableCoroutine(false);   // #4
     *
     * @param int|bool $enable
     * @return bool TRUE on success, or FALSE on failure.
     */
    public static function enableCoroutine($enable = true, int $flags = SWOOLE_HOOK_ALL) {}

    /**
     * @return int
     */
    public static function getHookFlags() {}

    /**
     * @return bool true on success or false on failure
     */
    public static function setHookFlags(int $flags) {}
}
<?php

declare(strict_types=1);

namespace Swoole\Process;

class Pool
{
    public $master_pid = -1;
    public $workers;

    public function __construct($worker_num, $ipc_type = null, $msgqueue_key = null, $enable_coroutine = null) {}

    public function __destruct() {}

    /**
     * @return mixed
     */
    public function set(array $settings) {}

    /**
     * @param mixed $event_name
     * @return mixed
     */
    public function on($event_name, callable $callback) {}

    /**
     * @param mixed|null $worker_id
     * @return mixed
     */
    public function getProcess($worker_id = null) {}

    /**
     * @param mixed $host
     * @param mixed|null $port
     * @param mixed|null $backlog
     * @return mixed
     */
    public function listen($host, $port = null, $backlog = null) {}

    /**
     * @param mixed $data
     * @return mixed
     */
    public function write($data) {}

    /**
     * @return mixed
     */
    public function detach() {}

    /**
     * @return mixed
     */
    public function start() {}

    /**
     * @return mixed
     */
    public function stop() {}

    /**
     * @return mixed
     */
    public function shutdown() {}
}
<?php

declare(strict_types=1);

namespace Swoole;

class Lock
{
    public const FILELOCK = 2;
    public const MUTEX = 3;
    public const SEM = 4;
    public const RWLOCK = 1;
    public const SPINLOCK = 5;
    public $errCode = 0;

    public function __construct(int $type = self::MUTEX, string $filename = '') {}

    /**
     * @return bool
     */
    public function lock() {}

    /**
     * @return bool
     */
    public function lockwait(float $timeout = 1.0) {}

    /**
     * @return bool
     */
    public function trylock() {}

    /**
     * @return bool
     */
    public function lock_read() {}

    /**
     * @return bool
     */
    public function trylock_read() {}

    /**
     * @return bool
     */
    public function unlock() {}

    public function destroy() {}
}
<?php

declare(strict_types=1);

namespace Swoole\Http;

class Response
{
    public $fd = 0;
    public $socket;
    public $header;
    public $cookie;
    public $trailer;

    public function __destruct() {}

    /**
     * @return mixed
     */
    public function initHeader() {}

    /**
     * @return mixed
     */
    public function isWritable() {}

    /**
     * @param mixed $name
     * @param mixed|null $value
     * @param mixed|null $expires
     * @param mixed|null $path
     * @param mixed|null $domain
     * @param mixed|null $secure
     * @param mixed|null $httponly
     * @param mixed|null $samesite
     * @param mixed|null $priority
     * @return mixed
     */
    public function cookie($name, $value = null, $expires = null, $path = null, $domain = null, $secure = null, $httponly = null, $samesite = null, $priority = null) {}

    /**
     * @param mixed $name
     * @param mixed|null $value
     * @param mixed|null $expires
     * @param mixed|null $path
     * @param mixed|null $domain
     * @param mixed|null $secure
     * @param mixed|null $httponly
     * @param mixed|null $samesite
     * @param mixed|null $priority
     * @return mixed
     */
    public function setCookie($name, $value = null, $expires = null, $path = null, $domain = null, $secure = null, $httponly = null, $samesite = null, $priority = null) {}

    /**
     * @param mixed $name
     * @param mixed|null $value
     * @param mixed|null $expires
     * @param mixed|null $path
     * @param mixed|null $domain
     * @param mixed|null $secure
     * @param mixed|null $httponly
     * @param mixed|null $samesite
     * @param mixed|null $priority
     * @return mixed
     */
    public function rawcookie($name, $value = null, $expires = null, $path = null, $domain = null, $secure = null, $httponly = null, $samesite = null, $priority = null) {}

    /**
     * @param mixed $http_code
     * @param mixed|null $reason
     * @return mixed
     */
    public function status($http_code, $reason = null) {}

    /**
     * @param mixed $http_code
     * @param mixed|null $reason
     * @return mixed
     */
    public function setStatusCode($http_code, $reason = null) {}

    /**
     * @param mixed $key
     * @param mixed $value
     * @param mixed|null $format
     * @return mixed
     */
    public function header($key, $value, $format = null) {}

    /**
     * @param mixed $key
     * @param mixed $value
     * @param mixed|null $format
     * @return mixed
     */
    public function setHeader($key, $value, $format = null) {}

    /**
     * @param mixed $key
     * @param mixed $value
     * @return mixed
     */
    public function trailer($key, $value) {}

    /**
     * @return mixed
     */
    public function ping() {}

    /**
     * @return mixed
     */
    public function goaway() {}

    /**
     * @param mixed $content
     * @return mixed
     */
    public function write($content) {}

    /**
     * @param mixed|null $content
     * @return mixed
     */
    public function end($content = null) {}

    /**
     * @param mixed $filename
     * @param mixed|null $offset
     * @param mixed|null $length
     * @return mixed
     */
    public function sendfile($filename, $offset = null, $length = null) {}

    /**
     * @param mixed $location
     * @param mixed|null $http_code
     * @return mixed
     */
    public function redirect($location, $http_code = null) {}

    /**
     * @return mixed
     */
    public function detach() {}

    /**
     * @param mixed $server
     * @param mixed|null $fd
     * @return mixed
     */
    public static function create($server, $fd = null) {}

    /**
     * @return mixed
     */
    public function upgrade() {}

    /**
     * @param mixed $data
     * @param mixed|null $opcode
     * @param mixed|null $flags
     * @return mixed
     */
    public function push($data, $opcode = null, $flags = null) {}

    /**
     * @return mixed
     */
    public function recv() {}

    /**
     * @return mixed
     */
    public function close() {}
}
<?php

declare(strict_types=1);

namespace Swoole\Http;

class Request
{
    public $fd = 0;
    public $streamId = 0;
    public $header;
    public $server;
    public $cookie;
    public $get;
    public $files;
    public $post;
    public $tmpfiles;

    public function __destruct() {}

    /**
     * Get the request content, kind of like function call fopen('php://input').
     *
     * This method has an alias of \Swoole\Http\Request::rawContent().
     *
     * @return string|false Return the request content back; return FALSE when error happens.
     * @see \Swoole\Http\Request::rawContent()
     * @since 4.5.0
     */
    public function getContent() {}

    /**
     * Get the request content, kind of like function call fopen('php://input').
     *
     * Alias of method \Swoole\Http\Request::getContent().
     *
     * @return string|false Return the request content back; return FALSE when error happens.
     * @see \Swoole\Http\Request::getContent()
     */
    public function rawContent() {}

    /**
     * @return mixed
     */
    public function getData() {}

    /**
     * @param mixed|null $options
     * @return mixed
     */
    public static function create($options = null) {}

    /**
     * @param mixed $data
     * @return mixed
     */
    public function parse($data) {}

    /**
     * @return mixed
     */
    public function isCompleted() {}

    /**
     * @return mixed
     */
    public function getMethod() {}
}
<?php

declare(strict_types=1);

namespace Swoole\Http;

class Server extends \Swoole\Server {}
<?php

declare(strict_types=1);

namespace Swoole\Timer;

/**
 * @see https://www.php.net/ArrayIterator
 */
class Iterator extends \ArrayIterator {}
<?php

declare(strict_types=1);

namespace Swoole;

class Timer
{
    /**
     * @return void
     */
    public static function set(array $settings) {}

    /**
     * @return int
     */
    public static function tick(int $ms, callable $callback, ...$params) {}

    /**
     * @return int
     */
    public static function after(int $ms, callable $callback, ...$params) {}

    /**
     * @return bool
     */
    public static function exists(int $timer_id) {}

    /**
     * @return array
     */
    public static function info(int $timer_id) {}

    /**
     * @return array
     */
    public static function stats() {}

    /**
     * @return \Swoole\timer\Iterator
     */
    public static function list() {}

    /**
     * @return bool
     */
    public static function clear(int $timer_id) {}

    /**
     * @return bool
     */
    public static function clearAll() {}
}
<?php

declare(strict_types=1);

namespace Swoole\Redis;

class Server extends \Swoole\Server
{
    /**
     * To return an ERR reply from the Redis server.
     *
     * @see \Swoole\Redis\Server::format()
     */
    public const ERROR = 0;

    /**
     * To return a NULL reply from the Redis server.
     *
     * When used as the 1st parameter "$type" in method \Swoole\Redis\Server::format(), there is no need to pass in the
     * 2nd parameter "$value".
     *
     * @see \Swoole\Redis\Server::format()
     */
    public const NIL = 1;

    /**
     * To return a Status reply from the Redis server.
     *
     * @see \Swoole\Redis\Server::format()
     */
    public const STATUS = 2;

    /**
     * To return an Integer reply from the Redis server.
     *
     * When used as the 1st parameter "$type" in method \Swoole\Redis\Server::format(), the 2nd parameter "$value" must
     * be an integer.
     *
     * @see \Swoole\Redis\Server::format()
     */
    public const INT = 3;

    /**
     * To return a String reply from the Redis server.
     *
     * When used as the 1st parameter "$type" in method \Swoole\Redis\Server::format(), the 2nd parameter "$value" must
     * be a string.
     *
     * @see \Swoole\Redis\Server::format()
     */
    public const STRING = 4;

    /**
     * To return a Set reply from the Redis server.
     *
     * When used as the 1st parameter "$type" in method \Swoole\Redis\Server::format(), the 2nd parameter "$value" must
     * be an array.
     *
     * @see \Swoole\Redis\Server::format()
     */
    public const SET = 5;

    /**
     * To return a Map reply from the Redis server.
     *
     * When used as the 1st parameter "$type" in method \Swoole\Redis\Server::format(), the 2nd parameter "$value" must
     * be an associative array.
     *
     * @see \Swoole\Redis\Server::format()
     */
    public const MAP = 6;

    /**
     * Set a handler (a callback function) to process a given Redis command.
     *
     * @return bool TRUE on success, or FALSE on failure.
     */
    public function setHandler(string $command, callable $callback) {}

    /**
     * @param string $command
     * @return callable|null Returns the callback function if defined, otherwise NULL.
     */
    public function getHandler($command) {}

    /**
     * Format a reply.
     *
     * @param mixed|null $value
     * @return string|false
     */
    public static function format(int $type, $value = null) {}
}
<?php

declare(strict_types=1);

namespace Swoole;

class Server
{
    public $setting;
    public $connections;
    public $host = '';
    public $port = 0;
    public $type = 0;
    public $mode = 0;
    public $ports;
    public $master_pid = 0;
    public $manager_pid = 0;
    public $worker_id = -1;
    public $taskworker = false;
    public $worker_pid = 0;
    public $stats_timer;

    /**
     * @var \Swoole\Coroutine\Http\Server
     * @since 4.8.0
     */
    public $admin_server;

    /**
     * @var callable
     */
    private $onStart;

    /**
     * @var callable
     * @since 4.8.0
     */
    private $onBeforeShutdown;

    /**
     * @var callable
     */
    private $onShutdown;

    /**
     * @var callable
     */
    private $onWorkerStart;

    /**
     * @var callable
     */
    private $onWorkerStop;

    /**
     * @var callable
     */
    private $onBeforeReload;

    /**
     * @var callable
     */
    private $onAfterReload;

    /**
     * @var callable
     */
    private $onWorkerExit;

    /**
     * @var callable
     */
    private $onWorkerError;

    /**
     * @var callable
     */
    private $onTask;

    /**
     * @var callable
     */
    private $onFinish;

    /**
     * @var callable
     */
    private $onManagerStart;

    /**
     * @var callable
     */
    private $onManagerStop;

    /**
     * @var callable
     */
    private $onPipeMessage;

    public function __construct($host, $port = null, $mode = null, $sock_type = null) {}

    public function __destruct() {}

    /**
     * @param mixed $host
     * @param mixed $port
     * @param mixed $sock_type
     * @return mixed
     */
    public function listen($host, $port, $sock_type) {}

    /**
     * @param mixed $host
     * @param mixed $port
     * @param mixed $sock_type
     * @return mixed
     */
    public function addlistener($host, $port, $sock_type) {}

    /**
     * @param mixed $event_name
     * @return mixed
     */
    public function on($event_name, callable $callback) {}

    /**
     * @param mixed $event_name
     * @return mixed
     */
    public function getCallback($event_name) {}

    /**
     * @return mixed
     */
    public function set(array $settings) {}

    /**
     * @return mixed
     */
    public function start() {}

    /**
     * @param mixed $fd
     * @param mixed $send_data
     * @param mixed|null $server_socket
     * @return mixed
     */
    public function send($fd, $send_data, $server_socket = null) {}

    /**
     * @param mixed $ip
     * @param mixed $port
     * @param mixed $send_data
     * @param mixed|null $server_socket
     * @return mixed
     */
    public function sendto($ip, $port, $send_data, $server_socket = null) {}

    /**
     * @param mixed $conn_fd
     * @param mixed $send_data
     * @return mixed
     */
    public function sendwait($conn_fd, $send_data) {}

    /**
     * @param mixed $fd
     * @return mixed
     */
    public function exists($fd) {}

    /**
     * @param mixed $fd
     * @return mixed
     */
    public function exist($fd) {}

    /**
     * @param mixed $fd
     * @param mixed|null $is_protected
     * @return mixed
     */
    public function protect($fd, $is_protected = null) {}

    /**
     * @param mixed $conn_fd
     * @param mixed $filename
     * @param mixed|null $offset
     * @param mixed|null $length
     * @return mixed
     */
    public function sendfile($conn_fd, $filename, $offset = null, $length = null) {}

    /**
     * @param mixed $fd
     * @param mixed|null $reset
     * @return mixed
     */
    public function close($fd, $reset = null) {}

    /**
     * @param mixed $fd
     * @return mixed
     */
    public function confirm($fd) {}

    /**
     * @param mixed $fd
     * @return mixed
     */
    public function pause($fd) {}

    /**
     * @param mixed $fd
     * @return mixed
     */
    public function resume($fd) {}

    /**
     * @param mixed $data
     * @param mixed|null $worker_id
     * @return mixed
     */
    public function task($data, $worker_id = null, ?callable $finish_callback = null) {}

    /**
     * @param mixed $data
     * @param mixed|null $timeout
     * @param mixed|null $worker_id
     * @return mixed
     */
    public function taskwait($data, $timeout = null, $worker_id = null) {}

    /**
     * @param mixed|null $timeout
     * @return mixed
     */
    public function taskWaitMulti(array $tasks, $timeout = null) {}

    /**
     * @param mixed|null $timeout
     * @return mixed
     */
    public function taskCo(array $tasks, $timeout = null) {}

    /**
     * @param mixed $data
     * @return mixed
     */
    public function finish($data) {}

    /**
     * @return mixed
     */
    public function reload() {}

    /**
     * @return mixed
     */
    public function shutdown() {}

    /**
     * @param mixed|null $worker_id
     * @return mixed
     */
    public function stop($worker_id = null) {}

    /**
     * @return mixed
     */
    public function getLastError() {}

    /**
     * @param mixed $reactor_id
     * @return mixed
     */
    public function heartbeat($reactor_id) {}

    /**
     * @param mixed $fd
     * @param mixed|null $reactor_id
     * @return mixed
     */
    public function getClientInfo($fd, $reactor_id = null) {}

    /**
     * @param mixed $start_fd
     * @param mixed|null $find_count
     * @return mixed
     */
    public function getClientList($start_fd, $find_count = null) {}

    /**
     * Get the ID of current worker (either an event worker or a task worker).
     *
     * @return int|false Returns the ID of current worker. Returns false if not called within a worker process (either
     *                   an event worker process or a task worker process).
     */
    public function getWorkerId() {}

    /**
     * Get the process ID of a given worker process (specified by a worker ID).
     *
     * @return int|false Returns the process ID of a given worker process (specified by a worker ID). If the worker ID
     *                   is a negative integer or not passed in, returns the process ID of current worker process.
     *                   Returns false if something wrong happens (e.g., the worker process doesn't exist, or an invalid
     *                   worker ID specified.).
     */
    public function getWorkerPid(int $worker_id = -1) {}

    /**
     * @param mixed|null $worker_id
     * @return mixed
     */
    public function getWorkerStatus($worker_id = null) {}

    /**
     * Run a customized command in a specified process of Swoole.
     *
     * @param mixed $data
     * @param bool $json_encode If the callback function of the command returns a JSON encoded string back, it can be decoded automatically by setting this parameter to TRUE.
     * @return mixed|false
     * @see \Swoole\Server::addCommand()
     * @since 4.8.0
     */
    public function command(string $name, int $process_id, int $process_type, $data, bool $json_decode = true) {}

    /**
     * Add a customized command.
     *
     * Commands can be added to the master process, the manager process, or worker processes. Commands can only be added
     * before the server is started.
     *
     * @param int $accepted_process_types One or multiple types of processes. e.g., "SWOOLE_SERVER_COMMAND_EVENT_WORKER | SWOOLE_SERVER_COMMAND_TASK_WORKER".
     * @param callable $callback The callback function should return a (serialized) string back.
     * @return bool TRUE if succeeds, otherwise FALSE.
     * @see \Swoole\Server::command()
     * @see SWOOLE_SERVER_COMMAND_MASTER
     * @see SWOOLE_SERVER_COMMAND_MANAGER
     * @see SWOOLE_SERVER_COMMAND_EVENT_WORKER
     * @see SWOOLE_SERVER_COMMAND_TASK_WORKER
     * @since 4.8.0
     */
    public function addCommand(string $name, int $accepted_process_types, callable $callback) {}

    /**
     * @return mixed
     */
    public function getManagerPid() {}

    /**
     * @return mixed
     */
    public function getMasterPid() {}

    /**
     * @param mixed $fd
     * @param mixed|null $reactor_id
     * @return mixed
     */
    public function connection_info($fd, $reactor_id = null) {}

    /**
     * @param mixed $start_fd
     * @param mixed|null $find_count
     * @return mixed
     */
    public function connection_list($start_fd, $find_count = null) {}

    /**
     * @param mixed $message
     * @param mixed $dst_worker_id
     * @return mixed
     */
    public function sendMessage($message, $dst_worker_id) {}

    /**
     * @param \Swoole\Process $process
     * @return int|false Return the ID of the process (\Swoole\Process::$id) back if succeeds; otherwise return FALSE.
     * @see \Swoole\Process::$id
     */
    public function addProcess(Process $process) {}

    /**
     * @return mixed
     */
    public function stats() {}

    /**
     * @param mixed|null $port
     * @return mixed
     */
    public function getSocket($port = null) {}

    /**
     * @param mixed $fd
     * @param mixed $uid
     * @return mixed
     */
    public function bind($fd, $uid) {}

    /**
     * Alias of method \Swoole\Timer::after().
     *
     * @return int
     * @see \Swoole\Timer::after()
     */
    public function after(int $ms, callable $callback, ...$params) {}

    /**
     * Alias of method \Swoole\Timer::tick().
     *
     * @return int
     * @see \Swoole\Timer::tick()
     */
    public function tick(int $ms, callable $callback, ...$params) {}

    /**
     * Alias of method \Swoole\Timer::clear().
     *
     * @return bool
     * @see \Swoole\Timer::clear()
     */
    public function clearTimer(int $timer_id) {}

    /**
     * Alias of method \Swoole\Event::defer().
     *
     * @return true
     * @see \Swoole\Event::defer()
     */
    public function defer(callable $callback) {}
}
<?php

declare(strict_types=1);

namespace Swoole\Server;

class StatusInfo
{
    public $worker_id = 0;
    public $worker_pid = 0;
    public $status = 0;
    public $exit_code = 0;
    public $signal = 0;
}
<?php

declare(strict_types=1);

namespace Swoole\Server;

class PipeMessage
{
    public $source_worker_id = 0;
    public $dispatch_time = 0;
    public $data;
}
<?php

declare(strict_types=1);

namespace Swoole\Server;

class Task
{
    public $data;
    public $dispatch_time = 0;
    public $id = -1;
    public $worker_id = -1;
    public $flags = 0;

    /**
     * @param mixed $data
     * @return mixed
     */
    public function finish($data) {}

    /**
     * @param mixed $data
     * @return mixed
     */
    public static function pack($data) {}
}
<?php

declare(strict_types=1);

namespace Swoole\Server;

class Event
{
    public $reactor_id = 0;
    public $fd = 0;
    public $dispatch_time = 0;
    public $data;
}
<?php

declare(strict_types=1);

namespace Swoole\Server;

class Port
{
    public $host;
    public $port = 0;
    public $type = 0;
    public $sock = -1;
    public $setting;
    public $connections;
    private $onConnect;
    private $onReceive;
    private $onClose;
    private $onPacket;
    private $onBufferFull;
    private $onBufferEmpty;
    private $onRequest;
    private $onHandShake;
    private $onOpen;
    private $onMessage;
    private $onDisconnect;

    private function __construct() {}

    public function __destruct() {}

    /**
     * @return mixed
     */
    public function set(array $settings) {}

    /**
     * @param mixed $event_name
     * @return mixed
     */
    public function on($event_name, callable $callback) {}

    /**
     * @param mixed $event_name
     * @return mixed
     */
    public function getCallback($event_name) {}

    /**
     * @return mixed
     */
    public function getSocket() {}
}
<?php

declare(strict_types=1);

namespace Swoole\Server;

class TaskResult
{
    public $task_id = 0;
    public $task_worker_id = 0;
    public $dispatch_time = 0;
    public $data;
}
<?php

declare(strict_types=1);

namespace Swoole\Server;

class Packet
{
    public $server_socket = 0;
    public $server_port = 0;
    public $dispatch_time = 0;
    public $address;
    public $port = 0;
}
<?php

declare(strict_types=1);

namespace Swoole\Connection;

class Iterator implements \Iterator, \ArrayAccess, \Countable
{
    public function __construct() {}

    public function __destruct() {}

    public function rewind(): void {}

    public function next(): void {}

    /**
     * @return mixed
     */
    public function current() {}

    /**
     * @return mixed
     */
    public function key() {}

    public function valid(): bool {}

    public function count(): int {}

    public function offsetExists($fd): bool {}

    /**
     * @param mixed $fd
     * @return mixed
     */
    public function offsetGet($fd) {}

    public function offsetSet($fd, $value): void {}

    public function offsetUnset($fd): void {}
}
<?php

declare(strict_types=1);

namespace Swoole;

class Process
{
    public const IPC_NOWAIT = 256;
    public const PIPE_MASTER = 1;
    public const PIPE_WORKER = 2;
    public const PIPE_READ = 3;
    public const PIPE_WRITE = 4;
    public $pipe;
    public $msgQueueId;
    public $msgQueueKey;

    /**
     * Process ID. This is to uniquely identify the process in the OS.
     *
     * @var int
     */
    public $pid;

    /**
     * ID of the process.
     *
     * In a Swoole program (e.g., a Swoole-based server), there are different types of processes, including event worker
     * processes, task worker processes, and user worker processes. This ID is to uniquely identify the process in the
     * running Swoole program.
     *
     * @var int
     */
    public $id;
    private $callback;

    public function __construct(callable $callback, $redirect_stdin_and_stdout = null, $pipe_type = null, $enable_coroutine = null) {}

    public function __destruct() {}

    /**
     * @param mixed|null $blocking
     * @return mixed
     */
    public static function wait($blocking = null) {}

    /**
     * @param mixed $signal_no
     * @param mixed $callback
     * @return mixed
     */
    public static function signal($signal_no, $callback) {}

    /**
     * @param mixed $usec
     * @param mixed|null $type
     * @return mixed
     */
    public static function alarm($usec, $type = null) {}

    /**
     * @param mixed $pid
     * @param mixed|null $signal_no
     * @return mixed
     */
    public static function kill($pid, $signal_no = null) {}

    /**
     * @param mixed|null $nochdir
     * @param mixed|null $noclose
     * @param mixed|null $pipes
     * @return mixed
     */
    public static function daemon($nochdir = null, $noclose = null, $pipes = null) {}

    /**
     * @param mixed $which
     * @param mixed $priority
     * @return mixed
     */
    public function setPriority($which, $priority) {}

    /**
     * @param mixed $which
     * @return mixed
     */
    public function getPriority($which) {}

    /**
     * @return mixed
     */
    public function set(array $settings) {}

    /**
     * @param mixed $seconds
     * @return mixed
     */
    public function setTimeout($seconds) {}

    /**
     * @param mixed $blocking
     * @return mixed
     */
    public function setBlocking($blocking) {}

    /**
     * @param mixed|null $key
     * @param mixed|null $mode
     * @param mixed|null $capacity
     * @return mixed
     */
    public function useQueue($key = null, $mode = null, $capacity = null) {}

    /**
     * @return mixed
     */
    public function statQueue() {}

    /**
     * @return mixed
     */
    public function freeQueue() {}

    /**
     * @return mixed
     */
    public function start() {}

    /**
     * @param mixed $data
     * @return mixed
     */
    public function write($data) {}

    /**
     * @return mixed
     */
    public function close() {}

    /**
     * @param mixed|null $size
     * @return mixed
     */
    public function read($size = null) {}

    /**
     * @param mixed $data
     * @return mixed
     */
    public function push($data) {}

    /**
     * @param mixed|null $size
     * @return mixed
     */
    public function pop($size = null) {}

    /**
     * @param mixed|null $exit_code
     * @return mixed
     */
    public function exit($exit_code = null) {}

    /**
     * @param mixed $exec_file
     * @param mixed $args
     * @return mixed
     */
    public function exec($exec_file, $args) {}

    /**
     * @return mixed
     */
    public function exportSocket() {}

    /**
     * @param mixed $process_name
     * @return mixed
     */
    public function name($process_name) {}
}
<?php

declare(strict_types=1);

namespace Swoole\Http2;

class Response
{
    public $streamId = 0;
    public $errCode = 0;
    public $statusCode = 0;
    public $pipeline = false;
    public $headers;
    public $set_cookie_headers;
    public $cookies;
    public $data;
}
<?php

declare(strict_types=1);

namespace Swoole\Http2;

class Request
{
    public $path = '/';
    public $method = 'GET';
    public $headers;
    public $cookies;
    public $data = '';
    public $pipeline = false;
}
<?php

declare(strict_types=1);

namespace Swoole;

class Error extends \Error {}
<?php

declare(strict_types=1);

namespace Swoole\Client;

class Exception extends \Swoole\Exception {}
<?php

declare(strict_types=1);

namespace Swoole;

class Exception extends \Exception {}
<?php

declare(strict_types=1);

namespace Swoole\Coroutine;

class Context extends \ArrayObject
{
    public const STD_PROP_LIST = 1;
    public const ARRAY_AS_PROPS = 2;
}
<?php

declare(strict_types=1);

namespace Swoole\Coroutine;

class MySQL
{
    public $serverInfo;
    public $sock = -1;
    public $connected = false;
    public $connect_errno = 0;
    public $connect_error = '';
    public $affected_rows = 0;
    public $insert_id = 0;
    public $error = '';
    public $errno = 0;

    public function __construct() {}

    public function __destruct() {}

    /**
     * @return mixed
     */
    public function getDefer() {}

    /**
     * @param mixed|null $defer
     * @return mixed
     */
    public function setDefer($defer = null) {}

    /**
     * @return mixed
     */
    public function connect(array $server_config = null) {}

    /**
     * @param mixed $sql
     * @param mixed|null $timeout
     * @return mixed
     */
    public function query($sql, $timeout = null) {}

    /**
     * @return mixed
     */
    public function fetch() {}

    /**
     * @return mixed
     */
    public function fetchAll() {}

    /**
     * @return mixed
     */
    public function nextResult() {}

    /**
     * @param mixed $query
     * @param mixed|null $timeout
     * @return mixed
     */
    public function prepare($query, $timeout = null) {}

    /**
     * @return mixed
     */
    public function recv() {}

    /**
     * @param mixed|null $timeout
     * @return mixed
     */
    public function begin($timeout = null) {}

    /**
     * @param mixed|null $timeout
     * @return mixed
     */
    public function commit($timeout = null) {}

    /**
     * @param mixed|null $timeout
     * @return mixed
     */
    public function rollback($timeout = null) {}

    /**
     * @param mixed $string
     * @param mixed|null $flags
     * @return mixed
     */
    public function escape($string, $flags = null) {}

    /**
     * @return mixed
     */
    public function close() {}
}
<?php

declare(strict_types=1);

namespace Swoole\Coroutine;

class Iterator extends \ArrayIterator
{
    public const STD_PROP_LIST = 1;
    public const ARRAY_AS_PROPS = 2;
}
<?php

declare(strict_types=1);

namespace Swoole\Coroutine\MySQL;

class Statement
{
    public $id = 0;
    public $affected_rows = 0;
    public $insert_id = 0;
    public $error = '';
    public $errno = 0;

    /**
     * @param mixed|null $params
     * @param mixed|null $timeout
     * @return mixed
     */
    public function execute($params = null, $timeout = null) {}

    /**
     * @param mixed|null $timeout
     * @return mixed
     */
    public function fetch($timeout = null) {}

    /**
     * @param mixed|null $timeout
     * @return mixed
     */
    public function fetchAll($timeout = null) {}

    /**
     * @param mixed|null $timeout
     * @return mixed
     */
    public function nextResult($timeout = null) {}

    /**
     * @param mixed|null $timeout
     * @return mixed
     */
    public function recv($timeout = null) {}

    /**
     * @return mixed
     */
    public function close() {}
}
<?php

declare(strict_types=1);

namespace Swoole\Coroutine\MySQL;

class Exception extends \Swoole\Exception {}
<?php

declare(strict_types=1);

namespace Swoole\Coroutine\Http;

class Server
{
    public $fd = -1;
    public $host;
    public $port = -1;
    public $ssl = false;
    public $settings;
    public $errCode = 0;
    public $errMsg = '';

    public function __construct($host, $port = null, $ssl = null, $reuse_port = null) {}

    public function __destruct() {}

    /**
     * @return mixed
     */
    public function set(array $settings) {}

    /**
     * @param mixed $pattern
     * @return mixed
     */
    public function handle($pattern, callable $callback) {}

    /**
     * @return mixed
     */
    public function start() {}

    /**
     * @return mixed
     */
    public function shutdown() {}

    /**
     * @return mixed
     */
    private function onAccept() {}
}
<?php

declare(strict_types=1);

namespace Swoole\Coroutine\Http\Client;

class Exception extends \Swoole\Exception {}
<?php

declare(strict_types=1);

namespace Swoole\Coroutine\Http;

class Client
{
    public $errCode = 0;
    public $errMsg = '';
    public $connected = false;
    public $host = '';
    public $port = 0;
    public $ssl = false;
    public $setting;
    public $requestMethod;
    public $requestHeaders;
    public $requestBody;
    public $uploadFiles;
    public $downloadFile;
    public $downloadOffset = 0;
    public $statusCode = 0;
    public $headers;
    public $set_cookie_headers;
    public $cookies;
    public $body = '';

    public function __construct($host, $port = null, $ssl = null) {}

    public function __destruct() {}

    /**
     * @return mixed
     */
    public function set(array $settings) {}

    /**
     * @return mixed
     */
    public function getDefer() {}

    /**
     * @param mixed|null $defer
     * @return mixed
     */
    public function setDefer($defer = null) {}

    /**
     * @param mixed $method
     * @return mixed
     */
    public function setMethod($method) {}

    /**
     * @return mixed
     */
    public function setHeaders(array $headers) {}

    /**
     * @param mixed $username
     * @param mixed $password
     * @return mixed
     */
    public function setBasicAuth($username, $password) {}

    /**
     * @return mixed
     */
    public function setCookies(array $cookies) {}

    /**
     * @param mixed $data
     * @return mixed
     */
    public function setData($data) {}

    /**
     * @param mixed $path
     * @param mixed $name
     * @param mixed|null $type
     * @param mixed|null $filename
     * @param mixed|null $offset
     * @param mixed|null $length
     * @return mixed
     */
    public function addFile($path, $name, $type = null, $filename = null, $offset = null, $length = null) {}

    /**
     * @param mixed $path
     * @param mixed $name
     * @param mixed|null $type
     * @param mixed|null $filename
     * @return mixed
     */
    public function addData($path, $name, $type = null, $filename = null) {}

    /**
     * @param mixed $path
     * @return mixed
     */
    public function execute($path) {}

    /**
     * @return mixed
     */
    public function getpeername() {}

    /**
     * @return mixed
     */
    public function getsockname() {}

    /**
     * @param mixed $path
     * @return mixed
     */
    public function get($path) {}

    /**
     * @param mixed $path
     * @param mixed $data
     * @return mixed
     */
    public function post($path, $data) {}

    /**
     * @param mixed $path
     * @param mixed $file
     * @param mixed|null $offset
     * @return mixed
     */
    public function download($path, $file, $offset = null) {}

    /**
     * @return mixed
     */
    public function getBody() {}

    /**
     * @return mixed
     */
    public function getHeaders() {}

    /**
     * @return mixed
     */
    public function getCookies() {}

    /**
     * @return mixed
     */
    public function getStatusCode() {}

    /**
     * @return mixed
     */
    public function getHeaderOut() {}

    /**
     * @return mixed
     */
    public function getPeerCert() {}

    /**
     * @param mixed $path
     * @return mixed
     */
    public function upgrade($path) {}

    /**
     * @param mixed $data
     * @param mixed|null $opcode
     * @param mixed|null $flags
     * @return mixed
     */
    public function push($data, $opcode = null, $flags = null) {}

    /**
     * @param mixed|null $timeout
     * @return mixed
     */
    public function recv($timeout = null) {}

    /**
     * @return mixed
     */
    public function close() {}
}
<?php

declare(strict_types=1);

namespace Swoole\Coroutine\Socket;

class Exception extends \Swoole\Exception {}
<?php

declare(strict_types=1);

namespace Swoole\Coroutine;

class System
{
    /**
     * @param mixed $domain_name
     * @param mixed|null $family
     * @param mixed|null $timeout
     * @return mixed
     */
    public static function gethostbyname($domain_name, $family = null, $timeout = null) {}

    /**
     * @param mixed $domain_name
     * @param mixed|null $timeout
     * @param mixed|null $type
     * @return mixed
     */
    public static function dnsLookup($domain_name, $timeout = null, $type = null) {}

    /**
     * @param mixed $command
     * @param mixed|null $get_error_stream
     * @return mixed
     */
    public static function exec($command, $get_error_stream = null) {}

    /**
     * @param mixed $seconds
     * @return mixed
     */
    public static function sleep($seconds) {}

    /**
     * @param mixed $hostname
     * @param mixed|null $family
     * @param mixed|null $socktype
     * @param mixed|null $protocol
     * @param mixed|null $service
     * @param mixed|null $timeout
     * @return mixed
     */
    public static function getaddrinfo($hostname, $family = null, $socktype = null, $protocol = null, $service = null, $timeout = null) {}

    /**
     * @param mixed $path
     * @return mixed
     */
    public static function statvfs($path) {}

    /**
     * @param mixed $filename
     * @return mixed
     */
    public static function readFile($filename) {}

    /**
     * @param mixed $filename
     * @param mixed $data
     * @param mixed|null $flags
     * @return mixed
     */
    public static function writeFile($filename, $data, $flags = null) {}

    /**
     * @param mixed|null $timeout
     * @return mixed
     */
    public static function wait($timeout = null) {}

    /**
     * @param mixed $pid
     * @param mixed|null $timeout
     * @return mixed
     */
    public static function waitPid($pid, $timeout = null) {}

    /**
     * @param mixed $signo
     * @param mixed|null $timeout
     * @return mixed
     */
    public static function waitSignal($signo, $timeout = null) {}

    /**
     * @param mixed $fd
     * @param mixed|null $events
     * @param mixed|null $timeout
     * @return mixed
     */
    public static function waitEvent($fd, $events = null, $timeout = null) {}

    /**
     * @param mixed $handle
     * @param mixed|null $length
     * @return mixed
     */
    public static function fread($handle, $length = null) {}

    /**
     * @param mixed $handle
     * @param mixed $string
     * @param mixed|null $length
     * @return mixed
     */
    public static function fwrite($handle, $string, $length = null) {}

    /**
     * @param mixed $handle
     * @return mixed
     */
    public static function fgets($handle) {}
}
<?php

declare(strict_types=1);

namespace Swoole\Coroutine;

class Redis
{
    public $host = '';
    public $port = 0;
    public $setting;
    public $sock = -1;
    public $connected = false;
    public $errType = 0;
    public $errCode = 0;
    public $errMsg = '';

    public function __construct($config = null) {}

    public function __destruct() {}

    /**
     * @param mixed $host
     * @param mixed|null $port
     * @param mixed|null $serialize
     * @return mixed
     */
    public function connect($host, $port = null, $serialize = null) {}

    /**
     * @return mixed
     */
    public function getAuth() {}

    /**
     * @return mixed
     */
    public function getDBNum() {}

    /**
     * @return mixed
     */
    public function getOptions() {}

    /**
     * @param mixed $options
     * @return mixed
     */
    public function setOptions($options) {}

    /**
     * @return mixed
     */
    public function getDefer() {}

    /**
     * @param mixed $defer
     * @return mixed
     */
    public function setDefer($defer) {}

    /**
     * @return mixed
     */
    public function recv() {}

    /**
     * @return mixed
     */
    public function request(array $params) {}

    /**
     * @return mixed
     */
    public function close() {}

    /**
     * @param mixed $key
     * @param mixed $value
     * @param mixed|null $timeout
     * @param mixed|null $opt
     * @return mixed
     */
    public function set($key, $value, $timeout = null, $opt = null) {}

    /**
     * @param mixed $key
     * @param mixed $offset
     * @param mixed $value
     * @return mixed
     */
    public function setBit($key, $offset, $value) {}

    /**
     * @param mixed $key
     * @param mixed $expire
     * @param mixed $value
     * @return mixed
     */
    public function setEx($key, $expire, $value) {}

    /**
     * @param mixed $key
     * @param mixed $expire
     * @param mixed $value
     * @return mixed
     */
    public function psetEx($key, $expire, $value) {}

    /**
     * @param mixed $key
     * @param mixed $index
     * @param mixed $value
     * @return mixed
     */
    public function lSet($key, $index, $value) {}

    /**
     * @param mixed $key
     * @return mixed
     */
    public function get($key) {}

    /**
     * @param mixed $keys
     * @return mixed
     */
    public function mGet($keys) {}

    /**
     * @param mixed $key
     * @param mixed|null $other_keys
     * @return mixed
     */
    public function del($key, $other_keys = null) {}

    /**
     * @param mixed $key
     * @param mixed $member
     * @param mixed|null $other_members
     * @return mixed
     */
    public function hDel($key, $member, $other_members = null) {}

    /**
     * @param mixed $key
     * @param mixed $member
     * @param mixed $value
     * @return mixed
     */
    public function hSet($key, $member, $value) {}

    /**
     * @param mixed $key
     * @param mixed $pairs
     * @return mixed
     */
    public function hMSet($key, $pairs) {}

    /**
     * @param mixed $key
     * @param mixed $member
     * @param mixed $value
     * @return mixed
     */
    public function hSetNx($key, $member, $value) {}

    /**
     * @param mixed $key
     * @param mixed|null $other_keys
     * @return mixed
     */
    public function delete($key, $other_keys = null) {}

    /**
     * @param mixed $pairs
     * @return mixed
     */
    public function mSet($pairs) {}

    /**
     * @param mixed $pairs
     * @return mixed
     */
    public function mSetNx($pairs) {}

    /**
     * @param mixed $pattern
     * @return mixed
     */
    public function getKeys($pattern) {}

    /**
     * @param mixed $pattern
     * @return mixed
     */
    public function keys($pattern) {}

    /**
     * @param mixed $key
     * @param mixed|null $other_keys
     * @return mixed
     */
    public function exists($key, $other_keys = null) {}

    /**
     * @param mixed $key
     * @return mixed
     */
    public function type($key) {}

    /**
     * @param mixed $key
     * @return mixed
     */
    public function strLen($key) {}

    /**
     * @param mixed $key
     * @return mixed
     */
    public function lPop($key) {}

    /**
     * @param mixed $key
     * @param mixed $timeout_or_key
     * @param mixed|null $extra_args
     * @return mixed
     */
    public function blPop($key, $timeout_or_key, $extra_args = null) {}

    /**
     * @param mixed $key
     * @return mixed
     */
    public function rPop($key) {}

    /**
     * @param mixed $key
     * @param mixed $timeout_or_key
     * @param mixed|null $extra_args
     * @return mixed
     */
    public function brPop($key, $timeout_or_key, $extra_args = null) {}

    /**
     * @param mixed $src
     * @param mixed $dst
     * @param mixed $timeout
     * @return mixed
     */
    public function bRPopLPush($src, $dst, $timeout) {}

    /**
     * @param mixed $key
     * @return mixed
     */
    public function lSize($key) {}

    /**
     * @param mixed $key
     * @return mixed
     */
    public function lLen($key) {}

    /**
     * @param mixed $key
     * @return mixed
     */
    public function sSize($key) {}

    /**
     * @param mixed $key
     * @return mixed
     */
    public function scard($key) {}

    /**
     * @param mixed $key
     * @return mixed
     */
    public function sPop($key) {}

    /**
     * @param mixed $key
     * @return mixed
     */
    public function sMembers($key) {}

    /**
     * @param mixed $key
     * @return mixed
     */
    public function sGetMembers($key) {}

    /**
     * @param mixed $key
     * @param mixed|null $count
     * @return mixed
     */
    public function sRandMember($key, $count = null) {}

    /**
     * @param mixed $key
     * @return mixed
     */
    public function persist($key) {}

    /**
     * @param mixed $key
     * @return mixed
     */
    public function ttl($key) {}

    /**
     * @param mixed $key
     * @return mixed
     */
    public function pttl($key) {}

    /**
     * @param mixed $key
     * @return mixed
     */
    public function zCard($key) {}

    /**
     * @param mixed $key
     * @return mixed
     */
    public function zSize($key) {}

    /**
     * @param mixed $key
     * @return mixed
     */
    public function hLen($key) {}

    /**
     * @param mixed $key
     * @return mixed
     */
    public function hKeys($key) {}

    /**
     * @param mixed $key
     * @return mixed
     */
    public function hVals($key) {}

    /**
     * @param mixed $key
     * @return mixed
     */
    public function hGetAll($key) {}

    /**
     * @param mixed $key
     * @return mixed
     */
    public function debug($key) {}

    /**
     * @param mixed $ttl
     * @param mixed $key
     * @param mixed $value
     * @return mixed
     */
    public function restore($ttl, $key, $value) {}

    /**
     * @param mixed $key
     * @return mixed
     */
    public function dump($key) {}

    /**
     * @param mixed $key
     * @param mixed $newkey
     * @return mixed
     */
    public function renameKey($key, $newkey) {}

    /**
     * @param mixed $key
     * @param mixed $newkey
     * @return mixed
     */
    public function rename($key, $newkey) {}

    /**
     * @param mixed $key
     * @param mixed $newkey
     * @return mixed
     */
    public function renameNx($key, $newkey) {}

    /**
     * @param mixed $src
     * @param mixed $dst
     * @return mixed
     */
    public function rpoplpush($src, $dst) {}

    /**
     * @return mixed
     */
    public function randomKey() {}

    /**
     * @param mixed $key
     * @param mixed $elements
     * @return mixed
     */
    public function pfadd($key, $elements) {}

    /**
     * @param mixed $key
     * @return mixed
     */
    public function pfcount($key) {}

    /**
     * @param mixed $dstkey
     * @param mixed $keys
     * @return mixed
     */
    public function pfmerge($dstkey, $keys) {}

    /**
     * @return mixed
     */
    public function ping() {}

    /**
     * @param mixed $password
     * @return mixed
     */
    public function auth($password) {}

    /**
     * @return mixed
     */
    public function unwatch() {}

    /**
     * @param mixed $key
     * @param mixed|null $other_keys
     * @return mixed
     */
    public function watch($key, $other_keys = null) {}

    /**
     * @return mixed
     */
    public function save() {}

    /**
     * @return mixed
     */
    public function bgSave() {}

    /**
     * @return mixed
     */
    public function lastSave() {}

    /**
     * @return mixed
     */
    public function flushDB() {}

    /**
     * @return mixed
     */
    public function flushAll() {}

    /**
     * @return mixed
     */
    public function dbSize() {}

    /**
     * @return mixed
     */
    public function bgrewriteaof() {}

    /**
     * @return mixed
     */
    public function time() {}

    /**
     * @return mixed
     */
    public function role() {}

    /**
     * @param mixed $key
     * @param mixed $offset
     * @param mixed $value
     * @return mixed
     */
    public function setRange($key, $offset, $value) {}

    /**
     * @param mixed $key
     * @param mixed $value
     * @return mixed
     */
    public function setNx($key, $value) {}

    /**
     * @param mixed $key
     * @param mixed $value
     * @return mixed
     */
    public function getSet($key, $value) {}

    /**
     * @param mixed $key
     * @param mixed $value
     * @return mixed
     */
    public function append($key, $value) {}

    /**
     * @param mixed $key
     * @param mixed $value
     * @return mixed
     */
    public function lPushx($key, $value) {}

    /**
     * @param mixed $key
     * @param mixed $value
     * @return mixed
     */
    public function lPush($key, $value) {}

    /**
     * @param mixed $key
     * @param mixed $value
     * @return mixed
     */
    public function rPush($key, $value) {}

    /**
     * @param mixed $key
     * @param mixed $value
     * @return mixed
     */
    public function rPushx($key, $value) {}

    /**
     * @param mixed $key
     * @param mixed $value
     * @return mixed
     */
    public function sContains($key, $value) {}

    /**
     * @param mixed $key
     * @param mixed $value
     * @return mixed
     */
    public function sismember($key, $value) {}

    /**
     * @param mixed $key
     * @param mixed $member
     * @return mixed
     */
    public function zScore($key, $member) {}

    /**
     * @param mixed $key
     * @param mixed $member
     * @return mixed
     */
    public function zRank($key, $member) {}

    /**
     * @param mixed $key
     * @param mixed $member
     * @return mixed
     */
    public function zRevRank($key, $member) {}

    /**
     * @param mixed $key
     * @param mixed $member
     * @return mixed
     */
    public function hGet($key, $member) {}

    /**
     * @param mixed $key
     * @param mixed $keys
     * @return mixed
     */
    public function hMGet($key, $keys) {}

    /**
     * @param mixed $key
     * @param mixed $member
     * @return mixed
     */
    public function hExists($key, $member) {}

    /**
     * @param mixed $channel
     * @param mixed $message
     * @return mixed
     */
    public function publish($channel, $message) {}

    /**
     * @param mixed $key
     * @param mixed $value
     * @param mixed $member
     * @return mixed
     */
    public function zIncrBy($key, $value, $member) {}

    /**
     * @param mixed $key
     * @param mixed $score
     * @param mixed $value
     * @return mixed
     */
    public function zAdd($key, $score, $value) {}

    /**
     * @param mixed $key
     * @param mixed $count
     * @return mixed
     */
    public function zPopMin($key, $count) {}

    /**
     * @param mixed $key
     * @param mixed $count
     * @return mixed
     */
    public function zPopMax($key, $count) {}

    /**
     * @param mixed $key
     * @param mixed $timeout_or_key
     * @param mixed|null $extra_args
     * @return mixed
     */
    public function bzPopMin($key, $timeout_or_key, $extra_args = null) {}

    /**
     * @param mixed $key
     * @param mixed $timeout_or_key
     * @param mixed|null $extra_args
     * @return mixed
     */
    public function bzPopMax($key, $timeout_or_key, $extra_args = null) {}

    /**
     * @param mixed $key
     * @param mixed $min
     * @param mixed $max
     * @return mixed
     */
    public function zDeleteRangeByScore($key, $min, $max) {}

    /**
     * @param mixed $key
     * @param mixed $min
     * @param mixed $max
     * @return mixed
     */
    public function zRemRangeByScore($key, $min, $max) {}

    /**
     * @param mixed $key
     * @param mixed $min
     * @param mixed $max
     * @return mixed
     */
    public function zCount($key, $min, $max) {}

    /**
     * @param mixed $key
     * @param mixed $start
     * @param mixed $end
     * @param mixed|null $scores
     * @return mixed
     */
    public function zRange($key, $start, $end, $scores = null) {}

    /**
     * @param mixed $key
     * @param mixed $start
     * @param mixed $end
     * @param mixed|null $scores
     * @return mixed
     */
    public function zRevRange($key, $start, $end, $scores = null) {}

    /**
     * @param mixed $key
     * @param mixed $start
     * @param mixed $end
     * @param mixed|null $options
     * @return mixed
     */
    public function zRangeByScore($key, $start, $end, $options = null) {}

    /**
     * @param mixed $key
     * @param mixed $start
     * @param mixed $end
     * @param mixed|null $options
     * @return mixed
     */
    public function zRevRangeByScore($key, $start, $end, $options = null) {}

    /**
     * @param mixed $key
     * @param mixed $min
     * @param mixed $max
     * @param mixed|null $offset
     * @param mixed|null $limit
     * @return mixed
     */
    public function zRangeByLex($key, $min, $max, $offset = null, $limit = null) {}

    /**
     * @param mixed $key
     * @param mixed $min
     * @param mixed $max
     * @param mixed|null $offset
     * @param mixed|null $limit
     * @return mixed
     */
    public function zRevRangeByLex($key, $min, $max, $offset = null, $limit = null) {}

    /**
     * @param mixed $key
     * @param mixed $keys
     * @param mixed|null $weights
     * @param mixed|null $aggregate
     * @return mixed
     */
    public function zInter($key, $keys, $weights = null, $aggregate = null) {}

    /**
     * @param mixed $key
     * @param mixed $keys
     * @param mixed|null $weights
     * @param mixed|null $aggregate
     * @return mixed
     */
    public function zinterstore($key, $keys, $weights = null, $aggregate = null) {}

    /**
     * @param mixed $key
     * @param mixed $keys
     * @param mixed|null $weights
     * @param mixed|null $aggregate
     * @return mixed
     */
    public function zUnion($key, $keys, $weights = null, $aggregate = null) {}

    /**
     * @param mixed $key
     * @param mixed $keys
     * @param mixed|null $weights
     * @param mixed|null $aggregate
     * @return mixed
     */
    public function zunionstore($key, $keys, $weights = null, $aggregate = null) {}

    /**
     * @param mixed $key
     * @param mixed $value
     * @return mixed
     */
    public function incrBy($key, $value) {}

    /**
     * @param mixed $key
     * @param mixed $member
     * @param mixed $value
     * @return mixed
     */
    public function hIncrBy($key, $member, $value) {}

    /**
     * @param mixed $key
     * @return mixed
     */
    public function incr($key) {}

    /**
     * @param mixed $key
     * @param mixed $value
     * @return mixed
     */
    public function decrBy($key, $value) {}

    /**
     * @param mixed $key
     * @return mixed
     */
    public function decr($key) {}

    /**
     * @param mixed $key
     * @param mixed $offset
     * @return mixed
     */
    public function getBit($key, $offset) {}

    /**
     * @param mixed $key
     * @param mixed $position
     * @param mixed $pivot
     * @param mixed $value
     * @return mixed
     */
    public function lInsert($key, $position, $pivot, $value) {}

    /**
     * @param mixed $key
     * @param mixed $index
     * @return mixed
     */
    public function lGet($key, $index) {}

    /**
     * @param mixed $key
     * @param mixed $integer
     * @return mixed
     */
    public function lIndex($key, $integer) {}

    /**
     * @param mixed $key
     * @param mixed $timeout
     * @return mixed
     */
    public function setTimeout($key, $timeout) {}

    /**
     * @param mixed $key
     * @param mixed $integer
     * @return mixed
     */
    public function expire($key, $integer) {}

    /**
     * @param mixed $key
     * @param mixed $timestamp
     * @return mixed
     */
    public function pexpire($key, $timestamp) {}

    /**
     * @param mixed $key
     * @param mixed $timestamp
     * @return mixed
     */
    public function expireAt($key, $timestamp) {}

    /**
     * @param mixed $key
     * @param mixed $timestamp
     * @return mixed
     */
    public function pexpireAt($key, $timestamp) {}

    /**
     * @param mixed $key
     * @param mixed $dbindex
     * @return mixed
     */
    public function move($key, $dbindex) {}

    /**
     * @param mixed $dbindex
     * @return mixed
     */
    public function select($dbindex) {}

    /**
     * @param mixed $key
     * @param mixed $start
     * @param mixed $end
     * @return mixed
     */
    public function getRange($key, $start, $end) {}

    /**
     * @param mixed $key
     * @param mixed $start
     * @param mixed $stop
     * @return mixed
     */
    public function listTrim($key, $start, $stop) {}

    /**
     * @param mixed $key
     * @param mixed $start
     * @param mixed $stop
     * @return mixed
     */
    public function ltrim($key, $start, $stop) {}

    /**
     * @param mixed $key
     * @param mixed $start
     * @param mixed $end
     * @return mixed
     */
    public function lGetRange($key, $start, $end) {}

    /**
     * @param mixed $key
     * @param mixed $start
     * @param mixed $end
     * @return mixed
     */
    public function lRange($key, $start, $end) {}

    /**
     * @param mixed $key
     * @param mixed $value
     * @param mixed $count
     * @return mixed
     */
    public function lRem($key, $value, $count) {}

    /**
     * @param mixed $key
     * @param mixed $value
     * @param mixed $count
     * @return mixed
     */
    public function lRemove($key, $value, $count) {}

    /**
     * @param mixed $key
     * @param mixed $start
     * @param mixed $end
     * @return mixed
     */
    public function zDeleteRangeByRank($key, $start, $end) {}

    /**
     * @param mixed $key
     * @param mixed $min
     * @param mixed $max
     * @return mixed
     */
    public function zRemRangeByRank($key, $min, $max) {}

    /**
     * @param mixed $key
     * @param mixed $value
     * @return mixed
     */
    public function incrByFloat($key, $value) {}

    /**
     * @param mixed $key
     * @param mixed $member
     * @param mixed $value
     * @return mixed
     */
    public function hIncrByFloat($key, $member, $value) {}

    /**
     * @param mixed $key
     * @return mixed
     */
    public function bitCount($key) {}

    /**
     * @param mixed $operation
     * @param mixed $ret_key
     * @param mixed $key
     * @param mixed|null $other_keys
     * @return mixed
     */
    public function bitOp($operation, $ret_key, $key, $other_keys = null) {}

    /**
     * @param mixed $key
     * @param mixed $value
     * @return mixed
     */
    public function sAdd($key, $value) {}

    /**
     * @param mixed $src
     * @param mixed $dst
     * @param mixed $value
     * @return mixed
     */
    public function sMove($src, $dst, $value) {}

    /**
     * @param mixed $key
     * @param mixed|null $other_keys
     * @return mixed
     */
    public function sDiff($key, $other_keys = null) {}

    /**
     * @param mixed $dst
     * @param mixed $key
     * @param mixed|null $other_keys
     * @return mixed
     */
    public function sDiffStore($dst, $key, $other_keys = null) {}

    /**
     * @param mixed $key
     * @param mixed|null $other_keys
     * @return mixed
     */
    public function sUnion($key, $other_keys = null) {}

    /**
     * @param mixed $dst
     * @param mixed $key
     * @param mixed|null $other_keys
     * @return mixed
     */
    public function sUnionStore($dst, $key, $other_keys = null) {}

    /**
     * @param mixed $key
     * @param mixed|null $other_keys
     * @return mixed
     */
    public function sInter($key, $other_keys = null) {}

    /**
     * @param mixed $dst
     * @param mixed $key
     * @param mixed|null $other_keys
     * @return mixed
     */
    public function sInterStore($dst, $key, $other_keys = null) {}

    /**
     * @param mixed $key
     * @param mixed $value
     * @return mixed
     */
    public function sRemove($key, $value) {}

    /**
     * @param mixed $key
     * @param mixed $value
     * @return mixed
     */
    public function srem($key, $value) {}

    /**
     * @param mixed $key
     * @param mixed $member
     * @param mixed|null $other_members
     * @return mixed
     */
    public function zDelete($key, $member, $other_members = null) {}

    /**
     * @param mixed $key
     * @param mixed $member
     * @param mixed|null $other_members
     * @return mixed
     */
    public function zRemove($key, $member, $other_members = null) {}

    /**
     * @param mixed $key
     * @param mixed $member
     * @param mixed|null $other_members
     * @return mixed
     */
    public function zRem($key, $member, $other_members = null) {}

    /**
     * @param mixed $patterns
     * @return mixed
     */
    public function pSubscribe($patterns) {}

    /**
     * @param mixed $channels
     * @return mixed
     */
    public function subscribe($channels) {}

    /**
     * @param mixed $channels
     * @return mixed
     */
    public function unsubscribe($channels) {}

    /**
     * @param mixed $patterns
     * @return mixed
     */
    public function pUnSubscribe($patterns) {}

    /**
     * @return mixed
     */
    public function multi() {}

    /**
     * @return mixed
     */
    public function exec() {}

    /**
     * @param mixed $script
     * @param mixed|null $args
     * @param mixed|null $num_keys
     * @return mixed
     */
    public function eval($script, $args = null, $num_keys = null) {}

    /**
     * @param mixed $script_sha
     * @param mixed|null $args
     * @param mixed|null $num_keys
     * @return mixed
     */
    public function evalSha($script_sha, $args = null, $num_keys = null) {}

    /**
     * @param mixed $cmd
     * @param mixed|null $args
     * @return mixed
     */
    public function script($cmd, $args = null) {}

    /**
     * @return int
     * @see https://redis.io/commands/xlen
     * @since 4.8.0
     */
    public function xLen(string $key) {}

    /**
     * @param array $options Accepted options: "nomkstream", "maxlen", "minid", and "limit".
     * @return void|false Returns FALSE if parameter $pairs is empty; otherwise nothing returns.
     * @see https://redis.io/commands/xadd
     * @since 4.8.0
     */
    public function xAdd(string $key, string $id, array $pairs, array $options = []) {}

    /**
     * @param array $options Accepted options: "count" and "block".
     * @return array|false Returns FALSE if error happens or parameter $streams is empty; otherwise, an array is returned.
     * @see https://redis.io/commands/xread
     * @since 4.8.0
     */
    public function xRead(array $streams, array $options = []) {}

    /**
     * @return int The number of entries actually deleted.
     * @see https://redis.io/commands/xdel
     * @since 4.8.0
     */
    public function xDel(string $key, string $id) {}

    /**
     * @return array
     * @see https://redis.io/commands/xrange
     * @since 4.8.0
     */
    public function xRange(string $key, string $start, string $end, int $count = 0) {}

    /**
     * @return array
     * @see https://redis.io/commands/xrevrange
     * @since 4.8.0
     */
    public function xRevRange(string $key, string $start, string $end, int $count = 0) {}

    /**
     * @param array $options Accepted options: "maxlen", "minid", and "limit".
     * @return array|false Returns FALSE if error happens; otherwise, an array is returned.
     * @see https://redis.io/commands/xtrim
     * @since 4.8.0
     */
    public function xTrim(string $key, array $options = []) {}

    /**
     * @return string
     * @see https://redis.io/commands/xgroup
     * @since 4.8.0
     */
    public function xGroupCreate(string $key, string $group_name, string $id, bool $mkstream = false) {}

    /**
     * @return string
     * @see https://redis.io/commands/xgroup
     * @since 4.8.0
     */
    public function xGroupSetId(string $key, string $group_name, string $id) {}

    /**
     * @return int The number of destroyed consumer groups (0 or 1).
     * @see https://redis.io/commands/xgroup
     * @since 4.8.0
     */
    public function xGroupDestroy(string $key, string $group_name) {}

    /**
     * @return int The number of created consumers (0 or 1).
     * @see https://redis.io/commands/xgroup
     * @since 4.8.0
     */
    public function xGroupCreateConsumer(string $key, string $group_name, string $consumer_name) {}

    /**
     * @return int The number of pending messages that the consumer had before it was deleted.
     * @see https://redis.io/commands/xgroup
     * @since 4.8.0
     */
    public function xGroupDelConsumer(string $key, string $group_name, string $consumer_name) {}

    /**
     * @param array $options Accepted options: "count", "block", and "noack".
     * @return array|false Returns FALSE if error happens; otherwise, an array is returned.
     * @see https://redis.io/commands/xreadgroup
     * @since 4.8.0
     */
    public function xReadGroup(string $group_name, string $consumer_name, array $streams, array $options = []) {}

    /**
     * @param array $options Accepted options: "idle", "start", "end", "count", and "consumer".
     * @return array|false Returns FALSE if error happens; otherwise, an array is returned.
     * @see https://redis.io/commands/xpending
     * @since 4.8.0
     */
    public function xPending(string $key, string $group_name, array $options = []) {}

    /**
     * @return array|false Returns FALSE if error happens or parameter $id is empty; otherwise, an array is returned.
     * @see https://redis.io/commands/xack
     * @since 4.8.0
     */
    public function xAck(string $key, string $group_name, array $id) {}

    /**
     * @param array $options Accepted options: "idle", "time", "retrycount", "force", and "justid".
     * @return array|false Returns FALSE if error happens; otherwise, an array is returned.
     * @see https://redis.io/commands/xclaim
     * @since 4.8.0
     */
    public function xClaim(string $key, string $group_name, string $consumer_name, int $min_idle_time, array $id, array $options = []) {}

    /**
     * @param array $options Accepted options: "count" and "justid".
     * @return array|false Returns FALSE if error happens; otherwise, an array is returned.
     * @see https://redis.io/commands/xautoclaim
     * @since 4.8.0
     */
    public function xAutoClaim(string $key, string $group_name, string $consumer_name, int $min_idle_time, string $start, array $options = []) {}

    /**
     * @return array
     * @see https://redis.io/commands/xinfo
     * @since 4.8.0
     */
    public function xInfoConsumers(string $key, string $group_name) {}

    /**
     * @return array
     * @see https://redis.io/commands/xinfo
     * @since 4.8.0
     */
    public function xInfoGroups(string $key) {}

    /**
     * @return array
     * @see https://redis.io/commands/xinfo
     * @since 4.8.0
     */
    public function xInfoStream(string $key) {}
}
<?php

declare(strict_types=1);

namespace Swoole\Coroutine\Http2\Client;

class Exception extends \Swoole\Exception {}
<?php

declare(strict_types=1);

namespace Swoole\Coroutine\Http2;

class Client
{
    public $errCode = 0;
    public $errMsg = 0;
    public $sock = -1;
    public $type = 0;
    public $setting;
    public $connected = false;
    public $host;
    public $port = 0;
    public $ssl = false;

    public function __construct($host, $port = null, $open_ssl = null) {}

    public function __destruct() {}

    /**
     * @return mixed
     */
    public function set(array $settings) {}

    /**
     * @return mixed
     */
    public function connect() {}

    /**
     * @param mixed|null $key
     * @return mixed
     */
    public function stats($key = null) {}

    /**
     * @param mixed $stream_id
     * @return mixed
     */
    public function isStreamExist($stream_id) {}

    /**
     * @param mixed $request
     * @return mixed
     */
    public function send($request) {}

    /**
     * @param mixed $stream_id
     * @param mixed $data
     * @param mixed|null $end_stream
     * @return mixed
     */
    public function write($stream_id, $data, $end_stream = null) {}

    /**
     * @param mixed|null $timeout
     * @return mixed
     */
    public function recv($timeout = null) {}

    /**
     * @param mixed|null $timeout
     * @return mixed
     */
    public function read($timeout = null) {}

    /**
     * @param mixed|null $error_code
     * @param mixed|null $debug_data
     * @return mixed
     */
    public function goaway($error_code = null, $debug_data = null) {}

    /**
     * @return mixed
     */
    public function ping() {}

    /**
     * @return mixed
     */
    public function close() {}
}
<?php

declare(strict_types=1);

namespace Swoole\Coroutine\Curl;

class Exception extends \Swoole\Exception {}
<?php

declare(strict_types=1);

namespace Swoole\Coroutine;

use Swoole\Client;

class Socket
{
    public $fd = -1;
    public $domain = 0;
    public $type = 0;
    public $protocol = 0;
    public $errCode = 0;
    public $errMsg = '';

    public function __construct($domain, $type, $protocol = null) {}

    /**
     * @param mixed $address
     * @param mixed|null $port
     * @return mixed
     */
    public function bind($address, $port = null) {}

    /**
     * @param mixed|null $backlog
     * @return mixed
     */
    public function listen($backlog = null) {}

    /**
     * @param mixed|null $timeout
     * @return mixed
     */
    public function accept($timeout = null) {}

    /**
     * @param mixed $host
     * @param mixed|null $port
     * @param mixed|null $timeout
     * @return mixed
     */
    public function connect($host, $port = null, $timeout = null) {}

    /**
     * @return mixed
     */
    public function checkLiveness() {}

    /**
     * @param mixed|null $length
     * @return mixed
     */
    public function peek($length = null) {}

    /**
     * @param mixed|null $length
     * @param mixed|null $timeout
     * @return mixed
     */
    public function recv($length = null, $timeout = null) {}

    /**
     * @param mixed|null $length
     * @param mixed|null $timeout
     * @return mixed
     */
    public function recvAll($length = null, $timeout = null) {}

    /**
     * @param mixed|null $length
     * @param mixed|null $timeout
     * @return mixed
     */
    public function recvLine($length = null, $timeout = null) {}

    /**
     * @param mixed|null $length
     * @param mixed|null $timeout
     * @return mixed
     */
    public function recvWithBuffer($length = null, $timeout = null) {}

    /**
     * @param mixed|null $timeout
     * @return mixed
     */
    public function recvPacket($timeout = null) {}

    /**
     * @param mixed $data
     * @param mixed|null $timeout
     * @return mixed
     */
    public function send($data, $timeout = null) {}

    /**
     * @param mixed $io_vector
     * @param mixed|null $timeout
     * @return mixed
     */
    public function readVector($io_vector, $timeout = null) {}

    /**
     * @param mixed $io_vector
     * @param mixed|null $timeout
     * @return mixed
     */
    public function readVectorAll($io_vector, $timeout = null) {}

    /**
     * @param mixed $io_vector
     * @param mixed|null $timeout
     * @return mixed
     */
    public function writeVector($io_vector, $timeout = null) {}

    /**
     * @param mixed $io_vector
     * @param mixed|null $timeout
     * @return mixed
     */
    public function writeVectorAll($io_vector, $timeout = null) {}

    /**
     * @param mixed $filename
     * @param mixed|null $offset
     * @param mixed|null $length
     * @return mixed
     */
    public function sendFile($filename, $offset = null, $length = null) {}

    /**
     * @param mixed $data
     * @param mixed|null $timeout
     * @return mixed
     */
    public function sendAll($data, $timeout = null) {}

    /**
     * @param mixed $peername
     * @param mixed|null $timeout
     * @return mixed
     */
    public function recvfrom(&$peername, $timeout = null) {}

    /**
     * @param mixed $addr
     * @param mixed $port
     * @param mixed $data
     * @return mixed
     */
    public function sendto($addr, $port, $data) {}

    /**
     * @param mixed $level
     * @param mixed $opt_name
     * @return mixed
     */
    public function getOption($level, $opt_name) {}

    /**
     * @return bool Returns TRUE if succeed; otherwise FALSE.
     */
    public function setProtocol(array $settings): bool {}

    /**
     * @param mixed $level
     * @param mixed $opt_name
     * @param mixed $opt_value
     * @return mixed
     */
    public function setOption($level, $opt_name, $opt_value) {}

    public function sslHandshake(): bool {}

    /**
     * @param int $how A Client::SHUT_* constant.
     */
    public function shutdown(int $how = Client::SHUT_RDWR): bool {}

    /**
     * @param int $event Must be constant SWOOLE_EVENT_READ or SWOOLE_EVENT_WRITE.
     */
    public function cancel(int $event = SWOOLE_EVENT_READ): bool {}

    public function close(): bool {}

    /**
     * @return array|false If succeeds, return an array with two fields in it: "address" and "port"; otherwise, return FALSE.
     */
    public function getpeername() {}

    /**
     * @return array|false If succeeds, return an array with two fields in it: "address" and "port"; otherwise, return FALSE.
     */
    public function getsockname() {}

    /**
     * @since 4.8.3
     */
    public function isClosed(): bool {}
}
<?php

declare(strict_types=1);

namespace Swoole\Coroutine;

class Scheduler
{
    /**
     * Add a task (implemented in a callback).
     *
     * @return false|void Returns FALSE if the scheduler has already been started; otherwise nothing returns.
     * @see \Swoole\Coroutine\Scheduler::start()
     */
    public function add(callable $func, ...$params) {}

    /**
     * Add a list of tasks (implemented in callbacks).
     *
     * @return false|void Returns FALSE if the scheduler has already been started; otherwise nothing returns.
     * @see \Swoole\Coroutine\Scheduler::start()
     */
    public function parallel(int $n, callable $func, ...$params) {}

    /**
     * To set runtime configurations of coroutines.
     *
     * This method is an alias of method \Swoole\Coroutine::set().
     *
     * @return void
     * @see \Swoole\Coroutine::set()
     */
    public function set(array $settings) {}

    /**
     * To get runtime configurations of coroutines.
     *
     * This method is an alias of method \Swoole\Coroutine::getOptions().
     *
     * @return array|null
     * @see \Swoole\Coroutine::getOptions()
     * @since Swoole 4.6.0
     */
    public function getOptions() {}

    /**
     * Start running the list of tasks (callbacks) added through method add() and parallel().
     *
     * @return bool
     * @see \Swoole\Coroutine\Scheduler::add()
     * @see \Swoole\Coroutine\Scheduler::parallel()
     */
    public function start() {}
}
<?php

declare(strict_types=1);

namespace Swoole\Coroutine;

class Client
{
    public const MSG_OOB = 1;
    public const MSG_PEEK = 2;
    public const MSG_DONTWAIT = 64;
    public const MSG_WAITALL = 256;
    public $errCode = 0;
    public $errMsg = '';
    public $fd = -1;
    public $type = 1;
    public $setting;
    public $connected = false;
    private $socket;

    public function __construct($type) {}

    public function __destruct() {}

    /**
     * @return mixed
     */
    public function set(array $settings) {}

    /**
     * @param mixed $host
     * @param mixed|null $port
     * @param mixed|null $timeout
     * @param mixed|null $sock_flag
     * @return mixed
     */
    public function connect($host, $port = null, $timeout = null, $sock_flag = null) {}

    /**
     * @param mixed|null $timeout
     * @return mixed
     */
    public function recv($timeout = null) {}

    /**
     * @param mixed|null $length
     * @return mixed
     */
    public function peek($length = null) {}

    /**
     * @param mixed $data
     * @return mixed
     */
    public function send($data) {}

    /**
     * @param mixed $filename
     * @param mixed|null $offset
     * @param mixed|null $length
     * @return mixed
     */
    public function sendfile($filename, $offset = null, $length = null) {}

    /**
     * @param mixed $address
     * @param mixed $port
     * @param mixed $data
     * @return mixed
     */
    public function sendto($address, $port, $data) {}

    /**
     * @param mixed $length
     * @param mixed $address
     * @param mixed|null $port
     * @return mixed
     */
    public function recvfrom($length, &$address, &$port = null) {}

    /**
     * @return mixed
     */
    public function enableSSL() {}

    /**
     * @return mixed
     */
    public function getPeerCert() {}

    /**
     * @return mixed
     */
    public function verifyPeerCert() {}

    /**
     * @return mixed
     */
    public function isConnected() {}

    /**
     * @return mixed
     */
    public function getsockname() {}

    /**
     * @return mixed
     */
    public function getpeername() {}

    /**
     * @return mixed
     */
    public function close() {}

    /**
     * @return mixed
     */
    public function exportSocket() {}
}
<?php

declare(strict_types=1);

namespace Swoole\Coroutine;

class Channel
{
    public $capacity = 0;
    public $errCode = 0;

    public function __construct($size = null) {}

    /**
     * @param mixed $data
     * @param mixed|null $timeout
     * @return mixed
     */
    public function push($data, $timeout = null) {}

    /**
     * @param mixed|null $timeout
     * @return mixed
     */
    public function pop($timeout = null) {}

    /**
     * @return mixed
     */
    public function isEmpty() {}

    /**
     * @return mixed
     */
    public function isFull() {}

    /**
     * @return mixed
     */
    public function close() {}

    /**
     * @return mixed
     */
    public function stats() {}

    /**
     * @return mixed
     */
    public function length() {}
}
<?php

declare(strict_types=1);

namespace Swoole;

class Event
{
    /**
     * @param mixed $fd
     * @param mixed|null $events
     * @return mixed
     */
    public static function add($fd, ?callable $read_callback, ?callable $write_callback = null, $events = null) {}

    /**
     * @param mixed $fd
     * @return mixed
     */
    public static function del($fd) {}

    /**
     * @param mixed $fd
     * @param mixed|null $events
     * @return mixed
     */
    public static function set($fd, ?callable $read_callback = null, ?callable $write_callback = null, $events = null) {}

    /**
     * @param mixed $fd
     * @param mixed|null $events
     * @return mixed
     */
    public static function isset($fd, $events = null) {}

    /**
     * @return mixed
     */
    public static function dispatch() {}

    /**
     * @return true
     */
    public static function defer(callable $callback) {}

    /**
     * @param mixed|null $before
     * @return mixed
     */
    public static function cycle(?callable $callback, $before = null) {}

    /**
     * @param mixed $fd
     * @param mixed $data
     * @return mixed
     */
    public static function write($fd, $data) {}

    /**
     * @return mixed
     */
    public static function wait() {}

    /**
     * @return mixed
     */
    public static function rshutdown() {}

    /**
     * @return mixed
     */
    public static function exit() {}
}
<?php

declare(strict_types=1);

namespace Swoole;

class Client
{
    public const MSG_OOB = 1;
    public const MSG_PEEK = 2;
    public const MSG_DONTWAIT = 64;
    public const MSG_WAITALL = 256;
    public const SHUT_RDWR = 2;
    public const SHUT_RD = 0;
    public const SHUT_WR = 1;
    public $errCode = 0;
    public $sock = -1;
    public $reuse = false;
    public $reuseCount = 0;
    public $type = 0;
    public $id;
    public $setting;

    public function __construct($type, $async = null, $id = null) {}

    public function __destruct() {}

    /**
     * @return mixed
     */
    public function set(array $settings) {}

    /**
     * @param mixed $host
     * @param mixed|null $port
     * @param mixed|null $timeout
     * @param mixed|null $sock_flag
     * @return mixed
     */
    public function connect($host, $port = null, $timeout = null, $sock_flag = null) {}

    /**
     * @param mixed|null $size
     * @param mixed|null $flag
     * @return mixed
     */
    public function recv($size = null, $flag = null) {}

    /**
     * @param mixed $data
     * @param mixed|null $flag
     * @return mixed
     */
    public function send($data, $flag = null) {}

    /**
     * @param mixed $filename
     * @param mixed|null $offset
     * @param mixed|null $length
     * @return mixed
     */
    public function sendfile($filename, $offset = null, $length = null) {}

    /**
     * @param mixed $ip
     * @param mixed $port
     * @param mixed $data
     * @return mixed
     */
    public function sendto($ip, $port, $data) {}

    /**
     * @param mixed $how
     * @return mixed
     */
    public function shutdown($how) {}

    /**
     * @return mixed
     */
    public function enableSSL() {}

    /**
     * @return mixed
     */
    public function getPeerCert() {}

    /**
     * @return mixed
     */
    public function verifyPeerCert() {}

    /**
     * @return mixed
     */
    public function isConnected() {}

    /**
     * @return mixed
     */
    public function getsockname() {}

    /**
     * @return mixed
     */
    public function getpeername() {}

    /**
     * @param mixed|null $force
     * @return mixed
     */
    public function close($force = null) {}

    /**
     * @return mixed
     */
    public function getSocket() {}
}
<?php

declare(strict_types=1);

namespace Swoole;

class Coroutine
{
    /**
     * @return mixed
     */
    public static function create(callable $func, ...$params) {}

    /**
     * @param mixed $callback
     * @return mixed
     */
    public static function defer($callback) {}

    /**
     * To set runtime configurations of coroutines.
     *
     * @return void
     */
    public static function set(array $options) {}

    /**
     * To get runtime configurations of coroutines.
     *
     * @return array|null
     */
    public static function getOptions() {}

    /**
     * @param mixed $cid
     * @return mixed
     */
    public static function exists($cid) {}

    /**
     * @return mixed
     */
    public static function yield() {}

    /**
     * @param mixed $cid
     * @return mixed
     */
    public static function cancel($cid) {}

    /**
     * Waits for a list of coroutines to finish.
     *
     * This method is similar to class \Swoole\Coroutine\WaitGroup and \Swoole\Coroutine\Barrier. They are different
     * implementations of the same functionality.
     *
     * @param array $cid_array An array of coroutines.
     * @param int $timeout
     * @return bool TRUE if succeeds; otherwise FALSE.
     * @see \Swoole\Coroutine\WaitGroup
     * @see \Swoole\Coroutine\Barrier
     * @since 4.8.0
     */
    public static function join($cid_array, $timeout = -1) {}

    /**
     * @return mixed
     */
    public static function isCanceled() {}

    /**
     * @return mixed
     */
    public static function suspend() {}

    /**
     * @param mixed $cid
     * @return mixed
     */
    public static function resume($cid) {}

    /**
     * @return mixed
     */
    public static function stats() {}

    /**
     * @return mixed
     */
    public static function getCid() {}

    /**
     * @return mixed
     */
    public static function getuid() {}

    /**
     * @param mixed|null $cid
     * @return mixed
     */
    public static function getPcid($cid = null) {}

    /**
     * @param mixed|null $cid
     * @return mixed
     */
    public static function getContext($cid = null) {}

    /**
     * @param mixed|null $cid
     * @param mixed|null $options
     * @param mixed|null $limit
     * @return mixed
     */
    public static function getBackTrace($cid = null, $options = null, $limit = null) {}

    /**
     * @param mixed|null $cid
     * @param mixed|null $options
     * @param mixed|null $limit
     * @return mixed
     */
    public static function printBackTrace($cid = null, $options = null, $limit = null) {}

    /**
     * @param mixed|null $cid
     * @return mixed
     */
    public static function getElapsed($cid = null) {}

    /**
     * Get memory usage of a coroutine.
     *
     * @param int $cid If this parameter is not passed in, current coroutine ID will be used.
     * @return int|false Memory usage of the coroutine; FALSE if the specified coroutine doesn't exist.
     * @since 4.8.0
     */
    public static function getStackUsage(int $cid = null) {}

    /**
     * @return mixed
     */
    public static function list() {}

    /**
     * @return mixed
     */
    public static function listCoroutines() {}

    /**
     * @return mixed
     */
    public static function enableScheduler() {}

    /**
     * @return mixed
     */
    public static function disableScheduler() {}

    /**
     * @param mixed $domain_name
     * @param mixed|null $family
     * @param mixed|null $timeout
     * @return mixed
     */
    public static function gethostbyname($domain_name, $family = null, $timeout = null) {}

    /**
     * @param mixed $domain_name
     * @param mixed|null $timeout
     * @param mixed|null $type
     * @return mixed
     */
    public static function dnsLookup($domain_name, $timeout = null, $type = null) {}

    /**
     * @param mixed $command
     * @param mixed|null $get_error_stream
     * @return mixed
     */
    public static function exec($command, $get_error_stream = null) {}

    /**
     * @param mixed $seconds
     * @return mixed
     */
    public static function sleep($seconds) {}

    /**
     * @param mixed $hostname
     * @param mixed|null $family
     * @param mixed|null $socktype
     * @param mixed|null $protocol
     * @param mixed|null $service
     * @param mixed|null $timeout
     * @return mixed
     */
    public static function getaddrinfo($hostname, $family = null, $socktype = null, $protocol = null, $service = null, $timeout = null) {}

    /**
     * @param mixed $path
     * @return mixed
     */
    public static function statvfs($path) {}

    /**
     * @param mixed $filename
     * @return mixed
     */
    public static function readFile($filename) {}

    /**
     * @param mixed $filename
     * @param mixed $data
     * @param mixed|null $flags
     * @return mixed
     */
    public static function writeFile($filename, $data, $flags = null) {}

    /**
     * @param mixed|null $timeout
     * @return mixed
     */
    public static function wait($timeout = null) {}

    /**
     * @param mixed $pid
     * @param mixed|null $timeout
     * @return mixed
     */
    public static function waitPid($pid, $timeout = null) {}

    /**
     * @param mixed $signo
     * @param mixed|null $timeout
     * @return mixed
     */
    public static function waitSignal($signo, $timeout = null) {}

    /**
     * @param mixed $fd
     * @param mixed|null $events
     * @param mixed|null $timeout
     * @return mixed
     */
    public static function waitEvent($fd, $events = null, $timeout = null) {}

    /**
     * @param mixed $handle
     * @param mixed|null $length
     * @return mixed
     */
    public static function fread($handle, $length = null) {}

    /**
     * @param mixed $handle
     * @return mixed
     */
    public static function fgets($handle) {}

    /**
     * @param mixed $handle
     * @param mixed $string
     * @param mixed|null $length
     * @return mixed
     */
    public static function fwrite($handle, $string, $length = null) {}
}
<?php

declare(strict_types=1);

namespace Swoole;

class Atomic
{
    public function __construct(int $value = 0) {}

    /**
     * @return int
     */
    public function add(int $add_value = 1) {}

    /**
     * @return int
     */
    public function sub(int $sub_value = 1) {}

    /**
     * @return int
     */
    public function get() {}

    public function set(int $value) {}

    /**
     * @return bool
     */
    public function wait(float $timeout = 1.0) {}

    /**
     * @return bool
     */
    public function wakeup(int $count = 1) {}

    /**
     * @return bool
     */
    public function cmpset(int $cmp_value, int $new_value) {}
}
<?php

declare(strict_types=1);

namespace Swoole;

class Table implements \Iterator, \ArrayAccess, \Countable
{
    public const TYPE_INT = 1;
    public const TYPE_STRING = 3;
    public const TYPE_FLOAT = 2;

    /**
     * @var int
     */
    public $size;

    /**
     * @var int
     */
    public $memorySize;

    public function __construct(int $table_size, float $conflict_proportion = 0.2) {}

    /**
     * @return bool
     */
    public function column(string $name, int $type, int $size = 0) {}

    /**
     * @return bool
     */
    public function create() {}

    /**
     * @return bool returns TRUE all the time
     */
    public function destroy() {}

    /**
     * @return bool
     */
    public function set(string $key, array $value) {}

    /**
     * @return array|false Return an array of stats information; Return FALSE when error happens.
     * @since 4.8.0
     */
    public function stats() {}

    /**
     * @return mixed
     */
    public function get(string $key, string $field = null) {}

    /**
     * This method has an alias of \Swoole\Table::delete().
     *
     * @return bool
     * @see \Swoole\Table::delete()
     */
    public function del(string $key) {}

    /**
     * Alias of method \Swoole\Table::del().
     *
     * @return bool
     * @see \Swoole\Table::del()
     */
    public function delete(string $key) {}

    /**
     * This method has an alias of \Swoole\Table::exist().
     *
     * @return bool
     * @see \Swoole\Table::exist()
     */
    public function exists(string $key) {}

    /**
     * Alias of method \Swoole\Table::exists().
     *
     * @return bool
     * @see \Swoole\Table::exists()
     */
    public function exist(string $key) {}

    /**
     * @param mixed $incrby
     * @return int
     */
    public function incr(string $key, string $column, $incrby = 1) {}

    /**
     * @param mixed $decrby
     * @return int
     */
    public function decr(string $key, string $column, $decrby = 1) {}

    /**
     * @return int
     */
    public function getSize() {}

    /**
     * @return int
     */
    public function getMemorySize() {}

    /**
     * @return mixed
     * @see \Iterator::current()
     * @see https://www.php.net/manual/en/iterator.current.php
     * {@inheritDoc}
     */
    public function current() {}

    /**
     * @return mixed
     * @see \Iterator::key()
     * @see https://www.php.net/manual/en/iterator.key.php
     * {@inheritDoc}
     */
    public function key() {}

    /**
     * @return void
     * @see \Iterator::next()
     * @see https://www.php.net/manual/en/iterator.next.php
     * {@inheritDoc}
     */
    public function next() {}

    /**
     * @return void
     * @see \Iterator::rewind()
     * @see https://www.php.net/manual/en/iterator.rewind.php
     * {@inheritDoc}
     */
    public function rewind() {}

    /**
     * @return bool
     * @see \Iterator::valid()
     * @see https://www.php.net/manual/en/iterator.valid.php
     * {@inheritDoc}
     */
    public function valid() {}

    /**
     * Whether or not an offset exists.
     *
     * @param mixed $offset an offset to check for
     * @return bool returns true on success or false on failure
     * @see \ArrayAccess::offsetExists()
     * @see https://www.php.net/manual/en/arrayaccess.offsetexists.php
     * {@inheritDoc}
     */
    public function offsetExists($offset) {}

    /**
     * Returns the value at specified offset.
     *
     * @param mixed $offset the offset to retrieve
     * @return mixed can return all value types
     * @see \ArrayAccess::offsetGet()
     * @see https://www.php.net/manual/en/arrayaccess.offsetget.php
     * {@inheritDoc}
     */
    public function offsetGet($offset) {}

    /**
     * Assigns a value to the specified offset.
     *
     * @param mixed $offset the offset to assign the value to
     * @param mixed $value the value to set
     * @return void
     * @see \ArrayAccess::offsetSet()
     * @see https://www.php.net/manual/en/arrayaccess.offsetset.php
     * {@inheritDoc}
     */
    public function offsetSet($offset, $value) {}

    /**
     * Unsets an offset.
     *
     * @param mixed $offset the offset to unset
     * @return void
     * @see \ArrayAccess::offsetUnset()
     * @see https://www.php.net/manual/en/arrayaccess.offsetunset.php
     * {@inheritDoc}
     */
    public function offsetUnset($offset) {}

    /**
     * @return int
     * @see \Countable::count()
     * @see https://www.php.net/manual/en/countable.count.php
     * {@inheritDoc}
     */
    public function count() {}
}
<?php

declare(strict_types=1);

class_alias(Swoole\Coroutine\Channel::class, Co\Channel::class);
class_alias(Swoole\Coroutine\Client::class, Co\Client::class);
class_alias(Swoole\Coroutine\Context::class, Co\Context::class);
class_alias(Swoole\Coroutine\Curl\Exception::class, Co\Curl\Exception::class);
class_alias(Swoole\Coroutine\Http2\Client::class, Co\Http2\Client::class);
class_alias(Swoole\Coroutine\Http2\Client\Exception::class, Co\Http2\Client\Exception::class);
class_alias(Swoole\Coroutine\Http\Client::class, Co\Http\Client::class);
class_alias(Swoole\Coroutine\Http\Client\Exception::class, Co\Http\Client\Exception::class);
class_alias(Swoole\Coroutine\Http\Server::class, Co\Http\Server::class);
class_alias(Swoole\Coroutine\Iterator::class, Co\Iterator::class);
class_alias(Swoole\Coroutine\MySQL::class, Co\MySQL::class);
class_alias(Swoole\Coroutine\MySQL\Exception::class, Co\MySQL\Exception::class);
class_alias(Swoole\Coroutine\MySQL\Statement::class, Co\MySQL\Statement::class);
class_alias(Swoole\Coroutine\Redis::class, Co\Redis::class);
class_alias(Swoole\Coroutine\Scheduler::class, Co\Scheduler::class);
class_alias(Swoole\Coroutine\Socket::class, Co\Socket::class);
class_alias(Swoole\Coroutine\Socket\Exception::class, Co\Socket\Exception::class);
class_alias(Swoole\Coroutine\System::class, Co\System::class);

class_alias(Swoole\Atomic::class, swoole_atomic::class);
class_alias(Swoole\Atomic\Long::class, swoole_atomic_long::class);
class_alias(Swoole\Client::class, swoole_client::class);
class_alias(Swoole\Connection\Iterator::class, swoole_connection_iterator::class);
class_alias(Swoole\Coroutine::class, co::class);
class_alias(Swoole\Coroutine\Channel::class, chan::class);
class_alias(Swoole\Error::class, swoole_error::class);
class_alias(Swoole\Event::class, swoole_event::class);
class_alias(Swoole\Exception::class, swoole_exception::class);
class_alias(Swoole\Http2\Request::class, swoole_http2_request::class);
class_alias(Swoole\Http2\Response::class, swoole_http2_response::class);
class_alias(Swoole\Http\Request::class, swoole_http_request::class);
class_alias(Swoole\Http\Response::class, swoole_http_response::class);
class_alias(Swoole\Http\Server::class, swoole_http_server::class);
class_alias(Swoole\Lock::class, swoole_lock::class);
class_alias(Swoole\Process::class, swoole_process::class);
class_alias(Swoole\Process\Pool::class, swoole_process_pool::class);
class_alias(Swoole\Redis\Server::class, swoole_redis_server::class);
class_alias(Swoole\Runtime::class, swoole_runtime::class);
class_alias(Swoole\Server::class, swoole_server::class);
class_alias(Swoole\Server\Port::class, swoole_server_port::class);
class_alias(Swoole\Server\Task::class, swoole_server_task::class);
class_alias(Swoole\Table::class, swoole_table::class);
class_alias(Swoole\Timer::class, swoole_timer::class);
class_alias(Swoole\Timer\Iterator::class, swoole_timer_iterator::class);
class_alias(Swoole\Websocket\Closeframe::class, swoole_websocket_closeframe::class);
class_alias(Swoole\Websocket\Frame::class, swoole_websocket_frame::class);
class_alias(Swoole\Websocket\Server::class, swoole_websocket_server::class);
<?php

declare(strict_types=1);

define('SWOOLE_VERSION', '4.8.6');
define('SWOOLE_VERSION_ID', 40806);
define('SWOOLE_MAJOR_VERSION', 4);
define('SWOOLE_MINOR_VERSION', 8);
define('SWOOLE_RELEASE_VERSION', 6);
define('SWOOLE_EXTRA_VERSION', '');
define('SWOOLE_DEBUG', '');
define('SWOOLE_HAVE_COMPRESSION', '1');
define('SWOOLE_HAVE_ZLIB', '1');
define('SWOOLE_HAVE_BROTLI', '1');
define('SWOOLE_USE_HTTP2', '1');
define('SWOOLE_USE_SHORTNAME', '1');
define('SWOOLE_SOCK_TCP', 1);
define('SWOOLE_SOCK_TCP6', 3);
define('SWOOLE_SOCK_UDP', 2);
define('SWOOLE_SOCK_UDP6', 4);
define('SWOOLE_SOCK_UNIX_DGRAM', 6);
define('SWOOLE_SOCK_UNIX_STREAM', 5);
define('SWOOLE_TCP', 1);
define('SWOOLE_TCP6', 3);
define('SWOOLE_UDP', 2);
define('SWOOLE_UDP6', 4);
define('SWOOLE_UNIX_DGRAM', 6);
define('SWOOLE_UNIX_STREAM', 5);
define('SWOOLE_SOCK_SYNC', '');
define('SWOOLE_SOCK_ASYNC', '1');
define('SWOOLE_SYNC', 2048);
define('SWOOLE_ASYNC', 1024);
define('SWOOLE_KEEP', 4096);
define('SWOOLE_SSL', 512);
define('SWOOLE_SSLv3_METHOD', 1);
define('SWOOLE_SSLv3_SERVER_METHOD', 2);
define('SWOOLE_SSLv3_CLIENT_METHOD', 3);
define('SWOOLE_TLSv1_METHOD', 6);
define('SWOOLE_TLSv1_SERVER_METHOD', 7);
define('SWOOLE_TLSv1_CLIENT_METHOD', 8);
define('SWOOLE_TLSv1_1_METHOD', 9);
define('SWOOLE_TLSv1_1_SERVER_METHOD', 10);
define('SWOOLE_TLSv1_1_CLIENT_METHOD', 11);
define('SWOOLE_TLSv1_2_METHOD', 12);
define('SWOOLE_TLSv1_2_SERVER_METHOD', 13);
define('SWOOLE_TLSv1_2_CLIENT_METHOD', 14);
define('SWOOLE_DTLS_SERVER_METHOD', 16);
define('SWOOLE_DTLS_CLIENT_METHOD', 15);
define('SWOOLE_SSLv23_METHOD', 0);
define('SWOOLE_SSLv23_SERVER_METHOD', 4);
define('SWOOLE_SSLv23_CLIENT_METHOD', 5);
define('SWOOLE_TLS_METHOD', 0);
define('SWOOLE_TLS_SERVER_METHOD', 4);
define('SWOOLE_TLS_CLIENT_METHOD', 5);
define('SWOOLE_SSL_TLSv1', 8);
define('SWOOLE_SSL_TLSv1_1', 16);
define('SWOOLE_SSL_TLSv1_2', 32);
define('SWOOLE_SSL_TLSv1_3', 64);
define('SWOOLE_SSL_DTLS', 128);
define('SWOOLE_SSL_SSLv2', 2);
define('SWOOLE_EVENT_READ', 512);
define('SWOOLE_EVENT_WRITE', 1024);
define('SWOOLE_STRERROR_SYSTEM', 0);
define('SWOOLE_STRERROR_GAI', 1);
define('SWOOLE_STRERROR_DNS', 2);
define('SWOOLE_STRERROR_SWOOLE', 9);
define('SWOOLE_ERROR_MALLOC_FAIL', 501);
define('SWOOLE_ERROR_SYSTEM_CALL_FAIL', 502);
define('SWOOLE_ERROR_PHP_FATAL_ERROR', 503);
define('SWOOLE_ERROR_NAME_TOO_LONG', 504);
define('SWOOLE_ERROR_INVALID_PARAMS', 505);
define('SWOOLE_ERROR_QUEUE_FULL', 506);
define('SWOOLE_ERROR_OPERATION_NOT_SUPPORT', 507);
define('SWOOLE_ERROR_PROTOCOL_ERROR', 508);
define('SWOOLE_ERROR_WRONG_OPERATION', 509);
define('SWOOLE_ERROR_FILE_NOT_EXIST', 700);
define('SWOOLE_ERROR_FILE_TOO_LARGE', 701);
define('SWOOLE_ERROR_FILE_EMPTY', 702);
define('SWOOLE_ERROR_DNSLOOKUP_DUPLICATE_REQUEST', 710);
define('SWOOLE_ERROR_DNSLOOKUP_RESOLVE_FAILED', 711);
define('SWOOLE_ERROR_DNSLOOKUP_RESOLVE_TIMEOUT', 712);
define('SWOOLE_ERROR_DNSLOOKUP_UNSUPPORTED', 713);
define('SWOOLE_ERROR_DNSLOOKUP_NO_SERVER', 714);
define('SWOOLE_ERROR_BAD_IPV6_ADDRESS', 720);
define('SWOOLE_ERROR_UNREGISTERED_SIGNAL', 721);
define('SWOOLE_ERROR_EVENT_SOCKET_REMOVED', 800);
define('SWOOLE_ERROR_SESSION_CLOSED_BY_SERVER', 1001);
define('SWOOLE_ERROR_SESSION_CLOSED_BY_CLIENT', 1002);
define('SWOOLE_ERROR_SESSION_CLOSING', 1003);
define('SWOOLE_ERROR_SESSION_CLOSED', 1004);
define('SWOOLE_ERROR_SESSION_NOT_EXIST', 1005);
define('SWOOLE_ERROR_SESSION_INVALID_ID', 1006);
define('SWOOLE_ERROR_SESSION_DISCARD_TIMEOUT_DATA', 1007);
define('SWOOLE_ERROR_SESSION_DISCARD_DATA', 1008);
define('SWOOLE_ERROR_OUTPUT_BUFFER_OVERFLOW', 1009);
define('SWOOLE_ERROR_OUTPUT_SEND_YIELD', 1010);
define('SWOOLE_ERROR_SSL_NOT_READY', 1011);
define('SWOOLE_ERROR_SSL_CANNOT_USE_SENFILE', 1012);
define('SWOOLE_ERROR_SSL_EMPTY_PEER_CERTIFICATE', 1013);
define('SWOOLE_ERROR_SSL_VERIFY_FAILED', 1014);
define('SWOOLE_ERROR_SSL_BAD_CLIENT', 1015);
define('SWOOLE_ERROR_SSL_BAD_PROTOCOL', 1016);
define('SWOOLE_ERROR_SSL_RESET', 1017);
define('SWOOLE_ERROR_SSL_HANDSHAKE_FAILED', 1018);
define('SWOOLE_ERROR_PACKAGE_LENGTH_TOO_LARGE', 1201);
define('SWOOLE_ERROR_PACKAGE_LENGTH_NOT_FOUND', 1202);
define('SWOOLE_ERROR_DATA_LENGTH_TOO_LARGE', 1203);
define('SWOOLE_ERROR_PACKAGE_MALFORMED_DATA', 1204);
define('SWOOLE_ERROR_TASK_PACKAGE_TOO_BIG', 2001);
define('SWOOLE_ERROR_TASK_DISPATCH_FAIL', 2002);
define('SWOOLE_ERROR_TASK_TIMEOUT', 2003);
define('SWOOLE_ERROR_HTTP2_STREAM_ID_TOO_BIG', 3001);
define('SWOOLE_ERROR_HTTP2_STREAM_NO_HEADER', 3002);
define('SWOOLE_ERROR_HTTP2_STREAM_NOT_FOUND', 3003);
define('SWOOLE_ERROR_HTTP2_STREAM_IGNORE', 3004);
define('SWOOLE_ERROR_AIO_BAD_REQUEST', 4001);
define('SWOOLE_ERROR_AIO_CANCELED', 4002);
define('SWOOLE_ERROR_AIO_TIMEOUT', 4003);
define('SWOOLE_ERROR_CLIENT_NO_CONNECTION', 5001);
define('SWOOLE_ERROR_SOCKET_CLOSED', 6001);
define('SWOOLE_ERROR_SOCKET_POLL_TIMEOUT', 6002);
define('SWOOLE_ERROR_SOCKS5_UNSUPPORT_VERSION', 7001);
define('SWOOLE_ERROR_SOCKS5_UNSUPPORT_METHOD', 7002);
define('SWOOLE_ERROR_SOCKS5_AUTH_FAILED', 7003);
define('SWOOLE_ERROR_SOCKS5_SERVER_ERROR', 7004);
define('SWOOLE_ERROR_SOCKS5_HANDSHAKE_FAILED', 7005);
define('SWOOLE_ERROR_HTTP_PROXY_HANDSHAKE_ERROR', 7101);
define('SWOOLE_ERROR_HTTP_INVALID_PROTOCOL', 7102);
define('SWOOLE_ERROR_HTTP_PROXY_HANDSHAKE_FAILED', 7103);
define('SWOOLE_ERROR_HTTP_PROXY_BAD_RESPONSE', 7104);
define('SWOOLE_ERROR_WEBSOCKET_BAD_CLIENT', 8501);
define('SWOOLE_ERROR_WEBSOCKET_BAD_OPCODE', 8502);
define('SWOOLE_ERROR_WEBSOCKET_UNCONNECTED', 8503);
define('SWOOLE_ERROR_WEBSOCKET_HANDSHAKE_FAILED', 8504);
define('SWOOLE_ERROR_WEBSOCKET_PACK_FAILED', 8505);
define('SWOOLE_ERROR_WEBSOCKET_UNPACK_FAILED', 8506);
define('SWOOLE_ERROR_WEBSOCKET_INCOMPLETE_PACKET', 8507);
define('SWOOLE_ERROR_SERVER_MUST_CREATED_BEFORE_CLIENT', 9001);
define('SWOOLE_ERROR_SERVER_TOO_MANY_SOCKET', 9002);
define('SWOOLE_ERROR_SERVER_WORKER_TERMINATED', 9003);
define('SWOOLE_ERROR_SERVER_INVALID_LISTEN_PORT', 9004);
define('SWOOLE_ERROR_SERVER_TOO_MANY_LISTEN_PORT', 9005);
define('SWOOLE_ERROR_SERVER_PIPE_BUFFER_FULL', 9006);
define('SWOOLE_ERROR_SERVER_NO_IDLE_WORKER', 9007);
define('SWOOLE_ERROR_SERVER_ONLY_START_ONE', 9008);
define('SWOOLE_ERROR_SERVER_SEND_IN_MASTER', 9009);
define('SWOOLE_ERROR_SERVER_INVALID_REQUEST', 9010);
define('SWOOLE_ERROR_SERVER_CONNECT_FAIL', 9011);
define('SWOOLE_ERROR_SERVER_INVALID_COMMAND', 9012);
define('SWOOLE_ERROR_SERVER_WORKER_EXIT_TIMEOUT', 9101);
define('SWOOLE_ERROR_SERVER_WORKER_ABNORMAL_PIPE_DATA', 9102);
define('SWOOLE_ERROR_SERVER_WORKER_UNPROCESSED_DATA', 9103);
define('SWOOLE_ERROR_CO_OUT_OF_COROUTINE', 10001);
define('SWOOLE_ERROR_CO_HAS_BEEN_BOUND', 10002);
define('SWOOLE_ERROR_CO_HAS_BEEN_DISCARDED', 10003);
define('SWOOLE_ERROR_CO_MUTEX_DOUBLE_UNLOCK', 10004);
define('SWOOLE_ERROR_CO_BLOCK_OBJECT_LOCKED', 10005);
define('SWOOLE_ERROR_CO_BLOCK_OBJECT_WAITING', 10006);
define('SWOOLE_ERROR_CO_YIELD_FAILED', 10007);
define('SWOOLE_ERROR_CO_GETCONTEXT_FAILED', 10008);
define('SWOOLE_ERROR_CO_SWAPCONTEXT_FAILED', 10009);
define('SWOOLE_ERROR_CO_MAKECONTEXT_FAILED', 10010);
define('SWOOLE_ERROR_CO_IOCPINIT_FAILED', 10011);
define('SWOOLE_ERROR_CO_PROTECT_STACK_FAILED', 10012);
define('SWOOLE_ERROR_CO_STD_THREAD_LINK_ERROR', 10013);
define('SWOOLE_ERROR_CO_DISABLED_MULTI_THREAD', 10014);
define('SWOOLE_ERROR_CO_CANNOT_CANCEL', 10015);
define('SWOOLE_ERROR_CO_NOT_EXISTS', 10016);
define('SWOOLE_ERROR_CO_CANCELED', 10017);
define('SWOOLE_ERROR_CO_TIMEDOUT', 10018);
define('SWOOLE_TRACE_SERVER', 2);
define('SWOOLE_TRACE_CLIENT', 4);
define('SWOOLE_TRACE_BUFFER', 8);
define('SWOOLE_TRACE_CONN', 16);
define('SWOOLE_TRACE_EVENT', 32);
define('SWOOLE_TRACE_WORKER', 64);
define('SWOOLE_TRACE_MEMORY', 128);
define('SWOOLE_TRACE_REACTOR', 256);
define('SWOOLE_TRACE_PHP', 512);
define('SWOOLE_TRACE_HTTP', 1024);
define('SWOOLE_TRACE_HTTP2', 2048);
define('SWOOLE_TRACE_EOF_PROTOCOL', 4096);
define('SWOOLE_TRACE_LENGTH_PROTOCOL', 8192);
define('SWOOLE_TRACE_CLOSE', 16384);
define('SWOOLE_TRACE_WEBSOCKET', 32768);
define('SWOOLE_TRACE_REDIS_CLIENT', 65536);
define('SWOOLE_TRACE_MYSQL_CLIENT', 131072);
define('SWOOLE_TRACE_HTTP_CLIENT', 262144);
define('SWOOLE_TRACE_AIO', 524288);
define('SWOOLE_TRACE_SSL', 1048576);
define('SWOOLE_TRACE_NORMAL', 2097152);
define('SWOOLE_TRACE_CHANNEL', 4194304);
define('SWOOLE_TRACE_TIMER', 8388608);
define('SWOOLE_TRACE_SOCKET', 16777216);
define('SWOOLE_TRACE_COROUTINE', 33554432);
define('SWOOLE_TRACE_CONTEXT', 67108864);
define('SWOOLE_TRACE_CO_HTTP_SERVER', 134217728);
define('SWOOLE_TRACE_TABLE', 268435456);
define('SWOOLE_TRACE_CO_CURL', 536870912);
define('SWOOLE_TRACE_CARES', 1073741824);
define('SWOOLE_TRACE_ALL', 9223372036854775807);
define('SWOOLE_LOG_DEBUG', 0);
define('SWOOLE_LOG_TRACE', 1);
define('SWOOLE_LOG_INFO', 2);
define('SWOOLE_LOG_NOTICE', 3);
define('SWOOLE_LOG_WARNING', 4);
define('SWOOLE_LOG_ERROR', 5);
define('SWOOLE_LOG_NONE', 6);
define('SWOOLE_LOG_ROTATION_SINGLE', 0);
define('SWOOLE_LOG_ROTATION_MONTHLY', 1);
define('SWOOLE_LOG_ROTATION_DAILY', 2);
define('SWOOLE_LOG_ROTATION_HOURLY', 3);
define('SWOOLE_LOG_ROTATION_EVERY_MINUTE', 4);
define('SWOOLE_IPC_NONE', 0);
define('SWOOLE_IPC_UNIXSOCK', 1);
define('SWOOLE_IPC_SOCKET', 3);
define('SWOOLE_IOV_MAX', 1024);
define('SWOOLE_FILELOCK', 2);
define('SWOOLE_MUTEX', 3);
define('SWOOLE_SEM', 4);
define('SWOOLE_RWLOCK', 1);
define('SWOOLE_SPINLOCK', 5);
define('SWOOLE_TIMER_MIN_MS', 1);
define('SWOOLE_TIMER_MIN_SEC', 0.001);
define('SWOOLE_TIMER_MAX_MS', 9223372036854775807);
define('SWOOLE_TIMER_MAX_SEC', 9.2233720368548E+15);
define('SWOOLE_DEFAULT_MAX_CORO_NUM', 100000);
define('SWOOLE_CORO_MAX_NUM_LIMIT', 9223372036854775807);
define('SWOOLE_CORO_INIT', 0);
define('SWOOLE_CORO_WAITING', 1);
define('SWOOLE_CORO_RUNNING', 2);
define('SWOOLE_CORO_END', 3);
define('SWOOLE_EXIT_IN_COROUTINE', 2);
define('SWOOLE_EXIT_IN_SERVER', 4);
define('SWOOLE_CHANNEL_OK', 0);
define('SWOOLE_CHANNEL_TIMEOUT', -1);
define('SWOOLE_CHANNEL_CLOSED', -2);
define('SWOOLE_CHANNEL_CANCELED', -3);
define('SWOOLE_HOOK_TCP', 2);
define('SWOOLE_HOOK_UDP', 4);
define('SWOOLE_HOOK_UNIX', 8);
define('SWOOLE_HOOK_UDG', 16);
define('SWOOLE_HOOK_SSL', 32);
define('SWOOLE_HOOK_TLS', 64);
define('SWOOLE_HOOK_STREAM_FUNCTION', 128);
define('SWOOLE_HOOK_STREAM_SELECT', 128);
define('SWOOLE_HOOK_FILE', 256);
define('SWOOLE_HOOK_STDIO', 32768);
define('SWOOLE_HOOK_SLEEP', 512);
define('SWOOLE_HOOK_PROC', 1024);
define('SWOOLE_HOOK_CURL', 2048);
define('SWOOLE_HOOK_NATIVE_CURL', 4096);
define('SWOOLE_HOOK_BLOCKING_FUNCTION', 8192);
define('SWOOLE_HOOK_SOCKETS', 16384);
define('SWOOLE_HOOK_ALL', 2147481599);
define('SOCKET_ECANCELED', 125);
define('SWOOLE_HTTP_CLIENT_ESTATUS_CONNECT_FAILED', -1);
define('SWOOLE_HTTP_CLIENT_ESTATUS_REQUEST_TIMEOUT', -2);
define('SWOOLE_HTTP_CLIENT_ESTATUS_SERVER_RESET', -3);
define('SWOOLE_HTTP_CLIENT_ESTATUS_SEND_FAILED', -4);
define('SWOOLE_MYSQLND_CR_UNKNOWN_ERROR', 2000);
define('SWOOLE_MYSQLND_CR_CONNECTION_ERROR', 2002);
define('SWOOLE_MYSQLND_CR_SERVER_GONE_ERROR', 2006);
define('SWOOLE_MYSQLND_CR_OUT_OF_MEMORY', 2008);
define('SWOOLE_MYSQLND_CR_SERVER_LOST', 2013);
define('SWOOLE_MYSQLND_CR_COMMANDS_OUT_OF_SYNC', 2014);
define('SWOOLE_MYSQLND_CR_CANT_FIND_CHARSET', 2019);
define('SWOOLE_MYSQLND_CR_MALFORMED_PACKET', 2027);
define('SWOOLE_MYSQLND_CR_NOT_IMPLEMENTED', 2054);
define('SWOOLE_MYSQLND_CR_NO_PREPARE_STMT', 2030);
define('SWOOLE_MYSQLND_CR_PARAMS_NOT_BOUND', 2031);
define('SWOOLE_MYSQLND_CR_INVALID_PARAMETER_NO', 2034);
define('SWOOLE_MYSQLND_CR_INVALID_BUFFER_USE', 2035);
define('SWOOLE_REDIS_MODE_MULTI', 0);
define('SWOOLE_REDIS_MODE_PIPELINE', 1);
define('SWOOLE_REDIS_TYPE_NOT_FOUND', 0);
define('SWOOLE_REDIS_TYPE_STRING', 1);
define('SWOOLE_REDIS_TYPE_SET', 2);
define('SWOOLE_REDIS_TYPE_LIST', 3);
define('SWOOLE_REDIS_TYPE_ZSET', 4);
define('SWOOLE_REDIS_TYPE_HASH', 5);
define('SWOOLE_REDIS_ERR_IO', 1);
define('SWOOLE_REDIS_ERR_OTHER', 2);
define('SWOOLE_REDIS_ERR_EOF', 3);
define('SWOOLE_REDIS_ERR_PROTOCOL', 4);
define('SWOOLE_REDIS_ERR_OOM', 5);
define('SWOOLE_REDIS_ERR_CLOSED', 6);
define('SWOOLE_REDIS_ERR_NOAUTH', 7);
define('SWOOLE_REDIS_ERR_ALLOC', 8);
define('SWOOLE_HTTP2_TYPE_DATA', 0);
define('SWOOLE_HTTP2_TYPE_HEADERS', 1);
define('SWOOLE_HTTP2_TYPE_PRIORITY', 2);
define('SWOOLE_HTTP2_TYPE_RST_STREAM', 3);
define('SWOOLE_HTTP2_TYPE_SETTINGS', 4);
define('SWOOLE_HTTP2_TYPE_PUSH_PROMISE', 5);
define('SWOOLE_HTTP2_TYPE_PING', 6);
define('SWOOLE_HTTP2_TYPE_GOAWAY', 7);
define('SWOOLE_HTTP2_TYPE_WINDOW_UPDATE', 8);
define('SWOOLE_HTTP2_TYPE_CONTINUATION', 9);
define('SWOOLE_HTTP2_ERROR_NO_ERROR', 0);
define('SWOOLE_HTTP2_ERROR_PROTOCOL_ERROR', 1);
define('SWOOLE_HTTP2_ERROR_INTERNAL_ERROR', 2);
define('SWOOLE_HTTP2_ERROR_FLOW_CONTROL_ERROR', 3);
define('SWOOLE_HTTP2_ERROR_SETTINGS_TIMEOUT', 4);
define('SWOOLE_HTTP2_ERROR_STREAM_CLOSED', 5);
define('SWOOLE_HTTP2_ERROR_FRAME_SIZE_ERROR', 6);
define('SWOOLE_HTTP2_ERROR_REFUSED_STREAM', 7);
define('SWOOLE_HTTP2_ERROR_CANCEL', 8);
define('SWOOLE_HTTP2_ERROR_COMPRESSION_ERROR', 9);
define('SWOOLE_HTTP2_ERROR_CONNECT_ERROR', 10);
define('SWOOLE_HTTP2_ERROR_ENHANCE_YOUR_CALM', 11);
define('SWOOLE_HTTP2_ERROR_INADEQUATE_SECURITY', 12);
define('SWOOLE_BASE', 1);
define('SWOOLE_PROCESS', 2);
define('SWOOLE_IPC_UNSOCK', 1);
define('SWOOLE_IPC_MSGQUEUE', 2);
define('SWOOLE_IPC_PREEMPTIVE', 3);
define('SWOOLE_SERVER_COMMAND_MASTER', 2);
define('SWOOLE_SERVER_COMMAND_MANAGER', 32);
define('SWOOLE_SERVER_COMMAND_REACTOR_THREAD', 4);
define('SWOOLE_SERVER_COMMAND_EVENT_WORKER', 8);
define('SWOOLE_SERVER_COMMAND_WORKER', 8);
define('SWOOLE_SERVER_COMMAND_TASK_WORKER', 16);
define('SWOOLE_DISPATCH_ROUND', 1);
define('SWOOLE_DISPATCH_FDMOD', 2);
define('SWOOLE_DISPATCH_IDLE_WORKER', 3);
define('SWOOLE_DISPATCH_IPMOD', 4);
define('SWOOLE_DISPATCH_UIDMOD', 5);
define('SWOOLE_DISPATCH_USERFUNC', 6);
define('SWOOLE_DISPATCH_STREAM', 7);
define('SWOOLE_DISPATCH_CO_CONN_LB', 8);
define('SWOOLE_DISPATCH_CO_REQ_LB', 9);
define('SWOOLE_DISPATCH_RESULT_DISCARD_PACKET', -1);
define('SWOOLE_DISPATCH_RESULT_CLOSE_CONNECTION', -2);
define('SWOOLE_DISPATCH_RESULT_USERFUNC_FALLBACK', -3);
define('SWOOLE_TASK_TMPFILE', 1);
define('SWOOLE_TASK_SERIALIZE', 2);
define('SWOOLE_TASK_NONBLOCK', 4);
define('SWOOLE_TASK_CALLBACK', 8);
define('SWOOLE_TASK_WAITALL', 16);
define('SWOOLE_TASK_COROUTINE', 32);
define('SWOOLE_TASK_PEEK', 64);
define('SWOOLE_TASK_NOREPLY', 128);
define('SWOOLE_WORKER_BUSY', 1);
define('SWOOLE_WORKER_IDLE', 2);
define('SWOOLE_WORKER_EXIT', 3);
define('SWOOLE_WEBSOCKET_STATUS_CONNECTION', 1);
define('SWOOLE_WEBSOCKET_STATUS_HANDSHAKE', 2);
define('SWOOLE_WEBSOCKET_STATUS_ACTIVE', 3);
define('SWOOLE_WEBSOCKET_STATUS_CLOSING', 4);
define('SWOOLE_WEBSOCKET_OPCODE_CONTINUATION', 0);
define('SWOOLE_WEBSOCKET_OPCODE_TEXT', 1);
define('SWOOLE_WEBSOCKET_OPCODE_BINARY', 2);
define('SWOOLE_WEBSOCKET_OPCODE_CLOSE', 8);
define('SWOOLE_WEBSOCKET_OPCODE_PING', 9);
define('SWOOLE_WEBSOCKET_OPCODE_PONG', 10);
define('SWOOLE_WEBSOCKET_FLAG_FIN', 1);
define('SWOOLE_WEBSOCKET_FLAG_RSV1', 4);
define('SWOOLE_WEBSOCKET_FLAG_RSV2', 8);
define('SWOOLE_WEBSOCKET_FLAG_RSV3', 16);
define('SWOOLE_WEBSOCKET_FLAG_MASK', 32);
define('SWOOLE_WEBSOCKET_FLAG_COMPRESS', 2);
define('SWOOLE_WEBSOCKET_CLOSE_NORMAL', 1000);
define('SWOOLE_WEBSOCKET_CLOSE_GOING_AWAY', 1001);
define('SWOOLE_WEBSOCKET_CLOSE_PROTOCOL_ERROR', 1002);
define('SWOOLE_WEBSOCKET_CLOSE_DATA_ERROR', 1003);
define('SWOOLE_WEBSOCKET_CLOSE_STATUS_ERROR', 1005);
define('SWOOLE_WEBSOCKET_CLOSE_ABNORMAL', 1006);
define('SWOOLE_WEBSOCKET_CLOSE_MESSAGE_ERROR', 1007);
define('SWOOLE_WEBSOCKET_CLOSE_POLICY_ERROR', 1008);
define('SWOOLE_WEBSOCKET_CLOSE_MESSAGE_TOO_BIG', 1009);
define('SWOOLE_WEBSOCKET_CLOSE_EXTENSION_MISSING', 1010);
define('SWOOLE_WEBSOCKET_CLOSE_SERVER_ERROR', 1011);
define('SWOOLE_WEBSOCKET_CLOSE_TLS', 1015);
define('WEBSOCKET_STATUS_CONNECTION', 1);
define('WEBSOCKET_STATUS_HANDSHAKE', 2);
define('WEBSOCKET_STATUS_FRAME', 3);
define('WEBSOCKET_STATUS_ACTIVE', 3);
define('WEBSOCKET_STATUS_CLOSING', 4);
define('WEBSOCKET_OPCODE_CONTINUATION', 0);
define('WEBSOCKET_OPCODE_TEXT', 1);
define('WEBSOCKET_OPCODE_BINARY', 2);
define('WEBSOCKET_OPCODE_CLOSE', 8);
define('WEBSOCKET_OPCODE_PING', 9);
define('WEBSOCKET_OPCODE_PONG', 10);
define('WEBSOCKET_CLOSE_NORMAL', 1000);
define('WEBSOCKET_CLOSE_GOING_AWAY', 1001);
define('WEBSOCKET_CLOSE_PROTOCOL_ERROR', 1002);
define('WEBSOCKET_CLOSE_DATA_ERROR', 1003);
define('WEBSOCKET_CLOSE_STATUS_ERROR', 1005);
define('WEBSOCKET_CLOSE_ABNORMAL', 1006);
define('WEBSOCKET_CLOSE_MESSAGE_ERROR', 1007);
define('WEBSOCKET_CLOSE_POLICY_ERROR', 1008);
define('WEBSOCKET_CLOSE_MESSAGE_TOO_BIG', 1009);
define('WEBSOCKET_CLOSE_EXTENSION_MISSING', 1010);
define('WEBSOCKET_CLOSE_SERVER_ERROR', 1011);
define('WEBSOCKET_CLOSE_TLS', 1015);
<?php

use JetBrains\PhpStorm\ArrayShape;

/**
 * (PHP 5 &gt;= 5.5.5, PECL ZendOpcache &gt;= 7.0.2 )<br/>
 * Compiles and caches a PHP script without executing it
 * @link https://secure.php.net/manual/en/function.opcache-compile-file.php
 * @param string $filename The path to the PHP script to be compiled.
 * @return bool
 * Returns <b>TRUE</b> if the opcode cache for <em>script</em> was
 * invalidated or if there was nothing to invalidate, or <b>FALSE</b> if the opcode
 * cache is disabled.
 * @since 5.5
 */
function opcache_compile_file(string $filename): bool {}

/**
 * (PHP 5 &gt;= 5.5.0, PECL ZendOpcache &gt;= 7.0.0 )<br/>
 * Invalidates a cached script
 * @link https://secure.php.net/manual/en/function.opcache-invalidate.php
 * @param string $filename <p>The path to the script being invalidated.</p>
 * @param bool $force [optional] <p> If set to <b>TRUE</b>, the script will be invalidated regardless of whether invalidation is necessary.</p>
 * @return bool
 * Returns <b>TRUE</b> if the opcode cache for <em>script</em> was
 * invalidated or if there was nothing to invalidate, or <b>FALSE</b> if the opcode
 * cache is disabled.
 * @since 5.5
 */
function opcache_invalidate(string $filename, bool $force = false): bool {}

/**
 * (PHP 5 &gt;= 5.5.0, PECL ZendOpcache &gt;= 7.0.0 )<br/>
 * Resets the contents of the opcode cache
 * @link https://secure.php.net/manual/en/function.opcache-reset.php
 * @return bool Returns <b>TRUE</b> if the opcode cache was reset, or <b>FALSE</b> if the opcode cache is disabled.
 * @since 5.5
 */
function opcache_reset(): bool {}

/**
 * (PHP 5 &gt;= 5.5.5, PECL ZendOpcache &gt;= 7.0.2 )<br/>
 * Get status information about the cache
 * @link https://php.net/manual/en/function.opcache-get-status.php
 * @param bool $include_scripts <p>Include script specific state information</p>
 * @return array|false <p>Returns an array of information, optionally containing script specific state information</p>
 * @since 5.5
 */
#[ArrayShape([
    'opcache_enabled' => 'bool',
    'file_cache' => 'string',
    'file_cache_only' => 'bool',
    'cache_full' => 'bool',
    'restart_pending' => 'bool',
    'restart_in_progress' => 'bool',
    'memory_usage' => 'array',
    'interned_strings_usage' => 'array',
    'opcache_statistics' => 'array',
    'preload_statistics' => 'array',
    'scripts' => 'array',
    'jit' => 'array',
])]
function opcache_get_status(bool $include_scripts = true): array|false {}

/**
 * (PHP 5 &gt;= 5.5.5, PECL ZendOpcache &gt;= 7.0.2 )<br/>
 * Get configuration information about the cache
 * @link https://php.net/manual/en/function.opcache-get-configuration.php
 * @return array|false <p>Returns an array of information, including ini, blacklist and version</p>
 * @since 5.5
 */
#[ArrayShape(["directives" => "array", "version" => "string[]", "blacklist" => "array"])]
function opcache_get_configuration(): array|false {}

/**
 * (PHP 5 &gt;= 5.6, PECL ZendOpcache &gt;= 7.0.4 )<br/>
 * This function checks if a PHP script has been cached in OPCache.
 * This can be used to more easily detect the "warming" of the cache for a particular script.
 * @link https://secure.php.net/manual/en/function.opcache-is-script-cached.php
 * @param string $filename The path to the PHP script to be checked.
 * @return bool Returns TRUE if file is cached in OPCache, FALSE otherwise.
 * @since 5.6
 */
function opcache_is_script_cached(string $filename): bool {}
<?php

namespace Parle;

class Token
{
    /* Constants */
    /** @var int End of input token id. */
    public const EOI = 0;

    /** @var int Unknown token id. */
    public const UNKNOWN = -1;

    /** @var int Skip token id. */
    public const SKIP = -2;

    /* Properties */
    /** @var int Token id. */
    public $id;

    /** @var string Token value. */
    public $value;
}
<?php

namespace Parle;

use Exception;
use Throwable;

class LexerException extends Exception implements Throwable {}
<?php

namespace Parle;

use JetBrains\PhpStorm\Immutable;

class Stack
{
    /* Properties */
    /**
     * @var bool Whether the stack is empty, readonly.
     */
    #[Immutable]
    public $empty = true;

    /**
     * @var int Stack size, readonly.
     */
    #[Immutable]
    public $size = 0;

    /**
     * @var mixed Element on the top of the stack.
     */
    public $top;

    /* Methods */
    /**
     * Pop an item from the stack
     *
     * @link https://php.net/manual/en/parle-stack.pop.php
     * @return void
     */
    public function pop(): void {}

    /**
     * Push an item into the stack
     *
     * @link https://php.net/manual/en/parle-stack.push.php
     * @param mixed $item Variable to be pushed.
     * @return void
     */
    public function push($item) {}
}
<?php

namespace Parle;

use JetBrains\PhpStorm\Immutable;

class RParser
{
    /* Constants */
    public const ACTION_ERROR = 0;
    public const ACTION_SHIFT = 1;
    public const ACTION_REDUCE = 2;
    public const ACTION_GOTO = 3;
    public const ACTION_ACCEPT = 4;
    public const ERROR_SYNTAX = 0;
    public const ERROR_NON_ASSOCIATIVE = 1;
    public const ERROR_UNKNOWN_TOKEN = 2;

    /* Properties */
    /**
     * @var int Current parser action that matches one of the action class constants, readonly.
     */
    #[Immutable]
    public $action = 0;

    /**
     * @var int Grammar rule id just processed in the reduce action. The value corresponds either to a token or to a production id. Readonly.
     */
    #[Immutable]
    public $reduceId = 0;

    /* Methods */
    /**
     * Process next parser rule.
     *
     * @link https://php.net/manual/en/parle-rparser.advance.php
     * @return void
     */
    public function advance(): void {}

    /**
     * Finalize the grammar rules
     *
     * Any tokens and grammar rules previously added are finalized.
     * The rule set becomes readonly and the parser is ready to start.
     *
     * @link https://php.net/manual/en/parle-rparser.build.php
     * @return void
     */
    public function build(): void {}

    /**
     * Consume the data for parsing.
     *
     * @link https://php.net/manual/en/parle-rparser.consume.php
     * @param string $data Data to be parsed.
     * @param Lexer $lexer A lexer object containing the lexing rules prepared for the particular grammar.
     * @return void
     */
    public function consume(string $data, Lexer $lexer): void {}

    /**
     * Dump the current grammar to stdout.
     *
     * @link https://php.net/manual/en/parle-rparser.dump.php
     * @return void
     */
    public function dump(): void {}

    /**
     * Retrieve the error information in case Parle\RParser::action() returned the error action.
     *
     * @link https://php.net/manual/en/parle-rparser.errorinfo.php
     * @return ErrorInfo
     */
    public function errorInfo(): ErrorInfo {}

    /**
     * Declare a terminal with left associativity.
     *
     * @link https://php.net/manual/en/parle-rparser.left.php
     * @param string $token Token name.
     * @return void
     */
    public function left(string $token): void {}

    /**
     * Declare a token with no associativity
     *
     * Declare a terminal, that cannot appear more than once in the row.
     *
     * @link https://php.net/manual/en/parle-rparser.nonassoc.php
     * @param string $token Token name.
     * @return void
     */
    public function nonassoc(string $token): void {}

    /**
     * Declare a precedence rule
     *
     * Declares a precedence rule for a fictitious terminal symbol.
     * This rule can be later used in the specific grammar rules.
     *
     * @link https://php.net/manual/en/parle-rparser.precedence.php
     * @param string $token
     * @return void
     */
    public function precedence(string $token): void {}

    /**
     * Push a grammar rule.
     *
     * The production id returned can be used later in the parsing process to identify the rule matched.
     *
     * @link https://php.net/manual/en/parle-rparser.push.php
     * @param string $name Rule name.
     * @param string $rule The rule to be added. The syntax is Bison compatible.
     * @return int Returns integer representing the rule index.
     */
    public function push(string $name, string $rule): int {}

    /**
     * Reset parser state using the given token id.
     *
     * @link https://php.net/manual/en/parle-rparser.reset.php
     * @param int $tokenId Token id.
     * @return void
     */
    public function reset(int $tokenId): void {}

    /**
     * Declare a token with right-associativity
     *
     * @link https://php.net/manual/en/parle-rparser.right.php
     * @param string $token Token name.
     * @return void
     */
    public function right(string $token): void {}

    /**
     * Retrieve a matching part of a rule
     *
     * Retrieve a part of the match by a rule.
     * This method is equivalent to the pseudo variable functionality in Bison.
     *
     * @link https://php.net/manual/en/parle-rparser.sigil.php
     * @param int $idx Match index, zero based.
     * @return string Returns a string with the matched part.
     */
    public function sigil(int $idx): string {}

    /**
     * Declare a token
     *
     * Declare a terminal to be used in the grammar.
     *
     * @link https://php.net/manual/en/parle-rparser.token.php
     * @param string $token Token name.
     * @return void
     */
    public function token(string $token): void {}

    /**
     * Get token id
     *
     * Retrieve the id of the named token.
     *
     * @link https://php.net/manual/en/parle-rparser.tokenid.php
     * @param string $token Name of the token as used in Parle\Parser::token().
     * @return int Returns integer representing the token id.
     * @see Parser::token()
     */
    public function tokenId(string $token): int {}

    /**
     * Trace the parser operation
     *
     * Retrieve the current parser operation description.
     * This can be especially useful for studying the parser and to optimize the grammar.
     *
     * @link https://php.net/manual/en/parle-rparser.trace.php
     * @return string Returns a string with the trace information.
     */
    public function trace(): string {}

    /**
     * Validate an input string.
     *
     * The string is parsed internally, thus this method is useful for the quick input validation.
     *
     * @link https://php.net/manual/en/parle-rparser.validate.php
     * @param string $data String to be validated.
     * @param RLexer $lexer A lexer object containing the lexing rules prepared for the particular grammar.
     * @return bool Returns boolean witnessing whether the input chimes or not with the defined rules.
     */
    public function validate(string $data, RLexer $lexer): bool {}
}
<?php

namespace Parle;

use JetBrains\PhpStorm\Immutable;

/**
 * Single state lexer class.
 *
 * Lexemes can be defined on the fly.
 * If the particular lexer instance is meant to be used with Parle\Parser, the token IDs need to be taken from there.
 * Otherwise, arbitrary token IDs can be supplied. This lexer can give a certain performance advantage over Parle\RLexer,
 * if no multiple states are required. Note, that Parle\RParser is not compatible with this lexer.
 *
 * @see Parser
 * @package Parle
 */
class Lexer
{
    /* Constants */
    public const ICASE = 1;
    public const DOT_NOT_LF = 2;
    public const DOT_NOT_CRLF = 4;
    public const SKIP_WS = 8;
    public const MATCH_ZERO_LEN = 16;

    /* Properties */
    /**
     * @var bool Start of input flag.
     */
    public $bol = false;

    /**
     * @var int Lexer flags.
     */
    public $flags = 0;

    /**
     * @var int Current lexer state, readonly.
     */
    #[Immutable]
    public $state = 0;

    /**
     * @var int Position of the latest token match, readonly.
     */
    #[Immutable]
    public $marker = 0;

    /**
     * @var int Current input offset, readonly.
     */
    #[Immutable]
    public $cursor = 0;

    /* Methods */

    /**
     * Processes the next rule and prepares the resulting token data.
     *
     * @link https://php.net/manual/en/parle-lexer.advance.php
     * @return void
     */
    public function advance(): void {}

    /**
     * Finalize the lexer rule set
     *
     * Rules, previously added with Parle\Lexer::push() are finalized.
     * This method call has to be done after all the necessary rules was pushed.
     * The rule set becomes read only. The lexing can begin.
     *
     * @see Lexer::push()
     * @link https://php.net/manual/en/parle-lexer.build.php
     * @return void
     */
    public function build(): void {}

    /**
     * Define token callback
     *
     * Define a callback to be invoked once lexer encounters a particular token.
     *
     * @link https://php.net/manual/en/parle-lexer.callout.php
     * @param int $id Token id.
     * @param callable $callback Callable to be invoked. The callable doesn't receive any arguments and its return value is ignored.
     * @return void
     */
    public function callout(int $id, callable $callback): void {}

    /**
     * Consume the data for lexing.
     *
     * @link https://php.net/manual/en/parle-lexer.consume.php
     * @param string $data Data to be lexed.
     * @return void
     */
    public function consume(string $data): void {}

    /**
     * Dump the current state machine to stdout.
     *
     * @link https://php.net/manual/en/parle-lexer.dump.php
     * @return void
     */
    public function dump(): void {}

    /**
     * Retrieve the current token.
     *
     * @return Token
     */
    public function getToken(): Token {}

    /**
     * Insert a regex macro, that can be later used as a shortcut and included in other regular expressions.
     *
     * @see https://php.net/manual/en/parle-lexer.insertmacro.php
     * @param string $name Name of the macros.
     * @param string $regex Regular expression.
     * @return void
     */
    public function insertMacro(string $name, string $regex): void {}

    /**
     * Push a pattern for lexeme recognition.
     *
     * @param string $regex Regular expression used for token matching.
     * @param int $id Token id. If the lexer instance is meant to be used standalone, this can be an arbitrary number. If the lexer instance is going to be passed to the parser, it has to be an id returned by Parle\Parser::tokenid().
     * @return void
     */
    public function push(string $regex, int $id): void {}

    /**
     * Reset lexing optionally supplying the desired offset.
     *
     * @param int $pos Reset position.
     */
    public function reset(int $pos): void {}
}
<?php

namespace Parle;

use JetBrains\PhpStorm\Immutable;

/**
 * Parser class.
 *
 * Rules can be defined on the fly. Once finalized, a Parle\Lexer instance is required to deliver the token stream.
 *
 * @see Lexer
 * @package Parle
 */
class Parser
{
    /* Constants */
    public const ACTION_ERROR = 0;
    public const ACTION_SHIFT = 1;
    public const ACTION_REDUCE = 2;
    public const ACTION_GOTO = 3;
    public const ACTION_ACCEPT = 4;
    public const ERROR_SYNTAX = 0;
    public const ERROR_NON_ASSOCIATIVE = 1;
    public const ERROR_UNKNOWN_TOKEN = 2;

    /* Properties */
    /**
     * @var int Current parser action that matches one of the action class constants, readonly.
     */
    #[Immutable]
    public $action = 0;

    /**
     * @var int Grammar rule id just processed in the reduce action. The value corresponds either to a token or to a production id. Readonly.
     */
    #[Immutable]
    public $reduceId = 0;

    /* Methods */
    /**
     * Process next parser rule.
     *
     * @link https://php.net/manual/en/parle-parser.advance.php
     * @return void
     */
    public function advance(): void {}

    /**
     * Finalize the grammar rules
     *
     * Any tokens and grammar rules previously added are finalized.
     * The rule set becomes readonly and the parser is ready to start.
     *
     * @link https://php.net/manual/en/parle-parser.build.php
     * @return void
     */
    public function build(): void {}

    /**
     * Consume the data for parsing.
     *
     * @link https://php.net/manual/en/parle-parser.consume.php
     * @param string $data Data to be parsed.
     * @param Lexer $lexer A lexer object containing the lexing rules prepared for the particular grammar.
     * @return void
     */
    public function consume(string $data, Lexer $lexer): void {}

    /**
     * Dump the current grammar to stdout.
     *
     * @link https://php.net/manual/en/parle-parser.dump.php
     * @return void
     */
    public function dump(): void {}

    /**
     * Retrieve the error information in case Parle\Parser::action() returned the error action.
     *
     * @link https://php.net/manual/en/parle-parser.errorinfo.php
     * @return ErrorInfo
     */
    public function errorInfo(): ErrorInfo {}

    /**
     * Declare a terminal with left associativity.
     *
     * @link https://php.net/manual/en/parle-parser.left.php
     * @param string $token Token name.
     * @return void
     */
    public function left(string $token): void {}

    /**
     * Declare a terminal, that cannot appear more than once in the row.
     *
     * @link https://php.net/manual/en/parle-parser.nonassoc.php
     * @param string $token Token name.
     * @return void
     */
    public function nonassoc(string $token): void {}

    /**
     * Declares a precedence rule for a fictitious terminal symbol.
     * This rule can be later used in the specific grammar rules.
     *
     * @link https://php.net/manual/en/parle-parser.precedence.php
     * @param string $token
     * @return void
     */
    public function precedence(string $token): void {}

    /**
     * Push a grammar rule.
     * The production id returned can be used later in the parsing process to identify the rule matched.
     *
     * @link https://php.net/manual/en/parle-parser.push.php
     * @param string $name Rule name.
     * @param string $rule The rule to be added. The syntax is Bison compatible.
     * @return int Returns integer representing the rule index.
     */
    public function push(string $name, string $rule): int {}

    /**
     * Reset parser state using the given token id.
     *
     * @link https://php.net/manual/en/parle-parser.reset.php
     * @param int $tokenId Token id.
     * @return void
     */
    public function reset(int $tokenId): void {}

    /**
     * Declare a token with right-associativity
     *
     * @link https://php.net/manual/en/parle-parser.right.php
     * @param string $token Token name.
     * @return void
     */
    public function right(string $token): void {}

    /**
     * Retrieve a part of the match by a rule.
     * This method is equivalent to the pseudo variable functionality in Bison.
     *
     * @link https://php.net/manual/en/parle-parser.sigil.php
     * @param int $idx Match index, zero based.
     * @return string Returns a string with the matched part.
     */
    public function sigil(int $idx): string {}

    /**
     * Declare a terminal to be used in the grammar.
     *
     * @link https://php.net/manual/en/parle-parser.token.php
     * @param string $token Token name.
     * @return void
     */
    public function token(string $token): void {}

    /**
     * Retrieve the id of the named token.
     *
     * @link https://php.net/manual/en/parle-parser.tokenid.php
     * @param string $token Name of the token as used in Parle\Parser::token().
     * @return int Returns integer representing the token id.
     * @see Parser::token()
     */
    public function tokenId(string $token): int {}

    /**
     * Retrieve the current parser operation description.
     * This can be especially useful for studying the parser and to optimize the grammar.
     *
     * @link https://php.net/manual/en/parle-parser.trace.php
     * @return string Returns a string with the trace information.
     */
    public function trace(): string {}

    /**
     * Validate an input string.
     * The string is parsed internally, thus this method is useful for the quick input validation.
     *
     * @link https://php.net/manual/en/parle-parser.validate.php
     * @param string $data String to be validated.
     * @param Lexer $lexer A lexer object containing the lexing rules prepared for the particular grammar.
     * @return bool Returns boolean witnessing whether the input chimes or not with the defined rules.
     */
    public function validate(string $data, Lexer $lexer): bool {}
}
<?php

namespace Parle;

use JetBrains\PhpStorm\Immutable;

/**
 * Multistate lexer class.
 * Lexemes can be defined on the fly. If the particular lexer instance is meant to be used with Parle\RParser,
 * the token IDs need to be taken from there. Otherwise, arbitrary token IDs can be supplied.
 * Note, that Parle\Parser is not compatible with this lexer.
 *
 * @see RParser
 * @package Parle
 */
class RLexer
{
    /* Constants */
    public const ICASE = 1;
    public const DOT_NOT_LF = 2;
    public const DOT_NOT_CRLF = 4;
    public const SKIP_WS = 8;
    public const MATCH_ZERO_LEN = 16;

    /* Properties */
    /**
     * @var bool Start of input flag.
     */
    public $bol = false;

    /**
     * @var int Lexer flags.
     */
    public $flags = 0;

    /**
     * @var int Current lexer state, readonly.
     */
    #[Immutable]
    public $state = 0;

    /**
     * @var int Position of the latest token match, readonly.
     */
    #[Immutable]
    public $marker = 0;

    /**
     * @var int Current input offset, readonly.
     */
    #[Immutable]
    public $cursor = 0;

    /* Methods */

    /**
     * Processes the next rule and prepares the resulting token data.
     *
     * @link https://php.net/manual/en/parle-rlexer.advance.php
     * @return void
     */
    public function advance(): void {}

    /**
     * Finalize the lexer rule set
     *
     * Rules, previously added with Parle\RLexer::push() are finalized.
     * This method call has to be done after all the necessary rules was pushed.
     * The rule set becomes read only. The lexing can begin.
     *
     * @link https://php.net/manual/en/parle-rlexer.build.php
     * @see RLexer::push()
     * @return void
     */
    public function build(): void {}

    /**
     * Define token callback
     *
     * Define a callback to be invoked once lexer encounters a particular token.
     *
     * @see https://php.net/manual/en/parle-rlexer.callout.php
     * @param int $id Token id.
     * @param callable $callback Callable to be invoked. The callable doesn't receive any arguments and its return value is ignored.
     * @return void
     */
    public function callout(int $id, callable $callback): void {}

    /**
     * Pass the data for processing
     *
     * Consume the data for lexing.
     *
     * @see https://php.net/manual/en/parle-rlexer.consume.php
     * @param string $data Data to be lexed.
     * @return void
     */
    public function consume(string $data): void {}

    /**
     * Dump the state machine
     *
     * Dump the current state machine to stdout.
     *
     * @see https://php.net/manual/en/parle-rlexer.dump.php
     * @return void
     */
    public function dump(): void {}

    /**
     * Retrieve the current token.
     *
     * @return Token
     */
    public function getToken(): Token {}

    /**
     * Add a lexer rule
     *
     * Push a pattern for lexeme recognition.
     * A 'start state' and 'exit state' can be specified by using a suitable signature.
     *
     * @param string $regex Regular expression used for token matching.
     * @param int $id
     * Token id. If the lexer instance is meant to be used standalone, this can be an arbitrary number.
     * If the lexer instance is going to be passed to the parser, it has to be an id returned by Parle\RParser::tokenid().
     * @see RParser::tokenId()
     * @return void
     * @link https://php.net/manual/en/parle-rlexer.push.php
     */
    public function push(string $regex, int $id): void {}

    /**
     * Add a lexer rule
     *
     * Push a pattern for lexeme recognition.
     * A 'start state' and 'exit state' can be specified by using a suitable signature.
     *
     * @param string $state State name. If '*' is used as start state, then the rule is applied to all lexer states.
     * @param string $regex Regular expression used for token matching.
     * @param int $id
     * Token id. If the lexer instance is meant to be used standalone, this can be an arbitrary number.
     * If the lexer instance is going to be passed to the parser, it has to be an id returned by Parle\RParser::tokenid().
     * @see RParser::tokenId()
     * @param string $newState
     * New state name, after the rule was applied.
     * If '.' is specified as the exit state, then the lexer state is unchanged when that rule matches.
     * An exit state with '>' before the name means push. Use the signature without id for either continuation or to
     * start matching, when a continuation or recursion is required.
     * If '<' is specified as exit state, it means pop. In that case, the signature containing the id can be used to
     * identify the match. Note that even in the case an id is specified, the rule will finish first when all the
     * previous pushes popped.
     * @return void
     * @link https://php.net/manual/en/parle-rlexer.push.php
     */
    public function push(string $state, string $regex, int $id, string $newState): void {}

    /**
     * Add a lexer rule
     *
     * Push a pattern for lexeme recognition.
     * A 'start state' and 'exit state' can be specified by using a suitable signature.
     *
     * @param string $state State name. If '*' is used as start state, then the rule is applied to all lexer states.
     * @param string $regex Regular expression used for token matching.
     * @param string $newState
     * New state name, after the rule was applied.
     * If '.' is specified as the exit state, then the lexer state is unchanged when that rule matches.
     * An exit state with '>' before the name means push. Use the signature without id for either continuation or to
     * start matching, when a continuation or recursion is required.
     * If '<' is specified as exit state, it means pop. In that case, the signature containing the id can be used to
     * identify the match. Note that even in the case an id is specified, the rule will finish first when all the
     * previous pushes popped.
     * @return void
     * @link https://php.net/manual/en/parle-rlexer.push.php
     */
    public function push(string $state, string $regex, string $newState): void {}

    /**
     * Push a new start state
     * This lexer type can have more than one state machine.
     * This allows you to lex different tokens depending on context, thus allowing simple parsing to take place.
     * Once a state pushed, it can be used with a suitable Parle\RLexer::push() signature variant.
     *
     * @see RLexer::push()
     * @link https://php.net/manual/en/parle-rlexer.pushstate.php
     * @param string $state Name of the state.
     * @return int
     */
    public function pushState(string $state): int {}

    /**
     * Reset lexer
     *
     * Reset lexing optionally supplying the desired offset.
     *
     * @param int $pos Reset position.
     */
    public function reset(int $pos): void {}
}
<?php

namespace Parle;

use Exception;
use Throwable;

class ParserException extends Exception implements Throwable {}
<?php

namespace Parle;

class ErrorInfo
{
    /* Properties */
    /** @var int Error id. */
    public $id;

    /** @var int Position in the input, where the error occurred. */
    public $position;

    /** @var Token|null If applicable - the Parle\Token related to the error, otherwise NULL. */
    public $token;
}
<?php
/**
 * mysql_xdevapi extension stubs
 * @link https://secure.php.net/manual/en/book.mysql-xdevapi.php
 * @version 0.3 2019-08-21
 * @author Mathijs Giesbers
 * @package mysql_xdevapi
 */

namespace mysql_xdevapi;

define('MYSQLX_LOCK_DEFAULT', 0);
define('MYSQLX_TYPE_DECIMAL', 0);
define('MYSQLX_TYPE_TINY', 1);
define('MYSQLX_TYPE_SHORT', 2);
define('MYSQLX_TYPE_SMALLINT', 17);
define('MYSQLX_TYPE_MEDIUMINT', 18);
define('MYSQLX_TYPE_INT', 19);
define('MYSQLX_TYPE_BIGINT', 20);
define('MYSQLX_TYPE_LONG', 3);
define('MYSQLX_TYPE_FLOAT', 4);
define('MYSQLX_TYPE_DOUBLE', 5);
define('MYSQLX_TYPE_NULL', 6);
define('MYSQLX_TYPE_TIMESTAMP', 7);
define('MYSQLX_TYPE_LONGLONG', 8);
define('MYSQLX_TYPE_INT24', 9);
define('MYSQLX_TYPE_DATE', 10);
define('MYSQLX_TYPE_TIME', 11);
define('MYSQLX_TYPE_DATETIME', 12);
define('MYSQLX_TYPE_YEAR', 13);
define('MYSQLX_TYPE_NEWDATE', 14);
define('MYSQLX_TYPE_ENUM', 247);
define('MYSQLX_TYPE_SET', 248);
define('MYSQLX_TYPE_TINY_BLOB', 249);
define('MYSQLX_TYPE_MEDIUM_BLOB', 250);
define('MYSQLX_TYPE_LONG_BLOB', 251);
define('MYSQLX_TYPE_BLOB', 252);
define('MYSQLX_TYPE_VAR_STRING', 253);
define('MYSQLX_TYPE_STRING', 254);
define('MYSQLX_TYPE_CHAR', 1);
define('MYSQLX_TYPE_BYTES', 21);
define('MYSQLX_TYPE_INTERVAL', 247);
define('MYSQLX_TYPE_GEOMETRY', 255);
define('MYSQLX_TYPE_JSON', 245);
define('MYSQLX_TYPE_NEWDECIMAL', 246);
define('MYSQLX_TYPE_BIT', 16);
define('MYSQLX_LOCK_NOWAIT', 1);
define('MYSQLX_LOCK_SKIP_LOCKED', 2);

/**
 * @link https://secure.php.net/manual/en/function.mysql-xdevapi-getsession.php
 * @param string $uri The URI to the MySQL server, such as mysqlx://user:password@host.
 * @return \mysql_xdevapi\Session
 */
function getSession($uri) {}

/**
 * @link https://www.php.net/manual/en/function.mysql-xdevapi-expression.php
 * @param string $expression Bind prepared statement variables as parameters
 * @return object
 */
function expression($expression) {}

/**
 * Interface BaseResult
 * @package mysql_xdevapi
 */
interface BaseResult
{
    /**
     * Fetch warnings from last operation
     * @link https://www.php.net/manual/en/mysql-xdevapi-baseresult.getwarnings.php
     * @return array
     */
    public function getWarnings(): array;

    /**
     * Fetch warning count from last operation
     * @link https://www.php.net/manual/en/mysql-xdevapi-baseresult.getwarningscount.php
     * @return int
     */
    public function getWarningsCount(): int;
}

/**
 * Class Collection
 * @link https://www.php.net/manual/en/class.mysql-xdevapi-collection.php
 * @package mysql_xdevapi
 */
class Collection
{
    /**
     * Collection constructor
     * @link https://www.php.net/manual/en/mysql-xdevapi-collection.construct.php
     */
    public function __construct() {}

    /**
     * Add collection document
     * @link https://www.php.net/manual/en/mysql-xdevapi-collection.add.php
     * @param mixed $document
     * @return \mysql_xdevapi\CollectionAdd
     */
    public function add($document): CollectionAdd {}

    /**
     * Add or replace collection document
     * @link https://www.php.net/manual/en/mysql-xdevapi-collection.addorreplaceone.php
     * @param string $id
     * @param mixed $document
     * @return \mysql_xdevapi\Result
     */
    public function addOrReplaceOne($id, $document): Result {}

    /**
     * Get document count
     * @link https://www.php.net/manual/en/mysql-xdevapi-collection.count.php
     * @return int The number of documents in the collection.
     */
    public function count(): int {}

    /**
     * Create collection index
     * @link https://www.php.net/manual/en/mysql-xdevapi-collection.createindex.php
     * @param string $index_name
     * @param string $index_desc_json
     */
    public function createIndex($index_name, $index_desc_json) {}

    /**
     * Drop collection index
     * @link https://www.php.net/manual/en/mysql-xdevapi-collection.dropindex.php
     * @param string $index_name
     * @return bool
     */
    public function dropIndex($index_name): bool {}

    /**
     * Check if collection exists in database
     * @link https://www.php.net/manual/en/mysql-xdevapi-collection.existsindatabase.php
     * @return bool
     */
    public function existsInDatabase(): bool {}

    /**
     * @link https://secure.php.net/manual/en/mysql-xdevapi-collection.find.php
     * @param string $search_condition
     * @return \mysql_xdevapi\CollectionFind
     */
    public function find($search_condition): CollectionFind {}

    /**
     * Get collection name
     * @link https://www.php.net/manual/en/mysql-xdevapi-collection.getname.php
     * @return string
     */
    public function getName(): string {}

    /**
     * Get one document
     * This is a shortcut for Collection.find("_id = :id").bind("id", id).execute().fetchOne();.
     * @link https://www.php.net/manual/en/mysql-xdevapi-collection.getone.php
     * @param string $id
     * @return mixed Null if object is not found
     */
    public function getOne($id) {}

    /**
     * Retrieve the schema object that contains the collection.
     * @link https://www.php.net/manual/en/mysql-xdevapi-collection.getschema.php
     * @return \mysql_xdevapi\Schema
     */
    public function getSchema(): Schema {}

    /**
     * Get a new Session object from the Collection object.
     * @link https://www.php.net/manual/en/mysql-xdevapi-collection.getsession.php
     * @return \mysql_xdevapi\Session
     */
    public function getSession(): Session {}

    /**
     * Modify collections that meet specific search conditions. Multiple operations are allowed, and parameter binding is supported.
     * @link https://www.php.net/manual/en/mysql-xdevapi-collection.modify.php
     * @param string $search_condition
     * @return \mysql_xdevapi\CollectionModify
     */
    public function modify($search_condition): CollectionModify {}

    /**
     * Remove collections that meet specific search conditions. Multiple operations are allowed, and parameter binding is supported.
     * @link https://www.php.net/manual/en/mysql-xdevapi-collection.remove.php
     * @param string $search_condition
     * @return \mysql_xdevapi\CollectionRemove
     */
    public function remove($search_condition): CollectionRemove {}

    /**
     * Remove one collection document
     * Remove one document from the collection with the corresponding ID. This is a shortcut for Collection.remove("_id = :id").bind("id", id).execute().
     * @link https://www.php.net/manual/en/mysql-xdevapi-collection.removeone.php
     * @param string $id
     * @return \mysql_xdevapi\Result
     */
    public function removeOne($id): Result {}

    /**
     * Updates (or replaces) the document identified by ID, if it exists.
     * @link https://www.php.net/manual/en/mysql-xdevapi-collection.removeone.php
     * @param string $id
     * @param string $doc
     * @return \mysql_xdevapi\Result
     */
    public function replaceOne($id, $doc): Result {}
}

/**
 * Class CollectionAdd
 * @package mysql_xdevapi
 */
class CollectionAdd implements \mysql_xdevapi\Executable
{
    /**
     * @return \mysql_xdevapi\Result
     */
    public function execute(): Result {}
}

/**
 * Class CollectionFind
 * @link https://www.php.net/manual/en/class.mysql-xdevapi-collectionfind.php
 * @package mysql_xdevapi
 */
class CollectionFind implements \mysql_xdevapi\Executable, \mysql_xdevapi\CrudOperationBindable, \mysql_xdevapi\CrudOperationLimitable, \mysql_xdevapi\CrudOperationSortable
{
    /**
     * Bind value to query placeholder
     * It allows the user to bind a parameter to the placeholder in the search condition of the find operation. The placeholder has the form of :NAME where ':' is a common prefix that must always exists before any NAME, NAME is the actual name of the placeholder. The bind function accepts a list of placeholders if multiple entities have to be substituted in the search condition.
     * @link https://www.php.net/manual/en/mysql-xdevapi-collectionfind.bind.php
     * @param array $placeholder_values
     * @return \mysql_xdevapi\CollectionFind
     */
    public function bind(array $placeholder_values): CollectionFind {}

    /**
     * Execute the find operation; this functionality allows for method chaining.
     * @link https://www.php.net/manual/en/mysql-xdevapi-collectionfind.execute.php
     * @return \mysql_xdevapi\DocResult
     */
    public function execute(): DocResult {}

    /**
     * Defined the columns for the query to return. If not defined then all columns are used.
     * @link https://www.php.net/manual/en/mysql-xdevapi-collectionfind.fields.php
     * @param string $projection
     * @return \mysql_xdevapi\CollectionFind
     */
    public function fields(string $projection): CollectionFind {}

    /**
     * This function can be used to group the result-set by one more columns, frequently this is used with aggregate functions like COUNT,MAX,MIN,SUM etc.
     * @link https://www.php.net/manual/en/mysql-xdevapi-collectionfind.groupby.php
     * @param string $sort_expr
     * @return \mysql_xdevapi\CollectionFind
     */
    public function groupBy(string $sort_expr): CollectionFind {}

    /**
     * This function can be used after the 'field' operation in order to make a selection on the documents to extract.
     * @link https://www.php.net/manual/en/mysql-xdevapi-collectionfind.having.php
     * @param string $sort_expr
     * @return \mysql_xdevapi\CollectionFind
     */
    public function having(string $sort_expr): CollectionFind {}

    /**
     * Set the maximum number of documents to return.
     * @link https://www.php.net/manual/en/mysql-xdevapi-collectionfind.limit.php
     * @param int $rows
     * @return \mysql_xdevapi\CollectionFind
     */
    public function limit(int $rows): CollectionFind {}

    /**
     * Execute operation with EXCLUSIVE LOCK
     *
     * Lock exclusively the document, other transactions are blocked from updating the document until the document is locked While the document is locked, other transactions are blocked from updating those docs, from doing SELECT ... LOCK IN SHARE MODE, or from reading the data in certain transaction isolation levels. Consistent reads ignore any locks set on the records that exist in the read view.
     * This feature is directly useful with the modify() command, to avoid concurrency problems. Basically, it serializes access to a row through row locking
     *
     * @link https://www.php.net/manual/en/mysql-xdevapi-collectionfind.lockexclusive.php
     *
     * @param int $lock_waiting_option
     * @return \mysql_xdevapi\CollectionFind
     */
    public function lockExclusive(int $lock_waiting_option): CollectionFind {}

    /**
     * Execute operation with SHARED LOCK
     *
     * Allows to share the documents between multiple transactions which are locking in shared mode.
     * Other sessions can read the rows, but cannot modify them until your transaction commits.
     * If any of these rows were changed by another transaction that has not yet committed,
     * your query waits until that transaction ends and then uses the latest values.
     *
     * @link https://www.php.net/manual/en/mysql-xdevapi-collectionfind.lockshared.php
     *
     * @param int $lock_waiting_option
     * @return \mysql_xdevapi\CollectionFind
     */
    public function lockShared(int $lock_waiting_option): CollectionFind {}

    /**
     * Skip given number of elements to be returned
     *
     * Skip (offset) these number of elements that otherwise would be returned by the find operation. Use with the limit() method.
     * Defining an offset larger than the result set size results in an empty set.
     *
     * @link https://www.php.net/manual/en/mysql-xdevapi-collectionfind.offset.php
     *
     * @param int $position
     * @return \mysql_xdevapi\CollectionFind
     */
    public function offset(int $position): CollectionFind {}

    /**
     * Set the sorting criteria
     *
     * Sort the result set by the field selected in the sort_expr argument. The allowed orders are ASC (Ascending) or DESC (Descending). This operation is equivalent to the 'ORDER BY' SQL operation and it follows the same set of rules.
     *
     * @link https://www.php.net/manual/en/mysql-xdevapi-collectionfind.sort.php
     *
     * @param string $sort_expr
     * @return CollectionFind
     */
    public function sort(string $sort_expr): CollectionFind {}
}

/**
 * Class CollectionModify
 * @package mysql_xdevapi
 */
class CollectionModify implements \mysql_xdevapi\Executable, \mysql_xdevapi\CrudOperationBindable, \mysql_xdevapi\CrudOperationLimitable, \mysql_xdevapi\CrudOperationSkippable, \mysql_xdevapi\CrudOperationSortable
{
    /**
     * Add an element to a document's field, as multiple elements of a field are represented as an array. Unlike arrayInsert(), arrayAppend() always appends the new element at the end of the array, whereas arrayInsert() can define the location.
     * @link https://www.php.net/manual/en/mysql-xdevapi-collectionmodify.arrayappend.php
     * @param string $collection_field
     * @param string $expression_or_literal
     * @return \mysql_xdevapi\CollectionModify
     */
    public function arrayAppend(string $collection_field, string $expression_or_literal): CollectionModify {}

    /**
     * Add an element to a document's field, as multiple elements of a field are represented as an array. Unlike arrayAppend(), arrayInsert() allows you to specify where the new element is inserted by defining which item it is after, whereas arrayAppend() always appends the new element at the end of the array.
     * @link https://www.php.net/manual/en/mysql-xdevapi-collectionmodify.arrayinsert.php
     * @param string $collection_field
     * @param string $expression_or_literal
     * @return \mysql_xdevapi\CollectionModify
     */
    public function arrayInsert(string $collection_field, string $expression_or_literal): CollectionModify {}

    /**
     * Bind a parameter to the placeholder in the search condition of the modify operation.
     * The placeholder has the form of :NAME where ':' is a common prefix that must always exists before any NAME where NAME is the name of the placeholder. The bind method accepts a list of placeholders if multiple entities have to be substituted in the search condition of the modify operation.
     * @link https://www.php.net/manual/en/mysql-xdevapi-collectionmodify.bind.php
     * @param array $placeholder_values
     * @return \mysql_xdevapi\CollectionModify
     */
    public function bind(array $placeholder_values): CollectionModify {}

    /**
     * The execute method is required to send the CRUD operation request to the MySQL server.
     * @link https://www.php.net/manual/en/mysql-xdevapi-collectionmodify.execute.php
     * @return \mysql_xdevapi\Result
     */
    public function execute(): Result {}

    /**
     * Limit the number of documents modified by this operation. Optionally combine with skip() to define an offset value.
     * @link https://www.php.net/manual/en/mysql-xdevapi-collectionmodify.limit.php
     * @param int $rows
     * @return \mysql_xdevapi\CollectionModify
     */
    public function limit(int $rows): CollectionModify {}

    /**
     * Takes a patch object and applies it on one or more documents, and can update multiple document properties.
     * @link https://www.php.net/manual/en/mysql-xdevapi-collectionmodify.patch.php
     * @param string $document
     * @return \mysql_xdevapi\CollectionModify
     */
    public function patch(string $document): CollectionModify {}

    /**
     * Replace (update) a given field value with a new one.
     * @link https://www.php.net/manual/en/mysql-xdevapi-collectionmodify.replace.php
     * @param string $collection_field
     * @param string $expression_or_literal
     * @return \mysql_xdevapi\CollectionModify
     */
    public function replace(string $collection_field, string $expression_or_literal): CollectionModify {}

    /**
     * Sets or updates attributes on documents in a collection.
     * @link https://www.php.net/manual/en/mysql-xdevapi-collectionmodify.set.php
     * @param string $collection_field
     * @param string $expression_or_literal
     * @return \mysql_xdevapi\CollectionModify
     */
    public function set(string $collection_field, string $expression_or_literal): CollectionModify {}

    /**
     * Skip the first N elements that would otherwise be returned by a find operation. If the number of elements skipped is larger than the size of the result set, then the find operation returns an empty set.
     * @link https://www.php.net/manual/en/mysql-xdevapi-collectionmodify.skip.php
     * @param int $position
     * @return \mysql_xdevapi\CollectionModify
     */
    public function skip(int $position): CollectionModify {}

    /**
     * Sort the result set by the field selected in the sort_expr argument. The allowed orders are ASC (Ascending) or DESC (Descending). This operation is equivalent to the 'ORDER BY' SQL operation and it follows the same set of rules.
     * @link https://www.php.net/manual/en/mysql-xdevapi-collectionmodify.sort.php
     * @param string $sort_expr
     * @return \mysql_xdevapi\CollectionModify
     */
    public function sort(string $sort_expr): CollectionModify {}

    /**
     * Removes attributes from documents in a collection.
     * @link https://www.php.net/manual/en/mysql-xdevapi-collectionmodify.unset.php
     * @param array $fields
     * @return \mysql_xdevapi\CollectionModify
     */
    public function unset(array $fields): CollectionModify {}
}

class CollectionRemove implements \mysql_xdevapi\Executable, \mysql_xdevapi\CrudOperationBindable, \mysql_xdevapi\CrudOperationLimitable, \mysql_xdevapi\CrudOperationSortable
{
    /**
     * Bind a parameter to the placeholder in the search condition of the remove operation.
     * The placeholder has the form of :NAME where ':' is a common prefix that must always exists before any NAME where NAME is the name of the placeholder. The bind method accepts a list of placeholders if multiple entities have to be substituted in the search condition of the remove operation.
     * @link https://www.php.net/manual/en/mysql-xdevapi-collectionremove.bind.php
     * @param array $placeholder_values
     * @return \mysql_xdevapi\CollectionRemove
     */
    public function bind(array $placeholder_values): CollectionRemove {}

    /**
     * The execute function needs to be invoked in order to trigger the client to send the CRUD operation request to the server.
     * @link https://www.php.net/manual/en/mysql-xdevapi-collectionremove.execute.php
     * @return \mysql_xdevapi\Result
     */
    public function execute(): Result {}

    /**
     * Sets the maximum number of documents to remove.
     * @link https://www.php.net/manual/en/mysql-xdevapi-collectionremove.limit.php
     * @param int $rows
     * @return \mysql_xdevapi\CollectionRemove
     */
    public function limit(int $rows): CollectionRemove {}

    /**
     * Sort the result set by the field selected in the sort_expr argument. The allowed orders are ASC (Ascending) or DESC (Descending). This operation is equivalent to the 'ORDER BY' SQL operation and it follows the same set of rules.
     * @link https://www.php.net/manual/en/mysql-xdevapi-collectionremove.sort.php
     * @param string $sort_expr
     * @return \mysql_xdevapi\CollectionRemove
     */
    public function sort(string $sort_expr): CollectionRemove {}
}

/**
 * Class ColumnResult
 * @package mysql_xdevapi
 */
class ColumnResult
{
    /**
     * Get character set
     * @link https://www.php.net/manual/en/mysql-xdevapi-columnresult.getcharactersetname.php
     * @return string
     */
    public function getCharacterSetName(): string {}

    /**
     * Get collation name
     * @link https://www.php.net/manual/en/mysql-xdevapi-columnresult.getcollationname.php
     * @return string
     */
    public function getCollationName(): string {}

    /**
     * Get column label
     * @link https://www.php.net/manual/en/mysql-xdevapi-columnresult.getcolumnlabel.php
     * @return string
     */
    public function getColumnLabel(): string {}

    /**
     * Get column name
     * @link https://www.php.net/manual/en/mysql-xdevapi-columnresult.getcolumnname.php
     * @return string
     */
    public function getColumnName(): string {}

    /**
     * Get fractional digit length
     * @link https://www.php.net/manual/en/mysql-xdevapi-columnresult.getfractionaldigits.php
     * @return int
     */
    public function getFractionalDigits(): int {}

    /**
     * Get column field length
     * @link https://www.php.net/manual/en/mysql-xdevapi-columnresult.getlength.php
     * @return int
     */
    public function getLength(): int {}

    /**
     * Get schema name
     * @link https://www.php.net/manual/en/mysql-xdevapi-columnresult.getschemaname.php
     * @return string
     */
    public function getSchemaName(): string {}

    /**
     * Get table label
     * @link https://www.php.net/manual/en/mysql-xdevapi-columnresult.gettablelabel.php
     * @return string
     */
    public function getTableLabel(): string {}

    /**
     * Get table name
     * @link https://www.php.net/manual/en/mysql-xdevapi-columnresult.gettablename.php
     * @return string
     */
    public function getTableName(): string {}

    /**
     * Get column type
     * @link https://www.php.net/manual/en/mysql-xdevapi-columnresult.gettype.php
     * @return int
     */
    public function getType(): int {}

    /**
     * Check if signed type
     * @link https://www.php.net/manual/en/mysql-xdevapi-columnresult.isnumbersigned.php
     * @return int
     */
    public function isNumberSigned(): int {}

    /**
     * Check if padded
     * @link https://www.php.net/manual/en/mysql-xdevapi-columnresult.ispadded.php
     * @return int
     */
    public function isPadded(): int {}
}

/**
 * Interface CrudOperationBindable
 * @link https://www.php.net/manual/en/class.mysql-xdevapi-crudoperationbindable.php
 * @package mysql_xdevapi
 */
interface CrudOperationBindable
{
    /**
     * Binds a value to a specific placeholder.
     * @link https://www.php.net/manual/en/mysql-xdevapi-crudoperationbindable.bind.php
     * @param array $placeholder_values
     * @return CrudOperationBindable
     */
    public function bind(array $placeholder_values): CrudOperationBindable;
}

/**
 * Interface CrudOperationLimitable
 * @link https://www.php.net/manual/en/class.mysql-xdevapi-crudoperationlimitable.php
 * @package mysql_xdevapi
 */
interface CrudOperationLimitable
{
    /**
     * Set result limit
     * @link https://www.php.net/manual/en/mysql-xdevapi-crudoperationlimitable.limit.php
     * @param int $rows
     * @return CrudOperationLimitable
     */
    public function limit(int $rows): CrudOperationLimitable;
}

/**
 * Interface CrudOperationSkippable
 * @link https://www.php.net/manual/en/class.mysql-xdevapi-crudoperationskippable.php
 * @package mysql_xdevapi
 */
interface CrudOperationSkippable
{
    /**
     * Number of operations to skip
     * @link https://www.php.net/manual/en/mysql-xdevapi-crudoperationskippable.skip.php
     * @param int $skip
     * @return CrudOperationSkippable
     */
    public function skip(int $skip): CrudOperationSkippable;
}

/**
 * Interface CrudOperationSortable
 * @link https://www.php.net/manual/en/class.mysql-xdevapi-crudoperationsortable.php
 * @package mysql_xdevapi
 */
interface CrudOperationSortable
{
    /**
     * Sort results
     * @link https://www.php.net/manual/en/mysql-xdevapi-crudoperationsortable.sort.php
     * @param string $sort_expr
     * @return CrudOperationSortable
     */
    public function sort(string $sort_expr): CrudOperationSortable;
}

/**
 * Interface DatabaseObject
 * @link https://www.php.net/manual/en/class.mysql-xdevapi-databaseobject.php
 * @package mysql_xdevapi
 */
interface DatabaseObject
{
    /**
     * Check if object exists in database
     * @link https://www.php.net/manual/en/mysql-xdevapi-databaseobject.existsindatabase.php
     * @return bool
     */
    public function existsInDatabase(): bool;

    /**
     * Get object name
     * @link https://www.php.net/manual/en/mysql-xdevapi-databaseobject.getname.php
     * @return string
     */
    public function getName(): string;

    /**
     * Get session name
     * @link https://www.php.net/manual/en/mysql-xdevapi-databaseobject.getsession.php
     * @return  \mysql_xdevapi\Session
     */
    public function getSession(): Session;
}

/**
 * Class DocResult
 * @link https://www.php.net/manual/en/class.mysql-xdevapi-docresult.php
 * @package mysql_xdevapi
 */
class DocResult implements \mysql_xdevapi\BaseResult, \Traversable
{
    /**
     * Get all rows
     * @link https://www.php.net/manual/en/mysql-xdevapi-docresult.fetchall.php
     * @return array
     */
    public function fetchAll(): array {}

    /**
     * Fetch one result from a result set.
     * @link https://www.php.net/manual/en/mysql-xdevapi-docresult.fetchone.php
     * @return array
     */
    public function fetchOne(): array {}

    /**
     * Fetches warnings generated by MySQL server's last operation.
     * @link https://www.php.net/manual/en/mysql-xdevapi-docresult.getwarnings.php
     * @return \mysql_xdevapi\Warning[]
     */
    public function getWarnings(): array {}

    /**
     * Returns the number of warnings raised by the last operation. Specifically, these warnings are raised by the MySQL server.
     * @link https://www.php.net/manual/en/mysql-xdevapi-docresult.getwarningscount.php
     * @return int
     */
    public function getWarningsCount(): int {}
}

/**
 * Class Exception
 * @package mysql_xdevapi
 */
class Exception extends \RuntimeException implements \Throwable {}

/**
 * Interface Executable
 * @link https://www.php.net/manual/en/class.mysql-xdevapi-exception.php
 * @package mysql_xdevapi
 */
interface Executable
{
    /**
     * Execute statement
     * @link https://www.php.net/manual/en/class.mysql-xdevapi-executable.php
     * @return Result
     */
    public function execute(): Result;
}

/**
 * Class ExecutionStatus
 * @link https://www.php.net/manual/en/class.mysql-xdevapi-executionstatus.php
 * @package mysql_xdevapi
 */
class ExecutionStatus
{
    public $affectedItems;
    public $matchedItems;
    public $foundItems;
    public $lastInsertId;
    public $lastDocumentId;
}

/**
 * Class Expression
 * @link https://www.php.net/manual/en/class.mysql-xdevapi-expression.php
 * @package mysql_xdevapi
 */
class Expression
{
    /* Properties */
    public $name;

    /* Constructor */
    public function __construct(string $expression) {}
}

/**
 * Class Result
 * @link https://www.php.net/manual/en/class.mysql-xdevapi-result.php
 * @package mysql_xdevapi
 */
class Result implements \mysql_xdevapi\BaseResult, \Traversable
{
    /**
     * Get the last AUTO_INCREMENT value (last insert id).
     * @link https://www.php.net/manual/en/mysql-xdevapi-result.getautoincrementvalue.php
     * @return int
     */
    public function getAutoIncrementValue(): int {}

    /**
     * Fetch the generated _id values from the last operation. The unique _id field is generated by the MySQL server.
     * @link https://www.php.net/manual/en/mysql-xdevapi-result.getgeneratedids.php
     * @return string[]
     */
    public function getGeneratedIds(): array {}

    /**
     * Retrieve warnings from the last Result operation.
     * @link https://www.php.net/manual/en/mysql-xdevapi-result.getwarnings.php
     * @return \mysql_xdevapi\Warning[]
     */
    public function getWarnings(): array {}

    /**
     * Retrieve the number of warnings from the last Result operation.
     * @link https://www.php.net/manual/en/mysql-xdevapi-result.getwarningscount.php
     * @return int
     */
    public function getWarningsCount(): int {}
}

/**
 * Class RowResult
 * @link https://www.php.net/manual/en/class.mysql-xdevapi-rowresult.php
 * @package mysql_xdevapi
 */
class RowResult implements \mysql_xdevapi\BaseResult, \Traversable
{
    /**
     * Fetch all the rows from the result set.
     * @link https://www.php.net/manual/en/mysql-xdevapi-rowresult.fetchall.php
     * @return array A numerical array with all results from the query; each result is an associative array. An empty array is returned if no rows are present.
     */
    public function fetchAll(): array {}

    /**
     * Fetch one result from the result set.
     * @link https://www.php.net/manual/en/mysql-xdevapi-rowresult.fetchone.php
     * @return array The result, as an associative array or NULL if no results are present.
     */
    public function fetchOne(): array {}

    /**
     * Retrieve the column count for columns present in the result set.
     * @link https://www.php.net/manual/en/mysql-xdevapi-rowresult.getcolumncount.php
     * @return int
     */
    public function getColumnsCount(): int {}

    /**
     * Retrieve column names for columns present in the result set.
     * @link https://www.php.net/manual/en/mysql-xdevapi-rowresult.getcolumnnames.php
     * @return array
     */
    public function getColumnNames(): array {}

    /**
     * Retrieve column metadata for columns present in the result set.
     * @link https://www.php.net/manual/en/mysql-xdevapi-rowresult.getcolumns.php
     * @return \mysql_xdevapi\FieldMetadata[]
     */
    public function getColumns(): array {}

    /**
     * Retrieve warnings from the last RowResult operation.
     * @link https://www.php.net/manual/en/mysql-xdevapi-rowresult.getwarnings.php
     * @return \mysql_xdevapi\Warning[]
     */
    public function getWarnings(): array {}

    /**
     * Retrieve the number of warnings from the last RowResult operation.
     * @link https://www.php.net/manual/en/mysql-xdevapi-rowresult.getwarningscount.php
     * @return int
     */
    public function getWarningsCount(): int {}
}

/**
 * Class Schema
 * @link https://www.php.net/manual/en/class.mysql-xdevapi-schema.php
 * @package mysql_xdevapi
 */
class Schema implements \mysql_xdevapi\DatabaseObject
{
    /* Properties */
    public $name;

    /* Methods */
    /**
     * Create a collection within the schema.
     * @link https://www.php.net/manual/en/mysql-xdevapi-schema.createcollection.php
     * @param string $name
     * @return \mysql_xdevapi\Collection
     */
    public function createCollection(string $name): Collection {}

    /**
     * Drop collection from schema
     * @link https://www.php.net/manual/en/mysql-xdevapi-schema.dropcollection.php
     * @param string $collection_name
     * @return bool
     */
    public function dropCollection(string $collection_name): bool {}

    /**
     * Check if exists in database
     * Checks if the current object (schema, table, collection, or view) exists in the schema object.
     * @link https://www.php.net/manual/en/mysql-xdevapi-schema.existsindatabase.php
     * @return bool
     */
    public function existsInDatabase(): bool {}

    /**
     * Get a collection from the schema.
     * @link https://www.php.net/manual/en/mysql-xdevapi-schema.getcollection.php
     * @param string $name
     * @return \mysql_xdevapi\Collection
     */
    public function getCollection(string $name): Collection {}

    /**
     * Get a collection, but as a Table object instead of a Collection object.
     * @link https://www.php.net/manual/en/mysql-xdevapi-schema.getcollectionastable.php
     * @param string $name
     * @return \mysql_xdevapi\Table
     */
    public function getCollectionAsTable(string $name): Table {}

    /**
     * Fetch a list of collections for this schema.
     * @link https://www.php.net/manual/en/mysql-xdevapi-schema.getcollections.php
     * @return \mysql_xdevapi\Collection[] Array of all collections in this schema, where each array element value is a Collection object with the collection name as the key.
     */
    public function getCollections(): array {}

    /**
     * Get the name of the schema.
     * @link https://www.php.net/manual/en/mysql-xdevapi-schema.getname.php
     * @return string
     */
    public function getName(): string {}

    /**
     * Get a new Session object from the Schema object.
     * @link https://www.php.net/manual/en/mysql-xdevapi-schema.getsession.php
     * @return \mysql_xdevapi\Session
     */
    public function getSession(): Session {}

    /**
     * Fetch a Table object for the provided table in the schema.
     * @link https://www.php.net/manual/en/mysql-xdevapi-schema.gettable.php
     * @param string $name
     * @return \mysql_xdevapi\Table
     */
    public function getTable(string $name): Table {}

    /**
     * Get schema tables
     * @link https://www.php.net/manual/en/mysql-xdevapi-schema.gettables.php
     * @return \mysql_xdevapi\Table[] Array of all tables in this schema, where each array element value is a Table object with the table name as the key.
     */
    public function getTables(): array {}
}

/**
 * Interface SchemaObject
 * @link https://www.php.net/manual/en/class.mysql-xdevapi-schemaobject.php
 * @package mysql_xdevapi
 */
interface SchemaObject extends \mysql_xdevapi\DatabaseObject
{
    /* Methods */
    public function getSchema(): Schema;
}

/**
 * Class Session
 * @link https://www.php.net/manual/en/class.mysql-xdevapi-session.php
 * @package mysql_xdevapi
 */
class Session
{
    /**
     * Close the session with the server.
     * @link https://www.php.net/manual/en/mysql-xdevapi-session.close.php
     * @return bool
     */
    public function close(): bool {}

    /**
     * Commit the transaction.
     * @link https://www.php.net/manual/en/mysql-xdevapi-session.commit.php
     * @return object
     */
    public function commit(): object {}

    /**
     * Creates a new schema.
     * @link https://www.php.net/manual/en/mysql-xdevapi-session.createschema.php
     * @param string $schema_name
     * @return \mysql_xdevapi\Schema
     */
    public function createSchema(string $schema_name): Schema {}

    /**
     * Drop a schema (database).
     * @link https://www.php.net/manual/en/mysql-xdevapi-session.dropschema.php
     * @param string $schema_name
     * @return bool
     */
    public function dropSchema(string $schema_name): bool {}

    /**
     * Generate a Universal Unique IDentifier (UUID) generated according to » RFC 4122.
     * @link https://www.php.net/manual/en/mysql-xdevapi-session.generateuuid.php
     * @return string
     */
    public function generateUUID(): string {}

    /**
     * Get a new schema object
     * @link https://www.php.net/manual/en/mysql-xdevapi-session.getschema.php
     * @param string $schema_name
     * @return \mysql_xdevapi\Schema
     */
    public function getSchema(string $schema_name): Schema {}

    /**
     * Get schema objects for all schemas available to the session.
     * @link https://www.php.net/manual/en/mysql-xdevapi-session.getschemas.php
     * @return \mysql_xdevapi\Schema[]
     */
    public function getSchemas(): array {}

    /**
     * Retrieve the MySQL server version for the session.
     * @link https://www.php.net/manual/en/mysql-xdevapi-session.getserverversion.php
     * @return int
     */
    public function getServerVersion(): int {}

    /**
     * Get a list of client connections to the session's MySQL server.
     * @link https://www.php.net/manual/en/mysql-xdevapi-session.listclients.php
     * @return array
     */
    public function listClients(): array {}

    /**
     * Add quotes
     * A quoting function to escape SQL names and identifiers. It escapes the identifier given in accordance to the settings of the current connection. This escape function should not be used to escape values.
     * @link https://www.php.net/manual/en/mysql-xdevapi-session.quotename.php
     * @param string $name
     * @return string
     */
    public function quoteName(string $name): string {}

    /**
     * Release a previously set savepoint.
     * @link https://www.php.net/manual/en/mysql-xdevapi-session.releasesavepoint.php
     * @param string $name
     */
    public function releaseSavepoint(string $name): void {}

    /**
     * Rollback the transaction.
     * @link https://www.php.net/manual/en/mysql-xdevapi-session.rollback.php
     */
    public function rollback(): void {}

    /**
     * Rollback transaction to savepoint
     * @link https://www.php.net/manual/en/mysql-xdevapi-session.rollbackto.php
     * @param string $name
     */
    public function rollbackTo(string $name): void {}

    /**
     * Create a new savepoint for the transaction.
     * @link https://www.php.net/manual/en/mysql-xdevapi-session.setsavepoint.php
     * @param string $name
     * @return string
     */
    public function setSavepoint(string $name): string {}

    /**
     * Create a native SQL statement. Placeholders are supported using the native "?" syntax. Use the execute method to execute the SQL statement.
     * @link https://www.php.net/manual/en/mysql-xdevapi-session.sql.php
     * @param string $query
     * @return SqlStatement
     */
    public function sql(string $query): SqlStatement {}

    /**
     * Start a new transaction.
     * @link https://www.php.net/manual/en/mysql-xdevapi-session.starttransaction.php
     */
    public function startTransaction(): void {}
}

/**
 * Class SqlStatement
 * @link https://www.php.net/manual/en/class.mysql-xdevapi-sqlstatement.php
 * @package mysql_xdevapi
 */
class SqlStatement
{
    /* Constants */
    public const EXECUTE_ASYNC = 1;
    public const BUFFERED = 2;

    /* Properties */
    public $statement;

    /* Methods */
    /**
     * Bind statement parameters
     * @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatement.bind.php
     * @param string $param
     * @return \mysql_xdevapi\SqlStatement
     */
    public function bind(string $param): SqlStatement {}

    /**
     * Execute the operation
     * @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatement.execute.php
     * @return \mysql_xdevapi\Result
     */
    public function execute(): Result {}

    /**
     * Get next result
     * @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatement.getnextresult.php
     * @return \mysql_xdevapi\Result
     */
    public function getNextResult(): Result {}

    /**
     * Get result
     * @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatement.getresult.php
     * @return \mysql_xdevapi\Result
     */
    public function getResult(): Result {}

    /**
     * Check for more results
     * @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatement.hasmoreresults.php
     * @return bool
     */
    public function hasMoreResults(): bool {}
}

/**
 * Class SqlStatementResult
 * @link https://www.php.net/manual/en/class.mysql-xdevapi-sqlstatementresult.php
 * @package mysql_xdevapi
 */
class SqlStatementResult implements \mysql_xdevapi\BaseResult, \Traversable
{
    /* Methods */
    /**
     * Fetch all the rows from the result set.
     * @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatementresult.fetchall.php
     * @return array
     */
    public function fetchAll(): array {}

    /**
     * Fetch one row from the result set.
     * @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatementresult.fetchone.php
     * @return array
     */
    public function fetchOne(): array {}

    /**
     * Get affected row count
     * @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatementresult.getaffecteditemscount.php
     * @return int
     */
    public function getAffectedItemsCount(): int {}

    /**
     * Get column count
     * @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatementresult.getcolumncount.php
     * @return int
     */
    public function getColumnsCount(): int {}

    /**
     * Get column names
     * @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatementresult.getcolumnnames.php
     * @return array
     */
    public function getColumnNames(): array {}

    /**
     * Get columns
     * @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatementresult.getcolumns.php
     * @return array
     */
    public function getColumns(): array {}

    /**
     * Get generated ids
     * @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatementresult.getgeneratedids.php
     * @return array
     */
    public function getGeneratedIds(): array {}

    /**
     * Get last insert id
     * @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatementresult.getlastinsertid.php
     * @return string
     */
    public function getLastInsertId(): string {}

    /**
     * Get warnings from last operation
     * @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatementresult.getwarnings.php
     * @return \mysql_xdevapi\Warning[]
     */
    public function getWarnings(): array {}

    /**
     * Get warning count from last operation
     * @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatementresult.getwarningcount.php
     * @return int
     */
    public function getWarningCounts(): int {}

    /**
     * Check if result has data
     * @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatementresult.hasdata.php
     * @return bool
     */
    public function hasData(): bool {}

    /**
     * Get next result
     * @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatementresult.nextresult.php
     * @return \mysql_xdevapi\Result
     */
    public function nextResult(): Result {}
}

/**
 * Class Statement
 * @link https://www.php.net/manual/en/class.mysql-xdevapi-statement.php
 * @package mysql_xdevapi
 */
class Statement
{
    /* Constants */
    public const EXECUTE_ASYNC = 1;
    public const BUFFERED = 2;

    /* Methods */
    /**
     * Get next result
     * @link https://www.php.net/manual/en/mysql-xdevapi-statement.getnextresult.php
     * @return \mysql_xdevapi\Result
     */
    public function getNextResult(): Result {}

    /**
     * Get result
     * @link https://www.php.net/manual/en/mysql-xdevapi-statement.getresult.php
     * @return Result
     */
    public function getResult(): Result {}

    /**
     * Check if more results
     * @link https://www.php.net/manual/en/mysql-xdevapi-statement.hasmoreresults.php
     * @return bool
     */
    public function hasMoreResults(): bool {}
}

/**
 * Class Table
 * @link https://www.php.net/manual/en/class.mysql-xdevapi-table.php
 * @package mysql_xdevapi
 */
class Table implements \mysql_xdevapi\SchemaObject
{
    /* Properties */
    public $name;

    /* Methods */
    /**
     * Fetch the number of rows in the table.
     * @link https://www.php.net/manual/en/mysql-xdevapi-table.count.php
     * @return int
     */
    public function count(): int {}

    /**
     * Deletes rows from a table.
     * @link https://www.php.net/manual/en/mysql-xdevapi-table.delete.php
     * @return \mysql_xdevapi\TableDelete
     */
    public function delete(): TableDelete {}

    /**
     * Verifies if this table exists in the database.
     * @link https://www.php.net/manual/en/mysql-xdevapi-table.existsindatabase.php
     * @return bool
     */
    public function existsInDatabase(): bool {}

    /**
     * Returns the name of this database object.
     * @link https://www.php.net/manual/en/mysql-xdevapi-table.getname.php
     * @return string
     */
    public function getName(): string {}

    /**
     * Fetch the schema associated with the table.
     * @link https://www.php.net/manual/en/mysql-xdevapi-table.getschema.php
     * @return \mysql_xdevapi\Schema
     */
    public function getSchema(): Schema {}

    /**
     * Get session associated with the table.
     * @link https://www.php.net/manual/en/mysql-xdevapi-table.getsession.php
     * @return \mysql_xdevapi\Session
     */
    public function getSession(): Session {}

    /**
     * Inserts rows into a table.
     * @link https://www.php.net/manual/en/mysql-xdevapi-table.insert.php
     * @param string|string[] $columns The columns to insert data into. Can be an array with one or more values, or a string.
     * @param string|string[] ...$additionalColumns Additional columns definitions.
     * @return \mysql_xdevapi\TableInsert
     */
    public function insert($columns, ...$additionalColumns): TableInsert {}

    /**
     * Determine if the underlying object is a view or not.
     * @link https://www.php.net/manual/en/mysql-xdevapi-table.isview.php
     * @return bool
     */
    public function isView(): bool {}

    /**
     * Fetches data from a table.
     * @link https://www.php.net/manual/en/mysql-xdevapi-table.select.php
     * @param string|string[] $columns The columns to select data from. Can be an array with one or more values, or a string.
     * @param string|string[] ...$additionalColumns Additional columns parameter definitions.
     * @return \mysql_xdevapi\TableSelect
     */
    public function select($columns, ...$additionalColumns): TableSelect {}

    /**
     * Updates columns in a table.
     * @link https://www.php.net/manual/en/mysql-xdevapi-table.update.php
     * @return \mysql_xdevapi\TableUpdate
     */
    public function update(): TableUpdate {}
}

/**
 * Class TableDelete
 * @link https://www.php.net/manual/en/class.mysql-xdevapi-tabledelete.php
 * @package mysql_xdevapi
 */
class TableDelete implements \mysql_xdevapi\Executable
{
    /* Methods */
    /**
     * Binds a value to a specific placeholder.
     * @link https://www.php.net/manual/en/mysql-xdevapi-tabledelete.bind.php
     * @param array $placeholder_values
     * @return \mysql_xdevapi\TableDelete
     */
    public function bind(array $placeholder_values): TableDelete {}

    /**
     * Execute the delete query.
     * @link https://www.php.net/manual/en/mysql-xdevapi-tabledelete.execute.php
     * @return \mysql_xdevapi\Result
     */
    public function execute(): Result {}

    /**
     * Sets the maximum number of records or documents to delete.
     * @link https://www.php.net/manual/en/mysql-xdevapi-tabledelete.limit.php
     * @param int $rows
     * @return \mysql_xdevapi\TableDelete
     */
    public function limit(int $rows): TableDelete {}

    /**
     * Set the order options for a result set.
     * @link https://www.php.net/manual/en/mysql-xdevapi-tabledelete.orderby.php
     * @param string $orderby_expr
     * @return \mysql_xdevapi\TableDelete
     */
    public function orderby(string $orderby_expr): TableDelete {}

    /**
     * Sets the search condition to filter.
     * @link https://www.php.net/manual/en/mysql-xdevapi-tabledelete.where.php
     * @param string $where_expr
     * @return \mysql_xdevapi\TableDelete
     */
    public function where(string $where_expr): TableDelete {}
}

/**
 * Class TableInsert
 * @link https://www.php.net/manual/en/class.mysql-xdevapi-tableinsert.php
 * @package mysql_xdevapi
 */
class TableInsert implements \mysql_xdevapi\Executable
{
    /**
     * Execute the statement.
     * @link https://www.php.net/manual/en/mysql-xdevapi-tableinsert.execute.php
     * @return \mysql_xdevapi\Result
     */
    public function execute(): Result {}

    /**
     * Set the values to be inserted.
     * @link https://www.php.net/manual/en/mysql-xdevapi-tableinsert.values.php
     * @param array $row_values
     * @return \mysql_xdevapi\TableInsert
     */
    public function values(array $row_values): TableInsert {}
}

/**
 * Class TableSelect
 * @link https://www.php.net/manual/en/class.mysql-xdevapi-tableselect.php
 * @package mysql_xdevapi
 */
class TableSelect implements \mysql_xdevapi\Executable
{
    /**
     * Binds a value to a specific placeholder.
     * @link https://www.php.net/manual/en/mysql-xdevapi-tableselect.bind.php
     * @param array $placeholder_values
     * @return \mysql_xdevapi\TableSelect
     */
    public function bind(array $placeholder_values): TableSelect {}

    /**
     * Execute the select statement by chaining it with the execute() method.
     * @link https://www.php.net/manual/en/mysql-xdevapi-tableselect.execute.php
     * @return \mysql_xdevapi\RowResult
     */
    public function execute(): RowResult {}

    /**
     * Sets a grouping criteria for the result set.
     * @link https://www.php.net/manual/en/mysql-xdevapi-tableselect.groupby.php
     * @param mixed $sort_expr
     * @return \mysql_xdevapi\TableSelect
     */
    public function groupBy($sort_expr): TableSelect {}

    /**
     * Sets a condition for records to consider in aggregate function operations.
     * @link https://www.php.net/manual/en/mysql-xdevapi-tableselect.having.php
     * @param string $sort_expr
     * @return \mysql_xdevapi\TableSelect
     */
    public function having(string $sort_expr): TableSelect {}

    /**
     * Sets the maximum number of records or documents to return.
     * @link https://www.php.net/manual/en/mysql-xdevapi-tableselect.limit.php
     * @param int $rows
     * @return \mysql_xdevapi\TableSelect
     */
    public function limit(int $rows): TableSelect {}

    /**
     * Execute a read operation with EXCLUSIVE LOCK. Only one lock can be active at a time.
     * @link https://www.php.net/manual/en/mysql-xdevapi-tableselect.lockexclusive.php
     * @param int|null $lock_waiting_option
     * @return \mysql_xdevapi\TableSelect
     */
    public function lockExclusive(?int $lock_waiting_option): TableSelect {}

    /**
     * Execute a read operation with SHARED LOCK. Only one lock can be active at a time.
     * @link https://www.php.net/manual/en/mysql-xdevapi-tableselect.lockshared.php
     * @param int|null $lock_waiting_option
     * @return \mysql_xdevapi\TableSelect
     */
    public function lockShared(?int $lock_waiting_option): TableSelect {}

    /**
     * Skip given number of rows in result.
     * @link https://www.php.net/manual/en/mysql-xdevapi-tableselect.offset.php
     * @param int $position
     * @return \mysql_xdevapi\TableSelect
     */
    public function offset(int $position): TableSelect {}

    /**
     * Sets the order by criteria.
     * @link https://www.php.net/manual/en/mysql-xdevapi-tableselect.orderby.php
     * @param string|string[] ...$sort_expr
     * @return \mysql_xdevapi\TableSelect
     */
    public function orderby(...$sort_expr): TableSelect {}

    /**
     * Sets the search condition to filter.
     * @link https://www.php.net/manual/en/mysql-xdevapi-tableselect.where.php
     * @param string $where_expr
     * @return \mysql_xdevapi\TableSelect
     */
    public function where(string $where_expr): TableSelect {}
}

/**
 * Class TableUpdate
 * @link https://www.php.net/manual/en/class.mysql-xdevapi-tableupdate.php
 * @package mysql_xdevapi
 */
class TableUpdate implements \mysql_xdevapi\Executable
{
    /**
     * Bind update query parameters
     * @link https://www.php.net/manual/en/mysql-xdevapi-tableupdate.bind.php
     * @param array $placeholder_values The name of the placeholder, and the value to bind, defined as a JSON array.
     * @return \mysql_xdevapi\TableUpdate
     */
    public function bind(array $placeholder_values): TableUpdate {}

    /**
     * Executes the update statement.
     * @link https://www.php.net/manual/en/mysql-xdevapi-tableupdate.execute.php
     * @return \mysql_xdevapi\TableUpdate
     */
    public function execute(): TableUpdate {}

    /**
     * Set the maximum number of records or documents update.
     * @link https://www.php.net/manual/en/mysql-xdevapi-tableupdate.limit.php
     * @param int $rows
     * @return \mysql_xdevapi\TableUpdate
     */
    public function limit(int $rows): TableUpdate {}

    /**
     * Sets the sorting criteria.
     * @link https://www.php.net/manual/en/mysql-xdevapi-tableupdate.orderby.php
     * @param ?string|?string[] ...$orderby_expr The expressions that define the order by criteria. Can be an array with one or more expressions, or a string.
     * @return \mysql_xdevapi\TableUpdate
     */
    public function orderby(...$orderby_expr): TableUpdate {}

    /**
     * Updates the column value on records in a table.
     * @link https://www.php.net/manual/en/mysql-xdevapi-tableupdate.set.php
     * @param string $table_field
     * @param string $expression_or_literal
     * @return \mysql_xdevapi\TableUpdate
     */
    public function set(string $table_field, string $expression_or_literal): TableUpdate {}

    /**
     * Set the search condition to filter.
     * @link https://www.php.net/manual/en/mysql-xdevapi-tableupdate.where.php
     * @param string $where_expr
     * @return \mysql_xdevapi\TableUpdate
     */
    public function where(string $where_expr): TableUpdate {}
}

/**
 * Class Warning
 * @link https://www.php.net/manual/en/class.mysql-xdevapi-warning.php
 * @package mysql_xdevapi
 */
class Warning
{
    /* Properties */
    public $message;
    public $level;
    public $code;

    /* Constructor */
    private function __construct() {}
}

/**
 * Class XSession
 * @link https://www.php.net/manual/en/class.mysql-xdevapi-xsession.php
 * @package mysql_xdevapi
 */
class XSession {}
<?php

// Start of pdo_pgsql v.1.0.2
// End of pdo_pgsql v.1.0.2
version: 1.0
failThreshold: 100
profile:
  path: Inspections.xml
exclude:
  - name: PhpInconsistentReturnPointsInspection
  - name: PhpTooManyParametersInspection
  - name: PhpUnnecessaryDoubleQuotesInspection
  - name: PhpMissingParentCallCommonInspection
  - name: PhpMissingParentCallMagicInspection
  - name: PhpMissingParentConstructorInspection
  - name: PhpMissingReturnTypeInspection
  - name: PhpMissingParamTypeInspection
  - name: PhpDefineCanBeReplacedWithConstInspection
  - name: PhpReturnDocTypeMismatchInspection
  - name: PhpDocRedundantThrowsInspection
  - name: PhpMissingStrictTypesDeclarationInspection
  - name: PhpUnused
    paths:
      - aerospike
      - amqp
      - apache
      - apcu
      - ast
      - bcmath
      - blackfire
      - bz2
      - calendar
      - cassandra
      - com_dotnet
      - Core
      - couchbase
      - couchbase_v2
      - crypto
      - ctype
      - cubrid
      - curl
      - date
      - dba
      - decimal
      - dio
      - dom
      - ds
      - enchant
      - Ev
      - event
      - exif
      - expect
      - fann
      - FFI
      - ffmpeg
      - fileinfo
      - filter
      - fpm
      - ftp
      - gd
      - gearman
      - geoip
      - geos
      - gettext
      - gmagick
      - gmp
      - gnupg
      - grpc
      - hash
      - http
      - ibm_db2
      - iconv
      - igbinary
      - imagick
      - imap
      - inotify
      - interbase
      - intl
      - json
      - judy
      - ldap
      - leveldb
      - libevent
      - libsodium
      - libvirt-php
      - libxml
      - lua
      - LuaSandbox
      - lzf
      - mailparse
      - mapscript
      - mbstring
      - mcrypt
      - memcache
      - memcached
      - meminfo
      - meta
      - ming
      - mongo
      - mongodb
      - mosquitto-php
      - mqseries
      - msgpack
      - mssql
      - mysql
      - mysql_xdevapi
      - mysqli
      - ncurses
      - newrelic
      - oauth
      - oci8
      - odbc
      - openssl
      - parallel
      - Parle
      - pcntl
      - pcov
      - pcre
      - pdflib
      - PDO
      - pdo_ibm
      - pdo_mysql
      - pdo_pgsql
      - pdo_sqlite
      - pgsql
      - Phar
      - phpdbg
      - posix
      - pq
      - pspell
      - pthreads
      - radius
      - rar
      - rdkafka
      - readline
      - recode
      - redis
      - Reflection
      - regex
      - rpminfo
      - rrd
      - SaxonC
      - session
      - shmop
      - SimpleXML
      - snmp
      - soap
      - sockets
      - sodium
      - solr
      - SPL
      - SplType
      - SQLite
      - sqlite3
      - sqlsrv
      - ssh2
      - standard
      - stats
      - stomp
      - suhosin
      - superglobals
      - svm
      - svn
      - sybase
      - sync
      - sysvmsg
      - sysvsem
      - sysvshm
      - tidy
      - tokenizer
      - uopz
      - uuid
      - uv
      - v8js
      - vendor
      - wddx
      - win32service
      - winbinder
      - wincache
      - xcache
      - xdebug
      - xdiff
      - xhprof
      - xlswriter
      - xml
      - xmlreader
      - xmlrpc
      - xmlwriter
      - xsl
      - xxtea
      - yaf
      - yaml
      - yar
      - zend
      - Zend OPcache
      - ZendCache
      - ZendDebugger
      - ZendUtils
      - zip
      - zlib
      - zmp
      - zmq
      - zookeeper
      - zstd
<?php

use JetBrains\PhpStorm\Pure;

/**
 * Authorize against a PAM unix database.
 *
 * @param string $username <p>
 * The username to check.
 * </p>
 * @param string $password <p>
 * The user-supplied password to check.
 * </p>
 * @param string $error <p>
 * Output parameter to put any error messages in.
 * </p>
 * @param bool $check_account_management <p>
 * Call <b>pam_acct_mgmt()</b> to check account expiration and access. (Requires root access!)
 * </p>
 * @param string $service_name <p>
 * PAM service name to use. (Defaults to "php")
 * </p>
 * @return bool Returns a bool when complete. If false, <b>$error</b> contains any error messages generated.
 */
#[Pure]
function pam_auth(string $username, string $password, string $error, bool $check_account_management = true, string $service_name = 'php') {}

/**
 * Change a password for a PAM unix account.
 *
 * @param string $username <p>
 * The username to check.
 * </p>
 * @param string $old_password <p>
 * The current password for the account.
 * </p>
 * @param string $new_password <p>
 * The new password for the account.
 * </p>
 * @param string $error <p>
 * Output parameter to put any error messages in.
 * </p>
 * @param string $service_name <p>
 * PAM service name to use. (Defaults to "php")
 * </p>
 * @return bool Returns a bool when complete. If false, <b>$error</b> contains any error messages generated.
 */
#[Pure]
function pam_chpass(string $username, string $old_password, string $new_password, string $error, string $service_name = 'php') {}
<?php

// Start of session v.
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;

/**
 * Get and/or set the current session name.<br/>
 * Before 7.2.0 checked cookie status and since 7.2.0 checks both cookie and session status to avoid PHP crash.
 * @link https://php.net/manual/en/function.session-name.php
 * @param string|null $name [optional] <p>
 * The session name references the name of the session, which is
 * used in cookies and URLs (e.g. PHPSESSID). It
 * should contain only alphanumeric characters; it should be short and
 * descriptive (i.e. for users with enabled cookie warnings).
 * If <i>name</i> is specified, the name of the current
 * session is changed to its value.
 * </p>
 * <p>
 * <p>
 * The session name can't consist of digits only, at least one letter
 * must be present. Otherwise a new session id is generated every time.
 * </p>
 * </p>
 * @return string|false the name of the current session.
 */
#[LanguageLevelTypeAware(['8.0' => 'string|false'], default: 'string')]
function session_name(#[LanguageLevelTypeAware(['8.0' => 'null|string'], default: 'string')] $name) {}

/**
 * Get and/or set the current session module.<br/>
 * Since 7.2.0 it is forbidden to set the module name to "user".
 * @link https://php.net/manual/en/function.session-module-name.php
 * @param string|null $module [optional] <p>
 * If <i>module</i> is specified, that module will be
 * used instead.
 * </p>
 * @return string|false the name of the current session module.
 */
#[LanguageLevelTypeAware(['8.0' => 'string|false'], default: 'string')]
function session_module_name(#[LanguageLevelTypeAware(['8.0' => 'null|string'], default: 'string')] $module) {}

/**
 * Get and/or set the current session save path
 * @link https://php.net/manual/en/function.session-save-path.php
 * @param string|null $path [optional] <p>
 * Session data path. If specified, the path to which data is saved will
 * be changed. <b>session_save_path</b> needs to be called
 * before <b>session_start</b> for that purpose.
 * </p>
 * <p>
 * <p>
 * On some operating systems, you may want to specify a path on a
 * filesystem that handles lots of small files efficiently. For example,
 * on Linux, reiserfs may provide better performance than ext2fs.
 * </p>
 * </p>
 * @return string|false the path of the current directory used for data storage.
 */
#[LanguageLevelTypeAware(['8.0' => 'string|false'], default: 'string')]
function session_save_path(#[LanguageLevelTypeAware(['8.0' => 'null|string'], default: 'string')] $path) {}

/**
 * Get and/or set the current session id
 * @link https://php.net/manual/en/function.session-id.php
 * @param string|null $id [optional] <p>
 * If <i>id</i> is specified, it will replace the current
 * session id. <b>session_id</b> needs to be called before
 * <b>session_start</b> for that purpose. Depending on the
 * session handler, not all characters are allowed within the session id.
 * For example, the file session handler only allows characters in the
 * range a-z A-Z 0-9 , (comma) and - (minus)!
 * </p>
 * When using session cookies, specifying an <i>id</i>
 * for <b>session_id</b> will always send a new cookie
 * when <b>session_start</b> is called, regardless if the
 * current session id is identical to the one being set.
 * @return string|false <b>session_id</b> returns the session id for the current
 * session or the empty string ("") if there is no current
 * session (no current session id exists).
 */
#[LanguageLevelTypeAware(['8.0' => 'string|false'], default: 'string')]
function session_id(#[LanguageLevelTypeAware(['8.0' => 'null|string'], default: 'string')] $id) {}

/**
 * Update the current session id with a newly generated one
 * @link https://php.net/manual/en/function.session-regenerate-id.php
 * @param bool $delete_old_session [optional] <p>
 * Whether to delete the old associated session file or not.
 * </p>
 * @return bool true on success or false on failure.
 */
function session_regenerate_id(bool $delete_old_session = false): bool {}

/**
 * PHP > 5.4.0 <br/>
 * Session shutdown function
 * @link https://secure.php.net/manual/en/function.session-register-shutdown.php
 * @return void
 */
function session_register_shutdown(): void {}

/**
 * Decodes session data from a string
 * @link https://php.net/manual/en/function.session-decode.php
 * @param string $data <p>
 * The encoded data to be stored.
 * </p>
 * @return bool true on success or false on failure.
 */
function session_decode(string $data): bool {}

/**
 * Register one or more global variables with the current session
 * @link https://php.net/manual/en/function.session-register.php
 * @param mixed $name <p>
 * A string holding the name of a variable or an array consisting of
 * variable names or other arrays.
 * </p>
 * @param mixed ...$_ [optional]
 * @return bool true on success or false on failure.
 * @removed 5.4
 */
#[Deprecated(since: '5.3')]
function session_register(mixed $name, ...$_): bool {}

/**
 * Unregister a global variable from the current session
 * @link https://php.net/manual/en/function.session-unregister.php
 * @param string $name <p>
 * The variable name.
 * </p>
 * @return bool true on success or false on failure.
 * @removed 5.4
 */
#[Deprecated(since: '5.3')]
function session_unregister(string $name): bool {}

/**
 * Find out whether a global variable is registered in a session
 * @link https://php.net/manual/en/function.session-is-registered.php
 * @param string $name <p>
 * The variable name.
 * </p>
 * @return bool <b>session_is_registered</b> returns true if there is a
 * global variable with the name <i>name</i> registered in
 * the current session, false otherwise.
 * @removed 5.4
 */
#[Deprecated(since: '5.3')]
function session_is_registered(string $name): bool {}

/**
 * Encodes the current session data as a string
 * @link https://php.net/manual/en/function.session-encode.php
 * @return string|false the contents of the current session encoded.
 */
#[LanguageLevelTypeAware(["8.0" => "string|false"], default: "string")]
function session_encode() {}

/**
 * Initialize session data
 * @link https://php.net/manual/en/function.session-start.php
 * @param array $options [optional] <p>If provided, this is an associative array of options that will override the currently set session configuration directives. The keys should not include the session. prefix.
 * In addition to the normal set of configuration directives, a read_and_close option may also be provided. If set to TRUE, this will result in the session being closed immediately after being read, thereby avoiding unnecessary locking if the session data won't be changed.</p>
 * @return bool This function returns true if a session was successfully started,
 * otherwise false.
 */
function session_start(#[PhpStormStubsElementAvailable(from: '7.0')] array $options = []): bool {}

/**
 * Create new session id
 * @link https://www.php.net/manual/en/function.session-create-id.php
 * @param string $prefix [optional] If prefix is specified, new session id is prefixed by prefix.
 * Not all characters are allowed within the session id.
 * Characters in the range a-z A-Z 0-9 , (comma) and - (minus) are allowed.
 * @return string|false new collision free session id for the current session.
 * If it is used without active session, it omits collision check.
 * @since 7.1
 */
#[LanguageLevelTypeAware(["8.0" => "string|false"], default: "string")]
function session_create_id(string $prefix = '') {}

/**
 * Perform session data garbage collection
 * @return int|false number of deleted session data for success, false for failure.
 * @since 7.1
 */
#[LanguageLevelTypeAware(["8.0" => "int|false"], default: "int")]
function session_gc() {}

/**
 * Destroys all data registered to a session
 * @link https://php.net/manual/en/function.session-destroy.php
 * @return bool true on success or false on failure.
 */
function session_destroy(): bool {}

/**
 * Free all session variables
 * @link https://php.net/manual/en/function.session-unset.php
 * @return void|bool since 7.2.0 returns true on success or false on failure.
 */
#[LanguageLevelTypeAware(["7.2" => "bool"], default: "void")]
function session_unset() {}

/**
 * Sets user-level session storage functions
 * @link https://php.net/manual/en/function.session-set-save-handler.php
 * @param callable $open <p>
 * Open function, this works like a constructor in classes and is
 * executed when the session is being opened. The open function
 * expects two parameters, where the first is the save path and
 * the second is the session name.
 * </p>
 * @param callable $close <p>
 * Close function, this works like a destructor in classes and is
 * executed when the session operation is done.
 * </p>
 * @param callable $read <p>
 * Read function must return string value always to make save handler
 * work as expected. Return empty string if there is no data to read.
 * Return values from other handlers are converted to boolean expression.
 * true for success, false for failure.
 * </p>
 * @param callable $write <p>
 * Write function that is called when session data is to be saved. This
 * function expects two parameters: an identifier and the data associated
 * with it.
 * </p>
 * <p>
 * The "write" handler is not executed until after the output stream is
 * closed. Thus, output from debugging statements in the "write"
 * handler will never be seen in the browser. If debugging output is
 * necessary, it is suggested that the debug output be written to a
 * file instead.
 * </p>
 * @param callable $destroy <p>
 * The destroy handler, this is executed when a session is destroyed with
 * <b>session_destroy</b> and takes the session id as its
 * only parameter.
 * </p>
 * @param callable $gc <p>
 * The garbage collector, this is executed when the session garbage collector
 * is executed and takes the max session lifetime as its only parameter.
 * </p>
 * @param callable|null $create_sid [optional]
 * <p>This callback is executed when a new session ID is required.
 * No parameters are provided, and the return value should be a string that is a valid
 * session ID for your handler.</p>
 * @param callable|null $validate_sid [optional]
 * @param callable|null $update_timestamp [optional]
 * @return bool true on success or false on failure.
 */
function session_set_save_handler(callable $open, callable $close, callable $read, callable $write, callable $destroy, callable $gc, ?callable $create_sid = null, ?callable $validate_sid = null, ?callable $update_timestamp = null): bool {}

/**
 * (PHP 5.4)<br/>
 * Sets user-level session storage functions
 * @link https://php.net/manual/en/function.session-set-save-handler.php
 * @param SessionHandlerInterface $session_handler An instance of a class implementing SessionHandlerInterface,
 * and optionally SessionIdInterface and/or SessionUpdateTimestampHandlerInterface, such as SessionHandler,
 * to register as the session handler. Since PHP 5.4 only.
 * @param bool $register_shutdown [optional] Register session_write_close() as a register_shutdown_function() function.
 * @return bool true on success or false on failure.
 */
function session_set_save_handler(SessionHandlerInterface $sessionhandler, bool $register_shutdown = true): bool {}

/**
 * Get and/or set the current cache limiter
 * @link https://php.net/manual/en/function.session-cache-limiter.php
 * @param string|null $value [optional] <p>
 * If <i>cache_limiter</i> is specified, the name of the
 * current cache limiter is changed to the new value.
 * </p>
 * <table>
 * Possible values
 * <tr valign="top">
 * <td>Value</td>
 * <td>Headers sent</td>
 * </tr>
 * <tr valign="top">
 * <td>public</td>
 * <td>
 * <pre>
 * Expires: (sometime in the future, according session.cache_expire)
 * Cache-Control: public, max-age=(sometime in the future, according to session.cache_expire)
 * Last-Modified: (the timestamp of when the session was last saved)
 * </pre>
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>private_no_expire</td>
 * <td>
 * <pre>
 * Cache-Control: private, max-age=(session.cache_expire in the future), pre-check=(session.cache_expire in the future)
 * Last-Modified: (the timestamp of when the session was last saved)
 * </pre>
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>private</td>
 * <td>
 * <pre>
 * Expires: Thu, 19 Nov 1981 08:52:00 GMT
 * Cache-Control: private, max-age=(session.cache_expire in the future), pre-check=(session.cache_expire in the future)
 * Last-Modified: (the timestamp of when the session was last saved)
 * </pre>
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>nocache</td>
 * <td>
 * <pre>
 * Expires: Thu, 19 Nov 1981 08:52:00 GMT
 * Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
 * Pragma: no-cache
 * </pre>
 * </td>
 * </tr>
 * </table>
 * @return string|false the name of the current cache limiter.
 */
#[LanguageLevelTypeAware(["8.0" => "string|false"], default: "string")]
function session_cache_limiter(#[LanguageLevelTypeAware(['8.0' => 'null|string'], default: 'string')] $value) {}

/**
 * Return current cache expire
 * @link https://php.net/manual/en/function.session-cache-expire.php
 * @param int|null $value [optional] <p>
 * If <i>new_cache_expire</i> is given, the current cache
 * expire is replaced with <i>new_cache_expire</i>.
 * </p>
 * <p>
 * Setting <i>new_cache_expire</i> is of value only, if
 * session.cache_limiter is set to a value
 * different from nocache.
 * </p>
 * @return int|false the current setting of session.cache_expire.
 * The value returned should be read in minutes, defaults to 180.
 */
#[LanguageLevelTypeAware(["8.0" => "int|false"], default: "int")]
function session_cache_expire(#[LanguageLevelTypeAware(['8.0' => 'null|int'], default: 'int')] $value) {}

/**
 * Set the session cookie parameters
 * @link https://php.net/manual/en/function.session-set-cookie-params.php
 * @param array $lifetime_or_options <p>
 * An associative array which may have any of the keys lifetime, path, domain,
 * secure, httponly and samesite. The values have the same meaning as described
 * for the parameters with the same name. The value of the samesite element
 * should be either Lax or Strict. If any of the allowed options are not given,
 * their default values are the same as the default values of the explicit
 * parameters. If the samesite element is omitted, no SameSite cookie attribute
 * is set.
 * </p>
 * @return bool returns true on success or false on failure.
 * @since 7.3
 */
function session_set_cookie_params(array $lifetime_or_options): bool {}

/**
 * Set the session cookie parameters
 * @link https://php.net/manual/en/function.session-set-cookie-params.php
 * @param int $lifetime_or_options <p>
 * Lifetime of the
 * session cookie, defined in seconds.
 * </p>
 * @param string|null $path [optional] <p>
 * Path on the domain where
 * the cookie will work. Use a single slash ('/') for all paths on the
 * domain.
 * </p>
 * @param string|null $domain [optional] <p>
 * Cookie domain, for
 * example 'www.php.net'. To make cookies visible on all subdomains then
 * the domain must be prefixed with a dot like '.php.net'.
 * </p>
 * @param bool|null $secure [optional] <p>
 * If true cookie will only be sent over
 * secure connections.
 * </p>
 * @param bool|null $httponly [optional] <p>
 * If set to true then PHP will attempt to send the
 * httponly
 * flag when setting the session cookie.
 * </p>
 * @return void|bool since 7.2.0 returns true on success or false on failure.
 */
#[LanguageLevelTypeAware(["7.2" => "bool"], default: "void")]
function session_set_cookie_params(int $lifetime_or_options, ?string $path = null, ?string $domain = null, ?bool $secure = null, ?bool $httponly = null) {}

/**
 * Get the session cookie parameters
 * @link https://php.net/manual/en/function.session-get-cookie-params.php
 * @return array an array with the current session cookie information, the array
 * contains the following items:
 * "lifetime" - The
 * lifetime of the cookie in seconds.
 * "path" - The path where
 * information is stored.
 * "domain" - The domain
 * of the cookie.
 * "secure" - The cookie
 * should only be sent over secure connections.
 * "httponly" - The
 * cookie can only be accessed through the HTTP protocol.
 */
#[ArrayShape(["lifetime" => "int", "path" => "string", "domain" => "string", "secure" => "bool", "httponly" => "bool", "samesite" => "string"])]
function session_get_cookie_params(): array {}

/**
 * Write session data and end session
 * @link https://php.net/manual/en/function.session-write-close.php
 * @return void|bool since 7.2.0 returns true on success or false on failure.
 */
#[LanguageLevelTypeAware(["7.2" => "bool"], default: "void")]
function session_write_close() {}

/**
 * Alias of <b>session_write_close</b>
 * @link https://php.net/manual/en/function.session-commit.php
 * @return void|bool since 7.2.0 returns true on success or false on failure.
 */
#[LanguageLevelTypeAware(["7.2" => "bool"], default: "void")]
function session_commit() {}

/**
 * (PHP 5 >= 5.4.0)<br>
 * Returns the current session status
 * @link https://php.net/manual/en/function.session-status.php
 * @return int <b>PHP_SESSION_DISABLED</b> if sessions are disabled.
 * <b>PHP_SESSION_NONE</b> if sessions are enabled, but none exists.
 * <b>PHP_SESSION_ACTIVE</b> if sessions are enabled, and one exists.
 * @since 5.4
 */
function session_status(): int {}

/**
 * (PHP 5 >= 5.6.0)<br>
 * Discard session array changes and finish session
 * @link https://php.net/manual/en/function.session-abort.php
 * @return void|bool since 7.2.0 returns true if a session was successfully reinitialized or false on failure.
 * @since 5.6
 */
#[LanguageLevelTypeAware(["7.2" => "bool"], default: "void")]
function session_abort() {}

/**
 * (PHP 5 >= 5.6.0)<br>
 * Re-initialize session array with original values
 * @link https://php.net/manual/en/function.session-reset.php
 * @return void|bool since 7.2.0 returns true if a session was successfully reinitialized or false on failure.
 * @since 5.6
 */
#[LanguageLevelTypeAware(["7.2" => "bool"], default: "void")]
function session_reset() {}

// End of session v.
<?php

use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\TentativeType;

/**
 * <b>SessionHandlerInterface</b> is an interface which defines
 * a prototype for creating a custom session handler.
 * In order to pass a custom session handler to
 * session_set_save_handler() using its OOP invocation,
 * the class must implement this interface.
 * @link https://php.net/manual/en/class.sessionhandlerinterface.php
 * @since 5.4
 */
interface SessionHandlerInterface
{
    /**
     * Close the session
     * @link https://php.net/manual/en/sessionhandlerinterface.close.php
     * @return bool <p>
     * The return value (usually TRUE on success, FALSE on failure).
     * Note this value is returned internally to PHP for processing.
     * </p>
     * @since 5.4
     */
    #[TentativeType]
    public function close(): bool;

    /**
     * Destroy a session
     * @link https://php.net/manual/en/sessionhandlerinterface.destroy.php
     * @param string $id The session ID being destroyed.
     * @return bool <p>
     * The return value (usually TRUE on success, FALSE on failure).
     * Note this value is returned internally to PHP for processing.
     * </p>
     * @since 5.4
     */
    #[TentativeType]
    public function destroy(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $id): bool;

    /**
     * Cleanup old sessions
     * @link https://php.net/manual/en/sessionhandlerinterface.gc.php
     * @param int $max_lifetime <p>
     * Sessions that have not updated for
     * the last maxlifetime seconds will be removed.
     * </p>
     * @return int|false <p>
     * Returns the number of deleted sessions on success, or false on failure. Prior to PHP version 7.1, the function returned true on success.
     * Note this value is returned internally to PHP for processing.
     * </p>
     * @since 5.4
     */
    #[LanguageLevelTypeAware(['7.1' => 'int|false'], default: 'bool')]
    #[TentativeType]
    public function gc(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $max_lifetime): int|false;

    /**
     * Initialize session
     * @link https://php.net/manual/en/sessionhandlerinterface.open.php
     * @param string $path The path where to store/retrieve the session.
     * @param string $name The session name.
     * @return bool <p>
     * The return value (usually TRUE on success, FALSE on failure).
     * Note this value is returned internally to PHP for processing.
     * </p>
     * @since 5.4
     */
    #[TentativeType]
    public function open(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $path,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name
    ): bool;

    /**
     * Read session data
     * @link https://php.net/manual/en/sessionhandlerinterface.read.php
     * @param string $id The session id to read data for.
     * @return string|false <p>
     * Returns an encoded string of the read data.
     * If nothing was read, it must return false.
     * Note this value is returned internally to PHP for processing.
     * </p>
     * @since 5.4
     */
    #[TentativeType]
    public function read(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $id): string|false;

    /**
     * Write session data
     * @link https://php.net/manual/en/sessionhandlerinterface.write.php
     * @param string $id The session id.
     * @param string $data <p>
     * The encoded session data. This data is the
     * result of the PHP internally encoding
     * the $_SESSION superglobal to a serialized
     * string and passing it as this parameter.
     * Please note sessions use an alternative serialization method.
     * </p>
     * @return bool <p>
     * The return value (usually TRUE on success, FALSE on failure).
     * Note this value is returned internally to PHP for processing.
     * </p>
     * @since 5.4
     */
    #[TentativeType]
    public function write(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $id,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data
    ): bool;
}

/**
 * <b>SessionIdInterface</b>
 * @link https://php.net/manual/en/class.sessionidinterface.php
 * @since 5.5.1
 */
interface SessionIdInterface
{
    /**
     * Create session ID
     * @link https://php.net/manual/en/sessionidinterface.create-sid.php
     * @return string <p>
     * The new session ID. Note that this value is returned internally to PHP for processing.
     * </p>
     */
    #[TentativeType]
    public function create_sid(): string;
}

/**
 * <b>SessionUpdateTimestampHandlerInterface</b> is an interface which
 * defines a prototype for updating the life time of an existing session.
 * In order to use the lazy_write option must be enabled and a custom session
 * handler must implement this interface.
 * @since 7.0
 */
interface SessionUpdateTimestampHandlerInterface
{
    /**
     * Validate session id
     * @link https://www.php.net/manual/sessionupdatetimestamphandlerinterface.validateid
     * @param string $id The session id
     * @return bool <p>
     * Note this value is returned internally to PHP for processing.
     * </p>
     */
    #[TentativeType]
    public function validateId($id): bool;

    /**
     * Update timestamp of a session
     * @link https://www.php.net/manual/sessionupdatetimestamphandlerinterface.updatetimestamp.php
     * @param string $id The session id
     * @param string $data <p>
     * The encoded session data. This data is the
     * result of the PHP internally encoding
     * the $_SESSION superglobal to a serialized
     * string and passing it as this parameter.
     * Please note sessions use an alternative serialization method.
     * </p>
     * @return bool
     */
    #[TentativeType]
    public function updateTimestamp($id, $data): bool;
}

/**
 * <b>SessionHandler</b> a special class that can
 * be used to expose the current internal PHP session
 * save handler by inheritance. There are six methods
 * which wrap the six internal session save handler
 * callbacks (open, close, read, write, destroy and gc).
 * By default, this class will wrap whatever internal
 * save handler is set as as defined by the
 * session.save_handler configuration directive which is usually
 * files by default. Other internal session save handlers are provided by
 * PHP extensions such as SQLite (as sqlite),
 * Memcache (as memcache), and Memcached (as memcached).
 * @link https://php.net/manual/en/class.reflectionzendextension.php
 * @since 5.4
 */
class SessionHandler implements SessionHandlerInterface, SessionIdInterface
{
    /**
     * Close the session
     * @link https://php.net/manual/en/sessionhandler.close.php
     * @return bool <p>
     * The return value (usually TRUE on success, FALSE on failure).
     * Note this value is returned internally to PHP for processing.
     * </p>
     * @since 5.4
     */
    #[TentativeType]
    public function close(): bool {}

    /**
     * Return a new session ID
     * @link https://php.net/manual/en/sessionhandler.create-sid.php
     * @return string <p>A session ID valid for the default session handler.</p>
     * @since 5.5.1
     */
    #[TentativeType]
    public function create_sid(): string {}

    /**
     * Destroy a session
     * @link https://php.net/manual/en/sessionhandler.destroy.php
     * @param string $id The session ID being destroyed.
     * @return bool <p>
     * The return value (usually TRUE on success, FALSE on failure).
     * Note this value is returned internally to PHP for processing.
     * </p>
     * @since 5.4
     */
    #[TentativeType]
    public function destroy(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $id): bool {}

    /**
     * Cleanup old sessions
     * @link https://php.net/manual/en/sessionhandler.gc.php
     * @param int $max_lifetime <p>
     * Sessions that have not updated for
     * the last maxlifetime seconds will be removed.
     * </p>
     * @return int|bool <p>
     * The return value (usually TRUE on success, FALSE on failure).
     * Note this value is returned internally to PHP for processing.
     * </p>
     * @since 5.4
     */
    #[TentativeType]
    public function gc(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $max_lifetime): int|false {}

    /**
     * Initialize session
     * @link https://php.net/manual/en/sessionhandler.open.php
     * @param string $path The path where to store/retrieve the session.
     * @param string $name The session name.
     * @return bool <p>
     * The return value (usually TRUE on success, FALSE on failure).
     * Note this value is returned internally to PHP for processing.
     * </p>
     * @since 5.4
     */
    #[TentativeType]
    public function open(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $path,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name
    ): bool {}

    /**
     * Read session data
     * @link https://php.net/manual/en/sessionhandler.read.php
     * @param string $id The session id to read data for.
     * @return string|false <p>
     * Returns an encoded string of the read data.
     * If nothing was read, it must return an empty string.
     * Note this value is returned internally to PHP for processing.
     * </p>
     * @since 5.4
     */
    #[TentativeType]
    public function read(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $id): string|false {}

    /**
     * Write session data
     * @link https://php.net/manual/en/sessionhandler.write.php
     * @param string $id The session id.
     * @param string $data <p>
     * The encoded session data. This data is the
     * result of the PHP internally encoding
     * the $_SESSION superglobal to a serialized
     * string and passing it as this parameter.
     * Please note sessions use an alternative serialization method.
     * </p>
     * @return bool <p>
     * The return value (usually TRUE on success, FALSE on failure).
     * Note this value is returned internally to PHP for processing.
     * </p>
     * @since 5.4
     */
    #[TentativeType]
    public function write(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $id,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data
    ): bool {}

    /**
     * Validate session id
     * @param string $session_id The session id
     * @return bool <p>
     * Note this value is returned internally to PHP for processing.
     * </p>
     */
    public function validateId($session_id) {}

    /**
     * Update timestamp of a session
     * @param string $session_id The session id
     * @param string $session_data <p>
     * The encoded session data. This data is the
     * result of the PHP internally encoding
     * the $_SESSION superglobal to a serialized
     * string and passing it as this parameter.
     * Please note sessions use an alternative serialization method.
     * </p>
     * @return bool
     */
    public function updateTimestamp($session_id, $session_data) {}
}
<?php

// Start of posix v.
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Pure;

/**
 * Send a signal to a process
 * @link https://php.net/manual/en/function.posix-kill.php
 * @param int $process_id <p>
 * The process identifier.
 * </p>
 * @param int $signal <p>
 * One of the PCNTL signals constants.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function posix_kill(int $process_id, int $signal): bool {}

/**
 * Return the current process identifier
 * @link https://php.net/manual/en/function.posix-getpid.php
 * @return int the identifier, as an integer.
 */
#[Pure]
function posix_getpid(): int {}

/**
 * Return the parent process identifier
 * @link https://php.net/manual/en/function.posix-getppid.php
 * @return int the identifier, as an integer.
 */
#[Pure]
function posix_getppid(): int {}

/**
 * Return the real user ID of the current process
 * @link https://php.net/manual/en/function.posix-getuid.php
 * @return int the user id, as an integer
 */
#[Pure]
function posix_getuid(): int {}

/**
 * Set the UID of the current process
 * @link https://php.net/manual/en/function.posix-setuid.php
 * @param int $user_id <p>
 * The user id.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function posix_setuid(int $user_id): bool {}

/**
 * Return the effective user ID of the current process
 * @link https://php.net/manual/en/function.posix-geteuid.php
 * @return int the user id, as an integer
 */
#[Pure]
function posix_geteuid(): int {}

/**
 * Set the effective UID of the current process
 * @link https://php.net/manual/en/function.posix-seteuid.php
 * @param int $user_id <p>
 * The user id.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function posix_seteuid(int $user_id): bool {}

/**
 * Set system resource limits
 * @link https://php.net/manual/en/function.posix-setrlimit.php
 * @param int $resource <p>
 * The
 * {@link https://php.net/manual/en/posix.constants.setrlimit.php resource limit constant}
 * corresponding to the limit that is being set.
 * </p>
 * @param int $soft_limit The soft limit, in whatever unit the resource limit requires, or POSIX_RLIMIT_INFINITY.
 * @param int $hard_limit The hard limit, in whatever unit the resource limit requires, or POSIX_RLIMIT_INFINITY.
 * @return bool Returns TRUE on success or FALSE on failure.
 * @since 7.0
 */
function posix_setrlimit(int $resource, int $soft_limit, int $hard_limit): bool {}
/**
 * Return the real group ID of the current process
 * @link https://php.net/manual/en/function.posix-getgid.php
 * @return int the real group id, as an integer.
 */
#[Pure]
function posix_getgid(): int {}

/**
 * Set the GID of the current process
 * @link https://php.net/manual/en/function.posix-setgid.php
 * @param int $group_id <p>
 * The group id.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function posix_setgid(int $group_id): bool {}

/**
 * Return the effective group ID of the current process
 * @link https://php.net/manual/en/function.posix-getegid.php
 * @return int an integer of the effective group ID.
 */
#[Pure]
function posix_getegid(): int {}

/**
 * Set the effective GID of the current process
 * @link https://php.net/manual/en/function.posix-setegid.php
 * @param int $group_id <p>
 * The group id.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function posix_setegid(int $group_id): bool {}

/**
 * Return the group set of the current process
 * @link https://php.net/manual/en/function.posix-getgroups.php
 * @return array|false an array of integers containing the numeric group ids of the group
 * set of the current process.
 */
#[Pure]
function posix_getgroups(): array|false {}

/**
 * Return login name
 * @link https://php.net/manual/en/function.posix-getlogin.php
 * @return string|false the login name of the user, as a string.
 */
#[Pure]
function posix_getlogin(): string|false {}

/**
 * Return the current process group identifier
 * @link https://php.net/manual/en/function.posix-getpgrp.php
 * @return int the identifier, as an integer.
 */
#[Pure]
function posix_getpgrp(): int {}

/**
 * Make the current process a session leader
 * @link https://php.net/manual/en/function.posix-setsid.php
 * @return int the session id, or -1 on errors.
 */
function posix_setsid(): int {}

/**
 * Set process group id for job control
 * @link https://php.net/manual/en/function.posix-setpgid.php
 * @param int $process_id <p>
 * The process id.
 * </p>
 * @param int $process_group_id <p>
 * The process group id.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function posix_setpgid(int $process_id, int $process_group_id): bool {}

/**
 * Get process group id for job control
 * @link https://php.net/manual/en/function.posix-getpgid.php
 * @param int $process_id <p>
 * The process id.
 * </p>
 * @return int|false the identifier, as an integer.
 */
#[Pure]
function posix_getpgid(int $process_id): int|false {}

/**
 * Get the current sid of the process
 * @link https://php.net/manual/en/function.posix-getsid.php
 * @param int $process_id <p>
 * The process identifier. If set to 0, the current process is
 * assumed. If an invalid <i>pid</i> is
 * specified, then <b>FALSE</b> is returned and an error is set which
 * can be checked with <b>posix_get_last_error</b>.
 * </p>
 * @return int|false the identifier, as an integer.
 */
#[Pure]
function posix_getsid(int $process_id): int|false {}

/**
 * Get system name
 * @link https://php.net/manual/en/function.posix-uname.php
 * @return array|false a hash of strings with information about the
 * system. The indices of the hash are
 * sysname - operating system name (e.g. Linux)
 * nodename - system name (e.g. valiant)
 * release - operating system release (e.g. 2.2.10)
 * version - operating system version (e.g. #4 Tue Jul 20
 * 17:01:36 MEST 1999)
 * machine - system architecture (e.g. i586)
 * domainname - DNS domainname (e.g. example.com)
 * </p>
 * <p>
 * domainname is a GNU extension and not part of POSIX.1, so this
 * field is only available on GNU systems or when using the GNU
 * libc.
 */
#[Pure]
#[ArrayShape([
    'sysname' => 'string',
    'nodename' => 'string',
    'release' => 'string',
    'version' => 'string',
    'machine' => 'string',
    'domainname' => 'string',
])]
function posix_uname(): array|false {}

/**
 * Get process times
 * @link https://php.net/manual/en/function.posix-times.php
 * @return array|false a hash of strings with information about the current
 * process CPU usage. The indices of the hash are:
 * ticks - the number of clock ticks that have elapsed since
 * reboot.
 * utime - user time used by the current process.
 * stime - system time used by the current process.
 * cutime - user time used by current process and children.
 * cstime - system time used by current process and children.
 */
#[Pure]
#[ArrayShape([
    'ticks' => 'int',
    'utime' => 'int',
    'stime' => 'int',
    'cutime' => 'int',
    'cstime' => 'int'
])]
function posix_times(): array|false {}

/**
 * Get path name of controlling terminal
 * @link https://php.net/manual/en/function.posix-ctermid.php
 * @return string|false Upon successful completion, returns string of the pathname to
 * the current controlling terminal. Otherwise <b>FALSE</b> is returned and errno
 * is set, which can be checked with <b>posix_get_last_error</b>.
 */
#[Pure]
function posix_ctermid(): string|false {}

/**
 * Determine terminal device name
 * @link https://php.net/manual/en/function.posix-ttyname.php
 * @param int $file_descriptor <p>
 * The file descriptor.
 * </p>
 * @return string|false On success, returns a string of the absolute path of the
 * <i>fd</i>. On failure, returns <b>FALSE</b>
 */
#[Pure]
function posix_ttyname($file_descriptor): string|false {}

/**
 * Determine if a file descriptor is an interactive terminal
 * @link https://php.net/manual/en/function.posix-isatty.php
 * @param mixed $file_descriptor <p>
 * The file descriptor, which is expected to be either a file resource or an integer.
 * An integer will be assumed to be a file descriptor that can be passed
 * directly to the underlying system call.<br />
 * In almost all cases, you will want to provide a file resource.
 * </p>
 * @return bool <b>TRUE</b> if <i>fd</i> is an open descriptor connected
 * to a terminal and <b>FALSE</b> otherwise.
 */
#[Pure]
function posix_isatty($file_descriptor): bool {}

/**
 * Pathname of current directory
 * @link https://php.net/manual/en/function.posix-getcwd.php
 * @return string|false a string of the absolute pathname on success.
 * On error, returns <b>FALSE</b> and sets errno which can be checked with
 * <b>posix_get_last_error</b>.
 */
#[Pure(true)]
function posix_getcwd(): string|false {}

/**
 * Create a fifo special file (a named pipe)
 * @link https://php.net/manual/en/function.posix-mkfifo.php
 * @param string $filename <p>
 * Path to the FIFO file.
 * </p>
 * @param int $permissions <p>
 * The second parameter <i>mode</i> has to be given in
 * octal notation (e.g. 0644). The permission of the newly created
 * FIFO also depends on the setting of the current
 * <b>umask</b>. The permissions of the created file are
 * (mode & ~umask).
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function posix_mkfifo(string $filename, int $permissions): bool {}

/**
 * Create a special or ordinary file (POSIX.1)
 * @link https://php.net/manual/en/function.posix-mknod.php
 * @param string $filename <p>
 * The file to create
 * </p>
 * @param int $flags <p>
 * This parameter is constructed by a bitwise OR between file type (one of
 * the following constants: <b>POSIX_S_IFREG</b>,
 * <b>POSIX_S_IFCHR</b>, <b>POSIX_S_IFBLK</b>,
 * <b>POSIX_S_IFIFO</b> or
 * <b>POSIX_S_IFSOCK</b>) and permissions.
 * </p>
 * @param int $major [optional] <p>
 * The major device kernel identifier (required to pass when using
 * <b>S_IFCHR</b> or <b>S_IFBLK</b>).
 * </p>
 * @param int $minor [optional] <p>
 * The minor device kernel identifier.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function posix_mknod(string $filename, int $flags, int $major = 0, int $minor = 0): bool {}

/**
 * Determine accessibility of a file
 * @link https://php.net/manual/en/function.posix-access.php
 * @param string $filename <p>
 * The name of the file to be tested.
 * </p>
 * @param int $flags [optional] <p>
 * A mask consisting of one or more of <b>POSIX_F_OK</b>,
 * <b>POSIX_R_OK</b>, <b>POSIX_W_OK</b> and
 * <b>POSIX_X_OK</b>.
 * </p>
 * <p>
 * <b>POSIX_R_OK</b>, <b>POSIX_W_OK</b> and
 * <b>POSIX_X_OK</b> request checking whether the file
 * exists and has read, write and execute permissions, respectively.
 * <b>POSIX_F_OK</b> just requests checking for the
 * existence of the file.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function posix_access(string $filename, int $flags = POSIX_F_OK): bool {}

/**
 * Return info about a group by name
 * @link https://php.net/manual/en/function.posix-getgrnam.php
 * @param string $name <p>The name of the group</p>
 * @return array|false The array elements returned are:
 * <table>
 * The group information array
 * <tr valign="top">
 * <td>Element</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>name</td>
 * <td>
 * The name element contains the name of the group. This is
 * a short, usually less than 16 character "handle" of the
 * group, not the real, full name. This should be the same as
 * the <i>name</i> parameter used when
 * calling the function, and hence redundant.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>passwd</td>
 * <td>
 * The passwd element contains the group's password in an
 * encrypted format. Often, for example on a system employing
 * "shadow" passwords, an asterisk is returned instead.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>gid</td>
 * <td>
 * Group ID of the group in numeric form.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>members</td>
 * <td>
 * This consists of an array of
 * string's for all the members in the group.
 * </td>
 * </tr>
 * </table>
 */
#[Pure]
function posix_getgrnam(string $name): array|false {}

/**
 * Return info about a group by group id
 * @link https://php.net/manual/en/function.posix-getgrgid.php
 * @param int $group_id <p>
 * The group id.
 * </p>
 * @return array|false The array elements returned are:
 * <table>
 * The group information array
 * <tr valign="top">
 * <td>Element</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>name</td>
 * <td>
 * The name element contains the name of the group. This is
 * a short, usually less than 16 character "handle" of the
 * group, not the real, full name.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>passwd</td>
 * <td>
 * The passwd element contains the group's password in an
 * encrypted format. Often, for example on a system employing
 * "shadow" passwords, an asterisk is returned instead.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>gid</td>
 * <td>
 * Group ID, should be the same as the
 * <i>gid</i> parameter used when calling the
 * function, and hence redundant.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>members</td>
 * <td>
 * This consists of an array of
 * string's for all the members in the group.
 * </td>
 * </tr>
 * </table>
 */
#[Pure]
function posix_getgrgid(int $group_id): array|false {}

/**
 * Return info about a user by username
 * @link https://php.net/manual/en/function.posix-getpwnam.php
 * @param string $username <p>
 * An alphanumeric username.
 * </p>
 * @return array|false On success an array with the following elements is returned, else
 * <b>FALSE</b> is returned:
 * <table>
 * The user information array
 * <tr valign="top">
 * <td>Element</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>name</td>
 * <td>
 * The name element contains the username of the user. This is
 * a short, usually less than 16 character "handle" of the
 * user, not the real, full name. This should be the same as
 * the <i>username</i> parameter used when
 * calling the function, and hence redundant.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>passwd</td>
 * <td>
 * The passwd element contains the user's password in an
 * encrypted format. Often, for example on a system employing
 * "shadow" passwords, an asterisk is returned instead.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>uid</td>
 * <td>
 * User ID of the user in numeric form.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>gid</td>
 * <td>
 * The group ID of the user. Use the function
 * <b>posix_getgrgid</b> to resolve the group
 * name and a list of its members.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>gecos</td>
 * <td>
 * GECOS is an obsolete term that refers to the finger
 * information field on a Honeywell batch processing system.
 * The field, however, lives on, and its contents have been
 * formalized by POSIX. The field contains a comma separated
 * list containing the user's full name, office phone, office
 * number, and home phone number. On most systems, only the
 * user's full name is available.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>dir</td>
 * <td>
 * This element contains the absolute path to the home
 * directory of the user.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>shell</td>
 * <td>
 * The shell element contains the absolute path to the
 * executable of the user's default shell.
 * </td>
 * </tr>
 * </table>
 */
#[Pure]
#[ArrayShape([
    "name" => "string",
    "passwd" => "string",
    "uid" => "int",
    "gid" => "int",
    "gecos" => "string",
    "dir" => "string",
    "shell" => "string",
])]
function posix_getpwnam(string $username): array|false {}

/**
 * Return info about a user by user id
 * @link https://php.net/manual/en/function.posix-getpwuid.php
 * @param int $user_id <p>
 * The user identifier.
 * </p>
 * @return array|false an associative array with the following elements:
 * <table>
 * The user information array
 * <tr valign="top">
 * <td>Element</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>name</td>
 * <td>
 * The name element contains the username of the user. This is
 * a short, usually less than 16 character "handle" of the
 * user, not the real, full name.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>passwd</td>
 * <td>
 * The passwd element contains the user's password in an
 * encrypted format. Often, for example on a system employing
 * "shadow" passwords, an asterisk is returned instead.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>uid</td>
 * <td>
 * User ID, should be the same as the
 * <i>uid</i> parameter used when calling the
 * function, and hence redundant.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>gid</td>
 * <td>
 * The group ID of the user. Use the function
 * <b>posix_getgrgid</b> to resolve the group
 * name and a list of its members.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>gecos</td>
 * <td>
 * GECOS is an obsolete term that refers to the finger
 * information field on a Honeywell batch processing system.
 * The field, however, lives on, and its contents have been
 * formalized by POSIX. The field contains a comma separated
 * list containing the user's full name, office phone, office
 * number, and home phone number. On most systems, only the
 * user's full name is available.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>dir</td>
 * <td>
 * This element contains the absolute path to the
 * home directory of the user.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>shell</td>
 * <td>
 * The shell element contains the absolute path to the
 * executable of the user's default shell.
 * </td>
 * </tr>
 * </table>
 */
#[Pure]
#[ArrayShape([
    'name' => 'string',
    'passwd' => 'string',
    'uid' => 'int',
    'gid' => 'int',
    'gecos' => 'string',
    'dir' => 'string',
    'shell' => 'string',
])]
function posix_getpwuid(int $user_id): array|false {}

/**
 * Return info about system resource limits
 * @link https://php.net/manual/en/function.posix-getrlimit.php
 * @return array|false an associative array of elements for each
 * limit that is defined. Each limit has a soft and a hard limit.
 * <table>
 * List of possible limits returned
 * <tr valign="top">
 * <td>Limit name</td>
 * <td>Limit description</td>
 * </tr>
 * <tr valign="top">
 * <td>core</td>
 * <td>
 * The maximum size of the core file. When 0, not core files are
 * created. When core files are larger than this size, they will
 * be truncated at this size.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>totalmem</td>
 * <td>
 * The maximum size of the memory of the process, in bytes.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>virtualmem</td>
 * <td>
 * The maximum size of the virtual memory for the process, in bytes.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>data</td>
 * <td>
 * The maximum size of the data segment for the process, in bytes.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>stack</td>
 * <td>
 * The maximum size of the process stack, in bytes.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>rss</td>
 * <td>
 * The maximum number of virtual pages resident in RAM
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>maxproc</td>
 * <td>
 * The maximum number of processes that can be created for the
 * real user ID of the calling process.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>memlock</td>
 * <td>
 * The maximum number of bytes of memory that may be locked into RAM.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>cpu</td>
 * <td>
 * The amount of time the process is allowed to use the CPU.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>filesize</td>
 * <td>
 * The maximum size of the data segment for the process, in bytes.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>openfiles</td>
 * <td>
 * One more than the maximum number of open file descriptors.
 * </td>
 * </tr>
 * </table>
 */
#[Pure]
function posix_getrlimit(): array|false {}

/**
 * Retrieve the error number set by the last posix function that failed
 * @link https://php.net/manual/en/function.posix-get-last-error.php
 * @return int the errno (error number) set by the last posix function that
 * failed. If no errors exist, 0 is returned.
 */
#[Pure(true)]
function posix_get_last_error(): int {}

/**
 * Alias of <b>posix_get_last_error</b>
 * @link https://php.net/manual/en/function.posix-errno.php
 */
#[Pure(true)]
function posix_errno(): int {}

/**
 * Retrieve the system error message associated with the given errno
 * @link https://php.net/manual/en/function.posix-strerror.php
 * @param int $error_code <p>
 * A POSIX error number, returned by
 * <b>posix_get_last_error</b>. If set to 0, then the
 * string "Success" is returned.
 * </p>
 * @return string the error message, as a string.
 */
#[Pure]
function posix_strerror(int $error_code): string {}

/**
 * Calculate the group access list
 * @link https://php.net/manual/en/function.posix-initgroups.php
 * @param string $username <p>
 * The user to calculate the list for.
 * </p>
 * @param int $group_id <p>
 * Typically the group number from the password file.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
#[Pure]
function posix_initgroups(string $username, int $group_id): bool {}

/**
 * Check whether the file exists.
 * @link https://php.net/manual/en/posix.constants.php
 */
define('POSIX_F_OK', 0);

/**
 * Check whether the file exists and has execute permissions.
 * @link https://php.net/manual/en/posix.constants.php
 */
define('POSIX_X_OK', 1);

/**
 * Check whether the file exists and has write permissions.
 * @link https://php.net/manual/en/posix.constants.php
 */
define('POSIX_W_OK', 2);

/**
 * Check whether the file exists and has read permissions.
 * @link https://php.net/manual/en/posix.constants.php
 */
define('POSIX_R_OK', 4);

/**
 * Normal file
 * @link https://php.net/manual/en/posix.constants.php
 */
define('POSIX_S_IFREG', 32768);

/**
 * Character special file
 * @link https://php.net/manual/en/posix.constants.php
 */
define('POSIX_S_IFCHR', 8192);

/**
 * Block special file
 * @link https://php.net/manual/en/posix.constants.php
 */
define('POSIX_S_IFBLK', 24576);

/**
 * FIFO (named pipe) special file
 * @link https://php.net/manual/en/posix.constants.php
 */
define('POSIX_S_IFIFO', 4096);

/**
 * Socket
 * @link https://php.net/manual/en/posix.constants.php
 */
define('POSIX_S_IFSOCK', 49152);

/**
 * The maximum size of the process's address space in bytes. See also PHP's memory_limit configuration directive.
 * @link https://php.net/manual/en/posix.constants.setrlimit.php
 */
define('POSIX_RLIMIT_AS', 5);
/**
 * The maximum size of a core file. If the limit is set to 0, no core file will be generated.
 * @link https://php.net/manual/en/posix.constants.setrlimit.php
 */
define('POSIX_RLIMIT_CORE', 4);

/**
 * The maximum amount of CPU time that the process can use, in seconds.
 * When the soft limit is hit, a SIGXCPU signal will be sent, which can be caught with pcntl_signal().
 * Depending on the operating system, additional SIGXCPU signals may be sent each second until the hard limit is hit,
 * at which point an uncatchable SIGKILL signal is sent. See also set_time_limit().
 * @link https://php.net/manual/en/posix.constants.setrlimit.php
 */
define('POSIX_RLIMIT_CPU', 0);

/**
 * The maximum size of the process's data segment, in bytes.
 * It is extremely unlikely that this will have any effect on
 * the execution of PHP unless an extension is in use that calls brk() or sbrk().
 * @link https://php.net/manual/en/posix.constants.setrlimit.php
 */
define('POSIX_RLIMIT_DATA', 2);

/**
 * The maximum size of files that the process can create, in bytes.
 * @link https://php.net/manual/en/posix.constants.setrlimit.php
 */
define('POSIX_RLIMIT_FSIZE', 1);

/**
 * The maximum number of locks that the process can create.
 * This is only supported on extremely old Linux kernels.
 * @link https://php.net/manual/en/posix.constants.setrlimit.php
 */
define('POSIX_RLIMIT_LOCKS', 10);

/**
 * The maximum number of bytes that can be allocated for POSIX message queues.
 * PHP does not ship with support for POSIX message queues,
 * so this limit will not have any effect unless you are using an extension that implements that support.
 * @link https://php.net/manual/en/posix.constants.setrlimit.php
 */
define('POSIX_RLIMIT_MSGQUEUE', 12);

/**
 * The maximum value to which the process can be <a href="https://php.net/manual/en/function.pcntl-setpriority.php"> reniced</a> to. The value that will be used will be 20 - limit, as resource limit values cannot be negative.
 * @link https://php.net/manual/en/posix.constants.setrlimit.php
 */
define('POSIX_RLIMIT_NICE', 13);

/**
 * The maximum real time priority that can be set via the sched_setscheduler() and sched_setparam() system calls.
 * @link https://php.net/manual/en/posix.constants.setrlimit.php
 */
define('POSIX_RLIMIT_RTPRIO', 14);

/**
 * The maximum amount of CPU time, in microseconds,
 * that the process can consume without making a blocking system call if it is using real time scheduling.
 * @link https://php.net/manual/en/posix.constants.setrlimit.php
 */
define('POSIX_RLIMIT_RTTIME', 15);

/**
 * The maximum number of signals that can be queued for the real user ID of the process.
 * @link https://php.net/manual/en/posix.constants.setrlimit.php
 */
define('POSIX_RLIMIT_SIGPENDING', 11);

/**
 * The maximum number of bytes that can be locked into memory.
 * @link https://php.net/manual/en/posix.constants.setrlimit.php
 */
define('POSIX_RLIMIT_MEMLOCK', 6);

/**
 * A value one greater than the maximum file descriptor number that can be opened by this process.
 * @link https://php.net/manual/en/posix.constants.setrlimit.php
 */
define('POSIX_RLIMIT_NOFILE', 8);

/**
 * The maximum number of processes (and/or threads, on some operating systems)
 * that can be created for the real user ID of the process.
 * @link https://php.net/manual/en/posix.constants.setrlimit.php
 */
define('POSIX_RLIMIT_NPROC', 7);

/**
 * The maximum size of the process's resident set, in pages.
 * @link https://php.net/manual/en/posix.constants.setrlimit.php
 */
define('POSIX_RLIMIT_RSS', 5);

/**
 * The maximum size of the process stack, in bytes.
 * @link https://php.net/manual/en/posix.constants.setrlimit.php
 */
define('POSIX_RLIMIT_STACK', 3);

/**
 * Used to indicate an infinite value for a resource limit.
 * @link https://php.net/manual/en/posix.constants.setrlimit.php
 */
define('POSIX_RLIMIT_INFINITY', 9223372036854775807);

// End of posix v.
<?php

// Start of calendar v.
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;

/**
 * Converts Julian Day Count to Gregorian date
 * @link https://php.net/manual/en/function.jdtogregorian.php
 * @param int $julian_day <p>
 * A julian day number as integer
 * </p>
 * @return string The gregorian date as a string in the form "month/day/year"
 */
function jdtogregorian(int $julian_day): string {}

/**
 * Converts a Gregorian date to Julian Day Count
 * @link https://php.net/manual/en/function.gregoriantojd.php
 * @param int $month <p>
 * The month as a number from 1 (for January) to 12 (for December)
 * </p>
 * @param int $day <p>
 * The day as a number from 1 to 31
 * </p>
 * @param int $year <p>
 * The year as a number between -4714 and 9999
 * </p>
 * @return int The julian day for the given gregorian date as an integer.
 */
function gregoriantojd(int $month, int $day, int $year): int {}

/**
 * Converts a Julian Day Count to a Julian Calendar Date
 * @link https://php.net/manual/en/function.jdtojulian.php
 * @param int $julian_day <p>
 * A julian day number as integer
 * </p>
 * @return string The julian date as a string in the form "month/day/year"
 */
function jdtojulian(int $julian_day): string {}

/**
 * Converts a Julian Calendar date to Julian Day Count
 * @link https://php.net/manual/en/function.juliantojd.php
 * @param int $month <p>
 * The month as a number from 1 (for January) to 12 (for December)
 * </p>
 * @param int $day <p>
 * The day as a number from 1 to 31
 * </p>
 * @param int $year <p>
 * The year as a number between -4713 and 9999
 * </p>
 * @return int The julian day for the given julian date as an integer.
 */
function juliantojd(int $month, int $day, int $year): int {}

/**
 * Converts a Julian day count to a Jewish calendar date
 * @link https://php.net/manual/en/function.jdtojewish.php
 * @param int $julian_day
 * @param bool $hebrew [optional] <p>
 * If the <i>hebrew</i> parameter is set to <b>TRUE</b>, the
 * <i>fl</i> parameter is used for Hebrew, string based,
 * output format.
 * </p>
 * @param int $flags [optional] <p>
 * The available formats are:
 * <b>CAL_JEWISH_ADD_ALAFIM_GERESH</b>,
 * <b>CAL_JEWISH_ADD_ALAFIM</b>,
 * <b>CAL_JEWISH_ADD_GERESHAYIM</b>.
 * </p>
 * @return string The jewish date as a string in the form "month/day/year"
 */
function jdtojewish(int $julian_day, bool $hebrew = false, int $flags = 0): string {}

/**
 * Converts a date in the Jewish Calendar to Julian Day Count
 * @link https://php.net/manual/en/function.jewishtojd.php
 * @param int $month <p>
 * The month as a number from 1 to 13
 * </p>
 * @param int $day <p>
 * The day as a number from 1 to 30
 * </p>
 * @param int $year <p>
 * The year as a number between 1 and 9999
 * </p>
 * @return int The julian day for the given jewish date as an integer.
 */
function jewishtojd(int $month, int $day, int $year): int {}

/**
 * Converts a Julian Day Count to the French Republican Calendar
 * @link https://php.net/manual/en/function.jdtofrench.php
 * @param int $julian_day
 * @return string The french revolution date as a string in the form "month/day/year"
 */
function jdtofrench(int $julian_day): string {}

/**
 * Converts a date from the French Republican Calendar to a Julian Day Count
 * @link https://php.net/manual/en/function.frenchtojd.php
 * @param int $month <p>
 * The month as a number from 1 (for Vendémiaire) to 13 (for the period of 5-6 days at the end of each year)
 * </p>
 * @param int $day <p>
 * The day as a number from 1 to 30
 * </p>
 * @param int $year <p>
 * The year as a number between 1 and 14
 * </p>
 * @return int The julian day for the given french revolution date as an integer.
 */
function frenchtojd(int $month, int $day, int $year): int {}

/**
 * Returns the day of the week
 * @link https://php.net/manual/en/function.jddayofweek.php
 * @param int $julian_day <p>
 * A julian day number as integer
 * </p>
 * @param int $mode [optional] <table>
 * Calendar week modes
 * <tr valign="top">
 * <td>Mode</td>
 * <td>Meaning</td>
 * </tr>
 * <tr valign="top">
 * <td>0 (Default)</td>
 * <td>
 * Return the day number as an int (0=Sunday, 1=Monday, etc)
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>1</td>
 * <td>
 * Returns string containing the day of week
 * (English-Gregorian)
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>2</td>
 * <td>
 * Return a string containing the abbreviated day of week
 * (English-Gregorian)
 * </td>
 * </tr>
 * </table>
 * @return string|int The gregorian weekday as either an integer or string.
 */
function jddayofweek(int $julian_day, int $mode = CAL_DOW_DAYNO): string|int {}

/**
 * Returns a month name
 * @link https://php.net/manual/en/function.jdmonthname.php
 * @param int $julian_day
 * @param int $mode
 * @return string The month name for the given Julian Day and <i>calendar</i>.
 */
function jdmonthname(int $julian_day, int $mode): string {}

/**
 * Get Unix timestamp for midnight on Easter of a given year
 * @link https://php.net/manual/en/function.easter-date.php
 * @param int|null $year [optional] <p>
 * The year as a number between 1970 an 2037
 * </p>
 * @param int $mode [optional] Allows Easter dates to be calculated based on the Julian calendar when set to CAL_EASTER_ALWAYS_JULIAN
 * @return int The easter date as a unix timestamp.
 */
function easter_date(?int $year, #[PhpStormStubsElementAvailable(from: '8.0')] int $mode = CAL_EASTER_DEFAULT): int {}

/**
 * Get number of days after March 21 on which Easter falls for a given year
 * @link https://php.net/manual/en/function.easter-days.php
 * @param positive-int|null $year [optional] <p>
 * The year as a positive number
 * </p>
 * @param int $mode [optional] <p>
 * Allows to calculate easter dates based
 * on the Gregorian calendar during the years 1582 - 1752 when set to
 * <b>CAL_EASTER_ROMAN</b>. See the calendar constants for more valid
 * constants.
 * </p>
 * @return int The number of days after March 21st that the Easter Sunday
 * is in the given <i>year</i>.
 */
function easter_days(?int $year, int $mode = CAL_EASTER_DEFAULT): int {}

/**
 * Convert Unix timestamp to Julian Day
 * @link https://php.net/manual/en/function.unixtojd.php
 * @param int|null $timestamp defaults to time() <p>
 * A unix timestamp to convert.
 * </p>
 * @return int|false A julian day number as integer.
 */
function unixtojd(?int $timestamp = null): int|false {}

/**
 * Convert Julian Day to Unix timestamp
 * @link https://php.net/manual/en/function.jdtounix.php
 * @param int $julian_day <p>
 * A julian day number between 2440588 and 2465342.
 * </p>
 * @return int The unix timestamp for the start of the given julian day.
 */
function jdtounix(int $julian_day): int {}

/**
 * Converts from a supported calendar to Julian Day Count
 * @link https://php.net/manual/en/function.cal-to-jd.php
 * @param int $calendar <p>
 * Calendar to convert from, one of
 * <b>CAL_GREGORIAN</b>,
 * <b>CAL_JULIAN</b>,
 * <b>CAL_JEWISH</b> or
 * <b>CAL_FRENCH</b>.
 * </p>
 * @param int $month <p>
 * The month as a number, the valid range depends
 * on the <i>calendar</i>
 * </p>
 * @param int $day <p>
 * The day as a number, the valid range depends
 * on the <i>calendar</i>
 * </p>
 * @param int $year <p>
 * The year as a number, the valid range depends
 * on the <i>calendar</i>
 * </p>
 * @return int A Julian Day number.
 */
function cal_to_jd(int $calendar, int $month, int $day, int $year): int {}

/**
 * Converts from Julian Day Count to a supported calendar
 * @link https://php.net/manual/en/function.cal-from-jd.php
 * @param int $julian_day <p>
 * Julian day as integer
 * </p>
 * @param int $calendar <p>
 * Calendar to convert to
 * </p>
 * @return array an array containing calendar information like month, day, year,
 * day of week, abbreviated and full names of weekday and month and the
 * date in string form "month/day/year".
 */
#[ArrayShape([
    "date" => "string",
    "month" => "int",
    "day" => "int",
    "year" => "int",
    "dow" => "int",
    "abbrevdayname" => "string",
    "dayname" => "string",
    "abbrevmonth" => "string",
    "monthname" => "string"
])]
function cal_from_jd(int $julian_day, int $calendar): array {}

/**
 * Return the number of days in a month for a given year and calendar
 * @link https://php.net/manual/en/function.cal-days-in-month.php
 * @param int $calendar <p>
 * Calendar to use for calculation
 * </p>
 * @param int $month <p>
 * Month in the selected calendar
 * </p>
 * @param int $year <p>
 * Year in the selected calendar
 * </p>
 * @return int The length in days of the selected month in the given calendar
 */
function cal_days_in_month(int $calendar, int $month, int $year): int {}

/**
 * Returns information about a particular calendar
 * @link https://php.net/manual/en/function.cal-info.php
 * @param int $calendar [optional] <p>
 * Calendar to return information for. If no calendar is specified
 * information about all calendars is returned.
 * </p>
 * @return array
 */
#[ArrayShape(["months" => "array", "abbrevmonths" => "array", "maxdaysinmonth" => "int", "calname" => "string", "calsymbol" => "string"])]
function cal_info(int $calendar = -1): array {}

define('CAL_GREGORIAN', 0);
define('CAL_JULIAN', 1);
define('CAL_JEWISH', 2);
define('CAL_FRENCH', 3);
define('CAL_NUM_CALS', 4);
define('CAL_DOW_DAYNO', 0);
define('CAL_DOW_SHORT', 2);
define('CAL_DOW_LONG', 1);
define('CAL_MONTH_GREGORIAN_SHORT', 0);
define('CAL_MONTH_GREGORIAN_LONG', 1);
define('CAL_MONTH_JULIAN_SHORT', 2);
define('CAL_MONTH_JULIAN_LONG', 3);
define('CAL_MONTH_JEWISH', 4);
define('CAL_MONTH_FRENCH', 5);
define('CAL_EASTER_DEFAULT', 0);
define('CAL_EASTER_ROMAN', 1);
define('CAL_EASTER_ALWAYS_GREGORIAN', 2);
define('CAL_EASTER_ALWAYS_JULIAN', 3);
define('CAL_JEWISH_ADD_ALAFIM_GERESH', 2);
define('CAL_JEWISH_ADD_ALAFIM', 4);
define('CAL_JEWISH_ADD_GERESHAYIM', 8);

// End of calendar v.
<?php

// Start of shmop v.
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;

/**
 * Create or open shared memory block
 * @link https://php.net/manual/en/function.shmop-open.php
 * @param int $key <p>
 * System's id for the shared memory block.
 * Can be passed as a decimal or hex.
 * </p>
 * @param string $mode <p>
 * The flags that you can use:
 * "a" for access (sets SHM_RDONLY for shmat)
 * use this flag when you need to open an existing shared memory
 * segment for read only</p>
 * @param int $permissions <p>
 * The permissions that you wish to assign to your memory segment, those
 * are the same as permission for a file. Permissions need to be passed
 * in octal form, like for example 0644
 * </p>
 * @param int $size <p>
 * The size of the shared memory block you wish to create in bytes
 * </p>
 * @return resource|false|Shmop On success <b>shmop_open</b> will return an id that you can
 * use to access the shared memory segment you've created. <b>FALSE</b> is
 * returned on failure.
 */
#[LanguageLevelTypeAware(["8.0" => "Shmop|false"], default: "resource|false")]
function shmop_open(int $key, string $mode, int $permissions, int $size) {}

/**
 * Read data from shared memory block
 * @link https://php.net/manual/en/function.shmop-read.php
 * @param Shmop|resource $shmop <p>
 * The shared memory block identifier created by
 * <b>shmop_open</b>
 * </p>
 * @param int $offset <p>
 * Offset from which to start reading
 * </p>
 * @param int $size <p>
 * The number of bytes to read
 * </p>
 * @return string|false the data or <b>FALSE</b> on failure.
 */
#[LanguageLevelTypeAware(["8.0" => "string"], default: "string|false")]
function shmop_read(#[LanguageLevelTypeAware(["8.0" => "Shmop"], default: "resource")] $shmop, int $offset, int $size) {}

/**
 * Close shared memory block
 * @link https://php.net/manual/en/function.shmop-close.php
 * @param Shmop|resource $shmop <p>
 * The shared memory block identifier created by
 * <b>shmop_open</b>
 * </p>
 * @return void No value is returned.
 */
#[Deprecated(since: '8.0')]
function shmop_close(#[LanguageLevelTypeAware(["8.0" => "Shmop"], default: "resource")] $shmop): void {}

/**
 * Get size of shared memory block
 * @link https://php.net/manual/en/function.shmop-size.php
 * @param Shmop|resource $shmop <p>
 * The shared memory block identifier created by
 * <b>shmop_open</b>
 * </p>
 * @return int an int, which represents the number of bytes the shared memory
 * block occupies.
 */
function shmop_size(#[LanguageLevelTypeAware(["8.0" => "Shmop"], default: "resource")] $shmop): int {}

/**
 * Write data into shared memory block
 * @link https://php.net/manual/en/function.shmop-write.php
 * @param Shmop|resource $shmop <p>
 * The shared memory block identifier created by
 * <b>shmop_open</b>
 * </p>
 * @param string $data <p>
 * A string to write into shared memory block
 * </p>
 * @param int $offset <p>
 * Specifies where to start writing data inside the shared memory
 * segment.
 * </p>
 * @return int|false The size of the written <i>data</i>, or <b>FALSE</b> on
 * failure.
 */
#[LanguageLevelTypeAware(["8.0" => "int"], default: "int|false")]
function shmop_write(#[LanguageLevelTypeAware(["8.0" => "Shmop"], default: "resource")] $shmop, string $data, int $offset) {}

/**
 * Delete shared memory block
 * @link https://php.net/manual/en/function.shmop-delete.php
 * @param Shmop|resource $shmop <p>
 * The shared memory block identifier created by
 * <b>shmop_open</b>
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function shmop_delete(#[LanguageLevelTypeAware(["8.0" => "Shmop"], default: "resource")] $shmop): bool {}

/**
 * @since 8.0
 */
final class Shmop {}

// End of shmop v.
<?php

use JetBrains\PhpStorm\Deprecated;

class PDFlib
{
    /**
     * Activates a previously created structure element or other content item.
     * @param $id
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-activate-item.php
     */
    public function activate_item($id) {}

    /**
     * Adds a link to a web resource.
     * @param float $llx
     * @param float $lly
     * @param float $urx
     * @param float $ury
     * @param string $filename
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-add-launchlink.php
     * @see PDF_create_action()
     */
    #[Deprecated(" This function is deprecated since PDFlib version 6, use PDF_create_action() with type=Launch and PDF_create_annotation() with type=Link instead.")]
    public function add_launchlink($llx, $lly, $urx, $ury, $filename) {}

    /**
     * Add a link annotation to a target within the current PDF file.
     *
     * @param float $lowerleftx
     * @param float $lowerlefty
     * @param float $upperrightx
     * @param float $upperrighty
     * @param int $page
     * @param string $dest
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-add-locallink.php
     * @see PDF_create_action()
     */
    #[Deprecated('This function is deprecated since PDFlib version 6, use PDF_create_action() with type=GoTo and PDF_create_annotation() with type=Link instead.')]
    public function add_locallink($lowerleftx, $lowerlefty, $upperrightx, $upperrighty, $page, $dest) {}

    /**
     * Creates a named destination on an arbitrary page in the current document.
     *
     * @param string $name
     * @param string $optlist
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-add-nameddest.php
     */
    public function add_nameddest($name, $optlist) {}

    /**
     * Sets an annotation for the current page.
     *
     * @param float $llx
     * @param float $lly
     * @param float $urx
     * @param float $ury
     * @param string $contents
     * @param string $title
     * @param string $icon
     * @param int $open
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-add-note.php
     * @see PDF_create_annotation()
     */
    #[Deprecated('This function is deprecated since PDFlib version 6, use PDF_create_annotation() with type=Text instead.')]
    public function add_note($llx, $lly, $urx, $ury, $contents, $title, $icon, $open) {}

    /**
     * Add a file link annotation to a PDF target.
     *
     * @param float $bottom_left_x
     * @param float $bottom_left_y
     * @param float $up_right_x
     * @param float $up_right_y
     * @param string $filename
     * @param int $page
     * @param string $dest
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-add-pdflink.php
     * @see PDF_create_action
     */
    #[Deprecated('This function is deprecated since PDFlib version 6, use PDF_create_action() with type=GoToR and PDF_create_annotation() with type=Link instead.')]
    public function add_pdflink($bottom_left_x, $bottom_left_y, $up_right_x, $up_right_y, $filename, $page, $dest) {}

    /**
     * Adds a cell to a new or existing table.
     *
     * @param int $table
     * @param int $column
     * @param int $row
     * @param string $text
     * @param string $optlist
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-add-table-cell.php
     */
    public function add_table_cell($table, $column, $row, $text, $optlist) {}

    /**
     * Creates a Textflow object, or adds text and explicit options to an existing Textflow.
     *
     * @param int $textflow
     * @param string $text
     * @param string $optlist
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-add-textflow.php
     */
    public function add_textflow($textflow, $text, $optlist) {}

    /**
     * Adds an existing image as thumbnail for the current page.
     *
     * @param int $image
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-add-thumbnail.php
     */
    public function add_thumbnail($image) {}

    /**
     * Adds a weblink annotation to a target url on the Web.
     *
     * @param float $lowerleftx
     * @param float $lowerlefty
     * @param float $upperrightx
     * @param float $upperrighty
     * @param string $url
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-add-weblink.php
     * @see PDF_create_action()
     */
    #[Deprecated('This function is deprecated since PDFlib version 6, use PDF_create_action() with type=URI and PDF_create_annotation() with type=Link instead.')]
    public function add_weblink($lowerleftx, $lowerlefty, $upperrightx, $upperrighty, $url) {}

    /**
     * Adds a counterclockwise circular arc
     *
     * @param float $x
     * @param float $y
     * @param float $r
     * @param float $alpha
     * @param float $beta
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-arc.php
     */
    public function arc($x, $y, $r, $alpha, $beta) {}

    /**
     * Except for the drawing direction, this function behaves exactly like PDF_arc().
     *
     * @param float $x
     * @param float $y
     * @param float $r
     * @param float $alpha
     * @param float $beta
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-arcn.php
     */
    public function arcn($x, $y, $r, $alpha, $beta) {}

    /**
     * Adds a file attachment annotation.
     *
     * @param float $llx
     * @param float $lly
     * @param float $urx
     * @param float $ury
     * @param string $filename
     * @param string $description
     * @param string $author
     * @param string $mimetype
     * @param string $icon
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-attach-file.php
     * @see PDF_create_annotation()
     */
    #[Deprecated('This function is deprecated since PDFlib version 6, use PDF_create_annotation() with type=FileAttachment instead.')]
    public function attach_file($llx, $lly, $urx, $ury, $filename, $description, $author, $mimetype, $icon) {}

    /**
     * Creates a new PDF file subject to various options.
     *
     * @param string $filename
     * @param string $optlist
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-begin-document.php
     * @link https://www.pdflib.com/fileadmin/pdflib/pdf/manuals/PDFlib-9.1.2-API-reference.pdf
     */
    public function begin_document($filename, $optlist) {}

    /**
     * Starts a Type 3 font definition.
     *
     * @param string $filename
     * @param float $a
     * @param float $b
     * @param float $c
     * @param float $d
     * @param float $e
     * @param float $f
     * @param string $optlist
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-begin-font.php
     */
    public function begin_font($filename, $a, $b, $c, $d, $e, $f, $optlist) {}

    /**
     * Starts a glyph definition for a Type 3 font.
     *
     * @param string $glyphname
     * @param float $wx
     * @param float $llx
     * @param float $lly
     * @param float $urx
     * @param float $ury
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-begin-glyph.php
     */
    public function begin_glyph($glyphname, $wx, $llx, $lly, $urx, $ury) {}

    /**
     * Opens a structure element or other content item with attributes supplied as options.
     *
     * @param string $tag
     * @param string $optlist
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-begin-item.php
     */
    public function begin_item($tag, $optlist) {}

    /**
     * Starts a layer for subsequent output on the page.
     *
     * @param int $layer
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-begin-layer.php
     */
    public function begin_layer($layer) {}

    /**
     * Adds a new page to the document, and specifies various options. The parameters width and height are the dimensions of the new page in points.
     *
     * @param float $width
     * @param float $height
     * @param string $optlist
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-begin-page-ext.php
     */
    public function begin_page_ext($width, $height, $optlist) {}

    /**
     * Adds a new page to the document.
     *
     * @param float $width
     * @param float $height
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-begin-page.php
     *
     * @see PDF_begin_page_ext()
     */
    #[Deprecated('This function is deprecated since PDFlib version 6, use PDF_begin_page_ext() instead.')]
    public function begin_page($width, $height) {}

    /**
     * Starts a new pattern definition.
     *
     * @param float $width
     * @param float $height
     * @param float $xstep
     * @param float $ystep
     * @param int $painttype
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-begin-pattern.php
     */
    public function begin_pattern($width, $height, $xstep, $ystep, $painttype) {}

    /**
     * Starts a new template definition.
     *
     * @param float $width
     * @param float $height
     * @param string $optlist
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-begin-template-ext.php
     */
    public function begin_template_ext($width, $height, $optlist) {}

    /**
     * @param float $width
     * @param float $height
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-begin-template.php
     *
     * @see PDF_begin_template_ext
     */
    #[Deprecated('This function is deprecated since PDFlib version 7, use PDF_begin_template_ext() instead.')]
    public function begin_template($width, $height) {}

    /**
     * @param float $x
     * @param float $y
     * @param float $r
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-circle.php
     */
    public function circle($x, $y, $r) {}

    /**
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-clip.php
     */
    public function clip() {}

    /**
     * @param int $image
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-close-image.php
     */
    public function close_image($image) {}

    /**
     * Closes the page handle, and frees all page-related resources
     *
     * @param int $page
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-close-pdi-page.php
     */
    public function close_pdi_page($page) {}

    /**
     * @param int $doc
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-close-pdi.php
     *
     * @see PDF_close_pdi_document()
     */
    #[Deprecated('This function is deprecated since PDFlib version 7, use PDF_close_pdi_document() instead.')]
    public function close_pdi($doc) {}

    /**
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-close.php
     *
     * @see PDF_end_document
     */
    #[Deprecated('This function is deprecated since PDFlib version 6, use PDF_end_document() instead.')]
    public function close() {}

    /**
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-closepath-fill-stroke.php
     */
    public function closepath_fill_stroke() {}

    /**
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-closepath-stroke.php
     */
    public function closepath_stroke() {}

    /**
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-closepath.php
     */
    public function closepath() {}

    /**
     * @param float $a
     * @param float $b
     * @param float $c
     * @param float $d
     * @param float $e
     * @param float $f
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-concat.php
     */
    public function concat($a, $b, $c, $d, $e, $f) {}

    /**
     * @param string $text
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-continue-text.php
     */
    public function continue_text($text) {}

    /**
     * @param string $username
     * @param string $optlist
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-create-3dview.php
     */
    public function create_3dview($username, $optlist) {}

    /**
     * @param string $type
     * @param string $optlist
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-create-action.php
     */
    public function create_action($type, $optlist) {}

    /**
     * @param float $llx
     * @param float $lly
     * @param float $urx
     * @param float $ury
     * @param string $type
     * @param string $optlist
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-create-annotation.php
     */
    public function create_annotation($llx, $lly, $urx, $ury, $type, $optlist) {}

    /**
     * @param string $text
     * @param string $optlist
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-create-bookmark.php
     */
    public function create_bookmark($text, $optlist) {}

    /**
     * @param float $llx
     * @param float $lly
     * @param float $urx
     * @param float $ury
     * @param string $name
     * @param string $type
     * @param string $optlist
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-create-field.php
     */
    public function create_field($llx, $lly, $urx, $ury, $name, $type, $optlist) {}

    /**
     * @param string $name
     * @param string $optlist
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-create-fieldgroup.php
     */
    public function create_fieldgroup($name, $optlist) {}

    /**
     * @param string $optlist
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-create-gstate.php
     */
    public function create_gstate($optlist) {}

    /**
     * @param string $filename
     * @param string $data
     * @param string $optlist
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-create-pvf.php
     */
    public function create_pvf($filename, $data, $optlist) {}

    /**
     * @param string $text
     * @param string $optlist
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-create-textflow.php
     */
    public function create_textflow($text, $optlist) {}

    /**
     * @param float $x1
     * @param float $y1
     * @param float $x2
     * @param float $y2
     * @param float $x3
     * @param float $y3
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-curveto.php
     */
    public function curveto($x1, $y1, $x2, $y2, $x3, $y3) {}

    /**
     * @param string $name
     * @param string $optlist
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-define-layer.php
     */
    public function define_layer($name, $optlist) {}

    /**
     * @param string $filename
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-delete-pvf.php
     */
    public function delete_pvf($filename) {}

    /**
     * @param int $table
     * @param string $optlist
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-delete-table.php
     */
    public function delete_table($table, $optlist) {}

    /**
     * @param int $textflow
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-delete-textflow.php
     */
    public function delete_textflow($textflow) {}

    /**
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-delete.php
     */
    public function delete() {}

    /**
     * @param string $encoding
     * @param int $slot
     * @param string $glyphname
     * @param int $uv
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-encoding-set-char.php
     */
    public function encoding_set_char($encoding, $slot, $glyphname, $uv) {}

    /**
     * @param string $optlist
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-end-document.php
     */
    public function end_document($optlist) {}

    /**
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-end-font.php
     */
    public function end_font() {}

    /**
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-end-glyph.php
     */
    public function end_glyph() {}

    /**
     * @param int $id
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-end-item.php
     */
    public function end_item($id) {}

    /**
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-end-layer.php
     */
    public function end_layer() {}

    /**
     * @param string $optlist
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-end-page-ext.php
     */
    public function end_page_ext($optlist) {}

    /**
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-end-page.php
     */
    public function end_page($p) {}

    /**
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-end-pattern.php
     */
    public function end_pattern($p) {}

    /**
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-end-template.php
     */
    public function end_template($p) {}

    /**
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-endpath.php
     */
    public function endpath($p) {}

    /**
     * @param int $page
     * @param string $blockname
     * @param int $image
     * @param string $optlist
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-fill-imageblock.php
     */
    public function fill_imageblock($page, $blockname, $image, $optlist) {}

    /**
     * @param int $page
     * @param string $blockname
     * @param int $contents
     * @param string $optlist
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-fill-pdfblock.php
     */
    public function fill_pdfblock($page, $blockname, $contents, $optlist) {}

    /**
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-fill-stroke.php
     */
    public function fill_stroke() {}

    /**
     * @param int $page
     * @param string $blockname
     * @param string $text
     * @param string $optlist
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-fill-textblock.php
     */
    public function fill_textblock($page, $blockname, $text, $optlist) {}

    /**
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-fill.php
     */
    public function fill() {}

    /**
     * @param string $fontname
     * @param string $encoding
     * @param int $embed
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-findfont.php(Dep)
     */
    public function findfont($fontname, $encoding, $embed) {}

    /**
     * @param int $image
     * @param float $x
     * @param float $y
     * @param string $optlist
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-fit-image.php
     */
    public function fit_image($image, $x, $y, $optlist) {}

    /**
     * @param int $page
     * @param float $x
     * @param float $y
     * @param string $optlist
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-fit-pdi-page.php
     */
    public function fit_pdi_page($page, $x, $y, $optlist) {}

    /**
     * @param int $table A valid table handle retrieved with a call to PDF_add_table_cell()
     * @param float $llx X Coordinate of the lower left corner of the target rectangle for the table instance (the fitbox) in user coordinates.
     * @param float $lly Y Coordinate of the lower left corner of the target rectangle for the table instance (the fitbox) in user coordinates.
     * @param float $urx X Coordinate of the upper right corner of the target rectangle for the table instance (the fitbox) in user coordinates.
     * @param float $ury Y Coordinate of the upper right corner of the target rectangle for the table instance (the fitbox) in user coordinates.
     * @param string $optlist An option list specifying filling details according to Table 5.18.
     *
     * @return string A string which specifies the reason for returning from the function
     *
     * @link https://www.pdflib.com/fileadmin/pdflib/pdf/manuals/PDFlib-9.3.0-API-reference.pdf
     */
    public function fit_table($table, $llx, $lly, $urx, $ury, $optlist) {}

    /**
     * @param int $textflow
     * @param float $llx
     * @param float $lly
     * @param float $urx
     * @param float $ury
     * @param string $optlist
     *
     * @return string
     *
     * @link https://secure.php.net/manual/en/function.pdf-fit-textflow.php
     */
    public function fit_textflow($textflow, $llx, $lly, $urx, $ury, $optlist) {}

    /**
     * @param string $text
     * @param float $x
     * @param float $y
     * @param string $optlist
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-fit-textline.php
     */
    public function fit_textline($text, $x, $y, $optlist) {}

    /**
     * @return string
     *
     * @link https://secure.php.net/manual/en/function.pdf-get-apiname.php
     */
    public function get_apiname() {}

    /**
     * @return string
     *
     * @link https://secure.php.net/manual/en/function.pdf-get-buffer.php
     */
    public function get_buffer() {}

    /**
     * @return string
     *
     * @link https://secure.php.net/manual/en/function.pdf-get-errmsg.php
     */
    public function get_errmsg() {}

    /**
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-get-errnum.php
     */
    public function get_errnum() {}

    /**
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-get-majorversion.php(dep)
     */
    public function get_majorversion() {}

    /**
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-get-minorversion.php(dep)
     */
    public function get_minorversion() {}

    /**
     * @param string $key
     * @param float $modifier
     *
     * @return string
     *
     * @link https://secure.php.net/manual/en/function.pdf-get-parameter.php
     */
    public function get_parameter($key, $modifier) {}

    /**
     * @param string $key
     * @param int $doc
     * @param int $page
     * @param int $reserved
     *
     * @return string
     *
     * @link https://secure.php.net/manual/en/function.pdf-get-pdi-parameter.php
     */
    public function get_pdi_parameter($key, $doc, $page, $reserved) {}

    /**
     * @param string $key
     * @param int $doc
     * @param int $page
     * @param int $reserved
     *
     * @return float
     *
     * @link https://secure.php.net/manual/en/function.pdf-get-pdi-value.php
     */
    public function get_pdi_value($key, $doc, $page, $reserved) {}

    /**
     * @param string $key
     * @param float $modifier
     *
     * @return float
     *
     * @link https://secure.php.net/manual/en/function.pdf-get-value.php
     */
    public function get_value($key, $modifier) {}

    /**
     * @param int $font
     * @param string $keyword
     * @param string $optlist
     *
     * @return float
     *
     * @link https://secure.php.net/manual/en/function.pdf-info-font.php
     */
    public function info_font($font, $keyword, $optlist) {}

    /**
     * @param string $boxname
     * @param int $num
     * @param string $keyword
     *
     * @return float
     *
     * @link https://secure.php.net/manual/en/function.pdf-info-matchbox.php
     */
    public function info_matchbox($boxname, $num, $keyword) {}

    /**
     * @param int $table
     * @param string $keyword
     *
     * @return float
     *
     * @link https://secure.php.net/manual/en/function.pdf-info-table.php
     */
    public function info_table($table, $keyword) {}

    /**
     * @param int $textflow
     * @param string $keyword
     *
     * @return float
     *
     * @link https://secure.php.net/manual/en/function.pdf-info-textflow.php
     */
    public function info_textflow($textflow, $keyword) {}

    /**
     * @param string $text
     * @param string $keyword
     * @param string $optlist
     *
     * @return float
     *
     * @link https://secure.php.net/manual/en/function.pdf-info-textline.php
     */
    public function info_textline($text, $keyword, $optlist) {}

    /**
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-initgraphics.php
     */
    public function initgraphics() {}

    /**
     * @param float $x
     * @param float $y
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-lineto.php
     */
    public function lineto($x, $y) {}

    /**
     * @param string $filename
     * @param string $optlist
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-load-3ddata.php
     */
    public function load_3ddata($filename, $optlist) {}

    /**
     * @param string $fontname
     * @param string $encoding
     * @param string $optlist
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-load-font.php
     */
    public function load_font($fontname, $encoding, $optlist) {}

    /**
     * @param string $profilename
     * @param string $optlist
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-load-iccprofile.php
     */
    public function load_iccprofile($profilename, $optlist) {}

    /**
     * @param string $imagetype
     * @param string $filename
     * @param string $optlist
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-load-image.php
     */
    public function load_image($imagetype, $filename, $optlist) {}

    /**
     * @param string $spotname
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-makespotcolor.php
     */
    public function makespotcolor($spotname) {}

    /**
     * @param float $x
     * @param float $y
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-moveto.php
     */
    public function moveto($x, $y) {}

    /**
     * @param string $filename
     * @param int $width
     * @param int $height
     * @param int $BitReverse
     * @param int $k
     * @param int $Blackls1
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-open-ccitt.php(dep)
     */
    public function open_ccitt($filename, $width, $height, $BitReverse, $k, $Blackls1) {}

    /**
     * @param string $filename
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-open-file.php(dep)
     */
    public function open_file($filename) {}

    /**
     * @param string $imagetype
     * @param string $filename
     * @param string $stringparam
     * @param int $intparam
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-open-image-file.php(dep)
     */
    public function open_image_file($imagetype, $filename, $stringparam, $intparam) {}

    /**
     * @param string $imagetype
     * @param string $source
     * @param string $data
     * @param int $length
     * @param int $width
     * @param int $height
     * @param int $components
     * @param int $bpc
     * @param string $params
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-open-image.php(dep)
     */
    public function open_image($imagetype, $source, $data, $length, $width, $height, $components, $bpc, $params) {}

    /**
     * @param resource $image
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-open-memory-image.php(not supported)
     */
    public function open_memory_image($image) {}

    /**
     * @param string $filename
     * @param string $optlist
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-open-pdi-document.php
     */
    public function open_pdi_document($filename, $optlist) {}

    /**
     * @param int $doc
     * @param int $pagenumber
     * @param string $optlist
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-open-pdi-page.php
     */
    public function open_pdi_page($doc, $pagenumber, $optlist) {}

    /**
     * @param string $filename
     * @param string $optlist
     * @param int $len
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-open-pdi.php
     */
    public function open_pdi($filename, $optlist, $len) {}

    /**
     * @param int $doc
     * @param string $path
     *
     * @return float
     *
     * @link https://secure.php.net/manual/en/function.pdf-pcos-get-number.php
     */
    public function pcos_get_number($doc, $path) {}

    /**
     * @param int $doc
     * @param string $optlist
     * @param string $path
     *
     * @return string
     *
     * @link https://secure.php.net/manual/en/function.pdf-pcos-get-stream.php
     */
    public function pcos_get_stream($doc, $optlist, $path) {}

    /**
     * @param int $doc
     * @param string $path
     *
     * @return string
     *
     * @link https://secure.php.net/manual/en/function.pdf-pcos-get-string.php
     */
    public function pcos_get_string($doc, $path) {}

    /**
     * @param int $image
     * @param float $x
     * @param float $y
     * @param float $scale
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-place-image.php (dep)
     */
    public function place_image($image, $x, $y, $scale) {}

    /**
     * @param int $page
     * @param float $x
     * @param float $y
     * @param float $sx
     * @param float $sy
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-place-pdi-page.php (dep)
     */
    public function place_pdi_page($page, $x, $y, $sx, $sy) {}

    /**
     * @param int $doc
     * @param int $page
     * @param string $optlist
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-process-pdi.php
     */
    public function process_pdi($doc, $page, $optlist) {}

    /**
     * @param float $x
     * @param float $y
     * @param float $width
     * @param float $height
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-rect.php
     */
    public function rect($x, $y, $width, $height) {}

    /**
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-restore.php
     */
    public function restore($p) {}

    /**
     * @param string $optlist
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-resume-page.php
     */
    public function resume_page($optlist) {}

    /**
     * @param float $phi
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-rotate.php
     */
    public function rotate($phi) {}

    /**
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-save.php
     */
    public function save($p) {}

    /**
     * @param float $sx
     * @param float $sy
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-scale.php
     */
    public function scale($sx, $sy) {}

    /**
     * @param float $red
     * @param float $green
     * @param float $blue
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-set-border-color.php (dep)
     */
    public function set_border_color($red, $green, $blue) {}

    /**
     * @param float $black
     * @param float $white
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-set-border-dash.php (dep)
     */
    public function set_border_dash($black, $white) {}

    /**
     * @param string $style
     * @param float $width
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-set-border-style.php (dep)
     */
    public function set_border_style($style, $width) {}

    /**
     * @param int $gstate
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-set-gstate.php
     */
    public function set_gstate($gstate) {}

    /**
     * @param string $key
     * @param string $value
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-set-info.php
     */
    public function set_info($key, $value) {}

    /**
     * @param string $type
     * @param string $optlist
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-set-layer-dependency.php
     */
    public function set_layer_dependency($type, $optlist) {}

    /**
     * @param string $key
     * @param string $value
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-set-parameter.php
     */
    public function set_parameter($key, $value) {}

    /**
     * @param float $x
     * @param float $y
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-set-text-pos.php
     */
    public function set_text_pos($x, $y) {}

    /**
     * @param string $key
     * @param float $value
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-set-value.php
     */
    public function set_value($key, $value) {}

    /**
     * @param string $fstype
     * @param string $colorspace
     * @param float $c1
     * @param float $c2
     * @param float $c3
     * @param float $c4
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-setcolor.php
     */
    public function setcolor($fstype, $colorspace, $c1, $c2, $c3, $c4) {}

    /**
     * @param float $b
     * @param float $w
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-setdash.php
     */
    public function setdash($b, $w) {}

    /**
     * @param string $optlist
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-setdashpattern.php
     */
    public function setdashpattern($optlist) {}

    /**
     * @param float $flatness
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-setflat.php
     */
    public function setflat($flatness) {}

    /**
     * @param int $font
     * @param float $fontsize
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-setfont.php
     */
    public function setfont($font, $fontsize) {}

    /**
     * @param float $g
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-setgray-fill.php (dep)
     */
    public function setgray_fill($g) {}

    /**
     * @param float $g
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-setgray-stroke.php (dep)
     */
    public function setgray_stroke($g) {}

    /**
     * @param float $g
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-setgray.php (dep)
     */
    public function setgray($g) {}

    /**
     * @param int $linecap
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-setlinecap.php
     */
    public function setlinecap($linecap) {}

    /**
     * @param int $value
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-setlinejoin.php
     */
    public function setlinejoin($value) {}

    /**
     * @param float $width
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-setlinewidth.php
     */
    public function setlinewidth($width) {}

    /**
     * @param float $a
     * @param float $b
     * @param float $c
     * @param float $d
     * @param float $e
     * @param float $f
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-setmatrix.php
     */
    public function setmatrix($a, $b, $c, $d, $e, $f) {}

    /**
     * @param float $miter
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-setmiterlimit.php
     */
    public function setmiterlimit($miter) {}

    /**
     * @param float $red
     * @param float $green
     * @param float $blue
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-setrgbcolor-fill.php (dep)
     */
    public function setrgbcolor_fill($red, $green, $blue) {}

    /**
     * @param float $red
     * @param float $green
     * @param float $blue
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-setrgbcolor-stroke.php (dep)
     */
    public function setrgbcolor_stroke($red, $green, $blue) {}

    /**
     * @param float $red
     * @param float $green
     * @param float $blue
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-setrgbcolor.php (dep)
     */
    public function setrgbcolor($red, $green, $blue) {}

    /**
     * @param int $shading
     * @param string $optlist
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-shading-pattern.php
     */
    public function shading_pattern($shading, $optlist) {}

    /**
     * @param string $shtype
     * @param float $x0
     * @param float $y0
     * @param float $x1
     * @param float $y1
     * @param float $c1
     * @param float $c2
     * @param float $c3
     * @param float $c4
     * @param string $optlist
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-shading.php
     */
    public function shading($shtype, $x0, $y0, $x1, $y1, $c1, $c2, $c3, $c4, $optlist) {}

    /**
     * @param int $shading
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-shfill.php
     */
    public function shfill($shading) {}

    /**
     * @param string $text
     * @param float $left
     * @param float $top
     * @param float $width
     * @param float $height
     * @param string $mode
     * @param string $feature
     *
     * @return int
     *
     * @link https://secure.php.net/manual/en/function.pdf-show-boxed.php (dep)
     */
    public function show_boxed($text, $left, $top, $width, $height, $mode, $feature) {}

    /**
     * @param string $text
     * @param float $x
     * @param float $y
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-show-xy.php
     */
    public function show_xy($text, $x, $y) {}

    /**
     * @param string $text
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-show.php
     */
    public function show($text) {}

    /**
     * @param float $alpha
     * @param float $beta
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-skew.php
     */
    public function skew($alpha, $beta) {}

    /**
     * @param string $text
     * @param int $font
     * @param float $fontsize
     *
     * @return float
     *
     * @link https://secure.php.net/manual/en/function.pdf-stringwidth.php
     */
    public function stringwidth($text, $font, $fontsize) {}

    /**
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-stroke.php
     */
    public function stroke() {}

    /**
     * @param string $optlist
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-suspend-page.php
     */
    public function suspend_page($optlist) {}

    /**
     * @param float $tx
     * @param float $ty
     *
     * @return bool
     *
     * @link https://secure.php.net/manual/en/function.pdf-translate.php
     */
    public function translate($tx, $ty) {}

    /**
     * @param string $utf16string
     *
     * @return string
     *
     * @link https://secure.php.net/manual/en/function.pdf-utf16-to-utf8.php
     */
    public function utf16_to_utf8($utf16string) {}

    /**
     * @param string $utf32string
     * @param string $ordering
     *
     * @return string
     *
     * @link https://secure.php.net/manual/en/function.pdf-utf32-to-utf16.php
     */
    public function utf32_to_utf16($utf32string, $ordering) {}

    /**
     * @param string $utf8string
     * @param string $ordering
     *
     * @return string
     *
     * @link https://secure.php.net/manual/en/function.pdf-utf8-to-utf16.php
     */
    public function utf8_to_utf16($utf8string, $ordering) {}
}

/**
 * Activates a previously created structure element or other content item.
 * @param resource $pdf The pDF doc
 * @param int $id
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-activate-item.php
 */
function PDF_activate_item($pdf, $id) {}

/**
 * Add launch annotation for current page [deprecated].
 * @param resource $pdf
 * @param float $llx
 * @param float $lly
 * @param float $urx
 * @param float $ury
 * @param string $filename
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-add-launchlink.php
 * @see PDF_create_action
 */
#[Deprecated('This function is deprecated since PDFlib version 6, use PDF_create_action() with type=Launch and PDF_create_annotation() with type=Link instead.')]
function PDF_add_launchlink($pdf, $llx, $lly, $urx, $ury, $filename) {}

/**
 * Add a link annotation to a target within the current PDF file.
 *
 * @param resource $pdf
 * @param float $lowerleftx
 * @param float $lowerlefty
 * @param float $upperrightx
 * @param float $upperrighty
 * @param int $page
 * @param string $dest
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-add-locallink.php
 * @see PDF_create_action
 */
#[Deprecated('This function is deprecated since PDFlib version 6, use PDF_create_action() with type=GoTo and PDF_create_annotation() with type=Link instead.')]
function PDF_add_locallink($pdf, $lowerleftx, $lowerlefty, $upperrightx, $upperrighty, $page, $dest) {}

/**
 * Creates a named destination on an arbitrary page in the current document.
 *
 * @param resource $pdf
 * @param string $name
 * @param string $optlist
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-add-nameddest.php
 */
function PDF_add_nameddest($pdf, $name, $optlist) {}

/**
 * Sets an annotation for the current page.
 *
 * @param resource $pdf
 * @param float $llx
 * @param float $lly
 * @param float $urx
 * @param float $ury
 * @param string $contents
 * @param string $title
 * @param string $icon
 * @param int $open
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-add-note.php
 * @see PDF_create_annotation
 */
#[Deprecated('This function is deprecated since PDFlib version 6, use PDF_create_annotation() with type=Text instead.')]
function PDF_add_note($pdf, $llx, $lly, $urx, $ury, $contents, $title, $icon, $open) {}

/**
 * Add a file link annotation to a PDF target.
 *
 * @param resource $pdf
 * @param float $bottom_left_x
 * @param float $bottom_left_y
 * @param float $up_right_x
 * @param float $up_right_y
 * @param string $filename
 * @param int $page
 * @param string $dest
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-add-pdflink.php
 * @see PDF_create_action
 */
#[Deprecated('This function is deprecated since PDFlib version 6, use PDF_create_action() with type=GoToR and PDF_create_annotation() with type=Link instead.')]
function PDF_add_pdflink($pdf, $bottom_left_x, $bottom_left_y, $up_right_x, $up_right_y, $filename, $page, $dest) {}

/**
 * Adds a cell to a new or existing table.
 *
 * @param resource $pdf
 * @param int $table
 * @param int $column
 * @param int $row
 * @param string $text
 * @param string $optlist
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-add-table-cell.php
 */
function PDF_add_table_cell($pdf, $table, $column, $row, $text, $optlist) {}

/**
 * Creates a Textflow object, or adds text and explicit options to an existing Textflow.
 *
 * @param resource $pdf
 * @param int $textflow
 * @param string $text
 * @param string $optlist
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-add-textflow.php
 */
function PDF_add_textflow($pdf, $textflow, $text, $optlist) {}

/**
 * Adds an existing image as thumbnail for the current page.
 *
 * @param resource $pdf
 * @param int $image
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-add-thumbnail.php
 */
function PDF_add_thumbnail($pdf, $image) {}

/**
 * Adds a weblink annotation to a target url on the Web.
 *
 * @param resource $pdf
 * @param float $lowerleftx
 * @param float $lowerlefty
 * @param float $upperrightx
 * @param float $upperrighty
 * @param string $url
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-add-weblink.php
 * @see PDF_create_action
 */
#[Deprecated('This function is deprecated since PDFlib version 6, use PDF_create_action() with type=URI and PDF_create_annotation() with type=Link instead.')]
function PDF_add_weblink($pdf, $lowerleftx, $lowerlefty, $upperrightx, $upperrighty, $url) {}

/**
 * Adds a counterclockwise circular arc
 *
 * @param resource $pdf
 * @param float $x
 * @param float $y
 * @param float $r
 * @param float $alpha
 * @param float $beta
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-arc.php
 */
function PDF_arc($pdf, $x, $y, $r, $alpha, $beta) {}

/**
 * Except for the drawing direction, this function behaves exactly like PDF_arc().
 *
 * @param resource $pdf
 * @param float $x
 * @param float $y
 * @param float $r
 * @param float $alpha
 * @param float $beta
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-arcn.php
 */
function PDF_arcn($pdf, $x, $y, $r, $alpha, $beta) {}

/**
 * Adds a file attachment annotation.
 *
 * @param resource $pdf
 * @param float $llx
 * @param float $lly
 * @param float $urx
 * @param float $ury
 * @param string $filename
 * @param string $description
 * @param string $author
 * @param string $mimetype
 * @param string $icon
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-attach-file.php
 * @see PDF_create_annotation
 */
#[Deprecated('This function is deprecated since PDFlib version 6, use PDF_create_annotation() with type=FileAttachment instead.')]
function PDF_attach_file($pdf, $llx, $lly, $urx, $ury, $filename, $description, $author, $mimetype, $icon) {}

/**
 * Creates a new PDF file subject to various options.
 *
 * @param resource $pdf
 * @param string $filename
 * @param string $optlist
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-begin-document.php
 * @link https://www.pdflib.com/fileadmin/pdflib/pdf/manuals/PDFlib-9.1.2-API-reference.pdf
 */
function PDF_begin_document($pdf, $filename, $optlist) {}

/**
 * Starts a Type 3 font definition.
 *
 * @param resource $pdf
 * @param string $filename
 * @param float $a
 * @param float $b
 * @param float $c
 * @param float $d
 * @param float $e
 * @param float $f
 * @param string $optlist
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-begin-font.php
 */
function PDF_begin_font($pdf, $filename, $a, $b, $c, $d, $e, $f, $optlist) {}

/**
 * Starts a glyph definition for a Type 3 font.
 *
 * @param resource $pdf
 * @param string $glyphname
 * @param float $wx
 * @param float $llx
 * @param float $lly
 * @param float $urx
 * @param float $ury
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-begin-glyph.php
 */
function PDF_begin_glyph($pdf, $glyphname, $wx, $llx, $lly, $urx, $ury) {}

/**
 * Opens a structure element or other content item with attributes supplied as options.
 *
 * @param resource $pdf
 * @param string $tag
 * @param string $optlist
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-begin-item.php
 */
function PDF_begin_item($pdf, $tag, $optlist) {}

/**
 * Starts a layer for subsequent output on the page.
 *
 * @param resource $pdf
 * @param int $layer
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-begin-layer.php
 */
function PDF_begin_layer($pdf, $layer) {}

/**
 * Adds a new page to the document, and specifies various options. The parameters width and height are the dimensions of the new page in points.
 *
 * @param resource $pdf
 * @param float $width
 * @param float $height
 * @param string $optlist
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-begin-page-ext.php
 */
function PDF_begin_page_ext($pdf, $width, $height, $optlist) {}

/**
 * Adds a new page to the document.
 *
 * @param resource $pdf
 * @param float $width
 * @param float $height
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-begin-page.php
 * @see PDF_begin_page_ext
 */
#[Deprecated('This function is deprecated since PDFlib version 6, use PDF_begin_page_ext() instead.')]
function PDF_begin_page($pdf, $width, $height) {}

/**
 * Starts a new pattern definition.
 *
 * @param resource $pdf
 * @param float $width
 * @param float $height
 * @param float $xstep
 * @param float $ystep
 * @param int $painttype
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-begin-pattern.php
 */
function PDF_begin_pattern($pdf, $width, $height, $xstep, $ystep, $painttype) {}

/**
 * Starts a new template definition.
 *
 * @param resource $pdf
 * @param float $width
 * @param float $height
 * @param string $optlist
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-begin-template-ext.php
 */
function PDF_begin_template_ext($pdf, $width, $height, $optlist) {}

/**
 * Start template definition [deprecated]
 * @param resource $pdf
 * @param float $width
 * @param float $height
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-begin-template.php
 * @see PDF_begin_template_ext
 */
#[Deprecated('This function is deprecated since PDFlib version 7, use PDF_begin_template_ext() instead.')]
function PDF_begin_template($pdf, $width, $height) {}

/**
 * Draw a circle
 * @param resource $pdf
 * @param float $x
 * @param float $y
 * @param float $r
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-circle.php
 */
function PDF_circle($pdf, $x, $y, $r) {}

/**
 * Clip to current path
 * @param resource $pdf
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-clip.php
 */
function PDF_clip($pdf) {}

/**
 * Close image
 * @param resource $pdf
 * @param int $image
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-close-image.php
 */
function PDF_close_image($pdf, $image) {}

/**
 * Closes the page handle, and frees all page-related resources
 *
 * @param resource $pdf
 * @param int $page
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-close-pdi-page.php
 */
function PDF_close_pdi_page($pdf, $page) {}

/**
 * Close the input pdf document [deprecated]
 * @param resource $pdf
 * @param int $doc
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-close-pdi.php
 * @see PDF_close_pdi_document
 */
#[Deprecated('This function is deprecated since PDFlib version 7, use PDF_close_pdi_document() instead.')]
function PDF_close_pdi($pdf, $doc) {}

/**
 * Close pdf resource [deprecated]
 * @param resource $pdf
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-close.php
 *
 * @see PDF_end_document
 */
#[Deprecated('This function is deprecated since PDFlib version 6, use PDF_end_document() instead.')]
function PDF_close($pdf) {}

/**
 * Close, fill and stroke current path
 * @param resource $pdf
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-closepath-fill-stroke.php
 */
function PDF_closepath_fill_stroke($pdf) {}

/**
 * Close and stroke path
 * @param resource $pdf
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-closepath-stroke.php
 */
function PDF_closepath_stroke($pdf) {}

/**
 * Close current path
 * @param resource $pdf
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-closepath.php
 */
function PDF_closepath($pdf) {}

/**
 * Concatenate a matrix to the ctm
 * @param resource $pdf
 * @param float $a
 * @param float $b
 * @param float $c
 * @param float $d
 * @param float $e
 * @param float $f
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-concat.php
 */
function PDF_concat($pdf, $a, $b, $c, $d, $e, $f) {}

/**
 * Output text in next line
 * @param resource $pdf
 * @param string $text
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-continue-text.php
 */
function PDF_continue_text($pdf, $text) {}

/**
 * Create 3d view
 * @param resource $pdf
 * @param string $username
 * @param string $optlist
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-create-3dview.php
 */
function PDF_create_3dview($pdf, $username, $optlist) {}

/**
 * Create action for objects or events
 * @param resource $pdf
 * @param string $type
 * @param string $optlist
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-create-action.php
 */
function PDF_create_action($pdf, $type, $optlist) {}

/**
 * Create rectangular annotation
 * @param resource $pdf
 * @param float $llx
 * @param float $lly
 * @param float $urx
 * @param float $ury
 * @param string $type
 * @param string $optlist
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-create-annotation.php
 */
function PDF_create_annotation($pdf, $llx, $lly, $urx, $ury, $type, $optlist) {}

/**
 * Create bookmar
 * @param resource $pdf
 * @param string $text
 * @param string $optlist
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-create-bookmark.php
 */
function PDF_create_bookmark($pdf, $text, $optlist) {}

/**
 * Create form field
 * @param resource $pdf
 * @param float $llx
 * @param float $lly
 * @param float $urx
 * @param float $ury
 * @param string $name
 * @param string $type
 * @param string $optlist
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-create-field.php
 */
function PDF_create_field($pdf, $llx, $lly, $urx, $ury, $name, $type, $optlist) {}

/**
 * Create form field group
 * @param resource $pdf
 * @param string $name
 * @param string $optlist
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-create-fieldgroup.php
 */
function PDF_create_fieldgroup($pdf, $name, $optlist) {}

/**
 * Create graphics state object
 * @param resource $pdf
 * @param string $optlist
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-create-gstate.php
 */
function PDF_create_gstate($pdf, $optlist) {}

/**
 * Create pdflib virtual file
 * @param resource $pdf
 * @param string $filename
 * @param string $data
 * @param string $optlist
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-create-pvf.php
 */
function PDF_create_pvf($pdf, $filename, $data, $optlist) {}

/**
 * Create textflow object
 * @param resource $pdf
 * @param string $text
 * @param string $optlist
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-create-textflow.php
 */
function PDF_create_textflow($pdf, $text, $optlist) {}

/**
 * Draw bezier curve
 * @param resource $pdf
 * @param float $x1
 * @param float $y1
 * @param float $x2
 * @param float $y2
 * @param float $x3
 * @param float $y3
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-curveto.php
 */
function PDF_curveto($pdf, $x1, $y1, $x2, $y2, $x3, $y3) {}

/**
 * Create layer definition
 * @param resource $pdf
 * @param string $name
 * @param string $optlist
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-define-layer.php
 */
function PDF_define_layer($pdf, $name, $optlist) {}

/**
 * Delete pdflib virtual file
 * @param resource $pdf
 * @param string $filename
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-delete-pvf.php
 */
function PDF_delete_pvf($pdf, $filename) {}

/**
 * @param resource $pdf
 * @param int $table
 * @param string $optlist
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-delete-table.php
 */
function PDF_delete_table($pdf, $table, $optlist) {}

/**
 * @param resource $pdf
 * @param int $textflow
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-delete-textflow.php
 */
function PDF_delete_textflow($pdf, $textflow) {}

/**
 * @param resource $pdf
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-delete.php
 */
function PDF_delete($pdf) {}

/**
 * @param resource $pdf
 * @param string $encoding
 * @param int $slot
 * @param string $glyphname
 * @param int $uv
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-encoding-set-char.php
 */
function PDF_encoding_set_char($pdf, $encoding, $slot, $glyphname, $uv) {}

/**
 * @param resource $pdf
 * @param string $optlist
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-end-document.php
 */
function PDF_end_document($pdf, $optlist) {}

/**
 * @param resource $pdf
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-end-font.php
 */
function PDF_end_font($pdf) {}

/**
 * @param resource $pdf
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-end-glyph.php
 */
function PDF_end_glyph($pdf) {}

/**
 * @param resource $pdf
 * @param int $id
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-end-item.php
 */
function PDF_end_item($pdf, $id) {}

/**
 * @param resource $pdf
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-end-layer.php
 */
function PDF_end_layer($pdf) {}

/**
 * @param resource $pdf
 * @param string $optlist
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-end-page-ext.php
 */
function PDF_end_page_ext($pdf, $optlist) {}

/**
 * @param resource $p The PDF doc
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-end-page.php
 */
function PDF_end_page($p) {}

/**
 * @param resource $p The PDF doc
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-end-pattern.php
 */
function PDF_end_pattern($p) {}

/**
 * @param resource $p The PDF doc
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-end-template.php
 */
function PDF_end_template($p) {}

/**
 * @param resource $p The PDF doc
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-endpath.php
 */
function PDF_endpath($p) {}

/**
 * @param resource $pdf
 * @param int $page
 * @param string $blockname
 * @param int $image
 * @param string $optlist
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-fill-imageblock.php
 */
function PDF_fill_imageblock($pdf, $page, $blockname, $image, $optlist) {}

/**
 * @param resource $pdf
 * @param int $page
 * @param string $blockname
 * @param int $contents
 * @param string $optlist
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-fill-pdfblock.php
 */
function PDF_fill_pdfblock($pdf, $page, $blockname, $contents, $optlist) {}

/**
 * @param resource $pdf
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-fill-stroke.php
 */
function PDF_fill_stroke($pdf) {}

/**
 * @param resource $pdf
 * @param int $page
 * @param string $blockname
 * @param string $text
 * @param string $optlist
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-fill-textblock.php
 */
function PDF_fill_textblock($pdf, $page, $blockname, $text, $optlist) {}

/**
 * @param resource $pdf
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-fill.php
 */
function PDF_fill($pdf) {}
/**
 * @param resource $pdf
 * @param string $fontname
 * @param string $encoding
 * @param int $embed
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-findfont.php(Dep)
 */
function PDF_findfont($pdf, $fontname, $encoding, $embed) {}
/**
 * @param resource $pdf
 * @param int $image
 * @param float $x
 * @param float $y
 * @param string $optlist
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-fit-image.php
 */
function PDF_fit_image($pdf, $image, $x, $y, $optlist) {}
/**
 * @param resource $pdf
 * @param int $page
 * @param float $x
 * @param float $y
 * @param string $optlist
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-fit-pdi-page.php
 */
function PDF_fit_pdi_page($pdf, $page, $x, $y, $optlist) {}
/**
 * @param resource $pdf
 * @param int $table
 * @param float $llx
 * @param float $lly
 * @param float $urx
 * @param float $ury
 * @param string $optlist
 *
 * @return string
 *
 * @link https://secure.php.net/manual/en/function.pdf-fit-table.php
 */
function PDF_fit_table($pdf, $table, $llx, $lly, $urx, $ury, $optlist) {}
/**
 * @param resource $pdf
 * @param int $textflow
 * @param float $llx
 * @param float $lly
 * @param float $urx
 * @param float $ury
 * @param string $optlist
 *
 * @return string
 *
 * @link https://secure.php.net/manual/en/function.pdf-fit-textflow.php
 */
function PDF_fit_textflow($pdf, $textflow, $llx, $lly, $urx, $ury, $optlist) {}
/**
 * @param resource $pdf
 * @param string $text
 * @param float $x
 * @param float $y
 * @param string $optlist
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-fit-textline.php
 */
function PDF_fit_textline($pdf, $text, $x, $y, $optlist) {}
/**
 * @param resource $pdf
 *
 * @return string
 *
 * @link https://secure.php.net/manual/en/function.pdf-get-apiname.php
 */
function PDF_get_apiname($pdf) {}
/**
 * @param resource $pdf
 *
 * @return string
 *
 * @link https://secure.php.net/manual/en/function.pdf-get-buffer.php
 */
function PDF_get_buffer($pdf) {}
/**
 * @param resource $pdf
 *
 * @return string
 *
 * @link https://secure.php.net/manual/en/function.pdf-get-errmsg.php
 */
function PDF_get_errmsg($pdf) {}
/**
 * @param resource $pdf
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-get-errnum.php
 */
function PDF_get_errnum($pdf) {}
/**
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-get-majorversion.php(dep)
 */
function PDF_get_majorversion() {}
/**
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-get-minorversion.php(dep)
 */
function PDF_get_minorversion() {}
/**
 * @param resource $pdf
 * @param string $key
 * @param float $modifier
 *
 * @return string
 *
 * @link https://secure.php.net/manual/en/function.pdf-get-parameter.php
 */
function PDF_get_parameter($pdf, $key, $modifier) {}
/**
 * @param resource $pdf
 * @param string $key
 * @param int $doc
 * @param int $page
 * @param int $reserved
 *
 * @return string
 *
 * @link https://secure.php.net/manual/en/function.pdf-get-pdi-parameter.php
 */
function PDF_get_pdi_parameter($pdf, $key, $doc, $page, $reserved) {}
/**
 * @param resource $pdf
 * @param string $key
 * @param int $doc
 * @param int $page
 * @param int $reserved
 *
 * @return float
 *
 * @link https://secure.php.net/manual/en/function.pdf-get-pdi-value.php
 */
function PDF_get_pdi_value($pdf, $key, $doc, $page, $reserved) {}
/**
 * @param resource $pdf
 * @param string $key
 * @param float $modifier
 *
 * @return float
 *
 * @link https://secure.php.net/manual/en/function.pdf-get-value.php
 */
function PDF_get_value($pdf, $key, $modifier) {}
/**
 * @param resource $pdf
 * @param int $font
 * @param string $keyword
 * @param string $optlist
 *
 * @return float
 *
 * @link https://secure.php.net/manual/en/function.pdf-info-font.php
 */
function PDF_info_font($pdf, $font, $keyword, $optlist) {}
/**
 * @param resource $pdf
 * @param string $boxname
 * @param int $num
 * @param string $keyword
 *
 * @return float
 *
 * @link https://secure.php.net/manual/en/function.pdf-info-matchbox.php
 */
function PDF_info_matchbox($pdf, $boxname, $num, $keyword) {}
/**
 * @param resource $pdf
 * @param int $table
 * @param string $keyword
 *
 * @return float
 *
 * @link https://secure.php.net/manual/en/function.pdf-info-table.php
 */
function PDF_info_table($pdf, $table, $keyword) {}
/**
 * @param resource $pdf
 * @param int $textflow
 * @param string $keyword
 *
 * @return float
 *
 * @link https://secure.php.net/manual/en/function.pdf-info-textflow.php
 */
function PDF_info_textflow($pdf, $textflow, $keyword) {}

/**
 * @param resource $pdf
 * @param string $text
 * @param string $keyword
 * @param string $optlist
 *
 * @return float
 *
 * @link https://secure.php.net/manual/en/function.pdf-info-textline.php
 */
function PDF_info_textline($pdf, $text, $keyword, $optlist) {}

/**
 * @param resource $pdf
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-initgraphics.php
 */
function PDF_initgraphics($pdf) {}

/**
 * @param resource $pdf
 * @param float $x
 * @param float $y
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-lineto.php
 */
function PDF_lineto($pdf, $x, $y) {}

/**
 * @param resource $pdf
 * @param string $filename
 * @param string $optlist
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-load-3ddata.php
 */
function PDF_load_3ddata($pdf, $filename, $optlist) {}

/**
 * @param resource $pdf
 * @param string $fontname
 * @param string $encoding
 * @param string $optlist
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-load-font.php
 */
function PDF_load_font($pdf, $fontname, $encoding, $optlist) {}

/**
 * @param resource $pdf
 * @param string $profilename
 * @param string $optlist
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-load-iccprofile.php
 */
function PDF_load_iccprofile($pdf, $profilename, $optlist) {}

/**
 * @param resource $pdf
 * @param string $imagetype
 * @param string $filename
 * @param string $optlist
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-load-image.php
 */
function PDF_load_image($pdf, $imagetype, $filename, $optlist) {}

/**
 * @param resource $pdf
 * @param string $spotname
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-makespotcolor.php
 */
function PDF_makespotcolor($pdf, $spotname) {}

/**
 * @param resource $pdf
 * @param float $x
 * @param float $y
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-moveto.php
 */
function PDF_moveto($pdf, $x, $y) {}

/**
 * @return resource
 *
 * @link https://secure.php.net/manual/en/function.pdf-new.php
 */
function PDF_new() {}

/**
 * @param resource $pdf
 * @param string $filename
 * @param int $width
 * @param int $height
 * @param int $BitReverse
 * @param int $k
 * @param int $Blackls1
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-open-ccitt.php(dep)
 */
function PDF_open_ccitt($pdf, $filename, $width, $height, $BitReverse, $k, $Blackls1) {}

/**
 * @param resource $pdf
 * @param string $filename
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-open-file.php(dep)
 */
function PDF_open_file($pdf, $filename) {}

/**
 * @param resource $pdf
 * @param string $imagetype
 * @param string $filename
 * @param string $stringparam
 * @param int $intparam
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-open-image-file.php(dep)
 */
function PDF_open_image_file($pdf, $imagetype, $filename, $stringparam, $intparam) {}

/**
 * @param resource $pdf
 * @param string $imagetype
 * @param string $source
 * @param string $data
 * @param int $length
 * @param int $width
 * @param int $height
 * @param int $components
 * @param int $bpc
 * @param string $params
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-open-image.php(dep)
 */
function PDF_open_image($pdf, $imagetype, $source, $data, $length, $width, $height, $components, $bpc, $params) {}

/**
 * @param resource $pdf
 * @param resource $image
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-open-memory-image.php(not supported)
 */
function PDF_open_memory_image($pdf, $image) {}

/**
 * @param resource $pdf
 * @param string $filename
 * @param string $optlist
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-open-pdi-document.php
 */
function PDF_open_pdi_document($pdf, $filename, $optlist) {}

/**
 * @param resource $pdf
 * @param int $doc
 * @param int $pagenumber
 * @param string $optlist
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-open-pdi-page.php
 */
function PDF_open_pdi_page($pdf, $doc, $pagenumber, $optlist) {}

/**
 * @param resource $pdf
 * @param string $filename
 * @param string $optlist
 * @param int $len
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-open-pdi.php
 */
function PDF_open_pdi($pdf, $filename, $optlist, $len) {}

/**
 * @param resource $pdf
 * @param int $doc
 * @param string $path
 *
 * @return float
 *
 * @link https://secure.php.net/manual/en/function.pdf-pcos-get-number.php
 */
function PDF_pcos_get_number($pdf, $doc, $path) {}

/**
 * @param resource $pdf
 * @param int $doc
 * @param string $optlist
 * @param string $path
 *
 * @return string
 *
 * @link https://secure.php.net/manual/en/function.pdf-pcos-get-stream.php
 */
function PDF_pcos_get_stream($pdf, $doc, $optlist, $path) {}

/**
 * @param resource $pdf
 * @param int $doc
 * @param string $path
 *
 * @return string
 *
 * @link https://secure.php.net/manual/en/function.pdf-pcos-get-string.php
 */
function PDF_pcos_get_string($pdf, $doc, $path) {}

/**
 * @param resource $pdf
 * @param int $image
 * @param float $x
 * @param float $y
 * @param float $scale
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-place-image.php (dep)
 */
function PDF_place_image($pdf, $image, $x, $y, $scale) {}

/**
 * @param resource $pdf
 * @param int $page
 * @param float $x
 * @param float $y
 * @param float $sx
 * @param float $sy
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-place-pdi-page.php (dep)
 */
function PDF_place_pdi_page($pdf, $page, $x, $y, $sx, $sy) {}

/**
 * @param resource $pdf
 * @param int $doc
 * @param int $page
 * @param string $optlist
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-process-pdi.php
 */
function PDF_process_pdi($pdf, $doc, $page, $optlist) {}

/**
 * @param resource $pdf
 * @param float $x
 * @param float $y
 * @param float $width
 * @param float $height
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-rect.php
 */
function PDF_rect($pdf, $x, $y, $width, $height) {}

/**
 * @param resource $p The PDF doc
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-restore.php
 */
function PDF_restore($p) {}

/**
 * @param resource $pdf
 * @param string $optlist
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-resume-page.php
 */
function PDF_resume_page($pdf, $optlist) {}

/**
 * @param resource $pdf
 * @param float $phi
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-rotate.php
 */
function PDF_rotate($pdf, $phi) {}

/**
 * @param resource $p The PDF doc
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-save.php
 */
function PDF_save($p) {}

/**
 * @param resource $pdf
 * @param float $sx
 * @param float $sy
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-scale.php
 */
function PDF_scale($pdf, $sx, $sy) {}

/**
 * @param resource $pdf
 * @param float $red
 * @param float $green
 * @param float $blue
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-set-border-color.php (dep)
 */
function PDF_set_border_color($pdf, $red, $green, $blue) {}

/**
 * @param resource $pdf
 * @param float $black
 * @param float $white
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-set-border-dash.php (dep)
 */
function PDF_set_border_dash($pdf, $black, $white) {}

/**
 * @param resource $pdf
 * @param string $style
 * @param float $width
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-set-border-style.php (dep)
 */
function PDF_set_border_style($pdf, $style, $width) {}

/**
 * @param resource $pdf
 * @param int $gstate
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-set-gstate.php
 */
function PDF_set_gstate($pdf, $gstate) {}

/**
 * @param resource $pdf
 * @param string $key
 * @param string $value
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-set-info.php
 */
function PDF_set_info($pdf, $key, $value) {}

/**
 * @param resource $pdf
 * @param string $type
 * @param string $optlist
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-set-layer-dependency.php
 */
function PDF_set_layer_dependency($pdf, $type, $optlist) {}

/**
 * @param resource $pdf
 * @param string $key
 * @param string $value
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-set-parameter.php
 */
function PDF_set_parameter($pdf, $key, $value) {}

/**
 * @param resource $pdf
 * @param float $x
 * @param float $y
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-set-text-pos.php
 */
function PDF_set_text_pos($pdf, $x, $y) {}

/**
 * @param resource $pdf
 * @param string $key
 * @param float $value
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-set-value.php
 */
function PDF_set_value($pdf, $key, $value) {}

/**
 * @param resource $pdf
 * @param string $fstype
 * @param string $colorspace
 * @param float $c1
 * @param float $c2
 * @param float $c3
 * @param float $c4
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-setcolor.php
 */
function PDF_setcolor($pdf, $fstype, $colorspace, $c1, $c2, $c3, $c4) {}

/**
 * @param resource $pdf
 * @param float $b
 * @param float $w
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-setdash.php
 */
function PDF_setdash($pdf, $b, $w) {}

/**
 * @param resource $pdf
 * @param string $optlist
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-setdashpattern.php
 */
function PDF_setdashpattern($pdf, $optlist) {}

/**
 * @param resource $pdf
 * @param float $flatness
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-setflat.php
 */
function PDF_setflat($pdf, $flatness) {}

/**
 * @param resource $pdf
 * @param int $font
 * @param float $fontsize
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-setfont.php
 */
function PDF_setfont($pdf, $font, $fontsize) {}

/**
 * @param resource $pdf
 * @param float $g
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-setgray-fill.php (dep)
 */
function PDF_setgray_fill($pdf, $g) {}

/**
 * @param resource $pdf
 * @param float $g
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-setgray-stroke.php (dep)
 */
function PDF_setgray_stroke($pdf, $g) {}

/**
 * @param resource $pdf
 * @param float $g
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-setgray.php (dep)
 */
function PDF_setgray($pdf, $g) {}

/**
 * @param resource $pdf
 * @param int $linecap
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-setlinecap.php
 */
function PDF_setlinecap($pdf, $linecap) {}

/**
 * @param resource $pdf
 * @param int $value
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-setlinejoin.php
 */
function PDF_setlinejoin($pdf, $value) {}

/**
 * @param resource $pdf
 * @param float $width
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-setlinewidth.php
 */
function PDF_setlinewidth($pdf, $width) {}

/**
 * @param resource $pdf
 * @param float $a
 * @param float $b
 * @param float $c
 * @param float $d
 * @param float $e
 * @param float $f
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-setmatrix.php
 */
function PDF_setmatrix($pdf, $a, $b, $c, $d, $e, $f) {}

/**
 * @param resource $pdf
 * @param float $miter
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-setmiterlimit.php
 */
function PDF_setmiterlimit($pdf, $miter) {}

/**
 * @param resource $pdf
 * @param float $red
 * @param float $green
 * @param float $blue
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-setrgbcolor-fill.php (dep)
 */
function PDF_setrgbcolor_fill($pdf, $red, $green, $blue) {}

/**
 * @param resource $pdf
 * @param float $red
 * @param float $green
 * @param float $blue
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-setrgbcolor-stroke.php (dep)
 */
function PDF_setrgbcolor_stroke($pdf, $red, $green, $blue) {}

/**
 * @param resource $pdf
 * @param float $red
 * @param float $green
 * @param float $blue
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-setrgbcolor.php (dep)
 */
function PDF_setrgbcolor($pdf, $red, $green, $blue) {}

/**
 * @param resource $pdf
 * @param int $shading
 * @param string $optlist
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-shading-pattern.php
 */
function PDF_shading_pattern($pdf, $shading, $optlist) {}

/**
 * @param resource $pdf
 * @param string $shtype
 * @param float $x0
 * @param float $y0
 * @param float $x1
 * @param float $y1
 * @param float $c1
 * @param float $c2
 * @param float $c3
 * @param float $c4
 * @param string $optlist
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-shading.php
 */
function PDF_shading($pdf, $shtype, $x0, $y0, $x1, $y1, $c1, $c2, $c3, $c4, $optlist) {}

/**
 * @param resource $pdf
 * @param int $shading
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-shfill.php
 */
function PDF_shfill($pdf, $shading) {}

/**
 * @param resource $pdf
 * @param string $text
 * @param float $left
 * @param float $top
 * @param float $width
 * @param float $height
 * @param string $mode
 * @param string $feature
 *
 * @return int
 *
 * @link https://secure.php.net/manual/en/function.pdf-show-boxed.php (dep)
 */
function PDF_show_boxed($pdf, $text, $left, $top, $width, $height, $mode, $feature) {}

/**
 * @param resource $pdf
 * @param string $text
 * @param float $x
 * @param float $y
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-show-xy.php
 */
function PDF_show_xy($pdf, $text, $x, $y) {}

/**
 * @param resource $pdf
 * @param string $text
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-show.php
 */
function PDF_show($pdf, $text) {}

/**
 * @param resource $pdf
 * @param float $alpha
 * @param float $beta
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-skew.php
 */
function PDF_skew($pdf, $alpha, $beta) {}

/**
 * @param resource $pdf
 * @param string $text
 * @param int $font
 * @param float $fontsize
 *
 * @return float
 *
 * @link https://secure.php.net/manual/en/function.pdf-stringwidth.php
 */
function PDF_stringwidth($pdf, $text, $font, $fontsize) {}

/**
 * @param resource $p The PDF doc
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-stroke.php
 */
function PDF_stroke($p) {}

/**
 * @param resource $pdf
 * @param string $optlist
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-suspend-page.php
 */
function PDF_suspend_page($pdf, $optlist) {}

/**
 * @param resource $pdf
 * @param float $tx
 * @param float $ty
 *
 * @return bool
 *
 * @link https://secure.php.net/manual/en/function.pdf-translate.php
 */
function PDF_translate($pdf, $tx, $ty) {}

/**
 * @param resource $pdf
 * @param string $utf16string
 *
 * @return string
 *
 * @link https://secure.php.net/manual/en/function.pdf-utf16-to-utf8.php
 */
function PDF_utf16_to_utf8($pdf, $utf16string) {}

/**
 * @param resource $pdf
 * @param string $utf32string
 * @param string $ordering
 *
 * @return string
 *
 * @link https://secure.php.net/manual/en/function.pdf-utf32-to-utf16.php
 */
function PDF_utf32_to_utf16($pdf, $utf32string, $ordering) {}

/**
 * @param resource $pdf
 * @param string $utf8string
 * @param string $ordering
 *
 * @return string
 *
 * @link https://secure.php.net/manual/en/function.pdf-utf8-to-utf16.php
 */
function PDF_utf8_to_utf16($pdf, $utf8string, $ordering) {}
<?php

// Start of gettext v.
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Pure;

/**
 * Sets the default domain
 * @link https://php.net/manual/en/function.textdomain.php
 * @param string|null $domain <p>
 * The new message domain, or <b>NULL</b> to get the current setting without
 * changing it
 * </p>
 * @return string If successful, this function returns the current message
 * domain, after possibly changing it.
 */
function textdomain(?string $domain): string {}

/**
 * Lookup a message in the current domain
 * @link https://php.net/manual/en/function.gettext.php
 * @param string $message <p>
 * The message being translated.
 * </p>
 * @return string a translated string if one is found in the
 * translation table, or the submitted message if not found.
 */
#[Pure]
function _(string $message): string {}

/**
 * Lookup a message in the current domain
 * @link https://php.net/manual/en/function.gettext.php
 * @param string $message <p>
 * The message being translated.
 * </p>
 * @return string a translated string if one is found in the
 * translation table, or the submitted message if not found.
 */
#[Pure]
function gettext(string $message): string {}

/**
 * Override the current domain
 * @link https://php.net/manual/en/function.dgettext.php
 * @param string $domain <p>
 * The domain
 * </p>
 * @param string $message <p>
 * The message
 * </p>
 * @return string A string on success.
 */
function dgettext(string $domain, string $message): string {}

/**
 * Overrides the domain for a single lookup
 * @link https://php.net/manual/en/function.dcgettext.php
 * @param string $domain <p>
 * The domain
 * </p>
 * @param string $message <p>
 * The message
 * </p>
 * @param int $category <p>
 * The category
 * </p>
 * @return string A string on success.
 */
function dcgettext(string $domain, string $message, int $category): string {}

/**
 * Sets the path for a domain
 * @link https://php.net/manual/en/function.bindtextdomain.php
 * @param string $domain <p>
 * The domain
 * </p>
 * @param string|null $directory <p>
 * The directory path. Since PHP 8.0.3 directory is nullable. If null is passed, the currently set directory is returned.
 * </p>
 * @return string|false The full pathname for the <i>domain</i> currently being set.
 */
function bindtextdomain(string $domain, #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: 'string')] $directory): string|false {}

/**
 * Plural version of gettext
 * @link https://php.net/manual/en/function.ngettext.php
 * @param string $singular
 * @param string $plural
 * @param int $count
 * @return string correct plural form of message identified by
 * <i>msgid1</i> and <i>msgid2</i>
 * for count <i>n</i>.
 */
#[Pure]
function ngettext(string $singular, string $plural, int $count): string {}

/**
 * Plural version of dgettext
 * @link https://php.net/manual/en/function.dngettext.php
 * @param string $domain <p>
 * The domain
 * </p>
 * @param string $singular
 * @param string $plural
 * @param int $count
 * @return string A string on success.
 */
#[Pure]
function dngettext(string $domain, string $singular, string $plural, int $count): string {}

/**
 * Plural version of dcgettext
 * @link https://php.net/manual/en/function.dcngettext.php
 * @param string $domain <p>
 * The domain
 * </p>
 * @param string $singular
 * @param string $plural
 * @param int $count
 * @param int $category
 * @return string A string on success.
 */
#[Pure]
function dcngettext(string $domain, string $singular, string $plural, int $count, int $category): string {}

/**
 * Specify the character encoding in which the messages from the DOMAIN message catalog will be returned
 * @link https://php.net/manual/en/function.bind-textdomain-codeset.php
 * @param string $domain <p>
 * The domain
 * </p>
 * @param string|null $codeset <p>
 * The code set. Since 8.0.3 is nullable.  If null is passed, the currently set encoding is returned.
 * </p>
 * @return string|false A string on success.
 */
function bind_textdomain_codeset(string $domain, #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: 'string')] $codeset): string|false {}

// End of gettext v.
<?php

// Start of geoip v.1.1.0
use JetBrains\PhpStorm\Pure;

/**
 * (PECL geoip &gt;= 0.2.0)<br/>
 * Get GeoIP Database information
 * @link https://php.net/manual/en/function.geoip-database-info.php
 * @param int $database [optional] <p>
 * The database type as an integer. You can use the
 * various constants defined with
 * this extension (ie: GEOIP_*_EDITION).
 * </p>
 * @return string|null the corresponding database version, or <b>NULL</b> on error.
 */
#[Pure]
function geoip_database_info($database = GEOIP_COUNTRY_EDITION) {}

/**
 * (PECL geoip &gt;= 0.2.0)<br/>
 * Get the two letter country code
 * @link https://php.net/manual/en/function.geoip-country-code-by-name.php
 * @param string $hostname <p>
 * The hostname or IP address whose location is to be looked-up.
 * </p>
 * @return string|false the two letter ISO country code on success, or <b>FALSE</b>
 * if the address cannot be found in the database.
 */
#[Pure]
function geoip_country_code_by_name($hostname) {}

/**
 * (PECL geoip &gt;= 0.2.0)<br/>
 * Get the three letter country code
 * @link https://php.net/manual/en/function.geoip-country-code3-by-name.php
 * @param string $hostname <p>
 * The hostname or IP address whose location is to be looked-up.
 * </p>
 * @return string|false the three letter country code on success, or <b>FALSE</b>
 * if the address cannot be found in the database.
 */
#[Pure]
function geoip_country_code3_by_name($hostname) {}

/**
 * (PECL geoip &gt;= 0.2.0)<br/>
 * Get the full country name
 * @link https://php.net/manual/en/function.geoip-country-name-by-name.php
 * @param string $hostname <p>
 * The hostname or IP address whose location is to be looked-up.
 * </p>
 * @return string|false the country name on success, or <b>FALSE</b> if the address cannot
 * be found in the database.
 */
#[Pure]
function geoip_country_name_by_name($hostname) {}

/**
 * (PECL geoip &gt;= 1.0.3)<br/>
 * Get the two letter continent code
 * @link https://php.net/manual/en/function.geoip-continent-code-by-name.php
 * @param string $hostname <p>
 * The hostname or IP address whose location is to be looked-up.
 * </p>
 * @return string|false the two letter continent code on success, or <b>FALSE</b> if the
 * address cannot be found in the database.
 */
#[Pure]
function geoip_continent_code_by_name($hostname) {}

/**
 * (PECL geoip &gt;= 0.2.0)<br/>
 * Get the organization name
 * @link https://php.net/manual/en/function.geoip-org-by-name.php
 * @param string $hostname <p>
 * The hostname or IP address.
 * </p>
 * @return string|false the organization name on success, or <b>FALSE</b> if the address
 * cannot be found in the database.
 */
#[Pure]
function geoip_org_by_name($hostname) {}

/**
 * (PECL geoip &gt;= 0.2.0)<br/>
 * Returns the detailed City information found in the GeoIP Database
 * @link https://php.net/manual/en/function.geoip-record-by-name.php
 * @param string $hostname <p>
 * The hostname or IP address whose record is to be looked-up.
 * </p>
 * @return array|false the associative array on success, or <b>FALSE</b> if the address
 * cannot be found in the database.
 */
#[Pure]
function geoip_record_by_name($hostname) {}

/**
 * (PECL geoip &gt;= 0.2.0)<br/>
 * Get the Internet connection type
 * @link https://php.net/manual/en/function.geoip-id-by-name.php
 * @param string $hostname <p>
 * The hostname or IP address whose connection type is to be looked-up.
 * </p>
 * @return int the connection type.
 */
#[Pure]
function geoip_id_by_name($hostname) {}

/**
 * (PECL geoip &gt;= 0.2.0)<br/>
 * Get the country code and region
 * @link https://php.net/manual/en/function.geoip-region-by-name.php
 * @param string $hostname <p>
 * The hostname or IP address whose region is to be looked-up.
 * </p>
 * @return array|false the associative array on success, or <b>FALSE</b> if the address
 * cannot be found in the database.
 */
#[Pure]
function geoip_region_by_name($hostname) {}

/**
 * (PECL geoip &gt;= 1.0.2)<br/>
 * Get the Internet Service Provider (ISP) name
 * @link https://php.net/manual/en/function.geoip-isp-by-name.php
 * @param string $hostname <p>
 * The hostname or IP address.
 * </p>
 * @return string|false the ISP name on success, or <b>FALSE</b> if the address
 * cannot be found in the database.
 */
#[Pure]
function geoip_isp_by_name($hostname) {}

/**
 * (PECL geoip &gt;= 1.0.1)<br/>
 * Determine if GeoIP Database is available
 * @link https://php.net/manual/en/function.geoip-db-avail.php
 * @param int $database <p>
 * The database type as an integer. You can use the
 * various constants defined with
 * this extension (ie: GEOIP_*_EDITION).
 * </p>
 * @return bool|null <b>TRUE</b> is database exists, <b>FALSE</b> if not found, or <b>NULL</b> on error.
 */
#[Pure]
function geoip_db_avail($database) {}

/**
 * (PECL geoip &gt;= 1.0.1)<br/>
 * Returns detailed information about all GeoIP database types
 * @link https://php.net/manual/en/function.geoip-db-get-all-info.php
 * @return array the associative array.
 */
#[Pure]
function geoip_db_get_all_info() {}

/**
 * (PECL geoip &gt;= 1.0.1)<br/>
 * Returns the filename of the corresponding GeoIP Database
 * @link https://php.net/manual/en/function.geoip-db-filename.php
 * @param int $database <p>
 * The database type as an integer. You can use the
 * various constants defined with
 * this extension (ie: GEOIP_*_EDITION).
 * </p>
 * @return string|null the filename of the corresponding database, or <b>NULL</b> on error.
 */
#[Pure]
function geoip_db_filename($database) {}

/**
 * (PECL geoip &gt;= 1.0.4)<br/>
 * Returns the region name for some country and region code combo
 * @link https://php.net/manual/en/function.geoip-region-name-by-code.php
 * @param string $country_code <p>
 * The two-letter country code (see
 * <b>geoip_country_code_by_name</b>)
 * </p>
 * @param string $region_code <p>
 * The two-letter (or digit) region code (see
 * <b>geoip_region_by_name</b>)
 * </p>
 * @return string|false the region name on success, or <b>FALSE</b> if the country and region code
 * combo cannot be found.
 */
#[Pure]
function geoip_region_name_by_code($country_code, $region_code) {}

/**
 * (PECL geoip &gt;= 1.0.4)<br/>
 * Returns the time zone for some country and region code combo
 * @link https://php.net/manual/en/function.geoip-time-zone-by-country-and-region.php
 * @param string $country_code <p>
 * The two-letter country code (see
 * <b>geoip_country_code_by_name</b>)
 * </p>
 * @param string $region_code [optional] <p>
 * The two-letter (or digit) region code (see
 * <b>geoip_region_by_name</b>)
 * </p>
 * @return string|false the time zone on success, or <b>FALSE</b> if the country and region code
 * combo cannot be found.
 */
#[Pure]
function geoip_time_zone_by_country_and_region($country_code, $region_code = null) {}

define('GEOIP_COUNTRY_EDITION', 1);
define('GEOIP_REGION_EDITION_REV0', 7);
define('GEOIP_CITY_EDITION_REV0', 6);
define('GEOIP_ORG_EDITION', 5);
define('GEOIP_ISP_EDITION', 4);
define('GEOIP_CITY_EDITION_REV1', 2);
define('GEOIP_REGION_EDITION_REV1', 3);
define('GEOIP_PROXY_EDITION', 8);
define('GEOIP_ASNUM_EDITION', 9);
define('GEOIP_NETSPEED_EDITION', 10);
define('GEOIP_DOMAIN_EDITION', 11);
define('GEOIP_UNKNOWN_SPEED', 0);
define('GEOIP_DIALUP_SPEED', 1);
define('GEOIP_CABLEDSL_SPEED', 2);
define('GEOIP_CORPORATE_SPEED', 3);

/**
 * (PECL geoip &gt;= 1.1.0)<br/>
 * <p>
 * The geoip_asnum_by_name() function will return the Autonomous System Numbers (ASN) associated with an IP address.
 * </p>
 * @link https://secure.php.net/manual/en/function.geoip-asnum-by-name.php
 * @param string $hostname The hostname or IP address
 *
 * @return string|false Returns the ASN on success, or <b>FALSE</b> if the address cannot be found in the database.
 * @since 1.1.0
 */
function geoip_asnum_by_name($hostname) {}

/**
 * (PECL geoip &gt;= 1.1.0)<br/>
 * <p>
 * The geoip_netspeedcell_by_name() function will return the Internet connection type and speed corresponding to a hostname or an IP address.<br>
 * <br>
 * This function is only available if using GeoIP Library version 1.4.8 or newer.<br>
 * <br>
 * This function is currently only available to users who have bought a commercial GeoIP NetSpeedCell Edition. A warning will be issued if the proper database cannot be located.<br>
 * <br>
 * The return value is a string, common values are:<br>
 * - Cable/DSL<br>
 * - Dialup<br>
 * - Cellular<br>
 * - Corporate<br>
 * </p>
 * @link https://secure.php.net/manual/en/function.geoip-netspeedcell-by-name.php
 * @param string $hostname The hostname or IP address
 *
 * @return string|false Returns the connection speed on success, or <b>FALSE</b> if the address cannot be found in the database.
 * @since 1.1.0
 */
function geoip_netspeedcell_by_name($hostname) {}

/**
 * (PECL geoip &gt;= 1.1.0)<br/>
 * <p>
 * The geoip_setup_custom_directory() function will change the default directory of the GeoIP database. This is equivalent to changing geoip.custom_directory
 * </p>
 * @link https://secure.php.net/manual/en/function.geoip-setup-custom-directory.php
 * @param string $path The full path of where the GeoIP database is on disk.
 *
 * @return void
 * @since 1.1.0
 */
function geoip_setup_custom_directory($path) {}

// End of geoip v.1.1.0
<?php

use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;

const SODIUM_CRYPTO_AEAD_AES256GCM_KEYBYTES = 32;
const SODIUM_CRYPTO_AEAD_AES256GCM_NSECBYTES = 0;
const SODIUM_CRYPTO_AEAD_AES256GCM_NPUBBYTES = 12;
const SODIUM_CRYPTO_AEAD_AES256GCM_ABYTES = 16;
const SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES = 32;
const SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES = 0;
const SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES = 8;
const SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_ABYTES = 16;
const SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES = 32;
const SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTES = 0;
const SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES = 12;
const SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_ABYTES = 16;
const SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES = 32;
const SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NSECBYTES = 0;
const SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES = 24;
const SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_ABYTES = 16;
const SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_ABYTES = 17;
const SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_HEADERBYTES = 24;
const SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_KEYBYTES = 32;
const SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_MESSAGEBYTES_MAX = 274877906816;
const SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_MESSAGE = 0;
const SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_PUSH = 1;
const SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_REKEY = 2;
const SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_FINAL = 3;
const SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13 = 2;
const SODIUM_BASE64_VARIANT_ORIGINAL = 1;
const SODIUM_BASE64_VARIANT_ORIGINAL_NO_PADDING = 3;
const SODIUM_BASE64_VARIANT_URLSAFE = 5;
const SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING = 7;
const SODIUM_CRYPTO_AUTH_BYTES = 32;
const SODIUM_CRYPTO_AUTH_KEYBYTES = 32;
const SODIUM_CRYPTO_BOX_SEALBYTES = 48;
const SODIUM_CRYPTO_BOX_SECRETKEYBYTES = 32;
const SODIUM_CRYPTO_BOX_PUBLICKEYBYTES = 32;
const SODIUM_CRYPTO_BOX_KEYPAIRBYTES = 64;
const SODIUM_CRYPTO_BOX_MACBYTES = 16;
const SODIUM_CRYPTO_BOX_NONCEBYTES = 24;
const SODIUM_CRYPTO_BOX_SEEDBYTES = 32;
const SODIUM_CRYPTO_KX_BYTES = 32;
const SODIUM_CRYPTO_KX_PUBLICKEYBYTES = 32;
const SODIUM_CRYPTO_KX_SECRETKEYBYTES = 32;
const SODIUM_CRYPTO_GENERICHASH_BYTES = 32;
const SODIUM_CRYPTO_GENERICHASH_BYTES_MIN = 16;
const SODIUM_CRYPTO_GENERICHASH_BYTES_MAX = 64;
const SODIUM_CRYPTO_GENERICHASH_KEYBYTES = 32;
const SODIUM_CRYPTO_GENERICHASH_KEYBYTES_MIN = 16;
const SODIUM_CRYPTO_GENERICHASH_KEYBYTES_MAX = 64;
const SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_SALTBYTES = 32;
const SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_STRPREFIX = '$7$';
const SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_INTERACTIVE = 524288;
const SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_INTERACTIVE = 16777216;
const SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_SENSITIVE = 33554432;
const SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_SENSITIVE = 1073741824;
const SODIUM_CRYPTO_SCALARMULT_BYTES = 32;
const SODIUM_CRYPTO_SCALARMULT_SCALARBYTES = 32;
const SODIUM_CRYPTO_SHORTHASH_BYTES = 8;
const SODIUM_CRYPTO_SHORTHASH_KEYBYTES = 16;
const SODIUM_CRYPTO_SECRETBOX_KEYBYTES = 32;
const SODIUM_CRYPTO_SECRETBOX_MACBYTES = 16;
const SODIUM_CRYPTO_SECRETBOX_NONCEBYTES = 24;
const SODIUM_CRYPTO_SIGN_BYTES = 64;
const SODIUM_CRYPTO_SIGN_SEEDBYTES = 32;
const SODIUM_CRYPTO_SIGN_PUBLICKEYBYTES = 32;
const SODIUM_CRYPTO_SIGN_SECRETKEYBYTES = 64;
const SODIUM_CRYPTO_SIGN_KEYPAIRBYTES = 96;
const SODIUM_CRYPTO_STREAM_KEYBYTES = 32;
const SODIUM_CRYPTO_STREAM_NONCEBYTES = 24;
const SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE = 2;
const SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE = 67108864;
const SODIUM_CRYPTO_PWHASH_OPSLIMIT_MODERATE = 3;
const SODIUM_CRYPTO_PWHASH_MEMLIMIT_MODERATE = 268435456;
const SODIUM_CRYPTO_PWHASH_OPSLIMIT_SENSITIVE = 4;
const SODIUM_CRYPTO_PWHASH_MEMLIMIT_SENSITIVE = 1073741824;
const SODIUM_LIBRARY_VERSION = "1.0.18";
const SODIUM_LIBRARY_MAJOR_VERSION = 10;
const SODIUM_LIBRARY_MINOR_VERSION = 3;
const SODIUM_CRYPTO_KDF_BYTES_MIN = 16;
const SODIUM_CRYPTO_KDF_BYTES_MAX = 64;
const SODIUM_CRYPTO_KDF_CONTEXTBYTES = 8;
const SODIUM_CRYPTO_KDF_KEYBYTES = 32;
const SODIUM_CRYPTO_KX_SEEDBYTES = 32;
const SODIUM_CRYPTO_KX_SESSIONKEYBYTES = 32;
const SODIUM_CRYPTO_KX_KEYPAIRBYTES = 64;
const SODIUM_CRYPTO_PWHASH_ALG_ARGON2I13 = 1;
const SODIUM_CRYPTO_PWHASH_ALG_DEFAULT = 2;
const SODIUM_CRYPTO_PWHASH_SALTBYTES = 16;
const SODIUM_CRYPTO_PWHASH_STRPREFIX = '$argon2id$';
const SODIUM_CRYPTO_STREAM_XCHACHA20_NONCEBYTES = 24;
const SODIUM_CRYPTO_STREAM_XCHACHA20_KEYBYTES = 32;
const SODIUM_CRYPTO_SCALARMULT_RISTRETTO255_BYTES = 32;
const SODIUM_CRYPTO_SCALARMULT_RISTRETTO255_SCALARBYTES = 32;
const SODIUM_CRYPTO_CORE_RISTRETTO255_BYTES = 32;
const SODIUM_CRYPTO_CORE_RISTRETTO255_HASHBYTES = 64;
const SODIUM_CRYPTO_CORE_RISTRETTO255_SCALARBYTES = 32;
const SODIUM_CRYPTO_CORE_RISTRETTO255_NONREDUCEDSCALARBYTES = 64;

#[PhpStormStubsElementAvailable('8.1')]
function sodium_crypto_core_ristretto255_add(string $p, string $q): string {}

#[PhpStormStubsElementAvailable('8.1')]
function sodium_crypto_core_ristretto255_from_hash(string $s): string {}

#[PhpStormStubsElementAvailable('8.1')]
function sodium_crypto_core_ristretto255_is_valid_point(string $s): bool {}

#[PhpStormStubsElementAvailable('8.1')]
function sodium_crypto_core_ristretto255_random(): string {}

#[PhpStormStubsElementAvailable('8.1')]
function sodium_crypto_core_ristretto255_scalar_add(string $x, string $y): string {}

#[PhpStormStubsElementAvailable('8.1')]
function sodium_crypto_core_ristretto255_scalar_complement(string $s): string {}

#[PhpStormStubsElementAvailable('8.1')]
function sodium_crypto_core_ristretto255_scalar_invert(string $s): string {}

#[PhpStormStubsElementAvailable('8.1')]
function sodium_crypto_core_ristretto255_scalar_mul(string $x, string $y): string {}

#[PhpStormStubsElementAvailable('8.1')]
function sodium_crypto_core_ristretto255_scalar_negate(string $s): string {}

#[PhpStormStubsElementAvailable('8.1')]
function sodium_crypto_core_ristretto255_scalar_reduce(string $s): string {}

#[PhpStormStubsElementAvailable('8.1')]
function sodium_crypto_core_ristretto255_scalar_sub(string $x, string $y): string {}

#[PhpStormStubsElementAvailable('8.1')]
function sodium_crypto_core_ristretto255_scalar_random(): string {}

#[PhpStormStubsElementAvailable('8.1')]
function sodium_crypto_core_ristretto255_sub(string $p, string $q): string {}

#[PhpStormStubsElementAvailable('8.1')]
function sodium_crypto_scalarmult_ristretto255(string $n, string $p): string {}

#[PhpStormStubsElementAvailable('8.1')]
function sodium_crypto_scalarmult_ristretto255_base(string $n): string {}

#[PhpStormStubsElementAvailable('8.1')]
function sodium_crypto_stream_xchacha20(int $length, string $nonce, string $key): string {}

#[PhpStormStubsElementAvailable('8.1')]
function sodium_crypto_stream_xchacha20_xor(string $message, string $nonce, string $key): string {}

#[PhpStormStubsElementAvailable('8.2')]
function sodium_crypto_stream_xchacha20_xor_ic(#[\SensitiveParameter] string $message, string $nonce, int $counter, #[\SensitiveParameter] string $key): string {}

#[PhpStormStubsElementAvailable('8.1')]
function sodium_crypto_stream_xchacha20_keygen(): string {}

/**
 * Can you access AES-256-GCM? This is only available if you have supported
 * hardware.
 * @link https://www.php.net/manual/en/function.sodium-crypto-aead-aes256gcm-is-available
 * @return bool
 * @since 7.2
 */
function sodium_crypto_aead_aes256gcm_is_available(): bool {}

/**
 * Authenticated Encryption with Associated Data (decrypt)
 * AES-256-GCM
 * @link https://www.php.net/manual/en/function.sodium-crypto-aead-aes256gcm-decrypt.php
 * @param string $ciphertext encrypted message
 * @param string $additional_data additional data
 * @param string $nonce
 * @param string $key
 * @return string|false
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_aead_aes256gcm_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string|false {}

/**
 * Authenticated Encryption with Associated Data (encrypt)
 * AES-256-GCM
 * @link https://www.php.net/manual/en/function.sodium-crypto-aead-aes256gcm-encrypt.php
 * @param string $message plaintext message
 * @param string $additional_data
 * @param string $nonce
 * @param string $key
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_aead_aes256gcm_encrypt(string $message, string $additional_data, string $nonce, string $key): string {}

/**
 * Authenticated Encryption with Associated Data (decrypt)
 * ChaCha20 + Poly1305
 * @link https://www.php.net/manual/en/function.sodium-crypto-aead-chacha20poly1305-decrypt.php
 * @param string $ciphertext encrypted message
 * @param string $additional_data additional data
 * @param string $nonce
 * @param string $key
 * @return string|false
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_aead_chacha20poly1305_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string|false {}

/**
 * Authenticated Encryption with Associated Data (encrypt)
 * ChaCha20 + Poly1305
 * @link https://www.php.net/manual/en/function.sodium-crypto-aead-chacha20poly1305-encrypt.php
 * @param string $message plaintext message
 * @param string $additional_data additional data
 * @param string $nonce
 * @param string $key
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_aead_chacha20poly1305_encrypt(string $message, string $additional_data, string $nonce, string $key): string {}

/**
 * Authenticated Encryption with Associated Data (decrypt)
 * ChaCha20 + Poly1305 (IETF version)
 * @link https://www.php.net/manual/en/function.sodium-crypto-aead-chacha20poly1305-ietf-decrypt.php
 * @param string $ciphertext encrypted message
 * @param string $additional_data additional data
 * @param string $nonce
 * @param string $key
 * @return string|false
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_aead_chacha20poly1305_ietf_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string|false {}

/**
 * Authenticated Encryption with Associated Data (encrypt)
 * ChaCha20 + Poly1305 (IETF version)
 * @link https://www.php.net/manual/en/function.sodium-crypto-aead-chacha20poly1305-ietf-encrypt.php
 * @param string $message plaintext message
 * @param string $additional_data additional data
 * @param string $nonce
 * @param string $key
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_aead_chacha20poly1305_ietf_encrypt(
    string $message,
    string $additional_data,
    string $nonce,
    string $key
): string {}

/**
 * Secret-key message authentication
 * HMAC SHA-512/256
 * @link https://www.php.net/manual/en/function.sodium-crypto-auth.php
 * @param string $message
 * @param string $key
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_auth(
    string $message,
    string $key
): string {}

/**
 * Get random bytes for key
 * @link https://php.net/manual/en/function.sodium-crypto-auth-keygen.php
 * @return string
 * @since 7.2
 */
function sodium_crypto_auth_keygen(): string {}

/**
 * @link https://php.net/manual/en/function.sodium-crypto-kx-keypair.php
 * @since 7.2
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_kx_keypair(): string {}

/**
 * @link https://php.net/manual/en/function.sodium-crypto-kx-publickey.php
 * @since 7.2
 * @param string $key_pair
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_kx_publickey(string $key_pair): string {}

/**
 * @link https://php.net/manual/en/function.sodium-crypto-kx-secretkey.php
 * @param string $key_pair
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_kx_secretkey(string $key_pair): string {}

/**
 * @link https://php.net/manual/en/function.sodium-crypto-kx-seed-keypair.php
 * @since 7.2
 * @param string $seed
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_kx_seed_keypair(string $seed): string {}

/**
 * @link https://php.net/manual/en/function.sodium-crypto-kx-server-session-keys.php
 * @since 7.2
 * @param string $server_key_pair
 * @param string $client_key
 * @return string[]
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_kx_server_session_keys(string $server_key_pair, string $client_key): array {}

/**
 * Get random bytes for key
 * @link https://php.net/manual/en/function.sodium-crypto-generichash-keygen.php
 * @return string
 * @since 7.2
 */
function sodium_crypto_generichash_keygen(): string {}

/**
 * @link https://php.net/manual/en/function.sodium-crypto-kx-client-session-keys.php
 * @param string $client_key_pair
 * @param string $server_key
 * @return string[]
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_kx_client_session_keys(string $client_key_pair, string $server_key): array {}

/**
 * @link https://www.php.net/manual/en/function.sodium-crypto-kdf-derive-from-key.php
 * @param int $subkey_length
 * @param int $subkey_id
 * @param string $context
 * @param string $key
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_kdf_derive_from_key(int $subkey_length, int $subkey_id, string $context, string $key): string {}

/**
 * Get random bytes for key
 * @link https://php.net/manual/en/function.sodium-crypto-kdf-keygen.php
 * @since 7.2
 * @return string
 */
function sodium_crypto_kdf_keygen(): string {}

/**
 * Get random bytes for key
 * @link https://php.net/manual/en/function.sodium-crypto-shorthash-keygen.php
 * @since 7.2
 * @return string
 */
function sodium_crypto_shorthash_keygen(): string {}

/**
 * Get random bytes for key
 * @link https://php.net/manual/en/function.sodium-crypto-stream-keygen.php
 * @since 7.2
 * @return string
 */
function sodium_crypto_stream_keygen(): string {}

/**
 * Add padding data
 * @link https://php.net/manual/en/function.sodium-pad.php
 * @param string $string
 * @param int $block_size
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_pad(string $string, int $block_size): string {}

/**
 * Remove padding data
 * @link https://php.net/manual/en/function.sodium-unpad.php
 * @param string $string
 * @param int $block_size
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_unpad(string $string, int $block_size): string {}

/**
 * Secret-key message verification
 * HMAC SHA-512/256
 * @link https://www.php.net/manual/en/function.sodium-crypto-auth-verify.php
 * @param string $mac
 * @param string $message
 * @param string $key
 * @return bool
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_auth_verify(string $mac, string $message, string $key): bool {}

/**
 * Public-key authenticated encryption (encrypt)
 * X25519 + Xsalsa20 + Poly1305
 * @link https://www.php.net/manual/en/function.sodium-crypto-box.php
 * @param string $message
 * @param string $nonce
 * @param string $key_pair
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_box(string $message, string $nonce, string $key_pair): string {}

/**
 * Generate an X25519 keypair for use with the sodium_crypto_box API
 * @link https://www.php.net/manual/en/function.sodium-crypto-box-keypair.php
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_box_keypair(): string {}

/**
 * Derive an X25519 keypair for use with the sodium_crypto_box API from a seed
 * @link https://www.php.net/manual/en/function.sodium-crypto-box-seed-keypair.php
 * @param string $seed
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_box_seed_keypair(string $seed): string {}

/**
 * Create an X25519 keypair from an X25519 secret key and X25519 public key
 * @link https://www.php.net/manual/en/function.sodium-crypto-box-keypair-from-secretkey-and-publickey.php
 * @param string $secret_key
 * @param string $public_key
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_box_keypair_from_secretkey_and_publickey(string $secret_key, string $public_key): string {}

/**
 * Public-key authenticated encryption (decrypt)
 * X25519 + Xsalsa20 + Poly1305
 * @link https://www.php.net/manual/en/function.sodium-crypto-box-open.php
 * @param string $ciphertext
 * @param string $nonce
 * @param string $key_pair
 * @return string|false
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_box_open(string $ciphertext, string $nonce, string $key_pair): string|false {}

/**
 * Get an X25519 public key from an X25519 keypair
 * @link https://www.php.net/manual/en/function.sodium-crypto-box-publickey.php
 * @param string $key_pair
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_box_publickey(string $key_pair): string {}

/**
 * Derive an X25519 public key from an X25519 secret key
 * @link https://www.php.net/manual/en/function.sodium-crypto-box-publickey-from-secretkey.php
 * @param string $secret_key
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_box_publickey_from_secretkey(string $secret_key): string {}

/**
 * Anonymous public-key encryption (encrypt)
 * X25519 + Xsalsa20 + Poly1305 + BLAKE2b
 * @link https://www.php.net/manual/en/function.sodium-crypto-box-seal.php
 * @param string $message
 * @param string $public_key
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_box_seal(string $message, string $public_key): string {}

/**
 * Anonymous public-key encryption (decrypt)
 * X25519 + Xsalsa20 + Poly1305 + BLAKE2b
 * @link https://www.php.net/manual/en/function.sodium-crypto-box-seal-open.php
 * @param string $ciphertext
 * @param string $key_pair
 * @return string|false
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_box_seal_open(string $ciphertext, string $key_pair): string|false {}

/**
 * Extract the X25519 secret key from an X25519 keypair
 * @link https://www.php.net/manual/en/function.sodium-crypto-box-secretkey.php
 * @param string $key_pair
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_box_secretkey(string $key_pair): string {}

/**
 * Elliptic Curve Diffie Hellman Key Exchange
 * X25519
 * @param string $secret_key
 * @param string $public_key
 * @param string $client_publickey
 * @param string $server_publickey
 * @return string
 * @since 7.2
 */
function sodium_crypto_kx(
    string $secret_key,
    string $public_key,
    string $client_publickey,
    string $server_publickey
): string {}

/**
 * Fast and secure cryptographic hash
 * @link https://www.php.net/manual/en/function.sodium-crypto-generichash.php
 * @param string $message
 * @param string $key
 * @param int $length
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_generichash(string $message, string $key = '', int $length = 32): string {}

/**
 * Create a new hash state (e.g. to use for streams)
 * BLAKE2b
 * @link https://www.php.net/manual/en/function.sodium-crypto-generichash-init.php
 * @param string $key
 * @param int $length
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_generichash_init(
    string $key = '',
    int $length = 32
): string {}

/**
 * Update the hash state with some data
 * BLAKE2b
 * @link https://www.php.net/manual/en/function.sodium-crypto-generichash-update.php
 * @param string &$state
 * @param string $message
 * @return bool
 * @throws SodiumException
 * @since 7.2
 */
#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
function sodium_crypto_generichash_update(string &$state, string $message): bool {}

/**
 * Get the final hash
 * BLAKE2b
 * @link https://www.php.net/manual/en/function.sodium-crypto-generichash-final.php
 * @param string &$state
 * @param int $length
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_generichash_final(
    string &$state,
    int $length = 32
): string {}

/**
 * Secure password-based key derivation function
 * Argon2i
 * @link https://www.php.net/manual/en/function.sodium-crypto-pwhash.php
 * @param int $length
 * @param string $password
 * @param string $salt
 * @param int $opslimit
 * @param int $memlimit
 * @param int $algo [optional]
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_pwhash(int $length, string $password, string $salt, int $opslimit, int $memlimit, int $algo = SODIUM_CRYPTO_PWHASH_ALG_DEFAULT): string {}

/**
 * Get a formatted password hash (for storage)
 * Argon2i
 * @link https://www.php.net/manual/en/function.sodium-crypto-pwhash-str.php
 * @param string $password
 * @param int $opslimit
 * @param int $memlimit
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_pwhash_str(string $password, int $opslimit, int $memlimit): string {}

/**
 * Verify a password against a hash
 * Argon2i
 * @link https://www.php.net/manual/en/function.sodium-crypto-pwhash-str-verify.php
 * @param string $hash
 * @param string $password
 * @return bool
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_pwhash_str_verify(string $hash, string $password): bool {}

/**
 * Secure password-based key derivation function
 * Scrypt
 * @link https://www.php.net/manual/en/function.sodium-crypto-pwhash-scryptsalsa208sha256.php
 * @param int $length
 * @param string $password
 * @param string $salt
 * @param int $opslimit
 * @param int $memlimit
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_pwhash_scryptsalsa208sha256(
    int $length,
    string $password,
    string $salt,
    int $opslimit,
    int $memlimit,
    #[PhpStormStubsElementAvailable(from: '7.2', to: '7.4')] $alg = null
): string {}

/**
 * Get a formatted password hash (for storage)
 * Scrypt
 * @link https://www.php.net/manual/en/function.sodium-crypto-pwhash-scryptsalsa208sha256-str.php
 * @param string $password
 * @param int $opslimit
 * @param int $memlimit
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_pwhash_scryptsalsa208sha256_str(string $password, int $opslimit, int $memlimit): string {}

/**
 * Verify a password against a hash
 * Scrypt
 * @link https://www.php.net/manual/en/function.sodium-crypto-pwhash-scryptsalsa208sha256-str-verify
 * @param string $hash
 * @param string $password
 * @return bool
 * @since 7.2
 */
function sodium_crypto_pwhash_scryptsalsa208sha256_str_verify(string $hash, string $password): bool {}

/**
 * Elliptic Curve Diffie Hellman over Curve25519
 * X25519
 * @link https://www.php.net/manual/en/function.sodium-crypto-scalarmult.php
 * @param string $n
 * @param string $p
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_scalarmult(string $n, string $p): string {}

/**
 * Authenticated secret-key encryption (encrypt)
 * Xsals20 + Poly1305
 * @link https://www.php.net/manual/en/function.sodium-crypto-secretbox.php
 * @param string $message
 * @param string $nonce
 * @param string $key
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_secretbox(string $message, string $nonce, string $key): string {}

/**
 * Authenticated secret-key encryption (decrypt)
 * Xsals20 + Poly1305
 * @link https://www.php.net/manual/en/function.sodium-crypto-secretbox-open.php
 * @param string $ciphertext
 * @param string $nonce
 * @param string $key
 * @return string|false
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_secretbox_open(string $ciphertext, string $nonce, string $key): string|false {}

/**
 * A short keyed hash suitable for data structures
 * SipHash-2-4
 * @link https://www.php.net/manual/en/function.sodium-crypto-shorthash.php
 * @param string $message
 * @param string $key
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_shorthash(string $message, string $key): string {}

/**
 * Digital Signature
 * Ed25519
 * @link https://www.php.net/manual/en/function.sodium-crypto-sign.php
 * @param string $message
 * @param string $secret_key
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_sign(string $message, string $secret_key): string {}

/**
 * Digital Signature (detached)
 * Ed25519
 * @link https://www.php.net/manual/en/function.sodium-crypto-sign-detached.php
 * @param string $message
 * @param string $secret_key
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_sign_detached(string $message, string $secret_key): string {}

/**
 * Convert an Ed25519 public key to an X25519 public key
 * @link https://www.php.net/manual/en/function.sodium-crypto-sign-ed25519-pk-to-curve25519.php
 * @param string $public_key
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_sign_ed25519_pk_to_curve25519(string $public_key): string {}

/**
 * Convert an Ed25519 secret key to an X25519 secret key
 * @link https://www.php.net/manual/en/function.sodium-crypto-sign-ed25519-sk-to-curve25519.php
 * @param string $secret_key
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_sign_ed25519_sk_to_curve25519(string $secret_key): string {}

/**
 * Generate an Ed25519 keypair for use with the crypto_sign API
 * @link https://www.php.net/manual/en/function.sodium-crypto-sign-keypair.php
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_sign_keypair(): string {}

/**
 * Create an Ed25519 keypair from an Ed25519 secret key + Ed25519 public key
 * @link https://www.php.net/manual/en/function.sodium-crypto-sign-keypair-from-secretkey-and-publickey.php
 * @param string $secret_key
 * @param string $public_key
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_sign_keypair_from_secretkey_and_publickey(
    string $secret_key,
    string $public_key
): string {}

/**
 * Verify a signed message and return the plaintext
 * @link https://www.php.net/manual/en/function.sodium-crypto-sign-open.php
 * @param string $signed_message
 * @param string $public_key
 * @return string|false
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_sign_open(string $signed_message, string $public_key): string|false {}

/**
 * Get the public key from an Ed25519 keypair
 * @link https://www.php.net/manual/en/function.sodium-crypto-sign-publickey.php
 * @param string $key_pair
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_sign_publickey(string $key_pair): string {}

/**
 * Get the secret key from an Ed25519 keypair
 * @link https://www.php.net/manual/en/function.sodium-crypto-sign-secretkey.php
 * @param string $key_pair
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_sign_secretkey(string $key_pair): string {}

/**
 * Derive an Ed25519 public key from an Ed25519 secret key
 * @link https://www.php.net/manual/en/function.sodium-crypto-sign-publickey-from-secretkey.php
 * @param string $secret_key
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_sign_publickey_from_secretkey(string $secret_key): string {}

/**
 * Derive an Ed25519 keypair for use with the crypto_sign API from a seed
 * @link https://www.php.net/manual/en/function.sodium-crypto-sign-seed-keypair.php
 * @param string $seed
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_sign_seed_keypair(string $seed): string {}

/**
 * Verify a detached signature
 * @link https://www.php.net/manual/en/function.sodium-crypto-sign-verify-detached.php
 * @param string $signature
 * @param string $message
 * @param string $public_key
 * @return bool
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_sign_verify_detached(string $signature, string $message, string $public_key): bool {}

/**
 * Create a keystream from a key and nonce
 * Xsalsa20
 * @link https://www.php.net/manual/en/function.sodium-crypto-stream.php
 * @param int $length
 * @param string $nonce
 * @param string $key
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_stream(
    int $length,
    string $nonce,
    string $key
): string {}

/**
 * Encrypt a message using a stream cipher
 * Xsalsa20
 * @link https://www.php.net/manual/en/function.sodium-crypto-stream-xor.php
 * @param string $message
 * @param string $nonce
 * @param string $key
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_stream_xor(
    string $message,
    string $nonce,
    string $key
): string {}

/**
 * Generate a string of random bytes
 * /dev/urandom
 *
 * @param int $length
 * @return string|false
 * @since 7.2
 */
function sodium_randombytes_buf(int $length): string {}

/**
 * Generate a 16-bit integer
 * /dev/urandom
 *
 * @return int
 * @since 7.2
 */
function sodium_randombytes_random16(): int {}

/**
 * Generate an unbiased random integer between 0 and a specified value
 * /dev/urandom
 *
 * @param int $upperBoundNonInclusive
 * @return int
 * @since 7.2
 */
function sodium_randombytes_uniform(int $upperBoundNonInclusive): int {}

/**
 * Convert to hex without side-chanels
 * @link https://www.php.net/manual/en/function.sodium-bin2hex.php
 * @param string $string
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_bin2hex(string $string): string {}

/**
 * Compare two strings in constant time
 * @link https://www.php.net/manual/en/function.sodium-compare.php
 * @param string $string1
 * @param string $string2
 * @return int
 * @throws SodiumException
 * @since 7.2
 */
function sodium_compare(string $string1, string $string2): int {}

/**
 * Convert from hex without side-chanels
 * @link https://www.php.net/manual/en/function.sodium-hex2bin.php
 * @param string $string
 * @param string $ignore
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_hex2bin(string $string, string $ignore = ''): string {}

/**
 * Increment a string in little-endian
 * @link https://www.php.net/manual/en/function.sodium-increment.php
 * @param string &$string
 * @return void
 * @throws SodiumException
 * @since 7.2
 */
function sodium_increment(string &$string): void {}

/**
 * Add the right operand to the left
 * @link https://www.php.net/manual/en/function.sodium-add.php
 * @param string &$string1
 * @param string $string2
 * @throws SodiumException
 * @since 7.2
 */
function sodium_add(string &$string1, string $string2): void {}

/**
 * Get the true major version of libsodium
 * @return int
 * @since 7.2
 */
function sodium_library_version_major(): int {}

/**
 * Get the true minor version of libsodium
 * @return int
 * @since 7.2
 */
function sodium_library_version_minor(): int {}

/**
 * Compare two strings in constant time
 * @link https://www.php.net/manual/en/function.sodium-memcmp.php
 * @param string $string1
 * @param string $string2
 * @return int
 * @throws SodiumException
 * @since 7.2
 */
function sodium_memcmp(string $string1, string $string2): int {}

/**
 * Wipe a buffer
 * @link https://www.php.net/manual/en/function.sodium-memzero.php
 * @param string &$string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_memzero(string &$string): void {}

/**
 * Get the version string
 *
 * @return string
 * @since 7.2
 */
function sodium_version_string(): string {}

/**
 * Scalar multiplication of the base point and your key
 * @link https://www.php.net/manual/en/function.sodium-crypto-scalarmult-base
 * @param string $secret_key
 * @return string
 * @throws SodiumException
 * @since 7.2
 */
function sodium_crypto_scalarmult_base(
    string $secret_key,
    #[PhpStormStubsElementAvailable(from: '7.2', to: '7.4')] $string_2
): string {}

/**
 * Creates a random key
 *
 * It is equivalent to calling random_bytes() but improves code clarity and can
 * prevent misuse by ensuring that the provided key length is always be correct.
 *
 * @since 7.2
 * @see https://secure.php.net/manual/en/function.sodium-crypto-secretbox-keygen.php
 */
function sodium_crypto_secretbox_keygen(): string {}

/**
 * Creates a random key
 *
 * It is equivalent to calling random_bytes() but improves code clarity and can
 * prevent misuse by ensuring that the provided key length is always be correct.
 *
 * @since 7.2
 * @see https://secure.php.net/manual/en/function.sodium-crypto-aead-aes256gcm-keygen.php
 */
function sodium_crypto_aead_aes256gcm_keygen(): string {}

/**
 * Creates a random key
 * It is equivalent to calling random_bytes() but improves code clarity and can
 * prevent misuse by ensuring that the provided key length is always be correct.
 *
 * @since 7.2
 * @see https://secure.php.net/manual/en/function.sodium-crypto-aead-chacha20poly1305-keygen.php
 */
function sodium_crypto_aead_chacha20poly1305_keygen(): string {}

/**
 * Creates a random key
 *
 * It is equivalent to calling random_bytes() but improves code clarity and can
 * prevent misuse by ensuring that the provided key length is always be correct.
 *
 * @since 7.2
 * @see https://secure.php.net/manual/en/function.sodium-crypto-aead-chacha20poly1305-ietf-keygen.php
 */
function sodium_crypto_aead_chacha20poly1305_ietf_keygen(): string {}

/**
 * @param string $ciphertext
 * @param string $additional_data
 * @param string $nonce
 * @param string $key
 * @return string|false
 * @throws SodiumException
 * @since 7.2
 * @see https://www.php.net/manual/en/function.sodium-crypto-aead-xchacha20poly1305-ietf-decrypt.php
 */
function sodium_crypto_aead_xchacha20poly1305_ietf_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string|false {}

/**
 * @param string $message
 * @param string $additional_data
 * @param string $nonce
 * @param string $key
 * @return string
 * @throws SodiumException
 * @since 7.2
 * https://www.php.net/manual/en/function.sodium-crypto-aead-xchacha20poly1305-ietf-encrypt.php
 */
function sodium_crypto_aead_xchacha20poly1305_ietf_encrypt(string $message, string $additional_data, string $nonce, string $key): string {}

/**
 * @since 7.2
 * @see https://www.php.net/manual/en/function.sodium-crypto-aead-xchacha20poly1305-ietf-keygen.php
 */
function sodium_crypto_aead_xchacha20poly1305_ietf_keygen(): string {}

/**
 * @param string $password
 * @param int $opslimit
 * @param int $memlimit
 * @return bool
 * @since 7.2
 * @see https://www.php.net/manual/en/function.sodium-crypto-pwhash-str-needs-rehash.php
 */
function sodium_crypto_pwhash_str_needs_rehash(string $password, int $opslimit, int $memlimit): bool {}

/**
 * @since 7.2
 * @see https://www.php.net/manual/en/function.sodium-crypto-secretstream-xchacha20poly1305-keygen.php
 */
function sodium_crypto_secretstream_xchacha20poly1305_keygen(): string {}

/**
 * @param string $key
 * @return array
 * @throws SodiumException
 * @since 7.2
 * @see https://www.php.net/manual/en/function.sodium-crypto-secretstream-xchacha20poly1305-init-push.php
 */
function sodium_crypto_secretstream_xchacha20poly1305_init_push(string $key): array {}

#[PhpStormStubsElementAvailable('7.2')]
function sodium_crypto_secretstream_xchacha20poly1305_push(string &$state, #[\SensitiveParameter] string $message, string $additional_data = "", int $tag = SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_MESSAGE): string {}

/**
 * @param string $header
 * @param string $key
 * @return string
 * @throws SodiumException
 * @since 7.2
 * @see https://www.php.net/manual/en/function.sodium-crypto-secretstream-xchacha20poly1305-init-pull.php
 */
function sodium_crypto_secretstream_xchacha20poly1305_init_pull(string $header, string $key): string {}

#[PhpStormStubsElementAvailable('7.2')]
function sodium_crypto_secretstream_xchacha20poly1305_pull(string &$state, string $ciphertext, string $additional_data = ""): array|false {}

/**
 * @param string &$state
 * @throws SodiumException
 * @since 7.2
 * @see https://www.php.net/manual/en/function.sodium-crypto-secretstream-xchacha20poly1305-rekey.php
 */
function sodium_crypto_secretstream_xchacha20poly1305_rekey(string &$state): void {}

/**
 * @param string $string
 * @param int $id
 * @return string
 * @throws SodiumException
 * @since 7.2
 * @see https://www.php.net/manual/en/function.sodium-bin2base64.php
 */
function sodium_bin2base64(string $string, int $id): string {}

/**
 * @param string $string
 * @param int $id
 * @param string $ignore
 * @throws SodiumException
 * @since 7.2
 * @see https://www.php.net/manual/en/function.sodium-base642bin.php
 * @return string
 */
function sodium_base642bin(string $string, int $id, string $ignore = ''): string {}

class SodiumException extends Exception {}
<?php

// Start of SimpleXML v.0.1
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;

/**
 * Represents an element in an XML document.
 * @link https://php.net/manual/en/class.simplexmlelement.php
 */
class SimpleXMLElement implements Traversable, ArrayAccess, Countable, Iterator, Stringable, RecursiveIterator
{
    /**
     * Creates a new SimpleXMLElement object
     * @link https://php.net/manual/en/simplexmlelement.construct.php
     * @param string $data A well-formed XML string or the path or URL to an XML document if data_is_url is TRUE.
     * @param int $options Optionally used to specify additional Libxml parameters.
     * @param bool $dataIsURL By default, data_is_url is FALSE.
     * Use TRUE to specify that data is a path or URL to an XML document instead of string data.
     * @param string $namespaceOrPrefix Namespace prefix or URI.
     * @param bool $isPrefix TRUE if ns is a prefix, FALSE if it's a URI; defaults to FALSE.
     * @throws Exception if the XML data could not be parsed.
     * @since 5.0.1
     */
    #[Pure]
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = 0,
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $dataIsURL = false,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespaceOrPrefix = "",
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $isPrefix = false
    ) {}

    /**
     * Provides access to element's children
     * private Method not callable directly, stub exists for typehint only
     * @param string $name child name
     * @return static
     */
    private function __get($name) {}

    /**
     * Return a well-formed XML string based on SimpleXML element
     * @link https://php.net/manual/en/simplexmlelement.asxml.php
     * @param string $filename [optional] <p>
     * If specified, the function writes the data to the file rather than
     * returning it.
     * </p>
     * @return string|bool If the <i>filename</i> isn't specified, this function
     * returns a string on success and <b>FALSE</b> on error. If the
     * parameter is specified, it returns <b>TRUE</b> if the file was written
     * successfully and <b>FALSE</b> otherwise.
     * @since 5.0.1
     */
    #[TentativeType]
    public function asXML(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $filename = null): string|bool {}

    /**
     * Alias of <b>SimpleXMLElement::asXML</b>
     * Return a well-formed XML string based on SimpleXML element
     * @link https://php.net/manual/en/simplexmlelement.savexml.php
     * @param string $filename [optional] <p>
     * If specified, the function writes the data to the file rather than
     * returning it.
     * </p>
     * @return string|bool If the <i>filename</i> isn't specified, this function
     * returns a string on success and false on error. If the
     * parameter is specified, it returns true if the file was written
     * successfully and false otherwise.
     */
    #[TentativeType]
    public function saveXML(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $filename = null): string|bool {}

    /**
     * Runs XPath query on XML data
     * @link https://php.net/manual/en/simplexmlelement.xpath.php
     * @param string $expression <p>
     * An XPath path
     * </p>
     * @return static[]|false|null an array of SimpleXMLElement objects or <b>FALSE</b> in
     * case of an error.
     */
    #[TentativeType]
    public function xpath(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $expression): array|false|null {}

    /**
     * Creates a prefix/ns context for the next XPath query
     * @link https://php.net/manual/en/simplexmlelement.registerxpathnamespace.php
     * @param string $prefix <p>
     * The namespace prefix to use in the XPath query for the namespace given in
     * <i>ns</i>.
     * </p>
     * @param string $namespace <p>
     * The namespace to use for the XPath query. This must match a namespace in
     * use by the XML document or the XPath query using
     * <i>prefix</i> will not return any results.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function registerXPathNamespace(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $prefix,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace
    ): bool {}

    /**
     * Identifies an element's attributes
     * @link https://php.net/manual/en/simplexmlelement.attributes.php
     * @param string $namespaceOrPrefix [optional] <p>
     * An optional namespace for the retrieved attributes
     * </p>
     * @param bool $isPrefix [optional] <p>
     * Default to <b>FALSE</b>
     * </p>
     * @return static|null a <b>SimpleXMLElement</b> object that can be
     * iterated over to loop through the attributes on the tag.
     * </p>
     * <p>
     * Returns <b>NULL</b> if called on a <b>SimpleXMLElement</b>
     * object that already represents an attribute and not a tag.
     * @since 5.0.1
     */
    #[TentativeType]
    public function attributes(
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespaceOrPrefix = null,
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $isPrefix = false
    ): ?static {}

    /**
     * Finds children of given node
     * @link https://php.net/manual/en/simplexmlelement.children.php
     * @param string $namespaceOrPrefix [optional] <p>
     * An XML namespace.
     * </p>
     * @param bool $isPrefix [optional] <p>
     * If <i>is_prefix</i> is <b>TRUE</b>,
     * <i>ns</i> will be regarded as a prefix. If <b>FALSE</b>,
     * <i>ns</i> will be regarded as a namespace
     * URL.
     * </p>
     * @return static|null a <b>SimpleXMLElement</b> element, whether the node
     * has children or not.
     * @since 5.0.1
     */
    #[Pure]
    #[TentativeType]
    public function children(
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespaceOrPrefix = null,
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $isPrefix = false
    ): ?static {}

    /**
     * Returns namespaces used in document
     * @link https://php.net/manual/en/simplexmlelement.getnamespaces.php
     * @param bool $recursive [optional] <p>
     * If specified, returns all namespaces used in parent and child nodes.
     * Otherwise, returns only namespaces used in root node.
     * </p>
     * @return array The getNamespaces method returns an array of
     * namespace names with their associated URIs.
     * @since 5.1.2
     */
    #[Pure]
    #[TentativeType]
    public function getNamespaces(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $recursive = false): array {}

    /**
     * Returns namespaces declared in document
     * @link https://php.net/manual/en/simplexmlelement.getdocnamespaces.php
     * @param bool $recursive [optional] <p>
     * If specified, returns all namespaces declared in parent and child nodes.
     * Otherwise, returns only namespaces declared in root node.
     * </p>
     * @param bool $fromRoot [optional] <p>
     * Allows you to recursively check namespaces under a child node instead of
     * from the root of the XML doc.
     * </p>
     * @return array The getDocNamespaces method returns an array
     * of namespace names with their associated URIs.
     * @since 5.1.2
     */
    #[Pure]
    #[TentativeType]
    public function getDocNamespaces(
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $recursive = false,
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $fromRoot = true
    ): array|false {}

    /**
     * Gets the name of the XML element
     * @link https://php.net/manual/en/simplexmlelement.getname.php
     * @return string The getName method returns as a string the
     * name of the XML tag referenced by the SimpleXMLElement object.
     * @since 5.1.3
     */
    #[Pure]
    #[TentativeType]
    public function getName(): string {}

    /**
     * Adds a child element to the XML node
     * @link https://php.net/manual/en/simplexmlelement.addchild.php
     * @param string $qualifiedName <p>
     * The name of the child element to add.
     * </p>
     * @param string $value [optional] <p>
     * If specified, the value of the child element.
     * </p>
     * @param string $namespace [optional] <p>
     * If specified, the namespace to which the child element belongs.
     * </p>
     * @return static|null The addChild method returns a SimpleXMLElement
     * object representing the child added to the XML node.
     * @since 5.1.3
     */
    #[TentativeType]
    public function addChild(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $value = null,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace = null
    ): ?static {}

    /**
     * Adds an attribute to the SimpleXML element
     * @link https://php.net/manual/en/simplexmlelement.addattribute.php
     * @param string $qualifiedName <p>
     * The name of the attribute to add.
     * </p>
     * @param string $value <p>
     * The value of the attribute.
     * </p>
     * @param string $namespace [optional] <p>
     * If specified, the namespace to which the attribute belongs.
     * </p>
     * @return void No value is returned.
     * @since 5.1.3
     */
    #[TentativeType]
    public function addAttribute(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName,
        #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $value = null,
        #[PhpStormStubsElementAvailable(from: '8.0')] string $value,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace = null
    ): void {}

    /**
     * Returns the string content
     * @link https://php.net/manual/en/simplexmlelement.tostring.php
     * @return string the string content on success or an empty string on failure.
     * @since 5.3
     */
    #[TentativeType]
    public function __toString(): string {}

    /**
     * Counts the children of an element
     * @link https://php.net/manual/en/simplexmlelement.count.php
     * @return int<0,max> the number of elements of an element.
     */
    #[Pure]
    #[TentativeType]
    public function count(): int {}

    /**
     * Class provides access to children by position, and attributes by name
     * private Method not callable directly, stub exists for typehint only
     * @param string|int $offset
     * @return bool true on success or false on failure.
     */
    #[Pure]
    public function offsetExists($offset) {}

    /**
     * Class provides access to children by position, and attributes by name
     * private Method not callable directly, stub exists for typehint only
     * @param string|int $offset
     * @return static Either a named attribute or an element from a list of children
     */
    #[Pure]
    public function offsetGet($offset) {}

    /**
     * Class provides access to children by position, and attributes by name
     * private Method not callable directly, stub exists for typehint only
     * @param string|int $offset
     * @param mixed $value
     * @return void
     */
    public function offsetSet($offset, $value) {}

    /**
     * Class provides access to children by position, and attributes by name
     * private Method not callable directly, stub exists for typehint only
     * @param string|int $offset
     * @return void
     */
    public function offsetUnset($offset) {}

    /**
     * Rewind to the first element
     * @link https://php.net/manual/en/simplexmliterator.rewind.php
     * @return void No value is returned.
     */
    #[TentativeType]
    public function rewind(): void {}

    /**
     * Check whether the current element is valid
     * @link https://php.net/manual/en/simplexmliterator.valid.php
     * @return bool <b>TRUE</b> if the current element is valid, otherwise <b>FALSE</b>
     */
    #[Pure]
    #[TentativeType]
    public function valid(): bool {}

    /**
     * Returns the current element
     * @link https://php.net/manual/en/simplexmliterator.current.php
     * @return static|null the current element as a <b>SimpleXMLElement</b> object or <b>NULL</b> on failure.
     */
    #[Pure]
    #[TentativeType]
    public function current(): ?static {}

    /**
     * Return current key
     * @link https://php.net/manual/en/simplexmliterator.key.php
     * @return string|false the XML tag name of the element referenced by the current <b>SimpleXMLIterator</b> object
     */
    #[TentativeType]
    #[LanguageLevelTypeAware(['8.0' => 'string'], default: 'string|false')]
    public function key() {}

    /**
     * Move to next element
     * @link https://php.net/manual/en/simplexmliterator.next.php
     * @return void No value is returned.
     */
    #[TentativeType]
    public function next(): void {}

    /**
     * @return bool
     * @since 8.0
     */
    #[Pure]
    #[TentativeType]
    public function hasChildren(): bool {}

    /**
     * @since 8.0
     */
    #[Pure]
    #[TentativeType]
    public function getChildren(): ?SimpleXMLElement {}
}

/**
 * The SimpleXMLIterator provides recursive iteration over all nodes of a <b>SimpleXMLElement</b> object.
 * @link https://php.net/manual/en/class.simplexmliterator.php
 */
class SimpleXMLIterator extends SimpleXMLElement implements RecursiveIterator, Countable, Stringable
{
    /**
     * Rewind to the first element
     * @link https://php.net/manual/en/simplexmliterator.rewind.php
     * @return void No value is returned.
     */
    public function rewind() {}

    /**
     * Check whether the current element is valid
     * @link https://php.net/manual/en/simplexmliterator.valid.php
     * @return bool <b>TRUE</b> if the current element is valid, otherwise <b>FALSE</b>
     */
    #[Pure]
    public function valid() {}

    /**
     * Returns the current element
     * @link https://php.net/manual/en/simplexmliterator.current.php
     * @return static|null the current element as a <b>SimpleXMLIterator</b> object or <b>NULL</b> on failure.
     */
    #[Pure]
    public function current() {}

    /**
     * Return current key
     * @link https://php.net/manual/en/simplexmliterator.key.php
     * @return string|false the XML tag name of the element referenced by the current <b>SimpleXMLIterator</b> object or <b>FALSE</b>
     */
    public function key() {}

    /**
     * Move to next element
     * @link https://php.net/manual/en/simplexmliterator.next.php
     * @return void No value is returned.
     */
    public function next() {}

    /**
     * Checks whether the current element has sub elements.
     * @link https://php.net/manual/en/simplexmliterator.haschildren.php
     * @return bool <b>TRUE</b> if the current element has sub-elements, otherwise <b>FALSE</b>
     */
    #[Pure]
    public function hasChildren() {}

    /**
     * Returns the sub-elements of the current element
     * @link https://php.net/manual/en/simplexmliterator.getchildren.php
     * @return SimpleXMLIterator a <b>SimpleXMLIterator</b> object containing
     * the sub-elements of the current element.
     */
    #[Pure]
    public function getChildren() {}

    /**
     * Returns the string content
     * @link https://php.net/manual/en/simplexmlelement.tostring.php
     * @return string the string content on success or an empty string on failure.
     * @since 5.3
     */
    public function __toString() {}

    /**
     * Counts the children of an element
     * @link https://php.net/manual/en/simplexmlelement.count.php
     * @return int the number of elements of an element.
     */
    #[Pure]
    public function count() {}
}

/**
 * Interprets an XML file into an object
 * @link https://php.net/manual/en/function.simplexml-load-file.php
 * @param string $filename <p>
 * Path to the XML file
 * </p>
 * <p>
 * Libxml 2 unescapes the URI, so if you want to pass e.g.
 * b&c as the URI parameter a,
 * you have to call
 * simplexml_load_file(rawurlencode('https://example.com/?a=' .
 * urlencode('b&c'))). Since PHP 5.1.0 you don't need to do
 * this because PHP will do it for you.
 * </p>
 * @param string|null $class_name [optional] <p>
 * You may use this optional parameter so that
 * <b>simplexml_load_file</b> will return an object of
 * the specified class. That class should extend the
 * SimpleXMLElement class.
 * </p>
 * @param int $options [optional] <p>
 * Since PHP 5.1.0 and Libxml 2.6.0, you may also use the
 * <i>options</i> parameter to specify additional Libxml parameters.
 * </p>
 * @param string $namespace_or_prefix [optional] <p>
 * Namespace prefix or URI.
 * </p>
 * @param bool $is_prefix [optional] <p>
 * <b>TRUE</b> if <i>ns</i> is a prefix, <b>FALSE</b> if it's a URI;
 * defaults to <b>FALSE</b>.
 * </p>
 * @return SimpleXMLElement|false an object of class SimpleXMLElement with
 * properties containing the data held within the XML document, or <b>FALSE</b> on failure.
 */
function simplexml_load_file(string $filename, ?string $class_name = "SimpleXMLElement", int $options = 0, string $namespace_or_prefix = "", bool $is_prefix = false): SimpleXMLElement|false {}

/**
 * Interprets a string of XML into an object
 * @link https://php.net/manual/en/function.simplexml-load-string.php
 * @param string $data <p>
 * A well-formed XML string
 * </p>
 * @param string|null $class_name [optional] <p>
 * You may use this optional parameter so that
 * <b>simplexml_load_string</b> will return an object of
 * the specified class. That class should extend the
 * SimpleXMLElement class.
 * </p>
 * @param int $options [optional] <p>
 * Since PHP 5.1.0 and Libxml 2.6.0, you may also use the
 * <i>options</i> parameter to specify additional Libxml parameters.
 * </p>
 * @param string $namespace_or_prefix [optional] <p>
 * Namespace prefix or URI.
 * </p>
 * @param bool $is_prefix [optional] <p>
 * <b>TRUE</b> if <i>ns</i> is a prefix, <b>FALSE</b> if it's a URI;
 * defaults to <b>FALSE</b>.
 * </p>
 * @return SimpleXMLElement|false an object of class SimpleXMLElement with
 * properties containing the data held within the xml document, or <b>FALSE</b> on failure.
 */
function simplexml_load_string(string $data, ?string $class_name = "SimpleXMLElement", int $options = 0, string $namespace_or_prefix = "", bool $is_prefix = false): SimpleXMLElement|false {}

/**
 * Get a SimpleXMLElement object from a DOM node.
 * @link https://php.net/manual/en/function.simplexml-import-dom.php
 * @param SimpleXMLElement|DOMNode $node <p>
 * A DOM Element node
 * </p>
 * @param string|null $class_name [optional] <p>
 * You may use this optional parameter so that
 * <b>simplexml_import_dom</b> will return an object of
 * the specified class. That class should extend the
 * SimpleXMLElement class.
 * </p>
 * @return SimpleXMLElement|null a SimpleXMLElement or <b>FALSE</b> on failure.
 */
function simplexml_import_dom(SimpleXMLElement|DOMNode $node, ?string $class_name = "SimpleXMLElement"): ?SimpleXMLElement {}

// End of SimpleXML v.0.1
<?php

// Start of ldap v.
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware as PhpVersionAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable as Available;
use LDAP\Result;

/**
 * PASSWD extended operation helper
 * @link https://www.php.net/manual/en/function.ldap-exop-passwd.php
 * @param resource $ldap An LDAP link identifier, returned by ldap_connect().
 * @param string $user dn of the user to change the password of.
 * @param string $old_password The old password of this user. May be omitted depending of server configuration.
 * @param string $new_password The new password for this user. May be omitted or empty to have a generated password.
 * @param array &$controls If provided, a password policy request control is send with the request and this is filled with an array of LDAP Controls returned with the request.
 * @return string|bool Returns the generated password if newpw is empty or omitted. Otherwise returns TRUE on success and FALSE on failure.
 * @since 7.2
 */
function ldap_exop_passwd(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    #[Available(from: '7.1', to: '7.1')] string $user = "",
    #[Available(from: '7.2', to: '7.2')] string $user,
    #[Available(from: '7.3')] string $user = "",
    #[Available(from: '7.1', to: '7.1')] string $old_password = "",
    #[Available(from: '7.2', to: '7.2')] string $old_password,
    #[Available(from: '7.3')] string $old_password = "",
    #[Available(from: '7.1', to: '7.1')] string $new_password = "",
    #[Available(from: '7.2', to: '7.2')] string $new_password,
    #[Available(from: '7.3')] string $new_password = "",
    #[Available(from: '7.3')] &$controls = null
): string|bool {}

/**
 * Refresh extended operation helper
 * @link https://www.php.net/manual/en/function.ldap-exop-refresh.php
 * @param resource $ldap An LDAP link identifier, returned by ldap_connect().
 * @param string $dn dn of the entry to refresh.
 * @param int $ttl $ttl Time in seconds (between 1 and 31557600) that the client requests that the entry exists in the directory before being automatically removed.
 * @return int|false From RFC: The responseTtl field is the time in seconds which the server chooses to have as the time-to-live field for that entry. It must not be any smaller than that which the client requested, and it may be larger. However, to allow servers to maintain a relatively accurate directory, and to prevent clients from abusing the dynamic extensions, servers are permitted to shorten a client-requested time-to-live value, down to a minimum of 86400 seconds (one day). FALSE will be returned on error.
 * @since 7.3
 */
function ldap_exop_refresh(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $dn, int $ttl): int|false {}

/**
 * WHOAMI extended operation helper
 * @link https://www.php.net/manual/en/function.ldap-exop-whoami.php
 * @param resource $ldap An LDAP link identifier, returned by ldap_connect().
 * @return string|false The data returned by the server, or FALSE on error.
 * @since 7.2
 */
function ldap_exop_whoami(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap): string|false {}

/**
 * Performs an extended operation on the specified link with reqoid the OID of the operation and reqdata the data.
 * @link https://www.php.net/manual/en/function.ldap-exop.php
 * @param resource $ldap An LDAP link identifier, returned by ldap_connect().
 * @param string $request_oid The extended operation request OID. You may use one of LDAP_EXOP_START_TLS, LDAP_EXOP_MODIFY_PASSWD, LDAP_EXOP_REFRESH, LDAP_EXOP_WHO_AM_I, LDAP_EXOP_TURN, or a string with the OID of the operation you want to send.
 * @param string|null $request_data [optional] The extended operation request data. May be NULL for some operations like LDAP_EXOP_WHO_AM_I, may also need to be BER encoded.
 * @param array|null $controls If provided, a password policy request control is send with the request and this is filled with an array of LDAP Controls returned with the request.
 * @param string &$response_data [optional] Will be filled with the extended operation response data if provided. If not provided you may use ldap_parse_exop on the result object later to get this data.
 * @param string &$response_oid [optional] Will be filled with the response OID if provided, usually equal to the request OID.
 * @return resource|bool When used with retdata, returns TRUE on success or FALSE on error. When used without retdata, returns a result identifier or FALSE on error.
 * @since 7.2
 */
#[PhpVersionAware(['8.1' => 'LDAP\Result|bool'], default: 'resource|bool')]
function ldap_exop(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $request_oid, ?string $request_data, #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null, &$response_data, &$response_oid) {}

/**
 * Parse LDAP extended operation data from result object result
 * @link https://www.php.net/manual/en/function.ldap-parse-exop.php
 * @param resource $ldap An LDAP link identifier, returned by ldap_connect().
 * @param resource $result An LDAP result resource, returned by ldap_exop().
 * @param string &$response_data  Will be filled by the response data.
 * @param string &$response_oid Will be filled by the response OID.
 * @return bool Returns TRUE on success or FALSE on failure.
 * @since 7.2
 */
function ldap_parse_exop(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    #[PhpVersionAware(['8.1' => 'LDAP\Result'], default: 'resource')] $result,
    #[Available(from: '7.2', to: '7.4')] &$response_data,
    #[Available(from: '8.0')] &$response_data = null,
    #[Available(from: '7.2', to: '7.4')] &$response_oid,
    #[Available(from: '8.0')] &$response_oid = null
): bool {}

/**
 * Translate 8859 characters to t61 characters
 * @link https://www.php.net/manual/en/function.ldap-8859-to-t61.php
 * @param string $value
 * @return string
 */
function ldap_8859_to_t61(string $value): string {}

/**
 * Translate t61 characters to 8859 characters
 * @link https://www.php.net/manual/en/function.ldap-t61-to-8859.php
 * @param string $value
 * @return string
 */
function ldap_t61_to_8859(string $value): string {}

/**
 * Connect to an LDAP server
 * @link https://php.net/manual/en/function.ldap-connect.php
 * @param string|null $uri [optional] <p>
 * If you are using OpenLDAP 2.x.x you can specify a URL instead of the
 * hostname. To use LDAP with SSL, compile OpenLDAP 2.x.x with SSL
 * support, configure PHP with SSL, and set this parameter as
 * ldaps://hostname/.
 * </p>
 * @param int $port [optional] <p>
 * The port to connect to. Not used when using URLs.
 * </p>
 * @return resource|false a positive LDAP link identifier on success, or <b>FALSE</b> on error.
 * When OpenLDAP 2.x.x is used, <b>ldap_connect</b> will always
 * return a resource as it does not actually connect but just
 * initializes the connecting parameters. The actual connect happens with
 * the next calls to ldap_* funcs, usually with
 * <b>ldap_bind</b>.
 * </p>
 * <p>
 * If no arguments are specified then the link identifier of the already
 * opened link will be returned.
 */
#[PhpVersionAware(['8.1' => 'LDAP\Connection|false'], default: 'resource|false')]
function ldap_connect(?string $uri, int $port = 389) {}

/**
 * Alias of <b>ldap_unbind</b>
 * @link https://php.net/manual/en/function.ldap-close.php
 * @param resource $ldap
 * @return bool
 */
function ldap_close(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap): bool {}

/**
 * Bind to LDAP directory
 * @link https://php.net/manual/en/function.ldap-bind.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param string|null $dn [optional]
 * @param string|null $password [optional]
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function ldap_bind(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, ?string $dn, ?string $password): bool {}

/**
 * Bind to LDAP directory
 * Does the same thing as ldap_bind() but returns the LDAP result resource to be parsed with ldap_parse_result().
 * @link https://php.net/manual/en/function.ldap-bind.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param string|null $dn [optional]
 * @param string|null $password [optional]
 * @param array|null $controls Array of LDAP Controls to send with the request.
 * @return resource|false
 * @since 7.3
 */
#[PhpVersionAware(['8.1' => 'LDAP\Result|false'], default: 'resource|false')]
function ldap_bind_ext(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    ?string $dn,
    ?string $password,
    #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null
) {}

/**
 * Bind to LDAP directory using SASL
 * @link https://php.net/manual/en/function.ldap-sasl-bind.php
 * @param resource $ldap
 * @param string $binddn [optional]
 * @param string $password [optional]
 * @param string $sasl_mech [optional]
 * @param string $sasl_realm [optional]
 * @param string $sasl_authc_id [optional]
 * @param string $sasl_authz_id [optional]
 * @param string $props [optional]
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function ldap_sasl_bind(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, $binddn = null, $password = null, $sasl_mech = null, $sasl_realm = null, $sasl_authc_id = null, $sasl_authz_id = null, $props = null): bool {}

/**
 * Unbind from LDAP directory
 * @link https://php.net/manual/en/function.ldap-unbind.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function ldap_unbind(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap): bool {}

/**
 * Read an entry
 * @link https://php.net/manual/en/function.ldap-read.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param array|array|string $base <p>
 * The base DN for the directory.
 * </p>
 * @param array|string $filter <p>
 * An empty filter is not allowed. If you want to retrieve absolutely all
 * information for this entry, use a filter of
 * objectClass=*. If you know which entry types are
 * used on the directory server, you might use an appropriate filter such
 * as objectClass=inetOrgPerson.
 * </p>
 * @param array $attributes <p>
 * An array of the required attributes, e.g. array("mail", "sn", "cn").
 * Note that the "dn" is always returned irrespective of which attributes
 * types are requested.
 * </p>
 * <p>
 * Using this parameter is much more efficient than the default action
 * (which is to return all attributes and their associated values).
 * The use of this parameter should therefore be considered good
 * practice.
 * </p>
 * @param int $attributes_only <p>
 * Should be set to 1 if only attribute types are wanted. If set to 0
 * both attributes types and attribute values are fetched which is the
 * default behaviour.
 * </p>
 * @param int $sizelimit [optional] <p>
 * Enables you to limit the count of entries fetched. Setting this to 0
 * means no limit.
 * </p>
 * <p>
 * This parameter can NOT override server-side preset sizelimit. You can
 * set it lower though.
 * </p>
 * <p>
 * Some directory server hosts will be configured to return no more than
 * a preset number of entries. If this occurs, the server will indicate
 * that it has only returned a partial results set. This also occurs if
 * you use this parameter to limit the count of fetched entries.
 * </p>
 * @param int $timelimit [optional] <p>
 * Sets the number of seconds how long is spend on the search. Setting
 * this to 0 means no limit.
 * </p>
 * <p>
 * This parameter can NOT override server-side preset timelimit. You can
 * set it lower though.
 * </p>
 * @param int $deref <p>
 * Specifies how aliases should be handled during the search. It can be
 * one of the following:
 * <b>LDAP_DEREF_NEVER</b> - (default) aliases are never
 * dereferenced.</p>
 * @param array|null $controls Array of LDAP Controls to send with the request.
 * @return resource|false a search result identifier or <b>FALSE</b> on error.
 */
#[PhpVersionAware(['8.1' => 'LDAP\Result|array|false'], default: 'resource|false')]
function ldap_read(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    array|string $base,
    array|string $filter,
    array $attributes = [],
    int $attributes_only = 0,
    int $sizelimit = -1,
    int $timelimit = -1,
    int $deref = 0,
    #[Available(from: '7.3')] #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null
) {}

/**
 * Single-level search
 * @link https://php.net/manual/en/function.ldap-list.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param array|array|string $base <p>
 * The base DN for the directory.
 * </p>
 * @param array|string $filter
 * @param array $attributes <p>
 * An array of the required attributes, e.g. array("mail", "sn", "cn").
 * Note that the "dn" is always returned irrespective of which attributes
 * types are requested.
 * </p>
 * <p>
 * Using this parameter is much more efficient than the default action
 * (which is to return all attributes and their associated values).
 * The use of this parameter should therefore be considered good
 * practice.
 * </p>
 * @param int $attributes_only <p>
 * Should be set to 1 if only attribute types are wanted. If set to 0
 * both attributes types and attribute values are fetched which is the
 * default behaviour.
 * </p>
 * @param int $sizelimit [optional] <p>
 * Enables you to limit the count of entries fetched. Setting this to 0
 * means no limit.
 * </p>
 * <p>
 * This parameter can NOT override server-side preset sizelimit. You can
 * set it lower though.
 * </p>
 * <p>
 * Some directory server hosts will be configured to return no more than
 * a preset number of entries. If this occurs, the server will indicate
 * that it has only returned a partial results set. This also occurs if
 * you use this parameter to limit the count of fetched entries.
 * </p>
 * @param int $timelimit [optional] <p>
 * Sets the number of seconds how long is spend on the search. Setting
 * this to 0 means no limit.
 * </p>
 * <p>
 * This parameter can NOT override server-side preset timelimit. You can
 * set it lower though.
 * </p>
 * @param int $deref <p>
 * Specifies how aliases should be handled during the search. It can be
 * one of the following:
 * <b>LDAP_DEREF_NEVER</b> - (default) aliases are never
 * dereferenced.</p>
 * @param array|null $controls Array of LDAP Controls to send with the request.
 * @return resource|false a search result identifier or <b>FALSE</b> on error.
 */
#[PhpVersionAware(['8.1' => 'LDAP\Result|array|false'], default: 'resource|false')]
function ldap_list(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    array|string $base,
    array|string $filter,
    array $attributes = [],
    int $attributes_only = 0,
    int $sizelimit = -1,
    int $timelimit = -1,
    int $deref = 0,
    #[Available(from: '7.3')] #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null
) {}

/**
 * Search LDAP tree
 * @link https://php.net/manual/en/function.ldap-search.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param array|string $base <p>
 * The base DN for the directory.
 * </p>
 * @param array|string $filter <p>
 * The search filter can be simple or advanced, using boolean operators in
 * the format described in the LDAP documentation (see the Netscape Directory SDK for full
 * information on filters).
 * </p>
 * @param array $attributes <p>
 * An array of the required attributes, e.g. array("mail", "sn", "cn").
 * Note that the "dn" is always returned irrespective of which attributes
 * types are requested.
 * </p>
 * <p>
 * Using this parameter is much more efficient than the default action
 * (which is to return all attributes and their associated values).
 * The use of this parameter should therefore be considered good
 * practice.
 * </p>
 * @param int $attributes_only <p>
 * Should be set to 1 if only attribute types are wanted. If set to 0
 * both attributes types and attribute values are fetched which is the
 * default behaviour.
 * </p>
 * @param int $sizelimit [optional] <p>
 * Enables you to limit the count of entries fetched. Setting this to 0
 * means no limit.
 * </p>
 * <p>
 * This parameter can NOT override server-side preset sizelimit. You can
 * set it lower though.
 * </p>
 * <p>
 * Some directory server hosts will be configured to return no more than
 * a preset number of entries. If this occurs, the server will indicate
 * that it has only returned a partial results set. This also occurs if
 * you use this parameter to limit the count of fetched entries.
 * </p>
 * @param int $timelimit [optional] <p>
 * Sets the number of seconds how long is spend on the search. Setting
 * this to 0 means no limit.
 * </p>
 * <p>
 * This parameter can NOT override server-side preset timelimit. You can
 * set it lower though.
 * </p>
 * @param int $deref <p>
 * Specifies how aliases should be handled during the search. It can be
 * one of the following:
 * <b>LDAP_DEREF_NEVER</b> - (default) aliases are never
 * dereferenced.</p>
 * @param array|null $controls Array of LDAP Controls to send with the request.
 * @return resource|false a search result identifier or <b>FALSE</b> on error.
 */
#[PhpVersionAware(['8.1' => 'LDAP\Result|array|false'], default: 'resource|false')]
function ldap_search(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    array|string $base,
    array|string $filter,
    array $attributes = [],
    int $attributes_only = 0,
    int $sizelimit = -1,
    int $timelimit = -1,
    int $deref = 0,
    #[Available(from: '7.3')] #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null
) {}

/**
 * Free result memory
 * @link https://php.net/manual/en/function.ldap-free-result.php
 * @param resource|Result $result
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function ldap_free_result(
    #[Available(from: '5.3', to: '8.0')] $ldap,
    #[Available(from: '8.1')] Result $result
): bool {}

/**
 * Count the number of entries in a search
 * @link https://php.net/manual/en/function.ldap-count-entries.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param resource $result <p>
 * The internal LDAP result.
 * </p>
 * @return int|false number of entries in the result or <b>FALSE</b> on error.
 */
#[PhpVersionAware(["8.0" => "int"], default: "int|false")]
function ldap_count_entries(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    #[PhpVersionAware(['8.1' => 'LDAP\Result'], default: 'resource')] $result
) {}

/**
 * Return first result id
 * @link https://php.net/manual/en/function.ldap-first-entry.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param resource $result
 * @return resource|false the result entry identifier for the first entry on success and
 * <b>FALSE</b> on error.
 */
#[PhpVersionAware(['8.1' => 'LDAP\ResultEntry|false'], default: 'resource|false')]
function ldap_first_entry(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    #[PhpVersionAware(['8.1' => 'LDAP\Result'], default: 'resource')] $result
) {}

/**
 * Get next result entry
 * @link https://php.net/manual/en/function.ldap-next-entry.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param resource $entry
 * @return resource|false entry identifier for the next entry in the result whose entries
 * are being read starting with <b>ldap_first_entry</b>. If
 * there are no more entries in the result then it returns <b>FALSE</b>.
 */
#[PhpVersionAware(['8.1' => 'LDAP\ResultEntry|false'], default: 'resource|false')]
function ldap_next_entry(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    #[PhpVersionAware(['8.1' => 'LDAP\ResultEntry'], default: 'resource')] $entry
) {}

/**
 * Get all result entries
 * @link https://php.net/manual/en/function.ldap-get-entries.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param resource $result
 * @return array|false a complete result information in a multi-dimensional array on
 * success and <b>FALSE</b> on error.
 * </p>
 * <p>
 * The structure of the array is as follows.
 * The attribute index is converted to lowercase. (Attributes are
 * case-insensitive for directory servers, but not when used as
 * array indices.)
 * <pre>
 * return_value["count"] = number of entries in the result
 * return_value[0] : refers to the details of first entry
 * return_value[i]["dn"] = DN of the ith entry in the result
 * return_value[i]["count"] = number of attributes in ith entry
 * return_value[i][j] = NAME of the jth attribute in the ith entry in the result
 * return_value[i]["attribute"]["count"] = number of values for
 * attribute in ith entry
 * return_value[i]["attribute"][j] = jth value of attribute in ith entry
 * </pre>
 */
function ldap_get_entries(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    #[PhpVersionAware(['8.1' => 'LDAP\Result'], default: 'resource')] $result
): array|false {}

/**
 * Return first attribute
 * @link https://php.net/manual/en/function.ldap-first-attribute.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param resource $entry
 * @return string|false the first attribute in the entry on success and <b>FALSE</b> on
 * error.
 */
function ldap_first_attribute(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    #[PhpVersionAware(['8.1' => 'LDAP\ResultEntry'], default: 'resource')] $entry
): string|false {}

/**
 * Get the next attribute in result
 * @link https://php.net/manual/en/function.ldap-next-attribute.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param resource $entry
 * @return string|false the next attribute in an entry on success and <b>FALSE</b> on
 * error.
 */
function ldap_next_attribute(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    #[PhpVersionAware(['8.1' => 'LDAP\ResultEntry'], default: 'resource')] $entry
): string|false {}

/**
 * Get attributes from a search result entry
 * @link https://php.net/manual/en/function.ldap-get-attributes.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param resource $entry
 * @return array a complete entry information in a multi-dimensional array
 * on success and <b>FALSE</b> on error.
 */
function ldap_get_attributes(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    #[PhpVersionAware(['8.1' => 'LDAP\ResultEntry'], default: 'resource')] $entry
): array {}

/**
 * Get all values from a result entry
 * @link https://php.net/manual/en/function.ldap-get-values.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param resource $entry
 * @param string $attribute
 * @return array|false an array of values for the attribute on success and <b>FALSE</b> on
 * error. The number of values can be found by indexing "count" in the
 * resultant array. Individual values are accessed by integer index in the
 * array. The first index is 0.
 * </p>
 * <p>
 * LDAP allows more than one entry for an attribute, so it can, for example,
 * store a number of email addresses for one person's directory entry all
 * labeled with the attribute "mail"
 * return_value["count"] = number of values for attribute
 * return_value[0] = first value of attribute
 * return_value[i] = ith value of attribute
 */
function ldap_get_values(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    #[PhpVersionAware(['8.1' => 'LDAP\ResultEntry'], default: 'resource')] $entry,
    string $attribute
): array|false {}

/**
 * Get all binary values from a result entry
 * @link https://php.net/manual/en/function.ldap-get-values-len.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param resource $entry
 * @param string $attribute
 * @return array|false an array of values for the attribute on success and <b>FALSE</b> on
 * error. Individual values are accessed by integer index in the array. The
 * first index is 0. The number of values can be found by indexing "count"
 * in the resultant array.
 */
function ldap_get_values_len(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    #[PhpVersionAware(['8.1' => 'LDAP\ResultEntry'], default: 'resource')] $entry,
    string $attribute
): array|false {}

/**
 * Get the DN of a result entry
 * @link https://php.net/manual/en/function.ldap-get-dn.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param resource $entry
 * @return string|false the DN of the result entry and <b>FALSE</b> on error.
 */
function ldap_get_dn(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    #[PhpVersionAware(['8.1' => 'LDAP\ResultEntry'], default: 'resource')] $entry
): string|false {}

/**
 * Splits DN into its component parts
 * @link https://php.net/manual/en/function.ldap-explode-dn.php
 * @param string $dn <p>
 * The distinguished name of an LDAP entity.
 * </p>
 * @param int $with_attrib <p>
 * Used to request if the RDNs are returned with only values or their
 * attributes as well. To get RDNs with the attributes (i.e. in
 * attribute=value format) set <i>with_attrib</i> to 0
 * and to get only values set it to 1.
 * </p>
 * @return array|false an array of all DN components.
 * The first element in this array has count key and
 * represents the number of returned values, next elements are numerically
 * indexed DN components.
 */
#[ArrayShape(["count" => "int"])]
function ldap_explode_dn(string $dn, int $with_attrib): array|false {}

/**
 * Convert DN to User Friendly Naming format
 * @link https://php.net/manual/en/function.ldap-dn2ufn.php
 * @param string $dn <p>
 * The distinguished name of an LDAP entity.
 * </p>
 * @return string|false the user friendly name.
 */
function ldap_dn2ufn(string $dn): string|false {}

/**
 * Add entries to LDAP directory
 * @link https://php.net/manual/en/function.ldap-add.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param string $dn <p>
 * The distinguished name of an LDAP entity.
 * </p>
 * @param array $entry <p>
 * An array that specifies the information about the entry. The values in
 * the entries are indexed by individual attributes.
 * In case of multiple values for an attribute, they are indexed using
 * integers starting with 0.
 * <code>
 * $entree["attribut1"] = "value";
 * $entree["attribut2"][0] = "value1";
 * $entree["attribut2"][1] = "value2";
 * </code>
 * </p>
 * @param array|null $controls Array of LDAP Controls to send with the request.
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function ldap_add(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    string $dn,
    array $entry,
    #[Available(from: '7.3')] #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null
): bool {}

/**
 * Add entries to LDAP directory
 * Does the same thing as ldap_add() but returns the LDAP result resource to be parsed with ldap_parse_result().
 * @link https://www.php.net/manual/en/function.ldap-add-ext.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param string $dn <p>
 * The distinguished name of an LDAP entity.
 * </p>
 * @param array $entry <p>
 * An array that specifies the information about the entry. The values in
 * the entries are indexed by individual attributes.
 * In case of multiple values for an attribute, they are indexed using
 * integers starting with 0.
 * <code>
 * $entree["attribut1"] = "value";
 * $entree["attribut2"][0] = "value1";
 * $entree["attribut2"][1] = "value2";
 * </code>
 * </p>
 * @param array|null $controls Array of LDAP Controls to send with the request.
 * @return resource|false
 * @since 7.3
 */
#[PhpVersionAware(['8.1' => 'LDAP\Result|false'], default: 'resource|false')]
function ldap_add_ext(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    string $dn,
    array $entry,
    #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null
) {}

/**
 * Delete an entry from a directory
 * @link https://php.net/manual/en/function.ldap-delete.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param string $dn <p>
 * The distinguished name of an LDAP entity.
 * </p>
 * @param array|null $controls Array of LDAP Controls to send with the request.
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function ldap_delete(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    string $dn,
    #[Available(from: '7.3')] #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null
): bool {}

/**
 * Delete an entry from a directory
 * Does the same thing as ldap_delete() but returns the LDAP result resource to be parsed with ldap_parse_result().
 * @link https://php.net/manual/en/function.ldap-delete-ext.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param string $dn <p>
 * The distinguished name of an LDAP entity.
 * </p>
 * @param array|null $controls Array of LDAP Controls to send with the request.
 * @return resource|false
 * @since 7.3
 */
#[PhpVersionAware(['8.1' => 'LDAP\Result|false'], default: 'resource|false')]
function ldap_delete_ext(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    string $dn,
    #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null
) {}

/**
 * This function is an alias of: ldap_mod_replace().
 * Replace attribute values with new ones
 * @link https://www.php.net/manual/en/function.ldap-modify.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param string $dn <p>
 * The distinguished name of an LDAP entity.
 * </p>
 * @param array $entry
 * @param array|null $controls Array of LDAP Controls to send with the request.
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function ldap_modify(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    string $dn,
    array $entry,
    #[Available(from: '7.3')] #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null
): bool {}

/**
 * Add attribute values to current attributes
 * @link https://php.net/manual/en/function.ldap-mod-add.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param string $dn <p>
 * The distinguished name of an LDAP entity.
 * </p>
 * @param array $entry
 * @param array|null $controls Array of LDAP Controls to send with the request.
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function ldap_mod_add(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    string $dn,
    array $entry,
    #[Available(from: '7.3')] #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null
): bool {}

/**
 * Add attribute values to current attributes
 * Does the same thing as ldap_mod_add() but returns the LDAP result resource to be parsed with ldap_parse_result().
 * @link https://php.net/manual/en/function.ldap-mod-add-ext.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param string $dn <p>
 * The distinguished name of an LDAP entity.
 * </p>
 * @param array $entry
 * @param array|null $controls Array of LDAP Controls to send with the request.
 * @return resource|false
 * @since 7.3
 */
#[PhpVersionAware(['8.1' => 'LDAP\Result|false'], default: 'resource|false')]
function ldap_mod_add_ext(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    string $dn,
    array $entry,
    #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null
) {}

/**
 * Replace attribute values with new ones
 * @link https://php.net/manual/en/function.ldap-mod-replace.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param string $dn <p>
 * The distinguished name of an LDAP entity.
 * </p>
 * @param array $entry
 * @param array|null $controls Array of LDAP Controls to send with the request.
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function ldap_mod_replace(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    string $dn,
    array $entry,
    #[Available(from: '7.3')] #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null
): bool {}

/**
 * Replace attribute values with new ones
 * Does the same thing as ldap_mod_replace() but returns the LDAP result resource to be parsed with ldap_parse_result().
 * @link https://php.net/manual/en/function.ldap-mod-replace-ext.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param string $dn <p>
 * The distinguished name of an LDAP entity.
 * </p>
 * @param array $entry
 * @param array|null $controls Array of LDAP Controls to send with the request.
 * @return resource|false
 * @since 7.3
 */
#[PhpVersionAware(['8.1' => 'LDAP\Result|false'], default: 'resource|false')]
function ldap_mod_replace_ext(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $dn, array $entry, #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null) {}

/**
 * Delete attribute values from current attributes
 * @link https://php.net/manual/en/function.ldap-mod-del.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param string $dn <p>
 * The distinguished name of an LDAP entity.
 * </p>
 * @param array $entry
 * @param array|null $controls Array of LDAP Controls to send with the request.
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function ldap_mod_del(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    string $dn,
    array $entry,
    #[Available(from: '7.3')] #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null
): bool {}

/**
 * Delete attribute values from current attributes
 * Does the same thing as ldap_mod_del() but returns the LDAP result resource to be parsed with ldap_parse_result().
 * @link https://php.net/manual/en/function.ldap-mod-del-ext.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param string $dn <p>
 * The distinguished name of an LDAP entity.
 * </p>
 * @param array $entry
 * @param array|null $controls Array of LDAP Controls to send with the request.
 * @return resource|false
 * @since 7.3
 */
#[PhpVersionAware(['8.1' => 'LDAP\Result|false'], default: 'resource|false')]
function ldap_mod_del_ext(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $dn, array $entry, #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null) {}

/**
 * Return the LDAP error number of the last LDAP command
 * @link https://php.net/manual/en/function.ldap-errno.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @return int Return the LDAP error number of the last LDAP command for this
 * link.
 */
function ldap_errno(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap): int {}

/**
 * Convert LDAP error number into string error message
 * @link https://php.net/manual/en/function.ldap-err2str.php
 * @param int $errno <p>
 * The error number.
 * </p>
 * @return string the error message, as a string.
 */
function ldap_err2str(int $errno): string {}

/**
 * Return the LDAP error message of the last LDAP command
 * @link https://php.net/manual/en/function.ldap-error.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @return string string error message.
 */
function ldap_error(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap): string {}

/**
 * Compare value of attribute found in entry specified with DN
 * @link https://php.net/manual/en/function.ldap-compare.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param string $dn <p>
 * The distinguished name of an LDAP entity.
 * </p>
 * @param string $attribute <p>
 * The attribute name.
 * </p>
 * @param string $value <p>
 * The compared value.
 * </p>
 * @param array|null $controls Array of LDAP Controls to send with the request.
 * @return int|bool <b>TRUE</b> if <i>value</i> matches otherwise returns
 * <b>FALSE</b>. Returns -1 on error.
 */
function ldap_compare(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    string $dn,
    string $attribute,
    string $value,
    #[Available(from: '7.3')] #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null
): int|bool {}

/**
 * Sort LDAP result entries
 * @link https://php.net/manual/en/function.ldap-sort.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param resource $result <p>
 * An search result identifier, returned by
 * <b>ldap_search</b>.
 * </p>
 * @param string $sortfilter <p>
 * The attribute to use as a key in the sort.
 * </p>
 * @removed 8.0
 * @return bool
 */
#[Deprecated(since: "7.0")]
function ldap_sort(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, $result, string $sortfilter): bool {}

/**
 * Modify the name of an entry
 * @link https://php.net/manual/en/function.ldap-rename.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param string $dn <p>
 * The distinguished name of an LDAP entity.
 * </p>
 * @param string $new_rdn <p>
 * The new RDN.
 * </p>
 * @param string $new_parent <p>
 * The new parent/superior entry.
 * </p>
 * @param bool $delete_old_rdn <p>
 * If <b>TRUE</b> the old RDN value(s) is removed, else the old RDN value(s)
 * is retained as non-distinguished values of the entry.
 * </p>
 * @param array|null $controls Array of LDAP Controls to send with the request.
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function ldap_rename(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    string $dn,
    string $new_rdn,
    string $new_parent,
    bool $delete_old_rdn,
    #[Available(from: '7.3')] #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null
): bool {}

/**
 * Modify the name of an entry
 * Does the same thing as ldap_rename() but returns the LDAP result resource to be parsed with ldap_parse_result().
 * @link https://php.net/manual/en/function.ldap-rename-ext.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param string $dn <p>
 * The distinguished name of an LDAP entity.
 * </p>
 * @param string $new_rdn <p>
 * The new RDN.
 * </p>
 * @param string $new_parent <p>
 * The new parent/superior entry.
 * </p>
 * @param bool $delete_old_rdn <p>
 * If <b>TRUE</b> the old RDN value(s) is removed, else the old RDN value(s)
 * is retained as non-distinguished values of the entry.
 * </p>
 * @param array|null $controls Array of LDAP Controls to send with the request.
 * @return resource|false
 * @since 7.3
 */
#[PhpVersionAware(['8.1' => 'LDAP\Result|false'], default: 'resource|false')]
function ldap_rename_ext(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null) {}

/**
 * Get the current value for given option
 * @link https://php.net/manual/en/function.ldap-get-option.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param int $option <p>
 * The parameter <i>option</i> can be one of:
 * <tr valign="top">
 * <td>Option</td>
 * <td>Type</td>
 * </tr>
 * <tr valign="top">
 * <td><b>LDAP_OPT_DEREF</b></td>
 * <td>integer</td>
 * </tr>
 * <tr valign="top">
 * <td><b>LDAP_OPT_SIZELIMIT</b></td>
 * <td>integer</td>
 * </tr>
 * <tr valign="top">
 * <td><b>LDAP_OPT_TIMELIMIT</b></td>
 * <td>integer</td>
 * </tr>
 * <tr valign="top">
 * <td><b>LDAP_OPT_NETWORK_TIMEOUT</b></td>
 * <td>integer</td>
 * </tr>
 * <tr valign="top">
 * <td><b>LDAP_OPT_PROTOCOL_VERSION</b></td>
 * <td>integer</td>
 * </tr>
 * <tr valign="top">
 * <td><b>LDAP_OPT_ERROR_NUMBER</b></td>
 * <td>integer</td>
 * </tr>
 * <tr valign="top">
 * <td><b>LDAP_OPT_REFERRALS</b></td>
 * <td>bool</td>
 * </tr>
 * <tr valign="top">
 * <td><b>LDAP_OPT_RESTART</b></td>
 * <td>bool</td>
 * </tr>
 * <tr valign="top">
 * <td><b>LDAP_OPT_HOST_NAME</b></td>
 * <td>string</td>
 * </tr>
 * <tr valign="top">
 * <td><b>LDAP_OPT_ERROR_STRING</b></td>
 * <td>string</td>
 * </tr>
 * <tr valign="top">
 * <td><b>LDAP_OPT_MATCHED_DN</b></td>
 * <td>string</td>
 * </tr>
 * <tr valign="top">
 * <td><b>LDAP_OPT_SERVER_CONTROLS</b></td>
 * <td>array</td>
 * </tr>
 * <tr valign="top">
 * <td><b>LDAP_OPT_CLIENT_CONTROLS</b></td>
 * <td>array</td>
 * </tr>
 * </p>
 * @param mixed &$value <p>
 * This will be set to the option value.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function ldap_get_option(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    int $option,
    #[Available(from: '5.3', to: '7.4')] &$value,
    #[Available(from: '8.0')] &$value = null
): bool {}

/**
 * Set the value of the given option
 * @link https://php.net/manual/en/function.ldap-set-option.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param int $option <p>
 * The parameter <i>option</i> can be one of:
 * <tr valign="top">
 * <td>Option</td>
 * <td>Type</td>
 * <td>Available since</td>
 * </tr>
 * <tr valign="top">
 * <td><b>LDAP_OPT_DEREF</b></td>
 * <td>integer</td>
 * <td></td>
 * </tr>
 * <tr valign="top">
 * <td><b>LDAP_OPT_SIZELIMIT</b></td>
 * <td>integer</td>
 * <td></td>
 * </tr>
 * <tr valign="top">
 * <td><b>LDAP_OPT_TIMELIMIT</b></td>
 * <td>integer</td>
 * <td></td>
 * </tr>
 * <tr valign="top">
 * <td><b>LDAP_OPT_NETWORK_TIMEOUT</b></td>
 * <td>integer</td>
 * <td>PHP 5.3.0</td>
 * </tr>
 * <tr valign="top">
 * <td><b>LDAP_OPT_PROTOCOL_VERSION</b></td>
 * <td>integer</td>
 * <td></td>
 * </tr>
 * <tr valign="top">
 * <td><b>LDAP_OPT_ERROR_NUMBER</b></td>
 * <td>integer</td>
 * <td></td>
 * </tr>
 * <tr valign="top">
 * <td><b>LDAP_OPT_REFERRALS</b></td>
 * <td>bool</td>
 * <td></td>
 * </tr>
 * <tr valign="top">
 * <td><b>LDAP_OPT_RESTART</b></td>
 * <td>bool</td>
 * <td></td>
 * </tr>
 * <tr valign="top">
 * <td><b>LDAP_OPT_HOST_NAME</b></td>
 * <td>string</td>
 * <td></td>
 * </tr>
 * <tr valign="top">
 * <td><b>LDAP_OPT_ERROR_STRING</b></td>
 * <td>string</td>
 * <td></td>
 * </tr>
 * <tr valign="top">
 * <td><b>LDAP_OPT_MATCHED_DN</b></td>
 * <td>string</td>
 * <td></td>
 * </tr>
 * <tr valign="top">
 * <td><b>LDAP_OPT_SERVER_CONTROLS</b></td>
 * <td>array</td>
 * <td></td>
 * </tr>
 * <tr valign="top">
 * <td><b>LDAP_OPT_CLIENT_CONTROLS</b></td>
 * <td>array</td>
 * <td></td>
 * </tr>
 * </p>
 * <p>
 * <b>LDAP_OPT_SERVER_CONTROLS</b> and
 * <b>LDAP_OPT_CLIENT_CONTROLS</b> require a list of
 * controls, this means that the value must be an array of controls. A
 * control consists of an oid identifying the control,
 * an optional value, and an optional flag for
 * criticality. In PHP a control is given by an
 * array containing an element with the key oid
 * and string value, and two optional elements. The optional
 * elements are key value with string value
 * and key iscritical with boolean value.
 * iscritical defaults to <b>FALSE</b>
 * if not supplied. See draft-ietf-ldapext-ldap-c-api-xx.txt
 * for details. See also the second example below.
 * </p>
 * @param mixed $value <p>
 * The new value for the specified <i>option</i>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function ldap_set_option(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection|null'], default: 'resource')] $ldap,
    int $option,
    $value
): bool {}

/**
 * Return first reference
 * @link https://php.net/manual/en/function.ldap-first-reference.php
 * @param resource $ldap
 * @param resource $result
 * @return resource
 */
#[PhpVersionAware(['8.1' => 'LDAP\ResultEntry|false'], default: 'resource')]
function ldap_first_reference(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    #[PhpVersionAware(['8.1' => 'LDAP\Result'], default: 'resource')] $result
) {}

/**
 * Get next reference
 * @link https://php.net/manual/en/function.ldap-next-reference.php
 * @param resource $ldap
 * @param resource $entry
 * @return resource
 */
#[PhpVersionAware(['8.1' => 'LDAP\ResultEntry|false'], default: 'resource')]
function ldap_next_reference(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    #[PhpVersionAware(['8.1' => 'LDAP\ResultEntry'], default: 'resource')] $entry
) {}

/**
 * Extract information from reference entry
 * @link https://php.net/manual/en/function.ldap-parse-reference.php
 * @param resource $ldap
 * @param resource $entry
 * @param array &$referrals
 * @return bool
 */
function ldap_parse_reference(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    #[PhpVersionAware(['8.1' => 'LDAP\ResultEntry'], default: 'resource')] $entry,
    &$referrals
): bool {}

/**
 * Extract information from result
 * @link https://php.net/manual/en/function.ldap-parse-result.php
 * @param resource $ldap
 * @param resource $result
 * @param int &$error_code
 * @param string &$matched_dn [optional]
 * @param string &$error_message [optional]
 * @param array &$referrals [optional]
 * @param array &$controls An array of LDAP Controls which have been sent with the response.
 * @return bool
 */
function ldap_parse_result(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    #[PhpVersionAware(['8.1' => 'LDAP\Result'], default: 'resource')] $result,
    &$error_code,
    &$matched_dn,
    &$error_message,
    &$referrals,
    #[Available(from: '7.3')] &$controls = null
): bool {}

/**
 * Start TLS
 * @link https://php.net/manual/en/function.ldap-start-tls.php
 * @param resource $ldap
 * @return bool
 */
function ldap_start_tls(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap): bool {}

/**
 * Set a callback function to do re-binds on referral chasing
 * @link https://php.net/manual/en/function.ldap-set-rebind-proc.php
 * @param resource $ldap
 * @param callable|null $callback
 * @return bool
 */
function ldap_set_rebind_proc(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, ?callable $callback): bool {}

/**
 * Send LDAP pagination control
 * @link https://php.net/manual/en/function.ldap-control-paged-result.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param int $pagesize <p>
 * The number of entries by page.
 * </p>
 * @param bool $iscritical [optional] <p>
 * Indicates whether the pagination is critical of not.
 * If true and if the server doesn't support pagination, the search
 * will return no result.
 * </p>
 * @param string $cookie [optional] <p>
 * An opaque structure sent by the server
 * (<b>ldap_control_paged_result_response</b>).
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * @since 5.4
 * @removed 8.0
 */
#[Deprecated(since: "7.4")]
function ldap_control_paged_result(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, int $pagesize, $iscritical = false, $cookie = ""): bool {}

/**
 * Retrieve the LDAP pagination cookie
 * @link https://php.net/manual/en/function.ldap-control-paged-result-response.php
 * @param resource $ldap <p>
 * An LDAP link identifier, returned by <b>ldap_connect</b>.
 * </p>
 * @param resource $result
 * @param string &$cookie [optional] <p>
 * An opaque structure sent by the server.
 * </p>
 * @param int &$estimated [optional] <p>
 * The estimated number of entries to retrieve.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * @since 5.4
 * @removed 8.0
 */
#[Deprecated(since: "7.4")]
function ldap_control_paged_result_response(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, $result, &$cookie = null, &$estimated = null): bool {}

/**
 * Escape a string for use in an LDAP filter or DN
 * @param string $value The value to escape.
 * @param string $ignore [optional] Characters to ignore when escaping.
 * @param int $flags [optional] The context the escaped string will be used in: LDAP_ESCAPE_FILTER for filters to be used with ldap_search(), or LDAP_ESCAPE_DN for DNs. If neither flag is passed, all chars are escaped.
 * @return string
 * @since 5.6
 */
function ldap_escape(string $value, string $ignore = "", int $flags = 0): string {}

/**
 * (PHP 5.4 &gt;= 5.4.26, PHP 5.5 &gt;= 5.5.10, PHP 5.6 &gt;= 5.6.0)
 * Batch and execute modifications on an LDAP entry
 * @link https://php.net/manual/en/function.ldap-modify-batch.php
 * @param $ldap <p>
 * An LDAP link identifier, returned by
 * {@see ldap_connect()}.
 * </p>
 * @param  string $dn <p>The distinguished name of an LDAP entity.</p>
 * @param array $modifications_info <p>An array that specifies the modifications to make. Each entry in this
 * array is an associative array with two or three keys:
 * <em>attrib</em> maps to the name of the attribute to modify,
 * <em>modtype</em> maps to the type of modification to perform,
 * and (depending on the type of modification) <em>values</em>
 * maps to an array of attribute values relevant to the modification.
 * </p>
 * <p>
 * Possible values for <em>modtype</em> include:
 * </p>
 * <dl>
 *
 * <dt>
 * <b>LDAP_MODIFY_BATCH_ADD</b></dt>
 * <dd>
 * <p>
 * Each value specified through <em>values</em> is added (as
 * an additional value) to the attribute named by
 * <em>attrib</em>.
 * </p>
 * </dd>
 *
 * <dt>
 * <b>LDAP_MODIFY_BATCH_REMOVE</b></dt>
 * <dd>
 * <p>
 * Each value specified through <em>values</em> is removed
 * from the attribute named by <em>attrib</em>. Any value of
 * the attribute not contained in the <em>values</em> array
 * will remain untouched.
 * </p>
 * </dd>
 *
 * <dt>
 * <b>LDAP_MODIFY_BATCH_REMOVE_ALL</b></dt>
 * <dd>
 * <p>
 * All values are removed from the attribute named by
 * <em>attrib</em>. A <em>values</em> entry must
 * not be provided.
 * </p>
 * </dd>
 *
 * <dt>
 * <b>LDAP_MODIFY_BATCH_REPLACE</b></dt>
 * <dd>
 * <p>
 * All current values of the attribute named by
 * <em>attrib</em> are replaced with the values specified
 * through <em>values</em>.
 * </p>
 * </dd>
 *
 * </dl>
 * <p>
 * Note that any value for <em>attrib</em> must be a string, any
 * value for <em>values</em> must be an array of strings, and
 * any value for <em>modtype</em> must be one of the
 * <b>LDAP_MODIFY_BATCH_*</b> constants listed above.
 * </p>
 * @param array|null $controls Array of LDAP Controls to send with the request.
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * @since 5.4
 */
function ldap_modify_batch(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    string $dn,
    array $modifications_info,
    #[Available(from: '7.3')] #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null
): bool {}

/**
 * @param resource $ldap
 * @param resource $result
 * @return int returns the number of reference messages in a search result.
 * @since 8.0
 */
function ldap_count_references(
    #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
    #[PhpVersionAware(['8.1' => 'LDAP\Result'], default: 'resource')] $result
): int {}

define('LDAP_ESCAPE_FILTER', 1);
define('LDAP_ESCAPE_DN', 2);
define('LDAP_DEREF_NEVER', 0);
define('LDAP_DEREF_SEARCHING', 1);
define('LDAP_DEREF_FINDING', 2);
define('LDAP_DEREF_ALWAYS', 3);
define('LDAP_MODIFY_BATCH_REMOVE', 2);
define('LDAP_MODIFY_BATCH_ADD', 1);
define('LDAP_MODIFY_BATCH_REMOVE_ALL', 18);
define('LDAP_MODIFY_BATCH_REPLACE', 3);

define('LDAP_OPT_X_TLS_REQUIRE_CERT', 24582);
define('LDAP_OPT_X_TLS_NEVER', 0);
define('LDAP_OPT_X_TLS_HARD', 1);
define('LDAP_OPT_X_TLS_DEMAND', 2);
define('LDAP_OPT_X_TLS_ALLOW', 3);
define('LDAP_OPT_X_TLS_TRY', 4);
define('LDAP_OPT_X_TLS_CERTFILE', 24580);
define('LDAP_OPT_X_TLS_CIPHER_SUITE', 24584);
define('LDAP_OPT_X_TLS_KEYFILE', 24581);
define('LDAP_OPT_X_TLS_DHFILE', 24590);
define('LDAP_OPT_X_TLS_CRLFILE', 24592);
define('LDAP_OPT_X_TLS_RANDOM_FILE', 24585);
define('LDAP_OPT_X_TLS_CRLCHECK', 24587);
define('LDAP_OPT_X_TLS_CRL_NONE', 0);
define('LDAP_OPT_X_TLS_CRL_PEER', 1);
define('LDAP_OPT_X_TLS_CRL_ALL', 2);
define('LDAP_OPT_X_TLS_PROTOCOL_MIN', 24583);
define('LDAP_OPT_X_TLS_PROTOCOL_SSL2', 512);
define('LDAP_OPT_X_TLS_PROTOCOL_SSL3', 768);
define('LDAP_OPT_X_TLS_PROTOCOL_TLS1_0', 769);
define('LDAP_OPT_X_TLS_PROTOCOL_TLS1_1', 770);
define('LDAP_OPT_X_TLS_PROTOCOL_TLS1_2', 771);
define('LDAP_OPT_X_TLS_PACKAGE', 24593);
define('LDAP_OPT_X_KEEPALIVE_IDLE', 25344);
define('LDAP_OPT_X_KEEPALIVE_PROBES', 25345);
define('LDAP_OPT_X_KEEPALIVE_INTERVAL', 25346);
define('LDAP_OPT_X_SASL_USERNAME', 24844);
define('LDAP_OPT_X_SASL_NOCANON', 24843);

/**
 * Specifies alternative rules for following aliases at the server.
 * @link https://php.net/manual/en/ldap.constants.php
 */
define('LDAP_OPT_DEREF', 2);

/**
 * <p>
 * Specifies the maximum number of entries that can be
 * returned on a search operation.
 * </p>
 * The actual size limit for operations is also bounded
 * by the server's configured maximum number of return entries.
 * The lesser of these two settings is the actual size limit.
 * @link https://php.net/manual/en/ldap.constants.php
 */
define('LDAP_OPT_SIZELIMIT', 3);

/**
 * Specifies the number of seconds to wait for search results.
 * The actual time limit for operations is also bounded
 * by the server's configured maximum time.
 * The lesser of these two settings is the actual time limit.
 * @link https://php.net/manual/en/ldap.constants.php
 */
define('LDAP_OPT_TIMELIMIT', 4);

/**
 * Option for <b>ldap_set_option</b> to allow setting network timeout.
 * (Available as of PHP 5.3.0)
 * @link https://php.net/manual/en/ldap.constants.php
 */
define('LDAP_OPT_NETWORK_TIMEOUT', 20485);

/**
 * Specifies the LDAP protocol to be used (V2 or V3).
 * @link https://php.net/manual/en/ldap.constants.php
 */
define('LDAP_OPT_PROTOCOL_VERSION', 17);
define('LDAP_OPT_ERROR_NUMBER', 49);

/**
 * Specifies whether to automatically follow referrals returned
 * by the LDAP server.
 * @link https://php.net/manual/en/ldap.constants.php
 */
define('LDAP_OPT_REFERRALS', 8);
define('LDAP_OPT_RESTART', 9);
define('LDAP_OPT_HOST_NAME', 48);
define('LDAP_OPT_ERROR_STRING', 50);
define('LDAP_OPT_MATCHED_DN', 51);

/**
 * Specifies a default list of server controls to be sent with each request.
 * @link https://php.net/manual/en/ldap.constants.php
 */
define('LDAP_OPT_SERVER_CONTROLS', 18);

/**
 * Specifies a default list of client controls to be processed with each request.
 * @link https://php.net/manual/en/ldap.constants.php
 */
define('LDAP_OPT_CLIENT_CONTROLS', 19);

/**
 * Specifies a bitwise level for debug traces.
 * @link https://php.net/manual/en/ldap.constants.php
 */
define('LDAP_OPT_DEBUG_LEVEL', 20481);
define('LDAP_OPT_X_SASL_MECH', 24832);
define('LDAP_OPT_X_SASL_REALM', 24833);
define('LDAP_OPT_X_SASL_AUTHCID', 24834);
define('LDAP_OPT_X_SASL_AUTHZID', 24835);

/**
 * Specifies the path of the directory containing CA certificates.
 * @link https://php.net/manual/en/ldap.constants.php
 * @since 7.1
 */
define('LDAP_OPT_X_TLS_CACERTDIR', 24579);

/**
 * Specifies the full-path of the CA certificate file.
 * @link https://php.net/manual/en/ldap.constants.php
 * @since 7.1
 */
define('LDAP_OPT_X_TLS_CACERTFILE', 24578);

define('LDAP_MODIFY_BATCH_ATTRIB', 'attrib');
define('LDAP_MODIFY_BATCH_MODTYPE', 'modtype');
define('LDAP_MODIFY_BATCH_VALUES', 'values');
define('LDAP_OPT_TIMEOUT', 20482);
define('LDAP_OPT_DIAGNOSTIC_MESSAGE', 50);

/**
 * Control Constant - Manage DSA IT (» RFC 3296)
 * @link https://php.net/manual/en/ldap.constants.php
 * @since 7.2
 */
define("LDAP_CONTROL_MANAGEDSAIT", "2.16.840.1.113730.3.4.2");

/**
 * Control Constant - Proxied Authorization (» RFC 4370)
 * @link https://php.net/manual/en/ldap.constants.php
 * @since 7.2
 */
define("LDAP_CONTROL_PROXY_AUTHZ", "2.16.840.1.113730.3.4.18");

/**
 * Control Constant - Subentries (» RFC 3672)
 * @link https://php.net/manual/en/ldap.constants.php
 * @since 7.2
 */
define("LDAP_CONTROL_SUBENTRIES", "1.3.6.1.4.1.4203.1.10.1");

/**
 * Control Constant - Filter returned values (» RFC 3876)
 * @link https://php.net/manual/en/ldap.constants.php
 * @since 7.2
 */
define("LDAP_CONTROL_VALUESRETURNFILTER", "1.2.826.0.1.3344810.2.3");

/**
 * Control Constant - Assertion (» RFC 4528)
 * @link https://php.net/manual/en/ldap.constants.php
 * @since 7.2
 */
define("LDAP_CONTROL_ASSERT", "1.3.6.1.1.12");

/**
 * Control Constant - Pre read (» RFC 4527)
 * @link https://php.net/manual/en/ldap.constants.php
 * @since 7.2
 */
define("LDAP_CONTROL_PRE_READ", "1.3.6.1.1.13.1");

/**
 * Control Constant - Post read (» RFC 4527)
 * @link https://php.net/manual/en/ldap.constants.php
 * @since 7.2
 */
define("LDAP_CONTROL_POST_READ", "1.3.6.1.1.13.2");

/**
 * Control Constant - Sort request (» RFC 2891)
 * @link https://php.net/manual/en/ldap.constants.php
 * @since 7.2
 */
define("LDAP_CONTROL_SORTREQUEST", "1.2.840.113556.1.4.473");

/**
 * Control Constant - Sort response (» RFC 2891)
 * @link https://php.net/manual/en/ldap.constants.php
 * @since 7.2
 */
define("LDAP_CONTROL_SORTRESPONSE", "1.2.840.113556.1.4.474");

/**
 * Control Constant - Paged results (» RFC 2696)
 * @link https://php.net/manual/en/ldap.constants.php
 * @since 7.2
 */
define("LDAP_CONTROL_PAGEDRESULTS", "1.2.840.113556.1.4.319");

/**
 * Control Constant - Content Synchronization Operation (» RFC 4533)
 * @link https://php.net/manual/en/ldap.constants.php
 * @since 7.2
 */
define("LDAP_CONTROL_SYNC", "1.3.6.1.4.1.4203.1.9.1.1");

/**
 * Control Constant - Content Synchronization Operation State (» RFC 4533)
 * @link https://php.net/manual/en/ldap.constants.php
 * @since 7.2
 */
define("LDAP_CONTROL_SYNC_STATE", "1.3.6.1.4.1.4203.1.9.1.2");

/**
 * Control Constant - Content Synchronization Operation Done (» RFC 4533)
 * @link https://php.net/manual/en/ldap.constants.php
 * @since 7.2
 */
define("LDAP_CONTROL_SYNC_DONE", "1.3.6.1.4.1.4203.1.9.1.3");

/**
 * Control Constant - Don't Use Copy (» RFC 6171)
 * @link https://php.net/manual/en/ldap.constants.php
 * @since 7.2
 */
define("LDAP_CONTROL_DONTUSECOPY", "1.3.6.1.1.22");

/**
 * Control Constant - Password Policy Request
 * @link https://php.net/manual/en/ldap.constants.php
 * @since 7.2
 */
define("LDAP_CONTROL_PASSWORDPOLICYREQUEST", "1.3.6.1.4.1.42.2.27.8.5.1");

/**
 * Control Constant - Password Policy Response
 * @link https://php.net/manual/en/ldap.constants.php
 * @since 7.2
 */
define("LDAP_CONTROL_PASSWORDPOLICYRESPONSE", "1.3.6.1.4.1.42.2.27.8.5.1");

/**
 * Control Constant - Active Directory Incremental Values
 * @link https://php.net/manual/en/ldap.constants.php
 * @since 7.2
 */
define("LDAP_CONTROL_X_INCREMENTAL_VALUES", "1.2.840.113556.1.4.802");

/**
 * Control Constant - Active Directory Domain Scope
 * @link https://php.net/manual/en/ldap.constants.php
 * @since 7.2
 */
define("LDAP_CONTROL_X_DOMAIN_SCOPE", "1.2.840.113556.1.4.1339");

/**
 * Control Constant - Active Directory Permissive Modify
 * @link https://php.net/manual/en/ldap.constants.php
 * @since 7.2
 */
define("LDAP_CONTROL_X_PERMISSIVE_MODIFY", "1.2.840.113556.1.4.1413");

/**
 * Control Constant - Active Directory Search Options
 * @link https://php.net/manual/en/ldap.constants.php
 * @since 7.2
 */
define("LDAP_CONTROL_X_SEARCH_OPTIONS", "1.2.840.113556.1.4.1340");

/**
 * Control Constant - Active Directory Tree Delete
 * @link https://php.net/manual/en/ldap.constants.php
 * @since 7.2
 */
define("LDAP_CONTROL_X_TREE_DELETE", "1.2.840.113556.1.4.805");

/**
 * Control Constant - Active Directory Extended DN
 * @link https://php.net/manual/en/ldap.constants.php
 * @since 7.2
 */
define("LDAP_CONTROL_X_EXTENDED_DN", "1.2.840.113556.1.4.529");

/**
 * Control Constant - Virtual List View Request
 * @link https://php.net/manual/en/ldap.constants.php
 * @since 7.2
 */
define("LDAP_CONTROL_VLVREQUEST", "2.16.840.1.113730.3.4.9");

/**
 * Control Constant - Virtual List View Response
 * @link https://php.net/manual/en/ldap.constants.php
 * @since 7.2
 */
define("LDAP_CONTROL_VLVRESPONSE", "2.16.840.1.113730.3.4.10");

/**
 * Extended Operation constant - Modify password
 */
define("LDAP_EXOP_MODIFY_PASSWD", "1.3.6.1.4.1.4203.1.11.1");

/**
 * Extended Operation Constant - Refresh
 */
define("LDAP_EXOP_REFRESH", "1.3.6.1.4.1.1466.101.119.1");

/**
 * Extended Operation constant - Start TLS
 */
define("LDAP_EXOP_START_TLS", "1.3.6.1.4.1.1466.20037");

/**
 * Extended Operation Constant - Turn
 */
define("LDAP_EXOP_TURN", "1.3.6.1.1.19");

/**
 * Extended Operation Constant - WHOAMI
 */
define("LDAP_EXOP_WHO_AM_I", "1.3.6.1.4.1.4203.1.11.3");

/**
 * @since 7.3
 */
define('LDAP_CONTROL_AUTHZID_REQUEST', '2.16.840.1.113730.3.4.16');

/**
 * @since 7.3
 */
define('LDAP_CONTROL_AUTHZID_RESPONSE', '2.16.840.1.113730.3.4.15');

// End of ldap v.
<?php

namespace LDAP;

/**
 * @since 8.1
 */
final class Result {}
<?php

namespace LDAP;

/**
 * @since 8.1
 */
final class Connection {}
<?php

namespace LDAP;

/**
 * @since 8.1
 */
final class ResultEntry {}
<?php

/**
 * Compresses the given data string using LZF encoding.
 *
 * @link https://www.php.net/manual/en/function.lzf-compress.php
 *
 * @param string $data Data to be compressed
 *
 * @return false|string Returns the compressed data or FALSE if an error occurred.
 *
 * @since 0.1.0
 */
function lzf_compress($data) {}

/**
 * Decompresses the given data string containing lzf encoded data.
 *
 * @link https://www.php.net/manual/en/function.lzf-decompress.php
 *
 * @param string $data The compressed string.
 *
 * @return false|string Returns the decompressed data or FALSE if an error occurred.
 *
 * @since 0.1.0
 */
function lzf_decompress($data) {}

/**
 * Determines what was LZF extension optimized for during compilation.
 *
 * @link https://www.php.net/manual/en/function.lzf-optimized-for.php
 *
 * @return int Returns 1 if LZF was optimized for speed, 0 for compression.
 *
 * @since 1.0.0
 */
function lzf_optimized_for() {}
<?php
/*
 * Common Used Functions
 */

/**
 * Get cached data by specified name
 *
 * @param string $name Key name
 * @return mixed
 */
function xcache_get($name) {}

/**
 * Store data to cache by specified name
 *
 * @param string $name Key name
 * @param mixed $value Value to store
 * @param int $ttl TTL in seconds
 * @return bool TRUE on success, FALSE otherwise
 */
function xcache_set($name, $value, $ttl = 0) {}

/**
 * Check if an entry exists in cache by specified name
 *
 * @param string $name Key name
 * @return bool TRUE if key exists, FALSE otherwise
 */
function xcache_isset($name) {}

/**
 * Unset existing data in cache by specified name
 *
 * @param string $name Key name
 * @return bool
 */
function xcache_unset($name) {}

/**
 * Unset existing data in cache by specified prefix
 *
 * @param string $prefix Keys' prefix
 * @return bool
 */
function xcache_unset_by_prefix($prefix) {}

/**
 * Increase an int counter in cache by specified name, create it if not exists
 *
 * @param string $name
 * @param mixed $value
 * @param int $ttl
 * @return int
 */
function xcache_inc($name, $value = 1, $ttl = 0) {}

/**
 * Decrease an int counter in cache by specified name, create it if not exists
 *
 * @param string $name
 * @param mixed $value
 * @param int $ttl
 * @return int
 */
function xcache_dec($name, $value = 1, $ttl = 0) {}

/*
 * Administrator Functions
 */

/**
 * Return count of cache on specified cache type
 *
 * @param int $type
 * @return int
 */
function xcache_count($type) {}

/**
 * Get cache info by id on specified cache type
 *
 * @param int $type
 * @param int $id
 * @return array
 */
function xcache_info($type, $id) {}

/**
 * Get cache entries list by id on specified cache type
 *
 * @param int $type
 * @param int $id
 * @return array
 */
function xcache_list($type, $id) {}

/**
 * Clear cache by id on specified cache type
 *
 * @param int $type
 * @param int $id
 * @return void
 */
function xcache_clear_cache($type, $id = -1) {}

/**
 * @param int $op_type
 * @return string
 */
function xcache_coredump($op_type) {}

/*
 * Coverager Functions
 */

/**
 * @param string $data
 * @return array
 */
function xcache_coverager_decode($data) {}

/**
 * @param bool $clean
 * @return void
 */
function xcache_coverager_start($clean = true) {}

/**
 * @param bool $clean
 * @return void
 */
function xcache_coverager_stop($clean = false) {}

/**
 * @param bool $clean
 * @return array
 */
function xcache_coverager_get($clean = false) {}

/*
 * Opcode Functions
 */

/**
 * @param string $filename
 * @return string
 */
function xcache_asm($filename) {}

/**
 * Disassemble file into opcode array by filename
 *
 * @param string $filename
 * @return string
 */
function xcache_dasm_file($filename) {}

/**
 * Disassemble php code into opcode array
 *
 * @param string $code
 * @return string
 */
function xcache_dasm_string($code) {}

/**
 * Encode php file into XCache opcode encoded format
 *
 * @param string $filename
 * @return string
 */
function xcache_encode($filename) {}

/**
 * Decode(load) opcode from XCache encoded format file
 *
 * @param string $filename
 * @return bool
 */
function xcache_decode($filename) {}

/**
 * @param int $op_type
 * @return string
 */
function xcache_get_op_type($op_type) {}

/**
 * @param int $type
 * @return string
 */
function xcache_get_data_type($type) {}

/**
 * @param int $opcode
 * @return string
 */
function xcache_get_opcode($opcode) {}

/**
 * @param int $op_type
 * @return string
 */
function xcache_get_op_spec($op_type) {}

/**
 * @param int $opcode
 * @return string
 */
function xcache_get_opcode_spec($opcode) {}

/**
 * @param string $name
 * @return string
 */
function xcache_is_autoglobal($name) {}
<?php

namespace {
    use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
    use JetBrains\PhpStorm\Pure;

    /**
     * Combined linear congruential generator
     * @link https://php.net/manual/en/function.lcg-value.php
     * @return float A pseudo random float value in the range of (0, 1)
     */
    function lcg_value(): float {}

    /**
     * Seeds the Mersenne Twister Random Number Generator
     * @link https://php.net/manual/en/function.mt-srand.php
     * @param int $seed <p>
     * An optional seed value
     * </p>
     * @param int $mode [optional] <p>
     * Use one of the following constants to specify the implementation of the algorithm to use.
     * </p>
     * @return void
     */
    function mt_srand(
        int $seed = null,
        #[PhpStormStubsElementAvailable(from: '7.1')] int $mode = MT_RAND_MT19937
    ): void {}

    /**
     * Seed the random number generator
     * <p><strong>Note</strong>: As of PHP 7.1.0, {@see srand()} has been made
     * an alias of {@see mt_srand()}.
     * </p>
     * @link https://php.net/manual/en/function.srand.php
     * @param int $seed <p>
     * Optional seed value
     * </p>
     * @param int $mode [optional] <p>
     * Use one of the following constants to specify the implementation of the algorithm to use.
     * </p>
     * @return void
     */
    function srand(
        int $seed = null,
        #[PhpStormStubsElementAvailable(from: '7.1')] int $mode = MT_RAND_MT19937
    ): void {}

    /**
     * Generate a random integer
     * @link https://php.net/manual/en/function.rand.php
     * @param int $min
     * @param int $max [optional]
     * @return int A pseudo random value between min
     * (or 0) and max (or getrandmax, inclusive).
     */
    function rand(int $min = null, int $max): int {}

    /**
     * Generate a random value via the Mersenne Twister Random Number Generator
     * @link https://php.net/manual/en/function.mt-rand.php
     * @param int $min <p>
     * Optional lowest value to be returned (default: 0)
     * </p>
     * @param int $max [optional] <p>
     * Optional highest value to be returned (default: mt_getrandmax())
     * </p>
     * @return int A random integer value between min (or 0)
     * and max (or mt_getrandmax, inclusive)
     */
    function mt_rand(int $min = null, int $max): int {}

    /**
     * Show largest possible random value
     * @link https://php.net/manual/en/function.mt-getrandmax.php
     * @return int the maximum random value returned by mt_rand
     */
    #[Pure]
    function mt_getrandmax(): int {}

    /**
     * Show largest possible random value
     * @link https://php.net/manual/en/function.getrandmax.php
     * @return int The largest possible random value returned by rand
     */
    #[Pure]
    function getrandmax(): int {}

    /**
     * Generates cryptographically secure pseudo-random bytes
     * @link https://php.net/manual/en/function.random-bytes.php
     * @param int $length The length of the random string that should be returned in bytes.
     * @return string Returns a string containing the requested number of cryptographically secure random bytes.
     * @since 7.0
     * @throws Exception if an appropriate source of randomness cannot be found.
     */
    function random_bytes(int $length): string {}

    /**
     * Generates cryptographically secure pseudo-random integers
     * @link https://php.net/manual/en/function.random-int.php
     * @param int $min The lowest value to be returned, which must be PHP_INT_MIN or higher.
     * @param int $max The highest value to be returned, which must be less than or equal to PHP_INT_MAX.
     * @return int Returns a cryptographically secure random integer in the range min to max, inclusive.
     * @since 7.0
     * @throws Exception if an appropriate source of randomness cannot be found.
     */
    function random_int(int $min, int $max): int {}
}

namespace Random\Engine
{
    /**
     * @since 8.2
     */
    final class Mt19937 implements \Random\Engine
    {
        public function __construct(int|null $seed = null, int $mode = MT_RAND_MT19937) {}

        public function generate(): string {}

        public function __serialize(): array {}

        public function __unserialize(array $data): void {}

        public function __debugInfo(): array {}
    }

    /**
     * @since 8.2
     */
    final class PcgOneseq128XslRr64 implements \Random\Engine
    {
        public function __construct(string|int|null $seed = null) {}

        public function generate(): string {}

        public function jump(int $advance): void {}

        public function __serialize(): array {}

        public function __unserialize(array $data): void {}

        public function __debugInfo(): array {}
    }

    /**
     * @since 8.2
     */
    final class Xoshiro256StarStar implements \Random\Engine
    {
        public function __construct(string|int|null $seed = null) {}

        public function generate(): string {}

        public function jump(): void {}

        public function jumpLong(): void {}

        public function __serialize(): array {}

        public function __unserialize(array $data): void {}

        public function __debugInfo(): array {}
    }

    /**
     * @since 8.2
     */
    final class Secure implements \Random\CryptoSafeEngine
    {
        public function generate(): string {}
    }
}

namespace Random
{
    use Error;
    use Exception;

    /**
     * @since 8.2
     */
    interface Engine
    {
        public function generate(): string;
    }
    /**
     * @since 8.2
     */
    interface CryptoSafeEngine extends Engine {}

    /**
     * @since 8.2
     */
    final class Randomizer
    {
        public readonly Engine $engine;

        public function __construct(?Engine $engine = null) {}

        public function nextInt(): int {}

        public function getInt(int $min, int $max): int {}

        public function getBytes(int $length): string {}

        public function shuffleArray(array $array): array {}

        public function shuffleBytes(string $bytes): string {}

        public function pickArrayKeys(array $array, int $num): array {}

        public function __serialize(): array {}

        public function __unserialize(array $data): void {}
    }

    /**
     * @since 8.2
     */
    class RandomError extends Error {}

    /**
     * @since 8.2
     */
    class BrokenRandomEngineError extends RandomError {}

    /**
     * @since 8.2
     */
    class RandomException extends Exception {}
}
<?php

/**
 * A class for working with PHP tokens, which is an alternative to
 * the {@see token_get_all()} function.
 *
 * @since 8.0
 */
class PhpToken implements Stringable
{
    /**
     * One of the T_* constants, or an integer < 256 representing a
     * single-char token.
     */
    public int $id;

    /**
     * The textual content of the token.
     */
    public string $text;

    /**
     * The starting line number (1-based) of the token.
     */
    public int $line;

    /**
     * The starting position (0-based) in the tokenized string.
     */
    public int $pos;

    /**
     * @param int $id An integer identifier
     * @param string $text Textual content
     * @param int $line Strating line
     * @param int $pos Straring position (line offset)
     */
    final public function __construct(int $id, string $text, int $line = -1, int $pos = -1) {}

    /**
     * Get the name of the token.
     *
     * @return string|null
     */
    public function getTokenName(): ?string {}

    /**
     * Same as {@see token_get_all()}, but returning array of {@see PhpToken}
     * or an instance of a child class.
     *
     * @param string $code An a PHP source code
     * @param int $flags
     * @return static[]
     */
    public static function tokenize(string $code, int $flags = 0): array {}

    /**
     * Whether the token has the given ID, the given text, or has an ID/text
     * part of the given array.
     *
     * @param int|string|array $kind
     * @return bool
     */
    public function is($kind): bool {}

    /**
     * Whether this token would be ignored by the PHP parser.
     *
     * @return bool
     */
    public function isIgnorable(): bool {}

    /**
     * {@inheritDoc}
     */
    public function __toString(): string {}
}
<?php

// Start of tokenizer v.0.1
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Pure;

/**
 * Split given source into PHP tokens
 * @link https://php.net/manual/en/function.token-get-all.php
 * @param string $code <p>
 * The PHP source to parse.
 * </p>
 * @param int $flags
 * <p>
 * <p>
 * Valid flags:
 * </p><ul>
 * <li>
 *
 * <b>TOKEN_PARSE</b> - Recognises the ability to use
 * reserved words in specific contexts.
 * </li>
 * </ul>
 * </p>
 * @return array An array of token identifiers. Each individual token identifier is either
 * a single character (i.e.: ;, .,
 * &gt;, !, etc...),
 * or a three element array containing the token index in element 0, the string
 * content of the original token in element 1 and the line number in element 2.
 */
#[Pure]
function token_get_all(string $code, #[PhpStormStubsElementAvailable(from: '7.0')] int $flags = 0): array {}

/**
 * Get the symbolic name of a given PHP token
 * @link https://php.net/manual/en/function.token-name.php
 * @param int $id <p>
 * The token value.
 * </p>
 * @return string The symbolic name of the given <i>token</i>.
 */
#[Pure]
function token_name(int $id): string {}

define('TOKEN_PARSE', 1);
define('T_REQUIRE_ONCE', 276);
define('T_REQUIRE', 275);
define('T_EVAL', 274);
define('T_INCLUDE_ONCE', 273);
define('T_INCLUDE', 272);
define('T_LOGICAL_OR', 277);
define('T_LOGICAL_XOR', 278);
define('T_LOGICAL_AND', 279);
define('T_PRINT', 280);
define('T_YIELD', 281);
define('T_DOUBLE_ARROW', 386);
define('T_YIELD_FROM', 282);
define('T_POW_EQUAL', 402);
define('T_SR_EQUAL', 362);
define('T_SL_EQUAL', 361);
define('T_XOR_EQUAL', 360);
define('T_OR_EQUAL', 359);
define('T_AND_EQUAL', 358);
define('T_MOD_EQUAL', 357);
define('T_CONCAT_EQUAL', 356);
define('T_DIV_EQUAL', 355);
define('T_MUL_EQUAL', 354);
define('T_MINUS_EQUAL', 353);
define('T_PLUS_EQUAL', 352);
/**
 * @since 7.4
 */
define('T_COALESCE_EQUAL', 363);
define('T_COALESCE', 400);
define('T_BOOLEAN_OR', 364);
define('T_BOOLEAN_AND', 365);
define('T_SPACESHIP', 372);
define('T_IS_NOT_IDENTICAL', 369);
define('T_IS_IDENTICAL', 368);
define('T_IS_NOT_EQUAL', 367);
define('T_IS_EQUAL', 366);
define('T_IS_GREATER_OR_EQUAL', 371);
define('T_IS_SMALLER_OR_EQUAL', 370);
define('T_SR', 374);
define('T_SL', 373);
define('T_INSTANCEOF', 283);
define('T_UNSET_CAST', 383);
define('T_BOOL_CAST', 382);
define('T_OBJECT_CAST', 381);
define('T_ARRAY_CAST', 380);
define('T_STRING_CAST', 379);
define('T_DOUBLE_CAST', 378);
define('T_INT_CAST', 377);
define('T_DEC', 376);
define('T_INC', 375);
define('T_POW', 401);
define('T_CLONE', 285);
define('T_NEW', 284);
define('T_ELSEIF', 288);
define('T_ELSE', 289);
define('T_ENDIF', 290);
define('T_PUBLIC', 326);
define('T_PROTECTED', 325);
define('T_PRIVATE', 324);
define('T_FINAL', 323);
define('T_ABSTRACT', 322);
define('T_STATIC', 321);
define('T_LNUMBER', 260);
define('T_DNUMBER', 261);
define('T_STRING', 262);
define('T_VARIABLE', 266);
define('T_INLINE_HTML', 267);
define('T_ENCAPSED_AND_WHITESPACE', 268);
define('T_CONSTANT_ENCAPSED_STRING', 269);
define('T_STRING_VARNAME', 270);
define('T_NUM_STRING', 271);
define('T_EXIT', 286);
define('T_IF', 287);
define('T_ECHO', 291);
define('T_DO', 292);
define('T_WHILE', 293);
define('T_ENDWHILE', 294);
define('T_FOR', 295);
define('T_ENDFOR', 296);
define('T_FOREACH', 297);
define('T_ENDFOREACH', 298);
define('T_DECLARE', 299);
define('T_ENDDECLARE', 300);
define('T_AS', 301);
define('T_SWITCH', 302);
define('T_ENDSWITCH', 303);
define('T_CASE', 304);
define('T_DEFAULT', 305);
define('T_MATCH', 306);
define('T_BREAK', 307);
define('T_CONTINUE', 308);
define('T_GOTO', 309);
define('T_FUNCTION', 310);
define('T_CONST', 312);
define('T_RETURN', 313);
define('T_TRY', 314);
define('T_CATCH', 315);
define('T_FINALLY', 316);
define('T_THROW', 317);
define('T_USE', 318);
define('T_INSTEADOF', 319);
define('T_GLOBAL', 320);
define('T_VAR', 328);
define('T_UNSET', 329);
define('T_ISSET', 330);
define('T_EMPTY', 331);
define('T_HALT_COMPILER', 332);
define('T_CLASS', 333);
define('T_TRAIT', 334);
define('T_INTERFACE', 335);
/**
 * @since 8.1
 */
define('T_ENUM', 336);
define('T_EXTENDS', 337);
define('T_IMPLEMENTS', 338);
define('T_OBJECT_OPERATOR', 384);
define('T_LIST', 340);
define('T_ARRAY', 341);
define('T_CALLABLE', 342);
define('T_LINE', 343);
define('T_FILE', 344);
define('T_DIR', 345);
define('T_CLASS_C', 346);
define('T_TRAIT_C', 347);
define('T_METHOD_C', 348);
define('T_FUNC_C', 349);
define('T_COMMENT', 387);
define('T_DOC_COMMENT', 388);
define('T_OPEN_TAG', 389);
define('T_OPEN_TAG_WITH_ECHO', 390);
define('T_CLOSE_TAG', 391);
define('T_WHITESPACE', 392);
define('T_START_HEREDOC', 393);
define('T_END_HEREDOC', 394);
define('T_DOLLAR_OPEN_CURLY_BRACES', 395);
define('T_CURLY_OPEN', 396);
define('T_PAAMAYIM_NEKUDOTAYIM', 397);
define('T_NAMESPACE', 339);
define('T_NS_C', 350);
define('T_NS_SEPARATOR', 398);
define('T_ELLIPSIS', 399);
define('T_DOUBLE_COLON', 397);
/**
 * @since 7.4
 */
define('T_FN', 311);
/**
 * @removed 7.0
 */
define('T_BAD_CHARACTER', 405);

/**
 * @since 8.0
 */
define('T_NAME_FULLY_QUALIFIED', 263);
/**
 * @since 8.0
 */
define('T_NAME_RELATIVE', 264);
/**
 * @since 8.0
 */
define('T_NAME_QUALIFIED', 265);
/**
 * @since 8.0
 */
define('T_ATTRIBUTE', 351);
/**
 * @since 8.0
 */
define('T_NULLSAFE_OBJECT_OPERATOR', 385);

/**
 * @since 8.1
 */
define('T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG', 403);

/**
 * @since 8.1
 */
define('T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG', 404);

/**
 * @since 8.1
 */
define('T_READONLY', 327);

/**
 * @removed 7.0
 */
define('T_CHARACTER', 315);
<?php

// Start of readline v.5.5.3-1ubuntu2.1
use JetBrains\PhpStorm\ArrayShape;

/**
 * Reads a line
 * @link https://php.net/manual/en/function.readline.php
 * @param string|null $prompt [optional] <p>
 * You may specify a string with which to prompt the user.
 * </p>
 * @return string|false a single string from the user. The line returned has the ending newline removed.
 * If there is no more data to read, then FALSE is returned.
 */
function readline(?string $prompt): string|false {}

/**
 * Gets/sets various internal readline variables
 * @link https://php.net/manual/en/function.readline-info.php
 * @param string|null $var_name [optional] <p>
 * A variable name.
 * </p>
 * @param string $value [optional] <p>
 * If provided, this will be the new value of the setting.
 * </p>
 * @return mixed If called with no parameters, this function returns an array of
 * values for all the setting readline uses. The elements will
 * be indexed by the following values: done, end, erase_empty_line,
 * library_version, line_buffer, mark, pending_input, point, prompt,
 * readline_name, and terminal_name.
 * </p>
 * <p>
 * If called with one or two parameters, the old value is returned.
 */
#[ArrayShape([
    'line_buffer' => 'string',
    'point' => 'int',
    'end' => 'int',
    'mark' => 'int',
    'done' => 'int',
    'pending_input' => 'int',
    'prompt' => 'string',
    'terminal_name' => 'string',
    'completion_append_character' => 'string',
    'completion_suppress_append' => 'bool',
    'erase_empty_line' => 'int',
    'library_version' => 'string',
    'readline_name' => 'string',
    'attempted_completion_over' => 'int',
])]
function readline_info(?string $var_name, $value): mixed {}

/**
 * Adds a line to the history
 * @link https://php.net/manual/en/function.readline-add-history.php
 * @param string $prompt <p>
 * The line to be added in the history.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function readline_add_history(string $prompt): bool {}

/**
 * Clears the history
 * @link https://php.net/manual/en/function.readline-clear-history.php
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function readline_clear_history(): bool {}

/**
 * Lists the history
 * @link https://php.net/manual/en/function.readline-list-history.php
 * @return array an array of the entire command line history. The elements are
 * indexed by integers starting at zero.
 */
function readline_list_history(): array {}

/**
 * Reads the history
 * @link https://php.net/manual/en/function.readline-read-history.php
 * @param string|null $filename [optional] <p>
 * Path to the filename containing the command history.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function readline_read_history(?string $filename): bool {}

/**
 * Writes the history
 * @link https://php.net/manual/en/function.readline-write-history.php
 * @param string|null $filename [optional] <p>
 * Path to the saved file.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function readline_write_history(?string $filename): bool {}

/**
 * Registers a completion function
 * @link https://php.net/manual/en/function.readline-completion-function.php
 * @param callable $callback <p>
 * You must supply the name of an existing function which accepts a
 * partial command line and returns an array of possible matches.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function readline_completion_function(callable $callback): bool {}

/**
 * Initializes the readline callback interface and terminal, prints the prompt and returns immediately
 * @link https://php.net/manual/en/function.readline-callback-handler-install.php
 * @param string $prompt <p>
 * The prompt message.
 * </p>
 * @param callable $callback <p>
 * The <i>callback</i> function takes one parameter; the
 * user input returned.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function readline_callback_handler_install(string $prompt, callable $callback): bool {}

/**
 * Reads a character and informs the readline callback interface when a line is received
 * @link https://php.net/manual/en/function.readline-callback-read-char.php
 * @return void No value is returned.
 */
function readline_callback_read_char(): void {}

/**
 * Removes a previously installed callback handler and restores terminal settings
 * @link https://php.net/manual/en/function.readline-callback-handler-remove.php
 * @return bool <b>TRUE</b> if a previously installed callback handler was removed, or
 * <b>FALSE</b> if one could not be found.
 */
function readline_callback_handler_remove(): bool {}

/**
 * Redraws the display
 * @link https://php.net/manual/en/function.readline-redisplay.php
 * @return void No value is returned.
 */
function readline_redisplay(): void {}

/**
 * Inform readline that the cursor has moved to a new line
 * @link https://php.net/manual/en/function.readline-on-new-line.php
 * @return void No value is returned.
 */
function readline_on_new_line(): void {}

define('READLINE_LIB', "readline");

// End of readline v.5.5.3-1ubuntu2.1
<?php

namespace MongoDB\BSON;

/**
 * Interface TimestampInterface
 *
 * @link https://secure.php.net/manual/en/class.mongodb-bson-timestampinterface.php
 * @since 1.3.0
 */
interface TimestampInterface
{
    /**
     * Returns the increment component of this TimestampInterface
     * @link https://secure.php.net/manual/en/mongodb-bson-timestampinterface.getincrement.php
     * @return int
     * @since 1.3.0
     */
    public function getIncrement();

    /**
     * Returns the timestamp component of this TimestampInterface
     * @link https://secure.php.net/manual/en/mongodb-bson-timestampinterface.gettimestamp.php
     * @return int
     * @since 1.3.0
     */
    public function getTimestamp();

    /**
     * Returns the string representation of this TimestampInterface
     * @link https://secure.php.net/manual/en/mongodb-bson-timestampinterface.tostring.php
     * @return string
     * @since 1.3.0
     */
    public function __toString();
}
<?php

namespace MongoDB\BSON;

/**
 * This interface is implemented by MongoDB\BSON\ObjectId but may also be used for type-hinting and userland classes.
 * @link https://www.php.net/manual/en/class.mongodb-bson-objectidinterface.php
 */
interface ObjectIdInterface
{
    /**
     * @link https://www.php.net/manual/en/mongodb-bson-objectidinterface.gettimestamp.php
     * @return int Returns the timestamp component of this ObjectIdInterface.
     */
    public function getTimestamp();

    /**
     * Returns the hexadecimal representation of this ObjectId
     * @link https://www.php.net/manual/en/mongodb-bson-objectid.tostring.php
     * @return string Returns the hexadecimal representation of this ObjectId
     */
    public function __toString();
}
<?php

namespace MongoDB\BSON;

use DateTimeInterface;
use MongoDB\Driver\Exception\InvalidArgumentException;
use MongoDB\Driver\Exception\UnexpectedValueException;

/**
 * Represents a BSON date.
 * @link https://php.net/manual/en/class.mongodb-bson-utcdatetime.php
 */
final class UTCDateTime implements Type, UTCDateTimeInterface, \Serializable, \JsonSerializable
{
    /**
     * Construct a new UTCDateTime
     * @link https://php.net/manual/en/mongodb-bson-utcdatetime.construct.php
     * @param int|float|string|DateTimeInterface $milliseconds
     */
    final public function __construct($milliseconds = null) {}

    public static function __set_state(array $properties) {}

    /**
     * Returns the DateTime representation of this UTCDateTime
     * @link https://php.net/manual/en/mongodb-bson-utcdatetime.todatetime.php
     * @return \DateTime
     */
    final public function toDateTime() {}

    /**
     * Returns the string representation of this UTCDateTime
     * @link https://php.net/manual/en/mongodb-bson-utcdatetime.tostring.php
     * @return string
     */
    final public function __toString() {}

    /**
     * Serialize a UTCDateTime
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-utcdatetime.serialize.php
     * @return string
     * @throws InvalidArgumentException
     */
    final public function serialize() {}

    /**
     * Unserialize a UTCDateTime
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-utcdatetime.unserialize.php
     * @param string $serialized
     * @return void
     * @throws InvalidArgumentException on argument parsing errors or if the properties are invalid
     * @throws UnexpectedValueException if the properties cannot be unserialized (i.e. serialized was malformed)
     */
    final public function unserialize($serialized) {}

    /**
     * Returns a representation that can be converted to JSON
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-utcdatetime.jsonserialize.php
     * @return mixed data which can be serialized by json_encode()
     * @throws InvalidArgumentException on argument parsing errors
     */
    final public function jsonSerialize() {}
}
<?php

namespace MongoDB\BSON;

use MongoDB\Driver\Exception\InvalidArgumentException;
use MongoDB\Driver\Exception\UnexpectedValueException;

/**
 * Converts a BSON string to its Canonical Extended JSON representation.
 * The canonical format prefers type fidelity at the expense of concise output and is most suited for producing
 * output that can be converted back to BSON without any loss of type information
 * (e.g. numeric types will remain differentiated).
 * @link https://www.php.net/manual/en/function.mongodb.bson-tocanonicalextendedjson.php
 * @param string $bson BSON value to be converted
 * @return string The converted JSON value
 * @throws UnexpectedValueException
 */
function toCanonicalExtendedJSON($bson) {}

/**
 * Converts a BSON string to its » Relaxed Extended JSON representation.
 * The relaxed format prefers use of JSON type primitives at the expense of type fidelity and is most suited for
 * producing output that can be easily consumed by web APIs and humans.
 * @link https://www.php.net/manual/en/function.mongodb.bson-torelaxedextendedjson.php
 * @param string $bson BSON value to be converted
 * @return string The converted JSON value
 * @throws UnexpectedValueException
 */
function toRelaxedExtendedJSON($bson) {}

/**
 * Returns the BSON representation of a JSON value
 * Converts an extended JSON string to its BSON representation.
 * @link https://php.net/manual/en/function.mongodb.bson-fromjson.php
 * @param string $json JSON value to be converted.
 * @return string The serialized BSON document as a binary string.
 * @throws UnexpectedValueException if the JSON value cannot be converted to BSON (e.g. due to a syntax error).
 */
function fromJSON($json) {}

/**
 * Returns the BSON representation of a PHP value
 * Serializes a PHP array or object (e.g. document) to its BSON representation. The returned binary string will describe a BSON document.
 * @link https://php.net/manual/en/function.mongodb.bson-fromphp.php
 * @param array|object $value PHP value to be serialized.
 * @return string The serialized BSON document as a binary string
 * @throws UnexpectedValueException if the PHP value cannot be converted to BSON.
 */
function fromPHP($value) {}

/**
 * Returns the JSON representation of a BSON value
 * Converts a BSON string to its extended JSON representation.
 * @link https://php.net/manual/en/function.mongodb.bson-tojson.php
 * @param string $bson BSON value to be converted
 * @return string The converted JSON value.
 * @see https://docs.mongodb.org/manual/reference/mongodb-extended-json/
 * @throws UnexpectedValueException if the input did not contain exactly one BSON document
 */
function toJSON($bson) {}

/**
 * Returns the PHP representation of a BSON value
 * Unserializes a BSON document (i.e. binary string) to its PHP representation.
 * The typeMap parameter may be used to control the PHP types used for converting BSON arrays and documents (both root and embedded).
 * @link https://php.net/manual/en/function.mongodb.bson-tophp.php
 * @param string $bson BSON value to be unserialized.
 * @param array $typemap
 * @return object The unserialized PHP value
 * @throws UnexpectedValueException if the input did not contain exactly one BSON document.
 * @throws InvalidArgumentException if a class in the type map cannot be instantiated or does not implement MongoDB\BSON\Unserializable.
 */
function toPHP($bson, array $typemap = []) {}
<?php

namespace MongoDB\BSON;

use JsonSerializable;
use MongoDB\Driver\Exception\InvalidArgumentException;

/**
 * Class ObjectId
 * @link https://php.net/manual/en/class.mongodb-bson-objectid.php
 */
final class ObjectId implements Type, ObjectIdInterface, \Serializable, JsonSerializable
{
    /**
     * Construct a new ObjectId
     * @link https://php.net/manual/en/mongodb-bson-objectid.construct.php
     * @param string|null $id A 24-character hexadecimal string. If not provided, the driver will generate an ObjectId.
     * @throws InvalidArgumentException if id is not a 24-character hexadecimal string.
     */
    final public function __construct($id = null) {}

    /**
     * Returns the hexadecimal representation of this ObjectId
     * @link https://php.net/manual/en/mongodb-bson-objectid.tostring.php
     * @return string
     */
    final public function __toString() {}

    public static function __set_state(array $properties) {}

    /**
     * Returns the timestamp component of this ObjectId
     * @since 1.2.0
     * @link https://secure.php.net/manual/en/mongodb-bson-objectid.gettimestamp.php
     * @return int the timestamp component of this ObjectId
     */
    final public function getTimestamp() {}

    /**
     * Returns a representation that can be converted to JSON
     * @since 1.2.0
     * @link https://secure.php.net/manual/en/mongodb-bson-objectid.jsonserialize.php
     * @return mixed data which can be serialized by json_encode()
     */
    final public function jsonSerialize() {}

    /**
     * Serialize an ObjectId
     * @since 1.2.0
     * @link https://secure.php.net/manual/en/mongodb-bson-objectid.serialize.php
     * @return string the serialized representation of the object
     */
    final public function serialize() {}

    /**
     * Unserialize an ObjectId
     * @since 1.2.0
     * @link https://secure.php.net/manual/en/mongodb-bson-objectid.unserialize.php
     * @return void
     */
    final public function unserialize($serialized) {}
}
<?php

namespace MongoDB\BSON;

use JetBrains\PhpStorm\Deprecated;
use MongoDB\Driver\Exception\InvalidArgumentException;
use MongoDB\Driver\Exception\UnexpectedValueException;

/**
 * BSON type for the "Undefined" type. This BSON type is deprecated, and this class can not be instantiated. It will be created
 * from a BSON undefined type while converting BSON to PHP, and can also be converted back into BSON while storing documents in the database.
 *
 * @link https://secure.php.net/manual/en/class.mongodb-bson-undefined.php
 */
#[Deprecated]
final class Undefined implements Type, \Serializable, \JsonSerializable
{
    final private function __construct() {}

    /**
     * Serialize an Undefined
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-undefined.serialize.php
     * @return string
     * @throws InvalidArgumentException
     */
    final public function serialize() {}

    /**
     * Unserialize an Undefined
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-undefined.unserialize.php
     * @param string $serialized
     * @return void
     * @throws InvalidArgumentException on argument parsing errors or if the properties are invalid
     * @throws UnexpectedValueException if the properties cannot be unserialized (i.e. serialized was malformed)
     */
    final public function unserialize($serialized) {}

    /**
     * Returns a representation that can be converted to JSON
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-undefined.jsonserialize.php
     * @return mixed data which can be serialized by json_encode()
     * @throws InvalidArgumentException on argument parsing errors
     */
    final public function jsonSerialize() {}

    /**
     * Returns the Undefined as a string
     * @return string Returns the string representation of this Symbol.
     */
    final public function __toString() {}
}
<?php

namespace MongoDB\BSON;

/**
 * Classes that implement this interface may return data to be serialized as a BSON array or document in lieu of the object's public properties
 * @link https://php.net/manual/en/class.mongodb-bson-serializable.php
 */
interface Serializable extends Type
{
    /**
     * Provides an array or document to serialize as BSON
     * Called during serialization of the object to BSON. The method must return an array or stdClass.
     * Root documents (e.g. a MongoDB\BSON\Serializable passed to MongoDB\BSON\fromPHP()) will always be serialized as a BSON document.
     * For field values, associative arrays and stdClass instances will be serialized as a BSON document and sequential arrays (i.e. sequential, numeric indexes starting at 0) will be serialized as a BSON array.
     * @link https://php.net/manual/en/mongodb-bson-serializable.bsonserialize.php
     * @return array|object An array or stdClass to be serialized as a BSON array or document.
     */
    public function bsonSerialize();
}
<?php

namespace MongoDB\BSON;

/**
 * Interface Type
 * @link https://php.net/manual/en/class.mongodb-bson-type.php
 */
interface Type {}
<?php

namespace MongoDB\BSON;

/**
 * This interface is implemented by MongoDB\BSON\MaxKey but may also be used for type-hinting and userland classes.
 * @link https://www.php.net/manual/en/class.mongodb-bson-maxkeyinterface.php
 */
interface MaxKeyInterface {}
<?php

namespace MongoDB\BSON;

/**
 * Classes that implement this interface may be specified in a type map for unserializing BSON arrays and documents (both root and embedded).
 * @link https://php.net/manual/en/class.mongodb-bson-unserializable.php
 */
interface Unserializable extends Type
{
    /**
     * Constructs the object from a BSON array or document
     * Called during unserialization of the object from BSON.
     * The properties of the BSON array or document will be passed to the method as an array.
     * @link https://php.net/manual/en/mongodb-bson-unserializable.bsonunserialize.php
     * @param array $data Properties within the BSON array or document.
     */
    public function bsonUnserialize(array $data);
}
<?php

namespace MongoDB\BSON;

/**
 * This interface is implemented by MongoDB\BSON\Binary but may also be used for type-hinting and userland classes.
 * @link https://www.php.net/manual/en/class.mongodb-bson-binaryinterface.php
 */
interface BinaryInterface
{
    /**
     * @link https://www.php.net/manual/en/mongodb-bson-binaryinterface.getdata.php
     * @return string Returns the BinaryInterface's data
     */
    public function getData();

    /**
     * @link https://www.php.net/manual/en/mongodb-bson-binaryinterface.gettype.php
     * @return int Returns the BinaryInterface's type.
     */
    public function getType();

    /**
     * This method is an alias of: MongoDB\BSON\BinaryInterface::getData().
     * @link https://www.php.net/manual/en/mongodb-bson-binaryinterface.tostring.php
     * @return string Returns the BinaryInterface's data.
     */
    public function __toString();
}
<?php

namespace MongoDB\BSON;

/**
 * Interface JavascriptInterface
 *
 * @link https://secure.php.net/manual/en/class.mongodb-bson-javascriptinterface.php
 * @since 1.3.0
 */
interface JavascriptInterface
{
    /**
     * Returns the JavascriptInterface's code
     * @return string
     * @link https://secure.php.net/manual/en/mongodb-bson-javascriptinterface.getcode.php
     * @since 1.3.0
     */
    public function getCode();

    /**
     * Returns the JavascriptInterface's scope document
     * @return object|null
     * @link https://secure.php.net/manual/en/mongodb-bson-javascriptinterface.getscope.php
     * @since 1.3.0
     */
    public function getScope();

    /**
     * Returns the JavascriptInterface's code
     * @return string
     * @link https://secure.php.net/manual/en/mongodb-bson-javascriptinterface.tostring.php
     * @since 1.3.0
     */
    public function __toString();
}
<?php

namespace MongoDB\BSON;

use DateTime;

/**
 * This interface is implemented by MongoDB\BSON\UTCDateTime but may also be used for type-hinting and userland classes.
 * @link https://www.php.net/manual/en/class.mongodb-bson-utcdatetimeinterface.php
 */
interface UTCDateTimeInterface
{
    /**
     * @link https://www.php.net/manual/en/mongodb-bson-utcdatetimeinterface.todatetime.php
     * @return DateTime Returns the DateTime representation of this UTCDateTimeInterface. The returned DateTime should use the UTC time zone.
     */
    public function toDateTime();

    /**
     * Returns the string representation of this UTCDateTimeInterface
     * @link https://www.php.net/manual/en/mongodb-bson-utcdatetimeinterface.tostring.php
     * @return string
     */
    public function __toString();
}
<?php

namespace MongoDB\BSON;

use JetBrains\PhpStorm\Deprecated;
use MongoDB\Driver\Exception\InvalidArgumentException;
use MongoDB\Driver\Exception\UnexpectedValueException;

/**
 * BSON type for the "Symbol" type. This BSON type is deprecated, and this class can not be instantiated. It will be created from a
 * BSON symbol type while converting BSON to PHP, and can also be converted back into BSON while storing documents in the database.
 *
 * @link https://secure.php.net/manual/en/class.mongodb-bson-symbol.php
 */
#[Deprecated]
final class Symbol implements Type, \Serializable, \JsonSerializable
{
    final private function __construct() {}

    /**
     * Serialize a Symbol
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-symbol.serialize.php
     * @return string
     * @throws InvalidArgumentException
     */
    final public function serialize() {}

    /**
     * Unserialize a Symbol
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-symbol.unserialize.php
     * @param string $serialized
     * @return void
     * @throws InvalidArgumentException on argument parsing errors or if the properties are invalid
     * @throws UnexpectedValueException if the properties cannot be unserialized (i.e. serialized was malformed)
     */
    final public function unserialize($serialized) {}

    /**
     * Returns a representation that can be converted to JSON
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-symbol.jsonserialize.php
     * @return mixed data which can be serialized by json_encode()
     * @throws InvalidArgumentException on argument parsing errors
     */
    final public function jsonSerialize() {}

    /**
     * Returns the Symbol as a string
     * @return string Returns the string representation of this Symbol.
     */
    final public function __toString() {}
}
<?php

namespace MongoDB\BSON;

use JsonSerializable;
use MongoDB\Driver\Exception\InvalidArgumentException;
use MongoDB\Driver\Exception\UnexpectedValueException;

/**
 * Class MaxKey
 * @link https://php.net/manual/en/class.mongodb-bson-maxkey.php
 */
final class MaxKey implements Type, MaxKeyInterface, \Serializable, JsonSerializable
{
    public static function __set_state(array $properties) {}

    /**
     * Serialize a MaxKey
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-maxkey.serialize.php
     * @return string
     * @throws InvalidArgumentException
     */
    final public function serialize() {}

    /**
     * Unserialize a MaxKey
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-maxkey.unserialize.php
     * @param string $serialized
     * @return void
     * @throws InvalidArgumentException on argument parsing errors or if the properties are invalid
     * @throws UnexpectedValueException if the properties cannot be unserialized (i.e. serialized was malformed)
     */
    final public function unserialize($serialized) {}

    /**
     * Returns a representation that can be converted to JSON
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-maxkey.jsonserialize.php
     * @return mixed data which can be serialized by json_encode()
     * @throws InvalidArgumentException on argument parsing errors
     */
    final public function jsonSerialize() {}
}
<?php

namespace MongoDB\BSON;

use JsonSerializable;
use MongoDB\Driver\Exception\InvalidArgumentException;
use MongoDB\Driver\Exception\UnexpectedValueException;

/**
 * Represents a BSON timestamp, which is an internal MongoDB type not intended for general date storage.
 * @link https://php.net/manual/en/class.mongodb-bson-timestamp.php
 */
final class Timestamp implements TimestampInterface, Type, \Serializable, JsonSerializable
{
    /**
     * Construct a new Timestamp
     * @link https://php.net/manual/en/mongodb-bson-timestamp.construct.php
     * @param int $increment
     * @param int $timestamp
     */
    final public function __construct($increment, $timestamp) {}

    /**
     * Returns the string representation of this Timestamp
     * @link https://php.net/manual/en/mongodb-bson-timestamp.tostring.php
     * @return string
     */
    final public function __toString() {}

    public static function __set_state(array $properties) {}

    /**
     * Returns the increment component of this TimestampInterface
     * @link https://secure.php.net/manual/en/mongodb-bson-timestampinterface.getincrement.php
     * @return int
     * @since 1.3.0
     */
    final public function getIncrement() {}

    /**
     * Returns the timestamp component of this TimestampInterface
     * @link https://secure.php.net/manual/en/mongodb-bson-timestampinterface.gettimestamp.php
     * @return int
     * @since 1.3.0
     */
    final public function getTimestamp() {}

    /**
     * Serialize a Timestamp
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-timestamp.serialize.php
     * @return string
     * @throws InvalidArgumentException
     */
    final public function serialize() {}

    /**
     * Unserialize a Timestamp
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-timestamp.unserialize.php
     * @param string $serialized
     * @return void
     * @throws InvalidArgumentException on argument parsing errors or if the properties are invalid
     * @throws UnexpectedValueException if the properties cannot be unserialized (i.e. serialized was malformed)
     */
    final public function unserialize($serialized) {}

    /**
     * Returns a representation that can be converted to JSON
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-timestamp.jsonserialize.php
     * @return mixed data which can be serialized by json_encode()
     * @throws InvalidArgumentException on argument parsing errors
     */
    final public function jsonSerialize() {}
}
<?php

namespace MongoDB\BSON;

/**
 * @link https://www.php.net/manual/en/class.mongodb-bson-regexinterface.php
 * This interface is implemented by MongoDB\BSON\Regex but may also be used for type-hinting and userland classes.
 */
interface RegexInterface
{
    /**
     * @link https://www.php.net/manual/en/mongodb-bson-regexinterface.getflags.php
     * @return string Returns the RegexInterface's flags.
     */
    public function getFlags();

    /**
     * @link https://www.php.net/manual/en/mongodb-bson-regexinterface.getpattern.php
     * @return string Returns the RegexInterface's pattern.
     */
    public function getPattern();

    /**
     * Returns the string representation of this RegexInterface
     * @link https://www.php.net/manual/en/mongodb-bson-regexinterface.tostring.php
     * @return string
     */
    public function __toString();
}
<?php

namespace MongoDB\BSON;

use JsonSerializable;
use MongoDB\Driver\Exception\InvalidArgumentException;
use MongoDB\Driver\Exception\UnexpectedValueException;

/**
 * Class MinKey
 * @link https://php.net/manual/en/class.mongodb-bson-minkey.php
 */
final class MinKey implements Type, MinKeyInterface, \Serializable, JsonSerializable
{
    public static function __set_state(array $properties) {}

    /**
     * Serialize a MinKey
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-minkey.serialize.php
     * @return string
     * @throws InvalidArgumentException
     */
    final public function serialize() {}

    /**
     * Unserialize a MinKey
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-minkey.unserialize.php
     * @param string $serialized
     * @return void
     * @throws InvalidArgumentException on argument parsing errors or if the properties are invalid
     * @throws UnexpectedValueException if the properties cannot be unserialized (i.e. serialized was malformed)
     */
    final public function unserialize($serialized) {}

    /**
     * Returns a representation that can be converted to JSON
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-minkey.jsonserialize.php
     * @return mixed data which can be serialized by json_encode()
     * @throws InvalidArgumentException on argument parsing errors
     */
    final public function jsonSerialize() {}
}
<?php

namespace MongoDB\BSON;

use JsonSerializable;
use MongoDB\Driver\Exception\InvalidArgumentException;
use MongoDB\Driver\Exception\UnexpectedValueException;

/**
 * Class Binary
 * @link https://php.net/manual/en/class.mongodb-bson-binary.php
 */
final class Binary implements Type, BinaryInterface, \Serializable, JsonSerializable
{
    public const TYPE_GENERIC = 0;
    public const TYPE_FUNCTION = 1;
    public const TYPE_OLD_BINARY = 2;
    public const TYPE_OLD_UUID = 3;
    public const TYPE_UUID = 4;
    public const TYPE_MD5 = 5;

    /**
     * @since 1.7.0
     */
    public const TYPE_ENCRYPTED = 6;
    public const TYPE_USER_DEFINED = 128;

    /**
     * Binary constructor.
     * @link https://php.net/manual/en/mongodb-bson-binary.construct.php
     * @param string $data
     * @param int $type
     */
    final public function __construct($data, $type) {}

    /**
     * Returns the Binary's data
     * @link https://php.net/manual/en/mongodb-bson-binary.getdata.php
     * @return string
     */
    final public function getData() {}

    /**
     * Returns the Binary's type
     * @link https://php.net/manual/en/mongodb-bson-binary.gettype.php
     * @return int
     */
    final public function getType() {}

    public static function __set_state(array $properties) {}

    /**
     * Returns the Binary's data
     * @link https://www.php.net/manual/en/mongodb-bson-binary.tostring.php
     * @return string
     */
    final public function __toString() {}

    /**
     * Serialize a Binary
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-binary.serialize.php
     * @return string
     * @throws InvalidArgumentException
     */
    final public function serialize() {}

    /**
     * Unserialize a Binary
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-binary.unserialize.php
     * @param string $serialized
     * @return void
     * @throws InvalidArgumentException on argument parsing errors or if the properties are invalid
     * @throws UnexpectedValueException if the properties cannot be unserialized (i.e. serialized was malformed)
     */
    final public function unserialize($serialized) {}

    /**
     * Returns a representation that can be converted to JSON
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-binary.jsonserialize.php
     * @return mixed data which can be serialized by json_encode()
     * @throws InvalidArgumentException on argument parsing errors
     */
    final public function jsonSerialize() {}
}
<?php

namespace MongoDB\BSON;

use JetBrains\PhpStorm\Deprecated;
use MongoDB\Driver\Exception\InvalidArgumentException;
use MongoDB\Driver\Exception\UnexpectedValueException;

/**
 * BSON type for a 64-bit integer. This class cannot be instantiated and is only created during BSON decoding when a 64-bit
 * integer cannot be represented as a PHP integer on a 32-bit platform. Versions of the driver before 1.5.0 would throw an
 * exception when attempting to decode a 64-bit integer on a 32-bit platform.
 * During BSON encoding, objects of this class will convert back to a 64-bit integer type. This allows 64-bit integers to be
 * roundtripped through a 32-bit PHP environment without any loss of precision. The __toString() method allows the 64-bit integer
 * value to be accessed as a string.
 *
 * @since 1.5.0
 * @link https://secure.php.net/manual/en/class.mongodb-bson-int64.php
 */
#[Deprecated]
final class Int64 implements Type, \Serializable, \JsonSerializable
{
    final private function __construct() {}

    /**
     * Serialize an Int64
     * @link https://www.php.net/manual/en/mongodb-bson-int64.serialize.php
     * @return string
     * @throws InvalidArgumentException
     */
    final public function serialize() {}

    /**
     * Unserialize an Int64
     * @link https://www.php.net/manual/en/mongodb-bson-int64.unserialize.php
     * @param string $serialized
     * @return void
     * @throws InvalidArgumentException on argument parsing errors or if the properties are invalid
     * @throws UnexpectedValueException if the properties cannot be unserialized (i.e. serialized was malformed)
     */
    final public function unserialize($serialized) {}

    /**
     * Returns a representation that can be converted to JSON
     * @link https://www.php.net/manual/en/mongodb-bson-int64.jsonserialize.php
     * @return mixed data which can be serialized by json_encode()
     * @throws InvalidArgumentException on argument parsing errors
     */
    final public function jsonSerialize() {}

    /**
     * Returns the Symbol as a string
     * @return string Returns the string representation of this Symbol.
     */
    final public function __toString() {}
}
<?php

namespace MongoDB\BSON;

use JsonSerializable;
use MongoDB\Driver\Exception\InvalidArgumentException;
use MongoDB\Driver\Exception\UnexpectedValueException;

/**
 * Class Regex
 * @link https://php.net/manual/en/class.mongodb-bson-regex.php
 */
final class Regex implements Type, RegexInterface, \Serializable, JsonSerializable
{
    /**
     * Construct a new Regex
     * @link https://php.net/manual/en/mongodb-bson-regex.construct.php
     * @param string $pattern
     * @param string $flags [optional]
     */
    final public function __construct($pattern, $flags = "") {}

    /**
     * Returns the Regex's flags
     * @link https://php.net/manual/en/mongodb-bson-regex.getflags.php
     */
    final public function getFlags() {}

    /**
     * Returns the Regex's pattern
     * @link https://php.net/manual/en/mongodb-bson-regex.getpattern.php
     * @return string
     */
    final public function getPattern() {}

    /**
     * Returns the string representation of this Regex
     * @link https://php.net/manual/en/mongodb-bson-regex.tostring.php
     * @return string
     */
    final public function __toString() {}

    public static function __set_state(array $properties) {}

    /**
     * Serialize a Regex
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-regex.serialize.php
     * @return string
     * @throws InvalidArgumentException
     */
    final public function serialize() {}

    /**
     * Unserialize a Regex
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-regex.unserialize.php
     * @param string $serialized
     * @return void
     * @throws InvalidArgumentException on argument parsing errors or if the properties are invalid
     * @throws UnexpectedValueException if the properties cannot be unserialized (i.e. serialized was malformed)
     */
    final public function unserialize($serialized) {}

    /**
     * Returns a representation that can be converted to JSON
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-regex.jsonserialize.php
     * @return mixed data which can be serialized by json_encode()
     * @throws InvalidArgumentException on argument parsing errors
     */
    final public function jsonSerialize() {}
}
<?php

namespace MongoDB\BSON;

use JetBrains\PhpStorm\Deprecated;
use MongoDB\Driver\Exception\InvalidArgumentException;
use MongoDB\Driver\Exception\UnexpectedValueException;

/**
 * BSON type for the "DbPointer" type. This BSON type is deprecated, and this class can not be instantiated. It will be created from a
 * BSON symbol type while converting BSON to PHP, and can also be converted back into BSON while storing documents in the database.
 *
 * @since 1.4.0
 * @link https://secure.php.net/manual/en/class.mongodb-bson-dbpointer.php
 */
#[Deprecated]
final class DBPointer implements Type, \Serializable, \JsonSerializable
{
    final private function __construct() {}

    /**
     * Serialize a DBPointer
     *
     * @link https://www.php.net/manual/en/mongodb-bson-dbpointer.serialize.php
     * @return string
     * @throws InvalidArgumentException
     */
    final public function serialize() {}

    /**
     * Unserialize a DBPointer
     *
     * @link https://www.php.net/manual/en/mongodb-bson-dbpointer.unserialize.php
     *
     * @param string $serialized
     *
     * @return void
     * @throws InvalidArgumentException on argument parsing errors or if the properties are invalid
     * @throws UnexpectedValueException if the properties cannot be unserialized (i.e. serialized was malformed)
     */
    final public function unserialize($serialized) {}

    /**
     * Returns a representation that can be converted to JSON
     *
     * @link https://www.php.net/manual/en/mongodb-bson-dbpointer.jsonserialize.php
     * @return mixed data which can be serialized by json_encode()
     * @throws InvalidArgumentException on argument parsing errors
     */
    final public function jsonSerialize() {}

    /**
     * Returns the Symbol as a string
     *
     * @return string Returns the string representation of this Symbol.
     */
    final public function __toString() {}
}
<?php

namespace MongoDB\BSON;

/**
 * Classes may implement this interface to take advantage of automatic ODM (object document mapping) behavior in the driver.
 * @link https://php.net/manual/en/class.mongodb-bson-persistable.php
 */
interface Persistable extends Unserializable, Serializable {}
<?php

namespace MongoDB\BSON;

use JsonSerializable;
use MongoDB\Driver\Exception\InvalidArgumentException;
use MongoDB\Driver\Exception\UnexpectedValueException;

/**
 * BSON type for the Decimal128 floating-point format, which supports numbers with up to 34 decimal digits (i.e. significant digits) and an exponent range of −6143 to +6144.
 * @link https://php.net/manual/en/class.mongodb-bson-decimal128.php
 */
final class Decimal128 implements Type, Decimal128Interface, \Serializable, JsonSerializable
{
    /**
     * Construct a new Decimal128
     * @link https://php.net/manual/en/mongodb-bson-decimal128.construct.php
     * @param string $value A decimal string.
     */
    final public function __construct($value = '') {}

    /**
     * Returns the string representation of this Decimal128
     * @link https://php.net/manual/en/mongodb-bson-decimal128.tostring.php
     * @return string
     */
    final public function __toString() {}

    public static function __set_state(array $properties) {}

    /**
     * Serialize a Decimal128
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-decimal128.serialize.php
     * @return string
     * @throws InvalidArgumentException
     */
    final public function serialize() {}

    /**
     * Unserialize a Decimal128
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-decimal128.unserialize.php
     * @param string $serialized
     * @return void
     * @throws InvalidArgumentException on argument parsing errors or if the properties are invalid
     * @throws UnexpectedValueException if the properties cannot be unserialized (i.e. serialized was malformed)
     */
    final public function unserialize($serialized) {}

    /**
     * Returns a representation that can be converted to JSON
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-decimal128.jsonserialize.php
     * @return mixed data which can be serialized by json_encode()
     * @throws InvalidArgumentException on argument parsing errors
     */
    final public function jsonSerialize() {}
}
<?php

namespace MongoDB\BSON;

/**
 * This interface is implemented by MongoDB\BSON\Decimal128 but may also be used for type-hinting and userland classes.
 * @link https://www.php.net/manual/en/class.mongodb-bson-decimal128interface.php
 */
interface Decimal128Interface
{
    /**
     * Returns the string representation of this Decimal128Interface
     * @link https://www.php.net/manual/en/mongodb-bson-decimal128interface.tostring.php
     * @return string Returns the string representation of this Decimal128Interface
     */
    public function __toString();
}
<?php

namespace MongoDB\BSON;

/**
 * This interface is implemented by MongoDB\BSON\MinKey but may also be used for type-hinting and userland classes.
 * @link https://www.php.net/manual/en/class.mongodb-bson-minkeyinterface.php
 */
interface MinKeyInterface {}
<?php

namespace MongoDB\BSON;

use JsonSerializable;
use MongoDB\Driver\Exception\InvalidArgumentException;
use MongoDB\Driver\Exception\UnexpectedValueException;

/**
 * Class Javascript
 * @link https://php.net/manual/en/class.mongodb-bson-javascript.php
 */
final class Javascript implements Type, JavascriptInterface, \Serializable, JsonSerializable
{
    /**
     * Construct a new Javascript
     * @link https://php.net/manual/en/mongodb-bson-javascript.construct.php
     * @param string $javascript
     * @param array|object $scope
     */
    final public function __construct($javascript, $scope = []) {}

    public static function __set_state(array $properties) {}

    /**
     * Returns the Javascript's code
     * @return string
     * @link https://secure.php.net/manual/en/mongodb-bson-javascript.getcode.php
     */
    final public function getCode() {}

    /**
     * Returns the Javascript's scope document
     * @return object|null
     * @link https://secure.php.net/manual/en/mongodb-bson-javascript.getscope.php
     */
    final public function getScope() {}

    /**
     * Returns the Javascript's code
     * @return string
     * @link https://secure.php.net/manual/en/mongodb-bson-javascript.tostring.php
     */
    final public function __toString() {}

    /**
     * Serialize a Javascript
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-javascript.serialize.php
     * @return string
     * @throws InvalidArgumentException
     */
    final public function serialize() {}

    /**
     * Unserialize a Javascript
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-javascript.unserialize.php
     * @param string $serialized
     * @return void
     * @throws InvalidArgumentException on argument parsing errors or if the properties are invalid
     * @throws UnexpectedValueException if the properties cannot be unserialized (i.e. serialized was malformed)
     */
    final public function unserialize($serialized) {}

    /**
     * Returns a representation that can be converted to JSON
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-bson-javascript.jsonserialize.php
     * @return mixed data which can be serialized by json_encode()
     * @throws InvalidArgumentException on argument parsing errors
     */
    final public function jsonSerialize() {}
}
<?php

namespace MongoDB\Driver;

use MongoDB\BSON\Serializable;
use MongoDB\Driver\Exception\InvalidArgumentException;
use MongoDB\Driver\Exception\UnexpectedValueException;

/**
 * Class ReadPreference
 * @link https://php.net/manual/en/class.mongodb-driver-readpreference.php
 */
final class ReadPreference implements Serializable, \Serializable
{
    public const RP_PRIMARY = 1;
    public const RP_PRIMARY_PREFERRED = 5;
    public const RP_SECONDARY = 2;
    public const RP_SECONDARY_PREFERRED = 6;
    public const RP_NEAREST = 10;

    /**
     * @since 1.7.0
     */
    public const PRIMARY = 'primary';

    /**
     * @since 1.7.0
     */
    public const PRIMARY_PREFERRED = 'primaryPreferred';

    /**
     * @since 1.7.0
     */
    public const SECONDARY = 'secondary';

    /**
     * @since 1.7.0
     */
    public const SECONDARY_PREFERRED = 'secondaryPreferred';

    /**
     * @since 1.7.0
     */
    public const NEAREST = 'nearest';

    /**
     * @since 1.2.0
     */
    public const NO_MAX_STALENESS = -1;

    /**
     * @since 1.2.0
     */
    public const SMALLEST_MAX_STALENESS_SECONDS = 90;

    /**
     * Construct immutable ReadPreference
     * @link https://php.net/manual/en/mongodb-driver-readpreference.construct.php
     * @param string|int $mode
     * @param array|null $tagSets
     * @param array $options
     * @throws InvalidArgumentException if mode is invalid or if tagSets is provided for a primary read preference.
     */
    final public function __construct($mode, ?array $tagSets = null, ?array $options = []) {}

    public static function __set_state(array $properties) {}

    /**
     * Returns the ReadPreference's "hedge" option
     * @since 1.8.0
     * @link https://www.php.net/manual/en/mongodb-driver-readpreference.gethedge.php
     * @return object|null
     */
    final public function getHedge() {}

    /**
     * Returns the ReadPreference's "mode" option
     * @link https://php.net/manual/en/mongodb-driver-readpreference.getmode.php
     * @return int
     */
    final public function getMode() {}

    /**
     * Returns the ReadPreference's "mode" option as a string
     * @since 1.7.0
     * @link https://php.net/manual/en/mongodb-driver-readpreference.getmodestring.php
     * @return string
     * @throws InvalidArgumentException
     */
    final public function getModeString() {}

    /**
     * Returns the ReadPreference's "tagSets" option
     * @link https://php.net/manual/en/mongodb-driver-readpreference.gettagsets.php
     * @return array
     */
    final public function getTagSets() {}

    /**
     * Returns an object for BSON serialization
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-driver-readpreference.bsonserialize.php
     * @return object Returns an object for serializing the WriteConcern as BSON.
     * @throws InvalidArgumentException
     */
    final public function bsonSerialize() {}

    /**
     * Serialize a ReadPreference
     * @since 1.7.0
     * @link https://php.net/manual/en/mongodb-driver-readpreference.serialize.php
     * @return string
     * @throws InvalidArgumentException
     */
    final public function serialize() {}

    /**
     * Unserialize a ReadPreference
     * @since 1.7.0
     * @link https://php.net/manual/en/mongodb-driver-readpreference.unserialize.php
     * @param string $serialized
     * @return void
     * @throws InvalidArgumentException on argument parsing errors or if the properties are invalid
     * @throws UnexpectedValueException if the properties cannot be unserialized (i.e. serialized was malformed)
     */
    final public function unserialize($serialized) {}

    final public function getMaxStalenessSeconds() {}
}
<?php

namespace MongoDB\Driver\Monitoring;

/**
 * Registers a new monitoring event subscriber with the driver.
 * Registered subscribers will be notified of monitoring events through specific methods.
 * Note: If the object is already registered, this function is a no-op.
 * @link https://secure.php.net/manual/en/function.mongodb.driver.monitoring.addsubscriber.php
 * @param Subscriber $subscriber A monitoring event subscriber object to register.
 * @return void
 * @throws \InvalidArgumentException on argument parsing errors.
 * @since 1.3.0
 */
function addSubscriber(Subscriber $subscriber) {}

/**
 * Unregisters an existing monitoring event subscriber from the driver.
 * Unregistered subscribers will no longer be notified of monitoring events.
 * Note: If the object is not registered, this function is a no-op.
 * @link https://secure.php.net/manual/en/function.mongodb.driver.monitoring.removesubscriber.php
 * @param Subscriber $subscriber A monitoring event subscriber object to register.
 * @throws \InvalidArgumentException on argument parsing errors.
 * @since 1.3.0
 */
function removeSubscriber(Subscriber $subscriber) {}
<?php

namespace MongoDB\Driver\Monitoring;

/**
 * Classes may implement this interface to register an event subscriber that is notified for each started, successful, and failed command event.
 * @see https://secure.php.net/manual/en/mongodb.tutorial.apm.php
 * @link https://secure.php.net/manual/en/class.mongodb-driver-monitoring-commandsubscriber.php
 * @since 1.3.0
 */
interface CommandSubscriber extends Subscriber
{
    /**
     * Notification method for a failed command.
     * If the subscriber has been registered with MongoDB\Driver\Monitoring\addSubscriber(), the driver will call this method when a command has failed.
     * @link https://secure.php.net/manual/en/mongodb-driver-monitoring-commandsubscriber.commandfailed.php
     * @param CommandFailedEvent $event An event object encapsulating information about the failed command.
     * @return void
     * @throws \InvalidArgumentException on argument parsing errors.
     * @since 1.3.0
     */
    public function commandFailed(CommandFailedEvent $event);

    /**
     * Notification method for a started command.
     * If the subscriber has been registered with MongoDB\Driver\Monitoring\addSubscriber(), the driver will call this method when a command has started.
     * @link https://secure.php.net/manual/en/mongodb-driver-monitoring-commandsubscriber.commandstarted.php
     * @param CommandStartedEvent $event An event object encapsulating information about the started command.
     * @return void
     * @throws \InvalidArgumentException on argument parsing errors.
     * @since 1.3.0
     */
    public function commandStarted(CommandStartedEvent $event);

    /**
     * Notification method for a successful command.
     * If the subscriber has been registered with MongoDB\Driver\Monitoring\addSubscriber(), the driver will call this method when a command has succeeded.
     * @link https://secure.php.net/manual/en/mongodb-driver-monitoring-commandsubscriber.commandsucceeded.php
     * @param CommandSucceededEvent $event An event object encapsulating information about the successful command.
     * @return void
     * @throws \InvalidArgumentException on argument parsing errors.
     * @since 1.3.0
     */
    public function commandSucceeded(CommandSucceededEvent $event);
}
<?php

namespace MongoDB\Driver\Monitoring;

/**
 * Encapsulates information about a failed command.
 * @link https://secure.php.net/manual/en/class.mongodb-driver-monitoring-commandstartedevent.php
 * @since 1.3.0
 */
class CommandStartedEvent
{
    final private function __construct() {}

    final public function __wakeup() {}

    /**
     * Returns the command document
     * The reply document will be converted from BSON to PHP using the default deserialization rules (e.g. BSON documents will be converted to stdClass).
     * @link   https://secure.php.net/manual/en/mongodb-driver-monitoring-commandstartedevent.getcommand.php
     * @return object the command document as a stdClass object.
     * @throws \InvalidArgumentException on argument parsing errors.
     * @since 1.3.0
     */
    final public function getCommand() {}

    /**
     * Returns the command name.
     * @link   https://secure.php.net/manual/en/mongodb-driver-monitoring-commandstartedevent.getcommandname.php
     * @return string The command name (e.g. "find", "aggregate").
     * @throws \InvalidArgumentException on argument parsing errors.
     * @since 1.3.0
     */
    final public function getCommandName() {}

    /**
     * Returns the database on which the command was executed.
     * @link https://secure.php.net/manual/en/mongodb-driver-monitoring-commandstartedevent.getdatabasename.php
     * @return string the database on which the command was executed.
     * @throws \InvalidArgumentException on argument parsing errors.
     * @since 1.3.0
     */
    final public function getDatabaseName() {}

    /**
     * Returns the command's operation ID.
     * The operation ID is generated by the driver and may be used to link events together such as bulk write operations, which may have been split across several commands at the protocol level.
     * Note: Since multiple commands may share the same operation ID, it is not reliable to use this value to associate event objects with each other. The request ID returned by MongoDB\Driver\Monitoring\CommandSucceededEvent::getRequestId() should be used instead.
     * @link   https://secure.php.net/manual/en/mongodb-driver-monitoring-commandstartedevent.getoperationid.php
     * @return string the command's operation ID.
     * @throws \InvalidArgumentException on argument parsing errors.
     * @since 1.3.0
     */
    final public function getOperationId() {}

    /**
     * Returns the command's request ID.
     * The request ID is generated by the driver and may be used to associate this CommandSucceededEvent with a previous CommandStartedEvent.
     * @link https://secure.php.net/manual/en/mongodb-driver-monitoring-commandstartedevent.getrequestid.php
     * @return string the command's request ID.
     * @throws \InvalidArgumentException on argument parsing errors.
     * @since 1.3.0
     */
    final public function getRequestId() {}

    /**
     * Returns the Server on which the command was executed.
     * @link https://secure.php.net/manual/en/mongodb-driver-monitoring-commandstartedevent.getserver.php
     * @return \MongoDB\Driver\Server on which the command was executed.
     * @since 1.3.0
     */
    final public function getServer() {}
}
<?php

namespace MongoDB\Driver\Monitoring;

/**
 * Base interface for event subscribers.
 * This is used for type-hinting MongoDB\Driver\Monitoring\addSubscriber() and MongoDB\Driver\Monitoring\removeSubscriber() and should not be implemented directly.
 * This interface has no methods. Its only purpose is to be the base interface for all event subscribers.
 * @link https://secure.php.net/manual/en/class.mongodb-driver-monitoring-subscriber.php
 * @since 1.3.0
 */
interface Subscriber {}
<?php

namespace MongoDB\Driver\Monitoring;

/**
 * Encapsulates information about a failed command.
 * @link https://secure.php.net/manual/en/class.mongodb-driver-monitoring-commandfailedevent.php
 * @since 1.3.0
 */
class CommandFailedEvent
{
    final private function __construct() {}

    final public function __wakeup() {}

    /**
     * Returns the command name.
     * @link   https://secure.php.net/manual/en/mongodb-driver-monitoring-commandfailedevent.getcommandname.php
     * @return string The command name (e.g. "find", "aggregate").
     * @throws \InvalidArgumentException on argument parsing errors.
     * @since 1.3.0
     */
    final public function getCommandName() {}

    /**
     * Returns the command's duration in microseconds
     * The command's duration is a calculated value that includes the time to send the message and receive the reply from the server.
     * @link   https://secure.php.net/manual/en/mongodb-driver-monitoring-commandfailedevent.getdurationmicros.php
     * @return int the command's duration in microseconds.
     * @throws \InvalidArgumentException on argument parsing errors.
     * @since 1.3.0
     */
    final public function getDurationMicros() {}

    /**
     * Returns the Exception associated with the failed command
     * @link   https://secure.php.net/manual/en/mongodb-driver-monitoring-commandfailedevent.geterror.php
     * @return \Exception
     * @throws \InvalidArgumentException on argument parsing errors.
     * @since 1.3.0
     */
    final public function getError() {}

    /**
     * Returns the command's operation ID.
     * The operation ID is generated by the driver and may be used to link events together such as bulk write operations, which may have been split across several commands at the protocol level.
     * Note: Since multiple commands may share the same operation ID, it is not reliable to use this value to associate event objects with each other. The request ID returned by MongoDB\Driver\Monitoring\CommandSucceededEvent::getRequestId() should be used instead.
     * @link   https://secure.php.net/manual/en/mongodb-driver-monitoring-commandfailedevent.getoperationid.php
     * @return string the command's operation ID.
     * @throws \InvalidArgumentException on argument parsing errors.
     * @since 1.3.0
     */
    final public function getOperationId() {}

    /**
     * Returns the command reply document.
     * The reply document will be converted from BSON to PHP using the default deserialization rules (e.g. BSON documents will be converted to stdClass).
     * @link https://secure.php.net/manual/en/mongodb-driver-monitoring-commandfailedevent.getreply.php
     * @return object the command reply document as a stdClass object.
     * @throws \InvalidArgumentException on argument parsing errors.
     * @since 1.3.0
     */
    final public function getReply() {}

    /**
     * Returns the command's request ID.
     * The request ID is generated by the driver and may be used to associate this CommandSucceededEvent with a previous CommandStartedEvent.
     * @link https://secure.php.net/manual/en/mongodb-driver-monitoring-commandfailedevent.getrequestid.php
     * @return string the command's request ID.
     * @throws \InvalidArgumentException on argument parsing errors.
     * @since 1.3.0
     */
    final public function getRequestId() {}

    /**
     * Returns the Server on which the command was executed.
     * @link https://secure.php.net/manual/en/mongodb-driver-monitoring-commandfailedevent.getserver.php
     * @return \MongoDB\Driver\Server on which the command was executed.
     * @since 1.3.0
     */
    final public function getServer() {}
}
<?php

namespace MongoDB\Driver\Monitoring;

/**
 * Encapsulates information about a successful command.
 * @link https://secure.php.net/manual/en/class.mongodb-driver-monitoring-commandsucceededevent.php
 * @since 1.3.0
 */
class CommandSucceededEvent
{
    final private function __construct() {}

    final public function __wakeup() {}

    /**
     * Returns the command name.
     * @link   https://secure.php.net/manual/en/mongodb-driver-monitoring-commandsucceededevent.getcommandname.php
     * @return string The command name (e.g. "find", "aggregate").
     * @throws \InvalidArgumentException on argument parsing errors.
     * @since 1.3.0
     */
    final public function getCommandName() {}

    /**
     * Returns the command's duration in microseconds
     * The command's duration is a calculated value that includes the time to send the message and receive the reply from the server.
     * @link   https://secure.php.net/manual/en/mongodb-driver-monitoring-commandsucceededevent.getdurationmicros.php
     * @return int the command's duration in microseconds.
     * @throws \InvalidArgumentException on argument parsing errors.
     * @since 1.3.0
     */
    final public function getDurationMicros() {}

    /**
     * Returns the command's operation ID.
     * The operation ID is generated by the driver and may be used to link events together such as bulk write operations, which may have been split across several commands at the protocol level.
     * Note: Since multiple commands may share the same operation ID, it is not reliable to use this value to associate event objects with each other. The request ID returned by MongoDB\Driver\Monitoring\CommandSucceededEvent::getRequestId() should be used instead.
     * @link   https://secure.php.net/manual/en/mongodb-driver-monitoring-commandsucceededevent.getoperationid.php
     * @return string the command's operation ID.
     * @throws \InvalidArgumentException on argument parsing errors.
     * @since 1.3.0
     */
    final public function getOperationId() {}

    /**
     * Returns the command reply document.
     * The reply document will be converted from BSON to PHP using the default deserialization rules (e.g. BSON documents will be converted to stdClass).
     * @link https://secure.php.net/manual/en/mongodb-driver-monitoring-commandsucceededevent.getreply.php
     * @return object the command reply document as a stdClass object.
     * @throws \InvalidArgumentException on argument parsing errors.
     * @since 1.3.0
     */
    final public function getReply() {}

    /**
     * Returns the command's request ID.
     * The request ID is generated by the driver and may be used to associate this CommandSucceededEvent with a previous CommandStartedEvent.
     * @link https://secure.php.net/manual/en/mongodb-driver-monitoring-commandsucceededevent.getrequestid.php
     * @return string the command's request ID.
     * @throws \InvalidArgumentException on argument parsing errors.
     * @since 1.3.0
     */
    final public function getRequestId() {}

    /**
     * Returns the Server on which the command was executed.
     * @link https://secure.php.net/manual/en/mongodb-driver-monitoring-commandsucceededevent.getserver.php
     * @return \MongoDB\Driver\Server on which the command was executed.
     * @since 1.3.0
     */
    final public function getServer() {}
}
<?php

namespace MongoDB\Driver;

use MongoDB\BSON\Serializable;
use MongoDB\Driver\Exception\InvalidArgumentException;
use MongoDB\Driver\Exception\UnexpectedValueException;

/**
 * WriteConcern controls the acknowledgment of a write operation, specifies the level of write guarantee for Replica Sets.
 */
final class WriteConcern implements Serializable, \Serializable
{
    /**
     * Majority of all the members in the set; arbiters, non-voting members, passive members, hidden members and delayed members are all included in the definition of majority write concern.
     */
    public const MAJORITY = 'majority';

    /**
     * Construct immutable WriteConcern
     * @link https://php.net/manual/en/mongodb-driver-writeconcern.construct.php
     * @param string|int $w
     * @param int $wtimeout How long to wait (in milliseconds) for secondaries before failing.
     * @param bool $journal Wait until mongod has applied the write to the journal.
     * @throws InvalidArgumentException on argument parsing errors.
     */
    final public function __construct($w, $wtimeout = 0, $journal = false) {}

    public static function __set_state(array $properties) {}

    /**
     * Returns the WriteConcern's "journal" option
     * @link https://php.net/manual/en/mongodb-driver-writeconcern.getjournal.php
     * @return bool|null
     */
    final public function getJournal() {}

    /**
     * Returns the WriteConcern's "w" option
     * @link https://php.net/manual/en/mongodb-driver-writeconcern.getw.php
     * @return string|int|null
     */
    final public function getW() {}

    /**
     * Returns the WriteConcern's "wtimeout" option
     * @link https://php.net/manual/en/mongodb-driver-writeconcern.getwtimeout.php
     * @return int
     */
    final public function getWtimeout() {}

    /**
     * Returns an object for BSON serialization
     * @since 1.2.0
     * @link https://www.php.net/manual/en/mongodb-driver-writeconcern.bsonserialize.php
     * @return object Returns an object for serializing the WriteConcern as BSON.
     * @throws InvalidArgumentException
     */
    final public function bsonSerialize() {}

    /**
     * Serialize a WriteConcern
     * @since 1.7.0
     * @link https://php.net/manual/en/mongodb-driver-writeconcern.serialize.php
     * @return string
     * @throws InvalidArgumentException
     */
    final public function serialize() {}

    /**
     * Unserialize a WriteConcern
     * @since 1.7.0
     * @link https://php.net/manual/en/mongodb-driver-writeconcern.unserialize.php
     * @param string $serialized
     * @return void
     * @throws InvalidArgumentException on argument parsing errors or if the properties are invalid
     * @throws UnexpectedValueException if the properties cannot be unserialized (i.e. serialized was malformed)
     */
    final public function unserialize($serialized) {}

    final public function isDefault() {}
}
<?php

namespace MongoDB\Driver;

use MongoDB\BSON\Serializable;
use MongoDB\Driver\Exception\InvalidArgumentException;
use MongoDB\Driver\Exception\UnexpectedValueException;

/**
 * MongoDB\Driver\ReadConcern controls the level of isolation for read operations for replica sets and replica set shards. This option requires the WiredTiger storage engine and MongoDB 3.2 or later.
 * @link https://php.net/manual/en/class.mongodb-driver-readconcern.php
 * @since 1.1.0
 */
final class ReadConcern implements Serializable, \Serializable
{
    /**
     * @since 1.2.0
     */
    public const LINEARIZABLE = 'linearizable';
    public const LOCAL = 'local';
    public const MAJORITY = 'majority';

    /**
     * @since 1.4.0
     */
    public const AVAILABLE = 'available';

    /**
     * Construct immutable ReadConcern
     * @link https://php.net/manual/en/mongodb-driver-readconcern.construct.php
     * @param string $level
     */
    final public function __construct($level = null) {}

    public static function __set_state(array $properties) {}

    /**
     * Returns the ReadConcern's "level" option
     * @link https://php.net/manual/en/mongodb-driver-readconcern.getlevel.php
     * @return string|null
     * @since 1.0.0
     */
    final public function getLevel() {}

    /**
     * Returns an object for BSON serialization
     * @link https://php.net/manual/en/mongodb-driver-readconcern.bsonserialize.php
     * @return object
     * @since 1.2.0
     */
    final public function bsonSerialize() {}

    /**
     * Checks if this is the default read concern
     * @link https://secure.php.net/manual/en/mongodb-driver-readconcern.isdefault.php
     * @return bool
     * @since 1.3.0
     * @throws \MongoDB\Driver\Exception\InvalidArgumentException On argument parsing errors.
     */
    final public function isDefault() {}

    /**
     * Serialize a ReadConcern
     * @since 1.7.0
     * @link https://php.net/manual/en/mongodb-driver-readconcern.serialize.php
     * @return string
     * @throws InvalidArgumentException
     */
    final public function serialize() {}

    /**
     * Unserialize a ReadConcern
     * @since 1.7.0
     * @link https://php.net/manual/en/mongodb-driver-readconcern.unserialize.php
     * @param string $serialized
     * @return void
     * @throws InvalidArgumentException on argument parsing errors or if the properties are invalid
     * @throws UnexpectedValueException if the properties cannot be unserialized (i.e. serialized was malformed)
     */
    final public function unserialize($serialized) {}
}
<?php

namespace MongoDB\Driver;

use MongoDB\Driver\Exception\InvalidArgumentException;

/**
 * The MongoDB\Driver\Command class is a value object that represents a database command.
 * To provide "Command Helpers" the MongoDB\Driver\Command object should be composed.
 * @link https://php.net/manual/en/class.mongodb-driver-command.php
 * @since 1.0.0
 */
final class Command
{
    /**
     * Construct new Command
     * @param array|object $document The complete command to construct
     * @param array $options Do not use this parameter to specify options described in the command's reference in the MongoDB manual.
     * @throws InvalidArgumentException on argument parsing errors.
     * @link https://secure.php.net/manual/en/mongodb-driver-command.construct.php
     * @since 1.0.0
     */
    final public function __construct($document, ?array $options = []) {}

    final public function __wakeup() {}
}
<?php

namespace MongoDB\Driver;

/**
 * The MongoDB\Driver\WriteResult class encapsulates information about an executed MongoDB\Driver\BulkWrite and may be returned by MongoDB\Driver\Manager::executeBulkWrite().
 * @link https://php.net/manual/en/class.mongodb-driver-writeresult.php
 */
final class WriteResult
{
    final private function __construct() {}

    final public function __wakeup() {}

    /**
     * Returns the number of documents deleted
     * @link https://php.net/manual/en/mongodb-driver-writeresult.getdeletedcount.php
     * @return int|null
     */
    final public function getDeletedCount() {}

    /**
     * Returns the number of documents inserted (excluding upserts)
     * @link https://php.net/manual/en/mongodb-driver-writeresult.getinsertedcount.php
     * @return int|null
     */
    final public function getInsertedCount() {}

    /**
     * Returns the number of documents selected for update
     * @link https://php.net/manual/en/mongodb-driver-writeresult.getmatchedcount.php
     * @return int|null
     */
    final public function getMatchedCount() {}

    /**
     * Returns the number of existing documents updated
     * @link https://php.net/manual/en/mongodb-driver-writeresult.getmodifiedcount.php
     * @return int|null
     */
    final public function getModifiedCount() {}

    /**
     * Returns the server associated with this write result
     * @link https://php.net/manual/en/mongodb-driver-writeresult.getserver.php
     * @return Server
     */
    final public function getServer() {}

    /**
     * Returns the number of documents inserted by an upsert
     * @link https://php.net/manual/en/mongodb-driver-writeresult.getupsertedcount.php
     * @return int|null
     */
    final public function getUpsertedCount() {}

    /**
     * Returns an array of identifiers for upserted documents
     * @link https://php.net/manual/en/mongodb-driver-writeresult.getupsertedids.php
     * @return array
     */
    final public function getUpsertedIds() {}

    /**
     * Returns any write concern error that occurred
     * @link https://php.net/manual/en/mongodb-driver-writeresult.getwriteconcernerror.php
     * @return WriteConcernError|null
     */
    final public function getWriteConcernError() {}

    /**
     * Returns any write errors that occurred
     * @link https://php.net/manual/en/mongodb-driver-writeresult.getwriteerrors.php
     * @return WriteError[]
     */
    final public function getWriteErrors() {}

    /**
     * Returns whether the write was acknowledged
     * @link https://php.net/manual/en/mongodb-driver-writeresult.isacknowledged.php
     * @return bool
     */
    final public function isAcknowledged() {}
}
<?php

namespace MongoDB\Driver;

use MongoDB\Driver\Exception\AuthenticationException;
use MongoDB\Driver\Exception\BulkWriteException;
use MongoDB\Driver\Exception\ConnectionException;
use MongoDB\Driver\Exception\Exception;
use MongoDB\Driver\Exception\InvalidArgumentException;
use MongoDB\Driver\Exception\RuntimeException;
use MongoDB\Driver\Exception\WriteConcernException;
use MongoDB\Driver\Exception\WriteException;
use MongoDB\Driver\Monitoring\Subscriber;

/**
 * The MongoDB\Driver\Manager is the main entry point to the extension. It is responsible for maintaining connections to MongoDB (be it standalone server, replica set, or sharded cluster).
 * No connection to MongoDB is made upon instantiating the Manager. This means the MongoDB\Driver\Manager can always be constructed, even though one or more MongoDB servers are down.
 * Any write or query can throw connection exceptions as connections are created lazily. A MongoDB server may also become unavailable during the life time of the script. It is therefore important that all actions on the Manager to be wrapped in try/catch statements.
 * @link https://php.net/manual/en/class.mongodb-driver-manager.php
 */
final class Manager
{
    /**
     * Manager constructor.
     * @link https://php.net/manual/en/mongodb-driver-manager.construct.php
     * @param string $uri A mongodb:// connection URI
     * @param array $options Connection string options
     * @param array $driverOptions Any driver-specific options not included in MongoDB connection spec.
     * @throws InvalidArgumentException on argument parsing errors
     * @throws RuntimeException if the uri format is invalid
     */
    final public function __construct($uri = '', array $options = [], array $driverOptions = []) {}

    final public function __wakeup() {}

    /**
     * Return a ClientEncryption instance.
     * @link https://php.net/manual/en/mongodb-driver-manager.createclientencryption.php
     * @param array $options
     * @return \MongoDB\Driver\ClientEncryption
     * @throws \MongoDB\Driver\Exception\InvalidArgumentException On argument parsing errors.
     * @throws \MongoDB\Driver\Exception\RuntimeException If the extension was compiled without libmongocrypt support.
     */
    final public function createClientEncryption(array $options) {}

    /**
     * Execute one or more write operations
     * @link https://php.net/manual/en/mongodb-driver-manager.executebulkwrite.php
     * @param string $namespace A fully qualified namespace (databaseName.collectionName)
     * @param BulkWrite $zbulk The MongoDB\Driver\BulkWrite to execute.
     * @param array|WriteConcern $options WriteConcern type for backwards compatibility
     * @return WriteResult
     * @throws InvalidArgumentException on argument parsing errors.
     * @throws ConnectionException if connection to the server fails for other then authentication reasons
     * @throws AuthenticationException if authentication is needed and fails
     * @throws BulkWriteException on any write failure
     * @throws RuntimeException on other errors (invalid command, command arguments, ...)
     * @since 1.4.0 added $options argument
     */
    final public function executeBulkWrite($namespace, BulkWrite $zbulk, $options = []) {}

    /**
     * @link https://php.net/manual/en/mongodb-driver-manager.executecommand.php
     * @param string $db The name of the database on which to execute the command.
     * @param Command $command The command document.
     * @param array|ReadPreference $options ReadPreference type for backwards compatibility
     * @return Cursor
     * @throws Exception
     * @throws AuthenticationException if authentication is needed and fails
     * @throws ConnectionException if connection to the server fails for other then authentication reasons
     * @throws RuntimeException on other errors (invalid command, command arguments, ...)
     * @throws WriteException on Write Error
     * @throws WriteConcernException on Write Concern failure
     * @since 1.4.0 added $options argument
     */
    final public function executeCommand($db, Command $command, $options = []) {}

    /**
     * Execute a MongoDB query
     * @link https://php.net/manual/en/mongodb-driver-manager.executequery.php
     * @param string $namespace A fully qualified namespace (databaseName.collectionName)
     * @param Query $zquery A MongoDB\Driver\Query to execute.
     * @param array|ReadPreference $options ReadPreference type for backwards compatibility
     * @return Cursor
     * @throws Exception
     * @throws AuthenticationException if authentication is needed and fails
     * @throws ConnectionException if connection to the server fails for other then authentication reasons
     * @throws RuntimeException on other errors (invalid command, command arguments, ...)
     * @since 1.4.0 added $options argument
     */
    final public function executeQuery($namespace, Query $zquery, $options = []) {}

    /**
     * @link https://php.net/manual/en/mongodb-driver-manager.executereadcommand.php
     * @param string $db The name of the database on which to execute the command that reads.
     * @param Command $command The command document.
     * @param array $options
     * @return Cursor
     * @throws Exception
     * @throws AuthenticationException if authentication is needed and fails
     * @throws ConnectionException if connection to the server fails for other then authentication reasons
     * @throws RuntimeException on other errors (invalid command, command arguments, ...)
     * @throws WriteException on Write Error
     * @throws WriteConcernException on Write Concern failure
     * @since 1.4.0
     */
    final public function executeReadCommand($db, Command $command, array $options = []) {}

    /**
     * @link https://php.net/manual/en/mongodb-driver-manager.executereadwritecommand.php
     * @param string $db The name of the database on which to execute the command that reads.
     * @param Command $command The command document.
     * @param array $options
     * @return Cursor
     * @throws Exception
     * @throws AuthenticationException if authentication is needed and fails
     * @throws ConnectionException if connection to the server fails for other then authentication reasons
     * @throws RuntimeException on other errors (invalid command, command arguments, ...)
     * @throws WriteException on Write Error
     * @throws WriteConcernException on Write Concern failure
     * @since 1.4.0
     */
    final public function executeReadWriteCommand($db, Command $command, $options = []) {}

    /**
     * @link https://php.net/manual/en/mongodb-driver-manager.executewritecommand.php
     * @param string $db The name of the database on which to execute the command that writes.
     * @param Command $command The command document.
     * @param array $options
     * @return Cursor
     * @throws Exception
     * @throws AuthenticationException if authentication is needed and fails
     * @throws ConnectionException if connection to the server fails for other then authentication reasons
     * @throws RuntimeException on other errors (invalid command, command arguments, ...)
     * @throws WriteException on Write Error
     * @throws WriteConcernException on Write Concern failure
     * @since 1.4.0
     */
    final public function executeWriteCommand($db, Command $command, array $options = []) {}

    /**
     * Return the ReadConcern for the Manager
     * @link https://php.net/manual/en/mongodb-driver-manager.getreadconcern.php
     * @throws InvalidArgumentException on argument parsing errors.
     * @return ReadConcern
     */
    final public function getReadConcern() {}

    /**
     * Return the ReadPreference for the Manager
     * @link https://php.net/manual/en/mongodb-driver-manager.getreadpreference.php
     * @throws InvalidArgumentException
     * @return ReadPreference
     */
    final public function getReadPreference() {}

    /**
     * Return the servers to which this manager is connected
     * @link https://php.net/manual/en/mongodb-driver-manager.getservers.php
     * @throws InvalidArgumentException on argument parsing errors
     * @return Server[]
     */
    final public function getServers() {}

    /**
     * Return the WriteConcern for the Manager
     * @link https://php.net/manual/en/mongodb-driver-manager.getwriteconcern.php
     * @throws InvalidArgumentException on argument parsing errors.
     * @return WriteConcern
     */
    final public function getWriteConcern() {}

    /**
     * Preselect a MongoDB node based on provided readPreference. This can be useful to guarantee a command runs on a specific server when operating in a mixed version cluster.
     * https://secure.php.net/manual/en/mongodb-driver-manager.selectserver.php
     * @param ReadPreference $readPreference Optionally, a MongoDB\Driver\ReadPreference to route the command to. If none given, defaults to the Read Preferences set by the MongoDB Connection URI.
     * @throws InvalidArgumentException on argument parsing errors.
     * @throws ConnectionException if connection to the server fails (for reasons other than authentication).
     * @throws AuthenticationException if authentication is needed and fails.
     * @throws RuntimeException if a server matching the read preference could not be found.
     * @return Server
     */
    final public function selectServer(ReadPreference $readPreference = null) {}

    /**
     * Start a new client session for use with this client
     * @param array $options
     * @return \MongoDB\Driver\Session
     * @throws \MongoDB\Driver\Exception\InvalidArgumentException On argument parsing errors
     * @throws \MongoDB\Driver\Exception\RuntimeException If the session could not be created (e.g. libmongoc does not support crypto).
     * @link https://secure.php.net/manual/en/mongodb-driver-manager.startsession.php
     * @since 1.4.0
     */
    final public function startSession(?array $options = []) {}

    final public function addSubscriber(Subscriber $subscriber) {}

    final public function removeSubscriber(Subscriber $subscriber) {}
}
<?php

namespace MongoDB\Driver;

use MongoDB\Driver\Exception\AuthenticationException;
use MongoDB\Driver\Exception\BulkWriteException;
use MongoDB\Driver\Exception\ConnectionException;
use MongoDB\Driver\Exception\InvalidArgumentException;
use MongoDB\Driver\Exception\RuntimeException;

/**
 * @link https://php.net/manual/en/class.mongodb-driver-server.php
 */
final class Server
{
    public const TYPE_UNKNOWN = 0;
    public const TYPE_STANDALONE = 1;
    public const TYPE_MONGOS = 2;
    public const TYPE_POSSIBLE_PRIMARY = 3;
    public const TYPE_RS_PRIMARY = 4;
    public const TYPE_RS_SECONDARY = 5;
    public const TYPE_RS_ARBITER = 6;
    public const TYPE_RS_OTHER = 7;
    public const TYPE_RS_GHOST = 8;

    /**
     * Server constructor.
     * @link https://php.net/manual/en/mongodb-driver-server.construct.php
     * @throws RuntimeException (can only be created internally)
     */
    final private function __construct() {}

    final public function __wakeup() {}

    /**
     * Execute one or more write operations on this server
     * @link https://php.net/manual/en/mongodb-driver-server.executebulkwrite.php
     * @param string $namespace A fully qualified namespace (e.g. "databaseName.collectionName").
     * @param BulkWrite $zbulk The MongoDB\Driver\BulkWrite to execute.
     * @param array $options
     * @throws BulkWriteException on any write failure (e.g. write error, failure to apply a write concern).
     * @throws InvalidArgumentException on argument parsing errors.
     * @throws ConnectionException if connection to the server fails (for reasons other than authentication).
     * @throws AuthenticationException if authentication is needed and fails.
     * @throws RuntimeException on other errors.
     * @return WriteResult
     * @since 1.0.0
     */
    final public function executeBulkWrite($namespace, BulkWrite $zbulk, $options = []) {}

    /**
     * Execute a database command on this server
     * @link https://php.net/manual/en/mongodb-driver-server.executecommand.php
     * @param string $db The name of the database on which to execute the command.
     * @param Command $command The MongoDB\Driver\Command to execute.
     * @param ReadPreference $options Optionally, a MongoDB\Driver\ReadPreference to select the server for this operation. If none is given, the read preference from the MongoDB Connection URI will be used.
     * @throws InvalidArgumentException on argument parsing errors.
     * @throws ConnectionException if connection to the server fails (for reasons other than authentication).
     * @throws AuthenticationException if authentication is needed and fails.
     * @throws RuntimeException on other errors (e.g. invalid command, issuing a write command to a secondary).
     * @return Cursor
     * @since 1.0.0
     */
    final public function executeCommand($db, Command $command, $options = null) {}

    /**
     * Execute a database command that reads on this server
     * @link https://secure.php.net/manual/en/mongodb-driver-server.executereadcommand.php
     * @param string                  $db
     * @param \MongoDB\Driver\Command $command
     * @param array                   $options
     * @return Cursor
     * @throws InvalidArgumentException On argument parsing errors or  if the "session" option is used with an associated transaction in combination with a "readConcern" or "writeConcern" option.
     * @throws ConnectionException If connection to the server fails (for reasons other than authentication).
     * @throws AuthenticationException If authentication is needed and fails.
     * @throws RuntimeException On other errors (e.g. invalid command).
     * @since 1.4.0
     */
    final public function executeReadCommand($db, Command $command, array $options = []) {}

    /**
     * Execute a database command that reads and writes on this server
     * @link https://secure.php.net/manual/en/mongodb-driver-server.executereadwritecommand.php
     * @param string                  $db
     * @param \MongoDB\Driver\Command $command
     * @param array                   $options
     * @return Cursor
     * @throws InvalidArgumentException On argument parsing errors OR if the "session" option is used with an associated transaction in combination with a "readConcern" or "writeConcern" option OR if the "session" option is used in combination with an unacknowledged write concern
     * @throws ConnectionException If connection to the server fails (for reasons other than authentication).
     * @throws AuthenticationException If authentication is needed and fails.
     * @throws RuntimeException On other errors (e.g. invalid command).
     * @since 1.4.0
     */
    final public function executeReadWriteCommand($db, Command $command, array $options = []) {}

    /**
     * Execute a database command that writes on this server
     * @link https://secure.php.net/manual/en/mongodb-driver-server.executewritecommand.php
     * @param string                  $db
     * @param \MongoDB\Driver\Command $command
     * @param array                   $options
     * @return Cursor
     * @throws InvalidArgumentException On argument parsing errors or  if the "session" option is used with an associated transaction in combination with a "readConcern" or "writeConcern" option.
     * @throws ConnectionException If connection to the server fails (for reasons other than authentication).
     * @throws AuthenticationException If authentication is needed and fails.
     * @throws RuntimeException On other errors (e.g. invalid command).
     * @since 1.4.0
     */
    final public function executeWriteCommand($db, Command $command, array $options = []) {}

    /**
     * Execute a database query on this server
     * @link https://php.net/manual/en/mongodb-driver-server.executequery.php
     * @param string $namespace A fully qualified namespace (e.g. "databaseName.collectionName").
     * @param Query $zquery The MongoDB\Driver\Query to execute.
     * @param array|ReadPreference $options
     * <table>
     * <caption><strong>options</strong></caption>
     *
     * <thead>
     * <tr>
     * <th>Option</th>
     * <th>Type</th>
     * <th>Description</th>
     * </tr>
     *
     * </thead>
     *
     * <tbody>
     *
     * <tr>
     * <td>readPreference</td>
     * <td><a href="https://php.net/manual/en/php.neclass.mongodb-driver-readpreference.php">MongoDB\Driver\ReadPreference</a></td>
     * <td>
     * <p>
     * A read preference to use for selecting a server for the operation.
     * </p>
     * </td>
     * </tr>
     * <tr>
     * <td>session</td>
     * <td><a href="https://php.net/manual/en/class.mongodb-driver-session.php">MongoDB\Driver\Session</a></td>
     * <td>
     * <p>
     * A session to associate with the operation.
     * </p>
     * </td>
     * </tr>
     * </tbody>
     * </table>
     * The third parameter is now an options array. For backwards compatibility, this parameter will still accept a MongoDB\Driver\ReadPreference object.
     * @throws InvalidArgumentException on argument parsing errors.
     * @throws ConnectionException if connection to the server fails (for reasons other than authentication).
     * @throws AuthenticationException if authentication is needed and fails.
     * @throws RuntimeException on other errors (e.g. invalid command, issuing a write command to a secondary).
     * @return Cursor
     */
    final public function executeQuery($namespace, Query $zquery, $options = []) {}

    /**
     * Returns the hostname of this server
     * @link https://php.net/manual/en/mongodb-driver-server.gethost.php
     * @throws InvalidArgumentException on argument parsing errors.
     * @return string
     */
    final public function getHost() {}

    /**
     * Returns an array of information about this server
     * @link https://php.net/manual/en/mongodb-driver-server.getinfo.php
     * @throws InvalidArgumentException on argument parsing errors.
     * @return array
     */
    final public function getInfo() {}

    /**
     * Returns the latency of this server
     * @link https://php.net/manual/en/mongodb-driver-server.getlatency.php
     * @throws InvalidArgumentException on argument parsing errors.
     * @return int
     */
    final public function getLatency() {}

    /**
     * Returns the port on which this server is listening
     * @link https://php.net/manual/en/mongodb-driver-server.getport.php
     * @throws InvalidArgumentException on argument parsing errors.
     * @return int
     */
    final public function getPort() {}

    /**
     * Returns an array of tags describing this server in a replica set
     * @link https://php.net/manual/en/mongodb-driver-server.gettags.php
     * @throws InvalidArgumentException on argument parsing errors.
     * @return array An array of tags used to describe this server in a replica set. The array will contain zero or more string key and value pairs.
     */
    final public function getTags() {}

    /**
     * Returns an integer denoting the type of this server
     * @link https://php.net/manual/en/mongodb-driver-server.gettype.php
     * @throws InvalidArgumentException on argument parsing errors.
     * @return int denoting the type of this server
     */
    final public function getType() {}

    /**
     * Checks if this server is an arbiter member of a replica set
     * @link https://php.net/manual/en/mongodb-driver-server.isarbiter.php
     * @throws InvalidArgumentException on argument parsing errors.
     * @return bool
     */
    final public function isArbiter() {}

    /**
     * Checks if this server is a hidden member of a replica set
     * @link https://php.net/manual/en/mongodb-driver-server.ishidden.php
     * @throws InvalidArgumentException on argument parsing errors.
     * @return bool
     */
    final public function isHidden() {}

    /**
     * Checks if this server is a passive member of a replica set
     * @link https://php.net/manual/en/mongodb-driver-server.ispassive.php
     * @throws InvalidArgumentException on argument parsing errors.
     * @return bool
     */
    final public function isPassive() {}

    /**
     * Checks if this server is a primary member of a replica set
     * @link https://php.net/manual/en/mongodb-driver-server.isprimary.php
     * @throws InvalidArgumentException on argument parsing errors.
     * @return bool
     */
    final public function isPrimary() {}

    /**
     * Checks if this server is a secondary member of a replica set
     * @link https://php.net/manual/en/mongodb-driver-server.issecondary.php
     * @throws InvalidArgumentException on argument parsing errors.
     * @return bool
     */
    final public function isSecondary() {}
}
<?php

namespace MongoDB\Driver;

use MongoDB\Driver\Exception\EncryptionException;
use MongoDB\Driver\Exception\InvalidArgumentException;

/**
 * The MongoDB\Driver\ClientEncryption class handles creation of data keys for client-side encryption, as well as manually encrypting and decrypting values.
 * @link https://www.php.net/manual/en/class.mongodb-driver-clientencryption.php
 * @since 1.7.0
 */
final class ClientEncryption
{
    public const AEAD_AES_256_CBC_HMAC_SHA_512_DETERMINISTIC = 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic';
    public const AEAD_AES_256_CBC_HMAC_SHA_512_RANDOM = 'AEAD_AES_256_CBC_HMAC_SHA_512-Random';

    final private function __construct() {}

    final public function __wakeup() {}

    /**
     * Creates a new key document and inserts into the key vault collection.
     * @link https://www.php.net/manual/en/mongodb-driver-clientencryption.createdatakey.php
     * @param string $kmsProvider The KMS provider ("local" or "aws") that will be used to encrypt the new encryption key.
     * @param array $options [optional]
     * @return \MongoDB\BSON\Binary Returns the identifier of the new key as a MongoDB\BSON\Binary object with subtype 4 (UUID).
     * @throws InvalidArgumentException On argument parsing errors.
     * @throws EncryptionException If an error occurs while creating the data key.
     */
    final public function createDataKey($kmsProvider, ?array $options = []) {}

    /**
     * Decrypts an encrypted value (BSON binary of subtype 6).
     * @link https://www.php.net/manual/en/mongodb-driver-clientencryption.decrypt.php
     * @param \MongoDB\BSON\BinaryInterface $keyVaultClient A MongoDB\BSON\Binary instance with subtype 6 containing the encrypted value.
     * @return mixed Returns the decrypted value
     * @throws InvalidArgumentException On argument parsing errors.
     * @throws EncryptionException If an error occurs while decrypting the value.
     */
    final public function decrypt(\MongoDB\BSON\BinaryInterface $keyVaultClient) {}

    /**
     * Encrypts a value with a given key and algorithm.
     * @link https://www.php.net/manual/en/mongodb-driver-clientencryption.encrypt.php
     * @param mixed $value The value to be encrypted. Any value that can be inserted into MongoDB can be encrypted using this method.
     * @param array $options [optional]
     * @return \MongoDB\BSON\Binary Returns the encrypted value as MongoDB\BSON\Binary object with subtype 6.
     * @throws InvalidArgumentException On argument parsing errors.
     * @throws EncryptionException If an error occurs while encrypting the value.
     */
    final public function encrypt($value, ?array $options = []) {}
}
<?php

namespace MongoDB\Driver;

/**
 * The MongoDB\Driver\WriteConcernError class encapsulates information about a write concern error and may be returned by MongoDB\Driver\WriteResult::getWriteConcernError().
 * @link https://php.net/manual/en/class.mongodb-driver-writeconcernerror.php
 */
final class WriteConcernError
{
    final private function __construct() {}

    final public function __wakeup() {}

    /**
     * Returns the WriteConcernError's error code
     * @link https://php.net/manual/en/mongodb-driver-writeconcernerror.getcode.php
     * @return int
     */
    final public function getCode() {}

    /**
     * Returns additional metadata for the WriteConcernError
     * @link https://php.net/manual/en/mongodb-driver-writeconcernerror.getinfo.php
     * @return mixed
     */
    final public function getInfo() {}

    /**
     * Returns the WriteConcernError's error message
     * @link https://php.net/manual/en/mongodb-driver-writeconcernerror.getmessage.php
     * @return string
     */
    final public function getMessage() {}
}
<?php

namespace MongoDB\Driver\Exception;

/**
 * Thrown when a driver method is given invalid arguments (e.g. invalid option types).
 * @link https://php.net/manual/en/class.mongodb-driver-exception-invalidargumentexception.php
 * @since 1.0.0
 */
class InvalidArgumentException extends \InvalidArgumentException implements Exception {}
<?php

namespace MongoDB\Driver\Exception;

/**
 * Thrown when a query or command fails to complete within a specified time limit (e.g. maxTimeMS).
 * @link https://php.net/manual/en/class.mongodb-driver-exception-executiontimeoutexception.php
 */
class ExecutionTimeoutException extends ServerException implements Exception {}
<?php

namespace MongoDB\Driver\Exception;

/**
 * Thrown when the driver fails to authenticate with the server.
 * @link https://php.net/manual/en/class.mongodb-driver-exception-authenticationexception.php
 * @since 1.0.0
 */
class AuthenticationException extends ConnectionException implements Exception {}
<?php

namespace MongoDB\Driver\Exception;

/**
 * Base class for exceptions thrown when the driver fails to establish a database connection.
 * @link https://php.net/manual/en/class.mongodb-driver-exception-connectionexception.php
 * @since 1.0.0
 */
class ConnectionException extends RuntimeException implements Exception {}
<?php

namespace MongoDB\Driver\Exception;

class WriteConcernException extends RuntimeException implements Exception {}
<?php

namespace MongoDB\Driver\Exception;

/**
 * Thrown when the driver encounters a runtime error (e.g. internal error from » libmongoc).
 * @link https://php.net/manual/en/class.mongodb-driver-exception-runtimeexception.php
 * @since 1.0.0
 */
class RuntimeException extends \RuntimeException implements Exception
{
    /**
     * @var bool
     * @since 1.6.0
     */
    protected $errorLabels;

    /**
     * Whether the given errorLabel is associated with this exception
     *
     * @param string $label
     * @return bool
     *@since 1.6.0
     */
    final public function hasErrorLabel($label) {}
}
<?php

namespace MongoDB\Driver\Exception;

/**
 * Thrown when a command fails
 *
 * @link https://php.net/manual/en/class.mongodb-driver-exception-commandexception.php
 * @since 1.5.0
 */
class CommandException extends ServerException
{
    protected $resultDocument;

    /**
     * Returns the result document for the failed command
     * @link https://secure.php.net/manual/en/mongodb-driver-commandexception.getresultdocument.php
     * @return object
     * @since 1.5.0
     */
    final public function getResultDocument() {}
}
<?php

namespace MongoDB\Driver\Exception;

use MongoDB\Driver\WriteResult;

/**
 * Base class for exceptions thrown by a failed write operation.
 * The exception encapsulates a MongoDB\Driver\WriteResult object.
 * @link https://php.net/manual/en/class.mongodb-driver-exception-writeexception.php
 * @since 1.0.0
 */
abstract class WriteException extends ServerException implements Exception
{
    /**
     * @var WriteResult associated with the failed write operation.
     */
    protected $writeResult;

    /**
     * @return WriteResult for the failed write operation
     * @since 1.0.0
     */
    final public function getWriteResult() {}
}
<?php

namespace MongoDB\Driver\Exception;

/**
 * Thrown when a bulk write operation fails.
 * @link https://php.net/manual/en/class.mongodb-driver-exception-bulkwriteexception.php
 * @since 1.0.0
 */
class BulkWriteException extends WriteException implements Exception {}
<?php

namespace MongoDB\Driver\Exception;

/**
 * Thrown when the driver fails to establish a database connection within a specified time limit (e.g. connectTimeoutMS).
 * @link https://php.net/manual/en/class.mongodb-driver-exception-connectiontimeoutexception.php
 */
class ConnectionTimeoutException extends ConnectionException implements Exception {}
<?php

namespace MongoDB\Driver\Exception;

use Throwable;

/**
 * Common interface for all driver exceptions. This may be used to catch only exceptions originating from the driver itself.
 * @link https://php.net/manual/en/class.mongodb-driver-exception-exception.php
 */
interface Exception extends Throwable {}
<?php

namespace MongoDB\Driver\Exception;

/**
 * Thrown when the driver encounters an unexpected value (e.g. during BSON serialization or deserialization).
 * @link https://php.net/manual/en/class.mongodb-driver-exception-unexpectedvalueexception.php
 * @since 1.0.0
 */
class UnexpectedValueException extends \UnexpectedValueException implements Exception {}
<?php

namespace MongoDB\Driver\Exception;

/**
 * Thrown when the driver fails to establish an SSL connection with the server.
 * @link https://php.net/manual/en/class.mongodb-driver-exception-sslconnectionexception.php
 */
class SSLConnectionException extends ConnectionException implements Exception {}
<?php

namespace MongoDB\Driver\Exception;

/**
 * Base class for exceptions thrown during client-side encryption.
 * @link https://php.net/manual/en/class.mongodb-driver-exception-encryptionexception.php
 * @since 1.7.0
 */
class EncryptionException extends RuntimeException implements Exception {}
<?php

namespace MongoDB\Driver\Exception;

/**
 * Base class for exceptions thrown by the server. The code of this exception and its subclasses will correspond to the original
 * error code from the server.
 *
 * @link https://secure.php.net/manual/en/class.mongodb-driver-exception-serverexception.php
 * @since 1.5.0
 */
class ServerException extends RuntimeException implements Exception {}
<?php

namespace MongoDB\Driver\Exception;

/**
 * Thrown when the driver is incorrectly used (e.g. rewinding a cursor).
 * @link https://php.net/manual/en/class.mongodb-driver-exception-logicexception.php
 */
class LogicException extends \LogicException implements Exception {}
<?php

namespace MongoDB\Driver;

use MongoDB\Driver\Exception\CommandException;
use MongoDB\Driver\Exception\InvalidArgumentException;

/**
 * Class Session
 *
 * @link https://secure.php.net/manual/en/class.mongodb-driver-session.php
 * @since 1.4.0
 */
final class Session
{
    /**
     * @since 1.7.0
     */
    public const TRANSACTION_NONE = 'none';

    /**
     * @since 1.7.0
     */
    public const TRANSACTION_STARTING = 'starting';

    /**
     * @since 1.7.0
     */
    public const TRANSACTION_IN_PROGRESS = 'in_progress';

    /**
     * @since 1.7.0
     */
    public const TRANSACTION_COMMITTED = 'committed';

    /**
     * @since 1.7.0
     */
    public const TRANSACTION_ABORTED = 'aborted';

    /**
     * Create a new Session (not used)
     * @link https://secure.php.net/manual/en/mongodb-driver-session.construct.php
     * @since 1.4.0
     */
    final private function __construct() {}

    final public function __wakeup() {}

    /**
     * Aborts a transaction
     * @link https://secure.php.net/manual/en/mongodb-driver-session.aborttransaction.php
     * @return void
     * @since 1.5.0
     */
    final public function abortTransaction() {}

    /**
     * Advances the cluster time for this session
     * @link https://secure.php.net/manual/en/mongodb-driver-session.advanceclustertime.php
     * @param array|object $clusterTime The cluster time is a document containing a logical timestamp and server signature
     * @return void
     * @throws \MongoDB\Driver\Exception\InvalidArgumentException On argument parsing errors
     * @since 1.4.0
     */
    final public function advanceClusterTime($clusterTime) {}

    /**
     * Advances the operation time for this session
     * @link https://secure.php.net/manual/en/mongodb-driver-session.advanceoperationtime.php
     * @param \MongoDB\BSON\TimestampInterface $timestamp
     * @return void
     * @throws \MongoDB\Driver\Exception\InvalidArgumentException On argument parsing errors
     * @since 1.4.0
     */
    final public function advanceOperationTime($timestamp) {}

    /**
     * @link https://secure.php.net/manual/en/mongodb-driver-session.committransaction.php
     * @return void
     * @throws InvalidArgumentException On argument parsing errors
     * @throws CommandException If the server could not commit the transaction (e.g. due to conflicts,
     * network issues). In case the exception's MongoDB\Driver\Exception\CommandException::getResultDocument() has a "errorLabels"
     * element, and this array contains a "TransientTransactionError" or "UnUnknownTransactionCommitResult" value, it is safe to
     * re-try the whole transaction. In newer versions of the driver, MongoDB\Driver\Exception\RuntimeException::hasErrorLabel()
     * should be used to test for this situation instead.
     * @throws \MongoDB\Driver\Exception\RuntimeException If the transaction could not be committed (e.g. a transaction was not started)
     * @since 1.5.0
     */
    final public function commitTransaction() {}

    /**
     * This method closes an existing session. If a transaction was associated with this session, this transaction is also aborted,
     * and all its operations are rolled back.
     *
     * @link https://secure.php.net/manual/en/mongodb-driver-session.endsession.php
     * @return void
     * @throws \MongoDB\Driver\Exception\InvalidArgumentException On argument parsing errors
     * @since 1.5.0
     */
    final public function endSession() {}

    /**
     * Returns the cluster time for this session
     * @link https://secure.php.net/manual/en/mongodb-driver-session.getclustertime.php
     * @return object|null
     * @throws \MongoDB\Driver\Exception\InvalidArgumentException
     * @since 1.4.0
     */
    final public function getClusterTime() {}

    /**
     * Returns the logical session ID for this session
     * @link https://secure.php.net/manual/en/mongodb-driver-session.getlogicalsessionid.php
     * @return object Returns the logical session ID for this session
     * @throws \MongoDB\Driver\Exception\InvalidArgumentException
     * @since 1.4.0
     */
    final public function getLogicalSessionId() {}

    /**
     * Returns the operation time for this session, or NULL if the session has no operation time
     * @link https://secure.php.net/manual/en/mongodb-driver-session.getoperationtime.php
     * @return \MongoDB\BSON\Timestamp|null
     * @throws \MongoDB\Driver\Exception\InvalidArgumentException
     * @since 1.4.0
     */
    final public function getOperationTime() {}

    /**
     * Returns the server to which this session is pinned, or NULL if the session is not pinned to any server.
     * @link https://secure.php.net/manual/en/mongodb-driver-session.getserver.php
     * @return \MongoDB\Driver\Server|null
     * @throws \MongoDB\Driver\Exception\InvalidArgumentException
     * @since 1.6.0
     */
    final public function getServer() {}

    /**
     * Returns options for the current transactions, or NULL if no transaction is running.
     * @link https://secure.php.net/manual/en/mongodb-driver-session.gettransactionoptions.php
     * @return array|null
     * @throws \MongoDB\Driver\Exception\InvalidArgumentException
     * @since 1.7.0
     */
    final public function getTransactionOptions() {}

    /**
     * Returns the current transaction state
     * @link https://secure.php.net/manual/en/mongodb-driver-session.gettransactionstate.php
     * @return string
     * @throws \MongoDB\Driver\Exception\InvalidArgumentException
     * @since 1.7.0
     */
    final public function getTransactionState() {}

    /**
     * Returns whether a multi-document transaction is in progress.
     * @link https://secure.php.net/manual/en/mongodb-driver-session.isintransaction.php
     * @return bool
     * @throws \MongoDB\Driver\Exception\InvalidArgumentException
     * @since 1.6.0
     */
    final public function isInTransaction() {}

    /**
     * Starts a transaction
     * @link https://secure.php.net/manual/en/mongodb-driver-session.starttransaction.php
     * @param array|object $options
     * @return void
     * @throws \MongoDB\Driver\Exception\InvalidArgumentException On argument parsing errors
     * @throws \MongoDB\Driver\Exception\CommandException If the the transaction could not be started because of a server-side problem (e.g. a lock could not be obtained).
     * @throws \MongoDB\Driver\Exception\RuntimeException If the the transaction could not be started (e.g. a transaction was already started).
     * @since 1.4.0
     */
    final public function startTransaction(?array $options = []) {}
}
<?php

namespace MongoDB\Driver;

use MongoDB\Driver\Exception\InvalidArgumentException;
use MongoDB\Driver\Exception\UnexpectedValueException;

/**
 * Class CursorId
 * @link https://php.net/manual/en/class.mongodb-driver-cursorid.php
 */
final class CursorId implements \Serializable
{
    /**
     * Create a new CursorId (not used)
     * CursorId objects are returned from Cursor::getId() and cannot be constructed directly.
     * @link https://php.net/manual/en/mongodb-driver-cursorid.construct.php
     * @see Cursor::getId()
     */
    final private function __construct() {}

    /**
     * String representation of the cursor ID
     * @link https://php.net/manual/en/mongodb-driver-cursorid.tostring.php
     * @return string representation of the cursor ID.
     * @throws InvalidArgumentException on argument parsing errors.
     */
    final public function __toString() {}

    final public function __wakeup() {}

    public static function __set_state(array $properties) {}

    /**
     * Serialize a CursorId
     * @since 1.7.0
     * @link https://php.net/manual/en/mongodb-driver-cursorid.serialize.php
     * @return string
     * @throws InvalidArgumentException
     */
    final public function serialize() {}

    /**
     * Unserialize a CursorId
     * @since 1.7.0
     * @link https://php.net/manual/en/mongodb-driver-cursorid.unserialize.php
     * @param string $serialized
     * @return void
     * @throws InvalidArgumentException on argument parsing errors or if the properties are invalid
     * @throws UnexpectedValueException if the properties cannot be unserialized (i.e. serialized was malformed)
     */
    final public function unserialize($serialized) {}
}
<?php
/**
 * MongoDB Extension Stub File
 * @version 1.1.9
 * Documentation taken from https://secure.php.net/manual/en/set.mongodb.php
 * @author Anton Tuyakhov <atuyakhov@gmail.com>
 */

/**
 * Unlike the mongo extension, this extension supports both PHP and HHVM and is developed atop the » libmongoc and » libbson libraries. It provides a minimal API for core driver functionality: commands, queries, writes, connection management, and BSON serialization.
 * Userland PHP libraries that depend on this extension may provide higher level APIs, such as query builders, individual command helper methods, and GridFS. Application developers should consider using this extension in conjunction with the » MongoDB PHP library, which implements the same higher level APIs found in MongoDB drivers for other languages. This separation of concerns allows the driver to focus on essential features for which an extension implementation is paramount for performance.
 * @link https://php.net/manual/en/set.mongodb.php
 */
define('MONGODB_VERSION', '1.15.0');
define('MONGODB_STABILITY', 'stable');
<?php

namespace MongoDB\Driver;

final class ServerApi implements \MongoDB\BSON\Serializable, \Serializable
{
    public const V1 = 1;

    final public function __construct(string $version, ?bool $strict = false, ?bool $deprecationErrors = false) {}

    public static function __set_state(array $properties) {}

    final public function unserialize(string $serialized) {}

    final public function serialize() {}

    final public function bsonSerialize() {}
}
<?php

namespace MongoDB\Driver;

use MongoDB\Driver\Exception\InvalidArgumentException;
use Traversable;

/**
 * This interface is implemented by MongoDB\Driver\Cursor but may also be used for type-hinting and userland classes.
 * @link https://www.php.net/manual/en/class.mongodb-driver-cursorinterface.php
 * @since 1.6.0
 */
interface CursorInterface extends Traversable
{
    /**
     * Returns the MongoDB\Driver\CursorId associated with this cursor. A cursor ID uniquely identifies the cursor on the server.
     * @return CursorId Returns the MongoDB\Driver\CursorId for this cursor.
     * @throws InvalidArgumentException
     * @link https://www.php.net/manual/en/mongodb-driver-cursorinterface.getid.php
     */
    public function getId();

    /**
     * Returns the MongoDB\Driver\Server associated with this cursor.
     * This is the server that executed the MongoDB\Driver\Query or MongoDB\Driver\Command.
     * @link https://www.php.net/manual/en/mongodb-driver-cursorinterface.getserver.php
     * @return Server Returns the MongoDB\Driver\Server associated with this cursor.
     * @throws InvalidArgumentException
     */
    public function getServer();

    /**
     * Checks whether the cursor may have additional results available to read.
     * @link https://www.php.net/manual/en/mongodb-driver-cursorinterface.isdead.php
     * @return bool Returns TRUE if additional results are not available, and FALSE otherwise.
     * @throws InvalidArgumentException
     */
    public function isDead();

    /**
     * Sets a type map to use for BSON unserialization
     * @link https://www.php.net/manual/en/mongodb-driver-cursorinterface.settypemap.php
     * @param array $typemap Type map configuration.
     * @return mixed
     * @throws InvalidArgumentException
     */
    public function setTypeMap(array $typemap);

    /**
     * Iterates the cursor and returns its results in an array.
     * MongoDB\Driver\CursorInterface::setTypeMap() may be used to control how documents are unserialized into PHP values.
     * @return array Returns an array containing all results for this cursor.
     * @throws InvalidArgumentException
     */
    public function toArray();
}
<?php

namespace MongoDB\Driver;

/**
 * The MongoDB\Driver\WriteError class encapsulates information about a write error and may be returned as an array element from MongoDB\Driver\WriteResult::getWriteErrors().
 */
final class WriteError
{
    final private function __construct() {}

    final public function __wakeup() {}

    /**
     * Returns the WriteError's error code
     * @link https://php.net/manual/en/mongodb-driver-writeerror.getcode.php
     * @return int
     */
    final public function getCode() {}

    /**
     * Returns the index of the write operation corresponding to this WriteError
     * @link https://php.net/manual/en/mongodb-driver-writeerror.getindex.php
     * @return int
     */
    final public function getIndex() {}

    /**
     * Returns additional metadata for the WriteError
     * @link https://php.net/manual/en/mongodb-driver-writeerror.getinfo.php
     * @return mixed
     */
    final public function getInfo() {}

    /**
     * Returns the WriteError's error message
     * @link https://php.net/manual/en/mongodb-driver-writeerror.getmessage.php
     * @return string
     */
    final public function getMessage() {}
}
<?php

namespace MongoDB\Driver;

use MongoDB\Driver\Exception\InvalidArgumentException;

/**
 * The BulkWrite collects one or more write operations that should be sent to the server.
 * After adding any number of insert, update, and delete operations, the collection may be executed via Manager::executeBulkWrite().
 * Write operations may either be ordered (default) or unordered.
 * Ordered write operations are sent to the server, in the order provided, for serial execution.
 * If a write fails, any remaining operations will be aborted.
 * Unordered operations are sent to the server in an arbitrary order where they may be executed in parallel.
 * Any errors that occur are reported after all operations have been attempted.
 */
final class BulkWrite implements \Countable
{
    /**
     * Create a new BulkWrite
     * Constructs a new ordered (default) or unordered BulkWrite.
     * @link https://php.net/manual/en/mongodb-driver-bulkwrite.construct.php
     * @param array $options
     * @throws InvalidArgumentException on argument parsing errors.
     */
    final public function __construct(?array $options = []) {}

    final public function __wakeup() {}

    /**
     * Count expected roundtrips for executing the bulk
     * Returns the expected number of client-to-server roundtrips required to execute all write operations in the BulkWrite.
     * @link https://php.net/manual/en/mongodb-driver-bulkwrite.count.php
     * @return int number of expected roundtrips to execute the BulkWrite.
     * @throws InvalidArgumentException on argument parsing errors.
     */
    final public function count() {}

    /**
     * Add a delete operation to the bulk
     * @link https://php.net/manual/en/mongodb-driver-bulkwrite.delete.php
     * @param array|object $query The search filter
     * @param array $deleteOptions
     * @throws InvalidArgumentException on argument parsing errors.
     */
    final public function delete($query, ?array $deleteOptions = []) {}

    /**
     * Add an insert operation to the bulk
     * If the document did not have an _id, a MongoDB\BSON\ObjectId will be generated and returned; otherwise, no value is returned.
     * @link https://php.net/manual/en/mongodb-driver-bulkwrite.insert.php
     * @param array|object $document
     * @return mixed
     * @throws InvalidArgumentException on argument parsing errors.
     */
    final public function insert($document) {}

    /**
     * Add an update operation to the bulk
     * @link https://php.net/manual/en/mongodb-driver-bulkwrite.update.php
     * @param array|object $query The search filter
     * @param array|object $newObj A document containing either update operators (e.g. $set) or a replacement document (i.e. only field:value expressions)
     * @param array $updateOptions
     * @throws InvalidArgumentException on argument parsing errors.
     */
    final public function update($query, $newObj, ?array $updateOptions = []) {}
}
<?php

namespace MongoDB\Driver;

use MongoDB\Driver\Exception\InvalidArgumentException;

/**
 * The MongoDB\Driver\Cursor class encapsulates the results of a MongoDB command or query and may be returned by MongoDB\Driver\Manager::executeCommand() or MongoDB\Driver\Manager::executeQuery(), respectively.
 * @link https://php.net/manual/en/class.mongodb-driver-cursor.php
 */
final class Cursor implements CursorInterface, \Iterator
{
    /**
     * Create a new Cursor
     * MongoDB\Driver\Cursor objects are returned as the result of an executed command or query and cannot be constructed directly.
     * @link https://php.net/manual/en/mongodb-driver-cursor.construct.php
     */
    final private function __construct() {}

    final public function __wakeup() {}

    /**
     * Returns the current element.
     * @link https://www.php.net/manual/en/mongodb-driver-cursor.current.php
     * @return array|object
     */
    public function current() {}

    /**
     * Returns the MongoDB\Driver\CursorId associated with this cursor. A cursor ID cursor uniquely identifies the cursor on the server.
     * @link https://php.net/manual/en/mongodb-driver-cursor.getid.php
     * @return CursorId for this Cursor
     * @throws InvalidArgumentException on argument parsing errors.
     */
    final public function getId() {}

    /**
     * Returns the MongoDB\Driver\Server associated with this cursor. This is the server that executed the query or command.
     * @link https://php.net/manual/en/mongodb-driver-cursor.getserver.php
     * @return Server for this Cursor
     * @throws InvalidArgumentException on argument parsing errors.
     */
    final public function getServer() {}

    /**
     * Checks if a cursor is still alive
     * @link https://php.net/manual/en/mongodb-driver-cursor.isdead.php
     * @return bool
     * @throws InvalidArgumentException On argument parsing errors
     */
    final public function isDead() {}

    /**
     * Returns the current result's index within the cursor.
     * @link https://www.php.net/manual/en/mongodb-driver-cursor.key.php
     * @return int
     */
    public function key() {}

    /**
     * Advances the cursor to the next result.
     * @link https://www.php.net/manual/en/mongodb-driver-cursor.next.php
     * @return void
     * @throws \MongoDB\Driver\Exception\InvalidArgumentException on argument parsing errors.
     * @throws \MongoDB\Driver\Exception\ConnectionException if connection to the server fails (for reasons other than authentication).
     * @throws \MongoDB\Driver\Exception\AuthenticationException if authentication is needed and fails.
     */
    public function next() {}

    /**
     * Rewind the cursor to the first result.
     * @link https://www.php.net/manual/en/mongodb-driver-cursor.rewind.php
     * @return void
     * @throws \MongoDB\Driver\Exception\InvalidArgumentException on argument parsing errors.
     * @throws \MongoDB\Driver\Exception\ConnectionException if connection to the server fails (for reasons other than authentication).
     * @throws \MongoDB\Driver\Exception\AuthenticationException if authentication is needed and fails.
     * @throws \MongoDB\Driver\Exception\LogicException if this method is called after the cursor has advanced beyond its first position.
     */
    public function rewind() {}

    /**
     * Sets a type map to use for BSON unserialization
     *
     * @link https://php.net/manual/en/mongodb-driver-cursor.settypemap.php
     *
     * @param array $typemap
     * @return void
     * @throws InvalidArgumentException On argument parsing errors or if a class in the type map cannot
     * be instantiated or does not implement MongoDB\BSON\Unserializable
     */
    final public function setTypeMap(array $typemap) {}

    /**
     * Returns an array of all result documents for this cursor
     * @link https://php.net/manual/en/mongodb-driver-cursor.toarray.php
     * @return array
     * @throws InvalidArgumentException On argument parsing errors
     */
    final public function toArray() {}

    /**
     * Checks if the current position in the cursor is valid.
     * @link https://www.php.net/manual/en/mongodb-driver-cursor.valid.php
     * @return bool
     */
    public function valid() {}
}
<?php

namespace MongoDB\Driver;

use MongoDB\Driver\Exception\InvalidArgumentException;

/**
 * The MongoDB\Driver\Query class is a value object that represents a database query.
 * @link https://php.net/manual/en/class.mongodb-driver-query.php
 */
final class Query
{
    /**
     * Construct new Query
     * @link https://php.net/manual/en/mongodb-driver-query.construct.php
     * @param array|object $filter The search filter.
     * @param array $options
     * @throws InvalidArgumentException on argument parsing errors.
     */
    final public function __construct($filter, ?array $options = []) {}

    final public function __wakeup() {}
}
<?php

// Start of hash v.1.0
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Pure;

/**
 * (PHP 5 &gt;= 5.1.2, PECL hash &gt;= 1.1)<br/>
 * Generate a hash value (message digest)
 * @link https://php.net/manual/en/function.hash.php
 * @param string $algo <p>
 * Name of selected hashing algorithm (i.e. "md5", "sha256", "haval160,4", etc..)
 * </p>
 * @param string $data <p>
 * Message to be hashed.
 * </p>
 * @param bool $binary [optional] <p>
 * When set to <b>TRUE</b>, outputs raw binary data.
 * <b>FALSE</b> outputs lowercase hexits.
 * </p>
 * @return string a string containing the calculated message digest as lowercase hexits
 * unless <i>raw_output</i> is set to true in which case the raw
 * binary representation of the message digest is returned.
 */
#[Pure]
function hash(string $algo, string $data, bool $binary = false, #[PhpStormStubsElementAvailable('8.1')] array $options = []): string {}

/**
 * Timing attack safe string comparison
 * @link https://php.net/manual/en/function.hash-equals.php
 * @param string $known_string <p>The string of known length to compare against</p>
 * @param string $user_string <p>The user-supplied string</p>
 * @return bool <p>Returns <b>TRUE</b> when the two strings are equal, <b>FALSE</b> otherwise.</p>
 * @since 5.6
 */
#[Pure]
function hash_equals(string $known_string, string $user_string): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL hash &gt;= 1.1)<br/>
 * Generate a hash value using the contents of a given file
 * @link https://php.net/manual/en/function.hash-file.php
 * @param string $algo <p>
 * Name of selected hashing algorithm (i.e. "md5", "sha256", "haval160,4", etc..)
 * </p>
 * @param string $filename <p>
 * URL describing location of file to be hashed; Supports fopen wrappers.
 * </p>
 * @param bool $binary [optional] <p>
 * When set to <b>TRUE</b>, outputs raw binary data.
 * <b>FALSE</b> outputs lowercase hexits.
 * </p>
 * @return string|false a string containing the calculated message digest as lowercase hexits
 * unless <i>raw_output</i> is set to true in which case the raw
 * binary representation of the message digest is returned.
 */
#[Pure]
function hash_file(string $algo, string $filename, bool $binary = false, #[PhpStormStubsElementAvailable('8.1')] array $options = []): string|false {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL hash &gt;= 1.1)<br/>
 * Generate a keyed hash value using the HMAC method
 * @link https://php.net/manual/en/function.hash-hmac.php
 * @param string $algo <p>
 * Name of selected hashing algorithm (i.e. "md5", "sha256", "haval160,4", etc..) See <b>hash_algos</b> for a list of supported algorithms.<br/>
 * Since 7.2.0 usage of non-cryptographic hash functions (adler32, crc32, crc32b, fnv132, fnv1a32, fnv164, fnv1a64, joaat) was disabled.
 * </p>
 * @param string $data <p>
 * Message to be hashed.
 * </p>
 * @param string $key <p>
 * Shared secret key used for generating the HMAC variant of the message digest.
 * </p>
 * @param bool $binary [optional] <p>
 * When set to <b>TRUE</b>, outputs raw binary data.
 * <b>FALSE</b> outputs lowercase hexits.
 * </p>
 * @return string a string containing the calculated message digest as lowercase hexits
 * unless <i>raw_output</i> is set to true in which case the raw
 * binary representation of the message digest is returned.
 */
#[Pure]
function hash_hmac(string $algo, string $data, string $key, bool $binary = false): string {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL hash &gt;= 1.1)<br/>
 * Generate a keyed hash value using the HMAC method and the contents of a given file
 * @link https://php.net/manual/en/function.hash-hmac-file.php
 * @param string $algo <p>
 * Name of selected hashing algorithm (i.e. "md5", "sha256", "haval160,4", etc..) See <b>hash_algos</b> for a list of supported algorithms.<br/>
 * Since 7.2.0 usage of non-cryptographic hash functions (adler32, crc32, crc32b, fnv132, fnv1a32, fnv164, fnv1a64, joaat) was disabled.
 * </p>
 * @param string $filename <p>
 * URL describing location of file to be hashed; Supports fopen wrappers.
 * </p>
 * @param string $key <p>
 * Shared secret key used for generating the HMAC variant of the message digest.
 * </p>
 * @param bool $binary [optional] <p>
 * When set to <b>TRUE</b>, outputs raw binary data.
 * <b>FALSE</b> outputs lowercase hexits.
 * </p>
 * @return string|false a string containing the calculated message digest as lowercase hexits
 * unless <i>raw_output</i> is set to true in which case the raw
 * binary representation of the message digest is returned.
 */
#[Pure]
function hash_hmac_file(string $algo, string $filename, string $key, bool $binary = false): string|false {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL hash &gt;= 1.1)<br/>
 * Initialize an incremental hashing context
 * @link https://php.net/manual/en/function.hash-init.php
 * @param string $algo <p>
 * Name of selected hashing algorithm (i.e. "md5", "sha256", "haval160,4", etc..). For a list of supported algorithms see <b>hash_algos</b>.<br/>
 * Since 7.2.0 usage of non-cryptographic hash functions (adler32, crc32, crc32b, fnv132, fnv1a32, fnv164, fnv1a64, joaat) was disabled.
 * </p>
 * @param int $flags [optional] <p>
 * Optional settings for hash generation, currently supports only one option:
 * <b>HASH_HMAC</b>. When specified, the <i>key</i>
 * must be specified.
 * </p>
 * @param string $key <p>
 * When <b>HASH_HMAC</b> is specified for <i>options</i>,
 * a shared secret key to be used with the HMAC hashing method must be supplied in this
 * parameter.
 * </p>
 * @return HashContext|resource a Hashing Context resource for use with <b>hash_update</b>,
 * <b>hash_update_stream</b>, <b>hash_update_file</b>,
 * and <b>hash_final</b>.
 */
#[Pure]
#[LanguageLevelTypeAware(["7.2" => "HashContext"], default: "resource")]
function hash_init(string $algo, int $flags = 0, string $key = "", #[PhpStormStubsElementAvailable('8.1')] array $options = []) {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL hash &gt;= 1.1)<br/>
 * Pump data into an active hashing context
 * @link https://php.net/manual/en/function.hash-update.php
 * @param HashContext|resource $context <p>
 * Hashing context returned by {@see hash_init}.
 * </p>
 * @param string $data <p>
 * Message to be included in the hash digest.
 * </p>
 * @return bool <b>TRUE</b>.
 */
function hash_update(#[LanguageLevelTypeAware(["7.2" => "HashContext"], default: "resource")] $context, string $data): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL hash &gt;= 1.1)<br/>
 * Pump data into an active hashing context from an open stream
 * @link https://php.net/manual/en/function.hash-update-stream.php
 * @param HashContext|resource $context <p>
 * Hashing context returned by {@see hash_init}.
 * </p>
 * @param resource $stream <p>
 * Open file handle as returned by any stream creation function.
 * </p>
 * @param int $length [optional] <p>
 * Maximum number of characters to copy from <i>handle</i>
 * into the hashing context.
 * </p>
 * @return int Actual number of bytes added to the hashing context from <i>handle</i>.
 */
function hash_update_stream(#[LanguageLevelTypeAware(["7.2" => "HashContext"], default: "resource")] $context, $stream, int $length = -1): int {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL hash &gt;= 1.1)<br/>
 * Pump data into an active hashing context from a file
 * @link https://php.net/manual/en/function.hash-update-file.php
 * @param HashContext|resource $context <p>
 * Hashing context returned by <b>hash_init</b>.
 * </p>
 * @param string $filename <p>
 * URL describing location of file to be hashed; Supports fopen wrappers.
 * </p>
 * @param resource $stream_context [optional] <p>
 * Stream context as returned by <b>stream_context_create</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function hash_update_file(#[LanguageLevelTypeAware(["7.2" => "HashContext"], default: "resource")] $context, string $filename, $stream_context): bool {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL hash &gt;= 1.1)<br/>
 * Finalize an incremental hash and return resulting digest
 * @link https://php.net/manual/en/function.hash-final.php
 * @param HashContext|resource $context <p>
 * Hashing context returned by {@see hash_init}.
 * </p>
 * @param bool $binary [optional] <p>
 * When set to <b>TRUE</b>, outputs raw binary data.
 * <b>FALSE</b> outputs lowercase hexits.
 * </p>
 * @return string a string containing the calculated message digest as lowercase hexits
 * unless <i>raw_output</i> is set to true in which case the raw
 * binary representation of the message digest is returned.
 */
function hash_final(#[LanguageLevelTypeAware(["7.2" => "HashContext"], default: "resource")] $context, bool $binary = false): string {}

/**
 * Copy hashing context
 * @link https://php.net/manual/en/function.hash-copy.php
 * @param HashContext|resource $context <p>
 * Hashing context returned by {@see hash_init}.
 * </p>
 * @return HashContext|resource a copy of Hashing Context resource.
 */
#[Pure]
#[LanguageLevelTypeAware(["7.2" => "HashContext"], default: "resource")]
function hash_copy(#[LanguageLevelTypeAware(["7.2" => "HashContext"], default: "resource")] $context) {}

/**
 * (PHP 5 &gt;= 5.1.2, PECL hash &gt;= 1.1)<br/>
 * Return a list of registered hashing algorithms
 * @link https://php.net/manual/en/function.hash-algos.php
 * @return array a numerically indexed array containing the list of supported
 * hashing algorithms.
 */
#[Pure]
function hash_algos(): array {}

/**
 * Generate a hkdf key derivation of a supplied key input
 * @param string $algo Name of selected hashing algorithm (i.e. "sha256", "sha512", "haval160,4", etc..)
 * See {@see hash_algos()} for a list of supported algorithms.
 * <blockquote>
 * <p><strong>Note</strong></p>
 * <p>
 * Non-cryptographic hash functions are not allowed.
 * </p>
 * </blockquote>
 * @param string $key <p>Input keying material (raw binary). Cannot be empty.</p>
 * @param int $length [optional] <p>Desired output length in bytes. Cannot be greater than 255 times the chosen hash function size.
 * If <b>length</b> is 0, the output length will default to the chosen hash function size.</p>
 * @param string $info [optional] <p>Application/context-specific info string.</p>
 * @param string $salt [optional] <p>Salt to use during derivation. While optional, adding random salt significantly improves the strength of HKDF.</p>
 * @return string|false <p>Returns a string containing a raw binary representation of the derived key (also known as output keying material - OKM); or <b>FALSE</b> on failure.</p>
 * @since 7.1.2
 * Generate a HKDF key derivation of a supplied key input
 * @link https://php.net/manual/en/function.hash-hkdf.php
 */
#[Pure]
#[LanguageLevelTypeAware(["8.0" => "string"], default: "string|false")]
function hash_hkdf(string $algo, string $key, int $length = 0, string $info = '', string $salt = '') {}

/**
 * Return a list of registered hashing algorithms suitable for hash_hmac
 * @since 7.2
 * Return a list of registered hashing algorithms suitable for hash_hmac
 * @return string[] Returns a numerically indexed array containing the list of supported hashing algorithms suitable for {@see hash_hmac()}.
 */
#[Pure]
function hash_hmac_algos(): array {}

/**
 * Generate a PBKDF2 key derivation of a supplied password
 * @link https://php.net/manual/en/function.hash-pbkdf2.php
 * @param string $algo <p>
 * Name of selected hashing algorithm (i.e. "md5", "sha256", "haval160,4", etc..) See <b>hash_algos</b> for a list of supported algorithms.<br/>
 * Since 7.2.0 usage of non-cryptographic hash functions (adler32, crc32, crc32b, fnv132, fnv1a32, fnv164, fnv1a64, joaat) was disabled.
 * </p>
 * @param string $password <p>
 * The password to use for the derivation.
 * </p>
 * @param string $salt <p>
 * The salt to use for the derivation. This value should be generated randomly.
 * </p>
 * @param int $iterations <p>
 * The number of internal iterations to perform for the derivation.
 * </p>
 * @param int $length [optional] <p>
 * The length of the output string. If raw_output is TRUE this corresponds to the byte-length of the derived key,
 * if raw_output is FALSE this corresponds to twice the byte-length of the derived key (as every byte of the key is returned as two hexits). <br/>
 * If 0 is passed, the entire output of the supplied algorithm is used.
 * </p>
 * @param bool $binary [optional] <p>
 * When set to TRUE, outputs raw binary data. FALSE outputs lowercase hexits.
 * </p>
 * @return string a string containing the derived key as lowercase hexits unless
 * <i>raw_output</i> is set to <b>TRUE</b> in which case the raw
 * binary representation of the derived key is returned.
 * @since 5.5
 */
#[Pure]
function hash_pbkdf2(string $algo, string $password, string $salt, int $iterations, int $length = 0, bool $binary = false): string {}

/**
 * Generates a key
 * @link https://php.net/manual/en/function.mhash-keygen-s2k.php
 * @param int $algo <p>
 * The hash ID used to create the key.
 * One of the <b>MHASH_hashname</b> constants.
 * </p>
 * @param string $password <p>
 * An user supplied password.
 * </p>
 * @param string $salt <p>
 * Must be different and random enough for every key you generate in
 * order to create different keys. Because <i>salt</i>
 * must be known when you check the keys, it is a good idea to append
 * the key to it. Salt has a fixed length of 8 bytes and will be padded
 * with zeros if you supply less bytes.
 * </p>
 * @param int $length <p>
 * The key length, in bytes.
 * </p>
 * @return string|false the generated key as a string, or <b>FALSE</b> on error.
 * @deprecated 8.1
 */
#[Pure]
#[Deprecated(since: '8.1')]
function mhash_keygen_s2k(int $algo, string $password, string $salt, int $length): string|false {}

/**
 * Gets the block size of the specified hash
 * @link https://php.net/manual/en/function.mhash-get-block-size.php
 * @param int $algo <p>
 * The hash ID. One of the <b>MHASH_hashname</b> constants.
 * </p>
 * @return int|false the size in bytes or <b>FALSE</b>, if the <i>hash</i>
 * does not exist.
 * @deprecated 8.1
 */
#[Pure]
#[Deprecated(since: '8.1')]
function mhash_get_block_size(int $algo): int|false {}

/**
 * Gets the name of the specified hash
 * @link https://php.net/manual/en/function.mhash-get-hash-name.php
 * @param int $algo <p>
 * The hash ID. One of the <b>MHASH_hashname</b> constants.
 * </p>
 * @return string|false the name of the hash or <b>FALSE</b>, if the hash does not exist.
 * @deprecated 8.1
 */
#[Pure]
#[Deprecated(since: '8.1')]
function mhash_get_hash_name(int $algo): string|false {}

/**
 * Gets the highest available hash ID
 * @link https://php.net/manual/en/function.mhash-count.php
 * @return int<0, max> the highest available hash ID. Hashes are numbered from 0 to this
 * hash ID.
 * @deprecated 8.1
 */
#[Pure]
#[Deprecated(since: '8.1')]
function mhash_count(): int {}

/**
 * Computes hash
 * @link https://php.net/manual/en/function.mhash.php
 * @param int $algo <p>
 * The hash ID. One of the <b>MHASH_hashname</b> constants.
 * </p>
 * @param string $data <p>
 * The user input, as a string.
 * </p>
 * @param string|null $key [optional] <p>
 * If specified, the function will return the resulting HMAC instead.
 * HMAC is keyed hashing for message authentication, or simply a message
 * digest that depends on the specified key. Not all algorithms
 * supported in mhash can be used in HMAC mode.
 * </p>
 * @return string|false the resulting hash (also called digest) or HMAC as a string, or
 * <b>FALSE</b> on error.
 * @deprecated 8.1
 */
#[Pure]
#[Deprecated(since: '8.1')]
function mhash(int $algo, string $data, ?string $key): string|false {}

/**
 * Optional flag for <b>hash_init</b>.
 * Indicates that the HMAC digest-keying algorithm should be
 * applied to the current hashing context.
 * @link https://php.net/manual/en/hash.constants.php
 */
define('HASH_HMAC', 1);
define('MHASH_CRC32', 0);
/**
 * @since 7.4
 */
define('MHASH_CRC32C', 34);
define('MHASH_MD5', 1);
define('MHASH_SHA1', 2);
define('MHASH_HAVAL256', 3);
define('MHASH_RIPEMD160', 5);
define('MHASH_TIGER', 7);
define('MHASH_GOST', 8);
define('MHASH_CRC32B', 9);
define('MHASH_HAVAL224', 10);
define('MHASH_HAVAL192', 11);
define('MHASH_HAVAL160', 12);
define('MHASH_HAVAL128', 13);
define('MHASH_TIGER128', 14);
define('MHASH_TIGER160', 15);
define('MHASH_MD4', 16);
define('MHASH_SHA256', 17);
define('MHASH_ADLER32', 18);
define('MHASH_SHA224', 19);
define('MHASH_SHA512', 20);
define('MHASH_SHA384', 21);
define('MHASH_WHIRLPOOL', 22);
define('MHASH_RIPEMD128', 23);
define('MHASH_RIPEMD256', 24);
define('MHASH_RIPEMD320', 25);
define('MHASH_SNEFRU256', 27);
define('MHASH_MD2', 28);
define('MHASH_FNV132', 29);
define('MHASH_FNV1A32', 30);
define('MHASH_FNV164', 31);
define('MHASH_FNV1A64', 32);
define('MHASH_JOAAT', 33);
/**
 * @since 8.1
 */
define('MHASH_MURMUR3A', 35);
/**
 * @since 8.1
 */
define('MHASH_MURMUR3C', 36);
/**
 * @since 8.1
 */
define('MHASH_MURMUR3F', 37);
/**
 * @since 8.1
 */
define('MHASH_XXH32', 38);
/**
 * @since 8.1
 */
define('MHASH_XXH64', 39);
/**
 * @since 8.1
 */
define('MHASH_XXH3', 40);
/**
 * @since 8.1
 */
define('MHASH_XXH128', 41);

/**
 * @since 7.2
 */
final class HashContext
{
    private function __construct() {}

    public function __serialize(): array {}

    /**
     * @param array $data
     */
    public function __unserialize(#[LanguageLevelTypeAware(['8.0' => 'array'], default: '')] $data): void {}
}
// End of hash v.1.0
<?php

// Start of PECL pthreads 3.1.6

/**
 * The default options for all Threads, causes pthreads to copy the environment
 * when new Threads are started
 * @link https://php.net/manual/en/pthreads.constants.php
 */
define('PTHREADS_INHERIT_ALL', 1118481);

/**
 * Do not inherit anything when new Threads are started
 * @link https://php.net/manual/en/pthreads.constants.php
 */
define('PTHREADS_INHERIT_NONE', 0);

/**
 * Inherit INI entries when new Threads are started
 * @link https://php.net/manual/en/pthreads.constants.php
 */
define('PTHREADS_INHERIT_INI', 1);

/**
 * Inherit user declared constants when new Threads are started
 * @link https://php.net/manual/en/pthreads.constants.php
 */
define('PTHREADS_INHERIT_CONSTANTS', 16);

/**
 * Inherit user declared classes when new Threads are started
 * @link https://php.net/manual/en/pthreads.constants.php
 */
define('PTHREADS_INHERIT_CLASSES', 4096);

/**
 * Inherit user declared functions when new Threads are started
 * @link https://php.net/manual/en/pthreads.constants.php
 */
define('PTHREADS_INHERIT_FUNCTIONS', 256);

/**
 * Inherit included file information when new Threads are started
 * @link https://php.net/manual/en/pthreads.constants.php
 */
define('PTHREADS_INHERIT_INCLUDES', 65536);

/**
 * Inherit all comments when new Threads are started
 * @link https://php.net/manual/en/pthreads.constants.php
 */
define('PTHREADS_INHERIT_COMMENTS', 1048576);

/**
 * Allow new Threads to send headers to standard output (normally prohibited)
 * @link https://php.net/manual/en/pthreads.constants.php
 */
define('PTHREADS_ALLOW_HEADERS', 268435456);

/**
 * (PECL pthreads &gt;= 2.0.0)<br/>
 * A Pool is a container for, and controller of, an adjustable number of
 * Workers.<br/>
 * Pooling provides a higher level abstraction of the Worker functionality,
 * including the management of references in the way required by pthreads.
 * @link https://secure.php.net/manual/en/class.pool.php
 */
class Pool
{
    /**
     * Maximum number of Workers this Pool can use
     * @var int
     */
    protected $size;

    /**
     * The class of the Worker
     * @var string
     */
    protected $class;

    /**
     * The arguments for constructor of new Workers
     * @var array
     */
    protected $ctor;

    /**
     * References to Workers
     * @var array
     */
    protected $workers;

    /**
     * Offset in workers of the last Worker used
     * @var int
     */
    protected $last;

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Construct a new pool of workers. Pools lazily create their threads, which means
     * new threads will only be spawned when they are required to execute tasks.
     * @link https://secure.php.net/manual/en/pool.construct.php
     * @param int $size <p>The maximum number of workers for this pool to create</p>
     * @param string $class [optional] <p>The class for new Workers. If no class is
     * given, then it defaults to the {@link Worker} class.</p>
     * @param array $ctor [optional] <p>An array of arguments to be passed to new
     * Workers</p>
     */
    public function __construct(int $size, string $class = 'Worker', array $ctor = []) {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Allows the pool to collect references determined to be garbage by the
     * optionally given collector
     * @link https://secure.php.net/manual/en/pool.collect.php
     * @param null|callable $collector [optional] <p>A Callable collector that returns a
     * boolean on whether the task can be collected or not. Only in rare cases should
     * a custom collector need to be used.</p>
     * @return int <p>The number of remaining tasks in the pool to be collected</p>
     */
    public function collect(?callable $collector = null) {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Resize the Pool
     * @link https://secure.php.net/manual/en/pool.resize.php
     * @param int $size <p>The maximum number of Workers this Pool can create</p>
     * @return void
     */
    public function resize(int $size) {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Shuts down all of the workers in the pool. This will block until all submitted
     * tasks have been executed.
     * @link https://secure.php.net/manual/en/pool.shutdown.php
     * @return void
     */
    public function shutdown() {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Submit the task to the next Worker in the Pool
     * @link https://secure.php.net/manual/en/pool.submit.php
     * @param Threaded $task <p>The task for execution</p>
     * @return int <p>the identifier of the Worker executing the object</p>
     */
    public function submit(Threaded $task) {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Submit a task to the specified worker in the pool. The workers are indexed
     * from 0, and will only exist if the pool has needed to create them (since
     * threads are lazily spawned).
     * @link https://secure.php.net/manual/en/pool.submitTo.php
     * @param int $worker <p>The worker to stack the task onto, indexed from 0</p>
     * @param Threaded $task <p>The task for execution</p>
     * @return int <p>The identifier of the worker that accepted the task</p>
     */
    public function submitTo(int $worker, Threaded $task) {}
}

/**
 * Threaded objects form the basis of pthreads ability to execute user code
 * in parallel; they expose synchronization methods and various useful
 * interfaces.<br/>
 * Threaded objects, most importantly, provide implicit safety for the programmer;
 * all operations on the object scope are safe.
 *
 * @link https://secure.php.net/manual/en/class.threaded.php
 */
class Threaded implements Collectable, Traversable, Countable, ArrayAccess
{
    /**
     * Worker object in which this Threaded is being executed
     * @var Worker
     */
    protected $worker;

    /**
     * (PECL pthreads &gt;= 3.0.0)<br/>
     * Increments the internal number of references to a Threaded object
     * @return void
     */
    public function addRef() {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Fetches a chunk of the objects property table of the given size,
     * optionally preserving keys
     * @link https://secure.php.net/manual/en/threaded.chunk.php
     * @param int $size <p>The number of items to fetch</p>
     * @param bool $preserve [optional] <p>Preserve the keys of members, by default false</p>
     * @return array <p>An array of items from the objects property table</p>
     */
    public function chunk($size, $preserve = false) {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Returns the number of properties for this object
     * @link https://secure.php.net/manual/en/threaded.count.php
     * @return int <p>The number of properties for this object</p>
     */
    public function count() {}

    /**
     * (PECL pthreads &gt;= 3.0.0)<br/>
     * Decrements the internal number of references to a Threaded object
     * @return void
     */
    public function delRef() {}

    /**
     * (PECL pthreads &gt;= 2.0.8)<br/>
     * Makes thread safe standard class at runtime
     * @link https://secure.php.net/manual/en/threaded.extend.php
     * @param string $class <p>The class to extend</p>
     * @return bool <p>A boolean indication of success</p>
     */
    public static function extend($class) {}

    /**
     * (PECL pthreads &gt;= 3.0.0)<br/>
     * Retrieves the internal number of references to a Threaded object
     * @return int <p>The number of references to the Threaded object</p>
     */
    public function getRefCount() {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Tell if the referenced object is executing
     * @link https://secure.php.net/manual/en/thread.isrunning.php
     * @return bool <p>A boolean indication of state</p>
     */
    public function isRunning() {}

    /**
     * (PECL pthreads &gt;= 3.1.0)<br/>
     * @inheritdoc
     * @see Collectable::isGarbage()
     */
    public function isGarbage(): bool {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Tell if the referenced object was terminated during execution; suffered
     * fatal errors, or threw uncaught exceptions
     * @link https://secure.php.net/manual/en/threaded.isterminated.php
     * @return bool <p>A boolean indication of state</p>
     */
    public function isTerminated() {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Merges data into the current object
     * @link https://secure.php.net/manual/en/threaded.merge.php
     * @var mixed <p>The data to merge</p>
     * @var bool [optional] <p>Overwrite existing keys, by default true</p>
     * @return bool <p>A boolean indication of success</p>
     */
    public function merge($from, $overwrite = true) {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Send notification to the referenced object
     * @link https://secure.php.net/manual/en/threaded.notify.php
     * @return bool <p>A boolean indication of success</p>
     */
    public function notify() {}

    /**
     * (PECL pthreads &gt;= 3.0.0)<br/>
     * Send notification to the referenced object. This unblocks at least one
     * of the blocked threads (as opposed to unblocking all of them, as seen with
     * Threaded::notify()).
     * @link https://secure.php.net/manual/en/threaded.notifyone.php
     * @return bool <p>A boolean indication of success</p>
     */
    public function notifyOne() {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Pops an item from the objects property table
     * @link https://secure.php.net/manual/en/threaded.pop.php
     * @return mixed <p>The last item from the objects property table</p>
     */
    public function pop() {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * The programmer should always implement the run method for objects
     * that are intended for execution.
     * @link https://secure.php.net/manual/en/threaded.run.php
     * @return void
     */
    public function run() {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Shifts an item from the objects property table
     * @link https://secure.php.net/manual/en/threaded.shift.php
     * @return mixed <p>The first item from the objects property table</p>
     */
    public function shift() {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Executes the block while retaining the referenced objects
     * synchronization lock for the calling context
     * @link https://secure.php.net/manual/en/threaded.synchronized.php
     * @param Closure $block <p>The block of code to execute</p>
     * @param mixed ...$_ [optional] <p>Variable length list of arguments
     * to use as function arguments to the block</p>
     * @return mixed <p>The return value from the block</p>
     */
    public function synchronized(Closure $block, ...$_) {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Will cause the calling context to wait for notification from the
     * referenced object
     * @link https://secure.php.net/manual/en/threaded.wait.php
     * @param int $timeout [optional] <p>An optional timeout in microseconds</p>
     * @return bool <p>A boolean indication of success</p>
     */
    public function wait(int $timeout = 0) {}

    /**
     * @inheritdoc
     * @see ArrayAccess::offsetExists()
     */
    public function offsetExists($offset) {}

    /**
     * @inheritdoc
     * @see ArrayAccess::offsetGet()
     */
    public function offsetGet($offset) {}

    /**
     * @inheritdoc
     * @see ArrayAccess::offsetSet()
     */
    public function offsetSet($offset, $value) {}

    /**
     * @inheritdoc
     * @see ArrayAccess::offsetUnset()
     */
    public function offsetUnset($offset) {}
}

/**
 * (PECL pthreads &gt;= 2.0.0)<br/>
 * When the start method of a Thread is invoked, the run method code will be
 * executed in separate Thread, in parallel.<br/>
 * After the run method is executed the Thread will exit immediately, it will
 * be joined with the creating Thread at the appropriate time.
 *
 * @link https://secure.php.net/manual/en/class.thread.php
 */
class Thread extends Threaded implements Countable, Traversable, ArrayAccess
{
    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Will return the identity of the Thread that created the referenced Thread
     * @link https://secure.php.net/manual/en/thread.getcreatorid.php
     * @return int <p>A numeric identity</p>
     */
    public function getCreatorId() {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Return a reference to the currently executing Thread
     * @link https://secure.php.net/manual/en/thread.getcurrentthread.php
     * @return Thread <p>An object representing the currently executing Thread</p>
     */
    public static function getCurrentThread() {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Will return the identity of the currently executing Thread
     * @link https://secure.php.net/manual/en/thread.getcurrentthreadid.php
     * @return int <p>A numeric identity</p>
     */
    public static function getCurrentThreadId() {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Will return the identity of the referenced Thread
     * @link https://secure.php.net/manual/en/thread.getthreadid.php
     * @return int <p>A numeric identity</p>
     */
    public function getThreadId() {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Tell if the referenced Thread has been joined
     * @link https://secure.php.net/manual/en/thread.isjoined.php
     * @return bool <p>A boolean indication of state</p>
     */
    public function isJoined() {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Tell if the referenced Thread was started
     * @link https://secure.php.net/manual/en/thread.isstarted.php
     * @return bool <p>A boolean indication of state</p>
     */
    public function isStarted() {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Causes the calling context to wait for the referenced Thread to finish executing
     * @link https://secure.php.net/manual/en/thread.join.php
     * @return bool <p>A boolean indication of success</p>
     */
    public function join() {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Will start a new Thread to execute the implemented run method
     * @link https://secure.php.net/manual/en/thread.start.php
     * @param int $options [optional] <p>An optional mask of inheritance
     * constants, by default <b>{@link PTHREADS_INHERIT_ALL}</b></p>
     * @return bool <p>A boolean indication of success</p>
     */
    public function start(int $options = PTHREADS_INHERIT_ALL) {}
}

/**
 * (PECL pthreads &gt;= 2.0.0)<br/>
 * Worker Threads have a persistent context, as such should be used over
 * Threads in most cases.<br/>
 * When a Worker is started, the run method will be executed, but the Thread will
 * not leave until one of the following conditions are met:<br/><ul>
 * <li>the Worker goes out of scope (no more references remain)</li>
 * <li>the programmer calls shutdown</li>
 * <li>the script dies</li></ul>
 * This means the programmer can reuse the context throughout execution; placing
 * objects on the stack of the Worker will cause the Worker to execute the stacked
 * objects run method.
 * @link https://secure.php.net/manual/en/class.worker.php
 */
class Worker extends Thread implements Traversable, Countable, ArrayAccess
{
    /**
     * (PECL pthreads &gt;= 3.0.0)<br/>
     * Allows the worker to collect references determined to be garbage by the
     * optionally given collector
     * @link https://secure.php.net/manual/en/worker.collect.php
     * @param null|callable $collector [optional] <p>A Callable collector that returns
     * a boolean on whether the task can be collected or not. Only in rare cases
     * should a custom collector need to be used</p>
     * @return int <p>The number of remaining tasks on the worker's stack to be
     * collected</p>
     */
    public function collect(?callable $collector = null) {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Returns the number of tasks left on the stack
     * @link https://secure.php.net/manual/en/worker.getstacked.php
     * @return int <p>Returns the number of tasks currently waiting to be
     * executed by the worker</p>
     */
    public function getStacked() {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Whether the worker has been shutdown or not
     * @link https://secure.php.net/manual/en/worker.isshutdown.php
     * @return bool <p>Returns whether the worker has been shutdown or not</p>
     */
    public function isShutdown() {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Shuts down the Worker after executing all of the stacked tasks
     * @link https://secure.php.net/manual/en/worker.shutdown.php
     * @return bool <p>Whether the worker was successfully shutdown or not</p>
     */
    public function shutdown() {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Appends the new work to the stack of the referenced worker
     * @link https://secure.php.net/manual/en/worker.stack.php
     * @param Threaded $work <p>A Threaded object to be executed by the Worker</p>
     * @return int <p>The new size of the stack</p>
     */
    public function stack(Threaded $work) {}

    /**
     * (PECL pthreads &gt;= 2.0.0)<br/>
     * Removes the first task (the oldest one) in the stack
     * @link https://secure.php.net/manual/en/worker.unstack.php
     * @return Threaded|null <p>The item removed from the stack</p>
     */
    public function unstack() {}
}

/**
 * (PECL pthreads &gt;= 2.0.8)<br/>
 * Represents a garbage-collectable object.
 * @link https://secure.php.net/manual/en/class.collectable.php
 */
interface Collectable
{
    /**
     * (PECL pthreads &gt;= 2.0.8)<br/>
     * Can be called in {@link Pool::collect()} to determine if this object is garbage
     * @link https://secure.php.net/manual/en/collectable.isgarbage.php
     * @return bool <p>Whether this object is garbage or not</p>
     */
    public function isGarbage(): bool;
}

/**
 * (PECL pthreads &gt;= 3.0.0)<br/>
 * The Volatile class is new to pthreads v3. Its introduction is a consequence of
 * the new immutability semantics of Threaded members of Threaded classes. The
 * Volatile class enables for mutability of its Threaded members, and is also
 * used to store PHP arrays in Threaded contexts.
 * @see Threaded
 * @link https://secure.php.net/manual/en/class.volatile.php
 */
class Volatile extends Threaded implements Collectable, Traversable {}
<?php

use JetBrains\PhpStorm\Immutable;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;

/**
 * A parent class to <b>ReflectionFunction</b>, read its
 * description for details.
 *
 * @link https://php.net/manual/en/class.reflectionfunctionabstract.php
 */
abstract class ReflectionFunctionAbstract implements Reflector
{
    /**
     * @var string Name of the function, same as calling the {@see ReflectionFunctionAbstract::getName()} method
     */
    #[Immutable]
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $name;

    /**
     * Clones function
     *
     * @link https://php.net/manual/en/reflectionfunctionabstract.clone.php
     * @return void
     */
    #[PhpStormStubsElementAvailable(from: "5.4", to: "8.0")]
    final private function __clone(): void {}

    /**
     * Clones function
     *
     * @link https://php.net/manual/en/reflectionfunctionabstract.clone.php
     * @return void
     */
    #[PhpStormStubsElementAvailable(from: "8.1")]
    private function __clone(): void {}

    /**
     * Checks if function in namespace
     *
     * @link https://php.net/manual/en/reflectionfunctionabstract.innamespace.php
     * @return bool {@see true} if it's in a namespace, otherwise {@see false}
     */
    #[TentativeType]
    public function inNamespace(): bool {}

    /**
     * Checks if closure
     *
     * @link https://php.net/manual/en/reflectionfunctionabstract.isclosure.php
     * @return bool {@see true} if it's a closure, otherwise {@see false}
     */
    #[Pure]
    #[TentativeType]
    public function isClosure(): bool {}

    /**
     * Checks if deprecated
     *
     * @link https://php.net/manual/en/reflectionfunctionabstract.isdeprecated.php
     * @return bool {@see true} if it's deprecated, otherwise {@see false}
     */
    #[Pure]
    #[TentativeType]
    public function isDeprecated(): bool {}

    /**
     * Checks if is internal
     *
     * @link https://php.net/manual/en/reflectionfunctionabstract.isinternal.php
     * @return bool {@see true} if it's internal, otherwise {@see false}
     */
    #[Pure]
    #[TentativeType]
    public function isInternal(): bool {}

    /**
     * Checks if user defined
     *
     * @link https://php.net/manual/en/reflectionfunctionabstract.isuserdefined.php
     * @return bool {@see true} if it's user-defined, otherwise {@see false}
     */
    #[Pure]
    #[TentativeType]
    public function isUserDefined(): bool {}

    /**
     * Returns whether this function is a generator
     *
     * @link https://php.net/manual/en/reflectionfunctionabstract.isgenerator.php
     * @return bool {@see true} if the function is generator, otherwise {@see false}
     * @since 5.5
     */
    #[Pure]
    #[TentativeType]
    public function isGenerator(): bool {}

    /**
     * Returns whether this function is variadic
     *
     * @link https://php.net/manual/en/reflectionfunctionabstract.isvariadic.php
     * @return bool {@see true} if the function is variadic, otherwise {@see false}
     * @since 5.6
     */
    #[Pure]
    #[TentativeType]
    public function isVariadic(): bool {}

    /**
     * Returns this pointer bound to closure
     *
     * @link https://php.net/manual/en/reflectionfunctionabstract.getclosurethis.php
     * @return object|null Returns $this pointer or {@see null} in case of an error.
     */
    #[Pure]
    #[TentativeType]
    public function getClosureThis(): ?object {}

    /**
     * Returns the scope associated to the closure
     *
     * @link https://php.net/manual/en/reflectionfunctionabstract.getclosurescopeclass.php
     * @return ReflectionClass|null Returns the class on success or {@see null}
     * on failure.
     * @since 5.4
     */
    #[Pure]
    #[TentativeType]
    public function getClosureScopeClass(): ?ReflectionClass {}

    /**
     * @return ReflectionClass|null Returns the class on success or {@see null}
     * on failure.
     * @since 8.0
     */
    #[Pure]
    #[TentativeType]
    public function getClosureCalledClass(): ?ReflectionClass {}

    /**
     * Gets doc comment
     *
     * @link https://php.net/manual/en/reflectionfunctionabstract.getdoccomment.php
     * @return string|false The doc comment if it exists, otherwise {@see false}
     */
    #[Pure]
    #[TentativeType]
    public function getDocComment(): string|false {}

    /**
     * Gets end line number
     *
     * @link https://php.net/manual/en/reflectionfunctionabstract.getendline.php
     * @return int|false The ending line number of the user defined function,
     * or {@see false} if unknown.
     */
    #[Pure]
    #[TentativeType]
    public function getEndLine(): int|false {}

    /**
     * Gets extension info
     *
     * @link https://php.net/manual/en/reflectionfunctionabstract.getextension.php
     * @return ReflectionExtension|null The extension information, as a
     * {@see ReflectionExtension} object or {@see null} instead.
     */
    #[Pure]
    #[TentativeType]
    public function getExtension(): ?ReflectionExtension {}

    /**
     * Gets extension name
     *
     * @link https://php.net/manual/en/reflectionfunctionabstract.getextensionname.php
     * @return string|false The extension's name or {@see false} instead.
     */
    #[Pure]
    #[TentativeType]
    public function getExtensionName(): string|false {}

    /**
     * Gets file name
     *
     * @link https://php.net/manual/en/reflectionfunctionabstract.getfilename.php
     * @return string|false The file name or {@see false} in case of error.
     */
    #[Pure]
    #[TentativeType]
    public function getFileName(): string|false {}

    /**
     * Gets function name
     *
     * @link https://php.net/manual/en/reflectionfunctionabstract.getname.php
     * @return string The name of the function.
     */
    #[Pure]
    #[TentativeType]
    public function getName(): string {}

    /**
     * Gets namespace name
     *
     * @link https://php.net/manual/en/reflectionfunctionabstract.getnamespacename.php
     * @return string The namespace name.
     */
    #[Pure]
    #[TentativeType]
    public function getNamespaceName(): string {}

    /**
     * Gets number of parameters
     *
     * @link https://php.net/manual/en/reflectionfunctionabstract.getnumberofparameters.php
     * @return int The number of parameters.
     * @since 5.0.3
     */
    #[Pure]
    #[TentativeType]
    public function getNumberOfParameters(): int {}

    /**
     * Gets number of required parameters
     *
     * @link https://php.net/manual/en/reflectionfunctionabstract.getnumberofrequiredparameters.php
     * @return int The number of required parameters.
     * @since 5.0.3
     */
    #[Pure]
    #[TentativeType]
    public function getNumberOfRequiredParameters(): int {}

    /**
     * Gets parameters
     *
     * @link https://php.net/manual/en/reflectionfunctionabstract.getparameters.php
     * @return ReflectionParameter[] The parameters, as a ReflectionParameter objects.
     */
    #[Pure]
    #[TentativeType]
    public function getParameters(): array {}

    /**
     * Gets the specified return type of a function
     *
     * @link https://php.net/manual/en/reflectionfunctionabstract.getreturntype.php
     * @return ReflectionType|null Returns a {@see ReflectionType} object if a
     * return type is specified, {@see null} otherwise.
     * @since 7.0
     */
    #[Pure]
    #[LanguageLevelTypeAware(
        [
            '7.1' => 'ReflectionNamedType|null',
            '8.0' => 'ReflectionNamedType|ReflectionUnionType|null',
            '8.1' => 'ReflectionNamedType|ReflectionUnionType|ReflectionIntersectionType|null'
        ],
        default: 'ReflectionType|null'
    )]
    #[TentativeType]
    public function getReturnType(): ?ReflectionType {}

    /**
     * Gets function short name
     *
     * @link https://php.net/manual/en/reflectionfunctionabstract.getshortname.php
     * @return string The short name of the function.
     */
    #[Pure]
    #[TentativeType]
    public function getShortName(): string {}

    /**
     * Gets starting line number
     *
     * @link https://php.net/manual/en/reflectionfunctionabstract.getstartline.php
     * @return int|false The starting line number or {@see false} if unknown.
     */
    #[Pure]
    #[TentativeType]
    public function getStartLine(): int|false {}

    /**
     * Gets static variables
     *
     * @link https://php.net/manual/en/reflectionfunctionabstract.getstaticvariables.php
     * @return array An array of static variables.
     */
    #[Pure]
    #[TentativeType]
    public function getStaticVariables(): array {}

    /**
     * Checks if returns reference
     *
     * @link https://php.net/manual/en/reflectionfunctionabstract.returnsreference.php
     * @return bool {@see true} if it returns a reference, otherwise {@see false}
     */
    #[TentativeType]
    public function returnsReference(): bool {}

    /**
     * Checks if the function has a specified return type
     *
     * @link https://php.net/manual/en/reflectionfunctionabstract.hasreturntype.php
     * @return bool Returns {@see true} if the function is a specified return
     * type, otherwise {@see false}.
     * @since 7.0
     */
    #[TentativeType]
    public function hasReturnType(): bool {}

    /**
     * @template T
     *
     * Returns an array of function attributes.
     *
     * @param class-string<T>|null $name Name of an attribute class
     * @param int $flags Сriteria by which the attribute is searched.
     * @return ReflectionAttribute<T>[]
     * @since 8.0
     */
    #[Pure]
    public function getAttributes(?string $name = null, int $flags = 0): array {}

    #[PhpStormStubsElementAvailable('8.1')]
    #[Pure]
    public function getClosureUsedVariables(): array {}

    #[PhpStormStubsElementAvailable('8.1')]
    #[Pure]
    public function hasTentativeReturnType(): bool {}

    #[PhpStormStubsElementAvailable('8.1')]
    #[Pure]
    public function getTentativeReturnType(): ?ReflectionType {}

    #[PhpStormStubsElementAvailable('8.1')]
    #[Pure]
    #[TentativeType]
    public function isStatic(): bool {}

    #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')]
    public function __toString() {}
}
<?php

use JetBrains\PhpStorm\Immutable;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;

/**
 * @link https://secure.php.net/manual/en/class.reflectionzendextension.php
 * @since 5.4
 */
class ReflectionZendExtension implements Reflector
{
    /**
     * @var string Name of the extension, same as calling the {@see ReflectionZendExtension::getName()} method
     */
    #[Immutable]
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $name;

    /**
     * Constructs a ReflectionZendExtension object
     *
     * @link https://php.net/manual/en/reflectionzendextension.construct.php
     * @param string $name
     * @throws ReflectionException if the extension does not exist.
     * @since 5.4
     */
    public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name) {}

    /**
     * Exports a reflected zend extension.
     *
     * @link https://php.net/manual/en/reflectionzendextension.export.php
     * @param string $name The reflection to export.
     * @param bool $return Setting to {@see true} will return the
     * export, as opposed to emitting it. Setting to {@see false} (the default)
     * will do the opposite.
     * @return string|null If the $return parameter is set to {@see true}, then
     * the export is returned as a string, otherwise {@see null} is returned.
     */
    public static function export($name, $return = false) {}

    /**
     * To string handler
     *
     * @link https://php.net/manual/en/reflectionzendextension.tostring.php
     * @return string
     * @since 5.4
     */
    #[TentativeType]
    public function __toString(): string {}

    /**
     * Gets name
     *
     * @link https://php.net/manual/en/reflectionzendextension.getname.php
     * @return string
     * @since 5.4
     */
    #[Pure]
    #[TentativeType]
    public function getName(): string {}

    /**
     * Gets version
     *
     * @link https://php.net/manual/en/reflectionzendextension.getversion.php
     * @return string
     * @since 5.4
     */
    #[Pure]
    #[TentativeType]
    public function getVersion(): string {}

    /**
     * Gets author
     *
     * @link https://php.net/manual/en/reflectionzendextension.getauthor.php
     * @return string
     * @since 5.4
     */
    #[Pure]
    #[TentativeType]
    public function getAuthor(): string {}

    /**
     * Gets URL
     *
     * @link https://php.net/manual/en/reflectionzendextension.geturl.php
     * @return string
     * @since 5.4
     */
    #[Pure]
    #[TentativeType]
    public function getURL(): string {}

    /**
     * Gets copyright
     *
     * @link https://php.net/manual/en/reflectionzendextension.getcopyright.php
     * @return string
     * @since 5.4
     */
    #[Pure]
    #[TentativeType]
    public function getCopyright(): string {}

    /**
     * Clone handler
     *
     * @link https://php.net/manual/en/reflectionzendextension.clone.php
     * @return void
     * @since 5.4
     */
    #[PhpStormStubsElementAvailable(from: "5.4", to: "8.0")]
    final private function __clone(): void {}

    /**
     * Clone handler
     *
     * @link https://php.net/manual/en/reflectionzendextension.clone.php
     * @return void
     * @since 5.4
     */
    #[PhpStormStubsElementAvailable(from: "8.1")]
    private function __clone(): void {}
}
<?php

use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Immutable;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;

/**
 * The <b>ReflectionMethod</b> class reports
 * information about a method.
 *
 * @link https://php.net/manual/en/class.reflectionmethod.php
 */
class ReflectionMethod extends ReflectionFunctionAbstract
{
    /**
     * @var string Name of the method, same as calling the {@see ReflectionMethod::getName()} method
     */
    #[Immutable]
    public $name;

    /**
     * @var string Fully qualified class name where this method was defined
     */
    #[Immutable]
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $class;

    /**
     * Indicates that the method is static.
     */
    public const IS_STATIC = 16;

    /**
     * Indicates that the method is public.
     */
    public const IS_PUBLIC = 1;

    /**
     * Indicates that the method is protected.
     */
    public const IS_PROTECTED = 2;

    /**
     * Indicates that the method is private.
     */
    public const IS_PRIVATE = 4;

    /**
     * Indicates that the method is abstract.
     */
    public const IS_ABSTRACT = 64;

    /**
     * Indicates that the method is final.
     */
    public const IS_FINAL = 32;

    /**
     * Constructs a ReflectionMethod
     *
     * <code>
     * $reflection = new ReflectionMethod(new Example(), 'method');
     * $reflection = new ReflectionMethod(Example::class, 'method');
     * $reflection = new ReflectionMethod('Example::method');
     * </code>
     *
     * @link https://php.net/manual/en/reflectionmethod.construct.php
     * @param string|object $objectOrMethod Classname, object
     * (instance of the class) that contains the method or class name and
     * method name delimited by ::.
     * @param string|null $method Name of the method if the first argument is a
     * classname or an object.
     * @throws ReflectionException if the class or method does not exist.
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'object|string'], default: '')] $objectOrMethod,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $method = null
    ) {}

    /**
     * Export a reflection method.
     *
     * @link https://php.net/manual/en/reflectionmethod.export.php
     * @param string $class The class name.
     * @param string $name The name of the method.
     * @param bool $return Setting to {@see true} will return the export,
     * as opposed to emitting it. Setting to {@see false} (the default) will do the
     * opposite.
     * @return string|null If the $return parameter is set to {@see true}, then
     * the export is returned as a string, otherwise {@see null} is returned.
     * @removed 8.0
     */
    #[Deprecated(since: '7.4')]
    public static function export($class, $name, $return = false) {}

    /**
     * Returns the string representation of the ReflectionMethod object.
     *
     * @link https://php.net/manual/en/reflectionmethod.tostring.php
     * @return string A string representation of this {@see ReflectionMethod} instance.
     */
    #[TentativeType]
    public function __toString(): string {}

    /**
     * Checks if method is public
     *
     * @link https://php.net/manual/en/reflectionmethod.ispublic.php
     * @return bool Returns {@see true} if the method is public, otherwise {@see false}
     */
    #[Pure]
    #[TentativeType]
    public function isPublic(): bool {}

    /**
     * Checks if method is private
     *
     * @link https://php.net/manual/en/reflectionmethod.isprivate.php
     * @return bool Returns {@see true} if the method is private, otherwise {@see false}
     */
    #[Pure]
    #[TentativeType]
    public function isPrivate(): bool {}

    /**
     * Checks if method is protected
     *
     * @link https://php.net/manual/en/reflectionmethod.isprotected.php
     * @return bool Returns {@see true} if the method is protected, otherwise {@see false}
     */
    #[Pure]
    #[TentativeType]
    public function isProtected(): bool {}

    /**
     * Checks if method is abstract
     *
     * @link https://php.net/manual/en/reflectionmethod.isabstract.php
     * @return bool Returns {@see true} if the method is abstract, otherwise {@see false}
     */
    #[Pure]
    #[TentativeType]
    public function isAbstract(): bool {}

    /**
     * Checks if method is final
     *
     * @link https://php.net/manual/en/reflectionmethod.isfinal.php
     * @return bool Returns {@see true} if the method is final, otherwise {@see false}
     */
    #[Pure]
    #[TentativeType]
    public function isFinal(): bool {}

    /**
     * Checks if method is static
     *
     * @link https://php.net/manual/en/reflectionmethod.isstatic.php
     * @return bool Returns {@see true} if the method is static, otherwise {@see false}
     */
    #[Pure]
    #[TentativeType]
    public function isStatic(): bool {}

    /**
     * Checks if method is a constructor
     *
     * @link https://php.net/manual/en/reflectionmethod.isconstructor.php
     * @return bool Returns {@see true} if the method is a constructor, otherwise {@see false}
     */
    #[Pure]
    #[TentativeType]
    public function isConstructor(): bool {}

    /**
     * Checks if method is a destructor
     *
     * @link https://php.net/manual/en/reflectionmethod.isdestructor.php
     * @return bool Returns {@see true} if the method is a destructor, otherwise {@see false}
     */
    #[Pure]
    #[TentativeType]
    public function isDestructor(): bool {}

    /**
     * Returns a dynamically created closure for the method
     *
     * @link https://php.net/manual/en/reflectionmethod.getclosure.php
     * @param object $object Forbidden for static methods, required for other methods or nothing.
     * @return Closure|null Returns {@see Closure} or {@see null} in case of an error.
     * @since 5.4
     */
    #[Pure]
    #[TentativeType]
    public function getClosure(
        #[PhpStormStubsElementAvailable(from: '5.3', to: '7.3')] $object,
        #[PhpStormStubsElementAvailable(from: '7.4')] #[LanguageLevelTypeAware(['8.0' => 'object|null'], default: '')] $object = null
    ): Closure {}

    /**
     * Gets the method modifiers
     *
     * @link https://php.net/manual/en/reflectionmethod.getmodifiers.php
     * @return int A numeric representation of the modifiers. The modifiers are
     * listed below. The actual meanings of these modifiers are described in the
     * predefined constants.
     *
     * ReflectionMethod modifiers:
     *
     *  - {@see ReflectionMethod::IS_STATIC} - Indicates that the method is static.
     *  - {@see ReflectionMethod::IS_PUBLIC} - Indicates that the method is public.
     *  - {@see ReflectionMethod::IS_PROTECTED} - Indicates that the method is protected.
     *  - {@see ReflectionMethod::IS_PRIVATE} - Indicates that the method is private.
     *  - {@see ReflectionMethod::IS_ABSTRACT} - Indicates that the method is abstract.
     *  - {@see ReflectionMethod::IS_FINAL} - Indicates that the method is final.
     */
    #[Pure]
    #[TentativeType]
    public function getModifiers(): int {}

    /**
     * Invokes a reflected method.
     *
     * @link https://php.net/manual/en/reflectionmethod.invoke.php
     * @param object|null $object The object to invoke the method on. For static
     * methods, pass {@see null} to this parameter.
     * @param mixed ...$args Zero or more parameters to be passed to the
     * method. It accepts a variable number of parameters which are passed to
     * the method.
     * @return mixed Returns the method result.
     * @throws ReflectionException if the object parameter does not contain an
     * instance of the class that this method was declared in or the method
     * invocation failed.
     */
    public function invoke($object, ...$args) {}

    /**
     * Invokes the reflected method and pass its arguments as array.
     *
     * @link https://php.net/manual/en/reflectionmethod.invokeargs.php
     * @param object|null $object The object to invoke the method on. In case
     * of static methods, you can pass {@see null} to this parameter.
     * @param array $args The parameters to be passed to the function, as an {@see array}.
     * @return mixed the method result.
     * @throws ReflectionException if the object parameter does not contain an
     * instance of the class that this method was declared in or the method
     * invocation failed.
     */
    #[TentativeType]
    public function invokeArgs(#[LanguageLevelTypeAware(['8.0' => 'object|null'], default: '')] $object, array $args): mixed {}

    /**
     * Gets declaring class for the reflected method.
     *
     * @link https://php.net/manual/en/reflectionmethod.getdeclaringclass.php
     * @return ReflectionClass A {@see ReflectionClass} object of the class that the
     * reflected method is part of.
     */
    #[Pure]
    #[TentativeType]
    public function getDeclaringClass(): ReflectionClass {}

    /**
     * Gets the method prototype (if there is one).
     *
     * @link https://php.net/manual/en/reflectionmethod.getprototype.php
     * @return ReflectionMethod A {@see ReflectionMethod} instance of the method prototype.
     * @throws ReflectionException if the method does not have a prototype
     */
    #[Pure]
    #[TentativeType]
    public function getPrototype(): ReflectionMethod {}

    /**
     * Set method accessibility
     *
     * @link https://php.net/manual/en/reflectionmethod.setaccessible.php
     * @param bool $accessible {@see true} to allow accessibility, or {@see false}
     * @return void No value is returned.
     * @since 5.3.2
     */
    #[PhpStormStubsElementAvailable(to: "8.0")]
    #[TentativeType]
    public function setAccessible(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $accessible): void {}

    /**
     * Set method accessibility
     * This method is no-op starting from PHP 8.1
     *
     * @link https://php.net/manual/en/reflectionmethod.setaccessible.php
     * @param bool $accessible {@see true} to allow accessibility, or {@see false}
     * @return void No value is returned.
     */
    #[Pure]
    #[PhpStormStubsElementAvailable(from: "8.1")]
    #[TentativeType]
    public function setAccessible(bool $accessible): void {}

    #[PhpStormStubsElementAvailable(from: '8.2')]
    public function hasPrototype(): bool {}
}
<?php

/**
 * @link https://php.net/manual/en/class.reflectionenumbackedcase.php
 * @since 8.1
 */
class ReflectionEnumBackedCase extends ReflectionEnumUnitCase
{
    public function __construct(object|string $class, string $constant) {}

    #[Pure]
    public function getBackingValue(): int|string {}
}
<?php

/**
 * @link https://php.net/manual/en/class.reflectionenumpurecase.php
 * @since 8.1
 */
class ReflectionEnumPureCase extends ReflectionClassConstant {}
<?php

/**
 * The ReflectionException class.
 *
 * @link https://php.net/manual/en/class.reflectionexception.php
 */
class ReflectionException extends Exception {}
<?php

use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\TentativeType;

/**
 * The reflection class.
 *
 * @link https://php.net/manual/en/class.reflection.php
 */
class Reflection
{
    /**
     * Gets modifier names
     *
     * @link https://php.net/manual/en/reflection.getmodifiernames.php
     * @param int $modifiers Bitfield of the modifiers to get.
     * @return string[] An array of modifier names.
     */
    #[TentativeType]
    public static function getModifierNames(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $modifiers): array {}

    /**
     * Exports
     *
     * @link https://php.net/manual/en/reflection.export.php
     * @param Reflector $reflector The reflection to export.
     * @param bool $return Setting to {@see true} will return the export, as
     * opposed to emitting it. Setting to {@see false} (the default) will do the opposite.
     * @return string|null If the return parameter is set to {@see true}, then the
     * export is returned as a string, otherwise {@see null} is returned.
     * @removed 8.0
     */
    #[Deprecated(since: '7.4')]
    public static function export(Reflector $reflector, $return = false) {}
}
<?php

use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Immutable;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;

/**
 * The <b>ReflectionFunction</b> class reports
 * information about a function.
 *
 * @link https://php.net/manual/en/class.reflectionfunction.php
 */
class ReflectionFunction extends ReflectionFunctionAbstract
{
    /**
     * @var string Function name, same as calling the {@see ReflectionFunction::getName()} method
     */
    #[Immutable]
    public $name;

    /**
     * Indicates deprecated functions.
     *
     * @link https://www.php.net/manual/en/class.reflectionfunction.php#reflectionfunction.constants.is-deprecated
     */
    public const IS_DEPRECATED = 2048;

    /**
     * Constructs a ReflectionFunction object
     *
     * @link https://php.net/manual/en/reflectionfunction.construct.php
     * @param string|Closure $function The name of the function to reflect or a closure.
     * @throws ReflectionException if the function does not exist.
     */
    public function __construct(#[LanguageLevelTypeAware(['8.0' => 'Closure|string'], default: '')] $function) {}

    /**
     * Returns the string representation of the ReflectionFunction object.
     *
     * @link https://php.net/manual/en/reflectionfunction.tostring.php
     */
    #[TentativeType]
    public function __toString(): string {}

    /**
     * Exports function
     *
     * @link https://php.net/manual/en/reflectionfunction.export.php
     * @param string $name The reflection to export.
     * @param bool $return Setting to {@see true} will return the
     * export, as opposed to emitting it. Setting to {@see false} (the default)
     * will do the opposite.
     * @return string|null If the $return parameter is set to {@see true}, then
     * the export is returned as a string, otherwise {@see null} is returned.
     * @removed 8.0
     */
    #[Deprecated(since: '7.4')]
    public static function export($name, $return = false) {}

    /**
     * Checks if function is disabled
     *
     * @link https://php.net/manual/en/reflectionfunction.isdisabled.php
     * @return bool {@see true} if it's disable, otherwise {@see false}
     */
    #[Deprecated(since: '8.0')]
    #[Pure]
    #[TentativeType]
    public function isDisabled(): bool {}

    /**
     * Invokes function
     *
     * @link https://www.php.net/manual/en/reflectionfunction.invoke.php
     * @param mixed ...$args [optional] The passed in argument list. It accepts a
     * variable number of arguments which are passed to the function much
     * like {@see call_user_func} is.
     * @return mixed Returns the result of the invoked function call.
     */
    #[TentativeType]
    public function invoke(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] ...$args): mixed {}

    /**
     * Invokes function args
     *
     * @link https://php.net/manual/en/reflectionfunction.invokeargs.php
     * @param array $args The passed arguments to the function as an array, much
     * like {@see call_user_func_array} works.
     * @return mixed the result of the invoked function
     */
    #[TentativeType]
    public function invokeArgs(array $args): mixed {}

    /**
     * Returns a dynamically created closure for the function
     *
     * @link https://php.net/manual/en/reflectionfunction.getclosure.php
     * @return Closure|null Returns {@see Closure} or {@see null} in case of an error.
     */
    #[Pure]
    #[TentativeType]
    public function getClosure(): Closure {}

    #[PhpStormStubsElementAvailable(from: '8.2')]
    public function isAnonymous(): bool {}
}
<?php

use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Immutable;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;

/**
 * The <b>ReflectionProperty</b> class reports information about a classes
 * properties.
 *
 * @link https://php.net/manual/en/class.reflectionproperty.php
 */
class ReflectionProperty implements Reflector
{
    /**
     * @var string Name of the property, same as calling the {@see ReflectionProperty::getName()} method
     */
    #[Immutable]
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $name;

    /**
     * @var string Fully qualified class name where this property was defined
     */
    #[Immutable]
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $class;

    /**
     * Indicates that the property is static.
     *
     * @link https://www.php.net/manual/en/class.reflectionproperty.php#reflectionproperty.constants.is-static
     */
    public const IS_STATIC = 16;

    /**
     * Indicates that the property is public.
     *
     * @link https://www.php.net/manual/en/class.reflectionproperty.php#reflectionproperty.constants.is-public
     */
    public const IS_PUBLIC = 1;

    /**
     * Indicates that the property is protected.
     *
     * @link https://www.php.net/manual/en/class.reflectionproperty.php#reflectionproperty.constants.is-protected
     */
    public const IS_PROTECTED = 2;

    /**
     * Indicates that the property is private.
     *
     * @link https://www.php.net/manual/en/class.reflectionproperty.php#reflectionproperty.constants.is-private
     */
    public const IS_PRIVATE = 4;

    /**
     * @since 8.1
     */
    public const IS_READONLY = 5;

    /**
     * Construct a ReflectionProperty object
     *
     * @link https://php.net/manual/en/reflectionproperty.construct.php
     * @param string|object $class The class name, that contains the property.
     * @param string $property The name of the property being reflected.
     * @throws ReflectionException if the class or property does not exist.
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'object|string'], default: '')] $class,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $property
    ) {}

    /**
     * Export
     *
     * @link https://php.net/manual/en/reflectionproperty.export.php
     * @param mixed $class The reflection to export.
     * @param string $name The property name.
     * @param bool $return Setting to {@see true} will return the export, as
     * opposed to emitting it. Setting to {@see false} (the default) will do the
     * opposite.
     * @return string|null
     * @removed 8.0
     */
    #[Deprecated(since: '7.4')]
    public static function export($class, $name, $return = false) {}

    /**
     * To string
     *
     * @link https://php.net/manual/en/reflectionproperty.tostring.php
     * @return string
     */
    #[TentativeType]
    public function __toString(): string {}

    /**
     * Gets property name
     *
     * @link https://php.net/manual/en/reflectionproperty.getname.php
     * @return string The name of the reflected property.
     */
    #[Pure]
    #[TentativeType]
    public function getName(): string {}

    /**
     * Gets value
     *
     * @link https://php.net/manual/en/reflectionproperty.getvalue.php
     * @param object|null $object If the property is non-static an object must be
     * provided to fetch the property from. If you want to fetch the default
     * property without providing an object use {@see ReflectionClass::getDefaultProperties}
     * instead.
     * @return mixed The current value of the property.
     */
    #[Pure]
    #[TentativeType]
    public function getValue(#[LanguageLevelTypeAware(['8.0' => 'object|null'], default: '')] $object = null): mixed {}

    /**
     * Set property value
     *
     * @link https://php.net/manual/en/reflectionproperty.setvalue.php
     * @param mixed $objectOrValue If the property is non-static an object must
     * be provided to change the property on. If the property is static this
     * parameter is left out and only $value needs to be provided.
     * @param mixed $value The new value.
     * @return void No value is returned.
     */
    #[TentativeType]
    public function setValue(
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $objectOrValue,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value = null
    ): void {}

    /**
     * Checks if property is public
     *
     * @link https://php.net/manual/en/reflectionproperty.ispublic.php
     * @return bool Return {@see true} if the property is public, {@see false} otherwise.
     */
    #[Pure]
    #[TentativeType]
    public function isPublic(): bool {}

    /**
     * Checks if property is private
     *
     * @link https://php.net/manual/en/reflectionproperty.isprivate.php
     * @return bool Return {@see true} if the property is private, {@see false} otherwise.
     */
    #[Pure]
    #[TentativeType]
    public function isPrivate(): bool {}

    /**
     * Checks if property is protected
     *
     * @link https://php.net/manual/en/reflectionproperty.isprotected.php
     * @return bool Returns {@see true} if the property is protected, {@see false} otherwise.
     */
    #[Pure]
    #[TentativeType]
    public function isProtected(): bool {}

    /**
     * Checks if property is static
     *
     * @link https://php.net/manual/en/reflectionproperty.isstatic.php
     * @return bool Returns {@see true} if the property is static, {@see false} otherwise.
     */
    #[Pure]
    #[TentativeType]
    public function isStatic(): bool {}

    /**
     * Checks if default value
     *
     * @link https://php.net/manual/en/reflectionproperty.isdefault.php
     * @return bool Returns {@see true} if the property was declared at
     * compile-time, or {@see false} if it was created at run-time.
     */
    #[Pure]
    #[TentativeType]
    public function isDefault(): bool {}

    /**
     * Gets modifiers
     *
     * @link https://php.net/manual/en/reflectionproperty.getmodifiers.php
     * @return int A numeric representation of the modifiers.
     */
    #[Pure]
    #[TentativeType]
    public function getModifiers(): int {}

    /**
     * Gets declaring class
     *
     * @link https://php.net/manual/en/reflectionproperty.getdeclaringclass.php
     * @return ReflectionClass A {@see ReflectionClass} object.
     */
    #[Pure]
    #[TentativeType]
    public function getDeclaringClass(): ReflectionClass {}

    /**
     * Gets doc comment
     *
     * @link https://php.net/manual/en/reflectionproperty.getdoccomment.php
     * @return string|false The doc comment if it exists, otherwise {@see false}
     */
    #[Pure]
    #[TentativeType]
    public function getDocComment(): string|false {}

    /**
     * Set property accessibility
     *
     * @link https://php.net/manual/en/reflectionproperty.setaccessible.php
     * @param bool $accessible A boolean {@see true} to allow accessibility, or {@see false}
     * @return void No value is returned.
     */
    #[PhpStormStubsElementAvailable(to: "8.0")]
    #[TentativeType]
    public function setAccessible(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $accessible): void {}

    /**
     * Set property accessibility
     * This method is no-op starting from PHP 8.1
     *
     * @link https://php.net/manual/en/reflectionproperty.setaccessible.php
     * @param bool $accessible A boolean {@see true} to allow accessibility, or {@see false}
     * @return void No value is returned.
     */
    #[Pure]
    #[PhpStormStubsElementAvailable(from: "8.1")]
    #[TentativeType]
    public function setAccessible(bool $accessible): void {}

    /**
     * Gets property type
     *
     * @link https://php.net/manual/en/reflectionproperty.gettype.php
     * @return ReflectionNamedType|ReflectionUnionType|null Returns a {@see ReflectionType} if the
     * property has a type, and {@see null} otherwise.
     * @since 7.4
     */
    #[Pure]
    #[LanguageLevelTypeAware(
        [
            '8.0' => 'ReflectionNamedType|ReflectionUnionType|null',
            '8.1' => 'ReflectionNamedType|ReflectionUnionType|ReflectionIntersectionType|null'
        ],
        default: 'ReflectionNamedType|null'
    )]
    #[TentativeType]
    public function getType(): ?ReflectionType {}

    /**
     * Checks if property has type
     *
     * @link https://php.net/manual/en/reflectionproperty.hastype.php
     * @return bool Returns {@see true} if a type is specified, {@see false} otherwise.
     * @since 7.4
     */
    #[TentativeType]
    public function hasType(): bool {}

    /**
     * Checks if property is initialized
     *
     * @link https://php.net/manual/en/reflectionproperty.isinitialized.php
     * @param object|null $object If the property is non-static an object must be provided to fetch the property from.
     * @return bool Returns {@see false} for typed properties prior to initialization, and for properties that have
     * been explicitly {@see unset()}. For all other properties {@see true} will be returned.
     * @since 7.4
     */
    #[Pure]
    #[TentativeType]
    public function isInitialized(?object $object = null): bool {}

    /**
     * Returns information about whether the property was promoted.
     *
     * @return bool Returns {@see true} if the property was promoted or {@see false} instead.
     * @since 8.0
     */
    #[Pure]
    public function isPromoted(): bool {}

    /**
     * Clone
     *
     * @link https://php.net/manual/en/reflectionproperty.clone.php
     * @return void
     */
    #[PhpStormStubsElementAvailable(from: "5.4", to: "8.0")]
    final private function __clone(): void {}

    /**
     * Clone
     *
     * @link https://php.net/manual/en/reflectionproperty.clone.php
     * @return void
     */
    #[PhpStormStubsElementAvailable(from: "8.1")]
    private function __clone(): void {}

    /**
     * @return bool
     * @since 8.0
     */
    public function hasDefaultValue(): bool {}

    /**
     * @return mixed
     * @since 8.0
     */
    #[Pure]
    #[TentativeType]
    public function getDefaultValue(): mixed {}

    /**
     * @template T
     *
     * Returns an array of property attributes.
     *
     * @param class-string<T>|null $name Name of an attribute class
     * @param int $flags Сriteria by which the attribute is searched.
     * @return ReflectionAttribute<T>[]
     * @since 8.0
     */
    #[Pure]
    public function getAttributes(?string $name = null, int $flags = 0): array {}

    /**
     * @return bool
     * @since 8.1
     */
    public function isReadOnly(): bool {}
}
<?php

use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Immutable;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;

/**
 * @template T of object
 * The <b>ReflectionClass</b> class reports information about a class.
 *
 * @link https://php.net/manual/en/class.reflectionclass.php
 */
class ReflectionClass implements Reflector
{
    /**
     * @var class-string<T> Name of the class, same as calling the {@see ReflectionClass::getName()} method
     */
    #[Immutable]
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $name;

    /**
     * Indicates class that is abstract because it has some abstract methods.
     *
     * @link https://www.php.net/manual/en/class.reflectionclass.php#reflectionclass.constants.is-implicit-abstract
     */
    public const IS_IMPLICIT_ABSTRACT = 16;

    /**
     * Indicates class that is abstract because of its definition.
     *
     * @link https://www.php.net/manual/en/class.reflectionclass.php#reflectionclass.constants.is-explicit-abstract
     */
    public const IS_EXPLICIT_ABSTRACT = 64;

    /**
     * Indicates final class.
     *
     * @link https://www.php.net/manual/en/class.reflectionclass.php#reflectionclass.constants.is-final
     */
    public const IS_FINAL = 32;

    /**
     * @since 8.2
     */
    public const IS_READONLY = 65536;

    /**
     * Constructs a ReflectionClass
     *
     * @link https://php.net/manual/en/reflectionclass.construct.php
     * @param class-string<T>|T $objectOrClass Either a string containing the name of
     * the class to reflect, or an object.
     * @throws ReflectionException if the class does not exist.
     */
    public function __construct(#[LanguageLevelTypeAware(['8.0' => 'object|string'], default: '')] $objectOrClass) {}

    /**
     * Exports a reflected class
     *
     * @link https://php.net/manual/en/reflectionclass.export.php
     * @param mixed $argument The reflection to export.
     * @param bool $return Setting to {@see true} will return the export, as
     * opposed to emitting it. Setting to {@see false} (the default) will do the opposite.
     * @return string|null If the $return parameter is set to {@see true}, then the
     * export is returned as a string, otherwise {@see null} is returned.
     * @removed 8.0
     */
    #[Deprecated(since: '7.4')]
    public static function export($argument, $return = false) {}

    /**
     * Returns the string representation of the ReflectionClass object.
     *
     * @link https://php.net/manual/en/reflectionclass.tostring.php
     * @return string A string representation of this {@see ReflectionClass} instance.
     */
    #[TentativeType]
    public function __toString(): string {}

    /**
     * Gets class name
     *
     * @link https://php.net/manual/en/reflectionclass.getname.php
     * @return string The class name.
     */
    #[Pure]
    #[TentativeType]
    public function getName(): string {}

    /**
     * Checks if class is defined internally by an extension, or the core
     *
     * @link https://php.net/manual/en/reflectionclass.isinternal.php
     * @return bool Returns {@see true} on success or {@see false} on failure.
     */
    #[Pure]
    #[TentativeType]
    public function isInternal(): bool {}

    /**
     * Checks if user defined
     *
     * @link https://php.net/manual/en/reflectionclass.isuserdefined.php
     * @return bool Returns {@see true} on success or {@see false} on failure.
     */
    #[Pure]
    #[TentativeType]
    public function isUserDefined(): bool {}

    /**
     * Checks if the class is instantiable
     *
     * @link https://php.net/manual/en/reflectionclass.isinstantiable.php
     * @return bool Returns {@see true} on success or {@see false} on failure.
     */
    #[Pure]
    #[TentativeType]
    public function isInstantiable(): bool {}

    /**
     * Returns whether this class is cloneable
     *
     * @link https://php.net/manual/en/reflectionclass.iscloneable.php
     * @return bool Returns {@see true} if the class is cloneable, {@see false} otherwise.
     * @since 5.4
     */
    #[Pure]
    #[TentativeType]
    public function isCloneable(): bool {}

    /**
     * Gets the filename of the file in which the class has been defined
     *
     * @link https://php.net/manual/en/reflectionclass.getfilename.php
     * @return string|false the filename of the file in which the class has been defined.
     * If the class is defined in the PHP core or in a PHP extension, {@see false}
     * is returned.
     */
    #[Pure]
    #[TentativeType]
    public function getFileName(): string|false {}

    /**
     * Gets starting line number
     *
     * @link https://php.net/manual/en/reflectionclass.getstartline.php
     * @return int The starting line number, as an integer.
     */
    #[Pure]
    #[TentativeType]
    public function getStartLine(): int|false {}

    /**
     * Gets end line
     *
     * @link https://php.net/manual/en/reflectionclass.getendline.php
     * @return int|false The ending line number of the user defined class, or
     * {@see false} if unknown.
     */
    #[Pure]
    #[TentativeType]
    public function getEndLine(): int|false {}

    /**
     * Gets doc comments
     *
     * @link https://php.net/manual/en/reflectionclass.getdoccomment.php
     * @return string|false The doc comment if it exists, otherwise {@see false}
     */
    #[Pure]
    #[TentativeType]
    public function getDocComment(): string|false {}

    /**
     * Gets the constructor of the class
     *
     * @link https://php.net/manual/en/reflectionclass.getconstructor.php
     * @return ReflectionMethod|null A {@see ReflectionMethod} object reflecting
     * the class' constructor, or {@see null} if the class has no constructor.
     */
    #[Pure]
    #[TentativeType]
    public function getConstructor(): ?ReflectionMethod {}

    /**
     * Checks if method is defined
     *
     * @link https://php.net/manual/en/reflectionclass.hasmethod.php
     * @param string $name Name of the method being checked for.
     * @return bool Returns {@see true} if it has the method, otherwise {@see false}
     */
    #[TentativeType]
    public function hasMethod(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {}

    /**
     * Gets a <b>ReflectionMethod</b> for a class method.
     *
     * @link https://php.net/manual/en/reflectionclass.getmethod.php
     * @param string $name The method name to reflect.
     * @return ReflectionMethod A {@see ReflectionMethod}
     * @throws ReflectionException if the method does not exist.
     */
    #[Pure]
    #[TentativeType]
    public function getMethod(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): ReflectionMethod {}

    /**
     * Gets an array of methods for the class.
     *
     * @link https://php.net/manual/en/reflectionclass.getmethods.php
     * @param int|null $filter Filter the results to include only methods
     * with certain attributes. Defaults to no filtering.
     * @return ReflectionMethod[] An array of {@see ReflectionMethod} objects
     * reflecting each method.
     */
    #[Pure]
    #[TentativeType]
    public function getMethods(#[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $filter = null): array {}

    /**
     * Checks if property is defined
     *
     * @link https://php.net/manual/en/reflectionclass.hasproperty.php
     * @param string $name Name of the property being checked for.
     * @return bool Returns {@see true} if it has the property, otherwise {@see false}
     */
    #[TentativeType]
    public function hasProperty(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {}

    /**
     * Gets a <b>ReflectionProperty</b> for a class's property
     *
     * @link https://php.net/manual/en/reflectionclass.getproperty.php
     * @param string $name The property name.
     * @return ReflectionProperty A {@see ReflectionProperty}
     * @throws ReflectionException If no property exists by that name.
     */
    #[Pure]
    #[TentativeType]
    public function getProperty(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): ReflectionProperty {}

    /**
     * Gets properties
     *
     * @link https://php.net/manual/en/reflectionclass.getproperties.php
     * @param int|null $filter The optional filter, for filtering desired
     * property types. It's configured using the {@see ReflectionProperty} constants,
     * and defaults to all property types.
     * @return ReflectionProperty[]
     */
    #[Pure]
    #[TentativeType]
    public function getProperties(#[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $filter = null): array {}

    /**
     * Gets a ReflectionClassConstant for a class's property
     *
     * @link https://php.net/manual/en/reflectionclass.getreflectionconstant.php
     * @param string $name The class constant name.
     * @return ReflectionClassConstant|false A {@see ReflectionClassConstant}.
     * @since 7.1
     */
    #[Pure]
    #[TentativeType]
    public function getReflectionConstant(string $name): ReflectionClassConstant|false {}

    /**
     * Gets class constants
     *
     * @link https://php.net/manual/en/reflectionclass.getreflectionconstants.php
     * @param int|null $filter [optional] allows the filtering of constants defined in a class by their visibility. Since 8.0.
     * @return ReflectionClassConstant[] An array of ReflectionClassConstant objects.
     * @since 7.1
     */
    #[Pure]
    #[TentativeType]
    public function getReflectionConstants(#[PhpStormStubsElementAvailable(from: '8.0')] ?int $filter = ReflectionClassConstant::IS_PUBLIC|ReflectionClassConstant::IS_PROTECTED|ReflectionClassConstant::IS_PRIVATE): array {}

    /**
     * Checks if constant is defined
     *
     * @link https://php.net/manual/en/reflectionclass.hasconstant.php
     * @param string $name The name of the constant being checked for.
     * @return bool Returns {@see true} if the constant is defined, otherwise {@see false}
     */
    #[TentativeType]
    public function hasConstant(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {}

    /**
     * Gets constants
     *
     * @link https://php.net/manual/en/reflectionclass.getconstants.php
     * @param int|null $filter [optional] allows the filtering of constants defined in a class by their visibility. Since 8.0.
     * @return array An array of constants, where the keys hold the name and
     * the values the value of the constants.
     */
    #[Pure]
    #[TentativeType]
    public function getConstants(#[PhpStormStubsElementAvailable(from: '8.0')] ?int $filter = ReflectionClassConstant::IS_PUBLIC|ReflectionClassConstant::IS_PROTECTED|ReflectionClassConstant::IS_PRIVATE): array {}

    /**
     * Gets defined constant
     *
     * @link https://php.net/manual/en/reflectionclass.getconstant.php
     * @param string $name Name of the constant.
     * @return mixed|false Value of the constant with the name name.
     * Returns {@see false} if the constant was not found in the class.
     */
    #[Pure]
    #[TentativeType]
    public function getConstant(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): mixed {}

    /**
     * Gets the interfaces
     *
     * @link https://php.net/manual/en/reflectionclass.getinterfaces.php
     * @return ReflectionClass[] An associative array of interfaces, with keys as interface
     * names and the array values as {@see ReflectionClass} objects.
     */
    #[Pure]
    #[TentativeType]
    public function getInterfaces(): array {}

    /**
     * Gets the interface names
     *
     * @link https://php.net/manual/en/reflectionclass.getinterfacenames.php
     * @return string[] A numerical array with interface names as the values.
     */
    #[Pure]
    #[TentativeType]
    public function getInterfaceNames(): array {}

    /**
     * Checks if the class is anonymous
     *
     * @link https://php.net/manual/en/reflectionclass.isanonymous.php
     * @return bool Returns {@see true} on success or {@see false} on failure.
     * @since 7.0
     */
    #[Pure]
    #[TentativeType]
    public function isAnonymous(): bool {}

    /**
     * Checks if the class is an interface
     *
     * @link https://php.net/manual/en/reflectionclass.isinterface.php
     * @return bool Returns {@see true} on success or {@see false} on failure.
     */
    #[Pure]
    #[TentativeType]
    public function isInterface(): bool {}

    /**
     * Returns an array of traits used by this class
     *
     * @link https://php.net/manual/en/reflectionclass.gettraits.php
     * @return ReflectionClass[] an array with trait names in keys and
     * instances of trait's {@see ReflectionClass} in values.
     * @since 5.4
     */
    #[Pure]
    #[TentativeType]
    public function getTraits(): array {}

    /**
     * Returns an array of names of traits used by this class
     *
     * @link https://php.net/manual/en/reflectionclass.gettraitnames.php
     * @return string[] An array with trait names in values.
     * Returns {@see null} in case of an error.
     * @since 5.4
     */
    #[Pure]
    #[TentativeType]
    public function getTraitNames(): array {}

    /**
     * Returns an array of trait aliases
     *
     * @link https://php.net/manual/en/reflectionclass.gettraitaliases.php
     * @return string[] an array with new method names in keys and original
     * names (in the format "TraitName::original") in values.
     * Returns {@see null} in case of an error.
     * @since 5.4
     */
    #[Pure]
    #[TentativeType]
    public function getTraitAliases(): array {}

    /**
     * Returns whether this is a trait
     *
     * @link https://php.net/manual/en/reflectionclass.istrait.php
     * @return bool Returns {@see true} if this is a trait, {@see false} otherwise.
     * Returns {@see null} in case of an error.
     * @since 5.4
     */
    #[Pure]
    #[TentativeType]
    public function isTrait(): bool {}

    /**
     * Checks if class is abstract
     *
     * @link https://php.net/manual/en/reflectionclass.isabstract.php
     * @return bool Returns {@see true} on success or {@see false} on failure.
     */
    #[Pure]
    #[TentativeType]
    public function isAbstract(): bool {}

    /**
     * Checks if class is final
     *
     * @link https://php.net/manual/en/reflectionclass.isfinal.php
     * @return bool Returns {@see true} on success or {@see false} on failure.
     */
    #[Pure]
    #[TentativeType]
    public function isFinal(): bool {}

    /**
     * @return bool
     */
    #[Pure]
    #[PhpStormStubsElementAvailable(from: '8.2')]
    public function isReadOnly(): bool {}

    /**
     * Gets modifiers
     *
     * @link https://php.net/manual/en/reflectionclass.getmodifiers.php
     * @return int bitmask of modifier constants.
     */
    #[Pure]
    #[TentativeType]
    public function getModifiers(): int {}

    /**
     * Checks class for instance
     *
     * @link https://php.net/manual/en/reflectionclass.isinstance.php
     * @param object $object The object being compared to.
     * @return bool Returns {@see true} on success or {@see false} on failure.
     */
    #[Pure]
    #[TentativeType]
    public function isInstance(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object): bool {}

    /**
     * Creates a new class instance from given arguments.
     *
     * @link https://php.net/manual/en/reflectionclass.newinstance.php
     * @param mixed ...$args Accepts a variable number of arguments which are
     * passed to the class constructor, much like {@see call_user_func}
     * @return T a new instance of the class.
     * @throws ReflectionException if the class constructor is not public or if
     * the class does not have a constructor and the $args parameter contains
     * one or more parameters.
     */
    public function newInstance(...$args) {}

    /**
     * Creates a new class instance without invoking the constructor.
     *
     * @link https://php.net/manual/en/reflectionclass.newinstancewithoutconstructor.php
     * @return T a new instance of the class.
     * @throws ReflectionException if the class is an internal class that
     * cannot be instantiated without invoking the constructor. In PHP 5.6.0
     * onwards, this exception is limited only to internal classes that are final.
     * @since 5.4
     */
    #[TentativeType]
    public function newInstanceWithoutConstructor(): object {}

    /**
     * Creates a new class instance from given arguments.
     *
     * @link https://php.net/manual/en/reflectionclass.newinstanceargs.php
     * @param array $args The parameters to be passed to the class constructor as an array.
     * @return T|null a new instance of the class.
     * @throws ReflectionException if the class constructor is not public or if
     * the class does not have a constructor and the $args parameter contains
     * one or more parameters.
     * @since 5.1.3
     */
    #[TentativeType]
    public function newInstanceArgs(array $args = []): ?object {}

    /**
     * Gets parent class
     *
     * @link https://php.net/manual/en/reflectionclass.getparentclass.php
     * @return ReflectionClass|false A {@see ReflectionClass} or {@see false}
     * if there's no parent.
     */
    #[Pure]
    #[TentativeType]
    public function getParentClass(): ReflectionClass|false {}

    /**
     * Checks if a subclass
     *
     * @link https://php.net/manual/en/reflectionclass.issubclassof.php
     * @param string|ReflectionClass $class Either the name of the class as
     * string or a {@see ReflectionClass} object of the class to check against.
     * @return bool {@see true} on success or {@see false} on failure.
     */
    #[Pure]
    #[TentativeType]
    public function isSubclassOf(#[LanguageLevelTypeAware(['8.0' => 'ReflectionClass|string'], default: '')] $class): bool {}

    /**
     * Gets static properties
     *
     * @link https://php.net/manual/en/reflectionclass.getstaticproperties.php
     * @return array|null The static properties, as an array where the keys hold
     * the name and the values the value of the properties.
     */
    #[Pure]
    #[TentativeType]
    public function getStaticProperties(): ?array {}

    /**
     * Gets static property value
     *
     * @link https://php.net/manual/en/reflectionclass.getstaticpropertyvalue.php
     * @param string $name The name of the static property for which to return a value.
     * @param mixed $default A default value to return in case the class does
     * not declare a static property with the given name. If the property does
     * not exist and this argument is omitted, a {@see ReflectionException} is thrown.
     * @return mixed The value of the static property.
     */
    #[Pure]
    #[TentativeType]
    public function getStaticPropertyValue(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $default = null
    ): mixed {}

    /**
     * Sets static property value
     *
     * @link https://php.net/manual/en/reflectionclass.setstaticpropertyvalue.php
     * @param string $name Property name.
     * @param mixed $value New property value.
     * @return void No value is returned.
     */
    #[TentativeType]
    public function setStaticPropertyValue(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value
    ): void {}

    /**
     * Gets default properties
     *
     * @link https://php.net/manual/en/reflectionclass.getdefaultproperties.php
     * @return mixed[] An array of default properties, with the key being the name
     * of the property and the value being the default value of the property
     * or {@see null} if the property doesn't have a default value. The function
     * does not distinguish between static and non static properties and does
     * not take visibility modifiers into account.
     */
    #[Pure]
    #[TentativeType]
    public function getDefaultProperties(): array {}

    /**
     * An alias of {@see ReflectionClass::isIterable} method.
     *
     * @link https://php.net/manual/en/reflectionclass.isiterateable.php
     * @return bool Returns {@see true} on success or {@see false} on failure.
     */
    #[Pure]
    #[TentativeType]
    public function isIterateable(): bool {}

    /**
     * Check whether this class is iterable
     *
     * @link https://php.net/manual/en/reflectionclass.isiterable.php
     * @return bool Returns {@see true} on success or {@see false} on failure.
     * @since 7.2
     */
    #[Pure]
    #[TentativeType]
    public function isIterable(): bool {}

    /**
     * Checks whether it implements an interface.
     *
     * @link https://php.net/manual/en/reflectionclass.implementsinterface.php
     * @param string $interface The interface name.
     * @return bool Returns {@see true} on success or {@see false} on failure.
     */
    #[TentativeType]
    public function implementsInterface(#[LanguageLevelTypeAware(['8.0' => 'ReflectionClass|string'], default: '')] $interface): bool {}

    /**
     * Gets a <b>ReflectionExtension</b> object for the extension which defined the class
     *
     * @link https://php.net/manual/en/reflectionclass.getextension.php
     * @return ReflectionExtension|null A {@see ReflectionExtension} object representing
     * the extension which defined the class, or {@see null} for user-defined classes.
     */
    #[Pure]
    #[TentativeType]
    public function getExtension(): ?ReflectionExtension {}

    /**
     * Gets the name of the extension which defined the class
     *
     * @link https://php.net/manual/en/reflectionclass.getextensionname.php
     * @return string|false The name of the extension which defined the class,
     * or {@see false} for user-defined classes.
     */
    #[Pure]
    #[TentativeType]
    public function getExtensionName(): string|false {}

    /**
     * Checks if in namespace
     *
     * @link https://php.net/manual/en/reflectionclass.innamespace.php
     * @return bool {@see true} on success or {@see false} on failure.
     */
    #[TentativeType]
    public function inNamespace(): bool {}

    /**
     * Gets namespace name
     *
     * @link https://php.net/manual/en/reflectionclass.getnamespacename.php
     * @return string The namespace name.
     */
    #[Pure]
    #[TentativeType]
    public function getNamespaceName(): string {}

    /**
     * Gets short name
     *
     * @link https://php.net/manual/en/reflectionclass.getshortname.php
     * @return string The class short name.
     */
    #[Pure]
    #[TentativeType]
    public function getShortName(): string {}

    /**
     * @template T
     *
     * Returns an array of class attributes.
     *
     * @param class-string<T>|null $name Name of an attribute class
     * @param int $flags Сriteria by which the attribute is searched.
     * @return ReflectionAttribute<T>[]
     * @since 8.0
     */
    #[Pure]
    public function getAttributes(?string $name = null, int $flags = 0): array {}

    /**
     * Clones object
     *
     * @link https://php.net/manual/en/reflectionclass.clone.php
     * @return void
     */
    #[PhpStormStubsElementAvailable(from: "5.4", to: "8.0")]
    final private function __clone(): void {}

    /**
     * Clones object
     *
     * @link https://php.net/manual/en/reflectionclass.clone.php
     * @return void
     */
    #[PhpStormStubsElementAvailable(from: "8.1")]
    private function __clone(): void {}

    #[PhpStormStubsElementAvailable('8.1')]
    public function isEnum(): bool {}
}
<?php

use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Immutable;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;

/**
 * The ReflectionClassConstant class reports information about a class constant.
 *
 * @link https://www.php.net/manual/en/class.reflectionclassconstant.php
 * @since 7.1
 */
class ReflectionClassConstant implements Reflector
{
    /**
     * @var string Constant name, same as calling the {@see ReflectionClassConstant::getName()} method
     */
    #[Immutable]
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $name;

    /**
     * @var string Fully qualified class name where this constant was defined
     */
    #[Immutable]
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $class;

    /**
     * @var bool
     * @since 8.1
     */
    #[Immutable]
    public bool $isFinal;

    /**
     * Indicates that the constant is public.
     *
     * @since 8.0
     */
    public const IS_PUBLIC = 1;

    /**
     * Indicates that the constant is protected.
     *
     * @since 8.0
     */
    public const IS_PROTECTED = 2;

    /**
     * Indicates that the constant is private.
     *
     * @since 8.0
     */
    public const IS_PRIVATE = 4;

    /**
     * @since 8.1
     */
    public const IS_FINAL = 5;

    /**
     * ReflectionClassConstant constructor.
     *
     * @param string|object $class Either a string containing the name of the class to reflect, or an object.
     * @param string $constant The name of the class constant.
     * @since 7.1
     * @link https://php.net/manual/en/reflectionclassconstant.construct.php
     */
    public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string|object'], default: '')] $class, string $constant) {}

    /**
     * @link https://php.net/manual/en/reflectionclassconstant.export.php
     * @param string|object $class The reflection to export.
     * @param string $name The class constant name.
     * @param bool $return Setting to {@see true} will return the export, as opposed to emitting it. Setting
     * to {@see false} (the default) will do the opposite.
     * @return string|null
     * @since 7.1
     * @removed 8.0
     */
    #[Deprecated(since: '7.4')]
    public static function export($class, $name, $return = false) {}

    /**
     * Gets declaring class
     *
     * @return ReflectionClass
     * @link https://php.net/manual/en/reflectionclassconstant.getdeclaringclass.php
     * @since 7.1
     */
    #[Pure]
    #[TentativeType]
    public function getDeclaringClass(): ReflectionClass {}

    /**
     * Gets doc comments
     *
     * @return string|false The doc comment if it exists, otherwise {@see false}
     * @link https://php.net/manual/en/reflectionclassconstant.getdoccomment.php
     * @since 7.1
     */
    #[Pure]
    #[TentativeType]
    public function getDocComment(): string|false {}

    /**
     * Gets the class constant modifiers
     *
     * @return int A numeric representation of the modifiers. The actual meanings of these modifiers are described in
     * the predefined constants.
     * @link https://php.net/manual/en/reflectionclassconstant.getmodifiers.php
     * @since 7.1
     */
    #[Pure]
    #[TentativeType]
    public function getModifiers(): int {}

    /**
     * Get name of the constant
     *
     * @link https://php.net/manual/en/reflectionclassconstant.getname.php
     * @return string Returns the constant's name.
     * @since 7.1
     */
    #[Pure]
    #[TentativeType]
    public function getName(): string {}

    /**
     * Gets value
     *
     * @link https://php.net/manual/en/reflectionclassconstant.getvalue.php
     * @return mixed The value of the class constant.
     * @since 7.1
     */
    #[Pure]
    #[TentativeType]
    public function getValue(): mixed {}

    /**
     * Checks if class constant is private
     *
     * @link https://php.net/manual/en/reflectionclassconstant.isprivate.php
     * @return bool
     * @since 7.1
     */
    #[Pure]
    #[TentativeType]
    public function isPrivate(): bool {}

    /**
     * Checks if class constant is protected
     *
     * @link https://php.net/manual/en/reflectionclassconstant.isprotected.php
     * @return bool
     * @since 7.1
     */
    #[Pure]
    #[TentativeType]
    public function isProtected(): bool {}

    /**
     * Checks if class constant is public
     *
     * @link https://php.net/manual/en/reflectionclassconstant.ispublic.php
     * @return bool
     * @since 7.1
     */
    #[Pure]
    #[TentativeType]
    public function isPublic(): bool {}

    /**
     * Returns the string representation of the ReflectionClassConstant object.
     *
     * @link https://php.net/manual/en/reflectionclassconstant.tostring.php
     * @return string
     * @since 7.1
     */
    public function __toString(): string {}

    /**
     * @template T
     *
     * Returns an array of constant attributes.
     *
     * @param class-string<T>|null $name Name of an attribute class
     * @param int $flags Сriteria by which the attribute is searched.
     * @return ReflectionAttribute<T>[]
     * @since 8.0
     */
    #[Pure]
    public function getAttributes(?string $name = null, int $flags = 0): array {}

    /**
     * ReflectionClassConstant cannot be cloned
     *
     * @return void
     */
    #[PhpStormStubsElementAvailable(from: "5.4", to: "8.0")]
    final private function __clone(): void {}

    /**
     * ReflectionClassConstant cannot be cloned
     *
     * @return void
     */
    #[PhpStormStubsElementAvailable(from: "8.1")]
    private function __clone(): void {}

    #[PhpStormStubsElementAvailable('8.1')]
    public function isEnumCase(): bool {}

    /**
     * @return bool
     * @since 8.1
     */
    public function isFinal(): bool {}
}
<?php

use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Pure;

/**
 * The ReflectionReference class provides information about a reference.
 *
 * Note: Unlike the description in the documentation, the class itself is not final.
 *
 * @link https://www.php.net/manual/en/class.reflectionreference.php
 * @since 7.4
 */
class ReflectionReference
{
    /**
     * ReflectionReference cannot be created explicitly.
     */
    private function __construct() {}

    /**
     * Returns ReflectionReference if array element is a reference, {@see null} otherwise
     *
     * @link https://php.net/manual/en/reflectionreference.fromarrayelement.php
     * @param array $array The array which contains the potential reference.
     * @param int|string $key The key; either an integer or a string.
     * @return self|null
     */
    public static function fromArrayElement(
        array $array,
        #[LanguageLevelTypeAware(['8.0' => 'string|int'], default: '')] $key
    ): ?ReflectionReference {}

    /**
     * Returns unique identifier for the reference. The return value format is unspecified
     *
     * @link https://php.net/manual/en/reflectionreference.getid.php
     * @return int|string Returns an integer or string of unspecified format.
     */
    #[Pure]
    public function getId(): string {}

    /**
     * ReflectionReference cannot be cloned
     *
     * @return void
     */
    private function __clone(): void {}
}
<?php

use JetBrains\PhpStorm\Pure;

/**
 * @since 8.0
 *
 * @template T of object
 */
class ReflectionAttribute implements Reflector
{
    /**
     * Indicates that the search for a suitable attribute should not be by
     * strict comparison, but by the inheritance chain.
     *
     * Used for the argument of flags of the "getAttribute" method.
     *
     * @since 8.0
     */
    public const IS_INSTANCEOF = 2;

    /**
     * ReflectionAttribute cannot be created explicitly.
     * @since 8.0
     */
    private function __construct() {}

    /**
     * Gets attribute name
     *
     * @return string The name of the attribute parameter.
     * @since 8.0
     */
    #[Pure]
    public function getName(): string {}

    /**
     * Returns the target of the attribute as a bit mask format.
     *
     * @return int
     * @since 8.0
     */
    #[Pure]
    public function getTarget(): int {}

    /**
     * Returns {@see true} if the attribute is repeated.
     *
     * @return bool
     * @since 8.0
     */
    #[Pure]
    public function isRepeated(): bool {}

    /**
     * Gets list of passed attribute's arguments.
     *
     * @return array
     * @since 8.0
     */
    #[Pure]
    public function getArguments(): array {}

    /**
     * Creates a new instance of the attribute with passed arguments
     *
     * @return T
     * @since 8.0
     */
    public function newInstance(): object {}

    /**
     * ReflectionAttribute cannot be cloned
     *
     * @return void
     * @since 8.0
     */
    private function __clone(): void {}

    public function __toString(): string {}

    public static function export() {}
}
<?php

use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Immutable;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;

/**
 * The <b>ReflectionParameter</b> class retrieves
 * information about function's or method's parameters.
 *
 * @link https://php.net/manual/en/class.reflectionparameter.php
 */
class ReflectionParameter implements Reflector
{
    /**
     * @var string Name of the parameter, same as calling the {@see ReflectionParameter::getName()} method
     */
    #[Immutable]
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $name;

    /**
     * Construct
     *
     * @link https://php.net/manual/en/reflectionparameter.construct.php
     * @param callable $function The function to reflect parameters from.
     * @param string|int $param Either an integer specifying the position
     * of the parameter (starting with zero), or a the parameter name as string.
     * @throws ReflectionException if the function or parameter does not exist.
     */
    public function __construct($function, #[LanguageLevelTypeAware(['8.0' => 'string|int'], default: '')] $param) {}

    /**
     * Exports
     *
     * @link https://php.net/manual/en/reflectionparameter.export.php
     * @param string $function The function name.
     * @param string $parameter The parameter name.
     * @param bool $return Setting to {@see true} will return the export,
     * as opposed to emitting it. Setting to {@see false} (the default) will do the
     * opposite.
     * @return string|null The exported reflection.
     * @removed 8.0
     */
    #[Deprecated(since: '7.4')]
    public static function export($function, $parameter, $return = false) {}

    /**
     * Returns the string representation of the ReflectionParameter object.
     *
     * @link https://php.net/manual/en/reflectionparameter.tostring.php
     * @return string
     */
    #[TentativeType]
    public function __toString(): string {}

    /**
     * Gets parameter name
     *
     * @link https://php.net/manual/en/reflectionparameter.getname.php
     * @return string The name of the reflected parameter.
     */
    #[Pure]
    #[TentativeType]
    public function getName(): string {}

    /**
     * Checks if passed by reference
     *
     * @link https://php.net/manual/en/reflectionparameter.ispassedbyreference.php
     * @return bool {@see true} if the parameter is passed in by reference, otherwise {@see false}
     */
    #[Pure]
    #[TentativeType]
    public function isPassedByReference(): bool {}

    /**
     * Returns whether this parameter can be passed by value
     *
     * @link https://php.net/manual/en/reflectionparameter.canbepassedbyvalue.php
     * @return bool|null {@see true} if the parameter can be passed by value, {@see false} otherwise.
     * Returns {@see null} in case of an error.
     * @since 5.4
     */
    #[TentativeType]
    public function canBePassedByValue(): bool {}

    /**
     * Gets declaring function
     *
     * @link https://php.net/manual/en/reflectionparameter.getdeclaringfunction.php
     * @return ReflectionFunctionAbstract A {@see ReflectionFunctionAbstract} object.
     * @since 5.2.3
     */
    #[Pure]
    #[TentativeType]
    public function getDeclaringFunction(): ReflectionFunctionAbstract {}

    /**
     * Gets declaring class
     *
     * @link https://php.net/manual/en/reflectionparameter.getdeclaringclass.php
     * @return ReflectionClass|null A {@see ReflectionClass} object or {@see null} if
     * called on function.
     */
    #[Pure]
    #[TentativeType]
    public function getDeclaringClass(): ?ReflectionClass {}

    /**
     * Gets the class type hinted for the parameter as a ReflectionClass object.
     *
     * @link https://php.net/manual/en/reflectionparameter.getclass.php
     * @return ReflectionClass|null A {@see ReflectionClass} object.
     * @see ReflectionParameter::getType()
     */
    #[Deprecated(reason: "Use ReflectionParameter::getType() and the ReflectionType APIs should be used instead.", since: "8.0")]
    #[Pure]
    #[TentativeType]
    public function getClass(): ?ReflectionClass {}

    /**
     * Checks if the parameter has a type associated with it.
     *
     * @link https://php.net/manual/en/reflectionparameter.hastype.php
     * @return bool {@see true} if a type is specified, {@see false} otherwise.
     * @since 7.0
     */
    #[TentativeType]
    public function hasType(): bool {}

    /**
     * Gets a parameter's type
     *
     * @link https://php.net/manual/en/reflectionparameter.gettype.php
     * @return ReflectionType|null Returns a {@see ReflectionType} object if a
     * parameter type is specified, {@see null} otherwise.
     * @since 7.0
     */
    #[Pure]
    #[LanguageLevelTypeAware(
        [
            '7.1' => 'ReflectionNamedType|null',
            '8.0' => 'ReflectionNamedType|ReflectionUnionType|null',
            '8.1' => 'ReflectionNamedType|ReflectionUnionType|ReflectionIntersectionType|null'
        ],
        default: 'ReflectionType|null'
    )]
    #[TentativeType]
    public function getType(): ?ReflectionType {}

    /**
     * Checks if parameter expects an array
     *
     * @link https://php.net/manual/en/reflectionparameter.isarray.php
     * @return bool {@see true} if an array is expected, {@see false} otherwise.
     * @see ReflectionParameter::getType()
     */
    #[Deprecated(reason: "Use ReflectionParameter::getType() and the ReflectionType APIs should be used instead.", since: "8.0")]
    #[Pure]
    #[TentativeType]
    public function isArray(): bool {}

    /**
     * Returns whether parameter MUST be callable
     *
     * @link https://php.net/manual/en/reflectionparameter.iscallable.php
     * @return bool|null Returns {@see true} if the parameter is callable, {@see false}
     * if it is not or {@see null} on failure.
     * @since 5.4
     * @see ReflectionParameter::getType()
     */
    #[Deprecated(reason: "Use ReflectionParameter::getType() and the ReflectionType APIs should be used instead.", since: "8.0")]
    #[Pure]
    #[TentativeType]
    public function isCallable(): bool {}

    /**
     * Checks if null is allowed
     *
     * @link https://php.net/manual/en/reflectionparameter.allowsnull.php
     * @return bool Returns {@see true} if {@see null} is allowed,
     * otherwise {@see false}
     */
    #[TentativeType]
    public function allowsNull(): bool {}

    /**
     * Gets parameter position
     *
     * @link https://php.net/manual/en/reflectionparameter.getposition.php
     * @return int The position of the parameter, left to right, starting at position #0.
     * @since 5.2.3
     */
    #[Pure]
    #[TentativeType]
    public function getPosition(): int {}

    /**
     * Checks if optional
     *
     * @link https://php.net/manual/en/reflectionparameter.isoptional.php
     * @return bool Returns {@see true} if the parameter is optional, otherwise {@see false}
     * @since 5.0.3
     */
    #[Pure]
    #[TentativeType]
    public function isOptional(): bool {}

    /**
     * Checks if a default value is available
     *
     * @link https://php.net/manual/en/reflectionparameter.isdefaultvalueavailable.php
     * @return bool Returns {@see true} if a default value is available, otherwise {@see false}
     * @since 5.0.3
     */
    #[Pure]
    #[TentativeType]
    public function isDefaultValueAvailable(): bool {}

    /**
     * Gets default parameter value
     *
     * @link https://php.net/manual/en/reflectionparameter.getdefaultvalue.php
     * @return mixed The parameters default value.
     * @throws ReflectionException if the parameter is not optional
     * @since 5.0.3
     */
    #[Pure]
    #[TentativeType]
    public function getDefaultValue(): mixed {}

    /**
     * Returns whether the default value of this parameter is constant
     *
     * @link https://php.net/manual/en/reflectionparameter.isdefaultvalueconstant.php
     * @return bool Returns {@see true} if the default value is constant, and {@see false} otherwise.
     * @since 5.4.6
     */
    #[Pure]
    #[TentativeType]
    public function isDefaultValueConstant(): bool {}

    /**
     * Returns the default value's constant name if default value is constant or null
     *
     * @link https://php.net/manual/en/reflectionparameter.getdefaultvalueconstantname.php
     * @return string|null Returns string on success or {@see null} on failure.
     * @throws ReflectionException if the parameter is not optional
     * @since 5.4.6
     */
    #[Pure]
    #[TentativeType]
    public function getDefaultValueConstantName(): ?string {}

    /**
     * Returns whether this function is variadic
     *
     * @link https://php.net/manual/en/reflectionparameter.isvariadic.php
     * @return bool Returns {@see true} if the function is variadic, otherwise {@see false}
     * @since 5.6
     */
    #[Pure]
    #[TentativeType]
    public function isVariadic(): bool {}

    /**
     * Returns information about whether the parameter is a promoted.
     *
     * @return bool Returns {@see true} if the parameter promoted or {@see false} instead
     * @since 8.0
     */
    #[Pure]
    public function isPromoted(): bool {}

    /**
     * @template T
     *
     * Returns an array of parameter attributes.
     *
     * @param class-string<T>|null $name Name of an attribute class
     * @param int $flags Сriteria by which the attribute is searched.
     * @return ReflectionAttribute<T>[]
     * @since 8.0
     */
    #[Pure]
    public function getAttributes(?string $name = null, int $flags = 0): array {}

    /**
     * Clone
     *
     * @link https://php.net/manual/en/reflectionparameter.clone.php
     * @return void
     */
    #[PhpStormStubsElementAvailable(from: "5.4", to: "8.0")]
    final private function __clone(): void {}

    /**
     * Clone
     *
     * @link https://php.net/manual/en/reflectionparameter.clone.php
     * @return void
     */
    #[PhpStormStubsElementAvailable(from: "8.1")]
    private function __clone(): void {}
}
<?php

/**
 * @link https://php.net/manual/en/class.reflectionenumunitcase.php
 * @since 8.1
 */
class ReflectionEnumUnitCase extends ReflectionClassConstant
{
    public function __construct(object|string $class, string $constant) {}

    #[Pure]
    public function getValue(): UnitEnum {}

    /**
     * @return ReflectionEnum
     */
    #[Pure]
    public function getEnum(): ReflectionEnum {}
}
<?php

use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;

/**
 * @link https://php.net/manual/en/class.reflectionenum.php
 * @since 8.1
 */
class ReflectionEnum extends ReflectionClass
{
    public function __construct(object|string $objectOrClass) {}

    /**
     * @param string $name
     * @return bool
     */
    public function hasCase(string $name): bool {}

    /**
     * @return ReflectionEnumPureCase[]|ReflectionEnumBackedCase[]
     */
    public function getCases(): array {}

    /**
     * @return ReflectionEnumPureCase|ReflectionEnumBackedCase
     * @throws ReflectionException If no found single reflection object for the corresponding case
     */
    public function getCase(string $name): ReflectionEnumUnitCase {}

    /**
     * @return bool
     */
    public function isBacked(): bool {}

    /**
     * @return ReflectionType|null
     */
    #[LanguageLevelTypeAware(['8.2' => 'null|ReflectionNamedType'], default: 'null|ReflectionType')]
    public function getBackingType() {}
}
<?php

use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;

/**
 * The ReflectionType class reports information about a function's parameters.
 *
 * @link https://www.php.net/manual/en/class.reflectiontype.php
 * @since 7.0
 */
abstract class ReflectionType implements Stringable
{
    /**
     * Checks if null is allowed
     *
     * @link https://php.net/manual/en/reflectiontype.allowsnull.php
     * @return bool Returns {@see true} if {@see null} is allowed, otherwise {@see false}
     * @since 7.0
     */
    #[TentativeType]
    public function allowsNull(): bool {}

    /**
     * Checks if it is a built-in type
     *
     * @link https://php.net/manual/en/reflectionnamedtype.isbuiltin.php
     * @return bool Returns {@see true} if it's a built-in type, otherwise {@see false}
     * @since 7.0
     * @removed 8.0 this method has been removed from the {@see ReflectionType}
     * class and moved to the {@see ReflectionNamedType} child.
     */
    #[Pure]
    public function isBuiltin() {}

    /**
     * To string
     *
     * @link https://php.net/manual/en/reflectiontype.tostring.php
     * @return string Returns the type of the parameter.
     * @since 7.0
     * @see ReflectionNamedType::getName()
     */
    #[Deprecated(since: "7.1")]
    public function __toString(): string {}

    /**
     * Cloning of this class is prohibited
     *
     * @return void
     */
    #[PhpStormStubsElementAvailable(from: "5.4", to: "8.0")]
    final private function __clone(): void {}

    /**
     * Cloning of this class is prohibited
     *
     * @return void
     */
    #[PhpStormStubsElementAvailable(from: "8.1")]
    private function __clone(): void {}
}
<?php

use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Pure;

/**
 * @since 8.0
 */
class ReflectionUnionType extends ReflectionType
{
    /**
     * Get list of types of union type
     *
     * @return ReflectionNamedType[]|ReflectionIntersectionType[]
     */
    #[Pure]
    #[LanguageLevelTypeAware(
        [
            '8.2' => 'ReflectionNamedType[]|ReflectionIntersectionType[]'
        ],
        default: 'ReflectionNamedType[]'
    )]
    public function getTypes(): array {}
}
<?php

use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Immutable;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;

/**
 * The <b>ReflectionExtension</b> class reports information about an extension.
 *
 * @link https://php.net/manual/en/class.reflectionextension.php
 */
class ReflectionExtension implements Reflector
{
    /**
     * @var string Name of the extension, same as calling the {@see ReflectionExtension::getName()} method
     */
    #[Immutable]
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $name;

    /**
     * Constructs a ReflectionExtension
     *
     * @link https://php.net/manual/en/reflectionextension.construct.php
     * @param string $name Name of the extension.
     * @throws ReflectionException if the extension does not exist.
     */
    public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name) {}

    /**
     * Exports a reflected extension.
     * The output format of this function is the same as the CLI argument --re [extension].
     *
     * @link https://php.net/manual/en/reflectionextension.export.php
     * @param string $name The reflection to export.
     * @param bool $return Setting to {@see true} will return the
     * export, as opposed to emitting it. Setting to {@see false} (the default)
     * will do the opposite.
     * @return string|null If the $return parameter is set to {@see true}, then
     * the export is returned as a string, otherwise {@see null} is returned.
     * @removed 8.0
     */
    #[Deprecated(since: '7.4')]
    public static function export($name, $return = false) {}

    /**
     * To string
     *
     * @link https://php.net/manual/en/reflectionextension.tostring.php
     * @return string the exported extension as a string, in the same way as
     * the {@see ReflectionExtension::export()}.
     */
    #[TentativeType]
    public function __toString(): string {}

    /**
     * Gets extension name
     *
     * @link https://php.net/manual/en/reflectionextension.getname.php
     * @return string The extensions name.
     */
    #[Pure]
    #[TentativeType]
    public function getName(): string {}

    /**
     * Gets extension version
     *
     * @link https://php.net/manual/en/reflectionextension.getversion.php
     * @return string|null The version of the extension.
     */
    #[Pure]
    #[TentativeType]
    public function getVersion(): ?string {}

    /**
     * Gets extension functions
     *
     * @link https://php.net/manual/en/reflectionextension.getfunctions.php
     * @return ReflectionFunction[] An associative array of {@see ReflectionFunction} objects,
     * for each function defined in the extension with the keys being the function
     * names. If no function are defined, an empty array is returned.
     */
    #[Pure]
    #[TentativeType]
    public function getFunctions(): array {}

    /**
     * Gets constants
     *
     * @link https://php.net/manual/en/reflectionextension.getconstants.php
     * @return array An associative array with constant names as keys.
     */
    #[Pure]
    #[TentativeType]
    public function getConstants(): array {}

    /**
     * Gets extension ini entries
     *
     * @link https://php.net/manual/en/reflectionextension.getinientries.php
     * @return array An associative array with the ini entries as keys,
     * with their defined values as values.
     */
    #[Pure]
    #[TentativeType]
    public function getINIEntries(): array {}

    /**
     * Gets classes
     *
     * @link https://php.net/manual/en/reflectionextension.getclasses.php
     * @return ReflectionClass[] An array of {@see ReflectionClass} objects, one
     * for each class within the extension. If no classes are defined,
     * an empty array is returned.
     */
    #[Pure]
    #[TentativeType]
    public function getClasses(): array {}

    /**
     * Gets class names
     *
     * @link https://php.net/manual/en/reflectionextension.getclassnames.php
     * @return string[] An array of class names, as defined in the extension.
     * If no classes are defined, an empty array is returned.
     */
    #[Pure]
    #[TentativeType]
    public function getClassNames(): array {}

    /**
     * Gets dependencies
     *
     * @link https://php.net/manual/en/reflectionextension.getdependencies.php
     * @return string[] An associative array with dependencies as keys and
     * either Required, Optional or Conflicts as the values.
     */
    #[Pure]
    #[TentativeType]
    public function getDependencies(): array {}

    /**
     * Print extension info
     *
     * @link https://php.net/manual/en/reflectionextension.info.php
     * @return void Print extension info
     */
    #[TentativeType]
    public function info(): void {}

    /**
     * Returns whether this extension is persistent
     *
     * @link https://php.net/manual/en/reflectionextension.ispersistent.php
     * @return bool Returns {@see true} for extensions loaded by extension, {@see false} otherwise.
     * @since 5.4
     */
    #[Pure]
    #[TentativeType]
    public function isPersistent(): bool {}

    /**
     * Returns whether this extension is temporary
     *
     * @link https://php.net/manual/en/reflectionextension.istemporary.php
     * @return bool Returns {@see true} for extensions loaded by {@see dl()}, {@see false} otherwise.
     * @since 5.4
     */
    #[Pure]
    #[TentativeType]
    public function isTemporary(): bool {}

    /**
     * Clones
     *
     * @link https://php.net/manual/en/reflectionextension.clone.php
     * @return void No value is returned, if called a fatal error will occur.
     */
    #[PhpStormStubsElementAvailable(from: "5.4", to: "8.0")]
    final private function __clone(): void {}

    /**
     * Clones
     *
     * @link https://php.net/manual/en/reflectionextension.clone.php
     * @return void No value is returned, if called a fatal error will occur.
     */
    #[PhpStormStubsElementAvailable(from: "8.1")]
    private function __clone(): void {}
}
<?php

use JetBrains\PhpStorm\Pure;

/**
 * @since 8.1
 */
class ReflectionIntersectionType extends ReflectionType
{
    /** @return ReflectionType[] */
    #[Pure]
    public function getTypes(): array {}
}
<?php

use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;

/**
 * @since 7.1
 */
class ReflectionNamedType extends ReflectionType
{
    /**
     * Get the text of the type hint.
     *
     * @link https://php.net/manual/en/reflectionnamedtype.getname.php
     * @return string Returns the text of the type hint.
     * @since 7.1
     */
    #[Pure]
    public function getName() {}

    /**
     * Checks if it is a built-in type
     *
     * @link https://php.net/manual/en/reflectionnamedtype.isbuiltin.php
     * @return bool Returns {@see true} if it's a built-in type, otherwise {@see false}
     *
     * @since 7.1 overrides the parent {@see ReflectionType::isBuiltin()} method.
     * @since 8.0 method was removed from the parent {@see ReflectionType} class.
     */
    #[Pure]
    #[TentativeType]
    public function isBuiltin(): bool {}
}
<?php

use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;

/**
 * The <b>ReflectionObject</b> class reports
 * information about an object.
 *
 * @link https://php.net/manual/en/class.reflectionobject.php
 */
class ReflectionObject extends ReflectionClass
{
    /**
     * Constructs a ReflectionObject
     *
     * @link https://php.net/manual/en/reflectionobject.construct.php
     * @param object $object An object instance.
     */
    public function __construct(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object) {}

    /**
     * Export
     *
     * @link https://php.net/manual/en/reflectionobject.export.php
     * @param string $argument The reflection to export.
     * @param bool $return Setting to {@see true} will return the export,
     * as opposed to emitting it. Setting to {@see false} (the default) will do
     * the opposite.
     * @return string|null If the $return parameter is set to {@see true}, then
     * the export is returned as a string, otherwise {@see null} is returned.
     * @removed 8.0
     */
    #[Deprecated(since: '7.4')]
    public static function export($argument, $return = false) {}
}
<?php

/**
 * @since 8.1
 */
final class ReflectionFiber
{
    public function __construct(Fiber $fiber) {}

    public function getFiber(): Fiber {}

    public function getExecutingFile(): ?string {}

    public function getExecutingLine(): ?int {}

    public function getCallable(): callable {}

    public function getTrace(int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT): array {}
}
<?php

/**
 * <b>Reflector</b> is an interface implemented by all
 * exportable Reflection classes.
 *
 * @link https://php.net/manual/en/class.reflector.php
 */
interface Reflector extends Stringable
{
    /**
     * Exports a class.
     *
     * @link https://php.net/manual/en/reflector.export.php
     * @return string|null
     * @removed 7.4
     */
    public static function export();

    /**
     * Returns the string representation of any Reflection object.
     *
     * Please note that since PHP 8.0 this method is absent in this interface
     * and inherits from the {@see Stringable} parent.
     *
     * @return string
     */
    public function __toString();
}
<?php

use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;

/**
 * The ReflectionGenerator class reports information about a generator.
 *
 * @since 7.0
 */
class ReflectionGenerator
{
    /**
     * Constructs a ReflectionGenerator object
     *
     * @link https://php.net/manual/en/reflectiongenerator.construct.php
     * @param Generator $generator A generator object.
     * @since 7.0
     */
    public function __construct(Generator $generator) {}

    /**
     * Gets the currently executing line of the generator
     *
     * @link https://php.net/manual/en/reflectiongenerator.getexecutingline.php
     * @return int Returns the line number of the currently executing statement
     * in the generator.
     * @since 7.0
     */
    #[Pure]
    #[TentativeType]
    public function getExecutingLine(): int {}

    /**
     * Gets the file name of the currently executing generator
     *
     * @link https://php.net/manual/en/reflectiongenerator.getexecutingfile.php
     * @return string Returns the full path and file name of the currently
     * executing generator.
     * @since 7.0
     */
    #[Pure]
    #[TentativeType]
    public function getExecutingFile(): string {}

    /**
     * Gets the trace of the executing generator
     *
     * @link https://php.net/manual/en/reflectiongenerator.gettrace.php
     * @param int $options The value of <em>options</em> can be any of the following the following flags.
     *
     * Available options:
     *
     * {@see DEBUG_BACKTRACE_PROVIDE_OBJECT} - Default
     *
     * {@see DEBUG_BACKTRACE_IGNORE_ARGS} - Don't include the argument
     * information for functions in the stack trace.
     *
     * @return array Returns the trace of the currently executing generator.
     * @since 7.0
     */
    #[Pure]
    #[TentativeType]
    public function getTrace(int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT): array {}

    /**
     * Gets the function name of the generator
     *
     * @link https://php.net/manual/en/reflectiongenerator.getfunction.php
     * @return ReflectionFunctionAbstract Returns a {@see ReflectionFunctionAbstract}
     * class. This will be {@see ReflectionFunction} for functions,
     * or {@see ReflectionMethod} for methods.
     * @since 7.0
     */
    #[Pure]
    #[TentativeType]
    public function getFunction(): ReflectionFunctionAbstract {}

    /**
     * Gets the function name of the generator
     *
     * @link https://php.net/manual/en/reflectiongenerator.getthis.php
     * @return object|null Returns the $this value, or {@see null} if the
     * generator was not created in a class context.
     * @since 7.0
     */
    #[Pure]
    #[TentativeType]
    public function getThis(): ?object {}

    /**
     * Gets the executing Generator object
     *
     * @link https://php.net/manual/en/reflectiongenerator.construct.php
     * @return Generator Returns the currently executing Generator object.
     * @since 7.0
     */
    #[Pure]
    #[TentativeType]
    public function getExecutingGenerator(): Generator {}
}
<?php

// Start of Fann v.1

/**
 * Class FANNConnection
 */
class FANNConnection
{
    /**
     * @var float
     */
    public $weight;

    /**
     * @var int
     */
    public $to_neuron;

    /**
     * @var int
     */
    public $from_neuron;

    /**
     * The connection constructor
     *
     * @param int $from_neuron
     * @param int $to_neuron
     * @param float $weight
     */
    public function __construct($from_neuron, $to_neuron, $weight) {}

    /**
     * Returns the postions of starting neuron.
     *
     * @return int The postions of starting neuron.
     */
    public function getFromNeuron() {}

    /**
     * Returns the postions of terminating neuron
     *
     * @return int The postions of terminating neuron.
     */
    public function getToNeuron() {}

    /**
     * Returns the connection weight
     *
     * @return void The connection weight.
     */
    public function getWeight() {}

    /**
     * Sets the connections weight
     *
     * @param float $weight
     *
     * @return bool
     */
    public function setWeight($weight) {}
}

/**
 * Trains on an entire dataset, for a period of time using the Cascade2 training algorithm
 *
 *
 * @param resource $ann
 * @param resource $data
 * @param int $max_neurons
 * @param int $neurons_between_reports
 * @param float $desired_error
 *
 * @return bool
 */
function fann_cascadetrain_on_data($ann, $data, $max_neurons, $neurons_between_reports, $desired_error) {}

/**
 * Trains on an entire dataset read from file, for a period of time using the Cascade2 training algorithm.
 *
 *
 * @param resource $ann
 * @param string $filename
 * @param int $max_neurons
 * @param int $neurons_between_reports
 * @param float $desired_error
 *
 * @return bool
 */
function fann_cascadetrain_on_file($ann, $filename, $max_neurons, $neurons_between_reports, $desired_error) {}

/**
 * Clears scaling parameters
 *
 *
 * @param resource $ann
 *
 * @return bool
 */
function fann_clear_scaling_params($ann) {}

/**
 * Creates a copy of a fann structure
 *
 *
 * @param resource $ann
 *
 * @return resource|false Returns a copy of neural network resource on success, or false on error
 */
function fann_copy($ann) {}

/**
 * Constructs a backpropagation neural network from a configuration file
 *
 *
 * @param string $configuration_file
 *
 * @return resource|false
 */
function fann_create_from_file($configuration_file) {}

/**
 * Creates a standard backpropagation neural network which is not fully connectected and has shortcut connections
 *
 *
 * @param int $num_layers
 * @param array $layers
 *
 * @return resource|false Returns a neural network resource on success, or false on error.
 */
function fann_create_shortcut_array($num_layers, $layers) {}

/**
 * Creates a standard backpropagation neural network which is not fully connectected and has shortcut connections
 *
 * @param int $num_layers
 * @param int $num_neurons1
 * @param int $num_neurons2
 * @param int ...$_
 *
 * @return resource|false Returns a neural network resource on success, or false on error.
 */
function fann_create_shortcut($num_layers, $num_neurons1, $num_neurons2, ...$_) {}

/**
 * Creates a standard backpropagation neural network, which is not fully connected using an array of layer sizes
 *
 *
 * @param float $connection_rate
 * @param int $num_layers
 * @param array $layers
 *
 * @return resource|false Returns a neural network resource on success, or false on error.
 */
function fann_create_sparse_array($connection_rate, $num_layers, $layers) {}

/**
 * Creates a standard backpropagation neural network, which is not fully connected
 *
 *
 * @param float $connection_rate
 * @param int $num_layers
 * @param int $num_neurons1
 * @param int $num_neurons2
 * @param int ...$_
 *
 * @return resource|false Returns a neural network resource on success, or false on error.
 */
function fann_create_sparse($connection_rate, $num_layers, $num_neurons1, $num_neurons2, ...$_) {}

/**
 * Creates a standard fully connected backpropagation neural network using an array of layer sizes
 *
 *
 * @param int $num_layers
 * @param array $layers
 *
 * @return resource|false Returns a neural network resource on success, or false on error.
 */
function fann_create_standard_array($num_layers, $layers) {}

/**
 * Creates a standard fully connected backpropagation neural network
 *
 *
 * @param int $num_layers
 * @param int $num_neurons1
 * @param int $num_neurons2
 * @param int ...$_
 *
 * @return resource|false Returns a neural network resource on success, or false on error.
 */
function fann_create_standard($num_layers, $num_neurons1, $num_neurons2, ...$_) {}

/**
 * Creates the training data struct from a user supplied function
 *
 *
 * @param int $num_data
 * @param int $num_input
 * @param int $num_output
 * @param callable $user_function
 *
 * @return resource|false
 */
function fann_create_train_from_callback($num_data, $num_input, $num_output, $user_function) {}

/**
 * Creates an empty training data struct
 *
 *
 * @param int $num_data
 * @param int $num_input
 * @param int $num_output
 *
 * @return resource|false
 */
function fann_create_train($num_data, $num_input, $num_output) {}

/**
 * Scale data in input vector after get it from ann based on previously calculated parameters
 *
 *
 * @param resource $ann
 * @param array $input_vector
 *
 * @return bool
 */
function fann_descale_input($ann, $input_vector) {}

/**
 * Scale data in output vector after get it from ann based on previously calculated parameters
 *
 *
 * @param resource $ann
 * @param array $output_vector
 *
 * @return bool
 */
function fann_descale_output($ann, $output_vector) {}

/**
 * Descale input and output data based on previously calculated parameters
 *
 *
 * @param resource $ann
 * @param resource $train_data
 *
 * @return bool
 */
function fann_descale_train($ann, $train_data) {}

/**
 * Destroys the entire network and properly freeing all the associated memory
 *
 *
 * @param resource $ann
 *
 * @return bool
 */
function fann_destroy($ann) {}

/**
 * Destructs the training data
 *
 *
 * @param resource $train_data
 *
 * @return bool
 */
function fann_destroy_train($train_data) {}

/**
 * Returns an exact copy of a fann train data
 *
 *
 * @param resource $data
 *
 * @return resource|false
 */
function fann_duplicate_train_data($data) {}

/**
 * Returns the activation function
 *
 *
 * @param resource $ann
 * @param int $layer
 * @param int $neuron
 *
 * @return int|false constant or -1 if the neuron is not defined in the neural network, or false on error.
 */
function fann_get_activation_function($ann, $layer, $neuron) {}

/**
 * Returns the activation steepness for supplied neuron and layer number
 *
 *
 * @param resource $ann
 * @param int $layer
 * @param int $neuron
 *
 * @return float|false The activation steepness for the neuron or -1 if the neuron is not defined in the neural network, or false on error.
 */
function fann_get_activation_steepness($ann, $layer, $neuron) {}

/**
 * Get the number of bias in each layer in the network
 *
 *
 * @param resource $ann
 *
 * @return array An array of numbers of bias in each layer
 */
function fann_get_bias_array($ann) {}

/**
 * Returns the bit fail limit used during training
 *
 *
 * @param resource $ann
 *
 * @return float|false The bit fail limit, or false on error.
 */
function fann_get_bit_fail_limit($ann) {}

/**
 * The number of fail bits
 *
 *
 * @param resource $ann
 *
 * @return int|false The number of bits fail, or false on error.
 */
function fann_get_bit_fail($ann) {}

/**
 * Returns the number of cascade activation functions
 *
 *
 * @param resource $ann
 *
 * @return int|false The number of cascade activation functions, or false on error.
 */
function fann_get_cascade_activation_functions_count($ann) {}

/**
 * Returns the cascade activation functions
 *
 *
 * @param resource $ann
 *
 * @return array|false The cascade activation functions, or false on error.
 */
function fann_get_cascade_activation_functions($ann) {}

/**
 * The number of activation steepnesses
 *
 *
 * @param resource $ann
 *
 * @return int|false The number of activation steepnesses, or false on error.
 */
function fann_get_cascade_activation_steepnesses_count($ann) {}

/**
 * Returns the cascade activation steepnesses
 *
 *
 * @param resource $ann
 *
 * @return array|false The cascade activation steepnesses, or false on error.
 */
function fann_get_cascade_activation_steepnesses($ann) {}

/**
 * Returns the cascade candidate change fraction
 *
 *
 * @param resource $ann
 *
 * @return float|false The cascade candidate change fraction, or false on error.
 */
function fann_get_cascade_candidate_change_fraction($ann) {}

/**
 * Return the candidate limit
 *
 *
 * @param resource $ann
 *
 * @return float|false The candidate limit, or false on error.
 */
function fann_get_cascade_candidate_limit($ann) {}

/**
 * Returns the number of cascade candidate stagnation epochs
 *
 *
 * @param resource $ann
 *
 * @return float|false The number of cascade candidate stagnation epochs, or false on error.
 */
function fann_get_cascade_candidate_stagnation_epochs($ann) {}

/**
 * Returns the maximum candidate epochs
 *
 *
 * @param resource $ann
 *
 * @return int|false The maximum candidate epochs, or false on error.
 */
function fann_get_cascade_max_cand_epochs($ann) {}

/**
 * Returns the maximum out epochs
 *
 *
 * @param resource $ann
 *
 * @return int|false The maximum out epochs, or false on error.
 */
function fann_get_cascade_max_out_epochs($ann) {}

/**
 * Returns the minimum candidate epochs
 *
 *
 * @param resource $ann
 *
 * @return int|false The minimum candidate epochs, or false on error.
 */
function fann_get_cascade_min_cand_epochs($ann) {}

/**
 * Returns the minimum out epochs
 *
 *
 * @param resource $ann
 *
 * @return int|false The minimum out epochs, or false on error.
 */
function fann_get_cascade_min_out_epochs($ann) {}

/**
 * Returns the number of candidate groups
 *
 *
 * @param resource $ann
 *
 * @return int|false The number of candidate groups, or false on error.
 */
function fann_get_cascade_num_candidate_groups($ann) {}

/**
 * Returns the number of candidates used during training
 *
 *
 * @param resource $ann
 *
 * @return int|false The number of candidates used during training, or false on error.
 */
function fann_get_cascade_num_candidates($ann) {}

/**
 * Returns the cascade output change fraction
 *
 *
 * @param resource $ann
 *
 * @return float|false The cascade output change fraction, or false on error.
 */
function fann_get_cascade_output_change_fraction($ann) {}

/**
 * Returns the number of cascade output stagnation epochs
 *
 *
 * @param resource $ann
 *
 * @return int|false The number of cascade output stagnation epochs, or false on error.
 */
function fann_get_cascade_output_stagnation_epochs($ann) {}

/**
 * Returns the weight multiplier
 *
 *
 * @param resource $ann
 *
 * @return float|false The weight multiplier, or false on error.
 */
function fann_get_cascade_weight_multiplier($ann) {}

/**
 * Get connections in the network
 *
 *
 * @param resource $ann
 *
 * @return array An array of connections in the network
 */
function fann_get_connection_array($ann) {}

/**
 * Get the connection rate used when the network was created
 *
 *
 * @param resource $ann
 *
 * @return float|false The connection rate used when the network was created, or false on error.
 */
function fann_get_connection_rate($ann) {}

/**
 * Returns the last error number
 *
 *
 * @param resource $errdat
 *
 * @return int|false The error number, or false on error.
 */
function fann_get_errno($errdat) {}

/**
 * Returns the last errstr
 *
 *
 * @param resource $errdat
 *
 * @return string|false The last error string, or false on error.
 */
function fann_get_errstr($errdat) {}

/**
 * Get the number of neurons in each layer in the network
 *
 *
 * @param resource $ann
 *
 * @return array An array of numbers of neurons in each leayer
 */
function fann_get_layer_array($ann) {}

/**
 * Returns the learning momentum
 *
 *
 * @param resource $ann
 *
 * @return float|false The learning momentum, or false on error.
 */
function fann_get_learning_momentum($ann) {}

/**
 * Returns the learning rate
 *
 *
 * @param resource $ann
 *
 * @return float|false The learning rate, or false on error.
 */
function fann_get_learning_rate($ann) {}

/**
 * Reads the mean square error from the network
 *
 *
 * @param resource $ann
 *
 * @return float|false The mean square error, or false on error.
 */
function fann_get_MSE($ann) {}

/**
 * Get the type of neural network it was created as
 *
 *
 * @param resource $ann
 *
 * @return int|false constant, or false on error.
 */
function fann_get_network_type($ann) {}

/**
 * Get the number of input neurons
 *
 *
 * @param resource $ann
 *
 * @return int|false Number of input neurons, or false on error
 */
function fann_get_num_input($ann) {}

/**
 * Get the number of layers in the neural network
 *
 *
 * @param resource $ann
 *
 * @return int|false The number of leayers in the neural network, or false on error.
 */
function fann_get_num_layers($ann) {}

/**
 * Get the number of output neurons
 *
 *
 * @param resource $ann
 *
 * @return int|false Number of output neurons, or false on error
 */
function fann_get_num_output($ann) {}

/**
 * Returns the decay which is a factor that weights should decrease in each iteration during quickprop training
 *
 *
 * @param resource $ann
 *
 * @return float|false The decay, or false on error.
 */
function fann_get_quickprop_decay($ann) {}

/**
 * Returns the mu factor
 *
 *
 * @param resource $ann
 *
 * @return float|false The mu factor, or false on error.
 */
function fann_get_quickprop_mu($ann) {}

/**
 * Returns the increase factor used during RPROP training
 *
 *
 * @param resource $ann
 *
 * @return float|false The decrease factor, or false on error.
 */
function fann_get_rprop_decrease_factor($ann) {}

/**
 * Returns the maximum step-size
 *
 *
 * @param resource $ann
 *
 * @return float|false The maximum step-size, or false on error.
 */
function fann_get_rprop_delta_max($ann) {}

/**
 * Returns the minimum step-size
 *
 *
 * @param resource $ann
 *
 * @return float|false The minimum step-size, or false on error.
 */
function fann_get_rprop_delta_min($ann) {}

/**
 * Returns the initial step-size
 *
 *
 * @param resource $ann
 *
 * @return int|false The initial step-size, or false on error.
 */
function fann_get_rprop_delta_zero($ann) {}

/**
 * Returns the increase factor used during RPROP training
 *
 *
 * @param resource $ann
 *
 * @return float|false The increase factor, or false on error.
 */
function fann_get_rprop_increase_factor($ann) {}

/**
 * Returns the sarprop step error shift
 *
 *
 * @param resource $ann
 *
 * @return float|false The sarprop step error shift , or false on error.
 */
function fann_get_sarprop_step_error_shift($ann) {}

/**
 * Returns the sarprop step error threshold factor
 *
 *
 * @param resource $ann
 *
 * @return float|false The sarprop step error threshold factor, or false on error.
 */
function fann_get_sarprop_step_error_threshold_factor($ann) {}

/**
 * Returns the sarprop temperature
 *
 *
 * @param resource $ann
 *
 * @return float|false The sarprop temperature, or false on error.
 */
function fann_get_sarprop_temperature($ann) {}

/**
 * Returns the sarprop weight decay shift
 *
 *
 * @param resource $ann
 *
 * @return float|false The sarprop weight decay shift, or false on error.
 */
function fann_get_sarprop_weight_decay_shift($ann) {}

/**
 * Get the total number of connections in the entire network
 *
 *
 * @param resource $ann
 *
 * @return int|false Total number of connections in the entire network, or false on error
 */
function fann_get_total_connections($ann) {}

/**
 * Get the total number of neurons in the entire network
 *
 *
 * @param resource $ann
 *
 * @return int|false Total number of neurons in the entire network, or false on error.
 */
function fann_get_total_neurons($ann) {}

/**
 * Returns the error function used during training
 *
 *
 * @param resource $ann
 *
 * @return int|false The constant, or false on error.
 */
function fann_get_train_error_function($ann) {}

/**
 * Returns the training algorithm
 *
 *
 * @param resource $ann
 *
 * @return int|false constant, or false on error.
 */
function fann_get_training_algorithm($ann) {}

/**
 * Returns the stop function used during training
 *
 *
 * @param resource $ann
 *
 * @return int|false The constant, or false on error.
 */
function fann_get_train_stop_function($ann) {}

/**
 * Initialize the weights using Widrow + Nguyen’s algorithm
 *
 *
 * @param resource $ann
 * @param resource $train_data
 *
 * @return bool
 */
function fann_init_weights($ann, $train_data) {}

/**
 * Returns the number of training patterns in the train data
 *
 *
 * @param resource $data
 *
 * @return int|false Number of elements in the train data ``resource``, or false on error.
 */
function fann_length_train_data($data) {}

/**
 * Merges the train data
 *
 *
 * @param resource $data1
 * @param resource $data2
 *
 * @return resource|false New merged train data ``resource``, or false on error.
 */
function fann_merge_train_data($data1, $data2) {}

/**
 * Returns the number of inputs in each of the training patterns in the train data
 *
 *
 * @param resource $data
 *
 * @return int|false The number of inputs, or false on error.
 */
function fann_num_input_train_data($data) {}

/**
 * Returns the number of outputs in each of the training patterns in the train data
 *
 *
 * @param resource $data
 *
 * @return int|false The number of outputs, or false on error.
 */
function fann_num_output_train_data($data) {}

/**
 * Prints the error string
 * @link https://www.php.net/manual/en/function.fann-print-error.php
 *
 * @param resource $errdat
 *
 * @return void
 */
function fann_print_error($errdat) {}

/**
 * Give each connection a random weight between min_weight and max_weight
 *
 *
 * @param resource $ann
 * @param float $min_weight
 * @param float $max_weight
 *
 * @return bool
 */
function fann_randomize_weights($ann, $min_weight, $max_weight) {}

/**
 * Reads a file that stores training data
 *
 *
 * @param string $filename
 *
 * @return resource|false
 */
function fann_read_train_from_file($filename) {}

/**
 * Resets the last error number
 *
 *
 * @param resource $errdat
 *
 * @return void
 */
function fann_reset_errno($errdat) {}

/**
 * Resets the last error string
 *
 *
 * @param resource $errdat
 *
 * @return void
 */
function fann_reset_errstr($errdat) {}

/**
 * Resets the mean square error from the network
 *
 *
 * @param string $ann
 *
 * @return bool
 */
function fann_reset_MSE($ann) {}

/**
 * Will run input through the neural network
 *
 *
 * @param resource $ann
 * @param array $input
 *
 * @return array|false Array of output values, or false on error
 */
function fann_run($ann, $input) {}

/**
 * Saves the entire network to a configuration file
 *
 *
 * @param resource $ann
 * @param string $configuration_file
 *
 * @return bool
 */
function fann_save($ann, $configuration_file) {}

/**
 * Save the training structure to a file
 *
 *
 * @param resource $data
 * @param string $file_name
 *
 * @return bool
 */
function fann_save_train($data, $file_name) {}

/**
 * Scale data in input vector before feed it to ann based on previously calculated parameters
 *
 *
 * @param resource $ann
 * @param array $input_vector
 *
 * @return bool
 */
function fann_scale_input($ann, $input_vector) {}

/**
 * Scales the inputs in the training data to the specified range
 *
 *
 * @param resource $train_data
 * @param float $new_min
 * @param float $new_max
 *
 * @return bool
 */
function fann_scale_input_train_data($train_data, $new_min, $new_max) {}

/**
 * Scale data in output vector before feed it to ann based on previously calculated parameters
 *
 *
 * @param resource $ann
 * @param array $output_vector
 *
 * @return bool
 */
function fann_scale_output($ann, $output_vector) {}

/**
 * Scales the outputs in the training data to the specified range
 *
 *
 * @param resource $train_data
 * @param float $new_min
 * @param float $new_max
 *
 * @return bool
 */
function fann_scale_output_train_data($train_data, $new_min, $new_max) {}

/**
 * Scales the inputs and outputs in the training data to the specified range
 *
 *
 * @param resource $train_data
 * @param float $new_min
 * @param float $new_max
 *
 * @return bool
 */
function fann_scale_train_data($train_data, $new_min, $new_max) {}

/**
 * Scale input and output data based on previously calculated parameters
 *
 *
 * @param resource $ann
 * @param resource $train_data
 *
 * @return bool
 */
function fann_scale_train($ann, $train_data) {}

/**
 * Sets the activation function for all of the hidden layers
 *
 *
 * @param resource $ann
 * @param int $activation_function
 *
 * @return bool
 */
function fann_set_activation_function_hidden($ann, $activation_function) {}

/**
 * Sets the activation function for all the neurons in the supplied layer.
 *
 *
 * @param resource $ann
 * @param int $activation_function
 * @param int $layer
 *
 * @return bool
 */
function fann_set_activation_function_layer($ann, $activation_function, $layer) {}

/**
 * Sets the activation function for the output layer
 *
 *
 * @param resource $ann
 * @param int $activation_function
 *
 * @return bool
 */
function fann_set_activation_function_output($ann, $activation_function) {}

/**
 * Sets the activation function for supplied neuron and layer
 *
 *
 * @param resource $ann
 * @param int $activation_function
 * @param int $layer
 * @param int $neuron
 *
 * @return bool
 */
function fann_set_activation_function($ann, $activation_function, $layer, $neuron) {}

/**
 * Sets the steepness of the activation steepness for all neurons in the all hidden layers
 *
 *
 * @param resource $ann
 * @param float $activation_steepness
 *
 * @return bool
 */
function fann_set_activation_steepness_hidden($ann, $activation_steepness) {}

/**
 * Sets the activation steepness for all of the neurons in the supplied layer number
 *
 *
 * @param resource $ann
 * @param float $activation_steepness
 * @param int $layer
 *
 * @return bool
 */
function fann_set_activation_steepness_layer($ann, $activation_steepness, $layer) {}

/**
 * Sets the steepness of the activation steepness in the output layer
 *
 *
 * @param resource $ann
 * @param float $activation_steepness
 *
 * @return bool
 */
function fann_set_activation_steepness_output($ann, $activation_steepness) {}

/**
 * Sets the activation steepness for supplied neuron and layer number
 *
 *
 * @param resource $ann
 * @param float $activation_steepness
 * @param int $layer
 * @param int $neuron
 *
 * @return bool
 */
function fann_set_activation_steepness($ann, $activation_steepness, $layer, $neuron) {}

/**
 * Set the bit fail limit used during training
 *
 *
 * @param resource $ann
 * @param float $bit_fail_limit
 *
 * @return bool
 */
function fann_set_bit_fail_limit($ann, $bit_fail_limit) {}

/**
 * Sets the callback function for use during training
 *
 *
 * @param resource $ann
 * @param callable $callback
 *
 * @return bool
 */
function fann_set_callback($ann, $callback) {}

/**
 * Sets the array of cascade candidate activation functions
 *
 *
 * @param resource $ann
 * @param array $cascade_activation_functions
 *
 * @return bool
 */
function fann_set_cascade_activation_functions($ann, $cascade_activation_functions) {}

/**
 * Sets the array of cascade candidate activation steepnesses
 *
 *
 * @param resource $ann
 * @param array $cascade_activation_steepnesses_count
 *
 * @return bool
 */
function fann_set_cascade_activation_steepnesses($ann, $cascade_activation_steepnesses_count) {}

/**
 * Sets the cascade candidate change fraction
 *
 *
 * @param resource $ann
 * @param float $cascade_candidate_change_fraction
 *
 * @return bool
 */
function fann_set_cascade_candidate_change_fraction($ann, $cascade_candidate_change_fraction) {}

/**
 * Sets the candidate limit
 *
 *
 * @param resource $ann
 * @param float $cascade_candidate_limit
 *
 * @return bool
 */
function fann_set_cascade_candidate_limit($ann, $cascade_candidate_limit) {}

/**
 * Sets the number of cascade candidate stagnation epochs
 *
 *
 * @param resource $ann
 * @param int $cascade_candidate_stagnation_epochs
 *
 * @return bool
 */
function fann_set_cascade_candidate_stagnation_epochs($ann, $cascade_candidate_stagnation_epochs) {}

/**
 * Sets the max candidate epochs
 *
 *
 * @param resource $ann
 * @param int $cascade_max_cand_epochs
 *
 * @return bool
 */
function fann_set_cascade_max_cand_epochs($ann, $cascade_max_cand_epochs) {}

/**
 * Sets the maximum out epochs
 *
 *
 * @param resource $ann
 * @param int $cascade_max_out_epochs
 *
 * @return bool
 */
function fann_set_cascade_max_out_epochs($ann, $cascade_max_out_epochs) {}

/**
 * Sets the min candidate epochs
 *
 *
 * @param resource $ann
 * @param int $cascade_min_cand_epochs
 *
 * @return bool
 */
function fann_set_cascade_min_cand_epochs($ann, $cascade_min_cand_epochs) {}

/**
 * Sets the minimum out epochs
 *
 *
 * @param resource $ann
 * @param int $cascade_min_out_epochs
 *
 * @return bool
 */
function fann_set_cascade_min_out_epochs($ann, $cascade_min_out_epochs) {}

/**
 * Sets the number of candidate groups
 *
 *
 * @param resource $ann
 * @param int $cascade_num_candidate_groups
 *
 * @return bool
 */
function fann_set_cascade_num_candidate_groups($ann, $cascade_num_candidate_groups) {}

/**
 * Sets the cascade output change fraction
 *
 *
 * @param resource $ann
 * @param float $cascade_output_change_fraction
 *
 * @return bool
 */
function fann_set_cascade_output_change_fraction($ann, $cascade_output_change_fraction) {}

/**
 * Sets the number of cascade output stagnation epochs
 *
 *
 * @param resource $ann
 * @param int $cascade_output_stagnation_epochs
 *
 * @return bool
 */
function fann_set_cascade_output_stagnation_epochs($ann, $cascade_output_stagnation_epochs) {}

/**
 * Sets the weight multiplier
 *
 *
 * @param resource $ann
 * @param float $cascade_weight_multiplier
 *
 * @return bool
 */
function fann_set_cascade_weight_multiplier($ann, $cascade_weight_multiplier) {}

/**
 * Sets where the errors are logged to
 *
 *
 * @param resource $errdat
 * @param string $log_file
 *
 * @return void
 */
function fann_set_error_log($errdat, $log_file) {}

/**
 * Calculate input scaling parameters for future use based on training data
 *
 *
 * @param resource $ann
 * @param resource $train_data
 * @param float $new_input_min
 * @param float $new_input_max
 *
 * @return bool
 */
function fann_set_input_scaling_params($ann, $train_data, $new_input_min, $new_input_max) {}

/**
 * Sets the learning momentum
 *
 *
 * @param resource $ann
 * @param float $learning_momentum
 *
 * @return bool
 */
function fann_set_learning_momentum($ann, $learning_momentum) {}

/**
 * Sets the learning rate
 *
 *
 * @param resource $ann
 * @param float $learning_rate
 *
 * @return bool
 */
function fann_set_learning_rate($ann, $learning_rate) {}

/**
 * Calculate output scaling parameters for future use based on training data
 *
 *
 * @param resource $ann
 * @param resource $train_data
 * @param float $new_output_min
 * @param float $new_output_max
 *
 * @return bool
 */
function fann_set_output_scaling_params($ann, $train_data, $new_output_min, $new_output_max) {}

/**
 * Sets the quickprop decay factor
 *
 *
 * @param resource $ann
 * @param float $quickprop_decay
 *
 * @return bool
 */
function fann_set_quickprop_decay($ann, $quickprop_decay) {}

/**
 * Sets the quickprop mu factor
 *
 *
 * @param resource $ann
 * @param float $quickprop_mu
 *
 * @return bool
 */
function fann_set_quickprop_mu($ann, $quickprop_mu) {}

/**
 * Sets the decrease factor used during RPROP training
 *
 *
 * @param resource $ann
 * @param float $rprop_decrease_factor
 *
 * @return bool
 */
function fann_set_rprop_decrease_factor($ann, $rprop_decrease_factor) {}

/**
 * Sets the maximum step-size
 *
 *
 * @param resource $ann
 * @param float $rprop_delta_max
 *
 * @return bool
 */
function fann_set_rprop_delta_max($ann, $rprop_delta_max) {}

/**
 * Sets the minimum step-size
 *
 *
 * @param resource $ann
 * @param float $rprop_delta_min
 *
 * @return bool
 */
function fann_set_rprop_delta_min($ann, $rprop_delta_min) {}

/**
 * Sets the initial step-size
 *
 *
 * @param resource $ann
 * @param float $rprop_delta_zero
 *
 * @return bool
 */
function fann_set_rprop_delta_zero($ann, $rprop_delta_zero) {}

/**
 * Sets the increase factor used during RPROP training
 *
 *
 * @param resource $ann
 * @param float $rprop_increase_factor
 *
 * @return bool
 */
function fann_set_rprop_increase_factor($ann, $rprop_increase_factor) {}

/**
 * Sets the sarprop step error shift
 *
 *
 * @param resource $ann
 * @param float $sarprop_step_error_shift
 *
 * @return bool
 */
function fann_set_sarprop_step_error_shift($ann, $sarprop_step_error_shift) {}

/**
 * Sets the sarprop step error threshold factor
 *
 *
 * @param resource $ann
 * @param float $sarprop_step_error_threshold_factor
 *
 * @return bool
 */
function fann_set_sarprop_step_error_threshold_factor($ann, $sarprop_step_error_threshold_factor) {}

/**
 * Sets the sarprop temperature
 *
 *
 * @param resource $ann
 * @param float $sarprop_temperature
 *
 * @return bool
 */
function fann_set_sarprop_temperature($ann, $sarprop_temperature) {}

/**
 * Sets the sarprop weight decay shift
 *
 *
 * @param resource $ann
 * @param float $sarprop_weight_decay_shift
 *
 * @return bool
 */
function fann_set_sarprop_weight_decay_shift($ann, $sarprop_weight_decay_shift) {}

/**
 * Calculate input and output scaling parameters for future use based on training data
 *
 *
 * @param resource $ann
 * @param resource $train_data
 * @param float $new_input_min
 * @param float $new_input_max
 * @param float $new_output_min
 * @param float $new_output_max
 *
 * @return bool
 */
function fann_set_scaling_params($ann, $train_data, $new_input_min, $new_input_max, $new_output_min, $new_output_max) {}

/**
 * Sets the error function used during training
 *
 *
 * @param resource $ann
 * @param int $error_function
 *
 * @return bool
 */
function fann_set_train_error_function($ann, $error_function) {}

/**
 * Sets the training algorithm
 *
 *
 * @param resource $ann
 * @param int $training_algorithm
 *
 * @return bool
 */
function fann_set_training_algorithm($ann, $training_algorithm) {}

/**
 * Sets the stop function used during training
 *
 *
 * @param resource $ann
 * @param int $stop_function
 *
 * @return bool
 */
function fann_set_train_stop_function($ann, $stop_function) {}

/**
 * Set connections in the network
 *
 *
 * @param resource $ann
 * @param array $connections
 *
 * @return bool
 */
function fann_set_weight_array($ann, $connections) {}

/**
 * Set a connection in the network
 *
 *
 * @param resource $ann
 * @param int $from_neuron
 * @param int $to_neuron
 * @param float $weight
 *
 * @return bool
 */
function fann_set_weight($ann, $from_neuron, $to_neuron, $weight) {}

/**
 * Shuffles training data, randomizing the order
 *
 *
 * @param resource $train_data
 *
 * @return bool
 */
function fann_shuffle_train_data($train_data) {}

/**
 * Returns an copy of a subset of the train data
 *
 *
 * @param resource $data
 * @param int $pos
 * @param int $length
 *
 * @return resource|false
 */
function fann_subset_train_data($data, $pos, $length) {}

/**
 * Test a set of training data and calculates the MSE for the training data
 *
 *
 * @param resource $ann
 * @param resource $data
 *
 * @return float|false The updated MSE, or false on error.
 */
function fann_test_data($ann, $data) {}

/**
 * Test with a set of inputs, and a set of desired outputs
 *
 *
 * @param resource $ann
 * @param array $input
 * @param array $desired_output
 *
 * @return bool
 */
function fann_test($ann, $input, $desired_output) {}

/**
 * Train one epoch with a set of training data
 *
 *
 * @param resource $ann
 * @param resource $data
 *
 * @return float|false The MSE, or false on error.
 */
function fann_train_epoch($ann, $data) {}

/**
 * Trains on an entire dataset for a period of time
 *
 *
 * @param resource $ann
 * @param resource $data
 * @param int $max_epochs
 * @param int $epochs_between_reports
 * @param float $desired_error
 *
 * @return bool
 */
function fann_train_on_data($ann, $data, $max_epochs, $epochs_between_reports, $desired_error) {}

/**
 * Trains on an entire dataset, which is read from file, for a period of time
 *
 *
 * @param resource $ann
 * @param string $filename
 * @param int $max_epochs
 * @param int $epochs_between_reports
 * @param float $desired_error
 *
 * @return bool
 */
function fann_train_on_file($ann, $filename, $max_epochs, $epochs_between_reports, $desired_error) {}

/**
 * Train one iteration with a set of inputs, and a set of desired outputs
 *
 *
 * @param resource $ann
 * @param array $input
 * @param array $desired_output
 *
 * @return bool
 */
function fann_train($ann, $input, $desired_output) {}

define('FANN_TRAIN_INCREMENTAL', 0);
define('FANN_TRAIN_BATCH', 1);
define('FANN_TRAIN_RPROP', 2);
define('FANN_TRAIN_QUICKPROP', 3);
define('FANN_TRAIN_SARPROP', 4);
define('FANN_LINEAR', 0);
define('FANN_THRESHOLD', 1);
define('FANN_THRESHOLD_SYMMETRIC', 2);
define('FANN_SIGMOID', 3);
define('FANN_SIGMOID_STEPWISE', 4);
define('FANN_SIGMOID_SYMMETRIC', 5);
define('FANN_SIGMOID_SYMMETRIC_STEPWISE', 6);
define('FANN_GAUSSIAN', 7);
define('FANN_GAUSSIAN_SYMMETRIC', 8);
define('FANN_GAUSSIAN_STEPWISE', 9);
define('FANN_ELLIOT', 10);
define('FANN_ELLIOT_SYMMETRIC', 11);
define('FANN_LINEAR_PIECE', 12);
define('FANN_LINEAR_PIECE_SYMMETRIC', 13);
define('FANN_SIN_SYMMETRIC', 14);
define('FANN_COS_SYMMETRIC', 15);
define('FANN_SIN', 16);
define('FANN_COS', 17);
define('FANN_ERRORFUNC_LINEAR', 0);
define('FANN_ERRORFUNC_TANH', 1);
define('FANN_STOPFUNC_MSE', 0);
define('FANN_STOPFUNC_BIT', 1);
define('FANN_NETTYPE_LAYER', 0);
define('FANN_NETTYPE_SHORTCUT', 1);
define('FANN_E_NO_ERROR', 0);
define('FANN_E_CANT_OPEN_CONFIG_R', 1);
define('FANN_E_CANT_OPEN_CONFIG_W', 2);
define('FANN_E_WRONG_CONFIG_VERSION', 3);
define('FANN_E_CANT_READ_CONFIG', 4);
define('FANN_E_CANT_READ_NEURON', 5);
define('FANN_E_CANT_READ_CONNECTIONS', 6);
define('FANN_E_WRONG_NUM_CONNECTIONS', 7);
define('FANN_E_CANT_OPEN_TD_W', 8);
define('FANN_E_CANT_OPEN_TD_R', 9);
define('FANN_E_CANT_READ_TD', 10);
define('FANN_E_CANT_ALLOCATE_MEM', 11);
define('FANN_E_CANT_TRAIN_ACTIVATION', 12);
define('FANN_E_CANT_USE_ACTIVATION', 13);
define('FANN_E_TRAIN_DATA_MISMATCH', 14);
define('FANN_E_CANT_USE_TRAIN_ALG', 15);
define('FANN_E_TRAIN_DATA_SUBSET', 16);
define('FANN_E_INDEX_OUT_OF_BOUND', 17);
define('FANN_E_SCALE_NOT_PRESENT', 18);
define('FANN_E_INPUT_NO_MATCH', 19);
define('FANN_E_OUTPUT_NO_MATCH', 20);

define('FANN_VERSION', '2.2');
// End of Fann v.1.0
<?php
/**
 * Helper autocomplete for php zmq extension
 * @author Boris Gorbylev <ekho@ekho.name>
 * @link https://github.com/i-ekho/zmq-phpdoc
 */
/**
 * Class ZMQ
 * @link https://secure.php.net/manual/en/class.zmq.php
 */
class ZMQ
{
    /**
     * Exclusive pair pattern
     */
    public const SOCKET_PAIR = 0;

    /**
     * Publisher socket
     */
    public const SOCKET_PUB = 1;

    /**
     * Subscriber socket
     */
    public const SOCKET_SUB = 2;

    /**
     * Request socket
     */
    public const SOCKET_REQ = 3;

    /**
     * Reply socket
     */
    public const SOCKET_REP = 4;

    /**
     * Alias for SOCKET_DEALER
     */
    public const SOCKET_XREQ = 5;

    /**
     * Alias for SOCKET_ROUTER
     */
    public const SOCKET_XREP = 6;

    /**
     * Pipeline upstream push socket
     */
    public const SOCKET_PUSH = 8;

    /**
     * Pipeline downstream pull socket
     */
    public const SOCKET_PULL = 7;

    /**
     * Extended REP socket that can route replies to requesters
     */
    public const SOCKET_ROUTER = 6;

    /**
     * Extended REQ socket that load balances to all connected peers
     */
    public const SOCKET_DEALER = 5;

    /**
     * Similar to SOCKET_PUB, except you can receive subscriptions as messages.
     * The subscription message is 0 (unsubscribe) or 1 (subscribe) followed by the topic.
     */
    public const SOCKET_XPUB = 9;

    /**
     * Similar to SOCKET_SUB, except you can send subscriptions as messages. See SOCKET_XPUB for format.
     */
    public const SOCKET_XSUB = 10;

    /**
     * Used to send and receive TCP data from a non-ØMQ peer.
     * Available if compiled against ZeroMQ 4.x or higher.
     */
    public const SOCKET_STREAM = 11;

    /**
     * The high water mark for inbound and outbound messages is a hard
     * limit on the maximum number of outstanding messages ØMQ shall queue in memory
     * for any single peer that the specified socket is communicating with.
     * Setting this option on a socket will only affect connections made after the option has been set.
     * On ZeroMQ 3.x this is a wrapper for setting both SNDHWM and RCVHWM.
     */
    public const SOCKOPT_HWM = 1;

    /**
     * The ZMQ_SNDHWM option shall set the high water mark for outbound messages on the specified socket.
     * Available if compiled against ZeroMQ 3.x or higher.
     */
    public const SOCKOPT_SNDHWM = 23;

    /**
     * The ZMQ_SNDHWM option shall set the high water mark for inbound messages on the specified socket.
     * Available if compiled against ZeroMQ 3.x or higher.
     */
    public const SOCKOPT_RCVHWM = 24;

    /**
     * Set I/O thread affinity
     */
    public const SOCKOPT_AFFINITY = 4;

    /**
     * Set socket identity
     */
    public const SOCKOPT_IDENTITY = 5;

    /**
     * Establish message filter. Valid for subscriber socket
     */
    public const SOCKOPT_SUBSCRIBE = 6;

    /**
     * Remove message filter. Valid for subscriber socket
     */
    public const SOCKOPT_UNSUBSCRIBE = 7;

    /**
     * Set rate for multicast sockets (pgm) (Value: int >= 0)
     */
    public const SOCKOPT_RATE = 8;

    /**
     * Set multicast recovery interval (Value: int >= 0)
     */
    public const SOCKOPT_RECOVERY_IVL = 9;

    /**
     * Set the initial reconnection interval (Value: int >= 0)
     */
    public const SOCKOPT_RECONNECT_IVL = 18;

    /**
     * Set the max reconnection interval (Value: int >= 0)
     */
    public const SOCKOPT_RECONNECT_IVL_MAX = 21;

    /**
     * Control multicast loopback (Value: int >= 0)
     */
    public const SOCKOPT_MCAST_LOOP = 10;

    /**
     * Set kernel transmit buffer size (Value: int >= 0)
     */
    public const SOCKOPT_SNDBUF = 11;

    /**
     * Set kernel receive buffer size (Value: int >= 0)
     */
    public const SOCKOPT_RCVBUF = 12;

    /**
     * Receive multi-part messages
     */
    public const SOCKOPT_RCVMORE = 13;

    /**
     * Get the socket type. Valid for getSockOpt
     */
    public const SOCKOPT_TYPE = 16;

    /**
     * The linger value of the socket.
     * Specifies how long the socket blocks trying flush messages after it has been closed
     */
    public const SOCKOPT_LINGER = 17;

    /**
     * The SOCKOPT_BACKLOG option shall set the maximum length of the queue of outstanding peer connections
     * for the specified socket; this only applies to connection-oriented transports.
     */
    public const SOCKOPT_BACKLOG = 19;

    /**
     * Limits the maximum size of the inbound message. Value -1 means no limit.
     * Available if compiled against ZeroMQ 3.x or higher
     */
    public const SOCKOPT_MAXMSGSIZE = 22;

    /**
     * Sets the timeout for send operation on the socket. Value -1 means no limit.
     * Available if compiled against ZeroMQ 3.x or higher
     */
    public const SOCKOPT_SNDTIMEO = 28;

    /**
     * Sets the timeout for receive operation on the socket. Value -1 means no limit.
     * Available if compiled against ZeroMQ 3.x or higher
     */
    public const SOCKOPT_RCVTIMEO = 27;

    /**
     * Disable IPV6 support if 1.
     * Available if compiled against ZeroMQ 3.x
     */
    public const SOCKOPT_IPV4ONLY = 31;

    /**
     * Retrieve the last connected endpoint - for use with * wildcard ports.
     * Available if compiled against ZeroMQ 3.x or higher
     */
    public const SOCKOPT_LAST_ENDPOINT = 32;

    /**
     * Idle time for TCP keepalive.
     * Available if compiled against ZeroMQ 3.x or higher
     */
    public const SOCKOPT_TCP_KEEPALIVE_IDLE = 36;

    /**
     * Count time for TCP keepalive.
     * Available if compiled against ZeroMQ 3.x or higher
     */
    public const SOCKOPT_TCP_KEEPALIVE_CNT = 35;

    /**
     * Interval for TCP keepalive.
     * Available if compiled against ZeroMQ 3.x or higher
     */
    public const SOCKOPT_TCP_KEEPALIVE_INTVL = 37;

    /**
     * Set a CIDR string to match against incoming TCP connections.
     * Available if compiled against ZeroMQ 3.x or higher
     */
    public const SOCKOPT_DELAY_ATTACH_ON_CONNECT = 39;

    /**
     * Set a CIDR string to match against incoming TCP connections.
     * Available if compiled against ZeroMQ 3.x or higher
     */
    public const SOCKOPT_TCP_ACCEPT_FILTER = 38;

    /**
     * Set the XPUB to receive an application message on each instance of a subscription.
     * Available if compiled against ZeroMQ 3.x or higher
     */
    public const SOCKOPT_XPUB_VERBOSE = 40;

    /**
     * Sets the raw mode on the ROUTER, when set to 1.
     * In raw mode when using tcp:// transport the socket will read and write without ZeroMQ framing.
     * Available if compiled against ZeroMQ 4.0 or higher
     */
    public const SOCKOPT_ROUTER_RAW = 41;

    /**
     * Enable IPV6.
     * Available if compiled against ZeroMQ 4.0 or higher
     */
    public const SOCKOPT_IPV6 = 42;

    /**
     * The socket limit for this context.
     * Available if compiled against ZeroMQ 3.x or higher
     */
    public const CTXOPT_MAX_SOCKETS = 2;

    /**
     * Poll for incoming data
     */
    public const POLL_IN = 1;

    /**
     * Poll for outgoing data
     */
    public const POLL_OUT = 2;

    /**
     * Non-blocking operation.
     * @deprecated use ZMQ::MODE_DONTWAIT instead
     */
    public const MODE_NOBLOCK = 1;

    /**
     * Non-blocking operation
     */
    public const MODE_DONTWAIT = 1;

    /**
     * Send multi-part message
     */
    public const MODE_SNDMORE = 2;

    /**
     * Forwarder device
     */
    public const DEVICE_FORWARDER = 2;

    /**
     * Queue device
     */
    public const DEVICE_QUEUE = 3;

    /**
     * Streamer device
     */
    public const DEVICE_STREAMER = 1;

    /**
     * ZMQ extension internal error
     */
    public const ERR_INTERNAL = -99;

    /**
     * Implies that the operation would block when ZMQ::MODE_DONTWAIT is used
     */
    public const ERR_EAGAIN = 11;

    /**
     * The operation is not supported by the socket type
     */
    public const ERR_ENOTSUP = 156384713;

    /**
     * The operation can not be executed because the socket is not in correct state
     */
    public const ERR_EFSM = 156384763;

    /**
     * The context has been terminated
     */
    public const ERR_ETERM = 156384765;

    /**
     * Private constructor to prevent direct initialization. This class holds the constants for ZMQ extension.
     * @link https://secure.php.net/manual/en/zmq.construct.php
     */
    private function __construct() {}
}
/**
 * Class ZMQContext
 * @link https://secure.php.net/manual/en/class.zmqcontext.php
 */
class ZMQContext
{
    /**
     * Constructs a new ZMQ context. The context is used to initialize sockets.
     * A persistent context is required to initialize persistent sockets.
     *
     * @link https://secure.php.net/manual/en/zmqcontext.construct.php
     *
     * @param int $io_threads Number of io-threads in the context
     * @param bool $is_persistent Whether the context is persistent. Persistent context is stored over multiple requests and is a requirement for persistent sockets.
     */
    public function __construct($io_threads = 1, $is_persistent = true) {}

    /**
     * (PECL zmq &gt;= 1.0.4)
     * Returns the value of a context option.
     *
     * @link https://secure.php.net/manual/en/zmqcontext.getopt.php
     *
     * @param string $key An int representing the option. See the <b>ZMQ::CTXOPT_*</b> constants.
     * @return string|int Returns either a string or an integer depending on key. Throws ZMQContextException on error.
     * @throws ZMQContextException
     */
    public function getOpt($key) {}

    /**
     * (PECL zmq &gt;= 0.5.0)
     * Shortcut for creating new sockets from the context.
     * If the context is not persistent the persistent_id parameter is ignored
     * and the socket falls back to being non-persistent.
     * The on_new_socket is called only when a new underlying socket structure is created.
     *
     * @link https://secure.php.net/manual/en/zmqcontext.getsocket.php
     *
     * @param int $type <b>ZMQ::SOCKET_*</b> constant to specify socket type.
     * @param string $persistent_id If persistent_id is specified the socket will be persisted over multiple requests.
     * @param callable $on_new_socket Callback function, which is executed when a new socket structure is created. This function does not get invoked if the underlying persistent connection is re-used. The callback takes ZMQSocket and persistent_id as two arguments.
     * @return ZMQSocket
     * @throws ZMQSocketException
     */
    public function getSocket($type, $persistent_id = null, $on_new_socket = null) {}

    /**
     * (PECL zmq &gt;= 0.5.0)
     * Whether the context is persistent.
     * Persistent context is needed for persistent connections as each socket is allocated from a context.
     *
     * @link https://secure.php.net/manual/en/zmqcontext.ispersistent.php
     *
     * @return bool Returns <b>TRUE</b> if the context is persistent and <b>FALSE</b> if the context is non-persistent.
     */
    public function isPersistent() {}

    /**
     * (PECL zmq &gt;= 1.0.4)
     * Sets a ZMQ context option. The type of the value depends on the key.
     * See ZMQ Constant Types for more information.
     *
     * @link https://secure.php.net/manual/en/zmqcontext.setopt.php
     *
     * @param int $key One of the <b>ZMQ::CTXOPT_*<b> constants.
     * @param mixed $value The value of the parameter.
     * @return ZMQContext
     * @throws ZMQContextException
     */
    public function setOpt($key, $value) {}
}
/**
 * Class ZMQSocket
 * @link https://secure.php.net/manual/en/class.zmqsocket.php
 */
class ZMQSocket
{
    /**
     * (PECL zmq &gt;= 0.5.0)
     * Constructs a ZMQSocket object.
     * The persistent_id parameter can be used to allocated a persistent socket.
     * A persistent socket has to be allocated from a persistent context and it stays connected over multiple requests.
     * The persistent_id parameter can be used to recall the same socket over multiple requests.
     * The on_new_socket is called only when a new underlying socket structure is created.
     *
     * @link https://secure.php.net/manual/en/zmqsocket.construct.php
     *
     * @param ZMQContext $context <p>ZMQContext to build this object</p>
     * @param int $type <p>The type of the socket. See ZMQ::SOCKET_* constants.</p>
     * @param string $persistent_id [optional] <p>If persistent_id is specified the socket will be persisted over multiple requests. If context is not persistent the socket falls back to non-persistent mode.</p>
     * @param callable $on_new_socket [optional] <p>Callback function, which is executed when a new socket structure is created. This function does not get invoked if the underlying persistent connection is re-used.</p>
     *
     * @throws ZMQSocketException
     */
    public function __construct(ZMQContext $context, $type, $persistent_id = null, $on_new_socket = null) {}

    /**
     * (PECL zmq &gt;= 0.5.0)
     * Bind the socket to an endpoint.
     * The endpoint is defined in format transport://address
     * where transport is one of the following: inproc, ipc, tcp, pgm or epgm.
     *
     * @link https://secure.php.net/manual/en/zmqsocket.bind.php
     *
     * @param string $dsn The bind dsn, for example transport://address.
     * @param bool $force Tries to bind even if the socket has already been bound to the given endpoint.
     *
     * @return ZMQSocket
     * @throws ZMQSocketException if binding fails
     */
    public function bind($dsn, $force = false) {}

    /**
     * (PECL zmq &gt;= 0.5.0)
     * Connect the socket to a remote endpoint.
     * The endpoint is defined in format transport://address
     * where transport is one of the following: inproc, ipc, tcp, pgm or epgm.
     *
     * @link https://secure.php.net/manual/en/zmqsocket.connect.php
     *
     * @param string $dsn The bind dsn, for example transport://address.
     * @param bool $force Tries to bind even if the socket has already been bound to the given endpoint.
     *
     * @return ZMQSocket
     * @throws ZMQSocketException If connection fails
     */
    public function connect($dsn, $force = false) {}

    /**
     * (PECL zmq &gt;= 1.0.4)
     * Disconnect the socket from a previously connected remote endpoint.
     * The endpoint is defined in format transport://address
     * where transport is one of the following: inproc, ipc, tcp, pgm or epgm.
     *
     * @link https://secure.php.net/manual/en/zmqsocket.disconnect.php
     *
     * @param string $dsn The bind dsn, for example transport://address.
     *
     * @return ZMQSocket
     * @throws ZMQSocketException If connection fails
     */
    public function disconnect($dsn) {}

    /**
     * Returns a list of endpoints where the socket is connected or bound to.
     *
     * @link https://secure.php.net/manual/en/zmqsocket.getendpoints.php
     *
     * @return array contains two sub-arrays: 'connect' and 'bind'
     * @throws ZMQSocketException
     */
    public function getEndpoints() {}

    /**
     * Returns the persistent id string assigned of the object and NULL if socket is not persistent.
     *
     * @link https://secure.php.net/manual/en/zmqsocket.getpersistentid.php
     *
     * @return string|null <p>
     * Returns the persistent id string assigned of the object and <b>NULL</b> if socket is not persistent.
     * </p>
     */
    public function getPersistentId() {}

    /**
     * Returns the value of a socket option.
     * This method is available if ZMQ extension has been compiled against ZMQ version 2.0.7 or higher
     *
     * @link https://secure.php.net/manual/en/zmqsocket.getsockopt.php
     *
     * @since 0MQ 2.0.7
     * @param int $key An int representing the option. See the <b>ZMQ::SOCKOPT_*</b> constants.
     *
     * @return string|int <p>
     * Returns either a string or an integer depending on <b>key</b>. Throws
     * ZMQSocketException on error.
     * </p>
     * @throws ZMQSocketException
     */
    public function getSockOpt($key) {}

    /**
     * Return the socket type.
     * The socket type can be compared against ZMQ::SOCKET_* constants.
     *
     * @link https://secure.php.net/manual/en/zmqsocket.getsockettype.php
     *
     * @return int <p>
     * Returns an integer representing the socket type. The integer can be compared against
     * <b>ZMQ::SOCKET_*</b> constants.
     * </p>
     */
    public function getSocketType() {}

    /**
     * Check whether the socket is persistent.
     *
     * @link https://secure.php.net/manual/en/zmqsocket.ispersistent.php
     *
     * @return bool <p>Returns a boolean based on whether the socket is persistent or not.</p>
     */
    public function isPersistent() {}

    /**
     * Receive a message from a socket.
     * By default receiving will block until a message is available unless <b>ZMQ::MODE_NOBLOCK</b> flag is used.
     * <b>ZMQ::SOCKOPT_RCVMORE</b> socket option can be used for receiving multi-part messages.
     * Returns the message.
     * If <b>ZMQ::MODE_NOBLOCK</b> is used and the operation would block bool false shall be returned.
     *
     * @link https://secure.php.net/manual/en/zmqsocket.recv.php
     * @see ZMQSocket::setSockOpt()
     *
     * @param int $mode Pass mode flags to receive multipart messages or non-blocking operation. See ZMQ::MODE_* constants.
     *
     * @return string|false <p>Returns the message. Throws ZMQSocketException in error. If <b>ZMQ::MODE_NOBLOCK</b> is used and the operation would block boolean false shall be returned.</p>
     * @throws ZMQSocketException if receiving fails.
     */
    public function recv($mode = 0) {}

    /**
     * Receive an array multipart message from a socket.
     * By default receiving will block until a message is available unless ZMQ::MODE_NOBLOCK flag is used.
     * Returns the array of message parts.
     * If <b>ZMQ::MODE_NOBLOCK</b> is used and the operation would block bool false shall be returned.
     *
     * @link https://secure.php.net/manual/en/zmqsocket.recvmulti.php
     *
     * @param int $mode Pass mode flags to receive multipart messages or non-blocking operation. See ZMQ::MODE_* constants.
     *
     * @return string[] Returns the array of message parts. Throws ZMQSocketException in error. If ZMQ::MODE_NOBLOCK is used and the operation would block boolean false shall be returned.
     * @throws ZMQSocketException if receiving fails.
     */
    public function recvMulti($mode = 0) {}

    /**
     * Send a message using the socket. The operation can block unless ZMQ::MODE_NOBLOCK is used.
     * If <b>ZMQ::MODE_NOBLOCK</b> is used and the operation would block bool false shall be returned.
     *
     * @link https://secure.php.net/manual/en/zmqsocket.send.php
     *
     * @param string $message The message to send
     * @param int $mode Pass mode flags to receive multipart messages or non-blocking operation. See ZMQ::MODE_* constants.     *
     *
     * @return ZMQSocket
     * @throws ZMQSocketException if sending message fails
     */
    public function send($message, $mode = 0) {}

    /**
     * Send a multipart message using the socket. The operation can block unless ZMQ::MODE_NOBLOCK is used.
     * If <b>ZMQ::MODE_NOBLOCK</b> is used and the operation would block bool false shall be returned.
     *
     * @link https://secure.php.net/manual/en/zmqsocket.sendmulti.php
     *
     * @param array $message The message to send - an array of strings
     * @param int $mode Pass mode flags to receive multipart messages or non-blocking operation. See ZMQ::MODE_* constants.     *
     *
     * @return ZMQSocket
     * @throws ZMQSocketException if sending message fails
     */
    public function sendmulti(array $message, $mode = 0) {}

    /**
     * Sets a ZMQ socket option. The type of the value depends on the key.
     * @see ZMQ Constant Types for more information.
     *
     * @link https://secure.php.net/manual/en/zmqsocket.setsockopt.php
     *
     * @param int $key One of the <b>ZMQ::SOCKOPT_*</b> constants.
     * @param mixed $value The value of the parameter.
     *
     * @return ZMQSocket
     * @throws ZMQSocketException
     */
    public function setSockOpt($key, $value) {}

    /**
     * Unbind the socket from an endpoint.
     * The endpoint is defined in format transport://address
     * where transport is one of the following: inproc, ipc, tcp, pgm or epgm.
     *
     * @link https://secure.php.net/manual/en/zmqsocket.unbind.php
     *
     * @param string $dsn The previously bound dsn, for example transport://address.
     *
     * @return ZMQSocket
     * @throws ZMQSocketException if binding fails
     */
    public function unbind($dsn) {}
}
/**
 * Class ZMQPoll
 * @link https://secure.php.net/manual/en/class.zmqpoll.php
 */
class ZMQPoll
{
    /**
     * (PECL zmq &gt;= 0.5.0)
     * Adds a new item to the poll set and returns the internal id of the added item.
     * The item can be removed from the poll set using the returned string id.
     * Returns a string id of the added item which can be later used to remove the item.
     *
     * @link https://secure.php.net/manual/en/zmqpoll.add.php
     *
     * @param ZMQSocket $entry ZMQSocket object or a PHP stream resource
     * @param int $type Defines what activity the socket is polled for. See <b>ZMQ::POLL_IN</b> and <b>ZMQ::POLL_OUT</b> constants.
     *
     * @return int Returns a string id of the added item which can be later used to remove the item. Throws ZMQPollException on error.
     * @throws ZMQPollException if the object has not been initialized with polling
     */
    public function add(ZMQSocket $entry, $type) {}

    /**
     * (PECL zmq &gt;= 1.0.4)
     * Clears all elements from the poll set.
     *
     * @link https://secure.php.net/manual/en/zmqpoll.clear.php
     *
     * @return ZMQPoll Returns the current object.
     */
    public function clear() {}

    /**
     * (PECL zmq &gt;= 0.5.0)
     * Count the items in the poll set.
     *
     * @link https://secure.php.net/manual/en/zmqpoll.count.php
     *
     * @return int Returns an integer representing the amount of items in the poll set.
     */
    public function count() {}

    /**
     * (PECL zmq &gt;= 0.5.0)
     * Returns the ids of the objects that had errors in the last poll.
     * Returns an array containing ids for the items that had errors in the last poll.
     * Empty array is returned if there were no errors.
     *
     * @link https://secure.php.net/manual/en/zmqpoll.getlasterrors.php
     *
     * @return int[]
     */
    public function getLastErrors() {}

    /**
     * (PECL zmq &gt;= 0.5.0)
     * Polls the items in the current poll set.
     * The readable and writable items are returned in the readable and writable parameters.
     * ZMQPoll::getLastErrors() can be used to check if there were errors.
     * Returns an int representing amount of items with activity.
     *
     * @link https://secure.php.net/manual/en/zmqpoll.poll.php
     *
     * @param array &$readable Array where readable ZMQSockets/PHP streams are returned. The array will be cleared at the beginning of the operation.
     * @param array &$writable Array where writable ZMQSockets/PHP streams are returned. The array will be cleared at the beginning of the operation.
     * @param int $timeout Timeout for the operation. -1 means that poll waits until at least one item has activity. Please note that starting from version 1.0.0 the poll timeout is defined in milliseconds, rather than microseconds.
     *
     * @throws ZMQPollException if polling fails
     * @return int
     */
    public function poll(array &$readable, array &$writable, $timeout = -1) {}

    /**
     * (PECL zmq &gt;= 0.5.0)
     * Remove item from the poll set.
     * The item parameter can be ZMQSocket object, a stream resource or the id returned from ZMQPoll::add() method.
     * Returns true if the item was removed and false if the object with given id does not exist in the poll set.
     *
     * @link https://secure.php.net/manual/en/zmqpoll.remove.php
     *
     * @param ZMQSocket|string|mixed $item The ZMQSocket object, PHP stream or string id of the item.
     * @return bool Returns true if the item was removed and false if the object with given id does not exist in the poll set.
     */
    public function remove($item) {}
}
/**
 * Class ZMQDevice
 * @link https://secure.php.net/manual/en/class.zmqdevice.php
 */
class ZMQDevice
{
    /**
     * (PECL zmq &gt;= 1.0.4)
     * Construct a new device.
     * "ØMQ devices can do intermediation of addresses, services, queues, or any other abstraction you care
     * to define above the message and socket layers." -- zguide
     * Call to this method will prepare the device. Usually devices are very long running processes so running this method from interactive script is not recommended. This method throw ZMQDeviceException if the device cannot be started.
     *
     * @link https://secure.php.net/manual/en/zmqdevice.construct.php
     *
     * @param ZMQSocket $frontend Frontend parameter for the devices. Usually where there messages are coming.
     * @param ZMQSocket $backend Backend parameter for the devices. Usually where there messages going to.
     * @param null|ZMQSocket $listener Listener socket, which receives a copy of all messages going both directions. The type of this socket should be SUB, PULL or DEALER.
     */
    public function __construct(ZMQSocket $frontend, ZMQSocket $backend, ZMQSocket $listener = null) {}

    /**
     * Gets the idle callback timeout value.
     * This method returns the idle callback timeout value.
     * Added in ZMQ extension version 1.1.0.
     *
     * @link https://secure.php.net/manual/en/zmqdevice.getidletimeout.php
     *
     * @return int This method returns the idle callback timeout value.
     */
    public function getIdleTimeout() {}

    /**
     * Gets the timer callback timeout value.
     * Added in ZMQ extension version 1.1.0.
     *
     * @link https://secure.php.net/manual/en/zmqdevice.gettimertimeout.php
     *
     * @return int This method returns the timer timeout value.
     */
    public function getTimerTimeout() {}

    /**
     * Runs the device.
     * Call to this method will block until the device is running.
     * It is not recommended that devices are used from interactive scripts.
     *
     * @link https://secure.php.net/manual/en/zmqdevice.run.php
     *
     * @throws ZMQDeviceException
     */
    public function run() {}

    /**
     * Sets the idle callback function.
     * If idle timeout is defined the idle callback function shall be called if the internal poll loop times out
     * without events. If the callback function returns false or a value that evaluates to false the device is stopped.
     * The callback function signature is callback (mixed $user_data).
     *
     * @link https://secure.php.net/manual/en/zmqdevice.setidlecallback.php
     *
     * @param callable $cb_func Callback function to invoke when the device is idle. Returning false or a value that evaluates to false from this function will cause the device to stop.
     * @param int $timeout How often to invoke the idle callback in milliseconds. The idle callback is invoked periodically when there is no activity on the device. The timeout value guarantees that there is at least this amount of milliseconds between invocations of the callback function.
     * @param mixed $user_data Additional data to pass to the callback function.
     *
     * @return ZMQDevice On success this method returns the current object.
     */
    public function setIdleCallback($cb_func, $timeout, $user_data) {}

    /**
     * Sets the idle callback timeout value. The idle callback is invoked periodically when the device is idle.
     * On success this method returns the current object.
     *
     * @link https://secure.php.net/manual/en/zmqdevice.setidletimeout.php
     *
     * @param int $timeout The idle callback timeout value in milliseconds
     *
     * @return ZMQDevice On success this method returns the current object.
     */
    public function setIdleTimeout($timeout) {}

    /**
     * Sets the timer callback function. The timer callback will be invoked after timeout has passed.
     * The difference between idle and timer callbacks are that idle callback is invoked only when the device is idle.
     * The callback function signature is callback (mixed $user_data).
     * Added in ZMQ extension version 1.1.0.
     *
     * @link https://secure.php.net/manual/en/zmqdevice.settimercallback.php
     *
     * @param callable $cb_func Callback function to invoke when the device is idle. Returning false or a value that evaluates to false from this function will cause the device to stop.
     * @param int $timeout How often to invoke the idle callback in milliseconds. The idle callback is invoked periodically when there is no activity on the device. The timeout value guarantees that there is at least this amount of milliseconds between invocations of the callback function.
     * @param mixed $user_data Additional data to pass to the callback function.
     *
     * @return ZMQDevice
     */
    public function setTimerCallback($cb_func, $timeout, $user_data) {}

    /**
     * Sets the timer callback timeout value. The timer callback is invoked periodically if it's set.
     * Added in ZMQ extension version 1.1.0.
     *
     * @link https://secure.php.net/manual/en/zmqdevice.settimertimeout.php
     *
     * @param int $timeout The timer callback timeout value.
     *
     * @return ZMQDevice
     */
    public function setTimerTimeout($timeout) {}
}
class ZMQException extends Exception {}
class ZMQContextException extends ZMQException {}
class ZMQSocketException extends ZMQException {}
class ZMQPollException extends ZMQException {}
class ZMQDeviceException extends ZMQException {}
<?php

namespace {
use JetBrains\PhpStorm\Deprecated;

/**
 * Attaches a custom attribute (key/value pair) to the current transaction and the current span (if enabled).
 *
 * Add a custom attribute (a key and a value data pair) to the current web transaction. (The call name is
 * newrelic_add_custom_parameter because "custom attributes" were previously called "custom parameters.") For
 * example,
 * you can add a customer's full name from your customer database. This attribute appears in any transaction trace
 * that results from this transaction. You can also query the Transaction event for your custom attributes.
 *
 * If the value given is a float with a value of NaN, Infinity, denorm or negative zero, the behavior of this
 * function
 * is undefined. For other floating point values, the agent may discard 1 or more bits of precision (ULPs) from the
 * given value.
 *
 * Returns true if the parameter was added successfully.
 *
 * Important: If you want to use your custom attributes, avoid using any of the reserved terms used by NRQL.
 *
 * @link  https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_add_custom_parameter/
 * @since 4.4.5.35
 *
 * @param string                $key   The name of the custom attribute. Only the first 255 characters are retained.
 * @param bool|float|int|string $value The value to associate with this custom attribute.
 *
 * @return bool
 */
function newrelic_add_custom_parameter(string $key, bool|float|int|string $value): bool {}

/**
 * Specify functions or methods for the agent to instrument with custom instrumentation.
 *
 * Specify functions or methods for the agent to target for custom instrumentation. This is the API equivalent of the
 * newrelic.transaction_tracer.custom setting. You cannot apply custom tracing to internal PHP functions.
 *
 * The name can be formatted either as function_name for procedural functions, or as "ClassName::method" for methods.
 * Both static and instance methods will be instrumented if the method syntax is used, and the class name must be
 * fully qualified: it must include the full namespace if the class was defined within a namespace.
 *
 * This function will return true if the tracer was added successfully.
 *
 * @link https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_add_custom_tracer/
 *
 * @param string $functionName
 *
 * @return bool
 */
function newrelic_add_custom_tracer(string $functionName): bool {}

/**
 * Manually specify that a transaction is a background job or a web transaction.
 *
 * Tell the agent to treat this "web" transaction as a "non-web" transaction (the APM UI separates web and non-web
 * transactions, for example in the Transactions page). Call as early as possible. This is most commonly used for
 * cron
 * jobs or other long-lived background tasks. However, this call is usually unnecessary since the agent usually
 * detects whether a transaction is a web or non-web transaction automatically.
 *
 * You can also reverse the functionality by setting the optional flag to false, which marks a "non-web" transaction
 * as a "web" transaction.
 *
 * @link https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_background_job/
 *
 * @param bool $flag [optional]
 *
 * @return void
 */
function newrelic_background_job(bool $flag = true): void {}

/**
 * Enable or disable the capture of URL parameters.
 *
 * Enable or disable the capture of URL parameters (everything after the ? in the URL). This overrides the
 * newrelic.capture_params config file setting.
 *
 * IMPORTANT: If you pass sensitive information directly in the URL, keep this disabled.
 *
 * @link https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_capture_params/
 *
 * @param bool $enable_flag [optional]
 *
 * @return void
 */
function newrelic_capture_params(bool $enable_flag = true): void {}

/**
 * Add a custom metric (in milliseconds) to time a component of your app not captured by default.
 *
 * Name your custom metrics with a Custom/ prefix (for example, Custom/MyMetric). This helps the UI organize your
 * custom metrics in one place, and it makes them easily findable via the Metric Explorer. Records timing in
 * milliseconds. For example: a value of 4 is stored as .004 seconds in New Relic's systems. If the value is NaN,
 * Infinity, denorm or negative zero, the behavior of this function is undefined. New Relic may discard 1 or more bits
 * of precision (ULPs) from the given value.
 *
 * This function will return true if the metric was added successfully.
 *
 * @link https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newreliccustommetric-php-agent-api/
 * @see  https://docs.newrelic.com/docs/agents/manage-apm-agents/agent-data/custom-metrics/
 *
 * @param string $metric_name
 * @param float  $value
 *
 * @return bool
 */
function newrelic_custom_metric(string $metric_name, float $value): bool {}

/**
 * Disable automatic injection of the browser monitoring snippet on particular pages.
 *
 * This call disables automatic injection of the browser monitoring agent for the current transaction. Call as early
 * as possible. You can use this call to remove the JavaScript if the insertion is causing problems or if you are
 * serving pages to third-party services that do not allow JavaScript (for example, Google's accelerated mobile
 * pages).
 *
 * Returns true if called within a New Relic transaction. Otherwise returns null if outside a transaction (for
 * example, if newrelic_end_transaction() has been called).
 *
 * @link https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_disable_autorum/
 *
 * @return bool|null
 */
function newrelic_disable_autorum(): ?bool {}

#[Deprecated(replacement: 'newrelic_capture_params()')]
function newrelic_enable_params() {}

/**
 * Stop timing the current transaction, but continue instrumenting it.
 *
 * Stop timing the web transaction immediately. Useful when a page is done with app code and is about to stream data
 * (file download, audio or video streaming, and so on), and you don't want streaming time to count as part of the
 * transaction run time. The agent sends data to the daemon at the end of the transaction.
 *
 * This is especially relevant when the time taken to complete the operation is completely outside the bounds of your
 * application. For example, a user on a very slow connection may take a very long time to download even small files,
 * and you wouldn't want that download time to skew the real transaction time.
 *
 * @link https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_end_of_transaction/
 *
 * @return void
 */
function newrelic_end_of_transaction(): void {}

/**
 * Stop instrumenting the current transaction immediately.
 *
 * Stop instrumenting the current transaction immediately, and send the data to the daemon. This call simulates what
 * the agent normally does when PHP terminates the current transaction. The most common use for this call is to
 * improve instrumentation of command line scripts that handle job queue processing. Call this method at the end of a
 * particular job, and then call newrelic_start_transaction() when a new task is pulled off the queue.
 *
 * Normally, when you end a transaction you want the agent to record the associated data. However, you can also
 * discard the data by setting $ignore to true.
 *
 * This function will return true if the transaction was successfully ended and data was sent to the New Relic
 * daemon.
 *
 * @link  https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_end_transaction/
 * @since 3.0.5.95
 *
 * @param bool $ignore [optional]
 *
 * @return bool
 */
function newrelic_end_transaction(bool $ignore = false): bool {}

/**
 * Returns a browser monitoring snippet to inject at the end of the HTML output.
 *
 * Returns a JavaScript string to inject at the very end of the HTML output. Use this call with
 * newrelic_get_browser_timing_header() to manually add browser monitoring to a webpage. If possible, New Relic
 * recommends instead enabling browser monitoring via the New Relic UI or copy/pasting the JavaScript snippet. For
 * instructions on using these options, see Browser monitoring and the PHP agent.
 *
 * If includeTags omitted or set to true, the returned JavaScript string will be enclosed in a "script"-tag.
 *
 * @link https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_get_browser_timing_footer/
 *
 * @param bool $includeTags [optional]
 *
 * @return string
 */
function newrelic_get_browser_timing_footer(bool $includeTags = true): string {}

/**
 * Returns a browser monitoring snippet to inject in the head of your HTML output.
 *
 * Returns a JavaScript string to inject in the "head"-tag of your HTML output. Use this call with
 * newrelic_get_browser_timing_footer to manually add browser monitoring to a webpage. If possible, New Relic
 * recommends instead enabling browser monitoring via the New Relic UI or copy/pasting the JavaScript snippet. For
 * instructions on using these options, see browser monitoring and PH
 *
 * If includeTags are omitted or set to true, the returned JavaScript string will be enclosed in a "script"-tag.
 *
 * @link https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_get_browser_timing_header/
 *
 * @param bool $includeTags
 *
 * @return string
 */
function newrelic_get_browser_timing_header(bool $includeTags = true): string {}

/**
 * Ignore the current transaction when calculating Apdex.
 *
 * Ignores the current transaction when calculating your Apdex score. This is useful when you have either very short
 * or very long transactions (such as file downloads) that can skew your Apdex score.
 *
 * @link https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_ignore_apdex/
 *
 * @return void
 */
function newrelic_ignore_apdex(): void {}

/**
 * Do not instrument the current transaction.
 *
 * Do not generate data for this transaction. This is useful when you have transactions that are particularly slow for
 * known reasons and you do not want them frequently generating transaction traces or skewing your site averages.
 *
 * @link https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_ignore_transaction/
 *
 * @return void
 */
function newrelic_ignore_transaction(): void {}

/**
 * Set custom name for current transaction.
 *
 * Sets the name of the transaction to the specified name. This can be useful if you have implemented your own
 * dispatching scheme and want to name transactions according to their purpose. Call this function as early as
 * possible.
 *
 * IMPORTANT: Do not use brackets [suffix] at the end of your transaction name. New Relic automatically strips
 * brackets from the name. Instead, use parentheses (suffix) or other symbols if needed.
 *
 * Unique values like URLs, Page Titles, Hex Values, Session IDs, and uniquely identifiable values should not be used
 * in naming your transactions. Instead, add that data to the transaction as a custom parameter with the
 * newrelic_add_custom_parameter() call.
 *
 * IMPORTANT: Do not create more than 1000 unique transaction names (for example, avoid naming by URL if possible).
 * This will make your charts less useful, and you may run into limits New Relic sets on the number of unique
 * transaction names per account. It also can slow down the performance of your application.
 *
 * Returns true if the transaction name was successfully changed. If false is returned, check the agent log for more
 * information.
 *
 * @link https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_name_transaction/
 *
 * @param string $name Name of the transaction.
 *
 * @return bool
 */
function newrelic_name_transaction(string $name): bool {}

/**
 * Use these calls to collect errors that the PHP agent does not collect automatically and to set the callback for
 * your own error and exception handler.
 *
 * CAUTION: If you include an exception ($e), there are differences depending on the PHP version you are using:
 * - PHP version 5 or lower: You must pass a valid PHP Exception class.
 * - PHP version 7 or higher: You must pass a valid PHP Throwable interface.
 *
 * The PHP agent handles PHP errors and exceptions automatically for supported frameworks. If you want to collect
 * errors that are not handled automatically so that you can query for those errors in New Relic and view error
 * traces, you can use newrelic_notice_error.
 *
 * If you want to use your own error and exception handlers, you can set newrelic_notice_error as the callback.
 *
 * This function can handle a variable number of parameters. You can pass-in 1 or 5 parameters, depending on your use
 * case:
 * - newrelic_notice_error(string $message)
 * - newrelic_notice_error(Throwable|Exception $e)
 * - newrelic_notice_error(string $errstr, Throwable|Exception $e)
 * - newrelic_notice_error(int $errno, string $errstr, string $errfile, int $errline, string $errcontext)
 *
 * @link  https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_notice_error/
 * @since 2.6
 *
 * @param string|Throwable|Exception|int  $messageOrExceptionOrCode Either an error message, an exception object, or
 *                                                                 an
 *                                                                 integer error code
 * @param string|Throwable|Exception|null $errstrOrException       [optional] Required if first argument is an
 *                                                                 integer, Provide an error message that will be
 *                                                                 meaningful to you when it displays in error
 *                                                                 traces or an exception object.
 * @param string|null                     $errfile                  [optional] The name of the file that the error
 *                                                                 occurred in.
 * @param int|null                        $errline                  [optional] The line number where the error
 *                                                                 occurred.
 * @param string|null                     $errcontext               [optional] An array that points to the symbol
 *                                                                 table
 *                                                                 that was active when the error occurred.
 *
 * @return null
 */
function newrelic_notice_error(
    string|Throwable|Exception|int $messageOrExceptionOrCode,
    string|Throwable|Exception $errstrOrException = null,
    string $errfile = null,
    int $errline = null,
    string $errcontext = null
) {}

/**
 * Record a custom event with the given name and attributes
 *
 * Records a custom event for use in New Relic. For more information, see Inserting custom events with the PHP agent.
 *
 * TIP: When creating custom events, follow these rules:
 *
 * - The agent records a maximum of 10,000 events per minute. Limit the number of unique event type names that you
 * create, and do not generate these names dynamically.
 * - Avoid using reserved words and characters for the event and
 * attributes names.
 * - Ensure you do not exceed the event size and rate restrictions.
 *
 * @link  https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_record_custom_event/
 * @see   https://docs.newrelic.com/docs/telemetry-data-platform/custom-data/custom-events/apm-report-custom-events-attributes/
 * @since 4.18.0.89
 *
 * @param string $name       Name of the custom event.
 * @param array  $attributes Supply custom attributes as an associative array. Supply the attribute names as keys of
 *                           up to 255 characters, and supply the values as scalar values. Arrays and objects are not
 *                           supported.
 *
 * @return void
 */
function newrelic_record_custom_event(string $name, array $attributes): void {}

/**
 * Set the New Relic application name, which the New Relic UI uses to connect your data to the correct application.
 *
 * The recommended and preferred method for setting the New Relic application name is to use global or per-directory
 * INI settings to associate your application to the desired name at the start of execution.
 *
 * If you cannot edit your agent config file (for example, many shared hosting environments do not allow you to edit
 * config files), the newrelic_set_appname API call can be used to configure app name, license key (optional, for if
 * you use multiple accounts), and a true/false flag (optional, to determine whether to keep or discard previously
 * recorded data). To ensure maximal APM trace continuity, call this as early as possible. This API call will discard
 * all current transaction data and start a new transaction after it has reconnected with the given app name.
 *
 * For other app-naming options, see Name your PHP application. When possible, INI-based solutions are recommended.
 *
 * New Relic highly recommends that you call this function as soon as possible and in as shallow of a call stack as
 * possible. Applications are discrete entities in APM, and discontinuity of transaction traces is inherent to this
 * method's usage. After connecting with the new app name, the new transactions start reporting to the new application
 * without the context of the previous application or the data that has been reported to it.
 *
 * This method is intended to be called once, as each call to the API (even with the same app name) will cause the
 * current transaction data to be discarded and lead to further discontinuity of transaction traces.
 *
 * This function can be called with 1 to 3 parameters:
 * - newrelic_set_appname(string $name)
 * - newrelic_set_appname(string $name, string $license[, bool $xmit])
 *
 *
 * @link   https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_set_appname/
 * @since  3.1.5.111
 *
 * @param string $name    Name(s) of app metrics should be reported under in New Relic user interface. Uses the same
 *                        format as newrelic.appname and can set multiple application names by separating each with a
 *                        semi-colon ;.
 * @param string $license [optional] Required if you use multiple accounts
 * @param bool   $xmit    [optional] If false or omitted, the agent discards the current transaction and all data
 *                        captured up to this call is lost. If true, the agent sends the data that was gathered right
 *                        before executing this call. The data is associated with the old app name. This has a very
 *                        slight performance impact as it takes a few milliseconds for the agent to dump its data.
 *
 * @return bool Will return true if the application name was successfully changed.
 */
function newrelic_set_appname(string $name, string $license, bool $xmit = false): bool {}

/**
 * Create user-related custom attributes. newrelic_add_custom_parameter is more flexible.
 *
 * TIP: This call only allows you to assign values to pre-existing keys. For a more flexible method to create
 * key/value pairs, use newrelic_add_custom_parameter.
 *
 * As of release 4.4, calling newrelic_set_user_attributes("a", "b", "c"); is equivalent to calling
 * newrelic_add_custom_parameter("user", "a"); newrelic_add_custom_parameter("account", "b");
 * newrelic_add_custom_parameter("product", "c"); All three parameters are required, but they may be empty strings.
 *
 * @link  https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_set_user_attributes/
 * @since 3.1.5.111
 *
 * @param string $user_value    Specify a name or username to associate with this page view. This value is assigned
 *                              to
 *                              the user key.
 * @param string $account_value Specify the name of a user account to associate with this page view. This value is
 *                              assigned to the account key.
 * @param string $product_value Specify the name of a product to associate with this page view. This value is
 *                              assigned
 *                              to the product key.
 *
 * @return bool
 */
function newrelic_set_user_attributes(string $user_value, string $account_value, string $product_value): bool {}

/**
 * Start a new transaction manually. Usually used after manually ending a transaction with
 * newrelic_end_transaction(),
 * for example when separating tasks in a job queue manager. When instrumenting this new transaction, the agent
 * performs the same operations as when the script first started.
 *
 * This function will return true if the transaction was successfully started.
 *
 * @link  https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_start_transaction/
 * @since 3.0.5.95
 *
 * @param string      $appname The application name to associate with data from this transaction. Uses the same
 *                             format
 *                             as newrelic.appname and can set multiple application names by separating each with a
 *                             semicolon
 *                             ;. While this option is required, you can read the app name from newrelic.ini with
 *                             ini_get("newrelic.appname").
 * @param string|null $license [optional] Defaults to the license key set in the New Relic agent's newrelic.ini file.
 *                             Provide a different license key if you want the transaction to report to a different
 *                             New Relic account. If set, this license will supersede all per-directory and global
 *                             default licenses configured in INI files.
 *
 * @return bool
 */
function newrelic_start_transaction(string $appname, string $license = null): bool {}

/**
 * Records a datastore segment.
 *
 * Datastore segments appear in the Breakdown table and Databases tab of the Transactions
 * page in the New Relic UI. This function allows an unsupported datastore to be instrumented in the same way as the
 * PHP agent automatically instruments its supported datastores.
 *
 * The supported keys in the $parameters array are as follows:
 * - product: (string) Required. The name of the datastore product being used: for example, MySQL to indicate that
 * the
 * segment represents a query against a MySQL database.
 * - collection: (string) Optional. The table or collection being used or queried against.
 * - operation: (string) Optional. The operation being performed: for example, select for an SQL SELECT query, or set
 * for a Memcached set operation. While operations may be specified with any case, New Relic suggests using lowercase
 * to better line up with the operation names used by the PHP agent's automated datastore instrumentation.
 * - host: (string) Optional. The datastore host name.
 * - portPathOrId: (string) Optional. The port or socket used to connect to the datastore.
 * - databaseName: (string) Optional. The database name or number in use.
 * - query: (string) Optional. The query that was sent to the server. For security reasons, this value is only used
 * if
 * you set product to a supported datastore. This allows the agent to correctly obfuscate the query. The supported
 * product values (which are matched in a case insensitive manner) are: MySQL, MSSQL, Oracle, Postgres, SQLite,
 * Firebird, Sybase, and Informix.
 * - inputQueryLabel: (string) Optional. The name of the ORM in use (for example: Doctrine).
 * - inputQuery: (string) Optional. The input query that was provided to the ORM. For security reasons, and as with
 * the query parameter, this value will be ignored if the product is not a supported datastore.
 *
 * @link  https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_record_datastore_segment/
 * @since 7.5.0.199
 *
 * @param callable $func The function that should be timed to create the datastore segment.
 * @param array    $parameters
 *
 * @return mixed The return value of $callback is returned. If an error occurs, false is returned, and
 * an error at the E_WARNING level will be triggered
 */
function newrelic_record_datastore_segment(callable $func, array $parameters): mixed {}

/**
 * Accepts an array of distributed trace headers.
 *
 * Distributed tracing allows you to see the path that a request takes as it travels through a distributed system.
 * When distributed tracing is enabled, use newrelic_accept_distributed_trace_headers to accept a payload of headers.
 * These include both W3C Trace Context and New Relic distributed trace headers.
 *
 * It is possible to only accept only W3C Trace Context headers and disable the New Relic Distributed Tracing header
 * via the newrelic.distributed_tracing_exclude_newrelic_header INI setting.
 *
 * Returns True if the headers were accepted successfully, otherwise returns False.
 *
 * @link    https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelicacceptdistributedtraceheaders/
 * @example https://docs.newrelic.com/docs/agents/php-agent/features/distributed-tracing-php/#manual
 * @since   9.8
 *
 * @param array  $headers        An array containing distributed tracing headers.
 * @param string $transport_type [optional] A string overriding the default transport type.
 *
 * @return bool
 */
function newrelic_accept_distributed_trace_headers(array $headers, string $transport_type = 'HTTP'): bool {}

/**
 * Accepts a distributed trace payload.
 *
 * Distributed tracing allows you to see the path that a request takes as it travels through a distributed system.
 *
 * @link       https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelicacceptdistributedtracepayload-php-agent-api/
 * @example    https://docs.newrelic.com/docs/agents/php-agent/features/distributed-tracing-php/#manual
 * @since      8.4
 * @deprecated 9.10
 *
 * @param string $payload A JSON formatted string created by using newrelic_create_distributed_trace_payload.
 *
 * @return void
 */
#[Deprecated(replacement: 'newrelic_accept_distributed_trace_headers()')]
function newrelic_accept_distributed_trace_payload(string $payload): void {}

/**
 * Accepts a distributed trace payload that includes an HTTPSafe (Base64 encoded) JSON string.
 *
 * Distributed tracing allows you to see the path that a request takes as it travels through a distributed system.
 *
 * Returns true to indicate success, or false if an error occurs.
 *
 * @link       https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelicacceptdistributedtracepayloadhttpsafe-php-agent-api/
 * @example    https://docs.newrelic.com/docs/agents/php-agent/features/distributed-tracing-php/#manual
 * @since      8.4
 * @deprecated 9.10
 *
 * @param string $httpsafe_payload An HTTPSafe (Base64 encoded) JSON string representation of the payload.
 * @param string $transport_type   [optional] A string overriding the default transport type.
 *
 * @return bool
 */
#[Deprecated(replacement: 'newrelic_accept_distributed_trace_headers()')]
function newrelic_accept_distributed_trace_payload_httpsafe(
    string $httpsafe_payload,
    string $transport_type = 'HTTP'
): bool {}

/**
 * Attaches a custom attribute (key/value pair) to the current span.
 *
 * Add a custom attribute (a key and a value data pair) to the current span. (The call name is
 * newrelic_add_custom_span_parameter because "custom attributes" were previously called "custom parameters.") For
 * example, you can add a customer's full name from your customer database. This attribute appears in any span. You
 * can also query the Span for your custom attributes.
 *
 * IMPORTANT: On spans, attributes added with newrelic_add_custom_span_parameter will take precedence over attributes
 * added with newrelic_add_custom_parameter.
 *
 * IMPORTANT: If you want to use your custom attributes, avoid using any of the reserved terms used by NRQL.
 *
 * @link  https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelicaddcustomspanparameter-php-agent-api/
 * @since 9.12.0.268
 *
 * @param string                $key   The name of the custom attribute. Only the first 255 characters are retained.
 * @param bool|float|int|string $value The value to associate with this custom attribute.
 *
 * @return bool
 */
function newrelic_add_custom_span_parameter(string $key, bool|float|int|string $value): bool {}

/**
 *Creates a distributed trace payload.
 *
 * Distributed tracing allows you to see the path that a request takes as it travels through a distributed system.
 *
 * @link       https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newreliccreatedistributedtracepayload-php-agent-api/
 * @example    https://docs.newrelic.com/docs/agents/php-agent/features/distributed-tracing-php/#manual
 * @since      8.4
 * @deprecated 9.10
 *
 * @return     newrelic\DistributedTracePayload
 */
#[Deprecated(replacement: 'newrelic_insert_distributed_trace_headers()')]
function newrelic_create_distributed_trace_payload(): newrelic\DistributedTracePayload {}

/**
 * Returns a collection of metadata necessary for linking data to a trace or an entity.
 *
 * This call returns an opaque map of key-value pairs that can be used to correlate this application to other data in
 * the New Relic backend.
 *
 * @link https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelicgetlinkingmetadata/
 *
 * @return array
 */
function newrelic_get_linking_metadata(): array {}

/**
 * Returns an associative array containing the identifiers of the current trace and the parent span.
 *
 * Returns an associative array containing the identifiers of the current trace and the parent span. This information
 * is useful for integrating with third party distributed tracing tools, such as Zipkin.
 *
 * @link https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelicgettracemetadata/
 *
 * @return array
 */
function newrelic_get_trace_metadata(): array {}

/**
 * Inserts W3C Trace Context headers and New Relic Distributed Tracing headers into an outbound array of headers.
 *
 * Use newrelic_insert_distributed_trace_headers to manually add distributed tracing headers an array of outbound
 * headers. When Distributed Tracing is enabled, newrelic_insert_distributed_trace_headers will always insert W3C
 * trace context headers. It also, by default, inserts the New Relic Distributed Tracing header, but this can be
 * disabled via the newrelic.distributed_tracing_exclude_newrelic_header INI setting.
 *
 * The $headers argument is passed by reference, and therefore must be a variable as opposed to a literal.
 *
 * @link    https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelicinsertdistributedtraceheaders/
 * @example https://docs.newrelic.com/docs/agents/php-agent/features/distributed-tracing-php/#manual
 * @since   9.8
 *
 * @param array $headers An (optionally empty) array of outbound headers.
 *
 * @return bool True if any headers were successfully inserted into the provided array, otherwise returns False
 */
function newrelic_insert_distributed_trace_headers(array $headers): bool {}

/**
 * Returns a value indicating whether or not the current transaction is marked as sampled.
 *
 * @link  https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelicissampled/
 * @since 9.3
 *
 * @return bool
 */
function newrelic_is_sampled(): bool {}
}

namespace newrelic {
  /**
   * This object has two methods that will render a distributed trace payload as text.
   *
   * @link https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newreliccreatedistributedtracepayload-php-agent-api/#return-values
   * @see newrelic_create_distributed_trace_payload()
   * @since 8.4
   */
  class DistributedTracePayload
  {
    /**
     * Renders the payload as a JSON string
     *
     * @return string
     */
    public function text(): string {}

    /**
     * Renders the payload as an string suitable for transport via HTTP (query string, POST param, HTTP headers, etc.)
     *
     * @return string
     */
    public function httpSafe(): string {}
  }
}
<?php

// Start of mysql v.1.0
// @deprecated 5.5 entire extension is deprecated in favor of mysqli
use JetBrains\PhpStorm\Deprecated;

/**
 * Open a connection to a MySQL Server
 * @link https://php.net/manual/en/function.mysql-connect.php
 * @param string $server [optional] <p>
 * The MySQL server. It can also include a port number. e.g.
 * "hostname:port" or a path to a local socket e.g. ":/path/to/socket" for
 * the localhost.
 * </p>
 * <p>
 * If the PHP directive
 * mysql.default_host is undefined (default), then the default
 * value is 'localhost:3306'. In "ini.sql.safe-mode", this parameter is ignored
 * and value 'localhost:3306' is always used.
 * </p>
 * @param string $username [optional] <p>
 * The username. Default value is defined by mysql.default_user. In
 * "ini.sql.safe-mode", this parameter is ignored and the name of the user that
 * owns the server process is used.
 * </p>
 * @param string $password [optional] <p>
 * The password. Default value is defined by mysql.default_password. In
 * "ini.sql.safe-mode", this parameter is ignored and empty password is used.
 * </p>
 * @param bool $new_link [optional] <p>
 * If a second call is made to <b>mysql_connect</b>
 * with the same arguments, no new link will be established, but
 * instead, the link identifier of the already opened link will be
 * returned. The <i>new_link</i> parameter modifies this
 * behavior and makes <b>mysql_connect</b> always open
 * a new link, even if <b>mysql_connect</b> was called
 * before with the same parameters.
 * In "ini.sql.safe-mode", this parameter is ignored.
 * </p>
 * @param int $client_flags [optional] <p>
 * The <i>client_flags</i> parameter can be a combination
 * of the following constants:
 * 128 (enable LOAD DATA LOCAL handling),
 * <b>MYSQL_CLIENT_SSL</b>,
 * <b>MYSQL_CLIENT_COMPRESS</b>,
 * <b>MYSQL_CLIENT_IGNORE_SPACE</b> or
 * <b>MYSQL_CLIENT_INTERACTIVE</b>.
 * Read the section about for further information.
 * In "ini.sql.safe-mode", this parameter is ignored.
 * </p>
 * @return resource|false a MySQL link identifier on success or false on failure.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_connect($server = 'ini_get("mysql.default_host")', $username = 'ini_get("mysql.default_user")', $password = 'ini_get("mysql.default_password")', $new_link = false, $client_flags = 0) {}

/**
 * Open a persistent connection to a MySQL server
 * @link https://php.net/manual/en/function.mysql-pconnect.php
 * @param string $server [optional] <p>
 * The MySQL server. It can also include a port number. e.g.
 * "hostname:port" or a path to a local socket e.g. ":/path/to/socket" for
 * the localhost.
 * </p>
 * <p>
 * If the PHP directive
 * mysql.default_host is undefined (default), then the default
 * value is 'localhost:3306'
 * </p>
 * @param string $username [optional] <p>
 * The username. Default value is the name of the user that owns the
 * server process.
 * </p>
 * @param string $password [optional] <p>
 * The password. Default value is an empty password.
 * </p>
 * @param int $client_flags [optional] <p>
 * The <i>client_flags</i> parameter can be a combination
 * of the following constants:
 * 128 (enable LOAD DATA LOCAL handling),
 * <b>MYSQL_CLIENT_SSL</b>,
 * <b>MYSQL_CLIENT_COMPRESS</b>,
 * <b>MYSQL_CLIENT_IGNORE_SPACE</b> or
 * <b>MYSQL_CLIENT_INTERACTIVE</b>.
 * </p>
 * @return resource|false a MySQL persistent link identifier on success, or false on
 * failure.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_pconnect($server = 'ini_get("mysql.default_host")', $username = 'ini_get("mysql.default_user")', $password = 'ini_get("mysql.default_password")', $client_flags = null) {}

/**
 * Close MySQL connection
 * @link https://php.net/manual/en/function.mysql-close.php
 * @param resource $link_identifier [optional]
 * @return bool true on success or false on failure.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_close($link_identifier = null) {}

/**
 * Select a MySQL database
 * @link https://php.net/manual/en/function.mysql-select-db.php
 * @param string $database_name <p>
 * The name of the database that is to be selected.
 * </p>
 * @param resource $link_identifier [optional]
 * @return bool true on success or false on failure.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_select_db($database_name, $link_identifier = null) {}

/**
 * Send a MySQL query
 * @link https://php.net/manual/en/function.mysql-query.php
 * @param string $query <p>
 * An SQL query
 * </p>
 * <p>
 * The query string should not end with a semicolon.
 * Data inside the query should be properly escaped.
 * </p>
 * @param resource $link_identifier [optional]
 * @return resource|bool For SELECT, SHOW, DESCRIBE, EXPLAIN and other statements returning resultset,
 * <b>mysql_query</b>
 * returns a resource on success, or false on
 * error.
 * </p>
 * <p>
 * For other type of SQL statements, INSERT, UPDATE, DELETE, DROP, etc,
 * <b>mysql_query</b> returns true on success
 * or false on error.
 * </p>
 * <p>
 * The returned result resource should be passed to
 * <b>mysql_fetch_array</b>, and other
 * functions for dealing with result tables, to access the returned data.
 * </p>
 * <p>
 * Use <b>mysql_num_rows</b> to find out how many rows
 * were returned for a SELECT statement or
 * <b>mysql_affected_rows</b> to find out how many
 * rows were affected by a DELETE, INSERT, REPLACE, or UPDATE
 * statement.
 * </p>
 * <p>
 * <b>mysql_query</b> will also fail and return false
 * if the user does not have permission to access the table(s) referenced by
 * the query.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_query($query, $link_identifier = null) {}

/**
 * @deprecated 5.5
 * Send an SQL query to MySQL without fetching and buffering the result rows.
 * @link https://php.net/manual/en/function.mysql-unbuffered-query.php
 * @param string $query <p>
 * The SQL query to execute.
 * </p>
 * <p>
 * Data inside the query should be properly escaped.
 * </p>
 * @param resource $link_identifier [optional]
 * @return resource|bool For SELECT, SHOW, DESCRIBE or EXPLAIN statements,
 * <b>mysql_unbuffered_query</b>
 * returns a resource on success, or false on
 * error.
 * </p>
 * <p>
 * For other type of SQL statements, UPDATE, DELETE, DROP, etc,
 * <b>mysql_unbuffered_query</b> returns true on success
 * or false on error.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_unbuffered_query($query, $link_identifier = null) {}

/**
 * Selects a database and executes a query on it
 * @link https://php.net/manual/en/function.mysql-db-query.php
 * @param string $database <p>
 * The name of the database that will be selected.
 * </p>
 * @param string $query <p>
 * The MySQL query.
 * </p>
 * <p>
 * Data inside the query should be properly escaped.
 * </p>
 * @param resource $link_identifier [optional]
 * @return resource|bool a positive MySQL result resource to the query result,
 * or false on error. The function also returns true/false for
 * INSERT/UPDATE/DELETE
 * queries to indicate success/failure.
 * @removed 7.0
 * @see mysql_select_db()
 * @see mysql_query()
 */
#[Deprecated('Use mysql_select_db() and mysql_query() instead', since: '5.3')]
function mysql_db_query($database, $query, $link_identifier = null) {}

/**
 * List databases available on a MySQL server
 * @link https://php.net/manual/en/function.mysql-list-dbs.php
 * @param resource $link_identifier [optional]
 * @return resource|false a result pointer resource on success, or false on
 * failure. Use the <b>mysql_tablename</b> function to traverse
 * this result pointer, or any function for result tables, such as
 * <b>mysql_fetch_array</b>.
 * @removed 7.0
 */
#[Deprecated(since: '5.4')]
function mysql_list_dbs($link_identifier = null) {}

/**
 * List tables in a MySQL database
 * @link https://php.net/manual/en/function.mysql-list-tables.php
 * @param string $database <p>
 * The name of the database
 * </p>
 * @param resource $link_identifier [optional]
 * @return resource|false A result pointer resource on success or false on failure.
 * <p>
 * Use the <b>mysql_tablename</b> function to
 * traverse this result pointer, or any function for result tables,
 * such as <b>mysql_fetch_array</b>.
 * </p>
 * @removed 7.0
 */
#[Deprecated(since: '5.3')]
function mysql_list_tables($database, $link_identifier = null) {}

/**
 * List MySQL table fields
 * @link https://php.net/manual/en/function.mysql-list-fields.php
 * @param string $database_name <p>
 * The name of the database that's being queried.
 * </p>
 * @param string $table_name <p>
 * The name of the table that's being queried.
 * </p>
 * @param resource $link_identifier [optional]
 * @return resource|false A result pointer resource on success, or false on
 * failure.
 * </p>
 * <p>
 * The returned result can be used with <b>mysql_field_flags</b>,
 * <b>mysql_field_len</b>,
 * <b>mysql_field_name</b>
 * <b>mysql_field_type</b>.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_list_fields($database_name, $table_name, $link_identifier = null) {}

/**
 * List MySQL processes
 * @link https://php.net/manual/en/function.mysql-list-processes.php
 * @param resource $link_identifier [optional]
 * @return resource|false A result pointer resource on success or false on failure.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_list_processes($link_identifier = null) {}

/**
 * Returns the text of the error message from previous MySQL operation
 * @link https://php.net/manual/en/function.mysql-error.php
 * @param resource $link_identifier [optional]
 * @return string the error text from the last MySQL function, or
 * '' (empty string) if no error occurred.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_error($link_identifier = null) {}

/**
 * Returns the numerical value of the error message from previous MySQL operation
 * @link https://php.net/manual/en/function.mysql-errno.php
 * @param resource $link_identifier [optional]
 * @return int the error number from the last MySQL function, or
 * 0 (zero) if no error occurred.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_errno($link_identifier = null) {}

/**
 * Get number of affected rows in previous MySQL operation
 * @link https://php.net/manual/en/function.mysql-affected-rows.php
 * @param resource $link_identifier [optional]
 * @return int the number of affected rows on success, and -1 if the last query
 * failed.
 * </p>
 * <p>
 * If the last query was a DELETE query with no WHERE clause, all
 * of the records will have been deleted from the table but this
 * function will return zero with MySQL versions prior to 4.1.2.
 * </p>
 * <p>
 * When using UPDATE, MySQL will not update columns where the new value is the
 * same as the old value. This creates the possibility that
 * <b>mysql_affected_rows</b> may not actually equal the number
 * of rows matched, only the number of rows that were literally affected by
 * the query.
 * </p>
 * <p>
 * The REPLACE statement first deletes the record with the same primary key
 * and then inserts the new record. This function returns the number of
 * deleted records plus the number of inserted records.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_affected_rows($link_identifier = null) {}

/**
 * Get the ID generated in the last query
 * @link https://php.net/manual/en/function.mysql-insert-id.php
 * @param resource $link_identifier [optional]
 * @return int The ID generated for an AUTO_INCREMENT column by the previous
 * query on success, 0 if the previous
 * query does not generate an AUTO_INCREMENT value, or false if
 * no MySQL connection was established.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_insert_id($link_identifier = null) {}

/**
 * Get result data
 * @link https://php.net/manual/en/function.mysql-result.php
 * @param resource $result
 * @param int $row <p>
 * The row number from the result that's being retrieved. Row numbers
 * start at 0.
 * </p>
 * @param mixed $field [optional] <p>
 * The name or offset of the field being retrieved.
 * </p>
 * <p>
 * It can be the field's offset, the field's name, or the field's table
 * dot field name (tablename.fieldname). If the column name has been
 * aliased ('select foo as bar from...'), use the alias instead of the
 * column name. If undefined, the first field is retrieved.
 * </p>
 * @return string The contents of one cell from a MySQL result set on success, or
 * false on failure.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_result($result, $row, $field = 0) {}

/**
 * Get number of rows in result
 * @link https://php.net/manual/en/function.mysql-num-rows.php
 * @param resource $result <p>The result resource that is being evaluated. This result comes from a call to mysql_query().</p>
 * @return int|false <p>The number of rows in the result set on success or FALSE on failure. </p>
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_num_rows($result) {}

/**
 * Get number of fields in result
 * @link https://php.net/manual/en/function.mysql-num-fields.php
 * @param resource $result
 * @return int the number of fields in the result set resource on
 * success or false on failure.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_num_fields($result) {}

/**
 * Get a result row as an enumerated array
 * @link https://php.net/manual/en/function.mysql-fetch-row.php
 * @param resource $result
 * @return array an numerical array of strings that corresponds to the fetched row, or
 * false if there are no more rows.
 * </p>
 * <p>
 * <b>mysql_fetch_row</b> fetches one row of data from
 * the result associated with the specified result identifier. The
 * row is returned as an array. Each result column is stored in an
 * array offset, starting at offset 0.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_fetch_row($result) {}

/**
 * Fetch a result row as an associative array, a numeric array, or both
 * @link https://php.net/manual/en/function.mysql-fetch-array.php
 * @param resource $result
 * @param int $result_type [optional] <p>
 * The type of array that is to be fetched. It's a constant and can
 * take the following values: <b>MYSQL_ASSOC</b>,
 * <b>MYSQL_NUM</b>, and
 * <b>MYSQL_BOTH</b>.
 * </p>
 * @return array|false an array of strings that corresponds to the fetched row, or false
 * if there are no more rows. The type of returned array depends on
 * how <i>result_type</i> is defined. By using
 * <b>MYSQL_BOTH</b> (default), you'll get an array with both
 * associative and number indices. Using <b>MYSQL_ASSOC</b>, you
 * only get associative indices (as <b>mysql_fetch_assoc</b>
 * works), using <b>MYSQL_NUM</b>, you only get number indices
 * (as <b>mysql_fetch_row</b> works).
 * </p>
 * <p>
 * If two or more columns of the result have the same field names,
 * the last column will take precedence. To access the other column(s)
 * of the same name, you must use the numeric index of the column or
 * make an alias for the column. For aliased columns, you cannot
 * access the contents with the original column name.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_fetch_array($result, $result_type = MYSQL_BOTH) {}

/**
 * Fetch a result row as an associative array
 * @link https://php.net/manual/en/function.mysql-fetch-assoc.php
 * @param resource $result
 * @return array an associative array of strings that corresponds to the fetched row, or
 * false if there are no more rows.
 * </p>
 * <p>
 * If two or more columns of the result have the same field names,
 * the last column will take precedence. To access the other
 * column(s) of the same name, you either need to access the
 * result with numeric indices by using
 * <b>mysql_fetch_row</b> or add alias names.
 * See the example at the <b>mysql_fetch_array</b>
 * description about aliases.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_fetch_assoc($result) {}

/**
 * @template T
 *
 * Fetch a result row as an object
 * @link https://php.net/manual/en/function.mysql-fetch-object.php
 * @param resource $result
 * @param class-string<T> $class_name [optional] <p>
 * The name of the class to instantiate, set the properties of and return.
 * If not specified, a <b>stdClass</b> object is returned.
 * </p>
 * @param array $params [optional] <p>
 * An optional array of parameters to pass to the constructor
 * for <i>class_name</i> objects.
 * </p>
 * @return T|stdClass an object with string properties that correspond to the
 * fetched row, or false if there are no more rows.
 * </p>
 * <p>
 * mysql_fetch_row fetches one row of data from
 * the result associated with the specified result identifier. The
 * row is returned as an array. Each result column is stored in an
 * array offset, starting at offset 0.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_fetch_object($result, $class_name = 'stdClass', array $params = null) {}

/**
 * Move internal result pointer
 * @link https://php.net/manual/en/function.mysql-data-seek.php
 * @param resource $result
 * @param int $row_number <p>
 * The desired row number of the new result pointer.
 * </p>
 * @return bool true on success or false on failure.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_data_seek($result, $row_number) {}

/**
 * Get the length of each output in a result
 * @link https://php.net/manual/en/function.mysql-fetch-lengths.php
 * @param resource $result
 * @return array|false An array of lengths on success or false on failure.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_fetch_lengths($result) {}

/**
 * Get column information from a result and return as an object
 * @link https://php.net/manual/en/function.mysql-fetch-field.php
 * @param resource $result
 * @param int $field_offset [optional] <p>
 * The numerical field offset. If the field offset is not specified, the
 * next field that was not yet retrieved by this function is retrieved.
 * The <i>field_offset</i> starts at 0.
 * </p>
 * @return object an object containing field information. The properties
 * of the object are:
 * </p>
 * <p>
 * name - column name
 * table - name of the table the column belongs to
 * def - default value of the column
 * max_length - maximum length of the column
 * not_null - 1 if the column cannot be null
 * primary_key - 1 if the column is a primary key
 * unique_key - 1 if the column is a unique key
 * multiple_key - 1 if the column is a non-unique key
 * numeric - 1 if the column is numeric
 * blob - 1 if the column is a BLOB
 * type - the type of the column
 * unsigned - 1 if the column is unsigned
 * zerofill - 1 if the column is zero-filled
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_fetch_field($result, $field_offset = 0) {}

/**
 * Set result pointer to a specified field offset
 * @link https://php.net/manual/en/function.mysql-field-seek.php
 * @param resource $result
 * @param int $field_offset
 * @return bool true on success or false on failure.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_field_seek($result, $field_offset) {}

/**
 * Free result memory
 * @link https://php.net/manual/en/function.mysql-free-result.php
 * @param resource $result
 * @return bool true on success or false on failure.
 * <p>
 * If a non-resource is used for the result, an
 * error of level E_WARNING will be emitted. It's worth noting that
 * mysql_query only returns a resource
 * for SELECT, SHOW, EXPLAIN, and DESCRIBE queries.
 * </p>
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_free_result($result) {}

/**
 * Get the name of the specified field in a result
 * @link https://php.net/manual/en/function.mysql-field-name.php
 * @param resource $result
 * @param int $field_offset
 * @return string|false The name of the specified field index on success or false on failure.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_field_name($result, $field_offset) {}

/**
 * Get name of the table the specified field is in
 * @link https://php.net/manual/en/function.mysql-field-table.php
 * @param resource $result
 * @param int $field_offset
 * @return string The name of the table on success.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_field_table($result, $field_offset) {}

/**
 * Returns the length of the specified field
 * @link https://php.net/manual/en/function.mysql-field-len.php
 * @param resource $result
 * @param int $field_offset
 * @return int|false The length of the specified field index on success or false on failure.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_field_len($result, $field_offset) {}

/**
 * Get the type of the specified field in a result
 * @link https://php.net/manual/en/function.mysql-field-type.php
 * @param resource $result
 * @param int $field_offset
 * @return string The returned field type
 * will be one of "int", "real",
 * "string", "blob", and others as
 * detailed in the MySQL
 * documentation.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_field_type($result, $field_offset) {}

/**
 * Get the flags associated with the specified field in a result
 * @link https://php.net/manual/en/function.mysql-field-flags.php
 * @param resource $result
 * @param int $field_offset
 * @return string|false a string of flags associated with the result or false on failure.
 * <p>
 * The following flags are reported, if your version of MySQL
 * is current enough to support them: "not_null",
 * "primary_key", "unique_key",
 * "multiple_key", "blob",
 * "unsigned", "zerofill",
 * "binary", "enum",
 * "auto_increment" and "timestamp".
 * </p>
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_field_flags($result, $field_offset) {}

/**
 * Escapes a string for use in a mysql_query
 * @link https://php.net/manual/en/function.mysql-escape-string.php
 * @param string $unescaped_string <p>
 * The string that is to be escaped.
 * </p>
 * @return string the escaped string.
 * @removed 7.0
 */
#[Deprecated(replacement: 'mysql_real_escape_string(%parameter0%)', since: '5.3')]
function mysql_escape_string($unescaped_string) {}

/**
 * Escapes special characters in a string for use in an SQL statement
 * @link https://php.net/manual/en/function.mysql-real-escape-string.php
 * @param string $unescaped_string <p>
 * The string that is to be escaped.
 * </p>
 * @param resource $link_identifier [optional]
 * @return string|false the escaped string, or false on error.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_real_escape_string($unescaped_string, $link_identifier = null) {}

/**
 * Get current system status
 * @link https://php.net/manual/en/function.mysql-stat.php
 * @param resource $link_identifier [optional]
 * @return string a string with the status for uptime, threads, queries, open tables,
 * flush tables and queries per second. For a complete list of other status
 * variables, you have to use the SHOW STATUS SQL command.
 * If <i>link_identifier</i> is invalid, null is returned.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_stat($link_identifier = null) {}

/**
 * Return the current thread ID
 * @link https://php.net/manual/en/function.mysql-thread-id.php
 * @param resource $link_identifier [optional]
 * @return int|false The thread ID on success or false on failure.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_thread_id($link_identifier = null) {}

/**
 * Returns the name of the character set
 * @link https://php.net/manual/en/function.mysql-client-encoding.php
 * @param resource $link_identifier [optional]
 * @return string the default character set name for the current connection.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_client_encoding($link_identifier = null) {}

/**
 * Ping a server connection or reconnect if there is no connection
 * @link https://php.net/manual/en/function.mysql-ping.php
 * @param resource $link_identifier [optional]
 * @return bool true if the connection to the server MySQL server is working,
 * otherwise false.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_ping($link_identifier = null) {}

/**
 * Get MySQL client info
 * @link https://php.net/manual/en/function.mysql-get-client-info.php
 * @return string The MySQL client version.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_get_client_info() {}

/**
 * Get MySQL host info
 * @link https://php.net/manual/en/function.mysql-get-host-info.php
 * @param resource $link_identifier [optional]
 * @return string a string describing the type of MySQL connection in use for the
 * connection or false on failure.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_get_host_info($link_identifier = null) {}

/**
 * Get MySQL protocol info
 * @link https://php.net/manual/en/function.mysql-get-proto-info.php
 * @param resource $link_identifier [optional]
 * @return int|false the MySQL protocol on success or false on failure.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_get_proto_info($link_identifier = null) {}

/**
 * Get MySQL server info
 * @link https://php.net/manual/en/function.mysql-get-server-info.php
 * @param resource $link_identifier [optional]
 * @return string|false the MySQL server version on success or false on failure.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_get_server_info($link_identifier = null) {}

/**
 * Get information about the most recent query
 * @link https://php.net/manual/en/function.mysql-info.php
 * @param resource $link_identifier [optional]
 * @return string|false information about the statement on success, or false on
 * failure. See the example below for which statements provide information,
 * and what the returned value may look like. Statements that are not listed
 * will return false.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_info($link_identifier = null) {}

/**
 * Sets the client character set
 * @link https://php.net/manual/en/function.mysql-set-charset.php
 * @param string $charset <p>
 * A valid character set name.
 * </p>
 * @param resource $link_identifier [optional]
 * @return bool true on success or false on failure.
 * @since 5.2.3
 * @removed 7.0
 * @see mysqli_set_charset()
 */
#[Deprecated(replacement: 'Use mysqli_set_charset instead', since: '5.5')]
function mysql_set_charset($charset, $link_identifier = null) {}

/**
 * @param $database_name
 * @param $query
 * @param $link_identifier [optional]
 * @removed 7.0
 */
#[Deprecated(replacement: "mysql_db_query(%parametersList%)", since: '5.3')]
function mysql($database_name, $query, $link_identifier) {}

/**
 * @param $result
 * @param $field_index
 * @removed 7.0
 */
#[Deprecated(replacement: 'mysql_field_name(%parametersList%)', since: '5.5')]
function mysql_fieldname($result, $field_index) {}

/**
 * @param $result
 * @param $field_offset
 * @removed 7.0
 */
#[Deprecated(replacement: 'mysql_field_table(%parametersList%)', since: '5.5')]
function mysql_fieldtable($result, $field_offset) {}

/**
 * @param $result
 * @param $field_offset
 * @removed 7.0
 */
#[Deprecated(replacement: 'mysql_field_len(%parametersList%)', since: '5.5')]
function mysql_fieldlen($result, $field_offset) {}

/**
 * @param $result
 * @param $field_offset
 * @removed 7.0
 */
#[Deprecated(replacement: 'mysql_field_type(%parametersList%)', since: '5.5')]
function mysql_fieldtype($result, $field_offset) {}

/**
 * @param $result
 * @param $field_offset
 * @removed 7.0
 */
#[Deprecated(replacement: 'mysql_field_flags(%parametersList%)', since: '5.5')]
function mysql_fieldflags($result, $field_offset) {}

/**
 * @param $database_name
 * @param $link_identifier [optional]
 * @removed 7.0
 */
#[Deprecated(replacement: 'mysql_select_db(%parametersList%)', since: '5.5')]
function mysql_selectdb($database_name, $link_identifier) {}

/**
 * @param $result
 * @removed 7.0
 */
#[Deprecated(replacement: 'mysql_free_result(%parametersList%)', since: '5.5')]
function mysql_freeresult($result) {}

/**
 * @param $result
 * @removed 7.0
 */
#[Deprecated(replacement: 'mysql_num_fields(%parametersList%)', since: '5.5')]
function mysql_numfields($result) {}

/**
 * (PHP 4, PHP 5)
 * Alias of mysql_num_rows()
 * @link https://php.net/manual/en/function.mysql-num-rows.php
 * @param resource $result <p>The result resource that is being evaluated. This result comes from a call to mysql_query().</p>
 * @return int|false <p>The number of rows in the result set on success or FALSE on failure. </p>
 * @removed 7.0
 */
#[Deprecated(replacement: 'mysql_num_rows(%parametersList%)', since: '5.5')]
function mysql_numrows($result) {}

/**
 * @param $link_identifier [optional]
 * @removed 7.0
 */
#[Deprecated(replacement: 'mysql_list_dbs(%parametersList%)', since: '5.5')]
function mysql_listdbs($link_identifier) {}

/**
 * @param $database_name
 * @param $link_identifier [optional]
 * @removed 7.0
 */
#[Deprecated(replacement: 'mysql_list_tables(%parametersList%)', since: '5.5')]
function mysql_listtables($database_name, $link_identifier) {}

/**
 * @param $database_name
 * @param $table_name
 * @param $link_identifier [optional]
 * @removed 7.0
 */
#[Deprecated(replacement: 'mysql_list_fields(%parametersList%)', since: '5.5')]
function mysql_listfields($database_name, $table_name, $link_identifier) {}

/**
 * Retrieves database name from the call to {@see mysql_list_dbs}
 * @link https://php.net/manual/en/function.mysql-db-name.php
 * @param resource $result <p>
 * The result pointer from a call to <b>mysql_list_dbs</b>.
 * </p>
 * @param int $row <p>
 * The index into the result set.
 * </p>
 * @param mixed $field [optional] <p>
 * The field name.
 * </p>
 * @return string|false the database name on success, and false on failure. If false
 * is returned, use <b>mysql_error</b> to determine the nature
 * of the error.
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_db_name($result, $row, $field = null) {}

/**
 * @param $result
 * @param $row
 * @param $field [optional]
 * @removed 7.0
 */
#[Deprecated(replacement: 'mysql_db_name(%parametersList%)', since: '5.5')]
function mysql_dbname($result, $row, $field) {}

/**
 * Get table name of field
 * @link https://php.net/manual/en/function.mysql-tablename.php
 * @param resource $result <p>
 * A result pointer resource that's returned from
 * <b>mysql_list_tables</b>.
 * </p>
 * @param int $i <p>
 * The integer index (row/table number)
 * </p>
 * @return string|false The name of the table on success or false on failure.
 * <p>
 * Use the <b>mysql_tablename</b> function to
 * traverse this result pointer, or any function for result tables,
 * such as <b>mysql_fetch_array</b>.
 * </p>
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_tablename($result, $i) {}

/**
 * @param $result
 * @param $row
 * @param $field [optional]
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mysql_table_name($result, $row, $field) {}

/**
 * Columns are returned into the array having the fieldname as the array
 * index.
 * @link https://php.net/manual/en/mysql.constants.php
 * @deprecated 5.5
 * @removed 7.0
 */
define('MYSQL_ASSOC', 1);

/**
 * Columns are returned into the array having a numerical index to the
 * fields. This index starts with 0, the first field in the result.
 * @link https://php.net/manual/en/mysql.constants.php
 * @deprecated 5.5
 * @removed 7.0
 */
define('MYSQL_NUM', 2);

/**
 * Columns are returned into the array having both a numerical index
 * and the fieldname as the array index.
 * @link https://php.net/manual/en/mysql.constants.php
 * @deprecated 5.5
 * @removed 7.0
 */
define('MYSQL_BOTH', 3);

/**
 * Use compression protocol
 * @link https://php.net/manual/en/mysql.constants.php
 * @deprecated 5.5
 * @removed 7.0
 */
define('MYSQL_CLIENT_COMPRESS', 32);

/**
 * Use SSL encryption. This flag is only available with version 4.x
 * of the MySQL client library or newer. Version 3.23.x is bundled both
 * with PHP 4 and Windows binaries of PHP 5.
 * @link https://php.net/manual/en/mysql.constants.php
 * @deprecated 5.5
 * @removed 7.0
 */
define('MYSQL_CLIENT_SSL', 2048);

/**
 * Allow interactive_timeout seconds (instead of wait_timeout) of
 * inactivity before closing the connection.
 * @link https://php.net/manual/en/mysql.constants.php
 * @deprecated 5.5
 * @removed 7.0
 */
define('MYSQL_CLIENT_INTERACTIVE', 1024);

/**
 * Allow space after function names
 * @link https://php.net/manual/en/mysql.constants.php
 * @deprecated 5.5
 * @removed 7.0
 */
define('MYSQL_CLIENT_IGNORE_SPACE', 256);

// End of mysql v.1.0
<?php

// Start of sqlite3 v.0.7-dev
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;

/**
 * A class that interfaces SQLite 3 databases.
 * @link https://php.net/manual/en/class.sqlite3.php
 */
class SQLite3
{
    public const OK = 0;
    public const DENY = 1;
    public const IGNORE = 2;
    public const CREATE_INDEX = 1;
    public const CREATE_TABLE = 2;
    public const CREATE_TEMP_INDEX = 3;
    public const CREATE_TEMP_TABLE = 4;
    public const CREATE_TEMP_TRIGGER = 5;
    public const CREATE_TEMP_VIEW = 6;
    public const CREATE_TRIGGER = 7;
    public const CREATE_VIEW = 8;
    public const DELETE = 9;
    public const DROP_INDEX = 10;
    public const DROP_TABLE = 11;
    public const DROP_TEMP_INDEX = 12;
    public const DROP_TEMP_TABLE = 13;
    public const DROP_TEMP_TRIGGER = 14;
    public const DROP_TEMP_VIEW = 15;
    public const DROP_TRIGGER = 16;
    public const DROP_VIEW = 17;
    public const INSERT = 18;
    public const PRAGMA = 19;
    public const READ = 20;
    public const SELECT = 21;
    public const TRANSACTION = 22;
    public const UPDATE = 23;
    public const ATTACH = 24;
    public const DETACH = 25;
    public const ALTER_TABLE = 26;
    public const REINDEX = 27;
    public const ANALYZE = 28;
    public const CREATE_VTABLE = 29;
    public const DROP_VTABLE = 30;
    public const FUNCTION = 31;
    public const SAVEPOINT = 32;
    public const COPY = 0;
    public const RECURSIVE = 33;

    /**
     * Opens an SQLite database
     * @link https://php.net/manual/en/sqlite3.open.php
     * @param string $filename <p>
     * Path to the SQLite database, or :memory: to use in-memory database.
     * </p>
     * @param int $flags <p>
     * Optional flags used to determine how to open the SQLite database. By
     * default, open uses SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE.
     * </p>
     * <p>
     * SQLITE3_OPEN_READONLY: Open the database for
     * reading only.
     * </p>
     * @param string $encryptionKey <p>
     * An optional encryption key used when encrypting and decrypting an
     * SQLite database.
     * </p>
     * @return void No value is returned.
     */
    #[TentativeType]
    public function open(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename,
        #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $flags,
        #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $encryptionKey,
        #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = SQLITE3_OPEN_READWRITE|SQLITE3_OPEN_CREATE,
        #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $encryptionKey = null
    ): void {}

    /**
     * Closes the database connection
     * @link https://php.net/manual/en/sqlite3.close.php
     * @return bool <b>TRUE</b> on success, <b>FALSE</b> on failure.
     */
    public function close() {}

    /**
     * Executes a result-less query against a given database
     * @link https://php.net/manual/en/sqlite3.exec.php
     * @param string $query <p>
     * The SQL query to execute (typically an INSERT, UPDATE, or DELETE
     * query).
     * </p>
     * @return bool <b>TRUE</b> if the query succeeded, <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function exec(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $query): bool {}

    /**
     * Returns the SQLite3 library version as a string constant and as a number
     * @link https://php.net/manual/en/sqlite3.version.php
     * @return array an associative array with the keys "versionString" and
     * "versionNumber".
     */
    #[ArrayShape(["versionString" => "string", "versionNumber" => "int"])]
    #[TentativeType]
    public static function version(): array {}

    /**
     * Returns the row ID of the most recent INSERT into the database
     * @link https://php.net/manual/en/sqlite3.lastinsertrowid.php
     * @return int the row ID of the most recent INSERT into the database
     */
    #[TentativeType]
    public function lastInsertRowID(): int {}

    /**
     * Returns the numeric result code of the most recent failed SQLite request
     * @link https://php.net/manual/en/sqlite3.lasterrorcode.php
     * @return int an integer value representing the numeric result code of the most
     * recent failed SQLite request.
     */
    #[TentativeType]
    public function lastErrorCode(): int {}

    /**
     * Returns English text describing the most recent failed SQLite request
     * @link https://php.net/manual/en/sqlite3.lasterrormsg.php
     * @return string an English string describing the most recent failed SQLite request.
     */
    #[TentativeType]
    public function lastErrorMsg(): string {}

    /**
     * Sets the busy connection handler
     * @link https://php.net/manual/en/sqlite3.busytimeout.php
     * @param int $milliseconds <p>
     * The milliseconds to sleep. Setting this value to a value less than
     * or equal to zero, will turn off an already set timeout handler.
     * </p>
     * @return bool <b>TRUE</b> on success, <b>FALSE</b> on failure.
     * @since 5.3.3
     */
    #[TentativeType]
    public function busyTimeout(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $milliseconds): bool {}

    /**
     * Attempts to load an SQLite extension library
     * @link https://php.net/manual/en/sqlite3.loadextension.php
     * @param string $name <p>
     * The name of the library to load. The library must be located in the
     * directory specified in the configure option sqlite3.extension_dir.
     * </p>
     * @return bool <b>TRUE</b> if the extension is successfully loaded, <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function loadExtension(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {}

    /**
     * Returns the number of database rows that were changed (or inserted or
     * deleted) by the most recent SQL statement
     * @link https://php.net/manual/en/sqlite3.changes.php
     * @return int an integer value corresponding to the number of
     * database rows changed (or inserted or deleted) by the most recent SQL
     * statement.
     */
    #[TentativeType]
    public function changes(): int {}

    /**
     * Returns a string that has been properly escaped
     * @link https://php.net/manual/en/sqlite3.escapestring.php
     * @param string $string <p>
     * The string to be escaped.
     * </p>
     * @return string a properly escaped string that may be used safely in an SQL
     * statement.
     */
    #[TentativeType]
    public static function escapeString(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string): string {}

    /**
     * Prepares an SQL statement for execution
     * @link https://php.net/manual/en/sqlite3.prepare.php
     * @param string $query <p>
     * The SQL query to prepare.
     * </p>
     * @return SQLite3Stmt|false an <b>SQLite3Stmt</b> object on success or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function prepare(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $query): SQLite3Stmt|false {}

    /**
     * Executes an SQL query
     * @link https://php.net/manual/en/sqlite3.query.php
     * @param string $query <p>
     * The SQL query to execute.
     * </p>
     * @return SQLite3Result|false an <b>SQLite3Result</b> object, or <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function query(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $query): SQLite3Result|false {}

    /**
     * Executes a query and returns a single result
     * @link https://php.net/manual/en/sqlite3.querysingle.php
     * @param string $query <p>
     * The SQL query to execute.
     * </p>
     * @param bool $entireRow [optional] <p>
     * By default, <b>querySingle</b> returns the value of the
     * first column returned by the query. If
     * <i>entire_row</i> is <b>TRUE</b>, then it returns an array
     * of the entire first row.
     * </p>
     * @return mixed the value of the first column of results or an array of the entire
     * first row (if <i>entire_row</i> is <b>TRUE</b>).
     * </p>
     * <p>
     * If the query is valid but no results are returned, then <b>NULL</b> will be
     * returned if <i>entire_row</i> is <b>FALSE</b>, otherwise an
     * empty array is returned.
     * </p>
     * <p>
     * Invalid or failing queries will return <b>FALSE</b>.
     */
    #[TentativeType]
    public function querySingle(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $query,
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $entireRow = false
    ): mixed {}

    /**
     * Registers a PHP function for use as an SQL scalar function
     * @link https://php.net/manual/en/sqlite3.createfunction.php
     * @param string $name <p>
     * Name of the SQL function to be created or redefined.
     * </p>
     * @param mixed $callback <p>
     * The name of a PHP function or user-defined function to apply as a
     * callback, defining the behavior of the SQL function.
     * </p>
     * @param int $argCount <p>
     * The number of arguments that the SQL function takes. If
     * this parameter is negative, then the SQL function may take
     * any number of arguments.
     * </p>
     * @param int $flags
     * <p>A bitwise conjunction of flags.
     * Currently, only <b>SQLITE3_DETERMINISTIC</b> is supported, which specifies that the function always returns
     * the same result given the same inputs within a single SQL statement.</p>
     * @return bool <b>TRUE</b> upon successful creation of the function, <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function createFunction(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $argCount = -1,
        #[PhpStormStubsElementAvailable(from: '7.1')] int $flags = 0
    ): bool {}

    /**
     * Registers a PHP function for use as an SQL aggregate function
     * @link https://php.net/manual/en/sqlite3.createaggregate.php
     * @param string $name <p>
     * Name of the SQL aggregate to be created or redefined.
     * </p>
     * @param mixed $stepCallback <p>
     * The name of a PHP function or user-defined function to apply as a
     * callback for every item in the aggregate.
     * </p>
     * @param mixed $finalCallback <p>
     * The name of a PHP function or user-defined function to apply as a
     * callback at the end of the aggregate data.
     * </p>
     * @param int $argCount [optional] <p>
     * The number of arguments that the SQL aggregate takes. If
     * this parameter is negative, then the SQL aggregate may take
     * any number of arguments.
     * </p>
     * @return bool <b>TRUE</b> upon successful creation of the aggregate, <b>FALSE</b> on
     * failure.
     */
    #[TentativeType]
    public function createAggregate(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $stepCallback,
        #[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $finalCallback,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $argCount = -1
    ): bool {}

    /**
     * Registers a PHP function for use as an SQL collating function
     * @link https://php.net/manual/en/sqlite3.createcollation.php
     * @param string $name <p>
     * Name of the SQL collating function to be created or redefined
     * </p>
     * @param callable $callback <p>
     * The name of a PHP function or user-defined function to apply as a
     * callback, defining the behavior of the collation. It should accept two
     * strings and return as <b>strcmp</b> does, i.e. it should
     * return -1, 1, or 0 if the first string sorts before, sorts after, or is
     * equal to the second.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @since 5.3.11
     */
    #[TentativeType]
    public function createCollation(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name, callable $callback): bool {}

    /**
     * Opens a stream resource to read a BLOB
     * @link https://php.net/manual/en/sqlite3.openblob.php
     * @param string $table <p>The table name.</p>
     * @param string $column <p>The column name.</p>
     * @param int $rowid <p>The row ID.</p>
     * @param string $database [optional] <p>The symbolic name of the DB</p>
     * @param int $flags [optional]
     * <p>Either <b>SQLITE3_OPEN_READONLY</b> or <b>SQLITE3_OPEN_READWRITE</b> to open the stream for reading only, or for reading and writing, respectively.</p>
     * @return resource|false Returns a stream resource, or FALSE on failure.
     */
    public function openBlob(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $table,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $column,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $rowid,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $database = 'main',
        #[PhpStormStubsElementAvailable(from: '7.2')] int $flags = SQLITE3_OPEN_READONLY
    ) {}

    /**
     * Enable throwing exceptions
     * @link https://www.php.net/manual/en/sqlite3.enableexceptions
     * @param bool $enable
     * @return bool Returns the old value; true if exceptions were enabled, false otherwise.
     */
    #[TentativeType]
    public function enableExceptions(
        #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $enable,
        #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $enable = false
    ): bool {}

    /**
     * Instantiates an SQLite3 object and opens an SQLite 3 database
     * @link https://php.net/manual/en/sqlite3.construct.php
     * @param string $filename <p>
     * Path to the SQLite database, or :memory: to use in-memory database.
     * </p>
     * @param int $flags <p>
     * Optional flags used to determine how to open the SQLite database. By
     * default, open uses SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE.
     * </p>
     * <p>
     * SQLITE3_OPEN_READONLY: Open the database for
     * reading only.
     * </p>
     * @param string $encryptionKey <p>
     * An optional encryption key used when encrypting and decrypting an
     * SQLite database.
     * </p>
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename,
        #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $flags,
        #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $encryptionKey,
        #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = SQLITE3_OPEN_READWRITE|SQLITE3_OPEN_CREATE,
        #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $encryptionKey = null
    ) {}

    /**
     * @return int
     * @since 7.4
     */
    #[TentativeType]
    public function lastExtendedErrorCode(): int {}

    /**
     * @param bool $enable
     * @since 7.4
     */
    #[TentativeType]
    public function enableExtendedResultCodes(
        #[PhpStormStubsElementAvailable(from: '7.4', to: '7.4')] bool $enable,
        #[PhpStormStubsElementAvailable(from: '8.0')] bool $enable = true
    ): bool {}

    /**
     * @param SQLite3 $destination
     * @param string $sourceDatabase
     * @param string $destinationDatabase
     * @return bool
     * @since 7.4
     */
    #[TentativeType]
    public function backup(SQLite3 $destination, string $sourceDatabase = 'main', string $destinationDatabase = 'main'): bool {}

    /**
     * @param null|callable $callback
     * @return bool
     * @since 8.0
     */
    #[TentativeType]
    public function setAuthorizer(?callable $callback): bool {}
}

/**
 * A class that handles prepared statements for the SQLite 3 extension.
 * @link https://php.net/manual/en/class.sqlite3stmt.php
 */
class SQLite3Stmt
{
    /**
     * Returns the number of parameters within the prepared statement
     * @link https://php.net/manual/en/sqlite3stmt.paramcount.php
     * @return int the number of parameters within the prepared statement.
     */
    #[TentativeType]
    public function paramCount(): int {}

    /**
     * Closes the prepared statement
     * @link https://php.net/manual/en/sqlite3stmt.close.php
     * @return bool <b>TRUE</b>
     */
    #[TentativeType]
    public function close(): bool {}

    /**
     * Resets the prepared statement
     * @link https://php.net/manual/en/sqlite3stmt.reset.php
     * @return bool <b>TRUE</b> if the statement is successfully reset, <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function reset(): bool {}

    /**
     * Clears all current bound parameters
     * @link https://php.net/manual/en/sqlite3stmt.clear.php
     * @return bool <b>TRUE</b> on successful clearing of bound parameters, <b>FALSE</b> on
     * failure.
     */
    #[TentativeType]
    public function clear(): bool {}

    /**
     * Executes a prepared statement and returns a result set object
     * @link https://php.net/manual/en/sqlite3stmt.execute.php
     * @return SQLite3Result|false an <b>SQLite3Result</b> object on successful execution of the prepared
     * statement, <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function execute(): SQLite3Result|false {}

    /**
     * Binds a parameter to a statement variable
     * @link https://php.net/manual/en/sqlite3stmt.bindparam.php
     * @param string $param <p>
     * An string identifying the statement variable to which the
     * parameter should be bound.
     * </p>
     * @param mixed &$var <p>
     * The parameter to bind to a statement variable.
     * </p>
     * @param int $type [optional] <p>
     * The data type of the parameter to bind.
     * </p>
     * <p>
     * SQLITE3_INTEGER: The value is a signed integer,
     * stored in 1, 2, 3, 4, 6, or 8 bytes depending on the magnitude of
     * the value.
     * </p>
     * @return bool <b>TRUE</b> if the parameter is bound to the statement variable, <b>FALSE</b>
     * on failure.
     */
    #[TentativeType]
    public function bindParam(
        #[LanguageLevelTypeAware(['8.0' => 'string|int'], default: '')] $param,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] &$var,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = SQLITE3_TEXT
    ): bool {}

    /**
     * Binds the value of a parameter to a statement variable
     * @link https://php.net/manual/en/sqlite3stmt.bindvalue.php
     * @param string $param <p>
     * An string identifying the statement variable to which the
     * value should be bound.
     * </p>
     * @param mixed $value <p>
     * The value to bind to a statement variable.
     * </p>
     * @param int $type [optional] <p>
     * The data type of the value to bind.
     * </p>
     * <p>
     * SQLITE3_INTEGER: The value is a signed integer,
     * stored in 1, 2, 3, 4, 6, or 8 bytes depending on the magnitude of
     * the value.
     * </p>
     * @return bool <b>TRUE</b> if the value is bound to the statement variable, <b>FALSE</b>
     * on failure.
     */
    #[TentativeType]
    public function bindValue(
        #[LanguageLevelTypeAware(['8.0' => 'string|int'], default: '')] $param,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = SQLITE3_TEXT
    ): bool {}

    #[TentativeType]
    public function readOnly(): bool {}

    /**
     * @param SQLite3 $sqlite3
     * @param string $query
     */
    private function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'SQLite3'], default: '')] $sqlite3,
        #[PhpStormStubsElementAvailable(from: '8.0')] string $query
    ) {}

    /**
     * Retrieves the SQL of the prepared statement. If expanded is FALSE, the unmodified SQL is retrieved.
     * If expanded is TRUE, all query parameters are replaced with their bound values, or with an SQL NULL, if not already bound.
     * @param bool $expand Whether to retrieve the expanded SQL. Passing TRUE is only supported as of libsqlite 3.14.
     * @return string|false Returns the SQL of the prepared statement, or FALSE on failure.
     * @since 7.4
     */
    #[TentativeType]
    public function getSQL(bool $expand = false): string|false {}
}

/**
 * A class that handles result sets for the SQLite 3 extension.
 * @link https://php.net/manual/en/class.sqlite3result.php
 */
class SQLite3Result
{
    /**
     * Returns the number of columns in the result set
     * @link https://php.net/manual/en/sqlite3result.numcolumns.php
     * @return int the number of columns in the result set.
     */
    #[TentativeType]
    public function numColumns(): int {}

    /**
     * Returns the name of the nth column
     * @link https://php.net/manual/en/sqlite3result.columnname.php
     * @param int $column <p>
     * The numeric zero-based index of the column.
     * </p>
     * @return string|false the string name of the column identified by
     * <i>column_number</i>.
     */
    #[TentativeType]
    public function columnName(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $column): string|false {}

    /**
     * Returns the type of the nth column
     * @link https://php.net/manual/en/sqlite3result.columntype.php
     * @param int $column <p>
     * The numeric zero-based index of the column.
     * </p>
     * @return int|false the data type index of the column identified by
     * <i>column_number</i> (one of
     * <b>SQLITE3_INTEGER</b>, <b>SQLITE3_FLOAT</b>,
     * <b>SQLITE3_TEXT</b>, <b>SQLITE3_BLOB</b>, or
     * <b>SQLITE3_NULL</b>).
     */
    #[TentativeType]
    public function columnType(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $column): int|false {}

    /**
     * Fetches a result row as an associative or numerically indexed array or both
     * @link https://php.net/manual/en/sqlite3result.fetcharray.php
     * @param int $mode [optional] <p>
     * Controls how the next row will be returned to the caller. This value
     * must be one of either SQLITE3_ASSOC,
     * SQLITE3_NUM, or SQLITE3_BOTH.
     * </p>
     * <p>
     * SQLITE3_ASSOC: returns an array indexed by column
     * name as returned in the corresponding result set
     * </p>
     * @return array|false a result row as an associatively or numerically indexed array or
     * both. Alternately will return <b>FALSE</b> if there are no more rows.
     */
    #[TentativeType]
    public function fetchArray(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = SQLITE3_BOTH): array|false {}

    /**
     * Resets the result set back to the first row
     * @link https://php.net/manual/en/sqlite3result.reset.php
     * @return bool <b>TRUE</b> if the result set is successfully reset
     * back to the first row, <b>FALSE</b> on failure.
     */
    #[TentativeType]
    public function reset(): bool {}

    /**
     * Closes the result set
     * @link https://php.net/manual/en/sqlite3result.finalize.php
     * @return bool <b>TRUE</b>.
     */
    public function finalize() {}

    private function __construct() {}
}

/**
 * Specifies that the <b>Sqlite3Result::fetchArray</b>
 * method shall return an array indexed by column name as returned in the
 * corresponding result set.
 * @link https://php.net/manual/en/sqlite3.constants.php
 */
define('SQLITE3_ASSOC', 1);

/**
 * Specifies that the <b>Sqlite3Result::fetchArray</b>
 * method shall return an array indexed by column number as returned in the
 * corresponding result set, starting at column 0.
 * @link https://php.net/manual/en/sqlite3.constants.php
 */
define('SQLITE3_NUM', 2);

/**
 * Specifies that the <b>Sqlite3Result::fetchArray</b>
 * method shall return an array indexed by both column name and number as
 * returned in the corresponding result set, starting at column 0.
 * @link https://php.net/manual/en/sqlite3.constants.php
 */
define('SQLITE3_BOTH', 3);

/**
 * Represents the SQLite3 INTEGER storage class.
 * @link https://php.net/manual/en/sqlite3.constants.php
 */
define('SQLITE3_INTEGER', 1);

/**
 * Represents the SQLite3 REAL (FLOAT) storage class.
 * @link https://php.net/manual/en/sqlite3.constants.php
 */
define('SQLITE3_FLOAT', 2);

/**
 * Represents the SQLite3 TEXT storage class.
 * @link https://php.net/manual/en/sqlite3.constants.php
 */
define('SQLITE3_TEXT', 3);

/**
 * Represents the SQLite3 BLOB storage class.
 * @link https://php.net/manual/en/sqlite3.constants.php
 */
define('SQLITE3_BLOB', 4);

/**
 * Represents the SQLite3 NULL storage class.
 * @link https://php.net/manual/en/sqlite3.constants.php
 */
define('SQLITE3_NULL', 5);

/**
 * Specifies that the SQLite3 database be opened for reading only.
 * @link https://php.net/manual/en/sqlite3.constants.php
 */
define('SQLITE3_OPEN_READONLY', 1);

/**
 * Specifies that the SQLite3 database be opened for reading and writing.
 * @link https://php.net/manual/en/sqlite3.constants.php
 */
define('SQLITE3_OPEN_READWRITE', 2);

/**
 * Specifies that the SQLite3 database be created if it does not already
 * exist.
 * @link https://php.net/manual/en/sqlite3.constants.php
 */
define('SQLITE3_OPEN_CREATE', 4);

/**
 * Specifies that a function created with {@see SQLite3::createFunction()} is deterministic,
 * i.e. it always returns the same result given the same inputs within a single SQL statement.
 * @since 7.1.4
 * @link https://php.net/manual/en/sqlite.constants.php
 */
define('SQLITE3_DETERMINISTIC', 2048);

// End of sqlite3 v.0.7-dev
<?php
class ffmpeg_movie
{
    /**  Open a video or audio file and return it as an object.
     * @param string $path_to_media - File path of video or audio file to open.
     * @param bool $persistent - Whether to open this media as a persistent resource. See the PHP documentation for more info about persistent resources
     */
    public function __construct($path_to_media, $persistent) {}

    /** Return the duration of a movie or audio file in seconds.
     * @return int
     */
    public function getDuration() {}

    /** Return the number of frames in a movie or audio file.
     * @return int
     */
    public function getFrameCount() {}

    /** Return the frame rate of a movie in fps.
     * @return int
     */
    public function getFrameRate() {}

    /** Return the path and name of the movie file or audio file.
     * @return string
     */
    public function getFilename() {}

    /** Return the comment field from the movie or audio file.
     * @return string
     */
    public function getComment() {}

    /** Return the title field from the movie or audio file.
     * @return string
     */
    public function getTitle() {}

    /** Return the author field from the movie or the artist ID3 field from an mp3 file.
     * @return string
     */
    public function getAuthor() {}

    /** Return the author field from the movie or the artist ID3 field from an mp3 file.
     * @return string
     */
    public function getArtist() {}

    /** Return the copyright field from the movie or audio file.
     * @return string
     */
    public function getCopyright() {}

    /** Return the genre ID3 field from an mp3 file.
     * @return string
     */
    public function getGenre() {}

    /** Return the track ID3 field from an mp3 file.
     * @return string|int
     */
    public function getTrackNumber() {}

    /** Return the year ID3 field from an mp3 file.
     * @return string|int
     */
    public function getYear() {}

    /** Return the height of the movie in pixels.
     * @return int
     */
    public function getFrameHeight() {}

    /** Return the width of the movie in pixels.
     * @return int
     */
    public function getFrameWidth() {}

    /** Return the pixel format of the movie.*/
    public function getPixelFormat() {}

    /** Return the bit rate of the movie or audio file in bits per second.
     * @return int
     */
    public function getBitRate() {}

    /** Return the bit rate of the video in bits per second.
     * NOTE: This only works for files with constant bit rate.
     * @return int
     */
    public function getVideoBitRate() {}

    /** Return the audio bit rate of the media file in bits per second.
     * @return int
     */
    public function getAudioBitRate() {}

    /** Return the audio sample rate of the media file in bits per second.
     * @return int
     */
    public function getAudioSampleRate() {}

    /** Return the current frame index.
     * @return int
     */
    public function getFrameNumber() {}

    /** Return the name of the video codec used to encode this movie as a string.
     * @return string
     */
    public function getVideoCodec() {}

    /** Return the name of the audio codec used to encode this movie as a string.
     * @return string
     */
    public function getAudioCodec() {}

    /** Return the number of audio channels in this movie as an integer.
     * @return int
     */
    public function getAudioChannels() {}

    /** Return boolean value indicating whether the movie has an audio stream.
     * @return bool
     */
    public function hasAudio() {}

    /** Return boolean value indicating whether the movie has a video stream.
     * @return bool
     */
    public function hasVideo() {}

    /** Returns a frame from the movie as an ffmpeg_frame object. Returns false if the frame was not found.
     * @param int $framenumber - Frame from the movie to return. If no framenumber is specified, returns the next frame of the movie.
     * @return ffmpeg_frame
     */
    public function getFrame($framenumber) {}

    /** Returns the next key frame from the movie as an ffmpeg_frame object. Returns false if the frame was not found.
     * @return ffmpeg_frame
     */
    public function getNextKeyFrame() {}
}

class ffmpeg_frame
{
    /**
     * NOTE: This function will not be available if GD is not enabled.
     * @param resource $gd_image
     */
    public function __construct($gd_image) {}

    /** Return the width of the frame.
     * @return int
     */
    public function getWidth() {}

    /** Return the height of the frame.
     * @return int
     */
    public function getHeight() {}

    /** Return the presentation time stamp of the frame.
     * @return int
     */
    public function getPTS() {}

    /** Return the presentation time stamp of the frame.
     * @return int
     */
    public function getPresentationTimestamp() {}

    /** Resize and optionally crop the frame. (Cropping is built into ffmpeg resizing so I'm providing it here for completeness.)
     * @param int $width - New width of the frame (must be an even number).
     * @param int $height - New height of the frame (must be an even number).
     * @param int $crop_top - Remove [croptop] rows of pixels from the top of the frame.
     * @param int $crop_bottom - Remove [cropbottom] rows of pixels from the bottom of the frame.
     * @param int $crop_left - Remove [cropleft] rows of pixels from the left of the frame.
     * @param int $crop_right - Remove [cropright] rows of pixels from the right of the frame.
     * NOTE: Cropping is always applied to the frame before it is resized. Crop values must be even numbers.
     */
    public function resize($width, $height, $crop_top = 0, $crop_bottom = 0, $crop_left = 0, $crop_right = 0) {}

    /** Crop the frame.
     * @param int $crop_top - Remove [croptop] rows of pixels from the top of the frame.
     * @param int $crop_bottom - Remove [cropbottom] rows of pixels from the bottom of the frame.
     * @param int $crop_left - Remove [cropleft] rows of pixels from the left of the frame.
     * @param int $crop_right - Remove [cropright] rows of pixels from the right of the frame.
     * NOTE: Crop values must be even numbers.
     */
    public function crop($crop_top, $crop_bottom = 0, $crop_left = 0, $crop_right = 0) {}

    /** Returns a truecolor GD image of the frame.
     * NOTE: This function will not be available if GD is not enabled.
     * @return resource
     */
    public function toGDImage() {}
}

class ffmpeg_animated_gif
{
    /**
     * @param string $output_file_path - Location in the filesystem where the animated gif will be written.
     * @param int $width - Width of the animated gif.
     * @param int $height - Height of the animated gif.
     * @param int $frame_rate - Frame rate of the animated gif in frames per second.
     * @param int $loop_count - Number of times to loop the animation. Put a zero here to loop forever or omit this parameter to disable looping.
     */
    public function __construct($output_file_path, $width, $height, $frame_rate, $loop_count = 0) {}

    /** Add a frame to the end of the animated gif.
     * @param ffmpeg_frame $frame_to_add - The ffmpeg_frame object to add to the end of the animated gif.
     */
    public function addFrame(ffmpeg_frame $frame_to_add) {}
}
<?php
/**
 * Opens a Sybase server connection
 * @link https://php.net/manual/en/function.sybase-connect.php
 * @param string $servername [optional]
 * @param string $username [optional]
 * @param string $password [optional]
 * @param string $charset [optional]
 * @param string $appname [optional]
 * @return resource|false a positive Sybase link identifier on success, or false
 * @removed 7.0
 */
function sybase_connect($servername = null, $username = null, $password = null, $charset = null, $appname = null) {}

/**
 * Open persistent Sybase connection
 * @link https://php.net/manual/en/function.sybase-pconnect.php
 * @param string $servername [optional]
 * @param string $username [optional]
 * @param string $password [optional]
 * @param string $charset [optional]
 * @param string $appname [optional]
 * @return resource|false a positive Sybase persistent link identifier on success
 * @removed 7.0
 */
function sybase_pconnect($servername = null, $username = null, $password = null, $charset = null, $appname = null) {}

/**
 * Closes a Sybase connection
 * @link https://php.net/manual/en/function.sybase-close.php
 * @param resource $link_identifier [optional]
 * @return bool
 * @removed 7.0
 */
function sybase_close($link_identifier = null) {}

/**
 * Selects a Sybase database
 * @link https://php.net/manual/en/function.sybase-select-db.php
 * @param string $database_name
 * @param resource $link_identifier [optional]
 * @return bool
 * @removed 7.0
 */
function sybase_select_db($database_name, $link_identifier = null) {}

/**
 * Sends a Sybase query
 * @link https://php.net/manual/en/function.sybase-query.php
 * @param string $query
 * @param resource $link_identifier [optional]
 * @return mixed|false a positive Sybase result identifier on success, false on error,
 * @removed 7.0
 */
function sybase_query($query, $link_identifier = null) {}

/**
 * Send a Sybase query and do not block
 * @link https://php.net/manual/en/function.sybase-unbuffered-query.php
 * @param string $query
 * @param resource $link_identifier
 * @param bool $store_result [optional]
 * @return resource|false a positive Sybase result identifier on success, or false on
 * @removed 7.0
 */
function sybase_unbuffered_query($query, $link_identifier, $store_result = null) {}

/**
 * Frees result memory
 * @link https://php.net/manual/en/function.sybase-free-result.php
 * @param resource $result
 * @return bool
 * @removed 7.0
 */
function sybase_free_result($result) {}

/**
 * Returns the last message from the server
 * @link https://php.net/manual/en/function.sybase-get-last-message.php
 * @return string the message as a string.
 * @removed 7.0
 */
function sybase_get_last_message() {}

/**
 * Get number of rows in a result set
 * @link https://php.net/manual/en/function.sybase-num-rows.php
 * @param resource $result
 * @return int the number of rows as an integer.
 * @removed 7.0
 */
function sybase_num_rows($result) {}

/**
 * Gets the number of fields in a result set
 * @link https://php.net/manual/en/function.sybase-num-fields.php
 * @param resource $result
 * @return int the number of fields as an integer.
 * @removed 7.0
 */
function sybase_num_fields($result) {}

/**
 * Get a result row as an enumerated array
 * @link https://php.net/manual/en/function.sybase-fetch-row.php
 * @param resource $result
 * @return array|false an array that corresponds to the fetched row, or false if there
 * @removed 7.0
 */
function sybase_fetch_row($result) {}

/**
 * Fetch row as array
 * @link https://php.net/manual/en/function.sybase-fetch-array.php
 * @param resource $result
 * @return array|false an array that corresponds to the fetched row, or false if there
 * @removed 7.0
 */
function sybase_fetch_array($result) {}

/**
 * Fetch a result row as an associative array
 * @link https://php.net/manual/en/function.sybase-fetch-assoc.php
 * @param resource $result
 * @return array|false an array that corresponds to the fetched row, or false if there
 * @removed 7.0
 */
function sybase_fetch_assoc($result) {}

/**
 * Fetch a row as an object
 * @link https://php.net/manual/en/function.sybase-fetch-object.php
 * @param resource $result
 * @param mixed $object [optional]
 * @return object an object with properties that correspond to the fetched row, or
 * @removed 7.0
 */
function sybase_fetch_object($result, $object = null) {}

/**
 * Moves internal row pointer
 * @link https://php.net/manual/en/function.sybase-data-seek.php
 * @param resource $result_identifier
 * @param int $row_number
 * @return bool
 * @removed 7.0
 */
function sybase_data_seek($result_identifier, $row_number) {}

/**
 * Get field information from a result
 * @link https://php.net/manual/en/function.sybase-fetch-field.php
 * @param resource $result
 * @param int $field_offset [optional]
 * @return object an object containing field information.
 * @removed 7.0
 */
function sybase_fetch_field($result, $field_offset = null) {}

/**
 * Sets field offset
 * @link https://php.net/manual/en/function.sybase-field-seek.php
 * @param resource $result
 * @param int $field_offset
 * @return bool
 * @removed 7.0
 */
function sybase_field_seek($result, $field_offset) {}

/**
 * Get result data
 * @link https://php.net/manual/en/function.sybase-result.php
 * @param resource $result
 * @param int $row
 * @param mixed $field
 * @return string
 * @removed 7.0
 */
function sybase_result($result, $row, $field) {}

/**
 * Gets number of affected rows in last query
 * @link https://php.net/manual/en/function.sybase-affected-rows.php
 * @param resource $link_identifier [optional]
 * @return int the number of affected rows, as an integer.
 * @removed 7.0
 */
function sybase_affected_rows($link_identifier = null) {}

/**
 * Sets minimum client severity
 * @link https://php.net/manual/en/function.sybase-min-client-severity.php
 * @param int $severity
 * @return void
 * @removed 7.0
 */
function sybase_min_client_severity($severity) {}

/**
 * Sets minimum server severity
 * @link https://php.net/manual/en/function.sybase-min-server-severity.php
 * @param int $severity
 * @return void
 * @removed 7.0
 */
function sybase_min_server_severity($severity) {}

/**
 * Sets the handler called when a server message is raised
 * @link https://php.net/manual/en/function.sybase-set-message-handler.php
 * @param callable $handler
 * @param resource $connection [optional]
 * @return bool
 * @removed 7.0
 */
function sybase_set_message_handler($handler, $connection = null) {}

/**
 * Sets the deadlock retry count
 * @link https://php.net/manual/en/function.sybase-deadlock-retry-count.php
 * @param int $retry_count
 * @return void
 * @removed 7.0
 */
function sybase_deadlock_retry_count($retry_count) {}
<?php

/**
 * Mapscript extension (version 7.0.*)
 * Parsed from documentation
 * Generated at 2017-08-24 16:06:54
 *
 * @see https://mapserver.org/mapscript/php/phpmapscript.html
 * @see https://raw.githubusercontent.com/mapserver/docs/branch-7-0/en/mapscript/php/phpmapscript.txt
 */

// constants
const MS_TRUE = 1;
const MS_FALSE = 0;
const MS_ON = 1;
const MS_OFF = 0;
const MS_YES = 1;
const MS_NO = 0;
const MS_INCHES = 0;
const MS_FEET = 1;
const MS_MILES = 2;
const MS_METERS = 3;
const MS_KILOMETERS = 4;
const MS_DD = 5;
const MS_PIXELS = 6;
const MS_NAUTICALMILES = 8;
const MS_LAYER_POINT = 0;
const MS_LAYER_LINE = 1;
const MS_LAYER_POLYGON = 2;
const MS_LAYER_RASTER = 3;
// (deprecated since 6.2)
const MS_LAYER_ANNOTATION = 4;
const MS_LAYER_QUERY = 5;
const MS_LAYER_CIRCLE = 6;
const MS_LAYER_TILEINDEX = 7;
const MS_LAYER_CHART = 8;
const MS_DEFAULT = 2;
const MS_EMBED = 3;
const MS_DELETE = 4;
const MS_GD_ALPHA = 1000;
const MS_UL = 101;
const MS_LR = 102;
const MS_UR = 103;
const MS_LL = 104;
const MS_CR = 105;
const MS_CL = 106;
const MS_UC = 107;
const MS_LC = 108;
const MS_CC = 109;
const MS_XY = 111;
const MS_AUTO = 110;
const MS_AUTO2 = 114;
const MS_FOLLOW = 112;
const MS_NONE = 113;
const MS_TINY = 0;
const MS_SMALL = 1;
const MS_MEDIUM = 2;
const MS_LARGE = 3;
const MS_GIANT = 4;
const MS_SHAPE_POINT = 0;
const MS_SHAPE_LINE = 1;
const MS_SHAPE_POLYGON = 2;
const MS_SHAPE_NULL = 3;
const MS_SHP_POINT = 1;
const MS_SHP_ARC = 3;
const MS_SHP_POLYGON = 5;
const MS_SHP_MULTIPOINT = 8;
const MS_SINGLE = 0;
const MS_MULTIPLE = 1;
const MS_NORMAL = 0;
const MS_HILITE = 1;
const MS_SELECTED = 2;
const MS_INLINE = 0;
const MS_SHAPEFILE = 1;
const MS_TILED_SHAPEFILE = 2;
const MS_SDE = 3;
const MS_OGR = 4;
const MS_TILED_OGR = 5;
const MS_POSTGIS = 6;
const MS_WMS = 7;
const MS_ORACLESPATIAL = 8;
const MS_WFS = 9;
const MS_GRATICULE = 10;
const MS_RASTER = 12;
const MS_PLUGIN = 13;
const MS_UNION = 14;
const MS_NOERR = 0;
const MS_IOERR = 1;
const MS_MEMERR = 2;
const MS_TYPEERR = 3;
const MS_SYMERR = 4;
const MS_REGEXERR = 5;
const MS_TTFERR = 6;
const MS_DBFERR = 7;
const MS_GDERR = 8;
const MS_IDENTERR = 9;
const MS_EOFERR = 10;
const MS_PROJERR = 11;
const MS_MISCERR = 12;
const MS_CGIERR = 13;
const MS_WEBERR = 14;
const MS_IMGERR = 15;
const MS_HASHERR = 16;
const MS_JOINERR = 17;
const MS_NOTFOUND = 18;
const MS_SHPERR = 19;
const MS_PARSEERR = 20;
const MS_SDEERR = 21;
const MS_OGRERR = 22;
const MS_QUERYERR = 23;
const MS_WMSERR = 24;
const MS_WMSCONNERR = 25;
const MS_ORACLESPATIALERR = 26;
const MS_WFSERR = 27;
const MS_WFSCONNERR = 28;
const MS_MAPCONTEXTERR = 29;
const MS_HTTPERR = 30;
const MS_WCSERR = 32;
const MS_SYMBOL_SIMPLE = 1000;
const MS_SYMBOL_VECTOR = 1001;
const MS_SYMBOL_ELLIPSE = 1002;
const MS_SYMBOL_PIXMAP = 1003;
const MS_SYMBOL_TRUETYPE = 1004;
const MS_IMAGEMODE_PC256 = 0;
const MS_IMAGEMODE_RGB = 1;
const MS_IMAGEMODE_RGBA = 2;
const MS_IMAGEMODE_INT16 = 3;
const MS_IMAGEMODE_FLOAT32 = 4;
const MS_IMAGEMODE_BYTE = 5;
const MS_IMAGEMODE_FEATURE = 6;
const MS_IMAGEMODE_NULL = 7;
const MS_STYLE_BINDING_SIZE = 0;
const MS_STYLE_BINDING_ANGLE = 2;
const MS_STYLE_BINDING_COLOR = 3;
const MS_STYLE_BINDING_OUTLINECOLOR = 4;
const MS_STYLE_BINDING_SYMBOL = 5;
const MS_STYLE_BINDING_WIDTH = 1;
const MS_LABEL_BINDING_SIZE = 0;
const MS_LABEL_BINDING_ANGLE = 1;
const MS_LABEL_BINDING_COLOR = 2;
const MS_LABEL_BINDING_OUTLINECOLOR = 3;
const MS_LABEL_BINDING_FONT = 4;
const MS_LABEL_BINDING_PRIORITY = 5;
const MS_LABEL_BINDING_POSITION = 6;
const MS_LABEL_BINDING_SHADOWSIZEX = 7;
const MS_LABEL_BINDING_SHADOWSIZEY = 8;
const MS_ALIGN_LEFT = 0;
const MS_ALIGN_CENTER = 1;
const MS_ALIGN_RIGHT = 2;
const MS_GET_REQUEST = 0;
const MS_POST_REQUEST = 1;

/**
 * Returns the MapServer version and options in a string.  This
 * string can be parsed to find out which modules were compiled in,
 * etc.
 *
 * @return string
 */
function ms_GetVersion() {}

/**
 * Returns the MapServer version number (x.y.z) as an integer
 * (x*10000 + y*100 + z). (New in v5.0) e.g. V5.4.3 would return
 * 50403.
 *
 * @return int
 */
function ms_GetVersionInt() {}

/**
 * Writes the current buffer to stdout.  The PHP header() function
 * should be used to set the documents's content-type prior to
 * calling the function.  Returns the number of bytes written if
 * output is sent to stdout.  See :ref:`mapscript_ows` for more info.
 *
 * @return int
 */
function ms_iogetStdoutBufferBytes() {}

/**
 * Fetch the current stdout buffer contents as a string.  This method
 * does not clear the buffer.
 *
 * @return void
 */
function ms_iogetstdoutbufferstring() {}

/**
 * Installs a mapserver IO handler directing future stdin reading
 * (ie. post request capture) to come from a buffer.
 *
 * @return void
 */
function ms_ioinstallstdinfrombuffer() {}

/**
 * Installs a mapserver IO handler directing future stdout output
 * to a memory buffer.
 *
 * @return void
 */
function ms_ioinstallstdouttobuffer() {}

/**
 * Resets the default stdin and stdout handlers in place of "buffer"
 * based handlers.
 *
 * @return void
 */
function ms_ioresethandlers() {}

/**
 * Strip the Content-type header off the stdout buffer if it has one,
 * and if a content type is found it is return. Otherwise return
 * false.
 *
 * @return string
 */
function ms_iostripstdoutbuffercontenttype() {}

/**
 * Strip all the Content-* headers off the stdout buffer if it has
 * some.
 *
 * @return void
 */
function ms_iostripstdoutbuffercontentheaders() {}

/**
 * Preparses a mapfile through the MapServer parser and return an
 * array with one item for each token from the mapfile.  Strings,
 * logical expressions, regex expressions and comments are returned
 * as individual tokens.
 *
 * @param string $map_file_name
 * @return array
 */
function ms_TokenizeMap($map_file_name) {}

/**
 * Returns a reference to the head of the list of errorObj.
 *
 * @return errorObj
 */
function ms_GetErrorObj() {}

/**
 * Clear the current error list.
 * Note that clearing the list invalidates any errorObj handles obtained
 * via the $error->next() method.
 *
 * @return void
 */
function ms_ResetErrorList() {}

/**
 * Class Objects can be returned by the `layerObj`_ class, or can be
 * created using:
 */
final class classObj
{
    /**
     * @var string
     */
    public $group;

    /**
     * @var string
     */
    public $keyimage;

    /**
     * Removed (6.2) - use addLabel, getLabel, ...
     *
     * @var labelObj
     */
    public $label;

    /**
     * @var float
     */
    public $maxscaledenom;

    /**
     * @var hashTableObj
     */
    public $metadata;

    /**
     * @var float
     */
    public $minscaledenom;

    /**
     * @var string
     */
    public $name;

    /**
     * read-only (since 6.2)
     *
     * @var int
     */
    public $numlabels;

    /**
     * read-only
     *
     * @var int
     */
    public $numstyles;

    /**
     * MS_ON, MS_OFF or MS_DELETE
     *
     * @var int
     */
    public $status;

    /**
     * @var string
     */
    public $template;

    /**
     * @var string
     */
    public $title;

    /**
     * @var int
     */
    public $type;

    /**
     * The second argument class is optional. If given, the new class
     * created will be a copy of this class.
     *
     * @param layerObj $layer
     * @param classObj $class
     */
    final public function __construct(layerObj $layer, classObj $class) {}

    /**
     * Old style constructor
     *
     * @param layerObj $layer
     * @param classObj $class
     * @return classObj
     */
    final public function ms_newClassObj(layerObj $layer, classObj $class) {}

    /**
     * Add a labelObj to the classObj and return its index in the labels
     * array.
     * .. versionadded:: 6.2
     *
     * @param labelObj $label
     * @return int
     */
    final public function addLabel(labelObj $label) {}

    /**
     * Saves the object to a string.  Provides the inverse option for
     * updateFromString.
     *
     * @return string
     */
    final public function convertToString() {}

    /**
     * Draw the legend icon and return a new imageObj.
     *
     * @param int $width
     * @param int $height
     * @return imageObj
     */
    final public function createLegendIcon($width, $height) {}

    /**
     * Delete the style specified by the style index. If there are any
     * style that follow the deleted style, their index will decrease by 1.
     *
     * @param int $index
     * @return int
     */
    final public function deletestyle($index) {}

    /**
     * Draw the legend icon on im object at dstX, dstY.
     * Returns MS_SUCCESS/MS_FAILURE.
     *
     * @param int $width
     * @param int $height
     * @param imageObj $im
     * @param int $dstX
     * @param int $dstY
     * @return int
     */
    final public function drawLegendIcon($width, $height, imageObj $im, $dstX, $dstY) {}

    /**
     * Free the object properties and break the internal references.
     * Note that you have to unset the php variable to free totally the
     * resources.
     *
     * @return void
     */
    final public function free() {}

    /**
     * Returns the :ref:`expression <expressions>` string for the class
     * object.
     *
     * @return string
     */
    final public function getExpressionString() {}

    /**
     * Return a reference to the labelObj at *index* in the labels array.
     * See the labelObj_ section for more details on multiple class
     * labels.
     * .. versionadded:: 6.2
     *
     * @param int $index
     * @return labelObj
     */
    final public function getLabel($index) {}

    /**
     * Fetch class metadata entry by name.  Returns "" if no entry
     * matches the name.  Note that the search is case sensitive.
     * .. note::
     * getMetaData's query is case sensitive.
     *
     * @param string $name
     * @return int
     */
    final public function getMetaData($name) {}

    /**
     * Return the style object using an index. index >= 0 &&
     * index < class->numstyles.
     *
     * @param int $index
     * @return styleObj
     */
    final public function getStyle($index) {}

    /**
     * Returns the text string for the class object.
     *
     * @return string
     */
    final public function getTextString() {}

    /**
     * The style specified by the style index will be moved down into
     * the array of classes. Returns MS_SUCCESS or MS_FAILURE.
     * ex class->movestyledown(0) will have the effect of moving style 0
     * up to position 1, and the style at position 1 will be moved
     * to position 0.
     *
     * @param int $index
     * @return int
     */
    final public function movestyledown($index) {}

    /**
     * The style specified by the style index will be moved up into
     * the array of classes. Returns MS_SUCCESS or MS_FAILURE.
     * ex class->movestyleup(1) will have the effect of moving style 1
     * up to position 0, and the style at position 0 will be moved
     * to position 1.
     *
     * @param int $index
     * @return int
     */
    final public function movestyleup($index) {}

    /**
     * Remove the labelObj at *index* from the labels array and return a
     * reference to the labelObj.  numlabels is decremented, and the
     * array is updated.
     * .. versionadded:: 6.2
     *
     * @param int $index
     * @return labelObj
     */
    final public function removeLabel($index) {}

    /**
     * Remove a metadata entry for the class.  Returns MS_SUCCESS/MS_FAILURE.
     *
     * @param string $name
     * @return int
     */
    final public function removeMetaData($name) {}

    /**
     * Set object property to a new value.
     *
     * @param string $property_name
     * @param  $new_value
     * @return int
     */
    final public function set($property_name, $new_value) {}

    /**
     * Set the :ref:`expression <expressions>` string for the class
     * object.
     *
     * @param string $expression
     * @return int
     */
    final public function setExpression($expression) {}

    /**
     * Set a metadata entry for the class.  Returns MS_SUCCESS/MS_FAILURE.
     *
     * @param string $name
     * @param string $value
     * @return int
     */
    final public function setMetaData($name, $value) {}

    /**
     * Set the text string for the class object.
     *
     * @param string $text
     * @return int
     */
    final public function settext($text) {}

    /**
     * Update a class from a string snippet. Returns MS_SUCCESS/MS_FAILURE.
     * .. code-block:: php
     * set the color
     * $oClass->updateFromString('CLASS STYLE COLOR 255 0 255 END END');
     *
     * @param string $snippet
     * @return int
     */
    final public function updateFromString($snippet) {}
}

/**
 * Instance of clusterObj is always embedded inside the `layerObj`_.
 */
final class clusterObj
{
    /**
     * @var float
     */
    public $buffer;

    /**
     * @var float
     */
    public $maxdistance;

    /**
     * @var string
     */
    public $region;

    /**
     * Saves the object to a string.  Provides the inverse option for
     * updateFromString.
     *
     * @return string
     */
    final public function convertToString() {}

    /**
     * Returns the :ref:`expression <expressions>` for this cluster
     * filter or NULL on error.
     *
     * @return string
     */
    final public function getFilterString() {}

    /**
     * Returns the :ref:`expression <expressions>` for this cluster group
     * or NULL on error.
     *
     * @return string
     */
    final public function getGroupString() {}

    /**
     * Set layer filter :ref:`expression <expressions>`.
     *
     * @param string $expression
     * @return int
     */
    final public function setFilter($expression) {}

    /**
     * Set layer group :ref:`expression <expressions>`.
     *
     * @param string $expression
     * @return int
     */
    final public function setGroup($expression) {}
}

/**
 * Instances of colorObj are always embedded inside other classes.
 */
final class colorObj
{
    /**
     * @var int
     */
    public $red;

    /**
     * @var int
     */
    public $green;

    /**
     * @var int
     */
    public $blue;

    /**
     * @var int
     */
    public $alpha;

    /**
     * Get the color as a hex string "#rrggbb" or (if alpha is not 255)
     * "#rrggbbaa".
     *
     * @return string
     */
    final public function toHex() {}

    /**
     * Set red, green, blue and alpha values. The hex string should have the form
     * "#rrggbb" (alpha will be set to 255) or "#rrggbbaa". Returns MS_SUCCESS.
     *
     * @param string $hex
     * @return int
     */
    final public function setHex($hex) {}
}

final class errorObj
{
    /**
     * //See error code constants above
     *
     * @var int
     */
    public $code;

    /**
     * @var string
     */
    public $message;

    /**
     * @var string
     */
    public $routine;
}

/**
 * The grid is always embedded inside a layer object defined as
 * a grid (layer->connectiontype = MS_GRATICULE)
 * (for more docs : https://github.com/mapserver/mapserver/wiki/MapServerGrid)
 * A layer can become a grid layer by adding a grid object to it using :
 * ms_newGridObj(layerObj layer)
 * $oLayer = ms_newlayerobj($oMap);
 * $oLayer->set("name", "GRID");
 * ms_newgridobj($oLayer);
 * $oLayer->grid->set("labelformat", "DDMMSS");
 */
final class gridObj
{
    /**
     * @var string
     */
    public $labelformat;

    /**
     * @var float
     */
    public $maxacrs;

    /**
     * @var float
     */
    public $maxinterval;

    /**
     * @var float
     */
    public $maxsubdivide;

    /**
     * @var float
     */
    public $minarcs;

    /**
     * @var float
     */
    public $mininterval;

    /**
     * @var float
     */
    public $minsubdivide;

    /**
     * Set object property to a new value.
     *
     * @param string $property_name
     * @param  $new_value
     * @return int
     */
    final public function set($property_name, $new_value) {}
}

/**
 * Instance of hashTableObj is always embedded inside the `classObj`_,
 * `layerObj`_, `mapObj`_ and `webObj`_. It is uses a read only.
 * $hashTable = $oLayer->metadata;
 * $key = null;
 * while ($key = $hashTable->nextkey($key))
 * echo "Key: ".$key." value: ".$hashTable->get($key)."<br/>";
 */
final class hashTableObj
{
    /**
     * Clear all items in the hashTable (To NULL).
     *
     * @return void
     */
    final public function clear() {}

    /**
     * Fetch class metadata entry by name.  Returns "" if no entry
     * matches the name.  Note that the search is case sensitive.
     *
     * @param string $key
     * @return string
     */
    final public function get($key) {}

    /**
     * Return the next key or first key if previousKey = NULL.
     * Return NULL if no item is in the hashTable or end of hashTable is
     * reached
     *
     * @param string $previousKey
     * @return string
     */
    final public function nextkey($previousKey) {}

    /**
     * Remove a metadata entry in the hashTable.  Returns MS_SUCCESS/MS_FAILURE.
     *
     * @param string $key
     * @return int
     */
    final public function remove($key) {}

    /**
     * Set a metadata entry in the hashTable. Returns MS_SUCCESS/MS_FAILURE.
     *
     * @param string $key
     * @param string $value
     * @return int
     */
    final public function set($key, $value) {}
}

/**
 * Instances of imageObj are always created by the `mapObj`_ class methods.
 */
final class imageObj
{
    /**
     * read-only
     *
     * @var int
     */
    public $width;

    /**
     * read-only
     *
     * @var int
     */
    public $height;

    /**
     * read-only
     *
     * @var int
     */
    public $resolution;

    /**
     * read-only
     *
     * @var int
     */
    public $resolutionfactor;

    /**
     * @var string
     */
    public $imagepath;

    /**
     * @var string
     */
    public $imageurl;

    /**
     * Copy srcImg on top of the current imageObj.
     * transparentColorHex is the color (in 0xrrggbb format) from srcImg
     * that should be considered transparent (i.e. those pixels won't
     * be copied).  Pass -1 if you don't want any transparent color.
     * If optional dstx,dsty are provided then it defines the position
     * where the image should be copied (dstx,dsty = top-left corner
     * position).
     * The optional angle is a value between 0 and 360 degrees to rotate
     * the source image counterclockwise.  Note that if an angle is specified
     * (even if its value is zero) then the dstx and dsty coordinates
     * specify the CENTER of the destination area.
     * Note: this function works only with 8 bits GD images (PNG or GIF).
     *
     * @param imageObj $srcImg
     * @param int $transparentColorHex
     * @param int $dstX
     * @param int $dstY
     * @param int $angle
     * @return void
     */
    final public function pasteImage(imageObj $srcImg, $transparentColorHex, $dstX, $dstY, $angle) {}

    /**
     * Writes image object to specified filename.
     * Passing no filename or an empty filename sends output to stdout.  In
     * this case, the PHP header() function should be used to set the
     * document's content-type prior to calling saveImage().  The output
     * format is the one that is currently selected in the map file.  The
     * second argument oMap is not manadatory. It is usful when saving to
     * formats like GTIFF that needs georeference information contained in
     * the map file. On success, it returns either MS_SUCCESS if writing to an
     * external file, or the number of bytes written if output is sent to
     * stdout.
     *
     * @param string $filename
     * @param mapObj $oMap
     * @return int
     */
    final public function saveImage($filename, mapObj $oMap) {}

    /**
     * Writes image to temp directory.  Returns image URL.
     * The output format is the one that is currently selected in the
     * map file.
     *
     * @return string
     */
    final public function saveWebImage() {}
}

final class labelcacheMemberObj
{
    /**
     * read-only
     *
     * @var int
     */
    public $classindex;

    /**
     * read-only
     *
     * @var int
     */
    public $featuresize;

    /**
     * read-only
     *
     * @var int
     */
    public $layerindex;

    /**
     * read-only
     *
     * @var int
     */
    public $markerid;

    /**
     * read-only
     *
     * @var int
     */
    public $numstyles;

    /**
     * read-only
     *
     * @var int
     */
    public $shapeindex;

    /**
     * read-only
     *
     * @var int
     */
    public $status;

    /**
     * read-only
     *
     * @var string
     */
    public $text;

    /**
     * read-only
     *
     * @var int
     */
    public $tileindex;
}

final class labelcacheObj
{
    /**
     * Free the label cache. Always returns MS_SUCCESS.
     * Ex : map->labelcache->freeCache();
     *
     * @return bool
     */
    final public function freeCache() {}
}

/**
 * labelObj are always embedded inside other classes.
 */
final class labelObj
{
    /**
     * @var int
     */
    public $align;

    /**
     * @var float
     */
    public $angle;

    /**
     * @var int
     */
    public $anglemode;

    /**
     * @var int
     */
    public $antialias;

    /**
     * @var int
     */
    public $autominfeaturesize;

    /**
     * (deprecated since 6.0)
     *
     * @var colorObj
     */
    public $backgroundcolor;

    /**
     * (deprecated since 6.0)
     *
     * @var colorObj
     */
    public $backgroundshadowcolor;

    /**
     * (deprecated since 6.0)
     *
     * @var int
     */
    public $backgroundshadowsizex;

    /**
     * (deprecated since 6.0)
     *
     * @var int
     */
    public $backgroundshadowsizey;

    /**
     * @var int
     */
    public $buffer;

    /**
     * @var colorObj
     */
    public $color;

    /**
     * @var string
     */
    public $encoding;

    /**
     * @var string
     */
    public $font;

    /**
     * @var int
     */
    public $force;

    /**
     * @var int
     */
    public $maxlength;

    /**
     * @var int
     */
    public $maxsize;

    /**
     * @var int
     */
    public $mindistance;

    /**
     * @var int
     */
    public $minfeaturesize;

    /**
     * @var int
     */
    public $minlength;

    /**
     * @var int
     */
    public $minsize;

    /**
     * @var int
     */
    public $numstyles;

    /**
     * @var int
     */
    public $offsetx;

    /**
     * @var int
     */
    public $offsety;

    /**
     * @var colorObj
     */
    public $outlinecolor;

    /**
     * @var int
     */
    public $outlinewidth;

    /**
     * @var int
     */
    public $partials;

    /**
     * @var int
     */
    public $position;

    /**
     * @var int
     */
    public $priority;

    /**
     * @var int
     */
    public $repeatdistance;

    /**
     * @var colorObj
     */
    public $shadowcolor;

    /**
     * @var int
     */
    public $shadowsizex;

    /**
     * @var int
     */
    public $shadowsizey;

    /**
     * @var int
     */
    public $size;

    /**
     * @var int
     */
    public $wrap;

    final public function __construct() {}

    /**
     * Saves the object to a string.  Provides the inverse option for
     * updateFromString.
     *
     * @return string
     */
    final public function convertToString() {}

    /**
     * Delete the style specified by the style index. If there are any
     * style that follow the deleted style, their index will decrease by 1.
     *
     * @param int $index
     * @return int
     */
    final public function deleteStyle($index) {}

    /**
     * Free the object properties and break the internal references.
     * Note that you have to unset the php variable to free totally the
     * resources.
     *
     * @return void
     */
    final public function free() {}

    /**
     * Get the attribute binding for a specified label property. Returns
     * NULL if there is no binding for this property.
     * Example:
     * .. code-block:: php
     * $oLabel->setbinding(MS_LABEL_BINDING_COLOR, "FIELD_NAME_COLOR");
     * echo $oLabel->getbinding(MS_LABEL_BINDING_COLOR); // FIELD_NAME_COLOR
     *
     * @param mixed $labelbinding
     * @return string
     */
    final public function getBinding($labelbinding) {}

    /**
     * Returns the label expression string.
     *
     * @return string
     */
    final public function getExpressionString() {}

    /**
     * Return the style object using an index. index >= 0 &&
     * index < label->numstyles.
     *
     * @param int $index
     * @return styleObj
     */
    final public function getStyle($index) {}

    /**
     * Returns the label text string.
     *
     * @return string
     */
    final public function getTextString() {}

    /**
     * The style specified by the style index will be moved down into
     * the array of classes. Returns MS_SUCCESS or MS_FAILURE.
     * ex label->movestyledown(0) will have the effect of moving style 0
     * up to position 1, and the style at position 1 will be moved
     * to position 0.
     *
     * @param int $index
     * @return int
     */
    final public function moveStyleDown($index) {}

    /**
     * The style specified by the style index will be moved up into
     * the array of classes. Returns MS_SUCCESS or MS_FAILURE.
     * ex label->movestyleup(1) will have the effect of moving style 1
     * up to position 0, and the style at position 0 will be moved
     * to position 1.
     *
     * @param int $index
     * @return int
     */
    final public function moveStyleUp($index) {}

    /**
     * Remove the attribute binding for a specfiled style property.
     * Example:
     * .. code-block:: php
     * $oStyle->removebinding(MS_LABEL_BINDING_COLOR);
     *
     * @param mixed $labelbinding
     * @return int
     */
    final public function removeBinding($labelbinding) {}

    /**
     * Set object property to a new value.
     *
     * @param string $property_name
     * @param  $new_value
     * @return int
     */
    final public function set($property_name, $new_value) {}

    /**
     * Set the attribute binding for a specified label property.
     * Example:
     * .. code-block:: php
     * $oLabel->setbinding(MS_LABEL_BINDING_COLOR, "FIELD_NAME_COLOR");
     * This would bind the color parameter with the data (ie will extract
     * the value of the color from the field called "FIELD_NAME_COLOR"
     *
     * @param mixed $labelbinding
     * @param string $value
     * @return int
     */
    final public function setBinding($labelbinding, $value) {}

    /**
     * Set the label expression.
     *
     * @param string $expression
     * @return int
     */
    final public function setExpression($expression) {}

    /**
     * Set the label text.
     *
     * @param string $text
     * @return int
     */
    final public function setText($text) {}

    /**
     * Update a label from a string snippet. Returns MS_SUCCESS/MS_FAILURE.
     *
     * @param string $snippet
     * @return int
     */
    final public function updateFromString($snippet) {}
}

/**
 * Layer Objects can be returned by the `mapObj`_ class, or can be
 * created using:
 * A second optional argument can be given to ms_newLayerObj() to create
 * the new layer as a copy of an existing layer. If a layer is given as
 * argument then all members of a this layer will be copied in the new
 * layer created.
 */
final class layerObj
{
    /**
     * @var int
     */
    public $annotate;

    /**
     * @var hashTableObj
     */
    public $bindvals;

    /**
     * @var string
     */
    public $classgroup;

    /**
     * @var string
     */
    public $classitem;

    /**
     * @var clusterObj
     */
    public $cluster;

    /**
     * @var string
     */
    public $connection;

    /**
     * read-only, use setConnectionType() to set it
     *
     * @var int
     */
    public $connectiontype;

    /**
     * @var string
     */
    public $data;

    /**
     * @var int
     */
    public $debug;

    /**
     * deprecated since 6.0
     *
     * @var int
     */
    public $dump;

    /**
     * @var string
     */
    public $filteritem;

    /**
     * @var string
     */
    public $footer;

    /**
     * only available on a layer defined as grid (MS_GRATICULE)
     *
     * @var gridObj
     */
    public $grid;

    /**
     * @var string
     */
    public $group;

    /**
     * @var string
     */
    public $header;

    /**
     * read-only
     *
     * @var int
     */
    public $index;

    /**
     * @var int
     */
    public $labelcache;

    /**
     * @var string
     */
    public $labelitem;

    /**
     * @var float
     */
    public $labelmaxscaledenom;

    /**
     * @var float
     */
    public $labelminscaledenom;

    /**
     * @var string
     */
    public $labelrequires;

    /**
     * @var string
     */
    public $mask;

    /**
     * @var int
     */
    public $maxfeatures;

    /**
     * @var float
     */
    public $maxscaledenom;

    /**
     * @var hashTableObj
     */
    public $metadata;

    /**
     * @var float
     */
    public $minscaledenom;

    /**
     * @var string
     */
    public $name;

    /**
     * @var int
     */
    public $num_processing;

    /**
     * read-only
     *
     * @var int
     */
    public $numclasses;

    /**
     * @var colorObj
     */
    public $offsite;

    /**
     * @var int
     */
    public $opacity;

    /**
     * @var projectionObj
     */
    public $projection;

    /**
     * @var int
     */
    public $postlabelcache;

    /**
     * @var string
     */
    public $requires;

    /**
     * @var int
     */
    public $sizeunits;

    /**
     * @var int
     */
    public $startindex;

    /**
     * MS_ON, MS_OFF, MS_DEFAULT or MS_DELETE
     *
     * @var int
     */
    public $status;

    /**
     * @var string
     */
    public $styleitem;

    /**
     * @var float
     */
    public $symbolscaledenom;

    /**
     * @var string
     */
    public $template;

    /**
     * @var string
     */
    public $tileindex;

    /**
     * @var string
     */
    public $tileitem;

    /**
     * @var float
     */
    public $tolerance;

    /**
     * @var int
     */
    public $toleranceunits;

    /**
     * @var int
     */
    public $transform;

    /**
     * @var int
     */
    public $type;

    /**
     * Old style constructor
     *
     * @param mapObj $map
     * @param layerObj $layer
     * @return layerObj
     */
    final public function ms_newLayerObj(mapObj $map, layerObj $layer) {}

    /**
     * Add a new feature in a layer. Returns MS_SUCCESS or MS_FAILURE on
     * error.
     *
     * @param shapeObj $shape
     * @return int
     */
    final public function addFeature(shapeObj $shape) {}

    /**
     * Apply the :ref:`SLD <sld>` document to the layer object.
     * The matching between the sld document and the layer will be done
     * using the layer's name.
     * If a namedlayer argument is passed (argument is optional),
     * the NamedLayer in the sld that matchs it will be used to style
     * the layer.
     * See :ref:`SLD HowTo <sld>` for more information on the SLD support.
     *
     * @param string $sldxml
     * @param string $namedlayer
     * @return int
     */
    final public function applySLD($sldxml, $namedlayer) {}

    /**
     * Apply the :ref:`SLD <sld>` document pointed by the URL to the
     * layer object. The matching between the sld document and the layer
     * will be done using the layer's name.  If a namedlayer argument is
     * passed (argument is optional), the NamedLayer in the sld that
     * matchs it will be used to style the layer.  See :ref:`SLD HowTo <sld>`
     * for more information on the SLD support.
     *
     * @param string $sldurl
     * @param string $namedlayer
     * @return int
     */
    final public function applySLDURL($sldurl, $namedlayer) {}

    /**
     * Clears all the processing strings.
     *
     * @return void
     */
    final public function clearProcessing() {}

    /**
     * Close layer previously opened with open().
     *
     * @return void
     */
    final public function close() {}

    /**
     * Saves the object to a string.  Provides the inverse option for
     * updateFromString.
     *
     * @return string
     */
    final public function convertToString() {}

    /**
     * Draw a single layer, add labels to cache if required.
     * Returns MS_SUCCESS or MS_FAILURE on error.
     *
     * @param imageObj $image
     * @return int
     */
    final public function draw(imageObj $image) {}

    /**
     * Draw query map for a single layer.
     * string   executeWFSGetfeature()
     * Executes a GetFeature request on a WFS layer and returns the
     * name of the temporary GML file created. Returns an empty
     * string on error.
     *
     * @param imageObj $image
     * @return int
     */
    final public function drawQuery(imageObj $image) {}

    /**
     * Free the object properties and break the internal references.
     * Note that you have to unset the php variable to free totally the
     * resources.
     *
     * @return void
     */
    final public function free() {}

    /**
     * Returns an SLD XML string based on all the classes found in the
     * layer (the layer must have `STATUS` `on`).
     *
     * @return string
     */
    final public function generateSLD() {}

    /**
     * Returns a classObj from the layer given an index value (0=first class)
     *
     * @param int $classIndex
     * @return classObj
     */
    final public function getClass($classIndex) {}

    /**
     * Get the class index of a shape for a given scale. Returns -1 if no
     * class matches. classgroup is an array of class ids to check
     * (Optional). numclasses is the number of classes that the classgroup
     * array contains. By default, all the layer classes will be checked.
     *
     * @param  $shape
     * @param  $classgroup
     * @param  $numclasses
     * @return int
     */
    final public function getClassIndex($shape, $classgroup, $numclasses) {}

    /**
     * Returns the layer's data extents or NULL on error.
     * If the layer's EXTENT member is set then this value is used,
     * otherwise this call opens/closes the layer to read the
     * extents. This is quick on shapefiles, but can be
     * an expensive operation on some file formats or data sources.
     * This function is safe to use on both opened or closed layers: it
     * is not necessary to call open()/close() before/after calling it.
     *
     * @return rectObj
     */
    final public function getExtent() {}

    /**
     * Returns the :ref:`expression <expressions>` for this layer or NULL
     * on error.
     *
     * @return string|null
     */
    final public function getFilterString() {}

    /**
     * Returns an array containing the grid intersection coordinates. If
     * there are no coordinates, it returns an empty array.
     *
     * @return array
     */
    final public function getGridIntersectionCoordinates() {}

    /**
     * Returns an array containing the items. Must call open function first.
     * If there are no items, it returns an empty array.
     *
     * @return array
     */
    final public function getItems() {}

    /**
     * Fetch layer metadata entry by name.  Returns "" if no entry
     * matches the name.  Note that the search is case sensitive.
     * .. note::
     * getMetaData's query is case sensitive.
     *
     * @param string $name
     * @return int
     */
    final public function getMetaData($name) {}

    /**
     * Returns the number of results in the last query.
     *
     * @return int
     */
    final public function getNumResults() {}

    /**
     * Returns an array containing the processing strings.
     * If there are no processing strings, it returns an empty array.
     *
     * @return array
     */
    final public function getProcessing() {}

    /**
     * Returns a string representation of the :ref:`projection <projection>`.
     * Returns NULL on error or if no projection is set.
     *
     * @return string
     */
    final public function getProjection() {}

    /**
     * Returns a resultObj by index from a layer object with
     * index in the range 0 to numresults-1.
     * Returns a valid object or FALSE(0) if index is invalid.
     *
     * @param int $index
     * @return resultObj
     */
    final public function getResult($index) {}

    /**
     * Returns the bounding box of the latest result.
     *
     * @return rectObj
     */
    final public function getResultsBounds() {}

    /**
     * If the resultObj passed has a valid resultindex, retrieve shapeObj from
     * a layer's resultset. (You get it from the resultObj returned by
     * getResult() for instance). Otherwise, it will do a single query on
     * the layer to fetch the shapeindex
     * .. code-block:: php
     * $map = new mapObj("gmap75.map");
     * $l = $map->getLayerByName("popplace");
     * $l->queryByRect($map->extent);
     * for ($i = 0; $i < $l->getNumResults(); $i++) {
     *     $s = $l->getShape($l->getResult($i));
     *     echo $s->getValue($l,"Name");
     *     echo "\n";
     * }
     *
     * @param resultObj $result
     * @return shapeObj
     */
    final public function getShape(resultObj $result) {}

    /**
     * Returns a WMS GetFeatureInfo URL (works only for WMS layers)
     * clickX, clickY is the location of to query in pixel coordinates
     * with (0,0) at the top left of the image.
     * featureCount is the number of results to return.
     * infoFormat is the format the format in which the result should be
     * requested.  Depends on remote server's capabilities.  MapServer
     * WMS servers support only "MIME" (and should support "GML.1" soon).
     * Returns "" and outputs a warning if layer is not a WMS layer
     * or if it is not queriable.
     *
     * @param int $clickX
     * @param int $clickY
     * @param int $featureCount
     * @param string $infoFormat
     * @return string
     */
    final public function getWMSFeatureInfoURL($clickX, $clickY, $featureCount, $infoFormat) {}

    /**
     * Returns MS_TRUE/MS_FALSE depending on whether the layer is
     * currently visible in the map (i.e. turned on, in scale, etc.).
     *
     * @return bool
     */
    final public function isVisible() {}

    /**
     * The class specified by the class index will be moved down into
     * the array of layers. Returns MS_SUCCESS or MS_FAILURE.
     * ex layer->moveclassdown(0) will have the effect of moving class 0
     * up to position 1, and the class at position 1 will be moved
     * to position 0.
     *
     * @param int $index
     * @return int
     */
    final public function moveclassdown($index) {}

    /**
     * The class specified by the class index will be moved up into
     * the array of layers. Returns MS_SUCCESS or MS_FAILURE.
     * ex layer->moveclassup(1) will have the effect of moving class 1
     * up to position 0, and the class at position 0 will be moved
     * to position 1.
     *
     * @param int $index
     * @return int
     */
    final public function moveclassup($index) {}

    /**
     * Open the layer for use with getShape().
     * Returns MS_SUCCESS/MS_FAILURE.
     *
     * @return int
     */
    final public function open() {}

    /**
     * Called after msWhichShapes has been called to actually retrieve
     * shapes within a given area. Returns a shape object or NULL on
     * error.
     * .. code-block:: php
     * $map = ms_newmapobj("d:/msapps/gmap-ms40/htdocs/gmap75.map");
     * $layer = $map->getLayerByName('road');
     * $status = $layer->open();
     * $status = $layer->whichShapes($map->extent);
     * while ($shape = $layer->nextShape())
     * {
     * echo $shape->index ."<br>\n";
     * }
     * $layer->close();
     *
     * @return shapeObj
     */
    final public function nextShape() {}

    /**
     * Query layer for shapes that intersect current map extents.  qitem
     * is the item (attribute) on which the query is performed, and
     * qstring is the expression to match.  The query is performed on all
     * the shapes that are part of a :ref:`CLASS` that contains a
     * :ref:`TEMPLATE <template>` value or that match any class in a
     * layer that contains a :ref:`LAYER` :ref:`TEMPLATE <template>`
     * value.  Note that the layer's FILTER/FILTERITEM are ignored by
     * this function.  Mode is MS_SINGLE or MS_MULTIPLE depending on
     * number of results you want.  Returns MS_SUCCESS if shapes were
     * found or MS_FAILURE if nothing was found or if some other error
     * happened (note that the error message in case nothing was found
     * can be avoided in PHP using the '@' control operator).
     *
     * @param string $qitem
     * @param string $qstring
     * @param int $mode
     * @return int
     */
    final public function queryByAttributes($qitem, $qstring, $mode) {}

    /**
     * Perform a query set based on a previous set of results from
     * another layer. At present the results MUST be based on a polygon
     * layer.
     * Returns MS_SUCCESS if shapes were found or MS_FAILURE if nothing
     * was found or if some other error happened (note that the error
     * message in case nothing was found can be avoided in PHP using
     * the '@' control operator).
     *
     * @param int $slayer
     * @return int
     */
    final public function queryByFeatures($slayer) {}

    /**
     * Query layer at point location specified in georeferenced map
     * coordinates (i.e. not pixels).
     * The query is performed on all the shapes that are part of a CLASS
     * that contains a TEMPLATE value or that match any class in a
     * layer that contains a LAYER TEMPLATE value.
     * Mode is MS_SINGLE or MS_MULTIPLE depending on number of results
     * you want.
     * Passing buffer -1 defaults to tolerances set in the map file
     * (in pixels) but you can use a constant buffer (specified in
     * ground units) instead.
     * Returns MS_SUCCESS if shapes were found or MS_FAILURE if nothing
     * was found or if some other error happened (note that the error
     * message in case nothing was found can be avoided in PHP using
     * the '@' control operator).
     *
     * @param pointObj $point
     * @param int $mode
     * @param float $buffer
     * @return int
     */
    final public function queryByPoint(pointObj $point, $mode, $buffer) {}

    /**
     * Query layer using a rectangle specified in georeferenced map
     * coordinates (i.e. not pixels).
     * The query is performed on all the shapes that are part of a CLASS
     * that contains a TEMPLATE value or that match any class in a
     * layer that contains a LAYER TEMPLATE value.
     * Returns MS_SUCCESS if shapes were found or MS_FAILURE if nothing
     * was found or if some other error happened (note that the error
     * message in case nothing was found can be avoided in PHP using
     * the '@' control operator).
     *
     * @param rectObj $rect
     * @return int
     */
    final public function queryByRect(rectObj $rect) {}

    /**
     * Query layer based on a single shape, the shape has to be a polygon
     * at this point.
     * Returns MS_SUCCESS if shapes were found or MS_FAILURE if nothing
     * was found or if some other error happened (note that the error
     * message in case nothing was found can be avoided in PHP using
     * the '@' control operator).
     *
     * @param shapeObj $shape
     * @return int
     */
    final public function queryByShape(shapeObj $shape) {}

    /**
     * Removes the class indicated and returns a copy, or NULL in the case
     * of a failure.  Note that subsequent classes will be renumbered by
     * this operation. The numclasses field contains the number of classes
     * available.
     *
     * @param int $index
     * @return classObj|null
     */
    final public function removeClass($index) {}

    /**
     * Remove a metadata entry for the layer.  Returns MS_SUCCESS/MS_FAILURE.
     *
     * @param string $name
     * @return int
     */
    final public function removeMetaData($name) {}

    /**
     * Set object property to a new value.
     *
     * @param string $property_name
     * @param  $new_value
     * @return int
     */
    final public function set($property_name, $new_value) {}

    /**
     * Changes the connectiontype of the layer and recreates the vtable
     * according to the new connection type. This method should be used
     * instead of setting the connectiontype parameter directly.
     * In the case when the layer.connectiontype = MS_PLUGIN the plugin_library
     * parameter should also be specified so as to select the library to
     * load by MapServer. For the other connection types this parameter
     * is not used.
     *
     * @param int $connectiontype
     * @param string $plugin_library
     * @return int
     */
    final public function setConnectionType($connectiontype, $plugin_library) {}

    /**
     * Set layer filter :ref:`expression <expressions>`.
     *
     * @param string $expression
     * @return int
     */
    final public function setFilter($expression) {}

    /**
     * Set a metadata entry for the layer.  Returns MS_SUCCESS/MS_FAILURE.
     * int setProcessing(string)
     * Add the string to the processing string list for the layer.
     * The layer->num_processing is incremented by 1.
     * Returns MS_SUCCESS or MS_FAILURE on error.
     * .. code-block:: php
     * $oLayer->setprocessing("SCALE_1=AUTO");
     * $oLayer->setprocessing("SCALE_2=AUTO");
     *
     * @param string $name
     * @param string $value
     * @return int
     */
    final public function setMetaData($name, $value) {}

    /**
     * Set layer :ref:`projection <projection>` and coordinate system.
     * Parameters are given as a single string of comma-delimited PROJ.4
     * parameters. Returns MS_SUCCESS or MS_FAILURE on error.
     *
     * @param string $proj_params
     * @return int
     */
    final public function setProjection($proj_params) {}

    /**
     * Same as setProjection(), but takes an OGC WKT projection
     * definition string as input.
     * .. note::
     * setWKTProjection requires GDAL support
     *
     * @param string $proj_params
     * @return int
     */
    final public function setWKTProjection($proj_params) {}

    /**
     * Update a layer from a string snippet. Returns MS_SUCCESS/MS_FAILURE.
     * .. code-block:: php
     * modify the name
     * $oLayer->updateFromString('LAYER NAME land_fn2 END');
     * add a new class
     * $oLayer->updateFromString('LAYER CLASS STYLE COLOR 255 255 0 END END END');
     * int whichshapes(rectobj)
     * Performs a spatial, and optionally an attribute based feature
     * search.  The function basically prepares things so that candidate
     * features can be accessed by query or drawing functions (eg using
     * nextshape function).  Returns MS_SUCCESS, MS_FAILURE or MS_DONE.
     * MS_DONE is returned if the layer extent does not overlap the
     * rectObj.
     *
     * @param string $snippet
     * @return int
     */
    final public function updateFromString($snippet) {}
}

/**
 * Instances of legendObj are always are always embedded inside the `mapObj`_.
 */
final class legendObj
{
    /**
     * @var int
     */
    public $height;

    /**
     * @var colorObj
     */
    public $imagecolor;

    /**
     * @var int
     */
    public $keysizex;

    /**
     * @var int
     */
    public $keysizey;

    /**
     * @var int
     */
    public $keyspacingx;

    /**
     * @var int
     */
    public $keyspacingy;

    /**
     * @var labelObj
     */
    public $label;

    /**
     * Color of outline of box, -1 for no outline
     *
     * @var colorObj
     */
    public $outlinecolor;

    /**
     * for embedded legends, MS_UL, MS_UC, ...
     *
     * @var int
     */
    public $position;

    /**
     * MS_TRUE, MS_FALSE
     *
     * @var int
     */
    public $postlabelcache;

    /**
     * MS_ON, MS_OFF, MS_EMBED
     *
     * @var int
     */
    public $status;

    /**
     * @var string
     */
    public $template;

    /**
     * @var int
     */
    public $width;

    /**
     * Saves the object to a string.  Provides the inverse option for
     * updateFromString.
     *
     * @return string
     */
    final public function convertToString() {}

    /**
     * Free the object properties and break the internal references.
     * Note that you have to unset the php variable to free totally the
     * resources.
     *
     * @return void
     */
    final public function free() {}

    /**
     * Set object property to a new value.
     *
     * @param string $property_name
     * @param  $new_value
     * @return int
     */
    final public function set($property_name, $new_value) {}

    /**
     * Update a legend from a string snippet. Returns MS_SUCCESS/MS_FAILURE.
     *
     * @param string $snippet
     * @return int
     */
    final public function updateFromString($snippet) {}
}

final class lineObj
{
    /**
     * read-only
     *
     * @var int
     */
    public $numpoints;

    final public function __construct() {}

    /**
     * Old style constructor
     *
     * @return lineObj
     */
    final public function ms_newLineObj() {}

    /**
     * Add a point to the end of line. Returns MS_SUCCESS/MS_FAILURE.
     *
     * @param pointObj $point
     * @return int
     */
    final public function add(pointObj $point) {}

    /**
     * Add a point to the end of line. Returns MS_SUCCESS/MS_FAILURE.
     * .. note::
     * the 3rd parameter m is used for measured shape files only.
     * It is not mandatory.
     *
     * @param float $x
     * @param float $y
     * @param float $m
     * @return int
     */
    final public function addXY($x, $y, $m) {}

    /**
     * Add a point to the end of line. Returns MS_SUCCESS/MS_FAILURE.
     * .. note::
     * the 4th parameter m is used for measured shape files only.
     * It is not mandatory.
     *
     * @param float $x
     * @param float $y
     * @param float $z
     * @param float $m
     * @return int
     */
    final public function addXYZ($x, $y, $z, $m) {}

    /**
     * Returns a reference to point number i.
     *
     * @param int $i
     * @return pointObj
     */
    final public function point($i) {}

    /**
     * Project the line from "in" projection (1st argument) to "out"
     * projection (2nd argument).  Returns MS_SUCCESS/MS_FAILURE.
     *
     * @param projectionObj $in
     * @param projectionObj $out
     * @return int
     */
    final public function project(projectionObj $in, projectionObj $out) {}
}

final class mapObj
{
    /**
     * @var float
     */
    public $cellsize;

    /**
     * @var int
     */
    public $debug;

    /**
     * pixels per inch, defaults to 72
     *
     * @var float
     */
    public $defresolution;

    /**
     * ;
     *
     * @var rectObj
     */
    public $extent;

    /**
     * read-only, set by setFontSet()
     *
     * @var string
     */
    public $fontsetfilename;

    /**
     * see setSize()
     *
     * @var int
     */
    public $height;

    /**
     * @var colorObj
     */
    public $imagecolor;

    /**
     * @var int
     */
    public $keysizex;

    /**
     * @var int
     */
    public $keysizey;

    /**
     * @var int
     */
    public $keyspacingx;

    /**
     * @var int
     */
    public $keyspacingy;

    /**
     * no members. Used only to free the
     * label cache (map->labelcache->free()
     *
     * @var labelcacheObj
     */
    public $labelcache;

    /**
     * @var legendObj
     */
    public $legend;

    /**
     * @var string
     */
    public $mappath;

    /**
     * @var int
     */
    public $maxsize;

    /**
     * @var hashTableObj
     */
    public $metadata;

    /**
     * @var string
     */
    public $name;

    /**
     * read-only
     *
     * @var int
     */
    public $numlayers;

    /**
     * @var outputformatObj
     */
    public $outputformat;

    /**
     * read-only
     *
     * @var int
     */
    public $numoutputformats;

    /**
     * @var projectionObj
     */
    public $projection;

    /**
     * @var querymapObj
     */
    public $querymap;

    /**
     * @var referenceMapObj
     */
    public $reference;

    /**
     * pixels per inch, defaults to 72
     *
     * @var float
     */
    public $resolution;

    /**
     * @var scalebarObj
     */
    public $scalebar;

    /**
     * read-only, set by drawMap()
     *
     * @var float
     */
    public $scaledenom;

    /**
     * @var string
     */
    public $shapepath;

    /**
     * @var int
     */
    public $status;

    /**
     * read-only, set by setSymbolSet()
     *
     * @var string
     */
    public $symbolsetfilename;

    /**
     * map units type
     *
     * @var int
     */
    public $units;

    /**
     * @var webObj
     */
    public $web;

    /**
     * see setSize()
     *
     * @var int
     */
    public $width;

    /**
     * Returns a new object to deal with a MapServer map file.
     * Construct a new mapObj from a mapfile string. Returns a new object to deal
     * with a MapServer map file.
     * .. note::
     * By default, the SYMBOLSET, FONTSET, and other paths in the mapfile
     * are relative to the mapfile location.  If new_map_path is provided
     * then this directory will be used as the base path for all the
     * rewlative paths inside the mapfile.
     *
     * @param string $map_file_name
     * @param string $new_map_path
     */
    final public function __construct($map_file_name, $new_map_path) {}

    /**
     * Old style constructor
     *
     * @param string $map_file_string
     * @param string $new_map_path
     * @return mapObj
     */
    final public function ms_newMapObjFromString($map_file_string, $new_map_path) {}

    /**
     * Applies the config options set in the map file. For example
     * setting the PROJ_LIB using the setconfigoption only modifies
     * the value in the map object. applyconfigoptions will actually
     * change the PROJ_LIB value that will be used when dealing with
     * projection.
     *
     * @return int
     */
    final public function applyconfigoptions() {}

    /**
     * Apply the :ref:`SLD` document to the map file. The matching between the
     * sld document and the map file will be done using the layer's name.
     * See :ref:`SLD HowTo <sld>` for more information on the SLD support.
     *
     * @param string $sldxml
     * @return int
     */
    final public function applySLD($sldxml) {}

    /**
     * Apply the SLD document pointed by the URL to the map file. The
     * matching between the sld document and the map file will be done
     * using the layer's name.
     * See :ref:`SLD HowTo <sld>` for more information on the SLD support.
     *
     * @param string $sldurl
     * @return int
     */
    final public function applySLDURL($sldurl) {}

    /**
     * Saves the object to a string.
     * .. note::
     * The inverse method updateFromString does not exist for the mapObj
     * .. versionadded:: 6.4
     *
     * @return string
     */
    final public function convertToString() {}

    /**
     * Render map and return an image object or NULL on error.
     *
     * @return imageObj|null
     */
    final public function draw() {}

    /**
     * Renders the labels for a map. Returns MS_SUCCESS or MS_FAILURE on error.
     *
     * @param imageObj $image
     * @return int
     */
    final public function drawLabelCache(imageObj $image) {}

    /**
     * Render legend and return an image object.
     *
     * @return imageObj
     */
    final public function drawLegend() {}

    /**
     * Render a query map and return an image object or NULL on error.
     *
     * @return imageObj|null
     */
    final public function drawQuery() {}

    /**
     * Render reference map and return an image object.
     *
     * @return imageObj
     */
    final public function drawReferenceMap() {}

    /**
     * Render scale bar and return an image object.
     *
     * @return imageObj
     */
    final public function drawScaleBar() {}

    /**
     * embeds a legend. Actually the legend is just added to the label
     * cache so you must invoke drawLabelCache() to actually do the
     * rendering (unless postlabelcache is set in which case it is
     * drawn right away). Returns MS_SUCCESS or MS_FAILURE on error.
     *
     * @param imageObj $image
     * @return int
     */
    final public function embedLegend(imageObj $image) {}

    /**
     * embeds a scalebar. Actually the scalebar is just added to the label
     * cache so you must invoke drawLabelCache() to actually do the rendering
     * (unless postlabelcache is set in which case it is drawn right away).
     * Returns MS_SUCCESS or MS_FAILURE on error.
     *
     * @param imageObj $image
     * @return int
     */
    final public function embedScalebar(imageObj $image) {}

    /**
     * Free the object properties and break the internal references.
     * Note that you have to unset the php variable to free totally the
     * resources.
     * void freeQuery(layerindex)
     * Frees the query result on a specified layer. If the layerindex is -1,
     * all queries on layers will be freed.
     *
     * @return void
     */
    final public function free() {}

    /**
     * Returns an SLD XML string based on all the classes found in all
     * the layers that have `STATUS` `on`.
     *
     * @return string
     */
    final public function generateSLD() {}

    /**
     * Return an array containing all the group names used in the
     * layers. If there are no groups, it returns an empty array.
     *
     * @return array
     */
    final public function getAllGroupNames() {}

    /**
     * Return an array containing all the layer names.
     * If there are no layers, it returns an empty array.
     *
     * @return array
     */
    final public function getAllLayerNames() {}

    /**
     * Returns a colorObj corresponding to the color index in the
     * palette.
     *
     * @param int $iCloIndex
     * @return colorObj
     */
    final public function getColorbyIndex($iCloIndex) {}

    /**
     * Returns the config value associated with the key.
     * Returns an empty sting if key not found.
     *
     * @param string $key
     * @return string
     */
    final public function getConfigOption($key) {}

    /**
     * Returns a labelcacheMemberObj from the map given an index value
     * (0=first label).  Labelcache has to be enabled.
     * .. code-block:: php
     * while ($oLabelCacheMember = $oMap->getLabel($i)) {
     *  do something with the labelcachemember
     * ++$i;
     * }
     *
     * @param int $index
     * @return labelcacheMemberObj
     */
    final public function getLabel($index) {}

    /**
     * Returns a layerObj from the map given an index value (0=first layer)
     *
     * @param int $index
     * @return layerObj
     */
    final public function getLayer($index) {}

    /**
     * Returns a layerObj from the map given a layer name.
     * Returns NULL if layer doesn't exist.
     *
     * @param string $layer_name
     * @return layerObj
     */
    final public function getLayerByName($layer_name) {}

    /**
     * Return an array containing layer's index in the order which they
     * are drawn. If there are no layers, it returns an empty array.
     *
     * @return array
     */
    final public function getLayersDrawingOrder() {}

    /**
     * Return an array containing all the layer's indexes given
     * a group name. If there are no layers, it returns an empty array.
     *
     * @param string $groupname
     * @return array
     */
    final public function getLayersIndexByGroup($groupname) {}

    /**
     * Fetch metadata entry by name (stored in the :ref:`WEB` object in
     * the map file).  Returns "" if no entry matches the name.
     * .. note::
     * getMetaData's query is case sensitive.
     *
     * @param string $name
     * @return int
     */
    final public function getMetaData($name) {}

    /**
     * Return the number of symbols in map.
     *
     * @return int
     */
    final public function getNumSymbols() {}

    /**
     * Returns a string representation of the projection.
     * Returns NULL on error or if no projection is set.
     *
     * @return string
     */
    final public function getProjection() {}

    /**
     * Returns the symbol index using the name.
     *
     * @param string $symbol_name
     * @return int
     */
    final public function getSymbolByName($symbol_name) {}

    /**
     * Returns the symbol object using a symbol id. Refer to
     * the symbol object reference section for more details.
     * int insertLayer( layerObj layer [, int nIndex=-1 ] )
     * Insert a copy of *layer* into the Map at index *nIndex*.  The
     * default value of *nIndex* is -1, which means the last possible
     * index.  Returns the index of the new Layer, or -1 in the case of a
     * failure.
     *
     * @param int $symbolid
     * @return symbolObj
     */
    final public function getSymbolObjectById($symbolid) {}

    /**
     * Available only if WMS support is enabled.  Load a :ref:`WMS Map Context <map_context>`
     * XML file into the current mapObj.  If the
     * map already contains some layers then the layers defined in the
     * WMS Map context document are added to the current map.  The 2nd
     * argument unique_layer_name is optional and if set to MS_TRUE
     * layers created will have a unique name (unique prefix added to the
     * name). If set to MS_FALSE the layer name will be the the same name
     * as in the context. The default value is MS_FALSE.  Returns
     * MS_SUCCESS/MS_FAILURE.
     *
     * @param string $filename
     * @param bool $unique_layer_name
     * @return int
     */
    final public function loadMapContext($filename, $unique_layer_name) {}

    /**
     * Load OWS request parameters (BBOX, LAYERS, &c.) into map.  Returns
     * MS_SUCCESS or MS_FAILURE.  2nd argument version is not mandatory.
     * If not given, the version will be set to 1.1.1
     * int loadQuery(filename)
     * Loads a query from a file. Returns MS_SUCCESS or MS_FAILURE.
     * To be used with savequery.
     *
     * @param OwsrequestObj $request
     * @param string $version
     * @return int
     */
    final public function loadOWSParameters(OwsrequestObj $request, $version) {}

    /**
     * Move layer down in the hierarchy of drawing.
     * Returns MS_SUCCESS or MS_FAILURE on error.
     *
     * @param int $layerindex
     * @return int
     */
    final public function moveLayerDown($layerindex) {}

    /**
     * Move layer up in the hierarchy of drawing.
     * Returns MS_SUCCESS or MS_FAILURE on error.
     *
     * @param int $layerindex
     * @return int
     */
    final public function moveLayerUp($layerindex) {}

    /**
     * Offset the map extent based on the given distances in map coordinates.
     * Returns MS_SUCCESS or MS_FAILURE.
     *
     * @param float $x
     * @param float $y
     * @return int
     */
    final public function offsetExtent($x, $y) {}

    /**
     * Processes and executes the passed OpenGIS Web Services request on
     * the map.  Returns MS_DONE (2) if there is no valid OWS request in
     * the req object, MS_SUCCESS (0) if an OWS request was successfully
     * processed and MS_FAILURE (1) if an OWS request was not
     * successfully processed.  OWS requests include :ref:`WMS <wms_server>`,
     * :ref:`WFS <wfs_server>`, :ref:`WCS <wcs_server>`
     * and :ref:`SOS <sos_server>` requests supported by MapServer.
     * Results of a dispatched request are written to stdout and can be
     * captured using the msIO services (ie. ms_ioinstallstdouttobuffer()
     * and ms_iogetstdoutbufferstring())
     *
     * @param OwsrequestObj $request
     * @return int
     */
    final public function owsDispatch(OwsrequestObj $request) {}

    /**
     * Return a blank image object.
     *
     * @return imageObj
     */
    final public function prepareImage() {}

    /**
     * Calculate the scale of the map and set map->scaledenom.
     *
     * @return void
     */
    final public function prepareQuery() {}

    /**
     * Process legend template files and return the result in a buffer.
     * .. seealso::
     * :ref:`processtemplate <processtemplate>`
     *
     * @param array $params
     * @return string
     */
    final public function processLegendTemplate(array $params) {}

    /**
     * Process query template files and return the result in a buffer.
     * Second argument generateimages is not mandatory. If not given
     * it will be set to TRUE.
     * .. seealso::
     * :ref:`processtemplate <processtemplate>`
     * .. _processtemplate:
     *
     * @param array $params
     * @param bool $generateimages
     * @return string
     */
    final public function processQueryTemplate(array $params, $generateimages) {}

    /**
     * Process the template file specified in the web object and return the
     * result in a buffer. The processing consists of opening the template
     * file and replace all the tags found in it. Only tags that have an
     * equivalent element in the map object are replaced (ex [scaledenom]).
     * The are two exceptions to the previous statement :
     * - [img], [scalebar], [ref], [legend] would be replaced with the
     * appropriate url if the parameter generateimages is set to
     * MS_TRUE. (Note :  the images corresponding to the different objects
     * are generated if the object is set to MS_ON in the map file)
     * - the user can use the params parameter to specify tags and
     * their values. For example if the user have a specific tag call
     * [my_tag] and would like it to be replaced by "value_of_my_tag"
     * he would do
     * .. code-block:: php
     * $tmparray["my_tag"] = "value_of_my_tag";
     * $map->processtemplate($tmparray, MS_FALSE);
     *
     * @param array $params
     * @param bool $generateimages
     * @return string
     */
    final public function processTemplate(array $params, $generateimages) {}

    /**
     * Perform a query based on a previous set of results from
     * a layer. At present the results MUST be based on a polygon layer.
     * Returns MS_SUCCESS if shapes were found or MS_FAILURE if nothing
     * was found or if some other error happened (note that the error
     * message in case nothing was found can be avoided in PHP using
     * the '@' control operator).
     *
     * @param int $slayer
     * @return int
     */
    final public function queryByFeatures($slayer) {}

    /**
     * Add a specific shape on a given layer to the query result.
     * If addtoquery (which is a non mandatory argument) is set to MS_TRUE,
     * the shape will be added to the existing query list. Default behavior
     * is to free the existing query list and add only the new shape.
     *
     * @param  $layerindex
     * @param  $tileindex
     * @param  $shapeindex
     * @param  $addtoquery
     * @return int
     */
    final public function queryByIndex($layerindex, $tileindex, $shapeindex, $addtoquery) {}

    /**
     * Query all selected layers in map at point location specified in
     * georeferenced map coordinates (i.e. not pixels).
     * The query is performed on all the shapes that are part of a :ref:`CLASS`
     * that contains a :ref:`TEMPLATE` value or that match any class in a
     * layer that contains a :ref:`LAYER` :ref:`TEMPLATE <template>` value.
     * Mode is MS_SINGLE or MS_MULTIPLE depending on number of results
     * you want.
     * Passing buffer -1 defaults to tolerances set in the map file
     * (in pixels) but you can use a constant buffer (specified in
     * ground units) instead.
     * Returns MS_SUCCESS if shapes were found or MS_FAILURE if nothing
     * was found or if some other error happened (note that the error
     * message in case nothing was found can be avoided in PHP using
     * the '@' control operator).
     *
     * @param pointObj $point
     * @param int $mode
     * @param float $buffer
     * @return int
     */
    final public function queryByPoint(pointObj $point, $mode, $buffer) {}

    /**
     * Query all selected layers in map using a rectangle specified in
     * georeferenced map coordinates (i.e. not pixels).  The query is
     * performed on all the shapes that are part of a :ref:`CLASS` that
     * contains a :ref:`TEMPLATE` value or that match any class in a
     * layer that contains a :ref:`LAYER` :ref:`TEMPLATE <template>`
     * value.  Returns MS_SUCCESS if shapes were found or MS_FAILURE if
     * nothing was found or if some other error happened (note that the
     * error message in case nothing was found can be avoided in PHP
     * using the '@' control operator).
     *
     * @param rectObj $rect
     * @return int
     */
    final public function queryByRect(rectObj $rect) {}

    /**
     * Query all selected layers in map based on a single shape, the
     * shape has to be a polygon at this point.
     * Returns MS_SUCCESS if shapes were found or MS_FAILURE if nothing
     * was found or if some other error happened (note that the error
     * message in case nothing was found can be avoided in PHP using
     * the '@' control operator).
     *
     * @param shapeObj $shape
     * @return int
     */
    final public function queryByShape(shapeObj $shape) {}

    /**
     * Remove a layer from the mapObj. The argument is the index of the
     * layer to be removed. Returns the removed layerObj on success, else
     * null.
     *
     * @param int $nIndex
     * @return layerObj
     */
    final public function removeLayer($nIndex) {}

    /**
     * Remove a metadata entry for the map (stored in the WEB object in the map
     * file).  Returns MS_SUCCESS/MS_FAILURE.
     *
     * @param string $name
     * @return int
     */
    final public function removeMetaData($name) {}

    /**
     * Save current map object state to a file. Returns -1 on error.
     * Use absolute path. If a relative path is used, then it will be
     * relative to the mapfile location.
     *
     * @param string $filename
     * @return int
     */
    final public function save($filename) {}

    /**
     * Available only if WMS support is enabled.  Save current map object
     * state in :ref:`WMS Map Context <map_context>` format.  Only WMS
     * layers are saved in the WMS Map Context XML file.  Returns
     * MS_SUCCESS/MS_FAILURE.
     *
     * @param string $filename
     * @return int
     */
    final public function saveMapContext($filename) {}

    /**
     * Save the current query in a file. Results determines the save format -
     * MS_TRUE (or 1/true) saves the query results (tile index and shape index),
     * MS_FALSE (or 0/false) the query parameters (and the query will be re-run
     * in loadquery). Returns MS_SUCCESS or MS_FAILURE. Either save format can be
     * used with loadquery. See RFC 65 and ticket #3647 for details of different
     * save formats.
     *
     * @param string $filename
     * @param int $results
     * @return int
     */
    final public function saveQuery($filename, $results) {}

    /**
     * Scale the map extent using the zoomfactor and ensure the extent
     * within the minscaledenom and maxscaledenom domain.  If
     * minscaledenom and/or maxscaledenom is 0 then the parameter is not
     * taken into account.  Returns MS_SUCCESS or MS_FAILURE.
     *
     * @param float $zoomfactor
     * @param float $minscaledenom
     * @param float $maxscaledenom
     * @return int
     */
    final public function scaleExtent($zoomfactor, $minscaledenom, $maxscaledenom) {}

    /**
     * Selects the output format to be used in the map.
     * Returns MS_SUCCESS/MS_FAILURE.
     * .. note::
     * the type used should correspond to one of the output formats
     * declared in the map file.  The type argument passed is compared
     * with the mimetype parameter in the output format structure and
     * then to the name parameter in the structure.
     *
     * @param string $type
     * @return int
     */
    final public function selectOutputFormat($type) {}

    /**
     * Appends outputformat object in the map object.
     * Returns the new numoutputformats value.
     *
     * @param outputFormatObj $outputFormat
     * @return int
     */
    final public function appendOutputFormat(outputFormatObj $outputFormat) {}

    /**
     * Remove outputformat from the map.
     * Returns MS_SUCCESS/MS_FAILURE.
     *
     * @param string $name
     * @return int
     */
    final public function removeOutputFormat($name) {}

    /**
     * Returns the outputformat at index position.
     *
     * @param int $index
     * @return outputFormatObj
     */
    final public function getOutputFormat($index) {}

    /**
     * Set map object property to new value.
     *
     * @param string $property_name
     * @param  $new_value
     * @return int
     */
    final public function set($property_name, $new_value) {}

    /**
     * Set the map center to the given map point.
     * Returns MS_SUCCESS or MS_FAILURE.
     *
     * @param pointObj $center
     * @return int
     */
    final public function setCenter(pointObj $center) {}

    /**
     * Sets a config parameter using the key and the value passed
     *
     * @param string $key
     * @param string $value
     * @return int
     */
    final public function setConfigOption($key, $value) {}

    /**
     * Set the map extents using the georef extents passed in argument.
     * Returns MS_SUCCESS or MS_FAILURE on error.
     *
     * @param float $minx
     * @param float $miny
     * @param float $maxx
     * @param float $maxy
     * @return void
     */
    final public function setExtent($minx, $miny, $maxx, $maxy) {}

    /**
     * Load and set a new :ref:`fontset`.
     * boolean  setLayersDrawingOrder(array layeryindex)
     * Set the layer's order array. The argument passed must be a valid
     * array with all the layer's index.
     * Returns MS_SUCCESS or MS_FAILURE on error.
     *
     * @param string $fileName
     * @return int
     */
    final public function setFontSet($fileName) {}

    /**
     * Set a metadata entry for the map (stored in the WEB object in the map
     * file).  Returns MS_SUCCESS/MS_FAILURE.
     *
     * @param string $name
     * @param string $value
     * @return int
     */
    final public function setMetaData($name, $value) {}

    /**
     * Set map projection and coordinate system. Returns MS_SUCCESS or
     * MS_FAILURE on error.
     * Parameters are given as a single string of comma-delimited PROJ.4
     * parameters.  The argument : bSetUnitsAndExtents is used to
     * automatically update the map units and extents based on the new
     * projection. Possible values are MS_TRUE and MS_FALSE. By default it is
     * set at MS_FALSE.
     *
     * @param string $proj_params
     * @param bool $bSetUnitsAndExtents
     * @return int
     */
    final public function setProjection($proj_params, $bSetUnitsAndExtents) {}

    /**
     * Set map rotation angle. The map view rectangle (specified in
     * EXTENTS) will be rotated by the indicated angle in the counter-
     * clockwise direction. Note that this implies the rendered map
     * will be rotated by the angle in the clockwise direction.
     * Returns MS_SUCCESS or MS_FAILURE.
     *
     * @param float $rotation_angle
     * @return int
     */
    final public function setRotation($rotation_angle) {}

    /**
     * Set the map width and height. This method updates the internal
     * geotransform and other data structures required for map rotation
     * so it should be used instead of setting the width and height members
     * directly.
     * Returns MS_SUCCESS or MS_FAILURE.
     *
     * @param int $width
     * @param int $height
     * @return int
     */
    final public function setSize($width, $height) {}

    /**
     * Load and set a symbol file dynamically.
     *
     * @param string $fileName
     * @return int
     */
    final public function setSymbolSet($fileName) {}

    /**
     * Same as setProjection(), but takes an OGC WKT projection
     * definition string as input. Returns MS_SUCCESS or MS_FAILURE on error.
     * .. note::
     * setWKTProjection requires GDAL support
     *
     * @param string $proj_params
     * @param bool $bSetUnitsAndExtents
     * @return int
     */
    final public function setWKTProjection($proj_params, $bSetUnitsAndExtents) {}

    /**
     * Zoom to a given XY position. Returns MS_SUCCESS or MS_FAILURE on error.
     * Parameters are
     * - Zoom factor : positive values do zoom in, negative values
     * zoom out. Factor of 1 will recenter.
     * - Pixel position (pointObj) : x, y coordinates of the click,
     * with (0,0) at the top-left
     * - Width : width in pixel of the current image.
     * - Height : Height in pixel of the current image.
     * - Georef extent (rectObj) : current georef extents.
     * - MaxGeoref extent (rectObj) : (optional) maximum georef extents.
     * If provided then it will be impossible to zoom/pan outside of
     * those extents.
     *
     * @param int $nZoomFactor
     * @param pointObj $oPixelPos
     * @param int $nImageWidth
     * @param int $nImageHeight
     * @param rectObj $oGeorefExt
     * @return int
     */
    final public function zoomPoint($nZoomFactor, pointObj $oPixelPos, $nImageWidth, $nImageHeight, rectObj $oGeorefExt) {}

    /**
     * Set the map extents to a given extents. Returns MS_SUCCESS or
     * MS_FAILURE on error.
     * Parameters are :
     * - oPixelExt (rect object) : Pixel Extents
     * - Width : width in pixel of the current image.
     * - Height : Height in pixel of the current image.
     * - Georef extent (rectObj) : current georef extents.
     *
     * @param rectObj $oPixelExt
     * @param int $nImageWidth
     * @param int $nImageHeight
     * @param rectObj $oGeorefExt
     * @return int
     */
    final public function zoomRectangle(rectObj $oPixelExt, $nImageWidth, $nImageHeight, rectObj $oGeorefExt) {}

    /**
     * Zoom in or out to a given XY position so that the map is
     * displayed at specified scale. Returns MS_SUCCESS or MS_FAILURE on error.
     * Parameters are :
     * - ScaleDenom : Scale denominator of the scale at which the map
     * should be displayed.
     * - Pixel position (pointObj) : x, y coordinates of the click,
     * with (0,0) at the top-left
     * - Width : width in pixel of the current image.
     * - Height : Height in pixel of the current image.
     * - Georef extent (rectObj) : current georef extents.
     * - MaxGeoref extent (rectObj) : (optional) maximum georef extents.
     * If provided then it will be impossible to zoom/pan outside of
     * those extents.
     *
     * @param float $nScaleDenom
     * @param pointObj $oPixelPos
     * @param int $nImageWidth
     * @param int $nImageHeight
     * @param rectObj $oGeorefExt
     * @param rectObj $oMaxGeorefExt
     * @return int
     */
    final public function zoomScale($nScaleDenom, pointObj $oPixelPos, $nImageWidth, $nImageHeight, rectObj $oGeorefExt, rectObj $oMaxGeorefExt) {}
}

/**
 * Instance of outputformatObj is always embedded inside the `mapObj`_.
 * It is uses a read only.
 * No constructor available (coming soon, see ticket 979)
 */
final class outputformatObj
{
    /**
     * @var string
     */
    public $driver;

    /**
     * @var string
     */
    public $extension;

    /**
     * MS_IMAGEMODE_* value.
     *
     * @var int
     */
    public $imagemode;

    /**
     * @var string
     */
    public $mimetype;

    /**
     * @var string
     */
    public $name;

    /**
     * @var int
     */
    public $renderer;

    /**
     * @var int
     */
    public $transparent;

    /**
     * Returns the associated value for the format option property passed
     * as argument. Returns an empty string if property not found.
     *
     * @param string $property_name
     * @return string
     */
    final public function getOption($property_name) {}

    /**
     * Set object property to a new value.
     *
     * @param string $property_name
     * @param  $new_value
     * @return int
     */
    final public function set($property_name, $new_value) {}

    /**
     * Add or Modify the format option list. return true on success.
     * .. code-block:: php
     * $oMap->outputformat->setOption("OUTPUT_TYPE", "RASTER");
     *
     * @param string $property_name
     * @param string $new_value
     * @return void
     */
    final public function setOption($property_name, $new_value) {}

    /**
     * Checks some internal consistency issues, Returns MS_SUCCESS or
     * MS_FAILURE. Some problems are fixed up internally. May produce debug
     * output if issues encountered.
     *
     * @return int
     */
    final public function validate() {}
}

final class OwsrequestObj
{
    /**
     * (read-only)
     *
     * @var int
     */
    public $numparams;

    /**
     * (read-only): MS_GET_REQUEST or MS_POST_REQUEST
     *
     * @var int
     */
    public $type;

    /**
     * request = ms_newOwsrequestObj();
     * Create a new ows request object.
     */
    final public function __construct() {}

    /**
     * Add a request parameter, even if the parameter key was previousely set.
     * This is useful when multiple parameters with the same key are required.
     * For example :
     * .. code-block:: php
     * $request->addparameter('SIZE', 'x(100)');
     * $request->addparameter('SIZE', 'y(100)');
     *
     * @param string $name
     * @param string $value
     * @return int
     */
    final public function addParameter($name, $value) {}

    /**
     * Return the name of the parameter at *index* in the request's array
     * of parameter names.
     *
     * @param int $index
     * @return string
     */
    final public function getName($index) {}

    /**
     * Return the value of the parameter at *index* in the request's array
     * of parameter values.
     *
     * @param int $index
     * @return string
     */
    final public function getValue($index) {}

    /**
     * Return the value associated with the parameter *name*.
     *
     * @param string $name
     * @return string
     */
    final public function getValueByName($name) {}

    /**
     * Initializes the OWSRequest object from the cgi environment variables
     * REQUEST_METHOD, QUERY_STRING and HTTP_COOKIE.  Returns the number of
     * name/value pairs collected.
     *
     * @return int
     */
    final public function loadParams() {}

    /**
     * Set a request parameter.  For example :
     * .. code-block:: php
     * $request->setparameter('REQUEST', 'GetMap');
     *
     * @param string $name
     * @param string $value
     * @return int
     */
    final public function setParameter($name, $value) {}
}

final class pointObj
{
    /**
     * @var float
     */
    public $x;

    /**
     * @var float
     */
    public $y;

    /**
     * used for 3d shape files. set to 0 for other types
     *
     * @var float
     */
    public $z;

    /**
     * used only for measured shape files - set to 0 for other types
     *
     * @var float
     */
    public $m;

    final public function __construct() {}

    /**
     * Old style constructor
     *
     * @return pointObj
     */
    final public function ms_newPointObj() {}

    /**
     * Calculates distance between a point ad a lined defined by the
     * two points passed in argument.
     *
     * @param pointObj $p1
     * @param pointObj $p2
     * @return float
     */
    final public function distanceToLine(pointObj $p1, pointObj $p2) {}

    /**
     * Calculates distance between two points.
     *
     * @param pointObj $poPoint
     * @return float
     */
    final public function distanceToPoint(pointObj $poPoint) {}

    /**
     * Calculates the minimum distance between a point and a shape.
     *
     * @param shapeObj $shape
     * @return float
     */
    final public function distanceToShape(shapeObj $shape) {}

    /**
     * Draws the individual point using layer.  The class_index is used
     * to classify the point based on the classes defined for the layer.
     * The text string is used to annotate the point. (Optional)
     * Returns MS_SUCCESS/MS_FAILURE.
     *
     * @param mapObj $map
     * @param layerObj $layer
     * @param imageObj $img
     * @param int $class_index
     * @param string $text
     * @return int
     */
    final public function draw(mapObj $map, layerObj $layer, imageObj $img, $class_index, $text) {}

    /**
     * Project the point from "in" projection (1st argument) to "out"
     * projection (2nd argument).  Returns MS_SUCCESS/MS_FAILURE.
     *
     * @param projectionObj $in
     * @param projectionObj $out
     * @return int
     */
    final public function project(projectionObj $in, projectionObj $out) {}

    /**
     * Set X,Y coordinate values.
     * .. note::
     * the 3rd parameter m is used for measured shape files only.
     * It is not mandatory.
     *
     * @param float $x
     * @param float $y
     * @param float $m
     * @return int
     */
    final public function setXY($x, $y, $m) {}

    /**
     * Set X,Y,Z coordinate values.
     * .. note::
     * the 4th parameter m is used for measured shape files only.
     * It is not mandatory.
     *
     * @param float $x
     * @param float $y
     * @param float $z
     * @param float $m
     * @return int
     */
    final public function setXYZ($x, $y, $z, $m) {}
}

final class projectionObj
{
    /**
     * Creates a projection object based on the projection string passed
     * as argument.
     * $projInObj = ms_newprojectionobj("proj=latlong")
     * will create a geographic projection class.
     * The following example will convert a lat/long point to an LCC
     * projection:
     * $projInObj = ms_newprojectionobj("proj=latlong");
     * $projOutObj = ms_newprojectionobj("proj=lcc,ellps=GRS80,lat_0=49,".
     * "lon_0=-95,lat_1=49,lat_2=77");
     * $poPoint = ms_newpointobj();
     * $poPoint->setXY(-92.0, 62.0);
     * $poPoint->project($projInObj, $projOutObj);
     *
     * @param string $projectionString
     */
    final public function __construct($projectionString) {}

    /**
     * Old style constructor
     *
     * @param string $projectionString
     * @return ProjectionObj
     */
    final public function ms_newProjectionObj($projectionString) {}

    /**
     * Returns the units of a projection object. Returns -1 on error.
     *
     * @return int
     */
    final public function getUnits() {}
}

/**
 * Instances of querymapObj are always are always embedded inside the
 * `mapObj`_.
 */
final class querymapObj
{
    /**
     * @var colorObj
     */
    public $color;

    /**
     * @var int
     */
    public $height;

    /**
     * @var int
     */
    public $width;

    /**
     * MS_NORMAL, MS_HILITE, MS_SELECTED
     *
     * @var int
     */
    public $style;

    /**
     * Saves the object to a string.  Provides the inverse option for
     * updateFromString.
     *
     * @return string
     */
    final public function convertToString() {}

    /**
     * Free the object properties and break the internal references.
     * Note that you have to unset the php variable to free totally the resources.
     *
     * @return void
     */
    final public function free() {}

    /**
     * Set object property to a new value.
     *
     * @param string $property_name
     * @param  $new_value
     * @return int
     */
    final public function set($property_name, $new_value) {}

    /**
     * Update a queryMap object from a string snippet. Returns
     * MS_SUCCESS/MS_FAILURE.
     *
     * @param string $snippet
     * @return int
     */
    final public function updateFromString($snippet) {}
}

/**
 * rectObj are sometimes embedded inside other objects.  New ones can
 * also be created with:
 */
final class rectObj
{
    /**
     * @var float
     */
    public $minx;

    /**
     * @var float
     */
    public $miny;

    /**
     * @var float
     */
    public $maxx;

    /**
     * @var float
     */
    public $maxy;

    /**
     * .. note:: the members (minx, miny, maxx ,maxy) are initialized to -1;
     */
    final public function __construct() {}

    /**
     * Old style constructor
     *
     * @return RectObj
     */
    final public function ms_newRectObj() {}

    /**
     * Draws the individual rectangle using layer.  The class_index is used
     * to classify the rectangle based on the classes defined for the layer.
     * The text string is used to annotate the rectangle. (Optional)
     * Returns MS_SUCCESS/MS_FAILURE.
     *
     * @param mapObj $map
     * @param layerObj $layer
     * @param imageObj $img
     * @param int $class_index
     * @param string $text
     * @return int
     */
    final public function draw(mapObj $map, layerObj $layer, imageObj $img, $class_index, $text) {}

    /**
     * Adjust extents of the rectangle to fit the width/height specified.
     *
     * @param int $width
     * @param int $height
     * @return float
     */
    final public function fit($width, $height) {}

    /**
     * Project the rectangle from "in" projection (1st argument) to "out"
     * projection (2nd argument).  Returns MS_SUCCESS/MS_FAILURE.
     *
     * @param projectionObj $in
     * @param projectionObj $out
     * @return int
     */
    final public function project(projectionObj $in, projectionObj $out) {}

    /**
     * Set object property to a new value.
     *
     * @param string $property_name
     * @param  $new_value
     * @return int
     */
    final public function set($property_name, $new_value) {}

    /**
     * Set the rectangle extents.
     *
     * @param float $minx
     * @param float $miny
     * @param float $maxx
     * @param float $maxy
     * @return void
     */
    final public function setextent($minx, $miny, $maxx, $maxy) {}
}

/**
 * Instances of referenceMapObj are always embedded inside the `mapObj`_.
 */
final class referenceMapObj
{
    /**
     * @var ColorObj
     */
    public $color;

    /**
     * @var int
     */
    public $height;

    /**
     * @var rectObj
     */
    public $extent;

    /**
     * @var string
     */
    public $image;

    /**
     * @var int
     */
    public $marker;

    /**
     * @var string
     */
    public $markername;

    /**
     * @var int
     */
    public $markersize;

    /**
     * @var int
     */
    public $maxboxsize;

    /**
     * @var int
     */
    public $minboxsize;

    /**
     * @var ColorObj
     */
    public $outlinecolor;

    /**
     * @var int
     */
    public $status;

    /**
     * @var int
     */
    public $width;

    /**
     * Saves the object to a string.  Provides the inverse option for
     * updateFromString.
     *
     * @return string
     */
    final public function convertToString() {}

    /**
     * Free the object properties and break the internal references.
     * Note that you have to unset the php variable to free totally the
     * resources.
     *
     * @return void
     */
    final public function free() {}

    /**
     * Set object property to a new value.
     *
     * @param string $property_name
     * @param  $new_value
     * @return int
     */
    final public function set($property_name, $new_value) {}

    /**
     * Update a referenceMap object from a string snippet.
     * Returns MS_SUCCESS/MS_FAILURE.
     *
     * @param string $snippet
     * @return int
     */
    final public function updateFromString($snippet) {}
}

final class resultObj
{
    /**
     * read-only
     *
     * @var int
     */
    public $classindex;

    /**
     * read-only
     *
     * @var int
     */
    public $resultindex;

    /**
     * read-only
     *
     * @var int
     */
    public $shapeindex;

    /**
     * read-only
     *
     * @var int
     */
    public $tileindex;

    /**
     * or using the `layerObj`_'s getResult() method.
     *
     * @param int $shapeindex
     */
    final public function __construct($shapeindex) {}
}

/**
 * Instances of scalebarObj are always embedded inside the `mapObj`_.
 */
final class scalebarObj
{
    /**
     * @var int
     */
    public $align;

    /**
     * @var colorObj
     */
    public $backgroundcolor;

    /**
     * @var colorObj
     */
    public $color;

    /**
     * @var int
     */
    public $height;

    /**
     * @var colorObj
     */
    public $imagecolor;

    /**
     * @var int
     */
    public $intervals;

    /**
     * @var labelObj
     */
    public $label;

    /**
     * @var colorObj
     */
    public $outlinecolor;

    /**
     * for embedded scalebars, MS_UL, MS_UC, ...
     *
     * @var int
     */
    public $position;

    /**
     * @var int
     */
    public $postlabelcache;

    /**
     * MS_ON, MS_OFF, MS_EMBED
     *
     * @var int
     */
    public $status;

    /**
     * @var int
     */
    public $style;

    /**
     * @var int
     */
    public $units;

    /**
     * @var int
     */
    public $width;

    /**
     * Saves the object to a string.  Provides the inverse option for
     * updateFromString.
     *
     * @return string
     */
    final public function convertToString() {}

    /**
     * Free the object properties and break the internal references.
     * Note that you have to unset the php variable to free totally the
     * resources.
     *
     * @return void
     */
    final public function free() {}

    /**
     * Set object property to a new value.
     *
     * @param string $property_name
     * @param  $new_value
     * @return int
     */
    final public function set($property_name, $new_value) {}

    /**
     * Sets the imagecolor property (baclground) of the object.
     * Returns MS_SUCCESS or MS_FAILURE on error.
     *
     * @param int $red
     * @param int $green
     * @param int $blue
     * @return int
     */
    final public function setImageColor($red, $green, $blue) {}

    /**
     * Update a scalebar from a string snippet. Returns MS_SUCCESS/MS_FAILURE.
     *
     * @param string $snippet
     * @return int
     */
    final public function updateFromString($snippet) {}
}

final class shapefileObj
{
    /**
     * read-only
     *
     * @var rectObj
     */
    public $bounds;

    /**
     * read-only
     *
     * @var int
     */
    public $numshapes;

    /**
     * read-only
     *
     * @var string
     */
    public $source;

    /**
     * read-only
     *
     * @var int
     */
    public $type;

    /**
     * Opens a shapefile and returns a new object to deal with it. Filename
     * should be passed with no extension.  To create a new file (or
     * overwrite an existing one), type should be one of MS_SHP_POINT,
     * MS_SHP_ARC, MS_SHP_POLYGON or MS_SHP_MULTIPOINT. Pass type as -1 to
     * open an existing file for read-only access, and type=-2 to open an
     * existing file for update (append).
     *
     * @param string $filename
     * @param int $type
     */
    final public function __construct($filename, $type) {}

    /**
     * Old style constructor
     *
     * @param string $filename
     * @param int $type
     * @return shapefileObj
     */
    final public function ms_newShapefileObj($filename, $type) {}

    /**
     * Appends a point to an open shapefile.
     *
     * @param pointObj $point
     * @return int
     */
    final public function addPoint(pointObj $point) {}

    /**
     * Appends a shape to an open shapefile.
     *
     * @param shapeObj $shape
     * @return int
     */
    final public function addShape(shapeObj $shape) {}

    /**
     * Free the object properties and break the internal references.
     * Note that you have to unset the php variable to free totally the
     * resources.
     * .. note::
     * The shape file is closed (and changes committed) when
     * the object is destroyed. You can explicitly close and save
     * the changes by calling $shapefile->free();
     * unset($shapefile), which will also free the php object.
     *
     * @return void
     */
    final public function free() {}

    /**
     * Retrieve a shape's bounding box by index.
     *
     * @param int $i
     * @return rectObj
     */
    final public function getExtent($i) {}

    /**
     * Retrieve point by index.
     *
     * @param int $i
     * @return shapeObj
     */
    final public function getPoint($i) {}

    /**
     * Retrieve shape by index.
     *
     * @param int $i
     * @return shapeObj
     */
    final public function getShape($i) {}

    /**
     * Retrieve shape by index.
     *
     * @param mapObj $map
     * @param int $i
     * @return shapeObj
     */
    final public function getTransformed(mapObj $map, $i) {}
}

final class shapeObj
{
    /**
     * read-only
     *
     * @var rectObj
     */
    public $bounds;

    /**
     * @var int
     */
    public $classindex;

    /**
     * @var int
     */
    public $index;

    /**
     * read-only
     *
     * @var int
     */
    public $numlines;

    /**
     * read-only
     *
     * @var int
     */
    public $numvalues;

    /**
     * read-only
     *
     * @var int
     */
    public $tileindex;

    /**
     * @var string
     */
    public $text;

    /**
     * read-only
     *
     * @var int
     */
    public $type;

    /**
     * read-only
     *
     * @var array
     */
    public $values;

    /**
     * 'type' is one of MS_SHAPE_POINT, MS_SHAPE_LINE, MS_SHAPE_POLYGON or
     * MS_SHAPE_NULL
     * Creates new shape object from WKT string.
     *
     * @param int $type
     */
    final public function __construct($type) {}

    /**
     * Old style constructor
     *
     * @param string $wkt
     * @return ShapeObj
     */
    final public function ms_shapeObjFromWkt($wkt) {}

    /**
     * Add a line (i.e. a part) to the shape.
     *
     * @param lineObj $line
     * @return int
     */
    final public function add(lineObj $line) {}

    /**
     * Returns the boundary of the shape.
     * Only available if php/mapscript is built with GEOS library.
     * shapeObj buffer(width)
     * Returns a new buffered shapeObj based on the supplied distance (given
     * in the coordinates of the existing shapeObj).
     * Only available if php/mapscript is built with GEOS library.
     *
     * @return shapeObj
     */
    final public function boundary() {}

    /**
     * Returns true if shape2 passed as argument is entirely within the shape.
     * Else return false.
     * Only available if php/mapscript is built with GEOS
     * library.
     *
     * @param shapeObj $shape2
     * @return int
     */
    final public function containsShape(shapeObj $shape2) {}

    /**
     * Returns a shape object representing the convex hull of shape.
     * Only available if php/mapscript is built with GEOS
     * library.
     *
     * @return shapeObj
     */
    final public function convexhull() {}

    /**
     * Returns MS_TRUE if the point is inside the shape, MS_FALSE otherwise.
     *
     * @param pointObj $point
     * @return bool
     */
    final public function contains(pointObj $point) {}

    /**
     * Returns true if the shape passed as argument crosses the shape.
     * Else return false.
     * Only available if php/mapscript is built with GEOS library.
     *
     * @param shapeObj $shape
     * @return int
     */
    final public function crosses(shapeObj $shape) {}

    /**
     * Returns a shape object representing the difference of the
     * shape object with the one passed as parameter.
     * Only available if php/mapscript is built with GEOS library.
     *
     * @param shapeObj $shape
     * @return shapeObj
     */
    final public function difference(shapeObj $shape) {}

    /**
     * Returns true if the shape passed as argument is disjoint to the
     * shape. Else return false.
     * Only available if php/mapscript is built with GEOS library.
     *
     * @param shapeObj $shape
     * @return int
     */
    final public function disjoint(shapeObj $shape) {}

    /**
     * Draws the individual shape using layer.
     * Returns MS_SUCCESS/MS_FAILURE.
     *
     * @param mapObj $map
     * @param layerObj $layer
     * @param imageObj $img
     * @return int
     */
    final public function draw(mapObj $map, layerObj $layer, imageObj $img) {}

    /**
     * Returns true if the shape passed as argument is equal to the
     * shape (geometry only). Else return false.
     * Only available if php/mapscript is built with GEOS library.
     *
     * @param shapeObj $shape
     * @return int
     */
    final public function equals(shapeObj $shape) {}

    /**
     * Free the object properties and break the internal references.
     * Note that you have to unset the php variable to free totally the resources.
     *
     * @return void
     */
    final public function free() {}

    /**
     * Returns the area of the shape (if applicable).
     * Only available if php/mapscript is built with GEOS library.
     *
     * @return float
     */
    final public function getArea() {}

    /**
     * Returns a point object representing the centroid of the shape.
     * Only available if php/mapscript is built with GEOS library.
     *
     * @return pointObj
     */
    final public function getCentroid() {}

    /**
     * Returns a point object with coordinates suitable for labelling
     * the shape.
     *
     * @return pointObj
     */
    final public function getLabelPoint() {}

    /**
     * Returns the length (or perimeter) of the shape.
     * Only available if php/mapscript is built with GEOS library.
     * pointObj  getMeasureUsingPoint(pointObj point)
     * Apply only on Measured shape files. Given an XY Location, find the
     * nearest point on the shape object. Return a point object
     * of this point with the m value set.
     *
     * @return float
     */
    final public function getLength() {}

    /**
     * Apply only on Measured shape files. Given a measure m, retun the
     * corresponding XY location on the shapeobject.
     *
     * @param float $m
     * @return pointObj
     */
    final public function getPointUsingMeasure($m) {}

    /**
     * Returns the value for a given field name.
     *
     * @param layerObj $layer
     * @param string $filedname
     * @return string
     */
    final public function getValue(layerObj $layer, $filedname) {}

    /**
     * Returns a shape object representing the intersection of the shape
     * object with the one passed as parameter.
     * Only available if php/mapscript is built with GEOS library.
     *
     * @param shapeObj $shape
     * @return shapeObj
     */
    final public function intersection(shapeObj $shape) {}

    /**
     * Returns MS_TRUE if the two shapes intersect, MS_FALSE otherwise.
     *
     * @param shapeObj $shape
     * @return bool
     */
    final public function intersects(shapeObj $shape) {}

    /**
     * Returns a reference to line number i.
     *
     * @param int $i
     * @return lineObj
     */
    final public function line($i) {}

    /**
     * Returns true if the shape passed as argument overlaps the shape.
     * Else returns false.
     * Only available if php/mapscript is built with GEOS library.
     *
     * @param shapeObj $shape
     * @return int
     */
    final public function overlaps(shapeObj $shape) {}

    /**
     * Project the shape from "in" projection (1st argument) to "out"
     * projection (2nd argument).  Returns MS_SUCCESS/MS_FAILURE.
     *
     * @param projectionObj $in
     * @param projectionObj $out
     * @return int
     */
    final public function project(projectionObj $in, projectionObj $out) {}

    /**
     * Set object property to a new value.
     *
     * @param string $property_name
     * @param  $new_value
     * @return int
     */
    final public function set($property_name, $new_value) {}

    /**
     * Updates the bounds property of the shape.
     * Must be called to calculate new bounding box after new parts have been
     * added.
     *
     * @return int
     */
    final public function setBounds() {}

    /**
     * Given a tolerance, returns a simplified shape object or NULL on
     * error.  Only available if php/mapscript is built with GEOS library
     * (>=3.0).
     *
     * @param float $tolerance
     * @return shapeObj|null
     */
    final public function simplify($tolerance) {}

    /**
     * Returns the computed symmetric difference of the supplied and
     * existing shape.
     * Only available if php/mapscript is built with GEOS library.
     *
     * @param shapeObj $shape
     * @return shapeObj
     */
    final public function symdifference(shapeObj $shape) {}

    /**
     * Given a tolerance, returns a simplified shape object or NULL on
     * error.  Only available if php/mapscript is built with GEOS library
     * (>=3.0).
     *
     * @param float $tolerance
     * @return shapeObj|null
     */
    final public function topologyPreservingSimplify($tolerance) {}

    /**
     * Returns true if the shape passed as argument touches the shape.
     * Else return false.
     * Only available if php/mapscript is built with GEOS library.
     *
     * @param shapeObj $shape
     * @return int
     */
    final public function touches(shapeObj $shape) {}

    /**
     * Returns WKT representation of the shape's geometry.
     *
     * @return string
     */
    final public function toWkt() {}

    /**
     * Returns a shape object representing the union of the shape object
     * with the one passed as parameter.
     * Only available if php/mapscript is built with GEOS
     * library
     *
     * @param shapeObj $shape
     * @return shapeObj
     */
    final public function union(shapeObj $shape) {}

    /**
     * Returns true if the shape is entirely within the shape2 passed as
     * argument.
     * Else returns false.
     * Only available if php/mapscript is built with GEOS library.
     *
     * @param shapeObj $shape2
     * @return int
     */
    final public function within(shapeObj $shape2) {}
}

/**
 * Instances of styleObj are always embedded inside a `classObj`_ or `labelObj`_.
 */
final class styleObj
{
    /**
     * @var float
     */
    public $angle;

    /**
     * @var int
     */
    public $antialias;

    /**
     * @var colorObj
     */
    public $backgroundcolor;

    /**
     * @var colorObj
     */
    public $color;

    /**
     * @var float
     */
    public $maxsize;

    /**
     * @var float
     */
    public $maxvalue;

    /**
     * @var float
     */
    public $maxwidth;

    /**
     * @var float
     */
    public $minsize;

    /**
     * @var float
     */
    public $minvalue;

    /**
     * @var float
     */
    public $minwidth;

    /**
     * @var int
     */
    public $offsetx;

    /**
     * @var int
     */
    public $offsety;

    /**
     * only supported for the AGG driver
     *
     * @var int
     */
    public $opacity;

    /**
     * @var colorObj
     */
    public $outlinecolor;

    /**
     * @var string
     */
    public $rangeitem;

    /**
     * @var float
     */
    public $size;

    /**
     * @var int
     */
    public $symbol;

    /**
     * @var string
     */
    public $symbolname;

    /**
     * @var float
     */
    public $width;

    /**
     * The second argument 'style' is optional. If given, the new style
     * created will be a copy of the style passed as argument.
     *
     * @param labelObj $label
     * @param styleObj $style
     */
    final public function __construct(labelObj $label, styleObj $style) {}

    /**
     * Old style constructor
     *
     * @param classObj $class
     * @param styleObj $style
     * @return styleObj
     */
    final public function ms_newStyleObj(classObj $class, styleObj $style) {}

    /**
     * Saves the object to a string.  Provides the inverse option for
     * updateFromString.
     *
     * @return string
     */
    final public function convertToString() {}

    /**
     * Free the object properties and break the internal references.
     * Note that you have to unset the php variable to free totally the
     * resources.
     *
     * @return void
     */
    final public function free() {}

    /**
     * Get the attribute binding for a specfiled style property. Returns
     * NULL if there is no binding for this property.
     * .. code-block:: php
     * $oStyle->setbinding(MS_STYLE_BINDING_COLOR, "FIELD_NAME_COLOR");
     * echo $oStyle->getbinding(MS_STYLE_BINDING_COLOR); // FIELD_NAME_COLOR
     *
     * @param mixed $stylebinding
     * @return string
     */
    final public function getBinding($stylebinding) {}

    /**
     * @return string
     */
    final public function getGeomTransform() {}

    /**
     * Remove the attribute binding for a specfiled style property.
     * Added in MapServer 5.0.
     * .. code-block:: php
     * $oStyle->removebinding(MS_STYLE_BINDING_COLOR);
     *
     * @param mixed $stylebinding
     * @return int
     */
    final public function removeBinding($stylebinding) {}

    /**
     * Set object property to a new value.
     *
     * @param string $property_name
     * @param  $new_value
     * @return int
     */
    final public function set($property_name, $new_value) {}

    /**
     * Set the attribute binding for a specfiled style property.
     * Added in MapServer 5.0.
     * .. code-block:: php
     * $oStyle->setbinding(MS_STYLE_BINDING_COLOR, "FIELD_NAME_COLOR");
     * This would bind the color parameter with the data (ie will extract
     * the value of the color from the field called "FIELD_NAME_COLOR"
     *
     * @param mixed $stylebinding
     * @param string $value
     * @return int
     */
    final public function setBinding($stylebinding, $value) {}

    /**
     * @param string $value
     * @return int
     */
    final public function setGeomTransform($value) {}

    /**
     * Update a style from a string snippet. Returns MS_SUCCESS/MS_FAILURE.
     *
     * @param string $snippet
     * @return int
     */
    final public function updateFromString($snippet) {}
}

final class symbolObj
{
    /**
     * @var int
     */
    public $antialias;

    /**
     * @var string
     */
    public $character;

    /**
     * @var int
     */
    public $filled;

    /**
     * @var string
     */
    public $font;

    /**
     * read-only
     *
     * @var string
     */
    public $imagepath;

    /**
     * If set to TRUE, the symbol will be saved
     * inside the mapfile.
     *
     * @var int
     */
    public $inmapfile;

    /**
     * read-only
     *
     * @var int
     */
    public $patternlength;

    /**
     * @var int
     */
    public $position;

    /**
     * @var string
     */
    public $name;

    /**
     * read-only
     *
     * @var int
     */
    public $numpoints;

    /**
     * @var float
     */
    public $sizex;

    /**
     * @var float
     */
    public $sizey;

    /**
     * @var int
     */
    public $transparent;

    /**
     * @var int
     */
    public $transparentcolor;

    /**
     * Creates a new symbol with default values in the symbolist.
     * .. note::
     * Using the new constructor, the symbol is automatically returned. The
     * If a symbol with the same name exists, it (or its id) will be returned.
     * $nId = ms_newSymbolObj($map, "symbol-test");
     * $oSymbol = $map->getSymbolObjectById($nId);
     *
     * @param mapObj $map
     * @param string $symbolname
     */
    final public function __construct(mapObj $map, $symbolname) {}

    /**
     * Old style constructor
     *
     * @param mapObj $map
     * @param string $symbolname
     * @return int
     */
    final public function ms_newSymbolObj(mapObj $map, $symbolname) {}

    /**
     * Free the object properties and break the internal references.
     * Note that you have to unset the php variable to free totally the
     * resources.
     *
     * @return void
     */
    final public function free() {}

    /**
     * Returns an array containing the pattern. If there is no pattern, it
     * returns an empty array.
     *
     * @return array
     */
    final public function getPatternArray() {}

    /**
     * Returns an array containing the points of the symbol. Refer to
     * setpoints to see how the array should be interpreted. If there are no
     * points, it returns an empty array.
     *
     * @return array
     */
    final public function getPointsArray() {}

    /**
     * Set object property to a new value.
     *
     * @param string $property_name
     * @param  $new_value
     * @return int
     */
    final public function set($property_name, $new_value) {}

    /**
     * Loads a pixmap symbol specified by the filename.
     * The file should be of either  Gif or Png format.
     *
     * @param string $filename
     * @return int
     */
    final public function setImagePath($filename) {}

    /**
     * Set the pattern of the symbol (used for dash patterns).
     * Returns MS_SUCCESS/MS_FAILURE.
     *
     * @param array $int
     * @return int
     */
    final public function setPattern(array $int) {}

    /**
     * Set the points of the symbol. Note that the values passed is an
     * array containing the x and y values of the points. Returns
     * MS_SUCCESS/MS_FAILURE.
     * Example:
     * .. code-block:: php
     * $array[0] = 1 # x value of the first point
     * $array[1] = 0 # y values of the first point
     * $array[2] = 1 # x value of the 2nd point
     * ....
     *
     * @param array $double
     * @return int
     */
    final public function setPoints(array $double) {}
}

/**
 * Instances of webObj are always are always embedded inside the `mapObj`_.
 */
final class webObj
{
    /**
     * @var string
     */
    public $browseformat;

    /**
     * read-only
     *
     * @var string
     */
    public $empty;

    /**
     * read-only
     *
     * @var string
     */
    public $error;

    /**
     * read-only
     *
     * @var rectObj
     */
    public $extent;

    /**
     * @var string
     */
    public $footer;

    /**
     * @var string
     */
    public $header;

    /**
     * @var string
     */
    public $imagepath;

    /**
     * @var string
     */
    public $imageurl;

    /**
     * @var string
     */
    public $legendformat;

    /**
     * @var string
     */
    public $log;

    /**
     * @var float
     */
    public $maxscaledenom;

    /**
     * @var string
     */
    public $maxtemplate;

    /**
     * @var hashTableObj
     */
    public $metadata;

    /**
     * @var float
     */
    public $minscaledenom;

    /**
     * @var string
     */
    public $mintemplate;

    /**
     * @var string
     */
    public $queryformat;

    /**
     * @var string
     */
    public $template;

    /**
     * @var string
     */
    public $temppath;

    /**
     * Saves the object to a string.  Provides the inverse option for
     * updateFromString.
     *
     * @return string
     */
    final public function convertToString() {}

    /**
     * Free the object properties and break the internal references.
     * Note that you have to unset the php variable to free totally the
     * resources.
     *
     * @return void
     */
    final public function free() {}

    /**
     * Set object property to a new value.
     *
     * @param string $property_name
     * @param  $new_value
     * @return int
     */
    final public function set($property_name, $new_value) {}

    /**
     * Update a web object from a string snippet. Returns
     * MS_SUCCESS/MS_FAILURE.
     *
     * @param string $snippet
     * @return int
     */
    final public function updateFromString($snippet) {}
}
<?php
/**
 * Extended HTTP support. Again.
 *
 * * Introduces the http namespace.
 * * PHP stream based message bodies.
 * * Encapsulated env request/response.
 * * Modular client support.
 */

namespace http;

use http;
use JetBrains\PhpStorm\Deprecated;

/**
 * The HTTP client. See http\Client\Curl's [options](http/Client/Curl#Options:) which is the only driver currently supported.
 */
class Client implements \SplSubject, \Countable
{
    /**
     * Debug callback's $data contains human readable text.
     */
    public const DEBUG_INFO = 0;

    /**
     * Debug callback's $data contains data received.
     */
    public const DEBUG_IN = 1;

    /**
     * Debug callback's $data contains data sent.
     */
    public const DEBUG_OUT = 2;

    /**
     * Debug callback's $data contains headers.
     */
    public const DEBUG_HEADER = 16;

    /**
     * Debug callback's $data contains a body part.
     */
    public const DEBUG_BODY = 32;

    /**
     * Debug callback's $data contains SSL data.
     */
    public const DEBUG_SSL = 64;

    /**
     * Attached observers.
     *
     * @var \SplObjectStorage
     */
    private $observers = null;

    /**
     * Set options.
     *
     * @var array
     */
    protected $options = null;

    /**
     * Request/response history.
     *
     * @var \http\Message
     */
    protected $history = null;

    /**
     * Whether to record history in http\Client::$history.
     *
     * @var bool
     */
    public $recordHistory = false;

    /**
     * Create a new HTTP client.
     *
     * Currently only "curl" is supported as a $driver, and used by default.
     * Persisted resources identified by $persistent_handle_id will be re-used if available.
     *
     * @param string $driver The HTTP client driver to employ. Currently only the default driver, "curl", is supported.
     * @param string $persistent_handle_id If supplied, created curl handles will be persisted with this identifier for later reuse.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\UnexpectedValueException
     * @throws \http\Exception\RuntimeException
     */
    public function __construct(string $driver = null, string $persistent_handle_id = null) {}

    /**
     * Add custom cookies.
     * See http\Client::setCookies().
     *
     * @param array $cookies Custom cookies to add.
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Client self.
     */
    public function addCookies(array $cookies = null) {}

    /**
     * Add specific SSL options.
     * See http\Client::setSslOptions(), http\Client::setOptions() and http\Client\Curl\$ssl options.
     *
     * @param array $ssl_options Add this SSL options.
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Client self.
     */
    public function addSslOptions(array $ssl_options = null) {}

    /**
     * Implements SplSubject. Attach another observer.
     * Attached observers will be notified with progress of each transfer.
     *
     * @param \SplObserver $observer An implementation of SplObserver.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\UnexpectedValueException
     * @return \http\Client self.
     */
    public function attach(\SplObserver $observer) {}

    /**
     * Configure the client's low level options.
     *
     * ***NOTE:***
     * This method has been added in v2.3.0.
     *
     * @param array $configuration Key/value pairs of low level options.
     *    See f.e. the [configuration options for the Curl driver](http/Client/Curl#Configuration:).
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\UnexpectedValueException
     * @return \http\Client self.
     */
    public function configure(array $configuration) {}

    /**
     * Implements Countable. Retrieve the number of enqueued requests.
     *
     * ***NOTE:***
     * The enqueued requests are counted without regard whether they are finished or not.
     *
     * @return int number of enqueued requests.
     */
    public function count() {}

    /**
     * Dequeue the http\Client\Request $request.
     *
     * See http\Client::requeue(), if you want to requeue the request, instead of calling http\Client::dequeue() and then http\Client::enqueue().
     *
     * @param \http\Client\Request $request The request to cancel.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\BadMethodCallException
     * @throws \http\Exception\RuntimeException
     * @return \http\Client self.
     */
    public function dequeue(http\Client\Request $request) {}

    /**
     * Implements SplSubject. Detach $observer, which has been previously attached.
     *
     * @param \SplObserver $observer Previously attached instance of SplObserver implementation.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\UnexpectedValueException
     * @return \http\Client self.
     */
    public function detach(\SplObserver $observer) {}

    /**
     * Enable usage of an event library like libevent, which might improve performance with big socket sets.
     *
     * @param bool $enable Whether to enable libevent usage.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\UnexpectedValueException
     * @return \http\Client self.
     * @see Client::configure()
     */
    #[Deprecated('This method has been deprecated in 2.3.0. Use http\Client::configure() instead')]
    public function enableEvents(bool $enable = true) {}

    /**
     * Enable sending pipelined requests to the same host if the driver supports it.
     *
     * @param bool $enable Whether to enable pipelining.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\UnexpectedValueException
     * @return \http\Client self.
     * @see Client::configure()
     */
    #[Deprecated('This method has been deprecated in 2.3.0. Use http\Client::configure() instead')]
    public function enablePipelining(bool $enable = true) {}

    /**
     * Add another http\Client\Request to the request queue.
     * If the optional callback $cb returns true, the request will be automatically dequeued.
     *
     * ***Note:***
     * The http\Client\Response object resulting from the request is always stored
     * internally to be retrieved at a later time, __even__ when $cb is used.
     *
     * If you are about to send a lot of requests and do __not__ need the response
     * after executing the callback, you can use http\Client::getResponse() within
     * the callback to keep the memory usage level as low as possible.
     *
     * See http\Client::dequeue() and http\Client::send().
     *
     * @param \http\Client\Request $request The request to enqueue.
     * @param callable $cb as function(\http\Response $response) : ?bool
     *   A callback to automatically call when the request has finished.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\BadMethodCallException
     * @throws \http\Exception\RuntimeException
     * @return \http\Client self.
     */
    public function enqueue(http\Client\Request $request, callable $cb = null) {}

    /**
     * Get a list of available configuration options and their default values.
     *
     * See f.e. the [configuration options for the Curl driver](http/Client/Curl#Configuration:).
     *
     * @throws \http\Exception\InvalidArgumentException
     * @return array list of key/value pairs of available configuration options and their default values.
     */
    public function getAvailableConfiguration() {}

    /**
     * List available drivers.
     *
     * @return array list of supported drivers.
     */
    public function getAvailableDrivers() {}

    /**
     * Retrieve a list of available request options and their default values.
     *
     * See f.e. the [request options for the Curl driver](http/Client/Curl#Options:).
     *
     * @throws \http\Exception\InvalidArgumentException
     * @return array list of key/value pairs of available request options and their default values.
     */
    public function getAvailableOptions() {}

    /**
     * Get priorly set custom cookies.
     * See http\Client::setCookies().
     *
     * @return array custom cookies.
     */
    public function getCookies() {}

    /**
     * Simply returns the http\Message chain representing the request/response history.
     *
     * ***NOTE:***
     * The history is only recorded while http\Client::$recordHistory is true.
     *
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Message the request/response message chain representing the client's history.
     */
    public function getHistory() {}

    /**
     * Returns the SplObjectStorage holding attached observers.
     *
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\UnexpectedValueException
     * @return \SplObjectStorage observer storage.
     */
    public function getObservers() {}

    /**
     * Get priorly set options.
     * See http\Client::setOptions().
     *
     * @return array options.
     */
    public function getOptions() {}

    /**
     * Retrieve the progress information for $request.
     *
     * @param \http\Client\Request $request The request to retrieve the current progress information for.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\UnexpectedValueException
     * @return object|null object stdClass instance holding progress information.
     * 		 or NULL if $request is not enqueued.
     */
    public function getProgressInfo(http\Client\Request $request) {}

    /**
     * Retrieve the corresponding response of an already finished request, or the last received response if $request is not set.
     *
     * ***NOTE:***
     * If $request is NULL, then the response is removed from the internal storage (stack-like operation).
     *
     * @param \http\Client\Request $request The request to fetch the stored response for.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\UnexpectedValueException
     * @return \http\Client\Response|null \http\Client\Response the stored response for the request, or the last that was received.
     * 		 or NULL if no more response was available to pop, when no $request was given.
     */
    public function getResponse(http\Client\Request $request = null) {}

    /**
     * Retrieve priorly set SSL options.
     * See http\Client::getOptions() and http\Client::setSslOptions().
     *
     * @return array SSL options.
     */
    public function getSslOptions() {}

    /**
     * Get transfer related information for a running or finished request.
     *
     * @param \http\Client\Request $request The request to probe for transfer info.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\UnexpectedValueException
     * @return object stdClass instance holding transfer related information.
     */
    public function getTransferInfo(http\Client\Request $request) {}

    /**
     * Implements SplSubject. Notify attached observers about progress with $request.
     *
     * @param \http\Client\Request $request The request to notify about.
     * @param object $progress stdClass instance holding progress information.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\UnexpectedValueException
     * @return \http\Client self.
     */
    public function notify(http\Client\Request $request = null, $progress = null) {}

    /**
     * Perform outstanding transfer actions.
     * See http\Client::wait() for the completing interface.
     *
     * @return bool true if there are more transfers to complete.
     */
    public function once() {}

    /**
     * Requeue an http\Client\Request.
     *
     * The difference simply is, that this method, in contrast to http\Client::enqueue(), does not throw an http\Exception when the request to queue is already enqueued and dequeues it automatically prior enqueueing it again.
     *
     * @param \http\Client\Request $request The request to queue.
     * @param callable $cb as function(\http\Response $response) : ?bool
     *   A callback to automatically call when the request has finished.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\RuntimeException
     * @return \http\Client self.
     */
    public function requeue(http\Client\Request $request, callable $cb = null) {}

    /**
     * Reset the client to the initial state.
     *
     * @return \http\Client self.
     */
    public function reset() {}

    /**
     * Send all enqueued requests.
     * See http\Client::once() and http\Client::wait() for a more fine grained interface.
     *
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\RuntimeException
     * @return \http\Client self.
     */
    public function send() {}

    /**
     * Set custom cookies.
     * See http\Client::addCookies() and http\Client::getCookies().
     *
     * @param array $cookies Set the custom cookies to this array.
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Client self.
     */
    public function setCookies(array $cookies = null) {}

    /**
     * Set client debugging callback.
     *
     * ***NOTE:***
     * This method has been added in v2.6.0, resp. v3.1.0.
     *
     * @param callable $callback as function(http\Client $c, http\Client\Request $r, int $type, string $data)
     *   The debug callback. For $type see http\Client::DEBUG_* constants.
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Client self.
     */
    public function setDebug(callable $callback) {}

    /**
     * Set client options.
     * See http\Client\Curl.
     *
     * ***NOTE:***
     * Only options specified prior enqueueing a request are applied to the request.
     *
     * @param array $options The options to set.
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Client self.
     */
    public function setOptions(array $options = null) {}

    /**
     * Specifically set SSL options.
     * See http\Client::setOptions() and http\Client\Curl\$ssl options.
     *
     * @param array $ssl_options Set SSL options to this array.
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Client self.
     */
    public function setSslOptions(array $ssl_options = null) {}

    /**
     * Wait for $timeout seconds for transfers to provide data.
     * This is the completion call to http\Client::once().
     *
     * @param float $timeout Seconds to wait for data on open sockets.
     * @return bool success.
     */
    public function wait(float $timeout = 0) {}
}
/**
 * A class representing a list of cookies with specific attributes.
 */
class Cookie
{
    /**
     * Do not decode cookie contents.
     */
    public const PARSE_RAW = 1;

    /**
     * The cookies' flags have the secure attribute set.
     */
    public const SECURE = 16;

    /**
     * The cookies' flags have the httpOnly attribute set.
     */
    public const HTTPONLY = 32;

    /**
     * Create a new cookie list.
     *
     * @param mixed $cookies The string or list of cookies to parse or set.
     * @param int $flags Parse flags. See http\Cookie::PARSE_* constants.
     * @param array $allowed_extras List of extra attribute names to recognize.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\RuntimeException
     */
    public function __construct($cookies = null, int $flags = 0, array $allowed_extras = null) {}

    /**
     * String cast handler. Alias of http\Cookie::toString().
     *
     * @return string the cookie(s) represented as string.
     */
    public function __toString() {}

    /**
     * Add a cookie.
     * See http\Cookie::setCookie() and http\Cookie::addCookies().
     *
     * @param string $cookie_name The key of the cookie.
     * @param string $cookie_value The value of the cookie.
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Cookie self.
     */
    public function addCookie(string $cookie_name, string $cookie_value) {}

    /**
     * (Re)set the cookies.
     * See http\Cookie::setCookies().
     *
     * @param array $cookies Add cookies of this array of form ["name" => "value"].
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Cookie self.
     */
    public function addCookies(array $cookies) {}

    /**
     * Add an extra attribute to the cookie list.
     * See http\Cookie::setExtra().
     *
     * @param string $extra_name The key of the extra attribute.
     * @param string $extra_value The value of the extra attribute.
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Cookie self.
     */
    public function addExtra(string $extra_name, string $extra_value) {}

    /**
     * Add several extra attributes.
     * See http\Cookie::addExtra().
     *
     * @param array $extras A list of extra attributes of the form ["key" => "value"].
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Cookie self.
     */
    public function addExtras(array $extras) {}

    /**
     * Retrieve a specific cookie value.
     * See http\Cookie::setCookie().
     *
     * @param string $cookie_name The key of the cookie to look up.
     * @return string|null string the cookie value.
     * 		 or NULL if $cookie_name could not be found.
     */
    public function getCookie(string $cookie_name) {}

    /**
     * Get the list of cookies.
     * See http\Cookie::setCookies().
     *
     * @return array the list of cookies of form ["name" => "value"].
     */
    public function getCookies() {}

    /**
     * Retrieve the effective domain of the cookie list.
     * See http\Cookie::setDomain().
     *
     * @return string the effective domain.
     */
    public function getDomain() {}

    /**
     * Get the currently set expires attribute.
     * See http\Cookie::setExpires().
     *
     * ***NOTE:***
     * A return value of -1 means that the attribute is not set.
     *
     * @return int the currently set expires attribute as seconds since the epoch.
     */
    public function getExpires() {}

    /**
     * Retrieve an extra attribute.
     * See http\Cookie::setExtra().
     *
     * @param string $name The key of the extra attribute.
     * @return string the value of the extra attribute.
     */
    public function getExtra(string $name) {}

    /**
     * Retrieve the list of extra attributes.
     * See http\Cookie::setExtras().
     *
     * @return array the list of extra attributes of the form ["key" => "value"].
     */
    public function getExtras() {}

    /**
     * Get the currently set flags.
     * See http\Cookie::SECURE and http\Cookie::HTTPONLY constants.
     *
     * @return int the currently set flags bitmask.
     */
    public function getFlags() {}

    /**
     * Get the currently set max-age attribute of the cookie list.
     * See http\Cookie::setMaxAge().
     *
     * ***NOTE:***
     * A return value of -1 means that the attribute is not set.
     *
     * @return int the currently set max-age.
     */
    public function getMaxAge() {}

    /**
     * Retrieve the path the cookie(s) of this cookie list are effective at.
     * See http\Cookie::setPath().
     *
     * @return string the effective path.
     */
    public function getPath() {}

    /**
     * (Re)set a cookie.
     * See http\Cookie::addCookie() and http\Cookie::setCookies().
     *
     * ***NOTE:***
     * The cookie will be deleted from the list if $cookie_value is NULL.
     *
     * @param string $cookie_name The key of the cookie.
     * @param string $cookie_value The value of the cookie.
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Cookie self.
     */
    public function setCookie(string $cookie_name, string $cookie_value) {}

    /**
     * (Re)set the cookies.
     * See http\Cookie::addCookies().
     *
     * @param array $cookies Set the cookies to this array.
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Cookie self.
     */
    public function setCookies(array $cookies = null) {}

    /**
     * Set the effective domain of the cookie list.
     * See http\Cookie::setPath().
     *
     * @param string $value The domain the cookie(s) belong to.
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Cookie self.
     */
    public function setDomain(string $value = null) {}

    /**
     * Set the traditional expires timestamp.
     * See http\Cookie::setMaxAge() for a safer alternative.
     *
     * @param int $value The expires timestamp as seconds since the epoch.
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Cookie self.
     */
    public function setExpires(int $value = -1) {}

    /**
     * (Re)set an extra attribute.
     * See http\Cookie::addExtra().
     *
     * ***NOTE:***
     * The attribute will be removed from the extras list if $extra_value is NULL.
     *
     * @param string $extra_name The key of the extra attribute.
     * @param string $extra_value The value of the extra attribute.
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Cookie self.
     */
    public function setExtra(string $extra_name, string $extra_value = null) {}

    /**
     * (Re)set the extra attributes.
     * See http\Cookie::addExtras().
     *
     * @param array $extras Set the extra attributes to this array.
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Cookie self.
     */
    public function setExtras(array $extras = null) {}

    /**
     * Set the flags to specified $value.
     * See http\Cookie::SECURE and http\Cookie::HTTPONLY constants.
     *
     * @param int $value The new flags bitmask.
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Cookie self.
     */
    public function setFlags(int $value = 0) {}

    /**
     * Set the maximum age the cookie may have on the client side.
     * This is a client clock departure safe alternative to the "expires" attribute.
     * See http\Cookie::setExpires().
     *
     * @param int $value The max-age in seconds.
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Cookie self.
     */
    public function setMaxAge(int $value = -1) {}

    /**
     * Set the path the cookie(s) of this cookie list should be effective at.
     * See http\Cookie::setDomain().
     *
     * @param string $path The URL path the cookie(s) should take effect within.
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Cookie self.
     */
    public function setPath(string $path = null) {}

    /**
     * Get the cookie list as array.
     *
     * @return array the cookie list as array.
     */
    public function toArray() {}

    /**
     * Retrieve the string representation of the cookie list.
     * See http\Cookie::toArray().
     *
     * @return string the cookie list as string.
     */
    public function toString() {}
}

namespace http\Encoding;

namespace http;

/**
 * The http\Env class provides static methods to manipulate and inspect the server's current request's HTTP environment.
 */
class Env
{
    /**
     * Retrieve the current HTTP request's body.
     *
     * @param string $body_class_name A user class extending http\Message\Body.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\UnexpectedValueException
     * @return \http\Message\Body instance representing the request body
     */
    public function getRequestBody(string $body_class_name = null) {}

    /**
     * Retrieve one or all headers of the current HTTP request.
     *
     * @param string $header_name The key of a header to retrieve.
     * @return string|null|array NULL if $header_name was not found
     * 		 or string the compound header when $header_name was found
     * 		 or array of all headers if $header_name was not specified
     */
    public function getRequestHeader(string $header_name = null) {}

    /**
     * Get the HTTP response code to send.
     *
     * @return int the HTTP response code.
     */
    public function getResponseCode() {}

    /**
     * Get one or all HTTP response headers to be sent.
     *
     * @param string $header_name The name of the response header to retrieve.
     * @return string|array|null string the compound value of the response header to send
     * 		 or NULL if the header was not found
     * 		 or array of all response headers, if $header_name was not specified
     */
    public function getResponseHeader(string $header_name = null) {}

    /**
     * Retrieve a list of all known HTTP response status.
     *
     * @return array mapping of the form \[
     *   ...
     *   int $code => string $status
     *   ...
     *   \]
     */
    public function getResponseStatusForAllCodes() {}

    /**
     * Retrieve the string representation of specified HTTP response code.
     *
     * @param int $code The HTTP response code to get the string representation for.
     * @return string the HTTP response status message (may be empty, if no message for this code was found)
     */
    public function getResponseStatusForCode(int $code) {}

    /**
     * Generic negotiator. For specific client negotiation see http\Env::negotiateContentType() and related methods.
     *
     * ***NOTE:***
     * The first element of $supported serves as a default if no operand matches.
     *
     * @param string $params HTTP header parameter's value to negotiate.
     * @param array $supported List of supported negotiation operands.
     * @param string $prim_typ_sep A "primary type separator", i.e. that would be a hyphen for content language negotiation (en-US, de-DE, etc.).
     * @param array &$result Out parameter recording negotiation results.
     * @return string|null NULL if negotiation fails.
     * 		 or string the closest match negotiated, or the default (first entry of $supported).
     */
    public function negotiate(string $params, array $supported, string $prim_typ_sep = null, array &$result = null) {}

    /**
     * Negotiate the client's preferred character set.
     *
     * ***NOTE:***
     * The first element of $supported character sets serves as a default if no character set matches.
     *
     * @param array $supported List of supported content character sets.
     * @param array &$result Out parameter recording negotiation results.
     * @return string|null NULL if negotiation fails.
     * 		 or string the negotiated character set.
     */
    public function negotiateCharset(array $supported, array &$result = null) {}

    /**
     * Negotiate the client's preferred MIME content type.
     *
     * ***NOTE:***
     * The first element of $supported content types serves as a default if no content-type matches.
     *
     * @param array $supported List of supported MIME content types.
     * @param array &$result Out parameter recording negotiation results.
     * @return string|null NULL if negotiation fails.
     * 		 or string the negotiated content type.
     */
    public function negotiateContentType(array $supported, array &$result = null) {}

    /**
     * Negotiate the client's preferred encoding.
     *
     * ***NOTE:***
     * The first element of $supported encodings serves as a default if no encoding matches.
     *
     * @param array $supported List of supported content encodings.
     * @param array &$result Out parameter recording negotiation results.
     * @return string|null NULL if negotiation fails.
     * 		 or string the negotiated encoding.
     */
    public function negotiateEncoding(array $supported, array &$result = null) {}

    /**
     * Negotiate the client's preferred language.
     *
     * ***NOTE:***
     * The first element of $supported languages serves as a default if no language matches.
     *
     * @param array $supported List of supported content languages.
     * @param array &$result Out parameter recording negotiation results.
     * @return string|null NULL if negotiation fails.
     * 		 or string the negotiated language.
     */
    public function negotiateLanguage(array $supported, array &$result = null) {}

    /**
     * Set the HTTP response code to send.
     *
     * @param int $code The HTTP response status code.
     * @return bool Success.
     */
    public function setResponseCode(int $code) {}

    /**
     * Set a response header, either replacing a prior set header, or appending the new header value, depending on $replace.
     *
     * If no $header_value is specified, or $header_value is NULL, then a previously set header with the same key will be deleted from the list.
     *
     * If $response_code is not 0, the response status code is updated accordingly.
     *
     * @param string $header_name
     * @param mixed $header_value
     * @param int $response_code
     * @param bool $replace
     * @return bool Success.
     */
    public function setResponseHeader(string $header_name, $header_value = null, int $response_code = null, bool $replace = null) {}
}
/**
 * The http extension's Exception interface.
 *
 * Use it to catch any Exception thrown by pecl/http.
 *
 * The individual exception classes extend their equally named native PHP extensions, if such exist, and implement this empty interface. For example the http\Exception\BadMethodCallException extends SPL's BadMethodCallException.
 */
interface Exception {}
/**
 * The http\Header class provides methods to manipulate, match, negotiate and serialize HTTP headers.
 */
class Header implements \Serializable
{
    /**
     * None of the following match constraints applies.
     */
    public const MATCH_LOOSE = 0;

    /**
     * Perform case sensitive matching.
     */
    public const MATCH_CASE = 1;

    /**
     * Match only on word boundaries (according by CType alpha-numeric).
     */
    public const MATCH_WORD = 16;

    /**
     * Match the complete string.
     */
    public const MATCH_FULL = 32;

    /**
     * Case sensitively match the full string (same as MATCH_CASE|MATCH_FULL).
     */
    public const MATCH_STRICT = 33;

    /**
     * The name of the HTTP header.
     *
     * @var string
     */
    public $name = null;

    /**
     * The value of the HTTP header.
     *
     * @var mixed
     */
    public $value = null;

    /**
     * Create an http\Header instance for use of simple matching or negotiation. If the value of the header is an array it may be compounded to a single comma separated string.
     *
     * @param string $name The HTTP header name.
     * @param mixed $value The value of the header.
     *
     * # Throws:
     */
    public function __construct(string $name = null, $value = null) {}

    /**
     * String cast handler. Alias of http\Header::serialize().
     *
     * @return string the serialized form of the HTTP header (i.e. "Name: value").
     */
    public function __toString() {}

    /**
     * Create a parameter list out of the HTTP header value.
     *
     * @param mixed $ps The parameter separator(s).
     * @param mixed $as The argument separator(s).
     * @param mixed $vs The value separator(s).
     * @param int $flags The modus operandi. See http\Params constants.
     * @return \http\Params instance
     */
    public function getParams($ps = null, $as = null, $vs = null, int $flags = null) {}

    /**
     * Match the HTTP header's value against provided $value according to $flags.
     *
     * @param string $value The comparison value.
     * @param int $flags The modus operandi. See http\Header constants.
     * @return bool whether $value matches the header value according to $flags.
     */
    public function match(string $value, int $flags = null) {}

    /**
     * Negotiate the header's value against a list of supported values in $supported.
     * Negotiation operation is adopted according to the header name, i.e. if the
     * header being negotiated is Accept, then a slash is used as primary type
     * separator, and if the header is Accept-Language respectively, a hyphen is
     * used instead.
     *
     * ***NOTE:***
     * The first element of $supported serves as a default if no operand matches.
     *
     * @param array $supported The list of supported values to negotiate.
     * @param array &$result Out parameter recording the negotiation results.
     * @return string|null NULL if negotiation fails.
     * 		 or string the closest match negotiated, or the default (first entry of $supported).
     */
    public function negotiate(array $supported, array &$result = null) {}

    /**
     * Parse HTTP headers.
     * See also http\Header\Parser.
     *
     * @param string $header The complete string of headers.
     * @param string $header_class A class extending http\Header.
     * @return array|false array of parsed headers, where the elements are instances of $header_class if specified.
     * 		 or false if parsing fails.
     */
    public function parse(string $header, string $header_class = null) {}

    /**
     * Implements Serializable.
     *
     * @return string serialized representation of HTTP header (i.e. "Name: value")
     */
    public function serialize() {}

    /**
     * Convenience method. Alias of http\Header::serialize().
     *
     * @return string the serialized form of the HTTP header (i.e. "Name: value").
     */
    public function toString() {}

    /**
     * Implements Serializable.
     *
     * @param string $serialized The serialized HTTP header (i.e. "Name: value")
     */
    public function unserialize($serialized) {}
}
/**
 * The message class builds the foundation for any request and response message.
 *
 * See http\Client\Request and http\Client\Response, as well as http\Env\Request and http\Env\Response.
 */
class Message implements \Countable, \Serializable, \Iterator
{
    /**
     * No specific type of message.
     */
    public const TYPE_NONE = 0;

    /**
     * A request message.
     */
    public const TYPE_REQUEST = 1;

    /**
     * A response message.
     */
    public const TYPE_RESPONSE = 2;

    /**
     * The message type. See http\Message::TYPE_* constants.
     *
     * @var int
     */
    protected $type = \http\Message::TYPE_NONE;

    /**
     * The message's body.
     *
     * @var \http\Message\Body
     */
    protected $body = null;

    /**
     * The request method if the message is of type request.
     *
     * @var string
     */
    protected $requestMethod = "";

    /**
     * The request url if the message is of type request.
     *
     * @var string
     */
    protected $requestUrl = "";

    /**
     * The response status phrase if the message is of type response.
     *
     * @var string
     */
    protected $responseStatus = "";

    /**
     * The response code if the message is of type response.
     *
     * @var int
     */
    protected $responseCode = 0;

    /**
     * A custom HTTP protocol version.
     *
     * @var string
     */
    protected $httpVersion = null;

    /**
     * Any message headers.
     *
     * @var array
     */
    protected $headers = null;

    /**
     * Any parent message.
     *
     * @var \http\Message
     */
    protected $parentMessage;

    /**
     * Create a new HTTP message.
     *
     * @param mixed $message Either a resource or a string, representing the HTTP message.
     * @param bool $greedy Whether to read from a $message resource until EOF.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\BadMessageException
     */
    public function __construct($message = null, bool $greedy = true) {}

    /**
     * Retrieve the message serialized to a string.
     * Alias of http\Message::toString().
     *
     * @return string the single serialized HTTP message.
     */
    public function __toString() {}

    /**
     * Append the data of $body to the message's body.
     * See http\Message::setBody() and http\Message\Body::append().
     *
     * @param \http\Message\Body $body The message body to add.
     * @return \http\Message self.
     */
    public function addBody(http\Message\Body $body) {}

    /**
     * Add an header, appending to already existing headers.
     * See http\Message::addHeaders() and http\Message::setHeader().
     *
     * @param string $name The header name.
     * @param mixed $value The header value.
     * @return \http\Message self.
     */
    public function addHeader(string $name, $value) {}

    /**
     * Add headers, optionally appending values, if header keys already exist.
     * See http\Message::addHeader() and http\Message::setHeaders().
     *
     * @param array $headers The HTTP headers to add.
     * @param bool $append Whether to append values for existing headers.
     * @return \http\Message self.
     */
    public function addHeaders(array $headers, bool $append = false) {}

    /**
     * Implements Countable.
     *
     * @return int the count of messages in the chain above the current message.
     */
    public function count() {}

    /**
     * Implements iterator.
     * See http\Message::valid() and http\Message::rewind().
     *
     * @return \http\Message the current message in the iterated message chain.
     */
    public function current() {}

    /**
     * Detach a clone of this message from any message chain.
     *
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Message clone.
     */
    public function detach() {}

    /**
     * Retrieve the message's body.
     * See http\Message::setBody().
     *
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\UnexpectedValueException
     * @return \http\Message\Body the message body.
     */
    public function getBody() {}

    /**
     * Retrieve a single header, optionally hydrated into a http\Header extending class.
     *
     * @param string $header The header's name.
     * @param string $into_class The name of a class extending http\Header.
     * @return mixed|\http\Header mixed the header value if $into_class is NULL.
     * 		 or \http\Header descendant.
     */
    public function getHeader(string $header, string $into_class = null) {}

    /**
     * Retrieve all message headers.
     * See http\Message::setHeaders() and http\Message::getHeader().
     *
     * @return array the message's headers.
     */
    public function getHeaders() {}

    /**
     * Retrieve the HTTP protocol version of the message.
     * See http\Message::setHttpVersion().
     *
     * @return string the HTTP protocol version, e.g. "1.0"; defaults to "1.1".
     */
    public function getHttpVersion() {}

    /**
     * Retrieve the first line of a request or response message.
     * See http\Message::setInfo and also:
     *
     * * http\Message::getType()
     * * http\Message::getHttpVersion()
     * * http\Message::getResponseCode()
     * * http\Message::getResponseStatus()
     * * http\Message::getRequestMethod()
     * * http\Message::getRequestUrl()
     *
     * @return string|null string the HTTP message information.
     * 		 or NULL if the message is neither of type request nor response.
     */
    public function getInfo() {}

    /**
     * Retrieve any parent message.
     * See http\Message::reverse().
     *
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\BadMethodCallException
     * @return \http\Message the parent message.
     */
    public function getParentMessage() {}

    /**
     * Retrieve the request method of the message.
     * See http\Message::setRequestMethod() and http\Message::getRequestUrl().
     *
     * @return string|false string the request method.
     * 		 or false if the message was not of type request.
     */
    public function getRequestMethod() {}

    /**
     * Retrieve the request URL of the message.
     * See http\Message::setRequestUrl().
     *
     * @return string|false string the request URL; usually the path and the querystring.
     * 		 or false if the message was not of type request.
     */
    public function getRequestUrl() {}

    /**
     * Retrieve the response code of the message.
     * See http\Message::setResponseCode() and http\Message::getResponseStatus().
     *
     * @return int|false int the response status code.
     * 		 or false if the message is not of type response.
     */
    public function getResponseCode() {}

    /**
     * Retrieve the response status of the message.
     * See http\Message::setResponseStatus() and http\Message::getResponseCode().
     *
     * @return string|false string the response status phrase.
     * 		 or false if the message is not of type response.
     */
    public function getResponseStatus() {}

    /**
     * Retrieve the type of the message.
     * See http\Message::setType() and http\Message::getInfo().
     *
     * @return int the message type. See http\Message::TYPE_* constants.
     */
    public function getType() {}

    /**
     * Check whether this message is a multipart message based on it's content type.
     * If the message is a multipart message and a reference $boundary is given, the boundary string of the multipart message will be stored in $boundary.
     *
     * See http\Message::splitMultipartBody().
     *
     * @param string &$boundary A reference where the boundary string will be stored.
     * @return bool whether this is a message with a multipart "Content-Type".
     */
    public function isMultipart(string &$boundary = null) {}

    /**
     * Implements Iterator.
     * See http\Message::current() and http\Message::rewind().
     *
     * @return int a non-sequential integer key.
     */
    public function key() {}

    /**
     * Implements Iterator.
     * See http\Message::valid() and http\Message::rewind().
     */
    public function next() {}

    /**
     * Prepend message(s) $message to this message, or the top most message of this message chain.
     *
     * ***NOTE:***
     * The message chains must not overlap.
     *
     * @param \http\Message $message The message (chain) to prepend as parent messages.
     * @param bool $top Whether to prepend to the top-most parent message.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\UnexpectedValueException
     * @return \http\Message self.
     */
    public function prepend(http\Message $message, bool $top = true) {}

    /**
     * Reverse the message chain and return the former top-most message.
     *
     * ***NOTE:***
     * Message chains are ordered in reverse-parsed order by default, i.e. the last parsed message is the message you'll receive from any call parsing HTTP messages.
     *
     * This call re-orders the messages of the chain and returns the message that was parsed first with any later parsed messages re-parentized.
     *
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Message the other end of the message chain.
     */
    public function reverse() {}

    /**
     * Implements Iterator.
     */
    public function rewind() {}

    /**
     * Implements Serializable.
     *
     * @return string the serialized HTTP message.
     */
    public function serialize() {}

    /**
     * Set the message's body.
     * See http\Message::getBody() and http\Message::addBody().
     *
     * @param \http\Message\Body $body The new message body.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\UnexpectedValueException
     * @return \http\Message self.
     */
    public function setBody(http\Message\Body $body) {}

    /**
     * Set a single header.
     * See http\Message::getHeader() and http\Message::addHeader().
     *
     * ***NOTE:***
     * Prior to v2.5.6/v3.1.0 headers with the same name were merged into a single
     * header with values concatenated by comma.
     *
     * @param string $header The header's name.
     * @param mixed $value The header's value. Removes the header if NULL.
     * @return \http\Message self.
     */
    public function setHeader(string $header, $value = null) {}

    /**
     * Set the message headers.
     * See http\Message::getHeaders() and http\Message::addHeaders().
     *
     * ***NOTE:***
     * Prior to v2.5.6/v3.1.0 headers with the same name were merged into a single
     * header with values concatenated by comma.
     *
     * @param array $headers The message's headers.
     * @return \http\Message null.
     */
    public function setHeaders(array $headers = null) {}

    /**
     * Set the HTTP protocol version of the message.
     * See http\Message::getHttpVersion().
     *
     * @param string $http_version The protocol version, e.g. "1.1", optionally prefixed by "HTTP/".
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\BadHeaderException
     * @return \http\Message self.
     */
    public function setHttpVersion(string $http_version) {}

    /**
     * Set the complete message info, i.e. type and response resp. request information, at once.
     * See http\Message::getInfo().
     *
     * @param string $http_info The message info (first line of an HTTP message).
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\BadHeaderException
     * @return \http\Message self.
     */
    public function setInfo(string $http_info) {}

    /**
     * Set the request method of the message.
     * See http\Message::getRequestMethod() and http\Message::setRequestUrl().
     *
     * @param string $method The request method.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\BadMethodCallException
     * @return \http\Message self.
     */
    public function setRequestMethod(string $method) {}

    /**
     * Set the request URL of the message.
     * See http\Message::getRequestUrl() and http\Message::setRequestMethod().
     *
     * @param string $url The request URL.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\BadMethodCallException
     * @return \http\Message self.
     */
    public function setRequestUrl(string $url) {}

    /**
     * Set the response status code.
     * See http\Message::getResponseCode() and http\Message::setResponseStatus().
     *
     * ***NOTE:***
     * This method also resets the response status phrase to the default for that code.
     *
     * @param int $response_code The response code.
     * @param bool $strict Whether to check that the response code is between 100 and 599 inclusive.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\BadMethodCallException
     * @return \http\Message self.
     */
    public function setResponseCode(int $response_code, bool $strict = true) {}

    /**
     * Set the response status phrase.
     * See http\Message::getResponseStatus() and http\Message::setResponseCode().
     *
     * @param string $response_status The status phrase.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\BadMethodCallException
     * @return \http\Message self.
     */
    public function setResponseStatus(string $response_status) {}

    /**
     * Set the message type and reset the message info.
     * See http\Message::getType() and http\Message::setInfo().
     *
     * @param int $type The desired message type. See the http\Message::TYPE_* constants.
     * @return \http\Message self.
     */
    public function setType(int $type) {}

    /**
     * Splits the body of a multipart message.
     * See http\Message::isMultipart() and http\Message\Body::addPart().
     *
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\BadMethodCallException
     * @throws \http\Exception\BadMessageException
     * @return \http\Message a message chain of all messages of the multipart body.
     */
    public function splitMultipartBody() {}

    /**
     * Stream the message through a callback.
     *
     * @param callable $callback The callback of the form function(http\Message $from, string $data).
     * @return \http\Message self.
     */
    public function toCallback(callable $callback) {}

    /**
     * Stream the message into stream $stream, starting from $offset, streaming $maxlen at most.
     *
     * @param resource $stream The resource to write to.
     * @return \http\Message self.
     */
    public function toStream($stream) {}

    /**
     * Retrieve the message serialized to a string.
     *
     * @param bool $include_parent Whether to include all parent messages.
     * @return string the HTTP message chain serialized to a string.
     */
    public function toString(bool $include_parent = false) {}

    /**
     * Implements Serializable.
     *
     * @param string $data The serialized message.
     */
    public function unserialize($data) {}

    /**
     * Implements Iterator.
     * See http\Message::current() and http\Message::rewind().
     *
     * @return bool whether http\Message::current() would not return NULL.
     */
    public function valid() {}
}
/**
 * Parse, interpret and compose HTTP (header) parameters.
 */
class Params implements \ArrayAccess
{
    /**
     * The default parameter separator (",").
     */
    public const DEF_PARAM_SEP = ',';

    /**
     * The default argument separator (";").
     */
    public const DEF_ARG_SEP = ';';

    /**
     * The default value separator ("=").
     */
    public const DEF_VAL_SEP = '=';

    /**
     * Empty param separator to parse cookies.
     */
    public const COOKIE_PARAM_SEP = '';

    /**
     * Do not interpret the parsed parameters.
     */
    public const PARSE_RAW = 0;

    /**
     * Interpret input as default formatted parameters.
     */
    public const PARSE_DEFAULT = 17;

    /**
     * Parse backslash escaped (quoted) strings.
     */
    public const PARSE_ESCAPED = 1;

    /**
     * Urldecode single units of parameters, arguments and values.
     */
    public const PARSE_URLENCODED = 4;

    /**
     * Parse sub dimensions indicated by square brackets.
     */
    public const PARSE_DIMENSION = 8;

    /**
     * Parse URL querystring (same as http\Params::PARSE_URLENCODED|http\Params::PARSE_DIMENSION).
     */
    public const PARSE_QUERY = 12;

    /**
     * Parse [RFC5987](http://tools.ietf.org/html/rfc5987) style encoded character set and language information embedded in HTTP header params.
     */
    public const PARSE_RFC5987 = 16;

    /**
     * Parse [RFC5988](http://tools.ietf.org/html/rfc5988) (Web Linking) tags of Link headers.
     */
    public const PARSE_RFC5988 = 32;

    /**
     * The (parsed) parameters.
     *
     * @var array
     */
    public $params = null;

    /**
     * The parameter separator(s).
     *
     * @var array
     */
    public $param_sep = \http\Params::DEF_PARAM_SEP;

    /**
     * The argument separator(s).
     *
     * @var array
     */
    public $arg_sep = \http\Params::DEF_ARG_SEP;

    /**
     * The value separator(s).
     *
     * @var array
     */
    public $val_sep = \http\Params::DEF_VAL_SEP;

    /**
     * The modus operandi of the parser. See http\Params::PARSE_* constants.
     *
     * @var int
     */
    public $flags = \http\Params::PARSE_DEFAULT;

    /**
     * Instantiate a new HTTP (header) parameter set.
     *
     * @param mixed $params Pre-parsed parameters or a string to be parsed.
     * @param mixed $ps The parameter separator(s).
     * @param mixed $as The argument separator(s).
     * @param mixed $vs The value separator(s).
     * @param int $flags The modus operandi. See http\Params::PARSE_* constants.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\RuntimeException
     */
    public function __construct($params = null, $ps = null, $as = null, $vs = null, int $flags = null) {}

    /**
     * String cast handler. Alias of http\Params::toString().
     * Returns a stringified version of the parameters.
     *
     * @return string version of the parameters.
     */
    public function __toString() {}

    /**
     * Implements ArrayAccess.
     *
     * @param string $name The offset to look after.
     * @return bool Existence.
     */
    public function offsetExists($name) {}

    /**
     * Implements ArrayAccess.
     *
     * @param string $name The offset to retrieve.
     * @return mixed contents at offset.
     */
    public function offsetGet($name) {}

    /**
     * Implements ArrayAccess.
     *
     * @param string $name The offset to modify.
     * @param mixed $value The value to set.
     */
    public function offsetSet($name, $value) {}

    /**
     * Implements ArrayAccess.
     *
     * @param string $name The offset to delete.
     */
    public function offsetUnset($name) {}

    /**
     * Convenience method that simply returns http\Params::$params.
     *
     * @return array of parameters.
     */
    public function toArray() {}

    /**
     * Returns a stringified version of the parameters.
     *
     * @return string version of the parameters.
     */
    public function toString() {}
}
/**
 * The http\QueryString class provides versatile facilities to retrieve, use and manipulate query strings and form data.
 */
class QueryString implements \Serializable, \ArrayAccess, \IteratorAggregate
{
    /**
     * Cast requested value to bool.
     */
    public const TYPE_BOOL = 16;

    /**
     * Cast requested value to int.
     */
    public const TYPE_INT = 4;

    /**
     * Cast requested value to float.
     */
    public const TYPE_FLOAT = 5;

    /**
     * Cast requested value to string.
     */
    public const TYPE_STRING = 6;

    /**
     * Cast requested value to an array.
     */
    public const TYPE_ARRAY = 7;

    /**
     * Cast requested value to an object.
     */
    public const TYPE_OBJECT = 8;

    /**
     * The global instance. See http\QueryString::getGlobalInstance().
     *
     * @var \http\QueryString
     */
    private $instance = null;

    /**
     * The data.
     *
     * @var array
     */
    private $queryArray = null;

    /**
     * Create an independent querystring instance.
     *
     * @param mixed $params The query parameters to use or parse.
     * @throws \http\Exception\BadQueryStringException
     */
    public function __construct($params = null) {}

    /**
     * Get the string representation of the querystring (x-www-form-urlencoded).
     *
     * @return string the x-www-form-urlencoded querystring.
     */
    public function __toString() {}

    /**
     * Retrieve an querystring value.
     *
     * See http\QueryString::TYPE_* constants.
     *
     * @param string $name The key to retrieve the value for.
     * @param mixed $type The type to cast the value to. See http\QueryString::TYPE_* constants.
     * @param mixed $defval The default value to return if the key $name does not exist.
     * @param bool $delete Whether to delete the entry from the querystring after retrieval.
     * @return \http\QueryString|string|mixed|mixed|string \http\QueryString if called without arguments.
     * 		 or string the whole querystring if $name is of zero length.
     * 		 or mixed $defval if the key $name does not exist.
     * 		 or mixed the querystring value cast to $type if $type was specified and the key $name exists.
     * 		 or string the querystring value if the key $name exists and $type is not specified or equals http\QueryString::TYPE_STRING.
     */
    public function get(string $name = null, $type = null, $defval = null, bool $delete = false) {}

    /**
     * Retrieve an array value with at offset $name.
     *
     * @param string $name The key to look up.
     * @param mixed $defval The default value to return if the offset $name does not exist.
     * @param bool $delete Whether to remove the key and value from the querystring after retrieval.
     * @return array|mixed array the (casted) value.
     * 		 or mixed $defval if offset $name does not exist.
     */
    public function getArray(string $name, $defval = null, bool $delete = false) {}

    /**
     * Retrieve a boolean value at offset $name.
     *
     * @param string $name The key to look up.
     * @param mixed $defval The default value to return if the offset $name does not exist.
     * @param bool $delete Whether to remove the key and value from the querystring after retrieval.
     * @return bool|mixed bool the (casted) value.
     * 		 or mixed $defval if offset $name does not exist.
     */
    public function getBool(string $name, $defval = null, bool $delete = false) {}

    /**
     * Retrieve a float value at offset $name.
     *
     * @param string $name The key to look up.
     * @param mixed $defval The default value to return if the offset $name does not exist.
     * @param bool $delete Whether to remove the key and value from the querystring after retrieval.
     * @return float|mixed float the (casted) value.
     * 		 or mixed $defval if offset $name does not exist.
     */
    public function getFloat(string $name, $defval = null, bool $delete = false) {}

    /**
     * Retrieve the global querystring instance referencing $_GET.
     *
     * @throws \http\Exception\UnexpectedValueException
     * @return \http\QueryString the http\QueryString::$instance
     */
    public function getGlobalInstance() {}

    /**
     * Retrieve a int value at offset $name.
     *
     * @param string $name The key to look up.
     * @param mixed $defval The default value to return if the offset $name does not exist.
     * @param bool $delete Whether to remove the key and value from the querystring after retrieval.
     * @return int|mixed int the (casted) value.
     * 		 or mixed $defval if offset $name does not exist.
     */
    public function getInt(string $name, $defval = null, bool $delete = false) {}

    /**
     * Implements IteratorAggregate.
     *
     * @throws \http\Exception\InvalidArgumentException
     * @throws \InvalidArgumentException
     */
    public function getIterator() {}

    /**
     * Retrieve a object value with at offset $name.
     *
     * @param string $name The key to look up.
     * @param mixed $defval The default value to return if the offset $name does not exist.
     * @param bool $delete Whether to remove the key and value from the querystring after retrieval.
     * @return object|mixed object the (casted) value.
     * 		 or mixed $defval if offset $name does not exist.
     */
    public function getObject(string $name, $defval = null, bool $delete = false) {}

    /**
     * Retrieve a string value with at offset $name.
     *
     * @param string $name The key to look up.
     * @param mixed $defval The default value to return if the offset $name does not exist.
     * @param bool $delete Whether to remove the key and value from the querystring after retrieval.
     * @return string|mixed string the (casted) value.
     * 		 or mixed $defval if offset $name does not exist.
     */
    public function getString(string $name, $defval = null, bool $delete = false) {}

    /**
     * Set additional $params to a clone of this instance.
     * See http\QueryString::set().
     *
     * ***NOTE:***
     * This method returns a clone (copy) of this instance.
     *
     * @param mixed $params Additional params as object, array or string to parse.
     * @throws \http\Exception\BadQueryStringException
     * @return \http\QueryString clone.
     */
    public function mod($params = null) {}

    /**
     * Implements ArrayAccess.
     *
     * @param string $name The offset to look up.
     * @return bool whether the key $name isset.
     */
    public function offsetExists($name) {}

    /**
     * Implements ArrayAccess.
     *
     * @param mixed $offset The offset to look up.
     * @return mixed|null mixed the value locate at offset $name.
     * 		 or NULL if key $name could not be found.
     */
    public function offsetGet($offset) {}

    /**
     * Implements ArrayAccess.
     *
     * @param string $name The key to set the value for.
     * @param mixed $data The data to place at offset $name.
     */
    public function offsetSet($name, $data) {}

    /**
     * Implements ArrayAccess.
     *
     * @param string $name The offset to look up.
     */
    public function offsetUnset($name) {}

    /**
     * Implements Serializable.
     * See http\QueryString::toString().
     *
     * @return string the x-www-form-urlencoded querystring.
     */
    public function serialize() {}

    /**
     * Set additional querystring entries.
     *
     * @param mixed $params Additional params as object, array or string to parse.
     * @return \http\QueryString self.
     */
    public function set($params) {}

    /**
     * Simply returns http\QueryString::$queryArray.
     *
     * @return array the $queryArray property.
     */
    public function toArray() {}

    /**
     * Get the string representation of the querystring (x-www-form-urlencoded).
     *
     * @return string the x-www-form-urlencoded querystring.
     */
    public function toString() {}

    /**
     * Implements Serializable.
     *
     * @param string $serialized The x-www-form-urlencoded querystring.
     * @throws \http\Exception
     */
    public function unserialize($serialized) {}

    /**
     * Translate character encodings of the querystring with ext/iconv.
     *
     * ***NOTE:***
     * This method is only available when ext/iconv support was enabled at build time.
     *
     * @param string $from_enc The encoding to convert from.
     * @param string $to_enc The encoding to convert to.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\BadConversionException
     * @return \http\QueryString self.
     */
    public function xlate(string $from_enc, string $to_enc) {}
}
/**
 * The http\Url class provides versatile means to parse, construct and manipulate URLs.
 */
class Url
{
    /**
     * Replace parts of the old URL with parts of the new.
     */
    public const REPLACE = 0;

    /**
     * Whether a relative path should be joined into the old path.
     */
    public const JOIN_PATH = 1;

    /**
     * Whether the querystrings should be joined.
     */
    public const JOIN_QUERY = 2;

    /**
     * Strip the user information from the URL.
     */
    public const STRIP_USER = 4;

    /**
     * Strip the password from the URL.
     */
    public const STRIP_PASS = 8;

    /**
     * Strip user and password information from URL (same as STRIP_USER|STRIP_PASS).
     */
    public const STRIP_AUTH = 12;

    /**
     * Do not include the port.
     */
    public const STRIP_PORT = 32;

    /**
     * Do not include the URL path.
     */
    public const STRIP_PATH = 64;

    /**
     * Do not include the URL querystring.
     */
    public const STRIP_QUERY = 128;

    /**
     * Strip the fragment (hash) from the URL.
     */
    public const STRIP_FRAGMENT = 256;

    /**
     * Strip everything except scheme and host information.
     */
    public const STRIP_ALL = 492;

    /**
     * Import initial URL parts from the SAPI environment.
     */
    public const FROM_ENV = 4096;

    /**
     * Whether to sanitize the URL path (consolidate double slashes, directory jumps etc.)
     */
    public const SANITIZE_PATH = 8192;

    /**
     * Parse UTF-8 encoded multibyte sequences.
     */
    public const PARSE_MBUTF8 = 131072;

    /**
     * Parse locale encoded multibyte sequences (on systems with wide character support).
     */
    public const PARSE_MBLOC = 65536;

    /**
     * Parse and convert multibyte hostnames according to IDNA (with IDNA support).
     */
    public const PARSE_TOIDN = 1048576;

    /**
     * Explicitly request IDNA2003 implementation if available (libidn, idnkit or ICU).
     */
    public const PARSE_TOIDN_2003 = 9437184;

    /**
     * Explicitly request IDNA2008 implementation if available (libidn2, idnkit2 or ICU).
     */
    public const PARSE_TOIDN_2008 = 5242880;

    /**
     * Percent encode multibyte sequences in the userinfo, path, query and fragment parts of the URL.
     */
    public const PARSE_TOPCT = 2097152;

    /**
     * Continue parsing when encountering errors.
     */
    public const IGNORE_ERRORS = 268435456;

    /**
     * Suppress errors/exceptions.
     */
    public const SILENT_ERRORS = 536870912;

    /**
     * Standard flags used by default internally for e.g. http\Message::setRequestUrl().
     *   Enables joining path and query, sanitizing path, multibyte/unicode, international domain names and transient percent encoding.
     */
    public const STDFLAGS = 3350531;

    /**
     * The URL's scheme.
     *
     * @var string
     */
    public $scheme = null;

    /**
     * Authenticating user.
     *
     * @var string
     */
    public $user = null;

    /**
     * Authentication password.
     *
     * @var string
     */
    public $pass = null;

    /**
     * Hostname/domain.
     *
     * @var string
     */
    public $host = null;

    /**
     * Port.
     *
     * @var string
     */
    public $port = null;

    /**
     * URL path.
     *
     * @var string
     */
    public $path = null;

    /**
     * URL querystring.
     *
     * @var string
     */
    public $query = null;

    /**
     * URL fragment (hash).
     *
     * @var string
     */
    public $fragment = null;

    /**
     * Create an instance of an http\Url.
     *
     * ***NOTE:***
     * Prior to v3.0.0, the default for the $flags parameter was http\Url::FROM_ENV.
     *
     * See also http\Env\Url.
     *
     * @param mixed $old_url Initial URL parts. Either an array, object, http\Url instance or string to parse.
     * @param mixed $new_url Overriding URL parts. Either an array, object, http\Url instance or string to parse.
     * @param int $flags The modus operandi of constructing the url. See http\Url constants.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\BadUrlException
     */
    public function __construct($old_url = null, $new_url = null, int $flags = 0) {}

    /**
     * String cast handler. Alias of http\Url::toString().
     *
     * @return string the URL as string.
     */
    public function __toString() {}

    /**
     * Clone this URL and apply $parts to the cloned URL.
     *
     * ***NOTE:***
     * This method returns a clone (copy) of this instance.
     *
     * @param mixed $parts New URL parts.
     * @param int $flags Modus operandi of URL construction. See http\Url constants.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\BadUrlException
     * @return \http\Url clone.
     */
    public function mod($parts, int $flags = \http\Url::JOIN_PATH|\http\Url::JOIN_QUERY|\http\Url::SANITIZE_PATH) {}

    /**
     * Retrieve the URL parts as array.
     *
     * @return array the URL parts.
     */
    public function toArray() {}

    /**
     * Get the string prepresentation of the URL.
     *
     * @return string the URL as string.
     */
    public function toString() {}
}
/**
 * The http\Client\Curl namespace holds option value constants specific to the curl driver of the http\Client.
 */

namespace http\Client\Curl;

/**
 * Bitmask of available libcurl features.
 *   See http\Client\Curl\Features namespace.
 */
const FEATURES = 4179869;
/**
 * List of library versions of or linked into libcurl,
 *   e.g. "libcurl/7.50.0 OpenSSL/1.0.2h zlib/1.2.8 libidn/1.32 nghttp2/1.12.0".
 *   See http\Client\Curl\Versions namespace.
 */
const VERSIONS = 'libcurl/7.64.0 OpenSSL/1.1.1b zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) libssh2/1.8.0 nghttp2/1.36.0 librtmp/2.3';
/**
 * Use HTTP/1.0 protocol version.
 */
const HTTP_VERSION_1_0 = 1;
/**
 * Use HTTP/1.1 protocol version.
 */
const HTTP_VERSION_1_1 = 2;
/**
 * Attempt to use HTTP/2 protocol version. Available if libcurl is v7.33.0 or more recent and was built with nghttp2 support.
 */
const HTTP_VERSION_2_0 = 3;
/**
 * Attempt to use version 2 for HTTPS, version 1.1 for HTTP. Available if libcurl is v7.47.0 or more recent and was built with nghttp2 support.
 */
const HTTP_VERSION_2TLS = 4;
/**
 * Use any HTTP protocol version.
 */
const HTTP_VERSION_ANY = 0;
/**
 * Use TLS v1.0 encryption.
 */
const SSL_VERSION_TLSv1_0 = 4;
/**
 * Use TLS v1.1 encryption.
 */
const SSL_VERSION_TLSv1_1 = 5;
/**
 * Use TLS v1.2 encryption.
 */
const SSL_VERSION_TLSv1_2 = 6;
/**
 * Use any TLS v1 encryption.
 */
const SSL_VERSION_TLSv1 = 1;
/**
 * Use SSL v2 encryption.
 */
const SSL_VERSION_SSLv2 = 2;
/**
 * Use SSL v3 encryption.
 */
const SSL_VERSION_SSLv3 = 3;
/**
 * Use any encryption.
 */
const SSL_VERSION_ANY = 0;
/**
 * Use TLS SRP authentication. Available if libcurl is v7.21.4 or more recent and was built with gnutls or openssl with TLS-SRP support.
 */
const TLSAUTH_SRP = 1;
/**
 * Use IPv4 resolver.
 */
const IPRESOLVE_V4 = 1;
/**
 * Use IPv6 resolver.
 */
const IPRESOLVE_V6 = 2;
/**
 * Use any resolver.
 */
const IPRESOLVE_ANY = 0;
/**
 * Use Basic authentication.
 */
const AUTH_BASIC = 1;
/**
 * Use Digest authentication.
 */
const AUTH_DIGEST = 2;
/**
 * Use IE (lower v7) quirks with Digest authentication. Available if libcurl is v7.19.3 or more recent.
 */
const AUTH_DIGEST_IE = 16;
/**
 * Use NTLM authentication.
 */
const AUTH_NTLM = 8;
/**
 * Use GSS-Negotiate authentication.
 */
const AUTH_GSSNEG = 4;
/**
 * Use HTTP Netgotiate authentication (SPNEGO, RFC4559). Available if libcurl is v7.38.0 or more recent.
 */
const AUTH_SPNEGO = 4;
/**
 * Use any authentication.
 */
const AUTH_ANY = -17;
/**
 * Use SOCKSv4 proxy protocol.
 */
const PROXY_SOCKS4 = 4;
/**
 * Use SOCKSv4a proxy protocol.
 */
const PROXY_SOCKS4A = 5;
/**
 * Use SOCKS5h proxy protocol.
 */
const PROXY_SOCKS5_HOSTNAME = 5;
/**
 * Use SOCKS5 proxy protoccol.
 */
const PROXY_SOCKS5 = 5;
/**
 * Use HTTP/1.1 proxy protocol.
 */
const PROXY_HTTP = 0;
/**
 * Use HTTP/1.0 proxy protocol. Available if libcurl is v7.19.4 or more recent.
 */
const PROXY_HTTP_1_0 = 1;
/**
 * Keep POSTing on 301 redirects. Available if libcurl is v7.19.1 or more recent.
 */
const POSTREDIR_301 = 1;
/**
 * Keep POSTing on 302 redirects. Available if libcurl is v7.19.1 or more recent.
 */
const POSTREDIR_302 = 2;
/**
 * Keep POSTing on 303 redirects. Available if libcurl is v7.19.1 or more recent.
 */
const POSTREDIR_303 = 4;
/**
 * Keep POSTing on any redirect. Available if libcurl is v7.19.1 or more recent.
 */
const POSTREDIR_ALL = 7;

namespace http\Client;

/**
 * The http\Client\Request class provides an HTTP message implementation tailored to represent a request message to be sent by the client.
 *
 * See http\Client::enqueue().
 */
class Request extends \http\Message
{
    /**
     * Array of options for this request, which override client options.
     *
     * @var array
     */
    protected $options = null;

    /**
     * Create a new client request message to be enqueued and sent by http\Client.
     *
     * @param string $meth The request method.
     * @param string $url The request URL.
     * @param array $headers HTTP headers.
     * @param \http\Message\Body $body Request body.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\UnexpectedValueException
     */
    public function __construct(string $meth = null, string $url = null, array $headers = null, http\Message\Body $body = null) {}

    /**
     * Add querystring data.
     * See http\Client\Request::setQuery() and http\Message::setRequestUrl().
     *
     * @param mixed $query_data Additional querystring data.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\BadQueryStringException
     * @return \http\Client\Request self.
     */
    public function addQuery($query_data) {}

    /**
     * Add specific SSL options.
     * See http\Client\Request::setSslOptions(), http\Client\Request::setOptions() and http\Client\Curl\$ssl options.
     *
     * @param array $ssl_options Add this SSL options.
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Client\Request self.
     */
    public function addSslOptions(array $ssl_options = null) {}

    /**
     * Extract the currently set "Content-Type" header.
     * See http\Client\Request::setContentType().
     *
     * @return string|null string the currently set content type.
     * 		 or NULL if no "Content-Type" header is set.
     */
    public function getContentType() {}

    /**
     * Get priorly set options.
     * See http\Client\Request::setOptions().
     *
     * @return array options.
     */
    public function getOptions() {}

    /**
     * Retrieve the currently set querystring.
     *
     * @return string|null string the currently set querystring.
     * 		 or NULL if no querystring is set.
     */
    public function getQuery() {}

    /**
     * Retrieve priorly set SSL options.
     * See http\Client\Request::getOptions() and http\Client\Request::setSslOptions().
     *
     * @return array SSL options.
     */
    public function getSslOptions() {}

    /**
     * Set the MIME content type of the request message.
     *
     * @param string $content_type The MIME type used as "Content-Type".
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\UnexpectedValueException
     * @return \http\Client\Request self.
     */
    public function setContentType(string $content_type) {}

    /**
     * Set client options.
     * See http\Client::setOptions() and http\Client\Curl.
     *
     * Request specific options override general options which were set in the client.
     *
     * ***NOTE:***
     * Only options specified prior enqueueing a request are applied to the request.
     *
     * @param array $options The options to set.
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Client\Request self.
     */
    public function setOptions(array $options = null) {}

    /**
     * (Re)set the querystring.
     * See http\Client\Request::addQuery() and http\Message::setRequestUrl().
     *
     * @param mixed $query_data
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\BadQueryStringException
     * @return \http\Client\Request self.
     */
    public function setQuery($query_data) {}

    /**
     * Specifically set SSL options.
     * See http\Client\Request::setOptions() and http\Client\Curl\$ssl options.
     *
     * @param array $ssl_options Set SSL options to this array.
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Client\Request self.
     */
    public function setSslOptions(array $ssl_options = null) {}
}
/**
 * The http\Client\Response class represents an HTTP message the client returns as answer from a server to an http\Client\Request.
 */
class Response extends \http\Message
{
    /**
     * Extract response cookies.
     * Parses any "Set-Cookie" response headers into an http\Cookie list. See http\Cookie::__construct().
     *
     * @param int $flags Cookie parser flags.
     * @param array $allowed_extras List of keys treated as extras.
     * @return array list of http\Cookie instances.
     */
    public function getCookies(int $flags = 0, array $allowed_extras = null) {}

    /**
     * Retrieve transfer related information after the request has completed.
     * See http\Client::getTransferInfo().
     *
     * @param string $name A key to retrieve out of the transfer info.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\BadMethodCallException
     * @throws \http\Exception\UnexpectedValueException
     * @return object|mixed object stdClass instance with all transfer info if $name was not given.
     * 		 or mixed the specific transfer info for $name.
     */
    public function getTransferInfo(string $name = null) {}
}

namespace http\Client\Curl;

/**
 * Interface to an user event loop implementation for http\Client::configure()'s $use_eventloop option.
 *
 * ***NOTE:***
 * This interface was added in v2.6.0, resp. v3.1.0.
 */
interface User
{
    /**
     * No action.
     */
    public const POLL_NONE = 0;

    /**
     * Poll for read readiness.
     */
    public const POLL_IN = 1;

    /**
     * Poll for write readiness.
     */
    public const POLL_OUT = 2;

    /**
     * Poll for read/write readiness.
     */
    public const POLL_INOUT = 3;

    /**
     * Stop polling for activity on this descriptor.
     */
    public const POLL_REMOVE = 4;

    /**
     * Initialize the event loop.
     *
     * @param callable $run as function(http\Client $c, resource $s = null, int $action = http\Client\Curl\User::POLL_NONE) : int
     *   Internal callback returning the number of unfinished requests pending.
     *
     *
     * ***NOTE***:
     * The callback should be run when a timeout occurs or a watched socket needs action.
     */
    public function init(callable $run);

    /**
     * Run the loop as long as it does not block.
     *
     * ***NOTE:***
     * This method is called by http\Client::once(), so it does not need to have an actual implementation if http\Client::once() is never called.
     */
    public function once();

    /**
     * Run the loop.
     *
     * ***NOTE:***
     * This method is called by http\Client::send(), so it does not need to have an actual implementation if http\Client::send() is never called.
     */
    public function send();

    /**
     * Register (or deregister) a socket watcher.
     *
     * @param resource $socket The socket descriptor to watch.
     * @param int $poll http\Client\Curl\User::POLL_* constant.
     */
    public function socket($socket, int $poll);

    /**
     * Register a timeout watcher.
     *
     * @param int $timeout_ms Desired maximum timeout in milliseconds.
     */
    public function timer(int $timeout_ms);

    /**
     * Wait/poll/select (block the loop) until events fire.
     *
     * ***NOTE:***
     * This method is called by http\Client::wait(), so it does not need to have an actual implementation if http\Client::wait() is never called.
     *
     * @param int $timeout_ms Block for at most this milliseconds.
     */
    public function wait(int $timeout_ms = null);
}
/**
 * CURL feature constants.
 *
 * ***NOTE:***
 * These constants have been added in v2.6.0, resp. v3.1.0.
 */

namespace http\Client\Curl\Features;

/**
 * Whether libcurl supports asynchronous domain name resolution.
 */
const ASYNCHDNS = 128;
/**
 * Whether libcurl supports the Generic Security Services Application Program Interface. Available if libcurl is v7.38.0 or more recent.
 */
const GSSAPI = 131072;
/**
 * Whether libcurl supports HTTP Generic Security Services negotiation.
 */
const GSSNEGOTIATE = 32;
/**
 * Whether libcurl supports the HTTP/2 protocol. Available if libcurl is v7.33.0 or more recent.
 */
const HTTP2 = 65536;
/**
 * Whether libcurl supports international domain names.
 */
const IDN = 1024;
/**
 * Whether libcurl supports IPv6.
 */
const IPV6 = 1;
/**
 * Whether libcurl supports the old Kerberos protocol.
 */
const KERBEROS4 = 2;
/**
 * Whether libcurl supports the more recent Kerberos v5 protocol. Available if libcurl is v7.40.0 or more recent.
 */
const KERBEROS5 = 262144;
/**
 * Whether libcurl supports large files.
 */
const LARGEFILE = 512;
/**
 * Whether libcurl supports gzip/deflate compression.
 */
const LIBZ = 8;
/**
 * Whether libcurl supports the NT Lan Manager authentication.
 */
const NTLM = 16;
/**
 * Whether libcurl supports NTLM delegation to a winbind helper. Available if libcurl is v7.22.0 or more recent.
 */
const NTLM_WB = 32768;
/**
 * Whether libcurl supports the Public Suffix List for cookie host handling. Available if libcurl is v7.47.0 or more recent.
 */
const PSL = 1048576;
/**
 * Whether libcurl supports the Simple and Protected GSSAPI Negotiation Mechanism.
 */
const SPNEGO = 256;
/**
 * Whether libcurl supports SSL/TLS protocols.
 */
const SSL = 4;
/**
 * Whether libcurl supports the Security Support Provider Interface.
 */
const SSPI = 2048;
/**
 * Whether libcurl supports TLS Secure Remote Password authentication. Available if libcurl is v7.21.4 or more recent.
 */
const TLSAUTH_SRP = 16384;
/**
 * Whether libcurl supports connections to unix sockets. Available if libcurl is v7.40.0 or more recent.
 */
const UNIX_SOCKETS = 524288;
/**
 * CURL version constants.
 *
 * ***NOTE:***
 * These constants have been added in v2.6.0, resp. v3.1.0.
 */

namespace http\Client\Curl\Versions;

/**
 * Version string of libcurl, e.g. "7.50.0".
 */
const CURL = '7.64.0';
/**
 * Version string of the SSL/TLS library, e.g. "OpenSSL/1.0.2h".
 */
const SSL = 'OpenSSL/1.1.1b';
/**
 * Version string of the zlib compression library, e.g. "1.2.8".
 */
const LIBZ = '1.2.11';
/**
 * Version string of the c-ares library, e.g. "1.11.0".
 */
const ARES = null;
/**
 * Version string of the IDN library, e.g. "1.32".
 */
const IDN = null;

namespace http\Encoding;

/**
 * Base class for encoding stream implementations.
 */
abstract class Stream
{
    /**
     * Do no intermittent flushes.
     */
    public const FLUSH_NONE = 0;

    /**
     * Flush at appropriate transfer points.
     */
    public const FLUSH_SYNC = 1048576;

    /**
     * Flush at each IO operation.
     */
    public const FLUSH_FULL = 2097152;

    /**
     * Base constructor for encoding stream implementations.
     *
     * @param int $flags See http\Encoding\Stream and implementation specific constants.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\RuntimeException
     */
    public function __construct(int $flags = 0) {}

    /**
     * Check whether the encoding stream is already done.
     *
     * @return bool whether the encoding stream is completed.
     */
    public function done() {}

    /**
     * Finish and reset the encoding stream.
     * Returns any pending data.
     *
     * @return string any pending data.
     */
    public function finish() {}

    /**
     * Flush the encoding stream.
     * Returns any pending data.
     *
     * @return string any pending data.
     */
    public function flush() {}

    /**
     * Update the encoding stream with more input.
     *
     * @param string $data The data to pass through the stream.
     * @return string processed data.
     */
    public function update(string $data) {}
}

namespace http\Encoding\Stream;

/**
 * A [brotli](https://brotli.org) decoding stream.
 *
 * ***NOTE:***
 * This class has been added in v3.2.0.
 */
class Debrotli extends \http\Encoding\Stream
{
    /**
     * Decode brotli encoded data.
     *
     * @param string $data The data to uncompress.
     * @return string the uncompressed data.
     */
    public function decode(string $data) {}
}
/**
 * A stream decoding data encoded with chunked transfer encoding.
 */
class Dechunk extends \http\Encoding\Stream
{
    /**
     * Decode chunked encoded data.
     *
     * @param string $data The data to decode.
     * @param int &$decoded_len Out parameter with the length of $data that's been decoded.
     *   Should be ```strlen($data)``` if not truncated.
     * @return string|string|string|false string the decoded data.
     * 		 or string the unencoded data.
     * 		 or string the truncated decoded data.
     * 		 or false if $data cannot be decoded.
     */
    public function decode(string $data, int &$decoded_len = 0) {}
}
/**
 * A deflate stream supporting deflate, zlib and gzip encodings.
 */
class Deflate extends \http\Encoding\Stream
{
    /**
     * Gzip encoding. RFC1952
     */
    public const TYPE_GZIP = 16;

    /**
     * Zlib encoding. RFC1950
     */
    public const TYPE_ZLIB = 0;

    /**
     * Deflate encoding. RFC1951
     */
    public const TYPE_RAW = 32;

    /**
     * Default compression level.
     */
    public const LEVEL_DEF = 0;

    /**
     * Least compression level.
     */
    public const LEVEL_MIN = 1;

    /**
     * Greatest compression level.
     */
    public const LEVEL_MAX = 9;

    /**
     * Default compression strategy.
     */
    public const STRATEGY_DEF = 0;

    /**
     * Filtered compression strategy.
     */
    public const STRATEGY_FILT = 256;

    /**
     * Huffman strategy only.
     */
    public const STRATEGY_HUFF = 512;

    /**
     * Run-length encoding strategy.
     */
    public const STRATEGY_RLE = 768;

    /**
     * Encoding with fixed Huffman codes only.
     *
     * > **A note on the compression strategy:**
     * >
     * > The strategy parameter is used to tune the compression algorithm.
     * >
     * > Use the value DEFAULT_STRATEGY for normal data, FILTERED for data produced by a filter (or predictor), HUFFMAN_ONLY to force Huffman encoding only (no string match), or RLE to limit match distances to one (run-length encoding).
     * >
     * > Filtered data consists mostly of small values with a somewhat random distribution. In this case, the compression algorithm is tuned to compress them better. The effect of FILTERED is to force more Huffman coding and less string matching; it is somewhat intermediate between DEFAULT_STRATEGY and HUFFMAN_ONLY.
     * >
     * > RLE is designed to be almost as fast as HUFFMAN_ONLY, but give better compression for PNG image data.
     * >
     * > FIXED prevents the use of dynamic Huffman codes, allowing for a simpler decoder for special applications.
     * >
     * > The strategy parameter only affects the compression ratio but not the correctness of the compressed output even if it is not set appropriately.
     * >
     * >_Source: [zlib Manual](http://www.zlib.net/manual.html)_
     */
    public const STRATEGY_FIXED = 1024;

    /**
     * Encode data with deflate/zlib/gzip encoding.
     *
     * @param string $data The data to compress.
     * @param int $flags Any compression tuning flags. See http\Encoding\Stream\Deflate and http\Encoding\Stream constants.
     * @return string the compressed data.
     */
    public function encode(string $data, int $flags = 0) {}
}
/**
 * A [brotli](https://brotli.org) encoding stream.
 *
 * ***NOTE:***
 * This class has been added in v3.2.0.
 */
class Enbrotli extends \http\Encoding\Stream
{
    /**
     * Default compression level.
     */
    public const LEVEL_DEF = null;

    /**
     * Least compression level.
     */
    public const LEVEL_MIN = null;

    /**
     * Greatest compression level.
     */
    public const LEVEL_MAX = null;

    /**
     * Default window bits.
     */
    public const WBITS_DEF = null;

    /**
     * Minimum window bits.
     */
    public const WBITS_MIN = null;

    /**
     * Maximum window bits.
     */
    public const WBITS_MAX = null;

    /**
     * Default compression mode.
     */
    public const MODE_GENERIC = null;

    /**
     * Compression mode for UTF-8 formatted text.
     */
    public const MODE_TEXT = null;

    /**
     * Compression mode used in WOFF 2.0.
     */
    public const MODE_FONT = null;

    /**
     * Encode data with brotli encoding.
     *
     * @param string $data The data to compress.
     * @param int $flags Any compression tuning flags. See http\Encoding\Stream\Enbrotli and http\Encoding\Stream constants.
     * @return string the compressed data.
     */
    public function encode(string $data, int $flags = 0) {}
}
/**
 * A inflate stream supporting deflate, zlib and gzip encodings.
 */
class Inflate extends \http\Encoding\Stream
{
    /**
     * Decode deflate/zlib/gzip encoded data.
     *
     * @param string $data The data to uncompress.
     * @return string the uncompressed data.
     */
    public function decode(string $data) {}
}

namespace http\Env;

/**
 * The http\Env\Request class' instances represent the server's current HTTP request.
 *
 * See http\Message for inherited members.
 */
class Request extends \http\Message
{
    /**
     * The request's query parameters. ($_GET)
     *
     * @var \http\QueryString
     */
    protected $query = null;

    /**
     * The request's form parameters. ($_POST)
     *
     * @var \http\QueryString
     */
    protected $form = null;

    /**
     * The request's form uploads. ($_FILES)
     *
     * @var array
     */
    protected $files = null;

    /**
     * The request's cookies. ($_COOKIE)
     *
     * @var array
     */
    protected $cookie = null;

    /**
     * Create an instance of the server's current HTTP request.
     *
     * Upon construction, the http\Env\Request acquires http\QueryString instances of query parameters ($\_GET) and form parameters ($\_POST).
     *
     * It also compiles an array of uploaded files ($\_FILES) more comprehensive than the original $\_FILES array, see http\Env\Request::getFiles() for that matter.
     *
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\UnexpectedValueException
     */
    public function __construct() {}

    /**
     * Retrieve an URL query value ($_GET).
     *
     * See http\QueryString::get() and http\QueryString::TYPE_* constants.
     *
     * @param string $name The key to retrieve the value for.
     * @param mixed $type The type to cast the value to. See http\QueryString::TYPE_* constants.
     * @param mixed $defval The default value to return if the key $name does not exist.
     * @param bool $delete Whether to delete the entry from the querystring after retrieval.
     * @return \http\QueryString|string|mixed|mixed|string \http\QueryString if called without arguments.
     * 		 or string the whole querystring if $name is of zero length.
     * 		 or mixed $defval if the key $name does not exist.
     * 		 or mixed the querystring value cast to $type if $type was specified and the key $name exists.
     * 		 or string the querystring value if the key $name exists and $type is not specified or equals http\QueryString::TYPE_STRING.
     */
    public function getCookie(string $name = null, $type = null, $defval = null, bool $delete = false) {}

    /**
     * Retrieve the uploaded files list ($_FILES).
     *
     * @return array the consolidated upload files array.
     */
    public function getFiles() {}

    /**
     * Retrieve a form value ($_POST).
     *
     * See http\QueryString::get() and http\QueryString::TYPE_* constants.
     *
     * @param string $name The key to retrieve the value for.
     * @param mixed $type The type to cast the value to. See http\QueryString::TYPE_* constants.
     * @param mixed $defval The default value to return if the key $name does not exist.
     * @param bool $delete Whether to delete the entry from the querystring after retrieval.
     * @return \http\QueryString|string|mixed|mixed|string \http\QueryString if called without arguments.
     * 		 or string the whole querystring if $name is of zero length.
     * 		 or mixed $defval if the key $name does not exist.
     * 		 or mixed the querystring value cast to $type if $type was specified and the key $name exists.
     * 		 or string the querystring value if the key $name exists and $type is not specified or equals http\QueryString::TYPE_STRING.
     */
    public function getForm(string $name = null, $type = null, $defval = null, bool $delete = false) {}

    /**
     * Retrieve an URL query value ($_GET).
     *
     * See http\QueryString::get() and http\QueryString::TYPE_* constants.
     *
     * @param string $name The key to retrieve the value for.
     * @param mixed $type The type to cast the value to. See http\QueryString::TYPE_* constants.
     * @param mixed $defval The default value to return if the key $name does not exist.
     * @param bool $delete Whether to delete the entry from the querystring after retrieval.
     * @return \http\QueryString|string|mixed|mixed|string \http\QueryString if called without arguments.
     * 		 or string the whole querystring if $name is of zero length.
     * 		 or mixed $defval if the key $name does not exist.
     * 		 or mixed the querystring value cast to $type if $type was specified and the key $name exists.
     * 		 or string the querystring value if the key $name exists and $type is not specified or equals http\QueryString::TYPE_STRING.
     */
    public function getQuery(string $name = null, $type = null, $defval = null, bool $delete = false) {}
}
/**
 * The http\Env\Response class' instances represent the server's current HTTP response.
 *
 * See http\Message for inherited members.
 */
class Response extends \http\Message
{
    /**
     * Do not use content encoding.
     */
    public const CONTENT_ENCODING_NONE = 0;

    /**
     * Support "Accept-Encoding" requests with gzip and deflate encoding.
     */
    public const CONTENT_ENCODING_GZIP = 1;

    /**
     * No caching info available.
     */
    public const CACHE_NO = 0;

    /**
     * The cache was hit.
     */
    public const CACHE_HIT = 1;

    /**
     * The cache was missed.
     */
    public const CACHE_MISS = 2;

    /**
     * A request instance which overrides the environments default request.
     *
     * @var \http\Env\Request
     */
    protected $request = null;

    /**
     * The response's MIME content type.
     *
     * @var string
     */
    protected $contentType = null;

    /**
     * The response's MIME content disposition.
     *
     * @var string
     */
    protected $contentDisposition = null;

    /**
     * See http\Env\Response::CONTENT_ENCODING_* constants.
     *
     * @var int
     */
    protected $contentEncoding = null;

    /**
     * How the client should treat this response in regards to caching.
     *
     * @var string
     */
    protected $cacheControl = null;

    /**
     * A custom ETag.
     *
     * @var string
     */
    protected $etag = null;

    /**
     * A "Last-Modified" time stamp.
     *
     * @var int
     */
    protected $lastModified = null;

    /**
     * Any throttling delay.
     *
     * @var int
     */
    protected $throttleDelay = null;

    /**
     * The chunk to send every $throttleDelay seconds.
     *
     * @var int
     */
    protected $throttleChunk = null;

    /**
     * The response's cookies.
     *
     * @var array
     */
    protected $cookies = null;

    /**
     * Create a new env response message instance.
     *
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\UnexpectedValueException
     */
    public function __construct() {}

    /**
     * Output buffer handler.
     * Appends output data to the body.
     *
     * @param string $data The data output.
     * @param int $ob_flags Output buffering flags passed from the output buffering control layer.
     * @return bool success.
     */
    public function __invoke(string $data, int $ob_flags = 0) {}

    /**
     * Manually test the header $header_name of the environment's request for a cache hit.
     * http\Env\Response::send() checks that itself, though.
     *
     * @param string $header_name The request header to test.
     * @return int a http\Env\Response::CACHE_* constant.
     */
    public function isCachedByEtag(string $header_name = "If-None-Match") {}

    /**
     * Manually test the header $header_name of the environment's request for a cache hit.
     * http\Env\Response::send() checks that itself, though.
     *
     * @param string $header_name The request header to test.
     * @return int a http\Env\Response::CACHE_* constant.
     */
    public function isCachedByLastModified(string $header_name = "If-Modified-Since") {}

    /**
     * Send the response through the SAPI or $stream.
     * Flushes all output buffers.
     *
     * @param resource $stream A writable stream to send the response through.
     * @return bool success.
     */
    public function send($stream = null) {}

    /**
     * Make suggestions to the client how it should cache the response.
     *
     * @param string $cache_control (A) "Cache-Control" header value(s).
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Env\Response self.
     */
    public function setCacheControl(string $cache_control) {}

    /**
     * Set the response's content disposition parameters.
     *
     * @param array $disposition_params MIME content disposition as http\Params array.
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Env\Response self.
     */
    public function setContentDisposition(array $disposition_params) {}

    /**
     * Enable support for "Accept-Encoding" requests with deflate or gzip.
     * The response will be compressed if the client indicates support and wishes that.
     *
     * @param int $content_encoding See http\Env\Response::CONTENT_ENCODING_* constants.
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Env\Response self.
     */
    public function setContentEncoding(int $content_encoding) {}

    /**
     * Set the MIME content type of the response.
     *
     * @param string $content_type The response's content type.
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Env\Response self.
     */
    public function setContentType(string $content_type) {}

    /**
     * Add cookies to the response to send.
     *
     * @param mixed $cookie The cookie to send.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\UnexpectedValueException
     * @return \http\Env\Response self.
     */
    public function setCookie($cookie) {}

    /**
     * Override the environment's request.
     *
     * @param \http\Message $env_request The overriding request message.
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Env\Response self.
     */
    public function setEnvRequest(http\Message $env_request) {}

    /**
     * Set a custom ETag.
     *
     * ***NOTE:***
     * This will be used for caching and pre-condition checks.
     *
     * @param string $etag A ETag.
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Env\Response self.
     */
    public function setEtag(string $etag) {}

    /**
     * Set a custom last modified time stamp.
     *
     * ***NOTE:***
     * This will be used for caching and pre-condition checks.
     *
     * @param int $last_modified A unix timestamp.
     * @throws \http\Exception\InvalidArgumentException
     * @return \http\Env\Response self.
     */
    public function setLastModified(int $last_modified) {}

    /**
     * Enable throttling.
     * Send $chunk_size bytes every $delay seconds.
     *
     * ***NOTE:***
     * If you need throttling by regular means, check for other options in your stack, because this method blocks the executing process/thread until the response has completely been sent.
     *
     * @param int $chunk_size Bytes to send.
     * @param float $delay Seconds to sleep.
     * @return \http\Env\Response self.
     */
    public function setThrottleRate(int $chunk_size, float $delay = 1) {}
}
/**
 * URL class using the HTTP environment by default.
 *
 * ***NOTE:***
 * This class has been added in v3.0.0.
 *
 * Always adds http\Url::FROM_ENV to the $flags constructor argument. See also http\Url.
 */
class Url extends \http\Url {}

namespace http\Exception;

/**
 * A bad conversion (e.g. character conversion) was encountered.
 */
class BadConversionException extends \DomainException implements \http\Exception {}
/**
 * A bad HTTP header was encountered.
 */
class BadHeaderException extends \DomainException implements \http\Exception {}
/**
 * A bad HTTP message was encountered.
 */
class BadMessageException extends \DomainException implements \http\Exception {}
/**
 * A method was called on an object, which was in an invalid or unexpected state.
 */
class BadMethodCallException extends \BadMethodCallException implements \http\Exception {}
/**
 * A bad querystring was encountered.
 */
class BadQueryStringException extends \DomainException implements \http\Exception {}
/**
 * A bad HTTP URL was encountered.
 */
class BadUrlException extends \DomainException implements \http\Exception {}
/**
 * One or more invalid arguments were passed to a method.
 */
class InvalidArgumentException extends \InvalidArgumentException implements \http\Exception {}
/**
 * A generic runtime exception.
 */
class RuntimeException extends \RuntimeException implements \http\Exception {}
/**
 * An unexpected value was encountered.
 */
class UnexpectedValueException extends \UnexpectedValueException implements \http\Exception {}

namespace http\Header;

/**
 * The parser which is underlying http\Header and http\Message.
 *
 * ***NOTE:***
 * This class has been added in v2.3.0.
 */
class Parser
{
    /**
     * Finish up parser at end of (incomplete) input.
     */
    public const CLEANUP = 1;

    /**
     * Parse failure.
     */
    public const STATE_FAILURE = -1;

    /**
     * Expecting HTTP info (request/response line) or headers.
     */
    public const STATE_START = 0;

    /**
     * Expecting a key or already parsing a key.
     */
    public const STATE_KEY = 1;

    /**
     * Expecting a value or already parsing the value.
     */
    public const STATE_VALUE = 2;

    /**
     * At EOL of an header, checking whether a folded header line follows.
     */
    public const STATE_VALUE_EX = 3;

    /**
     * A header was completed.
     */
    public const STATE_HEADER_DONE = 4;

    /**
     * Finished parsing the headers.
     *
     * ***NOTE:***
     * Most of this states won't be returned to the user, because the parser immediately jumps to the next expected state.
     */
    public const STATE_DONE = 5;

    /**
     * Retrieve the current state of the parser.
     * See http\Header\Parser::STATE_* constants.
     *
     * @throws \http\Exception\InvalidArgumentException
     * @return int http\Header\Parser::STATE_* constant.
     */
    public function getState() {}

    /**
     * Parse a string.
     *
     * @param string $data The (part of the) header to parse.
     * @param int $flags Any combination of [parser flags](http/Header/Parser#Parser.flags:).
     * @param array &$header Successfully parsed headers.
     * @throws \http\Exception\InvalidArgumentException
     * @return int http\Header\Parser::STATE_* constant.
     */
    public function parse(string $data, int $flags, array &$header = null) {}

    /**
     * Parse a stream.
     *
     * @param resource $stream The header stream to parse from.
     * @param int $flags Any combination of [parser flags](http/Header/Parser#Parser.flags:).
     * @param array &$headers The headers parsed.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\UnexpectedValueException
     * @return int http\Header\Parser::STATE_* constant.
     */
    public function stream($stream, int $flags, array &$headers) {}
}

namespace http\Message;

/**
 * The message body, represented as a PHP (temporary) stream.
 *
 * ***NOTE:***
 * Currently, http\Message\Body::addForm() creates multipart/form-data bodies.
 */
class Body implements \Serializable
{
    /**
     * Create a new message body, optionally referencing $stream.
     *
     * @param resource $stream A stream to be used as message body.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\UnexpectedValueException
     */
    public function __construct($stream = null) {}

    /**
     * String cast handler.
     *
     * @return string the message body.
     */
    public function __toString() {}

    /**
     * Add form fields and files to the message body.
     *
     * ***NOTE:***
     * Currently, http\Message\Body::addForm() creates "multipart/form-data" bodies.
     *
     * @param array $fields List of form fields to add.
     * @param array $files List of form files to add.
     *
     * $fields must look like:
     *
     *     [
     *       "field_name" => "value",
     *       "multi_field" => [
     *         "value1",
     *         "value2"
     *       ]
     *     ]
     *
     * $files must look like:
     *
     *     [
     *       [
     *         "name" => "field_name",
     *         "type" => "content/type",
     *         "file" => "/path/to/file.ext"
     *       ], [
     *         "name" => "field_name2",
     *         "type" => "text/plain",
     *         "file" => "file.ext",
     *         "data" => "string"
     *       ], [
     *         "name" => "field_name3",
     *         "type" => "image/jpeg",
     *         "file" => "file.ext",
     *         "data" => fopen("/home/mike/Pictures/mike.jpg","r")
     *     ]
     *
     * As you can see, a file structure must contain a "file" entry, which holds a file path, and an optional "data" entry, which may either contain a resource to read from or the actual data as string.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\RuntimeException
     * @return \http\Message\Body self.
     */
    public function addForm(array $fields = null, array $files = null) {}

    /**
     * Add a part to a multipart body.
     *
     * @param \http\Message $part The message part.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\RuntimeException
     * @return \http\Message\Body self.
     */
    public function addPart(http\Message $part) {}

    /**
     * Append plain bytes to the message body.
     *
     * @param string $data The data to append to the body.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\RuntimeException
     * @return \http\Message\Body self.
     */
    public function append(string $data) {}

    /**
     * Retrieve the ETag of the body.
     *
     * @return string|string|false string an Apache style ETag of inode, mtime and size in hex concatenated by hyphens if the message body stream is stat-able.
     * 		 or string a content hash (which algorithm is determined by INI http.etag.mode) if the stream is not stat-able.
     * 		 or false if http.etag.mode is not a known hash algorithm.
     */
    public function etag() {}

    /**
     * Retrieve any boundary of the message body.
     * See http\Message::splitMultipartBody().
     *
     * @return string|null string the message body boundary.
     * 		 or NULL if this message body has no boundary.
     */
    public function getBoundary() {}

    /**
     * Retrieve the underlying stream resource.
     *
     * @return resource the underlying stream.
     */
    public function getResource() {}

    /**
     * Implements Serializable.
     * Alias of http\Message\Body::__toString().
     *
     * @return string serialized message body.
     */
    public function serialize() {}

    /**
     * Stat size, atime, mtime and/or ctime.
     *
     * @param string $field A single stat field to retrieve.
     * @return int|object int the requested stat field.
     * 		 or object stdClass instance holding all four stat fields.
     */
    public function stat(string $field = null) {}

    /**
     * Stream the message body through a callback.
     *
     * @param callable $callback The callback of the form function(http\Message\Body $from, string $data).
     * @param int $offset Start to stream from this offset.
     * @param int $maxlen Stream at most $maxlen bytes, or all if $maxlen is less than 1.
     * @return \http\Message\Body self.
     */
    public function toCallback(callable $callback, int $offset = 0, int $maxlen = 0) {}

    /**
     * Stream the message body into another stream $stream, starting from $offset, streaming $maxlen at most.
     *
     * @param resource $stream The resource to write to.
     * @param int $offset The starting offset.
     * @param int $maxlen The maximum amount of data to stream. All content if less than 1.
     * @return \http\Message\Body self.
     */
    public function toStream($stream, int $offset = 0, int $maxlen = 0) {}

    /**
     * Retrieve the message body serialized to a string.
     * Alias of http\Message\Body::__toString().
     *
     * @return string message body.
     */
    public function toString() {}

    /**
     * Implements Serializable.
     *
     * @param string $serialized The serialized message body.
     */
    public function unserialize($serialized) {}
}
/**
 * The parser which is underlying http\Message.
 *
 * ***NOTE:***
 * This class was added in v2.2.0.
 */
class Parser
{
    /**
     * Finish up parser at end of (incomplete) input.
     */
    public const CLEANUP = 1;

    /**
     * Soak up the rest of input if no entity length is deducible.
     */
    public const DUMB_BODIES = 2;

    /**
     * Redirect messages do not contain any body despite of indication of such.
     */
    public const EMPTY_REDIRECTS = 4;

    /**
     * Continue parsing while input is available.
     */
    public const GREEDY = 8;

    /**
     * Parse failure.
     */
    public const STATE_FAILURE = -1;

    /**
     * Expecting HTTP info (request/response line) or headers.
     */
    public const STATE_START = 0;

    /**
     * Parsing headers.
     */
    public const STATE_HEADER = 1;

    /**
     * Completed parsing headers.
     */
    public const STATE_HEADER_DONE = 2;

    /**
     * Parsing the body.
     */
    public const STATE_BODY = 3;

    /**
     * Soaking up all input as body.
     */
    public const STATE_BODY_DUMB = 4;

    /**
     * Reading body as indicated by `Content-Length` or `Content-Range`.
     */
    public const STATE_BODY_LENGTH = 5;

    /**
     * Parsing `chunked` encoded body.
     */
    public const STATE_BODY_CHUNKED = 6;

    /**
     * Finished parsing the body.
     */
    public const STATE_BODY_DONE = 7;

    /**
     * Updating Content-Length based on body size.
     */
    public const STATE_UPDATE_CL = 8;

    /**
     * Finished parsing the message.
     *
     * ***NOTE:***
     * Most of this states won't be returned to the user, because the parser immediately jumps to the next expected state.
     */
    public const STATE_DONE = 9;

    /**
     * Retrieve the current state of the parser.
     * See http\Message\Parser::STATE_* constants.
     *
     * @throws \http\Exception\InvalidArgumentException
     * @return int http\Message\Parser::STATE_* constant.
     */
    public function getState() {}

    /**
     * Parse a string.
     *
     * @param string $data The (part of the) message to parse.
     * @param int $flags Any combination of [parser flags](http/Message/Parser#Parser.flags:).
     * @param \http\Message $message The current state of the message parsed.
     * @throws \http\Exception\InvalidArgumentException
     * @return int http\Message\Parser::STATE_* constant.
     */
    public function parse(string $data, int $flags, http\Message $message) {}

    /**
     * Parse a stream.
     *
     * @param resource $stream The message stream to parse from.
     * @param int $flags Any combination of [parser flags](http/Message/Parser#Parser.flags:).
     * @param \http\Message $message The current state of the message parsed.
     * @throws \http\Exception\InvalidArgumentException
     * @throws \http\Exception\UnexpectedValueException
     * @return int http\Message\Parser::STATE_* constant.
     */
    public function stream($stream, int $flags, http\Message $message) {}
}
<?php

// Start of http v.1.6.6

use JetBrains\PhpStorm\Pure;

class HttpException extends Exception
{
    public $innerException;
}
class HttpRuntimeException extends HttpException {}
class HttpInvalidParamException extends HttpException {}
class HttpHeaderException extends HttpException {}
class HttpMalformedHeadersException extends HttpException {}
class HttpRequestMethodException extends HttpException {}
class HttpMessageTypeException extends HttpException {}
class HttpEncodingException extends HttpException {}
class HttpRequestException extends HttpException {}
class HttpRequestPoolException extends HttpException {}
class HttpSocketException extends HttpException {}
class HttpResponseException extends HttpException {}
class HttpUrlException extends HttpException {}
class HttpQueryStringException extends HttpException {}

/**
 * @link https://php.net/manual/en/class.httpdeflatestream.php
 */
class HttpDeflateStream
{
    public const TYPE_GZIP = 16;
    public const TYPE_ZLIB = 0;
    public const TYPE_RAW = 32;
    public const LEVEL_DEF = 0;
    public const LEVEL_MIN = 1;
    public const LEVEL_MAX = 9;
    public const STRATEGY_DEF = 0;
    public const STRATEGY_FILT = 256;
    public const STRATEGY_HUFF = 512;
    public const STRATEGY_RLE = 768;
    public const STRATEGY_FIXED = 1024;
    public const FLUSH_NONE = 0;
    public const FLUSH_SYNC = 1048576;
    public const FLUSH_FULL = 2097152;

    /**
     * (PECL pecl_http &gt;= 0.21.0)<br/>
     * HttpDeflateStream class constructor
     * @link https://php.net/manual/en/function.httpdeflatestream-construct.php
     * @param int $flags [optional] <p>
     * initialization flags
     * </p>
     */
    public function __construct($flags = null) {}

    /**
     * (PECL pecl_http &gt;= 0.21.0)<br/>
     * Update deflate stream
     * @link https://php.net/manual/en/function.httpdeflatestream-update.php
     * @param string $data <p>
     * data to deflate
     * </p>
     * @return string|false deflated data on success or false on failure.
     */
    public function update($data) {}

    /**
     * (PECL pecl_http &gt;= 0.21.0)<br/>
     * Flush deflate stream
     * @link https://php.net/manual/en/function.httpdeflatestream-flush.php
     * @param string $data [optional] <p>
     * more data to deflate
     * </p>
     * @return string|false some deflated data as string on success or false on failure.
     */
    public function flush($data = null) {}

    /**
     * (PECL pecl_http &gt;= 0.21.0)<br/>
     * Finalize deflate stream
     * @link https://php.net/manual/en/function.httpdeflatestream-finish.php
     * @param string $data [optional] <p>
     * data to deflate
     * </p>
     * @return string the final part of deflated data.
     */
    public function finish($data = null) {}

    /**
     * (PECL pecl_http &gt;= 1.4.0)<br/>
     * HttpDeflateStream class factory
     * @link https://php.net/manual/en/function.httpdeflatestream-factory.php
     * @param int $flags [optional] <p>
     * initialization flags
     * </p>
     * @param string $class_name [optional] <p>
     * name of a subclass of HttpDeflateStream
     * </p>
     * @return HttpDeflateStream
     */
    public static function factory($flags = null, $class_name = null) {}
}

/**
 * @link https://php.net/manual/en/class.httpinflatestream.php
 */
class HttpInflateStream
{
    public const FLUSH_NONE = 0;
    public const FLUSH_SYNC = 1048576;
    public const FLUSH_FULL = 2097152;

    /**
     * (PECL pecl_http &gt;= 1.0.0)<br/>
     * HttpInflateStream class constructor
     * @link https://php.net/manual/en/function.httpinflatestream-construct.php
     * @param int $flags [optional] <p>
     * initialization flags
     * </p>
     */
    public function __construct($flags = null) {}

    /**
     * (PECL pecl_http &gt;= 0.21.0)<br/>
     * Update inflate stream
     * @link https://php.net/manual/en/function.httpinflatestream-update.php
     * @param string $data <p>
     * data to inflate
     * </p>
     * @return string|false inflated data on success or false on failure.
     */
    public function update($data) {}

    /**
     * (PECL pecl_http &gt;= 0.21.0)<br/>
     * Flush inflate stream
     * @link https://php.net/manual/en/function.httpinflatestream-flush.php
     * @param string $data [optional] <p>
     * more data to inflate
     * </p>
     * @return string|false some inflated data as string on success or false on failure.
     */
    public function flush($data = null) {}

    /**
     * (PECL pecl_http &gt;= 0.21.0)<br/>
     * Finalize inflate stream
     * @link https://php.net/manual/en/function.httpinflatestream-finish.php
     * @param string $data [optional] <p>
     * data to inflate
     * </p>
     * @return string the final part of inflated data.
     */
    public function finish($data = null) {}

    /**
     * (PECL pecl_http &gt;= 1.4.0)<br/>
     * HttpInflateStream class factory
     * @link https://php.net/manual/en/function.httpinflatestream-factory.php
     * @param int $flags [optional] <p>
     * initialization flags
     * </p>
     * @param string $class_name [optional] <p>
     * name of a subclass of HttpInflateStream
     * </p>
     * @return HttpInflateStream
     */
    public static function factory($flags = null, $class_name = null) {}
}

/**
 * @link https://php.net/manual/en/class.httpmessage.php
 */
class HttpMessage implements Countable, Serializable, Iterator
{
    public const TYPE_NONE = 0;
    public const TYPE_REQUEST = 1;
    public const TYPE_RESPONSE = 2;
    protected $type;
    protected $body;
    protected $requestMethod;
    protected $requestUrl;
    protected $responseStatus;
    protected $responseCode;
    protected $httpVersion;
    protected $headers;
    protected $parentMessage;

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * HttpMessage constructor
     * @link https://php.net/manual/en/function.httpmessage-construct.php
     * @param string $message [optional] <p>
     * a single or several consecutive HTTP messages
     * </p>
     */
    public function __construct($message = null) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get message body
     * @link https://php.net/manual/en/function.httpmessage-getbody.php
     * @return string the message body as string.
     */
    #[Pure]
    public function getBody() {}

    /**
     * (PECL pecl_http &gt;= 0.14.0)<br/>
     * Set message body
     * @link https://php.net/manual/en/function.httpmessage-setbody.php
     * @param string $body <p>
     * the new body of the message
     * </p>
     * @return void
     */
    public function setBody($body) {}

    /**
     * (PECL pecl_http &gt;= 1.1.0)<br/>
     * Get header
     * @link https://php.net/manual/en/function.httpmessage-getheader.php
     * @param string $header <p>
     * header name
     * </p>
     * @return string|null the header value on success or NULL if the header does not exist.
     */
    #[Pure]
    public function getHeader($header) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get message headers
     * @link https://php.net/manual/en/function.httpmessage-getheaders.php
     * @return array an associative array containing the messages HTTP headers.
     */
    #[Pure]
    public function getHeaders() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Set headers
     * @link https://php.net/manual/en/function.httpmessage-setheaders.php
     * @param array $header <p>
     * associative array containing the new HTTP headers, which will replace all previous HTTP headers of the message
     * </p>
     * @return void
     */
    public function setHeaders(array $header) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Add headers
     * @link https://php.net/manual/en/function.httpmessage-addheaders.php
     * @param array $headers <p>
     * associative array containing the additional HTTP headers to add to the messages existing headers
     * </p>
     * @param bool $append [optional] <p>
     * if true, and a header with the same name of one to add exists already, this respective
     * header will be converted to an array containing both header values, otherwise
     * it will be overwritten with the new header value
     * </p>
     * @return void
     */
    public function addHeaders(array $headers, $append = null) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get message type
     * @link https://php.net/manual/en/function.httpmessage-gettype.php
     * @return int the HttpMessage::TYPE.
     */
    #[Pure]
    public function getType() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Set message type
     * @link https://php.net/manual/en/function.httpmessage-settype.php
     * @param int $type <p>
     * the HttpMessage::TYPE
     * </p>
     * @return void
     */
    public function setType($type) {}

    #[Pure]
    public function getInfo() {}

    /**
     * @param $http_info
     */
    public function setInfo($http_info) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get response code
     * @link https://php.net/manual/en/function.httpmessage-getresponsecode.php
     * @return int|false the HTTP response code if the message is of type HttpMessage::TYPE_RESPONSE, else FALSE.
     */
    #[Pure]
    public function getResponseCode() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Set response code
     * @link https://php.net/manual/en/function.httpmessage-setresponsecode.php
     * @param int $code <p>
     * HTTP response code
     * </p>
     * @return bool TRUE on success, or FALSE if the message is not of type
     * HttpMessage::TYPE_RESPONSE or the response code is out of range (100-510).
     */
    public function setResponseCode($code) {}

    /**
     * (PECL pecl_http &gt;= 0.23.0)<br/>
     * Get response status
     * @link https://php.net/manual/en/function.httpmessage-getresponsestatus.php
     * @return string the HTTP response status string if the message is of type
     * HttpMessage::TYPE_RESPONSE, else FALSE.
     */
    #[Pure]
    public function getResponseStatus() {}

    /**
     * (PECL pecl_http &gt;= 0.23.0)<br/>
     * Set response status
     * @link https://php.net/manual/en/function.httpmessage-setresponsestatus.php
     * @param string $status <p>
     * the response status text
     * </p>
     * @return bool TRUE on success or FALSE if the message is not of type
     * HttpMessage::TYPE_RESPONSE.
     */
    public function setResponseStatus($status) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get request method
     * @link https://php.net/manual/en/function.httpmessage-getrequestmethod.php
     * @return string|false the request method name on success, or FALSE if the message is
     * not of type HttpMessage::TYPE_REQUEST.
     */
    #[Pure]
    public function getRequestMethod() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Set request method
     * @link https://php.net/manual/en/function.httpmessage-setrequestmethod.php
     * @param string $method <p>
     * the request method name
     * </p>
     * @return bool TRUE on success, or FALSE if the message is not of type
     * HttpMessage::TYPE_REQUEST or an invalid request method was supplied.
     */
    public function setRequestMethod($method) {}

    /**
     * (PECL pecl_http &gt;= 0.21.0)<br/>
     * Get request URL
     * @link https://php.net/manual/en/function.httpmessage-getrequesturl.php
     * @return string|false the request URL as string on success, or FALSE if the message
     * is not of type HttpMessage::TYPE_REQUEST.
     */
    #[Pure]
    public function getRequestUrl() {}

    /**
     * (PECL pecl_http &gt;= 0.21.0)<br/>
     * Set request URL
     * @link https://php.net/manual/en/function.httpmessage-setrequesturl.php
     * @param string $url <p>
     * the request URL
     * </p>
     * @return bool TRUE on success, or FALSE if the message is not of type
     * HttpMessage::TYPE_REQUEST or supplied URL was empty.
     */
    public function setRequestUrl($url) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get HTTP version
     * @link https://php.net/manual/en/function.httpmessage-gethttpversion.php
     * @return string the HTTP protocol version as string.
     */
    #[Pure]
    public function getHttpVersion() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Set HTTP version
     * @link https://php.net/manual/en/function.httpmessage-sethttpversion.php
     * @param string $version <p>
     * the HTTP protocol version
     * </p>
     * @return bool TRUE on success, or FALSE if supplied version is out of range (1.0/1.1).
     */
    public function setHttpVersion($version) {}

    /**
     * (PECL pecl_http &gt;= 1.0.0)<br/>
     * Guess content type
     * @link https://php.net/manual/en/function.httpmessage-guesscontenttype.php
     * @param string $magic_file <p>
     * the magic.mime database to use
     * </p>
     * @param int $magic_mode [optional] <p>
     * flags for libmagic
     * </p>
     * @return string|false the guessed content type on success or false on failure.
     */
    public function guessContentType($magic_file, $magic_mode = null) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get parent message
     * @link https://php.net/manual/en/function.httpmessage-getparentmessage.php
     * @return HttpMessage the parent HttpMessage object.
     */
    #[Pure]
    public function getParentMessage() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Send message
     * @link https://php.net/manual/en/function.httpmessage-send.php
     * @return bool true on success or false on failure.
     */
    public function send() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get string representation
     * @link https://php.net/manual/en/function.httpmessage-tostring.php
     * @param bool $include_parent [optional] <p>
     * specifies whether the returned string should also contain any parent messages
     * </p>
     * @return string the message as string.
     */
    public function toString($include_parent = null) {}

    /**
     * (PECL pecl_http &gt;= 0.22.0)<br/>
     * Create HTTP object regarding message type
     * @link https://php.net/manual/en/function.httpmessage-tomessagetypeobject.php
     * @return HttpRequest|HttpResponse|null either an HttpRequest or HttpResponse object on success, or NULL on failure.
     */
    public function toMessageTypeObject() {}

    public function count() {}

    public function serialize() {}

    /**
     * @param $serialized
     */
    public function unserialize($serialized) {}

    public function rewind() {}

    public function valid() {}

    public function current() {}

    public function key() {}

    public function next() {}

    /**
     * @return string
     */
    public function __toString() {}

    /**
     * (PECL pecl_http &gt;= 1.4.0)<br/>
     * Create HttpMessage from string
     * @link https://php.net/manual/en/function.httpmessage-factory.php
     * @param string $raw_message [optional] <p>
     * a single or several consecutive HTTP messages
     * </p>
     * @param string $class_name [optional] <p>
     * a class extending HttpMessage
     * </p>
     * @return HttpMessage|null an HttpMessage object on success or NULL on failure.
     */
    public static function factory($raw_message = null, $class_name = null) {}

    /**
     * (PECL pecl_http 0.10.0-1.3.3)<br/>
     * Create HttpMessage from string
     * @link https://php.net/manual/en/function.httpmessage-fromstring.php
     * @param string $raw_message [optional] <p>
     * a single or several consecutive HTTP messages
     * </p>
     * @param string $class_name [optional] <p>
     * a class extending HttpMessage
     * </p>
     * @return HttpMessage|null an HttpMessage object on success or NULL on failure.
     */
    public static function fromString($raw_message = null, $class_name = null) {}

    /**
     * (PECL pecl_http &gt;= 1.5.0)<br/>
     * Create HttpMessage from environment
     * @link https://php.net/manual/en/function.httpmessage-fromenv.php
     * @param int $message_type <p>
     * The message type. See HttpMessage type constants.
     * </p>
     * @param string $class_name [optional] <p>
     * a class extending HttpMessage
     * </p>
     * @return HttpMessage|null an HttpMessage object on success or NULL on failure.
     */
    public static function fromEnv($message_type, $class_name = null) {}

    /**
     * (PECL pecl_http &gt;= 0.22.0)<br/>
     * Detach HttpMessage
     * @link https://php.net/manual/en/function.httpmessage-detach.php
     * @return HttpMessage detached HttpMessage object copy.
     */
    public function detach() {}

    /**
     * (PECL pecl_http &gt;= 0.22.0)<br/>
     * Prepend message(s)
     * @link https://php.net/manual/en/function.httpmessage-prepend.php
     * @param HttpMessage $message <p>
     * HttpMessage object to prepend
     * </p>
     * @param bool $top [optional] <p>
     * whether to prepend to the top most or right this message
     * </p>
     * @return void
     */
    public function prepend(HttpMessage $message, $top = null) {}

    /**
     * (PECL pecl_http &gt;= 0.23.0)<br/>
     * Reverse message chain
     * @link https://php.net/manual/en/function.httpmessage-reverse.php
     * @return HttpMessage the most parent HttpMessage object.
     */
    public function reverse() {}
}

/**
 * @link https://php.net/manual/en/class.httpquerystring.php
 */
class HttpQueryString implements Serializable, ArrayAccess
{
    public const TYPE_BOOL = 3;
    public const TYPE_INT = 1;
    public const TYPE_FLOAT = 2;
    public const TYPE_STRING = 6;
    public const TYPE_ARRAY = 4;
    public const TYPE_OBJECT = 5;
    private static $instance;
    private $queryArray;
    private $queryString;

    /**
     * (PECL pecl_http &gt;= 0.22.0)<br/>
     * HttpQueryString constructor
     * @link https://php.net/manual/en/function.httpquerystring-construct.php
     * @param bool $global [optional] <p>
     * whether to operate on $_GET and
     * $_SERVER['QUERY_STRING']
     * </p>
     * @param mixed $add [optional] <p>
     * additional/initial query string parameters
     * </p>
     */
    final public function __construct($global = null, $add = null) {}

    /**
     * (PECL pecl_http &gt;= 0.22.0)<br/>
     * Get query string as array
     * @link https://php.net/manual/en/function.httpquerystring-toarray.php
     * @return array the array representation of the query string.
     */
    public function toArray() {}

    /**
     * (PECL pecl_http &gt;= 0.22.0)<br/>
     * Get query string
     * @link https://php.net/manual/en/function.httpquerystring-tostring.php
     * @return string the string representation of the query string.
     */
    public function toString() {}

    /**
     * @return string
     */
    public function __toString() {}

    /**
     * (PECL pecl_http &gt;= 0.22.0)<br/>
     * Get (part of) query string
     * @link https://php.net/manual/en/function.httpquerystring-get.php
     * @param string $key [optional] <p>
     * key of the query string param to retrieve
     * </p>
     * @param mixed $type [optional] <p>
     * which variable type to enforce
     * </p>
     * @param mixed $defval [optional] <p>
     * default value if key does not exist
     * </p>
     * @param bool $delete [optional] <p>
     * whether to remove the key/value pair from the query string
     * </p>
     * @return mixed the value of the query string param or the whole query string if no key was specified on success or defval if key does not exist.
     */
    #[Pure]
    public function get($key = null, $type = null, $defval = null, $delete = null) {}

    /**
     * (PECL pecl_http &gt;= 0.22.0)<br/>
     * Set query string params
     * @link https://php.net/manual/en/function.httpquerystring-set.php
     * @param mixed $params <p>
     * query string params to add
     * </p>
     * @return string the current query string.
     */
    public function set($params) {}

    /**
     * (PECL pecl_http &gt;= 1.1.0)<br/>
     * Modifiy query string copy
     * @link https://php.net/manual/en/function.httpquerystring-mod.php
     * @param mixed $params <p>
     * query string params to add
     * </p>
     * @return HttpQueryString a new HttpQueryString object
     */
    public function mod($params) {}

    /**
     * @param $name
     * @param $defval [optional]
     * @param $delete [optional]
     */
    #[Pure]
    public function getBool($name, $defval, $delete) {}

    /**
     * @param $name
     * @param $defval [optional]
     * @param $delete [optional]
     */
    #[Pure]
    public function getInt($name, $defval, $delete) {}

    /**
     * @param $name
     * @param $defval [optional]
     * @param $delete [optional]
     */
    #[Pure]
    public function getFloat($name, $defval, $delete) {}

    /**
     * @param $name
     * @param $defval [optional]
     * @param $delete [optional]
     */
    #[Pure]
    public function getString($name, $defval, $delete) {}

    /**
     * @param $name
     * @param $defval [optional]
     * @param $delete [optional]
     */
    #[Pure]
    public function getArray($name, $defval, $delete) {}

    /**
     * @param $name
     * @param $defval [optional]
     * @param $delete [optional]
     */
    #[Pure]
    public function getObject($name, $defval, $delete) {}

    /**
     * @param $global [optional]
     * @param $params [optional]
     * @param $class_name [optional]
     */
    public static function factory($global, $params, $class_name) {}

    /**
     * (PECL pecl_http &gt;= 0.25.0)<br/>
     * HttpQueryString singleton
     * @link https://php.net/manual/en/function.httpquerystring-singleton.php
     * @param bool $global [optional] <p>
     * whether to operate on $_GET and
     * $_SERVER['QUERY_STRING']
     * </p>
     * @return HttpQueryString always the same HttpQueryString instance regarding the global setting.
     */
    public static function singleton($global = null) {}

    /**
     * (PECL pecl_http &gt;= 0.25.0)<br/>
     * Change query strings charset
     * @link https://php.net/manual/en/function.httpquerystring-xlate.php
     * @param string $ie <p>
     * input encoding
     * </p>
     * @param string $oe <p>
     * output encoding
     * </p>
     * @return bool true on success or false on failure.
     */
    public function xlate($ie, $oe) {}

    /**
     * String representation of object
     * @link https://php.net/manual/en/serializable.serialize.php
     * @return string the string representation of the object or null
     * @since 5.1.0
     */
    public function serialize() {}

    /**
     * Offset to retrieve
     * @link https://php.net/manual/en/arrayaccess.offsetget.php
     * @param mixed $offset <p>
     * The offset to retrieve.
     * </p>
     * @return mixed Can return all value types.
     * @since 5.0.0
     */
    public function offsetGet($offset) {}

    /**
     * Constructs the object
     * @link https://php.net/manual/en/serializable.unserialize.php
     * @param string $serialized <p>
     * The string representation of the object.
     * </p>
     * @return void
     * @since 5.1.0
     */
    public function unserialize($serialized) {}

    /**
     * Whether a offset exists
     * @link https://php.net/manual/en/arrayaccess.offsetexists.php
     * @param mixed $offset <p>
     * An offset to check for.
     * </p>
     * @return bool true on success or false on failure.
     * </p>
     * <p>
     * The return value will be casted to boolean if non-boolean was returned.
     * @since 5.0.0
     */
    public function offsetExists($offset) {}

    /**
     * Offset to set
     * @link https://php.net/manual/en/arrayaccess.offsetset.php
     * @param mixed $offset <p>
     * The offset to assign the value to.
     * </p>
     * @param mixed $value <p>
     * The value to set.
     * </p>
     * @return void
     * @since 5.0.0
     */
    public function offsetSet($offset, $value) {}

    /**
     * Offset to unset
     * @link https://php.net/manual/en/arrayaccess.offsetunset.php
     * @param mixed $offset <p>
     * The offset to unset.
     * </p>
     * @return void
     * @since 5.0.0
     */
    public function offsetUnset($offset) {}
}

/**
 * @link https://php.net/manual/en/class.httprequest.php
 */
class HttpRequest
{
    public const METH_GET = 1;
    public const METH_HEAD = 2;
    public const METH_POST = 3;
    public const METH_PUT = 4;
    public const METH_DELETE = 5;
    public const METH_OPTIONS = 6;
    public const METH_TRACE = 7;
    public const METH_CONNECT = 8;
    public const METH_PROPFIND = 9;
    public const METH_PROPPATCH = 10;
    public const METH_MKCOL = 11;
    public const METH_COPY = 12;
    public const METH_MOVE = 13;
    public const METH_LOCK = 14;
    public const METH_UNLOCK = 15;
    public const METH_VERSION_CONTROL = 16;
    public const METH_REPORT = 17;
    public const METH_CHECKOUT = 18;
    public const METH_CHECKIN = 19;
    public const METH_UNCHECKOUT = 20;
    public const METH_MKWORKSPACE = 21;
    public const METH_UPDATE = 22;
    public const METH_LABEL = 23;
    public const METH_MERGE = 24;
    public const METH_BASELINE_CONTROL = 25;
    public const METH_MKACTIVITY = 26;
    public const METH_ACL = 27;
    public const VERSION_1_0 = 1;
    public const VERSION_1_1 = 2;
    public const VERSION_NONE = 0;
    public const VERSION_ANY = 0;
    public const SSL_VERSION_TLSv1 = 1;
    public const SSL_VERSION_SSLv2 = 2;
    public const SSL_VERSION_SSLv3 = 3;
    public const SSL_VERSION_ANY = 0;
    public const IPRESOLVE_V4 = 1;
    public const IPRESOLVE_V6 = 2;
    public const IPRESOLVE_ANY = 0;
    public const AUTH_BASIC = 1;
    public const AUTH_DIGEST = 2;
    public const AUTH_NTLM = 8;
    public const AUTH_GSSNEG = 4;
    public const AUTH_ANY = -1;
    public const PROXY_SOCKS4 = 4;
    public const PROXY_SOCKS5 = 5;
    public const PROXY_HTTP = 0;
    private $options;
    private $postFields;
    private $postFiles;
    private $responseInfo;
    private $responseMessage;
    private $responseCode;
    private $responseStatus;
    private $method;
    private $url;
    private $contentType;
    private $requestBody;
    private $queryData;
    private $putFile;
    private $putData;
    private $history;
    public $recordHistory;

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * HttpRequest constructor
     * @link https://php.net/manual/en/function.httprequest-construct.php
     * @param string $url [optional] <p>
     * the target request url
     * </p>
     * @param int $request_method [optional] <p>
     * the request method to use
     * </p>
     * @param null|array $options [optional] <p>
     * an associative array with request options
     * </p>
     */
    public function __construct($url = null, $request_method = null, ?array $options = null) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Set options
     * @link https://php.net/manual/en/function.httprequest-setoptions.php
     * @param null|array $options [optional] <p>
     * an associative array, which values will overwrite the
     * currently set request options;
     * if empty or omitted, the options of the HttpRequest object will be reset
     * </p>
     * @return bool true on success or false on failure.
     */
    public function setOptions(?array $options = null) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get options
     * @link https://php.net/manual/en/function.httprequest-getoptions.php
     * @return array an associative array containing currently set options.
     */
    #[Pure]
    public function getOptions() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Set ssl options
     * @link https://php.net/manual/en/function.httprequest-setssloptions.php
     * @param null|array $options [optional] <p>
     * an associative array containing any SSL specific options;
     * if empty or omitted, the SSL options will be reset
     * </p>
     * @return bool true on success or false on failure.
     */
    public function setSslOptions(?array $options = null) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get ssl options
     * @link https://php.net/manual/en/function.httprequest-getssloptions.php
     * @return array an associative array containing any previously set SSL options.
     */
    #[Pure]
    public function getSslOptions() {}

    /**
     * (PECL pecl_http &gt;= 0.12.0)<br/>
     * Add ssl options
     * @link https://php.net/manual/en/function.httprequest-addssloptions.php
     * @param array $option <p>
     * an associative array as parameter containing additional SSL specific options
     * </p>
     * @return bool true on success or false on failure.
     */
    public function addSslOptions(array $option) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Add headers
     * @link https://php.net/manual/en/function.httprequest-addheaders.php
     * @param array $headers <p>
     * an associative array as parameter containing additional header name/value pairs
     * </p>
     * @return bool true on success or false on failure.
     */
    public function addHeaders(array $headers) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get headers
     * @link https://php.net/manual/en/function.httprequest-getheaders.php
     * @return array an associative array containing all currently set headers.
     */
    #[Pure]
    public function getHeaders() {}

    /**
     * (PECL pecl_http &gt;= 0.12.0)<br/>
     * Set headers
     * @link https://php.net/manual/en/function.httprequest-setheaders.php
     * @param null|array $headers [optional] <p>
     * an associative array as parameter containing header name/value pairs;
     * if empty or omitted, all previously set headers will be unset
     * </p>
     * @return bool true on success or false on failure.
     */
    public function setHeaders(?array $headers = null) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Add cookies
     * @link https://php.net/manual/en/function.httprequest-addcookies.php
     * @param array $cookies <p>
     * an associative array containing any cookie name/value pairs to add
     * </p>
     * @return bool true on success or false on failure.
     */
    public function addCookies(array $cookies) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get cookies
     * @link https://php.net/manual/en/function.httprequest-getcookies.php
     * @return array an associative array containing any previously set cookies.
     */
    #[Pure]
    public function getCookies() {}

    /**
     * (PECL pecl_http &gt;= 0.12.0)<br/>
     * Set cookies
     * @link https://php.net/manual/en/function.httprequest-setcookies.php
     * @param null|array $cookies [optional] <p>
     * an associative array as parameter containing cookie name/value pairs;
     * if empty or omitted, all previously set cookies will be unset
     * </p>
     * @return bool true on success or false on failure.
     */
    public function setCookies(?array $cookies = null) {}

    /**
     * (PECL pecl_http &gt;= 1.0.0)<br/>
     * Enable cookies
     * @link https://php.net/manual/en/function.httprequest-enablecookies.php
     * @return bool true on success or false on failure.
     */
    public function enableCookies() {}

    /**
     * (PECL pecl_http &gt;= 1.0.0)<br/>
     * Reset cookies
     * @link https://php.net/manual/en/function.httprequest-resetcookies.php
     * @param bool $session_only [optional] <p>
     * whether only session cookies should be reset (needs libcurl >= v7.15.4, else libcurl >= v7.14.1)
     * </p>
     * @return bool true on success or false on failure.
     */
    public function resetCookies($session_only = null) {}

    public function flushCookies() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Set method
     * @link https://php.net/manual/en/function.httprequest-setmethod.php
     * @param int $request_method <p>
     * the request method to use
     * </p>
     * @return bool true on success or false on failure.
     */
    public function setMethod($request_method) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get method
     * @link https://php.net/manual/en/function.httprequest-getmethod.php
     * @return int the currently set request method.
     */
    #[Pure]
    public function getMethod() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Set URL
     * @link https://php.net/manual/en/function.httprequest-seturl.php
     * @param string $url <p>
     * the request url
     * </p>
     * @return bool true on success or false on failure.
     */
    public function setUrl($url) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get url
     * @link https://php.net/manual/en/function.httprequest-geturl.php
     * @return string the currently set request url as string.
     */
    #[Pure]
    public function getUrl() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Set content type
     * @link https://php.net/manual/en/function.httprequest-setcontenttype.php
     * @param string $content_type <p>
     * the content type of the request (primary/secondary)
     * </p>
     * @return bool TRUE on success, or FALSE if the content type does not seem to
     * contain a primary and a secondary part.
     */
    public function setContentType($content_type) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get content type
     * @link https://php.net/manual/en/function.httprequest-getcontenttype.php
     * @return string the previously set content type as string.
     */
    #[Pure]
    public function getContentType() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Set query data
     * @link https://php.net/manual/en/function.httprequest-setquerydata.php
     * @param mixed $query_data <p>
     * a string or associative array parameter containing the pre-encoded
     * query string or to be encoded query fields;
     * if empty, the query data will be unset
     * </p>
     * @return bool true on success or false on failure.
     */
    public function setQueryData($query_data) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get query data
     * @link https://php.net/manual/en/function.httprequest-getquerydata.php
     * @return string a string containing the urlencoded query.
     */
    #[Pure]
    public function getQueryData() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Add query data
     * @link https://php.net/manual/en/function.httprequest-addquerydata.php
     * @param array $query_params <p>
     * an associative array as parameter containing the query fields to add
     * </p>
     * @return bool true on success or false on failure.
     */
    public function addQueryData(array $query_params) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Set post fields
     * @link https://php.net/manual/en/function.httprequest-setpostfields.php
     * @param array $post_data <p>
     * an associative array containing the post fields;
     * if empty, the post data will be unset
     * </p>
     * @return bool true on success or false on failure.
     */
    public function setPostFields(array $post_data) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get post fields
     * @link https://php.net/manual/en/function.httprequest-getpostfields.php
     * @return array the currently set post fields as associative array.
     */
    #[Pure]
    public function getPostFields() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Add post fields
     * @link https://php.net/manual/en/function.httprequest-addpostfields.php
     * @param array $post_data <p>
     * an associative array as parameter containing the post fields
     * </p>
     * @return bool true on success or false on failure.
     */
    public function addPostFields(array $post_data) {}

    /**
     * @param $request_body_data [optional]
     */
    public function setBody($request_body_data) {}

    #[Pure]
    public function getBody() {}

    /**
     * @param $request_body_data
     */
    public function addBody($request_body_data) {}

    /**
     * (PECL pecl_http 0.14.0-1.4.1)<br/>
     * Set raw post data
     * @link https://php.net/manual/en/function.httprequest-setrawpostdata.php
     * @param string $raw_post_data [optional] <p>
     * raw post data
     * </p>
     * @return bool true on success or false on failure.
     */
    public function setRawPostData($raw_post_data = null) {}

    /**
     * (PECL pecl_http 0.14.0-1.4.1)<br/>
     * Get raw post data
     * @link https://php.net/manual/en/function.httprequest-getrawpostdata.php
     * @return string a string containing the currently set raw post data.
     */
    #[Pure]
    public function getRawPostData() {}

    /**
     * (PECL pecl_http 0.14.0-1.4.1)<br/>
     * Add raw post data
     * @link https://php.net/manual/en/function.httprequest-addrawpostdata.php
     * @param string $raw_post_data <p>
     * the raw post data to concatenate
     * </p>
     * @return bool true on success or false on failure.
     */
    public function addRawPostData($raw_post_data) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Set post files
     * @link https://php.net/manual/en/function.httprequest-setpostfiles.php
     * @param array $post_files <p>
     * an array containing the files to post;
     * if empty, the post files will be unset
     * </p>
     * @return bool true on success or false on failure.
     */
    public function setPostFiles(array $post_files) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Add post file
     * @link https://php.net/manual/en/function.httprequest-addpostfile.php
     * @param string $name <p>
     * the form element name
     * </p>
     * @param string $file <p>
     * the path to the file
     * </p>
     * @param string $content_type [optional] <p>
     * the content type of the file
     * </p>
     * @return bool TRUE on success, or FALSE if the content type seems not to contain a
     * primary and a secondary content type part.
     */
    public function addPostFile($name, $file, $content_type = null) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get post files
     * @link https://php.net/manual/en/function.httprequest-getpostfiles.php
     * @return array an array containing currently set post files.
     */
    #[Pure]
    public function getPostFiles() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Set put file
     * @link https://php.net/manual/en/function.httprequest-setputfile.php
     * @param string $file [optional] <p>
     * the path to the file to send;
     * if empty or omitted the put file will be unset
     * </p>
     * @return bool true on success or false on failure.
     */
    public function setPutFile($file = null) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get put file
     * @link https://php.net/manual/en/function.httprequest-getputfile.php
     * @return string a string containing the path to the currently set put file.
     */
    #[Pure]
    public function getPutFile() {}

    /**
     * (PECL pecl_http &gt;= 0.25.0)<br/>
     * Set put data
     * @link https://php.net/manual/en/function.httprequest-setputdata.php
     * @param string $put_data [optional] <p>
     * the data to upload
     * </p>
     * @return bool true on success or false on failure.
     */
    public function setPutData($put_data = null) {}

    /**
     * (PECL pecl_http &gt;= 0.25.0)<br/>
     * Get put data
     * @link https://php.net/manual/en/function.httprequest-getputdata.php
     * @return string a string containing the currently set PUT data.
     */
    #[Pure]
    public function getPutData() {}

    /**
     * (PECL pecl_http &gt;= 0.25.0)<br/>
     * Add put data
     * @link https://php.net/manual/en/function.httprequest-addputdata.php
     * @param string $put_data <p>
     * the data to concatenate
     * </p>
     * @return bool true on success or false on failure.
     */
    public function addPutData($put_data) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Send request
     * @link https://php.net/manual/en/function.httprequest-send.php
     * @return HttpMessage the received response as HttpMessage object.
     */
    public function send() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get response data
     * @link https://php.net/manual/en/function.httprequest-getresponsedata.php
     * @return array an associative array with the key "headers" containing an associative
     * array holding all response headers, as well as the key "body" containing a
     * string with the response body.
     */
    #[Pure]
    public function getResponseData() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get response header(s)
     * @link https://php.net/manual/en/function.httprequest-getresponseheader.php
     * @param string $name [optional] <p>
     * header to read; if empty, all response headers will be returned
     * </p>
     * @return mixed either a string with the value of the header matching name if requested,
     * FALSE on failure, or an associative array containing all response headers.
     */
    #[Pure]
    public function getResponseHeader($name = null) {}

    /**
     * (PECL pecl_http &gt;= 0.23.0)<br/>
     * Get response cookie(s)
     * @link https://php.net/manual/en/function.httprequest-getresponsecookies.php
     * @param int $flags [optional] <p>
     * http_parse_cookie flags
     * </p>
     * @param null|array $allowed_extras [optional] <p>
     * allowed keys treated as extra information instead of cookie names
     * </p>
     * @return stdClass[] an array of stdClass objects like http_parse_cookie would return.
     */
    #[Pure]
    public function getResponseCookies($flags = null, ?array $allowed_extras = null) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get response code
     * @link https://php.net/manual/en/function.httprequest-getresponsecode.php
     * @return int an int representing the response code.
     */
    #[Pure]
    public function getResponseCode() {}

    /**
     * (PECL pecl_http &gt;= 0.23.0)<br/>
     * Get response status
     * @link https://php.net/manual/en/function.httprequest-getresponsestatus.php
     * @return string a string containing the response status text.
     */
    #[Pure]
    public function getResponseStatus() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get response body
     * @link https://php.net/manual/en/function.httprequest-getresponsebody.php
     * @return string a string containing the response body.
     */
    #[Pure]
    public function getResponseBody() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get response info
     * @link https://php.net/manual/en/function.httprequest-getresponseinfo.php
     * @param string $name [optional] <p>
     * the info to read; if empty or omitted, an associative array containing
     * all available info will be returned
     * </p>
     * @return mixed either a scalar containing the value of the info matching name if
     * requested, FALSE on failure, or an associative array containing all
     * available info.
     */
    #[Pure]
    public function getResponseInfo($name = null) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get response message
     * @link https://php.net/manual/en/function.httprequest-getresponsemessage.php
     * @return HttpMessage an HttpMessage object of the response.
     */
    #[Pure]
    public function getResponseMessage() {}

    /**
     * (PECL pecl_http &gt;= 0.21.0)<br/>
     * Get raw response message
     * @link https://php.net/manual/en/function.httprequest-getrawresponsemessage.php
     * @return string the complete web server response, including the headers in a form of a string.
     */
    #[Pure]
    public function getRawResponseMessage() {}

    /**
     * (PECL pecl_http &gt;= 0.11.0)<br/>
     * Get request message
     * @link https://php.net/manual/en/function.httprequest-getrequestmessage.php
     * @return HttpMessage an HttpMessage object representing the sent request.
     */
    #[Pure]
    public function getRequestMessage() {}

    /**
     * (PECL pecl_http &gt;= 0.21.0)<br/>
     * Get raw request message
     * @link https://php.net/manual/en/function.httprequest-getrawrequestmessage.php
     * @return string an HttpMessage in a form of a string.
     */
    #[Pure]
    public function getRawRequestMessage() {}

    /**
     * (PECL pecl_http &gt;= 0.15.0)<br/>
     * Get history
     * @link https://php.net/manual/en/function.httprequest-gethistory.php
     * @return HttpMessage an HttpMessage object representing the complete request/response history.
     */
    #[Pure]
    public function getHistory() {}

    /**
     * (PECL pecl_http &gt;= 0.15.0)<br/>
     * Clear history
     * @link https://php.net/manual/en/function.httprequest-clearhistory.php
     * @return void
     */
    public function clearHistory() {}

    /**
     * @param $url [optional]
     * @param $method [optional]
     * @param $options [optional]
     * @param $class_name [optional]
     */
    public static function factory($url, $method, $options, $class_name) {}

    /**
     * @param $url
     * @param $options [optional]
     * @param &$info [optional]
     */
    public static function get($url, $options, &$info) {}

    /**
     * @param $url
     * @param $options [optional]
     * @param &$info [optional]
     */
    public static function head($url, $options, &$info) {}

    /**
     * @param $url
     * @param $data
     * @param $options [optional]
     * @param &$info [optional]
     */
    public static function postData($url, $data, $options, &$info) {}

    /**
     * @param $url
     * @param $data
     * @param $options [optional]
     * @param &$info [optional]
     */
    public static function postFields($url, $data, $options, &$info) {}

    /**
     * @param $url
     * @param $data
     * @param $options [optional]
     * @param &$info [optional]
     */
    public static function putData($url, $data, $options, &$info) {}

    /**
     * @param $url
     * @param $file
     * @param $options [optional]
     * @param &$info [optional]
     */
    public static function putFile($url, $file, $options, &$info) {}

    /**
     * @param $url
     * @param $stream
     * @param $options [optional]
     * @param &$info [optional]
     */
    public static function putStream($url, $stream, $options, &$info) {}

    /**
     * @param $method_name
     */
    public static function methodRegister($method_name) {}

    /**
     * @param $method
     */
    public static function methodUnregister($method) {}

    /**
     * @param $method_id
     */
    public static function methodName($method_id) {}

    /**
     * @param $method
     */
    public static function methodExists($method) {}

    /**
     * @param $fields
     * @param $files
     */
    public static function encodeBody($fields, $files) {}
}

class HttpRequestDataShare implements Countable
{
    private static $instance;
    public $cookie;
    public $dns;
    public $ssl;
    public $connect;

    public function __destruct() {}

    public function count() {}

    /**
     * @param HttpRequest $request
     */
    public function attach(HttpRequest $request) {}

    /**
     * @param HttpRequest $request
     */
    public function detach(HttpRequest $request) {}

    public function reset() {}

    /**
     * @param $global [optional]
     * @param $class_name [optional]
     */
    public static function factory($global, $class_name) {}

    /**
     * @param $global [optional]
     */
    public static function singleton($global) {}
}

/**
 * @link https://php.net/manual/en/class.httprequestpool.php
 */
class HttpRequestPool implements Countable, Iterator
{
    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * HttpRequestPool constructor
     * @link https://php.net/manual/en/function.httprequestpool-construct.php
     * @param null|HttpRequest $request [optional] <p>
     * HttpRequest object to attach
     * </p>
     */
    public function __construct(?HttpRequest $request = null) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * HttpRequestPool destructor
     * @link https://php.net/manual/en/function.httprequestpool-destruct.php
     * @return void
     */
    public function __destruct() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Attach HttpRequest
     * @link https://php.net/manual/en/function.httprequestpool-attach.php
     * @param HttpRequest $request <p>
     * an HttpRequest object not already attached to any HttpRequestPool object
     * </p>
     * @return bool true on success or false on failure.
     */
    public function attach(HttpRequest $request) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Detach HttpRequest
     * @link https://php.net/manual/en/function.httprequestpool-detach.php
     * @param HttpRequest $request <p>
     * an HttpRequest object attached to this HttpRequestPool object
     * </p>
     * @return bool true on success or false on failure.
     */
    public function detach(HttpRequest $request) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Send all requests
     * @link https://php.net/manual/en/function.httprequestpool-send.php
     * @return bool true on success or false on failure.
     */
    public function send() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Reset request pool
     * @link https://php.net/manual/en/function.httprequestpool-reset.php
     * @return void
     */
    public function reset() {}

    /**
     * (PECL pecl_http &gt;= 0.15.0)<br/>
     * Perform socket actions
     * @link https://php.net/manual/en/function.httprequestpool-socketperform.php
     * @return bool TRUE until each request has finished its transaction.
     */
    protected function socketPerform() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Perform socket select
     * @link https://php.net/manual/en/function.httprequestpool-socketselect.php
     * @return bool true on success or false on failure.
     */
    protected function socketSelect() {}

    public function valid() {}

    public function current() {}

    public function key() {}

    public function next() {}

    public function rewind() {}

    public function count() {}

    /**
     * (PECL pecl_http &gt;= 0.16.0)<br/>
     * Get attached requests
     * @link https://php.net/manual/en/function.httprequestpool-getattachedrequests.php
     * @return array an array containing all currently attached HttpRequest objects.
     */
    #[Pure]
    public function getAttachedRequests() {}

    /**
     * (PECL pecl_http &gt;= 0.16.0)<br/>
     * Get finished requests
     * @link https://php.net/manual/en/function.httprequestpool-getfinishedrequests.php
     * @return array an array containing all attached HttpRequest objects that already have finished their work.
     */
    #[Pure]
    public function getFinishedRequests() {}

    /**
     * @param $enable [optional]
     */
    public function enablePipelining($enable) {}

    /**
     * @param $enable [optional]
     */
    public function enableEvents($enable) {}
}

/**
 * @link https://php.net/manual/en/class.httpresponse.php
 */
class HttpResponse
{
    public const REDIRECT = 0;
    public const REDIRECT_PERM = 301;
    public const REDIRECT_FOUND = 302;
    public const REDIRECT_POST = 303;
    public const REDIRECT_PROXY = 305;
    public const REDIRECT_TEMP = 307;
    private static $sent;
    private static $catch;
    private static $mode;
    private static $stream;
    private static $file;
    private static $data;
    protected static $cache;
    protected static $gzip;
    protected static $eTag;
    protected static $lastModified;
    protected static $cacheControl;
    protected static $contentType;
    protected static $contentDisposition;
    protected static $bufferSize;
    protected static $throttleDelay;

    /**
     * (PECL pecl_http &gt;= 0.12.0)<br/>
     * Set header
     * @link https://php.net/manual/en/function.httpresponse-setheader.php
     * @param string $name <p>
     * the name of the header
     * </p>
     * @param mixed $value [optional] <p>
     * the value of the header;
     * if not set, no header with this name will be sent
     * </p>
     * @param bool $replace [optional] <p>
     * whether an existing header should be replaced
     * </p>
     * @return bool true on success or false on failure.
     */
    public static function setHeader($name, $value = null, $replace = null) {}

    /**
     * (PECL pecl_http &gt;= 0.12.0)<br/>
     * Get header
     * @link https://php.net/manual/en/function.httpresponse-getheader.php
     * @param string $name [optional] <p>
     * specifies the name of the header to read;
     * if empty or omitted, an associative array with all headers will be returned
     * </p>
     * @return mixed either a string containing the value of the header matching name,
     * false on failure, or an associative array with all headers.
     */
    public static function getHeader($name = null) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Set ETag
     * @link https://php.net/manual/en/function.httpresponse-setetag.php
     * @param string $etag <p>
     * unquoted string as parameter containing the ETag
     * </p>
     * @return bool true on success or false on failure.
     */
    public static function setETag($etag) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get ETag
     * @link https://php.net/manual/en/function.httpresponse-getetag.php
     * @return string the calculated or previously set ETag as unquoted string.
     */
    public static function getETag() {}

    /**
     * (PECL pecl_http &gt;= 0.12.0)<br/>
     * Set last modified
     * @link https://php.net/manual/en/function.httpresponse-setlastmodified.php
     * @param int $timestamp <p>
     * Unix timestamp representing the last modification time of the sent entity
     * </p>
     * @return bool true on success or false on failure.
     */
    public static function setLastModified($timestamp) {}

    /**
     * (PECL pecl_http &gt;= 0.12.0)<br/>
     * Get last modified
     * @link https://php.net/manual/en/function.httpresponse-getlastmodified.php
     * @return int the calculated or previously set Unix timestamp.
     */
    public static function getLastModified() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Set content disposition
     * @link https://php.net/manual/en/function.httpresponse-setcontentdisposition.php
     * @param string $filename <p>
     * the file name the &quot;Save as...&quot; dialog should display
     * </p>
     * @param bool $inline [optional] <p>
     * if set to true and the user agent knows how to handle the content type,
     * it will probably not cause the popup window to be shown
     * </p>
     * @return bool true on success or false on failure.
     */
    public static function setContentDisposition($filename, $inline = null) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get content disposition
     * @link https://php.net/manual/en/function.httpresponse-getcontentdisposition.php
     * @return string the current content disposition as string like sent in a header.
     */
    public static function getContentDisposition() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Set content type
     * @link https://php.net/manual/en/function.httpresponse-setcontenttype.php
     * @param string $content_type <p>
     * the content type of the sent entity (primary/secondary)
     * </p>
     * @return bool true on success, or false if the content type does not seem to
     * contain a primary and secondary content type part.
     */
    public static function setContentType($content_type) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get content type
     * @link https://php.net/manual/en/function.httpresponse-getcontenttype.php
     * @return string the currently set content type as string.
     */
    public static function getContentType() {}

    /**
     * (PECL pecl_http &gt;= 0.13.0)<br/>
     * Guess content type
     * @link https://php.net/manual/en/function.httpresponse-guesscontenttype.php
     * @param string $magic_file <p>
     * specifies the magic.mime database to use
     * </p>
     * @param int $magic_mode [optional] <p>
     * flags for libmagic
     * </p>
     * @return string|false the guessed content type on success or false on failure.
     */
    public static function guessContentType($magic_file, $magic_mode = null) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Set cache
     * @link https://php.net/manual/en/function.httpresponse-setcache.php
     * @param bool $cache <p>
     * whether caching should be attempted
     * </p>
     * @return bool true on success or false on failure.
     */
    public static function setCache($cache) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get cache
     * @link https://php.net/manual/en/function.httpresponse-getcache.php
     * @return bool true if caching should be attempted, else false.
     */
    public static function getCache() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Set cache control
     * @link https://php.net/manual/en/function.httpresponse-setcachecontrol.php
     * @param string $control <p>
     * the primary cache control setting
     * </p>
     * @param int $max_age [optional] <p>
     * the max-age in seconds, suggesting how long the cache entry is valid on the client side
     * </p>
     * @param bool $must_revalidate [optional] <p>
     * whether the cached entity should be revalidated by the client for every request
     * </p>
     * @return bool true on success, or false if control does not match one of public, private or no-cache.
     */
    public static function setCacheControl($control, $max_age = null, $must_revalidate = null) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get cache control
     * @link https://php.net/manual/en/function.httpresponse-getcachecontrol.php
     * @return string the current cache control setting as a string like sent in a header.
     */
    public static function getCacheControl() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Set gzip
     * @link https://php.net/manual/en/function.httpresponse-setgzip.php
     * @param bool $gzip <p>
     * whether GZip compression should be enabled
     * </p>
     * @return bool true on success or false on failure.
     */
    public static function setGzip($gzip) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get gzip
     * @link https://php.net/manual/en/function.httpresponse-getgzip.php
     * @return bool true if GZip compression is enabled, else false.
     */
    public static function getGzip() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Set throttle delay
     * @link https://php.net/manual/en/function.httpresponse-setthrottledelay.php
     * @param float $seconds <p>
     * seconds to sleep after each chunk sent
     * </p>
     * @return bool true on success or false on failure.
     */
    public static function setThrottleDelay($seconds) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get throttle delay
     * @link https://php.net/manual/en/function.httpresponse-getthrottledelay.php
     * @return float a float representing the throttle delay in seconds.
     */
    public static function getThrottleDelay() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Set buffer size
     * @link https://php.net/manual/en/function.httpresponse-setbuffersize.php
     * @param int $bytes <p>
     * the chunk size in bytes
     * </p>
     * @return bool true on success or false on failure.
     */
    public static function setBufferSize($bytes) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get buffer size
     * @link https://php.net/manual/en/function.httpresponse-getbuffersize.php
     * @return int an int representing the current buffer size in bytes.
     */
    public static function getBufferSize() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Set data
     * @link https://php.net/manual/en/function.httpresponse-setdata.php
     * @param mixed $data <p>
     * data to send
     * </p>
     * @return bool true on success or false on failure.
     */
    public static function setData($data) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get data
     * @link https://php.net/manual/en/function.httpresponse-getdata.php
     * @return string a string containing the previously set data to send.
     */
    public static function getData() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Set file
     * @link https://php.net/manual/en/function.httpresponse-setfile.php
     * @param string $file <p>
     * the path to the file to send
     * </p>
     * @return bool true on success or false on failure.
     */
    public static function setFile($file) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get file
     * @link https://php.net/manual/en/function.httpresponse-getfile.php
     * @return string the previously set path to the file to send as string.
     */
    public static function getFile() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Set stream
     * @link https://php.net/manual/en/function.httpresponse-setstream.php
     * @param resource $stream <p>
     * already opened stream from which the data to send will be read
     * </p>
     * @return bool true on success or false on failure.
     */
    public static function setStream($stream) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get Stream
     * @link https://php.net/manual/en/function.httpresponse-getstream.php
     * @return resource the previously set resource.
     */
    public static function getStream() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Send response
     * @link https://php.net/manual/en/function.httpresponse-send.php
     * @param bool $clean_ob [optional] <p>
     * whether to destroy all previously started output handlers and their buffers
     * </p>
     * @return bool true on success or false on failure.
     */
    public static function send($clean_ob = null) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Capture script output
     * @link https://php.net/manual/en/function.httpresponse-capture.php
     * @return void
     */
    public static function capture() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Redirect
     * @link https://php.net/manual/en/function.httpresponse-redirect.php
     * @param null|string $url [optional]
     * @param null|array $params [optional]
     * @param null|bool $session [optional]
     * @param null|int $status [optional]
     * @return void
     */
    public static function redirect($url = null, ?array $params = null, $session = null, $status = null) {}

    /**
     * (PECL pecl_http &gt;= 0.12.0)<br/>
     * Send HTTP response status
     * @link https://php.net/manual/en/function.httpresponse-status.php
     * @param int $status
     * @return bool
     */
    public static function status($status) {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get request headers
     * @link https://php.net/manual/en/function.httpresponse-getrequestheaders.php
     * @return array
     */
    public static function getRequestHeaders() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get request body
     * @link https://php.net/manual/en/function.httpresponse-getrequestbody.php
     * @return string
     */
    public static function getRequestBody() {}

    /**
     * (PECL pecl_http &gt;= 0.10.0)<br/>
     * Get request body stream
     * @link https://php.net/manual/en/function.httpresponse-getrequestbodystream.php
     * @return resource
     */
    public static function getRequestBodyStream() {}
}

class HttpUtil
{
    /**
     * @param $timestamp [optional]
     */
    public static function date($timestamp) {}

    /**
     * @param $url
     * @param $parts [optional]
     * @param $flags [optional]
     * @param &$composed [optional]
     */
    public static function buildUrl($url, $parts, $flags, &$composed) {}

    /**
     * @param $query
     * @param $prefix [optional]
     * @param $arg_sep [optional]
     */
    public static function buildStr($query, $prefix, $arg_sep) {}

    /**
     * @param $supported
     * @param &$result [optional]
     */
    public static function negotiateLanguage($supported, &$result) {}

    /**
     * @param $supported
     * @param &$result [optional]
     */
    public static function negotiateCharset($supported, &$result) {}

    /**
     * @param $supported
     * @param &$result [optional]
     */
    public static function negotiateContentType($supported, &$result) {}

    /**
     * @param $last_modified
     * @param $for_range [optional]
     */
    public static function matchModified($last_modified, $for_range) {}

    /**
     * @param $plain_etag
     * @param $for_range [optional]
     */
    public static function matchEtag($plain_etag, $for_range) {}

    /**
     * @param $header_name
     * @param $header_value
     * @param $case_sensitive [optional]
     */
    public static function matchRequestHeader($header_name, $header_value, $case_sensitive) {}

    /**
     * @param $message_string
     */
    public static function parseMessage($message_string) {}

    /**
     * @param $headers_string
     */
    public static function parseHeaders($headers_string) {}

    /**
     * @param $cookie_string
     */
    public static function parseCookie($cookie_string) {}

    /**
     * @param $cookie_array
     */
    public static function buildCookie($cookie_array) {}

    /**
     * @param $param_string
     * @param $flags [optional]
     */
    public static function parseParams($param_string, $flags) {}

    /**
     * @param $encoded_string
     */
    public static function chunkedDecode($encoded_string) {}

    /**
     * @param $plain
     * @param $flags [optional]
     */
    public static function deflate($plain, $flags) {}

    /**
     * @param $encoded
     */
    public static function inflate($encoded) {}

    /**
     * @param $feature [optional]
     */
    public static function support($feature) {}
}

/**
 * (PECL pecl_http &gt;= 0.1.0)<br/>
 * Compose HTTP RFC compliant date
 * @link https://php.net/manual/en/function.http-date.php
 * @param int $timestamp [optional] <p>
 * Unix timestamp; current time if omitted
 * </p>
 * @return string the HTTP date as string.
 */
#[Pure]
function http_date($timestamp = null) {}

/**
 * (PECL pecl_http &gt;= 0.21.0)<br/>
 * Build an URL
 * @link https://php.net/manual/en/function.http-build-url.php
 * @param mixed $url [optional] <p>
 * (part(s) of) an URL in form of a string or associative array like parse_url returns
 * </p>
 * @param mixed $parts [optional] <p>
 * same as the first argument
 * </p>
 * @param null|int $flags [optional] <p>
 * a bitmask of binary or'ed HTTP_URL constants;
 * HTTP_URL_REPLACE is the default
 * </p>
 * @param null|array &$new_url [optional] <p>
 * if set, it will be filled with the parts of the composed url like parse_url would return
 * </p>
 * @return string|false the new URL as string on success or false on failure.
 */
function http_build_url($url = null, $parts = null, $flags = null, ?array &$new_url = null) {}

/**
 * (PECL pecl_http &gt;= 0.23.0)<br/>
 * Build query string
 * @link https://php.net/manual/en/function.http-build-str.php
 * @param array $query <p>
 * associative array of query string parameters
 * </p>
 * @param string $prefix [optional] <p>
 * top level prefix
 * </p>
 * @param string $arg_separator [optional] <p>
 * argument separator to use (by default the INI setting arg_separator.output will be used, or &quot;&amp;&quot; if neither is set
 * </p>
 * @return string|false the built query as string on success or false on failure.
 */
#[Pure]
function http_build_str(array $query, $prefix = null, $arg_separator = null) {}

/**
 * (PECL pecl_http &gt;= 0.1.0)<br/>
 * Negotiate clients preferred language
 * @link https://php.net/manual/en/function.http-negotiate-language.php
 * @param array $supported <p>
 * array containing the supported languages as values
 * </p>
 * @param null|array &$result [optional] <p>
 * will be filled with an array containing the negotiation results
 * </p>
 * @return string the negotiated language or the default language (i.e. first array entry) if none match.
 */
function http_negotiate_language(array $supported, ?array &$result = null) {}

/**
 * (PECL pecl_http &gt;= 0.1.0)<br/>
 * Negotiate clients preferred character set
 * @link https://php.net/manual/en/function.http-negotiate-charset.php
 * @param array $supported <p>
 * array containing the supported charsets as values
 * </p>
 * @param null|array &$result [optional] <p>
 * will be filled with an array containing the negotiation results
 * </p>
 * @return string the negotiated charset or the default charset (i.e. first array entry) if none match.
 */
function http_negotiate_charset(array $supported, ?array &$result = null) {}

/**
 * (PECL pecl_http &gt;= 0.19.0)<br/>
 * Negotiate clients preferred content type
 * @link https://php.net/manual/en/function.http-negotiate-content-type.php
 * @param array $supported <p>
 * array containing the supported content types as values
 * </p>
 * @param null|array &$result [optional] <p>
 * will be filled with an array containing the negotiation results
 * </p>
 * @return string the negotiated content type or the default content type (i.e. first array entry) if none match.
 */
function http_negotiate_content_type(array $supported, ?array &$result = null) {}

/**
 * (PECL pecl_http &gt;= 0.1.0)<br/>
 * Issue HTTP redirect
 * @link https://php.net/manual/en/function.http-redirect.php
 * @param string $url [optional] <p>
 * the URL to redirect to
 * </p>
 * @param null|array $params [optional] <p>
 * associative array of query parameters
 * </p>
 * @param null|bool $session [optional] <p>
 * whether to append session information
 * </p>
 * @param null|int $status [optional] <p>
 * custom response status code
 * </p>
 * @return void|false returns false or exits with the specified redirection status code
 */
function http_redirect($url = null, ?array $params = null, $session = null, $status = null) {}

/**
 * (PECL pecl_http &gt;= 0.10.0)<br/>
 * HTTP throttling
 * @link https://php.net/manual/en/function.http-throttle.php
 * @param float $sec [optional] <p>
 * seconds to sleep after each chunk sent
 * </p>
 * @param int $bytes [optional] <p>
 * the chunk size in bytes
 * </p>
 * @return void
 */
function http_throttle($sec = null, $bytes = null) {}

/**
 * (PECL pecl_http &gt;= 0.1.0)<br/>
 * Send HTTP response status
 * @link https://php.net/manual/en/function.http-send-status.php
 * @param int $status <p>
 * HTTP status code (100-599)
 * </p>
 * @return bool true on success or false on failure.
 */
function http_send_status($status) {}

/**
 * (PECL pecl_http &gt;= 0.1.0)<br/>
 * Send Last-Modified
 * @link https://php.net/manual/en/function.http-send-last-modified.php
 * @param int $timestamp [optional] <p>
 * a Unix timestamp, converted to a valid HTTP date;
 * if omitted, the current time will be sent
 * </p>
 * @return bool true on success or false on failure.
 */
function http_send_last_modified($timestamp = null) {}

/**
 * (PECL pecl_http &gt;= 0.10.0)<br/>
 * Send Content-Type
 * @link https://php.net/manual/en/function.http-send-content-type.php
 * @param string $content_type [optional] <p>
 * the desired content type (primary/secondary)
 * </p>
 * @return bool true on success or false on failure.
 */
function http_send_content_type($content_type = null) {}

/**
 * (PECL pecl_http &gt;= 0.10.0)<br/>
 * Send Content-Disposition
 * @link https://php.net/manual/en/function.http-send-content-disposition.php
 * @param string $filename <p>
 * the file name the &quot;Save as...&quot; dialog should display
 * </p>
 * @param bool $inline [optional] <p>
 * if set to true and the user agent knows how to handle the content type,
 * it will probably not cause the popup window to be shown
 * </p>
 * @return bool true on success or false on failure.
 */
function http_send_content_disposition($filename, $inline = null) {}

/**
 * (PECL pecl_http &gt;= 0.1.0)<br/>
 * Match last modification
 * @link https://php.net/manual/en/function.http-match-modified.php
 * @param int $timestamp [optional] <p>
 * Unix timestamp; current time, if omitted
 * </p>
 * @param bool $for_range [optional] <p>
 * if set to true, the header usually used to validate HTTP ranges will be checked
 * </p>
 * @return bool true if timestamp represents an earlier date than the header, else false.
 */
#[Pure]
function http_match_modified($timestamp = null, $for_range = null) {}

/**
 * (PECL pecl_http &gt;= 0.1.0)<br/>
 * Match ETag
 * @link https://php.net/manual/en/function.http-match-etag.php
 * @param string $etag <p>
 * the ETag to match
 * </p>
 * @param bool $for_range [optional] <p>
 * if set to true, the header usually used to validate HTTP ranges will be checked
 * </p>
 * @return bool true if ETag matches or the header contained the asterisk (&quot;*&quot;), else false.
 */
#[Pure]
function http_match_etag($etag, $for_range = null) {}

/**
 * (PECL pecl_http &gt;= 0.1.0)<br/>
 * Caching by last modification
 * @link https://php.net/manual/en/function.http-cache-last-modified.php
 * @param int $timestamp_or_expires [optional] <p>
 * Unix timestamp
 * </p>
 * @return bool with 304 Not Modified if the entity is cached.
 * &see.http.configuration.force_exit;
 */
#[Pure]
function http_cache_last_modified($timestamp_or_expires = null) {}

/**
 * (PECL pecl_http &gt;= 0.1.0)<br/>
 * Caching by ETag
 * @link https://php.net/manual/en/function.http-cache-etag.php
 * @param string $etag [optional] <p>
 * custom ETag
 * </p>
 * @return bool with 304 Not Modified if the entity is cached.
 * &see.http.configuration.force_exit;
 */
#[Pure]
function http_cache_etag($etag = null) {}

/**
 * (PECL pecl_http &gt;= 0.1.0)<br/>
 * Send arbitrary data
 * @link https://php.net/manual/en/function.http-send-data.php
 * @param string $data <p>
 * data to send
 * </p>
 * @return bool true on success or false on failure.
 */
function http_send_data($data) {}

/**
 * (PECL pecl_http &gt;= 0.1.0)<br/>
 * Send file
 * @link https://php.net/manual/en/function.http-send-file.php
 * @param string $file <p>
 * the file to send
 * </p>
 * @return bool true on success or false on failure.
 */
function http_send_file($file) {}

/**
 * (PECL pecl_http &gt;= 0.1.0)<br/>
 * Send stream
 * @link https://php.net/manual/en/function.http-send-stream.php
 * @param resource $stream <p>
 * stream to read from (must be seekable)
 * </p>
 * @return bool true on success or false on failure.
 */
function http_send_stream($stream) {}

/**
 * (PECL pecl_http &gt;= 0.1.0)<br/>
 * Decode chunked-encoded data
 * @link https://php.net/manual/en/function.http-chunked-decode.php
 * @param string $encoded <p>
 * chunked encoded string
 * </p>
 * @return string|false the decoded string on success or false on failure.
 */
#[Pure]
function http_chunked_decode($encoded) {}

/**
 * (PECL pecl_http &gt;= 0.12.0)<br/>
 * Parse HTTP messages
 * @link https://php.net/manual/en/function.http-parse-message.php
 * @param string $message <p>
 * string containing a single HTTP message or several consecutive HTTP messages
 * </p>
 * @return object a hierarchical object structure of the parsed messages.
 */
#[Pure]
function http_parse_message($message) {}

/**
 * (PECL pecl_http &gt;= 0.10.0)<br/>
 * Parse HTTP headers
 * @link https://php.net/manual/en/function.http-parse-headers.php
 * @param string $header <p>
 * string containing HTTP headers
 * </p>
 * @return array|false an array on success or false on failure.
 */
#[Pure]
function http_parse_headers($header) {}

/**
 * (PECL pecl_http &gt;= 0.20.0)<br/>
 * Parse HTTP cookie
 * @link https://php.net/manual/en/function.http-parse-cookie.php
 * @param string $cookie <p>
 * string containing the value of a Set-Cookie response header
 * </p>
 * @param int $flags [optional] <p>
 * parse flags (HTTP_COOKIE_PARSE_RAW)
 * </p>
 * @param null|array $allowed_extras [optional] <p>
 * array containing recognized extra keys;
 * by default all unknown keys will be treated as cookie names
 * </p>
 * @return stdClass|false a stdClass object on success or false on failure.
 */
#[Pure]
function http_parse_cookie($cookie, $flags = null, ?array $allowed_extras = null) {}

/**
 * (PECL pecl_http &gt;= 1.2.0)<br/>
 * Build cookie string
 * @link https://php.net/manual/en/function.http-build-cookie.php
 * @param array $cookie <p>
 * a cookie list like returned from http_parse_cookie
 * </p>
 * @return string the cookie(s) as string.
 */
#[Pure]
function http_build_cookie(array $cookie) {}

/**
 * (PECL pecl_http &gt;= 1.0.0)<br/>
 * Parse parameter list
 * @link https://php.net/manual/en/function.http-parse-params.php
 * @param string $param <p>
 * Parameters
 * </p>
 * @param int $flags [optional] <p>
 * Parse flags
 * </p>
 * @return stdClass parameter list as stdClass object.
 */
#[Pure]
function http_parse_params($param, $flags = null) {}

/**
 * (PECL pecl_http &gt;= 0.10.0)<br/>
 * Get request headers as array
 * @link https://php.net/manual/en/function.http-get-request-headers.php
 * @return array an associative array of incoming request headers.
 */
#[Pure]
function http_get_request_headers() {}

/**
 * (PECL pecl_http &gt;= 0.10.0)<br/>
 * Get request body as string
 * @link https://php.net/manual/en/function.http-get-request-body.php
 * @return string|null the raw request body as string on success or NULL on failure.
 */
#[Pure]
function http_get_request_body() {}

/**
 * (PECL pecl_http &gt;= 0.22.0)<br/>
 * Get request body as stream
 * @link https://php.net/manual/en/function.http-get-request-body-stream.php
 * @return resource|null the raw request body as stream on success or NULL on failure.
 */
#[Pure]
function http_get_request_body_stream() {}

/**
 * (PECL pecl_http &gt;= 0.10.0)<br/>
 * Match any header
 * @link https://php.net/manual/en/function.http-match-request-header.php
 * @param string $header <p>
 * the header name (case-insensitive)
 * </p>
 * @param string $value <p>
 * the header value that should be compared
 * </p>
 * @param bool $match_case [optional] <p>
 * whether the value should be compared case sensitively
 * </p>
 * @return bool true if header value matches, else false.
 */
#[Pure]
function http_match_request_header($header, $value, $match_case = null) {}

/**
 * (PECL pecl_http &gt;= 1.5.0)<br/>
 * Stat persistent handles
 * @link https://php.net/manual/en/function.http-persistent-handles-count.php
 * @return stdClass|false persistent handles statistics as stdClass object on success or false on failure.
 */
function http_persistent_handles_count() {}

/**
 * (PECL pecl_http &gt;= 1.5.0)<br/>
 * Clean up persistent handles
 * @link https://php.net/manual/en/function.http-persistent-handles-clean.php
 * @param string $ident [optional]
 * @return string
 */
function http_persistent_handles_clean($ident = null) {}

/**
 * (PECL pecl_http &gt;= 1.5.0)<br/>
 * Get/set ident of persistent handles
 * @link https://php.net/manual/en/function.http-persistent-handles-ident.php
 * @param string $ident <p>
 * the identification string
 * </p>
 * @return string|false the prior ident as string on success or false on failure.
 */
function http_persistent_handles_ident($ident) {}

/**
 * (PECL pecl_http &gt;= 0.1.0)<br/>
 * Perform GET request
 * @link https://php.net/manual/en/function.http-get.php
 * @param string $url <p>
 * URL
 * </p>
 * @param null|array $options [optional] <p>
 * </p>
 * @param null|array &$info [optional] <p>
 * Will be filled with request/response information
 * </p>
 * @return string
 */
function http_get($url, ?array $options = null, ?array &$info = null) {}

/**
 * (PECL pecl_http &gt;= 0.1.0)<br/>
 * Perform HEAD request
 * @link https://php.net/manual/en/function.http-head.php
 * @param string $url [optional] <p>
 * URL
 * </p>
 * @param null|array $options [optional] <p>
 * </p>
 * @param null|array &$info [optional] <p>
 * </p>
 * @return string
 */
function http_head($url = null, ?array $options = null, ?array &$info = null) {}

/**
 * (PECL pecl_http &gt;= 0.1.0)<br/>
 * Perform POST request with pre-encoded data
 * @link https://php.net/manual/en/function.http-post-data.php
 * @param string $url <p>
 * URL
 * </p>
 * @param string $data [optional] <p>
 * String containing the pre-encoded post data
 * </p>
 * @param null|array $options [optional] <p>
 * </p>
 * @param null|array &$info [optional] <p>
 * </p>
 * @return string
 */
function http_post_data($url, $data = null, ?array $options = null, ?array &$info = null) {}

/**
 * (PECL pecl_http &gt;= 0.10.0)<br/>
 * Perform POST request with data to be encoded
 * @link https://php.net/manual/en/function.http-post-fields.php
 * @param string $url <p>
 * URL
 * </p>
 * @param null|array $data [optional] <p>
 * Associative array of POST values
 * </p>
 * @param null|array $files [optional] <p>
 * Array of files to post
 * </p>
 * @param null|array $options [optional] <p>
 * </p>
 * @param null|array &$info [optional] <p>
 * </p>
 * @return string
 */
function http_post_fields($url, ?array $data = null, ?array $files = null, ?array $options = null, ?array &$info = null) {}

/**
 * (PECL pecl_http &gt;= 0.25.0)<br/>
 * Perform PUT request with data
 * @link https://php.net/manual/en/function.http-put-data.php
 * @param string $url <p>
 * URL
 * </p>
 * @param null|string $data [optional] <p>
 * PUT request body
 * </p>
 * @param null|array $options [optional] <p>
 * </p>
 * @param null|array &$info [optional] <p>
 * </p>
 * @return string
 */
function http_put_data($url, $data = null, ?array $options = null, ?array &$info = null) {}

/**
 * (PECL pecl_http &gt;= 0.10.0)<br/>
 * Perform PUT request with file
 * @link https://php.net/manual/en/function.http-put-file.php
 * @param string $url <p>
 * URL
 * </p>
 * @param null|string $file [optional] <p>
 * The file to put
 * </p>
 * @param null|array $options [optional] <p>
 * </p>
 * @param null|array &$info [optional] <p>
 * </p>
 * @return string
 */
function http_put_file($url, $file = null, ?array $options = null, ?array &$info = null) {}

/**
 * (PECL pecl_http &gt;= 0.10.0)<br/>
 * Perform PUT request with stream
 * @link https://php.net/manual/en/function.http-put-stream.php
 * @param string $url <p>
 * URL
 * </p>
 * @param null|resource $stream [optional] <p>
 * The stream to read the PUT request body from
 * </p>
 * @param null|array $options [optional] <p>
 * </p>
 * @param null|array &$info [optional] <p>
 * </p>
 * @return string
 */
function http_put_stream($url, $stream = null, ?array $options = null, ?array &$info = null) {}

/**
 * (PECL pecl_http &gt;= 1.0.0)<br/>
 * Perform custom request
 * @link https://php.net/manual/en/function.http-request.php
 * @param int $method <p>
 * Request method
 * </p>
 * @param null|string $url [optional] <p>
 * URL
 * </p>
 * @param null|string $body [optional] <p>
 * Request body
 * </p>
 * @param null|array $options [optional] <p>
 * </p>
 * @param null|array &$info [optional] <p>
 * </p>
 * @return string
 */
function http_request($method, $url = null, $body = null, ?array $options = null, ?array &$info = null) {}

/**
 * (PECL pecl_http &gt;= 1.0.0)<br/>
 * Encode request body
 * @link https://php.net/manual/en/function.http-request-body-encode.php
 * @param array $fields <p>
 * POST fields
 * </p>
 * @param array $files <p>
 * POST files
 * </p>
 * @return string|false encoded string on success or false on failure.
 */
#[Pure]
function http_request_body_encode(array $fields, array $files) {}

/**
 * (PECL pecl_http &gt;= 0.10.0)<br/>
 * Register request method
 * @link https://php.net/manual/en/function.http-request-method-register.php
 * @param string $method <p>
 * the request method name to register
 * </p>
 * @return int|false the ID of the request method on success or false on failure.
 */
function http_request_method_register($method) {}

/**
 * (PECL pecl_http &gt;= 0.10.0)<br/>
 * Unregister request method
 * @link https://php.net/manual/en/function.http-request-method-unregister.php
 * @param mixed $method <p>
 * The request method name or ID
 * </p>
 * @return bool true on success or false on failure.
 */
function http_request_method_unregister($method) {}

/**
 * (PECL pecl_http &gt;= 0.10.0)<br/>
 * Check whether request method exists
 * @link https://php.net/manual/en/function.http-request-method-exists.php
 * @param mixed $method <p>
 * request method name or ID
 * </p>
 * @return bool true if the request method is known, else false.
 */
#[Pure]
function http_request_method_exists($method) {}

/**
 * (PECL pecl_http &gt;= 0.10.0)<br/>
 * Get request method name
 * @link https://php.net/manual/en/function.http-request-method-name.php
 * @param int $method <p>
 * request method ID
 * </p>
 * @return string|false the request method name as string on success or false on failure.
 */
#[Pure]
function http_request_method_name($method) {}

/**
 * (PECL pecl_http &gt;= 0.10.0)<br/>
 * ETag output handler
 * @link https://php.net/manual/en/function.ob-etaghandler.php
 * @param string $data
 * @param int $mode
 * @return string
 */
#[Pure]
function ob_etaghandler($data, $mode) {}

/**
 * (PECL pecl_http &gt;= 0.15.0)<br/>
 * Deflate data
 * @link https://php.net/manual/en/function.http-deflate.php
 * @param string $data <p>
 * String containing the data that should be encoded
 * </p>
 * @param int $flags [optional] <p>
 * deflate options
 * </p>
 * @return string|null the encoded string on success, or NULL on failure.
 */
#[Pure]
function http_deflate($data, $flags = null) {}

/**
 * (PECL pecl_http &gt;= 0.15.0)<br/>
 * Inflate data
 * @link https://php.net/manual/en/function.http-inflate.php
 * @param string $data <p>
 * string containing the compressed data
 * </p>
 * @return string|null the decoded string on success, or NULL on failure.
 */
#[Pure]
function http_inflate($data) {}

/**
 * (PECL pecl_http &gt;= 0.21.0)<br/>
 * Deflate output handler
 * @link https://php.net/manual/en/function.ob-deflatehandler.php
 * @param string $data
 * @param int $mode
 * @return string
 */
function ob_deflatehandler($data, $mode) {}

/**
 * (PECL pecl_http &gt;= 0.21.0)<br/>
 * Inflate output handler
 * @link https://php.net/manual/en/function.ob-inflatehandler.php
 * @param string $data
 * @param int $mode
 * @return string
 */
function ob_inflatehandler($data, $mode) {}

/**
 * (PECL pecl_http &gt;= 0.15.0)<br/>
 * Check built-in HTTP support
 * @link https://php.net/manual/en/function.http-support.php
 * @param int $feature [optional] <p>
 * feature to probe for
 * </p>
 * @return int integer, whether requested feature is supported,
 * or a bitmask with all supported features if feature was omitted.
 */
#[Pure]
function http_support($feature = null) {}

/**
 * don't urldecode values
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_COOKIE_PARSE_RAW', 1);

/**
 * whether &quot;secure&quot; was found in the cookie's parameters list
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_COOKIE_SECURE', 16);

/**
 * whether &quot;httpOnly&quot; was found in the cookie's parameter list
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_COOKIE_HTTPONLY', 32);
define('HTTP_DEFLATE_LEVEL_DEF', 0);
define('HTTP_DEFLATE_LEVEL_MIN', 1);
define('HTTP_DEFLATE_LEVEL_MAX', 9);
define('HTTP_DEFLATE_TYPE_ZLIB', 0);
define('HTTP_DEFLATE_TYPE_GZIP', 16);
define('HTTP_DEFLATE_TYPE_RAW', 32);
define('HTTP_DEFLATE_STRATEGY_DEF', 0);
define('HTTP_DEFLATE_STRATEGY_FILT', 256);
define('HTTP_DEFLATE_STRATEGY_HUFF', 512);
define('HTTP_DEFLATE_STRATEGY_RLE', 768);
define('HTTP_DEFLATE_STRATEGY_FIXED', 1024);

/**
 * don't flush
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_ENCODING_STREAM_FLUSH_NONE', 0);

/**
 * synchronized flush only
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_ENCODING_STREAM_FLUSH_SYNC', 1048576);

/**
 * full data flush
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_ENCODING_STREAM_FLUSH_FULL', 2097152);

/**
 * use &quot;basic&quot; authentication
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_AUTH_BASIC', 1);

/**
 * use &quot;digest&quot; authentication
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_AUTH_DIGEST', 2);

/**
 * use &quot;NTLM&quot; authentication
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_AUTH_NTLM', 8);

/**
 * use &quot;GSS-NEGOTIATE&quot; authentication
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_AUTH_GSSNEG', 4);

/**
 * try any authentication scheme
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_AUTH_ANY', -1);
define('HTTP_VERSION_NONE', 0);

/**
 * HTTP version 1.0
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_VERSION_1_0', 1);

/**
 * HTTP version 1.1
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_VERSION_1_1', 2);

/**
 * no specific HTTP protocol version
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_VERSION_ANY', 0);

/**
 * use TLSv1 only
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_SSL_VERSION_TLSv1', 1);

/**
 * use SSLv2 only
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_SSL_VERSION_SSLv2', 2);

/**
 * use SSLv3 only
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_SSL_VERSION_SSLv3', 3);

/**
 * no specific SSL protocol version
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_SSL_VERSION_ANY', 0);

/**
 * use IPv4 only for name lookups
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_IPRESOLVE_V4', 1);

/**
 * use IPv6 only for name lookups
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_IPRESOLVE_V6', 2);

/**
 * use any IP mechanism only for name lookups
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_IPRESOLVE_ANY', 0);

/**
 * the proxy is a SOCKS4 type proxy
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_PROXY_SOCKS4', 4);

/**
 * the proxy is a SOCKS5 type proxy
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_PROXY_SOCKS5', 5);

/**
 * standard HTTP proxy
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_PROXY_HTTP', 0);
define('HTTP_METH_GET', 1);
define('HTTP_METH_HEAD', 2);
define('HTTP_METH_POST', 3);
define('HTTP_METH_PUT', 4);
define('HTTP_METH_DELETE', 5);
define('HTTP_METH_OPTIONS', 6);
define('HTTP_METH_TRACE', 7);
define('HTTP_METH_CONNECT', 8);
define('HTTP_METH_PROPFIND', 9);
define('HTTP_METH_PROPPATCH', 10);
define('HTTP_METH_MKCOL', 11);
define('HTTP_METH_COPY', 12);
define('HTTP_METH_MOVE', 13);
define('HTTP_METH_LOCK', 14);
define('HTTP_METH_UNLOCK', 15);
define('HTTP_METH_VERSION_CONTROL', 16);
define('HTTP_METH_REPORT', 17);
define('HTTP_METH_CHECKOUT', 18);
define('HTTP_METH_CHECKIN', 19);
define('HTTP_METH_UNCHECKOUT', 20);
define('HTTP_METH_MKWORKSPACE', 21);
define('HTTP_METH_UPDATE', 22);
define('HTTP_METH_LABEL', 23);
define('HTTP_METH_MERGE', 24);
define('HTTP_METH_BASELINE_CONTROL', 25);
define('HTTP_METH_MKACTIVITY', 26);
define('HTTP_METH_ACL', 27);

/**
 * guess applicable redirect method
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_REDIRECT', 0);

/**
 * permanent redirect (301 Moved permanently)
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_REDIRECT_PERM', 301);

/**
 * standard redirect (302 Found)
 * RFC 1945 and RFC 2068 specify that the client is not allowed
 * to change the method on the redirected request. However, most
 * existing user agent implementations treat 302 as if it were a 303
 * response, performing a GET on the Location field-value regardless
 * of the original request method. The status codes 303 and 307 have
 * been added for servers that wish to make unambiguously clear which
 * kind of reaction is expected of the client.
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_REDIRECT_FOUND', 302);

/**
 * redirect applicable to POST requests (303 See other)
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_REDIRECT_POST', 303);

/**
 * proxy redirect (305 Use proxy)
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_REDIRECT_PROXY', 305);

/**
 * temporary redirect (307 Temporary Redirect)
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_REDIRECT_TEMP', 307);

/**
 * querying for this constant will always return true
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_SUPPORT', 1);

/**
 * whether support to issue HTTP requests is given, ie. libcurl support was compiled in
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_SUPPORT_REQUESTS', 2);

/**
 * whether support to guess the Content-Type of HTTP messages is given, ie. libmagic support was compiled in
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_SUPPORT_MAGICMIME', 4);

/**
 * whether support for zlib encodings is given, ie. libz support was compiled in
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_SUPPORT_ENCODINGS', 8);

/**
 * whether support to issue HTTP requests over SSL is given, ie. linked libcurl was built with SSL support
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_SUPPORT_SSLREQUESTS', 32);
define('HTTP_SUPPORT_EVENTS', 128);

/**
 * allow commands additionally to semicolons as separator
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_PARAMS_ALLOW_COMMA', 1);

/**
 * continue parsing after an error occurred
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_PARAMS_ALLOW_FAILURE', 2);

/**
 * raise PHP warnings on parse errors
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_PARAMS_RAISE_ERROR', 4);

/**
 * all three values above, bitwise or'ed
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_PARAMS_DEFAULT', 7);

/**
 * replace every part of the first URL when there's one of the second URL
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_URL_REPLACE', 0);

/**
 * join relative paths
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_URL_JOIN_PATH', 1);

/**
 * join query strings
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_URL_JOIN_QUERY', 2);

/**
 * strip any user authentication information
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_URL_STRIP_USER', 4);

/**
 * strip any password authentication information
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_URL_STRIP_PASS', 8);

/**
 * strip any authentication information
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_URL_STRIP_AUTH', 12);

/**
 * strip explicit port numbers
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_URL_STRIP_PORT', 32);

/**
 * strip complete path
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_URL_STRIP_PATH', 64);

/**
 * strip query string
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_URL_STRIP_QUERY', 128);

/**
 * strip any fragments (#identifier)
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_URL_STRIP_FRAGMENT', 256);

/**
 * strip anything but scheme and host
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_URL_STRIP_ALL', 492);
define('HTTP_URL_FROM_ENV', 4096);

/**
 * runtime error
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_E_RUNTIME', 1);

/**
 * an invalid parameter was passed
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_E_INVALID_PARAM', 2);

/**
 * header() or similar operation failed
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_E_HEADER', 3);

/**
 * HTTP header parse error
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_E_MALFORMED_HEADERS', 4);

/**
 * unknown/invalid request method
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_E_REQUEST_METHOD', 5);

/**
 * with operation incompatible message type
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_E_MESSAGE_TYPE', 6);

/**
 * encoding/decoding error
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_E_ENCODING', 7);

/**
 * request failure
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_E_REQUEST', 8);

/**
 * request pool failure
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_E_REQUEST_POOL', 9);

/**
 * socket exception
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_E_SOCKET', 10);

/**
 * response failure
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_E_RESPONSE', 11);

/**
 * invalid URL
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_E_URL', 12);

/**
 * querystring operation failure
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_E_QUERYSTRING', 13);

/**
 * the message is of no specific type
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_MSG_NONE', 0);

/**
 * request style message
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_MSG_REQUEST', 1);

/**
 * response style message
 * @link https://php.net/manual/en/http.constants.php
 */
define('HTTP_MSG_RESPONSE', 2);
define('HTTP_QUERYSTRING_TYPE_BOOL', 3);
define('HTTP_QUERYSTRING_TYPE_INT', 1);
define('HTTP_QUERYSTRING_TYPE_FLOAT', 2);
define('HTTP_QUERYSTRING_TYPE_STRING', 6);
define('HTTP_QUERYSTRING_TYPE_ARRAY', 4);
define('HTTP_QUERYSTRING_TYPE_OBJECT', 5);
<?php

// Start of mcrypt v.
use JetBrains\PhpStorm\Deprecated;

/**
 * Encrypt/decrypt data in ECB mode
 * @link https://php.net/manual/en/function.mcrypt-ecb.php
 * @param string|int $cipher
 * @param string $key
 * @param string $data
 * @param int $mode
 * @return string
 * @removed 7.0
 */
#[Deprecated(since: "5.5")]
function mcrypt_ecb($cipher, $key, $data, $mode) {}

/**
 * Encrypt/decrypt data in CBC mode
 * @link https://php.net/manual/en/function.mcrypt-cbc.php
 * @param int|string $cipher
 * @param string $key
 * @param string $data
 * @param int $mode
 * @param string $iv [optional]
 * @return string
 * @removed 7.0
 */
#[Deprecated(since: "5.5")]
function mcrypt_cbc($cipher, $key, $data, $mode, $iv = null) {}

/**
 * Encrypt/decrypt data in CFB mode
 * @link https://php.net/manual/en/function.mcrypt-cfb.php
 * @param int|string $cipher
 * @param string $key
 * @param string $data
 * @param int $mode
 * @param string $iv [optional]
 * @return string
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mcrypt_cfb($cipher, $key, $data, $mode, $iv = null) {}

/**
 * Encrypt/decrypt data in OFB mode
 * @link https://php.net/manual/en/function.mcrypt-ofb.php
 * @param int|string $cipher
 * @param string $key
 * @param string $data
 * @param int $mode
 * @param string $iv [optional]
 * @return string
 * @removed 7.0
 */
#[Deprecated(since: '5.5')]
function mcrypt_ofb($cipher, $key, $data, $mode, $iv = null) {}

/**
 * Get the key size of the specified cipher
 * @link https://php.net/manual/en/function.mcrypt-get-key-size.php
 * @param int|string $cipher
 * @param string $module
 * @return int
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_get_key_size($cipher, $module) {}

/**
 * Get the block size of the specified cipher
 * @link https://php.net/manual/en/function.mcrypt-get-block-size.php
 * @param string|int $cipher <p>
 * One of the MCRYPT_ciphername constants or the name
 * of the algorithm as string.
 * </p>
 * @param string $module <p>
 * One of the <b>MCRYPT_MODE_modename</b> constants, or one of the following strings: "ecb", "cbc", "cfb", "ofb", "nofb" or "stream".</p>
 * @return int Gets the block size, as an integer.
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_get_block_size($cipher, $module) {}

/**
 * Get the name of the specified cipher
 * @link https://php.net/manual/en/function.mcrypt-get-cipher-name.php
 * @param int|string $cipher <p>
 * One of the MCRYPT_ciphername constants or the name
 * of the algorithm as string.
 * </p>
 * @return string|false This function returns the name of the cipher or false, if the cipher does
 * not exist.
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_get_cipher_name($cipher) {}

/**
 * Creates an initialization vector (IV) from a random source
 * @link https://php.net/manual/en/function.mcrypt-create-iv.php
 * @param int $size <p>
 * Determines the size of the IV, parameter source
 * (defaults to random value) specifies the source of the IV.
 * </p>
 * @param int $source [optional] <p>
 * The source can be MCRYPT_RAND (system random
 * number generator), MCRYPT_DEV_RANDOM (read
 * data from /dev/random) and
 * MCRYPT_DEV_URANDOM (read data from
 * /dev/urandom). MCRYPT_RAND
 * is the only one supported on Windows because Windows (of course)
 * doesn't have /dev/random or
 * /dev/urandom.
 * </p>
 * <p>
 * When using MCRYPT_RAND, remember to call
 * srand before
 * mcrypt_create_iv to initialize the random
 * number generator; it is not seeded automatically like
 * rand is.
 * </p>
 * @return string|false the initialization vector, or false on error.
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_create_iv($size, $source = MCRYPT_DEV_URANDOM) {}

/**
 * Gets an array of all supported ciphers
 * @link https://php.net/manual/en/function.mcrypt-list-algorithms.php
 * @param string $lib_dir [optional] <p>
 * Specifies the directory where all algorithms are located. If not
 * specifies, the value of the mcrypt.algorithms_dir (php.ini) directive
 * is used.
 * </p>
 * @return array an array with all the supported algorithms.
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_list_algorithms($lib_dir = null) {}

/**
 * Gets an array of all supported modes
 * @link https://php.net/manual/en/function.mcrypt-list-modes.php
 * @param string $lib_dir [optional] <p>
 * Specifies the directory where all modes are located. If not
 * specifies, the value of the mcrypt.modes_dir
 * (php.ini) directive is used.
 * </p>
 * @return array an array with all the supported modes.
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_list_modes($lib_dir = null) {}

/**
 * Returns the size of the IV belonging to a specific cipher/mode combination
 * @link https://php.net/manual/en/function.mcrypt-get-iv-size.php
 * @param string $cipher <p>
 * One of the MCRYPT_ciphername constants of the name
 * of the algorithm as string.
 * </p>
 * @param string $module <p>
 * mode is one of the MCRYPT_MODE_modename constants
 * or one of "ecb", "cbc", "cfb", "ofb", "nofb" or "stream". The IV is
 * ignored in ECB mode as this mode does not require it. You will need to
 * have the same IV (think: starting point) both at encryption and
 * decryption stages, otherwise your encryption will fail.
 * </p>
 * @return int|false the size of the Initialisation Vector (IV) in bytes. On error the
 * function returns false. If the IV is ignored in the specified cipher/mode
 * combination zero is returned.
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_get_iv_size($cipher, $module) {}

/**
 * Encrypts plaintext with given parameters
 * @link https://php.net/manual/en/function.mcrypt-encrypt.php
 * @param string $cipher <p>
 * One of the MCRYPT_ciphername
 * constants of the name of the algorithm as string.
 * </p>
 * @param string $key <p>
 * The key with which the data will be encrypted. If it's smaller that
 * the required keysize, it is padded with '\0'. It is
 * better not to use ASCII strings for keys.
 * </p>
 * <p>
 * It is recommended to use the mhash functions to create a key from a
 * string.
 * </p>
 * @param string $data <p>
 * The data that will be encrypted with the given cipher and mode. If the
 * size of the data is not n * blocksize, the data will be padded with
 * '\0'.
 * </p>
 * <p>
 * The returned crypttext can be larger that the size of the data that is
 * given by data.
 * </p>
 * @param string $mode <p>
 * One of the MCRYPT_MODE_modename
 * constants of one of "ecb", "cbc", "cfb", "ofb", "nofb" or
 * "stream".
 * </p>
 * @param string $iv [optional] <p>
 * Used for the initialisation in CBC, CFB, OFB modes, and in some
 * algorithms in STREAM mode. If you do not supply an IV, while it is
 * needed for an algorithm, the function issues a warning and uses an
 * IV with all bytes set to '\0'.
 * </p>
 * @return string the encrypted data, as a string.
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_encrypt($cipher, $key, $data, $mode, $iv = null) {}

/**
 * Decrypts crypttext with given parameters
 * @link https://php.net/manual/en/function.mcrypt-decrypt.php
 * @param string $cipher <p>
 * cipher is one of the MCRYPT_ciphername constants
 * of the name of the algorithm as string.
 * </p>
 * @param string $key <p>
 * key is the key with which the data is encrypted.
 * If it's smaller that the required keysize, it is padded with
 * '\0'.
 * </p>
 * @param string $data <p>
 * data is the data that will be decrypted with
 * the given cipher and mode. If the size of the data is not n * blocksize,
 * the data will be padded with '\0'.
 * </p>
 * @param string $mode <p>
 * mode is one of the MCRYPT_MODE_modename
 * constants of one of "ecb", "cbc", "cfb", "ofb", "nofb" or "stream".
 * </p>
 * @param string $iv [optional] <p>
 * The iv parameter is used for the initialisation
 * in CBC, CFB, OFB modes, and in some algorithms in STREAM mode. If you
 * do not supply an IV, while it is needed for an algorithm, the function
 * issues a warning and uses an IV with all bytes set to
 * '\0'.
 * </p>
 * @return string the decrypted data as a string.
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_decrypt($cipher, $key, $data, $mode, $iv = null) {}

/**
 * Opens the module of the algorithm and the mode to be used
 * @link https://php.net/manual/en/function.mcrypt-module-open.php
 * @param string $cipher <p>
 * The algorithm to be used.
 * </p>
 * @param string $cipher_directory <p>
 * The algorithm_directory and
 * mode_directory are used to locate the encryption
 * modules. When you supply a directory name, it is used. When you set one
 * of these to the empty string (""), the value set by
 * the mcrypt.algorithms_dir or
 * mcrypt.modes_dir ini-directive is used. When
 * these are not set, the default directories that are used are the ones
 * that were compiled in into libmcrypt (usually
 * /usr/local/lib/libmcrypt).
 * </p>
 * @param string $mode <p>
 * The mode to be used.
 * </p>
 * @param string $mode_directory <p>
 * </p>
 * @return resource|false Normally it returns an encryption descriptor, or false on error.
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_module_open($cipher, $cipher_directory, $mode, $mode_directory) {}

/**
 * This function initializes all buffers needed for encryption
 * @link https://php.net/manual/en/function.mcrypt-generic-init.php
 * @param resource $td <p>
 * The encryption descriptor.
 * </p>
 * @param string $key <p>
 * The maximum length of the key should be the one obtained by calling
 * mcrypt_enc_get_key_size and every value smaller
 * than this is legal.
 * </p>
 * @param string $iv <p>
 * The IV should normally have the size of the algorithms block size, but
 * you must obtain the size by calling
 * mcrypt_enc_get_iv_size. IV is ignored in ECB. IV
 * MUST exist in CFB, CBC, STREAM, nOFB and OFB modes. It needs to be
 * random and unique (but not secret). The same IV must be used for
 * encryption/decryption. If you do not want to use it you should set it
 * to zeros, but this is not recommended.
 * </p>
 * @return int|false The function returns a negative value on error, -3 when the key length
 * was incorrect, -4 when there was a memory allocation problem and any
 * other return value is an unknown error. If an error occurs a warning will
 * be displayed accordingly. false is returned if incorrect parameters
 * were passed.
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_generic_init($td, $key, $iv) {}

/**
 * This function encrypts data
 * @link https://php.net/manual/en/function.mcrypt-generic.php
 * @param resource $td <p>
 * The encryption descriptor.
 * </p>
 * <p>
 * The encryption handle should always be initialized with
 * mcrypt_generic_init with a key and an IV before
 * calling this function. Where the encryption is done, you should free the
 * encryption buffers by calling mcrypt_generic_deinit.
 * See mcrypt_module_open for an example.
 * </p>
 * @param string $data <p>
 * The data to encrypt.
 * </p>
 * @return string the encrypted data.
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_generic($td, $data) {}

/**
 * Decrypts data
 * @link https://php.net/manual/en/function.mdecrypt-generic.php
 * @param resource $td <p>
 * An encryption descriptor returned by
 * mcrypt_module_open
 * </p>
 * @param string $data <p>
 * Encrypted data.
 * </p>
 * @return string
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mdecrypt_generic($td, $data) {}

/**
 * This function terminates encryption
 * @link https://php.net/manual/en/function.mcrypt-generic-end.php
 * @param resource $td
 * @return bool
 * @removed 7.0
 */
#[Deprecated(since: '5.3')]
function mcrypt_generic_end($td) {}

/**
 * This function deinitializes an encryption module
 * @link https://php.net/manual/en/function.mcrypt-generic-deinit.php
 * @param resource $td <p>
 * The encryption descriptor.
 * </p>
 * @return bool true on success or false on failure.
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_generic_deinit($td) {}

/**
 * Runs a self test on the opened module
 * @link https://php.net/manual/en/function.mcrypt-enc-self-test.php
 * @param resource $td <p>
 * The encryption descriptor.
 * </p>
 * @return int Returns 0 on success and a negative integer on failure
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_enc_self_test($td) {}

/**
 * Checks whether the encryption of the opened mode works on blocks
 * @link https://php.net/manual/en/function.mcrypt-enc-is-block-algorithm-mode.php
 * @param resource $td <p>
 * The encryption descriptor.
 * </p>
 * @return bool true if the mode is for use with block algorithms, otherwise it
 * returns false.
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_enc_is_block_algorithm_mode($td) {}

/**
 * Checks whether the algorithm of the opened mode is a block algorithm
 * @link https://php.net/manual/en/function.mcrypt-enc-is-block-algorithm.php
 * @param resource $td <p>
 * The encryption descriptor.
 * </p>
 * @return bool true if the algorithm is a block algorithm or false if it is
 * a stream one.
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_enc_is_block_algorithm($td) {}

/**
 * Checks whether the opened mode outputs blocks
 * @link https://php.net/manual/en/function.mcrypt-enc-is-block-mode.php
 * @param resource $td <p>
 * The encryption descriptor.
 * </p>
 * @return bool true if the mode outputs blocks of bytes or false if it outputs bytes.
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_enc_is_block_mode($td) {}

/**
 * Returns the blocksize of the opened algorithm
 * @link https://php.net/manual/en/function.mcrypt-enc-get-block-size.php
 * @param resource $td <p>
 * The encryption descriptor.
 * </p>
 * @return int the block size of the specified algorithm in bytes.
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_enc_get_block_size($td) {}

/**
 * Returns the maximum supported keysize of the opened mode
 * @link https://php.net/manual/en/function.mcrypt-enc-get-key-size.php
 * @param resource $td <p>
 * The encryption descriptor.
 * </p>
 * @return int the maximum supported key size of the algorithm in bytes.
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_enc_get_key_size($td) {}

/**
 * Returns an array with the supported keysizes of the opened algorithm
 * @link https://php.net/manual/en/function.mcrypt-enc-get-supported-key-sizes.php
 * @param resource $td <p>
 * The encryption descriptor.
 * </p>
 * @return array an array with the key sizes supported by the algorithm
 * specified by the encryption descriptor. If it returns an empty
 * array then all key sizes between 1 and
 * mcrypt_enc_get_key_size are supported by the
 * algorithm.
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_enc_get_supported_key_sizes($td) {}

/**
 * Returns the size of the IV of the opened algorithm
 * @link https://php.net/manual/en/function.mcrypt-enc-get-iv-size.php
 * @param resource $td <p>
 * The encryption descriptor.
 * </p>
 * @return int the size of the IV, or 0 if the IV is ignored in the algorithm.
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_enc_get_iv_size($td) {}

/**
 * Returns the name of the opened algorithm
 * @link https://php.net/manual/en/function.mcrypt-enc-get-algorithms-name.php
 * @param resource $td <p>
 * The encryption descriptor.
 * </p>
 * @return string the name of the opened algorithm as a string.
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_enc_get_algorithms_name($td) {}

/**
 * Returns the name of the opened mode
 * @link https://php.net/manual/en/function.mcrypt-enc-get-modes-name.php
 * @param resource $td <p>
 * The encryption descriptor.
 * </p>
 * @return string the name as a string.
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_enc_get_modes_name($td) {}

/**
 * This function runs a self test on the specified module
 * @link https://php.net/manual/en/function.mcrypt-module-self-test.php
 * @param string $algorithm <p>
 * One of the <b>MCRYPT_ciphername</b> constants, or the name of the algorithm as string.
 * </p>
 * @param string $lib_dir [optional] <p>
 * The optional lib_dir parameter can contain the
 * location of where the algorithm module is on the system.
 * </p>
 * @return bool The function returns true if the self test succeeds, or false when if
 * fails.
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_module_self_test($algorithm, $lib_dir = null) {}

/**
 * Returns if the specified module is a block algorithm or not
 * @link https://php.net/manual/en/function.mcrypt-module-is-block-algorithm-mode.php
 * @param string $mode <p>
 * The mode to check.
 * </p>
 * @param string $lib_dir [optional] <p>
 * The optional lib_dir parameter can contain the
 * location of where the algorithm module is on the system.
 * </p>
 * @return bool This function returns true if the mode is for use with block
 * algorithms, otherwise it returns false. (e.g. false for stream, and
 * true for cbc, cfb, ofb).
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_module_is_block_algorithm_mode($mode, $lib_dir = null) {}

/**
 * This function checks whether the specified algorithm is a block algorithm
 * @link https://php.net/manual/en/function.mcrypt-module-is-block-algorithm.php
 * @param string $algorithm <p>
 * The algorithm to check.
 * </p>
 * @param string $lib_dir [optional] <p>
 * The optional lib_dir parameter can contain the
 * location of where the algorithm module is on the system.
 * </p>
 * @return bool This function returns true if the specified algorithm is a block
 * algorithm, or false is it is a stream algorithm.
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_module_is_block_algorithm($algorithm, $lib_dir = null) {}

/**
 * Returns if the specified mode outputs blocks or not
 * @link https://php.net/manual/en/function.mcrypt-module-is-block-mode.php
 * @param string $mode <p>
 * The mode to check.
 * </p>
 * @param string $lib_dir [optional] <p>
 * The optional lib_dir parameter can contain the
 * location of where the algorithm module is on the system.
 * </p>
 * @return bool This function returns true if the mode outputs blocks of bytes or
 * false if it outputs just bytes. (e.g. true for cbc and ecb, and
 * false for cfb and stream).
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_module_is_block_mode($mode, $lib_dir = null) {}

/**
 * Returns the blocksize of the specified algorithm
 * @link https://php.net/manual/en/function.mcrypt-module-get-algo-block-size.php
 * @param string $algorithm <p>
 * The algorithm name.
 * </p>
 * @param string $lib_dir [optional] <p>
 * This optional parameter can contain the location where the mode module
 * is on the system.
 * </p>
 * @return int the block size of the algorithm specified in bytes.
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_module_get_algo_block_size($algorithm, $lib_dir = null) {}

/**
 * Returns the maximum supported keysize of the opened mode
 * @link https://php.net/manual/en/function.mcrypt-module-get-algo-key-size.php
 * @param string $algorithm <p>
 * The algorithm name.
 * </p>
 * @param string $lib_dir [optional] <p>
 * This optional parameter can contain the location where the mode module
 * is on the system.
 * </p>
 * @return int This function returns the maximum supported key size of the
 * algorithm specified in bytes.
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_module_get_algo_key_size($algorithm, $lib_dir = null) {}

/**
 * Returns an array with the supported keysizes of the opened algorithm
 * @link https://php.net/manual/en/function.mcrypt-module-get-supported-key-sizes.php
 * @param string $algorithm <p>
 * The algorithm to used.
 * </p>
 * @param string $lib_dir [optional] <p>
 * The optional lib_dir parameter can contain the
 * location of where the algorithm module is on the system.
 * </p>
 * @return array an array with the key sizes supported by the specified algorithm.
 * If it returns an empty array then all key sizes between 1 and
 * mcrypt_module_get_algo_key_size are supported by the
 * algorithm.
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_module_get_supported_key_sizes($algorithm, $lib_dir = null) {}

/**
 * Closes the mcrypt module
 * @link https://php.net/manual/en/function.mcrypt-module-close.php
 * @param resource $td <p>
 * The encryption descriptor.
 * </p>
 * @return bool true on success or false on failure.
 * @removed 7.2
 */
#[Deprecated(since: '7.1')]
function mcrypt_module_close($td) {}

/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_ENCRYPT', 0);
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_DECRYPT', 1);
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_DEV_RANDOM', 0);
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_DEV_URANDOM', 1);
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_RAND', 2);
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_3DES', "tripledes");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_ARCFOUR_IV', "arcfour-iv");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_ARCFOUR', "arcfour");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_BLOWFISH', "blowfish");
define('MCRYPT_BLOWFISH_COMPAT', "blowfish-compat");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_CAST_128', "cast-128");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_CAST_256', "cast-256");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_CRYPT', "crypt");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_DES', "des");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_DES_COMPAT', "des-compat");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_ENIGNA', "crypt");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_GOST', "gost");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_LOKI97', "loki97");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_PANAMA', "panama");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_RC2', "rc2");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_RC4', "rc4");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_RIJNDAEL_128', "rijndael-128");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_RIJNDAEL_192', "rijndael-192");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_RIJNDAEL_256', "rijndael-256");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_SAFER64', "safer-sk64");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_SAFER128', "safer-sk128");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_SAFERPLUS', "saferplus");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_SERPENT', "serpent");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_SERPENT_128', "serpent-128");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_SERPENT_192', "serpent-192");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_SERPENT_256', "serpent-256");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_THREEWAY', "threeway");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_TRIPLEDES', "tripledes");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_TWOFISH', "twofish");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_WAKE', "wake");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_XTEA', "xtea");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_IDEA', "idea");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_MARS', "mars");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_RC6', "rc6");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_RC6_128', "rc6-128");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_RC6_192', "rc6-192");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_RC6_256', "rc6-256");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_SKIPJACK', "skipjack");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_MODE_CBC', "cbc");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_MODE_CFB', "cfb");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_MODE_ECB', "ecb");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_MODE_NOFB', "nofb");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_MODE_OFB', "ofb");
/**
 * @deprecated 7.1
 * @removed 7.2
 */
define('MCRYPT_MODE_STREAM', "stream");

// End of mcrypt v.
<?php
/**
 * Returns FPM status info array
 * @since 7.3
 * @return array|false
 */
function fpm_get_status(): array|false {}

/**
 * This function flushes all response data to the client and finishes the request.
 * This allows for time consuming tasks to be performed without leaving the connection to the client open.
 * @return bool Returns TRUE on success or FALSE on failure.
 * @link https://php.net/manual/en/install.fpm.php
 * @since 5.3.3
 */
function fastcgi_finish_request() {};
<?php

// Start of svn v.1.0.1

class Svn
{
    public const NON_RECURSIVE = 1;
    public const DISCOVER_CHANGED_PATHS = 2;
    public const OMIT_MESSAGES = 4;
    public const STOP_ON_COPY = 8;
    public const ALL = 16;
    public const SHOW_UPDATES = 32;
    public const NO_IGNORE = 64;
    public const IGNORE_EXTERNALS = 128;
    public const INITIAL = 1;
    public const HEAD = -1;
    public const BASE = -2;
    public const COMMITTED = -3;
    public const PREV = -4;
    public const UNSPECIFIED = -5;

    public static function checkout() {}

    public static function cat() {}

    public static function ls() {}

    public static function log() {}

    public static function auth_set_parameter() {}

    public static function auth_get_parameter() {}

    public static function client_version() {}

    public static function config_ensure() {}

    public static function diff() {}

    public static function cleanup() {}

    public static function revert() {}

    public static function resolved() {}

    public static function commit() {}

    public static function lock() {}

    public static function unlock() {}

    public static function add() {}

    public static function status() {}

    public static function update() {}

    public static function update2() {}

    public static function import() {}

    public static function info() {}

    public static function export() {}

    public static function copy() {}

    public static function switch() {}

    public static function blame() {}

    public static function delete() {}

    public static function mkdir() {}

    public static function move() {}

    public static function proplist() {}

    public static function propget() {}

    public static function propset() {}

    public static function prop_delete() {}

    public static function revprop_get() {}

    public static function revprop_set() {}

    public static function revprop_delete() {}

    public static function repos_create() {}

    public static function repos_recover() {}

    public static function repos_hotcopy() {}

    public static function repos_open() {}

    public static function repos_fs() {}

    public static function repos_fs_begin_txn_for_commit() {}

    public static function repos_fs_commit_txn() {}
}

class SvnWc
{
    public const NONE = 1;
    public const UNVERSIONED = 2;
    public const NORMAL = 3;
    public const ADDED = 4;
    public const MISSING = 5;
    public const DELETED = 6;
    public const REPLACED = 7;
    public const MODIFIED = 8;
    public const MERGED = 9;
    public const CONFLICTED = 10;
    public const IGNORED = 11;
    public const OBSTRUCTED = 12;
    public const EXTERNAL = 13;
    public const INCOMPLETE = 14;
}

class SvnWcSchedule
{
    public const NORMAL = 0;
    public const ADD = 1;
    public const DELETE = 2;
    public const REPLACE = 3;
}

class SvnNode
{
    public const NONE = 0;
    public const FILE = 1;
    public const DIR = 2;
    public const UNKNOWN = 3;
}

/**
 * (PECL svn &gt;= 0.1.0)<br/>
 * Checks out a working copy from the repository
 * @link https://php.net/manual/en/function.svn-checkout.php
 * @param string $repos <p>
 * String URL path to directory in repository to check out.
 * </p>
 * @param string $targetpath <p>
 * String local path to directory to check out in to
 * </p>
 * Relative paths will be resolved as if the current working directory was the one that contains the PHP binary. To use the calling script&#x00027;s working directory, use <b>realpath</b> or dirname(__FILE__).
 * @param int $revision [optional] <p>
 * Integer revision number of repository to check out. Default is
 * HEAD, the most recent revision.
 * </p>
 * @param int $flags [optional] <p>
 * Any combination of <b>SVN_NON_RECURSIVE</b> and
 * <b>SVN_IGNORE_EXTERNALS</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function svn_checkout($repos, $targetpath, $revision = SVN_REVISION_HEAD, $flags = 0) {}

/**
 * (PECL svn &gt;= 0.1.0)<br/>
 * Returns the contents of a file in a repository
 * @link https://php.net/manual/en/function.svn-cat.php
 * @param string $repos_url <p>
 * String URL path to item in a repository.
 * </p>
 * @param int $revision_no [optional] <p>
 * Integer revision number of item to retrieve, default is the HEAD
 * revision.
 * </p>
 * @return string the string contents of the item from the repository on
 * success, and <b>FALSE</b> on failure.
 */
function svn_cat($repos_url, $revision_no = SVN_REVISION_HEAD) {}

/**
 * (PECL svn &gt;= 0.1.0)<br/>
 * Returns list of directory contents in repository URL, optionally at revision number
 * @link https://php.net/manual/en/function.svn-ls.php
 * @param string $repos_url
 * @param int $revision_no [optional]
 * @param bool $recurse [optional] <p>
 * Enables recursion.
 * </p>
 * @param bool $peg [optional]
 * @return array On success, this function returns an array file listing in the format
 * of:
 * <pre>
 * [0] => Array
 * (
 * [created_rev] => integer revision number of last edit
 * [last_author] => string author name of last edit
 * [size] => integer byte file size of file
 * [time] => string date of last edit in form 'M d H:i'
 * or 'M d Y', depending on how old the file is
 * [time_t] => integer unix timestamp of last edit
 * [name] => name of file/directory
 * [type] => type, can be 'file' or 'dir'
 * )
 * [1] => ...
 * </pre>
 */
function svn_ls($repos_url, $revision_no = SVN_REVISION_HEAD, $recurse = false, $peg = false) {}

/**
 * (PECL svn &gt;= 0.1.0)<br/>
 * Returns the commit log messages of a repository URL
 * @link https://php.net/manual/en/function.svn-log.php
 * @param string $repos_url <p>
 * Repository URL of the item to retrieve log history from.
 * </p>
 * @param int $start_revision [optional] <p>
 * Revision number of the first log to retrieve. Use
 * <b>SVN_REVISION_HEAD</b> to retrieve the log from
 * the most recent revision.
 * </p>
 * @param int $end_revision [optional] <p>
 * Revision number of the last log to retrieve. Defaults to
 * <i>start_revision</i> if specified or to
 * <b>SVN_REVISION_INITIAL</b> otherwise.
 * </p>
 * @param int $limit [optional] <p>
 * Number of logs to retrieve.
 * </p>
 * @param int $flags [optional] <p>
 * Any combination of <b>SVN_OMIT_MESSAGES</b>,
 * <b>SVN_DISCOVER_CHANGED_PATHS</b> and
 * <b>SVN_STOP_ON_COPY</b>.
 * </p>
 * @return array On success, this function returns an array file listing in the format
 * of:
 * <pre>
 * [0] => Array, ordered most recent (highest) revision first
 * (
 * [rev] => integer revision number
 * [author] => string author name
 * [msg] => string log message
 * [date] => string date formatted per ISO 8601, i.e. date('c')
 * [paths] => Array, describing changed files
 * (
 * [0] => Array
 * (
 * [action] => string letter signifying change
 * [path] => absolute repository path of changed file
 * )
 * [1] => ...
 * )
 * )
 * [1] => ...
 * </pre>
 * </p>
 * <p>
 * The output will always be a numerically indexed array of arrays,
 * even when there are none or only one log message(s).
 * </p>
 * <p>
 * The value of action is a subset of the
 * status output
 * in the first column, where possible values are:
 * </p>
 * <table>
 * Actions
 * <tr valign="top">
 * <td>Letter</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>M</td>
 * <td>Item/props was modified</td>
 * </tr>
 * <tr valign="top">
 * <td>A</td>
 * <td>Item was added</td>
 * </tr>
 * <tr valign="top">
 * <td>D</td>
 * <td>Item was deleted</td>
 * </tr>
 * <tr valign="top">
 * <td>R</td>
 * <td>Item was replaced</td>
 * </tr>
 * </table>
 * <p>
 * If no changes were made to the item, an empty array is returned.
 */
function svn_log($repos_url, $start_revision = null, $end_revision = null, $limit = 0, $flags = SVN_DISCOVER_CHANGED_PATHS|SVN_STOP_ON_COPY) {}

/**
 * (PECL svn &gt;= 0.1.0)<br/>
 * Sets an authentication parameter
 * @link https://php.net/manual/en/function.svn-auth-set-parameter.php
 * @param string $key <p>
 * String key name. Use the authentication constants
 * defined by this extension to specify a key.
 * </p>
 * @param string $value <p>
 * String value to set to parameter at key. Format of value varies
 * with the parameter.
 * </p>
 * @return void No value is returned.
 */
function svn_auth_set_parameter($key, $value) {}

/**
 * (PECL svn &gt;= 0.1.0)<br/>
 * Retrieves authentication parameter
 * @link https://php.net/manual/en/function.svn-auth-get-parameter.php
 * @param string $key <p>
 * String key name. Use the authentication constants
 * defined by this extension to specify a key.
 * </p>
 * @return string|null the string value of the parameter at <i>key</i>;
 * returns <b>NULL</b> if parameter does not exist.
 */
function svn_auth_get_parameter($key) {}

/**
 * (PECL svn &gt;= 0.1.0)<br/>
 * Returns the version of the SVN client libraries
 * @link https://php.net/manual/en/function.svn-client-version.php
 * @return string String version number, usually in form of x.y.z.
 */
function svn_client_version() {}

function svn_config_ensure() {}

/**
 * (PECL svn &gt;= 0.1.0)<br/>
 * Recursively diffs two paths
 * @link https://php.net/manual/en/function.svn-diff.php
 * @param string $path1 <p>
 * First path to diff. This can be a URL to a file/directory in an SVN
 * repository or a local file/directory path.
 * </p>
 * Relative paths will be resolved as if the current working directory was the one that contains the PHP binary. To use the calling script&#x00027;s working directory, use <b>realpath</b> or dirname(__FILE__).
 * If a local file path has only backslashes and no forward slashes,
 * this extension will fail to find the path. Always
 * replace all backslashes with forward slashes when using this
 * function.
 * @param int $rev1 <p>
 * First path's revision number. Use <b>SVN_REVISION_HEAD</b>
 * to specify the most recent revision.
 * </p>
 * @param string $path2 <p>
 * Second path to diff. See <i>path1</i> for description.
 * </p>
 * @param int $rev2 <p>
 * Second path's revision number. See <i>rev1</i>
 * for description.
 * </p>
 * @return array an array-list consisting of two streams: the first is the diff output
 * and the second contains error stream output. The streams can be
 * read using <b>fread</b>. Returns <b>FALSE</b> or <b>NULL</b> on
 * error.
 * </p>
 * <p>
 * The diff output will, by default, be in the form of Subversion's
 * custom unified diff format, but an
 * external
 * diff engine may be
 * used depending on Subversion's configuration.
 */
function svn_diff($path1, $rev1, $path2, $rev2) {}

/**
 * (PECL svn &gt;= 0.1.0)<br/>
 * Recursively cleanup a working copy directory, finishing incomplete operations and removing locks
 * @link https://php.net/manual/en/function.svn-cleanup.php
 * @param string $workingdir <p>
 * String path to local working directory to cleanup
 * </p>
 * Relative paths will be resolved as if the current working directory was the one that contains the PHP binary. To use the calling script&#x00027;s working directory, use <b>realpath</b> or dirname(__FILE__).
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function svn_cleanup($workingdir) {}

/**
 * (PECL svn &gt;= 0.3.0)<br/>
 * Revert changes to the working copy
 * @link https://php.net/manual/en/function.svn-revert.php
 * @param string $path <p>
 * The path to the working repository.
 * </p>
 * @param bool $recursive [optional] <p>
 * Optionally make recursive changes.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function svn_revert($path, $recursive = false) {}

function svn_resolved() {}

/**
 * (PECL svn &gt;= 0.1.0)<br/>
 * Sends changes from the local working copy to the repository
 * @link https://php.net/manual/en/function.svn-commit.php
 * @param string $log <p>
 * String log text to commit
 * </p>
 * @param array $targets <p>
 * Array of local paths of files to be committed
 * </p>
 * This parameter must be an array, a string for a single
 * target is not acceptable.
 * Relative paths will be resolved as if the current working directory was the one that contains the PHP binary. To use the calling script&#x00027;s working directory, use <b>realpath</b> or dirname(__FILE__).
 * @param bool $recursive [optional] <p>
 * Boolean flag to disable recursive committing of
 * directories in the <i>targets</i> array.
 * Default is <b>TRUE</b>.
 * </p>
 * @return array array in form of:
 * <pre>
 * array(
 * 0 => integer revision number of commit
 * 1 => string ISO 8601 date and time of commit
 * 2 => name of committer
 * )
 * </pre>
 * <p>
 * Returns <b>FALSE</b> on failure.
 * </p>
 */
function svn_commit($log, array $targets, $recursive = true) {}

function svn_lock() {}

function svn_unlock() {}

/**
 * (PECL svn &gt;= 0.1.0)<br/>
 * Schedules the addition of an item in a working directory
 * @link https://php.net/manual/en/function.svn-add.php
 * @param string $path <p>
 * Path of item to add.
 * </p>
 * Relative paths will be resolved as if the current working directory was the one that contains the PHP binary. To use the calling script&#x00027;s working directory, use <b>realpath</b> or dirname(__FILE__).
 * @param bool $recursive [optional] <p>
 * If item is directory, whether or not to recursively add
 * all of its contents. Default is <b>TRUE</b>
 * </p>
 * @param bool $force [optional] <p>
 * If true, Subversion will recurse into already versioned directories
 * in order to add unversioned files that may be hiding in those
 * directories. Default is <b>FALSE</b>
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function svn_add($path, $recursive = true, $force = false) {}

/**
 * (PECL svn &gt;= 0.1.0)<br/>
 * Returns the status of working copy files and directories
 * @link https://php.net/manual/en/function.svn-status.php
 * @param string $path <p>
 * Local path to file or directory to retrieve status of.
 * </p>
 * Relative paths will be resolved as if the current working directory was the one that contains the PHP binary. To use the calling script&#x00027;s working directory, use <b>realpath</b> or dirname(__FILE__).
 * @param int $flags [optional] <p>
 * Any combination of <b>SVN_NON_RECURSIVE</b>,
 * <b>SVN_ALL</b> (regardless of modification status),
 * <b>SVN_SHOW_UPDATES</b> (entries will be added for items
 * that are out-of-date), <b>SVN_NO_IGNORE</b> (disregard
 * svn:ignore properties when scanning for new files)
 * and <b>SVN_IGNORE_EXTERNALS</b>.
 * </p>
 * @return array a numerically indexed array of associative arrays detailing
 * the status of items in the repository:
 * </p>
 * <pre>
 * Array (
 * [0] => Array (
 * // information on item
 * )
 * [1] => ...
 * )
 * </pre>
 * <p>
 * The information on the item is an associative array that can contain
 * the following keys:
 * </p>
 * path
 * String path to file/directory of this entry on local filesystem.
 * text_status
 * Status of item's text. Refer to status constants for possible values.
 * repos_text_status
 * Status of item's text in repository. Only accurate if
 * <i>update</i> was set to <b>TRUE</b>.
 * Refer to status constants for possible values.
 * prop_status
 * Status of item's properties. Refer to status constants for possible values.
 * repos_prop_status
 * Status of item's property in repository. Only accurate if
 * <i>update</i> was set to <b>TRUE</b>. Refer to status constants for possible values.
 * locked
 * Whether or not the item is locked. (Only set if <b>TRUE</b>.)
 * copied
 * Whether or not the item was copied (scheduled for addition with
 * history). (Only set if <b>TRUE</b>.)
 * switched
 * Whether or not the item was switched using the switch command.
 * (Only set if <b>TRUE</b>)
 * <p>
 * These keys are only set if the item is versioned:
 * </p>
 * name
 * Base name of item in repository.
 * url
 * URL of item in repository.
 * repos
 * Base URL of repository.
 * revision
 * Integer revision of item in working copy.
 * kind
 * Type of item, i.e. file or directory. Refer to type constants for possible values.
 * schedule
 * Scheduled action for item, i.e. addition or deletion. Constants
 * for these magic numbers are not available, they can
 * be emulated by using:
 * <code>
 * if (!defined('svn_wc_schedule_normal')) {
 * define('svn_wc_schedule_normal', 0); // nothing special
 * define('svn_wc_schedule_add', 1); // item will be added
 * define('svn_wc_schedule_delete', 2); // item will be deleted
 * define('svn_wc_schedule_replace', 3); // item will be added and deleted
 * }
 * </code>
 * deleted
 * Whether or not the item was deleted, but parent revision lags
 * behind. (Only set if <b>TRUE</b>.)
 * absent
 * Whether or not the item is absent, that is, Subversion knows that
 * there should be something there but there isn't. (Only set if
 * <b>TRUE</b>.)
 * incomplete
 * Whether or not the entries file for a directory is incomplete.
 * (Only set if <b>TRUE</b>.)
 * cmt_date
 * Integer Unix timestamp of last commit date. (Unaffected by <i>update</i>.)
 * cmt_rev
 * Integer revision of last commit. (Unaffected by <i>update</i>.)
 * cmt_author
 * String author of last commit. (Unaffected by <i>update
 */
function svn_status($path, $flags = 0) {}

/**
 * (PECL svn &gt;= 0.1.0)<br/>
 * Update working copy
 * @link https://php.net/manual/en/function.svn-update.php
 * @param string $path <p>
 * Path to local working copy.
 * </p>
 * Relative paths will be resolved as if the current working directory was the one that contains the PHP binary. To use the calling script&#x00027;s working directory, use <b>realpath</b> or dirname(__FILE__).
 * @param int $revno [optional] <p>
 * Revision number to update to, default is <b>SVN_REVISION_HEAD</b>.
 * </p>
 * @param bool $recurse [optional] <p>
 * Whether or not to recursively update directories.
 * </p>
 * @return int|false new revision number on success, returns <b>FALSE</b> on failure.
 */
function svn_update($path, $revno = SVN_REVISION_HEAD, $recurse = true) {}

/**
 * (PECL svn &gt;= 0.2.0)<br/>
 * Imports an unversioned path into a repository
 * @link https://php.net/manual/en/function.svn-import.php
 * @param string $path <p>
 * Path of file or directory to import.
 * </p>
 * Relative paths will be resolved as if the current working directory was the one that contains the PHP binary. To use the calling script&#x00027;s working directory, use <b>realpath</b> or dirname(__FILE__).
 * @param string $url <p>
 * Repository URL to import into.
 * </p>
 * @param bool $nonrecursive <p>
 * Whether or not to refrain from recursively processing directories.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function svn_import($path, $url, $nonrecursive) {}

function svn_info() {}

/**
 * (PECL svn &gt;= 0.3.0)<br/>
 * Export the contents of a SVN directory
 * @link https://php.net/manual/en/function.svn-export.php
 * @param string $frompath <p>
 * The path to the current repository.
 * </p>
 * @param string $topath <p>
 * The path to the new repository.
 * </p>
 * @param bool $working_copy [optional] <p>
 * If <b>TRUE</b>, it will export uncommitted files from the working copy.
 * </p>
 * @param int $revision_no [optional]
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function svn_export($frompath, $topath, $working_copy = true, $revision_no = -1) {}

function svn_copy() {}

function svn_switch() {}

/**
 * (PECL svn &gt;= 0.3.0)<br/>
 * Get the SVN blame for a file
 * @link https://php.net/manual/en/function.svn-blame.php
 * @param string $repository_url <p>
 * The repository URL.
 * </p>
 * @param int $revision_no [optional] <p>
 * The revision number.
 * </p>
 * @return array An array of SVN blame information separated by line
 * which includes the revision number, line number, line of code,
 * author, and date.
 */
function svn_blame($repository_url, $revision_no = SVN_REVISION_HEAD) {}

/**
 * (PECL svn &gt;= 0.4.0)<br/>
 * Delete items from a working copy or repository.
 * @link https://php.net/manual/en/function.svn-delete.php
 * @param string $path <p>
 * Path of item to delete.
 * </p>
 * Relative paths will be resolved as if the current working directory was the one that contains the PHP binary. To use the calling script&#x00027;s working directory, use <b>realpath</b> or dirname(__FILE__).
 * @param bool $force [optional] <p>
 * If <b>TRUE</b>, the file will be deleted even if it has local modifications.
 * Otherwise, local modifications will result in a failure. Default is
 * <b>FALSE</b>
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function svn_delete($path, $force = false) {}

/**
 * (PECL svn &gt;= 0.4.0)<br/>
 * Creates a directory in a working copy or repository
 * @link https://php.net/manual/en/function.svn-mkdir.php
 * @param string $path <p>
 * The path to the working copy or repository.
 * </p>
 * @param string $log_message [optional]
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function svn_mkdir($path, $log_message = null) {}

/**
 * @link https://php.net/manual/en/ref.svn.php
 * @param string $src_path
 * @param string $dst_path
 * @param bool $force [optional]
 * @return mixed
 */
function svn_move($src_path, $dst_path, $force = false) {}

/**
 * @link https://php.net/manual/en/ref.svn.php
 * @param string $path
 * @param bool $recurse [optional]
 * @param int $revision [optional]
 * @return mixed
 */
function svn_proplist($path, $recurse = false, $revision) {}

/**
 * @param string $path
 * @param string $property_name
 * @param bool $recurse [optional]
 * @param int $revision [optional]
 * @return mixed
 */
function svn_propget($path, $property_name, $recurse = false, $revision) {}

/**
 * (PECL svn &gt;= 0.1.0)<br/>
 * Create a new subversion repository at path
 * @link https://php.net/manual/en/function.svn-repos-create.php
 * @param string $path <p>
 * Its description
 * </p>
 * @param null|array $config [optional] <p>
 * Its description
 * </p>
 * @param null|array $fsconfig [optional] <p>
 * Its description
 * </p>
 * @return resource What the function returns, first on success, then on failure.
 */
function svn_repos_create($path, ?array $config = null, ?array $fsconfig = null) {}

/**
 * (PECL svn &gt;= 0.1.0)<br/>
 * Run recovery procedures on the repository located at path.
 * @link https://php.net/manual/en/function.svn-repos-recover.php
 * @param string $path <p>
 * Its description
 * </p>
 * @return bool What the function returns, first on success, then on failure.
 */
function svn_repos_recover($path) {}

/**
 * (PECL svn &gt;= 0.1.0)<br/>
 * Make a hot-copy of the repos at repospath; copy it to destpath
 * @link https://php.net/manual/en/function.svn-repos-hotcopy.php
 * @param string $repospath <p>
 * Its description
 * </p>
 * @param string $destpath <p>
 * Its description
 * </p>
 * @param bool $cleanlogs <p>
 * Its description
 * </p>
 * @return bool What the function returns, first on success, then on failure.
 */
function svn_repos_hotcopy($repospath, $destpath, $cleanlogs) {}

/**
 * (PECL svn &gt;= 0.1.0)<br/>
 * Open a shared lock on a repository.
 * @link https://php.net/manual/en/function.svn-repos-open.php
 * @param string $path <p>
 * Its description
 * </p>
 * @return resource What the function returns, first on success, then on failure.
 */
function svn_repos_open($path) {}

/**
 * (PECL svn &gt;= 0.1.0)<br/>
 * Gets a handle on the filesystem for a repository
 * @link https://php.net/manual/en/function.svn-repos-fs.php
 * @param resource $repos <p>
 * Its description
 * </p>
 * @return resource What the function returns, first on success, then on failure.
 */
function svn_repos_fs($repos) {}

/**
 * (PECL svn &gt;= 0.2.0)<br/>
 * Create a new transaction
 * @link https://php.net/manual/en/function.svn-repos-fs-begin-txn-for-commit.php
 * @param resource $repos <p>
 * Its description
 * </p>
 * @param int $rev <p>
 * Its description
 * </p>
 * @param string $author <p>
 * Its description
 * </p>
 * @param string $log_msg <p>
 * Its description
 * </p>
 * @return resource What the function returns, first on success, then on failure.
 */
function svn_repos_fs_begin_txn_for_commit($repos, $rev, $author, $log_msg) {}

/**
 * (PECL svn &gt;= 0.2.0)<br/>
 * Commits a transaction and returns the new revision
 * @link https://php.net/manual/en/function.svn-repos-fs-commit-txn.php
 * @param resource $txn <p>
 * Its description
 * </p>
 * @return int What the function returns, first on success, then on failure.
 */
function svn_repos_fs_commit_txn($txn) {}

/**
 * (PECL svn &gt;= 0.1.0)<br/>
 * Get a handle on a specific version of the repository root
 * @link https://php.net/manual/en/function.svn-fs-revision-root.php
 * @param resource $fs <p>
 * Its description
 * </p>
 * @param int $revnum <p>
 * Its description
 * </p>
 * @return resource What the function returns, first on success, then on failure.
 */
function svn_fs_revision_root($fs, $revnum) {}

/**
 * (PECL svn &gt;= 0.1.0)<br/>
 * Determines what kind of item lives at path in a given repository fsroot
 * @link https://php.net/manual/en/function.svn-fs-check-path.php
 * @param resource $fsroot <p>
 * Its description
 * </p>
 * @param string $path <p>
 * Its description
 * </p>
 * @return int What the function returns, first on success, then on failure.
 */
function svn_fs_check_path($fsroot, $path) {}

/**
 * (PECL svn &gt;= 0.1.0)<br/>
 * Fetches the value of a named property
 * @link https://php.net/manual/en/function.svn-fs-revision-prop.php
 * @param resource $fs <p>
 * Its description
 * </p>
 * @param int $revnum <p>
 * Its description
 * </p>
 * @param string $propname <p>
 * Its description
 * </p>
 * @return string What the function returns, first on success, then on failure.
 */
function svn_fs_revision_prop($fs, $revnum, $propname) {}

/**
 * (PECL svn &gt;= 0.1.0)<br/>
 * Enumerates the directory entries under path; returns a hash of dir names to file type
 * @link https://php.net/manual/en/function.svn-fs-dir-entries.php
 * @param resource $fsroot <p>
 * Its description
 * </p>
 * @param string $path <p>
 * Its description
 * </p>
 * @return array What the function returns, first on success, then on failure.
 */
function svn_fs_dir_entries($fsroot, $path) {}

/**
 * (PECL svn &gt;= 0.1.0)<br/>
 * Returns the revision in which path under fsroot was created
 * @link https://php.net/manual/en/function.svn-fs-node-created-rev.php
 * @param resource $fsroot <p>
 * Its description
 * </p>
 * @param string $path <p>
 * Its description
 * </p>
 * @return int What the function returns, first on success, then on failure.
 */
function svn_fs_node_created_rev($fsroot, $path) {}

/**
 * (PECL svn &gt;= 0.1.0)<br/>
 * Returns the number of the youngest revision in the filesystem
 * @link https://php.net/manual/en/function.svn-fs-youngest-rev.php
 * @param resource $fs <p>
 * Its description
 * </p>
 * @return int What the function returns, first on success, then on failure.
 */
function svn_fs_youngest_rev($fs) {}

/**
 * (PECL svn &gt;= 0.1.0)<br/>
 * Returns a stream to access the contents of a file from a given version of the fs
 * @link https://php.net/manual/en/function.svn-fs-file-contents.php
 * @param resource $fsroot <p>
 * Its description
 * </p>
 * @param string $path <p>
 * Its description
 * </p>
 * @return resource What the function returns, first on success, then on failure.
 */
function svn_fs_file_contents($fsroot, $path) {}

/**
 * (PECL svn &gt;= 0.1.0)<br/>
 * Returns the length of a file from a given version of the fs
 * @link https://php.net/manual/en/function.svn-fs-file-length.php
 * @param resource $fsroot <p>
 * Its description
 * </p>
 * @param string $path <p>
 * Its description
 * </p>
 * @return int What the function returns, first on success, then on failure.
 */
function svn_fs_file_length($fsroot, $path) {}

/**
 * (PECL svn &gt;= 0.2.0)<br/>
 * Creates and returns a transaction root
 * @link https://php.net/manual/en/function.svn-fs-txn-root.php
 * @param resource $txn <p>
 * Its description
 * </p>
 * @return resource What the function returns, first on success, then on failure.
 */
function svn_fs_txn_root($txn) {}

/**
 * (PECL svn &gt;= 0.2.0)<br/>
 * Creates a new empty file, returns true if all is ok, false otherwise
 * @link https://php.net/manual/en/function.svn-fs-make-file.php
 * @param resource $root <p>
 * Its description
 * </p>
 * @param string $path <p>
 * Its description
 * </p>
 * @return bool What the function returns, first on success, then on failure.
 */
function svn_fs_make_file($root, $path) {}

/**
 * (PECL svn &gt;= 0.2.0)<br/>
 * Creates a new empty directory, returns true if all is ok, false otherwise
 * @link https://php.net/manual/en/function.svn-fs-make-dir.php
 * @param resource $root <p>
 * Its description
 * </p>
 * @param string $path <p>
 * Its description
 * </p>
 * @return bool What the function returns, first on success, then on failure.
 */
function svn_fs_make_dir($root, $path) {}

/**
 * (PECL svn &gt;= 0.2.0)<br/>
 * Creates and returns a stream that will be used to replace
 * @link https://php.net/manual/en/function.svn-fs-apply-text.php
 * @param resource $root <p>
 * Its description
 * </p>
 * @param string $path <p>
 * Its description
 * </p>
 * @return resource What the function returns, first on success, then on failure.
 */
function svn_fs_apply_text($root, $path) {}

/**
 * (PECL svn &gt;= 0.2.0)<br/>
 * Copies a file or a directory, returns true if all is ok, false otherwise
 * @link https://php.net/manual/en/function.svn-fs-copy.php
 * @param resource $from_root <p>
 * Its description
 * </p>
 * @param string $from_path <p>
 * Its description
 * </p>
 * @param resource $to_root <p>
 * Its description
 * </p>
 * @param string $to_path <p>
 * Its description
 * </p>
 * @return bool What the function returns, first on success, then on failure.
 */
function svn_fs_copy($from_root, $from_path, $to_root, $to_path) {}

/**
 * (PECL svn &gt;= 0.2.0)<br/>
 * Deletes a file or a directory, return true if all is ok, false otherwise
 * @link https://php.net/manual/en/function.svn-fs-delete.php
 * @param resource $root <p>
 * Its description
 * </p>
 * @param string $path <p>
 * Its description
 * </p>
 * @return bool What the function returns, first on success, then on failure.
 */
function svn_fs_delete($root, $path) {}

/**
 * (PECL svn &gt;= 0.2.0)<br/>
 * Create a new transaction
 * @link https://php.net/manual/en/function.svn-fs-begin-txn2.php
 * @param resource $repos <p>
 * Its description
 * </p>
 * @param int $rev <p>
 * Its description
 * </p>
 * @return resource What the function returns, first on success, then on failure.
 */
function svn_fs_begin_txn2($repos, $rev) {}

/**
 * (PECL svn &gt;= 0.2.0)<br/>
 * Return true if the path points to a directory, false otherwise
 * @link https://php.net/manual/en/function.svn-fs-is-dir.php
 * @param resource $root <p>
 * Its description
 * </p>
 * @param string $path <p>
 * Its description
 * </p>
 * @return bool What the function returns, first on success, then on failure.
 */
function svn_fs_is_dir($root, $path) {}

/**
 * (PECL svn &gt;= 0.2.0)<br/>
 * Return true if the path points to a file, false otherwise
 * @link https://php.net/manual/en/function.svn-fs-is-file.php
 * @param resource $root <p>
 * Its description
 * </p>
 * @param string $path <p>
 * Its description
 * </p>
 * @return bool What the function returns, first on success, then on failure.
 */
function svn_fs_is_file($root, $path) {}

/**
 * (PECL svn &gt;= 0.1.0)<br/>
 * Returns the value of a property for a node
 * @link https://php.net/manual/en/function.svn-fs-node-prop.php
 * @param resource $fsroot <p>
 * Its description
 * </p>
 * @param string $path <p>
 * Its description
 * </p>
 * @param string $propname <p>
 * Its description
 * </p>
 * @return string What the function returns, first on success, then on failure.
 */
function svn_fs_node_prop($fsroot, $path, $propname) {}

/**
 * (PECL svn &gt;= 0.2.0)<br/>
 * Return true if everything is ok, false otherwise
 * @link https://php.net/manual/en/function.svn-fs-change-node-prop.php
 * @param resource $root <p>
 * Its description
 * </p>
 * @param string $path <p>
 * Its description
 * </p>
 * @param string $name <p>
 * Its description
 * </p>
 * @param string $value <p>
 * Its description
 * </p>
 * @return bool What the function returns, first on success, then on failure.
 */
function svn_fs_change_node_prop($root, $path, $name, $value) {}

/**
 * (PECL svn &gt;= 0.2.0)<br/>
 * Return true if content is different, false otherwise
 * @link https://php.net/manual/en/function.svn-fs-contents-changed.php
 * @param resource $root1 <p>
 * Its description
 * </p>
 * @param string $path1 <p>
 * Its description
 * </p>
 * @param resource $root2 <p>
 * Its description
 * </p>
 * @param string $path2 <p>
 * Its description
 * </p>
 * @return bool What the function returns, first on success, then on failure.
 */
function svn_fs_contents_changed($root1, $path1, $root2, $path2) {}

/**
 * (PECL svn &gt;= 0.2.0)<br/>
 * Return true if props are different, false otherwise
 * @link https://php.net/manual/en/function.svn-fs-props-changed.php
 * @param resource $root1 <p>
 * Its description
 * </p>
 * @param string $path1 <p>
 * Its description
 * </p>
 * @param resource $root2 <p>
 * Its description
 * </p>
 * @param string $path2 <p>
 * Its description
 * </p>
 * @return bool What the function returns, first on success, then on failure.
 */
function svn_fs_props_changed($root1, $path1, $root2, $path2) {}

/**
 * (PECL svn &gt;= 0.2.0)<br/>
 * Abort a transaction, returns true if everything is okay, false otherwise
 * @link https://php.net/manual/en/function.svn-fs-abort-txn.php
 * @param resource $txn <p>
 * Its description
 * </p>
 * @return bool What the function returns, first on success, then on failure.
 */
function svn_fs_abort_txn($txn) {}

/**
 * Property for default username to use when performing basic authentication
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_AUTH_PARAM_DEFAULT_USERNAME', "svn:auth:username");

/**
 * Property for default password to use when performing basic authentication
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_AUTH_PARAM_DEFAULT_PASSWORD', "svn:auth:password");
define('SVN_AUTH_PARAM_NON_INTERACTIVE', "svn:auth:non-interactive");
define('SVN_AUTH_PARAM_DONT_STORE_PASSWORDS', "svn:auth:dont-store-passwords");
define('SVN_AUTH_PARAM_NO_AUTH_CACHE', "svn:auth:no-auth-cache");
define('SVN_AUTH_PARAM_SSL_SERVER_FAILURES', "svn:auth:ssl:failures");
define('SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO', "svn:auth:ssl:cert-info");
define('SVN_AUTH_PARAM_CONFIG', "svn:auth:config-category-servers");
define('SVN_AUTH_PARAM_SERVER_GROUP', "svn:auth:server-group");
define('SVN_AUTH_PARAM_CONFIG_DIR', "svn:auth:config-dir");

/**
 * Custom property for ignoring SSL cert verification errors
 * @link https://php.net/manual/en/svn.constants.php
 */
define('PHP_SVN_AUTH_PARAM_IGNORE_SSL_VERIFY_ERRORS', "php:svn:auth:ignore-ssl-verify-errors");

/**
 * Configuration key that determines filesystem type
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_FS_CONFIG_FS_TYPE', "fs-type");

/**
 * Filesystem is Berkeley-DB implementation
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_FS_TYPE_BDB', "bdb");

/**
 * Filesystem is native-filesystem implementation
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_FS_TYPE_FSFS', "fsfs");

/**
 * svn:date
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_PROP_REVISION_DATE', "svn:date");

/**
 * svn:original-date
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_PROP_REVISION_ORIG_DATE', "svn:original-date");

/**
 * svn:author
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_PROP_REVISION_AUTHOR', "svn:author");

/**
 * svn:log
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_PROP_REVISION_LOG', "svn:log");
define('SVN_REVISION_INITIAL', 1);

/**
 * Magic number (-1) specifying the HEAD revision
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_REVISION_HEAD', -1);
define('SVN_REVISION_BASE', -2);
define('SVN_REVISION_COMMITTED', -3);
define('SVN_REVISION_PREV', -4);
define('SVN_REVISION_UNSPECIFIED', -5);
define('SVN_NON_RECURSIVE', 1);
define('SVN_DISCOVER_CHANGED_PATHS', 2);
define('SVN_OMIT_MESSAGES', 4);
define('SVN_STOP_ON_COPY', 8);
define('SVN_ALL', 16);
define('SVN_SHOW_UPDATES', 32);
define('SVN_NO_IGNORE', 64);

/**
 * Status does not exist
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_WC_STATUS_NONE', 1);

/**
 * Item is not versioned in working copy
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_WC_STATUS_UNVERSIONED', 2);

/**
 * Item exists, nothing else is happening
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_WC_STATUS_NORMAL', 3);

/**
 * Item is scheduled for addition
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_WC_STATUS_ADDED', 4);

/**
 * Item is versioned but missing from the working copy
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_WC_STATUS_MISSING', 5);

/**
 * Item is scheduled for deletion
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_WC_STATUS_DELETED', 6);

/**
 * Item was deleted and then re-added
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_WC_STATUS_REPLACED', 7);

/**
 * Item (text or properties) was modified
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_WC_STATUS_MODIFIED', 8);

/**
 * Item's local modifications were merged with repository modifications
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_WC_STATUS_MERGED', 9);

/**
 * Item's local modifications conflicted with repository modifications
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_WC_STATUS_CONFLICTED', 10);

/**
 * Item is unversioned but configured to be ignored
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_WC_STATUS_IGNORED', 11);

/**
 * Unversioned item is in the way of a versioned resource
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_WC_STATUS_OBSTRUCTED', 12);

/**
 * Unversioned path that is populated using svn:externals
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_WC_STATUS_EXTERNAL', 13);

/**
 * Directory does not contain complete entries list
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_WC_STATUS_INCOMPLETE', 14);

/**
 * Absent
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_NODE_NONE', 0);

/**
 * File
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_NODE_FILE', 1);

/**
 * Directory
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_NODE_DIR', 2);

/**
 * Something Subversion cannot identify
 * @link https://php.net/manual/en/svn.constants.php
 */
define('SVN_NODE_UNKNOWN', 3);
define('SVN_WC_SCHEDULE_NORMAL', 0);
define('SVN_WC_SCHEDULE_ADD', 1);
define('SVN_WC_SCHEDULE_DELETE', 2);
define('SVN_WC_SCHEDULE_REPLACE', 3);
<?php

// Start of memcache v.3.0.8

class MemcachePool
{
    /**
     * (PECL memcache &gt;= 0.2.0)<br/>
     * Open memcached server connection
     * @link https://php.net/manual/en/memcache.connect.php
     * @param string $host <p>
     * Point to the host where memcached is listening for connections. This parameter
     * may also specify other transports like <em>unix:///path/to/memcached.sock</em>
     * to use UNIX domain sockets, in this case <b>port</b> must also
     * be set to <em>0</em>.
     * </p>
     * @param int $port [optional] <p>
     * Point to the port where memcached is listening for connections. Set this
     * parameter to <em>0</em> when using UNIX domain sockets.
     * </p>
     * <p>
     * Please note: <b>port</b> defaults to
     * {@link https://php.net/manual/en/memcache.ini.php#ini.memcache.default-port memcache.default_port}
     * if not specified. For this reason it is wise to specify the port
     * explicitly in this method call.
     * </p>
     * @param int $timeout [optional] <p>Value in seconds which will be used for connecting to the daemon. Think twice before changing the default value of 1 second - you can lose all the advantages of caching if your connection is too slow.</p>
     * @return bool <p>Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.</p>
     */
    public function connect($host, $port, $timeout = 1) {}

    /**
     * (PECL memcache &gt;= 2.0.0)<br/>
     * Add a memcached server to connection pool
     * @link https://php.net/manual/en/memcache.addserver.php
     * @param string $host <p>
     * Point to the host where memcached is listening for connections. This parameter
     * may also specify other transports like unix:///path/to/memcached.sock
     * to use UNIX domain sockets, in this case <i>port</i> must also
     * be set to 0.
     * </p>
     * @param int $port [optional] <p>
     * Point to the port where memcached is listening for connections.
     * Set this
     * parameter to 0 when using UNIX domain sockets.
     * </p>
     * <p>
     * Please note: <i>port</i> defaults to
     * memcache.default_port
     * if not specified. For this reason it is wise to specify the port
     * explicitly in this method call.
     * </p>
     * @param bool $persistent [optional] <p>
     * Controls the use of a persistent connection. Default to <b>TRUE</b>.
     * </p>
     * @param int $weight [optional] <p>
     * Number of buckets to create for this server which in turn control its
     * probability of it being selected. The probability is relative to the
     * total weight of all servers.
     * </p>
     * @param int $timeout [optional] <p>
     * Value in seconds which will be used for connecting to the daemon. Think
     * twice before changing the default value of 1 second - you can lose all
     * the advantages of caching if your connection is too slow.
     * </p>
     * @param int $retry_interval [optional] <p>
     * Controls how often a failed server will be retried, the default value
     * is 15 seconds. Setting this parameter to -1 disables automatic retry.
     * Neither this nor the <i>persistent</i> parameter has any
     * effect when the extension is loaded dynamically via <b>dl</b>.
     * </p>
     * <p>
     * Each failed connection struct has its own timeout and before it has expired
     * the struct will be skipped when selecting backends to serve a request. Once
     * expired the connection will be successfully reconnected or marked as failed
     * for another <i>retry_interval</i> seconds. The typical
     * effect is that each web server child will retry the connection about every
     * <i>retry_interval</i> seconds when serving a page.
     * </p>
     * @param bool $status [optional] <p>
     * Controls if the server should be flagged as online. Setting this parameter
     * to <b>FALSE</b> and <i>retry_interval</i> to -1 allows a failed
     * server to be kept in the pool so as not to affect the key distribution
     * algorithm. Requests for this server will then failover or fail immediately
     * depending on the <i>memcache.allow_failover</i> setting.
     * Default to <b>TRUE</b>, meaning the server should be considered online.
     * </p>
     * @param callable $failure_callback [optional] <p>
     * Allows the user to specify a callback function to run upon encountering an
     * error. The callback is run before failover is attempted. The function takes
     * two parameters, the hostname and port of the failed server.
     * </p>
     * @param int $timeoutms [optional] <p>
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function addServer($host, $port = 11211, $persistent = true, $weight = null, $timeout = 1, $retry_interval = 15, $status = true, callable $failure_callback = null, $timeoutms = null) {}

    /**
     * (PECL memcache &gt;= 2.1.0)<br/>
     * Changes server parameters and status at runtime
     * @link https://secure.php.net/manual/en/memcache.setserverparams.php
     * @param string $host <p>Point to the host where memcached is listening for connections.</p>.
     * @param int $port [optional] <p>
     * Point to the port where memcached is listening for connections.
     * </p>
     * @param int $timeout [optional] <p>
     * Value in seconds which will be used for connecting to the daemon. Think twice before changing the default value of 1 second - you can lose all the advantages of caching if your connection is too slow.
     * </p>
     * @param int $retry_interval [optional] <p>
     * Controls how often a failed server will be retried, the default value
     * is 15 seconds. Setting this parameter to -1 disables automatic retry.
     * Neither this nor the <b>persistent</b> parameter has any
     * effect when the extension is loaded dynamically via {@link https://secure.php.net/manual/en/function.dl.php dl()}.
     * </p>
     * @param bool $status [optional] <p>
     * Controls if the server should be flagged as online. Setting this parameter
     * to <b>FALSE</b> and <b>retry_interval</b> to -1 allows a failed
     * server to be kept in the pool so as not to affect the key distribution
     * algorithm. Requests for this server will then failover or fail immediately
     * depending on the <b>memcache.allow_failover</b> setting.
     * Default to <b>TRUE</b>, meaning the server should be considered online.
     * </p>
     * @param callable $failure_callback [optional] <p>
     * Allows the user to specify a callback function to run upon encountering an error. The callback is run before failover is attempted.
     * The function takes two parameters, the hostname and port of the failed server.
     * </p>
     * @return bool <p>Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.</p>
     */
    public function setServerParams($host, $port = 11211, $timeout = 1, $retry_interval = 15, $status = true, callable $failure_callback = null) {}

    public function setFailureCallback() {}

    /**
     * (PECL memcache &gt;= 2.1.0)<br/>
     * Returns server status
     * @link https://php.net/manual/en/memcache.getserverstatus.php
     * @param string $host Point to the host where memcached is listening for connections.
     * @param int $port Point to the port where memcached is listening for connections.
     * @return int Returns a the servers status. 0 if server is failed, non-zero otherwise
     */
    public function getServerStatus($host, $port = 11211) {}

    public function findServer() {}

    /**
     * (PECL memcache &gt;= 0.2.0)<br/>
     * Return version of the server
     * @link https://php.net/manual/en/memcache.getversion.php
     * @return string|false Returns a string of server version number or <b>FALSE</b> on failure.
     */
    public function getVersion() {}

    /**
     * (PECL memcache &gt;= 2.0.0)<br/>
     * Add an item to the server. If the key already exists, the value will not be added and <b>FALSE</b> will be returned.
     * @link https://php.net/manual/en/memcache.add.php
     * @param string $key The key that will be associated with the item.
     * @param mixed $var The variable to store. Strings and integers are stored as is, other types are stored serialized.
     * @param int $flag [optional] <p>
     * Use <b>MEMCACHE_COMPRESSED</b> to store the item
     * compressed (uses zlib).
     * </p>
     * @param int $expire [optional] <p>Expiration time of the item.
     * If it's equal to zero, the item will never expire.
     * You can also use Unix timestamp or a number of seconds starting from current time, but in the latter case the number of seconds may not exceed 2592000 (30 days).</p>
     * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. Returns <b>FALSE</b> if such key already exist. For the rest Memcache::add() behaves similarly to Memcache::set().
     */
    public function add($key, $var, $flag = null, $expire = null) {}

    /**
     * (PECL memcache &gt;= 0.2.0)<br/>
     * Stores an item var with key on the memcached server. Parameter expire is expiration time in seconds.
     * If it's 0, the item never expires (but memcached server doesn't guarantee this item to be stored all the time,
     * it could be deleted from the cache to make place for other items).
     * You can use MEMCACHE_COMPRESSED constant as flag value if you want to use on-the-fly compression (uses zlib).
     * @link https://php.net/manual/en/memcache.set.php
     * @param string $key The key that will be associated with the item.
     * @param mixed $var The variable to store. Strings and integers are stored as is, other types are stored serialized.
     * @param int $flag [optional] Use MEMCACHE_COMPRESSED to store the item compressed (uses zlib).
     * @param int $expire [optional] Expiration time of the item. If it's equal to zero, the item will never expire. You can also use Unix timestamp or a number of seconds starting from current time, but in the latter case the number of seconds may not exceed 2592000 (30 days).
     * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function set($key, $var, $flag = null, $expire = null) {}

    /**
     * (PECL memcache &gt;= 0.2.0)<br/>
     * Replace value of the existing item
     * @link https://php.net/manual/en/memcache.replace.php
     * @param string $key <p>The key that will be associated with the item.</p>
     * @param mixed $var <p>The variable to store. Strings and integers are stored as is, other types are stored serialized.</p>
     * @param int $flag [optional] <p>Use <b>MEMCACHE_COMPRESSED</b> to store the item compressed (uses zlib).</p>
     * @param int $expire [optional] <p>Expiration time of the item. If it's equal to zero, the item will never expire. You can also use Unix timestamp or a number of seconds starting from current time, but in the latter case the number of seconds may not exceed 2592000 (30 days).</p>
     * @return bool Returns TRUE on success or FALSE on failure.
     */
    public function replace($key, $var, $flag = null, $expire = null) {}

    public function cas() {}

    public function append() {}

    /**
     * @return string
     */
    public function prepend() {}

    /**
     * (PECL memcache &gt;= 0.2.0)<br/>
     * Retrieve item from the server
     * @link https://php.net/manual/en/memcache.get.php
     * @param string|array $key <p>
     * The key or array of keys to fetch.
     * </p>
     * @param int|array &$flags [optional] <p>
     * If present, flags fetched along with the values will be written to this parameter. These
     * flags are the same as the ones given to for example {@link https://php.net/manual/en/memcache.set.php Memcache::set()}.
     * The lowest byte of the int is reserved for pecl/memcache internal usage (e.g. to indicate
     * compression and serialization status).
     * </p>
     * @return string|array|false <p>
     * Returns the string associated with the <b>key</b> or
     * an array of found key-value pairs when <b>key</b> is an {@link https://php.net/manual/en/language.types.array.php array}.
     * Returns <b>FALSE</b> on failure, <b>key</b> is not found or
     * <b>key</b> is an empty {@link https://php.net/manual/en/language.types.array.php array}.
     * </p>
     */
    public function get($key, &$flags = null) {}

    /**
     * (PECL memcache &gt;= 0.2.0)<br/>
     * Delete item from the server
     * https://secure.php.net/manual/en/memcache.delete.php
     * @param string $key The key associated with the item to delete.
     * @param int $timeout [optional] This deprecated parameter is not supported, and defaults to 0 seconds. Do not use this parameter.
     * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function delete($key, $timeout = 0) {}

    /**
     * (PECL memcache &gt;= 0.2.0)<br/>
     * Get statistics of the server
     * @link https://php.net/manual/en/memcache.getstats.php
     * @param string $type [optional] <p>
     * The type of statistics to fetch.
     * Valid values are {reset, malloc, maps, cachedump, slabs, items, sizes}.
     * According to the memcached protocol spec these additional arguments "are subject to change for the convenience of memcache developers".</p>
     * @param int $slabid [optional] <p>
     * Used in conjunction with <b>type</b> set to
     * cachedump to identify the slab to dump from. The cachedump
     * command ties up the server and is strictly to be used for
     * debugging purposes.
     * </p>
     * @param int $limit [optional] <p>
     * Used in conjunction with <b>type</b> set to cachedump to limit the number of entries to dump.
     * </p>
     * @return array|false Returns an associative array of server statistics or <b>FALSE</b> on failure.
     */
    public function getStats($type = null, $slabid = null, $limit = 100) {}

    /**
     * (PECL memcache &gt;= 2.0.0)<br/>
     * Get statistics from all servers in pool
     * @link https://php.net/manual/en/memcache.getextendedstats.php
     * @param string $type [optional] <p>The type of statistics to fetch. Valid values are {reset, malloc, maps, cachedump, slabs, items, sizes}. According to the memcached protocol spec these additional arguments "are subject to change for the convenience of memcache developers".</p>
     * @param int $slabid [optional] <p>
     * Used in conjunction with <b>type</b> set to
     * cachedump to identify the slab to dump from. The cachedump
     * command ties up the server and is strictly to be used for
     * debugging purposes.
     * </p>
     * @param int $limit Used in conjunction with type set to cachedump to limit the number of entries to dump.
     * @return array|false Returns a two-dimensional associative array of server statistics or <b>FALSE</b>
     * Returns a two-dimensional associative array of server statistics or <b>FALSE</b>
     * on failure.
     */
    public function getExtendedStats($type = null, $slabid = null, $limit = 100) {}

    /**
     * (PECL memcache &gt;= 2.0.0)<br/>
     * Enable automatic compression of large values
     * @link https://php.net/manual/en/memcache.setcompressthreshold.php
     * @param int $thresold <p>Controls the minimum value length before attempting to compress automatically.</p>
     * @param float $min_saving [optional] <p>Specifies the minimum amount of savings to actually store the value compressed. The supplied value must be between 0 and 1. Default value is 0.2 giving a minimum 20% compression savings.</p>
     * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function setCompressThreshold($thresold, $min_saving = 0.2) {}

    /**
     * (PECL memcache &gt;= 0.2.0)<br/>
     * Increment item's value
     * @link https://php.net/manual/en/memcache.increment.php
     * @param string $key Key of the item to increment.
     * @param int $value [optional] increment the item by <b>value</b>
     * @return int|false Returns new items value on success or <b>FALSE</b> on failure.
     */
    public function increment($key, $value = 1) {}

    /**
     * (PECL memcache &gt;= 0.2.0)<br/>
     * Decrement item's value
     * @link https://php.net/manual/en/memcache.decrement.php
     * @param string $key Key of the item do decrement.
     * @param int $value Decrement the item by <b>value</b>.
     * @return int|false Returns item's new value on success or <b>FALSE</b> on failure.
     */
    public function decrement($key, $value = 1) {}

    /**
     * (PECL memcache &gt;= 0.4.0)<br/>
     * Close memcached server connection
     * @link https://php.net/manual/en/memcache.close.php
     * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function close() {}

    /**
     * (PECL memcache &gt;= 1.0.0)<br/>
     * Flush all existing items at the server
     * @link https://php.net/manual/en/memcache.flush.php
     * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
     */
    public function flush() {}
}

/**
 * Represents a connection to a set of memcache servers.
 * @link https://php.net/manual/en/class.memcache.php
 */
class Memcache extends MemcachePool
{
    /**
     * (PECL memcache &gt;= 0.4.0)<br/>
     * Open memcached server persistent connection
     * @link https://php.net/manual/en/memcache.pconnect.php
     * @param string $host <p>
     * Point to the host where memcached is listening for connections. This parameter
     * may also specify other transports like unix:///path/to/memcached.sock
     * to use UNIX domain sockets, in this case <i>port</i> must also
     * be set to 0.
     * </p>
     * @param int $port [optional] <p>
     * Point to the port where memcached is listening for connections. Set this
     * parameter to 0 when using UNIX domain sockets.
     * </p>
     * @param int $timeout [optional] <p>
     * Value in seconds which will be used for connecting to the daemon. Think
     * twice before changing the default value of 1 second - you can lose all
     * the advantages of caching if your connection is too slow.
     * </p>
     * @return mixed a Memcache object or <b>FALSE</b> on failure.
     */
    public function pconnect($host, $port, $timeout = 1) {}
}

//  string $host [, int $port [, int $timeout ]]

/**
 * (PECL memcache >= 0.2.0)<br/>
 * Memcache::connect — Open memcached server connection
 * @link https://php.net/manual/en/memcache.connect.php
 * @param string $host <p>
 * Point to the host where memcached is listening for connections.
 * This parameter may also specify other transports like
 * unix:///path/to/memcached.sock to use UNIX domain sockets,
 * in this case port must also be set to 0.
 * </p>
 * @param int $port [optional] <p>
 * Point to the port where memcached is listening for connections.
 * Set this parameter to 0 when using UNIX domain sockets.
 * Note:  port defaults to memcache.default_port if not specified.
 * For this reason it is wise to specify the port explicitly in this method call.
 * </p>
 * @param int $timeout [optional] <p>
 * Value in seconds which will be used for connecting to the daemon.
 * </p>
 * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function memcache_connect($host, $port, $timeout = 1) {}

/**
 * (PECL memcache >= 0.4.0)
 * Memcache::pconnect — Open memcached server persistent connection
 *
 * @link https://php.net/manual/en/memcache.pconnect.php#example-5242
 * @param string $host
 * @param int|null $port
 * @param int $timeout
 * @return Memcache
 */
function memcache_pconnect($host, $port = null, $timeout = 1) {}

function memcache_add_server() {}

function memcache_set_server_params() {}

function memcache_set_failure_callback() {}

function memcache_get_server_status() {}

function memcache_get_version() {}

function memcache_add() {}

function memcache_set() {}

function memcache_replace() {}

function memcache_cas() {}

function memcache_append() {}

function memcache_prepend() {}

function memcache_get() {}

function memcache_delete() {}

/**
 * (PECL memcache &gt;= 0.2.0)<br/>
 * Turn debug output on/off
 * @link https://php.net/manual/en/function.memcache-debug.php
 * @param bool $on_off <p>
 * Turns debug output on if equals to <b>TRUE</b>.
 * Turns debug output off if equals to <b>FALSE</b>.
 * </p>
 * @return bool <b>TRUE</b> if PHP was built with --enable-debug option, otherwise
 * returns <b>FALSE</b>.
 */
function memcache_debug($on_off) {}

function memcache_get_stats() {}

function memcache_get_extended_stats() {}

function memcache_set_compress_threshold() {}

function memcache_increment() {}

function memcache_decrement() {}

function memcache_close() {}

function memcache_flush() {}

define('MEMCACHE_COMPRESSED', 2);
define('MEMCACHE_USER1', 65536);
define('MEMCACHE_USER2', 131072);
define('MEMCACHE_USER3', 262144);
define('MEMCACHE_USER4', 524288);
define('MEMCACHE_HAVE_SESSION', 1);

// End of memcache v.3.0.8
<?php

// Start of PECL libevent v.0.0.4

// Libevent documentation:
// http://www.wangafu.net/~nickm/libevent-book/

// PHP Libevent extension documentation:
// https://php.net/libevent

// Event flags

/**
 * This flag indicates an event that becomes active after a timeout elapses.
 *
 * The EV_TIMEOUT flag is ignored when constructing an event: you
 * can either set a timeout when you add the event, or not.  It is
 * set in the 'what' argument to the callback function when a timeout
 * has occurred.
 */
define('EV_TIMEOUT', 1);

/**
 * This flag indicates an event that becomes active when the provided
 * file descriptor is ready for reading.
 */
define('EV_READ', 2);

/**
 * This flag indicates an event that becomes active when the provided
 * file descriptor is ready for writing.
 */
define('EV_WRITE', 4);

/**
 * Used to implement signal detection.
 */
define('EV_SIGNAL', 8);

/**
 * Indicates that the event is persistent.
 *
 * By default, whenever a pending event becomes active
 * (because its fd is ready to read or write, or because its timeout expires),
 * it becomes non-pending right before its callback is executed.
 * Thus, if you want to make the event pending again, you can call event_add()
 * on it again from inside the callback function.
 *
 * If the EV_PERSIST flag is set on an event, however, the event is persistent.
 * This means that event remains pending even when its callback is activated.
 * If you want to make it non-pending from within its callback, you can call
 * event_del() on it.
 *
 * The timeout on a persistent event resets whenever the event's callback runs.
 * Thus, if you have an event with flags EV_READ|EV_PERSIST and a timeout of five
 * seconds, the event will become active:
 *
 * Whenever the socket is ready for reading.
 *
 * Whenever five seconds have passed since the event last became active.
 */
define('EV_PERSIST', 16);

// Event loop modes

/**
 * Event base loop mode.
 * Starts only one iteration of loop.
 *
 * @see event_base_loop
 */
define('EVLOOP_ONCE', 1);

/**
 * Event base loop mode.
 * Not wait for events to trigger, only check whether
 * any events are ready to trigger immediately.
 *
 * @see event_base_loop
 */
define('EVLOOP_NONBLOCK', 2);

// Buffered event error codes (second argument in buffer's error-callback)

/**
 * An event occurred during a read operation on the
 * bufferevent. See the other flags for which event it was.
 */
define('EVBUFFER_READ', 1);

/**
 * An event occurred during a write operation on the bufferevent.
 * See the other flags for which event it was.
 */
define('EVBUFFER_WRITE', 2);

/**
 * We finished a requested connection on the bufferevent.
 */
define('EVBUFFER_EOF', 16);

/**
 * An error occurred during a bufferevent operation. For more information
 * on what the error was, call {@link socket_strerror}().
 */
define('EVBUFFER_ERROR', 32);

/**
 * A timeout expired on the bufferevent.
 */
define('EVBUFFER_TIMEOUT', 64);

/**
 * <p>Create and initialize new event base</p>
 *
 * <p>Returns new event base, which can be used later in {@link event_base_set}(), {@link event_base_loop}() and other functions.</p>
 *
 * @link https://php.net/event_base_new
 *
 * @return resource|false returns valid event base resource on success or FALSE on error.
 */
function event_base_new() {}

/**
 * <p>Destroy event base</p>
 * <p>(PECL libevent >= 0.0.1)</p>
 *
 * <p>Destroys the specified event_base and frees all the resources associated.
 * Note that it's not possible to destroy an event base with events attached to it.</p>
 *
 * @link https://php.net/event_base_free
 *
 * @param resource $event_base Valid event base resource.
 *
 * @return void
 */
function event_base_free($event_base) {}

/**
 * <p>Handle events</p>
 * <p>(PECL libevent >= 0.0.1)</p>
 *
 * <p>Starts event loop for the specified event base.</p>
 *
 * <p>By default, the {@link event_base_loop}() function runs an event_base until
 * there are no more events registered in it. To run the loop, it repeatedly
 * checks whether any of the registered events has triggered (for example,
 * if a read event's file descriptor is ready to read, or if a timeout event's
 * timeout is ready to expire). Once this happens, it marks all triggered events
 * as "active", and starts to run them.
 * </p>
 *
 * <p>You can change the behavior of event_base_loop() by setting one or more flags
 * in its flags argument. If EVLOOP_ONCE is set, then the loop will wait until some
 * events become active, then run active events until there are no more to run, then
 * return. If EVLOOP_NONBLOCK is set, then the loop will not wait for events to trigger:
 * it will only check whether any events are ready to trigger immediately,
 * and run their callbacks if so.
 * </p>
 *
 * @link https://php.net/event_base_loop
 *
 * @param resource $event_base Valid event base resource.
 * @param int $flags [optional] Optional parameter, which can take any combination of EVLOOP_ONCE and EVLOOP_NONBLOCK.
 *
 * @return int <p>
 * Returns 0 if it exited normally,
 * -1 if it exited because of some unhandled error in the backend
 * and 1 if no events were registered.
 * </p>
 */
function event_base_loop($event_base, $flags = null) {}

/**
 * <p>Tells the event_base to exit its loop immediately.</p>
 * <p>(PECL libevent >= 0.0.1)</p>
 *
 * <p>It differs from {@link event_base_loopexit}() in that if the event_base is currently
 * running callbacks for any active events, it will exit immediately after finishing the
 * one it's currently processing. The behaviour is similar to break statement.</p>
 *
 * @link https://php.net/event_base_loopbreak
 *
 * @param resource $event_base Valid event base resource.
 *
 * @return bool returns TRUE on success or FALSE on error.
 */
function event_base_loopbreak($event_base) {}

/**
 * <p>Tells an event_base to stop looping after a given time has elapsed</p>
 * <p>(PECL libevent >= 0.0.1)</p>
 *
 * <p>If the event_base is currently running callbacks for any active events,
 * it will continue running them, and not exit until they have all been run.</p>
 *
 * <p>If event loop isn't running {@link event_base_loopexit}() schedules the next instance
 * of the event loop to stop right after the next round of callbacks are run (as if it had
 * been invoked with EVLOOP_ONCE).</p>
 *
 * @link https://php.net/event_base_loopexit
 *
 * @param resource $event_base <p>
 * Valid event base resource.
 * </p>
 * @param int $timeout [optional] <p>
 * Optional timeout parameter (in microseconds). If lower than 1,
 * the event_base stops looping without a delay.
 * </p>
 *
 * @return bool returns TRUE on success or FALSE on error.
 */
function event_base_loopexit($event_base, $timeout = -1) {}

/**
 * <p>Associate event base with an event</p>
 * <p>(PECL libevent >= 0.0.1)</p>
 *
 * <p>Associates the event_base with the event.</p>
 *
 * @link https://php.net/event_base_set
 *
 * @param resource $event Valid event resource.
 * @param resource $base Valid event base resource.
 *
 * @return bool returns TRUE on success or FALSE on error.
 */
function event_base_set($event, $base) {}

/**
 * <p>Set the number of different event priority levels</p>
 * <p>(PECL libevent >= 0.0.2)</p>
 *
 * <p>By default all events are scheduled with the same priority (npriorities/2).
 * Using {@link event_base_priority_init}() you can change the number of event priority
 * levels and then set a desired priority for each event.</p>
 *
 * @link https://php.net/event_base_priority_init
 *
 * @param resource $event_base Valid event base resource.
 * @param int $npriorities The number of event priority levels.
 *
 * @return bool returns TRUE on success or FALSE on error.
 */
function event_base_priority_init($event_base, $npriorities) {}

/**
 * <p>Creates and returns a new event resource.</p>
 * <p>(PECL libevent >= 0.0.1)</p>
 *
 * @link https://php.net/event_new
 *
 * @return resource|false returns a new event resource on success or FALSE on error.
 */
function event_new() {}

/**
 * <p>Free event resource.</p>
 * <p>(PECL libevent >= 0.0.1)</p>
 *
 * @link https://php.net/event_free
 *
 * @param resource $event Valid event resource.
 *
 * @return void
 */
function event_free($event) {}

/**
 * <p>Add an event to the set of monitored events</p>
 * <p>(PECL libevent >= 0.0.1)</p>
 *
 * <p>Schedules the execution of the non-pending event (makes it pending in it's
 * configured base) when the event specified in {@link event_set}() occurs or in
 * at least the time specified by the timeout argument. If timeout was not specified,
 * not timeout is set. The event must be already initialized by
 * {@link event_set}() and {@link event_base_set}() functions.
 * If the event already has a timeout set,
 * it is replaced by the new one.</p>
 *
 * <p>If you call {@link event_add}() on an event that is already pending,
 * it will leave it pending, and reschedule it with the provided timeout.</p>
 *
 * @link https://php.net/event_add
 *
 * @param resource $event <p>
 * Valid event resource.
 * </p>
 * @param int $timeout [optional] <p>
 * Optional timeout (in microseconds).
 * </p>
 *
 * @return bool returns TRUE on success or FALSE on error.
 */
function event_add($event, $timeout = -1) {}

/**
 * <p>Prepares the event to be used in {@link event_add}().</p>
 * <p>(PECL libevent >= 0.0.1)</p>
 *
 * <p>The event is prepared to call the function specified by the callback
 * on the events specified in parameter events, which is a set of the following
 * flags: EV_TIMEOUT, EV_SIGNAL, EV_READ, EV_WRITE and EV_PERSIST.</p>
 *
 * <p>EV_SIGNAL support was added in version 0.0.4</p>
 *
 * <p>After initializing the event, use {@link event_base_set}() to associate the event with its event base.</p>
 *
 * <p>In case of matching event, these three arguments are passed to the callback function:
 * <table>
 * 	<tr>
 * 		<td><b>$fd</b></td>
 * 		<td>Signal number or resource indicating the stream.</td>
 * 	</tr>
 * 	<tr>
 * 		<td><b>$events</b></td>
 * 		<td>A flag indicating the event. Consists of the following flags: EV_TIMEOUT, EV_SIGNAL, EV_READ, EV_WRITE and EV_PERSIST.</td>
 * 	</tr>
 * 	<tr>
 * 		<td><b>$arg</b></td>
 * 		<td>Optional parameter, previously passed to {@link event_set}() as arg.</td>
 * 	</tr>
 * </table>
 * </p>
 *
 * @link https://php.net/event_set
 *
 * @param resource $event <p>
 * Valid event resource.
 * </p>
 * @param resource|int $fd <p>
 * Valid PHP stream resource. The stream must be castable to file descriptor,
 * so you most likely won't be able to use any of filtered streams.
 * </p>
 * @param int $events <p>
 * A set of flags indicating the desired event, can be EV_READ and/or EV_WRITE.
 * The additional flag EV_PERSIST makes the event to persist until {@link event_del}() is
 * called, otherwise the callback is invoked only once.
 * </p>
 * @param callable $callback <p>
 * Callback function to be called when the matching event occurs.
 * </p>
 * @param mixed $arg [optional] <p>
 * Optional callback parameter.
 * </p>
 *
 * @return bool returns TRUE on success or FALSE on error.
 */
function event_set($event, $fd, $events, $callback, $arg = null) {}

/**
 * <p>Remove an event from the set of monitored events.</p>
 * <p>(PECL libevent >= 0.0.1)</p>
 *
 * <p>Calling {@link event_del}() on an initialized event makes it non-pending
 * and non-active. If the event was not pending or active, there is no effect.</p>
 *
 * @link https://php.net/event_del
 *
 * @param resource $event Valid event resource.
 *
 * @return bool returns TRUE on success or FALSE on error.
 */
function event_del($event) {}

/**
 * <p>Create new buffered event</p>
 * <p>(PECL libevent >= 0.0.1)</p>
 *
 * <p>Libevent provides an abstraction layer on top of the regular event API.
 * Using buffered event you don't need to deal with the I/O manually, instead
 * it provides input and output buffers that get filled and drained automatically.</p>
 *
 * <p>Every bufferevent has two data-related callbacks: a read callback and a write
 * callback. By default, the read callback is called whenever any data is read from
 * the underlying transport, and the write callback is called whenever enough data
 * from the output buffer is emptied to the underlying transport. You can override
 * the behavior of these functions by adjusting the read and write "watermarks"
 * of the bufferevent (see {@link event_buffer_watermark_set}()).</p>
 *
 * <p>A bufferevent also has an "error" or "event" callback that gets invoked to tell
 * the application about non-data-oriented events, like when a connection is closed or
 * an error occurs.</p>
 *
 * @link https://php.net/event_buffer_new
 *
 * @param resource      $stream  Valid PHP stream resource. Must be castable to file descriptor.
 * @param callable|null $readcb  Callback to invoke where there is data to read, or NULL if no callback is desired.
 * @param callable|null $writecb Callback to invoke where the descriptor is ready for writing, or NULL if no callback is desired.
 * @param callable      $errorcb Callback to invoke where there is an error on the descriptor, cannot be NULL.
 * @param mixed         $arg     An argument that will be passed to each of the callbacks (optional).
 *
 * @return resource|false returns new buffered event resource on success or FALSE on error.
 */
function event_buffer_new($stream, $readcb, $writecb, $errorcb, $arg = null) {}

/**
 * <p>Destroys the specified buffered event and frees all the resources associated.</p>
 * <p>(PECL libevent >= 0.0.1)</p>
 *
 * @link https://php.net/event_buffer_free
 *
 * @param resource $bevent Valid buffered event resource.
 *
 * @return void
 */
function event_buffer_free($bevent) {}

/**
 * <p>Associate buffered event with an event base</p>
 * <p>(PECL libevent >= 0.0.1)</p>
 *
 * <p>Assign the specified bevent to the event_base.</p>
 *
 * @link https://php.net/event_buffer_base_set
 *
 * @param resource $bevent Valid buffered event resource.
 * @param resource $event_base Valid event base resource.
 *
 * @return bool returns TRUE on success or FALSE on error.
 */
function event_buffer_base_set($bevent, $event_base) {}

/**
 * <p>Assign a priority to a buffered event. Use it after
 * initializing event, but before adding an event to the event_base.</p>
 * <p>(PECL libevent >= 0.0.1)</p>
 *
 * <p>When multiple events trigger at the same time, Libevent
 * does not define any order with respect to when their callbacks
 * will be executed. You can define some events as more important
 * than others by using priorities.</p>
 *
 * <p>When multiple events of multiple priorities become active,
 * the low-priority events are not run. Instead, Libevent runs
 * the high priority events, then checks for events again. Only
 * when no high-priority events are active are the low-priority
 * events run.</p>
 *
 * <p>When you do not set the priority for an event, the default
 * is the number of queues in the event base, divided by 2.</p>
 *
 * @link https://php.net/event_buffer_priority_set
 *
 * @see event_base_priority_init
 *
 * @param resource $bevent <p>
 * Valid buffered event resource.
 * </p>
 * @param int $priority <p>
 * Priority level. Cannot be less than 0 and cannot exceed
 * maximum priority level of the event base (see {@link event_base_priority_init}()).
 * </p>
 *
 * @return bool returns TRUE on success or FALSE on error.
 */
function event_buffer_priority_set($bevent, $priority) {}

/**
 * <p>Writes data to the specified buffered event.</p>
 * <p>(PECL libevent >= 0.0.1)</p>
 *
 * <p>The data is appended to the output buffer and written
 * to the descriptor when it becomes available for writing.</p>
 *
 * @link https://php.net/event_buffer_write
 *
 * @param resource $bevent Valid buffered event resource.
 * @param string $data The data to be written.
 * @param int $data_size Optional size parameter. {@link event_buffer_write}() writes all the data by default
 *
 * @return bool returns TRUE on success or FALSE on error.
 */
function event_buffer_write($bevent, $data, $data_size = -1) {}

/**
 * <p>Reads data from the input buffer of the buffered event.</p>
 * <p>(PECL libevent >= 0.0.1)</p>
 *
 * @link https://php.net/event_buffer_read
 *
 * @param resource $bevent Valid buffered event resource.
 * @param int $data_size Data size in bytes.
 *
 * @return string
 */
function event_buffer_read($bevent, $data_size) {}

/**
 * <p>Enables the specified buffered event.</p>
 * <p>(PECL libevent >= 0.0.1)</p>
 *
 * @link https://php.net/event_buffer_enable
 *
 * @param resource $bevent Valid buffered event resource.
 * @param int $events Any combination of EV_READ and EV_WRITE.
 *
 * @return bool returns TRUE on success or FALSE on error.
 */
function event_buffer_enable($bevent, $events) {}

/**
 * <p>Disable a buffered event</p>
 * <p>(PECL libevent >= 0.0.1)</p>
 *
 * <p>Disables the specified buffered event.</p>
 *
 * @link https://php.net/event_buffer_disable
 *
 * @param resource $bevent Valid buffered event resource.
 * @param int $events Any combination of EV_READ and EV_WRITE.
 *
 * @return bool returns TRUE on success or FALSE on error.
 */
function event_buffer_disable($bevent, $events) {}

/**
 * <p>Sets the read and write timeouts for the specified buffered event.</p>
 * <p>(PECL libevent >= 0.0.1)</p>
 *
 * @link https://php.net/event_buffer_timeout_set
 *
 * @param resource $bevent Valid buffered event resource.
 * @param int $read_timeout Read timeout (in seconds).
 * @param int $write_timeout Write timeout (in seconds).
 *
 * @return void
 */
function event_buffer_timeout_set($bevent, $read_timeout, $write_timeout) {}

/**
 * <p>Set the watermarks for read and write events.</p>
 * <p>(PECL libevent >= 0.0.1)</p>
 *
 * <p>Every bufferevent has four watermarks:</p>
 *
 * <p><b>Read low-water mark</b><br/>
 * Whenever a read occurs that leaves the bufferevent's input buffer at this
 * level or higher, the bufferevent's read callback is invoked. Defaults to 0,
 * so that every read results in the read callback being invoked.</p>
 *
 * <p><b>Read high-water mark</b><br/>
 * If the bufferevent's input buffer ever gets to this level, the bufferevent
 * stops reading until enough data is drained from the input buffer to take us
 * below it again. Defaults to unlimited, so that we never stop reading because
 * of the size of the input buffer.</p>
 *
 * <p><b>Write low-water mark</b><br/>
 * Whenever a write occurs that takes us to this level or below, we invoke the write
 * callback. Defaults to 0, so that a write callback is not invoked unless the output
 * buffer is emptied.</p>
 *
 * <p><b>Write high-water mark</b><br/>
 * Not used by a bufferevent directly, this watermark can have special meaning when
 * a bufferevent is used as the underlying transport of another bufferevent.</p>
 *
 * <p>Libevent does not invoke read callback unless there is at least lowmark
 * bytes in the input buffer; if the read buffer is beyond the highmark,
 * reading is stopped. On output, the write callback is invoked whenever
 * the buffered data falls below the lowmark.</p>
 *
 * @link https://php.net/event_buffer_watermark_set
 *
 * @param resource $bevent   Valid buffered event resource.
 * @param int      $events   Any combination of EV_READ and EV_WRITE.
 * @param int      $lowmark  Low watermark.
 * @param int      $highmark High watermark.
 *
 * @return void
 */
function event_buffer_watermark_set($bevent, $events, $lowmark, $highmark) {}

/**
 * <p>Changes the file descriptor on which the buffered event operates.</p>
 * <p>(PECL libevent >= 0.0.1)</p>
 *
 * @link https://php.net/event_buffer_fd_set
 *
 * @param resource $bevent Valid buffered event resource.
 * @param resource $fd Valid PHP stream, must be castable to file descriptor.
 *
 * @return void
 */
function event_buffer_fd_set($bevent, $fd) {}

/**
 * <p>Set or reset callbacks for a buffered event</p>
 * <p>(PECL libevent >= 0.0.4)</p>
 *
 * <p>Sets or changes existing callbacks for the buffered event.</p>
 *
 * @link https://php.net/event_buffer_set_callback
 *
 * @param resource $bevent Valid buffered event resource.
 * @param callable|null $readcb Callback to invoke where there is data to read, or NULL if no callback is desired.
 * @param callable|null $writecb Callback to invoke where the descriptor is ready for writing, or NULL if no callback is desired.
 * @param callable $errorcb Callback to invoke where there is an error on the descriptor, cannot be NULL.
 * @param mixed $arg An argument that will be passed to each of the callbacks (optional).
 *
 * @return bool returns TRUE on success or FALSE on error.
 */
function event_buffer_set_callback($bevent, $readcb, $writecb, $errorcb, $arg = null) {}

/**
 * <p>Alias of {@link event_new}().</p>
 *
 * @return resource|false returns valid event base resource on success or FALSE on error.
 */
function event_timer_new() {}

/**
 * <p>Prepares the timer event to be used in {@link event_add}().</p>
 *
 * <p>The event is prepared to call the function specified by the callback
 * on the timeout event (EV_TIMEOUT).</p>
 *
 * <p>After initializing the event, use {@link event_base_set}() to associate the event with its event base.</p>
 *
 * <p>In case of matching event, these three arguments are passed to the callback function:
 * <table>
 * 	<tr>
 * 		<td><b>$fd</b></td>
 * 		<td>null</td>
 * 	</tr>
 * 	<tr>
 * 		<td><b>$events</b></td>
 * 		<td>A flag indicating the event. EV_TIMEOUT.</td>
 * 	</tr>
 * 	<tr>
 * 		<td><b>$arg</b></td>
 * 		<td>Optional parameter, previously passed to {@link event_timer_set}() as arg.</td>
 * 	</tr>
 * </table>
 * </p>
 *
 * @param resource $event <p>
 * Valid event resource.
 * </p>
 * @param callable $callback <p>
 * Callback function to be called when the matching event occurs.
 * </p>
 * @param mixed $arg [optional] <p>
 * Optional callback parameter.
 * </p>
 *
 * @return void
 */
function event_timer_set($event, $callback, $arg = null) {}

/**
 * <p>Checks if a specific event is pending or scheduled.</p>
 *
 * @param resource $event <p>
 * Valid event resource.
 * </p>
 * @param int $timeout [optional] <p>
 * Optional timeout (in microseconds).
 * </p>
 *
 * @return bool TRUE if event is not scheduled (added) FALSE otherwise
 */
function event_timer_pending($event, $timeout = -1) {}

/**
 * <p>Alias of {@link event_add}().</p>
 *
 * @param resource $event <p>
 * Valid event resource.
 * </p>
 * @param int $timeout [optional] <p>
 * Optional timeout (in microseconds).
 * </p>
 *
 * @return bool returns TRUE on success or FALSE on error.
 */
function event_timer_add($event, $timeout = -1) {}

/**
 * <p>Alias of {@link event_del}().</p>
 *
 * @param resource $event Valid event resource.
 *
 * @return bool returns TRUE on success or FALSE on error.
 */
function event_timer_del($event) {}

// End of PECL libevent v.0.0.4
<?php

/**
 * Stubs for the LuaSandbox PECL extension.
 *
 * <p><i>LuaSandbox</i> is an extension for PHP 5, PHP 7, and HHVM to allow safely running
 * untrusted Lua 5.1 code from within PHP.</p>
 *
 * @link https://www.php.net/manual/en/book.luasandbox.php
 * @package luasandbox
 * @version 3.0.3
 */

/**
 * The <i>LuaSandbox</i> class creates a Lua environment and allows for execution of Lua code.
 *
 * @link https://www.php.net/manual/en/class.luasandbox.php
 * @since luasandbox >= 1.0.0
 */
class LuaSandbox
{
    /**
     * Used with <code>LuaSandbox::getProfilerFunctionReport()</code>
     * to return timings in samples.
     */
    public const SAMPLES = 0;

    /**
     * Used with <code>LuaSandbox::getProfilerFunctionReport()</code>
     * to return timings in seconds.
     */
    public const SECONDS = 1;

    /**
     * Used with <code>LuaSandbox::getProfilerFunctionReport()</code>
     * to return timings in percentages of the total.
     */
    public const PERCENT = 2;

    /**
     * Call a function in a Lua global variable.
     *
     * <p>If the name contains "." characters, the function is located via recursive table accesses,
     * as if the name were a Lua expression.</p>
     *
     * <p>If the variable does not exist, or is not a function,
     * false will be returned and a warning issued.</p>
     *
     * <p>For more information about calling Lua functions and the return values,
     * see <code>LuaSandboxFunction::call()</code>.</p>
     *
     * @link https://www.php.net/manual/en/luasandbox.callFunction.php
     * @param string $name <p>Lua variable name.</p>
     * @param mixed[] $arguments <p>Arguments to the function.</p>
     * @return array|bool <p>Returns an array of values returned by the Lua function,
     * which may be empty, or false in case of failure.</p>
     * @see LuaSandboxFunction::call()
     * @since luasandbox >= 1.0.0
     */
    public function callFunction($name, array $arguments) {}

    /**
     * Disable the profiler.
     *
     * @link https://www.php.net/manual/en/luasandbox.disableProfiler.php
     * @since luasandbox >= 1.1.0
     * @see LuaSandbox::enableProfiler()
     * @see LuaSandbox::getProfilerFunctionReport()
     */
    public function disableProfiler() {}

    /**
     * Enable the profiler.
     *
     * <p>The profiler periodically samples the Lua environment
     * to record the running function. Testing indicates that
     * at least on Linux, setting a period less than 1ms will
     * lead to a high overrun count but no performance problems.</p>
     *
     * @link https://www.php.net/manual/en/luasandbox.enableprofiler.php
     * @param float $period [optional] <p>Sampling period in seconds.</p>
     * @return bool <p>Returns a boolean indicating whether the profiler is enabled.</p>
     * @since luasandbox >= 1.1.0
     * @see LuaSandbox::disableProfiler()
     * @see LuaSandbox::getProfilerFunctionReport()
     */
    public function enableProfiler($period = 0.02) {}

    /**
     * Fetch the current CPU time usage of the Lua environment.
     *
     * <p>This includes time spent in PHP callbacks.</p>
     *
     * <p>Note: On Windows, this function always returns zero.
     * On operating systems that do not support <i>CLOCK_THREAD_CPUTIME_ID</i>,
     * such as FreeBSD and Mac OS X, this function will return the
     * elapsed wall-clock time, not CPU time.</p>
     *
     * @link https://www.php.net/manual/en/luasandbox.getcpuusage.php
     * @return float <p>Returns the current CPU time usage in seconds.</p>
     * @since luasandbox >= 1.0.0
     * @see LuaSandbox::getMemoryUsage()
     * @see LuaSandbox::getPeakMemoryUsage()
     * @see LuaSandbox::setCPULimit()
     */
    public function getCPUUsage() {}

    /**
     * Fetch the current memory usage of the Lua environment.
     *
     * @link https://www.php.net/manual/en/luasandbox.getmemoryusage.php
     * @return int
     * @since luasandbox >= 1.0.0
     * @see LuaSandbox::getMemoryUsage()
     * @see LuaSandbox::getCPUUsage()
     * @see LuaSandbox::setMemoryLimit()
     */
    public function getMemoryUsage() {}

    /**
     * Fetch the peak memory usage of the Lua environment.
     *
     * @link https://www.php.net/manual/en/luasandbox.getpeakmemoryusage.php
     * @return int <p>Returns the current memory usage in bytes.</p>
     * @since luasandbox >= 1.0.0
     * @see LuaSandbox::getMemoryUsage()
     * @see LuaSandbox::getCPUUsage()
     * @see LuaSandbox::setMemoryLimit()
     */
    public function getPeakMemoryUsage() {}

    /**
     * Fetch profiler data.
     *
     * <p>For a profiling instance previously started by <code>LuaSandbox::enableProfiler()</code>,
     * get a report of the cost of each function.</p>
     *
     * <p>The measurement unit used for the cost is determined by the $units parameter:</p>
     * <li><code>LuaSandbox::SAMPLES</code> Measure in number of samples.</li>
     * <li><code>LuaSandbox::SECONDS</code> Measure in seconds of CPU time.</li>
     * <li><code>LuaSandbox::PERCENT</code> Measure percentage of CPU time.</li>
     *
     * <p>Note: On Windows, this function always returns an empty array.
     * On operating systems that do not support <i>CLOCK_THREAD_CPUTIME_ID</i>,
     * such as FreeBSD and Mac OS X, this function will report the
     * elapsed wall-clock time, not CPU time.</p>
     *
     * @link https://www.php.net/manual/en/luasandbox.getprofilerfunctionreport.php
     * @param int $units Measurement unit constant.
     * @return array <p>Returns profiler measurements, sorted in descending order, as an associative array.
     * Keys are the Lua function names (with source file and line defined in angle brackets), values are the
     * measurements as integer or float.</p>
     * @since luasandbox >= 1.1.0
     * @see LuaSandbox::SAMPLES
     * @see LuaSandbox::SECONDS
     * @see LuaSandbox::PERCENT
     */
    public function getProfilerFunctionReport($units = LuaSandbox::SECONDS) {}

    /**
     * Return the versions of LuaSandbox and Lua.
     *
     * @link https://www.php.net/manual/en/luasandbox.getversioninfo.php
     * @return array <p>Returns an array with two keys:</p>
     * <li>LuaSandbox (string), the version of the LuaSandbox extension.</li>
     * <li>Lua (string), the library name and version as defined by the LUA_RELEASE macro, for example, "Lua 5.1.5".</li>
     * @since luasandbox >= 1.6.0
     */
    public static function getVersionInfo() {}

    /**
     * Load a precompiled binary chunk into the Lua environment.
     *
     * <p>Loads data generated by <code>LuaSandboxFunction::dump()</code>.</p>
     *
     * @link https://www.php.net/manual/en/luasandbox.loadbinary.php
     * @param string $code <p>Data from <code>LuaSandboxFunction::dump()</code>.</p>
     * @param string $chunkName [optional] <p>Name for the loaded function.</p>
     * @return LuaSandboxFunction
     * @since luasandbox >= 1.0.0
     * @see LuaSandbox::loadString()
     */
    public function loadBinary($code, $chunkName = '') {}

    /**
     * Load Lua code into the Lua environment.
     *
     * <p>This is the equivalent of standard Lua's <code>loadstring()</code> function.</p>
     *
     * @link https://www.php.net/manual/en/luasandbox.loadString.php
     * @param string $code <p>Lua code.</p>
     * @param string $chunkName [optional] <p>Name for the loaded chunk, for use in error traces.</p>
     * @return LuaSandboxFunction <p>Returns a <code>LuaSandboxFunction</code> which, when executed,
     * will execute the passed <code>$code</code>.</p>
     * @since luasandbox >= 1.0.0
     * @see LuaSandbox::registerLibrary()
     * @see LuaSandbox::wrapPhpFunction()
     */
    public function loadString($code, $chunkName = '') {}

    /**
     * Pause the CPU usage timer.
     *
     * <p>This only has effect when called from within a callback from Lua.
     * When execution returns to Lua, the timer will be automatically unpaused.
     * If a new call into Lua is made, the timer will be unpaused
     * for the duration of that call.</p>
     *
     * <p>If a PHP callback calls into Lua again with timer not paused,
     * and then that Lua function calls into PHP again,
     * the second PHP call will not be able to pause the timer.
     * The logic is that even though the second PHP call would
     * avoid counting the CPU usage against the limit,
     * the first call still counts it.</p>
     *
     * @link https://www.php.net/manual/en/luasandbox.pauseusagetimer.php
     * @return bool <p>Returns a boolean indicating whether the timer is now paused.</p>
     * @since luasandbox >= 1.4.0
     * @see LuaSandbox::setCPULimit()
     * @see LuaSandbox::unpauseUsageTimer()
     */
    public function pauseUsageTimer() {}

    /**
     * Register a set of PHP functions as a Lua library.
     *
     * <p>Registers a set of PHP functions as a Lua library,
     * so that Lua can call the relevant PHP code.</p>
     *
     * <p>For more information about calling Lua functions and the return values,
     * see <code>LuaSandboxFunction::call()</code>.</p>
     *
     * @link https://www.php.net/manual/en/luasandbox.registerlibrary.php
     * @param string $libname <p>The name of the library.
     * In the Lua state, the global variable of this name will be set to the table of functions.
     * If the table already exists, the new functions will be added to it.</p>
     * @param array $functions <p>Returns an array, where each key is a function name,
     * and each value is a corresponding PHP callable.</p>
     * @since luasandbox >= 1.0.0
     * @see LuaSandbox::loadString()
     * @see LuaSandbox::wrapPhpFunction()
     */
    public function registerLibrary($libname, $functions) {}

    /**
     * Set the CPU time limit for the Lua environment.
     *
     * <p>If the total user and system time used by the environment after the call
     * to this method exceeds this limit, a <code>LuaSandboxTimeoutError</code> exception is thrown.</p>
     *
     * <p>Time used in PHP callbacks is included in the limit.</p>
     *
     * <p>Setting the time limit from a callback while Lua is running causes the timer to be reset,
     * or started if it was not already running.</p>
     *
     * <p>Note: On Windows, the CPU limit will be ignored. On operating systems
     * that do not support <i>CLOCK_THREAD_CPUTIME_ID</i>, such as FreeBSD and
     * Mac OS X, wall-clock time rather than CPU time will be limited.</p>
     *
     * @link https://www.php.net/manual/en/luasandbox.setcpulimit.php
     * @param bool|float $limit <p>Limit as a float in seconds, or false for no limit.</p>
     * @since luasandbox >= 1.0.0
     * @see LuaSandbox::getCPUUsage()
     * @see LuaSandbox::setMemoryLimit()
     */
    public function setCPULimit($limit) {}

    /**
     * Set the memory limit for the Lua environment.
     *
     * @link https://www.php.net/manual/en/luasandbox.setmemorylimit.php
     * @param int $limit <p>Memory limit in bytes.</p>
     * @throws LuaSandboxMemoryError <p>Exception is thrown if this limit is exceeded.</p>
     * @since luasandbox >= 1.0.0
     * @see LuaSandbox::getMemoryUsage()
     * @see LuaSandbox::getPeakMemoryUsage()
     * @see LuaSandbox::setCPULimit()
     */
    public function setMemoryLimit($limit) {}

    /**
     * Unpause the timer paused by <code>LuaSandbox::pauseUsageTimer()</code>.
     *
     * @link https://www.php.net/manual/en/luasandbox.unpauseusagetimer.php
     * @since luasandbox >= 1.0.0
     * @see LuaSandbox::setCPULimit()
     * @see LuaSandbox::unpauseUsageTimer()
     */
    public function unpauseUsageTimer() {}

    /**
     * Wrap a PHP callable in a LuaSandboxFunction.
     *
     * <p>Wraps a PHP callable in a <code>LuaSandboxFunction</code>,
     * so it can be passed into Lua as an anonymous function.</p>
     *
     * <p>The function must return either an array of values (which may be empty),
     * or NULL which is equivalent to returning the empty array.</p>
     *
     * <p>Exceptions will be raised as errors in Lua, however only <code>LuaSandboxRuntimeError<code>
     * exceptions may be caught inside Lua with <code>pcall()<code/> or <code>xpcall()<code/>.</p>
     *
     * <p>For more information about calling Lua functions and the return values,
     * see <code>LuaSandboxFunction::call()</code>.</p>
     *
     * @link https://www.php.net/manual/en/luasandbox.wrapPhpFunction.php
     * @param callable $function <p>Callable to wrap.</p>
     * @return LuaSandboxFunction
     * @since luasandbox >= 1.2.0
     * @see LuaSandbox::loadString()
     * @see LuaSandbox::registerLibrary()
     */
    public function wrapPhpFunction($function) {}
}

/**
 * Represents a Lua function, allowing it to be called from PHP.
 *
 * <p>A <i>LuaSandboxFunction</i> may be obtained as a return value from Lua,
 * as a parameter passed to a callback from Lua,
 * or by using <code>LuaSandbox::wrapPhpFunction()</code>, <code>LuaSandbox::loadString()</code>,
 * or <code>LuaSandbox::loadBinary()</code>.</p>
 *
 * @since luasandbox >= 1.0.0
 */
class LuaSandboxFunction
{
    /**
     * Call a Lua function.
     *
     * <p>Errors considered to be the fault of the PHP code will result in the
     * function returning false and <i>E_WARNING</i> being raised, for example,
     * a resource type being used as an argument. Lua errors will result
     * in a LuaSandboxRuntimeError exception being thrown.</p>
     *
     * <p>PHP and Lua types are converted as follows:</p>
     * <ul>
     * <li>PHP NULL is Lua nil, and vice versa.</li>
     * <li>PHP integers and floats are converted to Lua numbers. Infinity and NAN are supported.</li>
     * <li>Lua numbers without a fractional part between approximately -2**53 and 2**53 are
     * converted to PHP integers, with others being converted to PHP floats.</li>
     * <li>PHP booleans are Lua booleans, and vice versa.</li>
     * <li>PHP strings are Lua strings, and vice versa.</li>
     * <li>Lua functions are PHP LuaSandboxFunction objects, and vice versa.
     * General PHP callables are not supported.</li>
     * <li>PHP arrays are converted to Lua tables, and vice versa.</li>
     * <ul>
     *   <li>Note that Lua typically indexes arrays from 1, while PHP indexes arrays from 0.
     *   No adjustment is made for these differing conventions.</li>
     *   <li>Self-referential arrays are not supported in either direction.</li>
     *   <li>PHP references are dereferenced.</li>
     *   <li>Lua <i>__pairs</i> and <i>__ipairs</i> are processed. <i>__index</i> is ignored.</li>
     *   <li>When converting from PHP to Lua, integer keys between -2**53 and 2**53 are represented as Lua numbers.
     *   All other keys are represented as Lua strings.</li>
     *   <li>When converting from Lua to PHP, keys other than strings and numbers will result in an error,
     *   as will collisions when converting numbers to strings or vice versa
     *   (since PHP considers things like <code>$a[0]</code> and <code>$a["0"]</code> as being equivalent).</li>
     * </ul>
     * <li>All other types are unsupported and will raise an error/exception,
     * including general PHP objects and Lua userdata and thread types.</li>
     * </ul>
     *
     * <p>Lua functions inherently return a list of results. So on success,
     * this method returns an array containing all of the values returned by Lua,
     * with integer keys starting from zero.
     * Lua may return no results, in which case an empty array is returned.</p>
     *
     * @link https://www.php.net/manual/en/luasandboxfunction.call.php
     * @param string[] $arguments <p>Arguments passed to the function.</p>
     * @return array|bool <p>Returns an array of values returned by the function,
     * which may be empty, or false on error.</p>
     * @since luasandbox >= 1.0.0
     */
    public function call($arguments) {}

    /**
     * Dump the function as a binary blob.
     *
     * @link https://www.php.net/manual/en/luasandboxfunction.dump.php
     * @return string <p>Returns a string that may be passed to <code>LuaSandbox::loadBinary()</code>.</p>
     * @since luasandbox >= 1.0.0
     */
    public function dump() {}
}

/**
 * Base class for LuaSandbox exceptions.
 *
 * @since luasandbox >= 1.0.0
 */
class LuaSandboxError extends Exception
{
    public const RUN = 2;
    public const SYNTAX = 3;
    public const MEM = 4;
    public const ERR = 5;
}

/**
 * Catchable <i>LuaSandbox</i> runtime exceptions.
 *
 * <p>These may be caught inside Lua using <code>pcall()</code> or <code>xpcall()</code>.</p>
 *
 * @since luasandbox >= 1.0.0
 */
class LuaSandboxRuntimeError extends LuaSandboxError {}

/**
 * Uncatchable <i>LuaSandbox</i> exceptions.
 *
 * <p>These may not be caught inside Lua using <code>pcall()</code> or <code>xpcall()</code>.</p>
 *
 * @since luasandbox >= 1.0.0
 */
class LuaSandboxFatalError extends LuaSandboxError {}

/**
 * Exception thrown when Lua encounters an error inside an error handler.
 *
 * @since luasandbox >= 1.0.0
 */
class LuaSandboxErrorError extends LuaSandboxFatalError {}

/**
 * Exception thrown when Lua cannot allocate memory.
 *
 * @since luasandbox >= 1.0.0
 * @see LuaSandbox::setMemoryLimit()
 */
class LuaSandboxMemoryError extends LuaSandboxFatalError {}

/**
 * Exception thrown when Lua code cannot be parsed.
 *
 * @since luasandbox >= 1.0.0
 */
class LuaSandboxSyntaxError extends LuaSandboxFatalError {}

/**
 * Exception thrown when the configured CPU time limit is exceeded.
 *
 * @since luasandbox >= 1.0.0
 * @see LuaSandbox::setCPULimit()
 */
class LuaSandboxTimeoutError extends LuaSandboxFatalError {}
<?php

/**
 * PECL xlswriter stubs for PhpStorm
 * https://pecl.php.net/package/xlswriter
 * https://www.php.net/manual/en/book.xlswriter.php
 */

namespace Vtiful\Kernel;

    /**
     * Class Excel
     * @link https://www.php.net/manual/en/class.vtiful-kernel-excel.php
     * @package Vtiful\Kernel
     */
    class Excel
    {
        public const TYPE_STRING = 0x01;
        public const TYPE_INT = 0x02;
        public const TYPE_DOUBLE = 0x04;
        public const TYPE_TIMESTAMP = 0x08;
        public const SKIP_NONE = 0x00;
        public const SKIP_EMPTY_ROW = 0x01;
        public const SKIP_EMPTY_CELLS = 0x02;
        public const GRIDLINES_HIDE_ALL = 0;
        public const GRIDLINES_SHOW_SCREEN = 1;
        public const GRIDLINES_SHOW_PRINT = 2;
        public const GRIDLINES_SHOW_ALL = 3;

        /**
         * Excel constructor.
         *
         * @param array $config
         */
        public function __construct(array $config) {}

        /**
         * File Name
         *
         * @param string $fileName
         * @param string $sheetName
         *
         * @return Excel
         */
        public function fileName(string $fileName, string $sheetName = 'Sheet1'): self
        {
            return $this;
        }

        /**
         * Const memory model
         *
         * @param string $fileName
         * @param string $sheetName
         *
         * @return Excel
         */
        public function constMemory(string $fileName, string $sheetName = 'Sheet1'): self
        {
            return $this;
        }

        /**
         * Add a new worksheet to a workbook.
         *
         * The worksheet name must be a valid Excel worksheet name, i.e. it must be
         * less than 32 character and it cannot contain any of the characters:
         *
         *     / \ [ ] : * ?
         *
         * In addition, you cannot use the same, case insensitive, `$sheetName` for more
         * than one worksheet.
         *
         * @param string|null $sheetName
         *
         * @return Excel
         */
        public function addSheet(?string $sheetName): self
        {
            return $this;
        }

        /**
         * Checkout worksheet
         *
         * @param string $sheetName
         *
         * @return Excel
         */
        public function checkoutSheet(string $sheetName): self
        {
            return $this;
        }

        /**
         * Insert data on the first line of the worksheet
         *
         * @param array $header
         *
         * @return Excel
         */
        public function header(array $header): self
        {
            return $this;
        }

        /**
         * Insert data on the worksheet
         *
         * @param array $data
         *
         * @return Excel
         */
        public function data(array $data): self
        {
            return $this;
        }

        /**
         * Generate file
         *
         * @return string
         */
        public function output(): string
        {
            return 'FilePath';
        }

        /**
         * Get file resource
         *
         * @return resource
         */
        public function getHandle() {}

        /**
         * Auto filter on the worksheet
         *
         * @param string $range
         *
         * @return Excel
         */
        public function autoFilter(string $range): self
        {
            return $this;
        }

        /**
         * Insert data on the cell
         *
         * @param int $row
         * @param int $column
         * @param int|string|float $data
         * @param string|null $format
         * @param resource|null $formatHandle
         *
         * @return Excel
         */
        public function insertText(int $row, int $column, $data, string $format = null, $formatHandle = null): self
        {
            return $this;
        }

        /**
         * Insert date on the cell
         *
         * @param int $row
         * @param int $column
         * @param int $timestamp
         * @param string|null $format
         * @param resource|null $formatHandle
         *
         * @return Excel
         */
        public function insertDate(int $row, int $column, int $timestamp, string $format = null, $formatHandle = null): self
        {
            return $this;
        }

        /**
         * Insert chart on the cell
         *
         * @param int $row
         * @param int $column
         * @param resource $chartResource
         *
         * @return Excel
         */
        public function insertChart(int $row, int $column, $chartResource): self
        {
            return $this;
        }

        /**
         * Insert url on the cell
         *
         * @param int $row
         * @param int $column
         * @param string $url
         * @param resource|null $formatHandle
         *
         * @return Excel
         */
        public function insertUrl(int $row, int $column, string $url, $formatHandle = null): self
        {
            return $this;
        }

        /**
         * Insert image on the cell
         *
         * @param int $row
         * @param int $column
         * @param string $imagePath
         * @param float $width
         * @param float $height
         *
         * @return Excel
         */
        public function insertImage(int $row, int $column, string $imagePath, float $width = 1, float $height = 1): self
        {
            return $this;
        }

        /**
         * Insert Formula on the cell
         *
         * @param int $row
         * @param int $column
         * @param string $formula
         *
         * @return Excel
         */
        public function insertFormula(int $row, int $column, string $formula): self
        {
            return $this;
        }

        /**
         * Merge cells
         *
         * @param string $range
         * @param string $data
         *
         * @return Excel
         */
        public function MergeCells(string $range, string $data): self
        {
            return $this;
        }

        /**
         * Set column cells width or format
         *
         * @param string $range
         * @param float $cellWidth
         * @param resource|null $formatHandle
         *
         * @return Excel
         */
        public function setColumn(string $range, float $cellWidth, $formatHandle = null): self
        {
            return $this;
        }

        /**
         * Set row cells height or format
         *
         * @param string $range
         * @param float $cellHeight
         * @param resource|null $formatHandle
         *
         * @return Excel
         */
        public function setRow(string $range, float $cellHeight, $formatHandle = null): self
        {
            return $this;
        }

        /**
         * Open xlsx file
         *
         * @param string $fileName
         *
         * @return Excel
         */
        public function openFile(string $fileName): self
        {
            return $this;
        }

        /**
         * Open sheet
         *
         * default open first sheet
         *
         * @param string|null $sheetName
         * @param int         $skipFlag
         *
         * @return Excel
         */
        public function openSheet(string $sheetName = null, int $skipFlag = 0x00): self
        {
            return $this;
        }

        /**
         * Set row cell data type
         *
         * @param array $types
         *
         * @return Excel
         */
        public function setType(array $types): self
        {
            return $this;
        }

        /**
         * Read values from the sheet
         *
         * @return array
         */
        public function getSheetData(): array
        {
            return [];
        }

        /**
         * Read values from the sheet
         *
         * @return array
         */
        public function nextRow(): array
        {
            return [];
        }

        /**
         * Next Cell In Callback
         *
         * @param callable $callback function(int $row, int $cell, string $data)
         * @param string|null $sheetName sheet name
         */
        public function nextCellCallback(callable $callback, string $sheetName = null): void {}

        /**
         * Freeze panes
         *
         * freezePanes(1, 0); // Freeze the first row.
         * freezePanes(0, 1); // Freeze the first column.
         * freezePanes(1, 1); // Freeze first row/column.
         *
         * @param int $row
         * @param int $column
         *
         * @return static
         */
        public function freezePanes(int $row, int $column): self
        {
            return $this;
        }

        /**
         * Gridline
         *
         * Display or hide screen and print gridlines using one of the values of
         *
         * \Vtiful\Kernel\Excel::GRIDLINES_HIDE_ALL
         * \Vtiful\Kernel\Excel::GRIDLINES_SHOW_ALL
         * \Vtiful\Kernel\Excel::GRIDLINES_SHOW_PRINT
         * \Vtiful\Kernel\Excel::GRIDLINES_SHOW_SCREEN
         *
         * Excel default is that the screen gridlines are on and the printed worksheet is off.
         *
         * @param int $option
         *
         * @return static
         */
        public function gridline(int $option): self
        {
            return $this;
        }

        /**
         * Worksheet zoom
         *
         * Set the worksheet zoom factor in the range 10 <= zoom <= 400:
         *
         * @param int $scale
         *
         * @return static
         */
        public function zoom(int $scale): self
        {
            return $this;
        }
    }

    /**
     * Class Format
     *
     * @link https://www.php.net/manual/en/class.vtiful-kernel-format.php
     * @package Vtiful\Kernel
     */
    class Format
    {
        public const UNDERLINE_SINGLE = 0x00;
        public const UNDERLINE_DOUBLE = 0x00;
        public const UNDERLINE_SINGLE_ACCOUNTING = 0x00;
        public const UNDERLINE_DOUBLE_ACCOUNTING = 0x00;
        public const FORMAT_ALIGN_LEFT = 0x00;
        public const FORMAT_ALIGN_CENTER = 0x00;
        public const FORMAT_ALIGN_RIGHT = 0x00;
        public const FORMAT_ALIGN_FILL = 0x00;
        public const FORMAT_ALIGN_JUSTIFY = 0x00;
        public const FORMAT_ALIGN_CENTER_ACROSS = 0x00;
        public const FORMAT_ALIGN_DISTRIBUTED = 0x00;
        public const FORMAT_ALIGN_VERTICAL_TOP = 0x00;
        public const FORMAT_ALIGN_VERTICAL_BOTTOM = 0x00;
        public const FORMAT_ALIGN_VERTICAL_CENTER = 0x00;
        public const FORMAT_ALIGN_VERTICAL_JUSTIFY = 0x00;
        public const FORMAT_ALIGN_VERTICAL_DISTRIBUTED = 0x00;
        public const COLOR_BLACK = 0x00;
        public const COLOR_BLUE = 0x00;
        public const COLOR_BROWN = 0x00;
        public const COLOR_CYAN = 0x00;
        public const COLOR_GRAY = 0x00;
        public const COLOR_GREEN = 0x00;
        public const COLOR_LIME = 0x00;
        public const COLOR_MAGENTA = 0x00;
        public const COLOR_NAVY = 0x00;
        public const COLOR_ORANGE = 0x00;
        public const COLOR_PINK = 0x00;
        public const COLOR_PURPLE = 0x00;
        public const COLOR_RED = 0x00;
        public const COLOR_SILVER = 0x00;
        public const COLOR_WHITE = 0x00;
        public const COLOR_YELLOW = 0x00;
        public const PATTERN_NONE = 0x00;
        public const PATTERN_SOLID = 0x00;
        public const PATTERN_MEDIUM_GRAY = 0x00;
        public const PATTERN_DARK_GRAY = 0x00;
        public const PATTERN_LIGHT_GRAY = 0x00;
        public const PATTERN_DARK_HORIZONTAL = 0x00;
        public const PATTERN_DARK_VERTICAL = 0x00;
        public const PATTERN_DARK_DOWN = 0x00;
        public const PATTERN_DARK_UP = 0x00;
        public const PATTERN_DARK_GRID = 0x00;
        public const PATTERN_DARK_TRELLIS = 0x00;
        public const PATTERN_LIGHT_HORIZONTAL = 0x00;
        public const PATTERN_LIGHT_VERTICAL = 0x00;
        public const PATTERN_LIGHT_DOWN = 0x00;
        public const PATTERN_LIGHT_UP = 0x00;
        public const PATTERN_LIGHT_GRID = 0x00;
        public const PATTERN_LIGHT_TRELLIS = 0x00;
        public const PATTERN_GRAY_125 = 0x00;
        public const PATTERN_GRAY_0625 = 0x00;
        public const BORDER_THIN = 0x00;
        public const BORDER_MEDIUM = 0x00;
        public const BORDER_DASHED = 0x00;
        public const BORDER_DOTTED = 0x00;
        public const BORDER_THICK = 0x00;
        public const BORDER_DOUBLE = 0x00;
        public const BORDER_HAIR = 0x00;
        public const BORDER_MEDIUM_DASHED = 0x00;
        public const BORDER_DASH_DOT = 0x00;
        public const BORDER_MEDIUM_DASH_DOT = 0x00;
        public const BORDER_DASH_DOT_DOT = 0x00;
        public const BORDER_MEDIUM_DASH_DOT_DOT = 0x00;
        public const BORDER_SLANT_DASH_DOT = 0x00;

        /**
         * Format constructor.
         *
         * @param resource $fileHandle
         */
        public function __construct($fileHandle) {}

        /**
         * Wrap
         *
         * @return static
         */
        public function wrap(): self
        {
            return $this;
        }

        /**
         * Bold
         *
         * @return static
         */
        public function bold(): self
        {
            return $this;
        }

        /**
         * Italic
         *
         * @return static
         */
        public function italic(): self
        {
            return $this;
        }

        /**
         * Cells border
         *
         * @param int $style const BORDER_***
         *
         * @return static
         */
        public function border(int $style): self
        {
            return $this;
        }

        /**
         * Align
         *
         * @param int ...$style const FORMAT_ALIGN_****
         *
         * @return static
         */
        public function align(...$style): self
        {
            return $this;
        }

        /**
         * Number format
         *
         * @param string $format
         *
         * #,##0
         *
         * @return static
         */
        public function number(string $format): self
        {
            return $this;
        }

        /**
         * Font color
         *
         * @param int $color const COLOR_****
         *
         * @return static
         */
        public function fontColor(int $color): self
        {
            return $this;
        }

        /**
         * Font
         *
         * @param string $fontName
         *
         * @return static
         */
        public function font(string $fontName): self
        {
            return $this;
        }

        /**
         * Font size
         *
         * @param float $size
         *
         * @return static
         */
        public function fontSize(float $size): self
        {
            return $this;
        }

        /**
         * String strikeout
         *
         * @return Format
         */
        public function strikeout(): self
        {
            return $this;
        }

        /**
         * Underline
         *
         * @param int $style const UNDERLINE_****
         *
         * @return static
         */
        public function underline(int $style): self
        {
            return $this;
        }

        /**
         * Cell background
         *
         * @param int $color const COLOR_****
         * @param int $pattern const PATTERN_****
         *
         * @return static
         */
        public function background(int $color, int $pattern = self::PATTERN_SOLID): self
        {
            return $this;
        }

        /**
         * Format to resource
         *
         * @return resource
         */
        public function toResource() {}
    }
<?php

// Start of dba v.
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;

/** @since 8.2 */
const DBA_LMDB_USE_SUB_DIR = 0;

/** @since 8.2 */
const DBA_LMDB_NO_SUB_DIR = 0;

/**
 * Open database
 * @link https://php.net/manual/en/function.dba-open.php
 * @param string $path <p>
 * Commonly a regular path in your filesystem.
 * </p>
 * @param string $mode <p>
 * It is r for read access, w for
 * read/write access to an already existing database, c
 * for read/write access and database creation if it doesn't currently exist,
 * and n for create, truncate and read/write access.
 * The database is created in BTree mode, other modes (like Hash or Queue)
 * are not supported.
 * </p>
 * <p>
 * Additionally you can set the database lock method with the next char.
 * Use l to lock the database with a .lck
 * file or d to lock the databasefile itself. It is
 * important that all of your applications do this consistently.
 * </p>
 * <p>
 * If you want to test the access and do not want to wait for the lock
 * you can add t as third character. When you are
 * absolutely sure that you do not require database locking you can do
 * so by using - instead of l or
 * d. When none of d,
 * l or - is used, dba will lock
 * on the database file as it would with d.
 * </p>
 * <p>
 * There can only be one writer for one database file. When you use dba on
 * a web server and more than one request requires write operations they can
 * only be done one after another. Also read during write is not allowed.
 * The dba extension uses locks to prevent this. See the following table:
 * <table>
 * DBA locking
 * <tr valign="top">
 * <td>already open</td>
 * <td><i>mode</i> = "rl"</td>
 * <td><i>mode</i> = "rlt"</td>
 * <td><i>mode</i> = "wl"</td>
 * <td><i>mode</i> = "wlt"</td>
 * <td><i>mode</i> = "rd"</td>
 * <td><i>mode</i> = "rdt"</td>
 * <td><i>mode</i> = "wd"</td>
 * <td><i>mode</i> = "wdt"</td>
 * </tr>
 * <tr valign="top">
 * <td>not open</td>
 * <td>ok</td>
 * <td>ok</td>
 * <td>ok</td>
 * <td>ok</td>
 * <td>ok</td>
 * <td>ok</td>
 * <td>ok</td>
 * <td>ok</td>
 * </tr>
 * <tr valign="top">
 * <td><i>mode</i> = "rl"</td>
 * <td>ok</td>
 * <td>ok</td>
 * <td>wait</td>
 * <td>false</td>
 * <td>illegal</td>
 * <td>illegal</td>
 * <td>illegal</td>
 * <td>illegal</td>
 * </tr>
 * <tr valign="top">
 * <td><i>mode</i> = "wl"</td>
 * <td>wait</td>
 * <td>false</td>
 * <td>wait</td>
 * <td>false</td>
 * <td>illegal</td>
 * <td>illegal</td>
 * <td>illegal</td>
 * <td>illegal</td>
 * </tr>
 * <tr valign="top">
 * <td><i>mode</i> = "rd"</td>
 * <td>illegal</td>
 * <td>illegal</td>
 * <td>illegal</td>
 * <td>illegal</td>
 * <td>ok</td>
 * <td>ok</td>
 * <td>wait</td>
 * <td>false</td>
 * </tr>
 * <tr valign="top">
 * <td><i>mode</i> = "wd"</td>
 * <td>illegal</td>
 * <td>illegal</td>
 * <td>illegal</td>
 * <td>illegal</td>
 * <td>wait</td>
 * <td>false</td>
 * <td>wait</td>
 * <td>false</td>
 * </tr>
 * </table>
 * ok: the second call will be successful.
 * wait: the second call waits until <b>dba_close</b> is called for the first.
 * false: the second call returns false.
 * illegal: you must not mix "l" and "d" modifiers for <i>mode</i> parameter.
 * </p>
 * @param string $handler [optional] <p>
 * The name of the handler which
 * shall be used for accessing <i>path</i>. It is passed
 * all optional parameters given to <b>dba_open</b> and
 * can act on behalf of them.
 * </p>
 * @param mixed ...$handler_params [optional]
 * @return resource|false a positive handle on success or <b>FALSE</b> on failure.
 */
#[PhpStormStubsElementAvailable(from: '5.3', to: '8.1')]
function dba_open($path, $mode, $handler, ...$handler_params) {}

#[PhpStormStubsElementAvailable(from: '8.2')]
function dba_open(string $path, string $mode, ?string $handler = null, int $permission = 0o644, int $map_size = 0, ?int $flags = null) {}

/**
 * Open database persistently
 * @link https://php.net/manual/en/function.dba-popen.php
 * @param string $path <p>
 * Commonly a regular path in your filesystem.
 * </p>
 * @param string $mode <p>
 * It is r for read access, w for
 * read/write access to an already existing database, c
 * for read/write access and database creation if it doesn't currently exist,
 * and n for create, truncate and read/write access.
 * </p>
 * @param string $handler [optional] <p>
 * The name of the handler which
 * shall be used for accessing <i>path</i>. It is passed
 * all optional parameters given to <b>dba_popen</b> and
 * can act on behalf of them.
 * </p>
 * @param mixed ...$handler_params [optional]
 * @return resource|false a positive handle on success or <b>FALSE</b> on failure.
 */
#[PhpStormStubsElementAvailable(from: '5.3', to: '8.1')]
function dba_popen($path, $mode, $handler, ...$handler_params) {}

#[PhpStormStubsElementAvailable(from: '8.2')]
function dba_popen(string $path, string $mode, ?string $handler = null, int $permission = 0o644, int $map_size = 0, ?int $flags = null) {}

/**
 * Close a DBA database
 * @link https://php.net/manual/en/function.dba-close.php
 * @param resource $dba <p>
 * The database handler, returned by <b>dba_open</b> or
 * <b>dba_popen</b>.
 * </p>
 * @return void No value is returned.
 */
function dba_close($dba): void {}

/**
 * Delete DBA entry specified by key
 * @link https://php.net/manual/en/function.dba-delete.php
 * @param string $key <p>
 * The key of the entry which is deleted.
 * </p>
 * @param resource $dba <p>
 * The database handler, returned by <b>dba_open</b> or
 * <b>dba_popen</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function dba_delete(#[LanguageLevelTypeAware(['8.2' => 'array|string'], default: '')] $key, $dba): bool {}

/**
 * Check whether key exists
 * @link https://php.net/manual/en/function.dba-exists.php
 * @param string $key <p>
 * The key the check is performed for.
 * </p>
 * @param resource $dba <p>
 * The database handler, returned by <b>dba_open</b> or
 * <b>dba_popen</b>.
 * </p>
 * @return bool <b>TRUE</b> if the key exists, <b>FALSE</b> otherwise.
 */
function dba_exists(#[LanguageLevelTypeAware(['8.2' => 'array|string'], default: '')] $key, $dba): bool {}

/**
 * Fetch data specified by key
 * @link https://php.net/manual/en/function.dba-fetch.php
 * @param string $key <p>
 * The key the data is specified by.
 * </p>
 * <p>
 * When working with inifiles this function accepts arrays as keys
 * where index 0 is the group and index 1 is the value name. See:
 * <b>dba_key_split</b>.
 * </p>
 * @param resource $handle <p>
 * The database handler, returned by <b>dba_open</b> or
 * <b>dba_popen</b>.
 * </p>
 * @return string|false the associated string if the key/data pair is found, <b>FALSE</b>
 * otherwise.
 */
function dba_fetch($key, $handle): string|false {}

/**
 * Fetch data specified by key
 * @link https://php.net/manual/en/function.dba-fetch.php
 * @param string $key <p>
 * The key the data is specified by.
 * </p>
 * <p>
 * When working with inifiles this function accepts arrays as keys
 * where index 0 is the group and index 1 is the value name. See:
 * <b>dba_key_split</b>.
 * </p>
 * @param int $skip The number of key-value pairs to ignore when using cdb databases. This value is ignored for all other databases which do not support multiple keys with the same name.
 * @param resource $dba <p>
 * The database handler, returned by <b>dba_open</b> or
 * <b>dba_popen</b>.
 * </p>
 * @return string|false the associated string if the key/data pair is found, <b>FALSE</b>
 * otherwise.
 */
function dba_fetch($key, $skip, $dba): string|false {}

/**
 * Insert entry
 * @link https://php.net/manual/en/function.dba-insert.php
 * @param string $key <p>
 * The key of the entry to be inserted. If this key already exist in the
 * database, this function will fail. Use <b>dba_replace</b>
 * if you need to replace an existent key.
 * </p>
 * @param string $value <p>
 * The value to be inserted.
 * </p>
 * @param resource $dba <p>
 * The database handler, returned by <b>dba_open</b> or
 * <b>dba_popen</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function dba_insert(#[LanguageLevelTypeAware(['8.2' => 'array|string'], default: '')] $key, string $value, $dba): bool {}

/**
 * Replace or insert entry
 * @link https://php.net/manual/en/function.dba-replace.php
 * @param string $key <p>
 * The key of the entry to be replaced.
 * </p>
 * @param string $value <p>
 * The value to be replaced.
 * </p>
 * @param resource $dba <p>
 * The database handler, returned by <b>dba_open</b> or
 * <b>dba_popen</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function dba_replace(#[LanguageLevelTypeAware(['8.2' => 'array|string'], default: '')] $key, string $value, $dba): bool {}

/**
 * Fetch first key
 * @link https://php.net/manual/en/function.dba-firstkey.php
 * @param resource $dba <p>
 * The database handler, returned by <b>dba_open</b> or
 * <b>dba_popen</b>.
 * </p>
 * @return string|false the key on success or <b>FALSE</b> on failure.
 */
function dba_firstkey($dba): string|false {}

/**
 * Fetch next key
 * @link https://php.net/manual/en/function.dba-nextkey.php
 * @param resource $dba <p>
 * The database handler, returned by <b>dba_open</b> or
 * <b>dba_popen</b>.
 * </p>
 * @return string|false the key on success or <b>FALSE</b> on failure.
 */
function dba_nextkey($dba): string|false {}

/**
 * Optimize database
 * @link https://php.net/manual/en/function.dba-optimize.php
 * @param resource $dba <p>
 * The database handler, returned by <b>dba_open</b> or
 * <b>dba_popen</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function dba_optimize($dba): bool {}

/**
 * Synchronize database
 * @link https://php.net/manual/en/function.dba-sync.php
 * @param resource $dba <p>
 * The database handler, returned by <b>dba_open</b> or
 * <b>dba_popen</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function dba_sync($dba): bool {}

/**
 * List all the handlers available
 * @link https://php.net/manual/en/function.dba-handlers.php
 * @param bool $full_info [optional] <p>
 * Turns on/off full information display in the result.
 * </p>
 * @return array an array of database handlers. If <i>full_info</i>
 * is set to <b>TRUE</b>, the array will be associative with the handlers names as
 * keys, and their version information as value. Otherwise, the result will be
 * an indexed array of handlers names.
 * </p>
 * <p>
 * When the internal cdb library is used you will see
 * cdb and cdb_make.
 */
function dba_handlers(bool $full_info = false): array {}

/**
 * List all open database files
 * @link https://php.net/manual/en/function.dba-list.php
 * @return array An associative array, in the form resourceid =&gt; filename.
 */
function dba_list(): array {}

/**
 * Splits a key in string representation into array representation
 * @link https://php.net/manual/en/function.dba-key-split.php
 * @param string|false|null $key <p>
 * The key in string representation.
 * </p>
 * @return array|false an array of the form array(0 =&gt; group, 1 =&gt;
 * value_name). This function will return <b>FALSE</b> if
 * <i>key</i> is <b>NULL</b> or <b>FALSE</b>.
 */
function dba_key_split(string|false|null $key): array|false {}

// End of dba v.
<?php
/**
 * Couchbase extension stubs
 * Gathered from https://docs.couchbase.com/sdk-api/couchbase-php-client-2.3.0/index.html
 * Maintainer: sergey@couchbase.com
 *
 * https://github.com/couchbase/php-couchbase/tree/master/api
 */

/**
 * INI entries:
 *
 * * `couchbase.log_level` (string), default: `"WARN"`
 *
 *   controls amount of information, the module will send to PHP error log. Accepts the following values in order of
 *   increasing verbosity: `"FATAL"`, `"ERROR"`, `"WARN"`, `"INFO"`, `"DEBUG"`, `"TRACE"`.
 *
 * * `couchbase.encoder.format` (string), default: `"json"`
 *
 *   selects serialization format for default encoder (\Couchbase\defaultEncoder). Accepts the following values:
 *   * `"json"` - encodes objects and arrays as JSON object (using `json_encode()`), primitives written in stringified form,
 *      which is allowed for most of the JSON parsers as valid values. For empty arrays JSON array preferred, if it is
 *      necessary, use `new stdClass()` to persist empty JSON object. Note, that only JSON format considered supported by
 *      all Couchbase SDKs, everything else is private implementation (i.e. `"php"` format won't be readable by .NET SDK).
 *   * `"php"` - uses PHP serialize() method to encode the document.
 *   * `"igbinary"` - uses pecl/igbinary to encode the document in even more efficient than `"php"` format. Might not be
 *      available, if the Couchbase PHP SDK didn't find it during build phase, in this case constant
 *      \Couchbase\HAVE_IGBINARY will be false.
 *
 * * `couchbase.encoder.compression` (string), default: `"none"`
 *
 *   selects compression algorithm. Also see related compression options below. Accepts the following values:
 *   * `"fastlz"` - uses FastLZ algorithm. The module might be configured to use system fastlz library during build,
 *     othewise vendored version will be used. This algorithm is always available.
 *   * `"zlib"` - uses compression implemented by libz. Might not be available, if the system didn't have libz headers
 *     during build phase. In this case \Couchbase\HAVE_ZLIB will be false.
 *   * `"off"` or `"none"` - compression will be disabled, but the library will still read compressed values.
 *
 * * `couchbase.encoder.compression_threshold` (long), default: `0`
 *
 *   controls minimum size of the document value in bytes to use compression. For example, if threshold 100 bytes,
 *   and the document size is 50, compression will be disabled for this particular document.
 *
 * * `couchbase.encoder.compression_factor` (float), default: `0.0`
 *
 *   controls the minimum ratio of the result value and original document value to proceed with persisting compressed
 *   bytes. For example, the original document consists of 100 bytes. In this case factor 1.0 will require compressor
 *   to yield values not larger than 100 bytes (100/1.0), and 1.5 -- not larger than 66 bytes (100/1.5).
 *
 * * `couchbase.decoder.json_arrays` (boolean), default: `false`
 *
 *   controls the form of the documents, returned by the server if they were in JSON format. When true, it will generate
 *   arrays of arrays, otherwise instances of stdClass.
 *
 * * `couchbase.pool.max_idle_time_sec` (long), default: `60`
 *
 *   controls the maximum interval the underlying connection object could be idle, i.e. without any data/query
 *   operations. All connections which idle more than this interval will be closed automatically. Cleanup function
 *   executed after each request using RSHUTDOWN hook.
 *
 * @package Couchbase
 */

namespace Couchbase;

/** If igbinary extension was not found during build phase this constant will store 0 */
define("Couchbase\\HAVE_IGBINARY", 1);
/** If libz headers was not found during build phase this constant will store 0 */
define("Couchbase\\HAVE_ZLIB", 1);

/** Encodes documents as JSON objects (see INI section for details)
 * @see \Couchbase\basicEncoderV1
 */
define("Couchbase\\ENCODER_FORMAT_JSON", 0);
/** Encodes documents using pecl/igbinary encoder (see INI section for details)
 * @see \Couchbase\basicEncoderV1
 */
define("Couchbase\\ENCODER_FORMAT_IGBINARY", 1);
/** Encodes documents using PHP serialize() (see INI section for details)
 * @see \Couchbase\basicEncoderV1
 */
define("Couchbase\\ENCODER_FORMAT_PHP", 2);

/** Do not use compression for the documents
 * @see \Couchbase\basicEncoderV1
 */
define("Couchbase\\ENCODER_COMPRESSION_NONE", 0);
/** Use zlib compressor for the documents
 * @see \Couchbase\basicEncoderV1
 */
define("Couchbase\\ENCODER_COMPRESSION_ZLIB", 1);
/** Use FastLZ compressor for the documents
 * @see \Couchbase\basicEncoderV1
 */
define("Couchbase\\ENCODER_COMPRESSION_FASTLZ", 2);

/**
 * Compress input using FastLZ algorithm.
 *
 * @param string $data original data
 * @return string compressed binary string
 */
function fastlzCompress($data) {}

/**
 * Decompress input using FastLZ algorithm.
 *
 * @param string $data compressed binary string
 * @return string original data
 */
function fastlzDecompress($data) {}

/**
 * Compress input using zlib. Raises Exception when extension compiled without zlib support.
 *
 * @param string $data original data
 * @return string compressed binary string
 * @see \Couchbase\HAVE_ZLIB
 */
function zlibCompress($data) {}

/**
 * Compress input using zlib. Raises Exception when extension compiled without zlib support.
 *
 * @param string $data compressed binary string
 * @return string original data
 * @see \Couchbase\HAVE_ZLIB
 */
function zlibDecompress($data) {}

/**
 * Returns value as it received from the server without any transformations.
 *
 * It is useful for debug purpose to inspect bare value.
 *
 * @param string $bytes
 * @param int $flags
 * @param int $datatype
 * @return string Document as it received from the Couchbase.
 *
 * @see \Couchbase\Bucket::setTranscoder()
 */
function passthruDecoder($bytes, $flags, $datatype) {}

/**
 * Returns the value, which has been passed and zero as flags and datatype.
 *
 * It is useful for debug purposes, or when the value known to be a string, otherwise behavior is not defined (most
 * likely it will generate error).
 *
 * @param string $value document to be stored in the Couchbase
 * @return array Array with three values: [bytes, 0, 0]
 *
 * @see \Couchbase\Bucket::setTranscoder()
 */
function passthruEncoder($value) {}

/**
 * Decodes value using \Couchbase\basicDecoderV1.
 *
 * It passes `couchbase.decoder.*` INI properties as $options.
 *
 * @param string $bytes Binary string received from the Couchbase, which contains encoded document
 * @param int $flags Flags which describes document encoding
 * @param int $datatype Extra field for datatype (not used at the moment)
 * @return mixed Decoded document object
 *
 * @see \Couchbase\basicDecoderV1
 * @see \Couchbase\Bucket::setTranscoder()
 */
function defaultDecoder($bytes, $flags, $datatype) {}

/**
 * Encodes value using \Couchbase\basicDecoderV1.
 *
 * It passes `couchbase.encoder.*` INI properties as $options.
 *
 * @param mixed $value document to be stored in the Couchbase
 * @return array Array with three values: [bytes, flags, datatype]
 *
 * @see \Couchbase\basicDecoderV1
 * @see \Couchbase\Bucket::setTranscoder()
 */
function defaultEncoder($value) {}

/**
 * Decodes value according to Common Flags (RFC-20)
 *
 * @param string $bytes Binary string received from the Couchbase, which contains encoded document
 * @param int $flags Flags which describes document encoding
 * @param int $datatype Extra field for datatype (not used at the moment)
 * @param array $options
 * @return mixed Decoded document object
 *
 * @see https://github.com/couchbaselabs/sdk-rfcs RFC-20 at SDK RFCs repository
 */
function basicDecoderV1($bytes, $flags, $datatype, $options) {}

/**
 * Encodes value according to Common Flags (RFC-20)
 *
 * @param mixed $value document to be stored in the Couchbase
 * @param array $options Encoder options (see detailed description in INI section)
 *   * "sertype" (default: \Couchbase::ENCODER_FORMAT_JSON) encoding format to use
 *   * "cmprtype" (default: \Couchbase::ENCODER_COMPRESSION_NONE) compression type
 *   * "cmprthresh" (default: 0) compression threshold
 *   * "cmprfactor" (default: 0) compression factor
 * @return array Array with three values: [bytes, flags, datatype]
 *
 * @see https://github.com/couchbaselabs/sdk-rfcs RFC-20 at SDK RFCs repository
 */
function basicEncoderV1($value, $options) {}

/**
 * Exception represeting all errors generated by the extension
 */
class Exception extends \Exception {}

/**
 * Represents Couchbase Document, which stores metadata and the value.
 *
 * The instances of this class returned by K/V commands of the \Couchbase\Bucket
 *
 * @see \Couchbase\Bucket
 */
class Document
{
    /**
     * @var Exception exception object in case of error, or NULL
     */
    public $error;

    /**
     * @var mixed The value stored in the Couchbase.
     */
    public $value;

    /**
     * @var int Flags, describing the encoding of the document on the server side.
     */
    public $flags;

    /**
     * @var string The last known CAS value of the document
     */
    public $cas;

    /**
     * @var MutationToken
     * The optional, opaque mutation token set after a successful mutation.
     *
     * Note that the mutation token is always NULL, unless they are explicitly enabled on the
     * connection string (`?fetch_mutation_tokens=true`), the server version is supported (>= 4.0.0)
     * and the mutation operation succeeded.
     *
     * If set, it can be used for enhanced durability requirements, as well as optimized consistency
     * for N1QL queries.
     */
    public $token;
}

/**
 * A fragment of a JSON Document returned by the sub-document API.
 *
 * @see \Couchbase\Bucket::mutateIn()
 * @see \Couchbase\Bucket::lookupIn()
 */
class DocumentFragment
{
    /**
     * @var Exception exception object in case of error, or NULL
     */
    public $error;

    /**
     * @var mixed The value sub-document command returned.
     */
    public $value;

    /**
     * @var string The last known CAS value of the document
     */
    public $cas;

    /**
     * @var MutationToken
     * The optional, opaque mutation token related to updated document the environment.
     *
     * Note that the mutation token is always NULL, unless they are explicitly enabled on the
     * connection string (`?fetch_mutation_tokens=true`), the server version is supported (>= 4.0.0)
     * and the mutation operation succeeded.
     *
     * If set, it can be used for enhanced durability requirements, as well as optimized consistency
     * for N1QL queries.
     */
    public $token;
}

/**
 * Represents a Couchbase Server Cluster.
 *
 * It is an entry point to the library, and in charge of opening connections to the Buckets.
 * In addition it can instantiate \Couchbase\ClusterManager to peform cluster-wide operations.
 *
 * @see \Couchbase\Bucket
 * @see \Couchbase\ClusterManager
 * @see \Couchbase\Authenticator
 */
class Cluster
{
    /**
     * Create cluster object
     *
     * @param string $connstr connection string
     */
    public function __construct($connstr) {}

    /**
     * Open connection to the Couchbase bucket
     *
     * @param string $name Name of the bucket.
     * @param string $password Password of the bucket to override authenticator.
     * @return Bucket
     *
     * @see \Couchbase\Authenticator
     */
    public function openBucket($name = "default", $password = "") {}

    /**
     * Open management connection to the Couchbase cluster.
     *
     * @param string $username Name of the administrator to override authenticator or NULL.
     * @param string $password Password of the administrator to override authenticator or NULL.
     * @return ClusterManager
     *
     * @see \Couchbase\Authenticator
     */
    public function manager($username = null, $password = null) {}

    /**
     * Associate authenticator with Cluster
     *
     * @param Authenticator $authenticator
     * @return null
     *
     * @see \Couchbase\Authenticator
     * @see \Couchbase\ClassicAuthenticator
     * @see \Couchbase\PasswordAuthenticator
     */
    public function authenticate($authenticator) {}

    /**
     * Create \Couchbase\PasswordAuthenticator from given credentials and associate it with Cluster
     *
     * @param string $username
     * @param string $password
     * @return null
     *
     * @see \Couchbase\Authenticator
     * @see \Couchbase\PasswordAuthenticator
     */
    public function authenticateAs($username, $password) {}
}

/**
 * Provides management capabilities for a Couchbase Server Cluster
 *
 * @see \Couchbase\Cluster
 */
class ClusterManager
{
    /**
     * The user account managed by Couchbase Cluster.
     */
    public const RBAC_DOMAIN_LOCAL = 1;

    /**
     * The user account managed by external system (e.g. LDAP).
     */
    public const RBAC_DOMAIN_EXTERNAL = 2;

    final private function __construct() {}

    /**
     * Lists all buckets on this cluster.
     *
     * @return array
     */
    public function listBuckets() {}

    /**
     * Creates new bucket
     *
     * @param string $name Name of the bucket
     * @param array $options Bucket options
     *   * "authType" (default: "sasl") type of the bucket authentication
     *   * "bucketType" (default: "couchbase") type of the bucket
     *   * "ramQuotaMB" (default: 100) memory quota of the bucket
     *   * "replicaNumber" (default: 1) number of replicas.
     *
     * @see https://developer.couchbase.com/documentation/server/current/rest-api/rest-bucket-create.html
     *   More options and details
     */
    public function createBucket($name, $options = []) {}

    /**
     * Removes a bucket identified by its name.
     *
     * @param string $name name of the bucket
     *
     * @see https://developer.couchbase.com/documentation/server/current/rest-api/rest-bucket-delete.html
     *   More details
     */
    public function removeBucket($name) {}

    /**
     * Provides information about the cluster.
     *
     * Returns an associative array of status information as seen on the cluster.  The exact structure of the returned
     * data can be seen in the Couchbase Manual by looking at the cluster /info endpoint.
     *
     * @return array
     *
     * @see https://developer.couchbase.com/documentation/server/current/rest-api/rest-cluster-get.html
     *   Retrieving Cluster Information
     */
    public function info() {}

    /**
     * Lists all users on this cluster.
     *
     * @param int $domain RBAC domain
     *
     * @return array
     *
     * @see \Couchbase\ClusterManager::RBAC_DOMAIN_LOCAL
     * @see \Couchbase\ClusterManager::RBAC_DOMAIN_EXTERNAL
     */
    public function listUsers($domain = RBAC_DOMAIN_LOCAL) {}

    /**
     * Fetch single user by its name
     *
     * @param string $username The user's identifier
     * @param int $domain RBAC domain
     *
     * @return array
     *
     * @see \Couchbase\ClusterManager::RBAC_DOMAIN_LOCAL
     * @see \Couchbase\ClusterManager::RBAC_DOMAIN_EXTERNAL
     */
    public function getUser($username, $domain = RBAC_DOMAIN_LOCAL) {}

    /**
     * Creates new user
     *
     * @param string $name Name of the user
     * @param \Couchbase\UserSettings $settings settings (credentials and roles)
     * @param int $domain RBAC domain
     *
     * @see https://developer.couchbase.com/documentation/server/5.0/rest-api/rbac.html
     *   More options and details
     * @see \Couchbase\ClusterManager::RBAC_DOMAIN_LOCAL
     * @see \Couchbase\ClusterManager::RBAC_DOMAIN_EXTERNAL
     */
    public function upsertUser($name, $settings, $domain = RBAC_DOMAIN_LOCAL) {}

    /**
     * Removes a user identified by its name.
     *
     * @param string $name name of the bucket
     * @param int $domain RBAC domain
     *
     * @see https://developer.couchbase.com/documentation/server/5.0/rest-api/rbac.html
     *   More details
     * @see \Couchbase\ClusterManager::RBAC_DOMAIN_LOCAL
     * @see \Couchbase\ClusterManager::RBAC_DOMAIN_EXTERNAL
     */
    public function removeUser($name, $domain = RBAC_DOMAIN_LOCAL) {}
}

/**
 * Represents settings for new/updated user.
 *
 * @see https://developer.couchbase.com/documentation/server/5.0/rest-api/rbac.html
 */
class UserSettings
{
    /**
     * Sets full name of the user (optional).
     *
     * @param string $fullName Full name of the user
     *
     * @return \Couchbase\UserSettings
     *
     * @see https://developer.couchbase.com/documentation/server/5.0/rest-api/rbac.html
     *   More details
     */
    public function fullName($fullName) {}

    /**
     * Sets password of the user.
     *
     * @param string $password Password of the user
     *
     * @return \Couchbase\UserSettings
     *
     * @see https://developer.couchbase.com/documentation/server/5.0/rest-api/rbac.html
     *   More details
     */
    public function password($password) {}

    /**
     * Adds role to the list of the accessible roles of the user.
     *
     * @param string $role identifier of the role
     * @param string $bucket the bucket where this role applicable (or `*` for all buckets)
     *
     * @return \Couchbase\UserSettings
     *
     * @see https://developer.couchbase.com/documentation/server/5.0/rest-api/rbac.html
     *   More details
     */
    public function role($role, $bucket = null) {}
}

/**
 * Represents connection to the Couchbase Server
 *
 * @property int $operationTimeout
 *   The operation timeout (in microseconds) is the maximum amount of time the
 *   library will wait for an operation to receive a response before invoking
 *   its callback with a failure status.
 *
 *   An operation may timeout if:
 *
 *   * A server is taking too long to respond
 *   * An updated cluster configuration has not been promptly received
 *
 * @property int $viewTimeout
 *   The I/O timeout (in microseconds) for HTTP requests to Couchbase Views API
 *
 * @property int $n1qlTimeout
 *   The I/O timeout (in microseconds) for N1QL queries.
 *
 * @property int $httpTimeout
 *   The I/O timeout (in microseconds) for HTTP queries (management API).
 *
 * @property int $configTimeout
 *   How long (in microseconds) the client will wait to obtain the initial
 *   configuration.
 *
 * @property int $configNodeTimeout
 *   Per-node configuration timeout (in microseconds).
 *
 *   This timeout sets the amount of time to wait for each node within
 *   the bootstrap/configuration process. This interval is a subset of
 *   the $configTimeout option mentioned above and is intended to ensure
 *   that the bootstrap process does not wait too long for a given node.
 *   Nodes that are physically offline may never respond and it may take
 *   a long time until they are detected as being offline.
 *
 * @property int $configDelay
 *   Config refresh throttling
 *
 *   Modify the amount of time (in microseconds) before the configiration
 *   error threshold will forcefully be set to its maximum number forcing
 *   a configuration refresh.
 *
 *   Note that if you expect a high number of timeouts in your operations,
 *   you should set this to a high number. If you are using the default
 *   timeout setting, then this value is likely optimal.
 *
 * @property int $htconfigIdleTimeout
 *   Idling/Persistence for HTTP bootstrap (in microseconds)
 *
 *   By default the behavior of the library for HTTP bootstrap is to keep
 *   the stream open at all times (opening a new stream on a different host
 *   if the existing one is broken) in order to proactively receive
 *   configuration updates.
 *
 *   The default value for this setting is -1. Changing this to another
 *   number invokes the following semantics:
 *
 *   * The configuration stream is not kept alive indefinitely. It is kept
 *     open for the number of seconds specified in this setting. The socket
 *     is closed after a period of inactivity (indicated by this setting).
 *
 *   * If the stream is broken (and no current refresh was requested by
 *     the client) then a new stream is not opened.
 *
 * @property int $durabilityInterval
 *   The time (in microseconds) the client will wait between repeated probes
 *   to a given server.
 *
 * @property int $durabilityTimeout
 *   The time (in microseconds) the client will spend sending repeated probes
 *   to a given key's vBucket masters and replicas before they are deemed not
 *   to have satisfied the durability requirements
 *
 * @see https://developer.couchbase.com/documentation/server/current/sdk/php/start-using-sdk.html
 *   Start Using SDK
 */
class Bucket
{
    /** Ping data (Key/Value) service. */
    public const PINGSVC_KV = 0x01;

    /** Ping query (N1QL) service. */
    public const PINGSVC_N1QL = 0x02;

    /** Ping views (Map/Reduce) service. */
    public const PINGSVC_VIEWS = 0x04;

    /** Ping full text search (FTS) service. */
    public const PINGSVC_FTS = 0x08;

    final private function __construct() {}

    /**
     * @param string $name
     * @return int
     */
    final private function __get($name) {}

    /**
     * @param string $name
     * @param int $value
     * @return int
     */
    final private function __set($name, $value) {}

    /**
     * Returns the name of the bucket for current connection
     *
     * @return string
     */
    public function getName() {}

    /**
     * Returns an instance of a CouchbaseBucketManager for performing management operations against a bucket.
     *
     * @return BucketManager
     */
    public function manager() {}

    /**
     * Sets custom encoder and decoder functions for handling serialization.
     *
     * @param callable $encoder
     * @param callable $decoder
     *
     * @see \Couchbase\defaultEncoder
     * @see \Couchbase\defaultDecoder
     * @see \Couchbase\passthruEncoder
     * @see \Couchbase\passthruDecoder
     */
    public function setTranscoder($encoder, $decoder) {}

    /**
     * Retrieves a document
     *
     * @param string|array $ids one or more IDs
     * @param array $options options
     *   * "lockTime" non zero if the documents have to be locked
     *   * "expiry" non zero if the expiration time should be updated
     *   * "groupid" override value for hashing (not recommended to use)
     * @return \Couchbase\Document|array document or list of the documents
     *
     * @see \Couchbase\Bucket::getAndLock()
     * @see \Couchbase\Bucket::getAndTouch()
     * @see \Couchbase\Bucket::unlock()
     * @see \Couchbase\Bucket::touch()
     * @see https://developer.couchbase.com/documentation/server/current/sdk/core-operations.html
     *   Overview of K/V operations
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/document-operations.html
     *   More details about K/V operations for PHP SDK
     */
    public function get($ids, $options = []) {}

    /**
     * Retrieves a document and locks it.
     *
     * After the document has been locked on the server, its CAS would be masked,
     * and all mutations of it will be rejected until the server unlocks the document
     * automatically or it will be done manually with \Couchbase\Bucket::unlock() operation.
     *
     * @param string|array $ids one or more IDs
     * @param int $lockTime time to lock the documents
     * @param array $options options
     *   * "groupid" override value for hashing (not recommended to use)
     * @return \Couchbase\Document|array document or list of the documents
     *
     * @see \Couchbase\Bucket::unlock()
     * @see https://developer.couchbase.com/documentation/server/current/sdk/core-operations.html
     *   Overview of K/V operations
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/document-operations.html
     *   More details about K/V operations for PHP SDK
     * @see https://forums.couchbase.com/t/is-there-a-way-to-do-pessimistic-locking-for-more-than-30-seconds/10666/3
     *   Forum post about getting server defaults for the $lockTime
     */
    public function getAndLock($ids, $lockTime, $options = []) {}

    /**
     * Retrieves a document and updates its expiration time.
     *
     * @param string|array $ids one or more IDs
     * @param int $expiry time after which the document will not be accessible.
     *      If larger than 30 days (60*60*24*30), it will be interpreted by the
     *      server as absolute UNIX time (seconds from epoch 1970-01-01T00:00:00).
     * @param array $options options
     *   * "groupid" override value for hashing (not recommended to use)
     * @return \Couchbase\Document|array document or list of the documents
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/core-operations.html
     *   Overview of K/V operations
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/document-operations.html
     *   More details about K/V operations for PHP SDK
     */
    public function getAndTouch($ids, $expiry, $options = []) {}

    /**
     * Retrieves a document from a replica.
     *
     * @param string|array $ids one or more IDs
     * @param array $options options
     *   * "index" the replica index. If the index is zero, it will return
     *      first successful replica, otherwise it will read only selected node.
     *   * "groupid" override value for hashing (not recommended to use)
     * @return \Couchbase\Document|array document or list of the documents
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/core-operations.html
     *   Overview of K/V operations
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/document-operations.html
     *   More details about K/V operations for PHP SDK
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/failure-considerations.html
     *  More about failure considerations.
     */
    public function getFromReplica($ids, $options = []) {}

    /**
     * Inserts or updates a document, depending on whether the document already exists on the cluster.
     *
     * @param string|array $ids one or more IDs
     * @param mixed $value value of the document
     * @param array $options options
     *   * "expiry" document expiration time in seconds. If larger than 30 days (60*60*24*30),
     *      it will be interpreted by the server as absolute UNIX time (seconds from epoch
     *      1970-01-01T00:00:00).
     *   * "persist_to" how many nodes the key should be persisted to (including master).
     *      If set to 0 then persistence will not be checked. If set to a negative
     *      number, will be set to the maximum number of nodes to which persistence
     *      is possible (which will always contain at least the master node).
     *   * "replicate_to" how many nodes the key should be persisted to (excluding master).
     *      If set to 0 then replication will not be checked. If set to a negative
     *      number, will be set to the maximum number of nodes to which replication
     *      is possible (which may be 0 if the bucket is not configured for replicas).
     *   * "flags" override flags (not recommended to use)
     *   * "groupid" override value for hashing (not recommended to use)
     * @return \Couchbase\Document|array document or list of the documents
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/core-operations.html
     *   Overview of K/V operations
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/document-operations.html
     *   More details about K/V operations for PHP SDK
     */
    public function upsert($ids, $value, $options = []) {}

    /**
     * Inserts a document. This operation will fail if the document already exists on the cluster.
     *
     * @param string|array $ids one or more IDs
     * @param mixed $value value of the document
     * @param array $options options
     *   * "expiry" document expiration time in seconds. If larger than 30 days (60*60*24*30),
     *      it will be interpreted by the server as absolute UNIX time (seconds from epoch
     *      1970-01-01T00:00:00).
     *   * "persist_to" how many nodes the key should be persisted to (including master).
     *      If set to 0 then persistence will not be checked. If set to a negative
     *      number, will be set to the maximum number of nodes to which persistence
     *      is possible (which will always contain at least the master node).
     *   * "replicate_to" how many nodes the key should be persisted to (excluding master).
     *      If set to 0 then replication will not be checked. If set to a negative
     *      number, will be set to the maximum number of nodes to which replication
     *      is possible (which may be 0 if the bucket is not configured for replicas).
     *   * "flags" override flags (not recommended to use)
     *   * "groupid" override value for hashing (not recommended to use)
     * @return \Couchbase\Document|array document or list of the documents
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/core-operations.html
     *   Overview of K/V operations
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/document-operations.html
     *   More details about K/V operations for PHP SDK
     */
    public function insert($ids, $value, $options = []) {}

    /**
     * Replaces a document. This operation will fail if the document does not exists on the cluster.
     *
     * @param string|array $ids one or more IDs
     * @param mixed $value value of the document
     * @param array $options options
     *   * "cas" last known document CAS, which serves for optimistic locking.
     *   * "expiry" document expiration time in seconds. If larger than 30 days (60*60*24*30),
     *      it will be interpreted by the server as absolute UNIX time (seconds from epoch
     *      1970-01-01T00:00:00).
     *   * "persist_to" how many nodes the key should be persisted to (including master).
     *      If set to 0 then persistence will not be checked. If set to a negative
     *      number, will be set to the maximum number of nodes to which persistence
     *      is possible (which will always contain at least the master node).
     *   * "replicate_to" how many nodes the key should be persisted to (excluding master).
     *      If set to 0 then replication will not be checked. If set to a negative
     *      number, will be set to the maximum number of nodes to which replication
     *      is possible (which may be 0 if the bucket is not configured for replicas).
     *   * "flags" override flags (not recommended to use)
     *   * "groupid" override value for hashing (not recommended to use)
     * @return \Couchbase\Document|array document or list of the documents
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/core-operations.html
     *   Overview of K/V operations
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/document-operations.html
     *   More details about K/V operations for PHP SDK
     */
    public function replace($ids, $value, $options = []) {}

    /**
     * Appends content to a document.
     *
     * On the server side it just contatenate passed value to the existing one.
     * Note that this might make the value un-decodable. Consider sub-document API
     * for partial updates of the JSON documents.
     *
     * @param string|array $ids one or more IDs
     * @param mixed $value value of the document
     * @param array $options options
     *   * "cas" last known document CAS, which serves for optimistic locking.
     *   * "expiry" document expiration time in seconds. If larger than 30 days (60*60*24*30),
     *      it will be interpreted by the server as absolute UNIX time (seconds from epoch
     *      1970-01-01T00:00:00).
     *   * "persist_to" how many nodes the key should be persisted to (including master).
     *      If set to 0 then persistence will not be checked. If set to a negative
     *      number, will be set to the maximum number of nodes to which persistence
     *      is possible (which will always contain at least the master node).
     *   * "replicate_to" how many nodes the key should be persisted to (excluding master).
     *      If set to 0 then replication will not be checked. If set to a negative
     *      number, will be set to the maximum number of nodes to which replication
     *      is possible (which may be 0 if the bucket is not configured for replicas).
     *   * "groupid" override value for hashing (not recommended to use)
     * @return \Couchbase\Document|array document or list of the documents
     *
     * @see \Couchbase\Bucket::mutateIn()
     * @see https://developer.couchbase.com/documentation/server/current/sdk/core-operations.html
     *   Overview of K/V operations
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/document-operations.html
     *   More details about K/V operations for PHP SDK
     */
    public function append($ids, $value, $options = []) {}

    /**
     * Prepends content to a document.
     *
     * On the server side it just contatenate existing value to the passed one.
     * Note that this might make the value un-decodable. Consider sub-document API
     * for partial updates of the JSON documents.
     *
     * @param string|array $ids one or more IDs
     * @param mixed $value value of the document
     * @param array $options options
     *   * "cas" last known document CAS, which serves for optimistic locking.
     *   * "expiry" document expiration time in seconds. If larger than 30 days (60*60*24*30),
     *      it will be interpreted by the server as absolute UNIX time (seconds from epoch
     *      1970-01-01T00:00:00).
     *   * "persist_to" how many nodes the key should be persisted to (including master).
     *      If set to 0 then persistence will not be checked. If set to a negative
     *      number, will be set to the maximum number of nodes to which persistence
     *      is possible (which will always contain at least the master node).
     *   * "replicate_to" how many nodes the key should be persisted to (excluding master).
     *      If set to 0 then replication will not be checked. If set to a negative
     *      number, will be set to the maximum number of nodes to which replication
     *      is possible (which may be 0 if the bucket is not configured for replicas).
     *   * "groupid" override value for hashing (not recommended to use)
     * @return \Couchbase\Document|array document or list of the documents
     *
     * @see \Couchbase\Bucket::mutateIn()
     * @see https://developer.couchbase.com/documentation/server/current/sdk/core-operations.html
     *   Overview of K/V operations
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/document-operations.html
     *   More details about K/V operations for PHP SDK
     */
    public function prepend($ids, $value, $options = []) {}

    /**
     * Removes the document.
     *
     * @param string|array $ids one or more IDs
     * @param array $options options
     *   * "cas" last known document CAS, which serves for optimistic locking.
     *   * "groupid" override value for hashing (not recommended to use)
     * @return \Couchbase\Document|array document or list of the documents
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/core-operations.html
     *   Overview of K/V operations
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/document-operations.html
     *   More details about K/V operations for PHP SDK
     */
    public function remove($ids, $options = []) {}

    /**
     * Unlocks previously locked document
     *
     * @param string|array $ids one or more IDs
     * @param array $options options
     *   * "cas" last known document CAS, which has been returned by locking command.
     *   * "groupid" override value for hashing (not recommended to use)
     * @return \Couchbase\Document|array document or list of the documents
     *
     * @see \Couchbase\Bucket::get()
     * @see \Couchbase\Bucket::getAndLock()
     * @see https://developer.couchbase.com/documentation/server/current/sdk/core-operations.html
     *   Overview of K/V operations
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/document-operations.html
     *   More details about K/V operations for PHP SDK
     */
    public function unlock($ids, $options = []) {}

    /**
     * Updates document's expiration time.
     *
     * @param string|array $ids one or more IDs
     * @param int $expiry time after which the document will not be accessible.
     *      If larger than 30 days (60*60*24*30), it will be interpreted by the
     *      server as absolute UNIX time (seconds from epoch 1970-01-01T00:00:00).
     * @param array $options options
     *   * "groupid" override value for hashing (not recommended to use)
     * @return \Couchbase\Document|array document or list of the documents
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/core-operations.html
     *   Overview of K/V operations
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/document-operations.html
     *   More details about K/V operations for PHP SDK
     */
    public function touch($ids, $expiry, $options = []) {}

    /**
     * Increments or decrements a key (based on $delta)
     *
     * @param string|array $ids one or more IDs
     * @param int $delta the number whih determines the sign (positive/negative) and the value of the increment
     * @param array $options options
     *   * "initial" initial value of the counter if it does not exist
     *   * "expiry" time after which the document will not be accessible.
     *      If larger than 30 days (60*60*24*30), it will be interpreted by the
     *      server as absolute UNIX time (seconds from epoch 1970-01-01T00:00:00).
     *   * "groupid" override value for hashing (not recommended to use)
     * @return \Couchbase\Document|array document or list of the documents
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/core-operations.html
     *   Overview of K/V operations
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/document-operations.html
     *   More details about K/V operations for PHP SDK
     */
    public function counter($ids, $delta = 1, $options = []) {}

    /**
     * Returns a builder for reading subdocument API.
     *
     * @param string $id The ID of the JSON document
     * @return LookupInBuilder
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/subdocument-operations.html
     *   Overview of Sub-Document Operations
     */
    public function lookupIn($id) {}

    /**
     * Retrieves specified paths in JSON document
     *
     * This is essentially a shortcut for `lookupIn($id)->get($paths)->execute()`.
     *
     * @param string $id The ID of the JSON document
     * @param string ...$paths List of the paths inside JSON documents (see "Path syntax" section of the
     *   "Sub-Document Operations" documentation).
     * @return \Couchbase\DocumentFragment
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/subdocument-operations.html
     *   Overview of Sub-Document Operations
     */
    public function retrieveIn($id, ...$paths) {}

    /**
     * Returns a builder for writing subdocument API.
     *
     * @param string $id The ID of the JSON document
     * @param string $cas Last known document CAS value for optimisti locking
     * @return MutateInBuilder
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/subdocument-operations.html
     *   Overview of Sub-Document Operations
     */
    public function mutateIn($id, $cas) {}

    /**
     * Performs a query to Couchbase Server
     *
     * @param N1qlQuery|ViewQuery|SpatialViewQuery|SearchQuery|AnalyticsQuery $query
     * @param bool $jsonAsArray if true, the values in the result rows (or hits) will be represented as
     *    PHP arrays, otherwise they will be instances of the `stdClass`
     * @return object Query-specific result object.
     *
     * @see \Couchbase\N1qlQuery
     * @see \Couchbase\SearchQuery
     * @see \Couchbase\ViewQuery
     * @see \Couchbase\SpatialViewQuery
     */
    public function query($query, $jsonAsArray = false) {}

    /**
     * Returns size of the map
     *
     * @param string $id ID of the document
     * @return int number of the key-value pairs
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/datastructures.html
     *   More details on Data Structures
     * @see https://developer.couchbase.com/documentation/server/current/sdk/subdocument-operations.html
     *   Overview of Sub-Document Operations
     */
    public function mapSize($id) {}

    /**
     * Add key to the map
     *
     * @param string $id ID of the document
     * @param string $key key
     * @param mixed $value value
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/datastructures.html
     *   More details on Data Structures
     * @see https://developer.couchbase.com/documentation/server/current/sdk/subdocument-operations.html
     *   Overview of Sub-Document Operations
     */
    public function mapAdd($id, $key, $value) {}

    /**
     * Removes key from the map
     *
     * @param string $id ID of the document
     * @param string $key key
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/datastructures.html
     *   More details on Data Structures
     * @see https://developer.couchbase.com/documentation/server/current/sdk/subdocument-operations.html
     *   Overview of Sub-Document Operations
     */
    public function mapRemove($id, $key) {}

    /**
     * Get an item from a map
     *
     * @param string $id ID of the document
     * @param string $key key
     * @return mixed value associated with the key
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/datastructures.html
     *   More details on Data Structures
     * @see https://developer.couchbase.com/documentation/server/current/sdk/subdocument-operations.html
     *   Overview of Sub-Document Operations
     */
    public function mapGet($id, $key) {}

    /**
     * Returns size of the set
     *
     * @param string $id ID of the document
     * @return int number of the elements
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/datastructures.html
     *   More details on Data Structures
     * @see https://developer.couchbase.com/documentation/server/current/sdk/subdocument-operations.html
     *   Overview of Sub-Document Operations
     */
    public function setSize($id) {}

    /**
     * Add value to the set
     *
     * Note, that currently only primitive values could be stored in the set (strings, integers and booleans).
     *
     * @param string $id ID of the document
     * @param string|int|float|bool $value new value
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/datastructures.html
     *   More details on Data Structures
     * @see https://developer.couchbase.com/documentation/server/current/sdk/subdocument-operations.html
     *   Overview of Sub-Document Operations
     */
    public function setAdd($id, $value) {}

    /**
     * Check if the value exists in the set
     *
     * @param string $id ID of the document
     * @param string|int|float|bool $value value to check
     * @return bool true if the value exists in the set
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/datastructures.html
     *   More details on Data Structures
     * @see https://developer.couchbase.com/documentation/server/current/sdk/subdocument-operations.html
     *   Overview of Sub-Document Operations
     */
    public function setExists($id, $value) {}

    /**
     * Remove value from the set
     *
     * @param string $id ID of the document
     * @param string|int|float|bool $value value to remove
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/datastructures.html
     *   More details on Data Structures
     * @see https://developer.couchbase.com/documentation/server/current/sdk/subdocument-operations.html
     *   Overview of Sub-Document Operations
     */
    public function setRemove($id, $value) {}

    /**
     * Returns size of the list
     *
     * @param string $id ID of the document
     * @return int number of the elements
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/datastructures.html
     *   More details on Data Structures
     * @see https://developer.couchbase.com/documentation/server/current/sdk/subdocument-operations.html
     *   Overview of Sub-Document Operations
     */
    public function listSize($id) {}

    /**
     * Add an element to the end of the list
     *
     * @param string $id ID of the document
     * @param mixed $value new value
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/datastructures.html
     *   More details on Data Structures
     * @see https://developer.couchbase.com/documentation/server/current/sdk/subdocument-operations.html
     *   Overview of Sub-Document Operations
     */
    public function listPush($id, $value) {}

    /**
     * Add an element to the beginning of the list
     *
     * @param string $id ID of the document
     * @param mixed $value new value
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/datastructures.html
     *   More details on Data Structures
     * @see https://developer.couchbase.com/documentation/server/current/sdk/subdocument-operations.html
     *   Overview of Sub-Document Operations
     */
    public function listShift($id, $value) {}

    /**
     * Remove an element at the given position
     *
     * @param string $id ID of the document
     * @param int $index index of the element to be removed
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/datastructures.html
     *   More details on Data Structures
     * @see https://developer.couchbase.com/documentation/server/current/sdk/subdocument-operations.html
     *   Overview of Sub-Document Operations
     */
    public function listRemove($id, $index) {}

    /**
     * Get an element at the given position
     *
     * @param string $id ID of the document
     * @param int $index index of the element
     * @return mixed the value
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/datastructures.html
     *   More details on Data Structures
     * @see https://developer.couchbase.com/documentation/server/current/sdk/subdocument-operations.html
     *   Overview of Sub-Document Operations
     */
    public function listGet($id, $index) {}

    /**
     * Set an element at the given position
     *
     * @param string $id ID of the document
     * @param int $index index of the element
     * @param mixed $value new value
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/datastructures.html
     *   More details on Data Structures
     * @see https://developer.couchbase.com/documentation/server/current/sdk/subdocument-operations.html
     *   Overview of Sub-Document Operations
     */
    public function listSet($id, $index, $value) {}

    /**
     * Check if the list contains specified value
     *
     * @param string $id ID of the document
     * @param mixed $value value to look for
     * @return bool true if the list contains the value
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/datastructures.html
     *   More details on Data Structures
     * @see https://developer.couchbase.com/documentation/server/current/sdk/subdocument-operations.html
     *   Overview of Sub-Document Operations
     */
    public function listExists($id, $value) {}

    /**
     * Returns size of the queue
     *
     * @param string $id ID of the document
     * @return int number of the elements in the queue
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/datastructures.html
     *   More details on Data Structures
     * @see https://developer.couchbase.com/documentation/server/current/sdk/subdocument-operations.html
     *   Overview of Sub-Document Operations
     */
    public function queueSize($id) {}

    /**
     * Checks if the queue contains specified value
     *
     * @param string $id ID of the document
     * @param mixed $value value to look for
     * @return bool true if the queue contains the value
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/datastructures.html
     *   More details on Data Structures
     * @see https://developer.couchbase.com/documentation/server/current/sdk/subdocument-operations.html
     *   Overview of Sub-Document Operations
     */
    public function queueExists($id, $value) {}

    /**
     * Add an element to the beginning of the queue
     *
     * @param string $id ID of the document
     * @param mixed $value new value
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/datastructures.html
     *   More details on Data Structures
     * @see https://developer.couchbase.com/documentation/server/current/sdk/subdocument-operations.html
     *   Overview of Sub-Document Operations
     */
    public function queueAdd($id, $value) {}

    /**
     * Remove the element at the end of the queue and return it
     *
     * @param string $id ID of the document
     * @return mixed removed value
     *
     * @see https://developer.couchbase.com/documentation/server/current/sdk/php/datastructures.html
     *   More details on Data Structures
     * @see https://developer.couchbase.com/documentation/server/current/sdk/subdocument-operations.html
     *   Overview of Sub-Document Operations
     */
    public function queueRemove($id) {}

    /**
     * Try to reach specified services, and measure network latency.
     *
     * @param int $services bitwise mask of required services (and all services when zero)
     * @param string $reportId custom identifier, which will be appended to "id" property in report
     * @return array the report object
     *
     * @see \Couchbase\Bucket::PINGSVC_KV
     * @see \Couchbase\Bucket::PINGSVC_N1QL
     * @see \Couchbase\Bucket::PINGSVC_VIEWS
     * @see \Couchbase\Bucket::PINGSVC_FTS
     *
     * @see https://github.com/couchbaselabs/sdk-rfcs/blob/master/rfc/0034-health-check.md
     *   SDK RFC #34, which describes the feature and report layout.
     */
    public function ping($services = 0, $reportId = null) {}

    /**
     * Collect and return information about state of internal network connections.
     *
     * @param string $reportId custom identifier, which will be appended to "id" property in report
     * @return array the report object
     *
     * @see https://github.com/couchbaselabs/sdk-rfcs/blob/master/rfc/0034-health-check.md
     *   SDK RFC #34, which describes the feature and report layout.
     */
    public function diag($reportId = null) {}

    /**
     * Encrypt fields inside specified document.
     *
     * @param array $document document structure
     * @param array $fieldOptions specification for fields needed to be encrypted. Where 'alg' contains
     *   a string with alias of the registed crypto provider, and 'name' contains the name of the field.
     * @param string $prefix optional prefix for modified field (when null, the library will use "__crypt")
     *
     * @return array where the fields encrypted
     *
     * @see https://github.com/couchbase/php-couchbase-encryption
     */
    public function encryptFields($document, $fieldOptions, $prefix = null) {}

    /**
     * Decrypt fields inside specified document.
     *
     * @param array $document document structure
     * @param array $fieldOptions specification for fields needed to be decrypted. Where 'alg' contains
     *   a string with alias of the registed crypto provider, and 'name' contains the name of the field.
     * @param string $prefix optional prefix for modified field (when null, the library will use "__crypt")
     *
     * @return array where the fields decrypted
     *
     * @see https://github.com/couchbase/php-couchbase-encryption
     */
    public function decryptFields($document, $fieldOptions, $prefix = null) {}
}

/**
 * Provides management capabilities for the Couchbase Bucket
 */
class BucketManager
{
    final private function __construct() {}

    /**
     * Returns information about the bucket
     *
     * Returns an associative array of status information as seen by the cluster for
     * this bucket. The exact structure of the returned data can be seen in the Couchbase
     * Manual by looking at the bucket /info endpoint.
     *
     * @return array
     *
     * @see https://developer.couchbase.com/documentation/server/current/rest-api/rest-bucket-info.html
     *   Getting Single Bucket Information
     */
    public function info() {}

    /**
     * Flushes the bucket (clears all data)
     */
    public function flush() {}

    /**
     * Returns all design documents of the bucket.
     *
     * @return array
     */
    public function listDesignDocuments() {}

    /**
     * Get design document by its name
     *
     * @param string $name name of the design document (without _design/ prefix)
     * @return array
     */
    public function getDesignDocument($name) {}

    /**
     * Removes design document by its name
     *
     * @param string $name name of the design document (without _design/ prefix)
     */
    public function removeDesignDocument($name) {}

    /**
     * Creates or replaces design document.
     *
     * @param string $name name of the design document (without _design/ prefix)
     * @param array $document
     */
    public function upsertDesignDocument($name, $document) {}

    /**
     * Inserts design document and fails if it is exist already.
     *
     * @param string $name name of the design document (without _design/ prefix)
     * @param array $document
     */
    public function insertDesignDocument($name, $document) {}

    /**
     * List all N1QL indexes that are registered for the current bucket.
     *
     * @return array
     */
    public function listN1qlIndexes() {}

    /**
     * Create a primary N1QL index.
     *
     * @param string $customName the custom name for the primary index.
     * @param bool $ignoreIfExist if a primary index already exists, an exception
     *   will be thrown unless this is set to true.
     * @param bool $defer true to defer index building.
     */
    public function createN1qlPrimaryIndex($customName = '', $ignoreIfExist = false, $defer = false) {}

    /**
     * Create secondary N1QL index.
     *
     * @param string $name name of the index
     * @param array $fields list of JSON fields to index
     * @param string $whereClause the WHERE clause of the index.
     * @param bool $ignoreIfExist if a secondary index already exists, an exception
     *   will be thrown unless this is set to true.
     * @param bool $defer true to defer index building.
     */
    public function createN1qlIndex($name, $fields, $whereClause = '', $ignoreIfExist = false, $defer = false) {}

    /**
     * Drop the given primary index
     *
     * @param string $customName the custom name for the primary index
     * @param bool $ignoreIfNotExist if a primary index does not exist, an exception
     *   will be thrown unless this is set to true.
     */
    public function dropN1qlPrimaryIndex($customName = '', $ignoreIfNotExist = false) {}

    /**
     * Drop the given secondary index
     *
     * @param string $name the index name
     * @param bool $ignoreIfNotExist if a secondary index does not exist, an exception
     *   will be thrown unless this is set to true.
     */
    public function dropN1qlIndex($name, $ignoreIfNotExist = false) {}
}

/**
 * Interface of authentication containers.
 *
 * @see \Couchbase\Cluster::authenticate()
 * @see \Couchbase\ClassicAuthenticator
 * @see \Couchbase\PasswordAuthenticator
 */
interface Authenticator {}

/**
 * Authenticator based on login/password credentials.
 *
 * This authenticator uses separate credentials for Cluster management interface
 * as well as for each bucket.
 *
 *
 *
 * @see \Couchbase\Cluster::authenticate()
 * @see \Couchbase\Authenticator
 */
class ClassicAuthenticator implements Authenticator
{
    /**
     * Registers cluster management credentials in the container
     *
     * @param string $username admin username
     * @param string $password admin password
     */
    public function cluster($username, $password) {}

    /**
     * Registers bucket credentials in the container
     *
     * @param string $name bucket name
     * @param string $password bucket password
     */
    public function bucket($name, $password) {}
}

/**
 * Authenticator based on RBAC feature of Couchbase Server 5+.
 *
 * This authenticator uses single credentials for all operations (data and management).
 *
 * @see \Couchbase\Cluster::authenticate()
 * @see \Couchbase\Authenticator
 */
class PasswordAuthenticator implements Authenticator
{
    /**
     * Sets username
     *
     * @param string $username username
     * @return \Couchbase\PasswordAuthenticator
     */
    public function username($username) {}

    /**
     * Sets password
     *
     * @param string $password password
     * @return \Couchbase\PasswordAuthenticator
     */
    public function password($password) {}
}

/**
 * An object which contains meta information of the document needed to enforce query consistency.
 */
class MutationToken
{
    final private function __construct() {}

    /**
     * Creates new mutation token
     *
     * @param string $bucketName name of the bucket
     * @param int $vbucketId partition number
     * @param string $vbucketUuid UUID of the partition
     * @param string $sequenceNumber sequence number inside partition
     */
    public static function from($bucketName, $vbucketId, $vbucketUuid, $sequenceNumber) {}

    /**
     * Returns bucket name
     *
     * @return string
     */
    public function bucketName() {}

    /**
     * Returns partition number
     *
     * @return int
     */
    public function vbucketId() {}

    /**
     * Returns UUID of the partition
     *
     * @return string
     */
    public function vbucketUuid() {}

    /**
     * Returns the sequence number inside partition
     *
     * @return string
     */
    public function sequenceNumber() {}
}

/**
 * Container for mutation tokens.
 */
class MutationState
{
    final private function __construct() {}

    /**
     * Create container from the given mutation token holders.
     *
     * @param array|Document|DocumentFragment $source anything that can have attached MutationToken
     * @return MutationState
     *
     * @see \Couchbase\MutationToken
     */
    public static function from($source) {}

    /**
     * Update container with the given mutation token holders.
     *
     * @param array|Document|DocumentFragment $source anything that can have attached MutationToken
     *
     * @see \Couchbase\MutationToken
     */
    public function add($source) {}
}

/**
 * Common interface for all View queries
 *
 * @see \Couchbase\ViewQuery
 * @see \Couchbase\SpatialViewQuery
 */
interface ViewQueryEncodable
{
    /**
     * Returns associative array, representing the View query.
     *
     * @return array object which is ready to be serialized.
     */
    public function encode();
}

/**
 * Represents regular Couchbase Map/Reduce View query
 *
 * @see \Couchbase\Bucket::query()
 * @see \Couchbase\SpatialViewQuery
 * @see https://developer.couchbase.com/documentation/server/current/sdk/php/view-queries-with-sdk.html
 *   MapReduce Views
 * @see https://developer.couchbase.com/documentation/server/current/architecture/querying-data-with-views.html
 *   Querying Data with Views
 * @see https://developer.couchbase.com/documentation/server/current/rest-api/rest-views-get.html
 *   Getting Views Information
 */
class ViewQuery implements ViewQueryEncodable
{
    /** Force a view update before returning data */
    public const UPDATE_BEFORE = 1;

    /** Allow stale views */
    public const UPDATE_NONE = 2;

    /** Allow stale view, update view after it has been accessed. */
    public const UPDATE_AFTER = 3;
    public const ORDER_ASCENDING = 1;
    public const ORDER_DESCENDING = 2;

    final private function __construct() {}

    /**
     * Creates a new Couchbase ViewQuery instance for performing a view query.
     *
     * @param string $designDocumentName the name of the design document to query
     * @param string $viewName the name of the view to query
     * @return ViewQuery
     */
    public static function from($designDocumentName, $viewName) {}

    /**
     * Creates a new Couchbase ViewQuery instance for performing a spatial query.
     * @param string $designDocumentName the name of the design document to query
     * @param string $viewName the name of the view to query
     * @return SpatialViewQuery
     */
    public static function fromSpatial($designDocumentName, $viewName) {}

    /**
     * Returns associative array, representing the View query.
     *
     * @return array object which is ready to be serialized.
     */
    public function encode() {}

    /**
     * Limits the result set to a specified number rows.
     *
     * @param int $limit maximum number of records in the response
     * @return ViewQuery
     */
    public function limit($limit) {}

    /**
     * Skips a number o records rom the beginning of the result set
     *
     * @param int $skip number of records to skip
     * @return ViewQuery
     */
    public function skip($skip) {}

    /**
     * Specifies the mode of updating to perorm before and after executing the query
     *
     * @param int $consistency use constants UPDATE_BEFORE, UPDATE_NONE, UPDATE_AFTER
     * @return ViewQuery
     *
     * @see \Couchbase\ViewQuery::UPDATE_BEFORE
     * @see \Couchbase\ViewQuery::UPDATE_NONE
     * @see \Couchbase\ViewQuery::UPDATE_AFTER
     */
    public function consistency($consistency) {}

    /**
     * Orders the results by key as specified
     *
     * @param int $order use contstants ORDER_ASCENDING, ORDER_DESCENDING
     * @return ViewQuery
     */
    public function order($order) {}

    /**
     * Specifies whether the reduction function should be applied to results of the query.
     *
     * @param bool $reduce
     * @return ViewQuery
     */
    public function reduce($reduce) {}

    /**
     * Group the results using the reduce function to a group or single row.
     *
     * Important: this setter and groupLevel should not be used together in the
     * same ViewQuery. It is sufficient to only set the grouping level only and
     * use this setter in cases where you always want the highest group level
     * implictly.
     *
     * @param bool $group
     * @return ViewQuery
     *
     * @see \Couchbase\ViewQuery::groupLevel
     */
    public function group($group) {}

    /**
     * Specify the group level to be used.
     *
     * Important: group() and this setter should not be used together in the
     * same ViewQuery. It is sufficient to only use this setter and use group()
     * in cases where you always want the highest group level implictly.
     *
     * @param int $groupLevel the number of elements in the keys to use
     * @return ViewQuery
     *
     * @see \Couchbase\ViewQuery::group
     */
    public function groupLevel($groupLevel) {}

    /**
     * Restict results of the query to the specified key
     *
     * @param mixed $key key
     * @return ViewQuery
     */
    public function key($key) {}

    /**
     * Restict results of the query to the specified set of keys
     *
     * @param array $keys set of keys
     * @return ViewQuery
     */
    public function keys($keys) {}

    /**
     * Specifies a range of the keys to return from the index.
     *
     * @param mixed $startKey
     * @param mixed $endKey
     * @param bool $inclusiveEnd
     * @return ViewQuery
     */
    public function range($startKey, $endKey, $inclusiveEnd = false) {}

    /**
     * Specifies start and end document IDs in addition to range limits.
     *
     * This might be needed for more precise pagination with a lot of documents
     * with the same key selected into the same page.
     *
     * @param string $startKeyDocumentId document ID
     * @param string $endKeyDocumentId document ID
     * @return ViewQuery
     */
    public function idRange($startKeyDocumentId, $endKeyDocumentId) {}

    /**
     * Specifies custom options to pass to the server.
     *
     * Note that these options are expected to be already encoded.
     *
     * @param array $customParameters parameters
     * @return ViewQuery
     *
     * @see https://developer.couchbase.com/documentation/server/current/rest-api/rest-views-get.html
     *   Getting Views Information
     */
    public function custom($customParameters) {}
}

/**
 * Represents spatial Couchbase Map/Reduce View query
 *
 * @see \Couchbase\Bucket::query()
 * @see \Couchbase\ViewQuery
 * @see https://developer.couchbase.com/documentation/server/current/architecture/querying-geo-data-spatial-views.html
 *   Querying Geographic Data with Spatial Views
 * @see https://developer.couchbase.com/documentation/server/current/rest-api/rest-views-get.html
 *   Getting Views Information
 * @see https://developer.couchbase.com/documentation/server/current/views/sv-query-parameters.html
 *   Querying spatial views
 */
class SpatialViewQuery implements ViewQueryEncodable
{
    final private function __construct() {}

    /**
     * Returns associative array, representing the View query.
     *
     * @return array object which is ready to be serialized.
     */
    public function encode() {}

    /**
     * Limits the result set to a specified number rows.
     *
     * @param int $limit maximum number of records in the response
     * @return SpatialViewQuery
     */
    public function limit($limit) {}

    /**
     * Skips a number o records rom the beginning of the result set
     *
     * @param int $skip number of records to skip
     * @return SpatialViewQuery
     */
    public function skip($skip) {}

    /**
     * Specifies the mode of updating to perorm before and after executing the query
     *
     * @param int $consistency use constants UPDATE_BEFORE, UPDATE_NONE, UPDATE_AFTER
     * @return SpatialViewQuery
     *
     * @see \Couchbase\ViewQuery::UPDATE_BEFORE
     * @see \Couchbase\ViewQuery::UPDATE_NONE
     * @see \Couchbase\ViewQuery::UPDATE_AFTER
     */
    public function consistency($consistency) {}

    /**
     * Orders the results by key as specified
     *
     * @param int $order use contstants ORDER_ASCENDING, ORDER_DESCENDING
     * @return SpatialViewQuery
     */
    public function order($order) {}

    /**
     * Specifies the bounding box to search within.
     *
     * Note, using bbox() is discouraged, startRange/endRange is more flexible and should be preferred.
     *
     * @param array $bbox bounding box coordinates expressed as a list of numeric values
     * @return SpatialViewQuery
     *
     * @see \Couchbase\SpatialViewQuery::startRange()
     * @see \Couchbase\SpatialViewQuery::endRange()
     */
    public function bbox($bbox) {}

    /**
     * Specify start range for query
     *
     * @param array $range
     * @return SpatialViewQuery
     *
     * @see https://developer.couchbase.com/documentation/server/current/views/sv-query-parameters.html
     *   Querying spatial views
     */
    public function startRange($range) {}

    /**
     * Specify end range for query
     *
     * @param array $range
     * @return SpatialViewQuery
     *
     * @see https://developer.couchbase.com/documentation/server/current/views/sv-query-parameters.html
     *   Querying spatial views
     */
    public function endRange($range) {}

    /**
     * Specifies custom options to pass to the server.
     *
     * Note that these options are expected to be already encoded.
     *
     * @param array $customParameters parameters
     *
     * @see https://developer.couchbase.com/documentation/server/current/rest-api/rest-views-get.html
     *   Getting Views Information
     * @see https://developer.couchbase.com/documentation/server/current/views/sv-query-parameters.html
     *   Querying spatial views
     */
    public function custom($customParameters) {}
}

/**
 * Represents a N1QL query
 *
 * @see https://developer.couchbase.com/documentation/server/current/sdk/n1ql-query.html
 *   Querying with N1QL
 * @see https://developer.couchbase.com/documentation/server/current/sdk/php/n1ql-queries-with-sdk.html
 *   N1QL from the SDKs
 * @see https://developer.couchbase.com/documentation/server/current/n1ql/n1ql-rest-api/index.html
 *   N1QL REST API
 * @see https://developer.couchbase.com/documentation/server/current/performance/index-scans.html
 *   Understanding Index Scans
 * @see https://developer.couchbase.com/documentation/server/current/performance/indexing-and-query-perf.html
 *   Indexing JSON Documents and Query Performance
 */
class N1qlQuery
{
    /**
     * This is the default (for single-statement requests).
     * No timestamp vector is used in the index scan.
     * This is also the fastest mode, because we avoid the cost of obtaining the vector,
     * and we also avoid any wait for the index to catch up to the vector.
     */
    public const NOT_BOUNDED = 1;

    /**
     * This implements strong consistency per request.
     * Before processing the request, a current vector is obtained.
     * The vector is used as a lower bound for the statements in the request.
     * If there are DML statements in the request, RYOW is also applied within the request.
     */
    public const REQUEST_PLUS = 2;

    /**
     * This implements strong consistency per statement.
     * Before processing each statement, a current vector is obtained
     * and used as a lower bound for that statement.
     */
    public const STATEMENT_PLUS = 3;

    /**
     * Disables profiling. This is the default
     */
    public const PROFILE_NONE = 'off';

    /**
     * Enables phase profiling.
     */
    public const PROFILE_PHASES = 'phases';

    /**
     * Enables general timing profiling.
     */
    public const PROFILE_TIMINGS = 'timings';

    final private function __construct() {}

    /**
     * Creates new N1qlQuery instance directly from the N1QL string.
     *
     * @param string $statement N1QL string
     * @return N1qlQuery
     */
    public static function fromString($statement) {}

    /**
     * Allows to specify if this query is adhoc or not.
     *
     * If it is not adhoc (so performed often), the client will try to perform optimizations
     * transparently based on the server capabilities, like preparing the statement and
     * then executing a query plan instead of the raw query.
     *
     * @param bool $adhoc if query is adhoc, default is true (plain execution)
     * @return N1qlQuery
     */
    public function adhoc($adhoc) {}

    /**
     * Allows to pull credentials from the Authenticator
     *
     * @param bool $crossBucket if query includes joins for multiple buckets (default is false)
     * @return N1qlQuery
     *
     *
     * @see \Couchbase\Authenticator
     * @see \Couchbase\ClassicAuthenticator
     */
    public function crossBucket($crossBucket) {}

    /**
     * Specify array of positional parameters
     *
     * Previously specified positional parameters will be replaced.
     * Note: carefully choose type of quotes for the query string, because PHP also uses `$`
     * (dollar sign) for variable interpolation. If you are using double quotes, make sure
     * that N1QL parameters properly escaped.
     *
     * @param array $params
     * @return N1qlQuery
     */
    public function positionalParams($params) {}

    /**
     * Specify associative array of named parameters
     *
     * The supplied array of key/value pairs will be merged with already existing named parameters.
     * Note: carefully choose type of quotes for the query string, because PHP also uses `$`
     * (dollar sign) for variable interpolation. If you are using double quotes, make sure
     * that N1QL parameters properly escaped.
     *
     * @param array $params
     * @return N1qlQuery
     */
    public function namedParams($params) {}

    /**
     * Specifies the consistency level for this query
     *
     * @param int $consistency consistency level
     * @return N1qlQuery
     *
     * @see \Couchbase\N1qlQuery::NOT_BOUNDED
     * @see \Couchbase\N1qlQuery::REQUEST_PLUS
     * @see \Couchbase\N1qlQuery::STATEMENT_PLUS
     * @see \Couchbase\N1qlQuery::consistentWith()
     */
    public function consistency($consistency) {}

    /**
     * Controls the profiling mode used during query execution
     *
     * @param string $profileType
     * @return N1qlQuery
     * @see \Couchbase\N1qlQuery::PROFILE_NONE
     * @see \Couchbase\N1qlQuery::PROFILE_PHASES
     * @see \Couchbase\N1qlQuery::PROFILE_TIMINGS
     */
    public function profile($profileType) {}

    /**
     * Sets mutation state the query should be consistent with
     *
     * @param MutationState $state the container of mutation tokens
     * @return N1qlQuery
     *
     * @see \Couchbase\MutationState
     */
    public function consistentWith($state) {}

    /**
     * If set to true, it will signal the query engine on the server that only non-data modifying requests
     * are allowed. Note that this rule is enforced on the server and not the SDK side.
     *
     * Controls whether a query can change a resulting record set.
     *
     * If readonly is true, then the following statements are not allowed:
     *  - CREATE INDEX
     *  - DROP INDEX
     *  - INSERT
     *  - MERGE
     *  - UPDATE
     *  - UPSERT
     *  - DELETE
     *
     * @param bool $readonly true if readonly should be forced, false is the default and will use the server side default.
     * @return N1qlQuery
     */
    public function readonly($readonly) {}

    /**
     * Advanced: Maximum buffered channel size between the indexer client and the query service for index scans.
     *
     * This parameter controls when to use scan backfill. Use 0 or a negative number to disable.
     *
     * @param int $scanCap the scan_cap param, use 0 or negative number to disable.
     * @return N1qlQuery
     */
    public function scanCap($scanCap) {}

    /**
     * Advanced: Controls the number of items execution operators can batch for Fetch from the KV.
     *
     * @param int $pipelineBatch the pipeline_batch param.
     * @return N1qlQuery
     */
    public function pipelineBatch($pipelineBatch) {}

    /**
     * Advanced: Maximum number of items each execution operator can buffer between various operators.
     *
     * @param int $pipelineCap the pipeline_cap param.
     * @return N1qlQuery
     */
    public function pipelineCap($pipelineCap) {}

    /**
     * Allows to override the default maximum parallelism for the query execution on the server side.
     *
     * @param int $maxParallelism the maximum parallelism for this query, 0 or negative values disable it.
     * @return N1qlQuery
     */
    public function maxParallelism($maxParallelism) {}
}

/**
 * Represents N1QL index definition
 *
 * @see https://developer.couchbase.com/documentation/server/current/performance/indexing-and-query-perf.html
 *   Indexing JSON Documents and Query Performance
 */
class N1qlIndex
{
    public const UNSPECIFIED = 0;
    public const GSI = 1;
    public const VIEW = 2;

    final private function __construct() {}

    /**
     * Name of the index
     *
     * @var string
     */
    public $name;

    /**
     * Is it primary index
     *
     * @var bool
     */
    public $isPrimary;

    /**
     * Type of the index
     *
     * @var int
     *
     * @see \Couchbase\N1qlIndex::UNSPECIFIED
     * @see \Couchbase\N1qlIndex::GSI
     * @see \Couchbase\N1qlIndex::VIEW
     */
    public $type;

    /**
     * The descriptive state of the index
     *
     * @var string
     */
    public $state;

    /**
     * The keyspace for the index, typically the bucket name
     * @var string
     */
    public $keyspace;

    /**
     * The namespace for the index. A namespace is a resource pool that contains multiple keyspaces
     * @var string
     */
    public $namespace;

    /**
     * The fields covered by index
     * @var array
     */
    public $fields;

    /**
     * Return the string representation of the index's condition (the WHERE clause
     * of the index), or an empty String if no condition was set.
     *
     * Note that the query service can present the condition in a slightly different
     * manner from when you declared the index: for instance it will wrap expressions
     * with parentheses and show the fields in an escaped format (surrounded by backticks).
     *
     * @var string
     */
    public $condition;
}

/**
 * A builder for subdocument lookups. In order to perform the final set of operations, use the
 * execute() method.
 *
 * Instances of this builder should be obtained through \Couchbase\Bucket->lookupIn()
 *
 * @see \Couchbase\Bucket::lookupIn
 * @see https://developer.couchbase.com/documentation/server/current/sdk/subdocument-operations.html
 *   Sub-Document Operations
 */
class LookupInBuilder
{
    final private function __construct() {}

    /**
     * Get a value inside the JSON document.
     *
     * @param string $path the path inside the document where to get the value from.
     * @param array $options the array with command modificators. Supported values are
     *   * "xattr" (default: false) if true, the path refers to a location
     *     within the document's extended attributes, not the document body.
     * @return LookupInBuilder
     */
    public function get($path, $options = []) {}

    /**
     * Get a count of values inside the JSON document.
     *
     * This method is only available with Couchbase Server 5.0 and later.
     *
     * @param string $path the path inside the document where to get the count from.
     * @param array $options the array with command modificators. Supported values are
     *   * "xattr" (default: false) if true, the path refers to a location
     *     within the document's extended attributes, not the document body.
     * @return LookupInBuilder
     */
    public function getCount($path, $options = []) {}

    /**
     * Check if a value exists inside the document.
     *
     * This doesn't transmit the value on the wire if it exists, saving the corresponding byte overhead.
     *
     * @param string $path the path inside the document to check for existence
     * @param array $options the array with command modificators. Supported values are
     *   * "xattr" (default: false) if true, the path refers to a location
     *     within the document's extended attributes, not the document body.
     * @return LookupInBuilder
     */
    public function exists($path, $options = []) {}

    /**
     * Perform several lookup operations inside a single existing JSON document, using a specific timeout
     * @return DocumentFragment
     */
    public function execute() {}
}

/**
 * A builder for subdocument mutations. In order to perform the final set of operations, use the
 * execute() method.
 *
 * Instances of this builder should be obtained through \Couchbase\Bucket->mutateIn()
 *
 * @see \Couchbase\Bucket::mutateIn
 * @see https://developer.couchbase.com/documentation/server/current/sdk/subdocument-operations.html
 *   Sub-Document Operations
 */
class MutateInBuilder
{
    public const FULLDOC_REPLACE = 0;
    public const FULLDOC_UPSERT = 1;
    public const FULLDOC_INSERT = 2;

    final private function __construct() {}

    /**
     * Insert a fragment provided the last element of the path doesn't exists.
     *
     * @param string $path the path where to insert a new dictionary value.
     * @param mixed $value the new dictionary value to insert.
     * @param array|bool $options the array with command modificators.
     *   The boolean value, controls "createPath" option. Supported values are:
     *   * "createPath" (default: false) true to create missing intermediary nodes.
     *   * "xattr" (default: false) if true, the path refers to a location
     *     within the document's extended attributes, not the document body.
     * @return MutateInBuilder
     */
    public function insert($path, $value, $options = []) {}

    /**
     * Select mode for new full-document operations.
     *
     * It defines behaviour of MutateInBuilder#upsert() method. The $mode
     * could take one of three modes:
     *  * FULLDOC_REPLACE: complain when document does not exist
     *  * FULLDOC_INSERT: complain when document does exist
     *  * FULLDOC_UPSERT: unconditionally set value for the document
     *
     * @param int $mode operation mode
     */
    public function modeDocument($mode) {}

    /**
     * Insert a fragment, replacing the old value if the path exists.
     *
     * When only one argument supplied, the library will handle it as full-document
     * upsert, and treat this argument as value. See MutateInBuilder#modeDocument()
     *
     * @param string $path the path where to insert (or replace) a dictionary value
     * @param mixed $value the new dictionary value to be applied.
     * @param array|bool $options the array with command modificators.
     *   The boolean value, controls "createPath" option. Supported values are:
     *   * "createPath" (default: false) true to create missing intermediary nodes.
     *   * "xattr" (default: false) if true, the path refers to a location
     *     within the document's extended attributes, not the document body.
     * @return MutateInBuilder
     */
    public function upsert($path, $value, $options = []) {}

    /**
     * Replace an existing value by the given fragment
     *
     * @param string $path the path where the value to replace is
     * @param mixed $value the new value
     * @param array $options the array with command modificators. Supported values are:
     *   * "xattr" (default: false) if true, the path refers to a location
     *     within the document's extended attributes, not the document body.
     * @return MutateInBuilder
     */
    public function replace($path, $value, $options = []) {}

    /**
     * Remove an entry in a JSON document.
     *
     * Scalar, array element, dictionary entry, whole array or dictionary, depending on the path.
     *
     * @param string $path the path to remove
     * @param array $options the array with command modificators. Supported values are:
     *   * "xattr" (default: false) if true, the path refers to a location
     *     within the document's extended attributes, not the document body.
     * @return MutateInBuilder
     */
    public function remove($path, $options = []) {}

    /**
     * Prepend to an existing array, pushing the value to the front/first position in the array.
     *
     * @param string $path the path of the array
     * @param mixed $value the value to insert at the front of the array
     * @param array|bool $options the array with command modificators.
     *   The boolean value, controls "createPath" option. Supported values are:
     *   * "createPath" (default: false) true to create missing intermediary nodes.
     *   * "xattr" (default: false) if true, the path refers to a location
     *     within the document's extended attributes, not the document body.
     * @return MutateInBuilder
     */
    public function arrayPrepend($path, $value, $options = []) {}

    /**
     * Prepend multiple values at once in an existing array.
     *
     * Push all values in the collection's iteration order to the front/start of the array.
     * For example given an array [A, B, C], prepending the values X and Y yields [X, Y, A, B, C]
     * and not [[X, Y], A, B, C].
     *
     * @param string $path the path of the array
     * @param array $values the values to insert at the front of the array as individual elements
     * @param array|bool $options the array with command modificators.
     *   The boolean value, controls "createPath" option. Supported values are:
     *   * "createPath" (default: false) true to create missing intermediary nodes.
     *   * "xattr" (default: false) if true, the path refers to a location
     *     within the document's extended attributes, not the document body.
     * @return MutateInBuilder
     */
    public function arrayPrependAll($path, $values, $options = []) {}

    /**
     * Append to an existing array, pushing the value to the back/last position in the array.
     *
     * @param string $path the path of the array
     * @param mixed $value the value to insert at the back of the array
     * @param array|bool $options the array with command modificators.
     *   The boolean value, controls "createPath" option. Supported values are:
     *   * "createPath" (default: false) true to create missing intermediary nodes.
     *   * "xattr" (default: false) if true, the path refers to a location
     *     within the document's extended attributes, not the document body.
     * @return MutateInBuilder
     */
    public function arrayAppend($path, $value, $options = []) {}

    /**
     * Append multiple values at once in an existing array.
     *
     * Push all values in the collection's iteration order to the back/end of the array.
     * For example given an array [A, B, C], appending the values X and Y yields [A, B, C, X, Y]
     * and not [A, B, C, [X, Y]].
     *
     * @param string $path the path of the array
     * @param array $values the values to individually insert at the back of the array
     * @param array|bool $options the array with command modificators.
     *   The boolean value, controls "createPath" option. Supported values are:
     *   * "createPath" (default: false) true to create missing intermediary nodes.
     *   * "xattr" (default: false) if true, the path refers to a location
     *     within the document's extended attributes, not the document body.
     * @return MutateInBuilder
     */
    public function arrayAppendAll($path, $values, $options = []) {}

    /**
     * Insert into an existing array at a specific position
     *
     * Position denoted in the path, eg. "sub.array[2]".
     *
     * @param string $path the path (including array position) where to insert the value
     * @param mixed $value the value to insert in the array
     * @param array $options the array with command modificators. Supported values are:
     *   * "xattr" (default: false) if true, the path refers to a location
     *     within the document's extended attributes, not the document body.
     * @return MutateInBuilder
     */
    public function arrayInsert($path, $value, $options = []) {}

    /**
     * Insert multiple values at once in an existing array at a specified position.
     *
     * Position denoted in the path, eg. "sub.array[2]"), inserting all values in the collection's iteration order
     * at the given position and shifting existing values beyond the position by the number of elements in the
     * collection.
     *
     * For example given an array [A, B, C], inserting the values X and Y at position 1 yields [A, B, X, Y, C]
     * and not [A, B, [X, Y], C].
     * @param string $path the path of the array
     * @param array $values the values to insert at the specified position of the array, each value becoming
     *   an entry at or after the insert position.
     * @param array $options the array with command modificators. Supported values are:
     *   * "xattr" (default: false) if true, the path refers to a location
     *     within the document's extended attributes, not the document body.
     * @return MutateInBuilder
     */
    public function arrayInsertAll($path, $values, $options = []) {}

    /**
     * Insert a value in an existing array only if the value
     * isn't already contained in the array (by way of string comparison).
     *
     * @param string $path the path to mutate in the JSON
     * @param mixed $value the value to insert
     * @param array|bool $options the array with command modificators.
     *   The boolean value, controls "createPath" option. Supported values are:
     *   * "createPath" (default: false) true to create missing intermediary nodes.
     *   * "xattr" (default: false) if true, the path refers to a location
     *     within the document's extended attributes, not the document body.
     * @return MutateInBuilder
     */
    public function arrayAddUnique($path, $value, $options = []) {}

    /**
     * Increment/decrement a numerical fragment in a JSON document.
     *
     * If the value (last element of the path) doesn't exist the counter
     * is created and takes the value of the delta.
     *
     * @param string $path the path to the counter (must be containing a number).
     * @param int $delta the value to increment or decrement the counter by
     * @param array|bool $options the array with command modificators.
     *   The boolean value, controls "createPath" option. Supported values are:
     *   * "createPath" (default: false) true to create missing intermediary nodes.
     *   * "xattr" (default: false) if true, the path refers to a location
     *     within the document's extended attributes, not the document body.
     * @return MutateInBuilder
     */
    public function counter($path, $delta, $options = []) {}

    /**
     * Change the expiry of the enclosing document as part of the mutation.
     *
     * @param mixed $expiry the new expiry to apply (or 0 to avoid changing the expiry)
     * @return MutateInBuilder
     */
    public function withExpiry($expiry) {}

    /**
     * Perform several mutation operations inside a single existing JSON document.
     * @return DocumentFragment
     */
    public function execute() {}
}

/**
 * Represents full text search query
 *
 * @see https://developer.couchbase.com/documentation/server/4.6/sdk/php/full-text-searching-with-sdk.html
 *   Searching from the SDK
 */
class SearchQuery implements \JsonSerializable
{
    public const HIGHLIGHT_HTML = 'html';
    public const HIGHLIGHT_ANSI = 'ansi';
    public const HIGHLIGHT_SIMPLE = 'simple';

    /**
     * Prepare boolean search query
     *
     * @return BooleanSearchQuery
     */
    public static function boolean() {}

    /**
     * Prepare date range search query
     *
     * @return DateRangeSearchQuery
     */
    public static function dateRange() {}

    /**
     * Prepare numeric range search query
     *
     * @return NumericRangeSearchQuery
     */
    public static function numericRange() {}

    /**
     * Prepare term range search query
     *
     * @return TermRangeSearchQuery
     */
    public static function termRange() {}

    /**
     * Prepare boolean field search query
     *
     * @param bool $value
     * @return BooleanFieldSearchQuery
     */
    public static function booleanField($value) {}

    /**
     * Prepare compound conjunction search query
     *
     * @param SearchQueryPart ...$queries list of inner query parts
     * @return ConjunctionSearchQuery
     */
    public static function conjuncts(...$queries) {}

    /**
     * Prepare compound disjunction search query
     *
     * @param SearchQueryPart ...$queries list of inner query parts
     * @return DisjunctionSearchQuery
     */
    public static function disjuncts(...$queries) {}

    /**
     * Prepare document ID search query
     *
     * @param string ...$documentIds
     * @return DocIdSearchQuery
     */
    public static function docId(...$documentIds) {}

    /**
     * Prepare match search query
     *
     * @param string $match
     * @return MatchSearchQuery
     */
    public static function match($match) {}

    /**
     * Prepare match all search query
     *
     * @return MatchAllSearchQuery
     */
    public static function matchAll() {}

    /**
     * Prepare match non search query
     *
     * @return MatchNoneSearchQuery
     */
    public static function matchNone() {}

    /**
     * Prepare phrase search query
     *
     * @param string ...$terms
     * @return MatchPhraseSearchQuery
     */
    public static function matchPhrase(...$terms) {}

    /**
     * Prepare prefix search query
     *
     * @param string $prefix
     * @return PrefixSearchQuery
     */
    public static function prefix($prefix) {}

    /**
     * Prepare query string search query
     *
     * @param string $queryString
     * @return QueryStringSearchQuery
     */
    public static function queryString($queryString) {}

    /**
     * Prepare regexp search query
     *
     * @param string $regexp
     * @return RegexpSearchQuery
     */
    public static function regexp($regexp) {}

    /**
     * Prepare term search query
     *
     * @param string $term
     * @return TermSearchQuery
     */
    public static function term($term) {}

    /**
     * Prepare wildcard search query
     *
     * @param string $wildcard
     * @return WildcardSearchQuery
     */
    public static function wildcard($wildcard) {}

    /**
     * Prepare geo distance search query
     *
     * @param float $longitude
     * @param float $latitude
     * @param string $distance e.g. "10mi"
     * @return GeoDistanceSearchQuery
     */
    public static function geoDistance($longitude, $latitude, $distance) {}

    /**
     * Prepare geo bounding box search query
     *
     * @param float $topLeftLongitude
     * @param float $topLeftLatitude
     * @param float $bottomRightLongitude
     * @param float $bottomRightLatitude
     * @return GeoBoundingBoxSearchQuery
     */
    public static function geoBoundingBox($topLeftLongitude, $topLeftLatitude, $bottomRightLongitude, $bottomRightLatitude) {}

    /**
     * Prepare term search facet
     *
     * @param string $field
     * @param int $limit
     * @return TermSearchFacet
     */
    public static function termFacet($field, $limit) {}

    /**
     * Prepare date range search facet
     *
     * @param string $field
     * @param int $limit
     * @return DateRangeSearchFacet
     */
    public static function dateRangeFacet($field, $limit) {}

    /**
     * Prepare numeric range search facet
     *
     * @param string $field
     * @param int $limit
     * @return NumericRangeSearchFacet
     */
    public static function numericRangeFacet($field, $limit) {}

    /**
     * Prepare an FTS SearchQuery on an index.
     *
     * Top level query parameters can be set after that by using the fluent API.
     *
     * @param string $indexName the FTS index to search in
     * @param SearchQueryPart $queryPart the body of the FTS query (e.g. a match phrase query)
     */
    public function __construct($indexName, $queryPart) {}

    /**
     * @return array
     */
    public function jsonSerialize() {}

    /**
     * Add a limit to the query on the number of hits it can return
     *
     * @param int $limit the maximum number of hits to return
     * @return SearchQuery
     */
    public function limit($limit) {}

    /**
     * Set the number of hits to skip (eg. for pagination).
     *
     * @param int $skip the number of results to skip
     * @return SearchQuery
     */
    public function skip($skip) {}

    /**
     * Activates the explanation of each result hit in the response
     *
     * @param bool $explain
     * @return SearchQuery
     */
    public function explain($explain) {}

    /**
     * Sets the server side timeout in milliseconds
     *
     * @param int $serverSideTimeout the server side timeout to apply
     * @return SearchQuery
     */
    public function serverSideTimeout($serverSideTimeout) {}

    /**
     * Sets the consistency to consider for this FTS query to AT_PLUS and
     * uses the MutationState to parameterize the consistency.
     *
     * This replaces any consistency tuning previously set.
     *
     * @param MutationState $state the mutation state information to work with
     * @return SearchQuery
     */
    public function consistentWith($state) {}

    /**
     * Configures the list of fields for which the whole value should be included in the response.
     *
     * If empty, no field values are included. This drives the inclusion of the fields in each hit.
     * Note that to be highlighted, the fields must be stored in the FTS index.
     *
     * @param string ...$fields
     * @return SearchQuery
     */
    public function fields(...$fields) {}

    /**
     * Configures the highlighting of matches in the response
     *
     * @param string $style highlight style to apply. Use constants HIGHLIGHT_HTML,
     *   HIGHLIGHT_ANSI, HIGHLIGHT_SIMPLE.
     * @param string ...$fields the optional fields on which to highlight.
     *   If none, all fields where there is a match are highlighted.
     * @return SearchQuery
     *
     * @see \Couchbase\SearchQuery::HIGHLIGHT_HTML
     * @see \Couchbase\SearchQuery::HIGHLIGHT_ANSI
     * @see \Couchbase\SearchQuery::HIGHLIGHT_SIMPLE
     */
    public function highlight($style, ...$fields) {}

    /**
     * Configures the list of fields (including special fields) which are used for sorting purposes.
     * If empty, the default sorting (descending by score) is used by the server.
     *
     * The list of sort fields can include actual fields (like "firstname" but then they must be stored in the
     * index, configured in the server side mapping). Fields provided first are considered first and in a "tie" case
     * the next sort field is considered. So sorting by "firstname" and then "lastname" will first sort ascending by
     * the firstname and if the names are equal then sort ascending by lastname. Special fields like "_id" and
     * "_score" can also be used. If prefixed with "-" the sort order is set to descending.
     *
     * If no sort is provided, it is equal to sort("-_score"), since the server will sort it by score in descending
     * order.
     *
     * @param mixed $sort the fields that should take part in the sorting.
     * @return SearchQuery
     */
    public function sort(...$sort) {}

    /**
     * Adds one SearchFacet to the query
     *
     * This is an additive operation (the given facets are added to any facet previously requested),
     * but if an existing facet has the same name it will be replaced.
     *
     * Note that to be faceted, a field's value must be stored in the FTS index.
     *
     * @param string $name
     * @param SearchFacet $facet
     * @return SearchQuery
     *
     * @see \Couchbase\SearchFacet
     * @see \Couchbase\TermSearchFacet
     * @see \Couchbase\NumericRangeSearchFacet
     * @see \Couchbase\DateRangeSearchFacet
     */
    public function addFacet($name, $facet) {}
}

/**
 * Common interface for all classes, which could be used as a body of SearchQuery
 *
 * @see \Couchbase\SearchQuery::__construct()
 */
interface SearchQueryPart {}

/**
 * A FTS query that queries fields explicitly indexed as boolean.
 */
class BooleanFieldSearchQuery implements \JsonSerializable, SearchQueryPart
{
    final private function __construct() {}

    /**
     * @return array
     */
    public function jsonSerialize() {}

    /**
     * @param float $boost
     * @return BooleanFieldSearchQuery
     */
    public function boost($boost) {}

    /**
     * @param string $field
     * @return BooleanFieldSearchQuery
     */
    public function field($field) {}
}

/**
 * A compound FTS query that allows various combinations of sub-queries.
 */
class BooleanSearchQuery implements \JsonSerializable, SearchQueryPart
{
    final private function __construct() {}

    /**
     * @return array
     */
    public function jsonSerialize() {}

    /**
     * @param float $boost
     * @return BooleanSearchQuery
     */
    public function boost($boost) {}

    /**
     * @param SearchQueryPart ...$queries
     * @return BooleanSearchQuery
     */
    public function must(...$queries) {}

    /**
     * @param SearchQueryPart ...$queries
     * @return BooleanSearchQuery
     */
    public function mustNot(...$queries) {}

    /**
     * @param SearchQueryPart ...$queries
     * @return BooleanSearchQuery
     */
    public function should(...$queries) {}
}

/**
 * A compound FTS query that performs a logical AND between all its sub-queries (conjunction).
 */
class ConjunctionSearchQuery implements \JsonSerializable, SearchQueryPart
{
    final private function __construct() {}

    /**
     * @return array
     */
    public function jsonSerialize() {}

    /**
     * @param float $boost
     * @return ConjunctionSearchQuery
     */
    public function boost($boost) {}

    /**
     * @param SearchQueryPart ...$queries
     * @return ConjunctionSearchQuery
     */
    public function every(...$queries) {}
}

/**
 * A compound FTS query that performs a logical OR between all its sub-queries (disjunction). It requires that a
 * minimum of the queries match. The minimum is configurable (default 1).
 */
class DisjunctionSearchQuery implements \JsonSerializable, SearchQueryPart
{
    final private function __construct() {}

    /**
     * @return array
     */
    public function jsonSerialize() {}

    /**
     * @param float $boost
     * @return DisjunctionSearchQuery
     */
    public function boost($boost) {}

    /**
     * @param SearchQueryPart ...$queries
     * @return DisjunctionSearchQuery
     */
    public function either(...$queries) {}

    /**
     * @param int $min
     * @return DisjunctionSearchQuery
     */
    public function min($min) {}
}

/**
 * A FTS query that matches documents on a range of values. At least one bound is required, and the
 * inclusiveness of each bound can be configured.
 */
class DateRangeSearchQuery implements \JsonSerializable, SearchQueryPart
{
    final private function __construct() {}

    /**
     * @return array
     */
    public function jsonSerialize() {}

    /**
     * @param float $boost
     * @return DateRangeSearchQuery
     */
    public function boost($boost) {}

    /**
     * @param string $field
     * @return DateRangeSearchQuery
     */
    public function field($field) {}

    /**
     * @param int|string $start The strings will be taken verbatim and supposed to be formatted with custom date
     *      time formatter (see dateTimeParser). Integers interpreted as unix timestamps and represented as RFC3339
     *      strings.
     * @param bool $inclusive
     * @return DateRangeSearchQuery
     */
    public function start($start, $inclusive = true) {}

    /**
     * @param int|string $end The strings will be taken verbatim and supposed to be formatted with custom date
     *      time formatter (see dateTimeParser). Integers interpreted as unix timestamps and represented as RFC3339
     *      strings.
     * @param bool $inclusive
     * @return DateRangeSearchQuery
     */
    public function end($end, $inclusive = false) {}

    /**
     * @param string $dateTimeParser
     * @return DateRangeSearchQuery
     */
    public function dateTimeParser($dateTimeParser) {}
}

/**
 * A FTS query that matches documents on a range of values. At least one bound is required, and the
 * inclusiveness of each bound can be configured.
 */
class NumericRangeSearchQuery implements \JsonSerializable, SearchQueryPart
{
    final private function __construct() {}

    /**
     * @return array
     */
    public function jsonSerialize() {}

    /**
     * @param float $boost
     * @return NumericRangeSearchQuery
     */
    public function boost($boost) {}

    /**
     * @param string $field
     * @return NumericRangeSearchQuery
     */
    public function field($field) {}

    /**
     * @param float $min
     * @param bool $inclusive
     * @return NumericRangeSearchQuery
     */
    public function min($min, $inclusive = true) {}

    /**
     * @param float $max
     * @param bool $inclusive
     * @return NumericRangeSearchQuery
     */
    public function max($max, $inclusive = false) {}
}

/**
 * A FTS query that matches on Couchbase document IDs. Useful to restrict the search space to a list of keys (by using
 * this in a compound query).
 */
class DocIdSearchQuery implements \JsonSerializable, SearchQueryPart
{
    final private function __construct() {}

    /**
     * @return array
     */
    public function jsonSerialize() {}

    /**
     * @param float $boost
     * @return DocIdSearchQuery
     */
    public function boost($boost) {}

    /**
     * @param string $field
     * @return DocIdSearchQuery
     */
    public function field($field) {}

    /**
     * @param string ...$documentIds
     * @return DocIdSearchQuery
     */
    public function docIds(...$documentIds) {}
}

/**
 * A FTS query that matches all indexed documents (usually for debugging purposes).
 */
class MatchAllSearchQuery implements \JsonSerializable, SearchQueryPart
{
    final private function __construct() {}

    /**
     * @return array
     */
    public function jsonSerialize() {}

    /**
     * @param float $boost
     * @return MatchAllSearchQuery
     */
    public function boost($boost) {}
}

/**
 * A FTS query that matches 0 document (usually for debugging purposes).
 */
class MatchNoneSearchQuery implements \JsonSerializable, SearchQueryPart
{
    final private function __construct() {}

    /**
     * @return array
     */
    public function jsonSerialize() {}

    /**
     * @param float $boost
     * @return MatchNoneSearchQuery
     */
    public function boost($boost) {}
}

/**
 * A FTS query that matches several given terms (a "phrase"), applying further processing
 * like analyzers to them.
 */
class MatchPhraseSearchQuery implements \JsonSerializable, SearchQueryPart
{
    final private function __construct() {}

    /**
     * @return array
     */
    public function jsonSerialize() {}

    /**
     * @param float $boost
     * @return MatchPhraseSearchQuery
     */
    public function boost($boost) {}

    /**
     * @param string $field
     * @return MatchPhraseSearchQuery
     */
    public function field($field) {}

    /**
     * @param string $analyzer
     * @return MatchPhraseSearchQuery
     */
    public function analyzer($analyzer) {}
}

/**
 * A FTS query that matches a given term, applying further processing to it
 * like analyzers, stemming and even #fuzziness(int).
 */
class MatchSearchQuery implements \JsonSerializable, SearchQueryPart
{
    final private function __construct() {}

    /**
     * @return array
     */
    public function jsonSerialize() {}

    /**
     * @param float $boost
     * @return MatchSearchQuery
     */
    public function boost($boost) {}

    /**
     * @param string $field
     * @return MatchSearchQuery
     */
    public function field($field) {}

    /**
     * @param string $analyzer
     * @return MatchSearchQuery
     */
    public function analyzer($analyzer) {}

    /**
     * @param int $prefixLength
     * @return MatchSearchQuery
     */
    public function prefixLength($prefixLength) {}

    /**
     * @param int $fuzziness
     * @return MatchSearchQuery
     */
    public function fuzziness($fuzziness) {}
}

/**
 * A FTS query that matches several terms (a "phrase") as is. The order of the terms mater and no further processing is
 * applied to them, so they must appear in the index exactly as provided.  Usually for debugging purposes, prefer
 * MatchPhraseQuery.
 */
class PhraseSearchQuery implements \JsonSerializable, SearchQueryPart
{
    final private function __construct() {}

    /**
     * @return array
     */
    public function jsonSerialize() {}

    /**
     * @param float $boost
     * @return PhraseSearchQuery
     */
    public function boost($boost) {}

    /**
     * @param string $field
     * @return PhraseSearchQuery
     */
    public function field($field) {}
}

/**
 * A FTS query that allows for simple matching of regular expressions.
 */
class RegexpSearchQuery implements \JsonSerializable, SearchQueryPart
{
    final private function __construct() {}

    /**
     * @return array
     */
    public function jsonSerialize() {}

    /**
     * @param float $boost
     * @return RegexpSearchQuery
     */
    public function boost($boost) {}

    /**
     * @param string $field
     * @return RegexpSearchQuery
     */
    public function field($field) {}
}

/**
 * A FTS query that allows for simple matching using wildcard characters (* and ?).
 */
class WildcardSearchQuery implements \JsonSerializable, SearchQueryPart
{
    final private function __construct() {}

    /**
     * @return array
     */
    public function jsonSerialize() {}

    /**
     * @param float $boost
     * @return WildcardSearchQuery
     */
    public function boost($boost) {}

    /**
     * @param string $field
     * @return WildcardSearchQuery
     */
    public function field($field) {}
}

/**
 * A FTS query that allows for simple matching on a given prefix.
 */
class PrefixSearchQuery implements \JsonSerializable, SearchQueryPart
{
    final private function __construct() {}

    /**
     * @return array
     */
    public function jsonSerialize() {}

    /**
     * @param float $boost
     * @return PrefixSearchQuery
     */
    public function boost($boost) {}

    /**
     * @param string $field
     * @return PrefixSearchQuery
     */
    public function field($field) {}
}

/**
 * A FTS query that performs a search according to the "string query" syntax.
 */
class QueryStringSearchQuery implements \JsonSerializable, SearchQueryPart
{
    final private function __construct() {}

    /**
     * @return array
     */
    public function jsonSerialize() {}

    /**
     * @param float $boost
     * @return QueryStringSearchQuery
     */
    public function boost($boost) {}
}

/**
 * A facet that gives the number of occurrences of the most recurring terms in all hits.
 */
class TermSearchQuery implements \JsonSerializable, SearchQueryPart
{
    final private function __construct() {}

    /**
     * @return array
     */
    public function jsonSerialize() {}

    /**
     * @param float $boost
     * @return TermSearchQuery
     */
    public function boost($boost) {}

    /**
     * @param string $field
     * @return TermSearchQuery
     */
    public function field($field) {}

    /**
     * @param int $prefixLength
     * @return TermSearchQuery
     */
    public function prefixLength($prefixLength) {}

    /**
     * @param int $fuzziness
     * @return TermSearchQuery
     */
    public function fuzziness($fuzziness) {}
}

/**
 * A FTS query that matches documents on a range of values. At least one bound is required, and the
 * inclusiveness of each bound can be configured.
 */
class TermRangeSearchQuery implements \JsonSerializable, SearchQueryPart
{
    final private function __construct() {}

    /**
     * @return array
     */
    public function jsonSerialize() {}

    /**
     * @param float $boost
     * @return TermRangeSearchQuery
     */
    public function boost($boost) {}

    /**
     * @param string $field
     * @return TermRangeSearchQuery
     */
    public function field($field) {}

    /**
     * @param string $min
     * @param bool $inclusive
     * @return TermRangeSearchQuery
     */
    public function min($min, $inclusive = true) {}

    /**
     * @param string $max
     * @param bool $inclusive
     * @return TermRangeSearchQuery
     */
    public function max($max, $inclusive = false) {}
}

/**
 * A FTS query that finds all matches from a given location (point) within the given distance.
 *
 * Both the point and the distance are required.
 */
class GeoDistanceSearchQuery implements \JsonSerializable, SearchQueryPart
{
    final private function __construct() {}

    /**
     * @return array
     */
    public function jsonSerialize() {}

    /**
     * @param float $boost
     * @return GeoDistanceSearchQuery
     */
    public function boost($boost) {}

    /**
     * @param string $field
     * @return GeoDistanceSearchQuery
     */
    public function field($field) {}
}

/**
 * A FTS query which allows to match geo bounding boxes.
 */
class GeoBoundingBoxSearchQuery implements \JsonSerializable, SearchQueryPart
{
    final private function __construct() {}

    /**
     * @return array
     */
    public function jsonSerialize() {}

    /**
     * @param float $boost
     * @return GeoBoundingBoxSearchQuery
     */
    public function boost($boost) {}

    /**
     * @param string $field
     * @return GeoBoundingBoxSearchQuery
     */
    public function field($field) {}
}

/**
 * Common interface for all search facets
 *
 * @see \Couchbase\SearchQuery::addFacet()
 * @see \Couchbase\TermSearchFacet
 * @see \Couchbase\DateRangeSearchFacet
 * @see \Couchbase\NumericRangeSearchFacet
 */
interface SearchFacet {}

/**
 * A facet that gives the number of occurrences of the most recurring terms in all hits.
 */
class TermSearchFacet implements \JsonSerializable, SearchFacet
{
    final private function __construct() {}

    /**
     * @return array
     */
    public function jsonSerialize() {}
}

/**
 * A facet that categorizes hits inside date ranges (or buckets) provided by the user.
 */
class DateRangeSearchFacet implements \JsonSerializable, SearchFacet
{
    final private function __construct() {}

    /**
     * @return array
     */
    public function jsonSerialize() {}

    /**
     * @param string $name
     * @param int|string $start
     * @param int|string $end
     * @return DateSearchFacet
     */
    public function addRange($name, $start, $end) {}
}

/**
 * A facet that categorizes hits into numerical ranges (or buckets) provided by the user.
 */
class NumericRangeSearchFacet implements \JsonSerializable, SearchFacet
{
    final private function __construct() {}

    /**
     * @return array
     */
    public function jsonSerialize() {}

    /**
     * @param string $name
     * @param float $min
     * @param float $max
     * @return NumericSearchFacet
     */
    public function addRange($name, $min, $max) {}
}

/**
 * Base class for all FTS sort options in querying.
 */
class SearchSort
{
    private function __construct() {}

    /**
     * Sort by the document identifier.
     *
     * @return SearchSortId
     */
    public static function id() {}

    /**
     * Sort by the hit score.
     *
     * @return SearchSortScore
     */
    public static function score() {}

    /**
     * Sort by a field in the hits.
     *
     * @param string $field the field name
     *
     * @return SearchSortField
     */
    public static function field($field) {}

    /**
     * Sort by geo location.
     *
     * @param string $field the field name
     * @param float $longitude the longitude of the location
     * @param float $latitude the latitude of the location
     *
     * @return SearchSortGeoDistance
     */
    public static function geoDistance($field, $longitude, $latitude) {}
}

/**
 * Sort by the document identifier.
 */
class SearchSortId extends SearchSort implements \JsonSerializable
{
    private function __construct() {}

    /**
     * Direction of the sort
     *
     * @param bool $descending
     *
     * @return SearchSortId
     */
    public function descending($descending) {}
}

/**
 * Sort by the hit score.
 */
class SearchSortScore extends SearchSort implements \JsonSerializable
{
    private function __construct() {}

    /**
     * Direction of the sort
     *
     * @param bool $descending
     *
     * @return SearchSortScore
     */
    public function descending($descending) {}
}

/**
 * Sort by a field in the hits.
 */
class SearchSortField extends SearchSort implements \JsonSerializable
{
    public const TYPE_AUTO = "auto";
    public const TYPE_STRING = "string";
    public const TYPE_NUMBER = "number";
    public const TYPE_DATE = "date";
    public const MODE_DEFAULT = "default";
    public const MODE_MIN = "min";
    public const MODE_MAX = "max";
    public const MISSING_FIRST = "first";
    public const MISSING_LAST = "last";

    private function __construct() {}

    /**
     * Direction of the sort
     *
     * @param bool $descending
     *
     * @return SearchSortField
     */
    public function descending($descending) {}

    /**
     * Set type of the field
     *
     * @param string $type the type
     *
     * @see SearchSortField::TYPE_AUTO
     * @see SearchSortField::TYPE_STRING
     * @see SearchSortField::TYPE_NUMBER
     * @see SearchSortField::TYPE_DATE
     */
    public function type($type) {}

    /**
     * Set mode of the sort
     *
     * @param string $mode the mode
     *
     * @see SearchSortField::MODE_MIN
     * @see SearchSortField::MODE_MAX
     */
    public function mode($mode) {}

    /**
     * Set where the hits with missing field will be inserted
     *
     * @param string $missing strategy for hits with missing fields
     *
     * @see SearchSortField::MISSING_FIRST
     * @see SearchSortField::MISSING_LAST
     */
    public function missing($missing) {}
}

/**
 * Sort by a location and unit in the hits.
 */
class SearchSortGeoDistance extends SearchSort implements \JsonSerializable
{
    private function __construct() {}

    /**
     * Direction of the sort
     *
     * @param bool $descending
     *
     * @return SearchSortGeoDistance
     */
    public function descending($descending) {}

    /**
     * Name of the units
     *
     * @param string $unit
     *
     * @return SearchSortGeoDistance
     */
    public function unit($unit) {}
}

/**
 * Represents a Analytics query (currently experimental support).
 *
 * @see https://developer.couchbase.com/documentation/server/4.5/analytics/quick-start.html
 *   Analytics quick start
 */
class AnalyticsQuery
{
    final private function __construct() {}

    /**
     * Creates new AnalyticsQuery instance directly from the string.
     *
     * @param string $statement statement string
     * @return AnalyticsQuery
     */
    public static function fromString($statement) {}
}
<?php

/**
 * Couchbase extension stubs
 * Gathered from https://docs.couchbase.com/sdk-api/couchbase-php-client-2.3.0/index.html
 * Maintainer: sergey@couchbase.com
 *
 * https://github.com/couchbase/php-couchbase/tree/master/api
 */
class_alias("Couchbase\\Cluster", "CouchbaseCluster");
class_alias("Couchbase\\Bucket", "CouchbaseBucket");
class_alias("Couchbase\\MutationToken", "CouchbaseMutationToken");
class_alias("Couchbase\\MutationState", "CouchbaseMutationState");
class_alias("Couchbase\\BucketManager", "CouchbaseBucketManager");
class_alias("Couchbase\\ClusterManager", "CouchbaseClusterManager");
class_alias("Couchbase\\LookupInBuilder", "CouchbaseLookupInBuilder");
class_alias("Couchbase\\MutateInBuilder", "CouchbaseMutateInBuilder");
class_alias("Couchbase\\N1qlQuery", "CouchbaseN1qlQuery");
class_alias("Couchbase\\SearchQuery", "CouchbaseSearchQuery");
class_alias("Couchbase\\SearchQueryPart", "CouchbaseAbstractSearchQuery");
class_alias("Couchbase\\QueryStringSearchQuery", "CouchbaseStringSearchQuery");
class_alias("Couchbase\\MatchSearchQuery", "CouchbaseMatchSearchQuery");
class_alias("Couchbase\\MatchPhraseSearchQuery", "CouchbaseMatchPhraseSearchQuery");
class_alias("Couchbase\\PrefixSearchQuery", "CouchbasePrefixSearchQuery");
class_alias("Couchbase\\RegexpSearchQuery", "CouchbaseRegexpSearchQuery");
class_alias("Couchbase\\NumericRangeSearchQuery", "CouchbaseNumericRangeSearchQuery");
class_alias("Couchbase\\DisjunctionSearchQuery", "CouchbaseDisjunctionSearchQuery");
class_alias("Couchbase\\DateRangeSearchQuery", "CouchbaseDateRangeSearchQuery");
class_alias("Couchbase\\ConjunctionSearchQuery", "CouchbaseConjunctionSearchQuery");
class_alias("Couchbase\\BooleanSearchQuery", "CouchbaseBooleanSearchQuery");
class_alias("Couchbase\\WildcardSearchQuery", "CouchbaseWildcardSearchQuery");
class_alias("Couchbase\\DocIdSearchQuery", "CouchbaseDocIdSearchQuery");
class_alias("Couchbase\\BooleanFieldSearchQuery", "CouchbaseBooleanFieldSearchQuery");
class_alias("Couchbase\\TermSearchQuery", "CouchbaseTermSearchQuery");
class_alias("Couchbase\\PhraseSearchQuery", "CouchbasePhraseSearchQuery");
class_alias("Couchbase\\MatchAllSearchQuery", "CouchbaseMatchAllSearchQuery");
class_alias("Couchbase\\MatchNoneSearchQuery", "CouchbaseMatchNoneSearchQuery");
class_alias("Couchbase\\DateRangeSearchFacet", "CouchbaseDateRangeSearchFacet");
class_alias("Couchbase\\NumericRangeSearchFacet", "CouchbaseNumericRangeSearchFacet");
class_alias("Couchbase\\TermSearchFacet", "CouchbaseTermSearchFacet");
class_alias("Couchbase\\SearchFacet", "CouchbaseSearchFacet");
class_alias("Couchbase\\ViewQuery", "CouchbaseViewQuery");
class_alias("Couchbase\\DocumentFragment", "CouchbaseDocumentFragment");
class_alias("Couchbase\\Document", "CouchbaseMetaDoc");
class_alias("Couchbase\\Exception", "CouchbaseException");
class_alias("Couchbase\\ClassicAuthenticator", "CouchbaseAuthenticator");

define("COUCHBASE_PERSISTTO_MASTER", 1);
define("COUCHBASE_PERSISTTO_ONE", 1);
define("COUCHBASE_PERSISTTO_TWO", 2);
define("COUCHBASE_PERSISTTO_THREE", 4);

define("COUCHBASE_REPLICATETO_ONE", 16);
define("COUCHBASE_REPLICATETO_TWO", 32);
define("COUCHBASE_REPLICATETO_THREE", 64);

define("COUCHBASE_SUCCESS", 0);
define("COUCHBASE_AUTH_CONTINUE", 1);
define("COUCHBASE_AUTH_ERROR", 2);
define("COUCHBASE_DELTA_BADVAL", 3);
define("COUCHBASE_E2BIG", 4);
define("COUCHBASE_EBUSY", 5);
define("COUCHBASE_EINTERNAL", 6);
define("COUCHBASE_EINVAL", 7);
define("COUCHBASE_ENOMEM", 8);
define("COUCHBASE_ERANGE", 9);
define("COUCHBASE_ERROR", 10);
define("COUCHBASE_ETMPFAIL", 11);
define("COUCHBASE_KEY_EEXISTS", 12);
define("COUCHBASE_KEY_ENOENT", 13);
define("COUCHBASE_DLOPEN_FAILED", 14);
define("COUCHBASE_DLSYM_FAILED", 15);
define("COUCHBASE_NETWORK_ERROR", 16);
define("COUCHBASE_NOT_MY_VBUCKET", 17);
define("COUCHBASE_NOT_STORED", 18);
define("COUCHBASE_NOT_SUPPORTED", 19);
define("COUCHBASE_UNKNOWN_COMMAND", 20);
define("COUCHBASE_UNKNOWN_HOST", 21);
define("COUCHBASE_PROTOCOL_ERROR", 22);
define("COUCHBASE_ETIMEDOUT", 23);
define("COUCHBASE_CONNECT_ERROR", 24);
define("COUCHBASE_BUCKET_ENOENT", 25);
define("COUCHBASE_CLIENT_ENOMEM", 26);
define("COUCHBASE_CLIENT_ENOCONF", 27);
define("COUCHBASE_EBADHANDLE", 28);
define("COUCHBASE_SERVER_BUG", 29);
define("COUCHBASE_PLUGIN_VERSION_MISMATCH", 30);
define("COUCHBASE_INVALID_HOST_FORMAT", 31);
define("COUCHBASE_INVALID_CHAR", 32);
define("COUCHBASE_DURABILITY_ETOOMANY", 33);
define("COUCHBASE_DUPLICATE_COMMANDS", 34);
define("COUCHBASE_NO_MATCHING_SERVER", 35);
define("COUCHBASE_BAD_ENVIRONMENT", 36);
define("COUCHBASE_BUSY", 37);
define("COUCHBASE_INVALID_USERNAME", 38);
define("COUCHBASE_CONFIG_CACHE_INVALID", 39);
define("COUCHBASE_SASLMECH_UNAVAILABLE", 40);
define("COUCHBASE_TOO_MANY_REDIRECTS", 41);
define("COUCHBASE_MAP_CHANGED", 42);
define("COUCHBASE_INCOMPLETE_PACKET", 43);
define("COUCHBASE_ECONNREFUSED", 44);
define("COUCHBASE_ESOCKSHUTDOWN", 45);
define("COUCHBASE_ECONNRESET", 46);
define("COUCHBASE_ECANTGETPORT", 47);
define("COUCHBASE_EFDLIMITREACHED", 48);
define("COUCHBASE_ENETUNREACH", 49);
define("COUCHBASE_ECTL_UNKNOWN", 50);
define("COUCHBASE_ECTL_UNSUPPMODE", 51);
define("COUCHBASE_ECTL_BADARG", 52);
define("COUCHBASE_EMPTY_KEY", 53);
define("COUCHBASE_SSL_ERROR", 54);
define("COUCHBASE_SSL_CANTVERIFY", 55);
define("COUCHBASE_SCHEDFAIL_INTERNAL", 56);
define("COUCHBASE_CLIENT_FEATURE_UNAVAILABLE", 57);
define("COUCHBASE_OPTIONS_CONFLICT", 58);
define("COUCHBASE_HTTP_ERROR", 59);
define("COUCHBASE_DURABILITY_NO_MUTATION_TOKENS", 60);
define("COUCHBASE_UNKNOWN_MEMCACHED_ERROR", 61);
define("COUCHBASE_MUTATION_LOST", 62);
define("COUCHBASE_SUBDOC_PATH_ENOENT", 63);
define("COUCHBASE_SUBDOC_PATH_MISMATCH", 64);
define("COUCHBASE_SUBDOC_PATH_EINVAL", 65);
define("COUCHBASE_SUBDOC_PATH_E2BIG", 66);
define("COUCHBASE_SUBDOC_DOC_E2DEEP", 67);
define("COUCHBASE_SUBDOC_VALUE_CANTINSERT", 68);
define("COUCHBASE_SUBDOC_DOC_NOTJSON", 69);
define("COUCHBASE_SUBDOC_NUM_ERANGE", 70);
define("COUCHBASE_SUBDOC_BAD_DELTA", 71);
define("COUCHBASE_SUBDOC_PATH_EEXISTS", 72);
define("COUCHBASE_SUBDOC_MULTI_FAILURE", 73);
define("COUCHBASE_SUBDOC_VALUE_E2DEEP", 74);
define("COUCHBASE_EINVAL_MCD", 75);
define("COUCHBASE_EMPTY_PATH", 76);
define("COUCHBASE_UNKNOWN_SDCMD", 77);
define("COUCHBASE_ENO_COMMANDS", 78);
define("COUCHBASE_QUERY_ERROR", 79);
define("COUCHBASE_TMPFAIL", 11);
define("COUCHBASE_KEYALREADYEXISTS", 12);
define("COUCHBASE_KEYNOTFOUND", 13);
<?php

namespace {
    define('YAF\VERSION', '3.0.8', true);
    define('YAF\ENVIRON', 'product', true);
    define('YAF\ERR\STARTUP\FAILED', 512, true);
    define('YAF\ERR\ROUTE\FAILED', 513, true);
    define('YAF\ERR\DISPATCH\FAILED', 514, true);
    define('YAF\ERR\NOTFOUND\MODULE', 515, true);
    define('YAF\ERR\NOTFOUND\CONTROLLER', 516, true);
    define('YAF\ERR\NOTFOUND\ACTION', 517, true);
    define('YAF\ERR\NOTFOUND\VIEW', 518, true);
    define('YAF\ERR\CALL\FAILED', 519, true);
    define('YAF\ERR\AUTOLOAD\FAILED', 520, true);
    define('YAF\ERR\TYPE\ERROR', 521, true);
}

namespace Yaf {
    use Yaf;

/**
 * \Yaf\Application provides a bootstrapping facility for applications which provides reusable resources, common- and module-based bootstrap classes and dependency checking.
 * <br/>
 * <b>Note:</b>
 * <p>
 * \Yaf\Application implements the singleton pattern, and \Yaf\Application can not be serialized or un-serialized which will cause problem when you try to use PHPUnit to write some test case for Yaf.<br/>
 * You may use &#64;backupGlobals annotation of PHPUnit to control the backup and restore operations for global variables. thus can solve this problem.
 * </p>
 * @link https://secure.php.net/manual/en/class.yaf-application.php
 */
final class Application
{
    /**
     * @var \Yaf\Application
     */
    protected static $_app;

    /**
     * @var \Yaf\Config_Abstract
     */
    protected $config;

    /**
     * @var \Yaf\Dispatcher
     */
    protected $dispatcher;

    /**
     * @var array
     */
    protected $_modules;

    /**
     * @var string
     */
    protected $_running = "";

    /**
     * @var string
     */
    protected $_environ = YAF_ENVIRON;

    /**
     * @since 2.1.2
     * @var int
     */
    protected $_err_no = 0;

    /**
     * @since 2.1.2
     * @var string
     */
    protected $_err_msg = "";

    /**
     * @link https://secure.php.net/manual/en/yaf-application.construct.php
     *
     * @param string|array $config A ini config file path, or a config array
     * <p>
     * If is a ini config file, there should be a section named as the one defined by yaf.environ, which is "product" by default.
     * </p>
     * <br/>
     * <b>Note:</b>
     * <p>If you use a ini configuration file as your application's config container. you would open the yaf.cache_config to improve performance.</p>
     * <p>And the config entry(and there default value) list blow:</p>
     *
     * <p>
     *    <b>Example #1 A ini config file example</b><br/>
     *    [product]<br/>
     *    ;this one should always be defined, and have no default value<br/>
     *    application.directory=APPLICATION_PATH<br/><br/>
     * </p>
     * <p>
     *    ;following configs have default value, you may no need to define them
     * <br/>
     *    application.library = APPLICATION_PATH . "/library" <br/>
     *    application.dispatcher.throwException=1 <br/>
     *    application.dispatcher.catchException=1 <br/><br/>
     * </p>
     * <p>application.baseUri=""<br/><br/></p>
     * <p>
     *    ;the php script ext name<br/>
     *    ap.ext=php<br/><br/>
     * </p>
     * <p>
     *    ;the view template ext name<br/>
     *    ap.view.ext=phtml<br/><br/>
     * </p>
     * <p>
     *    ap.dispatcher.defaultModule=Index<br/>
     *    ap.dispatcher.defaultController=Index<br/>
     *    ap.dispatcher.defaultAction=index<br/><br/>
     * </p>
     * <p>
     *    ;defined modules<br/>
     *    ap.modules=Index
     * </p>
     * @param string $envrion Which section will be loaded as the final config
     *
     * @throws \Yaf\Exception\TypeError|\Yaf\Exception\StartupError
     */
    public function __construct($config, $envrion = null) {}

    /**
     * Run a \Yaf\Application, let the \Yaf\Application accept a request, and route the request, dispatch to controller/action, and render response.
     * return response to client finally.
     *
     * @link https://secure.php.net/manual/en/yaf-application.run.php
     * @throws \Yaf\Exception\StartupError
     */
    public function run() {}

    /**
     * This method is typically used to run \Yaf\Application in a crontab work.
     * Make the crontab work can also use the autoloader and Bootstrap mechanism.
     *
     * @link https://secure.php.net/manual/en/yaf-application.execute.php
     *
     * @param callable $entry a valid callback
     * @param string ...$_ parameters will pass to the callback
     */
    public function execute(callable $entry, ...$_) {}

    /**
     * Retrieve the \Yaf\Application instance, alternatively, we also could use \Yaf\Dispatcher::getApplication().
     *
     * @link https://secure.php.net/manual/en/yaf-application.app.php
     *
     * @return \Yaf\Application|null an \Yaf\Application instance, if no \Yaf\Application initialized before, NULL will be returned.
     */
    public static function app() {}

    /**
     * Retrieve environ which was defined in yaf.environ which has a default value "product".
     *
     * @link https://secure.php.net/manual/en/yaf-application.environ.php
     *
     * @return string
     */
    public function environ() {}

    /**
     * Run a Bootstrap, all the methods defined in the Bootstrap and named with prefix "_init" will be called according to their declaration order, if the parameter bootstrap is not supplied, Yaf will look for a Bootstrap under application.directory.
     *
     * @link https://secure.php.net/manual/en/yaf-application.bootstrap.php
     *
     * @param \Yaf\Bootstrap_Abstract $bootstrap A \Yaf\Bootstrap_Abstract instance
     * @return \Yaf\Application
     */
    public function bootstrap(Yaf\Bootstrap_Abstract $bootstrap = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-application.getconfig.php
     *
     * @return \Yaf\Config_Abstract
     */
    public function getConfig() {}

    /**
     * Get the modules list defined in config, if no one defined, there will always be a module named "Index".
     *
     * @link https://secure.php.net/manual/en/yaf-application.getmodules.php
     *
     * @return array
     */
    public function getModules() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-application.getdispatcher.php
     *
     * @return \Yaf\Dispatcher
     */
    public function getDispatcher() {}

    /**
     * Change the application directory
     *
     * @since 2.1.4
     * @link https://secure.php.net/manual/en/yaf-application.setappdirectory.php
     *
     * @param string $directory
     * @return \Yaf\Application
     */
    public function setAppDirectory($directory) {}

    /**
     * @since 2.1.4
     * @link https://secure.php.net/manual/en/yaf-application.getappdirectory.php
     *
     * @return string
     */
    public function getAppDirectory() {}

    /**
     * @since 2.1.2
     * @link https://secure.php.net/manual/en/yaf-application.getlasterrorno.php
     *
     * @return int
     */
    public function getLastErrorNo() {}

    /**
     * @since 2.1.2
     * @link https://secure.php.net/manual/en/yaf-application.getlasterrormsg.php
     *
     * @return string
     */
    public function getLastErrorMsg() {}

    /**
     * @since 2.1.2
     * @link https://secure.php.net/manual/en/yaf-application.clearlasterror.php
     */
    public function clearLastError() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-application.destruct.php
     */
    public function __destruct() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-application.clone.php
     */
    private function __clone() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-application.sleep.php
     */
    private function __sleep() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-application.wakeup.php
     */
    private function __wakeup() {}
}/**
 * <p><b>\Yaf\Dispatcher</b> purpose is to initialize the request environment, route the incoming request, and then dispatch any discovered actions; it aggregates any responses and returns them when the process is complete.</p><br/>
 * <p><b>\Yaf\Dispatcher</b> also implements the Singleton pattern, meaning only a single instance of it may be available at any given time. This allows it to also act as a registry on which the other objects in the dispatch process may draw.</p>
 *
 * @link https://secure.php.net/manual/en/class.yaf-dispatcher.php
 */
final class Dispatcher
{
    /**
     * @var \Yaf\Dispatcher
     */
    protected static $_instance;

    /**
     * @var \Yaf\Router
     */
    protected $_router;

    /**
     * @var \Yaf\View_Interface
     */
    protected $_view;

    /**
     * @var \Yaf\Request_Abstract
     */
    protected $_request;

    /**
     * @var \Yaf\Plugin_Abstract
     */
    protected $_plugins;

    /**
     * @var bool
     */
    protected $_auto_render = true;

    /**
     * @var string
     */
    protected $_return_response = "";

    /**
     * @var string
     */
    protected $_instantly_flush = "";

    /**
     * @var string
     */
    protected $_default_module;

    /**
     * @var string
     */
    protected $_default_controller;

    /**
     * @var string
     */
    protected $_default_action;

    /**
     * @link https://secure.php.net/manual/en/yaf-dispatcher.construct.php
     */
    private function __construct() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-dispatcher.clone.php
     */
    private function __clone() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-dispatcher.sleep.php
     */
    private function __sleep() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-dispatcher.wakeup.php
     */
    private function __wakeup() {}

    /**
     * enable view rendering
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.enableview.php
     *
     * @return \Yaf\Dispatcher
     */
    public function enableView() {}

    /**
     * <p>disable view engine, used in some app that user will output by himself</p><br/>
     * <b>Note:</b>
     * <p>you can simply return FALSE in a action to prevent the auto-rendering of that action</p>
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.disableview.php
     *
     * @return bool
     */
    public function disableView() {}

    /**
     * Initialize view and return it
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.initview.php
     *
     * @param string $templates_dir
     * @param array $options
     * @return \Yaf\View_Interface
     */
    public function initView($templates_dir, array $options = null) {}

    /**
     * This method provides a solution for that if you want use a custom view engine instead of \Yaf\View\Simple
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.setview.php
     *
     * @param \Yaf\View_Interface $view A \Yaf\View_Interface instance
     * @return \Yaf\Dispatcher
     */
    public function setView(Yaf\View_Interface $view) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-dispatcher.setrequest.php
     *
     * @param \Yaf\Request_Abstract $request
     * @return \Yaf\Dispatcher
     */
    public function setRequest(Yaf\Request_Abstract $request) {}

    /**
     * Retrieve the \Yaf\Application instance. same as \Yaf\Application::app().
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.getapplication.php
     * @return \Yaf\Application
     */
    public function getApplication() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-dispatcher.getrouter.php
     *
     * @return \Yaf\Router
     */
    public function getRouter() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-dispatcher.getrequest.php
     *
     * @return \Yaf\Request_Abstract
     */
    public function getRequest() {}

    /**
     * <p>Set error handler for Yaf. when application.dispatcher.throwException is off, Yaf will trigger catch-able error while unexpected errors occurred.</p><br/>
     * <p>Thus, this error handler will be called while the error raise.</p>
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.seterrorhandler.php
     *
     * @param callable $callback a callable callback
     * @param int $error_types YAF_ERR_* constants mask
     *
     * @return \Yaf\Dispatcher
     */
    public function setErrorHandler(callable $callback, $error_types) {}

    /**
     * Change default module name
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.setdefaultmodule.php
     *
     * @param string $module
     * @return \Yaf\Dispatcher
     */
    public function setDefaultModule($module) {}

    /**
     * Change default controller name
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.setdefaultcontroller.php
     *
     * @param string $controller
     * @return \Yaf\Dispatcher
     */
    public function setDefaultController($controller) {}

    /**
     * Change default action name
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.setdefaultaction.php
     *
     * @param string $action
     * @return \Yaf\Dispatcher
     */
    public function setDefaultAction($action) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-dispatcher.returnresponse.php
     *
     * @param bool $flag
     * @return \Yaf\Dispatcher
     */
    public function returnResponse($flag) {}

    /**
     * <p>\Yaf\Dispatcher will render automatically after dispatches an incoming request, you can prevent the rendering by calling this method with $flag TRUE</p><br/>
     * <b>Note:</b>
     * <p>you can simply return FALSE in a action to prevent the auto-rendering of that action</p>
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.autorender.php
     *
     * @param bool $flag since 2.2.0, if this parameter is not given, then the current state will be set
     * @return \Yaf\Dispatcher
     */
    public function autoRender($flag = null) {}

    /**
     * Switch on/off the instant flushing
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.flushinstantly.php
     *
     * @param bool $flag since 2.2.0, if this parameter is not given, then the current state will be set
     * @return \Yaf\Dispatcher
     */
    public function flushInstantly($flag = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-dispatcher.getinstance.php
     *
     * @return \Yaf\Dispatcher
     */
    public static function getInstance() {}

    /**
     * <p>This method does the heavy work of the \Yaf\Dispatcher. It take a request object.</p><br/>
     * <p>The dispatch process has three distinct events:</p>
     * <ul>
     * <li>Routing</li>
     * <li>Dispatching</li>
     * <li>Response</li>
     * </ul>
     * <p>Routing takes place exactly once, using the values in the request object when dispatch() is called. Dispatching takes place in a loop; a request may either indicate multiple actions to dispatch, or the controller or a plugin may reset the request object to force additional actions to dispatch(see \Yaf\Plugin_Abstract. When all is done, the \Yaf\Dispatcher returns a response.</p>
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.dispatch.php
     *
     * @param \Yaf\Request_Abstract $request
     *
     * @throws \Yaf\Exception\TypeError
     * @throws \Yaf\Exception\RouterFailed
     * @throws \Yaf\Exception\DispatchFailed
     * @throws \Yaf\Exception\LoadFailed
     * @throws \Yaf\Exception\LoadFailed\Action
     * @throws \Yaf\Exception\LoadFailed\Controller
     *
     * @return \Yaf\Response_Abstract
     */
    public function dispatch(Yaf\Request_Abstract $request) {}

    /**
     * <p>Switch on/off exception throwing while unexpected error occurring. When this is on, Yaf will throwing exceptions instead of triggering catchable errors.</p><br/>
     * <p>You can also use application.dispatcher.throwException to achieve the same purpose.</p>
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.throwexception.php
     *
     * @param bool $flag
     * @return \Yaf\Dispatcher
     */
    public function throwException($flag = null) {}

    /**
     * <p>While the application.dispatcher.throwException is On(you can also calling to <b>\Yaf\Dispatcher::throwException(TRUE)</b> to enable it), Yaf will throw \Exception whe error occurs instead of trigger error.</p><br/>
     * <p>then if you enable <b>\Yaf\Dispatcher::catchException()</b>(also can enabled by set application.dispatcher.catchException), all uncaught \Exceptions will be caught by ErrorController::error if you have defined one.</p>
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.catchexception.php
     *
     * @param bool $flag
     * @return \Yaf\Dispatcher
     */
    public function catchException($flag = null) {}

    /**
     * Register a plugin(see \Yaf\Plugin_Abstract). Generally, we register plugins in Bootstrap(see \Yaf\Bootstrap_Abstract).
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.registerplugin.php
     *
     * @param \Yaf\Plugin_Abstract $plugin
     * @return \Yaf\Dispatcher
     */
    public function registerPlugin(Yaf\Plugin_Abstract $plugin) {}
}/**
 * <p><b>\Yaf\Loader</b> introduces a comprehensive autoloading solution for Yaf.</p>
 * <br/>
 * <p>The first time an instance of \Yaf\Application is retrieved, <b>\Yaf\Loader</b> will instance a singleton, and registers itself with spl_autoload. You retrieve an instance using the \Yaf\Loader::getInstance()</p>
 * <br/>
 * <p><b>\Yaf\Loader</b> attempt to load a class only one shot, if failed, depend on yaf.use_spl_autoload, if this config is On \Yaf\Loader::autoload() will return FALSE, thus give the chance to other autoload function. if it is Off (by default), \Yaf\Loader::autoload() will return TRUE, and more important is that a very useful warning will be triggered (very useful to find out why a class could not be loaded).</p>
 * <br/>
 * <b>Note:</b>
 * <p>Please keep yaf.use_spl_autoload Off unless there is some library have their own autoload mechanism and impossible to rewrite it.</p>
 * <br/>
 * <p>If you want <b>\Yaf\Loader</b> search some classes(libraries) in the local class directory(which is defined in application.ini, and by default, it is application.directory . "/library"), you should register the class prefix using the \Yaf\Loader::registerLocalNameSpace()</p>
 * @link https://secure.php.net/manual/en/class.yaf-loader.php
 */
class Loader
{
    /**
     * @var string
     */
    protected $_local_ns;

    /**
     * By default, this value is application.directory . "/library", you can change this either in the application.ini(application.library) or call to \Yaf\Loader::setLibraryPath()
     * @var string
     */
    protected $_library;

    /**
     * @var string
     */
    protected $_global_library;

    /**
     * @var \Yaf\Loader
     */
    protected static $_instance;

    /**
     * @link https://secure.php.net/manual/en/yaf-loader.construct.php
     */
    private function __construct() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-loader.clone.php
     */
    private function __clone() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-loader.sleep.php
     */
    private function __sleep() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-loader.wakeup.php
     */
    private function __wakeup() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-loader.autoload.php
     *
     * @param string $class_name
     *
     * @return bool
     */
    public function autoload($class_name) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-loader.getinstance.php
     *
     * @param string $local_library_path
     * @param string $global_library_path
     *
     * @return \Yaf\Loader
     */
    public static function getInstance($local_library_path = null, $global_library_path = null) {}

    /**
     * <p>Register local class prefix name, \Yaf\Loader search classes in two library directories, the one is configured via application.library.directory(in application.ini) which is called local library directory; the other is configured via yaf.library (in php.ini) which is called global library directory, since it can be shared by many applications in the same server.</p>
     * <br/>
     * <p>When an autoloading is triggered, \Yaf\Loader will determine which library directory should be searched in by examining the prefix name of the missed classname. If the prefix name is registered as a local namespace then look for it in local library directory, otherwise look for it in global library directory.</p>
     * <br/>
     * <b>Note:</b>
     * <p>If yaf.library is not configured, then the global library directory is assumed to be the local library directory. in that case, all autoloading will look for local library directory. But if you want your Yaf application be strong, then always register your own classes as local classes.</p>
     * @link https://secure.php.net/manual/en/yaf-loader.registerlocalnamespace.php
     *
     * @param string|string[] $name_prefix a string or a array of class name prefix. all class prefix with these prefix will be loaded in local library path.
     *
     * @return bool
     */
    public function registerLocalNamespace($name_prefix) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-loader.getlocalnamespace.php
     *
     * @return string
     */
    public function getLocalNamespace() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-loader.clearlocalnamespace.php
     */
    public function clearLocalNamespace() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-loader.islocalname.php
     *
     * @param string $class_name
     *
     * @return bool
     */
    public function isLocalName($class_name) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-loader.import.php
     *
     * @param string $file
     *
     * @return bool
     */
    public static function import($file) {}

    /**
     * @since 2.1.4
     * @link https://secure.php.net/manual/en/yaf-loader.setlibrarypath.php
     *
     * @param string $directory
     * @param bool $global
     *
     * @return \Yaf\Loader
     */
    public function setLibraryPath($directory, $global = false) {}

    /**
     * @since 2.1.4
     * @link https://secure.php.net/manual/en/yaf-loader.getlibrarypath.php
     *
     * @param bool $is_global
     *
     * @return string
     */
    public function getLibraryPath($is_global = false) {}
}/**
 * <p>All methods of <b>\Yaf\Registry</b> declared as static, making it universally accessible. This provides the ability to get or set any custom data from anyway in your code as necessary.</p>
 * @link https://secure.php.net/manual/en/class.yaf-registry.php
 */
final class Registry
{
    /**
     * @var \Yaf\Registry
     */
    protected static $_instance;

    /**
     * @var array
     */
    protected $_entries;

    /**
     * @link https://secure.php.net/manual/en/yaf-registry.construct.php
     */
    private function __construct() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-registry.clone.php
     */
    private function __clone() {}

    /**
     * Retrieve an item from registry
     *
     * @link https://secure.php.net/manual/en/yaf-registry.get.php
     *
     * @param string $name
     *
     * @return mixed
     */
    public static function get($name) {}

    /**
     * Check whether an item exists
     *
     * @link https://secure.php.net/manual/en/yaf-registry.has.php
     *
     * @param string $name
     *
     * @return bool
     */
    public static function has($name) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-registry.set.php
     *
     * @param string $name
     * @param mixed $value
     *
     * @return bool
     */
    public static function set($name, $value) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-registry.del.php
     *
     * @param string $name
     *
     * @return void|bool
     */
    public static function del($name) {}
}/**
 * @link https://secure.php.net/manual/en/class.yaf-session.php
 * @version 2.2.9
 */
final class Session implements \Iterator, \Traversable, \ArrayAccess, \Countable
{
    /**
     * @var \Yaf\Session
     */
    protected static $_instance;

    /**
     * @var array
     */
    protected $_session;

    /**
     * @var bool
     */
    protected $_started = true;

    /**
     * @link https://secure.php.net/manual/en/yaf-session.construct.php
     */
    private function __construct() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-session.clone.php
     */
    private function __clone() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-session.sleep.php
     */
    private function __sleep() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-session.wakeup.php
     */
    private function __wakeup() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-session.getinstance.php
     *
     * @return \Yaf\Session
     */
    public static function getInstance() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-session.start.php
     *
     * @return \Yaf\Session
     */
    public function start() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-session.get.php
     *
     * @param string $name
     *
     * @return mixed
     */
    public function get($name) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-session.has.php
     *
     * @param string $name
     *
     * @return bool
     */
    public function has($name) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-session.set.php
     *
     * @param string $name
     * @param mixed $value
     *
     * @return \Yaf\Session|false return FALSE on failure
     */
    public function set($name, $value) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-session.del.php
     *
     * @param string $name
     *
     * @return \Yaf\Session|false return FALSE on failure
     */
    public function del($name) {}

    /**
     * @see \Countable::count
     */
    public function count() {}

    /**
     * @see \Iterator::rewind
     */
    public function rewind() {}

    /**
     * @see \Iterator::current
     */
    public function current() {}

    /**
     * @see \Iterator::next
     */
    public function next() {}

    /**
     * @see \Iterator::valid
     */
    public function valid() {}

    /**
     * @see \Iterator::key
     */
    public function key() {}

    /**
     * @see \ArrayAccess::offsetUnset
     */
    public function offsetUnset($name) {}

    /**
     * @see \ArrayAccess::offsetGet
     */
    public function offsetGet($name) {}

    /**
     * @see \ArrayAccess::offsetExists
     */
    public function offsetExists($name) {}

    /**
     * @see \ArrayAccess::offsetSet
     */
    public function offsetSet($name, $value) {}

    /**
     * @see \Yaf\Session::get()
     */
    public function __get($name) {}

    /**
     * @see \Yaf\Session::has()
     */
    public function __isset($name) {}

    /**
     * @see \Yaf\Session::set()
     */
    public function __set($name, $value) {}

    /**
     * @see \Yaf\Session::del()
     */
    public function __unset($name) {}
}/**
 * <p><b>\Yaf\Router</b> is the standard framework router. Routing is the process of taking a URI endpoint (that part of the URI which comes after the base URI: see \Yaf\Request_Abstract::setBaseUri()) and decomposing it into parameters to determine which module, controller, and action of that controller should receive the request. This values of the module, controller, action and other parameters are packaged into a \Yaf\Request_Abstract object which is then processed by \Yaf\Dispatcher. Routing occurs only once: when the request is initially received and before the first controller is dispatched. \Yaf\Router is designed to allow for mod_rewrite-like functionality using pure PHP structures. It is very loosely based on Ruby on Rails routing and does not require any prior knowledge of webserver URL rewriting</p>
 * <br/>
 * <b>Default Route</b>
 * <br/>
 * <p><b>\Yaf\Router</b> comes pre-configured with a default route \Yaf\Route_Static, which will match URIs in the shape of controller/action. Additionally, a module name may be specified as the first path element, allowing URIs of the form module/controller/action. Finally, it will also match any additional parameters appended to the URI by default - controller/action/var1/value1/var2/value2.</p>
 * <br/>
 * <b>Note:</b>
 * <p>Module name must be defined in config, considering application.module="Index,Foo,Bar", in this case, only index, foo and bar can be considered as a module name. if doesn't config, there is only one module named "Index".</p>
 * <br/>
 * <p>** See examples by opening the external documentation</p>
 * @link https://secure.php.net/manual/en/class.yaf-router.php
 */
class Router
{
    /**
     * @var \Yaf\Route_Interface[] registered routes stack
     */
    protected $_routes;

    /**
     * @var string after routing phase, this indicated the name of which route is used to route current request. you can get this name by \Yaf\Router::getCurrentRoute()
     */
    protected $_current;

    /**
     * @link https://secure.php.net/manual/en/yaf-router.construct.php
     */
    public function __construct() {}

    /**
     * <p>by default, \Yaf\Router using a \Yaf\Route_Static as its default route. you can add new routes into router's route stack by calling this method.</p>
     * <br/>
     * <p>the newer route will be called before the older(route stack), and if the newer router return TRUE, the router process will be end. otherwise, the older one will be called.</p>
     *
     * @link https://secure.php.net/manual/en/yaf-router.addroute.php
     *
     * @param string $name
     * @param \Yaf\Route_Interface $route
     *
     * @return \Yaf\Router|false return FALSE on failure
     */
    public function addRoute($name, Yaf\Route_Interface $route) {}

    /**
     * <p>Add routes defined by configs into \Yaf\Router's route stack</p>
     *
     * @link https://secure.php.net/manual/en/yaf-router.addconfig.php
     *
     * @param \Yaf\Config_Abstract $config
     *
     * @return \Yaf\Router|false return FALSE on failure
     */
    public function addConfig(Yaf\Config_Abstract $config) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-router.route.php
     *
     * @param \Yaf\Request_Abstract $request
     *
     * @return \Yaf\Router|false return FALSE on failure
     */
    public function route(Yaf\Request_Abstract $request) {}

    /**
     * <p>Retrieve a route by name, see also \Yaf\Router::getCurrentRoute()</p>
     *
     * @link https://secure.php.net/manual/en/yaf-router.getroute.php
     *
     * @param string $name
     *
     * @return \Yaf\Route_Interface
     */
    public function getRoute($name) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-router.getroutes.php
     *
     * @return \Yaf\Route_Interface[]
     */
    public function getRoutes() {}

    /**
     * <p>Get the name of the route which is effective in the route process.</p>
     * <br/>
     * <b>Note:</b>
     * <p>You should call this method after the route process finished, since before that, this method will always return NULL.</p>
     *
     * @link https://secure.php.net/manual/en/yaf-router.getcurrentroute.php
     *
     * @return string the name of the effective route.
     */
    public function getCurrentRoute() {}
}/**
 * <p>Bootstrap is a mechanism used to do some initial config before a Application run.<br/><br/></p>
 * <p>User may define their own Bootstrap class by inheriting <b>\Yaf\Bootstrap_Abstract</b><br/><br/></p>
 * <p>Any method declared in Bootstrap class with leading "_init", will be called by \Yaf\Application::bootstrap() one by one according to their defined order<br/><br/></p>
 *
 * @link https://secure.php.net/manual/en/class.yaf-bootstrap-abstract.php
 */
abstract class Bootstrap_Abstract {}/**
 * <p><b>\Yaf\Controller_Abstract</b> is the heart of Yaf's system. MVC stands for Model-View-Controller and is a design pattern targeted at separating application logic from display logic.</p>
 * <br/>
 * <p>Every custom controller shall inherit <b>\Yaf\Controller_Abstract</b>.</p>
 * <br/>
 * <p>You will find that you can not define __construct function for your custom controller, thus, <b>\Yaf\Controller_Abstract</b> provides a magic method: \Yaf\Controller_Abstract::init().</p>
 * <br/>
 * <p>If you have defined a init() method in your custom controller, it will be called as long as the controller was instantiated.</p>
 * <br/>
 * <p>Action may have arguments, when a request coming, if there are the same name variable in the request parameters(see \Yaf\Request_Abstract::getParam()) after routed, Yaf will pass them to the action method (see \Yaf\Action_Abstract::execute()).</p>
 * <br/>
 * <b>Note:</b>
 * <p>These arguments are directly fetched without filtering, it should be carefully processed before use them.</p>
 *
 * @link https://secure.php.net/manual/en/class.yaf-controller-abstract.php
 */
abstract class Controller_Abstract
{
    /**
     * @see \Yaf\Action_Abstract
     * @var array You can also define a action method in a separate PHP script by using this property and \Yaf\Action_Abstract.
     */
    public $actions;

    /**
     * @var string module name
     */
    protected $_module;

    /**
     * @var string controller name
     */
    protected $_name;

    /**
     * @var \Yaf\Request_Abstract current request object
     */
    protected $_request;

    /**
     * @var \Yaf\Response_Abstract current response object
     */
    protected $_response;

    /**
     * @var array
     */
    protected $_invoke_args;

    /**
     * @var \Yaf\View_Interface view engine object
     */
    protected $_view;

    /**
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.render.php
     *
     * @param string $tpl
     * @param array $parameters
     *
     * @return string
     */
    protected function render($tpl, array $parameters = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.display.php
     *
     * @param string $tpl
     * @param array $parameters
     *
     * @return bool
     */
    protected function display($tpl, array $parameters = null) {}

    /**
     * retrieve current request object
     *
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.getrequest.php
     *
     * @return \Yaf\Request_Abstract
     */
    public function getRequest() {}

    /**
     * retrieve current response object
     *
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.getresponse.php
     *
     * @return \Yaf\Response_Abstract
     */
    public function getResponse() {}

    /**
     * get the controller's module name
     *
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.getmodulename.php
     *
     * @return string
     */
    public function getModuleName() {}

    /**
     * retrieve view engine
     *
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.getview.php
     *
     * @return \Yaf\View_Interface
     */
    public function getView() {}

    /**
     * @deprecated not_implemented
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.initview.php
     *
     * @param array $options
     *
     * @return \Yaf\Response_Abstract
     */
    public function initView(array $options = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.setviewpath.php
     *
     * @param string $view_directory
     *
     * @return bool
     */
    public function setViewpath($view_directory) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.getviewpath.php
     *
     * @return string
     */
    public function getViewpath() {}

    /**
     * <p>forward current execution process to other action.</p>
     * <br/>
     * <b>Note:</b>
     * <p>this method doesn't switch to the destination action immediately, it will take place after current flow finish.</p>
     * <br/>
     * <b>Notice, there are 3 available method signatures:</b>
     * <p>\Yaf\Controller_Abstract::forward ( string $module , string $controller , string $action [, array $parameters ] )</p>
     * <p>\Yaf\Controller_Abstract::forward ( string $controller , string $action [, array $parameters ] )</p>
     * <p>\Yaf\Controller_Abstract::forward ( string $action [, array $parameters ] )</p>
     *
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.forward.php
     *
     * @param string $module destination module name, if NULL was given, then default module name is assumed
     * @param string $controller destination controller name
     * @param string $action destination action name
     * @param array $parameters calling arguments
     *
     * @return bool return FALSE on failure
     */
    public function forward($module, $controller = null, $action = null, array $parameters = null) {}

    /**
     * redirect to a URL by sending a 302 header
     *
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.redirect.php
     *
     * @param string $url a location URL
     *
     * @return bool
     */
    public function redirect($url) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.getinvokeargs.php
     *
     * @return array
     */
    public function getInvokeArgs() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.getinvokearg.php
     * @param string $name
     *
     * @return mixed|null
     */
    public function getInvokeArg($name) {}

    /**
     * <p>\Yaf\Controller_Abstract::__construct() is final, which means users can not override it. but users can define <b>\Yaf\Controller_Abstract::init()</b>, which will be called after controller object is instantiated.</p>
     *
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.init.php
     */
    public function init() {}

    /**
     * <b>\Yaf\Controller_Abstract</b>::__construct() is final, which means it can not be overridden. You may want to see \Yaf\Controller_Abstract::init() instead.
     *
     * @see \Yaf\Controller_Abstract::init()
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.construct.php
     *
     * @param \Yaf\Request_Abstract $request
     * @param \Yaf\Response_Abstract $response
     * @param \Yaf\View_Interface $view
     * @param array $invokeArgs
     */
    final public function __construct(Yaf\Request_Abstract $request, Yaf\Response_Abstract $response, Yaf\View_Interface $view, array $invokeArgs = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.clone.php
     */
    final private function __clone() {}
}/**
 * <p>A action can be defined in a separate file in Yaf(see \Yaf\Controller_Abstract). that is a action method can also be a <b>\Yaf\Action_Abstract</b> class.</P>
 * <br/>
 * <p>Since there should be a entry point which can be called by Yaf (as of PHP 5.3, there is a new magic method __invoke, but Yaf is not only works with PHP 5.3+, Yaf choose another magic method execute), you must implement the abstract method \Yaf\Action_Abstract::execute() in your custom action class.</p>
 *
 * @link https://secure.php.net/manual/en/class.yaf-action-abstract.php
 */
abstract class Action_Abstract extends \Yaf\Controller_Abstract
{
    /**
     * @var \Yaf\Controller_Abstract
     */
    protected $_controller;

    /**
     * <p>user should always define this method for a action, this is the entry point of an action. <b>\Yaf\Action_Abstract::execute()</b> may have arguments.</p>
     * <br/>
     * <b>Note:</b>
     * <p>The value retrieved from the request is not safe. you should do some filtering work before you use it.</p>
     * @link https://secure.php.net/manual/en/yaf-action-abstract.execute.php
     *
     * @param mixed ... unlimited number of arguments
     * @return mixed
     */
    abstract public function execute();

    /**
     * retrieve current controller object.
     *
     * @link https://secure.php.net/manual/en/yaf-action-abstract.getcontroller.php
     *
     * @return \Yaf\Controller_Abstract
     */
    public function getController() {}
}/**
 * @link https://secure.php.net/manual/en/class.yaf-config-abstract.php
 */
abstract class Config_Abstract
{
    /**
     * @var array
     */
    protected $_config = null;

    /**
     * @var bool
     */
    protected $_readonly = true;

    /**
     * @link https://secure.php.net/manual/en/yaf-config-abstract.get.php
     *
     * @param string $name
     * @return mixed
     */
    abstract public function get($name = null);

    /**
     * @link https://secure.php.net/manual/en/yaf-config-abstract.set.php
     *
     * @param string $name
     * @param mixed $value
     * @return \Yaf\Config_Abstract
     */
    abstract public function set($name, $value);

    /**
     * @link https://secure.php.net/manual/en/yaf-config-abstract.readonly.php
     *
     * @return bool
     */
    abstract public function readonly();

    /**
     * @link https://secure.php.net/manual/en/yaf-config-abstract.toarray.php
     *
     * @return array
     */
    abstract public function toArray();
}/**
 * @link https://secure.php.net/manual/en/class.yaf-request-abstract.php
 */
abstract class Request_Abstract
{
    public const SCHEME_HTTP = 'http';
    public const SCHEME_HTTPS = 'https';

    /**
     * @var string
     */
    public $module;

    /**
     * @var string
     */
    public $controller;

    /**
     * @var string
     */
    public $action;

    /**
     * @var string
     */
    public $method;

    /**
     * @var array
     */
    protected $params;

    /**
     * @var string
     */
    protected $language;

    /**
     * @var \Yaf\Exception
     */
    protected $_exception;

    /**
     * @var string
     */
    protected $_base_uri = "";

    /**
     * @var string
     */
    protected $uri = "";

    /**
     * @var string
     */
    protected $dispatched = "";

    /**
     * @var string
     */
    protected $routed = "";

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.isget.php
     *
     * @return bool
     */
    public function isGet() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.ispost.php
     *
     * @return bool
     */
    public function isPost() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.isput.php
     *
     * @return bool
     */
    public function isPut() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.ishead.php
     *
     * @return bool
     */
    public function isHead() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.isoptions.php
     *
     * @return bool
     */
    public function isOptions() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.iscli.php
     *
     * @return bool
     */
    public function isCli() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.isdispached.php
     *
     * @return bool
     */
    public function isDispatched() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.isrouted.php
     *
     * @return bool
     */
    public function isRouted() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.isxmlhttprequest.php
     *
     * @return bool false
     */
    public function isXmlHttpRequest() {}

    /**
     * Retrieve $_SERVER variable
     *
     * @link https://secure.php.net/manual/en/yaf-request-abstract.getserver.php
     *
     * @param string $name the variable name, if not provided returns all
     * @param mixed $default if this parameter is provide, this will be returned if the variable can not be found
     *
     * @return mixed
     */
    public function getServer($name = null, $default = null) {}

    /**
     * Retrieve $_ENV variable
     *
     * @link https://secure.php.net/manual/en/yaf-request-abstract.getenv.php
     *
     * @param string $name the variable name, if not provided returns all
     * @param mixed $default if this parameter is provide, this will be returned if the variable can not be found
     *
     * @return mixed
     */
    public function getEnv($name = null, $default = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.getparam.php
     *
     * @param string $name
     * @param mixed $default
     *
     * @return mixed
     */
    public function getParam($name, $default = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.getparams.php
     *
     * @return array
     */
    public function getParams() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.getexception.php
     *
     * @return \Yaf\Exception
     */
    public function getException() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.getmoudlename.php
     *
     * @return string
     */
    public function getModuleName() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.getcontrollername.php
     *
     * @return string
     */
    public function getControllerName() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.getactionname.php
     *
     * @return string
     */
    public function getActionName() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.setparam.php
     *
     * @param string|array $name the variable name, or an array of key=>value pairs
     * @param string $value
     *
     * @return \Yaf\Request_Abstract|bool
     */
    public function setParam($name, $value = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.setmodulename.php
     *
     * @param string $module
     *
     * @return \Yaf\Request_Abstract|bool
     */
    public function setModuleName($module) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.setcontrollername.php
     *
     * @param string $controller
     *
     * @return \Yaf\Request_Abstract|bool
     */
    public function setControllerName($controller) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.setactionname.php
     *
     * @param string $action
     *
     * @return \Yaf\Request_Abstract|bool
     */
    public function setActionName($action) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.getmethod.php
     *
     * @return string
     */
    public function getMethod() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.getlanguage.php
     *
     * @return string
     */
    public function getLanguage() {}

    /**
     * <p>Set base URI, base URI is used when doing routing, in routing phase request URI is used to route a request, while base URI is used to skip the leading part(base URI) of request URI. That is, if comes a request with request URI a/b/c, then if you set base URI to "a/b", only "/c" will be used in routing phase.</p>
     * <br/>
     * <b>Note:</b>
     * <p>generally, you don't need to set this, Yaf will determine it automatically.</p>
     *
     * @link https://secure.php.net/manual/en/yaf-request-abstract.setbaseuri.php
     *
     * @param string $uri base URI
     *
     * @return bool
     */
    public function setBaseUri($uri) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.getbaseuri.php
     *
     * @return string
     */
    public function getBaseUri() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.getrequesturi.php
     *
     * @return string
     */
    public function getRequestUri() {}

    /**
     * @since 2.1.0
     * @link https://secure.php.net/manual/en/yaf-request-abstract.setrequesturi.php
     *
     * @param string $uri request URI
     */
    public function setRequestUri($uri) {}

    /**
     * Set request as dispatched
     *
     * @link https://secure.php.net/manual/en/yaf-request-abstract.setdispatched.php
     *
     * @return bool
     */
    public function setDispatched() {}

    /**
     * Set request as routed
     *
     * @link https://secure.php.net/manual/en/yaf-request-abstract.setrouted.php
     *
     * @return \Yaf\Request_Abstract|bool
     */
    public function setRouted() {}
}/**
 * <p>Plugins allow for easy extensibility and customization of the framework.</p>
 * <br/>
 * <p>Plugins are classes. The actual class definition will vary based on the component -- you may need to implement this interface, but the fact remains that the plugin is itself a class.</p>
 * <br/>
 * <p>A plugin could be loaded into Yaf by using \Yaf\Dispatcher::registerPlugin(), after registered, All the methods which the plugin implemented according to this interface, will be called at the proper time.</p>
 * @link https://secure.php.net/manual/en/class.yaf-plugin-abstract.php
 */
abstract class Plugin_Abstract
{
    /**
     * This is the earliest hook in Yaf plugin hook system, if a custom plugin implement this method, then it will be called before routing a request.
     *
     * @link https://secure.php.net/manual/en/yaf-plugin-abstract.routerstartup.php
     *
     * @param \Yaf\Request_Abstract $request
     * @param \Yaf\Response_Abstract $response
     *
     * @return bool true
     */
    public function routerStartup(Yaf\Request_Abstract $request, Yaf\Response_Abstract $response) {}

    /**
     * This hook will be trigged after the route process finished, this hook is usually used for login check.
     *
     * @link https://secure.php.net/manual/en/yaf-plugin-abstract.routershutdown.php
     *
     * @param \Yaf\Request_Abstract $request
     * @param \Yaf\Response_Abstract $response
     *
     * @return bool true
     */
    public function routerShutdown(Yaf\Request_Abstract $request, Yaf\Response_Abstract $response) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-plugin-abstract.dispatchloopstartup.php
     *
     * @param \Yaf\Request_Abstract $request
     * @param \Yaf\Response_Abstract $response
     *
     * @return bool true
     */
    public function dispatchLoopStartup(Yaf\Request_Abstract $request, Yaf\Response_Abstract $response) {}

    /**
     * This is the latest hook in Yaf plugin hook system, if a custom plugin implement this method, then it will be called after the dispatch loop finished.
     *
     * @link https://secure.php.net/manual/en/yaf-plugin-abstract.dispatchloopshutdown.php
     *
     * @param \Yaf\Request_Abstract $request
     * @param \Yaf\Response_Abstract $response
     *
     * @return bool true
     */
    public function dispatchLoopShutdown(Yaf\Request_Abstract $request, Yaf\Response_Abstract $response) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-plugin-abstract.predispatch.php
     *
     * @param \Yaf\Request_Abstract $request
     * @param \Yaf\Response_Abstract $response
     *
     * @return bool true
     */
    public function preDispatch(Yaf\Request_Abstract $request, Yaf\Response_Abstract $response) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-plugin-abstract.postdispatch.php
     *
     * @param \Yaf\Request_Abstract $request
     * @param \Yaf\Response_Abstract $response
     *
     * @return bool true
     */
    public function postDispatch(Yaf\Request_Abstract $request, Yaf\Response_Abstract $response) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-plugin-abstract.preresponse.php
     *
     * @param \Yaf\Request_Abstract $request
     * @param \Yaf\Response_Abstract $response
     *
     * @return bool true
     */
    public function preResponse(Yaf\Request_Abstract $request, Yaf\Response_Abstract $response) {}
}/**
 * @link https://secure.php.net/manual/en/class.yaf-response-abstract.php
 */
abstract class Response_Abstract
{
    public const DEFAULT_BODY = "content";

    /**
     * @var string
     */
    protected $_header;

    /**
     * @var string
     */
    protected $_body;

    /**
     * @var bool
     */
    protected $_sendheader;

    /**
     * @link https://secure.php.net/manual/en/yaf-response-abstract.construct.php
     */
    public function __construct() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-response-abstract.destruct.php
     */
    public function __destruct() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-response-abstract.clone.php
     */
    private function __clone() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-response-abstract.tostring.php
     */
    public function __toString() {}

    /**
     * Set content to response
     *
     * @link https://secure.php.net/manual/en/yaf-response-abstract.setbody.php
     *
     * @param string $content content string
     * @param string $key <p>the content key, you can set a content with a key, if you don't specific, then \Yaf\Response_Abstract::DEFAULT_BODY will be used</p>
     * <br/>
     * <b>Note:</b>
     * <p>this parameter is introduced as of 2.2.0</p>
     *
     * @return bool
     */
    public function setBody($content, $key = self::DEFAULT_BODY) {}

    /**
     * append a content to a exists content block
     *
     * @link https://secure.php.net/manual/en/yaf-response-abstract.appendbody.php
     *
     * @param string $content content string
     * @param string $key <p>the content key, you can set a content with a key, if you don't specific, then \Yaf\Response_Abstract::DEFAULT_BODY will be used</p>
     * <br/>
     * <b>Note:</b>
     * <p>this parameter is introduced as of 2.2.0</p>
     *
     * @return bool
     */
    public function appendBody($content, $key = self::DEFAULT_BODY) {}

    /**
     * prepend a content to a exists content block
     *
     * @link https://secure.php.net/manual/en/yaf-response-abstract.prependbody.php
     *
     * @param string $content content string
     * @param string $key <p>the content key, you can set a content with a key, if you don't specific, then \Yaf\Response_Abstract::DEFAULT_BODY will be used</p>
     * <br/>
     * <b>Note:</b>
     * <p>this parameter is introduced as of 2.2.0</p>
     *
     * @return bool
     */
    public function prependBody($content, $key = self::DEFAULT_BODY) {}

    /**
     * Clear existing content
     *
     * @link https://secure.php.net/manual/en/yaf-response-abstract.clearbody.php
     *
     * @param string $key <p>the content key, you can set a content with a key, if you don't specific, then \Yaf\Response_Abstract::DEFAULT_BODY will be used</p>
     * <br/>
     * <b>Note:</b>
     * <p>this parameter is introduced as of 2.2.0</p>
     *
     * @return bool
     */
    public function clearBody($key = self::DEFAULT_BODY) {}

    /**
     * Retrieve an existing content
     *
     * @link https://secure.php.net/manual/en/yaf-response-abstract.getbody.php
     *
     * @param string|null $key <p>the content key, if you don't specific, then \Yaf\Response_Abstract::DEFAULT_BODY will be used. if you pass in a NULL, then all contents will be returned as a array</p>
     * <br/>
     * <b>Note:</b>
     * <p>this parameter is introduced as of 2.2.0</p>
     *
     * @return mixed
     */
    public function getBody($key = self::DEFAULT_BODY) {}
}/**
 * Yaf provides a ability for developers to use custom view engine instead of build-in engine which is \Yaf\View\Simple. There is a example to explain how to do this, please see \Yaf\Dispatcher::setView()
 *
 * @link https://secure.php.net/manual/en/class.yaf-view-interface.php
 */
interface View_Interface
{
    /**
     * Assign values to View engine, then the value can access directly by name in template.
     *
     * @link https://secure.php.net/manual/en/yaf-view-interface.assign.php
     *
     * @param string|array $name
     * @param mixed $value
     * @return bool
     */
    public function assign($name, $value);

    /**
     * Render a template and output the result immediately.
     *
     * @link https://secure.php.net/manual/en/yaf-view-interface.display.php
     *
     * @param string $tpl
     * @param array $tpl_vars
     * @return bool
     */
    public function display($tpl, array $tpl_vars = null);

    /**
     * @link https://secure.php.net/manual/en/yaf-view-interface.getscriptpath.php
     *
     * @return string
     */
    public function getScriptPath();

    /**
     * Render a template and return the result.
     *
     * @link https://secure.php.net/manual/en/yaf-view-interface.render.php
     *
     * @param string $tpl
     * @param array $tpl_vars
     * @return string
     */
    public function render($tpl, array $tpl_vars = null);

    /**
     * Set the templates base directory, this is usually called by \Yaf\Dispatcher
     *
     * @link https://secure.php.net/manual/en/yaf-view-interface.setscriptpath.php
     *
     * @param string $template_dir An absolute path to the template directory, by default, \Yaf\Dispatcher use application.directory . "/views" as this parameter.
     */
    public function setScriptPath($template_dir);
}/**
 * <b>\Yaf\Route_Interface</b> used for developer defined their custom route.
 *
 * @link https://secure.php.net/manual/en/class.yaf-route-interface.php
 */
interface Route_Interface
{
    /**
     * <p><b>\Yaf\Route_Interface::route()</b> is the only method that a custom route should implement.</p><br/>
     * <p>if this method return TRUE, then the route process will be end. otherwise, \Yaf\Router will call next route in the route stack to route request.</p><br/>
     * <p>This method would set the route result to the parameter request, by calling \Yaf\Request_Abstract::setControllerName(), \Yaf\Request_Abstract::setActionName() and \Yaf\Request_Abstract::setModuleName().</p><br/>
     * <p>This method should also call \Yaf\Request_Abstract::setRouted() to make the request routed at last.</p>
     *
     * @link https://secure.php.net/manual/en/yaf-route-interface.route.php
     *
     * @param \Yaf\Request_Abstract $request
     * @return bool
     */
    public function route(Yaf\Request_Abstract $request);

    /**
     * <p><b>\Yaf\Route_Interface::assemble()</b> - assemble a request</p><br/>
     * <p>this method returns a url according to the argument info, and append query strings to the url according to the argument query.</p>
     * <p>a route should implement this method according to its own route rules, and do a reverse progress.</p>
     *
     * @link https://secure.php.net/manual/en/yaf-route-interface.assemble.php
     *
     * @param array $info
     * @param array $query
     * @return bool
     */
    public function assemble(array $info, array $query = null);
}/**
 * @link https://secure.php.net/manual/en/class.yaf-exception.php
 */
class Exception extends \Exception {}/**
 * <p>by default, \Yaf\Router only have a <b>\Yaf\Route_Static</b> as its default route.</p>
 * <br/>
 * <p><b>\Yaf\Route_Static</b> is designed to handle 80% of normal requirements.</p>
 * <br/>
 * <b>Note:</b>
 * <p> it is unnecessary to instance a <b>\Yaf\Route_Static</b>, also unnecessary to add it into \Yaf\Router's routes stack, since there is always be one in \Yaf\Router's routes stack, and always be called at the last time.</p>
 *
 * @link https://secure.php.net/manual/en/class.yaf-route-static.php
 */
class Route_Static implements \Yaf\Route_Interface
{
    /**
     * @deprecated not_implemented
     * @link https://secure.php.net/manual/en/yaf-route-static.match.php
     *
     * @param string $uri
     *
     * @return bool
     */
    public function match($uri) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-route-static.route.php
     *
     * @param \Yaf\Request_Abstract $request
     *
     * @return bool always TRUE
     */
    public function route(Yaf\Request_Abstract $request) {}

    /**
     * <p><b>\Yaf\Route_Static::assemble()</b> - Assemble a url</p>
     *
     * @link https://secure.php.net/manual/en/yaf-route-static.assemble.php
     *
     * @param array $info
     * @param array $query
     * @return bool
     */
    public function assemble(array $info, array $query = null) {}
}}

namespace Yaf\Response {
    class Http extends \Yaf\Response_Abstract
{
    /**
     * @var int
     */
    protected $_response_code = 0;

    private function __clone() {}

    /**
     * @return string
     */
    private function __toString() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-response-abstract.setheader.php
     *
     * @param string $name
     * @param string $value
     * @param bool $replace
     * @param int $response_code
     *
     * @return bool
     */
    public function setHeader($name, $value, $replace = false, $response_code = 0) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-response-abstract.setallheaders.php
     *
     * @param array $headers
     *
     * @return bool
     */
    public function setAllHeaders(array $headers) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-response-abstract.getheader.php
     *
     * @param string $name
     *
     * @return mixed
     */
    public function getHeader($name = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-response-abstract.clearheaders.php
     *
     *
     * @return \Yaf\Response_Abstract|false
     */
    public function clearHeaders() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-response-abstract.setredirect.php
     *
     * @param string $url
     *
     * @return bool
     */
    public function setRedirect($url) {}

    /**
     * send response
     *
     * @link https://secure.php.net/manual/en/yaf-response-abstract.response.php
     *
     * @return bool
     */
    public function response() {}
}
class Cli extends \Yaf\Response_Abstract
{
    private function __clone() {}

    /**
     * @return string
     */
    private function __toString() {}
}}

namespace Yaf\Request {
/**
 * @link https://secure.php.net/manual/en/class.yaf-request-http.php
 */
class Http extends \Yaf\Request_Abstract
{
    /**
     * Retrieve $_GET variable
     *
     * @link https://secure.php.net/manual/en/yaf-request-http.getquery.php
     *
     * @param string $name the variable name, if not provided returns all
     * @param mixed $default if this parameter is provide, this will be returned if the variable can not be found
     *
     * @return mixed
     */
    public function getQuery($name = null, $default = null) {}

    /**
     * Retrieve $_REQUEST variable
     *
     * @link https://secure.php.net/manual/en/yaf-request-http.getrequest.php
     *
     * @param string $name the variable name, if not provided returns all
     * @param mixed $default if this parameter is provide, this will be returned if the variable can not be found
     *
     * @return mixed
     */
    public function getRequest($name = null, $default = null) {}

    /**
     * Retrieve $_POST variable
     *
     * @link https://secure.php.net/manual/en/yaf-request-http.getpost.php
     *
     * @param string $name the variable name, if not provided returns all
     * @param mixed $default if this parameter is provide, this will be returned if the variable can not be found
     *
     * @return mixed
     */
    public function getPost($name = null, $default = null) {}

    /**
     * Retrieve $_COOKIE variable
     *
     * @link https://secure.php.net/manual/en/yaf-request-http.getcookie.php
     *
     * @param string $name the variable name, if not provided returns all
     * @param mixed $default if this parameter is provide, this will be returned if the variable can not be found
     *
     * @return mixed
     */
    public function getCookie($name = null, $default = null) {}

    /**
     * Retrieve $_FILES variable
     *
     * @link https://secure.php.net/manual/en/yaf-request-http.getfiles.php
     *
     * @param string $name the variable name, if not provided returns all
     * @param mixed $default if this parameter is provide, this will be returned if the variable can not be found
     *
     * @return mixed
     */
    public function getFiles($name = null, $default = null) {}

    /**
     * Retrieve variable from client, this method will search the name in $_REQUEST params, if the name is not found, then will search in $_POST, $_GET, $_COOKIE, $_SERVER
     *
     * @link https://secure.php.net/manual/en/yaf-request-http.get.php
     *
     * @param string $name the variable name
     * @param string $default if this parameter is provide, this will be returned if the variable can not be found
     *
     * @return mixed
     */
    public function get($name, $default = null) {}

    /**
     * Check the request whether it is a Ajax Request
     *
     * <br/>
     * <b>Note:</b>
     * <p>
     * This method depends on the request header: HTTP_X_REQUESTED_WITH, some Javascript library doesn't set this header while doing Ajax request
     * </p>
     * @link https://secure.php.net/manual/en/yaf-request-http.isxmlhttprequest.php
     *
     * @return bool
     */
    public function isXmlHttpRequest() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-http.construct.php
     *
     * @param string $request_uri
     * @param string $base_uri
     */
    public function __construct($request_uri, $base_uri) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-http.clone.php
     */
    private function __clone() {}
}/**
 * <b>\Yaf\Request\Simple</b> is particularly used for test purpose. ie. simulate a spacial request under CLI mode.
 * @link https://secure.php.net/manual/en/class.yaf-request-simple.php
 */
class Simple extends \Yaf\Request_Abstract
{
    /**
     * Retrieve $_GET variable
     *
     * @link https://secure.php.net/manual/en/yaf-request-simple.getquery.php
     *
     * @param string $name the variable name, if not provided returns all
     * @param string $default if this parameter is provide, this will be returned if the variable can not be found
     *
     * @return mixed
     */
    public function getQuery($name = null, $default = null) {}

    /**
     * Retrieve $_REQUEST variable
     *
     * @link https://secure.php.net/manual/en/yaf-request-simple.getrequest.php
     *
     * @param string $name the variable name, if not provided returns all
     * @param string $default if this parameter is provide, this will be returned if the variable can not be found
     *
     * @return mixed
     */
    public function getRequest($name = null, $default = null) {}

    /**
     * Retrieve $_POST variable
     *
     * @link https://secure.php.net/manual/en/yaf-request-simple.getpost.php
     *
     * @param string $name the variable name, if not provided returns all
     * @param string $default if this parameter is provide, this will be returned if the variable can not be found
     *
     * @return mixed
     */
    public function getPost($name = null, $default = null) {}

    /**
     * Retrieve $_Cookie variable
     *
     * @link https://secure.php.net/manual/en/yaf-request-simple.getcookie.php
     *
     * @param string $name the variable name, if not provided returns all
     * @param string $default if this parameter is provide, this will be returned if the variable can not be found
     *
     * @return mixed
     */
    public function getCookie($name = null, $default = null) {}

    /**
     * @param mixed $name
     * @param null $default
     *
     * @return array
     */
    public function getFiles($name = null, $default = null) {}

    /**
     * Retrieve variable from client, this method will search the name in $_REQUEST params, if the name is not found, then will search in $_POST, $_GET, $_COOKIE, $_SERVER
     *
     * @link https://secure.php.net/manual/en/yaf-request-simple.get.php
     *
     * @param string $name the variable name
     * @param string $default if this parameter is provide, this will be returned if the variable can not be found
     *
     * @return mixed
     */
    public function get($name, $default = null) {}

    /**
     * Check the request whether it is a Ajax Request
     *
     * <br/>
     * <b>Note:</b>
     * <p>
     * This method depends on the request header: HTTP_X_REQUESTED_WITH, some Javascript library doesn't set this header while doing Ajax request
     * </p>
     * @link https://secure.php.net/manual/en/yaf-request-simple.isxmlhttprequest.php
     *
     * @return bool
     */
    public function isXmlHttpRequest() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-simple.construct.php
     *
     * @param string $method
     * @param string $controller
     * @param string $action
     * @param string $params
     *
     * @throws \Yaf\Exception\TypeError
     */
    public function __construct($method, $controller, $action, $params = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-simple.clone.php
     */
    private function __clone() {}
}}

namespace Yaf\Config {
/**
 * <p>\Yaf\Config\Ini enables developers to store configuration data in a familiar INI format and read them in the application by using nested object property syntax. The INI format is specialized to provide both the ability to have a hierarchy of configuration data keys and inheritance between configuration data sections. Configuration data hierarchies are supported by separating the keys with the dot or period character ("."). A section may extend or inherit from another section by following the section name with a colon character (":") and the name of the section from which data are to be inherited.</p><br/>
 * <b>Note:</b>
 * <p>\Yaf\Config\Ini utilizes the » parse_ini_file() PHP function. Please review this documentation to be aware of its specific behaviors, which propagate to \Yaf\Config\Ini, such as how the special values of "TRUE", "FALSE", "yes", "no", and "NULL" are handled.</p>
 * @link https://secure.php.net/manual/en/class.yaf-config-ini.php
 */
class Ini extends \Yaf\Config_Abstract implements \Iterator, \Traversable, \ArrayAccess, \Countable
{
    /**
     * @see \Yaf\Config_Abstract::get
     */
    public function __get($name = null) {}

    /**
     * @see \Yaf\Config_Abstract::set
     */
    public function __set($name, $value) {}

    /**
     * @see \Yaf\Config_Abstract::get
     */
    public function get($name = null) {}

    /**
     * @see \Yaf\Config_Abstract::set
     * @deprecated not_implemented
     */
    public function set($name, $value) {}

    /**
     * @see \Yaf\Config_Abstract::toArray
     */
    public function toArray() {}

    /**
     * @see \Yaf\Config_Abstract::readonly
     */
    public function readonly() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-config-ini.construct.php
     *
     * @param string $config_file path to an INI configure file
     * @param string $section which section in that INI file you want to be parsed
     *
     * @throws \Yaf\Exception\TypeError
     */
    public function __construct($config_file, $section = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-config-ini.isset.php
     * @param string $name
     */
    public function __isset($name) {}

    /**
     * @see \Countable::count
     */
    public function count() {}

    /**
     * @see \Iterator::rewind
     */
    public function rewind() {}

    /**
     * @see \Iterator::current
     */
    public function current() {}

    /**
     * @see \Iterator::next
     */
    public function next() {}

    /**
     * @see \Iterator::valid
     */
    public function valid() {}

    /**
     * @see \Iterator::key
     */
    public function key() {}

    /**
     * @see \ArrayAccess::offsetUnset
     * @deprecated not_implemented
     */
    public function offsetUnset($name) {}

    /**
     * @see \ArrayAccess::offsetGet
     */
    public function offsetGet($name) {}

    /**
     * @see \ArrayAccess::offsetExists
     */
    public function offsetExists($name) {}

    /**
     * @see \ArrayAccess::offsetSet
     */
    public function offsetSet($name, $value) {}
}/**
 * @link https://secure.php.net/manual/en/class.yaf-config-simple.php
 */
class Simple extends \Yaf\Config_Abstract implements \Iterator, \Traversable, \ArrayAccess, \Countable
{
    /**
     * @see \Yaf\Config_Abstract::get
     */
    public function __get($name = null) {}

    /**
     * @see \Yaf\Config_Abstract::set
     */
    public function __set($name, $value) {}

    /**
     * @see \Yaf\Config_Abstract::get
     */
    public function get($name = null) {}

    /**
     * @see \Yaf\Config_Abstract::set
     */
    public function set($name, $value) {}

    /**
     * @see \Yaf\Config_Abstract::toArray
     */
    public function toArray() {}

    /**
     * @see \Yaf\Config_Abstract::readonly
     */
    public function readonly() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-config-simple.construct.php
     *
     * @param array $array
     * @param string $readonly
     */
    public function __construct(array $array, $readonly = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-config-simple.isset.php
     * @param string $name
     */
    public function __isset($name) {}

    /**
     * @see \Countable::count
     */
    public function count() {}

    /**
     * @see \Iterator::rewind
     */
    public function rewind() {}

    /**
     * @see \Iterator::current
     */
    public function current() {}

    /**
     * @see \Iterator::next
     */
    public function next() {}

    /**
     * @see \Iterator::valid
     */
    public function valid() {}

    /**
     * @see \Iterator::key
     */
    public function key() {}

    /**
     * @see \ArrayAccess::offsetUnset
     */
    public function offsetUnset($name) {}

    /**
     * @see \ArrayAccess::offsetGet
     */
    public function offsetGet($name) {}

    /**
     * @see \ArrayAccess::offsetExists
     */
    public function offsetExists($name) {}

    /**
     * @see \ArrayAccess::offsetSet
     */
    public function offsetSet($name, $value) {}
}}

namespace Yaf\View {
/**
 * <b>\Yaf\View\Simple</b> is the built-in template engine in Yaf, it is a simple but fast template engine, and only support PHP script template.
 * @link https://secure.php.net/manual/en/class.yaf-view-simple.php
 *
 * @method void|bool eval(string $tpl_str, array $vars = null) <p>Render a string template and return the result.</p>
 *
 * @link https://secure.php.net/manual/en/yaf-view-simple.eval.php
 *
 * @param string $tpl_str string template
 * @param array $vars
 *
 * @return void|false return FALSE on failure
 */
class Simple implements \Yaf\View_Interface
{
    /**
     * @var string
     */
    protected $_tpl_dir;

    /**
     * @var array
     */
    protected $_tpl_vars;

    /**
     * @var array
     */
    protected $_options;

    /**
     * @link https://secure.php.net/manual/en/yaf-view-simple.construct.php
     *
     * @param string $template_dir The base directory of the templates, by default, it is APPLICATION . "/views" for Yaf.
     * @param array $options <p>Options for the engine, as of Yaf 2.1.13, you can use short tag
     * "<?=$var?>" in your template(regardless of "short_open_tag"),
     * so comes a option named "short_tag",  you can switch this off
     * to prevent use short_tag in template.
     * </p>
     * @throws \Yaf\Exception\TypeError
     */
    final public function __construct($template_dir, array $options = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-view-simple.isset.php
     *
     * @param string $name
     */
    public function __isset($name) {}

    /**
     * assign variable to view engine
     *
     * @link https://secure.php.net/manual/en/yaf-view-simple.assign.php
     *
     * @param string|array $name A string or an array.<br/>if is string, then the next argument $value is required.
     * @param mixed $value mixed value
     * @return \Yaf\View\Simple
     */
    public function assign($name, $value = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-view-simple.render.php
     *
     * @param string $tpl
     * @param array $tpl_vars
     *
     * @throws \Yaf\Exception\LoadFailed\View
     *
     * @return string|void
     */
    public function render($tpl, array $tpl_vars = null) {}

    /**
     * <p>Render a template and display the result instantly.</p>
     *
     * @link https://secure.php.net/manual/en/yaf-view-simple.display.php
     *
     * @param string $tpl
     * @param array $tpl_vars
     *
     * @throws \Yaf\Exception\LoadFailed\View
     *
     * @return bool
     */
    public function display($tpl, array $tpl_vars = null) {}

    /**
     * <p>unlike \Yaf\View\Simple::assign(), this method assign a ref value to engine.</p>
     * @link https://secure.php.net/manual/en/yaf-view-simple.assignref.php
     *
     * @param string $name A string name which will be used to access the value in the template.
     * @param mixed &$value mixed value
     *
     * @return \Yaf\View\Simple
     */
    public function assignRef($name, &$value) {}

    /**
     * clear assigned variable
     * @link https://secure.php.net/manual/en/yaf-view-simple.clear.php
     *
     * @param string $name assigned variable name. <br/>if empty, will clear all assigned variables.
     *
     * @return \Yaf\View\Simple
     */
    public function clear($name = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-view-simple.setscriptpath.php
     *
     * @param string $template_dir
     *
     * @return \Yaf\View\Simple
     */
    public function setScriptPath($template_dir) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-view-simple.getscriptpath.php
     *
     * @return string
     */
    public function getScriptPath() {}

    /**
     * <p>Retrieve assigned variable</p>
     * <br/>
     * <b>Note:</b>
     * <p>$name parameter can be empty since 2.1.11</p>
     * @link https://secure.php.net/manual/en/yaf-view-simple.get.php
     *
     * @param null $name <p>the assigned variable name</p>
     * <br/>
     * <p>if this is empty, all assigned variables will be returned</p>
     *
     * @return mixed
     */
    public function __get($name = null) {}

    /**
     * <p>This is a alternative and easier way to \Yaf\View\Simple::assign().</p>
     *
     * @link https://secure.php.net/manual/en/yaf-view-simple.set.php
     *
     * @param string $name A string value name.
     * @param mixed $value mixed value
     */
    public function __set($name, $value = null) {}
}}

namespace Yaf\Route {
/**
 * <p><b>\Yaf\Route\Simple</b> will match the query string, and find the route info.</p>
 * <br/>
 * <p>all you need to do is tell <b>\Yaf\Route\Simple</b> what key in the $_GET is module, what key is controller, and what key is action.</p>
 * <br/>
 * <p>\Yaf\Route\Simple::route() will always return TRUE, so it is important put <b>\Yaf\Route\Simple</b> in the front of the Route stack, otherwise all the other routes will not be called</p>
 *
 * @link https://secure.php.net/manual/en/class.yaf-route-simple.php
 */
final class Simple implements \Yaf\Route_Interface
{
    /**
     * @var string
     */
    protected $controller;

    /**
     * @var string
     */
    protected $module;

    /**
     * @var string
     */
    protected $action;

    /**
     * <p>\Yaf\Route\Simple will get route info from query string. and the parameters of this constructor will used as keys while searching for the route info in $_GET.</p>
     *
     * @link https://secure.php.net/manual/en/yaf-route-simple.construct.php
     *
     * @param string $module_name
     * @param string $controller_name
     * @param string $action_name
     *
     * @throws \Yaf\Exception\TypeError
     */
    public function __construct($module_name, $controller_name, $action_name) {}

    /**
     * <p>see \Yaf\Route\Simple::__construct()</p>
     *
     * @link https://secure.php.net/manual/en/yaf-route-simple.route.php
     *
     * @param \Yaf\Request_Abstract $request
     *
     * @return bool always TRUE
     */
    public function route(Yaf\Request_Abstract $request) {}

    /**
     * <p><b>\Yaf\Route\Simple::assemble()</b> - Assemble a url</p>
     *
     * @link https://secure.php.net/manual/en/yaf-route-simple.assemble.php
     *
     * @param array $info
     * @param array $query
     * @return bool
     */
    public function assemble(array $info, array $query = null) {}
}/**
 * @link https://secure.php.net/manual/en/class.yaf-route-supervar.php
 */
final class Supervar implements \Yaf\Route_Interface
{
    /**
     * @var string
     */
    protected $_var_name;

    /**
     * <p>\Yaf\Route\Supervar is similar to \Yaf\Route_Static, the difference is that \Yaf\Route\Supervar will look for path info in query string, and the parameter supervar_name is the key.</p>
     *
     * @link https://secure.php.net/manual/en/yaf-route-supervar.construct.php
     *
     * @param string $supervar_name The name of key.
     *
     * @throws \Yaf\Exception\TypeError
     */
    public function __construct($supervar_name) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-route-supervar.route.php
     *
     * @param \Yaf\Request_Abstract $request
     *
     * @return bool If there is a key(which was defined in \Yaf\Route\Supervar::__construct()) in $_GET, return TRUE. otherwise return FALSE.
     */
    public function route(Yaf\Request_Abstract $request) {}

    /**
     * <p><b>\Yaf\Route\Supervar::assemble()</b> - Assemble a url</p>
     *
     * @link https://secure.php.net/manual/en/yaf-route-supervar.assemble.php
     *
     * @param array $info
     * @param array $query
     * @return bool
     */
    public function assemble(array $info, array $query = null) {}
}/**
 * <p>For usage, please see the example section of \Yaf\Route\Rewrite::__construct()</p>
 *
 * @link https://secure.php.net/manual/en/class.yaf-route-rewrite.php
 */
final class Rewrite extends \Yaf\Router implements \Yaf\Route_Interface
{
    /**
     * @var string
     */
    protected $_route;

    /**
     * @var array
     */
    protected $_default;

    /**
     * @var array
     */
    protected $_verify;

    /**
     * @link https://secure.php.net/manual/en/yaf-route-rewrite.construct.php
     *
     * @param string $match A pattern, will be used to match a request uri, if doesn't matched, \Yaf\Route\Rewrite will return FALSE.
     * @param array $route <p>When the match pattern matches the request uri, \Yaf\Route\Rewrite will use this to decide which m/c/a to routed.</p>
     * <br/>
     * <p>either of m/c/a in this array is optional, if you don't assign a specific value, it will be routed to default.</p>
     * @param array $verify
     * @param string $reverse
     *
     * @throws \Yaf\Exception\TypeError
     */
    public function __construct($match, array $route, array $verify = null, $reverse = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-route-rewrite.route.php
     *
     * @param \Yaf\Request_Abstract $request
     *
     * @return bool
     */
    public function route(Yaf\Request_Abstract $request) {}

    /**
     * <p><b>\Yaf\Route\Rewrite::assemble()</b> - Assemble a url</p>
     *
     * @link https://secure.php.net/manual/en/yaf-route-rewrite.assemble.php
     *
     * @param array $info
     * @param array $query
     * @return bool
     */
    public function assemble(array $info, array $query = null) {}
}/**
 * <p><b>\Yaf\Route\Regex</b> is the most flexible route among the Yaf built-in routes.</p>
 *
 * @link https://secure.php.net/manual/en/class.yaf-route-regex.php
 */
final class Regex extends \Yaf\Router implements \Yaf\Route_Interface
{
    /**
     * @var string
     */
    protected $_route;

    /**
     * @var array
     */
    protected $_default;

    /**
     * @var array
     */
    protected $_maps;

    /**
     * @var array
     */
    protected $_verify;

    /**
     * @var string
     */
    protected $_reverse;

    /**
     * @link https://secure.php.net/manual/en/yaf-route-regex.construct.php
     *
     * @param string $match A complete Regex pattern, will be used to match a request uri, if doesn't matched, \Yaf\Route\Regex will return FALSE.
     * @param array $route <p>When the match pattern matches the request uri, \Yaf\Route\Regex will use this to decide which m/c/a to routed.</p>
     * <br/>
     * <p>either of m/c/a in this array is optional, if you don't assign a specific value, it will be routed to default.</p>
     * @param array $map A array to assign name to the captures in the match result.
     * @param array $verify
     * @param string $reverse
     *
     * @throws \Yaf\Exception\TypeError
     */
    public function __construct($match, array $route, array $map = null, array $verify = null, $reverse = null) {}

    /**
     * Route a incoming request.
     *
     * @link https://secure.php.net/manual/en/yaf-route-regex.route.php
     *
     * @param \Yaf\Request_Abstract $request
     *
     * @return bool If the pattern given by the first parameter of \Yaf\Route\Regex::_construct() matches the request uri, return TRUE, otherwise return FALSE.
     */
    public function route(Yaf\Request_Abstract $request) {}

    /**
     * <p><b>\Yaf\Route\Regex::assemble()</b> - Assemble a url</p>
     *
     * @link https://secure.php.net/manual/en/yaf-route-regex.assemble.php
     *
     * @param array $info
     * @param array $query
     * @return bool
     */
    public function assemble(array $info, array $query = null) {}
}/**
 * <p><b>\Yaf\Route\Map</b> is a built-in route, it simply convert a URI endpoint (that part of the URI which comes after the base URI: see \Yaf\Request_Abstract::setBaseUri()) to a controller name or action name(depends on the parameter passed to \Yaf\Route\Map::__construct()) in following rule: A => controller A. A/B/C => controller A_B_C. A/B/C/D/E => controller A_B_C_D_E.</p>
 * <br/>
 * <p>If the second parameter of \Yaf\Route\Map::__construct() is specified, then only the part before delimiter of URI will used to routing, the part after it is used to routing request parameters (see the example section of \Yaf\Route\Map::__construct()).</p>
 *
 * @link https://secure.php.net/manual/en/class.yaf-route-map.php
 */
final class Map implements \Yaf\Route_Interface
{
    /**
     * @var string
     */
    protected $_ctl_router = '';

    /**
     * @var string
     */
    protected $_delimiter;

    /**
     * @link https://secure.php.net/manual/en/yaf-route-map.construct.php
     *
     * @param bool $controller_prefer Whether the result should considering as controller or action
     * @param string $delimiter
     */
    public function __construct($controller_prefer = false, $delimiter = '') {}

    /**
     * @link https://secure.php.net/manual/en/yaf-route-map.route.php
     *
     * @param \Yaf\Request_Abstract $request
     *
     * @return bool
     */
    public function route(Yaf\Request_Abstract $request) {}

    /**
     * <p><b>\Yaf\Route\Map::assemble()</b> - Assemble a url</p>
     *
     * @link https://secure.php.net/manual/en/yaf-route-map.assemble.php
     *
     * @param array $info
     * @param array $query
     * @return bool
     */
    public function assemble(array $info, array $query = null) {}
}}

namespace Yaf\Exception {
/**
 * @link https://secure.php.net/manual/en/class.yaf-exception-typeerror.php
 */
class TypeError extends \Yaf\Exception {}/**
 * @link https://secure.php.net/manual/en/class.yaf-exception-startuperror.php
 */
class StartupError extends \Yaf\Exception {}/**
 * @link https://secure.php.net/manual/en/class.yaf-exception-routefaild.php
 */
class RouterFailed extends \Yaf\Exception {}/**
 * @link https://secure.php.net/manual/en/class.yaf-exception-dispatchfaild.php
 */
class DispatchFailed extends \Yaf\Exception {}/**
 * @link https://secure.php.net/manual/en/class.yaf-exception-loadfaild.php
 */
class LoadFailed extends \Yaf\Exception {}}

namespace Yaf\Exception\LoadFailed {
/**
 * @link https://secure.php.net/manual/en/class.yaf-exception-loadfaild-module.php
 */
class Module extends \Yaf\Exception\LoadFailed {}/**
 * @link https://secure.php.net/manual/en/class.yaf-exception-loadfaild-controller.php
 */
class Controller extends \Yaf\Exception\LoadFailed {}/**
 * @link https://secure.php.net/manual/en/class.yaf-exception-loadfaild-action.php
 */
class Action extends \Yaf\Exception\LoadFailed {}/**
 * @link https://secure.php.net/manual/en/class.yaf-exception-loadfaild-view.php
 */
class View extends \Yaf\Exception\LoadFailed {}
}
<?php

/**
 * The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.
 * @link https://php.net/manual/en/yaf.constants.php
 */
define('YAF_VERSION', '3.3.3', true);
define('YAF_ENVIRON', 'product', true);
define('YAF_ERR_STARTUP_FAILED', 512, true);
define('YAF_ERR_ROUTE_FAILED', 513, true);
define('YAF_ERR_DISPATCH_FAILED', 514, true);
define('YAF_ERR_NOTFOUND_MODULE', 515, true);
define('YAF_ERR_NOTFOUND_CONTROLLER', 516, true);
define('YAF_ERR_NOTFOUND_ACTION', 517, true);
define('YAF_ERR_NOTFOUND_VIEW', 518, true);
define('YAF_ERR_CALL_FAILED', 519, true);
define('YAF_ERR_AUTOLOAD_FAILED', 520, true);
define('YAF_ERR_TYPE_ERROR', 521, true);
define('YAF_ERR_ACCESS_ERROR', 522);

//================================================

/**
 * Yaf_Application provides a bootstrapping facility for applications which provides reusable resources, common- and module-based bootstrap classes and dependency checking.
 * <br/>
 * <b>Note:</b>
 * <p>
 * Yaf_Application implements the singleton pattern, and Yaf_Application can not be serialized or un-serialized which will cause problem when you try to use PHPUnit to write some test case for Yaf.<br/>
 * You may use &#64;backupGlobals annotation of PHPUnit to control the backup and restore operations for global variables. thus can solve this problem.
 * </p>
 * @link https://secure.php.net/manual/en/class.yaf-application.php
 */
final class Yaf_Application
{
    /**
     * @var Yaf_Application
     */
    protected static $_app;

    /**
     * @var Yaf_Config_Abstract
     */
    protected $config;

    /**
     * @var Yaf_Dispatcher
     */
    protected $dispatcher;

    /**
     * @var array
     */
    protected $_modules;

    /**
     * @var string
     */
    protected $_running = "";

    /**
     * @var string
     */
    protected $_environ = YAF_ENVIRON;

    /**
     * @since 2.1.2
     * @var int
     */
    protected $_err_no = 0;

    /**
     * @since 2.1.2
     * @var string
     */
    protected $_err_msg = "";

    /**
     * @link https://secure.php.net/manual/en/yaf-application.construct.php
     *
     * @param string|array $config A ini config file path, or a config array
     * <p>
     * If is a ini config file, there should be a section named as the one defined by yaf.environ, which is "product" by default.
     * </p>
     * <br/>
     * <b>Note:</b>
     * <p>If you use a ini configuration file as your application's config container. you would open the yaf.cache_config to improve performance.</p>
     * <p>And the config entry(and there default value) list blow:</p>
     *
     * <p>
     *    <b>Example #1 A ini config file example</b><br/>
     *    [product]<br/>
     *    ;this one should always be defined, and have no default value<br/>
     *    application.directory=APPLICATION_PATH<br/><br/>
     * </p>
     * <p>
     *    ;following configs have default value, you may no need to define them
     * <br/>
     *    application.library = APPLICATION_PATH . "/library" <br/>
     *    application.dispatcher.throwException=1 <br/>
     *    application.dispatcher.catchException=1 <br/><br/>
     * </p>
     * <p>application.baseUri=""<br/><br/></p>
     * <p>
     *    ;the php script ext name<br/>
     *    ap.ext=php<br/><br/>
     * </p>
     * <p>
     *    ;the view template ext name<br/>
     *    ap.view.ext=phtml<br/><br/>
     * </p>
     * <p>
     *    ap.dispatcher.defaultModule=Index<br/>
     *    ap.dispatcher.defaultController=Index<br/>
     *    ap.dispatcher.defaultAction=index<br/><br/>
     * </p>
     * <p>
     *    ;defined modules<br/>
     *    ap.modules=Index
     * </p>
     * @param string $environ Which section will be loaded as the final config
     *
     * @throws Yaf_Exception_TypeError|Yaf_Exception_StartupError
     */
    public function __construct($config, $environ = null) {}

    public function getInstance() {}

    /**
     * Run a Yaf_Application, let the Yaf_Application accept a request, and route the request, dispatch to controller/action, and render response.
     * return response to client finally.
     *
     * @link https://secure.php.net/manual/en/yaf-application.run.php
     * @throws Yaf_Exception_StartupError
     */
    public function run() {}

    /**
     * This method is typically used to run Yaf_Application in a crontab work.
     * Make the crontab work can also use the autoloader and Bootstrap mechanism.
     *
     * @link https://secure.php.net/manual/en/yaf-application.execute.php
     *
     * @param callable $entry a valid callback
     * @param string ...$_ parameters will pass to the callback
     */
    public function execute(callable $entry, ...$_) {}

    /**
     * Retrieve the Yaf_Application instance, alternatively, we also could use Yaf_Dispatcher::getApplication().
     *
     * @link https://secure.php.net/manual/en/yaf-application.app.php
     *
     * @return Yaf_Application|null an Yaf_Application instance, if no Yaf_Application initialized before, NULL will be returned.
     */
    public static function app() {}

    /**
     * Retrieve environ which was defined in yaf.environ which has a default value "product".
     *
     * @link https://secure.php.net/manual/en/yaf-application.environ.php
     *
     * @return string
     */
    public function environ() {}

    /**
     * Run a Bootstrap, all the methods defined in the Bootstrap and named with prefix "_init" will be called according to their declaration order, if the parameter bootstrap is not supplied, Yaf will look for a Bootstrap under application.directory.
     *
     * @link https://secure.php.net/manual/en/yaf-application.bootstrap.php
     *
     * @param Yaf_Bootstrap_Abstract $bootstrap A Yaf_Bootstrap_Abstract instance
     * @return Yaf_Application
     */
    public function bootstrap($bootstrap = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-application.getconfig.php
     *
     * @return Yaf_Config_Abstract
     */
    public function getConfig() {}

    /**
     * Get the modules list defined in config, if no one defined, there will always be a module named "Index".
     *
     * @link https://secure.php.net/manual/en/yaf-application.getmodules.php
     *
     * @return array
     */
    public function getModules() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-application.getdispatcher.php
     *
     * @return Yaf_Dispatcher
     */
    public function getDispatcher() {}

    /**
     * Change the application directory
     *
     * @param string $directory
     * @return Yaf_Application
     * @since 2.1.4
     * @link https://secure.php.net/manual/en/yaf-application.setappdirectory.php
     */
    public function setAppDirectory($directory) {}

    /**
     * @return string
     * @link https://secure.php.net/manual/en/yaf-application.getappdirectory.php
     *
     * @since 2.1.4
     */
    public function getAppDirectory() {}

    /**
     * @return int
     * @link https://secure.php.net/manual/en/yaf-application.getlasterrorno.php
     *
     * @since 2.1.2
     */
    public function getLastErrorNo() {}

    /**
     * @return string
     * @link https://secure.php.net/manual/en/yaf-application.getlasterrormsg.php
     *
     * @since 2.1.2
     */
    public function getLastErrorMsg() {}

    /**
     * @since 2.1.2
     * @link https://secure.php.net/manual/en/yaf-application.clearlasterror.php
     */
    public function clearLastError() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-application.destruct.php
     */
    public function __destruct() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-application.clone.php
     */
    private function __clone() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-application.sleep.php
     */
    private function __sleep() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-application.wakeup.php
     */
    private function __wakeup() {}
}

/**
 * <p><b>Yaf_Dispatcher</b> purpose is to initialize the request environment, route the incoming request, and then dispatch any discovered actions; it aggregates any responses and returns them when the process is complete.</p><br/>
 * <p><b>Yaf_Dispatcher</b> also implements the Singleton pattern, meaning only a single instance of it may be available at any given time. This allows it to also act as a registry on which the other objects in the dispatch process may draw.</p>
 *
 * @link https://secure.php.net/manual/en/class.yaf-dispatcher.php
 */
final class Yaf_Dispatcher
{
    /**
     * @var Yaf_Dispatcher
     */
    protected static $_instance;

    /**
     * @var Yaf_Router
     */
    protected $_router;

    /**
     * @var Yaf_View_Interface
     */
    protected $_view;

    /**
     * @var Yaf_Request_Abstract
     */
    protected $_request;

    /**
     * @var Yaf_Plugin_Abstract
     */
    protected $_plugins;

    /**
     * @var bool
     */
    protected $_auto_render = true;

    /**
     * @var string
     */
    protected $_return_response = "";

    /**
     * @var string
     */
    protected $_instantly_flush = "";

    /**
     * @var string
     */
    protected $_default_module;

    /**
     * @var string
     */
    protected $_default_controller;

    /**
     * @var string
     */
    protected $_default_action;

    /**
     * @link https://secure.php.net/manual/en/yaf-dispatcher.construct.php
     */
    private function __construct() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-dispatcher.clone.php
     */
    private function __clone() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-dispatcher.sleep.php
     */
    private function __sleep() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-dispatcher.wakeup.php
     */
    private function __wakeup() {}

    /**
     * enable view rendering
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.enableview.php
     *
     * @return Yaf_Dispatcher
     */
    public function enableView() {}

    public function getResponse() {}

    public function getDefaultModule() {}

    public function getDefaultController() {}

    public function getDefaultAction() {}

    /**
     * <p>disable view engine, used in some app that user will output by himself</p><br/>
     * <b>Note:</b>
     * <p>you can simply return FALSE in a action to prevent the auto-rendering of that action</p>
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.disableview.php
     *
     * @return bool
     */
    public function disableView() {}

    /**
     * Initialize view and return it
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.initview.php
     *
     * @param string $templates_dir
     * @param array|null $options
     * @return Yaf_View_Interface
     */
    public function initView($templates_dir, ?array $options = null) {}

    /**
     * This method provides a solution for that if you want use a custom view engine instead of Yaf_View_Simple
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.setview.php
     *
     * @param Yaf_View_Interface $view A Yaf_View_Interface instance
     * @return Yaf_Dispatcher
     */
    public function setView($view) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-dispatcher.setrequest.php
     *
     * @param Yaf_Request_Abstract $request
     * @return Yaf_Dispatcher
     */
    public function setRequest($request) {}

    /**
     * Retrieve the Yaf_Application instance. same as Yaf_Application::app().
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.getapplication.php
     * @return Yaf_Application
     */
    public function getApplication() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-dispatcher.getrouter.php
     *
     * @return Yaf_Router
     */
    public function getRouter() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-dispatcher.getrequest.php
     *
     * @return Yaf_Request_Abstract
     */
    public function getRequest() {}

    /**
     * <p>Set error handler for Yaf. when application.dispatcher.throwException is off, Yaf will trigger catch-able error while unexpected errors occurred.</p><br/>
     * <p>Thus, this error handler will be called while the error raise.</p>
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.seterrorhandler.php
     *
     * @param callable $callback a callable callback
     * @param int $error_types YAF_ERR_* constants mask
     *
     * @return Yaf_Dispatcher
     */
    public function setErrorHandler($callback, $error_types = YAF_ERR_TYPE_ERROR) {}

    /**
     * Change default module name
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.setdefaultmodule.php
     *
     * @param string $module
     * @return Yaf_Dispatcher
     */
    public function setDefaultModule($module) {}

    /**
     * Change default controller name
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.setdefaultcontroller.php
     *
     * @param string $controller
     * @return Yaf_Dispatcher
     */
    public function setDefaultController($controller) {}

    /**
     * Change default action name
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.setdefaultaction.php
     *
     * @param string $action
     * @return Yaf_Dispatcher
     */
    public function setDefaultAction($action) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-dispatcher.returnresponse.php
     *
     * @param bool $flag
     * @return Yaf_Dispatcher
     */
    public function returnResponse($flag) {}

    /**
     * <p>Yaf_Dispatcher will render automatically after dispatches an incoming request, you can prevent the rendering by calling this method with $flag TRUE</p><br/>
     * <b>Note:</b>
     * <p>you can simply return FALSE in a action to prevent the auto-rendering of that action</p>
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.autorender.php
     *
     * @param bool $flag since 2.2.0, if this parameter is not given, then the current state will be set
     * @return Yaf_Dispatcher
     */
    public function autoRender($flag = null) {}

    /**
     * Switch on/off the instant flushing
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.flushinstantly.php
     *
     * @param bool $flag since 2.2.0, if this parameter is not given, then the current state will be set
     * @return Yaf_Dispatcher
     */
    public function flushInstantly($flag = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-dispatcher.getinstance.php
     *
     * @return Yaf_Dispatcher
     */
    public static function getInstance() {}

    /**
     * <p>This method does the heavy work of the Yaf_Dispatcher. It take a request object.</p><br/>
     * <p>The dispatch process has three distinct events:</p>
     * <ul>
     * <li>Routing</li>
     * <li>Dispatching</li>
     * <li>Response</li>
     * </ul>
     * <p>Routing takes place exactly once, using the values in the request object when dispatch() is called. Dispatching takes place in a loop; a request may either indicate multiple actions to dispatch, or the controller or a plugin may reset the request object to force additional actions to dispatch(see Yaf_Plugin_Abstract. When all is done, the Yaf_Dispatcher returns a response.</p>
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.dispatch.php
     *
     * @param Yaf_Request_Abstract $request
     *
     * @throws Yaf_Exception_TypeError
     * @throws Yaf_Exception_RouterFailed
     * @throws Yaf_Exception_DispatchFailed
     * @throws Yaf_Exception_LoadFailed
     * @throws Yaf_Exception_LoadFailed_Action
     * @throws Yaf_Exception_LoadFailed_Controller
     *
     * @return Yaf_Response_Abstract
     */
    public function dispatch($request) {}

    /**
     * <p>Switch on/off exception throwing while unexpected error occurring. When this is on, Yaf will throwing exceptions instead of triggering catchable errors.</p><br/>
     * <p>You can also use application.dispatcher.throwException to achieve the same purpose.</p>
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.throwexception.php
     *
     * @param bool $flag
     * @return Yaf_Dispatcher
     */
    public function throwException($flag = null) {}

    /**
     * <p>While the application.dispatcher.throwException is On(you can also calling to <b>Yaf_Dispatcher::throwException(TRUE)</b> to enable it), Yaf will throw Exception whe error occurs instead of trigger error.</p><br/>
     * <p>then if you enable <b>Yaf_Dispatcher::catchException()</b>(also can enabled by set application.dispatcher.catchException), all uncaught Exceptions will be caught by ErrorController::error if you have defined one.</p>
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.catchexception.php
     *
     * @param bool $flag
     * @return Yaf_Dispatcher
     */
    public function catchException($flag = null) {}

    /**
     * Register a plugin(see Yaf_Plugin_Abstract). Generally, we register plugins in Bootstrap(see Yaf_Bootstrap_Abstract).
     *
     * @link https://secure.php.net/manual/en/yaf-dispatcher.registerplugin.php
     *
     * @param Yaf_Plugin_Abstract $plugin
     * @return Yaf_Dispatcher
     */
    public function registerPlugin($plugin) {}

    public function setResponse($response) {}
}

/**
 * <p><b>Yaf_Loader</b> introduces a comprehensive autoloading solution for Yaf.</p>
 * <br/>
 * <p>The first time an instance of Yaf_Application is retrieved, <b>Yaf_Loader</b> will instance a singleton, and registers itself with spl_autoload. You retrieve an instance using the Yaf_Loader::getInstance()</p>
 * <br/>
 * <p><b>Yaf_Loader</b> attempt to load a class only one shot, if failed, depend on yaf.use_spl_autoload, if this config is On Yaf_Loader::autoload() will return FALSE, thus give the chance to other autoload function. if it is Off (by default), Yaf_Loader::autoload() will return TRUE, and more important is that a very useful warning will be triggered (very useful to find out why a class could not be loaded).</p>
 * <br/>
 * <b>Note:</b>
 * <p>Please keep yaf.use_spl_autoload Off unless there is some library have their own autoload mechanism and impossible to rewrite it.</p>
 * <br/>
 * <p>If you want <b>Yaf_Loader</b> search some classes(libraries) in the local class directory(which is defined in application.ini, and by default, it is application.directory . "/library"), you should register the class prefix using the Yaf_Loader::registerLocalNameSpace()</p>
 * @link https://secure.php.net/manual/en/class.yaf-loader.php
 */
class Yaf_Loader
{
    /**
     * @var string
     */
    protected $_local_ns;

    /**
     * By default, this value is application.directory . "/library", you can change this either in the application.ini(application.library) or call to Yaf_Loader::setLibraryPath()
     * @var string
     */
    protected $_library;

    /**
     * @var string
     */
    protected $_global_library;

    /**
     * @var Yaf_Loader
     */
    protected static $_instance;

    /**
     * @link https://secure.php.net/manual/en/yaf-loader.construct.php
     */
    private function __construct() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-loader.clone.php
     */
    private function __clone() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-loader.sleep.php
     */
    private function __sleep() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-loader.wakeup.php
     */
    private function __wakeup() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-loader.autoload.php
     *
     * @param string $class_name
     *
     * @return bool
     */
    public function autoload($class_name) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-loader.getinstance.php
     *
     * @param string $local_library_path
     * @param string $global_library_path
     *
     * @return Yaf_Loader
     */
    public static function getInstance($local_library_path = null, $global_library_path = null) {}

    /**
     * <p>Register local class prefix name, Yaf_Loader search classes in two library directories, the one is configured via application.library.directory(in application.ini) which is called local library directory; the other is configured via yaf.library (in php.ini) which is called global library directory, since it can be shared by many applications in the same server.</p>
     * <br/>
     * <p>When an autoloading is triggered, Yaf_Loader will determine which library directory should be searched in by examining the prefix name of the missed classname. If the prefix name is registered as a local namespace then look for it in local library directory, otherwise look for it in global library directory.</p>
     * <br/>
     * <b>Note:</b>
     * <p>If yaf.library is not configured, then the global library directory is assumed to be the local library directory. in that case, all autoloading will look for local library directory. But if you want your Yaf application be strong, then always register your own classes as local classes.</p>
     * @link https://secure.php.net/manual/en/yaf-loader.registerlocalnamespace.php
     *
     * @param string|string[] $namespace a string or a array of class name prefix. all class prefix with these prefix will be loaded in local library path.
     * @param string $path
     *
     * @return bool
     */
    public function registerLocalNamespace($namespace, $path = '') {}

    /**
     * @link https://secure.php.net/manual/en/yaf-loader.getlocalnamespace.php
     *
     * @return string
     */
    public function getLocalNamespace() {}

    public function getNamespaces() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-loader.clearlocalnamespace.php
     */
    public function clearLocalNamespace() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-loader.islocalname.php
     *
     * @param string $class_name
     *
     * @return bool
     */
    public function isLocalName($class_name) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-loader.import.php
     *
     * @param string $file
     *
     * @return bool
     */
    public static function import($file) {}

    /**
     * @param string $library_path
     * @param bool $is_global
     *
     * @return Yaf_Loader
     * @link https://secure.php.net/manual/en/yaf-loader.setlibrarypath.php
     *
     * @since 2.1.4
     */
    public function setLibraryPath($library_path, $is_global = false) {}

    /**
     * @param bool $is_global
     *
     * @return string
     * @since 2.1.4
     * @link https://secure.php.net/manual/en/yaf-loader.getlibrarypath.php
     */
    public function getLibraryPath($is_global = false) {}

    public function registerNamespace($namespace, $path = '') {}

    public function getNamespacePath($class_name) {}
}

/**
 * <p>All methods of <b>Yaf_Registry</b> declared as static, making it universally accessible. This provides the ability to get or set any custom data from anyway in your code as necessary.</p>
 * @link https://secure.php.net/manual/en/class.yaf-registry.php
 */
final class Yaf_Registry
{
    /**
     * @var Yaf_Registry
     */
    protected static $_instance;

    /**
     * @var array
     */
    protected $_entries;

    /**
     * @link https://secure.php.net/manual/en/yaf-registry.construct.php
     */
    private function __construct() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-registry.clone.php
     */
    private function __clone() {}

    /**
     * Retrieve an item from registry
     *
     * @link https://secure.php.net/manual/en/yaf-registry.get.php
     *
     * @param string $name
     *
     * @return mixed
     */
    public static function get($name) {}

    /**
     * Check whether an item exists
     *
     * @link https://secure.php.net/manual/en/yaf-registry.has.php
     *
     * @param string $name
     *
     * @return bool
     */
    public static function has($name) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-registry.set.php
     *
     * @param string $name
     * @param string $value
     *
     * @return bool
     */
    public static function set($name, $value) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-registry.del.php
     *
     * @param string $name
     *
     * @return void|bool
     */
    public static function del($name) {}
}

/**
 * @link https://secure.php.net/manual/en/class.yaf-session.php
 * @version 2.2.9
 */
final class Yaf_Session implements Iterator, ArrayAccess, Countable
{
    /**
     * @var Yaf_Session
     */
    protected static $_instance;

    /**
     * @var array
     */
    protected $_session;

    /**
     * @var bool
     */
    protected $_started = true;

    /**
     * @link https://secure.php.net/manual/en/yaf-session.construct.php
     */
    private function __construct() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-session.clone.php
     */
    private function __clone() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-session.sleep.php
     */
    private function __sleep() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-session.wakeup.php
     */
    private function __wakeup() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-session.getinstance.php
     *
     * @return Yaf_Session
     */
    public static function getInstance() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-session.start.php
     *
     * @return Yaf_Session
     */
    public function start() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-session.get.php
     *
     * @param string $name
     *
     * @return mixed
     */
    public function get($name) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-session.has.php
     *
     * @param string $name
     *
     * @return bool
     */
    public function has($name) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-session.set.php
     *
     * @param string $name
     * @param mixed $value
     *
     * @return Yaf_Session|false return FALSE on failure
     */
    public function set($name, $value) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-session.del.php
     *
     * @param string $name
     *
     * @return Yaf_Session|false return FALSE on failure
     */
    public function del($name) {}

    /**
     * @see Countable::count
     */
    public function count() {}

    /**
     * @see Iterator::rewind
     */
    public function rewind() {}

    /**
     * @see Iterator::current
     */
    public function current() {}

    /**
     * @see Iterator::next
     */
    public function next() {}

    /**
     * @see Iterator::valid
     */
    public function valid() {}

    /**
     * @see Iterator::key
     */
    public function key() {}

    /**
     * @param string $name
     * @see ArrayAccess::offsetUnset
     */
    public function offsetUnset($name) {}

    /**
     * @param string $name
     * @return mixed
     * @see ArrayAccess::offsetGet
     */
    public function offsetGet($name) {}

    /**
     * @see ArrayAccess::offsetExists
     */
    public function offsetExists($name) {}

    /**
     * @param string $name
     * @param string $value
     * @return void
     * @see ArrayAccess::offsetSet
     */
    public function offsetSet($name, $value) {}

    /**
     * @see Yaf_Session::get()
     */
    public function __get($name) {}

    /**
     * @see Yaf_Session::has()
     */
    public function __isset($name) {}

    /**
     * @see Yaf_Session::set()
     */
    public function __set($name, $value) {}

    /**
     * @see Yaf_Session::del()
     */
    public function __unset($name) {}

    public function clear() {}
}

/**
 * <p><b>Yaf_Router</b> is the standard framework router. Routing is the process of taking a URI endpoint (that part of the URI which comes after the base URI: see Yaf_Request_Abstract::setBaseUri()) and decomposing it into parameters to determine which module, controller, and action of that controller should receive the request. This values of the module, controller, action and other parameters are packaged into a Yaf_Request_Abstract object which is then processed by Yaf_Dispatcher. Routing occurs only once: when the request is initially received and before the first controller is dispatched. Yaf_Router is designed to allow for mod_rewrite-like functionality using pure PHP structures. It is very loosely based on Ruby on Rails routing and does not require any prior knowledge of webserver URL rewriting</p>
 * <br/>
 * <b>Default Route</b>
 * <br/>
 * <p><b>Yaf_Router</b> comes pre-configured with a default route Yaf_Route_Static, which will match URIs in the shape of controller/action. Additionally, a module name may be specified as the first path element, allowing URIs of the form module/controller/action. Finally, it will also match any additional parameters appended to the URI by default - controller/action/var1/value1/var2/value2.</p>
 * <br/>
 * <b>Note:</b>
 * <p>Module name must be defined in config, considering application.module="Index,Foo,Bar", in this case, only index, foo and bar can be considered as a module name. if doesn't config, there is only one module named "Index".</p>
 * <br/>
 * <p>** See examples by opening the external documentation</p>
 * @link https://secure.php.net/manual/en/class.yaf-router.php
 */
class Yaf_Router
{
    /**
     * @var Yaf_Route_Interface[] registered routes stack
     */
    protected $_routes;

    /**
     * @var string after routing phase, this indicated the name of which route is used to route current request. you can get this name by Yaf_Router::getCurrentRoute()
     */
    protected $_current;

    /**
     * @link https://secure.php.net/manual/en/yaf-router.construct.php
     */
    public function __construct() {}

    /**
     * <p>by default, Yaf_Router using a Yaf_Route_Static as its default route. you can add new routes into router's route stack by calling this method.</p>
     * <br/>
     * <p>the newer route will be called before the older(route stack), and if the newer router return TRUE, the router process will be end. otherwise, the older one will be called.</p>
     *
     * @link https://secure.php.net/manual/en/yaf-router.addroute.php
     *
     * @param string $name
     * @param Yaf_Route_Interface $route
     *
     * @return Yaf_Router|false return FALSE on failure
     */
    public function addRoute($name, $route) {}

    /**
     * <p>Add routes defined by configs into Yaf_Router's route stack</p>
     *
     * @link https://secure.php.net/manual/en/yaf-router.addconfig.php
     *
     * @param Yaf_Config_Abstract $config
     *
     * @return Yaf_Router|false return FALSE on failure
     */
    public function addConfig($config) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-router.route.php
     *
     * @param Yaf_Request_Abstract $request
     *
     * @return Yaf_Router|false return FALSE on failure
     */
    public function route($request) {}

    /**
     * <p>Retrieve a route by name, see also Yaf_Router::getCurrentRoute()</p>
     *
     * @link https://secure.php.net/manual/en/yaf-router.getroute.php
     *
     * @param string $name
     *
     * @return Yaf_Route_Interface
     */
    public function getRoute($name) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-router.getroutes.php
     *
     * @return Yaf_Route_Interface[]
     */
    public function getRoutes() {}

    /**
     * <p>Get the name of the route which is effective in the route process.</p>
     * <br/>
     * <b>Note:</b>
     * <p>You should call this method after the route process finished, since before that, this method will always return NULL.</p>
     *
     * @link https://secure.php.net/manual/en/yaf-router.getcurrentroute.php
     *
     * @return string the name of the effective route.
     */
    public function getCurrentRoute() {}
}

/**
 * <p>Bootstrap is a mechanism used to do some initial config before a Application run.<br/><br/></p>
 * <p>User may define their own Bootstrap class by inheriting <b>Yaf_Bootstrap_Abstract</b><br/><br/></p>
 * <p>Any method declared in Bootstrap class with leading "_init", will be called by Yaf_Application::bootstrap() one by one according to their defined order<br/><br/></p>
 *
 * @link https://secure.php.net/manual/en/class.yaf-bootstrap-abstract.php
 */
abstract class Yaf_Bootstrap_Abstract {}

/**
 * <p><b>Yaf_Controller_Abstract</b> is the heart of Yaf's system. MVC stands for Model-View-Controller and is a design pattern targeted at separating application logic from display logic.</p>
 * <br/>
 * <p>Every custom controller shall inherit <b>Yaf_Controller_Abstract</b>.</p>
 * <br/>
 * <p>You will find that you can not define __construct function for your custom controller, thus, <b>Yaf_Controller_Abstract</b> provides a magic method: Yaf_Controller_Abstract::init().</p>
 * <br/>
 * <p>If you have defined a init() method in your custom controller, it will be called as long as the controller was instantiated.</p>
 * <br/>
 * <p>Action may have arguments, when a request coming, if there are the same name variable in the request parameters(see Yaf_Request_Abstract::getParam()) after routed, Yaf will pass them to the action method (see Yaf_Action_Abstract::execute()).</p>
 * <br/>
 * <b>Note:</b>
 * <p>These arguments are directly fetched without filtering, it should be carefully processed before use them.</p>
 *
 * @link https://secure.php.net/manual/en/class.yaf-controller-abstract.php
 */
abstract class Yaf_Controller_Abstract
{
    /**
     * @see Yaf_Action_Abstract
     * @var array You can also define a action method in a separate PHP script by using this property and Yaf_Action_Abstract.
     */
    public $actions;

    /**
     * @var string module name
     */
    protected $_module;

    /**
     * @var string controller name
     */
    protected $_name;

    /**
     * @var Yaf_Request_Abstract current request object
     */
    protected $_request;

    /**
     * @var Yaf_Response_Abstract current response object
     */
    protected $_response;

    /**
     * @var array
     */
    protected $_invoke_args;

    /**
     * @var Yaf_View_Interface view engine object
     */
    protected $_view;

    /**
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.render.php
     *
     * @param string $tpl
     * @param array|null $parameters
     *
     * @return string
     */
    protected function render($tpl, ?array $parameters = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.display.php
     *
     * @param string $tpl
     * @param array|null $parameters
     *
     * @return bool
     */
    protected function display($tpl, ?array $parameters = null) {}

    /**
     * retrieve current request object
     *
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.getrequest.php
     *
     * @return Yaf_Request_Abstract
     */
    public function getRequest() {}

    /**
     * retrieve current response object
     *
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.getresponse.php
     *
     * @return Yaf_Response_Abstract
     */
    public function getResponse() {}

    /**
     * get the controller's module name
     *
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.getmodulename.php
     *
     * @return string
     */
    public function getModuleName() {}

    /**
     * retrieve view engine
     *
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.getview.php
     *
     * @return Yaf_View_Interface
     */
    public function getView() {}

    public function getName() {}

    /**
     * @param array|null $options
     *
     * @return Yaf_Response_Abstract
     * @deprecated not_implemented
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.initview.php
     */
    public function initView(?array $options = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.setviewpath.php
     *
     * @param string $view_directory
     *
     * @return bool
     */
    public function setViewpath($view_directory) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.getviewpath.php
     *
     * @return string
     */
    public function getViewpath() {}

    /**
     * <p>forward current execution process to other action.</p>
     * <br/>
     * <b>Note:</b>
     * <p>this method doesn't switch to the destination action immediately, it will take place after current flow finish.</p>
     * <br/>
     * <b>Notice, there are 3 available method signatures:</b>
     * <p>Yaf_Controller_Abstract::forward ( string $module , string $controller , string $action [, array $parameters ] )</p>
     * <p>Yaf_Controller_Abstract::forward ( string $controller , string $action [, array $parameters ] )</p>
     * <p>Yaf_Controller_Abstract::forward ( string $action [, array $parameters ] )</p>
     *
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.forward.php
     *
     * @param string $module destination module name, if NULL was given, then default module name is assumed
     * @param string $controller destination controller name
     * @param string $action destination action name
     * @param array|null $parameters calling arguments
     *
     * @return bool return FALSE on failure
     */
    public function forward($module, $controller = null, $action = null, ?array $parameters = null) {}

    /**
     * redirect to a URL by sending a 302 header
     *
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.redirect.php
     *
     * @param string $url a location URL
     *
     * @return bool
     */
    public function redirect($url) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.getinvokeargs.php
     *
     * @return array
     */
    public function getInvokeArgs() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.getinvokearg.php
     * @param string $name
     *
     * @return mixed|null
     */
    public function getInvokeArg($name) {}

    /**
     * <p>Yaf_Controller_Abstract::__construct() is final, which means users can not override it. but users can define <b>Yaf_Controller_Abstract::init()</b>, which will be called after controller object is instantiated.</p>
     *
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.init.php
     */
    public function init() {}

    /**
     * <b>Yaf_Controller_Abstract</b>::__construct() is final, which means it can not be overridden. You may want to see Yaf_Controller_Abstract::init() instead.
     *
     * @param Yaf_Request_Abstract $request
     * @param Yaf_Response_Abstract $response
     * @param Yaf_View_Interface $view
     * @param array|null $args
     * @see Yaf_Controller_Abstract::init()
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.construct.php
     */
    public function __construct($request, $response, $view, ?array $args = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-controller-abstract.clone.php
     */
    private function __clone() {}
}

/**
 * <p>A action can be defined in a separate file in Yaf(see Yaf_Controller_Abstract). that is a action method can also be a <b>Yaf_Action_Abstract</b> class.</P>
 * <br/>
 * <p>Since there should be a entry point which can be called by Yaf (as of PHP 5.3, there is a new magic method __invoke, but Yaf is not only works with PHP 5.3+, Yaf choose another magic method execute), you must implement the abstract method Yaf_Action_Abstract::execute() in your custom action class.</p>
 *
 * @link https://secure.php.net/manual/en/class.yaf-action-abstract.php
 */
abstract class Yaf_Action_Abstract extends Yaf_Controller_Abstract
{
    /**
     * @var Yaf_Controller_Abstract
     */
    protected $_controller;

    /**
     * <p>user should always define this method for a action, this is the entry point of an action. <b>Yaf_Action_Abstract::execute()</b> may have arguments.</p>
     * <br/>
     * <b>Note:</b>
     * <p>The value retrieved from the request is not safe. you should do some filtering work before you use it.</p>
     * @link https://secure.php.net/manual/en/yaf-action-abstract.execute.php
     *
     * @param mixed ... unlimited number of arguments
     * @return mixed
     */
    abstract public function execute();

    /**
     * retrieve current controller object.
     *
     * @link https://secure.php.net/manual/en/yaf-action-abstract.getcontroller.php
     *
     * @return Yaf_Controller_Abstract
     */
    public function getController() {}

    public function getControllerName() {}
}

/**
 * @link https://secure.php.net/manual/en/class.yaf-config-abstract.php
 */
abstract class Yaf_Config_Abstract implements Iterator, ArrayAccess, Countable
{
    /**
     * @var array
     */
    protected $_config = null;

    /**
     * @var bool
     */
    protected $_readonly = true;

    /**
     * @link https://secure.php.net/manual/en/yaf-config-abstract.get.php
     *
     * @param string $name
     * @return mixed
     */
    abstract public function get($name = null);

    /**
     * @link https://secure.php.net/manual/en/yaf-config-abstract.set.php
     *
     * @param string $name
     * @param mixed $value
     * @return Yaf_Config_Abstract
     */
    abstract public function set($name, $value);

    public function count() {}

    public function rewind() {}

    public function current() {}

    public function key() {}

    public function next() {}

    public function valid() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-config-abstract.readonly.php
     *
     * @return bool
     */
    abstract public function readonly();

    /**
     * @link https://secure.php.net/manual/en/yaf-config-abstract.toarray.php
     *
     * @return array
     */
    abstract public function toArray();

    public function offsetSet($name, $value) {}

    public function offsetUnset($name) {}

    public function offsetExists($name) {}

    public function offsetGet($name = '') {}

    public function __get($name = '') {}

    public function __isset($name) {}
}

/**
 * @link https://secure.php.net/manual/en/class.yaf-request-abstract.php
 */
abstract class Yaf_Request_Abstract
{
    public const SCHEME_HTTP = 'http';
    public const SCHEME_HTTPS = 'https';

    /**
     * @var string
     */
    public $module;

    /**
     * @var string
     */
    public $controller;

    /**
     * @var string
     */
    public $action;

    /**
     * @var string
     */
    public $method;

    /**
     * @var array
     */
    protected $params;

    /**
     * @var string
     */
    protected $language;

    /**
     * @var Yaf_Exception
     */
    protected $_exception;

    /**
     * @var string
     */
    protected $_base_uri = "";

    /**
     * @var string
     */
    protected $uri = "";

    /**
     * @var string
     */
    protected $dispatched = "";

    /**
     * @var string
     */
    protected $routed = "";

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.isget.php
     *
     * @return bool
     */
    public function isGet() {}

    public function isDelete() {}

    public function isPatch() {}

    public function getRaw() {}

    public function clearParams() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.ispost.php
     *
     * @return bool
     */
    public function isPost() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.isput.php
     *
     * @return bool
     */
    public function isPut() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.ishead.php
     *
     * @return bool
     */
    public function isHead() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.isoptions.php
     *
     * @return bool
     */
    public function isOptions() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.iscli.php
     *
     * @return bool
     */
    public function isCli() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.isdispached.php
     *
     * @return bool
     */
    final public function isDispatched() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.isrouted.php
     *
     * @return bool
     */
    final public function isRouted() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.isxmlhttprequest.php
     *
     * @return bool
     */
    public function isXmlHttpRequest() {}

    /**
     * Retrieve $_SERVER variable
     *
     * @link https://secure.php.net/manual/en/yaf-request-abstract.getserver.php
     *
     * @param string $name the variable name, if not provided returns all
     * @param string $default if this parameter is provide, this will be returned if the variable can not be found
     *
     * @return mixed
     */
    public function getServer($name = null, $default = null) {}

    /**
     * Retrieve $_ENV variable
     *
     * @link https://secure.php.net/manual/en/yaf-request-abstract.getenv.php
     *
     * @param string $name the variable name, if not provided returns all
     * @param string $default if this parameter is provide, this will be returned if the variable can not be found
     *
     * @return mixed
     */
    public function getEnv($name = null, $default = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.getparam.php
     *
     * @param string $name
     * @param string $default
     *
     * @return mixed
     */
    public function getParam($name = '', $default = '') {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.getparams.php
     *
     * @return array
     */
    public function getParams() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.getexception.php
     *
     * @return Yaf_Exception
     */
    public function getException() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.getmoudlename.php
     *
     * @return string
     */
    public function getModuleName() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.getcontrollername.php
     *
     * @return string
     */
    public function getControllerName() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.getactionname.php
     *
     * @return string
     */
    public function getActionName() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.setparam.php
     *
     * @param string|array $name the variable name, or an array of key=>value pairs
     * @param string $value
     *
     * @return Yaf_Request_Abstract|bool
     */
    public function setParam($name, $value = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.setmodulename.php
     *
     * @param string $module
     * @param bool $format_name
     *
     * @return Yaf_Request_Abstract|bool
     */
    public function setModuleName($module, $format_name = true) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.setcontrollername.php
     *
     * @param string $controller
     * @param bool $format_name
     *
     * @return Yaf_Request_Abstract|bool
     */
    public function setControllerName($controller, $format_name = true) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.setactionname.php
     *
     * @param string $action
     * @param bool $format_name
     *
     * @return Yaf_Request_Abstract|bool
     */
    public function setActionName($action, $format_name = true) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.getmethod.php
     *
     * @return string
     */
    public function getMethod() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.getlanguage.php
     *
     * @return string
     */
    public function getLanguage() {}

    /**
     * <p>Set base URI, base URI is used when doing routing, in routing phase request URI is used to route a request, while base URI is used to skip the leading part(base URI) of request URI. That is, if comes a request with request URI a/b/c, then if you set base URI to "a/b", only "/c" will be used in routing phase.</p>
     * <br/>
     * <b>Note:</b>
     * <p>generally, you don't need to set this, Yaf will determine it automatically.</p>
     *
     * @link https://secure.php.net/manual/en/yaf-request-abstract.setbaseuri.php
     *
     * @param string $uri base URI
     *
     * @return bool
     */
    public function setBaseUri($uri) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.getbaseuri.php
     *
     * @return string
     */
    public function getBaseUri() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-abstract.getrequesturi.php
     *
     * @return string
     */
    public function getRequestUri() {}

    /**
     * @param string $uri request URI
     * @link https://secure.php.net/manual/en/yaf-request-abstract.setrequesturi.php
     *
     * @since 2.1.0
     */
    public function setRequestUri($uri) {}

    /**
     * Set request as dispatched
     *
     * @link https://secure.php.net/manual/en/yaf-request-abstract.setdispatched.php
     *
     * @return bool
     */
    final public function setDispatched($dispatched = null) {}

    /**
     * Set request as routed
     *
     * @link https://secure.php.net/manual/en/yaf-request-abstract.setrouted.php
     *
     * @return Yaf_Request_Abstract|bool
     */
    final public function setRouted($flag = null) {}

    public function get($name = null, $default = null) {}

    public function getFiles($name = null, $default = null) {}

    public function getCookie($name = null, $default = null) {}

    public function getPost($name = null, $default = null) {}

    public function getRequest($name = null, $default = null) {}

    public function getQuery($name = null, $default = null) {}
}

/**
 * <p>Plugins allow for easy extensibility and customization of the framework.</p>
 * <br/>
 * <p>Plugins are classes. The actual class definition will vary based on the component -- you may need to implement this interface, but the fact remains that the plugin is itself a class.</p>
 * <br/>
 * <p>A plugin could be loaded into Yaf by using Yaf_Dispatcher::registerPlugin(), after registered, All the methods which the plugin implemented according to this interface, will be called at the proper time.</p>
 * @link https://secure.php.net/manual/en/class.yaf-plugin-abstract.php
 */
abstract class Yaf_Plugin_Abstract
{
    /**
     * This is the earliest hook in Yaf plugin hook system, if a custom plugin implement this method, then it will be called before routing a request.
     *
     * @link https://secure.php.net/manual/en/yaf-plugin-abstract.routerstartup.php
     *
     * @param Yaf_Request_Abstract $request
     * @param Yaf_Response_Abstract $response
     *
     * @return bool true
     */
    public function routerStartup(Yaf_Request_Abstract $request, Yaf_Response_Abstract $response) {}

    /**
     * This hook will be trigged after the route process finished, this hook is usually used for login check.
     *
     * @link https://secure.php.net/manual/en/yaf-plugin-abstract.routershutdown.php
     *
     * @param Yaf_Request_Abstract $request
     * @param Yaf_Response_Abstract $response
     *
     * @return bool true
     */
    public function routerShutdown(Yaf_Request_Abstract $request, Yaf_Response_Abstract $response) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-plugin-abstract.dispatchloopstartup.php
     *
     * @param Yaf_Request_Abstract $request
     * @param Yaf_Response_Abstract $response
     *
     * @return bool true
     */
    public function dispatchLoopStartup(Yaf_Request_Abstract $request, Yaf_Response_Abstract $response) {}

    /**
     * This is the latest hook in Yaf plugin hook system, if a custom plugin implement this method, then it will be called after the dispatch loop finished.
     *
     * @link https://secure.php.net/manual/en/yaf-plugin-abstract.dispatchloopshutdown.php
     *
     * @param Yaf_Request_Abstract $request
     * @param Yaf_Response_Abstract $response
     *
     * @return bool true
     */
    public function dispatchLoopShutdown(Yaf_Request_Abstract $request, Yaf_Response_Abstract $response) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-plugin-abstract.predispatch.php
     *
     * @param Yaf_Request_Abstract $request
     * @param Yaf_Response_Abstract $response
     *
     * @return bool true
     */
    public function preDispatch(Yaf_Request_Abstract $request, Yaf_Response_Abstract $response) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-plugin-abstract.postdispatch.php
     *
     * @param Yaf_Request_Abstract $request
     * @param Yaf_Response_Abstract $response
     *
     * @return bool true
     */
    public function postDispatch(Yaf_Request_Abstract $request, Yaf_Response_Abstract $response) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-plugin-abstract.preresponse.php
     *
     * @param Yaf_Request_Abstract $request
     * @param Yaf_Response_Abstract $response
     *
     * @return bool true
     */
    public function preResponse(Yaf_Request_Abstract $request, Yaf_Response_Abstract $response) {}
}

/**
 * @link https://secure.php.net/manual/en/class.yaf-response-abstract.php
 */
abstract class Yaf_Response_Abstract
{
    public const DEFAULT_BODY = "content";

    /**
     * @var string
     */
    protected $_header;

    /**
     * @var string
     */
    protected $_body;

    /**
     * @var bool
     */
    protected $_sendheader;

    /**
     * @link https://secure.php.net/manual/en/yaf-response-abstract.construct.php
     */
    public function __construct() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-response-abstract.destruct.php
     */
    public function __destruct() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-response-abstract.clone.php
     */
    private function __clone() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-response-abstract.tostring.php
     */
    public function __toString() {}

    /**
     * Send response
     * @link https://secure.php.net/manual/en/yaf-response-abstract.response.php
     *
     * @return void
     */
    public function response() {}

    /**
     * Set response header
     * @link https://secure.php.net/manual/en/yaf-response-abstract.setheader.php
     *
     * @param string $name header name
     * @param string $value header value
     * @param bool $rep
     *
     * @return bool
     */
    public function setHeader($name, $value, $rep = false) {}

    /**
     * Set content to response
     *
     * @link https://secure.php.net/manual/en/yaf-response-abstract.setbody.php
     *
     * @param string $body content string
     * @param string $name <p>the content key, you can set a content with a key, if you don't specific, then Yaf_Response_Abstract::DEFAULT_BODY will be used</p>
     * <br/>
     * <b>Note:</b>
     * <p>this parameter is introduced as of 2.2.0</p>
     *
     * @return bool
     */
    public function setBody($body, $name = self::DEFAULT_BODY) {}

    /**
     * append a content to a exists content block
     *
     * @link https://secure.php.net/manual/en/yaf-response-abstract.appendbody.php
     *
     * @param string $body content string
     * @param string $name <p>the content key, you can set a content with a key, if you don't specific, then Yaf_Response_Abstract::DEFAULT_BODY will be used</p>
     * <br/>
     * <b>Note:</b>
     * <p>this parameter is introduced as of 2.2.0</p>
     *
     * @return bool
     */
    public function appendBody($body, $name = self::DEFAULT_BODY) {}

    /**
     * prepend a content to a exists content block
     *
     * @link https://secure.php.net/manual/en/yaf-response-abstract.prependbody.php
     *
     * @param string $body content string
     * @param string $name <p>the content key, you can set a content with a key, if you don't specific, then Yaf_Response_Abstract::DEFAULT_BODY will be used</p>
     * <br/>
     * <b>Note:</b>
     * <p>this parameter is introduced as of 2.2.0</p>
     *
     * @return bool
     */
    public function prependBody($body, $name = self::DEFAULT_BODY) {}

    /**
     * Clear existing content
     *
     * @link https://secure.php.net/manual/en/yaf-response-abstract.clearbody.php
     *
     * @param string $name <p>the content key, you can set a content with a key, if you don't specific, then Yaf_Response_Abstract::DEFAULT_BODY will be used</p>
     * <br/>
     * <b>Note:</b>
     * <p>this parameter is introduced as of 2.2.0</p>
     *
     * @return bool
     */
    public function clearBody($name = self::DEFAULT_BODY) {}

    /**
     * Retrieve an existing content
     *
     * @link https://secure.php.net/manual/en/yaf-response-abstract.getbody.php
     *
     * @param string|null $name <p>the content key, if you don't specific, then Yaf_Response_Abstract::DEFAULT_BODY will be used. if you pass in a NULL, then all contents will be returned as a array</p>
     * <br/>
     * <b>Note:</b>
     * <p>this parameter is introduced as of 2.2.0</p>
     *
     * @return mixed
     */
    public function getBody($name = self::DEFAULT_BODY) {}
}

/**
 * Yaf provides a ability for developers to use custom view engine instead of build-in engine which is Yaf_View_Simple. There is a example to explain how to do this, please see Yaf_Dispatcher::setView()
 *
 * @link https://secure.php.net/manual/en/class.yaf-view-interface.php
 */
interface Yaf_View_Interface
{
    /**
     * Assign values to View engine, then the value can access directly by name in template.
     *
     * @link https://secure.php.net/manual/en/yaf-view-interface.assign.php
     *
     * @param string|array $name
     * @param string $value
     * @return bool
     */
    public function assign($name, $value = '');

    /**
     * Render a template and output the result immediately.
     *
     * @link https://secure.php.net/manual/en/yaf-view-interface.display.php
     *
     * @param string $tpl
     * @param array $tpl_vars
     * @return bool
     */
    public function display($tpl, $tpl_vars = null);

    /**
     * @link https://secure.php.net/manual/en/yaf-view-interface.getscriptpath.php
     *
     * @return string
     */
    public function getScriptPath($request = null);

    /**
     * Render a template and return the result.
     *
     * @link https://secure.php.net/manual/en/yaf-view-interface.render.php
     *
     * @param string $tpl
     * @param array $tpl_vars
     * @return string
     */
    public function render($tpl, $tpl_vars = null);

    /**
     * Set the templates base directory, this is usually called by Yaf_Dispatcher
     *
     * @link https://secure.php.net/manual/en/yaf-view-interface.setscriptpath.php
     *
     * @param string $template_dir An absolute path to the template directory, by default, Yaf_Dispatcher use application.directory . "/views" as this parameter.
     */
    public function setScriptPath($template_dir);
}

/**
 * <b>Yaf_Route_Interface</b> used for developer defined their custom route.
 *
 * @link https://secure.php.net/manual/en/class.yaf-route-interface.php
 */
interface Yaf_Route_Interface
{
    /**
     * <p><b>Yaf_Route_Interface::route()</b> is the only method that a custom route should implement.</p><br/>
     * <p>if this method return TRUE, then the route process will be end. otherwise, Yaf_Router will call next route in the route stack to route request.</p><br/>
     * <p>This method would set the route result to the parameter request, by calling Yaf_Request_Abstract::setControllerName(), Yaf_Request_Abstract::setActionName() and Yaf_Request_Abstract::setModuleName().</p><br/>
     * <p>This method should also call Yaf_Request_Abstract::setRouted() to make the request routed at last.</p>
     *
     * @link https://secure.php.net/manual/en/yaf-route-interface.route.php
     *
     * @param Yaf_Request_Abstract $request
     * @return bool
     */
    public function route($request);

    /**
     * <p><b>Yaf_Route_Interface::assemble()</b> - assemble a request</p><br/>
     * <p>this method returns a url according to the argument info, and append query strings to the url according to the argument query.</p>
     * <p>a route should implement this method according to its own route rules, and do a reverse progress.</p>
     *
     * @link https://secure.php.net/manual/en/yaf-route-interface.assemble.php
     *
     * @param array $info
     * @param array|null $query
     * @return bool
     */
    public function assemble(array $info, ?array $query = null);
}

/**
 * @link https://secure.php.net/manual/en/class.yaf-exception.php
 */
class Yaf_Exception extends Exception
{
    protected $message;
    protected $code;
    protected $previous;
}

class Yaf_Response_Http extends Yaf_Response_Abstract
{
    /**
     * @var int
     */
    protected $_response_code = 0;

    private function __clone() {}

    /**
     * @return string
     */
    public function __toString() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-response-abstract.setheader.php
     *
     * @param string $name
     * @param string $value
     * @param bool $rep
     * @param int $response_code
     *
     * @return bool
     */
    public function setHeader($name, $value, $rep = false, $response_code = 0) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-response-abstract.setallheaders.php
     *
     * @param array $headers
     *
     * @return bool
     */
    public function setAllHeaders($headers) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-response-abstract.getheader.php
     *
     * @param string $name
     *
     * @return mixed
     */
    public function getHeader($name = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-response-abstract.clearheaders.php
     *
     *
     * @return Yaf_Response_Abstract|false
     */
    public function clearHeaders() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-response-abstract.setredirect.php
     *
     * @param string $url
     *
     * @return bool
     */
    public function setRedirect($url) {}

    /**
     * send response
     *
     * @link https://secure.php.net/manual/en/yaf-response-abstract.response.php
     *
     * @return bool
     */
    public function response() {}
}

class Yaf_Response_Cli extends Yaf_Response_Abstract
{
    private function __clone() {}

    /**
     * @return string
     */
    public function __toString() {}
}

/**
 * @link https://secure.php.net/manual/en/class.yaf-request-http.php
 */
class Yaf_Request_Http extends Yaf_Request_Abstract
{
    /**
     * Retrieve $_GET variable
     *
     * @link https://secure.php.net/manual/en/yaf-request-http.getquery.php
     *
     * @param string $name the variable name, if not provided returns all
     * @param mixed $default if this parameter is provide, this will be returned if the variable can not be found
     *
     * @return mixed
     */
    public function getQuery($name = null, $default = null) {}

    /**
     * Retrieve $_REQUEST variable
     *
     * @link https://secure.php.net/manual/en/yaf-request-http.getrequest.php
     *
     * @param string $name the variable name, if not provided returns all
     * @param mixed $default if this parameter is provide, this will be returned if the variable can not be found
     *
     * @return mixed
     */
    public function getRequest($name = null, $default = null) {}

    /**
     * Retrieve $_POST variable
     *
     * @link https://secure.php.net/manual/en/yaf-request-http.getpost.php
     *
     * @param string $name the variable name, if not provided returns all
     * @param mixed $default if this parameter is provide, this will be returned if the variable can not be found
     *
     * @return mixed
     */
    public function getPost($name = null, $default = null) {}

    /**
     * Retrieve $_COOKIE variable
     *
     * @link https://secure.php.net/manual/en/yaf-request-http.getcookie.php
     *
     * @param string $name the variable name, if not provided returns all
     * @param mixed $default if this parameter is provide, this will be returned if the variable can not be found
     *
     * @return mixed
     */
    public function getCookie($name = null, $default = null) {}

    /**
     * Retrieve $_FILES variable
     *
     * @link https://secure.php.net/manual/en/yaf-request-http.getfiles.php
     *
     * @param string $name the variable name, if not provided returns all
     * @param mixed $default if this parameter is provide, this will be returned if the variable can not be found
     *
     * @return mixed
     */
    public function getFiles($name = null, $default = null) {}

    /**
     * Retrieve variable from client, this method will search the name in $_REQUEST params, if the name is not found, then will search in $_POST, $_GET, $_COOKIE, $_SERVER
     *
     * @link https://secure.php.net/manual/en/yaf-request-http.get.php
     *
     * @param string $name the variable name
     * @param string $default if this parameter is provide, this will be returned if the variable can not be found
     *
     * @return mixed
     */
    public function get($name, $default = null) {}

    /**
     * Check the request whether it is a Ajax Request
     *
     * <br/>
     * <b>Note:</b>
     * <p>
     * This method depends on the request header: HTTP_X_REQUESTED_WITH, some Javascript library doesn't set this header while doing Ajax request
     * </p>
     * @link https://secure.php.net/manual/en/yaf-request-http.isxmlhttprequest.php
     *
     * @return bool
     */
    public function isXmlHttpRequest() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-http.construct.php
     *
     * @param string $request_uri
     * @param string $base_uri
     */
    public function __construct($request_uri = '', $base_uri = '') {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-http.clone.php
     */
    private function __clone() {}
}

/**
 * <b>Yaf_Request_Simple</b> is particularly used for test purpose. ie. simulate a spacial request under CLI mode.
 * @link https://secure.php.net/manual/en/class.yaf-request-simple.php
 */
class Yaf_Request_Simple extends Yaf_Request_Abstract
{
    /**
     * Retrieve $_GET variable
     *
     * @link https://secure.php.net/manual/en/yaf-request-simple.getquery.php
     *
     * @param string $name the variable name, if not provided returns all
     * @param string $default if this parameter is provide, this will be returned if the variable can not be found
     *
     * @return mixed
     */
    public function getQuery($name = null, $default = null) {}

    /**
     * Retrieve $_REQUEST variable
     *
     * @link https://secure.php.net/manual/en/yaf-request-simple.getrequest.php
     *
     * @param string $name the variable name, if not provided returns all
     * @param string $default if this parameter is provide, this will be returned if the variable can not be found
     *
     * @return mixed
     */
    public function getRequest($name = null, $default = null) {}

    /**
     * Retrieve $_POST variable
     *
     * @link https://secure.php.net/manual/en/yaf-request-simple.getpost.php
     *
     * @param string $name the variable name, if not provided returns all
     * @param string $default if this parameter is provide, this will be returned if the variable can not be found
     *
     * @return mixed
     */
    public function getPost($name = null, $default = null) {}

    /**
     * Retrieve $_Cookie variable
     *
     * @link https://secure.php.net/manual/en/yaf-request-simple.getcookie.php
     *
     * @param string $name the variable name, if not provided returns all
     * @param string $default if this parameter is provide, this will be returned if the variable can not be found
     *
     * @return mixed
     */
    public function getCookie($name = null, $default = null) {}

    /**
     * @param mixed $name
     * @param null $default
     *
     * @return array
     */
    public function getFiles($name = null, $default = null) {}

    /**
     * Retrieve variable from client, this method will search the name in $_REQUEST params, if the name is not found, then will search in $_POST, $_GET, $_COOKIE, $_SERVER
     *
     * @link https://secure.php.net/manual/en/yaf-request-simple.get.php
     *
     * @param string $name the variable name
     * @param string $default if this parameter is provide, this will be returned if the variable can not be found
     *
     * @return mixed
     */
    public function get($name, $default = null) {}

    /**
     * Check the request whether it is a Ajax Request
     *
     * <br/>
     * <b>Note:</b>
     * <p>
     * This method depends on the request header: HTTP_X_REQUESTED_WITH, some Javascript library doesn't set this header while doing Ajax request
     * </p>
     * @link https://secure.php.net/manual/en/yaf-request-simple.isxmlhttprequest.php
     *
     * @return bool
     */
    public function isXmlHttpRequest() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-simple.construct.php
     *
     * @param string $method
     * @param string $module
     * @param string $controller
     * @param string $action
     * @param array $params
     *
     * @throws Yaf_Exception_TypeError
     */
    public function __construct($method = '', $module = '', $controller = '', $action = '', $params = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-request-simple.clone.php
     */
    private function __clone() {}
}

/**
 * <p>Yaf_Config_Ini enables developers to store configuration data in a familiar INI format and read them in the application by using nested object property syntax. The INI format is specialized to provide both the ability to have a hierarchy of configuration data keys and inheritance between configuration data sections. Configuration data hierarchies are supported by separating the keys with the dot or period character ("."). A section may extend or inherit from another section by following the section name with a colon character (":") and the name of the section from which data are to be inherited.</p><br/>
 * <b>Note:</b>
 * <p>Yaf_Config_Ini utilizes the » parse_ini_file() PHP function. Please review this documentation to be aware of its specific behaviors, which propagate to Yaf_Config_Ini, such as how the special values of "TRUE", "FALSE", "yes", "no", and "NULL" are handled.</p>
 * @link https://secure.php.net/manual/en/class.yaf-config-ini.php
 */
class Yaf_Config_Ini extends Yaf_Config_Abstract implements Iterator, ArrayAccess, Countable
{
    /**
     * @see Yaf_Config_Abstract::get
     */
    public function __get($name = null) {}

    /**
     * @see Yaf_Config_Abstract::set
     */
    public function __set($name, $value) {}

    /**
     * @see Yaf_Config_Abstract::get
     */
    public function get($name = null) {}

    /**
     * @see Yaf_Config_Abstract::set
     * @deprecated not_implemented
     */
    public function set($name, $value) {}

    /**
     * @see Yaf_Config_Abstract::toArray
     */
    public function toArray() {}

    /**
     * @see Yaf_Config_Abstract::readonly
     */
    public function readonly() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-config-ini.construct.php
     *
     * @param string $config_file path to an INI configure file
     * @param string $section which section in that INI file you want to be parsed
     *
     * @throws Yaf_Exception_TypeError
     */
    public function __construct($config_file, $section = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-config-ini.isset.php
     * @param string $name
     */
    public function __isset($name) {}

    /**
     * @see Countable::count
     */
    public function count() {}

    /**
     * @see Iterator::rewind
     */
    public function rewind() {}

    /**
     * @see Iterator::current
     */
    public function current() {}

    /**
     * @see Iterator::next
     */
    public function next() {}

    /**
     * @see Iterator::valid
     */
    public function valid() {}

    /**
     * @see Iterator::key
     */
    public function key() {}

    /**
     * @see ArrayAccess::offsetUnset
     * @deprecated not_implemented
     */
    public function offsetUnset($name) {}

    /**
     * @see ArrayAccess::offsetGet
     */
    public function offsetGet($name = '') {}

    /**
     * @see ArrayAccess::offsetExists
     */
    public function offsetExists($name) {}

    /**
     * @see ArrayAccess::offsetSet
     */
    public function offsetSet($name, $value) {}
}

/**
 * @link https://secure.php.net/manual/en/class.yaf-config-simple.php
 */
class Yaf_Config_Simple extends Yaf_Config_Abstract implements Iterator, ArrayAccess, Countable
{
    /**
     * @see Yaf_Config_Abstract::get
     */
    public function __get($name = null) {}

    /**
     * @see Yaf_Config_Abstract::set
     */
    public function __set($name, $value) {}

    /**
     * @see Yaf_Config_Abstract::get
     */
    public function get($name = null) {}

    /**
     * @see Yaf_Config_Abstract::set
     */
    public function set($name, $value) {}

    /**
     * @see Yaf_Config_Abstract::toArray
     */
    public function toArray() {}

    /**
     * @see Yaf_Config_Abstract::readonly
     */
    public function readonly() {}

    /**
     * @link https://secure.php.net/manual/en/yaf-config-simple.construct.php
     *
     * @param array $config
     * @param bool $readonly
     */
    public function __construct($config, $readonly = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-config-simple.isset.php
     * @param string $name
     */
    public function __isset($name) {}

    /**
     * @see Countable::count
     */
    public function count() {}

    /**
     * @see Iterator::rewind
     */
    public function rewind() {}

    /**
     * @see Iterator::current
     */
    public function current() {}

    /**
     * @see Iterator::next
     */
    public function next() {}

    /**
     * @see Iterator::valid
     */
    public function valid() {}

    /**
     * @see Iterator::key
     */
    public function key() {}

    /**
     * @see ArrayAccess::offsetUnset
     */
    public function offsetUnset($name) {}

    /**
     * @see ArrayAccess::offsetGet
     */
    public function offsetGet($name) {}

    /**
     * @see ArrayAccess::offsetExists
     */
    public function offsetExists($name) {}

    /**
     * @see ArrayAccess::offsetSet
     */
    public function offsetSet($name, $value) {}
}

/**
 * <b>Yaf_View_Simple</b> is the built-in template engine in Yaf, it is a simple but fast template engine, and only support PHP script template.
 * @link https://secure.php.net/manual/en/class.yaf-view-simple.php
 */
class Yaf_View_Simple implements Yaf_View_Interface
{
    /**
     * @var string
     */
    protected $_tpl_dir;

    /**
     * @var array
     */
    protected $_tpl_vars;

    /**
     * @var array
     */
    protected $_options;

    /**
     * @link https://secure.php.net/manual/en/yaf-view-simple.construct.php
     *
     * @param string $template_dir The base directory of the templates, by default, it is APPLICATION . "/views" for Yaf.
     * @param array|null $options <p>Options for the engine, as of Yaf 2.1.13, you can use short tag
     * "<?=$var?>" in your template(regardless of "short_open_tag"),
     * so comes a option named "short_tag",  you can switch this off
     * to prevent use short_tag in template.
     * </p>
     * @throws Yaf_Exception_TypeError
     */
    final public function __construct($template_dir, ?array $options = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-view-simple.isset.php
     *
     * @param string $name
     */
    public function __isset($name) {}

    /**
     * assign variable to view engine
     *
     * @link https://secure.php.net/manual/en/yaf-view-simple.assign.php
     *
     * @param string|array $name A string or an array.<br/>if is string, then the next argument $value is required.
     * @param mixed $value mixed value
     * @return Yaf_View_Simple
     */
    public function assign($name, $value = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-view-simple.render.php
     *
     * @param string $tpl
     * @param array $tpl_vars
     *
     * @throws Yaf_Exception_LoadFailed_View
     *
     * @return string|void
     */
    public function render($tpl, $tpl_vars = null) {}

    /**
     * <p>Render a template and display the result instantly.</p>
     *
     * @link https://secure.php.net/manual/en/yaf-view-simple.display.php
     *
     * @param string $tpl
     * @param array $tpl_vars
     *
     * @throws Yaf_Exception_LoadFailed_View
     *
     * @return bool
     */
    public function display($tpl, $tpl_vars = null) {}

    /**
     * <p>unlike Yaf_View_Simple::assign(), this method assign a ref value to engine.</p>
     * @link https://secure.php.net/manual/en/yaf-view-simple.assignref.php
     *
     * @param string $name A string name which will be used to access the value in the template.
     * @param mixed &$value mixed value
     *
     * @return Yaf_View_Simple
     */
    public function assignRef($name, &$value) {}

    /**
     * clear assigned variable
     * @link https://secure.php.net/manual/en/yaf-view-simple.clear.php
     *
     * @param string $name assigned variable name. <br/>if empty, will clear all assigned variables.
     *
     * @return Yaf_View_Simple
     */
    public function clear($name = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-view-simple.setscriptpath.php
     *
     * @param string $template_dir
     *
     * @return Yaf_View_Simple
     */
    public function setScriptPath($template_dir) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-view-simple.getscriptpath.php
     *
     * @return string
     */
    public function getScriptPath($request = null) {}

    /**
     * <p>Retrieve assigned variable</p>
     * <br/>
     * <b>Note:</b>
     * <p>$name parameter can be empty since 2.1.11</p>
     * @link https://secure.php.net/manual/en/yaf-view-simple.get.php
     *
     * @param string $name <p>the assigned variable name</p>
     * <br/>
     * <p>if this is empty, all assigned variables will be returned</p>
     *
     * @return mixed
     */
    public function __get($name = null) {}

    /**
     * <p>This is a alternative and easier way to Yaf_View_Simple::assign().</p>
     *
     * @link https://secure.php.net/manual/en/yaf-view-simple.set.php
     *
     * @param string $name A string value name.
     * @param mixed $value mixed value
     */
    public function __set($name, $value = null) {}

    /**
     * <p>Render a string template and return the result.</p>
     * @link https://secure.php.net/manual/en/yaf-view-simple.eval.php
     * @param string $tpl_str string template
     * @param array $vars
     * @return void|false return FALSE on failure
     */
    public function eval($tpl_str, $vars = null) {}

    public function get($name = '') {}
}

/**
 * <p>by default, Yaf_Router only have a <b>Yaf_Route_Static</b> as its default route.</p>
 * <br/>
 * <p><b>Yaf_Route_Static</b> is designed to handle 80% of normal requirements.</p>
 * <br/>
 * <b>Note:</b>
 * <p> it is unnecessary to instance a <b>Yaf_Route_Static</b>, also unnecessary to add it into Yaf_Router's routes stack, since there is always be one in Yaf_Router's routes stack, and always be called at the last time.</p>
 *
 * @link https://secure.php.net/manual/en/class.yaf-route-static.php
 */
class Yaf_Route_Static implements Yaf_Route_Interface
{
    /**
     * @param string $uri
     *
     * @return bool
     * @deprecated not_implemented
     * @link https://secure.php.net/manual/en/yaf-route-static.match.php
     */
    public function match($uri) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-route-static.route.php
     *
     * @param Yaf_Request_Abstract $request
     *
     * @return bool always TRUE
     */
    public function route($request) {}

    /**
     * <p><b>Yaf_Route_Static::assemble()</b> - Assemble a url</p>
     *
     * @link https://secure.php.net/manual/en/yaf-route-static.assemble.php
     *
     * @param array $info
     * @param array|null $query
     * @return bool
     */
    public function assemble(array $info, ?array $query = null) {}
}

/**
 * <p><b>Yaf_Route_Simple</b> will match the query string, and find the route info.</p>
 * <br/>
 * <p>all you need to do is tell <b>Yaf_Route_Simple</b> what key in the $_GET is module, what key is controller, and what key is action.</p>
 * <br/>
 * <p>Yaf_Route_Simple::route() will always return TRUE, so it is important put <b>Yaf_Route_Simple</b> in the front of the Route stack, otherwise all the other routes will not be called</p>
 *
 * @link https://secure.php.net/manual/en/class.yaf-route-simple.php
 */
final class Yaf_Route_Simple implements Yaf_Route_Interface
{
    /**
     * @var string
     */
    protected $controller;

    /**
     * @var string
     */
    protected $module;

    /**
     * @var string
     */
    protected $action;

    /**
     * <p>Yaf_Route_Simple will get route info from query string. and the parameters of this constructor will used as keys while searching for the route info in $_GET.</p>
     *
     * @link https://secure.php.net/manual/en/yaf-route-simple.construct.php
     *
     * @param string $module_name
     * @param string $controller_name
     * @param string $action_name
     *
     * @throws Yaf_Exception_TypeError
     */
    public function __construct($module_name, $controller_name, $action_name) {}

    /**
     * <p>see Yaf_Route_Simple::__construct()</p>
     *
     * @link https://secure.php.net/manual/en/yaf-route-simple.route.php
     *
     * @param Yaf_Request_Abstract $request
     *
     * @return bool always TRUE
     */
    public function route($request) {}

    /**
     * <p><b>Yaf_Route_Simple::assemble()</b> - Assemble a url</p>
     *
     * @link https://secure.php.net/manual/en/yaf-route-simple.assemble.php
     *
     * @param array $info
     * @param array|null $query
     * @return bool
     */
    public function assemble(array $info, ?array $query = null) {}
}

/**
 * @link https://secure.php.net/manual/en/class.yaf-route-supervar.php
 */
final class Yaf_Route_Supervar implements Yaf_Route_Interface
{
    /**
     * @var string
     */
    protected $_var_name;

    /**
     * <p>Yaf_Route_Supervar is similar to Yaf_Route_Static, the difference is that Yaf_Route_Supervar will look for path info in query string, and the parameter supervar_name is the key.</p>
     *
     * @link https://secure.php.net/manual/en/yaf-route-supervar.construct.php
     *
     * @param string $supervar_name The name of key.
     *
     * @throws Yaf_Exception_TypeError
     */
    public function __construct($supervar_name) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-route-supervar.route.php
     *
     * @param Yaf_Request_Abstract $request
     *
     * @return bool If there is a key(which was defined in Yaf_Route_Supervar::__construct()) in $_GET, return TRUE. otherwise return FALSE.
     */
    public function route($request) {}

    /**
     * <p><b>Yaf_Route_Supervar::assemble()</b> - Assemble a url</p>
     *
     * @link https://secure.php.net/manual/en/yaf-route-supervar.assemble.php
     *
     * @param array $info
     * @param array|null $query
     * @return bool
     */
    public function assemble(array $info, ?array $query = null) {}
}

/**
 * <p>For usage, please see the example section of Yaf_Route_Rewrite::__construct()</p>
 *
 * @link https://secure.php.net/manual/en/class.yaf-route-rewrite.php
 */
final class Yaf_Route_Rewrite extends Yaf_Router implements Yaf_Route_Interface
{
    /**
     * @var string
     */
    protected $_route;

    /**
     * @var array
     */
    protected $_default;

    /**
     * @var array
     */
    protected $_verify;

    /**
     * @link https://secure.php.net/manual/en/yaf-route-rewrite.construct.php
     *
     * @param string $match A pattern, will be used to match a request uri, if doesn't matched, Yaf_Route_Rewrite will return FALSE.
     * @param array $route <p>When the match pattern matches the request uri, Yaf_Route_Rewrite will use this to decide which m/c/a to routed.</p>
     * <br/>
     * <p>either of m/c/a in this array is optional, if you don't assign a specific value, it will be routed to default.</p>
     * @param array $verify
     * @param string $reverse
     *
     * @throws Yaf_Exception_TypeError
     */
    public function __construct($match, array $route, array $verify = null, $reverse = null) {}

    /**
     * @link https://secure.php.net/manual/en/yaf-route-rewrite.route.php
     *
     * @param Yaf_Request_Abstract $request
     *
     * @return bool
     */
    public function route($request) {}

    /**
     * <p><b>Yaf_Route_Rewrite::assemble()</b> - Assemble a url</p>
     *
     * @link https://secure.php.net/manual/en/yaf-route-rewrite.assemble.php
     *
     * @param array $info
     * @param array|null $query
     * @return bool
     */
    public function assemble(array $info, ?array $query = null) {}

    public function match($uri) {}
}

/**
 * <p><b>Yaf_Route_Regex</b> is the most flexible route among the Yaf built-in routes.</p>
 *
 * @link https://secure.php.net/manual/en/class.yaf-route-regex.php
 */
final class Yaf_Route_Regex extends Yaf_Router implements Yaf_Route_Interface
{
    /**
     * @var string
     */
    protected $_route;

    /**
     * @var array
     */
    protected $_default;

    /**
     * @var array
     */
    protected $_maps;

    /**
     * @var array
     */
    protected $_verify;

    /**
     * @var string
     */
    protected $_reverse;

    /**
     * @link https://secure.php.net/manual/en/yaf-route-regex.construct.php
     *
     * @param string $match A complete Regex pattern, will be used to match a request uri, if doesn't matched, Yaf_Route_Regex will return FALSE.
     * @param array $route <p>When the match pattern matches the request uri, Yaf_Route_Regex will use this to decide which m/c/a to routed.</p>
     * <br/>
     * <p>either of m/c/a in this array is optional, if you don't assign a specific value, it will be routed to default.</p>
     * @param array|null $map A array to assign name to the captures in the match result.
     * @param array|null $verify
     * @param string $reverse
     *
     * @throws Yaf_Exception_TypeError
     */
    public function __construct($match, array $route, ?array $map = null, ?array $verify = null, $reverse = null) {}

    /**
     * Route a incoming request.
     *
     * @link https://secure.php.net/manual/en/yaf-route-regex.route.php
     *
     * @param Yaf_Request_Abstract $request
     *
     * @return bool If the pattern given by the first parameter of Yaf_Route_Regex::_construct() matches the request uri, return TRUE, otherwise return FALSE.
     */
    public function route($request) {}

    /**
     * <p><b>Yaf_Route_Regex::assemble()</b> - Assemble a url</p>
     *
     * @link https://secure.php.net/manual/en/yaf-route-regex.assemble.php
     *
     * @param array $info
     * @param array $query
     * @return bool
     */
    public function assemble(array $info, ?array $query = null) {}

    public function match($uri) {}
}

/**
 * <p><b>Yaf_Route_Map</b> is a built-in route, it simply convert a URI endpoint (that part of the URI which comes after the base URI: see Yaf_Request_Abstract::setBaseUri()) to a controller name or action name(depends on the parameter passed to Yaf_Route_Map::__construct()) in following rule: A => controller A. A/B/C => controller A_B_C. A/B/C/D/E => controller A_B_C_D_E.</p>
 * <br/>
 * <p>If the second parameter of Yaf_Route_Map::__construct() is specified, then only the part before delimiter of URI will used to routing, the part after it is used to routing request parameters (see the example section of Yaf_Route_Map::__construct()).</p>
 *
 * @link https://secure.php.net/manual/en/class.yaf-route-map.php
 */
final class Yaf_Route_Map implements Yaf_Route_Interface
{
    /**
     * @var string
     */
    protected $_ctl_router = '';

    /**
     * @var string
     */
    protected $_delimiter;

    /**
     * @link https://secure.php.net/manual/en/yaf-route-map.construct.php
     *
     * @param bool $controller_prefer Whether the result should considering as controller or action
     * @param string $delimiter
     */
    public function __construct($controller_prefer = false, $delimiter = '') {}

    /**
     * @link https://secure.php.net/manual/en/yaf-route-map.route.php
     *
     * @param Yaf_Request_Abstract $request
     *
     * @return bool
     */
    public function route($request) {}

    /**
     * <p><b>Yaf_Route_Map::assemble()</b> - Assemble a url</p>
     *
     * @link https://secure.php.net/manual/en/yaf-route-map.assemble.php
     *
     * @param array $info
     * @param array|null $query
     * @return bool
     */
    public function assemble(array $info, ?array $query = null) {}
}

/**
 * @link https://secure.php.net/manual/en/class.yaf-exception-typeerror.php
 */
class Yaf_Exception_TypeError extends Yaf_Exception {}

/**
 * @link https://secure.php.net/manual/en/class.yaf-exception-startuperror.php
 */
class Yaf_Exception_StartupError extends Yaf_Exception {}

/**
 * @link https://secure.php.net/manual/en/class.yaf-exception-routefaild.php
 */
class Yaf_Exception_RouterFailed extends Yaf_Exception {}

/**
 * @link https://secure.php.net/manual/en/class.yaf-exception-dispatchfaild.php
 */
class Yaf_Exception_DispatchFailed extends Yaf_Exception {}

/**
 * @link https://secure.php.net/manual/en/class.yaf-exception-loadfaild.php
 */
class Yaf_Exception_LoadFailed extends Yaf_Exception {}

/**
 * @link https://secure.php.net/manual/en/class.yaf-exception-loadfaild-module.php
 */
class Yaf_Exception_LoadFailed_Module extends Yaf_Exception_LoadFailed {}

/**
 * @link https://secure.php.net/manual/en/class.yaf-exception-loadfaild-controller.php
 */
class Yaf_Exception_LoadFailed_Controller extends Yaf_Exception_LoadFailed {}

/**
 * @link https://secure.php.net/manual/en/class.yaf-exception-loadfaild-action.php
 */
class Yaf_Exception_LoadFailed_Action extends Yaf_Exception_LoadFailed {}

/**
 * @link https://secure.php.net/manual/en/class.yaf-exception-loadfaild-view.php
 */
class Yaf_Exception_LoadFailed_View extends Yaf_Exception_LoadFailed {}
<?php

declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\JetBrains\PHPStormStub;

/**
 * This is a generated file, do not modify it directly!
 */
final class PhpStormStubsMap
{
    const CLASSES = array('AMQPBasicProperties' => 'amqp/amqp.stub', 'AMQPChannel' => 'amqp/amqp.stub', 'AMQPChannelException' => 'amqp/amqp.stub', 'AMQPConnection' => 'amqp/amqp.stub', 'AMQPConnectionException' => 'amqp/amqp.stub', 'AMQPDecimal' => 'amqp/amqp.stub', 'AMQPEnvelope' => 'amqp/amqp.stub', 'AMQPEnvelopeException' => 'amqp/amqp.stub', 'AMQPException' => 'amqp/amqp.stub', 'AMQPExchange' => 'amqp/amqp.stub', 'AMQPExchangeException' => 'amqp/amqp.stub', 'AMQPExchangeValue' => 'amqp/amqp.stub', 'AMQPQueue' => 'amqp/amqp.stub', 'AMQPQueueException' => 'amqp/amqp.stub', 'AMQPTimestamp' => 'amqp/amqp.stub', 'APCIterator' => 'apcu/apcu.stub', 'APCUIterator' => 'apcu/apcu.stub', 'AddressInfo' => 'sockets/sockets.stub', 'Aerospike' => 'aerospike/aerospike.stub', 'Aerospike\\Bytes' => 'aerospike/Bytes.stub', 'AllowDynamicProperties' => 'Core/Core_c.stub', 'AppendIterator' => 'SPL/SPL.stub', 'ArgumentCountError' => 'Core/Core_c.stub', 'ArithmeticError' => 'Core/Core_c.stub', 'ArrayAccess' => 'Core/Core_c.stub', 'ArrayIterator' => 'SPL/SPL.stub', 'ArrayObject' => 'SPL/SPL.stub', 'AssertionError' => 'standard/standard_9.stub', 'Attribute' => 'Core/Core_c.stub', 'BackedEnum' => 'Core/Core_c.stub', 'BadFunctionCallException' => 'SPL/SPL.stub', 'BadMethodCallException' => 'SPL/SPL.stub', 'BlackfireProbe' => 'blackfire/blackfire.stub', 'COM' => 'com_dotnet/com_dotnet.stub', 'CURLFile' => 'curl/curl.stub', 'CURLStringFile' => 'curl/CURLStringFile.stub', 'CachingIterator' => 'SPL/SPL.stub', 'CallbackFilterIterator' => 'SPL/SPL.stub', 'Cassandra' => 'cassandra/cassandra.stub', 'Cassandra\\Aggregate' => 'cassandra/cassandra.stub', 'Cassandra\\BatchStatement' => 'cassandra/cassandra.stub', 'Cassandra\\Bigint' => 'cassandra/cassandra.stub', 'Cassandra\\Blob' => 'cassandra/cassandra.stub', 'Cassandra\\Cluster' => 'cassandra/cassandra.stub', 'Cassandra\\Cluster\\Builder' => 'cassandra/cassandra.stub', 'Cassandra\\Collection' => 'cassandra/cassandra.stub', 'Cassandra\\Column' => 'cassandra/cassandra.stub', 'Cassandra\\Custom' => 'cassandra/cassandra.stub', 'Cassandra\\Date' => 'cassandra/cassandra.stub', 'Cassandra\\Decimal' => 'cassandra/cassandra.stub', 'Cassandra\\DefaultAggregate' => 'cassandra/cassandra.stub', 'Cassandra\\DefaultCluster' => 'cassandra/cassandra.stub', 'Cassandra\\DefaultColumn' => 'cassandra/cassandra.stub', 'Cassandra\\DefaultFunction' => 'cassandra/cassandra.stub', 'Cassandra\\DefaultIndex' => 'cassandra/cassandra.stub', 'Cassandra\\DefaultKeyspace' => 'cassandra/cassandra.stub', 'Cassandra\\DefaultMaterializedView' => 'cassandra/cassandra.stub', 'Cassandra\\DefaultSchema' => 'cassandra/cassandra.stub', 'Cassandra\\DefaultSession' => 'cassandra/cassandra.stub', 'Cassandra\\DefaultTable' => 'cassandra/cassandra.stub', 'Cassandra\\Duration' => 'cassandra/cassandra.stub', 'Cassandra\\Exception' => 'cassandra/cassandra.stub', 'Cassandra\\Exception\\AlreadyExistsException' => 'cassandra/cassandra.stub', 'Cassandra\\Exception\\AuthenticationException' => 'cassandra/cassandra.stub', 'Cassandra\\Exception\\ConfigurationException' => 'cassandra/cassandra.stub', 'Cassandra\\Exception\\DivideByZeroException' => 'cassandra/cassandra.stub', 'Cassandra\\Exception\\DomainException' => 'cassandra/cassandra.stub', 'Cassandra\\Exception\\ExecutionException' => 'cassandra/cassandra.stub', 'Cassandra\\Exception\\InvalidArgumentException' => 'cassandra/cassandra.stub', 'Cassandra\\Exception\\InvalidQueryException' => 'cassandra/cassandra.stub', 'Cassandra\\Exception\\InvalidSyntaxException' => 'cassandra/cassandra.stub', 'Cassandra\\Exception\\IsBootstrappingException' => 'cassandra/cassandra.stub', 'Cassandra\\Exception\\LogicException' => 'cassandra/cassandra.stub', 'Cassandra\\Exception\\OverloadedException' => 'cassandra/cassandra.stub', 'Cassandra\\Exception\\ProtocolException' => 'cassandra/cassandra.stub', 'Cassandra\\Exception\\RangeException' => 'cassandra/cassandra.stub', 'Cassandra\\Exception\\ReadTimeoutException' => 'cassandra/cassandra.stub', 'Cassandra\\Exception\\RuntimeException' => 'cassandra/cassandra.stub', 'Cassandra\\Exception\\ServerException' => 'cassandra/cassandra.stub', 'Cassandra\\Exception\\TimeoutException' => 'cassandra/cassandra.stub', 'Cassandra\\Exception\\TruncateException' => 'cassandra/cassandra.stub', 'Cassandra\\Exception\\UnauthorizedException' => 'cassandra/cassandra.stub', 'Cassandra\\Exception\\UnavailableException' => 'cassandra/cassandra.stub', 'Cassandra\\Exception\\UnpreparedException' => 'cassandra/cassandra.stub', 'Cassandra\\Exception\\ValidationException' => 'cassandra/cassandra.stub', 'Cassandra\\Exception\\WriteTimeoutException' => 'cassandra/cassandra.stub', 'Cassandra\\ExecutionOptions' => 'cassandra/cassandra.stub', 'Cassandra\\Float_' => 'cassandra/cassandra.stub', 'Cassandra\\Function_' => 'cassandra/cassandra.stub', 'Cassandra\\Future' => 'cassandra/cassandra.stub', 'Cassandra\\FutureClose' => 'cassandra/cassandra.stub', 'Cassandra\\FuturePreparedStatement' => 'cassandra/cassandra.stub', 'Cassandra\\FutureRows' => 'cassandra/cassandra.stub', 'Cassandra\\FutureSession' => 'cassandra/cassandra.stub', 'Cassandra\\FutureValue' => 'cassandra/cassandra.stub', 'Cassandra\\Index' => 'cassandra/cassandra.stub', 'Cassandra\\Inet' => 'cassandra/cassandra.stub', 'Cassandra\\Keyspace' => 'cassandra/cassandra.stub', 'Cassandra\\Map' => 'cassandra/cassandra.stub', 'Cassandra\\MaterializedView' => 'cassandra/cassandra.stub', 'Cassandra\\Numeric' => 'cassandra/cassandra.stub', 'Cassandra\\PreparedStatement' => 'cassandra/cassandra.stub', 'Cassandra\\RetryPolicy' => 'cassandra/cassandra.stub', 'Cassandra\\RetryPolicy\\DefaultPolicy' => 'cassandra/cassandra.stub', 'Cassandra\\RetryPolicy\\DowngradingConsistency' => 'cassandra/cassandra.stub', 'Cassandra\\RetryPolicy\\Fallthrough' => 'cassandra/cassandra.stub', 'Cassandra\\RetryPolicy\\Logging' => 'cassandra/cassandra.stub', 'Cassandra\\Rows' => 'cassandra/cassandra.stub', 'Cassandra\\SSLOptions' => 'cassandra/cassandra.stub', 'Cassandra\\SSLOptions\\Builder' => 'cassandra/cassandra.stub', 'Cassandra\\Schema' => 'cassandra/cassandra.stub', 'Cassandra\\Session' => 'cassandra/cassandra.stub', 'Cassandra\\Set' => 'cassandra/cassandra.stub', 'Cassandra\\SimpleStatement' => 'cassandra/cassandra.stub', 'Cassandra\\Smallint' => 'cassandra/cassandra.stub', 'Cassandra\\Statement' => 'cassandra/cassandra.stub', 'Cassandra\\Table' => 'cassandra/cassandra.stub', 'Cassandra\\Time' => 'cassandra/cassandra.stub', 'Cassandra\\Timestamp' => 'cassandra/cassandra.stub', 'Cassandra\\TimestampGenerator' => 'cassandra/cassandra.stub', 'Cassandra\\TimestampGenerator\\Monotonic' => 'cassandra/cassandra.stub', 'Cassandra\\TimestampGenerator\\ServerSide' => 'cassandra/cassandra.stub', 'Cassandra\\Timeuuid' => 'cassandra/cassandra.stub', 'Cassandra\\Tinyint' => 'cassandra/cassandra.stub', 'Cassandra\\Tuple' => 'cassandra/cassandra.stub', 'Cassandra\\Type' => 'cassandra/cassandra.stub', 'Cassandra\\Type\\Collection' => 'cassandra/cassandra.stub', 'Cassandra\\Type\\Custom' => 'cassandra/cassandra.stub', 'Cassandra\\Type\\Map' => 'cassandra/cassandra.stub', 'Cassandra\\Type\\Scalar' => 'cassandra/cassandra.stub', 'Cassandra\\Type\\Set' => 'cassandra/cassandra.stub', 'Cassandra\\Type\\Tuple' => 'cassandra/cassandra.stub', 'Cassandra\\Type\\UserType' => 'cassandra/cassandra.stub', 'Cassandra\\UserTypeValue' => 'cassandra/cassandra.stub', 'Cassandra\\Uuid' => 'cassandra/cassandra.stub', 'Cassandra\\UuidInterface' => 'cassandra/cassandra.stub', 'Cassandra\\Value' => 'cassandra/cassandra.stub', 'Cassandra\\Varint' => 'cassandra/cassandra.stub', 'ClosedGeneratorException' => 'standard/_types.stub', 'Closure' => 'Core/Core_c.stub', 'Collator' => 'intl/intl.stub', 'Collectable' => 'pthreads/pthreads.stub', 'CompileError' => 'Core/Core_c.stub', 'Couchbase\\AnalyticsEncryptionLevel' => 'couchbase/couchbase.stub', 'Couchbase\\AnalyticsException' => 'couchbase/couchbase.stub', 'Couchbase\\AnalyticsIndexManager' => 'couchbase/couchbase.stub', 'Couchbase\\AnalyticsLink' => 'couchbase/couchbase.stub', 'Couchbase\\AnalyticsLinkType' => 'couchbase/couchbase.stub', 'Couchbase\\AnalyticsOptions' => 'couchbase/couchbase.stub', 'Couchbase\\AnalyticsResult' => 'couchbase/couchbase.stub', 'Couchbase\\AppendOptions' => 'couchbase/couchbase.stub', 'Couchbase\\AuthenticationException' => 'couchbase/couchbase.stub', 'Couchbase\\AzureBlobExternalAnalyticsLink' => 'couchbase/couchbase.stub', 'Couchbase\\BadInputException' => 'couchbase/couchbase.stub', 'Couchbase\\BaseException' => 'couchbase/couchbase.stub', 'Couchbase\\BinaryCollection' => 'couchbase/couchbase.stub', 'Couchbase\\BindingsException' => 'couchbase/couchbase.stub', 'Couchbase\\BooleanFieldSearchQuery' => 'couchbase/couchbase.stub', 'Couchbase\\BooleanSearchQuery' => 'couchbase/couchbase.stub', 'Couchbase\\Bucket' => 'couchbase/couchbase.stub', 'Couchbase\\BucketManager' => 'couchbase/couchbase.stub', 'Couchbase\\BucketMissingException' => 'couchbase/couchbase.stub', 'Couchbase\\BucketSettings' => 'couchbase/couchbase.stub', 'Couchbase\\CasMismatchException' => 'couchbase/couchbase.stub', 'Couchbase\\Cluster' => 'couchbase/couchbase.stub', 'Couchbase\\ClusterOptions' => 'couchbase/couchbase.stub', 'Couchbase\\Collection' => 'couchbase/couchbase.stub', 'Couchbase\\CollectionManager' => 'couchbase/couchbase.stub', 'Couchbase\\CollectionMissingException' => 'couchbase/couchbase.stub', 'Couchbase\\CollectionSpec' => 'couchbase/couchbase.stub', 'Couchbase\\ConjunctionSearchQuery' => 'couchbase/couchbase.stub', 'Couchbase\\ConnectAnalyticsLinkOptions' => 'couchbase/couchbase.stub', 'Couchbase\\Coordinate' => 'couchbase/couchbase.stub', 'Couchbase\\CouchbaseRemoteAnalyticsLink' => 'couchbase/couchbase.stub', 'Couchbase\\CounterResult' => 'couchbase/couchbase.stub', 'Couchbase\\CreateAnalyticsDatasetOptions' => 'couchbase/couchbase.stub', 'Couchbase\\CreateAnalyticsDataverseOptions' => 'couchbase/couchbase.stub', 'Couchbase\\CreateAnalyticsIndexOptions' => 'couchbase/couchbase.stub', 'Couchbase\\CreateAnalyticsLinkOptions' => 'couchbase/couchbase.stub', 'Couchbase\\CreateQueryIndexOptions' => 'couchbase/couchbase.stub', 'Couchbase\\CreateQueryPrimaryIndexOptions' => 'couchbase/couchbase.stub', 'Couchbase\\DateRangeFacetResult' => 'couchbase/couchbase.stub', 'Couchbase\\DateRangeSearchFacet' => 'couchbase/couchbase.stub', 'Couchbase\\DateRangeSearchQuery' => 'couchbase/couchbase.stub', 'Couchbase\\DecrementOptions' => 'couchbase/couchbase.stub', 'Couchbase\\DesignDocument' => 'couchbase/couchbase.stub', 'Couchbase\\DisconnectAnalyticsLinkOptions' => 'couchbase/couchbase.stub', 'Couchbase\\DisjunctionSearchQuery' => 'couchbase/couchbase.stub', 'Couchbase\\DmlFailureException' => 'couchbase/couchbase.stub', 'Couchbase\\DocIdSearchQuery' => 'couchbase/couchbase.stub', 'Couchbase\\DocumentNotFoundException' => 'couchbase/couchbase.stub', 'Couchbase\\DropAnalyticsDatasetOptions' => 'couchbase/couchbase.stub', 'Couchbase\\DropAnalyticsDataverseOptions' => 'couchbase/couchbase.stub', 'Couchbase\\DropAnalyticsIndexOptions' => 'couchbase/couchbase.stub', 'Couchbase\\DropAnalyticsLinkOptions' => 'couchbase/couchbase.stub', 'Couchbase\\DropQueryIndexOptions' => 'couchbase/couchbase.stub', 'Couchbase\\DropQueryPrimaryIndexOptions' => 'couchbase/couchbase.stub', 'Couchbase\\DropUserOptions' => 'couchbase/couchbase.stub', 'Couchbase\\DurabilityException' => 'couchbase/couchbase.stub', 'Couchbase\\DurabilityLevel' => 'couchbase/couchbase.stub', 'Couchbase\\EncryptionSettings' => 'couchbase/couchbase.stub', 'Couchbase\\EvictionPolicy' => 'couchbase/couchbase.stub', 'Couchbase\\ExistsOptions' => 'couchbase/couchbase.stub', 'Couchbase\\ExistsResult' => 'couchbase/couchbase.stub', 'Couchbase\\GeoBoundingBoxSearchQuery' => 'couchbase/couchbase.stub', 'Couchbase\\GeoDistanceSearchQuery' => 'couchbase/couchbase.stub', 'Couchbase\\GeoPolygonQuery' => 'couchbase/couchbase.stub', 'Couchbase\\GetAllReplicasOptions' => 'couchbase/couchbase.stub', 'Couchbase\\GetAllUsersOptions' => 'couchbase/couchbase.stub', 'Couchbase\\GetAnalyticsLinksOptions' => 'couchbase/couchbase.stub', 'Couchbase\\GetAndLockOptions' => 'couchbase/couchbase.stub', 'Couchbase\\GetAndTouchOptions' => 'couchbase/couchbase.stub', 'Couchbase\\GetAnyReplicaOptions' => 'couchbase/couchbase.stub', 'Couchbase\\GetOptions' => 'couchbase/couchbase.stub', 'Couchbase\\GetReplicaResult' => 'couchbase/couchbase.stub', 'Couchbase\\GetResult' => 'couchbase/couchbase.stub', 'Couchbase\\GetUserOptions' => 'couchbase/couchbase.stub', 'Couchbase\\Group' => 'couchbase/couchbase.stub', 'Couchbase\\HttpException' => 'couchbase/couchbase.stub', 'Couchbase\\IncrementOptions' => 'couchbase/couchbase.stub', 'Couchbase\\IndexFailureException' => 'couchbase/couchbase.stub', 'Couchbase\\IndexNotFoundException' => 'couchbase/couchbase.stub', 'Couchbase\\InsertOptions' => 'couchbase/couchbase.stub', 'Couchbase\\InvalidConfigurationException' => 'couchbase/couchbase.stub', 'Couchbase\\InvalidRangeException' => 'couchbase/couchbase.stub', 'Couchbase\\InvalidStateException' => 'couchbase/couchbase.stub', 'Couchbase\\KeyDeletedException' => 'couchbase/couchbase.stub', 'Couchbase\\KeyExistsException' => 'couchbase/couchbase.stub', 'Couchbase\\KeyLockedException' => 'couchbase/couchbase.stub', 'Couchbase\\KeyValueException' => 'couchbase/couchbase.stub', 'Couchbase\\KeyspaceNotFoundException' => 'couchbase/couchbase.stub', 'Couchbase\\LoggingMeter' => 'couchbase/couchbase.stub', 'Couchbase\\LookupCountSpec' => 'couchbase/couchbase.stub', 'Couchbase\\LookupExistsSpec' => 'couchbase/couchbase.stub', 'Couchbase\\LookupGetFullSpec' => 'couchbase/couchbase.stub', 'Couchbase\\LookupGetSpec' => 'couchbase/couchbase.stub', 'Couchbase\\LookupInOptions' => 'couchbase/couchbase.stub', 'Couchbase\\LookupInResult' => 'couchbase/couchbase.stub', 'Couchbase\\LookupInSpec' => 'couchbase/couchbase.stub', 'Couchbase\\MatchAllSearchQuery' => 'couchbase/couchbase.stub', 'Couchbase\\MatchNoneSearchQuery' => 'couchbase/couchbase.stub', 'Couchbase\\MatchPhraseSearchQuery' => 'couchbase/couchbase.stub', 'Couchbase\\MatchSearchQuery' => 'couchbase/couchbase.stub', 'Couchbase\\Meter' => 'couchbase/couchbase.stub', 'Couchbase\\MutateArrayAddUniqueSpec' => 'couchbase/couchbase.stub', 'Couchbase\\MutateArrayAppendSpec' => 'couchbase/couchbase.stub', 'Couchbase\\MutateArrayInsertSpec' => 'couchbase/couchbase.stub', 'Couchbase\\MutateArrayPrependSpec' => 'couchbase/couchbase.stub', 'Couchbase\\MutateCounterSpec' => 'couchbase/couchbase.stub', 'Couchbase\\MutateInOptions' => 'couchbase/couchbase.stub', 'Couchbase\\MutateInResult' => 'couchbase/couchbase.stub', 'Couchbase\\MutateInSpec' => 'couchbase/couchbase.stub', 'Couchbase\\MutateInsertSpec' => 'couchbase/couchbase.stub', 'Couchbase\\MutateRemoveSpec' => 'couchbase/couchbase.stub', 'Couchbase\\MutateReplaceSpec' => 'couchbase/couchbase.stub', 'Couchbase\\MutateUpsertSpec' => 'couchbase/couchbase.stub', 'Couchbase\\MutationResult' => 'couchbase/couchbase.stub', 'Couchbase\\MutationState' => 'couchbase/couchbase.stub', 'Couchbase\\MutationToken' => 'couchbase/couchbase.stub', 'Couchbase\\NetworkException' => 'couchbase/couchbase.stub', 'Couchbase\\NoopMeter' => 'couchbase/couchbase.stub', 'Couchbase\\NoopTracer' => 'couchbase/couchbase.stub', 'Couchbase\\NumericRangeFacetResult' => 'couchbase/couchbase.stub', 'Couchbase\\NumericRangeSearchFacet' => 'couchbase/couchbase.stub', 'Couchbase\\NumericRangeSearchQuery' => 'couchbase/couchbase.stub', 'Couchbase\\Origin' => 'couchbase/couchbase.stub', 'Couchbase\\ParsingFailureException' => 'couchbase/couchbase.stub', 'Couchbase\\PartialViewException' => 'couchbase/couchbase.stub', 'Couchbase\\PathExistsException' => 'couchbase/couchbase.stub', 'Couchbase\\PathNotFoundException' => 'couchbase/couchbase.stub', 'Couchbase\\PhraseSearchQuery' => 'couchbase/couchbase.stub', 'Couchbase\\PlanningFailureException' => 'couchbase/couchbase.stub', 'Couchbase\\PrefixSearchQuery' => 'couchbase/couchbase.stub', 'Couchbase\\PreparedStatementException' => 'couchbase/couchbase.stub', 'Couchbase\\PrependOptions' => 'couchbase/couchbase.stub', 'Couchbase\\QueryErrorException' => 'couchbase/couchbase.stub', 'Couchbase\\QueryException' => 'couchbase/couchbase.stub', 'Couchbase\\QueryIndex' => 'couchbase/couchbase.stub', 'Couchbase\\QueryIndexManager' => 'couchbase/couchbase.stub', 'Couchbase\\QueryMetaData' => 'couchbase/couchbase.stub', 'Couchbase\\QueryOptions' => 'couchbase/couchbase.stub', 'Couchbase\\QueryProfile' => 'couchbase/couchbase.stub', 'Couchbase\\QueryResult' => 'couchbase/couchbase.stub', 'Couchbase\\QueryScanConsistency' => 'couchbase/couchbase.stub', 'Couchbase\\QueryServiceException' => 'couchbase/couchbase.stub', 'Couchbase\\QueryStringSearchQuery' => 'couchbase/couchbase.stub', 'Couchbase\\QuotaLimitedException' => 'couchbase/couchbase.stub', 'Couchbase\\RateLimitedException' => 'couchbase/couchbase.stub', 'Couchbase\\RegexpSearchQuery' => 'couchbase/couchbase.stub', 'Couchbase\\RemoveOptions' => 'couchbase/couchbase.stub', 'Couchbase\\ReplaceAnalyticsLinkOptions' => 'couchbase/couchbase.stub', 'Couchbase\\ReplaceOptions' => 'couchbase/couchbase.stub', 'Couchbase\\RequestCanceledException' => 'couchbase/couchbase.stub', 'Couchbase\\RequestSpan' => 'couchbase/couchbase.stub', 'Couchbase\\RequestTracer' => 'couchbase/couchbase.stub', 'Couchbase\\Result' => 'couchbase/couchbase.stub', 'Couchbase\\Role' => 'couchbase/couchbase.stub', 'Couchbase\\RoleAndDescription' => 'couchbase/couchbase.stub', 'Couchbase\\RoleAndOrigin' => 'couchbase/couchbase.stub', 'Couchbase\\S3ExternalAnalyticsLink' => 'couchbase/couchbase.stub', 'Couchbase\\Scope' => 'couchbase/couchbase.stub', 'Couchbase\\ScopeMissingException' => 'couchbase/couchbase.stub', 'Couchbase\\ScopeSpec' => 'couchbase/couchbase.stub', 'Couchbase\\SearchException' => 'couchbase/couchbase.stub', 'Couchbase\\SearchFacet' => 'couchbase/couchbase.stub', 'Couchbase\\SearchFacetResult' => 'couchbase/couchbase.stub', 'Couchbase\\SearchHighlightMode' => 'couchbase/couchbase.stub', 'Couchbase\\SearchIndex' => 'couchbase/couchbase.stub', 'Couchbase\\SearchIndexManager' => 'couchbase/couchbase.stub', 'Couchbase\\SearchMetaData' => 'couchbase/couchbase.stub', 'Couchbase\\SearchOptions' => 'couchbase/couchbase.stub', 'Couchbase\\SearchQuery' => 'couchbase/couchbase.stub', 'Couchbase\\SearchResult' => 'couchbase/couchbase.stub', 'Couchbase\\SearchSort' => 'couchbase/couchbase.stub', 'Couchbase\\SearchSortField' => 'couchbase/couchbase.stub', 'Couchbase\\SearchSortGeoDistance' => 'couchbase/couchbase.stub', 'Couchbase\\SearchSortId' => 'couchbase/couchbase.stub', 'Couchbase\\SearchSortMissing' => 'couchbase/couchbase.stub', 'Couchbase\\SearchSortMode' => 'couchbase/couchbase.stub', 'Couchbase\\SearchSortScore' => 'couchbase/couchbase.stub', 'Couchbase\\SearchSortType' => 'couchbase/couchbase.stub', 'Couchbase\\ServiceMissingException' => 'couchbase/couchbase.stub', 'Couchbase\\StorageBackend' => 'couchbase/couchbase.stub', 'Couchbase\\StoreSemantics' => 'couchbase/couchbase.stub', 'Couchbase\\SubdocumentException' => 'couchbase/couchbase.stub', 'Couchbase\\TempFailException' => 'couchbase/couchbase.stub', 'Couchbase\\TermFacetResult' => 'couchbase/couchbase.stub', 'Couchbase\\TermRangeSearchQuery' => 'couchbase/couchbase.stub', 'Couchbase\\TermSearchFacet' => 'couchbase/couchbase.stub', 'Couchbase\\TermSearchQuery' => 'couchbase/couchbase.stub', 'Couchbase\\ThresholdLoggingTracer' => 'couchbase/couchbase.stub', 'Couchbase\\TimeoutException' => 'couchbase/couchbase.stub', 'Couchbase\\TouchOptions' => 'couchbase/couchbase.stub', 'Couchbase\\UnlockOptions' => 'couchbase/couchbase.stub', 'Couchbase\\UpsertOptions' => 'couchbase/couchbase.stub', 'Couchbase\\UpsertUserOptions' => 'couchbase/couchbase.stub', 'Couchbase\\User' => 'couchbase/couchbase.stub', 'Couchbase\\UserAndMetadata' => 'couchbase/couchbase.stub', 'Couchbase\\UserManager' => 'couchbase/couchbase.stub', 'Couchbase\\ValueRecorder' => 'couchbase/couchbase.stub', 'Couchbase\\ValueTooBigException' => 'couchbase/couchbase.stub', 'Couchbase\\View' => 'couchbase/couchbase.stub', 'Couchbase\\ViewConsistency' => 'couchbase/couchbase.stub', 'Couchbase\\ViewException' => 'couchbase/couchbase.stub', 'Couchbase\\ViewIndexManager' => 'couchbase/couchbase.stub', 'Couchbase\\ViewMetaData' => 'couchbase/couchbase.stub', 'Couchbase\\ViewOptions' => 'couchbase/couchbase.stub', 'Couchbase\\ViewOrdering' => 'couchbase/couchbase.stub', 'Couchbase\\ViewResult' => 'couchbase/couchbase.stub', 'Couchbase\\ViewRow' => 'couchbase/couchbase.stub', 'Couchbase\\WatchQueryIndexesOptions' => 'couchbase/couchbase.stub', 'Couchbase\\WildcardSearchQuery' => 'couchbase/couchbase.stub', 'Countable' => 'Core/Core_c.stub', 'Crypto\\Base64' => 'crypto/crypto.stub', 'Crypto\\Base64Exception' => 'crypto/crypto.stub', 'Crypto\\CMAC' => 'crypto/crypto.stub', 'Crypto\\Cipher' => 'crypto/crypto.stub', 'Crypto\\CipherException' => 'crypto/crypto.stub', 'Crypto\\HMAC' => 'crypto/crypto.stub', 'Crypto\\Hash' => 'crypto/crypto.stub', 'Crypto\\HashException' => 'crypto/crypto.stub', 'Crypto\\KDF' => 'crypto/crypto.stub', 'Crypto\\KDFException' => 'crypto/crypto.stub', 'Crypto\\MAC' => 'crypto/crypto.stub', 'Crypto\\MACException' => 'crypto/crypto.stub', 'Crypto\\PBKDF2' => 'crypto/crypto.stub', 'Crypto\\PBKDF2Exception' => 'crypto/crypto.stub', 'Crypto\\Rand' => 'crypto/crypto.stub', 'Crypto\\RandException' => 'crypto/crypto.stub', 'CurlHandle' => 'curl/curl.stub', 'CurlMultiHandle' => 'curl/curl.stub', 'CurlShareHandle' => 'curl/curl.stub', 'DOMAttr' => 'dom/dom_c.stub', 'DOMCdataSection' => 'dom/dom_c.stub', 'DOMCharacterData' => 'dom/dom_c.stub', 'DOMChildNode' => 'dom/dom_c.stub', 'DOMComment' => 'dom/dom_c.stub', 'DOMConfiguration' => 'dom/dom_c.stub', 'DOMDocument' => 'dom/dom_c.stub', 'DOMDocumentFragment' => 'dom/dom_c.stub', 'DOMDocumentType' => 'dom/dom_c.stub', 'DOMDomError' => 'dom/dom_c.stub', 'DOMElement' => 'dom/dom_c.stub', 'DOMEntity' => 'dom/dom_c.stub', 'DOMEntityReference' => 'dom/dom_c.stub', 'DOMErrorHandler' => 'dom/dom_c.stub', 'DOMException' => 'dom/dom_c.stub', 'DOMImplementation' => 'dom/dom_c.stub', 'DOMImplementationList' => 'dom/dom_c.stub', 'DOMImplementationSource' => 'dom/dom_c.stub', 'DOMLocator' => 'dom/dom_c.stub', 'DOMNameList' => 'dom/dom_c.stub', 'DOMNameSpaceNode' => 'dom/dom_c.stub', 'DOMNamedNodeMap' => 'dom/dom_c.stub', 'DOMNode' => 'dom/dom_c.stub', 'DOMNodeList' => 'dom/dom_c.stub', 'DOMNotation' => 'dom/dom_c.stub', 'DOMParentNode' => 'dom/dom_c.stub', 'DOMProcessingInstruction' => 'dom/dom_c.stub', 'DOMStringExtend' => 'dom/dom_c.stub', 'DOMStringList' => 'dom/dom_c.stub', 'DOMText' => 'dom/dom_c.stub', 'DOMTypeinfo' => 'dom/dom_c.stub', 'DOMUserDataHandler' => 'dom/dom_c.stub', 'DOMXPath' => 'dom/dom_c.stub', 'DOTNET' => 'com_dotnet/com_dotnet.stub', 'DateInterval' => 'date/date_c.stub', 'DatePeriod' => 'date/date_c.stub', 'DateTime' => 'date/date_c.stub', 'DateTimeImmutable' => 'date/date_c.stub', 'DateTimeInterface' => 'date/date_c.stub', 'DateTimeZone' => 'date/date_c.stub', 'Decimal\\Decimal' => 'decimal/decimal.stub', 'DeflateContext' => 'zlib/zlib.stub', 'Directory' => 'standard/standard_0.stub', 'DirectoryIterator' => 'SPL/SPL_c1.stub', 'DivisionByZeroError' => 'Core/Core_c.stub', 'DomainException' => 'SPL/SPL.stub', 'Ds\\Collection' => 'ds/ds.stub', 'Ds\\Deque' => 'ds/ds.stub', 'Ds\\Hashable' => 'ds/ds.stub', 'Ds\\Map' => 'ds/ds.stub', 'Ds\\Pair' => 'ds/ds.stub', 'Ds\\PriorityQueue' => 'ds/ds.stub', 'Ds\\Queue' => 'ds/ds.stub', 'Ds\\Sequence' => 'ds/ds.stub', 'Ds\\Set' => 'ds/ds.stub', 'Ds\\Stack' => 'ds/ds.stub', 'Ds\\Vector' => 'ds/ds.stub', 'Elastic\\Apm\\CustomErrorData' => 'elastic_apm/elastic_apm.stub', 'Elastic\\Apm\\DistributedTracingData' => 'elastic_apm/elastic_apm.stub', 'Elastic\\Apm\\ElasticApm' => 'elastic_apm/elastic_apm.stub', 'Elastic\\Apm\\ExecutionSegmentContextInterface' => 'elastic_apm/elastic_apm.stub', 'Elastic\\Apm\\ExecutionSegmentInterface' => 'elastic_apm/elastic_apm.stub', 'Elastic\\Apm\\SpanContextDbInterface' => 'elastic_apm/elastic_apm.stub', 'Elastic\\Apm\\SpanContextDestinationInterface' => 'elastic_apm/elastic_apm.stub', 'Elastic\\Apm\\SpanContextHttpInterface' => 'elastic_apm/elastic_apm.stub', 'Elastic\\Apm\\SpanContextInterface' => 'elastic_apm/elastic_apm.stub', 'Elastic\\Apm\\SpanInterface' => 'elastic_apm/elastic_apm.stub', 'Elastic\\Apm\\TransactionBuilderInterface' => 'elastic_apm/elastic_apm.stub', 'Elastic\\Apm\\TransactionContextInterface' => 'elastic_apm/elastic_apm.stub', 'Elastic\\Apm\\TransactionContextRequestInterface' => 'elastic_apm/elastic_apm.stub', 'Elastic\\Apm\\TransactionContextRequestUrlInterface' => 'elastic_apm/elastic_apm.stub', 'Elastic\\Apm\\TransactionInterface' => 'elastic_apm/elastic_apm.stub', 'EmptyIterator' => 'SPL/SPL.stub', 'EnchantBroker' => 'enchant/enchant.stub', 'EnchantDictionary' => 'enchant/enchant.stub', 'Error' => 'Core/Core_c.stub', 'ErrorException' => 'Core/Core_c.stub', 'Ev' => 'Ev/Ev.stub', 'EvCheck' => 'Ev/Ev.stub', 'EvChild' => 'Ev/Ev.stub', 'EvEmbed' => 'Ev/Ev.stub', 'EvFork' => 'Ev/Ev.stub', 'EvIdle' => 'Ev/Ev.stub', 'EvIo' => 'Ev/Ev.stub', 'EvLoop' => 'Ev/Ev.stub', 'EvPeriodic' => 'Ev/Ev.stub', 'EvPrepare' => 'Ev/Ev.stub', 'EvSignal' => 'Ev/Ev.stub', 'EvStat' => 'Ev/Ev.stub', 'EvTimer' => 'Ev/Ev.stub', 'EvWatcher' => 'Ev/Ev.stub', 'Event' => 'event/event.stub', 'EventBase' => 'event/event.stub', 'EventBuffer' => 'event/event.stub', 'EventBufferEvent' => 'event/event.stub', 'EventConfig' => 'event/event.stub', 'EventDnsBase' => 'event/event.stub', 'EventHttp' => 'event/event.stub', 'EventHttpConnection' => 'event/event.stub', 'EventHttpRequest' => 'event/event.stub', 'EventListener' => 'event/event.stub', 'EventSslContext' => 'event/event.stub', 'EventUtil' => 'event/event.stub', 'Exception' => 'Core/Core_c.stub', 'FANNConnection' => 'fann/fann.stub', 'FFI' => 'FFI/FFI.stub', 'FFI\\CData' => 'FFI/FFI.stub', 'FFI\\CType' => 'FFI/FFI.stub', 'FFI\\Exception' => 'FFI/FFI.stub', 'FFI\\ParserException' => 'FFI/FFI.stub', 'FTP\\Connection' => 'ftp/Connection.stub', 'Fiber' => 'Core/Core_c.stub', 'FiberError' => 'Core/Core_c.stub', 'FilesystemIterator' => 'SPL/SPL_c1.stub', 'FilterIterator' => 'SPL/SPL.stub', 'GEOSGeometry' => 'geos/geos.stub', 'GEOSWKBReader' => 'geos/geos.stub', 'GEOSWKBWriter' => 'geos/geos.stub', 'GEOSWKTReader' => 'geos/geos.stub', 'GEOSWKTWriter' => 'geos/geos.stub', 'GMP' => 'gmp/gmp.stub', 'GdFont' => 'gd/GdFont.stub', 'GdImage' => 'gd/gd.stub', 'GearmanClient' => 'gearman/gearman.stub', 'GearmanException' => 'gearman/gearman.stub', 'GearmanJob' => 'gearman/gearman.stub', 'GearmanTask' => 'gearman/gearman.stub', 'GearmanWorker' => 'gearman/gearman.stub', 'Generator' => 'standard/_types.stub', 'GlobIterator' => 'SPL/SPL_c1.stub', 'Gmagick' => 'gmagick/gmagick.stub', 'GmagickDraw' => 'gmagick/gmagick.stub', 'GmagickException' => 'gmagick/gmagick.stub', 'GmagickPixel' => 'gmagick/gmagick.stub', 'GmagickPixelException' => 'gmagick/gmagick.stub', 'Grpc\\Call' => 'grpc/grpc.stub', 'Grpc\\CallCredentials' => 'grpc/grpc.stub', 'Grpc\\Channel' => 'grpc/grpc.stub', 'Grpc\\ChannelCredentials' => 'grpc/grpc.stub', 'Grpc\\Server' => 'grpc/grpc.stub', 'Grpc\\ServerCredentials' => 'grpc/grpc.stub', 'Grpc\\Timeval' => 'grpc/grpc.stub', 'HashContext' => 'hash/hash.stub', 'HttpDeflateStream' => 'http/http.stub', 'HttpEncodingException' => 'http/http.stub', 'HttpException' => 'http/http.stub', 'HttpHeaderException' => 'http/http.stub', 'HttpInflateStream' => 'http/http.stub', 'HttpInvalidParamException' => 'http/http.stub', 'HttpMalformedHeadersException' => 'http/http.stub', 'HttpMessage' => 'http/http.stub', 'HttpMessageTypeException' => 'http/http.stub', 'HttpQueryString' => 'http/http.stub', 'HttpQueryStringException' => 'http/http.stub', 'HttpRequest' => 'http/http.stub', 'HttpRequestDataShare' => 'http/http.stub', 'HttpRequestException' => 'http/http.stub', 'HttpRequestMethodException' => 'http/http.stub', 'HttpRequestPool' => 'http/http.stub', 'HttpRequestPoolException' => 'http/http.stub', 'HttpResponse' => 'http/http.stub', 'HttpResponseException' => 'http/http.stub', 'HttpRuntimeException' => 'http/http.stub', 'HttpSocketException' => 'http/http.stub', 'HttpUrlException' => 'http/http.stub', 'HttpUtil' => 'http/http.stub', 'IMAP\\Connection' => 'imap/Connection.stub', 'Imagick' => 'imagick/imagick.stub', 'ImagickDraw' => 'imagick/imagick.stub', 'ImagickDrawException' => 'imagick/imagick.stub', 'ImagickException' => 'imagick/imagick.stub', 'ImagickKernel' => 'imagick/imagick.stub', 'ImagickKernelException' => 'imagick/imagick.stub', 'ImagickPixel' => 'imagick/imagick.stub', 'ImagickPixelException' => 'imagick/imagick.stub', 'ImagickPixelIterator' => 'imagick/imagick.stub', 'ImagickPixelIteratorException' => 'imagick/imagick.stub', 'InfiniteIterator' => 'SPL/SPL.stub', 'InflateContext' => 'zlib/zlib.stub', 'InternalIterator' => 'Core/Core_c.stub', 'IntlBreakIterator' => 'intl/intl.stub', 'IntlCalendar' => 'intl/intl.stub', 'IntlChar' => 'intl/IntlChar.stub', 'IntlCodePointBreakIterator' => 'intl/intl.stub', 'IntlDateFormatter' => 'intl/intl.stub', 'IntlDatePatternGenerator' => 'intl/IntlDatePatternGenerator.stub', 'IntlException' => 'intl/intl.stub', 'IntlGregorianCalendar' => 'intl/intl.stub', 'IntlIterator' => 'intl/intl.stub', 'IntlPartsIterator' => 'intl/intl.stub', 'IntlRuleBasedBreakIterator' => 'intl/intl.stub', 'IntlTimeZone' => 'intl/intl.stub', 'InvalidArgumentException' => 'SPL/SPL.stub', 'Iterator' => 'Core/Core_c.stub', 'IteratorAggregate' => 'Core/Core_c.stub', 'IteratorIterator' => 'SPL/SPL.stub', 'JavaException' => 'zend/zend.stub', 'JsonException' => 'json/json.stub', 'JsonIncrementalParser' => 'json/json.stub', 'JsonSerializable' => 'json/json.stub', 'Judy' => 'judy/judy.stub', 'LDAP\\Connection' => 'ldap/Connection.stub', 'LDAP\\Result' => 'ldap/Result.stub', 'LDAP\\ResultEntry' => 'ldap/ResultEntry.stub', 'LengthException' => 'SPL/SPL.stub', 'LevelDB' => 'leveldb/LevelDB.stub', 'LevelDBException' => 'leveldb/LevelDB.stub', 'LevelDBIterator' => 'leveldb/LevelDB.stub', 'LevelDBSnapshot' => 'leveldb/LevelDB.stub', 'LevelDBWriteBatch' => 'leveldb/LevelDB.stub', 'LibXMLError' => 'libxml/libxml.stub', 'LimitIterator' => 'SPL/SPL.stub', 'Locale' => 'intl/intl.stub', 'LogicException' => 'SPL/SPL.stub', 'Lua' => 'lua/lua.stub', 'LuaSandbox' => 'LuaSandbox/LuaSandbox.stub', 'LuaSandboxError' => 'LuaSandbox/LuaSandbox.stub', 'LuaSandboxErrorError' => 'LuaSandbox/LuaSandbox.stub', 'LuaSandboxFatalError' => 'LuaSandbox/LuaSandbox.stub', 'LuaSandboxFunction' => 'LuaSandbox/LuaSandbox.stub', 'LuaSandboxMemoryError' => 'LuaSandbox/LuaSandbox.stub', 'LuaSandboxRuntimeError' => 'LuaSandbox/LuaSandbox.stub', 'LuaSandboxSyntaxError' => 'LuaSandbox/LuaSandbox.stub', 'LuaSandboxTimeoutError' => 'LuaSandbox/LuaSandbox.stub', 'Memcache' => 'memcache/memcache.stub', 'MemcachePool' => 'memcache/memcache.stub', 'Memcached' => 'memcached/memcached.stub', 'MemcachedException' => 'memcached/memcached.stub', 'MessageFormatter' => 'intl/intl.stub', 'MessagePack' => 'msgpack/msgpack.stub', 'MessagePackUnpacker' => 'msgpack/msgpack.stub', 'Mongo' => 'mongo/mongo.stub', 'MongoBinData' => 'mongo/mongo.stub', 'MongoClient' => 'mongo/mongo.stub', 'MongoCode' => 'mongo/mongo.stub', 'MongoCollection' => 'mongo/mongo.stub', 'MongoCommandCursor' => 'mongo/mongo.stub', 'MongoConnectionException' => 'mongo/mongo.stub', 'MongoCursor' => 'mongo/mongo.stub', 'MongoCursorException' => 'mongo/mongo.stub', 'MongoCursorInterface' => 'mongo/mongo.stub', 'MongoCursorTimeoutException' => 'mongo/mongo.stub', 'MongoDB' => 'mongo/mongo.stub', 'MongoDBRef' => 'mongo/mongo.stub', 'MongoDB\\BSON\\Binary' => 'mongodb/BSON/Binary.stub', 'MongoDB\\BSON\\BinaryInterface' => 'mongodb/BSON/BinaryInterface.stub', 'MongoDB\\BSON\\DBPointer' => 'mongodb/BSON/DBPointer.stub', 'MongoDB\\BSON\\Decimal128' => 'mongodb/BSON/Decimal128.stub', 'MongoDB\\BSON\\Decimal128Interface' => 'mongodb/BSON/Decimal128Interface.stub', 'MongoDB\\BSON\\Int64' => 'mongodb/BSON/Int64.stub', 'MongoDB\\BSON\\Javascript' => 'mongodb/BSON/Javascript.stub', 'MongoDB\\BSON\\JavascriptInterface' => 'mongodb/BSON/JavascriptInterface.stub', 'MongoDB\\BSON\\MaxKey' => 'mongodb/BSON/MaxKey.stub', 'MongoDB\\BSON\\MaxKeyInterface' => 'mongodb/BSON/MaxKeyInterface.stub', 'MongoDB\\BSON\\MinKey' => 'mongodb/BSON/MinKey.stub', 'MongoDB\\BSON\\MinKeyInterface' => 'mongodb/BSON/MinKeyInterface.stub', 'MongoDB\\BSON\\ObjectId' => 'mongodb/BSON/ObjectId.stub', 'MongoDB\\BSON\\ObjectIdInterface' => 'mongodb/BSON/ObjectIdInterface.stub', 'MongoDB\\BSON\\Persistable' => 'mongodb/BSON/Persistable.stub', 'MongoDB\\BSON\\Regex' => 'mongodb/BSON/Regex.stub', 'MongoDB\\BSON\\RegexInterface' => 'mongodb/BSON/RegexInterface.stub', 'MongoDB\\BSON\\Serializable' => 'mongodb/BSON/Serializable.stub', 'MongoDB\\BSON\\Symbol' => 'mongodb/BSON/Symbol.stub', 'MongoDB\\BSON\\Timestamp' => 'mongodb/BSON/Timestamp.stub', 'MongoDB\\BSON\\TimestampInterface' => 'mongodb/BSON/TimestampInterface.stub', 'MongoDB\\BSON\\Type' => 'mongodb/BSON/Type.stub', 'MongoDB\\BSON\\UTCDateTime' => 'mongodb/BSON/UTCDateTime.stub', 'MongoDB\\BSON\\UTCDateTimeInterface' => 'mongodb/BSON/UTCDateTimeInterface.stub', 'MongoDB\\BSON\\Undefined' => 'mongodb/BSON/Undefined.stub', 'MongoDB\\BSON\\Unserializable' => 'mongodb/BSON/Unserializable.stub', 'MongoDB\\Driver\\BulkWrite' => 'mongodb/BulkWrite.stub', 'MongoDB\\Driver\\ClientEncryption' => 'mongodb/ClientEncryption.stub', 'MongoDB\\Driver\\Command' => 'mongodb/Command.stub', 'MongoDB\\Driver\\Cursor' => 'mongodb/Cursor.stub', 'MongoDB\\Driver\\CursorId' => 'mongodb/CursorId.stub', 'MongoDB\\Driver\\CursorInterface' => 'mongodb/CursorInterface.stub', 'MongoDB\\Driver\\Exception\\AuthenticationException' => 'mongodb/Exception/AuthenticationException.stub', 'MongoDB\\Driver\\Exception\\BulkWriteException' => 'mongodb/Exception/BulkWriteException.stub', 'MongoDB\\Driver\\Exception\\CommandException' => 'mongodb/Exception/CommandException.stub', 'MongoDB\\Driver\\Exception\\ConnectionException' => 'mongodb/Exception/ConnectionException.stub', 'MongoDB\\Driver\\Exception\\ConnectionTimeoutException' => 'mongodb/Exception/ConnectionTimeoutException.stub', 'MongoDB\\Driver\\Exception\\EncryptionException' => 'mongodb/Exception/EncryptionException.stub', 'MongoDB\\Driver\\Exception\\Exception' => 'mongodb/Exception/Exception.stub', 'MongoDB\\Driver\\Exception\\ExecutionTimeoutException' => 'mongodb/Exception/ExecutionTimeoutException.stub', 'MongoDB\\Driver\\Exception\\InvalidArgumentException' => 'mongodb/Exception/InvalidArgumentException.stub', 'MongoDB\\Driver\\Exception\\LogicException' => 'mongodb/Exception/LogicException.stub', 'MongoDB\\Driver\\Exception\\RuntimeException' => 'mongodb/Exception/RuntimeException.stub', 'MongoDB\\Driver\\Exception\\SSLConnectionException' => 'mongodb/Exception/SSLConnectionException.stub', 'MongoDB\\Driver\\Exception\\ServerException' => 'mongodb/Exception/ServerException.stub', 'MongoDB\\Driver\\Exception\\UnexpectedValueException' => 'mongodb/Exception/UnexpectedValueException.stub', 'MongoDB\\Driver\\Exception\\WriteConcernException' => 'mongodb/Exception/WriteConcernException.stub', 'MongoDB\\Driver\\Exception\\WriteException' => 'mongodb/Exception/WriteException.stub', 'MongoDB\\Driver\\Manager' => 'mongodb/Manager.stub', 'MongoDB\\Driver\\Monitoring\\CommandFailedEvent' => 'mongodb/Monitoring/CommandFailedEvent.stub', 'MongoDB\\Driver\\Monitoring\\CommandStartedEvent' => 'mongodb/Monitoring/CommandStartedEvent.stub', 'MongoDB\\Driver\\Monitoring\\CommandSubscriber' => 'mongodb/Monitoring/CommandSubscriber.stub', 'MongoDB\\Driver\\Monitoring\\CommandSucceededEvent' => 'mongodb/Monitoring/CommandSucceededEvent.stub', 'MongoDB\\Driver\\Monitoring\\Subscriber' => 'mongodb/Monitoring/Subscriber.stub', 'MongoDB\\Driver\\Query' => 'mongodb/Query.stub', 'MongoDB\\Driver\\ReadConcern' => 'mongodb/ReadConcern.stub', 'MongoDB\\Driver\\ReadPreference' => 'mongodb/ReadPreference.stub', 'MongoDB\\Driver\\Server' => 'mongodb/Server.stub', 'MongoDB\\Driver\\ServerApi' => 'mongodb/ServerApi.stub', 'MongoDB\\Driver\\Session' => 'mongodb/Session.stub', 'MongoDB\\Driver\\WriteConcern' => 'mongodb/WriteConcern.stub', 'MongoDB\\Driver\\WriteConcernError' => 'mongodb/WriteConcernError.stub', 'MongoDB\\Driver\\WriteError' => 'mongodb/WriteError.stub', 'MongoDB\\Driver\\WriteResult' => 'mongodb/WriteResult.stub', 'MongoDate' => 'mongo/mongo.stub', 'MongoDuplicateKeyException' => 'mongo/mongo.stub', 'MongoException' => 'mongo/mongo.stub', 'MongoExecutionTimeoutException' => 'mongo/mongo.stub', 'MongoGridFS' => 'mongo/mongo.stub', 'MongoGridFSCursor' => 'mongo/mongo.stub', 'MongoGridFSException' => 'mongo/mongo.stub', 'MongoGridFSFile' => 'mongo/mongo.stub', 'MongoId' => 'mongo/mongo.stub', 'MongoInt32' => 'mongo/mongo.stub', 'MongoInt64' => 'mongo/mongo.stub', 'MongoLog' => 'mongo/mongo.stub', 'MongoMaxKey' => 'mongo/mongo.stub', 'MongoMinKey' => 'mongo/mongo.stub', 'MongoPool' => 'mongo/mongo.stub', 'MongoProtocolException' => 'mongo/mongo.stub', 'MongoRegex' => 'mongo/mongo.stub', 'MongoResultException' => 'mongo/mongo.stub', 'MongoTimestamp' => 'mongo/mongo.stub', 'MongoUpdateBatch' => 'mongo/mongo.stub', 'MongoWriteBatch' => 'mongo/mongo.stub', 'MongoWriteConcernException' => 'mongo/mongo.stub', 'Mosquitto\\Client' => 'mosquitto-php/mosquitto-php.stub', 'Mosquitto\\Exception' => 'mosquitto-php/mosquitto-php.stub', 'Mosquitto\\Message' => 'mosquitto-php/mosquitto-php.stub', 'MultipleIterator' => 'SPL/SPL_c1.stub', 'NoRewindIterator' => 'SPL/SPL.stub', 'Normalizer' => 'intl/intl.stub', 'NumberFormatter' => 'intl/intl.stub', 'OAuth' => 'oauth/oauth.stub', 'OAuthException' => 'oauth/oauth.stub', 'OAuthProvider' => 'oauth/oauth.stub', 'OCICollection' => 'oci8/oci8v3.stub', 'OCILob' => 'oci8/oci8v3.stub', 'OCI_Collection' => 'oci8/oci8.stub', 'OCI_Lob' => 'oci8/oci8.stub', 'OpenSSLAsymmetricKey' => 'openssl/openssl.stub', 'OpenSSLCertificate' => 'openssl/openssl.stub', 'OpenSSLCertificateSigningRequest' => 'openssl/openssl.stub', 'OutOfBoundsException' => 'SPL/SPL.stub', 'OutOfRangeException' => 'SPL/SPL.stub', 'OuterIterator' => 'SPL/SPL.stub', 'OverflowException' => 'SPL/SPL.stub', 'OwsrequestObj' => 'mapscript/mapscript.stub', 'PDFlib' => 'pdflib/PDFlib.stub', 'PDO' => 'PDO/PDO.stub', 'PDOException' => 'PDO/PDO.stub', 'PDORow' => 'PDO/PDO.stub', 'PDOStatement' => 'PDO/PDO.stub', 'PSpell\\Config' => 'pspell/pspell_c.stub', 'PSpell\\Dictionary' => 'pspell/pspell_c.stub', 'ParentIterator' => 'SPL/SPL.stub', 'Parle\\ErrorInfo' => 'Parle/ErrorInfo.stub', 'Parle\\Lexer' => 'Parle/Lexer.stub', 'Parle\\LexerException' => 'Parle/LexerException.stub', 'Parle\\Parser' => 'Parle/Parser.stub', 'Parle\\ParserException' => 'Parle/ParserException.stub', 'Parle\\RLexer' => 'Parle/RLexer.stub', 'Parle\\RParser' => 'Parle/RParser.stub', 'Parle\\Stack' => 'Parle/Stack.stub', 'Parle\\Token' => 'Parle/Token.stub', 'ParseError' => 'Core/Core_c.stub', 'PgSql\\Connection' => 'pgsql/pgsql_c.stub', 'PgSql\\Lob' => 'pgsql/pgsql_c.stub', 'PgSql\\Result' => 'pgsql/pgsql_c.stub', 'Phar' => 'Phar/Phar.stub', 'PharData' => 'Phar/Phar.stub', 'PharException' => 'Phar/Phar.stub', 'PharFileInfo' => 'Phar/Phar.stub', 'PhpToken' => 'tokenizer/PhpToken.stub', 'Pool' => 'pthreads/pthreads.stub', 'RRDCreator' => 'rrd/rrd.stub', 'RRDGraph' => 'rrd/rrd.stub', 'RRDUpdater' => 'rrd/rrd.stub', 'Random\\BrokenRandomEngineError' => 'random/random.stub', 'Random\\CryptoSafeEngine' => 'random/random.stub', 'Random\\Engine' => 'random/random.stub', 'Random\\Engine\\Mt19937' => 'random/random.stub', 'Random\\Engine\\PcgOneseq128XslRr64' => 'random/random.stub', 'Random\\Engine\\Secure' => 'random/random.stub', 'Random\\Engine\\Xoshiro256StarStar' => 'random/random.stub', 'Random\\RandomError' => 'random/random.stub', 'Random\\RandomException' => 'random/random.stub', 'Random\\Randomizer' => 'random/random.stub', 'RangeException' => 'SPL/SPL.stub', 'RarArchive' => 'rar/rar.stub', 'RarEntry' => 'rar/rar.stub', 'RarException' => 'rar/rar.stub', 'RdKafka' => 'rdkafka/RdKafka.stub', 'RdKafka\\Conf' => 'rdkafka/RdKafka/Conf.stub', 'RdKafka\\Consumer' => 'rdkafka/RdKafka/Consumer.stub', 'RdKafka\\ConsumerTopic' => 'rdkafka/RdKafka/ConsumerTopic.stub', 'RdKafka\\Exception' => 'rdkafka/RdKafka/Exception.stub', 'RdKafka\\KafkaConsumer' => 'rdkafka/RdKafka/KafkaConsumer.stub', 'RdKafka\\KafkaConsumerTopic' => 'rdkafka/RdKafka/KafkaConsumerTopic.stub', 'RdKafka\\KafkaErrorException' => 'rdkafka/RdKafka/KafkaErrorException.stub', 'RdKafka\\Message' => 'rdkafka/RdKafka/Message.stub', 'RdKafka\\Metadata' => 'rdkafka/RdKafka/Metadata.stub', 'RdKafka\\Metadata\\Broker' => 'rdkafka/RdKafka/Metadata/Broker.stub', 'RdKafka\\Metadata\\Collection' => 'rdkafka/RdKafka/Metadata/Collection.stub', 'RdKafka\\Metadata\\Partition' => 'rdkafka/RdKafka/Metadata/Partition.stub', 'RdKafka\\Metadata\\Topic' => 'rdkafka/RdKafka/Metadata/Topic.stub', 'RdKafka\\Producer' => 'rdkafka/RdKafka/Producer.stub', 'RdKafka\\ProducerTopic' => 'rdkafka/RdKafka/ProducerTopic.stub', 'RdKafka\\Queue' => 'rdkafka/RdKafka/Queue.stub', 'RdKafka\\Topic' => 'rdkafka/RdKafka/Topic.stub', 'RdKafka\\TopicConf' => 'rdkafka/RdKafka/TopicConf.stub', 'RdKafka\\TopicPartition' => 'rdkafka/RdKafka/TopicPartition.stub', 'RecursiveArrayIterator' => 'SPL/SPL.stub', 'RecursiveCachingIterator' => 'SPL/SPL.stub', 'RecursiveCallbackFilterIterator' => 'SPL/SPL.stub', 'RecursiveDirectoryIterator' => 'SPL/SPL_c1.stub', 'RecursiveFilterIterator' => 'SPL/SPL.stub', 'RecursiveIterator' => 'SPL/SPL.stub', 'RecursiveIteratorIterator' => 'SPL/SPL.stub', 'RecursiveRegexIterator' => 'SPL/SPL.stub', 'RecursiveTreeIterator' => 'SPL/SPL.stub', 'Redis' => 'redis/Redis.stub', 'RedisArray' => 'redis/RedisArray.stub', 'RedisCluster' => 'redis/RedisCluster.stub', 'RedisClusterException' => 'redis/RedisCluster.stub', 'RedisException' => 'redis/Redis.stub', 'RedisSentinel' => 'redis/RedisSentinel.stub', 'Reflection' => 'Reflection/Reflection.stub', 'ReflectionAttribute' => 'Reflection/ReflectionAttribute.stub', 'ReflectionClass' => 'Reflection/ReflectionClass.stub', 'ReflectionClassConstant' => 'Reflection/ReflectionClassConstant.stub', 'ReflectionEnum' => 'Reflection/ReflectionEnum.stub', 'ReflectionEnumBackedCase' => 'Reflection/ReflectionEnumBackedCase.stub', 'ReflectionEnumPureCase' => 'Reflection/ReflectionEnumPureCase.stub', 'ReflectionEnumUnitCase' => 'Reflection/ReflectionEnumUnitCase.stub', 'ReflectionException' => 'Reflection/ReflectionException.stub', 'ReflectionExtension' => 'Reflection/ReflectionExtension.stub', 'ReflectionFiber' => 'Reflection/ReflectionFiber.stub', 'ReflectionFunction' => 'Reflection/ReflectionFunction.stub', 'ReflectionFunctionAbstract' => 'Reflection/ReflectionFunctionAbstract.stub', 'ReflectionGenerator' => 'Reflection/ReflectionGenerator.stub', 'ReflectionIntersectionType' => 'Reflection/ReflectionIntersectionType.stub', 'ReflectionMethod' => 'Reflection/ReflectionMethod.stub', 'ReflectionNamedType' => 'Reflection/ReflectionNamedType.stub', 'ReflectionObject' => 'Reflection/ReflectionObject.stub', 'ReflectionParameter' => 'Reflection/ReflectionParameter.stub', 'ReflectionProperty' => 'Reflection/ReflectionProperty.stub', 'ReflectionReference' => 'Reflection/ReflectionReference.stub', 'ReflectionType' => 'Reflection/ReflectionType.stub', 'ReflectionUnionType' => 'Reflection/ReflectionUnionType.stub', 'ReflectionZendExtension' => 'Reflection/ReflectionZendExtension.stub', 'Reflector' => 'Reflection/Reflector.stub', 'RegexIterator' => 'SPL/SPL.stub', 'Relay\\Event' => 'relay/Event.stub', 'Relay\\Exception' => 'relay/Exception.stub', 'Relay\\KeyType' => 'relay/KeyType.stub', 'Relay\\Relay' => 'relay/Relay.stub', 'Relay\\Sentinel' => 'relay/Sentinel.stub', 'ResourceBundle' => 'intl/intl.stub', 'ReturnTypeWillChange' => 'Core/Core_c.stub', 'RuntimeException' => 'SPL/SPL.stub', 'SNMP' => 'snmp/snmp.stub', 'SNMPException' => 'snmp/snmp.stub', 'SQLite3' => 'sqlite3/sqlite3.stub', 'SQLite3Result' => 'sqlite3/sqlite3.stub', 'SQLite3Stmt' => 'sqlite3/sqlite3.stub', 'SQLiteDatabase' => 'SQLite/SQLite.stub', 'SQLiteException' => 'SQLite/SQLite.stub', 'SQLiteResult' => 'SQLite/SQLite.stub', 'SQLiteUnbuffered' => 'SQLite/SQLite.stub', 'SVM' => 'svm/SVM.stub', 'SVMModel' => 'svm/SVMModel.stub', 'SWFAction' => 'ming/ming.stub', 'SWFBitmap' => 'ming/ming.stub', 'SWFButton' => 'ming/ming.stub', 'SWFDisplayItem' => 'ming/ming.stub', 'SWFFill' => 'ming/ming.stub', 'SWFFont' => 'ming/ming.stub', 'SWFFontChar' => 'ming/ming.stub', 'SWFGradient' => 'ming/ming.stub', 'SWFMorph' => 'ming/ming.stub', 'SWFMovie' => 'ming/ming.stub', 'SWFShape' => 'ming/ming.stub', 'SWFSound' => 'ming/ming.stub', 'SWFSoundInstance' => 'ming/ming.stub', 'SWFSprite' => 'ming/ming.stub', 'SWFText' => 'ming/ming.stub', 'SWFTextField' => 'ming/ming.stub', 'SWFVideoStream' => 'ming/ming.stub', 'Saxon\\SaxonProcessor' => 'SaxonC/SaxonC.stub', 'Saxon\\SchemaValidator' => 'SaxonC/SaxonC.stub', 'Saxon\\XPathProcessor' => 'SaxonC/SaxonC.stub', 'Saxon\\XQueryProcessor' => 'SaxonC/SaxonC.stub', 'Saxon\\XdmAtomicValue' => 'SaxonC/SaxonC.stub', 'Saxon\\XdmItem' => 'SaxonC/SaxonC.stub', 'Saxon\\XdmNode' => 'SaxonC/SaxonC.stub', 'Saxon\\XdmValue' => 'SaxonC/SaxonC.stub', 'Saxon\\Xslt30Processor' => 'SaxonC/SaxonC.stub', 'Saxon\\XsltProcessor' => 'SaxonC/SaxonC.stub', 'SeekableIterator' => 'SPL/SPL.stub', 'SensitiveParameter' => 'Core/Core_c.stub', 'SensitiveParameterValue' => 'Core/Core_c.stub', 'Serializable' => 'Core/Core_c.stub', 'SessionHandler' => 'session/SessionHandler.stub', 'SessionHandlerInterface' => 'session/SessionHandler.stub', 'SessionIdInterface' => 'session/SessionHandler.stub', 'SessionUpdateTimestampHandlerInterface' => 'session/SessionHandler.stub', 'Shmop' => 'shmop/shmop.stub', 'SimpleKafkaClient' => 'simple_kafka_client/SimpleKafkaClient.stub', 'SimpleKafkaClient\\Configuration' => 'simple_kafka_client/SimpleKafkaClient/Configuration.stub', 'SimpleKafkaClient\\Consumer' => 'simple_kafka_client/SimpleKafkaClient/Consumer.stub', 'SimpleKafkaClient\\ConsumerTopic' => 'simple_kafka_client/SimpleKafkaClient/Topic.stub', 'SimpleKafkaClient\\Exception' => 'simple_kafka_client/SimpleKafkaClient/Exception.stub', 'SimpleKafkaClient\\KafkaErrorException' => 'simple_kafka_client/SimpleKafkaClient/KafkaErrorException.stub', 'SimpleKafkaClient\\Message' => 'simple_kafka_client/SimpleKafkaClient/Message.stub', 'SimpleKafkaClient\\Metadata' => 'simple_kafka_client/SimpleKafkaClient/Metadata.stub', 'SimpleKafkaClient\\Metadata\\Broker' => 'simple_kafka_client/SimpleKafkaClient/Metadata/Broker.stub', 'SimpleKafkaClient\\Metadata\\Collection' => 'simple_kafka_client/SimpleKafkaClient/Metadata/Collection.stub', 'SimpleKafkaClient\\Metadata\\Partition' => 'simple_kafka_client/SimpleKafkaClient/Metadata/Partition.stub', 'SimpleKafkaClient\\Metadata\\Topic' => 'simple_kafka_client/SimpleKafkaClient/Metadata/Topic.stub', 'SimpleKafkaClient\\Producer' => 'simple_kafka_client/SimpleKafkaClient/Producer.stub', 'SimpleKafkaClient\\ProducerTopic' => 'simple_kafka_client/SimpleKafkaClient/Topic.stub', 'SimpleKafkaClient\\Topic' => 'simple_kafka_client/SimpleKafkaClient/Topic.stub', 'SimpleKafkaClient\\TopicPartition' => 'simple_kafka_client/SimpleKafkaClient/TopicPartition.stub', 'SimpleXMLElement' => 'SimpleXML/SimpleXML.stub', 'SimpleXMLIterator' => 'SimpleXML/SimpleXML.stub', 'SoapClient' => 'soap/soap.stub', 'SoapFault' => 'soap/soap.stub', 'SoapHeader' => 'soap/soap.stub', 'SoapParam' => 'soap/soap.stub', 'SoapServer' => 'soap/soap.stub', 'SoapVar' => 'soap/soap.stub', 'Socket' => 'sockets/sockets.stub', 'SodiumException' => 'sodium/sodium.stub', 'SolrClient' => 'solr/SolrClient.stub', 'SolrClientException' => 'solr/Exceptions/SolrClientException.stub', 'SolrCollapseFunction' => 'solr/Queries/SolrCollapseFunction.stub', 'SolrDisMaxQuery' => 'solr/Queries/SolrDisMaxQuery.stub', 'SolrDocument' => 'solr/Documents/SolrDocument.stub', 'SolrDocumentField' => 'solr/Documents/SolrDocumentField.stub', 'SolrException' => 'solr/Exceptions/SolrException.stub', 'SolrGenericResponse' => 'solr/Responses/SolrGenericResponse.stub', 'SolrIllegalArgumentException' => 'solr/Exceptions/SolrIllegalArgumentException.stub', 'SolrIllegalOperationException' => 'solr/Exceptions/SolrIllegalOperationException.stub', 'SolrInputDocument' => 'solr/Documents/SolrInputDocument.stub', 'SolrMissingMandatoryParameterException' => 'solr/Exceptions/SolrMissingMandatoryParameterException.stub', 'SolrModifiableParams' => 'solr/Queries/SolrModifiableParams.stub', 'SolrObject' => 'solr/Utils/SolrObject.stub', 'SolrParams' => 'solr/Queries/SolrParams.stub', 'SolrPingResponse' => 'solr/Responses/SolrPingResponse.stub', 'SolrQuery' => 'solr/Queries/SolrQuery.stub', 'SolrQueryResponse' => 'solr/Responses/SolrQueryResponse.stub', 'SolrResponse' => 'solr/Responses/SolrResponse.stub', 'SolrServerException' => 'solr/Exceptions/SolrServerException.stub', 'SolrUpdateResponse' => 'solr/Responses/SolrUpdateResponse.stub', 'SolrUtils' => 'solr/Utils/SolrUtils.stub', 'SplBool' => 'SplType/SplType.stub', 'SplDoublyLinkedList' => 'SPL/SPL_c1.stub', 'SplEnum' => 'SplType/SplType.stub', 'SplFileInfo' => 'SPL/SPL_c1.stub', 'SplFileObject' => 'SPL/SPL_c1.stub', 'SplFixedArray' => 'SPL/SPL_c1.stub', 'SplFloat' => 'SplType/SplType.stub', 'SplHeap' => 'SPL/SPL_c1.stub', 'SplInt' => 'SplType/SplType.stub', 'SplMaxHeap' => 'SPL/SPL_c1.stub', 'SplMinHeap' => 'SPL/SPL_c1.stub', 'SplObjectStorage' => 'SPL/SPL_c1.stub', 'SplObserver' => 'SPL/SPL_c1.stub', 'SplPriorityQueue' => 'SPL/SPL_c1.stub', 'SplQueue' => 'SPL/SPL_c1.stub', 'SplStack' => 'SPL/SPL_c1.stub', 'SplString' => 'SplType/SplType.stub', 'SplSubject' => 'SPL/SPL_c1.stub', 'SplTempFileObject' => 'SPL/SPL_c1.stub', 'SplType' => 'SplType/SplType.stub', 'Spoofchecker' => 'intl/intl.stub', 'Stomp' => 'stomp/stomp.stub', 'StompException' => 'stomp/stomp.stub', 'StompFrame' => 'stomp/stomp.stub', 'Stringable' => 'Core/Core_c.stub', 'Svn' => 'svn/svn.stub', 'SvnNode' => 'svn/svn.stub', 'SvnWc' => 'svn/svn.stub', 'SvnWcSchedule' => 'svn/svn.stub', 'Swoole\\Atomic' => 'swoole/Swoole/Atomic.stub', 'Swoole\\Atomic\\Long' => 'swoole/Swoole/Atomic/Long.stub', 'Swoole\\Client' => 'swoole/Swoole/Client.stub', 'Swoole\\Client\\Exception' => 'swoole/Swoole/Client/Exception.stub', 'Swoole\\Connection\\Iterator' => 'swoole/Swoole/Connection/Iterator.stub', 'Swoole\\Coroutine' => 'swoole/Swoole/Coroutine.stub', 'Swoole\\Coroutine\\Channel' => 'swoole/Swoole/Coroutine/Channel.stub', 'Swoole\\Coroutine\\Client' => 'swoole/Swoole/Coroutine/Client.stub', 'Swoole\\Coroutine\\Context' => 'swoole/Swoole/Coroutine/Context.stub', 'Swoole\\Coroutine\\Curl\\Exception' => 'swoole/Swoole/Coroutine/Curl/Exception.stub', 'Swoole\\Coroutine\\Http2\\Client' => 'swoole/Swoole/Coroutine/Http2/Client.stub', 'Swoole\\Coroutine\\Http2\\Client\\Exception' => 'swoole/Swoole/Coroutine/Http2/Client/Exception.stub', 'Swoole\\Coroutine\\Http\\Client' => 'swoole/Swoole/Coroutine/Http/Client.stub', 'Swoole\\Coroutine\\Http\\Client\\Exception' => 'swoole/Swoole/Coroutine/Http/Client/Exception.stub', 'Swoole\\Coroutine\\Http\\Server' => 'swoole/Swoole/Coroutine/Http/Server.stub', 'Swoole\\Coroutine\\Iterator' => 'swoole/Swoole/Coroutine/Iterator.stub', 'Swoole\\Coroutine\\MySQL' => 'swoole/Swoole/Coroutine/MySQL.stub', 'Swoole\\Coroutine\\MySQL\\Exception' => 'swoole/Swoole/Coroutine/MySQL/Exception.stub', 'Swoole\\Coroutine\\MySQL\\Statement' => 'swoole/Swoole/Coroutine/MySQL/Statement.stub', 'Swoole\\Coroutine\\Redis' => 'swoole/Swoole/Coroutine/Redis.stub', 'Swoole\\Coroutine\\Scheduler' => 'swoole/Swoole/Coroutine/Scheduler.stub', 'Swoole\\Coroutine\\Socket' => 'swoole/Swoole/Coroutine/Socket.stub', 'Swoole\\Coroutine\\Socket\\Exception' => 'swoole/Swoole/Coroutine/Socket/Exception.stub', 'Swoole\\Coroutine\\System' => 'swoole/Swoole/Coroutine/System.stub', 'Swoole\\Error' => 'swoole/Swoole/Error.stub', 'Swoole\\Event' => 'swoole/Swoole/Event.stub', 'Swoole\\Exception' => 'swoole/Swoole/Exception.stub', 'Swoole\\ExitException' => 'swoole/Swoole/ExitException.stub', 'Swoole\\Http2\\Request' => 'swoole/Swoole/Http2/Request.stub', 'Swoole\\Http2\\Response' => 'swoole/Swoole/Http2/Response.stub', 'Swoole\\Http\\Request' => 'swoole/Swoole/Http/Request.stub', 'Swoole\\Http\\Response' => 'swoole/Swoole/Http/Response.stub', 'Swoole\\Http\\Server' => 'swoole/Swoole/Http/Server.stub', 'Swoole\\Lock' => 'swoole/Swoole/Lock.stub', 'Swoole\\Process' => 'swoole/Swoole/Process.stub', 'Swoole\\Process\\Pool' => 'swoole/Swoole/Process/Pool.stub', 'Swoole\\Redis\\Server' => 'swoole/Swoole/Redis/Server.stub', 'Swoole\\Runtime' => 'swoole/Swoole/Runtime.stub', 'Swoole\\Server' => 'swoole/Swoole/Server.stub', 'Swoole\\Server\\Event' => 'swoole/Swoole/Server/Event.stub', 'Swoole\\Server\\Packet' => 'swoole/Swoole/Server/Packet.stub', 'Swoole\\Server\\PipeMessage' => 'swoole/Swoole/Server/PipeMessage.stub', 'Swoole\\Server\\Port' => 'swoole/Swoole/Server/Port.stub', 'Swoole\\Server\\StatusInfo' => 'swoole/Swoole/Server/StatusInfo.stub', 'Swoole\\Server\\Task' => 'swoole/Swoole/Server/Task.stub', 'Swoole\\Server\\TaskResult' => 'swoole/Swoole/Server/TaskResult.stub', 'Swoole\\Table' => 'swoole/Swoole/Table.stub', 'Swoole\\Timer' => 'swoole/Swoole/Timer.stub', 'Swoole\\Timer\\Iterator' => 'swoole/Swoole/Timer/Iterator.stub', 'Swoole\\WebSocket\\CloseFrame' => 'swoole/Swoole/WebSocket/CloseFrame.stub', 'Swoole\\WebSocket\\Frame' => 'swoole/Swoole/WebSocket/Frame.stub', 'Swoole\\WebSocket\\Server' => 'swoole/Swoole/WebSocket/Server.stub', 'SyncEvent' => 'sync/sync.stub', 'SyncMutex' => 'sync/sync.stub', 'SyncReaderWriter' => 'sync/sync.stub', 'SyncSemaphore' => 'sync/sync.stub', 'SyncSharedMemory' => 'sync/sync.stub', 'SysvMessageQueue' => 'sysvmsg/sysvmsg.stub', 'SysvSemaphore' => 'sysvsem/sysvsem.stub', 'SysvSharedMemory' => 'sysvshm/sysvshm.stub', 'Thread' => 'pthreads/pthreads.stub', 'Threaded' => 'pthreads/pthreads.stub', 'Throwable' => 'Core/Core_c.stub', 'Transliterator' => 'intl/intl.stub', 'Traversable' => 'Core/Core_c.stub', 'TypeError' => 'Core/Core_c.stub', 'UConverter' => 'intl/intl.stub', 'UV' => 'uv/UV.stub', 'UnderflowException' => 'SPL/SPL.stub', 'UnexpectedValueException' => 'SPL/SPL.stub', 'UnhandledMatchError' => 'Core/Core_c.stub', 'UnitEnum' => 'Core/Core_c.stub', 'V8Js' => 'v8js/v8js.stub', 'V8JsMemoryLimitException' => 'v8js/v8js.stub', 'V8JsScriptException' => 'v8js/v8js.stub', 'V8JsTimeLimitException' => 'v8js/v8js.stub', 'VARIANT' => 'com_dotnet/com_dotnet.stub', 'ValueError' => 'Core/Core_c.stub', 'Volatile' => 'pthreads/pthreads.stub', 'Vtiful\\Kernel\\Excel' => 'xlswriter/xlswriter.stub', 'Vtiful\\Kernel\\Format' => 'xlswriter/xlswriter.stub', 'WeakMap' => 'Core/Core_c.stub', 'WeakReference' => 'Core/Core_c.stub', 'Worker' => 'pthreads/pthreads.stub', 'XMLParser' => 'xml/xml.stub', 'XMLReader' => 'xmlreader/xmlreader.stub', 'XMLWriter' => 'xmlwriter/xmlwriter.stub', 'XSLTProcessor' => 'xsl/xsl.stub', 'XXTEA' => 'xxtea/xxtea.stub', 'Yaf\\Action_Abstract' => 'yaf/yaf_namespace.stub', 'Yaf\\Application' => 'yaf/yaf_namespace.stub', 'Yaf\\Bootstrap_Abstract' => 'yaf/yaf_namespace.stub', 'Yaf\\Config\\Ini' => 'yaf/yaf_namespace.stub', 'Yaf\\Config\\Simple' => 'yaf/yaf_namespace.stub', 'Yaf\\Config_Abstract' => 'yaf/yaf_namespace.stub', 'Yaf\\Controller_Abstract' => 'yaf/yaf_namespace.stub', 'Yaf\\Dispatcher' => 'yaf/yaf_namespace.stub', 'Yaf\\Exception' => 'yaf/yaf_namespace.stub', 'Yaf\\Exception\\DispatchFailed' => 'yaf/yaf_namespace.stub', 'Yaf\\Exception\\LoadFailed' => 'yaf/yaf_namespace.stub', 'Yaf\\Exception\\LoadFailed\\Action' => 'yaf/yaf_namespace.stub', 'Yaf\\Exception\\LoadFailed\\Controller' => 'yaf/yaf_namespace.stub', 'Yaf\\Exception\\LoadFailed\\Module' => 'yaf/yaf_namespace.stub', 'Yaf\\Exception\\LoadFailed\\View' => 'yaf/yaf_namespace.stub', 'Yaf\\Exception\\RouterFailed' => 'yaf/yaf_namespace.stub', 'Yaf\\Exception\\StartupError' => 'yaf/yaf_namespace.stub', 'Yaf\\Exception\\TypeError' => 'yaf/yaf_namespace.stub', 'Yaf\\Loader' => 'yaf/yaf_namespace.stub', 'Yaf\\Plugin_Abstract' => 'yaf/yaf_namespace.stub', 'Yaf\\Registry' => 'yaf/yaf_namespace.stub', 'Yaf\\Request\\Http' => 'yaf/yaf_namespace.stub', 'Yaf\\Request\\Simple' => 'yaf/yaf_namespace.stub', 'Yaf\\Request_Abstract' => 'yaf/yaf_namespace.stub', 'Yaf\\Response\\Cli' => 'yaf/yaf_namespace.stub', 'Yaf\\Response\\Http' => 'yaf/yaf_namespace.stub', 'Yaf\\Response_Abstract' => 'yaf/yaf_namespace.stub', 'Yaf\\Route\\Map' => 'yaf/yaf_namespace.stub', 'Yaf\\Route\\Regex' => 'yaf/yaf_namespace.stub', 'Yaf\\Route\\Rewrite' => 'yaf/yaf_namespace.stub', 'Yaf\\Route\\Simple' => 'yaf/yaf_namespace.stub', 'Yaf\\Route\\Supervar' => 'yaf/yaf_namespace.stub', 'Yaf\\Route_Interface' => 'yaf/yaf_namespace.stub', 'Yaf\\Route_Static' => 'yaf/yaf_namespace.stub', 'Yaf\\Router' => 'yaf/yaf_namespace.stub', 'Yaf\\Session' => 'yaf/yaf_namespace.stub', 'Yaf\\View\\Simple' => 'yaf/yaf_namespace.stub', 'Yaf\\View_Interface' => 'yaf/yaf_namespace.stub', 'Yaf_Action_Abstract' => 'yaf/yaf.stub', 'Yaf_Application' => 'yaf/yaf.stub', 'Yaf_Bootstrap_Abstract' => 'yaf/yaf.stub', 'Yaf_Config_Abstract' => 'yaf/yaf.stub', 'Yaf_Config_Ini' => 'yaf/yaf.stub', 'Yaf_Config_Simple' => 'yaf/yaf.stub', 'Yaf_Controller_Abstract' => 'yaf/yaf.stub', 'Yaf_Dispatcher' => 'yaf/yaf.stub', 'Yaf_Exception' => 'yaf/yaf.stub', 'Yaf_Exception_DispatchFailed' => 'yaf/yaf.stub', 'Yaf_Exception_LoadFailed' => 'yaf/yaf.stub', 'Yaf_Exception_LoadFailed_Action' => 'yaf/yaf.stub', 'Yaf_Exception_LoadFailed_Controller' => 'yaf/yaf.stub', 'Yaf_Exception_LoadFailed_Module' => 'yaf/yaf.stub', 'Yaf_Exception_LoadFailed_View' => 'yaf/yaf.stub', 'Yaf_Exception_RouterFailed' => 'yaf/yaf.stub', 'Yaf_Exception_StartupError' => 'yaf/yaf.stub', 'Yaf_Exception_TypeError' => 'yaf/yaf.stub', 'Yaf_Loader' => 'yaf/yaf.stub', 'Yaf_Plugin_Abstract' => 'yaf/yaf.stub', 'Yaf_Registry' => 'yaf/yaf.stub', 'Yaf_Request_Abstract' => 'yaf/yaf.stub', 'Yaf_Request_Http' => 'yaf/yaf.stub', 'Yaf_Request_Simple' => 'yaf/yaf.stub', 'Yaf_Response_Abstract' => 'yaf/yaf.stub', 'Yaf_Response_Cli' => 'yaf/yaf.stub', 'Yaf_Response_Http' => 'yaf/yaf.stub', 'Yaf_Route_Interface' => 'yaf/yaf.stub', 'Yaf_Route_Map' => 'yaf/yaf.stub', 'Yaf_Route_Regex' => 'yaf/yaf.stub', 'Yaf_Route_Rewrite' => 'yaf/yaf.stub', 'Yaf_Route_Simple' => 'yaf/yaf.stub', 'Yaf_Route_Static' => 'yaf/yaf.stub', 'Yaf_Route_Supervar' => 'yaf/yaf.stub', 'Yaf_Router' => 'yaf/yaf.stub', 'Yaf_Session' => 'yaf/yaf.stub', 'Yaf_View_Interface' => 'yaf/yaf.stub', 'Yaf_View_Simple' => 'yaf/yaf.stub', 'Yar_Client' => 'yar/yar.stub', 'Yar_Client_Exception' => 'yar/yar.stub', 'Yar_Client_Packager_Exception' => 'yar/yar.stub', 'Yar_Client_Protocol_Exception' => 'yar/yar.stub', 'Yar_Client_Transport_Exception' => 'yar/yar.stub', 'Yar_Concurrent_Client' => 'yar/yar.stub', 'Yar_Server' => 'yar/yar.stub', 'Yar_Server_Exception' => 'yar/yar.stub', 'Yar_Server_Output_Exception' => 'yar/yar.stub', 'Yar_Server_Packager_Exception' => 'yar/yar.stub', 'Yar_Server_Protocol_Exception' => 'yar/yar.stub', 'Yar_Server_Request_Exception' => 'yar/yar.stub', 'ZMQ' => 'zmq/zmq.stub', 'ZMQContext' => 'zmq/zmq.stub', 'ZMQContextException' => 'zmq/zmq.stub', 'ZMQDevice' => 'zmq/zmq.stub', 'ZMQDeviceException' => 'zmq/zmq.stub', 'ZMQException' => 'zmq/zmq.stub', 'ZMQPoll' => 'zmq/zmq.stub', 'ZMQPollException' => 'zmq/zmq.stub', 'ZMQSocket' => 'zmq/zmq.stub', 'ZMQSocketException' => 'zmq/zmq.stub', 'ZendAPI_Job' => 'zend/zend.stub', 'ZendAPI_Queue' => 'zend/zend.stub', 'ZipArchive' => 'zip/zip.stub', 'Zookeeper' => 'zookeeper/zookeeper.stub', 'ZookeeperAuthenticationException' => 'zookeeper/zookeeper.stub', 'ZookeeperConnectionException' => 'zookeeper/zookeeper.stub', 'ZookeeperException' => 'zookeeper/zookeeper.stub', 'ZookeeperMarshallingException' => 'zookeeper/zookeeper.stub', 'ZookeeperNoNodeException' => 'zookeeper/zookeeper.stub', 'ZookeeperOperationTimeoutException' => 'zookeeper/zookeeper.stub', 'ZookeeperSessionException' => 'zookeeper/zookeeper.stub', '__PHP_Incomplete_Class' => 'standard/standard_0.stub', '___PHPSTORM_HELPERS\\PS_UNRESERVE_PREFIX_static' => 'standard/_types.stub', '___PHPSTORM_HELPERS\\PS_UNRESERVE_PREFIX_this' => 'standard/_types.stub', '___PHPSTORM_HELPERS\\object' => 'standard/_types.stub', 'ast\\Metadata' => 'ast/ast.stub', 'ast\\Node' => 'ast/ast.stub', 'classObj' => 'mapscript/mapscript.stub', 'clusterObj' => 'mapscript/mapscript.stub', 'colorObj' => 'mapscript/mapscript.stub', 'com_exception' => 'com_dotnet/com_dotnet.stub', 'errorObj' => 'mapscript/mapscript.stub', 'ffmpeg_animated_gif' => 'ffmpeg/ffmpeg.stub', 'ffmpeg_frame' => 'ffmpeg/ffmpeg.stub', 'ffmpeg_movie' => 'ffmpeg/ffmpeg.stub', 'finfo' => 'fileinfo/fileinfo.stub', 'gnupg' => 'gnupg/gnupg.stub', 'gnupg_keylistiterator' => 'gnupg/gnupg.stub', 'gridObj' => 'mapscript/mapscript.stub', 'hashTableObj' => 'mapscript/mapscript.stub', 'http\\Client' => 'http/http3.stub', 'http\\Client\\Curl\\User' => 'http/http3.stub', 'http\\Client\\Request' => 'http/http3.stub', 'http\\Client\\Response' => 'http/http3.stub', 'http\\Cookie' => 'http/http3.stub', 'http\\Encoding\\Stream' => 'http/http3.stub', 'http\\Encoding\\Stream\\Debrotli' => 'http/http3.stub', 'http\\Encoding\\Stream\\Dechunk' => 'http/http3.stub', 'http\\Encoding\\Stream\\Deflate' => 'http/http3.stub', 'http\\Encoding\\Stream\\Enbrotli' => 'http/http3.stub', 'http\\Encoding\\Stream\\Inflate' => 'http/http3.stub', 'http\\Env' => 'http/http3.stub', 'http\\Env\\Request' => 'http/http3.stub', 'http\\Env\\Response' => 'http/http3.stub', 'http\\Env\\Url' => 'http/http3.stub', 'http\\Exception' => 'http/http3.stub', 'http\\Exception\\BadConversionException' => 'http/http3.stub', 'http\\Exception\\BadHeaderException' => 'http/http3.stub', 'http\\Exception\\BadMessageException' => 'http/http3.stub', 'http\\Exception\\BadMethodCallException' => 'http/http3.stub', 'http\\Exception\\BadQueryStringException' => 'http/http3.stub', 'http\\Exception\\BadUrlException' => 'http/http3.stub', 'http\\Exception\\InvalidArgumentException' => 'http/http3.stub', 'http\\Exception\\RuntimeException' => 'http/http3.stub', 'http\\Exception\\UnexpectedValueException' => 'http/http3.stub', 'http\\Header' => 'http/http3.stub', 'http\\Header\\Parser' => 'http/http3.stub', 'http\\Message' => 'http/http3.stub', 'http\\Message\\Body' => 'http/http3.stub', 'http\\Message\\Parser' => 'http/http3.stub', 'http\\Params' => 'http/http3.stub', 'http\\QueryString' => 'http/http3.stub', 'http\\Url' => 'http/http3.stub', 'imageObj' => 'mapscript/mapscript.stub', 'iterable' => 'Core/Core_c.stub', 'java' => 'zend/zend.stub', 'labelObj' => 'mapscript/mapscript.stub', 'labelcacheMemberObj' => 'mapscript/mapscript.stub', 'labelcacheObj' => 'mapscript/mapscript.stub', 'layerObj' => 'mapscript/mapscript.stub', 'legendObj' => 'mapscript/mapscript.stub', 'lineObj' => 'mapscript/mapscript.stub', 'mapObj' => 'mapscript/mapscript.stub', 'mysql_xdevapi\\BaseResult' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\Collection' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\CollectionAdd' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\CollectionFind' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\CollectionModify' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\CollectionRemove' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\ColumnResult' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\CrudOperationBindable' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\CrudOperationLimitable' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\CrudOperationSkippable' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\CrudOperationSortable' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\DatabaseObject' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\DocResult' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\Exception' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\Executable' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\ExecutionStatus' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\Expression' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\Result' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\RowResult' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\Schema' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\SchemaObject' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\Session' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\SqlStatement' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\SqlStatementResult' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\Statement' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\Table' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\TableDelete' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\TableInsert' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\TableSelect' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\TableUpdate' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\Warning' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\XSession' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysqli' => 'mysqli/mysqli.stub', 'mysqli_driver' => 'mysqli/mysqli.stub', 'mysqli_result' => 'mysqli/mysqli.stub', 'mysqli_sql_exception' => 'mysqli/mysqli.stub', 'mysqli_stmt' => 'mysqli/mysqli.stub', 'mysqli_warning' => 'mysqli/mysqli.stub', 'newrelic\\DistributedTracePayload' => 'newrelic/newrelic.stub', 'outputformatObj' => 'mapscript/mapscript.stub', 'parallel\\Channel' => 'parallel/parallel/Channel.stub', 'parallel\\Channel\\Error' => 'parallel/parallel/Channel/Error.stub', 'parallel\\Channel\\Error\\Closed' => 'parallel/parallel/Channel/Error/Closed.stub', 'parallel\\Channel\\Error\\Existence' => 'parallel/parallel/Channel/Error/Existence.stub', 'parallel\\Channel\\Error\\IllegalValue' => 'parallel/parallel/Channel/Error/IllegalValue.stub', 'parallel\\Error' => 'parallel/parallel/Error.stub', 'parallel\\Events' => 'parallel/parallel/Events.stub', 'parallel\\Events\\Error' => 'parallel/parallel/Events/Error.stub', 'parallel\\Events\\Error\\Existence' => 'parallel/parallel/Events/Error/Existence.stub', 'parallel\\Events\\Error\\Timeout' => 'parallel/parallel/Events/Error/Timeout.stub', 'parallel\\Events\\Event' => 'parallel/parallel/Events/Event.stub', 'parallel\\Events\\Event\\Error' => 'parallel/parallel/Events/Event/Error.stub', 'parallel\\Events\\Event\\Type' => 'parallel/parallel/Events/Event/Type.stub', 'parallel\\Events\\Input' => 'parallel/parallel/Events/Input.stub', 'parallel\\Events\\Input\\Error' => 'parallel/parallel/Events/Input/Error.stub', 'parallel\\Events\\Input\\Error\\Existence' => 'parallel/parallel/Events/Input/Error/Existence.stub', 'parallel\\Events\\Input\\Error\\IllegalValue' => 'parallel/parallel/Events/Input/Error/IllegalValue.stub', 'parallel\\Future' => 'parallel/parallel/Future.stub', 'parallel\\Future\\Error' => 'parallel/parallel/Future/Error.stub', 'parallel\\Future\\Error\\Cancelled' => 'parallel/parallel/Future/Error/Cancelled.stub', 'parallel\\Future\\Error\\Foreign' => 'parallel/parallel/Future/Error/Foreign.stub', 'parallel\\Future\\Error\\Killed' => 'parallel/parallel/Future/Error/Killed.stub', 'parallel\\Runtime' => 'parallel/parallel/Runtime.stub', 'parallel\\Runtime\\Error' => 'parallel/parallel/Runtime/Error.stub', 'parallel\\Runtime\\Error\\Bootstrap' => 'parallel/parallel/Runtime/Error/Bootstrap.stub', 'parallel\\Runtime\\Error\\Closed' => 'parallel/parallel/Runtime/Error/Closed.stub', 'parallel\\Runtime\\Error\\IllegalFunction' => 'parallel/parallel/Runtime/Error/IllegalFunction.stub', 'parallel\\Runtime\\Error\\IllegalInstruction' => 'parallel/parallel/Runtime/Error/IllegalInstruction.stub', 'parallel\\Runtime\\Error\\IllegalParameter' => 'parallel/parallel/Runtime/Error/IllegalParameter.stub', 'parallel\\Runtime\\Error\\IllegalReturn' => 'parallel/parallel/Runtime/Error/IllegalReturn.stub', 'parallel\\Runtime\\Error\\IllegalVariable' => 'parallel/parallel/Runtime/Error/IllegalVariable.stub', 'parallel\\Runtime\\Error\\Killed' => 'parallel/parallel/Runtime/Error/Killed.stub', 'parallel\\Runtime\\Object\\Unavailable' => 'parallel/parallel/Runtime/Object/Unavailable.stub', 'parallel\\Runtime\\Type\\Unavailable' => 'parallel/parallel/Runtime/Type/Unavailable.stub', 'parallel\\Sync' => 'parallel/parallel/Sync.stub', 'parallel\\Sync\\Error' => 'parallel/parallel/Sync/Error.stub', 'parallel\\Sync\\Error\\IllegalValue' => 'parallel/parallel/Sync/Error/IllegalValue.stub', 'php_user_filter' => 'standard/standard_0.stub', 'pointObj' => 'mapscript/mapscript.stub', 'pq\\COPY' => 'pq/pq.stub', 'pq\\Cancel' => 'pq/pq.stub', 'pq\\Connection' => 'pq/pq.stub', 'pq\\Converter' => 'pq/pq.stub', 'pq\\Cursor' => 'pq/pq.stub', 'pq\\DateTime' => 'pq/pq.stub', 'pq\\Exception' => 'pq/pq.stub', 'pq\\Exception\\BadMethodCallException' => 'pq/pq.stub', 'pq\\Exception\\DomainException' => 'pq/pq.stub', 'pq\\Exception\\InvalidArgumentException' => 'pq/pq.stub', 'pq\\Exception\\RuntimeException' => 'pq/pq.stub', 'pq\\LOB' => 'pq/pq.stub', 'pq\\Result' => 'pq/pq.stub', 'pq\\Statement' => 'pq/pq.stub', 'pq\\Transaction' => 'pq/pq.stub', 'pq\\Types' => 'pq/pq.stub', 'projectionObj' => 'mapscript/mapscript.stub', 'querymapObj' => 'mapscript/mapscript.stub', 'rectObj' => 'mapscript/mapscript.stub', 'referenceMapObj' => 'mapscript/mapscript.stub', 'resultObj' => 'mapscript/mapscript.stub', 'scalebarObj' => 'mapscript/mapscript.stub', 'shapeObj' => 'mapscript/mapscript.stub', 'shapefileObj' => 'mapscript/mapscript.stub', 'stdClass' => 'Core/Core_c.stub', 'styleObj' => 'mapscript/mapscript.stub', 'symbolObj' => 'mapscript/mapscript.stub', 'tidy' => 'tidy/tidy.stub', 'tidyNode' => 'tidy/tidy.stub', 'webObj' => 'mapscript/mapscript.stub');
    const FUNCTIONS = array('GEOSLineMerge' => 'geos/geos.stub', 'GEOSPolygonize' => 'geos/geos.stub', 'GEOSRelateMatch' => 'geos/geos.stub', 'GEOSSharedPaths' => 'geos/geos.stub', 'GEOSVersion' => 'geos/geos.stub', 'MongoDB\\BSON\\fromJSON' => 'mongodb/BSON/functions.stub', 'MongoDB\\BSON\\fromPHP' => 'mongodb/BSON/functions.stub', 'MongoDB\\BSON\\toCanonicalExtendedJSON' => 'mongodb/BSON/functions.stub', 'MongoDB\\BSON\\toJSON' => 'mongodb/BSON/functions.stub', 'MongoDB\\BSON\\toPHP' => 'mongodb/BSON/functions.stub', 'MongoDB\\BSON\\toRelaxedExtendedJSON' => 'mongodb/BSON/functions.stub', 'MongoDB\\Driver\\Monitoring\\addSubscriber' => 'mongodb/Monitoring/functions.stub', 'MongoDB\\Driver\\Monitoring\\removeSubscriber' => 'mongodb/Monitoring/functions.stub', 'PDF_activate_item' => 'pdflib/PDFlib.stub', 'PDF_add_launchlink' => 'pdflib/PDFlib.stub', 'PDF_add_locallink' => 'pdflib/PDFlib.stub', 'PDF_add_nameddest' => 'pdflib/PDFlib.stub', 'PDF_add_note' => 'pdflib/PDFlib.stub', 'PDF_add_pdflink' => 'pdflib/PDFlib.stub', 'PDF_add_table_cell' => 'pdflib/PDFlib.stub', 'PDF_add_textflow' => 'pdflib/PDFlib.stub', 'PDF_add_thumbnail' => 'pdflib/PDFlib.stub', 'PDF_add_weblink' => 'pdflib/PDFlib.stub', 'PDF_arc' => 'pdflib/PDFlib.stub', 'PDF_arcn' => 'pdflib/PDFlib.stub', 'PDF_attach_file' => 'pdflib/PDFlib.stub', 'PDF_begin_document' => 'pdflib/PDFlib.stub', 'PDF_begin_font' => 'pdflib/PDFlib.stub', 'PDF_begin_glyph' => 'pdflib/PDFlib.stub', 'PDF_begin_item' => 'pdflib/PDFlib.stub', 'PDF_begin_layer' => 'pdflib/PDFlib.stub', 'PDF_begin_page' => 'pdflib/PDFlib.stub', 'PDF_begin_page_ext' => 'pdflib/PDFlib.stub', 'PDF_begin_pattern' => 'pdflib/PDFlib.stub', 'PDF_begin_template' => 'pdflib/PDFlib.stub', 'PDF_begin_template_ext' => 'pdflib/PDFlib.stub', 'PDF_circle' => 'pdflib/PDFlib.stub', 'PDF_clip' => 'pdflib/PDFlib.stub', 'PDF_close' => 'pdflib/PDFlib.stub', 'PDF_close_image' => 'pdflib/PDFlib.stub', 'PDF_close_pdi' => 'pdflib/PDFlib.stub', 'PDF_close_pdi_page' => 'pdflib/PDFlib.stub', 'PDF_closepath' => 'pdflib/PDFlib.stub', 'PDF_closepath_fill_stroke' => 'pdflib/PDFlib.stub', 'PDF_closepath_stroke' => 'pdflib/PDFlib.stub', 'PDF_concat' => 'pdflib/PDFlib.stub', 'PDF_continue_text' => 'pdflib/PDFlib.stub', 'PDF_create_3dview' => 'pdflib/PDFlib.stub', 'PDF_create_action' => 'pdflib/PDFlib.stub', 'PDF_create_annotation' => 'pdflib/PDFlib.stub', 'PDF_create_bookmark' => 'pdflib/PDFlib.stub', 'PDF_create_field' => 'pdflib/PDFlib.stub', 'PDF_create_fieldgroup' => 'pdflib/PDFlib.stub', 'PDF_create_gstate' => 'pdflib/PDFlib.stub', 'PDF_create_pvf' => 'pdflib/PDFlib.stub', 'PDF_create_textflow' => 'pdflib/PDFlib.stub', 'PDF_curveto' => 'pdflib/PDFlib.stub', 'PDF_define_layer' => 'pdflib/PDFlib.stub', 'PDF_delete' => 'pdflib/PDFlib.stub', 'PDF_delete_pvf' => 'pdflib/PDFlib.stub', 'PDF_delete_table' => 'pdflib/PDFlib.stub', 'PDF_delete_textflow' => 'pdflib/PDFlib.stub', 'PDF_encoding_set_char' => 'pdflib/PDFlib.stub', 'PDF_end_document' => 'pdflib/PDFlib.stub', 'PDF_end_font' => 'pdflib/PDFlib.stub', 'PDF_end_glyph' => 'pdflib/PDFlib.stub', 'PDF_end_item' => 'pdflib/PDFlib.stub', 'PDF_end_layer' => 'pdflib/PDFlib.stub', 'PDF_end_page' => 'pdflib/PDFlib.stub', 'PDF_end_page_ext' => 'pdflib/PDFlib.stub', 'PDF_end_pattern' => 'pdflib/PDFlib.stub', 'PDF_end_template' => 'pdflib/PDFlib.stub', 'PDF_endpath' => 'pdflib/PDFlib.stub', 'PDF_fill' => 'pdflib/PDFlib.stub', 'PDF_fill_imageblock' => 'pdflib/PDFlib.stub', 'PDF_fill_pdfblock' => 'pdflib/PDFlib.stub', 'PDF_fill_stroke' => 'pdflib/PDFlib.stub', 'PDF_fill_textblock' => 'pdflib/PDFlib.stub', 'PDF_findfont' => 'pdflib/PDFlib.stub', 'PDF_fit_image' => 'pdflib/PDFlib.stub', 'PDF_fit_pdi_page' => 'pdflib/PDFlib.stub', 'PDF_fit_table' => 'pdflib/PDFlib.stub', 'PDF_fit_textflow' => 'pdflib/PDFlib.stub', 'PDF_fit_textline' => 'pdflib/PDFlib.stub', 'PDF_get_apiname' => 'pdflib/PDFlib.stub', 'PDF_get_buffer' => 'pdflib/PDFlib.stub', 'PDF_get_errmsg' => 'pdflib/PDFlib.stub', 'PDF_get_errnum' => 'pdflib/PDFlib.stub', 'PDF_get_majorversion' => 'pdflib/PDFlib.stub', 'PDF_get_minorversion' => 'pdflib/PDFlib.stub', 'PDF_get_parameter' => 'pdflib/PDFlib.stub', 'PDF_get_pdi_parameter' => 'pdflib/PDFlib.stub', 'PDF_get_pdi_value' => 'pdflib/PDFlib.stub', 'PDF_get_value' => 'pdflib/PDFlib.stub', 'PDF_info_font' => 'pdflib/PDFlib.stub', 'PDF_info_matchbox' => 'pdflib/PDFlib.stub', 'PDF_info_table' => 'pdflib/PDFlib.stub', 'PDF_info_textflow' => 'pdflib/PDFlib.stub', 'PDF_info_textline' => 'pdflib/PDFlib.stub', 'PDF_initgraphics' => 'pdflib/PDFlib.stub', 'PDF_lineto' => 'pdflib/PDFlib.stub', 'PDF_load_3ddata' => 'pdflib/PDFlib.stub', 'PDF_load_font' => 'pdflib/PDFlib.stub', 'PDF_load_iccprofile' => 'pdflib/PDFlib.stub', 'PDF_load_image' => 'pdflib/PDFlib.stub', 'PDF_makespotcolor' => 'pdflib/PDFlib.stub', 'PDF_moveto' => 'pdflib/PDFlib.stub', 'PDF_new' => 'pdflib/PDFlib.stub', 'PDF_open_ccitt' => 'pdflib/PDFlib.stub', 'PDF_open_file' => 'pdflib/PDFlib.stub', 'PDF_open_image' => 'pdflib/PDFlib.stub', 'PDF_open_image_file' => 'pdflib/PDFlib.stub', 'PDF_open_memory_image' => 'pdflib/PDFlib.stub', 'PDF_open_pdi' => 'pdflib/PDFlib.stub', 'PDF_open_pdi_document' => 'pdflib/PDFlib.stub', 'PDF_open_pdi_page' => 'pdflib/PDFlib.stub', 'PDF_pcos_get_number' => 'pdflib/PDFlib.stub', 'PDF_pcos_get_stream' => 'pdflib/PDFlib.stub', 'PDF_pcos_get_string' => 'pdflib/PDFlib.stub', 'PDF_place_image' => 'pdflib/PDFlib.stub', 'PDF_place_pdi_page' => 'pdflib/PDFlib.stub', 'PDF_process_pdi' => 'pdflib/PDFlib.stub', 'PDF_rect' => 'pdflib/PDFlib.stub', 'PDF_restore' => 'pdflib/PDFlib.stub', 'PDF_resume_page' => 'pdflib/PDFlib.stub', 'PDF_rotate' => 'pdflib/PDFlib.stub', 'PDF_save' => 'pdflib/PDFlib.stub', 'PDF_scale' => 'pdflib/PDFlib.stub', 'PDF_set_border_color' => 'pdflib/PDFlib.stub', 'PDF_set_border_dash' => 'pdflib/PDFlib.stub', 'PDF_set_border_style' => 'pdflib/PDFlib.stub', 'PDF_set_gstate' => 'pdflib/PDFlib.stub', 'PDF_set_info' => 'pdflib/PDFlib.stub', 'PDF_set_layer_dependency' => 'pdflib/PDFlib.stub', 'PDF_set_parameter' => 'pdflib/PDFlib.stub', 'PDF_set_text_pos' => 'pdflib/PDFlib.stub', 'PDF_set_value' => 'pdflib/PDFlib.stub', 'PDF_setcolor' => 'pdflib/PDFlib.stub', 'PDF_setdash' => 'pdflib/PDFlib.stub', 'PDF_setdashpattern' => 'pdflib/PDFlib.stub', 'PDF_setflat' => 'pdflib/PDFlib.stub', 'PDF_setfont' => 'pdflib/PDFlib.stub', 'PDF_setgray' => 'pdflib/PDFlib.stub', 'PDF_setgray_fill' => 'pdflib/PDFlib.stub', 'PDF_setgray_stroke' => 'pdflib/PDFlib.stub', 'PDF_setlinecap' => 'pdflib/PDFlib.stub', 'PDF_setlinejoin' => 'pdflib/PDFlib.stub', 'PDF_setlinewidth' => 'pdflib/PDFlib.stub', 'PDF_setmatrix' => 'pdflib/PDFlib.stub', 'PDF_setmiterlimit' => 'pdflib/PDFlib.stub', 'PDF_setrgbcolor' => 'pdflib/PDFlib.stub', 'PDF_setrgbcolor_fill' => 'pdflib/PDFlib.stub', 'PDF_setrgbcolor_stroke' => 'pdflib/PDFlib.stub', 'PDF_shading' => 'pdflib/PDFlib.stub', 'PDF_shading_pattern' => 'pdflib/PDFlib.stub', 'PDF_shfill' => 'pdflib/PDFlib.stub', 'PDF_show' => 'pdflib/PDFlib.stub', 'PDF_show_boxed' => 'pdflib/PDFlib.stub', 'PDF_show_xy' => 'pdflib/PDFlib.stub', 'PDF_skew' => 'pdflib/PDFlib.stub', 'PDF_stringwidth' => 'pdflib/PDFlib.stub', 'PDF_stroke' => 'pdflib/PDFlib.stub', 'PDF_suspend_page' => 'pdflib/PDFlib.stub', 'PDF_translate' => 'pdflib/PDFlib.stub', 'PDF_utf16_to_utf8' => 'pdflib/PDFlib.stub', 'PDF_utf32_to_utf16' => 'pdflib/PDFlib.stub', 'PDF_utf8_to_utf16' => 'pdflib/PDFlib.stub', 'PS_UNRESERVE_PREFIX___halt_compiler' => 'standard/_standard_manual.stub', 'PS_UNRESERVE_PREFIX_array' => 'standard/_types.stub', 'PS_UNRESERVE_PREFIX_die' => 'standard/_types.stub', 'PS_UNRESERVE_PREFIX_empty' => 'standard/_types.stub', 'PS_UNRESERVE_PREFIX_eval' => 'standard/_types.stub', 'PS_UNRESERVE_PREFIX_exit' => 'standard/_types.stub', 'PS_UNRESERVE_PREFIX_isset' => 'standard/_types.stub', 'PS_UNRESERVE_PREFIX_list' => 'standard/_types.stub', 'PS_UNRESERVE_PREFIX_unset' => 'standard/_types.stub', 'SQLSRV_PHPTYPE_STREAM' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_PHPTYPE_STRING' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_BINARY' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_CHAR' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_DECIMAL' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_NCHAR' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_NUMERIC' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_NVARCHAR' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_VARBINARY' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_VARCHAR' => 'sqlsrv/sqlsrv.stub', 'Sodium\\add' => 'libsodium/libsodium.stub', 'Sodium\\bin2hex' => 'libsodium/libsodium.stub', 'Sodium\\compare' => 'libsodium/libsodium.stub', 'Sodium\\crypto_aead_aes256gcm_decrypt' => 'libsodium/libsodium.stub', 'Sodium\\crypto_aead_aes256gcm_encrypt' => 'libsodium/libsodium.stub', 'Sodium\\crypto_aead_aes256gcm_is_available' => 'libsodium/libsodium.stub', 'Sodium\\crypto_aead_chacha20poly1305_decrypt' => 'libsodium/libsodium.stub', 'Sodium\\crypto_aead_chacha20poly1305_encrypt' => 'libsodium/libsodium.stub', 'Sodium\\crypto_auth' => 'libsodium/libsodium.stub', 'Sodium\\crypto_auth_verify' => 'libsodium/libsodium.stub', 'Sodium\\crypto_box' => 'libsodium/libsodium.stub', 'Sodium\\crypto_box_keypair' => 'libsodium/libsodium.stub', 'Sodium\\crypto_box_keypair_from_secretkey_and_publickey' => 'libsodium/libsodium.stub', 'Sodium\\crypto_box_open' => 'libsodium/libsodium.stub', 'Sodium\\crypto_box_publickey' => 'libsodium/libsodium.stub', 'Sodium\\crypto_box_publickey_from_secretkey' => 'libsodium/libsodium.stub', 'Sodium\\crypto_box_seal' => 'libsodium/libsodium.stub', 'Sodium\\crypto_box_seal_open' => 'libsodium/libsodium.stub', 'Sodium\\crypto_box_secretkey' => 'libsodium/libsodium.stub', 'Sodium\\crypto_box_seed_keypair' => 'libsodium/libsodium.stub', 'Sodium\\crypto_generichash' => 'libsodium/libsodium.stub', 'Sodium\\crypto_generichash_final' => 'libsodium/libsodium.stub', 'Sodium\\crypto_generichash_init' => 'libsodium/libsodium.stub', 'Sodium\\crypto_generichash_update' => 'libsodium/libsodium.stub', 'Sodium\\crypto_kx' => 'libsodium/libsodium.stub', 'Sodium\\crypto_pwhash' => 'libsodium/libsodium.stub', 'Sodium\\crypto_pwhash_scryptsalsa208sha256' => 'libsodium/libsodium.stub', 'Sodium\\crypto_pwhash_scryptsalsa208sha256_str' => 'libsodium/libsodium.stub', 'Sodium\\crypto_pwhash_scryptsalsa208sha256_str_verify' => 'libsodium/libsodium.stub', 'Sodium\\crypto_pwhash_str' => 'libsodium/libsodium.stub', 'Sodium\\crypto_pwhash_str_verify' => 'libsodium/libsodium.stub', 'Sodium\\crypto_scalarmult' => 'libsodium/libsodium.stub', 'Sodium\\crypto_scalarmult_base' => 'libsodium/libsodium.stub', 'Sodium\\crypto_secretbox' => 'libsodium/libsodium.stub', 'Sodium\\crypto_secretbox_open' => 'libsodium/libsodium.stub', 'Sodium\\crypto_shorthash' => 'libsodium/libsodium.stub', 'Sodium\\crypto_sign' => 'libsodium/libsodium.stub', 'Sodium\\crypto_sign_detached' => 'libsodium/libsodium.stub', 'Sodium\\crypto_sign_ed25519_pk_to_curve25519' => 'libsodium/libsodium.stub', 'Sodium\\crypto_sign_ed25519_sk_to_curve25519' => 'libsodium/libsodium.stub', 'Sodium\\crypto_sign_keypair' => 'libsodium/libsodium.stub', 'Sodium\\crypto_sign_keypair_from_secretkey_and_publickey' => 'libsodium/libsodium.stub', 'Sodium\\crypto_sign_open' => 'libsodium/libsodium.stub', 'Sodium\\crypto_sign_publickey' => 'libsodium/libsodium.stub', 'Sodium\\crypto_sign_publickey_from_secretkey' => 'libsodium/libsodium.stub', 'Sodium\\crypto_sign_secretkey' => 'libsodium/libsodium.stub', 'Sodium\\crypto_sign_seed_keypair' => 'libsodium/libsodium.stub', 'Sodium\\crypto_sign_verify_detached' => 'libsodium/libsodium.stub', 'Sodium\\crypto_stream' => 'libsodium/libsodium.stub', 'Sodium\\crypto_stream_xor' => 'libsodium/libsodium.stub', 'Sodium\\hex2bin' => 'libsodium/libsodium.stub', 'Sodium\\increment' => 'libsodium/libsodium.stub', 'Sodium\\library_version_major' => 'libsodium/libsodium.stub', 'Sodium\\library_version_minor' => 'libsodium/libsodium.stub', 'Sodium\\memcmp' => 'libsodium/libsodium.stub', 'Sodium\\memzero' => 'libsodium/libsodium.stub', 'Sodium\\randombytes_buf' => 'libsodium/libsodium.stub', 'Sodium\\randombytes_random16' => 'libsodium/libsodium.stub', 'Sodium\\randombytes_uniform' => 'libsodium/libsodium.stub', 'Sodium\\version_string' => 'libsodium/libsodium.stub', 'Zstd\\compress' => 'zstd/zstd.stub', 'Zstd\\compress_dict' => 'zstd/zstd.stub', 'Zstd\\uncompress' => 'zstd/zstd.stub', 'Zstd\\uncompress_dict' => 'zstd/zstd.stub', '_' => 'gettext/gettext.stub', 'abs' => 'standard/standard_3.stub', 'accelerator_set_status' => 'zend/zend.stub', 'acos' => 'standard/standard_3.stub', 'acosh' => 'standard/standard_3.stub', 'addcslashes' => 'standard/standard_1.stub', 'addslashes' => 'standard/standard_1.stub', 'apache_child_terminate' => 'apache/apache.stub', 'apache_get_modules' => 'apache/apache.stub', 'apache_get_version' => 'apache/apache.stub', 'apache_getenv' => 'apache/apache.stub', 'apache_lookup_uri' => 'apache/apache.stub', 'apache_note' => 'apache/apache.stub', 'apache_request_headers' => 'standard/standard_4.stub', 'apache_reset_timeout' => 'apache/apache.stub', 'apache_response_headers' => 'apache/apache.stub', 'apache_setenv' => 'apache/apache.stub', 'apc_add' => 'apcu/apcu.stub', 'apc_bin_dump' => 'apcu/apcu.stub', 'apc_bin_dumpfile' => 'apcu/apcu.stub', 'apc_bin_load' => 'apcu/apcu.stub', 'apc_bin_loadfile' => 'apcu/apcu.stub', 'apc_cache_info' => 'apcu/apcu.stub', 'apc_cas' => 'apcu/apcu.stub', 'apc_clear_cache' => 'apcu/apcu.stub', 'apc_compile_file' => 'apcu/apcu.stub', 'apc_dec' => 'apcu/apcu.stub', 'apc_define_constants' => 'apcu/apcu.stub', 'apc_delete' => 'apcu/apcu.stub', 'apc_delete_file' => 'apcu/apcu.stub', 'apc_exists' => 'apcu/apcu.stub', 'apc_fetch' => 'apcu/apcu.stub', 'apc_inc' => 'apcu/apcu.stub', 'apc_load_constants' => 'apcu/apcu.stub', 'apc_sma_info' => 'apcu/apcu.stub', 'apc_store' => 'apcu/apcu.stub', 'apcu_add' => 'apcu/apcu.stub', 'apcu_cache_info' => 'apcu/apcu.stub', 'apcu_cas' => 'apcu/apcu.stub', 'apcu_clear_cache' => 'apcu/apcu.stub', 'apcu_dec' => 'apcu/apcu.stub', 'apcu_delete' => 'apcu/apcu.stub', 'apcu_enabled' => 'apcu/apcu.stub', 'apcu_entry' => 'apcu/apcu.stub', 'apcu_exists' => 'apcu/apcu.stub', 'apcu_fetch' => 'apcu/apcu.stub', 'apcu_inc' => 'apcu/apcu.stub', 'apcu_key_info' => 'apcu/apcu.stub', 'apcu_sma_info' => 'apcu/apcu.stub', 'apcu_store' => 'apcu/apcu.stub', 'ares_gethostbyname' => 'uv/uv_functions.stub', 'array_change_key_case' => 'standard/standard_9.stub', 'array_chunk' => 'standard/standard_9.stub', 'array_column' => 'standard/standard_9.stub', 'array_combine' => 'standard/standard_9.stub', 'array_count_values' => 'standard/standard_9.stub', 'array_diff' => 'standard/standard_9.stub', 'array_diff_assoc' => 'standard/standard_9.stub', 'array_diff_key' => 'standard/standard_9.stub', 'array_diff_uassoc' => 'standard/standard_9.stub', 'array_diff_ukey' => 'standard/standard_9.stub', 'array_fill' => 'standard/standard_8.stub', 'array_fill_keys' => 'standard/standard_8.stub', 'array_filter' => 'standard/standard_9.stub', 'array_flip' => 'standard/standard_9.stub', 'array_intersect' => 'standard/standard_9.stub', 'array_intersect_assoc' => 'standard/standard_9.stub', 'array_intersect_key' => 'standard/standard_9.stub', 'array_intersect_uassoc' => 'standard/standard_9.stub', 'array_intersect_ukey' => 'standard/standard_9.stub', 'array_is_list' => 'standard/standard_9.stub', 'array_key_exists' => 'standard/standard_9.stub', 'array_key_first' => 'standard/standard_9.stub', 'array_key_last' => 'standard/standard_9.stub', 'array_keys' => 'standard/standard_9.stub', 'array_map' => 'standard/standard_9.stub', 'array_merge' => 'standard/standard_8.stub', 'array_merge_recursive' => 'standard/standard_9.stub', 'array_multisort' => 'standard/standard_8.stub', 'array_pad' => 'standard/standard_9.stub', 'array_pop' => 'standard/standard_8.stub', 'array_product' => 'standard/standard_9.stub', 'array_push' => 'standard/standard_8.stub', 'array_rand' => 'standard/standard_9.stub', 'array_reduce' => 'standard/standard_9.stub', 'array_replace' => 'standard/standard_9.stub', 'array_replace_recursive' => 'standard/standard_9.stub', 'array_reverse' => 'standard/standard_9.stub', 'array_search' => 'standard/standard_8.stub', 'array_shift' => 'standard/standard_8.stub', 'array_slice' => 'standard/standard_8.stub', 'array_splice' => 'standard/standard_8.stub', 'array_sum' => 'standard/standard_9.stub', 'array_udiff' => 'standard/standard_9.stub', 'array_udiff_assoc' => 'standard/standard_9.stub', 'array_udiff_uassoc' => 'standard/standard_9.stub', 'array_uintersect' => 'standard/standard_9.stub', 'array_uintersect_assoc' => 'standard/standard_9.stub', 'array_uintersect_uassoc' => 'standard/standard_9.stub', 'array_unique' => 'standard/standard_9.stub', 'array_unshift' => 'standard/standard_8.stub', 'array_values' => 'standard/standard_9.stub', 'array_walk' => 'standard/standard_8.stub', 'array_walk_recursive' => 'standard/standard_8.stub', 'arsort' => 'standard/standard_8.stub', 'asin' => 'standard/standard_3.stub', 'asinh' => 'standard/standard_3.stub', 'asort' => 'standard/standard_8.stub', 'assert' => 'standard/standard_9.stub', 'assert_options' => 'standard/standard_9.stub', 'ast\\get_kind_name' => 'ast/ast.stub', 'ast\\get_metadata' => 'ast/ast.stub', 'ast\\get_supported_versions' => 'ast/ast.stub', 'ast\\kind_uses_flags' => 'ast/ast.stub', 'ast\\parse_code' => 'ast/ast.stub', 'ast\\parse_file' => 'ast/ast.stub', 'atan' => 'standard/standard_3.stub', 'atan2' => 'standard/standard_3.stub', 'atanh' => 'standard/standard_3.stub', 'base64_decode' => 'standard/standard_3.stub', 'base64_encode' => 'standard/standard_3.stub', 'base_convert' => 'standard/standard_3.stub', 'basename' => 'standard/standard_1.stub', 'bcadd' => 'bcmath/bcmath.stub', 'bccomp' => 'bcmath/bcmath.stub', 'bcdiv' => 'bcmath/bcmath.stub', 'bcmod' => 'bcmath/bcmath.stub', 'bcmul' => 'bcmath/bcmath.stub', 'bcpow' => 'bcmath/bcmath.stub', 'bcpowmod' => 'bcmath/bcmath.stub', 'bcscale' => 'bcmath/bcmath.stub', 'bcsqrt' => 'bcmath/bcmath.stub', 'bcsub' => 'bcmath/bcmath.stub', 'bin2hex' => 'standard/standard_0.stub', 'bind_textdomain_codeset' => 'gettext/gettext.stub', 'bindec' => 'standard/standard_3.stub', 'bindtextdomain' => 'gettext/gettext.stub', 'boolval' => 'standard/standard_5.stub', 'bzclose' => 'bz2/bz2.stub', 'bzcompress' => 'bz2/bz2.stub', 'bzdecompress' => 'bz2/bz2.stub', 'bzerrno' => 'bz2/bz2.stub', 'bzerror' => 'bz2/bz2.stub', 'bzerrstr' => 'bz2/bz2.stub', 'bzflush' => 'bz2/bz2.stub', 'bzopen' => 'bz2/bz2.stub', 'bzread' => 'bz2/bz2.stub', 'bzwrite' => 'bz2/bz2.stub', 'cal_days_in_month' => 'calendar/calendar.stub', 'cal_from_jd' => 'calendar/calendar.stub', 'cal_info' => 'calendar/calendar.stub', 'cal_to_jd' => 'calendar/calendar.stub', 'call_user_func' => 'standard/standard_4.stub', 'call_user_func_array' => 'standard/standard_4.stub', 'call_user_method' => 'standard/standard_4.stub', 'call_user_method_array' => 'standard/standard_4.stub', 'ceil' => 'standard/standard_3.stub', 'chdir' => 'standard/standard_7.stub', 'checkdate' => 'date/date.stub', 'checkdnsrr' => 'standard/standard_4.stub', 'chgrp' => 'standard/standard_7.stub', 'chmod' => 'standard/standard_7.stub', 'chop' => 'standard/standard_2.stub', 'chown' => 'standard/standard_7.stub', 'chr' => 'standard/standard_2.stub', 'chroot' => 'standard/standard_7.stub', 'chunk_split' => 'standard/standard_1.stub', 'class_alias' => 'Core/Core.stub', 'class_exists' => 'Core/Core.stub', 'class_implements' => 'SPL/SPL_f.stub', 'class_parents' => 'SPL/SPL_f.stub', 'class_uses' => 'SPL/SPL_f.stub', 'clearstatcache' => 'standard/standard_7.stub', 'cli_get_process_title' => 'standard/basic.stub', 'cli_set_process_title' => 'standard/basic.stub', 'closedir' => 'standard/standard_7.stub', 'closelog' => 'standard/standard_8.stub', 'collator_asort' => 'intl/intl.stub', 'collator_compare' => 'intl/intl.stub', 'collator_create' => 'intl/intl.stub', 'collator_get_attribute' => 'intl/intl.stub', 'collator_get_error_code' => 'intl/intl.stub', 'collator_get_error_message' => 'intl/intl.stub', 'collator_get_locale' => 'intl/intl.stub', 'collator_get_sort_key' => 'intl/intl.stub', 'collator_get_strength' => 'intl/intl.stub', 'collator_set_attribute' => 'intl/intl.stub', 'collator_set_strength' => 'intl/intl.stub', 'collator_sort' => 'intl/intl.stub', 'collator_sort_with_sort_keys' => 'intl/intl.stub', 'com_create_guid' => 'com_dotnet/com_dotnet.stub', 'com_event_sink' => 'com_dotnet/com_dotnet.stub', 'com_get_active_object' => 'com_dotnet/com_dotnet.stub', 'com_load_typelib' => 'com_dotnet/com_dotnet.stub', 'com_message_pump' => 'com_dotnet/com_dotnet.stub', 'com_print_typeinfo' => 'com_dotnet/com_dotnet.stub', 'compact' => 'standard/standard_8.stub', 'config_get_hash' => 'xdebug/xdebug.stub', 'confirm_pdo_ibm_compiled' => 'pdo_ibm/pdo_ibm.stub', 'connection_aborted' => 'standard/standard_4.stub', 'connection_status' => 'standard/standard_4.stub', 'constant' => 'standard/standard_0.stub', 'convert_cyr_string' => 'standard/standard_3.stub', 'convert_uudecode' => 'standard/standard_3.stub', 'convert_uuencode' => 'standard/standard_3.stub', 'copy' => 'standard/standard_5.stub', 'cos' => 'standard/standard_3.stub', 'cosh' => 'standard/standard_3.stub', 'count' => 'standard/standard_8.stub', 'count_chars' => 'standard/standard_1.stub', 'crc32' => 'standard/standard_0.stub', 'create_function' => 'Core/Core.stub', 'crypt' => 'standard/standard_7.stub', 'ctype_alnum' => 'ctype/ctype.stub', 'ctype_alpha' => 'ctype/ctype.stub', 'ctype_cntrl' => 'ctype/ctype.stub', 'ctype_digit' => 'ctype/ctype.stub', 'ctype_graph' => 'ctype/ctype.stub', 'ctype_lower' => 'ctype/ctype.stub', 'ctype_print' => 'ctype/ctype.stub', 'ctype_punct' => 'ctype/ctype.stub', 'ctype_space' => 'ctype/ctype.stub', 'ctype_upper' => 'ctype/ctype.stub', 'ctype_xdigit' => 'ctype/ctype.stub', 'cubrid_affected_rows' => 'cubrid/cubrid.stub', 'cubrid_bind' => 'cubrid/cubrid.stub', 'cubrid_client_encoding' => 'cubrid/cubrid.stub', 'cubrid_close' => 'cubrid/cubrid.stub', 'cubrid_close_prepare' => 'cubrid/cubrid.stub', 'cubrid_close_request' => 'cubrid/cubrid.stub', 'cubrid_col_get' => 'cubrid/cubrid.stub', 'cubrid_col_size' => 'cubrid/cubrid.stub', 'cubrid_column_names' => 'cubrid/cubrid.stub', 'cubrid_column_types' => 'cubrid/cubrid.stub', 'cubrid_commit' => 'cubrid/cubrid.stub', 'cubrid_connect' => 'cubrid/cubrid.stub', 'cubrid_connect_with_url' => 'cubrid/cubrid.stub', 'cubrid_current_oid' => 'cubrid/cubrid.stub', 'cubrid_data_seek' => 'cubrid/cubrid.stub', 'cubrid_db_name' => 'cubrid/cubrid.stub', 'cubrid_db_parameter' => 'cubrid/cubrid.stub', 'cubrid_disconnect' => 'cubrid/cubrid.stub', 'cubrid_drop' => 'cubrid/cubrid.stub', 'cubrid_errno' => 'cubrid/cubrid.stub', 'cubrid_error' => 'cubrid/cubrid.stub', 'cubrid_error_code' => 'cubrid/cubrid.stub', 'cubrid_error_code_facility' => 'cubrid/cubrid.stub', 'cubrid_error_msg' => 'cubrid/cubrid.stub', 'cubrid_execute' => 'cubrid/cubrid.stub', 'cubrid_fetch' => 'cubrid/cubrid.stub', 'cubrid_fetch_array' => 'cubrid/cubrid.stub', 'cubrid_fetch_assoc' => 'cubrid/cubrid.stub', 'cubrid_fetch_field' => 'cubrid/cubrid.stub', 'cubrid_fetch_lengths' => 'cubrid/cubrid.stub', 'cubrid_fetch_object' => 'cubrid/cubrid.stub', 'cubrid_fetch_row' => 'cubrid/cubrid.stub', 'cubrid_field_flags' => 'cubrid/cubrid.stub', 'cubrid_field_len' => 'cubrid/cubrid.stub', 'cubrid_field_name' => 'cubrid/cubrid.stub', 'cubrid_field_seek' => 'cubrid/cubrid.stub', 'cubrid_field_table' => 'cubrid/cubrid.stub', 'cubrid_field_type' => 'cubrid/cubrid.stub', 'cubrid_free_result' => 'cubrid/cubrid.stub', 'cubrid_get' => 'cubrid/cubrid.stub', 'cubrid_get_autocommit' => 'cubrid/cubrid.stub', 'cubrid_get_charset' => 'cubrid/cubrid.stub', 'cubrid_get_class_name' => 'cubrid/cubrid.stub', 'cubrid_get_client_info' => 'cubrid/cubrid.stub', 'cubrid_get_db_parameter' => 'cubrid/cubrid.stub', 'cubrid_get_query_timeout' => 'cubrid/cubrid.stub', 'cubrid_get_server_info' => 'cubrid/cubrid.stub', 'cubrid_insert_id' => 'cubrid/cubrid.stub', 'cubrid_is_instance' => 'cubrid/cubrid.stub', 'cubrid_list_dbs' => 'cubrid/cubrid.stub', 'cubrid_lob2_bind' => 'cubrid/cubrid.stub', 'cubrid_lob2_close' => 'cubrid/cubrid.stub', 'cubrid_lob2_export' => 'cubrid/cubrid.stub', 'cubrid_lob2_import' => 'cubrid/cubrid.stub', 'cubrid_lob2_new' => 'cubrid/cubrid.stub', 'cubrid_lob2_read' => 'cubrid/cubrid.stub', 'cubrid_lob2_seek' => 'cubrid/cubrid.stub', 'cubrid_lob2_seek64' => 'cubrid/cubrid.stub', 'cubrid_lob2_size' => 'cubrid/cubrid.stub', 'cubrid_lob2_size64' => 'cubrid/cubrid.stub', 'cubrid_lob2_tell' => 'cubrid/cubrid.stub', 'cubrid_lob2_tell64' => 'cubrid/cubrid.stub', 'cubrid_lob_close' => 'cubrid/cubrid.stub', 'cubrid_lob_export' => 'cubrid/cubrid.stub', 'cubrid_lob_get' => 'cubrid/cubrid.stub', 'cubrid_lob_send' => 'cubrid/cubrid.stub', 'cubrid_lob_size' => 'cubrid/cubrid.stub', 'cubrid_lock_read' => 'cubrid/cubrid.stub', 'cubrid_lock_write' => 'cubrid/cubrid.stub', 'cubrid_move_cursor' => 'cubrid/cubrid.stub', 'cubrid_next_result' => 'cubrid/cubrid.stub', 'cubrid_num_cols' => 'cubrid/cubrid.stub', 'cubrid_num_fields' => 'cubrid/cubrid.stub', 'cubrid_num_rows' => 'cubrid/cubrid.stub', 'cubrid_pconnect' => 'cubrid/cubrid.stub', 'cubrid_pconnect_with_url' => 'cubrid/cubrid.stub', 'cubrid_ping' => 'cubrid/cubrid.stub', 'cubrid_prepare' => 'cubrid/cubrid.stub', 'cubrid_put' => 'cubrid/cubrid.stub', 'cubrid_query' => 'cubrid/cubrid.stub', 'cubrid_real_escape_string' => 'cubrid/cubrid.stub', 'cubrid_result' => 'cubrid/cubrid.stub', 'cubrid_rollback' => 'cubrid/cubrid.stub', 'cubrid_schema' => 'cubrid/cubrid.stub', 'cubrid_seq_add' => 'cubrid/cubrid.stub', 'cubrid_seq_drop' => 'cubrid/cubrid.stub', 'cubrid_seq_insert' => 'cubrid/cubrid.stub', 'cubrid_seq_put' => 'cubrid/cubrid.stub', 'cubrid_set_add' => 'cubrid/cubrid.stub', 'cubrid_set_autocommit' => 'cubrid/cubrid.stub', 'cubrid_set_db_parameter' => 'cubrid/cubrid.stub', 'cubrid_set_drop' => 'cubrid/cubrid.stub', 'cubrid_set_query_timeout' => 'cubrid/cubrid.stub', 'cubrid_unbuffered_query' => 'cubrid/cubrid.stub', 'cubrid_version' => 'cubrid/cubrid.stub', 'curl_close' => 'curl/curl.stub', 'curl_copy_handle' => 'curl/curl.stub', 'curl_errno' => 'curl/curl.stub', 'curl_error' => 'curl/curl.stub', 'curl_escape' => 'curl/curl.stub', 'curl_exec' => 'curl/curl.stub', 'curl_file_create' => 'curl/curl.stub', 'curl_getinfo' => 'curl/curl.stub', 'curl_init' => 'curl/curl.stub', 'curl_multi_add_handle' => 'curl/curl.stub', 'curl_multi_close' => 'curl/curl.stub', 'curl_multi_errno' => 'curl/curl.stub', 'curl_multi_exec' => 'curl/curl.stub', 'curl_multi_getcontent' => 'curl/curl.stub', 'curl_multi_info_read' => 'curl/curl.stub', 'curl_multi_init' => 'curl/curl.stub', 'curl_multi_remove_handle' => 'curl/curl.stub', 'curl_multi_select' => 'curl/curl.stub', 'curl_multi_setopt' => 'curl/curl.stub', 'curl_multi_strerror' => 'curl/curl.stub', 'curl_pause' => 'curl/curl.stub', 'curl_reset' => 'curl/curl.stub', 'curl_setopt' => 'curl/curl.stub', 'curl_setopt_array' => 'curl/curl.stub', 'curl_share_close' => 'curl/curl.stub', 'curl_share_errno' => 'curl/curl.stub', 'curl_share_init' => 'curl/curl.stub', 'curl_share_setopt' => 'curl/curl.stub', 'curl_share_strerror' => 'curl/curl.stub', 'curl_strerror' => 'curl/curl.stub', 'curl_unescape' => 'curl/curl.stub', 'curl_upkeep' => 'curl/curl.stub', 'curl_version' => 'curl/curl.stub', 'current' => 'standard/standard_8.stub', 'date' => 'date/date.stub', 'date_add' => 'date/date.stub', 'date_create' => 'date/date.stub', 'date_create_from_format' => 'date/date.stub', 'date_create_immutable' => 'date/date.stub', 'date_create_immutable_from_format' => 'date/date.stub', 'date_date_set' => 'date/date.stub', 'date_default_timezone_get' => 'date/date.stub', 'date_default_timezone_set' => 'date/date.stub', 'date_diff' => 'date/date.stub', 'date_format' => 'date/date.stub', 'date_get_last_errors' => 'date/date.stub', 'date_interval_create_from_date_string' => 'date/date.stub', 'date_interval_format' => 'date/date.stub', 'date_isodate_set' => 'date/date.stub', 'date_modify' => 'date/date.stub', 'date_offset_get' => 'date/date.stub', 'date_parse' => 'date/date.stub', 'date_parse_from_format' => 'date/date.stub', 'date_sub' => 'date/date.stub', 'date_sun_info' => 'date/date.stub', 'date_sunrise' => 'date/date.stub', 'date_sunset' => 'date/date.stub', 'date_time_set' => 'date/date.stub', 'date_timestamp_get' => 'date/date.stub', 'date_timestamp_set' => 'date/date.stub', 'date_timezone_get' => 'date/date.stub', 'date_timezone_set' => 'date/date.stub', 'datefmt_create' => 'intl/intl.stub', 'datefmt_format' => 'intl/intl.stub', 'datefmt_format_object' => 'intl/intl.stub', 'datefmt_get_calendar' => 'intl/intl.stub', 'datefmt_get_calendar_object' => 'intl/intl.stub', 'datefmt_get_datetype' => 'intl/intl.stub', 'datefmt_get_error_code' => 'intl/intl.stub', 'datefmt_get_error_message' => 'intl/intl.stub', 'datefmt_get_locale' => 'intl/intl.stub', 'datefmt_get_pattern' => 'intl/intl.stub', 'datefmt_get_timetype' => 'intl/intl.stub', 'datefmt_get_timezone' => 'intl/intl.stub', 'datefmt_get_timezone_id' => 'intl/intl.stub', 'datefmt_is_lenient' => 'intl/intl.stub', 'datefmt_localtime' => 'intl/intl.stub', 'datefmt_parse' => 'intl/intl.stub', 'datefmt_set_calendar' => 'intl/intl.stub', 'datefmt_set_lenient' => 'intl/intl.stub', 'datefmt_set_pattern' => 'intl/intl.stub', 'datefmt_set_timezone' => 'intl/intl.stub', 'datefmt_set_timezone_id' => 'intl/intl.stub', 'db2_autocommit' => 'ibm_db2/ibm_db2.stub', 'db2_bind_param' => 'ibm_db2/ibm_db2.stub', 'db2_client_info' => 'ibm_db2/ibm_db2.stub', 'db2_close' => 'ibm_db2/ibm_db2.stub', 'db2_column_privileges' => 'ibm_db2/ibm_db2.stub', 'db2_columnprivileges' => 'ibm_db2/ibm_db2.stub', 'db2_columns' => 'ibm_db2/ibm_db2.stub', 'db2_commit' => 'ibm_db2/ibm_db2.stub', 'db2_conn_error' => 'ibm_db2/ibm_db2.stub', 'db2_conn_errormsg' => 'ibm_db2/ibm_db2.stub', 'db2_connect' => 'ibm_db2/ibm_db2.stub', 'db2_cursor_type' => 'ibm_db2/ibm_db2.stub', 'db2_escape_string' => 'ibm_db2/ibm_db2.stub', 'db2_exec' => 'ibm_db2/ibm_db2.stub', 'db2_execute' => 'ibm_db2/ibm_db2.stub', 'db2_fetch_array' => 'ibm_db2/ibm_db2.stub', 'db2_fetch_assoc' => 'ibm_db2/ibm_db2.stub', 'db2_fetch_both' => 'ibm_db2/ibm_db2.stub', 'db2_fetch_object' => 'ibm_db2/ibm_db2.stub', 'db2_fetch_row' => 'ibm_db2/ibm_db2.stub', 'db2_field_display_size' => 'ibm_db2/ibm_db2.stub', 'db2_field_name' => 'ibm_db2/ibm_db2.stub', 'db2_field_num' => 'ibm_db2/ibm_db2.stub', 'db2_field_precision' => 'ibm_db2/ibm_db2.stub', 'db2_field_scale' => 'ibm_db2/ibm_db2.stub', 'db2_field_type' => 'ibm_db2/ibm_db2.stub', 'db2_field_width' => 'ibm_db2/ibm_db2.stub', 'db2_foreign_keys' => 'ibm_db2/ibm_db2.stub', 'db2_foreignkeys' => 'ibm_db2/ibm_db2.stub', 'db2_free_result' => 'ibm_db2/ibm_db2.stub', 'db2_free_stmt' => 'ibm_db2/ibm_db2.stub', 'db2_get_option' => 'ibm_db2/ibm_db2.stub', 'db2_last_insert_id' => 'ibm_db2/ibm_db2.stub', 'db2_lob_read' => 'ibm_db2/ibm_db2.stub', 'db2_next_result' => 'ibm_db2/ibm_db2.stub', 'db2_num_fields' => 'ibm_db2/ibm_db2.stub', 'db2_num_rows' => 'ibm_db2/ibm_db2.stub', 'db2_pconnect' => 'ibm_db2/ibm_db2.stub', 'db2_prepare' => 'ibm_db2/ibm_db2.stub', 'db2_primary_keys' => 'ibm_db2/ibm_db2.stub', 'db2_primarykeys' => 'ibm_db2/ibm_db2.stub', 'db2_procedure_columns' => 'ibm_db2/ibm_db2.stub', 'db2_procedurecolumns' => 'ibm_db2/ibm_db2.stub', 'db2_procedures' => 'ibm_db2/ibm_db2.stub', 'db2_result' => 'ibm_db2/ibm_db2.stub', 'db2_rollback' => 'ibm_db2/ibm_db2.stub', 'db2_server_info' => 'ibm_db2/ibm_db2.stub', 'db2_set_option' => 'ibm_db2/ibm_db2.stub', 'db2_setoption' => 'ibm_db2/ibm_db2.stub', 'db2_special_columns' => 'ibm_db2/ibm_db2.stub', 'db2_specialcolumns' => 'ibm_db2/ibm_db2.stub', 'db2_statistics' => 'ibm_db2/ibm_db2.stub', 'db2_stmt_error' => 'ibm_db2/ibm_db2.stub', 'db2_stmt_errormsg' => 'ibm_db2/ibm_db2.stub', 'db2_table_privileges' => 'ibm_db2/ibm_db2.stub', 'db2_tableprivileges' => 'ibm_db2/ibm_db2.stub', 'db2_tables' => 'ibm_db2/ibm_db2.stub', 'dba_close' => 'dba/dba.stub', 'dba_delete' => 'dba/dba.stub', 'dba_exists' => 'dba/dba.stub', 'dba_fetch' => 'dba/dba.stub', 'dba_firstkey' => 'dba/dba.stub', 'dba_handlers' => 'dba/dba.stub', 'dba_insert' => 'dba/dba.stub', 'dba_key_split' => 'dba/dba.stub', 'dba_list' => 'dba/dba.stub', 'dba_nextkey' => 'dba/dba.stub', 'dba_open' => 'dba/dba.stub', 'dba_optimize' => 'dba/dba.stub', 'dba_popen' => 'dba/dba.stub', 'dba_replace' => 'dba/dba.stub', 'dba_sync' => 'dba/dba.stub', 'dcgettext' => 'gettext/gettext.stub', 'dcngettext' => 'gettext/gettext.stub', 'debug_backtrace' => 'Core/Core.stub', 'debug_print_backtrace' => 'Core/Core.stub', 'debug_zval_dump' => 'standard/standard_4.stub', 'debugger_connect' => 'ZendDebugger/ZendDebugger.stub', 'debugger_connector_pid' => 'ZendDebugger/ZendDebugger.stub', 'debugger_get_server_start_time' => 'ZendDebugger/ZendDebugger.stub', 'debugger_print' => 'ZendDebugger/ZendDebugger.stub', 'debugger_start_debug' => 'ZendDebugger/ZendDebugger.stub', 'decbin' => 'standard/standard_3.stub', 'dechex' => 'standard/standard_3.stub', 'decoct' => 'standard/standard_3.stub', 'defer' => 'swoole/functions.stub', 'define' => 'Core/Core.stub', 'define_syslog_variables' => 'standard/standard_8.stub', 'defined' => 'Core/Core.stub', 'deflate_add' => 'zlib/zlib.stub', 'deflate_init' => 'zlib/zlib.stub', 'deg2rad' => 'standard/standard_3.stub', 'dgettext' => 'gettext/gettext.stub', 'dio_close' => 'dio/dio.stub', 'dio_fcntl' => 'dio/dio.stub', 'dio_open' => 'dio/dio.stub', 'dio_raw' => 'dio/dio.stub', 'dio_read' => 'dio/dio.stub', 'dio_seek' => 'dio/dio.stub', 'dio_serial' => 'dio/dio.stub', 'dio_stat' => 'dio/dio.stub', 'dio_tcsetattr' => 'dio/dio.stub', 'dio_truncate' => 'dio/dio.stub', 'dio_write' => 'dio/dio.stub', 'dir' => 'standard/standard_7.stub', 'dirname' => 'standard/standard_1.stub', 'disk_free_space' => 'standard/standard_7.stub', 'disk_total_space' => 'standard/standard_7.stub', 'diskfreespace' => 'standard/standard_7.stub', 'dl' => 'standard/basic.stub', 'dngettext' => 'gettext/gettext.stub', 'dns_check_record' => 'standard/standard_4.stub', 'dns_get_mx' => 'standard/standard_4.stub', 'dns_get_record' => 'standard/standard_4.stub', 'dom_import_simplexml' => 'dom/dom.stub', 'doubleval' => 'standard/standard_5.stub', 'each' => 'Core/Core.stub', 'easter_date' => 'calendar/calendar.stub', 'easter_days' => 'calendar/calendar.stub', 'eio_busy' => 'eio/eio.stub', 'eio_cancel' => 'eio/eio.stub', 'eio_chmod' => 'eio/eio.stub', 'eio_chown' => 'eio/eio.stub', 'eio_close' => 'eio/eio.stub', 'eio_custom' => 'eio/eio.stub', 'eio_dup2' => 'eio/eio.stub', 'eio_event_loop' => 'eio/eio.stub', 'eio_fallocate' => 'eio/eio.stub', 'eio_fchmod' => 'eio/eio.stub', 'eio_fchown' => 'eio/eio.stub', 'eio_fdatasync' => 'eio/eio.stub', 'eio_fstat' => 'eio/eio.stub', 'eio_fstatvfs' => 'eio/eio.stub', 'eio_fsync' => 'eio/eio.stub', 'eio_ftruncate' => 'eio/eio.stub', 'eio_futime' => 'eio/eio.stub', 'eio_get_event_stream' => 'eio/eio.stub', 'eio_get_last_error' => 'eio/eio.stub', 'eio_grp' => 'eio/eio.stub', 'eio_grp_add' => 'eio/eio.stub', 'eio_grp_cancel' => 'eio/eio.stub', 'eio_grp_limit' => 'eio/eio.stub', 'eio_link' => 'eio/eio.stub', 'eio_lstat' => 'eio/eio.stub', 'eio_mkdir' => 'eio/eio.stub', 'eio_mknod' => 'eio/eio.stub', 'eio_nop' => 'eio/eio.stub', 'eio_npending' => 'eio/eio.stub', 'eio_nready' => 'eio/eio.stub', 'eio_nreqs' => 'eio/eio.stub', 'eio_nthreads' => 'eio/eio.stub', 'eio_open' => 'eio/eio.stub', 'eio_poll' => 'eio/eio.stub', 'eio_read' => 'eio/eio.stub', 'eio_readahead' => 'eio/eio.stub', 'eio_readdir' => 'eio/eio.stub', 'eio_readlink' => 'eio/eio.stub', 'eio_realpath' => 'eio/eio.stub', 'eio_rename' => 'eio/eio.stub', 'eio_rmdir' => 'eio/eio.stub', 'eio_seek' => 'eio/eio.stub', 'eio_sendfile' => 'eio/eio.stub', 'eio_set_max_idle' => 'eio/eio.stub', 'eio_set_max_parallel' => 'eio/eio.stub', 'eio_set_max_poll_reqs' => 'eio/eio.stub', 'eio_set_max_poll_time' => 'eio/eio.stub', 'eio_set_min_parallel' => 'eio/eio.stub', 'eio_stat' => 'eio/eio.stub', 'eio_statvfs' => 'eio/eio.stub', 'eio_symlink' => 'eio/eio.stub', 'eio_sync' => 'eio/eio.stub', 'eio_sync_file_range' => 'eio/eio.stub', 'eio_syncfs' => 'eio/eio.stub', 'eio_truncate' => 'eio/eio.stub', 'eio_unlink' => 'eio/eio.stub', 'eio_utime' => 'eio/eio.stub', 'eio_write' => 'eio/eio.stub', 'enchant_broker_describe' => 'enchant/enchant.stub', 'enchant_broker_dict_exists' => 'enchant/enchant.stub', 'enchant_broker_free' => 'enchant/enchant.stub', 'enchant_broker_free_dict' => 'enchant/enchant.stub', 'enchant_broker_get_dict_path' => 'enchant/enchant.stub', 'enchant_broker_get_error' => 'enchant/enchant.stub', 'enchant_broker_init' => 'enchant/enchant.stub', 'enchant_broker_list_dicts' => 'enchant/enchant.stub', 'enchant_broker_request_dict' => 'enchant/enchant.stub', 'enchant_broker_request_pwl_dict' => 'enchant/enchant.stub', 'enchant_broker_set_dict_path' => 'enchant/enchant.stub', 'enchant_broker_set_ordering' => 'enchant/enchant.stub', 'enchant_dict_add' => 'enchant/enchant.stub', 'enchant_dict_add_to_personal' => 'enchant/enchant.stub', 'enchant_dict_add_to_session' => 'enchant/enchant.stub', 'enchant_dict_check' => 'enchant/enchant.stub', 'enchant_dict_describe' => 'enchant/enchant.stub', 'enchant_dict_get_error' => 'enchant/enchant.stub', 'enchant_dict_is_added' => 'enchant/enchant.stub', 'enchant_dict_is_in_session' => 'enchant/enchant.stub', 'enchant_dict_quick_check' => 'enchant/enchant.stub', 'enchant_dict_store_replacement' => 'enchant/enchant.stub', 'enchant_dict_suggest' => 'enchant/enchant.stub', 'end' => 'standard/standard_8.stub', 'enum_exists' => 'Core/Core.stub', 'ereg' => 'regex/ereg.stub', 'ereg_replace' => 'regex/ereg.stub', 'eregi' => 'regex/ereg.stub', 'eregi_replace' => 'regex/ereg.stub', 'error_clear_last' => 'standard/basic.stub', 'error_get_last' => 'standard/standard_4.stub', 'error_log' => 'standard/standard_3.stub', 'error_reporting' => 'Core/Core.stub', 'escapeshellarg' => 'standard/standard_2.stub', 'escapeshellcmd' => 'standard/standard_2.stub', 'event_add' => 'libevent/libevent.stub', 'event_base_free' => 'libevent/libevent.stub', 'event_base_loop' => 'libevent/libevent.stub', 'event_base_loopbreak' => 'libevent/libevent.stub', 'event_base_loopexit' => 'libevent/libevent.stub', 'event_base_new' => 'libevent/libevent.stub', 'event_base_priority_init' => 'libevent/libevent.stub', 'event_base_set' => 'libevent/libevent.stub', 'event_buffer_base_set' => 'libevent/libevent.stub', 'event_buffer_disable' => 'libevent/libevent.stub', 'event_buffer_enable' => 'libevent/libevent.stub', 'event_buffer_fd_set' => 'libevent/libevent.stub', 'event_buffer_free' => 'libevent/libevent.stub', 'event_buffer_new' => 'libevent/libevent.stub', 'event_buffer_priority_set' => 'libevent/libevent.stub', 'event_buffer_read' => 'libevent/libevent.stub', 'event_buffer_set_callback' => 'libevent/libevent.stub', 'event_buffer_timeout_set' => 'libevent/libevent.stub', 'event_buffer_watermark_set' => 'libevent/libevent.stub', 'event_buffer_write' => 'libevent/libevent.stub', 'event_del' => 'libevent/libevent.stub', 'event_free' => 'libevent/libevent.stub', 'event_new' => 'libevent/libevent.stub', 'event_set' => 'libevent/libevent.stub', 'event_timer_add' => 'libevent/libevent.stub', 'event_timer_del' => 'libevent/libevent.stub', 'event_timer_new' => 'libevent/libevent.stub', 'event_timer_pending' => 'libevent/libevent.stub', 'event_timer_set' => 'libevent/libevent.stub', 'exec' => 'standard/standard_2.stub', 'exif_imagetype' => 'exif/exif.stub', 'exif_read_data' => 'exif/exif.stub', 'exif_tagname' => 'exif/exif.stub', 'exif_thumbnail' => 'exif/exif.stub', 'exp' => 'standard/standard_3.stub', 'expect_expectl' => 'expect/expect.stub', 'expect_popen' => 'expect/expect.stub', 'explode' => 'standard/standard_1.stub', 'expm1' => 'standard/standard_3.stub', 'extension_loaded' => 'Core/Core.stub', 'extract' => 'standard/standard_8.stub', 'ezmlm_hash' => 'standard/standard_7.stub', 'fann_cascadetrain_on_data' => 'fann/fann.stub', 'fann_cascadetrain_on_file' => 'fann/fann.stub', 'fann_clear_scaling_params' => 'fann/fann.stub', 'fann_copy' => 'fann/fann.stub', 'fann_create_from_file' => 'fann/fann.stub', 'fann_create_shortcut' => 'fann/fann.stub', 'fann_create_shortcut_array' => 'fann/fann.stub', 'fann_create_sparse' => 'fann/fann.stub', 'fann_create_sparse_array' => 'fann/fann.stub', 'fann_create_standard' => 'fann/fann.stub', 'fann_create_standard_array' => 'fann/fann.stub', 'fann_create_train' => 'fann/fann.stub', 'fann_create_train_from_callback' => 'fann/fann.stub', 'fann_descale_input' => 'fann/fann.stub', 'fann_descale_output' => 'fann/fann.stub', 'fann_descale_train' => 'fann/fann.stub', 'fann_destroy' => 'fann/fann.stub', 'fann_destroy_train' => 'fann/fann.stub', 'fann_duplicate_train_data' => 'fann/fann.stub', 'fann_get_MSE' => 'fann/fann.stub', 'fann_get_activation_function' => 'fann/fann.stub', 'fann_get_activation_steepness' => 'fann/fann.stub', 'fann_get_bias_array' => 'fann/fann.stub', 'fann_get_bit_fail' => 'fann/fann.stub', 'fann_get_bit_fail_limit' => 'fann/fann.stub', 'fann_get_cascade_activation_functions' => 'fann/fann.stub', 'fann_get_cascade_activation_functions_count' => 'fann/fann.stub', 'fann_get_cascade_activation_steepnesses' => 'fann/fann.stub', 'fann_get_cascade_activation_steepnesses_count' => 'fann/fann.stub', 'fann_get_cascade_candidate_change_fraction' => 'fann/fann.stub', 'fann_get_cascade_candidate_limit' => 'fann/fann.stub', 'fann_get_cascade_candidate_stagnation_epochs' => 'fann/fann.stub', 'fann_get_cascade_max_cand_epochs' => 'fann/fann.stub', 'fann_get_cascade_max_out_epochs' => 'fann/fann.stub', 'fann_get_cascade_min_cand_epochs' => 'fann/fann.stub', 'fann_get_cascade_min_out_epochs' => 'fann/fann.stub', 'fann_get_cascade_num_candidate_groups' => 'fann/fann.stub', 'fann_get_cascade_num_candidates' => 'fann/fann.stub', 'fann_get_cascade_output_change_fraction' => 'fann/fann.stub', 'fann_get_cascade_output_stagnation_epochs' => 'fann/fann.stub', 'fann_get_cascade_weight_multiplier' => 'fann/fann.stub', 'fann_get_connection_array' => 'fann/fann.stub', 'fann_get_connection_rate' => 'fann/fann.stub', 'fann_get_errno' => 'fann/fann.stub', 'fann_get_errstr' => 'fann/fann.stub', 'fann_get_layer_array' => 'fann/fann.stub', 'fann_get_learning_momentum' => 'fann/fann.stub', 'fann_get_learning_rate' => 'fann/fann.stub', 'fann_get_network_type' => 'fann/fann.stub', 'fann_get_num_input' => 'fann/fann.stub', 'fann_get_num_layers' => 'fann/fann.stub', 'fann_get_num_output' => 'fann/fann.stub', 'fann_get_quickprop_decay' => 'fann/fann.stub', 'fann_get_quickprop_mu' => 'fann/fann.stub', 'fann_get_rprop_decrease_factor' => 'fann/fann.stub', 'fann_get_rprop_delta_max' => 'fann/fann.stub', 'fann_get_rprop_delta_min' => 'fann/fann.stub', 'fann_get_rprop_delta_zero' => 'fann/fann.stub', 'fann_get_rprop_increase_factor' => 'fann/fann.stub', 'fann_get_sarprop_step_error_shift' => 'fann/fann.stub', 'fann_get_sarprop_step_error_threshold_factor' => 'fann/fann.stub', 'fann_get_sarprop_temperature' => 'fann/fann.stub', 'fann_get_sarprop_weight_decay_shift' => 'fann/fann.stub', 'fann_get_total_connections' => 'fann/fann.stub', 'fann_get_total_neurons' => 'fann/fann.stub', 'fann_get_train_error_function' => 'fann/fann.stub', 'fann_get_train_stop_function' => 'fann/fann.stub', 'fann_get_training_algorithm' => 'fann/fann.stub', 'fann_init_weights' => 'fann/fann.stub', 'fann_length_train_data' => 'fann/fann.stub', 'fann_merge_train_data' => 'fann/fann.stub', 'fann_num_input_train_data' => 'fann/fann.stub', 'fann_num_output_train_data' => 'fann/fann.stub', 'fann_print_error' => 'fann/fann.stub', 'fann_randomize_weights' => 'fann/fann.stub', 'fann_read_train_from_file' => 'fann/fann.stub', 'fann_reset_MSE' => 'fann/fann.stub', 'fann_reset_errno' => 'fann/fann.stub', 'fann_reset_errstr' => 'fann/fann.stub', 'fann_run' => 'fann/fann.stub', 'fann_save' => 'fann/fann.stub', 'fann_save_train' => 'fann/fann.stub', 'fann_scale_input' => 'fann/fann.stub', 'fann_scale_input_train_data' => 'fann/fann.stub', 'fann_scale_output' => 'fann/fann.stub', 'fann_scale_output_train_data' => 'fann/fann.stub', 'fann_scale_train' => 'fann/fann.stub', 'fann_scale_train_data' => 'fann/fann.stub', 'fann_set_activation_function' => 'fann/fann.stub', 'fann_set_activation_function_hidden' => 'fann/fann.stub', 'fann_set_activation_function_layer' => 'fann/fann.stub', 'fann_set_activation_function_output' => 'fann/fann.stub', 'fann_set_activation_steepness' => 'fann/fann.stub', 'fann_set_activation_steepness_hidden' => 'fann/fann.stub', 'fann_set_activation_steepness_layer' => 'fann/fann.stub', 'fann_set_activation_steepness_output' => 'fann/fann.stub', 'fann_set_bit_fail_limit' => 'fann/fann.stub', 'fann_set_callback' => 'fann/fann.stub', 'fann_set_cascade_activation_functions' => 'fann/fann.stub', 'fann_set_cascade_activation_steepnesses' => 'fann/fann.stub', 'fann_set_cascade_candidate_change_fraction' => 'fann/fann.stub', 'fann_set_cascade_candidate_limit' => 'fann/fann.stub', 'fann_set_cascade_candidate_stagnation_epochs' => 'fann/fann.stub', 'fann_set_cascade_max_cand_epochs' => 'fann/fann.stub', 'fann_set_cascade_max_out_epochs' => 'fann/fann.stub', 'fann_set_cascade_min_cand_epochs' => 'fann/fann.stub', 'fann_set_cascade_min_out_epochs' => 'fann/fann.stub', 'fann_set_cascade_num_candidate_groups' => 'fann/fann.stub', 'fann_set_cascade_output_change_fraction' => 'fann/fann.stub', 'fann_set_cascade_output_stagnation_epochs' => 'fann/fann.stub', 'fann_set_cascade_weight_multiplier' => 'fann/fann.stub', 'fann_set_error_log' => 'fann/fann.stub', 'fann_set_input_scaling_params' => 'fann/fann.stub', 'fann_set_learning_momentum' => 'fann/fann.stub', 'fann_set_learning_rate' => 'fann/fann.stub', 'fann_set_output_scaling_params' => 'fann/fann.stub', 'fann_set_quickprop_decay' => 'fann/fann.stub', 'fann_set_quickprop_mu' => 'fann/fann.stub', 'fann_set_rprop_decrease_factor' => 'fann/fann.stub', 'fann_set_rprop_delta_max' => 'fann/fann.stub', 'fann_set_rprop_delta_min' => 'fann/fann.stub', 'fann_set_rprop_delta_zero' => 'fann/fann.stub', 'fann_set_rprop_increase_factor' => 'fann/fann.stub', 'fann_set_sarprop_step_error_shift' => 'fann/fann.stub', 'fann_set_sarprop_step_error_threshold_factor' => 'fann/fann.stub', 'fann_set_sarprop_temperature' => 'fann/fann.stub', 'fann_set_sarprop_weight_decay_shift' => 'fann/fann.stub', 'fann_set_scaling_params' => 'fann/fann.stub', 'fann_set_train_error_function' => 'fann/fann.stub', 'fann_set_train_stop_function' => 'fann/fann.stub', 'fann_set_training_algorithm' => 'fann/fann.stub', 'fann_set_weight' => 'fann/fann.stub', 'fann_set_weight_array' => 'fann/fann.stub', 'fann_shuffle_train_data' => 'fann/fann.stub', 'fann_subset_train_data' => 'fann/fann.stub', 'fann_test' => 'fann/fann.stub', 'fann_test_data' => 'fann/fann.stub', 'fann_train' => 'fann/fann.stub', 'fann_train_epoch' => 'fann/fann.stub', 'fann_train_on_data' => 'fann/fann.stub', 'fann_train_on_file' => 'fann/fann.stub', 'fastcgi_finish_request' => 'fpm/fpm.stub', 'fbird_add_user' => 'interbase/interbase.stub', 'fbird_affected_rows' => 'interbase/interbase.stub', 'fbird_backup' => 'interbase/interbase.stub', 'fbird_blob_add' => 'interbase/interbase.stub', 'fbird_blob_cancel' => 'interbase/interbase.stub', 'fbird_blob_close' => 'interbase/interbase.stub', 'fbird_blob_create' => 'interbase/interbase.stub', 'fbird_blob_echo' => 'interbase/interbase.stub', 'fbird_blob_get' => 'interbase/interbase.stub', 'fbird_blob_import' => 'interbase/interbase.stub', 'fbird_blob_info' => 'interbase/interbase.stub', 'fbird_blob_open' => 'interbase/interbase.stub', 'fbird_close' => 'interbase/interbase.stub', 'fbird_commit' => 'interbase/interbase.stub', 'fbird_commit_ret' => 'interbase/interbase.stub', 'fbird_connect' => 'interbase/interbase.stub', 'fbird_db_info' => 'interbase/interbase.stub', 'fbird_delete_user' => 'interbase/interbase.stub', 'fbird_drop_db' => 'interbase/interbase.stub', 'fbird_errcode' => 'interbase/interbase.stub', 'fbird_errmsg' => 'interbase/interbase.stub', 'fbird_execute' => 'interbase/interbase.stub', 'fbird_fetch_assoc' => 'interbase/interbase.stub', 'fbird_fetch_object' => 'interbase/interbase.stub', 'fbird_fetch_row' => 'interbase/interbase.stub', 'fbird_field_info' => 'interbase/interbase.stub', 'fbird_free_event_handler' => 'interbase/interbase.stub', 'fbird_free_query' => 'interbase/interbase.stub', 'fbird_free_result' => 'interbase/interbase.stub', 'fbird_gen_id' => 'interbase/interbase.stub', 'fbird_maintain_db' => 'interbase/interbase.stub', 'fbird_modify_user' => 'interbase/interbase.stub', 'fbird_name_result' => 'interbase/interbase.stub', 'fbird_num_fields' => 'interbase/interbase.stub', 'fbird_num_params' => 'interbase/interbase.stub', 'fbird_param_info' => 'interbase/interbase.stub', 'fbird_pconnect' => 'interbase/interbase.stub', 'fbird_prepare' => 'interbase/interbase.stub', 'fbird_query' => 'interbase/interbase.stub', 'fbird_restore' => 'interbase/interbase.stub', 'fbird_rollback' => 'interbase/interbase.stub', 'fbird_rollback_ret' => 'interbase/interbase.stub', 'fbird_server_info' => 'interbase/interbase.stub', 'fbird_service_attach' => 'interbase/interbase.stub', 'fbird_service_detach' => 'interbase/interbase.stub', 'fbird_set_event_handler' => 'interbase/interbase.stub', 'fbird_trans' => 'interbase/interbase.stub', 'fbird_wait_event' => 'interbase/interbase.stub', 'fclose' => 'standard/standard_5.stub', 'fdatasync' => 'standard/standard_5.stub', 'fdiv' => 'standard/standard_3.stub', 'feof' => 'standard/standard_5.stub', 'fflush' => 'standard/standard_5.stub', 'fgetc' => 'standard/standard_5.stub', 'fgetcsv' => 'standard/standard_6.stub', 'fgets' => 'standard/standard_5.stub', 'fgetss' => 'standard/standard_5.stub', 'file' => 'standard/standard_5.stub', 'file_exists' => 'standard/standard_7.stub', 'file_get_contents' => 'standard/standard_5.stub', 'file_put_contents' => 'standard/standard_5.stub', 'fileatime' => 'standard/standard_7.stub', 'filectime' => 'standard/standard_7.stub', 'filegroup' => 'standard/standard_7.stub', 'fileinode' => 'standard/standard_7.stub', 'filemtime' => 'standard/standard_7.stub', 'fileowner' => 'standard/standard_7.stub', 'fileperms' => 'standard/standard_7.stub', 'filesize' => 'standard/standard_7.stub', 'filetype' => 'standard/standard_7.stub', 'filter_has_var' => 'filter/filter.stub', 'filter_id' => 'filter/filter.stub', 'filter_input' => 'filter/filter.stub', 'filter_input_array' => 'filter/filter.stub', 'filter_list' => 'filter/filter.stub', 'filter_var' => 'filter/filter.stub', 'filter_var_array' => 'filter/filter.stub', 'finfo_buffer' => 'fileinfo/fileinfo.stub', 'finfo_close' => 'fileinfo/fileinfo.stub', 'finfo_file' => 'fileinfo/fileinfo.stub', 'finfo_open' => 'fileinfo/fileinfo.stub', 'finfo_set_flags' => 'fileinfo/fileinfo.stub', 'floatval' => 'standard/standard_5.stub', 'flock' => 'standard/standard_6.stub', 'floor' => 'standard/standard_3.stub', 'flush' => 'standard/standard_0.stub', 'fmod' => 'standard/standard_3.stub', 'fnmatch' => 'standard/standard_6.stub', 'fopen' => 'standard/standard_5.stub', 'forward_static_call' => 'standard/standard_4.stub', 'forward_static_call_array' => 'standard/standard_4.stub', 'fpassthru' => 'standard/standard_5.stub', 'fpm_get_status' => 'fpm/fpm.stub', 'fprintf' => 'standard/standard_2.stub', 'fputcsv' => 'standard/standard_6.stub', 'fputs' => 'standard/standard_5.stub', 'fread' => 'standard/standard_5.stub', 'frenchtojd' => 'calendar/calendar.stub', 'fscanf' => 'standard/standard_2.stub', 'fseek' => 'standard/standard_5.stub', 'fsockopen' => 'standard/standard_7.stub', 'fstat' => 'standard/standard_5.stub', 'fsync' => 'standard/standard_5.stub', 'ftell' => 'standard/standard_5.stub', 'ftok' => 'standard/standard_9.stub', 'ftp_alloc' => 'ftp/ftp.stub', 'ftp_append' => 'ftp/ftp.stub', 'ftp_cdup' => 'ftp/ftp.stub', 'ftp_chdir' => 'ftp/ftp.stub', 'ftp_chmod' => 'ftp/ftp.stub', 'ftp_close' => 'ftp/ftp.stub', 'ftp_connect' => 'ftp/ftp.stub', 'ftp_delete' => 'ftp/ftp.stub', 'ftp_exec' => 'ftp/ftp.stub', 'ftp_fget' => 'ftp/ftp.stub', 'ftp_fput' => 'ftp/ftp.stub', 'ftp_get' => 'ftp/ftp.stub', 'ftp_get_option' => 'ftp/ftp.stub', 'ftp_login' => 'ftp/ftp.stub', 'ftp_mdtm' => 'ftp/ftp.stub', 'ftp_mkdir' => 'ftp/ftp.stub', 'ftp_mlsd' => 'ftp/ftp.stub', 'ftp_nb_continue' => 'ftp/ftp.stub', 'ftp_nb_fget' => 'ftp/ftp.stub', 'ftp_nb_fput' => 'ftp/ftp.stub', 'ftp_nb_get' => 'ftp/ftp.stub', 'ftp_nb_put' => 'ftp/ftp.stub', 'ftp_nlist' => 'ftp/ftp.stub', 'ftp_pasv' => 'ftp/ftp.stub', 'ftp_put' => 'ftp/ftp.stub', 'ftp_pwd' => 'ftp/ftp.stub', 'ftp_quit' => 'ftp/ftp.stub', 'ftp_raw' => 'ftp/ftp.stub', 'ftp_rawlist' => 'ftp/ftp.stub', 'ftp_rename' => 'ftp/ftp.stub', 'ftp_rmdir' => 'ftp/ftp.stub', 'ftp_set_option' => 'ftp/ftp.stub', 'ftp_site' => 'ftp/ftp.stub', 'ftp_size' => 'ftp/ftp.stub', 'ftp_ssl_connect' => 'ftp/ftp.stub', 'ftp_systype' => 'ftp/ftp.stub', 'ftruncate' => 'standard/standard_5.stub', 'func_get_arg' => 'Core/Core.stub', 'func_get_args' => 'Core/Core.stub', 'func_num_args' => 'Core/Core.stub', 'function_exists' => 'Core/Core.stub', 'fwrite' => 'standard/standard_5.stub', 'gc_collect_cycles' => 'Core/Core.stub', 'gc_disable' => 'Core/Core.stub', 'gc_enable' => 'Core/Core.stub', 'gc_enabled' => 'Core/Core.stub', 'gc_mem_caches' => 'Core/Core.stub', 'gc_status' => 'Core/Core.stub', 'gd_info' => 'gd/gd.stub', 'gearman_bugreport' => 'gearman/gearman.stub', 'gearman_client_add_options' => 'gearman/gearman.stub', 'gearman_client_add_server' => 'gearman/gearman.stub', 'gearman_client_add_servers' => 'gearman/gearman.stub', 'gearman_client_add_task' => 'gearman/gearman.stub', 'gearman_client_add_task_background' => 'gearman/gearman.stub', 'gearman_client_add_task_high' => 'gearman/gearman.stub', 'gearman_client_add_task_high_background' => 'gearman/gearman.stub', 'gearman_client_add_task_low' => 'gearman/gearman.stub', 'gearman_client_add_task_low_background' => 'gearman/gearman.stub', 'gearman_client_add_task_status' => 'gearman/gearman.stub', 'gearman_client_clear_fn' => 'gearman/gearman.stub', 'gearman_client_clone' => 'gearman/gearman.stub', 'gearman_client_context' => 'gearman/gearman.stub', 'gearman_client_create' => 'gearman/gearman.stub', 'gearman_client_do' => 'gearman/gearman.stub', 'gearman_client_do_background' => 'gearman/gearman.stub', 'gearman_client_do_high' => 'gearman/gearman.stub', 'gearman_client_do_high_background' => 'gearman/gearman.stub', 'gearman_client_do_job_handle' => 'gearman/gearman.stub', 'gearman_client_do_low' => 'gearman/gearman.stub', 'gearman_client_do_low_background' => 'gearman/gearman.stub', 'gearman_client_do_normal' => 'gearman/gearman.stub', 'gearman_client_do_status' => 'gearman/gearman.stub', 'gearman_client_echo' => 'gearman/gearman.stub', 'gearman_client_errno' => 'gearman/gearman.stub', 'gearman_client_error' => 'gearman/gearman.stub', 'gearman_client_job_status' => 'gearman/gearman.stub', 'gearman_client_options' => 'gearman/gearman.stub', 'gearman_client_remove_options' => 'gearman/gearman.stub', 'gearman_client_return_code' => 'gearman/gearman.stub', 'gearman_client_run_tasks' => 'gearman/gearman.stub', 'gearman_client_set_complete_fn' => 'gearman/gearman.stub', 'gearman_client_set_context' => 'gearman/gearman.stub', 'gearman_client_set_created_fn' => 'gearman/gearman.stub', 'gearman_client_set_data_fn' => 'gearman/gearman.stub', 'gearman_client_set_exception_fn' => 'gearman/gearman.stub', 'gearman_client_set_fail_fn' => 'gearman/gearman.stub', 'gearman_client_set_options' => 'gearman/gearman.stub', 'gearman_client_set_status_fn' => 'gearman/gearman.stub', 'gearman_client_set_timeout' => 'gearman/gearman.stub', 'gearman_client_set_warning_fn' => 'gearman/gearman.stub', 'gearman_client_set_workload_fn' => 'gearman/gearman.stub', 'gearman_client_timeout' => 'gearman/gearman.stub', 'gearman_client_wait' => 'gearman/gearman.stub', 'gearman_job_function_name' => 'gearman/gearman.stub', 'gearman_job_handle' => 'gearman/gearman.stub', 'gearman_job_return_code' => 'gearman/gearman.stub', 'gearman_job_send_complete' => 'gearman/gearman.stub', 'gearman_job_send_data' => 'gearman/gearman.stub', 'gearman_job_send_exception' => 'gearman/gearman.stub', 'gearman_job_send_fail' => 'gearman/gearman.stub', 'gearman_job_send_status' => 'gearman/gearman.stub', 'gearman_job_send_warning' => 'gearman/gearman.stub', 'gearman_job_unique' => 'gearman/gearman.stub', 'gearman_job_workload' => 'gearman/gearman.stub', 'gearman_job_workload_size' => 'gearman/gearman.stub', 'gearman_task_data' => 'gearman/gearman.stub', 'gearman_task_data_size' => 'gearman/gearman.stub', 'gearman_task_denominator' => 'gearman/gearman.stub', 'gearman_task_function_name' => 'gearman/gearman.stub', 'gearman_task_is_known' => 'gearman/gearman.stub', 'gearman_task_is_running' => 'gearman/gearman.stub', 'gearman_task_job_handle' => 'gearman/gearman.stub', 'gearman_task_numerator' => 'gearman/gearman.stub', 'gearman_task_recv_data' => 'gearman/gearman.stub', 'gearman_task_return_code' => 'gearman/gearman.stub', 'gearman_task_send_workload' => 'gearman/gearman.stub', 'gearman_task_unique' => 'gearman/gearman.stub', 'gearman_verbose_name' => 'gearman/gearman.stub', 'gearman_version' => 'gearman/gearman.stub', 'gearman_worker_add_function' => 'gearman/gearman.stub', 'gearman_worker_add_options' => 'gearman/gearman.stub', 'gearman_worker_add_server' => 'gearman/gearman.stub', 'gearman_worker_add_servers' => 'gearman/gearman.stub', 'gearman_worker_clone' => 'gearman/gearman.stub', 'gearman_worker_create' => 'gearman/gearman.stub', 'gearman_worker_echo' => 'gearman/gearman.stub', 'gearman_worker_errno' => 'gearman/gearman.stub', 'gearman_worker_error' => 'gearman/gearman.stub', 'gearman_worker_grab_job' => 'gearman/gearman.stub', 'gearman_worker_options' => 'gearman/gearman.stub', 'gearman_worker_register' => 'gearman/gearman.stub', 'gearman_worker_remove_options' => 'gearman/gearman.stub', 'gearman_worker_return_code' => 'gearman/gearman.stub', 'gearman_worker_set_options' => 'gearman/gearman.stub', 'gearman_worker_set_timeout' => 'gearman/gearman.stub', 'gearman_worker_timeout' => 'gearman/gearman.stub', 'gearman_worker_unregister' => 'gearman/gearman.stub', 'gearman_worker_unregister_all' => 'gearman/gearman.stub', 'gearman_worker_wait' => 'gearman/gearman.stub', 'gearman_worker_work' => 'gearman/gearman.stub', 'geoip_asnum_by_name' => 'geoip/geoip.stub', 'geoip_continent_code_by_name' => 'geoip/geoip.stub', 'geoip_country_code3_by_name' => 'geoip/geoip.stub', 'geoip_country_code_by_name' => 'geoip/geoip.stub', 'geoip_country_name_by_name' => 'geoip/geoip.stub', 'geoip_database_info' => 'geoip/geoip.stub', 'geoip_db_avail' => 'geoip/geoip.stub', 'geoip_db_filename' => 'geoip/geoip.stub', 'geoip_db_get_all_info' => 'geoip/geoip.stub', 'geoip_id_by_name' => 'geoip/geoip.stub', 'geoip_isp_by_name' => 'geoip/geoip.stub', 'geoip_netspeedcell_by_name' => 'geoip/geoip.stub', 'geoip_org_by_name' => 'geoip/geoip.stub', 'geoip_record_by_name' => 'geoip/geoip.stub', 'geoip_region_by_name' => 'geoip/geoip.stub', 'geoip_region_name_by_code' => 'geoip/geoip.stub', 'geoip_setup_custom_directory' => 'geoip/geoip.stub', 'geoip_time_zone_by_country_and_region' => 'geoip/geoip.stub', 'get_browser' => 'standard/standard_7.stub', 'get_call_stack' => 'ZendDebugger/ZendDebugger.stub', 'get_called_class' => 'Core/Core.stub', 'get_cfg_var' => 'standard/standard_3.stub', 'get_class' => 'Core/Core.stub', 'get_class_methods' => 'Core/Core.stub', 'get_class_vars' => 'Core/Core.stub', 'get_current_user' => 'standard/standard_3.stub', 'get_debug_type' => 'standard/standard_9.stub', 'get_declared_classes' => 'Core/Core.stub', 'get_declared_interfaces' => 'Core/Core.stub', 'get_declared_traits' => 'Core/Core.stub', 'get_defined_constants' => 'Core/Core.stub', 'get_defined_functions' => 'Core/Core.stub', 'get_defined_vars' => 'Core/Core.stub', 'get_extension_funcs' => 'Core/Core.stub', 'get_headers' => 'standard/standard_6.stub', 'get_html_translation_table' => 'standard/standard_0.stub', 'get_include_path' => 'standard/standard_4.stub', 'get_included_files' => 'Core/Core.stub', 'get_loaded_extensions' => 'Core/Core.stub', 'get_magic_quotes_gpc' => 'standard/standard_3.stub', 'get_magic_quotes_runtime' => 'standard/standard_3.stub', 'get_mangled_object_vars' => 'standard/standard_9.stub', 'get_meta_tags' => 'standard/standard_6.stub', 'get_object_vars' => 'Core/Core.stub', 'get_parent_class' => 'Core/Core.stub', 'get_required_files' => 'Core/Core.stub', 'get_resource_id' => 'standard/standard_9.stub', 'get_resource_type' => 'Core/Core.stub', 'get_resources' => 'Core/Core.stub', 'getallheaders' => 'standard/standard_4.stub', 'getcwd' => 'standard/standard_7.stub', 'getdate' => 'date/date.stub', 'getdir' => 'standard/standard_7.stub', 'getenv' => 'standard/standard_3.stub', 'gethostbyaddr' => 'standard/standard_4.stub', 'gethostbyname' => 'standard/standard_4.stub', 'gethostbynamel' => 'standard/standard_4.stub', 'gethostname' => 'standard/standard_4.stub', 'getimagesize' => 'standard/standard_0.stub', 'getimagesizefromstring' => 'standard/standard_8.stub', 'getlastmod' => 'standard/standard_3.stub', 'getmxrr' => 'standard/standard_4.stub', 'getmygid' => 'standard/standard_2.stub', 'getmyinode' => 'standard/standard_2.stub', 'getmypid' => 'standard/standard_2.stub', 'getmyuid' => 'standard/standard_2.stub', 'getopt' => 'standard/standard_3.stub', 'getprotobyname' => 'standard/standard_2.stub', 'getprotobynumber' => 'standard/standard_2.stub', 'getrandmax' => 'random/random.stub', 'getrusage' => 'standard/standard_3.stub', 'getservbyname' => 'standard/standard_2.stub', 'getservbyport' => 'standard/standard_2.stub', 'gettext' => 'gettext/gettext.stub', 'gettimeofday' => 'standard/standard_3.stub', 'gettype' => 'standard/standard_5.stub', 'glob' => 'standard/standard_7.stub', 'gmdate' => 'date/date.stub', 'gmmktime' => 'date/date.stub', 'gmp_abs' => 'gmp/gmp.stub', 'gmp_add' => 'gmp/gmp.stub', 'gmp_and' => 'gmp/gmp.stub', 'gmp_binomial' => 'gmp/gmp.stub', 'gmp_clrbit' => 'gmp/gmp.stub', 'gmp_cmp' => 'gmp/gmp.stub', 'gmp_com' => 'gmp/gmp.stub', 'gmp_div' => 'gmp/gmp.stub', 'gmp_div_q' => 'gmp/gmp.stub', 'gmp_div_qr' => 'gmp/gmp.stub', 'gmp_div_r' => 'gmp/gmp.stub', 'gmp_divexact' => 'gmp/gmp.stub', 'gmp_export' => 'gmp/gmp.stub', 'gmp_fact' => 'gmp/gmp.stub', 'gmp_gcd' => 'gmp/gmp.stub', 'gmp_gcdext' => 'gmp/gmp.stub', 'gmp_hamdist' => 'gmp/gmp.stub', 'gmp_import' => 'gmp/gmp.stub', 'gmp_init' => 'gmp/gmp.stub', 'gmp_intval' => 'gmp/gmp.stub', 'gmp_invert' => 'gmp/gmp.stub', 'gmp_jacobi' => 'gmp/gmp.stub', 'gmp_kronecker' => 'gmp/gmp.stub', 'gmp_lcm' => 'gmp/gmp.stub', 'gmp_legendre' => 'gmp/gmp.stub', 'gmp_mod' => 'gmp/gmp.stub', 'gmp_mul' => 'gmp/gmp.stub', 'gmp_neg' => 'gmp/gmp.stub', 'gmp_nextprime' => 'gmp/gmp.stub', 'gmp_or' => 'gmp/gmp.stub', 'gmp_perfect_power' => 'gmp/gmp.stub', 'gmp_perfect_square' => 'gmp/gmp.stub', 'gmp_popcount' => 'gmp/gmp.stub', 'gmp_pow' => 'gmp/gmp.stub', 'gmp_powm' => 'gmp/gmp.stub', 'gmp_prob_prime' => 'gmp/gmp.stub', 'gmp_random' => 'gmp/gmp.stub', 'gmp_random_bits' => 'gmp/gmp.stub', 'gmp_random_range' => 'gmp/gmp.stub', 'gmp_random_seed' => 'gmp/gmp.stub', 'gmp_root' => 'gmp/gmp.stub', 'gmp_rootrem' => 'gmp/gmp.stub', 'gmp_scan0' => 'gmp/gmp.stub', 'gmp_scan1' => 'gmp/gmp.stub', 'gmp_setbit' => 'gmp/gmp.stub', 'gmp_sign' => 'gmp/gmp.stub', 'gmp_sqrt' => 'gmp/gmp.stub', 'gmp_sqrtrem' => 'gmp/gmp.stub', 'gmp_strval' => 'gmp/gmp.stub', 'gmp_sub' => 'gmp/gmp.stub', 'gmp_testbit' => 'gmp/gmp.stub', 'gmp_xor' => 'gmp/gmp.stub', 'gmstrftime' => 'date/date.stub', 'gnupg_adddecryptkey' => 'gnupg/gnupg.stub', 'gnupg_addencryptkey' => 'gnupg/gnupg.stub', 'gnupg_addsignkey' => 'gnupg/gnupg.stub', 'gnupg_cleardecryptkeys' => 'gnupg/gnupg.stub', 'gnupg_clearencryptkeys' => 'gnupg/gnupg.stub', 'gnupg_clearsignkeys' => 'gnupg/gnupg.stub', 'gnupg_decrypt' => 'gnupg/gnupg.stub', 'gnupg_decryptverify' => 'gnupg/gnupg.stub', 'gnupg_deletekey' => 'gnupg/gnupg.stub', 'gnupg_encrypt' => 'gnupg/gnupg.stub', 'gnupg_encryptsign' => 'gnupg/gnupg.stub', 'gnupg_export' => 'gnupg/gnupg.stub', 'gnupg_getengineinfo' => 'gnupg/gnupg.stub', 'gnupg_geterror' => 'gnupg/gnupg.stub', 'gnupg_geterrorinfo' => 'gnupg/gnupg.stub', 'gnupg_getprotocol' => 'gnupg/gnupg.stub', 'gnupg_gettrustlist' => 'gnupg/gnupg.stub', 'gnupg_import' => 'gnupg/gnupg.stub', 'gnupg_init' => 'gnupg/gnupg.stub', 'gnupg_keyinfo' => 'gnupg/gnupg.stub', 'gnupg_listsignatures' => 'gnupg/gnupg.stub', 'gnupg_setarmor' => 'gnupg/gnupg.stub', 'gnupg_seterrormode' => 'gnupg/gnupg.stub', 'gnupg_setsignmode' => 'gnupg/gnupg.stub', 'gnupg_sign' => 'gnupg/gnupg.stub', 'gnupg_verify' => 'gnupg/gnupg.stub', 'go' => 'swoole/functions.stub', 'grapheme_extract' => 'intl/intl.stub', 'grapheme_stripos' => 'intl/intl.stub', 'grapheme_stristr' => 'intl/intl.stub', 'grapheme_strlen' => 'intl/intl.stub', 'grapheme_strpos' => 'intl/intl.stub', 'grapheme_strripos' => 'intl/intl.stub', 'grapheme_strrpos' => 'intl/intl.stub', 'grapheme_strstr' => 'intl/intl.stub', 'grapheme_substr' => 'intl/intl.stub', 'gregoriantojd' => 'calendar/calendar.stub', 'gzclose' => 'zlib/zlib.stub', 'gzcompress' => 'zlib/zlib.stub', 'gzdecode' => 'zlib/zlib.stub', 'gzdeflate' => 'zlib/zlib.stub', 'gzencode' => 'zlib/zlib.stub', 'gzeof' => 'zlib/zlib.stub', 'gzfile' => 'zlib/zlib.stub', 'gzgetc' => 'zlib/zlib.stub', 'gzgets' => 'zlib/zlib.stub', 'gzgetss' => 'zlib/zlib.stub', 'gzinflate' => 'zlib/zlib.stub', 'gzopen' => 'zlib/zlib.stub', 'gzpassthru' => 'zlib/zlib.stub', 'gzputs' => 'zlib/zlib.stub', 'gzread' => 'zlib/zlib.stub', 'gzrewind' => 'zlib/zlib.stub', 'gzseek' => 'zlib/zlib.stub', 'gztell' => 'zlib/zlib.stub', 'gzuncompress' => 'zlib/zlib.stub', 'gzwrite' => 'zlib/zlib.stub', 'hash' => 'hash/hash.stub', 'hash_algos' => 'hash/hash.stub', 'hash_copy' => 'hash/hash.stub', 'hash_equals' => 'hash/hash.stub', 'hash_file' => 'hash/hash.stub', 'hash_final' => 'hash/hash.stub', 'hash_hkdf' => 'hash/hash.stub', 'hash_hmac' => 'hash/hash.stub', 'hash_hmac_algos' => 'hash/hash.stub', 'hash_hmac_file' => 'hash/hash.stub', 'hash_init' => 'hash/hash.stub', 'hash_pbkdf2' => 'hash/hash.stub', 'hash_update' => 'hash/hash.stub', 'hash_update_file' => 'hash/hash.stub', 'hash_update_stream' => 'hash/hash.stub', 'header' => 'standard/standard_4.stub', 'header_register_callback' => 'standard/standard_8.stub', 'header_remove' => 'standard/standard_4.stub', 'headers_list' => 'standard/standard_4.stub', 'headers_sent' => 'standard/standard_4.stub', 'hebrev' => 'standard/standard_1.stub', 'hebrevc' => 'standard/standard_1.stub', 'hex2bin' => 'standard/_standard_manual.stub', 'hexdec' => 'standard/standard_3.stub', 'highlight_file' => 'standard/standard_4.stub', 'highlight_string' => 'standard/standard_4.stub', 'hrtime' => 'standard/standard_4.stub', 'html_entity_decode' => 'standard/standard_0.stub', 'htmlentities' => 'standard/standard_0.stub', 'htmlspecialchars' => 'standard/standard_0.stub', 'htmlspecialchars_decode' => 'standard/standard_0.stub', 'http_build_cookie' => 'http/http.stub', 'http_build_query' => 'standard/standard_2.stub', 'http_build_str' => 'http/http.stub', 'http_build_url' => 'http/http.stub', 'http_cache_etag' => 'http/http.stub', 'http_cache_last_modified' => 'http/http.stub', 'http_chunked_decode' => 'http/http.stub', 'http_date' => 'http/http.stub', 'http_deflate' => 'http/http.stub', 'http_get' => 'http/http.stub', 'http_get_request_body' => 'http/http.stub', 'http_get_request_body_stream' => 'http/http.stub', 'http_get_request_headers' => 'http/http.stub', 'http_head' => 'http/http.stub', 'http_inflate' => 'http/http.stub', 'http_match_etag' => 'http/http.stub', 'http_match_modified' => 'http/http.stub', 'http_match_request_header' => 'http/http.stub', 'http_negotiate_charset' => 'http/http.stub', 'http_negotiate_content_type' => 'http/http.stub', 'http_negotiate_language' => 'http/http.stub', 'http_parse_cookie' => 'http/http.stub', 'http_parse_headers' => 'http/http.stub', 'http_parse_message' => 'http/http.stub', 'http_parse_params' => 'http/http.stub', 'http_persistent_handles_clean' => 'http/http.stub', 'http_persistent_handles_count' => 'http/http.stub', 'http_persistent_handles_ident' => 'http/http.stub', 'http_post_data' => 'http/http.stub', 'http_post_fields' => 'http/http.stub', 'http_put_data' => 'http/http.stub', 'http_put_file' => 'http/http.stub', 'http_put_stream' => 'http/http.stub', 'http_redirect' => 'http/http.stub', 'http_request' => 'http/http.stub', 'http_request_body_encode' => 'http/http.stub', 'http_request_method_exists' => 'http/http.stub', 'http_request_method_name' => 'http/http.stub', 'http_request_method_register' => 'http/http.stub', 'http_request_method_unregister' => 'http/http.stub', 'http_response_code' => 'standard/_standard_manual.stub', 'http_send_content_disposition' => 'http/http.stub', 'http_send_content_type' => 'http/http.stub', 'http_send_data' => 'http/http.stub', 'http_send_file' => 'http/http.stub', 'http_send_last_modified' => 'http/http.stub', 'http_send_status' => 'http/http.stub', 'http_send_stream' => 'http/http.stub', 'http_support' => 'http/http.stub', 'http_throttle' => 'http/http.stub', 'hypot' => 'standard/standard_3.stub', 'ibase_add_user' => 'interbase/interbase.stub', 'ibase_affected_rows' => 'interbase/interbase.stub', 'ibase_backup' => 'interbase/interbase.stub', 'ibase_blob_add' => 'interbase/interbase.stub', 'ibase_blob_cancel' => 'interbase/interbase.stub', 'ibase_blob_close' => 'interbase/interbase.stub', 'ibase_blob_create' => 'interbase/interbase.stub', 'ibase_blob_echo' => 'interbase/interbase.stub', 'ibase_blob_get' => 'interbase/interbase.stub', 'ibase_blob_import' => 'interbase/interbase.stub', 'ibase_blob_info' => 'interbase/interbase.stub', 'ibase_blob_open' => 'interbase/interbase.stub', 'ibase_close' => 'interbase/interbase.stub', 'ibase_commit' => 'interbase/interbase.stub', 'ibase_commit_ret' => 'interbase/interbase.stub', 'ibase_connect' => 'interbase/interbase.stub', 'ibase_db_info' => 'interbase/interbase.stub', 'ibase_delete_user' => 'interbase/interbase.stub', 'ibase_drop_db' => 'interbase/interbase.stub', 'ibase_errcode' => 'interbase/interbase.stub', 'ibase_errmsg' => 'interbase/interbase.stub', 'ibase_execute' => 'interbase/interbase.stub', 'ibase_fetch_assoc' => 'interbase/interbase.stub', 'ibase_fetch_object' => 'interbase/interbase.stub', 'ibase_fetch_row' => 'interbase/interbase.stub', 'ibase_field_info' => 'interbase/interbase.stub', 'ibase_free_event_handler' => 'interbase/interbase.stub', 'ibase_free_query' => 'interbase/interbase.stub', 'ibase_free_result' => 'interbase/interbase.stub', 'ibase_gen_id' => 'interbase/interbase.stub', 'ibase_maintain_db' => 'interbase/interbase.stub', 'ibase_modify_user' => 'interbase/interbase.stub', 'ibase_name_result' => 'interbase/interbase.stub', 'ibase_num_fields' => 'interbase/interbase.stub', 'ibase_num_params' => 'interbase/interbase.stub', 'ibase_param_info' => 'interbase/interbase.stub', 'ibase_pconnect' => 'interbase/interbase.stub', 'ibase_prepare' => 'interbase/interbase.stub', 'ibase_query' => 'interbase/interbase.stub', 'ibase_restore' => 'interbase/interbase.stub', 'ibase_rollback' => 'interbase/interbase.stub', 'ibase_rollback_ret' => 'interbase/interbase.stub', 'ibase_server_info' => 'interbase/interbase.stub', 'ibase_service_attach' => 'interbase/interbase.stub', 'ibase_service_detach' => 'interbase/interbase.stub', 'ibase_set_event_handler' => 'interbase/interbase.stub', 'ibase_trans' => 'interbase/interbase.stub', 'ibase_wait_event' => 'interbase/interbase.stub', 'iconv' => 'iconv/iconv.stub', 'iconv_get_encoding' => 'iconv/iconv.stub', 'iconv_mime_decode' => 'iconv/iconv.stub', 'iconv_mime_decode_headers' => 'iconv/iconv.stub', 'iconv_mime_encode' => 'iconv/iconv.stub', 'iconv_set_encoding' => 'iconv/iconv.stub', 'iconv_strlen' => 'iconv/iconv.stub', 'iconv_strpos' => 'iconv/iconv.stub', 'iconv_strrpos' => 'iconv/iconv.stub', 'iconv_substr' => 'iconv/iconv.stub', 'idate' => 'date/date.stub', 'idn_to_ascii' => 'intl/intl.stub', 'idn_to_utf8' => 'intl/intl.stub', 'igbinary_serialize' => 'igbinary/igbinary.stub', 'igbinary_unserialize' => 'igbinary/igbinary.stub', 'ignore_user_abort' => 'standard/standard_4.stub', 'image2wbmp' => 'gd/gd.stub', 'image_type_to_extension' => 'standard/standard_0.stub', 'image_type_to_mime_type' => 'standard/standard_0.stub', 'imageaffine' => 'gd/gd.stub', 'imageaffinematrixconcat' => 'gd/gd.stub', 'imageaffinematrixget' => 'gd/gd.stub', 'imagealphablending' => 'gd/gd.stub', 'imageantialias' => 'gd/gd.stub', 'imagearc' => 'gd/gd.stub', 'imageavif' => 'gd/gd.stub', 'imagebmp' => 'gd/gd.stub', 'imagechar' => 'gd/gd.stub', 'imagecharup' => 'gd/gd.stub', 'imagecolorallocate' => 'gd/gd.stub', 'imagecolorallocatealpha' => 'gd/gd.stub', 'imagecolorat' => 'gd/gd.stub', 'imagecolorclosest' => 'gd/gd.stub', 'imagecolorclosestalpha' => 'gd/gd.stub', 'imagecolorclosesthwb' => 'gd/gd.stub', 'imagecolordeallocate' => 'gd/gd.stub', 'imagecolorexact' => 'gd/gd.stub', 'imagecolorexactalpha' => 'gd/gd.stub', 'imagecolormatch' => 'gd/gd.stub', 'imagecolorresolve' => 'gd/gd.stub', 'imagecolorresolvealpha' => 'gd/gd.stub', 'imagecolorset' => 'gd/gd.stub', 'imagecolorsforindex' => 'gd/gd.stub', 'imagecolorstotal' => 'gd/gd.stub', 'imagecolortransparent' => 'gd/gd.stub', 'imageconvolution' => 'gd/gd.stub', 'imagecopy' => 'gd/gd.stub', 'imagecopymerge' => 'gd/gd.stub', 'imagecopymergegray' => 'gd/gd.stub', 'imagecopyresampled' => 'gd/gd.stub', 'imagecopyresized' => 'gd/gd.stub', 'imagecreate' => 'gd/gd.stub', 'imagecreatefromavif' => 'gd/gd.stub', 'imagecreatefrombmp' => 'gd/gd.stub', 'imagecreatefromgd' => 'gd/gd.stub', 'imagecreatefromgd2' => 'gd/gd.stub', 'imagecreatefromgd2part' => 'gd/gd.stub', 'imagecreatefromgif' => 'gd/gd.stub', 'imagecreatefromjpeg' => 'gd/gd.stub', 'imagecreatefrompng' => 'gd/gd.stub', 'imagecreatefromstring' => 'gd/gd.stub', 'imagecreatefromtga' => 'gd/gd.stub', 'imagecreatefromwbmp' => 'gd/gd.stub', 'imagecreatefromwebp' => 'gd/gd.stub', 'imagecreatefromxbm' => 'gd/gd.stub', 'imagecreatefromxpm' => 'gd/gd.stub', 'imagecreatetruecolor' => 'gd/gd.stub', 'imagecrop' => 'gd/gd.stub', 'imagecropauto' => 'gd/gd.stub', 'imagedashedline' => 'gd/gd.stub', 'imagedestroy' => 'gd/gd.stub', 'imageellipse' => 'gd/gd.stub', 'imagefill' => 'gd/gd.stub', 'imagefilledarc' => 'gd/gd.stub', 'imagefilledellipse' => 'gd/gd.stub', 'imagefilledpolygon' => 'gd/gd.stub', 'imagefilledrectangle' => 'gd/gd.stub', 'imagefilltoborder' => 'gd/gd.stub', 'imagefilter' => 'gd/gd.stub', 'imageflip' => 'gd/gd.stub', 'imagefontheight' => 'gd/gd.stub', 'imagefontwidth' => 'gd/gd.stub', 'imageftbbox' => 'gd/gd.stub', 'imagefttext' => 'gd/gd.stub', 'imagegammacorrect' => 'gd/gd.stub', 'imagegd' => 'gd/gd.stub', 'imagegd2' => 'gd/gd.stub', 'imagegetclip' => 'gd/gd.stub', 'imagegetinterpolation' => 'gd/gd.stub', 'imagegif' => 'gd/gd.stub', 'imagegrabscreen' => 'gd/gd.stub', 'imagegrabwindow' => 'gd/gd.stub', 'imageinterlace' => 'gd/gd.stub', 'imageistruecolor' => 'gd/gd.stub', 'imagejpeg' => 'gd/gd.stub', 'imagelayereffect' => 'gd/gd.stub', 'imageline' => 'gd/gd.stub', 'imageloadfont' => 'gd/gd.stub', 'imageopenpolygon' => 'gd/gd.stub', 'imagepalettecopy' => 'gd/gd.stub', 'imagepalettetotruecolor' => 'gd/gd.stub', 'imagepng' => 'gd/gd.stub', 'imagepolygon' => 'gd/gd.stub', 'imagepsbbox' => 'gd/gd.stub', 'imagepsencodefont' => 'gd/gd.stub', 'imagepsextendfont' => 'gd/gd.stub', 'imagepsfreefont' => 'gd/gd.stub', 'imagepsloadfont' => 'gd/gd.stub', 'imagepsslantfont' => 'gd/gd.stub', 'imagepstext' => 'gd/gd.stub', 'imagerectangle' => 'gd/gd.stub', 'imageresolution' => 'gd/gd.stub', 'imagerotate' => 'gd/gd.stub', 'imagesavealpha' => 'gd/gd.stub', 'imagescale' => 'gd/gd.stub', 'imagesetbrush' => 'gd/gd.stub', 'imagesetclip' => 'gd/gd.stub', 'imagesetinterpolation' => 'gd/gd.stub', 'imagesetpixel' => 'gd/gd.stub', 'imagesetstyle' => 'gd/gd.stub', 'imagesetthickness' => 'gd/gd.stub', 'imagesettile' => 'gd/gd.stub', 'imagestring' => 'gd/gd.stub', 'imagestringup' => 'gd/gd.stub', 'imagesx' => 'gd/gd.stub', 'imagesy' => 'gd/gd.stub', 'imagetruecolortopalette' => 'gd/gd.stub', 'imagettfbbox' => 'gd/gd.stub', 'imagettftext' => 'gd/gd.stub', 'imagetypes' => 'gd/gd.stub', 'imagewbmp' => 'gd/gd.stub', 'imagewebp' => 'gd/gd.stub', 'imagexbm' => 'gd/gd.stub', 'imap_8bit' => 'imap/imap.stub', 'imap_alerts' => 'imap/imap.stub', 'imap_append' => 'imap/imap.stub', 'imap_base64' => 'imap/imap.stub', 'imap_binary' => 'imap/imap.stub', 'imap_body' => 'imap/imap.stub', 'imap_bodystruct' => 'imap/imap.stub', 'imap_check' => 'imap/imap.stub', 'imap_clearflag_full' => 'imap/imap.stub', 'imap_close' => 'imap/imap.stub', 'imap_create' => 'imap/imap.stub', 'imap_createmailbox' => 'imap/imap.stub', 'imap_delete' => 'imap/imap.stub', 'imap_deletemailbox' => 'imap/imap.stub', 'imap_errors' => 'imap/imap.stub', 'imap_expunge' => 'imap/imap.stub', 'imap_fetch_overview' => 'imap/imap.stub', 'imap_fetchbody' => 'imap/imap.stub', 'imap_fetchheader' => 'imap/imap.stub', 'imap_fetchmime' => 'imap/imap.stub', 'imap_fetchstructure' => 'imap/imap.stub', 'imap_fetchtext' => 'imap/imap.stub', 'imap_gc' => 'imap/imap.stub', 'imap_get_quota' => 'imap/imap.stub', 'imap_get_quotaroot' => 'imap/imap.stub', 'imap_getacl' => 'imap/imap.stub', 'imap_getannotation' => 'imap/imap.stub', 'imap_getmailboxes' => 'imap/imap.stub', 'imap_getsubscribed' => 'imap/imap.stub', 'imap_header' => 'imap/imap.stub', 'imap_headerinfo' => 'imap/imap.stub', 'imap_headers' => 'imap/imap.stub', 'imap_is_open' => 'imap/imap.stub', 'imap_last_error' => 'imap/imap.stub', 'imap_list' => 'imap/imap.stub', 'imap_listmailbox' => 'imap/imap.stub', 'imap_listscan' => 'imap/imap.stub', 'imap_listsubscribed' => 'imap/imap.stub', 'imap_lsub' => 'imap/imap.stub', 'imap_mail' => 'imap/imap.stub', 'imap_mail_compose' => 'imap/imap.stub', 'imap_mail_copy' => 'imap/imap.stub', 'imap_mail_move' => 'imap/imap.stub', 'imap_mailboxmsginfo' => 'imap/imap.stub', 'imap_mime_header_decode' => 'imap/imap.stub', 'imap_msgno' => 'imap/imap.stub', 'imap_mutf7_to_utf8' => 'imap/imap.stub', 'imap_myrights' => 'imap/imap.stub', 'imap_num_msg' => 'imap/imap.stub', 'imap_num_recent' => 'imap/imap.stub', 'imap_open' => 'imap/imap.stub', 'imap_ping' => 'imap/imap.stub', 'imap_qprint' => 'imap/imap.stub', 'imap_rename' => 'imap/imap.stub', 'imap_renamemailbox' => 'imap/imap.stub', 'imap_reopen' => 'imap/imap.stub', 'imap_rfc822_parse_adrlist' => 'imap/imap.stub', 'imap_rfc822_parse_headers' => 'imap/imap.stub', 'imap_rfc822_write_address' => 'imap/imap.stub', 'imap_savebody' => 'imap/imap.stub', 'imap_scan' => 'imap/imap.stub', 'imap_scanmailbox' => 'imap/imap.stub', 'imap_search' => 'imap/imap.stub', 'imap_set_quota' => 'imap/imap.stub', 'imap_setacl' => 'imap/imap.stub', 'imap_setannotation' => 'imap/imap.stub', 'imap_setflag_full' => 'imap/imap.stub', 'imap_sort' => 'imap/imap.stub', 'imap_status' => 'imap/imap.stub', 'imap_status_current' => 'imap/imap.stub', 'imap_subscribe' => 'imap/imap.stub', 'imap_thread' => 'imap/imap.stub', 'imap_timeout' => 'imap/imap.stub', 'imap_uid' => 'imap/imap.stub', 'imap_undelete' => 'imap/imap.stub', 'imap_unsubscribe' => 'imap/imap.stub', 'imap_utf7_decode' => 'imap/imap.stub', 'imap_utf7_encode' => 'imap/imap.stub', 'imap_utf8' => 'imap/imap.stub', 'imap_utf8_to_mutf7' => 'imap/imap.stub', 'implode' => 'standard/standard_1.stub', 'import_request_variables' => 'standard/standard_3.stub', 'in_array' => 'standard/standard_8.stub', 'inet_ntop' => 'standard/standard_3.stub', 'inet_pton' => 'standard/standard_3.stub', 'inflate_add' => 'zlib/zlib.stub', 'inflate_get_read_len' => 'zlib/zlib.stub', 'inflate_get_status' => 'zlib/zlib.stub', 'inflate_init' => 'zlib/zlib.stub', 'ini_alter' => 'standard/standard_4.stub', 'ini_get' => 'standard/standard_4.stub', 'ini_get_all' => 'standard/standard_4.stub', 'ini_parse_quantity' => 'standard/standard_4.stub', 'ini_restore' => 'standard/standard_4.stub', 'ini_set' => 'standard/standard_4.stub', 'inotify_add_watch' => 'inotify/inotify.stub', 'inotify_init' => 'inotify/inotify.stub', 'inotify_queue_len' => 'inotify/inotify.stub', 'inotify_read' => 'inotify/inotify.stub', 'inotify_rm_watch' => 'inotify/inotify.stub', 'intcal_get_maximum' => 'intl/intl.stub', 'intdiv' => 'standard/standard_3.stub', 'interface_exists' => 'Core/Core.stub', 'intl_error_name' => 'intl/intl.stub', 'intl_get' => 'intl/intl.stub', 'intl_get_error_code' => 'intl/intl.stub', 'intl_get_error_message' => 'intl/intl.stub', 'intl_is_failure' => 'intl/intl.stub', 'intlcal_add' => 'intl/intl.stub', 'intlcal_after' => 'intl/intl.stub', 'intlcal_before' => 'intl/intl.stub', 'intlcal_clear' => 'intl/intl.stub', 'intlcal_create_instance' => 'intl/intl.stub', 'intlcal_equals' => 'intl/intl.stub', 'intlcal_field_difference' => 'intl/intl.stub', 'intlcal_from_date_time' => 'intl/intl.stub', 'intlcal_get' => 'intl/intl.stub', 'intlcal_get_actual_maximum' => 'intl/intl.stub', 'intlcal_get_actual_minimum' => 'intl/intl.stub', 'intlcal_get_available_locales' => 'intl/intl.stub', 'intlcal_get_day_of_week_type' => 'intl/intl.stub', 'intlcal_get_error_code' => 'intl/intl.stub', 'intlcal_get_error_message' => 'intl/intl.stub', 'intlcal_get_first_day_of_week' => 'intl/intl.stub', 'intlcal_get_greatest_minimum' => 'intl/intl.stub', 'intlcal_get_keyword_values_for_locale' => 'intl/intl.stub', 'intlcal_get_least_maximum' => 'intl/intl.stub', 'intlcal_get_locale' => 'intl/intl.stub', 'intlcal_get_maximum' => 'intl/intl.stub', 'intlcal_get_minimal_days_in_first_week' => 'intl/intl.stub', 'intlcal_get_minimum' => 'intl/intl.stub', 'intlcal_get_now' => 'intl/intl.stub', 'intlcal_get_repeated_wall_time_option' => 'intl/intl.stub', 'intlcal_get_skipped_wall_time_option' => 'intl/intl.stub', 'intlcal_get_time' => 'intl/intl.stub', 'intlcal_get_time_zone' => 'intl/intl.stub', 'intlcal_get_type' => 'intl/intl.stub', 'intlcal_get_weekend_transition' => 'intl/intl.stub', 'intlcal_greates_minimum' => 'intl/intl.stub', 'intlcal_in_daylight_time' => 'intl/intl.stub', 'intlcal_is_equivalent_to' => 'intl/intl.stub', 'intlcal_is_lenient' => 'intl/intl.stub', 'intlcal_is_set' => 'intl/intl.stub', 'intlcal_is_weekend' => 'intl/intl.stub', 'intlcal_roll' => 'intl/intl.stub', 'intlcal_set' => 'intl/intl.stub', 'intlcal_set_first_day_of_week' => 'intl/intl.stub', 'intlcal_set_lenient' => 'intl/intl.stub', 'intlcal_set_minimal_days_in_first_week' => 'intl/intl.stub', 'intlcal_set_repeated_wall_time_option' => 'intl/intl.stub', 'intlcal_set_skipped_wall_time_option' => 'intl/intl.stub', 'intlcal_set_time' => 'intl/intl.stub', 'intlcal_set_time_zone' => 'intl/intl.stub', 'intlcal_to_date_time' => 'intl/intl.stub', 'intlgregcal_create_instance' => 'intl/intl.stub', 'intlgregcal_get_gregorian_change' => 'intl/intl.stub', 'intlgregcal_is_leap_year' => 'intl/intl.stub', 'intlgregcal_set_gregorian_change' => 'intl/intl.stub', 'intltz_count_equivalent_ids' => 'intl/intl.stub', 'intltz_create_default' => 'intl/intl.stub', 'intltz_create_enumeration' => 'intl/intl.stub', 'intltz_create_time_zone' => 'intl/intl.stub', 'intltz_create_time_zone_id_enumeration' => 'intl/intl.stub', 'intltz_from_date_time_zone' => 'intl/intl.stub', 'intltz_getGMT' => 'intl/intl.stub', 'intltz_get_canonical_id' => 'intl/intl.stub', 'intltz_get_display_name' => 'intl/intl.stub', 'intltz_get_dst_savings' => 'intl/intl.stub', 'intltz_get_equivalent_id' => 'intl/intl.stub', 'intltz_get_error_code' => 'intl/intl.stub', 'intltz_get_error_message' => 'intl/intl.stub', 'intltz_get_gmt' => 'intl/intl.stub', 'intltz_get_id' => 'intl/intl.stub', 'intltz_get_id_for_windows_id' => 'intl/intl.stub', 'intltz_get_offset' => 'intl/intl.stub', 'intltz_get_raw_offset' => 'intl/intl.stub', 'intltz_get_region' => 'intl/intl.stub', 'intltz_get_tz_data_version' => 'intl/intl.stub', 'intltz_get_unknown' => 'intl/intl.stub', 'intltz_get_windows_id' => 'intl/intl.stub', 'intltz_has_same_rules' => 'intl/intl.stub', 'intltz_to_date_time_zone' => 'intl/intl.stub', 'intltz_use_daylight_time' => 'intl/intl.stub', 'intlz_create_default' => 'intl/intl.stub', 'intval' => 'standard/standard_5.stub', 'ip2long' => 'standard/standard_3.stub', 'iptcembed' => 'standard/standard_0.stub', 'iptcparse' => 'standard/standard_0.stub', 'is_a' => 'Core/Core.stub', 'is_array' => 'standard/standard_5.stub', 'is_bool' => 'standard/standard_5.stub', 'is_callable' => 'standard/standard_5.stub', 'is_countable' => 'standard/standard_5.stub', 'is_dir' => 'standard/standard_7.stub', 'is_double' => 'standard/standard_5.stub', 'is_executable' => 'standard/standard_7.stub', 'is_file' => 'standard/standard_7.stub', 'is_finite' => 'standard/standard_3.stub', 'is_float' => 'standard/standard_5.stub', 'is_infinite' => 'standard/standard_3.stub', 'is_int' => 'standard/standard_5.stub', 'is_integer' => 'standard/standard_5.stub', 'is_iterable' => 'standard/basic.stub', 'is_link' => 'standard/standard_7.stub', 'is_long' => 'standard/standard_5.stub', 'is_nan' => 'standard/standard_3.stub', 'is_null' => 'standard/standard_5.stub', 'is_numeric' => 'standard/standard_5.stub', 'is_object' => 'standard/standard_5.stub', 'is_readable' => 'standard/standard_7.stub', 'is_real' => 'standard/standard_5.stub', 'is_resource' => 'standard/standard_5.stub', 'is_scalar' => 'standard/standard_5.stub', 'is_soap_fault' => 'soap/soap.stub', 'is_string' => 'standard/standard_5.stub', 'is_subclass_of' => 'Core/Core.stub', 'is_uploaded_file' => 'standard/standard_4.stub', 'is_writable' => 'standard/standard_7.stub', 'is_writeable' => 'standard/standard_7.stub', 'iterator_apply' => 'SPL/SPL_f.stub', 'iterator_count' => 'SPL/SPL_f.stub', 'iterator_to_array' => 'SPL/SPL_f.stub', 'java' => 'zend/zend_f.stub', 'java_last_exception_clear' => 'zend/zend_f.stub', 'java_last_exception_get' => 'zend/zend_f.stub', 'java_reload' => 'zend/zend_f.stub', 'java_require' => 'zend/zend_f.stub', 'java_set_encoding' => 'zend/zend_f.stub', 'java_set_ignore_case' => 'zend/zend_f.stub', 'java_throw_exceptions' => 'zend/zend_f.stub', 'jddayofweek' => 'calendar/calendar.stub', 'jdmonthname' => 'calendar/calendar.stub', 'jdtofrench' => 'calendar/calendar.stub', 'jdtogregorian' => 'calendar/calendar.stub', 'jdtojewish' => 'calendar/calendar.stub', 'jdtojulian' => 'calendar/calendar.stub', 'jdtounix' => 'calendar/calendar.stub', 'jewishtojd' => 'calendar/calendar.stub', 'jobqueue_license_info' => 'zend/zend_f.stub', 'join' => 'standard/standard_1.stub', 'jpeg2wbmp' => 'gd/gd.stub', 'json_decode' => 'json/json.stub', 'json_encode' => 'json/json.stub', 'json_last_error' => 'json/json.stub', 'json_last_error_msg' => 'json/json.stub', 'juliantojd' => 'calendar/calendar.stub', 'kafka_err2name' => 'simple_kafka_client/functions.stub', 'kafka_err2str' => 'simple_kafka_client/functions.stub', 'kafka_get_err_descs' => 'simple_kafka_client/functions.stub', 'kafka_offset_tail' => 'simple_kafka_client/functions.stub', 'kafka_thread_cnt' => 'simple_kafka_client/functions.stub', 'key' => 'standard/standard_8.stub', 'key_exists' => 'standard/standard_9.stub', 'krsort' => 'standard/standard_8.stub', 'ksort' => 'standard/standard_8.stub', 'lcfirst' => 'standard/standard_1.stub', 'lcg_value' => 'random/random.stub', 'lchgrp' => 'standard/standard_7.stub', 'lchown' => 'standard/standard_7.stub', 'ldap_8859_to_t61' => 'ldap/ldap.stub', 'ldap_add' => 'ldap/ldap.stub', 'ldap_add_ext' => 'ldap/ldap.stub', 'ldap_bind' => 'ldap/ldap.stub', 'ldap_bind_ext' => 'ldap/ldap.stub', 'ldap_close' => 'ldap/ldap.stub', 'ldap_compare' => 'ldap/ldap.stub', 'ldap_connect' => 'ldap/ldap.stub', 'ldap_control_paged_result' => 'ldap/ldap.stub', 'ldap_control_paged_result_response' => 'ldap/ldap.stub', 'ldap_count_entries' => 'ldap/ldap.stub', 'ldap_count_references' => 'ldap/ldap.stub', 'ldap_delete' => 'ldap/ldap.stub', 'ldap_delete_ext' => 'ldap/ldap.stub', 'ldap_dn2ufn' => 'ldap/ldap.stub', 'ldap_err2str' => 'ldap/ldap.stub', 'ldap_errno' => 'ldap/ldap.stub', 'ldap_error' => 'ldap/ldap.stub', 'ldap_escape' => 'ldap/ldap.stub', 'ldap_exop' => 'ldap/ldap.stub', 'ldap_exop_passwd' => 'ldap/ldap.stub', 'ldap_exop_refresh' => 'ldap/ldap.stub', 'ldap_exop_whoami' => 'ldap/ldap.stub', 'ldap_explode_dn' => 'ldap/ldap.stub', 'ldap_first_attribute' => 'ldap/ldap.stub', 'ldap_first_entry' => 'ldap/ldap.stub', 'ldap_first_reference' => 'ldap/ldap.stub', 'ldap_free_result' => 'ldap/ldap.stub', 'ldap_get_attributes' => 'ldap/ldap.stub', 'ldap_get_dn' => 'ldap/ldap.stub', 'ldap_get_entries' => 'ldap/ldap.stub', 'ldap_get_option' => 'ldap/ldap.stub', 'ldap_get_values' => 'ldap/ldap.stub', 'ldap_get_values_len' => 'ldap/ldap.stub', 'ldap_list' => 'ldap/ldap.stub', 'ldap_mod_add' => 'ldap/ldap.stub', 'ldap_mod_add_ext' => 'ldap/ldap.stub', 'ldap_mod_del' => 'ldap/ldap.stub', 'ldap_mod_del_ext' => 'ldap/ldap.stub', 'ldap_mod_replace' => 'ldap/ldap.stub', 'ldap_mod_replace_ext' => 'ldap/ldap.stub', 'ldap_modify' => 'ldap/ldap.stub', 'ldap_modify_batch' => 'ldap/ldap.stub', 'ldap_next_attribute' => 'ldap/ldap.stub', 'ldap_next_entry' => 'ldap/ldap.stub', 'ldap_next_reference' => 'ldap/ldap.stub', 'ldap_parse_exop' => 'ldap/ldap.stub', 'ldap_parse_reference' => 'ldap/ldap.stub', 'ldap_parse_result' => 'ldap/ldap.stub', 'ldap_read' => 'ldap/ldap.stub', 'ldap_rename' => 'ldap/ldap.stub', 'ldap_rename_ext' => 'ldap/ldap.stub', 'ldap_sasl_bind' => 'ldap/ldap.stub', 'ldap_search' => 'ldap/ldap.stub', 'ldap_set_option' => 'ldap/ldap.stub', 'ldap_set_rebind_proc' => 'ldap/ldap.stub', 'ldap_sort' => 'ldap/ldap.stub', 'ldap_start_tls' => 'ldap/ldap.stub', 'ldap_t61_to_8859' => 'ldap/ldap.stub', 'ldap_unbind' => 'ldap/ldap.stub', 'levenshtein' => 'standard/standard_2.stub', 'libvirt_check_version' => 'libvirt-php/libvirt-php.stub', 'libvirt_connect' => 'libvirt-php/libvirt-php.stub', 'libvirt_connect_get_all_domain_stats' => 'libvirt-php/libvirt-php.stub', 'libvirt_connect_get_capabilities' => 'libvirt-php/libvirt-php.stub', 'libvirt_connect_get_emulator' => 'libvirt-php/libvirt-php.stub', 'libvirt_connect_get_encrypted' => 'libvirt-php/libvirt-php.stub', 'libvirt_connect_get_hostname' => 'libvirt-php/libvirt-php.stub', 'libvirt_connect_get_hypervisor' => 'libvirt-php/libvirt-php.stub', 'libvirt_connect_get_information' => 'libvirt-php/libvirt-php.stub', 'libvirt_connect_get_machine_types' => 'libvirt-php/libvirt-php.stub', 'libvirt_connect_get_maxvcpus' => 'libvirt-php/libvirt-php.stub', 'libvirt_connect_get_nic_models' => 'libvirt-php/libvirt-php.stub', 'libvirt_connect_get_secure' => 'libvirt-php/libvirt-php.stub', 'libvirt_connect_get_soundhw_models' => 'libvirt-php/libvirt-php.stub', 'libvirt_connect_get_sysinfo' => 'libvirt-php/libvirt-php.stub', 'libvirt_connect_get_uri' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_attach_device' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_block_commit' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_block_job_abort' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_block_job_info' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_block_job_set_speed' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_block_resize' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_block_stats' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_change_boot_devices' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_change_memory' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_change_vcpus' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_core_dump' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_create' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_create_xml' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_define_xml' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_destroy' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_detach_device' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_disk_add' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_disk_remove' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_get_autostart' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_get_block_info' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_get_connect' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_get_counts' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_get_disk_devices' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_get_id' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_get_info' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_get_interface_devices' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_get_job_info' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_get_metadata' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_get_name' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_get_network_info' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_get_next_dev_ids' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_get_screen_dimensions' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_get_screenshot' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_get_screenshot_api' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_get_uuid' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_get_uuid_string' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_get_xml_desc' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_has_current_snapshot' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_interface_addresses' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_interface_stats' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_is_active' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_is_persistent' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_lookup_by_id' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_lookup_by_name' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_lookup_by_uuid' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_lookup_by_uuid_string' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_managedsave' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_memory_peek' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_memory_stats' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_migrate' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_migrate_to_uri' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_migrate_to_uri2' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_new' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_new_get_vnc' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_nic_add' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_nic_remove' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_qemu_agent_command' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_reboot' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_reset' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_resume' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_send_key_api' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_send_keys' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_send_pointer_event' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_set_autostart' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_set_max_memory' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_set_memory' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_set_memory_flags' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_set_metadata' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_shutdown' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_snapshot_create' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_snapshot_current' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_snapshot_delete' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_snapshot_get_xml' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_snapshot_lookup_by_name' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_snapshot_revert' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_suspend' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_undefine' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_undefine_flags' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_update_device' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_xml_from_native' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_xml_to_native' => 'libvirt-php/libvirt-php.stub', 'libvirt_domain_xml_xpath' => 'libvirt-php/libvirt-php.stub', 'libvirt_get_iso_images' => 'libvirt-php/libvirt-php.stub', 'libvirt_get_last_error' => 'libvirt-php/libvirt-php.stub', 'libvirt_get_last_error_code' => 'libvirt-php/libvirt-php.stub', 'libvirt_get_last_error_domain' => 'libvirt-php/libvirt-php.stub', 'libvirt_has_feature' => 'libvirt-php/libvirt-php.stub', 'libvirt_image_create' => 'libvirt-php/libvirt-php.stub', 'libvirt_image_remove' => 'libvirt-php/libvirt-php.stub', 'libvirt_list_active_domain_ids' => 'libvirt-php/libvirt-php.stub', 'libvirt_list_active_domains' => 'libvirt-php/libvirt-php.stub', 'libvirt_list_active_storagepools' => 'libvirt-php/libvirt-php.stub', 'libvirt_list_all_networks' => 'libvirt-php/libvirt-php.stub', 'libvirt_list_all_nwfilters' => 'libvirt-php/libvirt-php.stub', 'libvirt_list_domain_resources' => 'libvirt-php/libvirt-php.stub', 'libvirt_list_domain_snapshots' => 'libvirt-php/libvirt-php.stub', 'libvirt_list_domains' => 'libvirt-php/libvirt-php.stub', 'libvirt_list_inactive_domains' => 'libvirt-php/libvirt-php.stub', 'libvirt_list_inactive_storagepools' => 'libvirt-php/libvirt-php.stub', 'libvirt_list_networks' => 'libvirt-php/libvirt-php.stub', 'libvirt_list_nodedevs' => 'libvirt-php/libvirt-php.stub', 'libvirt_list_nwfilters' => 'libvirt-php/libvirt-php.stub', 'libvirt_list_storagepools' => 'libvirt-php/libvirt-php.stub', 'libvirt_logfile_set' => 'libvirt-php/libvirt-php.stub', 'libvirt_network_define_xml' => 'libvirt-php/libvirt-php.stub', 'libvirt_network_get' => 'libvirt-php/libvirt-php.stub', 'libvirt_network_get_active' => 'libvirt-php/libvirt-php.stub', 'libvirt_network_get_autostart' => 'libvirt-php/libvirt-php.stub', 'libvirt_network_get_bridge' => 'libvirt-php/libvirt-php.stub', 'libvirt_network_get_information' => 'libvirt-php/libvirt-php.stub', 'libvirt_network_get_name' => 'libvirt-php/libvirt-php.stub', 'libvirt_network_get_uuid' => 'libvirt-php/libvirt-php.stub', 'libvirt_network_get_uuid_string' => 'libvirt-php/libvirt-php.stub', 'libvirt_network_get_xml_desc' => 'libvirt-php/libvirt-php.stub', 'libvirt_network_set_active' => 'libvirt-php/libvirt-php.stub', 'libvirt_network_set_autostart' => 'libvirt-php/libvirt-php.stub', 'libvirt_network_undefine' => 'libvirt-php/libvirt-php.stub', 'libvirt_node_get_cpu_stats' => 'libvirt-php/libvirt-php.stub', 'libvirt_node_get_cpu_stats_for_each_cpu' => 'libvirt-php/libvirt-php.stub', 'libvirt_node_get_free_memory' => 'libvirt-php/libvirt-php.stub', 'libvirt_node_get_info' => 'libvirt-php/libvirt-php.stub', 'libvirt_node_get_mem_stats' => 'libvirt-php/libvirt-php.stub', 'libvirt_nodedev_capabilities' => 'libvirt-php/libvirt-php.stub', 'libvirt_nodedev_get' => 'libvirt-php/libvirt-php.stub', 'libvirt_nodedev_get_information' => 'libvirt-php/libvirt-php.stub', 'libvirt_nodedev_get_xml_desc' => 'libvirt-php/libvirt-php.stub', 'libvirt_nwfilter_define_xml' => 'libvirt-php/libvirt-php.stub', 'libvirt_nwfilter_get_name' => 'libvirt-php/libvirt-php.stub', 'libvirt_nwfilter_get_uuid' => 'libvirt-php/libvirt-php.stub', 'libvirt_nwfilter_get_uuid_string' => 'libvirt-php/libvirt-php.stub', 'libvirt_nwfilter_get_xml_desc' => 'libvirt-php/libvirt-php.stub', 'libvirt_nwfilter_lookup_by_name' => 'libvirt-php/libvirt-php.stub', 'libvirt_nwfilter_lookup_by_uuid_string' => 'libvirt-php/libvirt-php.stub', 'libvirt_nwfilter_undefine' => 'libvirt-php/libvirt-php.stub', 'libvirt_print_binding_resources' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagepool_build' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagepool_create' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagepool_define_xml' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagepool_delete' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagepool_destroy' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagepool_get_autostart' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagepool_get_info' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagepool_get_name' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagepool_get_uuid_string' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagepool_get_volume_count' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagepool_get_xml_desc' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagepool_is_active' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagepool_list_volumes' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagepool_lookup_by_name' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagepool_lookup_by_uuid_string' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagepool_lookup_by_volume' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagepool_refresh' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagepool_set_autostart' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagepool_undefine' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagevolume_create_xml' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagevolume_create_xml_from' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagevolume_delete' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagevolume_download' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagevolume_get_info' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagevolume_get_name' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagevolume_get_path' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagevolume_get_xml_desc' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagevolume_lookup_by_name' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagevolume_lookup_by_path' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagevolume_resize' => 'libvirt-php/libvirt-php.stub', 'libvirt_storagevolume_upload' => 'libvirt-php/libvirt-php.stub', 'libvirt_stream_abort' => 'libvirt-php/libvirt-php.stub', 'libvirt_stream_close' => 'libvirt-php/libvirt-php.stub', 'libvirt_stream_create' => 'libvirt-php/libvirt-php.stub', 'libvirt_stream_finish' => 'libvirt-php/libvirt-php.stub', 'libvirt_stream_recv' => 'libvirt-php/libvirt-php.stub', 'libvirt_stream_send' => 'libvirt-php/libvirt-php.stub', 'libvirt_version' => 'libvirt-php/libvirt-php.stub', 'libxml_clear_errors' => 'libxml/libxml.stub', 'libxml_disable_entity_loader' => 'libxml/libxml.stub', 'libxml_get_errors' => 'libxml/libxml.stub', 'libxml_get_external_entity_loader' => 'libxml/libxml.stub', 'libxml_get_last_error' => 'libxml/libxml.stub', 'libxml_set_external_entity_loader' => 'libxml/libxml.stub', 'libxml_set_streams_context' => 'libxml/libxml.stub', 'libxml_use_internal_errors' => 'libxml/libxml.stub', 'link' => 'standard/standard_2.stub', 'linkinfo' => 'standard/standard_2.stub', 'locale_accept_from_http' => 'intl/intl.stub', 'locale_canonicalize' => 'intl/intl.stub', 'locale_compose' => 'intl/intl.stub', 'locale_filter_matches' => 'intl/intl.stub', 'locale_get_all_variants' => 'intl/intl.stub', 'locale_get_default' => 'intl/intl.stub', 'locale_get_display_language' => 'intl/intl.stub', 'locale_get_display_name' => 'intl/intl.stub', 'locale_get_display_region' => 'intl/intl.stub', 'locale_get_display_script' => 'intl/intl.stub', 'locale_get_display_variant' => 'intl/intl.stub', 'locale_get_keywords' => 'intl/intl.stub', 'locale_get_primary_language' => 'intl/intl.stub', 'locale_get_region' => 'intl/intl.stub', 'locale_get_script' => 'intl/intl.stub', 'locale_lookup' => 'intl/intl.stub', 'locale_parse' => 'intl/intl.stub', 'locale_set_default' => 'intl/intl.stub', 'localeconv' => 'standard/standard_1.stub', 'localtime' => 'date/date.stub', 'log' => 'standard/standard_3.stub', 'log10' => 'standard/standard_3.stub', 'log1p' => 'standard/standard_3.stub', 'long2ip' => 'standard/standard_3.stub', 'lstat' => 'standard/standard_7.stub', 'ltrim' => 'standard/standard_1.stub', 'lzf_compress' => 'lzf/lzf.stub', 'lzf_decompress' => 'lzf/lzf.stub', 'lzf_optimized_for' => 'lzf/lzf.stub', 'magic_quotes_runtime' => 'standard/standard_3.stub', 'mail' => 'standard/standard_7.stub', 'mailparse_determine_best_xfer_encoding' => 'mailparse/mailparse.stub', 'mailparse_msg_create' => 'mailparse/mailparse.stub', 'mailparse_msg_extract_part' => 'mailparse/mailparse.stub', 'mailparse_msg_extract_part_file' => 'mailparse/mailparse.stub', 'mailparse_msg_extract_whole_part_file' => 'mailparse/mailparse.stub', 'mailparse_msg_free' => 'mailparse/mailparse.stub', 'mailparse_msg_get_part' => 'mailparse/mailparse.stub', 'mailparse_msg_get_part_data' => 'mailparse/mailparse.stub', 'mailparse_msg_get_structure' => 'mailparse/mailparse.stub', 'mailparse_msg_parse' => 'mailparse/mailparse.stub', 'mailparse_msg_parse_file' => 'mailparse/mailparse.stub', 'mailparse_rfc822_parse_addresses' => 'mailparse/mailparse.stub', 'mailparse_stream_encode' => 'mailparse/mailparse.stub', 'mailparse_uudecode_all' => 'mailparse/mailparse.stub', 'max' => 'standard/standard_8.stub', 'mb_check_encoding' => 'mbstring/mbstring.stub', 'mb_chr' => 'mbstring/mbstring.stub', 'mb_convert_case' => 'mbstring/mbstring.stub', 'mb_convert_encoding' => 'mbstring/mbstring.stub', 'mb_convert_kana' => 'mbstring/mbstring.stub', 'mb_convert_variables' => 'mbstring/mbstring.stub', 'mb_decode_mimeheader' => 'mbstring/mbstring.stub', 'mb_decode_numericentity' => 'mbstring/mbstring.stub', 'mb_detect_encoding' => 'mbstring/mbstring.stub', 'mb_detect_order' => 'mbstring/mbstring.stub', 'mb_encode_mimeheader' => 'mbstring/mbstring.stub', 'mb_encode_numericentity' => 'mbstring/mbstring.stub', 'mb_encoding_aliases' => 'mbstring/mbstring.stub', 'mb_ereg' => 'mbstring/mbstring.stub', 'mb_ereg_match' => 'mbstring/mbstring.stub', 'mb_ereg_replace' => 'mbstring/mbstring.stub', 'mb_ereg_replace_callback' => 'mbstring/mbstring.stub', 'mb_ereg_search' => 'mbstring/mbstring.stub', 'mb_ereg_search_getpos' => 'mbstring/mbstring.stub', 'mb_ereg_search_getregs' => 'mbstring/mbstring.stub', 'mb_ereg_search_init' => 'mbstring/mbstring.stub', 'mb_ereg_search_pos' => 'mbstring/mbstring.stub', 'mb_ereg_search_regs' => 'mbstring/mbstring.stub', 'mb_ereg_search_setpos' => 'mbstring/mbstring.stub', 'mb_eregi' => 'mbstring/mbstring.stub', 'mb_eregi_replace' => 'mbstring/mbstring.stub', 'mb_get_info' => 'mbstring/mbstring.stub', 'mb_http_input' => 'mbstring/mbstring.stub', 'mb_http_output' => 'mbstring/mbstring.stub', 'mb_internal_encoding' => 'mbstring/mbstring.stub', 'mb_language' => 'mbstring/mbstring.stub', 'mb_list_encodings' => 'mbstring/mbstring.stub', 'mb_ord' => 'mbstring/mbstring.stub', 'mb_output_handler' => 'mbstring/mbstring.stub', 'mb_parse_str' => 'mbstring/mbstring.stub', 'mb_preferred_mime_name' => 'mbstring/mbstring.stub', 'mb_regex_encoding' => 'mbstring/mbstring.stub', 'mb_regex_set_options' => 'mbstring/mbstring.stub', 'mb_scrub' => 'mbstring/mbstring.stub', 'mb_send_mail' => 'mbstring/mbstring.stub', 'mb_split' => 'mbstring/mbstring.stub', 'mb_str_split' => 'mbstring/mbstring.stub', 'mb_strcut' => 'mbstring/mbstring.stub', 'mb_strimwidth' => 'mbstring/mbstring.stub', 'mb_stripos' => 'mbstring/mbstring.stub', 'mb_stristr' => 'mbstring/mbstring.stub', 'mb_strlen' => 'mbstring/mbstring.stub', 'mb_strpos' => 'mbstring/mbstring.stub', 'mb_strrchr' => 'mbstring/mbstring.stub', 'mb_strrichr' => 'mbstring/mbstring.stub', 'mb_strripos' => 'mbstring/mbstring.stub', 'mb_strrpos' => 'mbstring/mbstring.stub', 'mb_strstr' => 'mbstring/mbstring.stub', 'mb_strtolower' => 'mbstring/mbstring.stub', 'mb_strtoupper' => 'mbstring/mbstring.stub', 'mb_strwidth' => 'mbstring/mbstring.stub', 'mb_substitute_character' => 'mbstring/mbstring.stub', 'mb_substr' => 'mbstring/mbstring.stub', 'mb_substr_count' => 'mbstring/mbstring.stub', 'mbereg' => 'mbstring/mbstring.stub', 'mbereg_match' => 'mbstring/mbstring.stub', 'mbereg_replace' => 'mbstring/mbstring.stub', 'mbereg_search' => 'mbstring/mbstring.stub', 'mbereg_search_getpos' => 'mbstring/mbstring.stub', 'mbereg_search_getregs' => 'mbstring/mbstring.stub', 'mbereg_search_init' => 'mbstring/mbstring.stub', 'mbereg_search_pos' => 'mbstring/mbstring.stub', 'mbereg_search_regs' => 'mbstring/mbstring.stub', 'mbereg_search_setpos' => 'mbstring/mbstring.stub', 'mberegi' => 'mbstring/mbstring.stub', 'mberegi_replace' => 'mbstring/mbstring.stub', 'mbregex_encoding' => 'mbstring/mbstring.stub', 'mbsplit' => 'mbstring/mbstring.stub', 'mcrypt_cbc' => 'mcrypt/mcrypt.stub', 'mcrypt_cfb' => 'mcrypt/mcrypt.stub', 'mcrypt_create_iv' => 'mcrypt/mcrypt.stub', 'mcrypt_decrypt' => 'mcrypt/mcrypt.stub', 'mcrypt_ecb' => 'mcrypt/mcrypt.stub', 'mcrypt_enc_get_algorithms_name' => 'mcrypt/mcrypt.stub', 'mcrypt_enc_get_block_size' => 'mcrypt/mcrypt.stub', 'mcrypt_enc_get_iv_size' => 'mcrypt/mcrypt.stub', 'mcrypt_enc_get_key_size' => 'mcrypt/mcrypt.stub', 'mcrypt_enc_get_modes_name' => 'mcrypt/mcrypt.stub', 'mcrypt_enc_get_supported_key_sizes' => 'mcrypt/mcrypt.stub', 'mcrypt_enc_is_block_algorithm' => 'mcrypt/mcrypt.stub', 'mcrypt_enc_is_block_algorithm_mode' => 'mcrypt/mcrypt.stub', 'mcrypt_enc_is_block_mode' => 'mcrypt/mcrypt.stub', 'mcrypt_enc_self_test' => 'mcrypt/mcrypt.stub', 'mcrypt_encrypt' => 'mcrypt/mcrypt.stub', 'mcrypt_generic' => 'mcrypt/mcrypt.stub', 'mcrypt_generic_deinit' => 'mcrypt/mcrypt.stub', 'mcrypt_generic_end' => 'mcrypt/mcrypt.stub', 'mcrypt_generic_init' => 'mcrypt/mcrypt.stub', 'mcrypt_get_block_size' => 'mcrypt/mcrypt.stub', 'mcrypt_get_cipher_name' => 'mcrypt/mcrypt.stub', 'mcrypt_get_iv_size' => 'mcrypt/mcrypt.stub', 'mcrypt_get_key_size' => 'mcrypt/mcrypt.stub', 'mcrypt_list_algorithms' => 'mcrypt/mcrypt.stub', 'mcrypt_list_modes' => 'mcrypt/mcrypt.stub', 'mcrypt_module_close' => 'mcrypt/mcrypt.stub', 'mcrypt_module_get_algo_block_size' => 'mcrypt/mcrypt.stub', 'mcrypt_module_get_algo_key_size' => 'mcrypt/mcrypt.stub', 'mcrypt_module_get_supported_key_sizes' => 'mcrypt/mcrypt.stub', 'mcrypt_module_is_block_algorithm' => 'mcrypt/mcrypt.stub', 'mcrypt_module_is_block_algorithm_mode' => 'mcrypt/mcrypt.stub', 'mcrypt_module_is_block_mode' => 'mcrypt/mcrypt.stub', 'mcrypt_module_open' => 'mcrypt/mcrypt.stub', 'mcrypt_module_self_test' => 'mcrypt/mcrypt.stub', 'mcrypt_ofb' => 'mcrypt/mcrypt.stub', 'md5' => 'standard/standard_0.stub', 'md5_file' => 'standard/standard_0.stub', 'mdecrypt_generic' => 'mcrypt/mcrypt.stub', 'memcache_add' => 'memcache/memcache.stub', 'memcache_add_server' => 'memcache/memcache.stub', 'memcache_append' => 'memcache/memcache.stub', 'memcache_cas' => 'memcache/memcache.stub', 'memcache_close' => 'memcache/memcache.stub', 'memcache_connect' => 'memcache/memcache.stub', 'memcache_debug' => 'memcache/memcache.stub', 'memcache_decrement' => 'memcache/memcache.stub', 'memcache_delete' => 'memcache/memcache.stub', 'memcache_flush' => 'memcache/memcache.stub', 'memcache_get' => 'memcache/memcache.stub', 'memcache_get_extended_stats' => 'memcache/memcache.stub', 'memcache_get_server_status' => 'memcache/memcache.stub', 'memcache_get_stats' => 'memcache/memcache.stub', 'memcache_get_version' => 'memcache/memcache.stub', 'memcache_increment' => 'memcache/memcache.stub', 'memcache_pconnect' => 'memcache/memcache.stub', 'memcache_prepend' => 'memcache/memcache.stub', 'memcache_replace' => 'memcache/memcache.stub', 'memcache_set' => 'memcache/memcache.stub', 'memcache_set_compress_threshold' => 'memcache/memcache.stub', 'memcache_set_failure_callback' => 'memcache/memcache.stub', 'memcache_set_server_params' => 'memcache/memcache.stub', 'meminfo_dump' => 'meminfo/meminfo.stub', 'memory_get_peak_usage' => 'standard/standard_4.stub', 'memory_get_usage' => 'standard/standard_4.stub', 'memory_reset_peak_usage' => 'standard/standard_4.stub', 'metaphone' => 'standard/standard_8.stub', 'method_exists' => 'Core/Core.stub', 'mhash' => 'hash/hash.stub', 'mhash_count' => 'hash/hash.stub', 'mhash_get_block_size' => 'hash/hash.stub', 'mhash_get_hash_name' => 'hash/hash.stub', 'mhash_keygen_s2k' => 'hash/hash.stub', 'microtime' => 'standard/standard_3.stub', 'mime_content_type' => 'fileinfo/fileinfo.stub', 'min' => 'standard/standard_8.stub', 'ming_keypress' => 'ming/ming.stub', 'ming_setcubicthreshold' => 'ming/ming.stub', 'ming_setscale' => 'ming/ming.stub', 'ming_setswfcompression' => 'ming/ming.stub', 'ming_useconstants' => 'ming/ming.stub', 'ming_useswfversion' => 'ming/ming.stub', 'mkdir' => 'standard/standard_5.stub', 'mktime' => 'date/date.stub', 'money_format' => 'standard/standard_1.stub', 'monitor_custom_event' => 'zend/zend.stub', 'monitor_httperror_event' => 'zend/zend.stub', 'monitor_license_info' => 'zend/zend.stub', 'monitor_pass_error' => 'zend/zend.stub', 'monitor_set_aggregation_hint' => 'zend/zend.stub', 'move_uploaded_file' => 'standard/standard_4.stub', 'mqseries_back' => 'mqseries/mqseries.stub', 'mqseries_begin' => 'mqseries/mqseries.stub', 'mqseries_close' => 'mqseries/mqseries.stub', 'mqseries_cmit' => 'mqseries/mqseries.stub', 'mqseries_conn' => 'mqseries/mqseries.stub', 'mqseries_connx' => 'mqseries/mqseries.stub', 'mqseries_disc' => 'mqseries/mqseries.stub', 'mqseries_get' => 'mqseries/mqseries.stub', 'mqseries_inq' => 'mqseries/mqseries.stub', 'mqseries_open' => 'mqseries/mqseries.stub', 'mqseries_put' => 'mqseries/mqseries.stub', 'mqseries_put1' => 'mqseries/mqseries.stub', 'mqseries_set' => 'mqseries/mqseries.stub', 'mqseries_strerror' => 'mqseries/mqseries.stub', 'ms_GetErrorObj' => 'mapscript/mapscript.stub', 'ms_GetVersion' => 'mapscript/mapscript.stub', 'ms_GetVersionInt' => 'mapscript/mapscript.stub', 'ms_ResetErrorList' => 'mapscript/mapscript.stub', 'ms_TokenizeMap' => 'mapscript/mapscript.stub', 'ms_iogetStdoutBufferBytes' => 'mapscript/mapscript.stub', 'ms_iogetstdoutbufferstring' => 'mapscript/mapscript.stub', 'ms_ioinstallstdinfrombuffer' => 'mapscript/mapscript.stub', 'ms_ioinstallstdouttobuffer' => 'mapscript/mapscript.stub', 'ms_ioresethandlers' => 'mapscript/mapscript.stub', 'ms_iostripstdoutbuffercontentheaders' => 'mapscript/mapscript.stub', 'ms_iostripstdoutbuffercontenttype' => 'mapscript/mapscript.stub', 'msg_get_queue' => 'sysvmsg/sysvmsg.stub', 'msg_queue_exists' => 'sysvmsg/sysvmsg.stub', 'msg_receive' => 'sysvmsg/sysvmsg.stub', 'msg_remove_queue' => 'sysvmsg/sysvmsg.stub', 'msg_send' => 'sysvmsg/sysvmsg.stub', 'msg_set_queue' => 'sysvmsg/sysvmsg.stub', 'msg_stat_queue' => 'sysvmsg/sysvmsg.stub', 'msgfmt_create' => 'intl/intl.stub', 'msgfmt_format' => 'intl/intl.stub', 'msgfmt_format_message' => 'intl/intl.stub', 'msgfmt_get_error_code' => 'intl/intl.stub', 'msgfmt_get_error_message' => 'intl/intl.stub', 'msgfmt_get_locale' => 'intl/intl.stub', 'msgfmt_get_pattern' => 'intl/intl.stub', 'msgfmt_parse' => 'intl/intl.stub', 'msgfmt_parse_message' => 'intl/intl.stub', 'msgfmt_set_pattern' => 'intl/intl.stub', 'msgpack_pack' => 'msgpack/msgpack.stub', 'msgpack_serialize' => 'msgpack/msgpack.stub', 'msgpack_unpack' => 'msgpack/msgpack.stub', 'msgpack_unserialize' => 'msgpack/msgpack.stub', 'mssql_bind' => 'mssql/mssql.stub', 'mssql_close' => 'mssql/mssql.stub', 'mssql_connect' => 'mssql/mssql.stub', 'mssql_data_seek' => 'mssql/mssql.stub', 'mssql_execute' => 'mssql/mssql.stub', 'mssql_fetch_array' => 'mssql/mssql.stub', 'mssql_fetch_assoc' => 'mssql/mssql.stub', 'mssql_fetch_batch' => 'mssql/mssql.stub', 'mssql_fetch_field' => 'mssql/mssql.stub', 'mssql_fetch_object' => 'mssql/mssql.stub', 'mssql_fetch_row' => 'mssql/mssql.stub', 'mssql_field_length' => 'mssql/mssql.stub', 'mssql_field_name' => 'mssql/mssql.stub', 'mssql_field_seek' => 'mssql/mssql.stub', 'mssql_field_type' => 'mssql/mssql.stub', 'mssql_free_result' => 'mssql/mssql.stub', 'mssql_free_statement' => 'mssql/mssql.stub', 'mssql_get_last_message' => 'mssql/mssql.stub', 'mssql_guid_string' => 'mssql/mssql.stub', 'mssql_init' => 'mssql/mssql.stub', 'mssql_min_error_severity' => 'mssql/mssql.stub', 'mssql_min_message_severity' => 'mssql/mssql.stub', 'mssql_next_result' => 'mssql/mssql.stub', 'mssql_num_fields' => 'mssql/mssql.stub', 'mssql_num_rows' => 'mssql/mssql.stub', 'mssql_pconnect' => 'mssql/mssql.stub', 'mssql_query' => 'mssql/mssql.stub', 'mssql_result' => 'mssql/mssql.stub', 'mssql_rows_affected' => 'mssql/mssql.stub', 'mssql_select_db' => 'mssql/mssql.stub', 'mt_getrandmax' => 'random/random.stub', 'mt_rand' => 'random/random.stub', 'mt_srand' => 'random/random.stub', 'mysql' => 'mysql/mysql.stub', 'mysql_affected_rows' => 'mysql/mysql.stub', 'mysql_client_encoding' => 'mysql/mysql.stub', 'mysql_close' => 'mysql/mysql.stub', 'mysql_connect' => 'mysql/mysql.stub', 'mysql_data_seek' => 'mysql/mysql.stub', 'mysql_db_name' => 'mysql/mysql.stub', 'mysql_db_query' => 'mysql/mysql.stub', 'mysql_dbname' => 'mysql/mysql.stub', 'mysql_errno' => 'mysql/mysql.stub', 'mysql_error' => 'mysql/mysql.stub', 'mysql_escape_string' => 'mysql/mysql.stub', 'mysql_fetch_array' => 'mysql/mysql.stub', 'mysql_fetch_assoc' => 'mysql/mysql.stub', 'mysql_fetch_field' => 'mysql/mysql.stub', 'mysql_fetch_lengths' => 'mysql/mysql.stub', 'mysql_fetch_object' => 'mysql/mysql.stub', 'mysql_fetch_row' => 'mysql/mysql.stub', 'mysql_field_flags' => 'mysql/mysql.stub', 'mysql_field_len' => 'mysql/mysql.stub', 'mysql_field_name' => 'mysql/mysql.stub', 'mysql_field_seek' => 'mysql/mysql.stub', 'mysql_field_table' => 'mysql/mysql.stub', 'mysql_field_type' => 'mysql/mysql.stub', 'mysql_fieldflags' => 'mysql/mysql.stub', 'mysql_fieldlen' => 'mysql/mysql.stub', 'mysql_fieldname' => 'mysql/mysql.stub', 'mysql_fieldtable' => 'mysql/mysql.stub', 'mysql_fieldtype' => 'mysql/mysql.stub', 'mysql_free_result' => 'mysql/mysql.stub', 'mysql_freeresult' => 'mysql/mysql.stub', 'mysql_get_client_info' => 'mysql/mysql.stub', 'mysql_get_host_info' => 'mysql/mysql.stub', 'mysql_get_proto_info' => 'mysql/mysql.stub', 'mysql_get_server_info' => 'mysql/mysql.stub', 'mysql_info' => 'mysql/mysql.stub', 'mysql_insert_id' => 'mysql/mysql.stub', 'mysql_list_dbs' => 'mysql/mysql.stub', 'mysql_list_fields' => 'mysql/mysql.stub', 'mysql_list_processes' => 'mysql/mysql.stub', 'mysql_list_tables' => 'mysql/mysql.stub', 'mysql_listdbs' => 'mysql/mysql.stub', 'mysql_listfields' => 'mysql/mysql.stub', 'mysql_listtables' => 'mysql/mysql.stub', 'mysql_num_fields' => 'mysql/mysql.stub', 'mysql_num_rows' => 'mysql/mysql.stub', 'mysql_numfields' => 'mysql/mysql.stub', 'mysql_numrows' => 'mysql/mysql.stub', 'mysql_pconnect' => 'mysql/mysql.stub', 'mysql_ping' => 'mysql/mysql.stub', 'mysql_query' => 'mysql/mysql.stub', 'mysql_real_escape_string' => 'mysql/mysql.stub', 'mysql_result' => 'mysql/mysql.stub', 'mysql_select_db' => 'mysql/mysql.stub', 'mysql_selectdb' => 'mysql/mysql.stub', 'mysql_set_charset' => 'mysql/mysql.stub', 'mysql_stat' => 'mysql/mysql.stub', 'mysql_table_name' => 'mysql/mysql.stub', 'mysql_tablename' => 'mysql/mysql.stub', 'mysql_thread_id' => 'mysql/mysql.stub', 'mysql_unbuffered_query' => 'mysql/mysql.stub', 'mysql_xdevapi\\expression' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysql_xdevapi\\getSession' => 'mysql_xdevapi/mysql_xdevapi.stub', 'mysqli_affected_rows' => 'mysqli/mysqli.stub', 'mysqli_autocommit' => 'mysqli/mysqli.stub', 'mysqli_begin_transaction' => 'mysqli/mysqli.stub', 'mysqli_bind_param' => 'mysqli/mysqli.stub', 'mysqli_bind_result' => 'mysqli/mysqli.stub', 'mysqli_change_user' => 'mysqli/mysqli.stub', 'mysqli_character_set_name' => 'mysqli/mysqli.stub', 'mysqli_client_encoding' => 'mysqli/mysqli.stub', 'mysqli_close' => 'mysqli/mysqli.stub', 'mysqli_commit' => 'mysqli/mysqli.stub', 'mysqli_connect' => 'mysqli/mysqli.stub', 'mysqli_connect_errno' => 'mysqli/mysqli.stub', 'mysqli_connect_error' => 'mysqli/mysqli.stub', 'mysqli_data_seek' => 'mysqli/mysqli.stub', 'mysqli_debug' => 'mysqli/mysqli.stub', 'mysqli_dump_debug_info' => 'mysqli/mysqli.stub', 'mysqli_errno' => 'mysqli/mysqli.stub', 'mysqli_error' => 'mysqli/mysqli.stub', 'mysqli_error_list' => 'mysqli/mysqli.stub', 'mysqli_escape_string' => 'mysqli/mysqli.stub', 'mysqli_execute' => 'mysqli/mysqli.stub', 'mysqli_execute_query' => 'mysqli/mysqli.stub', 'mysqli_fetch' => 'mysqli/mysqli.stub', 'mysqli_fetch_all' => 'mysqli/mysqli.stub', 'mysqli_fetch_array' => 'mysqli/mysqli.stub', 'mysqli_fetch_assoc' => 'mysqli/mysqli.stub', 'mysqli_fetch_column' => 'mysqli/mysqli.stub', 'mysqli_fetch_field' => 'mysqli/mysqli.stub', 'mysqli_fetch_field_direct' => 'mysqli/mysqli.stub', 'mysqli_fetch_fields' => 'mysqli/mysqli.stub', 'mysqli_fetch_lengths' => 'mysqli/mysqli.stub', 'mysqli_fetch_object' => 'mysqli/mysqli.stub', 'mysqli_fetch_row' => 'mysqli/mysqli.stub', 'mysqli_field_count' => 'mysqli/mysqli.stub', 'mysqli_field_seek' => 'mysqli/mysqli.stub', 'mysqli_field_tell' => 'mysqli/mysqli.stub', 'mysqli_free_result' => 'mysqli/mysqli.stub', 'mysqli_get_cache_stats' => 'mysqli/mysqli.stub', 'mysqli_get_charset' => 'mysqli/mysqli.stub', 'mysqli_get_client_info' => 'mysqli/mysqli.stub', 'mysqli_get_client_stats' => 'mysqli/mysqli.stub', 'mysqli_get_client_version' => 'mysqli/mysqli.stub', 'mysqli_get_connection_stats' => 'mysqli/mysqli.stub', 'mysqli_get_host_info' => 'mysqli/mysqli.stub', 'mysqli_get_links_stats' => 'mysqli/mysqli.stub', 'mysqli_get_metadata' => 'mysqli/mysqli.stub', 'mysqli_get_proto_info' => 'mysqli/mysqli.stub', 'mysqli_get_server_info' => 'mysqli/mysqli.stub', 'mysqli_get_server_version' => 'mysqli/mysqli.stub', 'mysqli_get_warnings' => 'mysqli/mysqli.stub', 'mysqli_info' => 'mysqli/mysqli.stub', 'mysqli_init' => 'mysqli/mysqli.stub', 'mysqli_insert_id' => 'mysqli/mysqli.stub', 'mysqli_kill' => 'mysqli/mysqli.stub', 'mysqli_more_results' => 'mysqli/mysqli.stub', 'mysqli_multi_query' => 'mysqli/mysqli.stub', 'mysqli_next_result' => 'mysqli/mysqli.stub', 'mysqli_num_fields' => 'mysqli/mysqli.stub', 'mysqli_num_rows' => 'mysqli/mysqli.stub', 'mysqli_options' => 'mysqli/mysqli.stub', 'mysqli_param_count' => 'mysqli/mysqli.stub', 'mysqli_ping' => 'mysqli/mysqli.stub', 'mysqli_poll' => 'mysqli/mysqli.stub', 'mysqli_prepare' => 'mysqli/mysqli.stub', 'mysqli_query' => 'mysqli/mysqli.stub', 'mysqli_real_connect' => 'mysqli/mysqli.stub', 'mysqli_real_escape_string' => 'mysqli/mysqli.stub', 'mysqli_real_query' => 'mysqli/mysqli.stub', 'mysqli_reap_async_query' => 'mysqli/mysqli.stub', 'mysqli_refresh' => 'mysqli/mysqli.stub', 'mysqli_release_savepoint' => 'mysqli/mysqli.stub', 'mysqli_report' => 'mysqli/mysqli.stub', 'mysqli_rollback' => 'mysqli/mysqli.stub', 'mysqli_savepoint' => 'mysqli/mysqli.stub', 'mysqli_select_db' => 'mysqli/mysqli.stub', 'mysqli_send_long_data' => 'mysqli/mysqli.stub', 'mysqli_set_charset' => 'mysqli/mysqli.stub', 'mysqli_set_local_infile_default' => 'mysqli/mysqli.stub', 'mysqli_set_local_infile_handler' => 'mysqli/mysqli.stub', 'mysqli_set_opt' => 'mysqli/mysqli.stub', 'mysqli_sqlstate' => 'mysqli/mysqli.stub', 'mysqli_ssl_set' => 'mysqli/mysqli.stub', 'mysqli_stat' => 'mysqli/mysqli.stub', 'mysqli_stmt_affected_rows' => 'mysqli/mysqli.stub', 'mysqli_stmt_attr_get' => 'mysqli/mysqli.stub', 'mysqli_stmt_attr_set' => 'mysqli/mysqli.stub', 'mysqli_stmt_bind_param' => 'mysqli/mysqli.stub', 'mysqli_stmt_bind_result' => 'mysqli/mysqli.stub', 'mysqli_stmt_close' => 'mysqli/mysqli.stub', 'mysqli_stmt_data_seek' => 'mysqli/mysqli.stub', 'mysqli_stmt_errno' => 'mysqli/mysqli.stub', 'mysqli_stmt_error' => 'mysqli/mysqli.stub', 'mysqli_stmt_error_list' => 'mysqli/mysqli.stub', 'mysqli_stmt_execute' => 'mysqli/mysqli.stub', 'mysqli_stmt_fetch' => 'mysqli/mysqli.stub', 'mysqli_stmt_field_count' => 'mysqli/mysqli.stub', 'mysqli_stmt_free_result' => 'mysqli/mysqli.stub', 'mysqli_stmt_get_result' => 'mysqli/mysqli.stub', 'mysqli_stmt_get_warnings' => 'mysqli/mysqli.stub', 'mysqli_stmt_init' => 'mysqli/mysqli.stub', 'mysqli_stmt_insert_id' => 'mysqli/mysqli.stub', 'mysqli_stmt_more_results' => 'mysqli/mysqli.stub', 'mysqli_stmt_next_result' => 'mysqli/mysqli.stub', 'mysqli_stmt_num_rows' => 'mysqli/mysqli.stub', 'mysqli_stmt_param_count' => 'mysqli/mysqli.stub', 'mysqli_stmt_prepare' => 'mysqli/mysqli.stub', 'mysqli_stmt_reset' => 'mysqli/mysqli.stub', 'mysqli_stmt_result_metadata' => 'mysqli/mysqli.stub', 'mysqli_stmt_send_long_data' => 'mysqli/mysqli.stub', 'mysqli_stmt_sqlstate' => 'mysqli/mysqli.stub', 'mysqli_stmt_store_result' => 'mysqli/mysqli.stub', 'mysqli_store_result' => 'mysqli/mysqli.stub', 'mysqli_thread_id' => 'mysqli/mysqli.stub', 'mysqli_thread_safe' => 'mysqli/mysqli.stub', 'mysqli_use_result' => 'mysqli/mysqli.stub', 'mysqli_warning_count' => 'mysqli/mysqli.stub', 'natcasesort' => 'standard/standard_8.stub', 'natsort' => 'standard/standard_8.stub', 'ncurses_addch' => 'ncurses/ncurses.stub', 'ncurses_addchnstr' => 'ncurses/ncurses.stub', 'ncurses_addchstr' => 'ncurses/ncurses.stub', 'ncurses_addnstr' => 'ncurses/ncurses.stub', 'ncurses_addstr' => 'ncurses/ncurses.stub', 'ncurses_assume_default_colors' => 'ncurses/ncurses.stub', 'ncurses_attroff' => 'ncurses/ncurses.stub', 'ncurses_attron' => 'ncurses/ncurses.stub', 'ncurses_attrset' => 'ncurses/ncurses.stub', 'ncurses_baudrate' => 'ncurses/ncurses.stub', 'ncurses_beep' => 'ncurses/ncurses.stub', 'ncurses_bkgd' => 'ncurses/ncurses.stub', 'ncurses_bkgdset' => 'ncurses/ncurses.stub', 'ncurses_border' => 'ncurses/ncurses.stub', 'ncurses_bottom_panel' => 'ncurses/ncurses.stub', 'ncurses_can_change_color' => 'ncurses/ncurses.stub', 'ncurses_cbreak' => 'ncurses/ncurses.stub', 'ncurses_clear' => 'ncurses/ncurses.stub', 'ncurses_clrtobot' => 'ncurses/ncurses.stub', 'ncurses_clrtoeol' => 'ncurses/ncurses.stub', 'ncurses_color_content' => 'ncurses/ncurses.stub', 'ncurses_color_set' => 'ncurses/ncurses.stub', 'ncurses_curs_set' => 'ncurses/ncurses.stub', 'ncurses_def_prog_mode' => 'ncurses/ncurses.stub', 'ncurses_def_shell_mode' => 'ncurses/ncurses.stub', 'ncurses_define_key' => 'ncurses/ncurses.stub', 'ncurses_del_panel' => 'ncurses/ncurses.stub', 'ncurses_delay_output' => 'ncurses/ncurses.stub', 'ncurses_delch' => 'ncurses/ncurses.stub', 'ncurses_deleteln' => 'ncurses/ncurses.stub', 'ncurses_delwin' => 'ncurses/ncurses.stub', 'ncurses_doupdate' => 'ncurses/ncurses.stub', 'ncurses_echo' => 'ncurses/ncurses.stub', 'ncurses_echochar' => 'ncurses/ncurses.stub', 'ncurses_end' => 'ncurses/ncurses.stub', 'ncurses_erase' => 'ncurses/ncurses.stub', 'ncurses_erasechar' => 'ncurses/ncurses.stub', 'ncurses_filter' => 'ncurses/ncurses.stub', 'ncurses_flash' => 'ncurses/ncurses.stub', 'ncurses_flushinp' => 'ncurses/ncurses.stub', 'ncurses_getch' => 'ncurses/ncurses.stub', 'ncurses_getmaxyx' => 'ncurses/ncurses.stub', 'ncurses_getmouse' => 'ncurses/ncurses.stub', 'ncurses_getyx' => 'ncurses/ncurses.stub', 'ncurses_halfdelay' => 'ncurses/ncurses.stub', 'ncurses_has_colors' => 'ncurses/ncurses.stub', 'ncurses_has_ic' => 'ncurses/ncurses.stub', 'ncurses_has_il' => 'ncurses/ncurses.stub', 'ncurses_has_key' => 'ncurses/ncurses.stub', 'ncurses_hide_panel' => 'ncurses/ncurses.stub', 'ncurses_hline' => 'ncurses/ncurses.stub', 'ncurses_inch' => 'ncurses/ncurses.stub', 'ncurses_init' => 'ncurses/ncurses.stub', 'ncurses_init_color' => 'ncurses/ncurses.stub', 'ncurses_init_pair' => 'ncurses/ncurses.stub', 'ncurses_insch' => 'ncurses/ncurses.stub', 'ncurses_insdelln' => 'ncurses/ncurses.stub', 'ncurses_insertln' => 'ncurses/ncurses.stub', 'ncurses_insstr' => 'ncurses/ncurses.stub', 'ncurses_instr' => 'ncurses/ncurses.stub', 'ncurses_isendwin' => 'ncurses/ncurses.stub', 'ncurses_keyok' => 'ncurses/ncurses.stub', 'ncurses_keypad' => 'ncurses/ncurses.stub', 'ncurses_killchar' => 'ncurses/ncurses.stub', 'ncurses_longname' => 'ncurses/ncurses.stub', 'ncurses_meta' => 'ncurses/ncurses.stub', 'ncurses_mouse_trafo' => 'ncurses/ncurses.stub', 'ncurses_mouseinterval' => 'ncurses/ncurses.stub', 'ncurses_mousemask' => 'ncurses/ncurses.stub', 'ncurses_move' => 'ncurses/ncurses.stub', 'ncurses_move_panel' => 'ncurses/ncurses.stub', 'ncurses_mvaddch' => 'ncurses/ncurses.stub', 'ncurses_mvaddchnstr' => 'ncurses/ncurses.stub', 'ncurses_mvaddchstr' => 'ncurses/ncurses.stub', 'ncurses_mvaddnstr' => 'ncurses/ncurses.stub', 'ncurses_mvaddstr' => 'ncurses/ncurses.stub', 'ncurses_mvcur' => 'ncurses/ncurses.stub', 'ncurses_mvdelch' => 'ncurses/ncurses.stub', 'ncurses_mvgetch' => 'ncurses/ncurses.stub', 'ncurses_mvhline' => 'ncurses/ncurses.stub', 'ncurses_mvinch' => 'ncurses/ncurses.stub', 'ncurses_mvwaddstr' => 'ncurses/ncurses.stub', 'ncurses_napms' => 'ncurses/ncurses.stub', 'ncurses_new_panel' => 'ncurses/ncurses.stub', 'ncurses_newpad' => 'ncurses/ncurses.stub', 'ncurses_newwin' => 'ncurses/ncurses.stub', 'ncurses_nl' => 'ncurses/ncurses.stub', 'ncurses_nocbreak' => 'ncurses/ncurses.stub', 'ncurses_noecho' => 'ncurses/ncurses.stub', 'ncurses_nonl' => 'ncurses/ncurses.stub', 'ncurses_noqiflush' => 'ncurses/ncurses.stub', 'ncurses_noraw' => 'ncurses/ncurses.stub', 'ncurses_pair_content' => 'ncurses/ncurses.stub', 'ncurses_panel_above' => 'ncurses/ncurses.stub', 'ncurses_panel_below' => 'ncurses/ncurses.stub', 'ncurses_panel_window' => 'ncurses/ncurses.stub', 'ncurses_pnoutrefresh' => 'ncurses/ncurses.stub', 'ncurses_prefresh' => 'ncurses/ncurses.stub', 'ncurses_putp' => 'ncurses/ncurses.stub', 'ncurses_qiflush' => 'ncurses/ncurses.stub', 'ncurses_raw' => 'ncurses/ncurses.stub', 'ncurses_refresh' => 'ncurses/ncurses.stub', 'ncurses_replace_panel' => 'ncurses/ncurses.stub', 'ncurses_reset_prog_mode' => 'ncurses/ncurses.stub', 'ncurses_reset_shell_mode' => 'ncurses/ncurses.stub', 'ncurses_resetty' => 'ncurses/ncurses.stub', 'ncurses_savetty' => 'ncurses/ncurses.stub', 'ncurses_scr_dump' => 'ncurses/ncurses.stub', 'ncurses_scr_init' => 'ncurses/ncurses.stub', 'ncurses_scr_restore' => 'ncurses/ncurses.stub', 'ncurses_scr_set' => 'ncurses/ncurses.stub', 'ncurses_scrl' => 'ncurses/ncurses.stub', 'ncurses_show_panel' => 'ncurses/ncurses.stub', 'ncurses_slk_attr' => 'ncurses/ncurses.stub', 'ncurses_slk_attroff' => 'ncurses/ncurses.stub', 'ncurses_slk_attron' => 'ncurses/ncurses.stub', 'ncurses_slk_attrset' => 'ncurses/ncurses.stub', 'ncurses_slk_clear' => 'ncurses/ncurses.stub', 'ncurses_slk_color' => 'ncurses/ncurses.stub', 'ncurses_slk_init' => 'ncurses/ncurses.stub', 'ncurses_slk_noutrefresh' => 'ncurses/ncurses.stub', 'ncurses_slk_refresh' => 'ncurses/ncurses.stub', 'ncurses_slk_restore' => 'ncurses/ncurses.stub', 'ncurses_slk_set' => 'ncurses/ncurses.stub', 'ncurses_slk_touch' => 'ncurses/ncurses.stub', 'ncurses_standend' => 'ncurses/ncurses.stub', 'ncurses_standout' => 'ncurses/ncurses.stub', 'ncurses_start_color' => 'ncurses/ncurses.stub', 'ncurses_termattrs' => 'ncurses/ncurses.stub', 'ncurses_termname' => 'ncurses/ncurses.stub', 'ncurses_timeout' => 'ncurses/ncurses.stub', 'ncurses_top_panel' => 'ncurses/ncurses.stub', 'ncurses_typeahead' => 'ncurses/ncurses.stub', 'ncurses_ungetch' => 'ncurses/ncurses.stub', 'ncurses_ungetmouse' => 'ncurses/ncurses.stub', 'ncurses_update_panels' => 'ncurses/ncurses.stub', 'ncurses_use_default_colors' => 'ncurses/ncurses.stub', 'ncurses_use_env' => 'ncurses/ncurses.stub', 'ncurses_use_extended_names' => 'ncurses/ncurses.stub', 'ncurses_vidattr' => 'ncurses/ncurses.stub', 'ncurses_vline' => 'ncurses/ncurses.stub', 'ncurses_waddch' => 'ncurses/ncurses.stub', 'ncurses_waddstr' => 'ncurses/ncurses.stub', 'ncurses_wattroff' => 'ncurses/ncurses.stub', 'ncurses_wattron' => 'ncurses/ncurses.stub', 'ncurses_wattrset' => 'ncurses/ncurses.stub', 'ncurses_wborder' => 'ncurses/ncurses.stub', 'ncurses_wclear' => 'ncurses/ncurses.stub', 'ncurses_wcolor_set' => 'ncurses/ncurses.stub', 'ncurses_werase' => 'ncurses/ncurses.stub', 'ncurses_wgetch' => 'ncurses/ncurses.stub', 'ncurses_whline' => 'ncurses/ncurses.stub', 'ncurses_wmouse_trafo' => 'ncurses/ncurses.stub', 'ncurses_wmove' => 'ncurses/ncurses.stub', 'ncurses_wnoutrefresh' => 'ncurses/ncurses.stub', 'ncurses_wrefresh' => 'ncurses/ncurses.stub', 'ncurses_wstandend' => 'ncurses/ncurses.stub', 'ncurses_wstandout' => 'ncurses/ncurses.stub', 'ncurses_wvline' => 'ncurses/ncurses.stub', 'net_get_interfaces' => 'standard/standard_4.stub', 'newrelic_accept_distributed_trace_headers' => 'newrelic/newrelic.stub', 'newrelic_accept_distributed_trace_payload' => 'newrelic/newrelic.stub', 'newrelic_accept_distributed_trace_payload_httpsafe' => 'newrelic/newrelic.stub', 'newrelic_add_custom_parameter' => 'newrelic/newrelic.stub', 'newrelic_add_custom_span_parameter' => 'newrelic/newrelic.stub', 'newrelic_add_custom_tracer' => 'newrelic/newrelic.stub', 'newrelic_background_job' => 'newrelic/newrelic.stub', 'newrelic_capture_params' => 'newrelic/newrelic.stub', 'newrelic_create_distributed_trace_payload' => 'newrelic/newrelic.stub', 'newrelic_custom_metric' => 'newrelic/newrelic.stub', 'newrelic_disable_autorum' => 'newrelic/newrelic.stub', 'newrelic_enable_params' => 'newrelic/newrelic.stub', 'newrelic_end_of_transaction' => 'newrelic/newrelic.stub', 'newrelic_end_transaction' => 'newrelic/newrelic.stub', 'newrelic_get_browser_timing_footer' => 'newrelic/newrelic.stub', 'newrelic_get_browser_timing_header' => 'newrelic/newrelic.stub', 'newrelic_get_linking_metadata' => 'newrelic/newrelic.stub', 'newrelic_get_trace_metadata' => 'newrelic/newrelic.stub', 'newrelic_ignore_apdex' => 'newrelic/newrelic.stub', 'newrelic_ignore_transaction' => 'newrelic/newrelic.stub', 'newrelic_insert_distributed_trace_headers' => 'newrelic/newrelic.stub', 'newrelic_is_sampled' => 'newrelic/newrelic.stub', 'newrelic_name_transaction' => 'newrelic/newrelic.stub', 'newrelic_notice_error' => 'newrelic/newrelic.stub', 'newrelic_record_custom_event' => 'newrelic/newrelic.stub', 'newrelic_record_datastore_segment' => 'newrelic/newrelic.stub', 'newrelic_set_appname' => 'newrelic/newrelic.stub', 'newrelic_set_user_attributes' => 'newrelic/newrelic.stub', 'newrelic_start_transaction' => 'newrelic/newrelic.stub', 'next' => 'standard/standard_8.stub', 'ngettext' => 'gettext/gettext.stub', 'nl2br' => 'standard/standard_1.stub', 'nl_langinfo' => 'standard/standard_2.stub', 'normalizer_get_raw_decomposition' => 'intl/intl.stub', 'normalizer_is_normalized' => 'intl/intl.stub', 'normalizer_normalize' => 'intl/intl.stub', 'number_format' => 'standard/standard_3.stub', 'numfmt_create' => 'intl/intl.stub', 'numfmt_format' => 'intl/intl.stub', 'numfmt_format_currency' => 'intl/intl.stub', 'numfmt_get_attribute' => 'intl/intl.stub', 'numfmt_get_error_code' => 'intl/intl.stub', 'numfmt_get_error_message' => 'intl/intl.stub', 'numfmt_get_locale' => 'intl/intl.stub', 'numfmt_get_pattern' => 'intl/intl.stub', 'numfmt_get_symbol' => 'intl/intl.stub', 'numfmt_get_text_attribute' => 'intl/intl.stub', 'numfmt_parse' => 'intl/intl.stub', 'numfmt_parse_currency' => 'intl/intl.stub', 'numfmt_set_attribute' => 'intl/intl.stub', 'numfmt_set_pattern' => 'intl/intl.stub', 'numfmt_set_symbol' => 'intl/intl.stub', 'numfmt_set_text_attribute' => 'intl/intl.stub', 'oauth_get_sbs' => 'oauth/oauth.stub', 'oauth_urlencode' => 'oauth/oauth.stub', 'ob_clean' => 'standard/standard_8.stub', 'ob_deflatehandler' => 'http/http.stub', 'ob_end_clean' => 'standard/standard_8.stub', 'ob_end_flush' => 'standard/standard_8.stub', 'ob_etaghandler' => 'http/http.stub', 'ob_flush' => 'standard/standard_8.stub', 'ob_get_clean' => 'standard/standard_8.stub', 'ob_get_contents' => 'standard/standard_8.stub', 'ob_get_flush' => 'standard/standard_8.stub', 'ob_get_length' => 'standard/standard_8.stub', 'ob_get_level' => 'standard/standard_8.stub', 'ob_get_status' => 'standard/standard_8.stub', 'ob_gzhandler' => 'zlib/zlib.stub', 'ob_iconv_handler' => 'iconv/iconv.stub', 'ob_implicit_flush' => 'standard/standard_8.stub', 'ob_inflatehandler' => 'http/http.stub', 'ob_list_handlers' => 'standard/standard_8.stub', 'ob_start' => 'standard/standard_8.stub', 'ob_tidyhandler' => 'tidy/tidy.stub', 'oci_bind_array_by_name' => 'oci8/oci8.stub', 'oci_bind_by_name' => 'oci8/oci8.stub', 'oci_cancel' => 'oci8/oci8.stub', 'oci_client_version' => 'oci8/oci8.stub', 'oci_close' => 'oci8/oci8.stub', 'oci_commit' => 'oci8/oci8.stub', 'oci_connect' => 'oci8/oci8.stub', 'oci_define_by_name' => 'oci8/oci8.stub', 'oci_error' => 'oci8/oci8.stub', 'oci_execute' => 'oci8/oci8.stub', 'oci_fetch' => 'oci8/oci8.stub', 'oci_fetch_all' => 'oci8/oci8.stub', 'oci_fetch_array' => 'oci8/oci8.stub', 'oci_fetch_assoc' => 'oci8/oci8.stub', 'oci_fetch_object' => 'oci8/oci8.stub', 'oci_fetch_row' => 'oci8/oci8.stub', 'oci_field_is_null' => 'oci8/oci8.stub', 'oci_field_name' => 'oci8/oci8.stub', 'oci_field_precision' => 'oci8/oci8.stub', 'oci_field_scale' => 'oci8/oci8.stub', 'oci_field_size' => 'oci8/oci8.stub', 'oci_field_type' => 'oci8/oci8.stub', 'oci_field_type_raw' => 'oci8/oci8.stub', 'oci_free_cursor' => 'oci8/oci8.stub', 'oci_free_descriptor' => 'oci8/oci8.stub', 'oci_free_statement' => 'oci8/oci8.stub', 'oci_get_implicit_resultset' => 'oci8/oci8.stub', 'oci_internal_debug' => 'oci8/oci8.stub', 'oci_lob_copy' => 'oci8/oci8.stub', 'oci_lob_is_equal' => 'oci8/oci8.stub', 'oci_new_collection' => 'oci8/oci8.stub', 'oci_new_connect' => 'oci8/oci8.stub', 'oci_new_cursor' => 'oci8/oci8.stub', 'oci_new_descriptor' => 'oci8/oci8.stub', 'oci_num_fields' => 'oci8/oci8.stub', 'oci_num_rows' => 'oci8/oci8.stub', 'oci_parse' => 'oci8/oci8.stub', 'oci_password_change' => 'oci8/oci8.stub', 'oci_pconnect' => 'oci8/oci8.stub', 'oci_register_taf_callback' => 'oci8/oci8.stub', 'oci_result' => 'oci8/oci8.stub', 'oci_rollback' => 'oci8/oci8.stub', 'oci_server_version' => 'oci8/oci8.stub', 'oci_set_action' => 'oci8/oci8.stub', 'oci_set_call_timeout' => 'oci8/oci8v3.stub', 'oci_set_client_identifier' => 'oci8/oci8.stub', 'oci_set_client_info' => 'oci8/oci8.stub', 'oci_set_db_operation' => 'oci8/oci8v3.stub', 'oci_set_edition' => 'oci8/oci8.stub', 'oci_set_module_name' => 'oci8/oci8.stub', 'oci_set_prefetch' => 'oci8/oci8.stub', 'oci_statement_type' => 'oci8/oci8.stub', 'oci_unregister_taf_callback' => 'oci8/oci8.stub', 'ocibindbyname' => 'oci8/oci8.stub', 'ocicancel' => 'oci8/oci8.stub', 'ocicloselob' => 'oci8/oci8.stub', 'ocicollappend' => 'oci8/oci8.stub', 'ocicollassign' => 'oci8/oci8.stub', 'ocicollassignelem' => 'oci8/oci8.stub', 'ocicollgetelem' => 'oci8/oci8.stub', 'ocicollmax' => 'oci8/oci8.stub', 'ocicollsize' => 'oci8/oci8.stub', 'ocicolltrim' => 'oci8/oci8.stub', 'ocicolumnisnull' => 'oci8/oci8.stub', 'ocicolumnname' => 'oci8/oci8.stub', 'ocicolumnprecision' => 'oci8/oci8.stub', 'ocicolumnscale' => 'oci8/oci8.stub', 'ocicolumnsize' => 'oci8/oci8.stub', 'ocicolumntype' => 'oci8/oci8.stub', 'ocicolumntyperaw' => 'oci8/oci8.stub', 'ocicommit' => 'oci8/oci8.stub', 'ocidefinebyname' => 'oci8/oci8.stub', 'ocierror' => 'oci8/oci8.stub', 'ociexecute' => 'oci8/oci8.stub', 'ocifetch' => 'oci8/oci8.stub', 'ocifetchinto' => 'oci8/oci8.stub', 'ocifetchstatement' => 'oci8/oci8.stub', 'ocifreecollection' => 'oci8/oci8.stub', 'ocifreecursor' => 'oci8/oci8.stub', 'ocifreedesc' => 'oci8/oci8.stub', 'ocifreestatement' => 'oci8/oci8.stub', 'ociinternaldebug' => 'oci8/oci8.stub', 'ociloadlob' => 'oci8/oci8.stub', 'ocilogoff' => 'oci8/oci8.stub', 'ocilogon' => 'oci8/oci8.stub', 'ocinewcollection' => 'oci8/oci8.stub', 'ocinewcursor' => 'oci8/oci8.stub', 'ocinewdescriptor' => 'oci8/oci8.stub', 'ocinlogon' => 'oci8/oci8.stub', 'ocinumcols' => 'oci8/oci8.stub', 'ociparse' => 'oci8/oci8.stub', 'ocipasswordchange' => 'oci8/oci8.stub', 'ociplogon' => 'oci8/oci8.stub', 'ociresult' => 'oci8/oci8.stub', 'ocirollback' => 'oci8/oci8.stub', 'ocirowcount' => 'oci8/oci8.stub', 'ocisavelob' => 'oci8/oci8.stub', 'ocisavelobfile' => 'oci8/oci8.stub', 'ociserverversion' => 'oci8/oci8.stub', 'ocisetprefetch' => 'oci8/oci8.stub', 'ocistatementtype' => 'oci8/oci8.stub', 'ociwritelobtofile' => 'oci8/oci8.stub', 'ociwritetemporarylob' => 'oci8/oci8.stub', 'octdec' => 'standard/standard_3.stub', 'odbc_autocommit' => 'odbc/odbc.stub', 'odbc_binmode' => 'odbc/odbc.stub', 'odbc_close' => 'odbc/odbc.stub', 'odbc_close_all' => 'odbc/odbc.stub', 'odbc_columnprivileges' => 'odbc/odbc.stub', 'odbc_columns' => 'odbc/odbc.stub', 'odbc_commit' => 'odbc/odbc.stub', 'odbc_connect' => 'odbc/odbc.stub', 'odbc_cursor' => 'odbc/odbc.stub', 'odbc_data_source' => 'odbc/odbc.stub', 'odbc_do' => 'odbc/odbc.stub', 'odbc_error' => 'odbc/odbc.stub', 'odbc_errormsg' => 'odbc/odbc.stub', 'odbc_exec' => 'odbc/odbc.stub', 'odbc_execute' => 'odbc/odbc.stub', 'odbc_fetch_array' => 'odbc/odbc.stub', 'odbc_fetch_into' => 'odbc/odbc.stub', 'odbc_fetch_object' => 'odbc/odbc.stub', 'odbc_fetch_row' => 'odbc/odbc.stub', 'odbc_field_len' => 'odbc/odbc.stub', 'odbc_field_name' => 'odbc/odbc.stub', 'odbc_field_num' => 'odbc/odbc.stub', 'odbc_field_precision' => 'odbc/odbc.stub', 'odbc_field_scale' => 'odbc/odbc.stub', 'odbc_field_type' => 'odbc/odbc.stub', 'odbc_foreignkeys' => 'odbc/odbc.stub', 'odbc_free_result' => 'odbc/odbc.stub', 'odbc_gettypeinfo' => 'odbc/odbc.stub', 'odbc_longreadlen' => 'odbc/odbc.stub', 'odbc_next_result' => 'odbc/odbc.stub', 'odbc_num_fields' => 'odbc/odbc.stub', 'odbc_num_rows' => 'odbc/odbc.stub', 'odbc_pconnect' => 'odbc/odbc.stub', 'odbc_prepare' => 'odbc/odbc.stub', 'odbc_primarykeys' => 'odbc/odbc.stub', 'odbc_procedurecolumns' => 'odbc/odbc.stub', 'odbc_procedures' => 'odbc/odbc.stub', 'odbc_result' => 'odbc/odbc.stub', 'odbc_result_all' => 'odbc/odbc.stub', 'odbc_rollback' => 'odbc/odbc.stub', 'odbc_setoption' => 'odbc/odbc.stub', 'odbc_specialcolumns' => 'odbc/odbc.stub', 'odbc_statistics' => 'odbc/odbc.stub', 'odbc_tableprivileges' => 'odbc/odbc.stub', 'odbc_tables' => 'odbc/odbc.stub', 'opcache_compile_file' => 'Zend OPcache/OPcache.stub', 'opcache_get_configuration' => 'Zend OPcache/OPcache.stub', 'opcache_get_status' => 'Zend OPcache/OPcache.stub', 'opcache_invalidate' => 'Zend OPcache/OPcache.stub', 'opcache_is_script_cached' => 'Zend OPcache/OPcache.stub', 'opcache_reset' => 'Zend OPcache/OPcache.stub', 'opendir' => 'standard/standard_7.stub', 'openlog' => 'standard/standard_7.stub', 'openssl_cipher_iv_length' => 'openssl/openssl.stub', 'openssl_cipher_key_length' => 'openssl/openssl.stub', 'openssl_cms_decrypt' => 'openssl/openssl.stub', 'openssl_cms_encrypt' => 'openssl/openssl.stub', 'openssl_cms_read' => 'openssl/openssl.stub', 'openssl_cms_sign' => 'openssl/openssl.stub', 'openssl_cms_verify' => 'openssl/openssl.stub', 'openssl_csr_export' => 'openssl/openssl.stub', 'openssl_csr_export_to_file' => 'openssl/openssl.stub', 'openssl_csr_get_public_key' => 'openssl/openssl.stub', 'openssl_csr_get_subject' => 'openssl/openssl.stub', 'openssl_csr_new' => 'openssl/openssl.stub', 'openssl_csr_sign' => 'openssl/openssl.stub', 'openssl_decrypt' => 'openssl/openssl.stub', 'openssl_dh_compute_key' => 'openssl/openssl.stub', 'openssl_digest' => 'openssl/openssl.stub', 'openssl_encrypt' => 'openssl/openssl.stub', 'openssl_error_string' => 'openssl/openssl.stub', 'openssl_free_key' => 'openssl/openssl.stub', 'openssl_get_cert_locations' => 'openssl/openssl.stub', 'openssl_get_cipher_methods' => 'openssl/openssl.stub', 'openssl_get_curve_names' => 'openssl/openssl.stub', 'openssl_get_md_methods' => 'openssl/openssl.stub', 'openssl_get_privatekey' => 'openssl/openssl.stub', 'openssl_get_publickey' => 'openssl/openssl.stub', 'openssl_open' => 'openssl/openssl.stub', 'openssl_pbkdf2' => 'openssl/openssl.stub', 'openssl_pkcs12_export' => 'openssl/openssl.stub', 'openssl_pkcs12_export_to_file' => 'openssl/openssl.stub', 'openssl_pkcs12_read' => 'openssl/openssl.stub', 'openssl_pkcs7_decrypt' => 'openssl/openssl.stub', 'openssl_pkcs7_encrypt' => 'openssl/openssl.stub', 'openssl_pkcs7_read' => 'openssl/openssl.stub', 'openssl_pkcs7_sign' => 'openssl/openssl.stub', 'openssl_pkcs7_verify' => 'openssl/openssl.stub', 'openssl_pkey_derive' => 'openssl/openssl.stub', 'openssl_pkey_export' => 'openssl/openssl.stub', 'openssl_pkey_export_to_file' => 'openssl/openssl.stub', 'openssl_pkey_free' => 'openssl/openssl.stub', 'openssl_pkey_get_details' => 'openssl/openssl.stub', 'openssl_pkey_get_private' => 'openssl/openssl.stub', 'openssl_pkey_get_public' => 'openssl/openssl.stub', 'openssl_pkey_new' => 'openssl/openssl.stub', 'openssl_private_decrypt' => 'openssl/openssl.stub', 'openssl_private_encrypt' => 'openssl/openssl.stub', 'openssl_public_decrypt' => 'openssl/openssl.stub', 'openssl_public_encrypt' => 'openssl/openssl.stub', 'openssl_random_pseudo_bytes' => 'openssl/openssl.stub', 'openssl_seal' => 'openssl/openssl.stub', 'openssl_sign' => 'openssl/openssl.stub', 'openssl_spki_export' => 'openssl/openssl.stub', 'openssl_spki_export_challenge' => 'openssl/openssl.stub', 'openssl_spki_new' => 'openssl/openssl.stub', 'openssl_spki_verify' => 'openssl/openssl.stub', 'openssl_verify' => 'openssl/openssl.stub', 'openssl_x509_check_private_key' => 'openssl/openssl.stub', 'openssl_x509_checkpurpose' => 'openssl/openssl.stub', 'openssl_x509_export' => 'openssl/openssl.stub', 'openssl_x509_export_to_file' => 'openssl/openssl.stub', 'openssl_x509_fingerprint' => 'openssl/openssl.stub', 'openssl_x509_free' => 'openssl/openssl.stub', 'openssl_x509_parse' => 'openssl/openssl.stub', 'openssl_x509_read' => 'openssl/openssl.stub', 'openssl_x509_verify' => 'openssl/openssl.stub', 'ord' => 'standard/standard_2.stub', 'output_add_rewrite_var' => 'standard/standard_9.stub', 'output_cache_disable' => 'zend/zend.stub', 'output_cache_disable_compression' => 'zend/zend.stub', 'output_cache_exists' => 'zend/zend.stub', 'output_cache_fetch' => 'zend/zend.stub', 'output_cache_get' => 'zend/zend.stub', 'output_cache_output' => 'zend/zend.stub', 'output_cache_put' => 'zend/zend.stub', 'output_cache_remove' => 'zend/zend.stub', 'output_cache_remove_key' => 'zend/zend.stub', 'output_cache_remove_url' => 'zend/zend.stub', 'output_cache_stop' => 'zend/zend.stub', 'output_reset_rewrite_vars' => 'standard/standard_9.stub', 'pack' => 'standard/standard_7.stub', 'pam_auth' => 'pam/pam.stub', 'pam_chpass' => 'pam/pam.stub', 'parallel\\bootstrap' => 'parallel/parallel.stub', 'parallel\\count' => 'parallel/parallel.stub', 'parallel\\run' => 'parallel/parallel.stub', 'parse_ini_file' => 'standard/standard_4.stub', 'parse_ini_string' => 'standard/standard_4.stub', 'parse_str' => 'standard/standard_2.stub', 'parse_url' => 'standard/standard_2.stub', 'passthru' => 'standard/standard_2.stub', 'password_algos' => 'standard/password.stub', 'password_get_info' => 'standard/password.stub', 'password_hash' => 'standard/password.stub', 'password_needs_rehash' => 'standard/password.stub', 'password_verify' => 'standard/password.stub', 'pathinfo' => 'standard/standard_1.stub', 'pclose' => 'standard/standard_5.stub', 'pcntl_alarm' => 'pcntl/pcntl.stub', 'pcntl_async_signals' => 'pcntl/pcntl.stub', 'pcntl_errno' => 'pcntl/pcntl.stub', 'pcntl_exec' => 'pcntl/pcntl.stub', 'pcntl_fork' => 'pcntl/pcntl.stub', 'pcntl_get_last_error' => 'pcntl/pcntl.stub', 'pcntl_getpriority' => 'pcntl/pcntl.stub', 'pcntl_setpriority' => 'pcntl/pcntl.stub', 'pcntl_signal' => 'pcntl/pcntl.stub', 'pcntl_signal_dispatch' => 'pcntl/pcntl.stub', 'pcntl_signal_get_handler' => 'pcntl/pcntl.stub', 'pcntl_sigprocmask' => 'pcntl/pcntl.stub', 'pcntl_sigtimedwait' => 'pcntl/pcntl.stub', 'pcntl_sigwaitinfo' => 'pcntl/pcntl.stub', 'pcntl_strerror' => 'pcntl/pcntl.stub', 'pcntl_unshare' => 'pcntl/pcntl.stub', 'pcntl_wait' => 'pcntl/pcntl.stub', 'pcntl_waitpid' => 'pcntl/pcntl.stub', 'pcntl_wexitstatus' => 'pcntl/pcntl.stub', 'pcntl_wifcontinued' => 'pcntl/pcntl.stub', 'pcntl_wifexited' => 'pcntl/pcntl.stub', 'pcntl_wifsignaled' => 'pcntl/pcntl.stub', 'pcntl_wifstopped' => 'pcntl/pcntl.stub', 'pcntl_wstopsig' => 'pcntl/pcntl.stub', 'pcntl_wtermsig' => 'pcntl/pcntl.stub', 'pcov\\clear' => 'pcov/pcov.stub', 'pcov\\collect' => 'pcov/pcov.stub', 'pcov\\memory' => 'pcov/pcov.stub', 'pcov\\start' => 'pcov/pcov.stub', 'pcov\\stop' => 'pcov/pcov.stub', 'pcov\\waiting' => 'pcov/pcov.stub', 'pdo_drivers' => 'PDO/PDO.stub', 'pfsockopen' => 'standard/standard_7.stub', 'pg_affected_rows' => 'pgsql/pgsql.stub', 'pg_cancel_query' => 'pgsql/pgsql.stub', 'pg_client_encoding' => 'pgsql/pgsql.stub', 'pg_clientencoding' => 'pgsql/pgsql.stub', 'pg_close' => 'pgsql/pgsql.stub', 'pg_cmdtuples' => 'pgsql/pgsql.stub', 'pg_connect' => 'pgsql/pgsql.stub', 'pg_connect_poll' => 'pgsql/pgsql.stub', 'pg_connection_busy' => 'pgsql/pgsql.stub', 'pg_connection_reset' => 'pgsql/pgsql.stub', 'pg_connection_status' => 'pgsql/pgsql.stub', 'pg_consume_input' => 'pgsql/pgsql.stub', 'pg_convert' => 'pgsql/pgsql.stub', 'pg_copy_from' => 'pgsql/pgsql.stub', 'pg_copy_to' => 'pgsql/pgsql.stub', 'pg_dbname' => 'pgsql/pgsql.stub', 'pg_delete' => 'pgsql/pgsql.stub', 'pg_end_copy' => 'pgsql/pgsql.stub', 'pg_errormessage' => 'pgsql/pgsql.stub', 'pg_escape_bytea' => 'pgsql/pgsql.stub', 'pg_escape_identifier' => 'pgsql/pgsql.stub', 'pg_escape_literal' => 'pgsql/pgsql.stub', 'pg_escape_string' => 'pgsql/pgsql.stub', 'pg_exec' => 'pgsql/pgsql.stub', 'pg_execute' => 'pgsql/pgsql.stub', 'pg_fetch_all' => 'pgsql/pgsql.stub', 'pg_fetch_all_columns' => 'pgsql/pgsql.stub', 'pg_fetch_array' => 'pgsql/pgsql.stub', 'pg_fetch_assoc' => 'pgsql/pgsql.stub', 'pg_fetch_object' => 'pgsql/pgsql.stub', 'pg_fetch_result' => 'pgsql/pgsql.stub', 'pg_fetch_row' => 'pgsql/pgsql.stub', 'pg_field_is_null' => 'pgsql/pgsql.stub', 'pg_field_name' => 'pgsql/pgsql.stub', 'pg_field_num' => 'pgsql/pgsql.stub', 'pg_field_prtlen' => 'pgsql/pgsql.stub', 'pg_field_size' => 'pgsql/pgsql.stub', 'pg_field_table' => 'pgsql/pgsql.stub', 'pg_field_type' => 'pgsql/pgsql.stub', 'pg_field_type_oid' => 'pgsql/pgsql.stub', 'pg_fieldisnull' => 'pgsql/pgsql.stub', 'pg_fieldname' => 'pgsql/pgsql.stub', 'pg_fieldnum' => 'pgsql/pgsql.stub', 'pg_fieldprtlen' => 'pgsql/pgsql.stub', 'pg_fieldsize' => 'pgsql/pgsql.stub', 'pg_fieldtype' => 'pgsql/pgsql.stub', 'pg_flush' => 'pgsql/pgsql.stub', 'pg_free_result' => 'pgsql/pgsql.stub', 'pg_freeresult' => 'pgsql/pgsql.stub', 'pg_get_notify' => 'pgsql/pgsql.stub', 'pg_get_pid' => 'pgsql/pgsql.stub', 'pg_get_result' => 'pgsql/pgsql.stub', 'pg_getlastoid' => 'pgsql/pgsql.stub', 'pg_host' => 'pgsql/pgsql.stub', 'pg_insert' => 'pgsql/pgsql.stub', 'pg_last_error' => 'pgsql/pgsql.stub', 'pg_last_notice' => 'pgsql/pgsql.stub', 'pg_last_oid' => 'pgsql/pgsql.stub', 'pg_lo_close' => 'pgsql/pgsql.stub', 'pg_lo_create' => 'pgsql/pgsql.stub', 'pg_lo_export' => 'pgsql/pgsql.stub', 'pg_lo_import' => 'pgsql/pgsql.stub', 'pg_lo_open' => 'pgsql/pgsql.stub', 'pg_lo_read' => 'pgsql/pgsql.stub', 'pg_lo_read_all' => 'pgsql/pgsql.stub', 'pg_lo_seek' => 'pgsql/pgsql.stub', 'pg_lo_tell' => 'pgsql/pgsql.stub', 'pg_lo_truncate' => 'pgsql/pgsql.stub', 'pg_lo_unlink' => 'pgsql/pgsql.stub', 'pg_lo_write' => 'pgsql/pgsql.stub', 'pg_loclose' => 'pgsql/pgsql.stub', 'pg_locreate' => 'pgsql/pgsql.stub', 'pg_loexport' => 'pgsql/pgsql.stub', 'pg_loimport' => 'pgsql/pgsql.stub', 'pg_loopen' => 'pgsql/pgsql.stub', 'pg_loread' => 'pgsql/pgsql.stub', 'pg_loreadall' => 'pgsql/pgsql.stub', 'pg_lounlink' => 'pgsql/pgsql.stub', 'pg_lowrite' => 'pgsql/pgsql.stub', 'pg_meta_data' => 'pgsql/pgsql.stub', 'pg_num_fields' => 'pgsql/pgsql.stub', 'pg_num_rows' => 'pgsql/pgsql.stub', 'pg_numfields' => 'pgsql/pgsql.stub', 'pg_numrows' => 'pgsql/pgsql.stub', 'pg_options' => 'pgsql/pgsql.stub', 'pg_parameter_status' => 'pgsql/pgsql.stub', 'pg_pconnect' => 'pgsql/pgsql.stub', 'pg_ping' => 'pgsql/pgsql.stub', 'pg_port' => 'pgsql/pgsql.stub', 'pg_prepare' => 'pgsql/pgsql.stub', 'pg_put_line' => 'pgsql/pgsql.stub', 'pg_query' => 'pgsql/pgsql.stub', 'pg_query_params' => 'pgsql/pgsql.stub', 'pg_result' => 'pgsql/pgsql.stub', 'pg_result_error' => 'pgsql/pgsql.stub', 'pg_result_error_field' => 'pgsql/pgsql.stub', 'pg_result_seek' => 'pgsql/pgsql.stub', 'pg_result_status' => 'pgsql/pgsql.stub', 'pg_select' => 'pgsql/pgsql.stub', 'pg_send_execute' => 'pgsql/pgsql.stub', 'pg_send_prepare' => 'pgsql/pgsql.stub', 'pg_send_query' => 'pgsql/pgsql.stub', 'pg_send_query_params' => 'pgsql/pgsql.stub', 'pg_set_client_encoding' => 'pgsql/pgsql.stub', 'pg_set_error_verbosity' => 'pgsql/pgsql.stub', 'pg_setclientencoding' => 'pgsql/pgsql.stub', 'pg_socket' => 'pgsql/pgsql.stub', 'pg_trace' => 'pgsql/pgsql.stub', 'pg_transaction_status' => 'pgsql/pgsql.stub', 'pg_tty' => 'pgsql/pgsql.stub', 'pg_unescape_bytea' => 'pgsql/pgsql.stub', 'pg_untrace' => 'pgsql/pgsql.stub', 'pg_update' => 'pgsql/pgsql.stub', 'pg_version' => 'pgsql/pgsql.stub', 'php_egg_logo_guid' => 'standard/standard_0.stub', 'php_ini_loaded_file' => 'standard/standard_0.stub', 'php_ini_scanned_files' => 'standard/standard_0.stub', 'php_logo_guid' => 'standard/standard_0.stub', 'php_real_logo_guid' => 'standard/standard_0.stub', 'php_sapi_name' => 'standard/standard_0.stub', 'php_strip_whitespace' => 'standard/standard_4.stub', 'php_uname' => 'standard/standard_0.stub', 'phpcredits' => 'standard/standard_0.stub', 'phpdbg_break_file' => 'phpdbg/phpdbg.stub', 'phpdbg_break_function' => 'phpdbg/phpdbg.stub', 'phpdbg_break_method' => 'phpdbg/phpdbg.stub', 'phpdbg_break_next' => 'phpdbg/phpdbg.stub', 'phpdbg_clear' => 'phpdbg/phpdbg.stub', 'phpdbg_color' => 'phpdbg/phpdbg.stub', 'phpdbg_end_oplog' => 'phpdbg/phpdbg.stub', 'phpdbg_exec' => 'phpdbg/phpdbg.stub', 'phpdbg_get_executable' => 'phpdbg/phpdbg.stub', 'phpdbg_prompt' => 'phpdbg/phpdbg.stub', 'phpdbg_start_oplog' => 'phpdbg/phpdbg.stub', 'phpinfo' => 'standard/standard_0.stub', 'phpversion' => 'standard/standard_0.stub', 'pi' => 'standard/standard_3.stub', 'png2wbmp' => 'gd/gd.stub', 'popen' => 'standard/standard_5.stub', 'pos' => 'standard/standard_9.stub', 'posix_access' => 'posix/posix.stub', 'posix_ctermid' => 'posix/posix.stub', 'posix_errno' => 'posix/posix.stub', 'posix_get_last_error' => 'posix/posix.stub', 'posix_getcwd' => 'posix/posix.stub', 'posix_getegid' => 'posix/posix.stub', 'posix_geteuid' => 'posix/posix.stub', 'posix_getgid' => 'posix/posix.stub', 'posix_getgrgid' => 'posix/posix.stub', 'posix_getgrnam' => 'posix/posix.stub', 'posix_getgroups' => 'posix/posix.stub', 'posix_getlogin' => 'posix/posix.stub', 'posix_getpgid' => 'posix/posix.stub', 'posix_getpgrp' => 'posix/posix.stub', 'posix_getpid' => 'posix/posix.stub', 'posix_getppid' => 'posix/posix.stub', 'posix_getpwnam' => 'posix/posix.stub', 'posix_getpwuid' => 'posix/posix.stub', 'posix_getrlimit' => 'posix/posix.stub', 'posix_getsid' => 'posix/posix.stub', 'posix_getuid' => 'posix/posix.stub', 'posix_initgroups' => 'posix/posix.stub', 'posix_isatty' => 'posix/posix.stub', 'posix_kill' => 'posix/posix.stub', 'posix_mkfifo' => 'posix/posix.stub', 'posix_mknod' => 'posix/posix.stub', 'posix_setegid' => 'posix/posix.stub', 'posix_seteuid' => 'posix/posix.stub', 'posix_setgid' => 'posix/posix.stub', 'posix_setpgid' => 'posix/posix.stub', 'posix_setrlimit' => 'posix/posix.stub', 'posix_setsid' => 'posix/posix.stub', 'posix_setuid' => 'posix/posix.stub', 'posix_strerror' => 'posix/posix.stub', 'posix_times' => 'posix/posix.stub', 'posix_ttyname' => 'posix/posix.stub', 'posix_uname' => 'posix/posix.stub', 'pow' => 'standard/standard_3.stub', 'preg_filter' => 'pcre/pcre.stub', 'preg_grep' => 'pcre/pcre.stub', 'preg_last_error' => 'pcre/pcre.stub', 'preg_last_error_msg' => 'pcre/pcre.stub', 'preg_match' => 'pcre/pcre.stub', 'preg_match_all' => 'pcre/pcre.stub', 'preg_quote' => 'pcre/pcre.stub', 'preg_replace' => 'pcre/pcre.stub', 'preg_replace_callback' => 'pcre/pcre.stub', 'preg_replace_callback_array' => 'pcre/pcre.stub', 'preg_split' => 'pcre/pcre.stub', 'prev' => 'standard/standard_8.stub', 'print_r' => 'standard/standard_4.stub', 'printf' => 'standard/standard_2.stub', 'proc_close' => 'standard/standard_2.stub', 'proc_get_status' => 'standard/standard_2.stub', 'proc_nice' => 'standard/standard_2.stub', 'proc_open' => 'standard/standard_2.stub', 'proc_terminate' => 'standard/standard_2.stub', 'property_exists' => 'Core/Core.stub', 'pspell_add_to_personal' => 'pspell/pspell.stub', 'pspell_add_to_session' => 'pspell/pspell.stub', 'pspell_check' => 'pspell/pspell.stub', 'pspell_clear_session' => 'pspell/pspell.stub', 'pspell_config_create' => 'pspell/pspell.stub', 'pspell_config_data_dir' => 'pspell/pspell.stub', 'pspell_config_dict_dir' => 'pspell/pspell.stub', 'pspell_config_ignore' => 'pspell/pspell.stub', 'pspell_config_mode' => 'pspell/pspell.stub', 'pspell_config_personal' => 'pspell/pspell.stub', 'pspell_config_repl' => 'pspell/pspell.stub', 'pspell_config_runtogether' => 'pspell/pspell.stub', 'pspell_config_save_repl' => 'pspell/pspell.stub', 'pspell_new' => 'pspell/pspell.stub', 'pspell_new_config' => 'pspell/pspell.stub', 'pspell_new_personal' => 'pspell/pspell.stub', 'pspell_save_wordlist' => 'pspell/pspell.stub', 'pspell_store_replacement' => 'pspell/pspell.stub', 'pspell_suggest' => 'pspell/pspell.stub', 'putenv' => 'standard/standard_3.stub', 'quoted_printable_decode' => 'standard/standard_3.stub', 'quoted_printable_encode' => 'standard/standard_3.stub', 'quotemeta' => 'standard/standard_1.stub', 'rad2deg' => 'standard/standard_3.stub', 'radius_acct_open' => 'radius/radius.stub', 'radius_add_server' => 'radius/radius.stub', 'radius_auth_open' => 'radius/radius.stub', 'radius_close' => 'radius/radius.stub', 'radius_config' => 'radius/radius.stub', 'radius_create_request' => 'radius/radius.stub', 'rand' => 'random/random.stub', 'random_bytes' => 'random/random.stub', 'random_int' => 'random/random.stub', 'range' => 'standard/standard_8.stub', 'rawurldecode' => 'standard/standard_2.stub', 'rawurlencode' => 'standard/standard_2.stub', 'rd_kafka_err2str' => 'rdkafka/functions.stub', 'rd_kafka_errno' => 'rdkafka/functions.stub', 'rd_kafka_errno2err' => 'rdkafka/functions.stub', 'rd_kafka_get_err_descs' => 'rdkafka/functions.stub', 'rd_kafka_offset_tail' => 'rdkafka/functions.stub', 'rd_kafka_thread_cnt' => 'rdkafka/functions.stub', 'read_exif_data' => 'exif/exif.stub', 'readdir' => 'standard/standard_7.stub', 'readfile' => 'standard/standard_5.stub', 'readgzfile' => 'zlib/zlib.stub', 'readline' => 'readline/readline.stub', 'readline_add_history' => 'readline/readline.stub', 'readline_callback_handler_install' => 'readline/readline.stub', 'readline_callback_handler_remove' => 'readline/readline.stub', 'readline_callback_read_char' => 'readline/readline.stub', 'readline_clear_history' => 'readline/readline.stub', 'readline_completion_function' => 'readline/readline.stub', 'readline_info' => 'readline/readline.stub', 'readline_list_history' => 'readline/readline.stub', 'readline_on_new_line' => 'readline/readline.stub', 'readline_read_history' => 'readline/readline.stub', 'readline_redisplay' => 'readline/readline.stub', 'readline_write_history' => 'readline/readline.stub', 'readlink' => 'standard/standard_2.stub', 'realpath' => 'standard/standard_6.stub', 'realpath_cache_get' => 'standard/standard_9.stub', 'realpath_cache_size' => 'standard/standard_9.stub', 'recode' => 'recode/recode.stub', 'recode_file' => 'recode/recode.stub', 'recode_string' => 'recode/recode.stub', 'register_event_handler' => 'zend/zend.stub', 'register_shutdown_function' => 'standard/standard_4.stub', 'register_tick_function' => 'standard/standard_4.stub', 'rename' => 'standard/standard_5.stub', 'reset' => 'standard/standard_8.stub', 'resourcebundle_count' => 'intl/intl.stub', 'resourcebundle_create' => 'intl/intl.stub', 'resourcebundle_get' => 'intl/intl.stub', 'resourcebundle_get_error_code' => 'intl/intl.stub', 'resourcebundle_get_error_message' => 'intl/intl.stub', 'resourcebundle_locales' => 'intl/intl.stub', 'restore_error_handler' => 'Core/Core.stub', 'restore_exception_handler' => 'Core/Core.stub', 'restore_include_path' => 'standard/standard_4.stub', 'rewind' => 'standard/standard_5.stub', 'rewinddir' => 'standard/standard_7.stub', 'rmdir' => 'standard/standard_5.stub', 'round' => 'standard/standard_3.stub', 'rpmdbinfo' => 'rpminfo/rpminfo.stub', 'rpmdbsearch' => 'rpminfo/rpminfo.stub', 'rpminfo' => 'rpminfo/rpminfo.stub', 'rpmvercmp' => 'rpminfo/rpminfo.stub', 'rrd_create' => 'rrd/rrd.stub', 'rrd_disconnect' => 'rrd/rrd.stub', 'rrd_error' => 'rrd/rrd.stub', 'rrd_fetch' => 'rrd/rrd.stub', 'rrd_first' => 'rrd/rrd.stub', 'rrd_graph' => 'rrd/rrd.stub', 'rrd_info' => 'rrd/rrd.stub', 'rrd_last' => 'rrd/rrd.stub', 'rrd_lastupdate' => 'rrd/rrd.stub', 'rrd_restore' => 'rrd/rrd.stub', 'rrd_tune' => 'rrd/rrd.stub', 'rrd_update' => 'rrd/rrd.stub', 'rrd_version' => 'rrd/rrd.stub', 'rrd_xport' => 'rrd/rrd.stub', 'rrdc_disconnect' => 'rrd/rrd.stub', 'rsort' => 'standard/standard_8.stub', 'rtrim' => 'standard/standard_1.stub', 'sapi_windows_cp_conv' => 'standard/basic.stub', 'sapi_windows_cp_get' => 'standard/basic.stub', 'sapi_windows_cp_is_utf8' => 'standard/basic.stub', 'sapi_windows_cp_set' => 'standard/basic.stub', 'sapi_windows_generate_ctrl_event' => 'standard/basic.stub', 'sapi_windows_set_ctrl_handler' => 'standard/basic.stub', 'sapi_windows_vt100_support' => 'standard/basic.stub', 'scandir' => 'standard/standard_7.stub', 'sem_acquire' => 'sysvsem/sysvsem.stub', 'sem_get' => 'sysvsem/sysvsem.stub', 'sem_release' => 'sysvsem/sysvsem.stub', 'sem_remove' => 'sysvsem/sysvsem.stub', 'serialize' => 'standard/standard_4.stub', 'session_abort' => 'session/session.stub', 'session_cache_expire' => 'session/session.stub', 'session_cache_limiter' => 'session/session.stub', 'session_commit' => 'session/session.stub', 'session_create_id' => 'session/session.stub', 'session_decode' => 'session/session.stub', 'session_destroy' => 'session/session.stub', 'session_encode' => 'session/session.stub', 'session_gc' => 'session/session.stub', 'session_get_cookie_params' => 'session/session.stub', 'session_id' => 'session/session.stub', 'session_is_registered' => 'session/session.stub', 'session_module_name' => 'session/session.stub', 'session_name' => 'session/session.stub', 'session_regenerate_id' => 'session/session.stub', 'session_register' => 'session/session.stub', 'session_register_shutdown' => 'session/session.stub', 'session_reset' => 'session/session.stub', 'session_save_path' => 'session/session.stub', 'session_set_cookie_params' => 'session/session.stub', 'session_set_save_handler' => 'session/session.stub', 'session_start' => 'session/session.stub', 'session_status' => 'session/session.stub', 'session_unregister' => 'session/session.stub', 'session_unset' => 'session/session.stub', 'session_write_close' => 'session/session.stub', 'set_error_handler' => 'Core/Core.stub', 'set_exception_handler' => 'Core/Core.stub', 'set_file_buffer' => 'standard/standard_6.stub', 'set_include_path' => 'standard/standard_4.stub', 'set_job_failed' => 'zend/zend_f.stub', 'set_magic_quotes_runtime' => 'standard/standard_3.stub', 'set_socket_blocking' => 'standard/standard_6.stub', 'set_time_limit' => 'standard/standard_3.stub', 'setcookie' => 'standard/standard_4.stub', 'setlocale' => 'standard/standard_1.stub', 'setrawcookie' => 'standard/standard_4.stub', 'settype' => 'standard/standard_5.stub', 'sha1' => 'standard/standard_0.stub', 'sha1_file' => 'standard/standard_0.stub', 'shell_exec' => 'standard/standard_2.stub', 'shm_attach' => 'sysvshm/sysvshm.stub', 'shm_detach' => 'sysvshm/sysvshm.stub', 'shm_get_var' => 'sysvshm/sysvshm.stub', 'shm_has_var' => 'sysvshm/sysvshm.stub', 'shm_put_var' => 'sysvshm/sysvshm.stub', 'shm_remove' => 'sysvshm/sysvshm.stub', 'shm_remove_var' => 'sysvshm/sysvshm.stub', 'shmop_close' => 'shmop/shmop.stub', 'shmop_delete' => 'shmop/shmop.stub', 'shmop_open' => 'shmop/shmop.stub', 'shmop_read' => 'shmop/shmop.stub', 'shmop_size' => 'shmop/shmop.stub', 'shmop_write' => 'shmop/shmop.stub', 'show_source' => 'standard/standard_4.stub', 'shuffle' => 'standard/standard_8.stub', 'similar_text' => 'standard/standard_1.stub', 'simplexml_import_dom' => 'SimpleXML/SimpleXML.stub', 'simplexml_load_file' => 'SimpleXML/SimpleXML.stub', 'simplexml_load_string' => 'SimpleXML/SimpleXML.stub', 'sin' => 'standard/standard_3.stub', 'sinh' => 'standard/standard_3.stub', 'sizeof' => 'standard/standard_9.stub', 'sleep' => 'standard/standard_0.stub', 'snappy_compress' => 'snappy/snappy/snappy.stub', 'snappy_uncompress' => 'snappy/snappy/snappy.stub', 'snmp2_get' => 'snmp/snmp.stub', 'snmp2_getnext' => 'snmp/snmp.stub', 'snmp2_real_walk' => 'snmp/snmp.stub', 'snmp2_set' => 'snmp/snmp.stub', 'snmp2_walk' => 'snmp/snmp.stub', 'snmp3_get' => 'snmp/snmp.stub', 'snmp3_getnext' => 'snmp/snmp.stub', 'snmp3_real_walk' => 'snmp/snmp.stub', 'snmp3_set' => 'snmp/snmp.stub', 'snmp3_walk' => 'snmp/snmp.stub', 'snmp_get_quick_print' => 'snmp/snmp.stub', 'snmp_get_valueretrieval' => 'snmp/snmp.stub', 'snmp_read_mib' => 'snmp/snmp.stub', 'snmp_set_enum_print' => 'snmp/snmp.stub', 'snmp_set_oid_numeric_print' => 'snmp/snmp.stub', 'snmp_set_oid_output_format' => 'snmp/snmp.stub', 'snmp_set_quick_print' => 'snmp/snmp.stub', 'snmp_set_valueretrieval' => 'snmp/snmp.stub', 'snmpget' => 'snmp/snmp.stub', 'snmpgetnext' => 'snmp/snmp.stub', 'snmprealwalk' => 'snmp/snmp.stub', 'snmpset' => 'snmp/snmp.stub', 'snmpwalk' => 'snmp/snmp.stub', 'snmpwalkoid' => 'snmp/snmp.stub', 'socket_accept' => 'sockets/sockets.stub', 'socket_addrinfo_bind' => 'sockets/sockets.stub', 'socket_addrinfo_connect' => 'sockets/sockets.stub', 'socket_addrinfo_explain' => 'sockets/sockets.stub', 'socket_addrinfo_lookup' => 'sockets/sockets.stub', 'socket_bind' => 'sockets/sockets.stub', 'socket_clear_error' => 'sockets/sockets.stub', 'socket_close' => 'sockets/sockets.stub', 'socket_cmsg_space' => 'sockets/sockets.stub', 'socket_connect' => 'sockets/sockets.stub', 'socket_create' => 'sockets/sockets.stub', 'socket_create_listen' => 'sockets/sockets.stub', 'socket_create_pair' => 'sockets/sockets.stub', 'socket_export_stream' => 'sockets/sockets.stub', 'socket_get_option' => 'sockets/sockets.stub', 'socket_get_status' => 'standard/standard_6.stub', 'socket_getopt' => 'sockets/sockets.stub', 'socket_getpeername' => 'sockets/sockets.stub', 'socket_getsockname' => 'sockets/sockets.stub', 'socket_import_stream' => 'sockets/sockets.stub', 'socket_last_error' => 'sockets/sockets.stub', 'socket_listen' => 'sockets/sockets.stub', 'socket_read' => 'sockets/sockets.stub', 'socket_recv' => 'sockets/sockets.stub', 'socket_recvfrom' => 'sockets/sockets.stub', 'socket_recvmsg' => 'sockets/sockets.stub', 'socket_select' => 'sockets/sockets.stub', 'socket_send' => 'sockets/sockets.stub', 'socket_sendmsg' => 'sockets/sockets.stub', 'socket_sendto' => 'sockets/sockets.stub', 'socket_set_block' => 'sockets/sockets.stub', 'socket_set_blocking' => 'standard/standard_6.stub', 'socket_set_nonblock' => 'sockets/sockets.stub', 'socket_set_option' => 'sockets/sockets.stub', 'socket_set_timeout' => 'standard/standard_6.stub', 'socket_setopt' => 'sockets/sockets.stub', 'socket_shutdown' => 'sockets/sockets.stub', 'socket_strerror' => 'sockets/sockets.stub', 'socket_write' => 'sockets/sockets.stub', 'socket_wsaprotocol_info_export' => 'sockets/sockets.stub', 'socket_wsaprotocol_info_import' => 'sockets/sockets.stub', 'socket_wsaprotocol_info_release' => 'sockets/sockets.stub', 'sodium_add' => 'sodium/sodium.stub', 'sodium_base642bin' => 'sodium/sodium.stub', 'sodium_bin2base64' => 'sodium/sodium.stub', 'sodium_bin2hex' => 'sodium/sodium.stub', 'sodium_compare' => 'sodium/sodium.stub', 'sodium_crypto_aead_aes256gcm_decrypt' => 'sodium/sodium.stub', 'sodium_crypto_aead_aes256gcm_encrypt' => 'sodium/sodium.stub', 'sodium_crypto_aead_aes256gcm_is_available' => 'sodium/sodium.stub', 'sodium_crypto_aead_aes256gcm_keygen' => 'sodium/sodium.stub', 'sodium_crypto_aead_chacha20poly1305_decrypt' => 'sodium/sodium.stub', 'sodium_crypto_aead_chacha20poly1305_encrypt' => 'sodium/sodium.stub', 'sodium_crypto_aead_chacha20poly1305_ietf_decrypt' => 'sodium/sodium.stub', 'sodium_crypto_aead_chacha20poly1305_ietf_encrypt' => 'sodium/sodium.stub', 'sodium_crypto_aead_chacha20poly1305_ietf_keygen' => 'sodium/sodium.stub', 'sodium_crypto_aead_chacha20poly1305_keygen' => 'sodium/sodium.stub', 'sodium_crypto_aead_xchacha20poly1305_ietf_decrypt' => 'sodium/sodium.stub', 'sodium_crypto_aead_xchacha20poly1305_ietf_encrypt' => 'sodium/sodium.stub', 'sodium_crypto_aead_xchacha20poly1305_ietf_keygen' => 'sodium/sodium.stub', 'sodium_crypto_auth' => 'sodium/sodium.stub', 'sodium_crypto_auth_keygen' => 'sodium/sodium.stub', 'sodium_crypto_auth_verify' => 'sodium/sodium.stub', 'sodium_crypto_box' => 'sodium/sodium.stub', 'sodium_crypto_box_keypair' => 'sodium/sodium.stub', 'sodium_crypto_box_keypair_from_secretkey_and_publickey' => 'sodium/sodium.stub', 'sodium_crypto_box_open' => 'sodium/sodium.stub', 'sodium_crypto_box_publickey' => 'sodium/sodium.stub', 'sodium_crypto_box_publickey_from_secretkey' => 'sodium/sodium.stub', 'sodium_crypto_box_seal' => 'sodium/sodium.stub', 'sodium_crypto_box_seal_open' => 'sodium/sodium.stub', 'sodium_crypto_box_secretkey' => 'sodium/sodium.stub', 'sodium_crypto_box_seed_keypair' => 'sodium/sodium.stub', 'sodium_crypto_core_ristretto255_add' => 'sodium/sodium.stub', 'sodium_crypto_core_ristretto255_from_hash' => 'sodium/sodium.stub', 'sodium_crypto_core_ristretto255_is_valid_point' => 'sodium/sodium.stub', 'sodium_crypto_core_ristretto255_random' => 'sodium/sodium.stub', 'sodium_crypto_core_ristretto255_scalar_add' => 'sodium/sodium.stub', 'sodium_crypto_core_ristretto255_scalar_complement' => 'sodium/sodium.stub', 'sodium_crypto_core_ristretto255_scalar_invert' => 'sodium/sodium.stub', 'sodium_crypto_core_ristretto255_scalar_mul' => 'sodium/sodium.stub', 'sodium_crypto_core_ristretto255_scalar_negate' => 'sodium/sodium.stub', 'sodium_crypto_core_ristretto255_scalar_random' => 'sodium/sodium.stub', 'sodium_crypto_core_ristretto255_scalar_reduce' => 'sodium/sodium.stub', 'sodium_crypto_core_ristretto255_scalar_sub' => 'sodium/sodium.stub', 'sodium_crypto_core_ristretto255_sub' => 'sodium/sodium.stub', 'sodium_crypto_generichash' => 'sodium/sodium.stub', 'sodium_crypto_generichash_final' => 'sodium/sodium.stub', 'sodium_crypto_generichash_init' => 'sodium/sodium.stub', 'sodium_crypto_generichash_keygen' => 'sodium/sodium.stub', 'sodium_crypto_generichash_update' => 'sodium/sodium.stub', 'sodium_crypto_kdf_derive_from_key' => 'sodium/sodium.stub', 'sodium_crypto_kdf_keygen' => 'sodium/sodium.stub', 'sodium_crypto_kx' => 'sodium/sodium.stub', 'sodium_crypto_kx_client_session_keys' => 'sodium/sodium.stub', 'sodium_crypto_kx_keypair' => 'sodium/sodium.stub', 'sodium_crypto_kx_publickey' => 'sodium/sodium.stub', 'sodium_crypto_kx_secretkey' => 'sodium/sodium.stub', 'sodium_crypto_kx_seed_keypair' => 'sodium/sodium.stub', 'sodium_crypto_kx_server_session_keys' => 'sodium/sodium.stub', 'sodium_crypto_pwhash' => 'sodium/sodium.stub', 'sodium_crypto_pwhash_scryptsalsa208sha256' => 'sodium/sodium.stub', 'sodium_crypto_pwhash_scryptsalsa208sha256_str' => 'sodium/sodium.stub', 'sodium_crypto_pwhash_scryptsalsa208sha256_str_verify' => 'sodium/sodium.stub', 'sodium_crypto_pwhash_str' => 'sodium/sodium.stub', 'sodium_crypto_pwhash_str_needs_rehash' => 'sodium/sodium.stub', 'sodium_crypto_pwhash_str_verify' => 'sodium/sodium.stub', 'sodium_crypto_scalarmult' => 'sodium/sodium.stub', 'sodium_crypto_scalarmult_base' => 'sodium/sodium.stub', 'sodium_crypto_scalarmult_ristretto255' => 'sodium/sodium.stub', 'sodium_crypto_scalarmult_ristretto255_base' => 'sodium/sodium.stub', 'sodium_crypto_secretbox' => 'sodium/sodium.stub', 'sodium_crypto_secretbox_keygen' => 'sodium/sodium.stub', 'sodium_crypto_secretbox_open' => 'sodium/sodium.stub', 'sodium_crypto_secretstream_xchacha20poly1305_init_pull' => 'sodium/sodium.stub', 'sodium_crypto_secretstream_xchacha20poly1305_init_push' => 'sodium/sodium.stub', 'sodium_crypto_secretstream_xchacha20poly1305_keygen' => 'sodium/sodium.stub', 'sodium_crypto_secretstream_xchacha20poly1305_pull' => 'sodium/sodium.stub', 'sodium_crypto_secretstream_xchacha20poly1305_push' => 'sodium/sodium.stub', 'sodium_crypto_secretstream_xchacha20poly1305_rekey' => 'sodium/sodium.stub', 'sodium_crypto_shorthash' => 'sodium/sodium.stub', 'sodium_crypto_shorthash_keygen' => 'sodium/sodium.stub', 'sodium_crypto_sign' => 'sodium/sodium.stub', 'sodium_crypto_sign_detached' => 'sodium/sodium.stub', 'sodium_crypto_sign_ed25519_pk_to_curve25519' => 'sodium/sodium.stub', 'sodium_crypto_sign_ed25519_sk_to_curve25519' => 'sodium/sodium.stub', 'sodium_crypto_sign_keypair' => 'sodium/sodium.stub', 'sodium_crypto_sign_keypair_from_secretkey_and_publickey' => 'sodium/sodium.stub', 'sodium_crypto_sign_open' => 'sodium/sodium.stub', 'sodium_crypto_sign_publickey' => 'sodium/sodium.stub', 'sodium_crypto_sign_publickey_from_secretkey' => 'sodium/sodium.stub', 'sodium_crypto_sign_secretkey' => 'sodium/sodium.stub', 'sodium_crypto_sign_seed_keypair' => 'sodium/sodium.stub', 'sodium_crypto_sign_verify_detached' => 'sodium/sodium.stub', 'sodium_crypto_stream' => 'sodium/sodium.stub', 'sodium_crypto_stream_keygen' => 'sodium/sodium.stub', 'sodium_crypto_stream_xchacha20' => 'sodium/sodium.stub', 'sodium_crypto_stream_xchacha20_keygen' => 'sodium/sodium.stub', 'sodium_crypto_stream_xchacha20_xor' => 'sodium/sodium.stub', 'sodium_crypto_stream_xchacha20_xor_ic' => 'sodium/sodium.stub', 'sodium_crypto_stream_xor' => 'sodium/sodium.stub', 'sodium_hex2bin' => 'sodium/sodium.stub', 'sodium_increment' => 'sodium/sodium.stub', 'sodium_library_version_major' => 'sodium/sodium.stub', 'sodium_library_version_minor' => 'sodium/sodium.stub', 'sodium_memcmp' => 'sodium/sodium.stub', 'sodium_memzero' => 'sodium/sodium.stub', 'sodium_pad' => 'sodium/sodium.stub', 'sodium_randombytes_buf' => 'sodium/sodium.stub', 'sodium_randombytes_random16' => 'sodium/sodium.stub', 'sodium_randombytes_uniform' => 'sodium/sodium.stub', 'sodium_unpad' => 'sodium/sodium.stub', 'sodium_version_string' => 'sodium/sodium.stub', 'solr_get_version' => 'solr/functions.stub', 'sort' => 'standard/standard_8.stub', 'soundex' => 'standard/standard_2.stub', 'spl_autoload' => 'SPL/SPL_f.stub', 'spl_autoload_call' => 'SPL/SPL_f.stub', 'spl_autoload_extensions' => 'SPL/SPL_f.stub', 'spl_autoload_functions' => 'SPL/SPL_f.stub', 'spl_autoload_register' => 'SPL/SPL_f.stub', 'spl_autoload_unregister' => 'SPL/SPL_f.stub', 'spl_classes' => 'SPL/SPL_f.stub', 'spl_object_hash' => 'SPL/SPL_f.stub', 'spl_object_id' => 'SPL/SPL_f.stub', 'split' => 'regex/ereg.stub', 'spliti' => 'regex/ereg.stub', 'sprintf' => 'standard/standard_2.stub', 'sql_regcase' => 'regex/ereg.stub', 'sqlite_array_query' => 'SQLite/SQLite.stub', 'sqlite_busy_timeout' => 'SQLite/SQLite.stub', 'sqlite_changes' => 'SQLite/SQLite.stub', 'sqlite_close' => 'SQLite/SQLite.stub', 'sqlite_column' => 'SQLite/SQLite.stub', 'sqlite_create_aggregate' => 'SQLite/SQLite.stub', 'sqlite_create_function' => 'SQLite/SQLite.stub', 'sqlite_current' => 'SQLite/SQLite.stub', 'sqlite_error_string' => 'SQLite/SQLite.stub', 'sqlite_escape_string' => 'SQLite/SQLite.stub', 'sqlite_exec' => 'SQLite/SQLite.stub', 'sqlite_factory' => 'SQLite/SQLite.stub', 'sqlite_fetch_all' => 'SQLite/SQLite.stub', 'sqlite_fetch_array' => 'SQLite/SQLite.stub', 'sqlite_fetch_column_types' => 'SQLite/SQLite.stub', 'sqlite_fetch_object' => 'SQLite/SQLite.stub', 'sqlite_fetch_single' => 'SQLite/SQLite.stub', 'sqlite_fetch_string' => 'SQLite/SQLite.stub', 'sqlite_field_name' => 'SQLite/SQLite.stub', 'sqlite_has_more' => 'SQLite/SQLite.stub', 'sqlite_has_prev' => 'SQLite/SQLite.stub', 'sqlite_last_error' => 'SQLite/SQLite.stub', 'sqlite_last_insert_rowid' => 'SQLite/SQLite.stub', 'sqlite_libencoding' => 'SQLite/SQLite.stub', 'sqlite_libversion' => 'SQLite/SQLite.stub', 'sqlite_next' => 'SQLite/SQLite.stub', 'sqlite_num_fields' => 'SQLite/SQLite.stub', 'sqlite_num_rows' => 'SQLite/SQLite.stub', 'sqlite_open' => 'SQLite/SQLite.stub', 'sqlite_popen' => 'SQLite/SQLite.stub', 'sqlite_prev' => 'SQLite/SQLite.stub', 'sqlite_query' => 'SQLite/SQLite.stub', 'sqlite_rewind' => 'SQLite/SQLite.stub', 'sqlite_seek' => 'SQLite/SQLite.stub', 'sqlite_single_query' => 'SQLite/SQLite.stub', 'sqlite_udf_decode_binary' => 'SQLite/SQLite.stub', 'sqlite_udf_encode_binary' => 'SQLite/SQLite.stub', 'sqlite_unbuffered_query' => 'SQLite/SQLite.stub', 'sqlite_valid' => 'SQLite/SQLite.stub', 'sqlsrv_begin_transaction' => 'sqlsrv/sqlsrv.stub', 'sqlsrv_cancel' => 'sqlsrv/sqlsrv.stub', 'sqlsrv_client_info' => 'sqlsrv/sqlsrv.stub', 'sqlsrv_close' => 'sqlsrv/sqlsrv.stub', 'sqlsrv_commit' => 'sqlsrv/sqlsrv.stub', 'sqlsrv_configure' => 'sqlsrv/sqlsrv.stub', 'sqlsrv_connect' => 'sqlsrv/sqlsrv.stub', 'sqlsrv_errors' => 'sqlsrv/sqlsrv.stub', 'sqlsrv_execute' => 'sqlsrv/sqlsrv.stub', 'sqlsrv_fetch' => 'sqlsrv/sqlsrv.stub', 'sqlsrv_fetch_array' => 'sqlsrv/sqlsrv.stub', 'sqlsrv_fetch_object' => 'sqlsrv/sqlsrv.stub', 'sqlsrv_field_metadata' => 'sqlsrv/sqlsrv.stub', 'sqlsrv_free_stmt' => 'sqlsrv/sqlsrv.stub', 'sqlsrv_get_config' => 'sqlsrv/sqlsrv.stub', 'sqlsrv_get_field' => 'sqlsrv/sqlsrv.stub', 'sqlsrv_has_rows' => 'sqlsrv/sqlsrv.stub', 'sqlsrv_next_result' => 'sqlsrv/sqlsrv.stub', 'sqlsrv_num_fields' => 'sqlsrv/sqlsrv.stub', 'sqlsrv_num_rows' => 'sqlsrv/sqlsrv.stub', 'sqlsrv_prepare' => 'sqlsrv/sqlsrv.stub', 'sqlsrv_query' => 'sqlsrv/sqlsrv.stub', 'sqlsrv_rollback' => 'sqlsrv/sqlsrv.stub', 'sqlsrv_rows_affected' => 'sqlsrv/sqlsrv.stub', 'sqlsrv_send_stream_data' => 'sqlsrv/sqlsrv.stub', 'sqlsrv_server_info' => 'sqlsrv/sqlsrv.stub', 'sqrt' => 'standard/standard_3.stub', 'srand' => 'random/random.stub', 'sscanf' => 'standard/standard_2.stub', 'ssh2_auth_agent' => 'ssh2/ssh2.stub', 'ssh2_auth_hostbased_file' => 'ssh2/ssh2.stub', 'ssh2_auth_none' => 'ssh2/ssh2.stub', 'ssh2_auth_password' => 'ssh2/ssh2.stub', 'ssh2_auth_pubkey_file' => 'ssh2/ssh2.stub', 'ssh2_connect' => 'ssh2/ssh2.stub', 'ssh2_disconnect' => 'ssh2/ssh2.stub', 'ssh2_exec' => 'ssh2/ssh2.stub', 'ssh2_fetch_stream' => 'ssh2/ssh2.stub', 'ssh2_fingerprint' => 'ssh2/ssh2.stub', 'ssh2_forward_accept' => 'ssh2/ssh2.stub', 'ssh2_forward_listen' => 'ssh2/ssh2.stub', 'ssh2_methods_negotiated' => 'ssh2/ssh2.stub', 'ssh2_poll' => 'ssh2/ssh2.stub', 'ssh2_publickey_add' => 'ssh2/ssh2.stub', 'ssh2_publickey_init' => 'ssh2/ssh2.stub', 'ssh2_publickey_list' => 'ssh2/ssh2.stub', 'ssh2_publickey_remove' => 'ssh2/ssh2.stub', 'ssh2_scp_recv' => 'ssh2/ssh2.stub', 'ssh2_scp_send' => 'ssh2/ssh2.stub', 'ssh2_sftp' => 'ssh2/ssh2.stub', 'ssh2_sftp_chmod' => 'ssh2/ssh2.stub', 'ssh2_sftp_lstat' => 'ssh2/ssh2.stub', 'ssh2_sftp_mkdir' => 'ssh2/ssh2.stub', 'ssh2_sftp_readlink' => 'ssh2/ssh2.stub', 'ssh2_sftp_realpath' => 'ssh2/ssh2.stub', 'ssh2_sftp_rename' => 'ssh2/ssh2.stub', 'ssh2_sftp_rmdir' => 'ssh2/ssh2.stub', 'ssh2_sftp_stat' => 'ssh2/ssh2.stub', 'ssh2_sftp_symlink' => 'ssh2/ssh2.stub', 'ssh2_sftp_unlink' => 'ssh2/ssh2.stub', 'ssh2_shell' => 'ssh2/ssh2.stub', 'ssh2_tunnel' => 'ssh2/ssh2.stub', 'stat' => 'standard/standard_7.stub', 'stats_absolute_deviation' => 'stats/stats.stub', 'stats_cdf_beta' => 'stats/stats.stub', 'stats_cdf_binomial' => 'stats/stats.stub', 'stats_cdf_cauchy' => 'stats/stats.stub', 'stats_cdf_chisquare' => 'stats/stats.stub', 'stats_cdf_exponential' => 'stats/stats.stub', 'stats_cdf_f' => 'stats/stats.stub', 'stats_cdf_gamma' => 'stats/stats.stub', 'stats_cdf_laplace' => 'stats/stats.stub', 'stats_cdf_logistic' => 'stats/stats.stub', 'stats_cdf_negative_binomial' => 'stats/stats.stub', 'stats_cdf_noncentral_chisquare' => 'stats/stats.stub', 'stats_cdf_noncentral_f' => 'stats/stats.stub', 'stats_cdf_noncentral_t' => 'stats/stats.stub', 'stats_cdf_normal' => 'stats/stats.stub', 'stats_cdf_poisson' => 'stats/stats.stub', 'stats_cdf_t' => 'stats/stats.stub', 'stats_cdf_uniform' => 'stats/stats.stub', 'stats_cdf_weibull' => 'stats/stats.stub', 'stats_covariance' => 'stats/stats.stub', 'stats_dens_beta' => 'stats/stats.stub', 'stats_dens_cauchy' => 'stats/stats.stub', 'stats_dens_chisquare' => 'stats/stats.stub', 'stats_dens_exponential' => 'stats/stats.stub', 'stats_dens_f' => 'stats/stats.stub', 'stats_dens_gamma' => 'stats/stats.stub', 'stats_dens_laplace' => 'stats/stats.stub', 'stats_dens_logistic' => 'stats/stats.stub', 'stats_dens_normal' => 'stats/stats.stub', 'stats_dens_pmf_binomial' => 'stats/stats.stub', 'stats_dens_pmf_hypergeometric' => 'stats/stats.stub', 'stats_dens_pmf_negative_binomial' => 'stats/stats.stub', 'stats_dens_pmf_poisson' => 'stats/stats.stub', 'stats_dens_t' => 'stats/stats.stub', 'stats_dens_uniform' => 'stats/stats.stub', 'stats_dens_weibull' => 'stats/stats.stub', 'stats_harmonic_mean' => 'stats/stats.stub', 'stats_kurtosis' => 'stats/stats.stub', 'stats_rand_gen_beta' => 'stats/stats.stub', 'stats_rand_gen_chisquare' => 'stats/stats.stub', 'stats_rand_gen_exponential' => 'stats/stats.stub', 'stats_rand_gen_f' => 'stats/stats.stub', 'stats_rand_gen_funiform' => 'stats/stats.stub', 'stats_rand_gen_gamma' => 'stats/stats.stub', 'stats_rand_gen_ibinomial' => 'stats/stats.stub', 'stats_rand_gen_ibinomial_negative' => 'stats/stats.stub', 'stats_rand_gen_int' => 'stats/stats.stub', 'stats_rand_gen_ipoisson' => 'stats/stats.stub', 'stats_rand_gen_iuniform' => 'stats/stats.stub', 'stats_rand_gen_noncentral_f' => 'stats/stats.stub', 'stats_rand_gen_noncentral_t' => 'stats/stats.stub', 'stats_rand_gen_normal' => 'stats/stats.stub', 'stats_rand_gen_t' => 'stats/stats.stub', 'stats_rand_get_seeds' => 'stats/stats.stub', 'stats_rand_phrase_to_seeds' => 'stats/stats.stub', 'stats_rand_ranf' => 'stats/stats.stub', 'stats_rand_setall' => 'stats/stats.stub', 'stats_skew' => 'stats/stats.stub', 'stats_standard_deviation' => 'stats/stats.stub', 'stats_stat_binomial_coef' => 'stats/stats.stub', 'stats_stat_correlation' => 'stats/stats.stub', 'stats_stat_factorial' => 'stats/stats.stub', 'stats_stat_independent_t' => 'stats/stats.stub', 'stats_stat_innerproduct' => 'stats/stats.stub', 'stats_stat_paired_t' => 'stats/stats.stub', 'stats_stat_percentile' => 'stats/stats.stub', 'stats_stat_powersum' => 'stats/stats.stub', 'stats_variance' => 'stats/stats.stub', 'stomp_abort' => 'stomp/stomp.stub', 'stomp_ack' => 'stomp/stomp.stub', 'stomp_begin' => 'stomp/stomp.stub', 'stomp_close' => 'stomp/stomp.stub', 'stomp_commit' => 'stomp/stomp.stub', 'stomp_connect' => 'stomp/stomp.stub', 'stomp_error' => 'stomp/stomp.stub', 'stomp_get_session_id' => 'stomp/stomp.stub', 'stomp_get_timeout' => 'stomp/stomp.stub', 'stomp_has_frame' => 'stomp/stomp.stub', 'stomp_read_frame' => 'stomp/stomp.stub', 'stomp_send' => 'stomp/stomp.stub', 'stomp_set_timeout' => 'stomp/stomp.stub', 'stomp_subscribe' => 'stomp/stomp.stub', 'stomp_unsubscribe' => 'stomp/stomp.stub', 'stomp_version' => 'stomp/stomp.stub', 'str_contains' => 'Core/Core.stub', 'str_ends_with' => 'Core/Core.stub', 'str_getcsv' => 'standard/standard_2.stub', 'str_ireplace' => 'standard/standard_1.stub', 'str_pad' => 'standard/standard_2.stub', 'str_repeat' => 'standard/standard_1.stub', 'str_replace' => 'standard/standard_1.stub', 'str_rot13' => 'standard/standard_9.stub', 'str_shuffle' => 'standard/standard_1.stub', 'str_split' => 'standard/standard_1.stub', 'str_starts_with' => 'Core/Core.stub', 'str_word_count' => 'standard/standard_1.stub', 'strcasecmp' => 'Core/Core.stub', 'strchr' => 'standard/standard_2.stub', 'strcmp' => 'Core/Core.stub', 'strcoll' => 'standard/standard_1.stub', 'strcspn' => 'standard/standard_0.stub', 'stream_bucket_append' => 'standard/standard_9.stub', 'stream_bucket_make_writeable' => 'standard/standard_9.stub', 'stream_bucket_new' => 'standard/standard_9.stub', 'stream_bucket_prepend' => 'standard/standard_9.stub', 'stream_context_create' => 'standard/standard_6.stub', 'stream_context_get_default' => 'standard/standard_6.stub', 'stream_context_get_options' => 'standard/standard_6.stub', 'stream_context_get_params' => 'standard/standard_6.stub', 'stream_context_set_default' => 'standard/standard_6.stub', 'stream_context_set_option' => 'standard/standard_6.stub', 'stream_context_set_params' => 'standard/standard_6.stub', 'stream_copy_to_stream' => 'standard/standard_6.stub', 'stream_filter_append' => 'standard/standard_6.stub', 'stream_filter_prepend' => 'standard/standard_6.stub', 'stream_filter_register' => 'standard/standard_9.stub', 'stream_filter_remove' => 'standard/standard_6.stub', 'stream_get_contents' => 'standard/standard_6.stub', 'stream_get_filters' => 'standard/standard_9.stub', 'stream_get_line' => 'standard/standard_6.stub', 'stream_get_meta_data' => 'standard/standard_6.stub', 'stream_get_transports' => 'standard/standard_6.stub', 'stream_get_wrappers' => 'standard/standard_6.stub', 'stream_is_local' => 'standard/standard_6.stub', 'stream_isatty' => 'standard/standard_9.stub', 'stream_register_wrapper' => 'standard/standard_6.stub', 'stream_resolve_include_path' => 'standard/standard_6.stub', 'stream_select' => 'standard/standard_6.stub', 'stream_set_blocking' => 'standard/standard_6.stub', 'stream_set_chunk_size' => 'standard/standard_8.stub', 'stream_set_read_buffer' => 'standard/standard_6.stub', 'stream_set_timeout' => 'standard/standard_6.stub', 'stream_set_write_buffer' => 'standard/standard_6.stub', 'stream_socket_accept' => 'standard/standard_6.stub', 'stream_socket_client' => 'standard/standard_6.stub', 'stream_socket_enable_crypto' => 'standard/standard_6.stub', 'stream_socket_get_name' => 'standard/standard_6.stub', 'stream_socket_pair' => 'standard/standard_6.stub', 'stream_socket_recvfrom' => 'standard/standard_6.stub', 'stream_socket_sendto' => 'standard/standard_6.stub', 'stream_socket_server' => 'standard/standard_6.stub', 'stream_socket_shutdown' => 'standard/standard_6.stub', 'stream_supports_lock' => 'standard/standard_6.stub', 'stream_wrapper_register' => 'standard/standard_6.stub', 'stream_wrapper_restore' => 'standard/standard_6.stub', 'stream_wrapper_unregister' => 'standard/standard_6.stub', 'strftime' => 'date/date.stub', 'strip_tags' => 'standard/standard_1.stub', 'stripcslashes' => 'standard/standard_1.stub', 'stripos' => 'standard/standard_1.stub', 'stripslashes' => 'standard/standard_1.stub', 'stristr' => 'standard/standard_1.stub', 'strlen' => 'Core/Core.stub', 'strnatcasecmp' => 'standard/standard_0.stub', 'strnatcmp' => 'standard/standard_0.stub', 'strncasecmp' => 'Core/Core.stub', 'strncmp' => 'Core/Core.stub', 'strpbrk' => 'standard/standard_1.stub', 'strpos' => 'standard/standard_1.stub', 'strptime' => 'standard/standard_0.stub', 'strrchr' => 'standard/standard_1.stub', 'strrev' => 'standard/standard_1.stub', 'strripos' => 'standard/standard_1.stub', 'strrpos' => 'standard/standard_1.stub', 'strspn' => 'standard/standard_0.stub', 'strstr' => 'standard/standard_1.stub', 'strtok' => 'standard/standard_0.stub', 'strtolower' => 'standard/standard_1.stub', 'strtotime' => 'date/date.stub', 'strtoupper' => 'standard/standard_1.stub', 'strtr' => 'standard/standard_1.stub', 'strval' => 'standard/standard_5.stub', 'substr' => 'standard/standard_1.stub', 'substr_compare' => 'standard/standard_1.stub', 'substr_count' => 'standard/standard_0.stub', 'substr_replace' => 'standard/standard_1.stub', 'suhosin_encrypt_cookie' => 'suhosin/suhosin.stub', 'suhosin_get_raw_cookies' => 'suhosin/suhosin.stub', 'svn_add' => 'svn/svn.stub', 'svn_auth_get_parameter' => 'svn/svn.stub', 'svn_auth_set_parameter' => 'svn/svn.stub', 'svn_blame' => 'svn/svn.stub', 'svn_cat' => 'svn/svn.stub', 'svn_checkout' => 'svn/svn.stub', 'svn_cleanup' => 'svn/svn.stub', 'svn_client_version' => 'svn/svn.stub', 'svn_commit' => 'svn/svn.stub', 'svn_config_ensure' => 'svn/svn.stub', 'svn_copy' => 'svn/svn.stub', 'svn_delete' => 'svn/svn.stub', 'svn_diff' => 'svn/svn.stub', 'svn_export' => 'svn/svn.stub', 'svn_fs_abort_txn' => 'svn/svn.stub', 'svn_fs_apply_text' => 'svn/svn.stub', 'svn_fs_begin_txn2' => 'svn/svn.stub', 'svn_fs_change_node_prop' => 'svn/svn.stub', 'svn_fs_check_path' => 'svn/svn.stub', 'svn_fs_contents_changed' => 'svn/svn.stub', 'svn_fs_copy' => 'svn/svn.stub', 'svn_fs_delete' => 'svn/svn.stub', 'svn_fs_dir_entries' => 'svn/svn.stub', 'svn_fs_file_contents' => 'svn/svn.stub', 'svn_fs_file_length' => 'svn/svn.stub', 'svn_fs_is_dir' => 'svn/svn.stub', 'svn_fs_is_file' => 'svn/svn.stub', 'svn_fs_make_dir' => 'svn/svn.stub', 'svn_fs_make_file' => 'svn/svn.stub', 'svn_fs_node_created_rev' => 'svn/svn.stub', 'svn_fs_node_prop' => 'svn/svn.stub', 'svn_fs_props_changed' => 'svn/svn.stub', 'svn_fs_revision_prop' => 'svn/svn.stub', 'svn_fs_revision_root' => 'svn/svn.stub', 'svn_fs_txn_root' => 'svn/svn.stub', 'svn_fs_youngest_rev' => 'svn/svn.stub', 'svn_import' => 'svn/svn.stub', 'svn_info' => 'svn/svn.stub', 'svn_lock' => 'svn/svn.stub', 'svn_log' => 'svn/svn.stub', 'svn_ls' => 'svn/svn.stub', 'svn_mkdir' => 'svn/svn.stub', 'svn_move' => 'svn/svn.stub', 'svn_propget' => 'svn/svn.stub', 'svn_proplist' => 'svn/svn.stub', 'svn_repos_create' => 'svn/svn.stub', 'svn_repos_fs' => 'svn/svn.stub', 'svn_repos_fs_begin_txn_for_commit' => 'svn/svn.stub', 'svn_repos_fs_commit_txn' => 'svn/svn.stub', 'svn_repos_hotcopy' => 'svn/svn.stub', 'svn_repos_open' => 'svn/svn.stub', 'svn_repos_recover' => 'svn/svn.stub', 'svn_resolved' => 'svn/svn.stub', 'svn_revert' => 'svn/svn.stub', 'svn_status' => 'svn/svn.stub', 'svn_switch' => 'svn/svn.stub', 'svn_unlock' => 'svn/svn.stub', 'svn_update' => 'svn/svn.stub', 'swoole_async_dns_lookup_coro' => 'swoole/functions.stub', 'swoole_async_set' => 'swoole/functions.stub', 'swoole_clear_dns_cache' => 'swoole/functions.stub', 'swoole_clear_error' => 'swoole/functions.stub', 'swoole_client_select' => 'swoole/functions.stub', 'swoole_coroutine_create' => 'swoole/functions.stub', 'swoole_coroutine_defer' => 'swoole/functions.stub', 'swoole_coroutine_socketpair' => 'swoole/functions.stub', 'swoole_cpu_num' => 'swoole/functions.stub', 'swoole_errno' => 'swoole/functions.stub', 'swoole_error_log' => 'swoole/functions.stub', 'swoole_error_log_ex' => 'swoole/functions.stub', 'swoole_event_add' => 'swoole/functions.stub', 'swoole_event_cycle' => 'swoole/functions.stub', 'swoole_event_defer' => 'swoole/functions.stub', 'swoole_event_del' => 'swoole/functions.stub', 'swoole_event_dispatch' => 'swoole/functions.stub', 'swoole_event_exit' => 'swoole/functions.stub', 'swoole_event_isset' => 'swoole/functions.stub', 'swoole_event_set' => 'swoole/functions.stub', 'swoole_event_wait' => 'swoole/functions.stub', 'swoole_event_write' => 'swoole/functions.stub', 'swoole_get_local_ip' => 'swoole/functions.stub', 'swoole_get_local_mac' => 'swoole/functions.stub', 'swoole_get_mime_type' => 'swoole/functions.stub', 'swoole_get_object_by_handle' => 'swoole/functions.stub', 'swoole_get_objects' => 'swoole/functions.stub', 'swoole_get_vm_status' => 'swoole/functions.stub', 'swoole_hashcode' => 'swoole/functions.stub', 'swoole_ignore_error' => 'swoole/functions.stub', 'swoole_internal_call_user_shutdown_begin' => 'swoole/functions.stub', 'swoole_last_error' => 'swoole/functions.stub', 'swoole_mime_type_add' => 'swoole/functions.stub', 'swoole_mime_type_delete' => 'swoole/functions.stub', 'swoole_mime_type_exists' => 'swoole/functions.stub', 'swoole_mime_type_get' => 'swoole/functions.stub', 'swoole_mime_type_list' => 'swoole/functions.stub', 'swoole_mime_type_set' => 'swoole/functions.stub', 'swoole_select' => 'swoole/functions.stub', 'swoole_set_process_name' => 'swoole/functions.stub', 'swoole_strerror' => 'swoole/functions.stub', 'swoole_substr_json_decode' => 'swoole/functions.stub', 'swoole_substr_unserialize' => 'swoole/functions.stub', 'swoole_test_kernel_coroutine' => 'swoole/functions.stub', 'swoole_timer_after' => 'swoole/functions.stub', 'swoole_timer_clear' => 'swoole/functions.stub', 'swoole_timer_clear_all' => 'swoole/functions.stub', 'swoole_timer_exists' => 'swoole/functions.stub', 'swoole_timer_info' => 'swoole/functions.stub', 'swoole_timer_list' => 'swoole/functions.stub', 'swoole_timer_set' => 'swoole/functions.stub', 'swoole_timer_stats' => 'swoole/functions.stub', 'swoole_timer_tick' => 'swoole/functions.stub', 'swoole_version' => 'swoole/functions.stub', 'sybase_affected_rows' => 'sybase/sybase_ct.stub', 'sybase_close' => 'sybase/sybase_ct.stub', 'sybase_connect' => 'sybase/sybase_ct.stub', 'sybase_data_seek' => 'sybase/sybase_ct.stub', 'sybase_deadlock_retry_count' => 'sybase/sybase_ct.stub', 'sybase_fetch_array' => 'sybase/sybase_ct.stub', 'sybase_fetch_assoc' => 'sybase/sybase_ct.stub', 'sybase_fetch_field' => 'sybase/sybase_ct.stub', 'sybase_fetch_object' => 'sybase/sybase_ct.stub', 'sybase_fetch_row' => 'sybase/sybase_ct.stub', 'sybase_field_seek' => 'sybase/sybase_ct.stub', 'sybase_free_result' => 'sybase/sybase_ct.stub', 'sybase_get_last_message' => 'sybase/sybase_ct.stub', 'sybase_min_client_severity' => 'sybase/sybase_ct.stub', 'sybase_min_server_severity' => 'sybase/sybase_ct.stub', 'sybase_num_fields' => 'sybase/sybase_ct.stub', 'sybase_num_rows' => 'sybase/sybase_ct.stub', 'sybase_pconnect' => 'sybase/sybase_ct.stub', 'sybase_query' => 'sybase/sybase_ct.stub', 'sybase_result' => 'sybase/sybase_ct.stub', 'sybase_select_db' => 'sybase/sybase_ct.stub', 'sybase_set_message_handler' => 'sybase/sybase_ct.stub', 'sybase_unbuffered_query' => 'sybase/sybase_ct.stub', 'symlink' => 'standard/standard_2.stub', 'sys_get_temp_dir' => 'standard/standard_9.stub', 'sys_getloadavg' => 'standard/standard_3.stub', 'syslog' => 'standard/standard_8.stub', 'system' => 'standard/standard_2.stub', 'tan' => 'standard/standard_3.stub', 'tanh' => 'standard/standard_3.stub', 'tempnam' => 'standard/standard_5.stub', 'textdomain' => 'gettext/gettext.stub', 'tidy_access_count' => 'tidy/tidy.stub', 'tidy_clean_repair' => 'tidy/tidy.stub', 'tidy_config_count' => 'tidy/tidy.stub', 'tidy_diagnose' => 'tidy/tidy.stub', 'tidy_error_count' => 'tidy/tidy.stub', 'tidy_get_body' => 'tidy/tidy.stub', 'tidy_get_config' => 'tidy/tidy.stub', 'tidy_get_error_buffer' => 'tidy/tidy.stub', 'tidy_get_head' => 'tidy/tidy.stub', 'tidy_get_html' => 'tidy/tidy.stub', 'tidy_get_html_ver' => 'tidy/tidy.stub', 'tidy_get_opt_doc' => 'tidy/tidy.stub', 'tidy_get_output' => 'tidy/tidy.stub', 'tidy_get_release' => 'tidy/tidy.stub', 'tidy_get_root' => 'tidy/tidy.stub', 'tidy_get_status' => 'tidy/tidy.stub', 'tidy_getopt' => 'tidy/tidy.stub', 'tidy_is_xhtml' => 'tidy/tidy.stub', 'tidy_is_xml' => 'tidy/tidy.stub', 'tidy_parse_file' => 'tidy/tidy.stub', 'tidy_parse_string' => 'tidy/tidy.stub', 'tidy_repair_file' => 'tidy/tidy.stub', 'tidy_repair_string' => 'tidy/tidy.stub', 'tidy_warning_count' => 'tidy/tidy.stub', 'time' => 'date/date.stub', 'time_nanosleep' => 'standard/standard_0.stub', 'time_sleep_until' => 'standard/standard_0.stub', 'timezone_abbreviations_list' => 'date/date.stub', 'timezone_identifiers_list' => 'date/date.stub', 'timezone_location_get' => 'date/date.stub', 'timezone_name_from_abbr' => 'date/date.stub', 'timezone_name_get' => 'date/date.stub', 'timezone_offset_get' => 'date/date.stub', 'timezone_open' => 'date/date.stub', 'timezone_transitions_get' => 'date/date.stub', 'timezone_version_get' => 'date/date.stub', 'tmpfile' => 'standard/standard_5.stub', 'token_get_all' => 'tokenizer/tokenizer.stub', 'token_name' => 'tokenizer/tokenizer.stub', 'touch' => 'standard/standard_7.stub', 'trait_exists' => 'Core/Core.stub', 'transliterator_create' => 'intl/intl.stub', 'transliterator_create_from_rules' => 'intl/intl.stub', 'transliterator_create_inverse' => 'intl/intl.stub', 'transliterator_get_error_code' => 'intl/intl.stub', 'transliterator_get_error_message' => 'intl/intl.stub', 'transliterator_list_ids' => 'intl/intl.stub', 'transliterator_transliterate' => 'intl/intl.stub', 'trigger_error' => 'Core/Core.stub', 'trim' => 'standard/standard_1.stub', 'uasort' => 'standard/standard_8.stub', 'ucfirst' => 'standard/standard_1.stub', 'ucwords' => 'standard/standard_1.stub', 'uksort' => 'standard/standard_8.stub', 'umask' => 'standard/standard_5.stub', 'uniqid' => 'standard/standard_3.stub', 'unixtojd' => 'calendar/calendar.stub', 'unlink' => 'standard/standard_2.stub', 'unpack' => 'standard/standard_7.stub', 'unregister_event_handler' => 'zend/zend.stub', 'unregister_tick_function' => 'standard/standard_4.stub', 'unserialize' => 'standard/standard_4.stub', 'uopz_add_function' => 'uopz/uopz.stub', 'uopz_allow_exit' => 'uopz/uopz.stub', 'uopz_call_user_func' => 'uopz/uopz.stub', 'uopz_call_user_func_array' => 'uopz/uopz.stub', 'uopz_del_function' => 'uopz/uopz.stub', 'uopz_extend' => 'uopz/uopz.stub', 'uopz_flags' => 'uopz/uopz.stub', 'uopz_get_exit_status' => 'uopz/uopz.stub', 'uopz_get_hook' => 'uopz/uopz.stub', 'uopz_get_mock' => 'uopz/uopz.stub', 'uopz_get_property' => 'uopz/uopz.stub', 'uopz_get_return' => 'uopz/uopz.stub', 'uopz_get_static' => 'uopz/uopz.stub', 'uopz_implement' => 'uopz/uopz.stub', 'uopz_redefine' => 'uopz/uopz.stub', 'uopz_set_hook' => 'uopz/uopz.stub', 'uopz_set_mock' => 'uopz/uopz.stub', 'uopz_set_property' => 'uopz/uopz.stub', 'uopz_set_return' => 'uopz/uopz.stub', 'uopz_set_static' => 'uopz/uopz.stub', 'uopz_undefine' => 'uopz/uopz.stub', 'uopz_unset_hook' => 'uopz/uopz.stub', 'uopz_unset_mock' => 'uopz/uopz.stub', 'uopz_unset_return' => 'uopz/uopz.stub', 'uploadprogress_get_contents' => 'uploadprogress/uploadprogress.stub', 'uploadprogress_get_info' => 'uploadprogress/uploadprogress.stub', 'urldecode' => 'standard/standard_2.stub', 'urlencode' => 'standard/standard_2.stub', 'use_soap_error_handler' => 'soap/soap.stub', 'user_error' => 'Core/Core.stub', 'usleep' => 'standard/standard_0.stub', 'usort' => 'standard/standard_8.stub', 'utf8_decode' => 'standard/basic.stub', 'utf8_encode' => 'standard/basic.stub', 'uuid_compare' => 'uuid/uuid_c.stub', 'uuid_create' => 'uuid/uuid_c.stub', 'uuid_generate_md5' => 'uuid/uuid_c.stub', 'uuid_generate_sha1' => 'uuid/uuid_c.stub', 'uuid_is_null' => 'uuid/uuid_c.stub', 'uuid_is_valid' => 'uuid/uuid_c.stub', 'uuid_mac' => 'uuid/uuid_c.stub', 'uuid_parse' => 'uuid/uuid_c.stub', 'uuid_time' => 'uuid/uuid_c.stub', 'uuid_type' => 'uuid/uuid_c.stub', 'uuid_unparse' => 'uuid/uuid_c.stub', 'uuid_variant' => 'uuid/uuid_c.stub', 'uv_accept' => 'uv/uv_functions.stub', 'uv_ares_init_options' => 'uv/uv_functions.stub', 'uv_async_init' => 'uv/uv_functions.stub', 'uv_async_send' => 'uv/uv_functions.stub', 'uv_chdir' => 'uv/uv_functions.stub', 'uv_check_init' => 'uv/uv_functions.stub', 'uv_check_start' => 'uv/uv_functions.stub', 'uv_check_stop' => 'uv/uv_functions.stub', 'uv_close' => 'uv/uv_functions.stub', 'uv_cpu_info' => 'uv/uv_functions.stub', 'uv_default_loop' => 'uv/uv_functions.stub', 'uv_err_name' => 'uv/uv_functions.stub', 'uv_exepath' => 'uv/uv_functions.stub', 'uv_fs_chmod' => 'uv/uv_functions.stub', 'uv_fs_chown' => 'uv/uv_functions.stub', 'uv_fs_close' => 'uv/uv_functions.stub', 'uv_fs_event_init' => 'uv/uv_functions.stub', 'uv_fs_fchmod' => 'uv/uv_functions.stub', 'uv_fs_fchown' => 'uv/uv_functions.stub', 'uv_fs_fdatasync' => 'uv/uv_functions.stub', 'uv_fs_fstat' => 'uv/uv_functions.stub', 'uv_fs_fsync' => 'uv/uv_functions.stub', 'uv_fs_ftruncate' => 'uv/uv_functions.stub', 'uv_fs_futime' => 'uv/uv_functions.stub', 'uv_fs_link' => 'uv/uv_functions.stub', 'uv_fs_lstat' => 'uv/uv_functions.stub', 'uv_fs_mkdir' => 'uv/uv_functions.stub', 'uv_fs_open' => 'uv/uv_functions.stub', 'uv_fs_poll_init' => 'uv/uv_functions.stub', 'uv_fs_poll_start' => 'uv/uv_functions.stub', 'uv_fs_poll_stop' => 'uv/uv_functions.stub', 'uv_fs_read' => 'uv/uv_functions.stub', 'uv_fs_readdir' => 'uv/uv_functions.stub', 'uv_fs_readlink' => 'uv/uv_functions.stub', 'uv_fs_rename' => 'uv/uv_functions.stub', 'uv_fs_rmdir' => 'uv/uv_functions.stub', 'uv_fs_sendfile' => 'uv/uv_functions.stub', 'uv_fs_stat' => 'uv/uv_functions.stub', 'uv_fs_symlink' => 'uv/uv_functions.stub', 'uv_fs_unlink' => 'uv/uv_functions.stub', 'uv_fs_utime' => 'uv/uv_functions.stub', 'uv_fs_write' => 'uv/uv_functions.stub', 'uv_get_free_memory' => 'uv/uv_functions.stub', 'uv_get_total_memory' => 'uv/uv_functions.stub', 'uv_getaddrinfo' => 'uv/uv_functions.stub', 'uv_guess_handle' => 'uv/uv_functions.stub', 'uv_handle_type' => 'uv/uv_functions.stub', 'uv_hrtime' => 'uv/uv_functions.stub', 'uv_idle_init' => 'uv/uv_functions.stub', 'uv_idle_start' => 'uv/uv_functions.stub', 'uv_idle_stop' => 'uv/uv_functions.stub', 'uv_interface_addresses' => 'uv/uv_functions.stub', 'uv_ip4_addr' => 'uv/uv_functions.stub', 'uv_ip4_name' => 'uv/uv_functions.stub', 'uv_ip6_addr' => 'uv/uv_functions.stub', 'uv_ip6_name' => 'uv/uv_functions.stub', 'uv_is_active' => 'uv/uv_functions.stub', 'uv_is_readable' => 'uv/uv_functions.stub', 'uv_is_writable' => 'uv/uv_functions.stub', 'uv_kill' => 'uv/uv_functions.stub', 'uv_last_error' => 'uv/uv_functions.stub', 'uv_listen' => 'uv/uv_functions.stub', 'uv_loadavg' => 'uv/uv_functions.stub', 'uv_loop_delete' => 'uv/uv_functions.stub', 'uv_loop_new' => 'uv/uv_functions.stub', 'uv_mutex_init' => 'uv/uv_functions.stub', 'uv_mutex_lock' => 'uv/uv_functions.stub', 'uv_mutex_trylock' => 'uv/uv_functions.stub', 'uv_now' => 'uv/uv_functions.stub', 'uv_pipe_bind' => 'uv/uv_functions.stub', 'uv_pipe_connect' => 'uv/uv_functions.stub', 'uv_pipe_init' => 'uv/uv_functions.stub', 'uv_pipe_open' => 'uv/uv_functions.stub', 'uv_pipe_pending_instances' => 'uv/uv_functions.stub', 'uv_poll_init' => 'uv/uv_functions.stub', 'uv_poll_start' => 'uv/uv_functions.stub', 'uv_poll_stop' => 'uv/uv_functions.stub', 'uv_prepare_init' => 'uv/uv_functions.stub', 'uv_prepare_start' => 'uv/uv_functions.stub', 'uv_prepare_stop' => 'uv/uv_functions.stub', 'uv_process_kill' => 'uv/uv_functions.stub', 'uv_queue_work' => 'uv/uv_functions.stub', 'uv_read2_start' => 'uv/uv_functions.stub', 'uv_read_start' => 'uv/uv_functions.stub', 'uv_read_stop' => 'uv/uv_functions.stub', 'uv_ref' => 'uv/uv_functions.stub', 'uv_resident_set_memory' => 'uv/uv_functions.stub', 'uv_run' => 'uv/uv_functions.stub', 'uv_run_once' => 'uv/uv_functions.stub', 'uv_rwlock_init' => 'uv/uv_functions.stub', 'uv_rwlock_rdlock' => 'uv/uv_functions.stub', 'uv_rwlock_rdunlock' => 'uv/uv_functions.stub', 'uv_rwlock_tryrdlock' => 'uv/uv_functions.stub', 'uv_rwlock_trywrlock' => 'uv/uv_functions.stub', 'uv_rwlock_wrlock' => 'uv/uv_functions.stub', 'uv_rwlock_wrunlock' => 'uv/uv_functions.stub', 'uv_sem_init' => 'uv/uv_functions.stub', 'uv_sem_post' => 'uv/uv_functions.stub', 'uv_sem_trywait' => 'uv/uv_functions.stub', 'uv_sem_wait' => 'uv/uv_functions.stub', 'uv_shutdown' => 'uv/uv_functions.stub', 'uv_signal_stop' => 'uv/uv_functions.stub', 'uv_spawn' => 'uv/uv_functions.stub', 'uv_stdio_new' => 'uv/uv_functions.stub', 'uv_stop' => 'uv/uv_functions.stub', 'uv_strerror' => 'uv/uv_functions.stub', 'uv_tcp_bind' => 'uv/uv_functions.stub', 'uv_tcp_bind6' => 'uv/uv_functions.stub', 'uv_tcp_connect' => 'uv/uv_functions.stub', 'uv_tcp_connect6' => 'uv/uv_functions.stub', 'uv_tcp_getpeername' => 'uv/uv_functions.stub', 'uv_tcp_getsockname' => 'uv/uv_functions.stub', 'uv_tcp_init' => 'uv/uv_functions.stub', 'uv_tcp_nodelay' => 'uv/uv_functions.stub', 'uv_timer_again' => 'uv/uv_functions.stub', 'uv_timer_get_repeat' => 'uv/uv_functions.stub', 'uv_timer_init' => 'uv/uv_functions.stub', 'uv_timer_set_repeat' => 'uv/uv_functions.stub', 'uv_timer_start' => 'uv/uv_functions.stub', 'uv_timer_stop' => 'uv/uv_functions.stub', 'uv_tty_get_winsize' => 'uv/uv_functions.stub', 'uv_tty_init' => 'uv/uv_functions.stub', 'uv_tty_reset_mode' => 'uv/uv_functions.stub', 'uv_tty_set_mode' => 'uv/uv_functions.stub', 'uv_udp_bind' => 'uv/uv_functions.stub', 'uv_udp_bind6' => 'uv/uv_functions.stub', 'uv_udp_getsockname' => 'uv/uv_functions.stub', 'uv_udp_init' => 'uv/uv_functions.stub', 'uv_udp_recv_start' => 'uv/uv_functions.stub', 'uv_udp_recv_stop' => 'uv/uv_functions.stub', 'uv_udp_send' => 'uv/uv_functions.stub', 'uv_udp_send6' => 'uv/uv_functions.stub', 'uv_udp_set_broadcast' => 'uv/uv_functions.stub', 'uv_udp_set_membership' => 'uv/uv_functions.stub', 'uv_udp_set_multicast_loop' => 'uv/uv_functions.stub', 'uv_udp_set_multicast_ttl' => 'uv/uv_functions.stub', 'uv_unref' => 'uv/uv_functions.stub', 'uv_update_time' => 'uv/uv_functions.stub', 'uv_uptime' => 'uv/uv_functions.stub', 'uv_walk' => 'uv/uv_functions.stub', 'uv_write' => 'uv/uv_functions.stub', 'uv_write2' => 'uv/uv_functions.stub', 'var_dump' => 'standard/standard_4.stub', 'var_export' => 'standard/standard_4.stub', 'variant_abs' => 'com_dotnet/com_dotnet.stub', 'variant_add' => 'com_dotnet/com_dotnet.stub', 'variant_and' => 'com_dotnet/com_dotnet.stub', 'variant_cast' => 'com_dotnet/com_dotnet.stub', 'variant_cat' => 'com_dotnet/com_dotnet.stub', 'variant_cmp' => 'com_dotnet/com_dotnet.stub', 'variant_date_from_timestamp' => 'com_dotnet/com_dotnet.stub', 'variant_date_to_timestamp' => 'com_dotnet/com_dotnet.stub', 'variant_div' => 'com_dotnet/com_dotnet.stub', 'variant_eqv' => 'com_dotnet/com_dotnet.stub', 'variant_fix' => 'com_dotnet/com_dotnet.stub', 'variant_get_type' => 'com_dotnet/com_dotnet.stub', 'variant_idiv' => 'com_dotnet/com_dotnet.stub', 'variant_imp' => 'com_dotnet/com_dotnet.stub', 'variant_int' => 'com_dotnet/com_dotnet.stub', 'variant_mod' => 'com_dotnet/com_dotnet.stub', 'variant_mul' => 'com_dotnet/com_dotnet.stub', 'variant_neg' => 'com_dotnet/com_dotnet.stub', 'variant_not' => 'com_dotnet/com_dotnet.stub', 'variant_or' => 'com_dotnet/com_dotnet.stub', 'variant_pow' => 'com_dotnet/com_dotnet.stub', 'variant_round' => 'com_dotnet/com_dotnet.stub', 'variant_set' => 'com_dotnet/com_dotnet.stub', 'variant_set_type' => 'com_dotnet/com_dotnet.stub', 'variant_sub' => 'com_dotnet/com_dotnet.stub', 'variant_xor' => 'com_dotnet/com_dotnet.stub', 'version_compare' => 'standard/standard_9.stub', 'vfprintf' => 'standard/standard_2.stub', 'virtual' => 'apache/apache.stub', 'vprintf' => 'standard/standard_2.stub', 'vsprintf' => 'standard/standard_2.stub', 'wb_call_function' => 'winbinder/winbinder.stub', 'wb_create_font' => 'winbinder/winbinder.stub', 'wb_create_image' => 'winbinder/winbinder.stub', 'wb_create_mask' => 'winbinder/winbinder.stub', 'wb_create_timer' => 'winbinder/winbinder.stub', 'wb_create_window' => 'winbinder/winbinder.stub', 'wb_delete_items' => 'winbinder/winbinder.stub', 'wb_destroy_control' => 'winbinder/winbinder.stub', 'wb_destroy_font' => 'winbinder/winbinder.stub', 'wb_destroy_image' => 'winbinder/winbinder.stub', 'wb_destroy_timer' => 'winbinder/winbinder.stub', 'wb_destroy_window' => 'winbinder/winbinder.stub', 'wb_draw_ellipse' => 'winbinder/winbinder.stub', 'wb_draw_image' => 'winbinder/winbinder.stub', 'wb_draw_line' => 'winbinder/winbinder.stub', 'wb_draw_point' => 'winbinder/winbinder.stub', 'wb_draw_rect' => 'winbinder/winbinder.stub', 'wb_draw_text' => 'winbinder/winbinder.stub', 'wb_exec' => 'winbinder/winbinder.stub', 'wb_find_file' => 'winbinder/winbinder.stub', 'wb_get_address' => 'winbinder/winbinder.stub', 'wb_get_class' => 'winbinder/winbinder.stub', 'wb_get_control' => 'winbinder/winbinder.stub', 'wb_get_enabled' => 'winbinder/winbinder.stub', 'wb_get_enum_callback' => 'winbinder/winbinder.stub', 'wb_get_focus' => 'winbinder/winbinder.stub', 'wb_get_function_address' => 'winbinder/winbinder.stub', 'wb_get_hook_callback' => 'winbinder/winbinder.stub', 'wb_get_id' => 'winbinder/winbinder.stub', 'wb_get_image_data' => 'winbinder/winbinder.stub', 'wb_get_instance' => 'winbinder/winbinder.stub', 'wb_get_item_count' => 'winbinder/winbinder.stub', 'wb_get_item_list' => 'winbinder/winbinder.stub', 'wb_get_level' => 'winbinder/winbinder.stub', 'wb_get_midi_callback' => 'winbinder/winbinder.stub', 'wb_get_parent' => 'winbinder/winbinder.stub', 'wb_get_pixel' => 'winbinder/winbinder.stub', 'wb_get_position' => 'winbinder/winbinder.stub', 'wb_get_registry_key' => 'winbinder/winbinder.stub', 'wb_get_selected' => 'winbinder/winbinder.stub', 'wb_get_size' => 'winbinder/winbinder.stub', 'wb_get_state' => 'winbinder/winbinder.stub', 'wb_get_system_info' => 'winbinder/winbinder.stub', 'wb_get_value' => 'winbinder/winbinder.stub', 'wb_get_visible' => 'winbinder/winbinder.stub', 'wb_load_image' => 'winbinder/winbinder.stub', 'wb_load_library' => 'winbinder/winbinder.stub', 'wb_main_loop' => 'winbinder/winbinder.stub', 'wb_message_box' => 'winbinder/winbinder.stub', 'wb_peek' => 'winbinder/winbinder.stub', 'wb_play_sound' => 'winbinder/winbinder.stub', 'wb_poke' => 'winbinder/winbinder.stub', 'wb_refresh' => 'winbinder/winbinder.stub', 'wb_release_library' => 'winbinder/winbinder.stub', 'wb_save_image' => 'winbinder/winbinder.stub', 'wb_send_message' => 'winbinder/winbinder.stub', 'wb_set_area' => 'winbinder/winbinder.stub', 'wb_set_cursor' => 'winbinder/winbinder.stub', 'wb_set_enabled' => 'winbinder/winbinder.stub', 'wb_set_focus' => 'winbinder/winbinder.stub', 'wb_set_font' => 'winbinder/winbinder.stub', 'wb_set_handler' => 'winbinder/winbinder.stub', 'wb_set_image' => 'winbinder/winbinder.stub', 'wb_set_item_image' => 'winbinder/winbinder.stub', 'wb_set_location' => 'winbinder/winbinder.stub', 'wb_set_position' => 'winbinder/winbinder.stub', 'wb_set_range' => 'winbinder/winbinder.stub', 'wb_set_registry_key' => 'winbinder/winbinder.stub', 'wb_set_size' => 'winbinder/winbinder.stub', 'wb_set_state' => 'winbinder/winbinder.stub', 'wb_set_style' => 'winbinder/winbinder.stub', 'wb_set_visible' => 'winbinder/winbinder.stub', 'wb_sort' => 'winbinder/winbinder.stub', 'wb_stop_sound' => 'winbinder/winbinder.stub', 'wb_sys_dlg_color' => 'winbinder/winbinder.stub', 'wb_sys_dlg_path' => 'winbinder/winbinder.stub', 'wb_wait' => 'winbinder/winbinder.stub', 'wbtemp_clear_listview_columns' => 'winbinder/winbinder.stub', 'wbtemp_create_control' => 'winbinder/winbinder.stub', 'wbtemp_create_item' => 'winbinder/winbinder.stub', 'wbtemp_create_listview_column' => 'winbinder/winbinder.stub', 'wbtemp_create_listview_item' => 'winbinder/winbinder.stub', 'wbtemp_create_menu' => 'winbinder/winbinder.stub', 'wbtemp_create_statusbar_items' => 'winbinder/winbinder.stub', 'wbtemp_create_toolbar' => 'winbinder/winbinder.stub', 'wbtemp_create_treeview_item' => 'winbinder/winbinder.stub', 'wbtemp_get_listview_columns' => 'winbinder/winbinder.stub', 'wbtemp_get_listview_item_checked' => 'winbinder/winbinder.stub', 'wbtemp_get_listview_text' => 'winbinder/winbinder.stub', 'wbtemp_get_menu_item_checked' => 'winbinder/winbinder.stub', 'wbtemp_get_text' => 'winbinder/winbinder.stub', 'wbtemp_get_treeview_item_text' => 'winbinder/winbinder.stub', 'wbtemp_select_all_listview_items' => 'winbinder/winbinder.stub', 'wbtemp_select_listview_item' => 'winbinder/winbinder.stub', 'wbtemp_select_tab' => 'winbinder/winbinder.stub', 'wbtemp_set_accel_table' => 'winbinder/winbinder.stub', 'wbtemp_set_listview_item_checked' => 'winbinder/winbinder.stub', 'wbtemp_set_listview_item_text' => 'winbinder/winbinder.stub', 'wbtemp_set_menu_item_checked' => 'winbinder/winbinder.stub', 'wbtemp_set_menu_item_image' => 'winbinder/winbinder.stub', 'wbtemp_set_menu_item_selected' => 'winbinder/winbinder.stub', 'wbtemp_set_text' => 'winbinder/winbinder.stub', 'wbtemp_set_treeview_item_selected' => 'winbinder/winbinder.stub', 'wbtemp_set_treeview_item_text' => 'winbinder/winbinder.stub', 'wbtemp_set_treeview_item_value' => 'winbinder/winbinder.stub', 'wbtemp_set_value' => 'winbinder/winbinder.stub', 'wbtemp_sys_dlg_open' => 'winbinder/winbinder.stub', 'wbtemp_sys_dlg_save' => 'winbinder/winbinder.stub', 'wddx_add_vars' => 'wddx/wddx.stub', 'wddx_deserialize' => 'wddx/wddx.stub', 'wddx_packet_end' => 'wddx/wddx.stub', 'wddx_packet_start' => 'wddx/wddx.stub', 'wddx_serialize_value' => 'wddx/wddx.stub', 'wddx_serialize_vars' => 'wddx/wddx.stub', 'win32_continue_service' => 'win32service/win32service.stub', 'win32_create_service' => 'win32service/win32service.stub', 'win32_delete_service' => 'win32service/win32service.stub', 'win32_get_last_control_message' => 'win32service/win32service.stub', 'win32_pause_service' => 'win32service/win32service.stub', 'win32_query_service_status' => 'win32service/win32service.stub', 'win32_set_service_status' => 'win32service/win32service.stub', 'win32_start_service' => 'win32service/win32service.stub', 'win32_start_service_ctrl_dispatcher' => 'win32service/win32service.stub', 'win32_stop_service' => 'win32service/win32service.stub', 'wincache_fcache_fileinfo' => 'wincache/wincache.stub', 'wincache_fcache_meminfo' => 'wincache/wincache.stub', 'wincache_lock' => 'wincache/wincache.stub', 'wincache_ocache_fileinfo' => 'wincache/wincache.stub', 'wincache_ocache_meminfo' => 'wincache/wincache.stub', 'wincache_refresh_if_changed' => 'wincache/wincache.stub', 'wincache_rplist_fileinfo' => 'wincache/wincache.stub', 'wincache_rplist_meminfo' => 'wincache/wincache.stub', 'wincache_scache_info' => 'wincache/wincache.stub', 'wincache_scache_meminfo' => 'wincache/wincache.stub', 'wincache_ucache_add' => 'wincache/wincache.stub', 'wincache_ucache_cas' => 'wincache/wincache.stub', 'wincache_ucache_clear' => 'wincache/wincache.stub', 'wincache_ucache_dec' => 'wincache/wincache.stub', 'wincache_ucache_delete' => 'wincache/wincache.stub', 'wincache_ucache_exists' => 'wincache/wincache.stub', 'wincache_ucache_get' => 'wincache/wincache.stub', 'wincache_ucache_inc' => 'wincache/wincache.stub', 'wincache_ucache_info' => 'wincache/wincache.stub', 'wincache_ucache_meminfo' => 'wincache/wincache.stub', 'wincache_ucache_set' => 'wincache/wincache.stub', 'wincache_unlock' => 'wincache/wincache.stub', 'wordwrap' => 'standard/standard_0.stub', 'xcache_asm' => 'xcache/xcache.stub', 'xcache_clear_cache' => 'xcache/xcache.stub', 'xcache_coredump' => 'xcache/xcache.stub', 'xcache_count' => 'xcache/xcache.stub', 'xcache_coverager_decode' => 'xcache/xcache.stub', 'xcache_coverager_get' => 'xcache/xcache.stub', 'xcache_coverager_start' => 'xcache/xcache.stub', 'xcache_coverager_stop' => 'xcache/xcache.stub', 'xcache_dasm_file' => 'xcache/xcache.stub', 'xcache_dasm_string' => 'xcache/xcache.stub', 'xcache_dec' => 'xcache/xcache.stub', 'xcache_decode' => 'xcache/xcache.stub', 'xcache_encode' => 'xcache/xcache.stub', 'xcache_get' => 'xcache/xcache.stub', 'xcache_get_data_type' => 'xcache/xcache.stub', 'xcache_get_op_spec' => 'xcache/xcache.stub', 'xcache_get_op_type' => 'xcache/xcache.stub', 'xcache_get_opcode' => 'xcache/xcache.stub', 'xcache_get_opcode_spec' => 'xcache/xcache.stub', 'xcache_inc' => 'xcache/xcache.stub', 'xcache_info' => 'xcache/xcache.stub', 'xcache_is_autoglobal' => 'xcache/xcache.stub', 'xcache_isset' => 'xcache/xcache.stub', 'xcache_list' => 'xcache/xcache.stub', 'xcache_set' => 'xcache/xcache.stub', 'xcache_unset' => 'xcache/xcache.stub', 'xcache_unset_by_prefix' => 'xcache/xcache.stub', 'xdebug_break' => 'xdebug/xdebug.stub', 'xdebug_call_class' => 'xdebug/xdebug.stub', 'xdebug_call_file' => 'xdebug/xdebug.stub', 'xdebug_call_function' => 'xdebug/xdebug.stub', 'xdebug_call_line' => 'xdebug/xdebug.stub', 'xdebug_clear_aggr_profiling_data' => 'xdebug/xdebug.stub', 'xdebug_code_coverage_started' => 'xdebug/xdebug.stub', 'xdebug_connect_to_client' => 'xdebug/xdebug.stub', 'xdebug_debug_zval' => 'xdebug/xdebug.stub', 'xdebug_debug_zval_stdout' => 'xdebug/xdebug.stub', 'xdebug_disable' => 'xdebug/xdebug.stub', 'xdebug_dump_aggr_profiling_data' => 'xdebug/xdebug.stub', 'xdebug_dump_superglobals' => 'xdebug/xdebug.stub', 'xdebug_enable' => 'xdebug/xdebug.stub', 'xdebug_get_code_coverage' => 'xdebug/xdebug.stub', 'xdebug_get_collected_errors' => 'xdebug/xdebug.stub', 'xdebug_get_declared_vars' => 'xdebug/xdebug.stub', 'xdebug_get_formatted_function_stack' => 'xdebug/xdebug.stub', 'xdebug_get_function_count' => 'xdebug/xdebug.stub', 'xdebug_get_function_stack' => 'xdebug/xdebug.stub', 'xdebug_get_gc_run_count' => 'xdebug/xdebug.stub', 'xdebug_get_gc_total_collected_roots' => 'xdebug/xdebug.stub', 'xdebug_get_gcstats_filename' => 'xdebug/xdebug.stub', 'xdebug_get_headers' => 'xdebug/xdebug.stub', 'xdebug_get_monitored_functions' => 'xdebug/xdebug.stub', 'xdebug_get_profiler_filename' => 'xdebug/xdebug.stub', 'xdebug_get_stack_depth' => 'xdebug/xdebug.stub', 'xdebug_get_tracefile_name' => 'xdebug/xdebug.stub', 'xdebug_info' => 'xdebug/xdebug.stub', 'xdebug_is_debugger_active' => 'xdebug/xdebug.stub', 'xdebug_is_enabled' => 'xdebug/xdebug.stub', 'xdebug_memory_usage' => 'xdebug/xdebug.stub', 'xdebug_notify' => 'xdebug/xdebug.stub', 'xdebug_peak_memory_usage' => 'xdebug/xdebug.stub', 'xdebug_print_function_stack' => 'xdebug/xdebug.stub', 'xdebug_set_filter' => 'xdebug/xdebug.stub', 'xdebug_start_code_coverage' => 'xdebug/xdebug.stub', 'xdebug_start_error_collection' => 'xdebug/xdebug.stub', 'xdebug_start_function_monitor' => 'xdebug/xdebug.stub', 'xdebug_start_gcstats' => 'xdebug/xdebug.stub', 'xdebug_start_trace' => 'xdebug/xdebug.stub', 'xdebug_stop_code_coverage' => 'xdebug/xdebug.stub', 'xdebug_stop_error_collection' => 'xdebug/xdebug.stub', 'xdebug_stop_function_monitor' => 'xdebug/xdebug.stub', 'xdebug_stop_gcstats' => 'xdebug/xdebug.stub', 'xdebug_stop_trace' => 'xdebug/xdebug.stub', 'xdebug_time_index' => 'xdebug/xdebug.stub', 'xdebug_var_dump' => 'xdebug/xdebug.stub', 'xdiff_file_bdiff' => 'xdiff/xdiff.stub', 'xdiff_file_bdiff_size' => 'xdiff/xdiff.stub', 'xdiff_file_bpatch' => 'xdiff/xdiff.stub', 'xdiff_file_diff' => 'xdiff/xdiff.stub', 'xdiff_file_diff_binary' => 'xdiff/xdiff.stub', 'xdiff_file_merge3' => 'xdiff/xdiff.stub', 'xdiff_file_patch' => 'xdiff/xdiff.stub', 'xdiff_file_patch_binary' => 'xdiff/xdiff.stub', 'xdiff_file_rabdiff' => 'xdiff/xdiff.stub', 'xdiff_string_bdiff' => 'xdiff/xdiff.stub', 'xdiff_string_bdiff_size' => 'xdiff/xdiff.stub', 'xdiff_string_bpatch' => 'xdiff/xdiff.stub', 'xdiff_string_diff' => 'xdiff/xdiff.stub', 'xdiff_string_diff_binary' => 'xdiff/xdiff.stub', 'xdiff_string_merge3' => 'xdiff/xdiff.stub', 'xdiff_string_patch' => 'xdiff/xdiff.stub', 'xdiff_string_patch_binary' => 'xdiff/xdiff.stub', 'xdiff_string_rabdiff' => 'xdiff/xdiff.stub', 'xhprof_disable' => 'xhprof/xhprof.stub', 'xhprof_enable' => 'xhprof/xhprof.stub', 'xhprof_sample_disable' => 'xhprof/xhprof.stub', 'xhprof_sample_enable' => 'xhprof/xhprof.stub', 'xml_error_string' => 'xml/xml.stub', 'xml_get_current_byte_index' => 'xml/xml.stub', 'xml_get_current_column_number' => 'xml/xml.stub', 'xml_get_current_line_number' => 'xml/xml.stub', 'xml_get_error_code' => 'xml/xml.stub', 'xml_parse' => 'xml/xml.stub', 'xml_parse_into_struct' => 'xml/xml.stub', 'xml_parser_create' => 'xml/xml.stub', 'xml_parser_create_ns' => 'xml/xml.stub', 'xml_parser_free' => 'xml/xml.stub', 'xml_parser_get_option' => 'xml/xml.stub', 'xml_parser_set_option' => 'xml/xml.stub', 'xml_set_character_data_handler' => 'xml/xml.stub', 'xml_set_default_handler' => 'xml/xml.stub', 'xml_set_element_handler' => 'xml/xml.stub', 'xml_set_end_namespace_decl_handler' => 'xml/xml.stub', 'xml_set_external_entity_ref_handler' => 'xml/xml.stub', 'xml_set_notation_decl_handler' => 'xml/xml.stub', 'xml_set_object' => 'xml/xml.stub', 'xml_set_processing_instruction_handler' => 'xml/xml.stub', 'xml_set_start_namespace_decl_handler' => 'xml/xml.stub', 'xml_set_unparsed_entity_decl_handler' => 'xml/xml.stub', 'xmlrpc_decode' => 'xmlrpc/xmlrpc.stub', 'xmlrpc_decode_request' => 'xmlrpc/xmlrpc.stub', 'xmlrpc_encode' => 'xmlrpc/xmlrpc.stub', 'xmlrpc_encode_request' => 'xmlrpc/xmlrpc.stub', 'xmlrpc_get_type' => 'xmlrpc/xmlrpc.stub', 'xmlrpc_is_fault' => 'xmlrpc/xmlrpc.stub', 'xmlrpc_parse_method_descriptions' => 'xmlrpc/xmlrpc.stub', 'xmlrpc_server_add_introspection_data' => 'xmlrpc/xmlrpc.stub', 'xmlrpc_server_call_method' => 'xmlrpc/xmlrpc.stub', 'xmlrpc_server_create' => 'xmlrpc/xmlrpc.stub', 'xmlrpc_server_destroy' => 'xmlrpc/xmlrpc.stub', 'xmlrpc_server_register_introspection_callback' => 'xmlrpc/xmlrpc.stub', 'xmlrpc_server_register_method' => 'xmlrpc/xmlrpc.stub', 'xmlrpc_set_type' => 'xmlrpc/xmlrpc.stub', 'xmlwriter_end_attribute' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_end_cdata' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_end_comment' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_end_document' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_end_dtd' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_end_dtd_attlist' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_end_dtd_element' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_end_dtd_entity' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_end_element' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_end_pi' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_flush' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_full_end_element' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_open_memory' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_open_uri' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_output_memory' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_set_indent' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_set_indent_string' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_start_attribute' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_start_attribute_ns' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_start_cdata' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_start_comment' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_start_document' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_start_dtd' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_start_dtd_attlist' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_start_dtd_element' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_start_dtd_entity' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_start_element' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_start_element_ns' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_start_pi' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_text' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_write_attribute' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_write_attribute_ns' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_write_cdata' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_write_comment' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_write_dtd' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_write_dtd_attlist' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_write_dtd_element' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_write_dtd_entity' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_write_element' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_write_element_ns' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_write_pi' => 'xmlwriter/xmlwriter.stub', 'xmlwriter_write_raw' => 'xmlwriter/xmlwriter.stub', 'xxtea_decrypt' => 'xxtea/xxtea.stub', 'xxtea_encrypt' => 'xxtea/xxtea.stub', 'yaml_emit' => 'yaml/yaml.stub', 'yaml_emit_file' => 'yaml/yaml.stub', 'yaml_parse' => 'yaml/yaml.stub', 'yaml_parse_file' => 'yaml/yaml.stub', 'yaml_parse_url' => 'yaml/yaml.stub', 'zem_get_extension_info_by_id' => 'ZendUtils/ZendUtils.stub', 'zem_get_extension_info_by_name' => 'ZendUtils/ZendUtils.stub', 'zem_get_extensions_info' => 'ZendUtils/ZendUtils.stub', 'zem_get_license_info' => 'ZendUtils/ZendUtils.stub', 'zend_current_obfuscation_level' => 'zend/zend_f.stub', 'zend_disk_cache_clear' => 'ZendCache/ZendCache.stub', 'zend_disk_cache_delete' => 'ZendCache/ZendCache.stub', 'zend_disk_cache_fetch' => 'ZendCache/ZendCache.stub', 'zend_disk_cache_info' => 'ZendCache/ZendCache.stub', 'zend_disk_cache_store' => 'ZendCache/ZendCache.stub', 'zend_get_id' => 'zend/zend_f.stub', 'zend_is_configuration_changed' => 'ZendUtils/ZendUtils.stub', 'zend_loader_current_file' => 'zend/zend_f.stub', 'zend_loader_enabled' => 'zend/zend_f.stub', 'zend_loader_file_encoded' => 'zend/zend_f.stub', 'zend_loader_file_licensed' => 'zend/zend_f.stub', 'zend_loader_install_license' => 'zend/zend_f.stub', 'zend_logo_guid' => 'standard/standard_0.stub', 'zend_obfuscate_class_name' => 'zend/zend_f.stub', 'zend_obfuscate_function_name' => 'zend/zend_f.stub', 'zend_optimizer_version' => 'zend/zend_f.stub', 'zend_runtime_obfuscate' => 'zend/zend_f.stub', 'zend_send_buffer' => 'zend/zend.stub', 'zend_send_file' => 'zend/zend.stub', 'zend_set_configuration_changed' => 'ZendUtils/ZendUtils.stub', 'zend_shm_cache_clear' => 'ZendCache/ZendCache.stub', 'zend_shm_cache_delete' => 'ZendCache/ZendCache.stub', 'zend_shm_cache_fetch' => 'ZendCache/ZendCache.stub', 'zend_shm_cache_info' => 'ZendCache/ZendCache.stub', 'zend_shm_cache_store' => 'ZendCache/ZendCache.stub', 'zend_version' => 'Core/Core.stub', 'zip_close' => 'zip/zip.stub', 'zip_entry_close' => 'zip/zip.stub', 'zip_entry_compressedsize' => 'zip/zip.stub', 'zip_entry_compressionmethod' => 'zip/zip.stub', 'zip_entry_filesize' => 'zip/zip.stub', 'zip_entry_name' => 'zip/zip.stub', 'zip_entry_open' => 'zip/zip.stub', 'zip_entry_read' => 'zip/zip.stub', 'zip_open' => 'zip/zip.stub', 'zip_read' => 'zip/zip.stub', 'zlib_decode' => 'zlib/zlib.stub', 'zlib_encode' => 'zlib/zlib.stub', 'zlib_get_coding_type' => 'zlib/zlib.stub', 'zstd_compress' => 'zstd/zstd.stub', 'zstd_compress_dict' => 'zstd/zstd.stub', 'zstd_compress_usingcdict' => 'zstd/zstd.stub', 'zstd_decompress_dict' => 'zstd/zstd.stub', 'zstd_decompress_usingcdict' => 'zstd/zstd.stub', 'zstd_uncompress' => 'zstd/zstd.stub', 'zstd_uncompress_dict' => 'zstd/zstd.stub', 'zstd_uncompress_usingcdict' => 'zstd/zstd.stub');
    const CONSTANTS = array('ABDAY_1' => 'standard/standard_defines.stub', 'ABDAY_2' => 'standard/standard_defines.stub', 'ABDAY_3' => 'standard/standard_defines.stub', 'ABDAY_4' => 'standard/standard_defines.stub', 'ABDAY_5' => 'standard/standard_defines.stub', 'ABDAY_6' => 'standard/standard_defines.stub', 'ABDAY_7' => 'standard/standard_defines.stub', 'ABMON_1' => 'standard/standard_defines.stub', 'ABMON_10' => 'standard/standard_defines.stub', 'ABMON_11' => 'standard/standard_defines.stub', 'ABMON_12' => 'standard/standard_defines.stub', 'ABMON_2' => 'standard/standard_defines.stub', 'ABMON_3' => 'standard/standard_defines.stub', 'ABMON_4' => 'standard/standard_defines.stub', 'ABMON_5' => 'standard/standard_defines.stub', 'ABMON_6' => 'standard/standard_defines.stub', 'ABMON_7' => 'standard/standard_defines.stub', 'ABMON_8' => 'standard/standard_defines.stub', 'ABMON_9' => 'standard/standard_defines.stub', 'AF_INET' => 'sockets/sockets.stub', 'AF_INET6' => 'sockets/sockets.stub', 'AF_UNIX' => 'sockets/sockets.stub', 'AI_ADDRCONFIG' => 'sockets/sockets.stub', 'AI_ALL' => 'sockets/sockets.stub', 'AI_CANONNAME' => 'sockets/sockets.stub', 'AI_NUMERICHOST' => 'sockets/sockets.stub', 'AI_NUMERICSERV' => 'sockets/sockets.stub', 'AI_PASSIVE' => 'sockets/sockets.stub', 'AI_V4MAPPED' => 'sockets/sockets.stub', 'ALT_DIGITS' => 'standard/standard_defines.stub', 'AMQP_AUTOACK' => 'amqp/amqp.stub', 'AMQP_AUTODELETE' => 'amqp/amqp.stub', 'AMQP_DURABLE' => 'amqp/amqp.stub', 'AMQP_EXCLUSIVE' => 'amqp/amqp.stub', 'AMQP_EX_TYPE_DIRECT' => 'amqp/amqp.stub', 'AMQP_EX_TYPE_FANOUT' => 'amqp/amqp.stub', 'AMQP_EX_TYPE_HEADERS' => 'amqp/amqp.stub', 'AMQP_EX_TYPE_TOPIC' => 'amqp/amqp.stub', 'AMQP_IFEMPTY' => 'amqp/amqp.stub', 'AMQP_IFUNUSED' => 'amqp/amqp.stub', 'AMQP_IMMEDIATE' => 'amqp/amqp.stub', 'AMQP_INTERNAL' => 'amqp/amqp.stub', 'AMQP_JUST_CONSUME' => 'amqp/amqp.stub', 'AMQP_MANDATORY' => 'amqp/amqp.stub', 'AMQP_MULTIPLE' => 'amqp/amqp.stub', 'AMQP_NOLOCAL' => 'amqp/amqp.stub', 'AMQP_NOPARAM' => 'amqp/amqp.stub', 'AMQP_NOWAIT' => 'amqp/amqp.stub', 'AMQP_OS_SOCKET_TIMEOUT_ERRNO' => 'amqp/amqp.stub', 'AMQP_PASSIVE' => 'amqp/amqp.stub', 'AMQP_REQUEUE' => 'amqp/amqp.stub', 'AMQP_SASL_METHOD_EXTERNAL' => 'amqp/amqp.stub', 'AMQP_SASL_METHOD_PLAIN' => 'amqp/amqp.stub', 'AM_STR' => 'standard/standard_defines.stub', 'APACHE_MAP' => 'soap/soap.stub', 'APC_BIN_VERIFY_CRC32' => 'apcu/apcu.stub', 'APC_BIN_VERIFY_MD5' => 'apcu/apcu.stub', 'APC_ITER_ALL' => 'apcu/apcu.stub', 'APC_ITER_ATIME' => 'apcu/apcu.stub', 'APC_ITER_CTIME' => 'apcu/apcu.stub', 'APC_ITER_DEVICE' => 'apcu/apcu.stub', 'APC_ITER_DTIME' => 'apcu/apcu.stub', 'APC_ITER_FILENAME' => 'apcu/apcu.stub', 'APC_ITER_INODE' => 'apcu/apcu.stub', 'APC_ITER_KEY' => 'apcu/apcu.stub', 'APC_ITER_MD5' => 'apcu/apcu.stub', 'APC_ITER_MEM_SIZE' => 'apcu/apcu.stub', 'APC_ITER_MTIME' => 'apcu/apcu.stub', 'APC_ITER_NONE' => 'apcu/apcu.stub', 'APC_ITER_NUM_HITS' => 'apcu/apcu.stub', 'APC_ITER_REFCOUNT' => 'apcu/apcu.stub', 'APC_ITER_TTL' => 'apcu/apcu.stub', 'APC_ITER_TYPE' => 'apcu/apcu.stub', 'APC_ITER_VALUE' => 'apcu/apcu.stub', 'APC_LIST_ACTIVE' => 'apcu/apcu.stub', 'APC_LIST_DELETED' => 'apcu/apcu.stub', 'ARRAY_FILTER_USE_BOTH' => 'standard/standard_9.stub', 'ARRAY_FILTER_USE_KEY' => 'standard/standard_9.stub', 'ASSERT_ACTIVE' => 'standard/standard_defines.stub', 'ASSERT_BAIL' => 'standard/standard_defines.stub', 'ASSERT_CALLBACK' => 'standard/standard_defines.stub', 'ASSERT_EXCEPTION' => 'standard/standard_defines.stub', 'ASSERT_QUIET_EVAL' => 'standard/standard_defines.stub', 'ASSERT_WARNING' => 'standard/standard_defines.stub', 'Accel' => 'winbinder/winbinder.stub', 'AppWindow' => 'winbinder/winbinder.stub', 'BLACK' => 'winbinder/winbinder.stub', 'BLUE' => 'winbinder/winbinder.stub', 'BUS_ADRALN' => 'pcntl/pcntl.stub', 'BUS_ADRERR' => 'pcntl/pcntl.stub', 'BUS_OBJERR' => 'pcntl/pcntl.stub', 'CAL_DOW_DAYNO' => 'calendar/calendar.stub', 'CAL_DOW_LONG' => 'calendar/calendar.stub', 'CAL_DOW_SHORT' => 'calendar/calendar.stub', 'CAL_EASTER_ALWAYS_GREGORIAN' => 'calendar/calendar.stub', 'CAL_EASTER_ALWAYS_JULIAN' => 'calendar/calendar.stub', 'CAL_EASTER_DEFAULT' => 'calendar/calendar.stub', 'CAL_EASTER_ROMAN' => 'calendar/calendar.stub', 'CAL_FRENCH' => 'calendar/calendar.stub', 'CAL_GREGORIAN' => 'calendar/calendar.stub', 'CAL_JEWISH' => 'calendar/calendar.stub', 'CAL_JEWISH_ADD_ALAFIM' => 'calendar/calendar.stub', 'CAL_JEWISH_ADD_ALAFIM_GERESH' => 'calendar/calendar.stub', 'CAL_JEWISH_ADD_GERESHAYIM' => 'calendar/calendar.stub', 'CAL_JULIAN' => 'calendar/calendar.stub', 'CAL_MONTH_FRENCH' => 'calendar/calendar.stub', 'CAL_MONTH_GREGORIAN_LONG' => 'calendar/calendar.stub', 'CAL_MONTH_GREGORIAN_SHORT' => 'calendar/calendar.stub', 'CAL_MONTH_JEWISH' => 'calendar/calendar.stub', 'CAL_MONTH_JULIAN_LONG' => 'calendar/calendar.stub', 'CAL_MONTH_JULIAN_SHORT' => 'calendar/calendar.stub', 'CAL_NUM_CALS' => 'calendar/calendar.stub', 'CASE_LOWER' => 'standard/standard_defines.stub', 'CASE_UPPER' => 'standard/standard_defines.stub', 'CHAR_MAX' => 'standard/standard_defines.stub', 'CLD_CONTINUED' => 'pcntl/pcntl.stub', 'CLD_DUMPED' => 'pcntl/pcntl.stub', 'CLD_EXITED' => 'pcntl/pcntl.stub', 'CLD_KILLED' => 'pcntl/pcntl.stub', 'CLD_STOPPED' => 'pcntl/pcntl.stub', 'CLD_TRAPPED' => 'pcntl/pcntl.stub', 'CLONE_NEWCGROUP' => 'pcntl/pcntl.stub', 'CLONE_NEWIPC' => 'pcntl/pcntl.stub', 'CLONE_NEWNET' => 'pcntl/pcntl.stub', 'CLONE_NEWNS' => 'pcntl/pcntl.stub', 'CLONE_NEWPID' => 'pcntl/pcntl.stub', 'CLONE_NEWUSER' => 'pcntl/pcntl.stub', 'CLONE_NEWUTS' => 'pcntl/pcntl.stub', 'CLSCTX_ALL' => 'com_dotnet/com_dotnet.stub', 'CLSCTX_INPROC_HANDLER' => 'com_dotnet/com_dotnet.stub', 'CLSCTX_INPROC_SERVER' => 'com_dotnet/com_dotnet.stub', 'CLSCTX_LOCAL_SERVER' => 'com_dotnet/com_dotnet.stub', 'CLSCTX_REMOTE_SERVER' => 'com_dotnet/com_dotnet.stub', 'CLSCTX_SERVER' => 'com_dotnet/com_dotnet.stub', 'CL_EXPUNGE' => 'imap/imap.stub', 'CODESET' => 'standard/standard_defines.stub', 'CONNECTION_ABORTED' => 'standard/standard_defines.stub', 'CONNECTION_NORMAL' => 'standard/standard_defines.stub', 'CONNECTION_TIMEOUT' => 'standard/standard_defines.stub', 'COUNT_NORMAL' => 'standard/standard_defines.stub', 'COUNT_RECURSIVE' => 'standard/standard_defines.stub', 'CP_ACP' => 'com_dotnet/com_dotnet.stub', 'CP_MACCP' => 'com_dotnet/com_dotnet.stub', 'CP_MOVE' => 'imap/imap.stub', 'CP_OEMCP' => 'com_dotnet/com_dotnet.stub', 'CP_SYMBOL' => 'com_dotnet/com_dotnet.stub', 'CP_THREAD_ACP' => 'com_dotnet/com_dotnet.stub', 'CP_UID' => 'imap/imap.stub', 'CP_UTF7' => 'com_dotnet/com_dotnet.stub', 'CP_UTF8' => 'com_dotnet/com_dotnet.stub', 'CREDITS_ALL' => 'standard/standard_defines.stub', 'CREDITS_DOCS' => 'standard/standard_defines.stub', 'CREDITS_FULLPAGE' => 'standard/standard_defines.stub', 'CREDITS_GENERAL' => 'standard/standard_defines.stub', 'CREDITS_GROUP' => 'standard/standard_defines.stub', 'CREDITS_MODULES' => 'standard/standard_defines.stub', 'CREDITS_QA' => 'standard/standard_defines.stub', 'CREDITS_SAPI' => 'standard/standard_defines.stub', 'CRNCYSTR' => 'standard/standard_defines.stub', 'CRYPT_BLOWFISH' => 'standard/standard_defines.stub', 'CRYPT_EXT_DES' => 'standard/standard_defines.stub', 'CRYPT_MD5' => 'standard/standard_defines.stub', 'CRYPT_SALT_LENGTH' => 'standard/standard_defines.stub', 'CRYPT_SHA256' => 'standard/standard_defines.stub', 'CRYPT_SHA512' => 'standard/standard_defines.stub', 'CRYPT_STD_DES' => 'standard/standard_defines.stub', 'CUBRID_ASSOC' => 'cubrid/cubrid.stub', 'CUBRID_ASYNC' => 'cubrid/cubrid.stub', 'CUBRID_AUTOCOMMIT_FALSE' => 'cubrid/cubrid.stub', 'CUBRID_AUTOCOMMIT_TRUE' => 'cubrid/cubrid.stub', 'CUBRID_BOTH' => 'cubrid/cubrid.stub', 'CUBRID_CURSOR_CURRENT' => 'cubrid/cubrid.stub', 'CUBRID_CURSOR_ERROR' => 'cubrid/cubrid.stub', 'CUBRID_CURSOR_FIRST' => 'cubrid/cubrid.stub', 'CUBRID_CURSOR_LAST' => 'cubrid/cubrid.stub', 'CUBRID_CURSOR_SUCCESS' => 'cubrid/cubrid.stub', 'CUBRID_EXEC_QUERY_ALL' => 'cubrid/cubrid.stub', 'CUBRID_INCLUDE_OID' => 'cubrid/cubrid.stub', 'CUBRID_NO_MORE_DATA' => 'cubrid/cubrid.stub', 'CUBRID_NUM' => 'cubrid/cubrid.stub', 'CUBRID_OBJECT' => 'cubrid/cubrid.stub', 'CURLALTSVC_H1' => 'curl/curl_d.stub', 'CURLALTSVC_H2' => 'curl/curl_d.stub', 'CURLALTSVC_H3' => 'curl/curl_d.stub', 'CURLALTSVC_READONLYFILE' => 'curl/curl_d.stub', 'CURLAUTH_ANY' => 'curl/curl_d.stub', 'CURLAUTH_ANYSAFE' => 'curl/curl_d.stub', 'CURLAUTH_AWS_SIGV4' => 'curl/curl_d.stub', 'CURLAUTH_BASIC' => 'curl/curl_d.stub', 'CURLAUTH_BEARER' => 'curl/curl_d.stub', 'CURLAUTH_DIGEST' => 'curl/curl_d.stub', 'CURLAUTH_DIGEST_IE' => 'curl/curl_d.stub', 'CURLAUTH_GSSAPI' => 'curl/curl_d.stub', 'CURLAUTH_GSSNEGOTIATE' => 'curl/curl_d.stub', 'CURLAUTH_NEGOTIATE' => 'curl/curl_d.stub', 'CURLAUTH_NONE' => 'curl/curl_d.stub', 'CURLAUTH_NTLM' => 'curl/curl_d.stub', 'CURLAUTH_NTLM_WB' => 'curl/curl_d.stub', 'CURLAUTH_ONLY' => 'curl/curl_d.stub', 'CURLCLOSEPOLICY_CALLBACK' => 'curl/curl_d.stub', 'CURLCLOSEPOLICY_LEAST_RECENTLY_USED' => 'curl/curl_d.stub', 'CURLCLOSEPOLICY_LEAST_TRAFFIC' => 'curl/curl_d.stub', 'CURLCLOSEPOLICY_OLDEST' => 'curl/curl_d.stub', 'CURLCLOSEPOLICY_SLOWEST' => 'curl/curl_d.stub', 'CURLE_ABORTED_BY_CALLBACK' => 'curl/curl_d.stub', 'CURLE_BAD_CALLING_ORDER' => 'curl/curl_d.stub', 'CURLE_BAD_CONTENT_ENCODING' => 'curl/curl_d.stub', 'CURLE_BAD_DOWNLOAD_RESUME' => 'curl/curl_d.stub', 'CURLE_BAD_FUNCTION_ARGUMENT' => 'curl/curl_d.stub', 'CURLE_BAD_PASSWORD_ENTERED' => 'curl/curl_d.stub', 'CURLE_COULDNT_CONNECT' => 'curl/curl_d.stub', 'CURLE_COULDNT_RESOLVE_HOST' => 'curl/curl_d.stub', 'CURLE_COULDNT_RESOLVE_PROXY' => 'curl/curl_d.stub', 'CURLE_FAILED_INIT' => 'curl/curl_d.stub', 'CURLE_FILESIZE_EXCEEDED' => 'curl/curl_d.stub', 'CURLE_FILE_COULDNT_READ_FILE' => 'curl/curl_d.stub', 'CURLE_FTP_ACCESS_DENIED' => 'curl/curl_d.stub', 'CURLE_FTP_BAD_DOWNLOAD_RESUME' => 'curl/curl_d.stub', 'CURLE_FTP_CANT_GET_HOST' => 'curl/curl_d.stub', 'CURLE_FTP_CANT_RECONNECT' => 'curl/curl_d.stub', 'CURLE_FTP_COULDNT_GET_SIZE' => 'curl/curl_d.stub', 'CURLE_FTP_COULDNT_RETR_FILE' => 'curl/curl_d.stub', 'CURLE_FTP_COULDNT_SET_ASCII' => 'curl/curl_d.stub', 'CURLE_FTP_COULDNT_SET_BINARY' => 'curl/curl_d.stub', 'CURLE_FTP_COULDNT_STOR_FILE' => 'curl/curl_d.stub', 'CURLE_FTP_COULDNT_USE_REST' => 'curl/curl_d.stub', 'CURLE_FTP_PARTIAL_FILE' => 'curl/curl_d.stub', 'CURLE_FTP_PORT_FAILED' => 'curl/curl_d.stub', 'CURLE_FTP_QUOTE_ERROR' => 'curl/curl_d.stub', 'CURLE_FTP_SSL_FAILED' => 'curl/curl_d.stub', 'CURLE_FTP_USER_PASSWORD_INCORRECT' => 'curl/curl_d.stub', 'CURLE_FTP_WEIRD_227_FORMAT' => 'curl/curl_d.stub', 'CURLE_FTP_WEIRD_PASS_REPLY' => 'curl/curl_d.stub', 'CURLE_FTP_WEIRD_PASV_REPLY' => 'curl/curl_d.stub', 'CURLE_FTP_WEIRD_SERVER_REPLY' => 'curl/curl_d.stub', 'CURLE_FTP_WEIRD_USER_REPLY' => 'curl/curl_d.stub', 'CURLE_FTP_WRITE_ERROR' => 'curl/curl_d.stub', 'CURLE_FUNCTION_NOT_FOUND' => 'curl/curl_d.stub', 'CURLE_GOT_NOTHING' => 'curl/curl_d.stub', 'CURLE_HTTP_NOT_FOUND' => 'curl/curl_d.stub', 'CURLE_HTTP_PORT_FAILED' => 'curl/curl_d.stub', 'CURLE_HTTP_POST_ERROR' => 'curl/curl_d.stub', 'CURLE_HTTP_RANGE_ERROR' => 'curl/curl_d.stub', 'CURLE_HTTP_RETURNED_ERROR' => 'curl/curl_d.stub', 'CURLE_LDAP_CANNOT_BIND' => 'curl/curl_d.stub', 'CURLE_LDAP_INVALID_URL' => 'curl/curl_d.stub', 'CURLE_LDAP_SEARCH_FAILED' => 'curl/curl_d.stub', 'CURLE_LIBRARY_NOT_FOUND' => 'curl/curl_d.stub', 'CURLE_MALFORMAT_USER' => 'curl/curl_d.stub', 'CURLE_OBSOLETE' => 'curl/curl_d.stub', 'CURLE_OK' => 'curl/curl_d.stub', 'CURLE_OPERATION_TIMEDOUT' => 'curl/curl_d.stub', 'CURLE_OPERATION_TIMEOUTED' => 'curl/curl_d.stub', 'CURLE_OUT_OF_MEMORY' => 'curl/curl_d.stub', 'CURLE_PARTIAL_FILE' => 'curl/curl_d.stub', 'CURLE_PROXY' => 'curl/curl_d.stub', 'CURLE_READ_ERROR' => 'curl/curl_d.stub', 'CURLE_RECV_ERROR' => 'curl/curl_d.stub', 'CURLE_SEND_ERROR' => 'curl/curl_d.stub', 'CURLE_SHARE_IN_USE' => 'curl/curl_d.stub', 'CURLE_SSH' => 'curl/curl_d.stub', 'CURLE_SSL_CACERT' => 'curl/curl_d.stub', 'CURLE_SSL_CACERT_BADFILE' => 'curl/curl_d.stub', 'CURLE_SSL_CERTPROBLEM' => 'curl/curl_d.stub', 'CURLE_SSL_CIPHER' => 'curl/curl_d.stub', 'CURLE_SSL_CONNECT_ERROR' => 'curl/curl_d.stub', 'CURLE_SSL_ENGINE_NOTFOUND' => 'curl/curl_d.stub', 'CURLE_SSL_ENGINE_SETFAILED' => 'curl/curl_d.stub', 'CURLE_SSL_PEER_CERTIFICATE' => 'curl/curl_d.stub', 'CURLE_SSL_PINNEDPUBKEYNOTMATCH' => 'curl/curl_d.stub', 'CURLE_TELNET_OPTION_SYNTAX' => 'curl/curl_d.stub', 'CURLE_TOO_MANY_REDIRECTS' => 'curl/curl_d.stub', 'CURLE_UNKNOWN_TELNET_OPTION' => 'curl/curl_d.stub', 'CURLE_UNSUPPORTED_PROTOCOL' => 'curl/curl_d.stub', 'CURLE_URL_MALFORMAT' => 'curl/curl_d.stub', 'CURLE_URL_MALFORMAT_USER' => 'curl/curl_d.stub', 'CURLE_WEIRD_SERVER_REPLY' => 'curl/curl_d.stub', 'CURLE_WRITE_ERROR' => 'curl/curl_d.stub', 'CURLFTPAUTH_DEFAULT' => 'curl/curl_d.stub', 'CURLFTPAUTH_SSL' => 'curl/curl_d.stub', 'CURLFTPAUTH_TLS' => 'curl/curl_d.stub', 'CURLFTPMETHOD_DEFAULT' => 'curl/curl_d.stub', 'CURLFTPMETHOD_MULTICWD' => 'curl/curl_d.stub', 'CURLFTPMETHOD_NOCWD' => 'curl/curl_d.stub', 'CURLFTPMETHOD_SINGLECWD' => 'curl/curl_d.stub', 'CURLFTPSSL_ALL' => 'curl/curl_d.stub', 'CURLFTPSSL_CCC_ACTIVE' => 'curl/curl_d.stub', 'CURLFTPSSL_CCC_NONE' => 'curl/curl_d.stub', 'CURLFTPSSL_CCC_PASSIVE' => 'curl/curl_d.stub', 'CURLFTPSSL_CONTROL' => 'curl/curl_d.stub', 'CURLFTPSSL_NONE' => 'curl/curl_d.stub', 'CURLFTPSSL_TRY' => 'curl/curl_d.stub', 'CURLFTP_CREATE_DIR' => 'curl/curl_d.stub', 'CURLFTP_CREATE_DIR_NONE' => 'curl/curl_d.stub', 'CURLFTP_CREATE_DIR_RETRY' => 'curl/curl_d.stub', 'CURLGSSAPI_DELEGATION_FLAG' => 'curl/curl_d.stub', 'CURLGSSAPI_DELEGATION_POLICY_FLAG' => 'curl/curl_d.stub', 'CURLHEADER_SEPARATE' => 'curl/curl_d.stub', 'CURLHEADER_UNIFIED' => 'curl/curl_d.stub', 'CURLHSTS_ENABLE' => 'curl/curl_d.stub', 'CURLHSTS_READONLYFILE' => 'curl/curl_d.stub', 'CURLINFO_APPCONNECT_TIME' => 'curl/curl_d.stub', 'CURLINFO_APPCONNECT_TIME_T' => 'curl/curl_d.stub', 'CURLINFO_CERTINFO' => 'curl/curl_d.stub', 'CURLINFO_CONDITION_UNMET' => 'curl/curl_d.stub', 'CURLINFO_CONNECT_TIME' => 'curl/curl_d.stub', 'CURLINFO_CONNECT_TIME_T' => 'curl/curl_d.stub', 'CURLINFO_CONTENT_LENGTH_DOWNLOAD' => 'curl/curl_d.stub', 'CURLINFO_CONTENT_LENGTH_DOWNLOAD_T' => 'curl/curl_d.stub', 'CURLINFO_CONTENT_LENGTH_UPLOAD' => 'curl/curl_d.stub', 'CURLINFO_CONTENT_LENGTH_UPLOAD_T' => 'curl/curl_d.stub', 'CURLINFO_CONTENT_TYPE' => 'curl/curl_d.stub', 'CURLINFO_COOKIELIST' => 'curl/curl_d.stub', 'CURLINFO_EFFECTIVE_METHOD' => 'curl/curl_d.stub', 'CURLINFO_EFFECTIVE_URL' => 'curl/curl_d.stub', 'CURLINFO_FILETIME' => 'curl/curl_d.stub', 'CURLINFO_FILETIME_T' => 'curl/curl_d.stub', 'CURLINFO_FTP_ENTRY_PATH' => 'curl/curl_d.stub', 'CURLINFO_HEADER_OUT' => 'curl/curl_d.stub', 'CURLINFO_HEADER_SIZE' => 'curl/curl_d.stub', 'CURLINFO_HTTPAUTH_AVAIL' => 'curl/curl_d.stub', 'CURLINFO_HTTP_CODE' => 'curl/curl_d.stub', 'CURLINFO_HTTP_CONNECTCODE' => 'curl/curl_d.stub', 'CURLINFO_HTTP_VERSION' => 'curl/curl_d.stub', 'CURLINFO_LASTONE' => 'curl/curl_d.stub', 'CURLINFO_LOCAL_IP' => 'curl/curl_d.stub', 'CURLINFO_LOCAL_PORT' => 'curl/curl_d.stub', 'CURLINFO_NAMELOOKUP_TIME' => 'curl/curl_d.stub', 'CURLINFO_NAMELOOKUP_TIME_T' => 'curl/curl_d.stub', 'CURLINFO_NUM_CONNECTS' => 'curl/curl_d.stub', 'CURLINFO_OS_ERRNO' => 'curl/curl_d.stub', 'CURLINFO_PRETRANSFER_TIME' => 'curl/curl_d.stub', 'CURLINFO_PRETRANSFER_TIME_T' => 'curl/curl_d.stub', 'CURLINFO_PRIMARY_IP' => 'curl/curl_d.stub', 'CURLINFO_PRIMARY_PORT' => 'curl/curl_d.stub', 'CURLINFO_PRIVATE' => 'curl/curl_d.stub', 'CURLINFO_PROTOCOL' => 'curl/curl_d.stub', 'CURLINFO_PROXYAUTH_AVAIL' => 'curl/curl_d.stub', 'CURLINFO_PROXY_ERROR' => 'curl/curl_d.stub', 'CURLINFO_PROXY_SSL_VERIFYRESULT' => 'curl/curl_d.stub', 'CURLINFO_REDIRECT_COUNT' => 'curl/curl_d.stub', 'CURLINFO_REDIRECT_TIME' => 'curl/curl_d.stub', 'CURLINFO_REDIRECT_TIME_T' => 'curl/curl_d.stub', 'CURLINFO_REDIRECT_URL' => 'curl/curl_d.stub', 'CURLINFO_REFERER' => 'curl/curl_d.stub', 'CURLINFO_REQUEST_SIZE' => 'curl/curl_d.stub', 'CURLINFO_RESPONSE_CODE' => 'curl/curl_d.stub', 'CURLINFO_RETRY_AFTER' => 'curl/curl_d.stub', 'CURLINFO_RTSP_CLIENT_CSEQ' => 'curl/curl_d.stub', 'CURLINFO_RTSP_CSEQ_RECV' => 'curl/curl_d.stub', 'CURLINFO_RTSP_SERVER_CSEQ' => 'curl/curl_d.stub', 'CURLINFO_RTSP_SESSION_ID' => 'curl/curl_d.stub', 'CURLINFO_SCHEME' => 'curl/curl_d.stub', 'CURLINFO_SIZE_DOWNLOAD' => 'curl/curl_d.stub', 'CURLINFO_SIZE_DOWNLOAD_T' => 'curl/curl_d.stub', 'CURLINFO_SIZE_UPLOAD' => 'curl/curl_d.stub', 'CURLINFO_SIZE_UPLOAD_T' => 'curl/curl_d.stub', 'CURLINFO_SPEED_DOWNLOAD' => 'curl/curl_d.stub', 'CURLINFO_SPEED_DOWNLOAD_T' => 'curl/curl_d.stub', 'CURLINFO_SPEED_UPLOAD' => 'curl/curl_d.stub', 'CURLINFO_SPEED_UPLOAD_T' => 'curl/curl_d.stub', 'CURLINFO_SSL_ENGINES' => 'curl/curl_d.stub', 'CURLINFO_SSL_VERIFYRESULT' => 'curl/curl_d.stub', 'CURLINFO_STARTTRANSFER_TIME' => 'curl/curl_d.stub', 'CURLINFO_STARTTRANSFER_TIME_T' => 'curl/curl_d.stub', 'CURLINFO_TOTAL_TIME' => 'curl/curl_d.stub', 'CURLINFO_TOTAL_TIME_T' => 'curl/curl_d.stub', 'CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE' => 'curl/curl_d.stub', 'CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE' => 'curl/curl_d.stub', 'CURLMOPT_MAXCONNECTS' => 'curl/curl_d.stub', 'CURLMOPT_MAX_CONCURRENT_STREAMS' => 'curl/curl_d.stub', 'CURLMOPT_MAX_HOST_CONNECTIONS' => 'curl/curl_d.stub', 'CURLMOPT_MAX_PIPELINE_LENGTH' => 'curl/curl_d.stub', 'CURLMOPT_MAX_TOTAL_CONNECTIONS' => 'curl/curl_d.stub', 'CURLMOPT_PIPELINING' => 'curl/curl_d.stub', 'CURLMOPT_PUSHFUNCTION' => 'curl/curl_d.stub', 'CURLMSG_DONE' => 'curl/curl_d.stub', 'CURLM_ADDED_ALREADY' => 'curl/curl_d.stub', 'CURLM_BAD_EASY_HANDLE' => 'curl/curl_d.stub', 'CURLM_BAD_HANDLE' => 'curl/curl_d.stub', 'CURLM_CALL_MULTI_PERFORM' => 'curl/curl_d.stub', 'CURLM_INTERNAL_ERROR' => 'curl/curl_d.stub', 'CURLM_OK' => 'curl/curl_d.stub', 'CURLM_OUT_OF_MEMORY' => 'curl/curl_d.stub', 'CURLOPT_ABSTRACT_UNIX_SOCKET' => 'curl/curl_d.stub', 'CURLOPT_ACCEPTTIMEOUT_MS' => 'curl/curl_d.stub', 'CURLOPT_ACCEPT_ENCODING' => 'curl/curl_d.stub', 'CURLOPT_ADDRESS_SCOPE' => 'curl/curl_d.stub', 'CURLOPT_ALTSVC' => 'curl/curl_d.stub', 'CURLOPT_ALTSVC_CTRL' => 'curl/curl_d.stub', 'CURLOPT_APPEND' => 'curl/curl_d.stub', 'CURLOPT_AUTOREFERER' => 'curl/curl_d.stub', 'CURLOPT_AWS_SIGV4' => 'curl/curl_d.stub', 'CURLOPT_BINARYTRANSFER' => 'curl/curl_d.stub', 'CURLOPT_BUFFERSIZE' => 'curl/curl_d.stub', 'CURLOPT_CAINFO' => 'curl/curl_d.stub', 'CURLOPT_CAINFO_BLOB' => 'curl/curl_d.stub', 'CURLOPT_CAPATH' => 'curl/curl_d.stub', 'CURLOPT_CERTINFO' => 'curl/curl_d.stub', 'CURLOPT_CLOSEPOLICY' => 'curl/curl_d.stub', 'CURLOPT_CONNECTTIMEOUT' => 'curl/curl_d.stub', 'CURLOPT_CONNECTTIMEOUT_MS' => 'curl/curl_d.stub', 'CURLOPT_CONNECT_ONLY' => 'curl/curl_d.stub', 'CURLOPT_CONNECT_TO' => 'curl/curl_d.stub', 'CURLOPT_COOKIE' => 'curl/curl_d.stub', 'CURLOPT_COOKIEFILE' => 'curl/curl_d.stub', 'CURLOPT_COOKIEJAR' => 'curl/curl_d.stub', 'CURLOPT_COOKIELIST' => 'curl/curl_d.stub', 'CURLOPT_COOKIESESSION' => 'curl/curl_d.stub', 'CURLOPT_CRLF' => 'curl/curl_d.stub', 'CURLOPT_CRLFILE' => 'curl/curl_d.stub', 'CURLOPT_CUSTOMREQUEST' => 'curl/curl_d.stub', 'CURLOPT_DEFAULT_PROTOCOL' => 'curl/curl_d.stub', 'CURLOPT_DIRLISTONLY' => 'curl/curl_d.stub', 'CURLOPT_DISALLOW_USERNAME_IN_URL' => 'curl/curl_d.stub', 'CURLOPT_DNS_CACHE_TIMEOUT' => 'curl/curl_d.stub', 'CURLOPT_DNS_INTERFACE' => 'curl/curl_d.stub', 'CURLOPT_DNS_LOCAL_IP4' => 'curl/curl_d.stub', 'CURLOPT_DNS_LOCAL_IP6' => 'curl/curl_d.stub', 'CURLOPT_DNS_SERVERS' => 'curl/curl_d.stub', 'CURLOPT_DNS_SHUFFLE_ADDRESSES' => 'curl/curl_d.stub', 'CURLOPT_DNS_USE_GLOBAL_CACHE' => 'curl/curl_d.stub', 'CURLOPT_DOH_SSL_VERIFYHOST' => 'curl/curl_d.stub', 'CURLOPT_DOH_SSL_VERIFYPEER' => 'curl/curl_d.stub', 'CURLOPT_DOH_SSL_VERIFYSTATUS' => 'curl/curl_d.stub', 'CURLOPT_DOH_URL' => 'curl/curl_d.stub', 'CURLOPT_EGDSOCKET' => 'curl/curl_d.stub', 'CURLOPT_ENCODING' => 'curl/curl_d.stub', 'CURLOPT_EXPECT_100_TIMEOUT_MS' => 'curl/curl_d.stub', 'CURLOPT_FAILONERROR' => 'curl/curl_d.stub', 'CURLOPT_FILE' => 'curl/curl_d.stub', 'CURLOPT_FILETIME' => 'curl/curl_d.stub', 'CURLOPT_FNMATCH_FUNCTION' => 'curl/curl_d.stub', 'CURLOPT_FOLLOWLOCATION' => 'curl/curl_d.stub', 'CURLOPT_FORBID_REUSE' => 'curl/curl_d.stub', 'CURLOPT_FRESH_CONNECT' => 'curl/curl_d.stub', 'CURLOPT_FTPAPPEND' => 'curl/curl_d.stub', 'CURLOPT_FTPASCII' => 'curl/curl_d.stub', 'CURLOPT_FTPLISTONLY' => 'curl/curl_d.stub', 'CURLOPT_FTPPORT' => 'curl/curl_d.stub', 'CURLOPT_FTPSSLAUTH' => 'curl/curl_d.stub', 'CURLOPT_FTP_ACCOUNT' => 'curl/curl_d.stub', 'CURLOPT_FTP_ALTERNATIVE_TO_USER' => 'curl/curl_d.stub', 'CURLOPT_FTP_CREATE_MISSING_DIRS' => 'curl/curl_d.stub', 'CURLOPT_FTP_FILEMETHOD' => 'curl/curl_d.stub', 'CURLOPT_FTP_RESPONSE_TIMEOUT' => 'curl/curl_d.stub', 'CURLOPT_FTP_SKIP_PASV_IP' => 'curl/curl_d.stub', 'CURLOPT_FTP_SSL' => 'curl/curl_d.stub', 'CURLOPT_FTP_SSL_CCC' => 'curl/curl_d.stub', 'CURLOPT_FTP_USE_EPRT' => 'curl/curl_d.stub', 'CURLOPT_FTP_USE_EPSV' => 'curl/curl_d.stub', 'CURLOPT_FTP_USE_PRET' => 'curl/curl_d.stub', 'CURLOPT_GSSAPI_DELEGATION' => 'curl/curl_d.stub', 'CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS' => 'curl/curl_d.stub', 'CURLOPT_HAPROXYPROTOCOL' => 'curl/curl_d.stub', 'CURLOPT_HEADER' => 'curl/curl_d.stub', 'CURLOPT_HEADERFUNCTION' => 'curl/curl_d.stub', 'CURLOPT_HEADEROPT' => 'curl/curl_d.stub', 'CURLOPT_HSTS' => 'curl/curl_d.stub', 'CURLOPT_HSTS_CTRL' => 'curl/curl_d.stub', 'CURLOPT_HTTP09_ALLOWED' => 'curl/curl_d.stub', 'CURLOPT_HTTP200ALIASES' => 'curl/curl_d.stub', 'CURLOPT_HTTPAUTH' => 'curl/curl_d.stub', 'CURLOPT_HTTPGET' => 'curl/curl_d.stub', 'CURLOPT_HTTPHEADER' => 'curl/curl_d.stub', 'CURLOPT_HTTPPROXYTUNNEL' => 'curl/curl_d.stub', 'CURLOPT_HTTP_CONTENT_DECODING' => 'curl/curl_d.stub', 'CURLOPT_HTTP_TRANSFER_DECODING' => 'curl/curl_d.stub', 'CURLOPT_HTTP_VERSION' => 'curl/curl_d.stub', 'CURLOPT_IGNORE_CONTENT_LENGTH' => 'curl/curl_d.stub', 'CURLOPT_INFILE' => 'curl/curl_d.stub', 'CURLOPT_INFILESIZE' => 'curl/curl_d.stub', 'CURLOPT_INTERFACE' => 'curl/curl_d.stub', 'CURLOPT_IPRESOLVE' => 'curl/curl_d.stub', 'CURLOPT_ISSUERCERT' => 'curl/curl_d.stub', 'CURLOPT_ISSUERCERT_BLOB' => 'curl/curl_d.stub', 'CURLOPT_KEEP_SENDING_ON_ERROR' => 'curl/curl_d.stub', 'CURLOPT_KEYPASSWD' => 'curl/curl_d.stub', 'CURLOPT_KRB4LEVEL' => 'curl/curl_d.stub', 'CURLOPT_KRBLEVEL' => 'curl/curl_d.stub', 'CURLOPT_LOCALPORT' => 'curl/curl_d.stub', 'CURLOPT_LOCALPORTRANGE' => 'curl/curl_d.stub', 'CURLOPT_LOGIN_OPTIONS' => 'curl/curl_d.stub', 'CURLOPT_LOW_SPEED_LIMIT' => 'curl/curl_d.stub', 'CURLOPT_LOW_SPEED_TIME' => 'curl/curl_d.stub', 'CURLOPT_MAIL_AUTH' => 'curl/curl_d.stub', 'CURLOPT_MAIL_FROM' => 'curl/curl_d.stub', 'CURLOPT_MAIL_RCPT' => 'curl/curl_d.stub', 'CURLOPT_MAIL_RCPT_ALLLOWFAILS' => 'curl/curl_d.stub', 'CURLOPT_MAXAGE_CONN' => 'curl/curl_d.stub', 'CURLOPT_MAXCONNECTS' => 'curl/curl_d.stub', 'CURLOPT_MAXFILESIZE' => 'curl/curl_d.stub', 'CURLOPT_MAXFILESIZE_LARGE' => 'curl/curl_d.stub', 'CURLOPT_MAXLIFETIME_CONN' => 'curl/curl_d.stub', 'CURLOPT_MAXREDIRS' => 'curl/curl_d.stub', 'CURLOPT_MAX_RECV_SPEED_LARGE' => 'curl/curl_d.stub', 'CURLOPT_MAX_SEND_SPEED_LARGE' => 'curl/curl_d.stub', 'CURLOPT_MUTE' => 'curl/curl_d.stub', 'CURLOPT_NETRC' => 'curl/curl_d.stub', 'CURLOPT_NETRC_FILE' => 'curl/curl_d.stub', 'CURLOPT_NEW_DIRECTORY_PERMS' => 'curl/curl_d.stub', 'CURLOPT_NEW_FILE_PERMS' => 'curl/curl_d.stub', 'CURLOPT_NOBODY' => 'curl/curl_d.stub', 'CURLOPT_NOPROGRESS' => 'curl/curl_d.stub', 'CURLOPT_NOPROXY' => 'curl/curl_d.stub', 'CURLOPT_NOSIGNAL' => 'curl/curl_d.stub', 'CURLOPT_PASSWDFUNCTION' => 'curl/curl_d.stub', 'CURLOPT_PASSWORD' => 'curl/curl_d.stub', 'CURLOPT_PATH_AS_IS' => 'curl/curl_d.stub', 'CURLOPT_PINNEDPUBLICKEY' => 'curl/curl_d.stub', 'CURLOPT_PIPEWAIT' => 'curl/curl_d.stub', 'CURLOPT_PORT' => 'curl/curl_d.stub', 'CURLOPT_POST' => 'curl/curl_d.stub', 'CURLOPT_POSTFIELDS' => 'curl/curl_d.stub', 'CURLOPT_POSTQUOTE' => 'curl/curl_d.stub', 'CURLOPT_POSTREDIR' => 'curl/curl_d.stub', 'CURLOPT_PREQUOTE' => 'curl/curl_d.stub', 'CURLOPT_PRE_PROXY' => 'curl/curl_d.stub', 'CURLOPT_PRIVATE' => 'curl/curl_d.stub', 'CURLOPT_PROGRESSFUNCTION' => 'curl/curl_d.stub', 'CURLOPT_PROTOCOLS' => 'curl/curl_d.stub', 'CURLOPT_PROXY' => 'curl/curl_d.stub', 'CURLOPT_PROXYAUTH' => 'curl/curl_d.stub', 'CURLOPT_PROXYHEADER' => 'curl/curl_d.stub', 'CURLOPT_PROXYPASSWORD' => 'curl/curl_d.stub', 'CURLOPT_PROXYPORT' => 'curl/curl_d.stub', 'CURLOPT_PROXYTYPE' => 'curl/curl_d.stub', 'CURLOPT_PROXYUSERNAME' => 'curl/curl_d.stub', 'CURLOPT_PROXYUSERPWD' => 'curl/curl_d.stub', 'CURLOPT_PROXY_CAINFO' => 'curl/curl_d.stub', 'CURLOPT_PROXY_CAINFO_BLOB' => 'curl/curl_d.stub', 'CURLOPT_PROXY_CAPATH' => 'curl/curl_d.stub', 'CURLOPT_PROXY_CRLFILE' => 'curl/curl_d.stub', 'CURLOPT_PROXY_ISSUERCERT' => 'curl/curl_d.stub', 'CURLOPT_PROXY_ISSUERCERT_BLOB' => 'curl/curl_d.stub', 'CURLOPT_PROXY_KEYPASSWD' => 'curl/curl_d.stub', 'CURLOPT_PROXY_PINNEDPUBLICKEY' => 'curl/curl_d.stub', 'CURLOPT_PROXY_SERVICE_NAME' => 'curl/curl_d.stub', 'CURLOPT_PROXY_SSLCERT' => 'curl/curl_d.stub', 'CURLOPT_PROXY_SSLCERTTYPE' => 'curl/curl_d.stub', 'CURLOPT_PROXY_SSLCERT_BLOB' => 'curl/curl_d.stub', 'CURLOPT_PROXY_SSLKEY' => 'curl/curl_d.stub', 'CURLOPT_PROXY_SSLKEYTYPE' => 'curl/curl_d.stub', 'CURLOPT_PROXY_SSLKEY_BLOB' => 'curl/curl_d.stub', 'CURLOPT_PROXY_SSLVERSION' => 'curl/curl_d.stub', 'CURLOPT_PROXY_SSL_CIPHER_LIST' => 'curl/curl_d.stub', 'CURLOPT_PROXY_SSL_OPTIONS' => 'curl/curl_d.stub', 'CURLOPT_PROXY_SSL_VERIFYHOST' => 'curl/curl_d.stub', 'CURLOPT_PROXY_SSL_VERIFYPEER' => 'curl/curl_d.stub', 'CURLOPT_PROXY_TLS13_CIPHERS' => 'curl/curl_d.stub', 'CURLOPT_PROXY_TLSAUTH_PASSWORD' => 'curl/curl_d.stub', 'CURLOPT_PROXY_TLSAUTH_TYPE' => 'curl/curl_d.stub', 'CURLOPT_PROXY_TLSAUTH_USERNAME' => 'curl/curl_d.stub', 'CURLOPT_PROXY_TRANSFER_MODE' => 'curl/curl_d.stub', 'CURLOPT_PUT' => 'curl/curl_d.stub', 'CURLOPT_QUOTE' => 'curl/curl_d.stub', 'CURLOPT_RANDOM_FILE' => 'curl/curl_d.stub', 'CURLOPT_RANGE' => 'curl/curl_d.stub', 'CURLOPT_READDATA' => 'curl/curl_d.stub', 'CURLOPT_READFUNCTION' => 'curl/curl_d.stub', 'CURLOPT_REDIR_PROTOCOLS' => 'curl/curl_d.stub', 'CURLOPT_REFERER' => 'curl/curl_d.stub', 'CURLOPT_REQUEST_TARGET' => 'curl/curl_d.stub', 'CURLOPT_RESOLVE' => 'curl/curl_d.stub', 'CURLOPT_RESUME_FROM' => 'curl/curl_d.stub', 'CURLOPT_RETURNTRANSFER' => 'curl/curl_d.stub', 'CURLOPT_RTSP_CLIENT_CSEQ' => 'curl/curl_d.stub', 'CURLOPT_RTSP_REQUEST' => 'curl/curl_d.stub', 'CURLOPT_RTSP_SERVER_CSEQ' => 'curl/curl_d.stub', 'CURLOPT_RTSP_SESSION_ID' => 'curl/curl_d.stub', 'CURLOPT_RTSP_STREAM_URI' => 'curl/curl_d.stub', 'CURLOPT_RTSP_TRANSPORT' => 'curl/curl_d.stub', 'CURLOPT_SAFE_UPLOAD' => 'curl/curl_d.stub', 'CURLOPT_SASL_AUTHZID' => 'curl/curl_d.stub', 'CURLOPT_SASL_IR' => 'curl/curl_d.stub', 'CURLOPT_SERVICE_NAME' => 'curl/curl_d.stub', 'CURLOPT_SHARE' => 'curl/curl_d.stub', 'CURLOPT_SOCKS5_AUTH' => 'curl/curl_d.stub', 'CURLOPT_SOCKS5_GSSAPI_NEC' => 'curl/curl_d.stub', 'CURLOPT_SOCKS5_GSSAPI_SERVICE' => 'curl/curl_d.stub', 'CURLOPT_SSH_AUTH_TYPES' => 'curl/curl_d.stub', 'CURLOPT_SSH_COMPRESSION' => 'curl/curl_d.stub', 'CURLOPT_SSH_HOST_PUBLIC_KEY_MD5' => 'curl/curl_d.stub', 'CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256' => 'curl/curl_d.stub', 'CURLOPT_SSH_KNOWNHOSTS' => 'curl/curl_d.stub', 'CURLOPT_SSH_PRIVATE_KEYFILE' => 'curl/curl_d.stub', 'CURLOPT_SSH_PUBLIC_KEYFILE' => 'curl/curl_d.stub', 'CURLOPT_SSLCERT' => 'curl/curl_d.stub', 'CURLOPT_SSLCERTPASSWD' => 'curl/curl_d.stub', 'CURLOPT_SSLCERTTYPE' => 'curl/curl_d.stub', 'CURLOPT_SSLCERT_BLOB' => 'curl/curl_d.stub', 'CURLOPT_SSLENGINE' => 'curl/curl_d.stub', 'CURLOPT_SSLENGINE_DEFAULT' => 'curl/curl_d.stub', 'CURLOPT_SSLKEY' => 'curl/curl_d.stub', 'CURLOPT_SSLKEYPASSWD' => 'curl/curl_d.stub', 'CURLOPT_SSLKEYTYPE' => 'curl/curl_d.stub', 'CURLOPT_SSLKEY_BLOB' => 'curl/curl_d.stub', 'CURLOPT_SSLVERSION' => 'curl/curl_d.stub', 'CURLOPT_SSL_CIPHER_LIST' => 'curl/curl_d.stub', 'CURLOPT_SSL_EC_CURVES' => 'curl/curl_d.stub', 'CURLOPT_SSL_ENABLE_ALPN' => 'curl/curl_d.stub', 'CURLOPT_SSL_ENABLE_NPN' => 'curl/curl_d.stub', 'CURLOPT_SSL_FALSESTART' => 'curl/curl_d.stub', 'CURLOPT_SSL_OPTIONS' => 'curl/curl_d.stub', 'CURLOPT_SSL_SESSIONID_CACHE' => 'curl/curl_d.stub', 'CURLOPT_SSL_VERIFYHOST' => 'curl/curl_d.stub', 'CURLOPT_SSL_VERIFYPEER' => 'curl/curl_d.stub', 'CURLOPT_SSL_VERIFYSTATUS' => 'curl/curl_d.stub', 'CURLOPT_STDERR' => 'curl/curl_d.stub', 'CURLOPT_STREAM_WEIGHT' => 'curl/curl_d.stub', 'CURLOPT_SUPPRESS_CONNECT_HEADERS' => 'curl/curl_d.stub', 'CURLOPT_TCP_FASTOPEN' => 'curl/curl_d.stub', 'CURLOPT_TCP_KEEPALIVE' => 'curl/curl_d.stub', 'CURLOPT_TCP_KEEPIDLE' => 'curl/curl_d.stub', 'CURLOPT_TCP_KEEPINTVL' => 'curl/curl_d.stub', 'CURLOPT_TCP_NODELAY' => 'curl/curl_d.stub', 'CURLOPT_TELNETOPTIONS' => 'curl/curl_d.stub', 'CURLOPT_TFTP_BLKSIZE' => 'curl/curl_d.stub', 'CURLOPT_TFTP_NO_OPTIONS' => 'curl/curl_d.stub', 'CURLOPT_TIMECONDITION' => 'curl/curl_d.stub', 'CURLOPT_TIMEOUT' => 'curl/curl_d.stub', 'CURLOPT_TIMEOUT_MS' => 'curl/curl_d.stub', 'CURLOPT_TIMEVALUE' => 'curl/curl_d.stub', 'CURLOPT_TIMEVALUE_LARGE' => 'curl/curl_d.stub', 'CURLOPT_TLS13_CIPHERS' => 'curl/curl_d.stub', 'CURLOPT_TLSAUTH_PASSWORD' => 'curl/curl_d.stub', 'CURLOPT_TLSAUTH_TYPE' => 'curl/curl_d.stub', 'CURLOPT_TLSAUTH_USERNAME' => 'curl/curl_d.stub', 'CURLOPT_TRANSFERTEXT' => 'curl/curl_d.stub', 'CURLOPT_TRANSFER_ENCODING' => 'curl/curl_d.stub', 'CURLOPT_UNIX_SOCKET_PATH' => 'curl/curl_d.stub', 'CURLOPT_UNRESTRICTED_AUTH' => 'curl/curl_d.stub', 'CURLOPT_UPKEEP_INTERVAL_MS' => 'curl/curl_d.stub', 'CURLOPT_UPLOAD' => 'curl/curl_d.stub', 'CURLOPT_UPLOAD_BUFFERSIZE' => 'curl/curl_d.stub', 'CURLOPT_URL' => 'curl/curl_d.stub', 'CURLOPT_USERAGENT' => 'curl/curl_d.stub', 'CURLOPT_USERNAME' => 'curl/curl_d.stub', 'CURLOPT_USERPWD' => 'curl/curl_d.stub', 'CURLOPT_USE_SSL' => 'curl/curl_d.stub', 'CURLOPT_VERBOSE' => 'curl/curl_d.stub', 'CURLOPT_WILDCARDMATCH' => 'curl/curl_d.stub', 'CURLOPT_WRITEFUNCTION' => 'curl/curl_d.stub', 'CURLOPT_WRITEHEADER' => 'curl/curl_d.stub', 'CURLOPT_XFERINFOFUNCTION' => 'curl/curl_d.stub', 'CURLOPT_XOAUTH2_BEARER' => 'curl/curl_d.stub', 'CURLPAUSE_ALL' => 'curl/curl_d.stub', 'CURLPAUSE_CONT' => 'curl/curl_d.stub', 'CURLPAUSE_RECV' => 'curl/curl_d.stub', 'CURLPAUSE_RECV_CONT' => 'curl/curl_d.stub', 'CURLPAUSE_SEND' => 'curl/curl_d.stub', 'CURLPAUSE_SEND_CONT' => 'curl/curl_d.stub', 'CURLPIPE_HTTP1' => 'curl/curl_d.stub', 'CURLPIPE_MULTIPLEX' => 'curl/curl_d.stub', 'CURLPIPE_NOTHING' => 'curl/curl_d.stub', 'CURLPROTO_ALL' => 'curl/curl_d.stub', 'CURLPROTO_DICT' => 'curl/curl_d.stub', 'CURLPROTO_FILE' => 'curl/curl_d.stub', 'CURLPROTO_FTP' => 'curl/curl_d.stub', 'CURLPROTO_FTPS' => 'curl/curl_d.stub', 'CURLPROTO_GOPHER' => 'curl/curl_d.stub', 'CURLPROTO_HTTP' => 'curl/curl_d.stub', 'CURLPROTO_HTTPS' => 'curl/curl_d.stub', 'CURLPROTO_IMAP' => 'curl/curl_d.stub', 'CURLPROTO_IMAPS' => 'curl/curl_d.stub', 'CURLPROTO_LDAP' => 'curl/curl_d.stub', 'CURLPROTO_LDAPS' => 'curl/curl_d.stub', 'CURLPROTO_MQTT' => 'curl/curl_d.stub', 'CURLPROTO_POP3' => 'curl/curl_d.stub', 'CURLPROTO_POP3S' => 'curl/curl_d.stub', 'CURLPROTO_RTMP' => 'curl/curl_d.stub', 'CURLPROTO_RTMPE' => 'curl/curl_d.stub', 'CURLPROTO_RTMPS' => 'curl/curl_d.stub', 'CURLPROTO_RTMPT' => 'curl/curl_d.stub', 'CURLPROTO_RTMPTE' => 'curl/curl_d.stub', 'CURLPROTO_RTMPTS' => 'curl/curl_d.stub', 'CURLPROTO_RTSP' => 'curl/curl_d.stub', 'CURLPROTO_SCP' => 'curl/curl_d.stub', 'CURLPROTO_SFTP' => 'curl/curl_d.stub', 'CURLPROTO_SMB' => 'curl/curl_d.stub', 'CURLPROTO_SMBS' => 'curl/curl_d.stub', 'CURLPROTO_SMTP' => 'curl/curl_d.stub', 'CURLPROTO_SMTPS' => 'curl/curl_d.stub', 'CURLPROTO_TELNET' => 'curl/curl_d.stub', 'CURLPROTO_TFTP' => 'curl/curl_d.stub', 'CURLPROXY_HTTP' => 'curl/curl_d.stub', 'CURLPROXY_HTTPS' => 'curl/curl_d.stub', 'CURLPROXY_HTTP_1_0' => 'curl/curl_d.stub', 'CURLPROXY_SOCKS4' => 'curl/curl_d.stub', 'CURLPROXY_SOCKS4A' => 'curl/curl_d.stub', 'CURLPROXY_SOCKS5' => 'curl/curl_d.stub', 'CURLPROXY_SOCKS5_HOSTNAME' => 'curl/curl_d.stub', 'CURLPX_BAD_ADDRESS_TYPE' => 'curl/curl_d.stub', 'CURLPX_BAD_VERSION' => 'curl/curl_d.stub', 'CURLPX_CLOSED' => 'curl/curl_d.stub', 'CURLPX_GSSAPI' => 'curl/curl_d.stub', 'CURLPX_GSSAPI_PERMSG' => 'curl/curl_d.stub', 'CURLPX_GSSAPI_PROTECTION' => 'curl/curl_d.stub', 'CURLPX_IDENTD' => 'curl/curl_d.stub', 'CURLPX_IDENTD_DIFFER' => 'curl/curl_d.stub', 'CURLPX_LONG_HOSTNAME' => 'curl/curl_d.stub', 'CURLPX_LONG_PASSWD' => 'curl/curl_d.stub', 'CURLPX_LONG_USER' => 'curl/curl_d.stub', 'CURLPX_NO_AUTH' => 'curl/curl_d.stub', 'CURLPX_OK' => 'curl/curl_d.stub', 'CURLPX_RECV_ADDRESS' => 'curl/curl_d.stub', 'CURLPX_RECV_AUTH' => 'curl/curl_d.stub', 'CURLPX_RECV_CONNECT' => 'curl/curl_d.stub', 'CURLPX_RECV_REQACK' => 'curl/curl_d.stub', 'CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED' => 'curl/curl_d.stub', 'CURLPX_REPLY_COMMAND_NOT_SUPPORTED' => 'curl/curl_d.stub', 'CURLPX_REPLY_CONNECTION_REFUSED' => 'curl/curl_d.stub', 'CURLPX_REPLY_GENERAL_SERVER_FAILURE' => 'curl/curl_d.stub', 'CURLPX_REPLY_HOST_UNREACHABLE' => 'curl/curl_d.stub', 'CURLPX_REPLY_NETWORK_UNREACHABLE' => 'curl/curl_d.stub', 'CURLPX_REPLY_NOT_ALLOWED' => 'curl/curl_d.stub', 'CURLPX_REPLY_TTL_EXPIRED' => 'curl/curl_d.stub', 'CURLPX_REPLY_UNASSIGNED' => 'curl/curl_d.stub', 'CURLPX_REQUEST_FAILED' => 'curl/curl_d.stub', 'CURLPX_RESOLVE_HOST' => 'curl/curl_d.stub', 'CURLPX_SEND_AUTH' => 'curl/curl_d.stub', 'CURLPX_SEND_CONNECT' => 'curl/curl_d.stub', 'CURLPX_SEND_REQUEST' => 'curl/curl_d.stub', 'CURLPX_UNKNOWN_FAIL' => 'curl/curl_d.stub', 'CURLPX_UNKNOWN_MODE' => 'curl/curl_d.stub', 'CURLPX_USER_REJECTED' => 'curl/curl_d.stub', 'CURLSHOPT_NONE' => 'curl/curl_d.stub', 'CURLSHOPT_SHARE' => 'curl/curl_d.stub', 'CURLSHOPT_UNSHARE' => 'curl/curl_d.stub', 'CURLSSH_AUTH_AGENT' => 'curl/curl_d.stub', 'CURLSSH_AUTH_ANY' => 'curl/curl_d.stub', 'CURLSSH_AUTH_DEFAULT' => 'curl/curl_d.stub', 'CURLSSH_AUTH_GSSAPI' => 'curl/curl_d.stub', 'CURLSSH_AUTH_HOST' => 'curl/curl_d.stub', 'CURLSSH_AUTH_KEYBOARD' => 'curl/curl_d.stub', 'CURLSSH_AUTH_NONE' => 'curl/curl_d.stub', 'CURLSSH_AUTH_PASSWORD' => 'curl/curl_d.stub', 'CURLSSH_AUTH_PUBLICKEY' => 'curl/curl_d.stub', 'CURLSSLOPT_ALLOW_BEAST' => 'curl/curl_d.stub', 'CURLSSLOPT_AUTO_CLIENT_CERT' => 'curl/curl_d.stub', 'CURLSSLOPT_NATIVE_CA' => 'curl/curl_d.stub', 'CURLSSLOPT_NO_PARTIALCHAIN' => 'curl/curl_d.stub', 'CURLSSLOPT_NO_REVOKE' => 'curl/curl_d.stub', 'CURLSSLOPT_REVOKE_BEST_EFFORT' => 'curl/curl_d.stub', 'CURLUSESSL_ALL' => 'curl/curl_d.stub', 'CURLUSESSL_CONTROL' => 'curl/curl_d.stub', 'CURLUSESSL_NONE' => 'curl/curl_d.stub', 'CURLUSESSL_TRY' => 'curl/curl_d.stub', 'CURLVERSION_NOW' => 'curl/curl_d.stub', 'CURL_FNMATCHFUNC_FAIL' => 'curl/curl_d.stub', 'CURL_FNMATCHFUNC_MATCH' => 'curl/curl_d.stub', 'CURL_FNMATCHFUNC_NOMATCH' => 'curl/curl_d.stub', 'CURL_HTTP_VERSION_1_0' => 'curl/curl_d.stub', 'CURL_HTTP_VERSION_1_1' => 'curl/curl_d.stub', 'CURL_HTTP_VERSION_2' => 'curl/curl_d.stub', 'CURL_HTTP_VERSION_2TLS' => 'curl/curl_d.stub', 'CURL_HTTP_VERSION_2_0' => 'curl/curl_d.stub', 'CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE' => 'curl/curl_d.stub', 'CURL_HTTP_VERSION_NONE' => 'curl/curl_d.stub', 'CURL_IPRESOLVE_V4' => 'curl/curl_d.stub', 'CURL_IPRESOLVE_V6' => 'curl/curl_d.stub', 'CURL_IPRESOLVE_WHATEVER' => 'curl/curl_d.stub', 'CURL_LOCK_DATA_CONNECT' => 'curl/curl_d.stub', 'CURL_LOCK_DATA_COOKIE' => 'curl/curl_d.stub', 'CURL_LOCK_DATA_DNS' => 'curl/curl_d.stub', 'CURL_LOCK_DATA_PSL' => 'curl/curl_d.stub', 'CURL_LOCK_DATA_SSL_SESSION' => 'curl/curl_d.stub', 'CURL_MAX_READ_SIZE' => 'curl/curl_d.stub', 'CURL_NETRC_IGNORED' => 'curl/curl_d.stub', 'CURL_NETRC_OPTIONAL' => 'curl/curl_d.stub', 'CURL_NETRC_REQUIRED' => 'curl/curl_d.stub', 'CURL_PUSH_DENY' => 'curl/curl_d.stub', 'CURL_PUSH_OK' => 'curl/curl_d.stub', 'CURL_READFUNC_PAUSE' => 'curl/curl_d.stub', 'CURL_REDIR_POST_301' => 'curl/curl_d.stub', 'CURL_REDIR_POST_302' => 'curl/curl_d.stub', 'CURL_REDIR_POST_303' => 'curl/curl_d.stub', 'CURL_REDIR_POST_ALL' => 'curl/curl_d.stub', 'CURL_RTSPREQ_ANNOUNCE' => 'curl/curl_d.stub', 'CURL_RTSPREQ_DESCRIBE' => 'curl/curl_d.stub', 'CURL_RTSPREQ_GET_PARAMETER' => 'curl/curl_d.stub', 'CURL_RTSPREQ_OPTIONS' => 'curl/curl_d.stub', 'CURL_RTSPREQ_PAUSE' => 'curl/curl_d.stub', 'CURL_RTSPREQ_PLAY' => 'curl/curl_d.stub', 'CURL_RTSPREQ_RECEIVE' => 'curl/curl_d.stub', 'CURL_RTSPREQ_RECORD' => 'curl/curl_d.stub', 'CURL_RTSPREQ_SETUP' => 'curl/curl_d.stub', 'CURL_RTSPREQ_SET_PARAMETER' => 'curl/curl_d.stub', 'CURL_RTSPREQ_TEARDOWN' => 'curl/curl_d.stub', 'CURL_SSLVERSION_DEFAULT' => 'curl/curl_d.stub', 'CURL_SSLVERSION_MAX_DEFAULT' => 'curl/curl_d.stub', 'CURL_SSLVERSION_MAX_NONE' => 'curl/curl_d.stub', 'CURL_SSLVERSION_MAX_TLSv1_0' => 'curl/curl_d.stub', 'CURL_SSLVERSION_MAX_TLSv1_1' => 'curl/curl_d.stub', 'CURL_SSLVERSION_MAX_TLSv1_2' => 'curl/curl_d.stub', 'CURL_SSLVERSION_MAX_TLSv1_3' => 'curl/curl_d.stub', 'CURL_SSLVERSION_SSLv2' => 'curl/curl_d.stub', 'CURL_SSLVERSION_SSLv3' => 'curl/curl_d.stub', 'CURL_SSLVERSION_TLSv1' => 'curl/curl_d.stub', 'CURL_SSLVERSION_TLSv1_0' => 'curl/curl_d.stub', 'CURL_SSLVERSION_TLSv1_1' => 'curl/curl_d.stub', 'CURL_SSLVERSION_TLSv1_2' => 'curl/curl_d.stub', 'CURL_SSLVERSION_TLSv1_3' => 'curl/curl_d.stub', 'CURL_TIMECOND_IFMODSINCE' => 'curl/curl_d.stub', 'CURL_TIMECOND_IFUNMODSINCE' => 'curl/curl_d.stub', 'CURL_TIMECOND_LASTMOD' => 'curl/curl_d.stub', 'CURL_TIMECOND_NONE' => 'curl/curl_d.stub', 'CURL_TLSAUTH_SRP' => 'curl/curl_d.stub', 'CURL_VERSION_ALTSVC' => 'curl/curl_d.stub', 'CURL_VERSION_ASYNCHDNS' => 'curl/curl_d.stub', 'CURL_VERSION_BROTLI' => 'curl/curl_d.stub', 'CURL_VERSION_CONV' => 'curl/curl_d.stub', 'CURL_VERSION_CURLDEBUG' => 'curl/curl_d.stub', 'CURL_VERSION_DEBUG' => 'curl/curl_d.stub', 'CURL_VERSION_GSASL' => 'curl/curl_d.stub', 'CURL_VERSION_GSSAPI' => 'curl/curl_d.stub', 'CURL_VERSION_GSSNEGOTIATE' => 'curl/curl_d.stub', 'CURL_VERSION_HSTS' => 'curl/curl_d.stub', 'CURL_VERSION_HTTP2' => 'curl/curl_d.stub', 'CURL_VERSION_HTTP3' => 'curl/curl_d.stub', 'CURL_VERSION_HTTPS_PROXY' => 'curl/curl_d.stub', 'CURL_VERSION_IDN' => 'curl/curl_d.stub', 'CURL_VERSION_IPV6' => 'curl/curl_d.stub', 'CURL_VERSION_KERBEROS4' => 'curl/curl_d.stub', 'CURL_VERSION_KERBEROS5' => 'curl/curl_d.stub', 'CURL_VERSION_LARGEFILE' => 'curl/curl_d.stub', 'CURL_VERSION_LIBZ' => 'curl/curl_d.stub', 'CURL_VERSION_MULTI_SSL' => 'curl/curl_d.stub', 'CURL_VERSION_NTLM' => 'curl/curl_d.stub', 'CURL_VERSION_NTLM_WB' => 'curl/curl_d.stub', 'CURL_VERSION_PSL' => 'curl/curl_d.stub', 'CURL_VERSION_SPNEGO' => 'curl/curl_d.stub', 'CURL_VERSION_SSL' => 'curl/curl_d.stub', 'CURL_VERSION_SSPI' => 'curl/curl_d.stub', 'CURL_VERSION_TLSAUTH_SRP' => 'curl/curl_d.stub', 'CURL_VERSION_UNICODE' => 'curl/curl_d.stub', 'CURL_VERSION_UNIX_SOCKETS' => 'curl/curl_d.stub', 'CURL_VERSION_ZSTD' => 'curl/curl_d.stub', 'CURL_WRITEFUNC_PAUSE' => 'curl/curl_d.stub', 'CURRENCY_SYMBOL' => 'standard/standard_defines.stub', 'CYAN' => 'winbinder/winbinder.stub', 'Calendar' => 'winbinder/winbinder.stub', 'CheckBox' => 'winbinder/winbinder.stub', 'ComboBox' => 'winbinder/winbinder.stub', 'DARKBLUE' => 'winbinder/winbinder.stub', 'DARKCYAN' => 'winbinder/winbinder.stub', 'DARKGRAY' => 'winbinder/winbinder.stub', 'DARKGREEN' => 'winbinder/winbinder.stub', 'DARKMAGENTA' => 'winbinder/winbinder.stub', 'DARKRED' => 'winbinder/winbinder.stub', 'DARKYELLOW' => 'winbinder/winbinder.stub', 'DATE_ATOM' => 'date/date_d.stub', 'DATE_COOKIE' => 'date/date_d.stub', 'DATE_ISO8601' => 'date/date_d.stub', 'DATE_ISO8601_EXPANDED' => 'date/date_d.stub', 'DATE_RFC1036' => 'date/date_d.stub', 'DATE_RFC1123' => 'date/date_d.stub', 'DATE_RFC2822' => 'date/date_d.stub', 'DATE_RFC3339' => 'date/date_d.stub', 'DATE_RFC3339_EXTENDED' => 'date/date_d.stub', 'DATE_RFC7231' => 'date/date_d.stub', 'DATE_RFC822' => 'date/date_d.stub', 'DATE_RFC850' => 'date/date_d.stub', 'DATE_RSS' => 'date/date_d.stub', 'DATE_W3C' => 'date/date_d.stub', 'DAY_1' => 'standard/standard_defines.stub', 'DAY_2' => 'standard/standard_defines.stub', 'DAY_3' => 'standard/standard_defines.stub', 'DAY_4' => 'standard/standard_defines.stub', 'DAY_5' => 'standard/standard_defines.stub', 'DAY_6' => 'standard/standard_defines.stub', 'DAY_7' => 'standard/standard_defines.stub', 'DB2_AUTOCOMMIT_OFF' => 'ibm_db2/ibm_db2.stub', 'DB2_AUTOCOMMIT_ON' => 'ibm_db2/ibm_db2.stub', 'DB2_BINARY' => 'ibm_db2/ibm_db2.stub', 'DB2_CASE_LOWER' => 'ibm_db2/ibm_db2.stub', 'DB2_CASE_NATURAL' => 'ibm_db2/ibm_db2.stub', 'DB2_CASE_UPPER' => 'ibm_db2/ibm_db2.stub', 'DB2_CHAR' => 'ibm_db2/ibm_db2.stub', 'DB2_CONVERT' => 'ibm_db2/ibm_db2.stub', 'DB2_DEFERRED_PREPARE_OFF' => 'ibm_db2/ibm_db2.stub', 'DB2_DEFERRED_PREPARE_ON' => 'ibm_db2/ibm_db2.stub', 'DB2_DOUBLE' => 'ibm_db2/ibm_db2.stub', 'DB2_FORWARD_ONLY' => 'ibm_db2/ibm_db2.stub', 'DB2_LONG' => 'ibm_db2/ibm_db2.stub', 'DB2_PARAM_FILE' => 'ibm_db2/ibm_db2.stub', 'DB2_PARAM_IN' => 'ibm_db2/ibm_db2.stub', 'DB2_PARAM_INOUT' => 'ibm_db2/ibm_db2.stub', 'DB2_PARAM_OUT' => 'ibm_db2/ibm_db2.stub', 'DB2_PASSTHRU' => 'ibm_db2/ibm_db2.stub', 'DB2_SCROLLABLE' => 'ibm_db2/ibm_db2.stub', 'DB2_XML' => 'ibm_db2/ibm_db2.stub', 'DBA_LMDB_NO_SUB_DIR' => 'dba/dba.stub', 'DBA_LMDB_USE_SUB_DIR' => 'dba/dba.stub', 'DEBUG_BACKTRACE_IGNORE_ARGS' => 'Core/Core_d.stub', 'DEBUG_BACKTRACE_PROVIDE_OBJECT' => 'Core/Core_d.stub', 'DECIMAL_POINT' => 'standard/standard_defines.stub', 'DEFAULT_INCLUDE_PATH' => 'Core/Core_d.stub', 'DIRECTORY_SEPARATOR' => 'standard/standard_defines.stub', 'DISP_E_DIVBYZERO' => 'com_dotnet/com_dotnet.stub', 'DISP_E_OVERFLOW' => 'com_dotnet/com_dotnet.stub', 'DNS_A' => 'standard/standard_defines.stub', 'DNS_A6' => 'standard/standard_defines.stub', 'DNS_AAAA' => 'standard/standard_defines.stub', 'DNS_ALL' => 'standard/standard_defines.stub', 'DNS_ANY' => 'standard/standard_defines.stub', 'DNS_CAA' => 'standard/standard_defines.stub', 'DNS_CNAME' => 'standard/standard_defines.stub', 'DNS_HINFO' => 'standard/standard_defines.stub', 'DNS_MX' => 'standard/standard_defines.stub', 'DNS_NAPTR' => 'standard/standard_defines.stub', 'DNS_NS' => 'standard/standard_defines.stub', 'DNS_PTR' => 'standard/standard_defines.stub', 'DNS_SOA' => 'standard/standard_defines.stub', 'DNS_SRV' => 'standard/standard_defines.stub', 'DNS_TXT' => 'standard/standard_defines.stub', 'DOMSTRING_SIZE_ERR' => 'dom/dom.stub', 'DOM_HIERARCHY_REQUEST_ERR' => 'dom/dom.stub', 'DOM_INDEX_SIZE_ERR' => 'dom/dom.stub', 'DOM_INUSE_ATTRIBUTE_ERR' => 'dom/dom.stub', 'DOM_INVALID_ACCESS_ERR' => 'dom/dom.stub', 'DOM_INVALID_CHARACTER_ERR' => 'dom/dom.stub', 'DOM_INVALID_MODIFICATION_ERR' => 'dom/dom.stub', 'DOM_INVALID_STATE_ERR' => 'dom/dom.stub', 'DOM_NAMESPACE_ERR' => 'dom/dom.stub', 'DOM_NOT_FOUND_ERR' => 'dom/dom.stub', 'DOM_NOT_SUPPORTED_ERR' => 'dom/dom.stub', 'DOM_NO_DATA_ALLOWED_ERR' => 'dom/dom.stub', 'DOM_NO_MODIFICATION_ALLOWED_ERR' => 'dom/dom.stub', 'DOM_PHP_ERR' => 'dom/dom.stub', 'DOM_SYNTAX_ERR' => 'dom/dom.stub', 'DOM_VALIDATION_ERR' => 'dom/dom.stub', 'DOM_WRONG_DOCUMENT_ERR' => 'dom/dom.stub', 'D_FMT' => 'standard/standard_defines.stub', 'D_T_FMT' => 'standard/standard_defines.stub', 'EIO_DEBUG' => 'eio/eio.stub', 'EIO_DT_BLK' => 'eio/eio.stub', 'EIO_DT_CHR' => 'eio/eio.stub', 'EIO_DT_CMP' => 'eio/eio.stub', 'EIO_DT_DIR' => 'eio/eio.stub', 'EIO_DT_DOOR' => 'eio/eio.stub', 'EIO_DT_FIFO' => 'eio/eio.stub', 'EIO_DT_LNK' => 'eio/eio.stub', 'EIO_DT_MAX' => 'eio/eio.stub', 'EIO_DT_MPB' => 'eio/eio.stub', 'EIO_DT_MPC' => 'eio/eio.stub', 'EIO_DT_NAM' => 'eio/eio.stub', 'EIO_DT_NWK' => 'eio/eio.stub', 'EIO_DT_REG' => 'eio/eio.stub', 'EIO_DT_SOCK' => 'eio/eio.stub', 'EIO_DT_UNKNOWN' => 'eio/eio.stub', 'EIO_DT_WHT' => 'eio/eio.stub', 'EIO_FALLOC_FL_KEEP_SIZE' => 'eio/eio.stub', 'EIO_O_APPEND' => 'eio/eio.stub', 'EIO_O_CREAT' => 'eio/eio.stub', 'EIO_O_EXCL' => 'eio/eio.stub', 'EIO_O_FSYNC' => 'eio/eio.stub', 'EIO_O_NONBLOCK' => 'eio/eio.stub', 'EIO_O_RDONLY' => 'eio/eio.stub', 'EIO_O_RDWR' => 'eio/eio.stub', 'EIO_O_TRUNC' => 'eio/eio.stub', 'EIO_O_WRONLY' => 'eio/eio.stub', 'EIO_PRI_DEFAULT' => 'eio/eio.stub', 'EIO_PRI_MAX' => 'eio/eio.stub', 'EIO_PRI_MIN' => 'eio/eio.stub', 'EIO_READDIR_DENTS' => 'eio/eio.stub', 'EIO_READDIR_DIRS_FIRST' => 'eio/eio.stub', 'EIO_READDIR_FOUND_UNKNOWN' => 'eio/eio.stub', 'EIO_READDIR_STAT_ORDER' => 'eio/eio.stub', 'EIO_SEEK_CUR' => 'eio/eio.stub', 'EIO_SEEK_END' => 'eio/eio.stub', 'EIO_SEEK_SET' => 'eio/eio.stub', 'EIO_SYNC_FILE_RANGE_WAIT_AFTER' => 'eio/eio.stub', 'EIO_SYNC_FILE_RANGE_WAIT_BEFORE' => 'eio/eio.stub', 'EIO_SYNC_FILE_RANGE_WRITE' => 'eio/eio.stub', 'EIO_S_IFBLK' => 'eio/eio.stub', 'EIO_S_IFCHR' => 'eio/eio.stub', 'EIO_S_IFIFO' => 'eio/eio.stub', 'EIO_S_IFREG' => 'eio/eio.stub', 'EIO_S_IFSOCK' => 'eio/eio.stub', 'EIO_S_IRGRP' => 'eio/eio.stub', 'EIO_S_IROTH' => 'eio/eio.stub', 'EIO_S_IRUSR' => 'eio/eio.stub', 'EIO_S_IWGRP' => 'eio/eio.stub', 'EIO_S_IWOTH' => 'eio/eio.stub', 'EIO_S_IWUSR' => 'eio/eio.stub', 'EIO_S_IXGRP' => 'eio/eio.stub', 'EIO_S_IXOTH' => 'eio/eio.stub', 'EIO_S_IXUSR' => 'eio/eio.stub', 'ENC7BIT' => 'imap/imap.stub', 'ENC8BIT' => 'imap/imap.stub', 'ENCBASE64' => 'imap/imap.stub', 'ENCBINARY' => 'imap/imap.stub', 'ENCHANT_ISPELL' => 'enchant/enchant.stub', 'ENCHANT_MYSPELL' => 'enchant/enchant.stub', 'ENCOTHER' => 'imap/imap.stub', 'ENCQUOTEDPRINTABLE' => 'imap/imap.stub', 'ENT_COMPAT' => 'standard/standard_defines.stub', 'ENT_DISALLOWED' => 'standard/standard_defines.stub', 'ENT_HTML401' => 'standard/standard_defines.stub', 'ENT_HTML5' => 'standard/standard_defines.stub', 'ENT_IGNORE' => 'standard/standard_defines.stub', 'ENT_NOQUOTES' => 'standard/standard_defines.stub', 'ENT_QUOTES' => 'standard/standard_defines.stub', 'ENT_SUBSTITUTE' => 'standard/standard_defines.stub', 'ENT_XHTML' => 'standard/standard_defines.stub', 'ENT_XML1' => 'standard/standard_defines.stub', 'ERA' => 'standard/standard_defines.stub', 'ERA_D_FMT' => 'standard/standard_defines.stub', 'ERA_D_T_FMT' => 'standard/standard_defines.stub', 'ERA_T_FMT' => 'standard/standard_defines.stub', 'ERA_YEAR' => 'standard/standard_defines.stub', 'EVBUFFER_EOF' => 'libevent/libevent.stub', 'EVBUFFER_ERROR' => 'libevent/libevent.stub', 'EVBUFFER_READ' => 'libevent/libevent.stub', 'EVBUFFER_TIMEOUT' => 'libevent/libevent.stub', 'EVBUFFER_WRITE' => 'libevent/libevent.stub', 'EVLOOP_NONBLOCK' => 'libevent/libevent.stub', 'EVLOOP_ONCE' => 'libevent/libevent.stub', 'EV_PERSIST' => 'libevent/libevent.stub', 'EV_READ' => 'libevent/libevent.stub', 'EV_SIGNAL' => 'libevent/libevent.stub', 'EV_TIMEOUT' => 'libevent/libevent.stub', 'EV_WRITE' => 'libevent/libevent.stub', 'EXIF_USE_MBSTRING' => 'exif/exif.stub', 'EXP_EOF' => 'expect/expect.stub', 'EXP_EXACT' => 'expect/expect.stub', 'EXP_FULLBUFFER' => 'expect/expect.stub', 'EXP_GLOB' => 'expect/expect.stub', 'EXP_REGEXP' => 'expect/expect.stub', 'EXP_TIMEOUT' => 'expect/expect.stub', 'EXTR_IF_EXISTS' => 'standard/standard_defines.stub', 'EXTR_OVERWRITE' => 'standard/standard_defines.stub', 'EXTR_PREFIX_ALL' => 'standard/standard_defines.stub', 'EXTR_PREFIX_IF_EXISTS' => 'standard/standard_defines.stub', 'EXTR_PREFIX_INVALID' => 'standard/standard_defines.stub', 'EXTR_PREFIX_SAME' => 'standard/standard_defines.stub', 'EXTR_REFS' => 'standard/standard_defines.stub', 'EXTR_SKIP' => 'standard/standard_defines.stub', 'E_ALL' => 'Core/Core_d.stub', 'E_COMPILE_ERROR' => 'Core/Core_d.stub', 'E_COMPILE_WARNING' => 'Core/Core_d.stub', 'E_CORE_ERROR' => 'Core/Core_d.stub', 'E_CORE_WARNING' => 'Core/Core_d.stub', 'E_DEPRECATED' => 'Core/Core_d.stub', 'E_ERROR' => 'Core/Core_d.stub', 'E_NOTICE' => 'Core/Core_d.stub', 'E_PARSE' => 'Core/Core_d.stub', 'E_RECOVERABLE_ERROR' => 'Core/Core_d.stub', 'E_STRICT' => 'Core/Core_d.stub', 'E_USER_DEPRECATED' => 'Core/Core_d.stub', 'E_USER_ERROR' => 'Core/Core_d.stub', 'E_USER_NOTICE' => 'Core/Core_d.stub', 'E_USER_WARNING' => 'Core/Core_d.stub', 'E_WARNING' => 'Core/Core_d.stub', 'EditBox' => 'winbinder/winbinder.stub', 'FANN_COS' => 'fann/fann.stub', 'FANN_COS_SYMMETRIC' => 'fann/fann.stub', 'FANN_ELLIOT' => 'fann/fann.stub', 'FANN_ELLIOT_SYMMETRIC' => 'fann/fann.stub', 'FANN_ERRORFUNC_LINEAR' => 'fann/fann.stub', 'FANN_ERRORFUNC_TANH' => 'fann/fann.stub', 'FANN_E_CANT_ALLOCATE_MEM' => 'fann/fann.stub', 'FANN_E_CANT_OPEN_CONFIG_R' => 'fann/fann.stub', 'FANN_E_CANT_OPEN_CONFIG_W' => 'fann/fann.stub', 'FANN_E_CANT_OPEN_TD_R' => 'fann/fann.stub', 'FANN_E_CANT_OPEN_TD_W' => 'fann/fann.stub', 'FANN_E_CANT_READ_CONFIG' => 'fann/fann.stub', 'FANN_E_CANT_READ_CONNECTIONS' => 'fann/fann.stub', 'FANN_E_CANT_READ_NEURON' => 'fann/fann.stub', 'FANN_E_CANT_READ_TD' => 'fann/fann.stub', 'FANN_E_CANT_TRAIN_ACTIVATION' => 'fann/fann.stub', 'FANN_E_CANT_USE_ACTIVATION' => 'fann/fann.stub', 'FANN_E_CANT_USE_TRAIN_ALG' => 'fann/fann.stub', 'FANN_E_INDEX_OUT_OF_BOUND' => 'fann/fann.stub', 'FANN_E_INPUT_NO_MATCH' => 'fann/fann.stub', 'FANN_E_NO_ERROR' => 'fann/fann.stub', 'FANN_E_OUTPUT_NO_MATCH' => 'fann/fann.stub', 'FANN_E_SCALE_NOT_PRESENT' => 'fann/fann.stub', 'FANN_E_TRAIN_DATA_MISMATCH' => 'fann/fann.stub', 'FANN_E_TRAIN_DATA_SUBSET' => 'fann/fann.stub', 'FANN_E_WRONG_CONFIG_VERSION' => 'fann/fann.stub', 'FANN_E_WRONG_NUM_CONNECTIONS' => 'fann/fann.stub', 'FANN_GAUSSIAN' => 'fann/fann.stub', 'FANN_GAUSSIAN_STEPWISE' => 'fann/fann.stub', 'FANN_GAUSSIAN_SYMMETRIC' => 'fann/fann.stub', 'FANN_LINEAR' => 'fann/fann.stub', 'FANN_LINEAR_PIECE' => 'fann/fann.stub', 'FANN_LINEAR_PIECE_SYMMETRIC' => 'fann/fann.stub', 'FANN_NETTYPE_LAYER' => 'fann/fann.stub', 'FANN_NETTYPE_SHORTCUT' => 'fann/fann.stub', 'FANN_SIGMOID' => 'fann/fann.stub', 'FANN_SIGMOID_STEPWISE' => 'fann/fann.stub', 'FANN_SIGMOID_SYMMETRIC' => 'fann/fann.stub', 'FANN_SIGMOID_SYMMETRIC_STEPWISE' => 'fann/fann.stub', 'FANN_SIN' => 'fann/fann.stub', 'FANN_SIN_SYMMETRIC' => 'fann/fann.stub', 'FANN_STOPFUNC_BIT' => 'fann/fann.stub', 'FANN_STOPFUNC_MSE' => 'fann/fann.stub', 'FANN_THRESHOLD' => 'fann/fann.stub', 'FANN_THRESHOLD_SYMMETRIC' => 'fann/fann.stub', 'FANN_TRAIN_BATCH' => 'fann/fann.stub', 'FANN_TRAIN_INCREMENTAL' => 'fann/fann.stub', 'FANN_TRAIN_QUICKPROP' => 'fann/fann.stub', 'FANN_TRAIN_RPROP' => 'fann/fann.stub', 'FANN_TRAIN_SARPROP' => 'fann/fann.stub', 'FANN_VERSION' => 'fann/fann.stub', 'FILEINFO_APPLE' => 'fileinfo/fileinfo.stub', 'FILEINFO_CONTINUE' => 'fileinfo/fileinfo.stub', 'FILEINFO_DEVICES' => 'fileinfo/fileinfo.stub', 'FILEINFO_EXTENSION' => 'fileinfo/fileinfo.stub', 'FILEINFO_MIME' => 'fileinfo/fileinfo.stub', 'FILEINFO_MIME_ENCODING' => 'fileinfo/fileinfo.stub', 'FILEINFO_MIME_TYPE' => 'fileinfo/fileinfo.stub', 'FILEINFO_NONE' => 'fileinfo/fileinfo.stub', 'FILEINFO_PRESERVE_ATIME' => 'fileinfo/fileinfo.stub', 'FILEINFO_RAW' => 'fileinfo/fileinfo.stub', 'FILEINFO_SYMLINK' => 'fileinfo/fileinfo.stub', 'FILE_APPEND' => 'standard/standard_defines.stub', 'FILE_BINARY' => 'standard/standard_defines.stub', 'FILE_IGNORE_NEW_LINES' => 'standard/standard_defines.stub', 'FILE_NO_DEFAULT_CONTEXT' => 'standard/standard_defines.stub', 'FILE_SKIP_EMPTY_LINES' => 'standard/standard_defines.stub', 'FILE_TEXT' => 'standard/standard_defines.stub', 'FILE_USE_INCLUDE_PATH' => 'standard/standard_defines.stub', 'FILTER_CALLBACK' => 'filter/filter.stub', 'FILTER_DEFAULT' => 'filter/filter.stub', 'FILTER_FLAG_ALLOW_FRACTION' => 'filter/filter.stub', 'FILTER_FLAG_ALLOW_HEX' => 'filter/filter.stub', 'FILTER_FLAG_ALLOW_OCTAL' => 'filter/filter.stub', 'FILTER_FLAG_ALLOW_SCIENTIFIC' => 'filter/filter.stub', 'FILTER_FLAG_ALLOW_THOUSAND' => 'filter/filter.stub', 'FILTER_FLAG_EMAIL_UNICODE' => 'filter/filter.stub', 'FILTER_FLAG_EMPTY_STRING_NULL' => 'filter/filter.stub', 'FILTER_FLAG_ENCODE_AMP' => 'filter/filter.stub', 'FILTER_FLAG_ENCODE_HIGH' => 'filter/filter.stub', 'FILTER_FLAG_ENCODE_LOW' => 'filter/filter.stub', 'FILTER_FLAG_GLOBAL_RANGE' => 'filter/filter.stub', 'FILTER_FLAG_HOSTNAME' => 'filter/filter.stub', 'FILTER_FLAG_HOST_REQUIRED' => 'filter/filter.stub', 'FILTER_FLAG_IPV4' => 'filter/filter.stub', 'FILTER_FLAG_IPV6' => 'filter/filter.stub', 'FILTER_FLAG_NONE' => 'filter/filter.stub', 'FILTER_FLAG_NO_ENCODE_QUOTES' => 'filter/filter.stub', 'FILTER_FLAG_NO_PRIV_RANGE' => 'filter/filter.stub', 'FILTER_FLAG_NO_RES_RANGE' => 'filter/filter.stub', 'FILTER_FLAG_PATH_REQUIRED' => 'filter/filter.stub', 'FILTER_FLAG_QUERY_REQUIRED' => 'filter/filter.stub', 'FILTER_FLAG_SCHEME_REQUIRED' => 'filter/filter.stub', 'FILTER_FLAG_STRIP_BACKTICK' => 'filter/filter.stub', 'FILTER_FLAG_STRIP_HIGH' => 'filter/filter.stub', 'FILTER_FLAG_STRIP_LOW' => 'filter/filter.stub', 'FILTER_FORCE_ARRAY' => 'filter/filter.stub', 'FILTER_NULL_ON_FAILURE' => 'filter/filter.stub', 'FILTER_REQUIRE_ARRAY' => 'filter/filter.stub', 'FILTER_REQUIRE_SCALAR' => 'filter/filter.stub', 'FILTER_SANITIZE_ADD_SLASHES' => 'filter/filter.stub', 'FILTER_SANITIZE_EMAIL' => 'filter/filter.stub', 'FILTER_SANITIZE_ENCODED' => 'filter/filter.stub', 'FILTER_SANITIZE_FULL_SPECIAL_CHARS' => 'filter/filter.stub', 'FILTER_SANITIZE_MAGIC_QUOTES' => 'filter/filter.stub', 'FILTER_SANITIZE_NUMBER_FLOAT' => 'filter/filter.stub', 'FILTER_SANITIZE_NUMBER_INT' => 'filter/filter.stub', 'FILTER_SANITIZE_SPECIAL_CHARS' => 'filter/filter.stub', 'FILTER_SANITIZE_STRING' => 'filter/filter.stub', 'FILTER_SANITIZE_STRIPPED' => 'filter/filter.stub', 'FILTER_SANITIZE_URL' => 'filter/filter.stub', 'FILTER_UNSAFE_RAW' => 'filter/filter.stub', 'FILTER_VALIDATE_BOOL' => 'filter/filter.stub', 'FILTER_VALIDATE_BOOLEAN' => 'filter/filter.stub', 'FILTER_VALIDATE_DOMAIN' => 'filter/filter.stub', 'FILTER_VALIDATE_EMAIL' => 'filter/filter.stub', 'FILTER_VALIDATE_FLOAT' => 'filter/filter.stub', 'FILTER_VALIDATE_INT' => 'filter/filter.stub', 'FILTER_VALIDATE_IP' => 'filter/filter.stub', 'FILTER_VALIDATE_MAC' => 'filter/filter.stub', 'FILTER_VALIDATE_REGEXP' => 'filter/filter.stub', 'FILTER_VALIDATE_URL' => 'filter/filter.stub', 'FNM_CASEFOLD' => 'standard/standard_defines.stub', 'FNM_NOESCAPE' => 'standard/standard_defines.stub', 'FNM_PATHNAME' => 'standard/standard_defines.stub', 'FNM_PERIOD' => 'standard/standard_defines.stub', 'FORCE_DEFLATE' => 'zlib/zlib.stub', 'FORCE_GZIP' => 'zlib/zlib.stub', 'FPE_FLTDIV' => 'pcntl/pcntl.stub', 'FPE_FLTINV' => 'pcntl/pcntl.stub', 'FPE_FLTOVF' => 'pcntl/pcntl.stub', 'FPE_FLTRES' => 'pcntl/pcntl.stub', 'FPE_FLTSUB' => 'pcntl/pcntl.stub', 'FPE_FLTUND' => 'pcntl/pcntl.stub', 'FPE_INTDIV' => 'pcntl/pcntl.stub', 'FPE_INTOVF' => 'pcntl/pcntl.stub', 'FRAC_DIGITS' => 'standard/standard_defines.stub', 'FTA_BOLD' => 'winbinder/winbinder.stub', 'FTA_ITALIC' => 'winbinder/winbinder.stub', 'FTA_NORMAL' => 'winbinder/winbinder.stub', 'FTA_REGULAR' => 'winbinder/winbinder.stub', 'FTA_STRIKEOUT' => 'winbinder/winbinder.stub', 'FTA_UNDERLINE' => 'winbinder/winbinder.stub', 'FTP_ASCII' => 'ftp/ftp.stub', 'FTP_AUTORESUME' => 'ftp/ftp.stub', 'FTP_AUTOSEEK' => 'ftp/ftp.stub', 'FTP_BINARY' => 'ftp/ftp.stub', 'FTP_FAILED' => 'ftp/ftp.stub', 'FTP_FINISHED' => 'ftp/ftp.stub', 'FTP_IMAGE' => 'ftp/ftp.stub', 'FTP_MOREDATA' => 'ftp/ftp.stub', 'FTP_TEXT' => 'ftp/ftp.stub', 'FTP_TIMEOUT_SEC' => 'ftp/ftp.stub', 'FTP_USEPASVADDRESS' => 'ftp/ftp.stub', 'FT_INTERNAL' => 'imap/imap.stub', 'FT_NOT' => 'imap/imap.stub', 'FT_PEEK' => 'imap/imap.stub', 'FT_PREFETCHTEXT' => 'imap/imap.stub', 'FT_UID' => 'imap/imap.stub', 'F_DUPFD' => 'dio/dio_d.stub', 'F_GETFD' => 'dio/dio_d.stub', 'F_GETFL' => 'dio/dio_d.stub', 'F_GETLK' => 'dio/dio_d.stub', 'F_GETOWN' => 'dio/dio_d.stub', 'F_RDLCK' => 'dio/dio_d.stub', 'F_SETFL' => 'dio/dio_d.stub', 'F_SETLK' => 'dio/dio_d.stub', 'F_SETLKW' => 'dio/dio_d.stub', 'F_SETOWN' => 'dio/dio_d.stub', 'F_UNLCK' => 'dio/dio_d.stub', 'F_WRLCK' => 'dio/dio_d.stub', 'Frame' => 'winbinder/winbinder.stub', 'GD_BUNDLED' => 'gd/gd.stub', 'GD_EXTRA_VERSION' => 'gd/gd.stub', 'GD_MAJOR_VERSION' => 'gd/gd.stub', 'GD_MINOR_VERSION' => 'gd/gd.stub', 'GD_RELEASE_VERSION' => 'gd/gd.stub', 'GD_VERSION' => 'gd/gd.stub', 'GEARMAN_ARGS_BUFFER_SIZE' => 'gearman/gearman.stub', 'GEARMAN_CLIENT_ALLOCATED' => 'gearman/gearman.stub', 'GEARMAN_CLIENT_FREE_TASKS' => 'gearman/gearman.stub', 'GEARMAN_CLIENT_NON_BLOCKING' => 'gearman/gearman.stub', 'GEARMAN_CLIENT_NO_NEW' => 'gearman/gearman.stub', 'GEARMAN_CLIENT_STATE_IDLE' => 'gearman/gearman.stub', 'GEARMAN_CLIENT_STATE_NEW' => 'gearman/gearman.stub', 'GEARMAN_CLIENT_STATE_PACKET' => 'gearman/gearman.stub', 'GEARMAN_CLIENT_STATE_SUBMIT' => 'gearman/gearman.stub', 'GEARMAN_CLIENT_TASK_IN_USE' => 'gearman/gearman.stub', 'GEARMAN_CLIENT_UNBUFFERED_RESULT' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_ALL_YOURS' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_CANT_DO' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_CAN_DO' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_CAN_DO_TIMEOUT' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_ECHO_REQ' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_ECHO_RES' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_ERROR' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_GET_STATUS' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_GRAB_JOB' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_GRAB_JOB_UNIQ' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_JOB_ASSIGN' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_JOB_ASSIGN_UNIQ' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_JOB_CREATED' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_MAX' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_NOOP' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_NO_JOB' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_OPTION_REQ' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_OPTION_RES' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_PRE_SLEEP' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_RESET_ABILITIES' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_SET_CLIENT_ID' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_STATUS_RES' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_SUBMIT_JOB' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_SUBMIT_JOB_BG' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_SUBMIT_JOB_EPOCH' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_SUBMIT_JOB_HIGH' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_SUBMIT_JOB_HIGH_BG' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_SUBMIT_JOB_LOW' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_SUBMIT_JOB_LOW_BG' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_SUBMIT_JOB_SCHED' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_TEXT' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_UNUSED' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_WORK_COMPLETE' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_WORK_DATA' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_WORK_EXCEPTION' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_WORK_FAIL' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_WORK_STATUS' => 'gearman/gearman.stub', 'GEARMAN_COMMAND_WORK_WARNING' => 'gearman/gearman.stub', 'GEARMAN_CON_CLOSE_AFTER_FLUSH' => 'gearman/gearman.stub', 'GEARMAN_CON_EXTERNAL_FD' => 'gearman/gearman.stub', 'GEARMAN_CON_IGNORE_LOST_CONNECTION' => 'gearman/gearman.stub', 'GEARMAN_CON_PACKET_IN_USE' => 'gearman/gearman.stub', 'GEARMAN_CON_READY' => 'gearman/gearman.stub', 'GEARMAN_CON_RECV_STATE_READ_DATA' => 'gearman/gearman.stub', 'GEARMAN_CON_SEND_STATE_NONE' => 'gearman/gearman.stub', 'GEARMAN_COULD_NOT_CONNECT' => 'gearman/gearman.stub', 'GEARMAN_DATA_TOO_LARGE' => 'gearman/gearman.stub', 'GEARMAN_DEFAULT_SOCKET_RECV_SIZE' => 'gearman/gearman.stub', 'GEARMAN_DEFAULT_SOCKET_SEND_SIZE' => 'gearman/gearman.stub', 'GEARMAN_DEFAULT_SOCKET_TIMEOUT' => 'gearman/gearman.stub', 'GEARMAN_DEFAULT_TCP_HOST' => 'gearman/gearman.stub', 'GEARMAN_DEFAULT_TCP_PORT' => 'gearman/gearman.stub', 'GEARMAN_DONT_TRACK_PACKETS' => 'gearman/gearman.stub', 'GEARMAN_ECHO_DATA_CORRUPTION' => 'gearman/gearman.stub', 'GEARMAN_ERRNO' => 'gearman/gearman.stub', 'GEARMAN_EVENT' => 'gearman/gearman.stub', 'GEARMAN_FLUSH_DATA' => 'gearman/gearman.stub', 'GEARMAN_GETADDRINFO' => 'gearman/gearman.stub', 'GEARMAN_IGNORE_PACKET' => 'gearman/gearman.stub', 'GEARMAN_INVALID_COMMAND' => 'gearman/gearman.stub', 'GEARMAN_INVALID_FUNCTION_NAME' => 'gearman/gearman.stub', 'GEARMAN_INVALID_MAGIC' => 'gearman/gearman.stub', 'GEARMAN_INVALID_PACKET' => 'gearman/gearman.stub', 'GEARMAN_INVALID_WORKER_FUNCTION' => 'gearman/gearman.stub', 'GEARMAN_IO_WAIT' => 'gearman/gearman.stub', 'GEARMAN_JOB_EXISTS' => 'gearman/gearman.stub', 'GEARMAN_JOB_HANDLE_SIZE' => 'gearman/gearman.stub', 'GEARMAN_JOB_PRIORITY_HIGH' => 'gearman/gearman.stub', 'GEARMAN_JOB_PRIORITY_LOW' => 'gearman/gearman.stub', 'GEARMAN_JOB_PRIORITY_MAX' => 'gearman/gearman.stub', 'GEARMAN_JOB_PRIORITY_NORMAL' => 'gearman/gearman.stub', 'GEARMAN_JOB_QUEUE_FULL' => 'gearman/gearman.stub', 'GEARMAN_LOST_CONNECTION' => 'gearman/gearman.stub', 'GEARMAN_MAGIC_REQUEST' => 'gearman/gearman.stub', 'GEARMAN_MAGIC_RESPONSE' => 'gearman/gearman.stub', 'GEARMAN_MAGIC_TEXT' => 'gearman/gearman.stub', 'GEARMAN_MAX_COMMAND_ARGS' => 'gearman/gearman.stub', 'GEARMAN_MAX_ERROR_SIZE' => 'gearman/gearman.stub', 'GEARMAN_MAX_RETURN' => 'gearman/gearman.stub', 'GEARMAN_MEMORY_ALLOCATION_FAILURE' => 'gearman/gearman.stub', 'GEARMAN_NEED_WORKLOAD_FN' => 'gearman/gearman.stub', 'GEARMAN_NON_BLOCKING' => 'gearman/gearman.stub', 'GEARMAN_NOT_CONNECTED' => 'gearman/gearman.stub', 'GEARMAN_NOT_FLUSHING' => 'gearman/gearman.stub', 'GEARMAN_NO_ACTIVE_FDS' => 'gearman/gearman.stub', 'GEARMAN_NO_JOBS' => 'gearman/gearman.stub', 'GEARMAN_NO_REGISTERED_FUNCTIONS' => 'gearman/gearman.stub', 'GEARMAN_NO_SERVERS' => 'gearman/gearman.stub', 'GEARMAN_OPTION_SIZE' => 'gearman/gearman.stub', 'GEARMAN_PACKET_HEADER_SIZE' => 'gearman/gearman.stub', 'GEARMAN_PAUSE' => 'gearman/gearman.stub', 'GEARMAN_PIPE_EOF' => 'gearman/gearman.stub', 'GEARMAN_PTHREAD' => 'gearman/gearman.stub', 'GEARMAN_QUEUE_ERROR' => 'gearman/gearman.stub', 'GEARMAN_RECV_BUFFER_SIZE' => 'gearman/gearman.stub', 'GEARMAN_RECV_IN_PROGRESS' => 'gearman/gearman.stub', 'GEARMAN_SEND_BUFFER_SIZE' => 'gearman/gearman.stub', 'GEARMAN_SEND_BUFFER_TOO_SMALL' => 'gearman/gearman.stub', 'GEARMAN_SEND_IN_PROGRESS' => 'gearman/gearman.stub', 'GEARMAN_SERVER_ERROR' => 'gearman/gearman.stub', 'GEARMAN_SHUTDOWN' => 'gearman/gearman.stub', 'GEARMAN_SHUTDOWN_GRACEFUL' => 'gearman/gearman.stub', 'GEARMAN_SUCCESS' => 'gearman/gearman.stub', 'GEARMAN_TASK_STATE_COMPLETE' => 'gearman/gearman.stub', 'GEARMAN_TASK_STATE_CREATED' => 'gearman/gearman.stub', 'GEARMAN_TASK_STATE_DATA' => 'gearman/gearman.stub', 'GEARMAN_TASK_STATE_EXCEPTION' => 'gearman/gearman.stub', 'GEARMAN_TASK_STATE_FAIL' => 'gearman/gearman.stub', 'GEARMAN_TASK_STATE_FINISHED' => 'gearman/gearman.stub', 'GEARMAN_TASK_STATE_NEW' => 'gearman/gearman.stub', 'GEARMAN_TASK_STATE_STATUS' => 'gearman/gearman.stub', 'GEARMAN_TASK_STATE_SUBMIT' => 'gearman/gearman.stub', 'GEARMAN_TASK_STATE_WARNING' => 'gearman/gearman.stub', 'GEARMAN_TASK_STATE_WORK' => 'gearman/gearman.stub', 'GEARMAN_TASK_STATE_WORKLOAD' => 'gearman/gearman.stub', 'GEARMAN_TIMEOUT' => 'gearman/gearman.stub', 'GEARMAN_TOO_MANY_ARGS' => 'gearman/gearman.stub', 'GEARMAN_UNEXPECTED_PACKET' => 'gearman/gearman.stub', 'GEARMAN_UNIQUE_SIZE' => 'gearman/gearman.stub', 'GEARMAN_UNKNOWN_OPTION' => 'gearman/gearman.stub', 'GEARMAN_UNKNOWN_STATE' => 'gearman/gearman.stub', 'GEARMAN_VERBOSE_CRAZY' => 'gearman/gearman.stub', 'GEARMAN_VERBOSE_DEBUG' => 'gearman/gearman.stub', 'GEARMAN_VERBOSE_ERROR' => 'gearman/gearman.stub', 'GEARMAN_VERBOSE_FATAL' => 'gearman/gearman.stub', 'GEARMAN_VERBOSE_INFO' => 'gearman/gearman.stub', 'GEARMAN_VERBOSE_MAX' => 'gearman/gearman.stub', 'GEARMAN_VERBOSE_NEVER' => 'gearman/gearman.stub', 'GEARMAN_WORKER_ALLOCATED' => 'gearman/gearman.stub', 'GEARMAN_WORKER_CHANGE' => 'gearman/gearman.stub', 'GEARMAN_WORKER_GRAB_JOB_IN_USE' => 'gearman/gearman.stub', 'GEARMAN_WORKER_GRAB_UNIQ' => 'gearman/gearman.stub', 'GEARMAN_WORKER_NON_BLOCKING' => 'gearman/gearman.stub', 'GEARMAN_WORKER_PACKET_INIT' => 'gearman/gearman.stub', 'GEARMAN_WORKER_PRE_SLEEP_IN_USE' => 'gearman/gearman.stub', 'GEARMAN_WORKER_STATE_CONNECT' => 'gearman/gearman.stub', 'GEARMAN_WORKER_STATE_FUNCTION_SEND' => 'gearman/gearman.stub', 'GEARMAN_WORKER_STATE_GRAB_JOB_RECV' => 'gearman/gearman.stub', 'GEARMAN_WORKER_STATE_GRAB_JOB_SEND' => 'gearman/gearman.stub', 'GEARMAN_WORKER_STATE_PRE_SLEEP' => 'gearman/gearman.stub', 'GEARMAN_WORKER_STATE_START' => 'gearman/gearman.stub', 'GEARMAN_WORKER_TIMEOUT_RETURN' => 'gearman/gearman.stub', 'GEARMAN_WORKER_WAIT_TIMEOUT' => 'gearman/gearman.stub', 'GEARMAN_WORKER_WORK_JOB_IN_USE' => 'gearman/gearman.stub', 'GEARMAN_WORK_DATA' => 'gearman/gearman.stub', 'GEARMAN_WORK_ERROR' => 'gearman/gearman.stub', 'GEARMAN_WORK_EXCEPTION' => 'gearman/gearman.stub', 'GEARMAN_WORK_FAIL' => 'gearman/gearman.stub', 'GEARMAN_WORK_STATUS' => 'gearman/gearman.stub', 'GEARMAN_WORK_WARNING' => 'gearman/gearman.stub', 'GEOIP_ASNUM_EDITION' => 'geoip/geoip.stub', 'GEOIP_CABLEDSL_SPEED' => 'geoip/geoip.stub', 'GEOIP_CITY_EDITION_REV0' => 'geoip/geoip.stub', 'GEOIP_CITY_EDITION_REV1' => 'geoip/geoip.stub', 'GEOIP_CORPORATE_SPEED' => 'geoip/geoip.stub', 'GEOIP_COUNTRY_EDITION' => 'geoip/geoip.stub', 'GEOIP_DIALUP_SPEED' => 'geoip/geoip.stub', 'GEOIP_DOMAIN_EDITION' => 'geoip/geoip.stub', 'GEOIP_ISP_EDITION' => 'geoip/geoip.stub', 'GEOIP_NETSPEED_EDITION' => 'geoip/geoip.stub', 'GEOIP_ORG_EDITION' => 'geoip/geoip.stub', 'GEOIP_PROXY_EDITION' => 'geoip/geoip.stub', 'GEOIP_REGION_EDITION_REV0' => 'geoip/geoip.stub', 'GEOIP_REGION_EDITION_REV1' => 'geoip/geoip.stub', 'GEOIP_UNKNOWN_SPEED' => 'geoip/geoip.stub', 'GEOSBUF_CAP_FLAT' => 'geos/geos.stub', 'GEOSBUF_CAP_ROUND' => 'geos/geos.stub', 'GEOSBUF_CAP_SQUARE' => 'geos/geos.stub', 'GEOSBUF_JOIN_BEVEL' => 'geos/geos.stub', 'GEOSBUF_JOIN_MITRE' => 'geos/geos.stub', 'GEOSBUF_JOIN_ROUND' => 'geos/geos.stub', 'GEOSRELATE_BNR_ENDPOINT' => 'geos/geos.stub', 'GEOSRELATE_BNR_MOD2' => 'geos/geos.stub', 'GEOSRELATE_BNR_MONOVALENT_ENDPOINT' => 'geos/geos.stub', 'GEOSRELATE_BNR_MULTIVALENT_ENDPOINT' => 'geos/geos.stub', 'GEOSRELATE_BNR_OGC' => 'geos/geos.stub', 'GEOSVALID_ALLOW_SELFTOUCHING_RING_FORMING_HOLE' => 'geos/geos.stub', 'GEOS_GEOMETRYCOLLECTION' => 'geos/geos.stub', 'GEOS_LINEARRING' => 'geos/geos.stub', 'GEOS_LINESTRING' => 'geos/geos.stub', 'GEOS_MULTILINESTRING' => 'geos/geos.stub', 'GEOS_MULTIPOINT' => 'geos/geos.stub', 'GEOS_MULTIPOLYGON' => 'geos/geos.stub', 'GEOS_POINT' => 'geos/geos.stub', 'GEOS_POLYGON' => 'geos/geos.stub', 'GLOB_AVAILABLE_FLAGS' => 'standard/standard_defines.stub', 'GLOB_BRACE' => 'standard/standard_defines.stub', 'GLOB_ERR' => 'standard/standard_defines.stub', 'GLOB_MARK' => 'standard/standard_defines.stub', 'GLOB_NOCHECK' => 'standard/standard_defines.stub', 'GLOB_NOESCAPE' => 'standard/standard_defines.stub', 'GLOB_NOSORT' => 'standard/standard_defines.stub', 'GLOB_ONLYDIR' => 'standard/standard_defines.stub', 'GMP_BIG_ENDIAN' => 'gmp/gmp.stub', 'GMP_LITTLE_ENDIAN' => 'gmp/gmp.stub', 'GMP_LSW_FIRST' => 'gmp/gmp.stub', 'GMP_MPIR_VERSION' => 'gmp/gmp.stub', 'GMP_MSW_FIRST' => 'gmp/gmp.stub', 'GMP_NATIVE_ENDIAN' => 'gmp/gmp.stub', 'GMP_ROUND_MINUSINF' => 'gmp/gmp.stub', 'GMP_ROUND_PLUSINF' => 'gmp/gmp.stub', 'GMP_ROUND_ZERO' => 'gmp/gmp.stub', 'GMP_VERSION' => 'gmp/gmp.stub', 'GNUPG_ERROR_EXCEPTION' => 'gnupg/gnupg.stub', 'GNUPG_ERROR_SILENT' => 'gnupg/gnupg.stub', 'GNUPG_ERROR_WARNING' => 'gnupg/gnupg.stub', 'GNUPG_GPGME_VERSION' => 'gnupg/gnupg.stub', 'GNUPG_PK_DSA' => 'gnupg/gnupg.stub', 'GNUPG_PK_ECC' => 'gnupg/gnupg.stub', 'GNUPG_PK_ECDH' => 'gnupg/gnupg.stub', 'GNUPG_PK_ECDSA' => 'gnupg/gnupg.stub', 'GNUPG_PK_EDDSA' => 'gnupg/gnupg.stub', 'GNUPG_PK_ELG' => 'gnupg/gnupg.stub', 'GNUPG_PK_ELG_E' => 'gnupg/gnupg.stub', 'GNUPG_PK_RSA' => 'gnupg/gnupg.stub', 'GNUPG_PK_RSA_E' => 'gnupg/gnupg.stub', 'GNUPG_PK_RSA_S' => 'gnupg/gnupg.stub', 'GNUPG_PROTOCOL_CMS' => 'gnupg/gnupg.stub', 'GNUPG_PROTOCOL_OpenPGP' => 'gnupg/gnupg.stub', 'GNUPG_SIGSUM_BAD_POLICY' => 'gnupg/gnupg.stub', 'GNUPG_SIGSUM_CRL_MISSING' => 'gnupg/gnupg.stub', 'GNUPG_SIGSUM_CRL_TOO_OLD' => 'gnupg/gnupg.stub', 'GNUPG_SIGSUM_GREEN' => 'gnupg/gnupg.stub', 'GNUPG_SIGSUM_KEY_EXPIRED' => 'gnupg/gnupg.stub', 'GNUPG_SIGSUM_KEY_MISSING' => 'gnupg/gnupg.stub', 'GNUPG_SIGSUM_KEY_REVOKED' => 'gnupg/gnupg.stub', 'GNUPG_SIGSUM_RED' => 'gnupg/gnupg.stub', 'GNUPG_SIGSUM_SIG_EXPIRED' => 'gnupg/gnupg.stub', 'GNUPG_SIGSUM_SYS_ERROR' => 'gnupg/gnupg.stub', 'GNUPG_SIGSUM_VALID' => 'gnupg/gnupg.stub', 'GNUPG_SIG_MODE_CLEAR' => 'gnupg/gnupg.stub', 'GNUPG_SIG_MODE_DETACH' => 'gnupg/gnupg.stub', 'GNUPG_SIG_MODE_NORMAL' => 'gnupg/gnupg.stub', 'GNUPG_VALIDITY_FULL' => 'gnupg/gnupg.stub', 'GNUPG_VALIDITY_MARGINAL' => 'gnupg/gnupg.stub', 'GNUPG_VALIDITY_NEVER' => 'gnupg/gnupg.stub', 'GNUPG_VALIDITY_ULTIMATE' => 'gnupg/gnupg.stub', 'GNUPG_VALIDITY_UNDEFINED' => 'gnupg/gnupg.stub', 'GNUPG_VALIDITY_UNKNOWN' => 'gnupg/gnupg.stub', 'GRAPHEME_EXTR_COUNT' => 'intl/intl.stub', 'GRAPHEME_EXTR_MAXBYTES' => 'intl/intl.stub', 'GRAPHEME_EXTR_MAXCHARS' => 'intl/intl.stub', 'GREEN' => 'winbinder/winbinder.stub', 'GROUPING' => 'standard/standard_defines.stub', 'Gauge' => 'winbinder/winbinder.stub', 'Grpc\\CALL_ERROR' => 'grpc/grpc.stub', 'Grpc\\CALL_ERROR_ALREADY_ACCEPTED' => 'grpc/grpc.stub', 'Grpc\\CALL_ERROR_ALREADY_FINISHED' => 'grpc/grpc.stub', 'Grpc\\CALL_ERROR_ALREADY_INVOKED' => 'grpc/grpc.stub', 'Grpc\\CALL_ERROR_BATCH_TOO_BIG' => 'grpc/grpc.stub', 'Grpc\\CALL_ERROR_INVALID_FLAGS' => 'grpc/grpc.stub', 'Grpc\\CALL_ERROR_INVALID_MESSAGE' => 'grpc/grpc.stub', 'Grpc\\CALL_ERROR_INVALID_METADATA' => 'grpc/grpc.stub', 'Grpc\\CALL_ERROR_NOT_INVOKED' => 'grpc/grpc.stub', 'Grpc\\CALL_ERROR_NOT_ON_CLIENT' => 'grpc/grpc.stub', 'Grpc\\CALL_ERROR_NOT_ON_SERVER' => 'grpc/grpc.stub', 'Grpc\\CALL_ERROR_NOT_SERVER_COMPLETION_QUEUE' => 'grpc/grpc.stub', 'Grpc\\CALL_ERROR_PAYLOAD_TYPE_MISMATCH' => 'grpc/grpc.stub', 'Grpc\\CALL_ERROR_TOO_MANY_OPERATIONS' => 'grpc/grpc.stub', 'Grpc\\CALL_OK' => 'grpc/grpc.stub', 'Grpc\\CHANNEL_CONNECTING' => 'grpc/grpc.stub', 'Grpc\\CHANNEL_FATAL_FAILURE' => 'grpc/grpc.stub', 'Grpc\\CHANNEL_IDLE' => 'grpc/grpc.stub', 'Grpc\\CHANNEL_READY' => 'grpc/grpc.stub', 'Grpc\\CHANNEL_SHUTDOWN' => 'grpc/grpc.stub', 'Grpc\\CHANNEL_TRANSIENT_FAILURE' => 'grpc/grpc.stub', 'Grpc\\OP_RECV_CLOSE_ON_SERVER' => 'grpc/grpc.stub', 'Grpc\\OP_RECV_INITIAL_METADATA' => 'grpc/grpc.stub', 'Grpc\\OP_RECV_MESSAGE' => 'grpc/grpc.stub', 'Grpc\\OP_RECV_STATUS_ON_CLIENT' => 'grpc/grpc.stub', 'Grpc\\OP_SEND_CLOSE_FROM_CLIENT' => 'grpc/grpc.stub', 'Grpc\\OP_SEND_INITIAL_METADATA' => 'grpc/grpc.stub', 'Grpc\\OP_SEND_MESSAGE' => 'grpc/grpc.stub', 'Grpc\\OP_SEND_STATUS_FROM_SERVER' => 'grpc/grpc.stub', 'Grpc\\STATUS_ABORTED' => 'grpc/grpc.stub', 'Grpc\\STATUS_ALREADY_EXISTS' => 'grpc/grpc.stub', 'Grpc\\STATUS_CANCELLED' => 'grpc/grpc.stub', 'Grpc\\STATUS_DATA_LOSS' => 'grpc/grpc.stub', 'Grpc\\STATUS_DEADLINE_EXCEEDED' => 'grpc/grpc.stub', 'Grpc\\STATUS_FAILED_PRECONDITION' => 'grpc/grpc.stub', 'Grpc\\STATUS_INTERNAL' => 'grpc/grpc.stub', 'Grpc\\STATUS_INVALID_ARGUMENT' => 'grpc/grpc.stub', 'Grpc\\STATUS_NOT_FOUND' => 'grpc/grpc.stub', 'Grpc\\STATUS_OK' => 'grpc/grpc.stub', 'Grpc\\STATUS_OUT_OF_RANGE' => 'grpc/grpc.stub', 'Grpc\\STATUS_PERMISSION_DENIED' => 'grpc/grpc.stub', 'Grpc\\STATUS_RESOURCE_EXHAUSTED' => 'grpc/grpc.stub', 'Grpc\\STATUS_UNAUTHENTICATED' => 'grpc/grpc.stub', 'Grpc\\STATUS_UNAVAILABLE' => 'grpc/grpc.stub', 'Grpc\\STATUS_UNIMPLEMENTED' => 'grpc/grpc.stub', 'Grpc\\STATUS_UNKNOWN' => 'grpc/grpc.stub', 'Grpc\\WRITE_BUFFER_HINT' => 'grpc/grpc.stub', 'Grpc\\WRITE_NO_COMPRESS' => 'grpc/grpc.stub', 'HASH_HMAC' => 'hash/hash.stub', 'HTMLControl' => 'winbinder/winbinder.stub', 'HTML_ENTITIES' => 'standard/standard_defines.stub', 'HTML_SPECIALCHARS' => 'standard/standard_defines.stub', 'HTTP_AUTH_ANY' => 'http/http.stub', 'HTTP_AUTH_BASIC' => 'http/http.stub', 'HTTP_AUTH_DIGEST' => 'http/http.stub', 'HTTP_AUTH_GSSNEG' => 'http/http.stub', 'HTTP_AUTH_NTLM' => 'http/http.stub', 'HTTP_COOKIE_HTTPONLY' => 'http/http.stub', 'HTTP_COOKIE_PARSE_RAW' => 'http/http.stub', 'HTTP_COOKIE_SECURE' => 'http/http.stub', 'HTTP_DEFLATE_LEVEL_DEF' => 'http/http.stub', 'HTTP_DEFLATE_LEVEL_MAX' => 'http/http.stub', 'HTTP_DEFLATE_LEVEL_MIN' => 'http/http.stub', 'HTTP_DEFLATE_STRATEGY_DEF' => 'http/http.stub', 'HTTP_DEFLATE_STRATEGY_FILT' => 'http/http.stub', 'HTTP_DEFLATE_STRATEGY_FIXED' => 'http/http.stub', 'HTTP_DEFLATE_STRATEGY_HUFF' => 'http/http.stub', 'HTTP_DEFLATE_STRATEGY_RLE' => 'http/http.stub', 'HTTP_DEFLATE_TYPE_GZIP' => 'http/http.stub', 'HTTP_DEFLATE_TYPE_RAW' => 'http/http.stub', 'HTTP_DEFLATE_TYPE_ZLIB' => 'http/http.stub', 'HTTP_ENCODING_STREAM_FLUSH_FULL' => 'http/http.stub', 'HTTP_ENCODING_STREAM_FLUSH_NONE' => 'http/http.stub', 'HTTP_ENCODING_STREAM_FLUSH_SYNC' => 'http/http.stub', 'HTTP_E_ENCODING' => 'http/http.stub', 'HTTP_E_HEADER' => 'http/http.stub', 'HTTP_E_INVALID_PARAM' => 'http/http.stub', 'HTTP_E_MALFORMED_HEADERS' => 'http/http.stub', 'HTTP_E_MESSAGE_TYPE' => 'http/http.stub', 'HTTP_E_QUERYSTRING' => 'http/http.stub', 'HTTP_E_REQUEST' => 'http/http.stub', 'HTTP_E_REQUEST_METHOD' => 'http/http.stub', 'HTTP_E_REQUEST_POOL' => 'http/http.stub', 'HTTP_E_RESPONSE' => 'http/http.stub', 'HTTP_E_RUNTIME' => 'http/http.stub', 'HTTP_E_SOCKET' => 'http/http.stub', 'HTTP_E_URL' => 'http/http.stub', 'HTTP_IPRESOLVE_ANY' => 'http/http.stub', 'HTTP_IPRESOLVE_V4' => 'http/http.stub', 'HTTP_IPRESOLVE_V6' => 'http/http.stub', 'HTTP_METH_ACL' => 'http/http.stub', 'HTTP_METH_BASELINE_CONTROL' => 'http/http.stub', 'HTTP_METH_CHECKIN' => 'http/http.stub', 'HTTP_METH_CHECKOUT' => 'http/http.stub', 'HTTP_METH_CONNECT' => 'http/http.stub', 'HTTP_METH_COPY' => 'http/http.stub', 'HTTP_METH_DELETE' => 'http/http.stub', 'HTTP_METH_GET' => 'http/http.stub', 'HTTP_METH_HEAD' => 'http/http.stub', 'HTTP_METH_LABEL' => 'http/http.stub', 'HTTP_METH_LOCK' => 'http/http.stub', 'HTTP_METH_MERGE' => 'http/http.stub', 'HTTP_METH_MKACTIVITY' => 'http/http.stub', 'HTTP_METH_MKCOL' => 'http/http.stub', 'HTTP_METH_MKWORKSPACE' => 'http/http.stub', 'HTTP_METH_MOVE' => 'http/http.stub', 'HTTP_METH_OPTIONS' => 'http/http.stub', 'HTTP_METH_POST' => 'http/http.stub', 'HTTP_METH_PROPFIND' => 'http/http.stub', 'HTTP_METH_PROPPATCH' => 'http/http.stub', 'HTTP_METH_PUT' => 'http/http.stub', 'HTTP_METH_REPORT' => 'http/http.stub', 'HTTP_METH_TRACE' => 'http/http.stub', 'HTTP_METH_UNCHECKOUT' => 'http/http.stub', 'HTTP_METH_UNLOCK' => 'http/http.stub', 'HTTP_METH_UPDATE' => 'http/http.stub', 'HTTP_METH_VERSION_CONTROL' => 'http/http.stub', 'HTTP_MSG_NONE' => 'http/http.stub', 'HTTP_MSG_REQUEST' => 'http/http.stub', 'HTTP_MSG_RESPONSE' => 'http/http.stub', 'HTTP_PARAMS_ALLOW_COMMA' => 'http/http.stub', 'HTTP_PARAMS_ALLOW_FAILURE' => 'http/http.stub', 'HTTP_PARAMS_DEFAULT' => 'http/http.stub', 'HTTP_PARAMS_RAISE_ERROR' => 'http/http.stub', 'HTTP_PROXY_HTTP' => 'http/http.stub', 'HTTP_PROXY_SOCKS4' => 'http/http.stub', 'HTTP_PROXY_SOCKS5' => 'http/http.stub', 'HTTP_QUERYSTRING_TYPE_ARRAY' => 'http/http.stub', 'HTTP_QUERYSTRING_TYPE_BOOL' => 'http/http.stub', 'HTTP_QUERYSTRING_TYPE_FLOAT' => 'http/http.stub', 'HTTP_QUERYSTRING_TYPE_INT' => 'http/http.stub', 'HTTP_QUERYSTRING_TYPE_OBJECT' => 'http/http.stub', 'HTTP_QUERYSTRING_TYPE_STRING' => 'http/http.stub', 'HTTP_REDIRECT' => 'http/http.stub', 'HTTP_REDIRECT_FOUND' => 'http/http.stub', 'HTTP_REDIRECT_PERM' => 'http/http.stub', 'HTTP_REDIRECT_POST' => 'http/http.stub', 'HTTP_REDIRECT_PROXY' => 'http/http.stub', 'HTTP_REDIRECT_TEMP' => 'http/http.stub', 'HTTP_SSL_VERSION_ANY' => 'http/http.stub', 'HTTP_SSL_VERSION_SSLv2' => 'http/http.stub', 'HTTP_SSL_VERSION_SSLv3' => 'http/http.stub', 'HTTP_SSL_VERSION_TLSv1' => 'http/http.stub', 'HTTP_SUPPORT' => 'http/http.stub', 'HTTP_SUPPORT_ENCODINGS' => 'http/http.stub', 'HTTP_SUPPORT_EVENTS' => 'http/http.stub', 'HTTP_SUPPORT_MAGICMIME' => 'http/http.stub', 'HTTP_SUPPORT_REQUESTS' => 'http/http.stub', 'HTTP_SUPPORT_SSLREQUESTS' => 'http/http.stub', 'HTTP_URL_FROM_ENV' => 'http/http.stub', 'HTTP_URL_JOIN_PATH' => 'http/http.stub', 'HTTP_URL_JOIN_QUERY' => 'http/http.stub', 'HTTP_URL_REPLACE' => 'http/http.stub', 'HTTP_URL_STRIP_ALL' => 'http/http.stub', 'HTTP_URL_STRIP_AUTH' => 'http/http.stub', 'HTTP_URL_STRIP_FRAGMENT' => 'http/http.stub', 'HTTP_URL_STRIP_PASS' => 'http/http.stub', 'HTTP_URL_STRIP_PATH' => 'http/http.stub', 'HTTP_URL_STRIP_PORT' => 'http/http.stub', 'HTTP_URL_STRIP_QUERY' => 'http/http.stub', 'HTTP_URL_STRIP_USER' => 'http/http.stub', 'HTTP_VERSION_1_0' => 'http/http.stub', 'HTTP_VERSION_1_1' => 'http/http.stub', 'HTTP_VERSION_ANY' => 'http/http.stub', 'HTTP_VERSION_NONE' => 'http/http.stub', 'HyperLink' => 'winbinder/winbinder.stub', 'IBASE_BKP_CONVERT' => 'interbase/interbase.stub', 'IBASE_BKP_IGNORE_CHECKSUMS' => 'interbase/interbase.stub', 'IBASE_BKP_IGNORE_LIMBO' => 'interbase/interbase.stub', 'IBASE_BKP_METADATA_ONLY' => 'interbase/interbase.stub', 'IBASE_BKP_NON_TRANSPORTABLE' => 'interbase/interbase.stub', 'IBASE_BKP_NO_GARBAGE_COLLECT' => 'interbase/interbase.stub', 'IBASE_BKP_OLD_DESCRIPTIONS' => 'interbase/interbase.stub', 'IBASE_COMMITTED' => 'interbase/interbase.stub', 'IBASE_CONCURRENCY' => 'interbase/interbase.stub', 'IBASE_CONSISTENCY' => 'interbase/interbase.stub', 'IBASE_CREATE' => 'interbase/interbase.stub', 'IBASE_DEFAULT' => 'interbase/interbase.stub', 'IBASE_FETCH_ARRAYS' => 'interbase/interbase.stub', 'IBASE_FETCH_BLOBS' => 'interbase/interbase.stub', 'IBASE_NOWAIT' => 'interbase/interbase.stub', 'IBASE_PRP_ACCESS_MODE' => 'interbase/interbase.stub', 'IBASE_PRP_ACTIVATE' => 'interbase/interbase.stub', 'IBASE_PRP_AM_READONLY' => 'interbase/interbase.stub', 'IBASE_PRP_AM_READWRITE' => 'interbase/interbase.stub', 'IBASE_PRP_DB_ONLINE' => 'interbase/interbase.stub', 'IBASE_PRP_DENY_NEW_ATTACHMENTS' => 'interbase/interbase.stub', 'IBASE_PRP_DENY_NEW_TRANSACTIONS' => 'interbase/interbase.stub', 'IBASE_PRP_PAGE_BUFFERS' => 'interbase/interbase.stub', 'IBASE_PRP_RES' => 'interbase/interbase.stub', 'IBASE_PRP_RESERVE_SPACE' => 'interbase/interbase.stub', 'IBASE_PRP_RES_USE_FULL' => 'interbase/interbase.stub', 'IBASE_PRP_SET_SQL_DIALECT' => 'interbase/interbase.stub', 'IBASE_PRP_SHUTDOWN_DB' => 'interbase/interbase.stub', 'IBASE_PRP_SWEEP_INTERVAL' => 'interbase/interbase.stub', 'IBASE_PRP_WM_ASYNC' => 'interbase/interbase.stub', 'IBASE_PRP_WM_SYNC' => 'interbase/interbase.stub', 'IBASE_PRP_WRITE_MODE' => 'interbase/interbase.stub', 'IBASE_READ' => 'interbase/interbase.stub', 'IBASE_REC_NO_VERSION' => 'interbase/interbase.stub', 'IBASE_REC_VERSION' => 'interbase/interbase.stub', 'IBASE_RES_CREATE' => 'interbase/interbase.stub', 'IBASE_RES_DEACTIVATE_IDX' => 'interbase/interbase.stub', 'IBASE_RES_NO_SHADOW' => 'interbase/interbase.stub', 'IBASE_RES_NO_VALIDITY' => 'interbase/interbase.stub', 'IBASE_RES_ONE_AT_A_TIME' => 'interbase/interbase.stub', 'IBASE_RES_REPLACE' => 'interbase/interbase.stub', 'IBASE_RES_USE_ALL_SPACE' => 'interbase/interbase.stub', 'IBASE_RPR_CHECK_DB' => 'interbase/interbase.stub', 'IBASE_RPR_FULL' => 'interbase/interbase.stub', 'IBASE_RPR_IGNORE_CHECKSUM' => 'interbase/interbase.stub', 'IBASE_RPR_KILL_SHADOWS' => 'interbase/interbase.stub', 'IBASE_RPR_MEND_DB' => 'interbase/interbase.stub', 'IBASE_RPR_SWEEP_DB' => 'interbase/interbase.stub', 'IBASE_RPR_VALIDATE_DB' => 'interbase/interbase.stub', 'IBASE_STS_DATA_PAGES' => 'interbase/interbase.stub', 'IBASE_STS_DB_LOG' => 'interbase/interbase.stub', 'IBASE_STS_HDR_PAGES' => 'interbase/interbase.stub', 'IBASE_STS_IDX_PAGES' => 'interbase/interbase.stub', 'IBASE_STS_SYS_RELATIONS' => 'interbase/interbase.stub', 'IBASE_SVC_GET_ENV' => 'interbase/interbase.stub', 'IBASE_SVC_GET_ENV_LOCK' => 'interbase/interbase.stub', 'IBASE_SVC_GET_ENV_MSG' => 'interbase/interbase.stub', 'IBASE_SVC_GET_USERS' => 'interbase/interbase.stub', 'IBASE_SVC_IMPLEMENTATION' => 'interbase/interbase.stub', 'IBASE_SVC_SERVER_VERSION' => 'interbase/interbase.stub', 'IBASE_SVC_SVR_DB_INFO' => 'interbase/interbase.stub', 'IBASE_SVC_USER_DBPATH' => 'interbase/interbase.stub', 'IBASE_TEXT' => 'interbase/interbase.stub', 'IBASE_UNIXTIME' => 'interbase/interbase.stub', 'IBASE_WAIT' => 'interbase/interbase.stub', 'IBASE_WRITE' => 'interbase/interbase.stub', 'ICONV_IMPL' => 'iconv/iconv.stub', 'ICONV_MIME_DECODE_CONTINUE_ON_ERROR' => 'iconv/iconv.stub', 'ICONV_MIME_DECODE_STRICT' => 'iconv/iconv.stub', 'ICONV_VERSION' => 'iconv/iconv.stub', 'IDABORT' => 'winbinder/winbinder.stub', 'IDCANCEL' => 'winbinder/winbinder.stub', 'IDCLOSE' => 'winbinder/winbinder.stub', 'IDDEFAULT' => 'winbinder/winbinder.stub', 'IDHELP' => 'winbinder/winbinder.stub', 'IDIGNORE' => 'winbinder/winbinder.stub', 'IDNA_ALLOW_UNASSIGNED' => 'intl/intl.stub', 'IDNA_CHECK_BIDI' => 'intl/intl.stub', 'IDNA_CHECK_CONTEXTJ' => 'intl/intl.stub', 'IDNA_DEFAULT' => 'intl/intl.stub', 'IDNA_ERROR_BIDI' => 'intl/intl.stub', 'IDNA_ERROR_CONTEXTJ' => 'intl/intl.stub', 'IDNA_ERROR_DISALLOWED' => 'intl/intl.stub', 'IDNA_ERROR_DOMAIN_NAME_TOO_LONG' => 'intl/intl.stub', 'IDNA_ERROR_EMPTY_LABEL' => 'intl/intl.stub', 'IDNA_ERROR_HYPHEN_3_4' => 'intl/intl.stub', 'IDNA_ERROR_INVALID_ACE_LABEL' => 'intl/intl.stub', 'IDNA_ERROR_LABEL_HAS_DOT' => 'intl/intl.stub', 'IDNA_ERROR_LABEL_TOO_LONG' => 'intl/intl.stub', 'IDNA_ERROR_LEADING_COMBINING_MARK' => 'intl/intl.stub', 'IDNA_ERROR_LEADING_HYPHEN' => 'intl/intl.stub', 'IDNA_ERROR_PUNYCODE' => 'intl/intl.stub', 'IDNA_ERROR_TRAILING_HYPHEN' => 'intl/intl.stub', 'IDNA_NONTRANSITIONAL_TO_ASCII' => 'intl/intl.stub', 'IDNA_NONTRANSITIONAL_TO_UNICODE' => 'intl/intl.stub', 'IDNA_USE_STD3_RULES' => 'intl/intl.stub', 'IDNO' => 'winbinder/winbinder.stub', 'IDOK' => 'winbinder/winbinder.stub', 'IDRETRY' => 'winbinder/winbinder.stub', 'IDYES' => 'winbinder/winbinder.stub', 'ILL_BADSTK' => 'pcntl/pcntl.stub', 'ILL_COPROC' => 'pcntl/pcntl.stub', 'ILL_ILLADR' => 'pcntl/pcntl.stub', 'ILL_ILLOPC' => 'pcntl/pcntl.stub', 'ILL_ILLOPN' => 'pcntl/pcntl.stub', 'ILL_ILLTRP' => 'pcntl/pcntl.stub', 'ILL_PRVOPC' => 'pcntl/pcntl.stub', 'ILL_PRVREG' => 'pcntl/pcntl.stub', 'IMAGETYPE_AVIF' => 'standard/standard_defines.stub', 'IMAGETYPE_BMP' => 'standard/standard_defines.stub', 'IMAGETYPE_COUNT' => 'standard/standard_defines.stub', 'IMAGETYPE_GIF' => 'standard/standard_defines.stub', 'IMAGETYPE_ICO' => 'standard/standard_defines.stub', 'IMAGETYPE_IFF' => 'standard/standard_defines.stub', 'IMAGETYPE_JB2' => 'standard/standard_defines.stub', 'IMAGETYPE_JP2' => 'standard/standard_defines.stub', 'IMAGETYPE_JPC' => 'standard/standard_defines.stub', 'IMAGETYPE_JPEG' => 'standard/standard_defines.stub', 'IMAGETYPE_JPEG2000' => 'standard/standard_defines.stub', 'IMAGETYPE_JPX' => 'standard/standard_defines.stub', 'IMAGETYPE_PNG' => 'standard/standard_defines.stub', 'IMAGETYPE_PSD' => 'standard/standard_defines.stub', 'IMAGETYPE_SWC' => 'standard/standard_defines.stub', 'IMAGETYPE_SWF' => 'standard/standard_defines.stub', 'IMAGETYPE_TIFF_II' => 'standard/standard_defines.stub', 'IMAGETYPE_TIFF_MM' => 'standard/standard_defines.stub', 'IMAGETYPE_UNKNOWN' => 'standard/standard_defines.stub', 'IMAGETYPE_WBMP' => 'standard/standard_defines.stub', 'IMAGETYPE_WEBP' => 'standard/standard_defines.stub', 'IMAGETYPE_XBM' => 'standard/standard_defines.stub', 'IMAP_CLOSETIMEOUT' => 'imap/imap.stub', 'IMAP_GC_ELT' => 'imap/imap.stub', 'IMAP_GC_ENV' => 'imap/imap.stub', 'IMAP_GC_TEXTS' => 'imap/imap.stub', 'IMAP_OPENTIMEOUT' => 'imap/imap.stub', 'IMAP_READTIMEOUT' => 'imap/imap.stub', 'IMAP_WRITETIMEOUT' => 'imap/imap.stub', 'IMG_AFFINE_ROTATE' => 'gd/gd.stub', 'IMG_AFFINE_SCALE' => 'gd/gd.stub', 'IMG_AFFINE_SHEAR_HORIZONTAL' => 'gd/gd.stub', 'IMG_AFFINE_SHEAR_VERTICAL' => 'gd/gd.stub', 'IMG_AFFINE_TRANSLATE' => 'gd/gd.stub', 'IMG_ARC_CHORD' => 'gd/gd.stub', 'IMG_ARC_EDGED' => 'gd/gd.stub', 'IMG_ARC_NOFILL' => 'gd/gd.stub', 'IMG_ARC_PIE' => 'gd/gd.stub', 'IMG_ARC_ROUNDED' => 'gd/gd.stub', 'IMG_AVIF' => 'gd/gd.stub', 'IMG_BELL' => 'gd/gd.stub', 'IMG_BESSEL' => 'gd/gd.stub', 'IMG_BICUBIC' => 'gd/gd.stub', 'IMG_BICUBIC_FIXED' => 'gd/gd.stub', 'IMG_BILINEAR_FIXED' => 'gd/gd.stub', 'IMG_BLACKMAN' => 'gd/gd.stub', 'IMG_BMP' => 'gd/gd.stub', 'IMG_BOX' => 'gd/gd.stub', 'IMG_BSPLINE' => 'gd/gd.stub', 'IMG_CATMULLROM' => 'gd/gd.stub', 'IMG_COLOR_BRUSHED' => 'gd/gd.stub', 'IMG_COLOR_STYLED' => 'gd/gd.stub', 'IMG_COLOR_STYLEDBRUSHED' => 'gd/gd.stub', 'IMG_COLOR_TILED' => 'gd/gd.stub', 'IMG_COLOR_TRANSPARENT' => 'gd/gd.stub', 'IMG_CROP_BLACK' => 'gd/gd.stub', 'IMG_CROP_DEFAULT' => 'gd/gd.stub', 'IMG_CROP_SIDES' => 'gd/gd.stub', 'IMG_CROP_THRESHOLD' => 'gd/gd.stub', 'IMG_CROP_TRANSPARENT' => 'gd/gd.stub', 'IMG_CROP_WHITE' => 'gd/gd.stub', 'IMG_EFFECT_ALPHABLEND' => 'gd/gd.stub', 'IMG_EFFECT_MULTIPLY' => 'gd/gd.stub', 'IMG_EFFECT_NORMAL' => 'gd/gd.stub', 'IMG_EFFECT_OVERLAY' => 'gd/gd.stub', 'IMG_EFFECT_REPLACE' => 'gd/gd.stub', 'IMG_FILTER_BRIGHTNESS' => 'gd/gd.stub', 'IMG_FILTER_COLORIZE' => 'gd/gd.stub', 'IMG_FILTER_CONTRAST' => 'gd/gd.stub', 'IMG_FILTER_EDGEDETECT' => 'gd/gd.stub', 'IMG_FILTER_EMBOSS' => 'gd/gd.stub', 'IMG_FILTER_GAUSSIAN_BLUR' => 'gd/gd.stub', 'IMG_FILTER_GRAYSCALE' => 'gd/gd.stub', 'IMG_FILTER_MEAN_REMOVAL' => 'gd/gd.stub', 'IMG_FILTER_NEGATE' => 'gd/gd.stub', 'IMG_FILTER_PIXELATE' => 'gd/gd.stub', 'IMG_FILTER_SCATTER' => 'gd/gd.stub', 'IMG_FILTER_SELECTIVE_BLUR' => 'gd/gd.stub', 'IMG_FILTER_SMOOTH' => 'gd/gd.stub', 'IMG_FLIP_BOTH' => 'gd/gd.stub', 'IMG_FLIP_HORIZONTAL' => 'gd/gd.stub', 'IMG_FLIP_VERTICAL' => 'gd/gd.stub', 'IMG_GAUSSIAN' => 'gd/gd.stub', 'IMG_GD2_COMPRESSED' => 'gd/gd.stub', 'IMG_GD2_RAW' => 'gd/gd.stub', 'IMG_GENERALIZED_CUBIC' => 'gd/gd.stub', 'IMG_GIF' => 'gd/gd.stub', 'IMG_HAMMING' => 'gd/gd.stub', 'IMG_HANNING' => 'gd/gd.stub', 'IMG_HERMITE' => 'gd/gd.stub', 'IMG_JPEG' => 'gd/gd.stub', 'IMG_JPG' => 'gd/gd.stub', 'IMG_MITCHELL' => 'gd/gd.stub', 'IMG_NEAREST_NEIGHBOUR' => 'gd/gd.stub', 'IMG_PNG' => 'gd/gd.stub', 'IMG_POWER' => 'gd/gd.stub', 'IMG_QUADRATIC' => 'gd/gd.stub', 'IMG_SINC' => 'gd/gd.stub', 'IMG_TGA' => 'gd/gd.stub', 'IMG_TRIANGLE' => 'gd/gd.stub', 'IMG_WBMP' => 'gd/gd.stub', 'IMG_WEBP' => 'gd/gd.stub', 'IMG_WEBP_LOSSLESS' => 'gd/gd.stub', 'IMG_WEIGHTED4' => 'gd/gd.stub', 'IMG_XPM' => 'gd/gd.stub', 'INF' => 'standard/standard_defines.stub', 'INFO_ALL' => 'standard/standard_defines.stub', 'INFO_CONFIGURATION' => 'standard/standard_defines.stub', 'INFO_CREDITS' => 'standard/standard_defines.stub', 'INFO_ENVIRONMENT' => 'standard/standard_defines.stub', 'INFO_GENERAL' => 'standard/standard_defines.stub', 'INFO_LICENSE' => 'standard/standard_defines.stub', 'INFO_MODULES' => 'standard/standard_defines.stub', 'INFO_VARIABLES' => 'standard/standard_defines.stub', 'INI_ALL' => 'standard/standard_defines.stub', 'INI_PERDIR' => 'standard/standard_defines.stub', 'INI_SCANNER_NORMAL' => 'standard/standard_defines.stub', 'INI_SCANNER_RAW' => 'standard/standard_defines.stub', 'INI_SCANNER_TYPED' => 'standard/standard_defines.stub', 'INI_SYSTEM' => 'standard/standard_defines.stub', 'INI_USER' => 'standard/standard_defines.stub', 'INPUT_COOKIE' => 'filter/filter.stub', 'INPUT_ENV' => 'filter/filter.stub', 'INPUT_GET' => 'filter/filter.stub', 'INPUT_POST' => 'filter/filter.stub', 'INPUT_REQUEST' => 'filter/filter.stub', 'INPUT_SERVER' => 'filter/filter.stub', 'INPUT_SESSION' => 'filter/filter.stub', 'INTL_ICU_DATA_VERSION' => 'intl/intl.stub', 'INTL_ICU_VERSION' => 'intl/intl.stub', 'INTL_IDNA_VARIANT_2003' => 'intl/intl.stub', 'INTL_IDNA_VARIANT_UTS46' => 'intl/intl.stub', 'INTL_MAX_LOCALE_LEN' => 'intl/intl.stub', 'INT_CURR_SYMBOL' => 'standard/standard_defines.stub', 'INT_FRAC_DIGITS' => 'standard/standard_defines.stub', 'IN_ACCESS' => 'inotify/inotify.stub', 'IN_ALL_EVENTS' => 'inotify/inotify.stub', 'IN_ATTRIB' => 'inotify/inotify.stub', 'IN_CLOSE' => 'inotify/inotify.stub', 'IN_CLOSE_NOWRITE' => 'inotify/inotify.stub', 'IN_CLOSE_WRITE' => 'inotify/inotify.stub', 'IN_CREATE' => 'inotify/inotify.stub', 'IN_DELETE' => 'inotify/inotify.stub', 'IN_DELETE_SELF' => 'inotify/inotify.stub', 'IN_DONT_FOLLOW' => 'inotify/inotify.stub', 'IN_IGNORED' => 'inotify/inotify.stub', 'IN_ISDIR' => 'inotify/inotify.stub', 'IN_MASK_ADD' => 'inotify/inotify.stub', 'IN_MODIFY' => 'inotify/inotify.stub', 'IN_MOVE' => 'inotify/inotify.stub', 'IN_MOVED_FROM' => 'inotify/inotify.stub', 'IN_MOVED_TO' => 'inotify/inotify.stub', 'IN_MOVE_SELF' => 'inotify/inotify.stub', 'IN_ONESHOT' => 'inotify/inotify.stub', 'IN_ONLYDIR' => 'inotify/inotify.stub', 'IN_OPEN' => 'inotify/inotify.stub', 'IN_Q_OVERFLOW' => 'inotify/inotify.stub', 'IN_UNMOUNT' => 'inotify/inotify.stub', 'IPPROTO_IP' => 'sockets/sockets.stub', 'IPPROTO_IPV6' => 'sockets/sockets.stub', 'IPV6_HOPLIMIT' => 'sockets/sockets.stub', 'IPV6_MULTICAST_HOPS' => 'sockets/sockets.stub', 'IPV6_MULTICAST_IF' => 'sockets/sockets.stub', 'IPV6_MULTICAST_LOOP' => 'sockets/sockets.stub', 'IPV6_PKTINFO' => 'sockets/sockets.stub', 'IPV6_RECVHOPLIMIT' => 'sockets/sockets.stub', 'IPV6_RECVPKTINFO' => 'sockets/sockets.stub', 'IPV6_RECVTCLASS' => 'sockets/sockets.stub', 'IPV6_TCLASS' => 'sockets/sockets.stub', 'IPV6_UNICAST_HOPS' => 'sockets/sockets.stub', 'IPV6_V6ONLY' => 'sockets/sockets.stub', 'IP_MULTICAST_IF' => 'sockets/sockets.stub', 'IP_MULTICAST_LOOP' => 'sockets/sockets.stub', 'IP_MULTICAST_TTL' => 'sockets/sockets.stub', 'ImageButton' => 'winbinder/winbinder.stub', 'InvisibleArea' => 'winbinder/winbinder.stub', 'JOB_QUEUE_PRIORITY_HIGH' => 'zend/zend_d.stub', 'JOB_QUEUE_PRIORITY_LOW' => 'zend/zend_d.stub', 'JOB_QUEUE_PRIORITY_NORMAL' => 'zend/zend_d.stub', 'JOB_QUEUE_PRIORITY_URGENT' => 'zend/zend_d.stub', 'JOB_QUEUE_SAVE_COOKIE' => 'zend/zend_d.stub', 'JOB_QUEUE_SAVE_ENV' => 'zend/zend_d.stub', 'JOB_QUEUE_SAVE_FILES' => 'zend/zend_d.stub', 'JOB_QUEUE_SAVE_GET' => 'zend/zend_d.stub', 'JOB_QUEUE_SAVE_POST' => 'zend/zend_d.stub', 'JOB_QUEUE_SAVE_RAW_POST' => 'zend/zend_d.stub', 'JOB_QUEUE_SAVE_SERVER' => 'zend/zend_d.stub', 'JOB_QUEUE_SAVE_SESSION' => 'zend/zend_d.stub', 'JOB_QUEUE_STATUS_EXECUTION_FAILED' => 'zend/zend_d.stub', 'JOB_QUEUE_STATUS_IN_PROCESS' => 'zend/zend_d.stub', 'JOB_QUEUE_STATUS_LOGICALLY_FAILED' => 'zend/zend_d.stub', 'JOB_QUEUE_STATUS_SCHEDULED' => 'zend/zend_d.stub', 'JOB_QUEUE_STATUS_SUCCESS' => 'zend/zend_d.stub', 'JOB_QUEUE_STATUS_SUSPENDED' => 'zend/zend_d.stub', 'JOB_QUEUE_STATUS_WAITING' => 'zend/zend_d.stub', 'JOB_QUEUE_STATUS_WAITING_PREDECESSOR' => 'zend/zend_d.stub', 'JSON_BIGINT_AS_STRING' => 'json/json.stub', 'JSON_ERROR_CTRL_CHAR' => 'json/json.stub', 'JSON_ERROR_DEPTH' => 'json/json.stub', 'JSON_ERROR_INF_OR_NAN' => 'json/json.stub', 'JSON_ERROR_INVALID_PROPERTY_NAME' => 'json/json.stub', 'JSON_ERROR_NONE' => 'json/json.stub', 'JSON_ERROR_NON_BACKED_ENUM' => 'json/json.stub', 'JSON_ERROR_RECURSION' => 'json/json.stub', 'JSON_ERROR_STATE_MISMATCH' => 'json/json.stub', 'JSON_ERROR_SYNTAX' => 'json/json.stub', 'JSON_ERROR_UNSUPPORTED_TYPE' => 'json/json.stub', 'JSON_ERROR_UTF16' => 'json/json.stub', 'JSON_ERROR_UTF8' => 'json/json.stub', 'JSON_FORCE_OBJECT' => 'json/json.stub', 'JSON_HEX_AMP' => 'json/json.stub', 'JSON_HEX_APOS' => 'json/json.stub', 'JSON_HEX_QUOT' => 'json/json.stub', 'JSON_HEX_TAG' => 'json/json.stub', 'JSON_INVALID_UTF8_IGNORE' => 'json/json.stub', 'JSON_INVALID_UTF8_SUBSTITUTE' => 'json/json.stub', 'JSON_NUMERIC_CHECK' => 'json/json.stub', 'JSON_OBJECT_AS_ARRAY' => 'json/json.stub', 'JSON_PARSER_NOTSTRICT' => 'json/json.stub', 'JSON_PARTIAL_OUTPUT_ON_ERROR' => 'json/json.stub', 'JSON_PRESERVE_ZERO_FRACTION' => 'json/json.stub', 'JSON_PRETTY_PRINT' => 'json/json.stub', 'JSON_THROW_ON_ERROR' => 'json/json.stub', 'JSON_UNESCAPED_LINE_TERMINATORS' => 'json/json.stub', 'JSON_UNESCAPED_SLASHES' => 'json/json.stub', 'JSON_UNESCAPED_UNICODE' => 'json/json.stub', 'LATT_HASCHILDREN' => 'imap/imap.stub', 'LATT_HASNOCHILDREN' => 'imap/imap.stub', 'LATT_MARKED' => 'imap/imap.stub', 'LATT_NOINFERIORS' => 'imap/imap.stub', 'LATT_NOSELECT' => 'imap/imap.stub', 'LATT_REFERRAL' => 'imap/imap.stub', 'LATT_UNMARKED' => 'imap/imap.stub', 'LC_ALL' => 'standard/standard_defines.stub', 'LC_COLLATE' => 'standard/standard_defines.stub', 'LC_CTYPE' => 'standard/standard_defines.stub', 'LC_MESSAGES' => 'standard/standard_defines.stub', 'LC_MONETARY' => 'standard/standard_defines.stub', 'LC_NUMERIC' => 'standard/standard_defines.stub', 'LC_TIME' => 'standard/standard_defines.stub', 'LDAP_CONTROL_ASSERT' => 'ldap/ldap.stub', 'LDAP_CONTROL_AUTHZID_REQUEST' => 'ldap/ldap.stub', 'LDAP_CONTROL_AUTHZID_RESPONSE' => 'ldap/ldap.stub', 'LDAP_CONTROL_DONTUSECOPY' => 'ldap/ldap.stub', 'LDAP_CONTROL_MANAGEDSAIT' => 'ldap/ldap.stub', 'LDAP_CONTROL_PAGEDRESULTS' => 'ldap/ldap.stub', 'LDAP_CONTROL_PASSWORDPOLICYREQUEST' => 'ldap/ldap.stub', 'LDAP_CONTROL_PASSWORDPOLICYRESPONSE' => 'ldap/ldap.stub', 'LDAP_CONTROL_POST_READ' => 'ldap/ldap.stub', 'LDAP_CONTROL_PRE_READ' => 'ldap/ldap.stub', 'LDAP_CONTROL_PROXY_AUTHZ' => 'ldap/ldap.stub', 'LDAP_CONTROL_SORTREQUEST' => 'ldap/ldap.stub', 'LDAP_CONTROL_SORTRESPONSE' => 'ldap/ldap.stub', 'LDAP_CONTROL_SUBENTRIES' => 'ldap/ldap.stub', 'LDAP_CONTROL_SYNC' => 'ldap/ldap.stub', 'LDAP_CONTROL_SYNC_DONE' => 'ldap/ldap.stub', 'LDAP_CONTROL_SYNC_STATE' => 'ldap/ldap.stub', 'LDAP_CONTROL_VALUESRETURNFILTER' => 'ldap/ldap.stub', 'LDAP_CONTROL_VLVREQUEST' => 'ldap/ldap.stub', 'LDAP_CONTROL_VLVRESPONSE' => 'ldap/ldap.stub', 'LDAP_CONTROL_X_DOMAIN_SCOPE' => 'ldap/ldap.stub', 'LDAP_CONTROL_X_EXTENDED_DN' => 'ldap/ldap.stub', 'LDAP_CONTROL_X_INCREMENTAL_VALUES' => 'ldap/ldap.stub', 'LDAP_CONTROL_X_PERMISSIVE_MODIFY' => 'ldap/ldap.stub', 'LDAP_CONTROL_X_SEARCH_OPTIONS' => 'ldap/ldap.stub', 'LDAP_CONTROL_X_TREE_DELETE' => 'ldap/ldap.stub', 'LDAP_DEREF_ALWAYS' => 'ldap/ldap.stub', 'LDAP_DEREF_FINDING' => 'ldap/ldap.stub', 'LDAP_DEREF_NEVER' => 'ldap/ldap.stub', 'LDAP_DEREF_SEARCHING' => 'ldap/ldap.stub', 'LDAP_ESCAPE_DN' => 'ldap/ldap.stub', 'LDAP_ESCAPE_FILTER' => 'ldap/ldap.stub', 'LDAP_EXOP_MODIFY_PASSWD' => 'ldap/ldap.stub', 'LDAP_EXOP_REFRESH' => 'ldap/ldap.stub', 'LDAP_EXOP_START_TLS' => 'ldap/ldap.stub', 'LDAP_EXOP_TURN' => 'ldap/ldap.stub', 'LDAP_EXOP_WHO_AM_I' => 'ldap/ldap.stub', 'LDAP_MODIFY_BATCH_ADD' => 'ldap/ldap.stub', 'LDAP_MODIFY_BATCH_ATTRIB' => 'ldap/ldap.stub', 'LDAP_MODIFY_BATCH_MODTYPE' => 'ldap/ldap.stub', 'LDAP_MODIFY_BATCH_REMOVE' => 'ldap/ldap.stub', 'LDAP_MODIFY_BATCH_REMOVE_ALL' => 'ldap/ldap.stub', 'LDAP_MODIFY_BATCH_REPLACE' => 'ldap/ldap.stub', 'LDAP_MODIFY_BATCH_VALUES' => 'ldap/ldap.stub', 'LDAP_OPT_CLIENT_CONTROLS' => 'ldap/ldap.stub', 'LDAP_OPT_DEBUG_LEVEL' => 'ldap/ldap.stub', 'LDAP_OPT_DEREF' => 'ldap/ldap.stub', 'LDAP_OPT_DIAGNOSTIC_MESSAGE' => 'ldap/ldap.stub', 'LDAP_OPT_ERROR_NUMBER' => 'ldap/ldap.stub', 'LDAP_OPT_ERROR_STRING' => 'ldap/ldap.stub', 'LDAP_OPT_HOST_NAME' => 'ldap/ldap.stub', 'LDAP_OPT_MATCHED_DN' => 'ldap/ldap.stub', 'LDAP_OPT_NETWORK_TIMEOUT' => 'ldap/ldap.stub', 'LDAP_OPT_PROTOCOL_VERSION' => 'ldap/ldap.stub', 'LDAP_OPT_REFERRALS' => 'ldap/ldap.stub', 'LDAP_OPT_RESTART' => 'ldap/ldap.stub', 'LDAP_OPT_SERVER_CONTROLS' => 'ldap/ldap.stub', 'LDAP_OPT_SIZELIMIT' => 'ldap/ldap.stub', 'LDAP_OPT_TIMELIMIT' => 'ldap/ldap.stub', 'LDAP_OPT_TIMEOUT' => 'ldap/ldap.stub', 'LDAP_OPT_X_KEEPALIVE_IDLE' => 'ldap/ldap.stub', 'LDAP_OPT_X_KEEPALIVE_INTERVAL' => 'ldap/ldap.stub', 'LDAP_OPT_X_KEEPALIVE_PROBES' => 'ldap/ldap.stub', 'LDAP_OPT_X_SASL_AUTHCID' => 'ldap/ldap.stub', 'LDAP_OPT_X_SASL_AUTHZID' => 'ldap/ldap.stub', 'LDAP_OPT_X_SASL_MECH' => 'ldap/ldap.stub', 'LDAP_OPT_X_SASL_NOCANON' => 'ldap/ldap.stub', 'LDAP_OPT_X_SASL_REALM' => 'ldap/ldap.stub', 'LDAP_OPT_X_SASL_USERNAME' => 'ldap/ldap.stub', 'LDAP_OPT_X_TLS_ALLOW' => 'ldap/ldap.stub', 'LDAP_OPT_X_TLS_CACERTDIR' => 'ldap/ldap.stub', 'LDAP_OPT_X_TLS_CACERTFILE' => 'ldap/ldap.stub', 'LDAP_OPT_X_TLS_CERTFILE' => 'ldap/ldap.stub', 'LDAP_OPT_X_TLS_CIPHER_SUITE' => 'ldap/ldap.stub', 'LDAP_OPT_X_TLS_CRLCHECK' => 'ldap/ldap.stub', 'LDAP_OPT_X_TLS_CRLFILE' => 'ldap/ldap.stub', 'LDAP_OPT_X_TLS_CRL_ALL' => 'ldap/ldap.stub', 'LDAP_OPT_X_TLS_CRL_NONE' => 'ldap/ldap.stub', 'LDAP_OPT_X_TLS_CRL_PEER' => 'ldap/ldap.stub', 'LDAP_OPT_X_TLS_DEMAND' => 'ldap/ldap.stub', 'LDAP_OPT_X_TLS_DHFILE' => 'ldap/ldap.stub', 'LDAP_OPT_X_TLS_HARD' => 'ldap/ldap.stub', 'LDAP_OPT_X_TLS_KEYFILE' => 'ldap/ldap.stub', 'LDAP_OPT_X_TLS_NEVER' => 'ldap/ldap.stub', 'LDAP_OPT_X_TLS_PACKAGE' => 'ldap/ldap.stub', 'LDAP_OPT_X_TLS_PROTOCOL_MIN' => 'ldap/ldap.stub', 'LDAP_OPT_X_TLS_PROTOCOL_SSL2' => 'ldap/ldap.stub', 'LDAP_OPT_X_TLS_PROTOCOL_SSL3' => 'ldap/ldap.stub', 'LDAP_OPT_X_TLS_PROTOCOL_TLS1_0' => 'ldap/ldap.stub', 'LDAP_OPT_X_TLS_PROTOCOL_TLS1_1' => 'ldap/ldap.stub', 'LDAP_OPT_X_TLS_PROTOCOL_TLS1_2' => 'ldap/ldap.stub', 'LDAP_OPT_X_TLS_RANDOM_FILE' => 'ldap/ldap.stub', 'LDAP_OPT_X_TLS_REQUIRE_CERT' => 'ldap/ldap.stub', 'LDAP_OPT_X_TLS_TRY' => 'ldap/ldap.stub', 'LEVELDB_NO_COMPRESSION' => 'leveldb/LevelDB.stub', 'LEVELDB_SNAPPY_COMPRESSION' => 'leveldb/LevelDB.stub', 'LIBEXSLT_DOTTED_VERSION' => 'xsl/xsl.stub', 'LIBEXSLT_VERSION' => 'xsl/xsl.stub', 'LIBXML_BIGLINES' => 'libxml/libxml.stub', 'LIBXML_COMPACT' => 'libxml/libxml.stub', 'LIBXML_DOTTED_VERSION' => 'libxml/libxml.stub', 'LIBXML_DTDATTR' => 'libxml/libxml.stub', 'LIBXML_DTDLOAD' => 'libxml/libxml.stub', 'LIBXML_DTDVALID' => 'libxml/libxml.stub', 'LIBXML_ERR_ERROR' => 'libxml/libxml.stub', 'LIBXML_ERR_FATAL' => 'libxml/libxml.stub', 'LIBXML_ERR_NONE' => 'libxml/libxml.stub', 'LIBXML_ERR_WARNING' => 'libxml/libxml.stub', 'LIBXML_HTML_NODEFDTD' => 'libxml/libxml.stub', 'LIBXML_HTML_NOIMPLIED' => 'libxml/libxml.stub', 'LIBXML_LOADED_VERSION' => 'libxml/libxml.stub', 'LIBXML_NOBLANKS' => 'libxml/libxml.stub', 'LIBXML_NOCDATA' => 'libxml/libxml.stub', 'LIBXML_NOEMPTYTAG' => 'libxml/libxml.stub', 'LIBXML_NOENT' => 'libxml/libxml.stub', 'LIBXML_NOERROR' => 'libxml/libxml.stub', 'LIBXML_NONET' => 'libxml/libxml.stub', 'LIBXML_NOWARNING' => 'libxml/libxml.stub', 'LIBXML_NOXMLDECL' => 'libxml/libxml.stub', 'LIBXML_NSCLEAN' => 'libxml/libxml.stub', 'LIBXML_PARSEHUGE' => 'libxml/libxml.stub', 'LIBXML_PEDANTIC' => 'libxml/libxml.stub', 'LIBXML_SCHEMA_CREATE' => 'libxml/libxml.stub', 'LIBXML_VERSION' => 'libxml/libxml.stub', 'LIBXML_XINCLUDE' => 'libxml/libxml.stub', 'LIBXSLT_DOTTED_VERSION' => 'xsl/xsl.stub', 'LIBXSLT_VERSION' => 'xsl/xsl.stub', 'LIBZSTD_VERSION_NUMBER' => 'zstd/zstd.stub', 'LIBZSTD_VERSION_STRING' => 'zstd/zstd.stub', 'LIGHTGRAY' => 'winbinder/winbinder.stub', 'LOCK_EX' => 'standard/standard_defines.stub', 'LOCK_NB' => 'standard/standard_defines.stub', 'LOCK_SH' => 'standard/standard_defines.stub', 'LOCK_UN' => 'standard/standard_defines.stub', 'LOG_ALERT' => 'standard/standard_defines.stub', 'LOG_AUTH' => 'standard/standard_defines.stub', 'LOG_AUTHPRIV' => 'standard/standard_defines.stub', 'LOG_CONS' => 'standard/standard_defines.stub', 'LOG_CRIT' => 'standard/standard_defines.stub', 'LOG_CRON' => 'standard/standard_defines.stub', 'LOG_DAEMON' => 'standard/standard_defines.stub', 'LOG_DEBUG' => 'standard/standard_defines.stub', 'LOG_EMERG' => 'standard/standard_defines.stub', 'LOG_ERR' => 'standard/standard_defines.stub', 'LOG_INFO' => 'standard/standard_defines.stub', 'LOG_KERN' => 'standard/standard_defines.stub', 'LOG_LOCAL0' => 'standard/standard_defines.stub', 'LOG_LOCAL1' => 'standard/standard_defines.stub', 'LOG_LOCAL2' => 'standard/standard_defines.stub', 'LOG_LOCAL3' => 'standard/standard_defines.stub', 'LOG_LOCAL4' => 'standard/standard_defines.stub', 'LOG_LOCAL5' => 'standard/standard_defines.stub', 'LOG_LOCAL6' => 'standard/standard_defines.stub', 'LOG_LOCAL7' => 'standard/standard_defines.stub', 'LOG_LPR' => 'standard/standard_defines.stub', 'LOG_MAIL' => 'standard/standard_defines.stub', 'LOG_NDELAY' => 'standard/standard_defines.stub', 'LOG_NEWS' => 'standard/standard_defines.stub', 'LOG_NOTICE' => 'standard/standard_defines.stub', 'LOG_NOWAIT' => 'standard/standard_defines.stub', 'LOG_ODELAY' => 'standard/standard_defines.stub', 'LOG_PERROR' => 'standard/standard_defines.stub', 'LOG_PID' => 'standard/standard_defines.stub', 'LOG_SYSLOG' => 'standard/standard_defines.stub', 'LOG_USER' => 'standard/standard_defines.stub', 'LOG_UUCP' => 'standard/standard_defines.stub', 'LOG_WARNING' => 'standard/standard_defines.stub', 'Label' => 'winbinder/winbinder.stub', 'ListBox' => 'winbinder/winbinder.stub', 'ListView' => 'winbinder/winbinder.stub', 'MAGENTA' => 'winbinder/winbinder.stub', 'MAILPARSE_EXTRACT_OUTPUT' => 'mailparse/mailparse.stub', 'MAILPARSE_EXTRACT_RETURN' => 'mailparse/mailparse.stub', 'MAILPARSE_EXTRACT_STREAM' => 'mailparse/mailparse.stub', 'MB_CASE_FOLD' => 'mbstring/mbstring.stub', 'MB_CASE_FOLD_SIMPLE' => 'mbstring/mbstring.stub', 'MB_CASE_LOWER' => 'mbstring/mbstring.stub', 'MB_CASE_LOWER_SIMPLE' => 'mbstring/mbstring.stub', 'MB_CASE_TITLE' => 'mbstring/mbstring.stub', 'MB_CASE_TITLE_SIMPLE' => 'mbstring/mbstring.stub', 'MB_CASE_UPPER' => 'mbstring/mbstring.stub', 'MB_CASE_UPPER_SIMPLE' => 'mbstring/mbstring.stub', 'MB_ONIGURUMA_VERSION' => 'mbstring/mbstring.stub', 'MB_OVERLOAD_MAIL' => 'mbstring/mbstring.stub', 'MB_OVERLOAD_REGEX' => 'mbstring/mbstring.stub', 'MB_OVERLOAD_STRING' => 'mbstring/mbstring.stub', 'MCAST_BLOCK_SOURCE' => 'sockets/sockets.stub', 'MCAST_JOIN_GROUP' => 'sockets/sockets.stub', 'MCAST_JOIN_SOURCE_GROUP' => 'sockets/sockets.stub', 'MCAST_LEAVE_GROUP' => 'sockets/sockets.stub', 'MCAST_LEAVE_SOURCE_GROUP' => 'sockets/sockets.stub', 'MCAST_UNBLOCK_SOURCE' => 'sockets/sockets.stub', 'MCRYPT_3DES' => 'mcrypt/mcrypt.stub', 'MCRYPT_ARCFOUR' => 'mcrypt/mcrypt.stub', 'MCRYPT_ARCFOUR_IV' => 'mcrypt/mcrypt.stub', 'MCRYPT_BLOWFISH' => 'mcrypt/mcrypt.stub', 'MCRYPT_BLOWFISH_COMPAT' => 'mcrypt/mcrypt.stub', 'MCRYPT_CAST_128' => 'mcrypt/mcrypt.stub', 'MCRYPT_CAST_256' => 'mcrypt/mcrypt.stub', 'MCRYPT_CRYPT' => 'mcrypt/mcrypt.stub', 'MCRYPT_DECRYPT' => 'mcrypt/mcrypt.stub', 'MCRYPT_DES' => 'mcrypt/mcrypt.stub', 'MCRYPT_DES_COMPAT' => 'mcrypt/mcrypt.stub', 'MCRYPT_DEV_RANDOM' => 'mcrypt/mcrypt.stub', 'MCRYPT_DEV_URANDOM' => 'mcrypt/mcrypt.stub', 'MCRYPT_ENCRYPT' => 'mcrypt/mcrypt.stub', 'MCRYPT_ENIGNA' => 'mcrypt/mcrypt.stub', 'MCRYPT_GOST' => 'mcrypt/mcrypt.stub', 'MCRYPT_IDEA' => 'mcrypt/mcrypt.stub', 'MCRYPT_LOKI97' => 'mcrypt/mcrypt.stub', 'MCRYPT_MARS' => 'mcrypt/mcrypt.stub', 'MCRYPT_MODE_CBC' => 'mcrypt/mcrypt.stub', 'MCRYPT_MODE_CFB' => 'mcrypt/mcrypt.stub', 'MCRYPT_MODE_ECB' => 'mcrypt/mcrypt.stub', 'MCRYPT_MODE_NOFB' => 'mcrypt/mcrypt.stub', 'MCRYPT_MODE_OFB' => 'mcrypt/mcrypt.stub', 'MCRYPT_MODE_STREAM' => 'mcrypt/mcrypt.stub', 'MCRYPT_PANAMA' => 'mcrypt/mcrypt.stub', 'MCRYPT_RAND' => 'mcrypt/mcrypt.stub', 'MCRYPT_RC2' => 'mcrypt/mcrypt.stub', 'MCRYPT_RC4' => 'mcrypt/mcrypt.stub', 'MCRYPT_RC6' => 'mcrypt/mcrypt.stub', 'MCRYPT_RC6_128' => 'mcrypt/mcrypt.stub', 'MCRYPT_RC6_192' => 'mcrypt/mcrypt.stub', 'MCRYPT_RC6_256' => 'mcrypt/mcrypt.stub', 'MCRYPT_RIJNDAEL_128' => 'mcrypt/mcrypt.stub', 'MCRYPT_RIJNDAEL_192' => 'mcrypt/mcrypt.stub', 'MCRYPT_RIJNDAEL_256' => 'mcrypt/mcrypt.stub', 'MCRYPT_SAFER128' => 'mcrypt/mcrypt.stub', 'MCRYPT_SAFER64' => 'mcrypt/mcrypt.stub', 'MCRYPT_SAFERPLUS' => 'mcrypt/mcrypt.stub', 'MCRYPT_SERPENT' => 'mcrypt/mcrypt.stub', 'MCRYPT_SERPENT_128' => 'mcrypt/mcrypt.stub', 'MCRYPT_SERPENT_192' => 'mcrypt/mcrypt.stub', 'MCRYPT_SERPENT_256' => 'mcrypt/mcrypt.stub', 'MCRYPT_SKIPJACK' => 'mcrypt/mcrypt.stub', 'MCRYPT_THREEWAY' => 'mcrypt/mcrypt.stub', 'MCRYPT_TRIPLEDES' => 'mcrypt/mcrypt.stub', 'MCRYPT_TWOFISH' => 'mcrypt/mcrypt.stub', 'MCRYPT_WAKE' => 'mcrypt/mcrypt.stub', 'MCRYPT_XTEA' => 'mcrypt/mcrypt.stub', 'MEMCACHE_COMPRESSED' => 'memcache/memcache.stub', 'MEMCACHE_HAVE_SESSION' => 'memcache/memcache.stub', 'MEMCACHE_USER1' => 'memcache/memcache.stub', 'MEMCACHE_USER2' => 'memcache/memcache.stub', 'MEMCACHE_USER3' => 'memcache/memcache.stub', 'MEMCACHE_USER4' => 'memcache/memcache.stub', 'MESSAGEPACK_OPT_PHPONLY' => 'msgpack/msgpack.stub', 'MHASH_ADLER32' => 'hash/hash.stub', 'MHASH_CRC32' => 'hash/hash.stub', 'MHASH_CRC32B' => 'hash/hash.stub', 'MHASH_CRC32C' => 'hash/hash.stub', 'MHASH_FNV132' => 'hash/hash.stub', 'MHASH_FNV164' => 'hash/hash.stub', 'MHASH_FNV1A32' => 'hash/hash.stub', 'MHASH_FNV1A64' => 'hash/hash.stub', 'MHASH_GOST' => 'hash/hash.stub', 'MHASH_HAVAL128' => 'hash/hash.stub', 'MHASH_HAVAL160' => 'hash/hash.stub', 'MHASH_HAVAL192' => 'hash/hash.stub', 'MHASH_HAVAL224' => 'hash/hash.stub', 'MHASH_HAVAL256' => 'hash/hash.stub', 'MHASH_JOAAT' => 'hash/hash.stub', 'MHASH_MD2' => 'hash/hash.stub', 'MHASH_MD4' => 'hash/hash.stub', 'MHASH_MD5' => 'hash/hash.stub', 'MHASH_MURMUR3A' => 'hash/hash.stub', 'MHASH_MURMUR3C' => 'hash/hash.stub', 'MHASH_MURMUR3F' => 'hash/hash.stub', 'MHASH_RIPEMD128' => 'hash/hash.stub', 'MHASH_RIPEMD160' => 'hash/hash.stub', 'MHASH_RIPEMD256' => 'hash/hash.stub', 'MHASH_RIPEMD320' => 'hash/hash.stub', 'MHASH_SHA1' => 'hash/hash.stub', 'MHASH_SHA224' => 'hash/hash.stub', 'MHASH_SHA256' => 'hash/hash.stub', 'MHASH_SHA384' => 'hash/hash.stub', 'MHASH_SHA512' => 'hash/hash.stub', 'MHASH_SNEFRU256' => 'hash/hash.stub', 'MHASH_TIGER' => 'hash/hash.stub', 'MHASH_TIGER128' => 'hash/hash.stub', 'MHASH_TIGER160' => 'hash/hash.stub', 'MHASH_WHIRLPOOL' => 'hash/hash.stub', 'MHASH_XXH128' => 'hash/hash.stub', 'MHASH_XXH3' => 'hash/hash.stub', 'MHASH_XXH32' => 'hash/hash.stub', 'MHASH_XXH64' => 'hash/hash.stub', 'MING_NEW' => 'ming/ming.stub', 'MING_ZLIB' => 'ming/ming.stub', 'MK_E_UNAVAILABLE' => 'com_dotnet/com_dotnet.stub', 'MONGODB_STABILITY' => 'mongodb/mongodb.stub', 'MONGODB_VERSION' => 'mongodb/mongodb.stub', 'MON_1' => 'standard/standard_defines.stub', 'MON_10' => 'standard/standard_defines.stub', 'MON_11' => 'standard/standard_defines.stub', 'MON_12' => 'standard/standard_defines.stub', 'MON_2' => 'standard/standard_defines.stub', 'MON_3' => 'standard/standard_defines.stub', 'MON_4' => 'standard/standard_defines.stub', 'MON_5' => 'standard/standard_defines.stub', 'MON_6' => 'standard/standard_defines.stub', 'MON_7' => 'standard/standard_defines.stub', 'MON_8' => 'standard/standard_defines.stub', 'MON_9' => 'standard/standard_defines.stub', 'MON_DECIMAL_POINT' => 'standard/standard_defines.stub', 'MON_GROUPING' => 'standard/standard_defines.stub', 'MON_THOUSANDS_SEP' => 'standard/standard_defines.stub', 'MQSERIES_MQACT_NONE' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_AIX' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_BATCH' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_BROKER' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_CHANNEL_INITIATOR' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_CICS' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_CICS_BRIDGE' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_CICS_VSE' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_DEFAULT' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_DOS' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_DQM' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_GUARDIAN' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_IMS' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_IMS_BRIDGE' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_JAVA' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_MCAST_PUBLISH' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_MVS' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_NOTES_AGENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_NO_CONTEXT' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_NSK' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_OPEN_TP1' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_OS2' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_OS390' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_OS400' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_QMGR' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_QMGR_PUBLISH' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_RRS_BATCH' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_SIB' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_SYSTEM_EXTENSION' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_TPF' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_UNIX' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_UNKNOWN' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_USER' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_USER_FIRST' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_USER_LAST' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_VM' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_VMS' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_VOS' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_WINDOWS' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_WINDOWS_NT' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_WLM' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_XCF' => 'mqseries/mqseries.stub', 'MQSERIES_MQAT_ZOS' => 'mqseries/mqseries.stub', 'MQSERIES_MQBO_CURRENT_VERSION' => 'mqseries/mqseries.stub', 'MQSERIES_MQBO_NONE' => 'mqseries/mqseries.stub', 'MQSERIES_MQBO_VERSION_1' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_ADMIN_TOPIC_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_ALTERATION_DATE' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_ALTERATION_TIME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_APPL_ID' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_AUTH_INFO_CONN_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_AUTH_INFO_DESC' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_AUTH_INFO_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_AUTH_INFO_OCSP_URL' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_AUTO_REORG_CATALOG' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_AUTO_REORG_START_TIME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_BACKOUT_REQ_Q_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_BASE_OBJECT_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_BASE_Q_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_BATCH_INTERFACE_ID' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_CF_STRUC_DESC' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_CF_STRUC_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_CHANNEL_AUTO_DEF_EXIT' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_CHILD' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_CHINIT_SERVICE_PARM' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_CHLAUTH_DESC' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_CICS_FILE_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_CLUSTER_DATE' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_CLUSTER_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_CLUSTER_NAMELIST' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_CLUSTER_Q_MGR_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_CLUSTER_TIME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_CLUSTER_WORKLOAD_DATA' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_CLUSTER_WORKLOAD_EXIT' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_CLUS_CHL_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_COMMAND_INPUT_Q_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_COMMAND_REPLY_Q_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_COMM_INFO_DESC' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_COMM_INFO_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_CREATION_DATE' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_CREATION_TIME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_CUSTOM' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_DEAD_LETTER_Q_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_DEF_XMIT_Q_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_DNS_GROUP' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_ENV_DATA' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_FIRST' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_IGQ_USER_ID' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_INITIATION_Q_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_INSTALLATION_DESC' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_INSTALLATION_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_INSTALLATION_PATH' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_LAST' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_LAST_USED' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_LDAP_PASSWORD' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_LDAP_USER_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_LU62_ARM_SUFFIX' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_LU_GROUP_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_LU_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_MODEL_DURABLE_Q' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_MODEL_NON_DURABLE_Q' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_MONITOR_Q_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_NAMELIST_DESC' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_NAMELIST_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_NAMES' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_PARENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_PASS_TICKET_APPL' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_POLICY_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_PROCESS_DESC' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_PROCESS_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_QSG_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_Q_DESC' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_Q_MGR_DESC' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_Q_MGR_IDENTIFIER' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_Q_MGR_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_Q_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_RECIPIENT_DN' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_REMOTE_Q_MGR_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_REMOTE_Q_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_REPOSITORY_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_REPOSITORY_NAMELIST' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_RESUME_DATE' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_RESUME_TIME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_SERVICE_DESC' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_SERVICE_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_SERVICE_START_ARGS' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_SERVICE_START_COMMAND' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_SERVICE_STOP_ARGS' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_SERVICE_STOP_COMMAND' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_SIGNER_DN' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_SSL_CRL_NAMELIST' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_SSL_CRYPTO_HARDWARE' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_SSL_KEY_LIBRARY' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_SSL_KEY_MEMBER' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_SSL_KEY_REPOSITORY' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_STDERR_DESTINATION' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_STDOUT_DESTINATION' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_STORAGE_CLASS' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_STORAGE_CLASS_DESC' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_SYSTEM_LOG_Q_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_TCP_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_TOPIC_DESC' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_TOPIC_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_TOPIC_STRING' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_TOPIC_STRING_FILTER' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_TPIPE_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_TRIGGER_CHANNEL_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_TRIGGER_DATA' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_TRIGGER_PROGRAM_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_TRIGGER_TERM_ID' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_TRIGGER_TRANS_ID' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_USER_DATA' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_USER_LIST' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_VERSION' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_XCF_GROUP_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_XCF_MEMBER_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_XMIT_Q_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_XR_SSL_CIPHER_SUITES' => 'mqseries/mqseries.stub', 'MQSERIES_MQCA_XR_VERSION' => 'mqseries/mqseries.stub', 'MQSERIES_MQCCSI_APPL' => 'mqseries/mqseries.stub', 'MQSERIES_MQCCSI_AS_PUBLISHED' => 'mqseries/mqseries.stub', 'MQSERIES_MQCCSI_DEFAULT' => 'mqseries/mqseries.stub', 'MQSERIES_MQCCSI_EMBEDDED' => 'mqseries/mqseries.stub', 'MQSERIES_MQCCSI_INHERIT' => 'mqseries/mqseries.stub', 'MQSERIES_MQCCSI_Q_MGR' => 'mqseries/mqseries.stub', 'MQSERIES_MQCCSI_UNDEFINED' => 'mqseries/mqseries.stub', 'MQSERIES_MQCC_FAILED' => 'mqseries/mqseries.stub', 'MQSERIES_MQCC_OK' => 'mqseries/mqseries.stub', 'MQSERIES_MQCC_UNKNOWN' => 'mqseries/mqseries.stub', 'MQSERIES_MQCC_WARNING' => 'mqseries/mqseries.stub', 'MQSERIES_MQCI_NEW_SESSION' => 'mqseries/mqseries.stub', 'MQSERIES_MQCI_NONE' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_ACCOUNTING_MQI_DISABLED' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_ACCOUNTING_MQI_ENABLED' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_ACCOUNTING_Q_DISABLED' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_ACCOUNTING_Q_ENABLED' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_ACTIVITY_TRACE_DISABLED' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_ACTIVITY_TRACE_ENABLED' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_ALL_CONVS_SHARE' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_CD_FOR_OUTPUT_ONLY' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_CLIENT_BINDING' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_CURRENT_VERSION' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_FASTPATH_BINDING' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_HANDLE_SHARE_BLOCK' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_HANDLE_SHARE_NONE' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_HANDLE_SHARE_NO_BLOCK' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_ISOLATED_BINDING' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_LOCAL_BINDING' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_NONE' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_NO_CONV_SHARING' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_RECONNECT' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_RECONNECT_AS_DEF' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_RECONNECT_DISABLED' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_RECONNECT_Q_MGR' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_RESTRICT_CONN_TAG_QSG' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_RESTRICT_CONN_TAG_Q_MGR' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_SERIALIZE_CONN_TAG_QSG' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_SERIALIZE_CONN_TAG_Q_MGR' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_SHARED_BINDING' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_STANDARD_BINDING' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_USE_CD_SELECTION' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_VERSION_1' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_VERSION_2' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_VERSION_3' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_VERSION_4' => 'mqseries/mqseries.stub', 'MQSERIES_MQCNO_VERSION_5' => 'mqseries/mqseries.stub', 'MQSERIES_MQCO_DELETE' => 'mqseries/mqseries.stub', 'MQSERIES_MQCO_DELETE_PURGE' => 'mqseries/mqseries.stub', 'MQSERIES_MQCO_IMMEDIATE' => 'mqseries/mqseries.stub', 'MQSERIES_MQCO_KEEP_SUB' => 'mqseries/mqseries.stub', 'MQSERIES_MQCO_NONE' => 'mqseries/mqseries.stub', 'MQSERIES_MQCO_QUIESCE' => 'mqseries/mqseries.stub', 'MQSERIES_MQCO_REMOVE_SUB' => 'mqseries/mqseries.stub', 'MQSERIES_MQEC_CONNECTION_QUIESCING' => 'mqseries/mqseries.stub', 'MQSERIES_MQEC_MSG_ARRIVED' => 'mqseries/mqseries.stub', 'MQSERIES_MQEC_Q_MGR_QUIESCING' => 'mqseries/mqseries.stub', 'MQSERIES_MQEC_WAIT_CANCELED' => 'mqseries/mqseries.stub', 'MQSERIES_MQEC_WAIT_INTERVAL_EXPIRED' => 'mqseries/mqseries.stub', 'MQSERIES_MQEI_UNLIMITED' => 'mqseries/mqseries.stub', 'MQSERIES_MQENC_AS_PUBLISHED' => 'mqseries/mqseries.stub', 'MQSERIES_MQENC_DECIMAL_MASK' => 'mqseries/mqseries.stub', 'MQSERIES_MQENC_DECIMAL_NORMAL' => 'mqseries/mqseries.stub', 'MQSERIES_MQENC_DECIMAL_REVERSED' => 'mqseries/mqseries.stub', 'MQSERIES_MQENC_DECIMAL_UNDEFINED' => 'mqseries/mqseries.stub', 'MQSERIES_MQENC_FLOAT_IEEE_NORMAL' => 'mqseries/mqseries.stub', 'MQSERIES_MQENC_FLOAT_IEEE_REVERSED' => 'mqseries/mqseries.stub', 'MQSERIES_MQENC_FLOAT_MASK' => 'mqseries/mqseries.stub', 'MQSERIES_MQENC_FLOAT_S390' => 'mqseries/mqseries.stub', 'MQSERIES_MQENC_FLOAT_TNS' => 'mqseries/mqseries.stub', 'MQSERIES_MQENC_FLOAT_UNDEFINED' => 'mqseries/mqseries.stub', 'MQSERIES_MQENC_INTEGER_MASK' => 'mqseries/mqseries.stub', 'MQSERIES_MQENC_INTEGER_NORMAL' => 'mqseries/mqseries.stub', 'MQSERIES_MQENC_INTEGER_REVERSED' => 'mqseries/mqseries.stub', 'MQSERIES_MQENC_INTEGER_UNDEFINED' => 'mqseries/mqseries.stub', 'MQSERIES_MQENC_NATIVE' => 'mqseries/mqseries.stub', 'MQSERIES_MQENC_NORMAL' => 'mqseries/mqseries.stub', 'MQSERIES_MQENC_RESERVED_MASK' => 'mqseries/mqseries.stub', 'MQSERIES_MQENC_REVERSED' => 'mqseries/mqseries.stub', 'MQSERIES_MQENC_S390' => 'mqseries/mqseries.stub', 'MQSERIES_MQENC_TNS' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_ACTIVITY' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_APPL_CANNOT_BE_STARTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_APPL_FIRST' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_APPL_LAST' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_APPL_TYPE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_BIND_OPEN_CLUSRCVR_DEL' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_BUFFER_OVERFLOW' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_CHANNEL_COMPLETED' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_CHANNEL_FAIL' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_CHANNEL_FAIL_RETRY' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_CICS_APPL_ABENDED' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_CICS_APPL_NOT_STARTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_CICS_BRIDGE_FAILURE' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_CICS_CCSID_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_CICS_CIH_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_CICS_COMMAREA_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_CICS_CORREL_ID_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_CICS_DLQ_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_CICS_ENCODING_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_CICS_INTERNAL_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_CICS_NOT_AUTHORIZED' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_CICS_UOW_BACKED_OUT' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_CICS_UOW_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_COA' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_COD' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_DATA_LENGTH_NEGATIVE' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_DATA_LENGTH_TOO_BIG' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_DATA_LENGTH_ZERO' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_EXPIRATION' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_IIH_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_IMS_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_IMS_FIRST' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_IMS_LAST' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_IMS_NACK_1A_REASON_FIRST' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_IMS_NACK_1A_REASON_LAST' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_LENGTH_OFF_BY_ONE' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_MAX_ACTIVITIES' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_MSG_SCOPE_MISMATCH' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_NAN' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_NONE' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_NOT_AUTHORIZED_FOR_IMS' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_NOT_A_GROUPUR_MSG' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_NOT_A_REPOSITORY_MSG' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_NOT_DELIVERED' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_NOT_FORWARDED' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_PAN' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_PUBLICATIONS_ON_REQUEST' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_QUIT' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_SELECTOR_MISMATCH' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_STOPPED_BY_CHAD_EXIT' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_STOPPED_BY_MSG_EXIT' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_STOPPED_BY_PUBSUB_EXIT' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_SUBSCRIBER_IS_PUBLISHER' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_SYSTEM_FIRST' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_SYSTEM_LAST' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_TM_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_UNSUPPORTED_DELIVERY' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_UNSUPPORTED_FORWARDING' => 'mqseries/mqseries.stub', 'MQSERIES_MQFB_XMIT_Q_MSG_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQFMT_ADMIN' => 'mqseries/mqseries.stub', 'MQSERIES_MQFMT_CHANNEL_COMPLETED' => 'mqseries/mqseries.stub', 'MQSERIES_MQFMT_CICS' => 'mqseries/mqseries.stub', 'MQSERIES_MQFMT_COMMAND_1' => 'mqseries/mqseries.stub', 'MQSERIES_MQFMT_COMMAND_2' => 'mqseries/mqseries.stub', 'MQSERIES_MQFMT_DEAD_LETTER_HEADER' => 'mqseries/mqseries.stub', 'MQSERIES_MQFMT_DIST_HEADER' => 'mqseries/mqseries.stub', 'MQSERIES_MQFMT_EMBEDDED_PCF' => 'mqseries/mqseries.stub', 'MQSERIES_MQFMT_EVENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQFMT_IMS' => 'mqseries/mqseries.stub', 'MQSERIES_MQFMT_IMS_VAR_STRING' => 'mqseries/mqseries.stub', 'MQSERIES_MQFMT_MD_EXTENSION' => 'mqseries/mqseries.stub', 'MQSERIES_MQFMT_NONE' => 'mqseries/mqseries.stub', 'MQSERIES_MQFMT_PCF' => 'mqseries/mqseries.stub', 'MQSERIES_MQFMT_REF_MSG_HEADER' => 'mqseries/mqseries.stub', 'MQSERIES_MQFMT_RF_HEADER' => 'mqseries/mqseries.stub', 'MQSERIES_MQFMT_RF_HEADER_1' => 'mqseries/mqseries.stub', 'MQSERIES_MQFMT_RF_HEADER_2' => 'mqseries/mqseries.stub', 'MQSERIES_MQFMT_STRING' => 'mqseries/mqseries.stub', 'MQSERIES_MQFMT_TRIGGER' => 'mqseries/mqseries.stub', 'MQSERIES_MQFMT_WORK_INFO_HEADER' => 'mqseries/mqseries.stub', 'MQSERIES_MQFMT_XMIT_Q_HEADER' => 'mqseries/mqseries.stub', 'MQSERIES_MQGI_NONE' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_ACCEPT_TRUNCATED_MSG' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_ALL_MSGS_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_ALL_SEGMENTS_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_BROWSE_CO_OP' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_BROWSE_FIRST' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_BROWSE_HANDLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_BROWSE_MSG_UNDER_CURSOR' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_BROWSE_NEXT' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_COMPLETE_MSG' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_CONVERT' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_CURRENT_VERSION' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_FAIL_IF_QUIESCING' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_LOCK' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_LOGICAL_ORDER' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_MARK_BROWSE_CO_OP' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_MARK_BROWSE_HANDLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_MARK_SKIP_BACKOUT' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_MSG_UNDER_CURSOR' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_NONE' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_NO_PROPERTIES' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_NO_SYNCPOINT' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_NO_WAIT' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_PROPERTIES_AS_Q_DEF' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_PROPERTIES_COMPATIBILITY' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_PROPERTIES_FORCE_MQRFH2' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_PROPERTIES_IN_HANDLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_SET_SIGNAL' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_SYNCPOINT' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_SYNCPOINT_IF_PERSISTENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_UNLOCK' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_UNMARKED_BROWSE_MSG' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_UNMARK_BROWSE_CO_OP' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_UNMARK_BROWSE_HANDLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_VERSION_1' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_VERSION_2' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_VERSION_3' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_VERSION_4' => 'mqseries/mqseries.stub', 'MQSERIES_MQGMO_WAIT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_ACCOUNTING_CONN_OVERRIDE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_ACCOUNTING_INTERVAL' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_ACCOUNTING_MQI' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_ACCOUNTING_Q' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_ACTIVE_CHANNELS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_ACTIVITY_CONN_OVERRIDE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_ACTIVITY_RECORDING' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_ACTIVITY_TRACE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_ADOPTNEWMCA_CHECK' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_ADOPTNEWMCA_INTERVAL' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_ADOPTNEWMCA_TYPE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_APPL_TYPE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_ARCHIVE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_AUTHORITY_EVENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_AUTH_INFO_TYPE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_AUTO_REORGANIZATION' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_AUTO_REORG_INTERVAL' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_BACKOUT_THRESHOLD' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_BASE_TYPE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_BATCH_INTERFACE_AUTO' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_BRIDGE_EVENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CERT_VAL_POLICY' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CF_CFCONLOS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CF_LEVEL' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CF_OFFLDUSE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CF_OFFLOAD' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CF_OFFLOAD_THRESHOLD1' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CF_OFFLOAD_THRESHOLD2' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CF_OFFLOAD_THRESHOLD3' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CF_RECAUTO' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CF_RECOVER' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CF_SMDS_BUFFERS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CHANNEL_AUTO_DEF' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CHANNEL_AUTO_DEF_EVENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CHANNEL_EVENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CHINIT_ADAPTERS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CHINIT_CONTROL' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CHINIT_DISPATCHERS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CHINIT_TRACE_AUTO_START' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CHINIT_TRACE_TABLE_SIZE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CHLAUTH_RECORDS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CLUSTER_Q_TYPE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CLUSTER_WORKLOAD_LENGTH' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CLWL_MRU_CHANNELS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CLWL_Q_PRIORITY' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CLWL_Q_RANK' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CLWL_USEQ' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CMD_SERVER_AUTO' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CMD_SERVER_CONTROL' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CMD_SERVER_CONVERT_MSG' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CMD_SERVER_DLQ_MSG' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CODED_CHAR_SET_ID' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_COMMAND_EVENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_COMMAND_LEVEL' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_COMM_EVENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_COMM_INFO_TYPE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CONFIGURATION_EVENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CPI_LEVEL' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_CURRENT_Q_DEPTH' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_DEFINITION_TYPE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_DEF_BIND' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_DEF_CLUSTER_XMIT_Q_TYPE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_DEF_INPUT_OPEN_OPTION' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_DEF_PERSISTENCE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_DEF_PRIORITY' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_DEF_PUT_RESPONSE_TYPE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_DEF_READ_AHEAD' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_DIST_LISTS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_DNS_WLM' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_DURABLE_SUB' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_ENCRYPTION_ALGORITHM' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_EXPIRY_INTERVAL' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_FIRST' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_GROUP_UR' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_HARDEN_GET_BACKOUT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_HIGH_Q_DEPTH' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_IGQ_PUT_AUTHORITY' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_INDEX_TYPE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_INHIBIT_EVENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_INHIBIT_GET' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_INHIBIT_PUB' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_INHIBIT_PUT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_INHIBIT_SUB' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_INTRA_GROUP_QUEUING' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_IP_ADDRESS_VERSION' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_LAST' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_LISTENER_PORT_NUMBER' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_LISTENER_TIMER' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_LOCAL_EVENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_LOGGER_EVENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_LU62_CHANNELS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_MASTER_ADMIN' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_MAX_CHANNELS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_MAX_CLIENTS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_MAX_GLOBAL_LOCKS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_MAX_HANDLES' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_MAX_LOCAL_LOCKS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_MAX_MSG_LENGTH' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_MAX_OPEN_Q' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_MAX_PRIORITY' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_MAX_PROPERTIES_LENGTH' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_MAX_Q_DEPTH' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_MAX_Q_TRIGGERS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_MAX_RECOVERY_TASKS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_MAX_RESPONSES' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_MAX_UNCOMMITTED_MSGS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_MCAST_BRIDGE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_MONITORING_AUTO_CLUSSDR' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_MONITORING_CHANNEL' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_MONITORING_Q' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_MONITOR_INTERVAL' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_MSG_DELIVERY_SEQUENCE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_MSG_DEQ_COUNT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_MSG_ENQ_COUNT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_MSG_MARK_BROWSE_INTERVAL' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_MULTICAST' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_NAMELIST_TYPE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_NAME_COUNT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_NPM_CLASS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_NPM_DELIVERY' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_OPEN_INPUT_COUNT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_OPEN_OUTPUT_COUNT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_OUTBOUND_PORT_MAX' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_OUTBOUND_PORT_MIN' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_PAGESET_ID' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_PERFORMANCE_EVENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_PLATFORM' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_PM_DELIVERY' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_POLICY_VERSION' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_PROPERTY_CONTROL' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_PROT_POLICY_CAPABILITY' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_PROXY_SUB' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_PUBSUB_CLUSTER' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_PUBSUB_MAXMSG_RETRY_COUNT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_PUBSUB_MODE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_PUBSUB_NP_MSG' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_PUBSUB_NP_RESP' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_PUBSUB_SYNC_PT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_PUB_COUNT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_PUB_SCOPE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_QMGR_CFCONLOS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_QMOPT_CONS_COMMS_MSGS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_QMOPT_CONS_CRITICAL_MSGS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_QMOPT_CONS_ERROR_MSGS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_QMOPT_CONS_INFO_MSGS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_QMOPT_CONS_REORG_MSGS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_QMOPT_CONS_SYSTEM_MSGS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_QMOPT_CONS_WARNING_MSGS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_QMOPT_CSMT_ON_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_QMOPT_INTERNAL_DUMP' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_QMOPT_LOG_COMMS_MSGS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_QMOPT_LOG_CRITICAL_MSGS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_QMOPT_LOG_ERROR_MSGS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_QMOPT_LOG_INFO_MSGS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_QMOPT_LOG_REORG_MSGS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_QMOPT_LOG_SYSTEM_MSGS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_QMOPT_LOG_WARNING_MSGS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_QMOPT_TRACE_COMMS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_QMOPT_TRACE_CONVERSION' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_QMOPT_TRACE_MQI_CALLS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_QMOPT_TRACE_REORG' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_QMOPT_TRACE_SYSTEM' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_QSG_DISP' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_Q_DEPTH_HIGH_EVENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_Q_DEPTH_HIGH_LIMIT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_Q_DEPTH_LOW_EVENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_Q_DEPTH_LOW_LIMIT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_Q_DEPTH_MAX_EVENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_Q_SERVICE_INTERVAL' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_Q_SERVICE_INTERVAL_EVENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_Q_TYPE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_Q_USERS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_READ_AHEAD' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_RECEIVE_TIMEOUT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_RECEIVE_TIMEOUT_MIN' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_RECEIVE_TIMEOUT_TYPE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_REMOTE_EVENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_RESPONSE_RESTART_POINT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_RETENTION_INTERVAL' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_SCOPE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_SECURITY_CASE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_SERVICE_CONTROL' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_SERVICE_TYPE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_SHAREABILITY' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_SHARED_Q_Q_MGR_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_SIGNATURE_ALGORITHM' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_SSL_EVENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_SSL_FIPS_REQUIRED' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_SSL_RESET_COUNT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_SSL_TASKS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_START_STOP_EVENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_STATISTICS_AUTO_CLUSSDR' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_STATISTICS_CHANNEL' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_STATISTICS_INTERVAL' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_STATISTICS_MQI' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_STATISTICS_Q' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_SUB_CONFIGURATION_EVENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_SUB_COUNT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_SUB_SCOPE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_SUITE_B_STRENGTH' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_SYNCPOINT' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_TCP_CHANNELS' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_TCP_KEEP_ALIVE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_TCP_STACK_TYPE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_TIME_SINCE_RESET' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_TOLERATE_UNPROTECTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_TOPIC_DEF_PERSISTENCE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_TOPIC_TYPE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_TRACE_ROUTE_RECORDING' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_TREE_LIFE_TIME' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_TRIGGER_CONTROL' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_TRIGGER_DEPTH' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_TRIGGER_INTERVAL' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_TRIGGER_MSG_PRIORITY' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_TRIGGER_RESTART' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_TRIGGER_TYPE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_UR_DISP' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_USAGE' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_USER_LIST' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_USE_DEAD_LETTER_Q' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_WILDCARD_OPERATION' => 'mqseries/mqseries.stub', 'MQSERIES_MQIA_XR_CAPABILITY' => 'mqseries/mqseries.stub', 'MQSERIES_MQMD_CURRENT_VERSION' => 'mqseries/mqseries.stub', 'MQSERIES_MQMD_VERSION_1' => 'mqseries/mqseries.stub', 'MQSERIES_MQMD_VERSION_2' => 'mqseries/mqseries.stub', 'MQSERIES_MQMF_ACCEPT_UNSUP_IF_XMIT_MASK' => 'mqseries/mqseries.stub', 'MQSERIES_MQMF_ACCEPT_UNSUP_MASK' => 'mqseries/mqseries.stub', 'MQSERIES_MQMF_LAST_MSG_IN_GROUP' => 'mqseries/mqseries.stub', 'MQSERIES_MQMF_LAST_SEGMENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQMF_MSG_IN_GROUP' => 'mqseries/mqseries.stub', 'MQSERIES_MQMF_NONE' => 'mqseries/mqseries.stub', 'MQSERIES_MQMF_REJECT_UNSUP_MASK' => 'mqseries/mqseries.stub', 'MQSERIES_MQMF_SEGMENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQMF_SEGMENTATION_ALLOWED' => 'mqseries/mqseries.stub', 'MQSERIES_MQMF_SEGMENTATION_INHIBITED' => 'mqseries/mqseries.stub', 'MQSERIES_MQMI_NONE' => 'mqseries/mqseries.stub', 'MQSERIES_MQMO_MATCH_CORREL_ID' => 'mqseries/mqseries.stub', 'MQSERIES_MQMO_MATCH_GROUP_ID' => 'mqseries/mqseries.stub', 'MQSERIES_MQMO_MATCH_MSG_ID' => 'mqseries/mqseries.stub', 'MQSERIES_MQMO_MATCH_MSG_SEQ_NUMBER' => 'mqseries/mqseries.stub', 'MQSERIES_MQMO_MATCH_MSG_TOKEN' => 'mqseries/mqseries.stub', 'MQSERIES_MQMO_MATCH_OFFSET' => 'mqseries/mqseries.stub', 'MQSERIES_MQMO_NONE' => 'mqseries/mqseries.stub', 'MQSERIES_MQMTOK_NONE' => 'mqseries/mqseries.stub', 'MQSERIES_MQMT_APPL_FIRST' => 'mqseries/mqseries.stub', 'MQSERIES_MQMT_APPL_LAST' => 'mqseries/mqseries.stub', 'MQSERIES_MQMT_DATAGRAM' => 'mqseries/mqseries.stub', 'MQSERIES_MQMT_MQE_FIELDS' => 'mqseries/mqseries.stub', 'MQSERIES_MQMT_MQE_FIELDS_FROM_MQE' => 'mqseries/mqseries.stub', 'MQSERIES_MQMT_REPLY' => 'mqseries/mqseries.stub', 'MQSERIES_MQMT_REPORT' => 'mqseries/mqseries.stub', 'MQSERIES_MQMT_REQUEST' => 'mqseries/mqseries.stub', 'MQSERIES_MQMT_SYSTEM_FIRST' => 'mqseries/mqseries.stub', 'MQSERIES_MQMT_SYSTEM_LAST' => 'mqseries/mqseries.stub', 'MQSERIES_MQOD_CURRENT_VERSION' => 'mqseries/mqseries.stub', 'MQSERIES_MQOD_VERSION_1' => 'mqseries/mqseries.stub', 'MQSERIES_MQOD_VERSION_2' => 'mqseries/mqseries.stub', 'MQSERIES_MQOD_VERSION_3' => 'mqseries/mqseries.stub', 'MQSERIES_MQOD_VERSION_4' => 'mqseries/mqseries.stub', 'MQSERIES_MQOL_UNDEFINED' => 'mqseries/mqseries.stub', 'MQSERIES_MQOO_ALTERNATE_USER_AUTHORITY' => 'mqseries/mqseries.stub', 'MQSERIES_MQOO_BIND_AS_Q_DEF' => 'mqseries/mqseries.stub', 'MQSERIES_MQOO_BIND_NOT_FIXED' => 'mqseries/mqseries.stub', 'MQSERIES_MQOO_BIND_ON_GROUP' => 'mqseries/mqseries.stub', 'MQSERIES_MQOO_BIND_ON_OPEN' => 'mqseries/mqseries.stub', 'MQSERIES_MQOO_BROWSE' => 'mqseries/mqseries.stub', 'MQSERIES_MQOO_CO_OP' => 'mqseries/mqseries.stub', 'MQSERIES_MQOO_FAIL_IF_QUIESCING' => 'mqseries/mqseries.stub', 'MQSERIES_MQOO_INPUT_AS_Q_DEF' => 'mqseries/mqseries.stub', 'MQSERIES_MQOO_INPUT_EXCLUSIVE' => 'mqseries/mqseries.stub', 'MQSERIES_MQOO_INPUT_SHARED' => 'mqseries/mqseries.stub', 'MQSERIES_MQOO_INQUIRE' => 'mqseries/mqseries.stub', 'MQSERIES_MQOO_NO_MULTICAST' => 'mqseries/mqseries.stub', 'MQSERIES_MQOO_NO_READ_AHEAD' => 'mqseries/mqseries.stub', 'MQSERIES_MQOO_OUTPUT' => 'mqseries/mqseries.stub', 'MQSERIES_MQOO_PASS_ALL_CONTEXT' => 'mqseries/mqseries.stub', 'MQSERIES_MQOO_PASS_IDENTITY_CONTEXT' => 'mqseries/mqseries.stub', 'MQSERIES_MQOO_READ_AHEAD' => 'mqseries/mqseries.stub', 'MQSERIES_MQOO_READ_AHEAD_AS_Q_DEF' => 'mqseries/mqseries.stub', 'MQSERIES_MQOO_RESOLVE_LOCAL_Q' => 'mqseries/mqseries.stub', 'MQSERIES_MQOO_RESOLVE_LOCAL_TOPIC' => 'mqseries/mqseries.stub', 'MQSERIES_MQOO_SAVE_ALL_CONTEXT' => 'mqseries/mqseries.stub', 'MQSERIES_MQOO_SET' => 'mqseries/mqseries.stub', 'MQSERIES_MQOO_SET_ALL_CONTEXT' => 'mqseries/mqseries.stub', 'MQSERIES_MQOO_SET_IDENTITY_CONTEXT' => 'mqseries/mqseries.stub', 'MQSERIES_MQOT_AUTH_INFO' => 'mqseries/mqseries.stub', 'MQSERIES_MQOT_CF_STRUC' => 'mqseries/mqseries.stub', 'MQSERIES_MQOT_CHANNEL' => 'mqseries/mqseries.stub', 'MQSERIES_MQOT_COMM_INFO' => 'mqseries/mqseries.stub', 'MQSERIES_MQOT_LISTENER' => 'mqseries/mqseries.stub', 'MQSERIES_MQOT_NAMELIST' => 'mqseries/mqseries.stub', 'MQSERIES_MQOT_NONE' => 'mqseries/mqseries.stub', 'MQSERIES_MQOT_PROCESS' => 'mqseries/mqseries.stub', 'MQSERIES_MQOT_Q' => 'mqseries/mqseries.stub', 'MQSERIES_MQOT_Q_MGR' => 'mqseries/mqseries.stub', 'MQSERIES_MQOT_RESERVED_1' => 'mqseries/mqseries.stub', 'MQSERIES_MQOT_SERVICE' => 'mqseries/mqseries.stub', 'MQSERIES_MQOT_STORAGE_CLASS' => 'mqseries/mqseries.stub', 'MQSERIES_MQOT_TOPIC' => 'mqseries/mqseries.stub', 'MQSERIES_MQPER_NOT_PERSISTENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQPER_PERSISTENCE_AS_PARENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQPER_PERSISTENCE_AS_Q_DEF' => 'mqseries/mqseries.stub', 'MQSERIES_MQPER_PERSISTENCE_AS_TOPIC_DEF' => 'mqseries/mqseries.stub', 'MQSERIES_MQPER_PERSISTENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_ALTERNATE_USER_AUTHORITY' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_ASYNC_RESPONSE' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_CURRENT_VERSION' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_DEFAULT_CONTEXT' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_FAIL_IF_QUIESCING' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_LOGICAL_ORDER' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_MD_FOR_OUTPUT_ONLY' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_NEW_CORREL_ID' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_NEW_MSG_ID' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_NONE' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_NOT_OWN_SUBS' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_NO_CONTEXT' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_NO_SYNCPOINT' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_PASS_ALL_CONTEXT' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_PASS_IDENTITY_CONTEXT' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_RESOLVE_LOCAL_Q' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_RESPONSE_AS_Q_DEF' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_RESPONSE_AS_TOPIC_DEF' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_RETAIN' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_SCOPE_QMGR' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_SET_ALL_CONTEXT' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_SET_IDENTITY_CONTEXT' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_SUPPRESS_REPLYTO' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_SYNCPOINT' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_SYNC_RESPONSE' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_VERSION_1' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_VERSION_2' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_VERSION_3' => 'mqseries/mqseries.stub', 'MQSERIES_MQPMO_WARN_IF_NO_SUBS_MATCHED' => 'mqseries/mqseries.stub', 'MQSERIES_MQPRI_PRIORITY_AS_PARENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQPRI_PRIORITY_AS_PUBLISHED' => 'mqseries/mqseries.stub', 'MQSERIES_MQPRI_PRIORITY_AS_Q_DEF' => 'mqseries/mqseries.stub', 'MQSERIES_MQPRI_PRIORITY_AS_TOPIC_DEF' => 'mqseries/mqseries.stub', 'MQSERIES_MQPRT_ASYNC_RESPONSE' => 'mqseries/mqseries.stub', 'MQSERIES_MQPRT_RESPONSE_AS_PARENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQPRT_SYNC_RESPONSE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_ACTION_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_ADAPTER_CONN_LOAD_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_ADAPTER_CONV_LOAD_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_ADAPTER_DEFS_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_ADAPTER_DEFS_LOAD_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_ADAPTER_DISC_LOAD_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_ADAPTER_NOT_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_ADAPTER_SERV_LOAD_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_ADAPTER_STORAGE_SHORTAGE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_AIR_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_ALIAS_BASE_Q_TYPE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_ALIAS_TARGTYPE_CHANGED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_ALREADY_CONNECTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_ALREADY_JOINED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_ALTER_SUB_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_ANOTHER_Q_MGR_CONNECTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_API_EXIT_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_API_EXIT_INIT_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_API_EXIT_LOAD_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_API_EXIT_NOT_FOUND' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_API_EXIT_TERM_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_APPL_FIRST' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_APPL_LAST' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_ASID_MISMATCH' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_ASYNC_UOW_CONFLICT' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_ASYNC_XA_CONFLICT' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_ATTRIBUTE_LOCKED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_AUTH_INFO_CONN_NAME_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_AUTH_INFO_REC_COUNT_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_AUTH_INFO_REC_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_AUTH_INFO_TYPE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_BACKED_OUT' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_BACKOUT_THRESHOLD_REACHED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_BAG_CONVERSION_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_BAG_WRONG_TYPE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_BINARY_DATA_LENGTH_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_BMHO_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_BO_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_BRIDGE_STARTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_BRIDGE_STOPPED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_BUFFER_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_BUFFER_LENGTH_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_BUFFER_NOT_AUTOMATIC' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CALLBACK_LINK_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CALLBACK_NOT_REGISTERED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CALLBACK_ROUTINE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CALLBACK_TYPE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CALL_INTERRUPTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CALL_IN_PROGRESS' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CBD_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CBD_OPTIONS_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CD_ARRAY_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CD_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CERT_VAL_POLICY_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CFBF_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CFBS_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CFGR_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CFH_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CFIF_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CFIL_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CFIN_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CFSF_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CFSL_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CFST_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CF_NOT_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CF_STRUC_AUTH_FAILED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CF_STRUC_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CF_STRUC_FAILED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CF_STRUC_IN_USE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CF_STRUC_LIST_HDR_IN_USE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CHANNEL_ACTIVATED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CHANNEL_AUTO_DEF_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CHANNEL_AUTO_DEF_OK' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CHANNEL_BLOCKED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CHANNEL_BLOCKED_WARNING' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CHANNEL_CONFIG_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CHANNEL_CONV_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CHANNEL_NOT_ACTIVATED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CHANNEL_NOT_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CHANNEL_SSL_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CHANNEL_SSL_WARNING' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CHANNEL_STARTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CHANNEL_STOPPED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CHANNEL_STOPPED_BY_USER' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CHAR_ATTRS_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CHAR_ATTRS_TOO_SHORT' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CHAR_ATTR_LENGTH_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CHAR_CONVERSION_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CICS_BRIDGE_RESTRICTION' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CICS_WAIT_FAILED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CIPHER_SPEC_NOT_SUITE_B' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CLIENT_CHANNEL_CONFLICT' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CLIENT_CONN_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CLIENT_EXIT_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CLIENT_EXIT_LOAD_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CLUSTER_EXIT_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CLUSTER_EXIT_LOAD_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CLUSTER_PUT_INHIBITED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CLUSTER_RESOLUTION_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CLUSTER_RESOURCE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CMD_SERVER_NOT_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CMHO_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CNO_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CODED_CHAR_SET_ID_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_COD_NOT_VALID_FOR_XCF_Q' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_COMMAND_MQSC' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_COMMAND_PCF' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_COMMAND_TYPE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_COMMINFO_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CONFIG_CHANGE_OBJECT' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CONFIG_CREATE_OBJECT' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CONFIG_DELETE_OBJECT' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CONFIG_REFRESH_OBJECT' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CONNECTION_BROKEN' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CONNECTION_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CONNECTION_NOT_AUTHORIZED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CONNECTION_NOT_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CONNECTION_QUIESCING' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CONNECTION_STOPPED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CONNECTION_STOPPING' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CONNECTION_SUSPENDED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CONN_ID_IN_USE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CONN_TAG_IN_USE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CONN_TAG_NOT_RELEASED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CONN_TAG_NOT_USABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CONTENT_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CONTEXT_HANDLE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CONTEXT_NOT_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CONTEXT_OBJECT_NOT_VALID' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CONTEXT_OPEN_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CONVERTED_MSG_TOO_BIG' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CONVERTED_STRING_TOO_BIG' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CORREL_ID_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CRYPTO_HARDWARE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CTLO_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CURRENT_RECORD_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_CURSOR_NOT_VALID' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_DATA_LENGTH_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_DATA_SET_NOT_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_DATA_TRUNCATED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_DB2_NOT_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_DBCS_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_DEF_SYNCPOINT_INHIBITED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_DEF_XMIT_Q_TYPE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_DEF_XMIT_Q_USAGE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_DEST_CLASS_NOT_ALTERABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_DEST_ENV_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_DEST_NAME_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_DH_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_DISTRIBUTION_LIST_EMPTY' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_DLH_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_DMHO_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_DMPO_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_DUPLICATE_GROUP_SUB' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_DUPLICATE_RECOV_COORD' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_DURABILITY_NOT_ALLOWED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_DURABILITY_NOT_ALTERABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_DYNAMIC_Q_NAME_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_ENCODING_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_ENCODING_NOT_SUPPORTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_ENVIRONMENT_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_EPH_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_EXIT_PROPS_NOT_SUPPORTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_EXIT_REASON_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_EXPIRY_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_FASTPATH_NOT_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_FEEDBACK_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_FILE_NOT_AUDITED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_FILE_SYSTEM_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_FILTER_OPERATOR_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_FORMAT_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_FORMAT_NOT_SUPPORTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_FUNCTION_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_FUNCTION_NOT_SUPPORTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_GET_ENABLED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_GET_INHIBITED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_GLOBAL_UOW_CONFLICT' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_GMO_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_GROUPING_NOT_ALLOWED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_GROUPING_NOT_ALTERABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_GROUP_ADDRESS_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_GROUP_ID_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_HANDLE_IN_USE_FOR_UOW' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_HANDLE_NOT_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_HBAG_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_HCONFIG_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_HCONN_ASYNC_ACTIVE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_HCONN_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_HEADER_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_HMSG_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_HMSG_NOT_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_HOBJ_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_HOBJ_QUIESCED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_HOBJ_QUIESCED_NO_MSGS' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_HOST_NOT_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_IDENTITY_MISMATCH' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_IIH_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_IMPO_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_INCOMPLETE_GROUP' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_INCOMPLETE_MSG' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_INCONSISTENT_BROWSE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_INCONSISTENT_CCSIDS' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_INCONSISTENT_ENCODINGS' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_INCONSISTENT_FORMAT' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_INCONSISTENT_ITEM_TYPE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_INCONSISTENT_OBJECT_STATE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_INCONSISTENT_OPEN_OPTIONS' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_INCONSISTENT_PERSISTENCE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_INCONSISTENT_UOW' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_INDEX_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_INDEX_NOT_PRESENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_INHIBIT_VALUE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_INITIALIZATION_FAILED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_INQUIRY_COMMAND_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_INSTALLATION_MISMATCH' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_INSTALLATION_MISSING' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_INSUFFICIENT_BUFFER' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_INSUFFICIENT_DATA' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_INT_ATTRS_ARRAY_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_INT_ATTR_COUNT_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_INT_ATTR_COUNT_TOO_SMALL' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_INVALID_DESTINATION' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_INVALID_MSG_UNDER_CURSOR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_INVALID_SUBSCRIPTION' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_ITEM_COUNT_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_ITEM_TYPE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_ITEM_VALUE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_JMS_FORMAT_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_JSSE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_KEY_REPOSITORY_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_LDAP_PASSWORD_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_LDAP_USER_NAME_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_LDAP_USER_NAME_LENGTH_ERR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_LOCAL_UOW_CONFLICT' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_LOGGER_STATUS' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_LOOPING_PUBLICATION' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MATCH_OPTIONS_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MAX_CONNS_LIMIT_REACHED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MAX_MSG_LENGTH_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MCAST_PUB_STATUS' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MCAST_SUB_STATUS' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MDE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MD_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MHBO_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MISSING_REPLY_TO_Q' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MISSING_WIH' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MIXED_CONTENT_NOT_ALLOWED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MODULE_ENTRY_NOT_FOUND' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MODULE_INVALID' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MODULE_NOT_FOUND' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MSG_FLAGS_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MSG_HANDLE_COPY_FAILURE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MSG_HANDLE_IN_USE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MSG_ID_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MSG_MARKED_BROWSE_CO_OP' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MSG_NOT_ALLOWED_IN_GROUP' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MSG_NOT_MATCHED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MSG_SEQ_NUMBER_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MSG_TOKEN_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MSG_TOO_BIG_FOR_CHANNEL' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MSG_TOO_BIG_FOR_Q' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MSG_TOO_BIG_FOR_Q_MGR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MSG_TYPE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MULTICAST_CONFIG_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MULTICAST_INTERFACE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MULTICAST_INTERNAL_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MULTICAST_ONLY' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MULTICAST_SEND_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MULTIPLE_INSTANCE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_MULTIPLE_REASONS' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NAME_IN_USE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NAME_NOT_VALID_FOR_TYPE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NEGATIVE_LENGTH' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NEGATIVE_OFFSET' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NESTED_BAG_NOT_SUPPORTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NESTED_SELECTOR_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NEXT_OFFSET_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NEXT_RECORD_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NONE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NOT_AUTHORIZED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NOT_CONNECTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NOT_CONVERTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NOT_OPEN' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NOT_OPEN_FOR_BROWSE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NOT_OPEN_FOR_INPUT' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NOT_OPEN_FOR_INQUIRE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NOT_OPEN_FOR_OUTPUT' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NOT_OPEN_FOR_PASS_ALL' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NOT_OPEN_FOR_PASS_IDENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NOT_OPEN_FOR_SET' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NOT_OPEN_FOR_SET_ALL' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NOT_OPEN_FOR_SET_IDENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NOT_PRIVILEGED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NO_BUFFER' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NO_CALLBACKS_ACTIVE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NO_CONNECTION_REFERENCE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NO_DATA_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NO_DESTINATIONS_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NO_EXTERNAL_PARTICIPANTS' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NO_MSG_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NO_MSG_LOCKED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NO_MSG_UNDER_CURSOR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NO_RECORD_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NO_RETAINED_MSG' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NO_SUBSCRIPTION' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NO_SUBS_MATCHED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_NULL_POINTER' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_OBJECT_ALREADY_EXISTS' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_OBJECT_CHANGED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_OBJECT_DAMAGED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_OBJECT_IN_USE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_OBJECT_LEVEL_INCOMPATIBLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_OBJECT_NAME_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_OBJECT_NOT_UNIQUE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_OBJECT_Q_MGR_NAME_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_OBJECT_RECORDS_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_OBJECT_STRING_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_OBJECT_TYPE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_OCSP_URL_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_OD_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_OFFSET_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_OPEN_FAILED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_OPERATION_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_OPERATION_NOT_ALLOWED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_OPTIONS_CHANGED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_OPTIONS_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_OPTION_ENVIRONMENT_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_OPTION_NOT_VALID_FOR_TYPE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_ORIGINAL_LENGTH_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_OUTCOME_MIXED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_OUTCOME_PENDING' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_OUT_SELECTOR_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PAGESET_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PAGESET_FULL' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PARAMETER_MISSING' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PARTIALLY_CONVERTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PARTICIPANT_NOT_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PARTICIPANT_NOT_DEFINED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PCF_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PD_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PERSISTENCE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PERSISTENT_NOT_ALLOWED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PMO_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PMO_RECORD_FLAGS_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PRECONN_EXIT_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PRECONN_EXIT_LOAD_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PRECONN_EXIT_NOT_FOUND' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PRIORITY_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PRIORITY_EXCEEDS_MAXIMUM' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PROPERTIES_DISABLED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PROPERTIES_TOO_BIG' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PROPERTY_NAME_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PROPERTY_NAME_LENGTH_ERR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PROPERTY_NAME_TOO_BIG' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PROPERTY_NOT_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PROPERTY_TYPE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PROPERTY_VALUE_TOO_BIG' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PROP_CONV_NOT_SUPPORTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PROP_NAME_NOT_CONVERTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PROP_NUMBER_FORMAT_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PROP_TYPE_NOT_SUPPORTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PROP_VALUE_NOT_CONVERTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PUBLICATION_FAILURE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PUBLISH_EXIT_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PUBSUB_INHIBITED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PUT_INHIBITED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PUT_MSG_RECORDS_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_PUT_NOT_RETAINED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_Q_ALREADY_EXISTS' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_Q_DELETED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_Q_DEPTH_HIGH' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_Q_DEPTH_LOW' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_Q_FULL' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_Q_INDEX_TYPE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_Q_MGR_ACTIVE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_Q_MGR_NAME_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_Q_MGR_NOT_ACTIVE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_Q_MGR_NOT_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_Q_MGR_QUIESCING' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_Q_MGR_STOPPING' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_Q_NOT_EMPTY' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_Q_SERVICE_INTERVAL_HIGH' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_Q_SERVICE_INTERVAL_OK' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_Q_SPACE_NOT_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_Q_TYPE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_RAS_PROPERTY_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_READ_AHEAD_MSGS' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_RECONNECTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_RECONNECTING' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_RECONNECT_FAILED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_RECONNECT_INCOMPATIBLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_RECONNECT_QMID_MISMATCH' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_RECONNECT_Q_MGR_REQD' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_RECONNECT_TIMED_OUT' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_RECS_PRESENT_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_REFERENCE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_REMOTE_Q_NAME_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_REOPEN_EXCL_INPUT_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_REOPEN_INQUIRE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_REOPEN_SAVED_CONTEXT_ERR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_REOPEN_TEMPORARY_Q_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_REPORT_OPTIONS_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_RESERVED_VALUE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_RESOURCE_PROBLEM' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_RESPONSE_RECORDS_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_RES_OBJECT_STRING_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_RETAINED_MSG_Q_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_RETAINED_NOT_DELIVERED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_RFH_COMMAND_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_RFH_DUPLICATE_PARM' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_RFH_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_RFH_FORMAT_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_RFH_HEADER_FIELD_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_RFH_PARM_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_RFH_PARM_MISSING' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_RFH_RESTRICTED_FORMAT_ERR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_RFH_STRING_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_RMH_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SCO_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SD_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SECOND_MARK_NOT_ALLOWED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SECURITY_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SEGMENTATION_NOT_ALLOWED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SEGMENTS_NOT_SUPPORTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SEGMENT_LENGTH_ZERO' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SELECTION_NOT_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SELECTION_STRING_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SELECTOR_ALWAYS_FALSE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SELECTOR_COUNT_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SELECTOR_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SELECTOR_INVALID_FOR_TYPE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SELECTOR_LIMIT_EXCEEDED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SELECTOR_NOT_ALTERABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SELECTOR_NOT_FOR_TYPE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SELECTOR_NOT_PRESENT' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SELECTOR_NOT_SUPPORTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SELECTOR_NOT_UNIQUE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SELECTOR_OUT_OF_RANGE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SELECTOR_SYNTAX_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SELECTOR_TYPE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SELECTOR_WRONG_TYPE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SERVICE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SERVICE_NOT_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SIGNAL1_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SIGNAL_OUTSTANDING' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SIGNAL_REQUEST_ACCEPTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SMPO_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SOAP_AXIS_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SOAP_DOTNET_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SOAP_URL_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SOURCE_BUFFER_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SOURCE_CCSID_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SOURCE_DECIMAL_ENC_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SOURCE_FLOAT_ENC_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SOURCE_INTEGER_ENC_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SOURCE_LENGTH_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SRC_ENV_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SRC_NAME_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SRO_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SSL_ALREADY_INITIALIZED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SSL_ALT_PROVIDER_REQUIRED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SSL_CERTIFICATE_REVOKED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SSL_CERT_STORE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SSL_CONFIG_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SSL_INITIALIZATION_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SSL_KEY_RESET_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SSL_NOT_ALLOWED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SSL_PEER_NAME_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SSL_PEER_NAME_MISMATCH' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_STANDBY_Q_MGR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_STAT_TYPE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_STOPPED_BY_CLUSTER_EXIT' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_STORAGE_CLASS_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_STORAGE_MEDIUM_FULL' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_STORAGE_NOT_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_STRING_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_STRING_LENGTH_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_STRING_TRUNCATED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_STRUC_ID_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_STRUC_LENGTH_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_STS_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SUBLEVEL_NOT_ALTERABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SUBSCRIPTION_CHANGE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SUBSCRIPTION_CREATE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SUBSCRIPTION_DELETE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SUBSCRIPTION_IN_USE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SUBSCRIPTION_REFRESH' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SUB_ALREADY_EXISTS' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SUB_INHIBITED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SUB_NAME_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SUB_USER_DATA_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SUITE_B_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SUPPRESSED_BY_EXIT' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SYNCPOINT_LIMIT_REACHED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SYNCPOINT_NOT_ALLOWED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SYNCPOINT_NOT_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SYSTEM_BAG_NOT_ALTERABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SYSTEM_BAG_NOT_DELETABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SYSTEM_ITEM_NOT_ALTERABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_SYSTEM_ITEM_NOT_DELETABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_TARGET_BUFFER_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_TARGET_CCSID_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_TARGET_DECIMAL_ENC_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_TARGET_FLOAT_ENC_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_TARGET_INTEGER_ENC_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_TARGET_LENGTH_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_TERMINATION_FAILED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_TMC_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_TM_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_TOPIC_NOT_ALTERABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_TOPIC_STRING_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_TRIGGER_CONTROL_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_TRIGGER_DEPTH_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_TRIGGER_MSG_PRIORITY_ERR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_TRIGGER_TYPE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_TRUNCATED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_TRUNCATED_MSG_ACCEPTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_TRUNCATED_MSG_FAILED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_UCS2_CONVERSION_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_UNEXPECTED_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_UNIT_OF_WORK_NOT_STARTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_UNKNOWN_ALIAS_BASE_Q' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_UNKNOWN_AUTH_ENTITY' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_UNKNOWN_CHANNEL_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_UNKNOWN_COMPONENT_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_UNKNOWN_DEF_XMIT_Q' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_UNKNOWN_ENTITY' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_UNKNOWN_OBJECT_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_UNKNOWN_OBJECT_Q_MGR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_UNKNOWN_Q_NAME' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_UNKNOWN_REF_OBJECT' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_UNKNOWN_REMOTE_Q_MGR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_UNKNOWN_REPORT_OPTION' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_UNKNOWN_XMIT_Q' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_UNSUPPORTED_CIPHER_SUITE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_UNSUPPORTED_PROPERTY' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_UOW_CANCELED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_UOW_COMMITTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_UOW_ENLISTMENT_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_UOW_IN_PROGRESS' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_UOW_MIX_NOT_SUPPORTED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_UOW_NOT_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_USER_ID_NOT_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_WAIT_INTERVAL_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_WIH_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_WRONG_CF_LEVEL' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_WRONG_GMO_VERSION' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_WRONG_MD_VERSION' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_WRONG_VERSION' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_WXP_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_XEPO_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_XMIT_Q_TYPE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_XMIT_Q_USAGE_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_XQH_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_XR_NOT_AVAILABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_XWAIT_CANCELED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_XWAIT_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQRC_ZERO_LENGTH' => 'mqseries/mqseries.stub', 'MQSERIES_MQRL_UNDEFINED' => 'mqseries/mqseries.stub', 'MQSERIES_MQRO_ACCEPT_UNSUP_IF_XMIT_MASK' => 'mqseries/mqseries.stub', 'MQSERIES_MQRO_ACCEPT_UNSUP_MASK' => 'mqseries/mqseries.stub', 'MQSERIES_MQRO_ACTIVITY' => 'mqseries/mqseries.stub', 'MQSERIES_MQRO_COA' => 'mqseries/mqseries.stub', 'MQSERIES_MQRO_COA_WITH_DATA' => 'mqseries/mqseries.stub', 'MQSERIES_MQRO_COA_WITH_FULL_DATA' => 'mqseries/mqseries.stub', 'MQSERIES_MQRO_COD' => 'mqseries/mqseries.stub', 'MQSERIES_MQRO_COD_WITH_DATA' => 'mqseries/mqseries.stub', 'MQSERIES_MQRO_COD_WITH_FULL_DATA' => 'mqseries/mqseries.stub', 'MQSERIES_MQRO_COPY_MSG_ID_TO_CORREL_ID' => 'mqseries/mqseries.stub', 'MQSERIES_MQRO_DEAD_LETTER_Q' => 'mqseries/mqseries.stub', 'MQSERIES_MQRO_DISCARD_MSG' => 'mqseries/mqseries.stub', 'MQSERIES_MQRO_EXCEPTION' => 'mqseries/mqseries.stub', 'MQSERIES_MQRO_EXCEPTION_WITH_DATA' => 'mqseries/mqseries.stub', 'MQSERIES_MQRO_EXCEPTION_WITH_FULL_DATA' => 'mqseries/mqseries.stub', 'MQSERIES_MQRO_EXPIRATION' => 'mqseries/mqseries.stub', 'MQSERIES_MQRO_EXPIRATION_WITH_DATA' => 'mqseries/mqseries.stub', 'MQSERIES_MQRO_EXPIRATION_WITH_FULL_DATA' => 'mqseries/mqseries.stub', 'MQSERIES_MQRO_NAN' => 'mqseries/mqseries.stub', 'MQSERIES_MQRO_NEW_MSG_ID' => 'mqseries/mqseries.stub', 'MQSERIES_MQRO_NONE' => 'mqseries/mqseries.stub', 'MQSERIES_MQRO_PAN' => 'mqseries/mqseries.stub', 'MQSERIES_MQRO_PASS_CORREL_ID' => 'mqseries/mqseries.stub', 'MQSERIES_MQRO_PASS_DISCARD_AND_EXPIRY' => 'mqseries/mqseries.stub', 'MQSERIES_MQRO_PASS_MSG_ID' => 'mqseries/mqseries.stub', 'MQSERIES_MQRO_REJECT_UNSUP_MASK' => 'mqseries/mqseries.stub', 'MQSERIES_MQSO_ALTER' => 'mqseries/mqseries.stub', 'MQSERIES_MQSO_ALTERNATE_USER_AUTHORITY' => 'mqseries/mqseries.stub', 'MQSERIES_MQSO_ANY_USERID' => 'mqseries/mqseries.stub', 'MQSERIES_MQSO_CREATE' => 'mqseries/mqseries.stub', 'MQSERIES_MQSO_DURABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQSO_FAIL_IF_QUIESCING' => 'mqseries/mqseries.stub', 'MQSERIES_MQSO_FIXED_USERID' => 'mqseries/mqseries.stub', 'MQSERIES_MQSO_GROUP_SUB' => 'mqseries/mqseries.stub', 'MQSERIES_MQSO_MANAGED' => 'mqseries/mqseries.stub', 'MQSERIES_MQSO_NEW_PUBLICATIONS_ONLY' => 'mqseries/mqseries.stub', 'MQSERIES_MQSO_NONE' => 'mqseries/mqseries.stub', 'MQSERIES_MQSO_NON_DURABLE' => 'mqseries/mqseries.stub', 'MQSERIES_MQSO_NO_MULTICAST' => 'mqseries/mqseries.stub', 'MQSERIES_MQSO_NO_READ_AHEAD' => 'mqseries/mqseries.stub', 'MQSERIES_MQSO_PUBLICATIONS_ON_REQUEST' => 'mqseries/mqseries.stub', 'MQSERIES_MQSO_READ_AHEAD' => 'mqseries/mqseries.stub', 'MQSERIES_MQSO_READ_AHEAD_AS_Q_DEF' => 'mqseries/mqseries.stub', 'MQSERIES_MQSO_RESUME' => 'mqseries/mqseries.stub', 'MQSERIES_MQSO_SCOPE_QMGR' => 'mqseries/mqseries.stub', 'MQSERIES_MQSO_SET_CORREL_ID' => 'mqseries/mqseries.stub', 'MQSERIES_MQSO_SET_IDENTITY_CONTEXT' => 'mqseries/mqseries.stub', 'MQSERIES_MQSO_WILDCARD_CHAR' => 'mqseries/mqseries.stub', 'MQSERIES_MQSO_WILDCARD_TOPIC' => 'mqseries/mqseries.stub', 'MQSERIES_MQSTAT_TYPE_ASYNC_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQSTAT_TYPE_RECONNECTION' => 'mqseries/mqseries.stub', 'MQSERIES_MQSTAT_TYPE_RECONNECTION_ERROR' => 'mqseries/mqseries.stub', 'MQSERIES_MQWI_UNLIMITED' => 'mqseries/mqseries.stub', 'MQSERIES_MQXPT_ALL' => 'mqseries/mqseries.stub', 'MQSERIES_MQXPT_DECNET' => 'mqseries/mqseries.stub', 'MQSERIES_MQXPT_LOCAL' => 'mqseries/mqseries.stub', 'MQSERIES_MQXPT_LU62' => 'mqseries/mqseries.stub', 'MQSERIES_MQXPT_NETBIOS' => 'mqseries/mqseries.stub', 'MQSERIES_MQXPT_SPX' => 'mqseries/mqseries.stub', 'MQSERIES_MQXPT_TCP' => 'mqseries/mqseries.stub', 'MQSERIES_MQXPT_UDP' => 'mqseries/mqseries.stub', 'MSG_CMSG_CLOEXEC' => 'sockets/sockets.stub', 'MSG_CONFIRM' => 'sockets/sockets.stub', 'MSG_CTRUNC' => 'sockets/sockets.stub', 'MSG_DONTROUTE' => 'sockets/sockets.stub', 'MSG_DONTWAIT' => 'sockets/sockets.stub', 'MSG_EAGAIN' => 'sysvmsg/sysvmsg.stub', 'MSG_ENOMSG' => 'sysvmsg/sysvmsg.stub', 'MSG_EOF' => 'sockets/sockets.stub', 'MSG_EOR' => 'sockets/sockets.stub', 'MSG_ERRQUEUE' => 'sockets/sockets.stub', 'MSG_EXCEPT' => 'sysvmsg/sysvmsg.stub', 'MSG_IPC_NOWAIT' => 'sysvmsg/sysvmsg.stub', 'MSG_MORE' => 'sockets/sockets.stub', 'MSG_NOERROR' => 'sysvmsg/sysvmsg.stub', 'MSG_NOSIGNAL' => 'sockets/sockets.stub', 'MSG_OOB' => 'sockets/sockets.stub', 'MSG_PEEK' => 'sockets/sockets.stub', 'MSG_TRUNC' => 'sockets/sockets.stub', 'MSG_WAITALL' => 'sockets/sockets.stub', 'MSG_WAITFORONE' => 'sockets/sockets.stub', 'MSG_ZEROCOPY' => 'sockets/sockets.stub', 'MSSQL_ASSOC' => 'mssql/mssql.stub', 'MSSQL_BOTH' => 'mssql/mssql.stub', 'MSSQL_NUM' => 'mssql/mssql.stub', 'MS_ALIGN_CENTER' => 'mapscript/mapscript.stub', 'MS_ALIGN_LEFT' => 'mapscript/mapscript.stub', 'MS_ALIGN_RIGHT' => 'mapscript/mapscript.stub', 'MS_AUTO' => 'mapscript/mapscript.stub', 'MS_AUTO2' => 'mapscript/mapscript.stub', 'MS_CC' => 'mapscript/mapscript.stub', 'MS_CGIERR' => 'mapscript/mapscript.stub', 'MS_CL' => 'mapscript/mapscript.stub', 'MS_CR' => 'mapscript/mapscript.stub', 'MS_DBFERR' => 'mapscript/mapscript.stub', 'MS_DD' => 'mapscript/mapscript.stub', 'MS_DEFAULT' => 'mapscript/mapscript.stub', 'MS_DELETE' => 'mapscript/mapscript.stub', 'MS_EMBED' => 'mapscript/mapscript.stub', 'MS_EOFERR' => 'mapscript/mapscript.stub', 'MS_FALSE' => 'mapscript/mapscript.stub', 'MS_FEET' => 'mapscript/mapscript.stub', 'MS_FOLLOW' => 'mapscript/mapscript.stub', 'MS_GDERR' => 'mapscript/mapscript.stub', 'MS_GD_ALPHA' => 'mapscript/mapscript.stub', 'MS_GET_REQUEST' => 'mapscript/mapscript.stub', 'MS_GIANT' => 'mapscript/mapscript.stub', 'MS_GRATICULE' => 'mapscript/mapscript.stub', 'MS_HASHERR' => 'mapscript/mapscript.stub', 'MS_HILITE' => 'mapscript/mapscript.stub', 'MS_HTTPERR' => 'mapscript/mapscript.stub', 'MS_IDENTERR' => 'mapscript/mapscript.stub', 'MS_IMAGEMODE_BYTE' => 'mapscript/mapscript.stub', 'MS_IMAGEMODE_FEATURE' => 'mapscript/mapscript.stub', 'MS_IMAGEMODE_FLOAT32' => 'mapscript/mapscript.stub', 'MS_IMAGEMODE_INT16' => 'mapscript/mapscript.stub', 'MS_IMAGEMODE_NULL' => 'mapscript/mapscript.stub', 'MS_IMAGEMODE_PC256' => 'mapscript/mapscript.stub', 'MS_IMAGEMODE_RGB' => 'mapscript/mapscript.stub', 'MS_IMAGEMODE_RGBA' => 'mapscript/mapscript.stub', 'MS_IMGERR' => 'mapscript/mapscript.stub', 'MS_INCHES' => 'mapscript/mapscript.stub', 'MS_INLINE' => 'mapscript/mapscript.stub', 'MS_IOERR' => 'mapscript/mapscript.stub', 'MS_JOINERR' => 'mapscript/mapscript.stub', 'MS_KILOMETERS' => 'mapscript/mapscript.stub', 'MS_LABEL_BINDING_ANGLE' => 'mapscript/mapscript.stub', 'MS_LABEL_BINDING_COLOR' => 'mapscript/mapscript.stub', 'MS_LABEL_BINDING_FONT' => 'mapscript/mapscript.stub', 'MS_LABEL_BINDING_OUTLINECOLOR' => 'mapscript/mapscript.stub', 'MS_LABEL_BINDING_POSITION' => 'mapscript/mapscript.stub', 'MS_LABEL_BINDING_PRIORITY' => 'mapscript/mapscript.stub', 'MS_LABEL_BINDING_SHADOWSIZEX' => 'mapscript/mapscript.stub', 'MS_LABEL_BINDING_SHADOWSIZEY' => 'mapscript/mapscript.stub', 'MS_LABEL_BINDING_SIZE' => 'mapscript/mapscript.stub', 'MS_LARGE' => 'mapscript/mapscript.stub', 'MS_LAYER_ANNOTATION' => 'mapscript/mapscript.stub', 'MS_LAYER_CHART' => 'mapscript/mapscript.stub', 'MS_LAYER_CIRCLE' => 'mapscript/mapscript.stub', 'MS_LAYER_LINE' => 'mapscript/mapscript.stub', 'MS_LAYER_POINT' => 'mapscript/mapscript.stub', 'MS_LAYER_POLYGON' => 'mapscript/mapscript.stub', 'MS_LAYER_QUERY' => 'mapscript/mapscript.stub', 'MS_LAYER_RASTER' => 'mapscript/mapscript.stub', 'MS_LAYER_TILEINDEX' => 'mapscript/mapscript.stub', 'MS_LC' => 'mapscript/mapscript.stub', 'MS_LL' => 'mapscript/mapscript.stub', 'MS_LR' => 'mapscript/mapscript.stub', 'MS_MAPCONTEXTERR' => 'mapscript/mapscript.stub', 'MS_MEDIUM' => 'mapscript/mapscript.stub', 'MS_MEMERR' => 'mapscript/mapscript.stub', 'MS_METERS' => 'mapscript/mapscript.stub', 'MS_MILES' => 'mapscript/mapscript.stub', 'MS_MISCERR' => 'mapscript/mapscript.stub', 'MS_MULTIPLE' => 'mapscript/mapscript.stub', 'MS_NAUTICALMILES' => 'mapscript/mapscript.stub', 'MS_NO' => 'mapscript/mapscript.stub', 'MS_NOERR' => 'mapscript/mapscript.stub', 'MS_NONE' => 'mapscript/mapscript.stub', 'MS_NORMAL' => 'mapscript/mapscript.stub', 'MS_NOTFOUND' => 'mapscript/mapscript.stub', 'MS_OFF' => 'mapscript/mapscript.stub', 'MS_OGR' => 'mapscript/mapscript.stub', 'MS_OGRERR' => 'mapscript/mapscript.stub', 'MS_ON' => 'mapscript/mapscript.stub', 'MS_ORACLESPATIAL' => 'mapscript/mapscript.stub', 'MS_ORACLESPATIALERR' => 'mapscript/mapscript.stub', 'MS_PARSEERR' => 'mapscript/mapscript.stub', 'MS_PIXELS' => 'mapscript/mapscript.stub', 'MS_PLUGIN' => 'mapscript/mapscript.stub', 'MS_POSTGIS' => 'mapscript/mapscript.stub', 'MS_POST_REQUEST' => 'mapscript/mapscript.stub', 'MS_PROJERR' => 'mapscript/mapscript.stub', 'MS_QUERYERR' => 'mapscript/mapscript.stub', 'MS_RASTER' => 'mapscript/mapscript.stub', 'MS_REGEXERR' => 'mapscript/mapscript.stub', 'MS_SDE' => 'mapscript/mapscript.stub', 'MS_SDEERR' => 'mapscript/mapscript.stub', 'MS_SELECTED' => 'mapscript/mapscript.stub', 'MS_SHAPEFILE' => 'mapscript/mapscript.stub', 'MS_SHAPE_LINE' => 'mapscript/mapscript.stub', 'MS_SHAPE_NULL' => 'mapscript/mapscript.stub', 'MS_SHAPE_POINT' => 'mapscript/mapscript.stub', 'MS_SHAPE_POLYGON' => 'mapscript/mapscript.stub', 'MS_SHPERR' => 'mapscript/mapscript.stub', 'MS_SHP_ARC' => 'mapscript/mapscript.stub', 'MS_SHP_MULTIPOINT' => 'mapscript/mapscript.stub', 'MS_SHP_POINT' => 'mapscript/mapscript.stub', 'MS_SHP_POLYGON' => 'mapscript/mapscript.stub', 'MS_SINGLE' => 'mapscript/mapscript.stub', 'MS_SMALL' => 'mapscript/mapscript.stub', 'MS_STYLE_BINDING_ANGLE' => 'mapscript/mapscript.stub', 'MS_STYLE_BINDING_COLOR' => 'mapscript/mapscript.stub', 'MS_STYLE_BINDING_OUTLINECOLOR' => 'mapscript/mapscript.stub', 'MS_STYLE_BINDING_SIZE' => 'mapscript/mapscript.stub', 'MS_STYLE_BINDING_SYMBOL' => 'mapscript/mapscript.stub', 'MS_STYLE_BINDING_WIDTH' => 'mapscript/mapscript.stub', 'MS_SYMBOL_ELLIPSE' => 'mapscript/mapscript.stub', 'MS_SYMBOL_PIXMAP' => 'mapscript/mapscript.stub', 'MS_SYMBOL_SIMPLE' => 'mapscript/mapscript.stub', 'MS_SYMBOL_TRUETYPE' => 'mapscript/mapscript.stub', 'MS_SYMBOL_VECTOR' => 'mapscript/mapscript.stub', 'MS_SYMERR' => 'mapscript/mapscript.stub', 'MS_TILED_OGR' => 'mapscript/mapscript.stub', 'MS_TILED_SHAPEFILE' => 'mapscript/mapscript.stub', 'MS_TINY' => 'mapscript/mapscript.stub', 'MS_TRUE' => 'mapscript/mapscript.stub', 'MS_TTFERR' => 'mapscript/mapscript.stub', 'MS_TYPEERR' => 'mapscript/mapscript.stub', 'MS_UC' => 'mapscript/mapscript.stub', 'MS_UL' => 'mapscript/mapscript.stub', 'MS_UNION' => 'mapscript/mapscript.stub', 'MS_UR' => 'mapscript/mapscript.stub', 'MS_WCSERR' => 'mapscript/mapscript.stub', 'MS_WEBERR' => 'mapscript/mapscript.stub', 'MS_WFS' => 'mapscript/mapscript.stub', 'MS_WFSCONNERR' => 'mapscript/mapscript.stub', 'MS_WFSERR' => 'mapscript/mapscript.stub', 'MS_WMS' => 'mapscript/mapscript.stub', 'MS_WMSCONNERR' => 'mapscript/mapscript.stub', 'MS_WMSERR' => 'mapscript/mapscript.stub', 'MS_XY' => 'mapscript/mapscript.stub', 'MS_YES' => 'mapscript/mapscript.stub', 'MT_RAND_MT19937' => 'standard/standard_defines.stub', 'MT_RAND_PHP' => 'standard/standard_defines.stub', 'MYSQLI_ASSOC' => 'mysqli/mysqli.stub', 'MYSQLI_ASYNC' => 'mysqli/mysqli.stub', 'MYSQLI_AUTO_INCREMENT_FLAG' => 'mysqli/mysqli.stub', 'MYSQLI_BINARY_FLAG' => 'mysqli/mysqli.stub', 'MYSQLI_BLOB_FLAG' => 'mysqli/mysqli.stub', 'MYSQLI_BOTH' => 'mysqli/mysqli.stub', 'MYSQLI_CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS' => 'mysqli/mysqli.stub', 'MYSQLI_CLIENT_COMPRESS' => 'mysqli/mysqli.stub', 'MYSQLI_CLIENT_FOUND_ROWS' => 'mysqli/mysqli.stub', 'MYSQLI_CLIENT_IGNORE_SPACE' => 'mysqli/mysqli.stub', 'MYSQLI_CLIENT_INTERACTIVE' => 'mysqli/mysqli.stub', 'MYSQLI_CLIENT_NO_SCHEMA' => 'mysqli/mysqli.stub', 'MYSQLI_CLIENT_SSL' => 'mysqli/mysqli.stub', 'MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT' => 'mysqli/mysqli.stub', 'MYSQLI_CLIENT_SSL_VERIFY_SERVER_CERT' => 'mysqli/mysqli.stub', 'MYSQLI_CURSOR_TYPE_FOR_UPDATE' => 'mysqli/mysqli.stub', 'MYSQLI_CURSOR_TYPE_NO_CURSOR' => 'mysqli/mysqli.stub', 'MYSQLI_CURSOR_TYPE_READ_ONLY' => 'mysqli/mysqli.stub', 'MYSQLI_CURSOR_TYPE_SCROLLABLE' => 'mysqli/mysqli.stub', 'MYSQLI_DATA_TRUNCATED' => 'mysqli/mysqli.stub', 'MYSQLI_DEBUG_TRACE_ENABLED' => 'mysqli/mysqli.stub', 'MYSQLI_ENUM_FLAG' => 'mysqli/mysqli.stub', 'MYSQLI_GROUP_FLAG' => 'mysqli/mysqli.stub', 'MYSQLI_INIT_COMMAND' => 'mysqli/mysqli.stub', 'MYSQLI_IS_MARIADB' => 'mysqli/mysqli.stub', 'MYSQLI_MULTIPLE_KEY_FLAG' => 'mysqli/mysqli.stub', 'MYSQLI_NOT_NULL_FLAG' => 'mysqli/mysqli.stub', 'MYSQLI_NO_DATA' => 'mysqli/mysqli.stub', 'MYSQLI_NO_DEFAULT_VALUE_FLAG' => 'mysqli/mysqli.stub', 'MYSQLI_NUM' => 'mysqli/mysqli.stub', 'MYSQLI_NUM_FLAG' => 'mysqli/mysqli.stub', 'MYSQLI_ON_UPDATE_NOW_FLAG' => 'mysqli/mysqli.stub', 'MYSQLI_OPT_CAN_HANDLE_EXPIRED_PASSWORDS' => 'mysqli/mysqli.stub', 'MYSQLI_OPT_CONNECT_TIMEOUT' => 'mysqli/mysqli.stub', 'MYSQLI_OPT_INT_AND_FLOAT_NATIVE' => 'mysqli/mysqli.stub', 'MYSQLI_OPT_LOAD_DATA_LOCAL_DIR' => 'mysqli/mysqli.stub', 'MYSQLI_OPT_LOCAL_INFILE' => 'mysqli/mysqli.stub', 'MYSQLI_OPT_NET_CMD_BUFFER_SIZE' => 'mysqli/mysqli.stub', 'MYSQLI_OPT_NET_READ_BUFFER_SIZE' => 'mysqli/mysqli.stub', 'MYSQLI_OPT_READ_TIMEOUT' => 'mysqli/mysqli.stub', 'MYSQLI_OPT_SSL_VERIFY_SERVER_CERT' => 'mysqli/mysqli.stub', 'MYSQLI_PART_KEY_FLAG' => 'mysqli/mysqli.stub', 'MYSQLI_PRI_KEY_FLAG' => 'mysqli/mysqli.stub', 'MYSQLI_READ_DEFAULT_FILE' => 'mysqli/mysqli.stub', 'MYSQLI_READ_DEFAULT_GROUP' => 'mysqli/mysqli.stub', 'MYSQLI_REFRESH_BACKUP_LOG' => 'mysqli/mysqli.stub', 'MYSQLI_REFRESH_GRANT' => 'mysqli/mysqli.stub', 'MYSQLI_REFRESH_HOSTS' => 'mysqli/mysqli.stub', 'MYSQLI_REFRESH_LOG' => 'mysqli/mysqli.stub', 'MYSQLI_REFRESH_MASTER' => 'mysqli/mysqli.stub', 'MYSQLI_REFRESH_REPLICA' => 'mysqli/mysqli.stub', 'MYSQLI_REFRESH_SLAVE' => 'mysqli/mysqli.stub', 'MYSQLI_REFRESH_STATUS' => 'mysqli/mysqli.stub', 'MYSQLI_REFRESH_TABLES' => 'mysqli/mysqli.stub', 'MYSQLI_REFRESH_THREADS' => 'mysqli/mysqli.stub', 'MYSQLI_REPORT_ALL' => 'mysqli/mysqli.stub', 'MYSQLI_REPORT_ERROR' => 'mysqli/mysqli.stub', 'MYSQLI_REPORT_INDEX' => 'mysqli/mysqli.stub', 'MYSQLI_REPORT_OFF' => 'mysqli/mysqli.stub', 'MYSQLI_REPORT_STRICT' => 'mysqli/mysqli.stub', 'MYSQLI_SERVER_PS_OUT_PARAMS' => 'mysqli/mysqli.stub', 'MYSQLI_SERVER_PUBLIC_KEY' => 'mysqli/mysqli.stub', 'MYSQLI_SERVER_QUERY_NO_GOOD_INDEX_USED' => 'mysqli/mysqli.stub', 'MYSQLI_SERVER_QUERY_NO_INDEX_USED' => 'mysqli/mysqli.stub', 'MYSQLI_SERVER_QUERY_WAS_SLOW' => 'mysqli/mysqli.stub', 'MYSQLI_SET_CHARSET_DIR' => 'mysqli/mysqli.stub', 'MYSQLI_SET_CHARSET_NAME' => 'mysqli/mysqli.stub', 'MYSQLI_SET_FLAG' => 'mysqli/mysqli.stub', 'MYSQLI_STMT_ATTR_CURSOR_TYPE' => 'mysqli/mysqli.stub', 'MYSQLI_STMT_ATTR_PREFETCH_ROWS' => 'mysqli/mysqli.stub', 'MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH' => 'mysqli/mysqli.stub', 'MYSQLI_STORE_RESULT' => 'mysqli/mysqli.stub', 'MYSQLI_STORE_RESULT_COPY_DATA' => 'mysqli/mysqli.stub', 'MYSQLI_TIMESTAMP_FLAG' => 'mysqli/mysqli.stub', 'MYSQLI_TRANS_COR_AND_CHAIN' => 'mysqli/mysqli.stub', 'MYSQLI_TRANS_COR_AND_NO_CHAIN' => 'mysqli/mysqli.stub', 'MYSQLI_TRANS_COR_NO_RELEASE' => 'mysqli/mysqli.stub', 'MYSQLI_TRANS_COR_RELEASE' => 'mysqli/mysqli.stub', 'MYSQLI_TRANS_START_READ_ONLY' => 'mysqli/mysqli.stub', 'MYSQLI_TRANS_START_READ_WRITE' => 'mysqli/mysqli.stub', 'MYSQLI_TRANS_START_WITH_CONSISTENT_SNAPSHOT' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_BIT' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_BLOB' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_CHAR' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_DATE' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_DATETIME' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_DECIMAL' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_DOUBLE' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_ENUM' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_FLOAT' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_GEOMETRY' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_INT24' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_INTERVAL' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_JSON' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_LONG' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_LONGLONG' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_LONG_BLOB' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_MEDIUM_BLOB' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_NEWDATE' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_NEWDECIMAL' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_NULL' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_SET' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_SHORT' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_STRING' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_TIME' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_TIMESTAMP' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_TINY' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_TINY_BLOB' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_VAR_STRING' => 'mysqli/mysqli.stub', 'MYSQLI_TYPE_YEAR' => 'mysqli/mysqli.stub', 'MYSQLI_UNIQUE_KEY_FLAG' => 'mysqli/mysqli.stub', 'MYSQLI_UNSIGNED_FLAG' => 'mysqli/mysqli.stub', 'MYSQLI_USE_RESULT' => 'mysqli/mysqli.stub', 'MYSQLI_ZEROFILL_FLAG' => 'mysqli/mysqli.stub', 'MYSQLX_LOCK_DEFAULT' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_LOCK_NOWAIT' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_LOCK_SKIP_LOCKED' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_BIGINT' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_BIT' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_BLOB' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_BYTES' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_CHAR' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_DATE' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_DATETIME' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_DECIMAL' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_DOUBLE' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_ENUM' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_FLOAT' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_GEOMETRY' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_INT' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_INT24' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_INTERVAL' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_JSON' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_LONG' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_LONGLONG' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_LONG_BLOB' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_MEDIUMINT' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_MEDIUM_BLOB' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_NEWDATE' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_NEWDECIMAL' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_NULL' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_SET' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_SHORT' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_SMALLINT' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_STRING' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_TIME' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_TIMESTAMP' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_TINY' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_TINY_BLOB' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_VAR_STRING' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQLX_TYPE_YEAR' => 'mysql_xdevapi/mysql_xdevapi.stub', 'MYSQL_ASSOC' => 'mysql/mysql.stub', 'MYSQL_BOTH' => 'mysql/mysql.stub', 'MYSQL_CLIENT_COMPRESS' => 'mysql/mysql.stub', 'MYSQL_CLIENT_IGNORE_SPACE' => 'mysql/mysql.stub', 'MYSQL_CLIENT_INTERACTIVE' => 'mysql/mysql.stub', 'MYSQL_CLIENT_SSL' => 'mysql/mysql.stub', 'MYSQL_NUM' => 'mysql/mysql.stub', 'M_1_PI' => 'standard/standard_defines.stub', 'M_2_PI' => 'standard/standard_defines.stub', 'M_2_SQRTPI' => 'standard/standard_defines.stub', 'M_E' => 'standard/standard_defines.stub', 'M_EULER' => 'standard/standard_defines.stub', 'M_LN10' => 'standard/standard_defines.stub', 'M_LN2' => 'standard/standard_defines.stub', 'M_LNPI' => 'standard/standard_defines.stub', 'M_LOG10E' => 'standard/standard_defines.stub', 'M_LOG2E' => 'standard/standard_defines.stub', 'M_PI' => 'standard/standard_defines.stub', 'M_PI_2' => 'standard/standard_defines.stub', 'M_PI_4' => 'standard/standard_defines.stub', 'M_SQRT1_2' => 'standard/standard_defines.stub', 'M_SQRT2' => 'standard/standard_defines.stub', 'M_SQRT3' => 'standard/standard_defines.stub', 'M_SQRTPI' => 'standard/standard_defines.stub', 'Menu' => 'winbinder/winbinder.stub', 'ModalDialog' => 'winbinder/winbinder.stub', 'ModelessDialog' => 'winbinder/winbinder.stub', 'NAN' => 'standard/standard_defines.stub', 'NCURSES_ALL_MOUSE_EVENTS' => 'ncurses/ncurses.stub', 'NCURSES_A_ALTCHARSET' => 'ncurses/ncurses.stub', 'NCURSES_A_BLINK' => 'ncurses/ncurses.stub', 'NCURSES_A_BOLD' => 'ncurses/ncurses.stub', 'NCURSES_A_CHARTEXT' => 'ncurses/ncurses.stub', 'NCURSES_A_DIM' => 'ncurses/ncurses.stub', 'NCURSES_A_INVIS' => 'ncurses/ncurses.stub', 'NCURSES_A_NORMAL' => 'ncurses/ncurses.stub', 'NCURSES_A_PROTECT' => 'ncurses/ncurses.stub', 'NCURSES_A_REVERSE' => 'ncurses/ncurses.stub', 'NCURSES_A_STANDOUT' => 'ncurses/ncurses.stub', 'NCURSES_A_UNDERLINE' => 'ncurses/ncurses.stub', 'NCURSES_BUTTON1_CLICKED' => 'ncurses/ncurses.stub', 'NCURSES_BUTTON1_DOUBLE_CLICKED' => 'ncurses/ncurses.stub', 'NCURSES_BUTTON1_PRESSED' => 'ncurses/ncurses.stub', 'NCURSES_BUTTON1_RELEASED' => 'ncurses/ncurses.stub', 'NCURSES_BUTTON1_TRIPLE_CLICKED' => 'ncurses/ncurses.stub', 'NCURSES_BUTTON2_CLICKED' => 'ncurses/ncurses.stub', 'NCURSES_BUTTON2_DOUBLE_CLICKED' => 'ncurses/ncurses.stub', 'NCURSES_BUTTON2_PRESSED' => 'ncurses/ncurses.stub', 'NCURSES_BUTTON2_RELEASED' => 'ncurses/ncurses.stub', 'NCURSES_BUTTON2_TRIPLE_CLICKED' => 'ncurses/ncurses.stub', 'NCURSES_BUTTON3_CLICKED' => 'ncurses/ncurses.stub', 'NCURSES_BUTTON3_DOUBLE_CLICKED' => 'ncurses/ncurses.stub', 'NCURSES_BUTTON3_PRESSED' => 'ncurses/ncurses.stub', 'NCURSES_BUTTON3_RELEASED' => 'ncurses/ncurses.stub', 'NCURSES_BUTTON3_TRIPLE_CLICKED' => 'ncurses/ncurses.stub', 'NCURSES_BUTTON4_CLICKED' => 'ncurses/ncurses.stub', 'NCURSES_BUTTON4_DOUBLE_CLICKED' => 'ncurses/ncurses.stub', 'NCURSES_BUTTON4_PRESSED' => 'ncurses/ncurses.stub', 'NCURSES_BUTTON4_RELEASED' => 'ncurses/ncurses.stub', 'NCURSES_BUTTON4_TRIPLE_CLICKED' => 'ncurses/ncurses.stub', 'NCURSES_BUTTON_ALT' => 'ncurses/ncurses.stub', 'NCURSES_BUTTON_CTRL' => 'ncurses/ncurses.stub', 'NCURSES_BUTTON_SHIFT' => 'ncurses/ncurses.stub', 'NCURSES_COLOR_BLACK' => 'ncurses/ncurses.stub', 'NCURSES_COLOR_BLUE' => 'ncurses/ncurses.stub', 'NCURSES_COLOR_CYAN' => 'ncurses/ncurses.stub', 'NCURSES_COLOR_GREEN' => 'ncurses/ncurses.stub', 'NCURSES_COLOR_MAGENTA' => 'ncurses/ncurses.stub', 'NCURSES_COLOR_RED' => 'ncurses/ncurses.stub', 'NCURSES_COLOR_WHITE' => 'ncurses/ncurses.stub', 'NCURSES_COLOR_YELLOW' => 'ncurses/ncurses.stub', 'NCURSES_KEY_A1' => 'ncurses/ncurses.stub', 'NCURSES_KEY_A3' => 'ncurses/ncurses.stub', 'NCURSES_KEY_B2' => 'ncurses/ncurses.stub', 'NCURSES_KEY_BACKSPACE' => 'ncurses/ncurses.stub', 'NCURSES_KEY_BEG' => 'ncurses/ncurses.stub', 'NCURSES_KEY_BTAB' => 'ncurses/ncurses.stub', 'NCURSES_KEY_C1' => 'ncurses/ncurses.stub', 'NCURSES_KEY_C3' => 'ncurses/ncurses.stub', 'NCURSES_KEY_CANCEL' => 'ncurses/ncurses.stub', 'NCURSES_KEY_CATAB' => 'ncurses/ncurses.stub', 'NCURSES_KEY_CLEAR' => 'ncurses/ncurses.stub', 'NCURSES_KEY_CLOSE' => 'ncurses/ncurses.stub', 'NCURSES_KEY_COMMAND' => 'ncurses/ncurses.stub', 'NCURSES_KEY_COPY' => 'ncurses/ncurses.stub', 'NCURSES_KEY_CREATE' => 'ncurses/ncurses.stub', 'NCURSES_KEY_CTAB' => 'ncurses/ncurses.stub', 'NCURSES_KEY_DC' => 'ncurses/ncurses.stub', 'NCURSES_KEY_DL' => 'ncurses/ncurses.stub', 'NCURSES_KEY_DOWN' => 'ncurses/ncurses.stub', 'NCURSES_KEY_EIC' => 'ncurses/ncurses.stub', 'NCURSES_KEY_END' => 'ncurses/ncurses.stub', 'NCURSES_KEY_ENTER' => 'ncurses/ncurses.stub', 'NCURSES_KEY_EOL' => 'ncurses/ncurses.stub', 'NCURSES_KEY_EOS' => 'ncurses/ncurses.stub', 'NCURSES_KEY_EXIT' => 'ncurses/ncurses.stub', 'NCURSES_KEY_F0' => 'ncurses/ncurses.stub', 'NCURSES_KEY_F1' => 'ncurses/ncurses.stub', 'NCURSES_KEY_F10' => 'ncurses/ncurses.stub', 'NCURSES_KEY_F11' => 'ncurses/ncurses.stub', 'NCURSES_KEY_F12' => 'ncurses/ncurses.stub', 'NCURSES_KEY_F2' => 'ncurses/ncurses.stub', 'NCURSES_KEY_F3' => 'ncurses/ncurses.stub', 'NCURSES_KEY_F4' => 'ncurses/ncurses.stub', 'NCURSES_KEY_F5' => 'ncurses/ncurses.stub', 'NCURSES_KEY_F6' => 'ncurses/ncurses.stub', 'NCURSES_KEY_F7' => 'ncurses/ncurses.stub', 'NCURSES_KEY_F8' => 'ncurses/ncurses.stub', 'NCURSES_KEY_F9' => 'ncurses/ncurses.stub', 'NCURSES_KEY_FIND' => 'ncurses/ncurses.stub', 'NCURSES_KEY_HELP' => 'ncurses/ncurses.stub', 'NCURSES_KEY_HOME' => 'ncurses/ncurses.stub', 'NCURSES_KEY_IC' => 'ncurses/ncurses.stub', 'NCURSES_KEY_IL' => 'ncurses/ncurses.stub', 'NCURSES_KEY_LEFT' => 'ncurses/ncurses.stub', 'NCURSES_KEY_LL' => 'ncurses/ncurses.stub', 'NCURSES_KEY_MARK' => 'ncurses/ncurses.stub', 'NCURSES_KEY_MESSAGE' => 'ncurses/ncurses.stub', 'NCURSES_KEY_MOUSE' => 'ncurses/ncurses.stub', 'NCURSES_KEY_MOVE' => 'ncurses/ncurses.stub', 'NCURSES_KEY_NEXT' => 'ncurses/ncurses.stub', 'NCURSES_KEY_NPAGE' => 'ncurses/ncurses.stub', 'NCURSES_KEY_OPEN' => 'ncurses/ncurses.stub', 'NCURSES_KEY_OPTIONS' => 'ncurses/ncurses.stub', 'NCURSES_KEY_PPAGE' => 'ncurses/ncurses.stub', 'NCURSES_KEY_PREVIOUS' => 'ncurses/ncurses.stub', 'NCURSES_KEY_PRINT' => 'ncurses/ncurses.stub', 'NCURSES_KEY_REDO' => 'ncurses/ncurses.stub', 'NCURSES_KEY_REFERENCE' => 'ncurses/ncurses.stub', 'NCURSES_KEY_REFRESH' => 'ncurses/ncurses.stub', 'NCURSES_KEY_REPLACE' => 'ncurses/ncurses.stub', 'NCURSES_KEY_RESET' => 'ncurses/ncurses.stub', 'NCURSES_KEY_RESIZE' => 'ncurses/ncurses.stub', 'NCURSES_KEY_RESTART' => 'ncurses/ncurses.stub', 'NCURSES_KEY_RESUME' => 'ncurses/ncurses.stub', 'NCURSES_KEY_RIGHT' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SAVE' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SBEG' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SCANCEL' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SCOMMAND' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SCOPY' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SCREATE' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SDC' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SDL' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SELECT' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SEND' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SEOL' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SEXIT' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SF' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SFIND' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SHELP' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SHOME' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SIC' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SLEFT' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SMESSAGE' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SMOVE' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SNEXT' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SOPTIONS' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SPREVIOUS' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SPRINT' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SR' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SREDO' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SREPLACE' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SRESET' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SRIGHT' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SRSUME' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SSAVE' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SSUSPEND' => 'ncurses/ncurses.stub', 'NCURSES_KEY_STAB' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SUNDO' => 'ncurses/ncurses.stub', 'NCURSES_KEY_SUSPEND' => 'ncurses/ncurses.stub', 'NCURSES_KEY_UNDO' => 'ncurses/ncurses.stub', 'NCURSES_KEY_UP' => 'ncurses/ncurses.stub', 'NCURSES_REPORT_MOUSE_POSITION' => 'ncurses/ncurses.stub', 'NEGATIVE_SIGN' => 'standard/standard_defines.stub', 'NIL' => 'imap/imap.stub', 'NOCOLOR' => 'winbinder/winbinder.stub', 'NOEXPR' => 'standard/standard_defines.stub', 'NORM_IGNORECASE' => 'com_dotnet/com_dotnet.stub', 'NORM_IGNOREKANATYPE' => 'com_dotnet/com_dotnet.stub', 'NORM_IGNOREKASHIDA' => 'com_dotnet/com_dotnet.stub', 'NORM_IGNORENONSPACE' => 'com_dotnet/com_dotnet.stub', 'NORM_IGNORESYMBOLS' => 'com_dotnet/com_dotnet.stub', 'NORM_IGNOREWIDTH' => 'com_dotnet/com_dotnet.stub', 'NOSTR' => 'standard/standard_defines.stub', 'N_CS_PRECEDES' => 'standard/standard_defines.stub', 'N_SEP_BY_SPACE' => 'standard/standard_defines.stub', 'N_SIGN_POSN' => 'standard/standard_defines.stub', 'NakedWindow' => 'winbinder/winbinder.stub', 'OAUTH_AUTH_TYPE_AUTHORIZATION' => 'oauth/oauth.stub', 'OAUTH_AUTH_TYPE_FORM' => 'oauth/oauth.stub', 'OAUTH_AUTH_TYPE_NONE' => 'oauth/oauth.stub', 'OAUTH_AUTH_TYPE_URI' => 'oauth/oauth.stub', 'OAUTH_BAD_NONCE' => 'oauth/oauth.stub', 'OAUTH_BAD_TIMESTAMP' => 'oauth/oauth.stub', 'OAUTH_CONSUMER_KEY_REFUSED' => 'oauth/oauth.stub', 'OAUTH_CONSUMER_KEY_UNKNOWN' => 'oauth/oauth.stub', 'OAUTH_HTTP_METHOD_DELETE' => 'oauth/oauth.stub', 'OAUTH_HTTP_METHOD_GET' => 'oauth/oauth.stub', 'OAUTH_HTTP_METHOD_HEAD' => 'oauth/oauth.stub', 'OAUTH_HTTP_METHOD_POST' => 'oauth/oauth.stub', 'OAUTH_HTTP_METHOD_PUT' => 'oauth/oauth.stub', 'OAUTH_INVALID_SIGNATURE' => 'oauth/oauth.stub', 'OAUTH_OK' => 'oauth/oauth.stub', 'OAUTH_PARAMETER_ABSENT' => 'oauth/oauth.stub', 'OAUTH_REQENGINE_CURL' => 'oauth/oauth.stub', 'OAUTH_REQENGINE_STREAMS' => 'oauth/oauth.stub', 'OAUTH_SIGNATURE_METHOD_REJECTED' => 'oauth/oauth.stub', 'OAUTH_SIG_METHOD_HMACSHA1' => 'oauth/oauth.stub', 'OAUTH_SIG_METHOD_HMACSHA256' => 'oauth/oauth.stub', 'OAUTH_SIG_METHOD_RSASHA1' => 'oauth/oauth.stub', 'OAUTH_TOKEN_EXPIRED' => 'oauth/oauth.stub', 'OAUTH_TOKEN_REJECTED' => 'oauth/oauth.stub', 'OAUTH_TOKEN_USED' => 'oauth/oauth.stub', 'OAUTH_VERIFIER_INVALID' => 'oauth/oauth.stub', 'OCI_ASSOC' => 'oci8/oci8.stub', 'OCI_BOTH' => 'oci8/oci8.stub', 'OCI_B_BFILE' => 'oci8/oci8.stub', 'OCI_B_BIN' => 'oci8/oci8.stub', 'OCI_B_BLOB' => 'oci8/oci8.stub', 'OCI_B_BOL' => 'oci8/oci8.stub', 'OCI_B_CFILEE' => 'oci8/oci8.stub', 'OCI_B_CLOB' => 'oci8/oci8.stub', 'OCI_B_CURSOR' => 'oci8/oci8.stub', 'OCI_B_INT' => 'oci8/oci8.stub', 'OCI_B_NTY' => 'oci8/oci8.stub', 'OCI_B_NUM' => 'oci8/oci8.stub', 'OCI_B_ROWID' => 'oci8/oci8.stub', 'OCI_COMMIT_ON_SUCCESS' => 'oci8/oci8.stub', 'OCI_CRED_EXT' => 'oci8/oci8.stub', 'OCI_DEFAULT' => 'oci8/oci8.stub', 'OCI_DESCRIBE_ONLY' => 'oci8/oci8.stub', 'OCI_DTYPE_FILE' => 'oci8/oci8.stub', 'OCI_DTYPE_LOB' => 'oci8/oci8.stub', 'OCI_DTYPE_ROWID' => 'oci8/oci8.stub', 'OCI_D_FILE' => 'oci8/oci8.stub', 'OCI_D_LOB' => 'oci8/oci8.stub', 'OCI_D_ROWID' => 'oci8/oci8.stub', 'OCI_EXACT_FETCH' => 'oci8/oci8.stub', 'OCI_FETCHSTATEMENT_BY_COLUMN' => 'oci8/oci8.stub', 'OCI_FETCHSTATEMENT_BY_ROW' => 'oci8/oci8.stub', 'OCI_LOB_BUFFER_FREE' => 'oci8/oci8.stub', 'OCI_NO_AUTO_COMMIT' => 'oci8/oci8.stub', 'OCI_NUM' => 'oci8/oci8.stub', 'OCI_RETURN_LOBS' => 'oci8/oci8.stub', 'OCI_RETURN_NULLS' => 'oci8/oci8.stub', 'OCI_SEEK_CUR' => 'oci8/oci8.stub', 'OCI_SEEK_END' => 'oci8/oci8.stub', 'OCI_SEEK_SET' => 'oci8/oci8.stub', 'OCI_SYSDATE' => 'oci8/oci8.stub', 'OCI_SYSDBA' => 'oci8/oci8.stub', 'OCI_SYSOPER' => 'oci8/oci8.stub', 'OCI_TEMP_BLOB' => 'oci8/oci8.stub', 'OCI_TEMP_CLOB' => 'oci8/oci8.stub', 'ODBC_BINMODE_CONVERT' => 'odbc/odbc.stub', 'ODBC_BINMODE_PASSTHRU' => 'odbc/odbc.stub', 'ODBC_BINMODE_RETURN' => 'odbc/odbc.stub', 'ODBC_TYPE' => 'odbc/odbc.stub', 'OPENSSL_ALGO_DSS1' => 'openssl/openssl.stub', 'OPENSSL_ALGO_MD2' => 'openssl/openssl.stub', 'OPENSSL_ALGO_MD4' => 'openssl/openssl.stub', 'OPENSSL_ALGO_MD5' => 'openssl/openssl.stub', 'OPENSSL_ALGO_RMD160' => 'openssl/openssl.stub', 'OPENSSL_ALGO_SHA1' => 'openssl/openssl.stub', 'OPENSSL_ALGO_SHA224' => 'openssl/openssl.stub', 'OPENSSL_ALGO_SHA256' => 'openssl/openssl.stub', 'OPENSSL_ALGO_SHA384' => 'openssl/openssl.stub', 'OPENSSL_ALGO_SHA512' => 'openssl/openssl.stub', 'OPENSSL_CIPHER_3DES' => 'openssl/openssl.stub', 'OPENSSL_CIPHER_AES_128_CBC' => 'openssl/openssl.stub', 'OPENSSL_CIPHER_AES_192_CBC' => 'openssl/openssl.stub', 'OPENSSL_CIPHER_AES_256_CBC' => 'openssl/openssl.stub', 'OPENSSL_CIPHER_DES' => 'openssl/openssl.stub', 'OPENSSL_CIPHER_RC2_128' => 'openssl/openssl.stub', 'OPENSSL_CIPHER_RC2_40' => 'openssl/openssl.stub', 'OPENSSL_CIPHER_RC2_64' => 'openssl/openssl.stub', 'OPENSSL_CMS_BINARY' => 'openssl/openssl.stub', 'OPENSSL_CMS_DETACHED' => 'openssl/openssl.stub', 'OPENSSL_CMS_NOATTR' => 'openssl/openssl.stub', 'OPENSSL_CMS_NOCERTS' => 'openssl/openssl.stub', 'OPENSSL_CMS_NOINTERN' => 'openssl/openssl.stub', 'OPENSSL_CMS_NOSIGS' => 'openssl/openssl.stub', 'OPENSSL_CMS_NOVERIFY' => 'openssl/openssl.stub', 'OPENSSL_CMS_TEXT' => 'openssl/openssl.stub', 'OPENSSL_DEFAULT_STREAM_CIPHERS' => 'openssl/openssl.stub', 'OPENSSL_DONT_ZERO_PAD_KEY' => 'openssl/openssl.stub', 'OPENSSL_ENCODING_DER' => 'openssl/openssl.stub', 'OPENSSL_ENCODING_PEM' => 'openssl/openssl.stub', 'OPENSSL_ENCODING_SMIME' => 'openssl/openssl.stub', 'OPENSSL_KEYTYPE_DH' => 'openssl/openssl.stub', 'OPENSSL_KEYTYPE_DSA' => 'openssl/openssl.stub', 'OPENSSL_KEYTYPE_EC' => 'openssl/openssl.stub', 'OPENSSL_KEYTYPE_RSA' => 'openssl/openssl.stub', 'OPENSSL_NO_PADDING' => 'openssl/openssl.stub', 'OPENSSL_PKCS1_OAEP_PADDING' => 'openssl/openssl.stub', 'OPENSSL_PKCS1_PADDING' => 'openssl/openssl.stub', 'OPENSSL_RAW_DATA' => 'openssl/openssl.stub', 'OPENSSL_SSLV23_PADDING' => 'openssl/openssl.stub', 'OPENSSL_TLSEXT_SERVER_NAME' => 'openssl/openssl.stub', 'OPENSSL_VERSION_NUMBER' => 'openssl/openssl.stub', 'OPENSSL_VERSION_TEXT' => 'openssl/openssl.stub', 'OPENSSL_ZERO_PADDING' => 'openssl/openssl.stub', 'OP_ANONYMOUS' => 'imap/imap.stub', 'OP_DEBUG' => 'imap/imap.stub', 'OP_EXPUNGE' => 'imap/imap.stub', 'OP_HALFOPEN' => 'imap/imap.stub', 'OP_PROTOTYPE' => 'imap/imap.stub', 'OP_READONLY' => 'imap/imap.stub', 'OP_SECURE' => 'imap/imap.stub', 'OP_SHORTCACHE' => 'imap/imap.stub', 'OP_SILENT' => 'imap/imap.stub', 'O_APPEND' => 'dio/dio_d.stub', 'O_ASYNC' => 'dio/dio_d.stub', 'O_CREAT' => 'dio/dio_d.stub', 'O_EXCL' => 'dio/dio_d.stub', 'O_NDELAY' => 'dio/dio_d.stub', 'O_NOCTTY' => 'dio/dio_d.stub', 'O_NONBLOCK' => 'dio/dio_d.stub', 'O_RDONLY' => 'dio/dio_d.stub', 'O_RDWR' => 'dio/dio_d.stub', 'O_SYNC' => 'dio/dio_d.stub', 'O_TRUNC' => 'dio/dio_d.stub', 'O_WRONLY' => 'dio/dio_d.stub', 'PASSWORD_ARGON2I' => 'standard/password.stub', 'PASSWORD_ARGON2ID' => 'standard/password.stub', 'PASSWORD_ARGON2_DEFAULT_MEMORY_COST' => 'standard/password.stub', 'PASSWORD_ARGON2_DEFAULT_THREADS' => 'standard/password.stub', 'PASSWORD_ARGON2_DEFAULT_TIME_COST' => 'standard/password.stub', 'PASSWORD_ARGON2_PROVIDER' => 'standard/password.stub', 'PASSWORD_BCRYPT' => 'standard/password.stub', 'PASSWORD_BCRYPT_DEFAULT_COST' => 'standard/password.stub', 'PASSWORD_DEFAULT' => 'standard/password.stub', 'PATHINFO_ALL' => 'standard/standard_defines.stub', 'PATHINFO_BASENAME' => 'standard/standard_defines.stub', 'PATHINFO_DIRNAME' => 'standard/standard_defines.stub', 'PATHINFO_EXTENSION' => 'standard/standard_defines.stub', 'PATHINFO_FILENAME' => 'standard/standard_defines.stub', 'PATH_SEPARATOR' => 'standard/standard_defines.stub', 'PCNTL_E2BIG' => 'pcntl/pcntl.stub', 'PCNTL_EACCES' => 'pcntl/pcntl.stub', 'PCNTL_EAGAIN' => 'pcntl/pcntl.stub', 'PCNTL_ECHILD' => 'pcntl/pcntl.stub', 'PCNTL_EFAULT' => 'pcntl/pcntl.stub', 'PCNTL_EINTR' => 'pcntl/pcntl.stub', 'PCNTL_EINVAL' => 'pcntl/pcntl.stub', 'PCNTL_EIO' => 'pcntl/pcntl.stub', 'PCNTL_EISDIR' => 'pcntl/pcntl.stub', 'PCNTL_ELIBBAD' => 'pcntl/pcntl.stub', 'PCNTL_ELOOP' => 'pcntl/pcntl.stub', 'PCNTL_EMFILE' => 'pcntl/pcntl.stub', 'PCNTL_ENAMETOOLONG' => 'pcntl/pcntl.stub', 'PCNTL_ENFILE' => 'pcntl/pcntl.stub', 'PCNTL_ENOENT' => 'pcntl/pcntl.stub', 'PCNTL_ENOEXEC' => 'pcntl/pcntl.stub', 'PCNTL_ENOMEM' => 'pcntl/pcntl.stub', 'PCNTL_ENOSPC' => 'pcntl/pcntl.stub', 'PCNTL_ENOTDIR' => 'pcntl/pcntl.stub', 'PCNTL_EPERM' => 'pcntl/pcntl.stub', 'PCNTL_ESRCH' => 'pcntl/pcntl.stub', 'PCNTL_ETXTBSY' => 'pcntl/pcntl.stub', 'PCNTL_EUSERS' => 'pcntl/pcntl.stub', 'PCRE_JIT_SUPPORT' => 'pcre/pcre.stub', 'PCRE_VERSION' => 'pcre/pcre.stub', 'PCRE_VERSION_MAJOR' => 'pcre/pcre.stub', 'PCRE_VERSION_MINOR' => 'pcre/pcre.stub', 'PEAR_EXTENSION_DIR' => 'Core/Core_d.stub', 'PEAR_INSTALL_DIR' => 'Core/Core_d.stub', 'PGSQL_ASSOC' => 'pgsql/pgsql.stub', 'PGSQL_BAD_RESPONSE' => 'pgsql/pgsql.stub', 'PGSQL_BOTH' => 'pgsql/pgsql.stub', 'PGSQL_COMMAND_OK' => 'pgsql/pgsql.stub', 'PGSQL_CONNECTION_AUTH_OK' => 'pgsql/pgsql.stub', 'PGSQL_CONNECTION_AWAITING_RESPONSE' => 'pgsql/pgsql.stub', 'PGSQL_CONNECTION_BAD' => 'pgsql/pgsql.stub', 'PGSQL_CONNECTION_MADE' => 'pgsql/pgsql.stub', 'PGSQL_CONNECTION_OK' => 'pgsql/pgsql.stub', 'PGSQL_CONNECTION_SETENV' => 'pgsql/pgsql.stub', 'PGSQL_CONNECTION_STARTED' => 'pgsql/pgsql.stub', 'PGSQL_CONNECT_ASYNC' => 'pgsql/pgsql.stub', 'PGSQL_CONNECT_FORCE_NEW' => 'pgsql/pgsql.stub', 'PGSQL_CONV_FORCE_NULL' => 'pgsql/pgsql.stub', 'PGSQL_CONV_IGNORE_DEFAULT' => 'pgsql/pgsql.stub', 'PGSQL_CONV_IGNORE_NOT_NULL' => 'pgsql/pgsql.stub', 'PGSQL_COPY_IN' => 'pgsql/pgsql.stub', 'PGSQL_COPY_OUT' => 'pgsql/pgsql.stub', 'PGSQL_DIAG_COLUMN_NAME' => 'pgsql/pgsql.stub', 'PGSQL_DIAG_CONSTRAINT_NAME' => 'pgsql/pgsql.stub', 'PGSQL_DIAG_CONTEXT' => 'pgsql/pgsql.stub', 'PGSQL_DIAG_DATATYPE_NAME' => 'pgsql/pgsql.stub', 'PGSQL_DIAG_INTERNAL_POSITION' => 'pgsql/pgsql.stub', 'PGSQL_DIAG_INTERNAL_QUERY' => 'pgsql/pgsql.stub', 'PGSQL_DIAG_MESSAGE_DETAIL' => 'pgsql/pgsql.stub', 'PGSQL_DIAG_MESSAGE_HINT' => 'pgsql/pgsql.stub', 'PGSQL_DIAG_MESSAGE_PRIMARY' => 'pgsql/pgsql.stub', 'PGSQL_DIAG_SCHEMA_NAME' => 'pgsql/pgsql.stub', 'PGSQL_DIAG_SEVERITY' => 'pgsql/pgsql.stub', 'PGSQL_DIAG_SEVERITY_NONLOCALIZED' => 'pgsql/pgsql.stub', 'PGSQL_DIAG_SOURCE_FILE' => 'pgsql/pgsql.stub', 'PGSQL_DIAG_SOURCE_FUNCTION' => 'pgsql/pgsql.stub', 'PGSQL_DIAG_SOURCE_LINE' => 'pgsql/pgsql.stub', 'PGSQL_DIAG_SQLSTATE' => 'pgsql/pgsql.stub', 'PGSQL_DIAG_STATEMENT_POSITION' => 'pgsql/pgsql.stub', 'PGSQL_DIAG_TABLE_NAME' => 'pgsql/pgsql.stub', 'PGSQL_DML_ASYNC' => 'pgsql/pgsql.stub', 'PGSQL_DML_ESCAPE' => 'pgsql/pgsql.stub', 'PGSQL_DML_EXEC' => 'pgsql/pgsql.stub', 'PGSQL_DML_NO_CONV' => 'pgsql/pgsql.stub', 'PGSQL_DML_STRING' => 'pgsql/pgsql.stub', 'PGSQL_EMPTY_QUERY' => 'pgsql/pgsql.stub', 'PGSQL_ERRORS_DEFAULT' => 'pgsql/pgsql.stub', 'PGSQL_ERRORS_TERSE' => 'pgsql/pgsql.stub', 'PGSQL_ERRORS_VERBOSE' => 'pgsql/pgsql.stub', 'PGSQL_FATAL_ERROR' => 'pgsql/pgsql.stub', 'PGSQL_LIBPQ_VERSION' => 'pgsql/pgsql.stub', 'PGSQL_LIBPQ_VERSION_STR' => 'pgsql/pgsql.stub', 'PGSQL_NONFATAL_ERROR' => 'pgsql/pgsql.stub', 'PGSQL_NOTICE_ALL' => 'pgsql/pgsql.stub', 'PGSQL_NOTICE_CLEAR' => 'pgsql/pgsql.stub', 'PGSQL_NOTICE_LAST' => 'pgsql/pgsql.stub', 'PGSQL_NUM' => 'pgsql/pgsql.stub', 'PGSQL_POLLING_ACTIVE' => 'pgsql/pgsql.stub', 'PGSQL_POLLING_FAILED' => 'pgsql/pgsql.stub', 'PGSQL_POLLING_OK' => 'pgsql/pgsql.stub', 'PGSQL_POLLING_READING' => 'pgsql/pgsql.stub', 'PGSQL_POLLING_WRITING' => 'pgsql/pgsql.stub', 'PGSQL_SEEK_CUR' => 'pgsql/pgsql.stub', 'PGSQL_SEEK_END' => 'pgsql/pgsql.stub', 'PGSQL_SEEK_SET' => 'pgsql/pgsql.stub', 'PGSQL_STATUS_LONG' => 'pgsql/pgsql.stub', 'PGSQL_STATUS_STRING' => 'pgsql/pgsql.stub', 'PGSQL_TRANSACTION_ACTIVE' => 'pgsql/pgsql.stub', 'PGSQL_TRANSACTION_IDLE' => 'pgsql/pgsql.stub', 'PGSQL_TRANSACTION_INERROR' => 'pgsql/pgsql.stub', 'PGSQL_TRANSACTION_INTRANS' => 'pgsql/pgsql.stub', 'PGSQL_TRANSACTION_UNKNOWN' => 'pgsql/pgsql.stub', 'PGSQL_TUPLES_OK' => 'pgsql/pgsql.stub', 'PHP_AMQP_MAX_CHANNELS' => 'amqp/amqp.stub', 'PHP_BINARY' => 'Core/Core_d.stub', 'PHP_BINARY_READ' => 'sockets/sockets.stub', 'PHP_BINDIR' => 'Core/Core_d.stub', 'PHP_CLI_PROCESS_TITLE' => 'Core/Core_d.stub', 'PHP_CONFIG_FILE_PATH' => 'Core/Core_d.stub', 'PHP_CONFIG_FILE_SCAN_DIR' => 'Core/Core_d.stub', 'PHP_DATADIR' => 'Core/Core_d.stub', 'PHP_DEBUG' => 'Core/Core_d.stub', 'PHP_EOL' => 'Core/Core_d.stub', 'PHP_EXTENSION_DIR' => 'Core/Core_d.stub', 'PHP_EXTRA_VERSION' => 'Core/Core_d.stub', 'PHP_FD_SETSIZE' => 'Core/Core_d.stub', 'PHP_FLOAT_DIG' => 'Core/Core_d.stub', 'PHP_FLOAT_EPSILON' => 'Core/Core_d.stub', 'PHP_FLOAT_MAX' => 'Core/Core_d.stub', 'PHP_FLOAT_MIN' => 'Core/Core_d.stub', 'PHP_INT_MAX' => 'Core/Core_d.stub', 'PHP_INT_MIN' => 'Core/Core_d.stub', 'PHP_INT_SIZE' => 'Core/Core_d.stub', 'PHP_LIBDIR' => 'Core/Core_d.stub', 'PHP_LOCALSTATEDIR' => 'Core/Core_d.stub', 'PHP_MAJOR_VERSION' => 'Core/Core_d.stub', 'PHP_MANDIR' => 'Core/Core_d.stub', 'PHP_MAXPATHLEN' => 'Core/Core_d.stub', 'PHP_MINOR_VERSION' => 'Core/Core_d.stub', 'PHP_NORMAL_READ' => 'sockets/sockets.stub', 'PHP_OS' => 'Core/Core_d.stub', 'PHP_OS_FAMILY' => 'Core/Core_d.stub', 'PHP_OUTPUT_HANDLER_CLEAN' => 'Core/Core_d.stub', 'PHP_OUTPUT_HANDLER_CLEANABLE' => 'Core/Core_d.stub', 'PHP_OUTPUT_HANDLER_CONT' => 'Core/Core_d.stub', 'PHP_OUTPUT_HANDLER_DISABLED' => 'Core/Core_d.stub', 'PHP_OUTPUT_HANDLER_END' => 'Core/Core_d.stub', 'PHP_OUTPUT_HANDLER_FINAL' => 'Core/Core_d.stub', 'PHP_OUTPUT_HANDLER_FLUSH' => 'Core/Core_d.stub', 'PHP_OUTPUT_HANDLER_FLUSHABLE' => 'Core/Core_d.stub', 'PHP_OUTPUT_HANDLER_REMOVABLE' => 'Core/Core_d.stub', 'PHP_OUTPUT_HANDLER_START' => 'Core/Core_d.stub', 'PHP_OUTPUT_HANDLER_STARTED' => 'Core/Core_d.stub', 'PHP_OUTPUT_HANDLER_STDFLAGS' => 'Core/Core_d.stub', 'PHP_OUTPUT_HANDLER_WRITE' => 'Core/Core_d.stub', 'PHP_PREFIX' => 'Core/Core_d.stub', 'PHP_QUERY_RFC1738' => 'standard/standard_defines.stub', 'PHP_QUERY_RFC3986' => 'standard/standard_defines.stub', 'PHP_RELEASE_VERSION' => 'Core/Core_d.stub', 'PHP_ROUND_HALF_DOWN' => 'standard/standard_defines.stub', 'PHP_ROUND_HALF_EVEN' => 'standard/standard_defines.stub', 'PHP_ROUND_HALF_ODD' => 'standard/standard_defines.stub', 'PHP_ROUND_HALF_UP' => 'standard/standard_defines.stub', 'PHP_SAPI' => 'Core/Core_d.stub', 'PHP_SESSION_ACTIVE' => 'standard/standard_defines.stub', 'PHP_SESSION_DISABLED' => 'standard/standard_defines.stub', 'PHP_SESSION_NONE' => 'standard/standard_defines.stub', 'PHP_SHLIB_SUFFIX' => 'Core/Core_d.stub', 'PHP_SVN_AUTH_PARAM_IGNORE_SSL_VERIFY_ERRORS' => 'svn/svn.stub', 'PHP_SYSCONFDIR' => 'Core/Core_d.stub', 'PHP_URL_FRAGMENT' => 'standard/standard_defines.stub', 'PHP_URL_HOST' => 'standard/standard_defines.stub', 'PHP_URL_PASS' => 'standard/standard_defines.stub', 'PHP_URL_PATH' => 'standard/standard_defines.stub', 'PHP_URL_PORT' => 'standard/standard_defines.stub', 'PHP_URL_QUERY' => 'standard/standard_defines.stub', 'PHP_URL_SCHEME' => 'standard/standard_defines.stub', 'PHP_URL_USER' => 'standard/standard_defines.stub', 'PHP_VERSION' => 'Core/Core_d.stub', 'PHP_VERSION_ID' => 'Core/Core_d.stub', 'PHP_WINDOWS_EVENT_CTRL_BREAK' => 'Core/Core_d.stub', 'PHP_WINDOWS_EVENT_CTRL_C' => 'Core/Core_d.stub', 'PHP_WINDOWS_NT_DOMAIN_CONTROLLER' => 'Core/Core_d.stub', 'PHP_WINDOWS_NT_SERVER' => 'Core/Core_d.stub', 'PHP_WINDOWS_NT_WORKSTATION' => 'Core/Core_d.stub', 'PHP_WINDOWS_VERSION_BUILD' => 'Core/Core_d.stub', 'PHP_WINDOWS_VERSION_MAJOR' => 'Core/Core_d.stub', 'PHP_WINDOWS_VERSION_MINOR' => 'Core/Core_d.stub', 'PHP_WINDOWS_VERSION_PLATFORM' => 'Core/Core_d.stub', 'PHP_WINDOWS_VERSION_PRODUCTTYPE' => 'Core/Core_d.stub', 'PHP_WINDOWS_VERSION_SP_MAJOR' => 'Core/Core_d.stub', 'PHP_WINDOWS_VERSION_SP_MINOR' => 'Core/Core_d.stub', 'PHP_WINDOWS_VERSION_SUITEMASK' => 'Core/Core_d.stub', 'PHP_ZTS' => 'Core/Core_d.stub', 'PKCS7_BINARY' => 'openssl/openssl.stub', 'PKCS7_DETACHED' => 'openssl/openssl.stub', 'PKCS7_NOATTR' => 'openssl/openssl.stub', 'PKCS7_NOCERTS' => 'openssl/openssl.stub', 'PKCS7_NOCHAIN' => 'openssl/openssl.stub', 'PKCS7_NOINTERN' => 'openssl/openssl.stub', 'PKCS7_NOSIGS' => 'openssl/openssl.stub', 'PKCS7_NOVERIFY' => 'openssl/openssl.stub', 'PKCS7_TEXT' => 'openssl/openssl.stub', 'PM_STR' => 'standard/standard_defines.stub', 'PNG_ALL_FILTERS' => 'gd/gd.stub', 'PNG_FILTER_AVG' => 'gd/gd.stub', 'PNG_FILTER_NONE' => 'gd/gd.stub', 'PNG_FILTER_PAETH' => 'gd/gd.stub', 'PNG_FILTER_SUB' => 'gd/gd.stub', 'PNG_FILTER_UP' => 'gd/gd.stub', 'PNG_NO_FILTER' => 'gd/gd.stub', 'POLL_ERR' => 'pcntl/pcntl.stub', 'POLL_HUP' => 'pcntl/pcntl.stub', 'POLL_IN' => 'pcntl/pcntl.stub', 'POLL_MSG' => 'pcntl/pcntl.stub', 'POLL_OUT' => 'pcntl/pcntl.stub', 'POLL_PRI' => 'pcntl/pcntl.stub', 'POSITIVE_SIGN' => 'standard/standard_defines.stub', 'POSIX_F_OK' => 'posix/posix.stub', 'POSIX_RLIMIT_AS' => 'posix/posix.stub', 'POSIX_RLIMIT_CORE' => 'posix/posix.stub', 'POSIX_RLIMIT_CPU' => 'posix/posix.stub', 'POSIX_RLIMIT_DATA' => 'posix/posix.stub', 'POSIX_RLIMIT_FSIZE' => 'posix/posix.stub', 'POSIX_RLIMIT_INFINITY' => 'posix/posix.stub', 'POSIX_RLIMIT_LOCKS' => 'posix/posix.stub', 'POSIX_RLIMIT_MEMLOCK' => 'posix/posix.stub', 'POSIX_RLIMIT_MSGQUEUE' => 'posix/posix.stub', 'POSIX_RLIMIT_NICE' => 'posix/posix.stub', 'POSIX_RLIMIT_NOFILE' => 'posix/posix.stub', 'POSIX_RLIMIT_NPROC' => 'posix/posix.stub', 'POSIX_RLIMIT_RSS' => 'posix/posix.stub', 'POSIX_RLIMIT_RTPRIO' => 'posix/posix.stub', 'POSIX_RLIMIT_RTTIME' => 'posix/posix.stub', 'POSIX_RLIMIT_SIGPENDING' => 'posix/posix.stub', 'POSIX_RLIMIT_STACK' => 'posix/posix.stub', 'POSIX_R_OK' => 'posix/posix.stub', 'POSIX_S_IFBLK' => 'posix/posix.stub', 'POSIX_S_IFCHR' => 'posix/posix.stub', 'POSIX_S_IFIFO' => 'posix/posix.stub', 'POSIX_S_IFREG' => 'posix/posix.stub', 'POSIX_S_IFSOCK' => 'posix/posix.stub', 'POSIX_W_OK' => 'posix/posix.stub', 'POSIX_X_OK' => 'posix/posix.stub', 'PREG_BACKTRACK_LIMIT_ERROR' => 'pcre/pcre.stub', 'PREG_BAD_UTF8_ERROR' => 'pcre/pcre.stub', 'PREG_BAD_UTF8_OFFSET_ERROR' => 'pcre/pcre.stub', 'PREG_GREP_INVERT' => 'pcre/pcre.stub', 'PREG_INTERNAL_ERROR' => 'pcre/pcre.stub', 'PREG_JIT_STACKLIMIT_ERROR' => 'pcre/pcre.stub', 'PREG_NO_ERROR' => 'pcre/pcre.stub', 'PREG_OFFSET_CAPTURE' => 'pcre/pcre.stub', 'PREG_PATTERN_ORDER' => 'pcre/pcre.stub', 'PREG_RECURSION_LIMIT_ERROR' => 'pcre/pcre.stub', 'PREG_SET_ORDER' => 'pcre/pcre.stub', 'PREG_SPLIT_DELIM_CAPTURE' => 'pcre/pcre.stub', 'PREG_SPLIT_NO_EMPTY' => 'pcre/pcre.stub', 'PREG_SPLIT_OFFSET_CAPTURE' => 'pcre/pcre.stub', 'PREG_UNMATCHED_AS_NULL' => 'pcre/pcre.stub', 'PRIO_PGRP' => 'pcntl/pcntl.stub', 'PRIO_PROCESS' => 'pcntl/pcntl.stub', 'PRIO_USER' => 'pcntl/pcntl.stub', 'PSFS_ERR_FATAL' => 'standard/standard_defines.stub', 'PSFS_FEED_ME' => 'standard/standard_defines.stub', 'PSFS_FLAG_FLUSH_CLOSE' => 'standard/standard_defines.stub', 'PSFS_FLAG_FLUSH_INC' => 'standard/standard_defines.stub', 'PSFS_FLAG_NORMAL' => 'standard/standard_defines.stub', 'PSFS_PASS_ON' => 'standard/standard_defines.stub', 'PSPELL_BAD_SPELLERS' => 'pspell/pspell.stub', 'PSPELL_FAST' => 'pspell/pspell.stub', 'PSPELL_NORMAL' => 'pspell/pspell.stub', 'PSPELL_RUN_TOGETHER' => 'pspell/pspell.stub', 'PTHREADS_ALLOW_HEADERS' => 'pthreads/pthreads.stub', 'PTHREADS_INHERIT_ALL' => 'pthreads/pthreads.stub', 'PTHREADS_INHERIT_CLASSES' => 'pthreads/pthreads.stub', 'PTHREADS_INHERIT_COMMENTS' => 'pthreads/pthreads.stub', 'PTHREADS_INHERIT_CONSTANTS' => 'pthreads/pthreads.stub', 'PTHREADS_INHERIT_FUNCTIONS' => 'pthreads/pthreads.stub', 'PTHREADS_INHERIT_INCLUDES' => 'pthreads/pthreads.stub', 'PTHREADS_INHERIT_INI' => 'pthreads/pthreads.stub', 'PTHREADS_INHERIT_NONE' => 'pthreads/pthreads.stub', 'P_CS_PRECEDES' => 'standard/standard_defines.stub', 'P_SEP_BY_SPACE' => 'standard/standard_defines.stub', 'P_SIGN_POSN' => 'standard/standard_defines.stub', 'PopupWindow' => 'winbinder/winbinder.stub', 'PushButton' => 'winbinder/winbinder.stub', 'RADIUS_ACCESS_ACCEPT' => 'radius/radius.stub', 'RADIUS_ACCESS_CHALLENGE' => 'radius/radius.stub', 'RADIUS_ACCESS_REJECT' => 'radius/radius.stub', 'RADIUS_ACCESS_REQUEST' => 'radius/radius.stub', 'RADIUS_ACCOUNTING_OFF' => 'radius/radius.stub', 'RADIUS_ACCOUNTING_ON' => 'radius/radius.stub', 'RADIUS_ACCOUNTING_REQUEST' => 'radius/radius.stub', 'RADIUS_ACCOUNTING_RESPONSE' => 'radius/radius.stub', 'RADIUS_ACCT_AUTHENTIC' => 'radius/radius.stub', 'RADIUS_ACCT_DELAY_TIME' => 'radius/radius.stub', 'RADIUS_ACCT_INPUT_OCTETS' => 'radius/radius.stub', 'RADIUS_ACCT_INPUT_PACKETS' => 'radius/radius.stub', 'RADIUS_ACCT_LINK_COUNT' => 'radius/radius.stub', 'RADIUS_ACCT_MULTI_SESSION_ID' => 'radius/radius.stub', 'RADIUS_ACCT_OUTPUT_OCTETS' => 'radius/radius.stub', 'RADIUS_ACCT_OUTPUT_PACKETS' => 'radius/radius.stub', 'RADIUS_ACCT_SESSION_ID' => 'radius/radius.stub', 'RADIUS_ACCT_SESSION_TIME' => 'radius/radius.stub', 'RADIUS_ACCT_STATUS_TYPE' => 'radius/radius.stub', 'RADIUS_ACCT_TERMINATE_CAUSE' => 'radius/radius.stub', 'RADIUS_ADMINISTRATIVE' => 'radius/radius.stub', 'RADIUS_ADSL_CAP' => 'radius/radius.stub', 'RADIUS_ADSL_DMT' => 'radius/radius.stub', 'RADIUS_ARAP' => 'radius/radius.stub', 'RADIUS_ASYNC' => 'radius/radius.stub', 'RADIUS_AUTHENTICATE_ONLY' => 'radius/radius.stub', 'RADIUS_AUTH_LOCAL' => 'radius/radius.stub', 'RADIUS_AUTH_RADIUS' => 'radius/radius.stub', 'RADIUS_AUTH_REMOTE' => 'radius/radius.stub', 'RADIUS_CABLE' => 'radius/radius.stub', 'RADIUS_CALLBACK_FRAMED' => 'radius/radius.stub', 'RADIUS_CALLBACK_ID' => 'radius/radius.stub', 'RADIUS_CALLBACK_LOGIN' => 'radius/radius.stub', 'RADIUS_CALLBACK_NAS_PROMPT' => 'radius/radius.stub', 'RADIUS_CALLBACK_NUMBER' => 'radius/radius.stub', 'RADIUS_CALLED_STATION_ID' => 'radius/radius.stub', 'RADIUS_CALLING_STATION_ID' => 'radius/radius.stub', 'RADIUS_CHAP_CHALLENGE' => 'radius/radius.stub', 'RADIUS_CHAP_PASSWORD' => 'radius/radius.stub', 'RADIUS_CLASS' => 'radius/radius.stub', 'RADIUS_COA_ACK' => 'radius/radius.stub', 'RADIUS_COA_NAK' => 'radius/radius.stub', 'RADIUS_COA_REQUEST' => 'radius/radius.stub', 'RADIUS_COMP_IPXHDR' => 'radius/radius.stub', 'RADIUS_COMP_NONE' => 'radius/radius.stub', 'RADIUS_COMP_VJ' => 'radius/radius.stub', 'RADIUS_CONNECT_INFO' => 'radius/radius.stub', 'RADIUS_DISCONNECT_ACK' => 'radius/radius.stub', 'RADIUS_DISCONNECT_NAK' => 'radius/radius.stub', 'RADIUS_DISCONNECT_REQUEST' => 'radius/radius.stub', 'RADIUS_ERROR_CAUSE' => 'radius/radius.stub', 'RADIUS_ERROR_CAUSE_ADMINISTRATIVELY_PROHIBITED' => 'radius/radius.stub', 'RADIUS_ERROR_CAUSE_INVALID_EAP_PACKET' => 'radius/radius.stub', 'RADIUS_ERROR_CAUSE_INVALID_REQUEST' => 'radius/radius.stub', 'RADIUS_ERROR_CAUSE_MISSING_ATTRIBUTE' => 'radius/radius.stub', 'RADIUS_ERROR_CAUSE_NAS_IDENTIFICATION_MISMATCH' => 'radius/radius.stub', 'RADIUS_ERROR_CAUSE_OTHER_PROXY_PROCESSING_ERROR' => 'radius/radius.stub', 'RADIUS_ERROR_CAUSE_REQUEST_INITIATED' => 'radius/radius.stub', 'RADIUS_ERROR_CAUSE_REQUEST_NOT_ROUTABLE' => 'radius/radius.stub', 'RADIUS_ERROR_CAUSE_RESIDUAL_SESSION_CONTEXT_REMOVED' => 'radius/radius.stub', 'RADIUS_ERROR_CAUSE_RESOURCES_UNAVAILABLE' => 'radius/radius.stub', 'RADIUS_ERROR_CAUSE_SESSION_CONTEXT_NOT_FOUND' => 'radius/radius.stub', 'RADIUS_ERROR_CAUSE_SESSION_CONTEXT_NOT_REMOVABLE' => 'radius/radius.stub', 'RADIUS_ERROR_CAUSE_UNSUPPORTED_ATTRIBUTE' => 'radius/radius.stub', 'RADIUS_ERROR_CAUSE_UNSUPPORTED_EXCEPTION' => 'radius/radius.stub', 'RADIUS_ERROR_CAUSE_UNSUPPORTED_SERVICE' => 'radius/radius.stub', 'RADIUS_ETHERNET' => 'radius/radius.stub', 'RADIUS_FILTER_ID' => 'radius/radius.stub', 'RADIUS_FRAMED' => 'radius/radius.stub', 'RADIUS_FRAMED_APPLETALK_LINK' => 'radius/radius.stub', 'RADIUS_FRAMED_APPLETALK_NETWORK' => 'radius/radius.stub', 'RADIUS_FRAMED_APPLETALK_ZONE' => 'radius/radius.stub', 'RADIUS_FRAMED_COMPRESSION' => 'radius/radius.stub', 'RADIUS_FRAMED_INTERFACE_ID' => 'radius/radius.stub', 'RADIUS_FRAMED_IPV6_POOL' => 'radius/radius.stub', 'RADIUS_FRAMED_IPV6_PREFIX' => 'radius/radius.stub', 'RADIUS_FRAMED_IPV6_ROUTE' => 'radius/radius.stub', 'RADIUS_FRAMED_IPX_NETWORK' => 'radius/radius.stub', 'RADIUS_FRAMED_IP_ADDRESS' => 'radius/radius.stub', 'RADIUS_FRAMED_IP_NETMASK' => 'radius/radius.stub', 'RADIUS_FRAMED_MTU' => 'radius/radius.stub', 'RADIUS_FRAMED_PROTOCOL' => 'radius/radius.stub', 'RADIUS_FRAMED_ROUTE' => 'radius/radius.stub', 'RADIUS_FRAMED_ROUTING' => 'radius/radius.stub', 'RADIUS_GANDALF' => 'radius/radius.stub', 'RADIUS_G_3_FAX' => 'radius/radius.stub', 'RADIUS_HDLC_CLEAR_CHANNEL' => 'radius/radius.stub', 'RADIUS_IDLE_TIMEOUT' => 'radius/radius.stub', 'RADIUS_IDSL' => 'radius/radius.stub', 'RADIUS_ISDN_ASYNC_V110' => 'radius/radius.stub', 'RADIUS_ISDN_ASYNC_V120' => 'radius/radius.stub', 'RADIUS_ISDN_SYNC' => 'radius/radius.stub', 'RADIUS_LOGIN' => 'radius/radius.stub', 'RADIUS_LOGIN_IPV6_HOST' => 'radius/radius.stub', 'RADIUS_LOGIN_IP_HOST' => 'radius/radius.stub', 'RADIUS_LOGIN_LAT_GROUP' => 'radius/radius.stub', 'RADIUS_LOGIN_LAT_NODE' => 'radius/radius.stub', 'RADIUS_LOGIN_LAT_PORT' => 'radius/radius.stub', 'RADIUS_LOGIN_LAT_SERVICE' => 'radius/radius.stub', 'RADIUS_LOGIN_SERVICE' => 'radius/radius.stub', 'RADIUS_LOGIN_TCP_PORT' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_ACCT_AUTH_TYPE' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_ACCT_EAP_TYPE' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_ARAP_CHALLENGE' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_ARAP_PASSWORD_CHANGE_REASON' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_BAP_USAGE' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_CHAP2_PW' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_CHAP2_RESPONSE' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_CHAP2_SUCCESS' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_CHAP_CHALLENGE' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_CHAP_DOMAIN' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_CHAP_ERROR' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_CHAP_LM_ENC_PW' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_CHAP_MPPE_KEYS' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_CHAP_NT_ENC_PW' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_CHAP_PW_1' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_CHAP_PW_2' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_CHAP_RESPONSE' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_FILTER' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_LINK_DROP_TIME_LIMIT' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_LINK_UTILIZATION_THRESHOLD' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_MPPE_ENCRYPTION_POLICY' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_MPPE_ENCRYPTION_TYPES' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_MPPE_RECV_KEY' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_MPPE_SEND_KEY' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_NEW_ARAP_PASSWORD' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_OLD_ARAP_PASSWORD' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_PRIMARY_DNS_SERVER' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_PRIMARY_NBNS_SERVER' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_RAS_VENDOR' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_RAS_VERSION' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_SECONDARY_DNS_SERVER' => 'radius/radius.stub', 'RADIUS_MICROSOFT_MS_SECONDARY_NBNS_SERVER' => 'radius/radius.stub', 'RADIUS_MPPE_KEY_LEN' => 'radius/radius.stub', 'RADIUS_NAS_IDENTIFIER' => 'radius/radius.stub', 'RADIUS_NAS_IPV6_ADDRESS' => 'radius/radius.stub', 'RADIUS_NAS_IP_ADDRESS' => 'radius/radius.stub', 'RADIUS_NAS_PORT' => 'radius/radius.stub', 'RADIUS_NAS_PORT_TYPE' => 'radius/radius.stub', 'RADIUS_NAS_PROMPT' => 'radius/radius.stub', 'RADIUS_OPTION_NONE' => 'radius/radius.stub', 'RADIUS_OPTION_SALT' => 'radius/radius.stub', 'RADIUS_OPTION_TAGGED' => 'radius/radius.stub', 'RADIUS_OUTBOUND' => 'radius/radius.stub', 'RADIUS_PIAFS' => 'radius/radius.stub', 'RADIUS_PORT_LIMIT' => 'radius/radius.stub', 'RADIUS_PPP' => 'radius/radius.stub', 'RADIUS_PROXY_STATE' => 'radius/radius.stub', 'RADIUS_REPLY_MESSAGE' => 'radius/radius.stub', 'RADIUS_SDSL' => 'radius/radius.stub', 'RADIUS_SERVICE_TYPE' => 'radius/radius.stub', 'RADIUS_SESSION_TIMEOUT' => 'radius/radius.stub', 'RADIUS_SLIP' => 'radius/radius.stub', 'RADIUS_START' => 'radius/radius.stub', 'RADIUS_STATE' => 'radius/radius.stub', 'RADIUS_STOP' => 'radius/radius.stub', 'RADIUS_SYNC' => 'radius/radius.stub', 'RADIUS_TERMINATION_ACTION' => 'radius/radius.stub', 'RADIUS_TERM_ADMIN_REBOOT' => 'radius/radius.stub', 'RADIUS_TERM_ADMIN_RESET' => 'radius/radius.stub', 'RADIUS_TERM_CALLBACK' => 'radius/radius.stub', 'RADIUS_TERM_HOST_REQUEST' => 'radius/radius.stub', 'RADIUS_TERM_IDLE_TIMEOUT' => 'radius/radius.stub', 'RADIUS_TERM_LOST_CARRIER' => 'radius/radius.stub', 'RADIUS_TERM_LOST_SERVICE' => 'radius/radius.stub', 'RADIUS_TERM_NAS_ERROR' => 'radius/radius.stub', 'RADIUS_TERM_NAS_REBOOT' => 'radius/radius.stub', 'RADIUS_TERM_NAS_REQUEST' => 'radius/radius.stub', 'RADIUS_TERM_PORT_ERROR' => 'radius/radius.stub', 'RADIUS_TERM_PORT_PREEMPTED' => 'radius/radius.stub', 'RADIUS_TERM_PORT_SUSPENDED' => 'radius/radius.stub', 'RADIUS_TERM_PORT_UNNEEDED' => 'radius/radius.stub', 'RADIUS_TERM_SERVICE_UNAVAILABLE' => 'radius/radius.stub', 'RADIUS_TERM_SESSION_TIMEOUT' => 'radius/radius.stub', 'RADIUS_TERM_USER_ERROR' => 'radius/radius.stub', 'RADIUS_TERM_USER_REQUEST' => 'radius/radius.stub', 'RADIUS_USER_NAME' => 'radius/radius.stub', 'RADIUS_USER_PASSWORD' => 'radius/radius.stub', 'RADIUS_VENDOR_MICROSOFT' => 'radius/radius.stub', 'RADIUS_VENDOR_SPECIFIC' => 'radius/radius.stub', 'RADIUS_VIRTUAL' => 'radius/radius.stub', 'RADIUS_WIRELESS_IEEE_802_11' => 'radius/radius.stub', 'RADIUS_WIRELESS_OTHER' => 'radius/radius.stub', 'RADIUS_XDSL' => 'radius/radius.stub', 'RADIUS_XYLOGICS' => 'radius/radius.stub', 'RADIUS_X_25' => 'radius/radius.stub', 'RADIUS_X_75' => 'radius/radius.stub', 'RADIXCHAR' => 'standard/standard_defines.stub', 'RAD_OPTION_TAG' => 'radius/radius.stub', 'RD_KAFKA_BUILD_VERSION' => 'rdkafka/constants.stub', 'RD_KAFKA_CONF_INVALID' => 'rdkafka/constants.stub', 'RD_KAFKA_CONF_OK' => 'rdkafka/constants.stub', 'RD_KAFKA_CONF_UNKNOWN' => 'rdkafka/constants.stub', 'RD_KAFKA_CONSUMER' => 'rdkafka/constants.stub', 'RD_KAFKA_LOG_PRINT' => 'rdkafka/constants.stub', 'RD_KAFKA_LOG_SYSLOG' => 'rdkafka/constants.stub', 'RD_KAFKA_LOG_SYSLOG_PRINT' => 'rdkafka/constants.stub', 'RD_KAFKA_MSG_F_BLOCK' => 'rdkafka/constants.stub', 'RD_KAFKA_MSG_PARTITIONER_CONSISTENT' => 'rdkafka/constants.stub', 'RD_KAFKA_MSG_PARTITIONER_CONSISTENT_RANDOM' => 'rdkafka/constants.stub', 'RD_KAFKA_MSG_PARTITIONER_MURMUR2' => 'rdkafka/constants.stub', 'RD_KAFKA_MSG_PARTITIONER_MURMUR2_RANDOM' => 'rdkafka/constants.stub', 'RD_KAFKA_MSG_PARTITIONER_RANDOM' => 'rdkafka/constants.stub', 'RD_KAFKA_OFFSET_BEGINNING' => 'rdkafka/constants.stub', 'RD_KAFKA_OFFSET_END' => 'rdkafka/constants.stub', 'RD_KAFKA_OFFSET_INVALID' => 'rdkafka/constants.stub', 'RD_KAFKA_OFFSET_STORED' => 'rdkafka/constants.stub', 'RD_KAFKA_PARTITION_UA' => 'rdkafka/constants.stub', 'RD_KAFKA_PRODUCER' => 'rdkafka/constants.stub', 'RD_KAFKA_PURGE_F_INFLIGHT' => 'rdkafka/constants.stub', 'RD_KAFKA_PURGE_F_NON_BLOCKING' => 'rdkafka/constants.stub', 'RD_KAFKA_PURGE_F_QUEUE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_DUPLICATE_RESOURCE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_ELECTION_NOT_NEEDED' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_ELIGIBLE_LEADERS_NOT_AVAILABLE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_FEATURE_UPDATE_FAILED' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_GROUP_COORDINATOR_NOT_AVAILABLE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_GROUP_LOAD_IN_PROGRESS' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_GROUP_SUBSCRIBED_TO_TOPIC' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_INCONSISTENT_VOTER_SET' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_INVALID_CONFIG' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_INVALID_GROUP_ID' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_INVALID_MSG' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_INVALID_PARTITIONS' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_INVALID_RECORD' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_INVALID_REQUEST' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_INVALID_TXN_STATE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_INVALID_UPDATE_VERSION' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_NOT_CONTROLLER' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_NOT_COORDINATOR' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_NOT_COORDINATOR_FOR_GROUP' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_NO_ERROR' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_NO_REASSIGNMENT_IN_PROGRESS' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_POLICY_VIOLATION' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_PRINCIPAL_DESERIALIZATION_FAILURE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_PRODUCER_FENCED' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_RESOURCE_NOT_FOUND' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_SECURITY_DISABLED' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_THROTTLING_QUOTA_EXCEEDED' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_UNACCEPTABLE_CREDENTIAL' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_UNKNOWN' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_UNSTABLE_OFFSET_COMMIT' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__APPLICATION' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__ASSIGNMENT_LOST' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__AUTHENTICATION' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__AUTO_OFFSET_RESET' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__BAD_COMPRESSION' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__BAD_MSG' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__BEGIN' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__CONFLICT' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__DESTROY' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__END' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__FAIL' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__FATAL' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__FENCED' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__FS' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__INCONSISTENT' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__INTR' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__INVALID_ARG' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__INVALID_TYPE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__IN_PROGRESS' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__ISR_INSUFF' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__KEY_SERIALIZATION' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__MSG_TIMED_OUT' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__NODE_UPDATE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__NOENT' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__NOOP' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__NOT_CONFIGURED' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__NO_OFFSET' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__OUTDATED' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__PARTIAL' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__PARTITION_EOF' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__PURGE_INFLIGHT' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__PURGE_QUEUE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__QUEUE_FULL' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__READ_ONLY' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__RESOLVE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__RETRY' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__SSL' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__STATE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__TIMED_OUT' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__TRANSPORT' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__UNDERFLOW' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__UNKNOWN_BROKER' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__UNKNOWN_GROUP' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__WAIT_CACHE' => 'rdkafka/constants.stub', 'RD_KAFKA_RESP_ERR__WAIT_COORD' => 'rdkafka/constants.stub', 'RD_KAFKA_VERSION' => 'rdkafka/constants.stub', 'READLINE_LIB' => 'readline/readline.stub', 'RED' => 'winbinder/winbinder.stub', 'RPMMIRE_DEFAULT' => 'rpminfo/rpminfo.stub', 'RPMMIRE_GLOB' => 'rpminfo/rpminfo.stub', 'RPMMIRE_REGEX' => 'rpminfo/rpminfo.stub', 'RPMMIRE_STRCMP' => 'rpminfo/rpminfo.stub', 'RPMSENSE_ANY' => 'rpminfo/rpminfo.stub', 'RPMSENSE_CONFIG' => 'rpminfo/rpminfo.stub', 'RPMSENSE_EQUAL' => 'rpminfo/rpminfo.stub', 'RPMSENSE_FIND_PROVIDES' => 'rpminfo/rpminfo.stub', 'RPMSENSE_FIND_REQUIRES' => 'rpminfo/rpminfo.stub', 'RPMSENSE_GREATER' => 'rpminfo/rpminfo.stub', 'RPMSENSE_INTERP' => 'rpminfo/rpminfo.stub', 'RPMSENSE_KEYRING' => 'rpminfo/rpminfo.stub', 'RPMSENSE_LESS' => 'rpminfo/rpminfo.stub', 'RPMSENSE_MISSINGOK' => 'rpminfo/rpminfo.stub', 'RPMSENSE_POSTTRANS' => 'rpminfo/rpminfo.stub', 'RPMSENSE_PREREQ' => 'rpminfo/rpminfo.stub', 'RPMSENSE_PRETRANS' => 'rpminfo/rpminfo.stub', 'RPMSENSE_RPMLIB' => 'rpminfo/rpminfo.stub', 'RPMSENSE_SCRIPT_POST' => 'rpminfo/rpminfo.stub', 'RPMSENSE_SCRIPT_POSTUN' => 'rpminfo/rpminfo.stub', 'RPMSENSE_SCRIPT_PRE' => 'rpminfo/rpminfo.stub', 'RPMSENSE_SCRIPT_PREUN' => 'rpminfo/rpminfo.stub', 'RPMSENSE_SCRIPT_VERIFY' => 'rpminfo/rpminfo.stub', 'RPMSENSE_TRIGGERIN' => 'rpminfo/rpminfo.stub', 'RPMSENSE_TRIGGERPOSTUN' => 'rpminfo/rpminfo.stub', 'RPMSENSE_TRIGGERPREIN' => 'rpminfo/rpminfo.stub', 'RPMSENSE_TRIGGERUN' => 'rpminfo/rpminfo.stub', 'RPMTAG_ARCH' => 'rpminfo/rpminfo.stub', 'RPMTAG_ARCHIVESIZE' => 'rpminfo/rpminfo.stub', 'RPMTAG_BASENAMES' => 'rpminfo/rpminfo.stub', 'RPMTAG_BUGURL' => 'rpminfo/rpminfo.stub', 'RPMTAG_BUILDARCHS' => 'rpminfo/rpminfo.stub', 'RPMTAG_BUILDHOST' => 'rpminfo/rpminfo.stub', 'RPMTAG_BUILDTIME' => 'rpminfo/rpminfo.stub', 'RPMTAG_C' => 'rpminfo/rpminfo.stub', 'RPMTAG_CHANGELOGNAME' => 'rpminfo/rpminfo.stub', 'RPMTAG_CHANGELOGTEXT' => 'rpminfo/rpminfo.stub', 'RPMTAG_CHANGELOGTIME' => 'rpminfo/rpminfo.stub', 'RPMTAG_CLASSDICT' => 'rpminfo/rpminfo.stub', 'RPMTAG_CONFLICTFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_CONFLICTNAME' => 'rpminfo/rpminfo.stub', 'RPMTAG_CONFLICTNEVRS' => 'rpminfo/rpminfo.stub', 'RPMTAG_CONFLICTS' => 'rpminfo/rpminfo.stub', 'RPMTAG_CONFLICTVERSION' => 'rpminfo/rpminfo.stub', 'RPMTAG_COOKIE' => 'rpminfo/rpminfo.stub', 'RPMTAG_DBINSTANCE' => 'rpminfo/rpminfo.stub', 'RPMTAG_DEPENDSDICT' => 'rpminfo/rpminfo.stub', 'RPMTAG_DESCRIPTION' => 'rpminfo/rpminfo.stub', 'RPMTAG_DIRINDEXES' => 'rpminfo/rpminfo.stub', 'RPMTAG_DIRNAMES' => 'rpminfo/rpminfo.stub', 'RPMTAG_DISTRIBUTION' => 'rpminfo/rpminfo.stub', 'RPMTAG_DISTTAG' => 'rpminfo/rpminfo.stub', 'RPMTAG_DISTURL' => 'rpminfo/rpminfo.stub', 'RPMTAG_DSAHEADER' => 'rpminfo/rpminfo.stub', 'RPMTAG_E' => 'rpminfo/rpminfo.stub', 'RPMTAG_ENCODING' => 'rpminfo/rpminfo.stub', 'RPMTAG_ENHANCEFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_ENHANCENAME' => 'rpminfo/rpminfo.stub', 'RPMTAG_ENHANCENEVRS' => 'rpminfo/rpminfo.stub', 'RPMTAG_ENHANCES' => 'rpminfo/rpminfo.stub', 'RPMTAG_ENHANCEVERSION' => 'rpminfo/rpminfo.stub', 'RPMTAG_EPOCH' => 'rpminfo/rpminfo.stub', 'RPMTAG_EPOCHNUM' => 'rpminfo/rpminfo.stub', 'RPMTAG_EVR' => 'rpminfo/rpminfo.stub', 'RPMTAG_EXCLUDEARCH' => 'rpminfo/rpminfo.stub', 'RPMTAG_EXCLUDEOS' => 'rpminfo/rpminfo.stub', 'RPMTAG_EXCLUSIVEARCH' => 'rpminfo/rpminfo.stub', 'RPMTAG_EXCLUSIVEOS' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILECAPS' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILECLASS' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILECOLORS' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILECONTEXTS' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILEDEPENDSN' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILEDEPENDSX' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILEDEVICES' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILEDIGESTALGO' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILEDIGESTS' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILEFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILEGROUPNAME' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILEINODES' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILELANGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILELINKTOS' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILEMD5S' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILEMODES' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILEMTIMES' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILENAMES' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILENLINKS' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILEPROVIDE' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILERDEVS' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILEREQUIRE' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILESIGNATURELENGTH' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILESIGNATURES' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILESIZES' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILESTATES' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILETRIGGERCONDS' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILETRIGGERFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILETRIGGERINDEX' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILETRIGGERNAME' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILETRIGGERPRIORITIES' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILETRIGGERSCRIPTFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILETRIGGERSCRIPTPROG' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILETRIGGERSCRIPTS' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILETRIGGERTYPE' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILETRIGGERVERSION' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILEUSERNAME' => 'rpminfo/rpminfo.stub', 'RPMTAG_FILEVERIFYFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_FSCONTEXTS' => 'rpminfo/rpminfo.stub', 'RPMTAG_GIF' => 'rpminfo/rpminfo.stub', 'RPMTAG_GROUP' => 'rpminfo/rpminfo.stub', 'RPMTAG_HDRID' => 'rpminfo/rpminfo.stub', 'RPMTAG_HEADERCOLOR' => 'rpminfo/rpminfo.stub', 'RPMTAG_HEADERI18NTABLE' => 'rpminfo/rpminfo.stub', 'RPMTAG_HEADERIMAGE' => 'rpminfo/rpminfo.stub', 'RPMTAG_HEADERIMMUTABLE' => 'rpminfo/rpminfo.stub', 'RPMTAG_HEADERREGIONS' => 'rpminfo/rpminfo.stub', 'RPMTAG_HEADERSIGNATURES' => 'rpminfo/rpminfo.stub', 'RPMTAG_ICON' => 'rpminfo/rpminfo.stub', 'RPMTAG_INSTALLCOLOR' => 'rpminfo/rpminfo.stub', 'RPMTAG_INSTALLTID' => 'rpminfo/rpminfo.stub', 'RPMTAG_INSTALLTIME' => 'rpminfo/rpminfo.stub', 'RPMTAG_INSTFILENAMES' => 'rpminfo/rpminfo.stub', 'RPMTAG_INSTPREFIXES' => 'rpminfo/rpminfo.stub', 'RPMTAG_LICENSE' => 'rpminfo/rpminfo.stub', 'RPMTAG_LONGARCHIVESIZE' => 'rpminfo/rpminfo.stub', 'RPMTAG_LONGFILESIZES' => 'rpminfo/rpminfo.stub', 'RPMTAG_LONGSIGSIZE' => 'rpminfo/rpminfo.stub', 'RPMTAG_LONGSIZE' => 'rpminfo/rpminfo.stub', 'RPMTAG_MODULARITYLABEL' => 'rpminfo/rpminfo.stub', 'RPMTAG_N' => 'rpminfo/rpminfo.stub', 'RPMTAG_NAME' => 'rpminfo/rpminfo.stub', 'RPMTAG_NEVR' => 'rpminfo/rpminfo.stub', 'RPMTAG_NEVRA' => 'rpminfo/rpminfo.stub', 'RPMTAG_NOPATCH' => 'rpminfo/rpminfo.stub', 'RPMTAG_NOSOURCE' => 'rpminfo/rpminfo.stub', 'RPMTAG_NVR' => 'rpminfo/rpminfo.stub', 'RPMTAG_NVRA' => 'rpminfo/rpminfo.stub', 'RPMTAG_O' => 'rpminfo/rpminfo.stub', 'RPMTAG_OBSOLETEFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_OBSOLETENAME' => 'rpminfo/rpminfo.stub', 'RPMTAG_OBSOLETENEVRS' => 'rpminfo/rpminfo.stub', 'RPMTAG_OBSOLETES' => 'rpminfo/rpminfo.stub', 'RPMTAG_OBSOLETEVERSION' => 'rpminfo/rpminfo.stub', 'RPMTAG_OLDENHANCES' => 'rpminfo/rpminfo.stub', 'RPMTAG_OLDENHANCESFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_OLDENHANCESNAME' => 'rpminfo/rpminfo.stub', 'RPMTAG_OLDENHANCESVERSION' => 'rpminfo/rpminfo.stub', 'RPMTAG_OLDFILENAMES' => 'rpminfo/rpminfo.stub', 'RPMTAG_OLDSUGGESTS' => 'rpminfo/rpminfo.stub', 'RPMTAG_OLDSUGGESTSFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_OLDSUGGESTSNAME' => 'rpminfo/rpminfo.stub', 'RPMTAG_OLDSUGGESTSVERSION' => 'rpminfo/rpminfo.stub', 'RPMTAG_OPTFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_ORDERFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_ORDERNAME' => 'rpminfo/rpminfo.stub', 'RPMTAG_ORDERVERSION' => 'rpminfo/rpminfo.stub', 'RPMTAG_ORIGBASENAMES' => 'rpminfo/rpminfo.stub', 'RPMTAG_ORIGDIRINDEXES' => 'rpminfo/rpminfo.stub', 'RPMTAG_ORIGDIRNAMES' => 'rpminfo/rpminfo.stub', 'RPMTAG_ORIGFILENAMES' => 'rpminfo/rpminfo.stub', 'RPMTAG_OS' => 'rpminfo/rpminfo.stub', 'RPMTAG_P' => 'rpminfo/rpminfo.stub', 'RPMTAG_PACKAGER' => 'rpminfo/rpminfo.stub', 'RPMTAG_PATCH' => 'rpminfo/rpminfo.stub', 'RPMTAG_PATCHESFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_PATCHESNAME' => 'rpminfo/rpminfo.stub', 'RPMTAG_PATCHESVERSION' => 'rpminfo/rpminfo.stub', 'RPMTAG_PAYLOADCOMPRESSOR' => 'rpminfo/rpminfo.stub', 'RPMTAG_PAYLOADDIGEST' => 'rpminfo/rpminfo.stub', 'RPMTAG_PAYLOADDIGESTALGO' => 'rpminfo/rpminfo.stub', 'RPMTAG_PAYLOADFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_PAYLOADFORMAT' => 'rpminfo/rpminfo.stub', 'RPMTAG_PKGID' => 'rpminfo/rpminfo.stub', 'RPMTAG_PLATFORM' => 'rpminfo/rpminfo.stub', 'RPMTAG_POLICIES' => 'rpminfo/rpminfo.stub', 'RPMTAG_POLICYFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_POLICYNAMES' => 'rpminfo/rpminfo.stub', 'RPMTAG_POLICYTYPES' => 'rpminfo/rpminfo.stub', 'RPMTAG_POLICYTYPESINDEXES' => 'rpminfo/rpminfo.stub', 'RPMTAG_POSTIN' => 'rpminfo/rpminfo.stub', 'RPMTAG_POSTINFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_POSTINPROG' => 'rpminfo/rpminfo.stub', 'RPMTAG_POSTTRANS' => 'rpminfo/rpminfo.stub', 'RPMTAG_POSTTRANSFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_POSTTRANSPROG' => 'rpminfo/rpminfo.stub', 'RPMTAG_POSTUN' => 'rpminfo/rpminfo.stub', 'RPMTAG_POSTUNFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_POSTUNPROG' => 'rpminfo/rpminfo.stub', 'RPMTAG_PREFIXES' => 'rpminfo/rpminfo.stub', 'RPMTAG_PREIN' => 'rpminfo/rpminfo.stub', 'RPMTAG_PREINFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_PREINPROG' => 'rpminfo/rpminfo.stub', 'RPMTAG_PRETRANS' => 'rpminfo/rpminfo.stub', 'RPMTAG_PRETRANSFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_PRETRANSPROG' => 'rpminfo/rpminfo.stub', 'RPMTAG_PREUN' => 'rpminfo/rpminfo.stub', 'RPMTAG_PREUNFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_PREUNPROG' => 'rpminfo/rpminfo.stub', 'RPMTAG_PROVIDEFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_PROVIDENAME' => 'rpminfo/rpminfo.stub', 'RPMTAG_PROVIDENEVRS' => 'rpminfo/rpminfo.stub', 'RPMTAG_PROVIDES' => 'rpminfo/rpminfo.stub', 'RPMTAG_PROVIDEVERSION' => 'rpminfo/rpminfo.stub', 'RPMTAG_PUBKEYS' => 'rpminfo/rpminfo.stub', 'RPMTAG_R' => 'rpminfo/rpminfo.stub', 'RPMTAG_RECOMMENDFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_RECOMMENDNAME' => 'rpminfo/rpminfo.stub', 'RPMTAG_RECOMMENDNEVRS' => 'rpminfo/rpminfo.stub', 'RPMTAG_RECOMMENDS' => 'rpminfo/rpminfo.stub', 'RPMTAG_RECOMMENDVERSION' => 'rpminfo/rpminfo.stub', 'RPMTAG_RECONTEXTS' => 'rpminfo/rpminfo.stub', 'RPMTAG_RELEASE' => 'rpminfo/rpminfo.stub', 'RPMTAG_REMOVETID' => 'rpminfo/rpminfo.stub', 'RPMTAG_REQUIREFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_REQUIRENAME' => 'rpminfo/rpminfo.stub', 'RPMTAG_REQUIRENEVRS' => 'rpminfo/rpminfo.stub', 'RPMTAG_REQUIRES' => 'rpminfo/rpminfo.stub', 'RPMTAG_REQUIREVERSION' => 'rpminfo/rpminfo.stub', 'RPMTAG_RPMVERSION' => 'rpminfo/rpminfo.stub', 'RPMTAG_RSAHEADER' => 'rpminfo/rpminfo.stub', 'RPMTAG_SHA1HEADER' => 'rpminfo/rpminfo.stub', 'RPMTAG_SHA256HEADER' => 'rpminfo/rpminfo.stub', 'RPMTAG_SIGGPG' => 'rpminfo/rpminfo.stub', 'RPMTAG_SIGMD5' => 'rpminfo/rpminfo.stub', 'RPMTAG_SIGPGP' => 'rpminfo/rpminfo.stub', 'RPMTAG_SIGSIZE' => 'rpminfo/rpminfo.stub', 'RPMTAG_SIZE' => 'rpminfo/rpminfo.stub', 'RPMTAG_SOURCE' => 'rpminfo/rpminfo.stub', 'RPMTAG_SOURCEPACKAGE' => 'rpminfo/rpminfo.stub', 'RPMTAG_SOURCEPKGID' => 'rpminfo/rpminfo.stub', 'RPMTAG_SOURCERPM' => 'rpminfo/rpminfo.stub', 'RPMTAG_SUGGESTFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_SUGGESTNAME' => 'rpminfo/rpminfo.stub', 'RPMTAG_SUGGESTNEVRS' => 'rpminfo/rpminfo.stub', 'RPMTAG_SUGGESTS' => 'rpminfo/rpminfo.stub', 'RPMTAG_SUGGESTVERSION' => 'rpminfo/rpminfo.stub', 'RPMTAG_SUMMARY' => 'rpminfo/rpminfo.stub', 'RPMTAG_SUPPLEMENTFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_SUPPLEMENTNAME' => 'rpminfo/rpminfo.stub', 'RPMTAG_SUPPLEMENTNEVRS' => 'rpminfo/rpminfo.stub', 'RPMTAG_SUPPLEMENTS' => 'rpminfo/rpminfo.stub', 'RPMTAG_SUPPLEMENTVERSION' => 'rpminfo/rpminfo.stub', 'RPMTAG_TRANSFILETRIGGERCONDS' => 'rpminfo/rpminfo.stub', 'RPMTAG_TRANSFILETRIGGERFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_TRANSFILETRIGGERINDEX' => 'rpminfo/rpminfo.stub', 'RPMTAG_TRANSFILETRIGGERNAME' => 'rpminfo/rpminfo.stub', 'RPMTAG_TRANSFILETRIGGERPRIORITIES' => 'rpminfo/rpminfo.stub', 'RPMTAG_TRANSFILETRIGGERSCRIPTFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_TRANSFILETRIGGERSCRIPTPROG' => 'rpminfo/rpminfo.stub', 'RPMTAG_TRANSFILETRIGGERSCRIPTS' => 'rpminfo/rpminfo.stub', 'RPMTAG_TRANSFILETRIGGERTYPE' => 'rpminfo/rpminfo.stub', 'RPMTAG_TRANSFILETRIGGERVERSION' => 'rpminfo/rpminfo.stub', 'RPMTAG_TRIGGERCONDS' => 'rpminfo/rpminfo.stub', 'RPMTAG_TRIGGERFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_TRIGGERINDEX' => 'rpminfo/rpminfo.stub', 'RPMTAG_TRIGGERNAME' => 'rpminfo/rpminfo.stub', 'RPMTAG_TRIGGERSCRIPTFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_TRIGGERSCRIPTPROG' => 'rpminfo/rpminfo.stub', 'RPMTAG_TRIGGERSCRIPTS' => 'rpminfo/rpminfo.stub', 'RPMTAG_TRIGGERTYPE' => 'rpminfo/rpminfo.stub', 'RPMTAG_TRIGGERVERSION' => 'rpminfo/rpminfo.stub', 'RPMTAG_URL' => 'rpminfo/rpminfo.stub', 'RPMTAG_V' => 'rpminfo/rpminfo.stub', 'RPMTAG_VCS' => 'rpminfo/rpminfo.stub', 'RPMTAG_VENDOR' => 'rpminfo/rpminfo.stub', 'RPMTAG_VERBOSE' => 'rpminfo/rpminfo.stub', 'RPMTAG_VERIFYSCRIPT' => 'rpminfo/rpminfo.stub', 'RPMTAG_VERIFYSCRIPTFLAGS' => 'rpminfo/rpminfo.stub', 'RPMTAG_VERIFYSCRIPTPROG' => 'rpminfo/rpminfo.stub', 'RPMTAG_VERSION' => 'rpminfo/rpminfo.stub', 'RPMTAG_XPM' => 'rpminfo/rpminfo.stub', 'RPMVERSION' => 'rpminfo/rpminfo.stub', 'RTFEditBox' => 'winbinder/winbinder.stub', 'RadioButton' => 'winbinder/winbinder.stub', 'ResizableWindow' => 'winbinder/winbinder.stub', 'SA_ALL' => 'imap/imap.stub', 'SA_MESSAGES' => 'imap/imap.stub', 'SA_RECENT' => 'imap/imap.stub', 'SA_UIDNEXT' => 'imap/imap.stub', 'SA_UIDVALIDITY' => 'imap/imap.stub', 'SA_UNSEEN' => 'imap/imap.stub', 'SCANDIR_SORT_ASCENDING' => 'standard/standard_defines.stub', 'SCANDIR_SORT_DESCENDING' => 'standard/standard_defines.stub', 'SCANDIR_SORT_NONE' => 'standard/standard_defines.stub', 'SCM_CREDENTIALS' => 'sockets/sockets.stub', 'SCM_RIGHTS' => 'sockets/sockets.stub', 'SEEK_CUR' => 'standard/standard_defines.stub', 'SEEK_END' => 'standard/standard_defines.stub', 'SEEK_SET' => 'standard/standard_defines.stub', 'SEGV_ACCERR' => 'pcntl/pcntl.stub', 'SEGV_MAPERR' => 'pcntl/pcntl.stub', 'SE_FREE' => 'imap/imap.stub', 'SE_NOPREFETCH' => 'imap/imap.stub', 'SE_UID' => 'imap/imap.stub', 'SID' => 'standard/standard_defines.stub', 'SIGABRT' => 'pcntl/pcntl.stub', 'SIGALRM' => 'pcntl/pcntl.stub', 'SIGBABY' => 'pcntl/pcntl.stub', 'SIGBUS' => 'pcntl/pcntl.stub', 'SIGCHLD' => 'pcntl/pcntl.stub', 'SIGCLD' => 'pcntl/pcntl.stub', 'SIGCONT' => 'pcntl/pcntl.stub', 'SIGFPE' => 'pcntl/pcntl.stub', 'SIGHUP' => 'pcntl/pcntl.stub', 'SIGILL' => 'pcntl/pcntl.stub', 'SIGINT' => 'pcntl/pcntl.stub', 'SIGIO' => 'pcntl/pcntl.stub', 'SIGIOT' => 'pcntl/pcntl.stub', 'SIGKILL' => 'pcntl/pcntl.stub', 'SIGPIPE' => 'pcntl/pcntl.stub', 'SIGPOLL' => 'pcntl/pcntl.stub', 'SIGPROF' => 'pcntl/pcntl.stub', 'SIGPWR' => 'pcntl/pcntl.stub', 'SIGQUIT' => 'pcntl/pcntl.stub', 'SIGRTMAX' => 'pcntl/pcntl.stub', 'SIGRTMIN' => 'pcntl/pcntl.stub', 'SIGSEGV' => 'pcntl/pcntl.stub', 'SIGSTKFLT' => 'pcntl/pcntl.stub', 'SIGSTOP' => 'pcntl/pcntl.stub', 'SIGSYS' => 'pcntl/pcntl.stub', 'SIGTERM' => 'pcntl/pcntl.stub', 'SIGTRAP' => 'pcntl/pcntl.stub', 'SIGTSTP' => 'pcntl/pcntl.stub', 'SIGTTIN' => 'pcntl/pcntl.stub', 'SIGTTOU' => 'pcntl/pcntl.stub', 'SIGURG' => 'pcntl/pcntl.stub', 'SIGUSR1' => 'pcntl/pcntl.stub', 'SIGUSR2' => 'pcntl/pcntl.stub', 'SIGVTALRM' => 'pcntl/pcntl.stub', 'SIGWINCH' => 'pcntl/pcntl.stub', 'SIGXCPU' => 'pcntl/pcntl.stub', 'SIGXFSZ' => 'pcntl/pcntl.stub', 'SIG_BLOCK' => 'pcntl/pcntl.stub', 'SIG_DFL' => 'pcntl/pcntl.stub', 'SIG_ERR' => 'pcntl/pcntl.stub', 'SIG_IGN' => 'pcntl/pcntl.stub', 'SIG_SETMASK' => 'pcntl/pcntl.stub', 'SIG_UNBLOCK' => 'pcntl/pcntl.stub', 'SI_ASYNCIO' => 'pcntl/pcntl.stub', 'SI_KERNEL' => 'pcntl/pcntl.stub', 'SI_MESGQ' => 'pcntl/pcntl.stub', 'SI_QUEUE' => 'pcntl/pcntl.stub', 'SI_SIGIO' => 'pcntl/pcntl.stub', 'SI_TIMER' => 'pcntl/pcntl.stub', 'SI_TKILL' => 'pcntl/pcntl.stub', 'SI_USER' => 'pcntl/pcntl.stub', 'SKF_AD_ALU_XOR_X' => 'sockets/sockets.stub', 'SKF_AD_CPU' => 'sockets/sockets.stub', 'SKF_AD_HATYPE' => 'sockets/sockets.stub', 'SKF_AD_IFINDEX' => 'sockets/sockets.stub', 'SKF_AD_MARK' => 'sockets/sockets.stub', 'SKF_AD_MAX' => 'sockets/sockets.stub', 'SKF_AD_NLATTR' => 'sockets/sockets.stub', 'SKF_AD_NLATTR_NEST' => 'sockets/sockets.stub', 'SKF_AD_OFF' => 'sockets/sockets.stub', 'SKF_AD_PAY_OFFSET' => 'sockets/sockets.stub', 'SKF_AD_PKTTYPE' => 'sockets/sockets.stub', 'SKF_AD_PROTOCOL' => 'sockets/sockets.stub', 'SKF_AD_QUEUE' => 'sockets/sockets.stub', 'SKF_AD_RANDOM' => 'sockets/sockets.stub', 'SKF_AD_RXHASH' => 'sockets/sockets.stub', 'SKF_AD_VLAN_TAG' => 'sockets/sockets.stub', 'SKF_AD_VLAN_TAG_PRESENT' => 'sockets/sockets.stub', 'SKF_AD_VLAN_TPID' => 'sockets/sockets.stub', 'SNMP_BIT_STR' => 'snmp/snmp.stub', 'SNMP_COUNTER' => 'snmp/snmp.stub', 'SNMP_COUNTER64' => 'snmp/snmp.stub', 'SNMP_INTEGER' => 'snmp/snmp.stub', 'SNMP_IPADDRESS' => 'snmp/snmp.stub', 'SNMP_NULL' => 'snmp/snmp.stub', 'SNMP_OBJECT_ID' => 'snmp/snmp.stub', 'SNMP_OCTET_STR' => 'snmp/snmp.stub', 'SNMP_OID_OUTPUT_FULL' => 'snmp/snmp.stub', 'SNMP_OID_OUTPUT_MODULE' => 'snmp/snmp.stub', 'SNMP_OID_OUTPUT_NONE' => 'snmp/snmp.stub', 'SNMP_OID_OUTPUT_NUMERIC' => 'snmp/snmp.stub', 'SNMP_OID_OUTPUT_SUFFIX' => 'snmp/snmp.stub', 'SNMP_OID_OUTPUT_UCD' => 'snmp/snmp.stub', 'SNMP_OPAQUE' => 'snmp/snmp.stub', 'SNMP_TIMETICKS' => 'snmp/snmp.stub', 'SNMP_UINTEGER' => 'snmp/snmp.stub', 'SNMP_UNSIGNED' => 'snmp/snmp.stub', 'SNMP_VALUE_LIBRARY' => 'snmp/snmp.stub', 'SNMP_VALUE_OBJECT' => 'snmp/snmp.stub', 'SNMP_VALUE_PLAIN' => 'snmp/snmp.stub', 'SOAP_1_1' => 'soap/soap.stub', 'SOAP_1_2' => 'soap/soap.stub', 'SOAP_ACTOR_NEXT' => 'soap/soap.stub', 'SOAP_ACTOR_NONE' => 'soap/soap.stub', 'SOAP_ACTOR_UNLIMATERECEIVER' => 'soap/soap.stub', 'SOAP_AUTHENTICATION_BASIC' => 'soap/soap.stub', 'SOAP_AUTHENTICATION_DIGEST' => 'soap/soap.stub', 'SOAP_COMPRESSION_ACCEPT' => 'soap/soap.stub', 'SOAP_COMPRESSION_DEFLATE' => 'soap/soap.stub', 'SOAP_COMPRESSION_GZIP' => 'soap/soap.stub', 'SOAP_DOCUMENT' => 'soap/soap.stub', 'SOAP_ENCODED' => 'soap/soap.stub', 'SOAP_ENC_ARRAY' => 'soap/soap.stub', 'SOAP_ENC_OBJECT' => 'soap/soap.stub', 'SOAP_FUNCTIONS_ALL' => 'soap/soap.stub', 'SOAP_LITERAL' => 'soap/soap.stub', 'SOAP_PERSISTENCE_REQUEST' => 'soap/soap.stub', 'SOAP_PERSISTENCE_SESSION' => 'soap/soap.stub', 'SOAP_RPC' => 'soap/soap.stub', 'SOAP_SINGLE_ELEMENT_ARRAYS' => 'soap/soap.stub', 'SOAP_SSL_METHOD_SSLv2' => 'soap/soap.stub', 'SOAP_SSL_METHOD_SSLv23' => 'soap/soap.stub', 'SOAP_SSL_METHOD_SSLv3' => 'soap/soap.stub', 'SOAP_SSL_METHOD_TLS' => 'soap/soap.stub', 'SOAP_USE_XSI_ARRAY_TYPE' => 'soap/soap.stub', 'SOAP_WAIT_ONE_WAY_CALLS' => 'soap/soap.stub', 'SOCKET_E2BIG' => 'sockets/sockets.stub', 'SOCKET_EACCES' => 'sockets/sockets.stub', 'SOCKET_EADDRINUSE' => 'sockets/sockets.stub', 'SOCKET_EADDRNOTAVAIL' => 'sockets/sockets.stub', 'SOCKET_EADV' => 'sockets/sockets.stub', 'SOCKET_EAFNOSUPPORT' => 'sockets/sockets.stub', 'SOCKET_EAGAIN' => 'sockets/sockets.stub', 'SOCKET_EALREADY' => 'sockets/sockets.stub', 'SOCKET_EBADE' => 'sockets/sockets.stub', 'SOCKET_EBADF' => 'sockets/sockets.stub', 'SOCKET_EBADFD' => 'sockets/sockets.stub', 'SOCKET_EBADMSG' => 'sockets/sockets.stub', 'SOCKET_EBADR' => 'sockets/sockets.stub', 'SOCKET_EBADRQC' => 'sockets/sockets.stub', 'SOCKET_EBADSLT' => 'sockets/sockets.stub', 'SOCKET_EBUSY' => 'sockets/sockets.stub', 'SOCKET_ECANCELED' => 'swoole/constants.stub', 'SOCKET_ECHRNG' => 'sockets/sockets.stub', 'SOCKET_ECOMM' => 'sockets/sockets.stub', 'SOCKET_ECONNABORTED' => 'sockets/sockets.stub', 'SOCKET_ECONNREFUSED' => 'sockets/sockets.stub', 'SOCKET_ECONNRESET' => 'sockets/sockets.stub', 'SOCKET_EDESTADDRREQ' => 'sockets/sockets.stub', 'SOCKET_EDISCON' => 'sockets/sockets.stub', 'SOCKET_EDQUOT' => 'sockets/sockets.stub', 'SOCKET_EEXIST' => 'sockets/sockets.stub', 'SOCKET_EFAULT' => 'sockets/sockets.stub', 'SOCKET_EHOSTDOWN' => 'sockets/sockets.stub', 'SOCKET_EHOSTUNREACH' => 'sockets/sockets.stub', 'SOCKET_EIDRM' => 'sockets/sockets.stub', 'SOCKET_EINPROGRESS' => 'sockets/sockets.stub', 'SOCKET_EINTR' => 'sockets/sockets.stub', 'SOCKET_EINVAL' => 'sockets/sockets.stub', 'SOCKET_EIO' => 'sockets/sockets.stub', 'SOCKET_EISCONN' => 'sockets/sockets.stub', 'SOCKET_EISDIR' => 'sockets/sockets.stub', 'SOCKET_EISNAM' => 'sockets/sockets.stub', 'SOCKET_EL2HLT' => 'sockets/sockets.stub', 'SOCKET_EL2NSYNC' => 'sockets/sockets.stub', 'SOCKET_EL3HLT' => 'sockets/sockets.stub', 'SOCKET_EL3RST' => 'sockets/sockets.stub', 'SOCKET_ELNRNG' => 'sockets/sockets.stub', 'SOCKET_ELOOP' => 'sockets/sockets.stub', 'SOCKET_EMEDIUMTYPE' => 'sockets/sockets.stub', 'SOCKET_EMFILE' => 'sockets/sockets.stub', 'SOCKET_EMLINK' => 'sockets/sockets.stub', 'SOCKET_EMSGSIZE' => 'sockets/sockets.stub', 'SOCKET_EMULTIHOP' => 'sockets/sockets.stub', 'SOCKET_ENAMETOOLONG' => 'sockets/sockets.stub', 'SOCKET_ENETDOWN' => 'sockets/sockets.stub', 'SOCKET_ENETRESET' => 'sockets/sockets.stub', 'SOCKET_ENETUNREACH' => 'sockets/sockets.stub', 'SOCKET_ENFILE' => 'sockets/sockets.stub', 'SOCKET_ENOANO' => 'sockets/sockets.stub', 'SOCKET_ENOBUFS' => 'sockets/sockets.stub', 'SOCKET_ENOCSI' => 'sockets/sockets.stub', 'SOCKET_ENODATA' => 'sockets/sockets.stub', 'SOCKET_ENODEV' => 'sockets/sockets.stub', 'SOCKET_ENOENT' => 'sockets/sockets.stub', 'SOCKET_ENOLCK' => 'sockets/sockets.stub', 'SOCKET_ENOLINK' => 'sockets/sockets.stub', 'SOCKET_ENOMEDIUM' => 'sockets/sockets.stub', 'SOCKET_ENOMEM' => 'sockets/sockets.stub', 'SOCKET_ENOMSG' => 'sockets/sockets.stub', 'SOCKET_ENONET' => 'sockets/sockets.stub', 'SOCKET_ENOPROTOOPT' => 'sockets/sockets.stub', 'SOCKET_ENOSPC' => 'sockets/sockets.stub', 'SOCKET_ENOSR' => 'sockets/sockets.stub', 'SOCKET_ENOSTR' => 'sockets/sockets.stub', 'SOCKET_ENOSYS' => 'sockets/sockets.stub', 'SOCKET_ENOTBLK' => 'sockets/sockets.stub', 'SOCKET_ENOTCONN' => 'sockets/sockets.stub', 'SOCKET_ENOTDIR' => 'sockets/sockets.stub', 'SOCKET_ENOTEMPTY' => 'sockets/sockets.stub', 'SOCKET_ENOTSOCK' => 'sockets/sockets.stub', 'SOCKET_ENOTTY' => 'sockets/sockets.stub', 'SOCKET_ENOTUNIQ' => 'sockets/sockets.stub', 'SOCKET_ENXIO' => 'sockets/sockets.stub', 'SOCKET_EOPNOTSUPP' => 'sockets/sockets.stub', 'SOCKET_EPERM' => 'sockets/sockets.stub', 'SOCKET_EPFNOSUPPORT' => 'sockets/sockets.stub', 'SOCKET_EPIPE' => 'sockets/sockets.stub', 'SOCKET_EPROCLIM' => 'sockets/sockets.stub', 'SOCKET_EPROTO' => 'sockets/sockets.stub', 'SOCKET_EPROTONOSUPPORT' => 'sockets/sockets.stub', 'SOCKET_EPROTOTYPE' => 'sockets/sockets.stub', 'SOCKET_EREMCHG' => 'sockets/sockets.stub', 'SOCKET_EREMOTE' => 'sockets/sockets.stub', 'SOCKET_EREMOTEIO' => 'sockets/sockets.stub', 'SOCKET_ERESTART' => 'sockets/sockets.stub', 'SOCKET_EROFS' => 'sockets/sockets.stub', 'SOCKET_ESHUTDOWN' => 'sockets/sockets.stub', 'SOCKET_ESOCKTNOSUPPORT' => 'sockets/sockets.stub', 'SOCKET_ESPIPE' => 'sockets/sockets.stub', 'SOCKET_ESRMNT' => 'sockets/sockets.stub', 'SOCKET_ESTALE' => 'sockets/sockets.stub', 'SOCKET_ESTRPIPE' => 'sockets/sockets.stub', 'SOCKET_ETIME' => 'sockets/sockets.stub', 'SOCKET_ETIMEDOUT' => 'sockets/sockets.stub', 'SOCKET_ETOOMANYREFS' => 'sockets/sockets.stub', 'SOCKET_EUNATCH' => 'sockets/sockets.stub', 'SOCKET_EUSERS' => 'sockets/sockets.stub', 'SOCKET_EWOULDBLOCK' => 'sockets/sockets.stub', 'SOCKET_EXDEV' => 'sockets/sockets.stub', 'SOCKET_EXFULL' => 'sockets/sockets.stub', 'SOCKET_HOST_NOT_FOUND' => 'sockets/sockets.stub', 'SOCKET_NOTINITIALISED' => 'sockets/sockets.stub', 'SOCKET_NO_ADDRESS' => 'sockets/sockets.stub', 'SOCKET_NO_DATA' => 'sockets/sockets.stub', 'SOCKET_NO_RECOVERY' => 'sockets/sockets.stub', 'SOCKET_SYSNOTREADY' => 'sockets/sockets.stub', 'SOCKET_TRY_AGAIN' => 'sockets/sockets.stub', 'SOCKET_VERNOTSUPPORTED' => 'sockets/sockets.stub', 'SOCK_DGRAM' => 'sockets/sockets.stub', 'SOCK_RAW' => 'sockets/sockets.stub', 'SOCK_RDM' => 'sockets/sockets.stub', 'SOCK_SEQPACKET' => 'sockets/sockets.stub', 'SOCK_STREAM' => 'sockets/sockets.stub', 'SODIUM_BASE64_VARIANT_ORIGINAL' => 'sodium/sodium.stub', 'SODIUM_BASE64_VARIANT_ORIGINAL_NO_PADDING' => 'sodium/sodium.stub', 'SODIUM_BASE64_VARIANT_URLSAFE' => 'sodium/sodium.stub', 'SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_AEAD_AES256GCM_ABYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_AEAD_AES256GCM_KEYBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_AEAD_AES256GCM_NPUBBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_AEAD_AES256GCM_NSECBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_ABYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_ABYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_ABYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NSECBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_AUTH_BYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_AUTH_KEYBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_BOX_KEYPAIRBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_BOX_MACBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_BOX_NONCEBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_BOX_PUBLICKEYBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_BOX_SEALBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_BOX_SECRETKEYBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_BOX_SEEDBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_CORE_RISTRETTO255_BYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_CORE_RISTRETTO255_HASHBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_CORE_RISTRETTO255_NONREDUCEDSCALARBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_CORE_RISTRETTO255_SCALARBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_GENERICHASH_BYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_GENERICHASH_BYTES_MAX' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_GENERICHASH_BYTES_MIN' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_GENERICHASH_KEYBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_GENERICHASH_KEYBYTES_MAX' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_GENERICHASH_KEYBYTES_MIN' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_KDF_BYTES_MAX' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_KDF_BYTES_MIN' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_KDF_CONTEXTBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_KDF_KEYBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_KX_BYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_KX_KEYPAIRBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_KX_PUBLICKEYBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_KX_SECRETKEYBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_KX_SEEDBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_KX_SESSIONKEYBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_PWHASH_ALG_ARGON2I13' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_PWHASH_ALG_DEFAULT' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_PWHASH_MEMLIMIT_MODERATE' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_PWHASH_MEMLIMIT_SENSITIVE' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_PWHASH_OPSLIMIT_MODERATE' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_PWHASH_OPSLIMIT_SENSITIVE' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_PWHASH_SALTBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_INTERACTIVE' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_SENSITIVE' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_INTERACTIVE' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_SENSITIVE' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_SALTBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_STRPREFIX' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_PWHASH_STRPREFIX' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_SCALARMULT_BYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_SCALARMULT_RISTRETTO255_BYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_SCALARMULT_RISTRETTO255_SCALARBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_SCALARMULT_SCALARBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_SECRETBOX_KEYBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_SECRETBOX_MACBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_SECRETBOX_NONCEBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_ABYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_HEADERBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_KEYBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_MESSAGEBYTES_MAX' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_FINAL' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_MESSAGE' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_PUSH' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_REKEY' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_SHORTHASH_BYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_SHORTHASH_KEYBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_SIGN_BYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_SIGN_KEYPAIRBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_SIGN_PUBLICKEYBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_SIGN_SECRETKEYBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_SIGN_SEEDBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_STREAM_KEYBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_STREAM_NONCEBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_STREAM_XCHACHA20_KEYBYTES' => 'sodium/sodium.stub', 'SODIUM_CRYPTO_STREAM_XCHACHA20_NONCEBYTES' => 'sodium/sodium.stub', 'SODIUM_LIBRARY_MAJOR_VERSION' => 'sodium/sodium.stub', 'SODIUM_LIBRARY_MINOR_VERSION' => 'sodium/sodium.stub', 'SODIUM_LIBRARY_VERSION' => 'sodium/sodium.stub', 'SOLR_EXTENSION_VERSION' => 'solr/constants.stub', 'SOLR_MAJOR_VERSION' => 'solr/constants.stub', 'SOLR_MINOR_VERSION' => 'solr/constants.stub', 'SOLR_PATCH_VERSION' => 'solr/constants.stub', 'SOL_SOCKET' => 'sockets/sockets.stub', 'SOL_TCP' => 'sockets/sockets.stub', 'SOL_UDP' => 'sockets/sockets.stub', 'SOMAXCONN' => 'sockets/sockets.stub', 'SORTARRIVAL' => 'imap/imap.stub', 'SORTCC' => 'imap/imap.stub', 'SORTDATE' => 'imap/imap.stub', 'SORTFROM' => 'imap/imap.stub', 'SORTSIZE' => 'imap/imap.stub', 'SORTSUBJECT' => 'imap/imap.stub', 'SORTTO' => 'imap/imap.stub', 'SORT_ASC' => 'standard/standard_defines.stub', 'SORT_DESC' => 'standard/standard_defines.stub', 'SORT_FLAG_CASE' => 'standard/standard_defines.stub', 'SORT_LOCALE_STRING' => 'standard/standard_defines.stub', 'SORT_NATURAL' => 'standard/standard_defines.stub', 'SORT_NUMERIC' => 'standard/standard_defines.stub', 'SORT_REGULAR' => 'standard/standard_defines.stub', 'SORT_STRING' => 'standard/standard_defines.stub', 'SO_BINDTODEVICE' => 'sockets/sockets.stub', 'SO_BPF_EXTENSIONS' => 'sockets/sockets.stub', 'SO_BROADCAST' => 'sockets/sockets.stub', 'SO_DEBUG' => 'sockets/sockets.stub', 'SO_DONTROUTE' => 'sockets/sockets.stub', 'SO_ERROR' => 'sockets/sockets.stub', 'SO_FREE' => 'imap/imap.stub', 'SO_INCOMING_CPU' => 'sockets/sockets.stub', 'SO_KEEPALIVE' => 'sockets/sockets.stub', 'SO_LINGER' => 'sockets/sockets.stub', 'SO_MARK' => 'sockets/sockets.stub', 'SO_MEMINFO' => 'sockets/sockets.stub', 'SO_NOSERVER' => 'imap/imap.stub', 'SO_OOBINLINE' => 'sockets/sockets.stub', 'SO_PASSCRED' => 'sockets/sockets.stub', 'SO_RCVBUF' => 'sockets/sockets.stub', 'SO_RCVLOWAT' => 'sockets/sockets.stub', 'SO_RCVTIMEO' => 'sockets/sockets.stub', 'SO_REUSEADDR' => 'sockets/sockets.stub', 'SO_REUSEPORT' => 'sockets/sockets.stub', 'SO_SNDBUF' => 'sockets/sockets.stub', 'SO_SNDLOWAT' => 'sockets/sockets.stub', 'SO_SNDTIMEO' => 'sockets/sockets.stub', 'SO_TYPE' => 'sockets/sockets.stub', 'SO_ZEROCOPY' => 'sockets/sockets.stub', 'SQLBIT' => 'mssql/mssql.stub', 'SQLCHAR' => 'mssql/mssql.stub', 'SQLFLT4' => 'mssql/mssql.stub', 'SQLFLT8' => 'mssql/mssql.stub', 'SQLFLTN' => 'mssql/mssql.stub', 'SQLINT1' => 'mssql/mssql.stub', 'SQLINT2' => 'mssql/mssql.stub', 'SQLINT4' => 'mssql/mssql.stub', 'SQLITE3_ASSOC' => 'sqlite3/sqlite3.stub', 'SQLITE3_BLOB' => 'sqlite3/sqlite3.stub', 'SQLITE3_BOTH' => 'sqlite3/sqlite3.stub', 'SQLITE3_DETERMINISTIC' => 'sqlite3/sqlite3.stub', 'SQLITE3_FLOAT' => 'sqlite3/sqlite3.stub', 'SQLITE3_INTEGER' => 'sqlite3/sqlite3.stub', 'SQLITE3_NULL' => 'sqlite3/sqlite3.stub', 'SQLITE3_NUM' => 'sqlite3/sqlite3.stub', 'SQLITE3_OPEN_CREATE' => 'sqlite3/sqlite3.stub', 'SQLITE3_OPEN_READONLY' => 'sqlite3/sqlite3.stub', 'SQLITE3_OPEN_READWRITE' => 'sqlite3/sqlite3.stub', 'SQLITE3_TEXT' => 'sqlite3/sqlite3.stub', 'SQLITE_ABORT' => 'SQLite/SQLite.stub', 'SQLITE_ASSOC' => 'SQLite/SQLite.stub', 'SQLITE_AUTH' => 'SQLite/SQLite.stub', 'SQLITE_BOTH' => 'SQLite/SQLite.stub', 'SQLITE_BUSY' => 'SQLite/SQLite.stub', 'SQLITE_CANTOPEN' => 'SQLite/SQLite.stub', 'SQLITE_CONSTRAINT' => 'SQLite/SQLite.stub', 'SQLITE_CORRUPT' => 'SQLite/SQLite.stub', 'SQLITE_DONE' => 'SQLite/SQLite.stub', 'SQLITE_EMPTY' => 'SQLite/SQLite.stub', 'SQLITE_ERROR' => 'SQLite/SQLite.stub', 'SQLITE_FORMAT' => 'SQLite/SQLite.stub', 'SQLITE_FULL' => 'SQLite/SQLite.stub', 'SQLITE_INTERNAL' => 'SQLite/SQLite.stub', 'SQLITE_INTERRUPT' => 'SQLite/SQLite.stub', 'SQLITE_IOERR' => 'SQLite/SQLite.stub', 'SQLITE_LOCKED' => 'SQLite/SQLite.stub', 'SQLITE_MISMATCH' => 'SQLite/SQLite.stub', 'SQLITE_MISUSE' => 'SQLite/SQLite.stub', 'SQLITE_NOLFS' => 'SQLite/SQLite.stub', 'SQLITE_NOMEM' => 'SQLite/SQLite.stub', 'SQLITE_NOTADB' => 'SQLite/SQLite.stub', 'SQLITE_NOTFOUND' => 'SQLite/SQLite.stub', 'SQLITE_NUM' => 'SQLite/SQLite.stub', 'SQLITE_OK' => 'SQLite/SQLite.stub', 'SQLITE_PERM' => 'SQLite/SQLite.stub', 'SQLITE_PROTOCOL' => 'SQLite/SQLite.stub', 'SQLITE_READONLY' => 'SQLite/SQLite.stub', 'SQLITE_ROW' => 'SQLite/SQLite.stub', 'SQLITE_SCHEMA' => 'SQLite/SQLite.stub', 'SQLITE_TOOBIG' => 'SQLite/SQLite.stub', 'SQLSRV_CURSOR_CLIENT_BUFFERED' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_CURSOR_DYNAMIC' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_CURSOR_FORWARD' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_CURSOR_KEYSET' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_CURSOR_STATIC' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_ENC_BINARY' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_ENC_CHAR' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_ERR_ALL' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_ERR_ERRORS' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_ERR_WARNINGS' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_FETCH_ASSOC' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_FETCH_BOTH' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_FETCH_NUMERIC' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_LOG_SEVERITY_ALL' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_LOG_SEVERITY_ERROR' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_LOG_SEVERITY_NOTICE' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_LOG_SEVERITY_WARNING' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_LOG_SYSTEM_ALL' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_LOG_SYSTEM_CONN' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_LOG_SYSTEM_INIT' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_LOG_SYSTEM_OFF' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_LOG_SYSTEM_STMT' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_LOG_SYSTEM_UTIL' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_NULLABLE_NO' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_NULLABLE_UNKNOWN' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_NULLABLE_YES' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_PARAM_IN' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_PARAM_INOUT' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_PARAM_OUT' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_PHPTYPE_DATETIME' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_PHPTYPE_FLOAT' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_PHPTYPE_INT' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_PHPTYPE_NULL' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SCROLL_ABSOLUTE' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SCROLL_FIRST' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SCROLL_LAST' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SCROLL_NEXT' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SCROLL_PRIOR' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SCROLL_RELATIVE' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_BIGINT' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_BIT' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_CHAR' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_DATE' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_DATETIME' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_DATETIME2' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_DATETIMEOFFSET' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_DECIMAL' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_FLOAT' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_IMAGE' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_INT' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_MONEY' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_NCHAR' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_NTEXT' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_NUMERIC' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_NVARCHAR' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_REAL' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_SMALLDATETIME' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_SMALLINT' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_SMALLMONEY' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_TEXT' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_TIME' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_TIMESTAMP' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_TINYINT' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_UDT' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_UNIQUEIDENTIFIER' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_VARBINARY' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_VARCHAR' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_SQLTYPE_XML' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_TXN_READ_COMMITTED' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_TXN_READ_UNCOMMITTED' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_TXN_REPEATABLE_READ' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_TXN_SERIALIZABLE' => 'sqlsrv/sqlsrv.stub', 'SQLSRV_TXN_SNAPSHOT' => 'sqlsrv/sqlsrv.stub', 'SQLTEXT' => 'mssql/mssql.stub', 'SQLT_AFC' => 'oci8/oci8.stub', 'SQLT_AVC' => 'oci8/oci8.stub', 'SQLT_BDOUBLE' => 'oci8/oci8.stub', 'SQLT_BFILEE' => 'oci8/oci8.stub', 'SQLT_BFLOAT' => 'oci8/oci8.stub', 'SQLT_BIN' => 'oci8/oci8.stub', 'SQLT_BLOB' => 'oci8/oci8.stub', 'SQLT_BOL' => 'oci8/oci8.stub', 'SQLT_CFILEE' => 'oci8/oci8.stub', 'SQLT_CHR' => 'oci8/oci8.stub', 'SQLT_CLOB' => 'oci8/oci8.stub', 'SQLT_FLT' => 'oci8/oci8.stub', 'SQLT_INT' => 'oci8/oci8.stub', 'SQLT_LBI' => 'oci8/oci8.stub', 'SQLT_LNG' => 'oci8/oci8.stub', 'SQLT_LVC' => 'oci8/oci8.stub', 'SQLT_NTY' => 'oci8/oci8.stub', 'SQLT_NUM' => 'oci8/oci8.stub', 'SQLT_ODT' => 'oci8/oci8.stub', 'SQLT_RDD' => 'oci8/oci8.stub', 'SQLT_RSET' => 'oci8/oci8.stub', 'SQLT_STR' => 'oci8/oci8.stub', 'SQLT_UIN' => 'oci8/oci8.stub', 'SQLT_VCS' => 'oci8/oci8.stub', 'SQLVARCHAR' => 'mssql/mssql.stub', 'SQL_BEST_ROWID' => 'odbc/odbc.stub', 'SQL_BIGINT' => 'odbc/odbc.stub', 'SQL_BINARY' => 'odbc/odbc.stub', 'SQL_BIT' => 'odbc/odbc.stub', 'SQL_CHAR' => 'odbc/odbc.stub', 'SQL_CONCURRENCY' => 'odbc/odbc.stub', 'SQL_CONCUR_LOCK' => 'odbc/odbc.stub', 'SQL_CONCUR_READ_ONLY' => 'odbc/odbc.stub', 'SQL_CONCUR_ROWVER' => 'odbc/odbc.stub', 'SQL_CONCUR_VALUES' => 'odbc/odbc.stub', 'SQL_CURSOR_DYNAMIC' => 'odbc/odbc.stub', 'SQL_CURSOR_FORWARD_ONLY' => 'odbc/odbc.stub', 'SQL_CURSOR_KEYSET_DRIVEN' => 'odbc/odbc.stub', 'SQL_CURSOR_STATIC' => 'odbc/odbc.stub', 'SQL_CURSOR_TYPE' => 'odbc/odbc.stub', 'SQL_CUR_USE_DRIVER' => 'odbc/odbc.stub', 'SQL_CUR_USE_IF_NEEDED' => 'odbc/odbc.stub', 'SQL_CUR_USE_ODBC' => 'odbc/odbc.stub', 'SQL_DATE' => 'odbc/odbc.stub', 'SQL_DECIMAL' => 'odbc/odbc.stub', 'SQL_DOUBLE' => 'odbc/odbc.stub', 'SQL_ENSURE' => 'odbc/odbc.stub', 'SQL_FETCH_FIRST' => 'odbc/odbc.stub', 'SQL_FETCH_NEXT' => 'odbc/odbc.stub', 'SQL_FLOAT' => 'odbc/odbc.stub', 'SQL_INDEX_ALL' => 'odbc/odbc.stub', 'SQL_INDEX_UNIQUE' => 'odbc/odbc.stub', 'SQL_INTEGER' => 'odbc/odbc.stub', 'SQL_KEYSET_SIZE' => 'odbc/odbc.stub', 'SQL_LONGVARBINARY' => 'odbc/odbc.stub', 'SQL_LONGVARCHAR' => 'odbc/odbc.stub', 'SQL_NO_NULLS' => 'odbc/odbc.stub', 'SQL_NULLABLE' => 'odbc/odbc.stub', 'SQL_NUMERIC' => 'odbc/odbc.stub', 'SQL_ODBC_CURSORS' => 'odbc/odbc.stub', 'SQL_QUICK' => 'odbc/odbc.stub', 'SQL_REAL' => 'odbc/odbc.stub', 'SQL_ROWVER' => 'odbc/odbc.stub', 'SQL_SCOPE_CURROW' => 'odbc/odbc.stub', 'SQL_SCOPE_SESSION' => 'odbc/odbc.stub', 'SQL_SCOPE_TRANSACTION' => 'odbc/odbc.stub', 'SQL_SMALLINT' => 'odbc/odbc.stub', 'SQL_TIME' => 'odbc/odbc.stub', 'SQL_TIMESTAMP' => 'odbc/odbc.stub', 'SQL_TINYINT' => 'odbc/odbc.stub', 'SQL_TYPE_DATE' => 'odbc/odbc.stub', 'SQL_TYPE_TIME' => 'odbc/odbc.stub', 'SQL_TYPE_TIMESTAMP' => 'odbc/odbc.stub', 'SQL_VARBINARY' => 'odbc/odbc.stub', 'SQL_VARCHAR' => 'odbc/odbc.stub', 'SQL_WCHAR' => 'odbc/odbc.stub', 'SQL_WLONGVARCHAR' => 'odbc/odbc.stub', 'SQL_WVARCHAR' => 'odbc/odbc.stub', 'SSH2_DEFAULT_TERMINAL' => 'ssh2/ssh2.stub', 'SSH2_DEFAULT_TERM_HEIGHT' => 'ssh2/ssh2.stub', 'SSH2_DEFAULT_TERM_UNIT' => 'ssh2/ssh2.stub', 'SSH2_DEFAULT_TERM_WIDTH' => 'ssh2/ssh2.stub', 'SSH2_FINGERPRINT_HEX' => 'ssh2/ssh2.stub', 'SSH2_FINGERPRINT_MD5' => 'ssh2/ssh2.stub', 'SSH2_FINGERPRINT_RAW' => 'ssh2/ssh2.stub', 'SSH2_FINGERPRINT_SHA1' => 'ssh2/ssh2.stub', 'SSH2_POLLERR' => 'ssh2/ssh2.stub', 'SSH2_POLLEXT' => 'ssh2/ssh2.stub', 'SSH2_POLLHUP' => 'ssh2/ssh2.stub', 'SSH2_POLLIN' => 'ssh2/ssh2.stub', 'SSH2_POLLNVAL' => 'ssh2/ssh2.stub', 'SSH2_POLLOUT' => 'ssh2/ssh2.stub', 'SSH2_POLL_CHANNEL_CLOSED' => 'ssh2/ssh2.stub', 'SSH2_POLL_LISTENER_CLOSED' => 'ssh2/ssh2.stub', 'SSH2_POLL_SESSION_CLOSED' => 'ssh2/ssh2.stub', 'SSH2_STREAM_STDERR' => 'ssh2/ssh2.stub', 'SSH2_STREAM_STDIO' => 'ssh2/ssh2.stub', 'SSH2_TERM_UNIT_CHARS' => 'ssh2/ssh2.stub', 'SSH2_TERM_UNIT_PIXELS' => 'ssh2/ssh2.stub', 'STDERR' => 'Core/Core_d.stub', 'STDIN' => 'Core/Core_d.stub', 'STDOUT' => 'Core/Core_d.stub', 'STREAM_BUFFER_FULL' => 'standard/standard_defines.stub', 'STREAM_BUFFER_LINE' => 'standard/standard_defines.stub', 'STREAM_BUFFER_NONE' => 'standard/standard_defines.stub', 'STREAM_CAST_AS_STREAM' => 'standard/standard_defines.stub', 'STREAM_CAST_FOR_SELECT' => 'standard/standard_defines.stub', 'STREAM_CLIENT_ASYNC_CONNECT' => 'standard/standard_defines.stub', 'STREAM_CLIENT_CONNECT' => 'standard/standard_defines.stub', 'STREAM_CLIENT_PERSISTENT' => 'standard/standard_defines.stub', 'STREAM_CRYPTO_METHOD_ANY_CLIENT' => 'standard/standard_defines.stub', 'STREAM_CRYPTO_METHOD_ANY_SERVER' => 'standard/standard_defines.stub', 'STREAM_CRYPTO_METHOD_SSLv23_CLIENT' => 'standard/standard_defines.stub', 'STREAM_CRYPTO_METHOD_SSLv23_SERVER' => 'standard/standard_defines.stub', 'STREAM_CRYPTO_METHOD_SSLv2_CLIENT' => 'standard/standard_defines.stub', 'STREAM_CRYPTO_METHOD_SSLv2_SERVER' => 'standard/standard_defines.stub', 'STREAM_CRYPTO_METHOD_SSLv3_CLIENT' => 'standard/standard_defines.stub', 'STREAM_CRYPTO_METHOD_SSLv3_SERVER' => 'standard/standard_defines.stub', 'STREAM_CRYPTO_METHOD_TLS_CLIENT' => 'standard/standard_defines.stub', 'STREAM_CRYPTO_METHOD_TLS_SERVER' => 'standard/standard_defines.stub', 'STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT' => 'standard/standard_defines.stub', 'STREAM_CRYPTO_METHOD_TLSv1_0_SERVER' => 'standard/standard_defines.stub', 'STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT' => 'standard/standard_defines.stub', 'STREAM_CRYPTO_METHOD_TLSv1_1_SERVER' => 'standard/standard_defines.stub', 'STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT' => 'standard/standard_defines.stub', 'STREAM_CRYPTO_METHOD_TLSv1_2_SERVER' => 'standard/standard_defines.stub', 'STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT' => 'standard/standard_defines.stub', 'STREAM_CRYPTO_METHOD_TLSv1_3_SERVER' => 'standard/standard_defines.stub', 'STREAM_CRYPTO_PROTO_SSLv3' => 'standard/standard_defines.stub', 'STREAM_CRYPTO_PROTO_TLSv1_0' => 'standard/standard_defines.stub', 'STREAM_CRYPTO_PROTO_TLSv1_1' => 'standard/standard_defines.stub', 'STREAM_CRYPTO_PROTO_TLSv1_2' => 'standard/standard_defines.stub', 'STREAM_CRYPTO_PROTO_TLSv1_3' => 'standard/standard_defines.stub', 'STREAM_ENFORCE_SAFE_MODE' => 'standard/standard_defines.stub', 'STREAM_FILTER_ALL' => 'standard/standard_defines.stub', 'STREAM_FILTER_READ' => 'standard/standard_defines.stub', 'STREAM_FILTER_WRITE' => 'standard/standard_defines.stub', 'STREAM_IGNORE_URL' => 'standard/standard_defines.stub', 'STREAM_IPPROTO_ICMP' => 'standard/standard_defines.stub', 'STREAM_IPPROTO_IP' => 'standard/standard_defines.stub', 'STREAM_IPPROTO_RAW' => 'standard/standard_defines.stub', 'STREAM_IPPROTO_TCP' => 'standard/standard_defines.stub', 'STREAM_IPPROTO_UDP' => 'standard/standard_defines.stub', 'STREAM_IS_URL' => 'standard/standard_defines.stub', 'STREAM_META_ACCESS' => 'standard/standard_defines.stub', 'STREAM_META_GROUP' => 'standard/standard_defines.stub', 'STREAM_META_GROUP_NAME' => 'standard/standard_defines.stub', 'STREAM_META_OWNER' => 'standard/standard_defines.stub', 'STREAM_META_OWNER_NAME' => 'standard/standard_defines.stub', 'STREAM_META_TOUCH' => 'standard/standard_defines.stub', 'STREAM_MKDIR_RECURSIVE' => 'standard/standard_defines.stub', 'STREAM_MUST_SEEK' => 'standard/standard_defines.stub', 'STREAM_NOTIFY_AUTH_REQUIRED' => 'standard/standard_defines.stub', 'STREAM_NOTIFY_AUTH_RESULT' => 'standard/standard_defines.stub', 'STREAM_NOTIFY_COMPLETED' => 'standard/standard_defines.stub', 'STREAM_NOTIFY_CONNECT' => 'standard/standard_defines.stub', 'STREAM_NOTIFY_FAILURE' => 'standard/standard_defines.stub', 'STREAM_NOTIFY_FILE_SIZE_IS' => 'standard/standard_defines.stub', 'STREAM_NOTIFY_MIME_TYPE_IS' => 'standard/standard_defines.stub', 'STREAM_NOTIFY_PROGRESS' => 'standard/standard_defines.stub', 'STREAM_NOTIFY_REDIRECTED' => 'standard/standard_defines.stub', 'STREAM_NOTIFY_RESOLVE' => 'standard/standard_defines.stub', 'STREAM_NOTIFY_SEVERITY_ERR' => 'standard/standard_defines.stub', 'STREAM_NOTIFY_SEVERITY_INFO' => 'standard/standard_defines.stub', 'STREAM_NOTIFY_SEVERITY_WARN' => 'standard/standard_defines.stub', 'STREAM_OOB' => 'standard/standard_defines.stub', 'STREAM_OPTION_BLOCKING' => 'standard/standard_defines.stub', 'STREAM_OPTION_READ_BUFFER' => 'standard/standard_defines.stub', 'STREAM_OPTION_READ_TIMEOUT' => 'standard/standard_defines.stub', 'STREAM_OPTION_WRITE_BUFFER' => 'standard/standard_defines.stub', 'STREAM_PEEK' => 'standard/standard_defines.stub', 'STREAM_PF_INET' => 'standard/standard_defines.stub', 'STREAM_PF_INET6' => 'standard/standard_defines.stub', 'STREAM_PF_UNIX' => 'standard/standard_defines.stub', 'STREAM_REPORT_ERRORS' => 'standard/standard_defines.stub', 'STREAM_SERVER_BIND' => 'standard/standard_defines.stub', 'STREAM_SERVER_LISTEN' => 'standard/standard_defines.stub', 'STREAM_SHUT_RD' => 'standard/standard_defines.stub', 'STREAM_SHUT_RDWR' => 'standard/standard_defines.stub', 'STREAM_SHUT_WR' => 'standard/standard_defines.stub', 'STREAM_SOCK_DGRAM' => 'standard/standard_defines.stub', 'STREAM_SOCK_RAW' => 'standard/standard_defines.stub', 'STREAM_SOCK_RDM' => 'standard/standard_defines.stub', 'STREAM_SOCK_SEQPACKET' => 'standard/standard_defines.stub', 'STREAM_SOCK_STREAM' => 'standard/standard_defines.stub', 'STREAM_URL_STAT_LINK' => 'standard/standard_defines.stub', 'STREAM_URL_STAT_QUIET' => 'standard/standard_defines.stub', 'STREAM_USE_PATH' => 'standard/standard_defines.stub', 'STR_PAD_BOTH' => 'standard/standard_defines.stub', 'STR_PAD_LEFT' => 'standard/standard_defines.stub', 'STR_PAD_RIGHT' => 'standard/standard_defines.stub', 'ST_SET' => 'imap/imap.stub', 'ST_SILENT' => 'imap/imap.stub', 'ST_UID' => 'imap/imap.stub', 'SUHOSIN_PATCH' => 'Core/Core_d.stub', 'SUHOSIN_PATCH_VERSION' => 'Core/Core_d.stub', 'SUNFUNCS_RET_DOUBLE' => 'date/date_d.stub', 'SUNFUNCS_RET_STRING' => 'date/date_d.stub', 'SUNFUNCS_RET_TIMESTAMP' => 'date/date_d.stub', 'SVN_ALL' => 'svn/svn.stub', 'SVN_AUTH_PARAM_CONFIG' => 'svn/svn.stub', 'SVN_AUTH_PARAM_CONFIG_DIR' => 'svn/svn.stub', 'SVN_AUTH_PARAM_DEFAULT_PASSWORD' => 'svn/svn.stub', 'SVN_AUTH_PARAM_DEFAULT_USERNAME' => 'svn/svn.stub', 'SVN_AUTH_PARAM_DONT_STORE_PASSWORDS' => 'svn/svn.stub', 'SVN_AUTH_PARAM_NON_INTERACTIVE' => 'svn/svn.stub', 'SVN_AUTH_PARAM_NO_AUTH_CACHE' => 'svn/svn.stub', 'SVN_AUTH_PARAM_SERVER_GROUP' => 'svn/svn.stub', 'SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO' => 'svn/svn.stub', 'SVN_AUTH_PARAM_SSL_SERVER_FAILURES' => 'svn/svn.stub', 'SVN_DISCOVER_CHANGED_PATHS' => 'svn/svn.stub', 'SVN_FS_CONFIG_FS_TYPE' => 'svn/svn.stub', 'SVN_FS_TYPE_BDB' => 'svn/svn.stub', 'SVN_FS_TYPE_FSFS' => 'svn/svn.stub', 'SVN_NODE_DIR' => 'svn/svn.stub', 'SVN_NODE_FILE' => 'svn/svn.stub', 'SVN_NODE_NONE' => 'svn/svn.stub', 'SVN_NODE_UNKNOWN' => 'svn/svn.stub', 'SVN_NON_RECURSIVE' => 'svn/svn.stub', 'SVN_NO_IGNORE' => 'svn/svn.stub', 'SVN_OMIT_MESSAGES' => 'svn/svn.stub', 'SVN_PROP_REVISION_AUTHOR' => 'svn/svn.stub', 'SVN_PROP_REVISION_DATE' => 'svn/svn.stub', 'SVN_PROP_REVISION_LOG' => 'svn/svn.stub', 'SVN_PROP_REVISION_ORIG_DATE' => 'svn/svn.stub', 'SVN_REVISION_BASE' => 'svn/svn.stub', 'SVN_REVISION_COMMITTED' => 'svn/svn.stub', 'SVN_REVISION_HEAD' => 'svn/svn.stub', 'SVN_REVISION_INITIAL' => 'svn/svn.stub', 'SVN_REVISION_PREV' => 'svn/svn.stub', 'SVN_REVISION_UNSPECIFIED' => 'svn/svn.stub', 'SVN_SHOW_UPDATES' => 'svn/svn.stub', 'SVN_STOP_ON_COPY' => 'svn/svn.stub', 'SVN_WC_SCHEDULE_ADD' => 'svn/svn.stub', 'SVN_WC_SCHEDULE_DELETE' => 'svn/svn.stub', 'SVN_WC_SCHEDULE_NORMAL' => 'svn/svn.stub', 'SVN_WC_SCHEDULE_REPLACE' => 'svn/svn.stub', 'SVN_WC_STATUS_ADDED' => 'svn/svn.stub', 'SVN_WC_STATUS_CONFLICTED' => 'svn/svn.stub', 'SVN_WC_STATUS_DELETED' => 'svn/svn.stub', 'SVN_WC_STATUS_EXTERNAL' => 'svn/svn.stub', 'SVN_WC_STATUS_IGNORED' => 'svn/svn.stub', 'SVN_WC_STATUS_INCOMPLETE' => 'svn/svn.stub', 'SVN_WC_STATUS_MERGED' => 'svn/svn.stub', 'SVN_WC_STATUS_MISSING' => 'svn/svn.stub', 'SVN_WC_STATUS_MODIFIED' => 'svn/svn.stub', 'SVN_WC_STATUS_NONE' => 'svn/svn.stub', 'SVN_WC_STATUS_NORMAL' => 'svn/svn.stub', 'SVN_WC_STATUS_OBSTRUCTED' => 'svn/svn.stub', 'SVN_WC_STATUS_REPLACED' => 'svn/svn.stub', 'SVN_WC_STATUS_UNVERSIONED' => 'svn/svn.stub', 'SWFACTION_DATA' => 'ming/ming.stub', 'SWFACTION_ENTERFRAME' => 'ming/ming.stub', 'SWFACTION_KEYDOWN' => 'ming/ming.stub', 'SWFACTION_KEYUP' => 'ming/ming.stub', 'SWFACTION_MOUSEDOWN' => 'ming/ming.stub', 'SWFACTION_MOUSEMOVE' => 'ming/ming.stub', 'SWFACTION_MOUSEUP' => 'ming/ming.stub', 'SWFACTION_ONLOAD' => 'ming/ming.stub', 'SWFACTION_UNLOAD' => 'ming/ming.stub', 'SWFBUTTON_DOWN' => 'ming/ming.stub', 'SWFBUTTON_DRAGOUT' => 'ming/ming.stub', 'SWFBUTTON_DRAGOVER' => 'ming/ming.stub', 'SWFBUTTON_HIT' => 'ming/ming.stub', 'SWFBUTTON_MOUSEDOWN' => 'ming/ming.stub', 'SWFBUTTON_MOUSEOUT' => 'ming/ming.stub', 'SWFBUTTON_MOUSEOVER' => 'ming/ming.stub', 'SWFBUTTON_MOUSEUP' => 'ming/ming.stub', 'SWFBUTTON_MOUSEUPOUTSIDE' => 'ming/ming.stub', 'SWFBUTTON_OVER' => 'ming/ming.stub', 'SWFBUTTON_UP' => 'ming/ming.stub', 'SWFFILL_CLIPPED_BITMAP' => 'ming/ming.stub', 'SWFFILL_LINEAR_GRADIENT' => 'ming/ming.stub', 'SWFFILL_RADIAL_GRADIENT' => 'ming/ming.stub', 'SWFFILL_TILED_BITMAP' => 'ming/ming.stub', 'SWFTEXTFIELD_ALIGN_CENTER' => 'ming/ming.stub', 'SWFTEXTFIELD_ALIGN_JUSTIFY' => 'ming/ming.stub', 'SWFTEXTFIELD_ALIGN_LEFT' => 'ming/ming.stub', 'SWFTEXTFIELD_ALIGN_RIGHT' => 'ming/ming.stub', 'SWFTEXTFIELD_AUTOSIZE' => 'ming/ming.stub', 'SWFTEXTFIELD_DRAWBOX' => 'ming/ming.stub', 'SWFTEXTFIELD_HASLENGTH' => 'ming/ming.stub', 'SWFTEXTFIELD_HTML' => 'ming/ming.stub', 'SWFTEXTFIELD_MULTILINE' => 'ming/ming.stub', 'SWFTEXTFIELD_NOEDIT' => 'ming/ming.stub', 'SWFTEXTFIELD_NOSELECT' => 'ming/ming.stub', 'SWFTEXTFIELD_PASSWORD' => 'ming/ming.stub', 'SWFTEXTFIELD_USEFONT' => 'ming/ming.stub', 'SWFTEXTFIELD_WORDWRAP' => 'ming/ming.stub', 'SWF_SOUND_11KHZ' => 'ming/ming.stub', 'SWF_SOUND_16BITS' => 'ming/ming.stub', 'SWF_SOUND_22KHZ' => 'ming/ming.stub', 'SWF_SOUND_44KHZ' => 'ming/ming.stub', 'SWF_SOUND_5KHZ' => 'ming/ming.stub', 'SWF_SOUND_8BITS' => 'ming/ming.stub', 'SWF_SOUND_ADPCM_COMPRESSED' => 'ming/ming.stub', 'SWF_SOUND_MONO' => 'ming/ming.stub', 'SWF_SOUND_MP3_COMPRESSED' => 'ming/ming.stub', 'SWF_SOUND_NELLY_COMPRESSED' => 'ming/ming.stub', 'SWF_SOUND_NOT_COMPRESSED' => 'ming/ming.stub', 'SWF_SOUND_NOT_COMPRESSED_LE' => 'ming/ming.stub', 'SWF_SOUND_STEREO' => 'ming/ming.stub', 'SWOOLE_ASYNC' => 'swoole/constants.stub', 'SWOOLE_BASE' => 'swoole/constants.stub', 'SWOOLE_CHANNEL_CANCELED' => 'swoole/constants.stub', 'SWOOLE_CHANNEL_CLOSED' => 'swoole/constants.stub', 'SWOOLE_CHANNEL_OK' => 'swoole/constants.stub', 'SWOOLE_CHANNEL_TIMEOUT' => 'swoole/constants.stub', 'SWOOLE_CORO_END' => 'swoole/constants.stub', 'SWOOLE_CORO_INIT' => 'swoole/constants.stub', 'SWOOLE_CORO_MAX_NUM_LIMIT' => 'swoole/constants.stub', 'SWOOLE_CORO_RUNNING' => 'swoole/constants.stub', 'SWOOLE_CORO_WAITING' => 'swoole/constants.stub', 'SWOOLE_DEBUG' => 'swoole/constants.stub', 'SWOOLE_DEFAULT_MAX_CORO_NUM' => 'swoole/constants.stub', 'SWOOLE_DISPATCH_CO_CONN_LB' => 'swoole/constants.stub', 'SWOOLE_DISPATCH_CO_REQ_LB' => 'swoole/constants.stub', 'SWOOLE_DISPATCH_FDMOD' => 'swoole/constants.stub', 'SWOOLE_DISPATCH_IDLE_WORKER' => 'swoole/constants.stub', 'SWOOLE_DISPATCH_IPMOD' => 'swoole/constants.stub', 'SWOOLE_DISPATCH_RESULT_CLOSE_CONNECTION' => 'swoole/constants.stub', 'SWOOLE_DISPATCH_RESULT_DISCARD_PACKET' => 'swoole/constants.stub', 'SWOOLE_DISPATCH_RESULT_USERFUNC_FALLBACK' => 'swoole/constants.stub', 'SWOOLE_DISPATCH_ROUND' => 'swoole/constants.stub', 'SWOOLE_DISPATCH_STREAM' => 'swoole/constants.stub', 'SWOOLE_DISPATCH_UIDMOD' => 'swoole/constants.stub', 'SWOOLE_DISPATCH_USERFUNC' => 'swoole/constants.stub', 'SWOOLE_DTLS_CLIENT_METHOD' => 'swoole/constants.stub', 'SWOOLE_DTLS_SERVER_METHOD' => 'swoole/constants.stub', 'SWOOLE_ERROR_AIO_BAD_REQUEST' => 'swoole/constants.stub', 'SWOOLE_ERROR_AIO_CANCELED' => 'swoole/constants.stub', 'SWOOLE_ERROR_AIO_TIMEOUT' => 'swoole/constants.stub', 'SWOOLE_ERROR_BAD_IPV6_ADDRESS' => 'swoole/constants.stub', 'SWOOLE_ERROR_CLIENT_NO_CONNECTION' => 'swoole/constants.stub', 'SWOOLE_ERROR_CO_BLOCK_OBJECT_LOCKED' => 'swoole/constants.stub', 'SWOOLE_ERROR_CO_BLOCK_OBJECT_WAITING' => 'swoole/constants.stub', 'SWOOLE_ERROR_CO_CANCELED' => 'swoole/constants.stub', 'SWOOLE_ERROR_CO_CANNOT_CANCEL' => 'swoole/constants.stub', 'SWOOLE_ERROR_CO_DISABLED_MULTI_THREAD' => 'swoole/constants.stub', 'SWOOLE_ERROR_CO_GETCONTEXT_FAILED' => 'swoole/constants.stub', 'SWOOLE_ERROR_CO_HAS_BEEN_BOUND' => 'swoole/constants.stub', 'SWOOLE_ERROR_CO_HAS_BEEN_DISCARDED' => 'swoole/constants.stub', 'SWOOLE_ERROR_CO_IOCPINIT_FAILED' => 'swoole/constants.stub', 'SWOOLE_ERROR_CO_MAKECONTEXT_FAILED' => 'swoole/constants.stub', 'SWOOLE_ERROR_CO_MUTEX_DOUBLE_UNLOCK' => 'swoole/constants.stub', 'SWOOLE_ERROR_CO_NOT_EXISTS' => 'swoole/constants.stub', 'SWOOLE_ERROR_CO_OUT_OF_COROUTINE' => 'swoole/constants.stub', 'SWOOLE_ERROR_CO_PROTECT_STACK_FAILED' => 'swoole/constants.stub', 'SWOOLE_ERROR_CO_STD_THREAD_LINK_ERROR' => 'swoole/constants.stub', 'SWOOLE_ERROR_CO_SWAPCONTEXT_FAILED' => 'swoole/constants.stub', 'SWOOLE_ERROR_CO_TIMEDOUT' => 'swoole/constants.stub', 'SWOOLE_ERROR_CO_YIELD_FAILED' => 'swoole/constants.stub', 'SWOOLE_ERROR_DATA_LENGTH_TOO_LARGE' => 'swoole/constants.stub', 'SWOOLE_ERROR_DNSLOOKUP_DUPLICATE_REQUEST' => 'swoole/constants.stub', 'SWOOLE_ERROR_DNSLOOKUP_NO_SERVER' => 'swoole/constants.stub', 'SWOOLE_ERROR_DNSLOOKUP_RESOLVE_FAILED' => 'swoole/constants.stub', 'SWOOLE_ERROR_DNSLOOKUP_RESOLVE_TIMEOUT' => 'swoole/constants.stub', 'SWOOLE_ERROR_DNSLOOKUP_UNSUPPORTED' => 'swoole/constants.stub', 'SWOOLE_ERROR_EVENT_SOCKET_REMOVED' => 'swoole/constants.stub', 'SWOOLE_ERROR_FILE_EMPTY' => 'swoole/constants.stub', 'SWOOLE_ERROR_FILE_NOT_EXIST' => 'swoole/constants.stub', 'SWOOLE_ERROR_FILE_TOO_LARGE' => 'swoole/constants.stub', 'SWOOLE_ERROR_HTTP2_STREAM_ID_TOO_BIG' => 'swoole/constants.stub', 'SWOOLE_ERROR_HTTP2_STREAM_IGNORE' => 'swoole/constants.stub', 'SWOOLE_ERROR_HTTP2_STREAM_NOT_FOUND' => 'swoole/constants.stub', 'SWOOLE_ERROR_HTTP2_STREAM_NO_HEADER' => 'swoole/constants.stub', 'SWOOLE_ERROR_HTTP_INVALID_PROTOCOL' => 'swoole/constants.stub', 'SWOOLE_ERROR_HTTP_PROXY_BAD_RESPONSE' => 'swoole/constants.stub', 'SWOOLE_ERROR_HTTP_PROXY_HANDSHAKE_ERROR' => 'swoole/constants.stub', 'SWOOLE_ERROR_HTTP_PROXY_HANDSHAKE_FAILED' => 'swoole/constants.stub', 'SWOOLE_ERROR_INVALID_PARAMS' => 'swoole/constants.stub', 'SWOOLE_ERROR_MALLOC_FAIL' => 'swoole/constants.stub', 'SWOOLE_ERROR_NAME_TOO_LONG' => 'swoole/constants.stub', 'SWOOLE_ERROR_OPERATION_NOT_SUPPORT' => 'swoole/constants.stub', 'SWOOLE_ERROR_OUTPUT_BUFFER_OVERFLOW' => 'swoole/constants.stub', 'SWOOLE_ERROR_OUTPUT_SEND_YIELD' => 'swoole/constants.stub', 'SWOOLE_ERROR_PACKAGE_LENGTH_NOT_FOUND' => 'swoole/constants.stub', 'SWOOLE_ERROR_PACKAGE_LENGTH_TOO_LARGE' => 'swoole/constants.stub', 'SWOOLE_ERROR_PACKAGE_MALFORMED_DATA' => 'swoole/constants.stub', 'SWOOLE_ERROR_PHP_FATAL_ERROR' => 'swoole/constants.stub', 'SWOOLE_ERROR_PROTOCOL_ERROR' => 'swoole/constants.stub', 'SWOOLE_ERROR_QUEUE_FULL' => 'swoole/constants.stub', 'SWOOLE_ERROR_SERVER_CONNECT_FAIL' => 'swoole/constants.stub', 'SWOOLE_ERROR_SERVER_INVALID_COMMAND' => 'swoole/constants.stub', 'SWOOLE_ERROR_SERVER_INVALID_LISTEN_PORT' => 'swoole/constants.stub', 'SWOOLE_ERROR_SERVER_INVALID_REQUEST' => 'swoole/constants.stub', 'SWOOLE_ERROR_SERVER_MUST_CREATED_BEFORE_CLIENT' => 'swoole/constants.stub', 'SWOOLE_ERROR_SERVER_NO_IDLE_WORKER' => 'swoole/constants.stub', 'SWOOLE_ERROR_SERVER_ONLY_START_ONE' => 'swoole/constants.stub', 'SWOOLE_ERROR_SERVER_PIPE_BUFFER_FULL' => 'swoole/constants.stub', 'SWOOLE_ERROR_SERVER_SEND_IN_MASTER' => 'swoole/constants.stub', 'SWOOLE_ERROR_SERVER_TOO_MANY_LISTEN_PORT' => 'swoole/constants.stub', 'SWOOLE_ERROR_SERVER_TOO_MANY_SOCKET' => 'swoole/constants.stub', 'SWOOLE_ERROR_SERVER_WORKER_ABNORMAL_PIPE_DATA' => 'swoole/constants.stub', 'SWOOLE_ERROR_SERVER_WORKER_EXIT_TIMEOUT' => 'swoole/constants.stub', 'SWOOLE_ERROR_SERVER_WORKER_TERMINATED' => 'swoole/constants.stub', 'SWOOLE_ERROR_SERVER_WORKER_UNPROCESSED_DATA' => 'swoole/constants.stub', 'SWOOLE_ERROR_SESSION_CLOSED' => 'swoole/constants.stub', 'SWOOLE_ERROR_SESSION_CLOSED_BY_CLIENT' => 'swoole/constants.stub', 'SWOOLE_ERROR_SESSION_CLOSED_BY_SERVER' => 'swoole/constants.stub', 'SWOOLE_ERROR_SESSION_CLOSING' => 'swoole/constants.stub', 'SWOOLE_ERROR_SESSION_DISCARD_DATA' => 'swoole/constants.stub', 'SWOOLE_ERROR_SESSION_DISCARD_TIMEOUT_DATA' => 'swoole/constants.stub', 'SWOOLE_ERROR_SESSION_INVALID_ID' => 'swoole/constants.stub', 'SWOOLE_ERROR_SESSION_NOT_EXIST' => 'swoole/constants.stub', 'SWOOLE_ERROR_SOCKET_CLOSED' => 'swoole/constants.stub', 'SWOOLE_ERROR_SOCKET_POLL_TIMEOUT' => 'swoole/constants.stub', 'SWOOLE_ERROR_SOCKS5_AUTH_FAILED' => 'swoole/constants.stub', 'SWOOLE_ERROR_SOCKS5_HANDSHAKE_FAILED' => 'swoole/constants.stub', 'SWOOLE_ERROR_SOCKS5_SERVER_ERROR' => 'swoole/constants.stub', 'SWOOLE_ERROR_SOCKS5_UNSUPPORT_METHOD' => 'swoole/constants.stub', 'SWOOLE_ERROR_SOCKS5_UNSUPPORT_VERSION' => 'swoole/constants.stub', 'SWOOLE_ERROR_SSL_BAD_CLIENT' => 'swoole/constants.stub', 'SWOOLE_ERROR_SSL_BAD_PROTOCOL' => 'swoole/constants.stub', 'SWOOLE_ERROR_SSL_CANNOT_USE_SENFILE' => 'swoole/constants.stub', 'SWOOLE_ERROR_SSL_EMPTY_PEER_CERTIFICATE' => 'swoole/constants.stub', 'SWOOLE_ERROR_SSL_HANDSHAKE_FAILED' => 'swoole/constants.stub', 'SWOOLE_ERROR_SSL_NOT_READY' => 'swoole/constants.stub', 'SWOOLE_ERROR_SSL_RESET' => 'swoole/constants.stub', 'SWOOLE_ERROR_SSL_VERIFY_FAILED' => 'swoole/constants.stub', 'SWOOLE_ERROR_SYSTEM_CALL_FAIL' => 'swoole/constants.stub', 'SWOOLE_ERROR_TASK_DISPATCH_FAIL' => 'swoole/constants.stub', 'SWOOLE_ERROR_TASK_PACKAGE_TOO_BIG' => 'swoole/constants.stub', 'SWOOLE_ERROR_TASK_TIMEOUT' => 'swoole/constants.stub', 'SWOOLE_ERROR_UNREGISTERED_SIGNAL' => 'swoole/constants.stub', 'SWOOLE_ERROR_WEBSOCKET_BAD_CLIENT' => 'swoole/constants.stub', 'SWOOLE_ERROR_WEBSOCKET_BAD_OPCODE' => 'swoole/constants.stub', 'SWOOLE_ERROR_WEBSOCKET_HANDSHAKE_FAILED' => 'swoole/constants.stub', 'SWOOLE_ERROR_WEBSOCKET_INCOMPLETE_PACKET' => 'swoole/constants.stub', 'SWOOLE_ERROR_WEBSOCKET_PACK_FAILED' => 'swoole/constants.stub', 'SWOOLE_ERROR_WEBSOCKET_UNCONNECTED' => 'swoole/constants.stub', 'SWOOLE_ERROR_WEBSOCKET_UNPACK_FAILED' => 'swoole/constants.stub', 'SWOOLE_ERROR_WRONG_OPERATION' => 'swoole/constants.stub', 'SWOOLE_EVENT_READ' => 'swoole/constants.stub', 'SWOOLE_EVENT_WRITE' => 'swoole/constants.stub', 'SWOOLE_EXIT_IN_COROUTINE' => 'swoole/constants.stub', 'SWOOLE_EXIT_IN_SERVER' => 'swoole/constants.stub', 'SWOOLE_EXTRA_VERSION' => 'swoole/constants.stub', 'SWOOLE_FILELOCK' => 'swoole/constants.stub', 'SWOOLE_HAVE_BROTLI' => 'swoole/constants.stub', 'SWOOLE_HAVE_COMPRESSION' => 'swoole/constants.stub', 'SWOOLE_HAVE_ZLIB' => 'swoole/constants.stub', 'SWOOLE_HOOK_ALL' => 'swoole/constants.stub', 'SWOOLE_HOOK_BLOCKING_FUNCTION' => 'swoole/constants.stub', 'SWOOLE_HOOK_CURL' => 'swoole/constants.stub', 'SWOOLE_HOOK_FILE' => 'swoole/constants.stub', 'SWOOLE_HOOK_NATIVE_CURL' => 'swoole/constants.stub', 'SWOOLE_HOOK_PROC' => 'swoole/constants.stub', 'SWOOLE_HOOK_SLEEP' => 'swoole/constants.stub', 'SWOOLE_HOOK_SOCKETS' => 'swoole/constants.stub', 'SWOOLE_HOOK_SSL' => 'swoole/constants.stub', 'SWOOLE_HOOK_STDIO' => 'swoole/constants.stub', 'SWOOLE_HOOK_STREAM_FUNCTION' => 'swoole/constants.stub', 'SWOOLE_HOOK_STREAM_SELECT' => 'swoole/constants.stub', 'SWOOLE_HOOK_TCP' => 'swoole/constants.stub', 'SWOOLE_HOOK_TLS' => 'swoole/constants.stub', 'SWOOLE_HOOK_UDG' => 'swoole/constants.stub', 'SWOOLE_HOOK_UDP' => 'swoole/constants.stub', 'SWOOLE_HOOK_UNIX' => 'swoole/constants.stub', 'SWOOLE_HTTP2_ERROR_CANCEL' => 'swoole/constants.stub', 'SWOOLE_HTTP2_ERROR_COMPRESSION_ERROR' => 'swoole/constants.stub', 'SWOOLE_HTTP2_ERROR_CONNECT_ERROR' => 'swoole/constants.stub', 'SWOOLE_HTTP2_ERROR_ENHANCE_YOUR_CALM' => 'swoole/constants.stub', 'SWOOLE_HTTP2_ERROR_FLOW_CONTROL_ERROR' => 'swoole/constants.stub', 'SWOOLE_HTTP2_ERROR_FRAME_SIZE_ERROR' => 'swoole/constants.stub', 'SWOOLE_HTTP2_ERROR_INADEQUATE_SECURITY' => 'swoole/constants.stub', 'SWOOLE_HTTP2_ERROR_INTERNAL_ERROR' => 'swoole/constants.stub', 'SWOOLE_HTTP2_ERROR_NO_ERROR' => 'swoole/constants.stub', 'SWOOLE_HTTP2_ERROR_PROTOCOL_ERROR' => 'swoole/constants.stub', 'SWOOLE_HTTP2_ERROR_REFUSED_STREAM' => 'swoole/constants.stub', 'SWOOLE_HTTP2_ERROR_SETTINGS_TIMEOUT' => 'swoole/constants.stub', 'SWOOLE_HTTP2_ERROR_STREAM_CLOSED' => 'swoole/constants.stub', 'SWOOLE_HTTP2_TYPE_CONTINUATION' => 'swoole/constants.stub', 'SWOOLE_HTTP2_TYPE_DATA' => 'swoole/constants.stub', 'SWOOLE_HTTP2_TYPE_GOAWAY' => 'swoole/constants.stub', 'SWOOLE_HTTP2_TYPE_HEADERS' => 'swoole/constants.stub', 'SWOOLE_HTTP2_TYPE_PING' => 'swoole/constants.stub', 'SWOOLE_HTTP2_TYPE_PRIORITY' => 'swoole/constants.stub', 'SWOOLE_HTTP2_TYPE_PUSH_PROMISE' => 'swoole/constants.stub', 'SWOOLE_HTTP2_TYPE_RST_STREAM' => 'swoole/constants.stub', 'SWOOLE_HTTP2_TYPE_SETTINGS' => 'swoole/constants.stub', 'SWOOLE_HTTP2_TYPE_WINDOW_UPDATE' => 'swoole/constants.stub', 'SWOOLE_HTTP_CLIENT_ESTATUS_CONNECT_FAILED' => 'swoole/constants.stub', 'SWOOLE_HTTP_CLIENT_ESTATUS_REQUEST_TIMEOUT' => 'swoole/constants.stub', 'SWOOLE_HTTP_CLIENT_ESTATUS_SEND_FAILED' => 'swoole/constants.stub', 'SWOOLE_HTTP_CLIENT_ESTATUS_SERVER_RESET' => 'swoole/constants.stub', 'SWOOLE_IOV_MAX' => 'swoole/constants.stub', 'SWOOLE_IPC_MSGQUEUE' => 'swoole/constants.stub', 'SWOOLE_IPC_NONE' => 'swoole/constants.stub', 'SWOOLE_IPC_PREEMPTIVE' => 'swoole/constants.stub', 'SWOOLE_IPC_SOCKET' => 'swoole/constants.stub', 'SWOOLE_IPC_UNIXSOCK' => 'swoole/constants.stub', 'SWOOLE_IPC_UNSOCK' => 'swoole/constants.stub', 'SWOOLE_KEEP' => 'swoole/constants.stub', 'SWOOLE_LOG_DEBUG' => 'swoole/constants.stub', 'SWOOLE_LOG_ERROR' => 'swoole/constants.stub', 'SWOOLE_LOG_INFO' => 'swoole/constants.stub', 'SWOOLE_LOG_NONE' => 'swoole/constants.stub', 'SWOOLE_LOG_NOTICE' => 'swoole/constants.stub', 'SWOOLE_LOG_ROTATION_DAILY' => 'swoole/constants.stub', 'SWOOLE_LOG_ROTATION_EVERY_MINUTE' => 'swoole/constants.stub', 'SWOOLE_LOG_ROTATION_HOURLY' => 'swoole/constants.stub', 'SWOOLE_LOG_ROTATION_MONTHLY' => 'swoole/constants.stub', 'SWOOLE_LOG_ROTATION_SINGLE' => 'swoole/constants.stub', 'SWOOLE_LOG_TRACE' => 'swoole/constants.stub', 'SWOOLE_LOG_WARNING' => 'swoole/constants.stub', 'SWOOLE_MAJOR_VERSION' => 'swoole/constants.stub', 'SWOOLE_MINOR_VERSION' => 'swoole/constants.stub', 'SWOOLE_MUTEX' => 'swoole/constants.stub', 'SWOOLE_MYSQLND_CR_CANT_FIND_CHARSET' => 'swoole/constants.stub', 'SWOOLE_MYSQLND_CR_COMMANDS_OUT_OF_SYNC' => 'swoole/constants.stub', 'SWOOLE_MYSQLND_CR_CONNECTION_ERROR' => 'swoole/constants.stub', 'SWOOLE_MYSQLND_CR_INVALID_BUFFER_USE' => 'swoole/constants.stub', 'SWOOLE_MYSQLND_CR_INVALID_PARAMETER_NO' => 'swoole/constants.stub', 'SWOOLE_MYSQLND_CR_MALFORMED_PACKET' => 'swoole/constants.stub', 'SWOOLE_MYSQLND_CR_NOT_IMPLEMENTED' => 'swoole/constants.stub', 'SWOOLE_MYSQLND_CR_NO_PREPARE_STMT' => 'swoole/constants.stub', 'SWOOLE_MYSQLND_CR_OUT_OF_MEMORY' => 'swoole/constants.stub', 'SWOOLE_MYSQLND_CR_PARAMS_NOT_BOUND' => 'swoole/constants.stub', 'SWOOLE_MYSQLND_CR_SERVER_GONE_ERROR' => 'swoole/constants.stub', 'SWOOLE_MYSQLND_CR_SERVER_LOST' => 'swoole/constants.stub', 'SWOOLE_MYSQLND_CR_UNKNOWN_ERROR' => 'swoole/constants.stub', 'SWOOLE_PROCESS' => 'swoole/constants.stub', 'SWOOLE_REDIS_ERR_ALLOC' => 'swoole/constants.stub', 'SWOOLE_REDIS_ERR_CLOSED' => 'swoole/constants.stub', 'SWOOLE_REDIS_ERR_EOF' => 'swoole/constants.stub', 'SWOOLE_REDIS_ERR_IO' => 'swoole/constants.stub', 'SWOOLE_REDIS_ERR_NOAUTH' => 'swoole/constants.stub', 'SWOOLE_REDIS_ERR_OOM' => 'swoole/constants.stub', 'SWOOLE_REDIS_ERR_OTHER' => 'swoole/constants.stub', 'SWOOLE_REDIS_ERR_PROTOCOL' => 'swoole/constants.stub', 'SWOOLE_REDIS_MODE_MULTI' => 'swoole/constants.stub', 'SWOOLE_REDIS_MODE_PIPELINE' => 'swoole/constants.stub', 'SWOOLE_REDIS_TYPE_HASH' => 'swoole/constants.stub', 'SWOOLE_REDIS_TYPE_LIST' => 'swoole/constants.stub', 'SWOOLE_REDIS_TYPE_NOT_FOUND' => 'swoole/constants.stub', 'SWOOLE_REDIS_TYPE_SET' => 'swoole/constants.stub', 'SWOOLE_REDIS_TYPE_STRING' => 'swoole/constants.stub', 'SWOOLE_REDIS_TYPE_ZSET' => 'swoole/constants.stub', 'SWOOLE_RELEASE_VERSION' => 'swoole/constants.stub', 'SWOOLE_RWLOCK' => 'swoole/constants.stub', 'SWOOLE_SEM' => 'swoole/constants.stub', 'SWOOLE_SERVER_COMMAND_EVENT_WORKER' => 'swoole/constants.stub', 'SWOOLE_SERVER_COMMAND_MANAGER' => 'swoole/constants.stub', 'SWOOLE_SERVER_COMMAND_MASTER' => 'swoole/constants.stub', 'SWOOLE_SERVER_COMMAND_REACTOR_THREAD' => 'swoole/constants.stub', 'SWOOLE_SERVER_COMMAND_TASK_WORKER' => 'swoole/constants.stub', 'SWOOLE_SERVER_COMMAND_WORKER' => 'swoole/constants.stub', 'SWOOLE_SOCK_ASYNC' => 'swoole/constants.stub', 'SWOOLE_SOCK_SYNC' => 'swoole/constants.stub', 'SWOOLE_SOCK_TCP' => 'swoole/constants.stub', 'SWOOLE_SOCK_TCP6' => 'swoole/constants.stub', 'SWOOLE_SOCK_UDP' => 'swoole/constants.stub', 'SWOOLE_SOCK_UDP6' => 'swoole/constants.stub', 'SWOOLE_SOCK_UNIX_DGRAM' => 'swoole/constants.stub', 'SWOOLE_SOCK_UNIX_STREAM' => 'swoole/constants.stub', 'SWOOLE_SPINLOCK' => 'swoole/constants.stub', 'SWOOLE_SSL' => 'swoole/constants.stub', 'SWOOLE_SSL_DTLS' => 'swoole/constants.stub', 'SWOOLE_SSL_SSLv2' => 'swoole/constants.stub', 'SWOOLE_SSL_TLSv1' => 'swoole/constants.stub', 'SWOOLE_SSL_TLSv1_1' => 'swoole/constants.stub', 'SWOOLE_SSL_TLSv1_2' => 'swoole/constants.stub', 'SWOOLE_SSL_TLSv1_3' => 'swoole/constants.stub', 'SWOOLE_SSLv23_CLIENT_METHOD' => 'swoole/constants.stub', 'SWOOLE_SSLv23_METHOD' => 'swoole/constants.stub', 'SWOOLE_SSLv23_SERVER_METHOD' => 'swoole/constants.stub', 'SWOOLE_SSLv3_CLIENT_METHOD' => 'swoole/constants.stub', 'SWOOLE_SSLv3_METHOD' => 'swoole/constants.stub', 'SWOOLE_SSLv3_SERVER_METHOD' => 'swoole/constants.stub', 'SWOOLE_STRERROR_DNS' => 'swoole/constants.stub', 'SWOOLE_STRERROR_GAI' => 'swoole/constants.stub', 'SWOOLE_STRERROR_SWOOLE' => 'swoole/constants.stub', 'SWOOLE_STRERROR_SYSTEM' => 'swoole/constants.stub', 'SWOOLE_SYNC' => 'swoole/constants.stub', 'SWOOLE_TASK_CALLBACK' => 'swoole/constants.stub', 'SWOOLE_TASK_COROUTINE' => 'swoole/constants.stub', 'SWOOLE_TASK_NONBLOCK' => 'swoole/constants.stub', 'SWOOLE_TASK_NOREPLY' => 'swoole/constants.stub', 'SWOOLE_TASK_PEEK' => 'swoole/constants.stub', 'SWOOLE_TASK_SERIALIZE' => 'swoole/constants.stub', 'SWOOLE_TASK_TMPFILE' => 'swoole/constants.stub', 'SWOOLE_TASK_WAITALL' => 'swoole/constants.stub', 'SWOOLE_TCP' => 'swoole/constants.stub', 'SWOOLE_TCP6' => 'swoole/constants.stub', 'SWOOLE_TIMER_MAX_MS' => 'swoole/constants.stub', 'SWOOLE_TIMER_MAX_SEC' => 'swoole/constants.stub', 'SWOOLE_TIMER_MIN_MS' => 'swoole/constants.stub', 'SWOOLE_TIMER_MIN_SEC' => 'swoole/constants.stub', 'SWOOLE_TLS_CLIENT_METHOD' => 'swoole/constants.stub', 'SWOOLE_TLS_METHOD' => 'swoole/constants.stub', 'SWOOLE_TLS_SERVER_METHOD' => 'swoole/constants.stub', 'SWOOLE_TLSv1_1_CLIENT_METHOD' => 'swoole/constants.stub', 'SWOOLE_TLSv1_1_METHOD' => 'swoole/constants.stub', 'SWOOLE_TLSv1_1_SERVER_METHOD' => 'swoole/constants.stub', 'SWOOLE_TLSv1_2_CLIENT_METHOD' => 'swoole/constants.stub', 'SWOOLE_TLSv1_2_METHOD' => 'swoole/constants.stub', 'SWOOLE_TLSv1_2_SERVER_METHOD' => 'swoole/constants.stub', 'SWOOLE_TLSv1_CLIENT_METHOD' => 'swoole/constants.stub', 'SWOOLE_TLSv1_METHOD' => 'swoole/constants.stub', 'SWOOLE_TLSv1_SERVER_METHOD' => 'swoole/constants.stub', 'SWOOLE_TRACE_AIO' => 'swoole/constants.stub', 'SWOOLE_TRACE_ALL' => 'swoole/constants.stub', 'SWOOLE_TRACE_BUFFER' => 'swoole/constants.stub', 'SWOOLE_TRACE_CARES' => 'swoole/constants.stub', 'SWOOLE_TRACE_CHANNEL' => 'swoole/constants.stub', 'SWOOLE_TRACE_CLIENT' => 'swoole/constants.stub', 'SWOOLE_TRACE_CLOSE' => 'swoole/constants.stub', 'SWOOLE_TRACE_CONN' => 'swoole/constants.stub', 'SWOOLE_TRACE_CONTEXT' => 'swoole/constants.stub', 'SWOOLE_TRACE_COROUTINE' => 'swoole/constants.stub', 'SWOOLE_TRACE_CO_CURL' => 'swoole/constants.stub', 'SWOOLE_TRACE_CO_HTTP_SERVER' => 'swoole/constants.stub', 'SWOOLE_TRACE_EOF_PROTOCOL' => 'swoole/constants.stub', 'SWOOLE_TRACE_EVENT' => 'swoole/constants.stub', 'SWOOLE_TRACE_HTTP' => 'swoole/constants.stub', 'SWOOLE_TRACE_HTTP2' => 'swoole/constants.stub', 'SWOOLE_TRACE_HTTP_CLIENT' => 'swoole/constants.stub', 'SWOOLE_TRACE_LENGTH_PROTOCOL' => 'swoole/constants.stub', 'SWOOLE_TRACE_MEMORY' => 'swoole/constants.stub', 'SWOOLE_TRACE_MYSQL_CLIENT' => 'swoole/constants.stub', 'SWOOLE_TRACE_NORMAL' => 'swoole/constants.stub', 'SWOOLE_TRACE_PHP' => 'swoole/constants.stub', 'SWOOLE_TRACE_REACTOR' => 'swoole/constants.stub', 'SWOOLE_TRACE_REDIS_CLIENT' => 'swoole/constants.stub', 'SWOOLE_TRACE_SERVER' => 'swoole/constants.stub', 'SWOOLE_TRACE_SOCKET' => 'swoole/constants.stub', 'SWOOLE_TRACE_SSL' => 'swoole/constants.stub', 'SWOOLE_TRACE_TABLE' => 'swoole/constants.stub', 'SWOOLE_TRACE_TIMER' => 'swoole/constants.stub', 'SWOOLE_TRACE_WEBSOCKET' => 'swoole/constants.stub', 'SWOOLE_TRACE_WORKER' => 'swoole/constants.stub', 'SWOOLE_UDP' => 'swoole/constants.stub', 'SWOOLE_UDP6' => 'swoole/constants.stub', 'SWOOLE_UNIX_DGRAM' => 'swoole/constants.stub', 'SWOOLE_UNIX_STREAM' => 'swoole/constants.stub', 'SWOOLE_USE_HTTP2' => 'swoole/constants.stub', 'SWOOLE_USE_SHORTNAME' => 'swoole/constants.stub', 'SWOOLE_VERSION' => 'swoole/constants.stub', 'SWOOLE_VERSION_ID' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_CLOSE_ABNORMAL' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_CLOSE_DATA_ERROR' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_CLOSE_EXTENSION_MISSING' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_CLOSE_GOING_AWAY' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_CLOSE_MESSAGE_ERROR' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_CLOSE_MESSAGE_TOO_BIG' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_CLOSE_NORMAL' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_CLOSE_POLICY_ERROR' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_CLOSE_PROTOCOL_ERROR' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_CLOSE_SERVER_ERROR' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_CLOSE_STATUS_ERROR' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_CLOSE_TLS' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_FLAG_COMPRESS' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_FLAG_FIN' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_FLAG_MASK' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_FLAG_RSV1' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_FLAG_RSV2' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_FLAG_RSV3' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_OPCODE_BINARY' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_OPCODE_CLOSE' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_OPCODE_CONTINUATION' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_OPCODE_PING' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_OPCODE_PONG' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_OPCODE_TEXT' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_STATUS_ACTIVE' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_STATUS_CLOSING' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_STATUS_CONNECTION' => 'swoole/constants.stub', 'SWOOLE_WEBSOCKET_STATUS_HANDSHAKE' => 'swoole/constants.stub', 'SWOOLE_WORKER_BUSY' => 'swoole/constants.stub', 'SWOOLE_WORKER_EXIT' => 'swoole/constants.stub', 'SWOOLE_WORKER_IDLE' => 'swoole/constants.stub', 'S_ALL' => 'Core/Core_d.stub', 'S_EXECUTOR' => 'Core/Core_d.stub', 'S_FILES' => 'Core/Core_d.stub', 'S_INCLUDE' => 'Core/Core_d.stub', 'S_INTERNAL' => 'Core/Core_d.stub', 'S_IRGRP' => 'dio/dio_d.stub', 'S_IROTH' => 'dio/dio_d.stub', 'S_IRUSR' => 'dio/dio_d.stub', 'S_IRWXG' => 'dio/dio_d.stub', 'S_IRWXO' => 'dio/dio_d.stub', 'S_IRWXU' => 'dio/dio_d.stub', 'S_IWGRP' => 'dio/dio_d.stub', 'S_IWOTH' => 'dio/dio_d.stub', 'S_IWUSR' => 'dio/dio_d.stub', 'S_IXGRP' => 'dio/dio_d.stub', 'S_IXOTH' => 'dio/dio_d.stub', 'S_IXUSR' => 'dio/dio_d.stub', 'S_MAIL' => 'Core/Core_d.stub', 'S_MEMORY' => 'Core/Core_d.stub', 'S_MISC' => 'Core/Core_d.stub', 'S_SESSION' => 'Core/Core_d.stub', 'S_SQL' => 'Core/Core_d.stub', 'S_VARS' => 'Core/Core_d.stub', 'ScrollBar' => 'winbinder/winbinder.stub', 'Slider' => 'winbinder/winbinder.stub', 'Sodium\\CRYPTO_AEAD_AES256GCM_ABYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_AEAD_AES256GCM_KEYBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_AEAD_AES256GCM_NPUBBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_AEAD_AES256GCM_NSECBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_AEAD_CHACHA20POLY1305_ABYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_AUTH_BYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_AUTH_KEYBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_BOX_KEYPAIRBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_BOX_MACBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_BOX_NONCEBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_BOX_PUBLICKEYBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_BOX_SEALBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_BOX_SECRETKEYBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_BOX_SEEDBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_GENERICHASH_BYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_GENERICHASH_BYTES_MAX' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_GENERICHASH_BYTES_MIN' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_GENERICHASH_KEYBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_GENERICHASH_KEYBYTES_MAX' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_GENERICHASH_KEYBYTES_MIN' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_KX_BYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_KX_PUBLICKEYBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_KX_SECRETKEYBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_PWHASH_MEMLIMIT_MODERATE' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_PWHASH_MEMLIMIT_SENSITIVE' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_PWHASH_OPSLIMIT_MODERATE' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_PWHASH_OPSLIMIT_SENSITIVE' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_INTERACTIVE' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_SENSITIVE' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_INTERACTIVE' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_SENSITIVE' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_PWHASH_SCRYPTSALSA208SHA256_SALTBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_PWHASH_SCRYPTSALSA208SHA256_STRPREFIX' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_SCALARMULT_BYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_SCALARMULT_SCALARBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_SECRETBOX_KEYBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_SECRETBOX_MACBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_SECRETBOX_NONCEBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_SHORTHASH_BYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_SHORTHASH_KEYBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_SIGN_BYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_SIGN_KEYPAIRBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_SIGN_PUBLICKEYBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_SIGN_SECRETKEYBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_SIGN_SEEDBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_STREAM_KEYBYTES' => 'libsodium/libsodium.stub', 'Sodium\\CRYPTO_STREAM_NONCEBYTES' => 'libsodium/libsodium.stub', 'Spinner' => 'winbinder/winbinder.stub', 'StatusBar' => 'winbinder/winbinder.stub', 'TCP_CONGESTION' => 'sockets/sockets.stub', 'TCP_DEFER_ACCEPT' => 'sockets/sockets.stub', 'TCP_KEEPCNT' => 'sockets/sockets.stub', 'TCP_KEEPIDLE' => 'sockets/sockets.stub', 'TCP_KEEPINTVL' => 'sockets/sockets.stub', 'TCP_NODELAY' => 'sockets/sockets.stub', 'TCP_NOTSENT_LOWAT' => 'sockets/sockets.stub', 'THOUSANDS_SEP' => 'standard/standard_defines.stub', 'THOUSEP' => 'standard/standard_defines.stub', 'TIDY_NODETYPE_ASP' => 'tidy/tidy.stub', 'TIDY_NODETYPE_CDATA' => 'tidy/tidy.stub', 'TIDY_NODETYPE_COMMENT' => 'tidy/tidy.stub', 'TIDY_NODETYPE_DOCTYPE' => 'tidy/tidy.stub', 'TIDY_NODETYPE_END' => 'tidy/tidy.stub', 'TIDY_NODETYPE_JSTE' => 'tidy/tidy.stub', 'TIDY_NODETYPE_PHP' => 'tidy/tidy.stub', 'TIDY_NODETYPE_PROCINS' => 'tidy/tidy.stub', 'TIDY_NODETYPE_ROOT' => 'tidy/tidy.stub', 'TIDY_NODETYPE_SECTION' => 'tidy/tidy.stub', 'TIDY_NODETYPE_START' => 'tidy/tidy.stub', 'TIDY_NODETYPE_STARTEND' => 'tidy/tidy.stub', 'TIDY_NODETYPE_TEXT' => 'tidy/tidy.stub', 'TIDY_NODETYPE_XMLDECL' => 'tidy/tidy.stub', 'TIDY_TAG_A' => 'tidy/tidy.stub', 'TIDY_TAG_ABBR' => 'tidy/tidy.stub', 'TIDY_TAG_ACRONYM' => 'tidy/tidy.stub', 'TIDY_TAG_ADDRESS' => 'tidy/tidy.stub', 'TIDY_TAG_ALIGN' => 'tidy/tidy.stub', 'TIDY_TAG_APPLET' => 'tidy/tidy.stub', 'TIDY_TAG_AREA' => 'tidy/tidy.stub', 'TIDY_TAG_ARTICLE' => 'tidy/tidy.stub', 'TIDY_TAG_ASIDE' => 'tidy/tidy.stub', 'TIDY_TAG_AUDIO' => 'tidy/tidy.stub', 'TIDY_TAG_B' => 'tidy/tidy.stub', 'TIDY_TAG_BASE' => 'tidy/tidy.stub', 'TIDY_TAG_BASEFONT' => 'tidy/tidy.stub', 'TIDY_TAG_BDI' => 'tidy/tidy.stub', 'TIDY_TAG_BDO' => 'tidy/tidy.stub', 'TIDY_TAG_BGSOUND' => 'tidy/tidy.stub', 'TIDY_TAG_BIG' => 'tidy/tidy.stub', 'TIDY_TAG_BLINK' => 'tidy/tidy.stub', 'TIDY_TAG_BLOCKQUOTE' => 'tidy/tidy.stub', 'TIDY_TAG_BODY' => 'tidy/tidy.stub', 'TIDY_TAG_BR' => 'tidy/tidy.stub', 'TIDY_TAG_BUTTON' => 'tidy/tidy.stub', 'TIDY_TAG_CANVAS' => 'tidy/tidy.stub', 'TIDY_TAG_CAPTION' => 'tidy/tidy.stub', 'TIDY_TAG_CENTER' => 'tidy/tidy.stub', 'TIDY_TAG_CITE' => 'tidy/tidy.stub', 'TIDY_TAG_CODE' => 'tidy/tidy.stub', 'TIDY_TAG_COL' => 'tidy/tidy.stub', 'TIDY_TAG_COLGROUP' => 'tidy/tidy.stub', 'TIDY_TAG_COMMAND' => 'tidy/tidy.stub', 'TIDY_TAG_COMMENT' => 'tidy/tidy.stub', 'TIDY_TAG_DATALIST' => 'tidy/tidy.stub', 'TIDY_TAG_DD' => 'tidy/tidy.stub', 'TIDY_TAG_DEL' => 'tidy/tidy.stub', 'TIDY_TAG_DETAILS' => 'tidy/tidy.stub', 'TIDY_TAG_DFN' => 'tidy/tidy.stub', 'TIDY_TAG_DIALOG' => 'tidy/tidy.stub', 'TIDY_TAG_DIR' => 'tidy/tidy.stub', 'TIDY_TAG_DIV' => 'tidy/tidy.stub', 'TIDY_TAG_DL' => 'tidy/tidy.stub', 'TIDY_TAG_DT' => 'tidy/tidy.stub', 'TIDY_TAG_EM' => 'tidy/tidy.stub', 'TIDY_TAG_EMBED' => 'tidy/tidy.stub', 'TIDY_TAG_FIELDSET' => 'tidy/tidy.stub', 'TIDY_TAG_FIGCAPTION' => 'tidy/tidy.stub', 'TIDY_TAG_FIGURE' => 'tidy/tidy.stub', 'TIDY_TAG_FONT' => 'tidy/tidy.stub', 'TIDY_TAG_FOOTER' => 'tidy/tidy.stub', 'TIDY_TAG_FORM' => 'tidy/tidy.stub', 'TIDY_TAG_FRAME' => 'tidy/tidy.stub', 'TIDY_TAG_FRAMESET' => 'tidy/tidy.stub', 'TIDY_TAG_H1' => 'tidy/tidy.stub', 'TIDY_TAG_H2' => 'tidy/tidy.stub', 'TIDY_TAG_H3' => 'tidy/tidy.stub', 'TIDY_TAG_H4' => 'tidy/tidy.stub', 'TIDY_TAG_H5' => 'tidy/tidy.stub', 'TIDY_TAG_H6' => 'tidy/tidy.stub', 'TIDY_TAG_HEAD' => 'tidy/tidy.stub', 'TIDY_TAG_HEADER' => 'tidy/tidy.stub', 'TIDY_TAG_HGROUP' => 'tidy/tidy.stub', 'TIDY_TAG_HR' => 'tidy/tidy.stub', 'TIDY_TAG_HTML' => 'tidy/tidy.stub', 'TIDY_TAG_I' => 'tidy/tidy.stub', 'TIDY_TAG_IFRAME' => 'tidy/tidy.stub', 'TIDY_TAG_ILAYER' => 'tidy/tidy.stub', 'TIDY_TAG_IMG' => 'tidy/tidy.stub', 'TIDY_TAG_INPUT' => 'tidy/tidy.stub', 'TIDY_TAG_INS' => 'tidy/tidy.stub', 'TIDY_TAG_ISINDEX' => 'tidy/tidy.stub', 'TIDY_TAG_KBD' => 'tidy/tidy.stub', 'TIDY_TAG_KEYGEN' => 'tidy/tidy.stub', 'TIDY_TAG_LABEL' => 'tidy/tidy.stub', 'TIDY_TAG_LAYER' => 'tidy/tidy.stub', 'TIDY_TAG_LEGEND' => 'tidy/tidy.stub', 'TIDY_TAG_LI' => 'tidy/tidy.stub', 'TIDY_TAG_LINK' => 'tidy/tidy.stub', 'TIDY_TAG_LISTING' => 'tidy/tidy.stub', 'TIDY_TAG_MAIN' => 'tidy/tidy.stub', 'TIDY_TAG_MAP' => 'tidy/tidy.stub', 'TIDY_TAG_MARK' => 'tidy/tidy.stub', 'TIDY_TAG_MARQUEE' => 'tidy/tidy.stub', 'TIDY_TAG_MENU' => 'tidy/tidy.stub', 'TIDY_TAG_MENUITEM' => 'tidy/tidy.stub', 'TIDY_TAG_META' => 'tidy/tidy.stub', 'TIDY_TAG_METER' => 'tidy/tidy.stub', 'TIDY_TAG_MULTICOL' => 'tidy/tidy.stub', 'TIDY_TAG_NAV' => 'tidy/tidy.stub', 'TIDY_TAG_NOBR' => 'tidy/tidy.stub', 'TIDY_TAG_NOEMBED' => 'tidy/tidy.stub', 'TIDY_TAG_NOFRAMES' => 'tidy/tidy.stub', 'TIDY_TAG_NOLAYER' => 'tidy/tidy.stub', 'TIDY_TAG_NOSAVE' => 'tidy/tidy.stub', 'TIDY_TAG_NOSCRIPT' => 'tidy/tidy.stub', 'TIDY_TAG_OBJECT' => 'tidy/tidy.stub', 'TIDY_TAG_OL' => 'tidy/tidy.stub', 'TIDY_TAG_OPTGROUP' => 'tidy/tidy.stub', 'TIDY_TAG_OPTION' => 'tidy/tidy.stub', 'TIDY_TAG_OUTPUT' => 'tidy/tidy.stub', 'TIDY_TAG_P' => 'tidy/tidy.stub', 'TIDY_TAG_PARAM' => 'tidy/tidy.stub', 'TIDY_TAG_PLAINTEXT' => 'tidy/tidy.stub', 'TIDY_TAG_PRE' => 'tidy/tidy.stub', 'TIDY_TAG_PROGRESS' => 'tidy/tidy.stub', 'TIDY_TAG_Q' => 'tidy/tidy.stub', 'TIDY_TAG_RB' => 'tidy/tidy.stub', 'TIDY_TAG_RBC' => 'tidy/tidy.stub', 'TIDY_TAG_RP' => 'tidy/tidy.stub', 'TIDY_TAG_RT' => 'tidy/tidy.stub', 'TIDY_TAG_RTC' => 'tidy/tidy.stub', 'TIDY_TAG_RUBY' => 'tidy/tidy.stub', 'TIDY_TAG_S' => 'tidy/tidy.stub', 'TIDY_TAG_SAMP' => 'tidy/tidy.stub', 'TIDY_TAG_SCRIPT' => 'tidy/tidy.stub', 'TIDY_TAG_SECTION' => 'tidy/tidy.stub', 'TIDY_TAG_SELECT' => 'tidy/tidy.stub', 'TIDY_TAG_SERVER' => 'tidy/tidy.stub', 'TIDY_TAG_SERVLET' => 'tidy/tidy.stub', 'TIDY_TAG_SMALL' => 'tidy/tidy.stub', 'TIDY_TAG_SOURCE' => 'tidy/tidy.stub', 'TIDY_TAG_SPACER' => 'tidy/tidy.stub', 'TIDY_TAG_SPAN' => 'tidy/tidy.stub', 'TIDY_TAG_STRIKE' => 'tidy/tidy.stub', 'TIDY_TAG_STRONG' => 'tidy/tidy.stub', 'TIDY_TAG_STYLE' => 'tidy/tidy.stub', 'TIDY_TAG_SUB' => 'tidy/tidy.stub', 'TIDY_TAG_SUMMARY' => 'tidy/tidy.stub', 'TIDY_TAG_SUP' => 'tidy/tidy.stub', 'TIDY_TAG_TABLE' => 'tidy/tidy.stub', 'TIDY_TAG_TBODY' => 'tidy/tidy.stub', 'TIDY_TAG_TD' => 'tidy/tidy.stub', 'TIDY_TAG_TEMPLATE' => 'tidy/tidy.stub', 'TIDY_TAG_TEXTAREA' => 'tidy/tidy.stub', 'TIDY_TAG_TFOOT' => 'tidy/tidy.stub', 'TIDY_TAG_TH' => 'tidy/tidy.stub', 'TIDY_TAG_THEAD' => 'tidy/tidy.stub', 'TIDY_TAG_TIME' => 'tidy/tidy.stub', 'TIDY_TAG_TITLE' => 'tidy/tidy.stub', 'TIDY_TAG_TR' => 'tidy/tidy.stub', 'TIDY_TAG_TRACK' => 'tidy/tidy.stub', 'TIDY_TAG_TT' => 'tidy/tidy.stub', 'TIDY_TAG_U' => 'tidy/tidy.stub', 'TIDY_TAG_UL' => 'tidy/tidy.stub', 'TIDY_TAG_UNKNOWN' => 'tidy/tidy.stub', 'TIDY_TAG_VAR' => 'tidy/tidy.stub', 'TIDY_TAG_VIDEO' => 'tidy/tidy.stub', 'TIDY_TAG_WBR' => 'tidy/tidy.stub', 'TIDY_TAG_XMP' => 'tidy/tidy.stub', 'TOKEN_PARSE' => 'tokenizer/tokenizer.stub', 'TRAP_BRKPT' => 'pcntl/pcntl.stub', 'TRAP_TRACE' => 'pcntl/pcntl.stub', 'TYPEAPPLICATION' => 'imap/imap.stub', 'TYPEAUDIO' => 'imap/imap.stub', 'TYPEIMAGE' => 'imap/imap.stub', 'TYPEMESSAGE' => 'imap/imap.stub', 'TYPEMODEL' => 'imap/imap.stub', 'TYPEMULTIPART' => 'imap/imap.stub', 'TYPEOTHER' => 'imap/imap.stub', 'TYPETEXT' => 'imap/imap.stub', 'TYPEVIDEO' => 'imap/imap.stub', 'T_ABSTRACT' => 'tokenizer/tokenizer.stub', 'T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG' => 'tokenizer/tokenizer.stub', 'T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG' => 'tokenizer/tokenizer.stub', 'T_AND_EQUAL' => 'tokenizer/tokenizer.stub', 'T_ARRAY' => 'tokenizer/tokenizer.stub', 'T_ARRAY_CAST' => 'tokenizer/tokenizer.stub', 'T_AS' => 'tokenizer/tokenizer.stub', 'T_ATTRIBUTE' => 'tokenizer/tokenizer.stub', 'T_BAD_CHARACTER' => 'tokenizer/tokenizer.stub', 'T_BOOLEAN_AND' => 'tokenizer/tokenizer.stub', 'T_BOOLEAN_OR' => 'tokenizer/tokenizer.stub', 'T_BOOL_CAST' => 'tokenizer/tokenizer.stub', 'T_BREAK' => 'tokenizer/tokenizer.stub', 'T_CALLABLE' => 'tokenizer/tokenizer.stub', 'T_CASE' => 'tokenizer/tokenizer.stub', 'T_CATCH' => 'tokenizer/tokenizer.stub', 'T_CHARACTER' => 'tokenizer/tokenizer.stub', 'T_CLASS' => 'tokenizer/tokenizer.stub', 'T_CLASS_C' => 'tokenizer/tokenizer.stub', 'T_CLONE' => 'tokenizer/tokenizer.stub', 'T_CLOSE_TAG' => 'tokenizer/tokenizer.stub', 'T_COALESCE' => 'tokenizer/tokenizer.stub', 'T_COALESCE_EQUAL' => 'tokenizer/tokenizer.stub', 'T_COMMENT' => 'tokenizer/tokenizer.stub', 'T_CONCAT_EQUAL' => 'tokenizer/tokenizer.stub', 'T_CONST' => 'tokenizer/tokenizer.stub', 'T_CONSTANT_ENCAPSED_STRING' => 'tokenizer/tokenizer.stub', 'T_CONTINUE' => 'tokenizer/tokenizer.stub', 'T_CURLY_OPEN' => 'tokenizer/tokenizer.stub', 'T_DEC' => 'tokenizer/tokenizer.stub', 'T_DECLARE' => 'tokenizer/tokenizer.stub', 'T_DEFAULT' => 'tokenizer/tokenizer.stub', 'T_DIR' => 'tokenizer/tokenizer.stub', 'T_DIV_EQUAL' => 'tokenizer/tokenizer.stub', 'T_DNUMBER' => 'tokenizer/tokenizer.stub', 'T_DO' => 'tokenizer/tokenizer.stub', 'T_DOC_COMMENT' => 'tokenizer/tokenizer.stub', 'T_DOLLAR_OPEN_CURLY_BRACES' => 'tokenizer/tokenizer.stub', 'T_DOUBLE_ARROW' => 'tokenizer/tokenizer.stub', 'T_DOUBLE_CAST' => 'tokenizer/tokenizer.stub', 'T_DOUBLE_COLON' => 'tokenizer/tokenizer.stub', 'T_ECHO' => 'tokenizer/tokenizer.stub', 'T_ELLIPSIS' => 'tokenizer/tokenizer.stub', 'T_ELSE' => 'tokenizer/tokenizer.stub', 'T_ELSEIF' => 'tokenizer/tokenizer.stub', 'T_EMPTY' => 'tokenizer/tokenizer.stub', 'T_ENCAPSED_AND_WHITESPACE' => 'tokenizer/tokenizer.stub', 'T_ENDDECLARE' => 'tokenizer/tokenizer.stub', 'T_ENDFOR' => 'tokenizer/tokenizer.stub', 'T_ENDFOREACH' => 'tokenizer/tokenizer.stub', 'T_ENDIF' => 'tokenizer/tokenizer.stub', 'T_ENDSWITCH' => 'tokenizer/tokenizer.stub', 'T_ENDWHILE' => 'tokenizer/tokenizer.stub', 'T_END_HEREDOC' => 'tokenizer/tokenizer.stub', 'T_ENUM' => 'tokenizer/tokenizer.stub', 'T_EVAL' => 'tokenizer/tokenizer.stub', 'T_EXIT' => 'tokenizer/tokenizer.stub', 'T_EXTENDS' => 'tokenizer/tokenizer.stub', 'T_FILE' => 'tokenizer/tokenizer.stub', 'T_FINAL' => 'tokenizer/tokenizer.stub', 'T_FINALLY' => 'tokenizer/tokenizer.stub', 'T_FMT' => 'standard/standard_defines.stub', 'T_FMT_AMPM' => 'standard/standard_defines.stub', 'T_FN' => 'tokenizer/tokenizer.stub', 'T_FOR' => 'tokenizer/tokenizer.stub', 'T_FOREACH' => 'tokenizer/tokenizer.stub', 'T_FUNCTION' => 'tokenizer/tokenizer.stub', 'T_FUNC_C' => 'tokenizer/tokenizer.stub', 'T_GLOBAL' => 'tokenizer/tokenizer.stub', 'T_GOTO' => 'tokenizer/tokenizer.stub', 'T_HALT_COMPILER' => 'tokenizer/tokenizer.stub', 'T_IF' => 'tokenizer/tokenizer.stub', 'T_IMPLEMENTS' => 'tokenizer/tokenizer.stub', 'T_INC' => 'tokenizer/tokenizer.stub', 'T_INCLUDE' => 'tokenizer/tokenizer.stub', 'T_INCLUDE_ONCE' => 'tokenizer/tokenizer.stub', 'T_INLINE_HTML' => 'tokenizer/tokenizer.stub', 'T_INSTANCEOF' => 'tokenizer/tokenizer.stub', 'T_INSTEADOF' => 'tokenizer/tokenizer.stub', 'T_INTERFACE' => 'tokenizer/tokenizer.stub', 'T_INT_CAST' => 'tokenizer/tokenizer.stub', 'T_ISSET' => 'tokenizer/tokenizer.stub', 'T_IS_EQUAL' => 'tokenizer/tokenizer.stub', 'T_IS_GREATER_OR_EQUAL' => 'tokenizer/tokenizer.stub', 'T_IS_IDENTICAL' => 'tokenizer/tokenizer.stub', 'T_IS_NOT_EQUAL' => 'tokenizer/tokenizer.stub', 'T_IS_NOT_IDENTICAL' => 'tokenizer/tokenizer.stub', 'T_IS_SMALLER_OR_EQUAL' => 'tokenizer/tokenizer.stub', 'T_LINE' => 'tokenizer/tokenizer.stub', 'T_LIST' => 'tokenizer/tokenizer.stub', 'T_LNUMBER' => 'tokenizer/tokenizer.stub', 'T_LOGICAL_AND' => 'tokenizer/tokenizer.stub', 'T_LOGICAL_OR' => 'tokenizer/tokenizer.stub', 'T_LOGICAL_XOR' => 'tokenizer/tokenizer.stub', 'T_MATCH' => 'tokenizer/tokenizer.stub', 'T_METHOD_C' => 'tokenizer/tokenizer.stub', 'T_MINUS_EQUAL' => 'tokenizer/tokenizer.stub', 'T_MOD_EQUAL' => 'tokenizer/tokenizer.stub', 'T_MUL_EQUAL' => 'tokenizer/tokenizer.stub', 'T_NAMESPACE' => 'tokenizer/tokenizer.stub', 'T_NAME_FULLY_QUALIFIED' => 'tokenizer/tokenizer.stub', 'T_NAME_QUALIFIED' => 'tokenizer/tokenizer.stub', 'T_NAME_RELATIVE' => 'tokenizer/tokenizer.stub', 'T_NEW' => 'tokenizer/tokenizer.stub', 'T_NS_C' => 'tokenizer/tokenizer.stub', 'T_NS_SEPARATOR' => 'tokenizer/tokenizer.stub', 'T_NULLSAFE_OBJECT_OPERATOR' => 'tokenizer/tokenizer.stub', 'T_NUM_STRING' => 'tokenizer/tokenizer.stub', 'T_OBJECT_CAST' => 'tokenizer/tokenizer.stub', 'T_OBJECT_OPERATOR' => 'tokenizer/tokenizer.stub', 'T_OPEN_TAG' => 'tokenizer/tokenizer.stub', 'T_OPEN_TAG_WITH_ECHO' => 'tokenizer/tokenizer.stub', 'T_OR_EQUAL' => 'tokenizer/tokenizer.stub', 'T_PAAMAYIM_NEKUDOTAYIM' => 'tokenizer/tokenizer.stub', 'T_PLUS_EQUAL' => 'tokenizer/tokenizer.stub', 'T_POW' => 'tokenizer/tokenizer.stub', 'T_POW_EQUAL' => 'tokenizer/tokenizer.stub', 'T_PRINT' => 'tokenizer/tokenizer.stub', 'T_PRIVATE' => 'tokenizer/tokenizer.stub', 'T_PROTECTED' => 'tokenizer/tokenizer.stub', 'T_PUBLIC' => 'tokenizer/tokenizer.stub', 'T_READONLY' => 'tokenizer/tokenizer.stub', 'T_REQUIRE' => 'tokenizer/tokenizer.stub', 'T_REQUIRE_ONCE' => 'tokenizer/tokenizer.stub', 'T_RETURN' => 'tokenizer/tokenizer.stub', 'T_SL' => 'tokenizer/tokenizer.stub', 'T_SL_EQUAL' => 'tokenizer/tokenizer.stub', 'T_SPACESHIP' => 'tokenizer/tokenizer.stub', 'T_SR' => 'tokenizer/tokenizer.stub', 'T_SR_EQUAL' => 'tokenizer/tokenizer.stub', 'T_START_HEREDOC' => 'tokenizer/tokenizer.stub', 'T_STATIC' => 'tokenizer/tokenizer.stub', 'T_STRING' => 'tokenizer/tokenizer.stub', 'T_STRING_CAST' => 'tokenizer/tokenizer.stub', 'T_STRING_VARNAME' => 'tokenizer/tokenizer.stub', 'T_SWITCH' => 'tokenizer/tokenizer.stub', 'T_THROW' => 'tokenizer/tokenizer.stub', 'T_TRAIT' => 'tokenizer/tokenizer.stub', 'T_TRAIT_C' => 'tokenizer/tokenizer.stub', 'T_TRY' => 'tokenizer/tokenizer.stub', 'T_UNSET' => 'tokenizer/tokenizer.stub', 'T_UNSET_CAST' => 'tokenizer/tokenizer.stub', 'T_USE' => 'tokenizer/tokenizer.stub', 'T_VAR' => 'tokenizer/tokenizer.stub', 'T_VARIABLE' => 'tokenizer/tokenizer.stub', 'T_WHILE' => 'tokenizer/tokenizer.stub', 'T_WHITESPACE' => 'tokenizer/tokenizer.stub', 'T_XOR_EQUAL' => 'tokenizer/tokenizer.stub', 'T_YIELD' => 'tokenizer/tokenizer.stub', 'T_YIELD_FROM' => 'tokenizer/tokenizer.stub', 'TabControl' => 'winbinder/winbinder.stub', 'Timer' => 'winbinder/winbinder.stub', 'ToolBar' => 'winbinder/winbinder.stub', 'ToolDialog' => 'winbinder/winbinder.stub', 'TreeView' => 'winbinder/winbinder.stub', 'ULOC_ACTUAL_LOCALE' => 'intl/intl.stub', 'ULOC_VALID_LOCALE' => 'intl/intl.stub', 'UNKNOWN_TYPE' => 'soap/soap.stub', 'UPLOAD_ERR_CANT_WRITE' => 'Core/Core_d.stub', 'UPLOAD_ERR_EXTENSION' => 'Core/Core_d.stub', 'UPLOAD_ERR_FORM_SIZE' => 'Core/Core_d.stub', 'UPLOAD_ERR_INI_SIZE' => 'Core/Core_d.stub', 'UPLOAD_ERR_NO_FILE' => 'Core/Core_d.stub', 'UPLOAD_ERR_NO_TMP_DIR' => 'Core/Core_d.stub', 'UPLOAD_ERR_OK' => 'Core/Core_d.stub', 'UPLOAD_ERR_PARTIAL' => 'Core/Core_d.stub', 'UUID_TYPE_DCE' => 'uuid/uuid_c.stub', 'UUID_TYPE_DEFAULT' => 'uuid/uuid_c.stub', 'UUID_TYPE_INVALID' => 'uuid/uuid_c.stub', 'UUID_TYPE_MD5' => 'uuid/uuid_c.stub', 'UUID_TYPE_NAME' => 'uuid/uuid_c.stub', 'UUID_TYPE_NULL' => 'uuid/uuid_c.stub', 'UUID_TYPE_RANDOM' => 'uuid/uuid_c.stub', 'UUID_TYPE_SECURITY' => 'uuid/uuid_c.stub', 'UUID_TYPE_SHA1' => 'uuid/uuid_c.stub', 'UUID_TYPE_TIME' => 'uuid/uuid_c.stub', 'UUID_VARIANT_DCE' => 'uuid/uuid_c.stub', 'UUID_VARIANT_MICROSOFT' => 'uuid/uuid_c.stub', 'UUID_VARIANT_NCS' => 'uuid/uuid_c.stub', 'UUID_VARIANT_OTHER' => 'uuid/uuid_c.stub', 'U_AMBIGUOUS_ALIAS_WARNING' => 'intl/intl.stub', 'U_BAD_VARIABLE_DEFINITION' => 'intl/intl.stub', 'U_BRK_ASSIGN_ERROR' => 'intl/intl.stub', 'U_BRK_ERROR_LIMIT' => 'intl/intl.stub', 'U_BRK_ERROR_START' => 'intl/intl.stub', 'U_BRK_HEX_DIGITS_EXPECTED' => 'intl/intl.stub', 'U_BRK_INIT_ERROR' => 'intl/intl.stub', 'U_BRK_INTERNAL_ERROR' => 'intl/intl.stub', 'U_BRK_MALFORMED_RULE_TAG' => 'intl/intl.stub', 'U_BRK_MISMATCHED_PAREN' => 'intl/intl.stub', 'U_BRK_NEW_LINE_IN_QUOTED_STRING' => 'intl/intl.stub', 'U_BRK_RULE_EMPTY_SET' => 'intl/intl.stub', 'U_BRK_RULE_SYNTAX' => 'intl/intl.stub', 'U_BRK_SEMICOLON_EXPECTED' => 'intl/intl.stub', 'U_BRK_UNCLOSED_SET' => 'intl/intl.stub', 'U_BRK_UNDEFINED_VARIABLE' => 'intl/intl.stub', 'U_BRK_UNRECOGNIZED_OPTION' => 'intl/intl.stub', 'U_BRK_VARIABLE_REDFINITION' => 'intl/intl.stub', 'U_BUFFER_OVERFLOW_ERROR' => 'intl/intl.stub', 'U_CE_NOT_FOUND_ERROR' => 'intl/intl.stub', 'U_COLLATOR_VERSION_MISMATCH' => 'intl/intl.stub', 'U_DIFFERENT_UCA_VERSION' => 'intl/intl.stub', 'U_ENUM_OUT_OF_SYNC_ERROR' => 'intl/intl.stub', 'U_ERROR_LIMIT' => 'intl/intl.stub', 'U_ERROR_WARNING_LIMIT' => 'intl/intl.stub', 'U_ERROR_WARNING_START' => 'intl/intl.stub', 'U_FILE_ACCESS_ERROR' => 'intl/intl.stub', 'U_FMT_PARSE_ERROR_LIMIT' => 'intl/intl.stub', 'U_FMT_PARSE_ERROR_START' => 'intl/intl.stub', 'U_IDNA_ACE_PREFIX_ERROR' => 'intl/intl.stub', 'U_IDNA_CHECK_BIDI_ERROR' => 'intl/intl.stub', 'U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR' => 'intl/intl.stub', 'U_IDNA_ERROR_LIMIT' => 'intl/intl.stub', 'U_IDNA_ERROR_START' => 'intl/intl.stub', 'U_IDNA_LABEL_TOO_LONG_ERROR' => 'intl/intl.stub', 'U_IDNA_PROHIBITED_ERROR' => 'intl/intl.stub', 'U_IDNA_STD3_ASCII_RULES_ERROR' => 'intl/intl.stub', 'U_IDNA_UNASSIGNED_ERROR' => 'intl/intl.stub', 'U_IDNA_VERIFICATION_ERROR' => 'intl/intl.stub', 'U_IDNA_ZERO_LENGTH_LABEL_ERROR' => 'intl/intl.stub', 'U_ILLEGAL_ARGUMENT_ERROR' => 'intl/intl.stub', 'U_ILLEGAL_CHARACTER' => 'intl/intl.stub', 'U_ILLEGAL_CHAR_FOUND' => 'intl/intl.stub', 'U_ILLEGAL_CHAR_IN_SEGMENT' => 'intl/intl.stub', 'U_ILLEGAL_ESCAPE_SEQUENCE' => 'intl/intl.stub', 'U_ILLEGAL_PAD_POSITION' => 'intl/intl.stub', 'U_INDEX_OUTOFBOUNDS_ERROR' => 'intl/intl.stub', 'U_INTERNAL_PROGRAM_ERROR' => 'intl/intl.stub', 'U_INTERNAL_TRANSLITERATOR_ERROR' => 'intl/intl.stub', 'U_INVALID_CHAR_FOUND' => 'intl/intl.stub', 'U_INVALID_FORMAT_ERROR' => 'intl/intl.stub', 'U_INVALID_FUNCTION' => 'intl/intl.stub', 'U_INVALID_ID' => 'intl/intl.stub', 'U_INVALID_PROPERTY_PATTERN' => 'intl/intl.stub', 'U_INVALID_RBT_SYNTAX' => 'intl/intl.stub', 'U_INVALID_STATE_ERROR' => 'intl/intl.stub', 'U_INVALID_TABLE_FILE' => 'intl/intl.stub', 'U_INVALID_TABLE_FORMAT' => 'intl/intl.stub', 'U_INVARIANT_CONVERSION_ERROR' => 'intl/intl.stub', 'U_MALFORMED_EXPONENTIAL_PATTERN' => 'intl/intl.stub', 'U_MALFORMED_PRAGMA' => 'intl/intl.stub', 'U_MALFORMED_RULE' => 'intl/intl.stub', 'U_MALFORMED_SET' => 'intl/intl.stub', 'U_MALFORMED_SYMBOL_REFERENCE' => 'intl/intl.stub', 'U_MALFORMED_UNICODE_ESCAPE' => 'intl/intl.stub', 'U_MALFORMED_VARIABLE_DEFINITION' => 'intl/intl.stub', 'U_MALFORMED_VARIABLE_REFERENCE' => 'intl/intl.stub', 'U_MEMORY_ALLOCATION_ERROR' => 'intl/intl.stub', 'U_MESSAGE_PARSE_ERROR' => 'intl/intl.stub', 'U_MISMATCHED_SEGMENT_DELIMITERS' => 'intl/intl.stub', 'U_MISPLACED_ANCHOR_START' => 'intl/intl.stub', 'U_MISPLACED_COMPOUND_FILTER' => 'intl/intl.stub', 'U_MISPLACED_CURSOR_OFFSET' => 'intl/intl.stub', 'U_MISPLACED_QUANTIFIER' => 'intl/intl.stub', 'U_MISSING_OPERATOR' => 'intl/intl.stub', 'U_MISSING_RESOURCE_ERROR' => 'intl/intl.stub', 'U_MISSING_SEGMENT_CLOSE' => 'intl/intl.stub', 'U_MULTIPLE_ANTE_CONTEXTS' => 'intl/intl.stub', 'U_MULTIPLE_COMPOUND_FILTERS' => 'intl/intl.stub', 'U_MULTIPLE_CURSORS' => 'intl/intl.stub', 'U_MULTIPLE_DECIMAL_SEPARATORS' => 'intl/intl.stub', 'U_MULTIPLE_DECIMAL_SEPERATORS' => 'intl/intl.stub', 'U_MULTIPLE_EXPONENTIAL_SYMBOLS' => 'intl/intl.stub', 'U_MULTIPLE_PAD_SPECIFIERS' => 'intl/intl.stub', 'U_MULTIPLE_PERCENT_SYMBOLS' => 'intl/intl.stub', 'U_MULTIPLE_PERMILL_SYMBOLS' => 'intl/intl.stub', 'U_MULTIPLE_POST_CONTEXTS' => 'intl/intl.stub', 'U_NO_SPACE_AVAILABLE' => 'intl/intl.stub', 'U_NO_WRITE_PERMISSION' => 'intl/intl.stub', 'U_PARSE_ERROR' => 'intl/intl.stub', 'U_PARSE_ERROR_LIMIT' => 'intl/intl.stub', 'U_PARSE_ERROR_START' => 'intl/intl.stub', 'U_PATTERN_SYNTAX_ERROR' => 'intl/intl.stub', 'U_PRIMARY_TOO_LONG_ERROR' => 'intl/intl.stub', 'U_REGEX_BAD_ESCAPE_SEQUENCE' => 'intl/intl.stub', 'U_REGEX_BAD_INTERVAL' => 'intl/intl.stub', 'U_REGEX_ERROR_LIMIT' => 'intl/intl.stub', 'U_REGEX_ERROR_START' => 'intl/intl.stub', 'U_REGEX_INTERNAL_ERROR' => 'intl/intl.stub', 'U_REGEX_INVALID_BACK_REF' => 'intl/intl.stub', 'U_REGEX_INVALID_FLAG' => 'intl/intl.stub', 'U_REGEX_INVALID_STATE' => 'intl/intl.stub', 'U_REGEX_LOOK_BEHIND_LIMIT' => 'intl/intl.stub', 'U_REGEX_MAX_LT_MIN' => 'intl/intl.stub', 'U_REGEX_MISMATCHED_PAREN' => 'intl/intl.stub', 'U_REGEX_NUMBER_TOO_BIG' => 'intl/intl.stub', 'U_REGEX_PROPERTY_SYNTAX' => 'intl/intl.stub', 'U_REGEX_RULE_SYNTAX' => 'intl/intl.stub', 'U_REGEX_SET_CONTAINS_STRING' => 'intl/intl.stub', 'U_REGEX_UNIMPLEMENTED' => 'intl/intl.stub', 'U_RESOURCE_TYPE_MISMATCH' => 'intl/intl.stub', 'U_RULE_MASK_ERROR' => 'intl/intl.stub', 'U_SAFECLONE_ALLOCATED_WARNING' => 'intl/intl.stub', 'U_SORT_KEY_TOO_SHORT_WARNING' => 'intl/intl.stub', 'U_STANDARD_ERROR_LIMIT' => 'intl/intl.stub', 'U_STATE_OLD_WARNING' => 'intl/intl.stub', 'U_STATE_TOO_OLD_ERROR' => 'intl/intl.stub', 'U_STRINGPREP_CHECK_BIDI_ERROR' => 'intl/intl.stub', 'U_STRINGPREP_PROHIBITED_ERROR' => 'intl/intl.stub', 'U_STRINGPREP_UNASSIGNED_ERROR' => 'intl/intl.stub', 'U_STRING_NOT_TERMINATED_WARNING' => 'intl/intl.stub', 'U_TOO_MANY_ALIASES_ERROR' => 'intl/intl.stub', 'U_TRAILING_BACKSLASH' => 'intl/intl.stub', 'U_TRUNCATED_CHAR_FOUND' => 'intl/intl.stub', 'U_UNCLOSED_SEGMENT' => 'intl/intl.stub', 'U_UNDEFINED_SEGMENT_REFERENCE' => 'intl/intl.stub', 'U_UNDEFINED_VARIABLE' => 'intl/intl.stub', 'U_UNEXPECTED_TOKEN' => 'intl/intl.stub', 'U_UNMATCHED_BRACES' => 'intl/intl.stub', 'U_UNQUOTED_SPECIAL' => 'intl/intl.stub', 'U_UNSUPPORTED_ATTRIBUTE' => 'intl/intl.stub', 'U_UNSUPPORTED_ERROR' => 'intl/intl.stub', 'U_UNSUPPORTED_ESCAPE_SEQUENCE' => 'intl/intl.stub', 'U_UNSUPPORTED_PROPERTY' => 'intl/intl.stub', 'U_UNTERMINATED_QUOTE' => 'intl/intl.stub', 'U_USELESS_COLLATOR_ERROR' => 'intl/intl.stub', 'U_USING_DEFAULT_WARNING' => 'intl/intl.stub', 'U_USING_FALLBACK_WARNING' => 'intl/intl.stub', 'U_VARIABLE_RANGE_EXHAUSTED' => 'intl/intl.stub', 'U_VARIABLE_RANGE_OVERLAP' => 'intl/intl.stub', 'U_ZERO_ERROR' => 'intl/intl.stub', 'VARCMP_EQ' => 'com_dotnet/com_dotnet.stub', 'VARCMP_GT' => 'com_dotnet/com_dotnet.stub', 'VARCMP_LT' => 'com_dotnet/com_dotnet.stub', 'VARCMP_NULL' => 'com_dotnet/com_dotnet.stub', 'VIR_CONNECT_FLAG_SOUNDHW_GET_NAMES' => 'libvirt-php/libvirt-php.stub', 'VIR_CONNECT_GET_ALL_DOMAINS_STATS_ACTIVE' => 'libvirt-php/libvirt-php.stub', 'VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS' => 'libvirt-php/libvirt-php.stub', 'VIR_CONNECT_GET_ALL_DOMAINS_STATS_INACTIVE' => 'libvirt-php/libvirt-php.stub', 'VIR_CONNECT_GET_ALL_DOMAINS_STATS_OTHER' => 'libvirt-php/libvirt-php.stub', 'VIR_CONNECT_GET_ALL_DOMAINS_STATS_PAUSED' => 'libvirt-php/libvirt-php.stub', 'VIR_CONNECT_GET_ALL_DOMAINS_STATS_PERSISTENT' => 'libvirt-php/libvirt-php.stub', 'VIR_CONNECT_GET_ALL_DOMAINS_STATS_RUNNING' => 'libvirt-php/libvirt-php.stub', 'VIR_CONNECT_GET_ALL_DOMAINS_STATS_SHUTOFF' => 'libvirt-php/libvirt-php.stub', 'VIR_CONNECT_GET_ALL_DOMAINS_STATS_TRANSIENT' => 'libvirt-php/libvirt-php.stub', 'VIR_CONNECT_LIST_NETWORKS_ACTIVE' => 'libvirt-php/libvirt-php.stub', 'VIR_CONNECT_LIST_NETWORKS_AUTOSTART' => 'libvirt-php/libvirt-php.stub', 'VIR_CONNECT_LIST_NETWORKS_INACTIVE' => 'libvirt-php/libvirt-php.stub', 'VIR_CONNECT_LIST_NETWORKS_NO_AUTOSTART' => 'libvirt-php/libvirt-php.stub', 'VIR_CONNECT_LIST_NETWORKS_PERSISTENT' => 'libvirt-php/libvirt-php.stub', 'VIR_CONNECT_LIST_NETWORKS_TRANSIENT' => 'libvirt-php/libvirt-php.stub', 'VIR_CRED_AUTHNAME' => 'libvirt-php/libvirt-php.stub', 'VIR_CRED_CNONCE' => 'libvirt-php/libvirt-php.stub', 'VIR_CRED_ECHOPROMPT' => 'libvirt-php/libvirt-php.stub', 'VIR_CRED_EXTERNAL' => 'libvirt-php/libvirt-php.stub', 'VIR_CRED_LANGUAGE' => 'libvirt-php/libvirt-php.stub', 'VIR_CRED_NOECHOPROMPT' => 'libvirt-php/libvirt-php.stub', 'VIR_CRED_PASSPHRASE' => 'libvirt-php/libvirt-php.stub', 'VIR_CRED_REALM' => 'libvirt-php/libvirt-php.stub', 'VIR_CRED_USERNAME' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_AFFECT_CONFIG' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_AFFECT_CURRENT' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_AFFECT_LIVE' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_BLOCKED' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_BLOCK_COMMIT_ACTIVE' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_BLOCK_COMMIT_BANDWIDTH_BYTES' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_BLOCK_COMMIT_DELETE' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_BLOCK_COMMIT_RELATIVE' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_BLOCK_COMMIT_SHALLOW' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_BLOCK_COPY_REUSE_EXT' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_BLOCK_COPY_SHALLOW' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_BLOCK_JOB_ABORT_ASYNC' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_BLOCK_JOB_ABORT_PIVOT' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_BLOCK_JOB_INFO_BANDWIDTH_BYTES' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_BLOCK_JOB_SPEED_BANDWIDTH_BYTES' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMIT' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_BLOCK_JOB_TYPE_COMMIT' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_BLOCK_JOB_TYPE_COPY' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_BLOCK_JOB_TYPE_PULL' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_BLOCK_JOB_TYPE_UNKNOWN' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_BLOCK_PULL_BANDWIDTH_BYTES' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_BLOCK_REBASE_BANDWIDTH_BYTES' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_BLOCK_REBASE_COPY' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_BLOCK_REBASE_COPY_DEV' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_BLOCK_REBASE_COPY_RAW' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_BLOCK_REBASE_RELATIVE' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_BLOCK_REBASE_REUSE_EXT' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_BLOCK_REBASE_SHALLOW' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_BLOCK_RESIZE_BYTES' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_CRASHED' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_DEVICE_MODIFY_CONFIG' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_DEVICE_MODIFY_CURRENT' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_DEVICE_MODIFY_FORCE' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_DEVICE_MODIFY_LIVE' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_DISK_ACCESS_ALL' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_DISK_BLOCK' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_DISK_FILE' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_FLAG_CLOCK_LOCALTIME' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_FLAG_FEATURE_ACPI' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_FLAG_FEATURE_APIC' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_FLAG_FEATURE_PAE' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_FLAG_SOUND_AC97' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_FLAG_TEST_LOCAL_VNC' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_AGENT' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_LEASE' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_JOB_BOUNDED' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_JOB_CANCELLED' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_JOB_COMPLETED' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_JOB_FAILED' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_JOB_NONE' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_JOB_UNBOUNDED' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_MEMORY_STAT_AVAILABLE' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_MEMORY_STAT_MAJOR_FAULT' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_MEMORY_STAT_MINOR_FAULT' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_MEMORY_STAT_NR' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_MEMORY_STAT_RSS' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_MEMORY_STAT_SWAP_IN' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_MEMORY_STAT_SWAP_OUT' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_MEMORY_STAT_UNUSED' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_MEM_CONFIG' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_MEM_CURRENT' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_MEM_LIVE' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_MEM_MAXIMUM' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_METADATA_DESCRIPTION' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_METADATA_ELEMENT' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_METADATA_TITLE' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_NONE' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_NOSTATE' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_PAUSED' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_PMSUSPENDED' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_RUNNING' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_SHUTDOWN' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_SHUTOFF' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_START_AUTODESTROY' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_START_BYPASS_CACHE' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_START_FORCE_BOOT' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_START_PAUSED' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_START_VALIDATE' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_STATS_BALLOON' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_STATS_BLOCK' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_STATS_CPU_TOTAL' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_STATS_INTERFACE' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_STATS_STATE' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_STATS_VCPU' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_UNDEFINE_KEEP_NVRAM' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_UNDEFINE_MANAGED_SAVE' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_UNDEFINE_NVRAM' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_VCPU_CONFIG' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_VCPU_CURRENT' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_VCPU_GUEST' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_VCPU_LIVE' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_VCPU_MAXIMUM' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_XML_INACTIVE' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_XML_MIGRATABLE' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_XML_SECURE' => 'libvirt-php/libvirt-php.stub', 'VIR_DOMAIN_XML_UPDATE_CPU' => 'libvirt-php/libvirt-php.stub', 'VIR_KEYCODE_SET_ATSET1' => 'libvirt-php/libvirt-php.stub', 'VIR_KEYCODE_SET_ATSET2' => 'libvirt-php/libvirt-php.stub', 'VIR_KEYCODE_SET_ATSET3' => 'libvirt-php/libvirt-php.stub', 'VIR_KEYCODE_SET_LINUX' => 'libvirt-php/libvirt-php.stub', 'VIR_KEYCODE_SET_OSX' => 'libvirt-php/libvirt-php.stub', 'VIR_KEYCODE_SET_RFB' => 'libvirt-php/libvirt-php.stub', 'VIR_KEYCODE_SET_USB' => 'libvirt-php/libvirt-php.stub', 'VIR_KEYCODE_SET_WIN32' => 'libvirt-php/libvirt-php.stub', 'VIR_KEYCODE_SET_XT' => 'libvirt-php/libvirt-php.stub', 'VIR_KEYCODE_SET_XT_KBD' => 'libvirt-php/libvirt-php.stub', 'VIR_MEMORY_PHYSICAL' => 'libvirt-php/libvirt-php.stub', 'VIR_MEMORY_VIRTUAL' => 'libvirt-php/libvirt-php.stub', 'VIR_MIGRATE_ABORT_ON_ERROR' => 'libvirt-php/libvirt-php.stub', 'VIR_MIGRATE_AUTO_CONVERGE' => 'libvirt-php/libvirt-php.stub', 'VIR_MIGRATE_CHANGE_PROTECTION' => 'libvirt-php/libvirt-php.stub', 'VIR_MIGRATE_COMPRESSED' => 'libvirt-php/libvirt-php.stub', 'VIR_MIGRATE_LIVE' => 'libvirt-php/libvirt-php.stub', 'VIR_MIGRATE_NON_SHARED_DISK' => 'libvirt-php/libvirt-php.stub', 'VIR_MIGRATE_NON_SHARED_INC' => 'libvirt-php/libvirt-php.stub', 'VIR_MIGRATE_OFFLINE' => 'libvirt-php/libvirt-php.stub', 'VIR_MIGRATE_PAUSED' => 'libvirt-php/libvirt-php.stub', 'VIR_MIGRATE_PEER2PEER' => 'libvirt-php/libvirt-php.stub', 'VIR_MIGRATE_PERSIST_DEST' => 'libvirt-php/libvirt-php.stub', 'VIR_MIGRATE_TUNNELLED' => 'libvirt-php/libvirt-php.stub', 'VIR_MIGRATE_UNDEFINE_SOURCE' => 'libvirt-php/libvirt-php.stub', 'VIR_MIGRATE_UNSAFE' => 'libvirt-php/libvirt-php.stub', 'VIR_NETWORKS_ACTIVE' => 'libvirt-php/libvirt-php.stub', 'VIR_NETWORKS_ALL' => 'libvirt-php/libvirt-php.stub', 'VIR_NETWORKS_INACTIVE' => 'libvirt-php/libvirt-php.stub', 'VIR_NODE_CPU_STATS_ALL_CPUS' => 'libvirt-php/libvirt-php.stub', 'VIR_SNAPSHOT_CREATE_ATOMIC' => 'libvirt-php/libvirt-php.stub', 'VIR_SNAPSHOT_CREATE_CURRENT' => 'libvirt-php/libvirt-php.stub', 'VIR_SNAPSHOT_CREATE_DISK_ONLY' => 'libvirt-php/libvirt-php.stub', 'VIR_SNAPSHOT_CREATE_HALT' => 'libvirt-php/libvirt-php.stub', 'VIR_SNAPSHOT_CREATE_LIVE' => 'libvirt-php/libvirt-php.stub', 'VIR_SNAPSHOT_CREATE_NO_METADATA' => 'libvirt-php/libvirt-php.stub', 'VIR_SNAPSHOT_CREATE_QUIESCE' => 'libvirt-php/libvirt-php.stub', 'VIR_SNAPSHOT_CREATE_REDEFINE' => 'libvirt-php/libvirt-php.stub', 'VIR_SNAPSHOT_CREATE_REUSE_EXT' => 'libvirt-php/libvirt-php.stub', 'VIR_SNAPSHOT_DELETE_CHILDREN' => 'libvirt-php/libvirt-php.stub', 'VIR_SNAPSHOT_DELETE_CHILDREN_ONLY' => 'libvirt-php/libvirt-php.stub', 'VIR_SNAPSHOT_DELETE_METADATA_ONLY' => 'libvirt-php/libvirt-php.stub', 'VIR_SNAPSHOT_LIST_ACTIVE' => 'libvirt-php/libvirt-php.stub', 'VIR_SNAPSHOT_LIST_DESCENDANTS' => 'libvirt-php/libvirt-php.stub', 'VIR_SNAPSHOT_LIST_DISK_ONLY' => 'libvirt-php/libvirt-php.stub', 'VIR_SNAPSHOT_LIST_EXTERNAL' => 'libvirt-php/libvirt-php.stub', 'VIR_SNAPSHOT_LIST_INACTIVE' => 'libvirt-php/libvirt-php.stub', 'VIR_SNAPSHOT_LIST_INTERNAL' => 'libvirt-php/libvirt-php.stub', 'VIR_SNAPSHOT_LIST_LEAVES' => 'libvirt-php/libvirt-php.stub', 'VIR_SNAPSHOT_LIST_METADATA' => 'libvirt-php/libvirt-php.stub', 'VIR_SNAPSHOT_LIST_NO_LEAVES' => 'libvirt-php/libvirt-php.stub', 'VIR_SNAPSHOT_LIST_NO_METADATA' => 'libvirt-php/libvirt-php.stub', 'VIR_SNAPSHOT_LIST_ROOTS' => 'libvirt-php/libvirt-php.stub', 'VIR_SNAPSHOT_REVERT_FORCE' => 'libvirt-php/libvirt-php.stub', 'VIR_SNAPSHOT_REVERT_PAUSED' => 'libvirt-php/libvirt-php.stub', 'VIR_SNAPSHOT_REVERT_RUNNING' => 'libvirt-php/libvirt-php.stub', 'VIR_STORAGE_POOL_BUILD_NEW' => 'libvirt-php/libvirt-php.stub', 'VIR_STORAGE_POOL_BUILD_REPAIR' => 'libvirt-php/libvirt-php.stub', 'VIR_STORAGE_POOL_BUILD_RESIZE' => 'libvirt-php/libvirt-php.stub', 'VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA' => 'libvirt-php/libvirt-php.stub', 'VIR_STORAGE_VOL_CREATE_REFLINK' => 'libvirt-php/libvirt-php.stub', 'VIR_STORAGE_VOL_RESIZE_ALLOCATE' => 'libvirt-php/libvirt-php.stub', 'VIR_STORAGE_VOL_RESIZE_DELTA' => 'libvirt-php/libvirt-php.stub', 'VIR_STORAGE_VOL_RESIZE_SHRINK' => 'libvirt-php/libvirt-php.stub', 'VIR_VERSION_BINDING' => 'libvirt-php/libvirt-php.stub', 'VIR_VERSION_LIBVIRT' => 'libvirt-php/libvirt-php.stub', 'VT_ARRAY' => 'com_dotnet/com_dotnet.stub', 'VT_BOOL' => 'com_dotnet/com_dotnet.stub', 'VT_BSTR' => 'com_dotnet/com_dotnet.stub', 'VT_BYREF' => 'com_dotnet/com_dotnet.stub', 'VT_CY' => 'com_dotnet/com_dotnet.stub', 'VT_DATE' => 'com_dotnet/com_dotnet.stub', 'VT_DECIMAL' => 'com_dotnet/com_dotnet.stub', 'VT_DISPATCH' => 'com_dotnet/com_dotnet.stub', 'VT_EMPTY' => 'com_dotnet/com_dotnet.stub', 'VT_ERROR' => 'com_dotnet/com_dotnet.stub', 'VT_I1' => 'com_dotnet/com_dotnet.stub', 'VT_I2' => 'com_dotnet/com_dotnet.stub', 'VT_I4' => 'com_dotnet/com_dotnet.stub', 'VT_INT' => 'com_dotnet/com_dotnet.stub', 'VT_NULL' => 'com_dotnet/com_dotnet.stub', 'VT_R4' => 'com_dotnet/com_dotnet.stub', 'VT_R8' => 'com_dotnet/com_dotnet.stub', 'VT_UI1' => 'com_dotnet/com_dotnet.stub', 'VT_UI2' => 'com_dotnet/com_dotnet.stub', 'VT_UI4' => 'com_dotnet/com_dotnet.stub', 'VT_UINT' => 'com_dotnet/com_dotnet.stub', 'VT_UNKNOWN' => 'com_dotnet/com_dotnet.stub', 'VT_VARIANT' => 'com_dotnet/com_dotnet.stub', 'WBC_ALT' => 'winbinder/winbinder.stub', 'WBC_AUTOREPEAT' => 'winbinder/winbinder.stub', 'WBC_BEEP' => 'winbinder/winbinder.stub', 'WBC_BORDER' => 'winbinder/winbinder.stub', 'WBC_BOTTOM' => 'winbinder/winbinder.stub', 'WBC_CENTER' => 'winbinder/winbinder.stub', 'WBC_CHECKBOXES' => 'winbinder/winbinder.stub', 'WBC_CONTROL' => 'winbinder/winbinder.stub', 'WBC_CUSTOMDRAW' => 'winbinder/winbinder.stub', 'WBC_DBLCLICK' => 'winbinder/winbinder.stub', 'WBC_DEFAULT' => 'winbinder/winbinder.stub', 'WBC_DEFAULTPOS' => 'winbinder/winbinder.stub', 'WBC_DISABLED' => 'winbinder/winbinder.stub', 'WBC_ELLIPSIS' => 'winbinder/winbinder.stub', 'WBC_ENABLED' => 'winbinder/winbinder.stub', 'WBC_GETFOCUS' => 'winbinder/winbinder.stub', 'WBC_GROUP' => 'winbinder/winbinder.stub', 'WBC_HEADERSEL' => 'winbinder/winbinder.stub', 'WBC_IMAGE' => 'winbinder/winbinder.stub', 'WBC_INFO' => 'winbinder/winbinder.stub', 'WBC_INVISIBLE' => 'winbinder/winbinder.stub', 'WBC_KEYDOWN' => 'winbinder/winbinder.stub', 'WBC_KEYUP' => 'winbinder/winbinder.stub', 'WBC_LBUTTON' => 'winbinder/winbinder.stub', 'WBC_LEFT' => 'winbinder/winbinder.stub', 'WBC_LINES' => 'winbinder/winbinder.stub', 'WBC_LV_BACK' => 'winbinder/winbinder.stub', 'WBC_LV_COLUMNS' => 'winbinder/winbinder.stub', 'WBC_LV_DEFAULT' => 'winbinder/winbinder.stub', 'WBC_LV_DRAW' => 'winbinder/winbinder.stub', 'WBC_LV_FORE' => 'winbinder/winbinder.stub', 'WBC_LV_NONE' => 'winbinder/winbinder.stub', 'WBC_MASKED' => 'winbinder/winbinder.stub', 'WBC_MAXIMIZED' => 'winbinder/winbinder.stub', 'WBC_MAXSIZE' => 'winbinder/winbinder.stub', 'WBC_MBUTTON' => 'winbinder/winbinder.stub', 'WBC_MIDDLE' => 'winbinder/winbinder.stub', 'WBC_MINIMIZED' => 'winbinder/winbinder.stub', 'WBC_MINSIZE' => 'winbinder/winbinder.stub', 'WBC_MOUSEDOWN' => 'winbinder/winbinder.stub', 'WBC_MOUSEMOVE' => 'winbinder/winbinder.stub', 'WBC_MOUSEUP' => 'winbinder/winbinder.stub', 'WBC_MULTILINE' => 'winbinder/winbinder.stub', 'WBC_MULTISELECT' => 'winbinder/winbinder.stub', 'WBC_NOHEADER' => 'winbinder/winbinder.stub', 'WBC_NORMAL' => 'winbinder/winbinder.stub', 'WBC_NOTIFY' => 'winbinder/winbinder.stub', 'WBC_NUMBER' => 'winbinder/winbinder.stub', 'WBC_OK' => 'winbinder/winbinder.stub', 'WBC_OKCANCEL' => 'winbinder/winbinder.stub', 'WBC_QUESTION' => 'winbinder/winbinder.stub', 'WBC_RBUTTON' => 'winbinder/winbinder.stub', 'WBC_READONLY' => 'winbinder/winbinder.stub', 'WBC_REDRAW' => 'winbinder/winbinder.stub', 'WBC_RESIZE' => 'winbinder/winbinder.stub', 'WBC_RIGHT' => 'winbinder/winbinder.stub', 'WBC_RTF_TEXT' => 'winbinder/winbinder.stub', 'WBC_SHIFT' => 'winbinder/winbinder.stub', 'WBC_SINGLE' => 'winbinder/winbinder.stub', 'WBC_SORT' => 'winbinder/winbinder.stub', 'WBC_STOP' => 'winbinder/winbinder.stub', 'WBC_TASKBAR' => 'winbinder/winbinder.stub', 'WBC_TITLE' => 'winbinder/winbinder.stub', 'WBC_TOP' => 'winbinder/winbinder.stub', 'WBC_TRANSPARENT' => 'winbinder/winbinder.stub', 'WBC_VERSION' => 'winbinder/winbinder.stub', 'WBC_VISIBLE' => 'winbinder/winbinder.stub', 'WBC_WARNING' => 'winbinder/winbinder.stub', 'WBC_YESNO' => 'winbinder/winbinder.stub', 'WBC_YESNOCANCEL' => 'winbinder/winbinder.stub', 'WCONTINUED' => 'pcntl/pcntl.stub', 'WEBSOCKET_CLOSE_ABNORMAL' => 'swoole/constants.stub', 'WEBSOCKET_CLOSE_DATA_ERROR' => 'swoole/constants.stub', 'WEBSOCKET_CLOSE_EXTENSION_MISSING' => 'swoole/constants.stub', 'WEBSOCKET_CLOSE_GOING_AWAY' => 'swoole/constants.stub', 'WEBSOCKET_CLOSE_MESSAGE_ERROR' => 'swoole/constants.stub', 'WEBSOCKET_CLOSE_MESSAGE_TOO_BIG' => 'swoole/constants.stub', 'WEBSOCKET_CLOSE_NORMAL' => 'swoole/constants.stub', 'WEBSOCKET_CLOSE_POLICY_ERROR' => 'swoole/constants.stub', 'WEBSOCKET_CLOSE_PROTOCOL_ERROR' => 'swoole/constants.stub', 'WEBSOCKET_CLOSE_SERVER_ERROR' => 'swoole/constants.stub', 'WEBSOCKET_CLOSE_STATUS_ERROR' => 'swoole/constants.stub', 'WEBSOCKET_CLOSE_TLS' => 'swoole/constants.stub', 'WEBSOCKET_OPCODE_BINARY' => 'swoole/constants.stub', 'WEBSOCKET_OPCODE_CLOSE' => 'swoole/constants.stub', 'WEBSOCKET_OPCODE_CONTINUATION' => 'swoole/constants.stub', 'WEBSOCKET_OPCODE_PING' => 'swoole/constants.stub', 'WEBSOCKET_OPCODE_PONG' => 'swoole/constants.stub', 'WEBSOCKET_OPCODE_TEXT' => 'swoole/constants.stub', 'WEBSOCKET_STATUS_ACTIVE' => 'swoole/constants.stub', 'WEBSOCKET_STATUS_CLOSING' => 'swoole/constants.stub', 'WEBSOCKET_STATUS_CONNECTION' => 'swoole/constants.stub', 'WEBSOCKET_STATUS_FRAME' => 'swoole/constants.stub', 'WEBSOCKET_STATUS_HANDSHAKE' => 'swoole/constants.stub', 'WHITE' => 'winbinder/winbinder.stub', 'WIN32_ABOVE_NORMAL_PRIORITY_CLASS' => 'win32service/win32service.stub', 'WIN32_BELOW_NORMAL_PRIORITY_CLASS' => 'win32service/win32service.stub', 'WIN32_ERROR_ACCESS_DENIED' => 'win32service/win32service.stub', 'WIN32_ERROR_CIRCULAR_DEPENDENCY' => 'win32service/win32service.stub', 'WIN32_ERROR_DATABASE_DOES_NOT_EXIST' => 'win32service/win32service.stub', 'WIN32_ERROR_DEPENDENT_SERVICES_RUNNING' => 'win32service/win32service.stub', 'WIN32_ERROR_DUPLICATE_SERVICE_NAME' => 'win32service/win32service.stub', 'WIN32_ERROR_FAILED_SERVICE_CONTROLLER_CONNECT' => 'win32service/win32service.stub', 'WIN32_ERROR_INSUFFICIENT_BUFFER' => 'win32service/win32service.stub', 'WIN32_ERROR_INVALID_DATA' => 'win32service/win32service.stub', 'WIN32_ERROR_INVALID_HANDLE' => 'win32service/win32service.stub', 'WIN32_ERROR_INVALID_LEVEL' => 'win32service/win32service.stub', 'WIN32_ERROR_INVALID_NAME' => 'win32service/win32service.stub', 'WIN32_ERROR_INVALID_PARAMETER' => 'win32service/win32service.stub', 'WIN32_ERROR_INVALID_SERVICE_ACCOUNT' => 'win32service/win32service.stub', 'WIN32_ERROR_INVALID_SERVICE_CONTROL' => 'win32service/win32service.stub', 'WIN32_ERROR_PATH_NOT_FOUND' => 'win32service/win32service.stub', 'WIN32_ERROR_SERVICE_ALREADY_RUNNING' => 'win32service/win32service.stub', 'WIN32_ERROR_SERVICE_CANNOT_ACCEPT_CTRL' => 'win32service/win32service.stub', 'WIN32_ERROR_SERVICE_DATABASE_LOCKED' => 'win32service/win32service.stub', 'WIN32_ERROR_SERVICE_DEPENDENCY_DELETED' => 'win32service/win32service.stub', 'WIN32_ERROR_SERVICE_DEPENDENCY_FAIL' => 'win32service/win32service.stub', 'WIN32_ERROR_SERVICE_DISABLED' => 'win32service/win32service.stub', 'WIN32_ERROR_SERVICE_DOES_NOT_EXIST' => 'win32service/win32service.stub', 'WIN32_ERROR_SERVICE_EXISTS' => 'win32service/win32service.stub', 'WIN32_ERROR_SERVICE_LOGON_FAILED' => 'win32service/win32service.stub', 'WIN32_ERROR_SERVICE_MARKED_FOR_DELETE' => 'win32service/win32service.stub', 'WIN32_ERROR_SERVICE_NOT_ACTIVE' => 'win32service/win32service.stub', 'WIN32_ERROR_SERVICE_NO_THREAD' => 'win32service/win32service.stub', 'WIN32_ERROR_SERVICE_REQUEST_TIMEOUT' => 'win32service/win32service.stub', 'WIN32_ERROR_SHUTDOWN_IN_PROGRESS' => 'win32service/win32service.stub', 'WIN32_HIGH_PRIORITY_CLASS' => 'win32service/win32service.stub', 'WIN32_IDLE_PRIORITY_CLASS' => 'win32service/win32service.stub', 'WIN32_NORMAL_PRIORITY_CLASS' => 'win32service/win32service.stub', 'WIN32_NO_ERROR' => 'win32service/win32service.stub', 'WIN32_REALTIME_PRIORITY_CLASS' => 'win32service/win32service.stub', 'WIN32_SERVICE_ACCEPT_PAUSE_CONTINUE' => 'win32service/win32service.stub', 'WIN32_SERVICE_ACCEPT_PRESHUTDOWN' => 'win32service/win32service.stub', 'WIN32_SERVICE_ACCEPT_SHUTDOWN' => 'win32service/win32service.stub', 'WIN32_SERVICE_ACCEPT_STOP' => 'win32service/win32service.stub', 'WIN32_SERVICE_AUTO_START' => 'win32service/win32service.stub', 'WIN32_SERVICE_CONTINUE_PENDING' => 'win32service/win32service.stub', 'WIN32_SERVICE_CONTROL_CONTINUE' => 'win32service/win32service.stub', 'WIN32_SERVICE_CONTROL_INTERROGATE' => 'win32service/win32service.stub', 'WIN32_SERVICE_CONTROL_PAUSE' => 'win32service/win32service.stub', 'WIN32_SERVICE_CONTROL_PRESHUTDOWN' => 'win32service/win32service.stub', 'WIN32_SERVICE_CONTROL_SHUTDOWN' => 'win32service/win32service.stub', 'WIN32_SERVICE_CONTROL_STOP' => 'win32service/win32service.stub', 'WIN32_SERVICE_DEMAND_START' => 'win32service/win32service.stub', 'WIN32_SERVICE_DISABLED' => 'win32service/win32service.stub', 'WIN32_SERVICE_ERROR_IGNORE' => 'win32service/win32service.stub', 'WIN32_SERVICE_ERROR_NORMAL' => 'win32service/win32service.stub', 'WIN32_SERVICE_INTERACTIVE_PROCESS' => 'win32service/win32service.stub', 'WIN32_SERVICE_PAUSED' => 'win32service/win32service.stub', 'WIN32_SERVICE_PAUSE_PENDING' => 'win32service/win32service.stub', 'WIN32_SERVICE_RUNNING' => 'win32service/win32service.stub', 'WIN32_SERVICE_RUNS_IN_SYSTEM_PROCESS' => 'win32service/win32service.stub', 'WIN32_SERVICE_START_PENDING' => 'win32service/win32service.stub', 'WIN32_SERVICE_STOPPED' => 'win32service/win32service.stub', 'WIN32_SERVICE_STOP_PENDING' => 'win32service/win32service.stub', 'WIN32_SERVICE_WIN32_OWN_PROCESS' => 'win32service/win32service.stub', 'WIN32_SERVICE_WIN32_OWN_PROCESS_INTERACTIVE' => 'win32service/win32service.stub', 'WNOHANG' => 'pcntl/pcntl.stub', 'WSDL_CACHE_BOTH' => 'soap/soap.stub', 'WSDL_CACHE_DISK' => 'soap/soap.stub', 'WSDL_CACHE_MEMORY' => 'soap/soap.stub', 'WSDL_CACHE_NONE' => 'soap/soap.stub', 'WUNTRACED' => 'pcntl/pcntl.stub', 'X509_PURPOSE_ANY' => 'openssl/openssl.stub', 'X509_PURPOSE_CRL_SIGN' => 'openssl/openssl.stub', 'X509_PURPOSE_NS_SSL_SERVER' => 'openssl/openssl.stub', 'X509_PURPOSE_SMIME_ENCRYPT' => 'openssl/openssl.stub', 'X509_PURPOSE_SMIME_SIGN' => 'openssl/openssl.stub', 'X509_PURPOSE_SSL_CLIENT' => 'openssl/openssl.stub', 'X509_PURPOSE_SSL_SERVER' => 'openssl/openssl.stub', 'XDEBUG_CC_BRANCH_CHECK' => 'xdebug/xdebug.stub', 'XDEBUG_CC_DEAD_CODE' => 'xdebug/xdebug.stub', 'XDEBUG_CC_UNUSED' => 'xdebug/xdebug.stub', 'XDEBUG_FILTER_CODE_COVERAGE' => 'xdebug/xdebug.stub', 'XDEBUG_FILTER_NONE' => 'xdebug/xdebug.stub', 'XDEBUG_FILTER_STACK' => 'xdebug/xdebug.stub', 'XDEBUG_FILTER_TRACING' => 'xdebug/xdebug.stub', 'XDEBUG_NAMESPACE_BLACKLIST' => 'xdebug/xdebug.stub', 'XDEBUG_NAMESPACE_EXCLUDE' => 'xdebug/xdebug.stub', 'XDEBUG_NAMESPACE_INCLUDE' => 'xdebug/xdebug.stub', 'XDEBUG_NAMESPACE_WHITELIST' => 'xdebug/xdebug.stub', 'XDEBUG_PATH_BLACKLIST' => 'xdebug/xdebug.stub', 'XDEBUG_PATH_EXCLUDE' => 'xdebug/xdebug.stub', 'XDEBUG_PATH_INCLUDE' => 'xdebug/xdebug.stub', 'XDEBUG_PATH_WHITELIST' => 'xdebug/xdebug.stub', 'XDEBUG_STACK_NO_DESC' => 'xdebug/xdebug.stub', 'XDEBUG_TRACE_APPEND' => 'xdebug/xdebug.stub', 'XDEBUG_TRACE_COMPUTERIZED' => 'xdebug/xdebug.stub', 'XDEBUG_TRACE_HTML' => 'xdebug/xdebug.stub', 'XDEBUG_TRACE_NAKED_FILENAME' => 'xdebug/xdebug.stub', 'XDIFF_PATCH_IGNORESPACE' => 'xdiff/xdiff.stub', 'XDIFF_PATCH_NORMAL' => 'xdiff/xdiff.stub', 'XDIFF_PATCH_REVERSE' => 'xdiff/xdiff.stub', 'XHPROF_FLAGS_CPU' => 'xhprof/xhprof.stub', 'XHPROF_FLAGS_MEMORY' => 'xhprof/xhprof.stub', 'XHPROF_FLAGS_NO_BUILTINS' => 'xhprof/xhprof.stub', 'XML_ATTRIBUTE_CDATA' => 'dom/dom.stub', 'XML_ATTRIBUTE_DECL_NODE' => 'dom/dom.stub', 'XML_ATTRIBUTE_ENTITY' => 'dom/dom.stub', 'XML_ATTRIBUTE_ENUMERATION' => 'dom/dom.stub', 'XML_ATTRIBUTE_ID' => 'dom/dom.stub', 'XML_ATTRIBUTE_IDREF' => 'dom/dom.stub', 'XML_ATTRIBUTE_IDREFS' => 'dom/dom.stub', 'XML_ATTRIBUTE_NMTOKEN' => 'dom/dom.stub', 'XML_ATTRIBUTE_NMTOKENS' => 'dom/dom.stub', 'XML_ATTRIBUTE_NODE' => 'dom/dom.stub', 'XML_ATTRIBUTE_NOTATION' => 'dom/dom.stub', 'XML_CDATA_SECTION_NODE' => 'dom/dom.stub', 'XML_COMMENT_NODE' => 'dom/dom.stub', 'XML_DOCUMENT_FRAG_NODE' => 'dom/dom.stub', 'XML_DOCUMENT_NODE' => 'dom/dom.stub', 'XML_DOCUMENT_TYPE_NODE' => 'dom/dom.stub', 'XML_DTD_NODE' => 'dom/dom.stub', 'XML_ELEMENT_DECL_NODE' => 'dom/dom.stub', 'XML_ELEMENT_NODE' => 'dom/dom.stub', 'XML_ENTITY_DECL_NODE' => 'dom/dom.stub', 'XML_ENTITY_NODE' => 'dom/dom.stub', 'XML_ENTITY_REF_NODE' => 'dom/dom.stub', 'XML_ERROR_ASYNC_ENTITY' => 'xml/xml.stub', 'XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF' => 'xml/xml.stub', 'XML_ERROR_BAD_CHAR_REF' => 'xml/xml.stub', 'XML_ERROR_BINARY_ENTITY_REF' => 'xml/xml.stub', 'XML_ERROR_DUPLICATE_ATTRIBUTE' => 'xml/xml.stub', 'XML_ERROR_EXTERNAL_ENTITY_HANDLING' => 'xml/xml.stub', 'XML_ERROR_INCORRECT_ENCODING' => 'xml/xml.stub', 'XML_ERROR_INVALID_TOKEN' => 'xml/xml.stub', 'XML_ERROR_JUNK_AFTER_DOC_ELEMENT' => 'xml/xml.stub', 'XML_ERROR_MISPLACED_XML_PI' => 'xml/xml.stub', 'XML_ERROR_NONE' => 'xml/xml.stub', 'XML_ERROR_NO_ELEMENTS' => 'xml/xml.stub', 'XML_ERROR_NO_MEMORY' => 'xml/xml.stub', 'XML_ERROR_PARAM_ENTITY_REF' => 'xml/xml.stub', 'XML_ERROR_PARTIAL_CHAR' => 'xml/xml.stub', 'XML_ERROR_RECURSIVE_ENTITY_REF' => 'xml/xml.stub', 'XML_ERROR_SYNTAX' => 'xml/xml.stub', 'XML_ERROR_TAG_MISMATCH' => 'xml/xml.stub', 'XML_ERROR_UNCLOSED_CDATA_SECTION' => 'xml/xml.stub', 'XML_ERROR_UNCLOSED_TOKEN' => 'xml/xml.stub', 'XML_ERROR_UNDEFINED_ENTITY' => 'xml/xml.stub', 'XML_ERROR_UNKNOWN_ENCODING' => 'xml/xml.stub', 'XML_HTML_DOCUMENT_NODE' => 'dom/dom.stub', 'XML_LOCAL_NAMESPACE' => 'dom/dom.stub', 'XML_NAMESPACE_DECL_NODE' => 'dom/dom.stub', 'XML_NOTATION_NODE' => 'dom/dom.stub', 'XML_OPTION_CASE_FOLDING' => 'xml/xml.stub', 'XML_OPTION_SKIP_TAGSTART' => 'xml/xml.stub', 'XML_OPTION_SKIP_WHITE' => 'xml/xml.stub', 'XML_OPTION_TARGET_ENCODING' => 'xml/xml.stub', 'XML_PI_NODE' => 'dom/dom.stub', 'XML_SAX_IMPL' => 'xml/xml.stub', 'XML_TEXT_NODE' => 'dom/dom.stub', 'XSD_1999_NAMESPACE' => 'soap/soap.stub', 'XSD_1999_TIMEINSTANT' => 'soap/soap.stub', 'XSD_ANYTYPE' => 'soap/soap.stub', 'XSD_ANYURI' => 'soap/soap.stub', 'XSD_ANYXML' => 'soap/soap.stub', 'XSD_BASE64BINARY' => 'soap/soap.stub', 'XSD_BOOLEAN' => 'soap/soap.stub', 'XSD_BYTE' => 'soap/soap.stub', 'XSD_DATE' => 'soap/soap.stub', 'XSD_DATETIME' => 'soap/soap.stub', 'XSD_DECIMAL' => 'soap/soap.stub', 'XSD_DOUBLE' => 'soap/soap.stub', 'XSD_DURATION' => 'soap/soap.stub', 'XSD_ENTITIES' => 'soap/soap.stub', 'XSD_ENTITY' => 'soap/soap.stub', 'XSD_FLOAT' => 'soap/soap.stub', 'XSD_GDAY' => 'soap/soap.stub', 'XSD_GMONTH' => 'soap/soap.stub', 'XSD_GMONTHDAY' => 'soap/soap.stub', 'XSD_GYEAR' => 'soap/soap.stub', 'XSD_GYEARMONTH' => 'soap/soap.stub', 'XSD_HEXBINARY' => 'soap/soap.stub', 'XSD_ID' => 'soap/soap.stub', 'XSD_IDREF' => 'soap/soap.stub', 'XSD_IDREFS' => 'soap/soap.stub', 'XSD_INT' => 'soap/soap.stub', 'XSD_INTEGER' => 'soap/soap.stub', 'XSD_LANGUAGE' => 'soap/soap.stub', 'XSD_LONG' => 'soap/soap.stub', 'XSD_NAME' => 'soap/soap.stub', 'XSD_NAMESPACE' => 'soap/soap.stub', 'XSD_NCNAME' => 'soap/soap.stub', 'XSD_NEGATIVEINTEGER' => 'soap/soap.stub', 'XSD_NMTOKEN' => 'soap/soap.stub', 'XSD_NMTOKENS' => 'soap/soap.stub', 'XSD_NONNEGATIVEINTEGER' => 'soap/soap.stub', 'XSD_NONPOSITIVEINTEGER' => 'soap/soap.stub', 'XSD_NORMALIZEDSTRING' => 'soap/soap.stub', 'XSD_NOTATION' => 'soap/soap.stub', 'XSD_POSITIVEINTEGER' => 'soap/soap.stub', 'XSD_QNAME' => 'soap/soap.stub', 'XSD_SHORT' => 'soap/soap.stub', 'XSD_STRING' => 'soap/soap.stub', 'XSD_TIME' => 'soap/soap.stub', 'XSD_TOKEN' => 'soap/soap.stub', 'XSD_UNSIGNEDBYTE' => 'soap/soap.stub', 'XSD_UNSIGNEDINT' => 'soap/soap.stub', 'XSD_UNSIGNEDLONG' => 'soap/soap.stub', 'XSD_UNSIGNEDSHORT' => 'soap/soap.stub', 'XSL_CLONE_ALWAYS' => 'xsl/xsl.stub', 'XSL_CLONE_AUTO' => 'xsl/xsl.stub', 'XSL_CLONE_NEVER' => 'xsl/xsl.stub', 'XSL_SECPREF_CREATE_DIRECTORY' => 'xsl/xsl.stub', 'XSL_SECPREF_DEFAULT' => 'xsl/xsl.stub', 'XSL_SECPREF_NONE' => 'xsl/xsl.stub', 'XSL_SECPREF_READ_FILE' => 'xsl/xsl.stub', 'XSL_SECPREF_READ_NETWORK' => 'xsl/xsl.stub', 'XSL_SECPREF_WRITE_FILE' => 'xsl/xsl.stub', 'XSL_SECPREF_WRITE_NETWORK' => 'xsl/xsl.stub', 'YAF\\ENVIRON' => 'yaf/yaf_namespace.stub', 'YAF\\ERR\\AUTOLOAD\\FAILED' => 'yaf/yaf_namespace.stub', 'YAF\\ERR\\CALL\\FAILED' => 'yaf/yaf_namespace.stub', 'YAF\\ERR\\DISPATCH\\FAILED' => 'yaf/yaf_namespace.stub', 'YAF\\ERR\\NOTFOUND\\ACTION' => 'yaf/yaf_namespace.stub', 'YAF\\ERR\\NOTFOUND\\CONTROLLER' => 'yaf/yaf_namespace.stub', 'YAF\\ERR\\NOTFOUND\\MODULE' => 'yaf/yaf_namespace.stub', 'YAF\\ERR\\NOTFOUND\\VIEW' => 'yaf/yaf_namespace.stub', 'YAF\\ERR\\ROUTE\\FAILED' => 'yaf/yaf_namespace.stub', 'YAF\\ERR\\STARTUP\\FAILED' => 'yaf/yaf_namespace.stub', 'YAF\\ERR\\TYPE\\ERROR' => 'yaf/yaf_namespace.stub', 'YAF\\VERSION' => 'yaf/yaf_namespace.stub', 'YAF_ENVIRON' => 'yaf/yaf.stub', 'YAF_ERR_ACCESS_ERROR' => 'yaf/yaf.stub', 'YAF_ERR_AUTOLOAD_FAILED' => 'yaf/yaf.stub', 'YAF_ERR_CALL_FAILED' => 'yaf/yaf.stub', 'YAF_ERR_DISPATCH_FAILED' => 'yaf/yaf.stub', 'YAF_ERR_NOTFOUND_ACTION' => 'yaf/yaf.stub', 'YAF_ERR_NOTFOUND_CONTROLLER' => 'yaf/yaf.stub', 'YAF_ERR_NOTFOUND_MODULE' => 'yaf/yaf.stub', 'YAF_ERR_NOTFOUND_VIEW' => 'yaf/yaf.stub', 'YAF_ERR_ROUTE_FAILED' => 'yaf/yaf.stub', 'YAF_ERR_STARTUP_FAILED' => 'yaf/yaf.stub', 'YAF_ERR_TYPE_ERROR' => 'yaf/yaf.stub', 'YAF_VERSION' => 'yaf/yaf.stub', 'YAML_ANY_BREAK' => 'yaml/yaml.stub', 'YAML_ANY_ENCODING' => 'yaml/yaml.stub', 'YAML_ANY_SCALAR_STYLE' => 'yaml/yaml.stub', 'YAML_BINARY_TAG' => 'yaml/yaml.stub', 'YAML_BOOL_TAG' => 'yaml/yaml.stub', 'YAML_CRLN_BREAK' => 'yaml/yaml.stub', 'YAML_CR_BREAK' => 'yaml/yaml.stub', 'YAML_DOUBLE_QUOTED_SCALAR_STYLE' => 'yaml/yaml.stub', 'YAML_FLOAT_TAG' => 'yaml/yaml.stub', 'YAML_FOLDED_SCALAR_STYLE' => 'yaml/yaml.stub', 'YAML_INT_TAG' => 'yaml/yaml.stub', 'YAML_LITERAL_SCALAR_STYLE' => 'yaml/yaml.stub', 'YAML_LN_BREAK' => 'yaml/yaml.stub', 'YAML_MAP_TAG' => 'yaml/yaml.stub', 'YAML_MERGE_TAG' => 'yaml/yaml.stub', 'YAML_NULL_TAG' => 'yaml/yaml.stub', 'YAML_PHP_TAG' => 'yaml/yaml.stub', 'YAML_PLAIN_SCALAR_STYLE' => 'yaml/yaml.stub', 'YAML_SEQ_TAG' => 'yaml/yaml.stub', 'YAML_SINGLE_QUOTED_SCALAR_STYLE' => 'yaml/yaml.stub', 'YAML_STR_TAG' => 'yaml/yaml.stub', 'YAML_TIMESTAMP_TAG' => 'yaml/yaml.stub', 'YAML_UTF16BE_ENCODING' => 'yaml/yaml.stub', 'YAML_UTF16LE_ENCODING' => 'yaml/yaml.stub', 'YAML_UTF8_ENCODING' => 'yaml/yaml.stub', 'YAR_CLIENT_PROTOCOL_HTTP' => 'yar/yar.stub', 'YAR_CLIENT_PROTOCOL_TCP' => 'yar/yar.stub', 'YAR_CLIENT_PROTOCOL_UNIX' => 'yar/yar.stub', 'YAR_ERR_EXCEPTION' => 'yar/yar.stub', 'YAR_ERR_OKEY' => 'yar/yar.stub', 'YAR_ERR_OUTPUT' => 'yar/yar.stub', 'YAR_ERR_PACKAGER' => 'yar/yar.stub', 'YAR_ERR_PROTOCOL' => 'yar/yar.stub', 'YAR_ERR_REQUEST' => 'yar/yar.stub', 'YAR_ERR_TRANSPORT' => 'yar/yar.stub', 'YAR_OPT_CONNECT_TIMEOUT' => 'yar/yar.stub', 'YAR_OPT_HEADER' => 'yar/yar.stub', 'YAR_OPT_PACKAGER' => 'yar/yar.stub', 'YAR_OPT_PERSISTENT' => 'yar/yar.stub', 'YAR_OPT_RESOLVE' => 'yar/yar.stub', 'YAR_OPT_TIMEOUT' => 'yar/yar.stub', 'YAR_PACKAGER_JSON' => 'yar/yar.stub', 'YAR_PACKAGER_PHP' => 'yar/yar.stub', 'YAR_VERSION' => 'yar/yar.stub', 'YELLOW' => 'winbinder/winbinder.stub', 'YESEXPR' => 'standard/standard_defines.stub', 'YESSTR' => 'standard/standard_defines.stub', 'ZEND_ACC_ABSTRACT' => 'uopz/uopz.stub', 'ZEND_ACC_FETCH' => 'uopz/uopz.stub', 'ZEND_ACC_FINAL' => 'uopz/uopz.stub', 'ZEND_ACC_PPP_MASK' => 'uopz/uopz.stub', 'ZEND_ACC_PRIVATE' => 'uopz/uopz.stub', 'ZEND_ACC_PROTECTED' => 'uopz/uopz.stub', 'ZEND_ACC_PUBLIC' => 'uopz/uopz.stub', 'ZEND_ACC_STATIC' => 'uopz/uopz.stub', 'ZEND_DEBUG_BUILD' => 'Core/Core_d.stub', 'ZEND_MULTIBYTE' => 'Core/Core_d.stub', 'ZEND_THREAD_SAFE' => 'Core/Core_d.stub', 'ZLIB_BLOCK' => 'zlib/zlib.stub', 'ZLIB_BUF_ERROR' => 'zlib/zlib.stub', 'ZLIB_DATA_ERROR' => 'zlib/zlib.stub', 'ZLIB_DEFAULT_STRATEGY' => 'zlib/zlib.stub', 'ZLIB_ENCODING_DEFLATE' => 'zlib/zlib.stub', 'ZLIB_ENCODING_GZIP' => 'zlib/zlib.stub', 'ZLIB_ENCODING_RAW' => 'zlib/zlib.stub', 'ZLIB_ERRNO' => 'zlib/zlib.stub', 'ZLIB_FILTERED' => 'zlib/zlib.stub', 'ZLIB_FINISH' => 'zlib/zlib.stub', 'ZLIB_FIXED' => 'zlib/zlib.stub', 'ZLIB_FULL_FLUSH' => 'zlib/zlib.stub', 'ZLIB_HUFFMAN_ONLY' => 'zlib/zlib.stub', 'ZLIB_MEM_ERROR' => 'zlib/zlib.stub', 'ZLIB_NEED_DICT' => 'zlib/zlib.stub', 'ZLIB_NO_FLUSH' => 'zlib/zlib.stub', 'ZLIB_OK' => 'zlib/zlib.stub', 'ZLIB_PARTIAL_FLUSH' => 'zlib/zlib.stub', 'ZLIB_RLE' => 'zlib/zlib.stub', 'ZLIB_STREAM_END' => 'zlib/zlib.stub', 'ZLIB_STREAM_ERROR' => 'zlib/zlib.stub', 'ZLIB_SYNC_FLUSH' => 'zlib/zlib.stub', 'ZLIB_VERNUM' => 'zlib/zlib.stub', 'ZLIB_VERSION' => 'zlib/zlib.stub', 'ZLIB_VERSION_ERROR' => 'zlib/zlib.stub', 'ZSTD_COMPRESS_LEVEL_DEFAULT' => 'zstd/zstd.stub', 'ZSTD_COMPRESS_LEVEL_MAX' => 'zstd/zstd.stub', 'ZSTD_COMPRESS_LEVEL_MIN' => 'zstd/zstd.stub', '__CLASS__' => 'standard/basic.stub', '__COMPILER_HALT_OFFSET__' => 'standard/_standard_manual.stub', '__DIR__' => 'standard/basic.stub', '__FILE__' => 'standard/basic.stub', '__FUNCTION__' => 'standard/basic.stub', '__LINE__' => 'standard/basic.stub', '__METHOD__' => 'standard/basic.stub', '__NAMESPACE__' => 'standard/basic.stub', '__TRAIT__' => 'standard/basic.stub', '__class__' => 'standard/basic.stub', '__dir__' => 'standard/basic.stub', '__file__' => 'standard/basic.stub', '__function__' => 'standard/basic.stub', '__line__' => 'standard/basic.stub', '__method__' => 'standard/basic.stub', '__namespace__' => 'standard/basic.stub', '__trait__' => 'standard/basic.stub', 'ast\\AST_ARG_LIST' => 'ast/ast.stub', 'ast\\AST_ARRAY' => 'ast/ast.stub', 'ast\\AST_ARRAY_ELEM' => 'ast/ast.stub', 'ast\\AST_ARROW_FUNC' => 'ast/ast.stub', 'ast\\AST_ASSIGN' => 'ast/ast.stub', 'ast\\AST_ASSIGN_OP' => 'ast/ast.stub', 'ast\\AST_ASSIGN_REF' => 'ast/ast.stub', 'ast\\AST_ATTRIBUTE' => 'ast/ast.stub', 'ast\\AST_ATTRIBUTE_GROUP' => 'ast/ast.stub', 'ast\\AST_ATTRIBUTE_LIST' => 'ast/ast.stub', 'ast\\AST_BINARY_OP' => 'ast/ast.stub', 'ast\\AST_BREAK' => 'ast/ast.stub', 'ast\\AST_CALL' => 'ast/ast.stub', 'ast\\AST_CAST' => 'ast/ast.stub', 'ast\\AST_CATCH' => 'ast/ast.stub', 'ast\\AST_CATCH_LIST' => 'ast/ast.stub', 'ast\\AST_CLASS' => 'ast/ast.stub', 'ast\\AST_CLASS_CONST' => 'ast/ast.stub', 'ast\\AST_CLASS_CONST_DECL' => 'ast/ast.stub', 'ast\\AST_CLASS_CONST_GROUP' => 'ast/ast.stub', 'ast\\AST_CLASS_NAME' => 'ast/ast.stub', 'ast\\AST_CLONE' => 'ast/ast.stub', 'ast\\AST_CLOSURE' => 'ast/ast.stub', 'ast\\AST_CLOSURE_USES' => 'ast/ast.stub', 'ast\\AST_CLOSURE_VAR' => 'ast/ast.stub', 'ast\\AST_CONDITIONAL' => 'ast/ast.stub', 'ast\\AST_CONST' => 'ast/ast.stub', 'ast\\AST_CONST_DECL' => 'ast/ast.stub', 'ast\\AST_CONST_ELEM' => 'ast/ast.stub', 'ast\\AST_CONTINUE' => 'ast/ast.stub', 'ast\\AST_DECLARE' => 'ast/ast.stub', 'ast\\AST_DIM' => 'ast/ast.stub', 'ast\\AST_DO_WHILE' => 'ast/ast.stub', 'ast\\AST_ECHO' => 'ast/ast.stub', 'ast\\AST_EMPTY' => 'ast/ast.stub', 'ast\\AST_ENCAPS_LIST' => 'ast/ast.stub', 'ast\\AST_EXIT' => 'ast/ast.stub', 'ast\\AST_EXPR_LIST' => 'ast/ast.stub', 'ast\\AST_FOR' => 'ast/ast.stub', 'ast\\AST_FOREACH' => 'ast/ast.stub', 'ast\\AST_FUNC_DECL' => 'ast/ast.stub', 'ast\\AST_GLOBAL' => 'ast/ast.stub', 'ast\\AST_GOTO' => 'ast/ast.stub', 'ast\\AST_GROUP_USE' => 'ast/ast.stub', 'ast\\AST_HALT_COMPILER' => 'ast/ast.stub', 'ast\\AST_IF' => 'ast/ast.stub', 'ast\\AST_IF_ELEM' => 'ast/ast.stub', 'ast\\AST_INCLUDE_OR_EVAL' => 'ast/ast.stub', 'ast\\AST_INSTANCEOF' => 'ast/ast.stub', 'ast\\AST_ISSET' => 'ast/ast.stub', 'ast\\AST_LABEL' => 'ast/ast.stub', 'ast\\AST_LIST' => 'ast/ast.stub', 'ast\\AST_MAGIC_CONST' => 'ast/ast.stub', 'ast\\AST_MATCH' => 'ast/ast.stub', 'ast\\AST_MATCH_ARM' => 'ast/ast.stub', 'ast\\AST_MATCH_ARM_LIST' => 'ast/ast.stub', 'ast\\AST_METHOD' => 'ast/ast.stub', 'ast\\AST_METHOD_CALL' => 'ast/ast.stub', 'ast\\AST_METHOD_REFERENCE' => 'ast/ast.stub', 'ast\\AST_NAME' => 'ast/ast.stub', 'ast\\AST_NAMED_ARG' => 'ast/ast.stub', 'ast\\AST_NAMESPACE' => 'ast/ast.stub', 'ast\\AST_NAME_LIST' => 'ast/ast.stub', 'ast\\AST_NEW' => 'ast/ast.stub', 'ast\\AST_NULLABLE_TYPE' => 'ast/ast.stub', 'ast\\AST_NULLSAFE_METHOD_CALL' => 'ast/ast.stub', 'ast\\AST_NULLSAFE_PROP' => 'ast/ast.stub', 'ast\\AST_PARAM' => 'ast/ast.stub', 'ast\\AST_PARAM_LIST' => 'ast/ast.stub', 'ast\\AST_POST_DEC' => 'ast/ast.stub', 'ast\\AST_POST_INC' => 'ast/ast.stub', 'ast\\AST_PRE_DEC' => 'ast/ast.stub', 'ast\\AST_PRE_INC' => 'ast/ast.stub', 'ast\\AST_PRINT' => 'ast/ast.stub', 'ast\\AST_PROP' => 'ast/ast.stub', 'ast\\AST_PROP_DECL' => 'ast/ast.stub', 'ast\\AST_PROP_ELEM' => 'ast/ast.stub', 'ast\\AST_PROP_GROUP' => 'ast/ast.stub', 'ast\\AST_REF' => 'ast/ast.stub', 'ast\\AST_RETURN' => 'ast/ast.stub', 'ast\\AST_SHELL_EXEC' => 'ast/ast.stub', 'ast\\AST_STATIC' => 'ast/ast.stub', 'ast\\AST_STATIC_CALL' => 'ast/ast.stub', 'ast\\AST_STATIC_PROP' => 'ast/ast.stub', 'ast\\AST_STMT_LIST' => 'ast/ast.stub', 'ast\\AST_SWITCH' => 'ast/ast.stub', 'ast\\AST_SWITCH_CASE' => 'ast/ast.stub', 'ast\\AST_SWITCH_LIST' => 'ast/ast.stub', 'ast\\AST_THROW' => 'ast/ast.stub', 'ast\\AST_TRAIT_ADAPTATIONS' => 'ast/ast.stub', 'ast\\AST_TRAIT_ALIAS' => 'ast/ast.stub', 'ast\\AST_TRAIT_PRECEDENCE' => 'ast/ast.stub', 'ast\\AST_TRY' => 'ast/ast.stub', 'ast\\AST_TYPE' => 'ast/ast.stub', 'ast\\AST_TYPE_UNION' => 'ast/ast.stub', 'ast\\AST_UNARY_OP' => 'ast/ast.stub', 'ast\\AST_UNPACK' => 'ast/ast.stub', 'ast\\AST_UNSET' => 'ast/ast.stub', 'ast\\AST_USE' => 'ast/ast.stub', 'ast\\AST_USE_ELEM' => 'ast/ast.stub', 'ast\\AST_USE_TRAIT' => 'ast/ast.stub', 'ast\\AST_VAR' => 'ast/ast.stub', 'ast\\AST_WHILE' => 'ast/ast.stub', 'ast\\AST_YIELD' => 'ast/ast.stub', 'ast\\AST_YIELD_FROM' => 'ast/ast.stub', 'ast\\flags\\ARRAY_ELEM_REF' => 'ast/ast.stub', 'ast\\flags\\ARRAY_SYNTAX_LIST' => 'ast/ast.stub', 'ast\\flags\\ARRAY_SYNTAX_LONG' => 'ast/ast.stub', 'ast\\flags\\ARRAY_SYNTAX_SHORT' => 'ast/ast.stub', 'ast\\flags\\BINARY_ADD' => 'ast/ast.stub', 'ast\\flags\\BINARY_BITWISE_AND' => 'ast/ast.stub', 'ast\\flags\\BINARY_BITWISE_OR' => 'ast/ast.stub', 'ast\\flags\\BINARY_BITWISE_XOR' => 'ast/ast.stub', 'ast\\flags\\BINARY_BOOL_AND' => 'ast/ast.stub', 'ast\\flags\\BINARY_BOOL_OR' => 'ast/ast.stub', 'ast\\flags\\BINARY_BOOL_XOR' => 'ast/ast.stub', 'ast\\flags\\BINARY_COALESCE' => 'ast/ast.stub', 'ast\\flags\\BINARY_CONCAT' => 'ast/ast.stub', 'ast\\flags\\BINARY_DIV' => 'ast/ast.stub', 'ast\\flags\\BINARY_IS_EQUAL' => 'ast/ast.stub', 'ast\\flags\\BINARY_IS_GREATER' => 'ast/ast.stub', 'ast\\flags\\BINARY_IS_GREATER_OR_EQUAL' => 'ast/ast.stub', 'ast\\flags\\BINARY_IS_IDENTICAL' => 'ast/ast.stub', 'ast\\flags\\BINARY_IS_NOT_EQUAL' => 'ast/ast.stub', 'ast\\flags\\BINARY_IS_NOT_IDENTICAL' => 'ast/ast.stub', 'ast\\flags\\BINARY_IS_SMALLER' => 'ast/ast.stub', 'ast\\flags\\BINARY_IS_SMALLER_OR_EQUAL' => 'ast/ast.stub', 'ast\\flags\\BINARY_MOD' => 'ast/ast.stub', 'ast\\flags\\BINARY_MUL' => 'ast/ast.stub', 'ast\\flags\\BINARY_POW' => 'ast/ast.stub', 'ast\\flags\\BINARY_SHIFT_LEFT' => 'ast/ast.stub', 'ast\\flags\\BINARY_SHIFT_RIGHT' => 'ast/ast.stub', 'ast\\flags\\BINARY_SPACESHIP' => 'ast/ast.stub', 'ast\\flags\\BINARY_SUB' => 'ast/ast.stub', 'ast\\flags\\CLASS_ABSTRACT' => 'ast/ast.stub', 'ast\\flags\\CLASS_ANONYMOUS' => 'ast/ast.stub', 'ast\\flags\\CLASS_FINAL' => 'ast/ast.stub', 'ast\\flags\\CLASS_INTERFACE' => 'ast/ast.stub', 'ast\\flags\\CLASS_TRAIT' => 'ast/ast.stub', 'ast\\flags\\CLOSURE_USE_REF' => 'ast/ast.stub', 'ast\\flags\\DIM_ALTERNATIVE_SYNTAX' => 'ast/ast.stub', 'ast\\flags\\EXEC_EVAL' => 'ast/ast.stub', 'ast\\flags\\EXEC_INCLUDE' => 'ast/ast.stub', 'ast\\flags\\EXEC_INCLUDE_ONCE' => 'ast/ast.stub', 'ast\\flags\\EXEC_REQUIRE' => 'ast/ast.stub', 'ast\\flags\\EXEC_REQUIRE_ONCE' => 'ast/ast.stub', 'ast\\flags\\FUNC_GENERATOR' => 'ast/ast.stub', 'ast\\flags\\FUNC_RETURNS_REF' => 'ast/ast.stub', 'ast\\flags\\MAGIC_CLASS' => 'ast/ast.stub', 'ast\\flags\\MAGIC_DIR' => 'ast/ast.stub', 'ast\\flags\\MAGIC_FILE' => 'ast/ast.stub', 'ast\\flags\\MAGIC_FUNCTION' => 'ast/ast.stub', 'ast\\flags\\MAGIC_LINE' => 'ast/ast.stub', 'ast\\flags\\MAGIC_METHOD' => 'ast/ast.stub', 'ast\\flags\\MAGIC_NAMESPACE' => 'ast/ast.stub', 'ast\\flags\\MAGIC_TRAIT' => 'ast/ast.stub', 'ast\\flags\\MODIFIER_ABSTRACT' => 'ast/ast.stub', 'ast\\flags\\MODIFIER_FINAL' => 'ast/ast.stub', 'ast\\flags\\MODIFIER_PRIVATE' => 'ast/ast.stub', 'ast\\flags\\MODIFIER_PROTECTED' => 'ast/ast.stub', 'ast\\flags\\MODIFIER_PUBLIC' => 'ast/ast.stub', 'ast\\flags\\MODIFIER_STATIC' => 'ast/ast.stub', 'ast\\flags\\NAME_FQ' => 'ast/ast.stub', 'ast\\flags\\NAME_NOT_FQ' => 'ast/ast.stub', 'ast\\flags\\NAME_RELATIVE' => 'ast/ast.stub', 'ast\\flags\\PARAM_MODIFIER_PRIVATE' => 'ast/ast.stub', 'ast\\flags\\PARAM_MODIFIER_PROTECTED' => 'ast/ast.stub', 'ast\\flags\\PARAM_MODIFIER_PUBLIC' => 'ast/ast.stub', 'ast\\flags\\PARAM_REF' => 'ast/ast.stub', 'ast\\flags\\PARAM_VARIADIC' => 'ast/ast.stub', 'ast\\flags\\PARENTHESIZED_CONDITIONAL' => 'ast/ast.stub', 'ast\\flags\\RETURNS_REF' => 'ast/ast.stub', 'ast\\flags\\TYPE_ARRAY' => 'ast/ast.stub', 'ast\\flags\\TYPE_BOOL' => 'ast/ast.stub', 'ast\\flags\\TYPE_CALLABLE' => 'ast/ast.stub', 'ast\\flags\\TYPE_DOUBLE' => 'ast/ast.stub', 'ast\\flags\\TYPE_FALSE' => 'ast/ast.stub', 'ast\\flags\\TYPE_ITERABLE' => 'ast/ast.stub', 'ast\\flags\\TYPE_LONG' => 'ast/ast.stub', 'ast\\flags\\TYPE_MIXED' => 'ast/ast.stub', 'ast\\flags\\TYPE_NULL' => 'ast/ast.stub', 'ast\\flags\\TYPE_OBJECT' => 'ast/ast.stub', 'ast\\flags\\TYPE_STATIC' => 'ast/ast.stub', 'ast\\flags\\TYPE_STRING' => 'ast/ast.stub', 'ast\\flags\\TYPE_VOID' => 'ast/ast.stub', 'ast\\flags\\UNARY_BITWISE_NOT' => 'ast/ast.stub', 'ast\\flags\\UNARY_BOOL_NOT' => 'ast/ast.stub', 'ast\\flags\\UNARY_MINUS' => 'ast/ast.stub', 'ast\\flags\\UNARY_PLUS' => 'ast/ast.stub', 'ast\\flags\\UNARY_SILENCE' => 'ast/ast.stub', 'ast\\flags\\USE_CONST' => 'ast/ast.stub', 'ast\\flags\\USE_FUNCTION' => 'ast/ast.stub', 'ast\\flags\\USE_NORMAL' => 'ast/ast.stub', 'bgrBLACK' => 'winbinder/winbinder.stub', 'bgrBLUE' => 'winbinder/winbinder.stub', 'bgrCYAN' => 'winbinder/winbinder.stub', 'bgrDARKBLUE' => 'winbinder/winbinder.stub', 'bgrDARKCYAN' => 'winbinder/winbinder.stub', 'bgrDARKGRAY' => 'winbinder/winbinder.stub', 'bgrDARKGREEN' => 'winbinder/winbinder.stub', 'bgrDARKMAGENTA' => 'winbinder/winbinder.stub', 'bgrDARKRED' => 'winbinder/winbinder.stub', 'bgrDARKYELLOW' => 'winbinder/winbinder.stub', 'bgrGREEN' => 'winbinder/winbinder.stub', 'bgrLIGHTGRAY' => 'winbinder/winbinder.stub', 'bgrMAGENTA' => 'winbinder/winbinder.stub', 'bgrNOCOLOR' => 'winbinder/winbinder.stub', 'bgrRED' => 'winbinder/winbinder.stub', 'bgrWHITE' => 'winbinder/winbinder.stub', 'bgrYELLOW' => 'winbinder/winbinder.stub', 'false' => 'Core/Core_d.stub', 'http\\Client\\Curl\\AUTH_ANY' => 'http/http3.stub', 'http\\Client\\Curl\\AUTH_BASIC' => 'http/http3.stub', 'http\\Client\\Curl\\AUTH_DIGEST' => 'http/http3.stub', 'http\\Client\\Curl\\AUTH_DIGEST_IE' => 'http/http3.stub', 'http\\Client\\Curl\\AUTH_GSSNEG' => 'http/http3.stub', 'http\\Client\\Curl\\AUTH_NTLM' => 'http/http3.stub', 'http\\Client\\Curl\\AUTH_SPNEGO' => 'http/http3.stub', 'http\\Client\\Curl\\FEATURES' => 'http/http3.stub', 'http\\Client\\Curl\\Features\\ASYNCHDNS' => 'http/http3.stub', 'http\\Client\\Curl\\Features\\GSSAPI' => 'http/http3.stub', 'http\\Client\\Curl\\Features\\GSSNEGOTIATE' => 'http/http3.stub', 'http\\Client\\Curl\\Features\\HTTP2' => 'http/http3.stub', 'http\\Client\\Curl\\Features\\IDN' => 'http/http3.stub', 'http\\Client\\Curl\\Features\\IPV6' => 'http/http3.stub', 'http\\Client\\Curl\\Features\\KERBEROS4' => 'http/http3.stub', 'http\\Client\\Curl\\Features\\KERBEROS5' => 'http/http3.stub', 'http\\Client\\Curl\\Features\\LARGEFILE' => 'http/http3.stub', 'http\\Client\\Curl\\Features\\LIBZ' => 'http/http3.stub', 'http\\Client\\Curl\\Features\\NTLM' => 'http/http3.stub', 'http\\Client\\Curl\\Features\\NTLM_WB' => 'http/http3.stub', 'http\\Client\\Curl\\Features\\PSL' => 'http/http3.stub', 'http\\Client\\Curl\\Features\\SPNEGO' => 'http/http3.stub', 'http\\Client\\Curl\\Features\\SSL' => 'http/http3.stub', 'http\\Client\\Curl\\Features\\SSPI' => 'http/http3.stub', 'http\\Client\\Curl\\Features\\TLSAUTH_SRP' => 'http/http3.stub', 'http\\Client\\Curl\\Features\\UNIX_SOCKETS' => 'http/http3.stub', 'http\\Client\\Curl\\HTTP_VERSION_1_0' => 'http/http3.stub', 'http\\Client\\Curl\\HTTP_VERSION_1_1' => 'http/http3.stub', 'http\\Client\\Curl\\HTTP_VERSION_2TLS' => 'http/http3.stub', 'http\\Client\\Curl\\HTTP_VERSION_2_0' => 'http/http3.stub', 'http\\Client\\Curl\\HTTP_VERSION_ANY' => 'http/http3.stub', 'http\\Client\\Curl\\IPRESOLVE_ANY' => 'http/http3.stub', 'http\\Client\\Curl\\IPRESOLVE_V4' => 'http/http3.stub', 'http\\Client\\Curl\\IPRESOLVE_V6' => 'http/http3.stub', 'http\\Client\\Curl\\POSTREDIR_301' => 'http/http3.stub', 'http\\Client\\Curl\\POSTREDIR_302' => 'http/http3.stub', 'http\\Client\\Curl\\POSTREDIR_303' => 'http/http3.stub', 'http\\Client\\Curl\\POSTREDIR_ALL' => 'http/http3.stub', 'http\\Client\\Curl\\PROXY_HTTP' => 'http/http3.stub', 'http\\Client\\Curl\\PROXY_HTTP_1_0' => 'http/http3.stub', 'http\\Client\\Curl\\PROXY_SOCKS4' => 'http/http3.stub', 'http\\Client\\Curl\\PROXY_SOCKS4A' => 'http/http3.stub', 'http\\Client\\Curl\\PROXY_SOCKS5' => 'http/http3.stub', 'http\\Client\\Curl\\PROXY_SOCKS5_HOSTNAME' => 'http/http3.stub', 'http\\Client\\Curl\\SSL_VERSION_ANY' => 'http/http3.stub', 'http\\Client\\Curl\\SSL_VERSION_SSLv2' => 'http/http3.stub', 'http\\Client\\Curl\\SSL_VERSION_SSLv3' => 'http/http3.stub', 'http\\Client\\Curl\\SSL_VERSION_TLSv1' => 'http/http3.stub', 'http\\Client\\Curl\\SSL_VERSION_TLSv1_0' => 'http/http3.stub', 'http\\Client\\Curl\\SSL_VERSION_TLSv1_1' => 'http/http3.stub', 'http\\Client\\Curl\\SSL_VERSION_TLSv1_2' => 'http/http3.stub', 'http\\Client\\Curl\\TLSAUTH_SRP' => 'http/http3.stub', 'http\\Client\\Curl\\VERSIONS' => 'http/http3.stub', 'http\\Client\\Curl\\Versions\\ARES' => 'http/http3.stub', 'http\\Client\\Curl\\Versions\\CURL' => 'http/http3.stub', 'http\\Client\\Curl\\Versions\\IDN' => 'http/http3.stub', 'http\\Client\\Curl\\Versions\\LIBZ' => 'http/http3.stub', 'http\\Client\\Curl\\Versions\\SSL' => 'http/http3.stub', 'null' => 'Core/Core_d.stub', 'pcov\\all' => 'pcov/pcov.stub', 'pcov\\exclusive' => 'pcov/pcov.stub', 'pcov\\inclusive' => 'pcov/pcov.stub', 'pcov\\version' => 'pcov/pcov.stub', 'true' => 'Core/Core_d.stub', 'yaf\\environ' => 'yaf/yaf_namespace.stub', 'yaf\\err\\autoload\\failed' => 'yaf/yaf_namespace.stub', 'yaf\\err\\call\\failed' => 'yaf/yaf_namespace.stub', 'yaf\\err\\dispatch\\failed' => 'yaf/yaf_namespace.stub', 'yaf\\err\\notfound\\action' => 'yaf/yaf_namespace.stub', 'yaf\\err\\notfound\\controller' => 'yaf/yaf_namespace.stub', 'yaf\\err\\notfound\\module' => 'yaf/yaf_namespace.stub', 'yaf\\err\\notfound\\view' => 'yaf/yaf_namespace.stub', 'yaf\\err\\route\\failed' => 'yaf/yaf_namespace.stub', 'yaf\\err\\startup\\failed' => 'yaf/yaf_namespace.stub', 'yaf\\err\\type\\error' => 'yaf/yaf_namespace.stub', 'yaf\\version' => 'yaf/yaf_namespace.stub', 'yaf_environ' => 'yaf/yaf.stub', 'yaf_err_autoload_failed' => 'yaf/yaf.stub', 'yaf_err_call_failed' => 'yaf/yaf.stub', 'yaf_err_dispatch_failed' => 'yaf/yaf.stub', 'yaf_err_notfound_action' => 'yaf/yaf.stub', 'yaf_err_notfound_controller' => 'yaf/yaf.stub', 'yaf_err_notfound_module' => 'yaf/yaf.stub', 'yaf_err_notfound_view' => 'yaf/yaf.stub', 'yaf_err_route_failed' => 'yaf/yaf.stub', 'yaf_err_startup_failed' => 'yaf/yaf.stub', 'yaf_err_type_error' => 'yaf/yaf.stub', 'yaf_version' => 'yaf/yaf.stub');
}
<?php

// Start of soap v.
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;

/**
 * The SoapClient class provides a client for SOAP 1.1, SOAP 1.2 servers. It can be used in WSDL
 * or non-WSDL mode.
 * @link https://php.net/manual/en/class.soapclient.php
 */
class SoapClient
{
    /**
     * SoapClient constructor
     * @link https://php.net/manual/en/soapclient.construct.php
     * @param string|null $wsdl <p>
     * URI of the WSDL file or <b>NULL</b> if working in
     * non-WSDL mode.
     * </p>
     * <p>
     * During development, WSDL caching may be disabled by the
     * use of the soap.wsdl_cache_ttl <i>php.ini</i> setting
     * otherwise changes made to the WSDL file will have no effect until
     * soap.wsdl_cache_ttl is expired.
     * </p>
     * @param array $options [optional] <p>
     * An array of options. If working in WSDL mode, this parameter is optional.
     * If working in non-WSDL mode, the location and
     * uri options must be set, where location
     * is the URL of the SOAP server to send the request to, and uri
     * is the target namespace of the SOAP service.
     * </p>
     * <p>
     * The style and use options only work in
     * non-WSDL mode. In WSDL mode, they come from the WSDL file.
     * </p>
     * <p>
     * The soap_version option should be one of either
     * <b>SOAP_1_1</b> or <b>SOAP_1_2</b> to
     * select SOAP 1.1 or 1.2, respectively. If omitted, 1.1 is used.
     * </p>
     * <p>
     * For HTTP authentication, the login and
     * password options can be used to supply credentials.
     * For making an HTTP connection through
     * a proxy server, the options proxy_host,
     * proxy_port, proxy_login
     * and proxy_password are also available.
     * For HTTPS client certificate authentication use
     * local_cert and passphrase options. An
     * authentication may be supplied in the authentication
     * option. The authentication method may be either
     * <b>SOAP_AUTHENTICATION_BASIC</b> (default) or
     * <b>SOAP_AUTHENTICATION_DIGEST</b>.
     * </p>
     * <p>
     * The compression option allows to use compression
     * of HTTP SOAP requests and responses.
     * </p>
     * <p>
     * The encoding option defines internal character
     * encoding. This option does not change the encoding of SOAP requests (it is
     * always utf-8), but converts strings into it.
     * </p>
     * <p>
     * The trace option enables tracing of request so faults
     * can be backtraced. This defaults to <b>FALSE</b>
     * </p>
     * <p>
     * The classmap option can be used to map some WSDL
     * types to PHP classes. This option must be an array with WSDL types
     * as keys and names of PHP classes as values.
     * </p>
     * <p>
     * Setting the boolean trace option enables use of the
     * methods
     * SoapClient->__getLastRequest,
     * SoapClient->__getLastRequestHeaders,
     * SoapClient->__getLastResponse and
     * SoapClient->__getLastResponseHeaders.
     * </p>
     * <p>
     * The exceptions option is a boolean value defining whether
     * soap errors throw exceptions of type
     * SoapFault.
     * </p>
     * <p>
     * The connection_timeout option defines a timeout in seconds
     * for the connection to the SOAP service. This option does not define a timeout
     * for services with slow responses. To limit the time to wait for calls to finish the
     * default_socket_timeout setting
     * is available.
     * </p>
     * <p>
     * The typemap option is an array of type mappings.
     * Type mapping is an array with keys type_name,
     * type_ns (namespace URI), from_xml
     * (callback accepting one string parameter) and to_xml
     * (callback accepting one object parameter).
     * </p>
     * <p>
     * The cache_wsdl option is one of
     * <b>WSDL_CACHE_NONE</b>,
     * <b>WSDL_CACHE_DISK</b>,
     * <b>WSDL_CACHE_MEMORY</b> or
     * <b>WSDL_CACHE_BOTH</b>.
     * </p>
     * <p>
     * The user_agent option specifies string to use in
     * User-Agent header.
     * </p>
     * <p>
     * The stream_context option is a resource
     * for context.
     * </p>
     * <p>
     * The features option is a bitmask of
     * <b>SOAP_SINGLE_ELEMENT_ARRAYS</b>,
     * <b>SOAP_USE_XSI_ARRAY_TYPE</b>,
     * <b>SOAP_WAIT_ONE_WAY_CALLS</b>.
     * </p>
     * <p>
     * The keep_alive option is a boolean value defining whether
     * to send the Connection: Keep-Alive header or
     * Connection: close.
     * </p>
     * <p>
     * The ssl_method option is one of
     * <b>SOAP_SSL_METHOD_TLS</b>,
     * <b>SOAP_SSL_METHOD_SSLv2</b>,
     * <b>SOAP_SSL_METHOD_SSLv3</b> or
     * <b>SOAP_SSL_METHOD_SSLv23</b>.
     * </p>
     * @since 5.0.1
     *
     * @removed 8.0
     */
    public function SoapClient($wsdl, array $options = null) {}

    /**
     * SoapClient constructor
     * @link https://php.net/manual/en/soapclient.construct.php
     * @param string|null $wsdl <p>
     * URI of the WSDL file or <b>NULL</b> if working in
     * non-WSDL mode.
     * </p>
     * <p>
     * During development, WSDL caching may be disabled by the
     * use of the soap.wsdl_cache_ttl <i>php.ini</i> setting
     * otherwise changes made to the WSDL file will have no effect until
     * soap.wsdl_cache_ttl is expired.
     * </p>
     * @param array $options [optional] <p>
     * An array of options. If working in WSDL mode, this parameter is optional.
     * If working in non-WSDL mode, the location and
     * uri options must be set, where location
     * is the URL of the SOAP server to send the request to, and uri
     * is the target namespace of the SOAP service.
     * </p>
     * <p>
     * The style and use options only work in
     * non-WSDL mode. In WSDL mode, they come from the WSDL file.
     * </p>
     * <p>
     * The soap_version option should be one of either
     * <b>SOAP_1_1</b> or <b>SOAP_1_2</b> to
     * select SOAP 1.1 or 1.2, respectively. If omitted, 1.1 is used.
     * </p>
     * <p>
     * For HTTP authentication, the login and
     * password options can be used to supply credentials.
     * For making an HTTP connection through
     * a proxy server, the options proxy_host,
     * proxy_port, proxy_login
     * and proxy_password are also available.
     * For HTTPS client certificate authentication use
     * local_cert and passphrase options. An
     * authentication may be supplied in the authentication
     * option. The authentication method may be either
     * <b>SOAP_AUTHENTICATION_BASIC</b> (default) or
     * <b>SOAP_AUTHENTICATION_DIGEST</b>.
     * </p>
     * <p>
     * The compression option allows to use compression
     * of HTTP SOAP requests and responses.
     * </p>
     * <p>
     * The encoding option defines internal character
     * encoding. This option does not change the encoding of SOAP requests (it is
     * always utf-8), but converts strings into it.
     * </p>
     * <p>
     * The trace option enables tracing of request so faults
     * can be backtraced. This defaults to <b>FALSE</b>
     * </p>
     * <p>
     * The classmap option can be used to map some WSDL
     * types to PHP classes. This option must be an array with WSDL types
     * as keys and names of PHP classes as values.
     * </p>
     * <p>
     * Setting the boolean trace option enables use of the
     * methods
     * SoapClient->__getLastRequest,
     * SoapClient->__getLastRequestHeaders,
     * SoapClient->__getLastResponse and
     * SoapClient->__getLastResponseHeaders.
     * </p>
     * <p>
     * The exceptions option is a boolean value defining whether
     * soap errors throw exceptions of type
     * SoapFault.
     * </p>
     * <p>
     * The connection_timeout option defines a timeout in seconds
     * for the connection to the SOAP service. This option does not define a timeout
     * for services with slow responses. To limit the time to wait for calls to finish the
     * default_socket_timeout setting
     * is available.
     * </p>
     * <p>
     * The typemap option is an array of type mappings.
     * Type mapping is an array with keys type_name,
     * type_ns (namespace URI), from_xml
     * (callback accepting one string parameter) and to_xml
     * (callback accepting one object parameter).
     * </p>
     * <p>
     * The cache_wsdl option is one of
     * <b>WSDL_CACHE_NONE</b>,
     * <b>WSDL_CACHE_DISK</b>,
     * <b>WSDL_CACHE_MEMORY</b> or
     * <b>WSDL_CACHE_BOTH</b>.
     * </p>
     * <p>
     * The user_agent option specifies string to use in
     * User-Agent header.
     * </p>
     * <p>
     * The stream_context option is a resource
     * for context.
     * </p>
     * <p>
     * The features option is a bitmask of
     * <b>SOAP_SINGLE_ELEMENT_ARRAYS</b>,
     * <b>SOAP_USE_XSI_ARRAY_TYPE</b>,
     * <b>SOAP_WAIT_ONE_WAY_CALLS</b>.
     * </p>
     * <p>
     * The keep_alive option is a boolean value defining whether
     * to send the Connection: Keep-Alive header or
     * Connection: close.
     * </p>
     * <p>
     * The ssl_method option is one of
     * <b>SOAP_SSL_METHOD_TLS</b>,
     * <b>SOAP_SSL_METHOD_SSLv2</b>,
     * <b>SOAP_SSL_METHOD_SSLv3</b> or
     * <b>SOAP_SSL_METHOD_SSLv23</b>.
     * </p>
     * @throws SoapFault A SoapFault exception will be thrown if the wsdl URI cannot be loaded.
     * @since 5.0.1
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $wsdl,
        array $options = null
    ) {}

    /**
     * @link https://php.net/manual/en/soapclient.call.php
     * @param string $name
     * @param array $args
     * @return mixed
     * @since 5.0.1
     */
    #[Deprecated]
    #[TentativeType]
    public function __call(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        array $args
    ): mixed {}

    /**
     * Calls a SOAP function
     * @link https://php.net/manual/en/soapclient.soapcall.php
     * @param string $name <p>
     * The name of the SOAP function to call.
     * </p>
     * @param array $args <p>
     * An array of the arguments to pass to the function. This can be either
     * an ordered or an associative array. Note that most SOAP servers require
     * parameter names to be provided, in which case this must be an
     * associative array.
     * </p>
     * @param array $options [optional] <p>
     * An associative array of options to pass to the client.
     * </p>
     * <p>
     * The location option is the URL of the remote Web service.
     * </p>
     * <p>
     * The uri option is the target namespace of the SOAP service.
     * </p>
     * <p>
     * The soapaction option is the action to call.
     * </p>
     * @param mixed $inputHeaders [optional] <p>
     * An array of headers to be sent along with the SOAP request.
     * </p>
     * @param array &$outputHeaders [optional] <p>
     * If supplied, this array will be filled with the headers from the SOAP response.
     * </p>
     * @return mixed SOAP functions may return one, or multiple values. If only one value is returned
     * by the SOAP function, the return value of __soapCall will be
     * a simple value (e.g. an integer, a string, etc). If multiple values are
     * returned, __soapCall will return
     * an associative array of named output parameters.
     * </p>
     * <p>
     * On error, if the SoapClient object was constructed with the exceptions
     * option set to <b>FALSE</b>, a SoapFault object will be returned. If this
     * option is not set, or is set to <b>TRUE</b>, then a SoapFault object will
     * be thrown as an exception.
     * @throws SoapFault A SoapFault exception will be thrown if an error occurs
     * and the SoapClient was constructed with the exceptions option not set, or
     * set to <b>TRUE</b>.
     * @since 5.0.1
     */
    #[TentativeType]
    public function __soapCall(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        array $args,
        #[LanguageLevelTypeAware(['8.0' => 'array|null'], default: '')] $options = null,
        $inputHeaders = null,
        &$outputHeaders = null
    ): mixed {}

    /**
     * Returns last SOAP request
     * @link https://php.net/manual/en/soapclient.getlastrequest.php
     * @return string|null The last SOAP request, as an XML string.
     * @since 5.0.1
     */
    #[TentativeType]
    public function __getLastRequest(): ?string {}

    /**
     * Returns last SOAP response
     * @link https://php.net/manual/en/soapclient.getlastresponse.php
     * @return string|null The last SOAP response, as an XML string.
     * @since 5.0.1
     */
    #[TentativeType]
    public function __getLastResponse(): ?string {}

    /**
     * Returns the SOAP headers from the last request
     * @link https://php.net/manual/en/soapclient.getlastrequestheaders.php
     * @return string|null The last SOAP request headers.
     * @since 5.0.1
     */
    #[TentativeType]
    public function __getLastRequestHeaders(): ?string {}

    /**
     * Returns the SOAP headers from the last response
     * @link https://php.net/manual/en/soapclient.getlastresponseheaders.php
     * @return string|null The last SOAP response headers.
     * @since 5.0.1
     */
    #[TentativeType]
    public function __getLastResponseHeaders(): ?string {}

    /**
     * Returns list of available SOAP functions
     * @link https://php.net/manual/en/soapclient.getfunctions.php
     * @return array|null The array of SOAP function prototypes, detailing the return type,
     * the function name and type-hinted parameters.
     * @since 5.0.1
     */
    #[TentativeType]
    public function __getFunctions(): ?array {}

    /**
     * Returns a list of SOAP types
     * @link https://php.net/manual/en/soapclient.gettypes.php
     * @return array|null The array of SOAP types, detailing all structures and types.
     * @since 5.0.1
     */
    #[TentativeType]
    public function __getTypes(): ?array {}

    /**
     * Returns a list of all cookies
     * @link https://php.net/manual/en/soapclient.getcookies.php
     * @return array The array of all cookies
     * @since 5.4.3
     */
    #[TentativeType]
    public function __getCookies(): array {}

    /**
     * Performs a SOAP request
     * @link https://php.net/manual/en/soapclient.dorequest.php
     * @param string $request <p>
     * The XML SOAP request.
     * </p>
     * @param string $location <p>
     * The URL to request.
     * </p>
     * @param string $action <p>
     * The SOAP action.
     * </p>
     * @param int $version <p>
     * The SOAP version.
     * </p>
     * @param bool|int $oneWay [optional] <p>
     * If $oneWay is set to 1, this method returns nothing.
     * Use this where a response is not expected.
     * </p>
     * @return string|null The XML SOAP response.
     * @since 5.0.1
     */
    #[TentativeType]
    public function __doRequest(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $request,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $location,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $action,
        #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $version,
        #[LanguageLevelTypeAware(["8.0" => 'bool'], default: 'int')] $oneWay = false
    ): ?string {}

    /**
     * The __setCookie purpose
     * @link https://php.net/manual/en/soapclient.setcookie.php
     * @param string $name <p>
     * The name of the cookie.
     * </p>
     * @param string $value [optional] <p>
     * The value of the cookie. If not specified, the cookie will be deleted.
     * </p>
     * @return void No value is returned.
     * @since 5.0.4
     */
    #[TentativeType]
    public function __setCookie(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(["8.0" => "string|null"], default: "string")] $value
    ): void {}

    /**
     * Sets the location of the Web service to use
     * @link https://php.net/manual/en/soapclient.setlocation.php
     * @param string $location [optional] <p>
     * The new endpoint URL.
     * </p>
     * @return string|null The old endpoint URL.
     * @since 5.0.1
     */
    #[TentativeType]
    public function __setLocation(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $location = ''): ?string {}

    /**
     * Sets SOAP headers for subsequent calls
     * @link https://php.net/manual/en/soapclient.setsoapheaders.php
     * @param mixed $headers <p>
     * The headers to be set. It could be <b>SoapHeader</b>
     * object or array of <b>SoapHeader</b> objects.
     * If not specified or set to <b>NULL</b>, the headers will be deleted.
     * </p>
     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
     * @since 5.0.5
     */
    #[TentativeType]
    public function __setSoapHeaders(
        #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $headers,
        #[PhpStormStubsElementAvailable(from: '7.0')] $headers = null
    ): bool {}
}

/**
 * A class representing a variable or object for use with SOAP services.
 * @link https://php.net/manual/en/class.soapvar.php
 */
class SoapVar
{
    /**
     * @var int
     * @since 8.1
     */
    public int $enc_type;

    /**
     * @var mixed
     * @since 8.1
     */
    public mixed $enc_value;

    /**
     * @var string|null
     * @since 8.1
     */
    public string|null $enc_stype;

    /**
     * @var string|null
     * @since 8.1
     */
    public string|null $enc_ns;

    /**
     * @var string|null
     * @since 8.1
     */
    public string|null $enc_name;

    /**
     * @var string|null
     * @since 8.1
     */
    public string|null $enc_namens;

    /**
     * SoapVar constructor
     * @link https://php.net/manual/en/soapvar.construct.php
     * @param mixed $data <p>
     * The data to pass or return.
     * </p>
     * @param int|null $encoding <p>
     * The encoding ID, one of the XSD_... constants.
     * </p>
     * @param string $typeName [optional] <p>
     * The type name.
     * </p>
     * @param string $typeNamespace [optional] <p>
     * The type namespace.
     * </p>
     * @param string $nodeName [optional] <p>
     * The XML node name.
     * </p>
     * @param string $nodeNamespace [optional] <p>
     * The XML node namespace.
     * </p>
     * @since 5.0.1
     */
    public function __construct(
        #[LanguageLevelTypeAware(["8.0" => 'mixed'], default: '')] $data,
        #[LanguageLevelTypeAware(["7.1" => "int|null"], default: "int")] $encoding,
        #[LanguageLevelTypeAware(["8.0" => "string|null"], default: "string")] $typeName,
        #[LanguageLevelTypeAware(["8.0" => 'string|null'], default: '')] $typeNamespace = '',
        #[LanguageLevelTypeAware(["8.0" => 'string|null'], default: '')] $nodeName = '',
        #[LanguageLevelTypeAware(["8.0" => 'string|null'], default: '')] $nodeNamespace = ''
    ) {}

    /**
     * SoapVar constructor
     * @link https://php.net/manual/en/soapvar.construct.php
     * @param mixed $data <p>
     * The data to pass or return.
     * </p>
     * @param int|null $encoding <p>
     * The encoding ID, one of the XSD_... constants.
     * </p>
     * @param string $type_name [optional] <p>
     * The type name.
     * </p>
     * @param string $type_namespace [optional] <p>
     * The type namespace.
     * </p>
     * @param string $node_name [optional] <p>
     * The XML node name.
     * </p>
     * @param string $node_namespace [optional] <p>
     * The XML node namespace.
     * </p>
     * @since 5.0.1
     * @removed 8.0
     */
    public function SoapVar($data, $encoding, $type_name = '', $type_namespace = '', $node_name = '', $node_namespace = '') {}
}

/**
 * The SoapServer class provides a server for the SOAP 1.1 and SOAP 1.2 protocols. It can be used with or without a WSDL service description.
 * @link https://php.net/manual/en/class.soapserver.php
 */
class SoapServer
{
    /**
     * SoapServer constructor
     * @link https://php.net/manual/en/soapserver.soapserver.php
     * @param mixed $wsdl <p>
     * To use the SoapServer in WSDL mode, pass the URI of a WSDL file.
     * Otherwise, pass <b>NULL</b> and set the uri option to the
     * target namespace for the server.
     * </p>
     * @param array $options [optional] <p>
     * Allow setting a default SOAP version (soap_version),
     * internal character encoding (encoding),
     * and actor URI (actor).
     * </p>
     * <p>
     * The classmap option can be used to map some WSDL
     * types to PHP classes. This option must be an array with WSDL types
     * as keys and names of PHP classes as values.
     * </p>
     * <p>
     * The typemap option is an array of type mappings.
     * Type mapping is an array with keys type_name,
     * type_ns (namespace URI), from_xml
     * (callback accepting one string parameter) and to_xml
     * (callback accepting one object parameter).
     * </p>
     * <p>
     * The cache_wsdl option is one of
     * <b>WSDL_CACHE_NONE</b>,
     * <b>WSDL_CACHE_DISK</b>,
     * <b>WSDL_CACHE_MEMORY</b> or
     * <b>WSDL_CACHE_BOTH</b>.
     * </p>
     * <p>
     * There is also a features option which can be set to
     * <b>SOAP_WAIT_ONE_WAY_CALLS</b>,
     * <b>SOAP_SINGLE_ELEMENT_ARRAYS</b>,
     * <b>SOAP_USE_XSI_ARRAY_TYPE</b>.
     * </p>
     * @since 5.0.1
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $wsdl,
        array $options = null
    ) {}

    /**
     * SoapServer constructor
     * @link https://php.net/manual/en/soapserver.soapserver.php
     * @param mixed $wsdl <p>
     * To use the SoapServer in WSDL mode, pass the URI of a WSDL file.
     * Otherwise, pass <b>NULL</b> and set the uri option to the
     * target namespace for the server.
     * </p>
     * @param array $options [optional] <p>
     * Allow setting a default SOAP version (soap_version),
     * internal character encoding (encoding),
     * and actor URI (actor).
     * </p>
     * <p>
     * The classmap option can be used to map some WSDL
     * types to PHP classes. This option must be an array with WSDL types
     * as keys and names of PHP classes as values.
     * </p>
     * <p>
     * The typemap option is an array of type mappings.
     * Type mapping is an array with keys type_name,
     * type_ns (namespace URI), from_xml
     * (callback accepting one string parameter) and to_xml
     * (callback accepting one object parameter).
     * </p>
     * <p>
     * The cache_wsdl option is one of
     * <b>WSDL_CACHE_NONE</b>,
     * <b>WSDL_CACHE_DISK</b>,
     * <b>WSDL_CACHE_MEMORY</b> or
     * <b>WSDL_CACHE_BOTH</b>.
     * </p>
     * <p>
     * There is also a features option which can be set to
     * <b>SOAP_WAIT_ONE_WAY_CALLS</b>,
     * <b>SOAP_SINGLE_ELEMENT_ARRAYS</b>,
     * <b>SOAP_USE_XSI_ARRAY_TYPE</b>.
     * </p>
     * @since 5.0.1
     * @removed 8.0
     */
    public function SoapServer($wsdl, array $options = null) {}

    /**
     * Sets SoapServer persistence mode
     * @link https://php.net/manual/en/soapserver.setpersistence.php
     * @param int $mode <p>
     * One of the SOAP_PERSISTENCE_XXX constants.
     * </p>
     * <p>
     * <b>SOAP_PERSISTENCE_REQUEST</b> - SoapServer data does not persist between
     * requests. This is the default behavior of any SoapServer
     * object after setClass is called.
     * </p>
     * <p>
     * <b>SOAP_PERSISTENCE_SESSION</b> - SoapServer data persists between requests.
     * This is accomplished by serializing the SoapServer class data into
     * $_SESSION['_bogus_session_name'], because of this
     * <b>session_start</b> must be called before this persistence mode is set.
     * </p>
     * @return void No value is returned.
     * @since 5.1.2
     */
    #[TentativeType]
    public function setPersistence(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode): void {}

    /**
     * Sets the class which handles SOAP requests
     * @link https://php.net/manual/en/soapserver.setclass.php
     * @param string $class <p>
     * The name of the exported class.
     * </p>
     * @param mixed ...$args [optional] These optional parameters will be passed to the default class constructor during object creation.
     * @return void No value is returned.
     * @since 5.0.1
     */
    #[TentativeType]
    public function setClass(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $class,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] ...$args
    ): void {}

    /**
     * Sets the object which will be used to handle SOAP requests
     * @link https://php.net/manual/en/soapserver.setobject.php
     * @param object $object <p>
     * The object to handle the requests.
     * </p>
     * @return void No value is returned.
     */
    #[TentativeType]
    public function setObject(object $object): void {}

    /**
     * Adds one or more functions to handle SOAP requests
     * @link https://php.net/manual/en/soapserver.addfunction.php
     * @param mixed $functions <p>
     * To export one function, pass the function name into this parameter as
     * a string.
     * </p>
     * <p>
     * To export several functions, pass an array of function names.
     * </p>
     * <p>
     * To export all the functions, pass a special constant <b>SOAP_FUNCTIONS_ALL</b>.
     * </p>
     * <p>
     * <i>functions</i> must receive all input arguments in the same
     * order as defined in the WSDL file (They should not receive any output parameters
     * as arguments) and return one or more values. To return several values they must
     * return an array with named output parameters.
     * </p>
     * @return void No value is returned.
     * @since 5.0.1
     */
    #[TentativeType]
    public function addFunction($functions): void {}

    /**
     * Returns list of defined functions
     * @link https://php.net/manual/en/soapserver.getfunctions.php
     * @return array An array of the defined functions.
     * @since 5.0.1
     */
    #[TentativeType]
    public function getFunctions(): array {}

    /**
     * Handles a SOAP request
     * @link https://php.net/manual/en/soapserver.handle.php
     * @param string $request [optional] <p>
     * The SOAP request. If this argument is omitted, the request is assumed to be
     * in the raw POST data of the HTTP request.
     * </p>
     * @return void No value is returned.
     * @since 5.0.1
     */
    #[TentativeType]
    public function handle(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $request = null): void {}

    /**
     * Issue SoapServer fault indicating an error
     * @link https://php.net/manual/en/soapserver.fault.php
     * @param string $code <p>
     * The error code to return
     * </p>
     * @param string $string <p>
     * A brief description of the error
     * </p>
     * @param string $actor [optional] <p>
     * A string identifying the actor that caused the fault.
     * </p>
     * @param string $details [optional] <p>
     * More details of the fault
     * </p>
     * @param string $name [optional] <p>
     * The name of the fault. This can be used to select a name from a WSDL file.
     * </p>
     * @return void No value is returned.
     * @since 5.0.1
     */
    #[TentativeType]
    public function fault(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $code,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $actor = null,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $details = null,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name = null
    ): void {}

    /**
     * Add a SOAP header to the response
     * @link https://php.net/manual/en/soapserver.addsoapheader.php
     * @param SoapHeader $header <p>
     * The header to be returned.
     * </p>
     * @return void No value is returned.
     * @since 5.0.1
     */
    #[TentativeType]
    public function addSoapHeader(SoapHeader $header): void {}
}

/**
 * Represents a SOAP fault.
 * @link https://php.net/manual/en/class.soapfault.php
 */
class SoapFault extends Exception
{
    /**
     * @var string
     */
    #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
    public $faultcode;

    /**
     * @var string
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $faultstring;

    /**
     * @var string
     */
    #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
    public $faultactor;

    /**
     * @var mixed
     */
    #[LanguageLevelTypeAware(['8.1' => 'mixed'], default: '')]
    public $detail;

    /**
     * @var string
     */
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $faultname;

    /**
     * @var mixed
     */
    #[LanguageLevelTypeAware(['8.1' => 'mixed'], default: '')]
    public $headerfault;

    /**
     * @var string|null
     * @since 8.1
     */
    public string|null $faultcodens;

    /**
     * @var string|null
     * @since 8.1
     */
    public string|null $_name;

    /**
     * SoapFault constructor
     * @link https://php.net/manual/en/soapfault.soapfault.php
     * @param string $code <p>
     * The error code of the <b>SoapFault</b>.
     * </p>
     * @param string $string <p>
     * The error message of the <b>SoapFault</b>.
     * </p>
     * @param string $actor [optional] <p>
     * A string identifying the actor that caused the error.
     * </p>
     * @param mixed $details [optional] <p>
     * More details about the cause of the error.
     * </p>
     * @param string $name [optional] <p>
     * Can be used to select the proper fault encoding from WSDL.
     * </p>
     * @param mixed $headerFault [optional] <p>
     * Can be used during SOAP header handling to report an error in the
     * response header.
     * </p>
     * @since 5.0.1
     */
    #[Pure]
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'array|string|null'], default: '')] $code,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $actor = null,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $details = null,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $name = null,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $headerFault = null
    ) {}

    /**
     * SoapFault constructor
     * @link https://php.net/manual/en/soapfault.soapfault.php
     * @param string $faultcode <p>
     * The error code of the <b>SoapFault</b>.
     * </p>
     * @param string $faultstring <p>
     * The error message of the <b>SoapFault</b>.
     * </p>
     * @param string $faultactor [optional] <p>
     * A string identifying the actor that caused the error.
     * </p>
     * @param string $detail [optional] <p>
     * More details about the cause of the error.
     * </p>
     * @param string $faultname [optional] <p>
     * Can be used to select the proper fault encoding from WSDL.
     * </p>
     * @param mixed $headerfault [optional] <p>
     * Can be used during SOAP header handling to report an error in the
     * response header.
     * </p>
     * @since 5.0.1
     * @removed 8.0
     */
    public function SoapFault($faultcode, $faultstring, $faultactor = null, $detail = null, $faultname = null, $headerfault = null) {}

    /**
     * Obtain a string representation of a SoapFault
     * @link https://php.net/manual/en/soapfault.tostring.php
     * @return string A string describing the SoapFault.
     * @since 5.0.1
     */
    #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')]
    public function __toString() {}
}

/**
 * Represents parameter to a SOAP call.
 * @link https://php.net/manual/en/class.soapparam.php
 */
class SoapParam
{
    /**
     * @var string
     * @since 8.1
     */
    public string $param_name;

    /**
     * @var mixed
     * @since 8.1
     */
    public mixed $param_data;

    /**
     * SoapParam constructor
     * @link https://php.net/manual/en/soapparam.soapparam.php
     * @param mixed $data <p>
     * The data to pass or return. This parameter can be passed directly as PHP
     * value, but in this case it will be named as paramN and
     * the SOAP service may not understand it.
     * </p>
     * @param string $name <p>
     * The parameter name.
     * </p>
     * @since 5.0.1
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $data,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name
    ) {}

    /**
     * SoapParam constructor
     * @link https://php.net/manual/en/soapparam.soapparam.php
     * @param mixed $data <p>
     * The data to pass or return. This parameter can be passed directly as PHP
     * value, but in this case it will be named as paramN and
     * the SOAP service may not understand it.
     * </p>
     * @param string $name <p>
     * The parameter name.
     * </p>
     * @since 5.0.1
     * @removed 8.0
     */
    public function SoapParam($data, $name) {}
}

/**
 * Represents a SOAP header.
 * @link https://php.net/manual/en/class.soapheader.php
 */
class SoapHeader
{
    /**
     * @var string
     * @since 8.1
     */
    public string $namespace;

    /**
     * @var string
     * @since 8.1
     */
    public string $name;

    /**
     * @var mixed
     * @since 8.1
     */
    public mixed $data;

    /**
     * @var bool
     * @since 8.1
     */
    public bool $mustUnderstand;

    /**
     * @var string|int|null
     * @since 8.1
     */
    public string|int|null $actor;

    /**
     * SoapHeader constructor
     * @link https://www.php.net/manual/en/soapheader.construct.php
     * @param string $namespace <p>
     * The namespace of the SOAP header element.
     * </p>
     * @param string $name <p>
     * The name of the SoapHeader object.
     * </p>
     * @param mixed $data [optional] <p>
     * A SOAP header's content. It can be a PHP value or a
     * <b>SoapVar</b> object.
     * </p>
     * @param bool $mustUnderstand [optional]
     * @param string $actor [optional] <p>
     * Value of the actor attribute of the SOAP header
     * element.
     * </p>
     * @since 5.0.1
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace,
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
        #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $data = null,
        #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $mustUnderstand = false,
        #[LanguageLevelTypeAware(['8.0' => 'string|int|null'], default: '')] $actor = null
    ) {}

    /**
     * SoapHeader constructor
     * @link https://php.net/manual/en/soapheader.soapheader.php
     * @param string $namespace <p>
     * The namespace of the SOAP header element.
     * </p>
     * @param string $name <p>
     * The name of the SoapHeader object.
     * </p>
     * @param mixed $data [optional] <p>
     * A SOAP header's content. It can be a PHP value or a
     * <b>SoapVar</b> object.
     * </p>
     * @param bool $mustunderstand [optional]
     * @param string $actor [optional] <p>
     * Value of the actor attribute of the SOAP header
     * element.
     * </p>
     * @since 5.0.1
     * @removed 8.0
     */
    public function SoapHeader($namespace, $name, $data = null, $mustunderstand = false, $actor = null) {}
}

/**
 * Set whether to use the SOAP error handler
 * @link https://php.net/manual/en/function.use-soap-error-handler.php
 * @param bool $enable [optional] <p>
 * Set to <b>TRUE</b> to send error details to clients.
 * </p>
 * @return bool the original value.
 */
function use_soap_error_handler(bool $enable = true): bool {}

/**
 * Checks if a SOAP call has failed
 * @link https://php.net/manual/en/function.is-soap-fault.php
 * @param mixed $object <p>
 * The object to test.
 * </p>
 * @return bool This will return <b>TRUE</b> on error, and <b>FALSE</b> otherwise.
 */
function is_soap_fault(mixed $object): bool {}

define('SOAP_1_1', 1);
define('SOAP_1_2', 2);
define('SOAP_PERSISTENCE_SESSION', 1);
define('SOAP_PERSISTENCE_REQUEST', 2);
define('SOAP_FUNCTIONS_ALL', 999);
define('SOAP_ENCODED', 1);
define('SOAP_LITERAL', 2);
define('SOAP_RPC', 1);
define('SOAP_DOCUMENT', 2);
define('SOAP_ACTOR_NEXT', 1);
define('SOAP_ACTOR_NONE', 2);
define('SOAP_ACTOR_UNLIMATERECEIVER', 3);
define('SOAP_COMPRESSION_ACCEPT', 32);
define('SOAP_COMPRESSION_GZIP', 0);
define('SOAP_COMPRESSION_DEFLATE', 16);
define('SOAP_AUTHENTICATION_BASIC', 0);
define('SOAP_AUTHENTICATION_DIGEST', 1);
define('UNKNOWN_TYPE', 999998);
define('XSD_STRING', 101);
define('XSD_BOOLEAN', 102);
define('XSD_DECIMAL', 103);
define('XSD_FLOAT', 104);
define('XSD_DOUBLE', 105);
define('XSD_DURATION', 106);
define('XSD_DATETIME', 107);
define('XSD_TIME', 108);
define('XSD_DATE', 109);
define('XSD_GYEARMONTH', 110);
define('XSD_GYEAR', 111);
define('XSD_GMONTHDAY', 112);
define('XSD_GDAY', 113);
define('XSD_GMONTH', 114);
define('XSD_HEXBINARY', 115);
define('XSD_BASE64BINARY', 116);
define('XSD_ANYURI', 117);
define('XSD_QNAME', 118);
define('XSD_NOTATION', 119);
define('XSD_NORMALIZEDSTRING', 120);
define('XSD_TOKEN', 121);
define('XSD_LANGUAGE', 122);
define('XSD_NMTOKEN', 123);
define('XSD_NAME', 124);
define('XSD_NCNAME', 125);
define('XSD_ID', 126);
define('XSD_IDREF', 127);
define('XSD_IDREFS', 128);
define('XSD_ENTITY', 129);
define('XSD_ENTITIES', 130);
define('XSD_INTEGER', 131);
define('XSD_NONPOSITIVEINTEGER', 132);
define('XSD_NEGATIVEINTEGER', 133);
define('XSD_LONG', 134);
define('XSD_INT', 135);
define('XSD_SHORT', 136);
define('XSD_BYTE', 137);
define('XSD_NONNEGATIVEINTEGER', 138);
define('XSD_UNSIGNEDLONG', 139);
define('XSD_UNSIGNEDINT', 140);
define('XSD_UNSIGNEDSHORT', 141);
define('XSD_UNSIGNEDBYTE', 142);
define('XSD_POSITIVEINTEGER', 143);
define('XSD_NMTOKENS', 144);
define('XSD_ANYTYPE', 145);
define('XSD_ANYXML', 147);
define('APACHE_MAP', 200);
define('SOAP_ENC_OBJECT', 301);
define('SOAP_ENC_ARRAY', 300);
define('XSD_1999_TIMEINSTANT', 401);
define('XSD_NAMESPACE', "http://www.w3.org/2001/XMLSchema");
define('XSD_1999_NAMESPACE', "http://www.w3.org/1999/XMLSchema");
define('SOAP_SINGLE_ELEMENT_ARRAYS', 1);
define('SOAP_WAIT_ONE_WAY_CALLS', 2);
define('SOAP_USE_XSI_ARRAY_TYPE', 4);
define('WSDL_CACHE_NONE', 0);
define('WSDL_CACHE_DISK', 1);
define('WSDL_CACHE_MEMORY', 2);
define('WSDL_CACHE_BOTH', 3);

/**
 * @link https://php.net/manual/en/soap.constants.php
 * @since 5.5
 */
define('SOAP_SSL_METHOD_TLS', 0);

/**
 * @link https://php.net/manual/en/soap.constants.php
 * @since 5.5
 */
define('SOAP_SSL_METHOD_SSLv2', 1);

/**
 * @link https://php.net/manual/en/soap.constants.php
 * @since 5.5
 */
define('SOAP_SSL_METHOD_SSLv3', 2);

/**
 * @link https://php.net/manual/en/soap.constants.php
 * @since 5.5
 */
define('SOAP_SSL_METHOD_SSLv23', 3);

// End of soap v.
<?php

// Start of msgpack 0.5.0

const MESSAGEPACK_OPT_PHPONLY = -1001;

/**
 * Serialize a variable into msgpack format
 * @param mixed $value
 * @return string
 */
function msgpack_serialize($value) {}

/**
 * Unserialize $str
 * @param string $str
 * @param null|array|string|object $object <p>
 *  Undocumented template parameter
 * </p>
 * @return mixed
 */
function msgpack_unserialize($str, $object = null) {}

/**
 * Alias of msgpack_serialize
 * @param mixed $value
 * @return string
 */
function msgpack_pack($value) {}

/**
 * Alias of msgpack_unserialize
 * @param string $str
 * @param null|array|string|object $object <p>
 *  Undocumented template parameter
 *  <p>
 * @return mixed
 */
function msgpack_unpack($str, $object = null) {}

class MessagePack
{
    public const OPT_PHPONLY = -1001;

    /**
     * @param $opt [optional]
     */
    public function __construct($opt) {}

    public function setOption($option, $value) {}

    public function pack($value) {}

    /**
     * @param $str
     * @param $object [optional]
     */
    public function unpack($str, $object) {}

    public function unpacker() {}
}

class MessagePackUnpacker
{
    /**
     * @param $opt [optional]
     */
    public function __construct($opt) {}

    public function __destruct() {}

    public function setOption($option, $value) {}

    public function feed($str) {}

    /**
     * @param $str [optional]
     * @param $offset [optional]
     */
    public function execute($str, &$offset) {}

    /**
     * @param $object [optional]
     */
    public function data($object) {}

    public function reset() {}
}
version: '3'
services:
  php_under_test:
    build: tests/DockerImages/${PHP_VERSION}
    volumes:
      - .:/opt/project/phpstorm-stubs
  test_runner:
    build: tests/DockerImages/testRunner
    volumes:
      - .:/opt/project/phpstorm-stubs
  pecl_extensions:
    build: tests/DockerImages/peclExtensions
    volumes:
      - .:/opt/project/phpstorm-stubs
<?php

// Start of ereg v.
use JetBrains\PhpStorm\Deprecated;

/**
 * Regular expression match
 * @link https://php.net/manual/en/function.ereg.php
 * @param string $pattern <p>
 * Case sensitive regular expression.
 * </p>
 * @param string $string <p>
 * The input string.
 * </p>
 * @param null|array &$regs [optional] <p>
 * If matches are found for parenthesized substrings of
 * <i>pattern</i> and the function is called with the
 * third argument <i>regs</i>, the matches will be stored
 * in the elements of the array <i>regs</i>.
 * </p>
 * <p>
 * $regs[1] will contain the substring which starts at
 * the first left parenthesis; $regs[2] will contain
 * the substring starting at the second, and so on.
 * $regs[0] will contain a copy of the complete string
 * matched.
 * </p>
 * @return int the length of the matched string if a match for
 * <i>pattern</i> was found in <i>string</i>,
 * or <b>FALSE</b> if no matches were found or an error occurred.
 * </p>
 * <p>
 * If the optional parameter <i>regs</i> was not passed or
 * the length of the matched string is 0, this function returns 1.
 * @removed 7.0
 * @see preg_match()
 */
#[Deprecated(reason: "Use preg_match() instead", since: "5.3")]
function ereg($pattern, $string, ?array &$regs = null) {}

/**
 * Replace regular expression
 * @link https://php.net/manual/en/function.ereg-replace.php
 * @param string $pattern <p>
 * A POSIX extended regular expression.
 * </p>
 * @param string $replacement <p>
 * If <i>pattern</i> contains parenthesized substrings,
 * <i>replacement</i> may contain substrings of the form
 * \digit, which will be
 * replaced by the text matching the digit'th parenthesized substring;
 * \0 will produce the entire contents of string.
 * Up to nine substrings may be used. Parentheses may be nested, in which
 * case they are counted by the opening parenthesis.
 * </p>
 * @param string $string <p>
 * The input string.
 * </p>
 * @return string The modified string is returned. If no matches are found in
 * <i>string</i>, then it will be returned unchanged.
 * @removed 7.0
 * @see preg_replace()
 */
#[Deprecated(reason: "Use preg_replace() instead", since: "5.3")]
function ereg_replace($pattern, $replacement, $string) {}

/**
 * Case insensitive regular expression match
 * @link https://php.net/manual/en/function.eregi.php
 * @param string $pattern <p>
 * Case insensitive regular expression.
 * </p>
 * @param string $string <p>
 * The input string.
 * </p>
 * @param null|array &$regs [optional] <p>
 * If matches are found for parenthesized substrings of
 * <i>pattern</i> and the function is called with the
 * third argument <i>regs</i>, the matches will be stored
 * in the elements of the array <i>regs</i>.
 * </p>
 * <p>
 * $regs[1] will contain the substring which starts at the first left
 * parenthesis; $regs[2] will contain the substring starting at the
 * second, and so on. $regs[0] will contain a copy of the complete string
 * matched.
 * </p>
 * @return int the length of the matched string if a match for
 * <i>pattern</i> was found in <i>string</i>,
 * or <b>FALSE</b> if no matches were found or an error occurred.
 * </p>
 * <p>
 * If the optional parameter <i>regs</i> was not passed or
 * the length of the matched string is 0, this function returns 1.
 * @removed 7.0
 * @see preg_match()
 */
#[Deprecated(reason: "Use preg_match() instead", since: "5.3")]
function eregi($pattern, $string, array &$regs = null) {}

/**
 * Replace regular expression case insensitive
 * @link https://php.net/manual/en/function.eregi-replace.php
 * @param string $pattern <p>
 * A POSIX extended regular expression.
 * </p>
 * @param string $replacement <p>
 * If <i>pattern</i> contains parenthesized substrings,
 * <i>replacement</i> may contain substrings of the form
 * \digit, which will be
 * replaced by the text matching the digit'th parenthesized substring;
 * \0 will produce the entire contents of string.
 * Up to nine substrings may be used. Parentheses may be nested, in which
 * case they are counted by the opening parenthesis.
 * </p>
 * @param string $string <p>
 * The input string.
 * </p>
 * @return string The modified string is returned. If no matches are found in
 * <i>string</i>, then it will be returned unchanged.
 * @removed 7.0
 * @see preg_replace()
 */
#[Deprecated(reason: "Use preg_replace() instead", since: "5.3")]
function eregi_replace($pattern, $replacement, $string) {}

/**
 * Split string into array by regular expression
 * @link https://php.net/manual/en/function.split.php
 * @param string $pattern <p>
 * Case sensitive regular expression.
 * </p>
 * <p>
 * If you want to split on any of the characters which are considered
 * special by regular expressions, you'll need to escape them first. If
 * you think <b>split</b> (or any other regex function, for
 * that matter) is doing something weird, please read the file
 * regex.7, included in the
 * regex/ subdirectory of the PHP distribution. It's
 * in manpage format, so you'll want to do something along the lines of
 * man /usr/local/src/regex/regex.7 in order to read it.
 * </p>
 * @param string $string <p>
 * The input string.
 * </p>
 * @param int $limit [optional] <p>
 * If <i>limit</i> is set, the returned array will
 * contain a maximum of <i>limit</i> elements with the
 * last element containing the whole rest of
 * <i>string</i>.
 * </p>
 * @return array an array of strings, each of which is a substring of
 * <i>string</i> formed by splitting it on boundaries formed
 * by the case-sensitive regular expression <i>pattern</i>.
 * </p>
 * <p>
 * If there are n occurrences of
 * <i>pattern</i>, the returned array will contain
 * n+1 items. For example, if
 * there is no occurrence of <i>pattern</i>, an array with
 * only one element will be returned. Of course, this is also true if
 * <i>string</i> is empty. If an error occurs,
 * <b>split</b> returns <b>FALSE</b>.
 * @removed 7.0
 * @see preg_split()
 */
#[Deprecated(reason: "Use preg_split() instead", since: "5.3")]
function split($pattern, $string, $limit = -1) {}

/**
 * Split string into array by regular expression case insensitive
 * @link https://php.net/manual/en/function.spliti.php
 * @param string $pattern <p>
 * Case insensitive regular expression.
 * </p>
 * <p>
 * If you want to split on any of the characters which are considered
 * special by regular expressions, you'll need to escape them first. If
 * you think <b>spliti</b> (or any other regex function, for
 * that matter) is doing something weird, please read the file
 * regex.7, included in the
 * regex/ subdirectory of the PHP distribution. It's
 * in manpage format, so you'll want to do something along the lines of
 * man /usr/local/src/regex/regex.7 in order to read it.
 * </p>
 * @param string $string <p>
 * The input string.
 * </p>
 * @param int $limit [optional] <p>
 * If <i>limit</i> is set, the returned array will
 * contain a maximum of <i>limit</i> elements with the
 * last element containing the whole rest of
 * <i>string</i>.
 * </p>
 * @return array an array of strings, each of which is a substring of
 * <i>string</i> formed by splitting it on boundaries formed
 * by the case insensitive regular expression <i>pattern</i>.
 * </p>
 * <p>
 * If there are n occurrences of
 * <i>pattern</i>, the returned array will contain
 * n+1 items. For example, if
 * there is no occurrence of <i>pattern</i>, an array with
 * only one element will be returned. Of course, this is also true if
 * <i>string</i> is empty. If an error occurs,
 * <b>spliti</b> returns <b>FALSE</b>.
 * @removed 7.0
 * @see preg_split()
 */
#[Deprecated(reason: "Use preg_split() instead", since: "5.3")]
function spliti($pattern, $string, $limit = -1) {}

/**
 * Make regular expression for case insensitive match
 * @link https://php.net/manual/en/function.sql-regcase.php
 * @param string $string <p>
 * The input string.
 * </p>
 * @return string a valid regular expression which will match
 * <i>string</i>, ignoring case. This expression is
 * <i>string</i> with each alphabetic character converted to
 * a bracket expression; this bracket expression contains that character's
 * uppercase and lowercase form. Other characters remain unchanged.
 * @removed 7.0
 */
#[Deprecated(since: '5.3')]
function sql_regcase($string) {}

// End of ereg v.
<?php

namespace ast {
/** Metadata entry for a single AST kind, as returned by ast\get_metadata(). */
class Metadata
{
    /** @var string[] List of supported flags. The flags are given as names of constants, such as "ast\flags\TYPE_STRING". */
    public $flags;

    /** @var bool Whether the flags are exclusive or combinable. Exclusive flags should be checked using ===, while combinable flags should be checked using &. */
    public $flagsCombinable;

    /** @var int AST node kind (one of the `ast\AST_*` constants). */
    public $kind;

    /** @var string Name of the node kind (e.g. "AST_NAME"). */
    public $name;
}

/** This class describes a single node in a PHP AST. */
class Node
{
    /** @var array Child nodes (may be empty) */
    public $children;

    /** @var int Line the node ends on. */
    public $endLineno;

    /** @var int Certain node kinds have flags that can be set. These will be a bitfield of `ast\flags\*` constants. */
    public $flags;

    /** @var int AST Node Kind. Values are one of `ast\AST_*` constants. */
    public $kind;

    /** @var int Line the node starts on. */
    public $lineno;

    /**
     * A constructor which accepts any types for the properties.
     * For backwards compatibility reasons, all values are optional and can be any type, and properties default to null.
     *
     * @param int|null $kind
     * @param int|null $flags
     * @param array|null $children
     * @param int|null $lineno
     */
    public function __construct(?int $kind = null, ?int $flags = null, ?array $children = null, ?int $lineno = null) {}
}

/**
 * @param int $kind AST_* constant value defining the kind of an AST node
 * @return string String representation of AST kind value
 */
function get_kind_name(int $kind): string {}
/**
 * Provides metadata for the AST kinds.
 *
 * The returned array is a map from AST kind to a Metadata object.
 *
 * @return Metadata[] Metadata about AST kinds
 */
function get_metadata(): array {}
/**
 * Returns currently supported AST versions.
 *
 * @param bool $exclude_deprecated Whether to exclude deprecated versions
 * @return int[] Array of supported AST versions
 */
function get_supported_versions(bool $exclude_deprecated = false): array {}
/**
 * @param int $kind AST_* constant value defining the kind of an AST node
 * @return bool Returns true if AST kind uses flags
 */
function kind_uses_flags(int $kind): bool {}
/**
 * Parses code string and returns an AST root node.
 *
 * @param string $code Code to parse
 * @param int    $version  AST version
 * @param string $filename file name for ParseError messages
 * @return Node Root node of AST
 *
 * @see https://github.com/nikic/php-ast for version information
 */
function parse_code(string $code, int $version, string $filename = 'string code'): Node {}
/**
 * Parses code from a file and returns an AST root node.
 *
 * @param string $filename file name to parse
 * @param int    $version  AST version
 * @return Node Root node of AST
 *
 * @see https://github.com/nikic/php-ast for version information
 */
function parse_file(string $filename, int $version): Node {}
/** Numerically indexed children of an argument list of a function/method invocation */
const AST_ARG_LIST = 128;
/** Numerically indexed children of an array literal. */
const AST_ARRAY = 129;
/** An element of an array literal. The key is `null` if there is no key (children: value, key) */
const AST_ARRAY_ELEM = 526;
/** A short arrow function declaration. (children: name, docComment, params, stmts, returnType, __declId) */
const AST_ARROW_FUNC = 71;
/** An assignment of the form `var = expr` (children: var, expr) */
const AST_ASSIGN = 518;
/** An assignment operation of the form `var op= expr`. The operation is determined by the flags `ast\flags\BINARY_*` (children: var, expr) */
const AST_ASSIGN_OP = 520;
/** An assignment by reference, of the form `var =& expr`. (children: var, expr) */
const AST_ASSIGN_REF = 519;
/** A single attribute of an element of the form `class(args)` (children: class, args) */
const AST_ATTRIBUTE = 547;
/** Numerically indexed ast\AST_ATTRIBUTE children of an attribute group */
const AST_ATTRIBUTE_GROUP = 146;
/** Numerically indexed ast\AST_ATTRIBUTE_GROUP children of an attribute list of an element */
const AST_ATTRIBUTE_LIST = 145;
/** A binary operation of the form `left op right`. The operation is determined by the flags `ast\flags\BINARY_*` (children: left, right) */
const AST_BINARY_OP = 521;
/** A break statement. The depth is null or an integer. (children: depth) */
const AST_BREAK = 286;
/** A global function invocation of the form `expr(args)` (children: expr, args) */
const AST_CALL = 516;
/** A cast operation of the form `(type)expr`. The flags are the type: `ast\flags\TYPE_*` (children: expr) */
const AST_CAST = 261;
/** An individual catch block catching an `ast\AST_CLASS_LIST` of possible classes. This is of the form `catch(class var) { stmts }`. (children: class, var, stmts) */
const AST_CATCH = 773;
/** A list of 1 or more `ast\AST_CATCH` nodes for a try statement. (numerically indexed children) */
const AST_CATCH_LIST = 135;
/** A class declaration of the form `docComment name EXTENDS extends IMPLEMENTS implements { stmts }` (children: name, docComment, extends, implements, stmts, __declId) */
const AST_CLASS = 70;
/** A class constant usage of the form `class::const`. (children: class, const) */
const AST_CLASS_CONST = 517;
/** A class constant declaration with one or more class constants. (numerically indexed children) */
const AST_CLASS_CONST_DECL = 140;
/** A class constant declaration with attributes and the list of one or more class constants. (children: const, attributes) */
const AST_CLASS_CONST_GROUP = 546;
/** A usage of `class::CLASS` in AST version 70 (children: class) */
const AST_CLASS_NAME = 276;
/** An expression cloning an object, of the form `clone(expr)`. (children: expr) */
const AST_CLONE = 266;
/** A closure declaration. (children: name, docComment, params, uses, stmts, returnType, __declId) */
const AST_CLOSURE = 68;
/** A list of one or more nodes of type `ast\AST_CLOSURE_VAR` for a closure declaration. (numerically indexed children) */
const AST_CLOSURE_USES = 137;
/** A variable in the list of `uses` of a closure declaration. (children: name) */
const AST_CLOSURE_VAR = 2049;
/** A conditional expression of the form `cond ? true : false` or `cond ?: false`. (children: cond, true, false) */
const AST_CONDITIONAL = 771;
/** A usage of a global constant `name`. (children: name) */
const AST_CONST = 257;
/** A declaration of a group of class constants of kind `ast\AST_CONST_ELEM`. (numerically indexed children) */
const AST_CONST_DECL = 139;
/** A declaration of a class constant. (children: name, value, docComment) */
const AST_CONST_ELEM = 776;
/** A continue statement with a depth of `null` or an integer. (children: depth) */
const AST_CONTINUE = 287;
/** A declare statement at the top of a php file (children: declares, stmts) */
const AST_DECLARE = 538;
/** A usage of an array/array-like field, of the form `expr[dim]` (children: expr, dim) */
const AST_DIM = 512;
/** A do-while statement of the form `do {stmts} while (cond);`. (children: stmts, cond) */
const AST_DO_WHILE = 534;
/** An echo statement or inline HTML (children: expr) */
const AST_ECHO = 283;
/** An `empty(expr)` expression (children: expr) */
const AST_EMPTY = 262;
/** interpolated string with non-literals, e.g. `"foo$bar"` or heredoc (numerically indexed children) */
const AST_ENCAPS_LIST = 130;
/** An `exit`/`die` statement. (children: expr) */
const AST_EXIT = 267;
/** A comma separated list of expressions, e.g. for the condition of a `for` loop. (numerically indexed children) */
const AST_EXPR_LIST = 131;
/** A for loop of the form `for (init; cond; loop) { stmts; }`. (children: init, cond, loop, stmts) */
const AST_FOR = 1024;
/** A foreach loop of the form `foreach (expr as [key =>] value) {stmts} (children: expr, value, key, stmts) */
const AST_FOREACH = 1025;
/** A global function declaration. (children: name, docComment, params, stmts, returnType, __declId) */
const AST_FUNC_DECL = 67;
/** A usage of a global variable of the form `global var`. (children: var) */
const AST_GLOBAL = 277;
/** A goto statement of the form `goto label;` (children: label) */
const AST_GOTO = 285;
/** A use statement (for classes, namespaces, functions, and/or constants) containing a list of one or more elements. (children: prefix, uses) */
const AST_GROUP_USE = 545;
/** A `__halt_compiler;` statement. (children: offset) */
const AST_HALT_COMPILER = 282;
/** A list of `ast\AST_IF_ELEM` nodes for a chain of 1 or more `if`/`elseif`/`else` statements (numerically indexed children) */
const AST_IF = 133;
/** An `if`/`elseif`/`elseif` statement of the form `if (cond) stmts` (children: cond, stmts) */
const AST_IF_ELEM = 535;
/** An `include*(expr)`, `require*(expr)`, or `eval(expr)` statement. The type can be determined from the flags (`ast\flags\EXEC_*`). (children: expr) */
const AST_INCLUDE_OR_EVAL = 269;
/** An `expr instanceof class` expression. (children: expr, class) */
const AST_INSTANCEOF = 528;
/** An `isset(var)` expression. (children: var) */
const AST_ISSET = 263;
/** A `name:` expression (a target for `goto name`). (children: name) */
const AST_LABEL = 280;
/** Used for `list() = ` unpacking, etc. Predates AST version 50. (numerically indexed children) */
const AST_LIST = 255;
/** A magic constant (depends on flags that are one of `ast\flags\MAGIC_*`) */
const AST_MAGIC_CONST = 0;
/** A match expression of the form `match(cond) { stmts }` (children: cond, stmts) */
const AST_MATCH = 548;
/** An arm of a match expression of the form `cond => expr` (children: cond, expr) */
const AST_MATCH_ARM = 549;
/** Numerically indexed children of the kind `ast\AST_MATCH_ARM` for the statements of a match expression */
const AST_MATCH_ARM_LIST = 147;
/** A method declaration. (children: name, docComment, params, stmts, returnType, __declId) */
const AST_METHOD = 69;
/** An invocation of an instance method, of the form `expr->method(args)` (children: expr, method, args) */
const AST_METHOD_CALL = 768;
/** A reference to a method when using a trait inside a class declaration. (children: class, method) */
const AST_METHOD_REFERENCE = 541;
/** A name token (e.g. of a constant/class/class type) (children: name) */
const AST_NAME = 2048;
/** A named argument in an argument list of a function/method call. (children: name, expr) */
const AST_NAMED_ARG = 550;
/** A namespace declaration of the form `namespace name;` or `namespace name { stmts }`. (children: name, stmts) */
const AST_NAMESPACE = 542;
/** A list of names (e.g. for catching multiple classes in a `catch` statement) (numerically indexed children) */
const AST_NAME_LIST = 141;
/** An object creation expression of the form `new class(args)` (children: class, args) */
const AST_NEW = 527;
/** A nullable node with a child node of kind `ast\AST_TYPE` or `ast\AST_NAME` (children: type) */
const AST_NULLABLE_TYPE = 2050;
/** A nullsafe method call of the form `expr?->method(args)`. (children: expr, method, args) */
const AST_NULLSAFE_METHOD_CALL = 769;
/** A nullsafe property read of the form `expr?->prop`. (children: expr, prop) */
const AST_NULLSAFE_PROP = 514;
/** A parameter of a function, closure, or method declaration. (children: type, name, default) */
const AST_PARAM = 1280;
/** The list of parameters of a function, closure, or method declaration. (numerically indexed children) */
const AST_PARAM_LIST = 136;
/** A `var--` expression. (children: var) */
const AST_POST_DEC = 274;
/** A `var++` expression. (children: var) */
const AST_POST_INC = 273;
/** A `--var` expression. (children: var) */
const AST_PRE_DEC = 272;
/** A `++var` expression. (children: var) */
const AST_PRE_INC = 271;
/** A `print expr` expression.  (children: expr) */
const AST_PRINT = 268;
/** An instance property usage of the form `expr->prop` (children: expr, prop) */
const AST_PROP = 513;
/** A single group of property declarations inside a class. (numerically indexed children) */
const AST_PROP_DECL = 138;
/** A class property declaration. (children: name, default, docComment) */
const AST_PROP_ELEM = 775;
/** A class property group declaration with optional type information for the group (in PHP 7.4+). Used in AST version 70+ (children: type, props, __declId) */
const AST_PROP_GROUP = 774;
/** Used for `&$v` in `foreach ($a as &$v)` (children: var) */
const AST_REF = 281;
/** A `return;` or `return expr` statement. (children: expr) */
const AST_RETURN = 279;
/** A `\`some_shell_command\`` expression. (children: expr) */
const AST_SHELL_EXEC = 265;
/** A declaration of a static local variable of the form `static var = default`. (children: var, default) */
const AST_STATIC = 532;
/** A call of a static method, of the form `class::method(args)`. (children: class, method, args) */
const AST_STATIC_CALL = 770;
/** A usage of a static property, of the form `class::prop`. (children: class, prop) */
const AST_STATIC_PROP = 515;
/** A list of statements. The statements are usually nodes but can be non-nodes, e.g. `;2;`. (numerically indexed children) */
const AST_STMT_LIST = 132;
/** A switch statement of the form `switch(cond) { stmts }`. `stmts` is a node of the kind `ast\AST_SWITCH_LIST`. (children: cond, stmts) */
const AST_SWITCH = 536;
/** A case statement of a switch, of the form `case cond: stmts` (children: cond, stmts) */
const AST_SWITCH_CASE = 537;
/** The full list of nodes inside a switch statement body, each of kind `ast\AST_SWITCH_CASE`. (numerically indexed children) */
const AST_SWITCH_LIST = 134;
/** A throw statement of the form `throw expr;` (children: expr) */
const AST_THROW = 284;
/** The optional adaptations to a statement using a trait inside a class (numerically indexed children) */
const AST_TRAIT_ADAPTATIONS = 142;
/** Adds an alias inside of a use of a trait (`method as alias`) (children: method, alias) */
const AST_TRAIT_ALIAS = 544;
/** Indicates the precedent of a trait over another trait (`method INSTEADOF insteadof`) (children: method, insteadof) */
const AST_TRAIT_PRECEDENCE = 540;
/** A try/catch(es)/finally block. (children: try, catches, finally) */
const AST_TRY = 772;
/** A type such as `bool`. Other types such as specific classes are represented as `ast\AST_NAME`s (depends on flags of `ast\flags\TYPE_*`) */
const AST_TYPE = 1;
/** A union type made up of individual types, such as `bool|int` (numerically indexed children) */
const AST_TYPE_UNION = 144;
/** A unary operation of the form `op expr` (e.g. `-expr`, the flags can be one of `ast\flags\UNARY_*`) (children: expr) */
const AST_UNARY_OP = 270;
/** An expression unpacking an array/iterable (i.e. `...expr`) (children: expr) */
const AST_UNPACK = 258;
/** `unset(var)` - A statement unsetting the expression `var` (children: var) */
const AST_UNSET = 278;
/** A list of uses of classes/namespaces, functions, and constants. The child nodes are of the kind `ast\AST_USE_ELEM` (numerically indexed children) */
const AST_USE = 143;
/** A single use statement for a group of (children: name, alias) */
const AST_USE_ELEM = 543;
/** Represents `use traits {[adaptations]}` within a class declaration (children: traits, adaptations) */
const AST_USE_TRAIT = 539;
/** An occurrence of a variable `$name` or `${name}`. (children: name) */
const AST_VAR = 256;
/** A while loop of the form `while (cond) { stmts }` (children: cond, stmts) */
const AST_WHILE = 533;
/** An expression of the form `yield [key =>] value` (children: value, key) */
const AST_YIELD = 529;
/** An expression of the form `yield from expr` (children: expr) */
const AST_YIELD_FROM = 275;
}

namespace ast\flags {
/** Marks an `ast\AST_ARRAY_ELEM` as a reference */
const ARRAY_ELEM_REF = 1;
/** Marks an `ast\AST_ARRAY` as using the `list(...)` syntax */
const ARRAY_SYNTAX_LIST = 1;
/** Marks an `ast\AST_ARRAY` as using the `array(...)` syntax */
const ARRAY_SYNTAX_LONG = 2;
/** Marks an `ast\AST_ARRAY` as using the `[...]` syntax */
const ARRAY_SYNTAX_SHORT = 3;
/** Marks an ast\AST_BINARY_OP as being a `+` */
const BINARY_ADD = 1;
/** Marks an ast\AST_BINARY_OP as being a `&` */
const BINARY_BITWISE_AND = 10;
/** Marks an ast\AST_BINARY_OP as being a `|` */
const BINARY_BITWISE_OR = 9;
/** Marks an ast\AST_BINARY_OP as being a `^` */
const BINARY_BITWISE_XOR = 11;
/** Marks an ast\AST_BINARY_OP as being a `&&` or `and` */
const BINARY_BOOL_AND = 259;
/** Marks an ast\AST_BINARY_OP as being a `||` or `or` */
const BINARY_BOOL_OR = 258;
/** Marks an ast\AST_BINARY_OP as being an `xor` */
const BINARY_BOOL_XOR = 15;
/** Marks an ast\AST_BINARY_OP as being a `??` */
const BINARY_COALESCE = 260;
/** Marks an ast\AST_BINARY_OP as being a `.` */
const BINARY_CONCAT = 8;
/** Marks an ast\AST_BINARY_OP as being a `/` */
const BINARY_DIV = 4;
/** Marks an ast\AST_BINARY_OP as being a `==` */
const BINARY_IS_EQUAL = 18;
/** Marks an ast\AST_BINARY_OP as being a `>` */
const BINARY_IS_GREATER = 256;
/** Marks an ast\AST_BINARY_OP as being a `>=` */
const BINARY_IS_GREATER_OR_EQUAL = 257;
/** Marks an ast\AST_BINARY_OP as being a `===` */
const BINARY_IS_IDENTICAL = 16;
/** Marks an ast\AST_BINARY_OP as being a `!=` */
const BINARY_IS_NOT_EQUAL = 19;
/** Marks an ast\AST_BINARY_OP as being a `!==` */
const BINARY_IS_NOT_IDENTICAL = 17;
/** Marks an ast\AST_BINARY_OP as being a `<` */
const BINARY_IS_SMALLER = 20;
/** Marks an ast\AST_BINARY_OP as being a `<=` */
const BINARY_IS_SMALLER_OR_EQUAL = 21;
/** Marks an ast\AST_BINARY_OP as being a `%` */
const BINARY_MOD = 5;
/** Marks an ast\AST_BINARY_OP as being a `*` */
const BINARY_MUL = 3;
/** Marks an ast\AST_BINARY_OP as being a `**` */
const BINARY_POW = 12;
/** Marks an ast\AST_BINARY_OP as being a `<<` */
const BINARY_SHIFT_LEFT = 6;
/** Marks an ast\AST_BINARY_OP as being a `>>` */
const BINARY_SHIFT_RIGHT = 7;
/** Marks an ast\AST_BINARY_OP as being a `<=>` */
const BINARY_SPACESHIP = 170;
/** Marks an ast\AST_BINARY_OP as being a `-` */
const BINARY_SUB = 2;
/** Marks a `ast\AST_CLASS` (class-like declaration) as being abstract */
const CLASS_ABSTRACT = 64;
/** Marks a `ast\AST_CLASS` (class-like declaration) as being anonymous */
const CLASS_ANONYMOUS = 4;
/** Marks a `ast\AST_CLASS` (class-like declaration) as being final */
const CLASS_FINAL = 32;
/** Marks a `ast\AST_CLASS` (class-like declaration) as being an interface */
const CLASS_INTERFACE = 1;
/** Marks a `ast\AST_CLASS` (class-like declaration) as being a trait */
const CLASS_TRAIT = 2;
/** Marks an `ast\AST_CLOSURE_USE` as using a variable by reference */
const CLOSURE_USE_REF = 1;
/** Marks an `ast\AST_DIM` as using the alternative `expr{dim}` syntax */
const DIM_ALTERNATIVE_SYNTAX = 2;
/** Marks an `ast\AST_EXEC` as being an `eval(...)` */
const EXEC_EVAL = 1;
/** Marks an `ast\AST_EXEC` as being an `include` */
const EXEC_INCLUDE = 2;
/** Marks an `ast\AST_EXEC` as being an `include_once` */
const EXEC_INCLUDE_ONCE = 4;
/** Marks an `ast\AST_EXEC` as being a `require` */
const EXEC_REQUIRE = 8;
/** Marks an `ast\AST_EXEC` as being a `require_once` */
const EXEC_REQUIRE_ONCE = 16;
/** Marks an `ast\AST_FUNC_DECL` as being a generator */
const FUNC_GENERATOR = 16777216;
/** Marks an `ast\AST_FUNC_DECL` as returning a value by reference */
const FUNC_RETURNS_REF = 4096;
/** Marks an `ast\AST_MAGIC_CONST` as being `__CLASS__` */
const MAGIC_CLASS = 378;
/** Marks an `ast\AST_MAGIC_CONST` as being `__DIR__` */
const MAGIC_DIR = 377;
/** Marks an `ast\AST_MAGIC_CONST` as being `__FILE__` */
const MAGIC_FILE = 376;
/** Marks an `ast\AST_MAGIC_CONST` as being `__FUNCTION__` */
const MAGIC_FUNCTION = 381;
/** Marks an `ast\AST_MAGIC_CONST` as being `__LINE__` */
const MAGIC_LINE = 375;
/** Marks an `ast\AST_MAGIC_CONST` as being `__METHOD__` */
const MAGIC_METHOD = 380;
/** Marks an `ast\AST_MAGIC_CONST` as being `__NAMESPACE__` */
const MAGIC_NAMESPACE = 382;
/** Marks an `ast\AST_MAGIC_CONST` as being `__TRAIT__` */
const MAGIC_TRAIT = 379;
/** Marks an element declaration as being `abstract` */
const MODIFIER_ABSTRACT = 64;
/** Marks an element declaration as being `final` */
const MODIFIER_FINAL = 32;
/** Marks an element declaration as being `private` */
const MODIFIER_PRIVATE = 4;
/** Marks an element declaration as being `protected` */
const MODIFIER_PROTECTED = 2;
/** Marks an element declaration as being `public` */
const MODIFIER_PUBLIC = 1;
/** Marks an element declaration as being `static` */
const MODIFIER_STATIC = 16;
/** Marks an `ast\AST_NAME` as being fully qualified (`\Name`) */
const NAME_FQ = 0;
/** Marks an `ast\AST_NAME` as being not fully qualified (`Name`) */
const NAME_NOT_FQ = 1;
/** Marks an `ast\AST_NAME` as being relative to the current namespace (`namespace\Name`) */
const NAME_RELATIVE = 2;
/** Marks a promoted constructor property as being `private` */
const PARAM_MODIFIER_PRIVATE = 4;
/** Marks a promoted constructor property as being `protected` */
const PARAM_MODIFIER_PROTECTED = 2;
/** Marks a promoted constructor property as being `public` */
const PARAM_MODIFIER_PUBLIC = 1;
/** Marks an `ast\AST_PARAM` as being a reference (`&$x`) */
const PARAM_REF = 8;
/** Marks an `ast\AST_PARAM` as being variadic (`...$x`) */
const PARAM_VARIADIC = 16;
/** Marks a `ast\AST_CONDITIONAL` as being parenthesized (`(cond ? true : false)`) */
const PARENTHESIZED_CONDITIONAL = 1;
/** Marks a function-like as returning an argument by reference */
const RETURNS_REF = 4096;
/** Marks an `ast\AST_TYPE` as being `array` */
const TYPE_ARRAY = 7;
/** Marks an `ast\AST_TYPE` as being `bool` */
const TYPE_BOOL = 17;
/** Marks an `ast\AST_TYPE` as being `callable` */
const TYPE_CALLABLE = 12;
/** Marks an `ast\AST_TYPE` as being `float` */
const TYPE_DOUBLE = 5;
/** Marks an `ast\AST_TYPE` as being `false` (for union types) */
const TYPE_FALSE = 2;
/** Marks an `ast\AST_TYPE` as being `iterable` */
const TYPE_ITERABLE = 13;
/** Marks an `ast\AST_TYPE` as being `int` */
const TYPE_LONG = 4;
/** Marks an `ast\AST_TYPE` as being `mixed` */
const TYPE_MIXED = 16;
/** Marks an `ast\AST_TYPE` as being `null` (for union types) */
const TYPE_NULL = 1;
/** Marks an `ast\AST_TYPE` as being `object` */
const TYPE_OBJECT = 8;
/** Marks an `ast\AST_TYPE` as being `static` (for return types) */
const TYPE_STATIC = 15;
/** Marks an `ast\AST_TYPE` as being `string` */
const TYPE_STRING = 6;
/** Marks an `ast\AST_TYPE` as being `void` (for return types) */
const TYPE_VOID = 14;
/** Marks an `ast\AST_UNARY_OP` as being `~expr` */
const UNARY_BITWISE_NOT = 13;
/** Marks an `ast\AST_UNARY_OP` as being `!expr` */
const UNARY_BOOL_NOT = 14;
/** Marks an `ast\AST_UNARY_OP` as being `-expr` */
const UNARY_MINUS = 262;
/** Marks an `ast\AST_UNARY_OP` as being `+expr` */
const UNARY_PLUS = 261;
/** Marks an `ast\AST_UNARY_OP` as being `@expr` */
const UNARY_SILENCE = 260;
/** Marks an `ast\AST_USE` or `ast\AST_GROUP_USE` (namespace use statement) as being `use const name;` */
const USE_CONST = 4;
/** Marks an `ast\AST_USE` or `ast\AST_GROUP_USE` (namespace use statement) as being `use function name;` */
const USE_FUNCTION = 2;
/** Marks an `ast\AST_USE` or `ast\AST_GROUP_USE` (namespace use statement) as being `use name;` */
const USE_NORMAL = 1;
}
<?php

//start Win32Service Service Type Bitmasks
/**
 * The service runs in its own process.
 */
define("WIN32_SERVICE_WIN32_OWN_PROCESS", 0x00000010);
/**
 * The service can interact with the desktop. This option is not available on Windows Vista or later.
 */
define("WIN32_SERVICE_INTERACTIVE_PROCESS", 0x00000100);
/**
 * The service runs in its own process and can interact with the desktop. This option is not available on Windows Vista
 * or later.
 */
define("WIN32_SERVICE_WIN32_OWN_PROCESS_INTERACTIVE", 0x00000110);
//end Win32Service Service Type Bitmasks

//start Win32Service Service Status Constants
/**
 *  The service continue is pending.
 */
define("WIN32_SERVICE_CONTINUE_PENDING", 0x00000005);
/**
 *  The service pause is pending.
 */
define("WIN32_SERVICE_PAUSE_PENDING", 0x00000006);
/**
 *  The service is paused.
 */
define("WIN32_SERVICE_PAUSED", 0x00000007);
/**
 *  The service is running.
 */
define("WIN32_SERVICE_RUNNING", 0x00000004);
/**
 *  The service is starting.
 */
define("WIN32_SERVICE_START_PENDING", 0x00000002);
/**
 *  The service is stopping.
 */
define("WIN32_SERVICE_STOP_PENDING", 0x00000003);
/**
 *  The service is not running.
 */
define("WIN32_SERVICE_STOPPED", 0x00000001);
//end Win32Service Service Status Constants

//start Win32Service Service Control Message Constants
/**
 *  Notifies a paused service that it should resume.
 */
define("WIN32_SERVICE_CONTROL_CONTINUE", 0x00000003);
/**
 *  Notifies a service that it should report its current status information to the service control manager.
 */
define("WIN32_SERVICE_CONTROL_INTERROGATE", 0x00000004);
/**
 *  Notifies a service that it should pause.
 */
define("WIN32_SERVICE_CONTROL_PAUSE", 0x00000002);
/**
 *  Notifies a service that the system will be shutting down. A service that handles this notification blocks system
 *  shutdown until the service stops or the preshutdown time-out interval expires. This value is not supported by
 *  Windows Server 2003 and Windows XP/2000.
 */
define("WIN32_SERVICE_CONTROL_PRESHUTDOWN", 0x0000000F);
/**
 *  Notifies a service that the system is shutting down so the service can perform cleanup tasks. If a service accepts
 *  this control code, it must stop after it performs its cleanup tasks. After the SCM sends this control code, it will
 *  not send other control codes to the service.
 */
define("WIN32_SERVICE_CONTROL_SHUTDOWN", 0x00000005);
/**
 *  Notifies a service that it should stop.
 */
define("WIN32_SERVICE_CONTROL_STOP", 0x00000001);
//end Win32Service Service Control Message Constants

//start Win32Service Service Control Message Accepted Bitmasks
/**
 *  The service can be paused and continued. This control code allows the service to receive
 *  WIN32_SERVICE_CONTROL_PAUSE and WIN32_SERVICE_CONTROL_CONTINUE notifications.
 */
define("WIN32_SERVICE_ACCEPT_PAUSE_CONTINUE", 0x00000002);
/**
 *  The service can perform preshutdown tasks. This control code enables the service to receive
 *  WIN32_SERVICE_CONTROL_PRESHUTDOWN notifications. This value is not supported by Windows Server 2003 and Windows
 *  XP/2000.
 */
define("WIN32_SERVICE_ACCEPT_PRESHUTDOWN", 0x00000100);
/**
 *  The service is notified when system shutdown occurs. This control code allows the service to receive
 *  WIN32_SERVICE_CONTROL_SHUTDOWN notifications.
 */
define("WIN32_SERVICE_ACCEPT_SHUTDOWN", 0x00000004);
/**
 *  The service can be stopped. This control code allows the service to receive WIN32_SERVICE_CONTROL_STOP
 *  notifications.
 */
define("WIN32_SERVICE_ACCEPT_STOP", 0x00000001);
//end Win32Service Service Control Message Accepted Bitmasks

//start Win32Service Service Start Type Constants
/**
 *  A service started automatically by the service control manager during system startup.
 */
define("WIN32_SERVICE_AUTO_START", 0x00000002);
/**
 *  A service started by the service control manager when a process calls the StartService function.
 */
define("WIN32_SERVICE_DEMAND_START", 0x00000003);
/**
 *  A service that cannot be started. Attempts to start the service result in the error code
 *  WIN32_ERROR_SERVICE_DISABLED.
 */
define("WIN32_SERVICE_DISABLED", 0x00000004);
//end Win32Service Service Start Type Constants

//start Win32Service Service Error Control Constants
/**
 *  The startup program ignores the error and continues the startup operation.
 */
define("WIN32_SERVICE_ERROR_IGNORE", 0x00000000);
/**
 *  The startup program logs the error in the event log but continues the startup operation.
 */
define("WIN32_SERVICE_ERROR_NORMAL", 0x00000001);
//end Win32Service Service Error Control Constants

//start Win32Service Service Flag Constants
/**
 * The service runs in a system process that must always be running.
 */
define("WIN32_SERVICE_RUNS_IN_SYSTEM_PROCESS", 0x00000001);
//end Win32Service Service Flag Constants

//start Win32 Error Codes
/**
 * The handle to the SCM database does not have the appropriate access rights.
 */
define("WIN32_ERROR_ACCESS_DENIED", 0x00000005);
/**
 * A circular service dependency was specified.
 */
define("WIN32_ERROR_CIRCULAR_DEPENDENCY", 0x00000423);
/**
 * The specified database does not exist.
 */
define("WIN32_ERROR_DATABASE_DOES_NOT_EXIST", 0x00000429);
/**
 * The service cannot be stopped because other running services are dependent on it.
 */
define("WIN32_ERROR_DEPENDENT_SERVICES_RUNNING", 0x0000041B);
/**
 * The display name already exists in the service control manager database either as a service name or as another
 * display name.
 */
define("WIN32_ERROR_DUPLICATE_SERVICE_NAME", 0x00000436);
/**
 * This error is returned if the program is being run as a console application rather than as a service. If the program
 * will be run as a console application for debugging purposes, structure it such that service-specific code is not
 * called.
 */
define("WIN32_ERROR_FAILED_SERVICE_CONTROLLER_CONNECT", 0x00000427);
/**
 * The buffer is too small for the service status structure. Nothing was written to the structure.
 */
define("WIN32_ERROR_INSUFFICIENT_BUFFER", 0x0000007A);
/**
 * The specified service status structure is invalid.
 */
define("WIN32_ERROR_INVALID_DATA", 0x0000000D);
/**
 * The handle to the specified service control manager database is invalid.
 */
define("WIN32_ERROR_INVALID_HANDLE", 0x00000006);
/**
 * The InfoLevel parameter contains an unsupported value.
 */
define("WIN32_ERROR_INVALID_LEVEL", 0x0000007C);
/**
 * The specified service name is invalid.
 */
define("WIN32_ERROR_INVALID_NAME", 0x0000007B);
/**
 * A parameter that was specified is invalid.
 */
define("WIN32_ERROR_INVALID_PARAMETER", 0x00000057);
/**
 * The user account name specified in the user parameter does not exist. See win32_create_service().
 */
define("WIN32_ERROR_INVALID_SERVICE_ACCOUNT", 0x00000421);
/**
 * The requested control code is not valid, or it is unacceptable to the service.
 */
define("WIN32_ERROR_INVALID_SERVICE_CONTROL", 0x0000041C);
/**
 * The service binary file could not be found.
 */
define("WIN32_ERROR_PATH_NOT_FOUND", 0x00000003);
/**
 * An instance of the service is already running.
 */
define("WIN32_ERROR_SERVICE_ALREADY_RUNNING", 0x00000420);
/**
 * The requested control code cannot be sent to the service because the state of the service is WIN32_SERVICE_STOPPED,
 * WIN32_SERVICE_START_PENDING, or WIN32_SERVICE_STOP_PENDING.
 */
define("WIN32_ERROR_SERVICE_CANNOT_ACCEPT_CTRL", 0x00000425);
/**
 * The database is locked.
 */
define("WIN32_ERROR_SERVICE_DATABASE_LOCKED", 0x0000041F);
/**
 * The service depends on a service that does not exist or has been marked for deletion.
 */
define("WIN32_ERROR_SERVICE_DEPENDENCY_DELETED", 0x00000433);
/**
 * The service depends on another service that has failed to start.
 */
define("WIN32_ERROR_SERVICE_DEPENDENCY_FAIL", 0x0000042C);
/**
 * The service has been disabled.
 */
define("WIN32_ERROR_SERVICE_DISABLED", 0x00000422);
/**
 * The specified service does not exist as an installed service.
 */
define("WIN32_ERROR_SERVICE_DOES_NOT_EXIST", 0x00000424);
/**
 * The specified service already exists in this database.
 */
define("WIN32_ERROR_SERVICE_EXISTS", 0x00000431);
/**
 * The service did not start due to a logon failure. This error occurs if the service is configured to run under an
 * account that does not have the "Log on as a service" right.
 */
define("WIN32_ERROR_SERVICE_LOGON_FAILED", 0x0000042D);
/**
 * The specified service has already been marked for deletion.
 */
define("WIN32_ERROR_SERVICE_MARKED_FOR_DELETE", 0x00000430);
/**
 * A thread could not be created for the service.
 */
define("WIN32_ERROR_SERVICE_NO_THREAD", 0x0000041E);
/**
 * The service has not been started.
 */
define("WIN32_ERROR_SERVICE_NOT_ACTIVE", 0x00000426);
/**
 * The process for the service was started, but it did not call StartServiceCtrlDispatcher, or the thread that called
 * StartServiceCtrlDispatcher may be blocked in a control handler function.
 */
define("WIN32_ERROR_SERVICE_REQUEST_TIMEOUT", 0x0000041D);
/**
 * The system is shutting down; this function cannot be called.
 */
define("WIN32_ERROR_SHUTDOWN_IN_PROGRESS", 0x0000045B);
/**
 * No error.
 */
define("WIN32_NO_ERROR", 0x00000000);
//end Win32 Error Codes

//start Win32 Base Priority Classes
/**
 *  Process that has priority above WIN32_NORMAL_PRIORITY_CLASS but below WIN32_HIGH_PRIORITY_CLASS.
 */
define("WIN32_ABOVE_NORMAL_PRIORITY_CLASS", 0x00008000);
/**
 *  Process that has priority above WIN32_IDLE_PRIORITY_CLASS but below WIN32_NORMAL_PRIORITY_CLASS.
 */
define("WIN32_BELOW_NORMAL_PRIORITY_CLASS", 0x00004000);
/**
 *  Process that performs time-critical tasks that must be executed immediately. The threads of the process preempt the
 *  threads of normal or idle priority class processes. An example is the Task List, which must respond quickly when
 *  called by the user, regardless of the load on the operating system. Use extreme care when using the high-priority
 *  class, because a high-priority class application can use nearly all available CPU time.
 */
define("WIN32_HIGH_PRIORITY_CLASS", 0x00000080);
/**
 *  Process whose threads run only when the system is idle. The threads of the process are preempted by the threads of
 *  any process running in a higher priority class. An example is a screen saver. The idle-priority class is inherited
 *  by child processes.
 */
define("WIN32_IDLE_PRIORITY_CLASS", 0x00000040);
/**
 *  Process with no special scheduling needs.
 */
define("WIN32_NORMAL_PRIORITY_CLASS", 0x00000020);
/**
 *  Process that has the highest possible priority. The threads of the process preempt the threads of all other
 *  processes, including operating system processes performing important tasks. For example, a real-time process that
 *  executes for more than a very brief interval can cause disk caches not to flush or cause the mouse to be
 *  unresponsive.
 */
define("WIN32_REALTIME_PRIORITY_CLASS", 0x00000100);
//end Win32 Base Priority Classes

/**
 * resumes a paused service
 *
 * @param string $serviceName The short name of the service.
 * @param string $machine     Optional machine name. If omitted, the local machine is used.
 *
 * @return int|false Returns WIN32_NO_ERROR on success, FALSE if there is a problem with the parameters or a Win32 Error Code
 *             on failure.
 */
function win32_continue_service($serviceName, $machine = "") {}

/**
 * Creates a new service entry in the SCM database
 *
 * @param array  $details
 *                              <ul>
 *                              <li>
 *                              <em>service</em>
 *                              The short name of the service. This is the name that you will use to control the
 *                              service
 *                              using the net command. The service must be unique (no two services can share the same
 *                              name), and, ideally, should avoid having spaces in the name.
 *                              </li>
 *
 *                          <li>
 *                              <em>display</em>
 *                              The display name of the service. This is the name that you will see in the Services
 *                              Applet.
 *                          </li>
 *
 *                          <li>
 *                              <em>description</em>
 *                              The long description of the service. This is the description that you will see in the
 *                              Services Applet.
 *                          </li>
 *
 *                          <li>
 *                              <em>user</em>
 *                              The name of the user account under which you want the service to run. If omitted, the
 *                              service will run as the LocalSystem account. If the username is specified, you must
 *                              also provide a password.
 *                          </li>
 *
 *                          <li>
 *                              <em>password</em>
 *                              The password that corresponds to the user.
 *                          </li>
 *
 *                          <li>
 *                              <em>path</em>
 *                              The full path to the executable module that will be launched when the service is
 *                              started. If omitted, the path to the current PHP process will be used.
 *                          </li>
 *
 *                          <li>
 *                              <em>params</em>
 *                              Command line parameters to pass to the service when it starts. If you want to run a PHP
 *                              script as the service, then the first parameter should be the full path to the PHP
 *                              script that you intend to run. If the script name or path contains spaces, then wrap
 *                              the full path to the PHP script with ".
 *                          </li>
 *
 *                          <li>
 *                              <em>load_order</em>
 *                              Controls the load_order. This is not yet fully supported.
 *                          </li>
 *
 *                          <li>
 *                              <em>svc_type</em>
 *                              Sets the service type. If omitted, the default value is
 *                              WIN32_SERVICE_WIN32_OWN_PROCESS. Don't change this unless you know what you're doing.
 *                          </li>
 *
 *                          <li>
 *                              <em>start_type</em>
 *                              Specifies how the service should be started. The default is WIN32_SERVICE_AUTO_START
 *                              which means the service will be launched when the machine starts up.
 *                          </li>
 *
 *                          <li>
 *                              <em>error_control</em>
 *                              Informs the SCM what it should do when it detects a problem with the service. The
 *                              default is WIN32_SERVER_ERROR_IGNORE. Changing this value is not yet fully supported.
 *                          </li>
 *
 *                          <li>
 *                              <em>delayed_start</em>
 *                              If delayed_start is set to TRUE, then this will inform the SCM that this service should
 *                              be started after other auto-start services are started plus a short delay.
 *
 *                              Any service can be marked as a delayed auto-start service; however, this setting has no
 *                              effect unless the service's start_type is WIN32_SERVICE_AUTO_START.
 *
 *                              This setting is only applicable on Windows Vista and Windows Server 2008 or greater.
 *                          </li>
 *
 *                          <li>
 *                              <em>base_priority</em>
 *                              To reduce the impact on processor utilisation, it may be necessary to set a base
 *                              priority lower than normal.
 *
 *                              The base_priority can be set to one of the constants define in Win32 Base Priority
 *                              Classes.
 *                          </li>
 * </ul>
 * @param string $machine       The optional machine name on which you want to create a service. If omitted, it will
 *                              use the local machine.
 *
 * @return int|false Returns WIN32_NO_ERROR on success, FALSE if there is a problem with the parameters or a Win32 Error Code
 *             on failure.
 */
function win32_create_service($details, $machine = "") {}

/**
 *  Deletes a service entry from the SCM database
 *  This function really just marks the service for deletion. If other processes (such as the Services Applet) are
 *  open, then the deletion will be deferred until those applications are closed. If a service is marked for deletion,
 *  further attempts to delete it will fail, and attempts to create a new service with that name will also fail.
 *
 * @param string $serviceName The short name of the service.
 * @param string $machine     Optional machine name. If omitted, the local machine is used.
 *
 * @return int|false Returns WIN32_NO_ERROR on success, FALSE if there is a problem with the parameters or a Win32 Error Code
 *             on failure.
 */
function win32_delete_service($serviceName, $machine = "") {}

/**
 *   Returns the last control message that was sent to this service
 *   When running as a service you should periodically check this to determine if your service needs to stop running.
 * <p>
 *  <strong>Caution</strong>
 *  Since version 0.2.0, this function work only in "cli" SAPI. On other SAPI this function is disabled.
 * </p>
 *
 * @return int Returns a control constant which will be one of the Win32Service Service Control Message Constants:
 *             WIN32_SERVICE_CONTROL_CONTINUE, WIN32_SERVICE_CONTROL_INTERROGATE, WIN32_SERVICE_CONTROL_PAUSE,
 *             WIN32_SERVICE_CONTROL_PRESHUTDOWN, WIN32_SERVICE_CONTROL_SHUTDOWN, WIN32_SERVICE_CONTROL_STOP.
 */
function win32_get_last_control_message() {}

/**
 * Pauses a named service. Requires administrative privileges.
 *
 * @param string $serviceName The short name of the service.
 * @param string $machine     Optional machine name. If omitted, the local machine is used.
 *
 * @return int|false Returns WIN32_NO_ERROR on success, FALSE if there is a problem with the parameters or a Win32 Error Code
 *             on failure.
 */
function win32_pause_service($serviceName, $machine = "") {}

/**
 * Queries the current status for a service, returning an array of information.
 *
 * @param string $serviceName The short name of the service.
 * @param string $machine     Optional machine name. If omitted, the local machine is used.
 *
 * @return array|false Returns an array consisting of the following information on success, FALSE if there is a problem with
 *               the parameters or a Win32 Error Code on failure.
 *               <ul>
 *                   <li>
 *                       <em>ServiceType</em>
 *                       The dwServiceType. See Win32Service Service Type Bitmasks.
 *                   </li>
 *                   <li>
 *                       <em>CurrentState</em>
 *                       The dwCurrentState. See Win32Service Service Status Constants.
 *                   </li>
 *                   <li>
 *                       <em>ControlsAccepted</em>
 *                       Which service controls are accepted by the service. See Win32Service Service Control Message
 *                       Accepted Bitmasks.
 *                   </li>
 *                   <li>
 *                       <em>Win32ExitCode</em>
 *                       If the service exited, the return code from the process.
 *                   </li>
 *                   <li>
 *                       <em>ServiceSpecificExitCode</em>
 *                       If the service exited with an error condition, the service specific code that is logged in the
 *                       event log is visible here.
 *                   </li>
 *                   <li>
 *                       <em>CheckPoint</em>
 *                        If the service is shutting down, holds the current check point number. This is used by the
 *                        SCM as a kind of heart-beat to detect a wedged service process. The value of the check point
 *                        is best interpreted in conjunction with the WaitHint value.
 *                   </li>
 *                   <li>
 *                       <em>WaitHint</em>
 *                       If the service is shutting down it will set WaitHint to a checkpoint value that will indicate
 *                       100% completion. This can be used to implement a progress indicator.
 *                   </li>
 *                   <li>
 *                       <em>ProcessId</em>
 *                       The Windows process identifier. If 0, the process is not running.
 *                   </li>
 *                   <li>
 *                       <em>ServiceFlags</em>
 *                       The dwServiceFlags. See Win32Service Service Service Flag Constants.
 *                   </li>
 *               </ul>
 */
function win32_query_service_status($serviceName, $machine = "") {}

/**
 *   Update the service status
 * Informs the SCM of the current status of a running service. This call is only valid for a running service process.
 * <p>
 *  <strong>Caution</strong>
 *  Since version 0.2.0, this function work only in "cli" SAPI. On other SAPI this function is disabled.
 * </p>
 *
 * @param int $status           The service status code, one of WIN32_SERVICE_RUNNING, WIN32_SERVICE_STOPPED,
 *                              WIN32_SERVICE_STOP_PENDING, WIN32_SERVICE_START_PENDING,
 *                              WIN32_SERVICE_CONTINUE_PENDING,
 *                              WIN32_SERVICE_PAUSE_PENDING, WIN32_SERVICE_PAUSED.
 * @param int $checkpoint       The checkpoint value the service increments periodically to report its progress during
 *                              a lengthy start, stop, pause, or continue operation. For example, the service should
 *                              increment this value as it completes each step of its initialization when it is
 *                              starting up. The checkpoint is only valid when the status is one of
 *                              WIN32_SERVICE_STOP_PENDING, WIN32_SERVICE_START_PENDING, WIN32_SERVICE_CONTINUE_PENDING
 *                              or WIN32_SERVICE_PAUSE_PENDING.
 *
 * @return bool|int Returns TRUE on success, FALSE if there is a problem with the parameters or a Win32 Error Code on
 *             failure.
 */
function win32_set_service_status($status, $checkpoint = 0) {}

/**
 * Registers the script with the SCM, so that it can act as the service with the given name
 * When launched via the Service Control Manager, a service process is required to "check-in" with it to establish
 * service monitoring and communication facilities. This function performs the check-in by spawning a thread to handle
 * the lower-level communication with the service control manager.
 *
 * Once started, the service process should do 2 things. The first is to tell the Service Control Manager that the
 * service is running. This is achieved by calling win32_set_service_status() with the WIN32_SERVICE_RUNNING constant.
 * If you need to perform some lengthy process before the service is actually running, then you can use the
 * WIN32_SERVICE_START_PENDING constant. The second is to continue to check-in with the service control manager so that
 * it can determine if it should terminate. This is achieved by periodically calling win32_get_last_control_message()
 * and handling the return code appropriately.
 * <p>
 *  <strong>Caution</strong>
 *  Since version 0.2.0, this function work only in "cli" SAPI. On other SAPI this function is disabled.
 * </p>
 *
 * @param string $name The short-name of the service, as registered by win32_create_service().
 *
 * @return bool|int Returns TRUE on success, FALSE if there is a problem with the parameters or a Win32 Error Code on
 *               failure.
 */
function win32_start_service_ctrl_dispatcher($name) {}

/**
 *   Starts a service
 * Attempts to start the named service. Usually requires administrative privileges.
 *
 * @param string $serviceName The short name of the service.
 * @param string $machine     Optional machine name. If omitted, the local machine is used.
 *
 * @return int|false Returns WIN32_NO_ERROR on success, FALSE if there is a problem with the parameters or a Win32 Error Code
 *             on failure.
 */
function win32_start_service($serviceName, $machine = "") {}

/**
 *   Stops a named service. Requires administrative privileges.
 *
 * @param string $serviceName The short name of the service.
 * @param string $machine     Optional machine name. If omitted, the local machine is used.
 *
 * @return int|false Returns WIN32_NO_ERROR on success, FALSE if there is a problem with the parameters or a Win32 Error Code
 *             on failure.
 */
function win32_stop_service($serviceName, $machine = "") {}
<?php

// Start of sockets v.
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;

/**
 * (PHP 7 &gt;= 7.2.0)<br/>
 * Get array with contents of getaddrinfo about the given hostname.
 * @link https://www.php.net/manual/en/function.socket-addrinfo-lookup.php
 * @param string $host <p>
 * Hostname to search.
 * </p>
 * @param string $service [optional] <p>
 * The service to connect to. If service is a name, it is translated to the corresponding port number.
 * </p>
 * @param array $hints <p>
 * Hints provide criteria for selecting addresses returned. You may specify the hints as defined by getadrinfo.
 * </p>
 * @return AddressInfo[]|false of AddrInfo resource handles that can be used with the other socket_addrinfo functions.
 * @since 7.2
 */
function socket_addrinfo_lookup(string $host, ?string $service, array $hints = []): array|false {}

/**
 * Create a Socket resource, and connect it to the provided AddrInfo resource.<br/>
 * The return value of this function may be used with the rest of the socket functions.
 * @link https://www.php.net/manual/en/function.socket-addrinfo-connect.php
 * @param resource|AddressInfo $address <p>
 * Resource created from {@see socket_addrinfo_lookup()}
 * </p>
 * @return resource|Socket|null|false Socket resource on success or NULL on failure.
 * @since 7.2
 */
function socket_addrinfo_connect(AddressInfo $address): Socket|false {}

/**
 * (PHP 7 &gt;= 7.2.0)<br/>
 * Create a Socket resource, and bind it to the provided AddrInfo resource.<br/>
 * The return value of this function may be used with {@see socket_listen()}.
 * @link https://www.php.net/manual/en/function.socket-addrinfo-bind.php
 * @param resource|AddressInfo $address <p>
 * Resource created from {@see socket_addrinfo_lookup()}
 * </p>
 * @return resource|Socket|null|false Socket resource on success or NULL on failure.
 * @since 7.2
 */
function socket_addrinfo_bind(AddressInfo $address): Socket|false {}

/**
 * (PHP 7 &gt;= 7.2.0)<br/>
 * Get information about addrinfo
 * @link https://www.php.net/manual/en/function.socket-addrinfo-explain.php
 * @param resource|AddressInfo $address <p>
 * Resource created from {@see socket_addrinfo_lookup()}
 * </p>
 * @return array containing the fields in the addrinfo structure.
 * @since 7.2
 */
#[ArrayShape([
    'ai_flags' => 'int',
    'ai_family' => 'int',
    'ai_socktype' => 'int',
    'ai_protocol' => 'int',
    'ai_canonname' => 'string',
    'ai_addr' => [
        'sin_port' => 'int',
        'sin_addr' => 'string',
        'sin6_port' => 'int',
        'sin6_addr' => 'string',
    ]
])]
function socket_addrinfo_explain(AddressInfo $address): array {}

/**
 * Runs the select() system call on the given arrays of sockets with a specified timeout
 * @link https://php.net/manual/en/function.socket-select.php
 * @param array|null &$read <p>
 * The sockets listed in the <i>read</i> array will be
 * watched to see if characters become available for reading (more
 * precisely, to see if a read will not block - in particular, a socket
 * resource is also ready on end-of-file, in which case a
 * <b>socket_read</b> will return a zero length string).
 * </p>
 * @param array|null &$write <p>
 * The sockets listed in the <i>write</i> array will be
 * watched to see if a write will not block.
 * </p>
 * @param array|null &$except <p>
 * The sockets listed in the <i>except</i> array will be
 * watched for exceptions.
 * </p>
 * @param int|null $seconds <p>
 * The <i>tv_sec</i> and <i>tv_usec</i>
 * together form the timeout parameter. The
 * timeout is an upper bound on the amount of time
 * elapsed before <b>socket_select</b> return.
 * <i>tv_sec</i> may be zero , causing
 * <b>socket_select</b> to return immediately. This is useful
 * for polling. If <i>tv_sec</i> is <b>NULL</b> (no timeout),
 * <b>socket_select</b> can block indefinitely.
 * </p>
 * @param int $microseconds [optional]
 * @return int|false On success <b>socket_select</b> returns the number of
 * socket resources contained in the modified arrays, which may be zero if
 * the timeout expires before anything interesting happens. On error <b>FALSE</b>
 * is returned. The error code can be retrieved with
 * <b>socket_last_error</b>.
 * </p>
 * <p>
 * Be sure to use the === operator when checking for an
 * error. Since the <b>socket_select</b> may return 0 the
 * comparison with == would evaluate to <b>TRUE</b>:
 * Understanding <b>socket_select</b>'s result
 * <code>
 * $e = NULL;
 * if (false === socket_select($r, $w, $e, 0)) {
 * echo "socket_select() failed, reason: " .
 * socket_strerror(socket_last_error()) . "\n";
 * }
 * </code>
 */
function socket_select(?array &$read, ?array &$write, ?array &$except, ?int $seconds, int $microseconds = 0): int|false {}

/**
 * Create a socket (endpoint for communication)
 * @link https://php.net/manual/en/function.socket-create.php
 * @param int $domain <p>
 * The <i>domain</i> parameter specifies the protocol
 * family to be used by the socket.
 * </p>
 * <table>
 * Available address/protocol families
 * <tr valign="top">
 * <td>Domain</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td><b>AF_INET</b></td>
 * <td>
 * IPv4 Internet based protocols. TCP and UDP are common protocols of
 * this protocol family.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>AF_INET6</b></td>
 * <td>
 * IPv6 Internet based protocols. TCP and UDP are common protocols of
 * this protocol family.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>AF_UNIX</b></td>
 * <td>
 * Local communication protocol family. High efficiency and low
 * overhead make it a great form of IPC (Interprocess Communication).
 * </td>
 * </tr>
 * </table>
 * @param int $type <p>
 * The <i>type</i> parameter selects the type of communication
 * to be used by the socket.
 * </p>
 * <table>
 * Available socket types
 * <tr valign="top">
 * <td>Type</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td><b>SOCK_STREAM</b></td>
 * <td>
 * Provides sequenced, reliable, full-duplex, connection-based byte streams.
 * An out-of-band data transmission mechanism may be supported.
 * The TCP protocol is based on this socket type.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>SOCK_DGRAM</b></td>
 * <td>
 * Supports datagrams (connectionless, unreliable messages of a fixed maximum length).
 * The UDP protocol is based on this socket type.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>SOCK_SEQPACKET</b></td>
 * <td>
 * Provides a sequenced, reliable, two-way connection-based data transmission path for
 * datagrams of fixed maximum length; a consumer is required to read an
 * entire packet with each read call.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>SOCK_RAW</b></td>
 * <td>
 * Provides raw network protocol access. This special type of socket
 * can be used to manually construct any type of protocol. A common use
 * for this socket type is to perform ICMP requests (like ping).
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>SOCK_RDM</b></td>
 * <td>
 * Provides a reliable datagram layer that does not guarantee ordering.
 * This is most likely not implemented on your operating system.
 * </td>
 * </tr>
 * </table>
 * @param int $protocol <p>
 * The <i>protocol</i> parameter sets the specific
 * protocol within the specified <i>domain</i> to be used
 * when communicating on the returned socket. The proper value can be
 * retrieved by name by using <b>getprotobyname</b>. If
 * the desired protocol is TCP, or UDP the corresponding constants
 * <b>SOL_TCP</b>, and <b>SOL_UDP</b>
 * can also be used.
 * </p>
 * <table>
 * Common protocols
 * <tr valign="top">
 * <td>Name</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td>icmp</td>
 * <td>
 * The Internet Control Message Protocol is used primarily by gateways
 * and hosts to report errors in datagram communication. The "ping"
 * command (present in most modern operating systems) is an example
 * application of ICMP.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>udp</td>
 * <td>
 * The User Datagram Protocol is a connectionless, unreliable,
 * protocol with fixed record lengths. Due to these aspects, UDP
 * requires a minimum amount of protocol overhead.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>tcp</td>
 * <td>
 * The Transmission Control Protocol is a reliable, connection based,
 * stream oriented, full duplex protocol. TCP guarantees that all data packets
 * will be received in the order in which they were sent. If any packet is somehow
 * lost during communication, TCP will automatically retransmit the packet until
 * the destination host acknowledges that packet. For reliability and performance
 * reasons, the TCP implementation itself decides the appropriate octet boundaries
 * of the underlying datagram communication layer. Therefore, TCP applications must
 * allow for the possibility of partial record transmission.
 * </td>
 * </tr>
 * </table>
 * @return resource|Socket|false <b>socket_create</b> returns a socket resource on success,
 * or <b>FALSE</b> on error. The actual error code can be retrieved by calling
 * <b>socket_last_error</b>. This error code may be passed to
 * <b>socket_strerror</b> to get a textual explanation of the
 * error.
 */
function socket_create(int $domain, int $type, int $protocol): Socket|false {}

/**
 * @param resource|Socket $socket
 * @return resource|Socket|false
 */
function socket_export_stream(Socket $socket) {}

/**
 * Opens a socket on port to accept connections
 * @link https://php.net/manual/en/function.socket-create-listen.php
 * @param int $port <p>
 * The port on which to listen on all interfaces.
 * </p>
 * @param int $backlog [optional] <p>
 * The <i>backlog</i> parameter defines the maximum length
 * the queue of pending connections may grow to.
 * <b>SOMAXCONN</b> may be passed as
 * <i>backlog</i> parameter, see
 * <b>socket_listen</b> for more information.
 * </p>
 * @return resource|Socket|false <b>socket_create_listen</b> returns a new socket resource
 * on success or <b>FALSE</b> on error. The error code can be retrieved with
 * <b>socket_last_error</b>. This code may be passed to
 * <b>socket_strerror</b> to get a textual explanation of the
 * error.
 */
function socket_create_listen(int $port, int $backlog = 128): Socket|false {}

/**
 * Creates a pair of indistinguishable sockets and stores them in an array
 * @link https://php.net/manual/en/function.socket-create-pair.php
 * @param int $domain <p>
 * The <i>domain</i> parameter specifies the protocol
 * family to be used by the socket. See <b>socket_create</b>
 * for the full list.
 * </p>
 * @param int $type <p>
 * The <i>type</i> parameter selects the type of communication
 * to be used by the socket. See <b>socket_create</b> for the
 * full list.
 * </p>
 * @param int $protocol <p>
 * The <i>protocol</i> parameter sets the specific
 * protocol within the specified <i>domain</i> to be used
 * when communicating on the returned socket. The proper value can be retrieved by
 * name by using <b>getprotobyname</b>. If
 * the desired protocol is TCP, or UDP the corresponding constants
 * <b>SOL_TCP</b>, and <b>SOL_UDP</b>
 * can also be used.
 * </p>
 * <p>
 * See <b>socket_create</b> for the full list of supported
 * protocols.
 * </p>
 * @param array &$pair <p>
 * Reference to an array in which the two socket resources will be inserted.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function socket_create_pair(int $domain, int $type, int $protocol, &$pair): bool {}

/**
 * Accepts a connection on a socket
 * @link https://php.net/manual/en/function.socket-accept.php
 * @param resource|Socket $socket <p>
 * A valid socket resource created with <b>socket_create</b>.
 * </p>
 * @return resource|Socket|false a new socket resource on success, or <b>FALSE</b> on error. The actual
 * error code can be retrieved by calling
 * <b>socket_last_error</b>. This error code may be passed to
 * <b>socket_strerror</b> to get a textual explanation of the
 * error.
 */
function socket_accept(Socket $socket): Socket|false {}

/**
 * Sets nonblocking mode for file descriptor fd
 * @link https://php.net/manual/en/function.socket-set-nonblock.php
 * @param resource|Socket $socket <p>
 * A valid socket resource created with <b>socket_create</b>
 * or <b>socket_accept</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function socket_set_nonblock(Socket $socket): bool {}

/**
 * Sets blocking mode on a socket resource
 * @link https://php.net/manual/en/function.socket-set-block.php
 * @param resource|Socket $socket <p>
 * A valid socket resource created with <b>socket_create</b>
 * or <b>socket_accept</b>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function socket_set_block(Socket $socket): bool {}

/**
 * Listens for a connection on a socket
 * @link https://php.net/manual/en/function.socket-listen.php
 * @param resource|Socket $socket <p>
 * A valid socket resource created with <b>socket_create</b>.
 * </p>
 * @param int $backlog [optional] <p>
 * A maximum of <i>backlog</i> incoming connections will be
 * queued for processing. If a connection request arrives with the queue
 * full the client may receive an error with an indication of
 * ECONNREFUSED, or, if the underlying protocol supports
 * retransmission, the request may be ignored so that retries may succeed.
 * </p>
 * <p>
 * The maximum number passed to the <i>backlog</i>
 * parameter highly depends on the underlying platform. On Linux, it is
 * silently truncated to <b>SOMAXCONN</b>. On win32, if
 * passed <b>SOMAXCONN</b>, the underlying service provider
 * responsible for the socket will set the backlog to a maximum
 * reasonable value. There is no standard provision to
 * find out the actual backlog value on this platform.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. The error code can be retrieved with
 * <b>socket_last_error</b>. This code may be passed to
 * <b>socket_strerror</b> to get a textual explanation of the
 * error.
 */
function socket_listen(Socket $socket, int $backlog = 0): bool {}

/**
 * Closes a socket resource
 * @link https://php.net/manual/en/function.socket-close.php
 * @param resource|Socket $socket <p>
 * A valid socket resource created with <b>socket_create</b>
 * or <b>socket_accept</b>.
 * </p>
 * @return void No value is returned.
 */
function socket_close(Socket $socket): void {}

/**
 * Write to a socket
 * @link https://php.net/manual/en/function.socket-write.php
 * @param resource|Socket $socket
 * @param string $data <p>
 * The buffer to be written.
 * </p>
 * @param int|null $length <p>
 * The optional parameter <i>length</i> can specify an
 * alternate length of bytes written to the socket. If this length is
 * greater than the buffer length, it is silently truncated to the length
 * of the buffer.
 * </p>
 * @return int|false the number of bytes successfully written to the socket or <b>FALSE</b> on failure.
 * The error code can be retrieved with
 * <b>socket_last_error</b>. This code may be passed to
 * <b>socket_strerror</b> to get a textual explanation of the
 * error.
 * </p>
 * <p>
 * It is perfectly valid for <b>socket_write</b> to
 * return zero which means no bytes have been written. Be sure to use the
 * === operator to check for <b>FALSE</b> in case of an
 * error.
 */
function socket_write(Socket $socket, string $data, ?int $length = null): int|false {}

/**
 * Reads a maximum of length bytes from a socket
 * @link https://php.net/manual/en/function.socket-read.php
 * @param resource|Socket $socket <p>
 * A valid socket resource created with <b>socket_create</b>
 * or <b>socket_accept</b>.
 * </p>
 * @param int $length <p>
 * The maximum number of bytes read is specified by the
 * <i>length</i> parameter. Otherwise you can use
 * <b>&#92;r</b>, <b>&#92;n</b>,
 * or <b>&#92;0</b> to end reading (depending on the <i>type</i>
 * parameter, see below).
 * </p>
 * @param int $mode [optional] <p>
 * Optional <i>type</i> parameter is a named constant:
 * <b>PHP_BINARY_READ</b> (Default) - use the system
 * recv() function. Safe for reading binary data.
 * @return string|false <b>socket_read</b> returns the data as a string on success,
 * or <b>FALSE</b> on error (including if the remote host has closed the
 * connection). The error code can be retrieved with
 * <b>socket_last_error</b>. This code may be passed to
 * <b>socket_strerror</b> to get a textual representation of
 * the error.
 * </p>
 * <p>
 * <b>socket_read</b> returns a zero length string ("")
 * when there is no more data to read.</p>
 */
function socket_read(Socket $socket, int $length, int $mode = PHP_BINARY_READ): string|false {}

/**
 * Queries the local side of the given socket which may either result in host/port or in a Unix filesystem path, dependent on its type
 * @link https://php.net/manual/en/function.socket-getsockname.php
 * @param resource|Socket $socket <p>
 * A valid socket resource created with <b>socket_create</b>
 * or <b>socket_accept</b>.
 * </p>
 * @param string &$address <p>
 * If the given socket is of type <b>AF_INET</b>
 * or <b>AF_INET6</b>, <b>socket_getsockname</b>
 * will return the local IP address in appropriate notation (e.g.
 * 127.0.0.1 or fe80::1) in the
 * <i>address</i> parameter and, if the optional
 * <i>port</i> parameter is present, also the associated port.
 * </p>
 * <p>
 * If the given socket is of type <b>AF_UNIX</b>,
 * <b>socket_getsockname</b> will return the Unix filesystem
 * path (e.g. /var/run/daemon.sock) in the
 * <i>address</i> parameter.
 * </p>
 * @param int &$port [optional] <p>
 * If provided, this will hold the associated port.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. <b>socket_getsockname</b> may also return
 * <b>FALSE</b> if the socket type is not any of <b>AF_INET</b>,
 * <b>AF_INET6</b>, or <b>AF_UNIX</b>, in which
 * case the last socket error code is not updated.
 */
function socket_getsockname(Socket $socket, &$address, &$port = null): bool {}

/**
 * Queries the remote side of the given socket which may either result in host/port or in a Unix filesystem path, dependent on its type
 * @link https://php.net/manual/en/function.socket-getpeername.php
 * @param resource|Socket $socket <p>
 * A valid socket resource created with <b>socket_create</b>
 * or <b>socket_accept</b>.
 * </p>
 * @param string &$address <p>
 * If the given socket is of type <b>AF_INET</b> or
 * <b>AF_INET6</b>, <b>socket_getpeername</b>
 * will return the peers (remote) IP address in
 * appropriate notation (e.g. 127.0.0.1 or
 * fe80::1) in the <i>address</i>
 * parameter and, if the optional <i>port</i> parameter is
 * present, also the associated port.
 * </p>
 * <p>
 * If the given socket is of type <b>AF_UNIX</b>,
 * <b>socket_getpeername</b> will return the Unix filesystem
 * path (e.g. /var/run/daemon.sock) in the
 * <i>address</i> parameter.
 * </p>
 * @param int &$port [optional] <p>
 * If given, this will hold the port associated to
 * <i>address</i>.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. <b>socket_getpeername</b> may also return
 * <b>FALSE</b> if the socket type is not any of <b>AF_INET</b>,
 * <b>AF_INET6</b>, or <b>AF_UNIX</b>, in which
 * case the last socket error code is not updated.
 */
function socket_getpeername(Socket $socket, &$address, &$port = null): bool {}

/**
 * Initiates a connection on a socket
 * @link https://php.net/manual/en/function.socket-connect.php
 * @param resource|Socket $socket
 * @param string $address <p>
 * The <i>address</i> parameter is either an IPv4 address
 * in dotted-quad notation (e.g. 127.0.0.1) if
 * <i>socket</i> is <b>AF_INET</b>, a valid
 * IPv6 address (e.g. ::1) if IPv6 support is enabled and
 * <i>socket</i> is <b>AF_INET6</b>
 * or the pathname of a Unix domain socket, if the socket family is
 * <b>AF_UNIX</b>.
 * </p>
 * @param int|null $port <p>
 * The <i>port</i> parameter is only used and is mandatory
 * when connecting to an <b>AF_INET</b> or an
 * <b>AF_INET6</b> socket, and designates
 * the port on the remote host to which a connection should be made.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. The error code can be retrieved with
 * <b>socket_last_error</b>. This code may be passed to
 * <b>socket_strerror</b> to get a textual explanation of the
 * error.
 * </p>
 * <p>
 * If the socket is non-blocking then this function returns <b>FALSE</b> with an
 * error Operation now in progress.
 */
function socket_connect(Socket $socket, string $address, ?int $port = null): bool {}

/**
 * Return a string describing a socket error
 * @link https://php.net/manual/en/function.socket-strerror.php
 * @param int $error_code <p>
 * A valid socket error number, likely produced by
 * <b>socket_last_error</b>.
 * </p>
 * @return string the error message associated with the <i>errno</i>
 * parameter.
 */
function socket_strerror(int $error_code): string {}

/**
 * Binds a name to a socket
 * @link https://php.net/manual/en/function.socket-bind.php
 * @param resource|Socket $socket <p>
 * A valid socket resource created with <b>socket_create</b>.
 * </p>
 * @param string $address <p>
 * If the socket is of the <b>AF_INET</b> family, the
 * <i>address</i> is an IP in dotted-quad notation
 * (e.g. 127.0.0.1).
 * </p>
 * <p>
 * If the socket is of the <b>AF_UNIX</b> family, the
 * <i>address</i> is the path of a
 * Unix-domain socket (e.g. /tmp/my.sock).
 * </p>
 * @param int $port [optional] <p>
 * The <i>port</i> parameter is only used when
 * binding an <b>AF_INET</b> socket, and designates
 * the port on which to listen for connections.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * <p>
 * The error code can be retrieved with <b>socket_last_error</b>.
 * This code may be passed to <b>socket_strerror</b> to get a
 * textual explanation of the error.
 * </p>
 */
function socket_bind(Socket $socket, string $address, int $port = 0): bool {}

/**
 * Receives data from a connected socket
 * @link https://php.net/manual/en/function.socket-recv.php
 * @param resource|Socket $socket <p>
 * The <i>socket</i> must be a socket resource previously
 * created by socket_create().
 * </p>
 * @param string &$data <p>
 * The data received will be fetched to the variable specified with
 * <i>buf</i>. If an error occurs, if the
 * connection is reset, or if no data is
 * available, <i>buf</i> will be set to <b>NULL</b>.
 * </p>
 * @param int $length <p>
 * Up to <i>len</i> bytes will be fetched from remote host.
 * </p>
 * @param int $flags <p>
 * The value of <i>flags</i> can be any combination of
 * the following flags, joined with the binary OR (|)
 * operator.
 * </p>
 * <table>
 * Possible values for <i>flags</i>
 * <tr valign="top">
 * <td>Flag</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td><b>MSG_OOB</b></td>
 * <td>
 * Process out-of-band data.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>MSG_PEEK</b></td>
 * <td>
 * Receive data from the beginning of the receive queue without
 * removing it from the queue.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>MSG_WAITALL</b></td>
 * <td>
 * Block until at least <i>len</i> are received.
 * However, if a signal is caught or the remote host disconnects, the
 * function may return less data.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>MSG_DONTWAIT</b></td>
 * <td>
 * With this flag set, the function returns even if it would normally
 * have blocked.
 * </td>
 * </tr>
 * </table>
 * @return int|false <b>socket_recv</b> returns the number of bytes received,
 * or <b>FALSE</b> if there was an error. The actual error code can be retrieved by
 * calling <b>socket_last_error</b>. This error code may be
 * passed to <b>socket_strerror</b> to get a textual explanation
 * of the error.
 */
function socket_recv(Socket $socket, &$data, int $length, int $flags): int|false {}

/**
 * Sends data to a connected socket
 * @link https://php.net/manual/en/function.socket-send.php
 * @param resource|Socket $socket <p>
 * A valid socket resource created with <b>socket_create</b>
 * or <b>socket_accept</b>.
 * </p>
 * @param string $data <p>
 * A buffer containing the data that will be sent to the remote host.
 * </p>
 * @param int $length <p>
 * The number of bytes that will be sent to the remote host from
 * <i>buf</i>.
 * </p>
 * @param int $flags <p>
 * The value of <i>flags</i> can be any combination of
 * the following flags, joined with the binary OR (|)
 * operator.
 * <table>
 * Possible values for <i>flags</i>
 * <tr valign="top">
 * <td><b>MSG_OOB</b></td>
 * <td>
 * Send OOB (out-of-band) data.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>MSG_EOR</b></td>
 * <td>
 * Indicate a record mark. The sent data completes the record.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>MSG_EOF</b></td>
 * <td>
 * Close the sender side of the socket and include an appropriate
 * notification of this at the end of the sent data. The sent data
 * completes the transaction.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>MSG_DONTROUTE</b></td>
 * <td>
 * Bypass routing, use direct interface.
 * </td>
 * </tr>
 * </table>
 * </p>
 * @return int|false <b>socket_send</b> returns the number of bytes sent, or <b>FALSE</b> on error.
 */
function socket_send(Socket $socket, string $data, int $length, int $flags): int|false {}

/**
 * (PHP 5 &gt;=5.5.0)<br/>
 * Send a message
 * @link https://secure.php.net/manual/en/function.socket-sendmsg.php
 * @param resource|Socket $socket
 * @param array $message
 * @param int $flags
 * @return int|false
 * @since 5.5
 */
function socket_sendmsg(
    Socket $socket,
    array $message,
    #[PhpStormStubsElementAvailable(from: '5.5', to: '7.4')] int $flags,
    #[PhpStormStubsElementAvailable(from: '8.0')] int $flags = 0
): int|false {}

/**
 * Receives data from a socket whether or not it is connection-oriented
 * @link https://php.net/manual/en/function.socket-recvfrom.php
 * @param resource|Socket $socket <p>
 * The <i>socket</i> must be a socket resource previously
 * created by socket_create().
 * </p>
 * @param string &$data <p>
 * The data received will be fetched to the variable specified with
 * <i>buf</i>.
 * </p>
 * @param int $length <p>
 * Up to <i>len</i> bytes will be fetched from remote host.
 * </p>
 * @param int $flags <p>
 * The value of <i>flags</i> can be any combination of
 * the following flags, joined with the binary OR (|)
 * operator.
 * </p>
 * <table>
 * Possible values for <i>flags</i>
 * <tr valign="top">
 * <td>Flag</td>
 * <td>Description</td>
 * </tr>
 * <tr valign="top">
 * <td><b>MSG_OOB</b></td>
 * <td>
 * Process out-of-band data.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>MSG_PEEK</b></td>
 * <td>
 * Receive data from the beginning of the receive queue without
 * removing it from the queue.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>MSG_WAITALL</b></td>
 * <td>
 * Block until at least <i>len</i> are received.
 * However, if a signal is caught or the remote host disconnects, the
 * function may return less data.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>MSG_DONTWAIT</b></td>
 * <td>
 * With this flag set, the function returns even if it would normally
 * have blocked.
 * </td>
 * </tr>
 * </table>
 * @param string &$address <p>
 * If the socket is of the type <b>AF_UNIX</b> type,
 * <i>name</i> is the path to the file. Else, for
 * unconnected sockets, <i>name</i> is the IP address of,
 * the remote host, or <b>NULL</b> if the socket is connection-oriented.
 * </p>
 * @param int &$port [optional] <p>
 * This argument only applies to <b>AF_INET</b> and
 * <b>AF_INET6</b> sockets, and specifies the remote port
 * from which the data is received. If the socket is connection-oriented,
 * <i>port</i> will be <b>NULL</b>.
 * </p>
 * @return int|false <b>socket_recvfrom</b> returns the number of bytes received,
 * or <b>FALSE</b> if there was an error. The actual error code can be retrieved by
 * calling <b>socket_last_error</b>. This error code may be
 * passed to <b>socket_strerror</b> to get a textual explanation
 * of the error.
 */
function socket_recvfrom(Socket $socket, &$data, int $length, int $flags, &$address, &$port = null): int|false {}

/**
 * Read a message
 * @link https://secure.php.net/manual/en/function.socket-recvmsg.php
 * @param resource|Socket $socket
 * @param array &$message
 * @param int $flags
 * @return int|false
 * @since 5.5
 */
function socket_recvmsg(
    Socket $socket,
    array &$message,
    #[PhpStormStubsElementAvailable(from: '5.5', to: '7.4')] int $flags,
    #[PhpStormStubsElementAvailable(from: '8.0')] int $flags = 0
): int|false {}

/**
 * Sends a message to a socket, whether it is connected or not
 * @link https://php.net/manual/en/function.socket-sendto.php
 * @param resource|Socket $socket <p>
 * A valid socket resource created using <b>socket_create</b>.
 * </p>
 * @param string $data <p>
 * The sent data will be taken from buffer <i>buf</i>.
 * </p>
 * @param int $length <p>
 * <i>len</i> bytes from <i>buf</i> will be
 * sent.
 * </p>
 * @param int $flags <p>
 * The value of <i>flags</i> can be any combination of
 * the following flags, joined with the binary OR (|)
 * operator.
 * <table>
 * Possible values for <i>flags</i>
 * <tr valign="top">
 * <td><b>MSG_OOB</b></td>
 * <td>
 * Send OOB (out-of-band) data.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>MSG_EOR</b></td>
 * <td>
 * Indicate a record mark. The sent data completes the record.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>MSG_EOF</b></td>
 * <td>
 * Close the sender side of the socket and include an appropriate
 * notification of this at the end of the sent data. The sent data
 * completes the transaction.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>MSG_DONTROUTE</b></td>
 * <td>
 * Bypass routing, use direct interface.
 * </td>
 * </tr>
 * </table>
 * </p>
 * @param string $address <p>
 * IP address of the remote host.
 * </p>
 * @param int|null $port <p>
 * <i>port</i> is the remote port number at which the data
 * will be sent.
 * </p>
 * @return int|false <b>socket_sendto</b> returns the number of bytes sent to the
 * remote host, or <b>FALSE</b> if an error occurred.
 */
function socket_sendto(Socket $socket, string $data, int $length, int $flags, string $address, ?int $port = null): int|false {}

/**
 * Gets socket options for the socket
 * @link https://php.net/manual/en/function.socket-get-option.php
 * @param resource|Socket $socket <p>
 * A valid socket resource created with <b>socket_create</b>
 * or <b>socket_accept</b>.
 * </p>
 * @param int $level <p>
 * The <i>level</i> parameter specifies the protocol
 * level at which the option resides. For example, to retrieve options at
 * the socket level, a <i>level</i> parameter of
 * <b>SOL_SOCKET</b> would be used. Other levels, such as
 * <b>TCP</b>, can be used by
 * specifying the protocol number of that level. Protocol numbers can be
 * found by using the <b>getprotobyname</b> function.
 * </p>
 * @param int $option <table>
 * Available Socket Options
 * <tr valign="top">
 * <td>Option</td>
 * <td>Description</td>
 * <td>Type</td>
 * </tr>
 * <tr valign="top">
 * <td><b>SO_DEBUG</b></td>
 * <td>
 * Reports whether debugging information is being recorded.
 * </td>
 * <td>
 * int
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>SO_BROADCAST</b></td>
 * <td>
 * Reports whether transmission of broadcast messages is supported.
 * </td>
 * <td>
 * int
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>SO_REUSEADDR</b></td>
 * <td>
 * Reports whether local addresses can be reused.
 * </td>
 * <td>
 * int
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>SO_KEEPALIVE</b></td>
 * <td>
 * Reports whether connections are kept active with periodic transmission
 * of messages. If the connected socket fails to respond to these messages,
 * the connection is broken and processes writing to that socket are notified
 * with a SIGPIPE signal.
 * </td>
 * <td>
 * int
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>SO_LINGER</b></td>
 * <td>
 * <p>
 * Reports whether the <i>socket</i> lingers on
 * <b>socket_close</b> if data is present. By default,
 * when the socket is closed, it attempts to send all unsent data.
 * In the case of a connection-oriented socket,
 * <b>socket_close</b> will wait for its peer to
 * acknowledge the data.
 * </p>
 * <p>
 * If l_onoff is non-zero and
 * l_linger is zero, all the
 * unsent data will be discarded and RST (reset) is sent to the
 * peer in the case of a connection-oriented socket.
 * </p>
 * <p>
 * On the other hand, if l_onoff is
 * non-zero and l_linger is non-zero,
 * <b>socket_close</b> will block until all the data
 * is sent or the time specified in l_linger
 * elapses. If the socket is non-blocking,
 * <b>socket_close</b> will fail and return an error.
 * </p>
 * </td>
 * <td>
 * array. The array will contain two keys:
 * l_onoff and
 * l_linger.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>SO_OOBINLINE</b></td>
 * <td>
 * Reports whether the <i>socket</i> leaves out-of-band data inline.
 * </td>
 * <td>
 * int
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>SO_SNDBUF</b></td>
 * <td>
 * Reports the size of the send buffer.
 * </td>
 * <td>
 * int
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>SO_RCVBUF</b></td>
 * <td>
 * Reports the size of the receive buffer.
 * </td>
 * <td>
 * int
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>SO_ERROR</b></td>
 * <td>
 * Reports information about error status and clears it.
 * </td>
 * <td>
 * int (cannot be set by <b>socket_set_option</b>)
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>SO_TYPE</b></td>
 * <td>
 * Reports the <i>socket</i> type (e.g.
 * <b>SOCK_STREAM</b>).
 * </td>
 * <td>
 * int (cannot be set by <b>socket_set_option</b>)
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>SO_DONTROUTE</b></td>
 * <td>
 * Reports whether outgoing messages bypass the standard routing facilities.
 * </td>
 * <td>
 * int
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>SO_RCVLOWAT</b></td>
 * <td>
 * Reports the minimum number of bytes to process for <i>socket</i>
 * input operations.
 * </td>
 * <td>
 * int
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>SO_RCVTIMEO</b></td>
 * <td>
 * Reports the timeout value for input operations.
 * </td>
 * <td>
 * array. The array will contain two keys:
 * sec which is the seconds part on the timeout
 * value and usec which is the microsecond part
 * of the timeout value.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>SO_SNDTIMEO</b></td>
 * <td>
 * Reports the timeout value specifying the amount of time that an output
 * function blocks because flow control prevents data from being sent.
 * </td>
 * <td>
 * array. The array will contain two keys:
 * sec which is the seconds part on the timeout
 * value and usec which is the microsecond part
 * of the timeout value.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>SO_SNDLOWAT</b></td>
 * <td>
 * Reports the minimum number of bytes to process for <i>socket</i> output operations.
 * </td>
 * <td>
 * int
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>TCP_NODELAY</b></td>
 * <td>
 * Reports whether the Nagle TCP algorithm is disabled.
 * </td>
 * <td>
 * int
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>MCAST_JOIN_GROUP</b></td>
 * <td>
 * Joins a multicast group. (added in PHP 5.4)
 * </td>
 * <td>
 * array with keys "group", specifying
 * a string with an IPv4 or IPv6 multicast address and
 * "interface", specifying either an interface
 * number (type int) or a string with
 * the interface name, like "eth0".
 * 0 can be specified to indicate the interface
 * should be selected using routing rules. (can only be used in
 * <b>socket_set_option</b>)
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>MCAST_LEAVE_GROUP</b></td>
 * <td>
 * Leaves a multicast group. (added in PHP 5.4)
 * </td>
 * <td>
 * array. See <b>MCAST_JOIN_GROUP</b> for
 * more information. (can only be used in
 * <b>socket_set_option</b>)
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>MCAST_BLOCK_SOURCE</b></td>
 * <td>
 * Blocks packets arriving from a specific source to a specific
 * multicast group, which must have been previously joined.
 * (added in PHP 5.4)
 * </td>
 * <td>
 * array with the same keys as
 * <b>MCAST_JOIN_GROUP</b>, plus one extra key,
 * source, which maps to a string
 * specifying an IPv4 or IPv6 address of the source to be blocked.
 * (can only be used in <b>socket_set_option</b>)
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>MCAST_UNBLOCK_SOURCE</b></td>
 * <td>
 * Unblocks (start receiving again) packets arriving from a specific
 * source address to a specific multicast group, which must have been
 * previously joined. (added in PHP 5.4)
 * </td>
 * <td>
 * array with the same format as
 * <b>MCAST_BLOCK_SOURCE</b>.
 * (can only be used in <b>socket_set_option</b>)
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>MCAST_JOIN_SOURCE_GROUP</b></td>
 * <td>
 * Receive packets destined to a specific multicast group whose source
 * address matches a specific value. (added in PHP 5.4)
 * </td>
 * <td>
 * array with the same format as
 * <b>MCAST_BLOCK_SOURCE</b>.
 * (can only be used in <b>socket_set_option</b>)
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>MCAST_LEAVE_SOURCE_GROUP</b></td>
 * <td>
 * Stop receiving packets destined to a specific multicast group whose
 * soure address matches a specific value. (added in PHP 5.4)
 * </td>
 * <td>
 * array with the same format as
 * <b>MCAST_BLOCK_SOURCE</b>.
 * (can only be used in <b>socket_set_option</b>)
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>IP_MULTICAST_IF</b></td>
 * <td>
 * The outgoing interface for IPv4 multicast packets.
 * (added in PHP 5.4)
 * </td>
 * <td>
 * Either int specifying the interface number or a
 * string with an interface name, like
 * eth0. The value 0 can be used to
 * indicate the routing table is to used in the interface selection.
 * The function <b>socket_get_option</b> returns an
 * interface index.
 * Note that, unlike the C API, this option does NOT take an IP
 * address. This eliminates the interface difference between
 * <b>IP_MULTICAST_IF</b> and
 * <b>IPV6_MULTICAST_IF</b>.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>IPV6_MULTICAST_IF</b></td>
 * <td>
 * The outgoing interface for IPv6 multicast packets.
 * (added in PHP 5.4)
 * </td>
 * <td>
 * The same as <b>IP_MULTICAST_IF</b>.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>IP_MULTICAST_LOOP</b></td>
 * <td>
 * The multicast loopback policy for IPv4 packets, which
 * determines whether multicast packets sent by this socket also reach
 * receivers in the same host that have joined the same multicast group
 * on the outgoing interface used by this socket. This is the case by
 * default.
 * (added in PHP 5.4)
 * </td>
 * <td>
 * int (either 0 or
 * 1). For <b>socket_set_option</b>
 * any value will be accepted and will be converted to a boolean
 * following the usual PHP rules.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>IPV6_MULTICAST_LOOP</b></td>
 * <td>
 * Analogous to <b>IP_MULTICAST_LOOP</b>, but for IPv6.
 * (added in PHP 5.4)
 * </td>
 * <td>
 * int. See <b>IP_MULTICAST_LOOP</b>.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>IP_MULTICAST_TTL</b></td>
 * <td>
 * The time-to-live of outgoing IPv4 multicast packets. This should be
 * a value between 0 (don't leave the interface) and 255. The default
 * value is 1 (only the local network is reached).
 * (added in PHP 5.4)
 * </td>
 * <td>
 * int between 0 and 255.
 * </td>
 * </tr>
 * <tr valign="top">
 * <td><b>IPV6_MULTICAST_HOPS</b></td>
 * <td>
 * Analogous to <b>IP_MULTICAST_TTL</b>, but for IPv6
 * packets. The value -1 is also accepted, meaning the route default
 * should be used.
 * (added in PHP 5.4)
 * </td>
 * <td>
 * int between -1 and 255.
 * </td>
 * </tr>
 * </table>
 * @return array|int|false the value of the given option, or <b>FALSE</b> on errors.
 */
function socket_get_option(Socket $socket, int $level, int $option): array|int|false {}

/**
 * Sets socket options for the socket
 * @link https://php.net/manual/en/function.socket-set-option.php
 * @param resource|Socket $socket <p>
 * A valid socket resource created with <b>socket_create</b>
 * or <b>socket_accept</b>.
 * </p>
 * @param int $level <p>
 * The <i>level</i> parameter specifies the protocol
 * level at which the option resides. For example, to retrieve options at
 * the socket level, a <i>level</i> parameter of
 * <b>SOL_SOCKET</b> would be used. Other levels, such as
 * TCP, can be used by specifying the protocol number of that level.
 * Protocol numbers can be found by using the
 * <b>getprotobyname</b> function.
 * </p>
 * @param int $option <p>
 * The available socket options are the same as those for the
 * <b>socket_get_option</b> function.
 * </p>
 * @param mixed $value <p>
 * The option value.
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function socket_set_option(Socket $socket, int $level, int $option, $value): bool {}

/**
 * Shuts down a socket for receiving, sending, or both
 * @link https://php.net/manual/en/function.socket-shutdown.php
 * @param resource|Socket $socket <p>
 * A valid socket resource created with <b>socket_create</b>.
 * </p>
 * @param int $mode [optional] <p>
 * The value of <i>how</i> can be one of the following:
 * <table>
 * possible values for <i>how</i>
 * <tr valign="top">
 * <td>0</td>
 * <td>
 * Shutdown socket reading
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>1</td>
 * <td>
 * Shutdown socket writing
 * </td>
 * </tr>
 * <tr valign="top">
 * <td>2</td>
 * <td>
 * Shutdown socket reading and writing
 * </td>
 * </tr>
 * </table>
 * </p>
 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
 */
function socket_shutdown(Socket $socket, int $mode = 2): bool {}

/**
 * Returns the last error on the socket
 * @link https://php.net/manual/en/function.socket-last-error.php
 * @param resource|Socket $socket [optional] <p>
 * A valid socket resource created with <b>socket_create</b>.
 * </p>
 * @return int This function returns a socket error code.
 */
function socket_last_error(?Socket $socket = null): int {}

/**
 * Clears the error on the socket or the last error code
 * @link https://php.net/manual/en/function.socket-clear-error.php
 * @param resource|Socket|null $socket [optional] <p>
 * A valid socket resource created with <b>socket_create</b>.
 * </p>
 * @return void No value is returned.
 */
function socket_clear_error(?Socket $socket = null): void {}

/**
 * Import a stream
 * @link https://php.net/manual/en/function.socket-import-stream.php
 * @param resource|Socket $stream <p>
 * The stream resource to import.
 * </p>
 * @return resource|Socket|false|null <b>FALSE</b> or <b>NULL</b> on failure.
 * @since 5.4
 */
function socket_import_stream($stream): Socket|false {}

/**
 * Calculate message buffer size
 * @link https://php.net/manual/en/function.socket-cmsg-space.php
 * @param int $level
 * @param int $type
 * @param int $num [optional]
 * @return int|null
 * @since 5.5
 */
function socket_cmsg_space(
    int $level,
    int $type,
    #[PhpStormStubsElementAvailable(from: '8.0')] int $num = 0
): ?int {}

/**
 * Alias of {@see socket_get_option}
 * @param Socket $socket
 * @param int $level
 * @param int $option
 */
function socket_getopt(Socket $socket, int $level, int $option): array|int|false {}

/**
 * Alias of {@see socket_set_option}
 * @param Socket $socket
 * @param int $level
 * @param int $option
 * @param $value
 * @return bool
 */
function socket_setopt(Socket $socket, int $level, int $option, $value): bool {}

/**
 * Exports the WSAPROTOCOL_INFO Structure
 *
 * @link https://www.php.net/manual/en/function.socket-wsaprotocol-info-export.php
 *
 * @param resource|Socket $socket
 * @param int $target_pid
 * @return string|false
 *
 * @since 7.3
 */
function socket_wsaprotocol_info_export($socket, $target_pid) {}

/**
 * Imports a Socket from another Process
 *
 * @link https://www.php.net/manual/en/function.socket-wsaprotocol-info-import.php
 *
 * @param string $info_id
 * @return resource|Socket|false
 *
 * @since 7.3
 */
function socket_wsaprotocol_info_import($info_id) {}

/**
 * Releases an exported WSAPROTOCOL_INFO Structure
 *
 * @link https://www.php.net/manual/en/function.socket-wsaprotocol-info-release.php
 *
 * @param string $info_id
 * @return bool
 *
 * @since 7.3
 */
function socket_wsaprotocol_info_release($info_id) {}

define('AF_UNIX', 1);
define('AF_INET', 2);

/**
 * Only available if compiled with IPv6 support.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('AF_INET6', 10);
define('SOCK_STREAM', 1);
define('SOCK_DGRAM', 2);
define('SOCK_RAW', 3);
define('SOCK_SEQPACKET', 5);
define('SOCK_RDM', 4);
define('MSG_OOB', 1);
define('MSG_WAITALL', 256);
define('MSG_CTRUNC', 8);
define('MSG_TRUNC', 32);
define('MSG_PEEK', 2);
define('MSG_DONTROUTE', 4);

/**
 * Not available on Windows platforms.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('MSG_EOR', 128);

/**
 * Not available on Windows platforms.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('MSG_EOF', 512);
define('MSG_CONFIRM', 2048);
define('MSG_ERRQUEUE', 8192);
define('MSG_NOSIGNAL', 16384);
define('MSG_DONTWAIT', 64);
define('MSG_MORE', 32768);
define('MSG_WAITFORONE', 65536);
define('MSG_CMSG_CLOEXEC', 1073741824);
define('SO_DEBUG', 1);
define('SO_REUSEADDR', 2);

/**
 * This constant is only available in PHP 5.4.10 or later on platforms that
 * support the <b>SO_REUSEPORT</b> socket option: this
 * includes Mac OS X and FreeBSD, but does not include Linux or Windows.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SO_REUSEPORT', 15);
define('SO_KEEPALIVE', 9);
define('SO_DONTROUTE', 5);
define('SO_LINGER', 13);
define('SO_BROADCAST', 6);
define('SO_OOBINLINE', 10);
define('SO_SNDBUF', 7);
define('SO_RCVBUF', 8);
define('SO_SNDLOWAT', 19);
define('SO_RCVLOWAT', 18);
define('SO_SNDTIMEO', 21);
define('SO_RCVTIMEO', 20);
define('SO_TYPE', 3);
define('SO_ERROR', 4);
define('SO_BINDTODEVICE', 25);
define('SOL_SOCKET', 1);
define('SOMAXCONN', 128);
/**
 * @since 8.1
 */
define('SO_MARK', 36);
/**
 * Used to disable Nagle TCP algorithm.
 * Added in PHP 5.2.7.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('TCP_NODELAY', 1);
define('PHP_NORMAL_READ', 1);
define('PHP_BINARY_READ', 2);
/**
 * Joins a multicast group.
 * @since 5.4
 * @link https://php.net/manual/en/function.socket-get-option.php
 */
define('MCAST_JOIN_GROUP', 42);
/**
 * Leaves a multicast group.
 * @since 5.4
 * @link https://php.net/manual/en/function.socket-get-option.php
 */
define('MCAST_LEAVE_GROUP', 45);
/**
 * Blocks packets arriving from a specific source to a specific multicast group,
 * which must have been previously joined.
 * @since 5.4
 * @link https://php.net/manual/en/function.socket-get-option.php
 */
define('MCAST_BLOCK_SOURCE', 43);
/**
 * Unblocks (start receiving again) packets arriving from
 * a specific source address to a specific multicast group,
 * which must have been previously joined.
 * @since 5.4
 * @link https://php.net/manual/en/function.socket-get-option.php
 */
define('MCAST_UNBLOCK_SOURCE', 44);
/**
 * Receive packets destined to a specific multicast group
 * whose source address matches a specific value.
 * @since 5.4
 * @link https://php.net/manual/en/function.socket-get-option.php
 */
define('MCAST_JOIN_SOURCE_GROUP', 46);
/**
 * Stop receiving packets destined to a specific multicast group
 * whose soure address matches a specific value.
 * @since 5.4
 * @link https://php.net/manual/en/function.socket-get-option.php
 */
define('MCAST_LEAVE_SOURCE_GROUP', 47);
/**
 * The outgoing interface for IPv4 multicast packets.
 * @since 5.4
 * @link https://php.net/manual/en/function.socket-get-option.php
 */
define('IP_MULTICAST_IF', 32);
/**
 * The outgoing interface for IPv6 multicast packets.
 * @since 5.4
 * @link https://php.net/manual/en/function.socket-get-option.php
 */
define('IP_MULTICAST_TTL', 33);
/**
 * The multicast loopback policy for IPv4 packets,
 * which determines whether multicast packets sent by this socket
 * also reach receivers in the same host that have joined the same multicast group
 * on the outgoing interface used by this socket. This is the case by default.
 * @since 5.4
 * @link https://php.net/manual/en/function.socket-get-option.php
 */
define('IP_MULTICAST_LOOP', 34);
/**
 * Analogous to IP_MULTICAST_LOOP, but for IPv6.
 * @since 5.4
 * @link https://php.net/manual/en/function.socket-get-option.php
 */
define('IPV6_MULTICAST_IF', 17);
/**
 * The time-to-live of outgoing IPv4 multicast packets.
 * This should be a value between 0 (don't leave the interface) and 255.
 * The default value is 1 (only the local network is reached).
 * @since 5.4
 * @link https://php.net/manual/en/function.socket-get-option.php
 */
define('IPV6_MULTICAST_HOPS', 18);
/**
 * Analogous to IP_MULTICAST_TTL, but for IPv6 packets.
 * The value -1 is also accepted, meaning the route default should be used.
 * @since 5.4
 * @link https://php.net/manual/en/function.socket-get-option.php
 */
define('IPV6_MULTICAST_LOOP', 19);
define('IPV6_V6ONLY', 26);

/**
 * Operation not permitted.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EPERM', 1);

/**
 * No such file or directory.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENOENT', 2);

/**
 * Interrupted system call.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EINTR', 4);

/**
 * I/O error.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EIO', 5);

/**
 * No such device or address.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENXIO', 6);

/**
 * Arg list too long.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_E2BIG', 7);

/**
 * Bad file number.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EBADF', 9);

/**
 * Try again.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EAGAIN', 11);

/**
 * Out of memory.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENOMEM', 12);

/**
 * Permission denied.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EACCES', 13);

/**
 * Bad address.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EFAULT', 14);

/**
 * Block device required.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENOTBLK', 15);

/**
 * Device or resource busy.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EBUSY', 16);

/**
 * File exists.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EEXIST', 17);

/**
 * Cross-device link.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EXDEV', 18);

/**
 * No such device.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENODEV', 19);

/**
 * Not a directory.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENOTDIR', 20);

/**
 * Is a directory.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EISDIR', 21);

/**
 * Invalid argument.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EINVAL', 22);

/**
 * File table overflow.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENFILE', 23);

/**
 * Too many open files.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EMFILE', 24);

/**
 * Not a typewriter.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENOTTY', 25);

/**
 * No space left on device.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENOSPC', 28);

/**
 * Illegal seek.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ESPIPE', 29);

/**
 * Read-only file system.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EROFS', 30);

/**
 * Too many links.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EMLINK', 31);

/**
 * Broken pipe.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EPIPE', 32);

/**
 * File name too long.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENAMETOOLONG', 36);

/**
 * No record locks available.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENOLCK', 37);

/**
 * Function not implemented.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENOSYS', 38);

/**
 * Directory not empty.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENOTEMPTY', 39);

/**
 * Too many symbolic links encountered.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ELOOP', 40);

/**
 * Operation would block.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EWOULDBLOCK', 11);

/**
 * No message of desired type.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENOMSG', 42);

/**
 * Identifier removed.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EIDRM', 43);

/**
 * Channel number out of range.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ECHRNG', 44);

/**
 * Level 2 not synchronized.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EL2NSYNC', 45);

/**
 * Level 3 halted.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EL3HLT', 46);

/**
 * Level 3 reset.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EL3RST', 47);

/**
 * Link number out of range.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ELNRNG', 48);

/**
 * Protocol driver not attached.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EUNATCH', 49);

/**
 * No CSI structure available.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENOCSI', 50);

/**
 * Level 2 halted.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EL2HLT', 51);

/**
 * Invalid exchange.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EBADE', 52);

/**
 * Invalid request descriptor.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EBADR', 53);

/**
 * Exchange full.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EXFULL', 54);

/**
 * No anode.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENOANO', 55);

/**
 * Invalid request code.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EBADRQC', 56);

/**
 * Invalid slot.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EBADSLT', 57);

/**
 * Device not a stream.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENOSTR', 60);

/**
 * No data available.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENODATA', 61);

/**
 * Timer expired.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ETIME', 62);

/**
 * Out of streams resources.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENOSR', 63);

/**
 * Machine is not on the network.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENONET', 64);

/**
 * Object is remote.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EREMOTE', 66);

/**
 * Link has been severed.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENOLINK', 67);

/**
 * Advertise error.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EADV', 68);

/**
 * Srmount error.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ESRMNT', 69);

/**
 * Communication error on send.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ECOMM', 70);

/**
 * Protocol error.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EPROTO', 71);

/**
 * Multihop attempted.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EMULTIHOP', 72);

/**
 * Not a data message.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EBADMSG', 74);

/**
 * Name not unique on network.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENOTUNIQ', 76);

/**
 * File descriptor in bad state.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EBADFD', 77);

/**
 * Remote address changed.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EREMCHG', 78);

/**
 * Interrupted system call should be restarted.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ERESTART', 85);

/**
 * Streams pipe error.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ESTRPIPE', 86);

/**
 * Too many users.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EUSERS', 87);

/**
 * Socket operation on non-socket.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENOTSOCK', 88);

/**
 * Destination address required.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EDESTADDRREQ', 89);

/**
 * Message too long.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EMSGSIZE', 90);

/**
 * Protocol wrong type for socket.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EPROTOTYPE', 91);
define('SOCKET_ENOPROTOOPT', 92);

/**
 * Protocol not supported.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EPROTONOSUPPORT', 93);

/**
 * Socket type not supported.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ESOCKTNOSUPPORT', 94);

/**
 * Operation not supported on transport endpoint.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EOPNOTSUPP', 95);

/**
 * Protocol family not supported.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EPFNOSUPPORT', 96);

/**
 * Address family not supported by protocol.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EAFNOSUPPORT', 97);
define('SOCKET_EADDRINUSE', 98);

/**
 * Cannot assign requested address.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EADDRNOTAVAIL', 99);

/**
 * Network is down.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENETDOWN', 100);

/**
 * Network is unreachable.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENETUNREACH', 101);

/**
 * Network dropped connection because of reset.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENETRESET', 102);

/**
 * Software caused connection abort.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ECONNABORTED', 103);

/**
 * Connection reset by peer.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ECONNRESET', 104);

/**
 * No buffer space available.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENOBUFS', 105);

/**
 * Transport endpoint is already connected.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EISCONN', 106);

/**
 * Transport endpoint is not connected.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENOTCONN', 107);

/**
 * Cannot send after transport endpoint shutdown.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ESHUTDOWN', 108);

/**
 * Too many references: cannot splice.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ETOOMANYREFS', 109);

/**
 * Connection timed out.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ETIMEDOUT', 110);

/**
 * Connection refused.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ECONNREFUSED', 111);

/**
 * Host is down.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EHOSTDOWN', 112);

/**
 * No route to host.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EHOSTUNREACH', 113);

/**
 * Operation already in progress.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EALREADY', 114);

/**
 * Operation now in progress.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EINPROGRESS', 115);

/**
 * Is a named type file.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EISNAM', 120);

/**
 * Remote I/O error.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EREMOTEIO', 121);

/**
 * Quota exceeded.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EDQUOT', 122);

/**
 * No medium found.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_ENOMEDIUM', 123);

/**
 * Wrong medium type.
 * @link https://php.net/manual/en/sockets.constants.php
 */
define('SOCKET_EMEDIUMTYPE', 124);
define('IPPROTO_IP', 0);
define('IPPROTO_IPV6', 41);
define('SOL_TCP', 6);
define('SOL_UDP', 17);
define('IPV6_UNICAST_HOPS', 16);
define('IPV6_RECVPKTINFO', 49);
define('IPV6_PKTINFO', 50);
define('IPV6_RECVHOPLIMIT', 51);
define('IPV6_HOPLIMIT', 52);
define('IPV6_RECVTCLASS', 66);
define('IPV6_TCLASS', 67);
define('SCM_RIGHTS', 1);
define('SCM_CREDENTIALS', 2);
define('SO_PASSCRED', 16);

define('SOCKET_EPROCLIM', 10067);
define('SOCKET_ESTALE', 10070);
define('SOCKET_EDISCON', 10101);
define('SOCKET_SYSNOTREADY', 10091);
define('SOCKET_VERNOTSUPPORTED', 10092);
define('SOCKET_NOTINITIALISED', 10093);
define('SOCKET_HOST_NOT_FOUND', 11001);
define('SOCKET_TRY_AGAIN', 11002);
define('SOCKET_NO_RECOVERY', 11003);
define('SOCKET_NO_DATA', 11004);
define('SOCKET_NO_ADDRESS', 11004);

define('AI_PASSIVE', 1);
define('AI_CANONNAME', 2);
define('AI_NUMERICHOST', 4);
define('AI_ADDRCONFIG', 32);
define('AI_NUMERICSERV', 1024);
define('AI_V4MAPPED', 8);
define('AI_ALL', 16);

/**
 * @since 8.1
 */
define('TCP_DEFER_ACCEPT', 9);

/**
 * @since 8.2
 */
define('SO_INCOMING_CPU', 49);

/**
 * @since 8.2
 */
define('SO_MEMINFO', 55);

/**
 * @since 8.2
 */
define('SO_BPF_EXTENSIONS', 48);

/**
 * @since 8.2
 */
define('SKF_AD_OFF', -4096);

/**
 * @since 8.2
 */
define('SKF_AD_PROTOCOL', 0);

/**
 * @since 8.2
 */
define('SKF_AD_PKTTYPE', 4);

/**
 * @since 8.2
 */
define('SKF_AD_IFINDEX', 8);

/**
 * @since 8.2
 */
define('SKF_AD_NLATTR', 12);

/**
 * @since 8.2
 */
define('SKF_AD_NLATTR_NEST', 16);

/**
 * @since 8.2
 */
define('SKF_AD_MARK', 20);

/**
 * @since 8.2
 */
define('SKF_AD_QUEUE', 24);

/**
 * @since 8.2
 */
define('SKF_AD_HATYPE', 28);

/**
 * @since 8.2
 */
define('SKF_AD_RXHASH', 32);

/**
 * @since 8.2
 */
define('SKF_AD_CPU', 36);

/**
 * @since 8.2
 */
define('SKF_AD_ALU_XOR_X', 40);

/**
 * @since 8.2
 */
define('SKF_AD_VLAN_TAG', 44);

/**
 * @since 8.2
 */
define('SKF_AD_VLAN_TAG_PRESENT', 48);

/**
 * @since 8.2
 */
define('SKF_AD_PAY_OFFSET', 52);

/**
 * @since 8.2
 */
define('SKF_AD_RANDOM', 56);

/**
 * @since 8.2
 */
define('SKF_AD_VLAN_TPID', 60);

/**
 * @since 8.2
 */
define('SKF_AD_MAX', 64);

/**
 * @since 8.2
 */
define('TCP_CONGESTION', 13);

/**
 * @since 8.2
 */
define('TCP_NOTSENT_LOWAT', 25);

/**
 * @since 8.2
 */
define('TCP_KEEPIDLE', 4);

/**
 * @since 8.2
 */
define('TCP_KEEPINTVL', 5);

/**
 * @since 8.2
 */
define('TCP_KEEPCNT', 6);

/**
 * Socket_set_option for the socket_send* functions.
 * It avoids copy b/w userland and kernel for both TCP and UDP protocols.
 * @since 8.2
 */
define('SO_ZEROCOPY', 60);

/**
 * Socket_set_option for the socket_send* functions.
 * It avoids copy b/w userland and kernel for both TCP and UDP protocols.
 * @since 8.2
 */
define('MSG_ZEROCOPY', 67108864);

/**
 * @since 8.0
 */
final class Socket
{
    /**
     * Cannot directly construct Socket, use socket_create() instead
     * @see socket_create()
     */
    private function __construct() {}
}

/**
 * @since 8.0
 */
final class AddressInfo
{
    /**
     * Cannot directly construct AddressInfo, use socket_addrinfo_lookup() instead
     * @see socket_addrinfo_lookup()
     */
    private function __construct() {}
}
<?php

/**
 * @since 8.1
 */
class CURLStringFile
{
    public string $data;
    public string $mime;
    public string $postname;

    public function __construct(string $data, string $postname, string $mime = 'application/octet-stream') {}
}
<?php

use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;

class CURLFile
{
    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $name;

    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $mime;

    #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
    public $postname;

    /**
     * Create a CURLFile object
     * @link https://secure.php.net/manual/en/curlfile.construct.php
     * @param string $filename <p>Path to the file which will be uploaded.</p>
     * @param string $mime_type [optional] <p>Mimetype of the file.</p>
     * @param string $posted_filename [optional] <p>Name of the file.</p>
     * @since 5.5
     */
    public function __construct(
        #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename,
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $mime_type = '',
        #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $posted_filename = ''
    ) {}

    /**
     * Get file name
     * @link https://secure.php.net/manual/en/curlfile.getfilename.php
     * @return string Returns file name.
     * @since 5.5
     */
    #[Pure]
    #[TentativeType]
    public function getFilename(): string {}

    /**
     * Get MIME type
     * @link https://secure.php.net/manual/en/curlfile.getmimetype.php
     * @return string Returns MIME type.
     * @since 5.5
     */
    #[Pure]
    #[TentativeType]
    public function getMimeType(): string {}

    /**
     * Get file name for POST
     * @link https://secure.php.net/manual/en/curlfile.getpostfilename.php
     * @return string Returns file name for POST.
     * @since 5.5
     */
    #[Pure]
    #[TentativeType]
    public function getPostFilename(): string {}

    /**
     * Set MIME type
     * @link https://secure.php.net/manual/en/curlfile.setmimetype.php
     * @param string $mime_type
     * @since 5.5
     */
    #[TentativeType]
    public function setMimeType(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $mime_type): void {}

    /**
     * Set file name for POST
     * https://secure.php.net/manual/en/curlfile.setpostfilename.php
     * @param string $posted_filename
     * @since 5.5
     */
    #[TentativeType]
    public function setPostFilename(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $posted_filename): void {}

    /**
     * @link https://secure.php.net/manual/en/curlfile.wakeup.php
     * Unserialization handler
     * @since 5.5
     */
    public function __wakeup() {}
}

/**
 * Initialize a cURL session
 * @link https://php.net/manual/en/function.curl-init.php
 * @param string|null $url [optional] <p>
 * If provided, the CURLOPT_URL option will be set
 * to its value. You can manually set this using the
 * curl_setopt function.
 * </p>
 * @return resource|false|CurlHandle a cURL handle on success, false on errors.
 */
#[LanguageLevelTypeAware(['8.0' => 'CurlHandle|false'], default: 'resource|false')]
function curl_init(?string $url) {}

/**
 * Copy a cURL handle along with all of its preferences
 * @link https://php.net/manual/en/function.curl-copy-handle.php
 * @param CurlHandle|resource $handle
 * @return CurlHandle|resource|false a new cURL handle.
 */
#[Pure]
#[LanguageLevelTypeAware(['8.0' => 'CurlHandle|false'], default: 'resource|false')]
function curl_copy_handle(#[LanguageLevelTypeAware(['8.0' => 'CurlHandle'], default: 'resource')] $handle) {}

/**
 * Gets cURL version information
 * @link https://php.net/manual/en/function.curl-version.php
 * @param int $age [optional] Removed since version PHP 8.0.
 * @return array|false an associative array with the following elements:
 * <tr valign="top">
 * <td>Indice</td>
 * <td>Value description</td>
 * </tr>
 * <tr valign="top">
 * <td>version_number</td>
 * <td>cURL 24 bit version number</td>
 * </tr>
 * <tr valign="top">
 * <td>version</td>
 * <td>cURL version number, as a string</td>
 * </tr>
 * <tr valign="top">
 * <td>ssl_version_number</td>
 * <td>OpenSSL 24 bit version number</td>
 * </tr>
 * <tr valign="top">
 * <td>ssl_version</td>
 * <td>OpenSSL version number, as a string</td>
 * </tr>
 * <tr valign="top">
 * <td>libz_version</td>
 * <td>zlib version number, as a string</td>
 * </tr>
 * <tr valign="top">
 * <td>host</td>
 * <td>Information about the host where cURL was built</td>
 * </tr>
 * <tr valign="top">
 * <td>age</td>
 * <td></td>
 * </tr>
 * <tr valign="top">
 * <td>features</td>
 * <td>A bitmask of the CURL_VERSION_XXX constants</td>
 * </tr>
 * <tr valign="top">
 * <td>protocols</td>
 * <td>An array of protocols names supported by cURL</td>
 * </tr>
 */
#[ArrayShape(["version_number" => "string", "version" => "string", "ssl_version_number" => "int", "ssl_version" => "string", "libz_version" => "string", "host" => "string", "age" => "int", "features" => "int", "protocols" => "array"])]
#[Pure]
function curl_version(#[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $age = null): array|false {}

/**
 * Set an option for a cURL transfer
 * @link https://php.net/manual/en/function.curl-setopt.php
 * @param CurlHandle|resource $handle
 * @param int $option <p>
 * The CURLOPT_XXX option to set.
 * </p>
 * @param mixed|callable $value <p>
 * The value to be set on option.
 * </p>
 * <p>
 * value should be a bool for the
 * following values of the option parameter:</p>
 * <table class="doctable informaltable">
 *
 * <thead>
 * <tr>
 * <th>Option</th>
 * <th>Set <em>value</em> to</th>
 * <th>Notes</th>
 * </tr>
 * </thead>
 *
 * <tbody class="tbody">
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_AUTOREFERER</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to automatically set the <em>Referer:</em> field in
 * requests where it follows a <em>Location:</em> redirect.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_BINARYTRANSFER</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to return the raw output when
 * <b>CURLOPT_RETURNTRANSFER</b> is used.
 * </td>
 * <td style="vertical-align: top;">
 * From PHP 5.1.3, this option has no effect: the raw output will
 * always be returned when
 * <b>CURLOPT_RETURNTRANSFER</b> is used.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_COOKIESESSION</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to mark this as a new cookie "session". It will force libcurl
 * to ignore all cookies it is about to load that are "session cookies"
 * from the previous session. By default, libcurl always stores and
 * loads all cookies, independent if they are session cookies or not.
 * Session cookies are cookies without expiry date and they are meant
 * to be alive and existing for this "session" only.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_CERTINFO</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to output SSL certification information to <em>STDERR</em>
 * on secure transfers.
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.19.1.
 * Available since PHP 5.3.2.
 * Requires <b>CURLOPT_VERBOSE</b> to be on to have an effect.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_CONNECT_ONLY</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> tells the library to perform all the required proxy authentication
 * and connection setup, but no data transfer. This option is implemented for
 * HTTP, SMTP and POP3.
 * </td>
 * <td style="vertical-align: top;">
 * Added in 7.15.2.
 * Available since PHP 5.5.0.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_CRLF</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to convert Unix newlines to CRLF newlines
 * on transfers.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_DNS_USE_GLOBAL_CACHE</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to use a global DNS cache. This option is
 * not thread-safe and is enabled by default.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_FAILONERROR</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to fail verbosely if the HTTP code returned
 * is greater than or equal to 400. The default behavior is to return
 * the page normally, ignoring the code.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_FILETIME</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to attempt to retrieve the modification
 * date of the remote document. This value can be retrieved using
 * the <b>CURLINFO_FILETIME</b> option with
 * <span class="function">{@see curl_getinfo()}</span>.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_FOLLOWLOCATION</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to follow any
 * <em>"Location: "</em> header that the server sends as
 * part of the HTTP header (note this is recursive, PHP will follow as
 * many <em>"Location: "</em> headers that it is sent,
 * unless <b>CURLOPT_MAXREDIRS</b> is set).
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_FORBID_REUSE</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to force the connection to explicitly
 * close when it has finished processing, and not be pooled for reuse.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_FRESH_CONNECT</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to force the use of a new connection
 * instead of a cached one.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_FTP_USE_EPRT</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to use EPRT (and LPRT) when doing active
 * FTP downloads. Use <b>FALSE</b> to disable EPRT and LPRT and use PORT
 * only.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_FTP_USE_EPSV</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to first try an EPSV command for FTP
 * transfers before reverting back to PASV. Set to <b>FALSE</b>
 * to disable EPSV.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_FTP_CREATE_MISSING_DIRS</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to create missing directories when an FTP operation
 * encounters a path that currently doesn't exist.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_FTPAPPEND</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to append to the remote file instead of
 * overwriting it.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_TCP_NODELAY</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to disable TCP's Nagle algorithm, which tries to minimize
 * the number of small packets on the network.
 * </td>
 * <td style="vertical-align: top;">
 * Available since PHP 5.2.1 for versions compiled with libcurl 7.11.2 or
 * greater.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_FTPASCII</b></td>
 * <td style="vertical-align: top;">
 * An alias of
 * <b>CURLOPT_TRANSFERTEXT</b>. Use that instead.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_FTPLISTONLY</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to only list the names of an FTP
 * directory.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_HEADER</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to include the header in the output.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td><b>CURLINFO_HEADER_OUT</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to track the handle's request string.
 * </td>
 * <td style="vertical-align: top;">
 * Available since PHP 5.1.3. The <b>CURLINFO_</b>
 * prefix is intentional.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_HTTPGET</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to reset the HTTP request method to GET.
 * Since GET is the default, this is only necessary if the request
 * method has been changed.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_HTTPPROXYTUNNEL</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to tunnel through a given HTTP proxy.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_MUTE</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to be completely silent with regards to
 * the cURL functions.
 * </td>
 * <td style="vertical-align: top;">
 * Removed in cURL 7.15.5 (You can use CURLOPT_RETURNTRANSFER instead)
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_NETRC</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to scan the <var class="filename">~/.netrc</var>
 * file to find a username and password for the remote site that
 * a connection is being established with.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_NOBODY</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to exclude the body from the output.
 * Request method is then set to HEAD. Changing this to <b>FALSE</b> does
 * not change it to GET.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_NOPROGRESS</b></td>
 * <td style="vertical-align: top;"><p>
 * <b>TRUE</b> to disable the progress meter for cURL transfers.
 * </p><blockquote class="note"><p><strong class="note">Note</strong>:
 * </p><p>
 * PHP automatically sets this option to <b>TRUE</b>, this should only be
 * changed for debugging purposes.
 * </p>
 * </blockquote>
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_NOSIGNAL</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to ignore any cURL function that causes a
 * signal to be sent to the PHP process. This is turned on by default
 * in multi-threaded SAPIs so timeout options can still be used.
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.10.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_POST</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to do a regular HTTP POST. This POST is the
 * normal <em>application/x-www-form-urlencoded</em> kind,
 * most commonly used by HTML forms.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_PUT</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to HTTP PUT a file. The file to PUT must
 * be set with <b>CURLOPT_INFILE</b> and
 * <b>CURLOPT_INFILESIZE</b>.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_RETURNTRANSFER</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to return the transfer as a string of the
 * return value of <span class="function">{@see curl_exec()}</span> instead of outputting
 * it out directly.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SAFE_UPLOAD</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to disable support for the <em>@</em> prefix for
 * uploading files in <b>CURLOPT_POSTFIELDS</b>, which
 * means that values starting with <em>@</em> can be safely
 * passed as fields. {@see CURLFile} may be used for
 * uploads instead.
 * </td>
 * <td style="vertical-align: top;">
 * Added in PHP 5.5.0 with <b>FALSE</b> as the default value. PHP 5.6.0
 * changes the default value to <b>TRUE</b>.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSL_VERIFYPEER</b></td>
 * <td style="vertical-align: top;">
 * <b>FALSE</b> to stop cURL from verifying the peer's
 * certificate. Alternate certificates to verify against can be
 * specified with the <b>CURLOPT_CAINFO</b> option
 * or a certificate directory can be specified with the
 * <b>CURLOPT_CAPATH</b> option.
 * </td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> by default as of cURL 7.10. Default bundle installed as of
 * cURL 7.10.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_TRANSFERTEXT</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to use ASCII mode for FTP transfers.
 * For LDAP, it retrieves data in plain text instead of HTML. On
 * Windows systems, it will not set <em>STDOUT</em> to binary
 * mode.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_UNRESTRICTED_AUTH</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to keep sending the username and password
 * when following locations (using
 * <b>CURLOPT_FOLLOWLOCATION</b>), even when the
 * hostname has changed.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_UPLOAD</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to prepare for an upload.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_VERBOSE</b></td>
 * <td style="vertical-align: top;">
 * <b>TRUE</b> to output verbose information. Writes
 * output to <em>STDERR</em>, or the file specified using
 * <b>CURLOPT_STDERR</B>.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * </tbody>
 *
 * </table>
 *
 * value should be an integer for the following values of the option parameter:
 * <table>
 *
 * <thead>
 * <tr>
 * <th>Option</th>
 * <th>Set <em>value</em> to</th>
 * <th>Notes</th>
 * </tr>
 * </thead>
 *
 * <tbody class="tbody">
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_BUFFERSIZE</b></td>
 * <td style="vertical-align: top;">
 * The size of the buffer to use for each read. There is no guarantee
 * this request will be fulfilled, however.
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.10.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_CLOSEPOLICY</b></td>
 * <td style="vertical-align: top;">
 * One of the <b>CURLCLOSEPOLICY_*</b> values.
 * <blockquote class="note"><p><b>Note</b>:
 * </p><p>
 * This option is deprecated, as it was never implemented in cURL and
 * never had any effect.
 * </p>
 * </blockquote>
 * </td>
 * <td style="vertical-align: top;">
 * Removed in PHP 5.6.0.
 * </td>
 * </tr>
 *
 * <tr>
 * <td><b>CURLOPT_CONNECTTIMEOUT</b></td>
 * <td style="vertical-align: top;">
 * The number of seconds to wait while trying to connect. Use 0 to
 * wait indefinitely.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_CONNECTTIMEOUT_MS</b></td>
 * <td style="vertical-align: top;">
 * The number of milliseconds to wait while trying to connect. Use 0 to
 * wait indefinitely.
 *
 * If libcurl is built to use the standard system name resolver, that
 * portion of the connect will still use full-second resolution for
 * timeouts with a minimum timeout allowed of one second.
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.16.2. Available since PHP 5.2.3.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_DNS_CACHE_TIMEOUT</b></td>
 * <td style="vertical-align: top;">
 * The number of seconds to keep DNS entries in memory. This
 * option is set to 120 (2 minutes) by default.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_FTPSSLAUTH</b></td>
 * <td style="vertical-align: top;">
 * The FTP authentication method (when is activated):
 * <em>CURLFTPAUTH_SSL</em> (try SSL first),
 * <em>CURLFTPAUTH_TLS</em> (try TLS first), or
 * <em>CURLFTPAUTH_DEFAULT</em> (let cURL decide).
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.12.2.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_HTTP_VERSION</b></td>
 * <td style="vertical-align: top;">
 * <code class="parameter">CURL_HTTP_VERSION_NONE</code> (default, lets CURL
 * decide which version to use),
 * <code class="parameter">CURL_HTTP_VERSION_1_0</code> (forces HTTP/1.0),
 * or <code class="parameter">CURL_HTTP_VERSION_1_1</code> (forces HTTP/1.1).
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_HTTPAUTH</b></td>
 * <td style="vertical-align: top;">
 * <p>
 * The HTTP authentication method(s) to use. The options are:
 * <code class="parameter">CURLAUTH_BASIC</code>,
 * <code class="parameter">CURLAUTH_DIGEST</code>,
 * <code class="parameter">CURLAUTH_GSSNEGOTIATE</code>,
 * <code class="parameter">CURLAUTH_NTLM</code>,
 * <code class="parameter">CURLAUTH_ANY</code>, and
 * <code class="parameter">CURLAUTH_ANYSAFE</code>.
 * </p>
 * <p>
 * The bitwise <em>|</em> (or) operator can be used to combine
 * more than one method. If this is done, cURL will poll the server to see
 * what methods it supports and pick the best one.
 * </p>
 * <p>
 * <code class="parameter">CURLAUTH_ANY</code> is an alias for
 * <em>CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM</em>.
 * </p>
 * <p>
 * <code class="parameter">CURLAUTH_ANYSAFE</code> is an alias for
 * <em>CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM</em>.
 * </p>
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_INFILESIZE</b></td>
 * <td style="vertical-align: top;">
 * The expected size, in bytes, of the file when uploading a file to
 * a remote site. Note that using this option will not stop libcurl
 * from sending more data, as exactly what is sent depends on
 * <b>CURLOPT_READFUNCTION</b>.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_LOW_SPEED_LIMIT</b></td>
 * <td style="vertical-align: top;">
 * The transfer speed, in bytes per second, that the transfer should be
 * below during the count of <b>CURLOPT_LOW_SPEED_TIME</b>
 * seconds before PHP considers the transfer too slow and aborts.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_LOW_SPEED_TIME</b></td>
 * <td style="vertical-align: top;">
 * The number of seconds the transfer speed should be below
 * <b>CURLOPT_LOW_SPEED_LIMIT</b> before PHP considers
 * the transfer too slow and aborts.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_MAXCONNECTS</b></td>
 * <td style="vertical-align: top;">
 * The maximum amount of persistent connections that are allowed.
 * When the limit is reached,
 * <b>CURLOPT_CLOSEPOLICY</b> is used to determine
 * which connection to close.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_MAXREDIRS</b></td>
 * <td style="vertical-align: top;">
 * The maximum amount of HTTP redirections to follow. Use this option
 * alongside <b>CURLOPT_FOLLOWLOCATION</b>.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_PORT</b></td>
 * <td style="vertical-align: top;">
 * An alternative port number to connect to.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_POSTREDIR</b></td>
 * <td style="vertical-align: top;">
 * A bitmask of 1 (301 Moved Permanently), 2 (302 Found)
 * vand 4 (303 See Other) if the HTTP POST method should be maintained
 * when <b>CURLOPT_FOLLOWLOCATION</b> is set and a
 * specific type of redirect occurs.
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.19.1. Available since PHP 5.3.2.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_PROTOCOLS</b></td>
 * <td style="vertical-align: top;">
 * <p>
 * Bitmask of <b>CURLPROTO_*</b> values. If used, this bitmask
 * limits what protocols libcurl may use in the transfer. This allows you to have
 * a libcurl built to support a wide range of protocols but still limit specific
 * transfers to only be allowed to use a subset of them. By default libcurl will
 * accept all protocols it supports.
 * See also <b>CURLOPT_REDIR_PROTOCOLS</b>.
 * </p>
 * <p>
 * Valid protocol options are:
 * <code class="parameter">CURLPROTO_HTTP</code>,
 * <code class="parameter">CURLPROTO_HTTPS</code>,
 * <code class="parameter">CURLPROTO_FTP</code>,
 * <code class="parameter">CURLPROTO_FTPS</code>,
 * <code class="parameter">CURLPROTO_SCP</code>,
 * <code class="parameter">CURLPROTO_SFTP</code>,
 * <code class="parameter">CURLPROTO_TELNET</code>,
 * <code class="parameter">CURLPROTO_LDAP</code>,
 * <code class="parameter">CURLPROTO_LDAPS</code>,
 * <code class="parameter">CURLPROTO_DICT</code>,
 * <code class="parameter">CURLPROTO_FILE</code>,
 * <code class="parameter">CURLPROTO_TFTP</code>,
 * <code class="parameter">CURLPROTO_ALL</code>
 * </p>
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.19.4.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_PROXYAUTH</b></td>
 * <td style="vertical-align: top;">
 * The HTTP authentication method(s) to use for the proxy connection.
 * Use the same bitmasks as described in
 * <b>CURLOPT_HTTPAUTH</b>. For proxy authentication,
 * only <code class="parameter">CURLAUTH_BASIC</code> and
 * <code class="parameter">CURLAUTH_NTLM</code> are currently supported.
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.10.7.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_PROXYPORT</b></td>
 * <td style="vertical-align: top;">
 * The port number of the proxy to connect to. This port number can
 * also be set in <b>CURLOPT_PROXY</b>.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_PROXYTYPE</b></td>
 * <td style="vertical-align: top;">
 * Either <b>CURLPROXY_HTTP</b> (default),
 * <b>CURLPROXY_SOCKS4</b>,
 * <b>CURLPROXY_SOCKS5</b>,
 * <b>CURLPROXY_SOCKS4A</b> or
 * <b>CURLPROXY_SOCKS5_HOSTNAME</b>.
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.10.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_REDIR_PROTOCOLS</b></td>
 * <td style="vertical-align: top;">
 * Bitmask of <b>CURLPROTO_*</b> values. If used, this bitmask
 * limits what protocols libcurl may use in a transfer that it follows to in
 * a redirect when <b>CURLOPT_FOLLOWLOCATION</b> is enabled.
 * This allows you to limit specific transfers to only be allowed to use a subset
 * of protocols in redirections. By default libcurl will allow all protocols
 * except for FILE and SCP. This is a difference compared to pre-7.19.4 versions
 * which unconditionally would follow to all protocols supported.
 * See also <b>CURLOPT_PROTOCOLS</b> for protocol constant values.
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.19.4.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_RESUME_FROM</b></td>
 * <td style="vertical-align: top;">
 * The offset, in bytes, to resume a transfer from.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSL_VERIFYHOST</b></td>
 * <td style="vertical-align: top;">
 * 1 to check the existence of a common name in the
 * SSL peer certificate. 2 to check the existence of
 * a common name and also verify that it matches the hostname
 * provided. In production environments the value of this option
 * should be kept at 2 (default value).
 * </td>
 * <td style="vertical-align: top;">
 * Support for value 1 removed in cURL 7.28.1
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSLVERSION</b></td>
 * <td style="vertical-align: top;">
 * One of <b>CURL_SSLVERSION_DEFAULT</b> (0),
 * <b>CURL_SSLVERSION_TLSv1</b> (1),
 * <b>CURL_SSLVERSION_SSLv2</b> (2),
 * <b>CURL_SSLVERSION_SSLv3</b> (3),
 * <b>CURL_SSLVERSION_TLSv1_0</b> (4),
 * <b>CURL_SSLVERSION_TLSv1_1</b> (5) or
 * <b>CURL_SSLVERSION_TLSv1_2</b> (6).
 * <blockquote class="note"><p><strong class="note">Note</strong>:
 * </p><p class="para">
 * Your best bet is to not set this and let it use the default.
 * Setting it to 2 or 3 is very dangerous given the known
 * vulnerabilities in SSLv2 and SSLv3.
 * </p>
 * </blockquote>
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_TIMECONDITION</b></td>
 * <td style="vertical-align: top;">
 * How <b>CURLOPT_TIMEVALUE</b> is treated.
 * Use <b>CURL_TIMECOND_IFMODSINCE</b> to return the
 * page only if it has been modified since the time specified in
 * <b>CURLOPT_TIMEVALUE</b>. If it hasn't been modified,
 * a <em>"304 Not Modified"</em> header will be returned
 * assuming <b>CURLOPT_HEADER</code></strong> is <strong><code>TRUE</b>.
 * Use <code class="parameter">CURL_TIMECOND_IFUNMODSINCE</code> for the reverse
 * effect. <code class="parameter">CURL_TIMECOND_IFMODSINCE</code> is the
 * default.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_TIMEOUT</b></td>
 * <td style="vertical-align: top;">
 * The maximum number of seconds to allow cURL functions to execute.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_TIMEOUT_MS</b></td>
 * <td style="vertical-align: top;">
 * The maximum number of milliseconds to allow cURL functions to
 * execute.
 *
 * If libcurl is built to use the standard system name resolver, that
 * portion of the connect will still use full-second resolution for
 * timeouts with a minimum timeout allowed of one second.
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.16.2. Available since PHP 5.2.3.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_TIMEVALUE</b></td>
 * <td style="vertical-align: top;">
 * The time in seconds since January 1st, 1970. The time will be used
 * by <b>CURLOPT_TIMECONDITION</b>. By default,
 * <code class="parameter">CURL_TIMECOND_IFMODSINCE</code> is used.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_MAX_RECV_SPEED_LARGE</b></td>
 * <td style="vertical-align: top;">
 * If a download exceeds this speed (counted in bytes per second) on
 * cumulative average during the transfer, the transfer will pause to
 * keep the average rate less than or equal to the parameter value.
 * Defaults to unlimited speed.
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.15.5. Available since PHP 5.4.0.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_MAX_SEND_SPEED_LARGE</b></td>
 * <td style="vertical-align: top;">
 * If an upload exceeds this speed (counted in bytes per second) on
 * cumulative average during the transfer, the transfer will pause to
 * keep the average rate less than or equal to the parameter value.
 * Defaults to unlimited speed.
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.15.5. Available since PHP 5.4.0.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSH_AUTH_TYPES</b></td>
 * <td style="vertical-align: top;">
 * A bitmask consisting of one or more of
 * <b>CURLSSH_AUTH_PUBLICKEY</b>,
 * <b>CURLSSH_AUTH_PASSWORD</b>,
 * <b>CURLSSH_AUTH_HOST</b>,
 * <b>CURLSSH_AUTH_KEYBOARD</b>. Set to
 * <b>CURLSSH_AUTH_ANY</b> to let libcurl pick one.
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.16.1.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_IPRESOLVE</b></td>
 * <td style="vertical-align: top;">
 * Allows an application to select what kind of IP addresses to use when
 * resolving host names. This is only interesting when using host names that
 * resolve addresses using more than one version of IP, possible values are
 * <b>CURL_IPRESOLVE_WHATEVER</b>,
 * <b>CURL_IPRESOLVE_V4</b>,
 * <b>CURL_IPRESOLVE_V6</b>, by default
 * <b>CURL_IPRESOLVE_WHATEVER</b>.
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.10.8.
 * </td>
 * </tr>
 *
 * </tbody>
 *
 * </table>
 *
 * value should be a string for the following values of the option parameter:
 * <table class="doctable informaltable">
 *
 * <thead>
 * <tr>
 * <th>Option</th>
 * <th>Set <code class="parameter">value</code> to</th>
 * <th>Notes</th>
 * </tr>
 * </thead>
 *
 * <tbody class="tbody">
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_CAINFO</b></td>
 * <td style="vertical-align: top;">
 * The name of a file holding one or more certificates to verify the
 * peer with. This only makes sense when used in combination with
 * <b>CURLOPT_SSL_VERIFYPEER</b>.
 * </td>
 * <td style="vertical-align: top;">
 * Might require an absolute path.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_CAPATH</b></td>
 * <td style="vertical-align: top;">
 * A directory that holds multiple CA certificates. Use this option
 * alongside <b>CURLOPT_SSL_VERIFYPEER</b>.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_COOKIE</b></td>
 * <td style="vertical-align: top;">
 * The contents of the <em>"Cookie: "</em> header to be
 * used in the HTTP request.
 * Note that multiple cookies are separated with a semicolon followed
 * by a space (e.g., "<em>fruit=apple; colour=red</em>")
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_COOKIEFILE</b></td>
 * <td style="vertical-align: top;">
 * The name of the file containing the cookie data. The cookie file can
 * be in Netscape format, or just plain HTTP-style headers dumped into
 * a file.
 * If the name is an empty string, no cookies are loaded, but cookie
 * handling is still enabled.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_COOKIEJAR</b></td>
 * <td style="vertical-align: top;">
 * The name of a file to save all internal cookies to when the handle is closed,
 * e.g. after a call to curl_close.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_CUSTOMREQUEST</b></td>
 * <td style="vertical-align: top;"><p class="para">
 * A custom request method to use instead of
 * <em>"GET"</em> or <em>"HEAD"</em> when doing
 * a HTTP request. This is useful for doing
 * <em>"DELETE"</em> or other, more obscure HTTP requests.
 * Valid values are things like <em>"GET"</em>,
 * <em>"POST"</em>, <em>"CONNECT"</em> and so on;
 * i.e. Do not enter a whole HTTP request line here. For instance,
 * entering <em>"GET /index.html HTTP/1.0\r\n\r\n"</em>
 * would be incorrect.
 * </p><blockquote class="note"><p><strong class="note">Note</strong>:
 * </p><p class="para">
 * Don't do this without making sure the server supports the custom
 * request method first.
 * </p>
 * </blockquote>
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_EGDSOCKET</b></td>
 * <td style="vertical-align: top;">
 * Like <b>CURLOPT_RANDOM_FILE</b>, except a filename
 * to an Entropy Gathering Daemon socket.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_ENCODING</b></td>
 * <td style="vertical-align: top;">
 * The contents of the <em>"Accept-Encoding: "</em> header.
 * This enables decoding of the response. Supported encodings are
 * <em>"identity"</em>, <em>"deflate"</em>, and
 * <em>"gzip"</em>. If an empty string, <em>""</em>,
 * is set, a header containing all supported encoding types is sent.
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.10.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_FTPPORT</b></td>
 * <td style="vertical-align: top;">
 * The value which will be used to get the IP address to use
 * for the FTP "PORT" instruction. The "PORT" instruction tells
 * the remote server to connect to our specified IP address.  The
 * string may be a plain IP address, a hostname, a network
 * interface name (under Unix), or just a plain '-' to use the
 * systems default IP address.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_INTERFACE</b></td>
 * <td style="vertical-align: top;">
 * The name of the outgoing network interface to use. This can be an
 * interface name, an IP address or a host name.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_KEYPASSWD</b></td>
 * <td style="vertical-align: top;">
 * The password required to use the <b>CURLOPT_SSLKEY</b>
 * or <b>CURLOPT_SSH_PRIVATE_KEYFILE</b> private key.
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.16.1.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_KRB4LEVEL</b></td>
 * <td style="vertical-align: top;">
 * The KRB4 (Kerberos 4) security level. Any of the following values
 * (in order from least to most powerful) are valid:
 * <em>"clear"</em>,
 * <em>"safe"</em>,
 * <em>"confidential"</em>,
 * <em>"private".</em>.
 * If the string does not match one of these,
 * <em>"private"</em> is used. Setting this option to <b>NULL</b>
 * will disable KRB4 security. Currently KRB4 security only works
 * with FTP transactions.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_POSTFIELDS</b></td>
 * <td style="vertical-align: top;">
 * <span class="simpara">
 * The full data to post in a HTTP "POST" operation.
 * To post a file, prepend a filename with <em>@</em> and
 * use the full path. The filetype can be explicitly specified by
 * following the filename with the type in the format
 * '<em>;type=mimetype</em>'. This parameter can either be
 * passed as a urlencoded string like '<em>para1=val1&amp;para2=val2&amp;...</em>'
 * or as an array with the field name as key and field data as value.
 * If <code class="parameter">value</code> is an array, the
 * <em>Content-Type</em> header will be set to
 * <em>multipart/form-data</em>.
 * </span>
 * <span class="simpara">
 * As of PHP 5.2.0, <code class="parameter">value</code> must be an array if
 * files are passed to this option with the <em>@</em> prefix.
 * </span>
 * <span class="simpara">
 * As of PHP 5.5.0, the <em>@</em> prefix is deprecated and
 * files can be sent using <a href="class.curlfile.php" class="classname">CURLFile</a>. The
 * <em>@</em> prefix can be disabled for safe passing of
 * values beginning with <em>@</em> by setting the
 * <b>CURLOPT_SAFE_UPLOAD</code></strong> option to <strong><code>TRUE</b>.
 * </span>
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_PROXY</b></td>
 * <td style="vertical-align: top;">
 * The HTTP proxy to tunnel requests through.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_PROXYUSERPWD</b></td>
 * <td style="vertical-align: top;">
 * A username and password formatted as
 * <em>"[username]:[password]"</em> to use for the
 * connection to the proxy.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_RANDOM_FILE</b></td>
 * <td style="vertical-align: top;">
 * A filename to be used to seed the random number generator for SSL.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_RANGE</b></td>
 * <td style="vertical-align: top;">
 * Range(s) of data to retrieve in the format
 * <em>"X-Y"</em> where X or Y are optional. HTTP transfers
 * also support several intervals, separated with commas in the format
 * <em>"X-Y,N-M"</em>.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_REFERER</b></td>
 * <td style="vertical-align: top;">
 * The contents of the <em>"Referer: "</em> header to be used
 * in a HTTP request.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSH_HOST_PUBLIC_KEY_MD5</b></td>
 * <td style="vertical-align: top;">
 * A string containing 32 hexadecimal digits. The string should be the
 * MD5 checksum of the remote host's public key, and libcurl will reject
 * the connection to the host unless the md5sums match.
 * This option is only for SCP and SFTP transfers.
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.17.1.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSH_PUBLIC_KEYFILE</b></td>
 * <td style="vertical-align: top;">
 * The file name for your public key. If not used, libcurl defaults to
 * $HOME/.ssh/id_dsa.pub if the HOME environment variable is set,
 * and just "id_dsa.pub" in the current directory if HOME is not set.
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.16.1.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSH_PRIVATE_KEYFILE</b></td>
 * <td style="vertical-align: top;">
 * The file name for your private key. If not used, libcurl defaults to
 * $HOME/.ssh/id_dsa if the HOME environment variable is set,
 * and just "id_dsa" in the current directory if HOME is not set.
 * If the file is password-protected, set the password with
 * <b>CURLOPT_KEYPASSWD</b>.
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.16.1.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSL_CIPHER_LIST</b></td>
 * <td style="vertical-align: top;">
 * A list of ciphers to use for SSL. For example,
 * <em>RC4-SHA</em> and <em>TLSv1</em> are valid
 * cipher lists.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSLCERT</b></td>
 * <td style="vertical-align: top;">
 * The name of a file containing a PEM formatted certificate.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSLCERTPASSWD</b></td>
 * <td style="vertical-align: top;">
 * The password required to use the
 * <b>CURLOPT_SSLCERT</b> certificate.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSLCERTTYPE</b></td>
 * <td style="vertical-align: top;">
 * The format of the certificate. Supported formats are
 * <em>"PEM"</em> (default), <em>"DER"</em>,
 * and <em>"ENG"</em>.
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.9.3.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSLENGINE</b></td>
 * <td style="vertical-align: top;">
 * The identifier for the crypto engine of the private SSL key
 * specified in <b>CURLOPT_SSLKEY</b>.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSLENGINE_DEFAULT</b></td>
 * <td style="vertical-align: top;">
 * The identifier for the crypto engine used for asymmetric crypto
 * operations.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSLKEY</b></td>
 * <td style="vertical-align: top;">
 * The name of a file containing a private SSL key.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSLKEYPASSWD</b></td>
 * <td style="vertical-align: top;"><p class="para">
 * The secret password needed to use the private SSL key specified in
 * <b>CURLOPT_SSLKEY</b>.
 * </p><blockquote class="note"><p><strong class="note">Note</strong>:
 * </p><p class="para">
 * Since this option contains a sensitive password, remember to keep
 * the PHP script it is contained within safe.
 * </p>
 * </blockquote>
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSLKEYTYPE</b></td>
 * <td style="vertical-align: top;">
 * The key type of the private SSL key specified in
 * <b>CURLOPT_SSLKEY</b>. Supported key types are
 * <em>"PEM"</em> (default), <em>"DER"</em>,
 * and <em>"ENG"</em>.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_URL</b></td>
 * <td style="vertical-align: top;">
 * The URL to fetch. This can also be set when initializing a
 * session with {@see curl_init()}</span>.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_USERAGENT</b></td>
 * <td style="vertical-align: top;">
 * The contents of the <em>"User-Agent: "</em> header to be
 * used in a HTTP request.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_USERPWD</b></td>
 * <td style="vertical-align: top;">
 * A username and password formatted as
 * <em>"[username]:[password]"</em> to use for the
 * connection.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * </tbody>
 *
 * </table>
 * <table class="doctable informaltable">
 *
 * <thead>
 * <tr>
 * <th>Option</th>
 * <th>Set <code class="parameter">value</code> to</th>
 * <th>Notes</th>
 * </tr>
 * </thead>
 *
 * <tbody class="tbody">
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_CAINFO</b></td>
 * <td style="vertical-align: top;">
 * The name of a file holding one or more certificates to verify the
 * peer with. This only makes sense when used in combination with
 * <b>CURLOPT_SSL_VERIFYPEER</b>.
 * </td>
 * <td style="vertical-align: top;">
 * Might require an absolute path.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_CAPATH</b></td>
 * <td style="vertical-align: top;">
 * A directory that holds multiple CA certificates. Use this option
 * alongside <b>CURLOPT_SSL_VERIFYPEER</b>.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_COOKIE</b></td>
 * <td style="vertical-align: top;">
 * The contents of the <em>"Cookie: "</em> header to be
 * used in the HTTP request.
 * Note that multiple cookies are separated with a semicolon followed
 * by a space (e.g., "<em>fruit=apple; colour=red</em>")
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_COOKIEFILE</b></td>
 * <td style="vertical-align: top;">
 * The name of the file containing the cookie data. The cookie file can
 * be in Netscape format, or just plain HTTP-style headers dumped into
 * a file.
 * If the name is an empty string, no cookies are loaded, but cookie
 * handling is still enabled.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_COOKIEJAR</b></td>
 * <td style="vertical-align: top;">
 * The name of a file to save all internal cookies to when the handle is closed,
 * e.g. after a call to curl_close.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_CUSTOMREQUEST</b></td>
 * <td style="vertical-align: top;"><p class="para">
 * A custom request method to use instead of
 * <em>"GET"</em> or <em>"HEAD"</em> when doing
 * a HTTP request. This is useful for doing
 * <em>"DELETE"</em> or other, more obscure HTTP requests.
 * Valid values are things like <em>"GET"</em>,
 * <em>"POST"</em>, <em>"CONNECT"</em> and so on;
 * i.e. Do not enter a whole HTTP request line here. For instance,
 * entering <em>"GET /index.html HTTP/1.0\r\n\r\n"</em>
 * would be incorrect.
 * </p><blockquote class="note"><p><strong class="note">Note</strong>:
 * </p><p class="para">
 * Don't do this without making sure the server supports the custom
 * request method first.
 * </p>
 * </blockquote>
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_EGDSOCKET</b></td>
 * <td style="vertical-align: top;">
 * Like <b>CURLOPT_RANDOM_FILE</b>, except a filename
 * to an Entropy Gathering Daemon socket.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_ENCODING</b></td>
 * <td style="vertical-align: top;">
 * The contents of the <em>"Accept-Encoding: "</em> header.
 * This enables decoding of the response. Supported encodings are
 * <em>"identity"</em>, <em>"deflate"</em>, and
 * <em>"gzip"</em>. If an empty string, <em>""</em>,
 * is set, a header containing all supported encoding types is sent.
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.10.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_FTPPORT</b></td>
 * <td style="vertical-align: top;">
 * The value which will be used to get the IP address to use
 * for the FTP "PORT" instruction. The "PORT" instruction tells
 * the remote server to connect to our specified IP address.  The
 * string may be a plain IP address, a hostname, a network
 * interface name (under Unix), or just a plain '-' to use the
 * systems default IP address.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_INTERFACE</b></td>
 * <td style="vertical-align: top;">
 * The name of the outgoing network interface to use. This can be an
 * interface name, an IP address or a host name.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_KEYPASSWD</b></td>
 * <td style="vertical-align: top;">
 * The password required to use the <b>CURLOPT_SSLKEY</b>
 * or <b>CURLOPT_SSH_PRIVATE_KEYFILE</b> private key.
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.16.1.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_KRB4LEVEL</b></td>
 * <td style="vertical-align: top;">
 * The KRB4 (Kerberos 4) security level. Any of the following values
 * (in order from least to most powerful) are valid:
 * <em>"clear"</em>,
 * <em>"safe"</em>,
 * <em>"confidential"</em>,
 * <em>"private".</em>.
 * If the string does not match one of these,
 * <em>"private"</em> is used. Setting this option to <b>NULL</b>
 * will disable KRB4 security. Currently KRB4 security only works
 * with FTP transactions.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_POSTFIELDS</b></td>
 * <td style="vertical-align: top;">
 * <span class="simpara">
 * The full data to post in a HTTP "POST" operation.
 * To post a file, prepend a filename with <em>@</em> and
 * use the full path. The filetype can be explicitly specified by
 * following the filename with the type in the format
 * '<em>;type=mimetype</em>'. This parameter can either be
 * passed as a urlencoded string like '<em>para1=val1&amp;para2=val2&amp;...</em>'
 * or as an array with the field name as key and field data as value.
 * If <code class="parameter">value</code> is an array, the
 * <em>Content-Type</em> header will be set to
 * <em>multipart/form-data</em>.
 * </span>
 * <span class="simpara">
 * As of PHP 5.2.0, <code class="parameter">value</code> must be an array if
 * files are passed to this option with the <em>@</em> prefix.
 * </span>
 * <span class="simpara">
 * As of PHP 5.5.0, the <em>@</em> prefix is deprecated and
 * files can be sent using <a href="class.curlfile.php" class="classname">CURLFile</a>. The
 * <em>@</em> prefix can be disabled for safe passing of
 * values beginning with <em>@</em> by setting the
 * <b>CURLOPT_SAFE_UPLOAD</code></strong> option to <strong><code>TRUE</b>.
 * </span>
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_PROXY</b></td>
 * <td style="vertical-align: top;">
 * The HTTP proxy to tunnel requests through.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_PROXYUSERPWD</b></td>
 * <td style="vertical-align: top;">
 * A username and password formatted as
 * <em>"[username]:[password]"</em> to use for the
 * connection to the proxy.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_RANDOM_FILE</b></td>
 * <td style="vertical-align: top;">
 * A filename to be used to seed the random number generator for SSL.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_RANGE</b></td>
 * <td style="vertical-align: top;">
 * Range(s) of data to retrieve in the format
 * <em>"X-Y"</em> where X or Y are optional. HTTP transfers
 * also support several intervals, separated with commas in the format
 * <em>"X-Y,N-M"</em>.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_REFERER</b></td>
 * <td style="vertical-align: top;">
 * The contents of the <em>"Referer: "</em> header to be used
 * in a HTTP request.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSH_HOST_PUBLIC_KEY_MD5</b></td>
 * <td style="vertical-align: top;">
 * A string containing 32 hexadecimal digits. The string should be the
 * MD5 checksum of the remote host's public key, and libcurl will reject
 * the connection to the host unless the md5sums match.
 * This option is only for SCP and SFTP transfers.
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.17.1.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSH_PUBLIC_KEYFILE</b></td>
 * <td style="vertical-align: top;">
 * The file name for your public key. If not used, libcurl defaults to
 * $HOME/.ssh/id_dsa.pub if the HOME environment variable is set,
 * and just "id_dsa.pub" in the current directory if HOME is not set.
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.16.1.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSH_PRIVATE_KEYFILE</b></td>
 * <td style="vertical-align: top;">
 * The file name for your private key. If not used, libcurl defaults to
 * $HOME/.ssh/id_dsa if the HOME environment variable is set,
 * and just "id_dsa" in the current directory if HOME is not set.
 * If the file is password-protected, set the password with
 * <b>CURLOPT_KEYPASSWD</b>.
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.16.1.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSL_CIPHER_LIST</b></td>
 * <td style="vertical-align: top;">
 * A list of ciphers to use for SSL. For example,
 * <em>RC4-SHA</em> and <em>TLSv1</em> are valid
 * cipher lists.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSLCERT</b></td>
 * <td style="vertical-align: top;">
 * The name of a file containing a PEM formatted certificate.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSLCERTPASSWD</b></td>
 * <td style="vertical-align: top;">
 * The password required to use the
 * <b>CURLOPT_SSLCERT</b> certificate.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSLCERTTYPE</b></td>
 * <td style="vertical-align: top;">
 * The format of the certificate. Supported formats are
 * <em>"PEM"</em> (default), <em>"DER"</em>,
 * and <em>"ENG"</em>.
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.9.3.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSLENGINE</b></td>
 * <td style="vertical-align: top;">
 * The identifier for the crypto engine of the private SSL key
 * specified in <b>CURLOPT_SSLKEY</b>.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSLENGINE_DEFAULT</b></td>
 * <td style="vertical-align: top;">
 * The identifier for the crypto engine used for asymmetric crypto
 * operations.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSLKEY</b></td>
 * <td style="vertical-align: top;">
 * The name of a file containing a private SSL key.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSLKEYPASSWD</b></td>
 * <td style="vertical-align: top;"><p class="para">
 * The secret password needed to use the private SSL key specified in
 * <b>CURLOPT_SSLKEY</b>.
 * </p><blockquote class="note"><p><strong class="note">Note</strong>:
 * </p><p class="para">
 * Since this option contains a sensitive password, remember to keep
 * the PHP script it is contained within safe.
 * </p>
 * </blockquote>
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SSLKEYTYPE</b></td>
 * <td style="vertical-align: top;">
 * The key type of the private SSL key specified in
 * <b>CURLOPT_SSLKEY</b>. Supported key types are
 * <em>"PEM"</em> (default), <em>"DER"</em>,
 * and <em>"ENG"</em>.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_URL</b></td>
 * <td style="vertical-align: top;">
 * The URL to fetch. This can also be set when initializing a
 * session with <span class="function"><a href="function.curl-init.php" class="function">curl_init()</a></span>.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_USERAGENT</b></td>
 * <td style="vertical-align: top;">
 * The contents of the <em>"User-Agent: "</em> header to be
 * used in a HTTP request.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_USERPWD</b></td>
 * <td style="vertical-align: top;">
 * A username and password formatted as
 * <em>"[username]:[password]"</em> to use for the
 * connection.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 * </tbody>
 *
 * </table>
 * <p>
 * value should be an array for the following values of the option parameter:</p>
 * <table class="doctable informaltable">
 *
 * <thead>
 * <tr>
 * <th>Option</th>
 * <th>Set <code class="parameter">value</code> to</th>
 * <th>Notes</th>
 * </tr>
 * </thead>
 *
 * <tbody class="tbody">
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_HTTP200ALIASES</b></td>
 * <td style="vertical-align: top;">
 * An array of HTTP 200 responses that will be treated as valid
 * responses and not as errors.
 * </td>
 * <td style="vertical-align: top;">
 * Added in cURL 7.10.3.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_HTTPHEADER</b></td>
 * <td style="vertical-align: top;">
 * An array of HTTP header fields to set, in the format
 * <code class="code">
 * array('Content-type: text/plain', 'Content-length: 100')
 * </code>
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_POSTQUOTE</b></td>
 * <td style="vertical-align: top;">
 * An array of FTP commands to execute on the server after the FTP
 * request has been performed.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_QUOTE</b></td>
 * <td style="vertical-align: top;">
 * An array of FTP commands to execute on the server prior to the FTP
 * request.
 * </td>
 * <td style="vertical-align: top;">
 * </td>
 * </tr>
 *
 * </tbody>
 *
 * </table>
 * value should be a stream resource (using {@see fopen()}, for example) for the following values of the option parameter:
 * <table class="doctable informaltable">
 *
 * <thead>
 * <tr>
 * <th>Option</th>
 * <th>Set <code class="parameter">value</code> to</th>
 * </tr>
 * </thead>
 *
 * <tbody class="tbody">
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_FILE</b></td>
 * <td style="vertical-align: top;">
 * The file that the transfer should be written to. The default
 * is <em>STDOUT</em> (the browser window).
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_INFILE</b></td>
 * <td style="vertical-align: top;">
 * The file that the transfer should be read from when uploading.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_STDERR</b></td>
 * <td style="vertical-align: top;">
 * An alternative location to output errors to instead of
 * <em>STDERR</em>.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_WRITEHEADER</b></td>
 * <td style="vertical-align: top;">
 * The file that the header part of the transfer is written to.
 * </td>
 * </tr>
 *
 * </tbody>
 *
 * </table>
 *  value should be the name of a valid function or a Closure for the following values of the option parameter:
 * <table class="doctable informaltable">
 *
 * <thead>
 * <tr>
 * <th>Option</th>
 * <th>Set <code class="parameter">value</code> to</th>
 * </tr>
 * </thead>
 *
 * <tbody class="tbody">
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_HEADERFUNCTION</b></td>
 * <td style="vertical-align: top;">
 * A callback accepting two parameters.
 * The first is the cURL resource, the second is a
 * string with the header data to be written. The header data must
 * be written by this callback. Return the number of
 * bytes written.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_PASSWDFUNCTION</b></td>
 * <td style="vertical-align: top;">
 * A callback accepting three parameters.
 * The first is the cURL resource, the second is a
 * string containing a password prompt, and the third is the maximum
 * password length. Return the string containing the password.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_PROGRESSFUNCTION</b></td>
 * <td style="vertical-align: top;">
 * <p>
 * A callback accepting five parameters.
 * The first is the cURL resource, the second is the total number of
 * bytes expected to be downloaded in this transfer, the third is
 * the number of bytes downloaded so far, the fourth is the total
 * number of bytes expected to be uploaded in this transfer, and the
 * fifth is the number of bytes uploaded so far.
 * </p>
 * <blockquote class="note"><p><strong class="note">Note</strong>:
 * </p><p class="para">
 * The callback is only called when the <b>CURLOPT_NOPROGRESS</b>
 * option is set to <b>FALSE</b>.
 * </p>
 * </blockquote>
 * <p>
 * Return a non-zero value to abort the transfer. In which case, the
 * transfer will set a <b>CURLE_ABORTED_BY_CALLBACK</b>
 * error.
 * </p>
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_READFUNCTION</b></td>
 * <td style="vertical-align: top;">
 * A callback accepting three parameters.
 * The first is the cURL resource, the second is a
 * stream resource provided to cURL through the option
 * <b>CURLOPT_INFILE</b>, and the third is the maximum
 * amount of data to be read. The callback must return a string
 * with a length equal or smaller than the amount of data requested,
 * typically by reading it from the passed stream resource. It should
 * return an empty string to signal <em>EOF</em>.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_WRITEFUNCTION</b></td>
 * <td style="vertical-align: top;">
 * A callback accepting two parameters.
 * The first is the cURL resource, and the second is a
 * string with the data to be written. The data must be saved by
 * this callback. It must return the exact number of bytes written
 * or the transfer will be aborted with an error.
 * </td>
 * </tr>
 *
 * </tbody>
 *
 * </table>
 * Other values:
 * <table class="doctable informaltable">
 *
 * <thead>
 * <tr>
 * <th>Option</th>
 * <th>Set <code class="parameter">value</code> to</th>
 * </tr>
 * </thead>
 *
 * <tbody class="tbody">
 * <tr>
 * <td style="vertical-align: top;"><b>CURLOPT_SHARE</b></td>
 * <td style="vertical-align: top;">
 * A result of <span class="function">{@see curl_share_init()}</span>. Makes the cURL
 * handle to use the data from the shared handle.
 * </td>
 * </tr>
 * </tbody>
 *
 * </table>
 * @return bool true on success or false on failure.
 */
function curl_setopt(#[LanguageLevelTypeAware(['8.0' => 'CurlHandle'], default: 'resource')] $handle, int $option, mixed $value): bool {}

/**
 * Set multiple options for a cURL transfer
 * @link https://php.net/manual/en/function.curl-setopt-array.php
 * @param CurlHandle|resource $handle
 * @param array $options <p>
 * An array specifying which options to set and their values.
 * The keys should be valid curl_setopt constants or
 * their integer equivalents.
 * </p>
 * @return bool true if all options were successfully set. If an option could
 * not be successfully set, false is immediately returned, ignoring any
 * future options in the options array.
 * @since 5.1.3
 */
function curl_setopt_array(#[LanguageLevelTypeAware(['8.0' => 'CurlHandle'], default: 'resource')] $handle, array $options): bool {}

/**
 * (PHP 5 &gt;=5.5.0)<br/>
 * Close a cURL share handle
 * @link https://secure.php.net/manual/en/function.curl-share-close.php
 * @param CurlShareHandle|resource $share_handle <p>
 * A cURL share handle returned by  {@link https://secure.php.net/manual/en/function.curl-share-init.php curl_share_init()}
 * </p>
 * @return void
 * @since 5.5
 */
function curl_share_close(#[LanguageLevelTypeAware(['8.0' => 'CurlShareHandle'], default: 'resource')] $share_handle): void {}

/**
 * (PHP 5 &gt;=5.5.0)<br/>
 * Initialize a cURL share handle
 * @link https://secure.php.net/manual/en/function.curl-share-init.php
 * @return resource|CurlShareHandle Returns resource of type "cURL Share Handle".
 * @since 5.5
 */
#[LanguageLevelTypeAware(['8.0' => 'CurlShareHandle'], default: 'resource')]
function curl_share_init() {}

/**
 * (PHP 5 &gt;=5.5.0)<br/>
 * Set an option for a cURL share handle.
 * @link https://secure.php.net/manual/en/function.curl-share-setopt.php
 * @param CurlShareHandle|resource $share_handle <p>
 * A cURL share handle returned by  {@link https://secure.php.net/manual/en/function.curl-share-init.php curl_share_init()}.
 * </p>
 * @param int $option <table>
 *
 * <thead>
 * <tr>
 * <th>Option</th>
 * <th>Description</th>
 * </tr>
 * </thead>
 *
 * <tbody>
 * <tr>
 * <td style="vertical-align: top;"><b>CURLSHOPT_SHARE</b></td>
 * <td style="vertical-align: top;">
 * Specifies a type of data that should be shared.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLSHOPT_UNSHARE</b></td>
 * <td style="vertical-align: top;">
 * Specifies a type of data that will be no longer shared.
 * </td>
 * </tr>
 *
 * </tbody>
 *
 * </table>
 * @param string $value <p><table>
 *
 * <thead>
 * <tr>
 * <th>Value</th>
 * <th>Description</th>
 * </tr>
 * </thead>
 *
 * <tbody class="tbody">
 * <tr>
 * <td style="vertical-align: top;"><b>CURL_LOCK_DATA_COOKIE</b></td>
 * <td style="vertical-align: top;">
 * Shares cookie data.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURL_LOCK_DATA_DNS</b></td>
 * <td style="vertical-align: top;">
 * Shares DNS cache. Note that when you use cURL multi handles,
 * all handles added to the same multi handle will share DNS cache
 * by default.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURL_LOCK_DATA_SSL_SESSION</b></td>
 * <td style="vertical-align: top;">
 * Shares SSL session IDs, reducing the time spent on the SSL
 * handshake when reconnecting to the same server. Note that SSL
 * session IDs are reused within the same handle by default.
 * </td>
 * </tr>
 *
 * </tbody>
 *
 * </table>
 * </p>
 * @return bool
 * Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
 * @since 5.5
 */
function curl_share_setopt(#[LanguageLevelTypeAware(['8.0' => 'CurlShareHandle'], default: 'resource')] $share_handle, int $option, mixed $value): bool {}

/**
 * (PHP 5 &gt;=5.5.0)<br/>
 * Return string describing the given error code
 * @link https://secure.php.net/manual/en/function.curl-strerror.php
 * @param int $error_code <p>
 * One of the {@link https://curl.haxx.se/libcurl/c/libcurl-errors.html &nbsp;cURL error codes} constants.
 * </p>
 * @return string|null Returns error description or <b>NULL</b> for invalid error code.
 * @since 5.5
 */
#[Pure]
function curl_strerror(int $error_code): ?string {}

/**
 * (PHP 5 &gt;=5.5.0)<br/>
 * Decodes the given URL encoded string
 * @link https://secure.php.net/manual/en/function.curl-unescape.php
 * @param CurlHandle|resource $handle <p>A cURL handle returned by
 * {@link https://secure.php.net/manual/en/function.curl-init.php curl_init()}.</p>
 * @param string $string <p>
 * The URL encoded string to be decoded.
 * </p>
 * @return string|false Returns decoded string or FALSE on failure.
 * @since 5.5
 */
#[Pure]
function curl_unescape(#[LanguageLevelTypeAware(['8.0' => 'CurlHandle'], default: 'resource')] $handle, string $string): string|false {}

/**
 * Perform a cURL session
 * @link https://php.net/manual/en/function.curl-exec.php
 * @param CurlHandle|resource $handle
 * @return string|bool true on success or false on failure. However, if the CURLOPT_RETURNTRANSFER
 * option is set, it will return the result on success, false on failure.
 */
function curl_exec(#[LanguageLevelTypeAware(['8.0' => 'CurlHandle'], default: 'resource')] $handle): string|bool {}

/**
 * Get information regarding a specific transfer
 * @link https://php.net/manual/en/function.curl-getinfo.php
 * @param CurlHandle|resource $handle
 * @param int|null $option [optional] <p>
 * This may be one of the following constants:
 * <ul>
 *   <li>
 *     <strong><code class="code">CURLINFO_EFFECTIVE_URL</code></strong> - Last effective URL
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_HTTP_CODE</code></strong> - The last response code. As of cURL 7.10.8, this is a legacy alias of
 *     <strong><code class="code">CURLINFO_RESPONSE_CODE</code>
 *     </strong>
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_FILETIME</code></strong> - Remote time of the retrieved document, with the
 *     <strong><code class="code">CURLOPT_FILETIME</code>
 *     </strong> enabled; if -1 is returned the time of the document is unknown
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_TOTAL_TIME</code></strong> - Total transaction time in seconds for last transfer
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_NAMELOOKUP_TIME</code></strong> - Time in seconds until name resolving was complete
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_CONNECT_TIME</code></strong> - Time in seconds it took to establish the connection
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_PRETRANSFER_TIME</code></strong> - Time in seconds from start until just before file transfer begins
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_STARTTRANSFER_TIME</code></strong> - Time in seconds until the first byte is about to be transferred
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_REDIRECT_COUNT</code></strong> - Number of redirects, with the
 *     <strong><code class="code">CURLOPT_FOLLOWLOCATION</code>
 *     </strong> option enabled
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_REDIRECT_TIME</code></strong> - Time in seconds of all redirection steps before final transaction was started, with the
 *     <strong><code class="code">CURLOPT_FOLLOWLOCATION</code>
 *     </strong> option enabled
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_REDIRECT_URL</code></strong> - With the
 *     <strong><code class="code">CURLOPT_FOLLOWLOCATION</code>
 *     </strong> option disabled: redirect URL found in the last transaction, that should be requested manually next. With the
 *     <strong><code class="code">CURLOPT_FOLLOWLOCATION</code>
 *     </strong> option enabled: this is empty. The redirect URL in this case is available in
 *     <strong><code class="code">CURLINFO_EFFECTIVE_URL</code>
 *     </strong>
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_PRIMARY_IP</code></strong> - IP address of the most recent connection
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_PRIMARY_PORT</code></strong> - Destination port of the most recent connection
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_LOCAL_IP</code></strong> - Local (source) IP address of the most recent connection
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_LOCAL_PORT</code></strong> - Local (source) port of the most recent connection
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_SIZE_UPLOAD</code></strong> - Total number of bytes uploaded
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_SIZE_DOWNLOAD</code></strong> - Total number of bytes downloaded
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_SPEED_DOWNLOAD</code></strong> - Average download speed
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_SPEED_UPLOAD</code></strong> - Average upload speed
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_HEADER_SIZE</code></strong> - Total size of all headers received
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_HEADER_OUT</code></strong> - The request string sent. For this to work, add the
 *     <strong><code class="code">CURLINFO_HEADER_OUT</code>
 *     </strong> option to the handle by calling curl_setopt()
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_REQUEST_SIZE</code></strong> - Total size of issued requests, currently only for HTTP requests
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_SSL_VERIFYRESULT</code></strong> - Result of SSL certification verification requested by setting
 *     <strong><code class="code">CURLOPT_SSL_VERIFYPEER</code>
 *     </strong>
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_CONTENT_LENGTH_DOWNLOAD</code></strong> - Content length of download, read from
 *     <code class="code">Content-Length:</code> field
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_CONTENT_LENGTH_UPLOAD</code></strong> - Specified size of upload
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_CONTENT_TYPE</code>
 *     </strong> -
 *     <code class="code">Content-Type:</code> of the requested document. NULL indicates server did not send valid
 *     <code class="code">Content-Type:</code> header
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_PRIVATE</code></strong> - Private data associated with this cURL handle, previously set with the
 *     <strong><code class="code">CURLOPT_PRIVATE</code>
 *     </strong> option of curl_setopt()
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_RESPONSE_CODE</code></strong> - The last response code
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_HTTP_CONNECTCODE</code></strong> - The CONNECT response code
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_HTTPAUTH_AVAIL</code></strong> - Bitmask indicating the authentication method(s) available according to the previous response
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_PROXYAUTH_AVAIL</code></strong> - Bitmask indicating the proxy authentication method(s) available according to the previous response
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_OS_ERRNO</code></strong> - Errno from a connect failure. The number is OS and system specific.
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_NUM_CONNECTS</code></strong> - Number of connections curl had to create to achieve the previous transfer
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_SSL_ENGINES</code></strong> - OpenSSL crypto-engines supported
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_COOKIELIST</code></strong> - All known cookies
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_FTP_ENTRY_PATH</code></strong> - Entry path in FTP server
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_APPCONNECT_TIME</code></strong> - Time in seconds it took from the start until the SSL/SSH connect/handshake to the remote host was completed
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_CERTINFO</code></strong> - TLS certificate chain
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_CONDITION_UNMET</code></strong> - Info on unmet time conditional
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_RTSP_CLIENT_CSEQ</code></strong> - Next RTSP client CSeq
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_RTSP_CSEQ_RECV</code></strong> - Recently received CSeq
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_RTSP_SERVER_CSEQ</code></strong> - Next RTSP server CSeq
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_RTSP_SESSION_ID</code></strong> - RTSP session ID
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_CONTENT_LENGTH_DOWNLOAD_T</code></strong> - The content-length of the download. This is the value read from the
 *     <code class="code">Content-Type:</code> field. -1 if the size isn't known
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_CONTENT_LENGTH_UPLOAD_T</code></strong> - The specified size of the upload. -1 if the size isn't known
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_HTTP_VERSION</code></strong> - The version used in the last HTTP connection. The return value will be one of the defined
 *     <strong><code class="code">CURL_HTTP_VERSION_*</code>
 *     </strong> constants or 0 if the version can't be determined
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_PROTOCOL</code></strong> - The protocol used in the last HTTP connection. The returned value will be exactly one of the
 *     <strong><code class="code">CURLPROTO_*</code>
 *     </strong> values
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_PROXY_SSL_VERIFYRESULT</code></strong> - The result of the certificate verification that was requested (using the
 *     <strong><code class="code">CURLOPT_PROXY_SSL_VERIFYPEER</code>
 *     </strong> option). Only used for HTTPS proxies
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_SCHEME</code></strong> - The URL scheme used for the most recent connection
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_SIZE_DOWNLOAD_T</code></strong> - Total number of bytes that were downloaded. The number is only for the latest transfer and will be reset again for each new transfer
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_SIZE_UPLOAD_T</code></strong> - Total number of bytes that were uploaded
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_SPEED_DOWNLOAD_T</code></strong> - The average download speed in bytes/second that curl measured for the complete download
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_SPEED_UPLOAD_T</code></strong> - The average upload speed in bytes/second that curl measured for the complete upload
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_APPCONNECT_TIME_T</code></strong> - Time, in microseconds, it took from the start until the SSL/SSH connect/handshake to the remote host was completed
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_CONNECT_TIME_T</code></strong> - Total time taken, in microseconds, from the start until the connection to the remote host (or proxy) was completed
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_FILETIME_T</code></strong> - Remote time of the retrieved document (as Unix timestamp), an alternative to
 *     <strong><code class="code">CURLINFO_FILETIME</code>
 *     </strong> to allow systems with 32 bit long variables to extract dates outside of the 32bit timestamp range
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_NAMELOOKUP_TIME_T</code></strong> - Time in microseconds from the start until the name resolving was completed
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_PRETRANSFER_TIME_T</code></strong> - Time taken from the start until the file transfer is just about to begin, in microseconds
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_REDIRECT_TIME_T</code></strong> - Total time, in microseconds, it took for all redirection steps include name lookup, connect, pretransfer and transfer before final transaction was started
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_STARTTRANSFER_TIME_T</code></strong> - Time, in microseconds, it took from the start until the first byte is received
 *   </li>
 *   <li>
 *     <strong><code class="code">CURLINFO_TOTAL_TIME_T</code></strong> - Total time in microseconds for the previous transfer, including name resolving, TCP connect etc.
 * </ul>
 *
 * @return mixed If <em><code class="parameter">$option</code></em> is given, returns its value as a string.
 * Otherwise, returns an associative array with the following elements
 * (which correspond to <em><code class="parameter">$option</code></em>), or false on failure:
 * <ul>
 *   <li>url</li>
 *   <li>content_type</li>
 *   <li>http_code</li>
 *   <li>header_size</li>
 *   <li>request_size</li>
 *   <li>filetime</li>
 *   <li>ssl_verify_result</li>
 *   <li>redirect_count</li>
 *   <li>total_time</li>
 *   <li>namelookup_time</li>
 *   <li>connect_time</li>
 *   <li>pretransfer_time</li>
 *   <li>size_upload</li>
 *   <li>size_download</li>
 *   <li>speed_download</li>
 *   <li>speed_upload</li>
 *   <li>download_content_length</li>
 *   <li>upload_content_length</li>
 *   <li>starttransfer_time</li>
 *   <li>redirect_time</li>
 *   <li>certinfo</li>
 *   <li>primary_ip</li>
 *   <li>primary_port</li>
 *   <li>local_ip</li>
 *   <li>local_port</li>
 *   <li>redirect_url</li>
 *   <li>request_header (This is only set if the
 *     <strong><code>CURLINFO_HEADER_OUT</code>
 *     </strong> is set by a previous call to curl_setopt()
 *   </li>
 * </ul>
 */
#[Pure(true)]
function curl_getinfo(#[LanguageLevelTypeAware(['8.0' => 'CurlHandle'], default: 'resource')] $handle, ?int $option): mixed {}

/**
 * Return a string containing the last error for the current session
 * @link https://php.net/manual/en/function.curl-error.php
 * @param CurlHandle|resource $handle
 * @return string the error message or '' (the empty string) if no
 * error occurred.
 */
#[Pure(true)]
function curl_error(#[LanguageLevelTypeAware(['8.0' => 'CurlHandle'], default: 'resource')] $handle): string {}

/**
 * Return the last error number
 * @link https://php.net/manual/en/function.curl-errno.php
 * @param CurlHandle|resource $handle
 * @return int the error number or 0 (zero) if no error
 * occurred.
 */
#[Pure(true)]
function curl_errno(#[LanguageLevelTypeAware(['8.0' => 'CurlHandle'], default: 'resource')] $handle): int {}

/**
 * URL encodes the given string
 * @link https://secure.php.net/manual/en/function.curl-escape.php
 * @param CurlHandle|resource $handle <p>
 * A cURL handle returned by
 * {@link https://secure.php.net/manual/en/function.curl-init.php curl_init()}.</p>
 * @param string $string <p>
 * The string to be encoded.</p>
 * @return string|false Returns escaped string or FALSE on failure.
 * @since 5.5
 */
#[Pure]
function curl_escape(#[LanguageLevelTypeAware(['8.0' => 'CurlHandle'], default: 'resource')] $handle, string $string): string|false {}

/**
 * (PHP 5 >= 5.5.0) <br/>
 * Create a CURLFile object
 * @link https://secure.php.net/manual/en/curlfile.construct.php
 * @param string $filename <p> Path to the file which will be uploaded.</p>
 * @param string|null $mime_type <p>Mimetype of the file.</p>
 * @param string|null $posted_filename <p>Name of the file.</p>
 * @return CURLFile
 * Returns a {@link https://secure.php.net/manual/en/class.curlfile.php CURLFile} object.
 * @since 5.5
 */
#[Pure]
function curl_file_create(string $filename, ?string $mime_type = null, ?string $posted_filename = null): CURLFile {}

/**
 * Close a cURL session
 * @link https://php.net/manual/en/function.curl-close.php
 * @param CurlHandle|resource $handle
 * @return void
 */
function curl_close(#[LanguageLevelTypeAware(['8.0' => 'CurlHandle'], default: 'resource')] $handle): void {}

/**
 * Returns a new cURL multi handle
 * @link https://php.net/manual/en/function.curl-multi-init.php
 * @return resource|CurlMultiHandle|false a cURL multi handle resource on success, false on failure.
 */
#[LanguageLevelTypeAware(['8.0' => 'CurlMultiHandle'], default: 'resource')]
function curl_multi_init(): CurlMultiHandle {}

/**
 * Add a normal cURL handle to a cURL multi handle
 * @link https://php.net/manual/en/function.curl-multi-add-handle.php
 * @param CurlMultiHandle|resource $multi_handle
 * @param CurlHandle|resource $handle
 * @return int 0 on success, or one of the CURLM_XXX errors
 * code.
 */
function curl_multi_add_handle(#[LanguageLevelTypeAware(['8.0' => 'CurlMultiHandle'], default: 'resource')] $multi_handle, #[LanguageLevelTypeAware(['8.0' => 'CurlHandle'], default: 'resource')] $handle): int {}

/**
 * Remove a multi handle from a set of cURL handles
 * @link https://php.net/manual/en/function.curl-multi-remove-handle.php
 * @param CurlMultiHandle|resource $multi_handle
 * @param CurlHandle|resource $handle
 * @return int|false On success, returns one of the CURLM_XXX error codes, false on failure.
 */
#[LanguageLevelTypeAware(['8.0' => 'int'], default: 'int|false')]
function curl_multi_remove_handle(#[LanguageLevelTypeAware(['8.0' => 'CurlMultiHandle'], default: 'resource')] $multi_handle, #[LanguageLevelTypeAware(['8.0' => 'CurlHandle'], default: 'resource')] $handle) {}

/**
 * Wait for activity on any curl_multi connection
 * @link https://php.net/manual/en/function.curl-multi-select.php
 * @param CurlMultiHandle|resource $multi_handle
 * @param float $timeout [optional] <p>
 * Time, in seconds, to wait for a response.
 * </p>
 * @return int On success, returns the number of descriptors contained in,
 * the descriptor sets. On failure, this function will return -1 on a select failure or timeout (from the underlying select system call).
 */
function curl_multi_select(#[LanguageLevelTypeAware(['8.0' => 'CurlMultiHandle'], default: 'resource')] $multi_handle, float $timeout = 1.0): int {}

/**
 * (PHP 5 &gt;=5.5.0)<br/>
 * Set an option for the cURL multi handle
 * @link https://secure.php.net/manual/en/function.curl-multi-setopt.php
 * @param CurlMultiHandle|resource $multi_handle
 * @param int $option <p>
 * One of the <b>CURLMOPT_*</b> constants.
 * </p>
 * @param mixed $value <p>
 * The value to be set on <em>option</em>.
 * </p>
 * <p>
 * <em>value</em> should be an {@link https://php.net/manual/en/language.types.integer.php int} for the
 * following values of the <em>option</em> parameter:
 * </p><table>
 *
 * <thead>
 * <tr>
 * <th>Option</th>
 * <th>Set <em><code class="parameter">value</code></em> to</th>
 * </tr>
 * </thead>
 *
 * <tbody>
 * <tr>
 * <td><b>CURLMOPT_PIPELINING</b></td>
 * <td style="vertical-align: top;">
 * Pass 1 to enable or 0 to disable. Enabling pipelining on a multi
 * handle will make it attempt to perform HTTP Pipelining as far as
 * possible for transfers using this handle. This means that if you add
 * a second request that can use an already existing connection, the
 * second request will be "piped" on the same connection rather than
 * being executed in parallel.
 * </td>
 * </tr>
 *
 * <tr>
 * <td style="vertical-align: top;"><b>CURLMOPT_MAXCONNECTS</b></td>
 * <td style="vertical-align: top;">
 * Pass a number that will be used as the maximum amount of
 * simultaneously open connections that libcurl may cache. Default is
 * 10. When the cache is full, curl closes the oldest one in the cache
 * to prevent the number of open connections from increasing.
 * </td>
 * </tr>
 * </tbody>
 * </table>
 * @return bool Returns TRUE on success or FALSE on failure.
 * @since 5.5
 */
function curl_multi_setopt(#[LanguageLevelTypeAware(['8.0' => 'CurlMultiHandle'], default: 'resource')] $multi_handle, int $option, mixed $value): bool {}

/**
 * (PHP 5 &gt;=5.5.0)<br/>
 * Return string describing error code
 * @link https://secure.php.net/manual/en/function.curl-multi-strerror.php
 * @param int $error_code <p>
 * One of the {@link https://curl.haxx.se/libcurl/c/libcurl-errors.html CURLM error codes} constants.
 * </p>
 * @return string|null Returns error string for valid error code, NULL otherwise.
 * @since 5.5
 */
function curl_multi_strerror(int $error_code): ?string {}

/**
 * (PHP 5 &gt;=5.5.0)<br/>
 * Pause and unpause a connection
 * @link https://secure.php.net/manual/en/function.curl-pause.php
 * @param CurlHandle|resource $handle
 * <p>A cURL handle returned by {@link https://secure.php.net/manual/en/function.curl-init.php curl_init()}.</p>
 * @param int $flags <p>One of <b>CURLPAUSE_*</b> constants.</p>
 * @return int Returns an error code (<b>CURLE_OK</b> for no error).
 * @since 5.5
 */
function curl_pause(#[LanguageLevelTypeAware(['8.0' => 'CurlHandle'], default: 'resource')] $handle, int $flags): int {}

/**
 * (PHP 5 &gt;=5.5.0)<br/>
 * Reset all options of a libcurl session handle
 * @link https://secure.php.net/manual/en/function.curl-reset.php
 * @param CurlHandle|resource $handle <p>A cURL handle returned by
 * {@link https://secure.php.net/manual/en/function.curl-init.php curl_init()}.</p>
 * @return void
 * @since 5.5
 */
function curl_reset(#[LanguageLevelTypeAware(['8.0' => 'CurlHandle'], default: 'resource')] $handle): void {}

/**
 * Run the sub-connections of the current cURL handle
 * @link https://php.net/manual/en/function.curl-multi-exec.php
 * @param CurlMultiHandle|resource $multi_handle
 * @param int &$still_running <p>
 * A reference to a flag to tell whether the operations are still running.
 * </p>
 * @return int A cURL code defined in the cURL Predefined Constants.
 * <p>
 * This only returns errors regarding the whole multi stack. There might still have
 * occurred problems on individual transfers even when this function returns
 * CURLM_OK.
 * </p>
 */
function curl_multi_exec(
    #[LanguageLevelTypeAware(['8.0' => 'CurlMultiHandle'], default: 'resource')] $multi_handle,
    #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] &$still_running = 0,
    #[PhpStormStubsElementAvailable(from: '8.0')] &$still_running
): int {}

/**
 * Return the content of a cURL handle if <constant>CURLOPT_RETURNTRANSFER</constant> is set
 * @link https://php.net/manual/en/function.curl-multi-getcontent.php
 * @param CurlHandle|resource $handle
 * @return null|string Return the content of a cURL handle if CURLOPT_RETURNTRANSFER is set.
 */
#[Pure]
function curl_multi_getcontent(#[LanguageLevelTypeAware(['8.0' => 'CurlHandle'], default: 'resource')] $handle): ?string {}

/**
 * Get information about the current transfers
 * @link https://php.net/manual/en/function.curl-multi-info-read.php
 * @param CurlMultiHandle|resource $multi_handle
 * @param int &$queued_messages [optional] <p>
 * Number of messages that are still in the queue
 * </p>
 * @return array|false On success, returns an associative array for the message, false on failure.
 */
#[Pure]
#[ArrayShape(["msg" => "int", "result" => "int", "handle" => "resource"])]
function curl_multi_info_read(#[LanguageLevelTypeAware(['8.0' => 'CurlMultiHandle'], default: 'resource')] $multi_handle, &$queued_messages): array|false {}

/**
 * Close a set of cURL handles
 * @link https://php.net/manual/en/function.curl-multi-close.php
 * @param CurlMultiHandle|resource $multi_handle
 * @return void
 */
function curl_multi_close(#[LanguageLevelTypeAware(['8.0' => 'CurlMultiHandle'], default: 'resource')] $multi_handle): void {}

/**
 * Return the last multi curl error number
 * @param CurlMultiHandle|resource $multi_handle
 * @return int
 * @since 7.1
 */
#[Pure(true)]
function curl_multi_errno(#[LanguageLevelTypeAware(['8.0' => 'CurlMultiHandle'], default: 'resource')] $multi_handle): int {}

/**
 * Return the last share curl error number
 * @param CurlMultiHandle|resource $share_handle
 * @return int
 * @since 7.1
 */
#[Pure(true)]
function curl_share_errno(#[LanguageLevelTypeAware(['8.0' => 'CurlShareHandle'], default: 'resource')] $share_handle): int {}

/**
 * Return string describing the given error code
 * @param int $error_code
 * @return string|null
 * @since 7.1
 */
#[Pure]
function curl_share_strerror(int $error_code): ?string {}

/**
 * @since 8.2
 */
function curl_upkeep(CurlHandle $handle): bool {}
/**
 * @since 8.0
 */
final class CurlHandle
{
    /**
     * Cannot directly construct CurlHandle, use curl_init() instead
     * @see curl_init()
     */
    private function __construct() {}
}

/**
 * @since 8.0
 */
final class CurlMultiHandle
{
    /**
     * Cannot directly construct CurlMultiHandle, use curl_multi_init() instead
     * @see curl_multi_init()
     */
    private function __construct() {}
}

/**
 * @since 8.0
 */
final class CurlShareHandle
{
    /**
     * Cannot directly construct CurlShareHandle, use curl_share_init() instead
     * @see  curl_share_init()
     */
    private function __construct() {}
}
<?php

/**
 * A bitmask consisting of one or more of
 * <b>CURLSSH_AUTH_PUBLICKEY</b>,
 * <b>CURLSSH_AUTH_PASSWORD</b>,
 * <b>CURLSSH_AUTH_HOST</b>,
 * <b>CURLSSH_AUTH_KEYBOARD</b>. Set to
 * <b>CURLSSH_AUTH_ANY</b> to let libcurl pick one.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_SSH_AUTH_TYPES', 151);

/**
 * <b>TRUE</b> tells the library to perform all the required proxy authentication
 * and connection setup, but no data transfer. This option is implemented for
 * HTTP, SMTP and POP3.
 * @since 5.5
 * @link https://php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_CONNECT_ONLY', 141);

/**
 * With the <b>CURLOPT_FOLLOWLOCATION</b> option disabled:
 *   redirect URL found in the last transaction, that should be requested manually next.
 * With the <b>CURLOPT_FOLLOWLOCATION</b> option enabled:
 *   this is empty. The redirect URL in this case is available in <b>CURLINFO_EFFECTIVE_URL</b>
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 * @since 5.3.7
 */
define('CURLINFO_REDIRECT_URL', 1048607);

/**
 * IP address of the most recent connection
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 * @since 5.4.7
 */
define('CURLINFO_PRIMARY_IP', 1048608);
/**
 * Destination port of the most recent connection
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 * @since 5.4.7
 */
define('CURLINFO_PRIMARY_PORT', 2097192);
/**
 * Local (source) IP address of the most recent connection
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 * @since 5.4.7
 */
define('CURLINFO_LOCAL_IP', 1048617);
/**
 * Local (source) port of the most recent connection
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 * @since 5.4.7
 */
define('CURLINFO_LOCAL_PORT', 2097194);
/**
 * A result of {@see curl_share_init()}. Makes the cURL handle to use the data from the shared handle.
 * @link https://php.net/manual/en/function.curl-setopt.php
 * @since 5.5
 */
define('CURLOPT_SHARE', 10100);
/**
 * Allows an application to select what kind of IP addresses to use when resolving host names.
 * This is only interesting when using host names that resolve addresses using more than one version of IP,
 * possible values are <b>CURL_IPRESOLVE_WHATEVER</b>, <b>CURL_IPRESOLVE_V4</b>, <b>CURL_IPRESOLVE_V6</b>, by default <b>CURL_IPRESOLVE_WHATEVER</b>.
 * @link https://php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_IPRESOLVE', 113);
/**
 * Value for the <b>CURLOPT_IPRESOLVE</b> option.
 * Default, resolves addresses to all IP versions that your system allows.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_IPRESOLVE.html
 */
define('CURL_IPRESOLVE_WHATEVER', 0);
/**
 * Value for the <b>CURLOPT_IPRESOLVE</b> option.
 * Resolve to IPv4 addresses.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_IPRESOLVE.html
 */
define('CURL_IPRESOLVE_V4', 1);
/**
 * Value for the <b>CURLOPT_IPRESOLVE</b> option.
 * Resolve to IPv6 addresses.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_IPRESOLVE.html
 */
define('CURL_IPRESOLVE_V6', 2);
/**
 * <b>TRUE</b> to use a global DNS cache. This option is not thread-safe.
 * It is conditionally enabled by default if PHP is built for non-threaded use (CLI, FCGI, Apache2-Prefork, etc.).
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_DNS_USE_GLOBAL_CACHE', 91);

/**
 * The number of seconds to keep DNS entries in memory.
 * This option is set to 120 (2 minutes) by default.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_DNS_CACHE_TIMEOUT', 92);
/**
 * An alternative port number to connect to.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_PORT', 3);
/**
 * The file that the transfer should be written to. The default is STDOUT (the browser window).
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_FILE', 10001);
/**
 * Custom pointer passed to the read callback.
 * If you use the CURLOPT_READFUNCTION option, this is the pointer you'll get as input in the 4th argument to the callback.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_READDATA.html
 */
define('CURLOPT_READDATA', 10009);
/**
 * The file that the transfer should be read from when uploading.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_INFILE', 10009);
/**
 * The expected size, in bytes, of the file when uploading a file to a remote site.
 * Note that using this option will not stop libcurl from sending more data, as exactly what is sent depends on <b>CURLOPT_READFUNCTION</b>.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_INFILESIZE', 14);
/**
 * The URL to fetch. This can also be set when initializing a session with {@see curl_init()}.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_URL', 10002);
/**
 * The HTTP proxy to tunnel requests through.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_PROXY', 10004);
/**
 * <b>TRUE</b> to output verbose information.
 * Writes output to STDERR, or the file specified using <b>CURLOPT_STDERR</b>.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_VERBOSE', 41);
/**
 * <b>TRUE</b> to include the header in the output.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_HEADER', 42);
/**
 * An array of HTTP header fields to set, in the format array('<em>Content-type: text/plain</em>', '<em>Content-length: 100</em>')
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_HTTPHEADER', 10023);
/**
 * <b>TRUE</b> to disable the progress meter for cURL transfers.
 * (PHP automatically sets this option to TRUE, this should only be changed for debugging purposes.)
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_NOPROGRESS', 43);

/**
 * A callback accepting five parameters.
 * The first is the cURL resource,
 * the second is the total number of bytes expected to be downloaded in this transfer,
 * the third is the number of bytes downloaded so far,
 * the fourth is the total number of bytes expected to be uploaded in this transfer,
 * and the fifth is the number of bytes uploaded so far.
 * (The callback is only called when the <b>CURLOPT_NOPROGRESS</b> option is set to <b>FALSE</b>.)
 * Return a non-zero value to abort the transfer. In which case, the transfer will set a <b>CURLE_ABORTED_BY_CALLBACK</b> error.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 5.3
 */
define('CURLOPT_PROGRESSFUNCTION', 20056);
/**
 * <b>TRUE</b> to exclude the body from the output. Request method is then set to HEAD. Changing this to <b>FALSE</b> does not change it to GET.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_NOBODY', 44);
/**
 * <b>TRUE</b> to fail verbosely if the HTTP code returned is greater than or equal to 400.
 * The default behavior is to return the page normally, ignoring the code.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_FAILONERROR', 45);
/**
 * <b>TRUE</b> to prepare for an upload.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_UPLOAD', 46);
/**
 * <b>TRUE</b> to do a regular HTTP POST.
 * This POST is the normal application/x-www-form-urlencoded kind, most commonly used by HTML forms.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_POST', 47);
/**
 * <b>TRUE</b> to only list the names of an FTP directory.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_FTPLISTONLY', 48);
/**
 * <b>TRUE</b> to append to the remote file instead of overwriting it.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_FTPAPPEND', 50);
/**
 * <b>TRUE</b> to scan the ~/.netrc file to find a username and password for the remote site that a connection is being established with.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_NETRC', 51);
/**
 * A bitmask of 1 (301 Moved Permanently), 2 (302 Found) and 4 (303 See Other) if the HTTP POST method should be maintained
 * when <b>CURLOPT_FOLLOWLOCATION</b> is set and a specific type of redirect occurs.
 * @link https://secure.php.net/manual/en/function.curl-setopt.php
 * @since 5.3.2
 */
define('CURLOPT_POSTREDIR', 161);
/**
 * <b>TRUE</b> to output SSL certification information to STDERR on secure transfers.
 * Requires <b>CURLOPT_VERBOSE</b> to be on to have an effect.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 5.3.2
 */
define('CURLOPT_CERTINFO', 172);
/**
 * An alias of <b>CURLOPT_TRANSFERTEXT</b>. Use that instead.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_FTPASCII', -1);
/**
 * <b>TRUE</b> to be completely silent with regards to the cURL functions.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @deprecated use <b>CURLOPT_RETURNTRANSFER</b> instead since cURL 7.15.5
 */
define('CURLOPT_MUTE', -1);
/**
 * Bitmask of CURLPROTO_* values. If used, this bitmask limits what protocols libcurl may use in the transfer.
 * This allows you to have a libcurl built to support a wide range of protocols but still limit specific transfers
 * to only be allowed to use a subset of them.
 * By default libcurl will accept all protocols it supports. See also <b>CURLOPT_REDIR_PROTOCOLS</b>.
 * Valid protocol options are:
 * <b>CURLPROTO_HTTP</b>, <b>CURLPROTO_HTTPS</b>, <b>CURLPROTO_FTP</b>, <b>CURLPROTO_FTPS</b>, <b>CURLPROTO_SCP</b>, <b>CURLPROTO_SFTP</b>,
 * <b>CURLPROTO_TELNET</b>, <b>CURLPROTO_LDAP</b>, <b>CURLPROTO_LDAPS</b>, <b>CURLPROTO_DICT</b>, <b>CURLPROTO_FILE</b>, <b>CURLPROTO_TFTP</b>,
 * <b>CURLPROTO_ALL</b>
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 5.2.10
 */
define('CURLOPT_PROTOCOLS', 181);
/**
 * Bitmask of CURLPROTO_* values. If used, this bitmask limits what protocols libcurl may use in a transfer
 * that it follows to in a redirect when <b>CURLOPT_FOLLOWLOCATION</b> is enabled.
 * This allows you to limit specific transfers to only be allowed to use a subset of protocols in redirections.
 * By default libcurl will allow all protocols except for FILE and SCP.
 * This is a difference compared to pre-7.19.4 versions which unconditionally would follow to all protocols supported.
 * See also <b>CURLOPT_PROTOCOLS</b> for protocol constant values.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 5.2.10
 */
define('CURLOPT_REDIR_PROTOCOLS', 182);
/**
 * If a download exceeds this speed (counted in bytes per second) on cumulative average during the transfer,
 * the transfer will pause to keep the average rate less than or equal to the parameter value.
 * Defaults to unlimited speed.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 5.4
 */
define('CURLOPT_MAX_RECV_SPEED_LARGE', 30146);
/**
 * If an upload exceeds this speed (counted in bytes per second) on cumulative average during the transfer,
 * the transfer will pause to keep the average rate less than or equal to the parameter value.
 * Defaults to unlimited speed.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 5.4
 */
define('CURLOPT_MAX_SEND_SPEED_LARGE', 30145);
/**
 * A callback accepting three parameters.
 * The first is the cURL resource, the second is a string containing a password prompt, and the third is the maximum password length.
 * Return the string containing the password.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_PASSWDFUNCTION', -1);

/**
 * <b>TRUE</b> to follow any "<em>Location: </em>" header that the server sends as part of the HTTP header
 * (note this is recursive, PHP will follow as many "Location: " headers that it is sent, unless <b>CURLOPT_MAXREDIRS</b> is set).
 * This constant is not available when open_basedir
 * or safe_mode are enabled.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_FOLLOWLOCATION', 52);
/**
 * <b>TRUE</b> to HTTP PUT a file. The file to PUT must be set with <b>CURLOPT_INFILE</b> and <b>CURLOPT_INFILESIZE</b>.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_PUT', 54);
/**
 * A username and password formatted as "<em>[username]:[password]</em>" to use for the connection.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_USERPWD', 10005);
/**
 * A username and password formatted as "<em>[username]:[password]</em>" to use for the connection to the proxy.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_PROXYUSERPWD', 10006);
/**
 * Range(s) of data to retrieve in the format "<em>X-Y</em>" where X or Y are optional.
 * HTTP transfers also support several intervals, separated with commas in the format "<em>X-Y,N-M</em>".
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_RANGE', 10007);
/**
 * The maximum number of seconds to allow cURL functions to execute.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_TIMEOUT', 13);
/**
 * The maximum number of milliseconds to allow cURL functions to execute.
 * If libcurl is built to use the standard system name resolver,
 * that portion of the connect will still use full-second resolution for timeouts with a minimum timeout allowed of one second.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 5.2
 */
define('CURLOPT_TIMEOUT_MS', 155);
/**
 * The full data to post in a HTTP "POST" operation.
 * To post a file, prepend a filename with @ and use the full path.
 * The filetype can be explicitly specified by following the filename with the type in the format '<em>;type=mimetype</em>'.
 * This parameter can either be passed
 * as a urlencoded string like '<em>para1=val1&para2=val2&...</em>'
 * or as an array with the field name as key and field data as value.
 * If value is an array, the <em>Content-Type</em> header will be set to <em>multipart/form-data</em>.
 * As of PHP 5.2.0, value must be an array if files are passed to this option with the @ prefix.
 * As of PHP 5.5.0, the @ prefix is deprecated and files can be sent using <b>CURLFile</b>.
 * The @ prefix can be disabled for safe passing of values beginning with @ by setting the <b>CURLOPT_SAFE_UPLOAD</b> option to TRUE.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_POSTFIELDS', 10015);
/**
 * The contents of the "<em>Referer: </em>" header to be used in a HTTP request.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_REFERER', 10016);
/**
 * A string containing 32 hexadecimal digits.
 * The string should be the MD5 checksum of the remote host's public key, and libcurl will reject the connection to the host unless the md5sums match.
 * This option is only for <b>SCP</b> and <b>SFTP</b> transfers.
 * @link https://php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_SSH_HOST_PUBLIC_KEY_MD5', 10162);
/**
 * The file name for your public key. If not used, libcurl defaults to $HOME/.ssh/id_dsa.pub
 * if the HOME environment variable is set, and just "id_dsa.pub" in the current directory if HOME is not set.
 * @link https://php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_SSH_PUBLIC_KEYFILE', 10152);
/**
 * The file name for your private key. If not used, libcurl defaults to $HOME/.ssh/id_dsa
 * if the HOME environment variable is set, and just "id_dsa" in the current directory if HOME is not set.
 * If the file is password-protected, set the password with <b>CURLOPT_KEYPASSWD</b>.
 * @link https://php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_SSH_PRIVATE_KEYFILE', 10153);
/**
 * The contents of the "<em>User-Agent: </em>" header to be used in a HTTP request.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_USERAGENT', 10018);
/**
 * The value which will be used to get the IP address to use for the FTP "PORT" instruction.
 * The "PORT" instruction tells the remote server to connect to our specified IP address.
 * The string may be a plain IP address, a hostname, a network interface name (under Unix),
 * or just a plain '-' to use the systems default IP address.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_FTPPORT', 10017);
/**
 * <b>TRUE</b> to first try an EPSV command for FTP transfers before reverting back to PASV. Set to <b>FALSE</b> to disable EPSV.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_FTP_USE_EPSV', 85);
/**
 * The transfer speed, in bytes per second, that the transfer should be below during the count of <b>CURLOPT_LOW_SPEED_TIME</b> seconds
 * before PHP considers the transfer too slow and aborts.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_LOW_SPEED_LIMIT', 19);
/**
 * The number of seconds the transfer speed should be below <b>CURLOPT_LOW_SPEED_LIMIT</b>
 * before PHP considers the transfer too slow and aborts.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_LOW_SPEED_TIME', 20);
/**
 * The offset, in bytes, to resume a transfer from.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_RESUME_FROM', 21);
/**
 * The contents of the "<em>Cookie: </em>" header to be used in the HTTP request.
 * Note that multiple cookies are separated with a semicolon followed by a space (e.g., "<em>fruit=apple; colour=red</em>")
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_COOKIE', 10022);

/**
 * <b>TRUE</b> to mark this as a new cookie "session".
 * It will force libcurl to ignore all cookies it is about to load that are "session cookies" from the previous session.
 * By default, libcurl always stores and loads all cookies, independent if they are session cookies or not.
 * Session cookies are cookies without expiry date and they are meant to be alive and existing for this "session" only.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_COOKIESESSION', 96);

/**
 * <b>TRUE</b> to automatically set the Referer: field in requests where it follows a Location: redirect.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_AUTOREFERER', 58);
/**
 * The name of a file containing a PEM formatted certificate.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_SSLCERT', 10025);
/**
 * The password required to use the <b>CURLOPT_SSLCERT</b> certificate.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_SSLCERTPASSWD', 10026);
/**
 * The file that the header part of the transfer is written to.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_WRITEHEADER', 10029);
/**
 * 1 to check the existence of a common name in the SSL peer certificate. (Deprecated)
 * 2 to check the existence of a common name and also verify that it matches the hostname provided.
 * 0 to not check the names. In production environments the value of this option should be kept at 2 (default value).
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_SSL_VERIFYHOST', 81);
/**
 * The name of the file containing the cookie data.
 * The cookie file can be in Netscape format, or just plain HTTP-style headers dumped into a file.
 * If the name is an empty string, no cookies are loaded, but cookie handling is still enabled.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_COOKIEFILE', 10031);
/**
 * One of <b>CURL_SSLVERSION_DEFAULT</b> (0), <b>CURL_SSLVERSION_TLSv1</b> (1), <b>CURL_SSLVERSION_SSLv2</b> (2), <b>CURL_SSLVERSION_SSLv3</b> (3),
 * <b>CURL_SSLVERSION_TLSv1_0</b> (4), <b>CURL_SSLVERSION_TLSv1_1</b> (5) or <b>CURL_SSLVERSION_TLSv1_2</b> (6).
 * The maximum TLS version can be set by using one of the <b>CURL_SSLVERSION_MAX_*</b> constants.
 * It is also possible to OR one of the <b>CURL_SSLVERSION_*</b> constants with one of the <b>CURL_SSLVERSION_MAX_*</b> constants.
 * <b>CURL_SSLVERSION_MAX_DEFAULT</b> (the maximum version supported by the library), <b>CURL_SSLVERSION_MAX_TLSv1_0</b>, <b>CURL_SSLVERSION_MAX_TLSv1_1</b>,
 * <b>CURL_SSLVERSION_MAX_TLSv1_2</b>, or <b>CURL_SSLVERSION_MAX_TLSv1_3</b>.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_SSLVERSION', 32);
/**
 * Value for the <b>CURLOPT_SSLVERSION</b> option.
 * @link https://www.php.net/manual/en/curl.constants.php
 */
define('CURL_SSLVERSION_DEFAULT', 0);
/**
 * Value for the <b>CURLOPT_SSLVERSION</b> option.
 * @link https://www.php.net/manual/en/curl.constants.php
 */
define('CURL_SSLVERSION_TLSv1', 1);
/**
 * Value for the <b>CURLOPT_SSLVERSION</b> option.
 * @link https://www.php.net/manual/en/curl.constants.php
 */
define('CURL_SSLVERSION_SSLv2', 2);
/**
 * Value for the <b>CURLOPT_SSLVERSION</b> option.
 * @link https://www.php.net/manual/en/curl.constants.php
 */
define('CURL_SSLVERSION_SSLv3', 3);

/**
 * Value for the <b>CURLOPT_SSLVERSION</b> option.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @since 5.6.3
 * @since 5.5.19
 */
define('CURL_SSLVERSION_TLSv1_0', 4);

/**
 * Value for the <b>CURLOPT_SSLVERSION</b> option.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @since 5.6.3
 * @since 5.5.19
 */
define('CURL_SSLVERSION_TLSv1_1', 5);

/**
 * Value for the <b>CURLOPT_SSLVERSION</b> option.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @since 5.6.3
 * @since 5.5.19
 */
define('CURL_SSLVERSION_TLSv1_2', 6);
/**
 * How <b>CURLOPT_TIMEVALUE</b> is treated.
 * Use <b>CURL_TIMECOND_IFMODSINCE</b> to return the page only if it has been modified since the time specified in <b>CURLOPT_TIMEVALUE</b>.
 * If it hasn't been modified, a "304 Not Modified" header will be returned assuming <b>CURLOPT_HEADER</b> is <b>TRUE</b>.
 * Use <b>CURL_TIMECOND_IFUNMODSINCE</b> for the reverse effect.
 * <b>CURL_TIMECOND_IFMODSINCE</b> is the default.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_TIMECONDITION', 33);
/**
 * The time in seconds since January 1st, 1970.
 * The time will be used by <b>CURLOPT_TIMECONDITION</b>. By default, <b>CURL_TIMECOND_IFMODSINCE</b> is used.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_TIMEVALUE', 34);
/**
 * A custom request method to use instead of "GET" or "HEAD" when doing a HTTP request.
 * This is useful for doing "DELETE" or other, more obscure HTTP requests.
 * Valid values are things like "GET", "POST", "CONNECT" and so on; i.e. Do not enter a whole HTTP request line here.
 * For instance, entering "GET /index.html HTTP/1.0\r\n\r\n" would be incorrect.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_CUSTOMREQUEST', 10036);
/**
 * An alternative location to output errors to instead of STDERR.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_STDERR', 10037);
/**
 * <b>TRUE</b> to use ASCII mode for FTP transfers.
 * For LDAP, it retrieves data in plain text instead of HTML.
 * On Windows systems, it will not set STDOUT to binary mode.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_TRANSFERTEXT', 53);
/**
 * <b>TRUE</b> to return the transfer as a string of the return value of {@see curl_exec()} instead of outputting it directly.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_RETURNTRANSFER', 19913);
/**
 * An array of FTP commands to execute on the server prior to the FTP request.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_QUOTE', 10028);
/**
 * An array of FTP commands to execute on the server after the FTP request has been performed.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_POSTQUOTE', 10039);
/**
 * The name of the outgoing network interface to use. This can be an interface name, an IP address or a host name.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_INTERFACE', 10062);
/**
 * The KRB4 (Kerberos 4) security level.
 * Any of the following values (in order from least to most powerful) are valid: "clear", "safe", "confidential", "private".
 * If the string does not match one of these, "private" is used.
 * Setting this option to <b>NULL</b> will disable KRB4 security. Currently KRB4 security only works with FTP transactions.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_KRB4LEVEL', 10063);
/**
 * <b>TRUE</b> to tunnel through a given HTTP proxy.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_HTTPPROXYTUNNEL', 61);
/**
 * <b>TRUE</b> to attempt to retrieve the modification date of the remote document.
 * This value can be retrieved using the <b>CURLINFO_FILETIME</b> option with {@see curl_getinfo()}.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_FILETIME', 69);
/**
 * A callback accepting two parameters. The first is the cURL resource, and the second is a string with the data to be written.
 * The data must be saved by this callback. It must return the exact number of bytes written or the transfer will be aborted with an error.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_WRITEFUNCTION', 20011);
/**
 * A callback accepting three parameters.
 * The first is the cURL resource,
 * the second is a stream resource provided to cURL through the option <b>CURLOPT_INFILE</b>,
 * and the third is the maximum amount of data to be read.
 * The callback must return a string with a length equal or smaller than the amount of data requested, typically by reading it from the passed stream resource.
 * It should return an empty string to signal EOF.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_READFUNCTION', 20012);
/**
 * A callback accepting two parameters. The first is the cURL resource, the second is a string with the header data to be written.
 * The header data must be written by this callback. Return the number of bytes written.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_HEADERFUNCTION', 20079);
/**
 * The maximum amount of HTTP redirections to follow. Use this option alongside <b>CURLOPT_FOLLOWLOCATION</b>.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_MAXREDIRS', 68);
/**
 * The maximum amount of persistent connections that are allowed.
 * When the limit is reached, <b>CURLOPT_CLOSEPOLICY</b> is used to determine which connection to close.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_MAXCONNECTS', 71);
/**
 * This option is deprecated, as it was never implemented in cURL and never had any effect.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @removed 5.6
 */
define('CURLOPT_CLOSEPOLICY', 72);
/**
 * <b>TRUE</b> to force the use of a new connection instead of a cached one.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_FRESH_CONNECT', 74);
/**
 * <b>TRUE</b> to force the connection to explicitly close when it has finished processing, and not be pooled for reuse.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_FORBID_REUSE', 75);
/**
 * A filename to be used to seed the random number generator for SSL.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_RANDOM_FILE', 10076);
/**
 * Like <b>CURLOPT_RANDOM_FILE</b>, except a filename to an Entropy Gathering Daemon socket.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_EGDSOCKET', 10077);

/**
 * The number of seconds to wait while trying to connect. Use 0 to wait indefinitely.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_CONNECTTIMEOUT', 78);

/**
 * The number of milliseconds to wait while trying to connect. Use 0 to wait indefinitely.
 * If libcurl is built to use the standard system name resolver, that portion of the connect
 * will still use full-second resolution for timeouts with a minimum timeout allowed of one second.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 5.2.3
 */
define('CURLOPT_CONNECTTIMEOUT_MS', 156);
/**
 * <b>FALSE</b> to stop cURL from verifying the peer's certificate.
 * Alternate certificates to verify against can be specified with the <b>CURLOPT_CAINFO</b> option or
 * a certificate directory can be specified with the <b>CURLOPT_CAPATH</b> option.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_SSL_VERIFYPEER', 64);
/**
 * The name of a file holding one or more certificates to verify the peer with.
 * This only makes sense when used in combination with <b>CURLOPT_SSL_VERIFYPEER</b>.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_CAINFO', 10065);
/**
 * A directory that holds multiple CA certificates. Use this option alongside <b>CURLOPT_SSL_VERIFYPEER</b>.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_CAPATH', 10097);
/**
 * The name of a file to save all internal cookies to when the handle is closed, e.g. after a call to curl_close.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_COOKIEJAR', 10082);
/**
 * A list of ciphers to use for SSL. For example, RC4-SHA and TLSv1 are valid cipher lists.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_SSL_CIPHER_LIST', 10083);
/**
 * <b>TRUE</b> to return the raw output when CURLOPT_RETURNTRANSFER is used.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @deprecated 5.1.3
 */
define('CURLOPT_BINARYTRANSFER', 19914);
/**
 * <b>TRUE</b> to ignore any cURL function that causes a signal to be sent to the PHP process.
 * This is turned on by default in multi-threaded SAPIs so timeout options can still be used.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_NOSIGNAL', 99);
/**
 * Either <b>CURLPROXY_HTTP</b> (default), <b>CURLPROXY_SOCKS4</b>, <b>CURLPROXY_SOCKS5</b>, <b>CURLPROXY_SOCKS4A</b> or <b>CURLPROXY_SOCKS5_HOSTNAME</b>.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_PROXYTYPE', 101);
/**
 * The size of the buffer to use for each read. There is no guarantee this request will be fulfilled, however.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_BUFFERSIZE', 98);
/**
 * <b>TRUE</b> to reset the HTTP request method to GET. Since GET is the default, this is only necessary if the request method has been changed.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_HTTPGET', 80);
/**
 * <b>CURL_HTTP_VERSION_NONE</b> (default, lets CURL decide which version to use),
 * <b>CURL_HTTP_VERSION_1_0</b> (forces HTTP/1.0), <b>CURL_HTTP_VERSION_1_1</b> (forces HTTP/1.1), <b>CURL_HTTP_VERSION_2_0</b> (attempts HTTP 2),
 * <b>CURL_HTTP_VERSION_2</b> (alias of CURL_HTTP_VERSION_2_0), <b>CURL_HTTP_VERSION_2TLS</b> (attempts HTTP 2 over TLS (HTTPS) only) or
 * <b>CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE</b> (issues non-TLS HTTP requests using HTTP/2 without HTTP/1.1 Upgrade).
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_HTTP_VERSION', 84);
/**
 * The name of a file containing a private SSL key.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_SSLKEY', 10087);
/**
 * The key type of the private SSL key specified in <b>CURLOPT_SSLKEY</b>.
 * Supported key types are "<em>PEM</em>" (default), "<em>DER</em>", and "<em>ENG</em>".
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_SSLKEYTYPE', 10088);
/**
 * The secret password needed to use the private SSL key specified in <b>CURLOPT_SSLKEY</b>.
 * (Since this option contains a sensitive password, remember to keep the PHP script it is contained within safe)
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_SSLKEYPASSWD', 10026);
/**
 * The identifier for the crypto engine of the private SSL key specified in <b>CURLOPT_SSLKEY</b>.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_SSLENGINE', 10089);
/**
 * The identifier for the crypto engine used for asymmetric crypto operations.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_SSLENGINE_DEFAULT', 90);
/**
 * The format of the certificate.
 * Supported formats are "<em>PEM</em>" (default), "<em>DER</em>", and "<em>ENG</em>". As of OpenSSL 0.9.3, "<em>P12</em>" (for PKCS#12-encoded files) is also supported.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_SSLCERTTYPE', 10086);
/**
 * <b>TRUE</b> to convert Unix newlines to CRLF newlines on transfers.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_CRLF', 27);
/**
 * The contents of the "<em>Accept-Encoding: </em>" header. This enables decoding of the response.
 * Supported encodings are "identity", "deflate", and "gzip".
 * If an empty string, "", is set, a header containing all supported encoding types is sent.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_ENCODING', 10102);
/**
 * The port number of the proxy to connect to. This port number can also be set in <b>CURLOPT_PROXY</b>.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_PROXYPORT', 59);
/**
 * <b>TRUE</b> to keep sending the username and password when following locations
 * (using <b>CURLOPT_FOLLOWLOCATION</b>), even when the hostname has changed.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_UNRESTRICTED_AUTH', 105);
/**
 * <b>TRUE</b> to use EPRT (and LPRT) when doing active FTP downloads. Use <b>FALSE</b> to disable EPRT and LPRT and use PORT only.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_FTP_USE_EPRT', 106);

/**
 * <b>TRUE</b> to disable TCP's Nagle algorithm, which tries to minimize the number of small packets on the network.
 * @link https://php.net/manual/en/curl.constants.php
 * @since 5.2.1
 */
define('CURLOPT_TCP_NODELAY', 121);
/**
 * An array of HTTP 200 responses that will be treated as valid responses and not as errors.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_HTTP200ALIASES', 10104);
/**
 * Value for the <b>CURLOPT_TIMECONDITION</b> option.
 * Return the page only if it has been modified since the time specified in <b>CURLOPT_TIMEVALUE</b>.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_TIMECONDITION.html
 */
define('CURL_TIMECOND_IFMODSINCE', 1);
/**
 * Value for the <b>CURLOPT_TIMECONDITION</b> option.
 * Return the page if it hasn't been modified since the time specified in <b>CURLOPT_TIMEVALUE</b>.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_TIMECONDITION.html
 */
define('CURL_TIMECOND_IFUNMODSINCE', 2);
/**
 * Value for the <b>CURLOPT_TIMECONDITION</b> option.
 * @link https://www.php.net/manual/en/curl.constants.php
 */
define('CURL_TIMECOND_LASTMOD', 3);
/**
 * The HTTP authentication method(s) to use.
 * The options are: <b>CURLAUTH_BASIC</b>, <b>CURLAUTH_DIGEST</b>, <b>CURLAUTH_GSSNEGOTIATE</b>, <b>CURLAUTH_NTLM</b>, <b>CURLAUTH_ANY</b>, and <b>CURLAUTH_ANYSAFE</b>.
 * The bitwise | (or) operator can be used to combine more than one method.
 * If this is done, cURL will poll the server to see what methods it supports and pick the best one.
 * <b>CURLAUTH_ANY</b> is an alias for <b>CURLAUTH_BASIC</b> | <b>CURLAUTH_DIGEST</b> | <b>CURLAUTH_GSSNEGOTIATE</b> | <b>CURLAUTH_NTLM</b>.
 * <b>CURLAUTH_ANYSAFE</b> is an alias for <b>CURLAUTH_DIGEST</b> | <b>CURLAUTH_GSSNEGOTIATE</b> | <b>CURLAUTH_NTLM</b>.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_HTTPAUTH', 107);
/**
 * Value for the <b>CURLOPT_HTTPAUTH</b> option.
 * Allows username/password authentication.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_HTTPAUTH.html
 */
define('CURLAUTH_BASIC', 1);
/**
 * Value for the <b>CURLOPT_HTTPAUTH</b> option.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_HTTPAUTH.html
 */
define('CURLAUTH_DIGEST', 2);
/**
 * Value for the <b>CURLOPT_HTTPAUTH</b> option.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_HTTPAUTH.html
 */
define('CURLAUTH_GSSNEGOTIATE', 4);
/**
 * Value for the <b>CURLOPT_HTTPAUTH</b> option.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_HTTPAUTH.html
 */
define('CURLAUTH_NTLM', 8);
/**
 * Value for the <b>CURLOPT_HTTPAUTH</b> option.
 * Is an alias for <b>CURLAUTH_BASIC</b> | <b>CURLAUTH_DIGEST</b> | <b>CURLAUTH_GSSNEGOTIATE</b> | <b>CURLAUTH_NTLM</b>.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_HTTPAUTH.html
 */
define('CURLAUTH_ANY', -17);
/**
 * Value for the <b>CURLOPT_HTTPAUTH</b> option.
 * Is an alias for <b>CURLAUTH_DIGEST</b> | <b>CURLAUTH_GSSNEGOTIATE</b> | <b>CURLAUTH_NTLM</b>.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_HTTPAUTH.html
 */
define('CURLAUTH_ANYSAFE', -18);
/**
 * The HTTP authentication method(s) to use for the proxy connection.
 * Use the same bitmasks as described in <b>CURLOPT_HTTPAUTH</b>.
 * For proxy authentication, only <b>CURLAUTH_BASIC</b> and <b>CURLAUTH_NTLM</b> are currently supported.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_PROXYAUTH', 111);
/**
 * <b>TRUE</b> to create missing directories when an FTP operation encounters a path that currently doesn't exist.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_FTP_CREATE_MISSING_DIRS', 110);

/**
 * Any data that should be associated with this cURL handle.
 * This data can subsequently be retrieved with the <b>CURLINFO_PRIVATE</b> option of {@see curl_getinfo()}. cURL does nothing with this data.
 * When using a cURL multi handle, this private data is typically a unique key to identify a standard cURL handle.
 * @link https://php.net/manual/en/curl.constants.php
 * @since 5.2.4
 */
define('CURLOPT_PRIVATE', 10103);

/**
 * The last response code
 * @link https://php.net/manual/en/function.curl-getinfo.php
 * @since 5.5
 */
define('CURLINFO_RESPONSE_CODE', 2097154);
/**
 * The CONNECT response code
 * @link https://php.net/manual/en/function.curl-getinfo.php
 * @since 5.5
 */
define('CURLINFO_HTTP_CONNECTCODE', 2097174);
/**
 * Bitmask indicating the authentication method(s) available according to the previous response
 * @link https://php.net/manual/en/function.curl-getinfo.php
 * @since 5.5
 */
define('CURLINFO_HTTPAUTH_AVAIL', 2097175);
/**
 * Bitmask indicating the proxy authentication method(s) available according to the previous response
 * @link https://php.net/manual/en/function.curl-getinfo.php
 * @since 5.5
 */
define('CURLINFO_PROXYAUTH_AVAIL', 2097176);
/**
 * Errno from a connect failure. The number is OS and system specific.
 * @link https://php.net/manual/en/function.curl-getinfo.php
 * @since 5.5
 */
define('CURLINFO_OS_ERRNO', 2097177);
/**
 * Number of connections curl had to create to achieve the previous transfer
 * @link https://php.net/manual/en/function.curl-getinfo.php
 * @since 5.5
 */
define('CURLINFO_NUM_CONNECTS', 2097178);
/**
 * OpenSSL crypto-engines supported
 * @link https://php.net/manual/en/function.curl-getinfo.php
 * @since 5.5
 */
define('CURLINFO_SSL_ENGINES', 4194331);
/**
 * All known cookies
 * @link https://php.net/manual/en/function.curl-getinfo.php
 * @since 5.5
 */
define('CURLINFO_COOKIELIST', 4194332);
/**
 * Entry path in FTP server
 * @link https://php.net/manual/en/function.curl-getinfo.php
 * @since 5.5
 */
define('CURLINFO_FTP_ENTRY_PATH', 1048606);
/**
 * Time in seconds it took from the start until the SSL/SSH connect/handshake to the remote host was completed
 * @link https://php.net/manual/en/function.curl-getinfo.php
 * @since 5.5
 */
define('CURLINFO_APPCONNECT_TIME', 3145761);
/**
 * TLS certificate chain
 * @link https://php.net/manual/en/function.curl-getinfo.php
 * @since 5.5
 */
define('CURLINFO_CERTINFO', 4194338);
/**
 * Info on unmet time conditional
 * @link https://php.net/manual/en/function.curl-getinfo.php
 * @since 5.5
 */
define('CURLINFO_CONDITION_UNMET', 2097187);
/**
 * Next RTSP client CSeq
 * @link https://php.net/manual/en/function.curl-getinfo.php
 * @since 5.5
 */
define('CURLINFO_RTSP_CLIENT_CSEQ', 2097189);
/**
 * Recently received CSeq
 * @link https://php.net/manual/en/function.curl-getinfo.php
 * @since 5.5
 */
define('CURLINFO_RTSP_CSEQ_RECV', 2097191);
/**
 * Next RTSP server CSeq
 * @link https://php.net/manual/en/function.curl-getinfo.php
 * @since 5.5
 */
define('CURLINFO_RTSP_SERVER_CSEQ', 2097190);
/**
 * RTSP session ID
 * @link https://php.net/manual/en/function.curl-getinfo.php
 * @since 5.5
 */
define('CURLINFO_RTSP_SESSION_ID', 1048612);
/**
 * Value for the <b>CURLOPT_CLOSEPOLICY</b> option.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @removed 5.6
 */
define('CURLCLOSEPOLICY_LEAST_RECENTLY_USED', 2);
/**
 * Value for the <b>CURLOPT_CLOSEPOLICY</b> option.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @removed 5.6
 */
define('CURLCLOSEPOLICY_LEAST_TRAFFIC', 3);
/**
 * Value for the <b>CURLOPT_CLOSEPOLICY</b> option.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @removed 5.6
 */
define('CURLCLOSEPOLICY_SLOWEST', 4);
/**
 * Value for the <b>CURLOPT_CLOSEPOLICY</b> option.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @removed 5.6
 */
define('CURLCLOSEPOLICY_CALLBACK', 5);
/**
 * Value for the <b>CURLOPT_CLOSEPOLICY</b> option.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @removed 5.6
 */
define('CURLCLOSEPOLICY_OLDEST', 1);
/**
 * Last effective URL
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 */
define('CURLINFO_EFFECTIVE_URL', 1048577);
/**
 * As of PHP 5.5.0 and cURL 7.10.8, this is a legacy alias of <b>CURLINFO_RESPONSE_CODE</b>.
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 */
define('CURLINFO_HTTP_CODE', 2097154);
/**
 * Total size of all headers received
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 */
define('CURLINFO_HEADER_SIZE', 2097163);
/**
 * Total size of issued requests, currently only for HTTP requests
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 */
define('CURLINFO_REQUEST_SIZE', 2097164);
/**
 * Total transaction time in seconds for last transfer
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 */
define('CURLINFO_TOTAL_TIME', 3145731);
/**
 * Time in seconds until name resolving was complete
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 */
define('CURLINFO_NAMELOOKUP_TIME', 3145732);
/**
 * Time in seconds it took to establish the connection
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 */
define('CURLINFO_CONNECT_TIME', 3145733);
/**
 * Time in seconds from start until just before file transfer begins
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 */
define('CURLINFO_PRETRANSFER_TIME', 3145734);
/**
 * Total number of bytes uploaded
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 */
define('CURLINFO_SIZE_UPLOAD', 3145735);
/**
 * Total number of bytes downloaded
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 */
define('CURLINFO_SIZE_DOWNLOAD', 3145736);
/**
 * Average download speed
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 */
define('CURLINFO_SPEED_DOWNLOAD', 3145737);
/**
 * Average upload speed
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 */
define('CURLINFO_SPEED_UPLOAD', 3145738);
/**
 * Remote time of the retrieved document, with the <b>CURLOPT_FILETIME</b> enabled;
 * if -1 is returned the time of the document is unknown
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 */
define('CURLINFO_FILETIME', 2097166);
/**
 * Result of SSL certification verification requested by setting <b>CURLOPT_SSL_VERIFYPEER</b>
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 */
define('CURLINFO_SSL_VERIFYRESULT', 2097165);
/**
 * Content length of download, read from <em>Content-Length: field</em>
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 */
define('CURLINFO_CONTENT_LENGTH_DOWNLOAD', 3145743);
/**
 * Specified size of upload
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 */
define('CURLINFO_CONTENT_LENGTH_UPLOAD', 3145744);
/**
 * Time in seconds until the first byte is about to be transferred
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 */
define('CURLINFO_STARTTRANSFER_TIME', 3145745);
/**
 * Content-Type: of the requested document. <b>NULL</b> indicates server did not send valid Content-Type: header
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 */
define('CURLINFO_CONTENT_TYPE', 1048594);
/**
 * Time in seconds of all redirection steps before final transaction was started,
 * with the <b>CURLOPT_FOLLOWLOCATION</b> option enabled
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 */
define('CURLINFO_REDIRECT_TIME', 3145747);
/**
 * Number of redirects, with the <b>CURLOPT_FOLLOWLOCATION</b> option enabled
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 */
define('CURLINFO_REDIRECT_COUNT', 2097172);

/**
 * <b>TRUE</b> to track the handle's request string
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 * @since 5.1.3
 */
define('CURLINFO_HEADER_OUT', 2);

/**
 * Private data associated with this cURL handle, previously set with the <b>CURLOPT_PRIVATE</b> option of {@see curl_getinfo()}
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 * @since 5.2.4
 */
define('CURLINFO_PRIVATE', 1048597);
/**
 * Supports IPv6
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURL_VERSION_IPV6', 1);
/**
 * Supports Kerberos V4 (when using FTP)
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURL_VERSION_KERBEROS4', 2);
/**
 * Supports SSL (HTTPS/FTPS)
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURL_VERSION_SSL', 4);
/**
 * Supports HTTP deflate using libz
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURL_VERSION_LIBZ', 8);
/**
 * Will be the most recent age value for the libcurl.
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURLVERSION_NOW', 10);
/**
 * All fine. Proceed as usual.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_OK', 0);
/**
 * The URL you passed to libcurl used a protocol that this libcurl does not support.
 * The support might be a compile-time option that you didn't use,
 * it can be a misspelled protocol string or just a protocol libcurl has no code for.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_UNSUPPORTED_PROTOCOL', 1);
/**
 * Very early initialization code failed.
 * This is likely to be an internal error or problem,
 * or a resource problem where something fundamental couldn't get done at init time.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_FAILED_INIT', 2);
/**
 * The URL was not properly formatted.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_URL_MALFORMAT', 3);
/**
 * A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_URL_MALFORMAT_USER', 4);
/**
 * Couldn't resolve proxy. The given proxy host could not be resolved.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_COULDNT_RESOLVE_PROXY', 5);
/**
 * Couldn't resolve host. The given remote host was not resolved.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_COULDNT_RESOLVE_HOST', 6);
/**
 * Failed to connect to host or proxy.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_COULDNT_CONNECT', 7);
/**
 * The server sent data libcurl couldn't parse.
 * This error code was known as as <b>CURLE_FTP_WEIRD_SERVER_REPLY</b> before 7.51.0.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_FTP_WEIRD_SERVER_REPLY', 8);
/**
 * We were denied access to the resource given in the URL.
 * For FTP, this occurs while trying to change to the remote directory.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_FTP_ACCESS_DENIED', 9);
/**
 * While waiting for the server to connect back when an active FTP session is used,
 * an error code was sent over the control connection or similar.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_FTP_USER_PASSWORD_INCORRECT', 10);
/**
 * After having sent the FTP password to the server, libcurl expects a proper reply.
 * This error code indicates that an unexpected code was returned.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_FTP_WEIRD_PASS_REPLY', 11);
/**
 * During an active FTP session while waiting for the server to connect,
 * the <b>CURLOPT_ACCEPTTIMEOUT_MS</b> (or the internal default) timeout expired.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_FTP_WEIRD_USER_REPLY', 12);
/**
 * Libcurl failed to get a sensible result back from the server as a response to either a PASV or a EPSV command.
 * The server is flawed.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_FTP_WEIRD_PASV_REPLY', 13);
/**
 * FTP servers return a 227-line as a response to a PASV command.
 * If libcurl fails to parse that line, this return code is passed back.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_FTP_WEIRD_227_FORMAT', 14);
/**
 * An internal failure to lookup the host used for the new connection.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_FTP_CANT_GET_HOST', 15);
/**
 * A problem was detected in the HTTP2 framing layer.
 * This is somewhat generic and can be one out of several problems, see the error buffer for details.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_FTP_CANT_RECONNECT', 16);
/**
 * Received an error when trying to set the transfer mode to binary or ASCII.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_FTP_COULDNT_SET_BINARY', 17);
/**
 * A file transfer was shorter or larger than expected.
 * This happens when the server first reports an expected transfer size, and then delivers data
 * that doesn't match the previously given size.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_PARTIAL_FILE', 18);
/**
 * This was either a weird reply to a 'RETR' command or a zero byte transfer complete.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_FTP_COULDNT_RETR_FILE', 19);
/**
 * After a completed file transfer, the FTP server did not respond a proper
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURLE_FTP_WRITE_ERROR', 20);
/**
 * When sending custom "QUOTE" commands to the remote server,
 * one of the commands returned an error code that was 400 or higher (for FTP) or otherwise indicated unsuccessful completion of the command.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_FTP_QUOTE_ERROR', 21);
/**
 * This is returned if <b>CURLOPT_FAILONERROR</b> is set <b>TRUE</b> and the HTTP server returns an error code that is >= 400.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_HTTP_NOT_FOUND', 22);
/**
 * An error occurred when writing received data to a local file, or an error was returned to libcurl from a write callback.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_WRITE_ERROR', 23);
/**
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURLE_MALFORMAT_USER', 24);
/**
 * Failed starting the upload. For FTP, the server typically denied the STOR command.
 * The error buffer usually contains the server's explanation for this.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_FTP_COULDNT_STOR_FILE', 25);
/**
 * There was a problem reading a local file or an error returned by the read callback.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_READ_ERROR', 26);
/**
 * A memory allocation request failed. This is serious badness and things are severely screwed up if this ever occurs.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_OUT_OF_MEMORY', 27);
/**
 * Operation timeout. The specified time-out period was reached according to the conditions.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_OPERATION_TIMEOUTED', 28);
/**
 * libcurl failed to set ASCII transfer type (TYPE A).
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURLE_FTP_COULDNT_SET_ASCII', 29);
/**
 * The FTP PORT command returned error.
 * This mostly happens when you haven't specified a good enough address for libcurl to use. See <b>CURLOPT_FTPPORT</b>.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_FTP_PORT_FAILED', 30);
/**
 * The FTP REST command returned error. This should never happen if the server is sane.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_FTP_COULDNT_USE_REST', 31);
/**
 * The FTP SIZE command returned error. SIZE is not a kosher FTP command,
 * it is an extension and not all servers support it.
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURLE_FTP_COULDNT_GET_SIZE', 32);
/**
 * The server does not support or accept range requests.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_HTTP_RANGE_ERROR', 33);
/**
 * This is an odd error that mainly occurs due to internal confusion.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_HTTP_POST_ERROR', 34);
/**
 * A problem occurred somewhere in the SSL/TLS handshake.
 * You really want the error buffer and read the message there as it pinpoints the problem slightly more.
 * Could be certificates (file formats, paths, permissions), passwords, and others.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_SSL_CONNECT_ERROR', 35);
/**
 * The download could not be resumed because the specified offset was out of the file boundary.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_FTP_BAD_DOWNLOAD_RESUME', 36);
/**
 * A file given with <em>FILE://</em> couldn't be opened.
 * Most likely because the file path doesn't identify an existing file. Did you check file permissions?
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_FILE_COULDNT_READ_FILE', 37);
/**
 * LDAP cannot bind. LDAP bind operation failed.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_LDAP_CANNOT_BIND', 38);
/**
 * LDAP search failed.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_LDAP_SEARCH_FAILED', 39);
/**
 * Library not found. The LDAP library was not found.
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURLE_LIBRARY_NOT_FOUND', 40);
/**
 * Function not found. A required zlib function was not found.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_FUNCTION_NOT_FOUND', 41);
/**
 * Aborted by callback. A callback returned "abort" to libcurl.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_ABORTED_BY_CALLBACK', 42);
/**
 * A function was called with a bad parameter.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_BAD_FUNCTION_ARGUMENT', 43);
/**
 * This is never returned
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURLE_BAD_CALLING_ORDER', 44);
/**
 * Interface error. A specified outgoing interface could not be used.
 * Set which interface to use for outgoing connections' source IP address with <b>CURLOPT_INTERFACE</b>.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_HTTP_PORT_FAILED', 45);
/**
 * This is never returned
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURLE_BAD_PASSWORD_ENTERED', 46);
/**
 * Too many redirects. When following redirects, libcurl hit the maximum amount.
 * Set your limit with <b>CURLOPT_MAXREDIRS</b>.
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_TOO_MANY_REDIRECTS', 47);
/**
 * An option passed to libcurl is not recognized/known. Refer to the appropriate documentation.
 * This is most likely a problem in the program that uses libcurl.
 * The error buffer might contain more specific information about which exact option it concerns.
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_UNKNOWN_TELNET_OPTION', 48);
/**
 * A telnet option string was Illegally formatted.
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_TELNET_OPTION_SYNTAX', 49);
/**
 * Currently unused.
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURLE_OBSOLETE', 50);
/**
 * The remote server's SSL certificate or SSH md5 fingerprint was deemed not OK.
 * This error code has been unified with <b>CURLE_SSL_CACERT</b> since 7.62.0. Its previous value was 51.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_SSL_PEER_CERTIFICATE', 60);
/**
 * Nothing was returned from the server, and under the circumstances, getting nothing is considered an error.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_GOT_NOTHING', 52);
/**
 * The specified crypto engine wasn't found.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_SSL_ENGINE_NOTFOUND', 53);
/**
 * Failed setting the selected SSL crypto engine as default!
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_SSL_ENGINE_SETFAILED', 54);
/**
 * Failed sending network data.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_SEND_ERROR', 55);
/**
 * Failure with receiving network data.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_RECV_ERROR', 56);
/**
 * The share object is currently in use.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_SHARE_IN_USE', 57);
/**
 * Problem with the local client certificate.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_SSL_CERTPROBLEM', 58);
/**
 * Couldn't use specified cipher.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_SSL_CIPHER', 59);
/**
 * The remote server's SSL certificate or SSH md5 fingerprint was deemed not OK.
 * This error code has been unified with <b>CURLE_SSL_PEER_CERTIFICATE</b> since 7.62.0.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_SSL_CACERT', 60);
/**
 * Unrecognized transfer encoding.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_BAD_CONTENT_ENCODING', 61);
/**
 * Invalid LDAP URL.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_LDAP_INVALID_URL', 62);
/**
 * Maximum file size exceeded.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_FILESIZE_EXCEEDED', 63);
/**
 * Requested FTP SSL level failed.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLE_FTP_SSL_FAILED', 64);
/**
 * Value for the <b>CURLOPT_PROXYTYPE</b> option.
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURLPROXY_HTTP', 0);
/**
 * Value for the <b>CURLOPT_PROXYTYPE</b> option.
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURLPROXY_SOCKS4', 4);
/**
 * Value for the <b>CURLOPT_PROXYTYPE</b> option.
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURLPROXY_SOCKS5', 5);
/**
 * Value for the <b>CURLOPT_NETRC</b> option.
 * The use of the ~/.netrc file is optional, and information in the URL is to be preferred.
 * The file will be scanned for the host and user name (to find the password only) or for the host only,
 * to find the first user name and password after that machine, which ever information is not specified.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_NETRC.html
 */
define('CURL_NETRC_OPTIONAL', 1);
/**
 * Value for the <b>CURLOPT_NETRC</b> option.
 * The library will ignore the ~/.netrc file. This is the default.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_NETRC.html
 */
define('CURL_NETRC_IGNORED', 0);
/**
 * Value for the <b>CURLOPT_NETRC</b> option.
 * The use of the ~/.netrc file is required, and information in the URL is to be ignored.
 * The file will be scanned for the host and user name (to find the password only) or for the host only,
 * to find the first user name and password after that machine, which ever information is not specified.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_NETRC.html
 */
define('CURL_NETRC_REQUIRED', 2);
/**
 * Value for the <b>CURLOPT_HTTP_VERSION</b> option.
 * Let's CURL decide which version to use.
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURL_HTTP_VERSION_NONE', 0);
/**
 * Value for the <b>CURLOPT_HTTP_VERSION</b> option.
 * Forces HTTP/1.0.
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURL_HTTP_VERSION_1_0', 1);
/**
 * Value for the <b>CURLOPT_HTTP_VERSION</b> option.
 * Forces HTTP/1.1.
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURL_HTTP_VERSION_1_1', 2);
/**
 * Value for the <b>CURLOPT_HTTP_VERSION</b> option.
 * Attempts HTTP 2.
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURL_HTTP_VERSION_2_0', 3);
/**
 * This is not really an error. It means you should call {@see curl_multi_exec()} again without doing select() or similar in between.
 * Before version 7.20.0 this could be returned by {@see curl_multi_exec()}, but in later versions this return code is never used.
 * @link https://www.php.net/manual/en/function.curl-multi-exec.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLM_CALL_MULTI_PERFORM', -1);
/**
 * Things are fine.
 * @link https://www.php.net/manual/en/function.curl-multi-exec.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLM_OK', 0);
/**
 * The passed-in handle is not a valid CURLM handle.
 * @link https://www.php.net/manual/en/function.curl-multi-exec.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLM_BAD_HANDLE', 1);
/**
 * An easy handle was not good/valid. It could mean that it isn't an easy handle at all,
 * or possibly that the handle already is in use by this or another multi handle.
 * @link https://www.php.net/manual/en/function.curl-multi-exec.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLM_BAD_EASY_HANDLE', 2);
/**
 * Out of memory error.
 * @link https://www.php.net/manual/en/function.curl-multi-exec.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLM_OUT_OF_MEMORY', 3);
/**
 * libcurl' internal error.
 * @link https://www.php.net/manual/en/function.curl-multi-exec.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define('CURLM_INTERNAL_ERROR', 4);
/**
 * The message identifies a transfer that is done, and then result contains the return code for the easy handle that just completed.
 * Other return values are currently not available.
 * @link https://www.php.net/manual/en/function.curl-multi-info-read.php
 * @link https://curl.haxx.se/libcurl/c/curl_multi_info_read.html
 */
define('CURLMSG_DONE', 1);

/**
 * The FTP authentication method (when is activated):
 * <b>CURLFTPAUTH_SSL</b> (try SSL first), <b>CURLFTPAUTH_TLS</b> (try TLS first), or <b>CURLFTPAUTH_DEFAULT</b> (let cURL decide).
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURLOPT_FTPSSLAUTH', 129);

/**
 * Value for the <b>CURLOPT_FTPSSLAUTH</b> option.
 * Let cURL decide FTP authentication method.
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURLFTPAUTH_DEFAULT', 0);

/**
 * Value for the <b>CURLOPT_FTPSSLAUTH</b> option.
 * Try SSL first as FTP authentication method.
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURLFTPAUTH_SSL', 1);

/**
 * Value for the <b>CURLOPT_FTPSSLAUTH</b> option.
 * Try TLS first as FTP authentication method.
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURLFTPAUTH_TLS', 2);

/**
 * @link https://php.net/manual/en/curl.constants.php
 * @deprecated use <b>CURLOPT_USE_SSL</b> instead.
 */
define('CURLOPT_FTP_SSL', 119);

/**
 * Value for the <b>CURLOPT_FTP_SSL</b> option.
 * Don't attempt to use SSL.
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURLFTPSSL_NONE', 0);

/**
 * Value for the <b>CURLOPT_FTP_SSL</b> option.
 * Try using SSL, proceed as normal otherwise.
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURLFTPSSL_TRY', 1);

/**
 * Value for the <b>CURLOPT_FTP_SSL</b> option.
 * Require SSL for the control connection or fail.
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURLFTPSSL_CONTROL', 2);

/**
 * Value for the <b>CURLOPT_FTP_SSL</b> option.
 * Require SSL for all communication or fail.
 * @link https://php.net/manual/en/curl.constants.php
 */
define('CURLFTPSSL_ALL', 3);
/**
 * Tell curl which method to use to reach a file on a FTP(S) server.
 * Possible values are <b>CURLFTPMETHOD_MULTICWD</b>, <b>CURLFTPMETHOD_NOCWD</b> and <b>CURLFTPMETHOD_SINGLECWD</b>.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 5.3
 */
define('CURLOPT_FTP_FILEMETHOD', 138);
/**
 * Ignore the IP address in the PASV response
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_FTP_SKIP_PASV_IP.html
 */
define('CURLOPT_FTP_SKIP_PASV_IP', 137);
/**
 * <b>TRUE</b> to disable support for the @ prefix for uploading files in <b>CURLOPT_POSTFIELDS</b>,
 * which means that values starting with @ can be safely passed as fields.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 5.5
 * @deprecated 7.0 Use <b>CURLFile</b> for uploads instead.
 */
define('CURLOPT_SAFE_UPLOAD', -1);
/**
 * Value for the <b>CURLOPT_FTP_FILEMETHOD</b> option.
 * libcurl does a single CWD operation for each path part in the given URL.
 * For deep hierarchies this means many commands. This is how RFC 1738 says it should be done. This is the default but the slowest behavior.
 * @link https://www.php.net/manual/en/curl.constants.php
 */
define('CURLFTPMETHOD_MULTICWD', 1);
/**
 * Value for the <b>CURLOPT_FTP_FILEMETHOD</b> option.
 * libcurl does no CWD at all.
 * libcurl will do SIZE, RETR, STOR etc and give a full path to the server for all these commands. This is the fastest behavior.
 * @link https://www.php.net/manual/en/curl.constants.php
 */
define('CURLFTPMETHOD_NOCWD', 2);
/**
 * Value for the <b>CURLOPT_FTP_FILEMETHOD</b> option.
 * libcurl does one CWD with the full target directory and then operates on the file "normally" (like in the multicwd case).
 * This is somewhat more standards compliant than 'nocwd' but without the full penalty of 'multicwd'.
 * @link https://www.php.net/manual/en/curl.constants.php
 */
define('CURLFTPMETHOD_SINGLECWD', 3);

 /**
  * Value for the <b>CURLOPT_PROTOCOLS</b> option.
  * @link https://www.php.net/manual/en/function.curl-setopt.php
  */
 define('CURLPROTO_HTTP', 1);
/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLPROTO_HTTPS', 2);
/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLPROTO_FTP', 4);
/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLPROTO_FTPS', 8);
/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLPROTO_SCP', 16);
/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLPROTO_SFTP', 32);
/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLPROTO_TELNET', 64);
/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLPROTO_LDAP', 128);
/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLPROTO_LDAPS', 256);
/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLPROTO_DICT', 512);
/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLPROTO_FILE', 1024);
/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLPROTO_TFTP', 2048);
/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLPROTO_ALL', -1);

/**
 * As of cURL 7.43.0, the value is a bitmask.
 * Pass 1 to enable or 0 to disable.
 * Enabling pipelining on a multi handle will make it attempt to perform HTTP Pipelining as far as possible for transfers
 * using this handle. This means that if you add a second request that can use an already existing connection,
 * the second request will be "piped" on the same connection.
 * Pass 2 to try to multiplex the new transfer over an existing HTTP/2 connection if possible.
 * Pass 3 instructs cURL to ask for pipelining and multiplexing independently of each other.
 * As of cURL 7.62.0, setting the pipelining bit has no effect.
 * Instead of integer literals, you can also use the <b>CURLPIPE_*</b> constants if available.
 * @link https://www.php.net/manual/en/function.curl-multi-setopt.php
 * @since 5.5
 */
define('CURLMOPT_PIPELINING', 3);

/**
 * Pass a number that will be used as the maximum amount of simultaneously open connections that libcurl may cache.
 * By default the size will be enlarged to fit four times the number of handles added via {@see curl_multi_add_handle()}.
 * When the cache is full, curl closes the oldest one in the cache to prevent the number of open connections from increasing.
 * @link https://www.php.net/manual/en/function.curl-multi-setopt.php
 * @since 5.5
 */
define('CURLMOPT_MAXCONNECTS', 6);
/**
 * Specifies a type of data that should be shared.
 * @link https://www.php.net/manual/en/function.curl-share-setopt.php
 */
define('CURLSHOPT_SHARE', 1);
/**
 * Specifies a type of data that will be no longer shared.
 * @link https://www.php.net/manual/en/function.curl-share-setopt.php
 */
define('CURLSHOPT_UNSHARE', 2);
/**
 * Value for the <b>CURLSHOPT_SHARE</b> option.
 * Shares cookie data.
 * @link https://www.php.net/manual/en/function.curl-share-setopt.php
 */
define('CURL_LOCK_DATA_COOKIE', 2);
/**
 * Value for the <b>CURLSHOPT_SHARE</b> option.
 * Shares DNS cache. Note that when you use cURL multi handles,
 * all handles added to the same multi handle will share DNS cache by default.
 * @link https://www.php.net/manual/en/function.curl-share-setopt.php
 */
define('CURL_LOCK_DATA_DNS', 3);
/**
 * Value for the <b>CURLSHOPT_SHARE</b> option.
 * Shares SSL session IDs, reducing the time spent on the SSL handshake when reconnecting to the same server.
 * Note that SSL session IDs are reused within the same handle by default.
 * @link https://www.php.net/manual/en/function.curl-share-setopt.php
 */
define('CURL_LOCK_DATA_SSL_SESSION', 4);
/**
 * The password required to use the <b>CURLOPT_SSLKEY</b> or <b>CURLOPT_SSH_PRIVATE_KEYFILE</b> private key.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define('CURLOPT_KEYPASSWD', 10026);

/**
 * Value for the <b>CURLOPT_FTP_CREATE_MISSING_DIRS</b> option.
 * libcurl will attempt to create any remote directory that it fails to "move" into.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_FTP_CREATE_MISSING_DIRS.html
 * @since 7.0.7
 */
define('CURLFTP_CREATE_DIR', 1);

/**
 * Value for the <b>CURLOPT_FTP_CREATE_MISSING_DIRS</b> option.
 * libcurl will not attempt to create any remote directory that it fails to "move" into.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_FTP_CREATE_MISSING_DIRS.html
 * @since 7.0.7
 */
define('CURLFTP_CREATE_DIR_NONE', 0);

/**
 * Value for the <b>CURLOPT_HTTPAUTH</b> option.
 * NTLM delegating to winbind helper.
 * Authentication is performed by a separate binary application that is executed when needed.
 * The name of the application is specified at compile time but is typically <em>/usr/bin/ntlm_auth</em>.
 * @link https://php.net/manual/en/curl.constants.php
 * @since 7.0.7
 */
define('CURLAUTH_NTLM_WB', 32);

/**
 * Value for the <b>CURLOPT_HTTP_VERSION</b> option.
 * Alias of <b>CURL_HTTP_VERSION_2_0</b>
 * Attempts HTTP 2
 * @link https://php.net/manual/en/curl.constants.php
 * @since 7.0.7
 */
define('CURL_HTTP_VERSION_2', 3);

/**
 * Value for the <b>CURLOPT_HTTP_VERSION</b> option.
 * Attempts HTTP 2 over TLS (HTTPS) only
 * @link https://php.net/manual/en/curl.constants.php
 * @since 7.0.7
 */
define('CURL_HTTP_VERSION_2TLS', 4);

/**
 * Value for the <b>CURLOPT_HTTP_VERSION</b> option.
 * Issues non-TLS HTTP requests using HTTP/2 without HTTP/1.1 Upgrade
 * @link https://php.net/manual/en/curl.constants.php
 * @since 7.0.7
 */
define('CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE', 5);

/**
 * <b>TRUE</b> to enable sending the initial response in the first packet.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.0.7
 */
define('CURLOPT_SASL_IR', 218);

/**
 * Set the name of the network interface that the DNS resolver should bind to. This must be an interface name (not an address).
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.0.7
 */
define('CURLOPT_DNS_INTERFACE', 10221);

/**
 * Set the local IPv4 address that the resolver should bind to. The argument should contain a single numerical IPv4 address as a string.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.0.7
 */
define('CURLOPT_DNS_LOCAL_IP4', 10222);

/**
 * Set the local IPv6 address that the resolver should bind to. The argument should contain a single numerical IPv6 address as a string.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.0.7
 */
define('CURLOPT_DNS_LOCAL_IP6', 10223);

/**
 * Specifies the OAuth 2.0 access token.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.0.7
 */
define('CURLOPT_XOAUTH2_BEARER', 10220);

/**
 * Can be used to set protocol specific login options, such as the preferred authentication mechanism via "<em>AUTH=NTLM</em>" or "<em>AUTH=*</em>",
 * and should be used in conjunction with the <b>CURLOPT_USERNAME</b> option.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.0.7
 */
define('CURLOPT_LOGIN_OPTIONS', 10224);

/**
 * The timeout for Expect: 100-continue responses in milliseconds. Defaults to 1000 milliseconds.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.0.7
 */
define('CURLOPT_EXPECT_100_TIMEOUT_MS', 227);

/**
 * <b>FALSE</b> to disable ALPN in the SSL handshake (if the SSL backend libcurl is built to use supports it),
 * which can be used to negotiate http2.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.0.7
 */
define('CURLOPT_SSL_ENABLE_ALPN', 226);

/**
 * <b>FALSE</b> to disable NPN in the SSL handshake (if the SSL backend libcurl is built to use supports it),
 * which can be used to negotiate http2.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.0.7
 */
define('CURLOPT_SSL_ENABLE_NPN', 225);

/**
 * Set the pinned public key. The string can be the file name of your pinned public key. The file format expected is "<em>PEM</em>" or "<em>DER</em>".
 * The string can also be any number of base64 encoded sha256 hashes preceded by "sha256//" and separated by ";".
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.0.7
 */
define('CURLOPT_PINNEDPUBLICKEY', 10230);

/**
 * Enables the use of Unix domain sockets as connection endpoint and sets the path to the given string.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.0.7
 */
define('CURLOPT_UNIX_SOCKET_PATH', 10231);

/**
 * <b>TRUE</b> to verify the certificate's status.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.0.7
 */
define('CURLOPT_SSL_VERIFYSTATUS', 232);

/**
 * <b>TRUE</b> to not handle dot dot sequences.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.0.7
 */
define('CURLOPT_PATH_AS_IS', 234);

/**
 * <b>TRUE</b> to enable TLS false start.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.0.7
 */
define('CURLOPT_SSL_FALSESTART', 233);

/**
 * <b>TRUE</b> to wait for pipelining/multiplexing.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.0.7
 */
define('CURLOPT_PIPEWAIT', 237);

/**
 * The proxy authentication service name.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.0.7
 */
define('CURLOPT_PROXY_SERVICE_NAME', 10235);

/**
 * The authentication service name.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.0.7
 */
define('CURLOPT_SERVICE_NAME', 10236);

/**
 * Value for the <b>CURLOPT_SSH_AUTH_TYPES</b> option.
 * libcurl attempts to connect to ssh-agent or pageant and let the agent attempt the authentication.
 * @link https://php.net/manual/en/curl.constants.php
 * @since 7.0.7
 */
define('CURLSSH_AUTH_AGENT', 16);

/**
 * Value for the <b>CURLMOPT_PIPELINING</b> option.
 * Default, which means doing no attempts at pipelining or multiplexing.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/CURLMOPT_PIPELINING.html
 * @since 7.0.7
 */
define('CURLPIPE_NOTHING', 0);

/**
 * Value for the <b>CURLMOPT_PIPELINING</b> option.
 * If this bit is set, libcurl will try to pipeline HTTP/1.1 requests on connections that are already established and in use to hosts.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/CURLMOPT_PIPELINING.html
 * @deprecated 7.4
 * @since 7.0.7
 */
define('CURLPIPE_HTTP1', 1);

/**
 * Value for the <b>CURLMOPT_PIPELINING</b> option.
 * If this bit is set, libcurl will try to multiplex the new transfer over an existing connection if possible. This requires HTTP/2.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/CURLMOPT_PIPELINING.html
 * @since 7.0.7
 */
define('CURLPIPE_MULTIPLEX', 2);

/**
 * Value for the <b>CURLOPT_HEADEROPT</b> option.
 * Makes <b>CURLOPT_HTTPHEADER</b> headers only get sent to a server and not to a proxy.
 * Proxy headers must be set with <b>CURLOPT_PROXYHEADER</b> to get used.
 * @link https://php.net/manual/en/curl.constants.php
 * @since 7.0.7
 */
define('CURLHEADER_SEPARATE', 1);

/**
 * Value for the <b>CURLOPT_HEADEROPT</b> option.
 * The headers specified in <b>CURLOPT_HTTPHEADER</b> will be used in requests both to servers and proxies.
 * With this option enabled, <b>CURLOPT_PROXYHEADER</b> will not have any effect.
 * @link https://php.net/manual/en/curl.constants.php
 * @since 7.0.7
 */
define('CURLHEADER_UNIFIED', 0);

/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://php.net/manual/en/curl.constants.php
 * @since 7.0.7
 */
define('CURLPROTO_SMB', 67108864);

/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://php.net/manual/en/curl.constants.php
 * @since 7.0.7
 */
define('CURLPROTO_SMBS', 134217728);

/**
 * How to deal with headers.
 * One of the following constants:
 *  <b>CURLHEADER_UNIFIED</b>: the headers specified in <b>CURLOPT_HTTPHEADER</b> will be used in requests both to servers and proxies.
 *   With this option enabled, <b>CURLOPT_PROXYHEADER</b> will not have any effect.
 *  <b>CURLHEADER_SEPARATE</b>: makes <b>CURLOPT_HTTPHEADER</b> headers only get sent to a server and not to a proxy.
 *   Proxy headers must be set with <b>CURLOPT_PROXYHEADER</b> to get used.
 *   Note that if a non-CONNECT request is sent to a proxy, libcurl will send both server headers and proxy headers.
 *   When doing CONNECT, libcurl will send <b>CURLOPT_PROXYHEADER</b> headers only to the proxy and then <b>CURLOPT_HTTPHEADER</b> headers only to the server.
 *  Defaults to <b>CURLHEADER_SEPARATE</b> as of cURL 7.42.1, and <b>CURLHEADER_UNIFIED</b> before.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.0.7
 */
define('CURLOPT_HEADEROPT', 229);

/**
 * An array of custom HTTP headers to pass to proxies.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.0.7
 */
define('CURLOPT_PROXYHEADER', 10228);

/**
 * Value for the <b>CURLOPT_POSTREDIR</b> option.
 * @link https://php.net/manual/en/curl.constants.php
 * @since 7.0.7
 */
define('CURL_REDIR_POST_301', 1);

/**
 * Value for the <b>CURLOPT_POSTREDIR</b> option.
 * @link https://php.net/manual/en/curl.constants.php
 * @since 7.0.7
 */
define('CURL_REDIR_POST_302', 2);

/**
 * Value for the <b>CURLOPT_POSTREDIR</b> option.
 * @link https://php.net/manual/en/curl.constants.php
 * @since 7.0.7
 */
define('CURL_REDIR_POST_303', 4);

/**
 * Value for the <b>CURLOPT_PROXYTYPE</b> option.
 * @link https://php.net/manual/en/curl.constants.php
 * @since 7.0.7
 */
define('CURLPROXY_HTTP_1_0', 1);
/**
 * Value for the <b>CURLOPT_POSTREDIR</b> option.
 * @link https://php.net/manual/en/curl.constants.php
 * @since 7.0.7
 */
define('CURL_REDIR_POST_ALL', 7);

/**
 * Pass a number that specifies the chunk length threshold for pipelining in bytes.
 * @link https://www.php.net/manual/en/function.curl-multi-setopt.php
 * @since 7.0.7
 */
define('CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE', 30010);

/**
 * Pass a number that specifies the size threshold for pipelining penalty in bytes.
 * @link https://www.php.net/manual/en/function.curl-multi-setopt.php
 * @since 7.0.7
 */
define('CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE', 30009);

/**
 * Pass a number that specifies the maximum number of connections to a single host.
 * @link https://www.php.net/manual/en/function.curl-multi-setopt.php
 * @since 7.0.7
 */
define('CURLMOPT_MAX_HOST_CONNECTIONS', 7);

/**
 * Pass a number that specifies the maximum number of requests in a pipeline.
 * @link https://www.php.net/manual/en/function.curl-multi-setopt.php
 * @since 7.0.7
 */
define('CURLMOPT_MAX_PIPELINE_LENGTH', 8);

/**
 * Pass a number that specifies the maximum number of simultaneously open connections.
 * @link https://www.php.net/manual/en/function.curl-multi-setopt.php
 * @since 7.0.7
 */
define('CURLMOPT_MAX_TOTAL_CONNECTIONS', 13);

/**
 * Value for the <b>CURLOPT_FTP_CREATE_MISSING_DIRS</b> option.
 * libcurl will not attempt to create any remote directory that it fails to "move" into.
 * Tells libcurl to retry the CWD command again if the subsequent MKD command fails.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_FTP_CREATE_MISSING_DIRS.html
 * @since 7.0.7
 */
define('CURLFTP_CREATE_DIR_RETRY', 2);

/**
 * Value for the <b>CURLOPT_HTTPAUTH</b> option.
 * HTTP Negotiate (SPNEGO) authentication
 * @link https://php.net/manual/en/curl.constants.php
 * @since 7.0.7
 */
define('CURLAUTH_NEGOTIATE', 4);

/**
 * Pass a <em>callable</em> that will be registered to handle server pushes and should have the following signature:
 *  <b>parent_ch</b>
 *   The parent cURL handle (the request the client made).
 *  <b>pushed_ch</b>
 *   A new cURL handle for the pushed request.
 *  <b>headers</b>
 *   The push promise headers.
 *   The push function is supposed to return either <b>CURL_PUSH_OK</b> if it can handle the push,
 *   or <b>CURL_PUSH_DENY</b> to reject it.
 * @link https://www.php.net/manual/en/function.curl-multi-setopt.php
 * @since 7.1
 */
define('CURLMOPT_PUSHFUNCTION', 20014);

/**
 * Returned value from the push function - can handle the push.
 * @link https://www.php.net/manual/en/function.curl-multi-setopt.php
 * @since 7.1
 */
define('CURL_PUSH_OK', 0);

/**
 * Returned value from the push function - can't handle the push.
 * @link https://www.php.net/manual/en/function.curl-multi-setopt.php
 * @since 7.1
 */
define('CURL_PUSH_DENY', 1);

/**
 * The default buffer size for <b>CURLOPT_BUFFERSIZE</b>
 * @link https://php.net/manual/en/curl.constants.php
 * @since 7.0.7
 */
define('CURL_MAX_READ_SIZE', 10485760);

/**
 * Enables the use of an abstract Unix domain socket instead of establishing a TCP connection to a host and sets the path to the given string.
 * This option shares the same semantics as <b>CURLOPT_UNIX_SOCKET_PATH</b>.
 * These two options share the same storage and therefore only one of them can be set per handle.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_ABSTRACT_UNIX_SOCKET', 10264);

/**
 * Value for the <b>CURLOPT_SSLVERSION</b> option.
 * @link https://php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURL_SSLVERSION_MAX_DEFAULT', 65536);

/**
 * Value for the <b>CURLOPT_SSLVERSION</b> option.
 * @link https://php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURL_SSLVERSION_MAX_NONE', 0);

/**
 * Value for the <b>CURLOPT_SSLVERSION</b> option.
 * @link https://php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURL_SSLVERSION_MAX_TLSv1_0', 262144);

/**
 * Value for the <b>CURLOPT_SSLVERSION</b> option.
 * @link https://php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURL_SSLVERSION_MAX_TLSv1_1', 327680);

/**
 * Value for the <b>CURLOPT_SSLVERSION</b> option.
 * @link https://php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURL_SSLVERSION_MAX_TLSv1_2', 393216);

/**
 * Value for the <b>CURLOPT_SSLVERSION</b> option.
 * @link https://php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURL_SSLVERSION_MAX_TLSv1_3', 458752);

/**
 * <b>TRUE</b> to suppress proxy CONNECT response headers from the user callback functions
 * <b>CURLOPT_HEADERFUNCTION</b> and <b>CURLOPT_WRITEFUNCTION</b>,
 * when <b>CURLOPT_HTTPPROXYTUNNEL</b> is used and a <em>CONNECT</em> request is made.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_SUPPRESS_CONNECT_HEADERS', 265);

/**
 * Value for the <b>CURLOPT_HTTPAUTH</b> option.
 * Allows GSS-API authentication.
 * @link https://php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURLAUTH_GSSAPI', 4);

/**
 * The content-length of the download. This is the value read from the Content-Type: field. -1 if the size isn't known
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 * @since 7.3
 */
define('CURLINFO_CONTENT_LENGTH_DOWNLOAD_T', 6291471);

/**
 * The specified size of the upload. -1 if the size isn't known
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 * @since 7.3
 */
define('CURLINFO_CONTENT_LENGTH_UPLOAD_T', 6291472);

/**
 * Total number of bytes that were downloaded.
 * The number is only for the latest transfer and will be reset again for each new transfer
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 * @since 7.3
 */
define('CURLINFO_SIZE_DOWNLOAD_T', 6291464);

/**
 * Total number of bytes that were uploaded
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 * @since 7.3
 */
define('CURLINFO_SIZE_UPLOAD_T', 6291463);

/**
 * The average download speed in bytes/second that curl measured for the complete download
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 * @since 7.3
 */
define('CURLINFO_SPEED_DOWNLOAD_T', 6291465);

/**
 * The average upload speed in bytes/second that curl measured for the complete upload
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 * @since 7.3
 */
define('CURLINFO_SPEED_UPLOAD_T', 6291466);

/**
 * Specify an alternative target for this request
 * @link https://www.php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_REQUEST_TARGET.html
 * @since 7.3
 */
define('CURLOPT_REQUEST_TARGET', 10266);

/**
 * The SOCKS5 authentication method(s) to use. The options are: <b>CURLAUTH_BASIC</b>, <b>CURLAUTH_GSSAPI</b>, <b>CURLAUTH_NONE</b>.
 * The bitwise | (or) operator can be used to combine more than one method. If this is done,
 * cURL will poll the server to see what methods it supports and pick the best one.
 * <b>CURLAUTH_BASIC</b> allows username/password authentication.
 * <b>CURLAUTH_GSSAPI</b> allows GSS-API authentication.
 * <b>CURLAUTH_NONE</b> allows no authentication.
 * Defaults to <b>CURLAUTH_BASIC</b>|<b>CURLAUTH_GSSAPI</b>.
 * Set the actual username and password with the <b>CURLOPT_PROXYUSERPWD</b> option.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_SOCKS5_AUTH', 267);

/**
 * <b>TRUE</b> to enable built-in SSH compression. This is a request, not an order; the server may or may not do it.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_SSH_COMPRESSION', 268);

/**
 * libcurl was build with multiple ssh backends.
 * @link https://php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURL_VERSION_MULTI_SSL', 4194304);

/**
 * Supports HTTP Brotli content encoding using libbrotlidec
 * @link https://php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURL_VERSION_BROTLI', 8388608);

/**
 * Value for the <b>CURLSHOPT_SHARE</b> option.
 * Put the connection cache in the share object and make all easy handles using this share object share the connection cache.
 * Using this, you can for example do multi-threaded libcurl use with one handle in each thread, and yet
 * have a shared pool of unused connections and this way get way better connection re-use
 * than if you use one separate pool in each thread.
 * Connections that are used for HTTP/1.1 Pipelining or HTTP/2 multiplexing only get additional transfers
 * added to them if the existing connection is held by the same multi or easy handle.
 * libcurl does not support doing HTTP/2 streams in different threads using a shared connection.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/curl_share_setopt.html
 * @since 7.3
 */
define('CURL_LOCK_DATA_CONNECT', 5);

/**
 * Value for the <b>CURLOPT_SSH_AUTH_TYPES</b> option.
 * @link https://php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURLSSH_AUTH_GSSAPI', 32);

/**
 * Remote time of the retrieved document (as Unix timestamp),
 * an alternative to <b>CURLINFO_FILETIME</b> to allow systems with 32 bit long variables to extract dates
 * outside of the 32bit timestamp range
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 * @since 7.3
 */
define('CURLINFO_FILETIME_T', 6291470);

/**
 * Head start for ipv6 for the happy eyeballs algorithm.
 * Happy eyeballs attempts to connect to both IPv4 and IPv6 addresses for dual-stack hosts,
 * preferring IPv6 first for timeout milliseconds.
 * Defaults to <b>CURL_HET_DEFAULT</b>, which is currently 200 milliseconds.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS', 271);

/**
 * The time in seconds since January 1st, 1970.
 * The time will be used by <b>CURLOPT_TIMECONDITION</b>. Defaults to zero.
 * The difference between this option and <b>CURLOPT_TIMEVALUE</b> is the type of the argument.
 * On systems where 'long' is only 32 bit wide, this option has to be used to set dates beyond the year 2038.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_TIMEVALUE_LARGE', 30270);

/**
 * <b>TRUE</b> to shuffle the order of all returned addresses so that they will be used in a random order,
 * when a name is resolved and more than one IP address is returned.
 * This may cause IPv4 to be used before IPv6 or vice versa.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_DNS_SHUFFLE_ADDRESSES', 275);

/**
 * <b>TRUE</b> to send an HAProxy PROXY protocol v1 header at the start of the connection.
 * The default action is not to send this header.
 * @link https://php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURLOPT_HAPROXYPROTOCOL', 274);

/**
 * Value for the <b>CURLSHOPT_SHARE</b> option.
 * The Public Suffix List stored in the share object is made available to all easy handle bound to the later.
 * Since the Public Suffix List is periodically refreshed, this avoids updates in too many different contexts.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/curl_share_setopt.html
 * @since 7.3
 */
define('CURL_LOCK_DATA_PSL', 6);

/**
 * Value for the <b>CURLOPT_HTTPAUTH</b> option.
 * HTTP Bearer token authentication, used primarily in OAuth 2.0 protocol.
 * @link https://php.net/manual/en/curl.constants.php
 * https://curl.haxx.se/libcurl/c/CURLOPT_HTTPAUTH.html
 * @since 7.3
 */
define('CURLAUTH_BEARER', 64);

/**
 * Time, in microseconds, it took from the start until the SSL/SSH connect/handshake to the remote host was completed
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 * @since 7.3
 */
define('CURLINFO_APPCONNECT_TIME_T', 6291512);

/**
 * Total time taken, in microseconds, from the start until the connection to the remote host (or proxy) was completed
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 * @since 7.3
 */
define('CURLINFO_CONNECT_TIME_T', 6291508);

/**
 * Time in microseconds from the start until the name resolving was completed
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 * @since 7.3
 */
define('CURLINFO_NAMELOOKUP_TIME_T', 6291507);

/**
 * Time taken from the start until the file transfer is just about to begin, in microseconds
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 * @since 7.3
 */
define('CURLINFO_PRETRANSFER_TIME_T', 6291509);

/**
 * Total time, in microseconds,
 * it took for all redirection steps include name lookup, connect, pretransfer and transfer before final transaction was started
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 * @since 7.3
 */
define('CURLINFO_REDIRECT_TIME_T', 6291511);

/**
 * Time, in microseconds, it took from the start until the first byte is received
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 * @since 7.3
 */
define('CURLINFO_STARTTRANSFER_TIME_T', 6291510);

/**
 * Total time in microseconds for the previous transfer, including name resolving, TCP connect etc.
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 * @since 7.3
 */
define('CURLINFO_TOTAL_TIME_T', 6291506);

/**
 * <b>TRUE</b> to not allow URLs that include a username. Usernames are allowed by default (0).
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_DISALLOW_USERNAME_IN_URL', 278);

/**
 * The list of cipher suites to use for the TLS 1.3 connection to a proxy.
 * The list must be syntactically correct, it consists of one or more cipher suite strings separated by colons.
 * This option is currently used only when curl is built to use OpenSSL 1.1.1 or later.
 * If you are using a different SSL backend you can try setting TLS 1.3 cipher suites by using the <b>CURLOPT_PROXY_SSL_CIPHER_LIST</b> option.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_PROXY_TLS13_CIPHERS', 10277);

/**
 * The list of cipher suites to use for the TLS 1.3 connection.
 * The list must be syntactically correct, it consists of one or more cipher suite strings separated by colons.
 * This option is currently used only when curl is built to use OpenSSL 1.1.1 or later.
 * If you are using a different SSL backend you can try setting TLS 1.3 cipher suites by using the <b>CURLOPT_SSL_CIPHER_LIST</b> option.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_TLS13_CIPHERS', 10276);

/**
 * Time allowed to wait for FTP response.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_FTP_RESPONSE_TIMEOUT.html
 * @since 5.5
 */
define('CURLOPT_FTP_RESPONSE_TIMEOUT', 112);

/**
 * Provide a custom address for a specific host and port pair.
 * An array of hostname, port, and IP address strings, each element separated by a colon.
 * In the format: array("<em>example.com:80:127.0.0.1</em>")
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 5.5
 */
define('CURLOPT_RESOLVE', 10203);

/**
 * Enable appending to the remote file
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_APPEND.html
 * @since 5.5
 */
define('CURLOPT_APPEND', 50);

/**
 * Ask for names only in a directory listing
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_DIRLISTONLY.html
 * @since 5.5
 */
define('CURLOPT_DIRLISTONLY', 48);

/**
 * Permissions for remotely created directories
 * Pass a long as a parameter, containing the value of the permissions that will be assigned to newly created directories on the remote server.
 * The default value is 0755, but any valid value can be used.
 * The only protocols that can use this are <em>sftp://</em>, <em>scp://</em>, and <em>file://</em>.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_NEW_DIRECTORY_PERMS.html
 * @since 5.5
 */
define('CURLOPT_NEW_DIRECTORY_PERMS', 160);

/**
 * Permissions for remotely created files.
 * Pass a long as a parameter, containing the value of the permissions that will be assigned to newly created files on the remote server.
 * The default value is 0644, but any valid value can be used.
 * The only protocols that can use this are <em>sftp://</em>, <em>scp://</em>, and <em>file://</em>.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_NEW_FILE_PERMS.html
 * @since 5.5
 */
define('CURLOPT_NEW_FILE_PERMS', 159);

/**
 * <b>TRUE</b> to scan the ~/.netrc file to find a username and password for the remote site that a connection is being established with.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_NETRC_FILE.html
 * @since 5.5
 */
define('CURLOPT_NETRC_FILE', 10118);

/**
 * Commands to run before an FTP transfer
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_PREQUOTE.html
 * @since 5.5
 */
define('CURLOPT_PREQUOTE', 10093);

/**
 * Set FTP kerberos security level
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_KRBLEVEL.html
 * @since 5.5
 */
define('CURLOPT_KRBLEVEL', 10063);

/**
 * Maximum file size allowed to download (in bytes)
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_MAXFILESIZE.html
 * @since 5.5
 */
define('CURLOPT_MAXFILESIZE', 114);

/**
 * Set account info for FTP
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_FTP_ACCOUNT.html
 * @since 5.5
 */
define('CURLOPT_FTP_ACCOUNT', 10134);

/**
 * A cookie string (i.e. a single line in Netscape/Mozilla format, or a regular HTTP-style Set-Cookie header) adds that single cookie to the internal cookie store.
 * "<b>ALL</b>" erases all cookies held in memory.
 * "<b>SESS</b>" erases all session cookies held in memory.
 * "<b>FLUSH</b>" writes all known cookies to the file specified by CURLOPT_COOKIEJAR.
 * "<b>RELOAD</b>" loads all cookies from the files specified by CURLOPT_COOKIEFILE.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 5.5
 */
define('CURLOPT_COOKIELIST', 10135);

/**
 * Set local port number to use for socket
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_LOCALPORT.html
 * @since 5.5
 */
define('CURLOPT_LOCALPORT', 139);

/**
 * Number of additional local ports to try.
 * Pass a long. The range argument is the number of attempts libcurl will make to find a working local port number.
 * It starts with the given <b>CURLOPT_LOCALPORT</b> and adds one to the number for each retry.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_LOCALPORTRANGE.html
 * @since 5.5
 */
define('CURLOPT_LOCALPORTRANGE', 140);

/**
 * Command to use instead of USER with FTP.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_FTP_ALTERNATIVE_TO_USER.html
 * @since 5.5
 */
define('CURLOPT_FTP_ALTERNATIVE_TO_USER', 10147);

/**
 * Enable/disable use of the SSL session-ID cache.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_SSL_SESSIONID_CACHE.html
 * @since 5.5
 */
define('CURLOPT_SSL_SESSIONID_CACHE', 150);

/**
 * Switch off SSL again with FTP after auth.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_FTP_SSL_CCC.html
 * @since 5.5
 */
define('CURLOPT_FTP_SSL_CCC', 154);

/**
 * <b>FALSE</b> to get the raw HTTP response body.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 5.5
 */
define('CURLOPT_HTTP_CONTENT_DECODING', 158);

/**
 * Enable/disable HTTP transfer decoding.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_HTTP_TRANSFER_DECODING.html
 * @since 5.5
 */
define('CURLOPT_HTTP_TRANSFER_DECODING', 157);

/**
 * Append FTP transfer mode to URL for proxy.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_PROXY_TRANSFER_MODE.html
 * @since 5.5
 */
define('CURLOPT_PROXY_TRANSFER_MODE', 166);

/**
 * Set scope id for IPv6 addresses.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_ADDRESS_SCOPE.html
 * @since 5.5
 */
define('CURLOPT_ADDRESS_SCOPE', 171);

/**
 * Specify a Certificate Revocation List file.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_CRLFILE.html
 * @since 5.5
 */
define('CURLOPT_CRLFILE', 10169);

/**
 * Issuer SSL certificate filename.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_ISSUERCERT.html
 * @since 5.5
 */
define('CURLOPT_ISSUERCERT', 10170);

/**
 * The user name to use in authentication.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 5.5
 */
define('CURLOPT_USERNAME', 10173);

/**
 * Password to use in authentication.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_PASSWORD.html
 * @since 5.5
 */
define('CURLOPT_PASSWORD', 10174);

/**
 * User name to use for proxy authentication.
 * @since 5.5
 */
define('CURLOPT_PROXYUSERNAME', 10175);

/**
 * Password to use for proxy authentication.
 * @since 5.5
 */
define('CURLOPT_PROXYPASSWORD', 10176);

/**
 * Disable proxy use for specific hosts.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_NOPROXY.html
 * @since 5.5
 */
define('CURLOPT_NOPROXY', 10177);

/**
 * Set socks proxy gssapi negotiation protection.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_SOCKS5_GSSAPI_NEC.html
 * @since 5.5
 */
define('CURLOPT_SOCKS5_GSSAPI_NEC', 180);

/**
 * SOCKS5 proxy authentication service name.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_SOCKS5_GSSAPI_SERVICE.html
 * @deprecated Use <b>CURLOPT_PROXY_SERVICE_NAME</b> instead.
 * @since 5.5
 */
define('CURLOPT_SOCKS5_GSSAPI_SERVICE', 10179);

/**
 * Specify blocksize to use for TFTP data transmission.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_TFTP_BLKSIZE.html
 * @since 5.5
 */
define('CURLOPT_TFTP_BLKSIZE', 178);

/**
 * File name holding the SSH known hosts.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_SSH_KNOWNHOSTS.html
 * @since 5.5
 */
define('CURLOPT_SSH_KNOWNHOSTS', 10183);

/**
 * Enable the PRET command.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_FTP_USE_PRET.html
 * @since 5.5
 */
define('CURLOPT_FTP_USE_PRET', 188);

/**
 * SMTP sender address.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_MAIL_FROM.html
 * @since 5.5
 */
define('CURLOPT_MAIL_FROM', 10186);

/**
 * List of SMTP mail recipients.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_MAIL_RCPT.html
 * @since 5.5
 */
define('CURLOPT_MAIL_RCPT', 10187);

/**
 * Set the RTSP client CSEQ number.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_RTSP_CLIENT_CSEQ.html
 * @since 5.5
 */
define('CURLOPT_RTSP_CLIENT_CSEQ', 193);

/**
 * Set the RTSP server CSEQ number.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_RTSP_SERVER_CSEQ.html
 * @since 5.5
 */
define('CURLOPT_RTSP_SERVER_CSEQ', 194);

/**
 * Set RTSP session ID.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_RTSP_SESSION_ID.html
 * @since 5.5
 */
define('CURLOPT_RTSP_SESSION_ID', 10190);

/**
 * Set RTSP stream URI.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_RTSP_STREAM_URI.html
 * @since 5.5
 */
define('CURLOPT_RTSP_STREAM_URI', 10191);

/**
 * Set RTSP Transport: header.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_RTSP_TRANSPORT.html
 * @since 5.5
 */
define('CURLOPT_RTSP_TRANSPORT', 10192);

/**
 * Specify RTSP request.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_RTSP_REQUEST.html
 * @since 5.5
 */
define('CURLOPT_RTSP_REQUEST', 189);

/**
 * Ignore content length.
 * If <b>TRUE</b>, ignore the Content-Length header in the HTTP response and ignore asking for or relying on it for FTP transfers.
 * This is useful for HTTP with Apache 1.x (and similar servers) which will report incorrect content length for files over 2 gigabytes.
 * If this option is used, curl will not be able to accurately report progress, and will simply stop the download when the server ends the connection.
 * It is also useful with FTP when for example the file is growing while the transfer is in progress
 * which otherwise will unconditionally cause libcurl to report error.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_IGNORE_CONTENT_LENGTH.html
 * @since 5.5
 */
define('CURLOPT_IGNORE_CONTENT_LENGTH', 136);
/**
 * Enables automatic decompression of HTTP downloads
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_ACCEPT_ENCODING.html
 * @since 5.5
 */
define('CURLOPT_ACCEPT_ENCODING', 10102);

/**
 * Ask for HTTP Transfer Encoding.
 * Adds a request for compressed Transfer Encoding in the outgoing HTTP request.
 * If the server supports this and so desires, it can respond with the HTTP response sent using a compressed Transfer-Encoding
 * that will be automatically uncompressed by libcurl on reception.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_TRANSFER_ENCODING.html
 * @since 5.5
 */
define('CURLOPT_TRANSFER_ENCODING', 207);

/**
 * Set preferred DNS servers: <em>host[:port][,host[:port]]...</em>
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_DNS_SERVERS.html
 * @since 5.5
 */
define('CURLOPT_DNS_SERVERS', 10211);

/**
 * Request using SSL / TLS for the transfer
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_USE_SSL.html
 * @since 5.5
 */
define('CURLOPT_USE_SSL', 119);
/**
 * Custom telnet options
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_TELNETOPTIONS.html
 */
define("CURLOPT_TELNETOPTIONS", 10070);
/**
 * The download could not be resumed because the specified offset was out of the file boundary.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define("CURLE_BAD_DOWNLOAD_RESUME", 36);
/**
 * A file transfer was shorter or larger than expected.
 * This happens when the server first reports an expected transfer size, and then delivers data
 * that doesn't match the previously given size.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define("CURLE_FTP_PARTIAL_FILE", 18);
/**
 * This is returned if <b>CURLOPT_FAILONERROR</b> is set <b>TRUE</b> and the HTTP server returns an error code that is >= 400.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define("CURLE_HTTP_RETURNED_ERROR", 22);
/**
 * Operation timeout. The specified time-out period was reached according to the conditions.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define("CURLE_OPERATION_TIMEDOUT", 28);
/**
 * Failed to match the pinned key specified with <b>CURLOPT_PINNEDPUBLICKEY</b>.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define("CURLE_SSL_PINNEDPUBKEYNOTMATCH", 90);
/**
 * @link https://php.net/manual/en/curl.constants.php
 */
define("CURLINFO_LASTONE", 62);
/**
 * An easy handle already added to a multi handle was attempted to get added a second time.
 * @link https://www.php.net/manual/en/function.curl-multi-exec.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define("CURLM_ADDED_ALREADY", 7);
/**
 * @link https://curl.haxx.se/libcurl/c/symbols-in-versions.html
 */
define("CURLSHOPT_NONE", 0);
/**
 * Default value for the <b>CURLOPT_TIMECONDITION</b> option.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_TIMECONDITION.html
 */
define("CURL_TIMECOND_NONE", 0);
/**
 * Value for the <b>CURLOPT_HTTPAUTH</b> option.
 * Allows no authentication.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 */
define("CURLAUTH_NONE", 0);
/**
 * Problem with reading the SSL CA cert (path? access rights?)
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define("CURLE_SSL_CACERT_BADFILE", 77);
/**
 * An unspecified error occurred during the SSH session.
 * @link https://php.net/manual/en/curl.constants.php
 * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html
 */
define("CURLE_SSH", 79);
/**
 * Value for the <b>CURLOPT_FTP_SSL_CCC</b> option.
 * Initiate the shutdown and wait for a reply.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_FTP_SSL_CCC.html
 */
define("CURLFTPSSL_CCC_ACTIVE", 2);
/**
 * Value for the <b>CURLOPT_FTP_SSL_CCC</b> option.
 * Don't attempt to use CCC.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_FTP_SSL_CCC.html
 */
define("CURLFTPSSL_CCC_NONE", 0);
/**
 * Value for the <b>CURLOPT_FTP_SSL_CCC</b> option.
 * Do not initiate the shutdown, but wait for the server to do it. Do not send a reply.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_FTP_SSL_CCC.html
 */
define("CURLFTPSSL_CCC_PASSIVE", 1);
/**
 * Value for the <b>CURLOPT_USE_SSL</b> option.
 * Require SSL for all communication or fail.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_USE_SSL.html
 */
define("CURLUSESSL_ALL", 3);
/**
 * Value for the <b>CURLOPT_USE_SSL</b> option.
 * Require SSL for the control connection or fail.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_USE_SSL.html
 */
define("CURLUSESSL_CONTROL", 2);
/**
 * Value for the <b>CURLOPT_USE_SSL</b> option.
 * Don't attempt to use SSL.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_USE_SSL.html
 */
define("CURLUSESSL_NONE", 0);
/**
 * Value for the <b>CURLOPT_USE_SSL</b> option.
 * Try using SSL, proceed as normal otherwise.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_USE_SSL.html
 */
define("CURLUSESSL_TRY", 1);
/**
 * Convenience define that pauses both directions.
 * @link https://php.net/manual/en/curl.constants.php
 * @since 5.5
 */
define("CURLPAUSE_ALL", 5);
/**
 * Convenience define that unpauses both directions.
 * @link https://php.net/manual/en/curl.constants.php
 * @since 5.5
 */
define("CURLPAUSE_CONT", 0);
/**
 * Pause receiving data. There will be no data received on this connection until this function is called again without this bit set.
 * Thus, the write callback (<b>CURLOPT_WRITEFUNCTION</b>) won't be called.
 * @link https://php.net/manual/en/curl.constants.php
 * @since 5.5
 */
define("CURLPAUSE_RECV", 1);
/**
 * @link https://php.net/manual/en/curl.constants.php
 * @since 5.5
 */
define("CURLPAUSE_RECV_CONT", 0);
/**
 * Pause sending data. There will be no data sent on this connection until this function is called again without this bit set.
 * Thus, the read callback (CURLOPT_READFUNCTION) won't be called.
 * @link https://php.net/manual/en/curl.constants.php
 * @since 5.5
 */
define("CURLPAUSE_SEND", 4);
/**
 * @link https://php.net/manual/en/curl.constants.php
 * @since 5.5
 */
define("CURLPAUSE_SEND_CONT", 0);
/**
 * Read callback for data uploads.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_READFUNCTION.html
 */
define("CURL_READFUNC_PAUSE", 268435457);
/**
 * Set callback for writing received data.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_WRITEFUNCTION.html
 */
define("CURL_WRITEFUNC_PAUSE", 268435457);
/**
 * Value for the <b>CURLOPT_PROXYTYPE</b> option.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @since 5.5.23
 */
define("CURLPROXY_SOCKS4A", 6);
/**
 * Value for the <b>CURLOPT_PROXYTYPE</b> option.
 * Proxy resolves URL hostname.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @since 5.5.23
 */
define("CURLPROXY_SOCKS5_HOSTNAME", 7);
/**
 * Value for the <b>CURLOPT_SSH_AUTH_TYPES</b> option.
 * @link https://www.php.net/manual/en/curl.constants.php
 */
define("CURLSSH_AUTH_ANY", -1);
/**
 * Value for the <b>CURLOPT_SSH_AUTH_TYPES</b> option.
 * @link https://www.php.net/manual/en/curl.constants.php
 */
define("CURLSSH_AUTH_DEFAULT", -1);
/**
 * Value for the <b>CURLOPT_SSH_AUTH_TYPES</b> option.
 * @link https://www.php.net/manual/en/curl.constants.php
 */
define("CURLSSH_AUTH_HOST", 4);
/**
 * Value for the <b>CURLOPT_SSH_AUTH_TYPES</b> option.
 * @link https://www.php.net/manual/en/curl.constants.php
 */
define("CURLSSH_AUTH_KEYBOARD", 8);
/**
 * Value for the <b>CURLOPT_SSH_AUTH_TYPES</b> option.
 * @link https://www.php.net/manual/en/curl.constants.php
 */
define("CURLSSH_AUTH_NONE", 0);
/**
 * Value for the <b>CURLOPT_SSH_AUTH_TYPES</b> option.
 * @link https://www.php.net/manual/en/curl.constants.php
 */
define("CURLSSH_AUTH_PASSWORD", 2);
/**
 * Value for the <b>CURLOPT_SSH_AUTH_TYPES</b> option.
 * @link https://www.php.net/manual/en/curl.constants.php
 */
define("CURLSSH_AUTH_PUBLICKEY", 1);
/**
 * Value for the <b>CURLOPT_HTTPAUTH</b> option.
 * HTTP Digest authentication with an IE flavor.
 * Digest authentication is defined in <em>RFC 2617</em> and is a more secure way to do authentication over public networks than
 * the regular old-fashioned Basic method.
 * The IE flavor is simply that libcurl will use a special "quirk" that IE is known to have used before version 7
 * and that some servers require the client to use.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_HTTPAUTH.html
 */
define("CURLAUTH_DIGEST_IE", 16);
/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_PROTOCOLS.html
 */
define("CURLPROTO_IMAP", 4096);
/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_PROTOCOLS.html
 */
define("CURLPROTO_IMAPS", 8192);
/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_PROTOCOLS.html
 */
define("CURLPROTO_POP3", 16384);
/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_PROTOCOLS.html
 */
define("CURLPROTO_POP3S", 32768);
/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_PROTOCOLS.html
 */
define("CURLPROTO_RTSP", 262144);
/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_PROTOCOLS.html
 */
define("CURLPROTO_SMTP", 65536);
/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_PROTOCOLS.html
 */
define("CURLPROTO_SMTPS", 131072);
/**
 * Value for the <b>CURLOPT_RTSP_REQUEST</b> option.
 * When sent by a client, this method changes the description of the session.
 * For example, if a client is using the server to record a meeting,
 * the client can use Announce to inform the server of all the meta-information about the session.
 * <b>ANNOUNCE</b> acts like an HTTP PUT or POST
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_RTSP_REQUEST.html
 */
define("CURL_RTSPREQ_ANNOUNCE", 3);
/**
 * Value for the <b>CURLOPT_RTSP_REQUEST</b> option.
 * Used to get the low level description of a stream.
 * The application should note what formats it understands in the '<em>Accept:</em>' header.
 * Unless set manually, libcurl will automatically fill in '<em>Accept: application/sdp</em>'.
 * Time-condition headers will be added to Describe requests if the <b>CURLOPT_TIMECONDITION</b> option is active.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_RTSP_REQUEST.html
 */
define("CURL_RTSPREQ_DESCRIBE", 2);
/**
 * Value for the <b>CURLOPT_RTSP_REQUEST</b> option.
 * Retrieve a parameter from the server.
 * By default, libcurl will automatically include a <em>Content-Type: text/parameters</em> header on all non-empty requests
 * unless a custom one is set. <b>GET_PARAMETER</b> acts just like an HTTP PUT or POST
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_RTSP_REQUEST.html
 */
define("CURL_RTSPREQ_GET_PARAMETER", 8);
/**
 * Value for the <b>CURLOPT_RTSP_REQUEST</b> option.
 * Used to retrieve the available methods of the server.
 * The application is responsible for parsing and obeying the response.
 * The session ID is not needed for this method.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_RTSP_REQUEST.html
 */
define("CURL_RTSPREQ_OPTIONS", 1);
/**
 * Value for the <b>CURLOPT_RTSP_REQUEST</b> option.
 * Send a Pause command to the server.
 * Use the <b>CURLOPT_RANGE</b> option with a single value to indicate when the stream should be halted. (e.g. npt='25')
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_RTSP_REQUEST.html
 */
define("CURL_RTSPREQ_PAUSE", 6);
/**
 * Value for the <b>CURLOPT_RTSP_REQUEST</b> option.
 * Send a Play command to the server.
 * Use the <b>CURLOPT_RANGE</b> option to modify the playback time (e.g. 'npt=10-15').
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_RTSP_REQUEST.html
 */
define("CURL_RTSPREQ_PLAY", 5);
/**
 * Value for the <b>CURLOPT_RTSP_REQUEST</b> option.
 * This is a special request because it does not send any data to the server.
 * The application may call this function in order to receive interleaved RTP data.
 * It will return after processing one read buffer of data in order to give the application a chance to run.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_RTSP_REQUEST.html
 */
define("CURL_RTSPREQ_RECEIVE", 11);
/**
 * Value for the <b>CURLOPT_RTSP_REQUEST</b> option.
 * Used to tell the server to record a session. Use the <b>CURLOPT_RANGE</b> option to modify the record time.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_RTSP_REQUEST.html
 */
define("CURL_RTSPREQ_RECORD", 10);
/**
 * Value for the <b>CURLOPT_RTSP_REQUEST</b> option.
 * Set a parameter on the server.
 * By default, libcurl will automatically include a <em>Content-Type: text/parameters</em> header unless a custom one is set.
 * The interaction with SET_PARAMETER is much like an HTTP PUT or POST.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_RTSP_REQUEST.html
 */
define("CURL_RTSPREQ_SET_PARAMETER", 9);
/**
 * Value for the <b>CURLOPT_RTSP_REQUEST</b> option.
 * Setup is used to initialize the transport layer for the session.
 * The application must set the desired Transport options for a session
 * by using the <b>CURLOPT_RTSP_TRANSPORT</b> option prior to calling setup.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_RTSP_REQUEST.html
 */
define("CURL_RTSPREQ_SETUP", 4);
/**
 * Value for the <b>CURLOPT_RTSP_REQUEST</b> option.
 * This command terminates an RTSP session.
 * Simply closing a connection does not terminate the RTSP session since it is valid to control an RTSP session over different connections.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_RTSP_REQUEST.html
 */
define("CURL_RTSPREQ_TEARDOWN", 7);
/**
 * Wildcard matching function callback.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_FNMATCH_FUNCTION.html
 */
define("CURLOPT_FNMATCH_FUNCTION", 20200);
/**
 * Enable directory wildcard transfers.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_WILDCARDMATCH.html
 */
define("CURLOPT_WILDCARDMATCH", 197);
/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_PROTOCOLS.html
 */
define("CURLPROTO_RTMP", 524288);
/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_PROTOCOLS.html
 */
define("CURLPROTO_RTMPE", 2097152);
/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_PROTOCOLS.html
 */
define("CURLPROTO_RTMPS", 8388608);
/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_PROTOCOLS.html
 */
define("CURLPROTO_RTMPT", 1048576);
/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_PROTOCOLS.html
 */
define("CURLPROTO_RTMPTE", 4194304);
/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_PROTOCOLS.html
 */
define("CURLPROTO_RTMPTS", 16777216);
/**
 * Return value for the <b>CURLOPT_FNMATCH_FUNCTION</b> if an error was occurred.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_FNMATCH_FUNCTION.html
 */
define("CURL_FNMATCHFUNC_FAIL", 2);
/**
 * Return value for the <b>CURLOPT_FNMATCH_FUNCTION</b> if pattern matches the string.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_FNMATCH_FUNCTION.html
 */
define("CURL_FNMATCHFUNC_MATCH", 0);
/**
 * Return value for the <b>CURLOPT_FNMATCH_FUNCTION</b> if pattern not matches the string.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_FNMATCH_FUNCTION.html
 */
define("CURL_FNMATCHFUNC_NOMATCH", 1);
/**
 * Value for the <b>CURLOPT_PROTOCOLS</b> option.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_PROTOCOLS.html
 */
define("CURLPROTO_GOPHER", 33554432);
/**
 * Value for the <b>CURLOPT_HTTPAUTH</b> option.
 * This is a meta symbol.
 * OR this value together with a single specific auth value to force libcurl to probe for un-restricted auth and if not,
 * only that single auth algorithm is acceptable.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_HTTPAUTH.html
 */
define("CURLAUTH_ONLY", 2147483648);
/**
 * Password to use for TLS authentication.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_TLSAUTH_PASSWORD.html
 */
define("CURLOPT_TLSAUTH_PASSWORD", 10205);
/**
 * Set TLS authentication methods.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_TLSAUTH_TYPE.html
 */
define("CURLOPT_TLSAUTH_TYPE", 10206);
/**
 * User name to use for TLS authentication.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_TLSAUTH_USERNAME.html
 */
define("CURLOPT_TLSAUTH_USERNAME", 10204);
/**
 * Value for the <b>CURLOPT_TLSAUTH_TYPE</b> option.
 * TLS-SRP authentication.
 * Secure Remote Password authentication for TLS is defined in RFC 5054 and provides mutual authentication if both sides have a shared secret.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_TLSAUTH_TYPE.html
 */
define("CURL_TLSAUTH_SRP", 1);
/**
 * Value for the <b>CURLOPT_GSSAPI_DELEGATION</b> option.
 * Allow unconditional GSSAPI credential delegation.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_GSSAPI_DELEGATION.html
 */
define("CURLGSSAPI_DELEGATION_FLAG", 2);
/**
 * Value for the <b>CURLOPT_GSSAPI_DELEGATION</b> option.
 * Delegate only if the OK-AS-DELEGATE flag is set in the service ticket
 * in case this feature is supported by the GSS-API implementation.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_GSSAPI_DELEGATION.html
 */
define("CURLGSSAPI_DELEGATION_POLICY_FLAG", 1);
/**
 * Set allowed GSS-API delegation.
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_GSSAPI_DELEGATION.html
 */
define("CURLOPT_GSSAPI_DELEGATION", 210);
/**
 * Timeout waiting for FTP server to connect back
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_ACCEPTTIMEOUT_MS.html
 */
define("CURLOPT_ACCEPTTIMEOUT_MS", 212);
/**
 * SMTP authentication address
 * @link https://curl.haxx.se/libcurl/c/CURLOPT_MAIL_AUTH.html
 */
define("CURLOPT_MAIL_AUTH", 10217);
/**
 * Set SSL behavior options, which is a bitmask of any of the following constants:
 *  <b>CURLSSLOPT_ALLOW_BEAST</b>: do not attempt to use any workarounds for a security flaw in the SSL3 and TLS1.0 protocols.
 *  <b>CURLSSLOPT_NO_REVOKE</b>: disable certificate revocation checks for those SSL backends where such behavior is present.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 5.6
 */
define("CURLOPT_SSL_OPTIONS", 216);
/**
 * If set to 1, TCP keepalive probes will be sent.
 * The delay and frequency of these probes can be controlled by the <b>CURLOPT_TCP_KEEPIDLE</b> and <b>CURLOPT_TCP_KEEPINTVL</b> options,
 * provided the operating system supports them.
 * If set to 0 (default) keepalive probes are disabled.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 5.5
 */
define("CURLOPT_TCP_KEEPALIVE", 213);
/**
 * Sets the delay, in seconds, that the operating system will wait while the connection is idle before sending keepalive probes,
 * if <b>CURLOPT_TCP_KEEPALIVE</b> is enabled. Not all operating systems support this option. The default is 60.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 5.5
 */
define("CURLOPT_TCP_KEEPIDLE", 214);
/**
 * Sets the interval, in seconds, that the operating system will wait between sending keepalive probes,
 * if <b>CURLOPT_TCP_KEEPALIVE</b> is enabled. Not all operating systems support this option. The default is 60.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 5.5
 */
define("CURLOPT_TCP_KEEPINTVL", 215);
/**
 * Value for the <b>CURLOPT_SSL_OPTIONS</b> option.
 * Do not attempt to use any workarounds for a security flaw in the SSL3 and TLS1.0 protocols.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 5.6
 */
define("CURLSSLOPT_ALLOW_BEAST", 1);
/**
 * Supports HTTP2.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @since 5.5.24
 */
define("CURL_VERSION_HTTP2", 65536);
/**
 * Value for the <b>CURLOPT_SSL_OPTIONS</b> option.
 * Disable certificate revocation checks for those SSL backends where such behavior is present.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.0.7
 */
define("CURLSSLOPT_NO_REVOKE", 2);
/**
 * The default protocol to use if the URL is missing a scheme name.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.0.7
 */
define("CURLOPT_DEFAULT_PROTOCOL", 10238);
/**
 * Set the numerical stream weight (a number between 1 and 256).
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.0.7
 */
define("CURLOPT_STREAM_WEIGHT", 239);
/**
 * <b>TRUE</b> to not send TFTP options requests.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.0.7
 */
define("CURLOPT_TFTP_NO_OPTIONS", 242);
/**
 * Connect to a specific host and port instead of the URL's host and port.
 * Accepts an array of strings with the format HOST:PORT:CONNECT-TO-HOST:CONNECT-TO-PORT.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.0.7
 */
define("CURLOPT_CONNECT_TO", 10243);
/**
 * <b>TRUE</b> to enable TCP Fast Open.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.0.7
 */
define("CURLOPT_TCP_FASTOPEN", 244);

/**
 * The server sent data libcurl couldn't parse.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURLE_WEIRD_SERVER_REPLY', 8);
/**
 * <b>TRUE</b> to keep sending the request body if the HTTP code returned is equal to or larger than 300.
 * The default action would be to stop sending and close the stream or connection. Suitable for manual NTLM authentication.
 * Most applications do not need this option.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_KEEP_SENDING_ON_ERROR', 245);
/**
 * Value for the <b>CURLOPT_SSLVERSION</b> option.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURL_SSLVERSION_TLSv1_3', 7);

/**
 * Supports HTTPS proxy.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURL_VERSION_HTTPS_PROXY', 2097152);

/**
 * The protocol used in the last HTTP connection. The returned value will be exactly one of the <b>CURLPROTO_*</b> values
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 * @since 7.3
 */
define('CURLINFO_PROTOCOL', 2097200);

/**
 * Supports asynchronous name lookups.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURL_VERSION_ASYNCHDNS', 128);

/**
 * Supports memory tracking debug capabilities.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @since 7.3.6
 */
define('CURL_VERSION_CURLDEBUG', 8192);

/**
 * Supports character conversions.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURL_VERSION_CONV', 4096);

/**
 * libcurl was built with debug capabilities
 * @link https://www.php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURL_VERSION_DEBUG', 64);

/**
 * Supports HTTP GSS-Negotiate.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURL_VERSION_GSSNEGOTIATE', 32);

/**
 * Supports the IDNA.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURL_VERSION_IDN', 1024);

/**
 * Supports large files.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURL_VERSION_LARGEFILE', 512);

/**
 * Supports HTTP NTLM.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURL_VERSION_NTLM', 16);

/**
 * Supports the Mozilla's Public Suffix List.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @since 7.0.7
 */
define('CURL_VERSION_PSL', 1048576);

/**
 * Supports for SPNEGO authentication (RFC 2478).
 * @link https://www.php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURL_VERSION_SPNEGO', 256);

/**
 * Supports SSPI. Windows-specific.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURL_VERSION_SSPI', 2048);

/**
 * Supports the TLS-SRP.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURL_VERSION_TLSAUTH_SRP', 16384);

/**
 * Supports the NTLM delegation to a winbind helper.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURL_VERSION_NTLM_WB', 32768);

/**
 * Supports the GSSAPI. This makes libcurl use provided functions for Kerberos and SPNEGO authentication.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURL_VERSION_GSSAPI', 131072);

/**
 * Supports Kerberos V5 authentication for FTP, IMAP, POP3, SMTP and SOCKSv5 proxy.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURL_VERSION_KERBEROS5', 262144);

/**
 * The path to proxy Certificate Authority (CA) bundle.
 * Set the path as a string naming a file holding one or more certificates to verify the HTTPS proxy with.
 * This option is for connecting to an HTTPS proxy, not an HTTPS server.
 * Defaults set to the system path where libcurl's cacert bundle is assumed to be stored.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_PROXY_CAINFO', 10246);

/**
 * The directory holding multiple CA certificates to verify the HTTPS proxy with.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_PROXY_CAPATH', 10247);

/**
 * Set the file name with the concatenation of CRL (Certificate Revocation List) in PEM format
 * to use in the certificate validation that occurs during the SSL exchange.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_PROXY_CRLFILE', 10260);

/**
 * Set the string be used as the password required to use the <b>CURLOPT_PROXY_SSLKEY</b> private key.
 * You never needed a passphrase to load a certificate but you need one to load your private key.
 * This option is for connecting to an HTTPS proxy, not an HTTPS server.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_PROXY_KEYPASSWD', 10258);

/**
 * The format of your client certificate used when connecting to an HTTPS proxy. Supported formats are "PEM" and "DER", except with Secure Transport.
 * OpenSSL (versions 0.9.3 and later) and Secure Transport (on iOS 5 or later, or OS X 10.7 or later) also support "P12" for PKCS#12-encoded files.
 * Defaults to "PEM".
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_PROXY_SSLCERTTYPE', 10255);

/**
 * The format of your private key. Supported formats are "PEM", "DER" and "ENG".
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_PROXY_SSLKEYTYPE', 10257);

/**
 * One of <b>CURL_SSLVERSION_DEFAULT</b>, <b>CURL_SSLVERSION_TLSv1</b>, <b>CURL_SSLVERSION_TLSv1_0</b>, <b>CURL_SSLVERSION_TLSv1_1</b>, <b>CURL_SSLVERSION_TLSv1_2</b>,
 * <b>CURL_SSLVERSION_TLSv1_3</b>, <b>CURL_SSLVERSION_MAX_DEFAULT</b>, <b>CURL_SSLVERSION_MAX_TLSv1_0</b>, <b>CURL_SSLVERSION_MAX_TLSv1_1</b>,
 * <b>CURL_SSLVERSION_MAX_TLSv1_2</b>, <b>CURL_SSLVERSION_MAX_TLSv1_3</b> or <b>CURL_SSLVERSION_SSLv3</b>.
 * See also <b>CURLOPT_SSLVERSION</b>.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_PROXY_SSLVERSION', 250);

/**
 * Tusername to use for the HTTPS proxy TLS authentication method specified with the <b>CURLOPT_PROXY_TLSAUTH_TYPE</b> option.
 * Requires that the <b>CURLOPT_PROXY_TLSAUTH_PASSWORD</b> option to also be set.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_PROXY_TLSAUTH_USERNAME', 10251);
/**
 * The password to use for the TLS authentication method specified with the <b>CURLOPT_PROXY_TLSAUTH_TYPE</b> option.
 * Requires that the <b>CURLOPT_PROXY_TLSAUTH_USERNAME</b> option to also be set.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_PROXY_TLSAUTH_PASSWORD', 10252);

/**
 * The method of the TLS authentication used for the HTTPS connection. Supported method is "SRP".
 * Secure Remote Password (SRP) authentication for TLS provides mutual authentication if both sides have a shared secret.
 * To use TLS-SRP, you must also set the <b>CURLOPT_PROXY_TLSAUTH_USERNAME</b> and <b>CURLOPT_PROXY_TLSAUTH_PASSWORD</b> options.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_PROXY_TLSAUTH_TYPE', 10253);

/**
 * Value for the <b>CURLOPT_PROXYTYPE</b> option.
 * Use HTTPS Proxy.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @since 7.3
 */
define('CURLPROXY_HTTPS', 2);

/**
 * Set the pinned public key for HTTPS proxy. The string can be the file name of your pinned public key. The file format expected is "PEM" or "DER".
 * The string can also be any number of base64 encoded sha256 hashes preceded by "sha256//" and separated by ";"
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_PROXY_PINNEDPUBLICKEY', 10263);

/**
 * The file name of your private key used for connecting to the HTTPS proxy.
 * The default format is "PEM" and can be changed with <b>CURLOPT_PROXY_SSLKEYTYPE</b>.
 * (iOS and Mac OS X only) This option is ignored if curl was built against Secure Transport.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_PROXY_SSLKEY', 10256);

/**
 * The list of ciphers to use for the connection to the HTTPS proxy.
 * The list must be syntactically correct, it consists of one or more cipher strings separated by colons.
 * Commas or spaces are also acceptable separators but colons are normally used, !, - and + can be used as operators.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_PROXY_SSL_CIPHER_LIST', 10259);

/**
 * Set proxy SSL behavior options, which is a bitmask of any of the following constants:
 *  <b>CURLSSLOPT_ALLOW_BEAST</b>: do not attempt to use any workarounds for a security flaw in the SSL3 and TLS1.0 protocols.
 *  <b>CURLSSLOPT_NO_REVOKE</b>: disable certificate revocation checks for those SSL backends where such behavior is present. (curl >= 7.44.0)
 *  <b>CURLSSLOPT_NO_PARTIALCHAIN</b>: do not accept "partial" certificate chains, which it otherwise does by default. (curl >= 7.68.0)
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_PROXY_SSL_OPTIONS', 261);

/**
 * Set to 2 to verify in the HTTPS proxy's certificate name fields against the proxy name.
 * When set to 0 the connection succeeds regardless of the names used in the certificate.
 * Use that ability with caution! 1 treated as a debug option in curl 7.28.0 and earlier.
 * From curl 7.28.1 to 7.65.3 CURLE_BAD_FUNCTION_ARGUMENT is returned.
 * From curl 7.66.0 onwards 1 and 2 is treated as the same value.
 * In production environments the value of this option should be kept at 2 (default value).
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_PROXY_SSL_VERIFYHOST', 249);

/**
 * <b>FALSE</b> to stop cURL from verifying the peer's certificate.
 * Alternate certificates to verify against can be specified with the <b>CURLOPT_CAINFO</b> option or
 * a certificate directory can be specified with the <b>CURLOPT_CAPATH</b> option.
 * When set to false, the peer certificate verification succeeds regardless.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_PROXY_SSL_VERIFYPEER', 248);

/**
 * The file name of your client certificate used to connect to the HTTPS proxy.
 * The default format is "P12" on Secure Transport and "PEM" on other engines, and can be changed with <b>CURLOPT_PROXY_SSLCERTTYPE</b>.
 * With NSS or Secure Transport, this can also be the nickname of the certificate you wish to authenticate with as it is named in the security database.
 * If you want to use a file from the current directory, please precede it with "./" prefix, in order to avoid confusion with a nickname.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_PROXY_SSLCERT', 10254);

/**
 * The URL scheme used for the most recent connection
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 * @since 7.3
 */
define('CURLINFO_SCHEME', 1048625);

/**
 * Supports UNIX sockets.
 * @link https://www.php.net/manual/en/curl.constants.php
 * @since 7.0.7
 */
define('CURL_VERSION_UNIX_SOCKETS', 524288);

/**
 * The version used in the last HTTP connection. The return value will be one of the defined
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 * @since 7.3
 */
define('CURLINFO_HTTP_VERSION', 2097198);
/**
 * Set a string holding the host name or dotted numerical IP address to be used as the preproxy that curl connects to before
 * it connects to the HTTP(S) proxy specified in the <b>CURLOPT_PROXY</b> option for the upcoming request.
 * The preproxy can only be a SOCKS proxy and it should be prefixed with [scheme]:// to specify which kind of socks is used.
 * A numerical IPv6 address must be written within [brackets]. Setting the preproxy to an empty string explicitly disables the use of a preproxy.
 * To specify port number in this string, append :[port] to the end of the host name.
 * The proxy's port number may optionally be specified with the separate option <b>CURLOPT_PROXYPORT</b>.
 * Defaults to using port 1080 for proxies if a port is not specified.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_PRE_PROXY', 10262);
/**
 * The result of the certificate verification that was requested (using the <b>CURLOPT_PROXY_SSL_VERIFYPEER</b> option).
 * Only used for HTTPS proxies
 * @link https://www.php.net/manual/en/function.curl-getinfo.php
 * @since 7.3
 */
define('CURLINFO_PROXY_SSL_VERIFYRESULT', 2097199);
/**
 * Whether to allow HTTP/0.9 responses.
 * Defaults to <b>FALSE</b> as of libcurl 7.66.0; formerly it defaulted to <b>TRUE</b>.
 * @link https://www.php.net/manual/en/function.curl-setopt.php
 * @since 7.3
 */
define('CURLOPT_HTTP09_ALLOWED', 285);

/**
 * @link https://www.php.net/manual/en/curl.constants.php
 * @since 7.3.6
 */
define('CURL_VERSION_ALTSVC', 16777216);

/**
 * @since 8.1
 */
define('CURLOPT_DOH_URL', 10279);

/**
 * @since 8.1
 */
define('CURLOPT_ISSUERCERT_BLOB', 40295);

/**
 * @since 8.1
 */
define('CURLOPT_PROXY_ISSUERCERT', 10296);

/**
 * @since 8.1
 */
define('CURLOPT_PROXY_ISSUERCERT_BLOB', 40297);

/**
 * @since 8.1
 */
define('CURLOPT_PROXY_SSLCERT_BLOB', 40293);

/**
 * @since 8.1
 */
define('CURLOPT_PROXY_SSLKEY_BLOB', 40294);

/**
 * @since 8.1
 */
define('CURLOPT_SSLCERT_BLOB', 40291);

/**
 * @since 8.1
 */
define('CURLOPT_SSLKEY_BLOB', 40292);

/**
 * @since 8.2
 */
define('CURLOPT_XFERINFOFUNCTION', 20219);

/**
 * @since 8.2
 */
define('CURLINFO_EFFECTIVE_METHOD', 1048634);

/**
 * @since 8.2
 */
define('CURLOPT_MAXFILESIZE_LARGE', 30117);

/**
 * @since 8.2
 */
define('CURLFTPMETHOD_DEFAULT', 0);

/**
 * @since 8.2
 */
define('CURLOPT_UPKEEP_INTERVAL_MS', 281);

/**
 * @since 8.2
 */
define('CURLOPT_UPLOAD_BUFFERSIZE', 280);

/**
 * @since 8.2
 */
define('CURLALTSVC_H1', 8);

/**
 * @since 8.2
 */
define('CURLALTSVC_H2', 16);

/**
 * @since 8.2
 */
define('CURLALTSVC_H3', 32);

/**
 * @since 8.2
 */
define('CURLALTSVC_READONLYFILE', 4);

/**
 * @since 8.2
 */
define('CURLOPT_ALTSVC', 10287);

/**
 * @since 8.2
 */
define('CURLOPT_ALTSVC_CTRL', 286);

/**
 * @since 8.2
 */
define('CURLOPT_MAXAGE_CONN', 288);

/**
 * @since 8.2
 */
define('CURLOPT_SASL_AUTHZID', 10289);

/**
 * @since 8.2
 */
define('CURL_VERSION_HTTP3', 33554432);

/**
 * @since 8.2
 */
define('CURLINFO_RETRY_AFTER', 6291513);

/**
 * @since 8.2
 */
define('CURLMOPT_MAX_CONCURRENT_STREAMS', 16);

/**
 * @since 8.2
 */
define('CURLSSLOPT_NO_PARTIALCHAIN', 4);

/**
 * @since 8.2
 */
define('CURLOPT_MAIL_RCPT_ALLLOWFAILS', 290);

/**
 * @since 8.2
 */
define('CURLSSLOPT_REVOKE_BEST_EFFORT', 8);

/**
 * @since 8.2
 */
define('CURLPROTO_MQTT', 268435456);

/**
 * @since 8.2
 */
define('CURLSSLOPT_NATIVE_CA', 16);

/**
 * @since 8.2
 */
define('CURL_VERSION_UNICODE', 134217728);

/**
 * @since 8.2
 */
define('CURL_VERSION_ZSTD', 67108864);

/**
 * @since 8.2
 */
define('CURLE_PROXY', 97);

/**
 * @since 8.2
 */
define('CURLINFO_PROXY_ERROR', 2097211);

/**
 * @since 8.2
 */
define('CURLOPT_SSL_EC_CURVES', 10298);

/**
 * @since 8.2
 */
define('CURLPX_BAD_ADDRESS_TYPE', 1);

/**
 * @since 8.2
 */
define('CURLPX_BAD_VERSION', 2);

/**
 * @since 8.2
 */
define('CURLPX_CLOSED', 3);

/**
 * @since 8.2
 */
define('CURLPX_GSSAPI', 4);

/**
 * @since 8.2
 */
define('CURLPX_GSSAPI_PERMSG', 5);

/**
 * @since 8.2
 */
define('CURLPX_GSSAPI_PROTECTION', 6);

/**
 * @since 8.2
 */
define('CURLPX_IDENTD', 7);

/**
 * @since 8.2
 */
define('CURLPX_IDENTD_DIFFER', 8);

/**
 * @since 8.2
 */
define('CURLPX_LONG_HOSTNAME', 9);

/**
 * @since 8.2
 */
define('CURLPX_LONG_PASSWD', 10);

/**
 * @since 8.2
 */
define('CURLPX_LONG_USER', 11);

/**
 * @since 8.2
 */
define('CURLPX_NO_AUTH', 12);

/**
 * @since 8.2
 */
define('CURLPX_OK', 0);

/**
 * @since 8.2
 */
define('CURLPX_RECV_ADDRESS', 13);

/**
 * @since 8.2
 */
define('CURLPX_RECV_AUTH', 14);

/**
 * @since 8.2
 */
define('CURLPX_RECV_CONNECT', 15);

/**
 * @since 8.2
 */
define('CURLPX_RECV_REQACK', 16);

/**
 * @since 8.2
 */
define('CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED', 17);

/**
 * @since 8.2
 */
define('CURLPX_REPLY_COMMAND_NOT_SUPPORTED', 18);

/**
 * @since 8.2
 */
define('CURLPX_REPLY_CONNECTION_REFUSED', 19);

/**
 * @since 8.2
 */
define('CURLPX_REPLY_GENERAL_SERVER_FAILURE', 20);

/**
 * @since 8.2
 */
define('CURLPX_REPLY_HOST_UNREACHABLE', 21);

/**
 * @since 8.2
 */
define('CURLPX_REPLY_NETWORK_UNREACHABLE', 22);

/**
 * @since 8.2
 */
define('CURLPX_REPLY_NOT_ALLOWED', 23);

/**
 * @since 8.2
 */
define('CURLPX_REPLY_TTL_EXPIRED', 24);

/**
 * @since 8.2
 */
define('CURLPX_REPLY_UNASSIGNED', 25);

/**
 * @since 8.2
 */
define('CURLPX_REQUEST_FAILED', 26);

/**
 * @since 8.2
 */
define('CURLPX_RESOLVE_HOST', 27);

/**
 * @since 8.2
 */
define('CURLPX_SEND_CONNECT', 29);

/**
 * @since 8.2
 */
define('CURLPX_SEND_AUTH', 28);

/**
 * @since 8.2
 */
define('CURLPX_SEND_REQUEST', 30);

/**
 * @since 8.2
 */
define('CURLPX_UNKNOWN_FAIL', 31);

/**
 * @since 8.2
 */
define('CURLPX_UNKNOWN_MODE', 32);

/**
 * @since 8.2
 */
define('CURLPX_USER_REJECTED', 33);

/**
 * @since 8.2
 */
define('CURLHSTS_ENABLE', 1);

/**
 * @since 8.2
 */
define('CURLHSTS_READONLYFILE', 2);

/**
 * @since 8.2
 */
define('CURLOPT_HSTS', 10300);

/**
 * @since 8.2
 */
define('CURLOPT_HSTS_CTRL', 299);

/**
 * @since 8.2
 */
define('CURL_VERSION_HSTS', 268435456);

/**
 * @since 8.2
 */
define('CURLAUTH_AWS_SIGV4', 128);

/**
 * @since 8.2
 */
define('CURLOPT_AWS_SIGV4', 10305);

/**
 * @since 8.2
 */
define('CURLINFO_REFERER', 1048636);

/**
 * @since 8.2
 */
define('CURLOPT_DOH_SSL_VERIFYHOST', 307);

/**
 * @since 8.2
 */
define('CURLOPT_DOH_SSL_VERIFYPEER', 306);

/**
 * @since 8.2
 */
define('CURLOPT_DOH_SSL_VERIFYSTATUS', 308);

/**
 * @since 8.2
 */
define('CURL_VERSION_GSASL', 536870912);

/**
 * @since 8.2
 */
define('CURLOPT_CAINFO_BLOB', 40309);

/**
 * @since 8.2
 */
define('CURLOPT_PROXY_CAINFO_BLOB', 40310);

/**
 * @since 8.2
 */
define('CURLSSLOPT_AUTO_CLIENT_CERT', 32);

/**
 * @since 8.2
 */
define('CURLOPT_MAXLIFETIME_CONN', 314);

/**
 * @since 8.2
 */
define('CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256', 10311);
<?php
declare(strict_types=1);

/**
 * Returns the name of the error
 *
 * @param int $errorCode Error code
 * @return string
 */
function kafka_err2name(int $errorCode): string {}

/**
 * Returns the error message of an error code
 *
 * @param int $errorCode Error code
 * @return string
 */
function kafka_err2str(int $errorCode): string {}

/**
 * Returns the full list of error codes.
 *
 * @return array<int, mixed>
 */
function kafka_get_err_descs(): array {}

/**
 * Returns an offset value that is $offset before the tail of the topic
 *
 * @param int $offset
 * @return int
 */
function kafka_offset_tail(int $offset): int {}

/**
 * Retrieve the current number of threads in use by librdkafka.
 *
 * @return int
 */
function kafka_thread_cnt(): int {}
<?php
declare(strict_types=1);

namespace SimpleKafkaClient;

class Message
{
    public int $err;
    public string $topic_name;
    public int $timestamp;
    public int $partition;
    public int $payload;
    public int $len;
    public string $key;
    public int $offset;

    /**
     * @var array<string, mixed>
     */
    public array $headers;

    /**
     * @return string
     */
    public function getErrorString(): string {}
}
<?php
declare(strict_types=1);

namespace SimpleKafkaClient;

class TopicPartition
{
    /**
     * TopicPartition constructor.
     * @param string $topicName
     * @param int $partition
     * @param int $offset
     */
    public function __construct(string $topicName, int $partition, int $offset = 0) {}

    /**
     * @return string|null
     * @throws Exception
     */
    public function getTopicName(): ?string {}

    /**
     * @param string $topicName
     * @return TopicPartition
     * @throws Exception
     */
    public function setTopicName(string $topicName): TopicPartition {}

    /**
     * @return int
     * @throws Exception
     */
    public function getPartition(): int {}

    /**
     * @param int $partition
     * @return TopicPartition
     */
    public function setPartition(int $partition): TopicPartition {}

    /**
     * @return int
     */
    public function getOffset(): int {}

    /**
     * @param int $offset
     * @return TopicPartition
     */
    public function setOffset(int $offset): TopicPartition {}
}
<?php
declare(strict_types=1);

namespace SimpleKafkaClient;

class Metadata
{
    /**
     * @return int
     * @throws Exception
     */
    public function getOrigBrokerId(): int {}

    /**
     * @return string
     * @throws Exception
     */
    public function getOrigBrokerName(): string {}

    /**
     * @return Metadata\Collection
     * @throws Exception
     */
    public function getBrokers(): Metadata\Collection {}

    /**
     * @return Metadata\Collection
     * @throws Exception
     */
    public function getTopics(): Metadata\Collection {}
}
<?php
declare(strict_types=1);

namespace SimpleKafkaClient;

abstract class Topic
{
    /**
     * @return string
     */
    public function getName(): string {}
}

class ConsumerTopic extends Topic
{
    private function __construct() {}
}

class ProducerTopic extends Topic
{
    private function __construct() {}

    /**
     * @param int $partition
     * @param int $msgFlags
     * @param string|null $payload
     * @param string|null $key
     * @throws Exception
     */
    public function produce(int $partition, int $msgFlags, ?string $payload = null, ?string $key = null): void {}

    /**
     * @param int $partition
     * @param int $msgFlags
     * @param string|null $payload
     * @param string|null $key
     * @param array<string, mixed>|null $headers
     * @param int|null $timestampMs
     * @throws Exception
     */
    public function producev(int $partition, int $msgFlags, ?string $payload = null, ?string $key = null, ?array $headers = null, ?int $timestampMs = null): void {}
}
<?php
declare(strict_types=1);

namespace SimpleKafkaClient\Metadata;

class Broker
{
    /**
     * @return int
     */
    public function getId(): int {}

    /**
     * @return string
     */
    public function getHost(): string {}

    /**
     * @return int
     */
    public function getPort(): int {}
}
<?php
declare(strict_types=1);

namespace SimpleKafkaClient\Metadata;

class Partition
{
    /**
     * @return int
     */
    public function getId(): int {}

    /**
     * @return int
     */
    public function getErrorCode(): int {}

    /**
     * @return int
     */
    public function getLeader(): int {}

    /**
     * @return Collection
     */
    public function getReplicas(): Collection {}

    /**
     * @return Collection
     */
    public function getIsrs(): Collection {}
}
<?php
declare(strict_types=1);

namespace SimpleKafkaClient\Metadata;

class Topic
{
    /**
     * @return string
     */
    public function getName(): string {}

    /**
     * @return int
     */
    public function getErrorCode(): int {}

    /**
     * @return Collection
     */
    public function getPartitions(): Collection {}
}
<?php
declare(strict_types=1);

namespace SimpleKafkaClient\Metadata;

class Collection
{
    /**
     * @return int
     */
    public function count(): int {}

    /**
     * @return void
     */
    public function rewind(): void {}

    /**
     * @return mixed
     */
    public function current() {}

    /**
     * @return int
     */
    public function key(): int {}

    /**
     * @return mixed
     */
    public function next() {}

    /**
     * @return bool
     */
    public function valid(): bool {}
}
<?php
declare(strict_types=1);

namespace SimpleKafkaClient;

use SimpleKafkaClient;

class Producer extends SimpleKafkaClient
{
    /**
     * Producer constructor.
     * @param Configuration $configuration
     * @throws Exception
     */
    public function __construct(Configuration $configuration) {}

    /**
     * @param int $timeoutMs
     * @throws Exception
     */
    public function initTransactions(int $timeoutMs): void {}

    /**
     * @return void
     * @throws Exception
     */
    public function beginTransaction(): void {}

    /**
     * @param int $timeoutMs
     * @throws Exception
     */
    public function commitTransaction(int $timeoutMs): void {}

    /**
     * @param int $timeoutMs
     * @throws Exception
     */
    public function abortTransaction(int $timeoutMs): void {}

    /**
     * @param int $timeoutMs
     * @return int
     */
    public function flush(int $timeoutMs): int {}

    /**
     * @param int $purgeFlags
     * @return int
     */
    public function purge(int $purgeFlags): int {}

    /**
     * @param string $topic
     * @return ProducerTopic
     */
    public function getTopicHandle(string $topic): ProducerTopic {}
}
<?php
declare(strict_types=1);

namespace SimpleKafkaClient;

class KafkaErrorException extends Exception
{
    /**
     * KafkaErrorException constructor.
     * @param string $message
     * @param int $code
     * @param string $error_string
     * @param bool $isFatal
     * @param bool $isRetriable
     * @param bool $transactionRequiresAbort
     */
    public function __construct(
        string $message,
        int $code,
        string $error_string,
        bool $isFatal,
        bool $isRetriable,
        bool $transactionRequiresAbort
    ) {}

    public function getErrorString(): string {}

    public function isFatal(): bool {}

    public function isRetriable(): bool {}

    public function transactionRequiresAbort(): bool {}
}
<?php
declare(strict_types=1);

namespace SimpleKafkaClient;

class Exception extends \Exception {}
<?php
declare(strict_types=1);

namespace SimpleKafkaClient;

use SimpleKafkaClient;

class Consumer extends SimpleKafkaClient
{
    /**
     * Consumer constructor.
     * @param Configuration $configuration
     * @throws Exception
     */
    public function __construct(Configuration $configuration) {}

    /**
     * @param TopicPartition[]|null $topicPartitions
     * @throws Exception
     */
    public function assign(?array $topicPartitions): void {}

    /**
     * @return TopicPartition[]
     * @throws Exception
     */
    public function getAssignment(): array {}

    /**
     * @param string[] $topics
     * @throws Exception
     */
    public function subscribe(array $topics): void {}

    /**
     * @return string[]
     * @throws Exception
     */
    public function getSubscription(): array {}

    /**
     * @return void
     * @throws Exception
     */
    public function unsubscribe(): void {}

    /**
     * @param int $timeoutMs
     * @return Message
     */
    public function consume(int $timeoutMs): Message {}

    /**
     * @param Message|TopicPartition[] $messageOrOffsets
     * @throws Exception
     */
    public function commit($messageOrOffsets): void {}

    /**
     * @param Message|TopicPartition[] $messageOrOffsets
     * @throws Exception
     */
    public function commitAsync($messageOrOffsets): void {}

    /**
     * @return void
     */
    public function close(): void {}

    /**
     * @param TopicPartition[] $topicPartitions
     * @param int $timeoutMs
     * @return TopicPartition[]
     * @throws Exception
     */
    public function getCommittedOffsets(array $topicPartitions, int $timeoutMs): array {}

    /**
     * @param TopicPartition[] $topicPartitions
     * @return TopicPartition[]
     * @throws Exception
     */
    public function getOffsetPositions(array $topicPartitions): array {}
}
<?php
declare(strict_types=1);

namespace SimpleKafkaClient;

class Configuration
{
    public function __construct() {}

    /**
     * @return array<string, mixed>
     */
    public function dump(): array {}

    /**
     * @param string $name
     * @param string $value
     */
    public function set(string $name, string $value): void {}

    /**
     * @param callable $callback
     */
    public function setErrorCb(callable $callback): void {}

    /**
     * @param callable $callback
     */
    public function setDrMsgCb(callable $callback): void {}

    /**
     * @param callable $callback
     */
    public function setStatsCb(callable $callback): void {}

    /**
     * @param callable $callback
     */
    public function setRebalanceCb(callable $callback): void {}

    /**
     * @param callable $callback
     */
    public function setOffsetCommitCb(callable $callback): void {}

    /**
     * @param callable $callback
     */
    public function setLogCb(callable $callback): void {}

    /**
     * @param callable $callback
     */
    public function setOAuthBearerTokenRefreshCb(callable $callback): void {}
}
<?php
declare(strict_types=1);

use SimpleKafkaClient\Exception;
use SimpleKafkaClient\Metadata;
use SimpleKafkaClient\Topic;
use SimpleKafkaClient\TopicPartition;

abstract class SimpleKafkaClient
{
    /**
     * @param bool $allTopics
     * @param int $timeoutMs
     * @param Topic $topic
     * @return Metadata
     * @throws Exception
     */
    public function getMetadata(bool $allTopics, int $timeoutMs, Topic $topic): Metadata {}

    /**
     * @return int
     */
    public function getOutQLen(): int {}

    /**
     * @param int $timeoutMs
     * @return int
     */
    public function poll(int $timeoutMs): int {}

    /**
     * @param string $topic
     * @param int $partition
     * @param int $low is passed as reference, contains result after call
     * @param int $high is passed as reference, contains result after call
     * @param int $timeoutMs
     * @throws Exception
     */
    public function queryWatermarkOffsets(string $topic, int $partition, int &$low, int &$high, int $timeoutMs): void {}

    /**
     * @param TopicPartition[] $topicPartitions
     * @param int $timeoutMs
     * @return TopicPartition[]
     * @throws Exception
     */
    public function offsetsForTimes(array $topicPartitions, int $timeoutMs): array {}

    /**
     * @param string $errorString
     */
    public function setOAuthBearerTokenFailure(string $errorString): void {}

    /**
     * @param string $token
     * @param int $lifetimeMs
     * @param string $principalName
     * @param string[]|null $extensions
     */
    public function setOAuthBearerToken(string $token, int $lifetimeMs, string $principalName, ?array $extensions = null): void {}
}
BSD 3-Clause License

Copyright (c) 2011, Nikita Popov
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
   list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
   contributors may be used to endorse or promote products derived from
   this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<?php

declare (strict_types=1);
namespace PhpParser;

class NodeTraverser implements \PhpParser\NodeTraverserInterface
{
    /**
     * If NodeVisitor::enterNode() returns DONT_TRAVERSE_CHILDREN, child nodes
     * of the current node will not be traversed for any visitors.
     *
     * For subsequent visitors enterNode() will still be called on the current
     * node and leaveNode() will also be invoked for the current node.
     */
    const DONT_TRAVERSE_CHILDREN = 1;
    /**
     * If NodeVisitor::enterNode() or NodeVisitor::leaveNode() returns
     * STOP_TRAVERSAL, traversal is aborted.
     *
     * The afterTraverse() method will still be invoked.
     */
    const STOP_TRAVERSAL = 2;
    /**
     * If NodeVisitor::leaveNode() returns REMOVE_NODE for a node that occurs
     * in an array, it will be removed from the array.
     *
     * For subsequent visitors leaveNode() will still be invoked for the
     * removed node.
     */
    const REMOVE_NODE = 3;
    /**
     * If NodeVisitor::enterNode() returns DONT_TRAVERSE_CURRENT_AND_CHILDREN, child nodes
     * of the current node will not be traversed for any visitors.
     *
     * For subsequent visitors enterNode() will not be called as well.
     * leaveNode() will be invoked for visitors that has enterNode() method invoked.
     */
    const DONT_TRAVERSE_CURRENT_AND_CHILDREN = 4;
    /** @var NodeVisitor[] Visitors */
    protected $visitors = [];
    /** @var bool Whether traversal should be stopped */
    protected $stopTraversal;
    public function __construct()
    {
        // for BC
    }
    /**
     * Adds a visitor.
     *
     * @param NodeVisitor $visitor Visitor to add
     */
    public function addVisitor(\PhpParser\NodeVisitor $visitor)
    {
        $this->visitors[] = $visitor;
    }
    /**
     * Removes an added visitor.
     *
     * @param NodeVisitor $visitor
     */
    public function removeVisitor(\PhpParser\NodeVisitor $visitor)
    {
        foreach ($this->visitors as $index => $storedVisitor) {
            if ($storedVisitor === $visitor) {
                unset($this->visitors[$index]);
                break;
            }
        }
    }
    /**
     * Traverses an array of nodes using the registered visitors.
     *
     * @param Node[] $nodes Array of nodes
     *
     * @return Node[] Traversed array of nodes
     */
    public function traverse(array $nodes) : array
    {
        $this->stopTraversal = \false;
        foreach ($this->visitors as $visitor) {
            if (null !== ($return = $visitor->beforeTraverse($nodes))) {
                $nodes = $return;
            }
        }
        $nodes = $this->traverseArray($nodes);
        foreach ($this->visitors as $visitor) {
            if (null !== ($return = $visitor->afterTraverse($nodes))) {
                $nodes = $return;
            }
        }
        return $nodes;
    }
    /**
     * Recursively traverse a node.
     *
     * @param Node $node Node to traverse.
     *
     * @return Node Result of traversal (may be original node or new one)
     */
    protected function traverseNode(\PhpParser\Node $node) : \PhpParser\Node
    {
        foreach ($node->getSubNodeNames() as $name) {
            $subNode =& $node->{$name};
            if (\is_array($subNode)) {
                $subNode = $this->traverseArray($subNode);
                if ($this->stopTraversal) {
                    break;
                }
            } elseif ($subNode instanceof \PhpParser\Node) {
                $traverseChildren = \true;
                $breakVisitorIndex = null;
                foreach ($this->visitors as $visitorIndex => $visitor) {
                    $return = $visitor->enterNode($subNode);
                    if (null !== $return) {
                        if ($return instanceof \PhpParser\Node) {
                            $this->ensureReplacementReasonable($subNode, $return);
                            $subNode = $return;
                        } elseif (self::DONT_TRAVERSE_CHILDREN === $return) {
                            $traverseChildren = \false;
                        } elseif (self::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) {
                            $traverseChildren = \false;
                            $breakVisitorIndex = $visitorIndex;
                            break;
                        } elseif (self::STOP_TRAVERSAL === $return) {
                            $this->stopTraversal = \true;
                            break 2;
                        } else {
                            throw new \LogicException('enterNode() returned invalid value of type ' . \gettype($return));
                        }
                    }
                }
                if ($traverseChildren) {
                    $subNode = $this->traverseNode($subNode);
                    if ($this->stopTraversal) {
                        break;
                    }
                }
                foreach ($this->visitors as $visitorIndex => $visitor) {
                    $return = $visitor->leaveNode($subNode);
                    if (null !== $return) {
                        if ($return instanceof \PhpParser\Node) {
                            $this->ensureReplacementReasonable($subNode, $return);
                            $subNode = $return;
                        } elseif (self::STOP_TRAVERSAL === $return) {
                            $this->stopTraversal = \true;
                            break 2;
                        } elseif (\is_array($return)) {
                            throw new \LogicException('leaveNode() may only return an array ' . 'if the parent structure is an array');
                        } else {
                            throw new \LogicException('leaveNode() returned invalid value of type ' . \gettype($return));
                        }
                    }
                    if ($breakVisitorIndex === $visitorIndex) {
                        break;
                    }
                }
            }
        }
        return $node;
    }
    /**
     * Recursively traverse array (usually of nodes).
     *
     * @param array $nodes Array to traverse
     *
     * @return array Result of traversal (may be original array or changed one)
     */
    protected function traverseArray(array $nodes) : array
    {
        $doNodes = [];
        foreach ($nodes as $i => &$node) {
            if ($node instanceof \PhpParser\Node) {
                $traverseChildren = \true;
                $breakVisitorIndex = null;
                foreach ($this->visitors as $visitorIndex => $visitor) {
                    $return = $visitor->enterNode($node);
                    if (null !== $return) {
                        if ($return instanceof \PhpParser\Node) {
                            $this->ensureReplacementReasonable($node, $return);
                            $node = $return;
                        } elseif (self::DONT_TRAVERSE_CHILDREN === $return) {
                            $traverseChildren = \false;
                        } elseif (self::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) {
                            $traverseChildren = \false;
                            $breakVisitorIndex = $visitorIndex;
                            break;
                        } elseif (self::STOP_TRAVERSAL === $return) {
                            $this->stopTraversal = \true;
                            break 2;
                        } else {
                            throw new \LogicException('enterNode() returned invalid value of type ' . \gettype($return));
                        }
                    }
                }
                if ($traverseChildren) {
                    $node = $this->traverseNode($node);
                    if ($this->stopTraversal) {
                        break;
                    }
                }
                foreach ($this->visitors as $visitorIndex => $visitor) {
                    $return = $visitor->leaveNode($node);
                    if (null !== $return) {
                        if ($return instanceof \PhpParser\Node) {
                            $this->ensureReplacementReasonable($node, $return);
                            $node = $return;
                        } elseif (\is_array($return)) {
                            $doNodes[] = [$i, $return];
                            break;
                        } elseif (self::REMOVE_NODE === $return) {
                            $doNodes[] = [$i, []];
                            break;
                        } elseif (self::STOP_TRAVERSAL === $return) {
                            $this->stopTraversal = \true;
                            break 2;
                        } elseif (\false === $return) {
                            throw new \LogicException('bool(false) return from leaveNode() no longer supported. ' . 'Return NodeTraverser::REMOVE_NODE instead');
                        } else {
                            throw new \LogicException('leaveNode() returned invalid value of type ' . \gettype($return));
                        }
                    }
                    if ($breakVisitorIndex === $visitorIndex) {
                        break;
                    }
                }
            } elseif (\is_array($node)) {
                throw new \LogicException('Invalid node structure: Contains nested arrays');
            }
        }
        if (!empty($doNodes)) {
            while (list($i, $replace) = \array_pop($doNodes)) {
                \array_splice($nodes, $i, 1, $replace);
            }
        }
        return $nodes;
    }
    private function ensureReplacementReasonable($old, $new)
    {
        if ($old instanceof \PhpParser\Node\Stmt && $new instanceof \PhpParser\Node\Expr) {
            throw new \LogicException("Trying to replace statement ({$old->getType()}) " . "with expression ({$new->getType()}). Are you missing a " . "Stmt_Expression wrapper?");
        }
        if ($old instanceof \PhpParser\Node\Expr && $new instanceof \PhpParser\Node\Stmt) {
            throw new \LogicException("Trying to replace expression ({$old->getType()}) " . "with statement ({$new->getType()})");
        }
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Internal;

/**
 * Provides operations on token streams, for use by pretty printer.
 *
 * @internal
 */
class TokenStream
{
    /** @var array Tokens (in token_get_all format) */
    private $tokens;
    /** @var int[] Map from position to indentation */
    private $indentMap;
    /**
     * Create token stream instance.
     *
     * @param array $tokens Tokens in token_get_all() format
     */
    public function __construct(array $tokens)
    {
        $this->tokens = $tokens;
        $this->indentMap = $this->calcIndentMap();
    }
    /**
     * Whether the given position is immediately surrounded by parenthesis.
     *
     * @param int $startPos Start position
     * @param int $endPos   End position
     *
     * @return bool
     */
    public function haveParens(int $startPos, int $endPos) : bool
    {
        return $this->haveTokenImmediatelyBefore($startPos, '(') && $this->haveTokenImmediatelyAfter($endPos, ')');
    }
    /**
     * Whether the given position is immediately surrounded by braces.
     *
     * @param int $startPos Start position
     * @param int $endPos   End position
     *
     * @return bool
     */
    public function haveBraces(int $startPos, int $endPos) : bool
    {
        return ($this->haveTokenImmediatelyBefore($startPos, '{') || $this->haveTokenImmediatelyBefore($startPos, \T_CURLY_OPEN)) && $this->haveTokenImmediatelyAfter($endPos, '}');
    }
    /**
     * Check whether the position is directly preceded by a certain token type.
     *
     * During this check whitespace and comments are skipped.
     *
     * @param int        $pos               Position before which the token should occur
     * @param int|string $expectedTokenType Token to check for
     *
     * @return bool Whether the expected token was found
     */
    public function haveTokenImmediatelyBefore(int $pos, $expectedTokenType) : bool
    {
        $tokens = $this->tokens;
        $pos--;
        for (; $pos >= 0; $pos--) {
            $tokenType = $tokens[$pos][0];
            if ($tokenType === $expectedTokenType) {
                return \true;
            }
            if ($tokenType !== \T_WHITESPACE && $tokenType !== \T_COMMENT && $tokenType !== \T_DOC_COMMENT) {
                break;
            }
        }
        return \false;
    }
    /**
     * Check whether the position is directly followed by a certain token type.
     *
     * During this check whitespace and comments are skipped.
     *
     * @param int        $pos               Position after which the token should occur
     * @param int|string $expectedTokenType Token to check for
     *
     * @return bool Whether the expected token was found
     */
    public function haveTokenImmediatelyAfter(int $pos, $expectedTokenType) : bool
    {
        $tokens = $this->tokens;
        $pos++;
        for (; $pos < \count($tokens); $pos++) {
            $tokenType = $tokens[$pos][0];
            if ($tokenType === $expectedTokenType) {
                return \true;
            }
            if ($tokenType !== \T_WHITESPACE && $tokenType !== \T_COMMENT && $tokenType !== \T_DOC_COMMENT) {
                break;
            }
        }
        return \false;
    }
    public function skipLeft(int $pos, $skipTokenType)
    {
        $tokens = $this->tokens;
        $pos = $this->skipLeftWhitespace($pos);
        if ($skipTokenType === \T_WHITESPACE) {
            return $pos;
        }
        if ($tokens[$pos][0] !== $skipTokenType) {
            // Shouldn't happen. The skip token MUST be there
            throw new \Exception('Encountered unexpected token');
        }
        $pos--;
        return $this->skipLeftWhitespace($pos);
    }
    public function skipRight(int $pos, $skipTokenType)
    {
        $tokens = $this->tokens;
        $pos = $this->skipRightWhitespace($pos);
        if ($skipTokenType === \T_WHITESPACE) {
            return $pos;
        }
        if ($tokens[$pos][0] !== $skipTokenType) {
            // Shouldn't happen. The skip token MUST be there
            throw new \Exception('Encountered unexpected token');
        }
        $pos++;
        return $this->skipRightWhitespace($pos);
    }
    /**
     * Return first non-whitespace token position smaller or equal to passed position.
     *
     * @param int $pos Token position
     * @return int Non-whitespace token position
     */
    public function skipLeftWhitespace(int $pos)
    {
        $tokens = $this->tokens;
        for (; $pos >= 0; $pos--) {
            $type = $tokens[$pos][0];
            if ($type !== \T_WHITESPACE && $type !== \T_COMMENT && $type !== \T_DOC_COMMENT) {
                break;
            }
        }
        return $pos;
    }
    /**
     * Return first non-whitespace position greater or equal to passed position.
     *
     * @param int $pos Token position
     * @return int Non-whitespace token position
     */
    public function skipRightWhitespace(int $pos)
    {
        $tokens = $this->tokens;
        for ($count = \count($tokens); $pos < $count; $pos++) {
            $type = $tokens[$pos][0];
            if ($type !== \T_WHITESPACE && $type !== \T_COMMENT && $type !== \T_DOC_COMMENT) {
                break;
            }
        }
        return $pos;
    }
    public function findRight(int $pos, $findTokenType)
    {
        $tokens = $this->tokens;
        for ($count = \count($tokens); $pos < $count; $pos++) {
            $type = $tokens[$pos][0];
            if ($type === $findTokenType) {
                return $pos;
            }
        }
        return -1;
    }
    /**
     * Whether the given position range contains a certain token type.
     *
     * @param int $startPos Starting position (inclusive)
     * @param int $endPos Ending position (exclusive)
     * @param int|string $tokenType Token type to look for
     * @return bool Whether the token occurs in the given range
     */
    public function haveTokenInRange(int $startPos, int $endPos, $tokenType)
    {
        $tokens = $this->tokens;
        for ($pos = $startPos; $pos < $endPos; $pos++) {
            if ($tokens[$pos][0] === $tokenType) {
                return \true;
            }
        }
        return \false;
    }
    public function haveBracesInRange(int $startPos, int $endPos)
    {
        return $this->haveTokenInRange($startPos, $endPos, '{') || $this->haveTokenInRange($startPos, $endPos, \T_CURLY_OPEN) || $this->haveTokenInRange($startPos, $endPos, '}');
    }
    public function haveTagInRange(int $startPos, int $endPos) : bool
    {
        return $this->haveTokenInRange($startPos, $endPos, \T_OPEN_TAG) || $this->haveTokenInRange($startPos, $endPos, \T_CLOSE_TAG);
    }
    /**
     * Get indentation before token position.
     *
     * @param int $pos Token position
     *
     * @return int Indentation depth (in spaces)
     */
    public function getIndentationBefore(int $pos) : int
    {
        return $this->indentMap[$pos];
    }
    /**
     * Get the code corresponding to a token offset range, optionally adjusted for indentation.
     *
     * @param int $from   Token start position (inclusive)
     * @param int $to     Token end position (exclusive)
     * @param int $indent By how much the code should be indented (can be negative as well)
     *
     * @return string Code corresponding to token range, adjusted for indentation
     */
    public function getTokenCode(int $from, int $to, int $indent) : string
    {
        $tokens = $this->tokens;
        $result = '';
        for ($pos = $from; $pos < $to; $pos++) {
            $token = $tokens[$pos];
            if (\is_array($token)) {
                $type = $token[0];
                $content = $token[1];
                if ($type === \T_CONSTANT_ENCAPSED_STRING || $type === \T_ENCAPSED_AND_WHITESPACE) {
                    $result .= $content;
                } else {
                    // TODO Handle non-space indentation
                    if ($indent < 0) {
                        $result .= \str_replace("\n" . \str_repeat(" ", -$indent), "\n", $content);
                    } elseif ($indent > 0) {
                        $result .= \str_replace("\n", "\n" . \str_repeat(" ", $indent), $content);
                    } else {
                        $result .= $content;
                    }
                }
            } else {
                $result .= $token;
            }
        }
        return $result;
    }
    /**
     * Precalculate the indentation at every token position.
     *
     * @return int[] Token position to indentation map
     */
    private function calcIndentMap()
    {
        $indentMap = [];
        $indent = 0;
        foreach ($this->tokens as $token) {
            $indentMap[] = $indent;
            if ($token[0] === \T_WHITESPACE) {
                $content = $token[1];
                $newlinePos = \strrpos($content, "\n");
                if (\false !== $newlinePos) {
                    $indent = \strlen($content) - $newlinePos - 1;
                }
            }
        }
        // Add a sentinel for one past end of the file
        $indentMap[] = $indent;
        return $indentMap;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Internal;

use PhpParser\Node;
use PhpParser\Node\Expr;
/**
 * This node is used internally by the format-preserving pretty printer to print anonymous classes.
 *
 * The normal anonymous class structure violates assumptions about the order of token offsets.
 * Namely, the constructor arguments are part of the Expr\New_ node and follow the class node, even
 * though they are actually interleaved with them. This special node type is used temporarily to
 * restore a sane token offset order.
 *
 * @internal
 */
class PrintableNewAnonClassNode extends Expr
{
    /** @var Node\AttributeGroup[] PHP attribute groups */
    public $attrGroups;
    /** @var Node\Arg[] Arguments */
    public $args;
    /** @var null|Node\Name Name of extended class */
    public $extends;
    /** @var Node\Name[] Names of implemented interfaces */
    public $implements;
    /** @var Node\Stmt[] Statements */
    public $stmts;
    public function __construct(array $attrGroups, array $args, Node\Name $extends = null, array $implements, array $stmts, array $attributes)
    {
        parent::__construct($attributes);
        $this->attrGroups = $attrGroups;
        $this->args = $args;
        $this->extends = $extends;
        $this->implements = $implements;
        $this->stmts = $stmts;
    }
    public static function fromNewNode(Expr\New_ $newNode)
    {
        $class = $newNode->class;
        \assert($class instanceof Node\Stmt\Class_);
        // We don't assert that $class->name is null here, to allow consumers to assign unique names
        // to anonymous classes for their own purposes. We simplify ignore the name here.
        return new self($class->attrGroups, $newNode->args, $class->extends, $class->implements, $class->stmts, $newNode->getAttributes());
    }
    public function getType() : string
    {
        return 'Expr_PrintableNewAnonClass';
    }
    public function getSubNodeNames() : array
    {
        return ['attrGroups', 'args', 'extends', 'implements', 'stmts'];
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Internal;

/**
 * Implements the Myers diff algorithm.
 *
 * Myers, Eugene W. "An O (ND) difference algorithm and its variations."
 * Algorithmica 1.1 (1986): 251-266.
 *
 * @internal
 */
class Differ
{
    private $isEqual;
    /**
     * Create differ over the given equality relation.
     *
     * @param callable $isEqual Equality relation with signature function($a, $b) : bool
     */
    public function __construct(callable $isEqual)
    {
        $this->isEqual = $isEqual;
    }
    /**
     * Calculate diff (edit script) from $old to $new.
     *
     * @param array $old Original array
     * @param array $new New array
     *
     * @return DiffElem[] Diff (edit script)
     */
    public function diff(array $old, array $new)
    {
        list($trace, $x, $y) = $this->calculateTrace($old, $new);
        return $this->extractDiff($trace, $x, $y, $old, $new);
    }
    /**
     * Calculate diff, including "replace" operations.
     *
     * If a sequence of remove operations is followed by the same number of add operations, these
     * will be coalesced into replace operations.
     *
     * @param array $old Original array
     * @param array $new New array
     *
     * @return DiffElem[] Diff (edit script), including replace operations
     */
    public function diffWithReplacements(array $old, array $new)
    {
        return $this->coalesceReplacements($this->diff($old, $new));
    }
    private function calculateTrace(array $a, array $b)
    {
        $n = \count($a);
        $m = \count($b);
        $max = $n + $m;
        $v = [1 => 0];
        $trace = [];
        for ($d = 0; $d <= $max; $d++) {
            $trace[] = $v;
            for ($k = -$d; $k <= $d; $k += 2) {
                if ($k === -$d || $k !== $d && $v[$k - 1] < $v[$k + 1]) {
                    $x = $v[$k + 1];
                } else {
                    $x = $v[$k - 1] + 1;
                }
                $y = $x - $k;
                while ($x < $n && $y < $m && ($this->isEqual)($a[$x], $b[$y])) {
                    $x++;
                    $y++;
                }
                $v[$k] = $x;
                if ($x >= $n && $y >= $m) {
                    return [$trace, $x, $y];
                }
            }
        }
        throw new \Exception('Should not happen');
    }
    private function extractDiff(array $trace, int $x, int $y, array $a, array $b)
    {
        $result = [];
        for ($d = \count($trace) - 1; $d >= 0; $d--) {
            $v = $trace[$d];
            $k = $x - $y;
            if ($k === -$d || $k !== $d && $v[$k - 1] < $v[$k + 1]) {
                $prevK = $k + 1;
            } else {
                $prevK = $k - 1;
            }
            $prevX = $v[$prevK];
            $prevY = $prevX - $prevK;
            while ($x > $prevX && $y > $prevY) {
                $result[] = new \PhpParser\Internal\DiffElem(\PhpParser\Internal\DiffElem::TYPE_KEEP, $a[$x - 1], $b[$y - 1]);
                $x--;
                $y--;
            }
            if ($d === 0) {
                break;
            }
            while ($x > $prevX) {
                $result[] = new \PhpParser\Internal\DiffElem(\PhpParser\Internal\DiffElem::TYPE_REMOVE, $a[$x - 1], null);
                $x--;
            }
            while ($y > $prevY) {
                $result[] = new \PhpParser\Internal\DiffElem(\PhpParser\Internal\DiffElem::TYPE_ADD, null, $b[$y - 1]);
                $y--;
            }
        }
        return \array_reverse($result);
    }
    /**
     * Coalesce equal-length sequences of remove+add into a replace operation.
     *
     * @param DiffElem[] $diff
     * @return DiffElem[]
     */
    private function coalesceReplacements(array $diff)
    {
        $newDiff = [];
        $c = \count($diff);
        for ($i = 0; $i < $c; $i++) {
            $diffType = $diff[$i]->type;
            if ($diffType !== \PhpParser\Internal\DiffElem::TYPE_REMOVE) {
                $newDiff[] = $diff[$i];
                continue;
            }
            $j = $i;
            while ($j < $c && $diff[$j]->type === \PhpParser\Internal\DiffElem::TYPE_REMOVE) {
                $j++;
            }
            $k = $j;
            while ($k < $c && $diff[$k]->type === \PhpParser\Internal\DiffElem::TYPE_ADD) {
                $k++;
            }
            if ($j - $i === $k - $j) {
                $len = $j - $i;
                for ($n = 0; $n < $len; $n++) {
                    $newDiff[] = new \PhpParser\Internal\DiffElem(\PhpParser\Internal\DiffElem::TYPE_REPLACE, $diff[$i + $n]->old, $diff[$j + $n]->new);
                }
            } else {
                for (; $i < $k; $i++) {
                    $newDiff[] = $diff[$i];
                }
            }
            $i = $k - 1;
        }
        return $newDiff;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Internal;

/**
 * @internal
 */
class DiffElem
{
    const TYPE_KEEP = 0;
    const TYPE_REMOVE = 1;
    const TYPE_ADD = 2;
    const TYPE_REPLACE = 3;
    /** @var int One of the TYPE_* constants */
    public $type;
    /** @var mixed Is null for add operations */
    public $old;
    /** @var mixed Is null for remove operations */
    public $new;
    public function __construct(int $type, $old, $new)
    {
        $this->type = $type;
        $this->old = $old;
        $this->new = $new;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser;

interface ErrorHandler
{
    /**
     * Handle an error generated during lexing, parsing or some other operation.
     *
     * @param Error $error The error that needs to be handled
     */
    public function handleError(\PhpParser\Error $error);
}
<?php

declare (strict_types=1);
namespace PhpParser;

/*
 * This parser is based on a skeleton written by Moriyoshi Koizumi, which in
 * turn is based on work by Masato Bito.
 */
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\Cast\Double;
use PhpParser\Node\Name;
use PhpParser\Node\Param;
use PhpParser\Node\Scalar\Encapsed;
use PhpParser\Node\Scalar\LNumber;
use PhpParser\Node\Scalar\String_;
use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\ClassConst;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Else_;
use PhpParser\Node\Stmt\ElseIf_;
use PhpParser\Node\Stmt\Enum_;
use PhpParser\Node\Stmt\Interface_;
use PhpParser\Node\Stmt\Namespace_;
use PhpParser\Node\Stmt\Nop;
use PhpParser\Node\Stmt\Property;
use PhpParser\Node\Stmt\TryCatch;
use PhpParser\Node\Stmt\UseUse;
use PhpParser\Node\VarLikeIdentifier;
abstract class ParserAbstract implements \PhpParser\Parser
{
    const SYMBOL_NONE = -1;
    /*
     * The following members will be filled with generated parsing data:
     */
    /** @var int Size of $tokenToSymbol map */
    protected $tokenToSymbolMapSize;
    /** @var int Size of $action table */
    protected $actionTableSize;
    /** @var int Size of $goto table */
    protected $gotoTableSize;
    /** @var int Symbol number signifying an invalid token */
    protected $invalidSymbol;
    /** @var int Symbol number of error recovery token */
    protected $errorSymbol;
    /** @var int Action number signifying default action */
    protected $defaultAction;
    /** @var int Rule number signifying that an unexpected token was encountered */
    protected $unexpectedTokenRule;
    protected $YY2TBLSTATE;
    /** @var int Number of non-leaf states */
    protected $numNonLeafStates;
    /** @var int[] Map of lexer tokens to internal symbols */
    protected $tokenToSymbol;
    /** @var string[] Map of symbols to their names */
    protected $symbolToName;
    /** @var array Names of the production rules (only necessary for debugging) */
    protected $productions;
    /** @var int[] Map of states to a displacement into the $action table. The corresponding action for this
     *             state/symbol pair is $action[$actionBase[$state] + $symbol]. If $actionBase[$state] is 0, the
     *             action is defaulted, i.e. $actionDefault[$state] should be used instead. */
    protected $actionBase;
    /** @var int[] Table of actions. Indexed according to $actionBase comment. */
    protected $action;
    /** @var int[] Table indexed analogously to $action. If $actionCheck[$actionBase[$state] + $symbol] != $symbol
     *             then the action is defaulted, i.e. $actionDefault[$state] should be used instead. */
    protected $actionCheck;
    /** @var int[] Map of states to their default action */
    protected $actionDefault;
    /** @var callable[] Semantic action callbacks */
    protected $reduceCallbacks;
    /** @var int[] Map of non-terminals to a displacement into the $goto table. The corresponding goto state for this
     *             non-terminal/state pair is $goto[$gotoBase[$nonTerminal] + $state] (unless defaulted) */
    protected $gotoBase;
    /** @var int[] Table of states to goto after reduction. Indexed according to $gotoBase comment. */
    protected $goto;
    /** @var int[] Table indexed analogously to $goto. If $gotoCheck[$gotoBase[$nonTerminal] + $state] != $nonTerminal
     *             then the goto state is defaulted, i.e. $gotoDefault[$nonTerminal] should be used. */
    protected $gotoCheck;
    /** @var int[] Map of non-terminals to the default state to goto after their reduction */
    protected $gotoDefault;
    /** @var int[] Map of rules to the non-terminal on their left-hand side, i.e. the non-terminal to use for
     *             determining the state to goto after reduction. */
    protected $ruleToNonTerminal;
    /** @var int[] Map of rules to the length of their right-hand side, which is the number of elements that have to
     *             be popped from the stack(s) on reduction. */
    protected $ruleToLength;
    /*
     * The following members are part of the parser state:
     */
    /** @var Lexer Lexer that is used when parsing */
    protected $lexer;
    /** @var mixed Temporary value containing the result of last semantic action (reduction) */
    protected $semValue;
    /** @var array Semantic value stack (contains values of tokens and semantic action results) */
    protected $semStack;
    /** @var array[] Start attribute stack */
    protected $startAttributeStack;
    /** @var array[] End attribute stack */
    protected $endAttributeStack;
    /** @var array End attributes of last *shifted* token */
    protected $endAttributes;
    /** @var array Start attributes of last *read* token */
    protected $lookaheadStartAttributes;
    /** @var ErrorHandler Error handler */
    protected $errorHandler;
    /** @var int Error state, used to avoid error floods */
    protected $errorState;
    /**
     * Initialize $reduceCallbacks map.
     */
    protected abstract function initReduceCallbacks();
    /**
     * Creates a parser instance.
     *
     * Options: Currently none.
     *
     * @param Lexer $lexer A lexer
     * @param array $options Options array.
     */
    public function __construct(\PhpParser\Lexer $lexer, array $options = [])
    {
        $this->lexer = $lexer;
        if (isset($options['throwOnError'])) {
            throw new \LogicException('"throwOnError" is no longer supported, use "errorHandler" instead');
        }
        $this->initReduceCallbacks();
    }
    /**
     * Parses PHP code into a node tree.
     *
     * If a non-throwing error handler is used, the parser will continue parsing after an error
     * occurred and attempt to build a partial AST.
     *
     * @param string $code The source code to parse
     * @param ErrorHandler|null $errorHandler Error handler to use for lexer/parser errors, defaults
     *                                        to ErrorHandler\Throwing.
     *
     * @return Node\Stmt[]|null Array of statements (or null non-throwing error handler is used and
     *                          the parser was unable to recover from an error).
     */
    public function parse(string $code, \PhpParser\ErrorHandler $errorHandler = null)
    {
        $this->errorHandler = $errorHandler ?: new \PhpParser\ErrorHandler\Throwing();
        $this->lexer->startLexing($code, $this->errorHandler);
        $result = $this->doParse();
        // Clear out some of the interior state, so we don't hold onto unnecessary
        // memory between uses of the parser
        $this->startAttributeStack = [];
        $this->endAttributeStack = [];
        $this->semStack = [];
        $this->semValue = null;
        return $result;
    }
    protected function doParse()
    {
        // We start off with no lookahead-token
        $symbol = self::SYMBOL_NONE;
        // The attributes for a node are taken from the first and last token of the node.
        // From the first token only the startAttributes are taken and from the last only
        // the endAttributes. Both are merged using the array union operator (+).
        $startAttributes = [];
        $endAttributes = [];
        $this->endAttributes = $endAttributes;
        // Keep stack of start and end attributes
        $this->startAttributeStack = [];
        $this->endAttributeStack = [$endAttributes];
        // Start off in the initial state and keep a stack of previous states
        $state = 0;
        $stateStack = [$state];
        // Semantic value stack (contains values of tokens and semantic action results)
        $this->semStack = [];
        // Current position in the stack(s)
        $stackPos = 0;
        $this->errorState = 0;
        for (;;) {
            //$this->traceNewState($state, $symbol);
            if ($this->actionBase[$state] === 0) {
                $rule = $this->actionDefault[$state];
            } else {
                if ($symbol === self::SYMBOL_NONE) {
                    // Fetch the next token id from the lexer and fetch additional info by-ref.
                    // The end attributes are fetched into a temporary variable and only set once the token is really
                    // shifted (not during read). Otherwise you would sometimes get off-by-one errors, when a rule is
                    // reduced after a token was read but not yet shifted.
                    $tokenId = $this->lexer->getNextToken($tokenValue, $startAttributes, $endAttributes);
                    // map the lexer token id to the internally used symbols
                    $symbol = $tokenId >= 0 && $tokenId < $this->tokenToSymbolMapSize ? $this->tokenToSymbol[$tokenId] : $this->invalidSymbol;
                    if ($symbol === $this->invalidSymbol) {
                        throw new \RangeException(\sprintf('The lexer returned an invalid token (id=%d, value=%s)', $tokenId, $tokenValue));
                    }
                    // Allow productions to access the start attributes of the lookahead token.
                    $this->lookaheadStartAttributes = $startAttributes;
                    //$this->traceRead($symbol);
                }
                $idx = $this->actionBase[$state] + $symbol;
                if (($idx >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol || $state < $this->YY2TBLSTATE && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $symbol) >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol) && ($action = $this->action[$idx]) !== $this->defaultAction) {
                    /*
                     * >= numNonLeafStates: shift and reduce
                     * > 0: shift
                     * = 0: accept
                     * < 0: reduce
                     * = -YYUNEXPECTED: error
                     */
                    if ($action > 0) {
                        /* shift */
                        //$this->traceShift($symbol);
                        ++$stackPos;
                        $stateStack[$stackPos] = $state = $action;
                        $this->semStack[$stackPos] = $tokenValue;
                        $this->startAttributeStack[$stackPos] = $startAttributes;
                        $this->endAttributeStack[$stackPos] = $endAttributes;
                        $this->endAttributes = $endAttributes;
                        $symbol = self::SYMBOL_NONE;
                        if ($this->errorState) {
                            --$this->errorState;
                        }
                        if ($action < $this->numNonLeafStates) {
                            continue;
                        }
                        /* $yyn >= numNonLeafStates means shift-and-reduce */
                        $rule = $action - $this->numNonLeafStates;
                    } else {
                        $rule = -$action;
                    }
                } else {
                    $rule = $this->actionDefault[$state];
                }
            }
            for (;;) {
                if ($rule === 0) {
                    /* accept */
                    //$this->traceAccept();
                    return $this->semValue;
                } elseif ($rule !== $this->unexpectedTokenRule) {
                    /* reduce */
                    //$this->traceReduce($rule);
                    try {
                        $this->reduceCallbacks[$rule]($stackPos);
                    } catch (\PhpParser\Error $e) {
                        if (-1 === $e->getStartLine() && isset($startAttributes['startLine'])) {
                            $e->setStartLine($startAttributes['startLine']);
                        }
                        $this->emitError($e);
                        // Can't recover from this type of error
                        return null;
                    }
                    /* Goto - shift nonterminal */
                    $lastEndAttributes = $this->endAttributeStack[$stackPos];
                    $ruleLength = $this->ruleToLength[$rule];
                    $stackPos -= $ruleLength;
                    $nonTerminal = $this->ruleToNonTerminal[$rule];
                    $idx = $this->gotoBase[$nonTerminal] + $stateStack[$stackPos];
                    if ($idx >= 0 && $idx < $this->gotoTableSize && $this->gotoCheck[$idx] === $nonTerminal) {
                        $state = $this->goto[$idx];
                    } else {
                        $state = $this->gotoDefault[$nonTerminal];
                    }
                    ++$stackPos;
                    $stateStack[$stackPos] = $state;
                    $this->semStack[$stackPos] = $this->semValue;
                    $this->endAttributeStack[$stackPos] = $lastEndAttributes;
                    if ($ruleLength === 0) {
                        // Empty productions use the start attributes of the lookahead token.
                        $this->startAttributeStack[$stackPos] = $this->lookaheadStartAttributes;
                    }
                } else {
                    /* error */
                    switch ($this->errorState) {
                        case 0:
                            $msg = $this->getErrorMessage($symbol, $state);
                            $this->emitError(new \PhpParser\Error($msg, $startAttributes + $endAttributes));
                        // Break missing intentionally
                        case 1:
                        case 2:
                            $this->errorState = 3;
                            // Pop until error-expecting state uncovered
                            while (!(($idx = $this->actionBase[$state] + $this->errorSymbol) >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $this->errorSymbol || $state < $this->YY2TBLSTATE && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $this->errorSymbol) >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $this->errorSymbol) || ($action = $this->action[$idx]) === $this->defaultAction) {
                                // Not totally sure about this
                                if ($stackPos <= 0) {
                                    // Could not recover from error
                                    return null;
                                }
                                $state = $stateStack[--$stackPos];
                                //$this->tracePop($state);
                            }
                            //$this->traceShift($this->errorSymbol);
                            ++$stackPos;
                            $stateStack[$stackPos] = $state = $action;
                            // We treat the error symbol as being empty, so we reset the end attributes
                            // to the end attributes of the last non-error symbol
                            $this->startAttributeStack[$stackPos] = $this->lookaheadStartAttributes;
                            $this->endAttributeStack[$stackPos] = $this->endAttributeStack[$stackPos - 1];
                            $this->endAttributes = $this->endAttributeStack[$stackPos - 1];
                            break;
                        case 3:
                            if ($symbol === 0) {
                                // Reached EOF without recovering from error
                                return null;
                            }
                            //$this->traceDiscard($symbol);
                            $symbol = self::SYMBOL_NONE;
                            break 2;
                    }
                }
                if ($state < $this->numNonLeafStates) {
                    break;
                }
                /* >= numNonLeafStates means shift-and-reduce */
                $rule = $state - $this->numNonLeafStates;
            }
        }
        throw new \RuntimeException('Reached end of parser loop');
    }
    protected function emitError(\PhpParser\Error $error)
    {
        $this->errorHandler->handleError($error);
    }
    /**
     * Format error message including expected tokens.
     *
     * @param int $symbol Unexpected symbol
     * @param int $state  State at time of error
     *
     * @return string Formatted error message
     */
    protected function getErrorMessage(int $symbol, int $state) : string
    {
        $expectedString = '';
        if ($expected = $this->getExpectedTokens($state)) {
            $expectedString = ', expecting ' . \implode(' or ', $expected);
        }
        return 'Syntax error, unexpected ' . $this->symbolToName[$symbol] . $expectedString;
    }
    /**
     * Get limited number of expected tokens in given state.
     *
     * @param int $state State
     *
     * @return string[] Expected tokens. If too many, an empty array is returned.
     */
    protected function getExpectedTokens(int $state) : array
    {
        $expected = [];
        $base = $this->actionBase[$state];
        foreach ($this->symbolToName as $symbol => $name) {
            $idx = $base + $symbol;
            if ($idx >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol || $state < $this->YY2TBLSTATE && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $symbol) >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol) {
                if ($this->action[$idx] !== $this->unexpectedTokenRule && $this->action[$idx] !== $this->defaultAction && $symbol !== $this->errorSymbol) {
                    if (\count($expected) === 4) {
                        /* Too many expected tokens */
                        return [];
                    }
                    $expected[] = $name;
                }
            }
        }
        return $expected;
    }
    /*
     * Tracing functions used for debugging the parser.
     */
    /*
    protected function traceNewState($state, $symbol) {
        echo '% State ' . $state
            . ', Lookahead ' . ($symbol == self::SYMBOL_NONE ? '--none--' : $this->symbolToName[$symbol]) . "\n";
    }
    
    protected function traceRead($symbol) {
        echo '% Reading ' . $this->symbolToName[$symbol] . "\n";
    }
    
    protected function traceShift($symbol) {
        echo '% Shift ' . $this->symbolToName[$symbol] . "\n";
    }
    
    protected function traceAccept() {
        echo "% Accepted.\n";
    }
    
    protected function traceReduce($n) {
        echo '% Reduce by (' . $n . ') ' . $this->productions[$n] . "\n";
    }
    
    protected function tracePop($state) {
        echo '% Recovering, uncovered state ' . $state . "\n";
    }
    
    protected function traceDiscard($symbol) {
        echo '% Discard ' . $this->symbolToName[$symbol] . "\n";
    }
    */
    /*
     * Helper functions invoked by semantic actions
     */
    /**
     * Moves statements of semicolon-style namespaces into $ns->stmts and checks various error conditions.
     *
     * @param Node\Stmt[] $stmts
     * @return Node\Stmt[]
     */
    protected function handleNamespaces(array $stmts) : array
    {
        $hasErrored = \false;
        $style = $this->getNamespacingStyle($stmts);
        if (null === $style) {
            // not namespaced, nothing to do
            return $stmts;
        } elseif ('brace' === $style) {
            // For braced namespaces we only have to check that there are no invalid statements between the namespaces
            $afterFirstNamespace = \false;
            foreach ($stmts as $stmt) {
                if ($stmt instanceof \PhpParser\Node\Stmt\Namespace_) {
                    $afterFirstNamespace = \true;
                } elseif (!$stmt instanceof \PhpParser\Node\Stmt\HaltCompiler && !$stmt instanceof \PhpParser\Node\Stmt\Nop && $afterFirstNamespace && !$hasErrored) {
                    $this->emitError(new \PhpParser\Error('No code may exist outside of namespace {}', $stmt->getAttributes()));
                    $hasErrored = \true;
                    // Avoid one error for every statement
                }
            }
            return $stmts;
        } else {
            // For semicolon namespaces we have to move the statements after a namespace declaration into ->stmts
            $resultStmts = [];
            $targetStmts =& $resultStmts;
            $lastNs = null;
            foreach ($stmts as $stmt) {
                if ($stmt instanceof \PhpParser\Node\Stmt\Namespace_) {
                    if ($lastNs !== null) {
                        $this->fixupNamespaceAttributes($lastNs);
                    }
                    if ($stmt->stmts === null) {
                        $stmt->stmts = [];
                        $targetStmts =& $stmt->stmts;
                        $resultStmts[] = $stmt;
                    } else {
                        // This handles the invalid case of mixed style namespaces
                        $resultStmts[] = $stmt;
                        $targetStmts =& $resultStmts;
                    }
                    $lastNs = $stmt;
                } elseif ($stmt instanceof \PhpParser\Node\Stmt\HaltCompiler) {
                    // __halt_compiler() is not moved into the namespace
                    $resultStmts[] = $stmt;
                } else {
                    $targetStmts[] = $stmt;
                }
            }
            if ($lastNs !== null) {
                $this->fixupNamespaceAttributes($lastNs);
            }
            return $resultStmts;
        }
    }
    private function fixupNamespaceAttributes(\PhpParser\Node\Stmt\Namespace_ $stmt)
    {
        // We moved the statements into the namespace node, as such the end of the namespace node
        // needs to be extended to the end of the statements.
        if (empty($stmt->stmts)) {
            return;
        }
        // We only move the builtin end attributes here. This is the best we can do with the
        // knowledge we have.
        $endAttributes = ['endLine', 'endFilePos', 'endTokenPos'];
        $lastStmt = $stmt->stmts[\count($stmt->stmts) - 1];
        foreach ($endAttributes as $endAttribute) {
            if ($lastStmt->hasAttribute($endAttribute)) {
                $stmt->setAttribute($endAttribute, $lastStmt->getAttribute($endAttribute));
            }
        }
    }
    /**
     * Determine namespacing style (semicolon or brace)
     *
     * @param Node[] $stmts Top-level statements.
     *
     * @return null|string One of "semicolon", "brace" or null (no namespaces)
     */
    private function getNamespacingStyle(array $stmts)
    {
        $style = null;
        $hasNotAllowedStmts = \false;
        foreach ($stmts as $i => $stmt) {
            if ($stmt instanceof \PhpParser\Node\Stmt\Namespace_) {
                $currentStyle = null === $stmt->stmts ? 'semicolon' : 'brace';
                if (null === $style) {
                    $style = $currentStyle;
                    if ($hasNotAllowedStmts) {
                        $this->emitError(new \PhpParser\Error('Namespace declaration statement has to be the very first statement in the script', $stmt->getLine()));
                    }
                } elseif ($style !== $currentStyle) {
                    $this->emitError(new \PhpParser\Error('Cannot mix bracketed namespace declarations with unbracketed namespace declarations', $stmt->getLine()));
                    // Treat like semicolon style for namespace normalization
                    return 'semicolon';
                }
                continue;
            }
            /* declare(), __halt_compiler() and nops can be used before a namespace declaration */
            if ($stmt instanceof \PhpParser\Node\Stmt\Declare_ || $stmt instanceof \PhpParser\Node\Stmt\HaltCompiler || $stmt instanceof \PhpParser\Node\Stmt\Nop) {
                continue;
            }
            /* There may be a hashbang line at the very start of the file */
            if ($i === 0 && $stmt instanceof \PhpParser\Node\Stmt\InlineHTML && \preg_match('/\\A#!.*\\r?\\n\\z/', $stmt->value)) {
                continue;
            }
            /* Everything else if forbidden before namespace declarations */
            $hasNotAllowedStmts = \true;
        }
        return $style;
    }
    /**
     * Fix up parsing of static property calls in PHP 5.
     *
     * In PHP 5 A::$b[c][d] and A::$b[c][d]() have very different interpretation. The former is
     * interpreted as (A::$b)[c][d], while the latter is the same as A::{$b[c][d]}(). We parse the
     * latter as the former initially and this method fixes the AST into the correct form when we
     * encounter the "()".
     *
     * @param  Node\Expr\StaticPropertyFetch|Node\Expr\ArrayDimFetch $prop
     * @param  Node\Arg[] $args
     * @param  array      $attributes
     *
     * @return Expr\StaticCall
     */
    protected function fixupPhp5StaticPropCall($prop, array $args, array $attributes) : Expr\StaticCall
    {
        if ($prop instanceof \PhpParser\Node\Expr\StaticPropertyFetch) {
            $name = $prop->name instanceof VarLikeIdentifier ? $prop->name->toString() : $prop->name;
            $var = new Expr\Variable($name, $prop->name->getAttributes());
            return new Expr\StaticCall($prop->class, $var, $args, $attributes);
        } elseif ($prop instanceof \PhpParser\Node\Expr\ArrayDimFetch) {
            $tmp = $prop;
            while ($tmp->var instanceof \PhpParser\Node\Expr\ArrayDimFetch) {
                $tmp = $tmp->var;
            }
            /** @var Expr\StaticPropertyFetch $staticProp */
            $staticProp = $tmp->var;
            // Set start attributes to attributes of innermost node
            $tmp = $prop;
            $this->fixupStartAttributes($tmp, $staticProp->name);
            while ($tmp->var instanceof \PhpParser\Node\Expr\ArrayDimFetch) {
                $tmp = $tmp->var;
                $this->fixupStartAttributes($tmp, $staticProp->name);
            }
            $name = $staticProp->name instanceof VarLikeIdentifier ? $staticProp->name->toString() : $staticProp->name;
            $tmp->var = new Expr\Variable($name, $staticProp->name->getAttributes());
            return new Expr\StaticCall($staticProp->class, $prop, $args, $attributes);
        } else {
            throw new \Exception();
        }
    }
    protected function fixupStartAttributes(\PhpParser\Node $to, \PhpParser\Node $from)
    {
        $startAttributes = ['startLine', 'startFilePos', 'startTokenPos'];
        foreach ($startAttributes as $startAttribute) {
            if ($from->hasAttribute($startAttribute)) {
                $to->setAttribute($startAttribute, $from->getAttribute($startAttribute));
            }
        }
    }
    protected function handleBuiltinTypes(Name $name)
    {
        $builtinTypes = ['bool' => \true, 'int' => \true, 'float' => \true, 'string' => \true, 'iterable' => \true, 'void' => \true, 'object' => \true, 'null' => \true, 'false' => \true, 'mixed' => \true, 'never' => \true, 'true' => \true];
        if (!$name->isUnqualified()) {
            return $name;
        }
        $lowerName = $name->toLowerString();
        if (!isset($builtinTypes[$lowerName])) {
            return $name;
        }
        return new \PhpParser\Node\Identifier($lowerName, $name->getAttributes());
    }
    /**
     * Get combined start and end attributes at a stack location
     *
     * @param int $pos Stack location
     *
     * @return array Combined start and end attributes
     */
    protected function getAttributesAt(int $pos) : array
    {
        return $this->startAttributeStack[$pos] + $this->endAttributeStack[$pos];
    }
    protected function getFloatCastKind(string $cast) : int
    {
        $cast = \strtolower($cast);
        if (\strpos($cast, 'float') !== \false) {
            return Double::KIND_FLOAT;
        }
        if (\strpos($cast, 'real') !== \false) {
            return Double::KIND_REAL;
        }
        return Double::KIND_DOUBLE;
    }
    protected function parseLNumber($str, $attributes, $allowInvalidOctal = \false)
    {
        try {
            return LNumber::fromString($str, $attributes, $allowInvalidOctal);
        } catch (\PhpParser\Error $error) {
            $this->emitError($error);
            // Use dummy value
            return new LNumber(0, $attributes);
        }
    }
    /**
     * Parse a T_NUM_STRING token into either an integer or string node.
     *
     * @param string $str        Number string
     * @param array  $attributes Attributes
     *
     * @return LNumber|String_ Integer or string node.
     */
    protected function parseNumString(string $str, array $attributes)
    {
        if (!\preg_match('/^(?:0|-?[1-9][0-9]*)$/', $str)) {
            return new String_($str, $attributes);
        }
        $num = +$str;
        if (!\is_int($num)) {
            return new String_($str, $attributes);
        }
        return new LNumber($num, $attributes);
    }
    protected function stripIndentation(string $string, int $indentLen, string $indentChar, bool $newlineAtStart, bool $newlineAtEnd, array $attributes)
    {
        if ($indentLen === 0) {
            return $string;
        }
        $start = $newlineAtStart ? '(?:(?<=\\n)|\\A)' : '(?<=\\n)';
        $end = $newlineAtEnd ? '(?:(?=[\\r\\n])|\\z)' : '(?=[\\r\\n])';
        $regex = '/' . $start . '([ \\t]*)(' . $end . ')?/';
        return \preg_replace_callback($regex, function ($matches) use($indentLen, $indentChar, $attributes) {
            $prefix = \substr($matches[1], 0, $indentLen);
            if (\false !== \strpos($prefix, $indentChar === " " ? "\t" : " ")) {
                $this->emitError(new \PhpParser\Error('Invalid indentation - tabs and spaces cannot be mixed', $attributes));
            } elseif (\strlen($prefix) < $indentLen && !isset($matches[2])) {
                $this->emitError(new \PhpParser\Error('Invalid body indentation level ' . '(expecting an indentation level of at least ' . $indentLen . ')', $attributes));
            }
            return \substr($matches[0], \strlen($prefix));
        }, $string);
    }
    protected function parseDocString(string $startToken, $contents, string $endToken, array $attributes, array $endTokenAttributes, bool $parseUnicodeEscape)
    {
        $kind = \strpos($startToken, "'") === \false ? String_::KIND_HEREDOC : String_::KIND_NOWDOC;
        $regex = '/\\A[bB]?<<<[ \\t]*[\'"]?([a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)[\'"]?(?:\\r\\n|\\n|\\r)\\z/';
        $result = \preg_match($regex, $startToken, $matches);
        \assert($result === 1);
        $label = $matches[1];
        $result = \preg_match('/\\A[ \\t]*/', $endToken, $matches);
        \assert($result === 1);
        $indentation = $matches[0];
        $attributes['kind'] = $kind;
        $attributes['docLabel'] = $label;
        $attributes['docIndentation'] = $indentation;
        $indentHasSpaces = \false !== \strpos($indentation, " ");
        $indentHasTabs = \false !== \strpos($indentation, "\t");
        if ($indentHasSpaces && $indentHasTabs) {
            $this->emitError(new \PhpParser\Error('Invalid indentation - tabs and spaces cannot be mixed', $endTokenAttributes));
            // Proceed processing as if this doc string is not indented
            $indentation = '';
        }
        $indentLen = \strlen($indentation);
        $indentChar = $indentHasSpaces ? " " : "\t";
        if (\is_string($contents)) {
            if ($contents === '') {
                return new String_('', $attributes);
            }
            $contents = $this->stripIndentation($contents, $indentLen, $indentChar, \true, \true, $attributes);
            $contents = \preg_replace('~(\\r\\n|\\n|\\r)\\z~', '', $contents);
            if ($kind === String_::KIND_HEREDOC) {
                $contents = String_::parseEscapeSequences($contents, null, $parseUnicodeEscape);
            }
            return new String_($contents, $attributes);
        } else {
            \assert(\count($contents) > 0);
            if (!$contents[0] instanceof \PhpParser\Node\Scalar\EncapsedStringPart) {
                // If there is no leading encapsed string part, pretend there is an empty one
                $this->stripIndentation('', $indentLen, $indentChar, \true, \false, $contents[0]->getAttributes());
            }
            $newContents = [];
            foreach ($contents as $i => $part) {
                if ($part instanceof \PhpParser\Node\Scalar\EncapsedStringPart) {
                    $isLast = $i === \count($contents) - 1;
                    $part->value = $this->stripIndentation($part->value, $indentLen, $indentChar, $i === 0, $isLast, $part->getAttributes());
                    $part->value = String_::parseEscapeSequences($part->value, null, $parseUnicodeEscape);
                    if ($isLast) {
                        $part->value = \preg_replace('~(\\r\\n|\\n|\\r)\\z~', '', $part->value);
                    }
                    if ('' === $part->value) {
                        continue;
                    }
                }
                $newContents[] = $part;
            }
            return new Encapsed($newContents, $attributes);
        }
    }
    /**
     * Create attributes for a zero-length common-capturing nop.
     *
     * @param Comment[] $comments
     * @return array
     */
    protected function createCommentNopAttributes(array $comments)
    {
        $comment = $comments[\count($comments) - 1];
        $commentEndLine = $comment->getEndLine();
        $commentEndFilePos = $comment->getEndFilePos();
        $commentEndTokenPos = $comment->getEndTokenPos();
        $attributes = ['comments' => $comments];
        if (-1 !== $commentEndLine) {
            $attributes['startLine'] = $commentEndLine;
            $attributes['endLine'] = $commentEndLine;
        }
        if (-1 !== $commentEndFilePos) {
            $attributes['startFilePos'] = $commentEndFilePos + 1;
            $attributes['endFilePos'] = $commentEndFilePos;
        }
        if (-1 !== $commentEndTokenPos) {
            $attributes['startTokenPos'] = $commentEndTokenPos + 1;
            $attributes['endTokenPos'] = $commentEndTokenPos;
        }
        return $attributes;
    }
    /** @param ElseIf_|Else_ $node */
    protected function fixupAlternativeElse($node)
    {
        // Make sure a trailing nop statement carrying comments is part of the node.
        $numStmts = \count($node->stmts);
        if ($numStmts !== 0 && $node->stmts[$numStmts - 1] instanceof Nop) {
            $nopAttrs = $node->stmts[$numStmts - 1]->getAttributes();
            if (isset($nopAttrs['endLine'])) {
                $node->setAttribute('endLine', $nopAttrs['endLine']);
            }
            if (isset($nopAttrs['endFilePos'])) {
                $node->setAttribute('endFilePos', $nopAttrs['endFilePos']);
            }
            if (isset($nopAttrs['endTokenPos'])) {
                $node->setAttribute('endTokenPos', $nopAttrs['endTokenPos']);
            }
        }
    }
    protected function checkClassModifier($a, $b, $modifierPos)
    {
        try {
            Class_::verifyClassModifier($a, $b);
        } catch (\PhpParser\Error $error) {
            $error->setAttributes($this->getAttributesAt($modifierPos));
            $this->emitError($error);
        }
    }
    protected function checkModifier($a, $b, $modifierPos)
    {
        // Jumping through some hoops here because verifyModifier() is also used elsewhere
        try {
            Class_::verifyModifier($a, $b);
        } catch (\PhpParser\Error $error) {
            $error->setAttributes($this->getAttributesAt($modifierPos));
            $this->emitError($error);
        }
    }
    protected function checkParam(Param $node)
    {
        if ($node->variadic && null !== $node->default) {
            $this->emitError(new \PhpParser\Error('Variadic parameter cannot have a default value', $node->default->getAttributes()));
        }
    }
    protected function checkTryCatch(TryCatch $node)
    {
        if (empty($node->catches) && null === $node->finally) {
            $this->emitError(new \PhpParser\Error('Cannot use try without catch or finally', $node->getAttributes()));
        }
    }
    protected function checkNamespace(Namespace_ $node)
    {
        if (null !== $node->stmts) {
            foreach ($node->stmts as $stmt) {
                if ($stmt instanceof Namespace_) {
                    $this->emitError(new \PhpParser\Error('Namespace declarations cannot be nested', $stmt->getAttributes()));
                }
            }
        }
    }
    private function checkClassName($name, $namePos)
    {
        if (null !== $name && $name->isSpecialClassName()) {
            $this->emitError(new \PhpParser\Error(\sprintf('Cannot use \'%s\' as class name as it is reserved', $name), $this->getAttributesAt($namePos)));
        }
    }
    private function checkImplementedInterfaces(array $interfaces)
    {
        foreach ($interfaces as $interface) {
            if ($interface->isSpecialClassName()) {
                $this->emitError(new \PhpParser\Error(\sprintf('Cannot use \'%s\' as interface name as it is reserved', $interface), $interface->getAttributes()));
            }
        }
    }
    protected function checkClass(Class_ $node, $namePos)
    {
        $this->checkClassName($node->name, $namePos);
        if ($node->extends && $node->extends->isSpecialClassName()) {
            $this->emitError(new \PhpParser\Error(\sprintf('Cannot use \'%s\' as class name as it is reserved', $node->extends), $node->extends->getAttributes()));
        }
        $this->checkImplementedInterfaces($node->implements);
    }
    protected function checkInterface(Interface_ $node, $namePos)
    {
        $this->checkClassName($node->name, $namePos);
        $this->checkImplementedInterfaces($node->extends);
    }
    protected function checkEnum(Enum_ $node, $namePos)
    {
        $this->checkClassName($node->name, $namePos);
        $this->checkImplementedInterfaces($node->implements);
    }
    protected function checkClassMethod(ClassMethod $node, $modifierPos)
    {
        if ($node->flags & Class_::MODIFIER_STATIC) {
            switch ($node->name->toLowerString()) {
                case '__construct':
                    $this->emitError(new \PhpParser\Error(\sprintf('Constructor %s() cannot be static', $node->name), $this->getAttributesAt($modifierPos)));
                    break;
                case '__destruct':
                    $this->emitError(new \PhpParser\Error(\sprintf('Destructor %s() cannot be static', $node->name), $this->getAttributesAt($modifierPos)));
                    break;
                case '__clone':
                    $this->emitError(new \PhpParser\Error(\sprintf('Clone method %s() cannot be static', $node->name), $this->getAttributesAt($modifierPos)));
                    break;
            }
        }
        if ($node->flags & Class_::MODIFIER_READONLY) {
            $this->emitError(new \PhpParser\Error(\sprintf('Method %s() cannot be readonly', $node->name), $this->getAttributesAt($modifierPos)));
        }
    }
    protected function checkClassConst(ClassConst $node, $modifierPos)
    {
        if ($node->flags & Class_::MODIFIER_STATIC) {
            $this->emitError(new \PhpParser\Error("Cannot use 'static' as constant modifier", $this->getAttributesAt($modifierPos)));
        }
        if ($node->flags & Class_::MODIFIER_ABSTRACT) {
            $this->emitError(new \PhpParser\Error("Cannot use 'abstract' as constant modifier", $this->getAttributesAt($modifierPos)));
        }
        if ($node->flags & Class_::MODIFIER_READONLY) {
            $this->emitError(new \PhpParser\Error("Cannot use 'readonly' as constant modifier", $this->getAttributesAt($modifierPos)));
        }
    }
    protected function checkProperty(Property $node, $modifierPos)
    {
        if ($node->flags & Class_::MODIFIER_ABSTRACT) {
            $this->emitError(new \PhpParser\Error('Properties cannot be declared abstract', $this->getAttributesAt($modifierPos)));
        }
        if ($node->flags & Class_::MODIFIER_FINAL) {
            $this->emitError(new \PhpParser\Error('Properties cannot be declared final', $this->getAttributesAt($modifierPos)));
        }
    }
    protected function checkUseUse(UseUse $node, $namePos)
    {
        if ($node->alias && $node->alias->isSpecialClassName()) {
            $this->emitError(new \PhpParser\Error(\sprintf('Cannot use %s as %s because \'%2$s\' is a special class name', $node->name, $node->alias), $this->getAttributesAt($namePos)));
        }
    }
}
<?php

declare (strict_types=1);
namespace PhpParser;

use PhpParser\NodeVisitor\FindingVisitor;
use PhpParser\NodeVisitor\FirstFindingVisitor;
class NodeFinder
{
    /**
     * Find all nodes satisfying a filter callback.
     *
     * @param Node|Node[] $nodes  Single node or array of nodes to search in
     * @param callable    $filter Filter callback: function(Node $node) : bool
     *
     * @return Node[] Found nodes satisfying the filter callback
     */
    public function find($nodes, callable $filter) : array
    {
        if (!\is_array($nodes)) {
            $nodes = [$nodes];
        }
        $visitor = new FindingVisitor($filter);
        $traverser = new \PhpParser\NodeTraverser();
        $traverser->addVisitor($visitor);
        $traverser->traverse($nodes);
        return $visitor->getFoundNodes();
    }
    /**
     * Find all nodes that are instances of a certain class.
     *
     * @param Node|Node[] $nodes Single node or array of nodes to search in
     * @param string      $class Class name
     *
     * @return Node[] Found nodes (all instances of $class)
     */
    public function findInstanceOf($nodes, string $class) : array
    {
        return $this->find($nodes, function ($node) use($class) {
            return $node instanceof $class;
        });
    }
    /**
     * Find first node satisfying a filter callback.
     *
     * @param Node|Node[] $nodes  Single node or array of nodes to search in
     * @param callable    $filter Filter callback: function(Node $node) : bool
     *
     * @return null|Node Found node (or null if none found)
     */
    public function findFirst($nodes, callable $filter)
    {
        if (!\is_array($nodes)) {
            $nodes = [$nodes];
        }
        $visitor = new FirstFindingVisitor($filter);
        $traverser = new \PhpParser\NodeTraverser();
        $traverser->addVisitor($visitor);
        $traverser->traverse($nodes);
        return $visitor->getFoundNode();
    }
    /**
     * Find first node that is an instance of a certain class.
     *
     * @param Node|Node[] $nodes  Single node or array of nodes to search in
     * @param string      $class Class name
     *
     * @return null|Node Found node, which is an instance of $class (or null if none found)
     */
    public function findFirstInstanceOf($nodes, string $class)
    {
        return $this->findFirst($nodes, function ($node) use($class) {
            return $node instanceof $class;
        });
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\NodeVisitor;

use PhpParser\Node;
use PhpParser\NodeVisitorAbstract;
/**
 * Visitor cloning all nodes and linking to the original nodes using an attribute.
 *
 * This visitor is required to perform format-preserving pretty prints.
 */
class CloningVisitor extends NodeVisitorAbstract
{
    public function enterNode(Node $origNode)
    {
        $node = clone $origNode;
        $node->setAttribute('origNode', $origNode);
        return $node;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\NodeVisitor;

use function array_pop;
use function count;
use PhpParser\Node;
use PhpParser\NodeVisitorAbstract;
/**
 * Visitor that connects a child node to its parent node.
 *
 * On the child node, the parent node can be accessed through
 * <code>$node->getAttribute('parent')</code>.
 */
final class ParentConnectingVisitor extends NodeVisitorAbstract
{
    /**
     * @var Node[]
     */
    private $stack = [];
    public function beforeTraverse(array $nodes)
    {
        $this->stack = [];
    }
    public function enterNode(Node $node)
    {
        if (!empty($this->stack)) {
            $node->setAttribute('parent', $this->stack[count($this->stack) - 1]);
        }
        $this->stack[] = $node;
    }
    public function leaveNode(Node $node)
    {
        array_pop($this->stack);
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\NodeVisitor;

use PhpParser\Node;
use PhpParser\NodeTraverser;
use PhpParser\NodeVisitorAbstract;
/**
 * This visitor can be used to find the first node satisfying some criterion determined by
 * a filter callback.
 */
class FirstFindingVisitor extends NodeVisitorAbstract
{
    /** @var callable Filter callback */
    protected $filterCallback;
    /** @var null|Node Found node */
    protected $foundNode;
    public function __construct(callable $filterCallback)
    {
        $this->filterCallback = $filterCallback;
    }
    /**
     * Get found node satisfying the filter callback.
     *
     * Returns null if no node satisfies the filter callback.
     *
     * @return null|Node Found node (or null if not found)
     */
    public function getFoundNode()
    {
        return $this->foundNode;
    }
    public function beforeTraverse(array $nodes)
    {
        $this->foundNode = null;
        return null;
    }
    public function enterNode(Node $node)
    {
        $filterCallback = $this->filterCallback;
        if ($filterCallback($node)) {
            $this->foundNode = $node;
            return NodeTraverser::STOP_TRAVERSAL;
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\NodeVisitor;

use PhpParser\Node;
use PhpParser\NodeVisitorAbstract;
/**
 * This visitor can be used to find and collect all nodes satisfying some criterion determined by
 * a filter callback.
 */
class FindingVisitor extends NodeVisitorAbstract
{
    /** @var callable Filter callback */
    protected $filterCallback;
    /** @var Node[] Found nodes */
    protected $foundNodes;
    public function __construct(callable $filterCallback)
    {
        $this->filterCallback = $filterCallback;
    }
    /**
     * Get found nodes satisfying the filter callback.
     *
     * Nodes are returned in pre-order.
     *
     * @return Node[] Found nodes
     */
    public function getFoundNodes() : array
    {
        return $this->foundNodes;
    }
    public function beforeTraverse(array $nodes)
    {
        $this->foundNodes = [];
        return null;
    }
    public function enterNode(Node $node)
    {
        $filterCallback = $this->filterCallback;
        if ($filterCallback($node)) {
            $this->foundNodes[] = $node;
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\NodeVisitor;

use PhpParser\ErrorHandler;
use PhpParser\NameContext;
use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Name;
use PhpParser\Node\Name\FullyQualified;
use PhpParser\Node\Stmt;
use PhpParser\NodeVisitorAbstract;
class NameResolver extends NodeVisitorAbstract
{
    /** @var NameContext Naming context */
    protected $nameContext;
    /** @var bool Whether to preserve original names */
    protected $preserveOriginalNames;
    /** @var bool Whether to replace resolved nodes in place, or to add resolvedNode attributes */
    protected $replaceNodes;
    /**
     * Constructs a name resolution visitor.
     *
     * Options:
     *  * preserveOriginalNames (default false): An "originalName" attribute will be added to
     *    all name nodes that underwent resolution.
     *  * replaceNodes (default true): Resolved names are replaced in-place. Otherwise, a
     *    resolvedName attribute is added. (Names that cannot be statically resolved receive a
     *    namespacedName attribute, as usual.)
     *
     * @param ErrorHandler|null $errorHandler Error handler
     * @param array $options Options
     */
    public function __construct(ErrorHandler $errorHandler = null, array $options = [])
    {
        $this->nameContext = new NameContext($errorHandler ?? new ErrorHandler\Throwing());
        $this->preserveOriginalNames = $options['preserveOriginalNames'] ?? \false;
        $this->replaceNodes = $options['replaceNodes'] ?? \true;
    }
    /**
     * Get name resolution context.
     *
     * @return NameContext
     */
    public function getNameContext() : NameContext
    {
        return $this->nameContext;
    }
    public function beforeTraverse(array $nodes)
    {
        $this->nameContext->startNamespace();
        return null;
    }
    public function enterNode(Node $node)
    {
        if ($node instanceof Stmt\Namespace_) {
            $this->nameContext->startNamespace($node->name);
        } elseif ($node instanceof Stmt\Use_) {
            foreach ($node->uses as $use) {
                $this->addAlias($use, $node->type, null);
            }
        } elseif ($node instanceof Stmt\GroupUse) {
            foreach ($node->uses as $use) {
                $this->addAlias($use, $node->type, $node->prefix);
            }
        } elseif ($node instanceof Stmt\Class_) {
            if (null !== $node->extends) {
                $node->extends = $this->resolveClassName($node->extends);
            }
            foreach ($node->implements as &$interface) {
                $interface = $this->resolveClassName($interface);
            }
            $this->resolveAttrGroups($node);
            if (null !== $node->name) {
                $this->addNamespacedName($node);
            }
        } elseif ($node instanceof Stmt\Interface_) {
            foreach ($node->extends as &$interface) {
                $interface = $this->resolveClassName($interface);
            }
            $this->resolveAttrGroups($node);
            $this->addNamespacedName($node);
        } elseif ($node instanceof Stmt\Enum_) {
            foreach ($node->implements as &$interface) {
                $interface = $this->resolveClassName($interface);
            }
            $this->resolveAttrGroups($node);
            if (null !== $node->name) {
                $this->addNamespacedName($node);
            }
        } elseif ($node instanceof Stmt\Trait_) {
            $this->resolveAttrGroups($node);
            $this->addNamespacedName($node);
        } elseif ($node instanceof Stmt\Function_) {
            $this->resolveSignature($node);
            $this->resolveAttrGroups($node);
            $this->addNamespacedName($node);
        } elseif ($node instanceof Stmt\ClassMethod || $node instanceof Expr\Closure || $node instanceof Expr\ArrowFunction) {
            $this->resolveSignature($node);
            $this->resolveAttrGroups($node);
        } elseif ($node instanceof Stmt\Property) {
            if (null !== $node->type) {
                $node->type = $this->resolveType($node->type);
            }
            $this->resolveAttrGroups($node);
        } elseif ($node instanceof Stmt\Const_) {
            foreach ($node->consts as $const) {
                $this->addNamespacedName($const);
            }
        } else {
            if ($node instanceof Stmt\ClassConst) {
                $this->resolveAttrGroups($node);
            } else {
                if ($node instanceof Stmt\EnumCase) {
                    $this->resolveAttrGroups($node);
                } elseif ($node instanceof Expr\StaticCall || $node instanceof Expr\StaticPropertyFetch || $node instanceof Expr\ClassConstFetch || $node instanceof Expr\New_ || $node instanceof Expr\Instanceof_) {
                    if ($node->class instanceof Name) {
                        $node->class = $this->resolveClassName($node->class);
                    }
                } elseif ($node instanceof Stmt\Catch_) {
                    foreach ($node->types as &$type) {
                        $type = $this->resolveClassName($type);
                    }
                } elseif ($node instanceof Expr\FuncCall) {
                    if ($node->name instanceof Name) {
                        $node->name = $this->resolveName($node->name, Stmt\Use_::TYPE_FUNCTION);
                    }
                } elseif ($node instanceof Expr\ConstFetch) {
                    $node->name = $this->resolveName($node->name, Stmt\Use_::TYPE_CONSTANT);
                } elseif ($node instanceof Stmt\TraitUse) {
                    foreach ($node->traits as &$trait) {
                        $trait = $this->resolveClassName($trait);
                    }
                    foreach ($node->adaptations as $adaptation) {
                        if (null !== $adaptation->trait) {
                            $adaptation->trait = $this->resolveClassName($adaptation->trait);
                        }
                        if ($adaptation instanceof Stmt\TraitUseAdaptation\Precedence) {
                            foreach ($adaptation->insteadof as &$insteadof) {
                                $insteadof = $this->resolveClassName($insteadof);
                            }
                        }
                    }
                }
            }
        }
        return null;
    }
    private function addAlias(Stmt\UseUse $use, int $type, Name $prefix = null)
    {
        // Add prefix for group uses
        $name = $prefix ? Name::concat($prefix, $use->name) : $use->name;
        // Type is determined either by individual element or whole use declaration
        $type |= $use->type;
        $this->nameContext->addAlias($name, (string) $use->getAlias(), $type, $use->getAttributes());
    }
    /** @param Stmt\Function_|Stmt\ClassMethod|Expr\Closure $node */
    private function resolveSignature($node)
    {
        foreach ($node->params as $param) {
            $param->type = $this->resolveType($param->type);
            $this->resolveAttrGroups($param);
        }
        $node->returnType = $this->resolveType($node->returnType);
    }
    private function resolveType($node)
    {
        if ($node instanceof Name) {
            return $this->resolveClassName($node);
        }
        if ($node instanceof Node\NullableType) {
            $node->type = $this->resolveType($node->type);
            return $node;
        }
        if ($node instanceof Node\UnionType || $node instanceof Node\IntersectionType) {
            foreach ($node->types as &$type) {
                $type = $this->resolveType($type);
            }
            return $node;
        }
        return $node;
    }
    /**
     * Resolve name, according to name resolver options.
     *
     * @param Name $name Function or constant name to resolve
     * @param int  $type One of Stmt\Use_::TYPE_*
     *
     * @return Name Resolved name, or original name with attribute
     */
    protected function resolveName(Name $name, int $type) : Name
    {
        if (!$this->replaceNodes) {
            $resolvedName = $this->nameContext->getResolvedName($name, $type);
            if (null !== $resolvedName) {
                $name->setAttribute('resolvedName', $resolvedName);
            } else {
                $name->setAttribute('namespacedName', FullyQualified::concat($this->nameContext->getNamespace(), $name, $name->getAttributes()));
            }
            return $name;
        }
        if ($this->preserveOriginalNames) {
            // Save the original name
            $originalName = $name;
            $name = clone $originalName;
            $name->setAttribute('originalName', $originalName);
        }
        $resolvedName = $this->nameContext->getResolvedName($name, $type);
        if (null !== $resolvedName) {
            return $resolvedName;
        }
        // unqualified names inside a namespace cannot be resolved at compile-time
        // add the namespaced version of the name as an attribute
        $name->setAttribute('namespacedName', FullyQualified::concat($this->nameContext->getNamespace(), $name, $name->getAttributes()));
        return $name;
    }
    protected function resolveClassName(Name $name)
    {
        return $this->resolveName($name, Stmt\Use_::TYPE_NORMAL);
    }
    protected function addNamespacedName(Node $node)
    {
        $node->namespacedName = Name::concat($this->nameContext->getNamespace(), (string) $node->name);
    }
    protected function resolveAttrGroups(Node $node)
    {
        foreach ($node->attrGroups as $attrGroup) {
            foreach ($attrGroup->attrs as $attr) {
                $attr->name = $this->resolveClassName($attr->name);
            }
        }
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\NodeVisitor;

use PhpParser\Node;
use PhpParser\NodeVisitorAbstract;
/**
 * Visitor that connects a child node to its parent node
 * as well as its sibling nodes.
 *
 * On the child node, the parent node can be accessed through
 * <code>$node->getAttribute('parent')</code>, the previous
 * node can be accessed through <code>$node->getAttribute('previous')</code>,
 * and the next node can be accessed through <code>$node->getAttribute('next')</code>.
 */
final class NodeConnectingVisitor extends NodeVisitorAbstract
{
    /**
     * @var Node[]
     */
    private $stack = [];
    /**
     * @var ?Node
     */
    private $previous;
    public function beforeTraverse(array $nodes)
    {
        $this->stack = [];
        $this->previous = null;
    }
    public function enterNode(Node $node)
    {
        if (!empty($this->stack)) {
            $node->setAttribute('parent', $this->stack[\count($this->stack) - 1]);
        }
        if ($this->previous !== null && $this->previous->getAttribute('parent') === $node->getAttribute('parent')) {
            $node->setAttribute('previous', $this->previous);
            $this->previous->setAttribute('next', $node);
        }
        $this->stack[] = $node;
    }
    public function leaveNode(Node $node)
    {
        $this->previous = $node;
        \array_pop($this->stack);
    }
}
<?php

declare (strict_types=1);
namespace PhpParser;

use PhpParser\Node\Expr\Include_;
use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\GroupUse;
use PhpParser\Node\Stmt\Use_;
use PhpParser\Node\Stmt\UseUse;
class NodeDumper
{
    private $dumpComments;
    private $dumpPositions;
    private $code;
    /**
     * Constructs a NodeDumper.
     *
     * Supported options:
     *  * bool dumpComments: Whether comments should be dumped.
     *  * bool dumpPositions: Whether line/offset information should be dumped. To dump offset
     *                        information, the code needs to be passed to dump().
     *
     * @param array $options Options (see description)
     */
    public function __construct(array $options = [])
    {
        $this->dumpComments = !empty($options['dumpComments']);
        $this->dumpPositions = !empty($options['dumpPositions']);
    }
    /**
     * Dumps a node or array.
     *
     * @param array|Node  $node Node or array to dump
     * @param string|null $code Code corresponding to dumped AST. This only needs to be passed if
     *                          the dumpPositions option is enabled and the dumping of node offsets
     *                          is desired.
     *
     * @return string Dumped value
     */
    public function dump($node, string $code = null) : string
    {
        $this->code = $code;
        return $this->dumpRecursive($node);
    }
    protected function dumpRecursive($node)
    {
        if ($node instanceof \PhpParser\Node) {
            $r = $node->getType();
            if ($this->dumpPositions && null !== ($p = $this->dumpPosition($node))) {
                $r .= $p;
            }
            $r .= '(';
            foreach ($node->getSubNodeNames() as $key) {
                $r .= "\n    " . $key . ': ';
                $value = $node->{$key};
                if (null === $value) {
                    $r .= 'null';
                } elseif (\false === $value) {
                    $r .= 'false';
                } elseif (\true === $value) {
                    $r .= 'true';
                } elseif (\is_scalar($value)) {
                    if ('flags' === $key || 'newModifier' === $key) {
                        $r .= $this->dumpFlags($value);
                    } elseif ('type' === $key && $node instanceof Include_) {
                        $r .= $this->dumpIncludeType($value);
                    } elseif ('type' === $key && ($node instanceof Use_ || $node instanceof UseUse || $node instanceof GroupUse)) {
                        $r .= $this->dumpUseType($value);
                    } else {
                        $r .= $value;
                    }
                } else {
                    $r .= \str_replace("\n", "\n    ", $this->dumpRecursive($value));
                }
            }
            if ($this->dumpComments && ($comments = $node->getComments())) {
                $r .= "\n    comments: " . \str_replace("\n", "\n    ", $this->dumpRecursive($comments));
            }
        } elseif (\is_array($node)) {
            $r = 'array(';
            foreach ($node as $key => $value) {
                $r .= "\n    " . $key . ': ';
                if (null === $value) {
                    $r .= 'null';
                } elseif (\false === $value) {
                    $r .= 'false';
                } elseif (\true === $value) {
                    $r .= 'true';
                } elseif (\is_scalar($value)) {
                    $r .= $value;
                } else {
                    $r .= \str_replace("\n", "\n    ", $this->dumpRecursive($value));
                }
            }
        } elseif ($node instanceof \PhpParser\Comment) {
            return $node->getReformattedText();
        } else {
            throw new \InvalidArgumentException('Can only dump nodes and arrays.');
        }
        return $r . "\n)";
    }
    protected function dumpFlags($flags)
    {
        $strs = [];
        if ($flags & Class_::MODIFIER_PUBLIC) {
            $strs[] = 'MODIFIER_PUBLIC';
        }
        if ($flags & Class_::MODIFIER_PROTECTED) {
            $strs[] = 'MODIFIER_PROTECTED';
        }
        if ($flags & Class_::MODIFIER_PRIVATE) {
            $strs[] = 'MODIFIER_PRIVATE';
        }
        if ($flags & Class_::MODIFIER_ABSTRACT) {
            $strs[] = 'MODIFIER_ABSTRACT';
        }
        if ($flags & Class_::MODIFIER_STATIC) {
            $strs[] = 'MODIFIER_STATIC';
        }
        if ($flags & Class_::MODIFIER_FINAL) {
            $strs[] = 'MODIFIER_FINAL';
        }
        if ($flags & Class_::MODIFIER_READONLY) {
            $strs[] = 'MODIFIER_READONLY';
        }
        if ($strs) {
            return \implode(' | ', $strs) . ' (' . $flags . ')';
        } else {
            return $flags;
        }
    }
    protected function dumpIncludeType($type)
    {
        $map = [Include_::TYPE_INCLUDE => 'TYPE_INCLUDE', Include_::TYPE_INCLUDE_ONCE => 'TYPE_INCLUDE_ONCE', Include_::TYPE_REQUIRE => 'TYPE_REQUIRE', Include_::TYPE_REQUIRE_ONCE => 'TYPE_REQUIRE_ONCE'];
        if (!isset($map[$type])) {
            return $type;
        }
        return $map[$type] . ' (' . $type . ')';
    }
    protected function dumpUseType($type)
    {
        $map = [Use_::TYPE_UNKNOWN => 'TYPE_UNKNOWN', Use_::TYPE_NORMAL => 'TYPE_NORMAL', Use_::TYPE_FUNCTION => 'TYPE_FUNCTION', Use_::TYPE_CONSTANT => 'TYPE_CONSTANT'];
        if (!isset($map[$type])) {
            return $type;
        }
        return $map[$type] . ' (' . $type . ')';
    }
    /**
     * Dump node position, if possible.
     *
     * @param Node $node Node for which to dump position
     *
     * @return string|null Dump of position, or null if position information not available
     */
    protected function dumpPosition(\PhpParser\Node $node)
    {
        if (!$node->hasAttribute('startLine') || !$node->hasAttribute('endLine')) {
            return null;
        }
        $start = $node->getStartLine();
        $end = $node->getEndLine();
        if ($node->hasAttribute('startFilePos') && $node->hasAttribute('endFilePos') && null !== $this->code) {
            $start .= ':' . $this->toColumn($this->code, $node->getStartFilePos());
            $end .= ':' . $this->toColumn($this->code, $node->getEndFilePos());
        }
        return "[{$start} - {$end}]";
    }
    // Copied from Error class
    private function toColumn($code, $pos)
    {
        if ($pos > \strlen($code)) {
            throw new \RuntimeException('Invalid position information');
        }
        $lineStartPos = \strrpos($code, "\n", $pos - \strlen($code));
        if (\false === $lineStartPos) {
            $lineStartPos = -1;
        }
        return $pos - $lineStartPos;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser;

abstract class NodeAbstract implements \PhpParser\Node, \JsonSerializable
{
    protected $attributes;
    /**
     * Creates a Node.
     *
     * @param array $attributes Array of attributes
     */
    public function __construct(array $attributes = [])
    {
        $this->attributes = $attributes;
    }
    /**
     * Gets line the node started in (alias of getStartLine).
     *
     * @return int Start line (or -1 if not available)
     */
    public function getLine() : int
    {
        return $this->attributes['startLine'] ?? -1;
    }
    /**
     * Gets line the node started in.
     *
     * Requires the 'startLine' attribute to be enabled in the lexer (enabled by default).
     *
     * @return int Start line (or -1 if not available)
     */
    public function getStartLine() : int
    {
        return $this->attributes['startLine'] ?? -1;
    }
    /**
     * Gets the line the node ended in.
     *
     * Requires the 'endLine' attribute to be enabled in the lexer (enabled by default).
     *
     * @return int End line (or -1 if not available)
     */
    public function getEndLine() : int
    {
        return $this->attributes['endLine'] ?? -1;
    }
    /**
     * Gets the token offset of the first token that is part of this node.
     *
     * The offset is an index into the array returned by Lexer::getTokens().
     *
     * Requires the 'startTokenPos' attribute to be enabled in the lexer (DISABLED by default).
     *
     * @return int Token start position (or -1 if not available)
     */
    public function getStartTokenPos() : int
    {
        return $this->attributes['startTokenPos'] ?? -1;
    }
    /**
     * Gets the token offset of the last token that is part of this node.
     *
     * The offset is an index into the array returned by Lexer::getTokens().
     *
     * Requires the 'endTokenPos' attribute to be enabled in the lexer (DISABLED by default).
     *
     * @return int Token end position (or -1 if not available)
     */
    public function getEndTokenPos() : int
    {
        return $this->attributes['endTokenPos'] ?? -1;
    }
    /**
     * Gets the file offset of the first character that is part of this node.
     *
     * Requires the 'startFilePos' attribute to be enabled in the lexer (DISABLED by default).
     *
     * @return int File start position (or -1 if not available)
     */
    public function getStartFilePos() : int
    {
        return $this->attributes['startFilePos'] ?? -1;
    }
    /**
     * Gets the file offset of the last character that is part of this node.
     *
     * Requires the 'endFilePos' attribute to be enabled in the lexer (DISABLED by default).
     *
     * @return int File end position (or -1 if not available)
     */
    public function getEndFilePos() : int
    {
        return $this->attributes['endFilePos'] ?? -1;
    }
    /**
     * Gets all comments directly preceding this node.
     *
     * The comments are also available through the "comments" attribute.
     *
     * @return Comment[]
     */
    public function getComments() : array
    {
        return $this->attributes['comments'] ?? [];
    }
    /**
     * Gets the doc comment of the node.
     *
     * @return null|Comment\Doc Doc comment object or null
     */
    public function getDocComment()
    {
        $comments = $this->getComments();
        for ($i = \count($comments) - 1; $i >= 0; $i--) {
            $comment = $comments[$i];
            if ($comment instanceof \PhpParser\Comment\Doc) {
                return $comment;
            }
        }
        return null;
    }
    /**
     * Sets the doc comment of the node.
     *
     * This will either replace an existing doc comment or add it to the comments array.
     *
     * @param Comment\Doc $docComment Doc comment to set
     */
    public function setDocComment(\PhpParser\Comment\Doc $docComment)
    {
        $comments = $this->getComments();
        for ($i = \count($comments) - 1; $i >= 0; $i--) {
            if ($comments[$i] instanceof \PhpParser\Comment\Doc) {
                // Replace existing doc comment.
                $comments[$i] = $docComment;
                $this->setAttribute('comments', $comments);
                return;
            }
        }
        // Append new doc comment.
        $comments[] = $docComment;
        $this->setAttribute('comments', $comments);
    }
    public function setAttribute(string $key, $value)
    {
        $this->attributes[$key] = $value;
    }
    public function hasAttribute(string $key) : bool
    {
        return \array_key_exists($key, $this->attributes);
    }
    public function getAttribute(string $key, $default = null)
    {
        if (\array_key_exists($key, $this->attributes)) {
            return $this->attributes[$key];
        }
        return $default;
    }
    public function getAttributes() : array
    {
        return $this->attributes;
    }
    public function setAttributes(array $attributes)
    {
        $this->attributes = $attributes;
    }
    /**
     * @return array
     */
    public function jsonSerialize() : array
    {
        return ['nodeType' => $this->getType()] + \get_object_vars($this);
    }
}
<?php

declare (strict_types=1);
namespace PhpParser;

interface NodeTraverserInterface
{
    /**
     * Adds a visitor.
     *
     * @param NodeVisitor $visitor Visitor to add
     */
    public function addVisitor(\PhpParser\NodeVisitor $visitor);
    /**
     * Removes an added visitor.
     *
     * @param NodeVisitor $visitor
     */
    public function removeVisitor(\PhpParser\NodeVisitor $visitor);
    /**
     * Traverses an array of nodes using the registered visitors.
     *
     * @param Node[] $nodes Array of nodes
     *
     * @return Node[] Traversed array of nodes
     */
    public function traverse(array $nodes) : array;
}
<?php

declare (strict_types=1);
namespace PhpParser\Comment;

class Doc extends \PhpParser\Comment
{
}
<?php

declare (strict_types=1);
namespace PhpParser\Lexer\TokenEmulator;

use PhpParser\Lexer\Emulative;
final class FnTokenEmulator extends \PhpParser\Lexer\TokenEmulator\KeywordEmulator
{
    public function getPhpVersion() : string
    {
        return Emulative::PHP_7_4;
    }
    public function getKeywordString() : string
    {
        return 'fn';
    }
    public function getKeywordToken() : int
    {
        return \T_FN;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Lexer\TokenEmulator;

use PhpParser\Lexer\Emulative;
final class ReadonlyTokenEmulator extends \PhpParser\Lexer\TokenEmulator\KeywordEmulator
{
    public function getPhpVersion() : string
    {
        return Emulative::PHP_8_1;
    }
    public function getKeywordString() : string
    {
        return 'readonly';
    }
    public function getKeywordToken() : int
    {
        return \T_READONLY;
    }
    protected function isKeywordContext(array $tokens, int $pos) : bool
    {
        if (!parent::isKeywordContext($tokens, $pos)) {
            return \false;
        }
        // Support "function readonly("
        return !(isset($tokens[$pos + 1]) && ($tokens[$pos + 1][0] === '(' || $tokens[$pos + 1][0] === \T_WHITESPACE && isset($tokens[$pos + 2]) && $tokens[$pos + 2][0] === '('));
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Lexer\TokenEmulator;

use PhpParser\Lexer\Emulative;
final class AttributeEmulator extends \PhpParser\Lexer\TokenEmulator\TokenEmulator
{
    public function getPhpVersion() : string
    {
        return Emulative::PHP_8_0;
    }
    public function isEmulationNeeded(string $code) : bool
    {
        return \strpos($code, '#[') !== \false;
    }
    public function emulate(string $code, array $tokens) : array
    {
        // We need to manually iterate and manage a count because we'll change
        // the tokens array on the way.
        $line = 1;
        for ($i = 0, $c = \count($tokens); $i < $c; ++$i) {
            if ($tokens[$i] === '#' && isset($tokens[$i + 1]) && $tokens[$i + 1] === '[') {
                \array_splice($tokens, $i, 2, [[\T_ATTRIBUTE, '#[', $line]]);
                $c--;
                continue;
            }
            if (\is_array($tokens[$i])) {
                $line += \substr_count($tokens[$i][1], "\n");
            }
        }
        return $tokens;
    }
    public function reverseEmulate(string $code, array $tokens) : array
    {
        // TODO
        return $tokens;
    }
    public function preprocessCode(string $code, array &$patches) : string
    {
        $pos = 0;
        while (\false !== ($pos = \strpos($code, '#[', $pos))) {
            // Replace #[ with %[
            $code[$pos] = '%';
            $patches[] = [$pos, 'replace', '#'];
            $pos += 2;
        }
        return $code;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Lexer\TokenEmulator;

use PhpParser\Lexer\Emulative;
class ExplicitOctalEmulator extends \PhpParser\Lexer\TokenEmulator\TokenEmulator
{
    public function getPhpVersion() : string
    {
        return Emulative::PHP_8_1;
    }
    public function isEmulationNeeded(string $code) : bool
    {
        return \strpos($code, '0o') !== \false || \strpos($code, '0O') !== \false;
    }
    public function emulate(string $code, array $tokens) : array
    {
        for ($i = 0, $c = \count($tokens); $i < $c; ++$i) {
            if ($tokens[$i][0] == \T_LNUMBER && $tokens[$i][1] === '0' && isset($tokens[$i + 1]) && $tokens[$i + 1][0] == \T_STRING && \preg_match('/[oO][0-7]+(?:_[0-7]+)*/', $tokens[$i + 1][1])) {
                $tokenKind = $this->resolveIntegerOrFloatToken($tokens[$i + 1][1]);
                \array_splice($tokens, $i, 2, [[$tokenKind, '0' . $tokens[$i + 1][1], $tokens[$i][2]]]);
                $c--;
            }
        }
        return $tokens;
    }
    private function resolveIntegerOrFloatToken(string $str) : int
    {
        $str = \substr($str, 1);
        $str = \str_replace('_', '', $str);
        $num = \octdec($str);
        return \is_float($num) ? \T_DNUMBER : \T_LNUMBER;
    }
    public function reverseEmulate(string $code, array $tokens) : array
    {
        // Explicit octals were not legal code previously, don't bother.
        return $tokens;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Lexer\TokenEmulator;

use PhpParser\Lexer\Emulative;
final class EnumTokenEmulator extends \PhpParser\Lexer\TokenEmulator\KeywordEmulator
{
    public function getPhpVersion() : string
    {
        return Emulative::PHP_8_1;
    }
    public function getKeywordString() : string
    {
        return 'enum';
    }
    public function getKeywordToken() : int
    {
        return \T_ENUM;
    }
    protected function isKeywordContext(array $tokens, int $pos) : bool
    {
        return parent::isKeywordContext($tokens, $pos) && isset($tokens[$pos + 2]) && $tokens[$pos + 1][0] === \T_WHITESPACE && $tokens[$pos + 2][0] === \T_STRING;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Lexer\TokenEmulator;

use PhpParser\Lexer\Emulative;
final class FlexibleDocStringEmulator extends \PhpParser\Lexer\TokenEmulator\TokenEmulator
{
    const FLEXIBLE_DOC_STRING_REGEX = <<<'REGEX'
/<<<[ \t]*(['"]?)([a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)\1\r?\n
(?:.*\r?\n)*?
(?<indentation>\h*)\2(?![a-zA-Z0-9_\x80-\xff])(?<separator>(?:;?[\r\n])?)/x
REGEX;
    public function getPhpVersion() : string
    {
        return Emulative::PHP_7_3;
    }
    public function isEmulationNeeded(string $code) : bool
    {
        return \strpos($code, '<<<') !== \false;
    }
    public function emulate(string $code, array $tokens) : array
    {
        // Handled by preprocessing + fixup.
        return $tokens;
    }
    public function reverseEmulate(string $code, array $tokens) : array
    {
        // Not supported.
        return $tokens;
    }
    public function preprocessCode(string $code, array &$patches) : string
    {
        if (!\preg_match_all(self::FLEXIBLE_DOC_STRING_REGEX, $code, $matches, \PREG_SET_ORDER | \PREG_OFFSET_CAPTURE)) {
            // No heredoc/nowdoc found
            return $code;
        }
        // Keep track of how much we need to adjust string offsets due to the modifications we
        // already made
        $posDelta = 0;
        foreach ($matches as $match) {
            $indentation = $match['indentation'][0];
            $indentationStart = $match['indentation'][1];
            $separator = $match['separator'][0];
            $separatorStart = $match['separator'][1];
            if ($indentation === '' && $separator !== '') {
                // Ordinary heredoc/nowdoc
                continue;
            }
            if ($indentation !== '') {
                // Remove indentation
                $indentationLen = \strlen($indentation);
                $code = \substr_replace($code, '', $indentationStart + $posDelta, $indentationLen);
                $patches[] = [$indentationStart + $posDelta, 'add', $indentation];
                $posDelta -= $indentationLen;
            }
            if ($separator === '') {
                // Insert newline as separator
                $code = \substr_replace($code, "\n", $separatorStart + $posDelta, 0);
                $patches[] = [$separatorStart + $posDelta, 'remove', "\n"];
                $posDelta += 1;
            }
        }
        return $code;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Lexer\TokenEmulator;

use PhpParser\Lexer\Emulative;
final class NullsafeTokenEmulator extends \PhpParser\Lexer\TokenEmulator\TokenEmulator
{
    public function getPhpVersion() : string
    {
        return Emulative::PHP_8_0;
    }
    public function isEmulationNeeded(string $code) : bool
    {
        return \strpos($code, '?->') !== \false;
    }
    public function emulate(string $code, array $tokens) : array
    {
        // We need to manually iterate and manage a count because we'll change
        // the tokens array on the way
        $line = 1;
        for ($i = 0, $c = \count($tokens); $i < $c; ++$i) {
            if ($tokens[$i] === '?' && isset($tokens[$i + 1]) && $tokens[$i + 1][0] === \T_OBJECT_OPERATOR) {
                \array_splice($tokens, $i, 2, [[\T_NULLSAFE_OBJECT_OPERATOR, '?->', $line]]);
                $c--;
                continue;
            }
            // Handle ?-> inside encapsed string.
            if ($tokens[$i][0] === \T_ENCAPSED_AND_WHITESPACE && isset($tokens[$i - 1]) && $tokens[$i - 1][0] === \T_VARIABLE && \preg_match('/^\\?->([a-zA-Z_\\x80-\\xff][a-zA-Z0-9_\\x80-\\xff]*)/', $tokens[$i][1], $matches)) {
                $replacement = [[\T_NULLSAFE_OBJECT_OPERATOR, '?->', $line], [\T_STRING, $matches[1], $line]];
                if (\strlen($matches[0]) !== \strlen($tokens[$i][1])) {
                    $replacement[] = [\T_ENCAPSED_AND_WHITESPACE, \substr($tokens[$i][1], \strlen($matches[0])), $line];
                }
                \array_splice($tokens, $i, 1, $replacement);
                $c += \count($replacement) - 1;
                continue;
            }
            if (\is_array($tokens[$i])) {
                $line += \substr_count($tokens[$i][1], "\n");
            }
        }
        return $tokens;
    }
    public function reverseEmulate(string $code, array $tokens) : array
    {
        // ?-> was not valid code previously, don't bother.
        return $tokens;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Lexer\TokenEmulator;

/**
 * Reverses emulation direction of the inner emulator.
 */
final class ReverseEmulator extends \PhpParser\Lexer\TokenEmulator\TokenEmulator
{
    /** @var TokenEmulator Inner emulator */
    private $emulator;
    public function __construct(\PhpParser\Lexer\TokenEmulator\TokenEmulator $emulator)
    {
        $this->emulator = $emulator;
    }
    public function getPhpVersion() : string
    {
        return $this->emulator->getPhpVersion();
    }
    public function isEmulationNeeded(string $code) : bool
    {
        return $this->emulator->isEmulationNeeded($code);
    }
    public function emulate(string $code, array $tokens) : array
    {
        return $this->emulator->reverseEmulate($code, $tokens);
    }
    public function reverseEmulate(string $code, array $tokens) : array
    {
        return $this->emulator->emulate($code, $tokens);
    }
    public function preprocessCode(string $code, array &$patches) : string
    {
        return $code;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Lexer\TokenEmulator;

/** @internal */
abstract class TokenEmulator
{
    public abstract function getPhpVersion() : string;
    public abstract function isEmulationNeeded(string $code) : bool;
    /**
     * @return array Modified Tokens
     */
    public abstract function emulate(string $code, array $tokens) : array;
    /**
     * @return array Modified Tokens
     */
    public abstract function reverseEmulate(string $code, array $tokens) : array;
    public function preprocessCode(string $code, array &$patches) : string
    {
        return $code;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Lexer\TokenEmulator;

abstract class KeywordEmulator extends \PhpParser\Lexer\TokenEmulator\TokenEmulator
{
    abstract function getKeywordString() : string;
    abstract function getKeywordToken() : int;
    public function isEmulationNeeded(string $code) : bool
    {
        return \strpos(\strtolower($code), $this->getKeywordString()) !== \false;
    }
    protected function isKeywordContext(array $tokens, int $pos) : bool
    {
        $previousNonSpaceToken = $this->getPreviousNonSpaceToken($tokens, $pos);
        return $previousNonSpaceToken === null || $previousNonSpaceToken[0] !== \T_OBJECT_OPERATOR;
    }
    public function emulate(string $code, array $tokens) : array
    {
        $keywordString = $this->getKeywordString();
        foreach ($tokens as $i => $token) {
            if ($token[0] === \T_STRING && \strtolower($token[1]) === $keywordString && $this->isKeywordContext($tokens, $i)) {
                $tokens[$i][0] = $this->getKeywordToken();
            }
        }
        return $tokens;
    }
    /**
     * @param mixed[] $tokens
     * @return array|string|null
     */
    private function getPreviousNonSpaceToken(array $tokens, int $start)
    {
        for ($i = $start - 1; $i >= 0; --$i) {
            if ($tokens[$i][0] === \T_WHITESPACE) {
                continue;
            }
            return $tokens[$i];
        }
        return null;
    }
    public function reverseEmulate(string $code, array $tokens) : array
    {
        $keywordToken = $this->getKeywordToken();
        foreach ($tokens as $i => $token) {
            if ($token[0] === $keywordToken) {
                $tokens[$i][0] = \T_STRING;
            }
        }
        return $tokens;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Lexer\TokenEmulator;

use PhpParser\Lexer\Emulative;
final class MatchTokenEmulator extends \PhpParser\Lexer\TokenEmulator\KeywordEmulator
{
    public function getPhpVersion() : string
    {
        return Emulative::PHP_8_0;
    }
    public function getKeywordString() : string
    {
        return 'match';
    }
    public function getKeywordToken() : int
    {
        return \T_MATCH;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Lexer\TokenEmulator;

use PhpParser\Lexer\Emulative;
/*
 * In PHP 8.1, "readonly(" was special cased in the lexer in order to support functions with
 * name readonly. In PHP 8.2, this may conflict with readonly properties having a DNF type. For
 * this reason, PHP 8.2 instead treats this as T_READONLY and then handles it specially in the
 * parser. This emulator only exists to handle this special case, which is skipped by the
 * PHP 8.1 ReadonlyTokenEmulator.
 */
class ReadonlyFunctionTokenEmulator extends \PhpParser\Lexer\TokenEmulator\KeywordEmulator
{
    public function getKeywordString() : string
    {
        return 'readonly';
    }
    public function getKeywordToken() : int
    {
        return \T_READONLY;
    }
    public function getPhpVersion() : string
    {
        return Emulative::PHP_8_2;
    }
    public function reverseEmulate(string $code, array $tokens) : array
    {
        // Don't bother
        return $tokens;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Lexer\TokenEmulator;

use PhpParser\Lexer\Emulative;
final class CoaleseEqualTokenEmulator extends \PhpParser\Lexer\TokenEmulator\TokenEmulator
{
    public function getPhpVersion() : string
    {
        return Emulative::PHP_7_4;
    }
    public function isEmulationNeeded(string $code) : bool
    {
        return \strpos($code, '??=') !== \false;
    }
    public function emulate(string $code, array $tokens) : array
    {
        // We need to manually iterate and manage a count because we'll change
        // the tokens array on the way
        $line = 1;
        for ($i = 0, $c = \count($tokens); $i < $c; ++$i) {
            if (isset($tokens[$i + 1])) {
                if ($tokens[$i][0] === \T_COALESCE && $tokens[$i + 1] === '=') {
                    \array_splice($tokens, $i, 2, [[\T_COALESCE_EQUAL, '??=', $line]]);
                    $c--;
                    continue;
                }
            }
            if (\is_array($tokens[$i])) {
                $line += \substr_count($tokens[$i][1], "\n");
            }
        }
        return $tokens;
    }
    public function reverseEmulate(string $code, array $tokens) : array
    {
        // ??= was not valid code previously, don't bother.
        return $tokens;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Lexer\TokenEmulator;

use PhpParser\Lexer\Emulative;
final class NumericLiteralSeparatorEmulator extends \PhpParser\Lexer\TokenEmulator\TokenEmulator
{
    const BIN = '(?:0b[01]+(?:_[01]+)*)';
    const HEX = '(?:0x[0-9a-f]+(?:_[0-9a-f]+)*)';
    const DEC = '(?:[0-9]+(?:_[0-9]+)*)';
    const SIMPLE_FLOAT = '(?:' . self::DEC . '\\.' . self::DEC . '?|\\.' . self::DEC . ')';
    const EXP = '(?:e[+-]?' . self::DEC . ')';
    const FLOAT = '(?:' . self::SIMPLE_FLOAT . self::EXP . '?|' . self::DEC . self::EXP . ')';
    const NUMBER = '~' . self::FLOAT . '|' . self::BIN . '|' . self::HEX . '|' . self::DEC . '~iA';
    public function getPhpVersion() : string
    {
        return Emulative::PHP_7_4;
    }
    public function isEmulationNeeded(string $code) : bool
    {
        return \preg_match('~[0-9]_[0-9]~', $code) || \preg_match('~0x[0-9a-f]+_[0-9a-f]~i', $code);
    }
    public function emulate(string $code, array $tokens) : array
    {
        // We need to manually iterate and manage a count because we'll change
        // the tokens array on the way
        $codeOffset = 0;
        for ($i = 0, $c = \count($tokens); $i < $c; ++$i) {
            $token = $tokens[$i];
            $tokenLen = \strlen(\is_array($token) ? $token[1] : $token);
            if ($token[0] !== \T_LNUMBER && $token[0] !== \T_DNUMBER) {
                $codeOffset += $tokenLen;
                continue;
            }
            $res = \preg_match(self::NUMBER, $code, $matches, 0, $codeOffset);
            \assert($res, "No number at number token position");
            $match = $matches[0];
            $matchLen = \strlen($match);
            if ($matchLen === $tokenLen) {
                // Original token already holds the full number.
                $codeOffset += $tokenLen;
                continue;
            }
            $tokenKind = $this->resolveIntegerOrFloatToken($match);
            $newTokens = [[$tokenKind, $match, $token[2]]];
            $numTokens = 1;
            $len = $tokenLen;
            while ($matchLen > $len) {
                $nextToken = $tokens[$i + $numTokens];
                $nextTokenText = \is_array($nextToken) ? $nextToken[1] : $nextToken;
                $nextTokenLen = \strlen($nextTokenText);
                $numTokens++;
                if ($matchLen < $len + $nextTokenLen) {
                    // Split trailing characters into a partial token.
                    \assert(\is_array($nextToken), "Partial token should be an array token");
                    $partialText = \substr($nextTokenText, $matchLen - $len);
                    $newTokens[] = [$nextToken[0], $partialText, $nextToken[2]];
                    break;
                }
                $len += $nextTokenLen;
            }
            \array_splice($tokens, $i, $numTokens, $newTokens);
            $c -= $numTokens - \count($newTokens);
            $codeOffset += $matchLen;
        }
        return $tokens;
    }
    private function resolveIntegerOrFloatToken(string $str) : int
    {
        $str = \str_replace('_', '', $str);
        if (\stripos($str, '0b') === 0) {
            $num = \bindec($str);
        } elseif (\stripos($str, '0x') === 0) {
            $num = \hexdec($str);
        } elseif (\stripos($str, '0') === 0 && \ctype_digit($str)) {
            $num = \octdec($str);
        } else {
            $num = +$str;
        }
        return \is_float($num) ? \T_DNUMBER : \T_LNUMBER;
    }
    public function reverseEmulate(string $code, array $tokens) : array
    {
        // Numeric separators were not legal code previously, don't bother.
        return $tokens;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Lexer;

use PhpParser\Error;
use PhpParser\ErrorHandler;
use PhpParser\Lexer;
use PhpParser\Lexer\TokenEmulator\AttributeEmulator;
use PhpParser\Lexer\TokenEmulator\EnumTokenEmulator;
use PhpParser\Lexer\TokenEmulator\CoaleseEqualTokenEmulator;
use PhpParser\Lexer\TokenEmulator\ExplicitOctalEmulator;
use PhpParser\Lexer\TokenEmulator\FlexibleDocStringEmulator;
use PhpParser\Lexer\TokenEmulator\FnTokenEmulator;
use PhpParser\Lexer\TokenEmulator\MatchTokenEmulator;
use PhpParser\Lexer\TokenEmulator\NullsafeTokenEmulator;
use PhpParser\Lexer\TokenEmulator\NumericLiteralSeparatorEmulator;
use PhpParser\Lexer\TokenEmulator\ReadonlyFunctionTokenEmulator;
use PhpParser\Lexer\TokenEmulator\ReadonlyTokenEmulator;
use PhpParser\Lexer\TokenEmulator\ReverseEmulator;
use PhpParser\Lexer\TokenEmulator\TokenEmulator;
class Emulative extends Lexer
{
    const PHP_7_3 = '7.3dev';
    const PHP_7_4 = '7.4dev';
    const PHP_8_0 = '8.0dev';
    const PHP_8_1 = '8.1dev';
    const PHP_8_2 = '8.2dev';
    /** @var mixed[] Patches used to reverse changes introduced in the code */
    private $patches = [];
    /** @var TokenEmulator[] */
    private $emulators = [];
    /** @var string */
    private $targetPhpVersion;
    /**
     * @param mixed[] $options Lexer options. In addition to the usual options,
     *                         accepts a 'phpVersion' string that specifies the
     *                         version to emulate. Defaults to newest supported.
     */
    public function __construct(array $options = [])
    {
        $this->targetPhpVersion = $options['phpVersion'] ?? \PhpParser\Lexer\Emulative::PHP_8_2;
        unset($options['phpVersion']);
        parent::__construct($options);
        $emulators = [new FlexibleDocStringEmulator(), new FnTokenEmulator(), new MatchTokenEmulator(), new CoaleseEqualTokenEmulator(), new NumericLiteralSeparatorEmulator(), new NullsafeTokenEmulator(), new AttributeEmulator(), new EnumTokenEmulator(), new ReadonlyTokenEmulator(), new ExplicitOctalEmulator(), new ReadonlyFunctionTokenEmulator()];
        // Collect emulators that are relevant for the PHP version we're running
        // and the PHP version we're targeting for emulation.
        foreach ($emulators as $emulator) {
            $emulatorPhpVersion = $emulator->getPhpVersion();
            if ($this->isForwardEmulationNeeded($emulatorPhpVersion)) {
                $this->emulators[] = $emulator;
            } else {
                if ($this->isReverseEmulationNeeded($emulatorPhpVersion)) {
                    $this->emulators[] = new ReverseEmulator($emulator);
                }
            }
        }
    }
    public function startLexing(string $code, ErrorHandler $errorHandler = null)
    {
        $emulators = \array_filter($this->emulators, function ($emulator) use($code) {
            return $emulator->isEmulationNeeded($code);
        });
        if (empty($emulators)) {
            // Nothing to emulate, yay
            parent::startLexing($code, $errorHandler);
            return;
        }
        $this->patches = [];
        foreach ($emulators as $emulator) {
            $code = $emulator->preprocessCode($code, $this->patches);
        }
        $collector = new ErrorHandler\Collecting();
        parent::startLexing($code, $collector);
        $this->sortPatches();
        $this->fixupTokens();
        $errors = $collector->getErrors();
        if (!empty($errors)) {
            $this->fixupErrors($errors);
            foreach ($errors as $error) {
                $errorHandler->handleError($error);
            }
        }
        foreach ($emulators as $emulator) {
            $this->tokens = $emulator->emulate($code, $this->tokens);
        }
    }
    private function isForwardEmulationNeeded(string $emulatorPhpVersion) : bool
    {
        return \version_compare(\PHP_VERSION, $emulatorPhpVersion, '<') && \version_compare($this->targetPhpVersion, $emulatorPhpVersion, '>=');
    }
    private function isReverseEmulationNeeded(string $emulatorPhpVersion) : bool
    {
        return \version_compare(\PHP_VERSION, $emulatorPhpVersion, '>=') && \version_compare($this->targetPhpVersion, $emulatorPhpVersion, '<');
    }
    private function sortPatches()
    {
        // Patches may be contributed by different emulators.
        // Make sure they are sorted by increasing patch position.
        \usort($this->patches, function ($p1, $p2) {
            return $p1[0] <=> $p2[0];
        });
    }
    private function fixupTokens()
    {
        if (\count($this->patches) === 0) {
            return;
        }
        // Load first patch
        $patchIdx = 0;
        list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx];
        // We use a manual loop over the tokens, because we modify the array on the fly
        $pos = 0;
        for ($i = 0, $c = \count($this->tokens); $i < $c; $i++) {
            $token = $this->tokens[$i];
            if (\is_string($token)) {
                if ($patchPos === $pos) {
                    // Only support replacement for string tokens.
                    \assert($patchType === 'replace');
                    $this->tokens[$i] = $patchText;
                    // Fetch the next patch
                    $patchIdx++;
                    if ($patchIdx >= \count($this->patches)) {
                        // No more patches, we're done
                        return;
                    }
                    list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx];
                }
                $pos += \strlen($token);
                continue;
            }
            $len = \strlen($token[1]);
            $posDelta = 0;
            while ($patchPos >= $pos && $patchPos < $pos + $len) {
                $patchTextLen = \strlen($patchText);
                if ($patchType === 'remove') {
                    if ($patchPos === $pos && $patchTextLen === $len) {
                        // Remove token entirely
                        \array_splice($this->tokens, $i, 1, []);
                        $i--;
                        $c--;
                    } else {
                        // Remove from token string
                        $this->tokens[$i][1] = \substr_replace($token[1], '', $patchPos - $pos + $posDelta, $patchTextLen);
                        $posDelta -= $patchTextLen;
                    }
                } elseif ($patchType === 'add') {
                    // Insert into the token string
                    $this->tokens[$i][1] = \substr_replace($token[1], $patchText, $patchPos - $pos + $posDelta, 0);
                    $posDelta += $patchTextLen;
                } else {
                    if ($patchType === 'replace') {
                        // Replace inside the token string
                        $this->tokens[$i][1] = \substr_replace($token[1], $patchText, $patchPos - $pos + $posDelta, $patchTextLen);
                    } else {
                        \assert(\false);
                    }
                }
                // Fetch the next patch
                $patchIdx++;
                if ($patchIdx >= \count($this->patches)) {
                    // No more patches, we're done
                    return;
                }
                list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx];
                // Multiple patches may apply to the same token. Reload the current one to check
                // If the new patch applies
                $token = $this->tokens[$i];
            }
            $pos += $len;
        }
        // A patch did not apply
        \assert(\false);
    }
    /**
     * Fixup line and position information in errors.
     *
     * @param Error[] $errors
     */
    private function fixupErrors(array $errors)
    {
        foreach ($errors as $error) {
            $attrs = $error->getAttributes();
            $posDelta = 0;
            $lineDelta = 0;
            foreach ($this->patches as $patch) {
                list($patchPos, $patchType, $patchText) = $patch;
                if ($patchPos >= $attrs['startFilePos']) {
                    // No longer relevant
                    break;
                }
                if ($patchType === 'add') {
                    $posDelta += \strlen($patchText);
                    $lineDelta += \substr_count($patchText, "\n");
                } else {
                    if ($patchType === 'remove') {
                        $posDelta -= \strlen($patchText);
                        $lineDelta -= \substr_count($patchText, "\n");
                    }
                }
            }
            $attrs['startFilePos'] += $posDelta;
            $attrs['endFilePos'] += $posDelta;
            $attrs['startLine'] += $lineDelta;
            $attrs['endLine'] += $lineDelta;
            $error->setAttributes($attrs);
        }
    }
}
<?php

declare (strict_types=1);
namespace PhpParser;

class ParserFactory
{
    const PREFER_PHP7 = 1;
    const PREFER_PHP5 = 2;
    const ONLY_PHP7 = 3;
    const ONLY_PHP5 = 4;
    /**
     * Creates a Parser instance, according to the provided kind.
     *
     * @param int        $kind  One of ::PREFER_PHP7, ::PREFER_PHP5, ::ONLY_PHP7 or ::ONLY_PHP5
     * @param Lexer|null $lexer Lexer to use. Defaults to emulative lexer when not specified
     * @param array      $parserOptions Parser options. See ParserAbstract::__construct() argument
     *
     * @return Parser The parser instance
     */
    public function create(int $kind, \PhpParser\Lexer $lexer = null, array $parserOptions = []) : \PhpParser\Parser
    {
        if (null === $lexer) {
            $lexer = new \PhpParser\Lexer\Emulative();
        }
        switch ($kind) {
            case self::PREFER_PHP7:
                return new \PhpParser\Parser\Multiple([new \PhpParser\Parser\Php7($lexer, $parserOptions), new \PhpParser\Parser\Php5($lexer, $parserOptions)]);
            case self::PREFER_PHP5:
                return new \PhpParser\Parser\Multiple([new \PhpParser\Parser\Php5($lexer, $parserOptions), new \PhpParser\Parser\Php7($lexer, $parserOptions)]);
            case self::ONLY_PHP7:
                return new \PhpParser\Parser\Php7($lexer, $parserOptions);
            case self::ONLY_PHP5:
                return new \PhpParser\Parser\Php5($lexer, $parserOptions);
            default:
                throw new \LogicException('Kind must be one of ::PREFER_PHP7, ::PREFER_PHP5, ::ONLY_PHP7 or ::ONLY_PHP5');
        }
    }
}
<?php

declare (strict_types=1);
namespace PhpParser;

class Comment implements \JsonSerializable
{
    protected $text;
    protected $startLine;
    protected $startFilePos;
    protected $startTokenPos;
    protected $endLine;
    protected $endFilePos;
    protected $endTokenPos;
    /**
     * Constructs a comment node.
     *
     * @param string $text          Comment text (including comment delimiters like /*)
     * @param int    $startLine     Line number the comment started on
     * @param int    $startFilePos  File offset the comment started on
     * @param int    $startTokenPos Token offset the comment started on
     */
    public function __construct(string $text, int $startLine = -1, int $startFilePos = -1, int $startTokenPos = -1, int $endLine = -1, int $endFilePos = -1, int $endTokenPos = -1)
    {
        $this->text = $text;
        $this->startLine = $startLine;
        $this->startFilePos = $startFilePos;
        $this->startTokenPos = $startTokenPos;
        $this->endLine = $endLine;
        $this->endFilePos = $endFilePos;
        $this->endTokenPos = $endTokenPos;
    }
    /**
     * Gets the comment text.
     *
     * @return string The comment text (including comment delimiters like /*)
     */
    public function getText() : string
    {
        return $this->text;
    }
    /**
     * Gets the line number the comment started on.
     *
     * @return int Line number (or -1 if not available)
     */
    public function getStartLine() : int
    {
        return $this->startLine;
    }
    /**
     * Gets the file offset the comment started on.
     *
     * @return int File offset (or -1 if not available)
     */
    public function getStartFilePos() : int
    {
        return $this->startFilePos;
    }
    /**
     * Gets the token offset the comment started on.
     *
     * @return int Token offset (or -1 if not available)
     */
    public function getStartTokenPos() : int
    {
        return $this->startTokenPos;
    }
    /**
     * Gets the line number the comment ends on.
     *
     * @return int Line number (or -1 if not available)
     */
    public function getEndLine() : int
    {
        return $this->endLine;
    }
    /**
     * Gets the file offset the comment ends on.
     *
     * @return int File offset (or -1 if not available)
     */
    public function getEndFilePos() : int
    {
        return $this->endFilePos;
    }
    /**
     * Gets the token offset the comment ends on.
     *
     * @return int Token offset (or -1 if not available)
     */
    public function getEndTokenPos() : int
    {
        return $this->endTokenPos;
    }
    /**
     * Gets the line number the comment started on.
     *
     * @deprecated Use getStartLine() instead
     *
     * @return int Line number
     */
    public function getLine() : int
    {
        return $this->startLine;
    }
    /**
     * Gets the file offset the comment started on.
     *
     * @deprecated Use getStartFilePos() instead
     *
     * @return int File offset
     */
    public function getFilePos() : int
    {
        return $this->startFilePos;
    }
    /**
     * Gets the token offset the comment started on.
     *
     * @deprecated Use getStartTokenPos() instead
     *
     * @return int Token offset
     */
    public function getTokenPos() : int
    {
        return $this->startTokenPos;
    }
    /**
     * Gets the comment text.
     *
     * @return string The comment text (including comment delimiters like /*)
     */
    public function __toString() : string
    {
        return $this->text;
    }
    /**
     * Gets the reformatted comment text.
     *
     * "Reformatted" here means that we try to clean up the whitespace at the
     * starts of the lines. This is necessary because we receive the comments
     * without trailing whitespace on the first line, but with trailing whitespace
     * on all subsequent lines.
     *
     * @return mixed|string
     */
    public function getReformattedText()
    {
        $text = \trim($this->text);
        $newlinePos = \strpos($text, "\n");
        if (\false === $newlinePos) {
            // Single line comments don't need further processing
            return $text;
        } elseif (\preg_match('((*BSR_ANYCRLF)(*ANYCRLF)^.*(?:\\R\\s+\\*.*)+$)', $text)) {
            // Multi line comment of the type
            //
            //     /*
            //      * Some text.
            //      * Some more text.
            //      */
            //
            // is handled by replacing the whitespace sequences before the * by a single space
            return \preg_replace('(^\\s+\\*)m', ' *', $this->text);
        } elseif (\preg_match('(^/\\*\\*?\\s*[\\r\\n])', $text) && \preg_match('(\\n(\\s*)\\*/$)', $text, $matches)) {
            // Multi line comment of the type
            //
            //    /*
            //        Some text.
            //        Some more text.
            //    */
            //
            // is handled by removing the whitespace sequence on the line before the closing
            // */ on all lines. So if the last line is "    */", then "    " is removed at the
            // start of all lines.
            return \preg_replace('(^' . \preg_quote($matches[1]) . ')m', '', $text);
        } elseif (\preg_match('(^/\\*\\*?\\s*(?!\\s))', $text, $matches)) {
            // Multi line comment of the type
            //
            //     /* Some text.
            //        Some more text.
            //          Indented text.
            //        Even more text. */
            //
            // is handled by removing the difference between the shortest whitespace prefix on all
            // lines and the length of the "/* " opening sequence.
            $prefixLen = $this->getShortestWhitespacePrefixLen(\substr($text, $newlinePos + 1));
            $removeLen = $prefixLen - \strlen($matches[0]);
            return \preg_replace('(^\\s{' . $removeLen . '})m', '', $text);
        }
        // No idea how to format this comment, so simply return as is
        return $text;
    }
    /**
     * Get length of shortest whitespace prefix (at the start of a line).
     *
     * If there is a line with no prefix whitespace, 0 is a valid return value.
     *
     * @param string $str String to check
     * @return int Length in characters. Tabs count as single characters.
     */
    private function getShortestWhitespacePrefixLen(string $str) : int
    {
        $lines = \explode("\n", $str);
        $shortestPrefixLen = \INF;
        foreach ($lines as $line) {
            \preg_match('(^\\s*)', $line, $matches);
            $prefixLen = \strlen($matches[0]);
            if ($prefixLen < $shortestPrefixLen) {
                $shortestPrefixLen = $prefixLen;
            }
        }
        return $shortestPrefixLen;
    }
    /**
     * @return       array
     * @psalm-return array{nodeType:string, text:mixed, line:mixed, filePos:mixed}
     */
    public function jsonSerialize() : array
    {
        // Technically not a node, but we make it look like one anyway
        $type = $this instanceof \PhpParser\Comment\Doc ? 'Comment_Doc' : 'Comment';
        return [
            'nodeType' => $type,
            'text' => $this->text,
            // TODO: Rename these to include "start".
            'line' => $this->startLine,
            'filePos' => $this->startFilePos,
            'tokenPos' => $this->startTokenPos,
            'endLine' => $this->endLine,
            'endFilePos' => $this->endFilePos,
            'endTokenPos' => $this->endTokenPos,
        ];
    }
}
<?php

declare (strict_types=1);
namespace PhpParser;

interface Node
{
    /**
     * Gets the type of the node.
     *
     * @return string Type of the node
     */
    public function getType() : string;
    /**
     * Gets the names of the sub nodes.
     *
     * @return array Names of sub nodes
     */
    public function getSubNodeNames() : array;
    /**
     * Gets line the node started in (alias of getStartLine).
     *
     * @return int Start line (or -1 if not available)
     */
    public function getLine() : int;
    /**
     * Gets line the node started in.
     *
     * Requires the 'startLine' attribute to be enabled in the lexer (enabled by default).
     *
     * @return int Start line (or -1 if not available)
     */
    public function getStartLine() : int;
    /**
     * Gets the line the node ended in.
     *
     * Requires the 'endLine' attribute to be enabled in the lexer (enabled by default).
     *
     * @return int End line (or -1 if not available)
     */
    public function getEndLine() : int;
    /**
     * Gets the token offset of the first token that is part of this node.
     *
     * The offset is an index into the array returned by Lexer::getTokens().
     *
     * Requires the 'startTokenPos' attribute to be enabled in the lexer (DISABLED by default).
     *
     * @return int Token start position (or -1 if not available)
     */
    public function getStartTokenPos() : int;
    /**
     * Gets the token offset of the last token that is part of this node.
     *
     * The offset is an index into the array returned by Lexer::getTokens().
     *
     * Requires the 'endTokenPos' attribute to be enabled in the lexer (DISABLED by default).
     *
     * @return int Token end position (or -1 if not available)
     */
    public function getEndTokenPos() : int;
    /**
     * Gets the file offset of the first character that is part of this node.
     *
     * Requires the 'startFilePos' attribute to be enabled in the lexer (DISABLED by default).
     *
     * @return int File start position (or -1 if not available)
     */
    public function getStartFilePos() : int;
    /**
     * Gets the file offset of the last character that is part of this node.
     *
     * Requires the 'endFilePos' attribute to be enabled in the lexer (DISABLED by default).
     *
     * @return int File end position (or -1 if not available)
     */
    public function getEndFilePos() : int;
    /**
     * Gets all comments directly preceding this node.
     *
     * The comments are also available through the "comments" attribute.
     *
     * @return Comment[]
     */
    public function getComments() : array;
    /**
     * Gets the doc comment of the node.
     *
     * @return null|Comment\Doc Doc comment object or null
     */
    public function getDocComment();
    /**
     * Sets the doc comment of the node.
     *
     * This will either replace an existing doc comment or add it to the comments array.
     *
     * @param Comment\Doc $docComment Doc comment to set
     */
    public function setDocComment(\PhpParser\Comment\Doc $docComment);
    /**
     * Sets an attribute on a node.
     *
     * @param string $key
     * @param mixed  $value
     */
    public function setAttribute(string $key, $value);
    /**
     * Returns whether an attribute exists.
     *
     * @param string $key
     *
     * @return bool
     */
    public function hasAttribute(string $key) : bool;
    /**
     * Returns the value of an attribute.
     *
     * @param string $key
     * @param mixed  $default
     *
     * @return mixed
     */
    public function getAttribute(string $key, $default = null);
    /**
     * Returns all the attributes of this node.
     *
     * @return array
     */
    public function getAttributes() : array;
    /**
     * Replaces all the attributes of this node.
     *
     * @param array $attributes
     */
    public function setAttributes(array $attributes);
}
<?php

declare (strict_types=1);
namespace PhpParser\Builder;

use PhpParser\BuilderHelpers;
use PhpParser\Node;
abstract class FunctionLike extends \PhpParser\Builder\Declaration
{
    protected $returnByRef = \false;
    protected $params = [];
    /** @var string|Node\Name|Node\NullableType|null */
    protected $returnType = null;
    /**
     * Make the function return by reference.
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function makeReturnByRef()
    {
        $this->returnByRef = \true;
        return $this;
    }
    /**
     * Adds a parameter.
     *
     * @param Node\Param|Param $param The parameter to add
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function addParam($param)
    {
        $param = BuilderHelpers::normalizeNode($param);
        if (!$param instanceof Node\Param) {
            throw new \LogicException(\sprintf('Expected parameter node, got "%s"', $param->getType()));
        }
        $this->params[] = $param;
        return $this;
    }
    /**
     * Adds multiple parameters.
     *
     * @param array $params The parameters to add
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function addParams(array $params)
    {
        foreach ($params as $param) {
            $this->addParam($param);
        }
        return $this;
    }
    /**
     * Sets the return type for PHP 7.
     *
     * @param string|Node\Name|Node\Identifier|Node\ComplexType $type
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function setReturnType($type)
    {
        $this->returnType = BuilderHelpers::normalizeType($type);
        return $this;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Builder;

use PhpParser;
use PhpParser\BuilderHelpers;
use PhpParser\Node;
class Param implements PhpParser\Builder
{
    protected $name;
    protected $default = null;
    /** @var Node\Identifier|Node\Name|Node\NullableType|null */
    protected $type = null;
    protected $byRef = \false;
    protected $variadic = \false;
    /** @var Node\AttributeGroup[] */
    protected $attributeGroups = [];
    /**
     * Creates a parameter builder.
     *
     * @param string $name Name of the parameter
     */
    public function __construct(string $name)
    {
        $this->name = $name;
    }
    /**
     * Sets default value for the parameter.
     *
     * @param mixed $value Default value to use
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function setDefault($value)
    {
        $this->default = BuilderHelpers::normalizeValue($value);
        return $this;
    }
    /**
     * Sets type for the parameter.
     *
     * @param string|Node\Name|Node\Identifier|Node\ComplexType $type Parameter type
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function setType($type)
    {
        $this->type = BuilderHelpers::normalizeType($type);
        if ($this->type == 'void') {
            throw new \LogicException('Parameter type cannot be void');
        }
        return $this;
    }
    /**
     * Sets type for the parameter.
     *
     * @param string|Node\Name|Node\Identifier|Node\ComplexType $type Parameter type
     *
     * @return $this The builder instance (for fluid interface)
     *
     * @deprecated Use setType() instead
     */
    public function setTypeHint($type)
    {
        return $this->setType($type);
    }
    /**
     * Make the parameter accept the value by reference.
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function makeByRef()
    {
        $this->byRef = \true;
        return $this;
    }
    /**
     * Make the parameter variadic
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function makeVariadic()
    {
        $this->variadic = \true;
        return $this;
    }
    /**
     * Adds an attribute group.
     *
     * @param Node\Attribute|Node\AttributeGroup $attribute
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function addAttribute($attribute)
    {
        $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
        return $this;
    }
    /**
     * Returns the built parameter node.
     *
     * @return Node\Param The built parameter node
     */
    public function getNode() : Node
    {
        return new Node\Param(new Node\Expr\Variable($this->name), $this->default, $this->type, $this->byRef, $this->variadic, [], 0, $this->attributeGroups);
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Builder;

use PhpParser;
use PhpParser\BuilderHelpers;
use PhpParser\Node;
use PhpParser\Node\Stmt;
class Function_ extends \PhpParser\Builder\FunctionLike
{
    protected $name;
    protected $stmts = [];
    /** @var Node\AttributeGroup[] */
    protected $attributeGroups = [];
    /**
     * Creates a function builder.
     *
     * @param string $name Name of the function
     */
    public function __construct(string $name)
    {
        $this->name = $name;
    }
    /**
     * Adds a statement.
     *
     * @param Node|PhpParser\Builder $stmt The statement to add
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function addStmt($stmt)
    {
        $this->stmts[] = BuilderHelpers::normalizeStmt($stmt);
        return $this;
    }
    /**
     * Adds an attribute group.
     *
     * @param Node\Attribute|Node\AttributeGroup $attribute
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function addAttribute($attribute)
    {
        $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
        return $this;
    }
    /**
     * Returns the built function node.
     *
     * @return Stmt\Function_ The built function node
     */
    public function getNode() : Node
    {
        return new Stmt\Function_($this->name, ['byRef' => $this->returnByRef, 'params' => $this->params, 'returnType' => $this->returnType, 'stmts' => $this->stmts, 'attrGroups' => $this->attributeGroups], $this->attributes);
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Builder;

use PhpParser\Builder;
use PhpParser\BuilderHelpers;
use PhpParser\Node;
use PhpParser\Node\Stmt;
class Use_ implements Builder
{
    protected $name;
    protected $type;
    protected $alias = null;
    /**
     * Creates a name use (alias) builder.
     *
     * @param Node\Name|string $name Name of the entity (namespace, class, function, constant) to alias
     * @param int              $type One of the Stmt\Use_::TYPE_* constants
     */
    public function __construct($name, int $type)
    {
        $this->name = BuilderHelpers::normalizeName($name);
        $this->type = $type;
    }
    /**
     * Sets alias for used name.
     *
     * @param string $alias Alias to use (last component of full name by default)
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function as(string $alias)
    {
        $this->alias = $alias;
        return $this;
    }
    /**
     * Returns the built node.
     *
     * @return Stmt\Use_ The built node
     */
    public function getNode() : Node
    {
        return new Stmt\Use_([new Stmt\UseUse($this->name, $this->alias)], $this->type);
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Builder;

use PhpParser;
use PhpParser\BuilderHelpers;
use PhpParser\Node;
use PhpParser\Node\Stmt;
class Trait_ extends \PhpParser\Builder\Declaration
{
    protected $name;
    protected $uses = [];
    protected $properties = [];
    protected $methods = [];
    /** @var Node\AttributeGroup[] */
    protected $attributeGroups = [];
    /**
     * Creates an interface builder.
     *
     * @param string $name Name of the interface
     */
    public function __construct(string $name)
    {
        $this->name = $name;
    }
    /**
     * Adds a statement.
     *
     * @param Stmt|PhpParser\Builder $stmt The statement to add
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function addStmt($stmt)
    {
        $stmt = BuilderHelpers::normalizeNode($stmt);
        if ($stmt instanceof Stmt\Property) {
            $this->properties[] = $stmt;
        } elseif ($stmt instanceof Stmt\ClassMethod) {
            $this->methods[] = $stmt;
        } elseif ($stmt instanceof Stmt\TraitUse) {
            $this->uses[] = $stmt;
        } else {
            throw new \LogicException(\sprintf('Unexpected node of type "%s"', $stmt->getType()));
        }
        return $this;
    }
    /**
     * Adds an attribute group.
     *
     * @param Node\Attribute|Node\AttributeGroup $attribute
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function addAttribute($attribute)
    {
        $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
        return $this;
    }
    /**
     * Returns the built trait node.
     *
     * @return Stmt\Trait_ The built interface node
     */
    public function getNode() : PhpParser\Node
    {
        return new Stmt\Trait_($this->name, ['stmts' => \array_merge($this->uses, $this->properties, $this->methods), 'attrGroups' => $this->attributeGroups], $this->attributes);
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Builder;

use PhpParser\Builder;
use PhpParser\BuilderHelpers;
use PhpParser\Node;
use PhpParser\Node\Stmt;
class TraitUse implements Builder
{
    protected $traits = [];
    protected $adaptations = [];
    /**
     * Creates a trait use builder.
     *
     * @param Node\Name|string ...$traits Names of used traits
     */
    public function __construct(...$traits)
    {
        foreach ($traits as $trait) {
            $this->and($trait);
        }
    }
    /**
     * Adds used trait.
     *
     * @param Node\Name|string $trait Trait name
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function and($trait)
    {
        $this->traits[] = BuilderHelpers::normalizeName($trait);
        return $this;
    }
    /**
     * Adds trait adaptation.
     *
     * @param Stmt\TraitUseAdaptation|Builder\TraitUseAdaptation $adaptation Trait adaptation
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function with($adaptation)
    {
        $adaptation = BuilderHelpers::normalizeNode($adaptation);
        if (!$adaptation instanceof Stmt\TraitUseAdaptation) {
            throw new \LogicException('Adaptation must have type TraitUseAdaptation');
        }
        $this->adaptations[] = $adaptation;
        return $this;
    }
    /**
     * Returns the built node.
     *
     * @return Node The built node
     */
    public function getNode() : Node
    {
        return new Stmt\TraitUse($this->traits, $this->adaptations);
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Builder;

use PhpParser;
use PhpParser\BuilderHelpers;
use PhpParser\Node;
use PhpParser\Node\Identifier;
use PhpParser\Node\Stmt;
class EnumCase implements PhpParser\Builder
{
    protected $name;
    protected $value = null;
    protected $attributes = [];
    /** @var Node\AttributeGroup[] */
    protected $attributeGroups = [];
    /**
     * Creates an enum case builder.
     *
     * @param string|Identifier $name  Name
     */
    public function __construct($name)
    {
        $this->name = $name;
    }
    /**
     * Sets the value.
     *
     * @param Node\Expr|string|int $value
     *
     * @return $this
     */
    public function setValue($value)
    {
        $this->value = BuilderHelpers::normalizeValue($value);
        return $this;
    }
    /**
     * Sets doc comment for the constant.
     *
     * @param PhpParser\Comment\Doc|string $docComment Doc comment to set
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function setDocComment($docComment)
    {
        $this->attributes = ['comments' => [BuilderHelpers::normalizeDocComment($docComment)]];
        return $this;
    }
    /**
     * Adds an attribute group.
     *
     * @param Node\Attribute|Node\AttributeGroup $attribute
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function addAttribute($attribute)
    {
        $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
        return $this;
    }
    /**
     * Returns the built enum case node.
     *
     * @return Stmt\EnumCase The built constant node
     */
    public function getNode() : PhpParser\Node
    {
        return new Stmt\EnumCase($this->name, $this->value, $this->attributeGroups, $this->attributes);
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Builder;

use PhpParser;
use PhpParser\BuilderHelpers;
use PhpParser\Node;
use PhpParser\Node\Name;
use PhpParser\Node\Stmt;
class Class_ extends \PhpParser\Builder\Declaration
{
    protected $name;
    protected $extends = null;
    protected $implements = [];
    protected $flags = 0;
    protected $uses = [];
    protected $constants = [];
    protected $properties = [];
    protected $methods = [];
    /** @var Node\AttributeGroup[] */
    protected $attributeGroups = [];
    /**
     * Creates a class builder.
     *
     * @param string $name Name of the class
     */
    public function __construct(string $name)
    {
        $this->name = $name;
    }
    /**
     * Extends a class.
     *
     * @param Name|string $class Name of class to extend
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function extend($class)
    {
        $this->extends = BuilderHelpers::normalizeName($class);
        return $this;
    }
    /**
     * Implements one or more interfaces.
     *
     * @param Name|string ...$interfaces Names of interfaces to implement
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function implement(...$interfaces)
    {
        foreach ($interfaces as $interface) {
            $this->implements[] = BuilderHelpers::normalizeName($interface);
        }
        return $this;
    }
    /**
     * Makes the class abstract.
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function makeAbstract()
    {
        $this->flags = BuilderHelpers::addClassModifier($this->flags, Stmt\Class_::MODIFIER_ABSTRACT);
        return $this;
    }
    /**
     * Makes the class final.
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function makeFinal()
    {
        $this->flags = BuilderHelpers::addClassModifier($this->flags, Stmt\Class_::MODIFIER_FINAL);
        return $this;
    }
    public function makeReadonly()
    {
        $this->flags = BuilderHelpers::addClassModifier($this->flags, Stmt\Class_::MODIFIER_READONLY);
        return $this;
    }
    /**
     * Adds a statement.
     *
     * @param Stmt|PhpParser\Builder $stmt The statement to add
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function addStmt($stmt)
    {
        $stmt = BuilderHelpers::normalizeNode($stmt);
        $targets = [Stmt\TraitUse::class => &$this->uses, Stmt\ClassConst::class => &$this->constants, Stmt\Property::class => &$this->properties, Stmt\ClassMethod::class => &$this->methods];
        $class = \get_class($stmt);
        if (!isset($targets[$class])) {
            throw new \LogicException(\sprintf('Unexpected node of type "%s"', $stmt->getType()));
        }
        $targets[$class][] = $stmt;
        return $this;
    }
    /**
     * Adds an attribute group.
     *
     * @param Node\Attribute|Node\AttributeGroup $attribute
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function addAttribute($attribute)
    {
        $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
        return $this;
    }
    /**
     * Returns the built class node.
     *
     * @return Stmt\Class_ The built class node
     */
    public function getNode() : PhpParser\Node
    {
        return new Stmt\Class_($this->name, ['flags' => $this->flags, 'extends' => $this->extends, 'implements' => $this->implements, 'stmts' => \array_merge($this->uses, $this->constants, $this->properties, $this->methods), 'attrGroups' => $this->attributeGroups], $this->attributes);
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Builder;

use PhpParser;
use PhpParser\BuilderHelpers;
use PhpParser\Node;
use PhpParser\Node\Identifier;
use PhpParser\Node\Name;
use PhpParser\Node\Stmt;
use PhpParser\Node\ComplexType;
class Property implements PhpParser\Builder
{
    protected $name;
    protected $flags = 0;
    protected $default = null;
    protected $attributes = [];
    /** @var null|Identifier|Name|NullableType */
    protected $type;
    /** @var Node\AttributeGroup[] */
    protected $attributeGroups = [];
    /**
     * Creates a property builder.
     *
     * @param string $name Name of the property
     */
    public function __construct(string $name)
    {
        $this->name = $name;
    }
    /**
     * Makes the property public.
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function makePublic()
    {
        $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PUBLIC);
        return $this;
    }
    /**
     * Makes the property protected.
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function makeProtected()
    {
        $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PROTECTED);
        return $this;
    }
    /**
     * Makes the property private.
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function makePrivate()
    {
        $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PRIVATE);
        return $this;
    }
    /**
     * Makes the property static.
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function makeStatic()
    {
        $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_STATIC);
        return $this;
    }
    /**
     * Makes the property readonly.
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function makeReadonly()
    {
        $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_READONLY);
        return $this;
    }
    /**
     * Sets default value for the property.
     *
     * @param mixed $value Default value to use
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function setDefault($value)
    {
        $this->default = BuilderHelpers::normalizeValue($value);
        return $this;
    }
    /**
     * Sets doc comment for the property.
     *
     * @param PhpParser\Comment\Doc|string $docComment Doc comment to set
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function setDocComment($docComment)
    {
        $this->attributes = ['comments' => [BuilderHelpers::normalizeDocComment($docComment)]];
        return $this;
    }
    /**
     * Sets the property type for PHP 7.4+.
     *
     * @param string|Name|Identifier|ComplexType $type
     *
     * @return $this
     */
    public function setType($type)
    {
        $this->type = BuilderHelpers::normalizeType($type);
        return $this;
    }
    /**
     * Adds an attribute group.
     *
     * @param Node\Attribute|Node\AttributeGroup $attribute
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function addAttribute($attribute)
    {
        $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
        return $this;
    }
    /**
     * Returns the built class node.
     *
     * @return Stmt\Property The built property node
     */
    public function getNode() : PhpParser\Node
    {
        return new Stmt\Property($this->flags !== 0 ? $this->flags : Stmt\Class_::MODIFIER_PUBLIC, [new Stmt\PropertyProperty($this->name, $this->default)], $this->attributes, $this->type, $this->attributeGroups);
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Builder;

use PhpParser;
use PhpParser\BuilderHelpers;
use PhpParser\Node;
use PhpParser\Node\Const_;
use PhpParser\Node\Identifier;
use PhpParser\Node\Stmt;
class ClassConst implements PhpParser\Builder
{
    protected $flags = 0;
    protected $attributes = [];
    protected $constants = [];
    /** @var Node\AttributeGroup[] */
    protected $attributeGroups = [];
    /**
     * Creates a class constant builder
     *
     * @param string|Identifier                          $name  Name
     * @param Node\Expr|bool|null|int|float|string|array $value Value
     */
    public function __construct($name, $value)
    {
        $this->constants = [new Const_($name, BuilderHelpers::normalizeValue($value))];
    }
    /**
     * Add another constant to const group
     *
     * @param string|Identifier                          $name  Name
     * @param Node\Expr|bool|null|int|float|string|array $value Value
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function addConst($name, $value)
    {
        $this->constants[] = new Const_($name, BuilderHelpers::normalizeValue($value));
        return $this;
    }
    /**
     * Makes the constant public.
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function makePublic()
    {
        $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PUBLIC);
        return $this;
    }
    /**
     * Makes the constant protected.
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function makeProtected()
    {
        $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PROTECTED);
        return $this;
    }
    /**
     * Makes the constant private.
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function makePrivate()
    {
        $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PRIVATE);
        return $this;
    }
    /**
     * Makes the constant final.
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function makeFinal()
    {
        $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_FINAL);
        return $this;
    }
    /**
     * Sets doc comment for the constant.
     *
     * @param PhpParser\Comment\Doc|string $docComment Doc comment to set
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function setDocComment($docComment)
    {
        $this->attributes = ['comments' => [BuilderHelpers::normalizeDocComment($docComment)]];
        return $this;
    }
    /**
     * Adds an attribute group.
     *
     * @param Node\Attribute|Node\AttributeGroup $attribute
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function addAttribute($attribute)
    {
        $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
        return $this;
    }
    /**
     * Returns the built class node.
     *
     * @return Stmt\ClassConst The built constant node
     */
    public function getNode() : PhpParser\Node
    {
        return new Stmt\ClassConst($this->constants, $this->flags, $this->attributes, $this->attributeGroups);
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Builder;

use PhpParser\Builder;
use PhpParser\BuilderHelpers;
use PhpParser\Node;
use PhpParser\Node\Stmt;
class TraitUseAdaptation implements Builder
{
    const TYPE_UNDEFINED = 0;
    const TYPE_ALIAS = 1;
    const TYPE_PRECEDENCE = 2;
    /** @var int Type of building adaptation */
    protected $type;
    protected $trait;
    protected $method;
    protected $modifier = null;
    protected $alias = null;
    protected $insteadof = [];
    /**
     * Creates a trait use adaptation builder.
     *
     * @param Node\Name|string|null  $trait  Name of adaptated trait
     * @param Node\Identifier|string $method Name of adaptated method
     */
    public function __construct($trait, $method)
    {
        $this->type = self::TYPE_UNDEFINED;
        $this->trait = \is_null($trait) ? null : BuilderHelpers::normalizeName($trait);
        $this->method = BuilderHelpers::normalizeIdentifier($method);
    }
    /**
     * Sets alias of method.
     *
     * @param Node\Identifier|string $alias Alias for adaptated method
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function as($alias)
    {
        if ($this->type === self::TYPE_UNDEFINED) {
            $this->type = self::TYPE_ALIAS;
        }
        if ($this->type !== self::TYPE_ALIAS) {
            throw new \LogicException('Cannot set alias for not alias adaptation buider');
        }
        $this->alias = $alias;
        return $this;
    }
    /**
     * Sets adaptated method public.
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function makePublic()
    {
        $this->setModifier(Stmt\Class_::MODIFIER_PUBLIC);
        return $this;
    }
    /**
     * Sets adaptated method protected.
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function makeProtected()
    {
        $this->setModifier(Stmt\Class_::MODIFIER_PROTECTED);
        return $this;
    }
    /**
     * Sets adaptated method private.
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function makePrivate()
    {
        $this->setModifier(Stmt\Class_::MODIFIER_PRIVATE);
        return $this;
    }
    /**
     * Adds overwritten traits.
     *
     * @param Node\Name|string ...$traits Traits for overwrite
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function insteadof(...$traits)
    {
        if ($this->type === self::TYPE_UNDEFINED) {
            if (\is_null($this->trait)) {
                throw new \LogicException('Precedence adaptation must have trait');
            }
            $this->type = self::TYPE_PRECEDENCE;
        }
        if ($this->type !== self::TYPE_PRECEDENCE) {
            throw new \LogicException('Cannot add overwritten traits for not precedence adaptation buider');
        }
        foreach ($traits as $trait) {
            $this->insteadof[] = BuilderHelpers::normalizeName($trait);
        }
        return $this;
    }
    protected function setModifier(int $modifier)
    {
        if ($this->type === self::TYPE_UNDEFINED) {
            $this->type = self::TYPE_ALIAS;
        }
        if ($this->type !== self::TYPE_ALIAS) {
            throw new \LogicException('Cannot set access modifier for not alias adaptation buider');
        }
        if (\is_null($this->modifier)) {
            $this->modifier = $modifier;
        } else {
            throw new \LogicException('Multiple access type modifiers are not allowed');
        }
    }
    /**
     * Returns the built node.
     *
     * @return Node The built node
     */
    public function getNode() : Node
    {
        switch ($this->type) {
            case self::TYPE_ALIAS:
                return new Stmt\TraitUseAdaptation\Alias($this->trait, $this->method, $this->modifier, $this->alias);
            case self::TYPE_PRECEDENCE:
                return new Stmt\TraitUseAdaptation\Precedence($this->trait, $this->method, $this->insteadof);
            default:
                throw new \LogicException('Type of adaptation is not defined');
        }
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Builder;

use PhpParser;
use PhpParser\BuilderHelpers;
use PhpParser\Node;
use PhpParser\Node\Name;
use PhpParser\Node\Stmt;
class Interface_ extends \PhpParser\Builder\Declaration
{
    protected $name;
    protected $extends = [];
    protected $constants = [];
    protected $methods = [];
    /** @var Node\AttributeGroup[] */
    protected $attributeGroups = [];
    /**
     * Creates an interface builder.
     *
     * @param string $name Name of the interface
     */
    public function __construct(string $name)
    {
        $this->name = $name;
    }
    /**
     * Extends one or more interfaces.
     *
     * @param Name|string ...$interfaces Names of interfaces to extend
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function extend(...$interfaces)
    {
        foreach ($interfaces as $interface) {
            $this->extends[] = BuilderHelpers::normalizeName($interface);
        }
        return $this;
    }
    /**
     * Adds a statement.
     *
     * @param Stmt|PhpParser\Builder $stmt The statement to add
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function addStmt($stmt)
    {
        $stmt = BuilderHelpers::normalizeNode($stmt);
        if ($stmt instanceof Stmt\ClassConst) {
            $this->constants[] = $stmt;
        } elseif ($stmt instanceof Stmt\ClassMethod) {
            // we erase all statements in the body of an interface method
            $stmt->stmts = null;
            $this->methods[] = $stmt;
        } else {
            throw new \LogicException(\sprintf('Unexpected node of type "%s"', $stmt->getType()));
        }
        return $this;
    }
    /**
     * Adds an attribute group.
     *
     * @param Node\Attribute|Node\AttributeGroup $attribute
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function addAttribute($attribute)
    {
        $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
        return $this;
    }
    /**
     * Returns the built interface node.
     *
     * @return Stmt\Interface_ The built interface node
     */
    public function getNode() : PhpParser\Node
    {
        return new Stmt\Interface_($this->name, ['extends' => $this->extends, 'stmts' => \array_merge($this->constants, $this->methods), 'attrGroups' => $this->attributeGroups], $this->attributes);
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Builder;

use PhpParser;
use PhpParser\BuilderHelpers;
abstract class Declaration implements PhpParser\Builder
{
    protected $attributes = [];
    public abstract function addStmt($stmt);
    /**
     * Adds multiple statements.
     *
     * @param array $stmts The statements to add
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function addStmts(array $stmts)
    {
        foreach ($stmts as $stmt) {
            $this->addStmt($stmt);
        }
        return $this;
    }
    /**
     * Sets doc comment for the declaration.
     *
     * @param PhpParser\Comment\Doc|string $docComment Doc comment to set
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function setDocComment($docComment)
    {
        $this->attributes['comments'] = [BuilderHelpers::normalizeDocComment($docComment)];
        return $this;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Builder;

use PhpParser;
use PhpParser\BuilderHelpers;
use PhpParser\Node;
use PhpParser\Node\Stmt;
class Namespace_ extends \PhpParser\Builder\Declaration
{
    private $name;
    private $stmts = [];
    /**
     * Creates a namespace builder.
     *
     * @param Node\Name|string|null $name Name of the namespace
     */
    public function __construct($name)
    {
        $this->name = null !== $name ? BuilderHelpers::normalizeName($name) : null;
    }
    /**
     * Adds a statement.
     *
     * @param Node|PhpParser\Builder $stmt The statement to add
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function addStmt($stmt)
    {
        $this->stmts[] = BuilderHelpers::normalizeStmt($stmt);
        return $this;
    }
    /**
     * Returns the built node.
     *
     * @return Stmt\Namespace_ The built node
     */
    public function getNode() : Node
    {
        return new Stmt\Namespace_($this->name, $this->stmts, $this->attributes);
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Builder;

use PhpParser;
use PhpParser\BuilderHelpers;
use PhpParser\Node;
use PhpParser\Node\Stmt;
class Method extends \PhpParser\Builder\FunctionLike
{
    protected $name;
    protected $flags = 0;
    /** @var array|null */
    protected $stmts = [];
    /** @var Node\AttributeGroup[] */
    protected $attributeGroups = [];
    /**
     * Creates a method builder.
     *
     * @param string $name Name of the method
     */
    public function __construct(string $name)
    {
        $this->name = $name;
    }
    /**
     * Makes the method public.
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function makePublic()
    {
        $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PUBLIC);
        return $this;
    }
    /**
     * Makes the method protected.
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function makeProtected()
    {
        $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PROTECTED);
        return $this;
    }
    /**
     * Makes the method private.
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function makePrivate()
    {
        $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PRIVATE);
        return $this;
    }
    /**
     * Makes the method static.
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function makeStatic()
    {
        $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_STATIC);
        return $this;
    }
    /**
     * Makes the method abstract.
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function makeAbstract()
    {
        if (!empty($this->stmts)) {
            throw new \LogicException('Cannot make method with statements abstract');
        }
        $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_ABSTRACT);
        $this->stmts = null;
        // abstract methods don't have statements
        return $this;
    }
    /**
     * Makes the method final.
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function makeFinal()
    {
        $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_FINAL);
        return $this;
    }
    /**
     * Adds a statement.
     *
     * @param Node|PhpParser\Builder $stmt The statement to add
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function addStmt($stmt)
    {
        if (null === $this->stmts) {
            throw new \LogicException('Cannot add statements to an abstract method');
        }
        $this->stmts[] = BuilderHelpers::normalizeStmt($stmt);
        return $this;
    }
    /**
     * Adds an attribute group.
     *
     * @param Node\Attribute|Node\AttributeGroup $attribute
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function addAttribute($attribute)
    {
        $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
        return $this;
    }
    /**
     * Returns the built method node.
     *
     * @return Stmt\ClassMethod The built method node
     */
    public function getNode() : Node
    {
        return new Stmt\ClassMethod($this->name, ['flags' => $this->flags, 'byRef' => $this->returnByRef, 'params' => $this->params, 'returnType' => $this->returnType, 'stmts' => $this->stmts, 'attrGroups' => $this->attributeGroups], $this->attributes);
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Builder;

use PhpParser;
use PhpParser\BuilderHelpers;
use PhpParser\Node;
use PhpParser\Node\Identifier;
use PhpParser\Node\Name;
use PhpParser\Node\Stmt;
class Enum_ extends \PhpParser\Builder\Declaration
{
    protected $name;
    protected $scalarType = null;
    protected $implements = [];
    protected $uses = [];
    protected $enumCases = [];
    protected $constants = [];
    protected $methods = [];
    /** @var Node\AttributeGroup[] */
    protected $attributeGroups = [];
    /**
     * Creates an enum builder.
     *
     * @param string $name Name of the enum
     */
    public function __construct(string $name)
    {
        $this->name = $name;
    }
    /**
     * Sets the scalar type.
     *
     * @param string|Identifier $type
     *
     * @return $this
     */
    public function setScalarType($scalarType)
    {
        $this->scalarType = BuilderHelpers::normalizeType($scalarType);
        return $this;
    }
    /**
     * Implements one or more interfaces.
     *
     * @param Name|string ...$interfaces Names of interfaces to implement
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function implement(...$interfaces)
    {
        foreach ($interfaces as $interface) {
            $this->implements[] = BuilderHelpers::normalizeName($interface);
        }
        return $this;
    }
    /**
     * Adds a statement.
     *
     * @param Stmt|PhpParser\Builder $stmt The statement to add
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function addStmt($stmt)
    {
        $stmt = BuilderHelpers::normalizeNode($stmt);
        $targets = [Stmt\TraitUse::class => &$this->uses, Stmt\EnumCase::class => &$this->enumCases, Stmt\ClassConst::class => &$this->constants, Stmt\ClassMethod::class => &$this->methods];
        $class = \get_class($stmt);
        if (!isset($targets[$class])) {
            throw new \LogicException(\sprintf('Unexpected node of type "%s"', $stmt->getType()));
        }
        $targets[$class][] = $stmt;
        return $this;
    }
    /**
     * Adds an attribute group.
     *
     * @param Node\Attribute|Node\AttributeGroup $attribute
     *
     * @return $this The builder instance (for fluid interface)
     */
    public function addAttribute($attribute)
    {
        $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
        return $this;
    }
    /**
     * Returns the built class node.
     *
     * @return Stmt\Enum_ The built enum node
     */
    public function getNode() : PhpParser\Node
    {
        return new Stmt\Enum_($this->name, ['scalarType' => $this->scalarType, 'implements' => $this->implements, 'stmts' => \array_merge($this->uses, $this->enumCases, $this->constants, $this->methods), 'attrGroups' => $this->attributeGroups], $this->attributes);
    }
}
<?php

namespace PhpParser;

use function array_merge;
use PhpParser\Node\Expr;
use PhpParser\Node\Scalar;
/**
 * Evaluates constant expressions.
 *
 * This evaluator is able to evaluate all constant expressions (as defined by PHP), which can be
 * evaluated without further context. If a subexpression is not of this type, a user-provided
 * fallback evaluator is invoked. To support all constant expressions that are also supported by
 * PHP (and not already handled by this class), the fallback evaluator must be able to handle the
 * following node types:
 *
 *  * All Scalar\MagicConst\* nodes.
 *  * Expr\ConstFetch nodes. Only null/false/true are already handled by this class.
 *  * Expr\ClassConstFetch nodes.
 *
 * The fallback evaluator should throw ConstExprEvaluationException for nodes it cannot evaluate.
 *
 * The evaluation is dependent on runtime configuration in two respects: Firstly, floating
 * point to string conversions are affected by the precision ini setting. Secondly, they are also
 * affected by the LC_NUMERIC locale.
 */
class ConstExprEvaluator
{
    private $fallbackEvaluator;
    /**
     * Create a constant expression evaluator.
     *
     * The provided fallback evaluator is invoked whenever a subexpression cannot be evaluated. See
     * class doc comment for more information.
     *
     * @param callable|null $fallbackEvaluator To call if subexpression cannot be evaluated
     */
    public function __construct(callable $fallbackEvaluator = null)
    {
        $this->fallbackEvaluator = $fallbackEvaluator ?? function (Expr $expr) {
            throw new \PhpParser\ConstExprEvaluationException("Expression of type {$expr->getType()} cannot be evaluated");
        };
    }
    /**
     * Silently evaluates a constant expression into a PHP value.
     *
     * Thrown Errors, warnings or notices will be converted into a ConstExprEvaluationException.
     * The original source of the exception is available through getPrevious().
     *
     * If some part of the expression cannot be evaluated, the fallback evaluator passed to the
     * constructor will be invoked. By default, if no fallback is provided, an exception of type
     * ConstExprEvaluationException is thrown.
     *
     * See class doc comment for caveats and limitations.
     *
     * @param Expr $expr Constant expression to evaluate
     * @return mixed Result of evaluation
     *
     * @throws ConstExprEvaluationException if the expression cannot be evaluated or an error occurred
     */
    public function evaluateSilently(Expr $expr)
    {
        \set_error_handler(function ($num, $str, $file, $line) {
            throw new \ErrorException($str, 0, $num, $file, $line);
        });
        try {
            return $this->evaluate($expr);
        } catch (\Throwable $e) {
            if (!$e instanceof \PhpParser\ConstExprEvaluationException) {
                $e = new \PhpParser\ConstExprEvaluationException("An error occurred during constant expression evaluation", 0, $e);
            }
            throw $e;
        } finally {
            \restore_error_handler();
        }
    }
    /**
     * Directly evaluates a constant expression into a PHP value.
     *
     * May generate Error exceptions, warnings or notices. Use evaluateSilently() to convert these
     * into a ConstExprEvaluationException.
     *
     * If some part of the expression cannot be evaluated, the fallback evaluator passed to the
     * constructor will be invoked. By default, if no fallback is provided, an exception of type
     * ConstExprEvaluationException is thrown.
     *
     * See class doc comment for caveats and limitations.
     *
     * @param Expr $expr Constant expression to evaluate
     * @return mixed Result of evaluation
     *
     * @throws ConstExprEvaluationException if the expression cannot be evaluated
     */
    public function evaluateDirectly(Expr $expr)
    {
        return $this->evaluate($expr);
    }
    private function evaluate(Expr $expr)
    {
        if ($expr instanceof Scalar\LNumber || $expr instanceof Scalar\DNumber || $expr instanceof Scalar\String_) {
            return $expr->value;
        }
        if ($expr instanceof Expr\Array_) {
            return $this->evaluateArray($expr);
        }
        // Unary operators
        if ($expr instanceof Expr\UnaryPlus) {
            return +$this->evaluate($expr->expr);
        }
        if ($expr instanceof Expr\UnaryMinus) {
            return -$this->evaluate($expr->expr);
        }
        if ($expr instanceof Expr\BooleanNot) {
            return !$this->evaluate($expr->expr);
        }
        if ($expr instanceof Expr\BitwiseNot) {
            return ~$this->evaluate($expr->expr);
        }
        if ($expr instanceof Expr\BinaryOp) {
            return $this->evaluateBinaryOp($expr);
        }
        if ($expr instanceof Expr\Ternary) {
            return $this->evaluateTernary($expr);
        }
        if ($expr instanceof Expr\ArrayDimFetch && null !== $expr->dim) {
            return $this->evaluate($expr->var)[$this->evaluate($expr->dim)];
        }
        if ($expr instanceof Expr\ConstFetch) {
            return $this->evaluateConstFetch($expr);
        }
        return ($this->fallbackEvaluator)($expr);
    }
    private function evaluateArray(Expr\Array_ $expr)
    {
        $array = [];
        foreach ($expr->items as $item) {
            if (null !== $item->key) {
                $array[$this->evaluate($item->key)] = $this->evaluate($item->value);
            } elseif ($item->unpack) {
                $array = array_merge($array, $this->evaluate($item->value));
            } else {
                $array[] = $this->evaluate($item->value);
            }
        }
        return $array;
    }
    private function evaluateTernary(Expr\Ternary $expr)
    {
        if (null === $expr->if) {
            return $this->evaluate($expr->cond) ?: $this->evaluate($expr->else);
        }
        return $this->evaluate($expr->cond) ? $this->evaluate($expr->if) : $this->evaluate($expr->else);
    }
    private function evaluateBinaryOp(Expr\BinaryOp $expr)
    {
        if ($expr instanceof Expr\BinaryOp\Coalesce && $expr->left instanceof Expr\ArrayDimFetch) {
            // This needs to be special cased to respect BP_VAR_IS fetch semantics
            return $this->evaluate($expr->left->var)[$this->evaluate($expr->left->dim)] ?? $this->evaluate($expr->right);
        }
        // The evaluate() calls are repeated in each branch, because some of the operators are
        // short-circuiting and evaluating the RHS in advance may be illegal in that case
        $l = $expr->left;
        $r = $expr->right;
        switch ($expr->getOperatorSigil()) {
            case '&':
                return $this->evaluate($l) & $this->evaluate($r);
            case '|':
                return $this->evaluate($l) | $this->evaluate($r);
            case '^':
                return $this->evaluate($l) ^ $this->evaluate($r);
            case '&&':
                return $this->evaluate($l) && $this->evaluate($r);
            case '||':
                return $this->evaluate($l) || $this->evaluate($r);
            case '??':
                return $this->evaluate($l) ?? $this->evaluate($r);
            case '.':
                return $this->evaluate($l) . $this->evaluate($r);
            case '/':
                return $this->evaluate($l) / $this->evaluate($r);
            case '==':
                return $this->evaluate($l) == $this->evaluate($r);
            case '>':
                return $this->evaluate($l) > $this->evaluate($r);
            case '>=':
                return $this->evaluate($l) >= $this->evaluate($r);
            case '===':
                return $this->evaluate($l) === $this->evaluate($r);
            case 'and':
                return $this->evaluate($l) and $this->evaluate($r);
            case 'or':
                return $this->evaluate($l) or $this->evaluate($r);
            case 'xor':
                return $this->evaluate($l) xor $this->evaluate($r);
            case '-':
                return $this->evaluate($l) - $this->evaluate($r);
            case '%':
                return $this->evaluate($l) % $this->evaluate($r);
            case '*':
                return $this->evaluate($l) * $this->evaluate($r);
            case '!=':
                return $this->evaluate($l) != $this->evaluate($r);
            case '!==':
                return $this->evaluate($l) !== $this->evaluate($r);
            case '+':
                return $this->evaluate($l) + $this->evaluate($r);
            case '**':
                return $this->evaluate($l) ** $this->evaluate($r);
            case '<<':
                return $this->evaluate($l) << $this->evaluate($r);
            case '>>':
                return $this->evaluate($l) >> $this->evaluate($r);
            case '<':
                return $this->evaluate($l) < $this->evaluate($r);
            case '<=':
                return $this->evaluate($l) <= $this->evaluate($r);
            case '<=>':
                return $this->evaluate($l) <=> $this->evaluate($r);
        }
        throw new \Exception('Should not happen');
    }
    private function evaluateConstFetch(Expr\ConstFetch $expr)
    {
        $name = $expr->name->toLowerString();
        switch ($name) {
            case 'null':
                return null;
            case 'false':
                return \false;
            case 'true':
                return \true;
        }
        return ($this->fallbackEvaluator)($expr);
    }
}
<?php

declare (strict_types=1);
namespace PhpParser;

interface NodeVisitor
{
    /**
     * Called once before traversal.
     *
     * Return value semantics:
     *  * null:      $nodes stays as-is
     *  * otherwise: $nodes is set to the return value
     *
     * @param Node[] $nodes Array of nodes
     *
     * @return null|Node[] Array of nodes
     */
    public function beforeTraverse(array $nodes);
    /**
     * Called when entering a node.
     *
     * Return value semantics:
     *  * null
     *        => $node stays as-is
     *  * NodeTraverser::DONT_TRAVERSE_CHILDREN
     *        => Children of $node are not traversed. $node stays as-is
     *  * NodeTraverser::STOP_TRAVERSAL
     *        => Traversal is aborted. $node stays as-is
     *  * otherwise
     *        => $node is set to the return value
     *
     * @param Node $node Node
     *
     * @return null|int|Node Replacement node (or special return value)
     */
    public function enterNode(\PhpParser\Node $node);
    /**
     * Called when leaving a node.
     *
     * Return value semantics:
     *  * null
     *        => $node stays as-is
     *  * NodeTraverser::REMOVE_NODE
     *        => $node is removed from the parent array
     *  * NodeTraverser::STOP_TRAVERSAL
     *        => Traversal is aborted. $node stays as-is
     *  * array (of Nodes)
     *        => The return value is merged into the parent array (at the position of the $node)
     *  * otherwise
     *        => $node is set to the return value
     *
     * @param Node $node Node
     *
     * @return null|int|Node|Node[] Replacement node (or special return value)
     */
    public function leaveNode(\PhpParser\Node $node);
    /**
     * Called once after traversal.
     *
     * Return value semantics:
     *  * null:      $nodes stays as-is
     *  * otherwise: $nodes is set to the return value
     *
     * @param Node[] $nodes Array of nodes
     *
     * @return null|Node[] Array of nodes
     */
    public function afterTraverse(array $nodes);
}
<?php

declare (strict_types=1);
namespace PhpParser;

/**
 * @codeCoverageIgnore
 */
class NodeVisitorAbstract implements \PhpParser\NodeVisitor
{
    public function beforeTraverse(array $nodes)
    {
        return null;
    }
    public function enterNode(\PhpParser\Node $node)
    {
        return null;
    }
    public function leaveNode(\PhpParser\Node $node)
    {
        return null;
    }
    public function afterTraverse(array $nodes)
    {
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser;

use PhpParser\Node\Name;
use PhpParser\Node\Name\FullyQualified;
use PhpParser\Node\Stmt;
class NameContext
{
    /** @var null|Name Current namespace */
    protected $namespace;
    /** @var Name[][] Map of format [aliasType => [aliasName => originalName]] */
    protected $aliases = [];
    /** @var Name[][] Same as $aliases but preserving original case */
    protected $origAliases = [];
    /** @var ErrorHandler Error handler */
    protected $errorHandler;
    /**
     * Create a name context.
     *
     * @param ErrorHandler $errorHandler Error handling used to report errors
     */
    public function __construct(\PhpParser\ErrorHandler $errorHandler)
    {
        $this->errorHandler = $errorHandler;
    }
    /**
     * Start a new namespace.
     *
     * This also resets the alias table.
     *
     * @param Name|null $namespace Null is the global namespace
     */
    public function startNamespace(Name $namespace = null)
    {
        $this->namespace = $namespace;
        $this->origAliases = $this->aliases = [Stmt\Use_::TYPE_NORMAL => [], Stmt\Use_::TYPE_FUNCTION => [], Stmt\Use_::TYPE_CONSTANT => []];
    }
    /**
     * Add an alias / import.
     *
     * @param Name   $name        Original name
     * @param string $aliasName   Aliased name
     * @param int    $type        One of Stmt\Use_::TYPE_*
     * @param array  $errorAttrs Attributes to use to report an error
     */
    public function addAlias(Name $name, string $aliasName, int $type, array $errorAttrs = [])
    {
        // Constant names are case sensitive, everything else case insensitive
        if ($type === Stmt\Use_::TYPE_CONSTANT) {
            $aliasLookupName = $aliasName;
        } else {
            $aliasLookupName = \strtolower($aliasName);
        }
        if (isset($this->aliases[$type][$aliasLookupName])) {
            $typeStringMap = [Stmt\Use_::TYPE_NORMAL => '', Stmt\Use_::TYPE_FUNCTION => 'function ', Stmt\Use_::TYPE_CONSTANT => 'const '];
            $this->errorHandler->handleError(new \PhpParser\Error(\sprintf('Cannot use %s%s as %s because the name is already in use', $typeStringMap[$type], $name, $aliasName), $errorAttrs));
            return;
        }
        $this->aliases[$type][$aliasLookupName] = $name;
        $this->origAliases[$type][$aliasName] = $name;
    }
    /**
     * Get current namespace.
     *
     * @return null|Name Namespace (or null if global namespace)
     */
    public function getNamespace()
    {
        return $this->namespace;
    }
    /**
     * Get resolved name.
     *
     * @param Name $name Name to resolve
     * @param int  $type One of Stmt\Use_::TYPE_{FUNCTION|CONSTANT}
     *
     * @return null|Name Resolved name, or null if static resolution is not possible
     */
    public function getResolvedName(Name $name, int $type)
    {
        // don't resolve special class names
        if ($type === Stmt\Use_::TYPE_NORMAL && $name->isSpecialClassName()) {
            if (!$name->isUnqualified()) {
                $this->errorHandler->handleError(new \PhpParser\Error(\sprintf("'\\%s' is an invalid class name", $name->toString()), $name->getAttributes()));
            }
            return $name;
        }
        // fully qualified names are already resolved
        if ($name->isFullyQualified()) {
            return $name;
        }
        // Try to resolve aliases
        if (null !== ($resolvedName = $this->resolveAlias($name, $type))) {
            return $resolvedName;
        }
        if ($type !== Stmt\Use_::TYPE_NORMAL && $name->isUnqualified()) {
            if (null === $this->namespace) {
                // outside of a namespace unaliased unqualified is same as fully qualified
                return new FullyQualified($name, $name->getAttributes());
            }
            // Cannot resolve statically
            return null;
        }
        // if no alias exists prepend current namespace
        return FullyQualified::concat($this->namespace, $name, $name->getAttributes());
    }
    /**
     * Get resolved class name.
     *
     * @param Name $name Class ame to resolve
     *
     * @return Name Resolved name
     */
    public function getResolvedClassName(Name $name) : Name
    {
        return $this->getResolvedName($name, Stmt\Use_::TYPE_NORMAL);
    }
    /**
     * Get possible ways of writing a fully qualified name (e.g., by making use of aliases).
     *
     * @param string $name Fully-qualified name (without leading namespace separator)
     * @param int    $type One of Stmt\Use_::TYPE_*
     *
     * @return Name[] Possible representations of the name
     */
    public function getPossibleNames(string $name, int $type) : array
    {
        $lcName = \strtolower($name);
        if ($type === Stmt\Use_::TYPE_NORMAL) {
            // self, parent and static must always be unqualified
            if ($lcName === "self" || $lcName === "parent" || $lcName === "static") {
                return [new Name($name)];
            }
        }
        // Collect possible ways to write this name, starting with the fully-qualified name
        $possibleNames = [new FullyQualified($name)];
        if (null !== ($nsRelativeName = $this->getNamespaceRelativeName($name, $lcName, $type))) {
            // Make sure there is no alias that makes the normally namespace-relative name
            // into something else
            if (null === $this->resolveAlias($nsRelativeName, $type)) {
                $possibleNames[] = $nsRelativeName;
            }
        }
        // Check for relevant namespace use statements
        foreach ($this->origAliases[Stmt\Use_::TYPE_NORMAL] as $alias => $orig) {
            $lcOrig = $orig->toLowerString();
            if (0 === \strpos($lcName, $lcOrig . '\\')) {
                $possibleNames[] = new Name($alias . \substr($name, \strlen($lcOrig)));
            }
        }
        // Check for relevant type-specific use statements
        foreach ($this->origAliases[$type] as $alias => $orig) {
            if ($type === Stmt\Use_::TYPE_CONSTANT) {
                // Constants are are complicated-sensitive
                $normalizedOrig = $this->normalizeConstName($orig->toString());
                if ($normalizedOrig === $this->normalizeConstName($name)) {
                    $possibleNames[] = new Name($alias);
                }
            } else {
                // Everything else is case-insensitive
                if ($orig->toLowerString() === $lcName) {
                    $possibleNames[] = new Name($alias);
                }
            }
        }
        return $possibleNames;
    }
    /**
     * Get shortest representation of this fully-qualified name.
     *
     * @param string $name Fully-qualified name (without leading namespace separator)
     * @param int    $type One of Stmt\Use_::TYPE_*
     *
     * @return Name Shortest representation
     */
    public function getShortName(string $name, int $type) : Name
    {
        $possibleNames = $this->getPossibleNames($name, $type);
        // Find shortest name
        $shortestName = null;
        $shortestLength = \INF;
        foreach ($possibleNames as $possibleName) {
            $length = \strlen($possibleName->toCodeString());
            if ($length < $shortestLength) {
                $shortestName = $possibleName;
                $shortestLength = $length;
            }
        }
        return $shortestName;
    }
    private function resolveAlias(Name $name, $type)
    {
        $firstPart = $name->getFirst();
        if ($name->isQualified()) {
            // resolve aliases for qualified names, always against class alias table
            $checkName = \strtolower($firstPart);
            if (isset($this->aliases[Stmt\Use_::TYPE_NORMAL][$checkName])) {
                $alias = $this->aliases[Stmt\Use_::TYPE_NORMAL][$checkName];
                return FullyQualified::concat($alias, $name->slice(1), $name->getAttributes());
            }
        } elseif ($name->isUnqualified()) {
            // constant aliases are case-sensitive, function aliases case-insensitive
            $checkName = $type === Stmt\Use_::TYPE_CONSTANT ? $firstPart : \strtolower($firstPart);
            if (isset($this->aliases[$type][$checkName])) {
                // resolve unqualified aliases
                return new FullyQualified($this->aliases[$type][$checkName], $name->getAttributes());
            }
        }
        // No applicable aliases
        return null;
    }
    private function getNamespaceRelativeName(string $name, string $lcName, int $type)
    {
        if (null === $this->namespace) {
            return new Name($name);
        }
        if ($type === Stmt\Use_::TYPE_CONSTANT) {
            // The constants true/false/null always resolve to the global symbols, even inside a
            // namespace, so they may be used without qualification
            if ($lcName === "true" || $lcName === "false" || $lcName === "null") {
                return new Name($name);
            }
        }
        $namespacePrefix = \strtolower($this->namespace . '\\');
        if (0 === \strpos($lcName, $namespacePrefix)) {
            return new Name(\substr($name, \strlen($namespacePrefix)));
        }
        return null;
    }
    private function normalizeConstName(string $name)
    {
        $nsSep = \strrpos($name, '\\');
        if (\false === $nsSep) {
            return $name;
        }
        // Constants have case-insensitive namespace and case-sensitive short-name
        $ns = \substr($name, 0, $nsSep);
        $shortName = \substr($name, $nsSep + 1);
        return \strtolower($ns) . '\\' . $shortName;
    }
}
<?php

namespace PhpParser\Parser;

use PhpParser\Error;
use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Name;
use PhpParser\Node\Scalar;
use PhpParser\Node\Stmt;
/* This is an automatically GENERATED file, which should not be manually edited.
 * Instead edit one of the following:
 *  * the grammar files grammar/php5.y or grammar/php7.y
 *  * the skeleton file grammar/parser.template
 *  * the preprocessing script grammar/rebuildParsers.php
 */
class Php5 extends \PhpParser\ParserAbstract
{
    protected $tokenToSymbolMapSize = 396;
    protected $actionTableSize = 1099;
    protected $gotoTableSize = 640;
    protected $invalidSymbol = 168;
    protected $errorSymbol = 1;
    protected $defaultAction = -32766;
    protected $unexpectedTokenRule = 32767;
    protected $YY2TBLSTATE = 415;
    protected $numNonLeafStates = 663;
    protected $symbolToName = array("EOF", "error", "T_THROW", "T_INCLUDE", "T_INCLUDE_ONCE", "T_EVAL", "T_REQUIRE", "T_REQUIRE_ONCE", "','", "T_LOGICAL_OR", "T_LOGICAL_XOR", "T_LOGICAL_AND", "T_PRINT", "T_YIELD", "T_DOUBLE_ARROW", "T_YIELD_FROM", "'='", "T_PLUS_EQUAL", "T_MINUS_EQUAL", "T_MUL_EQUAL", "T_DIV_EQUAL", "T_CONCAT_EQUAL", "T_MOD_EQUAL", "T_AND_EQUAL", "T_OR_EQUAL", "T_XOR_EQUAL", "T_SL_EQUAL", "T_SR_EQUAL", "T_POW_EQUAL", "T_COALESCE_EQUAL", "'?'", "':'", "T_COALESCE", "T_BOOLEAN_OR", "T_BOOLEAN_AND", "'|'", "'^'", "T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG", "T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG", "T_IS_EQUAL", "T_IS_NOT_EQUAL", "T_IS_IDENTICAL", "T_IS_NOT_IDENTICAL", "T_SPACESHIP", "'<'", "T_IS_SMALLER_OR_EQUAL", "'>'", "T_IS_GREATER_OR_EQUAL", "T_SL", "T_SR", "'+'", "'-'", "'.'", "'*'", "'/'", "'%'", "'!'", "T_INSTANCEOF", "'~'", "T_INC", "T_DEC", "T_INT_CAST", "T_DOUBLE_CAST", "T_STRING_CAST", "T_ARRAY_CAST", "T_OBJECT_CAST", "T_BOOL_CAST", "T_UNSET_CAST", "'@'", "T_POW", "'['", "T_NEW", "T_CLONE", "T_EXIT", "T_IF", "T_ELSEIF", "T_ELSE", "T_ENDIF", "T_LNUMBER", "T_DNUMBER", "T_STRING", "T_STRING_VARNAME", "T_VARIABLE", "T_NUM_STRING", "T_INLINE_HTML", "T_ENCAPSED_AND_WHITESPACE", "T_CONSTANT_ENCAPSED_STRING", "T_ECHO", "T_DO", "T_WHILE", "T_ENDWHILE", "T_FOR", "T_ENDFOR", "T_FOREACH", "T_ENDFOREACH", "T_DECLARE", "T_ENDDECLARE", "T_AS", "T_SWITCH", "T_MATCH", "T_ENDSWITCH", "T_CASE", "T_DEFAULT", "T_BREAK", "T_CONTINUE", "T_GOTO", "T_FUNCTION", "T_FN", "T_CONST", "T_RETURN", "T_TRY", "T_CATCH", "T_FINALLY", "T_USE", "T_INSTEADOF", "T_GLOBAL", "T_STATIC", "T_ABSTRACT", "T_FINAL", "T_PRIVATE", "T_PROTECTED", "T_PUBLIC", "T_READONLY", "T_VAR", "T_UNSET", "T_ISSET", "T_EMPTY", "T_HALT_COMPILER", "T_CLASS", "T_TRAIT", "T_INTERFACE", "T_EXTENDS", "T_IMPLEMENTS", "T_OBJECT_OPERATOR", "T_LIST", "T_ARRAY", "T_CALLABLE", "T_CLASS_C", "T_TRAIT_C", "T_METHOD_C", "T_FUNC_C", "T_LINE", "T_FILE", "T_START_HEREDOC", "T_END_HEREDOC", "T_DOLLAR_OPEN_CURLY_BRACES", "T_CURLY_OPEN", "T_PAAMAYIM_NEKUDOTAYIM", "T_NAMESPACE", "T_NS_C", "T_DIR", "T_NS_SEPARATOR", "T_ELLIPSIS", "T_NAME_FULLY_QUALIFIED", "T_NAME_QUALIFIED", "T_NAME_RELATIVE", "';'", "'{'", "'}'", "'('", "')'", "'\$'", "'`'", "']'", "'\"'", "T_ENUM", "T_NULLSAFE_OBJECT_OPERATOR", "T_ATTRIBUTE");
    protected $tokenToSymbol = array(0, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 56, 164, 168, 161, 55, 168, 168, 159, 160, 53, 50, 8, 51, 52, 54, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 31, 156, 44, 16, 46, 30, 68, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 70, 168, 163, 36, 168, 162, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 157, 35, 158, 58, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 37, 38, 39, 40, 41, 42, 43, 45, 47, 48, 49, 57, 59, 60, 61, 62, 63, 64, 65, 66, 67, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 165, 131, 132, 133, 166, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 167);
    protected $action = array(700, 670, 671, 672, 673, 674, 286, 675, 676, 677, 713, 714, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 0, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32767, -32767, -32767, -32767, 245, 246, 242, 243, 244, -32766, -32766, 678, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32766, 1229, 245, 246, 1230, 679, 680, 681, 682, 683, 684, 685, 899, 900, 747, -32766, -32766, -32766, -32766, -32766, -32766, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 716, 739, 717, 718, 719, 720, 708, 709, 710, 738, 711, 712, 697, 698, 699, 701, 702, 703, 741, 742, 743, 744, 745, 746, 875, 704, 705, 706, 707, 737, 728, 726, 727, 723, 724, 1046, 715, 721, 722, 729, 730, 732, 731, 733, 734, 55, 56, 425, 57, 58, 725, 736, 735, 755, 59, 60, -226, 61, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32766, 337, -32767, -32767, -32767, -32767, 29, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 620, -32766, -32766, -32766, -32766, 62, 63, 1046, -32766, -32766, -32766, 64, 419, 65, 294, 295, 66, 67, 68, 69, 70, 71, 72, 73, 823, 25, 302, 74, 418, 984, 986, 669, 668, 1100, 1101, 1078, 755, 755, 767, 1220, 768, 470, -32766, -32766, -32766, 341, 749, 824, 54, -32767, -32767, -32767, -32767, 98, 99, 100, 101, 102, 220, 221, 222, 362, 876, -32766, 27, -32766, -32766, -32766, -32766, -32766, 1046, 493, 126, 1080, 1079, 1081, 370, 1068, 930, 207, 478, 479, 952, 953, 954, 951, 950, 949, 128, 480, 481, 803, 1106, 1107, 1108, 1109, 1103, 1104, 319, 32, 297, 10, 211, -515, 1110, 1105, 669, 668, 1080, 1079, 1081, 220, 221, 222, 41, 364, 341, 334, 421, 336, 426, -128, -128, -128, 313, 1046, 469, -4, 824, 54, 812, 770, 207, 40, 21, 427, -128, 471, -128, 472, -128, 473, -128, 1046, 428, 220, 221, 222, -32766, 33, 34, 429, 361, 327, 52, 35, 474, -32766, -32766, -32766, 342, 357, 358, 475, 476, 48, 207, 249, 669, 668, 477, 443, 300, 795, 846, 430, 431, 28, -32766, 814, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32767, -32767, -32767, -32767, -32767, 952, 953, 954, 951, 950, 949, 422, 755, 424, 426, 826, 634, -128, -32766, -32766, 469, 824, 54, 288, 812, 1151, 755, 40, 21, 427, 317, 471, 345, 472, 129, 473, 9, 1186, 428, 769, 360, 324, 905, 33, 34, 429, 361, 1046, 415, 35, 474, 944, 1068, 315, 125, 357, 358, 475, 476, -32766, -32766, -32766, 926, 302, 477, 121, 1068, 759, 846, 430, 431, 669, 668, 423, 755, 1152, 809, 1046, 480, 766, -32766, 805, -32766, -32766, -32766, -32766, -261, 127, 347, 436, 841, 341, 1078, 1200, 426, 446, 826, 634, -4, 807, 469, 824, 54, 436, 812, 341, 755, 40, 21, 427, 444, 471, 130, 472, 1068, 473, 346, 767, 428, 768, -211, -211, -211, 33, 34, 429, 361, 308, 1076, 35, 474, -32766, -32766, -32766, 1046, 357, 358, 475, 476, -32766, -32766, -32766, 906, 120, 477, 539, 1068, 795, 846, 430, 431, 436, -32766, 341, -32766, -32766, -32766, 1046, 480, 810, -32766, 925, -32766, -32766, 754, 1080, 1079, 1081, 49, -32766, -32766, -32766, 749, 751, 426, 1201, 826, 634, -211, 30, 469, 669, 668, 436, 812, 341, 75, 40, 21, 427, -32766, 471, 1064, 472, 124, 473, 669, 668, 428, 212, -210, -210, -210, 33, 34, 429, 361, 51, 1186, 35, 474, 755, -32766, -32766, -32766, 357, 358, 475, 476, 213, 824, 54, 221, 222, 477, 20, 581, 795, 846, 430, 431, 220, 221, 222, 755, 222, 247, 78, 79, 80, 81, 341, 207, 517, 103, 104, 105, 752, 307, 131, 637, 1068, 207, 341, 207, 122, 826, 634, -210, 36, 106, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 1112, 307, 346, 436, 214, 341, 824, 54, 426, 123, 250, 129, 134, 106, 469, -32766, 572, 1112, 812, 245, 246, 40, 21, 427, 251, 471, 252, 472, 341, 473, 453, 22, 428, 207, 899, 900, 638, 33, 34, 429, 824, 54, -86, 35, 474, 220, 221, 222, 314, 357, 358, 100, 101, 102, 239, 240, 241, 645, 477, -230, 458, 589, 135, 374, 596, 597, 207, 760, 640, 648, 642, 941, 654, 929, 662, 822, 133, 307, 837, 426, -32766, 106, 749, 43, 44, 469, 45, 442, 46, 812, 826, 634, 40, 21, 427, 47, 471, 50, 472, 53, 473, 132, 608, 428, 302, 604, -280, -32766, 33, 34, 429, 824, 54, 426, 35, 474, 755, 957, -84, 469, 357, 358, 521, 812, 628, 363, 40, 21, 427, 477, 471, 575, 472, -515, 473, 847, 616, 428, -423, -32766, 11, 646, 33, 34, 429, 824, 54, 445, 35, 474, 462, 285, 578, 1111, 357, 358, 593, 369, 848, 594, 290, 826, 634, 477, 0, 0, 532, 0, 0, 325, 0, 0, 0, 0, 0, 651, 0, 0, 0, 322, 326, 0, 0, 0, 426, 0, 0, 0, 0, 323, 469, 316, 318, -516, 812, 862, 634, 40, 21, 427, 0, 471, 0, 472, 0, 473, 1158, 0, 428, 0, -414, 6, 7, 33, 34, 429, 824, 54, 426, 35, 474, 12, 14, 373, 469, 357, 358, -424, 812, 563, 754, 40, 21, 427, 477, 471, 248, 472, 839, 473, 38, 39, 428, 657, 658, 765, 813, 33, 34, 429, 821, 800, 815, 35, 474, 215, 216, 878, 869, 357, 358, 217, 870, 218, 798, 863, 826, 634, 477, 860, 858, 936, 937, 934, 820, 209, 804, 806, 808, 811, 933, 763, 764, 1100, 1101, 935, 659, 78, 335, 426, 359, 1102, 635, 639, 641, 469, 643, 644, 647, 812, 826, 634, 40, 21, 427, 649, 471, 650, 472, 652, 473, 653, 636, 428, 796, 1226, 1228, 762, 33, 34, 429, 215, 216, 845, 35, 474, 761, 217, 844, 218, 357, 358, 1227, 843, 1060, 831, 1048, 842, 1049, 477, 559, 209, 1106, 1107, 1108, 1109, 1103, 1104, 398, 1100, 1101, 829, 942, 867, 1110, 1105, 868, 1102, 457, 1225, 1194, 1192, 1177, 1157, 219, 1190, 1091, 917, 1198, 1188, 0, 826, 634, 24, -433, 26, 31, 37, 42, 76, 77, 210, 287, 292, 293, 308, 309, 310, 311, 339, 356, 416, 0, -227, -226, 16, 17, 18, 393, 454, 461, 463, 467, 553, 625, 1051, 559, 1054, 1106, 1107, 1108, 1109, 1103, 1104, 398, 907, 1116, 1050, 1026, 564, 1110, 1105, 1025, 1093, 1055, 0, 1044, 0, 1057, 1056, 219, 1059, 1058, 1075, 0, 1191, 1176, 1172, 1189, 1090, 1223, 1117, 1171, 600);
    protected $actionCheck = array(2, 3, 4, 5, 6, 7, 14, 9, 10, 11, 12, 13, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 0, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 9, 10, 11, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 69, 70, 53, 54, 55, 9, 10, 57, 30, 116, 32, 33, 34, 35, 36, 37, 38, 80, 69, 70, 83, 71, 72, 73, 74, 75, 76, 77, 135, 136, 80, 33, 34, 35, 36, 37, 38, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 31, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 13, 134, 135, 136, 137, 138, 139, 140, 141, 142, 3, 4, 5, 6, 7, 148, 149, 150, 82, 12, 13, 160, 15, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 8, 44, 45, 46, 47, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 80, 33, 34, 35, 36, 50, 51, 13, 9, 10, 11, 56, 128, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 1, 70, 71, 72, 73, 59, 60, 37, 38, 78, 79, 80, 82, 82, 106, 85, 108, 86, 9, 10, 11, 161, 80, 1, 2, 44, 45, 46, 47, 48, 49, 50, 51, 52, 9, 10, 11, 106, 156, 30, 8, 32, 33, 34, 35, 36, 13, 116, 8, 153, 154, 155, 8, 122, 158, 30, 125, 126, 116, 117, 118, 119, 120, 121, 31, 134, 135, 156, 137, 138, 139, 140, 141, 142, 143, 145, 146, 8, 8, 133, 149, 150, 37, 38, 153, 154, 155, 9, 10, 11, 159, 8, 161, 162, 8, 164, 74, 75, 76, 77, 8, 13, 80, 0, 1, 2, 84, 158, 30, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 13, 98, 9, 10, 11, 9, 103, 104, 105, 106, 8, 70, 109, 110, 9, 10, 11, 8, 115, 116, 117, 118, 70, 30, 31, 37, 38, 124, 31, 8, 127, 128, 129, 130, 8, 30, 156, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 116, 117, 118, 119, 120, 121, 8, 82, 8, 74, 156, 157, 158, 33, 34, 80, 1, 2, 8, 84, 163, 82, 87, 88, 89, 133, 91, 70, 93, 152, 95, 108, 82, 98, 158, 8, 113, 160, 103, 104, 105, 106, 13, 108, 109, 110, 123, 122, 113, 157, 115, 116, 117, 118, 9, 10, 11, 156, 71, 124, 157, 122, 127, 128, 129, 130, 37, 38, 8, 82, 160, 156, 13, 134, 156, 30, 156, 32, 33, 34, 35, 158, 157, 148, 159, 122, 161, 80, 1, 74, 133, 156, 157, 158, 156, 80, 1, 2, 159, 84, 161, 82, 87, 88, 89, 157, 91, 157, 93, 122, 95, 161, 106, 98, 108, 100, 101, 102, 103, 104, 105, 106, 159, 116, 109, 110, 9, 10, 11, 13, 115, 116, 117, 118, 9, 10, 11, 160, 16, 124, 81, 122, 127, 128, 129, 130, 159, 30, 161, 32, 33, 34, 13, 134, 156, 30, 156, 32, 33, 153, 153, 154, 155, 70, 9, 10, 11, 80, 80, 74, 160, 156, 157, 158, 14, 80, 37, 38, 159, 84, 161, 152, 87, 88, 89, 30, 91, 160, 93, 14, 95, 37, 38, 98, 16, 100, 101, 102, 103, 104, 105, 106, 70, 82, 109, 110, 82, 33, 34, 35, 115, 116, 117, 118, 16, 1, 2, 10, 11, 124, 160, 85, 127, 128, 129, 130, 9, 10, 11, 82, 11, 14, 157, 9, 10, 11, 161, 30, 85, 53, 54, 55, 154, 57, 157, 31, 122, 30, 161, 30, 157, 156, 157, 158, 30, 69, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 144, 57, 161, 159, 16, 161, 1, 2, 74, 157, 16, 152, 157, 69, 80, 116, 161, 144, 84, 69, 70, 87, 88, 89, 16, 91, 16, 93, 161, 95, 75, 76, 98, 30, 135, 136, 31, 103, 104, 105, 1, 2, 31, 109, 110, 9, 10, 11, 31, 115, 116, 50, 51, 52, 50, 51, 52, 31, 124, 160, 75, 76, 101, 102, 111, 112, 30, 156, 157, 31, 31, 156, 157, 156, 157, 31, 31, 57, 38, 74, 33, 69, 80, 70, 70, 80, 70, 89, 70, 84, 156, 157, 87, 88, 89, 70, 91, 70, 93, 70, 95, 70, 96, 98, 71, 77, 82, 85, 103, 104, 105, 1, 2, 74, 109, 110, 82, 82, 97, 80, 115, 116, 85, 84, 92, 106, 87, 88, 89, 124, 91, 90, 93, 133, 95, 128, 94, 98, 147, 116, 97, 31, 103, 104, 105, 1, 2, 97, 109, 110, 97, 97, 100, 144, 115, 116, 100, 106, 128, 113, 161, 156, 157, 124, -1, -1, 151, -1, -1, 114, -1, -1, -1, -1, -1, 31, -1, -1, -1, 131, 131, -1, -1, -1, 74, -1, -1, -1, -1, 132, 80, 133, 133, 133, 84, 156, 157, 87, 88, 89, -1, 91, -1, 93, -1, 95, 144, -1, 98, -1, 147, 147, 147, 103, 104, 105, 1, 2, 74, 109, 110, 147, 147, 147, 80, 115, 116, 147, 84, 151, 153, 87, 88, 89, 124, 91, 31, 93, 152, 95, 156, 156, 98, 156, 156, 156, 156, 103, 104, 105, 156, 156, 156, 109, 110, 50, 51, 156, 156, 115, 116, 56, 156, 58, 156, 156, 156, 157, 124, 156, 156, 156, 156, 156, 156, 70, 156, 156, 156, 156, 156, 156, 156, 78, 79, 156, 158, 157, 157, 74, 157, 86, 157, 157, 157, 80, 157, 157, 157, 84, 156, 157, 87, 88, 89, 157, 91, 157, 93, 157, 95, 157, 157, 98, 158, 158, 158, 158, 103, 104, 105, 50, 51, 158, 109, 110, 158, 56, 158, 58, 115, 116, 158, 158, 158, 158, 158, 158, 158, 124, 135, 70, 137, 138, 139, 140, 141, 142, 143, 78, 79, 158, 158, 158, 149, 150, 158, 86, 158, 158, 158, 158, 158, 164, 159, 158, 158, 158, 158, 158, -1, 156, 157, 159, 162, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, -1, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 135, 160, 137, 138, 139, 140, 141, 142, 143, 160, 160, 160, 160, 160, 149, 150, 160, 160, 163, -1, 162, -1, 163, 163, 159, 163, 163, 163, -1, 163, 163, 163, 163, 163, 163, 163, 163, 163);
    protected $actionBase = array(0, 229, 310, 390, 470, 103, 325, 325, 784, -2, -2, 149, -2, -2, -2, 660, 765, 799, 765, 589, 694, 870, 870, 870, 252, 404, 404, 404, 514, 177, 177, 918, 434, 118, 295, 313, 240, 491, 491, 491, 491, 138, 138, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 89, 206, 773, 550, 535, 775, 776, 777, 912, 709, 913, 856, 857, 700, 858, 859, 862, 863, 864, 855, 865, 935, 866, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 322, 592, 285, 319, 232, 44, 691, 691, 691, 691, 691, 691, 691, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 582, 530, 530, 530, 594, 860, 658, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, 500, -21, -21, 492, 702, 420, 355, 216, 549, 151, 26, 26, 331, 331, 331, 331, 331, 46, 46, 5, 5, 5, 5, 153, 188, 188, 188, 188, 121, 121, 121, 121, 314, 314, 394, 394, 362, 300, 298, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 67, 656, 656, 659, 659, 522, 554, 554, 554, 554, 679, -59, -59, 381, 462, 462, 462, 528, 717, 854, 382, 382, 382, 382, 382, 382, 561, 561, 561, -3, -3, -3, 692, 115, 137, 115, 137, 678, 732, 450, 732, 338, 677, -15, 510, 810, 468, 707, 850, 711, 853, 572, 735, 267, 529, 654, 674, 463, 529, 529, 529, 529, 654, 610, 640, 608, 463, 529, 463, 718, 323, 496, 89, 570, 507, 675, 778, 293, 670, 780, 290, 373, 332, 566, 278, 435, 733, 781, 914, 917, 385, 715, 675, 675, 675, 352, 511, 278, -8, 605, 605, 605, 605, 156, 605, 605, 605, 605, 251, 276, 375, 402, 779, 657, 657, 690, 872, 869, 869, 657, 689, 657, 690, 874, 874, 874, 874, 657, 657, 657, 657, 869, 869, 869, 688, 869, 239, 703, 704, 704, 874, 742, 743, 657, 657, 712, 869, 869, 869, 712, 695, 874, 701, 741, 277, 869, 874, 672, 689, 672, 657, 701, 672, 689, 689, 672, 22, 666, 668, 873, 875, 887, 790, 662, 685, 879, 880, 876, 878, 871, 699, 744, 745, 497, 669, 671, 673, 680, 719, 682, 713, 674, 667, 667, 667, 655, 720, 655, 667, 667, 667, 667, 667, 667, 667, 667, 916, 646, 731, 714, 653, 749, 553, 573, 791, 664, 811, 900, 893, 867, 919, 881, 898, 655, 920, 739, 247, 643, 882, 783, 786, 655, 883, 655, 792, 655, 902, 812, 686, 813, 814, 667, 910, 921, 923, 924, 925, 927, 928, 929, 930, 684, 931, 750, 696, 894, 299, 877, 718, 729, 705, 788, 751, 820, 328, 932, 823, 655, 655, 794, 785, 655, 795, 756, 740, 890, 757, 895, 933, 664, 708, 896, 655, 706, 825, 934, 328, 681, 683, 888, 661, 761, 886, 911, 885, 796, 649, 663, 829, 830, 831, 693, 763, 891, 892, 889, 764, 803, 665, 805, 697, 832, 807, 884, 768, 833, 834, 899, 676, 730, 710, 698, 687, 809, 835, 897, 769, 770, 771, 848, 772, 849, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, 138, 138, 138, -2, -2, -2, -2, 0, 0, -2, 0, 0, 0, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 0, 0, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 599, -21, -21, -21, -21, 599, -21, -21, -21, -21, -21, -21, -21, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, -21, 599, 599, 599, -21, 382, -21, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 599, 0, 0, 599, -21, 599, -21, 599, -21, -21, 599, 599, 599, 599, 599, 599, 599, -21, -21, -21, -21, -21, -21, 0, 561, 561, 561, 561, -21, -21, -21, -21, 382, 382, 382, 382, 382, 382, 259, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 561, 561, -3, -3, 382, 382, 382, 382, 382, 259, 382, 382, 463, 689, 689, 689, 137, 137, 137, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 463, 0, 463, 0, 382, 463, 689, 463, 657, 137, 689, 689, 463, 869, 616, 616, 616, 616, 328, 278, 0, 0, 689, 689, 0, 0, 0, 0, 0, 689, 0, 0, 0, 0, 0, 0, 869, 0, 0, 0, 0, 0, 667, 247, 0, 705, 335, 0, 0, 0, 0, 0, 0, 705, 335, 347, 347, 0, 684, 667, 667, 667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 328);
    protected $actionDefault = array(3, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 544, 544, 499, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 299, 299, 299, 32767, 32767, 32767, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 32767, 32767, 32767, 32767, 32767, 32767, 383, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 389, 549, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 364, 365, 367, 368, 298, 552, 533, 247, 390, 548, 297, 249, 327, 503, 32767, 32767, 32767, 329, 122, 258, 203, 502, 125, 296, 234, 382, 384, 328, 303, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 302, 458, 361, 360, 359, 460, 32767, 459, 496, 496, 499, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 325, 487, 486, 326, 456, 330, 457, 333, 461, 464, 331, 332, 349, 350, 347, 348, 351, 462, 463, 480, 481, 478, 479, 301, 352, 353, 354, 355, 482, 483, 484, 485, 32767, 32767, 543, 543, 32767, 32767, 282, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 340, 341, 471, 472, 32767, 238, 238, 238, 238, 283, 238, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 335, 336, 334, 466, 467, 465, 432, 32767, 32767, 32767, 434, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 504, 32767, 32767, 32767, 32767, 32767, 517, 421, 171, 32767, 413, 32767, 171, 171, 171, 171, 32767, 222, 224, 167, 32767, 171, 32767, 490, 32767, 32767, 32767, 32767, 522, 345, 32767, 32767, 116, 32767, 32767, 32767, 559, 32767, 517, 32767, 116, 32767, 32767, 32767, 32767, 358, 337, 338, 339, 32767, 32767, 521, 515, 474, 475, 476, 477, 32767, 468, 469, 470, 473, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 429, 435, 435, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 520, 519, 32767, 414, 498, 188, 186, 186, 32767, 208, 208, 32767, 32767, 190, 491, 510, 32767, 190, 173, 32767, 400, 175, 498, 32767, 32767, 240, 32767, 240, 32767, 400, 240, 32767, 32767, 240, 32767, 415, 439, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 379, 380, 493, 506, 32767, 507, 32767, 413, 343, 344, 346, 322, 32767, 324, 369, 370, 371, 372, 373, 374, 375, 377, 32767, 419, 32767, 422, 32767, 32767, 32767, 257, 32767, 557, 32767, 32767, 306, 557, 32767, 32767, 32767, 551, 32767, 32767, 300, 32767, 32767, 32767, 32767, 253, 32767, 169, 32767, 541, 32767, 558, 32767, 515, 32767, 342, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 516, 32767, 32767, 32767, 32767, 229, 32767, 452, 32767, 116, 32767, 32767, 32767, 189, 32767, 32767, 304, 248, 32767, 32767, 550, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 114, 32767, 170, 32767, 32767, 32767, 191, 32767, 32767, 515, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 295, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 515, 32767, 32767, 233, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 415, 32767, 276, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 127, 127, 3, 127, 127, 260, 3, 260, 127, 260, 260, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 216, 219, 208, 208, 164, 127, 127, 268);
    protected $goto = array(166, 140, 140, 140, 166, 187, 168, 144, 147, 141, 142, 143, 149, 163, 163, 163, 163, 144, 144, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 138, 159, 160, 161, 162, 184, 139, 185, 494, 495, 377, 496, 500, 501, 502, 503, 504, 505, 506, 507, 970, 164, 145, 146, 148, 171, 176, 186, 203, 253, 256, 258, 260, 263, 264, 265, 266, 267, 268, 269, 277, 278, 279, 280, 303, 304, 328, 329, 330, 394, 395, 396, 543, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 150, 151, 152, 167, 153, 169, 154, 204, 170, 155, 156, 157, 205, 158, 136, 621, 561, 757, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1113, 629, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 758, 520, 531, 509, 656, 556, 1183, 750, 509, 592, 786, 1183, 888, 612, 613, 884, 617, 618, 624, 626, 631, 633, 817, 855, 855, 855, 855, 850, 856, 174, 891, 891, 1205, 1205, 177, 178, 179, 401, 402, 403, 404, 173, 202, 206, 208, 257, 259, 261, 262, 270, 271, 272, 273, 274, 275, 281, 282, 283, 284, 305, 306, 331, 332, 333, 406, 407, 408, 409, 175, 180, 254, 255, 181, 182, 183, 498, 498, 498, 498, 498, 498, 861, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 510, 586, 538, 601, 602, 510, 545, 546, 547, 548, 549, 550, 551, 552, 554, 587, 1209, 560, 350, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 400, 607, 537, 537, 569, 533, 909, 535, 535, 497, 499, 525, 541, 570, 573, 584, 591, 298, 296, 296, 296, 298, 289, 299, 611, 378, 511, 614, 595, 947, 375, 511, 437, 437, 437, 437, 437, 437, 1163, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 1077, 948, 338, 1175, 321, 1077, 898, 898, 898, 898, 606, 898, 898, 1217, 1217, 1202, 753, 576, 605, 756, 1077, 1077, 1077, 1077, 1077, 1077, 1069, 384, 384, 384, 391, 1217, 877, 859, 857, 859, 655, 466, 512, 886, 881, 753, 384, 753, 384, 968, 384, 895, 385, 588, 353, 414, 384, 1231, 1019, 542, 1197, 1197, 1197, 568, 1094, 386, 386, 386, 904, 915, 515, 1029, 19, 15, 372, 389, 915, 940, 448, 450, 632, 340, 1216, 1216, 1114, 615, 938, 840, 555, 775, 386, 913, 1070, 1073, 1074, 399, 1069, 1182, 660, 23, 1216, 773, 1182, 544, 603, 1066, 1219, 1071, 1174, 1071, 519, 1199, 1199, 1199, 1089, 1088, 1072, 343, 523, 534, 519, 519, 772, 351, 352, 13, 579, 583, 627, 1061, 388, 782, 562, 771, 515, 783, 1181, 3, 4, 918, 956, 865, 451, 574, 1160, 464, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 514, 529, 0, 0, 0, 0, 514, 0, 529, 0, 0, 0, 0, 610, 513, 516, 439, 440, 1067, 619, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 780, 1224, 0, 0, 0, 0, 0, 524, 0, 0, 0, 0, 0, 0, 0, 0, 0, 778, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 301, 301);
    protected $gotoCheck = array(43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 57, 69, 15, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 128, 9, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 16, 102, 32, 69, 32, 32, 120, 6, 69, 32, 29, 120, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 50, 69, 69, 69, 69, 69, 69, 27, 77, 77, 77, 77, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 119, 119, 119, 119, 119, 119, 33, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 67, 110, 67, 67, 119, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 142, 57, 72, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 51, 51, 51, 51, 51, 51, 84, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 5, 5, 5, 5, 5, 5, 5, 63, 46, 124, 63, 129, 98, 63, 124, 57, 57, 57, 57, 57, 57, 133, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 98, 127, 82, 127, 57, 57, 57, 57, 57, 49, 57, 57, 144, 144, 140, 11, 40, 40, 14, 57, 57, 57, 57, 57, 57, 82, 13, 13, 13, 48, 144, 14, 14, 14, 14, 14, 57, 14, 14, 14, 11, 13, 11, 13, 102, 13, 79, 11, 70, 70, 70, 13, 13, 103, 2, 9, 9, 9, 2, 34, 125, 125, 125, 81, 13, 13, 34, 34, 34, 34, 17, 13, 8, 8, 8, 8, 18, 143, 143, 8, 8, 8, 9, 34, 25, 125, 85, 82, 82, 82, 125, 82, 121, 74, 34, 143, 24, 121, 47, 34, 116, 143, 82, 82, 82, 47, 121, 121, 121, 126, 126, 82, 58, 58, 58, 47, 47, 23, 72, 72, 58, 62, 62, 62, 114, 12, 23, 12, 23, 13, 26, 121, 30, 30, 86, 100, 71, 65, 66, 132, 109, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9, 9, -1, -1, -1, -1, 9, -1, 9, -1, -1, -1, -1, 13, 9, 9, 9, 9, 13, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9, 9, -1, -1, -1, -1, -1, 102, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, 5);
    protected $gotoBase = array(0, 0, -172, 0, 0, 353, 201, 0, 477, 149, 0, 110, 195, 117, 426, 112, 203, 140, 171, 0, 0, 0, 0, 168, 164, 157, 119, 27, 0, 205, -118, 0, -428, 266, 51, 0, 0, 0, 0, 0, 388, 0, 0, -24, 0, 0, 345, 484, 146, 133, 209, 75, 0, 0, 0, 0, 0, 107, 161, 0, 0, 0, 222, -77, 0, 106, 97, -343, 0, -94, 135, 123, -129, 0, 129, 0, 0, -50, 0, 143, 0, 159, 64, 0, 338, 132, 122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 98, 0, 121, 0, 165, 156, 0, 0, 0, 0, 0, 87, 273, 259, 0, 0, 114, 0, 150, 0, 0, -5, -91, 200, 0, 0, 84, 154, 202, 77, -48, 178, 0, 0, 93, 187, 0, 0, 0, 0, 0, 0, 136, 0, 286, 167, 102, 0, 0);
    protected $gotoDefault = array(-32768, 468, 664, 2, 665, 835, 740, 748, 598, 482, 630, 582, 380, 1193, 792, 793, 794, 381, 368, 483, 379, 410, 405, 781, 774, 776, 784, 172, 411, 787, 1, 789, 518, 825, 1020, 365, 797, 366, 590, 799, 527, 801, 802, 137, 382, 383, 528, 484, 390, 577, 816, 276, 387, 818, 367, 819, 828, 371, 465, 455, 460, 530, 557, 609, 432, 447, 571, 565, 536, 1086, 566, 864, 349, 872, 661, 880, 883, 485, 558, 894, 452, 902, 1099, 397, 908, 914, 919, 291, 922, 417, 412, 585, 927, 928, 5, 932, 622, 623, 8, 312, 955, 599, 969, 420, 1039, 1041, 486, 487, 522, 459, 508, 526, 488, 1062, 441, 413, 1065, 433, 489, 490, 434, 435, 1083, 355, 1168, 354, 449, 320, 1155, 580, 1118, 456, 1208, 1164, 348, 491, 492, 376, 1187, 392, 1203, 438, 1210, 1218, 344, 540, 567);
    protected $ruleToNonTerminal = array(0, 1, 3, 3, 2, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 9, 10, 11, 11, 12, 12, 13, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 18, 18, 19, 19, 21, 21, 17, 17, 22, 22, 23, 23, 24, 24, 25, 25, 20, 20, 26, 28, 28, 29, 30, 30, 32, 31, 31, 31, 31, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 14, 14, 54, 54, 56, 55, 55, 48, 48, 58, 58, 59, 59, 60, 60, 61, 61, 15, 16, 16, 16, 64, 64, 64, 65, 65, 68, 68, 66, 66, 70, 70, 41, 41, 50, 50, 53, 53, 53, 52, 52, 71, 42, 42, 42, 42, 72, 72, 73, 73, 74, 74, 39, 39, 35, 35, 75, 37, 37, 76, 36, 36, 38, 38, 49, 49, 49, 62, 62, 78, 78, 79, 79, 81, 81, 81, 80, 80, 63, 63, 82, 82, 82, 83, 83, 84, 84, 84, 44, 44, 85, 85, 85, 45, 45, 86, 86, 87, 87, 67, 88, 88, 88, 88, 93, 93, 94, 94, 95, 95, 95, 95, 95, 96, 97, 97, 92, 92, 89, 89, 91, 91, 99, 99, 98, 98, 98, 98, 98, 98, 90, 90, 101, 100, 100, 46, 46, 40, 40, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 34, 34, 47, 47, 106, 106, 107, 107, 107, 107, 113, 102, 102, 109, 109, 115, 115, 116, 117, 118, 118, 118, 118, 118, 118, 118, 69, 69, 57, 57, 57, 57, 103, 103, 122, 122, 119, 119, 123, 123, 123, 123, 104, 104, 104, 108, 108, 108, 114, 114, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 27, 27, 27, 27, 27, 27, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 112, 112, 105, 105, 105, 105, 129, 129, 132, 132, 131, 131, 133, 133, 51, 51, 51, 51, 135, 135, 134, 134, 134, 134, 134, 136, 136, 121, 121, 124, 124, 120, 120, 138, 137, 137, 137, 137, 125, 125, 125, 125, 111, 111, 126, 126, 126, 126, 77, 139, 139, 140, 140, 140, 110, 110, 141, 141, 142, 142, 142, 142, 142, 127, 127, 127, 127, 144, 145, 143, 143, 143, 143, 143, 143, 143, 146, 146, 146);
    protected $ruleToLength = array(1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 4, 3, 4, 2, 3, 1, 1, 7, 6, 3, 1, 3, 1, 3, 1, 1, 3, 1, 3, 1, 2, 3, 1, 3, 3, 1, 3, 2, 0, 1, 1, 1, 1, 1, 3, 5, 8, 3, 5, 9, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 1, 2, 2, 5, 7, 9, 5, 6, 3, 3, 2, 2, 1, 1, 1, 0, 2, 8, 0, 4, 1, 3, 0, 1, 0, 1, 0, 1, 1, 1, 10, 7, 6, 5, 1, 2, 2, 0, 2, 0, 2, 0, 2, 1, 3, 1, 4, 1, 4, 1, 1, 4, 1, 3, 3, 3, 4, 4, 5, 0, 2, 4, 3, 1, 1, 1, 4, 0, 2, 3, 0, 2, 4, 0, 2, 0, 3, 1, 2, 1, 1, 0, 1, 3, 4, 6, 1, 1, 1, 0, 1, 0, 2, 2, 3, 3, 1, 3, 1, 2, 2, 3, 1, 1, 2, 4, 3, 1, 1, 3, 2, 0, 1, 3, 3, 9, 3, 1, 3, 0, 2, 4, 5, 4, 4, 4, 3, 1, 1, 1, 3, 1, 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 3, 3, 1, 0, 1, 1, 3, 3, 4, 4, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 3, 5, 4, 3, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 3, 2, 1, 2, 10, 11, 3, 3, 2, 4, 4, 3, 4, 4, 4, 4, 7, 3, 2, 0, 4, 1, 3, 2, 1, 2, 2, 4, 6, 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 4, 4, 0, 2, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 3, 1, 4, 3, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 5, 4, 4, 3, 1, 3, 1, 1, 3, 3, 0, 2, 0, 1, 3, 1, 3, 1, 1, 1, 1, 1, 6, 4, 3, 4, 2, 4, 4, 1, 3, 1, 2, 1, 1, 4, 1, 1, 3, 6, 4, 4, 4, 4, 1, 4, 0, 1, 1, 3, 1, 1, 4, 3, 1, 1, 1, 0, 0, 2, 3, 1, 3, 1, 4, 2, 2, 2, 2, 1, 2, 1, 1, 1, 4, 3, 3, 3, 6, 3, 1, 1, 1);
    protected function initReduceCallbacks()
    {
        $this->reduceCallbacks = [0 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 1 => function ($stackPos) {
            $this->semValue = $this->handleNamespaces($this->semStack[$stackPos - (1 - 1)]);
        }, 2 => function ($stackPos) {
            if (\is_array($this->semStack[$stackPos - (2 - 2)])) {
                $this->semValue = \array_merge($this->semStack[$stackPos - (2 - 1)], $this->semStack[$stackPos - (2 - 2)]);
            } else {
                $this->semStack[$stackPos - (2 - 1)][] = $this->semStack[$stackPos - (2 - 2)];
                $this->semValue = $this->semStack[$stackPos - (2 - 1)];
            }
        }, 3 => function ($stackPos) {
            $this->semValue = array();
        }, 4 => function ($stackPos) {
            $startAttributes = $this->lookaheadStartAttributes;
            if (isset($startAttributes['comments'])) {
                $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments']));
            } else {
                $nop = null;
            }
            if ($nop !== null) {
                $this->semStack[$stackPos - (1 - 1)][] = $nop;
            }
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 5 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 6 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 7 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 8 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 9 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 10 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 11 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 12 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 13 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 14 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 15 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 16 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 17 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 18 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 19 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 20 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 21 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 22 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 23 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 24 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 25 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 26 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 27 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 28 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 29 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 30 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 31 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 32 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 33 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 34 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 35 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 36 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 37 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 38 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 39 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 40 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 41 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 42 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 43 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 44 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 45 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 46 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 47 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 48 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 49 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 50 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 51 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 52 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 53 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 54 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 55 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 56 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 57 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 58 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 59 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 60 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 61 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 62 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 63 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 64 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 65 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 66 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 67 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 68 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 69 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 70 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 71 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 72 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 73 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 74 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 75 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 76 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 77 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 78 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 79 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 80 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 81 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 82 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 83 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 84 => function ($stackPos) {
            $this->semValue = new Node\Identifier($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 85 => function ($stackPos) {
            $this->semValue = new Node\Identifier($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 86 => function ($stackPos) {
            $this->semValue = new Node\Identifier($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 87 => function ($stackPos) {
            $this->semValue = new Node\Identifier($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 88 => function ($stackPos) {
            $this->semValue = new Name($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 89 => function ($stackPos) {
            $this->semValue = new Name($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 90 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 91 => function ($stackPos) {
            $this->semValue = new Name(\substr($this->semStack[$stackPos - (1 - 1)], 1), $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 92 => function ($stackPos) {
            $this->semValue = new Expr\Variable(\substr($this->semStack[$stackPos - (1 - 1)], 1), $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 93 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 94 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 95 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 96 => function ($stackPos) {
            $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 97 => function ($stackPos) {
            $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos - (3 - 2)], null, $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
            $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON);
            $this->checkNamespace($this->semValue);
        }, 98 => function ($stackPos) {
            $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos - (5 - 2)], $this->semStack[$stackPos - (5 - 4)], $this->startAttributeStack[$stackPos - (5 - 1)] + $this->endAttributes);
            $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED);
            $this->checkNamespace($this->semValue);
        }, 99 => function ($stackPos) {
            $this->semValue = new Stmt\Namespace_(null, $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
            $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED);
            $this->checkNamespace($this->semValue);
        }, 100 => function ($stackPos) {
            $this->semValue = new Stmt\Use_($this->semStack[$stackPos - (3 - 2)], Stmt\Use_::TYPE_NORMAL, $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 101 => function ($stackPos) {
            $this->semValue = new Stmt\Use_($this->semStack[$stackPos - (4 - 3)], $this->semStack[$stackPos - (4 - 2)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 102 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 103 => function ($stackPos) {
            $this->semValue = new Stmt\Const_($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 104 => function ($stackPos) {
            $this->semValue = Stmt\Use_::TYPE_FUNCTION;
        }, 105 => function ($stackPos) {
            $this->semValue = Stmt\Use_::TYPE_CONSTANT;
        }, 106 => function ($stackPos) {
            $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos - (7 - 3)], $this->semStack[$stackPos - (7 - 6)], $this->semStack[$stackPos - (7 - 2)], $this->startAttributeStack[$stackPos - (7 - 1)] + $this->endAttributes);
        }, 107 => function ($stackPos) {
            $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos - (6 - 2)], $this->semStack[$stackPos - (6 - 5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos - (6 - 1)] + $this->endAttributes);
        }, 108 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 109 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 110 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 111 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 112 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 113 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 114 => function ($stackPos) {
            $this->semValue = new Stmt\UseUse($this->semStack[$stackPos - (1 - 1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
            $this->checkUseUse($this->semValue, $stackPos - (1 - 1));
        }, 115 => function ($stackPos) {
            $this->semValue = new Stmt\UseUse($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
            $this->checkUseUse($this->semValue, $stackPos - (3 - 3));
        }, 116 => function ($stackPos) {
            $this->semValue = new Stmt\UseUse($this->semStack[$stackPos - (1 - 1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
            $this->checkUseUse($this->semValue, $stackPos - (1 - 1));
        }, 117 => function ($stackPos) {
            $this->semValue = new Stmt\UseUse($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
            $this->checkUseUse($this->semValue, $stackPos - (3 - 3));
        }, 118 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
            $this->semValue->type = Stmt\Use_::TYPE_NORMAL;
        }, 119 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 2)];
            $this->semValue->type = $this->semStack[$stackPos - (2 - 1)];
        }, 120 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 121 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 122 => function ($stackPos) {
            $this->semValue = new Node\Const_($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 123 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 124 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 125 => function ($stackPos) {
            $this->semValue = new Node\Const_($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 126 => function ($stackPos) {
            if (\is_array($this->semStack[$stackPos - (2 - 2)])) {
                $this->semValue = \array_merge($this->semStack[$stackPos - (2 - 1)], $this->semStack[$stackPos - (2 - 2)]);
            } else {
                $this->semStack[$stackPos - (2 - 1)][] = $this->semStack[$stackPos - (2 - 2)];
                $this->semValue = $this->semStack[$stackPos - (2 - 1)];
            }
        }, 127 => function ($stackPos) {
            $this->semValue = array();
        }, 128 => function ($stackPos) {
            $startAttributes = $this->lookaheadStartAttributes;
            if (isset($startAttributes['comments'])) {
                $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments']));
            } else {
                $nop = null;
            }
            if ($nop !== null) {
                $this->semStack[$stackPos - (1 - 1)][] = $nop;
            }
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 129 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 130 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 131 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 132 => function ($stackPos) {
            throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 133 => function ($stackPos) {
            if ($this->semStack[$stackPos - (3 - 2)]) {
                $this->semValue = $this->semStack[$stackPos - (3 - 2)];
                $attrs = $this->startAttributeStack[$stackPos - (3 - 1)];
                $stmts = $this->semValue;
                if (!empty($attrs['comments'])) {
                    $stmts[0]->setAttribute('comments', \array_merge($attrs['comments'], $stmts[0]->getAttribute('comments', [])));
                }
            } else {
                $startAttributes = $this->startAttributeStack[$stackPos - (3 - 1)];
                if (isset($startAttributes['comments'])) {
                    $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes);
                } else {
                    $this->semValue = null;
                }
                if (null === $this->semValue) {
                    $this->semValue = array();
                }
            }
        }, 134 => function ($stackPos) {
            $this->semValue = new Stmt\If_($this->semStack[$stackPos - (5 - 2)], ['stmts' => \is_array($this->semStack[$stackPos - (5 - 3)]) ? $this->semStack[$stackPos - (5 - 3)] : array($this->semStack[$stackPos - (5 - 3)]), 'elseifs' => $this->semStack[$stackPos - (5 - 4)], 'else' => $this->semStack[$stackPos - (5 - 5)]], $this->startAttributeStack[$stackPos - (5 - 1)] + $this->endAttributes);
        }, 135 => function ($stackPos) {
            $this->semValue = new Stmt\If_($this->semStack[$stackPos - (8 - 2)], ['stmts' => $this->semStack[$stackPos - (8 - 4)], 'elseifs' => $this->semStack[$stackPos - (8 - 5)], 'else' => $this->semStack[$stackPos - (8 - 6)]], $this->startAttributeStack[$stackPos - (8 - 1)] + $this->endAttributes);
        }, 136 => function ($stackPos) {
            $this->semValue = new Stmt\While_($this->semStack[$stackPos - (3 - 2)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 137 => function ($stackPos) {
            $this->semValue = new Stmt\Do_($this->semStack[$stackPos - (5 - 4)], \is_array($this->semStack[$stackPos - (5 - 2)]) ? $this->semStack[$stackPos - (5 - 2)] : array($this->semStack[$stackPos - (5 - 2)]), $this->startAttributeStack[$stackPos - (5 - 1)] + $this->endAttributes);
        }, 138 => function ($stackPos) {
            $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos - (9 - 3)], 'cond' => $this->semStack[$stackPos - (9 - 5)], 'loop' => $this->semStack[$stackPos - (9 - 7)], 'stmts' => $this->semStack[$stackPos - (9 - 9)]], $this->startAttributeStack[$stackPos - (9 - 1)] + $this->endAttributes);
        }, 139 => function ($stackPos) {
            $this->semValue = new Stmt\Switch_($this->semStack[$stackPos - (3 - 2)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 140 => function ($stackPos) {
            $this->semValue = new Stmt\Break_(null, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 141 => function ($stackPos) {
            $this->semValue = new Stmt\Break_($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 142 => function ($stackPos) {
            $this->semValue = new Stmt\Continue_(null, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 143 => function ($stackPos) {
            $this->semValue = new Stmt\Continue_($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 144 => function ($stackPos) {
            $this->semValue = new Stmt\Return_(null, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 145 => function ($stackPos) {
            $this->semValue = new Stmt\Return_($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 146 => function ($stackPos) {
            $this->semValue = new Stmt\Global_($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 147 => function ($stackPos) {
            $this->semValue = new Stmt\Static_($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 148 => function ($stackPos) {
            $this->semValue = new Stmt\Echo_($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 149 => function ($stackPos) {
            $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 150 => function ($stackPos) {
            $this->semValue = new Stmt\Expression($this->semStack[$stackPos - (2 - 1)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 151 => function ($stackPos) {
            $this->semValue = new Stmt\Expression($this->semStack[$stackPos - (2 - 1)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 152 => function ($stackPos) {
            $this->semValue = new Stmt\Unset_($this->semStack[$stackPos - (5 - 3)], $this->startAttributeStack[$stackPos - (5 - 1)] + $this->endAttributes);
        }, 153 => function ($stackPos) {
            $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos - (7 - 3)], $this->semStack[$stackPos - (7 - 5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos - (7 - 5)][1], 'stmts' => $this->semStack[$stackPos - (7 - 7)]], $this->startAttributeStack[$stackPos - (7 - 1)] + $this->endAttributes);
        }, 154 => function ($stackPos) {
            $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos - (9 - 3)], $this->semStack[$stackPos - (9 - 7)][0], ['keyVar' => $this->semStack[$stackPos - (9 - 5)], 'byRef' => $this->semStack[$stackPos - (9 - 7)][1], 'stmts' => $this->semStack[$stackPos - (9 - 9)]], $this->startAttributeStack[$stackPos - (9 - 1)] + $this->endAttributes);
        }, 155 => function ($stackPos) {
            $this->semValue = new Stmt\Declare_($this->semStack[$stackPos - (5 - 3)], $this->semStack[$stackPos - (5 - 5)], $this->startAttributeStack[$stackPos - (5 - 1)] + $this->endAttributes);
        }, 156 => function ($stackPos) {
            $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos - (6 - 3)], $this->semStack[$stackPos - (6 - 5)], $this->semStack[$stackPos - (6 - 6)], $this->startAttributeStack[$stackPos - (6 - 1)] + $this->endAttributes);
            $this->checkTryCatch($this->semValue);
        }, 157 => function ($stackPos) {
            $this->semValue = new Stmt\Throw_($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 158 => function ($stackPos) {
            $this->semValue = new Stmt\Goto_($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 159 => function ($stackPos) {
            $this->semValue = new Stmt\Label($this->semStack[$stackPos - (2 - 1)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 160 => function ($stackPos) {
            $this->semValue = new Stmt\Expression($this->semStack[$stackPos - (2 - 1)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 161 => function ($stackPos) {
            $this->semValue = array();
            /* means: no statement */
        }, 162 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 163 => function ($stackPos) {
            $startAttributes = $this->startAttributeStack[$stackPos - (1 - 1)];
            if (isset($startAttributes['comments'])) {
                $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes);
            } else {
                $this->semValue = null;
            }
            if ($this->semValue === null) {
                $this->semValue = array();
            }
            /* means: no statement */
        }, 164 => function ($stackPos) {
            $this->semValue = array();
        }, 165 => function ($stackPos) {
            $this->semStack[$stackPos - (2 - 1)][] = $this->semStack[$stackPos - (2 - 2)];
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 166 => function ($stackPos) {
            $this->semValue = new Stmt\Catch_(array($this->semStack[$stackPos - (8 - 3)]), $this->semStack[$stackPos - (8 - 4)], $this->semStack[$stackPos - (8 - 7)], $this->startAttributeStack[$stackPos - (8 - 1)] + $this->endAttributes);
        }, 167 => function ($stackPos) {
            $this->semValue = null;
        }, 168 => function ($stackPos) {
            $this->semValue = new Stmt\Finally_($this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 169 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 170 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 171 => function ($stackPos) {
            $this->semValue = \false;
        }, 172 => function ($stackPos) {
            $this->semValue = \true;
        }, 173 => function ($stackPos) {
            $this->semValue = \false;
        }, 174 => function ($stackPos) {
            $this->semValue = \true;
        }, 175 => function ($stackPos) {
            $this->semValue = \false;
        }, 176 => function ($stackPos) {
            $this->semValue = \true;
        }, 177 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 178 => function ($stackPos) {
            $this->semValue = new Node\Identifier($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 179 => function ($stackPos) {
            $this->semValue = new Stmt\Function_($this->semStack[$stackPos - (10 - 3)], ['byRef' => $this->semStack[$stackPos - (10 - 2)], 'params' => $this->semStack[$stackPos - (10 - 5)], 'returnType' => $this->semStack[$stackPos - (10 - 7)], 'stmts' => $this->semStack[$stackPos - (10 - 9)]], $this->startAttributeStack[$stackPos - (10 - 1)] + $this->endAttributes);
        }, 180 => function ($stackPos) {
            $this->semValue = new Stmt\Class_($this->semStack[$stackPos - (7 - 2)], ['type' => $this->semStack[$stackPos - (7 - 1)], 'extends' => $this->semStack[$stackPos - (7 - 3)], 'implements' => $this->semStack[$stackPos - (7 - 4)], 'stmts' => $this->semStack[$stackPos - (7 - 6)]], $this->startAttributeStack[$stackPos - (7 - 1)] + $this->endAttributes);
            $this->checkClass($this->semValue, $stackPos - (7 - 2));
        }, 181 => function ($stackPos) {
            $this->semValue = new Stmt\Interface_($this->semStack[$stackPos - (6 - 2)], ['extends' => $this->semStack[$stackPos - (6 - 3)], 'stmts' => $this->semStack[$stackPos - (6 - 5)]], $this->startAttributeStack[$stackPos - (6 - 1)] + $this->endAttributes);
            $this->checkInterface($this->semValue, $stackPos - (6 - 2));
        }, 182 => function ($stackPos) {
            $this->semValue = new Stmt\Trait_($this->semStack[$stackPos - (5 - 2)], ['stmts' => $this->semStack[$stackPos - (5 - 4)]], $this->startAttributeStack[$stackPos - (5 - 1)] + $this->endAttributes);
        }, 183 => function ($stackPos) {
            $this->semValue = 0;
        }, 184 => function ($stackPos) {
            $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT;
        }, 185 => function ($stackPos) {
            $this->semValue = Stmt\Class_::MODIFIER_FINAL;
        }, 186 => function ($stackPos) {
            $this->semValue = null;
        }, 187 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 2)];
        }, 188 => function ($stackPos) {
            $this->semValue = array();
        }, 189 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 2)];
        }, 190 => function ($stackPos) {
            $this->semValue = array();
        }, 191 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 2)];
        }, 192 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 193 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 194 => function ($stackPos) {
            $this->semValue = \is_array($this->semStack[$stackPos - (1 - 1)]) ? $this->semStack[$stackPos - (1 - 1)] : array($this->semStack[$stackPos - (1 - 1)]);
        }, 195 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (4 - 2)];
        }, 196 => function ($stackPos) {
            $this->semValue = \is_array($this->semStack[$stackPos - (1 - 1)]) ? $this->semStack[$stackPos - (1 - 1)] : array($this->semStack[$stackPos - (1 - 1)]);
        }, 197 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (4 - 2)];
        }, 198 => function ($stackPos) {
            $this->semValue = \is_array($this->semStack[$stackPos - (1 - 1)]) ? $this->semStack[$stackPos - (1 - 1)] : array($this->semStack[$stackPos - (1 - 1)]);
        }, 199 => function ($stackPos) {
            $this->semValue = null;
        }, 200 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (4 - 2)];
        }, 201 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 202 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 203 => function ($stackPos) {
            $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 204 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (3 - 2)];
        }, 205 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (4 - 3)];
        }, 206 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (4 - 2)];
        }, 207 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (5 - 3)];
        }, 208 => function ($stackPos) {
            $this->semValue = array();
        }, 209 => function ($stackPos) {
            $this->semStack[$stackPos - (2 - 1)][] = $this->semStack[$stackPos - (2 - 2)];
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 210 => function ($stackPos) {
            $this->semValue = new Stmt\Case_($this->semStack[$stackPos - (4 - 2)], $this->semStack[$stackPos - (4 - 4)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 211 => function ($stackPos) {
            $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 212 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 213 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 214 => function ($stackPos) {
            $this->semValue = \is_array($this->semStack[$stackPos - (1 - 1)]) ? $this->semStack[$stackPos - (1 - 1)] : array($this->semStack[$stackPos - (1 - 1)]);
        }, 215 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (4 - 2)];
        }, 216 => function ($stackPos) {
            $this->semValue = array();
        }, 217 => function ($stackPos) {
            $this->semStack[$stackPos - (2 - 1)][] = $this->semStack[$stackPos - (2 - 2)];
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 218 => function ($stackPos) {
            $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos - (3 - 2)], \is_array($this->semStack[$stackPos - (3 - 3)]) ? $this->semStack[$stackPos - (3 - 3)] : array($this->semStack[$stackPos - (3 - 3)]), $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 219 => function ($stackPos) {
            $this->semValue = array();
        }, 220 => function ($stackPos) {
            $this->semStack[$stackPos - (2 - 1)][] = $this->semStack[$stackPos - (2 - 2)];
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 221 => function ($stackPos) {
            $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos - (4 - 2)], $this->semStack[$stackPos - (4 - 4)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 222 => function ($stackPos) {
            $this->semValue = null;
        }, 223 => function ($stackPos) {
            $this->semValue = new Stmt\Else_(\is_array($this->semStack[$stackPos - (2 - 2)]) ? $this->semStack[$stackPos - (2 - 2)] : array($this->semStack[$stackPos - (2 - 2)]), $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 224 => function ($stackPos) {
            $this->semValue = null;
        }, 225 => function ($stackPos) {
            $this->semValue = new Stmt\Else_($this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 226 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)], \false);
        }, 227 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (2 - 2)], \true);
        }, 228 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)], \false);
        }, 229 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 230 => function ($stackPos) {
            $this->semValue = array();
        }, 231 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 232 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 233 => function ($stackPos) {
            $this->semValue = new Node\Param($this->semStack[$stackPos - (4 - 4)], null, $this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 2)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
            $this->checkParam($this->semValue);
        }, 234 => function ($stackPos) {
            $this->semValue = new Node\Param($this->semStack[$stackPos - (6 - 4)], $this->semStack[$stackPos - (6 - 6)], $this->semStack[$stackPos - (6 - 1)], $this->semStack[$stackPos - (6 - 2)], $this->semStack[$stackPos - (6 - 3)], $this->startAttributeStack[$stackPos - (6 - 1)] + $this->endAttributes);
            $this->checkParam($this->semValue);
        }, 235 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 236 => function ($stackPos) {
            $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 237 => function ($stackPos) {
            $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 238 => function ($stackPos) {
            $this->semValue = null;
        }, 239 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 240 => function ($stackPos) {
            $this->semValue = null;
        }, 241 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 2)];
        }, 242 => function ($stackPos) {
            $this->semValue = array();
        }, 243 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (3 - 2)];
        }, 244 => function ($stackPos) {
            $this->semValue = array(new Node\Arg($this->semStack[$stackPos - (3 - 2)], \false, \false, $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes));
        }, 245 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 246 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 247 => function ($stackPos) {
            $this->semValue = new Node\Arg($this->semStack[$stackPos - (1 - 1)], \false, \false, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 248 => function ($stackPos) {
            $this->semValue = new Node\Arg($this->semStack[$stackPos - (2 - 2)], \true, \false, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 249 => function ($stackPos) {
            $this->semValue = new Node\Arg($this->semStack[$stackPos - (2 - 2)], \false, \true, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 250 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 251 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 252 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 253 => function ($stackPos) {
            $this->semValue = new Expr\Variable($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 254 => function ($stackPos) {
            $this->semValue = new Expr\Variable($this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 255 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 256 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 257 => function ($stackPos) {
            $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos - (1 - 1)], null, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 258 => function ($stackPos) {
            $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 259 => function ($stackPos) {
            if ($this->semStack[$stackPos - (2 - 2)] !== null) {
                $this->semStack[$stackPos - (2 - 1)][] = $this->semStack[$stackPos - (2 - 2)];
                $this->semValue = $this->semStack[$stackPos - (2 - 1)];
            }
        }, 260 => function ($stackPos) {
            $this->semValue = array();
        }, 261 => function ($stackPos) {
            $startAttributes = $this->lookaheadStartAttributes;
            if (isset($startAttributes['comments'])) {
                $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments']));
            } else {
                $nop = null;
            }
            if ($nop !== null) {
                $this->semStack[$stackPos - (1 - 1)][] = $nop;
            }
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 262 => function ($stackPos) {
            $this->semValue = new Stmt\Property($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
            $this->checkProperty($this->semValue, $stackPos - (3 - 1));
        }, 263 => function ($stackPos) {
            $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos - (3 - 2)], 0, $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 264 => function ($stackPos) {
            $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos - (9 - 4)], ['type' => $this->semStack[$stackPos - (9 - 1)], 'byRef' => $this->semStack[$stackPos - (9 - 3)], 'params' => $this->semStack[$stackPos - (9 - 6)], 'returnType' => $this->semStack[$stackPos - (9 - 8)], 'stmts' => $this->semStack[$stackPos - (9 - 9)]], $this->startAttributeStack[$stackPos - (9 - 1)] + $this->endAttributes);
            $this->checkClassMethod($this->semValue, $stackPos - (9 - 1));
        }, 265 => function ($stackPos) {
            $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos - (3 - 2)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 266 => function ($stackPos) {
            $this->semValue = array();
        }, 267 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (3 - 2)];
        }, 268 => function ($stackPos) {
            $this->semValue = array();
        }, 269 => function ($stackPos) {
            $this->semStack[$stackPos - (2 - 1)][] = $this->semStack[$stackPos - (2 - 2)];
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 270 => function ($stackPos) {
            $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos - (4 - 1)][0], $this->semStack[$stackPos - (4 - 1)][1], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 271 => function ($stackPos) {
            $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos - (5 - 1)][0], $this->semStack[$stackPos - (5 - 1)][1], $this->semStack[$stackPos - (5 - 3)], $this->semStack[$stackPos - (5 - 4)], $this->startAttributeStack[$stackPos - (5 - 1)] + $this->endAttributes);
        }, 272 => function ($stackPos) {
            $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos - (4 - 1)][0], $this->semStack[$stackPos - (4 - 1)][1], $this->semStack[$stackPos - (4 - 3)], null, $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 273 => function ($stackPos) {
            $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos - (4 - 1)][0], $this->semStack[$stackPos - (4 - 1)][1], null, $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 274 => function ($stackPos) {
            $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos - (4 - 1)][0], $this->semStack[$stackPos - (4 - 1)][1], null, $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 275 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)]);
        }, 276 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 277 => function ($stackPos) {
            $this->semValue = array(null, $this->semStack[$stackPos - (1 - 1)]);
        }, 278 => function ($stackPos) {
            $this->semValue = null;
        }, 279 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (3 - 2)];
        }, 280 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 281 => function ($stackPos) {
            $this->semValue = 0;
        }, 282 => function ($stackPos) {
            $this->semValue = 0;
        }, 283 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 284 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 285 => function ($stackPos) {
            $this->checkModifier($this->semStack[$stackPos - (2 - 1)], $this->semStack[$stackPos - (2 - 2)], $stackPos - (2 - 2));
            $this->semValue = $this->semStack[$stackPos - (2 - 1)] | $this->semStack[$stackPos - (2 - 2)];
        }, 286 => function ($stackPos) {
            $this->semValue = Stmt\Class_::MODIFIER_PUBLIC;
        }, 287 => function ($stackPos) {
            $this->semValue = Stmt\Class_::MODIFIER_PROTECTED;
        }, 288 => function ($stackPos) {
            $this->semValue = Stmt\Class_::MODIFIER_PRIVATE;
        }, 289 => function ($stackPos) {
            $this->semValue = Stmt\Class_::MODIFIER_STATIC;
        }, 290 => function ($stackPos) {
            $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT;
        }, 291 => function ($stackPos) {
            $this->semValue = Stmt\Class_::MODIFIER_FINAL;
        }, 292 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 293 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 294 => function ($stackPos) {
            $this->semValue = new Node\VarLikeIdentifier(\substr($this->semStack[$stackPos - (1 - 1)], 1), $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 295 => function ($stackPos) {
            $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos - (1 - 1)], null, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 296 => function ($stackPos) {
            $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 297 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 298 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 299 => function ($stackPos) {
            $this->semValue = array();
        }, 300 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 301 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 302 => function ($stackPos) {
            $this->semValue = new Expr\Assign($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 303 => function ($stackPos) {
            $this->semValue = new Expr\Assign($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 304 => function ($stackPos) {
            $this->semValue = new Expr\AssignRef($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 4)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 305 => function ($stackPos) {
            $this->semValue = new Expr\AssignRef($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 4)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 306 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 307 => function ($stackPos) {
            $this->semValue = new Expr\Clone_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 308 => function ($stackPos) {
            $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 309 => function ($stackPos) {
            $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 310 => function ($stackPos) {
            $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 311 => function ($stackPos) {
            $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 312 => function ($stackPos) {
            $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 313 => function ($stackPos) {
            $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 314 => function ($stackPos) {
            $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 315 => function ($stackPos) {
            $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 316 => function ($stackPos) {
            $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 317 => function ($stackPos) {
            $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 318 => function ($stackPos) {
            $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 319 => function ($stackPos) {
            $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 320 => function ($stackPos) {
            $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 321 => function ($stackPos) {
            $this->semValue = new Expr\PostInc($this->semStack[$stackPos - (2 - 1)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 322 => function ($stackPos) {
            $this->semValue = new Expr\PreInc($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 323 => function ($stackPos) {
            $this->semValue = new Expr\PostDec($this->semStack[$stackPos - (2 - 1)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 324 => function ($stackPos) {
            $this->semValue = new Expr\PreDec($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 325 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 326 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 327 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 328 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 329 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 330 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 331 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 332 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 333 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 334 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 335 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 336 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 337 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 338 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 339 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 340 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 341 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 342 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 343 => function ($stackPos) {
            $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 344 => function ($stackPos) {
            $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 345 => function ($stackPos) {
            $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 346 => function ($stackPos) {
            $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 347 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 348 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 349 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 350 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 351 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 352 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 353 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 354 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 355 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 356 => function ($stackPos) {
            $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 357 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 358 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (3 - 2)];
        }, 359 => function ($stackPos) {
            $this->semValue = new Expr\Ternary($this->semStack[$stackPos - (5 - 1)], $this->semStack[$stackPos - (5 - 3)], $this->semStack[$stackPos - (5 - 5)], $this->startAttributeStack[$stackPos - (5 - 1)] + $this->endAttributes);
        }, 360 => function ($stackPos) {
            $this->semValue = new Expr\Ternary($this->semStack[$stackPos - (4 - 1)], null, $this->semStack[$stackPos - (4 - 4)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 361 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 362 => function ($stackPos) {
            $this->semValue = new Expr\Isset_($this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 363 => function ($stackPos) {
            $this->semValue = new Expr\Empty_($this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 364 => function ($stackPos) {
            $this->semValue = new Expr\Include_($this->semStack[$stackPos - (2 - 2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 365 => function ($stackPos) {
            $this->semValue = new Expr\Include_($this->semStack[$stackPos - (2 - 2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 366 => function ($stackPos) {
            $this->semValue = new Expr\Eval_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 367 => function ($stackPos) {
            $this->semValue = new Expr\Include_($this->semStack[$stackPos - (2 - 2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 368 => function ($stackPos) {
            $this->semValue = new Expr\Include_($this->semStack[$stackPos - (2 - 2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 369 => function ($stackPos) {
            $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 370 => function ($stackPos) {
            $attrs = $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes;
            $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos - (2 - 1)]);
            $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos - (2 - 2)], $attrs);
        }, 371 => function ($stackPos) {
            $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 372 => function ($stackPos) {
            $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 373 => function ($stackPos) {
            $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 374 => function ($stackPos) {
            $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 375 => function ($stackPos) {
            $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 376 => function ($stackPos) {
            $attrs = $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes;
            $attrs['kind'] = \strtolower($this->semStack[$stackPos - (2 - 1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE;
            $this->semValue = new Expr\Exit_($this->semStack[$stackPos - (2 - 2)], $attrs);
        }, 377 => function ($stackPos) {
            $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 378 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 379 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 380 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 381 => function ($stackPos) {
            $this->semValue = new Expr\ShellExec($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 382 => function ($stackPos) {
            $this->semValue = new Expr\Print_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 383 => function ($stackPos) {
            $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 384 => function ($stackPos) {
            $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 385 => function ($stackPos) {
            $this->semValue = new Expr\Closure(['static' => \false, 'byRef' => $this->semStack[$stackPos - (10 - 2)], 'params' => $this->semStack[$stackPos - (10 - 4)], 'uses' => $this->semStack[$stackPos - (10 - 6)], 'returnType' => $this->semStack[$stackPos - (10 - 7)], 'stmts' => $this->semStack[$stackPos - (10 - 9)]], $this->startAttributeStack[$stackPos - (10 - 1)] + $this->endAttributes);
        }, 386 => function ($stackPos) {
            $this->semValue = new Expr\Closure(['static' => \true, 'byRef' => $this->semStack[$stackPos - (11 - 3)], 'params' => $this->semStack[$stackPos - (11 - 5)], 'uses' => $this->semStack[$stackPos - (11 - 7)], 'returnType' => $this->semStack[$stackPos - (11 - 8)], 'stmts' => $this->semStack[$stackPos - (11 - 10)]], $this->startAttributeStack[$stackPos - (11 - 1)] + $this->endAttributes);
        }, 387 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (3 - 2)];
        }, 388 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (3 - 2)];
        }, 389 => function ($stackPos) {
            $this->semValue = new Expr\Yield_($this->semStack[$stackPos - (2 - 2)], null, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 390 => function ($stackPos) {
            $this->semValue = new Expr\Yield_($this->semStack[$stackPos - (4 - 4)], $this->semStack[$stackPos - (4 - 2)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 391 => function ($stackPos) {
            $attrs = $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes;
            $attrs['kind'] = Expr\Array_::KIND_LONG;
            $this->semValue = new Expr\Array_($this->semStack[$stackPos - (4 - 3)], $attrs);
        }, 392 => function ($stackPos) {
            $attrs = $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes;
            $attrs['kind'] = Expr\Array_::KIND_SHORT;
            $this->semValue = new Expr\Array_($this->semStack[$stackPos - (3 - 2)], $attrs);
        }, 393 => function ($stackPos) {
            $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 394 => function ($stackPos) {
            $this->semValue = new Expr\ArrayDimFetch(Scalar\String_::fromString($this->semStack[$stackPos - (4 - 1)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes), $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 395 => function ($stackPos) {
            $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 396 => function ($stackPos) {
            $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 397 => function ($stackPos) {
            $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos - (7 - 3)], 'implements' => $this->semStack[$stackPos - (7 - 4)], 'stmts' => $this->semStack[$stackPos - (7 - 6)]], $this->startAttributeStack[$stackPos - (7 - 1)] + $this->endAttributes), $this->semStack[$stackPos - (7 - 2)]);
            $this->checkClass($this->semValue[0], -1);
        }, 398 => function ($stackPos) {
            $this->semValue = new Expr\New_($this->semStack[$stackPos - (3 - 2)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 399 => function ($stackPos) {
            list($class, $ctorArgs) = $this->semStack[$stackPos - (2 - 2)];
            $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 400 => function ($stackPos) {
            $this->semValue = array();
        }, 401 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (4 - 3)];
        }, 402 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 403 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 404 => function ($stackPos) {
            $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos - (2 - 2)], $this->semStack[$stackPos - (2 - 1)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 405 => function ($stackPos) {
            $this->semValue = new Name($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 406 => function ($stackPos) {
            $this->semValue = new Expr\FuncCall($this->semStack[$stackPos - (2 - 1)], $this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 407 => function ($stackPos) {
            $this->semValue = new Expr\FuncCall($this->semStack[$stackPos - (2 - 1)], $this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 408 => function ($stackPos) {
            $this->semValue = new Expr\StaticCall($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->semStack[$stackPos - (4 - 4)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 409 => function ($stackPos) {
            $this->semValue = new Expr\StaticCall($this->semStack[$stackPos - (6 - 1)], $this->semStack[$stackPos - (6 - 4)], $this->semStack[$stackPos - (6 - 6)], $this->startAttributeStack[$stackPos - (6 - 1)] + $this->endAttributes);
        }, 410 => function ($stackPos) {
            $this->semValue = $this->fixupPhp5StaticPropCall($this->semStack[$stackPos - (2 - 1)], $this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 411 => function ($stackPos) {
            $this->semValue = new Expr\FuncCall($this->semStack[$stackPos - (2 - 1)], $this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 412 => function ($stackPos) {
            $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 413 => function ($stackPos) {
            $this->semValue = new Name($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 414 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 415 => function ($stackPos) {
            $this->semValue = new Name($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 416 => function ($stackPos) {
            $this->semValue = new Name($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 417 => function ($stackPos) {
            $this->semValue = new Name\FullyQualified(\substr($this->semStack[$stackPos - (1 - 1)], 1), $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 418 => function ($stackPos) {
            $this->semValue = new Name\Relative(\substr($this->semStack[$stackPos - (1 - 1)], 10), $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 419 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 420 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 421 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 422 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 423 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 424 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 425 => function ($stackPos) {
            $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 426 => function ($stackPos) {
            $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 427 => function ($stackPos) {
            $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 428 => function ($stackPos) {
            $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 429 => function ($stackPos) {
            $this->semValue = null;
        }, 430 => function ($stackPos) {
            $this->semValue = null;
        }, 431 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 432 => function ($stackPos) {
            $this->semValue = array();
        }, 433 => function ($stackPos) {
            $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos - (1 - 1)], '`', \false), $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes));
        }, 434 => function ($stackPos) {
            foreach ($this->semStack[$stackPos - (1 - 1)] as $s) {
                if ($s instanceof Node\Scalar\EncapsedStringPart) {
                    $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', \false);
                }
            }
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 435 => function ($stackPos) {
            $this->semValue = array();
        }, 436 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 437 => function ($stackPos) {
            $this->semValue = $this->parseLNumber($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes, \true);
        }, 438 => function ($stackPos) {
            $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 439 => function ($stackPos) {
            $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes, \false);
        }, 440 => function ($stackPos) {
            $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 441 => function ($stackPos) {
            $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 442 => function ($stackPos) {
            $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 443 => function ($stackPos) {
            $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 444 => function ($stackPos) {
            $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 445 => function ($stackPos) {
            $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 446 => function ($stackPos) {
            $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 447 => function ($stackPos) {
            $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 448 => function ($stackPos) {
            $this->semValue = $this->parseDocString($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 2)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes, $this->startAttributeStack[$stackPos - (3 - 3)] + $this->endAttributeStack[$stackPos - (3 - 3)], \false);
        }, 449 => function ($stackPos) {
            $this->semValue = $this->parseDocString($this->semStack[$stackPos - (2 - 1)], '', $this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes, $this->startAttributeStack[$stackPos - (2 - 2)] + $this->endAttributeStack[$stackPos - (2 - 2)], \false);
        }, 450 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 451 => function ($stackPos) {
            $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 452 => function ($stackPos) {
            $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 453 => function ($stackPos) {
            $this->semValue = new Expr\Array_($this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 454 => function ($stackPos) {
            $this->semValue = new Expr\Array_($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 455 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 456 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 457 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 458 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 459 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 460 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 461 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 462 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 463 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 464 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 465 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 466 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 467 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 468 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 469 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 470 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 471 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 472 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 473 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 474 => function ($stackPos) {
            $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 475 => function ($stackPos) {
            $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 476 => function ($stackPos) {
            $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 477 => function ($stackPos) {
            $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 478 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 479 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 480 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 481 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 482 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 483 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 484 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 485 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 486 => function ($stackPos) {
            $this->semValue = new Expr\Ternary($this->semStack[$stackPos - (5 - 1)], $this->semStack[$stackPos - (5 - 3)], $this->semStack[$stackPos - (5 - 5)], $this->startAttributeStack[$stackPos - (5 - 1)] + $this->endAttributes);
        }, 487 => function ($stackPos) {
            $this->semValue = new Expr\Ternary($this->semStack[$stackPos - (4 - 1)], null, $this->semStack[$stackPos - (4 - 4)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 488 => function ($stackPos) {
            $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 489 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (3 - 2)];
        }, 490 => function ($stackPos) {
            $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 491 => function ($stackPos) {
            $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 492 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 493 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 494 => function ($stackPos) {
            $attrs = $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes;
            $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED;
            foreach ($this->semStack[$stackPos - (3 - 2)] as $s) {
                if ($s instanceof Node\Scalar\EncapsedStringPart) {
                    $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', \true);
                }
            }
            $this->semValue = new Scalar\Encapsed($this->semStack[$stackPos - (3 - 2)], $attrs);
        }, 495 => function ($stackPos) {
            $this->semValue = $this->parseDocString($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 2)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes, $this->startAttributeStack[$stackPos - (3 - 3)] + $this->endAttributeStack[$stackPos - (3 - 3)], \true);
        }, 496 => function ($stackPos) {
            $this->semValue = array();
        }, 497 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 498 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 499 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 500 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 501 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 502 => function ($stackPos) {
            $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos - (3 - 3)], $this->semStack[$stackPos - (3 - 1)], \false, $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 503 => function ($stackPos) {
            $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos - (1 - 1)], null, \false, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 504 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 505 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 506 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 507 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 508 => function ($stackPos) {
            $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos - (6 - 2)], $this->semStack[$stackPos - (6 - 5)], $this->startAttributeStack[$stackPos - (6 - 1)] + $this->endAttributes);
        }, 509 => function ($stackPos) {
            $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 510 => function ($stackPos) {
            $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 511 => function ($stackPos) {
            $this->semValue = new Expr\MethodCall($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->semStack[$stackPos - (4 - 4)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 512 => function ($stackPos) {
            $this->semValue = new Expr\FuncCall($this->semStack[$stackPos - (2 - 1)], $this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 513 => function ($stackPos) {
            $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 514 => function ($stackPos) {
            $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 515 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 516 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (3 - 2)];
        }, 517 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 518 => function ($stackPos) {
            $this->semValue = new Expr\Variable($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 519 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 520 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 521 => function ($stackPos) {
            $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 4)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 522 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 523 => function ($stackPos) {
            $var = \substr($this->semStack[$stackPos - (1 - 1)], 1);
            $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes) : $var;
        }, 524 => function ($stackPos) {
            $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 525 => function ($stackPos) {
            $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos - (6 - 1)], $this->semStack[$stackPos - (6 - 5)], $this->startAttributeStack[$stackPos - (6 - 1)] + $this->endAttributes);
        }, 526 => function ($stackPos) {
            $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 527 => function ($stackPos) {
            $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 528 => function ($stackPos) {
            $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 529 => function ($stackPos) {
            $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 530 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 531 => function ($stackPos) {
            $this->semValue = new Expr\Variable($this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 532 => function ($stackPos) {
            $this->semValue = null;
        }, 533 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 534 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 535 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (3 - 2)];
        }, 536 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 537 => function ($stackPos) {
            $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
            $this->errorState = 2;
        }, 538 => function ($stackPos) {
            $this->semValue = new Expr\List_($this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 539 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 540 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 541 => function ($stackPos) {
            $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos - (1 - 1)], null, \false, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 542 => function ($stackPos) {
            $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos - (1 - 1)], null, \false, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 543 => function ($stackPos) {
            $this->semValue = null;
        }, 544 => function ($stackPos) {
            $this->semValue = array();
        }, 545 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 546 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 547 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 548 => function ($stackPos) {
            $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos - (3 - 3)], $this->semStack[$stackPos - (3 - 1)], \false, $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 549 => function ($stackPos) {
            $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos - (1 - 1)], null, \false, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 550 => function ($stackPos) {
            $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos - (4 - 4)], $this->semStack[$stackPos - (4 - 1)], \true, $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 551 => function ($stackPos) {
            $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos - (2 - 2)], null, \true, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 552 => function ($stackPos) {
            $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos - (2 - 2)], null, \false, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes, \true, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 553 => function ($stackPos) {
            $this->semStack[$stackPos - (2 - 1)][] = $this->semStack[$stackPos - (2 - 2)];
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 554 => function ($stackPos) {
            $this->semStack[$stackPos - (2 - 1)][] = $this->semStack[$stackPos - (2 - 2)];
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 555 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 556 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (2 - 1)], $this->semStack[$stackPos - (2 - 2)]);
        }, 557 => function ($stackPos) {
            $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 558 => function ($stackPos) {
            $this->semValue = new Expr\Variable($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 559 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 560 => function ($stackPos) {
            $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 561 => function ($stackPos) {
            $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 562 => function ($stackPos) {
            $this->semValue = new Expr\Variable($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 563 => function ($stackPos) {
            $this->semValue = new Expr\Variable($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 564 => function ($stackPos) {
            $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos - (6 - 2)], $this->semStack[$stackPos - (6 - 4)], $this->startAttributeStack[$stackPos - (6 - 1)] + $this->endAttributes);
        }, 565 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (3 - 2)];
        }, 566 => function ($stackPos) {
            $this->semValue = new Scalar\String_($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 567 => function ($stackPos) {
            $this->semValue = $this->parseNumString($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 568 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }];
    }
}
<?php

namespace PhpParser\Parser;

use PhpParser\Error;
use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Name;
use PhpParser\Node\Scalar;
use PhpParser\Node\Stmt;
/* This is an automatically GENERATED file, which should not be manually edited.
 * Instead edit one of the following:
 *  * the grammar files grammar/php5.y or grammar/php7.y
 *  * the skeleton file grammar/parser.template
 *  * the preprocessing script grammar/rebuildParsers.php
 */
class Php7 extends \PhpParser\ParserAbstract
{
    protected $tokenToSymbolMapSize = 396;
    protected $actionTableSize = 1223;
    protected $gotoTableSize = 626;
    protected $invalidSymbol = 168;
    protected $errorSymbol = 1;
    protected $defaultAction = -32766;
    protected $unexpectedTokenRule = 32767;
    protected $YY2TBLSTATE = 429;
    protected $numNonLeafStates = 726;
    protected $symbolToName = array("EOF", "error", "T_THROW", "T_INCLUDE", "T_INCLUDE_ONCE", "T_EVAL", "T_REQUIRE", "T_REQUIRE_ONCE", "','", "T_LOGICAL_OR", "T_LOGICAL_XOR", "T_LOGICAL_AND", "T_PRINT", "T_YIELD", "T_DOUBLE_ARROW", "T_YIELD_FROM", "'='", "T_PLUS_EQUAL", "T_MINUS_EQUAL", "T_MUL_EQUAL", "T_DIV_EQUAL", "T_CONCAT_EQUAL", "T_MOD_EQUAL", "T_AND_EQUAL", "T_OR_EQUAL", "T_XOR_EQUAL", "T_SL_EQUAL", "T_SR_EQUAL", "T_POW_EQUAL", "T_COALESCE_EQUAL", "'?'", "':'", "T_COALESCE", "T_BOOLEAN_OR", "T_BOOLEAN_AND", "'|'", "'^'", "T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG", "T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG", "T_IS_EQUAL", "T_IS_NOT_EQUAL", "T_IS_IDENTICAL", "T_IS_NOT_IDENTICAL", "T_SPACESHIP", "'<'", "T_IS_SMALLER_OR_EQUAL", "'>'", "T_IS_GREATER_OR_EQUAL", "T_SL", "T_SR", "'+'", "'-'", "'.'", "'*'", "'/'", "'%'", "'!'", "T_INSTANCEOF", "'~'", "T_INC", "T_DEC", "T_INT_CAST", "T_DOUBLE_CAST", "T_STRING_CAST", "T_ARRAY_CAST", "T_OBJECT_CAST", "T_BOOL_CAST", "T_UNSET_CAST", "'@'", "T_POW", "'['", "T_NEW", "T_CLONE", "T_EXIT", "T_IF", "T_ELSEIF", "T_ELSE", "T_ENDIF", "T_LNUMBER", "T_DNUMBER", "T_STRING", "T_STRING_VARNAME", "T_VARIABLE", "T_NUM_STRING", "T_INLINE_HTML", "T_ENCAPSED_AND_WHITESPACE", "T_CONSTANT_ENCAPSED_STRING", "T_ECHO", "T_DO", "T_WHILE", "T_ENDWHILE", "T_FOR", "T_ENDFOR", "T_FOREACH", "T_ENDFOREACH", "T_DECLARE", "T_ENDDECLARE", "T_AS", "T_SWITCH", "T_MATCH", "T_ENDSWITCH", "T_CASE", "T_DEFAULT", "T_BREAK", "T_CONTINUE", "T_GOTO", "T_FUNCTION", "T_FN", "T_CONST", "T_RETURN", "T_TRY", "T_CATCH", "T_FINALLY", "T_USE", "T_INSTEADOF", "T_GLOBAL", "T_STATIC", "T_ABSTRACT", "T_FINAL", "T_PRIVATE", "T_PROTECTED", "T_PUBLIC", "T_READONLY", "T_VAR", "T_UNSET", "T_ISSET", "T_EMPTY", "T_HALT_COMPILER", "T_CLASS", "T_TRAIT", "T_INTERFACE", "T_ENUM", "T_EXTENDS", "T_IMPLEMENTS", "T_OBJECT_OPERATOR", "T_NULLSAFE_OBJECT_OPERATOR", "T_LIST", "T_ARRAY", "T_CALLABLE", "T_CLASS_C", "T_TRAIT_C", "T_METHOD_C", "T_FUNC_C", "T_LINE", "T_FILE", "T_START_HEREDOC", "T_END_HEREDOC", "T_DOLLAR_OPEN_CURLY_BRACES", "T_CURLY_OPEN", "T_PAAMAYIM_NEKUDOTAYIM", "T_NAMESPACE", "T_NS_C", "T_DIR", "T_NS_SEPARATOR", "T_ELLIPSIS", "T_NAME_FULLY_QUALIFIED", "T_NAME_QUALIFIED", "T_NAME_RELATIVE", "T_ATTRIBUTE", "';'", "']'", "'{'", "'}'", "'('", "')'", "'`'", "'\"'", "'\$'");
    protected $tokenToSymbol = array(0, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 56, 166, 168, 167, 55, 168, 168, 163, 164, 53, 50, 8, 51, 52, 54, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 31, 159, 44, 16, 46, 30, 68, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 70, 168, 160, 36, 168, 165, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 161, 35, 162, 58, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 37, 38, 39, 40, 41, 42, 43, 45, 47, 48, 49, 57, 59, 60, 61, 62, 63, 64, 65, 66, 67, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158);
    protected $action = array(132, 133, 134, 575, 135, 136, 0, 738, 739, 740, 137, 37, 850, 825, 851, 476, -32766, -32766, -32766, -32767, -32767, -32767, -32767, 101, 102, 103, 104, 105, 1097, 1098, 1099, 1096, 1095, 1094, 1100, 732, 731, -32766, 1289, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32767, -32767, -32767, -32767, -32767, 1022, 377, 376, 2, 741, -32766, -32766, -32766, -32766, -32766, 822, 417, -32766, -32766, -32766, -32766, -32766, -32766, 267, 138, 399, 745, 746, 747, 748, 287, -32766, 423, -32766, -32766, -32766, -32766, -32766, -32766, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 779, 576, 780, 781, 782, 783, 771, 772, 340, 341, 774, 775, 760, 761, 762, 764, 765, 766, 351, 806, 807, 808, 809, 810, 577, 767, 768, 578, 579, 800, 791, 789, 790, 803, 786, 787, -327, 423, 580, 581, 785, 582, 583, 584, 585, 586, 587, 605, -590, 477, -86, 814, 788, 588, 589, -590, 139, -32766, -32766, -32766, 132, 133, 134, 575, 135, 136, 1046, 738, 739, 740, 137, 37, 323, 1013, 823, 824, 1334, 1324, -32766, 1335, -32766, -32766, -32766, -32766, -32766, -32766, -32766, 1097, 1098, 1099, 1096, 1095, 1094, 1100, -587, 732, 731, -32766, -32766, -32766, 12, -587, 81, -32766, -32766, -32766, 945, 946, 322, 927, 34, 947, 1224, 1223, 1225, 741, -86, 942, -32766, 1075, -32766, -32766, -32766, -32766, -32766, 239, -32766, -32766, -32766, 267, 138, 399, 745, 746, 747, 748, 461, 462, 423, 35, 247, 103, 104, 105, 128, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 779, 576, 780, 781, 782, 783, 771, 772, 340, 341, 774, 775, 760, 761, 762, 764, 765, 766, 351, 806, 807, 808, 809, 810, 577, 767, 768, 578, 579, 800, 791, 789, 790, 803, 786, 787, -327, 144, 580, 581, 785, 582, 583, 584, 585, 586, 587, 1222, 82, 83, 84, -590, 788, 588, 589, -590, 148, 763, 733, 734, 735, 736, 737, 1309, 738, 739, 740, 776, 777, 36, 1308, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 288, 271, -587, -193, 375, 376, -587, 976, -32766, 1021, 453, 454, 455, 109, 417, 945, 946, 741, 712, 819, 947, -32766, -32766, -32766, -271, 1073, 941, 1224, 1223, 1225, 288, 742, 743, 744, 745, 746, 747, 748, -192, -365, 812, -365, -32766, 599, -32766, -32766, 549, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 779, 802, 780, 781, 782, 783, 771, 772, 773, 801, 774, 775, 760, 761, 762, 764, 765, 766, 805, 806, 807, 808, 809, 810, 811, 767, 768, 769, 770, 800, 791, 789, 790, 803, 786, 787, 251, 820, 778, 784, 785, 792, 793, 795, 794, 796, 797, 732, 731, 1261, 1022, 1019, 788, 799, 798, 49, 50, 51, 507, 52, 53, 1009, 1008, 1007, 1010, 54, 55, -111, 56, 816, 1045, 14, -111, 1022, -111, 287, 1305, 977, 306, 302, 1022, 238, -111, -111, -111, -111, -111, -111, -111, -111, 106, 107, 108, 1089, 271, -32766, -32766, -32766, 280, 284, 126, -193, 929, 57, 58, 287, 109, 1019, -541, 59, 308, 60, 244, 245, 61, 62, 63, 64, 65, 66, 67, 68, 1229, 27, 269, 69, 439, 508, -341, 1022, 929, 1255, 1256, 509, 907, 823, -192, 150, 907, 1253, 41, 24, 510, 352, 511, 818, 512, 386, 513, 11, 699, 514, 515, 648, 25, 814, 43, 44, 440, 372, 371, 907, 45, 516, 702, 1220, 667, 668, 363, 334, -540, 357, -541, -541, 320, 1215, 1249, 518, 519, 520, -581, 1074, 335, 724, -581, 1019, -32766, -541, 336, 521, 522, 703, 1243, 1244, 1245, 1246, 1240, 1241, 294, -541, 850, -547, 851, 823, 1247, 1242, 365, 1022, 1224, 1223, 1225, 295, -153, -153, -153, 369, 70, 897, 318, 319, 322, 897, 384, 149, 402, 373, 374, -153, 435, -153, 436, -153, 280, -153, -540, -540, 141, 1220, 378, 379, 639, 640, 322, 370, 897, 907, 437, 438, 829, -540, -88, 151, 732, 731, 945, 946, 153, 823, -32766, 517, -51, -540, 154, -546, 883, 941, -111, -111, -111, 31, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 155, 74, 27, 157, 32, 322, -85, 123, 124, 909, 129, 697, 130, 909, 823, 697, -153, 143, 1253, 158, -32766, -544, 1229, -542, 159, 160, 1222, 161, -79, 1134, 1136, -75, 285, -32766, -32766, -32766, 909, -32766, 697, -32766, -539, -32766, -301, -73, -32766, 897, -72, -71, 1220, -32766, -32766, -32766, -16, 140, 1215, -32766, -32766, 732, 731, 322, -70, -32766, 414, -69, -4, 907, -68, -67, 521, 522, -32766, 1243, 1244, 1245, 1246, 1240, 1241, -66, -47, -18, 147, 270, 281, 1247, 1242, -544, -544, -542, -542, 732, 731, 713, 716, 906, -32766, 72, 146, 907, 319, 322, 1222, -297, -542, 823, -539, -539, 276, -32766, -32766, -32766, 277, -32766, -544, -32766, -542, -32766, 282, 283, -32766, -539, 909, 328, 697, -32766, -32766, -32766, -32766, 704, 286, -32766, -32766, -539, 1222, 923, 289, -32766, 414, 1220, 290, -32766, -32766, -32766, 271, -32766, -32766, -32766, 47, -32766, 897, -111, -32766, 677, 109, 814, 145, -32766, -32766, -32766, -32766, 823, 131, -32766, -32766, 1336, -32766, 654, 670, -32766, 414, 1104, 370, 637, 430, 551, 73, 13, -32766, 293, 555, 295, 897, 945, 946, 649, 74, 434, 517, 458, 322, 487, 690, 842, 941, -111, -111, -111, 301, 1022, 561, 655, 671, 1260, 300, -32766, -539, -32766, 907, 603, 303, 1222, 296, 297, 39, 1262, 9, 40, -32766, -32766, -32766, 0, -32766, 907, -32766, 909, -32766, 697, -4, -32766, 0, 1229, 907, 0, -32766, -32766, -32766, -32766, 307, 125, -32766, -32766, 0, 1222, 907, 0, -32766, 414, 0, 0, -32766, -32766, -32766, 707, -32766, -32766, -32766, 962, -32766, 697, -505, -32766, 714, -495, 7, 482, -32766, -32766, -32766, -32766, -539, -539, -32766, -32766, 16, 1222, 567, 367, -32766, 414, 925, 295, -32766, -32766, -32766, -539, -32766, -32766, -32766, 822, -32766, 897, 721, -32766, 722, -575, 888, -539, -32766, -32766, -32766, 986, 963, 970, -32766, -32766, 897, -249, -249, -249, -32766, 414, 823, 370, 960, 897, 971, 886, 958, -32766, 1078, 1081, 718, 1082, 945, 946, 1079, 897, 1080, 517, 1086, 33, 1250, 834, 883, 941, -111, -111, -111, 27, 1275, 1293, 1327, -248, -248, -248, 1220, 642, 884, 370, 317, 823, 366, 698, 701, 1253, 1331, 705, -111, 706, 945, 946, 708, 709, 710, 517, 909, -32766, 697, -249, 883, 941, -111, -111, -111, 711, 715, 700, -509, 1333, 845, 909, 48, 697, -573, 1220, 844, 853, 295, 935, 909, 1215, 697, 74, 978, 852, 1332, 322, 934, 932, 933, 936, 909, 1206, 697, -248, 522, 916, 1243, 1244, 1245, 1246, 1240, 1241, 926, 914, 968, 969, 1330, 1287, 1247, 1242, 1276, 1294, -32766, 1300, 1303, 1191, -547, -546, 1222, -545, 72, -489, 1, 319, 322, -32766, -32766, -32766, 28, -32766, 29, -32766, 38, -32766, 298, 299, -32766, 42, 46, 71, 75, -32766, -32766, -32766, 76, 77, 78, -32766, -32766, 368, 79, 80, 142, -32766, 414, 152, 156, 243, 324, 352, 353, 127, -32766, -274, 354, 355, 356, 357, 358, 359, 360, 361, 362, 364, 431, 0, -272, -271, 18, 19, 20, 21, 23, 401, 478, 479, 486, 489, 490, 491, 492, 496, 497, 498, 505, 684, 1233, 1174, 1251, 1048, 1047, 1028, 0, 1210, 1024, -276, -103, 17, 22, 26, 292, 400, 596, 600, 628, 689, 1178, 1228, 1175, 1306, 0, 0, 1254, 0, 322);
    protected $actionCheck = array(2, 3, 4, 5, 6, 7, 0, 9, 10, 11, 12, 13, 106, 1, 108, 31, 9, 10, 11, 44, 45, 46, 47, 48, 49, 50, 51, 52, 116, 117, 118, 119, 120, 121, 122, 37, 38, 30, 1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 138, 106, 107, 8, 57, 9, 10, 11, 9, 10, 155, 116, 9, 10, 11, 9, 10, 11, 71, 72, 73, 74, 75, 76, 77, 163, 30, 80, 32, 33, 34, 35, 36, 30, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 8, 80, 136, 137, 138, 139, 140, 141, 142, 143, 144, 51, 1, 161, 31, 80, 150, 151, 152, 8, 154, 9, 10, 11, 2, 3, 4, 5, 6, 7, 164, 9, 10, 11, 12, 13, 70, 1, 82, 159, 80, 85, 30, 83, 32, 33, 34, 35, 36, 37, 38, 116, 117, 118, 119, 120, 121, 122, 1, 37, 38, 9, 10, 11, 8, 8, 161, 9, 10, 11, 117, 118, 167, 1, 8, 122, 155, 156, 157, 57, 97, 128, 30, 162, 32, 33, 34, 35, 30, 14, 32, 33, 34, 71, 72, 73, 74, 75, 76, 77, 134, 135, 80, 147, 148, 50, 51, 52, 8, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 164, 8, 136, 137, 138, 139, 140, 141, 142, 143, 144, 80, 9, 10, 11, 160, 150, 151, 152, 164, 154, 2, 3, 4, 5, 6, 7, 1, 9, 10, 11, 12, 13, 30, 8, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 30, 57, 160, 8, 106, 107, 164, 31, 9, 137, 129, 130, 131, 69, 116, 117, 118, 57, 161, 80, 122, 9, 10, 11, 164, 1, 128, 155, 156, 157, 30, 71, 72, 73, 74, 75, 76, 77, 8, 106, 80, 108, 30, 1, 32, 33, 85, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 8, 156, 136, 137, 138, 139, 140, 141, 142, 143, 144, 37, 38, 146, 138, 116, 150, 151, 152, 2, 3, 4, 5, 6, 7, 119, 120, 121, 122, 12, 13, 101, 15, 80, 1, 101, 106, 138, 108, 163, 1, 159, 8, 113, 138, 97, 116, 117, 118, 119, 120, 121, 122, 123, 53, 54, 55, 123, 57, 9, 10, 11, 163, 30, 14, 164, 122, 50, 51, 163, 69, 116, 70, 56, 8, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 1, 70, 71, 72, 73, 74, 162, 138, 122, 78, 79, 80, 1, 82, 164, 14, 1, 86, 87, 88, 89, 163, 91, 156, 93, 106, 95, 108, 161, 98, 99, 75, 76, 80, 103, 104, 105, 106, 107, 1, 109, 110, 31, 116, 75, 76, 115, 116, 70, 163, 134, 135, 8, 122, 1, 124, 125, 126, 160, 159, 8, 161, 164, 116, 137, 149, 8, 136, 137, 31, 139, 140, 141, 142, 143, 144, 145, 161, 106, 163, 108, 82, 151, 152, 8, 138, 155, 156, 157, 158, 75, 76, 77, 8, 163, 84, 165, 166, 167, 84, 8, 101, 102, 106, 107, 90, 8, 92, 8, 94, 163, 96, 134, 135, 161, 116, 106, 107, 111, 112, 167, 106, 84, 1, 8, 8, 8, 149, 31, 14, 37, 38, 117, 118, 14, 82, 137, 122, 31, 161, 14, 163, 127, 128, 129, 130, 131, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 14, 163, 70, 14, 14, 167, 31, 16, 16, 159, 16, 161, 16, 159, 82, 161, 162, 16, 86, 16, 74, 70, 1, 70, 16, 16, 80, 16, 31, 59, 60, 31, 37, 87, 88, 89, 159, 91, 161, 93, 70, 95, 35, 31, 98, 84, 31, 31, 116, 103, 104, 105, 31, 161, 122, 109, 110, 37, 38, 167, 31, 115, 116, 31, 0, 1, 31, 31, 136, 137, 124, 139, 140, 141, 142, 143, 144, 31, 31, 31, 31, 31, 31, 151, 152, 134, 135, 134, 135, 37, 38, 31, 31, 31, 74, 163, 31, 1, 166, 167, 80, 35, 149, 82, 134, 135, 35, 87, 88, 89, 35, 91, 161, 93, 161, 95, 35, 35, 98, 149, 159, 35, 161, 103, 104, 105, 74, 31, 37, 109, 110, 161, 80, 38, 37, 115, 116, 116, 37, 87, 88, 89, 57, 91, 124, 93, 70, 95, 84, 128, 98, 77, 69, 80, 70, 103, 104, 105, 137, 82, 31, 109, 110, 83, 85, 96, 94, 115, 116, 82, 106, 113, 108, 85, 154, 97, 124, 113, 89, 158, 84, 117, 118, 90, 163, 128, 122, 97, 167, 97, 92, 127, 128, 129, 130, 131, 133, 138, 153, 100, 100, 146, 132, 74, 70, 137, 1, 153, 114, 80, 134, 135, 159, 146, 150, 159, 87, 88, 89, -1, 91, 1, 93, 159, 95, 161, 162, 98, -1, 1, 1, -1, 103, 104, 105, 74, 132, 161, 109, 110, -1, 80, 1, -1, 115, 116, -1, -1, 87, 88, 89, 31, 91, 124, 93, 159, 95, 161, 149, 98, 31, 149, 149, 102, 103, 104, 105, 74, 134, 135, 109, 110, 149, 80, 81, 149, 115, 116, 154, 158, 87, 88, 89, 149, 91, 124, 93, 155, 95, 84, 159, 98, 159, 163, 159, 161, 103, 104, 105, 159, 159, 159, 109, 110, 84, 100, 101, 102, 115, 116, 82, 106, 159, 84, 159, 159, 159, 124, 159, 159, 162, 159, 117, 118, 159, 84, 159, 122, 159, 161, 160, 160, 127, 128, 129, 130, 131, 70, 160, 160, 160, 100, 101, 102, 116, 160, 162, 106, 161, 82, 161, 161, 161, 86, 162, 161, 128, 161, 117, 118, 161, 161, 161, 122, 159, 137, 161, 162, 127, 128, 129, 130, 131, 161, 161, 161, 165, 162, 162, 159, 70, 161, 163, 116, 162, 162, 158, 162, 159, 122, 161, 163, 162, 162, 162, 167, 162, 162, 162, 162, 159, 162, 161, 162, 137, 162, 139, 140, 141, 142, 143, 144, 162, 162, 162, 162, 162, 162, 151, 152, 162, 162, 74, 162, 162, 165, 163, 163, 80, 163, 163, 163, 163, 166, 167, 87, 88, 89, 163, 91, 163, 93, 163, 95, 134, 135, 98, 163, 163, 163, 163, 103, 104, 105, 163, 163, 163, 109, 110, 149, 163, 163, 163, 115, 116, 163, 163, 163, 163, 163, 163, 161, 124, 164, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, -1, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, -1, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, -1, -1, 166, -1, 167);
    protected $actionBase = array(0, -2, 154, 542, 752, 893, 929, 580, 53, 394, 855, 307, 307, 67, 307, 307, 307, 565, 908, 908, 917, 908, 538, 784, 649, 649, 649, 708, 708, 708, 708, 740, 740, 849, 849, 881, 817, 634, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 12, 323, 389, 678, 1044, 1050, 1046, 1051, 1042, 1041, 1045, 1047, 1052, 942, 943, 753, 946, 947, 949, 950, 1048, 873, 1043, 1049, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 346, 491, 50, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 54, 54, 54, 620, 620, 359, 190, 184, 955, 955, 955, 955, 955, 955, 955, 955, 955, 955, 658, 47, 144, 144, 7, 7, 7, 7, 7, 371, -25, -25, -25, -25, 709, 347, 916, 474, 526, 375, 280, 317, 245, 340, 340, 187, 187, 396, 396, -87, -87, 396, 396, 396, 747, 747, 747, 747, 443, 505, -94, 308, 454, 480, 480, 480, 480, 454, 454, 454, 454, 755, 1054, 454, 454, 454, 641, 822, 822, 998, 442, 442, 442, 822, 499, 776, 88, 499, 88, 37, 92, 756, 85, -54, 425, 756, 639, 764, 189, 143, 820, 524, 820, 1040, 385, 767, 413, 735, 688, 857, 902, 1053, 787, 940, 788, 941, 228, 98, 685, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1055, 415, 1040, 286, 1055, 1055, 1055, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 534, 286, 483, 496, 286, 774, 415, 12, 800, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 736, -16, 12, 323, 204, 204, 427, 168, 204, 204, 204, 204, 12, 12, 12, 524, 773, 733, 537, 742, 377, 773, 773, 773, 115, 124, 207, 342, 695, 754, 446, 761, 761, 775, 957, 957, 761, 765, 761, 775, 973, 761, 761, 957, 957, 809, 232, 625, 579, 612, 627, 957, 475, 761, 761, 761, 761, 792, 643, 761, 433, 281, 761, 761, 792, 758, 739, 46, 751, 957, 957, 957, 792, 603, 751, 751, 751, 819, 821, 746, 738, 571, 507, 645, 198, 783, 738, 738, 761, 619, 746, 738, 746, 738, 812, 738, 738, 738, 746, 738, 765, 585, 738, 691, 644, 188, 738, 6, 974, 975, 624, 979, 967, 980, 1009, 981, 985, 878, 956, 992, 972, 986, 965, 963, 750, 679, 680, 801, 797, 954, 771, 771, 771, 951, 771, 771, 771, 771, 771, 771, 771, 771, 679, 858, 814, 745, 777, 995, 682, 684, 743, 872, 899, 948, 994, 1030, 987, 741, 689, 1016, 999, 846, 875, 1000, 1001, 1017, 1031, 1032, 880, 772, 903, 904, 859, 1003, 879, 771, 974, 985, 663, 972, 986, 965, 963, 734, 724, 720, 723, 717, 704, 700, 703, 737, 1033, 907, 818, 866, 1002, 952, 679, 867, 1012, 856, 1018, 1019, 877, 778, 768, 868, 910, 1004, 1005, 1006, 882, 1034, 884, 744, 1013, 997, 1020, 780, 911, 1021, 1022, 1023, 1024, 887, 913, 888, 889, 823, 781, 1010, 757, 918, 528, 769, 770, 789, 1008, 642, 993, 900, 919, 920, 1025, 1026, 1027, 922, 923, 990, 828, 1014, 760, 1015, 1011, 829, 830, 647, 785, 1035, 759, 763, 779, 653, 674, 924, 925, 927, 991, 748, 762, 841, 843, 1037, 683, 1038, 931, 677, 844, 696, 938, 1029, 697, 699, 786, 901, 811, 782, 766, 1007, 749, 845, 939, 847, 848, 850, 1028, 853, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 458, 458, 458, 458, 458, 458, 307, 307, 307, 307, 0, 0, 307, 0, 0, 0, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 219, 219, 291, 291, 291, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 0, 291, 291, 291, 291, 291, 291, 291, 291, 809, 442, 442, 442, 442, 219, 219, 219, 219, 219, -88, -88, 219, 809, 219, 219, 442, 442, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 0, 0, 286, 88, 219, 765, 765, 765, 765, 219, 219, 219, 219, 88, 88, 219, 219, 219, 0, 0, 0, 0, 0, 0, 0, 0, 286, 88, 0, 286, 0, 765, 765, 219, 0, 809, 314, 219, 0, 0, 0, 0, 286, 765, 286, 415, 761, 88, 761, 415, 415, 204, 12, 314, 527, 527, 527, 527, 0, 0, 524, 809, 809, 809, 809, 809, 809, 809, 809, 809, 809, 809, 765, 0, 809, 0, 765, 765, 765, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 765, 0, 0, 957, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 973, 0, 0, 0, 0, 0, 0, 765, 0, 0, 0, 0, 0, 0, 0, 0, 771, 778, 0, 778, 0, 771, 771, 771, 0, 0, 0, 0, 785, 683);
    protected $actionDefault = array(3, 32767, 103, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 101, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 593, 593, 593, 593, 32767, 32767, 253, 103, 32767, 32767, 467, 385, 385, 385, 32767, 32767, 537, 537, 537, 537, 537, 537, 32767, 32767, 32767, 32767, 32767, 32767, 467, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 101, 32767, 32767, 32767, 37, 7, 8, 10, 11, 50, 17, 323, 32767, 32767, 32767, 32767, 103, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 586, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 471, 450, 451, 453, 454, 384, 538, 592, 326, 589, 383, 146, 338, 328, 241, 329, 257, 472, 258, 473, 476, 477, 214, 286, 380, 150, 414, 468, 416, 466, 470, 415, 390, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 388, 389, 469, 447, 446, 445, 32767, 32767, 412, 413, 417, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 103, 32767, 387, 420, 418, 419, 436, 437, 434, 435, 438, 32767, 439, 440, 441, 442, 32767, 315, 32767, 32767, 32767, 364, 362, 315, 112, 32767, 32767, 427, 428, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 531, 444, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 103, 32767, 101, 533, 409, 411, 501, 422, 423, 421, 391, 32767, 508, 32767, 103, 510, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 532, 32767, 539, 539, 32767, 494, 101, 194, 32767, 32767, 32767, 194, 194, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 600, 494, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 32767, 194, 111, 32767, 32767, 32767, 101, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 189, 32767, 267, 269, 103, 554, 194, 32767, 513, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 506, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 494, 432, 139, 32767, 139, 539, 424, 425, 426, 496, 539, 539, 539, 311, 288, 32767, 32767, 32767, 32767, 511, 511, 101, 101, 101, 101, 506, 32767, 32767, 32767, 32767, 112, 100, 100, 100, 100, 100, 104, 102, 32767, 32767, 32767, 32767, 222, 100, 32767, 102, 102, 32767, 32767, 222, 224, 211, 102, 226, 32767, 558, 559, 222, 102, 226, 226, 226, 246, 246, 483, 317, 102, 100, 102, 102, 196, 317, 317, 32767, 102, 483, 317, 483, 317, 198, 317, 317, 317, 483, 317, 32767, 102, 317, 213, 100, 100, 317, 32767, 32767, 32767, 496, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 221, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 526, 32767, 543, 556, 430, 431, 433, 541, 455, 456, 457, 458, 459, 460, 461, 463, 588, 32767, 500, 32767, 32767, 32767, 32767, 337, 598, 32767, 598, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 599, 32767, 539, 32767, 32767, 32767, 32767, 429, 9, 76, 489, 43, 44, 52, 58, 517, 518, 519, 520, 514, 515, 521, 516, 32767, 32767, 522, 564, 32767, 32767, 540, 591, 32767, 32767, 32767, 32767, 32767, 32767, 139, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 526, 32767, 137, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 539, 32767, 32767, 32767, 32767, 313, 310, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 539, 32767, 32767, 32767, 32767, 32767, 290, 32767, 307, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 285, 32767, 32767, 379, 32767, 32767, 32767, 32767, 358, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 152, 152, 3, 3, 340, 152, 152, 152, 340, 340, 152, 340, 340, 340, 152, 152, 152, 152, 152, 152, 279, 184, 261, 264, 246, 246, 152, 350, 152);
    protected $goto = array(194, 194, 685, 425, 653, 346, 614, 650, 419, 310, 311, 331, 569, 316, 424, 332, 426, 630, 1200, 930, 693, 1051, 1201, 1204, 931, 1205, 165, 165, 165, 165, 218, 195, 191, 191, 175, 177, 213, 191, 191, 191, 191, 191, 192, 192, 192, 192, 192, 192, 186, 187, 188, 189, 190, 215, 213, 216, 529, 530, 415, 531, 533, 534, 535, 536, 537, 538, 539, 540, 1120, 166, 167, 168, 193, 169, 170, 171, 164, 172, 173, 174, 176, 212, 214, 217, 235, 240, 241, 242, 254, 255, 256, 257, 258, 259, 260, 261, 263, 264, 265, 266, 278, 279, 313, 314, 315, 420, 421, 422, 574, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 178, 234, 179, 196, 197, 198, 236, 186, 187, 188, 189, 190, 215, 1120, 199, 180, 181, 182, 200, 196, 183, 237, 201, 199, 163, 202, 203, 184, 204, 205, 206, 185, 207, 208, 209, 210, 211, 275, 275, 275, 275, 843, 593, 646, 647, 560, 664, 665, 666, 720, 629, 631, 840, 418, 651, 604, 841, 350, 675, 679, 996, 683, 691, 992, 616, 616, 817, 350, 350, 1252, 1252, 1252, 1252, 1252, 1252, 1252, 1252, 1252, 1252, 1092, 1093, 350, 350, 874, 350, 848, 1337, 896, 891, 892, 905, 849, 893, 846, 894, 895, 847, 548, 900, 899, 901, 350, 391, 394, 554, 594, 598, 1270, 1270, 1072, 1068, 1069, 1270, 1270, 1270, 1270, 1270, 1270, 1270, 1270, 1270, 1270, 1268, 1268, 815, 347, 348, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1221, 1020, 1221, 1020, 1221, 836, 5, 1020, 6, 1020, 1020, 1281, 961, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 349, 349, 349, 349, 1221, 460, 460, 566, 678, 1221, 1221, 1221, 1221, 344, 460, 1221, 1221, 1221, 1302, 1302, 1302, 1302, 602, 617, 620, 621, 622, 623, 643, 644, 645, 695, 836, 912, 553, 546, 1310, 913, 548, 532, 532, 821, 856, 982, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 543, 473, 543, 868, 543, 928, 855, 928, 389, 475, 337, 546, 553, 562, 563, 339, 572, 595, 609, 610, 1320, 1320, 249, 249, 1026, 1025, 15, 821, 450, 821, 494, 565, 495, 955, 955, 955, 955, 1320, 501, 450, 949, 956, 839, 652, 1321, 1321, 1169, 1214, 246, 246, 246, 246, 248, 250, 1323, 985, 959, 959, 957, 959, 719, 1321, 545, 994, 989, 470, 1295, 1296, 953, 405, 692, 917, 1108, 432, 541, 541, 541, 541, 612, 597, 452, 444, 1029, 1030, 1001, 658, 444, 1292, 444, 1292, 674, 1292, 860, 833, 656, 980, 836, 861, 547, 557, 854, 321, 305, 547, 333, 557, 1297, 1298, 392, 456, 570, 607, 1211, 944, 398, 858, 1304, 1304, 1304, 1304, 463, 573, 464, 465, 608, 1004, 866, 403, 404, 1328, 1329, 1057, 662, 1212, 663, 471, 407, 408, 409, 723, 676, 870, 1288, 410, 624, 626, 627, 342, 427, 1216, 869, 857, 1056, 1060, 427, 864, 1061, 1103, 966, 0, 0, 964, 1027, 1027, 0, 0, 0, 657, 1038, 1034, 1035, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 0, 1059, 444, 954, 0, 1290, 1290, 1059, 592, 1085, 0, 696, 682, 682, 0, 502, 688, 1083, 0, 0, 0, 1217, 1218, 272, 428, 1101, 873, 0, 544, 831, 544, 0, 0, 0, 673, 938, 0, 0, 1015, 1031, 1032, 0, 0, 0, 0, 0, 0, 1219, 1278, 1279, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252, 252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 999, 999);
    protected $gotoCheck = array(42, 42, 72, 65, 65, 96, 55, 55, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 78, 78, 9, 126, 78, 78, 78, 78, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 23, 23, 23, 23, 15, 129, 85, 85, 48, 85, 85, 85, 48, 48, 48, 26, 13, 48, 13, 27, 14, 48, 48, 48, 48, 48, 48, 107, 107, 7, 14, 14, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 143, 143, 14, 14, 45, 14, 15, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 64, 15, 64, 14, 58, 58, 58, 58, 58, 168, 168, 15, 15, 15, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 169, 169, 6, 96, 96, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 72, 72, 72, 72, 72, 22, 46, 72, 46, 72, 72, 14, 49, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 24, 24, 24, 24, 72, 148, 148, 170, 14, 72, 72, 72, 72, 177, 148, 72, 72, 72, 9, 9, 9, 9, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 22, 72, 75, 75, 179, 72, 14, 171, 171, 12, 35, 102, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 19, 83, 19, 35, 19, 9, 35, 9, 61, 83, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 180, 180, 5, 5, 117, 117, 75, 12, 19, 12, 154, 103, 154, 19, 19, 19, 19, 180, 154, 19, 19, 19, 25, 63, 181, 181, 150, 14, 5, 5, 5, 5, 5, 5, 180, 25, 25, 25, 25, 25, 25, 181, 25, 25, 25, 174, 174, 174, 92, 92, 92, 17, 17, 112, 106, 106, 106, 106, 17, 106, 82, 23, 118, 118, 17, 119, 23, 129, 23, 129, 115, 129, 17, 18, 17, 17, 22, 39, 9, 9, 17, 167, 167, 9, 29, 9, 176, 176, 9, 9, 2, 2, 17, 91, 28, 37, 129, 129, 129, 129, 9, 9, 9, 9, 79, 109, 9, 81, 81, 9, 9, 128, 81, 159, 81, 156, 81, 81, 81, 98, 81, 41, 129, 81, 84, 84, 84, 81, 116, 20, 16, 16, 16, 16, 116, 9, 131, 146, 95, -1, -1, 16, 116, 116, -1, -1, -1, 116, 116, 116, 116, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, -1, 129, 23, 16, -1, 129, 129, 129, 8, 8, -1, 8, 8, 8, -1, 8, 8, 8, -1, -1, -1, 20, 20, 24, 88, 16, 16, -1, 24, 20, 24, -1, -1, -1, 88, 88, -1, -1, 88, 88, 88, -1, -1, -1, -1, -1, -1, 20, 20, 20, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 106, 106);
    protected $gotoBase = array(0, 0, -250, 0, 0, 360, 235, 181, 522, 7, 0, 0, 33, -156, -113, -178, 43, -49, 126, 72, 100, 0, -9, 158, 282, 377, 172, 176, 120, 150, 0, 0, 0, 0, 0, -39, 0, 119, 0, 116, 0, 45, -1, 0, 0, 195, -456, 0, -529, 250, 0, 0, 0, 0, 0, -33, 0, 0, 182, 0, 0, 306, 0, 143, 203, -235, 0, 0, 0, 0, 0, 0, -6, 0, 0, -21, 0, 0, -385, 124, -46, -19, 144, -123, 10, -538, 0, 0, 275, 0, 0, 127, 106, 0, 0, 60, -472, 0, 76, 0, 0, 0, 294, 328, 0, 0, 386, -50, 0, 99, 0, 0, 138, 0, 0, 149, 219, 87, 139, 137, 0, 0, 0, 0, 0, 0, 19, 0, 101, 159, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -69, 0, 0, 58, 0, 257, 0, 114, 0, 0, 0, -120, 0, 40, 0, 0, 108, 0, 0, 0, 0, 0, 0, 0, 122, -7, 8, 264, 86, 0, 0, 107, 0, 78, 269, 0, 291, 55, 79, 0, 0);
    protected $gotoDefault = array(-32768, 506, 727, 4, 728, 921, 804, 813, 590, 523, 694, 343, 618, 416, 1286, 898, 1107, 571, 832, 1230, 1238, 451, 835, 326, 717, 880, 881, 882, 395, 381, 387, 393, 641, 619, 488, 867, 447, 859, 480, 862, 446, 871, 162, 413, 504, 875, 3, 877, 550, 908, 382, 885, 383, 669, 887, 556, 889, 890, 390, 396, 397, 1112, 564, 615, 902, 253, 558, 903, 380, 904, 911, 385, 388, 680, 459, 499, 493, 406, 1087, 559, 601, 638, 441, 467, 613, 625, 611, 474, 1023, 411, 325, 943, 951, 481, 457, 965, 345, 973, 725, 1119, 632, 483, 981, 633, 988, 991, 524, 525, 472, 1003, 268, 1006, 484, 1044, 659, 1017, 1018, 660, 634, 1040, 635, 661, 636, 1042, 466, 591, 1050, 448, 1058, 1274, 449, 1062, 262, 1065, 274, 412, 429, 1070, 1071, 8, 1077, 686, 687, 10, 273, 503, 1102, 681, 445, 1118, 433, 1188, 1190, 552, 485, 1208, 1207, 672, 500, 1213, 442, 1277, 443, 526, 468, 312, 527, 304, 329, 309, 542, 291, 330, 528, 469, 1283, 1291, 327, 30, 1311, 1322, 338, 568, 606);
    protected $ruleToNonTerminal = array(0, 1, 3, 3, 2, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 9, 10, 11, 11, 11, 12, 12, 13, 13, 14, 15, 15, 16, 16, 17, 17, 18, 18, 21, 21, 22, 23, 23, 24, 24, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 29, 29, 30, 30, 32, 34, 34, 28, 36, 36, 33, 38, 38, 35, 35, 37, 37, 39, 39, 31, 40, 40, 41, 43, 44, 44, 45, 46, 46, 48, 47, 47, 47, 47, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 25, 25, 68, 68, 71, 71, 70, 69, 69, 62, 74, 74, 75, 75, 76, 76, 77, 77, 78, 78, 79, 79, 26, 26, 27, 27, 27, 27, 27, 87, 87, 89, 89, 82, 82, 90, 90, 91, 91, 91, 83, 83, 86, 86, 84, 84, 92, 93, 93, 56, 56, 64, 64, 67, 67, 67, 66, 94, 94, 95, 57, 57, 57, 57, 96, 96, 97, 97, 98, 98, 99, 100, 100, 101, 101, 102, 102, 54, 54, 50, 50, 104, 52, 52, 105, 51, 51, 53, 53, 63, 63, 63, 63, 80, 80, 108, 108, 110, 110, 111, 111, 111, 111, 109, 109, 109, 113, 113, 113, 113, 88, 88, 116, 116, 116, 117, 117, 114, 114, 118, 118, 120, 120, 121, 121, 115, 122, 122, 119, 123, 123, 123, 123, 112, 112, 81, 81, 81, 20, 20, 20, 125, 124, 124, 126, 126, 126, 126, 59, 127, 127, 128, 60, 130, 130, 131, 131, 132, 132, 85, 133, 133, 133, 133, 133, 133, 138, 138, 139, 139, 140, 140, 140, 140, 140, 141, 142, 142, 137, 137, 134, 134, 136, 136, 144, 144, 143, 143, 143, 143, 143, 143, 143, 135, 145, 145, 147, 146, 146, 61, 103, 148, 148, 55, 55, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 155, 149, 149, 154, 154, 157, 158, 158, 159, 160, 161, 161, 161, 161, 19, 19, 72, 72, 72, 72, 150, 150, 150, 150, 163, 163, 151, 151, 153, 153, 153, 156, 156, 168, 168, 168, 168, 168, 168, 168, 168, 168, 169, 169, 107, 171, 171, 171, 171, 152, 152, 152, 152, 152, 152, 152, 152, 58, 58, 166, 166, 166, 166, 172, 172, 162, 162, 162, 173, 173, 173, 173, 173, 173, 73, 73, 65, 65, 65, 65, 129, 129, 129, 129, 176, 175, 165, 165, 165, 165, 165, 165, 165, 164, 164, 164, 174, 174, 174, 174, 106, 170, 178, 178, 177, 177, 179, 179, 179, 179, 179, 179, 179, 179, 167, 167, 167, 167, 181, 182, 180, 180, 180, 180, 180, 180, 180, 180, 183, 183, 183, 183);
    protected $ruleToLength = array(1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 2, 1, 3, 4, 1, 2, 0, 1, 1, 1, 1, 1, 3, 5, 4, 3, 4, 2, 3, 1, 1, 7, 6, 2, 3, 1, 2, 3, 1, 2, 3, 1, 1, 3, 1, 3, 1, 2, 2, 3, 1, 3, 2, 3, 1, 3, 2, 0, 1, 1, 1, 1, 1, 3, 7, 10, 5, 7, 9, 5, 3, 3, 3, 3, 3, 3, 1, 2, 5, 7, 9, 6, 5, 6, 3, 2, 1, 1, 1, 0, 2, 1, 3, 8, 0, 4, 2, 1, 3, 0, 1, 0, 1, 0, 1, 3, 1, 1, 1, 8, 9, 7, 8, 7, 6, 8, 0, 2, 0, 2, 1, 2, 1, 2, 1, 1, 1, 0, 2, 0, 2, 0, 2, 2, 1, 3, 1, 4, 1, 4, 1, 1, 4, 2, 1, 3, 3, 3, 4, 4, 5, 0, 2, 4, 3, 1, 1, 7, 0, 2, 1, 3, 3, 4, 1, 4, 0, 2, 5, 0, 2, 6, 0, 2, 0, 3, 1, 2, 1, 1, 2, 0, 1, 3, 0, 2, 1, 1, 1, 1, 6, 8, 6, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 1, 3, 3, 3, 3, 3, 1, 3, 3, 1, 1, 2, 1, 1, 0, 1, 0, 2, 2, 2, 4, 3, 1, 1, 3, 1, 2, 2, 3, 2, 3, 1, 1, 2, 3, 1, 1, 3, 2, 0, 1, 5, 5, 10, 3, 5, 1, 1, 3, 0, 2, 4, 5, 4, 4, 4, 3, 1, 1, 1, 1, 1, 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, 3, 2, 2, 3, 1, 0, 1, 1, 3, 3, 3, 4, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 4, 3, 4, 4, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 3, 2, 1, 2, 4, 2, 2, 8, 9, 8, 9, 9, 10, 9, 10, 8, 3, 2, 0, 4, 2, 1, 3, 2, 1, 2, 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 0, 3, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 4, 1, 1, 3, 1, 1, 1, 1, 1, 3, 2, 3, 0, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 4, 4, 1, 4, 4, 0, 1, 1, 1, 3, 3, 1, 4, 2, 2, 1, 3, 1, 4, 4, 3, 3, 3, 3, 1, 3, 1, 1, 3, 1, 1, 4, 1, 1, 1, 3, 1, 1, 2, 1, 3, 4, 3, 2, 0, 2, 2, 1, 2, 1, 1, 1, 4, 3, 3, 3, 3, 6, 3, 1, 1, 2, 1);
    protected function initReduceCallbacks()
    {
        $this->reduceCallbacks = [0 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 1 => function ($stackPos) {
            $this->semValue = $this->handleNamespaces($this->semStack[$stackPos - (1 - 1)]);
        }, 2 => function ($stackPos) {
            if (\is_array($this->semStack[$stackPos - (2 - 2)])) {
                $this->semValue = \array_merge($this->semStack[$stackPos - (2 - 1)], $this->semStack[$stackPos - (2 - 2)]);
            } else {
                $this->semStack[$stackPos - (2 - 1)][] = $this->semStack[$stackPos - (2 - 2)];
                $this->semValue = $this->semStack[$stackPos - (2 - 1)];
            }
        }, 3 => function ($stackPos) {
            $this->semValue = array();
        }, 4 => function ($stackPos) {
            $startAttributes = $this->lookaheadStartAttributes;
            if (isset($startAttributes['comments'])) {
                $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments']));
            } else {
                $nop = null;
            }
            if ($nop !== null) {
                $this->semStack[$stackPos - (1 - 1)][] = $nop;
            }
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 5 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 6 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 7 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 8 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 9 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 10 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 11 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 12 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 13 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 14 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 15 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 16 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 17 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 18 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 19 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 20 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 21 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 22 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 23 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 24 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 25 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 26 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 27 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 28 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 29 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 30 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 31 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 32 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 33 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 34 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 35 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 36 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 37 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 38 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 39 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 40 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 41 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 42 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 43 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 44 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 45 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 46 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 47 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 48 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 49 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 50 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 51 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 52 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 53 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 54 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 55 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 56 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 57 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 58 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 59 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 60 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 61 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 62 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 63 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 64 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 65 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 66 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 67 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 68 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 69 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 70 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 71 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 72 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 73 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 74 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 75 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 76 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 77 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 78 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 79 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 80 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 81 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 82 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 83 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 84 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 85 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 86 => function ($stackPos) {
            $this->semValue = new Node\Identifier($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 87 => function ($stackPos) {
            $this->semValue = new Node\Identifier($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 88 => function ($stackPos) {
            $this->semValue = new Node\Identifier($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 89 => function ($stackPos) {
            $this->semValue = new Node\Identifier($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 90 => function ($stackPos) {
            $this->semValue = new Name($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 91 => function ($stackPos) {
            $this->semValue = new Name($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 92 => function ($stackPos) {
            $this->semValue = new Name($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 93 => function ($stackPos) {
            $this->semValue = new Name($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 94 => function ($stackPos) {
            $this->semValue = new Name($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 95 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 96 => function ($stackPos) {
            $this->semValue = new Name(\substr($this->semStack[$stackPos - (1 - 1)], 1), $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 97 => function ($stackPos) {
            $this->semValue = new Expr\Variable(\substr($this->semStack[$stackPos - (1 - 1)], 1), $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 98 => function ($stackPos) {
            /* nothing */
        }, 99 => function ($stackPos) {
            /* nothing */
        }, 100 => function ($stackPos) {
            /* nothing */
        }, 101 => function ($stackPos) {
            $this->emitError(new Error('A trailing comma is not allowed here', $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes));
        }, 102 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 103 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 104 => function ($stackPos) {
            $this->semValue = new Node\Attribute($this->semStack[$stackPos - (1 - 1)], [], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 105 => function ($stackPos) {
            $this->semValue = new Node\Attribute($this->semStack[$stackPos - (2 - 1)], $this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 106 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 107 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 108 => function ($stackPos) {
            $this->semValue = new Node\AttributeGroup($this->semStack[$stackPos - (4 - 2)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 109 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 110 => function ($stackPos) {
            $this->semStack[$stackPos - (2 - 1)][] = $this->semStack[$stackPos - (2 - 2)];
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 111 => function ($stackPos) {
            $this->semValue = [];
        }, 112 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 113 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 114 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 115 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 116 => function ($stackPos) {
            $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 117 => function ($stackPos) {
            $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos - (3 - 2)], null, $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
            $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON);
            $this->checkNamespace($this->semValue);
        }, 118 => function ($stackPos) {
            $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos - (5 - 2)], $this->semStack[$stackPos - (5 - 4)], $this->startAttributeStack[$stackPos - (5 - 1)] + $this->endAttributes);
            $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED);
            $this->checkNamespace($this->semValue);
        }, 119 => function ($stackPos) {
            $this->semValue = new Stmt\Namespace_(null, $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
            $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED);
            $this->checkNamespace($this->semValue);
        }, 120 => function ($stackPos) {
            $this->semValue = new Stmt\Use_($this->semStack[$stackPos - (3 - 2)], Stmt\Use_::TYPE_NORMAL, $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 121 => function ($stackPos) {
            $this->semValue = new Stmt\Use_($this->semStack[$stackPos - (4 - 3)], $this->semStack[$stackPos - (4 - 2)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 122 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 123 => function ($stackPos) {
            $this->semValue = new Stmt\Const_($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 124 => function ($stackPos) {
            $this->semValue = Stmt\Use_::TYPE_FUNCTION;
        }, 125 => function ($stackPos) {
            $this->semValue = Stmt\Use_::TYPE_CONSTANT;
        }, 126 => function ($stackPos) {
            $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos - (7 - 3)], $this->semStack[$stackPos - (7 - 6)], $this->semStack[$stackPos - (7 - 2)], $this->startAttributeStack[$stackPos - (7 - 1)] + $this->endAttributes);
        }, 127 => function ($stackPos) {
            $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos - (6 - 2)], $this->semStack[$stackPos - (6 - 5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos - (6 - 1)] + $this->endAttributes);
        }, 128 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 129 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 130 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 131 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 132 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 133 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 134 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 135 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 136 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 137 => function ($stackPos) {
            $this->semValue = new Stmt\UseUse($this->semStack[$stackPos - (1 - 1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
            $this->checkUseUse($this->semValue, $stackPos - (1 - 1));
        }, 138 => function ($stackPos) {
            $this->semValue = new Stmt\UseUse($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
            $this->checkUseUse($this->semValue, $stackPos - (3 - 3));
        }, 139 => function ($stackPos) {
            $this->semValue = new Stmt\UseUse($this->semStack[$stackPos - (1 - 1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
            $this->checkUseUse($this->semValue, $stackPos - (1 - 1));
        }, 140 => function ($stackPos) {
            $this->semValue = new Stmt\UseUse($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
            $this->checkUseUse($this->semValue, $stackPos - (3 - 3));
        }, 141 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
            $this->semValue->type = Stmt\Use_::TYPE_NORMAL;
        }, 142 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 2)];
            $this->semValue->type = $this->semStack[$stackPos - (2 - 1)];
        }, 143 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 144 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 145 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 146 => function ($stackPos) {
            $this->semValue = new Node\Const_($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 147 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 148 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 149 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 150 => function ($stackPos) {
            $this->semValue = new Node\Const_($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 151 => function ($stackPos) {
            if (\is_array($this->semStack[$stackPos - (2 - 2)])) {
                $this->semValue = \array_merge($this->semStack[$stackPos - (2 - 1)], $this->semStack[$stackPos - (2 - 2)]);
            } else {
                $this->semStack[$stackPos - (2 - 1)][] = $this->semStack[$stackPos - (2 - 2)];
                $this->semValue = $this->semStack[$stackPos - (2 - 1)];
            }
        }, 152 => function ($stackPos) {
            $this->semValue = array();
        }, 153 => function ($stackPos) {
            $startAttributes = $this->lookaheadStartAttributes;
            if (isset($startAttributes['comments'])) {
                $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments']));
            } else {
                $nop = null;
            }
            if ($nop !== null) {
                $this->semStack[$stackPos - (1 - 1)][] = $nop;
            }
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 154 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 155 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 156 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 157 => function ($stackPos) {
            throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 158 => function ($stackPos) {
            if ($this->semStack[$stackPos - (3 - 2)]) {
                $this->semValue = $this->semStack[$stackPos - (3 - 2)];
                $attrs = $this->startAttributeStack[$stackPos - (3 - 1)];
                $stmts = $this->semValue;
                if (!empty($attrs['comments'])) {
                    $stmts[0]->setAttribute('comments', \array_merge($attrs['comments'], $stmts[0]->getAttribute('comments', [])));
                }
            } else {
                $startAttributes = $this->startAttributeStack[$stackPos - (3 - 1)];
                if (isset($startAttributes['comments'])) {
                    $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes);
                } else {
                    $this->semValue = null;
                }
                if (null === $this->semValue) {
                    $this->semValue = array();
                }
            }
        }, 159 => function ($stackPos) {
            $this->semValue = new Stmt\If_($this->semStack[$stackPos - (7 - 3)], ['stmts' => \is_array($this->semStack[$stackPos - (7 - 5)]) ? $this->semStack[$stackPos - (7 - 5)] : array($this->semStack[$stackPos - (7 - 5)]), 'elseifs' => $this->semStack[$stackPos - (7 - 6)], 'else' => $this->semStack[$stackPos - (7 - 7)]], $this->startAttributeStack[$stackPos - (7 - 1)] + $this->endAttributes);
        }, 160 => function ($stackPos) {
            $this->semValue = new Stmt\If_($this->semStack[$stackPos - (10 - 3)], ['stmts' => $this->semStack[$stackPos - (10 - 6)], 'elseifs' => $this->semStack[$stackPos - (10 - 7)], 'else' => $this->semStack[$stackPos - (10 - 8)]], $this->startAttributeStack[$stackPos - (10 - 1)] + $this->endAttributes);
        }, 161 => function ($stackPos) {
            $this->semValue = new Stmt\While_($this->semStack[$stackPos - (5 - 3)], $this->semStack[$stackPos - (5 - 5)], $this->startAttributeStack[$stackPos - (5 - 1)] + $this->endAttributes);
        }, 162 => function ($stackPos) {
            $this->semValue = new Stmt\Do_($this->semStack[$stackPos - (7 - 5)], \is_array($this->semStack[$stackPos - (7 - 2)]) ? $this->semStack[$stackPos - (7 - 2)] : array($this->semStack[$stackPos - (7 - 2)]), $this->startAttributeStack[$stackPos - (7 - 1)] + $this->endAttributes);
        }, 163 => function ($stackPos) {
            $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos - (9 - 3)], 'cond' => $this->semStack[$stackPos - (9 - 5)], 'loop' => $this->semStack[$stackPos - (9 - 7)], 'stmts' => $this->semStack[$stackPos - (9 - 9)]], $this->startAttributeStack[$stackPos - (9 - 1)] + $this->endAttributes);
        }, 164 => function ($stackPos) {
            $this->semValue = new Stmt\Switch_($this->semStack[$stackPos - (5 - 3)], $this->semStack[$stackPos - (5 - 5)], $this->startAttributeStack[$stackPos - (5 - 1)] + $this->endAttributes);
        }, 165 => function ($stackPos) {
            $this->semValue = new Stmt\Break_($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 166 => function ($stackPos) {
            $this->semValue = new Stmt\Continue_($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 167 => function ($stackPos) {
            $this->semValue = new Stmt\Return_($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 168 => function ($stackPos) {
            $this->semValue = new Stmt\Global_($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 169 => function ($stackPos) {
            $this->semValue = new Stmt\Static_($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 170 => function ($stackPos) {
            $this->semValue = new Stmt\Echo_($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 171 => function ($stackPos) {
            $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 172 => function ($stackPos) {
            $e = $this->semStack[$stackPos - (2 - 1)];
            if ($e instanceof Expr\Throw_) {
                // For backwards-compatibility reasons, convert throw in statement position into
                // Stmt\Throw_ rather than Stmt\Expression(Expr\Throw_).
                $this->semValue = new Stmt\Throw_($e->expr, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
            } else {
                $this->semValue = new Stmt\Expression($e, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
            }
        }, 173 => function ($stackPos) {
            $this->semValue = new Stmt\Unset_($this->semStack[$stackPos - (5 - 3)], $this->startAttributeStack[$stackPos - (5 - 1)] + $this->endAttributes);
        }, 174 => function ($stackPos) {
            $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos - (7 - 3)], $this->semStack[$stackPos - (7 - 5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos - (7 - 5)][1], 'stmts' => $this->semStack[$stackPos - (7 - 7)]], $this->startAttributeStack[$stackPos - (7 - 1)] + $this->endAttributes);
        }, 175 => function ($stackPos) {
            $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos - (9 - 3)], $this->semStack[$stackPos - (9 - 7)][0], ['keyVar' => $this->semStack[$stackPos - (9 - 5)], 'byRef' => $this->semStack[$stackPos - (9 - 7)][1], 'stmts' => $this->semStack[$stackPos - (9 - 9)]], $this->startAttributeStack[$stackPos - (9 - 1)] + $this->endAttributes);
        }, 176 => function ($stackPos) {
            $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos - (6 - 3)], new Expr\Error($this->startAttributeStack[$stackPos - (6 - 4)] + $this->endAttributeStack[$stackPos - (6 - 4)]), ['stmts' => $this->semStack[$stackPos - (6 - 6)]], $this->startAttributeStack[$stackPos - (6 - 1)] + $this->endAttributes);
        }, 177 => function ($stackPos) {
            $this->semValue = new Stmt\Declare_($this->semStack[$stackPos - (5 - 3)], $this->semStack[$stackPos - (5 - 5)], $this->startAttributeStack[$stackPos - (5 - 1)] + $this->endAttributes);
        }, 178 => function ($stackPos) {
            $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos - (6 - 3)], $this->semStack[$stackPos - (6 - 5)], $this->semStack[$stackPos - (6 - 6)], $this->startAttributeStack[$stackPos - (6 - 1)] + $this->endAttributes);
            $this->checkTryCatch($this->semValue);
        }, 179 => function ($stackPos) {
            $this->semValue = new Stmt\Goto_($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 180 => function ($stackPos) {
            $this->semValue = new Stmt\Label($this->semStack[$stackPos - (2 - 1)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 181 => function ($stackPos) {
            $this->semValue = array();
            /* means: no statement */
        }, 182 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 183 => function ($stackPos) {
            $startAttributes = $this->startAttributeStack[$stackPos - (1 - 1)];
            if (isset($startAttributes['comments'])) {
                $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes);
            } else {
                $this->semValue = null;
            }
            if ($this->semValue === null) {
                $this->semValue = array();
            }
            /* means: no statement */
        }, 184 => function ($stackPos) {
            $this->semValue = array();
        }, 185 => function ($stackPos) {
            $this->semStack[$stackPos - (2 - 1)][] = $this->semStack[$stackPos - (2 - 2)];
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 186 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 187 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 188 => function ($stackPos) {
            $this->semValue = new Stmt\Catch_($this->semStack[$stackPos - (8 - 3)], $this->semStack[$stackPos - (8 - 4)], $this->semStack[$stackPos - (8 - 7)], $this->startAttributeStack[$stackPos - (8 - 1)] + $this->endAttributes);
        }, 189 => function ($stackPos) {
            $this->semValue = null;
        }, 190 => function ($stackPos) {
            $this->semValue = new Stmt\Finally_($this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 191 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 192 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 193 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 194 => function ($stackPos) {
            $this->semValue = \false;
        }, 195 => function ($stackPos) {
            $this->semValue = \true;
        }, 196 => function ($stackPos) {
            $this->semValue = \false;
        }, 197 => function ($stackPos) {
            $this->semValue = \true;
        }, 198 => function ($stackPos) {
            $this->semValue = \false;
        }, 199 => function ($stackPos) {
            $this->semValue = \true;
        }, 200 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (3 - 2)];
        }, 201 => function ($stackPos) {
            $this->semValue = [];
        }, 202 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 203 => function ($stackPos) {
            $this->semValue = new Node\Identifier($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 204 => function ($stackPos) {
            $this->semValue = new Stmt\Function_($this->semStack[$stackPos - (8 - 3)], ['byRef' => $this->semStack[$stackPos - (8 - 2)], 'params' => $this->semStack[$stackPos - (8 - 5)], 'returnType' => $this->semStack[$stackPos - (8 - 7)], 'stmts' => $this->semStack[$stackPos - (8 - 8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos - (8 - 1)] + $this->endAttributes);
        }, 205 => function ($stackPos) {
            $this->semValue = new Stmt\Function_($this->semStack[$stackPos - (9 - 4)], ['byRef' => $this->semStack[$stackPos - (9 - 3)], 'params' => $this->semStack[$stackPos - (9 - 6)], 'returnType' => $this->semStack[$stackPos - (9 - 8)], 'stmts' => $this->semStack[$stackPos - (9 - 9)], 'attrGroups' => $this->semStack[$stackPos - (9 - 1)]], $this->startAttributeStack[$stackPos - (9 - 1)] + $this->endAttributes);
        }, 206 => function ($stackPos) {
            $this->semValue = new Stmt\Class_($this->semStack[$stackPos - (7 - 2)], ['type' => $this->semStack[$stackPos - (7 - 1)], 'extends' => $this->semStack[$stackPos - (7 - 3)], 'implements' => $this->semStack[$stackPos - (7 - 4)], 'stmts' => $this->semStack[$stackPos - (7 - 6)], 'attrGroups' => []], $this->startAttributeStack[$stackPos - (7 - 1)] + $this->endAttributes);
            $this->checkClass($this->semValue, $stackPos - (7 - 2));
        }, 207 => function ($stackPos) {
            $this->semValue = new Stmt\Class_($this->semStack[$stackPos - (8 - 3)], ['type' => $this->semStack[$stackPos - (8 - 2)], 'extends' => $this->semStack[$stackPos - (8 - 4)], 'implements' => $this->semStack[$stackPos - (8 - 5)], 'stmts' => $this->semStack[$stackPos - (8 - 7)], 'attrGroups' => $this->semStack[$stackPos - (8 - 1)]], $this->startAttributeStack[$stackPos - (8 - 1)] + $this->endAttributes);
            $this->checkClass($this->semValue, $stackPos - (8 - 3));
        }, 208 => function ($stackPos) {
            $this->semValue = new Stmt\Interface_($this->semStack[$stackPos - (7 - 3)], ['extends' => $this->semStack[$stackPos - (7 - 4)], 'stmts' => $this->semStack[$stackPos - (7 - 6)], 'attrGroups' => $this->semStack[$stackPos - (7 - 1)]], $this->startAttributeStack[$stackPos - (7 - 1)] + $this->endAttributes);
            $this->checkInterface($this->semValue, $stackPos - (7 - 3));
        }, 209 => function ($stackPos) {
            $this->semValue = new Stmt\Trait_($this->semStack[$stackPos - (6 - 3)], ['stmts' => $this->semStack[$stackPos - (6 - 5)], 'attrGroups' => $this->semStack[$stackPos - (6 - 1)]], $this->startAttributeStack[$stackPos - (6 - 1)] + $this->endAttributes);
        }, 210 => function ($stackPos) {
            $this->semValue = new Stmt\Enum_($this->semStack[$stackPos - (8 - 3)], ['scalarType' => $this->semStack[$stackPos - (8 - 4)], 'implements' => $this->semStack[$stackPos - (8 - 5)], 'stmts' => $this->semStack[$stackPos - (8 - 7)], 'attrGroups' => $this->semStack[$stackPos - (8 - 1)]], $this->startAttributeStack[$stackPos - (8 - 1)] + $this->endAttributes);
            $this->checkEnum($this->semValue, $stackPos - (8 - 3));
        }, 211 => function ($stackPos) {
            $this->semValue = null;
        }, 212 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 2)];
        }, 213 => function ($stackPos) {
            $this->semValue = null;
        }, 214 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 2)];
        }, 215 => function ($stackPos) {
            $this->semValue = 0;
        }, 216 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 217 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 218 => function ($stackPos) {
            $this->checkClassModifier($this->semStack[$stackPos - (2 - 1)], $this->semStack[$stackPos - (2 - 2)], $stackPos - (2 - 2));
            $this->semValue = $this->semStack[$stackPos - (2 - 1)] | $this->semStack[$stackPos - (2 - 2)];
        }, 219 => function ($stackPos) {
            $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT;
        }, 220 => function ($stackPos) {
            $this->semValue = Stmt\Class_::MODIFIER_FINAL;
        }, 221 => function ($stackPos) {
            $this->semValue = Stmt\Class_::MODIFIER_READONLY;
        }, 222 => function ($stackPos) {
            $this->semValue = null;
        }, 223 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 2)];
        }, 224 => function ($stackPos) {
            $this->semValue = array();
        }, 225 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 2)];
        }, 226 => function ($stackPos) {
            $this->semValue = array();
        }, 227 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 2)];
        }, 228 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 229 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 230 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 231 => function ($stackPos) {
            $this->semValue = \is_array($this->semStack[$stackPos - (1 - 1)]) ? $this->semStack[$stackPos - (1 - 1)] : array($this->semStack[$stackPos - (1 - 1)]);
        }, 232 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (4 - 2)];
        }, 233 => function ($stackPos) {
            $this->semValue = \is_array($this->semStack[$stackPos - (1 - 1)]) ? $this->semStack[$stackPos - (1 - 1)] : array($this->semStack[$stackPos - (1 - 1)]);
        }, 234 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (4 - 2)];
        }, 235 => function ($stackPos) {
            $this->semValue = \is_array($this->semStack[$stackPos - (1 - 1)]) ? $this->semStack[$stackPos - (1 - 1)] : array($this->semStack[$stackPos - (1 - 1)]);
        }, 236 => function ($stackPos) {
            $this->semValue = null;
        }, 237 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (4 - 2)];
        }, 238 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 239 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 240 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 241 => function ($stackPos) {
            $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 242 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (3 - 2)];
        }, 243 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (4 - 3)];
        }, 244 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (4 - 2)];
        }, 245 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (5 - 3)];
        }, 246 => function ($stackPos) {
            $this->semValue = array();
        }, 247 => function ($stackPos) {
            $this->semStack[$stackPos - (2 - 1)][] = $this->semStack[$stackPos - (2 - 2)];
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 248 => function ($stackPos) {
            $this->semValue = new Stmt\Case_($this->semStack[$stackPos - (4 - 2)], $this->semStack[$stackPos - (4 - 4)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 249 => function ($stackPos) {
            $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 250 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 251 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 252 => function ($stackPos) {
            $this->semValue = new Expr\Match_($this->semStack[$stackPos - (7 - 3)], $this->semStack[$stackPos - (7 - 6)], $this->startAttributeStack[$stackPos - (7 - 1)] + $this->endAttributes);
        }, 253 => function ($stackPos) {
            $this->semValue = [];
        }, 254 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 255 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 256 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 257 => function ($stackPos) {
            $this->semValue = new Node\MatchArm($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 258 => function ($stackPos) {
            $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos - (4 - 4)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 259 => function ($stackPos) {
            $this->semValue = \is_array($this->semStack[$stackPos - (1 - 1)]) ? $this->semStack[$stackPos - (1 - 1)] : array($this->semStack[$stackPos - (1 - 1)]);
        }, 260 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (4 - 2)];
        }, 261 => function ($stackPos) {
            $this->semValue = array();
        }, 262 => function ($stackPos) {
            $this->semStack[$stackPos - (2 - 1)][] = $this->semStack[$stackPos - (2 - 2)];
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 263 => function ($stackPos) {
            $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos - (5 - 3)], \is_array($this->semStack[$stackPos - (5 - 5)]) ? $this->semStack[$stackPos - (5 - 5)] : array($this->semStack[$stackPos - (5 - 5)]), $this->startAttributeStack[$stackPos - (5 - 1)] + $this->endAttributes);
        }, 264 => function ($stackPos) {
            $this->semValue = array();
        }, 265 => function ($stackPos) {
            $this->semStack[$stackPos - (2 - 1)][] = $this->semStack[$stackPos - (2 - 2)];
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 266 => function ($stackPos) {
            $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos - (6 - 3)], $this->semStack[$stackPos - (6 - 6)], $this->startAttributeStack[$stackPos - (6 - 1)] + $this->endAttributes);
            $this->fixupAlternativeElse($this->semValue);
        }, 267 => function ($stackPos) {
            $this->semValue = null;
        }, 268 => function ($stackPos) {
            $this->semValue = new Stmt\Else_(\is_array($this->semStack[$stackPos - (2 - 2)]) ? $this->semStack[$stackPos - (2 - 2)] : array($this->semStack[$stackPos - (2 - 2)]), $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 269 => function ($stackPos) {
            $this->semValue = null;
        }, 270 => function ($stackPos) {
            $this->semValue = new Stmt\Else_($this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
            $this->fixupAlternativeElse($this->semValue);
        }, 271 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)], \false);
        }, 272 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (2 - 2)], \true);
        }, 273 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)], \false);
        }, 274 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)], \false);
        }, 275 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 276 => function ($stackPos) {
            $this->semValue = array();
        }, 277 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 278 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 279 => function ($stackPos) {
            $this->semValue = 0;
        }, 280 => function ($stackPos) {
            $this->checkModifier($this->semStack[$stackPos - (2 - 1)], $this->semStack[$stackPos - (2 - 2)], $stackPos - (2 - 2));
            $this->semValue = $this->semStack[$stackPos - (2 - 1)] | $this->semStack[$stackPos - (2 - 2)];
        }, 281 => function ($stackPos) {
            $this->semValue = Stmt\Class_::MODIFIER_PUBLIC;
        }, 282 => function ($stackPos) {
            $this->semValue = Stmt\Class_::MODIFIER_PROTECTED;
        }, 283 => function ($stackPos) {
            $this->semValue = Stmt\Class_::MODIFIER_PRIVATE;
        }, 284 => function ($stackPos) {
            $this->semValue = Stmt\Class_::MODIFIER_READONLY;
        }, 285 => function ($stackPos) {
            $this->semValue = new Node\Param($this->semStack[$stackPos - (6 - 6)], null, $this->semStack[$stackPos - (6 - 3)], $this->semStack[$stackPos - (6 - 4)], $this->semStack[$stackPos - (6 - 5)], $this->startAttributeStack[$stackPos - (6 - 1)] + $this->endAttributes, $this->semStack[$stackPos - (6 - 2)], $this->semStack[$stackPos - (6 - 1)]);
            $this->checkParam($this->semValue);
        }, 286 => function ($stackPos) {
            $this->semValue = new Node\Param($this->semStack[$stackPos - (8 - 6)], $this->semStack[$stackPos - (8 - 8)], $this->semStack[$stackPos - (8 - 3)], $this->semStack[$stackPos - (8 - 4)], $this->semStack[$stackPos - (8 - 5)], $this->startAttributeStack[$stackPos - (8 - 1)] + $this->endAttributes, $this->semStack[$stackPos - (8 - 2)], $this->semStack[$stackPos - (8 - 1)]);
            $this->checkParam($this->semValue);
        }, 287 => function ($stackPos) {
            $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos - (6 - 1)] + $this->endAttributes), null, $this->semStack[$stackPos - (6 - 3)], $this->semStack[$stackPos - (6 - 4)], $this->semStack[$stackPos - (6 - 5)], $this->startAttributeStack[$stackPos - (6 - 1)] + $this->endAttributes, $this->semStack[$stackPos - (6 - 2)], $this->semStack[$stackPos - (6 - 1)]);
        }, 288 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 289 => function ($stackPos) {
            $this->semValue = new Node\NullableType($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 290 => function ($stackPos) {
            $this->semValue = new Node\UnionType($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 291 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 292 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 293 => function ($stackPos) {
            $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 294 => function ($stackPos) {
            $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos - (1 - 1)]);
        }, 295 => function ($stackPos) {
            $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 296 => function ($stackPos) {
            $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 297 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 298 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (3 - 2)];
        }, 299 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)]);
        }, 300 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 301 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 302 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (3 - 2)];
        }, 303 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)]);
        }, 304 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 305 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)]);
        }, 306 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 307 => function ($stackPos) {
            $this->semValue = new Node\IntersectionType($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 308 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)]);
        }, 309 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 310 => function ($stackPos) {
            $this->semValue = new Node\IntersectionType($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 311 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 312 => function ($stackPos) {
            $this->semValue = new Node\NullableType($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 313 => function ($stackPos) {
            $this->semValue = new Node\UnionType($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 314 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 315 => function ($stackPos) {
            $this->semValue = null;
        }, 316 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 317 => function ($stackPos) {
            $this->semValue = null;
        }, 318 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 2)];
        }, 319 => function ($stackPos) {
            $this->semValue = null;
        }, 320 => function ($stackPos) {
            $this->semValue = array();
        }, 321 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (4 - 2)];
        }, 322 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (3 - 2)]);
        }, 323 => function ($stackPos) {
            $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 324 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 325 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 326 => function ($stackPos) {
            $this->semValue = new Node\Arg($this->semStack[$stackPos - (1 - 1)], \false, \false, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 327 => function ($stackPos) {
            $this->semValue = new Node\Arg($this->semStack[$stackPos - (2 - 2)], \true, \false, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 328 => function ($stackPos) {
            $this->semValue = new Node\Arg($this->semStack[$stackPos - (2 - 2)], \false, \true, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 329 => function ($stackPos) {
            $this->semValue = new Node\Arg($this->semStack[$stackPos - (3 - 3)], \false, \false, $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes, $this->semStack[$stackPos - (3 - 1)]);
        }, 330 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 331 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 332 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 333 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 334 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 335 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 336 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 337 => function ($stackPos) {
            $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos - (1 - 1)], null, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 338 => function ($stackPos) {
            $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 339 => function ($stackPos) {
            if ($this->semStack[$stackPos - (2 - 2)] !== null) {
                $this->semStack[$stackPos - (2 - 1)][] = $this->semStack[$stackPos - (2 - 2)];
                $this->semValue = $this->semStack[$stackPos - (2 - 1)];
            }
        }, 340 => function ($stackPos) {
            $this->semValue = array();
        }, 341 => function ($stackPos) {
            $startAttributes = $this->lookaheadStartAttributes;
            if (isset($startAttributes['comments'])) {
                $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments']));
            } else {
                $nop = null;
            }
            if ($nop !== null) {
                $this->semStack[$stackPos - (1 - 1)][] = $nop;
            }
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 342 => function ($stackPos) {
            $this->semValue = new Stmt\Property($this->semStack[$stackPos - (5 - 2)], $this->semStack[$stackPos - (5 - 4)], $this->startAttributeStack[$stackPos - (5 - 1)] + $this->endAttributes, $this->semStack[$stackPos - (5 - 3)], $this->semStack[$stackPos - (5 - 1)]);
            $this->checkProperty($this->semValue, $stackPos - (5 - 2));
        }, 343 => function ($stackPos) {
            $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos - (5 - 4)], $this->semStack[$stackPos - (5 - 2)], $this->startAttributeStack[$stackPos - (5 - 1)] + $this->endAttributes, $this->semStack[$stackPos - (5 - 1)]);
            $this->checkClassConst($this->semValue, $stackPos - (5 - 2));
        }, 344 => function ($stackPos) {
            $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos - (10 - 5)], ['type' => $this->semStack[$stackPos - (10 - 2)], 'byRef' => $this->semStack[$stackPos - (10 - 4)], 'params' => $this->semStack[$stackPos - (10 - 7)], 'returnType' => $this->semStack[$stackPos - (10 - 9)], 'stmts' => $this->semStack[$stackPos - (10 - 10)], 'attrGroups' => $this->semStack[$stackPos - (10 - 1)]], $this->startAttributeStack[$stackPos - (10 - 1)] + $this->endAttributes);
            $this->checkClassMethod($this->semValue, $stackPos - (10 - 2));
        }, 345 => function ($stackPos) {
            $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos - (3 - 2)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 346 => function ($stackPos) {
            $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos - (5 - 3)], $this->semStack[$stackPos - (5 - 4)], $this->semStack[$stackPos - (5 - 1)], $this->startAttributeStack[$stackPos - (5 - 1)] + $this->endAttributes);
        }, 347 => function ($stackPos) {
            $this->semValue = null;
            /* will be skipped */
        }, 348 => function ($stackPos) {
            $this->semValue = array();
        }, 349 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (3 - 2)];
        }, 350 => function ($stackPos) {
            $this->semValue = array();
        }, 351 => function ($stackPos) {
            $this->semStack[$stackPos - (2 - 1)][] = $this->semStack[$stackPos - (2 - 2)];
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 352 => function ($stackPos) {
            $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos - (4 - 1)][0], $this->semStack[$stackPos - (4 - 1)][1], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 353 => function ($stackPos) {
            $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos - (5 - 1)][0], $this->semStack[$stackPos - (5 - 1)][1], $this->semStack[$stackPos - (5 - 3)], $this->semStack[$stackPos - (5 - 4)], $this->startAttributeStack[$stackPos - (5 - 1)] + $this->endAttributes);
        }, 354 => function ($stackPos) {
            $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos - (4 - 1)][0], $this->semStack[$stackPos - (4 - 1)][1], $this->semStack[$stackPos - (4 - 3)], null, $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 355 => function ($stackPos) {
            $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos - (4 - 1)][0], $this->semStack[$stackPos - (4 - 1)][1], null, $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 356 => function ($stackPos) {
            $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos - (4 - 1)][0], $this->semStack[$stackPos - (4 - 1)][1], null, $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 357 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)]);
        }, 358 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 359 => function ($stackPos) {
            $this->semValue = array(null, $this->semStack[$stackPos - (1 - 1)]);
        }, 360 => function ($stackPos) {
            $this->semValue = null;
        }, 361 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 362 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 363 => function ($stackPos) {
            $this->semValue = 0;
        }, 364 => function ($stackPos) {
            $this->semValue = 0;
        }, 365 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 366 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 367 => function ($stackPos) {
            $this->checkModifier($this->semStack[$stackPos - (2 - 1)], $this->semStack[$stackPos - (2 - 2)], $stackPos - (2 - 2));
            $this->semValue = $this->semStack[$stackPos - (2 - 1)] | $this->semStack[$stackPos - (2 - 2)];
        }, 368 => function ($stackPos) {
            $this->semValue = Stmt\Class_::MODIFIER_PUBLIC;
        }, 369 => function ($stackPos) {
            $this->semValue = Stmt\Class_::MODIFIER_PROTECTED;
        }, 370 => function ($stackPos) {
            $this->semValue = Stmt\Class_::MODIFIER_PRIVATE;
        }, 371 => function ($stackPos) {
            $this->semValue = Stmt\Class_::MODIFIER_STATIC;
        }, 372 => function ($stackPos) {
            $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT;
        }, 373 => function ($stackPos) {
            $this->semValue = Stmt\Class_::MODIFIER_FINAL;
        }, 374 => function ($stackPos) {
            $this->semValue = Stmt\Class_::MODIFIER_READONLY;
        }, 375 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 376 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 377 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 378 => function ($stackPos) {
            $this->semValue = new Node\VarLikeIdentifier(\substr($this->semStack[$stackPos - (1 - 1)], 1), $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 379 => function ($stackPos) {
            $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos - (1 - 1)], null, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 380 => function ($stackPos) {
            $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 381 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 382 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 383 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 384 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 385 => function ($stackPos) {
            $this->semValue = array();
        }, 386 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 387 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 388 => function ($stackPos) {
            $this->semValue = new Expr\Assign($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 389 => function ($stackPos) {
            $this->semValue = new Expr\Assign($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 390 => function ($stackPos) {
            $this->semValue = new Expr\Assign($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 391 => function ($stackPos) {
            $this->semValue = new Expr\AssignRef($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 4)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 392 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 393 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 394 => function ($stackPos) {
            $this->semValue = new Expr\Clone_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 395 => function ($stackPos) {
            $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 396 => function ($stackPos) {
            $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 397 => function ($stackPos) {
            $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 398 => function ($stackPos) {
            $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 399 => function ($stackPos) {
            $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 400 => function ($stackPos) {
            $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 401 => function ($stackPos) {
            $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 402 => function ($stackPos) {
            $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 403 => function ($stackPos) {
            $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 404 => function ($stackPos) {
            $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 405 => function ($stackPos) {
            $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 406 => function ($stackPos) {
            $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 407 => function ($stackPos) {
            $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 408 => function ($stackPos) {
            $this->semValue = new Expr\PostInc($this->semStack[$stackPos - (2 - 1)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 409 => function ($stackPos) {
            $this->semValue = new Expr\PreInc($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 410 => function ($stackPos) {
            $this->semValue = new Expr\PostDec($this->semStack[$stackPos - (2 - 1)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 411 => function ($stackPos) {
            $this->semValue = new Expr\PreDec($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 412 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 413 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 414 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 415 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 416 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 417 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 418 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 419 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 420 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 421 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 422 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 423 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 424 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 425 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 426 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 427 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 428 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 429 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 430 => function ($stackPos) {
            $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 431 => function ($stackPos) {
            $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 432 => function ($stackPos) {
            $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 433 => function ($stackPos) {
            $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 434 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 435 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 436 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 437 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 438 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 439 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 440 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 441 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 442 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 443 => function ($stackPos) {
            $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 444 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (3 - 2)];
        }, 445 => function ($stackPos) {
            $this->semValue = new Expr\Ternary($this->semStack[$stackPos - (5 - 1)], $this->semStack[$stackPos - (5 - 3)], $this->semStack[$stackPos - (5 - 5)], $this->startAttributeStack[$stackPos - (5 - 1)] + $this->endAttributes);
        }, 446 => function ($stackPos) {
            $this->semValue = new Expr\Ternary($this->semStack[$stackPos - (4 - 1)], null, $this->semStack[$stackPos - (4 - 4)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 447 => function ($stackPos) {
            $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 448 => function ($stackPos) {
            $this->semValue = new Expr\Isset_($this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 449 => function ($stackPos) {
            $this->semValue = new Expr\Empty_($this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 450 => function ($stackPos) {
            $this->semValue = new Expr\Include_($this->semStack[$stackPos - (2 - 2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 451 => function ($stackPos) {
            $this->semValue = new Expr\Include_($this->semStack[$stackPos - (2 - 2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 452 => function ($stackPos) {
            $this->semValue = new Expr\Eval_($this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 453 => function ($stackPos) {
            $this->semValue = new Expr\Include_($this->semStack[$stackPos - (2 - 2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 454 => function ($stackPos) {
            $this->semValue = new Expr\Include_($this->semStack[$stackPos - (2 - 2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 455 => function ($stackPos) {
            $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 456 => function ($stackPos) {
            $attrs = $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes;
            $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos - (2 - 1)]);
            $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos - (2 - 2)], $attrs);
        }, 457 => function ($stackPos) {
            $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 458 => function ($stackPos) {
            $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 459 => function ($stackPos) {
            $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 460 => function ($stackPos) {
            $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 461 => function ($stackPos) {
            $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 462 => function ($stackPos) {
            $attrs = $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes;
            $attrs['kind'] = \strtolower($this->semStack[$stackPos - (2 - 1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE;
            $this->semValue = new Expr\Exit_($this->semStack[$stackPos - (2 - 2)], $attrs);
        }, 463 => function ($stackPos) {
            $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 464 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 465 => function ($stackPos) {
            $this->semValue = new Expr\ShellExec($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 466 => function ($stackPos) {
            $this->semValue = new Expr\Print_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 467 => function ($stackPos) {
            $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 468 => function ($stackPos) {
            $this->semValue = new Expr\Yield_($this->semStack[$stackPos - (2 - 2)], null, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 469 => function ($stackPos) {
            $this->semValue = new Expr\Yield_($this->semStack[$stackPos - (4 - 4)], $this->semStack[$stackPos - (4 - 2)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 470 => function ($stackPos) {
            $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 471 => function ($stackPos) {
            $this->semValue = new Expr\Throw_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 472 => function ($stackPos) {
            $this->semValue = new Expr\ArrowFunction(['static' => \false, 'byRef' => $this->semStack[$stackPos - (8 - 2)], 'params' => $this->semStack[$stackPos - (8 - 4)], 'returnType' => $this->semStack[$stackPos - (8 - 6)], 'expr' => $this->semStack[$stackPos - (8 - 8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos - (8 - 1)] + $this->endAttributes);
        }, 473 => function ($stackPos) {
            $this->semValue = new Expr\ArrowFunction(['static' => \true, 'byRef' => $this->semStack[$stackPos - (9 - 3)], 'params' => $this->semStack[$stackPos - (9 - 5)], 'returnType' => $this->semStack[$stackPos - (9 - 7)], 'expr' => $this->semStack[$stackPos - (9 - 9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos - (9 - 1)] + $this->endAttributes);
        }, 474 => function ($stackPos) {
            $this->semValue = new Expr\Closure(['static' => \false, 'byRef' => $this->semStack[$stackPos - (8 - 2)], 'params' => $this->semStack[$stackPos - (8 - 4)], 'uses' => $this->semStack[$stackPos - (8 - 6)], 'returnType' => $this->semStack[$stackPos - (8 - 7)], 'stmts' => $this->semStack[$stackPos - (8 - 8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos - (8 - 1)] + $this->endAttributes);
        }, 475 => function ($stackPos) {
            $this->semValue = new Expr\Closure(['static' => \true, 'byRef' => $this->semStack[$stackPos - (9 - 3)], 'params' => $this->semStack[$stackPos - (9 - 5)], 'uses' => $this->semStack[$stackPos - (9 - 7)], 'returnType' => $this->semStack[$stackPos - (9 - 8)], 'stmts' => $this->semStack[$stackPos - (9 - 9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos - (9 - 1)] + $this->endAttributes);
        }, 476 => function ($stackPos) {
            $this->semValue = new Expr\ArrowFunction(['static' => \false, 'byRef' => $this->semStack[$stackPos - (9 - 3)], 'params' => $this->semStack[$stackPos - (9 - 5)], 'returnType' => $this->semStack[$stackPos - (9 - 7)], 'expr' => $this->semStack[$stackPos - (9 - 9)], 'attrGroups' => $this->semStack[$stackPos - (9 - 1)]], $this->startAttributeStack[$stackPos - (9 - 1)] + $this->endAttributes);
        }, 477 => function ($stackPos) {
            $this->semValue = new Expr\ArrowFunction(['static' => \true, 'byRef' => $this->semStack[$stackPos - (10 - 4)], 'params' => $this->semStack[$stackPos - (10 - 6)], 'returnType' => $this->semStack[$stackPos - (10 - 8)], 'expr' => $this->semStack[$stackPos - (10 - 10)], 'attrGroups' => $this->semStack[$stackPos - (10 - 1)]], $this->startAttributeStack[$stackPos - (10 - 1)] + $this->endAttributes);
        }, 478 => function ($stackPos) {
            $this->semValue = new Expr\Closure(['static' => \false, 'byRef' => $this->semStack[$stackPos - (9 - 3)], 'params' => $this->semStack[$stackPos - (9 - 5)], 'uses' => $this->semStack[$stackPos - (9 - 7)], 'returnType' => $this->semStack[$stackPos - (9 - 8)], 'stmts' => $this->semStack[$stackPos - (9 - 9)], 'attrGroups' => $this->semStack[$stackPos - (9 - 1)]], $this->startAttributeStack[$stackPos - (9 - 1)] + $this->endAttributes);
        }, 479 => function ($stackPos) {
            $this->semValue = new Expr\Closure(['static' => \true, 'byRef' => $this->semStack[$stackPos - (10 - 4)], 'params' => $this->semStack[$stackPos - (10 - 6)], 'uses' => $this->semStack[$stackPos - (10 - 8)], 'returnType' => $this->semStack[$stackPos - (10 - 9)], 'stmts' => $this->semStack[$stackPos - (10 - 10)], 'attrGroups' => $this->semStack[$stackPos - (10 - 1)]], $this->startAttributeStack[$stackPos - (10 - 1)] + $this->endAttributes);
        }, 480 => function ($stackPos) {
            $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos - (8 - 4)], 'implements' => $this->semStack[$stackPos - (8 - 5)], 'stmts' => $this->semStack[$stackPos - (8 - 7)], 'attrGroups' => $this->semStack[$stackPos - (8 - 1)]], $this->startAttributeStack[$stackPos - (8 - 1)] + $this->endAttributes), $this->semStack[$stackPos - (8 - 3)]);
            $this->checkClass($this->semValue[0], -1);
        }, 481 => function ($stackPos) {
            $this->semValue = new Expr\New_($this->semStack[$stackPos - (3 - 2)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 482 => function ($stackPos) {
            list($class, $ctorArgs) = $this->semStack[$stackPos - (2 - 2)];
            $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 483 => function ($stackPos) {
            $this->semValue = array();
        }, 484 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (4 - 3)];
        }, 485 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 486 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 487 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 488 => function ($stackPos) {
            $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos - (2 - 2)], $this->semStack[$stackPos - (2 - 1)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 489 => function ($stackPos) {
            $this->semValue = new Name($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 490 => function ($stackPos) {
            $this->semValue = new Expr\FuncCall($this->semStack[$stackPos - (2 - 1)], $this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 491 => function ($stackPos) {
            $this->semValue = new Expr\FuncCall($this->semStack[$stackPos - (2 - 1)], $this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 492 => function ($stackPos) {
            $this->semValue = new Expr\FuncCall($this->semStack[$stackPos - (2 - 1)], $this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 493 => function ($stackPos) {
            $this->semValue = new Expr\StaticCall($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->semStack[$stackPos - (4 - 4)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 494 => function ($stackPos) {
            $this->semValue = new Name($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 495 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 496 => function ($stackPos) {
            $this->semValue = new Name($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 497 => function ($stackPos) {
            $this->semValue = new Name($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 498 => function ($stackPos) {
            $this->semValue = new Name\FullyQualified(\substr($this->semStack[$stackPos - (1 - 1)], 1), $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 499 => function ($stackPos) {
            $this->semValue = new Name\Relative(\substr($this->semStack[$stackPos - (1 - 1)], 10), $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 500 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 501 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 502 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (3 - 2)];
        }, 503 => function ($stackPos) {
            $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
            $this->errorState = 2;
        }, 504 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 505 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 506 => function ($stackPos) {
            $this->semValue = null;
        }, 507 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (3 - 2)];
        }, 508 => function ($stackPos) {
            $this->semValue = array();
        }, 509 => function ($stackPos) {
            $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos - (1 - 1)], '`'), $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes));
        }, 510 => function ($stackPos) {
            foreach ($this->semStack[$stackPos - (1 - 1)] as $s) {
                if ($s instanceof Node\Scalar\EncapsedStringPart) {
                    $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', \true);
                }
            }
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 511 => function ($stackPos) {
            $this->semValue = array();
        }, 512 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 513 => function ($stackPos) {
            $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 514 => function ($stackPos) {
            $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 515 => function ($stackPos) {
            $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 516 => function ($stackPos) {
            $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 517 => function ($stackPos) {
            $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 518 => function ($stackPos) {
            $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 519 => function ($stackPos) {
            $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 520 => function ($stackPos) {
            $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 521 => function ($stackPos) {
            $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 522 => function ($stackPos) {
            $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 523 => function ($stackPos) {
            $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos - (3 - 1)], new Expr\Error($this->startAttributeStack[$stackPos - (3 - 3)] + $this->endAttributeStack[$stackPos - (3 - 3)]), $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
            $this->errorState = 2;
        }, 524 => function ($stackPos) {
            $attrs = $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes;
            $attrs['kind'] = Expr\Array_::KIND_SHORT;
            $this->semValue = new Expr\Array_($this->semStack[$stackPos - (3 - 2)], $attrs);
        }, 525 => function ($stackPos) {
            $attrs = $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes;
            $attrs['kind'] = Expr\Array_::KIND_LONG;
            $this->semValue = new Expr\Array_($this->semStack[$stackPos - (4 - 3)], $attrs);
        }, 526 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 527 => function ($stackPos) {
            $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 528 => function ($stackPos) {
            $attrs = $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes;
            $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED;
            foreach ($this->semStack[$stackPos - (3 - 2)] as $s) {
                if ($s instanceof Node\Scalar\EncapsedStringPart) {
                    $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', \true);
                }
            }
            $this->semValue = new Scalar\Encapsed($this->semStack[$stackPos - (3 - 2)], $attrs);
        }, 529 => function ($stackPos) {
            $this->semValue = $this->parseLNumber($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 530 => function ($stackPos) {
            $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 531 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 532 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 533 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 534 => function ($stackPos) {
            $this->semValue = $this->parseDocString($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 2)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes, $this->startAttributeStack[$stackPos - (3 - 3)] + $this->endAttributeStack[$stackPos - (3 - 3)], \true);
        }, 535 => function ($stackPos) {
            $this->semValue = $this->parseDocString($this->semStack[$stackPos - (2 - 1)], '', $this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes, $this->startAttributeStack[$stackPos - (2 - 2)] + $this->endAttributeStack[$stackPos - (2 - 2)], \true);
        }, 536 => function ($stackPos) {
            $this->semValue = $this->parseDocString($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 2)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes, $this->startAttributeStack[$stackPos - (3 - 3)] + $this->endAttributeStack[$stackPos - (3 - 3)], \true);
        }, 537 => function ($stackPos) {
            $this->semValue = null;
        }, 538 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 539 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 540 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (3 - 2)];
        }, 541 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 542 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 543 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 544 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 545 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 546 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (3 - 2)];
        }, 547 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 548 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 549 => function ($stackPos) {
            $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 550 => function ($stackPos) {
            $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 551 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 552 => function ($stackPos) {
            $this->semValue = new Expr\MethodCall($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->semStack[$stackPos - (4 - 4)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 553 => function ($stackPos) {
            $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->semStack[$stackPos - (4 - 4)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 554 => function ($stackPos) {
            $this->semValue = null;
        }, 555 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 556 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 557 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 558 => function ($stackPos) {
            $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 559 => function ($stackPos) {
            $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 560 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 561 => function ($stackPos) {
            $this->semValue = new Expr\Variable($this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 562 => function ($stackPos) {
            $this->semValue = new Expr\Variable($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 563 => function ($stackPos) {
            $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes), $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
            $this->errorState = 2;
        }, 564 => function ($stackPos) {
            $var = $this->semStack[$stackPos - (1 - 1)]->name;
            $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes) : $var;
        }, 565 => function ($stackPos) {
            $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 566 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 567 => function ($stackPos) {
            $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 568 => function ($stackPos) {
            $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 569 => function ($stackPos) {
            $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 570 => function ($stackPos) {
            $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 571 => function ($stackPos) {
            $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 572 => function ($stackPos) {
            $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 573 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 574 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (3 - 2)];
        }, 575 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 576 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 577 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (3 - 2)];
        }, 578 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 579 => function ($stackPos) {
            $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
            $this->errorState = 2;
        }, 580 => function ($stackPos) {
            $this->semValue = new Expr\List_($this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 581 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
            $end = \count($this->semValue) - 1;
            if ($this->semValue[$end] === null) {
                \array_pop($this->semValue);
            }
        }, 582 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos];
        }, 583 => function ($stackPos) {
            /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */
        }, 584 => function ($stackPos) {
            $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)];
            $this->semValue = $this->semStack[$stackPos - (3 - 1)];
        }, 585 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 586 => function ($stackPos) {
            $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos - (1 - 1)], null, \false, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 587 => function ($stackPos) {
            $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos - (2 - 2)], null, \true, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 588 => function ($stackPos) {
            $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos - (1 - 1)], null, \false, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 589 => function ($stackPos) {
            $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos - (3 - 3)], $this->semStack[$stackPos - (3 - 1)], \false, $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 590 => function ($stackPos) {
            $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos - (4 - 4)], $this->semStack[$stackPos - (4 - 1)], \true, $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 591 => function ($stackPos) {
            $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos - (3 - 3)], $this->semStack[$stackPos - (3 - 1)], \false, $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 592 => function ($stackPos) {
            $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos - (2 - 2)], null, \false, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes, \true, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 593 => function ($stackPos) {
            $this->semValue = null;
        }, 594 => function ($stackPos) {
            $this->semStack[$stackPos - (2 - 1)][] = $this->semStack[$stackPos - (2 - 2)];
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 595 => function ($stackPos) {
            $this->semStack[$stackPos - (2 - 1)][] = $this->semStack[$stackPos - (2 - 2)];
            $this->semValue = $this->semStack[$stackPos - (2 - 1)];
        }, 596 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (1 - 1)]);
        }, 597 => function ($stackPos) {
            $this->semValue = array($this->semStack[$stackPos - (2 - 1)], $this->semStack[$stackPos - (2 - 2)]);
        }, 598 => function ($stackPos) {
            $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 599 => function ($stackPos) {
            $this->semValue = new Expr\Variable($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 600 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }, 601 => function ($stackPos) {
            $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes);
        }, 602 => function ($stackPos) {
            $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 603 => function ($stackPos) {
            $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 604 => function ($stackPos) {
            $this->semValue = new Expr\Variable($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 605 => function ($stackPos) {
            $this->semValue = new Expr\Variable($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes);
        }, 606 => function ($stackPos) {
            $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos - (6 - 2)], $this->semStack[$stackPos - (6 - 4)], $this->startAttributeStack[$stackPos - (6 - 1)] + $this->endAttributes);
        }, 607 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (3 - 2)];
        }, 608 => function ($stackPos) {
            $this->semValue = new Scalar\String_($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 609 => function ($stackPos) {
            $this->semValue = $this->parseNumString($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes);
        }, 610 => function ($stackPos) {
            $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes);
        }, 611 => function ($stackPos) {
            $this->semValue = $this->semStack[$stackPos - (1 - 1)];
        }];
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Parser;

use PhpParser\Error;
use PhpParser\ErrorHandler;
use PhpParser\Parser;
class Multiple implements Parser
{
    /** @var Parser[] List of parsers to try, in order of preference */
    private $parsers;
    /**
     * Create a parser which will try multiple parsers in an order of preference.
     *
     * Parsers will be invoked in the order they're provided to the constructor. If one of the
     * parsers runs without throwing, it's output is returned. Otherwise the exception that the
     * first parser generated is thrown.
     *
     * @param Parser[] $parsers
     */
    public function __construct(array $parsers)
    {
        $this->parsers = $parsers;
    }
    public function parse(string $code, ErrorHandler $errorHandler = null)
    {
        if (null === $errorHandler) {
            $errorHandler = new ErrorHandler\Throwing();
        }
        list($firstStmts, $firstError) = $this->tryParse($this->parsers[0], $errorHandler, $code);
        if ($firstError === null) {
            return $firstStmts;
        }
        for ($i = 1, $c = \count($this->parsers); $i < $c; ++$i) {
            list($stmts, $error) = $this->tryParse($this->parsers[$i], $errorHandler, $code);
            if ($error === null) {
                return $stmts;
            }
        }
        throw $firstError;
    }
    private function tryParse(Parser $parser, ErrorHandler $errorHandler, $code)
    {
        $stmts = null;
        $error = null;
        try {
            $stmts = $parser->parse($code, $errorHandler);
        } catch (Error $error) {
        }
        return [$stmts, $error];
    }
}
<?php

namespace PhpParser\Parser;

/* GENERATED file based on grammar/tokens.y */
final class Tokens
{
    const YYERRTOK = 256;
    const T_THROW = 257;
    const T_INCLUDE = 258;
    const T_INCLUDE_ONCE = 259;
    const T_EVAL = 260;
    const T_REQUIRE = 261;
    const T_REQUIRE_ONCE = 262;
    const T_LOGICAL_OR = 263;
    const T_LOGICAL_XOR = 264;
    const T_LOGICAL_AND = 265;
    const T_PRINT = 266;
    const T_YIELD = 267;
    const T_DOUBLE_ARROW = 268;
    const T_YIELD_FROM = 269;
    const T_PLUS_EQUAL = 270;
    const T_MINUS_EQUAL = 271;
    const T_MUL_EQUAL = 272;
    const T_DIV_EQUAL = 273;
    const T_CONCAT_EQUAL = 274;
    const T_MOD_EQUAL = 275;
    const T_AND_EQUAL = 276;
    const T_OR_EQUAL = 277;
    const T_XOR_EQUAL = 278;
    const T_SL_EQUAL = 279;
    const T_SR_EQUAL = 280;
    const T_POW_EQUAL = 281;
    const T_COALESCE_EQUAL = 282;
    const T_COALESCE = 283;
    const T_BOOLEAN_OR = 284;
    const T_BOOLEAN_AND = 285;
    const T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG = 286;
    const T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG = 287;
    const T_IS_EQUAL = 288;
    const T_IS_NOT_EQUAL = 289;
    const T_IS_IDENTICAL = 290;
    const T_IS_NOT_IDENTICAL = 291;
    const T_SPACESHIP = 292;
    const T_IS_SMALLER_OR_EQUAL = 293;
    const T_IS_GREATER_OR_EQUAL = 294;
    const T_SL = 295;
    const T_SR = 296;
    const T_INSTANCEOF = 297;
    const T_INC = 298;
    const T_DEC = 299;
    const T_INT_CAST = 300;
    const T_DOUBLE_CAST = 301;
    const T_STRING_CAST = 302;
    const T_ARRAY_CAST = 303;
    const T_OBJECT_CAST = 304;
    const T_BOOL_CAST = 305;
    const T_UNSET_CAST = 306;
    const T_POW = 307;
    const T_NEW = 308;
    const T_CLONE = 309;
    const T_EXIT = 310;
    const T_IF = 311;
    const T_ELSEIF = 312;
    const T_ELSE = 313;
    const T_ENDIF = 314;
    const T_LNUMBER = 315;
    const T_DNUMBER = 316;
    const T_STRING = 317;
    const T_STRING_VARNAME = 318;
    const T_VARIABLE = 319;
    const T_NUM_STRING = 320;
    const T_INLINE_HTML = 321;
    const T_ENCAPSED_AND_WHITESPACE = 322;
    const T_CONSTANT_ENCAPSED_STRING = 323;
    const T_ECHO = 324;
    const T_DO = 325;
    const T_WHILE = 326;
    const T_ENDWHILE = 327;
    const T_FOR = 328;
    const T_ENDFOR = 329;
    const T_FOREACH = 330;
    const T_ENDFOREACH = 331;
    const T_DECLARE = 332;
    const T_ENDDECLARE = 333;
    const T_AS = 334;
    const T_SWITCH = 335;
    const T_MATCH = 336;
    const T_ENDSWITCH = 337;
    const T_CASE = 338;
    const T_DEFAULT = 339;
    const T_BREAK = 340;
    const T_CONTINUE = 341;
    const T_GOTO = 342;
    const T_FUNCTION = 343;
    const T_FN = 344;
    const T_CONST = 345;
    const T_RETURN = 346;
    const T_TRY = 347;
    const T_CATCH = 348;
    const T_FINALLY = 349;
    const T_USE = 350;
    const T_INSTEADOF = 351;
    const T_GLOBAL = 352;
    const T_STATIC = 353;
    const T_ABSTRACT = 354;
    const T_FINAL = 355;
    const T_PRIVATE = 356;
    const T_PROTECTED = 357;
    const T_PUBLIC = 358;
    const T_READONLY = 359;
    const T_VAR = 360;
    const T_UNSET = 361;
    const T_ISSET = 362;
    const T_EMPTY = 363;
    const T_HALT_COMPILER = 364;
    const T_CLASS = 365;
    const T_TRAIT = 366;
    const T_INTERFACE = 367;
    const T_ENUM = 368;
    const T_EXTENDS = 369;
    const T_IMPLEMENTS = 370;
    const T_OBJECT_OPERATOR = 371;
    const T_NULLSAFE_OBJECT_OPERATOR = 372;
    const T_LIST = 373;
    const T_ARRAY = 374;
    const T_CALLABLE = 375;
    const T_CLASS_C = 376;
    const T_TRAIT_C = 377;
    const T_METHOD_C = 378;
    const T_FUNC_C = 379;
    const T_LINE = 380;
    const T_FILE = 381;
    const T_START_HEREDOC = 382;
    const T_END_HEREDOC = 383;
    const T_DOLLAR_OPEN_CURLY_BRACES = 384;
    const T_CURLY_OPEN = 385;
    const T_PAAMAYIM_NEKUDOTAYIM = 386;
    const T_NAMESPACE = 387;
    const T_NS_C = 388;
    const T_DIR = 389;
    const T_NS_SEPARATOR = 390;
    const T_ELLIPSIS = 391;
    const T_NAME_FULLY_QUALIFIED = 392;
    const T_NAME_QUALIFIED = 393;
    const T_NAME_RELATIVE = 394;
    const T_ATTRIBUTE = 395;
}
<?php

declare (strict_types=1);
namespace PhpParser\PrettyPrinter;

use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\AssignOp;
use PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\Cast;
use PhpParser\Node\Name;
use PhpParser\Node\Scalar;
use PhpParser\Node\Scalar\MagicConst;
use PhpParser\Node\Stmt;
use PhpParser\PrettyPrinterAbstract;
class Standard extends PrettyPrinterAbstract
{
    // Special nodes
    protected function pParam(Node\Param $node)
    {
        return $this->pAttrGroups($node->attrGroups, \true) . $this->pModifiers($node->flags) . ($node->type ? $this->p($node->type) . ' ' : '') . ($node->byRef ? '&' : '') . ($node->variadic ? '...' : '') . $this->p($node->var) . ($node->default ? ' = ' . $this->p($node->default) : '');
    }
    protected function pArg(Node\Arg $node)
    {
        return ($node->name ? $node->name->toString() . ': ' : '') . ($node->byRef ? '&' : '') . ($node->unpack ? '...' : '') . $this->p($node->value);
    }
    protected function pVariadicPlaceholder(Node\VariadicPlaceholder $node)
    {
        return '...';
    }
    protected function pConst(Node\Const_ $node)
    {
        return $node->name . ' = ' . $this->p($node->value);
    }
    protected function pNullableType(Node\NullableType $node)
    {
        return '?' . $this->p($node->type);
    }
    protected function pUnionType(Node\UnionType $node)
    {
        $types = [];
        foreach ($node->types as $typeNode) {
            if ($typeNode instanceof Node\IntersectionType) {
                $types[] = '(' . $this->p($typeNode) . ')';
                continue;
            }
            $types[] = $this->p($typeNode);
        }
        return \implode('|', $types);
    }
    protected function pIntersectionType(Node\IntersectionType $node)
    {
        return $this->pImplode($node->types, '&');
    }
    protected function pIdentifier(Node\Identifier $node)
    {
        return $node->name;
    }
    protected function pVarLikeIdentifier(Node\VarLikeIdentifier $node)
    {
        return '$' . $node->name;
    }
    protected function pAttribute(Node\Attribute $node)
    {
        return $this->p($node->name) . ($node->args ? '(' . $this->pCommaSeparated($node->args) . ')' : '');
    }
    protected function pAttributeGroup(Node\AttributeGroup $node)
    {
        return '#[' . $this->pCommaSeparated($node->attrs) . ']';
    }
    // Names
    protected function pName(Name $node)
    {
        return \implode('\\', $node->parts);
    }
    protected function pName_FullyQualified(Name\FullyQualified $node)
    {
        return '\\' . \implode('\\', $node->parts);
    }
    protected function pName_Relative(Name\Relative $node)
    {
        return 'namespace\\' . \implode('\\', $node->parts);
    }
    // Magic Constants
    protected function pScalar_MagicConst_Class(MagicConst\Class_ $node)
    {
        return '__CLASS__';
    }
    protected function pScalar_MagicConst_Dir(MagicConst\Dir $node)
    {
        return '__DIR__';
    }
    protected function pScalar_MagicConst_File(MagicConst\File $node)
    {
        return '__FILE__';
    }
    protected function pScalar_MagicConst_Function(MagicConst\Function_ $node)
    {
        return '__FUNCTION__';
    }
    protected function pScalar_MagicConst_Line(MagicConst\Line $node)
    {
        return '__LINE__';
    }
    protected function pScalar_MagicConst_Method(MagicConst\Method $node)
    {
        return '__METHOD__';
    }
    protected function pScalar_MagicConst_Namespace(MagicConst\Namespace_ $node)
    {
        return '__NAMESPACE__';
    }
    protected function pScalar_MagicConst_Trait(MagicConst\Trait_ $node)
    {
        return '__TRAIT__';
    }
    // Scalars
    protected function pScalar_String(Scalar\String_ $node)
    {
        $kind = $node->getAttribute('kind', Scalar\String_::KIND_SINGLE_QUOTED);
        switch ($kind) {
            case Scalar\String_::KIND_NOWDOC:
                $label = $node->getAttribute('docLabel');
                if ($label && !$this->containsEndLabel($node->value, $label)) {
                    if ($node->value === '') {
                        return "<<<'{$label}'\n{$label}" . $this->docStringEndToken;
                    }
                    return "<<<'{$label}'\n{$node->value}\n{$label}" . $this->docStringEndToken;
                }
            /* break missing intentionally */
            case Scalar\String_::KIND_SINGLE_QUOTED:
                return $this->pSingleQuotedString($node->value);
            case Scalar\String_::KIND_HEREDOC:
                $label = $node->getAttribute('docLabel');
                if ($label && !$this->containsEndLabel($node->value, $label)) {
                    if ($node->value === '') {
                        return "<<<{$label}\n{$label}" . $this->docStringEndToken;
                    }
                    $escaped = $this->escapeString($node->value, null);
                    return "<<<{$label}\n" . $escaped . "\n{$label}" . $this->docStringEndToken;
                }
            /* break missing intentionally */
            case Scalar\String_::KIND_DOUBLE_QUOTED:
                return '"' . $this->escapeString($node->value, '"') . '"';
        }
        throw new \Exception('Invalid string kind');
    }
    protected function pScalar_Encapsed(Scalar\Encapsed $node)
    {
        if ($node->getAttribute('kind') === Scalar\String_::KIND_HEREDOC) {
            $label = $node->getAttribute('docLabel');
            if ($label && !$this->encapsedContainsEndLabel($node->parts, $label)) {
                if (\count($node->parts) === 1 && $node->parts[0] instanceof Scalar\EncapsedStringPart && $node->parts[0]->value === '') {
                    return "<<<{$label}\n{$label}" . $this->docStringEndToken;
                }
                return "<<<{$label}\n" . $this->pEncapsList($node->parts, null) . "\n{$label}" . $this->docStringEndToken;
            }
        }
        return '"' . $this->pEncapsList($node->parts, '"') . '"';
    }
    protected function pScalar_LNumber(Scalar\LNumber $node)
    {
        if ($node->value === -\PHP_INT_MAX - 1) {
            // PHP_INT_MIN cannot be represented as a literal,
            // because the sign is not part of the literal
            return '(-' . \PHP_INT_MAX . '-1)';
        }
        $kind = $node->getAttribute('kind', Scalar\LNumber::KIND_DEC);
        if (Scalar\LNumber::KIND_DEC === $kind) {
            return (string) $node->value;
        }
        if ($node->value < 0) {
            $sign = '-';
            $str = (string) -$node->value;
        } else {
            $sign = '';
            $str = (string) $node->value;
        }
        switch ($kind) {
            case Scalar\LNumber::KIND_BIN:
                return $sign . '0b' . \base_convert($str, 10, 2);
            case Scalar\LNumber::KIND_OCT:
                return $sign . '0' . \base_convert($str, 10, 8);
            case Scalar\LNumber::KIND_HEX:
                return $sign . '0x' . \base_convert($str, 10, 16);
        }
        throw new \Exception('Invalid number kind');
    }
    protected function pScalar_DNumber(Scalar\DNumber $node)
    {
        if (!\is_finite($node->value)) {
            if ($node->value === \INF) {
                return '\\INF';
            } elseif ($node->value === -\INF) {
                return '-\\INF';
            } else {
                return '\\NAN';
            }
        }
        // Try to find a short full-precision representation
        $stringValue = \sprintf('%.16G', $node->value);
        if ($node->value !== (double) $stringValue) {
            $stringValue = \sprintf('%.17G', $node->value);
        }
        // %G is locale dependent and there exists no locale-independent alternative. We don't want
        // mess with switching locales here, so let's assume that a comma is the only non-standard
        // decimal separator we may encounter...
        $stringValue = \str_replace(',', '.', $stringValue);
        // ensure that number is really printed as float
        return \preg_match('/^-?[0-9]+$/', $stringValue) ? $stringValue . '.0' : $stringValue;
    }
    protected function pScalar_EncapsedStringPart(Scalar\EncapsedStringPart $node)
    {
        throw new \LogicException('Cannot directly print EncapsedStringPart');
    }
    // Assignments
    protected function pExpr_Assign(Expr\Assign $node)
    {
        return $this->pInfixOp(Expr\Assign::class, $node->var, ' = ', $node->expr);
    }
    protected function pExpr_AssignRef(Expr\AssignRef $node)
    {
        return $this->pInfixOp(Expr\AssignRef::class, $node->var, ' =& ', $node->expr);
    }
    protected function pExpr_AssignOp_Plus(AssignOp\Plus $node)
    {
        return $this->pInfixOp(AssignOp\Plus::class, $node->var, ' += ', $node->expr);
    }
    protected function pExpr_AssignOp_Minus(AssignOp\Minus $node)
    {
        return $this->pInfixOp(AssignOp\Minus::class, $node->var, ' -= ', $node->expr);
    }
    protected function pExpr_AssignOp_Mul(AssignOp\Mul $node)
    {
        return $this->pInfixOp(AssignOp\Mul::class, $node->var, ' *= ', $node->expr);
    }
    protected function pExpr_AssignOp_Div(AssignOp\Div $node)
    {
        return $this->pInfixOp(AssignOp\Div::class, $node->var, ' /= ', $node->expr);
    }
    protected function pExpr_AssignOp_Concat(AssignOp\Concat $node)
    {
        return $this->pInfixOp(AssignOp\Concat::class, $node->var, ' .= ', $node->expr);
    }
    protected function pExpr_AssignOp_Mod(AssignOp\Mod $node)
    {
        return $this->pInfixOp(AssignOp\Mod::class, $node->var, ' %= ', $node->expr);
    }
    protected function pExpr_AssignOp_BitwiseAnd(AssignOp\BitwiseAnd $node)
    {
        return $this->pInfixOp(AssignOp\BitwiseAnd::class, $node->var, ' &= ', $node->expr);
    }
    protected function pExpr_AssignOp_BitwiseOr(AssignOp\BitwiseOr $node)
    {
        return $this->pInfixOp(AssignOp\BitwiseOr::class, $node->var, ' |= ', $node->expr);
    }
    protected function pExpr_AssignOp_BitwiseXor(AssignOp\BitwiseXor $node)
    {
        return $this->pInfixOp(AssignOp\BitwiseXor::class, $node->var, ' ^= ', $node->expr);
    }
    protected function pExpr_AssignOp_ShiftLeft(AssignOp\ShiftLeft $node)
    {
        return $this->pInfixOp(AssignOp\ShiftLeft::class, $node->var, ' <<= ', $node->expr);
    }
    protected function pExpr_AssignOp_ShiftRight(AssignOp\ShiftRight $node)
    {
        return $this->pInfixOp(AssignOp\ShiftRight::class, $node->var, ' >>= ', $node->expr);
    }
    protected function pExpr_AssignOp_Pow(AssignOp\Pow $node)
    {
        return $this->pInfixOp(AssignOp\Pow::class, $node->var, ' **= ', $node->expr);
    }
    protected function pExpr_AssignOp_Coalesce(AssignOp\Coalesce $node)
    {
        return $this->pInfixOp(AssignOp\Coalesce::class, $node->var, ' ??= ', $node->expr);
    }
    // Binary expressions
    protected function pExpr_BinaryOp_Plus(BinaryOp\Plus $node)
    {
        return $this->pInfixOp(BinaryOp\Plus::class, $node->left, ' + ', $node->right);
    }
    protected function pExpr_BinaryOp_Minus(BinaryOp\Minus $node)
    {
        return $this->pInfixOp(BinaryOp\Minus::class, $node->left, ' - ', $node->right);
    }
    protected function pExpr_BinaryOp_Mul(BinaryOp\Mul $node)
    {
        return $this->pInfixOp(BinaryOp\Mul::class, $node->left, ' * ', $node->right);
    }
    protected function pExpr_BinaryOp_Div(BinaryOp\Div $node)
    {
        return $this->pInfixOp(BinaryOp\Div::class, $node->left, ' / ', $node->right);
    }
    protected function pExpr_BinaryOp_Concat(BinaryOp\Concat $node)
    {
        return $this->pInfixOp(BinaryOp\Concat::class, $node->left, ' . ', $node->right);
    }
    protected function pExpr_BinaryOp_Mod(BinaryOp\Mod $node)
    {
        return $this->pInfixOp(BinaryOp\Mod::class, $node->left, ' % ', $node->right);
    }
    protected function pExpr_BinaryOp_BooleanAnd(BinaryOp\BooleanAnd $node)
    {
        return $this->pInfixOp(BinaryOp\BooleanAnd::class, $node->left, ' && ', $node->right);
    }
    protected function pExpr_BinaryOp_BooleanOr(BinaryOp\BooleanOr $node)
    {
        return $this->pInfixOp(BinaryOp\BooleanOr::class, $node->left, ' || ', $node->right);
    }
    protected function pExpr_BinaryOp_BitwiseAnd(BinaryOp\BitwiseAnd $node)
    {
        return $this->pInfixOp(BinaryOp\BitwiseAnd::class, $node->left, ' & ', $node->right);
    }
    protected function pExpr_BinaryOp_BitwiseOr(BinaryOp\BitwiseOr $node)
    {
        return $this->pInfixOp(BinaryOp\BitwiseOr::class, $node->left, ' | ', $node->right);
    }
    protected function pExpr_BinaryOp_BitwiseXor(BinaryOp\BitwiseXor $node)
    {
        return $this->pInfixOp(BinaryOp\BitwiseXor::class, $node->left, ' ^ ', $node->right);
    }
    protected function pExpr_BinaryOp_ShiftLeft(BinaryOp\ShiftLeft $node)
    {
        return $this->pInfixOp(BinaryOp\ShiftLeft::class, $node->left, ' << ', $node->right);
    }
    protected function pExpr_BinaryOp_ShiftRight(BinaryOp\ShiftRight $node)
    {
        return $this->pInfixOp(BinaryOp\ShiftRight::class, $node->left, ' >> ', $node->right);
    }
    protected function pExpr_BinaryOp_Pow(BinaryOp\Pow $node)
    {
        return $this->pInfixOp(BinaryOp\Pow::class, $node->left, ' ** ', $node->right);
    }
    protected function pExpr_BinaryOp_LogicalAnd(BinaryOp\LogicalAnd $node)
    {
        return $this->pInfixOp(BinaryOp\LogicalAnd::class, $node->left, ' and ', $node->right);
    }
    protected function pExpr_BinaryOp_LogicalOr(BinaryOp\LogicalOr $node)
    {
        return $this->pInfixOp(BinaryOp\LogicalOr::class, $node->left, ' or ', $node->right);
    }
    protected function pExpr_BinaryOp_LogicalXor(BinaryOp\LogicalXor $node)
    {
        return $this->pInfixOp(BinaryOp\LogicalXor::class, $node->left, ' xor ', $node->right);
    }
    protected function pExpr_BinaryOp_Equal(BinaryOp\Equal $node)
    {
        return $this->pInfixOp(BinaryOp\Equal::class, $node->left, ' == ', $node->right);
    }
    protected function pExpr_BinaryOp_NotEqual(BinaryOp\NotEqual $node)
    {
        return $this->pInfixOp(BinaryOp\NotEqual::class, $node->left, ' != ', $node->right);
    }
    protected function pExpr_BinaryOp_Identical(BinaryOp\Identical $node)
    {
        return $this->pInfixOp(BinaryOp\Identical::class, $node->left, ' === ', $node->right);
    }
    protected function pExpr_BinaryOp_NotIdentical(BinaryOp\NotIdentical $node)
    {
        return $this->pInfixOp(BinaryOp\NotIdentical::class, $node->left, ' !== ', $node->right);
    }
    protected function pExpr_BinaryOp_Spaceship(BinaryOp\Spaceship $node)
    {
        return $this->pInfixOp(BinaryOp\Spaceship::class, $node->left, ' <=> ', $node->right);
    }
    protected function pExpr_BinaryOp_Greater(BinaryOp\Greater $node)
    {
        return $this->pInfixOp(BinaryOp\Greater::class, $node->left, ' > ', $node->right);
    }
    protected function pExpr_BinaryOp_GreaterOrEqual(BinaryOp\GreaterOrEqual $node)
    {
        return $this->pInfixOp(BinaryOp\GreaterOrEqual::class, $node->left, ' >= ', $node->right);
    }
    protected function pExpr_BinaryOp_Smaller(BinaryOp\Smaller $node)
    {
        return $this->pInfixOp(BinaryOp\Smaller::class, $node->left, ' < ', $node->right);
    }
    protected function pExpr_BinaryOp_SmallerOrEqual(BinaryOp\SmallerOrEqual $node)
    {
        return $this->pInfixOp(BinaryOp\SmallerOrEqual::class, $node->left, ' <= ', $node->right);
    }
    protected function pExpr_BinaryOp_Coalesce(BinaryOp\Coalesce $node)
    {
        return $this->pInfixOp(BinaryOp\Coalesce::class, $node->left, ' ?? ', $node->right);
    }
    protected function pExpr_Instanceof(Expr\Instanceof_ $node)
    {
        list($precedence, $associativity) = $this->precedenceMap[Expr\Instanceof_::class];
        return $this->pPrec($node->expr, $precedence, $associativity, -1) . ' instanceof ' . $this->pNewVariable($node->class);
    }
    // Unary expressions
    protected function pExpr_BooleanNot(Expr\BooleanNot $node)
    {
        return $this->pPrefixOp(Expr\BooleanNot::class, '!', $node->expr);
    }
    protected function pExpr_BitwiseNot(Expr\BitwiseNot $node)
    {
        return $this->pPrefixOp(Expr\BitwiseNot::class, '~', $node->expr);
    }
    protected function pExpr_UnaryMinus(Expr\UnaryMinus $node)
    {
        if ($node->expr instanceof Expr\UnaryMinus || $node->expr instanceof Expr\PreDec) {
            // Enforce -(-$expr) instead of --$expr
            return '-(' . $this->p($node->expr) . ')';
        }
        return $this->pPrefixOp(Expr\UnaryMinus::class, '-', $node->expr);
    }
    protected function pExpr_UnaryPlus(Expr\UnaryPlus $node)
    {
        if ($node->expr instanceof Expr\UnaryPlus || $node->expr instanceof Expr\PreInc) {
            // Enforce +(+$expr) instead of ++$expr
            return '+(' . $this->p($node->expr) . ')';
        }
        return $this->pPrefixOp(Expr\UnaryPlus::class, '+', $node->expr);
    }
    protected function pExpr_PreInc(Expr\PreInc $node)
    {
        return $this->pPrefixOp(Expr\PreInc::class, '++', $node->var);
    }
    protected function pExpr_PreDec(Expr\PreDec $node)
    {
        return $this->pPrefixOp(Expr\PreDec::class, '--', $node->var);
    }
    protected function pExpr_PostInc(Expr\PostInc $node)
    {
        return $this->pPostfixOp(Expr\PostInc::class, $node->var, '++');
    }
    protected function pExpr_PostDec(Expr\PostDec $node)
    {
        return $this->pPostfixOp(Expr\PostDec::class, $node->var, '--');
    }
    protected function pExpr_ErrorSuppress(Expr\ErrorSuppress $node)
    {
        return $this->pPrefixOp(Expr\ErrorSuppress::class, '@', $node->expr);
    }
    protected function pExpr_YieldFrom(Expr\YieldFrom $node)
    {
        return $this->pPrefixOp(Expr\YieldFrom::class, 'yield from ', $node->expr);
    }
    protected function pExpr_Print(Expr\Print_ $node)
    {
        return $this->pPrefixOp(Expr\Print_::class, 'print ', $node->expr);
    }
    // Casts
    protected function pExpr_Cast_Int(Cast\Int_ $node)
    {
        return $this->pPrefixOp(Cast\Int_::class, '(int) ', $node->expr);
    }
    protected function pExpr_Cast_Double(Cast\Double $node)
    {
        $kind = $node->getAttribute('kind', Cast\Double::KIND_DOUBLE);
        if ($kind === Cast\Double::KIND_DOUBLE) {
            $cast = '(double)';
        } elseif ($kind === Cast\Double::KIND_FLOAT) {
            $cast = '(float)';
        } elseif ($kind === Cast\Double::KIND_REAL) {
            $cast = '(real)';
        }
        return $this->pPrefixOp(Cast\Double::class, $cast . ' ', $node->expr);
    }
    protected function pExpr_Cast_String(Cast\String_ $node)
    {
        return $this->pPrefixOp(Cast\String_::class, '(string) ', $node->expr);
    }
    protected function pExpr_Cast_Array(Cast\Array_ $node)
    {
        return $this->pPrefixOp(Cast\Array_::class, '(array) ', $node->expr);
    }
    protected function pExpr_Cast_Object(Cast\Object_ $node)
    {
        return $this->pPrefixOp(Cast\Object_::class, '(object) ', $node->expr);
    }
    protected function pExpr_Cast_Bool(Cast\Bool_ $node)
    {
        return $this->pPrefixOp(Cast\Bool_::class, '(bool) ', $node->expr);
    }
    protected function pExpr_Cast_Unset(Cast\Unset_ $node)
    {
        return $this->pPrefixOp(Cast\Unset_::class, '(unset) ', $node->expr);
    }
    // Function calls and similar constructs
    protected function pExpr_FuncCall(Expr\FuncCall $node)
    {
        return $this->pCallLhs($node->name) . '(' . $this->pMaybeMultiline($node->args) . ')';
    }
    protected function pExpr_MethodCall(Expr\MethodCall $node)
    {
        return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name) . '(' . $this->pMaybeMultiline($node->args) . ')';
    }
    protected function pExpr_NullsafeMethodCall(Expr\NullsafeMethodCall $node)
    {
        return $this->pDereferenceLhs($node->var) . '?->' . $this->pObjectProperty($node->name) . '(' . $this->pMaybeMultiline($node->args) . ')';
    }
    protected function pExpr_StaticCall(Expr\StaticCall $node)
    {
        return $this->pDereferenceLhs($node->class) . '::' . ($node->name instanceof Expr ? $node->name instanceof Expr\Variable ? $this->p($node->name) : '{' . $this->p($node->name) . '}' : $node->name) . '(' . $this->pMaybeMultiline($node->args) . ')';
    }
    protected function pExpr_Empty(Expr\Empty_ $node)
    {
        return 'empty(' . $this->p($node->expr) . ')';
    }
    protected function pExpr_Isset(Expr\Isset_ $node)
    {
        return 'isset(' . $this->pCommaSeparated($node->vars) . ')';
    }
    protected function pExpr_Eval(Expr\Eval_ $node)
    {
        return 'eval(' . $this->p($node->expr) . ')';
    }
    protected function pExpr_Include(Expr\Include_ $node)
    {
        static $map = [Expr\Include_::TYPE_INCLUDE => 'include', Expr\Include_::TYPE_INCLUDE_ONCE => 'include_once', Expr\Include_::TYPE_REQUIRE => 'require', Expr\Include_::TYPE_REQUIRE_ONCE => 'require_once'];
        return $map[$node->type] . ' ' . $this->p($node->expr);
    }
    protected function pExpr_List(Expr\List_ $node)
    {
        return 'list(' . $this->pCommaSeparated($node->items) . ')';
    }
    // Other
    protected function pExpr_Error(Expr\Error $node)
    {
        throw new \LogicException('Cannot pretty-print AST with Error nodes');
    }
    protected function pExpr_Variable(Expr\Variable $node)
    {
        if ($node->name instanceof Expr) {
            return '${' . $this->p($node->name) . '}';
        } else {
            return '$' . $node->name;
        }
    }
    protected function pExpr_Array(Expr\Array_ $node)
    {
        $syntax = $node->getAttribute('kind', $this->options['shortArraySyntax'] ? Expr\Array_::KIND_SHORT : Expr\Array_::KIND_LONG);
        if ($syntax === Expr\Array_::KIND_SHORT) {
            return '[' . $this->pMaybeMultiline($node->items, \true) . ']';
        } else {
            return 'array(' . $this->pMaybeMultiline($node->items, \true) . ')';
        }
    }
    protected function pExpr_ArrayItem(Expr\ArrayItem $node)
    {
        return (null !== $node->key ? $this->p($node->key) . ' => ' : '') . ($node->byRef ? '&' : '') . ($node->unpack ? '...' : '') . $this->p($node->value);
    }
    protected function pExpr_ArrayDimFetch(Expr\ArrayDimFetch $node)
    {
        return $this->pDereferenceLhs($node->var) . '[' . (null !== $node->dim ? $this->p($node->dim) : '') . ']';
    }
    protected function pExpr_ConstFetch(Expr\ConstFetch $node)
    {
        return $this->p($node->name);
    }
    protected function pExpr_ClassConstFetch(Expr\ClassConstFetch $node)
    {
        return $this->pDereferenceLhs($node->class) . '::' . $this->p($node->name);
    }
    protected function pExpr_PropertyFetch(Expr\PropertyFetch $node)
    {
        return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name);
    }
    protected function pExpr_NullsafePropertyFetch(Expr\NullsafePropertyFetch $node)
    {
        return $this->pDereferenceLhs($node->var) . '?->' . $this->pObjectProperty($node->name);
    }
    protected function pExpr_StaticPropertyFetch(Expr\StaticPropertyFetch $node)
    {
        return $this->pDereferenceLhs($node->class) . '::$' . $this->pObjectProperty($node->name);
    }
    protected function pExpr_ShellExec(Expr\ShellExec $node)
    {
        return '`' . $this->pEncapsList($node->parts, '`') . '`';
    }
    protected function pExpr_Closure(Expr\Closure $node)
    {
        return $this->pAttrGroups($node->attrGroups, \true) . ($node->static ? 'static ' : '') . 'function ' . ($node->byRef ? '&' : '') . '(' . $this->pCommaSeparated($node->params) . ')' . (!empty($node->uses) ? ' use(' . $this->pCommaSeparated($node->uses) . ')' : '') . (null !== $node->returnType ? ' : ' . $this->p($node->returnType) : '') . ' {' . $this->pStmts($node->stmts) . $this->nl . '}';
    }
    protected function pExpr_Match(Expr\Match_ $node)
    {
        return 'match (' . $this->p($node->cond) . ') {' . $this->pCommaSeparatedMultiline($node->arms, \true) . $this->nl . '}';
    }
    protected function pMatchArm(Node\MatchArm $node)
    {
        return ($node->conds ? $this->pCommaSeparated($node->conds) : 'default') . ' => ' . $this->p($node->body);
    }
    protected function pExpr_ArrowFunction(Expr\ArrowFunction $node)
    {
        return $this->pAttrGroups($node->attrGroups, \true) . ($node->static ? 'static ' : '') . 'fn' . ($node->byRef ? '&' : '') . '(' . $this->pCommaSeparated($node->params) . ')' . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . ' => ' . $this->p($node->expr);
    }
    protected function pExpr_ClosureUse(Expr\ClosureUse $node)
    {
        return ($node->byRef ? '&' : '') . $this->p($node->var);
    }
    protected function pExpr_New(Expr\New_ $node)
    {
        if ($node->class instanceof Stmt\Class_) {
            $args = $node->args ? '(' . $this->pMaybeMultiline($node->args) . ')' : '';
            return 'new ' . $this->pClassCommon($node->class, $args);
        }
        return 'new ' . $this->pNewVariable($node->class) . '(' . $this->pMaybeMultiline($node->args) . ')';
    }
    protected function pExpr_Clone(Expr\Clone_ $node)
    {
        return 'clone ' . $this->p($node->expr);
    }
    protected function pExpr_Ternary(Expr\Ternary $node)
    {
        // a bit of cheating: we treat the ternary as a binary op where the ?...: part is the operator.
        // this is okay because the part between ? and : never needs parentheses.
        return $this->pInfixOp(Expr\Ternary::class, $node->cond, ' ?' . (null !== $node->if ? ' ' . $this->p($node->if) . ' ' : '') . ': ', $node->else);
    }
    protected function pExpr_Exit(Expr\Exit_ $node)
    {
        $kind = $node->getAttribute('kind', Expr\Exit_::KIND_DIE);
        return ($kind === Expr\Exit_::KIND_EXIT ? 'exit' : 'die') . (null !== $node->expr ? '(' . $this->p($node->expr) . ')' : '');
    }
    protected function pExpr_Throw(Expr\Throw_ $node)
    {
        return 'throw ' . $this->p($node->expr);
    }
    protected function pExpr_Yield(Expr\Yield_ $node)
    {
        if ($node->value === null) {
            return 'yield';
        } else {
            // this is a bit ugly, but currently there is no way to detect whether the parentheses are necessary
            return '(yield ' . ($node->key !== null ? $this->p($node->key) . ' => ' : '') . $this->p($node->value) . ')';
        }
    }
    // Declarations
    protected function pStmt_Namespace(Stmt\Namespace_ $node)
    {
        if ($this->canUseSemicolonNamespaces) {
            return 'namespace ' . $this->p($node->name) . ';' . $this->nl . $this->pStmts($node->stmts, \false);
        } else {
            return 'namespace' . (null !== $node->name ? ' ' . $this->p($node->name) : '') . ' {' . $this->pStmts($node->stmts) . $this->nl . '}';
        }
    }
    protected function pStmt_Use(Stmt\Use_ $node)
    {
        return 'use ' . $this->pUseType($node->type) . $this->pCommaSeparated($node->uses) . ';';
    }
    protected function pStmt_GroupUse(Stmt\GroupUse $node)
    {
        return 'use ' . $this->pUseType($node->type) . $this->pName($node->prefix) . '\\{' . $this->pCommaSeparated($node->uses) . '};';
    }
    protected function pStmt_UseUse(Stmt\UseUse $node)
    {
        return $this->pUseType($node->type) . $this->p($node->name) . (null !== $node->alias ? ' as ' . $node->alias : '');
    }
    protected function pUseType($type)
    {
        return $type === Stmt\Use_::TYPE_FUNCTION ? 'function ' : ($type === Stmt\Use_::TYPE_CONSTANT ? 'const ' : '');
    }
    protected function pStmt_Interface(Stmt\Interface_ $node)
    {
        return $this->pAttrGroups($node->attrGroups) . 'interface ' . $node->name . (!empty($node->extends) ? ' extends ' . $this->pCommaSeparated($node->extends) : '') . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}';
    }
    protected function pStmt_Enum(Stmt\Enum_ $node)
    {
        return $this->pAttrGroups($node->attrGroups) . 'enum ' . $node->name . ($node->scalarType ? " : {$node->scalarType}" : '') . (!empty($node->implements) ? ' implements ' . $this->pCommaSeparated($node->implements) : '') . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}';
    }
    protected function pStmt_Class(Stmt\Class_ $node)
    {
        return $this->pClassCommon($node, ' ' . $node->name);
    }
    protected function pStmt_Trait(Stmt\Trait_ $node)
    {
        return $this->pAttrGroups($node->attrGroups) . 'trait ' . $node->name . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}';
    }
    protected function pStmt_EnumCase(Stmt\EnumCase $node)
    {
        return $this->pAttrGroups($node->attrGroups) . 'case ' . $node->name . ($node->expr ? ' = ' . $this->p($node->expr) : '') . ';';
    }
    protected function pStmt_TraitUse(Stmt\TraitUse $node)
    {
        return 'use ' . $this->pCommaSeparated($node->traits) . (empty($node->adaptations) ? ';' : ' {' . $this->pStmts($node->adaptations) . $this->nl . '}');
    }
    protected function pStmt_TraitUseAdaptation_Precedence(Stmt\TraitUseAdaptation\Precedence $node)
    {
        return $this->p($node->trait) . '::' . $node->method . ' insteadof ' . $this->pCommaSeparated($node->insteadof) . ';';
    }
    protected function pStmt_TraitUseAdaptation_Alias(Stmt\TraitUseAdaptation\Alias $node)
    {
        return (null !== $node->trait ? $this->p($node->trait) . '::' : '') . $node->method . ' as' . (null !== $node->newModifier ? ' ' . \rtrim($this->pModifiers($node->newModifier), ' ') : '') . (null !== $node->newName ? ' ' . $node->newName : '') . ';';
    }
    protected function pStmt_Property(Stmt\Property $node)
    {
        return $this->pAttrGroups($node->attrGroups) . (0 === $node->flags ? 'var ' : $this->pModifiers($node->flags)) . ($node->type ? $this->p($node->type) . ' ' : '') . $this->pCommaSeparated($node->props) . ';';
    }
    protected function pStmt_PropertyProperty(Stmt\PropertyProperty $node)
    {
        return '$' . $node->name . (null !== $node->default ? ' = ' . $this->p($node->default) : '');
    }
    protected function pStmt_ClassMethod(Stmt\ClassMethod $node)
    {
        return $this->pAttrGroups($node->attrGroups) . $this->pModifiers($node->flags) . 'function ' . ($node->byRef ? '&' : '') . $node->name . '(' . $this->pMaybeMultiline($node->params) . ')' . (null !== $node->returnType ? ' : ' . $this->p($node->returnType) : '') . (null !== $node->stmts ? $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}' : ';');
    }
    protected function pStmt_ClassConst(Stmt\ClassConst $node)
    {
        return $this->pAttrGroups($node->attrGroups) . $this->pModifiers($node->flags) . 'const ' . $this->pCommaSeparated($node->consts) . ';';
    }
    protected function pStmt_Function(Stmt\Function_ $node)
    {
        return $this->pAttrGroups($node->attrGroups) . 'function ' . ($node->byRef ? '&' : '') . $node->name . '(' . $this->pCommaSeparated($node->params) . ')' . (null !== $node->returnType ? ' : ' . $this->p($node->returnType) : '') . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}';
    }
    protected function pStmt_Const(Stmt\Const_ $node)
    {
        return 'const ' . $this->pCommaSeparated($node->consts) . ';';
    }
    protected function pStmt_Declare(Stmt\Declare_ $node)
    {
        return 'declare (' . $this->pCommaSeparated($node->declares) . ')' . (null !== $node->stmts ? ' {' . $this->pStmts($node->stmts) . $this->nl . '}' : ';');
    }
    protected function pStmt_DeclareDeclare(Stmt\DeclareDeclare $node)
    {
        return $node->key . '=' . $this->p($node->value);
    }
    // Control flow
    protected function pStmt_If(Stmt\If_ $node)
    {
        return 'if (' . $this->p($node->cond) . ') {' . $this->pStmts($node->stmts) . $this->nl . '}' . ($node->elseifs ? ' ' . $this->pImplode($node->elseifs, ' ') : '') . (null !== $node->else ? ' ' . $this->p($node->else) : '');
    }
    protected function pStmt_ElseIf(Stmt\ElseIf_ $node)
    {
        return 'elseif (' . $this->p($node->cond) . ') {' . $this->pStmts($node->stmts) . $this->nl . '}';
    }
    protected function pStmt_Else(Stmt\Else_ $node)
    {
        return 'else {' . $this->pStmts($node->stmts) . $this->nl . '}';
    }
    protected function pStmt_For(Stmt\For_ $node)
    {
        return 'for (' . $this->pCommaSeparated($node->init) . ';' . (!empty($node->cond) ? ' ' : '') . $this->pCommaSeparated($node->cond) . ';' . (!empty($node->loop) ? ' ' : '') . $this->pCommaSeparated($node->loop) . ') {' . $this->pStmts($node->stmts) . $this->nl . '}';
    }
    protected function pStmt_Foreach(Stmt\Foreach_ $node)
    {
        return 'foreach (' . $this->p($node->expr) . ' as ' . (null !== $node->keyVar ? $this->p($node->keyVar) . ' => ' : '') . ($node->byRef ? '&' : '') . $this->p($node->valueVar) . ') {' . $this->pStmts($node->stmts) . $this->nl . '}';
    }
    protected function pStmt_While(Stmt\While_ $node)
    {
        return 'while (' . $this->p($node->cond) . ') {' . $this->pStmts($node->stmts) . $this->nl . '}';
    }
    protected function pStmt_Do(Stmt\Do_ $node)
    {
        return 'do {' . $this->pStmts($node->stmts) . $this->nl . '} while (' . $this->p($node->cond) . ');';
    }
    protected function pStmt_Switch(Stmt\Switch_ $node)
    {
        return 'switch (' . $this->p($node->cond) . ') {' . $this->pStmts($node->cases) . $this->nl . '}';
    }
    protected function pStmt_Case(Stmt\Case_ $node)
    {
        return (null !== $node->cond ? 'case ' . $this->p($node->cond) : 'default') . ':' . $this->pStmts($node->stmts);
    }
    protected function pStmt_TryCatch(Stmt\TryCatch $node)
    {
        return 'try {' . $this->pStmts($node->stmts) . $this->nl . '}' . ($node->catches ? ' ' . $this->pImplode($node->catches, ' ') : '') . ($node->finally !== null ? ' ' . $this->p($node->finally) : '');
    }
    protected function pStmt_Catch(Stmt\Catch_ $node)
    {
        return 'catch (' . $this->pImplode($node->types, '|') . ($node->var !== null ? ' ' . $this->p($node->var) : '') . ') {' . $this->pStmts($node->stmts) . $this->nl . '}';
    }
    protected function pStmt_Finally(Stmt\Finally_ $node)
    {
        return 'finally {' . $this->pStmts($node->stmts) . $this->nl . '}';
    }
    protected function pStmt_Break(Stmt\Break_ $node)
    {
        return 'break' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';';
    }
    protected function pStmt_Continue(Stmt\Continue_ $node)
    {
        return 'continue' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';';
    }
    protected function pStmt_Return(Stmt\Return_ $node)
    {
        return 'return' . (null !== $node->expr ? ' ' . $this->p($node->expr) : '') . ';';
    }
    protected function pStmt_Throw(Stmt\Throw_ $node)
    {
        return 'throw ' . $this->p($node->expr) . ';';
    }
    protected function pStmt_Label(Stmt\Label $node)
    {
        return $node->name . ':';
    }
    protected function pStmt_Goto(Stmt\Goto_ $node)
    {
        return 'goto ' . $node->name . ';';
    }
    // Other
    protected function pStmt_Expression(Stmt\Expression $node)
    {
        return $this->p($node->expr) . ';';
    }
    protected function pStmt_Echo(Stmt\Echo_ $node)
    {
        return 'echo ' . $this->pCommaSeparated($node->exprs) . ';';
    }
    protected function pStmt_Static(Stmt\Static_ $node)
    {
        return 'static ' . $this->pCommaSeparated($node->vars) . ';';
    }
    protected function pStmt_Global(Stmt\Global_ $node)
    {
        return 'global ' . $this->pCommaSeparated($node->vars) . ';';
    }
    protected function pStmt_StaticVar(Stmt\StaticVar $node)
    {
        return $this->p($node->var) . (null !== $node->default ? ' = ' . $this->p($node->default) : '');
    }
    protected function pStmt_Unset(Stmt\Unset_ $node)
    {
        return 'unset(' . $this->pCommaSeparated($node->vars) . ');';
    }
    protected function pStmt_InlineHTML(Stmt\InlineHTML $node)
    {
        $newline = $node->getAttribute('hasLeadingNewline', \true) ? "\n" : '';
        return '?>' . $newline . $node->value . '<?php ';
    }
    protected function pStmt_HaltCompiler(Stmt\HaltCompiler $node)
    {
        return '__halt_compiler();' . $node->remaining;
    }
    protected function pStmt_Nop(Stmt\Nop $node)
    {
        return '';
    }
    // Helpers
    protected function pClassCommon(Stmt\Class_ $node, $afterClassToken)
    {
        return $this->pAttrGroups($node->attrGroups, $node->name === null) . $this->pModifiers($node->flags) . 'class' . $afterClassToken . (null !== $node->extends ? ' extends ' . $this->p($node->extends) : '') . (!empty($node->implements) ? ' implements ' . $this->pCommaSeparated($node->implements) : '') . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}';
    }
    protected function pObjectProperty($node)
    {
        if ($node instanceof Expr) {
            return '{' . $this->p($node) . '}';
        } else {
            return $node;
        }
    }
    protected function pEncapsList(array $encapsList, $quote)
    {
        $return = '';
        foreach ($encapsList as $element) {
            if ($element instanceof Scalar\EncapsedStringPart) {
                $return .= $this->escapeString($element->value, $quote);
            } else {
                $return .= '{' . $this->p($element) . '}';
            }
        }
        return $return;
    }
    protected function pSingleQuotedString(string $string)
    {
        return '\'' . \addcslashes($string, '\'\\') . '\'';
    }
    protected function escapeString($string, $quote)
    {
        if (null === $quote) {
            // For doc strings, don't escape newlines
            $escaped = \addcslashes($string, "\t\f\v\$\\");
        } else {
            $escaped = \addcslashes($string, "\n\r\t\f\v\$" . $quote . "\\");
        }
        // Escape control characters and non-UTF-8 characters.
        // Regex based on https://stackoverflow.com/a/11709412/385378.
        $regex = '/(
              [\\x00-\\x08\\x0E-\\x1F] # Control characters
            | [\\xC0-\\xC1] # Invalid UTF-8 Bytes
            | [\\xF5-\\xFF] # Invalid UTF-8 Bytes
            | \\xE0(?=[\\x80-\\x9F]) # Overlong encoding of prior code point
            | \\xF0(?=[\\x80-\\x8F]) # Overlong encoding of prior code point
            | [\\xC2-\\xDF](?![\\x80-\\xBF]) # Invalid UTF-8 Sequence Start
            | [\\xE0-\\xEF](?![\\x80-\\xBF]{2}) # Invalid UTF-8 Sequence Start
            | [\\xF0-\\xF4](?![\\x80-\\xBF]{3}) # Invalid UTF-8 Sequence Start
            | (?<=[\\x00-\\x7F\\xF5-\\xFF])[\\x80-\\xBF] # Invalid UTF-8 Sequence Middle
            | (?<![\\xC2-\\xDF]|[\\xE0-\\xEF]|[\\xE0-\\xEF][\\x80-\\xBF]|[\\xF0-\\xF4]|[\\xF0-\\xF4][\\x80-\\xBF]|[\\xF0-\\xF4][\\x80-\\xBF]{2})[\\x80-\\xBF] # Overlong Sequence
            | (?<=[\\xE0-\\xEF])[\\x80-\\xBF](?![\\x80-\\xBF]) # Short 3 byte sequence
            | (?<=[\\xF0-\\xF4])[\\x80-\\xBF](?![\\x80-\\xBF]{2}) # Short 4 byte sequence
            | (?<=[\\xF0-\\xF4][\\x80-\\xBF])[\\x80-\\xBF](?![\\x80-\\xBF]) # Short 4 byte sequence (2)
        )/x';
        return \preg_replace_callback($regex, function ($matches) {
            \assert(\strlen($matches[0]) === 1);
            $hex = \dechex(\ord($matches[0]));
            return '\\x' . \str_pad($hex, 2, '0', \STR_PAD_LEFT);
        }, $escaped);
    }
    protected function containsEndLabel($string, $label, $atStart = \true, $atEnd = \true)
    {
        $start = $atStart ? '(?:^|[\\r\\n])' : '[\\r\\n]';
        $end = $atEnd ? '(?:$|[;\\r\\n])' : '[;\\r\\n]';
        return \false !== \strpos($string, $label) && \preg_match('/' . $start . $label . $end . '/', $string);
    }
    protected function encapsedContainsEndLabel(array $parts, $label)
    {
        foreach ($parts as $i => $part) {
            $atStart = $i === 0;
            $atEnd = $i === \count($parts) - 1;
            if ($part instanceof Scalar\EncapsedStringPart && $this->containsEndLabel($part->value, $label, $atStart, $atEnd)) {
                return \true;
            }
        }
        return \false;
    }
    protected function pDereferenceLhs(Node $node)
    {
        if (!$this->dereferenceLhsRequiresParens($node)) {
            return $this->p($node);
        } else {
            return '(' . $this->p($node) . ')';
        }
    }
    protected function pCallLhs(Node $node)
    {
        if (!$this->callLhsRequiresParens($node)) {
            return $this->p($node);
        } else {
            return '(' . $this->p($node) . ')';
        }
    }
    protected function pNewVariable(Node $node)
    {
        // TODO: This is not fully accurate.
        return $this->pDereferenceLhs($node);
    }
    /**
     * @param Node[] $nodes
     * @return bool
     */
    protected function hasNodeWithComments(array $nodes)
    {
        foreach ($nodes as $node) {
            if ($node && $node->getComments()) {
                return \true;
            }
        }
        return \false;
    }
    protected function pMaybeMultiline(array $nodes, bool $trailingComma = \false)
    {
        if (!$this->hasNodeWithComments($nodes)) {
            return $this->pCommaSeparated($nodes);
        } else {
            return $this->pCommaSeparatedMultiline($nodes, $trailingComma) . $this->nl;
        }
    }
    protected function pAttrGroups(array $nodes, bool $inline = \false) : string
    {
        $result = '';
        $sep = $inline ? ' ' : $this->nl;
        foreach ($nodes as $node) {
            $result .= $this->p($node) . $sep;
        }
        return $result;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser;

class JsonDecoder
{
    /** @var \ReflectionClass[] Node type to reflection class map */
    private $reflectionClassCache;
    public function decode(string $json)
    {
        $value = \json_decode($json, \true);
        if (\json_last_error()) {
            throw new \RuntimeException('JSON decoding error: ' . \json_last_error_msg());
        }
        return $this->decodeRecursive($value);
    }
    private function decodeRecursive($value)
    {
        if (\is_array($value)) {
            if (isset($value['nodeType'])) {
                if ($value['nodeType'] === 'Comment' || $value['nodeType'] === 'Comment_Doc') {
                    return $this->decodeComment($value);
                }
                return $this->decodeNode($value);
            }
            return $this->decodeArray($value);
        }
        return $value;
    }
    private function decodeArray(array $array) : array
    {
        $decodedArray = [];
        foreach ($array as $key => $value) {
            $decodedArray[$key] = $this->decodeRecursive($value);
        }
        return $decodedArray;
    }
    private function decodeNode(array $value) : \PhpParser\Node
    {
        $nodeType = $value['nodeType'];
        if (!\is_string($nodeType)) {
            throw new \RuntimeException('Node type must be a string');
        }
        $reflectionClass = $this->reflectionClassFromNodeType($nodeType);
        /** @var Node $node */
        $node = $reflectionClass->newInstanceWithoutConstructor();
        if (isset($value['attributes'])) {
            if (!\is_array($value['attributes'])) {
                throw new \RuntimeException('Attributes must be an array');
            }
            $node->setAttributes($this->decodeArray($value['attributes']));
        }
        foreach ($value as $name => $subNode) {
            if ($name === 'nodeType' || $name === 'attributes') {
                continue;
            }
            $node->{$name} = $this->decodeRecursive($subNode);
        }
        return $node;
    }
    private function decodeComment(array $value) : \PhpParser\Comment
    {
        $className = $value['nodeType'] === 'Comment' ? \PhpParser\Comment::class : \PhpParser\Comment\Doc::class;
        if (!isset($value['text'])) {
            throw new \RuntimeException('Comment must have text');
        }
        return new $className($value['text'], $value['line'] ?? -1, $value['filePos'] ?? -1, $value['tokenPos'] ?? -1, $value['endLine'] ?? -1, $value['endFilePos'] ?? -1, $value['endTokenPos'] ?? -1);
    }
    private function reflectionClassFromNodeType(string $nodeType) : \ReflectionClass
    {
        if (!isset($this->reflectionClassCache[$nodeType])) {
            $className = $this->classNameFromNodeType($nodeType);
            $this->reflectionClassCache[$nodeType] = new \ReflectionClass($className);
        }
        return $this->reflectionClassCache[$nodeType];
    }
    private function classNameFromNodeType(string $nodeType) : string
    {
        $className = 'PhpParser\\Node\\' . \strtr($nodeType, '_', '\\');
        if (\class_exists($className)) {
            return $className;
        }
        $className .= '_';
        if (\class_exists($className)) {
            return $className;
        }
        throw new \RuntimeException("Unknown node type \"{$nodeType}\"");
    }
}
<?php

declare (strict_types=1);
namespace PhpParser;

interface Builder
{
    /**
     * Returns the built node.
     *
     * @return Node The built node
     */
    public function getNode() : \PhpParser\Node;
}
<?php

declare (strict_types=1);
namespace PhpParser\Node;

/**
 * Represents a name that is written in source code with a leading dollar,
 * but is not a proper variable. The leading dollar is not stored as part of the name.
 *
 * Examples: Names in property declarations are formatted as variables. Names in static property
 * lookups are also formatted as variables.
 */
class VarLikeIdentifier extends \PhpParser\Node\Identifier
{
    public function getType() : string
    {
        return 'VarLikeIdentifier';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node;

use PhpParser\NodeAbstract;
abstract class Expr extends NodeAbstract
{
}
<?php

declare (strict_types=1);
namespace PhpParser\Node;

use PhpParser\Node;
interface FunctionLike extends Node
{
    /**
     * Whether to return by reference
     *
     * @return bool
     */
    public function returnsByRef() : bool;
    /**
     * List of parameters
     *
     * @return Param[]
     */
    public function getParams() : array;
    /**
     * Get the declared return type or null
     *
     * @return null|Identifier|Name|ComplexType
     */
    public function getReturnType();
    /**
     * The function body
     *
     * @return Stmt[]|null
     */
    public function getStmts();
    /**
     * Get PHP attribute groups.
     *
     * @return AttributeGroup[]
     */
    public function getAttrGroups() : array;
}
<?php

declare (strict_types=1);
namespace PhpParser\Node;

use PhpParser\Node\VariadicPlaceholder;
use PhpParser\NodeAbstract;
class Arg extends NodeAbstract
{
    /** @var Identifier|null Parameter name (for named parameters) */
    public $name;
    /** @var Expr Value to pass */
    public $value;
    /** @var bool Whether to pass by ref */
    public $byRef;
    /** @var bool Whether to unpack the argument */
    public $unpack;
    /**
     * Constructs a function call argument node.
     *
     * @param Expr  $value      Value to pass
     * @param bool  $byRef      Whether to pass by ref
     * @param bool  $unpack     Whether to unpack the argument
     * @param array $attributes Additional attributes
     * @param Identifier|null $name Parameter name (for named parameters)
     */
    public function __construct(\PhpParser\Node\Expr $value, bool $byRef = \false, bool $unpack = \false, array $attributes = [], \PhpParser\Node\Identifier $name = null)
    {
        $this->attributes = $attributes;
        $this->name = $name;
        $this->value = $value;
        $this->byRef = $byRef;
        $this->unpack = $unpack;
    }
    public function getSubNodeNames() : array
    {
        return ['name', 'value', 'byRef', 'unpack'];
    }
    public function getType() : string
    {
        return 'Arg';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node;

use PhpParser\NodeAbstract;
class Param extends NodeAbstract
{
    /** @var null|Identifier|Name|ComplexType Type declaration */
    public $type;
    /** @var bool Whether parameter is passed by reference */
    public $byRef;
    /** @var bool Whether this is a variadic argument */
    public $variadic;
    /** @var Expr\Variable|Expr\Error Parameter variable */
    public $var;
    /** @var null|Expr Default value */
    public $default;
    /** @var int */
    public $flags;
    /** @var AttributeGroup[] PHP attribute groups */
    public $attrGroups;
    /**
     * Constructs a parameter node.
     *
     * @param Expr\Variable|Expr\Error                $var        Parameter variable
     * @param null|Expr                               $default    Default value
     * @param null|string|Identifier|Name|ComplexType $type       Type declaration
     * @param bool                                    $byRef      Whether is passed by reference
     * @param bool                                    $variadic   Whether this is a variadic argument
     * @param array                                   $attributes Additional attributes
     * @param int                                     $flags      Optional visibility flags
     * @param AttributeGroup[]                        $attrGroups PHP attribute groups
     */
    public function __construct($var, \PhpParser\Node\Expr $default = null, $type = null, bool $byRef = \false, bool $variadic = \false, array $attributes = [], int $flags = 0, array $attrGroups = [])
    {
        $this->attributes = $attributes;
        $this->type = \is_string($type) ? new \PhpParser\Node\Identifier($type) : $type;
        $this->byRef = $byRef;
        $this->variadic = $variadic;
        $this->var = $var;
        $this->default = $default;
        $this->flags = $flags;
        $this->attrGroups = $attrGroups;
    }
    public function getSubNodeNames() : array
    {
        return ['attrGroups', 'flags', 'type', 'byRef', 'variadic', 'var', 'default'];
    }
    public function getType() : string
    {
        return 'Param';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node;

use PhpParser\NodeAbstract;
class Const_ extends NodeAbstract
{
    /** @var Identifier Name */
    public $name;
    /** @var Expr Value */
    public $value;
    /** @var Name|null Namespaced name (if using NameResolver) */
    public $namespacedName;
    /**
     * Constructs a const node for use in class const and const statements.
     *
     * @param string|Identifier $name       Name
     * @param Expr              $value      Value
     * @param array             $attributes Additional attributes
     */
    public function __construct($name, \PhpParser\Node\Expr $value, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->name = \is_string($name) ? new \PhpParser\Node\Identifier($name) : $name;
        $this->value = $value;
    }
    public function getSubNodeNames() : array
    {
        return ['name', 'value'];
    }
    public function getType() : string
    {
        return 'Const';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Name;

class FullyQualified extends \PhpParser\Node\Name
{
    /**
     * Checks whether the name is unqualified. (E.g. Name)
     *
     * @return bool Whether the name is unqualified
     */
    public function isUnqualified() : bool
    {
        return \false;
    }
    /**
     * Checks whether the name is qualified. (E.g. Name\Name)
     *
     * @return bool Whether the name is qualified
     */
    public function isQualified() : bool
    {
        return \false;
    }
    /**
     * Checks whether the name is fully qualified. (E.g. \Name)
     *
     * @return bool Whether the name is fully qualified
     */
    public function isFullyQualified() : bool
    {
        return \true;
    }
    /**
     * Checks whether the name is explicitly relative to the current namespace. (E.g. namespace\Name)
     *
     * @return bool Whether the name is relative
     */
    public function isRelative() : bool
    {
        return \false;
    }
    public function toCodeString() : string
    {
        return '\\' . $this->toString();
    }
    public function getType() : string
    {
        return 'Name_FullyQualified';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Name;

class Relative extends \PhpParser\Node\Name
{
    /**
     * Checks whether the name is unqualified. (E.g. Name)
     *
     * @return bool Whether the name is unqualified
     */
    public function isUnqualified() : bool
    {
        return \false;
    }
    /**
     * Checks whether the name is qualified. (E.g. Name\Name)
     *
     * @return bool Whether the name is qualified
     */
    public function isQualified() : bool
    {
        return \false;
    }
    /**
     * Checks whether the name is fully qualified. (E.g. \Name)
     *
     * @return bool Whether the name is fully qualified
     */
    public function isFullyQualified() : bool
    {
        return \false;
    }
    /**
     * Checks whether the name is explicitly relative to the current namespace. (E.g. namespace\Name)
     *
     * @return bool Whether the name is relative
     */
    public function isRelative() : bool
    {
        return \true;
    }
    public function toCodeString() : string
    {
        return 'namespace\\' . $this->toString();
    }
    public function getType() : string
    {
        return 'Name_Relative';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node;

use PhpParser\NodeAbstract;
/**
 * This is a base class for complex types, including nullable types and union types.
 *
 * It does not provide any shared behavior and exists only for type-checking purposes.
 */
abstract class ComplexType extends NodeAbstract
{
}
<?php

declare (strict_types=1);
namespace PhpParser\Node;

use PhpParser\NodeAbstract;
class Name extends NodeAbstract
{
    /** @var string[] Parts of the name */
    public $parts;
    private static $specialClassNames = ['self' => \true, 'parent' => \true, 'static' => \true];
    /**
     * Constructs a name node.
     *
     * @param string|string[]|self $name       Name as string, part array or Name instance (copy ctor)
     * @param array                $attributes Additional attributes
     */
    public function __construct($name, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->parts = self::prepareName($name);
    }
    public function getSubNodeNames() : array
    {
        return ['parts'];
    }
    /**
     * Gets the first part of the name, i.e. everything before the first namespace separator.
     *
     * @return string First part of the name
     */
    public function getFirst() : string
    {
        return $this->parts[0];
    }
    /**
     * Gets the last part of the name, i.e. everything after the last namespace separator.
     *
     * @return string Last part of the name
     */
    public function getLast() : string
    {
        return $this->parts[\count($this->parts) - 1];
    }
    /**
     * Checks whether the name is unqualified. (E.g. Name)
     *
     * @return bool Whether the name is unqualified
     */
    public function isUnqualified() : bool
    {
        return 1 === \count($this->parts);
    }
    /**
     * Checks whether the name is qualified. (E.g. Name\Name)
     *
     * @return bool Whether the name is qualified
     */
    public function isQualified() : bool
    {
        return 1 < \count($this->parts);
    }
    /**
     * Checks whether the name is fully qualified. (E.g. \Name)
     *
     * @return bool Whether the name is fully qualified
     */
    public function isFullyQualified() : bool
    {
        return \false;
    }
    /**
     * Checks whether the name is explicitly relative to the current namespace. (E.g. namespace\Name)
     *
     * @return bool Whether the name is relative
     */
    public function isRelative() : bool
    {
        return \false;
    }
    /**
     * Returns a string representation of the name itself, without taking the name type into
     * account (e.g., not including a leading backslash for fully qualified names).
     *
     * @return string String representation
     */
    public function toString() : string
    {
        return \implode('\\', $this->parts);
    }
    /**
     * Returns a string representation of the name as it would occur in code (e.g., including
     * leading backslash for fully qualified names.
     *
     * @return string String representation
     */
    public function toCodeString() : string
    {
        return $this->toString();
    }
    /**
     * Returns lowercased string representation of the name, without taking the name type into
     * account (e.g., no leading backslash for fully qualified names).
     *
     * @return string Lowercased string representation
     */
    public function toLowerString() : string
    {
        return \strtolower(\implode('\\', $this->parts));
    }
    /**
     * Checks whether the identifier is a special class name (self, parent or static).
     *
     * @return bool Whether identifier is a special class name
     */
    public function isSpecialClassName() : bool
    {
        return \count($this->parts) === 1 && isset(self::$specialClassNames[\strtolower($this->parts[0])]);
    }
    /**
     * Returns a string representation of the name by imploding the namespace parts with the
     * namespace separator.
     *
     * @return string String representation
     */
    public function __toString() : string
    {
        return \implode('\\', $this->parts);
    }
    /**
     * Gets a slice of a name (similar to array_slice).
     *
     * This method returns a new instance of the same type as the original and with the same
     * attributes.
     *
     * If the slice is empty, null is returned. The null value will be correctly handled in
     * concatenations using concat().
     *
     * Offset and length have the same meaning as in array_slice().
     *
     * @param int      $offset Offset to start the slice at (may be negative)
     * @param int|null $length Length of the slice (may be negative)
     *
     * @return static|null Sliced name
     */
    public function slice(int $offset, int $length = null)
    {
        $numParts = \count($this->parts);
        $realOffset = $offset < 0 ? $offset + $numParts : $offset;
        if ($realOffset < 0 || $realOffset > $numParts) {
            throw new \OutOfBoundsException(\sprintf('Offset %d is out of bounds', $offset));
        }
        if (null === $length) {
            $realLength = $numParts - $realOffset;
        } else {
            $realLength = $length < 0 ? $length + $numParts - $realOffset : $length;
            if ($realLength < 0 || $realLength > $numParts - $realOffset) {
                throw new \OutOfBoundsException(\sprintf('Length %d is out of bounds', $length));
            }
        }
        if ($realLength === 0) {
            // Empty slice is represented as null
            return null;
        }
        return new static(\array_slice($this->parts, $realOffset, $realLength), $this->attributes);
    }
    /**
     * Concatenate two names, yielding a new Name instance.
     *
     * The type of the generated instance depends on which class this method is called on, for
     * example Name\FullyQualified::concat() will yield a Name\FullyQualified instance.
     *
     * If one of the arguments is null, a new instance of the other name will be returned. If both
     * arguments are null, null will be returned. As such, writing
     *     Name::concat($namespace, $shortName)
     * where $namespace is a Name node or null will work as expected.
     *
     * @param string|string[]|self|null $name1      The first name
     * @param string|string[]|self|null $name2      The second name
     * @param array                     $attributes Attributes to assign to concatenated name
     *
     * @return static|null Concatenated name
     */
    public static function concat($name1, $name2, array $attributes = [])
    {
        if (null === $name1 && null === $name2) {
            return null;
        } elseif (null === $name1) {
            return new static(self::prepareName($name2), $attributes);
        } elseif (null === $name2) {
            return new static(self::prepareName($name1), $attributes);
        } else {
            return new static(\array_merge(self::prepareName($name1), self::prepareName($name2)), $attributes);
        }
    }
    /**
     * Prepares a (string, array or Name node) name for use in name changing methods by converting
     * it to an array.
     *
     * @param string|string[]|self $name Name to prepare
     *
     * @return string[] Prepared name
     */
    private static function prepareName($name) : array
    {
        if (\is_string($name)) {
            if ('' === $name) {
                throw new \InvalidArgumentException('Name cannot be empty');
            }
            return \explode('\\', $name);
        } elseif (\is_array($name)) {
            if (empty($name)) {
                throw new \InvalidArgumentException('Name cannot be empty');
            }
            return $name;
        } elseif ($name instanceof self) {
            return $name->parts;
        }
        throw new \InvalidArgumentException('Expected string, array of parts or Name instance');
    }
    public function getType() : string
    {
        return 'Name';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class Const_ extends Node\Stmt
{
    /** @var Node\Const_[] Constant declarations */
    public $consts;
    /**
     * Constructs a const list node.
     *
     * @param Node\Const_[] $consts     Constant declarations
     * @param array         $attributes Additional attributes
     */
    public function __construct(array $consts, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->consts = $consts;
    }
    public function getSubNodeNames() : array
    {
        return ['consts'];
    }
    public function getType() : string
    {
        return 'Stmt_Const';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class Declare_ extends Node\Stmt
{
    /** @var DeclareDeclare[] List of declares */
    public $declares;
    /** @var Node\Stmt[]|null Statements */
    public $stmts;
    /**
     * Constructs a declare node.
     *
     * @param DeclareDeclare[] $declares   List of declares
     * @param Node\Stmt[]|null $stmts      Statements
     * @param array            $attributes Additional attributes
     */
    public function __construct(array $declares, array $stmts = null, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->declares = $declares;
        $this->stmts = $stmts;
    }
    public function getSubNodeNames() : array
    {
        return ['declares', 'stmts'];
    }
    public function getType() : string
    {
        return 'Stmt_Declare';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class Do_ extends Node\Stmt
{
    /** @var Node\Stmt[] Statements */
    public $stmts;
    /** @var Node\Expr Condition */
    public $cond;
    /**
     * Constructs a do while node.
     *
     * @param Node\Expr   $cond       Condition
     * @param Node\Stmt[] $stmts      Statements
     * @param array       $attributes Additional attributes
     */
    public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->cond = $cond;
        $this->stmts = $stmts;
    }
    public function getSubNodeNames() : array
    {
        return ['stmts', 'cond'];
    }
    public function getType() : string
    {
        return 'Stmt_Do';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
use PhpParser\Node\FunctionLike;
class Function_ extends Node\Stmt implements FunctionLike
{
    /** @var bool Whether function returns by reference */
    public $byRef;
    /** @var Node\Identifier Name */
    public $name;
    /** @var Node\Param[] Parameters */
    public $params;
    /** @var null|Node\Identifier|Node\Name|Node\ComplexType Return type */
    public $returnType;
    /** @var Node\Stmt[] Statements */
    public $stmts;
    /** @var Node\AttributeGroup[] PHP attribute groups */
    public $attrGroups;
    /** @var Node\Name|null Namespaced name (if using NameResolver) */
    public $namespacedName;
    /**
     * Constructs a function node.
     *
     * @param string|Node\Identifier $name Name
     * @param array  $subNodes   Array of the following optional subnodes:
     *                           'byRef'      => false  : Whether to return by reference
     *                           'params'     => array(): Parameters
     *                           'returnType' => null   : Return type
     *                           'stmts'      => array(): Statements
     *                           'attrGroups' => array(): PHP attribute groups
     * @param array  $attributes Additional attributes
     */
    public function __construct($name, array $subNodes = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->byRef = $subNodes['byRef'] ?? \false;
        $this->name = \is_string($name) ? new Node\Identifier($name) : $name;
        $this->params = $subNodes['params'] ?? [];
        $returnType = $subNodes['returnType'] ?? null;
        $this->returnType = \is_string($returnType) ? new Node\Identifier($returnType) : $returnType;
        $this->stmts = $subNodes['stmts'] ?? [];
        $this->attrGroups = $subNodes['attrGroups'] ?? [];
    }
    public function getSubNodeNames() : array
    {
        return ['attrGroups', 'byRef', 'name', 'params', 'returnType', 'stmts'];
    }
    public function returnsByRef() : bool
    {
        return $this->byRef;
    }
    public function getParams() : array
    {
        return $this->params;
    }
    public function getReturnType()
    {
        return $this->returnType;
    }
    public function getAttrGroups() : array
    {
        return $this->attrGroups;
    }
    /** @return Node\Stmt[] */
    public function getStmts() : array
    {
        return $this->stmts;
    }
    public function getType() : string
    {
        return 'Stmt_Function';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class Break_ extends Node\Stmt
{
    /** @var null|Node\Expr Number of loops to break */
    public $num;
    /**
     * Constructs a break node.
     *
     * @param null|Node\Expr $num        Number of loops to break
     * @param array          $attributes Additional attributes
     */
    public function __construct(Node\Expr $num = null, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->num = $num;
    }
    public function getSubNodeNames() : array
    {
        return ['num'];
    }
    public function getType() : string
    {
        return 'Stmt_Break';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class Unset_ extends Node\Stmt
{
    /** @var Node\Expr[] Variables to unset */
    public $vars;
    /**
     * Constructs an unset node.
     *
     * @param Node\Expr[] $vars       Variables to unset
     * @param array       $attributes Additional attributes
     */
    public function __construct(array $vars, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->vars = $vars;
    }
    public function getSubNodeNames() : array
    {
        return ['vars'];
    }
    public function getType() : string
    {
        return 'Stmt_Unset';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node\Stmt;
class Use_ extends Stmt
{
    /**
     * Unknown type. Both Stmt\Use_ / Stmt\GroupUse and Stmt\UseUse have a $type property, one of them will always be
     * TYPE_UNKNOWN while the other has one of the three other possible types. For normal use statements the type on the
     * Stmt\UseUse is unknown. It's only the other way around for mixed group use declarations.
     */
    const TYPE_UNKNOWN = 0;
    /** Class or namespace import */
    const TYPE_NORMAL = 1;
    /** Function import */
    const TYPE_FUNCTION = 2;
    /** Constant import */
    const TYPE_CONSTANT = 3;
    /** @var int Type of alias */
    public $type;
    /** @var UseUse[] Aliases */
    public $uses;
    /**
     * Constructs an alias (use) list node.
     *
     * @param UseUse[] $uses       Aliases
     * @param int      $type       Type of alias
     * @param array    $attributes Additional attributes
     */
    public function __construct(array $uses, int $type = self::TYPE_NORMAL, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->type = $type;
        $this->uses = $uses;
    }
    public function getSubNodeNames() : array
    {
        return ['type', 'uses'];
    }
    public function getType() : string
    {
        return 'Stmt_Use';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class For_ extends Node\Stmt
{
    /** @var Node\Expr[] Init expressions */
    public $init;
    /** @var Node\Expr[] Loop conditions */
    public $cond;
    /** @var Node\Expr[] Loop expressions */
    public $loop;
    /** @var Node\Stmt[] Statements */
    public $stmts;
    /**
     * Constructs a for loop node.
     *
     * @param array $subNodes   Array of the following optional subnodes:
     *                          'init'  => array(): Init expressions
     *                          'cond'  => array(): Loop conditions
     *                          'loop'  => array(): Loop expressions
     *                          'stmts' => array(): Statements
     * @param array $attributes Additional attributes
     */
    public function __construct(array $subNodes = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->init = $subNodes['init'] ?? [];
        $this->cond = $subNodes['cond'] ?? [];
        $this->loop = $subNodes['loop'] ?? [];
        $this->stmts = $subNodes['stmts'] ?? [];
    }
    public function getSubNodeNames() : array
    {
        return ['init', 'cond', 'loop', 'stmts'];
    }
    public function getType() : string
    {
        return 'Stmt_For';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
use PhpParser\Node\FunctionLike;
class ClassMethod extends Node\Stmt implements FunctionLike
{
    /** @var int Flags */
    public $flags;
    /** @var bool Whether to return by reference */
    public $byRef;
    /** @var Node\Identifier Name */
    public $name;
    /** @var Node\Param[] Parameters */
    public $params;
    /** @var null|Node\Identifier|Node\Name|Node\ComplexType Return type */
    public $returnType;
    /** @var Node\Stmt[]|null Statements */
    public $stmts;
    /** @var Node\AttributeGroup[] PHP attribute groups */
    public $attrGroups;
    private static $magicNames = ['__construct' => \true, '__destruct' => \true, '__call' => \true, '__callstatic' => \true, '__get' => \true, '__set' => \true, '__isset' => \true, '__unset' => \true, '__sleep' => \true, '__wakeup' => \true, '__tostring' => \true, '__set_state' => \true, '__clone' => \true, '__invoke' => \true, '__debuginfo' => \true, '__serialize' => \true, '__unserialize' => \true];
    /**
     * Constructs a class method node.
     *
     * @param string|Node\Identifier $name Name
     * @param array $subNodes   Array of the following optional subnodes:
     *                          'flags       => MODIFIER_PUBLIC: Flags
     *                          'byRef'      => false          : Whether to return by reference
     *                          'params'     => array()        : Parameters
     *                          'returnType' => null           : Return type
     *                          'stmts'      => array()        : Statements
     *                          'attrGroups' => array()        : PHP attribute groups
     * @param array $attributes Additional attributes
     */
    public function __construct($name, array $subNodes = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->flags = $subNodes['flags'] ?? $subNodes['type'] ?? 0;
        $this->byRef = $subNodes['byRef'] ?? \false;
        $this->name = \is_string($name) ? new Node\Identifier($name) : $name;
        $this->params = $subNodes['params'] ?? [];
        $returnType = $subNodes['returnType'] ?? null;
        $this->returnType = \is_string($returnType) ? new Node\Identifier($returnType) : $returnType;
        $this->stmts = \array_key_exists('stmts', $subNodes) ? $subNodes['stmts'] : [];
        $this->attrGroups = $subNodes['attrGroups'] ?? [];
    }
    public function getSubNodeNames() : array
    {
        return ['attrGroups', 'flags', 'byRef', 'name', 'params', 'returnType', 'stmts'];
    }
    public function returnsByRef() : bool
    {
        return $this->byRef;
    }
    public function getParams() : array
    {
        return $this->params;
    }
    public function getReturnType()
    {
        return $this->returnType;
    }
    public function getStmts()
    {
        return $this->stmts;
    }
    public function getAttrGroups() : array
    {
        return $this->attrGroups;
    }
    /**
     * Whether the method is explicitly or implicitly public.
     *
     * @return bool
     */
    public function isPublic() : bool
    {
        return ($this->flags & \PhpParser\Node\Stmt\Class_::MODIFIER_PUBLIC) !== 0 || ($this->flags & \PhpParser\Node\Stmt\Class_::VISIBILITY_MODIFIER_MASK) === 0;
    }
    /**
     * Whether the method is protected.
     *
     * @return bool
     */
    public function isProtected() : bool
    {
        return (bool) ($this->flags & \PhpParser\Node\Stmt\Class_::MODIFIER_PROTECTED);
    }
    /**
     * Whether the method is private.
     *
     * @return bool
     */
    public function isPrivate() : bool
    {
        return (bool) ($this->flags & \PhpParser\Node\Stmt\Class_::MODIFIER_PRIVATE);
    }
    /**
     * Whether the method is abstract.
     *
     * @return bool
     */
    public function isAbstract() : bool
    {
        return (bool) ($this->flags & \PhpParser\Node\Stmt\Class_::MODIFIER_ABSTRACT);
    }
    /**
     * Whether the method is final.
     *
     * @return bool
     */
    public function isFinal() : bool
    {
        return (bool) ($this->flags & \PhpParser\Node\Stmt\Class_::MODIFIER_FINAL);
    }
    /**
     * Whether the method is static.
     *
     * @return bool
     */
    public function isStatic() : bool
    {
        return (bool) ($this->flags & \PhpParser\Node\Stmt\Class_::MODIFIER_STATIC);
    }
    /**
     * Whether the method is magic.
     *
     * @return bool
     */
    public function isMagic() : bool
    {
        return isset(self::$magicNames[$this->name->toLowerString()]);
    }
    public function getType() : string
    {
        return 'Stmt_ClassMethod';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class Trait_ extends \PhpParser\Node\Stmt\ClassLike
{
    /**
     * Constructs a trait node.
     *
     * @param string|Node\Identifier $name Name
     * @param array  $subNodes   Array of the following optional subnodes:
     *                           'stmts'      => array(): Statements
     *                           'attrGroups' => array(): PHP attribute groups
     * @param array  $attributes Additional attributes
     */
    public function __construct($name, array $subNodes = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->name = \is_string($name) ? new Node\Identifier($name) : $name;
        $this->stmts = $subNodes['stmts'] ?? [];
        $this->attrGroups = $subNodes['attrGroups'] ?? [];
    }
    public function getSubNodeNames() : array
    {
        return ['attrGroups', 'name', 'stmts'];
    }
    public function getType() : string
    {
        return 'Stmt_Trait';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class Throw_ extends Node\Stmt
{
    /** @var Node\Expr Expression */
    public $expr;
    /**
     * Constructs a legacy throw statement node.
     *
     * @param Node\Expr $expr       Expression
     * @param array     $attributes Additional attributes
     */
    public function __construct(Node\Expr $expr, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->expr = $expr;
    }
    public function getSubNodeNames() : array
    {
        return ['expr'];
    }
    public function getType() : string
    {
        return 'Stmt_Throw';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class TraitUse extends Node\Stmt
{
    /** @var Node\Name[] Traits */
    public $traits;
    /** @var TraitUseAdaptation[] Adaptations */
    public $adaptations;
    /**
     * Constructs a trait use node.
     *
     * @param Node\Name[]          $traits      Traits
     * @param TraitUseAdaptation[] $adaptations Adaptations
     * @param array                $attributes  Additional attributes
     */
    public function __construct(array $traits, array $adaptations = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->traits = $traits;
        $this->adaptations = $adaptations;
    }
    public function getSubNodeNames() : array
    {
        return ['traits', 'adaptations'];
    }
    public function getType() : string
    {
        return 'Stmt_TraitUse';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
use PhpParser\Node\AttributeGroup;
class EnumCase extends Node\Stmt
{
    /** @var Node\Identifier Enum case name */
    public $name;
    /** @var Node\Expr|null Enum case expression */
    public $expr;
    /** @var Node\AttributeGroup[] PHP attribute groups */
    public $attrGroups;
    /**
     * @param string|Node\Identifier    $name       Enum case name
     * @param Node\Expr|null            $expr       Enum case expression
     * @param AttributeGroup[]          $attrGroups PHP attribute groups
     * @param array                     $attributes Additional attributes
     */
    public function __construct($name, Node\Expr $expr = null, array $attrGroups = [], array $attributes = [])
    {
        parent::__construct($attributes);
        $this->name = \is_string($name) ? new Node\Identifier($name) : $name;
        $this->expr = $expr;
        $this->attrGroups = $attrGroups;
    }
    public function getSubNodeNames() : array
    {
        return ['attrGroups', 'name', 'expr'];
    }
    public function getType() : string
    {
        return 'Stmt_EnumCase';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
/**
 * Represents statements of type "expr;"
 */
class Expression extends Node\Stmt
{
    /** @var Node\Expr Expression */
    public $expr;
    /**
     * Constructs an expression statement.
     *
     * @param Node\Expr $expr       Expression
     * @param array     $attributes Additional attributes
     */
    public function __construct(Node\Expr $expr, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->expr = $expr;
    }
    public function getSubNodeNames() : array
    {
        return ['expr'];
    }
    public function getType() : string
    {
        return 'Stmt_Expression';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Error;
use PhpParser\Node;
class Class_ extends \PhpParser\Node\Stmt\ClassLike
{
    const MODIFIER_PUBLIC = 1;
    const MODIFIER_PROTECTED = 2;
    const MODIFIER_PRIVATE = 4;
    const MODIFIER_STATIC = 8;
    const MODIFIER_ABSTRACT = 16;
    const MODIFIER_FINAL = 32;
    const MODIFIER_READONLY = 64;
    const VISIBILITY_MODIFIER_MASK = 7;
    // 1 | 2 | 4
    /** @var int Type */
    public $flags;
    /** @var null|Node\Name Name of extended class */
    public $extends;
    /** @var Node\Name[] Names of implemented interfaces */
    public $implements;
    /**
     * Constructs a class node.
     *
     * @param string|Node\Identifier|null $name Name
     * @param array       $subNodes   Array of the following optional subnodes:
     *                                'flags'       => 0      : Flags
     *                                'extends'     => null   : Name of extended class
     *                                'implements'  => array(): Names of implemented interfaces
     *                                'stmts'       => array(): Statements
     *                                'attrGroups'  => array(): PHP attribute groups
     * @param array       $attributes Additional attributes
     */
    public function __construct($name, array $subNodes = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->flags = $subNodes['flags'] ?? $subNodes['type'] ?? 0;
        $this->name = \is_string($name) ? new Node\Identifier($name) : $name;
        $this->extends = $subNodes['extends'] ?? null;
        $this->implements = $subNodes['implements'] ?? [];
        $this->stmts = $subNodes['stmts'] ?? [];
        $this->attrGroups = $subNodes['attrGroups'] ?? [];
    }
    public function getSubNodeNames() : array
    {
        return ['attrGroups', 'flags', 'name', 'extends', 'implements', 'stmts'];
    }
    /**
     * Whether the class is explicitly abstract.
     *
     * @return bool
     */
    public function isAbstract() : bool
    {
        return (bool) ($this->flags & self::MODIFIER_ABSTRACT);
    }
    /**
     * Whether the class is final.
     *
     * @return bool
     */
    public function isFinal() : bool
    {
        return (bool) ($this->flags & self::MODIFIER_FINAL);
    }
    public function isReadonly() : bool
    {
        return (bool) ($this->flags & self::MODIFIER_READONLY);
    }
    /**
     * Whether the class is anonymous.
     *
     * @return bool
     */
    public function isAnonymous() : bool
    {
        return null === $this->name;
    }
    /**
     * @internal
     */
    public static function verifyClassModifier($a, $b)
    {
        if ($a & self::MODIFIER_ABSTRACT && $b & self::MODIFIER_ABSTRACT) {
            throw new Error('Multiple abstract modifiers are not allowed');
        }
        if ($a & self::MODIFIER_FINAL && $b & self::MODIFIER_FINAL) {
            throw new Error('Multiple final modifiers are not allowed');
        }
        if ($a & self::MODIFIER_READONLY && $b & self::MODIFIER_READONLY) {
            throw new Error('Multiple readonly modifiers are not allowed');
        }
        if ($a & 48 && $b & 48) {
            throw new Error('Cannot use the final modifier on an abstract class');
        }
    }
    /**
     * @internal
     */
    public static function verifyModifier($a, $b)
    {
        if ($a & self::VISIBILITY_MODIFIER_MASK && $b & self::VISIBILITY_MODIFIER_MASK) {
            throw new Error('Multiple access type modifiers are not allowed');
        }
        if ($a & self::MODIFIER_ABSTRACT && $b & self::MODIFIER_ABSTRACT) {
            throw new Error('Multiple abstract modifiers are not allowed');
        }
        if ($a & self::MODIFIER_STATIC && $b & self::MODIFIER_STATIC) {
            throw new Error('Multiple static modifiers are not allowed');
        }
        if ($a & self::MODIFIER_FINAL && $b & self::MODIFIER_FINAL) {
            throw new Error('Multiple final modifiers are not allowed');
        }
        if ($a & self::MODIFIER_READONLY && $b & self::MODIFIER_READONLY) {
            throw new Error('Multiple readonly modifiers are not allowed');
        }
        if ($a & 48 && $b & 48) {
            throw new Error('Cannot use the final modifier on an abstract class member');
        }
    }
    public function getType() : string
    {
        return 'Stmt_Class';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class Else_ extends Node\Stmt
{
    /** @var Node\Stmt[] Statements */
    public $stmts;
    /**
     * Constructs an else node.
     *
     * @param Node\Stmt[] $stmts      Statements
     * @param array       $attributes Additional attributes
     */
    public function __construct(array $stmts = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->stmts = $stmts;
    }
    public function getSubNodeNames() : array
    {
        return ['stmts'];
    }
    public function getType() : string
    {
        return 'Stmt_Else';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
abstract class ClassLike extends Node\Stmt
{
    /** @var Node\Identifier|null Name */
    public $name;
    /** @var Node\Stmt[] Statements */
    public $stmts;
    /** @var Node\AttributeGroup[] PHP attribute groups */
    public $attrGroups;
    /** @var Node\Name|null Namespaced name (if using NameResolver) */
    public $namespacedName;
    /**
     * @return TraitUse[]
     */
    public function getTraitUses() : array
    {
        $traitUses = [];
        foreach ($this->stmts as $stmt) {
            if ($stmt instanceof \PhpParser\Node\Stmt\TraitUse) {
                $traitUses[] = $stmt;
            }
        }
        return $traitUses;
    }
    /**
     * @return ClassConst[]
     */
    public function getConstants() : array
    {
        $constants = [];
        foreach ($this->stmts as $stmt) {
            if ($stmt instanceof \PhpParser\Node\Stmt\ClassConst) {
                $constants[] = $stmt;
            }
        }
        return $constants;
    }
    /**
     * @return Property[]
     */
    public function getProperties() : array
    {
        $properties = [];
        foreach ($this->stmts as $stmt) {
            if ($stmt instanceof \PhpParser\Node\Stmt\Property) {
                $properties[] = $stmt;
            }
        }
        return $properties;
    }
    /**
     * Gets property with the given name defined directly in this class/interface/trait.
     *
     * @param string $name Name of the property
     *
     * @return Property|null Property node or null if the property does not exist
     */
    public function getProperty(string $name)
    {
        foreach ($this->stmts as $stmt) {
            if ($stmt instanceof \PhpParser\Node\Stmt\Property) {
                foreach ($stmt->props as $prop) {
                    if ($prop instanceof \PhpParser\Node\Stmt\PropertyProperty && $name === $prop->name->toString()) {
                        return $stmt;
                    }
                }
            }
        }
        return null;
    }
    /**
     * Gets all methods defined directly in this class/interface/trait
     *
     * @return ClassMethod[]
     */
    public function getMethods() : array
    {
        $methods = [];
        foreach ($this->stmts as $stmt) {
            if ($stmt instanceof \PhpParser\Node\Stmt\ClassMethod) {
                $methods[] = $stmt;
            }
        }
        return $methods;
    }
    /**
     * Gets method with the given name defined directly in this class/interface/trait.
     *
     * @param string $name Name of the method (compared case-insensitively)
     *
     * @return ClassMethod|null Method node or null if the method does not exist
     */
    public function getMethod(string $name)
    {
        $lowerName = \strtolower($name);
        foreach ($this->stmts as $stmt) {
            if ($stmt instanceof \PhpParser\Node\Stmt\ClassMethod && $lowerName === $stmt->name->toLowerString()) {
                return $stmt;
            }
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node\Identifier;
use PhpParser\Node\Stmt;
class Goto_ extends Stmt
{
    /** @var Identifier Name of label to jump to */
    public $name;
    /**
     * Constructs a goto node.
     *
     * @param string|Identifier $name       Name of label to jump to
     * @param array             $attributes Additional attributes
     */
    public function __construct($name, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->name = \is_string($name) ? new Identifier($name) : $name;
    }
    public function getSubNodeNames() : array
    {
        return ['name'];
    }
    public function getType() : string
    {
        return 'Stmt_Goto';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
use PhpParser\Node\ComplexType;
use PhpParser\Node\Identifier;
use PhpParser\Node\Name;
class Property extends Node\Stmt
{
    /** @var int Modifiers */
    public $flags;
    /** @var PropertyProperty[] Properties */
    public $props;
    /** @var null|Identifier|Name|ComplexType Type declaration */
    public $type;
    /** @var Node\AttributeGroup[] PHP attribute groups */
    public $attrGroups;
    /**
     * Constructs a class property list node.
     *
     * @param int                                     $flags      Modifiers
     * @param PropertyProperty[]                      $props      Properties
     * @param array                                   $attributes Additional attributes
     * @param null|string|Identifier|Name|ComplexType $type       Type declaration
     * @param Node\AttributeGroup[]                   $attrGroups PHP attribute groups
     */
    public function __construct(int $flags, array $props, array $attributes = [], $type = null, array $attrGroups = [])
    {
        $this->attributes = $attributes;
        $this->flags = $flags;
        $this->props = $props;
        $this->type = \is_string($type) ? new Identifier($type) : $type;
        $this->attrGroups = $attrGroups;
    }
    public function getSubNodeNames() : array
    {
        return ['attrGroups', 'flags', 'type', 'props'];
    }
    /**
     * Whether the property is explicitly or implicitly public.
     *
     * @return bool
     */
    public function isPublic() : bool
    {
        return ($this->flags & \PhpParser\Node\Stmt\Class_::MODIFIER_PUBLIC) !== 0 || ($this->flags & \PhpParser\Node\Stmt\Class_::VISIBILITY_MODIFIER_MASK) === 0;
    }
    /**
     * Whether the property is protected.
     *
     * @return bool
     */
    public function isProtected() : bool
    {
        return (bool) ($this->flags & \PhpParser\Node\Stmt\Class_::MODIFIER_PROTECTED);
    }
    /**
     * Whether the property is private.
     *
     * @return bool
     */
    public function isPrivate() : bool
    {
        return (bool) ($this->flags & \PhpParser\Node\Stmt\Class_::MODIFIER_PRIVATE);
    }
    /**
     * Whether the property is static.
     *
     * @return bool
     */
    public function isStatic() : bool
    {
        return (bool) ($this->flags & \PhpParser\Node\Stmt\Class_::MODIFIER_STATIC);
    }
    /**
     * Whether the property is readonly.
     *
     * @return bool
     */
    public function isReadonly() : bool
    {
        return (bool) ($this->flags & \PhpParser\Node\Stmt\Class_::MODIFIER_READONLY);
    }
    public function getType() : string
    {
        return 'Stmt_Property';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
use PhpParser\Node\Expr;
class Catch_ extends Node\Stmt
{
    /** @var Node\Name[] Types of exceptions to catch */
    public $types;
    /** @var Expr\Variable|null Variable for exception */
    public $var;
    /** @var Node\Stmt[] Statements */
    public $stmts;
    /**
     * Constructs a catch node.
     *
     * @param Node\Name[]           $types      Types of exceptions to catch
     * @param Expr\Variable|null    $var        Variable for exception
     * @param Node\Stmt[]           $stmts      Statements
     * @param array                 $attributes Additional attributes
     */
    public function __construct(array $types, Expr\Variable $var = null, array $stmts = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->types = $types;
        $this->var = $var;
        $this->stmts = $stmts;
    }
    public function getSubNodeNames() : array
    {
        return ['types', 'var', 'stmts'];
    }
    public function getType() : string
    {
        return 'Stmt_Catch';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class ClassConst extends Node\Stmt
{
    /** @var int Modifiers */
    public $flags;
    /** @var Node\Const_[] Constant declarations */
    public $consts;
    /** @var Node\AttributeGroup[] */
    public $attrGroups;
    /**
     * Constructs a class const list node.
     *
     * @param Node\Const_[]         $consts     Constant declarations
     * @param int                   $flags      Modifiers
     * @param array                 $attributes Additional attributes
     * @param Node\AttributeGroup[] $attrGroups PHP attribute groups
     */
    public function __construct(array $consts, int $flags = 0, array $attributes = [], array $attrGroups = [])
    {
        $this->attributes = $attributes;
        $this->flags = $flags;
        $this->consts = $consts;
        $this->attrGroups = $attrGroups;
    }
    public function getSubNodeNames() : array
    {
        return ['attrGroups', 'flags', 'consts'];
    }
    /**
     * Whether constant is explicitly or implicitly public.
     *
     * @return bool
     */
    public function isPublic() : bool
    {
        return ($this->flags & \PhpParser\Node\Stmt\Class_::MODIFIER_PUBLIC) !== 0 || ($this->flags & \PhpParser\Node\Stmt\Class_::VISIBILITY_MODIFIER_MASK) === 0;
    }
    /**
     * Whether constant is protected.
     *
     * @return bool
     */
    public function isProtected() : bool
    {
        return (bool) ($this->flags & \PhpParser\Node\Stmt\Class_::MODIFIER_PROTECTED);
    }
    /**
     * Whether constant is private.
     *
     * @return bool
     */
    public function isPrivate() : bool
    {
        return (bool) ($this->flags & \PhpParser\Node\Stmt\Class_::MODIFIER_PRIVATE);
    }
    /**
     * Whether constant is final.
     *
     * @return bool
     */
    public function isFinal() : bool
    {
        return (bool) ($this->flags & \PhpParser\Node\Stmt\Class_::MODIFIER_FINAL);
    }
    public function getType() : string
    {
        return 'Stmt_ClassConst';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
use PhpParser\Node\Expr;
class StaticVar extends Node\Stmt
{
    /** @var Expr\Variable Variable */
    public $var;
    /** @var null|Node\Expr Default value */
    public $default;
    /**
     * Constructs a static variable node.
     *
     * @param Expr\Variable  $var         Name
     * @param null|Node\Expr $default    Default value
     * @param array          $attributes Additional attributes
     */
    public function __construct(Expr\Variable $var, Node\Expr $default = null, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->var = $var;
        $this->default = $default;
    }
    public function getSubNodeNames() : array
    {
        return ['var', 'default'];
    }
    public function getType() : string
    {
        return 'Stmt_StaticVar';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class TryCatch extends Node\Stmt
{
    /** @var Node\Stmt[] Statements */
    public $stmts;
    /** @var Catch_[] Catches */
    public $catches;
    /** @var null|Finally_ Optional finally node */
    public $finally;
    /**
     * Constructs a try catch node.
     *
     * @param Node\Stmt[]   $stmts      Statements
     * @param Catch_[]      $catches    Catches
     * @param null|Finally_ $finally    Optional finally node
     * @param array         $attributes Additional attributes
     */
    public function __construct(array $stmts, array $catches, \PhpParser\Node\Stmt\Finally_ $finally = null, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->stmts = $stmts;
        $this->catches = $catches;
        $this->finally = $finally;
    }
    public function getSubNodeNames() : array
    {
        return ['stmts', 'catches', 'finally'];
    }
    public function getType() : string
    {
        return 'Stmt_TryCatch';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt\TraitUseAdaptation;

use PhpParser\Node;
class Alias extends Node\Stmt\TraitUseAdaptation
{
    /** @var null|int New modifier */
    public $newModifier;
    /** @var null|Node\Identifier New name */
    public $newName;
    /**
     * Constructs a trait use precedence adaptation node.
     *
     * @param null|Node\Name              $trait       Trait name
     * @param string|Node\Identifier      $method      Method name
     * @param null|int                    $newModifier New modifier
     * @param null|string|Node\Identifier $newName     New name
     * @param array                       $attributes  Additional attributes
     */
    public function __construct($trait, $method, $newModifier, $newName, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->trait = $trait;
        $this->method = \is_string($method) ? new Node\Identifier($method) : $method;
        $this->newModifier = $newModifier;
        $this->newName = \is_string($newName) ? new Node\Identifier($newName) : $newName;
    }
    public function getSubNodeNames() : array
    {
        return ['trait', 'method', 'newModifier', 'newName'];
    }
    public function getType() : string
    {
        return 'Stmt_TraitUseAdaptation_Alias';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt\TraitUseAdaptation;

use PhpParser\Node;
class Precedence extends Node\Stmt\TraitUseAdaptation
{
    /** @var Node\Name[] Overwritten traits */
    public $insteadof;
    /**
     * Constructs a trait use precedence adaptation node.
     *
     * @param Node\Name              $trait       Trait name
     * @param string|Node\Identifier $method      Method name
     * @param Node\Name[]            $insteadof   Overwritten traits
     * @param array                  $attributes  Additional attributes
     */
    public function __construct(Node\Name $trait, $method, array $insteadof, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->trait = $trait;
        $this->method = \is_string($method) ? new Node\Identifier($method) : $method;
        $this->insteadof = $insteadof;
    }
    public function getSubNodeNames() : array
    {
        return ['trait', 'method', 'insteadof'];
    }
    public function getType() : string
    {
        return 'Stmt_TraitUseAdaptation_Precedence';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class Foreach_ extends Node\Stmt
{
    /** @var Node\Expr Expression to iterate */
    public $expr;
    /** @var null|Node\Expr Variable to assign key to */
    public $keyVar;
    /** @var bool Whether to assign value by reference */
    public $byRef;
    /** @var Node\Expr Variable to assign value to */
    public $valueVar;
    /** @var Node\Stmt[] Statements */
    public $stmts;
    /**
     * Constructs a foreach node.
     *
     * @param Node\Expr $expr       Expression to iterate
     * @param Node\Expr $valueVar   Variable to assign value to
     * @param array     $subNodes   Array of the following optional subnodes:
     *                              'keyVar' => null   : Variable to assign key to
     *                              'byRef'  => false  : Whether to assign value by reference
     *                              'stmts'  => array(): Statements
     * @param array     $attributes Additional attributes
     */
    public function __construct(Node\Expr $expr, Node\Expr $valueVar, array $subNodes = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->expr = $expr;
        $this->keyVar = $subNodes['keyVar'] ?? null;
        $this->byRef = $subNodes['byRef'] ?? \false;
        $this->valueVar = $valueVar;
        $this->stmts = $subNodes['stmts'] ?? [];
    }
    public function getSubNodeNames() : array
    {
        return ['expr', 'keyVar', 'byRef', 'valueVar', 'stmts'];
    }
    public function getType() : string
    {
        return 'Stmt_Foreach';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
abstract class TraitUseAdaptation extends Node\Stmt
{
    /** @var Node\Name|null Trait name */
    public $trait;
    /** @var Node\Identifier Method name */
    public $method;
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class Interface_ extends \PhpParser\Node\Stmt\ClassLike
{
    /** @var Node\Name[] Extended interfaces */
    public $extends;
    /**
     * Constructs a class node.
     *
     * @param string|Node\Identifier $name Name
     * @param array  $subNodes   Array of the following optional subnodes:
     *                           'extends'    => array(): Name of extended interfaces
     *                           'stmts'      => array(): Statements
     *                           'attrGroups' => array(): PHP attribute groups
     * @param array  $attributes Additional attributes
     */
    public function __construct($name, array $subNodes = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->name = \is_string($name) ? new Node\Identifier($name) : $name;
        $this->extends = $subNodes['extends'] ?? [];
        $this->stmts = $subNodes['stmts'] ?? [];
        $this->attrGroups = $subNodes['attrGroups'] ?? [];
    }
    public function getSubNodeNames() : array
    {
        return ['attrGroups', 'name', 'extends', 'stmts'];
    }
    public function getType() : string
    {
        return 'Stmt_Interface';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class While_ extends Node\Stmt
{
    /** @var Node\Expr Condition */
    public $cond;
    /** @var Node\Stmt[] Statements */
    public $stmts;
    /**
     * Constructs a while node.
     *
     * @param Node\Expr   $cond       Condition
     * @param Node\Stmt[] $stmts      Statements
     * @param array       $attributes Additional attributes
     */
    public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->cond = $cond;
        $this->stmts = $stmts;
    }
    public function getSubNodeNames() : array
    {
        return ['cond', 'stmts'];
    }
    public function getType() : string
    {
        return 'Stmt_While';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node\Stmt;
class HaltCompiler extends Stmt
{
    /** @var string Remaining text after halt compiler statement. */
    public $remaining;
    /**
     * Constructs a __halt_compiler node.
     *
     * @param string $remaining  Remaining text after halt compiler statement.
     * @param array  $attributes Additional attributes
     */
    public function __construct(string $remaining, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->remaining = $remaining;
    }
    public function getSubNodeNames() : array
    {
        return ['remaining'];
    }
    public function getType() : string
    {
        return 'Stmt_HaltCompiler';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class Finally_ extends Node\Stmt
{
    /** @var Node\Stmt[] Statements */
    public $stmts;
    /**
     * Constructs a finally node.
     *
     * @param Node\Stmt[] $stmts      Statements
     * @param array       $attributes Additional attributes
     */
    public function __construct(array $stmts = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->stmts = $stmts;
    }
    public function getSubNodeNames() : array
    {
        return ['stmts'];
    }
    public function getType() : string
    {
        return 'Stmt_Finally';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class Continue_ extends Node\Stmt
{
    /** @var null|Node\Expr Number of loops to continue */
    public $num;
    /**
     * Constructs a continue node.
     *
     * @param null|Node\Expr $num        Number of loops to continue
     * @param array          $attributes Additional attributes
     */
    public function __construct(Node\Expr $num = null, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->num = $num;
    }
    public function getSubNodeNames() : array
    {
        return ['num'];
    }
    public function getType() : string
    {
        return 'Stmt_Continue';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
/** Nop/empty statement (;). */
class Nop extends Node\Stmt
{
    public function getSubNodeNames() : array
    {
        return [];
    }
    public function getType() : string
    {
        return 'Stmt_Nop';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class Return_ extends Node\Stmt
{
    /** @var null|Node\Expr Expression */
    public $expr;
    /**
     * Constructs a return node.
     *
     * @param null|Node\Expr $expr       Expression
     * @param array          $attributes Additional attributes
     */
    public function __construct(Node\Expr $expr = null, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->expr = $expr;
    }
    public function getSubNodeNames() : array
    {
        return ['expr'];
    }
    public function getType() : string
    {
        return 'Stmt_Return';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
use PhpParser\Node\Identifier;
class UseUse extends Node\Stmt
{
    /** @var int One of the Stmt\Use_::TYPE_* constants. Will only differ from TYPE_UNKNOWN for mixed group uses */
    public $type;
    /** @var Node\Name Namespace, class, function or constant to alias */
    public $name;
    /** @var Identifier|null Alias */
    public $alias;
    /**
     * Constructs an alias (use) node.
     *
     * @param Node\Name              $name       Namespace/Class to alias
     * @param null|string|Identifier $alias      Alias
     * @param int                    $type       Type of the use element (for mixed group use only)
     * @param array                  $attributes Additional attributes
     */
    public function __construct(Node\Name $name, $alias = null, int $type = \PhpParser\Node\Stmt\Use_::TYPE_UNKNOWN, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->type = $type;
        $this->name = $name;
        $this->alias = \is_string($alias) ? new Identifier($alias) : $alias;
    }
    public function getSubNodeNames() : array
    {
        return ['type', 'name', 'alias'];
    }
    /**
     * Get alias. If not explicitly given this is the last component of the used name.
     *
     * @return Identifier
     */
    public function getAlias() : Identifier
    {
        if (null !== $this->alias) {
            return $this->alias;
        }
        return new Identifier($this->name->getLast());
    }
    public function getType() : string
    {
        return 'Stmt_UseUse';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class DeclareDeclare extends Node\Stmt
{
    /** @var Node\Identifier Key */
    public $key;
    /** @var Node\Expr Value */
    public $value;
    /**
     * Constructs a declare key=>value pair node.
     *
     * @param string|Node\Identifier $key        Key
     * @param Node\Expr              $value      Value
     * @param array                  $attributes Additional attributes
     */
    public function __construct($key, Node\Expr $value, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->key = \is_string($key) ? new Node\Identifier($key) : $key;
        $this->value = $value;
    }
    public function getSubNodeNames() : array
    {
        return ['key', 'value'];
    }
    public function getType() : string
    {
        return 'Stmt_DeclareDeclare';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class Global_ extends Node\Stmt
{
    /** @var Node\Expr[] Variables */
    public $vars;
    /**
     * Constructs a global variables list node.
     *
     * @param Node\Expr[] $vars       Variables to unset
     * @param array       $attributes Additional attributes
     */
    public function __construct(array $vars, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->vars = $vars;
    }
    public function getSubNodeNames() : array
    {
        return ['vars'];
    }
    public function getType() : string
    {
        return 'Stmt_Global';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node\Name;
use PhpParser\Node\Stmt;
class GroupUse extends Stmt
{
    /** @var int Type of group use */
    public $type;
    /** @var Name Prefix for uses */
    public $prefix;
    /** @var UseUse[] Uses */
    public $uses;
    /**
     * Constructs a group use node.
     *
     * @param Name     $prefix     Prefix for uses
     * @param UseUse[] $uses       Uses
     * @param int      $type       Type of group use
     * @param array    $attributes Additional attributes
     */
    public function __construct(Name $prefix, array $uses, int $type = \PhpParser\Node\Stmt\Use_::TYPE_NORMAL, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->type = $type;
        $this->prefix = $prefix;
        $this->uses = $uses;
    }
    public function getSubNodeNames() : array
    {
        return ['type', 'prefix', 'uses'];
    }
    public function getType() : string
    {
        return 'Stmt_GroupUse';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node\Identifier;
use PhpParser\Node\Stmt;
class Label extends Stmt
{
    /** @var Identifier Name */
    public $name;
    /**
     * Constructs a label node.
     *
     * @param string|Identifier $name       Name
     * @param array             $attributes Additional attributes
     */
    public function __construct($name, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->name = \is_string($name) ? new Identifier($name) : $name;
    }
    public function getSubNodeNames() : array
    {
        return ['name'];
    }
    public function getType() : string
    {
        return 'Stmt_Label';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class Namespace_ extends Node\Stmt
{
    /* For use in the "kind" attribute */
    const KIND_SEMICOLON = 1;
    const KIND_BRACED = 2;
    /** @var null|Node\Name Name */
    public $name;
    /** @var Node\Stmt[] Statements */
    public $stmts;
    /**
     * Constructs a namespace node.
     *
     * @param null|Node\Name   $name       Name
     * @param null|Node\Stmt[] $stmts      Statements
     * @param array            $attributes Additional attributes
     */
    public function __construct(Node\Name $name = null, $stmts = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->name = $name;
        $this->stmts = $stmts;
    }
    public function getSubNodeNames() : array
    {
        return ['name', 'stmts'];
    }
    public function getType() : string
    {
        return 'Stmt_Namespace';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class Switch_ extends Node\Stmt
{
    /** @var Node\Expr Condition */
    public $cond;
    /** @var Case_[] Case list */
    public $cases;
    /**
     * Constructs a case node.
     *
     * @param Node\Expr $cond       Condition
     * @param Case_[]   $cases      Case list
     * @param array     $attributes Additional attributes
     */
    public function __construct(Node\Expr $cond, array $cases, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->cond = $cond;
        $this->cases = $cases;
    }
    public function getSubNodeNames() : array
    {
        return ['cond', 'cases'];
    }
    public function getType() : string
    {
        return 'Stmt_Switch';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class Enum_ extends \PhpParser\Node\Stmt\ClassLike
{
    /** @var null|Node\Identifier Scalar Type */
    public $scalarType;
    /** @var Node\Name[] Names of implemented interfaces */
    public $implements;
    /**
     * @param string|Node\Identifier|null $name       Name
     * @param array                       $subNodes   Array of the following optional subnodes:
     *                                                'scalarType'  => null    : Scalar type
     *                                                'implements'  => array() : Names of implemented interfaces
     *                                                'stmts'       => array() : Statements
     *                                                'attrGroups'  => array() : PHP attribute groups
     * @param array                       $attributes Additional attributes
     */
    public function __construct($name, array $subNodes = [], array $attributes = [])
    {
        $this->name = \is_string($name) ? new Node\Identifier($name) : $name;
        $this->scalarType = $subNodes['scalarType'] ?? null;
        $this->implements = $subNodes['implements'] ?? [];
        $this->stmts = $subNodes['stmts'] ?? [];
        $this->attrGroups = $subNodes['attrGroups'] ?? [];
        parent::__construct($attributes);
    }
    public function getSubNodeNames() : array
    {
        return ['attrGroups', 'name', 'scalarType', 'implements', 'stmts'];
    }
    public function getType() : string
    {
        return 'Stmt_Enum';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class Case_ extends Node\Stmt
{
    /** @var null|Node\Expr Condition (null for default) */
    public $cond;
    /** @var Node\Stmt[] Statements */
    public $stmts;
    /**
     * Constructs a case node.
     *
     * @param null|Node\Expr $cond       Condition (null for default)
     * @param Node\Stmt[]    $stmts      Statements
     * @param array          $attributes Additional attributes
     */
    public function __construct($cond, array $stmts = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->cond = $cond;
        $this->stmts = $stmts;
    }
    public function getSubNodeNames() : array
    {
        return ['cond', 'stmts'];
    }
    public function getType() : string
    {
        return 'Stmt_Case';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class Echo_ extends Node\Stmt
{
    /** @var Node\Expr[] Expressions */
    public $exprs;
    /**
     * Constructs an echo node.
     *
     * @param Node\Expr[] $exprs      Expressions
     * @param array       $attributes Additional attributes
     */
    public function __construct(array $exprs, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->exprs = $exprs;
    }
    public function getSubNodeNames() : array
    {
        return ['exprs'];
    }
    public function getType() : string
    {
        return 'Stmt_Echo';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class PropertyProperty extends Node\Stmt
{
    /** @var Node\VarLikeIdentifier Name */
    public $name;
    /** @var null|Node\Expr Default */
    public $default;
    /**
     * Constructs a class property node.
     *
     * @param string|Node\VarLikeIdentifier $name       Name
     * @param null|Node\Expr                $default    Default value
     * @param array                         $attributes Additional attributes
     */
    public function __construct($name, Node\Expr $default = null, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->name = \is_string($name) ? new Node\VarLikeIdentifier($name) : $name;
        $this->default = $default;
    }
    public function getSubNodeNames() : array
    {
        return ['name', 'default'];
    }
    public function getType() : string
    {
        return 'Stmt_PropertyProperty';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node\Stmt;
class InlineHTML extends Stmt
{
    /** @var string String */
    public $value;
    /**
     * Constructs an inline HTML node.
     *
     * @param string $value      String
     * @param array  $attributes Additional attributes
     */
    public function __construct(string $value, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->value = $value;
    }
    public function getSubNodeNames() : array
    {
        return ['value'];
    }
    public function getType() : string
    {
        return 'Stmt_InlineHTML';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class ElseIf_ extends Node\Stmt
{
    /** @var Node\Expr Condition */
    public $cond;
    /** @var Node\Stmt[] Statements */
    public $stmts;
    /**
     * Constructs an elseif node.
     *
     * @param Node\Expr   $cond       Condition
     * @param Node\Stmt[] $stmts      Statements
     * @param array       $attributes Additional attributes
     */
    public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->cond = $cond;
        $this->stmts = $stmts;
    }
    public function getSubNodeNames() : array
    {
        return ['cond', 'stmts'];
    }
    public function getType() : string
    {
        return 'Stmt_ElseIf';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node\Stmt;
class Static_ extends Stmt
{
    /** @var StaticVar[] Variable definitions */
    public $vars;
    /**
     * Constructs a static variables list node.
     *
     * @param StaticVar[] $vars       Variable definitions
     * @param array       $attributes Additional attributes
     */
    public function __construct(array $vars, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->vars = $vars;
    }
    public function getSubNodeNames() : array
    {
        return ['vars'];
    }
    public function getType() : string
    {
        return 'Stmt_Static';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Stmt;

use PhpParser\Node;
class If_ extends Node\Stmt
{
    /** @var Node\Expr Condition expression */
    public $cond;
    /** @var Node\Stmt[] Statements */
    public $stmts;
    /** @var ElseIf_[] Elseif clauses */
    public $elseifs;
    /** @var null|Else_ Else clause */
    public $else;
    /**
     * Constructs an if node.
     *
     * @param Node\Expr $cond       Condition
     * @param array     $subNodes   Array of the following optional subnodes:
     *                              'stmts'   => array(): Statements
     *                              'elseifs' => array(): Elseif clauses
     *                              'else'    => null   : Else clause
     * @param array     $attributes Additional attributes
     */
    public function __construct(Node\Expr $cond, array $subNodes = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->cond = $cond;
        $this->stmts = $subNodes['stmts'] ?? [];
        $this->elseifs = $subNodes['elseifs'] ?? [];
        $this->else = $subNodes['else'] ?? null;
    }
    public function getSubNodeNames() : array
    {
        return ['cond', 'stmts', 'elseifs', 'else'];
    }
    public function getType() : string
    {
        return 'Stmt_If';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node;

use PhpParser\Node;
use PhpParser\NodeAbstract;
class AttributeGroup extends NodeAbstract
{
    /** @var Attribute[] Attributes */
    public $attrs;
    /**
     * @param Attribute[] $attrs PHP attributes
     * @param array $attributes Additional node attributes
     */
    public function __construct(array $attrs, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->attrs = $attrs;
    }
    public function getSubNodeNames() : array
    {
        return ['attrs'];
    }
    public function getType() : string
    {
        return 'AttributeGroup';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node;

use PhpParser\Node;
use PhpParser\NodeAbstract;
class Attribute extends NodeAbstract
{
    /** @var Name Attribute name */
    public $name;
    /** @var Arg[] Attribute arguments */
    public $args;
    /**
     * @param Node\Name $name       Attribute name
     * @param Arg[]     $args       Attribute arguments
     * @param array     $attributes Additional node attributes
     */
    public function __construct(\PhpParser\Node\Name $name, array $args = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->name = $name;
        $this->args = $args;
    }
    public function getSubNodeNames() : array
    {
        return ['name', 'args'];
    }
    public function getType() : string
    {
        return 'Attribute';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node;

use PhpParser\Node;
use PhpParser\NodeAbstract;
class MatchArm extends NodeAbstract
{
    /** @var null|Node\Expr[] */
    public $conds;
    /** @var Node\Expr */
    public $body;
    /**
     * @param null|Node\Expr[] $conds
     */
    public function __construct($conds, Node\Expr $body, array $attributes = [])
    {
        $this->conds = $conds;
        $this->body = $body;
        $this->attributes = $attributes;
    }
    public function getSubNodeNames() : array
    {
        return ['conds', 'body'];
    }
    public function getType() : string
    {
        return 'MatchArm';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class Include_ extends Expr
{
    const TYPE_INCLUDE = 1;
    const TYPE_INCLUDE_ONCE = 2;
    const TYPE_REQUIRE = 3;
    const TYPE_REQUIRE_ONCE = 4;
    /** @var Expr Expression */
    public $expr;
    /** @var int Type of include */
    public $type;
    /**
     * Constructs an include node.
     *
     * @param Expr  $expr       Expression
     * @param int   $type       Type of include
     * @param array $attributes Additional attributes
     */
    public function __construct(Expr $expr, int $type, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->expr = $expr;
        $this->type = $type;
    }
    public function getSubNodeNames() : array
    {
        return ['expr', 'type'];
    }
    public function getType() : string
    {
        return 'Expr_Include';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class Array_ extends Expr
{
    // For use in "kind" attribute
    const KIND_LONG = 1;
    // array() syntax
    const KIND_SHORT = 2;
    // [] syntax
    /** @var (ArrayItem|null)[] Items */
    public $items;
    /**
     * Constructs an array node.
     *
     * @param (ArrayItem|null)[] $items      Items of the array
     * @param array       $attributes Additional attributes
     */
    public function __construct(array $items = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->items = $items;
    }
    public function getSubNodeNames() : array
    {
        return ['items'];
    }
    public function getType() : string
    {
        return 'Expr_Array';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class Assign extends Expr
{
    /** @var Expr Variable */
    public $var;
    /** @var Expr Expression */
    public $expr;
    /**
     * Constructs an assignment node.
     *
     * @param Expr  $var        Variable
     * @param Expr  $expr       Expression
     * @param array $attributes Additional attributes
     */
    public function __construct(Expr $var, Expr $expr, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->var = $var;
        $this->expr = $expr;
    }
    public function getSubNodeNames() : array
    {
        return ['var', 'expr'];
    }
    public function getType() : string
    {
        return 'Expr_Assign';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class YieldFrom extends Expr
{
    /** @var Expr Expression to yield from */
    public $expr;
    /**
     * Constructs an "yield from" node.
     *
     * @param Expr  $expr       Expression
     * @param array $attributes Additional attributes
     */
    public function __construct(Expr $expr, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->expr = $expr;
    }
    public function getSubNodeNames() : array
    {
        return ['expr'];
    }
    public function getType() : string
    {
        return 'Expr_YieldFrom';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node;
use PhpParser\Node\Expr;
class FuncCall extends \PhpParser\Node\Expr\CallLike
{
    /** @var Node\Name|Expr Function name */
    public $name;
    /** @var array<Node\Arg|Node\VariadicPlaceholder> Arguments */
    public $args;
    /**
     * Constructs a function call node.
     *
     * @param Node\Name|Expr                           $name       Function name
     * @param array<Node\Arg|Node\VariadicPlaceholder> $args       Arguments
     * @param array                                    $attributes Additional attributes
     */
    public function __construct($name, array $args = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->name = $name;
        $this->args = $args;
    }
    public function getSubNodeNames() : array
    {
        return ['name', 'args'];
    }
    public function getType() : string
    {
        return 'Expr_FuncCall';
    }
    public function getRawArgs() : array
    {
        return $this->args;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class BitwiseNot extends Expr
{
    /** @var Expr Expression */
    public $expr;
    /**
     * Constructs a bitwise not node.
     *
     * @param Expr  $expr       Expression
     * @param array $attributes Additional attributes
     */
    public function __construct(Expr $expr, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->expr = $expr;
    }
    public function getSubNodeNames() : array
    {
        return ['expr'];
    }
    public function getType() : string
    {
        return 'Expr_BitwiseNot';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class ClosureUse extends Expr
{
    /** @var Expr\Variable Variable to use */
    public $var;
    /** @var bool Whether to use by reference */
    public $byRef;
    /**
     * Constructs a closure use node.
     *
     * @param Expr\Variable $var        Variable to use
     * @param bool          $byRef      Whether to use by reference
     * @param array         $attributes Additional attributes
     */
    public function __construct(Expr\Variable $var, bool $byRef = \false, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->var = $var;
        $this->byRef = $byRef;
    }
    public function getSubNodeNames() : array
    {
        return ['var', 'byRef'];
    }
    public function getType() : string
    {
        return 'Expr_ClosureUse';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;

use PhpParser\Node\Expr\BinaryOp;
class Coalesce extends BinaryOp
{
    public function getOperatorSigil() : string
    {
        return '??';
    }
    public function getType() : string
    {
        return 'Expr_BinaryOp_Coalesce';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;

use PhpParser\Node\Expr\BinaryOp;
class NotEqual extends BinaryOp
{
    public function getOperatorSigil() : string
    {
        return '!=';
    }
    public function getType() : string
    {
        return 'Expr_BinaryOp_NotEqual';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;

use PhpParser\Node\Expr\BinaryOp;
class Concat extends BinaryOp
{
    public function getOperatorSigil() : string
    {
        return '.';
    }
    public function getType() : string
    {
        return 'Expr_BinaryOp_Concat';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;

use PhpParser\Node\Expr\BinaryOp;
class Greater extends BinaryOp
{
    public function getOperatorSigil() : string
    {
        return '>';
    }
    public function getType() : string
    {
        return 'Expr_BinaryOp_Greater';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;

use PhpParser\Node\Expr\BinaryOp;
class Plus extends BinaryOp
{
    public function getOperatorSigil() : string
    {
        return '+';
    }
    public function getType() : string
    {
        return 'Expr_BinaryOp_Plus';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;

use PhpParser\Node\Expr\BinaryOp;
class ShiftRight extends BinaryOp
{
    public function getOperatorSigil() : string
    {
        return '>>';
    }
    public function getType() : string
    {
        return 'Expr_BinaryOp_ShiftRight';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;

use PhpParser\Node\Expr\BinaryOp;
class Identical extends BinaryOp
{
    public function getOperatorSigil() : string
    {
        return '===';
    }
    public function getType() : string
    {
        return 'Expr_BinaryOp_Identical';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;

use PhpParser\Node\Expr\BinaryOp;
class LogicalAnd extends BinaryOp
{
    public function getOperatorSigil() : string
    {
        return 'and';
    }
    public function getType() : string
    {
        return 'Expr_BinaryOp_LogicalAnd';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;

use PhpParser\Node\Expr\BinaryOp;
class BooleanOr extends BinaryOp
{
    public function getOperatorSigil() : string
    {
        return '||';
    }
    public function getType() : string
    {
        return 'Expr_BinaryOp_BooleanOr';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;

use PhpParser\Node\Expr\BinaryOp;
class Pow extends BinaryOp
{
    public function getOperatorSigil() : string
    {
        return '**';
    }
    public function getType() : string
    {
        return 'Expr_BinaryOp_Pow';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;

use PhpParser\Node\Expr\BinaryOp;
class BooleanAnd extends BinaryOp
{
    public function getOperatorSigil() : string
    {
        return '&&';
    }
    public function getType() : string
    {
        return 'Expr_BinaryOp_BooleanAnd';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;

use PhpParser\Node\Expr\BinaryOp;
class Mod extends BinaryOp
{
    public function getOperatorSigil() : string
    {
        return '%';
    }
    public function getType() : string
    {
        return 'Expr_BinaryOp_Mod';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;

use PhpParser\Node\Expr\BinaryOp;
class NotIdentical extends BinaryOp
{
    public function getOperatorSigil() : string
    {
        return '!==';
    }
    public function getType() : string
    {
        return 'Expr_BinaryOp_NotIdentical';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;

use PhpParser\Node\Expr\BinaryOp;
class GreaterOrEqual extends BinaryOp
{
    public function getOperatorSigil() : string
    {
        return '>=';
    }
    public function getType() : string
    {
        return 'Expr_BinaryOp_GreaterOrEqual';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;

use PhpParser\Node\Expr\BinaryOp;
class BitwiseAnd extends BinaryOp
{
    public function getOperatorSigil() : string
    {
        return '&';
    }
    public function getType() : string
    {
        return 'Expr_BinaryOp_BitwiseAnd';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;

use PhpParser\Node\Expr\BinaryOp;
class LogicalOr extends BinaryOp
{
    public function getOperatorSigil() : string
    {
        return 'or';
    }
    public function getType() : string
    {
        return 'Expr_BinaryOp_LogicalOr';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;

use PhpParser\Node\Expr\BinaryOp;
class Equal extends BinaryOp
{
    public function getOperatorSigil() : string
    {
        return '==';
    }
    public function getType() : string
    {
        return 'Expr_BinaryOp_Equal';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;

use PhpParser\Node\Expr\BinaryOp;
class Mul extends BinaryOp
{
    public function getOperatorSigil() : string
    {
        return '*';
    }
    public function getType() : string
    {
        return 'Expr_BinaryOp_Mul';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;

use PhpParser\Node\Expr\BinaryOp;
class Div extends BinaryOp
{
    public function getOperatorSigil() : string
    {
        return '/';
    }
    public function getType() : string
    {
        return 'Expr_BinaryOp_Div';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;

use PhpParser\Node\Expr\BinaryOp;
class LogicalXor extends BinaryOp
{
    public function getOperatorSigil() : string
    {
        return 'xor';
    }
    public function getType() : string
    {
        return 'Expr_BinaryOp_LogicalXor';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;

use PhpParser\Node\Expr\BinaryOp;
class SmallerOrEqual extends BinaryOp
{
    public function getOperatorSigil() : string
    {
        return '<=';
    }
    public function getType() : string
    {
        return 'Expr_BinaryOp_SmallerOrEqual';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;

use PhpParser\Node\Expr\BinaryOp;
class Smaller extends BinaryOp
{
    public function getOperatorSigil() : string
    {
        return '<';
    }
    public function getType() : string
    {
        return 'Expr_BinaryOp_Smaller';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;

use PhpParser\Node\Expr\BinaryOp;
class ShiftLeft extends BinaryOp
{
    public function getOperatorSigil() : string
    {
        return '<<';
    }
    public function getType() : string
    {
        return 'Expr_BinaryOp_ShiftLeft';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;

use PhpParser\Node\Expr\BinaryOp;
class Minus extends BinaryOp
{
    public function getOperatorSigil() : string
    {
        return '-';
    }
    public function getType() : string
    {
        return 'Expr_BinaryOp_Minus';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;

use PhpParser\Node\Expr\BinaryOp;
class BitwiseXor extends BinaryOp
{
    public function getOperatorSigil() : string
    {
        return '^';
    }
    public function getType() : string
    {
        return 'Expr_BinaryOp_BitwiseXor';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;

use PhpParser\Node\Expr\BinaryOp;
class BitwiseOr extends BinaryOp
{
    public function getOperatorSigil() : string
    {
        return '|';
    }
    public function getType() : string
    {
        return 'Expr_BinaryOp_BitwiseOr';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;

use PhpParser\Node\Expr\BinaryOp;
class Spaceship extends BinaryOp
{
    public function getOperatorSigil() : string
    {
        return '<=>';
    }
    public function getType() : string
    {
        return 'Expr_BinaryOp_Spaceship';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class ArrayItem extends Expr
{
    /** @var null|Expr Key */
    public $key;
    /** @var Expr Value */
    public $value;
    /** @var bool Whether to assign by reference */
    public $byRef;
    /** @var bool Whether to unpack the argument */
    public $unpack;
    /**
     * Constructs an array item node.
     *
     * @param Expr      $value      Value
     * @param null|Expr $key        Key
     * @param bool      $byRef      Whether to assign by reference
     * @param array     $attributes Additional attributes
     */
    public function __construct(Expr $value, Expr $key = null, bool $byRef = \false, array $attributes = [], bool $unpack = \false)
    {
        $this->attributes = $attributes;
        $this->key = $key;
        $this->value = $value;
        $this->byRef = $byRef;
        $this->unpack = $unpack;
    }
    public function getSubNodeNames() : array
    {
        return ['key', 'value', 'byRef', 'unpack'];
    }
    public function getType() : string
    {
        return 'Expr_ArrayItem';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
use PhpParser\Node\VariadicPlaceholder;
abstract class CallLike extends Expr
{
    /**
     * Return raw arguments, which may be actual Args, or VariadicPlaceholders for first-class
     * callables.
     *
     * @return array<Arg|VariadicPlaceholder>
     */
    public abstract function getRawArgs() : array;
    /**
     * Returns whether this call expression is actually a first class callable.
     */
    public function isFirstClassCallable() : bool
    {
        foreach ($this->getRawArgs() as $arg) {
            if ($arg instanceof VariadicPlaceholder) {
                return \true;
            }
        }
        return \false;
    }
    /**
     * Assert that this is not a first-class callable and return only ordinary Args.
     *
     * @return Arg[]
     */
    public function getArgs() : array
    {
        \assert(!$this->isFirstClassCallable());
        return $this->getRawArgs();
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
use PhpParser\Node\Name;
class ConstFetch extends Expr
{
    /** @var Name Constant name */
    public $name;
    /**
     * Constructs a const fetch node.
     *
     * @param Name  $name       Constant name
     * @param array $attributes Additional attributes
     */
    public function __construct(Name $name, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->name = $name;
    }
    public function getSubNodeNames() : array
    {
        return ['name'];
    }
    public function getType() : string
    {
        return 'Expr_ConstFetch';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class Isset_ extends Expr
{
    /** @var Expr[] Variables */
    public $vars;
    /**
     * Constructs an array node.
     *
     * @param Expr[] $vars       Variables
     * @param array  $attributes Additional attributes
     */
    public function __construct(array $vars, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->vars = $vars;
    }
    public function getSubNodeNames() : array
    {
        return ['vars'];
    }
    public function getType() : string
    {
        return 'Expr_Isset';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
use PhpParser\Node\Identifier;
use PhpParser\Node\VariadicPlaceholder;
class StaticCall extends \PhpParser\Node\Expr\CallLike
{
    /** @var Node\Name|Expr Class name */
    public $class;
    /** @var Identifier|Expr Method name */
    public $name;
    /** @var array<Arg|VariadicPlaceholder> Arguments */
    public $args;
    /**
     * Constructs a static method call node.
     *
     * @param Node\Name|Expr                 $class      Class name
     * @param string|Identifier|Expr         $name       Method name
     * @param array<Arg|VariadicPlaceholder> $args       Arguments
     * @param array                          $attributes Additional attributes
     */
    public function __construct($class, $name, array $args = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->class = $class;
        $this->name = \is_string($name) ? new Identifier($name) : $name;
        $this->args = $args;
    }
    public function getSubNodeNames() : array
    {
        return ['class', 'name', 'args'];
    }
    public function getType() : string
    {
        return 'Expr_StaticCall';
    }
    public function getRawArgs() : array
    {
        return $this->args;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
use PhpParser\Node\Name;
use PhpParser\Node\VarLikeIdentifier;
class StaticPropertyFetch extends Expr
{
    /** @var Name|Expr Class name */
    public $class;
    /** @var VarLikeIdentifier|Expr Property name */
    public $name;
    /**
     * Constructs a static property fetch node.
     *
     * @param Name|Expr                     $class      Class name
     * @param string|VarLikeIdentifier|Expr $name       Property name
     * @param array                         $attributes Additional attributes
     */
    public function __construct($class, $name, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->class = $class;
        $this->name = \is_string($name) ? new VarLikeIdentifier($name) : $name;
    }
    public function getSubNodeNames() : array
    {
        return ['class', 'name'];
    }
    public function getType() : string
    {
        return 'Expr_StaticPropertyFetch';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class ShellExec extends Expr
{
    /** @var array Encapsed string array */
    public $parts;
    /**
     * Constructs a shell exec (backtick) node.
     *
     * @param array $parts      Encapsed string array
     * @param array $attributes Additional attributes
     */
    public function __construct(array $parts, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->parts = $parts;
    }
    public function getSubNodeNames() : array
    {
        return ['parts'];
    }
    public function getType() : string
    {
        return 'Expr_ShellExec';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
use PhpParser\Node\Identifier;
use PhpParser\Node\Name;
class ClassConstFetch extends Expr
{
    /** @var Name|Expr Class name */
    public $class;
    /** @var Identifier|Error Constant name */
    public $name;
    /**
     * Constructs a class const fetch node.
     *
     * @param Name|Expr               $class      Class name
     * @param string|Identifier|Error $name       Constant name
     * @param array                   $attributes Additional attributes
     */
    public function __construct($class, $name, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->class = $class;
        $this->name = \is_string($name) ? new Identifier($name) : $name;
    }
    public function getSubNodeNames() : array
    {
        return ['class', 'name'];
    }
    public function getType() : string
    {
        return 'Expr_ClassConstFetch';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class ArrayDimFetch extends Expr
{
    /** @var Expr Variable */
    public $var;
    /** @var null|Expr Array index / dim */
    public $dim;
    /**
     * Constructs an array index fetch node.
     *
     * @param Expr      $var        Variable
     * @param null|Expr $dim        Array index / dim
     * @param array     $attributes Additional attributes
     */
    public function __construct(Expr $var, Expr $dim = null, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->var = $var;
        $this->dim = $dim;
    }
    public function getSubNodeNames() : array
    {
        return ['var', 'dim'];
    }
    public function getType() : string
    {
        return 'Expr_ArrayDimFetch';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
abstract class Cast extends Expr
{
    /** @var Expr Expression */
    public $expr;
    /**
     * Constructs a cast node.
     *
     * @param Expr  $expr       Expression
     * @param array $attributes Additional attributes
     */
    public function __construct(Expr $expr, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->expr = $expr;
    }
    public function getSubNodeNames() : array
    {
        return ['expr'];
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
use PhpParser\Node\Identifier;
class PropertyFetch extends Expr
{
    /** @var Expr Variable holding object */
    public $var;
    /** @var Identifier|Expr Property name */
    public $name;
    /**
     * Constructs a function call node.
     *
     * @param Expr                   $var        Variable holding object
     * @param string|Identifier|Expr $name       Property name
     * @param array                  $attributes Additional attributes
     */
    public function __construct(Expr $var, $name, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->var = $var;
        $this->name = \is_string($name) ? new Identifier($name) : $name;
    }
    public function getSubNodeNames() : array
    {
        return ['var', 'name'];
    }
    public function getType() : string
    {
        return 'Expr_PropertyFetch';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class List_ extends Expr
{
    /** @var (ArrayItem|null)[] List of items to assign to */
    public $items;
    /**
     * Constructs a list() destructuring node.
     *
     * @param (ArrayItem|null)[] $items      List of items to assign to
     * @param array              $attributes Additional attributes
     */
    public function __construct(array $items, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->items = $items;
    }
    public function getSubNodeNames() : array
    {
        return ['items'];
    }
    public function getType() : string
    {
        return 'Expr_List';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class PostInc extends Expr
{
    /** @var Expr Variable */
    public $var;
    /**
     * Constructs a post increment node.
     *
     * @param Expr  $var        Variable
     * @param array $attributes Additional attributes
     */
    public function __construct(Expr $var, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->var = $var;
    }
    public function getSubNodeNames() : array
    {
        return ['var'];
    }
    public function getType() : string
    {
        return 'Expr_PostInc';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
use PhpParser\Node\Identifier;
class NullsafePropertyFetch extends Expr
{
    /** @var Expr Variable holding object */
    public $var;
    /** @var Identifier|Expr Property name */
    public $name;
    /**
     * Constructs a nullsafe property fetch node.
     *
     * @param Expr                   $var        Variable holding object
     * @param string|Identifier|Expr $name       Property name
     * @param array                  $attributes Additional attributes
     */
    public function __construct(Expr $var, $name, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->var = $var;
        $this->name = \is_string($name) ? new Identifier($name) : $name;
    }
    public function getSubNodeNames() : array
    {
        return ['var', 'name'];
    }
    public function getType() : string
    {
        return 'Expr_NullsafePropertyFetch';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class AssignRef extends Expr
{
    /** @var Expr Variable reference is assigned to */
    public $var;
    /** @var Expr Variable which is referenced */
    public $expr;
    /**
     * Constructs an assignment node.
     *
     * @param Expr  $var        Variable
     * @param Expr  $expr       Expression
     * @param array $attributes Additional attributes
     */
    public function __construct(Expr $var, Expr $expr, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->var = $var;
        $this->expr = $expr;
    }
    public function getSubNodeNames() : array
    {
        return ['var', 'expr'];
    }
    public function getType() : string
    {
        return 'Expr_AssignRef';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\FunctionLike;
class Closure extends Expr implements FunctionLike
{
    /** @var bool Whether the closure is static */
    public $static;
    /** @var bool Whether to return by reference */
    public $byRef;
    /** @var Node\Param[] Parameters */
    public $params;
    /** @var ClosureUse[] use()s */
    public $uses;
    /** @var null|Node\Identifier|Node\Name|Node\ComplexType Return type */
    public $returnType;
    /** @var Node\Stmt[] Statements */
    public $stmts;
    /** @var Node\AttributeGroup[] PHP attribute groups */
    public $attrGroups;
    /**
     * Constructs a lambda function node.
     *
     * @param array $subNodes   Array of the following optional subnodes:
     *                          'static'     => false  : Whether the closure is static
     *                          'byRef'      => false  : Whether to return by reference
     *                          'params'     => array(): Parameters
     *                          'uses'       => array(): use()s
     *                          'returnType' => null   : Return type
     *                          'stmts'      => array(): Statements
     *                          'attrGroups' => array(): PHP attributes groups
     * @param array $attributes Additional attributes
     */
    public function __construct(array $subNodes = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->static = $subNodes['static'] ?? \false;
        $this->byRef = $subNodes['byRef'] ?? \false;
        $this->params = $subNodes['params'] ?? [];
        $this->uses = $subNodes['uses'] ?? [];
        $returnType = $subNodes['returnType'] ?? null;
        $this->returnType = \is_string($returnType) ? new Node\Identifier($returnType) : $returnType;
        $this->stmts = $subNodes['stmts'] ?? [];
        $this->attrGroups = $subNodes['attrGroups'] ?? [];
    }
    public function getSubNodeNames() : array
    {
        return ['attrGroups', 'static', 'byRef', 'params', 'uses', 'returnType', 'stmts'];
    }
    public function returnsByRef() : bool
    {
        return $this->byRef;
    }
    public function getParams() : array
    {
        return $this->params;
    }
    public function getReturnType()
    {
        return $this->returnType;
    }
    /** @return Node\Stmt[] */
    public function getStmts() : array
    {
        return $this->stmts;
    }
    public function getAttrGroups() : array
    {
        return $this->attrGroups;
    }
    public function getType() : string
    {
        return 'Expr_Closure';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node;
class Throw_ extends Node\Expr
{
    /** @var Node\Expr Expression */
    public $expr;
    /**
     * Constructs a throw expression node.
     *
     * @param Node\Expr $expr       Expression
     * @param array     $attributes Additional attributes
     */
    public function __construct(Node\Expr $expr, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->expr = $expr;
    }
    public function getSubNodeNames() : array
    {
        return ['expr'];
    }
    public function getType() : string
    {
        return 'Expr_Throw';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class UnaryPlus extends Expr
{
    /** @var Expr Expression */
    public $expr;
    /**
     * Constructs a unary plus node.
     *
     * @param Expr $expr       Expression
     * @param array               $attributes Additional attributes
     */
    public function __construct(Expr $expr, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->expr = $expr;
    }
    public function getSubNodeNames() : array
    {
        return ['expr'];
    }
    public function getType() : string
    {
        return 'Expr_UnaryPlus';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class Print_ extends Expr
{
    /** @var Expr Expression */
    public $expr;
    /**
     * Constructs an print() node.
     *
     * @param Expr  $expr       Expression
     * @param array $attributes Additional attributes
     */
    public function __construct(Expr $expr, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->expr = $expr;
    }
    public function getSubNodeNames() : array
    {
        return ['expr'];
    }
    public function getType() : string
    {
        return 'Expr_Print';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class Empty_ extends Expr
{
    /** @var Expr Expression */
    public $expr;
    /**
     * Constructs an empty() node.
     *
     * @param Expr  $expr       Expression
     * @param array $attributes Additional attributes
     */
    public function __construct(Expr $expr, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->expr = $expr;
    }
    public function getSubNodeNames() : array
    {
        return ['expr'];
    }
    public function getType() : string
    {
        return 'Expr_Empty';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node;
use PhpParser\Node\MatchArm;
class Match_ extends Node\Expr
{
    /** @var Node\Expr */
    public $cond;
    /** @var MatchArm[] */
    public $arms;
    /**
     * @param MatchArm[] $arms
     */
    public function __construct(Node\Expr $cond, array $arms = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->cond = $cond;
        $this->arms = $arms;
    }
    public function getSubNodeNames() : array
    {
        return ['cond', 'arms'];
    }
    public function getType() : string
    {
        return 'Expr_Match';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
use PhpParser\Node\VariadicPlaceholder;
class New_ extends \PhpParser\Node\Expr\CallLike
{
    /** @var Node\Name|Expr|Node\Stmt\Class_ Class name */
    public $class;
    /** @var array<Arg|VariadicPlaceholder> Arguments */
    public $args;
    /**
     * Constructs a function call node.
     *
     * @param Node\Name|Expr|Node\Stmt\Class_ $class      Class name (or class node for anonymous classes)
     * @param array<Arg|VariadicPlaceholder>  $args       Arguments
     * @param array                           $attributes Additional attributes
     */
    public function __construct($class, array $args = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->class = $class;
        $this->args = $args;
    }
    public function getSubNodeNames() : array
    {
        return ['class', 'args'];
    }
    public function getType() : string
    {
        return 'Expr_New';
    }
    public function getRawArgs() : array
    {
        return $this->args;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class Clone_ extends Expr
{
    /** @var Expr Expression */
    public $expr;
    /**
     * Constructs a clone node.
     *
     * @param Expr  $expr       Expression
     * @param array $attributes Additional attributes
     */
    public function __construct(Expr $expr, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->expr = $expr;
    }
    public function getSubNodeNames() : array
    {
        return ['expr'];
    }
    public function getType() : string
    {
        return 'Expr_Clone';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class Variable extends Expr
{
    /** @var string|Expr Name */
    public $name;
    /**
     * Constructs a variable node.
     *
     * @param string|Expr $name       Name
     * @param array       $attributes Additional attributes
     */
    public function __construct($name, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->name = $name;
    }
    public function getSubNodeNames() : array
    {
        return ['name'];
    }
    public function getType() : string
    {
        return 'Expr_Variable';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\Cast;

use PhpParser\Node\Expr\Cast;
class Array_ extends Cast
{
    public function getType() : string
    {
        return 'Expr_Cast_Array';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\Cast;

use PhpParser\Node\Expr\Cast;
class Unset_ extends Cast
{
    public function getType() : string
    {
        return 'Expr_Cast_Unset';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\Cast;

use PhpParser\Node\Expr\Cast;
class String_ extends Cast
{
    public function getType() : string
    {
        return 'Expr_Cast_String';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\Cast;

use PhpParser\Node\Expr\Cast;
class Double extends Cast
{
    // For use in "kind" attribute
    const KIND_DOUBLE = 1;
    // "double" syntax
    const KIND_FLOAT = 2;
    // "float" syntax
    const KIND_REAL = 3;
    // "real" syntax
    public function getType() : string
    {
        return 'Expr_Cast_Double';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\Cast;

use PhpParser\Node\Expr\Cast;
class Object_ extends Cast
{
    public function getType() : string
    {
        return 'Expr_Cast_Object';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\Cast;

use PhpParser\Node\Expr\Cast;
class Int_ extends Cast
{
    public function getType() : string
    {
        return 'Expr_Cast_Int';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\Cast;

use PhpParser\Node\Expr\Cast;
class Bool_ extends Cast
{
    public function getType() : string
    {
        return 'Expr_Cast_Bool';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class ErrorSuppress extends Expr
{
    /** @var Expr Expression */
    public $expr;
    /**
     * Constructs an error suppress node.
     *
     * @param Expr  $expr       Expression
     * @param array $attributes Additional attributes
     */
    public function __construct(Expr $expr, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->expr = $expr;
    }
    public function getSubNodeNames() : array
    {
        return ['expr'];
    }
    public function getType() : string
    {
        return 'Expr_ErrorSuppress';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\AssignOp;

use PhpParser\Node\Expr\AssignOp;
class Coalesce extends AssignOp
{
    public function getType() : string
    {
        return 'Expr_AssignOp_Coalesce';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\AssignOp;

use PhpParser\Node\Expr\AssignOp;
class Concat extends AssignOp
{
    public function getType() : string
    {
        return 'Expr_AssignOp_Concat';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\AssignOp;

use PhpParser\Node\Expr\AssignOp;
class Plus extends AssignOp
{
    public function getType() : string
    {
        return 'Expr_AssignOp_Plus';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\AssignOp;

use PhpParser\Node\Expr\AssignOp;
class ShiftRight extends AssignOp
{
    public function getType() : string
    {
        return 'Expr_AssignOp_ShiftRight';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\AssignOp;

use PhpParser\Node\Expr\AssignOp;
class Pow extends AssignOp
{
    public function getType() : string
    {
        return 'Expr_AssignOp_Pow';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\AssignOp;

use PhpParser\Node\Expr\AssignOp;
class Mod extends AssignOp
{
    public function getType() : string
    {
        return 'Expr_AssignOp_Mod';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\AssignOp;

use PhpParser\Node\Expr\AssignOp;
class BitwiseAnd extends AssignOp
{
    public function getType() : string
    {
        return 'Expr_AssignOp_BitwiseAnd';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\AssignOp;

use PhpParser\Node\Expr\AssignOp;
class Mul extends AssignOp
{
    public function getType() : string
    {
        return 'Expr_AssignOp_Mul';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\AssignOp;

use PhpParser\Node\Expr\AssignOp;
class Div extends AssignOp
{
    public function getType() : string
    {
        return 'Expr_AssignOp_Div';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\AssignOp;

use PhpParser\Node\Expr\AssignOp;
class ShiftLeft extends AssignOp
{
    public function getType() : string
    {
        return 'Expr_AssignOp_ShiftLeft';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\AssignOp;

use PhpParser\Node\Expr\AssignOp;
class Minus extends AssignOp
{
    public function getType() : string
    {
        return 'Expr_AssignOp_Minus';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\AssignOp;

use PhpParser\Node\Expr\AssignOp;
class BitwiseXor extends AssignOp
{
    public function getType() : string
    {
        return 'Expr_AssignOp_BitwiseXor';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr\AssignOp;

use PhpParser\Node\Expr\AssignOp;
class BitwiseOr extends AssignOp
{
    public function getType() : string
    {
        return 'Expr_AssignOp_BitwiseOr';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class Ternary extends Expr
{
    /** @var Expr Condition */
    public $cond;
    /** @var null|Expr Expression for true */
    public $if;
    /** @var Expr Expression for false */
    public $else;
    /**
     * Constructs a ternary operator node.
     *
     * @param Expr      $cond       Condition
     * @param null|Expr $if         Expression for true
     * @param Expr      $else       Expression for false
     * @param array                    $attributes Additional attributes
     */
    public function __construct(Expr $cond, $if, Expr $else, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->cond = $cond;
        $this->if = $if;
        $this->else = $else;
    }
    public function getSubNodeNames() : array
    {
        return ['cond', 'if', 'else'];
    }
    public function getType() : string
    {
        return 'Expr_Ternary';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class PreInc extends Expr
{
    /** @var Expr Variable */
    public $var;
    /**
     * Constructs a pre increment node.
     *
     * @param Expr  $var        Variable
     * @param array $attributes Additional attributes
     */
    public function __construct(Expr $var, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->var = $var;
    }
    public function getSubNodeNames() : array
    {
        return ['var'];
    }
    public function getType() : string
    {
        return 'Expr_PreInc';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
use PhpParser\Node\Identifier;
use PhpParser\Node\VariadicPlaceholder;
class NullsafeMethodCall extends \PhpParser\Node\Expr\CallLike
{
    /** @var Expr Variable holding object */
    public $var;
    /** @var Identifier|Expr Method name */
    public $name;
    /** @var array<Arg|VariadicPlaceholder> Arguments */
    public $args;
    /**
     * Constructs a nullsafe method call node.
     *
     * @param Expr                           $var        Variable holding object
     * @param string|Identifier|Expr         $name       Method name
     * @param array<Arg|VariadicPlaceholder> $args       Arguments
     * @param array                          $attributes Additional attributes
     */
    public function __construct(Expr $var, $name, array $args = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->var = $var;
        $this->name = \is_string($name) ? new Identifier($name) : $name;
        $this->args = $args;
    }
    public function getSubNodeNames() : array
    {
        return ['var', 'name', 'args'];
    }
    public function getType() : string
    {
        return 'Expr_NullsafeMethodCall';
    }
    public function getRawArgs() : array
    {
        return $this->args;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class BooleanNot extends Expr
{
    /** @var Expr Expression */
    public $expr;
    /**
     * Constructs a boolean not node.
     *
     * @param Expr $expr       Expression
     * @param array               $attributes Additional attributes
     */
    public function __construct(Expr $expr, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->expr = $expr;
    }
    public function getSubNodeNames() : array
    {
        return ['expr'];
    }
    public function getType() : string
    {
        return 'Expr_BooleanNot';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\FunctionLike;
class ArrowFunction extends Expr implements FunctionLike
{
    /** @var bool */
    public $static;
    /** @var bool */
    public $byRef;
    /** @var Node\Param[] */
    public $params = [];
    /** @var null|Node\Identifier|Node\Name|Node\ComplexType */
    public $returnType;
    /** @var Expr */
    public $expr;
    /** @var Node\AttributeGroup[] */
    public $attrGroups;
    /**
     * @param array $subNodes   Array of the following optional subnodes:
     *                          'static'     => false   : Whether the closure is static
     *                          'byRef'      => false   : Whether to return by reference
     *                          'params'     => array() : Parameters
     *                          'returnType' => null    : Return type
     *                          'expr'       => Expr    : Expression body
     *                          'attrGroups' => array() : PHP attribute groups
     * @param array $attributes Additional attributes
     */
    public function __construct(array $subNodes = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->static = $subNodes['static'] ?? \false;
        $this->byRef = $subNodes['byRef'] ?? \false;
        $this->params = $subNodes['params'] ?? [];
        $returnType = $subNodes['returnType'] ?? null;
        $this->returnType = \is_string($returnType) ? new Node\Identifier($returnType) : $returnType;
        $this->expr = $subNodes['expr'];
        $this->attrGroups = $subNodes['attrGroups'] ?? [];
    }
    public function getSubNodeNames() : array
    {
        return ['attrGroups', 'static', 'byRef', 'params', 'returnType', 'expr'];
    }
    public function returnsByRef() : bool
    {
        return $this->byRef;
    }
    public function getParams() : array
    {
        return $this->params;
    }
    public function getReturnType()
    {
        return $this->returnType;
    }
    public function getAttrGroups() : array
    {
        return $this->attrGroups;
    }
    /**
     * @return Node\Stmt\Return_[]
     */
    public function getStmts() : array
    {
        return [new Node\Stmt\Return_($this->expr)];
    }
    public function getType() : string
    {
        return 'Expr_ArrowFunction';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class UnaryMinus extends Expr
{
    /** @var Expr Expression */
    public $expr;
    /**
     * Constructs a unary minus node.
     *
     * @param Expr  $expr       Expression
     * @param array $attributes Additional attributes
     */
    public function __construct(Expr $expr, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->expr = $expr;
    }
    public function getSubNodeNames() : array
    {
        return ['expr'];
    }
    public function getType() : string
    {
        return 'Expr_UnaryMinus';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class PostDec extends Expr
{
    /** @var Expr Variable */
    public $var;
    /**
     * Constructs a post decrement node.
     *
     * @param Expr  $var        Variable
     * @param array $attributes Additional attributes
     */
    public function __construct(Expr $var, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->var = $var;
    }
    public function getSubNodeNames() : array
    {
        return ['var'];
    }
    public function getType() : string
    {
        return 'Expr_PostDec';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class Exit_ extends Expr
{
    /* For use in "kind" attribute */
    const KIND_EXIT = 1;
    const KIND_DIE = 2;
    /** @var null|Expr Expression */
    public $expr;
    /**
     * Constructs an exit() node.
     *
     * @param null|Expr $expr       Expression
     * @param array                    $attributes Additional attributes
     */
    public function __construct(Expr $expr = null, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->expr = $expr;
    }
    public function getSubNodeNames() : array
    {
        return ['expr'];
    }
    public function getType() : string
    {
        return 'Expr_Exit';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class Yield_ extends Expr
{
    /** @var null|Expr Key expression */
    public $key;
    /** @var null|Expr Value expression */
    public $value;
    /**
     * Constructs a yield expression node.
     *
     * @param null|Expr $value      Value expression
     * @param null|Expr $key        Key expression
     * @param array     $attributes Additional attributes
     */
    public function __construct(Expr $value = null, Expr $key = null, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->key = $key;
        $this->value = $value;
    }
    public function getSubNodeNames() : array
    {
        return ['key', 'value'];
    }
    public function getType() : string
    {
        return 'Expr_Yield';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
/**
 * Error node used during parsing with error recovery.
 *
 * An error node may be placed at a position where an expression is required, but an error occurred.
 * Error nodes will not be present if the parser is run in throwOnError mode (the default).
 */
class Error extends Expr
{
    /**
     * Constructs an error node.
     *
     * @param array $attributes Additional attributes
     */
    public function __construct(array $attributes = [])
    {
        $this->attributes = $attributes;
    }
    public function getSubNodeNames() : array
    {
        return [];
    }
    public function getType() : string
    {
        return 'Expr_Error';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
use PhpParser\Node\Identifier;
use PhpParser\Node\VariadicPlaceholder;
class MethodCall extends \PhpParser\Node\Expr\CallLike
{
    /** @var Expr Variable holding object */
    public $var;
    /** @var Identifier|Expr Method name */
    public $name;
    /** @var array<Arg|VariadicPlaceholder> Arguments */
    public $args;
    /**
     * Constructs a function call node.
     *
     * @param Expr                           $var        Variable holding object
     * @param string|Identifier|Expr         $name       Method name
     * @param array<Arg|VariadicPlaceholder> $args       Arguments
     * @param array                          $attributes Additional attributes
     */
    public function __construct(Expr $var, $name, array $args = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->var = $var;
        $this->name = \is_string($name) ? new Identifier($name) : $name;
        $this->args = $args;
    }
    public function getSubNodeNames() : array
    {
        return ['var', 'name', 'args'];
    }
    public function getType() : string
    {
        return 'Expr_MethodCall';
    }
    public function getRawArgs() : array
    {
        return $this->args;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
abstract class AssignOp extends Expr
{
    /** @var Expr Variable */
    public $var;
    /** @var Expr Expression */
    public $expr;
    /**
     * Constructs a compound assignment operation node.
     *
     * @param Expr  $var        Variable
     * @param Expr  $expr       Expression
     * @param array $attributes Additional attributes
     */
    public function __construct(Expr $var, Expr $expr, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->var = $var;
        $this->expr = $expr;
    }
    public function getSubNodeNames() : array
    {
        return ['var', 'expr'];
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class Eval_ extends Expr
{
    /** @var Expr Expression */
    public $expr;
    /**
     * Constructs an eval() node.
     *
     * @param Expr  $expr       Expression
     * @param array $attributes Additional attributes
     */
    public function __construct(Expr $expr, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->expr = $expr;
    }
    public function getSubNodeNames() : array
    {
        return ['expr'];
    }
    public function getType() : string
    {
        return 'Expr_Eval';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
use PhpParser\Node\Name;
class Instanceof_ extends Expr
{
    /** @var Expr Expression */
    public $expr;
    /** @var Name|Expr Class name */
    public $class;
    /**
     * Constructs an instanceof check node.
     *
     * @param Expr      $expr       Expression
     * @param Name|Expr $class      Class name
     * @param array     $attributes Additional attributes
     */
    public function __construct(Expr $expr, $class, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->expr = $expr;
        $this->class = $class;
    }
    public function getSubNodeNames() : array
    {
        return ['expr', 'class'];
    }
    public function getType() : string
    {
        return 'Expr_Instanceof';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
class PreDec extends Expr
{
    /** @var Expr Variable */
    public $var;
    /**
     * Constructs a pre decrement node.
     *
     * @param Expr  $var        Variable
     * @param array $attributes Additional attributes
     */
    public function __construct(Expr $var, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->var = $var;
    }
    public function getSubNodeNames() : array
    {
        return ['var'];
    }
    public function getType() : string
    {
        return 'Expr_PreDec';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node\Expr;
abstract class BinaryOp extends Expr
{
    /** @var Expr The left hand side expression */
    public $left;
    /** @var Expr The right hand side expression */
    public $right;
    /**
     * Constructs a binary operator node.
     *
     * @param Expr  $left       The left hand side expression
     * @param Expr  $right      The right hand side expression
     * @param array $attributes Additional attributes
     */
    public function __construct(Expr $left, Expr $right, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->left = $left;
        $this->right = $right;
    }
    public function getSubNodeNames() : array
    {
        return ['left', 'right'];
    }
    /**
     * Get the operator sigil for this binary operation.
     *
     * In the case there are multiple possible sigils for an operator, this method does not
     * necessarily return the one used in the parsed code.
     *
     * @return string
     */
    public abstract function getOperatorSigil() : string;
}
<?php

declare (strict_types=1);
namespace PhpParser\Node;

use PhpParser\NodeAbstract;
/**
 * Represents the "..." in "foo(...)" of the first-class callable syntax.
 */
class VariadicPlaceholder extends NodeAbstract
{
    /**
     * Create a variadic argument placeholder (first-class callable syntax).
     *
     * @param array $attributes Additional attributes
     */
    public function __construct(array $attributes = [])
    {
        $this->attributes = $attributes;
    }
    public function getType() : string
    {
        return 'VariadicPlaceholder';
    }
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node;

abstract class Scalar extends \PhpParser\Node\Expr
{
}
<?php

declare (strict_types=1);
namespace PhpParser\Node;

class UnionType extends \PhpParser\Node\ComplexType
{
    /** @var (Identifier|Name|IntersectionType)[] Types */
    public $types;
    /**
     * Constructs a union type.
     *
     * @param (Identifier|Name|IntersectionType)[] $types      Types
     * @param array               $attributes Additional attributes
     */
    public function __construct(array $types, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->types = $types;
    }
    public function getSubNodeNames() : array
    {
        return ['types'];
    }
    public function getType() : string
    {
        return 'UnionType';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Scalar;

use PhpParser\Error;
use PhpParser\Node\Scalar;
class String_ extends Scalar
{
    /* For use in "kind" attribute */
    const KIND_SINGLE_QUOTED = 1;
    const KIND_DOUBLE_QUOTED = 2;
    const KIND_HEREDOC = 3;
    const KIND_NOWDOC = 4;
    /** @var string String value */
    public $value;
    protected static $replacements = ['\\' => '\\', '$' => '$', 'n' => "\n", 'r' => "\r", 't' => "\t", 'f' => "\f", 'v' => "\v", 'e' => "\x1b"];
    /**
     * Constructs a string scalar node.
     *
     * @param string $value      Value of the string
     * @param array  $attributes Additional attributes
     */
    public function __construct(string $value, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->value = $value;
    }
    public function getSubNodeNames() : array
    {
        return ['value'];
    }
    /**
     * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes
     */
    public static function fromString(string $str, array $attributes = [], bool $parseUnicodeEscape = \true) : self
    {
        $attributes['kind'] = $str[0] === "'" || $str[1] === "'" && ($str[0] === 'b' || $str[0] === 'B') ? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED;
        $attributes['rawValue'] = $str;
        $string = self::parse($str, $parseUnicodeEscape);
        return new self($string, $attributes);
    }
    /**
     * @internal
     *
     * Parses a string token.
     *
     * @param string $str String token content
     * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes
     *
     * @return string The parsed string
     */
    public static function parse(string $str, bool $parseUnicodeEscape = \true) : string
    {
        $bLength = 0;
        if ('b' === $str[0] || 'B' === $str[0]) {
            $bLength = 1;
        }
        if ('\'' === $str[$bLength]) {
            return \str_replace(['\\\\', '\\\''], ['\\', '\''], \substr($str, $bLength + 1, -1));
        } else {
            return self::parseEscapeSequences(\substr($str, $bLength + 1, -1), '"', $parseUnicodeEscape);
        }
    }
    /**
     * @internal
     *
     * Parses escape sequences in strings (all string types apart from single quoted).
     *
     * @param string      $str   String without quotes
     * @param null|string $quote Quote type
     * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes
     *
     * @return string String with escape sequences parsed
     */
    public static function parseEscapeSequences(string $str, $quote, bool $parseUnicodeEscape = \true) : string
    {
        if (null !== $quote) {
            $str = \str_replace('\\' . $quote, $quote, $str);
        }
        $extra = '';
        if ($parseUnicodeEscape) {
            $extra = '|u\\{([0-9a-fA-F]+)\\}';
        }
        return \preg_replace_callback('~\\\\([\\\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3}' . $extra . ')~', function ($matches) {
            $str = $matches[1];
            if (isset(self::$replacements[$str])) {
                return self::$replacements[$str];
            } elseif ('x' === $str[0] || 'X' === $str[0]) {
                return \chr(\hexdec(\substr($str, 1)));
            } elseif ('u' === $str[0]) {
                return self::codePointToUtf8(\hexdec($matches[2]));
            } else {
                return \chr(\octdec($str));
            }
        }, $str);
    }
    /**
     * Converts a Unicode code point to its UTF-8 encoded representation.
     *
     * @param int $num Code point
     *
     * @return string UTF-8 representation of code point
     */
    private static function codePointToUtf8(int $num) : string
    {
        if ($num <= 0x7f) {
            return \chr($num);
        }
        if ($num <= 0x7ff) {
            return \chr(($num >> 6) + 0xc0) . \chr(($num & 0x3f) + 0x80);
        }
        if ($num <= 0xffff) {
            return \chr(($num >> 12) + 0xe0) . \chr(($num >> 6 & 0x3f) + 0x80) . \chr(($num & 0x3f) + 0x80);
        }
        if ($num <= 0x1fffff) {
            return \chr(($num >> 18) + 0xf0) . \chr(($num >> 12 & 0x3f) + 0x80) . \chr(($num >> 6 & 0x3f) + 0x80) . \chr(($num & 0x3f) + 0x80);
        }
        throw new Error('Invalid UTF-8 codepoint escape sequence: Codepoint too large');
    }
    public function getType() : string
    {
        return 'Scalar_String';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Scalar;

use PhpParser\Node\Scalar;
class EncapsedStringPart extends Scalar
{
    /** @var string String value */
    public $value;
    /**
     * Constructs a node representing a string part of an encapsed string.
     *
     * @param string $value      String value
     * @param array  $attributes Additional attributes
     */
    public function __construct(string $value, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->value = $value;
    }
    public function getSubNodeNames() : array
    {
        return ['value'];
    }
    public function getType() : string
    {
        return 'Scalar_EncapsedStringPart';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Scalar;

use PhpParser\Node\Scalar;
class DNumber extends Scalar
{
    /** @var float Number value */
    public $value;
    /**
     * Constructs a float number scalar node.
     *
     * @param float $value      Value of the number
     * @param array $attributes Additional attributes
     */
    public function __construct(float $value, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->value = $value;
    }
    public function getSubNodeNames() : array
    {
        return ['value'];
    }
    /**
     * @param mixed[] $attributes
     */
    public static function fromString(string $str, array $attributes = []) : \PhpParser\Node\Scalar\DNumber
    {
        $attributes['rawValue'] = $str;
        $float = self::parse($str);
        return new \PhpParser\Node\Scalar\DNumber($float, $attributes);
    }
    /**
     * @internal
     *
     * Parses a DNUMBER token like PHP would.
     *
     * @param string $str A string number
     *
     * @return float The parsed number
     */
    public static function parse(string $str) : float
    {
        $str = \str_replace('_', '', $str);
        // Check whether this is one of the special integer notations.
        if ('0' === $str[0]) {
            // hex
            if ('x' === $str[1] || 'X' === $str[1]) {
                return \hexdec($str);
            }
            // bin
            if ('b' === $str[1] || 'B' === $str[1]) {
                return \bindec($str);
            }
            // oct, but only if the string does not contain any of '.eE'.
            if (\false === \strpbrk($str, '.eE')) {
                // substr($str, 0, strcspn($str, '89')) cuts the string at the first invalid digit
                // (8 or 9) so that only the digits before that are used.
                return \octdec(\substr($str, 0, \strcspn($str, '89')));
            }
        }
        // dec
        return (float) $str;
    }
    public function getType() : string
    {
        return 'Scalar_DNumber';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Scalar\MagicConst;

use PhpParser\Node\Scalar\MagicConst;
class Function_ extends MagicConst
{
    public function getName() : string
    {
        return '__FUNCTION__';
    }
    public function getType() : string
    {
        return 'Scalar_MagicConst_Function';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Scalar\MagicConst;

use PhpParser\Node\Scalar\MagicConst;
class File extends MagicConst
{
    public function getName() : string
    {
        return '__FILE__';
    }
    public function getType() : string
    {
        return 'Scalar_MagicConst_File';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Scalar\MagicConst;

use PhpParser\Node\Scalar\MagicConst;
class Trait_ extends MagicConst
{
    public function getName() : string
    {
        return '__TRAIT__';
    }
    public function getType() : string
    {
        return 'Scalar_MagicConst_Trait';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Scalar\MagicConst;

use PhpParser\Node\Scalar\MagicConst;
class Class_ extends MagicConst
{
    public function getName() : string
    {
        return '__CLASS__';
    }
    public function getType() : string
    {
        return 'Scalar_MagicConst_Class';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Scalar\MagicConst;

use PhpParser\Node\Scalar\MagicConst;
class Line extends MagicConst
{
    public function getName() : string
    {
        return '__LINE__';
    }
    public function getType() : string
    {
        return 'Scalar_MagicConst_Line';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Scalar\MagicConst;

use PhpParser\Node\Scalar\MagicConst;
class Dir extends MagicConst
{
    public function getName() : string
    {
        return '__DIR__';
    }
    public function getType() : string
    {
        return 'Scalar_MagicConst_Dir';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Scalar\MagicConst;

use PhpParser\Node\Scalar\MagicConst;
class Namespace_ extends MagicConst
{
    public function getName() : string
    {
        return '__NAMESPACE__';
    }
    public function getType() : string
    {
        return 'Scalar_MagicConst_Namespace';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Scalar\MagicConst;

use PhpParser\Node\Scalar\MagicConst;
class Method extends MagicConst
{
    public function getName() : string
    {
        return '__METHOD__';
    }
    public function getType() : string
    {
        return 'Scalar_MagicConst_Method';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Scalar;

use PhpParser\Node\Expr;
use PhpParser\Node\Scalar;
class Encapsed extends Scalar
{
    /** @var Expr[] list of string parts */
    public $parts;
    /**
     * Constructs an encapsed string node.
     *
     * @param Expr[] $parts      Encaps list
     * @param array  $attributes Additional attributes
     */
    public function __construct(array $parts, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->parts = $parts;
    }
    public function getSubNodeNames() : array
    {
        return ['parts'];
    }
    public function getType() : string
    {
        return 'Scalar_Encapsed';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Scalar;

use PhpParser\Node\Scalar;
abstract class MagicConst extends Scalar
{
    /**
     * Constructs a magic constant node.
     *
     * @param array $attributes Additional attributes
     */
    public function __construct(array $attributes = [])
    {
        $this->attributes = $attributes;
    }
    public function getSubNodeNames() : array
    {
        return [];
    }
    /**
     * Get name of magic constant.
     *
     * @return string Name of magic constant
     */
    public abstract function getName() : string;
}
<?php

declare (strict_types=1);
namespace PhpParser\Node\Scalar;

use PhpParser\Error;
use PhpParser\Node\Scalar;
class LNumber extends Scalar
{
    /* For use in "kind" attribute */
    const KIND_BIN = 2;
    const KIND_OCT = 8;
    const KIND_DEC = 10;
    const KIND_HEX = 16;
    /** @var int Number value */
    public $value;
    /**
     * Constructs an integer number scalar node.
     *
     * @param int   $value      Value of the number
     * @param array $attributes Additional attributes
     */
    public function __construct(int $value, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->value = $value;
    }
    public function getSubNodeNames() : array
    {
        return ['value'];
    }
    /**
     * Constructs an LNumber node from a string number literal.
     *
     * @param string $str               String number literal (decimal, octal, hex or binary)
     * @param array  $attributes        Additional attributes
     * @param bool   $allowInvalidOctal Whether to allow invalid octal numbers (PHP 5)
     *
     * @return LNumber The constructed LNumber, including kind attribute
     */
    public static function fromString(string $str, array $attributes = [], bool $allowInvalidOctal = \false) : \PhpParser\Node\Scalar\LNumber
    {
        $attributes['rawValue'] = $str;
        $str = \str_replace('_', '', $str);
        if ('0' !== $str[0] || '0' === $str) {
            $attributes['kind'] = \PhpParser\Node\Scalar\LNumber::KIND_DEC;
            return new \PhpParser\Node\Scalar\LNumber((int) $str, $attributes);
        }
        if ('x' === $str[1] || 'X' === $str[1]) {
            $attributes['kind'] = \PhpParser\Node\Scalar\LNumber::KIND_HEX;
            return new \PhpParser\Node\Scalar\LNumber(\hexdec($str), $attributes);
        }
        if ('b' === $str[1] || 'B' === $str[1]) {
            $attributes['kind'] = \PhpParser\Node\Scalar\LNumber::KIND_BIN;
            return new \PhpParser\Node\Scalar\LNumber(\bindec($str), $attributes);
        }
        if (!$allowInvalidOctal && \strpbrk($str, '89')) {
            throw new Error('Invalid numeric literal', $attributes);
        }
        // Strip optional explicit octal prefix.
        if ('o' === $str[1] || 'O' === $str[1]) {
            $str = \substr($str, 2);
        }
        // use intval instead of octdec to get proper cutting behavior with malformed numbers
        $attributes['kind'] = \PhpParser\Node\Scalar\LNumber::KIND_OCT;
        return new \PhpParser\Node\Scalar\LNumber(\intval($str, 8), $attributes);
    }
    public function getType() : string
    {
        return 'Scalar_LNumber';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node;

use PhpParser\NodeAbstract;
class IntersectionType extends \PhpParser\Node\ComplexType
{
    /** @var (Identifier|Name)[] Types */
    public $types;
    /**
     * Constructs an intersection type.
     *
     * @param (Identifier|Name)[] $types      Types
     * @param array               $attributes Additional attributes
     */
    public function __construct(array $types, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->types = $types;
    }
    public function getSubNodeNames() : array
    {
        return ['types'];
    }
    public function getType() : string
    {
        return 'IntersectionType';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node;

use PhpParser\NodeAbstract;
abstract class Stmt extends NodeAbstract
{
}
<?php

declare (strict_types=1);
namespace PhpParser\Node;

use PhpParser\NodeAbstract;
/**
 * Represents a non-namespaced name. Namespaced names are represented using Name nodes.
 */
class Identifier extends NodeAbstract
{
    /** @var string Identifier as string */
    public $name;
    private static $specialClassNames = ['self' => \true, 'parent' => \true, 'static' => \true];
    /**
     * Constructs an identifier node.
     *
     * @param string $name       Identifier as string
     * @param array  $attributes Additional attributes
     */
    public function __construct(string $name, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->name = $name;
    }
    public function getSubNodeNames() : array
    {
        return ['name'];
    }
    /**
     * Get identifier as string.
     *
     * @return string Identifier as string.
     */
    public function toString() : string
    {
        return $this->name;
    }
    /**
     * Get lowercased identifier as string.
     *
     * @return string Lowercased identifier as string
     */
    public function toLowerString() : string
    {
        return \strtolower($this->name);
    }
    /**
     * Checks whether the identifier is a special class name (self, parent or static).
     *
     * @return bool Whether identifier is a special class name
     */
    public function isSpecialClassName() : bool
    {
        return isset(self::$specialClassNames[\strtolower($this->name)]);
    }
    /**
     * Get identifier as string.
     *
     * @return string Identifier as string
     */
    public function __toString() : string
    {
        return $this->name;
    }
    public function getType() : string
    {
        return 'Identifier';
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\Node;

class NullableType extends \PhpParser\Node\ComplexType
{
    /** @var Identifier|Name Type */
    public $type;
    /**
     * Constructs a nullable type (wrapping another type).
     *
     * @param string|Identifier|Name $type       Type
     * @param array                  $attributes Additional attributes
     */
    public function __construct($type, array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->type = \is_string($type) ? new \PhpParser\Node\Identifier($type) : $type;
    }
    public function getSubNodeNames() : array
    {
        return ['type'];
    }
    public function getType() : string
    {
        return 'NullableType';
    }
}
<?php

namespace PhpParser;

class ConstExprEvaluationException extends \Exception
{
}
<?php

declare (strict_types=1);
namespace PhpParser;

use PhpParser\Parser\Tokens;
class Lexer
{
    protected $code;
    protected $tokens;
    protected $pos;
    protected $line;
    protected $filePos;
    protected $prevCloseTagHasNewline;
    protected $tokenMap;
    protected $dropTokens;
    protected $identifierTokens;
    private $attributeStartLineUsed;
    private $attributeEndLineUsed;
    private $attributeStartTokenPosUsed;
    private $attributeEndTokenPosUsed;
    private $attributeStartFilePosUsed;
    private $attributeEndFilePosUsed;
    private $attributeCommentsUsed;
    /**
     * Creates a Lexer.
     *
     * @param array $options Options array. Currently only the 'usedAttributes' option is supported,
     *                       which is an array of attributes to add to the AST nodes. Possible
     *                       attributes are: 'comments', 'startLine', 'endLine', 'startTokenPos',
     *                       'endTokenPos', 'startFilePos', 'endFilePos'. The option defaults to the
     *                       first three. For more info see getNextToken() docs.
     */
    public function __construct(array $options = [])
    {
        // Create Map from internal tokens to PhpParser tokens.
        $this->defineCompatibilityTokens();
        $this->tokenMap = $this->createTokenMap();
        $this->identifierTokens = $this->createIdentifierTokenMap();
        // map of tokens to drop while lexing (the map is only used for isset lookup,
        // that's why the value is simply set to 1; the value is never actually used.)
        $this->dropTokens = \array_fill_keys([\T_WHITESPACE, \T_OPEN_TAG, \T_COMMENT, \T_DOC_COMMENT, \T_BAD_CHARACTER], 1);
        $defaultAttributes = ['comments', 'startLine', 'endLine'];
        $usedAttributes = \array_fill_keys($options['usedAttributes'] ?? $defaultAttributes, \true);
        // Create individual boolean properties to make these checks faster.
        $this->attributeStartLineUsed = isset($usedAttributes['startLine']);
        $this->attributeEndLineUsed = isset($usedAttributes['endLine']);
        $this->attributeStartTokenPosUsed = isset($usedAttributes['startTokenPos']);
        $this->attributeEndTokenPosUsed = isset($usedAttributes['endTokenPos']);
        $this->attributeStartFilePosUsed = isset($usedAttributes['startFilePos']);
        $this->attributeEndFilePosUsed = isset($usedAttributes['endFilePos']);
        $this->attributeCommentsUsed = isset($usedAttributes['comments']);
    }
    /**
     * Initializes the lexer for lexing the provided source code.
     *
     * This function does not throw if lexing errors occur. Instead, errors may be retrieved using
     * the getErrors() method.
     *
     * @param string $code The source code to lex
     * @param ErrorHandler|null $errorHandler Error handler to use for lexing errors. Defaults to
     *                                        ErrorHandler\Throwing
     */
    public function startLexing(string $code, \PhpParser\ErrorHandler $errorHandler = null)
    {
        if (null === $errorHandler) {
            $errorHandler = new \PhpParser\ErrorHandler\Throwing();
        }
        $this->code = $code;
        // keep the code around for __halt_compiler() handling
        $this->pos = -1;
        $this->line = 1;
        $this->filePos = 0;
        // If inline HTML occurs without preceding code, treat it as if it had a leading newline.
        // This ensures proper composability, because having a newline is the "safe" assumption.
        $this->prevCloseTagHasNewline = \true;
        $scream = \ini_set('xdebug.scream', '0');
        $this->tokens = @\token_get_all($code);
        $this->postprocessTokens($errorHandler);
        if (\false !== $scream) {
            \ini_set('xdebug.scream', $scream);
        }
    }
    private function handleInvalidCharacterRange($start, $end, $line, \PhpParser\ErrorHandler $errorHandler)
    {
        $tokens = [];
        for ($i = $start; $i < $end; $i++) {
            $chr = $this->code[$i];
            if ($chr === "\x00") {
                // PHP cuts error message after null byte, so need special case
                $errorMsg = 'Unexpected null byte';
            } else {
                $errorMsg = \sprintf('Unexpected character "%s" (ASCII %d)', $chr, \ord($chr));
            }
            $tokens[] = [\T_BAD_CHARACTER, $chr, $line];
            $errorHandler->handleError(new \PhpParser\Error($errorMsg, ['startLine' => $line, 'endLine' => $line, 'startFilePos' => $i, 'endFilePos' => $i]));
        }
        return $tokens;
    }
    /**
     * Check whether comment token is unterminated.
     *
     * @return bool
     */
    private function isUnterminatedComment($token) : bool
    {
        return ($token[0] === \T_COMMENT || $token[0] === \T_DOC_COMMENT) && \substr($token[1], 0, 2) === '/*' && \substr($token[1], -2) !== '*/';
    }
    protected function postprocessTokens(\PhpParser\ErrorHandler $errorHandler)
    {
        // PHP's error handling for token_get_all() is rather bad, so if we want detailed
        // error information we need to compute it ourselves. Invalid character errors are
        // detected by finding "gaps" in the token array. Unterminated comments are detected
        // by checking if a trailing comment has a "*/" at the end.
        //
        // Additionally, we perform a number of canonicalizations here:
        //  * Use the PHP 8.0 comment format, which does not include trailing whitespace anymore.
        //  * Use PHP 8.0 T_NAME_* tokens.
        //  * Use PHP 8.1 T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG and
        //    T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG tokens used to disambiguate intersection types.
        $filePos = 0;
        $line = 1;
        $numTokens = \count($this->tokens);
        for ($i = 0; $i < $numTokens; $i++) {
            $token = $this->tokens[$i];
            // Since PHP 7.4 invalid characters are represented by a T_BAD_CHARACTER token.
            // In this case we only need to emit an error.
            if ($token[0] === \T_BAD_CHARACTER) {
                $this->handleInvalidCharacterRange($filePos, $filePos + 1, $line, $errorHandler);
            }
            if ($token[0] === \T_COMMENT && \substr($token[1], 0, 2) !== '/*' && \preg_match('/(\\r\\n|\\n|\\r)$/D', $token[1], $matches)) {
                $trailingNewline = $matches[0];
                $token[1] = \substr($token[1], 0, -\strlen($trailingNewline));
                $this->tokens[$i] = $token;
                if (isset($this->tokens[$i + 1]) && $this->tokens[$i + 1][0] === \T_WHITESPACE) {
                    // Move trailing newline into following T_WHITESPACE token, if it already exists.
                    $this->tokens[$i + 1][1] = $trailingNewline . $this->tokens[$i + 1][1];
                    $this->tokens[$i + 1][2]--;
                } else {
                    // Otherwise, we need to create a new T_WHITESPACE token.
                    \array_splice($this->tokens, $i + 1, 0, [[\T_WHITESPACE, $trailingNewline, $line]]);
                    $numTokens++;
                }
            }
            // Emulate PHP 8 T_NAME_* tokens, by combining sequences of T_NS_SEPARATOR and T_STRING
            // into a single token.
            if (\is_array($token) && ($token[0] === \T_NS_SEPARATOR || isset($this->identifierTokens[$token[0]]))) {
                $lastWasSeparator = $token[0] === \T_NS_SEPARATOR;
                $text = $token[1];
                for ($j = $i + 1; isset($this->tokens[$j]); $j++) {
                    if ($lastWasSeparator) {
                        if (!isset($this->identifierTokens[$this->tokens[$j][0]])) {
                            break;
                        }
                        $lastWasSeparator = \false;
                    } else {
                        if ($this->tokens[$j][0] !== \T_NS_SEPARATOR) {
                            break;
                        }
                        $lastWasSeparator = \true;
                    }
                    $text .= $this->tokens[$j][1];
                }
                if ($lastWasSeparator) {
                    // Trailing separator is not part of the name.
                    $j--;
                    $text = \substr($text, 0, -1);
                }
                if ($j > $i + 1) {
                    if ($token[0] === \T_NS_SEPARATOR) {
                        $type = \T_NAME_FULLY_QUALIFIED;
                    } else {
                        if ($token[0] === \T_NAMESPACE) {
                            $type = \T_NAME_RELATIVE;
                        } else {
                            $type = \T_NAME_QUALIFIED;
                        }
                    }
                    $token = [$type, $text, $line];
                    \array_splice($this->tokens, $i, $j - $i, [$token]);
                    $numTokens -= $j - $i - 1;
                }
            }
            if ($token === '&') {
                $next = $i + 1;
                while (isset($this->tokens[$next]) && $this->tokens[$next][0] === \T_WHITESPACE) {
                    $next++;
                }
                $followedByVarOrVarArg = isset($this->tokens[$next]) && ($this->tokens[$next][0] === \T_VARIABLE || $this->tokens[$next][0] === \T_ELLIPSIS);
                $this->tokens[$i] = $token = [$followedByVarOrVarArg ? \T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG : \T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG, '&', $line];
            }
            $tokenValue = \is_string($token) ? $token : $token[1];
            $tokenLen = \strlen($tokenValue);
            if (\substr($this->code, $filePos, $tokenLen) !== $tokenValue) {
                // Something is missing, must be an invalid character
                $nextFilePos = \strpos($this->code, $tokenValue, $filePos);
                $badCharTokens = $this->handleInvalidCharacterRange($filePos, $nextFilePos, $line, $errorHandler);
                $filePos = (int) $nextFilePos;
                \array_splice($this->tokens, $i, 0, $badCharTokens);
                $numTokens += \count($badCharTokens);
                $i += \count($badCharTokens);
            }
            $filePos += $tokenLen;
            $line += \substr_count($tokenValue, "\n");
        }
        if ($filePos !== \strlen($this->code)) {
            if (\substr($this->code, $filePos, 2) === '/*') {
                // Unlike PHP, HHVM will drop unterminated comments entirely
                $comment = \substr($this->code, $filePos);
                $errorHandler->handleError(new \PhpParser\Error('Unterminated comment', ['startLine' => $line, 'endLine' => $line + \substr_count($comment, "\n"), 'startFilePos' => $filePos, 'endFilePos' => $filePos + \strlen($comment)]));
                // Emulate the PHP behavior
                $isDocComment = isset($comment[3]) && $comment[3] === '*';
                $this->tokens[] = [$isDocComment ? \T_DOC_COMMENT : \T_COMMENT, $comment, $line];
            } else {
                // Invalid characters at the end of the input
                $badCharTokens = $this->handleInvalidCharacterRange($filePos, \strlen($this->code), $line, $errorHandler);
                $this->tokens = \array_merge($this->tokens, $badCharTokens);
            }
            return;
        }
        if (\count($this->tokens) > 0) {
            // Check for unterminated comment
            $lastToken = $this->tokens[\count($this->tokens) - 1];
            if ($this->isUnterminatedComment($lastToken)) {
                $errorHandler->handleError(new \PhpParser\Error('Unterminated comment', ['startLine' => $line - \substr_count($lastToken[1], "\n"), 'endLine' => $line, 'startFilePos' => $filePos - \strlen($lastToken[1]), 'endFilePos' => $filePos]));
            }
        }
    }
    /**
     * Fetches the next token.
     *
     * The available attributes are determined by the 'usedAttributes' option, which can
     * be specified in the constructor. The following attributes are supported:
     *
     *  * 'comments'      => Array of PhpParser\Comment or PhpParser\Comment\Doc instances,
     *                       representing all comments that occurred between the previous
     *                       non-discarded token and the current one.
     *  * 'startLine'     => Line in which the node starts.
     *  * 'endLine'       => Line in which the node ends.
     *  * 'startTokenPos' => Offset into the token array of the first token in the node.
     *  * 'endTokenPos'   => Offset into the token array of the last token in the node.
     *  * 'startFilePos'  => Offset into the code string of the first character that is part of the node.
     *  * 'endFilePos'    => Offset into the code string of the last character that is part of the node.
     *
     * @param mixed $value           Variable to store token content in
     * @param mixed $startAttributes Variable to store start attributes in
     * @param mixed $endAttributes   Variable to store end attributes in
     *
     * @return int Token id
     */
    public function getNextToken(&$value = null, &$startAttributes = null, &$endAttributes = null) : int
    {
        $startAttributes = [];
        $endAttributes = [];
        while (1) {
            if (isset($this->tokens[++$this->pos])) {
                $token = $this->tokens[$this->pos];
            } else {
                // EOF token with ID 0
                $token = "\x00";
            }
            if ($this->attributeStartLineUsed) {
                $startAttributes['startLine'] = $this->line;
            }
            if ($this->attributeStartTokenPosUsed) {
                $startAttributes['startTokenPos'] = $this->pos;
            }
            if ($this->attributeStartFilePosUsed) {
                $startAttributes['startFilePos'] = $this->filePos;
            }
            if (\is_string($token)) {
                $value = $token;
                if (isset($token[1])) {
                    // bug in token_get_all
                    $this->filePos += 2;
                    $id = \ord('"');
                } else {
                    $this->filePos += 1;
                    $id = \ord($token);
                }
            } elseif (!isset($this->dropTokens[$token[0]])) {
                $value = $token[1];
                $id = $this->tokenMap[$token[0]];
                if (\T_CLOSE_TAG === $token[0]) {
                    $this->prevCloseTagHasNewline = \false !== \strpos($token[1], "\n") || \false !== \strpos($token[1], "\r");
                } elseif (\T_INLINE_HTML === $token[0]) {
                    $startAttributes['hasLeadingNewline'] = $this->prevCloseTagHasNewline;
                }
                $this->line += \substr_count($value, "\n");
                $this->filePos += \strlen($value);
            } else {
                $origLine = $this->line;
                $origFilePos = $this->filePos;
                $this->line += \substr_count($token[1], "\n");
                $this->filePos += \strlen($token[1]);
                if (\T_COMMENT === $token[0] || \T_DOC_COMMENT === $token[0]) {
                    if ($this->attributeCommentsUsed) {
                        $comment = \T_DOC_COMMENT === $token[0] ? new \PhpParser\Comment\Doc($token[1], $origLine, $origFilePos, $this->pos, $this->line, $this->filePos - 1, $this->pos) : new \PhpParser\Comment($token[1], $origLine, $origFilePos, $this->pos, $this->line, $this->filePos - 1, $this->pos);
                        $startAttributes['comments'][] = $comment;
                    }
                }
                continue;
            }
            if ($this->attributeEndLineUsed) {
                $endAttributes['endLine'] = $this->line;
            }
            if ($this->attributeEndTokenPosUsed) {
                $endAttributes['endTokenPos'] = $this->pos;
            }
            if ($this->attributeEndFilePosUsed) {
                $endAttributes['endFilePos'] = $this->filePos - 1;
            }
            return $id;
        }
        throw new \RuntimeException('Reached end of lexer loop');
    }
    /**
     * Returns the token array for current code.
     *
     * The token array is in the same format as provided by the
     * token_get_all() function and does not discard tokens (i.e.
     * whitespace and comments are included). The token position
     * attributes are against this token array.
     *
     * @return array Array of tokens in token_get_all() format
     */
    public function getTokens() : array
    {
        return $this->tokens;
    }
    /**
     * Handles __halt_compiler() by returning the text after it.
     *
     * @return string Remaining text
     */
    public function handleHaltCompiler() : string
    {
        // text after T_HALT_COMPILER, still including ();
        $textAfter = \substr($this->code, $this->filePos);
        // ensure that it is followed by ();
        // this simplifies the situation, by not allowing any comments
        // in between of the tokens.
        if (!\preg_match('~^\\s*\\(\\s*\\)\\s*(?:;|\\?>\\r?\\n?)~', $textAfter, $matches)) {
            throw new \PhpParser\Error('__HALT_COMPILER must be followed by "();"');
        }
        // prevent the lexer from returning any further tokens
        $this->pos = \count($this->tokens);
        // return with (); removed
        return \substr($textAfter, \strlen($matches[0]));
    }
    private function defineCompatibilityTokens()
    {
        static $compatTokensDefined = \false;
        if ($compatTokensDefined) {
            return;
        }
        $compatTokens = [
            // PHP 7.4
            'T_BAD_CHARACTER',
            'T_FN',
            'T_COALESCE_EQUAL',
            // PHP 8.0
            'T_NAME_QUALIFIED',
            'T_NAME_FULLY_QUALIFIED',
            'T_NAME_RELATIVE',
            'T_MATCH',
            'T_NULLSAFE_OBJECT_OPERATOR',
            'T_ATTRIBUTE',
            // PHP 8.1
            'T_ENUM',
            'T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG',
            'T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG',
            'T_READONLY',
        ];
        // PHP-Parser might be used together with another library that also emulates some or all
        // of these tokens. Perform a sanity-check that all already defined tokens have been
        // assigned a unique ID.
        $usedTokenIds = [];
        foreach ($compatTokens as $token) {
            if (\defined($token)) {
                $tokenId = \constant($token);
                $clashingToken = $usedTokenIds[$tokenId] ?? null;
                if ($clashingToken !== null) {
                    throw new \Error(\sprintf('Token %s has same ID as token %s, ' . 'you may be using a library with broken token emulation', $token, $clashingToken));
                }
                $usedTokenIds[$tokenId] = $token;
            }
        }
        // Now define any tokens that have not yet been emulated. Try to assign IDs from -1
        // downwards, but skip any IDs that may already be in use.
        $newTokenId = -1;
        foreach ($compatTokens as $token) {
            if (!\defined($token)) {
                while (isset($usedTokenIds[$newTokenId])) {
                    $newTokenId--;
                }
                \define($token, $newTokenId);
                $newTokenId--;
            }
        }
        $compatTokensDefined = \true;
    }
    /**
     * Creates the token map.
     *
     * The token map maps the PHP internal token identifiers
     * to the identifiers used by the Parser. Additionally it
     * maps T_OPEN_TAG_WITH_ECHO to T_ECHO and T_CLOSE_TAG to ';'.
     *
     * @return array The token map
     */
    protected function createTokenMap() : array
    {
        $tokenMap = [];
        // 256 is the minimum possible token number, as everything below
        // it is an ASCII value
        for ($i = 256; $i < 1000; ++$i) {
            if (\T_DOUBLE_COLON === $i) {
                // T_DOUBLE_COLON is equivalent to T_PAAMAYIM_NEKUDOTAYIM
                $tokenMap[$i] = Tokens::T_PAAMAYIM_NEKUDOTAYIM;
            } elseif (\T_OPEN_TAG_WITH_ECHO === $i) {
                // T_OPEN_TAG_WITH_ECHO with dropped T_OPEN_TAG results in T_ECHO
                $tokenMap[$i] = Tokens::T_ECHO;
            } elseif (\T_CLOSE_TAG === $i) {
                // T_CLOSE_TAG is equivalent to ';'
                $tokenMap[$i] = \ord(';');
            } elseif ('UNKNOWN' !== ($name = \token_name($i))) {
                if ('T_HASHBANG' === $name) {
                    // HHVM uses a special token for #! hashbang lines
                    $tokenMap[$i] = Tokens::T_INLINE_HTML;
                } elseif (\defined($name = Tokens::class . '::' . $name)) {
                    // Other tokens can be mapped directly
                    $tokenMap[$i] = \constant($name);
                }
            }
        }
        // HHVM uses a special token for numbers that overflow to double
        if (\defined('_PHPStan_dcc7b7cff\\T_ONUMBER')) {
            $tokenMap[\_PHPStan_dcc7b7cff\T_ONUMBER] = Tokens::T_DNUMBER;
        }
        // HHVM also has a separate token for the __COMPILER_HALT_OFFSET__ constant
        if (\defined('_PHPStan_dcc7b7cff\\T_COMPILER_HALT_OFFSET')) {
            $tokenMap[\_PHPStan_dcc7b7cff\T_COMPILER_HALT_OFFSET] = Tokens::T_STRING;
        }
        // Assign tokens for which we define compatibility constants, as token_name() does not know them.
        $tokenMap[\T_FN] = Tokens::T_FN;
        $tokenMap[\T_COALESCE_EQUAL] = Tokens::T_COALESCE_EQUAL;
        $tokenMap[\T_NAME_QUALIFIED] = Tokens::T_NAME_QUALIFIED;
        $tokenMap[\T_NAME_FULLY_QUALIFIED] = Tokens::T_NAME_FULLY_QUALIFIED;
        $tokenMap[\T_NAME_RELATIVE] = Tokens::T_NAME_RELATIVE;
        $tokenMap[\T_MATCH] = Tokens::T_MATCH;
        $tokenMap[\T_NULLSAFE_OBJECT_OPERATOR] = Tokens::T_NULLSAFE_OBJECT_OPERATOR;
        $tokenMap[\T_ATTRIBUTE] = Tokens::T_ATTRIBUTE;
        $tokenMap[\T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG] = Tokens::T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG;
        $tokenMap[\T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG] = Tokens::T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG;
        $tokenMap[\T_ENUM] = Tokens::T_ENUM;
        $tokenMap[\T_READONLY] = Tokens::T_READONLY;
        return $tokenMap;
    }
    private function createIdentifierTokenMap() : array
    {
        // Based on semi_reserved production.
        return \array_fill_keys([\T_STRING, \T_STATIC, \T_ABSTRACT, \T_FINAL, \T_PRIVATE, \T_PROTECTED, \T_PUBLIC, \T_READONLY, \T_INCLUDE, \T_INCLUDE_ONCE, \T_EVAL, \T_REQUIRE, \T_REQUIRE_ONCE, \T_LOGICAL_OR, \T_LOGICAL_XOR, \T_LOGICAL_AND, \T_INSTANCEOF, \T_NEW, \T_CLONE, \T_EXIT, \T_IF, \T_ELSEIF, \T_ELSE, \T_ENDIF, \T_ECHO, \T_DO, \T_WHILE, \T_ENDWHILE, \T_FOR, \T_ENDFOR, \T_FOREACH, \T_ENDFOREACH, \T_DECLARE, \T_ENDDECLARE, \T_AS, \T_TRY, \T_CATCH, \T_FINALLY, \T_THROW, \T_USE, \T_INSTEADOF, \T_GLOBAL, \T_VAR, \T_UNSET, \T_ISSET, \T_EMPTY, \T_CONTINUE, \T_GOTO, \T_FUNCTION, \T_CONST, \T_RETURN, \T_PRINT, \T_YIELD, \T_LIST, \T_SWITCH, \T_ENDSWITCH, \T_CASE, \T_DEFAULT, \T_BREAK, \T_ARRAY, \T_CALLABLE, \T_EXTENDS, \T_IMPLEMENTS, \T_NAMESPACE, \T_TRAIT, \T_INTERFACE, \T_CLASS, \T_CLASS_C, \T_TRAIT_C, \T_FUNC_C, \T_METHOD_C, \T_LINE, \T_FILE, \T_DIR, \T_NS_C, \T_HALT_COMPILER, \T_FN, \T_MATCH], \true);
    }
}
<?php

declare (strict_types=1);
namespace PhpParser;

class Error extends \RuntimeException
{
    protected $rawMessage;
    protected $attributes;
    /**
     * Creates an Exception signifying a parse error.
     *
     * @param string    $message    Error message
     * @param array|int $attributes Attributes of node/token where error occurred
     *                              (or start line of error -- deprecated)
     */
    public function __construct(string $message, $attributes = [])
    {
        $this->rawMessage = $message;
        if (\is_array($attributes)) {
            $this->attributes = $attributes;
        } else {
            $this->attributes = ['startLine' => $attributes];
        }
        $this->updateMessage();
    }
    /**
     * Gets the error message
     *
     * @return string Error message
     */
    public function getRawMessage() : string
    {
        return $this->rawMessage;
    }
    /**
     * Gets the line the error starts in.
     *
     * @return int Error start line
     */
    public function getStartLine() : int
    {
        return $this->attributes['startLine'] ?? -1;
    }
    /**
     * Gets the line the error ends in.
     *
     * @return int Error end line
     */
    public function getEndLine() : int
    {
        return $this->attributes['endLine'] ?? -1;
    }
    /**
     * Gets the attributes of the node/token the error occurred at.
     *
     * @return array
     */
    public function getAttributes() : array
    {
        return $this->attributes;
    }
    /**
     * Sets the attributes of the node/token the error occurred at.
     *
     * @param array $attributes
     */
    public function setAttributes(array $attributes)
    {
        $this->attributes = $attributes;
        $this->updateMessage();
    }
    /**
     * Sets the line of the PHP file the error occurred in.
     *
     * @param string $message Error message
     */
    public function setRawMessage(string $message)
    {
        $this->rawMessage = $message;
        $this->updateMessage();
    }
    /**
     * Sets the line the error starts in.
     *
     * @param int $line Error start line
     */
    public function setStartLine(int $line)
    {
        $this->attributes['startLine'] = $line;
        $this->updateMessage();
    }
    /**
     * Returns whether the error has start and end column information.
     *
     * For column information enable the startFilePos and endFilePos in the lexer options.
     *
     * @return bool
     */
    public function hasColumnInfo() : bool
    {
        return isset($this->attributes['startFilePos'], $this->attributes['endFilePos']);
    }
    /**
     * Gets the start column (1-based) into the line where the error started.
     *
     * @param string $code Source code of the file
     * @return int
     */
    public function getStartColumn(string $code) : int
    {
        if (!$this->hasColumnInfo()) {
            throw new \RuntimeException('Error does not have column information');
        }
        return $this->toColumn($code, $this->attributes['startFilePos']);
    }
    /**
     * Gets the end column (1-based) into the line where the error ended.
     *
     * @param string $code Source code of the file
     * @return int
     */
    public function getEndColumn(string $code) : int
    {
        if (!$this->hasColumnInfo()) {
            throw new \RuntimeException('Error does not have column information');
        }
        return $this->toColumn($code, $this->attributes['endFilePos']);
    }
    /**
     * Formats message including line and column information.
     *
     * @param string $code Source code associated with the error, for calculation of the columns
     *
     * @return string Formatted message
     */
    public function getMessageWithColumnInfo(string $code) : string
    {
        return \sprintf('%s from %d:%d to %d:%d', $this->getRawMessage(), $this->getStartLine(), $this->getStartColumn($code), $this->getEndLine(), $this->getEndColumn($code));
    }
    /**
     * Converts a file offset into a column.
     *
     * @param string $code Source code that $pos indexes into
     * @param int    $pos  0-based position in $code
     *
     * @return int 1-based column (relative to start of line)
     */
    private function toColumn(string $code, int $pos) : int
    {
        if ($pos > \strlen($code)) {
            throw new \RuntimeException('Invalid position information');
        }
        $lineStartPos = \strrpos($code, "\n", $pos - \strlen($code));
        if (\false === $lineStartPos) {
            $lineStartPos = -1;
        }
        return $pos - $lineStartPos;
    }
    /**
     * Updates the exception message after a change to rawMessage or rawLine.
     */
    protected function updateMessage()
    {
        $this->message = $this->rawMessage;
        if (-1 === $this->getStartLine()) {
            $this->message .= ' on unknown line';
        } else {
            $this->message .= ' on line ' . $this->getStartLine();
        }
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\ErrorHandler;

use PhpParser\Error;
use PhpParser\ErrorHandler;
/**
 * Error handler that handles all errors by throwing them.
 *
 * This is the default strategy used by all components.
 */
class Throwing implements ErrorHandler
{
    public function handleError(Error $error)
    {
        throw $error;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser\ErrorHandler;

use PhpParser\Error;
use PhpParser\ErrorHandler;
/**
 * Error handler that collects all errors into an array.
 *
 * This allows graceful handling of errors.
 */
class Collecting implements ErrorHandler
{
    /** @var Error[] Collected errors */
    private $errors = [];
    public function handleError(Error $error)
    {
        $this->errors[] = $error;
    }
    /**
     * Get collected errors.
     *
     * @return Error[]
     */
    public function getErrors() : array
    {
        return $this->errors;
    }
    /**
     * Check whether there are any errors.
     *
     * @return bool
     */
    public function hasErrors() : bool
    {
        return !empty($this->errors);
    }
    /**
     * Reset/clear collected errors.
     */
    public function clearErrors()
    {
        $this->errors = [];
    }
}
<?php

declare (strict_types=1);
namespace PhpParser;

use PhpParser\Node\ComplexType;
use PhpParser\Node\Expr;
use PhpParser\Node\Identifier;
use PhpParser\Node\Name;
use PhpParser\Node\NullableType;
use PhpParser\Node\Scalar;
use PhpParser\Node\Stmt;
/**
 * This class defines helpers used in the implementation of builders. Don't use it directly.
 *
 * @internal
 */
final class BuilderHelpers
{
    /**
     * Normalizes a node: Converts builder objects to nodes.
     *
     * @param Node|Builder $node The node to normalize
     *
     * @return Node The normalized node
     */
    public static function normalizeNode($node) : \PhpParser\Node
    {
        if ($node instanceof \PhpParser\Builder) {
            return $node->getNode();
        }
        if ($node instanceof \PhpParser\Node) {
            return $node;
        }
        throw new \LogicException('Expected node or builder object');
    }
    /**
     * Normalizes a node to a statement.
     *
     * Expressions are wrapped in a Stmt\Expression node.
     *
     * @param Node|Builder $node The node to normalize
     *
     * @return Stmt The normalized statement node
     */
    public static function normalizeStmt($node) : Stmt
    {
        $node = self::normalizeNode($node);
        if ($node instanceof Stmt) {
            return $node;
        }
        if ($node instanceof Expr) {
            return new Stmt\Expression($node);
        }
        throw new \LogicException('Expected statement or expression node');
    }
    /**
     * Normalizes strings to Identifier.
     *
     * @param string|Identifier $name The identifier to normalize
     *
     * @return Identifier The normalized identifier
     */
    public static function normalizeIdentifier($name) : Identifier
    {
        if ($name instanceof Identifier) {
            return $name;
        }
        if (\is_string($name)) {
            return new Identifier($name);
        }
        throw new \LogicException('_PHPStan_dcc7b7cff\\Expected string or instance of Node\\Identifier');
    }
    /**
     * Normalizes strings to Identifier, also allowing expressions.
     *
     * @param string|Identifier|Expr $name The identifier to normalize
     *
     * @return Identifier|Expr The normalized identifier or expression
     */
    public static function normalizeIdentifierOrExpr($name)
    {
        if ($name instanceof Identifier || $name instanceof Expr) {
            return $name;
        }
        if (\is_string($name)) {
            return new Identifier($name);
        }
        throw new \LogicException('_PHPStan_dcc7b7cff\\Expected string or instance of Node\\Identifier or Node\\Expr');
    }
    /**
     * Normalizes a name: Converts string names to Name nodes.
     *
     * @param Name|string $name The name to normalize
     *
     * @return Name The normalized name
     */
    public static function normalizeName($name) : Name
    {
        if ($name instanceof Name) {
            return $name;
        }
        if (\is_string($name)) {
            if (!$name) {
                throw new \LogicException('Name cannot be empty');
            }
            if ($name[0] === '\\') {
                return new Name\FullyQualified(\substr($name, 1));
            }
            if (0 === \strpos($name, 'namespace\\')) {
                return new Name\Relative(\substr($name, \strlen('namespace\\')));
            }
            return new Name($name);
        }
        throw new \LogicException('_PHPStan_dcc7b7cff\\Name must be a string or an instance of Node\\Name');
    }
    /**
     * Normalizes a name: Converts string names to Name nodes, while also allowing expressions.
     *
     * @param Expr|Name|string $name The name to normalize
     *
     * @return Name|Expr The normalized name or expression
     */
    public static function normalizeNameOrExpr($name)
    {
        if ($name instanceof Expr) {
            return $name;
        }
        if (!\is_string($name) && !$name instanceof Name) {
            throw new \LogicException('_PHPStan_dcc7b7cff\\Name must be a string or an instance of Node\\Name or Node\\Expr');
        }
        return self::normalizeName($name);
    }
    /**
     * Normalizes a type: Converts plain-text type names into proper AST representation.
     *
     * In particular, builtin types become Identifiers, custom types become Names and nullables
     * are wrapped in NullableType nodes.
     *
     * @param string|Name|Identifier|ComplexType $type The type to normalize
     *
     * @return Name|Identifier|ComplexType The normalized type
     */
    public static function normalizeType($type)
    {
        if (!\is_string($type)) {
            if (!$type instanceof Name && !$type instanceof Identifier && !$type instanceof ComplexType) {
                throw new \LogicException('Type must be a string, or an instance of Name, Identifier or ComplexType');
            }
            return $type;
        }
        $nullable = \false;
        if (\strlen($type) > 0 && $type[0] === '?') {
            $nullable = \true;
            $type = \substr($type, 1);
        }
        $builtinTypes = ['array', 'callable', 'bool', 'int', 'float', 'string', 'iterable', 'void', 'object', 'null', 'false', 'mixed', 'never', 'true'];
        $lowerType = \strtolower($type);
        if (\in_array($lowerType, $builtinTypes)) {
            $type = new Identifier($lowerType);
        } else {
            $type = self::normalizeName($type);
        }
        $notNullableTypes = ['void', 'mixed', 'never'];
        if ($nullable && \in_array((string) $type, $notNullableTypes)) {
            throw new \LogicException(\sprintf('%s type cannot be nullable', $type));
        }
        return $nullable ? new NullableType($type) : $type;
    }
    /**
     * Normalizes a value: Converts nulls, booleans, integers,
     * floats, strings and arrays into their respective nodes
     *
     * @param Node\Expr|bool|null|int|float|string|array $value The value to normalize
     *
     * @return Expr The normalized value
     */
    public static function normalizeValue($value) : Expr
    {
        if ($value instanceof \PhpParser\Node\Expr) {
            return $value;
        }
        if (\is_null($value)) {
            return new Expr\ConstFetch(new Name('null'));
        }
        if (\is_bool($value)) {
            return new Expr\ConstFetch(new Name($value ? 'true' : 'false'));
        }
        if (\is_int($value)) {
            return new Scalar\LNumber($value);
        }
        if (\is_float($value)) {
            return new Scalar\DNumber($value);
        }
        if (\is_string($value)) {
            return new Scalar\String_($value);
        }
        if (\is_array($value)) {
            $items = [];
            $lastKey = -1;
            foreach ($value as $itemKey => $itemValue) {
                // for consecutive, numeric keys don't generate keys
                if (null !== $lastKey && ++$lastKey === $itemKey) {
                    $items[] = new Expr\ArrayItem(self::normalizeValue($itemValue));
                } else {
                    $lastKey = null;
                    $items[] = new Expr\ArrayItem(self::normalizeValue($itemValue), self::normalizeValue($itemKey));
                }
            }
            return new Expr\Array_($items);
        }
        throw new \LogicException('Invalid value');
    }
    /**
     * Normalizes a doc comment: Converts plain strings to PhpParser\Comment\Doc.
     *
     * @param Comment\Doc|string $docComment The doc comment to normalize
     *
     * @return Comment\Doc The normalized doc comment
     */
    public static function normalizeDocComment($docComment) : \PhpParser\Comment\Doc
    {
        if ($docComment instanceof \PhpParser\Comment\Doc) {
            return $docComment;
        }
        if (\is_string($docComment)) {
            return new \PhpParser\Comment\Doc($docComment);
        }
        throw new \LogicException('Doc comment must be a string or an instance of PhpParser\\Comment\\Doc');
    }
    /**
     * Normalizes a attribute: Converts attribute to the Attribute Group if needed.
     *
     * @param Node\Attribute|Node\AttributeGroup $attribute
     *
     * @return Node\AttributeGroup The Attribute Group
     */
    public static function normalizeAttribute($attribute) : \PhpParser\Node\AttributeGroup
    {
        if ($attribute instanceof \PhpParser\Node\AttributeGroup) {
            return $attribute;
        }
        if (!$attribute instanceof \PhpParser\Node\Attribute) {
            throw new \LogicException('Attribute must be an instance of PhpParser\\Node\\Attribute or PhpParser\\Node\\AttributeGroup');
        }
        return new \PhpParser\Node\AttributeGroup([$attribute]);
    }
    /**
     * Adds a modifier and returns new modifier bitmask.
     *
     * @param int $modifiers Existing modifiers
     * @param int $modifier  Modifier to set
     *
     * @return int New modifiers
     */
    public static function addModifier(int $modifiers, int $modifier) : int
    {
        Stmt\Class_::verifyModifier($modifiers, $modifier);
        return $modifiers | $modifier;
    }
    /**
     * Adds a modifier and returns new modifier bitmask.
     * @return int New modifiers
     */
    public static function addClassModifier(int $existingModifiers, int $modifierToSet) : int
    {
        Stmt\Class_::verifyClassModifier($existingModifiers, $modifierToSet);
        return $existingModifiers | $modifierToSet;
    }
}
<?php

declare (strict_types=1);
namespace PhpParser;

use PhpParser\Internal\DiffElem;
use PhpParser\Internal\PrintableNewAnonClassNode;
use PhpParser\Internal\TokenStream;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\AssignOp;
use PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\Cast;
use PhpParser\Node\Scalar;
use PhpParser\Node\Stmt;
abstract class PrettyPrinterAbstract
{
    const FIXUP_PREC_LEFT = 0;
    // LHS operand affected by precedence
    const FIXUP_PREC_RIGHT = 1;
    // RHS operand affected by precedence
    const FIXUP_CALL_LHS = 2;
    // LHS of call
    const FIXUP_DEREF_LHS = 3;
    // LHS of dereferencing operation
    const FIXUP_BRACED_NAME = 4;
    // Name operand that may require bracing
    const FIXUP_VAR_BRACED_NAME = 5;
    // Name operand that may require ${} bracing
    const FIXUP_ENCAPSED = 6;
    // Encapsed string part
    protected $precedenceMap = [
        // [precedence, associativity]
        // where for precedence -1 is %left, 0 is %nonassoc and 1 is %right
        BinaryOp\Pow::class => [0, 1],
        Expr\BitwiseNot::class => [10, 1],
        Expr\PreInc::class => [10, 1],
        Expr\PreDec::class => [10, 1],
        Expr\PostInc::class => [10, -1],
        Expr\PostDec::class => [10, -1],
        Expr\UnaryPlus::class => [10, 1],
        Expr\UnaryMinus::class => [10, 1],
        Cast\Int_::class => [10, 1],
        Cast\Double::class => [10, 1],
        Cast\String_::class => [10, 1],
        Cast\Array_::class => [10, 1],
        Cast\Object_::class => [10, 1],
        Cast\Bool_::class => [10, 1],
        Cast\Unset_::class => [10, 1],
        Expr\ErrorSuppress::class => [10, 1],
        Expr\Instanceof_::class => [20, 0],
        Expr\BooleanNot::class => [30, 1],
        BinaryOp\Mul::class => [40, -1],
        BinaryOp\Div::class => [40, -1],
        BinaryOp\Mod::class => [40, -1],
        BinaryOp\Plus::class => [50, -1],
        BinaryOp\Minus::class => [50, -1],
        BinaryOp\Concat::class => [50, -1],
        BinaryOp\ShiftLeft::class => [60, -1],
        BinaryOp\ShiftRight::class => [60, -1],
        BinaryOp\Smaller::class => [70, 0],
        BinaryOp\SmallerOrEqual::class => [70, 0],
        BinaryOp\Greater::class => [70, 0],
        BinaryOp\GreaterOrEqual::class => [70, 0],
        BinaryOp\Equal::class => [80, 0],
        BinaryOp\NotEqual::class => [80, 0],
        BinaryOp\Identical::class => [80, 0],
        BinaryOp\NotIdentical::class => [80, 0],
        BinaryOp\Spaceship::class => [80, 0],
        BinaryOp\BitwiseAnd::class => [90, -1],
        BinaryOp\BitwiseXor::class => [100, -1],
        BinaryOp\BitwiseOr::class => [110, -1],
        BinaryOp\BooleanAnd::class => [120, -1],
        BinaryOp\BooleanOr::class => [130, -1],
        BinaryOp\Coalesce::class => [140, 1],
        Expr\Ternary::class => [150, 0],
        // parser uses %left for assignments, but they really behave as %right
        Expr\Assign::class => [160, 1],
        Expr\AssignRef::class => [160, 1],
        AssignOp\Plus::class => [160, 1],
        AssignOp\Minus::class => [160, 1],
        AssignOp\Mul::class => [160, 1],
        AssignOp\Div::class => [160, 1],
        AssignOp\Concat::class => [160, 1],
        AssignOp\Mod::class => [160, 1],
        AssignOp\BitwiseAnd::class => [160, 1],
        AssignOp\BitwiseOr::class => [160, 1],
        AssignOp\BitwiseXor::class => [160, 1],
        AssignOp\ShiftLeft::class => [160, 1],
        AssignOp\ShiftRight::class => [160, 1],
        AssignOp\Pow::class => [160, 1],
        AssignOp\Coalesce::class => [160, 1],
        Expr\YieldFrom::class => [165, 1],
        Expr\Print_::class => [168, 1],
        BinaryOp\LogicalAnd::class => [170, -1],
        BinaryOp\LogicalXor::class => [180, -1],
        BinaryOp\LogicalOr::class => [190, -1],
        Expr\Include_::class => [200, -1],
    ];
    /** @var int Current indentation level. */
    protected $indentLevel;
    /** @var string Newline including current indentation. */
    protected $nl;
    /** @var string Token placed at end of doc string to ensure it is followed by a newline. */
    protected $docStringEndToken;
    /** @var bool Whether semicolon namespaces can be used (i.e. no global namespace is used) */
    protected $canUseSemicolonNamespaces;
    /** @var array Pretty printer options */
    protected $options;
    /** @var TokenStream Original tokens for use in format-preserving pretty print */
    protected $origTokens;
    /** @var Internal\Differ Differ for node lists */
    protected $nodeListDiffer;
    /** @var bool[] Map determining whether a certain character is a label character */
    protected $labelCharMap;
    /**
     * @var int[][] Map from token classes and subnode names to FIXUP_* constants. This is used
     *              during format-preserving prints to place additional parens/braces if necessary.
     */
    protected $fixupMap;
    /**
     * @var int[][] Map from "{$node->getType()}->{$subNode}" to ['left' => $l, 'right' => $r],
     *              where $l and $r specify the token type that needs to be stripped when removing
     *              this node.
     */
    protected $removalMap;
    /**
     * @var mixed[] Map from "{$node->getType()}->{$subNode}" to [$find, $beforeToken, $extraLeft, $extraRight].
     *              $find is an optional token after which the insertion occurs. $extraLeft/Right
     *              are optionally added before/after the main insertions.
     */
    protected $insertionMap;
    /**
     * @var string[] Map From "{$node->getType()}->{$subNode}" to string that should be inserted
     *               between elements of this list subnode.
     */
    protected $listInsertionMap;
    protected $emptyListInsertionMap;
    /** @var int[] Map from "{$node->getType()}->{$subNode}" to token before which the modifiers
     *             should be reprinted. */
    protected $modifierChangeMap;
    /**
     * Creates a pretty printer instance using the given options.
     *
     * Supported options:
     *  * bool $shortArraySyntax = false: Whether to use [] instead of array() as the default array
     *                                    syntax, if the node does not specify a format.
     *
     * @param array $options Dictionary of formatting options
     */
    public function __construct(array $options = [])
    {
        $this->docStringEndToken = '_DOC_STRING_END_' . \mt_rand();
        $defaultOptions = ['shortArraySyntax' => \false];
        $this->options = $options + $defaultOptions;
    }
    /**
     * Reset pretty printing state.
     */
    protected function resetState()
    {
        $this->indentLevel = 0;
        $this->nl = "\n";
        $this->origTokens = null;
    }
    /**
     * Set indentation level
     *
     * @param int $level Level in number of spaces
     */
    protected function setIndentLevel(int $level)
    {
        $this->indentLevel = $level;
        $this->nl = "\n" . \str_repeat(' ', $level);
    }
    /**
     * Increase indentation level.
     */
    protected function indent()
    {
        $this->indentLevel += 4;
        $this->nl .= '    ';
    }
    /**
     * Decrease indentation level.
     */
    protected function outdent()
    {
        \assert($this->indentLevel >= 4);
        $this->indentLevel -= 4;
        $this->nl = "\n" . \str_repeat(' ', $this->indentLevel);
    }
    /**
     * Pretty prints an array of statements.
     *
     * @param Node[] $stmts Array of statements
     *
     * @return string Pretty printed statements
     */
    public function prettyPrint(array $stmts) : string
    {
        $this->resetState();
        $this->preprocessNodes($stmts);
        return \ltrim($this->handleMagicTokens($this->pStmts($stmts, \false)));
    }
    /**
     * Pretty prints an expression.
     *
     * @param Expr $node Expression node
     *
     * @return string Pretty printed node
     */
    public function prettyPrintExpr(Expr $node) : string
    {
        $this->resetState();
        return $this->handleMagicTokens($this->p($node));
    }
    /**
     * Pretty prints a file of statements (includes the opening <?php tag if it is required).
     *
     * @param Node[] $stmts Array of statements
     *
     * @return string Pretty printed statements
     */
    public function prettyPrintFile(array $stmts) : string
    {
        if (!$stmts) {
            return "<?php\n\n";
        }
        $p = "<?php\n\n" . $this->prettyPrint($stmts);
        if ($stmts[0] instanceof Stmt\InlineHTML) {
            $p = \preg_replace('/^<\\?php\\s+\\?>\\n?/', '', $p);
        }
        if ($stmts[\count($stmts) - 1] instanceof Stmt\InlineHTML) {
            $p = \preg_replace('/<\\?php$/', '', \rtrim($p));
        }
        return $p;
    }
    /**
     * Preprocesses the top-level nodes to initialize pretty printer state.
     *
     * @param Node[] $nodes Array of nodes
     */
    protected function preprocessNodes(array $nodes)
    {
        /* We can use semicolon-namespaces unless there is a global namespace declaration */
        $this->canUseSemicolonNamespaces = \true;
        foreach ($nodes as $node) {
            if ($node instanceof Stmt\Namespace_ && null === $node->name) {
                $this->canUseSemicolonNamespaces = \false;
                break;
            }
        }
    }
    /**
     * Handles (and removes) no-indent and doc-string-end tokens.
     *
     * @param string $str
     * @return string
     */
    protected function handleMagicTokens(string $str) : string
    {
        // Replace doc-string-end tokens with nothing or a newline
        $str = \str_replace($this->docStringEndToken . ";\n", ";\n", $str);
        $str = \str_replace($this->docStringEndToken, "\n", $str);
        return $str;
    }
    /**
     * Pretty prints an array of nodes (statements) and indents them optionally.
     *
     * @param Node[] $nodes  Array of nodes
     * @param bool   $indent Whether to indent the printed nodes
     *
     * @return string Pretty printed statements
     */
    protected function pStmts(array $nodes, bool $indent = \true) : string
    {
        if ($indent) {
            $this->indent();
        }
        $result = '';
        foreach ($nodes as $node) {
            $comments = $node->getComments();
            if ($comments) {
                $result .= $this->nl . $this->pComments($comments);
                if ($node instanceof Stmt\Nop) {
                    continue;
                }
            }
            $result .= $this->nl . $this->p($node);
        }
        if ($indent) {
            $this->outdent();
        }
        return $result;
    }
    /**
     * Pretty-print an infix operation while taking precedence into account.
     *
     * @param string $class          Node class of operator
     * @param Node   $leftNode       Left-hand side node
     * @param string $operatorString String representation of the operator
     * @param Node   $rightNode      Right-hand side node
     *
     * @return string Pretty printed infix operation
     */
    protected function pInfixOp(string $class, \PhpParser\Node $leftNode, string $operatorString, \PhpParser\Node $rightNode) : string
    {
        list($precedence, $associativity) = $this->precedenceMap[$class];
        return $this->pPrec($leftNode, $precedence, $associativity, -1) . $operatorString . $this->pPrec($rightNode, $precedence, $associativity, 1);
    }
    /**
     * Pretty-print a prefix operation while taking precedence into account.
     *
     * @param string $class          Node class of operator
     * @param string $operatorString String representation of the operator
     * @param Node   $node           Node
     *
     * @return string Pretty printed prefix operation
     */
    protected function pPrefixOp(string $class, string $operatorString, \PhpParser\Node $node) : string
    {
        list($precedence, $associativity) = $this->precedenceMap[$class];
        return $operatorString . $this->pPrec($node, $precedence, $associativity, 1);
    }
    /**
     * Pretty-print a postfix operation while taking precedence into account.
     *
     * @param string $class          Node class of operator
     * @param string $operatorString String representation of the operator
     * @param Node   $node           Node
     *
     * @return string Pretty printed postfix operation
     */
    protected function pPostfixOp(string $class, \PhpParser\Node $node, string $operatorString) : string
    {
        list($precedence, $associativity) = $this->precedenceMap[$class];
        return $this->pPrec($node, $precedence, $associativity, -1) . $operatorString;
    }
    /**
     * Prints an expression node with the least amount of parentheses necessary to preserve the meaning.
     *
     * @param Node $node                Node to pretty print
     * @param int  $parentPrecedence    Precedence of the parent operator
     * @param int  $parentAssociativity Associativity of parent operator
     *                                  (-1 is left, 0 is nonassoc, 1 is right)
     * @param int  $childPosition       Position of the node relative to the operator
     *                                  (-1 is left, 1 is right)
     *
     * @return string The pretty printed node
     */
    protected function pPrec(\PhpParser\Node $node, int $parentPrecedence, int $parentAssociativity, int $childPosition) : string
    {
        $class = \get_class($node);
        if (isset($this->precedenceMap[$class])) {
            $childPrecedence = $this->precedenceMap[$class][0];
            if ($childPrecedence > $parentPrecedence || $parentPrecedence === $childPrecedence && $parentAssociativity !== $childPosition) {
                return '(' . $this->p($node) . ')';
            }
        }
        return $this->p($node);
    }
    /**
     * Pretty prints an array of nodes and implodes the printed values.
     *
     * @param Node[] $nodes Array of Nodes to be printed
     * @param string $glue  Character to implode with
     *
     * @return string Imploded pretty printed nodes
     */
    protected function pImplode(array $nodes, string $glue = '') : string
    {
        $pNodes = [];
        foreach ($nodes as $node) {
            if (null === $node) {
                $pNodes[] = '';
            } else {
                $pNodes[] = $this->p($node);
            }
        }
        return \implode($glue, $pNodes);
    }
    /**
     * Pretty prints an array of nodes and implodes the printed values with commas.
     *
     * @param Node[] $nodes Array of Nodes to be printed
     *
     * @return string Comma separated pretty printed nodes
     */
    protected function pCommaSeparated(array $nodes) : string
    {
        return $this->pImplode($nodes, ', ');
    }
    /**
     * Pretty prints a comma-separated list of nodes in multiline style, including comments.
     *
     * The result includes a leading newline and one level of indentation (same as pStmts).
     *
     * @param Node[] $nodes         Array of Nodes to be printed
     * @param bool   $trailingComma Whether to use a trailing comma
     *
     * @return string Comma separated pretty printed nodes in multiline style
     */
    protected function pCommaSeparatedMultiline(array $nodes, bool $trailingComma) : string
    {
        $this->indent();
        $result = '';
        $lastIdx = \count($nodes) - 1;
        foreach ($nodes as $idx => $node) {
            if ($node !== null) {
                $comments = $node->getComments();
                if ($comments) {
                    $result .= $this->nl . $this->pComments($comments);
                }
                $result .= $this->nl . $this->p($node);
            } else {
                $result .= $this->nl;
            }
            if ($trailingComma || $idx !== $lastIdx) {
                $result .= ',';
            }
        }
        $this->outdent();
        return $result;
    }
    /**
     * Prints reformatted text of the passed comments.
     *
     * @param Comment[] $comments List of comments
     *
     * @return string Reformatted text of comments
     */
    protected function pComments(array $comments) : string
    {
        $formattedComments = [];
        foreach ($comments as $comment) {
            $formattedComments[] = \str_replace("\n", $this->nl, $comment->getReformattedText());
        }
        return \implode($this->nl, $formattedComments);
    }
    /**
     * Perform a format-preserving pretty print of an AST.
     *
     * The format preservation is best effort. For some changes to the AST the formatting will not
     * be preserved (at least not locally).
     *
     * In order to use this method a number of prerequisites must be satisfied:
     *  * The startTokenPos and endTokenPos attributes in the lexer must be enabled.
     *  * The CloningVisitor must be run on the AST prior to modification.
     *  * The original tokens must be provided, using the getTokens() method on the lexer.
     *
     * @param Node[] $stmts      Modified AST with links to original AST
     * @param Node[] $origStmts  Original AST with token offset information
     * @param array  $origTokens Tokens of the original code
     *
     * @return string
     */
    public function printFormatPreserving(array $stmts, array $origStmts, array $origTokens) : string
    {
        $this->initializeNodeListDiffer();
        $this->initializeLabelCharMap();
        $this->initializeFixupMap();
        $this->initializeRemovalMap();
        $this->initializeInsertionMap();
        $this->initializeListInsertionMap();
        $this->initializeEmptyListInsertionMap();
        $this->initializeModifierChangeMap();
        $this->resetState();
        $this->origTokens = new TokenStream($origTokens);
        $this->preprocessNodes($stmts);
        $pos = 0;
        $result = $this->pArray($stmts, $origStmts, $pos, 0, 'File', 'stmts', null);
        if (null !== $result) {
            $result .= $this->origTokens->getTokenCode($pos, \count($origTokens), 0);
        } else {
            // Fallback
            // TODO Add <?php properly
            $result = "<?php\n" . $this->pStmts($stmts, \false);
        }
        return \ltrim($this->handleMagicTokens($result));
    }
    protected function pFallback(\PhpParser\Node $node)
    {
        return $this->{'p' . $node->getType()}($node);
    }
    /**
     * Pretty prints a node.
     *
     * This method also handles formatting preservation for nodes.
     *
     * @param Node $node Node to be pretty printed
     * @param bool $parentFormatPreserved Whether parent node has preserved formatting
     *
     * @return string Pretty printed node
     */
    protected function p(\PhpParser\Node $node, $parentFormatPreserved = \false) : string
    {
        // No orig tokens means this is a normal pretty print without preservation of formatting
        if (!$this->origTokens) {
            return $this->{'p' . $node->getType()}($node);
        }
        /** @var Node $origNode */
        $origNode = $node->getAttribute('origNode');
        if (null === $origNode) {
            return $this->pFallback($node);
        }
        $class = \get_class($node);
        \assert($class === \get_class($origNode));
        $startPos = $origNode->getStartTokenPos();
        $endPos = $origNode->getEndTokenPos();
        \assert($startPos >= 0 && $endPos >= 0);
        $fallbackNode = $node;
        if ($node instanceof Expr\New_ && $node->class instanceof Stmt\Class_) {
            // Normalize node structure of anonymous classes
            $node = PrintableNewAnonClassNode::fromNewNode($node);
            $origNode = PrintableNewAnonClassNode::fromNewNode($origNode);
        }
        // InlineHTML node does not contain closing and opening PHP tags. If the parent formatting
        // is not preserved, then we need to use the fallback code to make sure the tags are
        // printed.
        if ($node instanceof Stmt\InlineHTML && !$parentFormatPreserved) {
            return $this->pFallback($fallbackNode);
        }
        $indentAdjustment = $this->indentLevel - $this->origTokens->getIndentationBefore($startPos);
        $type = $node->getType();
        $fixupInfo = $this->fixupMap[$class] ?? null;
        $result = '';
        $pos = $startPos;
        foreach ($node->getSubNodeNames() as $subNodeName) {
            $subNode = $node->{$subNodeName};
            $origSubNode = $origNode->{$subNodeName};
            if (!$subNode instanceof \PhpParser\Node && $subNode !== null || !$origSubNode instanceof \PhpParser\Node && $origSubNode !== null) {
                if ($subNode === $origSubNode) {
                    // Unchanged, can reuse old code
                    continue;
                }
                if (\is_array($subNode) && \is_array($origSubNode)) {
                    // Array subnode changed, we might be able to reconstruct it
                    $listResult = $this->pArray($subNode, $origSubNode, $pos, $indentAdjustment, $type, $subNodeName, $fixupInfo[$subNodeName] ?? null);
                    if (null === $listResult) {
                        return $this->pFallback($fallbackNode);
                    }
                    $result .= $listResult;
                    continue;
                }
                if (\is_int($subNode) && \is_int($origSubNode)) {
                    // Check if this is a modifier change
                    $key = $type . '->' . $subNodeName;
                    if (!isset($this->modifierChangeMap[$key])) {
                        return $this->pFallback($fallbackNode);
                    }
                    $findToken = $this->modifierChangeMap[$key];
                    $result .= $this->pModifiers($subNode);
                    $pos = $this->origTokens->findRight($pos, $findToken);
                    continue;
                }
                // If a non-node, non-array subnode changed, we don't be able to do a partial
                // reconstructions, as we don't have enough offset information. Pretty print the
                // whole node instead.
                return $this->pFallback($fallbackNode);
            }
            $extraLeft = '';
            $extraRight = '';
            if ($origSubNode !== null) {
                $subStartPos = $origSubNode->getStartTokenPos();
                $subEndPos = $origSubNode->getEndTokenPos();
                \assert($subStartPos >= 0 && $subEndPos >= 0);
            } else {
                if ($subNode === null) {
                    // Both null, nothing to do
                    continue;
                }
                // A node has been inserted, check if we have insertion information for it
                $key = $type . '->' . $subNodeName;
                if (!isset($this->insertionMap[$key])) {
                    return $this->pFallback($fallbackNode);
                }
                list($findToken, $beforeToken, $extraLeft, $extraRight) = $this->insertionMap[$key];
                if (null !== $findToken) {
                    $subStartPos = $this->origTokens->findRight($pos, $findToken) + (int) (!$beforeToken);
                } else {
                    $subStartPos = $pos;
                }
                if (null === $extraLeft && null !== $extraRight) {
                    // If inserting on the right only, skipping whitespace looks better
                    $subStartPos = $this->origTokens->skipRightWhitespace($subStartPos);
                }
                $subEndPos = $subStartPos - 1;
            }
            if (null === $subNode) {
                // A node has been removed, check if we have removal information for it
                $key = $type . '->' . $subNodeName;
                if (!isset($this->removalMap[$key])) {
                    return $this->pFallback($fallbackNode);
                }
                // Adjust positions to account for additional tokens that must be skipped
                $removalInfo = $this->removalMap[$key];
                if (isset($removalInfo['left'])) {
                    $subStartPos = $this->origTokens->skipLeft($subStartPos - 1, $removalInfo['left']) + 1;
                }
                if (isset($removalInfo['right'])) {
                    $subEndPos = $this->origTokens->skipRight($subEndPos + 1, $removalInfo['right']) - 1;
                }
            }
            $result .= $this->origTokens->getTokenCode($pos, $subStartPos, $indentAdjustment);
            if (null !== $subNode) {
                $result .= $extraLeft;
                $origIndentLevel = $this->indentLevel;
                $this->setIndentLevel($this->origTokens->getIndentationBefore($subStartPos) + $indentAdjustment);
                // If it's the same node that was previously in this position, it certainly doesn't
                // need fixup. It's important to check this here, because our fixup checks are more
                // conservative than strictly necessary.
                if (isset($fixupInfo[$subNodeName]) && $subNode->getAttribute('origNode') !== $origSubNode) {
                    $fixup = $fixupInfo[$subNodeName];
                    $res = $this->pFixup($fixup, $subNode, $class, $subStartPos, $subEndPos);
                } else {
                    $res = $this->p($subNode, \true);
                }
                $this->safeAppend($result, $res);
                $this->setIndentLevel($origIndentLevel);
                $result .= $extraRight;
            }
            $pos = $subEndPos + 1;
        }
        $result .= $this->origTokens->getTokenCode($pos, $endPos + 1, $indentAdjustment);
        return $result;
    }
    /**
     * Perform a format-preserving pretty print of an array.
     *
     * @param array       $nodes            New nodes
     * @param array       $origNodes        Original nodes
     * @param int         $pos              Current token position (updated by reference)
     * @param int         $indentAdjustment Adjustment for indentation
     * @param string      $parentNodeType   Type of the containing node.
     * @param string      $subNodeName      Name of array subnode.
     * @param null|int    $fixup            Fixup information for array item nodes
     *
     * @return null|string Result of pretty print or null if cannot preserve formatting
     */
    protected function pArray(array $nodes, array $origNodes, int &$pos, int $indentAdjustment, string $parentNodeType, string $subNodeName, $fixup)
    {
        $diff = $this->nodeListDiffer->diffWithReplacements($origNodes, $nodes);
        $mapKey = $parentNodeType . '->' . $subNodeName;
        $insertStr = $this->listInsertionMap[$mapKey] ?? null;
        $isStmtList = $subNodeName === 'stmts';
        $beforeFirstKeepOrReplace = \true;
        $skipRemovedNode = \false;
        $delayedAdd = [];
        $lastElemIndentLevel = $this->indentLevel;
        $insertNewline = \false;
        if ($insertStr === "\n") {
            $insertStr = '';
            $insertNewline = \true;
        }
        if ($isStmtList && \count($origNodes) === 1 && \count($nodes) !== 1) {
            $startPos = $origNodes[0]->getStartTokenPos();
            $endPos = $origNodes[0]->getEndTokenPos();
            \assert($startPos >= 0 && $endPos >= 0);
            if (!$this->origTokens->haveBraces($startPos, $endPos)) {
                // This was a single statement without braces, but either additional statements
                // have been added, or the single statement has been removed. This requires the
                // addition of braces. For now fall back.
                // TODO: Try to preserve formatting
                return null;
            }
        }
        $result = '';
        foreach ($diff as $i => $diffElem) {
            $diffType = $diffElem->type;
            /** @var Node|null $arrItem */
            $arrItem = $diffElem->new;
            /** @var Node|null $origArrItem */
            $origArrItem = $diffElem->old;
            if ($diffType === DiffElem::TYPE_KEEP || $diffType === DiffElem::TYPE_REPLACE) {
                $beforeFirstKeepOrReplace = \false;
                if ($origArrItem === null || $arrItem === null) {
                    // We can only handle the case where both are null
                    if ($origArrItem === $arrItem) {
                        continue;
                    }
                    return null;
                }
                if (!$arrItem instanceof \PhpParser\Node || !$origArrItem instanceof \PhpParser\Node) {
                    // We can only deal with nodes. This can occur for Names, which use string arrays.
                    return null;
                }
                $itemStartPos = $origArrItem->getStartTokenPos();
                $itemEndPos = $origArrItem->getEndTokenPos();
                \assert($itemStartPos >= 0 && $itemEndPos >= 0 && $itemStartPos >= $pos);
                $origIndentLevel = $this->indentLevel;
                $lastElemIndentLevel = $this->origTokens->getIndentationBefore($itemStartPos) + $indentAdjustment;
                $this->setIndentLevel($lastElemIndentLevel);
                $comments = $arrItem->getComments();
                $origComments = $origArrItem->getComments();
                $commentStartPos = $origComments ? $origComments[0]->getStartTokenPos() : $itemStartPos;
                \assert($commentStartPos >= 0);
                if ($commentStartPos < $pos) {
                    // Comments may be assigned to multiple nodes if they start at the same position.
                    // Make sure we don't try to print them multiple times.
                    $commentStartPos = $itemStartPos;
                }
                if ($skipRemovedNode) {
                    if ($isStmtList && ($this->origTokens->haveBracesInRange($pos, $itemStartPos) || $this->origTokens->haveTagInRange($pos, $itemStartPos))) {
                        // We'd remove the brace of a code block.
                        // TODO: Preserve formatting.
                        $this->setIndentLevel($origIndentLevel);
                        return null;
                    }
                } else {
                    $result .= $this->origTokens->getTokenCode($pos, $commentStartPos, $indentAdjustment);
                }
                if (!empty($delayedAdd)) {
                    /** @var Node $delayedAddNode */
                    foreach ($delayedAdd as $delayedAddNode) {
                        if ($insertNewline) {
                            $delayedAddComments = $delayedAddNode->getComments();
                            if ($delayedAddComments) {
                                $result .= $this->pComments($delayedAddComments) . $this->nl;
                            }
                        }
                        $this->safeAppend($result, $this->p($delayedAddNode, \true));
                        if ($insertNewline) {
                            $result .= $insertStr . $this->nl;
                        } else {
                            $result .= $insertStr;
                        }
                    }
                    $delayedAdd = [];
                }
                if ($comments !== $origComments) {
                    if ($comments) {
                        $result .= $this->pComments($comments) . $this->nl;
                    }
                } else {
                    $result .= $this->origTokens->getTokenCode($commentStartPos, $itemStartPos, $indentAdjustment);
                }
                // If we had to remove anything, we have done so now.
                $skipRemovedNode = \false;
            } elseif ($diffType === DiffElem::TYPE_ADD) {
                if (null === $insertStr) {
                    // We don't have insertion information for this list type
                    return null;
                }
                // We go multiline if the original code was multiline,
                // or if it's an array item with a comment above it.
                if ($insertStr === ', ' && ($this->isMultiline($origNodes) || $arrItem->getComments())) {
                    $insertStr = ',';
                    $insertNewline = \true;
                }
                if ($beforeFirstKeepOrReplace) {
                    // Will be inserted at the next "replace" or "keep" element
                    $delayedAdd[] = $arrItem;
                    continue;
                }
                $itemStartPos = $pos;
                $itemEndPos = $pos - 1;
                $origIndentLevel = $this->indentLevel;
                $this->setIndentLevel($lastElemIndentLevel);
                if ($insertNewline) {
                    $result .= $insertStr . $this->nl;
                    $comments = $arrItem->getComments();
                    if ($comments) {
                        $result .= $this->pComments($comments) . $this->nl;
                    }
                } else {
                    $result .= $insertStr;
                }
            } elseif ($diffType === DiffElem::TYPE_REMOVE) {
                if (!$origArrItem instanceof \PhpParser\Node) {
                    // We only support removal for nodes
                    return null;
                }
                $itemStartPos = $origArrItem->getStartTokenPos();
                $itemEndPos = $origArrItem->getEndTokenPos();
                \assert($itemStartPos >= 0 && $itemEndPos >= 0);
                // Consider comments part of the node.
                $origComments = $origArrItem->getComments();
                if ($origComments) {
                    $itemStartPos = $origComments[0]->getStartTokenPos();
                }
                if ($i === 0) {
                    // If we're removing from the start, keep the tokens before the node and drop those after it,
                    // instead of the other way around.
                    $result .= $this->origTokens->getTokenCode($pos, $itemStartPos, $indentAdjustment);
                    $skipRemovedNode = \true;
                } else {
                    if ($isStmtList && ($this->origTokens->haveBracesInRange($pos, $itemStartPos) || $this->origTokens->haveTagInRange($pos, $itemStartPos))) {
                        // We'd remove the brace of a code block.
                        // TODO: Preserve formatting.
                        return null;
                    }
                }
                $pos = $itemEndPos + 1;
                continue;
            } else {
                throw new \Exception("Shouldn't happen");
            }
            if (null !== $fixup && $arrItem->getAttribute('origNode') !== $origArrItem) {
                $res = $this->pFixup($fixup, $arrItem, null, $itemStartPos, $itemEndPos);
            } else {
                $res = $this->p($arrItem, \true);
            }
            $this->safeAppend($result, $res);
            $this->setIndentLevel($origIndentLevel);
            $pos = $itemEndPos + 1;
        }
        if ($skipRemovedNode) {
            // TODO: Support removing single node.
            return null;
        }
        if (!empty($delayedAdd)) {
            if (!isset($this->emptyListInsertionMap[$mapKey])) {
                return null;
            }
            list($findToken, $extraLeft, $extraRight) = $this->emptyListInsertionMap[$mapKey];
            if (null !== $findToken) {
                $insertPos = $this->origTokens->findRight($pos, $findToken) + 1;
                $result .= $this->origTokens->getTokenCode($pos, $insertPos, $indentAdjustment);
                $pos = $insertPos;
            }
            $first = \true;
            $result .= $extraLeft;
            foreach ($delayedAdd as $delayedAddNode) {
                if (!$first) {
                    $result .= $insertStr;
                    if ($insertNewline) {
                        $result .= $this->nl;
                    }
                }
                $result .= $this->p($delayedAddNode, \true);
                $first = \false;
            }
            $result .= $extraRight === "\n" ? $this->nl : $extraRight;
        }
        return $result;
    }
    /**
     * Print node with fixups.
     *
     * Fixups here refer to the addition of extra parentheses, braces or other characters, that
     * are required to preserve program semantics in a certain context (e.g. to maintain precedence
     * or because only certain expressions are allowed in certain places).
     *
     * @param int         $fixup       Fixup type
     * @param Node        $subNode     Subnode to print
     * @param string|null $parentClass Class of parent node
     * @param int         $subStartPos Original start pos of subnode
     * @param int         $subEndPos   Original end pos of subnode
     *
     * @return string Result of fixed-up print of subnode
     */
    protected function pFixup(int $fixup, \PhpParser\Node $subNode, $parentClass, int $subStartPos, int $subEndPos) : string
    {
        switch ($fixup) {
            case self::FIXUP_PREC_LEFT:
            case self::FIXUP_PREC_RIGHT:
                if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) {
                    list($precedence, $associativity) = $this->precedenceMap[$parentClass];
                    return $this->pPrec($subNode, $precedence, $associativity, $fixup === self::FIXUP_PREC_LEFT ? -1 : 1);
                }
                break;
            case self::FIXUP_CALL_LHS:
                if ($this->callLhsRequiresParens($subNode) && !$this->origTokens->haveParens($subStartPos, $subEndPos)) {
                    return '(' . $this->p($subNode) . ')';
                }
                break;
            case self::FIXUP_DEREF_LHS:
                if ($this->dereferenceLhsRequiresParens($subNode) && !$this->origTokens->haveParens($subStartPos, $subEndPos)) {
                    return '(' . $this->p($subNode) . ')';
                }
                break;
            case self::FIXUP_BRACED_NAME:
            case self::FIXUP_VAR_BRACED_NAME:
                if ($subNode instanceof Expr && !$this->origTokens->haveBraces($subStartPos, $subEndPos)) {
                    return ($fixup === self::FIXUP_VAR_BRACED_NAME ? '$' : '') . '{' . $this->p($subNode) . '}';
                }
                break;
            case self::FIXUP_ENCAPSED:
                if (!$subNode instanceof Scalar\EncapsedStringPart && !$this->origTokens->haveBraces($subStartPos, $subEndPos)) {
                    return '{' . $this->p($subNode) . '}';
                }
                break;
            default:
                throw new \Exception('Cannot happen');
        }
        // Nothing special to do
        return $this->p($subNode);
    }
    /**
     * Appends to a string, ensuring whitespace between label characters.
     *
     * Example: "echo" and "$x" result in "echo$x", but "echo" and "x" result in "echo x".
     * Without safeAppend the result would be "echox", which does not preserve semantics.
     *
     * @param string $str
     * @param string $append
     */
    protected function safeAppend(string &$str, string $append)
    {
        if ($str === "") {
            $str = $append;
            return;
        }
        if ($append === "") {
            return;
        }
        if (!$this->labelCharMap[$append[0]] || !$this->labelCharMap[$str[\strlen($str) - 1]]) {
            $str .= $append;
        } else {
            $str .= " " . $append;
        }
    }
    /**
     * Determines whether the LHS of a call must be wrapped in parenthesis.
     *
     * @param Node $node LHS of a call
     *
     * @return bool Whether parentheses are required
     */
    protected function callLhsRequiresParens(\PhpParser\Node $node) : bool
    {
        return !($node instanceof \PhpParser\Node\Name || $node instanceof Expr\Variable || $node instanceof Expr\ArrayDimFetch || $node instanceof Expr\FuncCall || $node instanceof Expr\MethodCall || $node instanceof Expr\NullsafeMethodCall || $node instanceof Expr\StaticCall || $node instanceof Expr\Array_);
    }
    /**
     * Determines whether the LHS of a dereferencing operation must be wrapped in parenthesis.
     *
     * @param Node $node LHS of dereferencing operation
     *
     * @return bool Whether parentheses are required
     */
    protected function dereferenceLhsRequiresParens(\PhpParser\Node $node) : bool
    {
        return !($node instanceof Expr\Variable || $node instanceof \PhpParser\Node\Name || $node instanceof Expr\ArrayDimFetch || $node instanceof Expr\PropertyFetch || $node instanceof Expr\NullsafePropertyFetch || $node instanceof Expr\StaticPropertyFetch || $node instanceof Expr\FuncCall || $node instanceof Expr\MethodCall || $node instanceof Expr\NullsafeMethodCall || $node instanceof Expr\StaticCall || $node instanceof Expr\Array_ || $node instanceof Scalar\String_ || $node instanceof Expr\ConstFetch || $node instanceof Expr\ClassConstFetch);
    }
    /**
     * Print modifiers, including trailing whitespace.
     *
     * @param int $modifiers Modifier mask to print
     *
     * @return string Printed modifiers
     */
    protected function pModifiers(int $modifiers)
    {
        return ($modifiers & Stmt\Class_::MODIFIER_PUBLIC ? 'public ' : '') . ($modifiers & Stmt\Class_::MODIFIER_PROTECTED ? 'protected ' : '') . ($modifiers & Stmt\Class_::MODIFIER_PRIVATE ? 'private ' : '') . ($modifiers & Stmt\Class_::MODIFIER_STATIC ? 'static ' : '') . ($modifiers & Stmt\Class_::MODIFIER_ABSTRACT ? 'abstract ' : '') . ($modifiers & Stmt\Class_::MODIFIER_FINAL ? 'final ' : '') . ($modifiers & Stmt\Class_::MODIFIER_READONLY ? 'readonly ' : '');
    }
    /**
     * Determine whether a list of nodes uses multiline formatting.
     *
     * @param (Node|null)[] $nodes Node list
     *
     * @return bool Whether multiline formatting is used
     */
    protected function isMultiline(array $nodes) : bool
    {
        if (\count($nodes) < 2) {
            return \false;
        }
        $pos = -1;
        foreach ($nodes as $node) {
            if (null === $node) {
                continue;
            }
            $endPos = $node->getEndTokenPos() + 1;
            if ($pos >= 0) {
                $text = $this->origTokens->getTokenCode($pos, $endPos, 0);
                if (\false === \strpos($text, "\n")) {
                    // We require that a newline is present between *every* item. If the formatting
                    // is inconsistent, with only some items having newlines, we don't consider it
                    // as multiline
                    return \false;
                }
            }
            $pos = $endPos;
        }
        return \true;
    }
    /**
     * Lazily initializes label char map.
     *
     * The label char map determines whether a certain character may occur in a label.
     */
    protected function initializeLabelCharMap()
    {
        if ($this->labelCharMap) {
            return;
        }
        $this->labelCharMap = [];
        for ($i = 0; $i < 256; $i++) {
            // Since PHP 7.1 The lower range is 0x80. However, we also want to support code for
            // older versions.
            $chr = \chr($i);
            $this->labelCharMap[$chr] = $i >= 0x7f || \ctype_alnum($chr);
        }
    }
    /**
     * Lazily initializes node list differ.
     *
     * The node list differ is used to determine differences between two array subnodes.
     */
    protected function initializeNodeListDiffer()
    {
        if ($this->nodeListDiffer) {
            return;
        }
        $this->nodeListDiffer = new \PhpParser\Internal\Differ(function ($a, $b) {
            if ($a instanceof \PhpParser\Node && $b instanceof \PhpParser\Node) {
                return $a === $b->getAttribute('origNode');
            }
            // Can happen for array destructuring
            return $a === null && $b === null;
        });
    }
    /**
     * Lazily initializes fixup map.
     *
     * The fixup map is used to determine whether a certain subnode of a certain node may require
     * some kind of "fixup" operation, e.g. the addition of parenthesis or braces.
     */
    protected function initializeFixupMap()
    {
        if ($this->fixupMap) {
            return;
        }
        $this->fixupMap = [
            Expr\PreInc::class => ['var' => self::FIXUP_PREC_RIGHT],
            Expr\PreDec::class => ['var' => self::FIXUP_PREC_RIGHT],
            Expr\PostInc::class => ['var' => self::FIXUP_PREC_LEFT],
            Expr\PostDec::class => ['var' => self::FIXUP_PREC_LEFT],
            Expr\Instanceof_::class => ['expr' => self::FIXUP_PREC_LEFT, 'class' => self::FIXUP_PREC_RIGHT],
            Expr\Ternary::class => ['cond' => self::FIXUP_PREC_LEFT, 'else' => self::FIXUP_PREC_RIGHT],
            Expr\FuncCall::class => ['name' => self::FIXUP_CALL_LHS],
            Expr\StaticCall::class => ['class' => self::FIXUP_DEREF_LHS],
            Expr\ArrayDimFetch::class => ['var' => self::FIXUP_DEREF_LHS],
            Expr\ClassConstFetch::class => ['var' => self::FIXUP_DEREF_LHS],
            Expr\New_::class => ['class' => self::FIXUP_DEREF_LHS],
            // TODO: FIXUP_NEW_VARIABLE
            Expr\MethodCall::class => ['var' => self::FIXUP_DEREF_LHS, 'name' => self::FIXUP_BRACED_NAME],
            Expr\NullsafeMethodCall::class => ['var' => self::FIXUP_DEREF_LHS, 'name' => self::FIXUP_BRACED_NAME],
            Expr\StaticPropertyFetch::class => ['class' => self::FIXUP_DEREF_LHS, 'name' => self::FIXUP_VAR_BRACED_NAME],
            Expr\PropertyFetch::class => ['var' => self::FIXUP_DEREF_LHS, 'name' => self::FIXUP_BRACED_NAME],
            Expr\NullsafePropertyFetch::class => ['var' => self::FIXUP_DEREF_LHS, 'name' => self::FIXUP_BRACED_NAME],
            Scalar\Encapsed::class => ['parts' => self::FIXUP_ENCAPSED],
        ];
        $binaryOps = [BinaryOp\Pow::class, BinaryOp\Mul::class, BinaryOp\Div::class, BinaryOp\Mod::class, BinaryOp\Plus::class, BinaryOp\Minus::class, BinaryOp\Concat::class, BinaryOp\ShiftLeft::class, BinaryOp\ShiftRight::class, BinaryOp\Smaller::class, BinaryOp\SmallerOrEqual::class, BinaryOp\Greater::class, BinaryOp\GreaterOrEqual::class, BinaryOp\Equal::class, BinaryOp\NotEqual::class, BinaryOp\Identical::class, BinaryOp\NotIdentical::class, BinaryOp\Spaceship::class, BinaryOp\BitwiseAnd::class, BinaryOp\BitwiseXor::class, BinaryOp\BitwiseOr::class, BinaryOp\BooleanAnd::class, BinaryOp\BooleanOr::class, BinaryOp\Coalesce::class, BinaryOp\LogicalAnd::class, BinaryOp\LogicalXor::class, BinaryOp\LogicalOr::class];
        foreach ($binaryOps as $binaryOp) {
            $this->fixupMap[$binaryOp] = ['left' => self::FIXUP_PREC_LEFT, 'right' => self::FIXUP_PREC_RIGHT];
        }
        $assignOps = [Expr\Assign::class, Expr\AssignRef::class, AssignOp\Plus::class, AssignOp\Minus::class, AssignOp\Mul::class, AssignOp\Div::class, AssignOp\Concat::class, AssignOp\Mod::class, AssignOp\BitwiseAnd::class, AssignOp\BitwiseOr::class, AssignOp\BitwiseXor::class, AssignOp\ShiftLeft::class, AssignOp\ShiftRight::class, AssignOp\Pow::class, AssignOp\Coalesce::class];
        foreach ($assignOps as $assignOp) {
            $this->fixupMap[$assignOp] = ['var' => self::FIXUP_PREC_LEFT, 'expr' => self::FIXUP_PREC_RIGHT];
        }
        $prefixOps = [Expr\BitwiseNot::class, Expr\BooleanNot::class, Expr\UnaryPlus::class, Expr\UnaryMinus::class, Cast\Int_::class, Cast\Double::class, Cast\String_::class, Cast\Array_::class, Cast\Object_::class, Cast\Bool_::class, Cast\Unset_::class, Expr\ErrorSuppress::class, Expr\YieldFrom::class, Expr\Print_::class, Expr\Include_::class];
        foreach ($prefixOps as $prefixOp) {
            $this->fixupMap[$prefixOp] = ['expr' => self::FIXUP_PREC_RIGHT];
        }
    }
    /**
     * Lazily initializes the removal map.
     *
     * The removal map is used to determine which additional tokens should be removed when a
     * certain node is replaced by null.
     */
    protected function initializeRemovalMap()
    {
        if ($this->removalMap) {
            return;
        }
        $stripBoth = ['left' => \T_WHITESPACE, 'right' => \T_WHITESPACE];
        $stripLeft = ['left' => \T_WHITESPACE];
        $stripRight = ['right' => \T_WHITESPACE];
        $stripDoubleArrow = ['right' => \T_DOUBLE_ARROW];
        $stripColon = ['left' => ':'];
        $stripEquals = ['left' => '='];
        $this->removalMap = ['Expr_ArrayDimFetch->dim' => $stripBoth, 'Expr_ArrayItem->key' => $stripDoubleArrow, 'Expr_ArrowFunction->returnType' => $stripColon, 'Expr_Closure->returnType' => $stripColon, 'Expr_Exit->expr' => $stripBoth, 'Expr_Ternary->if' => $stripBoth, 'Expr_Yield->key' => $stripDoubleArrow, 'Expr_Yield->value' => $stripBoth, 'Param->type' => $stripRight, 'Param->default' => $stripEquals, 'Stmt_Break->num' => $stripBoth, 'Stmt_Catch->var' => $stripLeft, 'Stmt_ClassMethod->returnType' => $stripColon, 'Stmt_Class->extends' => ['left' => \T_EXTENDS], 'Stmt_Enum->scalarType' => $stripColon, 'Stmt_EnumCase->expr' => $stripEquals, 'Expr_PrintableNewAnonClass->extends' => ['left' => \T_EXTENDS], 'Stmt_Continue->num' => $stripBoth, 'Stmt_Foreach->keyVar' => $stripDoubleArrow, 'Stmt_Function->returnType' => $stripColon, 'Stmt_If->else' => $stripLeft, 'Stmt_Namespace->name' => $stripLeft, 'Stmt_Property->type' => $stripRight, 'Stmt_PropertyProperty->default' => $stripEquals, 'Stmt_Return->expr' => $stripBoth, 'Stmt_StaticVar->default' => $stripEquals, 'Stmt_TraitUseAdaptation_Alias->newName' => $stripLeft, 'Stmt_TryCatch->finally' => $stripLeft];
    }
    protected function initializeInsertionMap()
    {
        if ($this->insertionMap) {
            return;
        }
        // TODO: "yield" where both key and value are inserted doesn't work
        // [$find, $beforeToken, $extraLeft, $extraRight]
        $this->insertionMap = [
            'Expr_ArrayDimFetch->dim' => ['[', \false, null, null],
            'Expr_ArrayItem->key' => [null, \false, null, ' => '],
            'Expr_ArrowFunction->returnType' => [')', \false, ' : ', null],
            'Expr_Closure->returnType' => [')', \false, ' : ', null],
            'Expr_Ternary->if' => ['?', \false, ' ', ' '],
            'Expr_Yield->key' => [\T_YIELD, \false, null, ' => '],
            'Expr_Yield->value' => [\T_YIELD, \false, ' ', null],
            'Param->type' => [null, \false, null, ' '],
            'Param->default' => [null, \false, ' = ', null],
            'Stmt_Break->num' => [\T_BREAK, \false, ' ', null],
            'Stmt_Catch->var' => [null, \false, ' ', null],
            'Stmt_ClassMethod->returnType' => [')', \false, ' : ', null],
            'Stmt_Class->extends' => [null, \false, ' extends ', null],
            'Stmt_Enum->scalarType' => [null, \false, ' : ', null],
            'Stmt_EnumCase->expr' => [null, \false, ' = ', null],
            'Expr_PrintableNewAnonClass->extends' => [null, ' extends ', null],
            'Stmt_Continue->num' => [\T_CONTINUE, \false, ' ', null],
            'Stmt_Foreach->keyVar' => [\T_AS, \false, null, ' => '],
            'Stmt_Function->returnType' => [')', \false, ' : ', null],
            'Stmt_If->else' => [null, \false, ' ', null],
            'Stmt_Namespace->name' => [\T_NAMESPACE, \false, ' ', null],
            'Stmt_Property->type' => [\T_VARIABLE, \true, null, ' '],
            'Stmt_PropertyProperty->default' => [null, \false, ' = ', null],
            'Stmt_Return->expr' => [\T_RETURN, \false, ' ', null],
            'Stmt_StaticVar->default' => [null, \false, ' = ', null],
            //'Stmt_TraitUseAdaptation_Alias->newName' => [T_AS, false, ' ', null], // TODO
            'Stmt_TryCatch->finally' => [null, \false, ' ', null],
        ];
    }
    protected function initializeListInsertionMap()
    {
        if ($this->listInsertionMap) {
            return;
        }
        $this->listInsertionMap = [
            // special
            //'Expr_ShellExec->parts' => '', // TODO These need to be treated more carefully
            //'Scalar_Encapsed->parts' => '',
            'Stmt_Catch->types' => '|',
            'UnionType->types' => '|',
            'IntersectionType->types' => '&',
            'Stmt_If->elseifs' => ' ',
            'Stmt_TryCatch->catches' => ' ',
            // comma-separated lists
            'Expr_Array->items' => ', ',
            'Expr_ArrowFunction->params' => ', ',
            'Expr_Closure->params' => ', ',
            'Expr_Closure->uses' => ', ',
            'Expr_FuncCall->args' => ', ',
            'Expr_Isset->vars' => ', ',
            'Expr_List->items' => ', ',
            'Expr_MethodCall->args' => ', ',
            'Expr_NullsafeMethodCall->args' => ', ',
            'Expr_New->args' => ', ',
            'Expr_PrintableNewAnonClass->args' => ', ',
            'Expr_StaticCall->args' => ', ',
            'Stmt_ClassConst->consts' => ', ',
            'Stmt_ClassMethod->params' => ', ',
            'Stmt_Class->implements' => ', ',
            'Stmt_Enum->implements' => ', ',
            'Expr_PrintableNewAnonClass->implements' => ', ',
            'Stmt_Const->consts' => ', ',
            'Stmt_Declare->declares' => ', ',
            'Stmt_Echo->exprs' => ', ',
            'Stmt_For->init' => ', ',
            'Stmt_For->cond' => ', ',
            'Stmt_For->loop' => ', ',
            'Stmt_Function->params' => ', ',
            'Stmt_Global->vars' => ', ',
            'Stmt_GroupUse->uses' => ', ',
            'Stmt_Interface->extends' => ', ',
            'Stmt_Match->arms' => ', ',
            'Stmt_Property->props' => ', ',
            'Stmt_StaticVar->vars' => ', ',
            'Stmt_TraitUse->traits' => ', ',
            'Stmt_TraitUseAdaptation_Precedence->insteadof' => ', ',
            'Stmt_Unset->vars' => ', ',
            'Stmt_Use->uses' => ', ',
            'MatchArm->conds' => ', ',
            'AttributeGroup->attrs' => ', ',
            // statement lists
            'Expr_Closure->stmts' => "\n",
            'Stmt_Case->stmts' => "\n",
            'Stmt_Catch->stmts' => "\n",
            'Stmt_Class->stmts' => "\n",
            'Stmt_Enum->stmts' => "\n",
            'Expr_PrintableNewAnonClass->stmts' => "\n",
            'Stmt_Interface->stmts' => "\n",
            'Stmt_Trait->stmts' => "\n",
            'Stmt_ClassMethod->stmts' => "\n",
            'Stmt_Declare->stmts' => "\n",
            'Stmt_Do->stmts' => "\n",
            'Stmt_ElseIf->stmts' => "\n",
            'Stmt_Else->stmts' => "\n",
            'Stmt_Finally->stmts' => "\n",
            'Stmt_Foreach->stmts' => "\n",
            'Stmt_For->stmts' => "\n",
            'Stmt_Function->stmts' => "\n",
            'Stmt_If->stmts' => "\n",
            'Stmt_Namespace->stmts' => "\n",
            'Stmt_Class->attrGroups' => "\n",
            'Stmt_Enum->attrGroups' => "\n",
            'Stmt_EnumCase->attrGroups' => "\n",
            'Stmt_Interface->attrGroups' => "\n",
            'Stmt_Trait->attrGroups' => "\n",
            'Stmt_Function->attrGroups' => "\n",
            'Stmt_ClassMethod->attrGroups' => "\n",
            'Stmt_ClassConst->attrGroups' => "\n",
            'Stmt_Property->attrGroups' => "\n",
            'Expr_PrintableNewAnonClass->attrGroups' => ' ',
            'Expr_Closure->attrGroups' => ' ',
            'Expr_ArrowFunction->attrGroups' => ' ',
            'Param->attrGroups' => ' ',
            'Stmt_Switch->cases' => "\n",
            'Stmt_TraitUse->adaptations' => "\n",
            'Stmt_TryCatch->stmts' => "\n",
            'Stmt_While->stmts' => "\n",
            // dummy for top-level context
            'File->stmts' => "\n",
        ];
    }
    protected function initializeEmptyListInsertionMap()
    {
        if ($this->emptyListInsertionMap) {
            return;
        }
        // TODO Insertion into empty statement lists.
        // [$find, $extraLeft, $extraRight]
        $this->emptyListInsertionMap = ['Expr_ArrowFunction->params' => ['(', '', ''], 'Expr_Closure->uses' => [')', ' use(', ')'], 'Expr_Closure->params' => ['(', '', ''], 'Expr_FuncCall->args' => ['(', '', ''], 'Expr_MethodCall->args' => ['(', '', ''], 'Expr_NullsafeMethodCall->args' => ['(', '', ''], 'Expr_New->args' => ['(', '', ''], 'Expr_PrintableNewAnonClass->args' => ['(', '', ''], 'Expr_PrintableNewAnonClass->implements' => [null, ' implements ', ''], 'Expr_StaticCall->args' => ['(', '', ''], 'Stmt_Class->implements' => [null, ' implements ', ''], 'Stmt_Enum->implements' => [null, ' implements ', ''], 'Stmt_ClassMethod->params' => ['(', '', ''], 'Stmt_Interface->extends' => [null, ' extends ', ''], 'Stmt_Function->params' => ['(', '', ''], 'Stmt_Interface->attrGroups' => [null, '', "\n"], 'Stmt_Class->attrGroups' => [null, '', "\n"], 'Stmt_ClassConst->attrGroups' => [null, '', "\n"], 'Stmt_ClassMethod->attrGroups' => [null, '', "\n"], 'Stmt_Function->attrGroups' => [null, '', "\n"], 'Stmt_Property->attrGroups' => [null, '', "\n"], 'Stmt_Trait->attrGroups' => [null, '', "\n"], 'Expr_ArrowFunction->attrGroups' => [null, '', ' '], 'Expr_Closure->attrGroups' => [null, '', ' '], 'Expr_PrintableNewAnonClass->attrGroups' => [\T_NEW, ' ', '']];
    }
    protected function initializeModifierChangeMap()
    {
        if ($this->modifierChangeMap) {
            return;
        }
        $this->modifierChangeMap = ['Stmt_ClassConst->flags' => \T_CONST, 'Stmt_ClassMethod->flags' => \T_FUNCTION, 'Stmt_Class->flags' => \T_CLASS, 'Stmt_Property->flags' => \T_VARIABLE, 'Param->flags' => \T_VARIABLE];
        // List of integer subnodes that are not modifiers:
        // Expr_Include->type
        // Stmt_GroupUse->type
        // Stmt_Use->type
        // Stmt_UseUse->type
    }
}
<?php

declare (strict_types=1);
namespace PhpParser;

use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\BinaryOp\Concat;
use PhpParser\Node\Identifier;
use PhpParser\Node\Name;
use PhpParser\Node\Scalar\String_;
use PhpParser\Node\Stmt\Use_;
class BuilderFactory
{
    /**
     * Creates an attribute node.
     *
     * @param string|Name $name Name of the attribute
     * @param array       $args Attribute named arguments
     *
     * @return Node\Attribute
     */
    public function attribute($name, array $args = []) : \PhpParser\Node\Attribute
    {
        return new \PhpParser\Node\Attribute(\PhpParser\BuilderHelpers::normalizeName($name), $this->args($args));
    }
    /**
     * Creates a namespace builder.
     *
     * @param null|string|Node\Name $name Name of the namespace
     *
     * @return Builder\Namespace_ The created namespace builder
     */
    public function namespace($name) : \PhpParser\Builder\Namespace_
    {
        return new \PhpParser\Builder\Namespace_($name);
    }
    /**
     * Creates a class builder.
     *
     * @param string $name Name of the class
     *
     * @return Builder\Class_ The created class builder
     */
    public function class(string $name) : \PhpParser\Builder\Class_
    {
        return new \PhpParser\Builder\Class_($name);
    }
    /**
     * Creates an interface builder.
     *
     * @param string $name Name of the interface
     *
     * @return Builder\Interface_ The created interface builder
     */
    public function interface(string $name) : \PhpParser\Builder\Interface_
    {
        return new \PhpParser\Builder\Interface_($name);
    }
    /**
     * Creates a trait builder.
     *
     * @param string $name Name of the trait
     *
     * @return Builder\Trait_ The created trait builder
     */
    public function trait(string $name) : \PhpParser\Builder\Trait_
    {
        return new \PhpParser\Builder\Trait_($name);
    }
    /**
     * Creates an enum builder.
     *
     * @param string $name Name of the enum
     *
     * @return Builder\Enum_ The created enum builder
     */
    public function enum(string $name) : \PhpParser\Builder\Enum_
    {
        return new \PhpParser\Builder\Enum_($name);
    }
    /**
     * Creates a trait use builder.
     *
     * @param Node\Name|string ...$traits Trait names
     *
     * @return Builder\TraitUse The create trait use builder
     */
    public function useTrait(...$traits) : \PhpParser\Builder\TraitUse
    {
        return new \PhpParser\Builder\TraitUse(...$traits);
    }
    /**
     * Creates a trait use adaptation builder.
     *
     * @param Node\Name|string|null  $trait  Trait name
     * @param Node\Identifier|string $method Method name
     *
     * @return Builder\TraitUseAdaptation The create trait use adaptation builder
     */
    public function traitUseAdaptation($trait, $method = null) : \PhpParser\Builder\TraitUseAdaptation
    {
        if ($method === null) {
            $method = $trait;
            $trait = null;
        }
        return new \PhpParser\Builder\TraitUseAdaptation($trait, $method);
    }
    /**
     * Creates a method builder.
     *
     * @param string $name Name of the method
     *
     * @return Builder\Method The created method builder
     */
    public function method(string $name) : \PhpParser\Builder\Method
    {
        return new \PhpParser\Builder\Method($name);
    }
    /**
     * Creates a parameter builder.
     *
     * @param string $name Name of the parameter
     *
     * @return Builder\Param The created parameter builder
     */
    public function param(string $name) : \PhpParser\Builder\Param
    {
        return new \PhpParser\Builder\Param($name);
    }
    /**
     * Creates a property builder.
     *
     * @param string $name Name of the property
     *
     * @return Builder\Property The created property builder
     */
    public function property(string $name) : \PhpParser\Builder\Property
    {
        return new \PhpParser\Builder\Property($name);
    }
    /**
     * Creates a function builder.
     *
     * @param string $name Name of the function
     *
     * @return Builder\Function_ The created function builder
     */
    public function function(string $name) : \PhpParser\Builder\Function_
    {
        return new \PhpParser\Builder\Function_($name);
    }
    /**
     * Creates a namespace/class use builder.
     *
     * @param Node\Name|string $name Name of the entity (namespace or class) to alias
     *
     * @return Builder\Use_ The created use builder
     */
    public function use($name) : \PhpParser\Builder\Use_
    {
        return new \PhpParser\Builder\Use_($name, Use_::TYPE_NORMAL);
    }
    /**
     * Creates a function use builder.
     *
     * @param Node\Name|string $name Name of the function to alias
     *
     * @return Builder\Use_ The created use function builder
     */
    public function useFunction($name) : \PhpParser\Builder\Use_
    {
        return new \PhpParser\Builder\Use_($name, Use_::TYPE_FUNCTION);
    }
    /**
     * Creates a constant use builder.
     *
     * @param Node\Name|string $name Name of the const to alias
     *
     * @return Builder\Use_ The created use const builder
     */
    public function useConst($name) : \PhpParser\Builder\Use_
    {
        return new \PhpParser\Builder\Use_($name, Use_::TYPE_CONSTANT);
    }
    /**
     * Creates a class constant builder.
     *
     * @param string|Identifier                          $name  Name
     * @param Node\Expr|bool|null|int|float|string|array $value Value
     *
     * @return Builder\ClassConst The created use const builder
     */
    public function classConst($name, $value) : \PhpParser\Builder\ClassConst
    {
        return new \PhpParser\Builder\ClassConst($name, $value);
    }
    /**
     * Creates an enum case builder.
     *
     * @param string|Identifier $name  Name
     *
     * @return Builder\EnumCase The created use const builder
     */
    public function enumCase($name) : \PhpParser\Builder\EnumCase
    {
        return new \PhpParser\Builder\EnumCase($name);
    }
    /**
     * Creates node a for a literal value.
     *
     * @param Expr|bool|null|int|float|string|array $value $value
     *
     * @return Expr
     */
    public function val($value) : Expr
    {
        return \PhpParser\BuilderHelpers::normalizeValue($value);
    }
    /**
     * Creates variable node.
     *
     * @param string|Expr $name Name
     *
     * @return Expr\Variable
     */
    public function var($name) : Expr\Variable
    {
        if (!\is_string($name) && !$name instanceof Expr) {
            throw new \LogicException('Variable name must be string or Expr');
        }
        return new Expr\Variable($name);
    }
    /**
     * Normalizes an argument list.
     *
     * Creates Arg nodes for all arguments and converts literal values to expressions.
     *
     * @param array $args List of arguments to normalize
     *
     * @return Arg[]
     */
    public function args(array $args) : array
    {
        $normalizedArgs = [];
        foreach ($args as $key => $arg) {
            if (!$arg instanceof Arg) {
                $arg = new Arg(\PhpParser\BuilderHelpers::normalizeValue($arg));
            }
            if (\is_string($key)) {
                $arg->name = \PhpParser\BuilderHelpers::normalizeIdentifier($key);
            }
            $normalizedArgs[] = $arg;
        }
        return $normalizedArgs;
    }
    /**
     * Creates a function call node.
     *
     * @param string|Name|Expr $name Function name
     * @param array            $args Function arguments
     *
     * @return Expr\FuncCall
     */
    public function funcCall($name, array $args = []) : Expr\FuncCall
    {
        return new Expr\FuncCall(\PhpParser\BuilderHelpers::normalizeNameOrExpr($name), $this->args($args));
    }
    /**
     * Creates a method call node.
     *
     * @param Expr                   $var  Variable the method is called on
     * @param string|Identifier|Expr $name Method name
     * @param array                  $args Method arguments
     *
     * @return Expr\MethodCall
     */
    public function methodCall(Expr $var, $name, array $args = []) : Expr\MethodCall
    {
        return new Expr\MethodCall($var, \PhpParser\BuilderHelpers::normalizeIdentifierOrExpr($name), $this->args($args));
    }
    /**
     * Creates a static method call node.
     *
     * @param string|Name|Expr       $class Class name
     * @param string|Identifier|Expr $name  Method name
     * @param array                  $args  Method arguments
     *
     * @return Expr\StaticCall
     */
    public function staticCall($class, $name, array $args = []) : Expr\StaticCall
    {
        return new Expr\StaticCall(\PhpParser\BuilderHelpers::normalizeNameOrExpr($class), \PhpParser\BuilderHelpers::normalizeIdentifierOrExpr($name), $this->args($args));
    }
    /**
     * Creates an object creation node.
     *
     * @param string|Name|Expr $class Class name
     * @param array            $args  Constructor arguments
     *
     * @return Expr\New_
     */
    public function new($class, array $args = []) : Expr\New_
    {
        return new Expr\New_(\PhpParser\BuilderHelpers::normalizeNameOrExpr($class), $this->args($args));
    }
    /**
     * Creates a constant fetch node.
     *
     * @param string|Name $name Constant name
     *
     * @return Expr\ConstFetch
     */
    public function constFetch($name) : Expr\ConstFetch
    {
        return new Expr\ConstFetch(\PhpParser\BuilderHelpers::normalizeName($name));
    }
    /**
     * Creates a property fetch node.
     *
     * @param Expr                   $var  Variable holding object
     * @param string|Identifier|Expr $name Property name
     *
     * @return Expr\PropertyFetch
     */
    public function propertyFetch(Expr $var, $name) : Expr\PropertyFetch
    {
        return new Expr\PropertyFetch($var, \PhpParser\BuilderHelpers::normalizeIdentifierOrExpr($name));
    }
    /**
     * Creates a class constant fetch node.
     *
     * @param string|Name|Expr  $class Class name
     * @param string|Identifier $name  Constant name
     *
     * @return Expr\ClassConstFetch
     */
    public function classConstFetch($class, $name) : Expr\ClassConstFetch
    {
        return new Expr\ClassConstFetch(\PhpParser\BuilderHelpers::normalizeNameOrExpr($class), \PhpParser\BuilderHelpers::normalizeIdentifier($name));
    }
    /**
     * Creates nested Concat nodes from a list of expressions.
     *
     * @param Expr|string ...$exprs Expressions or literal strings
     *
     * @return Concat
     */
    public function concat(...$exprs) : Concat
    {
        $numExprs = \count($exprs);
        if ($numExprs < 2) {
            throw new \LogicException('Expected at least two expressions');
        }
        $lastConcat = $this->normalizeStringExpr($exprs[0]);
        for ($i = 1; $i < $numExprs; $i++) {
            $lastConcat = new Concat($lastConcat, $this->normalizeStringExpr($exprs[$i]));
        }
        return $lastConcat;
    }
    /**
     * @param string|Expr $expr
     * @return Expr
     */
    private function normalizeStringExpr($expr) : Expr
    {
        if ($expr instanceof Expr) {
            return $expr;
        }
        if (\is_string($expr)) {
            return new String_($expr);
        }
        throw new \LogicException('Expected string or Expr');
    }
}
<?php

declare (strict_types=1);
namespace PhpParser;

interface Parser
{
    /**
     * Parses PHP code into a node tree.
     *
     * @param string $code The source code to parse
     * @param ErrorHandler|null $errorHandler Error handler to use for lexer/parser errors, defaults
     *                                        to ErrorHandler\Throwing.
     *
     * @return Node\Stmt[]|null Array of statements (or null non-throwing error handler is used and
     *                          the parser was unable to recover from an error).
     */
    public function parse(string $code, \PhpParser\ErrorHandler $errorHandler = null);
}
<?php
$meta #
#semval($) $this->semValue
#semval($,%t) $this->semValue
#semval(%n) $stackPos-(%l-%n)
#semval(%n,%t) $stackPos-(%l-%n)

namespace PhpParser\Parser;

use PhpParser\Error;
use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Name;
use PhpParser\Node\Scalar;
use PhpParser\Node\Stmt;
#include;

/* This is an automatically GENERATED file, which should not be manually edited.
 * Instead edit one of the following:
 *  * the grammar files grammar/php5.y or grammar/php7.y
 *  * the skeleton file grammar/parser.template
 *  * the preprocessing script grammar/rebuildParsers.php
 */
class #(-p) extends \PhpParser\ParserAbstract
{
    protected $tokenToSymbolMapSize = #(YYMAXLEX);
    protected $actionTableSize = #(YYLAST);
    protected $gotoTableSize = #(YYGLAST);

    protected $invalidSymbol = #(YYBADCH);
    protected $errorSymbol = #(YYINTERRTOK);
    protected $defaultAction = #(YYDEFAULT);
    protected $unexpectedTokenRule = #(YYUNEXPECTED);

    protected $YY2TBLSTATE = #(YY2TBLSTATE);
    protected $numNonLeafStates = #(YYNLSTATES);

    protected $symbolToName = array(
        #listvar terminals
    );

    protected $tokenToSymbol = array(
        #listvar yytranslate
    );

    protected $action = array(
        #listvar yyaction
    );

    protected $actionCheck = array(
        #listvar yycheck
    );

    protected $actionBase = array(
        #listvar yybase
    );

    protected $actionDefault = array(
        #listvar yydefault
    );

    protected $goto = array(
        #listvar yygoto
    );

    protected $gotoCheck = array(
        #listvar yygcheck
    );

    protected $gotoBase = array(
        #listvar yygbase
    );

    protected $gotoDefault = array(
        #listvar yygdefault
    );

    protected $ruleToNonTerminal = array(
        #listvar yylhs
    );

    protected $ruleToLength = array(
        #listvar yylen
    );
#if -t

    protected $productions = array(
        #production-strings;
    );
#endif

    protected function initReduceCallbacks() {
        $this->reduceCallbacks = [
#reduce
            %n => function ($stackPos) {
                %b
            },
#noact
            %n => function ($stackPos) {
                $this->semValue = $this->semStack[$stackPos];
            },
#endreduce
        ];
    }
}
#tailcode;
/* We currently rely on the token ID mapping to be the same between PHP 5 and PHP 7 - so the same lexer can be used for
 * both. This is enforced by sharing this token file. */

%right T_THROW
%left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE
%left ','
%left T_LOGICAL_OR
%left T_LOGICAL_XOR
%left T_LOGICAL_AND
%right T_PRINT
%right T_YIELD
%right T_DOUBLE_ARROW
%right T_YIELD_FROM
%left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL T_XOR_EQUAL T_SL_EQUAL T_SR_EQUAL T_POW_EQUAL T_COALESCE_EQUAL
%left '?' ':'
%right T_COALESCE
%left T_BOOLEAN_OR
%left T_BOOLEAN_AND
%left '|'
%left '^'
%left T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG
%nonassoc T_IS_EQUAL T_IS_NOT_EQUAL T_IS_IDENTICAL T_IS_NOT_IDENTICAL T_SPACESHIP
%nonassoc '<' T_IS_SMALLER_OR_EQUAL '>' T_IS_GREATER_OR_EQUAL
%left T_SL T_SR
%left '+' '-' '.'
%left '*' '/' '%'
%right '!'
%nonassoc T_INSTANCEOF
%right '~' T_INC T_DEC T_INT_CAST T_DOUBLE_CAST T_STRING_CAST T_ARRAY_CAST T_OBJECT_CAST T_BOOL_CAST T_UNSET_CAST '@'
%right T_POW
%right '['
%nonassoc T_NEW T_CLONE
%token T_EXIT
%token T_IF
%left T_ELSEIF
%left T_ELSE
%left T_ENDIF
%token T_LNUMBER
%token T_DNUMBER
%token T_STRING
%token T_STRING_VARNAME
%token T_VARIABLE
%token T_NUM_STRING
%token T_INLINE_HTML
%token T_ENCAPSED_AND_WHITESPACE
%token T_CONSTANT_ENCAPSED_STRING
%token T_ECHO
%token T_DO
%token T_WHILE
%token T_ENDWHILE
%token T_FOR
%token T_ENDFOR
%token T_FOREACH
%token T_ENDFOREACH
%token T_DECLARE
%token T_ENDDECLARE
%token T_AS
%token T_SWITCH
%token T_MATCH
%token T_ENDSWITCH
%token T_CASE
%token T_DEFAULT
%token T_BREAK
%token T_CONTINUE
%token T_GOTO
%token T_FUNCTION
%token T_FN
%token T_CONST
%token T_RETURN
%token T_TRY
%token T_CATCH
%token T_FINALLY
%token T_THROW
%token T_USE
%token T_INSTEADOF
%token T_GLOBAL
%right T_STATIC T_ABSTRACT T_FINAL T_PRIVATE T_PROTECTED T_PUBLIC T_READONLY
%token T_VAR
%token T_UNSET
%token T_ISSET
%token T_EMPTY
%token T_HALT_COMPILER
%token T_CLASS
%token T_TRAIT
%token T_INTERFACE
%token T_ENUM
%token T_EXTENDS
%token T_IMPLEMENTS
%token T_OBJECT_OPERATOR
%token T_NULLSAFE_OBJECT_OPERATOR
%token T_DOUBLE_ARROW
%token T_LIST
%token T_ARRAY
%token T_CALLABLE
%token T_CLASS_C
%token T_TRAIT_C
%token T_METHOD_C
%token T_FUNC_C
%token T_LINE
%token T_FILE
%token T_START_HEREDOC
%token T_END_HEREDOC
%token T_DOLLAR_OPEN_CURLY_BRACES
%token T_CURLY_OPEN
%token T_PAAMAYIM_NEKUDOTAYIM
%token T_NAMESPACE
%token T_NS_C
%token T_DIR
%token T_NS_SEPARATOR
%token T_ELLIPSIS
%token T_NAME_FULLY_QUALIFIED
%token T_NAME_QUALIFIED
%token T_NAME_RELATIVE
%token T_ATTRIBUTE
%token T_ENUM
%pure_parser
%expect 2

%tokens

%%

start:
    top_statement_list                                      { $$ = $this->handleNamespaces($1); }
;

top_statement_list_ex:
      top_statement_list_ex top_statement                   { pushNormalizing($1, $2); }
    | /* empty */                                           { init(); }
;

top_statement_list:
      top_statement_list_ex
          { makeZeroLengthNop($nop, $this->lookaheadStartAttributes);
            if ($nop !== null) { $1[] = $nop; } $$ = $1; }
;

ampersand:
      T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG
    | T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG
;

reserved_non_modifiers:
      T_INCLUDE | T_INCLUDE_ONCE | T_EVAL | T_REQUIRE | T_REQUIRE_ONCE | T_LOGICAL_OR | T_LOGICAL_XOR | T_LOGICAL_AND
    | T_INSTANCEOF | T_NEW | T_CLONE | T_EXIT | T_IF | T_ELSEIF | T_ELSE | T_ENDIF | T_ECHO | T_DO | T_WHILE
    | T_ENDWHILE | T_FOR | T_ENDFOR | T_FOREACH | T_ENDFOREACH | T_DECLARE | T_ENDDECLARE | T_AS | T_TRY | T_CATCH
    | T_FINALLY | T_THROW | T_USE | T_INSTEADOF | T_GLOBAL | T_VAR | T_UNSET | T_ISSET | T_EMPTY | T_CONTINUE | T_GOTO
    | T_FUNCTION | T_CONST | T_RETURN | T_PRINT | T_YIELD | T_LIST | T_SWITCH | T_ENDSWITCH | T_CASE | T_DEFAULT
    | T_BREAK | T_ARRAY | T_CALLABLE | T_EXTENDS | T_IMPLEMENTS | T_NAMESPACE | T_TRAIT | T_INTERFACE | T_CLASS
    | T_CLASS_C | T_TRAIT_C | T_FUNC_C | T_METHOD_C | T_LINE | T_FILE | T_DIR | T_NS_C | T_HALT_COMPILER | T_FN
    | T_MATCH | T_ENUM
;

semi_reserved:
      reserved_non_modifiers
    | T_STATIC | T_ABSTRACT | T_FINAL | T_PRIVATE | T_PROTECTED | T_PUBLIC | T_READONLY
;

identifier_maybe_reserved:
      T_STRING                                              { $$ = Node\Identifier[$1]; }
    | semi_reserved                                         { $$ = Node\Identifier[$1]; }
;

identifier_not_reserved:
      T_STRING                                              { $$ = Node\Identifier[$1]; }
;

reserved_non_modifiers_identifier:
      reserved_non_modifiers                                { $$ = Node\Identifier[$1]; }
;

namespace_declaration_name:
      T_STRING                                              { $$ = Name[$1]; }
    | semi_reserved                                         { $$ = Name[$1]; }
    | T_NAME_QUALIFIED                                      { $$ = Name[$1]; }
;

namespace_name:
      T_STRING                                              { $$ = Name[$1]; }
    | T_NAME_QUALIFIED                                      { $$ = Name[$1]; }
;

legacy_namespace_name:
      namespace_name                                        { $$ = $1; }
    | T_NAME_FULLY_QUALIFIED                                { $$ = Name[substr($1, 1)]; }
;

plain_variable:
      T_VARIABLE                                            { $$ = Expr\Variable[parseVar($1)]; }
;

semi:
      ';'                                                   { /* nothing */ }
    | error                                                 { /* nothing */ }
;

no_comma:
      /* empty */ { /* nothing */ }
    | ',' { $this->emitError(new Error('A trailing comma is not allowed here', attributes())); }
;

optional_comma:
      /* empty */
    | ','
;

attribute_decl:
      class_name                                            { $$ = Node\Attribute[$1, []]; }
    | class_name argument_list                              { $$ = Node\Attribute[$1, $2]; }
;

attribute_group:
      attribute_decl                                        { init($1); }
    | attribute_group ',' attribute_decl                    { push($1, $3); }
;

attribute:
      T_ATTRIBUTE attribute_group optional_comma ']'        { $$ = Node\AttributeGroup[$2]; }
;

attributes:
      attribute                                             { init($1); }
    | attributes attribute                                  { push($1, $2); }
;

optional_attributes:
      /* empty */                                           { $$ = []; }
    | attributes                                            { $$ = $1; }
;

top_statement:
      statement                                             { $$ = $1; }
    | function_declaration_statement                        { $$ = $1; }
    | class_declaration_statement                           { $$ = $1; }
    | T_HALT_COMPILER
          { $$ = Stmt\HaltCompiler[$this->lexer->handleHaltCompiler()]; }
    | T_NAMESPACE namespace_declaration_name semi
          { $$ = Stmt\Namespace_[$2, null];
            $$->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON);
            $this->checkNamespace($$); }
    | T_NAMESPACE namespace_declaration_name '{' top_statement_list '}'
          { $$ = Stmt\Namespace_[$2, $4];
            $$->setAttribute('kind', Stmt\Namespace_::KIND_BRACED);
            $this->checkNamespace($$); }
    | T_NAMESPACE '{' top_statement_list '}'
          { $$ = Stmt\Namespace_[null, $3];
            $$->setAttribute('kind', Stmt\Namespace_::KIND_BRACED);
            $this->checkNamespace($$); }
    | T_USE use_declarations semi                           { $$ = Stmt\Use_[$2, Stmt\Use_::TYPE_NORMAL]; }
    | T_USE use_type use_declarations semi                  { $$ = Stmt\Use_[$3, $2]; }
    | group_use_declaration semi                            { $$ = $1; }
    | T_CONST constant_declaration_list semi                { $$ = Stmt\Const_[$2]; }
;

use_type:
      T_FUNCTION                                            { $$ = Stmt\Use_::TYPE_FUNCTION; }
    | T_CONST                                               { $$ = Stmt\Use_::TYPE_CONSTANT; }
;

group_use_declaration:
      T_USE use_type legacy_namespace_name T_NS_SEPARATOR '{' unprefixed_use_declarations '}'
          { $$ = Stmt\GroupUse[$3, $6, $2]; }
    | T_USE legacy_namespace_name T_NS_SEPARATOR '{' inline_use_declarations '}'
          { $$ = Stmt\GroupUse[$2, $5, Stmt\Use_::TYPE_UNKNOWN]; }
;

unprefixed_use_declarations:
      non_empty_unprefixed_use_declarations optional_comma  { $$ = $1; }
;

non_empty_unprefixed_use_declarations:
      non_empty_unprefixed_use_declarations ',' unprefixed_use_declaration
          { push($1, $3); }
    | unprefixed_use_declaration                            { init($1); }
;

use_declarations:
      non_empty_use_declarations no_comma                   { $$ = $1; }
;

non_empty_use_declarations:
      non_empty_use_declarations ',' use_declaration        { push($1, $3); }
    | use_declaration                                       { init($1); }
;

inline_use_declarations:
      non_empty_inline_use_declarations optional_comma      { $$ = $1; }
;

non_empty_inline_use_declarations:
      non_empty_inline_use_declarations ',' inline_use_declaration
          { push($1, $3); }
    | inline_use_declaration                                { init($1); }
;

unprefixed_use_declaration:
      namespace_name
          { $$ = Stmt\UseUse[$1, null, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #1); }
    | namespace_name T_AS identifier_not_reserved
          { $$ = Stmt\UseUse[$1, $3, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #3); }
;

use_declaration:
      legacy_namespace_name
          { $$ = Stmt\UseUse[$1, null, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #1); }
    | legacy_namespace_name T_AS identifier_not_reserved
          { $$ = Stmt\UseUse[$1, $3, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #3); }
;

inline_use_declaration:
      unprefixed_use_declaration                            { $$ = $1; $$->type = Stmt\Use_::TYPE_NORMAL; }
    | use_type unprefixed_use_declaration                   { $$ = $2; $$->type = $1; }
;

constant_declaration_list:
      non_empty_constant_declaration_list no_comma          { $$ = $1; }
;

non_empty_constant_declaration_list:
      non_empty_constant_declaration_list ',' constant_declaration
          { push($1, $3); }
    | constant_declaration                                  { init($1); }
;

constant_declaration:
    identifier_not_reserved '=' expr                        { $$ = Node\Const_[$1, $3]; }
;

class_const_list:
      non_empty_class_const_list no_comma                   { $$ = $1; }
;

non_empty_class_const_list:
      non_empty_class_const_list ',' class_const            { push($1, $3); }
    | class_const                                           { init($1); }
;

class_const:
    identifier_maybe_reserved '=' expr                      { $$ = Node\Const_[$1, $3]; }
;

inner_statement_list_ex:
      inner_statement_list_ex inner_statement               { pushNormalizing($1, $2); }
    | /* empty */                                           { init(); }
;

inner_statement_list:
      inner_statement_list_ex
          { makeZeroLengthNop($nop, $this->lookaheadStartAttributes);
            if ($nop !== null) { $1[] = $nop; } $$ = $1; }
;

inner_statement:
      statement                                             { $$ = $1; }
    | function_declaration_statement                        { $$ = $1; }
    | class_declaration_statement                           { $$ = $1; }
    | T_HALT_COMPILER
          { throw new Error('__HALT_COMPILER() can only be used from the outermost scope', attributes()); }
;

non_empty_statement:
      '{' inner_statement_list '}'
    {
        if ($2) {
            $$ = $2; prependLeadingComments($$);
        } else {
            makeNop($$, $this->startAttributeStack[#1], $this->endAttributes);
            if (null === $$) { $$ = array(); }
        }
    }
    | T_IF '(' expr ')' statement elseif_list else_single
          { $$ = Stmt\If_[$3, ['stmts' => toArray($5), 'elseifs' => $6, 'else' => $7]]; }
    | T_IF '(' expr ')' ':' inner_statement_list new_elseif_list new_else_single T_ENDIF ';'
          { $$ = Stmt\If_[$3, ['stmts' => $6, 'elseifs' => $7, 'else' => $8]]; }
    | T_WHILE '(' expr ')' while_statement                  { $$ = Stmt\While_[$3, $5]; }
    | T_DO statement T_WHILE '(' expr ')' ';'               { $$ = Stmt\Do_   [$5, toArray($2)]; }
    | T_FOR '(' for_expr ';'  for_expr ';' for_expr ')' for_statement
          { $$ = Stmt\For_[['init' => $3, 'cond' => $5, 'loop' => $7, 'stmts' => $9]]; }
    | T_SWITCH '(' expr ')' switch_case_list                { $$ = Stmt\Switch_[$3, $5]; }
    | T_BREAK optional_expr semi                            { $$ = Stmt\Break_[$2]; }
    | T_CONTINUE optional_expr semi                         { $$ = Stmt\Continue_[$2]; }
    | T_RETURN optional_expr semi                           { $$ = Stmt\Return_[$2]; }
    | T_GLOBAL global_var_list semi                         { $$ = Stmt\Global_[$2]; }
    | T_STATIC static_var_list semi                         { $$ = Stmt\Static_[$2]; }
    | T_ECHO expr_list_forbid_comma semi                    { $$ = Stmt\Echo_[$2]; }
    | T_INLINE_HTML                                         { $$ = Stmt\InlineHTML[$1]; }
    | expr semi {
        $e = $1;
        if ($e instanceof Expr\Throw_) {
            // For backwards-compatibility reasons, convert throw in statement position into
            // Stmt\Throw_ rather than Stmt\Expression(Expr\Throw_).
            $$ = Stmt\Throw_[$e->expr];
        } else {
            $$ = Stmt\Expression[$e];
        }
    }
    | T_UNSET '(' variables_list ')' semi                   { $$ = Stmt\Unset_[$3]; }
    | T_FOREACH '(' expr T_AS foreach_variable ')' foreach_statement
          { $$ = Stmt\Foreach_[$3, $5[0], ['keyVar' => null, 'byRef' => $5[1], 'stmts' => $7]]; }
    | T_FOREACH '(' expr T_AS variable T_DOUBLE_ARROW foreach_variable ')' foreach_statement
          { $$ = Stmt\Foreach_[$3, $7[0], ['keyVar' => $5, 'byRef' => $7[1], 'stmts' => $9]]; }
    | T_FOREACH '(' expr error ')' foreach_statement
          { $$ = Stmt\Foreach_[$3, new Expr\Error(stackAttributes(#4)), ['stmts' => $6]]; }
    | T_DECLARE '(' declare_list ')' declare_statement      { $$ = Stmt\Declare_[$3, $5]; }
    | T_TRY '{' inner_statement_list '}' catches optional_finally
          { $$ = Stmt\TryCatch[$3, $5, $6]; $this->checkTryCatch($$); }
    | T_GOTO identifier_not_reserved semi                   { $$ = Stmt\Goto_[$2]; }
    | identifier_not_reserved ':'                           { $$ = Stmt\Label[$1]; }
    | error                                                 { $$ = array(); /* means: no statement */ }
;

statement:
      non_empty_statement                                   { $$ = $1; }
    | ';'
          { makeNop($$, $this->startAttributeStack[#1], $this->endAttributes);
            if ($$ === null) $$ = array(); /* means: no statement */ }
;

catches:
      /* empty */                                           { init(); }
    | catches catch                                         { push($1, $2); }
;

name_union:
      name                                                  { init($1); }
    | name_union '|' name                                   { push($1, $3); }
;

catch:
    T_CATCH '(' name_union optional_plain_variable ')' '{' inner_statement_list '}'
        { $$ = Stmt\Catch_[$3, $4, $7]; }
;

optional_finally:
      /* empty */                                           { $$ = null; }
    | T_FINALLY '{' inner_statement_list '}'                { $$ = Stmt\Finally_[$3]; }
;

variables_list:
      non_empty_variables_list optional_comma               { $$ = $1; }
;

non_empty_variables_list:
      variable                                              { init($1); }
    | non_empty_variables_list ',' variable                 { push($1, $3); }
;

optional_ref:
      /* empty */                                           { $$ = false; }
    | ampersand                                             { $$ = true; }
;

optional_arg_ref:
      /* empty */                                           { $$ = false; }
    | T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG                 { $$ = true; }
;

optional_ellipsis:
      /* empty */                                           { $$ = false; }
    | T_ELLIPSIS                                            { $$ = true; }
;

block_or_error:
      '{' inner_statement_list '}'                          { $$ = $2; }
    | error                                                 { $$ = []; }
;

identifier_maybe_readonly:
      identifier_not_reserved                               { $$ = $1; }
    | T_READONLY                                            { $$ = Node\Identifier[$1]; }
;

function_declaration_statement:
      T_FUNCTION optional_ref identifier_maybe_readonly '(' parameter_list ')' optional_return_type block_or_error
          { $$ = Stmt\Function_[$3, ['byRef' => $2, 'params' => $5, 'returnType' => $7, 'stmts' => $8, 'attrGroups' => []]]; }
    | attributes T_FUNCTION optional_ref identifier_maybe_readonly '(' parameter_list ')' optional_return_type block_or_error
          { $$ = Stmt\Function_[$4, ['byRef' => $3, 'params' => $6, 'returnType' => $8, 'stmts' => $9, 'attrGroups' => $1]]; }
;

class_declaration_statement:
      class_entry_type identifier_not_reserved extends_from implements_list '{' class_statement_list '}'
          { $$ = Stmt\Class_[$2, ['type' => $1, 'extends' => $3, 'implements' => $4, 'stmts' => $6, 'attrGroups' => []]];
            $this->checkClass($$, #2); }
    | attributes class_entry_type identifier_not_reserved extends_from implements_list '{' class_statement_list '}'
          { $$ = Stmt\Class_[$3, ['type' => $2, 'extends' => $4, 'implements' => $5, 'stmts' => $7, 'attrGroups' => $1]];
            $this->checkClass($$, #3); }
    | optional_attributes T_INTERFACE identifier_not_reserved interface_extends_list '{' class_statement_list '}'
          { $$ = Stmt\Interface_[$3, ['extends' => $4, 'stmts' => $6, 'attrGroups' => $1]];
            $this->checkInterface($$, #3); }
    | optional_attributes T_TRAIT identifier_not_reserved '{' class_statement_list '}'
          { $$ = Stmt\Trait_[$3, ['stmts' => $5, 'attrGroups' => $1]]; }
    | optional_attributes T_ENUM identifier_not_reserved enum_scalar_type implements_list '{' class_statement_list '}'
          { $$ = Stmt\Enum_[$3, ['scalarType' => $4, 'implements' => $5, 'stmts' => $7, 'attrGroups' => $1]];
            $this->checkEnum($$, #3); }
;

enum_scalar_type:
      /* empty */                                           { $$ = null; }
    | ':' type                                              { $$ = $2; }

enum_case_expr:
      /* empty */                                           { $$ = null; }
    | '=' expr                                              { $$ = $2; }
;

class_entry_type:
      T_CLASS                                               { $$ = 0; }
    | class_modifiers T_CLASS                               { $$ = $1; }
;

class_modifiers:
      class_modifier                                        { $$ = $1; }
    | class_modifiers class_modifier                        { $this->checkClassModifier($1, $2, #2); $$ = $1 | $2; }
;

class_modifier:
      T_ABSTRACT                                            { $$ = Stmt\Class_::MODIFIER_ABSTRACT; }
    | T_FINAL                                               { $$ = Stmt\Class_::MODIFIER_FINAL; }
    | T_READONLY                                            { $$ = Stmt\Class_::MODIFIER_READONLY; }
;

extends_from:
      /* empty */                                           { $$ = null; }
    | T_EXTENDS class_name                                  { $$ = $2; }
;

interface_extends_list:
      /* empty */                                           { $$ = array(); }
    | T_EXTENDS class_name_list                             { $$ = $2; }
;

implements_list:
      /* empty */                                           { $$ = array(); }
    | T_IMPLEMENTS class_name_list                          { $$ = $2; }
;

class_name_list:
      non_empty_class_name_list no_comma                    { $$ = $1; }
;

non_empty_class_name_list:
      class_name                                            { init($1); }
    | non_empty_class_name_list ',' class_name              { push($1, $3); }
;

for_statement:
      statement                                             { $$ = toArray($1); }
    | ':' inner_statement_list T_ENDFOR ';'                 { $$ = $2; }
;

foreach_statement:
      statement                                             { $$ = toArray($1); }
    | ':' inner_statement_list T_ENDFOREACH ';'             { $$ = $2; }
;

declare_statement:
      non_empty_statement                                   { $$ = toArray($1); }
    | ';'                                                   { $$ = null; }
    | ':' inner_statement_list T_ENDDECLARE ';'             { $$ = $2; }
;

declare_list:
      non_empty_declare_list no_comma                       { $$ = $1; }
;

non_empty_declare_list:
      declare_list_element                                  { init($1); }
    | non_empty_declare_list ',' declare_list_element       { push($1, $3); }
;

declare_list_element:
      identifier_not_reserved '=' expr                      { $$ = Stmt\DeclareDeclare[$1, $3]; }
;

switch_case_list:
      '{' case_list '}'                                     { $$ = $2; }
    | '{' ';' case_list '}'                                 { $$ = $3; }
    | ':' case_list T_ENDSWITCH ';'                         { $$ = $2; }
    | ':' ';' case_list T_ENDSWITCH ';'                     { $$ = $3; }
;

case_list:
      /* empty */                                           { init(); }
    | case_list case                                        { push($1, $2); }
;

case:
      T_CASE expr case_separator inner_statement_list_ex    { $$ = Stmt\Case_[$2, $4]; }
    | T_DEFAULT case_separator inner_statement_list_ex      { $$ = Stmt\Case_[null, $3]; }
;

case_separator:
      ':'
    | ';'
;

match:
      T_MATCH '(' expr ')' '{' match_arm_list '}'           { $$ = Expr\Match_[$3, $6]; }
;

match_arm_list:
      /* empty */                                           { $$ = []; }
    | non_empty_match_arm_list optional_comma               { $$ = $1; }
;

non_empty_match_arm_list:
      match_arm                                             { init($1); }
    | non_empty_match_arm_list ',' match_arm                { push($1, $3); }
;

match_arm:
      expr_list_allow_comma T_DOUBLE_ARROW expr             { $$ = Node\MatchArm[$1, $3]; }
    | T_DEFAULT optional_comma T_DOUBLE_ARROW expr          { $$ = Node\MatchArm[null, $4]; }
;

while_statement:
      statement                                             { $$ = toArray($1); }
    | ':' inner_statement_list T_ENDWHILE ';'               { $$ = $2; }
;

elseif_list:
      /* empty */                                           { init(); }
    | elseif_list elseif                                    { push($1, $2); }
;

elseif:
      T_ELSEIF '(' expr ')' statement                       { $$ = Stmt\ElseIf_[$3, toArray($5)]; }
;

new_elseif_list:
      /* empty */                                           { init(); }
    | new_elseif_list new_elseif                            { push($1, $2); }
;

new_elseif:
     T_ELSEIF '(' expr ')' ':' inner_statement_list
         { $$ = Stmt\ElseIf_[$3, $6]; $this->fixupAlternativeElse($$); }
;

else_single:
      /* empty */                                           { $$ = null; }
    | T_ELSE statement                                      { $$ = Stmt\Else_[toArray($2)]; }
;

new_else_single:
      /* empty */                                           { $$ = null; }
    | T_ELSE ':' inner_statement_list
          { $$ = Stmt\Else_[$3]; $this->fixupAlternativeElse($$); }
;

foreach_variable:
      variable                                              { $$ = array($1, false); }
    | ampersand variable                                    { $$ = array($2, true); }
    | list_expr                                             { $$ = array($1, false); }
    | array_short_syntax                                    { $$ = array($1, false); }
;

parameter_list:
      non_empty_parameter_list optional_comma               { $$ = $1; }
    | /* empty */                                           { $$ = array(); }
;

non_empty_parameter_list:
      parameter                                             { init($1); }
    | non_empty_parameter_list ',' parameter                { push($1, $3); }
;

optional_property_modifiers:
      /* empty */               { $$ = 0; }
    | optional_property_modifiers property_modifier
          { $this->checkModifier($1, $2, #2); $$ = $1 | $2; }
;

property_modifier:
      T_PUBLIC                  { $$ = Stmt\Class_::MODIFIER_PUBLIC; }
    | T_PROTECTED               { $$ = Stmt\Class_::MODIFIER_PROTECTED; }
    | T_PRIVATE                 { $$ = Stmt\Class_::MODIFIER_PRIVATE; }
    | T_READONLY                { $$ = Stmt\Class_::MODIFIER_READONLY; }
;

parameter:
      optional_attributes optional_property_modifiers optional_type_without_static
      optional_arg_ref optional_ellipsis plain_variable
          { $$ = new Node\Param($6, null, $3, $4, $5, attributes(), $2, $1);
            $this->checkParam($$); }
    | optional_attributes optional_property_modifiers optional_type_without_static
      optional_arg_ref optional_ellipsis plain_variable '=' expr
          { $$ = new Node\Param($6, $8, $3, $4, $5, attributes(), $2, $1);
            $this->checkParam($$); }
    | optional_attributes optional_property_modifiers optional_type_without_static
      optional_arg_ref optional_ellipsis error
          { $$ = new Node\Param(Expr\Error[], null, $3, $4, $5, attributes(), $2, $1); }
;

type_expr:
      type                                                  { $$ = $1; }
    | '?' type                                              { $$ = Node\NullableType[$2]; }
    | union_type                                            { $$ = Node\UnionType[$1]; }
    | intersection_type                                     { $$ = $1; }
;

type:
      type_without_static                                   { $$ = $1; }
    | T_STATIC                                              { $$ = Node\Name['static']; }
;

type_without_static:
      name                                                  { $$ = $this->handleBuiltinTypes($1); }
    | T_ARRAY                                               { $$ = Node\Identifier['array']; }
    | T_CALLABLE                                            { $$ = Node\Identifier['callable']; }
;

union_type_element:
                type { $$ = $1; }
        |        '(' intersection_type ')' { $$ = $2; }
;

union_type:
      union_type_element '|' union_type_element             { init($1, $3); }
    | union_type '|' union_type_element                     { push($1, $3); }
;

union_type_without_static_element:
                type_without_static { $$ = $1; }
        |        '(' intersection_type_without_static ')' { $$ = $2; }
;

union_type_without_static:
      union_type_without_static_element '|' union_type_without_static_element   { init($1, $3); }
    | union_type_without_static '|' union_type_without_static_element           { push($1, $3); }
;

intersection_type_list:
      type T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type   { init($1, $3); }
    | intersection_type_list T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type
          { push($1, $3); }
;

intersection_type:
      intersection_type_list { $$ = Node\IntersectionType[$1]; }
;

intersection_type_without_static_list:
      type_without_static T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type_without_static
          { init($1, $3); }
    | intersection_type_without_static_list T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type_without_static
          { push($1, $3); }
;

intersection_type_without_static:
      intersection_type_without_static_list { $$ = Node\IntersectionType[$1]; }
;

type_expr_without_static:
      type_without_static                                   { $$ = $1; }
    | '?' type_without_static                               { $$ = Node\NullableType[$2]; }
    | union_type_without_static                             { $$ = Node\UnionType[$1]; }
    | intersection_type_without_static                      { $$ = $1; }
;

optional_type_without_static:
      /* empty */                                           { $$ = null; }
    | type_expr_without_static                              { $$ = $1; }
;

optional_return_type:
      /* empty */                                           { $$ = null; }
    | ':' type_expr                                         { $$ = $2; }
    | ':' error                                             { $$ = null; }
;

argument_list:
      '(' ')'                                               { $$ = array(); }
    | '(' non_empty_argument_list optional_comma ')'        { $$ = $2; }
    | '(' variadic_placeholder ')'                          { init($2); }
;

variadic_placeholder:
      T_ELLIPSIS                                            { $$ = Node\VariadicPlaceholder[]; }
;

non_empty_argument_list:
      argument                                              { init($1); }
    | non_empty_argument_list ',' argument                  { push($1, $3); }
;

argument:
      expr                                                  { $$ = Node\Arg[$1, false, false]; }
    | ampersand variable                                    { $$ = Node\Arg[$2, true, false]; }
    | T_ELLIPSIS expr                                       { $$ = Node\Arg[$2, false, true]; }
    | identifier_maybe_reserved ':' expr
          { $$ = new Node\Arg($3, false, false, attributes(), $1); }
;

global_var_list:
      non_empty_global_var_list no_comma                    { $$ = $1; }
;

non_empty_global_var_list:
      non_empty_global_var_list ',' global_var              { push($1, $3); }
    | global_var                                            { init($1); }
;

global_var:
      simple_variable                                       { $$ = $1; }
;

static_var_list:
      non_empty_static_var_list no_comma                    { $$ = $1; }
;

non_empty_static_var_list:
      non_empty_static_var_list ',' static_var              { push($1, $3); }
    | static_var                                            { init($1); }
;

static_var:
      plain_variable                                        { $$ = Stmt\StaticVar[$1, null]; }
    | plain_variable '=' expr                               { $$ = Stmt\StaticVar[$1, $3]; }
;

class_statement_list_ex:
      class_statement_list_ex class_statement               { if ($2 !== null) { push($1, $2); } }
    | /* empty */                                           { init(); }
;

class_statement_list:
      class_statement_list_ex
          { makeZeroLengthNop($nop, $this->lookaheadStartAttributes);
            if ($nop !== null) { $1[] = $nop; } $$ = $1; }
;

class_statement:
      optional_attributes variable_modifiers optional_type_without_static property_declaration_list semi
          { $$ = new Stmt\Property($2, $4, attributes(), $3, $1);
            $this->checkProperty($$, #2); }
    | optional_attributes method_modifiers T_CONST class_const_list semi
          { $$ = new Stmt\ClassConst($4, $2, attributes(), $1);
            $this->checkClassConst($$, #2); }
    | optional_attributes method_modifiers T_FUNCTION optional_ref identifier_maybe_reserved '(' parameter_list ')'
      optional_return_type method_body
          { $$ = Stmt\ClassMethod[$5, ['type' => $2, 'byRef' => $4, 'params' => $7, 'returnType' => $9, 'stmts' => $10, 'attrGroups' => $1]];
            $this->checkClassMethod($$, #2); }
    | T_USE class_name_list trait_adaptations               { $$ = Stmt\TraitUse[$2, $3]; }
    | optional_attributes T_CASE identifier_maybe_reserved enum_case_expr semi
         { $$ = Stmt\EnumCase[$3, $4, $1]; }
    | error                                                 { $$ = null; /* will be skipped */ }
;

trait_adaptations:
      ';'                                                   { $$ = array(); }
    | '{' trait_adaptation_list '}'                         { $$ = $2; }
;

trait_adaptation_list:
      /* empty */                                           { init(); }
    | trait_adaptation_list trait_adaptation                { push($1, $2); }
;

trait_adaptation:
      trait_method_reference_fully_qualified T_INSTEADOF class_name_list ';'
          { $$ = Stmt\TraitUseAdaptation\Precedence[$1[0], $1[1], $3]; }
    | trait_method_reference T_AS member_modifier identifier_maybe_reserved ';'
          { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], $3, $4]; }
    | trait_method_reference T_AS member_modifier ';'
          { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], $3, null]; }
    | trait_method_reference T_AS identifier_not_reserved ';'
          { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], null, $3]; }
    | trait_method_reference T_AS reserved_non_modifiers_identifier ';'
          { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], null, $3]; }
;

trait_method_reference_fully_qualified:
      name T_PAAMAYIM_NEKUDOTAYIM identifier_maybe_reserved { $$ = array($1, $3); }
;
trait_method_reference:
      trait_method_reference_fully_qualified                { $$ = $1; }
    | identifier_maybe_reserved                             { $$ = array(null, $1); }
;

method_body:
      ';' /* abstract method */                             { $$ = null; }
    | block_or_error                                        { $$ = $1; }
;

variable_modifiers:
      non_empty_member_modifiers                            { $$ = $1; }
    | T_VAR                                                 { $$ = 0; }
;

method_modifiers:
      /* empty */                                           { $$ = 0; }
    | non_empty_member_modifiers                            { $$ = $1; }
;

non_empty_member_modifiers:
      member_modifier                                       { $$ = $1; }
    | non_empty_member_modifiers member_modifier            { $this->checkModifier($1, $2, #2); $$ = $1 | $2; }
;

member_modifier:
      T_PUBLIC                                              { $$ = Stmt\Class_::MODIFIER_PUBLIC; }
    | T_PROTECTED                                           { $$ = Stmt\Class_::MODIFIER_PROTECTED; }
    | T_PRIVATE                                             { $$ = Stmt\Class_::MODIFIER_PRIVATE; }
    | T_STATIC                                              { $$ = Stmt\Class_::MODIFIER_STATIC; }
    | T_ABSTRACT                                            { $$ = Stmt\Class_::MODIFIER_ABSTRACT; }
    | T_FINAL                                               { $$ = Stmt\Class_::MODIFIER_FINAL; }
    | T_READONLY                                            { $$ = Stmt\Class_::MODIFIER_READONLY; }
;

property_declaration_list:
      non_empty_property_declaration_list no_comma          { $$ = $1; }
;

non_empty_property_declaration_list:
      property_declaration                                  { init($1); }
    | non_empty_property_declaration_list ',' property_declaration
          { push($1, $3); }
;

property_decl_name:
      T_VARIABLE                                            { $$ = Node\VarLikeIdentifier[parseVar($1)]; }
;

property_declaration:
      property_decl_name                                    { $$ = Stmt\PropertyProperty[$1, null]; }
    | property_decl_name '=' expr                           { $$ = Stmt\PropertyProperty[$1, $3]; }
;

expr_list_forbid_comma:
      non_empty_expr_list no_comma                          { $$ = $1; }
;

expr_list_allow_comma:
      non_empty_expr_list optional_comma                    { $$ = $1; }
;

non_empty_expr_list:
      non_empty_expr_list ',' expr                          { push($1, $3); }
    | expr                                                  { init($1); }
;

for_expr:
      /* empty */                                           { $$ = array(); }
    | expr_list_forbid_comma                                { $$ = $1; }
;

expr:
      variable                                              { $$ = $1; }
    | list_expr '=' expr                                    { $$ = Expr\Assign[$1, $3]; }
    | array_short_syntax '=' expr                           { $$ = Expr\Assign[$1, $3]; }
    | variable '=' expr                                     { $$ = Expr\Assign[$1, $3]; }
    | variable '=' ampersand variable                       { $$ = Expr\AssignRef[$1, $4]; }
    | new_expr                                              { $$ = $1; }
    | match                                                 { $$ = $1; }
    | T_CLONE expr                                          { $$ = Expr\Clone_[$2]; }
    | variable T_PLUS_EQUAL expr                            { $$ = Expr\AssignOp\Plus      [$1, $3]; }
    | variable T_MINUS_EQUAL expr                           { $$ = Expr\AssignOp\Minus     [$1, $3]; }
    | variable T_MUL_EQUAL expr                             { $$ = Expr\AssignOp\Mul       [$1, $3]; }
    | variable T_DIV_EQUAL expr                             { $$ = Expr\AssignOp\Div       [$1, $3]; }
    | variable T_CONCAT_EQUAL expr                          { $$ = Expr\AssignOp\Concat    [$1, $3]; }
    | variable T_MOD_EQUAL expr                             { $$ = Expr\AssignOp\Mod       [$1, $3]; }
    | variable T_AND_EQUAL expr                             { $$ = Expr\AssignOp\BitwiseAnd[$1, $3]; }
    | variable T_OR_EQUAL expr                              { $$ = Expr\AssignOp\BitwiseOr [$1, $3]; }
    | variable T_XOR_EQUAL expr                             { $$ = Expr\AssignOp\BitwiseXor[$1, $3]; }
    | variable T_SL_EQUAL expr                              { $$ = Expr\AssignOp\ShiftLeft [$1, $3]; }
    | variable T_SR_EQUAL expr                              { $$ = Expr\AssignOp\ShiftRight[$1, $3]; }
    | variable T_POW_EQUAL expr                             { $$ = Expr\AssignOp\Pow       [$1, $3]; }
    | variable T_COALESCE_EQUAL expr                        { $$ = Expr\AssignOp\Coalesce  [$1, $3]; }
    | variable T_INC                                        { $$ = Expr\PostInc[$1]; }
    | T_INC variable                                        { $$ = Expr\PreInc [$2]; }
    | variable T_DEC                                        { $$ = Expr\PostDec[$1]; }
    | T_DEC variable                                        { $$ = Expr\PreDec [$2]; }
    | expr T_BOOLEAN_OR expr                                { $$ = Expr\BinaryOp\BooleanOr [$1, $3]; }
    | expr T_BOOLEAN_AND expr                               { $$ = Expr\BinaryOp\BooleanAnd[$1, $3]; }
    | expr T_LOGICAL_OR expr                                { $$ = Expr\BinaryOp\LogicalOr [$1, $3]; }
    | expr T_LOGICAL_AND expr                               { $$ = Expr\BinaryOp\LogicalAnd[$1, $3]; }
    | expr T_LOGICAL_XOR expr                               { $$ = Expr\BinaryOp\LogicalXor[$1, $3]; }
    | expr '|' expr                                         { $$ = Expr\BinaryOp\BitwiseOr [$1, $3]; }
    | expr T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG expr   { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; }
    | expr T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG expr       { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; }
    | expr '^' expr                                         { $$ = Expr\BinaryOp\BitwiseXor[$1, $3]; }
    | expr '.' expr                                         { $$ = Expr\BinaryOp\Concat    [$1, $3]; }
    | expr '+' expr                                         { $$ = Expr\BinaryOp\Plus      [$1, $3]; }
    | expr '-' expr                                         { $$ = Expr\BinaryOp\Minus     [$1, $3]; }
    | expr '*' expr                                         { $$ = Expr\BinaryOp\Mul       [$1, $3]; }
    | expr '/' expr                                         { $$ = Expr\BinaryOp\Div       [$1, $3]; }
    | expr '%' expr                                         { $$ = Expr\BinaryOp\Mod       [$1, $3]; }
    | expr T_SL expr                                        { $$ = Expr\BinaryOp\ShiftLeft [$1, $3]; }
    | expr T_SR expr                                        { $$ = Expr\BinaryOp\ShiftRight[$1, $3]; }
    | expr T_POW expr                                       { $$ = Expr\BinaryOp\Pow       [$1, $3]; }
    | '+' expr %prec T_INC                                  { $$ = Expr\UnaryPlus [$2]; }
    | '-' expr %prec T_INC                                  { $$ = Expr\UnaryMinus[$2]; }
    | '!' expr                                              { $$ = Expr\BooleanNot[$2]; }
    | '~' expr                                              { $$ = Expr\BitwiseNot[$2]; }
    | expr T_IS_IDENTICAL expr                              { $$ = Expr\BinaryOp\Identical     [$1, $3]; }
    | expr T_IS_NOT_IDENTICAL expr                          { $$ = Expr\BinaryOp\NotIdentical  [$1, $3]; }
    | expr T_IS_EQUAL expr                                  { $$ = Expr\BinaryOp\Equal         [$1, $3]; }
    | expr T_IS_NOT_EQUAL expr                              { $$ = Expr\BinaryOp\NotEqual      [$1, $3]; }
    | expr T_SPACESHIP expr                                 { $$ = Expr\BinaryOp\Spaceship     [$1, $3]; }
    | expr '<' expr                                         { $$ = Expr\BinaryOp\Smaller       [$1, $3]; }
    | expr T_IS_SMALLER_OR_EQUAL expr                       { $$ = Expr\BinaryOp\SmallerOrEqual[$1, $3]; }
    | expr '>' expr                                         { $$ = Expr\BinaryOp\Greater       [$1, $3]; }
    | expr T_IS_GREATER_OR_EQUAL expr                       { $$ = Expr\BinaryOp\GreaterOrEqual[$1, $3]; }
    | expr T_INSTANCEOF class_name_reference                { $$ = Expr\Instanceof_[$1, $3]; }
    | '(' expr ')'                                          { $$ = $2; }
    | expr '?' expr ':' expr                                { $$ = Expr\Ternary[$1, $3,   $5]; }
    | expr '?' ':' expr                                     { $$ = Expr\Ternary[$1, null, $4]; }
    | expr T_COALESCE expr                                  { $$ = Expr\BinaryOp\Coalesce[$1, $3]; }
    | T_ISSET '(' expr_list_allow_comma ')'                 { $$ = Expr\Isset_[$3]; }
    | T_EMPTY '(' expr ')'                                  { $$ = Expr\Empty_[$3]; }
    | T_INCLUDE expr                                        { $$ = Expr\Include_[$2, Expr\Include_::TYPE_INCLUDE]; }
    | T_INCLUDE_ONCE expr                                   { $$ = Expr\Include_[$2, Expr\Include_::TYPE_INCLUDE_ONCE]; }
    | T_EVAL '(' expr ')'                                   { $$ = Expr\Eval_[$3]; }
    | T_REQUIRE expr                                        { $$ = Expr\Include_[$2, Expr\Include_::TYPE_REQUIRE]; }
    | T_REQUIRE_ONCE expr                                   { $$ = Expr\Include_[$2, Expr\Include_::TYPE_REQUIRE_ONCE]; }
    | T_INT_CAST expr                                       { $$ = Expr\Cast\Int_    [$2]; }
    | T_DOUBLE_CAST expr
          { $attrs = attributes();
            $attrs['kind'] = $this->getFloatCastKind($1);
            $$ = new Expr\Cast\Double($2, $attrs); }
    | T_STRING_CAST expr                                    { $$ = Expr\Cast\String_ [$2]; }
    | T_ARRAY_CAST expr                                     { $$ = Expr\Cast\Array_  [$2]; }
    | T_OBJECT_CAST expr                                    { $$ = Expr\Cast\Object_ [$2]; }
    | T_BOOL_CAST expr                                      { $$ = Expr\Cast\Bool_   [$2]; }
    | T_UNSET_CAST expr                                     { $$ = Expr\Cast\Unset_  [$2]; }
    | T_EXIT exit_expr
          { $attrs = attributes();
            $attrs['kind'] = strtolower($1) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE;
            $$ = new Expr\Exit_($2, $attrs); }
    | '@' expr                                              { $$ = Expr\ErrorSuppress[$2]; }
    | scalar                                                { $$ = $1; }
    | '`' backticks_expr '`'                                { $$ = Expr\ShellExec[$2]; }
    | T_PRINT expr                                          { $$ = Expr\Print_[$2]; }
    | T_YIELD                                               { $$ = Expr\Yield_[null, null]; }
    | T_YIELD expr                                          { $$ = Expr\Yield_[$2, null]; }
    | T_YIELD expr T_DOUBLE_ARROW expr                      { $$ = Expr\Yield_[$4, $2]; }
    | T_YIELD_FROM expr                                     { $$ = Expr\YieldFrom[$2]; }
    | T_THROW expr                                          { $$ = Expr\Throw_[$2]; }

    | T_FN optional_ref '(' parameter_list ')' optional_return_type T_DOUBLE_ARROW expr %prec T_THROW
          { $$ = Expr\ArrowFunction[['static' => false, 'byRef' => $2, 'params' => $4, 'returnType' => $6, 'expr' => $8, 'attrGroups' => []]]; }
    | T_STATIC T_FN optional_ref '(' parameter_list ')' optional_return_type T_DOUBLE_ARROW expr %prec T_THROW
          { $$ = Expr\ArrowFunction[['static' => true, 'byRef' => $3, 'params' => $5, 'returnType' => $7, 'expr' => $9, 'attrGroups' => []]]; }
    | T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type block_or_error
          { $$ = Expr\Closure[['static' => false, 'byRef' => $2, 'params' => $4, 'uses' => $6, 'returnType' => $7, 'stmts' => $8, 'attrGroups' => []]]; }
    | T_STATIC T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type       block_or_error
          { $$ = Expr\Closure[['static' => true, 'byRef' => $3, 'params' => $5, 'uses' => $7, 'returnType' => $8, 'stmts' => $9, 'attrGroups' => []]]; }

    | attributes T_FN optional_ref '(' parameter_list ')' optional_return_type T_DOUBLE_ARROW expr %prec T_THROW
          { $$ = Expr\ArrowFunction[['static' => false, 'byRef' => $3, 'params' => $5, 'returnType' => $7, 'expr' => $9, 'attrGroups' => $1]]; }
    | attributes T_STATIC T_FN optional_ref '(' parameter_list ')' optional_return_type T_DOUBLE_ARROW expr %prec T_THROW
          { $$ = Expr\ArrowFunction[['static' => true, 'byRef' => $4, 'params' => $6, 'returnType' => $8, 'expr' => $10, 'attrGroups' => $1]]; }
    | attributes T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type block_or_error
          { $$ = Expr\Closure[['static' => false, 'byRef' => $3, 'params' => $5, 'uses' => $7, 'returnType' => $8, 'stmts' => $9, 'attrGroups' => $1]]; }
    | attributes T_STATIC T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type       block_or_error
          { $$ = Expr\Closure[['static' => true, 'byRef' => $4, 'params' => $6, 'uses' => $8, 'returnType' => $9, 'stmts' => $10, 'attrGroups' => $1]]; }
;

anonymous_class:
      optional_attributes T_CLASS ctor_arguments extends_from implements_list '{' class_statement_list '}'
          { $$ = array(Stmt\Class_[null, ['type' => 0, 'extends' => $4, 'implements' => $5, 'stmts' => $7, 'attrGroups' => $1]], $3);
            $this->checkClass($$[0], -1); }
;

new_expr:
      T_NEW class_name_reference ctor_arguments             { $$ = Expr\New_[$2, $3]; }
    | T_NEW anonymous_class
          { list($class, $ctorArgs) = $2; $$ = Expr\New_[$class, $ctorArgs]; }
;

lexical_vars:
      /* empty */                                           { $$ = array(); }
    | T_USE '(' lexical_var_list ')'                        { $$ = $3; }
;

lexical_var_list:
      non_empty_lexical_var_list optional_comma             { $$ = $1; }
;

non_empty_lexical_var_list:
      lexical_var                                           { init($1); }
    | non_empty_lexical_var_list ',' lexical_var            { push($1, $3); }
;

lexical_var:
      optional_ref plain_variable                           { $$ = Expr\ClosureUse[$2, $1]; }
;

name_readonly:
      T_READONLY                                            { $$ = Name[$1]; }
;

function_call:
      name argument_list                                    { $$ = Expr\FuncCall[$1, $2]; }
    | name_readonly argument_list                           { $$ = Expr\FuncCall[$1, $2]; }
    | callable_expr argument_list                           { $$ = Expr\FuncCall[$1, $2]; }
    | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM member_name argument_list
          { $$ = Expr\StaticCall[$1, $3, $4]; }
;

class_name:
      T_STATIC                                              { $$ = Name[$1]; }
    | name                                                  { $$ = $1; }
;

name:
      T_STRING                                              { $$ = Name[$1]; }
    | T_NAME_QUALIFIED                                      { $$ = Name[$1]; }
    | T_NAME_FULLY_QUALIFIED                                { $$ = Name\FullyQualified[substr($1, 1)]; }
    | T_NAME_RELATIVE                                       { $$ = Name\Relative[substr($1, 10)]; }
;

class_name_reference:
      class_name                                            { $$ = $1; }
    | new_variable                                          { $$ = $1; }
    | '(' expr ')'                                          { $$ = $2; }
    | error                                                 { $$ = Expr\Error[]; $this->errorState = 2; }
;

class_name_or_var:
      class_name                                            { $$ = $1; }
    | fully_dereferencable                                  { $$ = $1; }
;

exit_expr:
      /* empty */                                           { $$ = null; }
    | '(' optional_expr ')'                                 { $$ = $2; }
;

backticks_expr:
      /* empty */                                           { $$ = array(); }
    | T_ENCAPSED_AND_WHITESPACE
          { $$ = array(Scalar\EncapsedStringPart[Scalar\String_::parseEscapeSequences($1, '`')]); }
    | encaps_list                                           { parseEncapsed($1, '`', true); $$ = $1; }
;

ctor_arguments:
      /* empty */                                           { $$ = array(); }
    | argument_list                                         { $$ = $1; }
;

constant:
      name                                                  { $$ = Expr\ConstFetch[$1]; }
    | T_LINE                                                { $$ = Scalar\MagicConst\Line[]; }
    | T_FILE                                                { $$ = Scalar\MagicConst\File[]; }
    | T_DIR                                                 { $$ = Scalar\MagicConst\Dir[]; }
    | T_CLASS_C                                             { $$ = Scalar\MagicConst\Class_[]; }
    | T_TRAIT_C                                             { $$ = Scalar\MagicConst\Trait_[]; }
    | T_METHOD_C                                            { $$ = Scalar\MagicConst\Method[]; }
    | T_FUNC_C                                              { $$ = Scalar\MagicConst\Function_[]; }
    | T_NS_C                                                { $$ = Scalar\MagicConst\Namespace_[]; }
;

class_constant:
      class_name_or_var T_PAAMAYIM_NEKUDOTAYIM identifier_maybe_reserved
          { $$ = Expr\ClassConstFetch[$1, $3]; }
    /* We interpret an isolated FOO:: as an unfinished class constant fetch. It could also be
       an unfinished static property fetch or unfinished scoped call. */
    | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM error
          { $$ = Expr\ClassConstFetch[$1, new Expr\Error(stackAttributes(#3))]; $this->errorState = 2; }
;

array_short_syntax:
      '[' array_pair_list ']'
          { $attrs = attributes(); $attrs['kind'] = Expr\Array_::KIND_SHORT;
            $$ = new Expr\Array_($2, $attrs); }
;

dereferencable_scalar:
      T_ARRAY '(' array_pair_list ')'
          { $attrs = attributes(); $attrs['kind'] = Expr\Array_::KIND_LONG;
            $$ = new Expr\Array_($3, $attrs); }
    | array_short_syntax                                    { $$ = $1; }
    | T_CONSTANT_ENCAPSED_STRING                            { $$ = Scalar\String_::fromString($1, attributes()); }
    | '"' encaps_list '"'
          { $attrs = attributes(); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED;
            parseEncapsed($2, '"', true); $$ = new Scalar\Encapsed($2, $attrs); }
;

scalar:
      T_LNUMBER                                             { $$ = $this->parseLNumber($1, attributes()); }
    | T_DNUMBER                                             { $$ = Scalar\DNumber::fromString($1, attributes()); }
    | dereferencable_scalar                                 { $$ = $1; }
    | constant                                              { $$ = $1; }
    | class_constant                                        { $$ = $1; }
    | T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC
          { $$ = $this->parseDocString($1, $2, $3, attributes(), stackAttributes(#3), true); }
    | T_START_HEREDOC T_END_HEREDOC
          { $$ = $this->parseDocString($1, '', $2, attributes(), stackAttributes(#2), true); }
    | T_START_HEREDOC encaps_list T_END_HEREDOC
          { $$ = $this->parseDocString($1, $2, $3, attributes(), stackAttributes(#3), true); }
;

optional_expr:
      /* empty */                                           { $$ = null; }
    | expr                                                  { $$ = $1; }
;

fully_dereferencable:
      variable                                              { $$ = $1; }
    | '(' expr ')'                                          { $$ = $2; }
    | dereferencable_scalar                                 { $$ = $1; }
    | class_constant                                        { $$ = $1; }
;

array_object_dereferencable:
      fully_dereferencable                                  { $$ = $1; }
    | constant                                              { $$ = $1; }
;

callable_expr:
      callable_variable                                     { $$ = $1; }
    | '(' expr ')'                                          { $$ = $2; }
    | dereferencable_scalar                                 { $$ = $1; }
;

callable_variable:
      simple_variable                                       { $$ = $1; }
    | array_object_dereferencable '[' optional_expr ']'     { $$ = Expr\ArrayDimFetch[$1, $3]; }
    | array_object_dereferencable '{' expr '}'              { $$ = Expr\ArrayDimFetch[$1, $3]; }
    | function_call                                         { $$ = $1; }
    | array_object_dereferencable T_OBJECT_OPERATOR property_name argument_list
          { $$ = Expr\MethodCall[$1, $3, $4]; }
    | array_object_dereferencable T_NULLSAFE_OBJECT_OPERATOR property_name argument_list
          { $$ = Expr\NullsafeMethodCall[$1, $3, $4]; }
;

optional_plain_variable:
      /* empty */                                           { $$ = null; }
    | plain_variable                                        { $$ = $1; }
;

variable:
      callable_variable                                     { $$ = $1; }
    | static_member                                         { $$ = $1; }
    | array_object_dereferencable T_OBJECT_OPERATOR property_name
          { $$ = Expr\PropertyFetch[$1, $3]; }
    | array_object_dereferencable T_NULLSAFE_OBJECT_OPERATOR property_name
          { $$ = Expr\NullsafePropertyFetch[$1, $3]; }
;

simple_variable:
      plain_variable                                        { $$ = $1; }
    | '$' '{' expr '}'                                      { $$ = Expr\Variable[$3]; }
    | '$' simple_variable                                   { $$ = Expr\Variable[$2]; }
    | '$' error                                             { $$ = Expr\Variable[Expr\Error[]]; $this->errorState = 2; }
;

static_member_prop_name:
      simple_variable
          { $var = $1->name; $$ = \is_string($var) ? Node\VarLikeIdentifier[$var] : $var; }
;

static_member:
      class_name_or_var T_PAAMAYIM_NEKUDOTAYIM static_member_prop_name
          { $$ = Expr\StaticPropertyFetch[$1, $3]; }
;

new_variable:
      simple_variable                                       { $$ = $1; }
    | new_variable '[' optional_expr ']'                    { $$ = Expr\ArrayDimFetch[$1, $3]; }
    | new_variable '{' expr '}'                             { $$ = Expr\ArrayDimFetch[$1, $3]; }
    | new_variable T_OBJECT_OPERATOR property_name          { $$ = Expr\PropertyFetch[$1, $3]; }
    | new_variable T_NULLSAFE_OBJECT_OPERATOR property_name { $$ = Expr\NullsafePropertyFetch[$1, $3]; }
    | class_name T_PAAMAYIM_NEKUDOTAYIM static_member_prop_name
          { $$ = Expr\StaticPropertyFetch[$1, $3]; }
    | new_variable T_PAAMAYIM_NEKUDOTAYIM static_member_prop_name
          { $$ = Expr\StaticPropertyFetch[$1, $3]; }
;

member_name:
      identifier_maybe_reserved                             { $$ = $1; }
    | '{' expr '}'                                          { $$ = $2; }
    | simple_variable                                       { $$ = $1; }
;

property_name:
      identifier_not_reserved                               { $$ = $1; }
    | '{' expr '}'                                          { $$ = $2; }
    | simple_variable                                       { $$ = $1; }
    | error                                                 { $$ = Expr\Error[]; $this->errorState = 2; }
;

list_expr:
      T_LIST '(' inner_array_pair_list ')'                  { $$ = Expr\List_[$3]; }
;

array_pair_list:
      inner_array_pair_list
          { $$ = $1; $end = count($$)-1; if ($$[$end] === null) array_pop($$); }
;

comma_or_error:
      ','
    | error
          { /* do nothing -- prevent default action of $$=$1. See #551. */ }
;

inner_array_pair_list:
      inner_array_pair_list comma_or_error array_pair       { push($1, $3); }
    | array_pair                                            { init($1); }
;

array_pair:
      expr                                                  { $$ = Expr\ArrayItem[$1, null, false]; }
    | ampersand variable                                    { $$ = Expr\ArrayItem[$2, null, true]; }
    | list_expr                                             { $$ = Expr\ArrayItem[$1, null, false]; }
    | expr T_DOUBLE_ARROW expr                              { $$ = Expr\ArrayItem[$3, $1,   false]; }
    | expr T_DOUBLE_ARROW ampersand variable                { $$ = Expr\ArrayItem[$4, $1,   true]; }
    | expr T_DOUBLE_ARROW list_expr                         { $$ = Expr\ArrayItem[$3, $1,   false]; }
    | T_ELLIPSIS expr                                       { $$ = Expr\ArrayItem[$2, null, false, attributes(), true]; }
    | /* empty */                                           { $$ = null; }
;

encaps_list:
      encaps_list encaps_var                                { push($1, $2); }
    | encaps_list encaps_string_part                        { push($1, $2); }
    | encaps_var                                            { init($1); }
    | encaps_string_part encaps_var                         { init($1, $2); }
;

encaps_string_part:
      T_ENCAPSED_AND_WHITESPACE                             { $$ = Scalar\EncapsedStringPart[$1]; }
;

encaps_str_varname:
      T_STRING_VARNAME                                      { $$ = Expr\Variable[$1]; }
;

encaps_var:
      plain_variable                                        { $$ = $1; }
    | plain_variable '[' encaps_var_offset ']'              { $$ = Expr\ArrayDimFetch[$1, $3]; }
    | plain_variable T_OBJECT_OPERATOR identifier_not_reserved
          { $$ = Expr\PropertyFetch[$1, $3]; }
    | plain_variable T_NULLSAFE_OBJECT_OPERATOR identifier_not_reserved
          { $$ = Expr\NullsafePropertyFetch[$1, $3]; }
    | T_DOLLAR_OPEN_CURLY_BRACES expr '}'                   { $$ = Expr\Variable[$2]; }
    | T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '}'       { $$ = Expr\Variable[$2]; }
    | T_DOLLAR_OPEN_CURLY_BRACES encaps_str_varname '[' expr ']' '}'
          { $$ = Expr\ArrayDimFetch[$2, $4]; }
    | T_CURLY_OPEN variable '}'                             { $$ = $2; }
;

encaps_var_offset:
      T_STRING                                              { $$ = Scalar\String_[$1]; }
    | T_NUM_STRING                                          { $$ = $this->parseNumString($1, attributes()); }
    | '-' T_NUM_STRING                                      { $$ = $this->parseNumString('-' . $2, attributes()); }
    | plain_variable                                        { $$ = $1; }
;

%%
<?php

namespace _PHPStan_dcc7b7cff;

///////////////////////////////
/// Utility regex constants ///
///////////////////////////////
const LIB = '(?(DEFINE)
    (?<singleQuotedString>\'[^\\\\\']*+(?:\\\\.[^\\\\\']*+)*+\')
    (?<doubleQuotedString>"[^\\\\"]*+(?:\\\\.[^\\\\"]*+)*+")
    (?<string>(?&singleQuotedString)|(?&doubleQuotedString))
    (?<comment>/\\*[^*]*+(?:\\*(?!/)[^*]*+)*+\\*/)
    (?<code>\\{[^\'"/{}]*+(?:(?:(?&string)|(?&comment)|(?&code)|/)[^\'"/{}]*+)*+})
)';
const PARAMS = '\\[(?<params>[^[\\]]*+(?:\\[(?&params)\\][^[\\]]*+)*+)\\]';
const ARGS = '\\((?<args>[^()]*+(?:\\((?&args)\\)[^()]*+)*+)\\)';
///////////////////////////////
/// Preprocessing functions ///
///////////////////////////////
function preprocessGrammar($code)
{
    $code = resolveNodes($code);
    $code = resolveMacros($code);
    $code = resolveStackAccess($code);
    return $code;
}
function resolveNodes($code)
{
    return \preg_replace_callback('~\\b(?<name>[A-Z][a-zA-Z_\\\\]++)\\s*' . \_PHPStan_dcc7b7cff\PARAMS . '~', function ($matches) {
        // recurse
        $matches['params'] = resolveNodes($matches['params']);
        $params = magicSplit('(?:' . \_PHPStan_dcc7b7cff\PARAMS . '|' . \_PHPStan_dcc7b7cff\ARGS . ')(*SKIP)(*FAIL)|,', $matches['params']);
        $paramCode = '';
        foreach ($params as $param) {
            $paramCode .= $param . ', ';
        }
        return 'new ' . $matches['name'] . '(' . $paramCode . 'attributes())';
    }, $code);
}
function resolveMacros($code)
{
    return \preg_replace_callback('~\\b(?<!::|->)(?!array\\()(?<name>[a-z][A-Za-z]++)' . \_PHPStan_dcc7b7cff\ARGS . '~', function ($matches) {
        // recurse
        $matches['args'] = resolveMacros($matches['args']);
        $name = $matches['name'];
        $args = magicSplit('(?:' . \_PHPStan_dcc7b7cff\PARAMS . '|' . \_PHPStan_dcc7b7cff\ARGS . ')(*SKIP)(*FAIL)|,', $matches['args']);
        if ('attributes' === $name) {
            assertArgs(0, $args, $name);
            return '$this->startAttributeStack[#1] + $this->endAttributes';
        }
        if ('stackAttributes' === $name) {
            assertArgs(1, $args, $name);
            return '$this->startAttributeStack[' . $args[0] . ']' . ' + $this->endAttributeStack[' . $args[0] . ']';
        }
        if ('init' === $name) {
            return '$$ = array(' . \implode(', ', $args) . ')';
        }
        if ('push' === $name) {
            assertArgs(2, $args, $name);
            return $args[0] . '[] = ' . $args[1] . '; $$ = ' . $args[0];
        }
        if ('pushNormalizing' === $name) {
            assertArgs(2, $args, $name);
            return 'if (is_array(' . $args[1] . ')) { $$ = array_merge(' . $args[0] . ', ' . $args[1] . '); }' . ' else { ' . $args[0] . '[] = ' . $args[1] . '; $$ = ' . $args[0] . '; }';
        }
        if ('toArray' == $name) {
            assertArgs(1, $args, $name);
            return 'is_array(' . $args[0] . ') ? ' . $args[0] . ' : array(' . $args[0] . ')';
        }
        if ('parseVar' === $name) {
            assertArgs(1, $args, $name);
            return 'substr(' . $args[0] . ', 1)';
        }
        if ('parseEncapsed' === $name) {
            assertArgs(3, $args, $name);
            return 'foreach (' . $args[0] . ' as $s) { if ($s instanceof Node\\Scalar\\EncapsedStringPart) {' . ' $s->value = Node\\Scalar\\String_::parseEscapeSequences($s->value, ' . $args[1] . ', ' . $args[2] . '); } }';
        }
        if ('makeNop' === $name) {
            assertArgs(3, $args, $name);
            return '$startAttributes = ' . $args[1] . ';' . ' if (isset($startAttributes[\'comments\']))' . ' { ' . $args[0] . ' = new Stmt\\Nop($startAttributes + ' . $args[2] . '); }' . ' else { ' . $args[0] . ' = null; }';
        }
        if ('makeZeroLengthNop' == $name) {
            assertArgs(2, $args, $name);
            return '$startAttributes = ' . $args[1] . ';' . ' if (isset($startAttributes[\'comments\']))' . ' { ' . $args[0] . ' = new Stmt\\Nop($this->createCommentNopAttributes($startAttributes[\'comments\'])); }' . ' else { ' . $args[0] . ' = null; }';
        }
        if ('prependLeadingComments' === $name) {
            assertArgs(1, $args, $name);
            return '$attrs = $this->startAttributeStack[#1]; $stmts = ' . $args[0] . '; ' . 'if (!empty($attrs[\'comments\'])) {' . '$stmts[0]->setAttribute(\'comments\', ' . 'array_merge($attrs[\'comments\'], $stmts[0]->getAttribute(\'comments\', []))); }';
        }
        return $matches[0];
    }, $code);
}
function assertArgs($num, $args, $name)
{
    if ($num != \count($args)) {
        die('Wrong argument count for ' . $name . '().');
    }
}
function resolveStackAccess($code)
{
    $code = \preg_replace('/\\$\\d+/', '$this->semStack[$0]', $code);
    $code = \preg_replace('/#(\\d+)/', '$$1', $code);
    return $code;
}
function removeTrailingWhitespace($code)
{
    $lines = \explode("\n", $code);
    $lines = \array_map('rtrim', $lines);
    return \implode("\n", $lines);
}
//////////////////////////////
/// Regex helper functions ///
//////////////////////////////
function regex($regex)
{
    return '~' . \_PHPStan_dcc7b7cff\LIB . '(?:' . \str_replace('~', '\\~', $regex) . ')~';
}
function magicSplit($regex, $string)
{
    $pieces = \preg_split(regex('(?:(?&string)|(?&comment)|(?&code))(*SKIP)(*FAIL)|' . $regex), $string);
    foreach ($pieces as &$piece) {
        $piece = \trim($piece);
    }
    if ($pieces === ['']) {
        return [];
    }
    return $pieces;
}
<?php
$meta #
#semval($) $this->semValue
#semval($,%t) $this->semValue
#semval(%n) $this->stackPos-(%l-%n)
#semval(%n,%t) $this->stackPos-(%l-%n)

namespace PhpParser\Parser;
#include;

/* GENERATED file based on grammar/tokens.y */
final class Tokens
{
#tokenval
    const %s = %n;
#endtokenval
}
%pure_parser
%expect 6

%tokens

%%

start:
    top_statement_list                                      { $$ = $this->handleNamespaces($1); }
;

top_statement_list_ex:
      top_statement_list_ex top_statement                   { pushNormalizing($1, $2); }
    | /* empty */                                           { init(); }
;

top_statement_list:
      top_statement_list_ex
          { makeZeroLengthNop($nop, $this->lookaheadStartAttributes);
            if ($nop !== null) { $1[] = $nop; } $$ = $1; }
;

ampersand:
      T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG
    | T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG
;

reserved_non_modifiers:
      T_INCLUDE | T_INCLUDE_ONCE | T_EVAL | T_REQUIRE | T_REQUIRE_ONCE | T_LOGICAL_OR | T_LOGICAL_XOR | T_LOGICAL_AND
    | T_INSTANCEOF | T_NEW | T_CLONE | T_EXIT | T_IF | T_ELSEIF | T_ELSE | T_ENDIF | T_ECHO | T_DO | T_WHILE
    | T_ENDWHILE | T_FOR | T_ENDFOR | T_FOREACH | T_ENDFOREACH | T_DECLARE | T_ENDDECLARE | T_AS | T_TRY | T_CATCH
    | T_FINALLY | T_THROW | T_USE | T_INSTEADOF | T_GLOBAL | T_VAR | T_UNSET | T_ISSET | T_EMPTY | T_CONTINUE | T_GOTO
    | T_FUNCTION | T_CONST | T_RETURN | T_PRINT | T_YIELD | T_LIST | T_SWITCH | T_ENDSWITCH | T_CASE | T_DEFAULT
    | T_BREAK | T_ARRAY | T_CALLABLE | T_EXTENDS | T_IMPLEMENTS | T_NAMESPACE | T_TRAIT | T_INTERFACE | T_CLASS
    | T_CLASS_C | T_TRAIT_C | T_FUNC_C | T_METHOD_C | T_LINE | T_FILE | T_DIR | T_NS_C | T_HALT_COMPILER | T_FN
    | T_MATCH
;

semi_reserved:
      reserved_non_modifiers
    | T_STATIC | T_ABSTRACT | T_FINAL | T_PRIVATE | T_PROTECTED | T_PUBLIC
;

identifier_ex:
      T_STRING                                              { $$ = Node\Identifier[$1]; }
    | semi_reserved                                         { $$ = Node\Identifier[$1]; }
;

identifier:
      T_STRING                                              { $$ = Node\Identifier[$1]; }
;

reserved_non_modifiers_identifier:
      reserved_non_modifiers                                { $$ = Node\Identifier[$1]; }
;

namespace_name:
      T_STRING                                              { $$ = Name[$1]; }
    | T_NAME_QUALIFIED                                      { $$ = Name[$1]; }
;

legacy_namespace_name:
      namespace_name                                        { $$ = $1; }
    | T_NAME_FULLY_QUALIFIED                                { $$ = Name[substr($1, 1)]; }
;

plain_variable:
      T_VARIABLE                                            { $$ = Expr\Variable[parseVar($1)]; }
;

top_statement:
      statement                                             { $$ = $1; }
    | function_declaration_statement                        { $$ = $1; }
    | class_declaration_statement                           { $$ = $1; }
    | T_HALT_COMPILER
          { $$ = Stmt\HaltCompiler[$this->lexer->handleHaltCompiler()]; }
    | T_NAMESPACE namespace_name ';'
          { $$ = Stmt\Namespace_[$2, null];
            $$->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON);
            $this->checkNamespace($$); }
    | T_NAMESPACE namespace_name '{' top_statement_list '}'
          { $$ = Stmt\Namespace_[$2, $4];
            $$->setAttribute('kind', Stmt\Namespace_::KIND_BRACED);
            $this->checkNamespace($$); }
    | T_NAMESPACE '{' top_statement_list '}'
          { $$ = Stmt\Namespace_[null, $3];
            $$->setAttribute('kind', Stmt\Namespace_::KIND_BRACED);
            $this->checkNamespace($$); }
    | T_USE use_declarations ';'                            { $$ = Stmt\Use_[$2, Stmt\Use_::TYPE_NORMAL]; }
    | T_USE use_type use_declarations ';'                   { $$ = Stmt\Use_[$3, $2]; }
    | group_use_declaration ';'                             { $$ = $1; }
    | T_CONST constant_declaration_list ';'                 { $$ = Stmt\Const_[$2]; }
;

use_type:
      T_FUNCTION                                            { $$ = Stmt\Use_::TYPE_FUNCTION; }
    | T_CONST                                               { $$ = Stmt\Use_::TYPE_CONSTANT; }
;

group_use_declaration:
      T_USE use_type legacy_namespace_name T_NS_SEPARATOR '{' unprefixed_use_declarations '}'
          { $$ = Stmt\GroupUse[$3, $6, $2]; }
    | T_USE legacy_namespace_name T_NS_SEPARATOR '{' inline_use_declarations '}'
          { $$ = Stmt\GroupUse[$2, $5, Stmt\Use_::TYPE_UNKNOWN]; }
;

unprefixed_use_declarations:
      unprefixed_use_declarations ',' unprefixed_use_declaration
          { push($1, $3); }
    | unprefixed_use_declaration                            { init($1); }
;

use_declarations:
      use_declarations ',' use_declaration                  { push($1, $3); }
    | use_declaration                                       { init($1); }
;

inline_use_declarations:
      inline_use_declarations ',' inline_use_declaration    { push($1, $3); }
    | inline_use_declaration                                { init($1); }
;

unprefixed_use_declaration:
      namespace_name
          { $$ = Stmt\UseUse[$1, null, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #1); }
    | namespace_name T_AS identifier
          { $$ = Stmt\UseUse[$1, $3, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #3); }
;

use_declaration:
      legacy_namespace_name
          { $$ = Stmt\UseUse[$1, null, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #1); }
    | legacy_namespace_name T_AS identifier
          { $$ = Stmt\UseUse[$1, $3, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #3); }
;

inline_use_declaration:
      unprefixed_use_declaration                            { $$ = $1; $$->type = Stmt\Use_::TYPE_NORMAL; }
    | use_type unprefixed_use_declaration                   { $$ = $2; $$->type = $1; }
;

constant_declaration_list:
      constant_declaration_list ',' constant_declaration    { push($1, $3); }
    | constant_declaration                                  { init($1); }
;

constant_declaration:
    identifier '=' static_scalar                            { $$ = Node\Const_[$1, $3]; }
;

class_const_list:
      class_const_list ',' class_const                      { push($1, $3); }
    | class_const                                           { init($1); }
;

class_const:
    identifier_ex '=' static_scalar                         { $$ = Node\Const_[$1, $3]; }
;

inner_statement_list_ex:
      inner_statement_list_ex inner_statement               { pushNormalizing($1, $2); }
    | /* empty */                                           { init(); }
;

inner_statement_list:
      inner_statement_list_ex
          { makeZeroLengthNop($nop, $this->lookaheadStartAttributes);
            if ($nop !== null) { $1[] = $nop; } $$ = $1; }
;

inner_statement:
      statement                                             { $$ = $1; }
    | function_declaration_statement                        { $$ = $1; }
    | class_declaration_statement                           { $$ = $1; }
    | T_HALT_COMPILER
          { throw new Error('__HALT_COMPILER() can only be used from the outermost scope', attributes()); }
;

non_empty_statement:
      '{' inner_statement_list '}'
    {
        if ($2) {
            $$ = $2; prependLeadingComments($$);
        } else {
            makeNop($$, $this->startAttributeStack[#1], $this->endAttributes);
            if (null === $$) { $$ = array(); }
        }
    }
    | T_IF parentheses_expr statement elseif_list else_single
          { $$ = Stmt\If_[$2, ['stmts' => toArray($3), 'elseifs' => $4, 'else' => $5]]; }
    | T_IF parentheses_expr ':' inner_statement_list new_elseif_list new_else_single T_ENDIF ';'
          { $$ = Stmt\If_[$2, ['stmts' => $4, 'elseifs' => $5, 'else' => $6]]; }
    | T_WHILE parentheses_expr while_statement              { $$ = Stmt\While_[$2, $3]; }
    | T_DO statement T_WHILE parentheses_expr ';'           { $$ = Stmt\Do_   [$4, toArray($2)]; }
    | T_FOR '(' for_expr ';'  for_expr ';' for_expr ')' for_statement
          { $$ = Stmt\For_[['init' => $3, 'cond' => $5, 'loop' => $7, 'stmts' => $9]]; }
    | T_SWITCH parentheses_expr switch_case_list            { $$ = Stmt\Switch_[$2, $3]; }
    | T_BREAK ';'                                           { $$ = Stmt\Break_[null]; }
    | T_BREAK expr ';'                                      { $$ = Stmt\Break_[$2]; }
    | T_CONTINUE ';'                                        { $$ = Stmt\Continue_[null]; }
    | T_CONTINUE expr ';'                                   { $$ = Stmt\Continue_[$2]; }
    | T_RETURN ';'                                          { $$ = Stmt\Return_[null]; }
    | T_RETURN expr ';'                                     { $$ = Stmt\Return_[$2]; }
    | T_GLOBAL global_var_list ';'                          { $$ = Stmt\Global_[$2]; }
    | T_STATIC static_var_list ';'                          { $$ = Stmt\Static_[$2]; }
    | T_ECHO expr_list ';'                                  { $$ = Stmt\Echo_[$2]; }
    | T_INLINE_HTML                                         { $$ = Stmt\InlineHTML[$1]; }
    | yield_expr ';'                                        { $$ = Stmt\Expression[$1]; }
    | expr ';'                                              { $$ = Stmt\Expression[$1]; }
    | T_UNSET '(' variables_list ')' ';'                    { $$ = Stmt\Unset_[$3]; }
    | T_FOREACH '(' expr T_AS foreach_variable ')' foreach_statement
          { $$ = Stmt\Foreach_[$3, $5[0], ['keyVar' => null, 'byRef' => $5[1], 'stmts' => $7]]; }
    | T_FOREACH '(' expr T_AS variable T_DOUBLE_ARROW foreach_variable ')' foreach_statement
          { $$ = Stmt\Foreach_[$3, $7[0], ['keyVar' => $5, 'byRef' => $7[1], 'stmts' => $9]]; }
    | T_DECLARE '(' declare_list ')' declare_statement      { $$ = Stmt\Declare_[$3, $5]; }
    | T_TRY '{' inner_statement_list '}' catches optional_finally
          { $$ = Stmt\TryCatch[$3, $5, $6]; $this->checkTryCatch($$); }
    | T_THROW expr ';'                                      { $$ = Stmt\Throw_[$2]; }
    | T_GOTO identifier ';'                                 { $$ = Stmt\Goto_[$2]; }
    | identifier ':'                                        { $$ = Stmt\Label[$1]; }
    | expr error                                            { $$ = Stmt\Expression[$1]; }
    | error                                                 { $$ = array(); /* means: no statement */ }
;

statement:
      non_empty_statement                                   { $$ = $1; }
    | ';'
          { makeNop($$, $this->startAttributeStack[#1], $this->endAttributes);
            if ($$ === null) $$ = array(); /* means: no statement */ }
;

catches:
      /* empty */                                           { init(); }
    | catches catch                                         { push($1, $2); }
;

catch:
    T_CATCH '(' name plain_variable ')' '{' inner_statement_list '}'
        { $$ = Stmt\Catch_[array($3), $4, $7]; }
;

optional_finally:
      /* empty */                                           { $$ = null; }
    | T_FINALLY '{' inner_statement_list '}'                { $$ = Stmt\Finally_[$3]; }
;

variables_list:
      variable                                              { init($1); }
    | variables_list ',' variable                           { push($1, $3); }
;

optional_ref:
      /* empty */                                           { $$ = false; }
    | ampersand                                             { $$ = true; }
;

optional_arg_ref:
      /* empty */                                           { $$ = false; }
    | T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG                 { $$ = true; }
;

optional_ellipsis:
      /* empty */                                           { $$ = false; }
    | T_ELLIPSIS                                            { $$ = true; }
;

identifier_maybe_readonly:
      identifier                                            { $$ = $1; }
    | T_READONLY                                            { $$ = Node\Identifier[$1]; }
;

function_declaration_statement:
    T_FUNCTION optional_ref identifier_maybe_readonly '(' parameter_list ')' optional_return_type '{' inner_statement_list '}'
        { $$ = Stmt\Function_[$3, ['byRef' => $2, 'params' => $5, 'returnType' => $7, 'stmts' => $9]]; }
;

class_declaration_statement:
      class_entry_type identifier extends_from implements_list '{' class_statement_list '}'
          { $$ = Stmt\Class_[$2, ['type' => $1, 'extends' => $3, 'implements' => $4, 'stmts' => $6]];
            $this->checkClass($$, #2); }
    | T_INTERFACE identifier interface_extends_list '{' class_statement_list '}'
          { $$ = Stmt\Interface_[$2, ['extends' => $3, 'stmts' => $5]];
            $this->checkInterface($$, #2); }
    | T_TRAIT identifier '{' class_statement_list '}'
          { $$ = Stmt\Trait_[$2, ['stmts' => $4]]; }
;

class_entry_type:
      T_CLASS                                               { $$ = 0; }
    | T_ABSTRACT T_CLASS                                    { $$ = Stmt\Class_::MODIFIER_ABSTRACT; }
    | T_FINAL T_CLASS                                       { $$ = Stmt\Class_::MODIFIER_FINAL; }
;

extends_from:
      /* empty */                                           { $$ = null; }
    | T_EXTENDS class_name                                  { $$ = $2; }
;

interface_extends_list:
      /* empty */                                           { $$ = array(); }
    | T_EXTENDS class_name_list                             { $$ = $2; }
;

implements_list:
      /* empty */                                           { $$ = array(); }
    | T_IMPLEMENTS class_name_list                          { $$ = $2; }
;

class_name_list:
      class_name                                            { init($1); }
    | class_name_list ',' class_name                        { push($1, $3); }
;

for_statement:
      statement                                             { $$ = toArray($1); }
    | ':' inner_statement_list T_ENDFOR ';'                 { $$ = $2; }
;

foreach_statement:
      statement                                             { $$ = toArray($1); }
    | ':' inner_statement_list T_ENDFOREACH ';'             { $$ = $2; }
;

declare_statement:
      non_empty_statement                                   { $$ = toArray($1); }
    | ';'                                                   { $$ = null; }
    | ':' inner_statement_list T_ENDDECLARE ';'             { $$ = $2; }
;

declare_list:
      declare_list_element                                  { init($1); }
    | declare_list ',' declare_list_element                 { push($1, $3); }
;

declare_list_element:
      identifier '=' static_scalar                          { $$ = Stmt\DeclareDeclare[$1, $3]; }
;

switch_case_list:
      '{' case_list '}'                                     { $$ = $2; }
    | '{' ';' case_list '}'                                 { $$ = $3; }
    | ':' case_list T_ENDSWITCH ';'                         { $$ = $2; }
    | ':' ';' case_list T_ENDSWITCH ';'                     { $$ = $3; }
;

case_list:
      /* empty */                                           { init(); }
    | case_list case                                        { push($1, $2); }
;

case:
      T_CASE expr case_separator inner_statement_list_ex    { $$ = Stmt\Case_[$2, $4]; }
    | T_DEFAULT case_separator inner_statement_list_ex      { $$ = Stmt\Case_[null, $3]; }
;

case_separator:
      ':'
    | ';'
;

while_statement:
      statement                                             { $$ = toArray($1); }
    | ':' inner_statement_list T_ENDWHILE ';'               { $$ = $2; }
;

elseif_list:
      /* empty */                                           { init(); }
    | elseif_list elseif                                    { push($1, $2); }
;

elseif:
      T_ELSEIF parentheses_expr statement                   { $$ = Stmt\ElseIf_[$2, toArray($3)]; }
;

new_elseif_list:
      /* empty */                                           { init(); }
    | new_elseif_list new_elseif                            { push($1, $2); }
;

new_elseif:
     T_ELSEIF parentheses_expr ':' inner_statement_list     { $$ = Stmt\ElseIf_[$2, $4]; }
;

else_single:
      /* empty */                                           { $$ = null; }
    | T_ELSE statement                                      { $$ = Stmt\Else_[toArray($2)]; }
;

new_else_single:
      /* empty */                                           { $$ = null; }
    | T_ELSE ':' inner_statement_list                       { $$ = Stmt\Else_[$3]; }
;

foreach_variable:
      variable                                              { $$ = array($1, false); }
    | ampersand variable                                    { $$ = array($2, true); }
    | list_expr                                             { $$ = array($1, false); }
;

parameter_list:
      non_empty_parameter_list                              { $$ = $1; }
    | /* empty */                                           { $$ = array(); }
;

non_empty_parameter_list:
      parameter                                             { init($1); }
    | non_empty_parameter_list ',' parameter                { push($1, $3); }
;

parameter:
      optional_param_type optional_arg_ref optional_ellipsis plain_variable
          { $$ = Node\Param[$4, null, $1, $2, $3]; $this->checkParam($$); }
    | optional_param_type optional_arg_ref optional_ellipsis plain_variable '=' static_scalar
          { $$ = Node\Param[$4, $6, $1, $2, $3]; $this->checkParam($$); }
;

type:
      name                                                  { $$ = $1; }
    | T_ARRAY                                               { $$ = Node\Identifier['array']; }
    | T_CALLABLE                                            { $$ = Node\Identifier['callable']; }
;

optional_param_type:
      /* empty */                                           { $$ = null; }
    | type                                                  { $$ = $1; }
;

optional_return_type:
      /* empty */                                           { $$ = null; }
    | ':' type                                              { $$ = $2; }
;

argument_list:
      '(' ')'                                               { $$ = array(); }
    | '(' non_empty_argument_list ')'                       { $$ = $2; }
    | '(' yield_expr ')'                                    { $$ = array(Node\Arg[$2, false, false]); }
;

non_empty_argument_list:
      argument                                              { init($1); }
    | non_empty_argument_list ',' argument                  { push($1, $3); }
;

argument:
      expr                                                  { $$ = Node\Arg[$1, false, false]; }
    | ampersand variable                                    { $$ = Node\Arg[$2, true, false]; }
    | T_ELLIPSIS expr                                       { $$ = Node\Arg[$2, false, true]; }
;

global_var_list:
      global_var_list ',' global_var                        { push($1, $3); }
    | global_var                                            { init($1); }
;

global_var:
      plain_variable                                        { $$ = $1; }
    | '$' variable                                          { $$ = Expr\Variable[$2]; }
    | '$' '{' expr '}'                                      { $$ = Expr\Variable[$3]; }
;

static_var_list:
      static_var_list ',' static_var                        { push($1, $3); }
    | static_var                                            { init($1); }
;

static_var:
      plain_variable                                        { $$ = Stmt\StaticVar[$1, null]; }
    | plain_variable '=' static_scalar                      { $$ = Stmt\StaticVar[$1, $3]; }
;

class_statement_list_ex:
      class_statement_list_ex class_statement               { if ($2 !== null) { push($1, $2); } }
    | /* empty */                                           { init(); }
;

class_statement_list:
      class_statement_list_ex
          { makeZeroLengthNop($nop, $this->lookaheadStartAttributes);
            if ($nop !== null) { $1[] = $nop; } $$ = $1; }
;

class_statement:
      variable_modifiers property_declaration_list ';'
          { $$ = Stmt\Property[$1, $2]; $this->checkProperty($$, #1); }
    | T_CONST class_const_list ';'                          { $$ = Stmt\ClassConst[$2, 0]; }
    | method_modifiers T_FUNCTION optional_ref identifier_ex '(' parameter_list ')' optional_return_type method_body
          { $$ = Stmt\ClassMethod[$4, ['type' => $1, 'byRef' => $3, 'params' => $6, 'returnType' => $8, 'stmts' => $9]];
            $this->checkClassMethod($$, #1); }
    | T_USE class_name_list trait_adaptations               { $$ = Stmt\TraitUse[$2, $3]; }
;

trait_adaptations:
      ';'                                                   { $$ = array(); }
    | '{' trait_adaptation_list '}'                         { $$ = $2; }
;

trait_adaptation_list:
      /* empty */                                           { init(); }
    | trait_adaptation_list trait_adaptation                { push($1, $2); }
;

trait_adaptation:
      trait_method_reference_fully_qualified T_INSTEADOF class_name_list ';'
          { $$ = Stmt\TraitUseAdaptation\Precedence[$1[0], $1[1], $3]; }
    | trait_method_reference T_AS member_modifier identifier_ex ';'
          { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], $3, $4]; }
    | trait_method_reference T_AS member_modifier ';'
          { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], $3, null]; }
    | trait_method_reference T_AS identifier ';'
          { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], null, $3]; }
    | trait_method_reference T_AS reserved_non_modifiers_identifier ';'
          { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], null, $3]; }
;

trait_method_reference_fully_qualified:
      name T_PAAMAYIM_NEKUDOTAYIM identifier_ex             { $$ = array($1, $3); }
;
trait_method_reference:
      trait_method_reference_fully_qualified                { $$ = $1; }
    | identifier_ex                                         { $$ = array(null, $1); }
;

method_body:
      ';' /* abstract method */                             { $$ = null; }
    | '{' inner_statement_list '}'                          { $$ = $2; }
;

variable_modifiers:
      non_empty_member_modifiers                            { $$ = $1; }
    | T_VAR                                                 { $$ = 0; }
;

method_modifiers:
      /* empty */                                           { $$ = 0; }
    | non_empty_member_modifiers                            { $$ = $1; }
;

non_empty_member_modifiers:
      member_modifier                                       { $$ = $1; }
    | non_empty_member_modifiers member_modifier            { $this->checkModifier($1, $2, #2); $$ = $1 | $2; }
;

member_modifier:
      T_PUBLIC                                              { $$ = Stmt\Class_::MODIFIER_PUBLIC; }
    | T_PROTECTED                                           { $$ = Stmt\Class_::MODIFIER_PROTECTED; }
    | T_PRIVATE                                             { $$ = Stmt\Class_::MODIFIER_PRIVATE; }
    | T_STATIC                                              { $$ = Stmt\Class_::MODIFIER_STATIC; }
    | T_ABSTRACT                                            { $$ = Stmt\Class_::MODIFIER_ABSTRACT; }
    | T_FINAL                                               { $$ = Stmt\Class_::MODIFIER_FINAL; }
;

property_declaration_list:
      property_declaration                                  { init($1); }
    | property_declaration_list ',' property_declaration    { push($1, $3); }
;

property_decl_name:
      T_VARIABLE                                            { $$ = Node\VarLikeIdentifier[parseVar($1)]; }
;

property_declaration:
      property_decl_name                                    { $$ = Stmt\PropertyProperty[$1, null]; }
    | property_decl_name '=' static_scalar                  { $$ = Stmt\PropertyProperty[$1, $3]; }
;

expr_list:
      expr_list ',' expr                                    { push($1, $3); }
    | expr                                                  { init($1); }
;

for_expr:
      /* empty */                                           { $$ = array(); }
    | expr_list                                             { $$ = $1; }
;

expr:
      variable                                              { $$ = $1; }
    | list_expr '=' expr                                    { $$ = Expr\Assign[$1, $3]; }
    | variable '=' expr                                     { $$ = Expr\Assign[$1, $3]; }
    | variable '=' ampersand variable                       { $$ = Expr\AssignRef[$1, $4]; }
    | variable '=' ampersand new_expr                       { $$ = Expr\AssignRef[$1, $4]; }
    | new_expr                                              { $$ = $1; }
    | T_CLONE expr                                          { $$ = Expr\Clone_[$2]; }
    | variable T_PLUS_EQUAL expr                            { $$ = Expr\AssignOp\Plus      [$1, $3]; }
    | variable T_MINUS_EQUAL expr                           { $$ = Expr\AssignOp\Minus     [$1, $3]; }
    | variable T_MUL_EQUAL expr                             { $$ = Expr\AssignOp\Mul       [$1, $3]; }
    | variable T_DIV_EQUAL expr                             { $$ = Expr\AssignOp\Div       [$1, $3]; }
    | variable T_CONCAT_EQUAL expr                          { $$ = Expr\AssignOp\Concat    [$1, $3]; }
    | variable T_MOD_EQUAL expr                             { $$ = Expr\AssignOp\Mod       [$1, $3]; }
    | variable T_AND_EQUAL expr                             { $$ = Expr\AssignOp\BitwiseAnd[$1, $3]; }
    | variable T_OR_EQUAL expr                              { $$ = Expr\AssignOp\BitwiseOr [$1, $3]; }
    | variable T_XOR_EQUAL expr                             { $$ = Expr\AssignOp\BitwiseXor[$1, $3]; }
    | variable T_SL_EQUAL expr                              { $$ = Expr\AssignOp\ShiftLeft [$1, $3]; }
    | variable T_SR_EQUAL expr                              { $$ = Expr\AssignOp\ShiftRight[$1, $3]; }
    | variable T_POW_EQUAL expr                             { $$ = Expr\AssignOp\Pow       [$1, $3]; }
    | variable T_COALESCE_EQUAL expr                        { $$ = Expr\AssignOp\Coalesce  [$1, $3]; }
    | variable T_INC                                        { $$ = Expr\PostInc[$1]; }
    | T_INC variable                                        { $$ = Expr\PreInc [$2]; }
    | variable T_DEC                                        { $$ = Expr\PostDec[$1]; }
    | T_DEC variable                                        { $$ = Expr\PreDec [$2]; }
    | expr T_BOOLEAN_OR expr                                { $$ = Expr\BinaryOp\BooleanOr [$1, $3]; }
    | expr T_BOOLEAN_AND expr                               { $$ = Expr\BinaryOp\BooleanAnd[$1, $3]; }
    | expr T_LOGICAL_OR expr                                { $$ = Expr\BinaryOp\LogicalOr [$1, $3]; }
    | expr T_LOGICAL_AND expr                               { $$ = Expr\BinaryOp\LogicalAnd[$1, $3]; }
    | expr T_LOGICAL_XOR expr                               { $$ = Expr\BinaryOp\LogicalXor[$1, $3]; }
    | expr '|' expr                                         { $$ = Expr\BinaryOp\BitwiseOr [$1, $3]; }
    | expr T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG expr   { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; }
    | expr T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG expr       { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; }
    | expr '^' expr                                         { $$ = Expr\BinaryOp\BitwiseXor[$1, $3]; }
    | expr '.' expr                                         { $$ = Expr\BinaryOp\Concat    [$1, $3]; }
    | expr '+' expr                                         { $$ = Expr\BinaryOp\Plus      [$1, $3]; }
    | expr '-' expr                                         { $$ = Expr\BinaryOp\Minus     [$1, $3]; }
    | expr '*' expr                                         { $$ = Expr\BinaryOp\Mul       [$1, $3]; }
    | expr '/' expr                                         { $$ = Expr\BinaryOp\Div       [$1, $3]; }
    | expr '%' expr                                         { $$ = Expr\BinaryOp\Mod       [$1, $3]; }
    | expr T_SL expr                                        { $$ = Expr\BinaryOp\ShiftLeft [$1, $3]; }
    | expr T_SR expr                                        { $$ = Expr\BinaryOp\ShiftRight[$1, $3]; }
    | expr T_POW expr                                       { $$ = Expr\BinaryOp\Pow       [$1, $3]; }
    | '+' expr %prec T_INC                                  { $$ = Expr\UnaryPlus [$2]; }
    | '-' expr %prec T_INC                                  { $$ = Expr\UnaryMinus[$2]; }
    | '!' expr                                              { $$ = Expr\BooleanNot[$2]; }
    | '~' expr                                              { $$ = Expr\BitwiseNot[$2]; }
    | expr T_IS_IDENTICAL expr                              { $$ = Expr\BinaryOp\Identical     [$1, $3]; }
    | expr T_IS_NOT_IDENTICAL expr                          { $$ = Expr\BinaryOp\NotIdentical  [$1, $3]; }
    | expr T_IS_EQUAL expr                                  { $$ = Expr\BinaryOp\Equal         [$1, $3]; }
    | expr T_IS_NOT_EQUAL expr                              { $$ = Expr\BinaryOp\NotEqual      [$1, $3]; }
    | expr T_SPACESHIP expr                                 { $$ = Expr\BinaryOp\Spaceship     [$1, $3]; }
    | expr '<' expr                                         { $$ = Expr\BinaryOp\Smaller       [$1, $3]; }
    | expr T_IS_SMALLER_OR_EQUAL expr                       { $$ = Expr\BinaryOp\SmallerOrEqual[$1, $3]; }
    | expr '>' expr                                         { $$ = Expr\BinaryOp\Greater       [$1, $3]; }
    | expr T_IS_GREATER_OR_EQUAL expr                       { $$ = Expr\BinaryOp\GreaterOrEqual[$1, $3]; }
    | expr T_INSTANCEOF class_name_reference                { $$ = Expr\Instanceof_[$1, $3]; }
    | parentheses_expr                                      { $$ = $1; }
    /* we need a separate '(' new_expr ')' rule to avoid problems caused by a s/r conflict */
    | '(' new_expr ')'                                      { $$ = $2; }
    | expr '?' expr ':' expr                                { $$ = Expr\Ternary[$1, $3,   $5]; }
    | expr '?' ':' expr                                     { $$ = Expr\Ternary[$1, null, $4]; }
    | expr T_COALESCE expr                                  { $$ = Expr\BinaryOp\Coalesce[$1, $3]; }
    | T_ISSET '(' variables_list ')'                        { $$ = Expr\Isset_[$3]; }
    | T_EMPTY '(' expr ')'                                  { $$ = Expr\Empty_[$3]; }
    | T_INCLUDE expr                                        { $$ = Expr\Include_[$2, Expr\Include_::TYPE_INCLUDE]; }
    | T_INCLUDE_ONCE expr                                   { $$ = Expr\Include_[$2, Expr\Include_::TYPE_INCLUDE_ONCE]; }
    | T_EVAL parentheses_expr                               { $$ = Expr\Eval_[$2]; }
    | T_REQUIRE expr                                        { $$ = Expr\Include_[$2, Expr\Include_::TYPE_REQUIRE]; }
    | T_REQUIRE_ONCE expr                                   { $$ = Expr\Include_[$2, Expr\Include_::TYPE_REQUIRE_ONCE]; }
    | T_INT_CAST expr                                       { $$ = Expr\Cast\Int_    [$2]; }
    | T_DOUBLE_CAST expr
          { $attrs = attributes();
            $attrs['kind'] = $this->getFloatCastKind($1);
            $$ = new Expr\Cast\Double($2, $attrs); }
    | T_STRING_CAST expr                                    { $$ = Expr\Cast\String_ [$2]; }
    | T_ARRAY_CAST expr                                     { $$ = Expr\Cast\Array_  [$2]; }
    | T_OBJECT_CAST expr                                    { $$ = Expr\Cast\Object_ [$2]; }
    | T_BOOL_CAST expr                                      { $$ = Expr\Cast\Bool_   [$2]; }
    | T_UNSET_CAST expr                                     { $$ = Expr\Cast\Unset_  [$2]; }
    | T_EXIT exit_expr
          { $attrs = attributes();
            $attrs['kind'] = strtolower($1) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE;
            $$ = new Expr\Exit_($2, $attrs); }
    | '@' expr                                              { $$ = Expr\ErrorSuppress[$2]; }
    | scalar                                                { $$ = $1; }
    | array_expr                                            { $$ = $1; }
    | scalar_dereference                                    { $$ = $1; }
    | '`' backticks_expr '`'                                { $$ = Expr\ShellExec[$2]; }
    | T_PRINT expr                                          { $$ = Expr\Print_[$2]; }
    | T_YIELD                                               { $$ = Expr\Yield_[null, null]; }
    | T_YIELD_FROM expr                                     { $$ = Expr\YieldFrom[$2]; }
    | T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type
      '{' inner_statement_list '}'
          { $$ = Expr\Closure[['static' => false, 'byRef' => $2, 'params' => $4, 'uses' => $6, 'returnType' => $7, 'stmts' => $9]]; }
    | T_STATIC T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type
      '{' inner_statement_list '}'
          { $$ = Expr\Closure[['static' => true, 'byRef' => $3, 'params' => $5, 'uses' => $7, 'returnType' => $8, 'stmts' => $10]]; }
;

parentheses_expr:
      '(' expr ')'                                          { $$ = $2; }
    | '(' yield_expr ')'                                    { $$ = $2; }
;

yield_expr:
      T_YIELD expr                                          { $$ = Expr\Yield_[$2, null]; }
    | T_YIELD expr T_DOUBLE_ARROW expr                      { $$ = Expr\Yield_[$4, $2]; }
;

array_expr:
      T_ARRAY '(' array_pair_list ')'
          { $attrs = attributes(); $attrs['kind'] = Expr\Array_::KIND_LONG;
            $$ = new Expr\Array_($3, $attrs); }
    | '[' array_pair_list ']'
          { $attrs = attributes(); $attrs['kind'] = Expr\Array_::KIND_SHORT;
            $$ = new Expr\Array_($2, $attrs); }
;

scalar_dereference:
      array_expr '[' dim_offset ']'                         { $$ = Expr\ArrayDimFetch[$1, $3]; }
    | T_CONSTANT_ENCAPSED_STRING '[' dim_offset ']'         { $$ = Expr\ArrayDimFetch[Scalar\String_::fromString($1, attributes()), $3]; }
    | constant '[' dim_offset ']'                           { $$ = Expr\ArrayDimFetch[$1, $3]; }
    | scalar_dereference '[' dim_offset ']'                 { $$ = Expr\ArrayDimFetch[$1, $3]; }
    /* alternative array syntax missing intentionally */
;

anonymous_class:
      T_CLASS ctor_arguments extends_from implements_list '{' class_statement_list '}'
          { $$ = array(Stmt\Class_[null, ['type' => 0, 'extends' => $3, 'implements' => $4, 'stmts' => $6]], $2);
            $this->checkClass($$[0], -1); }
;

new_expr:
      T_NEW class_name_reference ctor_arguments             { $$ = Expr\New_[$2, $3]; }
    | T_NEW anonymous_class
          { list($class, $ctorArgs) = $2; $$ = Expr\New_[$class, $ctorArgs]; }
;

lexical_vars:
      /* empty */                                           { $$ = array(); }
    | T_USE '(' lexical_var_list ')'                        { $$ = $3; }
;

lexical_var_list:
      lexical_var                                           { init($1); }
    | lexical_var_list ',' lexical_var                      { push($1, $3); }
;

lexical_var:
      optional_ref plain_variable                           { $$ = Expr\ClosureUse[$2, $1]; }
;

name_readonly:
      T_READONLY                                            { $$ = Name[$1]; }
;

function_call:
      name argument_list                                    { $$ = Expr\FuncCall[$1, $2]; }
    | name_readonly argument_list                           { $$ = Expr\FuncCall[$1, $2]; }
    | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM identifier_ex argument_list
          { $$ = Expr\StaticCall[$1, $3, $4]; }
    | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM '{' expr '}' argument_list
          { $$ = Expr\StaticCall[$1, $4, $6]; }
    | static_property argument_list
          { $$ = $this->fixupPhp5StaticPropCall($1, $2, attributes()); }
    | variable_without_objects argument_list
          { $$ = Expr\FuncCall[$1, $2]; }
    | function_call '[' dim_offset ']'                      { $$ = Expr\ArrayDimFetch[$1, $3]; }
      /* alternative array syntax missing intentionally */
;

class_name:
      T_STATIC                                              { $$ = Name[$1]; }
    | name                                                  { $$ = $1; }
;

name:
      T_STRING                                              { $$ = Name[$1]; }
    | T_NAME_QUALIFIED                                      { $$ = Name[$1]; }
    | T_NAME_FULLY_QUALIFIED                                { $$ = Name\FullyQualified[substr($1, 1)]; }
    | T_NAME_RELATIVE                                       { $$ = Name\Relative[substr($1, 10)]; }
;

class_name_reference:
      class_name                                            { $$ = $1; }
    | dynamic_class_name_reference                          { $$ = $1; }
;

dynamic_class_name_reference:
      object_access_for_dcnr                                { $$ = $1; }
    | base_variable                                         { $$ = $1; }
;

class_name_or_var:
      class_name                                            { $$ = $1; }
    | reference_variable                                    { $$ = $1; }
;

object_access_for_dcnr:
      base_variable T_OBJECT_OPERATOR object_property
          { $$ = Expr\PropertyFetch[$1, $3]; }
    | object_access_for_dcnr T_OBJECT_OPERATOR object_property
          { $$ = Expr\PropertyFetch[$1, $3]; }
    | object_access_for_dcnr '[' dim_offset ']'             { $$ = Expr\ArrayDimFetch[$1, $3]; }
    | object_access_for_dcnr '{' expr '}'                   { $$ = Expr\ArrayDimFetch[$1, $3]; }
;

exit_expr:
      /* empty */                                           { $$ = null; }
    | '(' ')'                                               { $$ = null; }
    | parentheses_expr                                      { $$ = $1; }
;

backticks_expr:
      /* empty */                                           { $$ = array(); }
    | T_ENCAPSED_AND_WHITESPACE
          { $$ = array(Scalar\EncapsedStringPart[Scalar\String_::parseEscapeSequences($1, '`', false)]); }
    | encaps_list                                           { parseEncapsed($1, '`', false); $$ = $1; }
;

ctor_arguments:
      /* empty */                                           { $$ = array(); }
    | argument_list                                         { $$ = $1; }
;

common_scalar:
      T_LNUMBER                                             { $$ = $this->parseLNumber($1, attributes(), true); }
    | T_DNUMBER                                             { $$ = Scalar\DNumber::fromString($1, attributes()); }
    | T_CONSTANT_ENCAPSED_STRING                            { $$ = Scalar\String_::fromString($1, attributes(), false); }
    | T_LINE                                                { $$ = Scalar\MagicConst\Line[]; }
    | T_FILE                                                { $$ = Scalar\MagicConst\File[]; }
    | T_DIR                                                 { $$ = Scalar\MagicConst\Dir[]; }
    | T_CLASS_C                                             { $$ = Scalar\MagicConst\Class_[]; }
    | T_TRAIT_C                                             { $$ = Scalar\MagicConst\Trait_[]; }
    | T_METHOD_C                                            { $$ = Scalar\MagicConst\Method[]; }
    | T_FUNC_C                                              { $$ = Scalar\MagicConst\Function_[]; }
    | T_NS_C                                                { $$ = Scalar\MagicConst\Namespace_[]; }
    | T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC
          { $$ = $this->parseDocString($1, $2, $3, attributes(), stackAttributes(#3), false); }
    | T_START_HEREDOC T_END_HEREDOC
          { $$ = $this->parseDocString($1, '', $2, attributes(), stackAttributes(#2), false); }
;

static_scalar:
      common_scalar                                         { $$ = $1; }
    | class_name T_PAAMAYIM_NEKUDOTAYIM identifier_ex       { $$ = Expr\ClassConstFetch[$1, $3]; }
    | name                                                  { $$ = Expr\ConstFetch[$1]; }
    | T_ARRAY '(' static_array_pair_list ')'                { $$ = Expr\Array_[$3]; }
    | '[' static_array_pair_list ']'                        { $$ = Expr\Array_[$2]; }
    | static_operation                                      { $$ = $1; }
;

static_operation:
      static_scalar T_BOOLEAN_OR static_scalar              { $$ = Expr\BinaryOp\BooleanOr [$1, $3]; }
    | static_scalar T_BOOLEAN_AND static_scalar             { $$ = Expr\BinaryOp\BooleanAnd[$1, $3]; }
    | static_scalar T_LOGICAL_OR static_scalar              { $$ = Expr\BinaryOp\LogicalOr [$1, $3]; }
    | static_scalar T_LOGICAL_AND static_scalar             { $$ = Expr\BinaryOp\LogicalAnd[$1, $3]; }
    | static_scalar T_LOGICAL_XOR static_scalar             { $$ = Expr\BinaryOp\LogicalXor[$1, $3]; }
    | static_scalar '|' static_scalar                       { $$ = Expr\BinaryOp\BitwiseOr [$1, $3]; }
    | static_scalar T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG static_scalar
          { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; }
    | static_scalar T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG static_scalar
          { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; }
    | static_scalar '^' static_scalar                       { $$ = Expr\BinaryOp\BitwiseXor[$1, $3]; }
    | static_scalar '.' static_scalar                       { $$ = Expr\BinaryOp\Concat    [$1, $3]; }
    | static_scalar '+' static_scalar                       { $$ = Expr\BinaryOp\Plus      [$1, $3]; }
    | static_scalar '-' static_scalar                       { $$ = Expr\BinaryOp\Minus     [$1, $3]; }
    | static_scalar '*' static_scalar                       { $$ = Expr\BinaryOp\Mul       [$1, $3]; }
    | static_scalar '/' static_scalar                       { $$ = Expr\BinaryOp\Div       [$1, $3]; }
    | static_scalar '%' static_scalar                       { $$ = Expr\BinaryOp\Mod       [$1, $3]; }
    | static_scalar T_SL static_scalar                      { $$ = Expr\BinaryOp\ShiftLeft [$1, $3]; }
    | static_scalar T_SR static_scalar                      { $$ = Expr\BinaryOp\ShiftRight[$1, $3]; }
    | static_scalar T_POW static_scalar                     { $$ = Expr\BinaryOp\Pow       [$1, $3]; }
    | '+' static_scalar %prec T_INC                         { $$ = Expr\UnaryPlus [$2]; }
    | '-' static_scalar %prec T_INC                         { $$ = Expr\UnaryMinus[$2]; }
    | '!' static_scalar                                     { $$ = Expr\BooleanNot[$2]; }
    | '~' static_scalar                                     { $$ = Expr\BitwiseNot[$2]; }
    | static_scalar T_IS_IDENTICAL static_scalar            { $$ = Expr\BinaryOp\Identical     [$1, $3]; }
    | static_scalar T_IS_NOT_IDENTICAL static_scalar        { $$ = Expr\BinaryOp\NotIdentical  [$1, $3]; }
    | static_scalar T_IS_EQUAL static_scalar                { $$ = Expr\BinaryOp\Equal         [$1, $3]; }
    | static_scalar T_IS_NOT_EQUAL static_scalar            { $$ = Expr\BinaryOp\NotEqual      [$1, $3]; }
    | static_scalar '<' static_scalar                       { $$ = Expr\BinaryOp\Smaller       [$1, $3]; }
    | static_scalar T_IS_SMALLER_OR_EQUAL static_scalar     { $$ = Expr\BinaryOp\SmallerOrEqual[$1, $3]; }
    | static_scalar '>' static_scalar                       { $$ = Expr\BinaryOp\Greater       [$1, $3]; }
    | static_scalar T_IS_GREATER_OR_EQUAL static_scalar     { $$ = Expr\BinaryOp\GreaterOrEqual[$1, $3]; }
    | static_scalar '?' static_scalar ':' static_scalar     { $$ = Expr\Ternary[$1, $3,   $5]; }
    | static_scalar '?' ':' static_scalar                   { $$ = Expr\Ternary[$1, null, $4]; }
    | static_scalar '[' static_scalar ']'                   { $$ = Expr\ArrayDimFetch[$1, $3]; }
    | '(' static_scalar ')'                                 { $$ = $2; }
;

constant:
      name                                                  { $$ = Expr\ConstFetch[$1]; }
    | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM identifier_ex
          { $$ = Expr\ClassConstFetch[$1, $3]; }
;

scalar:
      common_scalar                                         { $$ = $1; }
    | constant                                              { $$ = $1; }
    | '"' encaps_list '"'
          { $attrs = attributes(); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED;
            parseEncapsed($2, '"', true); $$ = new Scalar\Encapsed($2, $attrs); }
    | T_START_HEREDOC encaps_list T_END_HEREDOC
          { $$ = $this->parseDocString($1, $2, $3, attributes(), stackAttributes(#3), true); }
;

static_array_pair_list:
      /* empty */                                           { $$ = array(); }
    | non_empty_static_array_pair_list optional_comma       { $$ = $1; }
;

optional_comma:
      /* empty */
    | ','
;

non_empty_static_array_pair_list:
      non_empty_static_array_pair_list ',' static_array_pair { push($1, $3); }
    | static_array_pair                                      { init($1); }
;

static_array_pair:
      static_scalar T_DOUBLE_ARROW static_scalar            { $$ = Expr\ArrayItem[$3, $1,   false]; }
    | static_scalar                                         { $$ = Expr\ArrayItem[$1, null, false]; }
;

variable:
      object_access                                         { $$ = $1; }
    | base_variable                                         { $$ = $1; }
    | function_call                                         { $$ = $1; }
    | new_expr_array_deref                                  { $$ = $1; }
;

new_expr_array_deref:
      '(' new_expr ')' '[' dim_offset ']'                   { $$ = Expr\ArrayDimFetch[$2, $5]; }
    | new_expr_array_deref '[' dim_offset ']'               { $$ = Expr\ArrayDimFetch[$1, $3]; }
      /* alternative array syntax missing intentionally */
;

object_access:
      variable_or_new_expr T_OBJECT_OPERATOR object_property
          { $$ = Expr\PropertyFetch[$1, $3]; }
    | variable_or_new_expr T_OBJECT_OPERATOR object_property argument_list
          { $$ = Expr\MethodCall[$1, $3, $4]; }
    | object_access argument_list                           { $$ = Expr\FuncCall[$1, $2]; }
    | object_access '[' dim_offset ']'                      { $$ = Expr\ArrayDimFetch[$1, $3]; }
    | object_access '{' expr '}'                            { $$ = Expr\ArrayDimFetch[$1, $3]; }
;

variable_or_new_expr:
      variable                                              { $$ = $1; }
    | '(' new_expr ')'                                      { $$ = $2; }
;

variable_without_objects:
      reference_variable                                    { $$ = $1; }
    | '$' variable_without_objects                          { $$ = Expr\Variable[$2]; }
;

base_variable:
      variable_without_objects                              { $$ = $1; }
    | static_property                                       { $$ = $1; }
;

static_property:
      class_name_or_var T_PAAMAYIM_NEKUDOTAYIM '$' reference_variable
          { $$ = Expr\StaticPropertyFetch[$1, $4]; }
    | static_property_with_arrays                           { $$ = $1; }
;

static_property_simple_name:
      T_VARIABLE
          { $var = parseVar($1); $$ = \is_string($var) ? Node\VarLikeIdentifier[$var] : $var; }
;

static_property_with_arrays:
      class_name_or_var T_PAAMAYIM_NEKUDOTAYIM static_property_simple_name
          { $$ = Expr\StaticPropertyFetch[$1, $3]; }
    | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM '$' '{' expr '}'
          { $$ = Expr\StaticPropertyFetch[$1, $5]; }
    | static_property_with_arrays '[' dim_offset ']'        { $$ = Expr\ArrayDimFetch[$1, $3]; }
    | static_property_with_arrays '{' expr '}'              { $$ = Expr\ArrayDimFetch[$1, $3]; }
;

reference_variable:
      reference_variable '[' dim_offset ']'                 { $$ = Expr\ArrayDimFetch[$1, $3]; }
    | reference_variable '{' expr '}'                       { $$ = Expr\ArrayDimFetch[$1, $3]; }
    | plain_variable                                        { $$ = $1; }
    | '$' '{' expr '}'                                      { $$ = Expr\Variable[$3]; }
;

dim_offset:
      /* empty */                                           { $$ = null; }
    | expr                                                  { $$ = $1; }
;

object_property:
      identifier                                            { $$ = $1; }
    | '{' expr '}'                                          { $$ = $2; }
    | variable_without_objects                              { $$ = $1; }
    | error                                                 { $$ = Expr\Error[]; $this->errorState = 2; }
;

list_expr:
      T_LIST '(' list_expr_elements ')'                     { $$ = Expr\List_[$3]; }
;

list_expr_elements:
      list_expr_elements ',' list_expr_element              { push($1, $3); }
    | list_expr_element                                     { init($1); }
;

list_expr_element:
      variable                                              { $$ = Expr\ArrayItem[$1, null, false]; }
    | list_expr                                             { $$ = Expr\ArrayItem[$1, null, false]; }
    | /* empty */                                           { $$ = null; }
;

array_pair_list:
      /* empty */                                           { $$ = array(); }
    | non_empty_array_pair_list optional_comma              { $$ = $1; }
;

non_empty_array_pair_list:
      non_empty_array_pair_list ',' array_pair              { push($1, $3); }
    | array_pair                                            { init($1); }
;

array_pair:
      expr T_DOUBLE_ARROW expr                              { $$ = Expr\ArrayItem[$3, $1,   false]; }
    | expr                                                  { $$ = Expr\ArrayItem[$1, null, false]; }
    | expr T_DOUBLE_ARROW ampersand variable                { $$ = Expr\ArrayItem[$4, $1,   true]; }
    | ampersand variable                                    { $$ = Expr\ArrayItem[$2, null, true]; }
    | T_ELLIPSIS expr                                       { $$ = Expr\ArrayItem[$2, null, false, attributes(), true]; }
;

encaps_list:
      encaps_list encaps_var                                { push($1, $2); }
    | encaps_list encaps_string_part                        { push($1, $2); }
    | encaps_var                                            { init($1); }
    | encaps_string_part encaps_var                         { init($1, $2); }
;

encaps_string_part:
      T_ENCAPSED_AND_WHITESPACE                             { $$ = Scalar\EncapsedStringPart[$1]; }
;

encaps_str_varname:
      T_STRING_VARNAME                                      { $$ = Expr\Variable[$1]; }
;

encaps_var:
      plain_variable                                        { $$ = $1; }
    | plain_variable '[' encaps_var_offset ']'              { $$ = Expr\ArrayDimFetch[$1, $3]; }
    | plain_variable T_OBJECT_OPERATOR identifier           { $$ = Expr\PropertyFetch[$1, $3]; }
    | T_DOLLAR_OPEN_CURLY_BRACES expr '}'                   { $$ = Expr\Variable[$2]; }
    | T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '}'       { $$ = Expr\Variable[$2]; }
    | T_DOLLAR_OPEN_CURLY_BRACES encaps_str_varname '[' expr ']' '}'
          { $$ = Expr\ArrayDimFetch[$2, $4]; }
    | T_CURLY_OPEN variable '}'                             { $$ = $2; }
;

encaps_var_offset:
      T_STRING                                              { $$ = Scalar\String_[$1]; }
    | T_NUM_STRING                                          { $$ = $this->parseNumString($1, attributes()); }
    | plain_variable                                        { $$ = $1; }
;

%%
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Identifier;

use InvalidArgumentException;
use PHPStan\BetterReflection\Reflection\ReflectionClass;
use PHPStan\BetterReflection\Reflection\ReflectionConstant;
use PHPStan\BetterReflection\Reflection\ReflectionFunction;
use function array_key_exists;
use function sprintf;
class IdentifierType
{
    public const IDENTIFIER_CLASS = ReflectionClass::class;
    public const IDENTIFIER_FUNCTION = ReflectionFunction::class;
    public const IDENTIFIER_CONSTANT = ReflectionConstant::class;
    private const VALID_TYPES = [self::IDENTIFIER_CLASS => null, self::IDENTIFIER_FUNCTION => null, self::IDENTIFIER_CONSTANT => null];
    /**
     * @var string
     */
    private $name;
    public function __construct(string $type = self::IDENTIFIER_CLASS)
    {
        if (!array_key_exists($type, self::VALID_TYPES)) {
            throw new InvalidArgumentException(sprintf('%s is not a valid identifier type', $type));
        }
        $this->name = $type;
    }
    public function getName() : string
    {
        return $this->name;
    }
    public function isClass() : bool
    {
        return $this->name === self::IDENTIFIER_CLASS;
    }
    public function isFunction() : bool
    {
        return $this->name === self::IDENTIFIER_FUNCTION;
    }
    public function isConstant() : bool
    {
        return $this->name === self::IDENTIFIER_CONSTANT;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Identifier\Exception;

use InvalidArgumentException;
use function sprintf;
class InvalidIdentifierName extends InvalidArgumentException
{
    public static function fromInvalidName(string $name) : self
    {
        return new self(sprintf('Invalid identifier name "%s"', $name));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Identifier;

use PHPStan\BetterReflection\Identifier\Exception\InvalidIdentifierName;
use PHPStan\BetterReflection\Reflection\ReflectionClass;
use PHPStan\BetterReflection\Reflection\ReflectionFunction;
use function ltrim;
use function preg_match;
use function strpos;
class Identifier
{
    public const WILDCARD = '*';
    private const VALID_NAME_REGEXP = '/([a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)(\\\\[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)*/';
    /**
     * @var string
     */
    private $name;
    /**
     * @var \PHPStan\BetterReflection\Identifier\IdentifierType
     */
    private $type;
    /** @throws InvalidIdentifierName */
    public function __construct(string $name, \PHPStan\BetterReflection\Identifier\IdentifierType $type)
    {
        $this->type = $type;
        if ($name === self::WILDCARD || $name === ReflectionFunction::CLOSURE_NAME || strpos($name, ReflectionClass::ANONYMOUS_CLASS_NAME_PREFIX) === 0) {
            $this->name = $name;
            return;
        }
        $name = ltrim($name, '\\');
        if (!preg_match(self::VALID_NAME_REGEXP, $name)) {
            throw InvalidIdentifierName::fromInvalidName($name);
        }
        $this->name = $name;
    }
    public function getName() : string
    {
        return $this->name;
    }
    public function getType() : \PHPStan\BetterReflection\Identifier\IdentifierType
    {
        return $this->type;
    }
    public function isClass() : bool
    {
        return $this->type->isClass();
    }
    public function isFunction() : bool
    {
        return $this->type->isFunction();
    }
    public function isConstant() : bool
    {
        return $this->type->isConstant();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory;

use PHPStan\BetterReflection\SourceLocator\Ast\Locator;
use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\FailedToParseJson;
use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\InvalidProjectDirectory;
use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingComposerJson;
use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingInstalledJson;
use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Psr0Mapping;
use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Psr4Mapping;
use PHPStan\BetterReflection\SourceLocator\Type\Composer\PsrAutoloaderLocator;
use PHPStan\BetterReflection\SourceLocator\Type\DirectoriesSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator;
use function array_filter;
use function array_map;
use function array_merge;
use function array_merge_recursive;
use function array_values;
use function assert;
use function file_get_contents;
use function is_array;
use function is_dir;
use function is_file;
use function is_string;
use function json_decode;
use function realpath;
use function rtrim;
/**
 * @psalm-import-type ComposerAutoload from MakeLocatorForComposerJson
 * @psalm-import-type ComposerPackage from MakeLocatorForComposerJson
 * @psalm-import-type Composer from MakeLocatorForComposerJson
 */
final class MakeLocatorForInstalledJson
{
    public function __invoke(string $installationPath, Locator $astLocator) : SourceLocator
    {
        $realInstallationPath = (string) realpath($installationPath);
        if (!is_dir($realInstallationPath)) {
            throw InvalidProjectDirectory::atPath($installationPath);
        }
        $composerJsonPath = $realInstallationPath . '/composer.json';
        if (!is_file($composerJsonPath)) {
            throw MissingComposerJson::inProjectPath($installationPath);
        }
        $composerJsonContent = file_get_contents($composerJsonPath);
        assert(is_string($composerJsonContent));
        /** @psalm-var Composer|null $composer */
        $composer = json_decode($composerJsonContent, \true);
        $vendorDir = $composer['config']['vendor-dir'] ?? 'vendor';
        $vendorDir = rtrim($vendorDir, '/');
        $installedJsonPath = $realInstallationPath . '/' . $vendorDir . '/composer/installed.json';
        if (!is_file($installedJsonPath)) {
            throw MissingInstalledJson::inProjectPath($realInstallationPath . '/' . $vendorDir);
        }
        $jsonContent = file_get_contents($installedJsonPath);
        assert(is_string($jsonContent));
        /** @var array{packages: list<mixed[]>}|list<mixed[]>|null $installedJson */
        $installedJson = json_decode($jsonContent, \true);
        if (!is_array($installedJson)) {
            throw FailedToParseJson::inFile($installedJsonPath);
        }
        /** @psalm-var list<ComposerPackage> $installed */
        $installed = $installedJson['packages'] ?? $installedJson;
        $classMapPaths = array_merge([], ...array_map(function (array $package) use($realInstallationPath, $vendorDir) : array {
            return $this->prefixPaths($this->packageToClassMapPaths($package), $this->packagePrefixPath($realInstallationPath, $package, $vendorDir));
        }, $installed));
        $classMapFiles = array_filter($classMapPaths, 'is_file');
        $classMapDirectories = array_values(array_filter($classMapPaths, 'is_dir'));
        $filePaths = array_merge([], ...array_map(function (array $package) use($realInstallationPath, $vendorDir) : array {
            return $this->prefixPaths($this->packageToFilePaths($package), $this->packagePrefixPath($realInstallationPath, $package, $vendorDir));
        }, $installed));
        return new AggregateSourceLocator(array_merge([new PsrAutoloaderLocator(Psr4Mapping::fromArrayMappings(array_merge_recursive([], ...array_map(function (array $package) use($realInstallationPath, $vendorDir) : array {
            return $this->prefixWithPackagePath($this->packageToPsr4AutoloadNamespaces($package), $realInstallationPath, $package, $vendorDir);
        }, $installed))), $astLocator), new PsrAutoloaderLocator(Psr0Mapping::fromArrayMappings(array_merge_recursive([], ...array_map(function (array $package) use($realInstallationPath, $vendorDir) : array {
            return $this->prefixWithPackagePath($this->packageToPsr0AutoloadNamespaces($package), $realInstallationPath, $package, $vendorDir);
        }, $installed))), $astLocator), new DirectoriesSourceLocator($classMapDirectories, $astLocator)], ...array_map(static function (string $file) use($astLocator) : array {
            assert($file !== '');
            return [new SingleFileSourceLocator($file, $astLocator)];
        }, array_merge($classMapFiles, $filePaths))));
    }
    /**
     * @param ComposerPackage $package
     *
     * @return array<string, list<string>>
     */
    private function packageToPsr4AutoloadNamespaces(array $package) : array
    {
        return array_map(static function ($namespacePaths) : array {
            return (array) $namespacePaths;
        }, $package['autoload']['psr-4'] ?? []);
    }
    /**
     * @param ComposerPackage $package
     *
     * @return array<string, list<string>>
     */
    private function packageToPsr0AutoloadNamespaces(array $package) : array
    {
        return array_map(static function ($namespacePaths) : array {
            return (array) $namespacePaths;
        }, $package['autoload']['psr-0'] ?? []);
    }
    /**
     * @param ComposerPackage $package
     *
     * @return list<string>
     */
    private function packageToClassMapPaths(array $package) : array
    {
        return $package['autoload']['classmap'] ?? [];
    }
    /**
     * @param ComposerPackage $package
     *
     * @return list<string>
     */
    private function packageToFilePaths(array $package) : array
    {
        return $package['autoload']['files'] ?? [];
    }
    /** @param ComposerPackage $package */
    private function packagePrefixPath(string $trimmedInstallationPath, array $package, string $vendorDir) : string
    {
        return $trimmedInstallationPath . '/' . $vendorDir . '/' . $package['name'] . '/';
    }
    /**
     * @param array<int|string, array<string>> $paths
     * @param ComposerPackage                  $package
     *
     * @return array<int|string, string|array<string>>
     */
    private function prefixWithPackagePath(array $paths, string $trimmedInstallationPath, array $package, string $vendorDir) : array
    {
        $prefix = $this->packagePrefixPath($trimmedInstallationPath, $package, $vendorDir);
        return array_map(function (array $paths) use($prefix) : array {
            return $this->prefixPaths($paths, $prefix);
        }, $paths);
    }
    /**
     * @param array<int|string, string> $paths
     *
     * @return array<int|string, string>
     */
    private function prefixPaths(array $paths, string $prefix) : array
    {
        return array_map(static function (string $path) use($prefix) : string {
            return $prefix . $path;
        }, $paths);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception;

use InvalidArgumentException;
use function sprintf;
final class InvalidProjectDirectory extends InvalidArgumentException implements \PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\Exception
{
    public static function atPath(string $path) : self
    {
        return new self(sprintf('Could not locate project directory "%s"', $path));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception;

use UnexpectedValueException;
use function sprintf;
final class MissingInstalledJson extends UnexpectedValueException implements \PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\Exception
{
    public static function inProjectPath(string $path) : self
    {
        return new self(sprintf('Could not locate a "composer/installed.json" file in "%s"', $path));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception;

use UnexpectedValueException;
use function sprintf;
final class MissingComposerJson extends UnexpectedValueException implements \PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\Exception
{
    public static function inProjectPath(string $path) : self
    {
        return new self(sprintf('Could not locate a "composer.json" file in "%s"', $path));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception;

use UnexpectedValueException;
use function sprintf;
final class FailedToParseJson extends UnexpectedValueException implements \PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\Exception
{
    public static function inFile(string $file) : self
    {
        return new self(sprintf('Could not parse JSON file "%s"', $file));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception;

use Throwable;
interface Exception extends Throwable
{
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory;

use PHPStan\BetterReflection\SourceLocator\Ast\Locator;
use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\FailedToParseJson;
use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\InvalidProjectDirectory;
use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingComposerJson;
use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Psr0Mapping;
use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Psr4Mapping;
use PHPStan\BetterReflection\SourceLocator\Type\Composer\PsrAutoloaderLocator;
use PHPStan\BetterReflection\SourceLocator\Type\DirectoriesSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator;
use function array_filter;
use function array_map;
use function array_merge;
use function array_values;
use function assert;
use function file_get_contents;
use function is_array;
use function is_dir;
use function is_file;
use function is_string;
use function json_decode;
use function realpath;
/**
 * @psalm-type ComposerAutoload array{
 *  psr-0?: array<string, string|list<string>>,
 *  psr-4?: array<string, string|list<string>>,
 *  classmap?: list<string>,
 *  files?: list<string>,
 *  exclude-from-classmap?: list<string>
 * }
 * @psalm-type ComposerPackage array{
 *  name: string,
 *  autoload: ComposerAutoload
 * }
 * @psalm-type Composer array{
 *  autoload: ComposerAutoload,
 *  config?: array{vendor-dir?: string}
 * }
 */
final class MakeLocatorForComposerJson
{
    public function __invoke(string $installationPath, Locator $astLocator) : SourceLocator
    {
        $realInstallationPath = (string) realpath($installationPath);
        if (!is_dir($realInstallationPath)) {
            throw InvalidProjectDirectory::atPath($installationPath);
        }
        $composerJsonPath = $realInstallationPath . '/composer.json';
        if (!is_file($composerJsonPath)) {
            throw MissingComposerJson::inProjectPath($installationPath);
        }
        $composerJsonContent = file_get_contents($composerJsonPath);
        assert(is_string($composerJsonContent));
        /** @psalm-var array{autoload: ComposerAutoload}|null $composer */
        $composer = json_decode($composerJsonContent, \true);
        if (!is_array($composer)) {
            throw FailedToParseJson::inFile($composerJsonPath);
        }
        $pathPrefix = $realInstallationPath . '/';
        $classMapPaths = $this->prefixPaths($this->packageToClassMapPaths($composer), $pathPrefix);
        $classMapFiles = array_filter($classMapPaths, 'is_file');
        $classMapDirectories = array_values(array_filter($classMapPaths, 'is_dir'));
        $filePaths = $this->prefixPaths($this->packageToFilePaths($composer), $pathPrefix);
        return new AggregateSourceLocator(array_merge([new PsrAutoloaderLocator(Psr4Mapping::fromArrayMappings($this->prefixWithInstallationPath($this->packageToPsr4AutoloadNamespaces($composer), $pathPrefix)), $astLocator), new PsrAutoloaderLocator(Psr0Mapping::fromArrayMappings($this->prefixWithInstallationPath($this->packageToPsr0AutoloadNamespaces($composer), $pathPrefix)), $astLocator), new DirectoriesSourceLocator($classMapDirectories, $astLocator)], ...array_map(static function (string $file) use($astLocator) : array {
            assert($file !== '');
            return [new SingleFileSourceLocator($file, $astLocator)];
        }, array_merge($classMapFiles, $filePaths))));
    }
    /**
     * @param array{autoload: ComposerAutoload} $package
     *
     * @return array<string, list<string>>
     */
    private function packageToPsr4AutoloadNamespaces(array $package) : array
    {
        return array_map(static function ($namespacePaths) : array {
            return (array) $namespacePaths;
        }, $package['autoload']['psr-4'] ?? []);
    }
    /**
     * @param array{autoload: ComposerAutoload} $package
     *
     * @return array<string, list<string>>
     */
    private function packageToPsr0AutoloadNamespaces(array $package) : array
    {
        return array_map(static function ($namespacePaths) : array {
            return (array) $namespacePaths;
        }, $package['autoload']['psr-0'] ?? []);
    }
    /**
     * @param array{autoload: ComposerAutoload} $package
     *
     * @return list<string>
     */
    private function packageToClassMapPaths(array $package) : array
    {
        return $package['autoload']['classmap'] ?? [];
    }
    /**
     * @param array{autoload: ComposerAutoload} $package
     *
     * @return list<string>
     */
    private function packageToFilePaths(array $package) : array
    {
        return $package['autoload']['files'] ?? [];
    }
    /**
     * @param array<string, list<string>> $paths
     *
     * @return array<string, list<string>>
     */
    private function prefixWithInstallationPath(array $paths, string $trimmedInstallationPath) : array
    {
        return array_map(function (array $paths) use($trimmedInstallationPath) : array {
            return $this->prefixPaths($paths, $trimmedInstallationPath);
        }, $paths);
    }
    /**
     * @param list<string> $paths
     *
     * @return list<string>
     */
    private function prefixPaths(array $paths, string $prefix) : array
    {
        return array_map(static function (string $path) use($prefix) : string {
            return $prefix . $path;
        }, $paths);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory;

use PHPStan\BetterReflection\SourceLocator\Ast\Locator;
use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\FailedToParseJson;
use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\InvalidProjectDirectory;
use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingComposerJson;
use PHPStan\BetterReflection\SourceLocator\Type\Composer\Factory\Exception\MissingInstalledJson;
use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Psr0Mapping;
use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Psr4Mapping;
use PHPStan\BetterReflection\SourceLocator\Type\Composer\PsrAutoloaderLocator;
use PHPStan\BetterReflection\SourceLocator\Type\DirectoriesSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator;
use function array_filter;
use function array_map;
use function array_merge;
use function array_merge_recursive;
use function array_values;
use function assert;
use function file_get_contents;
use function is_array;
use function is_dir;
use function is_file;
use function is_string;
use function json_decode;
use function realpath;
use function rtrim;
/**
 * @psalm-import-type ComposerAutoload from MakeLocatorForComposerJson
 * @psalm-import-type ComposerPackage from MakeLocatorForComposerJson
 * @psalm-import-type Composer from MakeLocatorForComposerJson
 */
final class MakeLocatorForComposerJsonAndInstalledJson
{
    public function __invoke(string $installationPath, Locator $astLocator) : SourceLocator
    {
        $realInstallationPath = (string) realpath($installationPath);
        if (!is_dir($realInstallationPath)) {
            throw InvalidProjectDirectory::atPath($installationPath);
        }
        $composerJsonPath = $realInstallationPath . '/composer.json';
        if (!is_file($composerJsonPath)) {
            throw MissingComposerJson::inProjectPath($installationPath);
        }
        $composerJsonContent = file_get_contents($composerJsonPath);
        assert(is_string($composerJsonContent));
        /** @psalm-var Composer|null $composer */
        $composer = json_decode($composerJsonContent, \true);
        $vendorDir = $composer['config']['vendor-dir'] ?? 'vendor';
        $vendorDir = rtrim($vendorDir, '/');
        $installedJsonPath = $realInstallationPath . '/' . $vendorDir . '/composer/installed.json';
        if (!is_file($installedJsonPath)) {
            throw MissingInstalledJson::inProjectPath($realInstallationPath . '/' . $vendorDir);
        }
        $jsonContent = file_get_contents($installedJsonPath);
        assert(is_string($jsonContent));
        /** @psalm-var array{packages: list<mixed[]>}|list<mixed[]>|null $installedJson */
        $installedJson = json_decode($jsonContent, \true);
        if (!is_array($composer)) {
            throw FailedToParseJson::inFile($composerJsonPath);
        }
        if (!is_array($installedJson)) {
            throw FailedToParseJson::inFile($installedJsonPath);
        }
        /** @psalm-var list<ComposerPackage> $installed */
        $installed = $installedJson['packages'] ?? $installedJson;
        $classMapPaths = array_merge($this->prefixPaths($this->packageToClassMapPaths($composer), $realInstallationPath . '/'), ...array_map(function (array $package) use($realInstallationPath, $vendorDir) : array {
            return $this->prefixPaths($this->packageToClassMapPaths($package), $this->packagePrefixPath($realInstallationPath, $package, $vendorDir));
        }, $installed));
        $classMapFiles = array_filter($classMapPaths, 'is_file');
        $classMapDirectories = array_values(array_filter($classMapPaths, 'is_dir'));
        $filePaths = array_merge($this->prefixPaths($this->packageToFilePaths($composer), $realInstallationPath . '/'), ...array_map(function (array $package) use($realInstallationPath, $vendorDir) : array {
            return $this->prefixPaths($this->packageToFilePaths($package), $this->packagePrefixPath($realInstallationPath, $package, $vendorDir));
        }, $installed));
        return new AggregateSourceLocator(array_merge([new PsrAutoloaderLocator(Psr4Mapping::fromArrayMappings(array_merge_recursive($this->prefixWithInstallationPath($this->packageToPsr4AutoloadNamespaces($composer), $realInstallationPath), ...array_map(function (array $package) use($realInstallationPath, $vendorDir) : array {
            return $this->prefixWithPackagePath($this->packageToPsr4AutoloadNamespaces($package), $realInstallationPath, $package, $vendorDir);
        }, $installed))), $astLocator), new PsrAutoloaderLocator(Psr0Mapping::fromArrayMappings(array_merge_recursive($this->prefixWithInstallationPath($this->packageToPsr0AutoloadNamespaces($composer), $realInstallationPath), ...array_map(function (array $package) use($realInstallationPath, $vendorDir) : array {
            return $this->prefixWithPackagePath($this->packageToPsr0AutoloadNamespaces($package), $realInstallationPath, $package, $vendorDir);
        }, $installed))), $astLocator), new DirectoriesSourceLocator($classMapDirectories, $astLocator)], ...array_map(static function (string $file) use($astLocator) : array {
            assert($file !== '');
            return [new SingleFileSourceLocator($file, $astLocator)];
        }, array_merge($classMapFiles, $filePaths))));
    }
    /**
     * @param ComposerPackage|Composer $package
     *
     * @return array<string, list<string>>
     */
    private function packageToPsr4AutoloadNamespaces(array $package) : array
    {
        return array_map(static function ($namespacePaths) : array {
            return (array) $namespacePaths;
        }, $package['autoload']['psr-4'] ?? []);
    }
    /**
     * @param ComposerPackage|Composer $package
     *
     * @return array<string, list<string>>
     */
    private function packageToPsr0AutoloadNamespaces(array $package) : array
    {
        return array_map(static function ($namespacePaths) : array {
            return (array) $namespacePaths;
        }, $package['autoload']['psr-0'] ?? []);
    }
    /**
     * @param ComposerPackage|Composer $package
     *
     * @return list<string>
     */
    private function packageToClassMapPaths(array $package) : array
    {
        return $package['autoload']['classmap'] ?? [];
    }
    /**
     * @param ComposerPackage|Composer $package
     *
     * @return list<string>
     */
    private function packageToFilePaths(array $package) : array
    {
        return $package['autoload']['files'] ?? [];
    }
    /** @param ComposerPackage $package */
    private function packagePrefixPath(string $trimmedInstallationPath, array $package, string $vendorDir) : string
    {
        return $trimmedInstallationPath . '/' . $vendorDir . '/' . $package['name'] . '/';
    }
    /**
     * @param array<string, list<string>> $paths
     * @param ComposerPackage             $package $package
     *
     * @return array<string, list<string>>
     */
    private function prefixWithPackagePath(array $paths, string $trimmedInstallationPath, array $package, string $vendorDir) : array
    {
        $prefix = $this->packagePrefixPath($trimmedInstallationPath, $package, $vendorDir);
        return array_map(function (array $paths) use($prefix) : array {
            return $this->prefixPaths($paths, $prefix);
        }, $paths);
    }
    /**
     * @param array<string, list<string>> $paths
     *
     * @return array<string, list<string>>
     */
    private function prefixWithInstallationPath(array $paths, string $trimmedInstallationPath) : array
    {
        return array_map(function (array $paths) use($trimmedInstallationPath) : array {
            return $this->prefixPaths($paths, $trimmedInstallationPath . '/');
        }, $paths);
    }
    /**
     * @param list<string> $paths
     *
     * @return list<string>
     */
    private function prefixPaths(array $paths, string $prefix) : array
    {
        return array_map(static function (string $path) use($prefix) : string {
            return $prefix . $path;
        }, $paths);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr;

use PHPStan\BetterReflection\Identifier\Identifier;
interface PsrAutoloaderMapping
{
    /** @return list<string> */
    public function resolvePossibleFilePaths(Identifier $identifier) : array;
    /** @return list<string> */
    public function directories() : array;
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr;

use PHPStan\BetterReflection\Identifier\Identifier;
use function array_filter;
use function array_keys;
use function array_map;
use function array_merge;
use function array_unique;
use function array_values;
use function ltrim;
use function rtrim;
use function str_replace;
use function strlen;
use function strpos;
use function substr;
use const ARRAY_FILTER_USE_KEY;
final class Psr4Mapping implements \PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\PsrAutoloaderMapping
{
    /** @var array<string, list<string>> */
    private $mappings = [];
    private function __construct()
    {
    }
    /** @param array<string, list<string>> $mappings */
    public static function fromArrayMappings(array $mappings) : self
    {
        $instance = new self();
        $instance->mappings = array_map(static function (array $directories) : array {
            return array_map(static function (string $directory) : string {
                return rtrim($directory, '/');
            }, $directories);
        }, $mappings);
        return $instance;
    }
    /** {@inheritDoc} */
    public function resolvePossibleFilePaths(Identifier $identifier) : array
    {
        if (!$identifier->isClass()) {
            return [];
        }
        $className = $identifier->getName();
        $matchingPrefixes = $this->matchingPrefixes($className);
        return array_values(array_filter(array_merge([], ...array_map(static function (array $paths, string $prefix) use($className) : array {
            $subPath = ltrim(str_replace('\\', '/', substr($className, strlen($prefix))), '/');
            if ($subPath === '') {
                return [];
            }
            return array_map(static function (string $path) use($subPath) : string {
                return $path . '/' . $subPath . '.php';
            }, $paths);
        }, $matchingPrefixes, array_keys($matchingPrefixes)))));
    }
    /** @return array<string, list<string>> */
    private function matchingPrefixes(string $className) : array
    {
        return array_filter($this->mappings, static function (string $prefix) use($className) : bool {
            if ($prefix === '') {
                return \false;
            }
            return strpos($className, $prefix) === 0;
        }, ARRAY_FILTER_USE_KEY);
    }
    /** {@inheritDoc} */
    public function directories() : array
    {
        return array_values(array_unique(array_merge([], ...array_values($this->mappings))));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr;

use PHPStan\BetterReflection\Identifier\Identifier;
use function array_map;
use function array_merge;
use function array_unique;
use function array_values;
use function rtrim;
use function str_replace;
use function strpos;
final class Psr0Mapping implements \PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\PsrAutoloaderMapping
{
    /** @var array<string, list<string>> */
    private $mappings = [];
    private function __construct()
    {
    }
    /** @param array<string, list<string>> $mappings */
    public static function fromArrayMappings(array $mappings) : self
    {
        $instance = new self();
        $instance->mappings = array_map(static function (array $directories) : array {
            return array_map(static function (string $directory) : string {
                return rtrim($directory, '/');
            }, $directories);
        }, $mappings);
        return $instance;
    }
    /** {@inheritDoc} */
    public function resolvePossibleFilePaths(Identifier $identifier) : array
    {
        if (!$identifier->isClass()) {
            return [];
        }
        $className = $identifier->getName();
        foreach ($this->mappings as $prefix => $paths) {
            if ($prefix === '') {
                continue;
            }
            if (strpos($className, $prefix) === 0) {
                return array_map(static function (string $path) use($className) : string {
                    return $path . '/' . str_replace(['\\', '_'], '/', $className) . '.php';
                }, $paths);
            }
        }
        return [];
    }
    /** {@inheritDoc} */
    public function directories() : array
    {
        return array_values(array_unique(array_merge([], ...array_values($this->mappings))));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Exception;

use Throwable;
interface Exception extends Throwable
{
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Exception;

use InvalidArgumentException;
use function sprintf;
class InvalidPrefixMapping extends InvalidArgumentException implements \PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Exception\Exception
{
    public static function emptyPrefixGiven() : self
    {
        return new self('An invalid empty string provided as a PSR mapping prefix');
    }
    public static function emptyPrefixMappingGiven(string $prefix) : self
    {
        return new self(sprintf('An invalid empty list of paths was provided for PSR mapping prefix "%s"', $prefix));
    }
    public static function prefixMappingIsNotADirectory(string $prefix, string $path) : self
    {
        return new self(sprintf('Provided path "%s" for prefix "%s" is not a directory', $prefix, $path));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type\Composer;

use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\Identifier\IdentifierType;
use PHPStan\BetterReflection\Reflection\Reflection;
use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Ast\Locator;
use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation;
use PHPStan\BetterReflection\SourceLocator\FileChecker;
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\PsrAutoloaderMapping;
use PHPStan\BetterReflection\SourceLocator\Type\DirectoriesSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator;
use function file_get_contents;
final class PsrAutoloaderLocator implements SourceLocator
{
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\PsrAutoloaderMapping
     */
    private $mapping;
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\Ast\Locator
     */
    private $astLocator;
    public function __construct(PsrAutoloaderMapping $mapping, Locator $astLocator)
    {
        $this->mapping = $mapping;
        $this->astLocator = $astLocator;
    }
    public function locateIdentifier(Reflector $reflector, Identifier $identifier) : ?\PHPStan\BetterReflection\Reflection\Reflection
    {
        /** @phpstan-var non-empty-string $file */
        foreach ($this->mapping->resolvePossibleFilePaths($identifier) as $file) {
            try {
                FileChecker::assertReadableFile($file);
                return $this->astLocator->findReflection($reflector, new LocatedSource(file_get_contents($file), $identifier->getName(), $file), $identifier);
            } catch (InvalidFileLocation $exception) {
                // Ignore
            } catch (IdentifierNotFound $exception) {
                // on purpose - autoloading is allowed to fail, and silently-failing autoloaders are normal/endorsed
            }
        }
        return null;
    }
    /**
     * Find all identifiers of a type
     *
     * @return list<Reflection>
     */
    public function locateIdentifiersByType(Reflector $reflector, IdentifierType $identifierType) : array
    {
        return (new DirectoriesSourceLocator($this->mapping->directories(), $this->astLocator))->locateIdentifiersByType($reflector, $identifierType);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type;

use Composer\Autoload\ClassLoader;
use InvalidArgumentException;
use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\Identifier\IdentifierType;
use PHPStan\BetterReflection\SourceLocator\Ast\Locator;
use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation;
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
use function file_get_contents;
/**
 * This source locator uses Composer's built-in ClassLoader to locate files.
 *
 * Note that we use ClassLoader->findFile directory, rather than
 * ClassLoader->loadClass because this library has a strict requirement that we
 * do NOT actually load the classes
 */
class ComposerSourceLocator extends \PHPStan\BetterReflection\SourceLocator\Type\AbstractSourceLocator
{
    /**
     * @var \Composer\Autoload\ClassLoader
     */
    private $classLoader;
    public function __construct(ClassLoader $classLoader, Locator $astLocator)
    {
        $this->classLoader = $classLoader;
        parent::__construct($astLocator);
    }
    /**
     * {@inheritDoc}
     *
     * @throws InvalidArgumentException
     * @throws InvalidFileLocation
     */
    protected function createLocatedSource(Identifier $identifier) : ?\PHPStan\BetterReflection\SourceLocator\Located\LocatedSource
    {
        if ($identifier->getType()->getName() !== IdentifierType::IDENTIFIER_CLASS) {
            return null;
        }
        $filename = $this->classLoader->findFile($identifier->getName());
        if (!$filename) {
            return null;
        }
        return new LocatedSource(file_get_contents($filename), $identifier->getName(), $filename);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type;

use RecursiveDirectoryIterator;
use RecursiveIteratorIterator;
use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\Identifier\IdentifierType;
use PHPStan\BetterReflection\Reflection\Reflection;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Ast\Locator;
use PHPStan\BetterReflection\SourceLocator\Exception\InvalidDirectory;
use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileInfo;
use function array_map;
use function is_dir;
/**
 * This source locator recursively loads all php files in an entire directory or multiple directories.
 */
class DirectoriesSourceLocator implements \PHPStan\BetterReflection\SourceLocator\Type\SourceLocator
{
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator
     */
    private $aggregateSourceLocator;
    /**
     * @param list<string> $directories directories to scan
     *
     * @throws InvalidDirectory
     * @throws InvalidFileInfo
     */
    public function __construct(array $directories, Locator $astLocator)
    {
        $this->aggregateSourceLocator = new \PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator(array_map(static function (string $directory) use($astLocator) : \PHPStan\BetterReflection\SourceLocator\Type\FileIteratorSourceLocator {
            if (!is_dir($directory)) {
                throw InvalidDirectory::fromNonDirectory($directory);
            }
            return new \PHPStan\BetterReflection\SourceLocator\Type\FileIteratorSourceLocator(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory, RecursiveDirectoryIterator::SKIP_DOTS)), $astLocator);
        }, $directories));
    }
    public function locateIdentifier(Reflector $reflector, Identifier $identifier) : ?\PHPStan\BetterReflection\Reflection\Reflection
    {
        return $this->aggregateSourceLocator->locateIdentifier($reflector, $identifier);
    }
    /**
     * {@inheritDoc}
     */
    public function locateIdentifiersByType(Reflector $reflector, IdentifierType $identifierType) : array
    {
        return $this->aggregateSourceLocator->locateIdentifiersByType($reflector, $identifierType);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type;

use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\Identifier\IdentifierType;
use PHPStan\BetterReflection\Reflection\Reflection;
use PHPStan\BetterReflection\Reflector\Reflector;
interface SourceLocator
{
    /**
     * Locate some source code.
     *
     * This method should return a LocatedSource value object or `null` if the
     * SourceLocator is unable to locate the source.
     *
     * NOTE: A SourceLocator should *NOT* throw an exception if it is unable to
     * locate the identifier, it should simply return null. If an exception is
     * thrown, it will break the Generic Reflector.
     */
    public function locateIdentifier(Reflector $reflector, Identifier $identifier) : ?\PHPStan\BetterReflection\Reflection\Reflection;
    /**
     * Find all identifiers of a type
     *
     * @return list<Reflection>
     */
    public function locateIdentifiersByType(Reflector $reflector, IdentifierType $identifierType) : array;
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type;

use InvalidArgumentException;
use PhpParser\Node;
use PhpParser\NodeTraverser;
use PhpParser\NodeVisitor\NameResolver;
use PhpParser\NodeVisitorAbstract;
use PhpParser\Parser;
use ReflectionClass;
use ReflectionException;
use ReflectionFunction;
use PHPStan\BetterReflection\BetterReflection;
use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\Reflection\Exception\InvalidConstantNode;
use PHPStan\BetterReflection\SourceLocator\Ast\Locator as AstLocator;
use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation;
use PHPStan\BetterReflection\SourceLocator\FileChecker;
use PHPStan\BetterReflection\SourceLocator\Located\AliasLocatedSource;
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
use PHPStan\BetterReflection\SourceLocator\Type\AutoloadSourceLocator\FileReadTrapStreamWrapper;
use PHPStan\BetterReflection\Util\ClassExistenceChecker;
use PHPStan\BetterReflection\Util\ConstantNodeChecker;
use function array_key_exists;
use function array_reverse;
use function assert;
use function defined;
use function file_get_contents;
use function function_exists;
use function get_defined_constants;
use function get_included_files;
use function is_file;
use function is_string;
use function restore_error_handler;
use function set_error_handler;
use function spl_autoload_functions;
use function strtolower;
/**
 * Use PHP's built in autoloader to locate a class, without actually loading.
 *
 * There are some prerequisites...
 *   - we expect the autoloader to load classes from a file (i.e. using require/include)
 *   - your autoloader of choice does not replace stream wrappers
 */
class AutoloadSourceLocator extends \PHPStan\BetterReflection\SourceLocator\Type\AbstractSourceLocator
{
    /**
     * @var \PhpParser\Parser
     */
    private $phpParser;
    /**
     * @var \PhpParser\NodeTraverser
     */
    private $nodeTraverser;
    /**
     * @var \PhpParser\NodeVisitorAbstract
     */
    private $constantVisitor;
    public function __construct($astLocator = null, ?\PhpParser\Parser $phpParser = null)
    {
        $betterReflection = new BetterReflection();
        parent::__construct($astLocator ?? $betterReflection->astLocator());
        $this->phpParser = $phpParser ?? $betterReflection->phpParser();
        $this->constantVisitor = $this->createConstantVisitor();
        $this->nodeTraverser = new NodeTraverser();
        $this->nodeTraverser->addVisitor(new NameResolver());
        $this->nodeTraverser->addVisitor($this->constantVisitor);
    }
    /**
     * {@inheritDoc}
     *
     * @throws InvalidArgumentException
     * @throws InvalidFileLocation
     */
    protected function createLocatedSource(Identifier $identifier) : ?\PHPStan\BetterReflection\SourceLocator\Located\LocatedSource
    {
        $locatedData = $this->attemptAutoloadForIdentifier($identifier);
        if ($locatedData === null) {
            return null;
        }
        if (!is_file($locatedData['fileName'])) {
            return null;
        }
        if (strtolower($identifier->getName()) !== strtolower($locatedData['name'])) {
            return new AliasLocatedSource(file_get_contents($locatedData['fileName']), $locatedData['name'], $locatedData['fileName'], $identifier->getName());
        }
        return new LocatedSource(file_get_contents($locatedData['fileName']), $identifier->getName(), $locatedData['fileName']);
    }
    /**
     * Attempts to locate the specified identifier.
     *
     * @return array{fileName: string, name: string}|null
     *
     * @throws ReflectionException
     */
    private function attemptAutoloadForIdentifier(Identifier $identifier) : ?array
    {
        if ($identifier->isClass()) {
            return $this->locateClassByName($identifier->getName());
        }
        if ($identifier->isFunction()) {
            return $this->locateFunctionByName($identifier->getName());
        }
        if ($identifier->isConstant()) {
            return $this->locateConstantByName($identifier->getName());
        }
        return null;
    }
    /**
     * Attempt to locate a class by name.
     *
     * If class already exists, simply use internal reflection API to get the
     * filename and store it.
     *
     * If class does not exist, we make an assumption that whatever autoloaders
     * that are registered will be loading a file. We then override the file://
     * protocol stream wrapper to "capture" the filename we expect the class to
     * be in, and then restore it. Note that class_exists will cause an error
     * that it cannot find the file, so we squelch the errors by overriding the
     * error handler temporarily.
     *
     * Note: the following code is designed so that the first hit on an actual
     *       **file** leads to a path being resolved. No actual autoloading nor
     *       file reading should happen, and most certainly no other classes
     *       should exist after execution. The only filesystem access is to
     *       check whether the file exists.
     *
     * @return array{fileName: string, name: string}|null
     *
     * @throws ReflectionException
     */
    private function locateClassByName(string $className) : ?array
    {
        if (ClassExistenceChecker::exists($className, \false)) {
            $classReflection = new ReflectionClass($className);
            $filename = $classReflection->getFileName();
            if (!is_string($filename)) {
                return null;
            }
            return ['fileName' => $filename, 'name' => $classReflection->getName()];
        }
        $this->silenceErrors();
        try {
            $locatedFile = FileReadTrapStreamWrapper::withStreamWrapperOverride(static function () use($className) : ?string {
                foreach (spl_autoload_functions() as $preExistingAutoloader) {
                    $preExistingAutoloader($className);
                    /**
                     * This static variable is populated by the side-effect of the stream wrapper
                     * trying to read the file path when `include()` is used by an autoloader.
                     *
                     * This will not be `null` when the autoloader tried to read a file.
                     */
                    if (FileReadTrapStreamWrapper::$autoloadLocatedFile !== null) {
                        return FileReadTrapStreamWrapper::$autoloadLocatedFile;
                    }
                }
                return null;
            });
            if ($locatedFile === null) {
                return null;
            }
            return ['fileName' => $locatedFile, 'name' => $className];
        } finally {
            restore_error_handler();
        }
    }
    private function silenceErrors() : void
    {
        set_error_handler(static function () : bool {
            return \true;
        });
    }
    /**
     * We can only load functions if they already exist, because PHP does not
     * have function autoloading. Therefore if it exists, we simply use the
     * internal reflection API to find the filename. If it doesn't we can do
     * nothing so throw an exception.
     *
     * @return array{fileName: string, name: string}|null
     *
     * @throws ReflectionException
     */
    private function locateFunctionByName(string $functionName) : ?array
    {
        if (!function_exists($functionName)) {
            return null;
        }
        $reflectionFileName = (new ReflectionFunction($functionName))->getFileName();
        if (!is_string($reflectionFileName)) {
            return null;
        }
        return ['fileName' => $reflectionFileName, 'name' => $functionName];
    }
    /**
     * We can only load constants if they already exist, because PHP does not
     * have constant autoloading. Therefore if it exists, we simply use brute force
     * to search throughout all included files to find the right filename.
     *
     * @return array{fileName: string, name: string}|null
     */
    private function locateConstantByName(string $constantName) : ?array
    {
        if (!defined($constantName)) {
            return null;
        }
        /** @var array<string, array<string, scalar|list<scalar>|resource|null>> $constants */
        $constants = get_defined_constants(\true);
        if (!array_key_exists($constantName, $constants['user'])) {
            return null;
        }
        /** @psalm-suppress UndefinedMethod */
        $this->constantVisitor->setConstantName($constantName);
        $constantFileName = null;
        // Note: looking at files in reverse order, since newer files are more likely to have
        //       defined a constant that is being looked up. Earlier files are possibly related
        //       to libraries/frameworks that we rely upon.
        // @infection-ignore-all UnwrapArrayReverse: Ignore because the result is some with or without array_reverse()
        /** @phpstan-var non-empty-string $includedFileName */
        foreach (array_reverse(get_included_files()) as $includedFileName) {
            try {
                FileChecker::assertReadableFile($includedFileName);
            } catch (InvalidFileLocation $exception) {
                continue;
            }
            /** @var list<Node\Stmt> $ast */
            $ast = $this->phpParser->parse(file_get_contents($includedFileName));
            $this->nodeTraverser->traverse($ast);
            /** @psalm-suppress UndefinedMethod */
            if ($this->constantVisitor->getNode() !== null) {
                $constantFileName = $includedFileName;
                break;
            }
        }
        if ($constantFileName === null) {
            return null;
        }
        return ['fileName' => $constantFileName, 'name' => $constantName];
    }
    private function createConstantVisitor() : NodeVisitorAbstract
    {
        return new class extends NodeVisitorAbstract
        {
            /**
             * @var string|null
             */
            private $constantName = null;
            /**
             * @var \PhpParser\Node\Stmt\Const_|\PhpParser\Node\Expr\FuncCall|null
             */
            private $node = null;
            public function enterNode(Node $node) : ?int
            {
                if ($node instanceof Node\Stmt\Const_) {
                    foreach ($node->consts as $constNode) {
                        if ((($constNodeNamespacedName = $constNode->namespacedName) ? $constNodeNamespacedName->toString() : null) === $this->constantName) {
                            $this->node = $node;
                            return NodeTraverser::STOP_TRAVERSAL;
                        }
                    }
                    return NodeTraverser::DONT_TRAVERSE_CHILDREN;
                }
                if ($node instanceof Node\Expr\FuncCall) {
                    try {
                        /** @psalm-suppress InternalClass, InternalMethod */
                        ConstantNodeChecker::assertValidDefineFunctionCall($node);
                    } catch (InvalidConstantNode $exception) {
                        return null;
                    }
                    $argumentNameNode = $node->args[0];
                    assert($argumentNameNode instanceof Node\Arg);
                    $nameNode = $argumentNameNode->value;
                    assert($nameNode instanceof Node\Scalar\String_);
                    if ($nameNode->value === $this->constantName) {
                        $this->node = $node;
                        return NodeTraverser::STOP_TRAVERSAL;
                    }
                }
                return null;
            }
            public function setConstantName(string $constantName) : void
            {
                $this->constantName = $constantName;
            }
            /** @return Node\Stmt\Const_|Node\Expr\FuncCall|null */
            public function getNode()
            {
                return $this->node;
            }
        };
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type;

use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\Identifier\IdentifierType;
use PHPStan\BetterReflection\Reflection\Reflection;
use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Ast\Exception\ParseToAstFailure;
use PHPStan\BetterReflection\SourceLocator\Ast\Locator as AstLocator;
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
abstract class AbstractSourceLocator implements \PHPStan\BetterReflection\SourceLocator\Type\SourceLocator
{
    /**
     * @var AstLocator
     */
    private $astLocator;
    /**
     * Children should implement this method and return a LocatedSource object
     * which contains the source and the file from which it was located.
     *
     * @example
     *   return new LocatedSource(['<?php class Foo {}', null]);
     *   return new LocatedSource([\file_get_contents('Foo.php'), 'Foo.php']);
     */
    protected abstract function createLocatedSource(Identifier $identifier) : ?\PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
    public function __construct(AstLocator $astLocator)
    {
        $this->astLocator = $astLocator;
    }
    /**
     * {@inheritDoc}
     *
     * @throws ParseToAstFailure
     */
    public function locateIdentifier(Reflector $reflector, Identifier $identifier) : ?\PHPStan\BetterReflection\Reflection\Reflection
    {
        $locatedSource = $this->createLocatedSource($identifier);
        if (!$locatedSource) {
            return null;
        }
        try {
            return $this->astLocator->findReflection($reflector, $locatedSource, $identifier);
        } catch (IdentifierNotFound $exception) {
            return null;
        }
    }
    /**
     * {@inheritDoc}
     *
     * @throws ParseToAstFailure
     */
    public final function locateIdentifiersByType(Reflector $reflector, IdentifierType $identifierType) : array
    {
        $locatedSource = $this->createLocatedSource(new Identifier(Identifier::WILDCARD, $identifierType));
        if (!$locatedSource) {
            return [];
        }
        return $this->astLocator->findReflectionsOfType($reflector, $locatedSource, $identifierType);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type;

use Closure;
use PhpParser\Node;
use PhpParser\Node\Stmt\Namespace_;
use PhpParser\NodeTraverser;
use PhpParser\NodeVisitor\NameResolver;
use PhpParser\NodeVisitorAbstract;
use PhpParser\Parser;
use ReflectionFunction as CoreFunctionReflection;
use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\Identifier\IdentifierType;
use PHPStan\BetterReflection\Reflection\Reflection;
use PHPStan\BetterReflection\Reflection\ReflectionFunction;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Ast\Exception\ParseToAstFailure;
use PHPStan\BetterReflection\SourceLocator\Ast\Strategy\NodeToReflection;
use PHPStan\BetterReflection\SourceLocator\Exception\EvaledClosureCannotBeLocated;
use PHPStan\BetterReflection\SourceLocator\Exception\NoClosureOnLine;
use PHPStan\BetterReflection\SourceLocator\Exception\TwoClosuresOnSameLine;
use PHPStan\BetterReflection\SourceLocator\FileChecker;
use PHPStan\BetterReflection\SourceLocator\Located\AnonymousLocatedSource;
use PHPStan\BetterReflection\Util\FileHelper;
use function array_filter;
use function assert;
use function file_get_contents;
use function strpos;
/** @internal */
final class ClosureSourceLocator implements \PHPStan\BetterReflection\SourceLocator\Type\SourceLocator
{
    /**
     * @var CoreFunctionReflection
     */
    private $coreFunctionReflection;
    /**
     * @var \PhpParser\Parser
     */
    private $parser;
    public function __construct(Closure $closure, Parser $parser)
    {
        $this->parser = $parser;
        $this->coreFunctionReflection = new CoreFunctionReflection($closure);
    }
    /**
     * {@inheritDoc}
     *
     * @throws ParseToAstFailure
     */
    public function locateIdentifier(Reflector $reflector, Identifier $identifier) : ?\PHPStan\BetterReflection\Reflection\Reflection
    {
        return $this->getReflectionFunction($reflector, $identifier->getType());
    }
    /**
     * {@inheritDoc}
     *
     * @throws ParseToAstFailure
     */
    public function locateIdentifiersByType(Reflector $reflector, IdentifierType $identifierType) : array
    {
        return array_filter([$this->getReflectionFunction($reflector, $identifierType)]);
    }
    private function getReflectionFunction(Reflector $reflector, IdentifierType $identifierType) : ?\PHPStan\BetterReflection\Reflection\ReflectionFunction
    {
        if (!$identifierType->isFunction()) {
            return null;
        }
        /** @phpstan-var non-empty-string $fileName */
        $fileName = $this->coreFunctionReflection->getFileName();
        if (strpos($fileName, 'eval()\'d code') !== \false) {
            throw EvaledClosureCannotBeLocated::create();
        }
        FileChecker::assertReadableFile($fileName);
        $fileName = FileHelper::normalizeWindowsPath($fileName);
        $nodeVisitor = new class($fileName, $this->coreFunctionReflection->getStartLine()) extends NodeVisitorAbstract
        {
            /** @var list<array{node: Node\Expr\Closure|Node\Expr\ArrowFunction, namespace: Namespace_|null}> */
            private $closureNodes = [];
            /**
             * @var \PhpParser\Node\Stmt\Namespace_|null
             */
            private $currentNamespace = null;
            /**
             * @var string
             */
            private $fileName;
            /**
             * @var int
             */
            private $startLine;
            public function __construct(string $fileName, int $startLine)
            {
                $this->fileName = $fileName;
                $this->startLine = $startLine;
            }
            /**
             * {@inheritDoc}
             */
            public function enterNode(Node $node)
            {
                if ($node instanceof Namespace_) {
                    $this->currentNamespace = $node;
                    return null;
                }
                if ($node->getStartLine() === $this->startLine && ($node instanceof Node\Expr\Closure || $node instanceof Node\Expr\ArrowFunction)) {
                    $this->closureNodes[] = ['node' => $node, 'namespace' => $this->currentNamespace];
                }
                return null;
            }
            /**
             * {@inheritDoc}
             */
            public function leaveNode(Node $node)
            {
                if (!$node instanceof Namespace_) {
                    return null;
                }
                $this->currentNamespace = null;
                return null;
            }
            /**
             * @return array{node: Node\Expr\Closure|Node\Expr\ArrowFunction, namespace: Namespace_|null}
             *
             * @throws NoClosureOnLine
             * @throws TwoClosuresOnSameLine
             */
            public function getClosureNodes() : array
            {
                if ($this->closureNodes === []) {
                    throw NoClosureOnLine::create($this->fileName, $this->startLine);
                }
                if (isset($this->closureNodes[1])) {
                    throw TwoClosuresOnSameLine::create($this->fileName, $this->startLine);
                }
                return $this->closureNodes[0];
            }
        };
        $fileContents = file_get_contents($fileName);
        /** @var list<Node\Stmt> $ast */
        $ast = $this->parser->parse($fileContents);
        $nodeTraverser = new NodeTraverser();
        $nodeTraverser->addVisitor(new NameResolver());
        $nodeTraverser->addVisitor($nodeVisitor);
        $nodeTraverser->traverse($ast);
        $closureNodes = $nodeVisitor->getClosureNodes();
        $reflectionFunction = (new NodeToReflection())->__invoke($reflector, $closureNodes['node'], new AnonymousLocatedSource($fileContents, $fileName), $closureNodes['namespace']);
        assert($reflectionFunction instanceof ReflectionFunction);
        return $reflectionFunction;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type;

use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\Identifier\IdentifierType;
use PHPStan\BetterReflection\Reflection\Reflection;
use PHPStan\BetterReflection\Reflector\Reflector;
use function array_key_exists;
use function spl_object_hash;
use function sprintf;
final class MemoizingSourceLocator implements \PHPStan\BetterReflection\SourceLocator\Type\SourceLocator
{
    /** @var array<string, Reflection|null> indexed by reflector key and identifier cache key */
    private $cacheByIdentifierKeyAndOid = [];
    /** @var array<string, list<Reflection>> indexed by reflector key and identifier type cache key */
    private $cacheByIdentifierTypeKeyAndOid = [];
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\Type\SourceLocator
     */
    private $wrappedSourceLocator;
    public function __construct(\PHPStan\BetterReflection\SourceLocator\Type\SourceLocator $wrappedSourceLocator)
    {
        $this->wrappedSourceLocator = $wrappedSourceLocator;
    }
    public function locateIdentifier(Reflector $reflector, Identifier $identifier) : ?\PHPStan\BetterReflection\Reflection\Reflection
    {
        $cacheKey = sprintf('%s_%s', $this->reflectorCacheKey($reflector), $this->identifierToCacheKey($identifier));
        if (array_key_exists($cacheKey, $this->cacheByIdentifierKeyAndOid)) {
            return $this->cacheByIdentifierKeyAndOid[$cacheKey];
        }
        return $this->cacheByIdentifierKeyAndOid[$cacheKey] = $this->wrappedSourceLocator->locateIdentifier($reflector, $identifier);
    }
    /** @return list<Reflection> */
    public function locateIdentifiersByType(Reflector $reflector, IdentifierType $identifierType) : array
    {
        $cacheKey = sprintf('%s_%s', $this->reflectorCacheKey($reflector), $this->identifierTypeToCacheKey($identifierType));
        if (array_key_exists($cacheKey, $this->cacheByIdentifierTypeKeyAndOid)) {
            return $this->cacheByIdentifierTypeKeyAndOid[$cacheKey];
        }
        return $this->cacheByIdentifierTypeKeyAndOid[$cacheKey] = $this->wrappedSourceLocator->locateIdentifiersByType($reflector, $identifierType);
    }
    private function reflectorCacheKey(Reflector $reflector) : string
    {
        return sprintf('type:%s#oid:%s', \get_class($reflector), spl_object_hash($reflector));
    }
    private function identifierToCacheKey(Identifier $identifier) : string
    {
        return sprintf('%s#name:%s', $this->identifierTypeToCacheKey($identifier->getType()), $identifier->getName());
    }
    private function identifierTypeToCacheKey(IdentifierType $identifierType) : string
    {
        return sprintf('type:%s', $identifierType->getName());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type;

use PhpParser\Node;
use PhpParser\Node\Stmt\Class_;
use PhpParser\NodeTraverser;
use PhpParser\NodeVisitor\NameResolver;
use PhpParser\NodeVisitorAbstract;
use PhpParser\Parser;
use ReflectionClass as CoreReflectionClass;
use ReflectionException;
use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\Identifier\IdentifierType;
use PHPStan\BetterReflection\Reflection\Reflection;
use PHPStan\BetterReflection\Reflection\ReflectionClass;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Ast\Exception\ParseToAstFailure;
use PHPStan\BetterReflection\SourceLocator\Ast\Strategy\NodeToReflection;
use PHPStan\BetterReflection\SourceLocator\Exception\EvaledAnonymousClassCannotBeLocated;
use PHPStan\BetterReflection\SourceLocator\Exception\NoAnonymousClassOnLine;
use PHPStan\BetterReflection\SourceLocator\Exception\TwoAnonymousClassesOnSameLine;
use PHPStan\BetterReflection\SourceLocator\FileChecker;
use PHPStan\BetterReflection\SourceLocator\Located\AnonymousLocatedSource;
use PHPStan\BetterReflection\Util\FileHelper;
use function array_filter;
use function assert;
use function file_get_contents;
use function strpos;
/** @internal */
final class AnonymousClassObjectSourceLocator implements \PHPStan\BetterReflection\SourceLocator\Type\SourceLocator
{
    /**
     * @var CoreReflectionClass
     */
    private $coreClassReflection;
    /**
     * @var \PhpParser\Parser
     */
    private $parser;
    /** @throws ReflectionException */
    public function __construct(object $anonymousClassObject, Parser $parser)
    {
        $this->parser = $parser;
        $this->coreClassReflection = new CoreReflectionClass($anonymousClassObject);
    }
    /**
     * {@inheritDoc}
     *
     * @throws ParseToAstFailure
     */
    public function locateIdentifier(Reflector $reflector, Identifier $identifier) : ?\PHPStan\BetterReflection\Reflection\Reflection
    {
        return $this->getReflectionClass($reflector, $identifier->getType());
    }
    /**
     * {@inheritDoc}
     *
     * @throws ParseToAstFailure
     */
    public function locateIdentifiersByType(Reflector $reflector, IdentifierType $identifierType) : array
    {
        return array_filter([$this->getReflectionClass($reflector, $identifierType)]);
    }
    private function getReflectionClass(Reflector $reflector, IdentifierType $identifierType) : ?\PHPStan\BetterReflection\Reflection\ReflectionClass
    {
        if (!$identifierType->isClass()) {
            return null;
        }
        if (!$this->coreClassReflection->isAnonymous()) {
            return null;
        }
        /** @phpstan-var non-empty-string $fileName */
        $fileName = $this->coreClassReflection->getFileName();
        if (strpos($fileName, 'eval()\'d code') !== \false) {
            throw EvaledAnonymousClassCannotBeLocated::create();
        }
        FileChecker::assertReadableFile($fileName);
        $fileName = FileHelper::normalizeWindowsPath($fileName);
        $nodeVisitor = new class($fileName, $this->coreClassReflection->getStartLine()) extends NodeVisitorAbstract
        {
            /** @var list<Class_> */
            private $anonymousClassNodes = [];
            /**
             * @var string
             */
            private $fileName;
            /**
             * @var int
             */
            private $startLine;
            public function __construct(string $fileName, int $startLine)
            {
                $this->fileName = $fileName;
                $this->startLine = $startLine;
            }
            /**
             * {@inheritDoc}
             */
            public function enterNode(Node $node)
            {
                if (!$node instanceof Node\Stmt\Class_ || $node->name !== null || $node->getLine() !== $this->startLine) {
                    return null;
                }
                $this->anonymousClassNodes[] = $node;
                return null;
            }
            public function getAnonymousClassNode() : Class_
            {
                if ($this->anonymousClassNodes === []) {
                    throw NoAnonymousClassOnLine::create($this->fileName, $this->startLine);
                }
                if (isset($this->anonymousClassNodes[1])) {
                    throw TwoAnonymousClassesOnSameLine::create($this->fileName, $this->startLine);
                }
                return $this->anonymousClassNodes[0];
            }
        };
        $fileContents = file_get_contents($fileName);
        /** @var list<Node\Stmt> $ast */
        $ast = $this->parser->parse($fileContents);
        $nodeTraverser = new NodeTraverser();
        $nodeTraverser->addVisitor(new NameResolver());
        $nodeTraverser->addVisitor($nodeVisitor);
        $nodeTraverser->traverse($ast);
        $reflectionClass = (new NodeToReflection())->__invoke($reflector, $nodeVisitor->getAnonymousClassNode(), new AnonymousLocatedSource($fileContents, $fileName), null);
        assert($reflectionClass instanceof ReflectionClass);
        return $reflectionClass;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type;

use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\Identifier\IdentifierType;
use PHPStan\BetterReflection\Reflection\Reflection;
use PHPStan\BetterReflection\Reflector\Reflector;
use function array_map;
use function array_merge;
class AggregateSourceLocator implements \PHPStan\BetterReflection\SourceLocator\Type\SourceLocator
{
    /**
     * @var list<SourceLocator>
     */
    private $sourceLocators = [];
    /** @param list<SourceLocator> $sourceLocators */
    public function __construct(array $sourceLocators = [])
    {
        $this->sourceLocators = $sourceLocators;
    }
    public function locateIdentifier(Reflector $reflector, Identifier $identifier) : ?\PHPStan\BetterReflection\Reflection\Reflection
    {
        foreach ($this->sourceLocators as $sourceLocator) {
            $located = $sourceLocator->locateIdentifier($reflector, $identifier);
            if ($located) {
                return $located;
            }
        }
        return null;
    }
    /**
     * {@inheritDoc}
     */
    public function locateIdentifiersByType(Reflector $reflector, IdentifierType $identifierType) : array
    {
        return array_merge([], ...array_map(static function (\PHPStan\BetterReflection\SourceLocator\Type\SourceLocator $sourceLocator) use($reflector, $identifierType) : array {
            return $sourceLocator->locateIdentifiersByType($reflector, $identifierType);
        }, $this->sourceLocators));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type\AutoloadSourceLocator;

use LogicException;
use function sprintf;
use function stat;
use function stream_wrapper_register;
use function stream_wrapper_restore;
use function stream_wrapper_unregister;
use const STREAM_URL_STAT_QUIET;
/**
 * This class will operate as a stream wrapper, intercepting any access to a file while
 * in operation.
 *
 * @internal DO NOT USE: this is an implementation detail of
 *           the {@see \PHPStan\BetterReflection\SourceLocator\Type\AutoloadSourceLocator}
 *
 * phpcs:disable SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
 * phpcs:disable PSR1.Methods.CamelCapsMethodName.NotCamelCaps
 * phpcs:disable Squiz.NamingConventions.ValidVariableName.NotCamelCaps
 *
 * @psalm-suppress MissingConstructor
 */
final class FileReadTrapStreamWrapper
{
    private const DEFAULT_STREAM_WRAPPER_PROTOCOLS = ['file', 'phar'];
    /** @var list<string>|null */
    private static $registeredStreamWrapperProtocols = null;
    /**
     * Read this property to determine the last file on which reads were attempted
     *
     * @psalm-readonly
     * @psalm-allow-private-mutation
     * @var string|null
     */
    public static $autoloadLocatedFile = null;
    /** @var resource */
    public $context;
    /**
     * @param callable() : ExecutedMethodReturnType $executeMeWithinStreamWrapperOverride
     * @param list<string>                          $streamWrapperProtocols
     *
     * @psalm-return ExecutedMethodReturnType
     *
     * @psalm-template ExecutedMethodReturnType of mixed
     * @return mixed
     */
    public static function withStreamWrapperOverride(callable $executeMeWithinStreamWrapperOverride, array $streamWrapperProtocols = self::DEFAULT_STREAM_WRAPPER_PROTOCOLS)
    {
        self::$registeredStreamWrapperProtocols = $streamWrapperProtocols;
        self::$autoloadLocatedFile = null;
        try {
            foreach ($streamWrapperProtocols as $protocol) {
                stream_wrapper_unregister($protocol);
                stream_wrapper_register($protocol, self::class);
            }
            $result = $executeMeWithinStreamWrapperOverride();
        } finally {
            foreach ($streamWrapperProtocols as $protocol) {
                @stream_wrapper_restore($protocol);
            }
            self::$registeredStreamWrapperProtocols = null;
            self::$autoloadLocatedFile = null;
        }
        return $result;
    }
    /**
     * Our wrapper simply records which file we tried to load and returns
     * boolean false indicating failure.
     *
     * @internal do not call this method directly! This is stream wrapper
     *           voodoo logic that you **DO NOT** want to touch!
     *
     * @see https://php.net/manual/en/class.streamwrapper.php
     * @see https://php.net/manual/en/streamwrapper.stream-open.php
     *
     * @param string $path
     * @param string $mode
     * @param int    $options
     * @param string $opened_path
     */
    public function stream_open($path, $mode, $options, &$opened_path) : bool
    {
        self::$autoloadLocatedFile = $path;
        // @infection-ignore-all FalseValue
        return \false;
    }
    /**
     * url_stat is triggered by calls like "file_exists". The call to "file_exists" must not be overloaded.
     * This function restores the original "file" stream, issues a call to "stat" to get the real results,
     * and then re-registers the AutoloadSourceLocator stream wrapper.
     *
     * @internal do not call this method directly! This is stream wrapper
     *           voodoo logic that you **DO NOT** want to touch!
     *
     * @see https://php.net/manual/en/class.streamwrapper.php
     * @see https://php.net/manual/en/streamwrapper.url-stat.php
     *
     * @param string $path
     * @param int    $flags
     *
     * @return mixed[]|bool
     */
    public function url_stat($path, $flags)
    {
        if (self::$registeredStreamWrapperProtocols === null) {
            throw new LogicException(sprintf('%s not registered: cannot operate. Do not call this method directly.', self::class));
        }
        foreach (self::$registeredStreamWrapperProtocols as $protocol) {
            stream_wrapper_restore($protocol);
        }
        if (($flags & STREAM_URL_STAT_QUIET) === STREAM_URL_STAT_QUIET) {
            $result = @stat($path);
        } else {
            $result = stat($path);
        }
        foreach (self::$registeredStreamWrapperProtocols as $protocol) {
            stream_wrapper_unregister($protocol);
            stream_wrapper_register($protocol, self::class);
        }
        return $result;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type;

use InvalidArgumentException;
use ReflectionClass;
use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\SourceLocator\Ast\Locator;
use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation;
use PHPStan\BetterReflection\SourceLocator\Located\EvaledLocatedSource;
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
use PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber;
use PHPStan\BetterReflection\Util\ClassExistenceChecker;
use function is_file;
final class EvaledCodeSourceLocator extends \PHPStan\BetterReflection\SourceLocator\Type\AbstractSourceLocator
{
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber
     */
    private $stubber;
    public function __construct(Locator $astLocator, SourceStubber $stubber)
    {
        $this->stubber = $stubber;
        parent::__construct($astLocator);
    }
    /**
     * {@inheritDoc}
     *
     * @throws InvalidArgumentException
     * @throws InvalidFileLocation
     */
    protected function createLocatedSource(Identifier $identifier) : ?\PHPStan\BetterReflection\SourceLocator\Located\LocatedSource
    {
        $classReflection = $this->getInternalReflectionClass($identifier);
        if ($classReflection === null) {
            return null;
        }
        $stubData = $this->stubber->generateClassStub($classReflection->getName());
        if ($stubData === null) {
            return null;
        }
        return new EvaledLocatedSource($stubData->getStub(), $classReflection->getName());
    }
    private function getInternalReflectionClass(Identifier $identifier) : ?\ReflectionClass
    {
        if (!$identifier->isClass()) {
            return null;
        }
        /** @psalm-var class-string|trait-string $name */
        $name = $identifier->getName();
        if (!ClassExistenceChecker::exists($name, \false)) {
            return null;
            // not an available internal class
        }
        $reflection = new ReflectionClass($name);
        $sourceFile = $reflection->getFileName();
        return $sourceFile && is_file($sourceFile) ? null : $reflection;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type;

use Iterator;
use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\Identifier\IdentifierType;
use PHPStan\BetterReflection\Reflection\Reflection;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Ast\Locator;
use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileInfo;
use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation;
use SplFileInfo;
use function array_filter;
use function array_map;
use function array_values;
use function assert;
use function is_string;
use function iterator_to_array;
use function pathinfo;
use const PATHINFO_EXTENSION;
/**
 * This source locator loads all php files from \FileSystemIterator
 */
class FileIteratorSourceLocator implements \PHPStan\BetterReflection\SourceLocator\Type\SourceLocator
{
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator|null
     */
    private $aggregateSourceLocator = null;
    /** @var Iterator<SplFileInfo> */
    private $fileSystemIterator;
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\Ast\Locator
     */
    private $astLocator;
    /**
     * @param Iterator<SplFileInfo> $fileInfoIterator note: only SplFileInfo allowed in this iterator
     *
     * @throws InvalidFileInfo In case of iterator not contains only SplFileInfo.
     */
    public function __construct(Iterator $fileInfoIterator, Locator $astLocator)
    {
        $this->astLocator = $astLocator;
        foreach ($fileInfoIterator as $fileInfo) {
            if (!$fileInfo instanceof SplFileInfo) {
                throw InvalidFileInfo::fromNonSplFileInfo($fileInfo);
            }
        }
        $this->fileSystemIterator = $fileInfoIterator;
    }
    /** @throws InvalidFileLocation */
    private function getAggregatedSourceLocator() : \PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator
    {
        // @infection-ignore-all Coalesce: There's no difference, it's just optimization
        return $this->aggregateSourceLocator ?? ($this->aggregateSourceLocator = new \PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator(array_values(array_filter(array_map(function (SplFileInfo $item) : ?\PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator {
            $realPath = $item->getRealPath();
            assert(is_string($realPath) && $realPath !== '');
            if (!($item->isFile() && pathinfo($realPath, PATHINFO_EXTENSION) === 'php')) {
                return null;
            }
            return new \PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator($realPath, $this->astLocator);
        }, iterator_to_array($this->fileSystemIterator))))));
    }
    /**
     * {@inheritDoc}
     *
     * @throws InvalidFileLocation
     */
    public function locateIdentifier(Reflector $reflector, Identifier $identifier) : ?\PHPStan\BetterReflection\Reflection\Reflection
    {
        return $this->getAggregatedSourceLocator()->locateIdentifier($reflector, $identifier);
    }
    /**
     * {@inheritDoc}
     *
     * @throws InvalidFileLocation
     */
    public function locateIdentifiersByType(Reflector $reflector, IdentifierType $identifierType) : array
    {
        return $this->getAggregatedSourceLocator()->locateIdentifiersByType($reflector, $identifierType);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type;

use InvalidArgumentException;
use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\SourceLocator\Ast\Locator;
use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation;
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
/**
 * This source locator simply parses the string given in the constructor as
 * valid PHP.
 *
 * Note that this source locator does NOT specify a filename, because we did
 * not load it from a file, so it will be null if you use this locator.
 */
class StringSourceLocator extends \PHPStan\BetterReflection\SourceLocator\Type\AbstractSourceLocator
{
    /**
     * @var non-empty-string
     */
    private $source;
    /** @param non-empty-string $source */
    public function __construct(string $source, Locator $astLocator)
    {
        $this->source = $source;
        parent::__construct($astLocator);
    }
    /**
     * {@inheritDoc}
     *
     * @throws InvalidArgumentException
     * @throws InvalidFileLocation
     */
    protected function createLocatedSource(Identifier $identifier) : ?\PHPStan\BetterReflection\SourceLocator\Located\LocatedSource
    {
        return new LocatedSource($this->source, $identifier->getName(), null);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type;

use InvalidArgumentException;
use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\SourceLocator\Ast\Locator;
use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation;
use PHPStan\BetterReflection\SourceLocator\FileChecker;
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
use function file_get_contents;
/**
 * This source locator loads an entire file, specified in the constructor
 * argument.
 *
 * This is useful for loading a class that does not have a namespace. This is
 * also the class required if you want to use Reflector->getClassesFromFile
 * (which loads all classes from specified file)
 */
class SingleFileSourceLocator extends \PHPStan\BetterReflection\SourceLocator\Type\AbstractSourceLocator
{
    /**
     * @var non-empty-string
     */
    private $fileName;
    /**
     * @param non-empty-string $fileName
     *
     * @throws InvalidFileLocation
     */
    public function __construct(string $fileName, Locator $astLocator)
    {
        $this->fileName = $fileName;
        FileChecker::assertReadableFile($fileName);
        parent::__construct($astLocator);
    }
    /**
     * {@inheritDoc}
     *
     * @throws InvalidArgumentException
     * @throws InvalidFileLocation
     */
    protected function createLocatedSource(Identifier $identifier) : ?\PHPStan\BetterReflection\SourceLocator\Located\LocatedSource
    {
        return new LocatedSource(file_get_contents($this->fileName), $identifier->getName(), $this->fileName);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Type;

use InvalidArgumentException;
use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\SourceLocator\Ast\Locator;
use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation;
use PHPStan\BetterReflection\SourceLocator\Located\InternalLocatedSource;
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
use PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber;
use PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData;
final class PhpInternalSourceLocator extends \PHPStan\BetterReflection\SourceLocator\Type\AbstractSourceLocator
{
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber
     */
    private $stubber;
    public function __construct(Locator $astLocator, SourceStubber $stubber)
    {
        $this->stubber = $stubber;
        parent::__construct($astLocator);
    }
    /**
     * {@inheritDoc}
     *
     * @throws InvalidArgumentException
     * @throws InvalidFileLocation
     */
    protected function createLocatedSource(Identifier $identifier) : ?\PHPStan\BetterReflection\SourceLocator\Located\LocatedSource
    {
        return $this->getClassSource($identifier) ?? $this->getFunctionSource($identifier) ?? $this->getConstantSource($identifier);
    }
    private function getClassSource(Identifier $identifier) : ?\PHPStan\BetterReflection\SourceLocator\Located\InternalLocatedSource
    {
        if (!$identifier->isClass()) {
            return null;
        }
        /** @psalm-var class-string|trait-string $className */
        $className = $identifier->getName();
        return $this->createLocatedSourceFromStubData($identifier, $this->stubber->generateClassStub($className));
    }
    private function getFunctionSource(Identifier $identifier) : ?\PHPStan\BetterReflection\SourceLocator\Located\InternalLocatedSource
    {
        if (!$identifier->isFunction()) {
            return null;
        }
        return $this->createLocatedSourceFromStubData($identifier, $this->stubber->generateFunctionStub($identifier->getName()));
    }
    private function getConstantSource(Identifier $identifier) : ?\PHPStan\BetterReflection\SourceLocator\Located\InternalLocatedSource
    {
        if (!$identifier->isConstant()) {
            return null;
        }
        return $this->createLocatedSourceFromStubData($identifier, $this->stubber->generateConstantStub($identifier->getName()));
    }
    private function createLocatedSourceFromStubData(Identifier $identifier, ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData $stubData) : ?\PHPStan\BetterReflection\SourceLocator\Located\InternalLocatedSource
    {
        if ($stubData === null) {
            return null;
        }
        $extensionName = $stubData->getExtensionName();
        if ($extensionName === null) {
            // Not internal
            return null;
        }
        return new InternalLocatedSource($stubData->getStub(), $identifier->getName(), $extensionName, $stubData->getFileName());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator;

use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation;
use function is_file;
use function is_readable;
use function sprintf;
class FileChecker
{
    /**
     * @param non-empty-string $filename
     *
     * @throws InvalidFileLocation
     */
    public static function assertReadableFile(string $filename) : void
    {
        if (!is_file($filename)) {
            throw new InvalidFileLocation(sprintf('"%s" is not a file', $filename));
        }
        if (!is_readable($filename)) {
            throw new InvalidFileLocation(sprintf('File "%s" is not readable', $filename));
        }
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Ast;

use PhpParser\Node;
use PhpParser\Node\Name;
use PhpParser\Node\Stmt\Namespace_;
use PhpParser\NodeTraverser;
use PhpParser\NodeVisitor\NameResolver;
use PhpParser\NodeVisitorAbstract;
use PHPStan\BetterReflection\Identifier\IdentifierType;
use PHPStan\BetterReflection\Reflection\Exception\InvalidConstantNode;
use PHPStan\BetterReflection\Reflection\ReflectionClass;
use PHPStan\BetterReflection\Reflection\ReflectionConstant;
use PHPStan\BetterReflection\Reflection\ReflectionFunction;
use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Ast\Strategy\AstConversionStrategy;
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
use PHPStan\BetterReflection\Util\ConstantNodeChecker;
use function assert;
use function count;
/** @internal */
final class FindReflectionsInTree
{
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\Ast\Strategy\AstConversionStrategy
     */
    private $astConversionStrategy;
    public function __construct(AstConversionStrategy $astConversionStrategy)
    {
        $this->astConversionStrategy = $astConversionStrategy;
    }
    /**
     * Find all reflections of a given type in an Abstract Syntax Tree
     *
     * @param Node[] $ast
     *
     * @return list<ReflectionClass|ReflectionFunction|ReflectionConstant>
     */
    public function __invoke(Reflector $reflector, array $ast, IdentifierType $identifierType, LocatedSource $locatedSource) : array
    {
        $nodeVisitor = new class($reflector, $identifierType, $locatedSource, $this->astConversionStrategy) extends NodeVisitorAbstract
        {
            /** @var list<ReflectionClass|ReflectionFunction|ReflectionConstant> */
            private $reflections = [];
            /**
             * @var \PhpParser\Node\Stmt\Namespace_|null
             */
            private $currentNamespace = null;
            /**
             * @var \PHPStan\BetterReflection\Reflector\Reflector
             */
            private $reflector;
            /**
             * @var \PHPStan\BetterReflection\Identifier\IdentifierType
             */
            private $identifierType;
            /**
             * @var \PHPStan\BetterReflection\SourceLocator\Located\LocatedSource
             */
            private $locatedSource;
            /**
             * @var \PHPStan\BetterReflection\SourceLocator\Ast\Strategy\AstConversionStrategy
             */
            private $astConversionStrategy;
            public function __construct(Reflector $reflector, IdentifierType $identifierType, LocatedSource $locatedSource, AstConversionStrategy $astConversionStrategy)
            {
                $this->reflector = $reflector;
                $this->identifierType = $identifierType;
                $this->locatedSource = $locatedSource;
                $this->astConversionStrategy = $astConversionStrategy;
            }
            /**
             * {@inheritDoc}
             */
            public function enterNode(Node $node)
            {
                if ($node instanceof Namespace_) {
                    $this->currentNamespace = $node;
                }
                return null;
            }
            /**
             * {@inheritDoc}
             */
            public function leaveNode(Node $node)
            {
                if ($this->identifierType->isClass() && ($node instanceof Node\Stmt\Class_ || $node instanceof Node\Stmt\Interface_ || $node instanceof Node\Stmt\Trait_ || $node instanceof Node\Stmt\Enum_)) {
                    $classNamespace = $node->name === null ? null : $this->currentNamespace;
                    /** @psalm-suppress InternalMethod */
                    $this->reflections[] = $this->astConversionStrategy->__invoke($this->reflector, $node, $this->locatedSource, $classNamespace);
                    return null;
                }
                if ($this->identifierType->isConstant()) {
                    if ($node instanceof Node\Stmt\Const_) {
                        for ($i = 0; $i < count($node->consts); $i++) {
                            /** @psalm-suppress InternalMethod */
                            $this->reflections[] = $this->astConversionStrategy->__invoke($this->reflector, $node, $this->locatedSource, $this->currentNamespace, $i);
                        }
                        return null;
                    }
                    if ($node instanceof Node\Expr\FuncCall) {
                        try {
                            /** @psalm-suppress InternalClass, InternalMethod */
                            ConstantNodeChecker::assertValidDefineFunctionCall($node);
                        } catch (InvalidConstantNode $exception) {
                            return null;
                        }
                        if ($node->name->hasAttribute('namespacedName')) {
                            $namespacedName = $node->name->getAttribute('namespacedName');
                            assert($namespacedName instanceof Name);
                            if (count($namespacedName->parts) > 1) {
                                try {
                                    $this->reflector->reflectFunction($namespacedName->toString());
                                    return null;
                                } catch (IdentifierNotFound $exception) {
                                    // Global define()
                                }
                            }
                        }
                        /** @psalm-suppress InternalMethod */
                        $this->reflections[] = $this->astConversionStrategy->__invoke($this->reflector, $node, $this->locatedSource, $this->currentNamespace);
                        return null;
                    }
                }
                if ($this->identifierType->isFunction() && $node instanceof Node\Stmt\Function_) {
                    /** @psalm-suppress InternalMethod */
                    $this->reflections[] = $this->astConversionStrategy->__invoke($this->reflector, $node, $this->locatedSource, $this->currentNamespace);
                }
                if ($node instanceof Namespace_) {
                    $this->currentNamespace = null;
                }
                return null;
            }
            /** @return list<ReflectionClass|ReflectionFunction|ReflectionConstant> */
            public function getReflections() : array
            {
                return $this->reflections;
            }
        };
        $nodeTraverser = new NodeTraverser();
        $nodeTraverser->addVisitor(new NameResolver());
        $nodeTraverser->addVisitor($nodeVisitor);
        $nodeTraverser->traverse($ast);
        return $nodeVisitor->getReflections();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Ast\Strategy;

use PhpParser\Node;
use PHPStan\BetterReflection\Reflection\ReflectionClass;
use PHPStan\BetterReflection\Reflection\ReflectionConstant;
use PHPStan\BetterReflection\Reflection\ReflectionEnum;
use PHPStan\BetterReflection\Reflection\ReflectionFunction;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
use function implode;
/** @internal */
class NodeToReflection implements \PHPStan\BetterReflection\SourceLocator\Ast\Strategy\AstConversionStrategy
{
    /**
     * Take an AST node in some located source (potentially in a namespace) and
     * convert it to a Reflection
     * @param \PhpParser\Node\Stmt\Class_|\PhpParser\Node\Stmt\Interface_|\PhpParser\Node\Stmt\Trait_|\PhpParser\Node\Stmt\Enum_|\PhpParser\Node\Stmt\Function_|\PhpParser\Node\Expr\Closure|\PhpParser\Node\Expr\ArrowFunction|\PhpParser\Node\Stmt\Const_|\PhpParser\Node\Expr\FuncCall $node
     * @return \PHPStan\BetterReflection\Reflection\ReflectionClass|\PHPStan\BetterReflection\Reflection\ReflectionConstant|\PHPStan\BetterReflection\Reflection\ReflectionFunction
     */
    public function __invoke(Reflector $reflector, $node, LocatedSource $locatedSource, ?\PhpParser\Node\Stmt\Namespace_ $namespace, ?int $positionInNode = null)
    {
        /** @psalm-suppress PossiblyNullPropertyFetch, PossiblyNullArgument */
        $namespaceName = (($namespace2 = $namespace) ? $namespace2->name : null) !== null ? implode('\\', $namespace->name->parts) : null;
        if ($node instanceof Node\Stmt\Enum_) {
            return ReflectionEnum::createFromNode($reflector, $node, $locatedSource, $namespaceName);
        }
        if ($node instanceof Node\Stmt\ClassLike) {
            return ReflectionClass::createFromNode($reflector, $node, $locatedSource, $namespaceName);
        }
        if ($node instanceof Node\Stmt\Const_) {
            return ReflectionConstant::createFromNode($reflector, $node, $locatedSource, $namespaceName, $positionInNode);
        }
        if ($node instanceof Node\Expr\FuncCall) {
            return ReflectionConstant::createFromNode($reflector, $node, $locatedSource);
        }
        return ReflectionFunction::createFromNode($reflector, $node, $locatedSource, $namespaceName);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Ast\Strategy;

use PhpParser\Node;
use PHPStan\BetterReflection\Reflection\ReflectionClass;
use PHPStan\BetterReflection\Reflection\ReflectionConstant;
use PHPStan\BetterReflection\Reflection\ReflectionFunction;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
/** @internal */
interface AstConversionStrategy
{
    /**
     * Take an AST node in some located source (potentially in a namespace) and
     * convert it to something (concrete implementation decides)
     * @param \PhpParser\Node\Stmt\Class_|\PhpParser\Node\Stmt\Interface_|\PhpParser\Node\Stmt\Trait_|\PhpParser\Node\Stmt\Enum_|\PhpParser\Node\Stmt\Function_|\PhpParser\Node\Expr\Closure|\PhpParser\Node\Expr\ArrowFunction|\PhpParser\Node\Stmt\Const_|\PhpParser\Node\Expr\FuncCall $node
     * @return \PHPStan\BetterReflection\Reflection\ReflectionClass|\PHPStan\BetterReflection\Reflection\ReflectionConstant|\PHPStan\BetterReflection\Reflection\ReflectionFunction
     */
    public function __invoke(Reflector $reflector, $node, LocatedSource $locatedSource, ?\PhpParser\Node\Stmt\Namespace_ $namespace, ?int $positionInNode = null);
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Ast\Exception;

use PhpParser\Error;
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
use RuntimeException;
use Throwable;
use function array_slice;
use function count;
use function explode;
use function implode;
use function max;
use function min;
use function sprintf;
class ParseToAstFailure extends RuntimeException
{
    public static function fromLocatedSource(LocatedSource $locatedSource, Throwable $previous) : self
    {
        $additionalInformation = '';
        $fileName = $locatedSource->getFileName();
        if ($fileName !== null) {
            $additionalInformation = sprintf(' in file %s', $fileName);
        }
        if ($previous instanceof Error) {
            $errorStartLine = $previous->getStartLine();
            $source = null;
            if ($errorStartLine !== -1) {
                $additionalInformation .= sprintf(' (line %d)', $errorStartLine);
                $lines = explode("\n", $locatedSource->getSource());
                $minLine = max(1, $errorStartLine - 5);
                $maxLine = min(count($lines), $errorStartLine + 5);
                $source = implode("\n", array_slice($lines, $minLine - 1, $maxLine - $minLine + 1));
            }
            $additionalInformation .= sprintf(': %s', $previous->getRawMessage());
            if ($source !== null) {
                $additionalInformation .= sprintf("\n\n%s", $source);
            }
        } else {
            $additionalInformation .= sprintf(': %s', $previous->getMessage());
        }
        return new self(sprintf('AST failed to parse in located source%s', $additionalInformation), 0, $previous);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Ast\Parser;

use PhpParser\ErrorHandler;
use PhpParser\Node;
use PhpParser\Parser;
use function array_key_exists;
use function hash;
use function serialize;
use function sprintf;
use function strlen;
use function unserialize;
/** @internal */
final class MemoizingParser implements Parser
{
    /** @var array<string, string> indexed by source hash */
    private $sourceHashToAst = [];
    /**
     * @var \PhpParser\Parser
     */
    private $wrappedParser;
    public function __construct(Parser $wrappedParser)
    {
        $this->wrappedParser = $wrappedParser;
    }
    public function parse(string $code, ?\PhpParser\ErrorHandler $errorHandler = null) : ?array
    {
        // note: this code is mathematically buggy by default, as we are using a hash to identify
        //       cache entries. The string length is added to further reduce likeliness (although
        //       already imperceptible) of key collisions.
        //       In the "real world", this code will work just fine.
        $hash = sprintf('%s:%d', hash('sha256', $code), strlen($code));
        if (array_key_exists($hash, $this->sourceHashToAst)) {
            /** @var Node\Stmt[]|null $ast */
            $ast = unserialize($this->sourceHashToAst[$hash]);
            return $ast;
        }
        $ast = $this->wrappedParser->parse($code, $errorHandler);
        $this->sourceHashToAst[$hash] = serialize($ast);
        return $ast;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Ast;

use PhpParser\Node;
use PhpParser\Parser;
use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\Identifier\IdentifierType;
use PHPStan\BetterReflection\Reflection\Reflection;
use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Ast\Strategy\NodeToReflection;
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
use Throwable;
use function strtolower;
/** @internal */
class Locator
{
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\Ast\FindReflectionsInTree
     */
    private $findReflectionsInTree;
    /**
     * @var \PhpParser\Parser
     */
    private $parser;
    public function __construct(Parser $parser)
    {
        $this->parser = $parser;
        $this->findReflectionsInTree = new \PHPStan\BetterReflection\SourceLocator\Ast\FindReflectionsInTree(new NodeToReflection());
    }
    /**
     * @throws IdentifierNotFound
     * @throws Exception\ParseToAstFailure
     */
    public function findReflection(Reflector $reflector, LocatedSource $locatedSource, Identifier $identifier) : Reflection
    {
        return $this->findInArray($this->findReflectionsOfType($reflector, $locatedSource, $identifier->getType()), $identifier, $locatedSource->getName());
    }
    /**
     * Get an array of reflections found in some code.
     *
     * @return list<Reflection>
     *
     * @throws Exception\ParseToAstFailure
     */
    public function findReflectionsOfType(Reflector $reflector, LocatedSource $locatedSource, IdentifierType $identifierType) : array
    {
        try {
            /** @var list<Node\Stmt> $ast */
            $ast = $this->parser->parse($locatedSource->getSource());
            return $this->findReflectionsInTree->__invoke($reflector, $ast, $identifierType, $locatedSource);
        } catch (Throwable $exception) {
            throw \PHPStan\BetterReflection\SourceLocator\Ast\Exception\ParseToAstFailure::fromLocatedSource($locatedSource, $exception);
        }
    }
    /**
     * Given an array of Reflections, try to find the identifier.
     *
     * @param list<Reflection> $reflections
     *
     * @throws IdentifierNotFound
     */
    private function findInArray(array $reflections, Identifier $identifier, ?string $name) : Reflection
    {
        if ($name === null) {
            throw IdentifierNotFound::fromIdentifier($identifier);
        }
        $identifierName = strtolower($name);
        foreach ($reflections as $reflection) {
            if (strtolower($reflection->getName()) === $identifierName) {
                return $reflection;
            }
        }
        throw IdentifierNotFound::fromIdentifier($identifier);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Located;

use InvalidArgumentException;
use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation;
use PHPStan\BetterReflection\SourceLocator\FileChecker;
use PHPStan\BetterReflection\Util\FileHelper;
use function assert;
/**
 * Value object containing source code that has been located.
 *
 * @internal
 *
 * @psalm-immutable
 */
class LocatedSource
{
    /** @var non-empty-string|null */
    private $filename;
    /**
     * @var string
     */
    private $source;
    /**
     * @var string|null
     */
    private $name;
    /**
     * @throws InvalidArgumentException
     * @throws InvalidFileLocation
     */
    public function __construct(string $source, ?string $name, ?string $filename = null)
    {
        $this->source = $source;
        $this->name = $name;
        if ($filename !== null) {
            assert($filename !== '');
            FileChecker::assertReadableFile($filename);
            $filename = FileHelper::normalizeWindowsPath($filename);
        }
        $this->filename = $filename;
    }
    public function getSource() : string
    {
        return $this->source;
    }
    public function getName() : ?string
    {
        return $this->name;
    }
    /** @return non-empty-string|null */
    public function getFileName() : ?string
    {
        return $this->filename;
    }
    /**
     * Is the located source in PHP internals?
     */
    public function isInternal() : bool
    {
        return \false;
    }
    /** @return non-empty-string|null */
    public function getExtensionName() : ?string
    {
        return null;
    }
    /**
     * Is the located source produced by eval() or \function_create()?
     */
    public function isEvaled() : bool
    {
        return \false;
    }
    public function getAliasName() : ?string
    {
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Located;

/**
 * @internal
 *
 * @psalm-immutable
 */
class AnonymousLocatedSource extends \PHPStan\BetterReflection\SourceLocator\Located\LocatedSource
{
    public function __construct(string $source, string $filename)
    {
        parent::__construct($source, null, $filename);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Located;

/**
 * @internal
 *
 * @psalm-immutable
 */
class EvaledLocatedSource extends \PHPStan\BetterReflection\SourceLocator\Located\LocatedSource
{
    public function isEvaled() : bool
    {
        return \true;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Located;

/**
 * @internal
 *
 * @psalm-immutable
 */
class AliasLocatedSource extends \PHPStan\BetterReflection\SourceLocator\Located\LocatedSource
{
    /**
     * @var string
     */
    private $aliasName;
    public function __construct(string $source, string $name, ?string $filename, string $aliasName)
    {
        $this->aliasName = $aliasName;
        parent::__construct($source, $name, $filename);
    }
    public function getAliasName() : ?string
    {
        return $this->aliasName;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Located;

/**
 * @internal
 *
 * @psalm-immutable
 */
class InternalLocatedSource extends \PHPStan\BetterReflection\SourceLocator\Located\LocatedSource
{
    /**
     * @var non-empty-string
     */
    private $extensionName;
    /** @param non-empty-string $extensionName */
    public function __construct(string $source, string $name, string $extensionName, ?string $fileName = null)
    {
        $this->extensionName = $extensionName;
        parent::__construct($source, $name, $fileName);
    }
    public function isInternal() : bool
    {
        return \true;
    }
    /** @return non-empty-string|null */
    public function getExtensionName() : ?string
    {
        return $this->extensionName;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Exception;

use RuntimeException;
use function is_file;
use function sprintf;
class InvalidDirectory extends RuntimeException
{
    public static function fromNonDirectory(string $nonDirectory) : self
    {
        if (is_file($nonDirectory)) {
            return new self(sprintf('"%s" must be a directory, not a file', $nonDirectory));
        }
        return new self(sprintf('"%s" does not exist', $nonDirectory));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Exception;

use LogicException;
use function sprintf;
class TwoClosuresOnSameLine extends LogicException
{
    public static function create(string $fileName, int $lineNumber) : self
    {
        return new self(sprintf('Two closures on line %d in %s', $lineNumber, $fileName));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Exception;

use LogicException;
class NotInternalClass extends LogicException
{
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Exception;

use LogicException;
use function sprintf;
class TwoAnonymousClassesOnSameLine extends LogicException
{
    public static function create(string $fileName, int $lineNumber) : self
    {
        return new self(sprintf('Two anonymous classes on line %d in %s', $lineNumber, $fileName));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Exception;

use RuntimeException;
use function gettype;
use function is_object;
use function sprintf;
class InvalidFileInfo extends RuntimeException
{
    /**
     * @param mixed $nonSplFileInfo
     */
    public static function fromNonSplFileInfo($nonSplFileInfo) : self
    {
        return new self(sprintf('Expected an iterator of SplFileInfo instances, %s given instead', is_object($nonSplFileInfo) ? \get_class($nonSplFileInfo) : gettype($nonSplFileInfo)));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Exception;

use LogicException;
class EvaledClosureCannotBeLocated extends LogicException
{
    public static function create() : self
    {
        return new self('Evaled closure cannot be located');
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Exception;

use LogicException;
use function sprintf;
class NoClosureOnLine extends LogicException
{
    public static function create(string $fileName, int $lineNumber) : self
    {
        return new self(sprintf('No closure found on line %d in %s', $lineNumber, $fileName));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Exception;

use LogicException;
use function sprintf;
class NoAnonymousClassOnLine extends LogicException
{
    public static function create(string $fileName, int $lineNumber) : self
    {
        return new self(sprintf('No anonymous class found on line %d in %s', $lineNumber, $fileName));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Exception;

use RuntimeException;
/**
 * This is removed in PR #236 - this should never have existed, but leaving here for BC. This exception is never thrown
 * so you should remove it from your code.
 *
 * You were probably looking to catch \PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound instead.
 *
 * @deprecated You're probably looking for `IdentifierNotFound`
 *
 * @see \PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound
 */
class FunctionUndefined extends RuntimeException
{
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Exception;

use LogicException;
class EvaledAnonymousClassCannotBeLocated extends LogicException
{
    public static function create() : self
    {
        return new self('Evaled anonymous class cannot be located');
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\Exception;

use RuntimeException;
class InvalidFileLocation extends RuntimeException
{
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\SourceStubber\PhpStormStubs;

use PhpParser\BuilderFactory;
use PhpParser\Node;
use PhpParser\NodeTraverser;
use PhpParser\NodeVisitorAbstract;
use PHPStan\BetterReflection\Reflection\Exception\InvalidConstantNode;
use PHPStan\BetterReflection\Util\ConstantNodeChecker;
use function array_key_exists;
use function assert;
use function constant;
use function defined;
use function in_array;
use function is_resource;
use function sprintf;
use function strtolower;
use function strtoupper;
/** @internal */
class CachingVisitor extends NodeVisitorAbstract
{
    private const TRUE_FALSE_NULL = ['true', 'false', 'null'];
    /**
     * @var \PhpParser\Node\Stmt\Namespace_|null
     */
    private $currentNamespace = null;
    /** @var array<string, array{0: Node\Stmt\ClassLike, 1: Node\Stmt\Namespace_|null}> */
    private $classNodes = [];
    /** @var array<string, list<array{0: Node\Stmt\Function_, 1: Node\Stmt\Namespace_|null}>> */
    private $functionNodes = [];
    /** @var array<string, array{0: Node\Stmt\Const_|Node\Expr\FuncCall, 1: Node\Stmt\Namespace_|null}> */
    private $constantNodes = [];
    /**
     * @var \PhpParser\BuilderFactory
     */
    private $builderFactory;
    public function __construct(BuilderFactory $builderFactory)
    {
        $this->builderFactory = $builderFactory;
    }
    public function enterNode(Node $node) : ?int
    {
        if ($node instanceof Node\Stmt\Namespace_) {
            $this->currentNamespace = $node;
            return null;
        }
        if ($node instanceof Node\Stmt\ClassLike) {
            $classNamespacedName = $node->namespacedName;
            assert($classNamespacedName instanceof Node\Name);
            $className = $classNamespacedName->toString();
            $this->classNodes[$className] = [$node, $this->currentNamespace];
            foreach ($node->getConstants() as $constantsNode) {
                foreach ($constantsNode->consts as $constNode) {
                    $constClassName = sprintf('%s::%s', $className, $constNode->name->toString());
                    $this->updateConstantValue($constNode, $constClassName);
                }
            }
            // We need to traverse children to resolve attributes names for methods, properties etc.
            return null;
        }
        if ($node instanceof Node\Stmt\ClassMethod) {
            return NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN;
        }
        if ($node instanceof Node\Stmt\Function_) {
            $functionNamespacedName = $node->namespacedName;
            assert($functionNamespacedName instanceof Node\Name);
            $functionName = $functionNamespacedName->toString();
            $this->functionNodes[$functionName][] = [$node, $this->currentNamespace];
            return NodeTraverser::DONT_TRAVERSE_CHILDREN;
        }
        if ($node instanceof Node\Stmt\Const_) {
            foreach ($node->consts as $constNode) {
                $constNamespacedName = $constNode->namespacedName;
                assert($constNamespacedName instanceof Node\Name);
                $constNodeName = $constNamespacedName->toString();
                $this->updateConstantValue($constNode, $constNodeName);
                $this->constantNodes[$constNodeName] = [$node, $this->currentNamespace];
            }
            return NodeTraverser::DONT_TRAVERSE_CHILDREN;
        }
        if ($node instanceof Node\Expr\FuncCall) {
            $argumentNameNode = $node->args[0];
            assert($argumentNameNode instanceof Node\Arg);
            $nameNode = $argumentNameNode->value;
            assert($nameNode instanceof Node\Scalar\String_);
            $constantName = $nameNode->value;
            // The definition is stubs looks like `define('STDIN', fopen('php://stdin', 'r'))`
            // We will modify it to `define('STDIN', constant('STDIN'));
            // The later definition can pass validation in `ConstantNodeChecker` and has support in `CompileNodeToValue`
            if (in_array($constantName, ['STDIN', 'STDOUT', 'STDERR'], \true) && array_key_exists(1, $node->args) && $node->args[1] instanceof Node\Arg) {
                $node->args[1]->value = $this->builderFactory->funcCall('constant', [$constantName]);
            }
            // @codeCoverageIgnoreStart
            // @infection-ignore-all
            // No invalid definition in PhpStorm stubs
            try {
                ConstantNodeChecker::assertValidDefineFunctionCall($node);
            } catch (InvalidConstantNode $exception) {
                return null;
            }
            // @codeCoverageIgnoreEnd
            if (in_array($constantName, self::TRUE_FALSE_NULL, \true)) {
                $constantName = strtoupper($constantName);
                $nameNode->value = $constantName;
            }
            $this->updateConstantValue($node, $constantName);
            $this->constantNodes[$constantName] = [$node, $this->currentNamespace];
            if (array_key_exists(2, $node->args) && $node->args[2] instanceof Node\Arg && $node->args[2]->value instanceof Node\Expr\ConstFetch && $node->args[2]->value->name->toLowerString() === 'true') {
                $this->constantNodes[strtolower($constantName)] = [$node, $this->currentNamespace];
            }
            return NodeTraverser::DONT_TRAVERSE_CHILDREN;
        }
        return null;
    }
    /**
     * {@inheritDoc}
     */
    public function leaveNode(Node $node)
    {
        if ($node instanceof Node\Stmt\Namespace_) {
            $this->currentNamespace = null;
        }
        return null;
    }
    /** @return array<string, array{0: Node\Stmt\ClassLike, 1: Node\Stmt\Namespace_|null}> */
    public function getClassNodes() : array
    {
        return $this->classNodes;
    }
    /** @return array<string, list<array{0: Node\Stmt\Function_, 1: Node\Stmt\Namespace_|null}>> */
    public function getFunctionNodes() : array
    {
        return $this->functionNodes;
    }
    /** @return array<string, array{0: Node\Stmt\Const_|Node\Expr\FuncCall, 1: Node\Stmt\Namespace_|null}> */
    public function getConstantNodes() : array
    {
        return $this->constantNodes;
    }
    public function clearNodes() : void
    {
        $this->classNodes = [];
        $this->functionNodes = [];
        $this->constantNodes = [];
    }
    /**
     * Some constants have different values on different systems, some are not actual in stubs.
     * @param \PhpParser\Node\Expr\FuncCall|\PhpParser\Node\Const_ $node
     */
    private function updateConstantValue($node, string $constantName) : void
    {
        if (!defined($constantName)) {
            return;
        }
        // @ because access to deprecated constant throws deprecated warning
        /** @var scalar|resource|list<scalar>|null $constantValue */
        $constantValue = @constant($constantName);
        $normalizedConstantValue = is_resource($constantValue) ? $this->builderFactory->funcCall('constant', [$constantName]) : $this->builderFactory->val($constantValue);
        if ($node instanceof Node\Expr\FuncCall) {
            $argumentValueNode = $node->args[1];
            assert($argumentValueNode instanceof Node\Arg);
            $argumentValueNode->value = $normalizedConstantValue;
        } else {
            $node->value = $normalizedConstantValue;
        }
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\SourceStubber;

use CompileError;
use DatePeriod;
use Error;
use Generator;
use Iterator;
use IteratorAggregate;
use _PHPStan_dcc7b7cff\JetBrains\PHPStormStub\PhpStormStubsMap;
use JsonSerializable;
use ParseError;
use PDOStatement;
use PhpParser\BuilderFactory;
use PhpParser\BuilderHelpers;
use PhpParser\Comment\Doc;
use PhpParser\Node;
use PhpParser\NodeTraverser;
use PhpParser\NodeVisitor\NameResolver;
use PhpParser\Parser;
use PhpParser\PrettyPrinter\Standard;
use RecursiveIterator;
use PHPStan\BetterReflection\Reflection\Annotation\AnnotationHelper;
use PHPStan\BetterReflection\SourceLocator\FileChecker;
use PHPStan\BetterReflection\SourceLocator\SourceStubber\Exception\CouldNotFindPhpStormStubs;
use PHPStan\BetterReflection\SourceLocator\SourceStubber\PhpStormStubs\CachingVisitor;
use SimpleXMLElement;
use SplFixedArray;
use Traversable;
use function array_change_key_case;
use function array_key_exists;
use function array_map;
use function assert;
use function explode;
use function file_get_contents;
use function in_array;
use function is_dir;
use function preg_match;
use function preg_replace;
use function sprintf;
use function str_contains;
use function str_replace;
use function strtolower;
use function usort;
use const PHP_VERSION_ID;
/** @internal */
final class PhpStormStubsSourceStubber implements \PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber
{
    private const BUILDER_OPTIONS = ['shortArraySyntax' => \true];
    private const SEARCH_DIRECTORIES = [__DIR__ . '/../../../../../jetbrains/phpstorm-stubs', __DIR__ . '/../../../vendor/jetbrains/phpstorm-stubs'];
    private const CORE_EXTENSIONS = ['apache', 'bcmath', 'bz2', 'calendar', 'Core', 'ctype', 'curl', 'date', 'dba', 'dom', 'enchant', 'exif', 'FFI', 'fileinfo', 'filter', 'fpm', 'ftp', 'gd', 'gettext', 'gmp', 'hash', 'iconv', 'imap', 'interbase', 'intl', 'json', 'ldap', 'libxml', 'mbstring', 'mcrypt', 'mssql', 'mysql', 'mysqli', 'oci8', 'odbc', 'openssl', 'pcntl', 'pcre', 'PDO', 'pdo_ibm', 'pdo_mysql', 'pdo_pgsql', 'pdo_sqlite', 'pgsql', 'Phar', 'posix', 'pspell', 'readline', 'recode', 'Reflection', 'regex', 'session', 'shmop', 'SimpleXML', 'snmp', 'soap', 'sockets', 'sodium', 'SPL', 'sqlite3', 'standard', 'sybase', 'sysvmsg', 'sysvsem', 'sysvshm', 'tidy', 'tokenizer', 'wddx', 'xml', 'xmlreader', 'xmlrpc', 'xmlwriter', 'xsl', 'Zend OPcache', 'zip', 'zlib'];
    /**
     * @var \PhpParser\BuilderFactory
     */
    private $builderFactory;
    /**
     * @var \PhpParser\PrettyPrinter\Standard
     */
    private $prettyPrinter;
    /**
     * @var \PhpParser\NodeTraverser
     */
    private $nodeTraverser;
    /**
     * @var string|null
     */
    private $stubsDirectory = null;
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\SourceStubber\PhpStormStubs\CachingVisitor
     */
    private $cachingVisitor;
    /**
     * `null` means "class is not supported in the required PHP version"
     *
     * @var array<string, array{0: Node\Stmt\ClassLike, 1: Node\Stmt\Namespace_|null}|null>
     */
    private $classNodes = [];
    /**
     * `null` means "function is not supported in the required PHP version"
     *
     * @var array<string, array{0: Node\Stmt\Function_, 1: Node\Stmt\Namespace_|null}|null>
     */
    private $functionNodes = [];
    /**
     * `null` means "failed lookup" for constant that is not case insensitive or "constant is not supported in the required PHP version"
     *
     * @var array<string, array{0: Node\Stmt\Const_|Node\Expr\FuncCall, 1: Node\Stmt\Namespace_|null}|null>
     */
    private $constantNodes = [];
    /**
     * @var bool
     */
    private static $mapsInitialized = \false;
    /** @var array<lowercase-string, string> */
    private static $classMap;
    /** @var array<lowercase-string, string> */
    private static $functionMap;
    /** @var array<lowercase-string, string> */
    private static $constantMap;
    /**
     * @var \PhpParser\Parser
     */
    private $phpParser;
    /**
     * @var int
     */
    private $phpVersion = PHP_VERSION_ID;
    public function __construct(Parser $phpParser, int $phpVersion = PHP_VERSION_ID)
    {
        $this->phpParser = $phpParser;
        $this->phpVersion = $phpVersion;
        $this->builderFactory = new BuilderFactory();
        $this->prettyPrinter = new Standard(self::BUILDER_OPTIONS);
        $this->cachingVisitor = new CachingVisitor($this->builderFactory);
        $this->nodeTraverser = new NodeTraverser();
        $this->nodeTraverser->addVisitor(new NameResolver());
        $this->nodeTraverser->addVisitor($this->cachingVisitor);
        if (self::$mapsInitialized) {
            return;
        }
        /** @psalm-suppress PropertyTypeCoercion */
        self::$classMap = array_change_key_case(PhpStormStubsMap::CLASSES);
        /** @psalm-suppress PropertyTypeCoercion */
        self::$functionMap = array_change_key_case(PhpStormStubsMap::FUNCTIONS);
        /** @psalm-suppress PropertyTypeCoercion */
        self::$constantMap = array_change_key_case(PhpStormStubsMap::CONSTANTS);
        self::$mapsInitialized = \true;
    }
    public function hasClass(string $className) : bool
    {
        $lowercaseClassName = strtolower($className);
        return array_key_exists($lowercaseClassName, self::$classMap);
    }
    public function isPresentClass(string $className) : ?bool
    {
        $lowercaseClassName = strtolower($className);
        if (!array_key_exists($lowercaseClassName, self::$classMap)) {
            return null;
        }
        $classNode = $this->getClassNodeData($lowercaseClassName);
        return $classNode !== null;
    }
    public function isPresentFunction(string $functionName) : ?bool
    {
        $lowercaseFunctionName = strtolower($functionName);
        if (!array_key_exists($lowercaseFunctionName, self::$functionMap)) {
            return null;
        }
        $functionNode = $this->getFunctionNodeData($lowercaseFunctionName);
        return $functionNode !== null;
    }
    /** @param class-string|trait-string $className */
    public function generateClassStub(string $className) : ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData
    {
        if (strtolower($className) === 'iterable') {
            return null;
        }
        $classNodeData = $this->getClassNodeData($className);
        if ($classNodeData === null) {
            return null;
        }
        $classNode = $classNodeData[0];
        if ($classNode instanceof Node\Stmt\Class_) {
            if ($classNode->extends !== null) {
                $modifiedExtends = $this->replaceExtendsOrImplementsByPhpVersion($className, [$classNode->extends]);
                $classNode->extends = $modifiedExtends !== [] ? $modifiedExtends[0] : null;
            }
            $classNode->implements = $this->replaceExtendsOrImplementsByPhpVersion($className, $classNode->implements);
        } elseif ($classNode instanceof Node\Stmt\Interface_) {
            $classNode->extends = $this->replaceExtendsOrImplementsByPhpVersion($className, $classNode->extends);
        }
        $filePath = self::$classMap[strtolower($className)];
        $extension = $this->getExtensionFromFilePath($filePath);
        $stub = $this->createStub($classNode, $classNodeData[1]);
        if ($className === Traversable::class) {
            // See https://github.com/JetBrains/phpstorm-stubs/commit/0778a26992c47d7dbee4d0b0bfb7fad4344371b1#diff-575bacb45377d474336c71cbf53c1729
            $stub = str_replace(' extends \\iterable', '', $stub);
        } elseif ($className === Generator::class) {
            $stub = str_replace('PS_UNRESERVE_PREFIX_throw', 'throw', $stub);
        }
        return new \PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData($stub, $extension, $this->getAbsoluteFilePath($filePath));
    }
    /** @return array{0: Node\Stmt\ClassLike, 1: Node\Stmt\Namespace_|null}|null */
    private function getClassNodeData(string $className)
    {
        $lowercaseClassName = strtolower($className);
        if (!array_key_exists($lowercaseClassName, self::$classMap)) {
            return null;
        }
        $filePath = self::$classMap[$lowercaseClassName];
        if (!array_key_exists($lowercaseClassName, $this->classNodes)) {
            $this->parseFile($filePath);
            /** @psalm-suppress RedundantCondition */
            if (!array_key_exists($lowercaseClassName, $this->classNodes)) {
                // Save `null` so we don't parse the file again for the same $lowercaseClassName
                $this->classNodes[$lowercaseClassName] = null;
            }
        }
        return $this->classNodes[$lowercaseClassName];
    }
    /**
     * @return array{0: Node\Stmt\Function_, 1: Node\Stmt\Namespace_|null}|null
     */
    private function getFunctionNodeData(string $functionName) : ?array
    {
        $lowercaseFunctionName = strtolower($functionName);
        if (!array_key_exists($lowercaseFunctionName, self::$functionMap)) {
            return null;
        }
        $filePath = self::$functionMap[$lowercaseFunctionName];
        if (!array_key_exists($lowercaseFunctionName, $this->functionNodes)) {
            $this->parseFile($filePath);
            /** @psalm-suppress RedundantCondition */
            if (!array_key_exists($lowercaseFunctionName, $this->functionNodes)) {
                // Save `null` so we don't parse the file again for the same $lowercaseFunctionName
                $this->functionNodes[$lowercaseFunctionName] = null;
            }
        }
        return $this->functionNodes[$lowercaseFunctionName];
    }
    public function generateFunctionStub(string $functionName) : ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData
    {
        $functionNodeData = $this->getFunctionNodeData($functionName);
        if ($functionNodeData === null) {
            return null;
        }
        $filePath = self::$functionMap[strtolower($functionName)];
        $extension = $this->getExtensionFromFilePath($filePath);
        return new \PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData($this->createStub($functionNodeData[0], $functionNodeData[1]), $extension, $this->getAbsoluteFilePath($filePath));
    }
    public function generateConstantStub(string $constantName) : ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData
    {
        $lowercaseConstantName = strtolower($constantName);
        if (!array_key_exists($lowercaseConstantName, self::$constantMap)) {
            return null;
        }
        if (array_key_exists($lowercaseConstantName, $this->constantNodes) && $this->constantNodes[$lowercaseConstantName] === null) {
            return null;
        }
        $filePath = self::$constantMap[$lowercaseConstantName];
        $constantNodeData = $this->constantNodes[$constantName] ?? $this->constantNodes[$lowercaseConstantName] ?? null;
        if ($constantNodeData === null) {
            $this->parseFile($filePath);
            $constantNodeData = $this->constantNodes[$constantName] ?? $this->constantNodes[$lowercaseConstantName] ?? null;
            if ($constantNodeData === null) {
                // Still `null` - the constant is not case-insensitive. Save `null` so we don't parse the file again for the same $constantName
                $this->constantNodes[$lowercaseConstantName] = null;
                return null;
            }
        }
        $extension = $this->getExtensionFromFilePath($filePath);
        return new \PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData($this->createStub($constantNodeData[0], $constantNodeData[1]), $extension, $this->getAbsoluteFilePath($filePath));
    }
    private function parseFile(string $filePath) : void
    {
        $absoluteFilePath = $this->getAbsoluteFilePath($filePath);
        FileChecker::assertReadableFile($absoluteFilePath);
        /** @var list<Node\Stmt> $ast */
        $ast = $this->phpParser->parse(file_get_contents($absoluteFilePath));
        // "@since" and "@removed" annotations in some cases do not contain a PHP version, but an extension version - e.g. "@since 1.3.0"
        // So we check PHP version only for stubs of core extensions
        $isCoreExtension = $this->isCoreExtension($this->getExtensionFromFilePath($filePath));
        $this->cachingVisitor->clearNodes();
        $this->nodeTraverser->traverse($ast);
        foreach ($this->cachingVisitor->getClassNodes() as $className => $classNodeData) {
            [$classNode] = $classNodeData;
            if ($isCoreExtension) {
                if ($className !== 'Attribute' && $className !== 'ReturnTypeWillChange' && $className !== 'AllowDynamicProperties' && $className !== 'SensitiveParameter' && !$this->isSupportedInPhpVersion($classNode)) {
                    continue;
                }
                $classNode->stmts = $this->modifyStmtsByPhpVersion($classNode->stmts);
            }
            $this->classNodes[strtolower($className)] = $classNodeData;
        }
        foreach ($this->cachingVisitor->getFunctionNodes() as $functionName => $functionNodesData) {
            foreach ($functionNodesData as $functionNodeData) {
                [$functionNode] = $functionNodeData;
                if ($isCoreExtension) {
                    if (!$this->isSupportedInPhpVersion($functionNode)) {
                        continue;
                    }
                    $this->modifyFunctionReturnTypeByPhpVersion($functionNode);
                    $this->modifyFunctionParametersByPhpVersion($functionNode);
                }
                $lowercaseFunctionName = strtolower($functionName);
                if (array_key_exists($lowercaseFunctionName, $this->functionNodes)) {
                    continue;
                }
                $this->functionNodes[$lowercaseFunctionName] = $functionNodeData;
            }
        }
        foreach ($this->cachingVisitor->getConstantNodes() as $constantName => $constantNodeData) {
            [$constantNode] = $constantNodeData;
            if ($isCoreExtension && !$this->isSupportedInPhpVersion($constantNode)) {
                continue;
            }
            $this->constantNodes[$constantName] = $constantNodeData;
        }
    }
    /**
     * @param \PhpParser\Node\Stmt\ClassLike|\PhpParser\Node\Stmt\Function_|\PhpParser\Node\Stmt\Const_|\PhpParser\Node\Expr\FuncCall $node
     */
    private function createStub($node, ?\PhpParser\Node\Stmt\Namespace_ $namespaceNode) : string
    {
        if (!$node instanceof Node\Expr\FuncCall) {
            $this->addDeprecatedDocComment($node);
            $nodeWithNamespaceName = $node instanceof Node\Stmt\Const_ ? $node->consts[0] : $node;
            $namespacedName = $nodeWithNamespaceName->namespacedName;
            assert($namespacedName instanceof Node\Name);
            $namespaceBuilder = $this->builderFactory->namespace($namespacedName->slice(0, -1));
            if ($namespaceNode !== null) {
                foreach ($namespaceNode->stmts as $stmt) {
                    if (!$stmt instanceof Node\Stmt\Use_ && !$stmt instanceof Node\Stmt\GroupUse) {
                        continue;
                    }
                    $namespaceBuilder->addStmt($stmt);
                }
            }
            $namespaceBuilder->addStmt($node);
            $node = $namespaceBuilder->getNode();
        }
        return sprintf("<?php\n\n%s%s\n", $this->prettyPrinter->prettyPrint([$node]), $node instanceof Node\Expr\FuncCall ? ';' : '');
    }
    /** @return non-empty-string */
    private function getExtensionFromFilePath(string $filePath) : string
    {
        $extensionName = explode('/', $filePath)[0];
        assert($extensionName !== '');
        return $extensionName;
    }
    /** @return non-empty-string */
    private function getAbsoluteFilePath(string $filePath) : string
    {
        $absoluteFilePath = sprintf('%s/%s', $this->getStubsDirectory(), $filePath);
        assert($absoluteFilePath !== '');
        return $absoluteFilePath;
    }
    /**
     * Some stubs extend/implement classes from newer PHP versions. We need to filter those names in regard to set PHP version so that those stubs remain valid.
     *
     * @param array<Node\Name> $nameNodes
     *
     * @return list<Node\Name>
     */
    private function replaceExtendsOrImplementsByPhpVersion(string $className, array $nameNodes) : array
    {
        $modifiedNames = [];
        foreach ($nameNodes as $nameNode) {
            $name = $nameNode->toString();
            if ($className === ParseError::class) {
                if ($name === CompileError::class && $this->phpVersion < 70300) {
                    $modifiedNames[] = new Node\Name\FullyQualified(Error::class);
                    continue;
                }
            } elseif ($className === SplFixedArray::class) {
                if ($name === JsonSerializable::class && $this->phpVersion < 80100) {
                    continue;
                }
                if ($name === IteratorAggregate::class && $this->phpVersion < 80000) {
                    continue;
                }
                if ($name === Iterator::class && $this->phpVersion >= 80000) {
                    continue;
                }
            } elseif ($className === SimpleXMLElement::class) {
                if ($name === RecursiveIterator::class && $this->phpVersion < 80000) {
                    continue;
                }
            } elseif ($className === DatePeriod::class || $className === PDOStatement::class) {
                if ($name === IteratorAggregate::class && $this->phpVersion < 80000) {
                    $modifiedNames[] = new Node\Name\FullyQualified(Traversable::class);
                    continue;
                }
            }
            if ($this->getClassNodeData($name) === null) {
                continue;
            }
            $modifiedNames[] = $nameNode;
        }
        return $modifiedNames;
    }
    /**
     * @param array<Node\Stmt> $stmts
     *
     * @return list<Node\Stmt>
     */
    private function modifyStmtsByPhpVersion(array $stmts) : array
    {
        $newStmts = [];
        foreach ($stmts as $stmt) {
            assert($stmt instanceof Node\Stmt\ClassConst || $stmt instanceof Node\Stmt\Property || $stmt instanceof Node\Stmt\ClassMethod);
            if (!$this->isSupportedInPhpVersion($stmt)) {
                continue;
            }
            if ($stmt instanceof Node\Stmt\Property) {
                $this->modifyStmtTypeByPhpVersion($stmt);
            }
            if ($stmt instanceof Node\Stmt\ClassMethod) {
                $this->modifyFunctionReturnTypeByPhpVersion($stmt);
                $this->modifyFunctionParametersByPhpVersion($stmt);
            }
            $this->addDeprecatedDocComment($stmt);
            $newStmts[] = $stmt;
        }
        return $newStmts;
    }
    /**
     * @param \PhpParser\Node\Stmt\Property|\PhpParser\Node\Param $stmt
     */
    private function modifyStmtTypeByPhpVersion($stmt) : void
    {
        $type = $this->getStmtType($stmt);
        if ($type === null) {
            return;
        }
        $stmt->type = $type;
    }
    /**
     * @param \PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Function_ $function
     */
    private function modifyFunctionReturnTypeByPhpVersion($function) : void
    {
        $isTentativeReturnType = $this->getNodeAttribute($function, 'JetBrains\\PhpStorm\\Internal\\TentativeType') !== null;
        if ($isTentativeReturnType) {
            // Tentative types are the most correct in stubs
            // If the type is tentative in stubs, we should remove the type for PHP < 8.1
            if ($this->phpVersion >= 80100) {
                $this->addAnnotationToDocComment($function, AnnotationHelper::TENTATIVE_RETURN_TYPE_ANNOTATION);
            } else {
                $function->returnType = null;
            }
            return;
        }
        $type = $this->getStmtType($function);
        if ($type === null) {
            return;
        }
        $function->returnType = $type;
    }
    /**
     * @param \PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Function_ $function
     */
    private function modifyFunctionParametersByPhpVersion($function) : void
    {
        $parameters = [];
        foreach ($function->getParams() as $parameterNode) {
            if (!$this->isSupportedInPhpVersion($parameterNode)) {
                continue;
            }
            $this->modifyStmtTypeByPhpVersion($parameterNode);
            $parameters[] = $parameterNode;
        }
        $function->params = $parameters;
    }
    /**
     * @param \PhpParser\Node\Stmt\Function_|\PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Property|\PhpParser\Node\Param $node
     * @return \PhpParser\Node\Name|\PhpParser\Node\Identifier|\PhpParser\Node\ComplexType|null
     */
    private function getStmtType($node)
    {
        $languageLevelTypeAwareAttribute = $this->getNodeAttribute($node, 'JetBrains\\PhpStorm\\Internal\\LanguageLevelTypeAware');
        if ($languageLevelTypeAwareAttribute === null) {
            return null;
        }
        assert($languageLevelTypeAwareAttribute->args[0]->value instanceof Node\Expr\Array_);
        /** @var list<Node\Expr\ArrayItem> $types */
        $types = $languageLevelTypeAwareAttribute->args[0]->value->items;
        usort($types, static function (Node\Expr\ArrayItem $a, Node\Expr\ArrayItem $b) : int {
            return $b->key <=> $a->key;
        });
        foreach ($types as $type) {
            assert($type->key instanceof Node\Scalar\String_);
            assert($type->value instanceof Node\Scalar\String_);
            if ($this->parsePhpVersion($type->key->value) > $this->phpVersion) {
                continue;
            }
            return $this->normalizeType($type->value->value);
        }
        assert($languageLevelTypeAwareAttribute->args[1]->value instanceof Node\Scalar\String_);
        return $languageLevelTypeAwareAttribute->args[1]->value->value !== '' ? $this->normalizeType($languageLevelTypeAwareAttribute->args[1]->value->value) : null;
    }
    /**
     * @param \PhpParser\Node\Stmt\ClassLike|\PhpParser\Node\Stmt\ClassConst|\PhpParser\Node\Stmt\Property|\PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Function_|\PhpParser\Node\Stmt\Const_ $node
     */
    private function addDeprecatedDocComment($node) : void
    {
        if ($node instanceof Node\Stmt\Const_) {
            return;
        }
        if (!$this->isDeprecatedInPhpVersion($node)) {
            $this->removeAnnotationFromDocComment($node, 'deprecated');
            return;
        }
        $this->addAnnotationToDocComment($node, 'deprecated');
    }
    /**
     * @param \PhpParser\Node\Stmt\ClassLike|\PhpParser\Node\Stmt\ClassConst|\PhpParser\Node\Stmt\Property|\PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Function_|\PhpParser\Node\Stmt\Const_ $node
     */
    private function addAnnotationToDocComment($node, string $annotationName) : void
    {
        $docComment = $node->getDocComment();
        if ($docComment === null) {
            $docCommentText = sprintf('/** @%s */', $annotationName);
        } else {
            $docCommentText = preg_replace('~(\\r?\\n\\s*)\\*/~', sprintf('\\1* @%s\\1*/', $annotationName), $docComment->getText());
        }
        $node->setDocComment(new Doc($docCommentText));
    }
    /**
     * @param \PhpParser\Node\Stmt\ClassLike|\PhpParser\Node\Stmt\ClassConst|\PhpParser\Node\Stmt\Property|\PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Function_|\PhpParser\Node\Stmt\Const_ $node
     */
    private function removeAnnotationFromDocComment($node, string $annotationName) : void
    {
        $docComment = $node->getDocComment();
        if ($docComment === null) {
            return;
        }
        $docCommentText = preg_replace('~@' . $annotationName . '.*$~m', '', $docComment->getText());
        $node->setDocComment(new Doc($docCommentText));
    }
    private function isCoreExtension(string $extension) : bool
    {
        return in_array($extension, self::CORE_EXTENSIONS, \true);
    }
    /**
     * @param \PhpParser\Node\Stmt\ClassLike|\PhpParser\Node\Stmt\ClassConst|\PhpParser\Node\Stmt\Property|\PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Function_ $node
     */
    private function isDeprecatedInPhpVersion($node) : bool
    {
        $deprecatedAttribute = $this->getNodeAttribute($node, 'JetBrains\\PhpStorm\\Deprecated');
        if ($deprecatedAttribute === null) {
            return \false;
        }
        foreach ($deprecatedAttribute->args as $attributeArg) {
            if ($attributeArg->name !== null && $attributeArg->name->toString() === 'since') {
                assert($attributeArg->value instanceof Node\Scalar\String_);
                return $this->parsePhpVersion($attributeArg->value->value) <= $this->phpVersion;
            }
        }
        return \true;
    }
    /**
     * @param \PhpParser\Node\Stmt\ClassLike|\PhpParser\Node\Stmt\Function_|\PhpParser\Node\Stmt\Const_|\PhpParser\Node\Expr\FuncCall|\PhpParser\Node\Stmt\ClassConst|\PhpParser\Node\Stmt\Property|\PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Param $node
     */
    private function isSupportedInPhpVersion($node) : bool
    {
        [$fromVersion, $toVersion] = $this->getSupportedPhpVersions($node);
        if ($fromVersion !== null && $fromVersion > $this->phpVersion) {
            return \false;
        }
        return $toVersion === null || $toVersion >= $this->phpVersion;
    }
    /** @return array{0: int|null, 1: int|null}
     * @param \PhpParser\Node\Stmt\ClassLike|\PhpParser\Node\Stmt\Function_|\PhpParser\Node\Stmt\Const_|\PhpParser\Node\Expr\FuncCall|\PhpParser\Node\Stmt\ClassConst|\PhpParser\Node\Stmt\Property|\PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Param $node */
    private function getSupportedPhpVersions($node) : array
    {
        $fromVersion = null;
        $toVersion = null;
        $docComment = $node->getDocComment();
        if ($docComment !== null) {
            if (preg_match('~@since\\s+(?P<version>\\d+\\.\\d+(?:\\.\\d+)?)\\s+~', $docComment->getText(), $sinceMatches) === 1) {
                $fromVersion = $this->parsePhpVersion($sinceMatches['version']);
            }
            if (preg_match('~@removed\\s+(?P<version>\\d+\\.\\d+(?:\\.\\d+)?)\\s+~', $docComment->getText(), $removedMatches) === 1) {
                $toVersion = $this->parsePhpVersion($removedMatches['version']) - 1;
            }
        }
        $elementsAvailable = $this->getNodeAttribute($node, 'JetBrains\\PhpStorm\\Internal\\PhpStormStubsElementAvailable');
        if ($elementsAvailable !== null) {
            foreach ($elementsAvailable->args as $i => $attributeArg) {
                $isFrom = \false;
                if ($attributeArg->name !== null && $attributeArg->name->toString() === 'from') {
                    $isFrom = \true;
                }
                if ($attributeArg->name === null && $i === 0) {
                    $isFrom = \true;
                }
                if ($isFrom) {
                    assert($attributeArg->value instanceof Node\Scalar\String_);
                    $fromVersion = $this->parsePhpVersion($attributeArg->value->value);
                }
                $isTo = \false;
                if ($attributeArg->name !== null && $attributeArg->name->toString() === 'to') {
                    $isTo = \true;
                }
                if ($attributeArg->name === null && $i === 1) {
                    $isTo = \true;
                }
                if (!$isTo) {
                    continue;
                }
                assert($attributeArg->value instanceof Node\Scalar\String_);
                $toVersion = $this->parsePhpVersion($attributeArg->value->value, 99);
            }
        }
        return [$fromVersion, $toVersion];
    }
    /**
     * @param \PhpParser\Node\Stmt\ClassLike|\PhpParser\Node\Stmt\Function_|\PhpParser\Node\Stmt\Const_|\PhpParser\Node\Expr\FuncCall|\PhpParser\Node\Stmt\ClassConst|\PhpParser\Node\Stmt\Property|\PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Param $node
     */
    private function getNodeAttribute($node, string $attributeName) : ?\PhpParser\Node\Attribute
    {
        if ($node instanceof Node\Expr\FuncCall || $node instanceof Node\Stmt\Const_) {
            return null;
        }
        foreach ($node->attrGroups as $attributesGroupNode) {
            foreach ($attributesGroupNode->attrs as $attributeNode) {
                if ($attributeNode->name->toString() === $attributeName) {
                    return $attributeNode;
                }
            }
        }
        return null;
    }
    private function parsePhpVersion(string $version, int $defaultPatch = 0) : int
    {
        $parts = array_map('intval', explode('.', $version));
        return $parts[0] * 10000 + $parts[1] * 100 + ($parts[2] ?? $defaultPatch);
    }
    /**
     * @return \PhpParser\Node\Name|\PhpParser\Node\Identifier|\PhpParser\Node\ComplexType|null
     */
    private function normalizeType(string $type)
    {
        // There are some invalid types in stubs, eg. `string[]|string|null`
        if (\strpos($type, '[') !== \false) {
            return null;
        }
        /** @psalm-suppress InternalClass, InternalMethod */
        return BuilderHelpers::normalizeType($type);
    }
    private function getStubsDirectory() : string
    {
        if ($this->stubsDirectory !== null) {
            return $this->stubsDirectory;
        }
        foreach (self::SEARCH_DIRECTORIES as $directory) {
            if (is_dir($directory)) {
                return $this->stubsDirectory = $directory;
            }
        }
        // @codeCoverageIgnoreStart
        // @infection-ignore-all
        // Untestable code
        throw CouldNotFindPhpStormStubs::create();
        // @codeCoverageIgnoreEnd
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\SourceStubber;

use function array_merge;
use function array_reduce;
use function array_values;
class AggregateSourceStubber implements \PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber
{
    /** @var list<SourceStubber> */
    private $sourceStubbers;
    public function __construct(\PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber $sourceStubber, \PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber ...$otherSourceStubbers)
    {
        $this->sourceStubbers = array_values(array_merge([$sourceStubber], $otherSourceStubbers));
    }
    /** @param class-string|trait-string $className */
    public function generateClassStub(string $className) : ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData
    {
        foreach ($this->sourceStubbers as $sourceStubber) {
            $stubData = $sourceStubber->generateClassStub($className);
            if ($stubData !== null) {
                return $stubData;
            }
        }
        return null;
    }
    public function generateFunctionStub(string $functionName) : ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData
    {
        foreach ($this->sourceStubbers as $sourceStubber) {
            $stubData = $sourceStubber->generateFunctionStub($functionName);
            if ($stubData !== null) {
                return $stubData;
            }
        }
        return null;
    }
    public function generateConstantStub(string $constantName) : ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData
    {
        return array_reduce($this->sourceStubbers, static function (?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData $stubData, \PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber $sourceStubber) use($constantName) : ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData {
            return $stubData ?? $sourceStubber->generateConstantStub($constantName);
        }, null);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\SourceStubber;

use LogicException;
use PhpParser\Builder\Class_;
use PhpParser\Builder\ClassConst;
use PhpParser\Builder\Enum_;
use PhpParser\Builder\Function_;
use PhpParser\Builder\FunctionLike;
use PhpParser\Builder\Interface_;
use PhpParser\Builder\Method;
use PhpParser\Builder\Param;
use PhpParser\Builder\Property;
use PhpParser\Builder\Trait_;
use PhpParser\BuilderFactory;
use PhpParser\Comment\Doc;
use PhpParser\Node;
use PhpParser\Node\IntersectionType;
use PhpParser\Node\Name;
use PhpParser\Node\Name\FullyQualified;
use PhpParser\Node\NullableType;
use PhpParser\Node\UnionType;
use PhpParser\PrettyPrinter\Standard;
use ReflectionClass as CoreReflectionClass;
use ReflectionClassConstant as CoreReflectionClassConstant;
use ReflectionEnum as CoreReflectionEnum;
use ReflectionEnumBackedCase as CoreReflectionEnumBackedCase;
use ReflectionFunction as CoreReflectionFunction;
use ReflectionFunctionAbstract as CoreReflectionFunctionAbstract;
use ReflectionIntersectionType as CoreReflectionIntersectionType;
use ReflectionMethod as CoreReflectionMethod;
use ReflectionNamedType as CoreReflectionNamedType;
use ReflectionParameter;
use ReflectionProperty as CoreReflectionProperty;
use ReflectionType as CoreReflectionType;
use ReflectionUnionType as CoreReflectionUnionType;
use PHPStan\BetterReflection\Reflection\Annotation\AnnotationHelper;
use PHPStan\BetterReflection\Util\ClassExistenceChecker;
use function array_diff;
use function array_key_exists;
use function array_map;
use function assert;
use function explode;
use function function_exists;
use function get_defined_constants;
use function implode;
use function in_array;
use function is_file;
use function is_resource;
use function method_exists;
use function preg_replace;
use function sprintf;
/**
 * It generates a stub source from internal reflection for given class or function name.
 *
 * @internal
 */
final class ReflectionSourceStubber implements \PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber
{
    private const BUILDER_OPTIONS = ['shortArraySyntax' => \true];
    /**
     * @var \PhpParser\BuilderFactory
     */
    private $builderFactory;
    /**
     * @var \PhpParser\PrettyPrinter\Standard
     */
    private $prettyPrinter;
    public function __construct()
    {
        $this->builderFactory = new BuilderFactory();
        $this->prettyPrinter = new Standard(self::BUILDER_OPTIONS);
    }
    /** @param class-string|trait-string $className */
    public function generateClassStub(string $className) : ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData
    {
        if (!ClassExistenceChecker::exists($className, \false)) {
            return null;
        }
        $enumExists = function (string $enum, bool $autoload = \true) : bool {
            if (function_exists('enum_exists')) {
                return \enum_exists($enum, $autoload);
            }
            return $autoload && \class_exists($enum) && \false;
        };
        /** phpcs:disable SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFullyQualifiedName */
        $isEnum = function_exists('enum_exists') && $enumExists($className, \false);
        /** phpcs:enable */
        $classReflection = $isEnum ? new CoreReflectionEnum($className) : new CoreReflectionClass($className);
        $classNode = $this->createClass($classReflection);
        if ($classNode instanceof Class_) {
            $this->addClassModifiers($classNode, $classReflection);
        }
        if ($classNode instanceof Class_ || $classNode instanceof Interface_ || $classNode instanceof Enum_) {
            $this->addExtendsAndImplements($classNode, $classReflection);
        }
        if ($classNode instanceof Class_ || $classNode instanceof Trait_) {
            $this->addProperties($classNode, $classReflection);
        }
        if ($classNode instanceof Class_ || $classNode instanceof Trait_ || $classNode instanceof Enum_) {
            $this->addTraitUse($classNode, $classReflection);
        }
        $this->addDocComment($classNode, $classReflection);
        if ($classNode instanceof Enum_ && $classReflection instanceof CoreReflectionEnum) {
            $this->addEnumBackingType($classNode, $classReflection);
            $this->addEnumCases($classNode, $classReflection);
        }
        $this->addClassConstants($classNode, $classReflection);
        $this->addMethods($classNode, $classReflection);
        $node = $classNode->getNode();
        $stub = $classReflection->inNamespace() ? $this->generateStubInNamespace($node, $classReflection->getNamespaceName()) : $this->generateStub($node);
        $extensionName = $classReflection->getExtensionName() ?: null;
        return $this->createStubData($stub, $extensionName, $classReflection->getFileName() !== \false ? $classReflection->getFileName() : null);
    }
    public function generateFunctionStub(string $functionName) : ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData
    {
        if (!function_exists($functionName)) {
            return null;
        }
        return $this->generateFunctionStubFromReflection(new CoreReflectionFunction($functionName));
    }
    public function generateFunctionStubFromReflection(CoreReflectionFunction $functionReflection) : ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData
    {
        $functionNode = $this->builderFactory->function($functionReflection->getShortName());
        $this->addDocComment($functionNode, $functionReflection);
        $this->addParameters($functionNode, $functionReflection);
        $returnType = $functionReflection->getReturnType();
        if ($returnType === null && method_exists($functionReflection, 'getTentativeReturnType')) {
            $returnType = $functionReflection->getTentativeReturnType();
        }
        if ($returnType !== null) {
            assert($returnType instanceof CoreReflectionNamedType || $returnType instanceof CoreReflectionUnionType || $returnType instanceof CoreReflectionIntersectionType);
            $functionNode->setReturnType($this->formatType($returnType));
        }
        $extensionName = $functionReflection->getExtensionName() ?: null;
        if (!$functionReflection->inNamespace()) {
            return $this->createStubData($this->generateStub($functionNode->getNode()), $extensionName, $functionReflection->getFileName() !== \false ? $functionReflection->getFileName() : null);
        }
        return $this->createStubData($this->generateStubInNamespace($functionNode->getNode(), $functionReflection->getNamespaceName()), $extensionName, $functionReflection->getFileName() !== \false ? $functionReflection->getFileName() : null);
    }
    public function generateConstantStub(string $constantName) : ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData
    {
        $constantData = $this->findConstantData($constantName);
        if ($constantData === null) {
            return null;
        }
        [$constantValue, $extensionName] = $constantData;
        if ($extensionName === null) {
            return null;
        }
        if (is_resource($constantValue)) {
            $constantValue = $this->builderFactory->funcCall('constant', [$constantName]);
        }
        $constantNode = $this->builderFactory->funcCall('define', [$constantName, $constantValue]);
        return $this->createStubData($this->generateStub($constantNode), $extensionName, null);
    }
    /** @return array{0: scalar|list<scalar>|resource|null, 1: non-empty-string|null}|null */
    private function findConstantData(string $constantName)
    {
        /** @var array<non-empty-string, array<string, scalar|list<scalar>|resource|null>> $constants */
        $constants = get_defined_constants(\true);
        foreach ($constants as $constantExtensionName => $extensionConstants) {
            if (array_key_exists($constantName, $extensionConstants)) {
                return [$extensionConstants[$constantName], $constantExtensionName !== 'user' ? $constantExtensionName : null];
            }
        }
        return null;
    }
    /**
     * @return \PhpParser\Builder\Class_|\PhpParser\Builder\Interface_|\PhpParser\Builder\Trait_|\PhpParser\Builder\Enum_
     */
    private function createClass(CoreReflectionClass $classReflection)
    {
        if ($classReflection instanceof CoreReflectionEnum) {
            return $this->builderFactory->enum($classReflection->getShortName());
        }
        if ($classReflection->isTrait()) {
            return $this->builderFactory->trait($classReflection->getShortName());
        }
        if ($classReflection->isInterface()) {
            return $this->builderFactory->interface($classReflection->getShortName());
        }
        return $this->builderFactory->class($classReflection->getShortName());
    }
    /**
     * @param \PhpParser\Builder\Class_|\PhpParser\Builder\Interface_|\PhpParser\Builder\Trait_|\PhpParser\Builder\Enum_|\PhpParser\Builder\Method|\PhpParser\Builder\Property|\PhpParser\Builder\Function_ $node
     * @param CoreReflectionClass|CoreReflectionMethod|CoreReflectionProperty|CoreReflectionFunction $reflection
     */
    private function addDocComment($node, $reflection) : void
    {
        $docComment = $reflection->getDocComment() ?: '';
        $annotations = [];
        if (($reflection instanceof CoreReflectionMethod || $reflection instanceof CoreReflectionFunction) && $reflection->isInternal()) {
            if ($reflection->isDeprecated()) {
                $annotations[] = '@deprecated';
            }
            if (method_exists($reflection, 'hasTentativeReturnType') && $reflection->hasTentativeReturnType()) {
                $annotations[] = sprintf('@%s', AnnotationHelper::TENTATIVE_RETURN_TYPE_ANNOTATION);
            }
        }
        if ($docComment === '' && $annotations === []) {
            return;
        }
        if ($docComment === '') {
            $docComment = sprintf("/**\n* %s\n*/", implode("\n *", $annotations));
        } elseif ($annotations !== []) {
            $docComment = preg_replace('~\\s+\\*/$~', sprintf("\n* %s\n*/", implode("\n *", $annotations)), $docComment);
        }
        $node->setDocComment(new Doc($docComment));
    }
    private function addEnumBackingType(Enum_ $enumNode, CoreReflectionEnum $enumReflection) : void
    {
        if (!$enumReflection->isBacked()) {
            return;
        }
        $backingType = $enumReflection->getBackingType();
        assert($backingType instanceof CoreReflectionNamedType);
        $enumNode->setScalarType($backingType->getName());
    }
    private function addClassModifiers(Class_ $classNode, CoreReflectionClass $classReflection) : void
    {
        if (!$classReflection->isInterface() && $classReflection->isAbstract()) {
            // Interface \Iterator is interface and abstract
            $classNode->makeAbstract();
        }
        if (!$classReflection->isFinal()) {
            return;
        }
        $classNode->makeFinal();
    }
    /**
     * @param \PhpParser\Builder\Class_|\PhpParser\Builder\Interface_|\PhpParser\Builder\Enum_ $classNode
     */
    private function addExtendsAndImplements($classNode, CoreReflectionClass $classReflection) : void
    {
        $interfaces = $classReflection->getInterfaceNames();
        if ($classNode instanceof Class_ || $classNode instanceof Interface_) {
            $parentClass = $classReflection->getParentClass();
            if ($parentClass !== \false) {
                $classNode->extend(new FullyQualified($parentClass->getName()));
                $interfaces = array_diff($interfaces, $parentClass->getInterfaceNames());
            }
        }
        foreach ($classReflection->getInterfaces() as $interface) {
            $interfaces = array_diff($interfaces, $interface->getInterfaceNames());
        }
        foreach ($interfaces as $interfaceName) {
            $interfaceNode = new FullyQualified($interfaceName);
            if ($classNode instanceof Interface_) {
                $classNode->extend($interfaceNode);
            } else {
                $classNode->implement($interfaceNode);
            }
        }
    }
    /**
     * @param \PhpParser\Builder\Class_|\PhpParser\Builder\Trait_|\PhpParser\Builder\Enum_ $classNode
     */
    private function addTraitUse($classNode, CoreReflectionClass $classReflection) : void
    {
        /** @var array<string, string> $traitAliases */
        $traitAliases = $classReflection->getTraitAliases();
        $traitUseAdaptations = [];
        foreach ($traitAliases as $methodNameAlias => $methodInfo) {
            [$traitName, $methodName] = explode('::', $methodInfo);
            $traitUseAdaptation = $this->builderFactory->traitUseAdaptation(new FullyQualified($traitName), $methodName);
            $traitUseAdaptation->as($methodNameAlias);
            $traitUseAdaptations[$traitName] = $traitUseAdaptation;
        }
        foreach ($classReflection->getTraitNames() as $traitName) {
            $traitUse = $this->builderFactory->useTrait(new FullyQualified($traitName));
            if (array_key_exists($traitName, $traitUseAdaptations)) {
                $traitUse->with($traitUseAdaptations[$traitName]);
            }
            $classNode->addStmt($traitUse);
        }
    }
    /**
     * @param \PhpParser\Builder\Class_|\PhpParser\Builder\Trait_ $classNode
     */
    private function addProperties($classNode, CoreReflectionClass $classReflection) : void
    {
        foreach ($classReflection->getProperties() as $propertyReflection) {
            if (!$this->isPropertyDeclaredInClass($propertyReflection, $classReflection)) {
                continue;
            }
            $propertyNode = $this->builderFactory->property($propertyReflection->getName());
            $this->addPropertyModifiers($propertyNode, $propertyReflection);
            $this->addDocComment($propertyNode, $propertyReflection);
            if (method_exists($propertyReflection, 'hasDefaultValue') && $propertyReflection->hasDefaultValue()) {
                try {
                    $propertyNode->setDefault($propertyReflection->getDeclaringClass()->getDefaultProperties()[$propertyReflection->getName()] ?? null);
                } catch (LogicException $exception) {
                    // Nothing
                }
            }
            $propertyType = method_exists($propertyReflection, 'getType') ? method_exists($propertyReflection, 'getType') ? $propertyReflection->getType() : null : null;
            if ($propertyType !== null) {
                assert($propertyType instanceof CoreReflectionNamedType || $propertyType instanceof CoreReflectionUnionType || $propertyType instanceof CoreReflectionIntersectionType);
                $propertyNode->setType($this->formatType($propertyType));
            }
            $classNode->addStmt($propertyNode);
        }
    }
    private function isPropertyDeclaredInClass(CoreReflectionProperty $propertyReflection, CoreReflectionClass $classReflection) : bool
    {
        if ($propertyReflection->getDeclaringClass()->getName() !== $classReflection->getName()) {
            return \false;
        }
        foreach ($classReflection->getTraits() as $trait) {
            if ($trait->hasProperty($propertyReflection->getName())) {
                return \false;
            }
        }
        return \true;
    }
    private function addPropertyModifiers(Property $propertyNode, CoreReflectionProperty $propertyReflection) : void
    {
        if (method_exists($propertyReflection, 'isReadOnly') && $propertyReflection->isReadOnly()) {
            $propertyNode->makeReadonly();
        }
        if ($propertyReflection->isStatic()) {
            $propertyNode->makeStatic();
        }
        if ($propertyReflection->isPublic()) {
            $propertyNode->makePublic();
        } elseif ($propertyReflection->isProtected()) {
            $propertyNode->makeProtected();
        } else {
            $propertyNode->makePrivate();
        }
    }
    private function addEnumCases(Enum_ $enumNode, CoreReflectionEnum $enumReflection) : void
    {
        foreach ($enumReflection->getCases() as $enumCaseReflection) {
            $enumCaseNode = $this->builderFactory->enumCase($enumCaseReflection->getName());
            if ($enumCaseReflection instanceof CoreReflectionEnumBackedCase) {
                $enumCaseNode->setValue($enumCaseReflection->getBackingValue());
            }
            $enumNode->addStmt($enumCaseNode);
        }
    }
    /**
     * @param \PhpParser\Builder\Class_|\PhpParser\Builder\Interface_|\PhpParser\Builder\Trait_|\PhpParser\Builder\Enum_ $classNode
     */
    private function addClassConstants($classNode, CoreReflectionClass $classReflection) : void
    {
        foreach ($classReflection->getReflectionConstants() as $constantReflection) {
            if (method_exists($constantReflection, 'isEnumCase') && $constantReflection->isEnumCase()) {
                continue;
            }
            if ($constantReflection->getDeclaringClass()->getName() !== $classReflection->getName()) {
                continue;
            }
            $classConstantNode = $this->builderFactory->classConst($constantReflection->getName(), $constantReflection->getValue());
            if ($constantReflection->getDocComment() !== \false) {
                $classConstantNode->setDocComment(new Doc($constantReflection->getDocComment()));
            }
            $this->addClassConstantModifiers($classConstantNode, $constantReflection);
            $classNode->addStmt($classConstantNode);
        }
    }
    private function addClassConstantModifiers(ClassConst $classConstantNode, CoreReflectionClassConstant $classConstantReflection) : void
    {
        if (method_exists($classConstantReflection, 'isFinal') && $classConstantReflection->isFinal()) {
            $classConstantNode->makeFinal();
        }
        if ($classConstantReflection->isPrivate()) {
            $classConstantNode->makePrivate();
        } elseif ($classConstantReflection->isProtected()) {
            $classConstantNode->makeProtected();
        } else {
            $classConstantNode->makePublic();
        }
    }
    /**
     * @param \PhpParser\Builder\Class_|\PhpParser\Builder\Interface_|\PhpParser\Builder\Trait_|\PhpParser\Builder\Enum_ $classNode
     */
    private function addMethods($classNode, CoreReflectionClass $classReflection) : void
    {
        foreach ($classReflection->getMethods() as $methodReflection) {
            if (!$this->isMethodDeclaredInClass($methodReflection, $classReflection)) {
                continue;
            }
            $methodNode = $this->builderFactory->method($methodReflection->getName());
            $this->addMethodFlags($methodNode, $methodReflection);
            $this->addDocComment($methodNode, $methodReflection);
            $this->addParameters($methodNode, $methodReflection);
            $returnType = $methodReflection->getReturnType();
            if ($returnType === null && method_exists($methodReflection, 'getTentativeReturnType')) {
                $returnType = $methodReflection->getTentativeReturnType();
            }
            if ($returnType !== null) {
                assert($returnType instanceof CoreReflectionNamedType || $returnType instanceof CoreReflectionUnionType || $returnType instanceof CoreReflectionIntersectionType);
                $methodNode->setReturnType($this->formatType($returnType));
            }
            $classNode->addStmt($methodNode);
        }
    }
    private function isMethodDeclaredInClass(CoreReflectionMethod $methodReflection, CoreReflectionClass $classReflection) : bool
    {
        if ($methodReflection->getDeclaringClass()->getName() !== $classReflection->getName()) {
            return \false;
        }
        /** @var array<string, string> $traitAliases */
        $traitAliases = $classReflection->getTraitAliases();
        if (array_key_exists($methodReflection->getName(), $traitAliases)) {
            return \false;
        }
        foreach ($classReflection->getTraits() as $trait) {
            if ($trait->hasMethod($methodReflection->getName())) {
                return \false;
            }
        }
        return \true;
    }
    private function addMethodFlags(Method $methodNode, CoreReflectionMethod $methodReflection) : void
    {
        if ($methodReflection->isFinal()) {
            $methodNode->makeFinal();
        }
        if ($methodReflection->isAbstract() && !$methodReflection->getDeclaringClass()->isInterface()) {
            $methodNode->makeAbstract();
        }
        if ($methodReflection->isStatic()) {
            $methodNode->makeStatic();
        }
        if ($methodReflection->isPublic()) {
            $methodNode->makePublic();
        }
        if ($methodReflection->isProtected()) {
            $methodNode->makeProtected();
        }
        if ($methodReflection->isPrivate()) {
            $methodNode->makePrivate();
        }
        if (!$methodReflection->returnsReference()) {
            return;
        }
        $methodNode->makeReturnByRef();
    }
    private function addParameters(FunctionLike $functionNode, CoreReflectionFunctionAbstract $functionReflectionAbstract) : void
    {
        foreach ($functionReflectionAbstract->getParameters() as $parameterReflection) {
            $parameterNode = $this->builderFactory->param($parameterReflection->getName());
            $this->addParameterModifiers($parameterReflection, $parameterNode);
            $this->setParameterDefaultValue($parameterReflection, $parameterNode);
            $functionNode->addParam($parameterNode);
        }
    }
    private function addParameterModifiers(ReflectionParameter $parameterReflection, Param $parameterNode) : void
    {
        if ($parameterReflection->isVariadic()) {
            $parameterNode->makeVariadic();
        }
        if ($parameterReflection->isPassedByReference()) {
            $parameterNode->makeByRef();
        }
        $parameterType = $parameterReflection->getType();
        if ($parameterType === null) {
            return;
        }
        assert($parameterType instanceof CoreReflectionNamedType || $parameterType instanceof CoreReflectionUnionType || $parameterType instanceof CoreReflectionIntersectionType);
        $parameterNode->setType($this->formatType($parameterType));
    }
    private function setParameterDefaultValue(ReflectionParameter $parameterReflection, Param $parameterNode) : void
    {
        if (!$parameterReflection->isOptional()) {
            return;
        }
        if ($parameterReflection->isVariadic()) {
            return;
        }
        if (!$parameterReflection->isDefaultValueAvailable()) {
            if ($parameterReflection->allowsNull()) {
                $parameterNode->setDefault(null);
            } else {
                $parameterNode->setDefault(new Node\Expr\ConstFetch(new FullyQualified('UNKNOWN')));
            }
            return;
        }
        $parameterNode->setDefault($parameterReflection->getDefaultValue());
    }
    /**
     * @return \PhpParser\Node\Name|\PhpParser\Node\NullableType|\PhpParser\Node\UnionType|\PhpParser\Node\IntersectionType
     */
    private function formatType(CoreReflectionType $type)
    {
        if ($type instanceof CoreReflectionIntersectionType) {
            /** @var list<Name> $types */
            $types = $this->formatTypes($type->getTypes());
            return new IntersectionType($types);
        }
        if ($type instanceof CoreReflectionUnionType) {
            /** @var list<Name|IntersectionType> $types */
            $types = $this->formatTypes($type->getTypes());
            return new UnionType($types);
        }
        assert($type instanceof CoreReflectionNamedType);
        $name = $type->getName();
        $nameNode = $this->formatNamedType($type);
        if (!$type->allowsNull() || $name === 'mixed' || $name === 'null') {
            return $nameNode;
        }
        return new NullableType($nameNode);
    }
    /**
     * @param list<CoreReflectionType> $types
     *
     * @return list<Name|UnionType|IntersectionType>
     */
    private function formatTypes(array $types) : array
    {
        return array_map(function (CoreReflectionType $type) {
            $formatedType = $this->formatType($type);
            assert($formatedType instanceof Name || $formatedType instanceof UnionType || $formatedType instanceof IntersectionType);
            return $formatedType;
        }, $types);
    }
    private function formatNamedType(CoreReflectionNamedType $type) : Name
    {
        $name = $type->getName();
        return $type->isBuiltin() || in_array($name, ['self', 'parent', 'static'], \true) ? new Name($name) : new FullyQualified($name);
    }
    private function generateStubInNamespace(Node $node, string $namespaceName) : string
    {
        $namespaceBuilder = $this->builderFactory->namespace($namespaceName);
        $namespaceBuilder->addStmt($node);
        return $this->generateStub($namespaceBuilder->getNode());
    }
    private function generateStub(Node $node) : string
    {
        return sprintf("<?php\n\n%s%s\n", $this->prettyPrinter->prettyPrint([$node]), $node instanceof Node\Expr\FuncCall ? ';' : '');
    }
    /** @param non-empty-string|null $extensionName */
    private function createStubData(string $stub, ?string $extensionName, ?string $fileName) : \PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData
    {
        return new \PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData($stub, $extensionName, $fileName);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\SourceStubber;

/** @internal */
interface SourceStubber
{
    /**
     * Generates stub for given class. Returns null when it cannot generate the stub.
     *
     * @param class-string|trait-string $className
     */
    public function generateClassStub(string $className) : ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData;
    /**
     * Generates stub for given function. Returns null when it cannot generate the stub.
     */
    public function generateFunctionStub(string $functionName) : ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData;
    /**
     * Generates stub for given constant. Returns null when it cannot generate the stub.
     */
    public function generateConstantStub(string $constantName) : ?\PHPStan\BetterReflection\SourceLocator\SourceStubber\StubData;
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\SourceStubber\Exception;

use RuntimeException;
class CouldNotFindPhpStormStubs extends RuntimeException
{
    public static function create() : self
    {
        return new self('Could not find PhpStorm stubs');
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\SourceLocator\SourceStubber;

/** @internal */
class StubData
{
    /**
     * @var string
     */
    private $stub;
    /**
     * @var non-empty-string|null
     */
    private $extensionName;
    /**
     * @var string|null
     */
    private $fileName;
    /** @param non-empty-string|null $extensionName */
    public function __construct(string $stub, ?string $extensionName, ?string $fileName)
    {
        $this->stub = $stub;
        $this->extensionName = $extensionName;
        $this->fileName = $fileName;
    }
    public function getStub() : string
    {
        return $this->stub;
    }
    /** @return non-empty-string|null */
    public function getExtensionName() : ?string
    {
        return $this->extensionName;
    }
    public function getFileName() : ?string
    {
        return $this->fileName;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection;

use PhpParser\Lexer\Emulative;
use PhpParser\Parser;
use PhpParser\ParserFactory;
use PHPStan\BetterReflection\Reflector\DefaultReflector;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Ast\Locator as AstLocator;
use PHPStan\BetterReflection\SourceLocator\SourceStubber\AggregateSourceStubber;
use PHPStan\BetterReflection\SourceLocator\SourceStubber\PhpStormStubsSourceStubber;
use PHPStan\BetterReflection\SourceLocator\SourceStubber\ReflectionSourceStubber;
use PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber;
use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\AutoloadSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\EvaledCodeSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\MemoizingSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator;
use PHPStan\BetterReflection\Util\FindReflectionOnLine;
use const PHP_VERSION_ID;
final class BetterReflection
{
    /**
     * @var int
     */
    public static $phpVersion = PHP_VERSION_ID;
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\Type\SourceLocator|null
     */
    private static $sharedSourceLocator = null;
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\Type\SourceLocator|null
     */
    private $sourceLocator = null;
    /**
     * @var \PHPStan\BetterReflection\Reflector\Reflector|null
     */
    private static $sharedReflector = null;
    /**
     * @var \PHPStan\BetterReflection\Reflector\Reflector|null
     */
    private $reflector = null;
    /**
     * @var \PhpParser\Parser|null
     */
    private static $sharedPhpParser = null;
    /**
     * @var \PhpParser\Parser|null
     */
    private $phpParser = null;
    /**
     * @var AstLocator|null
     */
    private $astLocator = null;
    /**
     * @var \PHPStan\BetterReflection\Util\FindReflectionOnLine|null
     */
    private $findReflectionOnLine = null;
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber|null
     */
    private $sourceStubber = null;
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\SourceStubber\SourceStubber|null
     */
    private static $sharedSourceStubber = null;
    public static function populate(int $phpVersion, SourceLocator $sourceLocator, Reflector $classReflector, Parser $phpParser, SourceStubber $sourceStubber) : void
    {
        self::$phpVersion = $phpVersion;
        self::$sharedSourceLocator = $sourceLocator;
        self::$sharedReflector = $classReflector;
        self::$sharedPhpParser = $phpParser;
        self::$sharedSourceStubber = $sourceStubber;
    }
    public function __construct()
    {
        $this->sourceLocator = self::$sharedSourceLocator;
        $this->reflector = self::$sharedReflector;
        $this->phpParser = self::$sharedPhpParser;
        $this->sourceStubber = self::$sharedSourceStubber;
    }
    public function sourceLocator() : SourceLocator
    {
        $astLocator = $this->astLocator();
        $sourceStubber = $this->sourceStubber();
        return $this->sourceLocator ?? ($this->sourceLocator = new MemoizingSourceLocator(new AggregateSourceLocator([new PhpInternalSourceLocator($astLocator, $sourceStubber), new EvaledCodeSourceLocator($astLocator, $sourceStubber), new AutoloadSourceLocator($astLocator, $this->phpParser())])));
    }
    public function reflector() : Reflector
    {
        return $this->reflector ?? ($this->reflector = new DefaultReflector($this->sourceLocator()));
    }
    public function phpParser() : Parser
    {
        return $this->phpParser ?? ($this->phpParser = (new ParserFactory())->create(ParserFactory::ONLY_PHP7, new Emulative(['usedAttributes' => ['comments', 'startLine', 'endLine', 'startFilePos', 'endFilePos']])));
    }
    public function astLocator() : AstLocator
    {
        return $this->astLocator ?? ($this->astLocator = new AstLocator($this->phpParser()));
    }
    public function findReflectionsOnLine() : FindReflectionOnLine
    {
        return $this->findReflectionOnLine ?? ($this->findReflectionOnLine = new FindReflectionOnLine($this->sourceLocator(), $this->astLocator()));
    }
    public function sourceStubber() : SourceStubber
    {
        return $this->sourceStubber ?? ($this->sourceStubber = new AggregateSourceStubber(new PhpStormStubsSourceStubber($this->phpParser(), self::$phpVersion), new ReflectionSourceStubber()));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflector;

use PHPStan\BetterReflection\Reflection\ReflectionClass;
use PHPStan\BetterReflection\Reflection\ReflectionConstant;
use PHPStan\BetterReflection\Reflection\ReflectionFunction;
use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
interface Reflector
{
    /**
     * Create a ReflectionClass for the specified $className.
     *
     * @throws IdentifierNotFound
     */
    public function reflectClass(string $identifierName) : ReflectionClass;
    /**
     * Get all the classes available in the scope specified by the SourceLocator.
     *
     * @return list<ReflectionClass>
     */
    public function reflectAllClasses() : iterable;
    /**
     * Create a ReflectionFunction for the specified $functionName.
     *
     * @throws IdentifierNotFound
     */
    public function reflectFunction(string $identifierName) : ReflectionFunction;
    /**
     * Get all the functions available in the scope specified by the SourceLocator.
     *
     * @return list<ReflectionFunction>
     */
    public function reflectAllFunctions() : iterable;
    /**
     * Create a ReflectionConstant for the specified $constantName.
     *
     * @throws IdentifierNotFound
     */
    public function reflectConstant(string $identifierName) : ReflectionConstant;
    /**
     * Get all the constants available in the scope specified by the SourceLocator.
     *
     * @return list<ReflectionConstant>
     */
    public function reflectAllConstants() : iterable;
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflector;

use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\Identifier\IdentifierType;
use PHPStan\BetterReflection\Reflection\ReflectionClass;
use PHPStan\BetterReflection\Reflection\ReflectionConstant;
use PHPStan\BetterReflection\Reflection\ReflectionFunction;
use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator;
use function assert;
final class DefaultReflector implements \PHPStan\BetterReflection\Reflector\Reflector
{
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\Type\SourceLocator
     */
    private $sourceLocator;
    public function __construct(SourceLocator $sourceLocator)
    {
        $this->sourceLocator = $sourceLocator;
    }
    /**
     * Create a ReflectionClass for the specified $className.
     *
     * @throws IdentifierNotFound
     */
    public function reflectClass(string $identifierName) : ReflectionClass
    {
        $identifier = new Identifier($identifierName, new IdentifierType(IdentifierType::IDENTIFIER_CLASS));
        $classInfo = $this->sourceLocator->locateIdentifier($this, $identifier);
        if ($classInfo === null) {
            throw \PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound::fromIdentifier($identifier);
        }
        assert($classInfo instanceof ReflectionClass);
        return $classInfo;
    }
    /**
     * Get all the classes available in the scope specified by the SourceLocator.
     *
     * @return list<ReflectionClass>
     */
    public function reflectAllClasses() : iterable
    {
        /** @var list<ReflectionClass> $allClasses */
        $allClasses = $this->sourceLocator->locateIdentifiersByType($this, new IdentifierType(IdentifierType::IDENTIFIER_CLASS));
        return $allClasses;
    }
    /**
     * Create a ReflectionFunction for the specified $functionName.
     *
     * @throws IdentifierNotFound
     */
    public function reflectFunction(string $identifierName) : ReflectionFunction
    {
        $identifier = new Identifier($identifierName, new IdentifierType(IdentifierType::IDENTIFIER_FUNCTION));
        $functionInfo = $this->sourceLocator->locateIdentifier($this, $identifier);
        if ($functionInfo === null) {
            throw \PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound::fromIdentifier($identifier);
        }
        assert($functionInfo instanceof ReflectionFunction);
        return $functionInfo;
    }
    /**
     * Get all the functions available in the scope specified by the SourceLocator.
     *
     * @return list<ReflectionFunction>
     */
    public function reflectAllFunctions() : iterable
    {
        /** @var list<ReflectionFunction> $allFunctions */
        $allFunctions = $this->sourceLocator->locateIdentifiersByType($this, new IdentifierType(IdentifierType::IDENTIFIER_FUNCTION));
        return $allFunctions;
    }
    /**
     * Create a ReflectionConstant for the specified $constantName.
     *
     * @throws IdentifierNotFound
     */
    public function reflectConstant(string $identifierName) : ReflectionConstant
    {
        $identifier = new Identifier($identifierName, new IdentifierType(IdentifierType::IDENTIFIER_CONSTANT));
        $constantInfo = $this->sourceLocator->locateIdentifier($this, $identifier);
        if ($constantInfo === null) {
            throw \PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound::fromIdentifier($identifier);
        }
        assert($constantInfo instanceof ReflectionConstant);
        return $constantInfo;
    }
    /**
     * Get all the constants available in the scope specified by the SourceLocator.
     *
     * @return list<ReflectionConstant>
     */
    public function reflectAllConstants() : iterable
    {
        /** @var list<ReflectionConstant> $allConstants */
        $allConstants = $this->sourceLocator->locateIdentifiersByType($this, new IdentifierType(IdentifierType::IDENTIFIER_CONSTANT));
        return $allConstants;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflector;

use PHPStan\BetterReflection\Reflection\ReflectionClass;
use PHPStan\BetterReflection\Reflection\ReflectionConstant;
use PHPStan\BetterReflection\Reflection\ReflectionFunction;
use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator;
/**
 * @deprecated Use Roave\BetterReflection\Reflector\Reflector instead.
 */
class FunctionReflector implements \PHPStan\BetterReflection\Reflector\Reflector
{
    /** @var Reflector */
    private $reflector;
    public function __construct(SourceLocator $sourceLocator)
    {
        $this->reflector = new \PHPStan\BetterReflection\Reflector\DefaultReflector($sourceLocator);
    }
    /**
     * Create a ReflectionFunction for the specified $functionName.
     *
     * @throws IdentifierNotFound
     */
    public function reflect(string $functionName) : ReflectionFunction
    {
        return $this->reflector->reflectFunction($functionName);
    }
    /**
     * Get all the classes available in the scope specified by the SourceLocator.
     *
     * @return ReflectionFunction[]
     */
    public function getAllFunctions() : array
    {
        return $this->reflector->reflectAllFunctions();
    }
    public function reflectClass(string $identifierName) : ReflectionClass
    {
        return $this->reflector->reflectClass($identifierName);
    }
    /**
     * @return list<ReflectionClass>
     */
    public function reflectAllClasses() : iterable
    {
        return $this->reflector->reflectAllClasses();
    }
    public function reflectFunction(string $identifierName) : ReflectionFunction
    {
        return $this->reflector->reflectFunction($identifierName);
    }
    /**
     * @return list<ReflectionFunction>
     */
    public function reflectAllFunctions() : iterable
    {
        return $this->reflector->reflectAllFunctions();
    }
    public function reflectConstant(string $identifierName) : ReflectionConstant
    {
        return $this->reflector->reflectConstant($identifierName);
    }
    /**
     * @return list<ReflectionConstant>
     */
    public function reflectAllConstants() : iterable
    {
        return $this->reflector->reflectAllConstants();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflector;

use PHPStan\BetterReflection\Reflection\ReflectionClass;
use PHPStan\BetterReflection\Reflection\ReflectionConstant;
use PHPStan\BetterReflection\Reflection\ReflectionFunction;
use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator;
/**
 * @deprecated Use Roave\BetterReflection\Reflector\Reflector instead.
 */
class ConstantReflector implements \PHPStan\BetterReflection\Reflector\Reflector
{
    /** @var Reflector */
    private $reflector;
    public function __construct(SourceLocator $sourceLocator)
    {
        $this->reflector = new \PHPStan\BetterReflection\Reflector\DefaultReflector($sourceLocator);
    }
    /**
     * Create a ReflectionFunction for the specified $functionName.
     *
     * @throws IdentifierNotFound
     */
    public function reflect(string $constantName) : ReflectionConstant
    {
        return $this->reflector->reflectConstant($constantName);
    }
    /**
     * Get all the classes available in the scope specified by the SourceLocator.
     *
     * @return ReflectionConstant[]
     */
    public function getAllConstants() : array
    {
        return $this->reflector->reflectAllConstants();
    }
    public function reflectClass(string $identifierName) : ReflectionClass
    {
        return $this->reflector->reflectClass($identifierName);
    }
    /**
     * @return list<ReflectionClass>
     */
    public function reflectAllClasses() : iterable
    {
        return $this->reflector->reflectAllClasses();
    }
    public function reflectFunction(string $identifierName) : ReflectionFunction
    {
        return $this->reflector->reflectFunction($identifierName);
    }
    /**
     * @return list<ReflectionFunction>
     */
    public function reflectAllFunctions() : iterable
    {
        return $this->reflector->reflectAllFunctions();
    }
    public function reflectConstant(string $identifierName) : ReflectionConstant
    {
        return $this->reflector->reflectConstant($identifierName);
    }
    /**
     * @return list<ReflectionConstant>
     */
    public function reflectAllConstants() : iterable
    {
        return $this->reflector->reflectAllConstants();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflector;

use PHPStan\BetterReflection\Reflection\ReflectionClass;
use PHPStan\BetterReflection\Reflection\ReflectionConstant;
use PHPStan\BetterReflection\Reflection\ReflectionFunction;
use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator;
/**
 * @deprecated Use Roave\BetterReflection\Reflector\Reflector instead.
 */
class ClassReflector implements \PHPStan\BetterReflection\Reflector\Reflector
{
    /** @var Reflector */
    private $reflector;
    public function __construct(SourceLocator $sourceLocator)
    {
        $this->reflector = new \PHPStan\BetterReflection\Reflector\DefaultReflector($sourceLocator);
    }
    /**
     * Create a ReflectionClass for the specified $className.
     *
     * @throws IdentifierNotFound
     */
    public function reflect(string $className) : ReflectionClass
    {
        return $this->reflector->reflectClass($className);
    }
    /**
     * Get all the classes available in the scope specified by the SourceLocator.
     *
     * @return ReflectionClass[]
     */
    public function getAllClasses() : array
    {
        return $this->reflector->reflectAllClasses();
    }
    public function reflectClass(string $identifierName) : ReflectionClass
    {
        return $this->reflector->reflectClass($identifierName);
    }
    /**
     * @return list<ReflectionClass>
     */
    public function reflectAllClasses() : iterable
    {
        return $this->reflector->reflectAllClasses();
    }
    public function reflectFunction(string $identifierName) : ReflectionFunction
    {
        return $this->reflector->reflectFunction($identifierName);
    }
    /**
     * @return list<ReflectionFunction>
     */
    public function reflectAllFunctions() : iterable
    {
        return $this->reflector->reflectAllFunctions();
    }
    public function reflectConstant(string $identifierName) : ReflectionConstant
    {
        return $this->reflector->reflectConstant($identifierName);
    }
    /**
     * @return list<ReflectionConstant>
     */
    public function reflectAllConstants() : iterable
    {
        return $this->reflector->reflectAllConstants();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflector\Exception;

use PHPStan\BetterReflection\Identifier\Identifier;
use RuntimeException;
use function sprintf;
class IdentifierNotFound extends RuntimeException
{
    /**
     * @var \PHPStan\BetterReflection\Identifier\Identifier
     */
    private $identifier;
    public function __construct(string $message, Identifier $identifier)
    {
        $this->identifier = $identifier;
        parent::__construct($message);
    }
    public function getIdentifier() : Identifier
    {
        return $this->identifier;
    }
    public static function fromIdentifier(Identifier $identifier) : self
    {
        return new self(sprintf('%s "%s" could not be found in the located source', $identifier->getType()->getName(), $identifier->getName()), $identifier);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Util;

use PhpParser\Node;
use PHPStan\BetterReflection\Reflection\Exception\InvalidConstantNode;
use function count;
use function in_array;
/** @internal */
final class ConstantNodeChecker
{
    private const DEFINE_ARGUMENTS_COUNTS = [2, 3];
    /** @throws InvalidConstantNode */
    public static function assertValidDefineFunctionCall(Node\Expr\FuncCall $node) : void
    {
        if (!$node->name instanceof Node\Name) {
            throw InvalidConstantNode::create($node);
        }
        if ($node->name->toLowerString() !== 'define') {
            throw InvalidConstantNode::create($node);
        }
        if (!in_array(count($node->args), self::DEFINE_ARGUMENTS_COUNTS, \true)) {
            throw InvalidConstantNode::create($node);
        }
        if (!$node->args[0] instanceof Node\Arg || !$node->args[0]->value instanceof Node\Scalar\String_) {
            throw InvalidConstantNode::create($node);
        }
        if (!$node->args[1] instanceof Node\Arg) {
            throw InvalidConstantNode::create($node);
        }
        $valueNode = $node->args[1]->value;
        if ($valueNode instanceof Node\Expr\FuncCall && !($valueNode->name instanceof Node\Name && $valueNode->name->toLowerString() === 'constant')) {
            throw InvalidConstantNode::create($node);
        }
        if ($valueNode instanceof Node\Expr\Variable) {
            throw InvalidConstantNode::create($node);
        }
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Util;

use function array_pop;
use function assert;
use function explode;
use function implode;
use function is_string;
use function preg_match;
use function sprintf;
use function str_replace;
use function strpos;
use function substr;
use function trim;
use const DIRECTORY_SEPARATOR;
class FileHelper
{
    /**
     * @param non-empty-string $path
     *
     * @return non-empty-string
     *
     * @psalm-pure
     */
    public static function normalizeWindowsPath(string $path) : string
    {
        $path = str_replace('\\', '/', $path);
        assert($path !== '');
        return $path;
    }
    /**
     * @param non-empty-string $originalPath
     *
     * @return non-empty-string
     *
     * @psalm-pure
     */
    public static function normalizePath(string $originalPath, string $directorySeparator = DIRECTORY_SEPARATOR) : string
    {
        $isLocalPath = $originalPath !== '' && $originalPath[0] === '/';
        $matches = null;
        if (!$isLocalPath) {
            if (!preg_match('~^([a-z]+)\\:\\/\\/(.+)~', $originalPath, $matches)) {
                $matches = null;
            }
        }
        if ($matches !== null) {
            [, $scheme, $path] = $matches;
        } else {
            $scheme = null;
            $path = $originalPath;
        }
        $path = str_replace(['\\', '//', '///', '////'], '/', $path);
        $pathRoot = strpos($path, '/') === 0 ? $directorySeparator : '';
        $pathParts = explode('/', trim($path, '/'));
        $normalizedPathParts = [];
        foreach ($pathParts as $pathPart) {
            if ($pathPart === '.') {
                continue;
            }
            if ($pathPart === '..') {
                $removedPart = array_pop($normalizedPathParts);
                assert(is_string($removedPart));
                if ($scheme === 'phar' && substr($removedPart, -5) === '.phar') {
                    $scheme = null;
                }
            } else {
                $normalizedPathParts[] = $pathPart;
            }
        }
        return ($scheme !== null ? $scheme . '://' : '') . $pathRoot . implode($directorySeparator, $normalizedPathParts);
    }
    public static function normalizeSystemPath(string $originalPath) : string
    {
        $path = self::normalizeWindowsPath($originalPath);
        preg_match('~^([a-z]+)\\:\\/\\/(.+)~', $path, $matches);
        $scheme = null;
        if ($matches !== []) {
            [, $scheme, $path] = $matches;
        }
        // @infection-ignore-all Identical Needed only on Windows
        if (DIRECTORY_SEPARATOR === '\\') {
            // @infection-ignore-all UnwrapStrReplace Needed only on Windows
            $path = str_replace('/', DIRECTORY_SEPARATOR, $path);
        }
        assert($path !== '');
        return ($scheme !== null ? sprintf('%s://', $scheme) : '') . $path;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Util;

use function class_exists;
use function interface_exists;
use function trait_exists;
/** @internal */
class ClassExistenceChecker
{
    /** @psalm-assert-if-true class-string $name */
    public static function exists(string $name, bool $autoload) : bool
    {
        return self::classExists($name, $autoload) || self::interfaceExists($name, $autoload) || self::traitExists($name, $autoload);
    }
    public static function classExists(string $name, bool $autoload) : bool
    {
        return class_exists($name, $autoload);
    }
    public static function interfaceExists(string $name, bool $autoload) : bool
    {
        return interface_exists($name, $autoload);
    }
    public static function traitExists(string $name, bool $autoload) : bool
    {
        return trait_exists($name, $autoload);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Util;

use InvalidArgumentException;
use PHPStan\BetterReflection\Identifier\IdentifierType;
use PHPStan\BetterReflection\Reflection\Reflection;
use PHPStan\BetterReflection\Reflection\ReflectionClass;
use PHPStan\BetterReflection\Reflection\ReflectionConstant;
use PHPStan\BetterReflection\Reflection\ReflectionFunction;
use PHPStan\BetterReflection\Reflection\ReflectionMethod;
use PHPStan\BetterReflection\Reflector\DefaultReflector;
use PHPStan\BetterReflection\SourceLocator\Ast\Exception\ParseToAstFailure;
use PHPStan\BetterReflection\SourceLocator\Ast\Locator;
use PHPStan\BetterReflection\SourceLocator\Exception\InvalidFileLocation;
use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\SingleFileSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator;
use function array_merge;
final class FindReflectionOnLine
{
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\Type\SourceLocator
     */
    private $sourceLocator;
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\Ast\Locator
     */
    private $astLocator;
    public function __construct(SourceLocator $sourceLocator, Locator $astLocator)
    {
        $this->sourceLocator = $sourceLocator;
        $this->astLocator = $astLocator;
    }
    /**
     * Find a reflection on the specified line number.
     *
     * Returns null if no reflections found on the line.
     *
     * @param non-empty-string $filename
     *
     * @throws InvalidFileLocation
     * @throws ParseToAstFailure
     * @throws InvalidArgumentException
     * @return \PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionClass|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionConstant|\PHPStan\BetterReflection\Reflection\Reflection|null
     */
    public function __invoke(string $filename, int $lineNumber)
    {
        $reflections = $this->computeReflections($filename);
        foreach ($reflections as $reflection) {
            if ($reflection instanceof ReflectionClass && $this->containsLine($reflection, $lineNumber)) {
                foreach ($reflection->getMethods() as $method) {
                    if ($this->containsLine($method, $lineNumber)) {
                        return $method;
                    }
                }
                return $reflection;
            }
            if ($reflection instanceof ReflectionFunction && $this->containsLine($reflection, $lineNumber)) {
                return $reflection;
            }
            if ($reflection instanceof ReflectionConstant && $this->containsLine($reflection, $lineNumber)) {
                return $reflection;
            }
        }
        return null;
    }
    /**
     * Find all class and function reflections in the specified file
     *
     * @param non-empty-string $filename
     *
     * @return list<Reflection>
     *
     * @throws ParseToAstFailure
     * @throws InvalidFileLocation
     */
    private function computeReflections(string $filename) : array
    {
        $singleFileSourceLocator = new SingleFileSourceLocator($filename, $this->astLocator);
        $reflector = new DefaultReflector(new AggregateSourceLocator([$singleFileSourceLocator, $this->sourceLocator]));
        return array_merge($singleFileSourceLocator->locateIdentifiersByType($reflector, new IdentifierType(IdentifierType::IDENTIFIER_CLASS)), $singleFileSourceLocator->locateIdentifiersByType($reflector, new IdentifierType(IdentifierType::IDENTIFIER_FUNCTION)), $singleFileSourceLocator->locateIdentifiersByType($reflector, new IdentifierType(IdentifierType::IDENTIFIER_CONSTANT)));
    }
    /**
     * Check to see if the line is within the boundaries of the reflection specified.
     * @param \PHPStan\BetterReflection\Reflection\ReflectionClass|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionConstant $reflection
     */
    private function containsLine($reflection, int $lineNumber) : bool
    {
        return $lineNumber >= $reflection->getStartLine() && $lineNumber <= $reflection->getEndLine();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Util;

use PhpParser\NodeAbstract;
use function assert;
use function is_string;
/** @internal */
final class GetLastDocComment
{
    /**
     * @return non-empty-string|null
     *
     * @psalm-pure
     */
    public static function forNode(NodeAbstract $node) : ?string
    {
        /** @psalm-suppress ImpureMethodCall */
        $docComment = $node->getDocComment();
        if ($docComment === null) {
            return null;
        }
        /** @psalm-suppress ImpureMethodCall */
        $comment = $docComment->getReformattedText();
        assert(is_string($comment) && $comment !== '');
        return $comment;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Util\Exception;

use InvalidArgumentException;
use function sprintf;
class InvalidNodePosition extends InvalidArgumentException
{
    public static function fromPosition(int $position) : self
    {
        return new self(sprintf('Invalid position %d', $position));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Util\Exception;

use InvalidArgumentException;
use PhpParser\Lexer;
use PhpParser\Node;
use function sprintf;
class NoNodePosition extends InvalidArgumentException
{
    public static function fromNode(Node $node) : self
    {
        return new self(sprintf('%s doesn\'t contain position. Your %s is not configured properly', \get_class($node), Lexer::class));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Util;

use PhpParser\Node;
use PHPStan\BetterReflection\Util\Exception\InvalidNodePosition;
use PHPStan\BetterReflection\Util\Exception\NoNodePosition;
use function strlen;
use function strrpos;
/** @internal */
final class CalculateReflectionColumn
{
    /**
     * @throws InvalidNodePosition
     * @throws NoNodePosition
     *
     * @psalm-pure
     */
    public static function getStartColumn(string $source, Node $node) : int
    {
        if (!$node->hasAttribute('startFilePos')) {
            return -1;
        }
        return self::calculateColumn($source, $node->getStartFilePos());
    }
    /**
     * @throws InvalidNodePosition
     * @throws NoNodePosition
     *
     * @psalm-pure
     */
    public static function getEndColumn(string $source, Node $node) : int
    {
        if (!$node->hasAttribute('endFilePos')) {
            return -1;
        }
        return self::calculateColumn($source, $node->getEndFilePos());
    }
    /**
     * @throws InvalidNodePosition
     *
     * @psalm-pure
     */
    private static function calculateColumn(string $source, int $position) : int
    {
        $sourceLength = strlen($source);
        if ($position >= $sourceLength) {
            return -1;
        }
        $lineStartPosition = strrpos($source, "\n", $position - $sourceLength);
        /** @psalm-var positive-int */
        return $lineStartPosition === \false ? $position + 1 : $position - $lineStartPosition;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\NodeCompiler;

use PHPStan\BetterReflection\Reflection\ReflectionClass;
use PHPStan\BetterReflection\Reflection\ReflectionClassConstant;
use PHPStan\BetterReflection\Reflection\ReflectionConstant;
use PHPStan\BetterReflection\Reflection\ReflectionEnumCase;
use PHPStan\BetterReflection\Reflection\ReflectionFunction;
use PHPStan\BetterReflection\Reflection\ReflectionMethod;
use PHPStan\BetterReflection\Reflection\ReflectionParameter;
use PHPStan\BetterReflection\Reflection\ReflectionProperty;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\Util\FileHelper;
/** @internal */
class CompilerContext
{
    /**
     * @var \PHPStan\BetterReflection\Reflector\Reflector
     */
    private $reflector;
    /**
     * @var \PHPStan\BetterReflection\Reflection\ReflectionClass|\PHPStan\BetterReflection\Reflection\ReflectionProperty|\PHPStan\BetterReflection\Reflection\ReflectionClassConstant|\PHPStan\BetterReflection\Reflection\ReflectionEnumCase|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionParameter|\PHPStan\BetterReflection\Reflection\ReflectionConstant
     */
    private $contextReflection;
    /**
     * @param \PHPStan\BetterReflection\Reflection\ReflectionClass|\PHPStan\BetterReflection\Reflection\ReflectionProperty|\PHPStan\BetterReflection\Reflection\ReflectionClassConstant|\PHPStan\BetterReflection\Reflection\ReflectionEnumCase|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionParameter|\PHPStan\BetterReflection\Reflection\ReflectionConstant $contextReflection
     */
    public function __construct(Reflector $reflector, $contextReflection)
    {
        $this->reflector = $reflector;
        $this->contextReflection = $contextReflection;
    }
    public function getReflector() : Reflector
    {
        return $this->reflector;
    }
    /** @return non-empty-string|null */
    public function getFileName() : ?string
    {
        if ($this->contextReflection instanceof ReflectionConstant) {
            $fileName = $this->contextReflection->getFileName();
            if ($fileName === null) {
                return null;
            }
            return $this->realPath($fileName);
        }
        $fileName = (($getClass = $this->getClass()) ? $getClass->getFileName() : null) ?? (($getFunction = $this->getFunction()) ? $getFunction->getFileName() : null);
        if ($fileName === null) {
            return null;
        }
        return $this->realPath($fileName);
    }
    private function realPath(string $fileName) : string
    {
        return FileHelper::normalizePath($fileName, '/');
    }
    public function getNamespace() : ?string
    {
        if ($this->contextReflection instanceof ReflectionConstant) {
            return $this->contextReflection->getNamespaceName();
        }
        // @infection-ignore-all Coalesce: There's no difference
        return (($getClass = $this->getClass()) ? $getClass->getNamespaceName() : null) ?? (($getFunction = $this->getFunction()) ? $getFunction->getNamespaceName() : null);
    }
    public function getClass() : ?\PHPStan\BetterReflection\Reflection\ReflectionClass
    {
        if ($this->contextReflection instanceof ReflectionClass) {
            return $this->contextReflection;
        }
        if ($this->contextReflection instanceof ReflectionFunction) {
            return null;
        }
        if ($this->contextReflection instanceof ReflectionConstant) {
            return null;
        }
        if ($this->contextReflection instanceof ReflectionClassConstant) {
            return $this->contextReflection->getDeclaringClass();
        }
        if ($this->contextReflection instanceof ReflectionEnumCase) {
            return $this->contextReflection->getDeclaringClass();
        }
        return $this->contextReflection->getImplementingClass();
    }
    /**
     * @return \PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|null
     */
    public function getFunction()
    {
        if ($this->contextReflection instanceof ReflectionMethod) {
            return $this->contextReflection;
        }
        if ($this->contextReflection instanceof ReflectionFunction) {
            return $this->contextReflection;
        }
        if ($this->contextReflection instanceof ReflectionParameter) {
            return $this->contextReflection->getDeclaringFunction();
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\NodeCompiler;

/** @internal */
class CompiledValue
{
    /**
     * @var mixed
     */
    public $value;
    /**
     * @var string|null
     */
    public $constantName = null;
    /**
     * @param mixed $value
     */
    public function __construct($value, ?string $constantName = null)
    {
        $this->value = $value;
        $this->constantName = $constantName;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\NodeCompiler\Exception;

use LogicException;
use PhpParser\Node;
use PHPStan\BetterReflection\NodeCompiler\CompilerContext;
use PHPStan\BetterReflection\Reflection\ReflectionClass;
use PHPStan\BetterReflection\Util\FileHelper;
use function assert;
use function sprintf;
/** @internal */
class UnableToCompileNode extends LogicException
{
    /**
     * @var string|null
     */
    private $constantName = null;
    public function constantName() : ?string
    {
        return $this->constantName;
    }
    public static function forUnRecognizedExpressionInContext(Node\Expr $expression, CompilerContext $context) : self
    {
        return new self(sprintf('Unable to compile expression in %s: unrecognized node type %s in file %s (line %d)', self::compilerContextToContextDescription($context), \get_class($expression), self::getFileName($context), $expression->getLine()));
    }
    public static function becauseOfNotFoundClassConstantReference(CompilerContext $fetchContext, ReflectionClass $targetClass, Node\Expr\ClassConstFetch $constantFetch) : self
    {
        assert($constantFetch->name instanceof Node\Identifier);
        return new self(sprintf('Could not locate constant %s::%s while trying to evaluate constant expression in %s in file %s (line %d)', $targetClass->getName(), $constantFetch->name->name, self::compilerContextToContextDescription($fetchContext), self::getFileName($fetchContext), $constantFetch->getLine()));
    }
    public static function becauseOfNotFoundConstantReference(CompilerContext $fetchContext, Node\Expr\ConstFetch $constantFetch, string $constantName) : self
    {
        $exception = new self(sprintf('Could not locate constant "%s" while evaluating expression in %s in file %s (line %d)', $constantName, self::compilerContextToContextDescription($fetchContext), self::getFileName($fetchContext), $constantFetch->getLine()));
        $exception->constantName = $constantName;
        return $exception;
    }
    public static function becauseOfInvalidEnumCasePropertyFetch(CompilerContext $fetchContext, ReflectionClass $targetClass, Node\Expr\PropertyFetch $propertyFetch) : self
    {
        assert($propertyFetch->var instanceof Node\Expr\ClassConstFetch);
        assert($propertyFetch->var->name instanceof Node\Identifier);
        assert($propertyFetch->name instanceof Node\Identifier);
        return new self(sprintf('Could not get %s::%s->%s while trying to evaluate constant expression in %s in file %s (line %d)', $targetClass->getName(), $propertyFetch->var->name->name, $propertyFetch->name->toString(), self::compilerContextToContextDescription($fetchContext), self::getFileName($fetchContext), $propertyFetch->getLine()));
    }
    /**
     * @param \PhpParser\Node\Scalar\MagicConst\Dir|\PhpParser\Node\Scalar\MagicConst\File $node
     */
    public static function becauseOfMissingFileName(CompilerContext $context, $node) : self
    {
        return new self(sprintf('No file name for %s (line %d)', self::compilerContextToContextDescription($context), $node->getLine()));
    }
    public static function becauseOfNonexistentFile(CompilerContext $context, string $fileName) : self
    {
        return new self(sprintf('File not found for %s: %s', self::compilerContextToContextDescription($context), $fileName));
    }
    public static function becauseOfClassCannotBeLoaded(CompilerContext $context, Node\Expr\New_ $newNode, string $className) : self
    {
        return new self(sprintf('Cound not load class "%s" while evaluating expression in %s in file %s (line %d)', $className, self::compilerContextToContextDescription($context), self::getFileName($context), $newNode->getLine()));
    }
    private static function getFileName(CompilerContext $fetchContext) : string
    {
        $fileName = $fetchContext->getFileName();
        return $fileName !== null ? FileHelper::normalizeWindowsPath($fileName) : '""';
    }
    private static function compilerContextToContextDescription(CompilerContext $fetchContext) : string
    {
        $class = $fetchContext->getClass();
        $function = $fetchContext->getFunction();
        if ($class !== null && $function !== null) {
            return sprintf('method %s::%s()', $class->getName(), $function->getName());
        }
        if ($class !== null) {
            return sprintf('class %s', $class->getName());
        }
        if ($function !== null) {
            return sprintf('function %s()', $function->getName());
        }
        $namespace = $fetchContext->getNamespace();
        if ($namespace !== null) {
            return sprintf('namespace %s', $namespace);
        }
        return 'global namespace';
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\NodeCompiler;

use PhpParser\ConstExprEvaluator;
use PhpParser\Node;
use PHPStan\BetterReflection\Reflection\ReflectionClass;
use PHPStan\BetterReflection\Reflection\ReflectionClassConstant;
use PHPStan\BetterReflection\Reflection\ReflectionEnum;
use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
use function array_map;
use function assert;
use function class_exists;
use function constant;
use function defined;
use function dirname;
use function explode;
use function in_array;
use function is_file;
use function sprintf;
/** @internal */
class CompileNodeToValue
{
    private const TRUE_FALSE_NULL = ['true', 'false', 'null'];
    /**
     * Compile an expression from a node into a value.
     *
     * @param Node\Stmt\Expression|Node\Expr $node Node has to be processed by the PhpParser\NodeVisitor\NameResolver
     *
     * @throws Exception\UnableToCompileNode
     */
    public function __invoke(Node $node, \PHPStan\BetterReflection\NodeCompiler\CompilerContext $context) : \PHPStan\BetterReflection\NodeCompiler\CompiledValue
    {
        if ($node instanceof Node\Stmt\Expression) {
            return $this($node->expr, $context);
        }
        $constantName = null;
        if ($node instanceof Node\Expr\ConstFetch && !in_array($node->name->toLowerString(), self::TRUE_FALSE_NULL, \true)) {
            $constantName = $this->resolveConstantName($node, $context);
        } elseif ($node instanceof Node\Expr\ClassConstFetch) {
            $constantName = $this->resolveClassConstantName($node, $context);
        }
        $constExprEvaluator = new ConstExprEvaluator(function (Node\Expr $node) use($context, $constantName) {
            if ($node instanceof Node\Expr\ConstFetch) {
                return $this->getConstantValue($node, $constantName, $context);
            }
            if ($node instanceof Node\Expr\ClassConstFetch) {
                return $this->getClassConstantValue($node, $constantName, $context);
            }
            if ($node instanceof Node\Expr\New_) {
                return $this->compileNew($node, $context);
            }
            if ($node instanceof Node\Scalar\MagicConst\Dir) {
                return $this->compileDirConstant($context, $node);
            }
            if ($node instanceof Node\Scalar\MagicConst\File) {
                return $this->compileFileConstant($context, $node);
            }
            if ($node instanceof Node\Scalar\MagicConst\Class_) {
                return $this->compileClassConstant($context);
            }
            if ($node instanceof Node\Scalar\MagicConst\Line) {
                return $node->getLine();
            }
            if ($node instanceof Node\Scalar\MagicConst\Namespace_) {
                return $context->getNamespace() ?? '';
            }
            if ($node instanceof Node\Scalar\MagicConst\Method) {
                $class = $context->getClass();
                $function = $context->getFunction();
                if ($class !== null && $function !== null) {
                    return sprintf('%s::%s', $class->getName(), $function->getName());
                }
                if ($function !== null) {
                    return $function->getName();
                }
                return '';
            }
            if ($node instanceof Node\Scalar\MagicConst\Function_) {
                return (($getFunction = $context->getFunction()) ? $getFunction->getName() : null) ?? '';
            }
            if ($node instanceof Node\Scalar\MagicConst\Trait_) {
                $class = $context->getClass();
                if ($class !== null && $class->isTrait()) {
                    return $class->getName();
                }
                return '';
            }
            if ($node instanceof Node\Expr\FuncCall && $node->name instanceof Node\Name && $node->name->toLowerString() === 'constant' && $node->args[0] instanceof Node\Arg && $node->args[0]->value instanceof Node\Scalar\String_ && defined($node->args[0]->value->value)) {
                return constant($node->args[0]->value->value);
            }
            if ($node instanceof Node\Expr\PropertyFetch && $node->var instanceof Node\Expr\ClassConstFetch) {
                return $this->getEnumPropertyValue($node, $context);
            }
            throw \PHPStan\BetterReflection\NodeCompiler\Exception\UnableToCompileNode::forUnRecognizedExpressionInContext($node, $context);
        });
        /** @psalm-var mixed $value */
        $value = $constExprEvaluator->evaluateDirectly($node);
        return new \PHPStan\BetterReflection\NodeCompiler\CompiledValue($value, $constantName);
    }
    /**
     * @return mixed
     */
    private function getEnumPropertyValue(Node\Expr\PropertyFetch $node, \PHPStan\BetterReflection\NodeCompiler\CompilerContext $context)
    {
        assert($node->var instanceof Node\Expr\ClassConstFetch);
        assert($node->var->class instanceof Node\Name);
        $className = $this->resolveClassName($node->var->class->toString(), $context);
        $class = $context->getReflector()->reflectClass($className);
        if (!$class instanceof ReflectionEnum) {
            throw \PHPStan\BetterReflection\NodeCompiler\Exception\UnableToCompileNode::becauseOfInvalidEnumCasePropertyFetch($context, $class, $node);
        }
        assert($node->var->name instanceof Node\Identifier);
        $caseName = $node->var->name->name;
        assert($caseName !== '');
        $case = $class->getCase($caseName);
        if ($case === null) {
            throw \PHPStan\BetterReflection\NodeCompiler\Exception\UnableToCompileNode::becauseOfInvalidEnumCasePropertyFetch($context, $class, $node);
        }
        assert($node->name instanceof Node\Identifier);
        switch ($node->name->toString()) {
            case 'value':
                return $case->getValue();
            case 'name':
                return $case->getName();
            default:
                throw \PHPStan\BetterReflection\NodeCompiler\Exception\UnableToCompileNode::becauseOfInvalidEnumCasePropertyFetch($context, $class, $node);
        }
    }
    private function resolveConstantName(Node\Expr\ConstFetch $constNode, \PHPStan\BetterReflection\NodeCompiler\CompilerContext $context) : string
    {
        $constantName = $constNode->name->toString();
        $namespace = $context->getNamespace() ?? '';
        if ($constNode->name->isUnqualified()) {
            $namespacedConstantName = sprintf('%s\\%s', $namespace, $constantName);
            if ($this->constantExists($namespacedConstantName, $context)) {
                return $namespacedConstantName;
            }
        }
        if ($this->constantExists($constantName, $context)) {
            return $constantName;
        }
        throw \PHPStan\BetterReflection\NodeCompiler\Exception\UnableToCompileNode::becauseOfNotFoundConstantReference($context, $constNode, $constantName);
    }
    private function constantExists(string $constantName, \PHPStan\BetterReflection\NodeCompiler\CompilerContext $context) : bool
    {
        if (defined($constantName)) {
            return \true;
        }
        try {
            $context->getReflector()->reflectConstant($constantName);
            return \true;
        } catch (IdentifierNotFound $exception) {
            return \false;
        }
    }
    /**
     * @return mixed
     */
    private function getConstantValue(Node\Expr\ConstFetch $node, ?string $constantName, \PHPStan\BetterReflection\NodeCompiler\CompilerContext $context)
    {
        // It's not resolved when constant value is expression
        // @infection-ignore-all Assignment, AssignCoalesce: There's no difference, ??= is just optimization
        $constantName = $constantName ?? $this->resolveConstantName($node, $context);
        if (defined($constantName)) {
            return constant($constantName);
        }
        return $context->getReflector()->reflectConstant($constantName)->getValue();
    }
    private function resolveClassConstantName(Node\Expr\ClassConstFetch $node, \PHPStan\BetterReflection\NodeCompiler\CompilerContext $context) : string
    {
        assert($node->name instanceof Node\Identifier);
        $constantName = $node->name->name;
        assert($node->class instanceof Node\Name);
        $className = $node->class->toString();
        return sprintf('%s::%s', $this->resolveClassName($className, $context), $constantName);
    }
    /**
     * @return mixed
     */
    private function getClassConstantValue(Node\Expr\ClassConstFetch $node, ?string $classConstantName, \PHPStan\BetterReflection\NodeCompiler\CompilerContext $context)
    {
        // It's not resolved when constant value is expression
        // @infection-ignore-all Assignment, AssignCoalesce: There's no difference, ??= is just optimization
        $classConstantName = $classConstantName ?? $this->resolveClassConstantName($node, $context);
        [$className, $constantName] = explode('::', $classConstantName);
        assert($constantName !== '');
        if ($constantName === 'class') {
            return $className;
        }
        $classContext = $context->getClass();
        $classReflection = $classContext !== null && $classContext->getName() === $className ? $classContext : $context->getReflector()->reflectClass($className);
        $reflectionConstant = $classReflection->getConstant($constantName);
        if (!$reflectionConstant instanceof ReflectionClassConstant) {
            throw \PHPStan\BetterReflection\NodeCompiler\Exception\UnableToCompileNode::becauseOfNotFoundClassConstantReference($context, $classReflection, $node);
        }
        return $reflectionConstant->getValue();
    }
    private function compileNew(Node\Expr\New_ $node, \PHPStan\BetterReflection\NodeCompiler\CompilerContext $context) : object
    {
        assert($node->class instanceof Node\Name);
        /** @psalm-var class-string $className */
        $className = $node->class->toString();
        if (!class_exists($className)) {
            throw \PHPStan\BetterReflection\NodeCompiler\Exception\UnableToCompileNode::becauseOfClassCannotBeLoaded($context, $node, $className);
        }
        $arguments = array_map(function (Node\Arg $arg) use($context) {
            return $this($arg->value, $context)->value;
        }, $node->args);
        return new $className(...$arguments);
    }
    /**
     * Compile a __DIR__ node
     */
    private function compileDirConstant(\PHPStan\BetterReflection\NodeCompiler\CompilerContext $context, Node\Scalar\MagicConst\Dir $node) : string
    {
        $fileName = $context->getFileName();
        if ($fileName === null) {
            throw \PHPStan\BetterReflection\NodeCompiler\Exception\UnableToCompileNode::becauseOfMissingFileName($context, $node);
        }
        if (!is_file($fileName)) {
            throw \PHPStan\BetterReflection\NodeCompiler\Exception\UnableToCompileNode::becauseOfNonexistentFile($context, $fileName);
        }
        return dirname($fileName);
    }
    /**
     * Compile a __FILE__ node
     */
    private function compileFileConstant(\PHPStan\BetterReflection\NodeCompiler\CompilerContext $context, Node\Scalar\MagicConst\File $node) : string
    {
        $fileName = $context->getFileName();
        if ($fileName === null) {
            throw \PHPStan\BetterReflection\NodeCompiler\Exception\UnableToCompileNode::becauseOfMissingFileName($context, $node);
        }
        if (!is_file($fileName)) {
            throw \PHPStan\BetterReflection\NodeCompiler\Exception\UnableToCompileNode::becauseOfNonexistentFile($context, $fileName);
        }
        return $fileName;
    }
    /**
     * Compiles magic constant __CLASS__
     */
    private function compileClassConstant(\PHPStan\BetterReflection\NodeCompiler\CompilerContext $context) : string
    {
        return (($getClass = $context->getClass()) ? $getClass->getName() : null) ?? '';
    }
    private function resolveClassName(string $className, \PHPStan\BetterReflection\NodeCompiler\CompilerContext $context) : string
    {
        if ($className !== 'self' && $className !== 'static' && $className !== 'parent') {
            return $className;
        }
        $classContext = $context->getClass();
        assert($classContext !== null);
        if ($className !== 'parent') {
            return $classContext->getName();
        }
        $parentClass = $classContext->getParentClass();
        assert($parentClass instanceof ReflectionClass);
        return $parentClass->getName();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection;

use LogicException;
use PhpParser\Node\Identifier;
use PhpParser\Node\Name;
use PHPStan\BetterReflection\Reflector\Reflector;
use function array_key_exists;
use function assert;
use function sprintf;
use function strtolower;
/** @psalm-immutable */
class ReflectionNamedType extends \PHPStan\BetterReflection\Reflection\ReflectionType
{
    private const BUILT_IN_TYPES = ['int' => null, 'float' => null, 'string' => null, 'bool' => null, 'callable' => null, 'self' => null, 'parent' => null, 'array' => null, 'iterable' => null, 'object' => null, 'void' => null, 'mixed' => null, 'static' => null, 'null' => null, 'never' => null, 'false' => null, 'true' => null];
    /** @var non-empty-string */
    private $name;
    /**
     * @var \PHPStan\BetterReflection\Reflector\Reflector
     */
    private $reflector;
    /**
     * @var \PHPStan\BetterReflection\Reflection\ReflectionParameter|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionEnum|\PHPStan\BetterReflection\Reflection\ReflectionProperty
     */
    private $owner;
    /** @internal
     * @param \PHPStan\BetterReflection\Reflection\ReflectionParameter|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionEnum|\PHPStan\BetterReflection\Reflection\ReflectionProperty $owner
     * @param \PhpParser\Node\Identifier|\PhpParser\Node\Name $type */
    public function __construct(Reflector $reflector, $owner, $type)
    {
        $this->reflector = $reflector;
        $this->owner = $owner;
        $name = $type->toString();
        assert($name !== '');
        $this->name = $name;
    }
    /** @internal
     * @param \PHPStan\BetterReflection\Reflection\ReflectionParameter|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionEnum|\PHPStan\BetterReflection\Reflection\ReflectionProperty $owner
     * @return $this */
    public function withOwner($owner)
    {
        $clone = clone $this;
        $clone->owner = $owner;
        return $clone;
    }
    /** @return non-empty-string */
    public function getName() : string
    {
        return $this->name;
    }
    /**
     * Checks if it is a built-in type (i.e., it's not an object...)
     *
     * @see https://php.net/manual/en/reflectiontype.isbuiltin.php
     */
    public function isBuiltin() : bool
    {
        return array_key_exists(strtolower($this->name), self::BUILT_IN_TYPES);
    }
    public function getClass() : \PHPStan\BetterReflection\Reflection\ReflectionClass
    {
        if (!$this->isBuiltin()) {
            return $this->reflector->reflectClass($this->name);
        }
        if ($this->owner instanceof \PHPStan\BetterReflection\Reflection\ReflectionEnum || $this->owner instanceof \PHPStan\BetterReflection\Reflection\ReflectionFunction || $this->owner instanceof \PHPStan\BetterReflection\Reflection\ReflectionParameter && $this->owner->getDeclaringFunction() instanceof \PHPStan\BetterReflection\Reflection\ReflectionFunction) {
            throw new LogicException(sprintf('The type %s cannot be resolved to class', $this->name));
        }
        $lowercaseName = strtolower($this->name);
        if ($lowercaseName === 'self') {
            $class = $this->owner->getImplementingClass();
            assert($class instanceof \PHPStan\BetterReflection\Reflection\ReflectionClass);
            return $class;
        }
        if ($lowercaseName === 'parent') {
            $class = $this->owner->getDeclaringClass();
            assert($class instanceof \PHPStan\BetterReflection\Reflection\ReflectionClass);
            $parentClass = $class->getParentClass();
            assert($parentClass instanceof \PHPStan\BetterReflection\Reflection\ReflectionClass);
            return $parentClass;
        }
        if ($this->owner instanceof \PHPStan\BetterReflection\Reflection\ReflectionMethod && $lowercaseName === 'static') {
            return $this->owner->getCurrentClass();
        }
        throw new LogicException(sprintf('The type %s cannot be resolved to class', $this->name));
    }
    public function allowsNull() : bool
    {
        switch (strtolower($this->name)) {
            case 'mixed':
                return \true;
            case 'null':
                return \true;
            default:
                return \false;
        }
    }
    /** @return non-empty-string */
    public function __toString() : string
    {
        return $this->getName();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection;

use PhpParser\Node;
use PhpParser\Node\Expr\Yield_ as YieldNode;
use PhpParser\Node\Expr\YieldFrom as YieldFromNode;
use PhpParser\Node\Stmt\ClassMethod as MethodNode;
use PhpParser\Node\Stmt\Throw_ as NodeThrow;
use PhpParser\NodeTraverser;
use PhpParser\NodeVisitor\FindingVisitor;
use PHPStan\BetterReflection\Reflection\Annotation\AnnotationHelper;
use PHPStan\BetterReflection\Reflection\Attribute\ReflectionAttributeHelper;
use PHPStan\BetterReflection\Reflection\Exception\CodeLocationMissing;
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
use PHPStan\BetterReflection\Util\CalculateReflectionColumn;
use PHPStan\BetterReflection\Util\Exception\NoNodePosition;
use PHPStan\BetterReflection\Util\GetLastDocComment;
use function array_filter;
use function array_values;
use function assert;
use function count;
use function is_array;
/** @psalm-immutable */
trait ReflectionFunctionAbstract
{
    /**
     * @var non-empty-string
     * @psalm-allow-private-mutation
     */
    private $name;
    /**
     * @var array<non-empty-string, ReflectionParameter>
     * @psalm-allow-private-mutation
     */
    private $parameters;
    /** @psalm-allow-private-mutation
     * @var bool */
    private $returnsReference;
    /** @psalm-allow-private-mutation
     * @var \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType|null */
    private $returnType;
    /**
     * @var list<ReflectionAttribute>
     * @psalm-allow-private-mutation
     */
    private $attributes;
    /**
     * @var non-empty-string|null
     * @psalm-allow-private-mutation
     */
    private $docComment;
    /**
     * @var positive-int|null
     * @psalm-allow-private-mutation
     */
    private $startLine;
    /**
     * @var positive-int|null
     * @psalm-allow-private-mutation
     */
    private $endLine;
    /**
     * @var positive-int|null
     * @psalm-allow-private-mutation
     */
    private $startColumn;
    /**
     * @var positive-int|null
     * @psalm-allow-private-mutation
     */
    private $endColumn;
    /** @psalm-allow-private-mutation
     * @var bool */
    private $couldThrow = \false;
    /** @psalm-allow-private-mutation
     * @var bool */
    private $isClosure = \false;
    /** @psalm-allow-private-mutation
     * @var bool */
    private $isGenerator = \false;
    /** @return non-empty-string */
    public abstract function __toString() : string;
    /** @return non-empty-string */
    public abstract function getShortName() : string;
    /** @psalm-external-mutation-free
     * @param MethodNode|\PhpParser\Node\Stmt\Function_|\PhpParser\Node\Expr\Closure|\PhpParser\Node\Expr\ArrowFunction $node */
    private function fillFromNode($node) : void
    {
        $this->parameters = $this->createParameters($node);
        $this->returnsReference = $node->returnsByRef();
        $this->returnType = $this->createReturnType($node);
        $this->attributes = ReflectionAttributeHelper::createAttributes($this->reflector, $this, $node->attrGroups);
        $this->docComment = GetLastDocComment::forNode($node);
        $this->couldThrow = $this->computeCouldThrow($node);
        $startLine = null;
        if ($node->hasAttribute('startLine')) {
            $startLine = $node->getStartLine();
            assert($startLine > 0);
        }
        $endLine = null;
        if ($node->hasAttribute('endLine')) {
            $endLine = $node->getEndLine();
            assert($endLine > 0);
        }
        $this->startLine = $startLine;
        $this->endLine = $endLine;
        try {
            $this->startColumn = CalculateReflectionColumn::getStartColumn($this->getLocatedSource()->getSource(), $node);
        } catch (NoNodePosition $exception) {
            $this->startColumn = null;
        }
        try {
            $this->endColumn = CalculateReflectionColumn::getEndColumn($this->getLocatedSource()->getSource(), $node);
        } catch (NoNodePosition $exception) {
            $this->endColumn = null;
        }
    }
    /** @return array<non-empty-string, ReflectionParameter>
     * @param \PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Function_|\PhpParser\Node\Expr\Closure|\PhpParser\Node\Expr\ArrowFunction $node */
    private function createParameters($node) : array
    {
        $parameters = [];
        /** @var list<Node\Param> $nodeParams */
        $nodeParams = $node->params;
        foreach ($nodeParams as $paramIndex => $paramNode) {
            $parameter = \PHPStan\BetterReflection\Reflection\ReflectionParameter::createFromNode($this->reflector, $paramNode, $this, $paramIndex, $this->isParameterOptional($nodeParams, $paramIndex));
            $parameters[$parameter->getName()] = $parameter;
        }
        return $parameters;
    }
    /**
     * Get the "full" name of the function (e.g. for A\B\foo, this will return
     * "A\B\foo").
     *
     * @return non-empty-string
     */
    public function getName() : string
    {
        $namespace = $this->getNamespaceName();
        if ($namespace === null) {
            return $this->getShortName();
        }
        return $namespace . '\\' . $this->getShortName();
    }
    /**
     * Get the "namespace" name of the function (e.g. for A\B\foo, this will
     * return "A\B").
     */
    public function getNamespaceName() : ?string
    {
        return $this->namespace;
    }
    /**
     * Decide if this function is part of a namespace. Returns false if the class
     * is in the global namespace or does not have a specified namespace.
     */
    public function inNamespace() : bool
    {
        return $this->namespace !== null;
    }
    /**
     * Get the number of parameters for this class.
     *
     * @return positive-int|0
     */
    public function getNumberOfParameters() : int
    {
        return count($this->parameters);
    }
    /**
     * Get the number of required parameters for this method.
     *
     * @return positive-int|0
     */
    public function getNumberOfRequiredParameters() : int
    {
        return count(array_filter($this->parameters, static function (\PHPStan\BetterReflection\Reflection\ReflectionParameter $p) : bool {
            return !$p->isOptional();
        }));
    }
    /**
     * Get an array list of the parameters for this method signature, as an
     * array of ReflectionParameter instances.
     *
     * @return list<ReflectionParameter>
     */
    public function getParameters() : array
    {
        return array_values($this->parameters);
    }
    /** @param list<Node\Param> $parameterNodes */
    private function isParameterOptional(array $parameterNodes, int $parameterIndex) : bool
    {
        foreach ($parameterNodes as $otherParameterIndex => $otherParameterNode) {
            if ($otherParameterIndex < $parameterIndex) {
                continue;
            }
            // When we find next parameter that does not have a default or is not variadic,
            // it means current parameter cannot be optional EVEN if it has a default value
            if ($otherParameterNode->default === null && !$otherParameterNode->variadic) {
                return \false;
            }
        }
        return \true;
    }
    /**
     * Get a single parameter by name. Returns null if parameter not found for
     * the function.
     *
     * @param non-empty-string $parameterName
     */
    public function getParameter(string $parameterName) : ?\PHPStan\BetterReflection\Reflection\ReflectionParameter
    {
        return $this->parameters[$parameterName] ?? null;
    }
    /** @return non-empty-string|null */
    public function getDocComment() : ?string
    {
        return $this->docComment;
    }
    /** @return non-empty-string|null */
    public function getFileName() : ?string
    {
        return $this->locatedSource->getFileName();
    }
    public function getLocatedSource() : LocatedSource
    {
        return $this->locatedSource;
    }
    /**
     * Is this function a closure?
     */
    public function isClosure() : bool
    {
        return $this->isClosure;
    }
    public function isDeprecated() : bool
    {
        return AnnotationHelper::isDeprecated($this->docComment);
    }
    public function isInternal() : bool
    {
        return $this->locatedSource->isInternal();
    }
    /**
     * Is this a user-defined function (will always return the opposite of
     * whatever isInternal returns).
     */
    public function isUserDefined() : bool
    {
        return !$this->isInternal();
    }
    /** @return non-empty-string|null */
    public function getExtensionName() : ?string
    {
        return $this->locatedSource->getExtensionName();
    }
    /**
     * Check if the function has a variadic parameter.
     */
    public function isVariadic() : bool
    {
        foreach ($this->parameters as $parameter) {
            if ($parameter->isVariadic()) {
                return \true;
            }
        }
        return \false;
    }
    /** Checks if the function/method contains `throw` expressions. */
    public function couldThrow() : bool
    {
        return $this->couldThrow;
    }
    /**
     * @param MethodNode|\PhpParser\Node\Stmt\Function_|\PhpParser\Node\Expr\Closure|\PhpParser\Node\Expr\ArrowFunction $node
     */
    private function computeCouldThrow($node) : bool
    {
        $statements = $node->getStmts();
        if ($statements === null) {
            return \false;
        }
        $visitor = new FindingVisitor(static function (Node $node) : bool {
            return $node instanceof NodeThrow;
        });
        $traverser = new NodeTraverser();
        $traverser->addVisitor($visitor);
        $traverser->traverse($statements);
        return $visitor->getFoundNodes() !== [];
    }
    /**
     * Recursively search an array of statements (PhpParser nodes) to find if a
     * yield expression exists anywhere (thus indicating this is a generator).
     */
    private function nodeIsOrContainsYield(Node $node) : bool
    {
        if ($node instanceof YieldNode) {
            return \true;
        }
        if ($node instanceof YieldFromNode) {
            return \true;
        }
        /** @psalm-var string $nodeName */
        foreach ($node->getSubNodeNames() as $nodeName) {
            $nodeProperty = $node->{$nodeName};
            if ($nodeProperty instanceof Node && $this->nodeIsOrContainsYield($nodeProperty)) {
                return \true;
            }
            if (!is_array($nodeProperty)) {
                continue;
            }
            /** @psalm-var mixed $nodePropertyArrayItem */
            foreach ($nodeProperty as $nodePropertyArrayItem) {
                if ($nodePropertyArrayItem instanceof Node && $this->nodeIsOrContainsYield($nodePropertyArrayItem)) {
                    return \true;
                }
            }
        }
        return \false;
    }
    /**
     * Check if this function can be used as a generator (i.e. contains the
     * "yield" keyword).
     */
    public function isGenerator() : bool
    {
        return $this->isGenerator;
    }
    /**
     * Get the line number that this function starts on.
     *
     * @return positive-int
     *
     * @throws CodeLocationMissing
     */
    public function getStartLine() : int
    {
        if ($this->startLine === null) {
            throw CodeLocationMissing::create();
        }
        return $this->startLine;
    }
    /**
     * Get the line number that this function ends on.
     *
     * @return positive-int
     *
     * @throws CodeLocationMissing
     */
    public function getEndLine() : int
    {
        if ($this->endLine === null) {
            throw CodeLocationMissing::create();
        }
        return $this->endLine;
    }
    /**
     * @return positive-int
     *
     * @throws CodeLocationMissing
     */
    public function getStartColumn() : int
    {
        if ($this->startColumn === null) {
            throw CodeLocationMissing::create();
        }
        return $this->startColumn;
    }
    /**
     * @return positive-int
     *
     * @throws CodeLocationMissing
     */
    public function getEndColumn() : int
    {
        if ($this->endColumn === null) {
            throw CodeLocationMissing::create();
        }
        return $this->endColumn;
    }
    /**
     * Is this function declared as a reference.
     */
    public function returnsReference() : bool
    {
        return $this->returnsReference;
    }
    /**
     * Get the return type declaration
     * @return \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType|null
     */
    public function getReturnType()
    {
        if ($this->hasTentativeReturnType()) {
            return null;
        }
        return $this->returnType;
    }
    /**
     * Do we have a return type declaration
     */
    public function hasReturnType() : bool
    {
        if ($this->hasTentativeReturnType()) {
            return \false;
        }
        return $this->returnType !== null;
    }
    public function hasTentativeReturnType() : bool
    {
        if ($this->isUserDefined()) {
            return \false;
        }
        return AnnotationHelper::hasTentativeReturnType($this->docComment);
    }
    /**
     * @return \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType|null
     */
    public function getTentativeReturnType()
    {
        if (!$this->hasTentativeReturnType()) {
            return null;
        }
        return $this->returnType;
    }
    /**
     * @param MethodNode|\PhpParser\Node\Stmt\Function_|\PhpParser\Node\Expr\Closure|\PhpParser\Node\Expr\ArrowFunction $node
     * @return \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType|null
     */
    private function createReturnType($node)
    {
        $returnType = $node->getReturnType();
        if ($returnType === null) {
            return null;
        }
        assert($returnType instanceof Node\Identifier || $returnType instanceof Node\Name || $returnType instanceof Node\NullableType || $returnType instanceof Node\UnionType || $returnType instanceof Node\IntersectionType);
        return \PHPStan\BetterReflection\Reflection\ReflectionType::createFromNode($this->reflector, $this, $returnType);
    }
    /** @return list<ReflectionAttribute> */
    public function getAttributes() : array
    {
        return $this->attributes;
    }
    /** @return list<ReflectionAttribute> */
    public function getAttributesByName(string $name) : array
    {
        return ReflectionAttributeHelper::filterAttributesByName($this->getAttributes(), $name);
    }
    /**
     * @param class-string $className
     *
     * @return list<ReflectionAttribute>
     */
    public function getAttributesByInstance(string $className) : array
    {
        return ReflectionAttributeHelper::filterAttributesByInstance($this->getAttributes(), $className);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Adapter;

use ReflectionNamedType as CoreReflectionNamedType;
use PHPStan\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType;
use function strtolower;
/** @psalm-immutable */
final class ReflectionNamedType extends CoreReflectionNamedType
{
    /**
     * @var BetterReflectionNamedType
     */
    private $betterReflectionType;
    /**
     * @var bool
     */
    private $allowsNull;
    public function __construct(BetterReflectionNamedType $betterReflectionType, bool $allowsNull)
    {
        $this->betterReflectionType = $betterReflectionType;
        $this->allowsNull = $allowsNull;
    }
    public function getName() : string
    {
        return $this->betterReflectionType->getName();
    }
    /** @return non-empty-string */
    public function __toString() : string
    {
        $type = strtolower($this->betterReflectionType->getName());
        if (!$this->allowsNull || $type === 'mixed' || $type === 'null') {
            return $this->betterReflectionType->__toString();
        }
        return '?' . $this->betterReflectionType->__toString();
    }
    public function allowsNull() : bool
    {
        return $this->allowsNull;
    }
    public function isBuiltin() : bool
    {
        $type = strtolower($this->betterReflectionType->getName());
        if ($type === 'self' || $type === 'parent' || $type === 'static') {
            return \false;
        }
        return $this->betterReflectionType->isBuiltin();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Adapter;

use OutOfBoundsException;
use ReflectionClass as CoreReflectionClass;
use ReflectionException as CoreReflectionException;
use ReflectionExtension as CoreReflectionExtension;
use ReflectionMethod as CoreReflectionMethod;
use ReturnTypeWillChange;
use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute;
use PHPStan\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass;
use PHPStan\BetterReflection\Reflection\ReflectionClassConstant as BetterReflectionClassConstant;
use PHPStan\BetterReflection\Reflection\ReflectionEnum as BetterReflectionEnum;
use PHPStan\BetterReflection\Reflection\ReflectionEnumCase as BetterReflectionEnumCase;
use PHPStan\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod;
use PHPStan\BetterReflection\Reflection\ReflectionProperty as BetterReflectionProperty;
use PHPStan\BetterReflection\Util\ClassExistenceChecker;
use PHPStan\BetterReflection\Util\FileHelper;
use ValueError;
use function array_combine;
use function array_map;
use function array_values;
use function constant;
use function func_get_args;
use function func_num_args;
use function sprintf;
use function strtolower;
/**
 * @template-extends CoreReflectionClass<object>
 * @psalm-suppress PropertyNotSetInConstructor
 */
final class ReflectionClass extends CoreReflectionClass
{
    public const IS_READONLY = 65536;
    /**
     * @var BetterReflectionClass|BetterReflectionEnum
     */
    private $betterReflectionClass;
    /**
     * @param BetterReflectionClass|BetterReflectionEnum $betterReflectionClass
     */
    public function __construct($betterReflectionClass)
    {
        $this->betterReflectionClass = $betterReflectionClass;
        unset($this->name);
    }
    /** @return non-empty-string */
    public function __toString() : string
    {
        return $this->betterReflectionClass->__toString();
    }
    /**
     * @return mixed
     */
    public function __get(string $name)
    {
        if ($name === 'name') {
            return $this->betterReflectionClass->getName();
        }
        throw new OutOfBoundsException(sprintf('Property %s::$%s does not exist.', self::class, $name));
    }
    /**
     * @psalm-mutation-free
     * @return class-string
     */
    public function getName() : string
    {
        return $this->betterReflectionClass->getName();
    }
    /** @psalm-mutation-free */
    public function isAnonymous() : bool
    {
        return $this->betterReflectionClass->isAnonymous();
    }
    /** @psalm-mutation-free */
    public function isInternal() : bool
    {
        return $this->betterReflectionClass->isInternal();
    }
    /** @psalm-mutation-free */
    public function isUserDefined() : bool
    {
        return $this->betterReflectionClass->isUserDefined();
    }
    /** @psalm-mutation-free */
    public function isInstantiable() : bool
    {
        return $this->betterReflectionClass->isInstantiable();
    }
    /** @psalm-mutation-free */
    public function isCloneable() : bool
    {
        return $this->betterReflectionClass->isCloneable();
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getFileName()
    {
        $fileName = $this->betterReflectionClass->getFileName();
        return $fileName !== null ? FileHelper::normalizeSystemPath($fileName) : \false;
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getStartLine()
    {
        return $this->betterReflectionClass->getStartLine();
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getEndLine()
    {
        return $this->betterReflectionClass->getEndLine();
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getDocComment()
    {
        return $this->betterReflectionClass->getDocComment() ?? \false;
    }
    /**
     * @psalm-mutation-free
     * @return ReflectionMethod|null
     */
    public function getConstructor() : ?CoreReflectionMethod
    {
        $constructor = $this->betterReflectionClass->getConstructor();
        if ($constructor === null) {
            return null;
        }
        return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod($constructor);
    }
    /**
     * {@inheritDoc}
     */
    public function hasMethod($name) : bool
    {
        if ($name === '') {
            return \false;
        }
        return $this->betterReflectionClass->hasMethod($name);
    }
    /**
     * @param string $name
     * @return ReflectionMethod
     */
    public function getMethod($name) : CoreReflectionMethod
    {
        $method = $name !== '' ? $this->betterReflectionClass->getMethod($name) : null;
        if ($method === null) {
            throw new CoreReflectionException(sprintf('Method %s::%s() does not exist', $this->betterReflectionClass->getName(), $name));
        }
        return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod($method);
    }
    /**
     * @param int-mask-of<ReflectionMethod::IS_*>|null $filter
     * @return ReflectionMethod[]
     */
    public function getMethods($filter = null) : array
    {
        /** @psalm-suppress ImpureFunctionCall */
        return array_values(array_map(static function (BetterReflectionMethod $method) : \PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod {
            return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod($method);
        }, $this->betterReflectionClass->getMethods($filter ?? 0)));
    }
    /**
     * {@inheritDoc}
     */
    public function hasProperty($name) : bool
    {
        if ($name === '') {
            return \false;
        }
        return $this->betterReflectionClass->hasProperty($name);
    }
    /**
     * @param string $name
     * @return ReflectionProperty
     */
    public function getProperty($name) : \ReflectionProperty
    {
        $betterReflectionProperty = $name !== '' ? $this->betterReflectionClass->getProperty($name) : null;
        if ($betterReflectionProperty === null) {
            throw new CoreReflectionException(sprintf('Property %s::$%s does not exist', $this->betterReflectionClass->getName(), $name));
        }
        return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty($betterReflectionProperty);
    }
    /**
     * @param int-mask-of<ReflectionProperty::IS_*>|null $filter
     * @return ReflectionProperty[]
     */
    public function getProperties($filter = null) : array
    {
        /** @psalm-suppress ImpureFunctionCall */
        return array_values(array_map(static function (BetterReflectionProperty $property) : \PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty {
            return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty($property);
        }, $this->betterReflectionClass->getProperties($filter ?? 0)));
    }
    /**
     * {@inheritDoc}
     */
    public function hasConstant($name) : bool
    {
        if ($name === '') {
            return \false;
        }
        if ($this->betterReflectionClass instanceof BetterReflectionEnum && $this->betterReflectionClass->hasCase($name)) {
            return \true;
        }
        return $this->betterReflectionClass->hasConstant($name);
    }
    /**
     * @deprecated Use getReflectionConstants()
     *
     * @param int-mask-of<ReflectionClassConstant::IS_*>|null $filter
     *
     * @return array<non-empty-string, mixed>
     *
     * @psalm-mutation-free
     */
    public function getConstants(?int $filter = null) : array
    {
        /** @psalm-suppress ImpureFunctionCall */
        return array_map(function ($betterConstantOrEnumCase) {
            return $this->getConstantValue($betterConstantOrEnumCase);
        }, $this->filterBetterReflectionClassConstants($filter));
    }
    /**
     * @deprecated Use getReflectionConstant()
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    public function getConstant($name)
    {
        if ($name === '') {
            return \false;
        }
        if ($this->betterReflectionClass instanceof BetterReflectionEnum) {
            $enumCase = $this->betterReflectionClass->getCase($name);
            if ($enumCase !== null) {
                return $this->getConstantValue($enumCase);
            }
        }
        $betterReflectionConstant = $this->betterReflectionClass->getConstant($name);
        if ($betterReflectionConstant === null) {
            return \false;
        }
        return $betterReflectionConstant->getValue();
    }
    /** @psalm-pure
     * @param BetterReflectionClassConstant|BetterReflectionEnumCase $betterConstantOrEnumCase
     * @return mixed */
    private function getConstantValue($betterConstantOrEnumCase)
    {
        if ($betterConstantOrEnumCase instanceof BetterReflectionEnumCase) {
            throw new \PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented('Not implemented');
        }
        return $betterConstantOrEnumCase->getValue();
    }
    /**
     * @param string $name
     * @return ReflectionClassConstant|false
     */
    #[\ReturnTypeWillChange]
    public function getReflectionConstant($name)
    {
        if ($name === '') {
            return \false;
        }
        if ($this->betterReflectionClass instanceof BetterReflectionEnum) {
            $enumCase = $this->betterReflectionClass->getCase($name);
            if ($enumCase !== null) {
                return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClassConstant($enumCase);
            }
        }
        $betterReflectionConstant = $this->betterReflectionClass->getConstant($name);
        if ($betterReflectionConstant === null) {
            return \false;
        }
        return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClassConstant($betterReflectionConstant);
    }
    /**
     * @param int-mask-of<ReflectionClassConstant::IS_*>|null $filter
     *
     * @return list<ReflectionClassConstant>
     *
     * @psalm-mutation-free
     */
    public function getReflectionConstants(?int $filter = null) : array
    {
        return array_values(array_map(static function ($betterConstantOrEnum) : \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClassConstant {
            return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClassConstant($betterConstantOrEnum);
        }, $this->filterBetterReflectionClassConstants($filter)));
    }
    /**
     * @param int-mask-of<ReflectionClassConstant::IS_*>|null $filter
     *
     * @return array<non-empty-string, BetterReflectionClassConstant|BetterReflectionEnumCase>
     *
     * @psalm-mutation-free
     */
    private function filterBetterReflectionClassConstants(?int $filter) : array
    {
        $reflectionConstants = $this->betterReflectionClass->getConstants($filter ?? 0);
        if ($this->betterReflectionClass instanceof BetterReflectionEnum && ($filter === null || $filter & \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClassConstant::IS_PUBLIC)) {
            $reflectionConstants += $this->betterReflectionClass->getCases();
        }
        return $reflectionConstants;
    }
    /**
     * @psalm-mutation-free
     * @return array<class-string, self>
     */
    public function getInterfaces() : array
    {
        /** @psalm-suppress ImpureFunctionCall */
        return array_map(static function (BetterReflectionClass $interface) : self {
            return new self($interface);
        }, $this->betterReflectionClass->getInterfaces());
    }
    /**
     * @return list<class-string>
     *
     * @psalm-mutation-free
     */
    public function getInterfaceNames() : array
    {
        return $this->betterReflectionClass->getInterfaceNames();
    }
    /** @psalm-mutation-free */
    public function isInterface() : bool
    {
        return $this->betterReflectionClass->isInterface();
    }
    /**
     * @psalm-mutation-free
     * @return array<trait-string, self>
     */
    public function getTraits() : array
    {
        $traits = $this->betterReflectionClass->getTraits();
        /** @var list<trait-string> $traitNames */
        $traitNames = array_map(static function (BetterReflectionClass $trait) : string {
            return $trait->getName();
        }, $traits);
        /** @psalm-suppress ImpureFunctionCall */
        return array_combine($traitNames, array_map(static function (BetterReflectionClass $trait) : self {
            return new self($trait);
        }, $traits));
    }
    /**
     * @return list<trait-string>
     *
     * @psalm-mutation-free
     */
    public function getTraitNames() : array
    {
        return $this->betterReflectionClass->getTraitNames();
    }
    /**
     * @return array<non-empty-string, non-empty-string>
     *
     * @psalm-mutation-free
     */
    public function getTraitAliases() : array
    {
        return $this->betterReflectionClass->getTraitAliases();
    }
    /** @psalm-mutation-free */
    public function isTrait() : bool
    {
        return $this->betterReflectionClass->isTrait();
    }
    /** @psalm-mutation-free */
    public function isAbstract() : bool
    {
        return $this->betterReflectionClass->isAbstract();
    }
    /** @psalm-mutation-free */
    public function isFinal() : bool
    {
        return $this->betterReflectionClass->isFinal();
    }
    /** @psalm-mutation-free */
    public function isReadOnly() : bool
    {
        return $this->betterReflectionClass->isReadOnly();
    }
    /** @psalm-mutation-free */
    public function getModifiers() : int
    {
        return $this->betterReflectionClass->getModifiers();
    }
    /**
     * {@inheritDoc}
     */
    public function isInstance($object) : bool
    {
        return $this->betterReflectionClass->isInstance($object);
    }
    /**
     * @return object
     * @param mixed $arg
     * @param mixed $args
     */
    #[\ReturnTypeWillChange]
    public function newInstance($arg = null, ...$args)
    {
        ClassExistenceChecker::classExists($this->getName(), \true);
        $reflection = new CoreReflectionClass($this->getName());
        return $reflection->newInstance(...func_get_args());
    }
    public function newInstanceWithoutConstructor() : object
    {
        ClassExistenceChecker::classExists($this->getName(), \true);
        $reflection = new CoreReflectionClass($this->getName());
        return $reflection->newInstanceWithoutConstructor();
    }
    public function newInstanceArgs(array $args = null) : object
    {
        ClassExistenceChecker::classExists($this->getName(), \true);
        $reflection = new CoreReflectionClass($this->getName());
        return $reflection->newInstanceArgs($args);
    }
    /**
     * @return self|false
     */
    #[\ReturnTypeWillChange]
    public function getParentClass()
    {
        $parentClass = $this->betterReflectionClass->getParentClass();
        if ($parentClass === null) {
            return \false;
        }
        return new self($parentClass);
    }
    /**
     * {@inheritDoc}
     */
    public function isSubclassOf($class) : bool
    {
        $realParentClassNames = $this->betterReflectionClass->getParentClassNames();
        $parentClassNames = array_combine(array_map(static function (string $parentClassName) : string {
            return strtolower($parentClassName);
        }, $realParentClassNames), $realParentClassNames);
        $className = $class instanceof CoreReflectionClass ? $class->getName() : $class;
        $lowercasedClassName = strtolower($className);
        $realParentClassName = $parentClassNames[$lowercasedClassName] ?? $className;
        return $this->betterReflectionClass->isSubclassOf($realParentClassName) || $this->implementsInterface($className);
    }
    /**
     * @return array<string, mixed>
     *
     * @psalm-suppress LessSpecificImplementedReturnType
     */
    public function getStaticProperties() : array
    {
        return $this->betterReflectionClass->getStaticProperties();
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getStaticPropertyValue($name, $default = null)
    {
        $betterReflectionProperty = $name !== '' ? $this->betterReflectionClass->getProperty($name) : null;
        if ($betterReflectionProperty === null) {
            if (func_num_args() === 2) {
                return $default;
            }
            throw new CoreReflectionException(sprintf('Property %s::$%s does not exist', $this->betterReflectionClass->getName(), $name));
        }
        $property = new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty($betterReflectionProperty);
        if (!$property->isStatic()) {
            throw new CoreReflectionException(sprintf('Property %s::$%s does not exist', $this->betterReflectionClass->getName(), $name));
        }
        return $property->getValue();
    }
    /**
     * {@inheritDoc}
     */
    public function setStaticPropertyValue($name, $value) : void
    {
        $betterReflectionProperty = $name !== '' ? $this->betterReflectionClass->getProperty($name) : null;
        if ($betterReflectionProperty === null) {
            throw new CoreReflectionException(sprintf('Class %s does not have a property named %s', $this->betterReflectionClass->getName(), $name));
        }
        $property = new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty($betterReflectionProperty);
        if (!$property->isStatic()) {
            throw new CoreReflectionException(sprintf('Class %s does not have a property named %s', $this->betterReflectionClass->getName(), $name));
        }
        $property->setValue($value);
    }
    /**
     * @return array<non-empty-string, mixed>
     *
     * @psalm-mutation-free
     */
    public function getDefaultProperties() : array
    {
        return $this->betterReflectionClass->getDefaultProperties();
    }
    /** @psalm-mutation-free */
    public function isIterateable() : bool
    {
        return $this->betterReflectionClass->isIterateable();
    }
    /** @psalm-mutation-free */
    public function isIterable() : bool
    {
        return $this->isIterateable();
    }
    /**
     * @param \ReflectionClass|string $interface
     */
    public function implementsInterface($interface) : bool
    {
        $realInterfaceNames = $this->betterReflectionClass->getInterfaceNames();
        $interfaceNames = array_combine(array_map(static function (string $interfaceName) : string {
            return strtolower($interfaceName);
        }, $realInterfaceNames), $realInterfaceNames);
        $interfaceName = $interface instanceof CoreReflectionClass ? $interface->getName() : $interface;
        $lowercasedIntefaceName = strtolower($interfaceName);
        $realInterfaceName = $interfaceNames[$lowercasedIntefaceName] ?? $interfaceName;
        return $this->betterReflectionClass->implementsInterface($realInterfaceName);
    }
    /** @psalm-mutation-free */
    public function getExtension() : ?CoreReflectionExtension
    {
        throw new \PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented('Not implemented');
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getExtensionName()
    {
        return $this->betterReflectionClass->getExtensionName() ?? \false;
    }
    /** @psalm-mutation-free */
    public function inNamespace() : bool
    {
        return $this->betterReflectionClass->inNamespace();
    }
    /** @psalm-mutation-free */
    public function getNamespaceName() : string
    {
        return $this->betterReflectionClass->getNamespaceName() ?? '';
    }
    /** @psalm-mutation-free */
    public function getShortName() : string
    {
        return $this->betterReflectionClass->getShortName();
    }
    /**
     * @param class-string|null $name
     *
     * @return list<ReflectionAttribute|FakeReflectionAttribute>
     */
    public function getAttributes(?string $name = null, int $flags = 0) : array
    {
        if ($flags !== 0 && $flags !== \PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute::IS_INSTANCEOF) {
            throw new ValueError('Argument #2 ($flags) must be a valid attribute filter flag');
        }
        if ($name !== null && $flags !== 0) {
            $attributes = $this->betterReflectionClass->getAttributesByInstance($name);
        } elseif ($name !== null) {
            $attributes = $this->betterReflectionClass->getAttributesByName($name);
        } else {
            $attributes = $this->betterReflectionClass->getAttributes();
        }
        /** @psalm-suppress ImpureFunctionCall */
        return array_map(static function (BetterReflectionAttribute $betterReflectionAttribute) {
            return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttributeFactory::create($betterReflectionAttribute);
        }, $attributes);
    }
    /** @psalm-mutation-free */
    public function isEnum() : bool
    {
        return $this->betterReflectionClass->isEnum();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Adapter;

use OutOfBoundsException;
use ReflectionEnumUnitCase as CoreReflectionEnumUnitCase;
use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute;
use PHPStan\BetterReflection\Reflection\ReflectionEnumCase as BetterReflectionEnumCase;
use UnitEnum;
use ValueError;
use function array_map;
use function sprintf;
/**
 * @psalm-suppress PropertyNotSetInConstructor
 * @psalm-immutable
 */
final class ReflectionEnumUnitCase extends CoreReflectionEnumUnitCase
{
    public function __construct(private BetterReflectionEnumCase $betterReflectionEnumCase)
    {
        unset($this->name);
        unset($this->class);
    }
    /**
     * Get the name of the reflection (e.g. if this is a ReflectionClass this
     * will be the class name).
     */
    public function getName() : string
    {
        return $this->betterReflectionEnumCase->getName();
    }
    public function getValue() : UnitEnum
    {
        throw new \PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented('Not implemented');
    }
    public function isPublic() : bool
    {
        return \true;
    }
    public function isPrivate() : bool
    {
        return \false;
    }
    public function isProtected() : bool
    {
        return \false;
    }
    public function getModifiers() : int
    {
        return self::IS_PUBLIC;
    }
    public function getDeclaringClass() : \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass
    {
        return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass($this->betterReflectionEnumCase->getDeclaringClass());
    }
    public function getDocComment() : string|false
    {
        return $this->betterReflectionEnumCase->getDocComment() ?? \false;
    }
    /** @return non-empty-string */
    public function __toString() : string
    {
        return $this->betterReflectionEnumCase->__toString();
    }
    /**
     * @param class-string|null $name
     *
     * @return list<ReflectionAttribute|FakeReflectionAttribute>
     */
    public function getAttributes(string|null $name = null, int $flags = 0) : array
    {
        if ($flags !== 0 && $flags !== \PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute::IS_INSTANCEOF) {
            throw new ValueError('Argument #2 ($flags) must be a valid attribute filter flag');
        }
        if ($name !== null && $flags !== 0) {
            $attributes = $this->betterReflectionEnumCase->getAttributesByInstance($name);
        } elseif ($name !== null) {
            $attributes = $this->betterReflectionEnumCase->getAttributesByName($name);
        } else {
            $attributes = $this->betterReflectionEnumCase->getAttributes();
        }
        /** @psalm-suppress ImpureFunctionCall */
        return array_map(static fn(BetterReflectionAttribute $betterReflectionAttribute): \PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute|\PHPStan\BetterReflection\Reflection\Adapter\FakeReflectionAttribute => \PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttributeFactory::create($betterReflectionAttribute), $attributes);
    }
    public function isFinal() : bool
    {
        return \true;
    }
    public function isEnumCase() : bool
    {
        return \true;
    }
    public function getEnum() : \PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnum
    {
        return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnum($this->betterReflectionEnumCase->getDeclaringEnum());
    }
    public function __get(string $name) : mixed
    {
        if ($name === 'name') {
            return $this->betterReflectionEnumCase->getName();
        }
        if ($name === 'class') {
            return $this->betterReflectionEnumCase->getDeclaringClass()->getName();
        }
        throw new OutOfBoundsException(sprintf('Property %s::$%s does not exist.', self::class, $name));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Adapter;

use LogicException;
use OutOfBoundsException;
use PhpParser\Node\Expr;
use ReflectionClass as CoreReflectionClass;
use ReflectionFunctionAbstract as CoreReflectionFunctionAbstract;
use ReflectionParameter as CoreReflectionParameter;
use ReturnTypeWillChange;
use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute;
use PHPStan\BetterReflection\Reflection\ReflectionIntersectionType as BetterReflectionIntersectionType;
use PHPStan\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod;
use PHPStan\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType;
use PHPStan\BetterReflection\Reflection\ReflectionParameter as BetterReflectionParameter;
use PHPStan\BetterReflection\Reflection\ReflectionType as BetterReflectionType;
use PHPStan\BetterReflection\Reflection\ReflectionUnionType as BetterReflectionUnionType;
use ValueError;
use function array_map;
use function count;
use function sprintf;
use function strtolower;
/**
 * @psalm-suppress PropertyNotSetInConstructor
 * @psalm-immutable
 */
final class ReflectionParameter extends CoreReflectionParameter
{
    /**
     * @var BetterReflectionParameter
     */
    private $betterReflectionParameter;
    public function __construct(BetterReflectionParameter $betterReflectionParameter)
    {
        $this->betterReflectionParameter = $betterReflectionParameter;
        unset($this->name);
    }
    /** @return non-empty-string */
    public function __toString() : string
    {
        return $this->betterReflectionParameter->__toString();
    }
    public function getName() : string
    {
        return $this->betterReflectionParameter->getName();
    }
    public function isPassedByReference() : bool
    {
        return $this->betterReflectionParameter->isPassedByReference();
    }
    public function canBePassedByValue() : bool
    {
        return $this->betterReflectionParameter->canBePassedByValue();
    }
    /**
     * @return ReflectionFunction|ReflectionMethod
     */
    public function getDeclaringFunction() : CoreReflectionFunctionAbstract
    {
        $function = $this->betterReflectionParameter->getDeclaringFunction();
        if ($function instanceof BetterReflectionMethod) {
            return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod($function);
        }
        return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionFunction($function);
    }
    /** @return ReflectionClass|null */
    public function getDeclaringClass() : ?CoreReflectionClass
    {
        $declaringClass = $this->betterReflectionParameter->getDeclaringClass();
        if ($declaringClass === null) {
            return null;
        }
        return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass($declaringClass);
    }
    /** @return ReflectionClass|null */
    public function getClass() : ?CoreReflectionClass
    {
        $type = $this->betterReflectionParameter->getType();
        if ($type === null) {
            return null;
        }
        if ($type instanceof BetterReflectionIntersectionType) {
            return null;
        }
        if ($type instanceof BetterReflectionNamedType) {
            $classType = $type;
        } else {
            $unionTypes = $type->getTypes();
            if (count($unionTypes) !== 2) {
                return null;
            }
            if (!$type->allowsNull()) {
                return null;
            }
            foreach ($unionTypes as $unionInnerType) {
                if (!$unionInnerType instanceof BetterReflectionNamedType) {
                    return null;
                }
                if ($unionInnerType->allowsNull()) {
                    continue;
                }
                $classType = $unionInnerType;
                break;
            }
        }
        try {
            /** @phpstan-ignore-next-line */
            return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass($classType->getClass());
        } catch (LogicException $exception) {
            return null;
        }
    }
    public function isArray() : bool
    {
        return $this->isType($this->betterReflectionParameter->getType(), 'array');
    }
    public function isCallable() : bool
    {
        return $this->isType($this->betterReflectionParameter->getType(), 'callable');
    }
    /**
     * For isArray() and isCallable().
     * @param BetterReflectionNamedType|BetterReflectionUnionType|BetterReflectionIntersectionType|null $typeReflection
     */
    private function isType($typeReflection, string $type) : bool
    {
        if ($typeReflection === null) {
            return \false;
        }
        if ($typeReflection instanceof BetterReflectionIntersectionType) {
            return \false;
        }
        $isOneOfAllowedTypes = static function (BetterReflectionType $namedType, string ...$types) : bool {
            foreach ($types as $type) {
                if ($namedType instanceof BetterReflectionNamedType && strtolower($namedType->getName()) === $type) {
                    return \true;
                }
            }
            return \false;
        };
        if ($typeReflection instanceof BetterReflectionUnionType) {
            $unionTypes = $typeReflection->getTypes();
            foreach ($unionTypes as $unionType) {
                if (!$isOneOfAllowedTypes($unionType, $type, 'null')) {
                    return \false;
                }
            }
            return \true;
        }
        return $isOneOfAllowedTypes($typeReflection, $type);
    }
    public function allowsNull() : bool
    {
        return $this->betterReflectionParameter->allowsNull();
    }
    public function getPosition() : int
    {
        return $this->betterReflectionParameter->getPosition();
    }
    public function isOptional() : bool
    {
        return $this->betterReflectionParameter->isOptional();
    }
    public function isVariadic() : bool
    {
        return $this->betterReflectionParameter->isVariadic();
    }
    public function isDefaultValueAvailable() : bool
    {
        return $this->betterReflectionParameter->isDefaultValueAvailable();
    }
    /**
     * @deprecated Use getDefaultValueExpression()
     */
    #[\ReturnTypeWillChange]
    public function getDefaultValue()
    {
        return $this->betterReflectionParameter->getDefaultValue();
    }
    /**
     * @deprecated Use getDefaultValueExpression()
     */
    public function getDefaultValueExpr() : Expr
    {
        return $this->betterReflectionParameter->getDefaultValueExpression();
    }
    public function getDefaultValueExpression() : Expr
    {
        return $this->betterReflectionParameter->getDefaultValueExpression();
    }
    public function isDefaultValueConstant() : bool
    {
        return $this->betterReflectionParameter->isDefaultValueConstant();
    }
    public function getDefaultValueConstantName() : string
    {
        return $this->betterReflectionParameter->getDefaultValueConstantName();
    }
    public function hasType() : bool
    {
        return $this->betterReflectionParameter->hasType();
    }
    /**
     * @return ReflectionUnionType|ReflectionNamedType|ReflectionIntersectionType|null
     */
    public function getType() : ?\ReflectionType
    {
        return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionType::fromTypeOrNull($this->betterReflectionParameter->getType());
    }
    public function isPromoted() : bool
    {
        return $this->betterReflectionParameter->isPromoted();
    }
    /**
     * @param class-string|null $name
     *
     * @return list<ReflectionAttribute|FakeReflectionAttribute>
     */
    public function getAttributes(?string $name = null, int $flags = 0) : array
    {
        if ($flags !== 0 && $flags !== \PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute::IS_INSTANCEOF) {
            throw new ValueError('Argument #2 ($flags) must be a valid attribute filter flag');
        }
        if ($name !== null && $flags !== 0) {
            $attributes = $this->betterReflectionParameter->getAttributesByInstance($name);
        } elseif ($name !== null) {
            $attributes = $this->betterReflectionParameter->getAttributesByName($name);
        } else {
            $attributes = $this->betterReflectionParameter->getAttributes();
        }
        /** @psalm-suppress ImpureFunctionCall */
        return array_map(static function (BetterReflectionAttribute $betterReflectionAttribute) {
            return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttributeFactory::create($betterReflectionAttribute);
        }, $attributes);
    }
    /**
     * @return mixed
     */
    public function __get(string $name)
    {
        if ($name === 'name') {
            return $this->betterReflectionParameter->getName();
        }
        throw new OutOfBoundsException(sprintf('Property %s::$%s does not exist.', self::class, $name));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Adapter;

use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute;
use const PHP_VERSION_ID;
final class ReflectionAttributeFactory
{
    /**
     * @return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute|\PHPStan\BetterReflection\Reflection\Adapter\FakeReflectionAttribute
     */
    public static function create(BetterReflectionAttribute $betterReflectionAttribute)
    {
        if (PHP_VERSION_ID >= 80000 && PHP_VERSION_ID < 80012) {
            return new \PHPStan\BetterReflection\Reflection\Adapter\FakeReflectionAttribute($betterReflectionAttribute);
        }
        return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute($betterReflectionAttribute);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Adapter;

use OutOfBoundsException;
use ReflectionClass as CoreReflectionClass;
use ReflectionEnum as CoreReflectionEnum;
use ReflectionException as CoreReflectionException;
use ReflectionExtension as CoreReflectionExtension;
use ReflectionMethod as CoreReflectionMethod;
use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute;
use PHPStan\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass;
use PHPStan\BetterReflection\Reflection\ReflectionClassConstant as BetterReflectionClassConstant;
use PHPStan\BetterReflection\Reflection\ReflectionEnum as BetterReflectionEnum;
use PHPStan\BetterReflection\Reflection\ReflectionEnumCase as BetterReflectionEnumCase;
use PHPStan\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod;
use PHPStan\BetterReflection\Reflection\ReflectionProperty as BetterReflectionProperty;
use PHPStan\BetterReflection\Util\FileHelper;
use ValueError;
use function array_combine;
use function array_map;
use function array_values;
use function constant;
use function sprintf;
use function strtolower;
/**
 * @psalm-suppress PropertyNotSetInConstructor
 * @psalm-immutable
 */
final class ReflectionEnum extends CoreReflectionEnum
{
    public function __construct(private BetterReflectionEnum $betterReflectionEnum)
    {
        unset($this->name);
    }
    /** @return non-empty-string */
    public function __toString() : string
    {
        return $this->betterReflectionEnum->__toString();
    }
    public function __get(string $name) : mixed
    {
        if ($name === 'name') {
            return $this->betterReflectionEnum->getName();
        }
        throw new OutOfBoundsException(sprintf('Property %s::$%s does not exist.', self::class, $name));
    }
    /** @return class-string */
    public function getName() : string
    {
        return $this->betterReflectionEnum->getName();
    }
    public function isAnonymous() : bool
    {
        return $this->betterReflectionEnum->isAnonymous();
    }
    public function isInternal() : bool
    {
        return $this->betterReflectionEnum->isInternal();
    }
    public function isUserDefined() : bool
    {
        return $this->betterReflectionEnum->isUserDefined();
    }
    public function isInstantiable() : bool
    {
        return $this->betterReflectionEnum->isInstantiable();
    }
    public function isCloneable() : bool
    {
        return $this->betterReflectionEnum->isCloneable();
    }
    /** @return non-empty-string|false */
    public function getFileName() : string|false
    {
        $fileName = $this->betterReflectionEnum->getFileName();
        return $fileName !== null ? FileHelper::normalizeSystemPath($fileName) : \false;
    }
    public function getStartLine() : int|false
    {
        return $this->betterReflectionEnum->getStartLine();
    }
    public function getEndLine() : int|false
    {
        return $this->betterReflectionEnum->getEndLine();
    }
    public function getDocComment() : string|false
    {
        return $this->betterReflectionEnum->getDocComment() ?? \false;
    }
    /** @return ReflectionMethod|null */
    public function getConstructor() : ?CoreReflectionMethod
    {
        $constructor = $this->betterReflectionEnum->getConstructor();
        if ($constructor === null) {
            return null;
        }
        return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod($constructor);
    }
    public function hasMethod(string $name) : bool
    {
        if ($name === '') {
            return \false;
        }
        return $this->betterReflectionEnum->hasMethod($name);
    }
    public function getMethod(string $name) : \PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod
    {
        $method = $name !== '' ? $this->betterReflectionEnum->getMethod($name) : null;
        if ($method === null) {
            throw new CoreReflectionException(sprintf('Method %s::%s() does not exist', $this->betterReflectionEnum->getName(), $name));
        }
        return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod($method);
    }
    /**
     * @param int-mask-of<ReflectionMethod::IS_*>|null $filter
     *
     * @return list<ReflectionMethod>
     */
    public function getMethods(int|null $filter = null) : array
    {
        /** @psalm-suppress ImpureFunctionCall */
        return array_values(array_map(static fn(BetterReflectionMethod $method): \PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod => new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod($method), $this->betterReflectionEnum->getMethods($filter ?? 0)));
    }
    public function hasProperty(string $name) : bool
    {
        if ($name === '') {
            return \false;
        }
        return $this->betterReflectionEnum->hasProperty($name);
    }
    public function getProperty(string $name) : \PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty
    {
        $betterReflectionProperty = $name !== '' ? $this->betterReflectionEnum->getProperty($name) : null;
        if ($betterReflectionProperty === null) {
            throw new CoreReflectionException(sprintf('Property %s::$%s does not exist', $this->betterReflectionEnum->getName(), $name));
        }
        return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty($betterReflectionProperty);
    }
    /**
     * @param int-mask-of<ReflectionProperty::IS_*>|null $filter
     *
     * @return list<ReflectionProperty>
     */
    public function getProperties(int|null $filter = null) : array
    {
        /** @psalm-suppress ImpureFunctionCall */
        return array_values(array_map(static fn(BetterReflectionProperty $property): \PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty => new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty($property), $this->betterReflectionEnum->getProperties($filter ?? 0)));
    }
    public function hasConstant(string $name) : bool
    {
        if ($name === '') {
            return \false;
        }
        return $this->betterReflectionEnum->hasCase($name) || $this->betterReflectionEnum->hasConstant($name);
    }
    /**
     * @deprecated Use getReflectionConstants()
     *
     * @param int-mask-of<ReflectionClassConstant::IS_*>|null $filter
     *
     * @return array<non-empty-string, mixed>
     */
    public function getConstants(int|null $filter = null) : array
    {
        /** @psalm-suppress ImpureFunctionCall */
        return array_map(fn(BetterReflectionClassConstant|BetterReflectionEnumCase $betterConstantOrEnumCase): mixed => $this->getConstantValue($betterConstantOrEnumCase), $this->filterBetterReflectionClassConstants($filter));
    }
    /**
     * @deprecated Use getReflectionConstant()
     */
    public function getConstant(string $name) : mixed
    {
        if ($name === '') {
            return \false;
        }
        $enumCase = $this->betterReflectionEnum->getCase($name);
        if ($enumCase !== null) {
            return $this->getConstantValue($enumCase);
        }
        $betterReflectionConstant = $this->betterReflectionEnum->getConstant($name);
        if ($betterReflectionConstant === null) {
            return \false;
        }
        return $betterReflectionConstant->getValue();
    }
    private function getConstantValue(BetterReflectionClassConstant|BetterReflectionEnumCase $betterConstantOrEnumCase) : mixed
    {
        if ($betterConstantOrEnumCase instanceof BetterReflectionEnumCase) {
            throw new \PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented('Not implemented');
        }
        return $betterConstantOrEnumCase->getValue();
    }
    public function getReflectionConstant(string $name) : \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClassConstant|false
    {
        if ($name === '') {
            return \false;
        }
        // @infection-ignore-all Coalesce: There's no difference
        $betterReflectionConstantOrEnumCase = $this->betterReflectionEnum->getCase($name) ?? $this->betterReflectionEnum->getConstant($name);
        if ($betterReflectionConstantOrEnumCase === null) {
            return \false;
        }
        return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClassConstant($betterReflectionConstantOrEnumCase);
    }
    /**
     * @param int-mask-of<ReflectionClassConstant::IS_*>|null $filter
     *
     * @return list<ReflectionClassConstant>
     */
    public function getReflectionConstants(int|null $filter = null) : array
    {
        return array_values(array_map(static fn(BetterReflectionClassConstant|BetterReflectionEnumCase $betterConstantOrEnum): \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClassConstant => new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClassConstant($betterConstantOrEnum), $this->filterBetterReflectionClassConstants($filter)));
    }
    /**
     * @param int-mask-of<ReflectionClassConstant::IS_*>|null $filter
     *
     * @return array<non-empty-string, BetterReflectionClassConstant|BetterReflectionEnumCase>
     */
    private function filterBetterReflectionClassConstants(int|null $filter) : array
    {
        $reflectionConstants = $this->betterReflectionEnum->getConstants($filter ?? 0);
        if ($filter === null || $filter & \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClassConstant::IS_PUBLIC) {
            $reflectionConstants += $this->betterReflectionEnum->getCases();
        }
        return $reflectionConstants;
    }
    /** @return array<class-string, ReflectionClass> */
    public function getInterfaces() : array
    {
        /** @psalm-suppress ImpureFunctionCall */
        return array_map(static fn(BetterReflectionClass $interface): \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass => new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass($interface), $this->betterReflectionEnum->getInterfaces());
    }
    /** @return list<class-string> */
    public function getInterfaceNames() : array
    {
        return $this->betterReflectionEnum->getInterfaceNames();
    }
    public function isInterface() : bool
    {
        return $this->betterReflectionEnum->isInterface();
    }
    /** @return array<trait-string, ReflectionClass> */
    public function getTraits() : array
    {
        $traits = $this->betterReflectionEnum->getTraits();
        /** @var list<trait-string> $traitNames */
        $traitNames = array_map(static fn(BetterReflectionClass $trait): string => $trait->getName(), $traits);
        /** @psalm-suppress ImpureFunctionCall */
        return array_combine($traitNames, array_map(static fn(BetterReflectionClass $trait): \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass => new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass($trait), $traits));
    }
    /** @return list<trait-string> */
    public function getTraitNames() : array
    {
        return $this->betterReflectionEnum->getTraitNames();
    }
    /** @return array<non-empty-string, non-empty-string> */
    public function getTraitAliases() : array
    {
        return $this->betterReflectionEnum->getTraitAliases();
    }
    public function isTrait() : bool
    {
        return $this->betterReflectionEnum->isTrait();
    }
    public function isAbstract() : bool
    {
        return $this->betterReflectionEnum->isAbstract();
    }
    public function isFinal() : bool
    {
        return $this->betterReflectionEnum->isFinal();
    }
    public function isReadOnly() : bool
    {
        return $this->betterReflectionEnum->isReadOnly();
    }
    public function getModifiers() : int
    {
        return $this->betterReflectionEnum->getModifiers();
    }
    public function isInstance(object $object) : bool
    {
        return $this->betterReflectionEnum->isInstance($object);
    }
    public function newInstance(mixed ...$args) : self
    {
        throw new \PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented('Not implemented');
    }
    public function newInstanceWithoutConstructor() : object
    {
        throw new \PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented('Not implemented');
    }
    public function newInstanceArgs(array|null $args = null) : object
    {
        throw new \PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented('Not implemented');
    }
    public function getParentClass() : \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass|false
    {
        return \false;
    }
    public function isSubclassOf(CoreReflectionClass|string $class) : bool
    {
        $realParentClassNames = $this->betterReflectionEnum->getParentClassNames();
        $parentClassNames = array_combine(array_map(static fn(string $parentClassName): string => strtolower($parentClassName), $realParentClassNames), $realParentClassNames);
        $className = $class instanceof CoreReflectionClass ? $class->getName() : $class;
        $lowercasedClassName = strtolower($className);
        $realParentClassName = $parentClassNames[$lowercasedClassName] ?? $className;
        return $this->betterReflectionEnum->isSubclassOf($realParentClassName) || $this->implementsInterface($className);
    }
    /**
     * @return array<string, mixed>
     *
     * @psalm-suppress LessSpecificImplementedReturnType
     */
    public function getStaticProperties() : array
    {
        return $this->betterReflectionEnum->getStaticProperties();
    }
    public function getStaticPropertyValue(string $name, mixed $default = null) : mixed
    {
        throw new CoreReflectionException(sprintf('Property %s::$%s does not exist', $this->betterReflectionEnum->getName(), $name));
    }
    public function setStaticPropertyValue(string $name, mixed $value) : void
    {
        throw new CoreReflectionException(sprintf('Class %s does not have a property named %s', $this->betterReflectionEnum->getName(), $name));
    }
    /** @return array<non-empty-string, mixed> */
    public function getDefaultProperties() : array
    {
        return $this->betterReflectionEnum->getDefaultProperties();
    }
    public function isIterateable() : bool
    {
        return $this->betterReflectionEnum->isIterateable();
    }
    public function isIterable() : bool
    {
        return $this->isIterateable();
    }
    public function implementsInterface(CoreReflectionClass|string $interface) : bool
    {
        $realInterfaceNames = $this->betterReflectionEnum->getInterfaceNames();
        $interfaceNames = array_combine(array_map(static fn(string $interfaceName): string => strtolower($interfaceName), $realInterfaceNames), $realInterfaceNames);
        $interfaceName = $interface instanceof CoreReflectionClass ? $interface->getName() : $interface;
        $lowercasedIntefaceName = strtolower($interfaceName);
        $realInterfaceName = $interfaceNames[$lowercasedIntefaceName] ?? $interfaceName;
        return $this->betterReflectionEnum->implementsInterface($realInterfaceName);
    }
    public function getExtension() : ?CoreReflectionExtension
    {
        throw new \PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented('Not implemented');
    }
    /** @return non-empty-string|false */
    public function getExtensionName() : string|false
    {
        return $this->betterReflectionEnum->getExtensionName() ?? \false;
    }
    public function inNamespace() : bool
    {
        return $this->betterReflectionEnum->inNamespace();
    }
    public function getNamespaceName() : string
    {
        return $this->betterReflectionEnum->getNamespaceName() ?? '';
    }
    public function getShortName() : string
    {
        return $this->betterReflectionEnum->getShortName();
    }
    /**
     * @param class-string|null $name
     *
     * @return list<ReflectionAttribute|FakeReflectionAttribute>
     */
    public function getAttributes(string|null $name = null, int $flags = 0) : array
    {
        if ($flags !== 0 && $flags !== \PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute::IS_INSTANCEOF) {
            throw new ValueError('Argument #2 ($flags) must be a valid attribute filter flag');
        }
        if ($name !== null && $flags !== 0) {
            $attributes = $this->betterReflectionEnum->getAttributesByInstance($name);
        } elseif ($name !== null) {
            $attributes = $this->betterReflectionEnum->getAttributesByName($name);
        } else {
            $attributes = $this->betterReflectionEnum->getAttributes();
        }
        /** @psalm-suppress ImpureFunctionCall */
        return array_map(static fn(BetterReflectionAttribute $betterReflectionAttribute): \PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute|\PHPStan\BetterReflection\Reflection\Adapter\FakeReflectionAttribute => \PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttributeFactory::create($betterReflectionAttribute), $attributes);
    }
    public function isEnum() : bool
    {
        return $this->betterReflectionEnum->isEnum();
    }
    public function hasCase(string $name) : bool
    {
        if ($name === '') {
            return \false;
        }
        return $this->betterReflectionEnum->hasCase($name);
    }
    public function getCase(string $name) : \PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnumUnitCase|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnumBackedCase
    {
        $case = $name !== '' ? $this->betterReflectionEnum->getCase($name) : null;
        if ($case === null) {
            throw new CoreReflectionException(sprintf('Case %s::%s does not exist', $this->betterReflectionEnum->getName(), $name));
        }
        if ($this->betterReflectionEnum->isBacked()) {
            return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnumBackedCase($case);
        }
        return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnumUnitCase($case);
    }
    /** @return list<ReflectionEnumUnitCase|ReflectionEnumBackedCase> */
    public function getCases() : array
    {
        /** @psalm-suppress ImpureFunctionCall */
        return array_map(function (BetterReflectionEnumCase $case) : \PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnumUnitCase|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnumBackedCase {
            if ($this->betterReflectionEnum->isBacked()) {
                return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnumBackedCase($case);
            }
            return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnumUnitCase($case);
        }, array_values($this->betterReflectionEnum->getCases()));
    }
    public function isBacked() : bool
    {
        return $this->betterReflectionEnum->isBacked();
    }
    public function getBackingType() : \PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType|null
    {
        if ($this->betterReflectionEnum->isBacked()) {
            return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType($this->betterReflectionEnum->getBackingType(), \false);
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Adapter;

use ReflectionType as CoreReflectionType;
use PHPStan\BetterReflection\Reflection\ReflectionIntersectionType as BetterReflectionIntersectionType;
use PHPStan\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType;
use PHPStan\BetterReflection\Reflection\ReflectionType as BetterReflectionType;
use PHPStan\BetterReflection\Reflection\ReflectionUnionType as BetterReflectionUnionType;
use function array_filter;
use function array_values;
use function count;
/** @psalm-immutable */
abstract class ReflectionType extends CoreReflectionType
{
    /** @psalm-pure
     * @param BetterReflectionUnionType|BetterReflectionNamedType|BetterReflectionIntersectionType|null $betterReflectionType
     * @return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionIntersectionType|null */
    public static function fromTypeOrNull($betterReflectionType)
    {
        return $betterReflectionType !== null ? self::fromType($betterReflectionType) : null;
    }
    /**
     * @internal
     *
     * @psalm-pure
     * @param BetterReflectionNamedType|BetterReflectionUnionType|BetterReflectionIntersectionType $betterReflectionType
     * @return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionIntersectionType
     */
    public static function fromType($betterReflectionType)
    {
        if ($betterReflectionType instanceof BetterReflectionUnionType) {
            // php-src has this weird behavior where a union type composed of a single type `T`
            // together with `null` means that a `ReflectionNamedType` for `?T` is produced,
            // rather than `T|null`. This is done to keep BC compatibility with PHP 7.1 (which
            // introduced nullable types), but at reflection level, this is mostly a nuisance.
            // In order to keep parity with core, we stashed this weird behavior in here.
            $nonNullTypes = array_values(array_filter($betterReflectionType->getTypes(), static function (BetterReflectionType $type) : bool {
                return !($type instanceof BetterReflectionNamedType && $type->getName() === 'null');
            }));
            if ($betterReflectionType->allowsNull() && count($nonNullTypes) === 1 && $nonNullTypes[0] instanceof BetterReflectionNamedType) {
                return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType($nonNullTypes[0], \true);
            }
            return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionUnionType($betterReflectionType);
        }
        if ($betterReflectionType instanceof BetterReflectionIntersectionType) {
            return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionIntersectionType($betterReflectionType);
        }
        return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType($betterReflectionType, $betterReflectionType->allowsNull());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Adapter;

use ReflectionIntersectionType as CoreReflectionIntersectionType;
use PHPStan\BetterReflection\Reflection\ReflectionIntersectionType as BetterReflectionIntersectionType;
use PHPStan\BetterReflection\Reflection\ReflectionNamedType as BetterReflectionNamedType;
use function array_map;
use function assert;
/** @psalm-immutable */
class ReflectionIntersectionType extends CoreReflectionIntersectionType
{
    /**
     * @var BetterReflectionIntersectionType
     */
    private $betterReflectionType;
    public function __construct(BetterReflectionIntersectionType $betterReflectionType)
    {
        $this->betterReflectionType = $betterReflectionType;
    }
    /** @return non-empty-list<ReflectionNamedType> */
    public function getTypes() : array
    {
        return array_map(static function (BetterReflectionNamedType $type) : \PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType {
            $adapterType = \PHPStan\BetterReflection\Reflection\Adapter\ReflectionType::fromType($type);
            assert($adapterType instanceof \PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType);
            return $adapterType;
        }, $this->betterReflectionType->getTypes());
    }
    /** @return non-empty-string */
    public function __toString() : string
    {
        return $this->betterReflectionType->__toString();
    }
    /** @return false */
    public function allowsNull() : bool
    {
        return $this->betterReflectionType->allowsNull();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Adapter;

use PhpParser\Node\Expr;
use ReflectionAttribute as CoreReflectionAttribute;
use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute;
/** @template-extends CoreReflectionAttribute<object> */
final class ReflectionAttribute extends CoreReflectionAttribute
{
    /**
     * @var BetterReflectionAttribute
     */
    private $betterReflectionAttribute;
    public function __construct(BetterReflectionAttribute $betterReflectionAttribute)
    {
        $this->betterReflectionAttribute = $betterReflectionAttribute;
    }
    /** @psalm-mutation-free */
    public function getName() : string
    {
        return $this->betterReflectionAttribute->getName();
    }
    /** @psalm-mutation-free */
    public function getTarget() : int
    {
        return $this->betterReflectionAttribute->getTarget();
    }
    /** @psalm-mutation-free */
    public function isRepeated() : bool
    {
        return $this->betterReflectionAttribute->isRepeated();
    }
    /**
     * @deprecated Use getArgumentsExpressions()
     * @return array<int|string, mixed>
     */
    public function getArguments() : array
    {
        return $this->betterReflectionAttribute->getArguments();
    }
    /** @return array<int|string, Expr> */
    public function getArgumentsExpressions() : array
    {
        return $this->betterReflectionAttribute->getArgumentsExpressions();
    }
    /** @deprecated */
    public function newInstance() : object
    {
        $class = $this->getName();
        return new $class(...$this->getArguments());
    }
    /** @return non-empty-string */
    public function __toString() : string
    {
        return $this->betterReflectionAttribute->__toString();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Adapter;

use OutOfBoundsException;
use ReflectionClass as CoreReflectionClass;
use ReflectionException as CoreReflectionException;
use ReflectionExtension as CoreReflectionExtension;
use ReflectionObject as CoreReflectionObject;
use ReturnTypeWillChange;
use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute;
use PHPStan\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass;
use PHPStan\BetterReflection\Reflection\ReflectionClassConstant as BetterReflectionClassConstant;
use PHPStan\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod;
use PHPStan\BetterReflection\Reflection\ReflectionObject as BetterReflectionObject;
use PHPStan\BetterReflection\Reflection\ReflectionProperty as BetterReflectionProperty;
use PHPStan\BetterReflection\Util\FileHelper;
use ValueError;
use function array_combine;
use function array_map;
use function array_values;
use function func_num_args;
use function sprintf;
use function strtolower;
/** @psalm-suppress PropertyNotSetInConstructor */
final class ReflectionObject extends CoreReflectionObject
{
    /**
     * @var BetterReflectionObject
     */
    private $betterReflectionObject;
    public function __construct(BetterReflectionObject $betterReflectionObject)
    {
        $this->betterReflectionObject = $betterReflectionObject;
        unset($this->name);
    }
    public function __toString() : string
    {
        return $this->betterReflectionObject->__toString();
    }
    public function getName() : string
    {
        return $this->betterReflectionObject->getName();
    }
    public function isInternal() : bool
    {
        return $this->betterReflectionObject->isInternal();
    }
    public function isUserDefined() : bool
    {
        return $this->betterReflectionObject->isUserDefined();
    }
    public function isInstantiable() : bool
    {
        return $this->betterReflectionObject->isInstantiable();
    }
    public function isCloneable() : bool
    {
        return $this->betterReflectionObject->isCloneable();
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getFileName()
    {
        $fileName = $this->betterReflectionObject->getFileName();
        return $fileName !== null ? FileHelper::normalizeSystemPath($fileName) : \false;
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getStartLine()
    {
        return $this->betterReflectionObject->getStartLine();
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getEndLine()
    {
        return $this->betterReflectionObject->getEndLine();
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getDocComment()
    {
        return $this->betterReflectionObject->getDocComment() ?? \false;
    }
    public function getConstructor() : ?\PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod
    {
        $constructor = $this->betterReflectionObject->getConstructor();
        if ($constructor === null) {
            return null;
        }
        return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod($constructor);
    }
    /**
     * {@inheritDoc}
     */
    public function hasMethod($name) : bool
    {
        if ($name === '') {
            return \false;
        }
        return $this->betterReflectionObject->hasMethod($this->getMethodRealName($name));
    }
    /**
     * {@inheritDoc}
     */
    public function getMethod($name) : \PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod
    {
        $method = $name !== '' ? $this->betterReflectionObject->getMethod($this->getMethodRealName($name)) : null;
        if ($method === null) {
            throw new CoreReflectionException(sprintf('Method %s::%s() does not exist', $this->betterReflectionObject->getName(), $name));
        }
        return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod($method);
    }
    /**
     * @param non-empty-string $name
     *
     * @return non-empty-string
     */
    private function getMethodRealName(string $name) : string
    {
        $realMethodNames = array_map(static function (BetterReflectionMethod $method) : string {
            return $method->getName();
        }, $this->betterReflectionObject->getMethods());
        $methodNames = array_combine(array_map(static function (string $methodName) : string {
            return strtolower($methodName);
        }, $realMethodNames), $realMethodNames);
        $lowercasedName = strtolower($name);
        return $methodNames[$lowercasedName] ?? $name;
    }
    /**
     * @param int-mask-of<ReflectionMethod::IS_*>|null $filter
     * @return ReflectionMethod[]
     */
    public function getMethods($filter = null) : array
    {
        return array_values(array_map(static function (BetterReflectionMethod $method) : \PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod {
            return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod($method);
        }, $this->betterReflectionObject->getMethods($filter ?? 0)));
    }
    /**
     * {@inheritDoc}
     */
    public function hasProperty($name) : bool
    {
        if ($name === '') {
            return \false;
        }
        return $this->betterReflectionObject->hasProperty($name);
    }
    /**
     * @param string $name
     * @return ReflectionProperty
     */
    public function getProperty($name) : \ReflectionProperty
    {
        $property = $name !== '' ? $this->betterReflectionObject->getProperty($name) : null;
        if ($property === null) {
            throw new CoreReflectionException(sprintf('Property %s::$%s does not exist', $this->betterReflectionObject->getName(), $name));
        }
        return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty($property);
    }
    /**
     * @param int-mask-of<ReflectionProperty::IS_*>|null $filter
     * @return ReflectionProperty[]
     */
    public function getProperties($filter = null) : array
    {
        return array_values(array_map(static function (BetterReflectionProperty $property) : \PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty {
            return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty($property);
        }, $this->betterReflectionObject->getProperties($filter ?? 0)));
    }
    /**
     * {@inheritDoc}
     */
    public function hasConstant($name) : bool
    {
        if ($name === '') {
            return \false;
        }
        return $this->betterReflectionObject->hasConstant($name);
    }
    /**
     * @param int-mask-of<ReflectionClassConstant::IS_*>|null $filter
     *
     * @return array<string, mixed>
     */
    public function getConstants(?int $filter = null) : array
    {
        return array_map(static function (BetterReflectionClassConstant $betterConstant) {
            return $betterConstant->getValue();
        }, $this->betterReflectionObject->getConstants($filter ?? 0));
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getConstant($name)
    {
        if ($name === '') {
            return \false;
        }
        $betterReflectionConstant = $this->betterReflectionObject->getConstant($name);
        if ($betterReflectionConstant === null) {
            return \false;
        }
        return $betterReflectionConstant->getValue();
    }
    /**
     * @param string $name
     * @return ReflectionClassConstant|false
     */
    #[\ReturnTypeWillChange]
    public function getReflectionConstant($name)
    {
        if ($name === '') {
            return \false;
        }
        $betterReflectionConstant = $this->betterReflectionObject->getConstant($name);
        if ($betterReflectionConstant === null) {
            return \false;
        }
        return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClassConstant($betterReflectionConstant);
    }
    /**
     * @param int-mask-of<ReflectionClassConstant::IS_*>|null $filter
     *
     * @return list<ReflectionClassConstant>
     */
    public function getReflectionConstants(?int $filter = null) : array
    {
        return array_values(array_map(static function (BetterReflectionClassConstant $betterConstant) : \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClassConstant {
            return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClassConstant($betterConstant);
        }, $this->betterReflectionObject->getConstants($filter ?? 0)));
    }
    /** @return array<class-string, ReflectionClass> */
    public function getInterfaces() : array
    {
        return array_map(static function (BetterReflectionClass $interface) : \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass {
            return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass($interface);
        }, $this->betterReflectionObject->getInterfaces());
    }
    /** @return list<class-string> */
    public function getInterfaceNames() : array
    {
        return $this->betterReflectionObject->getInterfaceNames();
    }
    public function isInterface() : bool
    {
        return $this->betterReflectionObject->isInterface();
    }
    /** @return array<trait-string, ReflectionClass> */
    public function getTraits() : array
    {
        $traits = $this->betterReflectionObject->getTraits();
        /** @var list<trait-string> $traitNames */
        $traitNames = array_map(static function (BetterReflectionClass $trait) : string {
            return $trait->getName();
        }, $traits);
        return array_combine($traitNames, array_map(static function (BetterReflectionClass $trait) : \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass {
            return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass($trait);
        }, $traits));
    }
    /** @return list<trait-string> */
    public function getTraitNames() : array
    {
        return $this->betterReflectionObject->getTraitNames();
    }
    /** @return array<string, string> */
    public function getTraitAliases() : array
    {
        return $this->betterReflectionObject->getTraitAliases();
    }
    public function isTrait() : bool
    {
        return $this->betterReflectionObject->isTrait();
    }
    public function isAbstract() : bool
    {
        return $this->betterReflectionObject->isAbstract();
    }
    public function isFinal() : bool
    {
        return $this->betterReflectionObject->isFinal();
    }
    public function isReadOnly() : bool
    {
        return $this->betterReflectionObject->isReadOnly();
    }
    public function getModifiers() : int
    {
        return $this->betterReflectionObject->getModifiers();
    }
    /**
     * {@inheritDoc}
     */
    public function isInstance($object) : bool
    {
        return $this->betterReflectionObject->isInstance($object);
    }
    /**
     * @param mixed $arg
     * @param mixed ...$args
     *
     * @return object
     */
    #[\ReturnTypeWillChange]
    public function newInstance($arg = null, ...$args)
    {
        throw new \PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented('Not implemented');
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function newInstanceWithoutConstructor()
    {
        throw new \PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented('Not implemented');
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function newInstanceArgs(?array $args = null)
    {
        throw new \PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented('Not implemented');
    }
    /**
     * @return ReflectionClass|false
     */
    #[\ReturnTypeWillChange]
    public function getParentClass()
    {
        $parentClass = $this->betterReflectionObject->getParentClass();
        if ($parentClass === null) {
            return \false;
        }
        return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass($parentClass);
    }
    /**
     * {@inheritDoc}
     */
    public function isSubclassOf($class) : bool
    {
        $realParentClassNames = $this->betterReflectionObject->getParentClassNames();
        $parentClassNames = array_combine(array_map(static function (string $parentClassName) : string {
            return strtolower($parentClassName);
        }, $realParentClassNames), $realParentClassNames);
        $className = $class instanceof CoreReflectionClass ? $class->getName() : $class;
        $lowercasedClassName = strtolower($className);
        $realParentClassName = $parentClassNames[$lowercasedClassName] ?? $className;
        return $this->betterReflectionObject->isSubclassOf($realParentClassName);
    }
    /**
     * @return array<string, mixed>
     *
     * @psalm-suppress LessSpecificImplementedReturnType
     */
    public function getStaticProperties() : array
    {
        return $this->betterReflectionObject->getStaticProperties();
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getStaticPropertyValue($name, $default = null)
    {
        $betterReflectionProperty = $name !== '' ? $this->betterReflectionObject->getProperty($name) : null;
        if ($betterReflectionProperty === null) {
            if (func_num_args() === 2) {
                return $default;
            }
            throw new CoreReflectionException(sprintf('Property %s::$%s does not exist', $this->betterReflectionObject->getName(), $name));
        }
        $property = new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty($betterReflectionProperty);
        if (!$property->isStatic()) {
            throw new CoreReflectionException(sprintf('Property %s::$%s does not exist', $this->betterReflectionObject->getName(), $name));
        }
        return $property->getValue();
    }
    /**
     * {@inheritDoc}
     */
    public function setStaticPropertyValue($name, $value) : void
    {
        $betterReflectionProperty = $name !== '' ? $this->betterReflectionObject->getProperty($name) : null;
        if ($betterReflectionProperty === null) {
            throw new CoreReflectionException(sprintf('Class %s does not have a property named %s', $this->betterReflectionObject->getName(), $name));
        }
        $property = new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty($betterReflectionProperty);
        if (!$property->isStatic()) {
            throw new CoreReflectionException(sprintf('Class %s does not have a property named %s', $this->betterReflectionObject->getName(), $name));
        }
        $property->setValue($value);
    }
    /** @return array<string, scalar|array<scalar>|null> */
    public function getDefaultProperties() : array
    {
        return $this->betterReflectionObject->getDefaultProperties();
    }
    public function isIterateable() : bool
    {
        return $this->betterReflectionObject->isIterateable();
    }
    public function isIterable() : bool
    {
        return $this->isIterateable();
    }
    /**
     * @param \ReflectionClass|string $interface
     */
    public function implementsInterface($interface) : bool
    {
        $realInterfaceNames = $this->betterReflectionObject->getInterfaceNames();
        $interfaceNames = array_combine(array_map(static function (string $interfaceName) : string {
            return strtolower($interfaceName);
        }, $realInterfaceNames), $realInterfaceNames);
        $interfaceName = $interface instanceof CoreReflectionClass ? $interface->getName() : $interface;
        $lowercasedIntefaceName = strtolower($interfaceName);
        $realInterfaceName = $interfaceNames[$lowercasedIntefaceName] ?? $interfaceName;
        return $this->betterReflectionObject->implementsInterface($realInterfaceName);
    }
    public function getExtension() : ?CoreReflectionExtension
    {
        throw new \PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented('Not implemented');
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getExtensionName()
    {
        return $this->betterReflectionObject->getExtensionName() ?? \false;
    }
    public function inNamespace() : bool
    {
        return $this->betterReflectionObject->inNamespace();
    }
    public function getNamespaceName() : string
    {
        return $this->betterReflectionObject->getNamespaceName() ?? '';
    }
    public function getShortName() : string
    {
        return $this->betterReflectionObject->getShortName();
    }
    public function isAnonymous() : bool
    {
        return $this->betterReflectionObject->isAnonymous();
    }
    /**
     * @param class-string|null $name
     *
     * @return list<ReflectionAttribute|FakeReflectionAttribute>
     */
    public function getAttributes(?string $name = null, int $flags = 0) : array
    {
        if ($flags !== 0 && $flags !== \PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute::IS_INSTANCEOF) {
            throw new ValueError('Argument #2 ($flags) must be a valid attribute filter flag');
        }
        if ($name !== null && $flags !== 0) {
            $attributes = $this->betterReflectionObject->getAttributesByInstance($name);
        } elseif ($name !== null) {
            $attributes = $this->betterReflectionObject->getAttributesByName($name);
        } else {
            $attributes = $this->betterReflectionObject->getAttributes();
        }
        return array_map(static function (BetterReflectionAttribute $betterReflectionAttribute) {
            return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttributeFactory::create($betterReflectionAttribute);
        }, $attributes);
    }
    public function isEnum() : bool
    {
        return $this->betterReflectionObject->isEnum();
    }
    /**
     * @return mixed
     */
    public function __get(string $name)
    {
        if ($name === 'name') {
            return $this->betterReflectionObject->getName();
        }
        throw new OutOfBoundsException(sprintf('Property %s::$%s does not exist.', self::class, $name));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Adapter;

use OutOfBoundsException;
use PhpParser\Node\Expr;
use ReflectionClassConstant as CoreReflectionClassConstant;
use ReturnTypeWillChange;
use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute;
use PHPStan\BetterReflection\Reflection\ReflectionClassConstant as BetterReflectionClassConstant;
use PHPStan\BetterReflection\Reflection\ReflectionEnumCase as BetterReflectionEnumCase;
use ValueError;
use function array_map;
use function constant;
use function sprintf;
/**
 * @psalm-suppress PropertyNotSetInConstructor
 * @psalm-immutable
 */
final class ReflectionClassConstant extends CoreReflectionClassConstant
{
    public const IS_PUBLIC = 1;
    public const IS_PROTECTED = 2;
    public const IS_PRIVATE = 4;
    public const IS_FINAL = 32;
    /**
     * @var BetterReflectionClassConstant|BetterReflectionEnumCase
     */
    private $betterClassConstantOrEnumCase;
    /**
     * @param BetterReflectionClassConstant|BetterReflectionEnumCase $betterClassConstantOrEnumCase
     */
    public function __construct($betterClassConstantOrEnumCase)
    {
        $this->betterClassConstantOrEnumCase = $betterClassConstantOrEnumCase;
        unset($this->name);
        unset($this->class);
    }
    public function getName() : string
    {
        return $this->betterClassConstantOrEnumCase->getName();
    }
    /**
     * @deprecated Use getValueExpression()
     */
    #[\ReturnTypeWillChange]
    public function getValue()
    {
        if ($this->betterClassConstantOrEnumCase instanceof BetterReflectionEnumCase) {
            throw new \PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented('Not implemented');
        }
        return $this->betterClassConstantOrEnumCase->getValue();
    }
    /**
     * @deprecated Use getValueExpression()
     */
    public function getValueExpr() : Expr
    {
        return $this->getValueExpression();
    }
    public function getValueExpression() : Expr
    {
        return $this->betterClassConstantOrEnumCase->getValueExpression();
    }
    public function isPublic() : bool
    {
        if ($this->betterClassConstantOrEnumCase instanceof BetterReflectionEnumCase) {
            return \true;
        }
        return $this->betterClassConstantOrEnumCase->isPublic();
    }
    public function isPrivate() : bool
    {
        if ($this->betterClassConstantOrEnumCase instanceof BetterReflectionEnumCase) {
            return \false;
        }
        return $this->betterClassConstantOrEnumCase->isPrivate();
    }
    public function isProtected() : bool
    {
        if ($this->betterClassConstantOrEnumCase instanceof BetterReflectionEnumCase) {
            return \false;
        }
        return $this->betterClassConstantOrEnumCase->isProtected();
    }
    public function getModifiers() : int
    {
        if ($this->betterClassConstantOrEnumCase instanceof BetterReflectionEnumCase) {
            return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClassConstant::IS_PUBLIC;
        }
        return $this->betterClassConstantOrEnumCase->getModifiers();
    }
    public function getDeclaringClass() : \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass
    {
        if ($this->betterClassConstantOrEnumCase instanceof BetterReflectionEnumCase) {
            return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass($this->betterClassConstantOrEnumCase->getDeclaringClass());
        }
        return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass($this->betterClassConstantOrEnumCase->getImplementingClass());
    }
    /**
     * Returns the doc comment for this constant
     *
     * @return string|false
     */
    #[\ReturnTypeWillChange]
    public function getDocComment()
    {
        return $this->betterClassConstantOrEnumCase->getDocComment() ?? \false;
    }
    /**
     * To string
     *
     * @link https://php.net/manual/en/reflector.tostring.php
     *
     * @return non-empty-string
     */
    public function __toString() : string
    {
        return $this->betterClassConstantOrEnumCase->__toString();
    }
    /**
     * @param class-string|null $name
     *
     * @return list<ReflectionAttribute|FakeReflectionAttribute>
     */
    public function getAttributes(?string $name = null, int $flags = 0) : array
    {
        if ($flags !== 0 && $flags !== \PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute::IS_INSTANCEOF) {
            throw new ValueError('Argument #2 ($flags) must be a valid attribute filter flag');
        }
        if ($name !== null && $flags !== 0) {
            $attributes = $this->betterClassConstantOrEnumCase->getAttributesByInstance($name);
        } elseif ($name !== null) {
            $attributes = $this->betterClassConstantOrEnumCase->getAttributesByName($name);
        } else {
            $attributes = $this->betterClassConstantOrEnumCase->getAttributes();
        }
        /** @psalm-suppress ImpureFunctionCall */
        return array_map(static function (BetterReflectionAttribute $betterReflectionAttribute) {
            return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttributeFactory::create($betterReflectionAttribute);
        }, $attributes);
    }
    public function isFinal() : bool
    {
        if ($this->betterClassConstantOrEnumCase instanceof BetterReflectionEnumCase) {
            return \true;
        }
        return $this->betterClassConstantOrEnumCase->isFinal();
    }
    public function isEnumCase() : bool
    {
        return $this->betterClassConstantOrEnumCase instanceof BetterReflectionEnumCase;
    }
    /**
     * @return mixed
     */
    public function __get(string $name)
    {
        if ($name === 'name') {
            return $this->betterClassConstantOrEnumCase->getName();
        }
        if ($name === 'class') {
            return $this->getDeclaringClass()->getName();
        }
        throw new OutOfBoundsException(sprintf('Property %s::$%s does not exist.', self::class, $name));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Adapter;

use PhpParser\Node\Expr;
use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute;
final class FakeReflectionAttribute
{
    /**
     * @var BetterReflectionAttribute
     */
    private $betterReflectionAttribute;
    public function __construct(BetterReflectionAttribute $betterReflectionAttribute)
    {
        $this->betterReflectionAttribute = $betterReflectionAttribute;
    }
    public function getName() : string
    {
        return $this->betterReflectionAttribute->getName();
    }
    public function getTarget() : int
    {
        return $this->betterReflectionAttribute->getTarget();
    }
    public function isRepeated() : bool
    {
        return $this->betterReflectionAttribute->isRepeated();
    }
    /**
     * @deprecated Use getArgumentsExpressions()
     * @return array<int|string, mixed>
     */
    public function getArguments() : array
    {
        return $this->betterReflectionAttribute->getArguments();
    }
    /** @return array<int|string, Expr> */
    public function getArgumentsExpressions() : array
    {
        return $this->betterReflectionAttribute->getArgumentsExpressions();
    }
    /** @deprecated */
    public function newInstance() : object
    {
        $class = $this->getName();
        return new $class(...$this->getArguments());
    }
    public function __toString() : string
    {
        return $this->betterReflectionAttribute->__toString();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Adapter\Exception;

use LogicException;
class NotImplemented extends LogicException
{
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Adapter;

use Closure;
use OutOfBoundsException;
use ReflectionClass as CoreReflectionClass;
use ReflectionException as CoreReflectionException;
use ReflectionExtension as CoreReflectionExtension;
use ReflectionMethod as CoreReflectionMethod;
use ReflectionType as CoreReflectionType;
use ReturnTypeWillChange;
use PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented;
use PHPStan\BetterReflection\Reflection\Exception\CodeLocationMissing;
use PHPStan\BetterReflection\Reflection\Exception\MethodPrototypeNotFound;
use PHPStan\BetterReflection\Reflection\Exception\NoObjectProvided;
use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute;
use PHPStan\BetterReflection\Reflection\ReflectionMethod as BetterReflectionMethod;
use PHPStan\BetterReflection\Reflection\ReflectionParameter as BetterReflectionParameter;
use PHPStan\BetterReflection\Util\FileHelper;
use Throwable;
use ValueError;
use function array_map;
use function sprintf;
final class ReflectionMethod extends CoreReflectionMethod
{
    /**
     * @var BetterReflectionMethod
     */
    private $betterReflectionMethod;
    public function __construct(BetterReflectionMethod $betterReflectionMethod)
    {
        $this->betterReflectionMethod = $betterReflectionMethod;
        unset($this->name);
        unset($this->class);
    }
    public function __toString() : string
    {
        return $this->betterReflectionMethod->__toString();
    }
    public function inNamespace() : bool
    {
        return $this->betterReflectionMethod->inNamespace();
    }
    public function isClosure() : bool
    {
        return $this->betterReflectionMethod->isClosure();
    }
    public function isDeprecated() : bool
    {
        return $this->betterReflectionMethod->isDeprecated();
    }
    public function isInternal() : bool
    {
        return $this->betterReflectionMethod->isInternal();
    }
    public function isUserDefined() : bool
    {
        return $this->betterReflectionMethod->isUserDefined();
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getClosureThis()
    {
        throw new NotImplemented('Not implemented');
    }
    public function getClosureScopeClass() : ?CoreReflectionClass
    {
        throw new NotImplemented('Not implemented');
    }
    public function getClosureCalledClass() : ?CoreReflectionClass
    {
        throw new NotImplemented('Not implemented');
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getDocComment()
    {
        return $this->betterReflectionMethod->getDocComment() ?? \false;
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getStartLine()
    {
        try {
            return $this->betterReflectionMethod->getStartLine();
        } catch (CodeLocationMissing $exception) {
            return \false;
        }
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getEndLine()
    {
        try {
            return $this->betterReflectionMethod->getEndLine();
        } catch (CodeLocationMissing $exception) {
            return \false;
        }
    }
    /** @psalm-suppress ImplementedReturnTypeMismatch */
    public function getExtension() : ?CoreReflectionExtension
    {
        throw new NotImplemented('Not implemented');
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getExtensionName()
    {
        return $this->betterReflectionMethod->getExtensionName() ?? \false;
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getFileName()
    {
        $fileName = $this->betterReflectionMethod->getFileName();
        return $fileName !== null ? FileHelper::normalizeSystemPath($fileName) : \false;
    }
    public function getName() : string
    {
        return $this->betterReflectionMethod->getName();
    }
    public function getNamespaceName() : string
    {
        return $this->betterReflectionMethod->getNamespaceName() ?? '';
    }
    public function getNumberOfParameters() : int
    {
        return $this->betterReflectionMethod->getNumberOfParameters();
    }
    public function getNumberOfRequiredParameters() : int
    {
        return $this->betterReflectionMethod->getNumberOfRequiredParameters();
    }
    /** @return list<ReflectionParameter> */
    public function getParameters() : array
    {
        return array_map(static function (BetterReflectionParameter $parameter) : \PHPStan\BetterReflection\Reflection\Adapter\ReflectionParameter {
            return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionParameter($parameter);
        }, $this->betterReflectionMethod->getParameters());
    }
    public function hasReturnType() : bool
    {
        return $this->betterReflectionMethod->hasReturnType();
    }
    /** @return ReflectionUnionType|ReflectionNamedType|ReflectionIntersectionType|null */
    public function getReturnType() : ?CoreReflectionType
    {
        return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionType::fromTypeOrNull($this->betterReflectionMethod->getReturnType());
    }
    public function getShortName() : string
    {
        return $this->betterReflectionMethod->getShortName();
    }
    /** @return array<string, scalar> */
    public function getStaticVariables() : array
    {
        throw new NotImplemented('Not implemented');
    }
    public function returnsReference() : bool
    {
        return $this->betterReflectionMethod->returnsReference();
    }
    public function isGenerator() : bool
    {
        return $this->betterReflectionMethod->isGenerator();
    }
    public function isVariadic() : bool
    {
        return $this->betterReflectionMethod->isVariadic();
    }
    public function isPublic() : bool
    {
        return $this->betterReflectionMethod->isPublic();
    }
    public function isPrivate() : bool
    {
        return $this->betterReflectionMethod->isPrivate();
    }
    public function isProtected() : bool
    {
        return $this->betterReflectionMethod->isProtected();
    }
    public function isAbstract() : bool
    {
        return $this->betterReflectionMethod->isAbstract();
    }
    public function isFinal() : bool
    {
        return $this->betterReflectionMethod->isFinal();
    }
    public function isStatic() : bool
    {
        return $this->betterReflectionMethod->isStatic();
    }
    public function isConstructor() : bool
    {
        return $this->betterReflectionMethod->isConstructor();
    }
    public function isDestructor() : bool
    {
        return $this->betterReflectionMethod->isDestructor();
    }
    /**
     * {@inheritDoc}
     */
    public function getClosure($object = null) : Closure
    {
        try {
            return $this->betterReflectionMethod->getClosure($object);
        } catch (NoObjectProvided $e) {
            throw new ValueError($e->getMessage(), 0, $e);
        } catch (Throwable $e) {
            throw new CoreReflectionException($e->getMessage(), 0, $e);
        }
    }
    public function getModifiers() : int
    {
        return $this->betterReflectionMethod->getModifiers();
    }
    /**
     * @param object $object
     * @param mixed  $arg
     * @param mixed  ...$args
     *
     * @return mixed
     *
     * @throws CoreReflectionException
     */
    #[\ReturnTypeWillChange]
    public function invoke($object = null, $arg = null, ...$args)
    {
        try {
            return $this->betterReflectionMethod->invoke($object, $arg, ...$args);
        } catch (NoObjectProvided $exception) {
            return null;
        } catch (Throwable $e) {
            throw new CoreReflectionException($e->getMessage(), 0, $e);
        }
    }
    /**
     * @param object  $object
     * @param mixed[] $args
     *
     * @return mixed
     *
     * @throws CoreReflectionException
     */
    #[\ReturnTypeWillChange]
    public function invokeArgs($object = null, array $args = [])
    {
        try {
            return $this->betterReflectionMethod->invokeArgs($object, $args);
        } catch (NoObjectProvided $exception) {
            return null;
        } catch (Throwable $e) {
            throw new CoreReflectionException($e->getMessage(), 0, $e);
        }
    }
    public function getDeclaringClass() : \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass
    {
        return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass($this->betterReflectionMethod->getImplementingClass());
    }
    public function getPrototype() : \PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod
    {
        return new self($this->betterReflectionMethod->getPrototype());
    }
    public function hasPrototype() : bool
    {
        try {
            $this->betterReflectionMethod->getPrototype();
            return \true;
        } catch (MethodPrototypeNotFound $exception) {
            return \false;
        }
    }
    /**
     * {@inheritDoc}
     * @codeCoverageIgnore
     * @infection-ignore-all
     */
    public function setAccessible($accessible) : void
    {
    }
    /**
     * @param class-string|null $name
     *
     * @return list<ReflectionAttribute|FakeReflectionAttribute>
     */
    public function getAttributes(?string $name = null, int $flags = 0) : array
    {
        if ($flags !== 0 && $flags !== \PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute::IS_INSTANCEOF) {
            throw new ValueError('Argument #2 ($flags) must be a valid attribute filter flag');
        }
        if ($name !== null && $flags !== 0) {
            $attributes = $this->betterReflectionMethod->getAttributesByInstance($name);
        } elseif ($name !== null) {
            $attributes = $this->betterReflectionMethod->getAttributesByName($name);
        } else {
            $attributes = $this->betterReflectionMethod->getAttributes();
        }
        return array_map(static function (BetterReflectionAttribute $betterReflectionAttribute) {
            return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttributeFactory::create($betterReflectionAttribute);
        }, $attributes);
    }
    public function hasTentativeReturnType() : bool
    {
        return $this->betterReflectionMethod->hasTentativeReturnType();
    }
    /** @return ReflectionUnionType|ReflectionNamedType|ReflectionIntersectionType|null */
    public function getTentativeReturnType() : ?CoreReflectionType
    {
        return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionType::fromTypeOrNull($this->betterReflectionMethod->getTentativeReturnType());
    }
    /** @return mixed[] */
    public function getClosureUsedVariables() : array
    {
        throw new \PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented('Not implemented');
    }
    /**
     * @return mixed
     */
    public function __get(string $name)
    {
        if ($name === 'name') {
            return $this->betterReflectionMethod->getName();
        }
        if ($name === 'class') {
            return $this->betterReflectionMethod->getImplementingClass()->getName();
        }
        throw new OutOfBoundsException(sprintf('Property %s::$%s does not exist.', self::class, $name));
    }
    public function getBetterReflection() : BetterReflectionMethod
    {
        return $this->betterReflectionMethod;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Adapter;

use ArgumentCountError;
use OutOfBoundsException;
use PhpParser\Node\Expr;
use ReflectionException as CoreReflectionException;
use ReflectionProperty as CoreReflectionProperty;
use ReturnTypeWillChange;
use PHPStan\BetterReflection\Reflection\Exception\NoObjectProvided;
use PHPStan\BetterReflection\Reflection\Exception\NotAnObject;
use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute;
use PHPStan\BetterReflection\Reflection\ReflectionProperty as BetterReflectionProperty;
use Throwable;
use TypeError;
use ValueError;
use function array_map;
use function gettype;
use function sprintf;
final class ReflectionProperty extends CoreReflectionProperty
{
    public const IS_READONLY = 128;
    /**
     * @var BetterReflectionProperty
     */
    private $betterReflectionProperty;
    public function __construct(BetterReflectionProperty $betterReflectionProperty)
    {
        $this->betterReflectionProperty = $betterReflectionProperty;
        unset($this->name);
        unset($this->class);
    }
    public function __toString() : string
    {
        return $this->betterReflectionProperty->__toString();
    }
    public function getName() : string
    {
        return $this->betterReflectionProperty->getName();
    }
    /**
     * {@inheritDoc}
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    public function getValue($object = null)
    {
        try {
            return $this->betterReflectionProperty->getValue($object);
        } catch (NoObjectProvided $exception) {
            return null;
        } catch (Throwable $e) {
            throw new CoreReflectionException($e->getMessage(), 0, $e);
        }
    }
    /** @psalm-suppress MethodSignatureMismatch
     * @param mixed $objectOrValue
     * @param mixed $value */
    public function setValue($objectOrValue, $value = null) : void
    {
        try {
            $this->betterReflectionProperty->setValue($objectOrValue, $value);
        } catch (NoObjectProvided $exception) {
            throw new ArgumentCountError('ReflectionProperty::setValue() expects exactly 2 arguments, 1 given');
        } catch (NotAnObject $exception) {
            throw new TypeError(sprintf('ReflectionProperty::setValue(): Argument #1 ($objectOrValue) must be of type object, %s given', gettype($objectOrValue)));
        } catch (Throwable $e) {
            throw new CoreReflectionException($e->getMessage(), 0, $e);
        }
    }
    public function hasType() : bool
    {
        return $this->betterReflectionProperty->hasType();
    }
    /**
     * @return ReflectionUnionType|ReflectionNamedType|ReflectionIntersectionType|null
     */
    public function getType() : ?\ReflectionType
    {
        return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionType::fromTypeOrNull($this->betterReflectionProperty->getType());
    }
    public function isPublic() : bool
    {
        return $this->betterReflectionProperty->isPublic();
    }
    public function isPrivate() : bool
    {
        return $this->betterReflectionProperty->isPrivate();
    }
    public function isProtected() : bool
    {
        return $this->betterReflectionProperty->isProtected();
    }
    public function isStatic() : bool
    {
        return $this->betterReflectionProperty->isStatic();
    }
    public function isDefault() : bool
    {
        return $this->betterReflectionProperty->isDefault();
    }
    public function getModifiers() : int
    {
        return $this->betterReflectionProperty->getModifiers();
    }
    public function getDeclaringClass() : \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass
    {
        return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass($this->betterReflectionProperty->getImplementingClass());
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getDocComment()
    {
        return $this->betterReflectionProperty->getDocComment() ?? \false;
    }
    /**
     * {@inheritDoc}
     * @codeCoverageIgnore
     * @infection-ignore-all
     */
    public function setAccessible($accessible) : void
    {
    }
    public function hasDefaultValue() : bool
    {
        return $this->betterReflectionProperty->hasDefaultValue();
    }
    /**
     * @deprecated Use getDefaultValueExpression()
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    public function getDefaultValue()
    {
        return $this->betterReflectionProperty->getDefaultValue();
    }
    /**
     * @deprecated Use getDefaultValueExpression()
     */
    public function getDefaultValueExpr() : Expr
    {
        return $this->betterReflectionProperty->getDefaultValueExpression();
    }
    public function getDefaultValueExpression() : Expr
    {
        return $this->betterReflectionProperty->getDefaultValueExpression();
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function isInitialized($object = null)
    {
        try {
            return $this->betterReflectionProperty->isInitialized($object);
        } catch (Throwable $e) {
            throw new CoreReflectionException($e->getMessage(), 0, $e);
        }
    }
    public function isPromoted() : bool
    {
        return $this->betterReflectionProperty->isPromoted();
    }
    /**
     * @param class-string|null $name
     *
     * @return list<ReflectionAttribute|FakeReflectionAttribute>
     */
    public function getAttributes(?string $name = null, int $flags = 0) : array
    {
        if ($flags !== 0 && $flags !== \PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute::IS_INSTANCEOF) {
            throw new ValueError('Argument #2 ($flags) must be a valid attribute filter flag');
        }
        if ($name !== null && $flags !== 0) {
            $attributes = $this->betterReflectionProperty->getAttributesByInstance($name);
        } elseif ($name !== null) {
            $attributes = $this->betterReflectionProperty->getAttributesByName($name);
        } else {
            $attributes = $this->betterReflectionProperty->getAttributes();
        }
        return array_map(static function (BetterReflectionAttribute $betterReflectionAttribute) {
            return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttributeFactory::create($betterReflectionAttribute);
        }, $attributes);
    }
    public function isReadOnly() : bool
    {
        return $this->betterReflectionProperty->isReadOnly();
    }
    /**
     * @return mixed
     */
    public function __get(string $name)
    {
        if ($name === 'name') {
            return $this->betterReflectionProperty->getName();
        }
        if ($name === 'class') {
            return $this->betterReflectionProperty->getImplementingClass()->getName();
        }
        throw new OutOfBoundsException(sprintf('Property %s::$%s does not exist.', self::class, $name));
    }
    public function getBetterReflection() : BetterReflectionProperty
    {
        return $this->betterReflectionProperty;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Adapter;

use Closure;
use OutOfBoundsException;
use ReflectionClass as CoreReflectionClass;
use ReflectionException as CoreReflectionException;
use ReflectionExtension as CoreReflectionExtension;
use ReflectionFunction as CoreReflectionFunction;
use ReflectionType as CoreReflectionType;
use ReturnTypeWillChange;
use PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented;
use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute;
use PHPStan\BetterReflection\Reflection\ReflectionFunction as BetterReflectionFunction;
use PHPStan\BetterReflection\Reflection\ReflectionParameter as BetterReflectionParameter;
use PHPStan\BetterReflection\Util\FileHelper;
use Throwable;
use ValueError;
use function array_map;
use function func_get_args;
use function sprintf;
final class ReflectionFunction extends CoreReflectionFunction
{
    /**
     * @var BetterReflectionFunction
     */
    private $betterReflectionFunction;
    public function __construct(BetterReflectionFunction $betterReflectionFunction)
    {
        $this->betterReflectionFunction = $betterReflectionFunction;
        unset($this->name);
    }
    public function __toString() : string
    {
        return $this->betterReflectionFunction->__toString();
    }
    public function inNamespace() : bool
    {
        return $this->betterReflectionFunction->inNamespace();
    }
    public function isClosure() : bool
    {
        return $this->betterReflectionFunction->isClosure();
    }
    public function isDeprecated() : bool
    {
        return $this->betterReflectionFunction->isDeprecated();
    }
    public function isInternal() : bool
    {
        return $this->betterReflectionFunction->isInternal();
    }
    public function isUserDefined() : bool
    {
        return $this->betterReflectionFunction->isUserDefined();
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getClosureThis()
    {
        throw new NotImplemented('Not implemented');
    }
    public function getClosureScopeClass() : ?CoreReflectionClass
    {
        throw new NotImplemented('Not implemented');
    }
    public function getClosureCalledClass() : ?CoreReflectionClass
    {
        throw new NotImplemented('Not implemented');
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getDocComment()
    {
        return $this->betterReflectionFunction->getDocComment() ?? \false;
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getStartLine()
    {
        return $this->betterReflectionFunction->getStartLine();
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getEndLine()
    {
        return $this->betterReflectionFunction->getEndLine();
    }
    /** @psalm-suppress ImplementedReturnTypeMismatch */
    public function getExtension() : ?CoreReflectionExtension
    {
        throw new NotImplemented('Not implemented');
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getExtensionName()
    {
        return $this->betterReflectionFunction->getExtensionName() ?? \false;
    }
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getFileName()
    {
        $fileName = $this->betterReflectionFunction->getFileName();
        return $fileName !== null ? FileHelper::normalizeSystemPath($fileName) : \false;
    }
    public function getName() : string
    {
        return $this->betterReflectionFunction->getName();
    }
    public function getNamespaceName() : string
    {
        return $this->betterReflectionFunction->getNamespaceName() ?? '';
    }
    public function getNumberOfParameters() : int
    {
        return $this->betterReflectionFunction->getNumberOfParameters();
    }
    public function getNumberOfRequiredParameters() : int
    {
        return $this->betterReflectionFunction->getNumberOfRequiredParameters();
    }
    /** @return list<ReflectionParameter> */
    public function getParameters() : array
    {
        return array_map(static function (BetterReflectionParameter $parameter) : \PHPStan\BetterReflection\Reflection\Adapter\ReflectionParameter {
            return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionParameter($parameter);
        }, $this->betterReflectionFunction->getParameters());
    }
    public function hasReturnType() : bool
    {
        return $this->betterReflectionFunction->hasReturnType();
    }
    /** @return ReflectionUnionType|ReflectionNamedType|ReflectionIntersectionType|null */
    public function getReturnType() : ?CoreReflectionType
    {
        return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionType::fromTypeOrNull($this->betterReflectionFunction->getReturnType());
    }
    public function getShortName() : string
    {
        return $this->betterReflectionFunction->getShortName();
    }
    /** @return array<string, scalar> */
    public function getStaticVariables() : array
    {
        throw new NotImplemented('Not implemented');
    }
    public function returnsReference() : bool
    {
        return $this->betterReflectionFunction->returnsReference();
    }
    public function isGenerator() : bool
    {
        return $this->betterReflectionFunction->isGenerator();
    }
    public function isVariadic() : bool
    {
        return $this->betterReflectionFunction->isVariadic();
    }
    public function isDisabled() : bool
    {
        return $this->betterReflectionFunction->isDisabled();
    }
    /**
     * @param mixed $arg
     * @param mixed ...$args
     *
     * @return mixed
     *
     * @throws CoreReflectionException
     */
    #[\ReturnTypeWillChange]
    public function invoke($arg = null, ...$args)
    {
        try {
            return $this->betterReflectionFunction->invoke(...func_get_args());
        } catch (Throwable $e) {
            throw new CoreReflectionException($e->getMessage(), 0, $e);
        }
    }
    /**
     * @param mixed[] $args
     */
    #[\ReturnTypeWillChange]
    public function invokeArgs(array $args)
    {
        try {
            return $this->betterReflectionFunction->invokeArgs($args);
        } catch (Throwable $e) {
            throw new CoreReflectionException($e->getMessage(), 0, $e);
        }
    }
    public function getClosure() : Closure
    {
        return $this->betterReflectionFunction->getClosure();
    }
    /** @return mixed[] */
    public function getClosureUsedVariables() : array
    {
        throw new \PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented('Not implemented');
    }
    public function hasTentativeReturnType() : bool
    {
        return $this->betterReflectionFunction->hasTentativeReturnType();
    }
    /** @return ReflectionUnionType|ReflectionNamedType|ReflectionIntersectionType|null */
    public function getTentativeReturnType() : ?CoreReflectionType
    {
        return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionType::fromTypeOrNull($this->betterReflectionFunction->getTentativeReturnType());
    }
    public function isStatic() : bool
    {
        return $this->betterReflectionFunction->isStatic();
    }
    /**
     * @param class-string|null $name
     *
     * @return list<ReflectionAttribute|FakeReflectionAttribute>
     */
    public function getAttributes(?string $name = null, int $flags = 0) : array
    {
        if ($flags !== 0 && $flags !== \PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute::IS_INSTANCEOF) {
            throw new ValueError('Argument #2 ($flags) must be a valid attribute filter flag');
        }
        if ($name !== null && $flags !== 0) {
            $attributes = $this->betterReflectionFunction->getAttributesByInstance($name);
        } elseif ($name !== null) {
            $attributes = $this->betterReflectionFunction->getAttributesByName($name);
        } else {
            $attributes = $this->betterReflectionFunction->getAttributes();
        }
        return array_map(static function (BetterReflectionAttribute $betterReflectionAttribute) {
            return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttributeFactory::create($betterReflectionAttribute);
        }, $attributes);
    }
    /**
     * @return mixed
     */
    public function __get(string $name)
    {
        if ($name === 'name') {
            return $this->betterReflectionFunction->getName();
        }
        throw new OutOfBoundsException(sprintf('Property %s::$%s does not exist.', self::class, $name));
    }
    public function isAnonymous() : bool
    {
        return $this->betterReflectionFunction->isClosure();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Adapter;

use OutOfBoundsException;
use PhpParser\Node\Expr;
use ReflectionEnumBackedCase as CoreReflectionEnumBackedCase;
use PHPStan\BetterReflection\Reflection\ReflectionAttribute as BetterReflectionAttribute;
use PHPStan\BetterReflection\Reflection\ReflectionEnumCase as BetterReflectionEnumCase;
use UnitEnum;
use ValueError;
use function array_map;
use function sprintf;
/**
 * @psalm-suppress PropertyNotSetInConstructor
 * @psalm-immutable
 */
final class ReflectionEnumBackedCase extends CoreReflectionEnumBackedCase
{
    public function __construct(private BetterReflectionEnumCase $betterReflectionEnumCase)
    {
        unset($this->name);
        unset($this->class);
    }
    /**
     * Get the name of the reflection (e.g. if this is a ReflectionClass this
     * will be the class name).
     */
    public function getName() : string
    {
        return $this->betterReflectionEnumCase->getName();
    }
    public function getValue() : UnitEnum
    {
        throw new \PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented('Not implemented');
    }
    public function isPublic() : bool
    {
        return \true;
    }
    public function isPrivate() : bool
    {
        return \false;
    }
    public function isProtected() : bool
    {
        return \false;
    }
    public function getModifiers() : int
    {
        return self::IS_PUBLIC;
    }
    public function getDeclaringClass() : \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass
    {
        return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass($this->betterReflectionEnumCase->getDeclaringClass());
    }
    public function getDocComment() : string|false
    {
        return $this->betterReflectionEnumCase->getDocComment() ?? \false;
    }
    /** @return non-empty-string */
    public function __toString() : string
    {
        return $this->betterReflectionEnumCase->__toString();
    }
    /**
     * @param class-string|null $name
     *
     * @return list<ReflectionAttribute|FakeReflectionAttribute>
     */
    public function getAttributes(string|null $name = null, int $flags = 0) : array
    {
        if ($flags !== 0 && $flags !== \PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute::IS_INSTANCEOF) {
            throw new ValueError('Argument #2 ($flags) must be a valid attribute filter flag');
        }
        if ($name !== null && $flags !== 0) {
            $attributes = $this->betterReflectionEnumCase->getAttributesByInstance($name);
        } elseif ($name !== null) {
            $attributes = $this->betterReflectionEnumCase->getAttributesByName($name);
        } else {
            $attributes = $this->betterReflectionEnumCase->getAttributes();
        }
        /** @psalm-suppress ImpureFunctionCall */
        return array_map(static fn(BetterReflectionAttribute $betterReflectionAttribute): \PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute|\PHPStan\BetterReflection\Reflection\Adapter\FakeReflectionAttribute => \PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttributeFactory::create($betterReflectionAttribute), $attributes);
    }
    public function isFinal() : bool
    {
        return \true;
    }
    public function isEnumCase() : bool
    {
        return \true;
    }
    public function getEnum() : \PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnum
    {
        return new \PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnum($this->betterReflectionEnumCase->getDeclaringEnum());
    }
    /**
     * @deprecated Use getValueExpression()
     */
    public function getBackingValue() : int|string
    {
        return $this->betterReflectionEnumCase->getValue();
    }
    /**
     * @deprecated Use getValueExpression()
     */
    public function getValueExpr() : Expr
    {
        return $this->getValueExpression();
    }
    public function getValueExpression() : Expr
    {
        return $this->betterReflectionEnumCase->getValueExpression();
    }
    public function __get(string $name) : mixed
    {
        if ($name === 'name') {
            return $this->betterReflectionEnumCase->getName();
        }
        if ($name === 'class') {
            return $this->betterReflectionEnumCase->getDeclaringClass()->getName();
        }
        throw new OutOfBoundsException(sprintf('Property %s::$%s does not exist.', self::class, $name));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Adapter;

use ReflectionUnionType as CoreReflectionUnionType;
use PHPStan\BetterReflection\Reflection\ReflectionType as BetterReflectionType;
use PHPStan\BetterReflection\Reflection\ReflectionUnionType as BetterReflectionUnionType;
use function array_map;
use function assert;
/** @psalm-immutable */
final class ReflectionUnionType extends CoreReflectionUnionType
{
    /**
     * @var BetterReflectionUnionType
     */
    private $betterReflectionType;
    public function __construct(BetterReflectionUnionType $betterReflectionType)
    {
        $this->betterReflectionType = $betterReflectionType;
    }
    /** @return non-empty-list<ReflectionNamedType|ReflectionIntersectionType> */
    public function getTypes() : array
    {
        return array_map(static function (BetterReflectionType $type) {
            $adapterType = \PHPStan\BetterReflection\Reflection\Adapter\ReflectionType::fromType($type);
            assert($adapterType instanceof \PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType || $adapterType instanceof \PHPStan\BetterReflection\Reflection\Adapter\ReflectionIntersectionType);
            return $adapterType;
        }, $this->betterReflectionType->getTypes());
    }
    /** @return non-empty-string */
    public function __toString() : string
    {
        return $this->betterReflectionType->__toString();
    }
    public function allowsNull() : bool
    {
        return $this->betterReflectionType->allowsNull();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection;

use BackedEnum;
use PhpParser\Node;
use PhpParser\Node\Stmt\Class_ as ClassNode;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Enum_ as EnumNode;
use PhpParser\Node\Stmt\Interface_ as InterfaceNode;
use PhpParser\Node\Stmt\Trait_ as TraitNode;
use PhpParser\Node\Stmt\TraitUse;
use ReflectionClass as CoreReflectionClass;
use ReflectionException;
use ReflectionMethod as CoreReflectionMethod;
use PHPStan\BetterReflection\BetterReflection;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass as ReflectionClassAdapter;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClassConstant as ReflectionClassConstantAdapter;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod as ReflectionMethodAdapter;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty as ReflectionPropertyAdapter;
use PHPStan\BetterReflection\Reflection\Annotation\AnnotationHelper;
use PHPStan\BetterReflection\Reflection\Attribute\ReflectionAttributeHelper;
use PHPStan\BetterReflection\Reflection\Exception\CircularReference;
use PHPStan\BetterReflection\Reflection\Exception\ClassDoesNotExist;
use PHPStan\BetterReflection\Reflection\Exception\NoObjectProvided;
use PHPStan\BetterReflection\Reflection\Exception\NotAClassReflection;
use PHPStan\BetterReflection\Reflection\Exception\NotAnInterfaceReflection;
use PHPStan\BetterReflection\Reflection\Exception\NotAnObject;
use PHPStan\BetterReflection\Reflection\Exception\ObjectNotInstanceOfClass;
use PHPStan\BetterReflection\Reflection\Exception\PropertyDoesNotExist;
use PHPStan\BetterReflection\Reflection\StringCast\ReflectionClassStringCast;
use PHPStan\BetterReflection\Reflection\Support\AlreadyVisitedClasses;
use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Located\InternalLocatedSource;
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
use PHPStan\BetterReflection\Util\CalculateReflectionColumn;
use PHPStan\BetterReflection\Util\GetLastDocComment;
use Stringable;
use Traversable;
use UnitEnum;
use function array_filter;
use function array_key_exists;
use function array_keys;
use function array_map;
use function array_merge;
use function array_reverse;
use function array_slice;
use function array_values;
use function assert;
use function end;
use function in_array;
use function is_int;
use function is_string;
use function ltrim;
use function sha1;
use function sprintf;
use function strtolower;
/** @psalm-immutable */
class ReflectionClass implements \PHPStan\BetterReflection\Reflection\Reflection
{
    public const ANONYMOUS_CLASS_NAME_PREFIX = 'class@anonymous';
    public const ANONYMOUS_CLASS_NAME_PREFIX_REGEXP = '~^(?:class|[\\w\\\\]+)@anonymous~';
    private const ANONYMOUS_CLASS_NAME_SUFFIX = '@anonymous';
    /** @var class-string|trait-string|null */
    private $name;
    /** @var non-empty-string|null */
    private $shortName;
    /**
     * @var bool
     */
    private $isInterface;
    /**
     * @var bool
     */
    private $isTrait;
    /**
     * @var bool
     */
    private $isEnum;
    /**
     * @var bool
     */
    private $isBackedEnum;
    /** @var int-mask-of<ReflectionClassAdapter::IS_*> */
    private $modifiers;
    /** @var non-empty-string|null */
    private $docComment;
    /** @var list<ReflectionAttribute> */
    private $attributes;
    /** @var positive-int */
    private $startLine;
    /** @var positive-int */
    private $endLine;
    /** @var positive-int */
    private $startColumn;
    /** @var positive-int */
    private $endColumn;
    /** @var class-string|null */
    private $parentClassName;
    /** @var list<class-string> */
    private $implementsClassNames;
    /** @var list<trait-string> */
    private $traitClassNames;
    /** @var array<non-empty-string, ReflectionClassConstant> */
    private $immediateConstants;
    /** @var array<non-empty-string, ReflectionProperty> */
    private $immediateProperties;
    /** @var array<non-empty-string, ReflectionMethod> */
    private $immediateMethods;
    /** @var array{aliases: array<non-empty-string, non-empty-string>, modifiers: array<non-empty-string, int-mask-of<ReflectionMethodAdapter::IS_*>>, precedences: array<non-empty-string, non-empty-string>} */
    private $traitsData;
    /**
     * @var array<non-empty-string, ReflectionClassConstant>|null
     * @psalm-allow-private-mutation
     */
    private $cachedConstants = null;
    /**
     * @var array<non-empty-string, ReflectionProperty>|null
     * @psalm-allow-private-mutation
     */
    private $cachedProperties = null;
    /** @var array<class-string, ReflectionClass>|null */
    private $cachedInterfaces = null;
    /** @var list<class-string>|null */
    private $cachedInterfaceNames = null;
    /** @var list<ReflectionClass>|null */
    private $cachedTraits = null;
    /**
     * @var \PHPStan\BetterReflection\Reflection\ReflectionMethod|null
     */
    private $cachedConstructor = null;
    /**
     * @var string|null
     */
    private $cachedName = null;
    /**
     * @psalm-allow-private-mutation
     * @var array<lowercase-string, ReflectionMethod>|null
     */
    private $cachedMethods = null;
    /**
     * @var list<ReflectionClass>|null
     * @psalm-allow-private-mutation
     */
    private $cachedParentClasses = null;
    /**
     * @var \PHPStan\BetterReflection\Reflector\Reflector
     */
    private $reflector;
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\Located\LocatedSource
     */
    private $locatedSource;
    /**
     * @var string|null
     */
    private $namespace = null;
    /** @internal
     * @param ClassNode|InterfaceNode|TraitNode|EnumNode $node */
    protected function __construct(Reflector $reflector, $node, LocatedSource $locatedSource, ?string $namespace = null)
    {
        $this->reflector = $reflector;
        $this->locatedSource = $locatedSource;
        $this->namespace = $namespace;
        $this->name = null;
        $this->shortName = null;
        if ($node->name instanceof Node\Identifier) {
            $namespacedName = $node->namespacedName;
            if ($namespacedName === null) {
                /** @psalm-var class-string|trait-string */
                $name = $node->name->name;
            } else {
                /** @psalm-var class-string|trait-string */
                $name = $namespacedName->toString();
            }
            $this->name = $name;
            $this->shortName = $node->name->name;
        }
        $this->isInterface = $node instanceof InterfaceNode;
        $this->isTrait = $node instanceof TraitNode;
        $this->isEnum = $node instanceof EnumNode;
        $this->isBackedEnum = $node instanceof EnumNode && $node->scalarType !== null;
        $this->modifiers = $this->computeModifiers($node);
        $this->docComment = GetLastDocComment::forNode($node);
        $this->attributes = ReflectionAttributeHelper::createAttributes($reflector, $this, $node->attrGroups);
        $startLine = $node->getStartLine();
        assert($startLine > 0);
        $endLine = $node->getEndLine();
        assert($endLine > 0);
        $this->startLine = $startLine;
        $this->endLine = $endLine;
        $this->startColumn = CalculateReflectionColumn::getStartColumn($locatedSource->getSource(), $node);
        $this->endColumn = CalculateReflectionColumn::getEndColumn($locatedSource->getSource(), $node);
        /** @var class-string|null $parentClassName */
        $parentClassName = $node instanceof ClassNode ? ($nodeExtends = $node->extends) ? $nodeExtends->toString() : null : null;
        $this->parentClassName = $parentClassName;
        // @infection-ignore-all UnwrapArrayMap: It works without array_map() as well but this is less magical
        /** @var list<class-string> $implementsClassNames */
        $implementsClassNames = array_map(static function (Node\Name $name) : string {
            return $name->toString();
        }, $node instanceof TraitNode ? [] : ($node instanceof InterfaceNode ? $node->extends : $node->implements));
        $this->implementsClassNames = $implementsClassNames;
        /** @var list<trait-string> $traitClassNames */
        $traitClassNames = array_merge([], ...array_map(
            // @infection-ignore-all UnwrapArrayMap: It works without array_map() as well but this is less magical
            static function (TraitUse $traitUse) : array {
                return array_map(static function (Node\Name $traitName) : string {
                    return $traitName->toString();
                }, $traitUse->traits);
            },
            $node->getTraitUses()
        ));
        $this->traitClassNames = $traitClassNames;
        $this->immediateConstants = $this->createImmediateConstants($node, $reflector);
        $this->immediateProperties = $this->createImmediateProperties($node, $reflector);
        $this->immediateMethods = $this->createImmediateMethods($node, $reflector);
        $this->traitsData = $this->computeTraitsData($node);
    }
    /** @return non-empty-string */
    public function __toString() : string
    {
        return ReflectionClassStringCast::toString($this);
    }
    /**
     * Create a ReflectionClass by name, using default reflectors etc.
     *
     * @deprecated Use Reflector instead.
     *
     * @throws IdentifierNotFound
     */
    public static function createFromName(string $className) : self
    {
        return (new BetterReflection())->reflector()->reflectClass($className);
    }
    /**
     * Create a ReflectionClass from an instance, using default reflectors etc.
     *
     * This is simply a helper method that calls ReflectionObject::createFromInstance().
     *
     * @see ReflectionObject::createFromInstance
     *
     * @throws IdentifierNotFound
     * @throws ReflectionException
     */
    public static function createFromInstance(object $instance) : self
    {
        return \PHPStan\BetterReflection\Reflection\ReflectionObject::createFromInstance($instance);
    }
    /**
     * Create from a Class Node.
     *
     * @internal
     *
     * @param ClassNode|InterfaceNode|TraitNode|EnumNode $node      Node has to be processed by the PhpParser\NodeVisitor\NameResolver
     * @param string|null                                $namespace optional - if omitted, we assume it is global namespaced class
     */
    public static function createFromNode(Reflector $reflector, $node, LocatedSource $locatedSource, ?string $namespace = null) : self
    {
        return new self($reflector, $node, $locatedSource, $namespace);
    }
    /**
     * Get the "short" name of the class (e.g. for A\B\Foo, this will return
     * "Foo").
     *
     * @return non-empty-string
     */
    public function getShortName() : string
    {
        if ($this->shortName !== null) {
            return $this->shortName;
        }
        $fileName = $this->getFileName();
        if ($fileName === null) {
            $fileName = sha1($this->locatedSource->getSource());
        }
        $anonymousClassName = sprintf('%s%s%c%s(%d)', $this->getAnonymousClassNamePrefix(), self::ANONYMOUS_CLASS_NAME_SUFFIX, "\x00", $fileName, $this->getStartLine());
        assert($anonymousClassName !== '');
        return $anonymousClassName;
    }
    /**
     * PHP creates the name of the anonymous class based on first parent
     * or implemented interface.
     */
    private function getAnonymousClassNamePrefix() : string
    {
        if ($this->parentClassName !== null) {
            return $this->parentClassName;
        }
        if ($this->implementsClassNames !== []) {
            return $this->implementsClassNames[0];
        }
        return 'class';
    }
    /**
     * Get the "full" name of the class (e.g. for A\B\Foo, this will return
     * "A\B\Foo").
     *
     * @return class-string|trait-string
     */
    public function getName() : string
    {
        if ($this->cachedName !== null) {
            return $this->cachedName;
        }
        if (!$this->inNamespace()) {
            /** @psalm-var class-string|trait-string */
            return $this->cachedName = $this->getShortName();
        }
        assert($this->name !== null);
        return $this->cachedName = $this->name;
    }
    /**
     * Get the "namespace" name of the class (e.g. for A\B\Foo, this will
     * return "A\B").
     */
    public function getNamespaceName() : ?string
    {
        return $this->namespace;
    }
    /**
     * Decide if this class is part of a namespace. Returns false if the class
     * is in the global namespace or does not have a specified namespace.
     */
    public function inNamespace() : bool
    {
        return $this->namespace !== null;
    }
    /** @return non-empty-string|null */
    public function getExtensionName() : ?string
    {
        return $this->locatedSource->getExtensionName();
    }
    /** @return list<ReflectionMethod> */
    private function createMethodsFromTrait(\PHPStan\BetterReflection\Reflection\ReflectionMethod $method) : array
    {
        $methodModifiers = $method->getModifiers();
        $methodHash = $this->methodHash($method->getImplementingClass()->getName(), $method->getName());
        if (array_key_exists($methodHash, $this->traitsData['modifiers'])) {
            $methodModifiersWithoutVisibility = $methodModifiers;
            if (($methodModifiers & CoreReflectionMethod::IS_PUBLIC) === CoreReflectionMethod::IS_PUBLIC) {
                $methodModifiersWithoutVisibility -= CoreReflectionMethod::IS_PUBLIC;
            }
            if (($methodModifiers & CoreReflectionMethod::IS_PROTECTED) === CoreReflectionMethod::IS_PROTECTED) {
                $methodModifiersWithoutVisibility -= CoreReflectionMethod::IS_PROTECTED;
            }
            if (($methodModifiers & CoreReflectionMethod::IS_PRIVATE) === CoreReflectionMethod::IS_PRIVATE) {
                $methodModifiersWithoutVisibility -= CoreReflectionMethod::IS_PRIVATE;
            }
            $newModifierAst = $this->traitsData['modifiers'][$methodHash];
            $newModifier = 0;
            if (($newModifierAst & ClassNode::MODIFIER_PUBLIC) === ClassNode::MODIFIER_PUBLIC) {
                $newModifier = CoreReflectionMethod::IS_PUBLIC;
            }
            if (($newModifierAst & ClassNode::MODIFIER_PROTECTED) === ClassNode::MODIFIER_PROTECTED) {
                $newModifier = CoreReflectionMethod::IS_PROTECTED;
            }
            if (($newModifierAst & ClassNode::MODIFIER_PRIVATE) === ClassNode::MODIFIER_PRIVATE) {
                $newModifier = CoreReflectionMethod::IS_PRIVATE;
            }
            $methodModifiers = $methodModifiersWithoutVisibility | $newModifier;
        }
        $createMethod = function (?string $aliasMethodName) use($method, $methodModifiers) : \PHPStan\BetterReflection\Reflection\ReflectionMethod {
            assert($aliasMethodName === null || $aliasMethodName !== '');
            /** @phpstan-ignore-next-line */
            return $method->withImplementingClass($this, $aliasMethodName, $methodModifiers);
        };
        $methods = [];
        if (!array_key_exists($methodHash, $this->traitsData['precedences'])) {
            $methods[] = $createMethod($method->getAliasName());
        }
        foreach ($this->traitsData['aliases'] as $aliasMethodName => $traitAliasDefinition) {
            if ($methodHash !== $traitAliasDefinition) {
                continue;
            }
            $methods[] = $createMethod($aliasMethodName);
        }
        return $methods;
    }
    /**
     * Construct a flat list of all methods in this precise order from:
     *  - current class
     *  - parent class
     *  - traits used in parent class
     *  - interfaces implemented in parent class
     *  - traits used in current class
     *  - interfaces implemented in current class
     *
     * Methods are not merged via their name as array index, since internal PHP method
     * sorting does not follow `\array_merge()` semantics.
     *
     * @return array<lowercase-string, ReflectionMethod> indexed by method name
     */
    private function getMethodsIndexedByLowercasedName(AlreadyVisitedClasses $alreadyVisitedClasses) : array
    {
        if ($this->cachedMethods !== null) {
            return $this->cachedMethods;
        }
        $alreadyVisitedClasses->push($this->getName());
        $immediateMethods = $this->getImmediateMethods();
        $className = $this->getName();
        $methods = \array_combine(array_map(static function (\PHPStan\BetterReflection\Reflection\ReflectionMethod $method) : string {
            return strtolower($method->getName());
        }, $immediateMethods), $immediateMethods);
        $parentClass = $this->getParentClass();
        if ($parentClass !== null) {
            foreach ($parentClass->getMethodsIndexedByLowercasedName($alreadyVisitedClasses) as $lowercasedMethodName => $method) {
                if (array_key_exists($lowercasedMethodName, $methods)) {
                    continue;
                }
                $methods[$lowercasedMethodName] = $method->withCurrentClass($this);
            }
        }
        foreach ($this->getTraits() as $trait) {
            $alreadyVisitedClassesCopy = clone $alreadyVisitedClasses;
            foreach ($trait->getMethodsIndexedByLowercasedName($alreadyVisitedClassesCopy) as $method) {
                foreach ($this->createMethodsFromTrait($method) as $traitMethod) {
                    $lowercasedMethodName = strtolower($traitMethod->getName());
                    if (!array_key_exists($lowercasedMethodName, $methods)) {
                        $methods[$lowercasedMethodName] = $traitMethod;
                        continue;
                    }
                    if ($traitMethod->isAbstract()) {
                        continue;
                    }
                    // Non-abstract trait method can overwrite existing method:
                    // - when existing method comes from parent class
                    // - when existing method comes from trait and is abstract
                    $existingMethod = $methods[$lowercasedMethodName];
                    if ($existingMethod->getDeclaringClass()->getName() === $className && !($existingMethod->isAbstract() && $existingMethod->getDeclaringClass()->isTrait())) {
                        continue;
                    }
                    $methods[$lowercasedMethodName] = $traitMethod;
                }
            }
        }
        foreach ($this->getImmediateInterfaces() as $interface) {
            $alreadyVisitedClassesCopy = clone $alreadyVisitedClasses;
            foreach ($interface->getMethodsIndexedByLowercasedName($alreadyVisitedClassesCopy) as $lowercasedMethodName => $method) {
                if (array_key_exists($lowercasedMethodName, $methods)) {
                    continue;
                }
                $methods[$lowercasedMethodName] = $method;
            }
        }
        $this->cachedMethods = $methods;
        return $this->cachedMethods;
    }
    /**
     * Fetch an array of all methods for this class.
     *
     * Filter the results to include only methods with certain attributes. Defaults
     * to no filtering.
     * Any combination of \ReflectionMethod::IS_STATIC,
     * \ReflectionMethod::IS_PUBLIC,
     * \ReflectionMethod::IS_PROTECTED,
     * \ReflectionMethod::IS_PRIVATE,
     * \ReflectionMethod::IS_ABSTRACT,
     * \ReflectionMethod::IS_FINAL.
     * For example if $filter = \ReflectionMethod::IS_PUBLIC | \ReflectionMethod::IS_FINAL
     * the only the final public methods will be returned
     *
     * @param int-mask-of<CoreReflectionMethod::IS_*> $filter
     *
     * @return array<non-empty-string, ReflectionMethod>
     */
    public function getMethods(int $filter = 0) : array
    {
        $methods = $this->getMethodsIndexedByLowercasedName(AlreadyVisitedClasses::createEmpty());
        if ($filter !== 0) {
            $methods = array_filter($methods, static function (\PHPStan\BetterReflection\Reflection\ReflectionMethod $method) use($filter) : bool {
                return (bool) ($filter & $method->getModifiers());
            });
        }
        return \array_combine(array_map(static function (\PHPStan\BetterReflection\Reflection\ReflectionMethod $method) : string {
            return $method->getName();
        }, $methods), $methods);
    }
    /**
     * Get only the methods that this class implements (i.e. do not search
     * up parent classes etc.)
     *
     * @see ReflectionClass::getMethods for the usage of $filter
     *
     * @param int-mask-of<CoreReflectionMethod::IS_*> $filter
     *
     * @return array<non-empty-string, ReflectionMethod>
     */
    public function getImmediateMethods(int $filter = 0) : array
    {
        if ($filter === 0) {
            return $this->immediateMethods;
        }
        return array_filter($this->immediateMethods, static function (\PHPStan\BetterReflection\Reflection\ReflectionMethod $method) use($filter) : bool {
            return (bool) ($filter & $method->getModifiers());
        });
    }
    /** @return array<non-empty-string, ReflectionMethod>
     * @param ClassNode|InterfaceNode|TraitNode|EnumNode $node */
    private function createImmediateMethods($node, Reflector $reflector) : array
    {
        $methods = [];
        foreach ($node->getMethods() as $methodNode) {
            $method = \PHPStan\BetterReflection\Reflection\ReflectionMethod::createFromNode($reflector, $methodNode, $this->locatedSource, $this->getNamespaceName(), $this, $this, $this);
            if (array_key_exists($method->getName(), $methods)) {
                continue;
            }
            $methods[$method->getName()] = $method;
        }
        if ($node instanceof EnumNode) {
            $methods = $this->addEnumMethods($node, $methods);
        }
        return $methods;
    }
    /**
     * @param array<non-empty-string, ReflectionMethod> $methods
     *
     * @return array<non-empty-string, ReflectionMethod>
     */
    private function addEnumMethods(EnumNode $node, array $methods) : array
    {
        $internalLocatedSource = new InternalLocatedSource('', $this->getName(), 'Core', $this->getFileName());
        $createMethod = function (string $name, array $params, $returnType) use($internalLocatedSource) : \PHPStan\BetterReflection\Reflection\ReflectionMethod {
            return \PHPStan\BetterReflection\Reflection\ReflectionMethod::createFromNode($this->reflector, new ClassMethod(new Node\Identifier($name), ['flags' => ClassNode::MODIFIER_PUBLIC | ClassNode::MODIFIER_STATIC, 'params' => $params, 'returnType' => $returnType]), $internalLocatedSource, $this->getNamespaceName(), $this, $this, $this);
        };
        $methods['cases'] = $createMethod('cases', [], new Node\Identifier('array'));
        if ($node->scalarType === null) {
            return $methods;
        }
        $valueParameter = new Node\Param(new Node\Expr\Variable('value'), null, new Node\UnionType([new Node\Identifier('string'), new Node\Identifier('int')]));
        $methods['from'] = $createMethod('from', [$valueParameter], new Node\Identifier('static'));
        $methods['tryFrom'] = $createMethod('tryFrom', [$valueParameter], new Node\NullableType(new Node\Identifier('static')));
        return $methods;
    }
    /**
     * Get a single method with the name $methodName.
     *
     * @param non-empty-string $methodName
     */
    public function getMethod(string $methodName) : ?\PHPStan\BetterReflection\Reflection\ReflectionMethod
    {
        $lowercaseMethodName = strtolower($methodName);
        $methods = $this->getMethodsIndexedByLowercasedName(AlreadyVisitedClasses::createEmpty());
        return $methods[$lowercaseMethodName] ?? null;
    }
    /**
     * Does the class have the specified method?
     *
     * @param non-empty-string $methodName
     */
    public function hasMethod(string $methodName) : bool
    {
        return $this->getMethod($methodName) !== null;
    }
    /**
     * Get an associative array of only the constants for this specific class (i.e. do not search
     * up parent classes etc.), with keys as constant names and values as {@see ReflectionClassConstant} objects.
     *
     * @param int-mask-of<ReflectionClassConstantAdapter::IS_*> $filter
     *
     * @return array<non-empty-string, ReflectionClassConstant> indexed by name
     */
    public function getImmediateConstants(int $filter = 0) : array
    {
        if ($filter === 0) {
            return $this->immediateConstants;
        }
        return array_filter($this->immediateConstants, static function (\PHPStan\BetterReflection\Reflection\ReflectionClassConstant $constant) use($filter) : bool {
            return (bool) ($filter & $constant->getModifiers());
        });
    }
    /**
     * Does this class have the specified constant?
     *
     * @param non-empty-string $name
     */
    public function hasConstant(string $name) : bool
    {
        return $this->getConstant($name) !== null;
    }
    /**
     * Get the reflection object of the specified class constant.
     *
     * Returns null if not specified.
     *
     * @param non-empty-string $name
     */
    public function getConstant(string $name) : ?\PHPStan\BetterReflection\Reflection\ReflectionClassConstant
    {
        return $this->getConstants()[$name] ?? null;
    }
    /** @return array<non-empty-string, ReflectionClassConstant>
     * @param ClassNode|InterfaceNode|TraitNode|EnumNode $node */
    private function createImmediateConstants($node, Reflector $reflector) : array
    {
        $constants = [];
        foreach ($node->getConstants() as $constantsNode) {
            foreach (array_keys($constantsNode->consts) as $constantPositionInNode) {
                assert(is_int($constantPositionInNode));
                $constant = \PHPStan\BetterReflection\Reflection\ReflectionClassConstant::createFromNode($reflector, $constantsNode, $constantPositionInNode, $this, $this);
                $constants[$constant->getName()] = $constant;
            }
        }
        return $constants;
    }
    /**
     * Get an associative array of the defined constants in this class,
     * with keys as constant names and values as {@see ReflectionClassConstant} objects.
     *
     * @param int-mask-of<ReflectionClassConstantAdapter::IS_*> $filter
     *
     * @return array<non-empty-string, ReflectionClassConstant> indexed by name
     */
    public function getConstants(int $filter = 0) : array
    {
        $constants = $this->getConstantsConsideringAlreadyVisitedClasses(AlreadyVisitedClasses::createEmpty());
        if ($filter === 0) {
            return $constants;
        }
        return array_filter($constants, static function (\PHPStan\BetterReflection\Reflection\ReflectionClassConstant $constant) use($filter) : bool {
            return (bool) ($filter & $constant->getModifiers());
        });
    }
    /** @return array<non-empty-string, ReflectionClassConstant> indexed by name */
    private function getConstantsConsideringAlreadyVisitedClasses(AlreadyVisitedClasses $alreadyVisitedClasses) : array
    {
        if ($this->cachedConstants !== null) {
            return $this->cachedConstants;
        }
        $alreadyVisitedClasses->push($this->getName());
        // Note: constants are not merged via their name as array index, since internal PHP constant
        //       sorting does not follow `\array_merge()` semantics
        $constants = $this->getImmediateConstants();
        $parentClass = $this->getParentClass();
        if ($parentClass !== null) {
            foreach ($parentClass->getConstantsConsideringAlreadyVisitedClasses($alreadyVisitedClasses) as $constantName => $constant) {
                if ($constant->isPrivate()) {
                    continue;
                }
                if (array_key_exists($constantName, $constants)) {
                    continue;
                }
                $constants[$constantName] = $constant;
            }
        }
        foreach ($this->getTraits() as $trait) {
            foreach ($trait->getConstantsConsideringAlreadyVisitedClasses($alreadyVisitedClasses) as $constantName => $constant) {
                if (array_key_exists($constantName, $constants)) {
                    continue;
                }
                $constants[$constantName] = $constant->withImplementingClass($this);
            }
        }
        foreach ($this->getImmediateInterfaces() as $interface) {
            $alreadyVisitedClassesCopy = clone $alreadyVisitedClasses;
            foreach ($interface->getConstantsConsideringAlreadyVisitedClasses($alreadyVisitedClassesCopy) as $constantName => $constant) {
                if (array_key_exists($constantName, $constants)) {
                    continue;
                }
                $constants[$constantName] = $constant;
            }
        }
        $this->cachedConstants = $constants;
        return $this->cachedConstants;
    }
    /**
     * Get the constructor method for this class.
     */
    public function getConstructor() : ?\PHPStan\BetterReflection\Reflection\ReflectionMethod
    {
        if ($this->cachedConstructor !== null) {
            return $this->cachedConstructor;
        }
        $constructors = array_values(array_filter($this->getMethods(), static function (\PHPStan\BetterReflection\Reflection\ReflectionMethod $method) : bool {
            return $method->isConstructor();
        }));
        return $this->cachedConstructor = $constructors[0] ?? null;
    }
    /**
     * Get only the properties for this specific class (i.e. do not search
     * up parent classes etc.)
     *
     * @see ReflectionClass::getProperties() for the usage of filter
     *
     * @param int-mask-of<ReflectionPropertyAdapter::IS_*> $filter
     *
     * @return array<non-empty-string, ReflectionProperty>
     */
    public function getImmediateProperties(int $filter = 0) : array
    {
        if ($filter === 0) {
            return $this->immediateProperties;
        }
        return array_filter($this->immediateProperties, static function (\PHPStan\BetterReflection\Reflection\ReflectionProperty $property) use($filter) : bool {
            return (bool) ($filter & $property->getModifiers());
        });
    }
    /** @return array<non-empty-string, ReflectionProperty>
     * @param ClassNode|InterfaceNode|TraitNode|EnumNode $node */
    private function createImmediateProperties($node, Reflector $reflector) : array
    {
        $properties = [];
        foreach ($node->getProperties() as $propertiesNode) {
            foreach ($propertiesNode->props as $propertyPropertyNode) {
                $property = \PHPStan\BetterReflection\Reflection\ReflectionProperty::createFromNode($reflector, $propertiesNode, $propertyPropertyNode, $this, $this);
                $properties[$property->getName()] = $property;
            }
        }
        foreach ($node->getMethods() as $methodNode) {
            if ($methodNode->name->toLowerString() !== '__construct') {
                continue;
            }
            foreach ($methodNode->params as $parameterNode) {
                if ($parameterNode->flags === 0) {
                    // No flags, no promotion
                    continue;
                }
                $parameterNameNode = $parameterNode->var;
                assert($parameterNameNode instanceof Node\Expr\Variable);
                assert(is_string($parameterNameNode->name));
                $propertyNode = new Node\Stmt\Property($parameterNode->flags, [new Node\Stmt\PropertyProperty($parameterNameNode->name)], $parameterNode->getAttributes(), $parameterNode->type, $parameterNode->attrGroups);
                $property = \PHPStan\BetterReflection\Reflection\ReflectionProperty::createFromNode($reflector, $propertyNode, $propertyNode->props[0], $this, $this, \true);
                $properties[$property->getName()] = $property;
            }
        }
        if ($node instanceof EnumNode || $node instanceof InterfaceNode) {
            $properties = $this->addEnumProperties($properties, $node, $reflector);
        }
        return $properties;
    }
    /**
     * @param array<non-empty-string, ReflectionProperty> $properties
     *
     * @return array<non-empty-string, ReflectionProperty>
     * @param EnumNode|InterfaceNode $node
     */
    private function addEnumProperties(array $properties, $node, Reflector $reflector) : array
    {
        $createProperty = function (string $name, $type) use($reflector) : \PHPStan\BetterReflection\Reflection\ReflectionProperty {
            $propertyNode = new Node\Stmt\Property(ClassNode::MODIFIER_PUBLIC | ClassNode::MODIFIER_READONLY, [new Node\Stmt\PropertyProperty($name)], [], $type);
            return \PHPStan\BetterReflection\Reflection\ReflectionProperty::createFromNode($reflector, $propertyNode, $propertyNode->props[0], $this, $this);
        };
        if ($node instanceof InterfaceNode) {
            $interfaceName = $this->getName();
            if ($interfaceName === 'UnitEnum') {
                $properties['name'] = $createProperty('name', 'string');
            }
            if ($interfaceName === 'BackedEnum') {
                $properties['value'] = $createProperty('value', new Node\UnionType([new Node\Identifier('int'), new Node\Identifier('string')]));
            }
        } else {
            $properties['name'] = $createProperty('name', 'string');
            if ($node->scalarType !== null) {
                $properties['value'] = $createProperty('value', $node->scalarType);
            }
        }
        return $properties;
    }
    /**
     * Get the properties for this class.
     *
     * Filter the results to include only properties with certain attributes. Defaults
     * to no filtering.
     * Any combination of \ReflectionProperty::IS_STATIC,
     * \ReflectionProperty::IS_PUBLIC,
     * \ReflectionProperty::IS_PROTECTED,
     * \ReflectionProperty::IS_PRIVATE.
     * For example if $filter = \ReflectionProperty::IS_STATIC | \ReflectionProperty::IS_PUBLIC
     * only the static public properties will be returned
     *
     * @param int-mask-of<ReflectionPropertyAdapter::IS_*> $filter
     *
     * @return array<non-empty-string, ReflectionProperty>
     */
    public function getProperties(int $filter = 0) : array
    {
        $properties = $this->getPropertiesConsideringAlreadyVisitedClasses(AlreadyVisitedClasses::createEmpty());
        if ($filter === 0) {
            return $properties;
        }
        return array_filter($properties, static function (\PHPStan\BetterReflection\Reflection\ReflectionProperty $property) use($filter) : bool {
            return (bool) ($filter & $property->getModifiers());
        });
    }
    /** @return array<non-empty-string, ReflectionProperty> */
    private function getPropertiesConsideringAlreadyVisitedClasses(AlreadyVisitedClasses $alreadyVisitedClasses) : array
    {
        if ($this->cachedProperties !== null) {
            return $this->cachedProperties;
        }
        $alreadyVisitedClasses->push($this->getName());
        $immediateProperties = $this->getImmediateProperties();
        // Merging together properties from parent class, interfaces, traits, current class (in this precise order)
        $properties = array_merge(array_filter((($getParentClass = $this->getParentClass()) ? $getParentClass->getPropertiesConsideringAlreadyVisitedClasses($alreadyVisitedClasses) : null) ?? [], static function (\PHPStan\BetterReflection\Reflection\ReflectionProperty $property) {
            return !$property->isPrivate();
        }), ...array_map(static function (\PHPStan\BetterReflection\Reflection\ReflectionClass $ancestor) use($alreadyVisitedClasses) : array {
            return $ancestor->getPropertiesConsideringAlreadyVisitedClasses(clone $alreadyVisitedClasses);
        }, array_values($this->getImmediateInterfaces())));
        foreach ($this->getTraits() as $trait) {
            foreach ($trait->getPropertiesConsideringAlreadyVisitedClasses($alreadyVisitedClasses) as $traitProperty) {
                $traitPropertyName = $traitProperty->getName();
                if (array_key_exists($traitPropertyName, $properties) || array_key_exists($traitPropertyName, $immediateProperties)) {
                    continue;
                }
                $properties[$traitPropertyName] = $traitProperty->withImplementingClass($this);
            }
        }
        // Merge immediate properties last to get the required order
        $properties = array_merge($properties, $immediateProperties);
        $this->cachedProperties = $properties;
        return $this->cachedProperties;
    }
    /**
     * Get the property called $name.
     *
     * Returns null if property does not exist.
     *
     * @param non-empty-string $name
     */
    public function getProperty(string $name) : ?\PHPStan\BetterReflection\Reflection\ReflectionProperty
    {
        $properties = $this->getProperties();
        if (!isset($properties[$name])) {
            return null;
        }
        return $properties[$name];
    }
    /**
     * Does this class have the specified property?
     *
     * @param non-empty-string $name
     */
    public function hasProperty(string $name) : bool
    {
        return $this->getProperty($name) !== null;
    }
    /** @return array<non-empty-string, mixed> */
    public function getDefaultProperties() : array
    {
        return array_map(static function (\PHPStan\BetterReflection\Reflection\ReflectionProperty $property) {
            return $property->getDefaultValue();
        }, $this->getProperties());
    }
    /** @return non-empty-string|null */
    public function getFileName() : ?string
    {
        return $this->locatedSource->getFileName();
    }
    public function getLocatedSource() : LocatedSource
    {
        return $this->locatedSource;
    }
    /**
     * Get the line number that this class starts on.
     *
     * @return positive-int
     */
    public function getStartLine() : int
    {
        return $this->startLine;
    }
    /**
     * Get the line number that this class ends on.
     *
     * @return positive-int
     */
    public function getEndLine() : int
    {
        return $this->endLine;
    }
    /** @return positive-int */
    public function getStartColumn() : int
    {
        return $this->startColumn;
    }
    /** @return positive-int */
    public function getEndColumn() : int
    {
        return $this->endColumn;
    }
    /**
     * Get the parent class, if it is defined. If this class does not have a
     * specified parent class, this will throw an exception.
     *
     * @throws NotAClassReflection
     */
    public function getParentClass() : ?\PHPStan\BetterReflection\Reflection\ReflectionClass
    {
        $parentClass = $this->getParentClasses()[0] ?? null;
        if ($parentClass === null) {
            return null;
        }
        if ($parentClass->isInterface() || $parentClass->isTrait()) {
            throw NotAClassReflection::fromReflectionClass($parentClass);
        }
        return $parentClass;
    }
    /**
     * Gets the parent class names.
     *
     * @return list<class-string> A numerical array with parent class names as the values.
     */
    public function getParentClassNames() : array
    {
        return array_map(static function (self $parentClass) : string {
            return $parentClass->getName();
        }, $this->getParentClasses());
    }
    /** @return list<ReflectionClass> */
    private function getParentClasses() : array
    {
        if ($this->cachedParentClasses === null) {
            $parentClasses = [];
            $parentClassName = $this->parentClassName;
            while ($parentClassName !== null) {
                try {
                    $parentClass = $this->reflector->reflectClass($parentClassName);
                } catch (IdentifierNotFound $exception) {
                    break;
                }
                if ($this->name === $parentClassName || array_key_exists($parentClassName, $parentClasses)) {
                    throw CircularReference::fromClassName($parentClassName);
                }
                $parentClasses[$parentClassName] = $parentClass;
                $parentClassName = $parentClass->parentClassName;
            }
            $this->cachedParentClasses = array_values($parentClasses);
        }
        return $this->cachedParentClasses;
    }
    /** @return non-empty-string|null */
    public function getDocComment() : ?string
    {
        return $this->docComment;
    }
    public function isAnonymous() : bool
    {
        return $this->name === null;
    }
    /**
     * Is this an internal class?
     */
    public function isInternal() : bool
    {
        return $this->locatedSource->isInternal();
    }
    /**
     * Is this a user-defined function (will always return the opposite of
     * whatever isInternal returns).
     */
    public function isUserDefined() : bool
    {
        return !$this->isInternal();
    }
    public function isDeprecated() : bool
    {
        return AnnotationHelper::isDeprecated($this->docComment);
    }
    /**
     * Is this class an abstract class.
     */
    public function isAbstract() : bool
    {
        return ($this->modifiers & CoreReflectionClass::IS_EXPLICIT_ABSTRACT) === CoreReflectionClass::IS_EXPLICIT_ABSTRACT;
    }
    /**
     * Is this class a final class.
     */
    public function isFinal() : bool
    {
        if ($this->isEnum) {
            return \true;
        }
        return ($this->modifiers & CoreReflectionClass::IS_FINAL) === CoreReflectionClass::IS_FINAL;
    }
    public function isReadOnly() : bool
    {
        return ($this->modifiers & ReflectionClassAdapter::IS_READONLY) === ReflectionClassAdapter::IS_READONLY;
    }
    /**
     * Get the core-reflection-compatible modifier values.
     *
     * @return int-mask-of<ReflectionClassAdapter::IS_*>
     */
    public function getModifiers() : int
    {
        return $this->modifiers;
    }
    /** @return int-mask-of<ReflectionClassAdapter::IS_*>
     * @param ClassNode|InterfaceNode|TraitNode|EnumNode $node */
    private function computeModifiers($node) : int
    {
        if (!$node instanceof ClassNode) {
            return 0;
        }
        $modifiers = $node->isAbstract() ? CoreReflectionClass::IS_EXPLICIT_ABSTRACT : 0;
        $modifiers += $node->isFinal() ? CoreReflectionClass::IS_FINAL : 0;
        $modifiers += $node->isReadonly() ? ReflectionClassAdapter::IS_READONLY : 0;
        return $modifiers;
    }
    /**
     * Is this reflection a trait?
     */
    public function isTrait() : bool
    {
        return $this->isTrait;
    }
    /**
     * Is this reflection an interface?
     */
    public function isInterface() : bool
    {
        return $this->isInterface;
    }
    /**
     * Get the traits used, if any are defined. If this class does not have any
     * defined traits, this will return an empty array.
     *
     * @return list<ReflectionClass>
     */
    public function getTraits() : array
    {
        if ($this->cachedTraits !== null) {
            return $this->cachedTraits;
        }
        $traits = [];
        foreach ($this->traitClassNames as $traitClassName) {
            try {
                $traits[] = $this->reflector->reflectClass($traitClassName);
            } catch (IdentifierNotFound $exception) {
                // pass
            }
        }
        return $this->cachedTraits = $traits;
    }
    /**
     * @param array<class-string, self> $interfaces
     *
     * @return array<class-string, self>
     */
    private function addStringableInterface(array $interfaces) : array
    {
        if (BetterReflection::$phpVersion < 80000) {
            return $interfaces;
        }
        /** @psalm-var class-string $stringableClassName */
        $stringableClassName = Stringable::class;
        if (array_key_exists($stringableClassName, $interfaces) || $this->isInterface && $this->getName() === $stringableClassName) {
            return $interfaces;
        }
        foreach (array_keys($this->immediateMethods) as $immediateMethodName) {
            if (strtolower($immediateMethodName) === '__tostring') {
                try {
                    $stringableInterfaceReflection = $this->reflector->reflectClass($stringableClassName);
                    $interfaces[$stringableClassName] = $stringableInterfaceReflection;
                } catch (IdentifierNotFound $exception) {
                    // Stringable interface does not exist on target PHP version
                }
                // @infection-ignore-all Break_: There's no difference between break and continue - break is just optimization
                break;
            }
        }
        return $interfaces;
    }
    /**
     * @param array<class-string, self> $interfaces
     *
     * @return array<class-string, self>
     *
     * @psalm-suppress MoreSpecificReturnType
     */
    private function addEnumInterfaces(array $interfaces) : array
    {
        assert($this->isEnum === \true);
        $interfaces[UnitEnum::class] = $this->reflector->reflectClass(UnitEnum::class);
        if ($this->isBackedEnum) {
            $interfaces[BackedEnum::class] = $this->reflector->reflectClass(BackedEnum::class);
        }
        /** @psalm-suppress LessSpecificReturnStatement */
        return $interfaces;
    }
    /**
     * Get the names of the traits used as an array of strings, if any are
     * defined. If this class does not have any defined traits, this will
     * return an empty array.
     *
     * @return list<trait-string>
     */
    public function getTraitNames() : array
    {
        return array_map(static function (\PHPStan\BetterReflection\Reflection\ReflectionClass $trait) : string {
            /** @psalm-var trait-string $traitName */
            $traitName = $trait->getName();
            return $traitName;
        }, $this->getTraits());
    }
    /**
     * Return a list of the aliases used when importing traits for this class.
     * The returned array is in key/value pair in this format:.
     *
     *   'aliasedMethodName' => 'ActualClass::actualMethod'
     *
     * @return array<non-empty-string, non-empty-string>
     *
     * @example
     * // When reflecting a class such as:
     * class Foo
     * {
     *     use MyTrait {
     *         myTraitMethod as myAliasedMethod;
     *     }
     * }
     * // This method would return
     * //   ['myAliasedMethod' => 'MyTrait::myTraitMethod']
     */
    public function getTraitAliases() : array
    {
        return $this->traitsData['aliases'];
    }
    /**
     * Returns data when importing traits for this class:
     *
     * 'aliases': List of the aliases used when importing traits. In format:
     *
     *   'aliasedMethodName' => 'ActualClass::actualMethod'
     *
     *   Example:
     *   // When reflecting a code such as:
     *
     *   use MyTrait {
     *       myTraitMethod as myAliasedMethod;
     *   }
     *
     *   // This method would return
     *   //   ['myAliasedMethod' => 'MyTrait::myTraitMethod']
     *
     * 'modifiers': Used modifiers when importing traits. In format:
     *
     *   'methodName' => 'modifier'
     *
     *   Example:
     *   // When reflecting a code such as:
     *
     *   use MyTrait {
     *       myTraitMethod as public;
     *   }
     *
     *   // This method would return
     *   //   ['myTraitMethod' => 1]
     *
     * 'precedences': Precedences used when importing traits. In format:
     *
     *   'Class::method' => 'Class::method'
     *
     *   Example:
     *   // When reflecting a code such as:
     *
     *   use MyTrait, MyTrait2 {
     *       MyTrait2::foo insteadof MyTrait1;
     *   }
     *
     *   // This method would return
     *   //   ['MyTrait1::foo' => 'MyTrait2::foo']
     *
     * @return array{aliases: array<non-empty-string, non-empty-string>, modifiers: array<non-empty-string, int-mask-of<ReflectionMethodAdapter::IS_*>>, precedences: array<non-empty-string, non-empty-string>}
     * @param ClassNode|InterfaceNode|TraitNode|EnumNode $node
     */
    private function computeTraitsData($node) : array
    {
        $traitsData = ['aliases' => [], 'modifiers' => [], 'precedences' => []];
        foreach ($node->getTraitUses() as $traitUsage) {
            $traitNames = $traitUsage->traits;
            $adaptations = $traitUsage->adaptations;
            foreach ($adaptations as $adaptation) {
                $usedTrait = $adaptation->trait;
                if ($usedTrait === null) {
                    $usedTrait = end($traitNames);
                }
                $methodHash = $this->methodHash($usedTrait->toString(), $adaptation->method->toString());
                if ($adaptation instanceof Node\Stmt\TraitUseAdaptation\Alias) {
                    if ($adaptation->newModifier) {
                        /** @var int-mask-of<ReflectionMethodAdapter::IS_*> $modifier */
                        $modifier = $adaptation->newModifier;
                        $traitsData['modifiers'][$methodHash] = $modifier;
                    }
                    if ($adaptation->newName) {
                        $adaptationName = $adaptation->newName->name;
                        assert($adaptationName !== '');
                        $traitsData['aliases'][$adaptationName] = $methodHash;
                        continue;
                    }
                }
                if (!$adaptation instanceof Node\Stmt\TraitUseAdaptation\Precedence || !$adaptation->insteadof) {
                    continue;
                }
                foreach ($adaptation->insteadof as $insteadof) {
                    $adaptationNameHash = $this->methodHash($insteadof->toString(), $adaptation->method->toString());
                    $traitsData['precedences'][$adaptationNameHash] = $methodHash;
                }
            }
        }
        return $traitsData;
    }
    /**
     * @return non-empty-string
     *
     * @psalm-pure
     */
    private function methodHash(string $className, string $methodName) : string
    {
        $hash = sprintf('%s::%s', $className, strtolower($methodName));
        assert($hash !== '');
        return $hash;
    }
    /**
     * Gets the interfaces.
     *
     * @link https://php.net/manual/en/reflectionclass.getinterfaces.php
     *
     * @return array<class-string, self> An associative array of interfaces, with keys as interface names and the array
     *                                        values as {@see ReflectionClass} objects.
     */
    public function getInterfaces() : array
    {
        if ($this->cachedInterfaces !== null) {
            return $this->cachedInterfaces;
        }
        $interfaces = array_merge([$this->getCurrentClassImplementedInterfacesIndexedByName()], array_map(static function (self $parentClass) : array {
            return $parentClass->getCurrentClassImplementedInterfacesIndexedByName();
        }, $this->getParentClasses()));
        return $this->cachedInterfaces = array_merge(...array_reverse($interfaces));
    }
    /**
     * Get only the interfaces that this class implements (i.e. do not search
     * up parent classes etc.)
     *
     * @return array<class-string, self>
     */
    public function getImmediateInterfaces() : array
    {
        if ($this->isTrait) {
            return [];
        }
        $interfaces = [];
        foreach ($this->implementsClassNames as $interfaceClassName) {
            try {
                $interfaces[$interfaceClassName] = $this->reflector->reflectClass($interfaceClassName);
            } catch (IdentifierNotFound $exception) {
                continue;
            }
        }
        if ($this->isEnum) {
            $interfaces = $this->addEnumInterfaces($interfaces);
        }
        return $this->addStringableInterface($interfaces);
    }
    /**
     * Gets the interface names.
     *
     * @link https://php.net/manual/en/reflectionclass.getinterfacenames.php
     *
     * @return list<class-string> A numerical array with interface names as the values.
     */
    public function getInterfaceNames() : array
    {
        if ($this->cachedInterfaceNames !== null) {
            return $this->cachedInterfaceNames;
        }
        return $this->cachedInterfaceNames = array_values(array_map(static function (self $interface) : string {
            return $interface->getName();
        }, $this->getInterfaces()));
    }
    /**
     * Checks whether the given object is an instance.
     *
     * @link https://php.net/manual/en/reflectionclass.isinstance.php
     */
    public function isInstance(object $object) : bool
    {
        $className = $this->getName();
        // note: since $object was loaded, we can safely assume that $className is available in the current
        //       php script execution context
        return $object instanceof $className;
    }
    /**
     * Checks whether the given class string is a subclass of this class.
     *
     * @link https://php.net/manual/en/reflectionclass.isinstance.php
     */
    public function isSubclassOf(string $className) : bool
    {
        return in_array(ltrim($className, '\\'), $this->getParentClassNames(), \true);
    }
    /**
     * Checks whether this class implements the given interface.
     *
     * @link https://php.net/manual/en/reflectionclass.implementsinterface.php
     */
    public function implementsInterface(string $interfaceName) : bool
    {
        return in_array(ltrim($interfaceName, '\\'), $this->getInterfaceNames(), \true);
    }
    /**
     * Checks whether this reflection is an instantiable class
     *
     * @link https://php.net/manual/en/reflectionclass.isinstantiable.php
     */
    public function isInstantiable() : bool
    {
        // @TODO doesn't consider internal non-instantiable classes yet.
        if ($this->isAbstract()) {
            return \false;
        }
        if ($this->isInterface()) {
            return \false;
        }
        if ($this->isTrait()) {
            return \false;
        }
        $constructor = $this->getConstructor();
        if ($constructor === null) {
            return \true;
        }
        return $constructor->isPublic();
    }
    /**
     * Checks whether this is a reflection of a class that supports the clone operator
     *
     * @link https://php.net/manual/en/reflectionclass.iscloneable.php
     */
    public function isCloneable() : bool
    {
        if (!$this->isInstantiable()) {
            return \false;
        }
        $cloneMethod = $this->getMethod('__clone');
        if ($cloneMethod === null) {
            return \true;
        }
        return $cloneMethod->isPublic();
    }
    /**
     * Checks if iterateable
     *
     * @link https://php.net/manual/en/reflectionclass.isiterateable.php
     */
    public function isIterateable() : bool
    {
        return $this->isInstantiable() && $this->implementsInterface(Traversable::class);
    }
    public function isEnum() : bool
    {
        return $this->isEnum;
    }
    /** @return array<class-string, ReflectionClass> */
    private function getCurrentClassImplementedInterfacesIndexedByName() : array
    {
        if ($this->isTrait) {
            return [];
        }
        if ($this->isInterface) {
            // assumption: first key is the current interface
            return array_slice($this->getInterfacesHierarchy(AlreadyVisitedClasses::createEmpty()), 1);
        }
        $interfaces = [];
        foreach ($this->implementsClassNames as $name) {
            try {
                $interface = $this->reflector->reflectClass($name);
                foreach ($interface->getInterfacesHierarchy(AlreadyVisitedClasses::createEmpty()) as $n => $i) {
                    $interfaces[$n] = $i;
                }
            } catch (IdentifierNotFound $exception) {
                continue;
            }
        }
        if ($this->isEnum) {
            $interfaces = $this->addEnumInterfaces($interfaces);
        }
        return $this->addStringableInterface($interfaces);
    }
    /**
     * This method allows us to retrieve all interfaces parent of this interface. Do not use on class nodes!
     *
     * @return array<class-string, ReflectionClass> parent interfaces of this interface
     *
     * @throws NotAnInterfaceReflection
     */
    private function getInterfacesHierarchy(AlreadyVisitedClasses $alreadyVisitedClasses) : array
    {
        if (!$this->isInterface) {
            throw NotAnInterfaceReflection::fromReflectionClass($this);
        }
        $interfaceClassName = $this->getName();
        $alreadyVisitedClasses->push($interfaceClassName);
        /** @var array<class-string, self> $interfaces */
        $interfaces = [$interfaceClassName => $this];
        foreach ($this->getImmediateInterfaces() as $interface) {
            $alreadyVisitedClassesCopyForInterface = clone $alreadyVisitedClasses;
            foreach ($interface->getInterfacesHierarchy($alreadyVisitedClassesCopyForInterface) as $extendedInterfaceName => $extendedInterface) {
                $interfaces[$extendedInterfaceName] = $extendedInterface;
            }
        }
        return $this->addStringableInterface($interfaces);
    }
    /**
     * Get the value of a static property, if it exists. Throws a
     * PropertyDoesNotExist exception if it does not exist or is not static.
     * (note, differs very slightly from internal reflection behaviour)
     *
     * @param non-empty-string $propertyName
     *
     * @throws ClassDoesNotExist
     * @throws NoObjectProvided
     * @throws NotAnObject
     * @throws ObjectNotInstanceOfClass
     * @return mixed
     */
    public function getStaticPropertyValue(string $propertyName)
    {
        $property = $this->getProperty($propertyName);
        if (!$property || !$property->isStatic()) {
            throw PropertyDoesNotExist::fromName($propertyName);
        }
        return $property->getValue();
    }
    /**
     * Set the value of a static property
     *
     * @param non-empty-string $propertyName
     *
     * @throws ClassDoesNotExist
     * @throws NoObjectProvided
     * @throws NotAnObject
     * @throws ObjectNotInstanceOfClass
     * @param mixed $value
     */
    public function setStaticPropertyValue(string $propertyName, $value) : void
    {
        $property = $this->getProperty($propertyName);
        if (!$property || !$property->isStatic()) {
            throw PropertyDoesNotExist::fromName($propertyName);
        }
        $property->setValue($value);
    }
    /** @return array<non-empty-string, mixed> */
    public function getStaticProperties() : array
    {
        $staticProperties = [];
        foreach ($this->getProperties() as $property) {
            if (!$property->isStatic()) {
                continue;
            }
            /** @psalm-suppress MixedAssignment */
            $staticProperties[$property->getName()] = $property->getValue();
        }
        return $staticProperties;
    }
    /** @return list<ReflectionAttribute> */
    public function getAttributes() : array
    {
        return $this->attributes;
    }
    /** @return list<ReflectionAttribute> */
    public function getAttributesByName(string $name) : array
    {
        return ReflectionAttributeHelper::filterAttributesByName($this->getAttributes(), $name);
    }
    /**
     * @param class-string $className
     *
     * @return list<ReflectionAttribute>
     */
    public function getAttributesByInstance(string $className) : array
    {
        return ReflectionAttributeHelper::filterAttributesByInstance($this->getAttributes(), $className);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\StringCast;

use PHPStan\BetterReflection\Reflection\ReflectionClassConstant;
use function assert;
use function gettype;
use function is_array;
use function sprintf;
/** @internal */
final class ReflectionClassConstantStringCast
{
    /**
     * @return non-empty-string
     *
     * @psalm-pure
     */
    public static function toString(ReflectionClassConstant $constantReflection) : string
    {
        /** @psalm-var scalar|array<scalar> $value */
        $value = $constantReflection->getValue();
        $string = sprintf("Constant [ %s%s %s %s ] { %s }\n", $constantReflection->isFinal() ? 'final ' : '', self::visibilityToString($constantReflection), gettype($value), $constantReflection->getName(), is_array($value) ? 'Array' : (string) $value);
        assert($string !== '');
        return $string;
    }
    /** @psalm-pure */
    private static function visibilityToString(ReflectionClassConstant $constantReflection) : string
    {
        if ($constantReflection->isProtected()) {
            return 'protected';
        }
        if ($constantReflection->isPrivate()) {
            return 'private';
        }
        return 'public';
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\StringCast;

use PHPStan\BetterReflection\Reflection\ReflectionParameter;
use function assert;
use function is_array;
use function is_string;
use function sprintf;
use function strlen;
use function substr;
use function var_export;
/** @internal */
final class ReflectionParameterStringCast
{
    /**
     * @return non-empty-string
     *
     * @psalm-pure
     */
    public static function toString(ReflectionParameter $parameterReflection) : string
    {
        $string = sprintf('Parameter #%d [ %s %s%s%s$%s%s ]', $parameterReflection->getPosition(), $parameterReflection->isOptional() ? '<optional>' : '<required>', self::typeToString($parameterReflection), $parameterReflection->isVariadic() ? '...' : '', $parameterReflection->isPassedByReference() ? '&' : '', $parameterReflection->getName(), self::valueToString($parameterReflection));
        assert($string !== '');
        return $string;
    }
    /** @psalm-pure */
    private static function typeToString(ReflectionParameter $parameterReflection) : string
    {
        $type = $parameterReflection->getType();
        if ($type === null) {
            return '';
        }
        return \PHPStan\BetterReflection\Reflection\StringCast\ReflectionTypeStringCast::toString($type) . ' ';
    }
    /** @psalm-pure */
    private static function valueToString(ReflectionParameter $parameterReflection) : string
    {
        if (!($parameterReflection->isOptional() && $parameterReflection->isDefaultValueAvailable())) {
            return '';
        }
        $defaultValue = $parameterReflection->getDefaultValue();
        if (is_array($defaultValue)) {
            return ' = Array';
        }
        if (is_string($defaultValue) && strlen($defaultValue) > 15) {
            return ' = ' . var_export(substr($defaultValue, 0, 15) . '...', \true);
        }
        return ' = ' . var_export($defaultValue, \true);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\StringCast;

use PHPStan\BetterReflection\Reflection\ReflectionIntersectionType;
use PHPStan\BetterReflection\Reflection\ReflectionNamedType;
use PHPStan\BetterReflection\Reflection\ReflectionType;
use PHPStan\BetterReflection\Reflection\ReflectionUnionType;
use function array_filter;
use function array_values;
use function count;
/** @internal */
final class ReflectionTypeStringCast
{
    /**
     * @return non-empty-string
     *
     * @psalm-pure
     * @param \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType $type
     */
    public static function toString($type) : string
    {
        if ($type instanceof ReflectionUnionType) {
            // php-src has this weird behavior where a union type composed of a single type `T`
            // together with `null` means that a `ReflectionNamedType` for `?T` is produced,
            // rather than `T|null`. This is done to keep BC compatibility with PHP 7.1 (which
            // introduced nullable types), but at reflection level, this is mostly a nuisance.
            // In order to keep parity with core `Reflector#__toString()` behavior, we stashed
            // this weird behavior in here.
            $nonNullTypes = array_values(array_filter($type->getTypes(), static function (ReflectionType $type) : bool {
                return !($type instanceof ReflectionNamedType && $type->getName() === 'null');
            }));
            if ($type->allowsNull() && count($nonNullTypes) === 1 && $nonNullTypes[0] instanceof ReflectionNamedType) {
                return '?' . $nonNullTypes[0]->__toString();
            }
        }
        return $type->__toString();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\StringCast;

use PHPStan\BetterReflection\Reflection\ReflectionFunction;
use PHPStan\BetterReflection\Reflection\ReflectionParameter;
use function array_reduce;
use function assert;
use function count;
use function is_string;
use function sprintf;
/** @internal */
final class ReflectionFunctionStringCast
{
    /**
     * @return non-empty-string
     *
     * @psalm-pure
     */
    public static function toString(ReflectionFunction $functionReflection) : string
    {
        $parametersFormat = $functionReflection->getNumberOfParameters() > 0 || $functionReflection->hasReturnType() ? "\n\n  - Parameters [%d] {%s\n  }" : '';
        $returnTypeFormat = $functionReflection->hasReturnType() ? "\n  - Return [ %s ]" : '';
        $string = sprintf('Function [ <%s> function %s ] {%s' . $parametersFormat . $returnTypeFormat . "\n}", self::sourceToString($functionReflection), $functionReflection->getName(), self::fileAndLinesToString($functionReflection), count($functionReflection->getParameters()), self::parametersToString($functionReflection), self::returnTypeToString($functionReflection));
        assert($string !== '');
        return $string;
    }
    /** @psalm-pure */
    private static function sourceToString(ReflectionFunction $functionReflection) : string
    {
        if ($functionReflection->isUserDefined()) {
            return 'user';
        }
        $extensionName = $functionReflection->getExtensionName();
        assert(is_string($extensionName));
        return sprintf('internal:%s', $extensionName);
    }
    /** @psalm-pure */
    private static function fileAndLinesToString(ReflectionFunction $functionReflection) : string
    {
        if ($functionReflection->isInternal()) {
            return '';
        }
        $fileName = $functionReflection->getFileName();
        if ($fileName === null) {
            return '';
        }
        return sprintf("\n  @@ %s %d - %d", $fileName, $functionReflection->getStartLine(), $functionReflection->getEndLine());
    }
    /** @psalm-pure */
    private static function parametersToString(ReflectionFunction $functionReflection) : string
    {
        return array_reduce($functionReflection->getParameters(), static function (string $string, ReflectionParameter $parameterReflection) : string {
            return $string . "\n    " . \PHPStan\BetterReflection\Reflection\StringCast\ReflectionParameterStringCast::toString($parameterReflection);
        }, '');
    }
    /** @psalm-pure */
    private static function returnTypeToString(ReflectionFunction $methodReflection) : string
    {
        $type = $methodReflection->getReturnType();
        if ($type === null) {
            return '';
        }
        return \PHPStan\BetterReflection\Reflection\StringCast\ReflectionTypeStringCast::toString($type);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\StringCast;

use PHPStan\BetterReflection\Reflection\ReflectionConstant;
use function assert;
use function gettype;
use function is_array;
use function is_object;
use function is_string;
use function sprintf;
/**
 * Implementation of ReflectionConstant::__toString()
 *
 * @internal
 */
final class ReflectionConstantStringCast
{
    /**
     * @return non-empty-string
     *
     * @psalm-pure
     */
    public static function toString(ReflectionConstant $constantReflection) : string
    {
        /** @psalm-var scalar|array<scalar> $value */
        $value = $constantReflection->getValue();
        if (is_object($value)) {
            $valueAsString = 'Object';
        } elseif (is_array($value)) {
            $valueAsString = 'Array';
        } else {
            $valueAsString = (string) $value;
        }
        $string = sprintf('Constant [ <%s> %s %s ] {%s %s }', self::sourceToString($constantReflection), gettype($value), $constantReflection->getName(), self::fileAndLinesToString($constantReflection), $valueAsString);
        assert($string !== '');
        return $string;
    }
    /** @psalm-pure */
    private static function sourceToString(ReflectionConstant $constantReflection) : string
    {
        if ($constantReflection->isUserDefined()) {
            return 'user';
        }
        $extensionName = $constantReflection->getExtensionName();
        assert(is_string($extensionName));
        return sprintf('internal:%s', $extensionName);
    }
    /** @psalm-pure */
    private static function fileAndLinesToString(ReflectionConstant $constantReflection) : string
    {
        if ($constantReflection->isInternal()) {
            return '';
        }
        $fileName = $constantReflection->getFileName();
        if ($fileName === null) {
            return '';
        }
        return sprintf("\n  @@ %s %d - %d\n", $fileName, $constantReflection->getStartLine(), $constantReflection->getEndLine());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\StringCast;

use PHPStan\BetterReflection\Reflection\ReflectionAttribute;
use function assert;
use function count;
use function is_array;
use function is_string;
use function sprintf;
use function strlen;
use function substr;
use function var_export;
/** @internal */
final class ReflectionAttributeStringCast
{
    /**
     * @return non-empty-string
     *
     * @psalm-pure
     */
    public static function toString(ReflectionAttribute $attributeReflection) : string
    {
        $arguments = $attributeReflection->getArguments();
        $argumentsFormat = $arguments !== [] ? " {\n  - Arguments [%d] {%s\n  }\n}" : '';
        $string = sprintf('Attribute [ %s ]' . $argumentsFormat . "\n", $attributeReflection->getName(), count($arguments), self::argumentsToString($arguments));
        assert($string !== '');
        return $string;
    }
    /**
     * @param array<int|string, mixed> $arguments
     *
     * @psalm-pure
     */
    private static function argumentsToString(array $arguments) : string
    {
        if ($arguments === []) {
            return '';
        }
        $string = '';
        $argumentNo = 0;
        /** @psalm-suppress MixedAssignment */
        foreach ($arguments as $argumentName => $argumentValue) {
            $string .= sprintf("\n    Argument #%d [ %s%s ]", $argumentNo, is_string($argumentName) ? sprintf('%s = ', $argumentName) : '', self::argumentValueToString($argumentValue));
            $argumentNo++;
        }
        return $string;
    }
    /** @psalm-pure
     * @param mixed $value */
    private static function argumentValueToString($value) : string
    {
        if (is_array($value)) {
            return 'Array';
        }
        if (is_string($value) && strlen($value) > 15) {
            return var_export(substr($value, 0, 15) . '...', \true);
        }
        return var_export($value, \true);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\StringCast;

use PHPStan\BetterReflection\Reflection\ReflectionClass;
use PHPStan\BetterReflection\Reflection\ReflectionClassConstant;
use PHPStan\BetterReflection\Reflection\ReflectionEnum;
use PHPStan\BetterReflection\Reflection\ReflectionEnumCase;
use PHPStan\BetterReflection\Reflection\ReflectionMethod;
use PHPStan\BetterReflection\Reflection\ReflectionObject;
use PHPStan\BetterReflection\Reflection\ReflectionProperty;
use function array_filter;
use function array_map;
use function assert;
use function count;
use function implode;
use function is_string;
use function preg_replace;
use function sprintf;
use function str_repeat;
use function strtolower;
use function trim;
/** @internal */
final class ReflectionClassStringCast
{
    /**
     * @return non-empty-string
     *
     * @psalm-pure
     */
    public static function toString(ReflectionClass $classReflection) : string
    {
        $isObject = $classReflection instanceof ReflectionObject;
        $format = "%s [ <%s> %s%s%s %s%s%s ] {\n";
        $format .= "%s\n";
        $format .= "  - Constants [%d] {%s\n  }\n\n";
        $format .= "  - Static properties [%d] {%s\n  }\n\n";
        $format .= "  - Static methods [%d] {%s\n  }\n\n";
        $format .= "  - Properties [%d] {%s\n  }\n\n";
        $format .= $isObject ? "  - Dynamic properties [%d] {%s\n  }\n\n" : '%s%s';
        $format .= "  - Methods [%d] {%s\n  }\n";
        $format .= "}\n";
        $type = self::typeToString($classReflection);
        $constants = $classReflection->getConstants();
        $enumCases = $classReflection instanceof ReflectionEnum ? $classReflection->getCases() : [];
        $staticProperties = self::getStaticProperties($classReflection);
        $staticMethods = self::getStaticMethods($classReflection);
        $defaultProperties = self::getDefaultProperties($classReflection);
        $dynamicProperties = self::getDynamicProperties($classReflection);
        $methods = self::getMethods($classReflection);
        $string = sprintf($format, $isObject ? 'Object of class' : $type, self::sourceToString($classReflection), $classReflection->isFinal() ? 'final ' : '', $classReflection->isAbstract() ? 'abstract ' : '', strtolower($type), $classReflection->getName(), self::extendsToString($classReflection), self::implementsToString($classReflection), self::fileAndLinesToString($classReflection), count($constants) + count($enumCases), self::constantsToString($constants, $enumCases), count($staticProperties), self::propertiesToString($staticProperties), count($staticMethods), self::methodsToString($staticMethods), count($defaultProperties), self::propertiesToString($defaultProperties), $isObject ? count($dynamicProperties) : '', $isObject ? self::propertiesToString($dynamicProperties) : '', count($methods), self::methodsToString($methods, 2));
        assert($string !== '');
        return $string;
    }
    /** @psalm-pure */
    private static function typeToString(ReflectionClass $classReflection) : string
    {
        if ($classReflection->isInterface()) {
            return 'Interface';
        }
        if ($classReflection->isTrait()) {
            return 'Trait';
        }
        return 'Class';
    }
    /** @psalm-pure */
    private static function sourceToString(ReflectionClass $classReflection) : string
    {
        if ($classReflection->isUserDefined()) {
            return 'user';
        }
        $extensionName = $classReflection->getExtensionName();
        assert(is_string($extensionName));
        return sprintf('internal:%s', $extensionName);
    }
    /** @psalm-pure */
    private static function extendsToString(ReflectionClass $classReflection) : string
    {
        $parentClass = $classReflection->getParentClass();
        if ($parentClass === null) {
            return '';
        }
        return ' extends ' . $parentClass->getName();
    }
    /** @psalm-pure */
    private static function implementsToString(ReflectionClass $classReflection) : string
    {
        $interfaceNames = $classReflection->getInterfaceNames();
        if ($interfaceNames === []) {
            return '';
        }
        return ' implements ' . implode(', ', $interfaceNames);
    }
    /** @psalm-pure */
    private static function fileAndLinesToString(ReflectionClass $classReflection) : string
    {
        if ($classReflection->isInternal()) {
            return '';
        }
        $fileName = $classReflection->getFileName();
        if ($fileName === null) {
            return '';
        }
        return sprintf("  @@ %s %d-%d\n", $fileName, $classReflection->getStartLine(), $classReflection->getEndLine());
    }
    /**
     * @param array<ReflectionClassConstant> $constants
     * @param array<ReflectionEnumCase>      $enumCases
     *
     * @psalm-pure
     */
    private static function constantsToString(array $constants, array $enumCases) : string
    {
        if ($constants === [] && $enumCases === []) {
            return '';
        }
        $items = array_map(static function (ReflectionEnumCase $enumCaseReflection) : string {
            return trim(\PHPStan\BetterReflection\Reflection\StringCast\ReflectionEnumCaseStringCast::toString($enumCaseReflection));
        }, $enumCases) + array_map(static function (ReflectionClassConstant $constantReflection) : string {
            return trim(\PHPStan\BetterReflection\Reflection\StringCast\ReflectionClassConstantStringCast::toString($constantReflection));
        }, $constants);
        return self::itemsToString($items);
    }
    /**
     * @param array<ReflectionProperty> $properties
     *
     * @psalm-pure
     */
    private static function propertiesToString(array $properties) : string
    {
        if ($properties === []) {
            return '';
        }
        return self::itemsToString(array_map(static function (ReflectionProperty $propertyReflection) : string {
            return \PHPStan\BetterReflection\Reflection\StringCast\ReflectionPropertyStringCast::toString($propertyReflection);
        }, $properties));
    }
    /**
     * @param array<ReflectionMethod> $methods
     *
     * @psalm-pure
     */
    private static function methodsToString(array $methods, int $emptyLinesAmongItems = 1) : string
    {
        if ($methods === []) {
            return '';
        }
        return self::itemsToString(array_map(static function (ReflectionMethod $method) : string {
            return \PHPStan\BetterReflection\Reflection\StringCast\ReflectionMethodStringCast::toString($method);
        }, $methods), $emptyLinesAmongItems);
    }
    /**
     * @param array<string> $items
     *
     * @psalm-pure
     */
    private static function itemsToString(array $items, int $emptyLinesAmongItems = 1) : string
    {
        $string = implode(str_repeat("\n", $emptyLinesAmongItems), $items);
        return "\n" . preg_replace('/(^|\\n)(?!\\n)/', '\\1' . self::indent(), $string);
    }
    /** @psalm-pure */
    private static function indent() : string
    {
        return str_repeat(' ', 4);
    }
    /**
     * @return array<ReflectionProperty>
     *
     * @psalm-pure
     */
    private static function getStaticProperties(ReflectionClass $classReflection) : array
    {
        return array_filter($classReflection->getProperties(), static function (ReflectionProperty $propertyReflection) : bool {
            return $propertyReflection->isStatic();
        });
    }
    /**
     * @return array<ReflectionMethod>
     *
     * @psalm-pure
     */
    private static function getStaticMethods(ReflectionClass $classReflection) : array
    {
        return array_filter($classReflection->getMethods(), static function (ReflectionMethod $methodReflection) : bool {
            return $methodReflection->isStatic();
        });
    }
    /**
     * @return array<ReflectionProperty>
     *
     * @psalm-pure
     */
    private static function getDefaultProperties(ReflectionClass $classReflection) : array
    {
        return array_filter($classReflection->getProperties(), static function (ReflectionProperty $propertyReflection) : bool {
            return !$propertyReflection->isStatic() && $propertyReflection->isDefault();
        });
    }
    /**
     * @return array<ReflectionProperty>
     *
     * @psalm-pure
     */
    private static function getDynamicProperties(ReflectionClass $classReflection) : array
    {
        return array_filter($classReflection->getProperties(), static function (ReflectionProperty $propertyReflection) : bool {
            return !$propertyReflection->isStatic() && !$propertyReflection->isDefault();
        });
    }
    /**
     * @return array<ReflectionMethod>
     *
     * @psalm-pure
     */
    private static function getMethods(ReflectionClass $classReflection) : array
    {
        return array_filter($classReflection->getMethods(), static function (ReflectionMethod $methodReflection) : bool {
            return !$methodReflection->isStatic();
        });
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\StringCast;

use PHPStan\BetterReflection\Reflection\ReflectionProperty;
use function assert;
use function sprintf;
/** @internal */
final class ReflectionPropertyStringCast
{
    /**
     * @return non-empty-string
     *
     * @psalm-pure
     */
    public static function toString(ReflectionProperty $propertyReflection) : string
    {
        $stateModifier = '';
        if (!$propertyReflection->isStatic()) {
            $stateModifier = $propertyReflection->isDefault() ? ' <default>' : ' <dynamic>';
        }
        $type = $propertyReflection->getType();
        $string = sprintf('Property [%s %s%s%s%s $%s ]', $stateModifier, self::visibilityToString($propertyReflection), $propertyReflection->isStatic() ? ' static' : '', $propertyReflection->isReadOnly() ? ' readonly' : '', $type !== null ? sprintf(' %s', \PHPStan\BetterReflection\Reflection\StringCast\ReflectionTypeStringCast::toString($type)) : '', $propertyReflection->getName());
        assert($string !== '');
        return $string;
    }
    /** @psalm-pure */
    private static function visibilityToString(ReflectionProperty $propertyReflection) : string
    {
        if ($propertyReflection->isProtected()) {
            return 'protected';
        }
        if ($propertyReflection->isPrivate()) {
            return 'private';
        }
        return 'public';
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\StringCast;

use PHPStan\BetterReflection\Reflection\Exception\MethodPrototypeNotFound;
use PHPStan\BetterReflection\Reflection\ReflectionMethod;
use PHPStan\BetterReflection\Reflection\ReflectionParameter;
use function array_reduce;
use function assert;
use function count;
use function is_string;
use function sprintf;
/** @internal */
final class ReflectionMethodStringCast
{
    /**
     * @return non-empty-string
     *
     * @psalm-pure
     */
    public static function toString(ReflectionMethod $methodReflection) : string
    {
        $parametersFormat = $methodReflection->getNumberOfParameters() > 0 || $methodReflection->hasReturnType() ? "\n\n  - Parameters [%d] {%s\n  }" : '';
        $returnTypeFormat = $methodReflection->hasReturnType() ? "\n  - Return [ %s ]" : '';
        $string = sprintf('Method [ <%s%s%s%s%s%s>%s%s%s %s method %s ] {%s' . $parametersFormat . $returnTypeFormat . "\n}", self::sourceToString($methodReflection), $methodReflection->isConstructor() ? ', ctor' : '', $methodReflection->isDestructor() ? ', dtor' : '', self::overwritesToString($methodReflection), self::inheritsToString($methodReflection), self::prototypeToString($methodReflection), $methodReflection->isFinal() ? ' final' : '', $methodReflection->isStatic() ? ' static' : '', $methodReflection->isAbstract() ? ' abstract' : '', self::visibilityToString($methodReflection), $methodReflection->getName(), self::fileAndLinesToString($methodReflection), count($methodReflection->getParameters()), self::parametersToString($methodReflection), self::returnTypeToString($methodReflection));
        assert($string !== '');
        return $string;
    }
    /** @psalm-pure */
    private static function sourceToString(ReflectionMethod $methodReflection) : string
    {
        if ($methodReflection->isUserDefined()) {
            return 'user';
        }
        $extensionName = $methodReflection->getExtensionName();
        assert(is_string($extensionName));
        return sprintf('internal:%s', $extensionName);
    }
    /** @psalm-pure */
    private static function overwritesToString(ReflectionMethod $methodReflection) : string
    {
        $parentClass = $methodReflection->getDeclaringClass()->getParentClass();
        if ($parentClass === null) {
            return '';
        }
        if (!$parentClass->hasMethod($methodReflection->getName())) {
            return '';
        }
        return sprintf(', overwrites %s', $parentClass->getName());
    }
    /** @psalm-pure */
    private static function inheritsToString(ReflectionMethod $methodReflection) : string
    {
        if ($methodReflection->getDeclaringClass() === $methodReflection->getCurrentClass()) {
            return '';
        }
        return sprintf(', inherits %s', $methodReflection->getDeclaringClass()->getName());
    }
    /** @psalm-pure */
    private static function prototypeToString(ReflectionMethod $methodReflection) : string
    {
        try {
            return sprintf(', prototype %s', $methodReflection->getPrototype()->getDeclaringClass()->getName());
        } catch (MethodPrototypeNotFound $exception) {
            return '';
        }
    }
    /** @psalm-pure */
    private static function visibilityToString(ReflectionMethod $methodReflection) : string
    {
        if ($methodReflection->isProtected()) {
            return 'protected';
        }
        if ($methodReflection->isPrivate()) {
            return 'private';
        }
        return 'public';
    }
    /** @psalm-pure */
    private static function fileAndLinesToString(ReflectionMethod $methodReflection) : string
    {
        if ($methodReflection->isInternal()) {
            return '';
        }
        $fileName = $methodReflection->getFileName();
        assert(is_string($fileName));
        return sprintf("\n  @@ %s %d - %d", $fileName, $methodReflection->getStartLine(), $methodReflection->getEndLine());
    }
    /** @psalm-pure */
    private static function parametersToString(ReflectionMethod $methodReflection) : string
    {
        return array_reduce($methodReflection->getParameters(), static function (string $string, ReflectionParameter $parameterReflection) : string {
            return $string . "\n    " . \PHPStan\BetterReflection\Reflection\StringCast\ReflectionParameterStringCast::toString($parameterReflection);
        }, '');
    }
    /** @psalm-pure */
    private static function returnTypeToString(ReflectionMethod $methodReflection) : string
    {
        $type = $methodReflection->getReturnType();
        if ($type === null) {
            return '';
        }
        return \PHPStan\BetterReflection\Reflection\StringCast\ReflectionTypeStringCast::toString($type);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\StringCast;

use PHPStan\BetterReflection\Reflection\ReflectionEnumCase;
use function assert;
use function gettype;
use function sprintf;
/** @internal */
final class ReflectionEnumCaseStringCast
{
    /**
     * @return non-empty-string
     *
     * @psalm-pure
     */
    public static function toString(ReflectionEnumCase $enumCaseReflection) : string
    {
        $enumReflection = $enumCaseReflection->getDeclaringEnum();
        $value = $enumReflection->isBacked() ? $enumCaseReflection->getValue() : 'Object';
        $type = $enumReflection->isBacked() ? gettype($value) : $enumReflection->getName();
        $string = sprintf("Constant [ public %s %s ] { %s }\n", $type, $enumCaseReflection->getName(), $value);
        assert($string !== '');
        return $string;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Annotation;

use function preg_match;
/** @internal */
final class AnnotationHelper
{
    public const TENTATIVE_RETURN_TYPE_ANNOTATION = 'betterReflectionTentativeReturnType';
    /** @psalm-pure */
    public static function isDeprecated(?string $docComment) : bool
    {
        if ($docComment === null) {
            return \false;
        }
        return preg_match('~\\*\\s*@deprecated(?=\\s|\\*)~', $docComment) === 1;
    }
    /** @psalm-pure */
    public static function hasTentativeReturnType(?string $docComment) : bool
    {
        if ($docComment === null) {
            return \false;
        }
        return preg_match('~\\*\\s*@' . self::TENTATIVE_RETURN_TYPE_ANNOTATION . '(?=\\s|\\*)~', $docComment) === 1;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection;

use Closure;
use Exception;
use InvalidArgumentException;
use LogicException;
use OutOfBoundsException;
use PhpParser\Node;
use PhpParser\Node\Param as ParamNode;
use PHPStan\BetterReflection\NodeCompiler\CompiledValue;
use PHPStan\BetterReflection\NodeCompiler\CompileNodeToValue;
use PHPStan\BetterReflection\NodeCompiler\CompilerContext;
use PHPStan\BetterReflection\NodeCompiler\Exception\UnableToCompileNode;
use PHPStan\BetterReflection\Reflection\Attribute\ReflectionAttributeHelper;
use PHPStan\BetterReflection\Reflection\Exception\CodeLocationMissing;
use PHPStan\BetterReflection\Reflection\StringCast\ReflectionParameterStringCast;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\Util\CalculateReflectionColumn;
use PHPStan\BetterReflection\Util\Exception\NoNodePosition;
use function array_map;
use function assert;
use function count;
use function is_array;
use function is_object;
use function is_string;
use function sprintf;
/** @psalm-immutable */
class ReflectionParameter
{
    /** @var non-empty-string */
    private $name;
    /**
     * @var \PhpParser\Node\Expr|null
     */
    private $default;
    /**
     * @var \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType|null
     */
    private $type;
    /**
     * @var bool
     */
    private $isVariadic;
    /**
     * @var bool
     */
    private $byRef;
    /**
     * @var bool
     */
    private $isPromoted;
    /** @var list<ReflectionAttribute> */
    private $attributes;
    /** @var positive-int|null */
    private $startLine;
    /** @var positive-int|null */
    private $endLine;
    /** @var positive-int|null */
    private $startColumn;
    /** @var positive-int|null */
    private $endColumn;
    /** @psalm-allow-private-mutation
     * @var \PHPStan\BetterReflection\NodeCompiler\CompiledValue|null */
    private $compiledDefaultValue = null;
    /**
     * @var \PHPStan\BetterReflection\Reflector\Reflector
     */
    private $reflector;
    /**
     * @var \PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction
     */
    private $function;
    /**
     * @var int
     */
    private $parameterIndex;
    /**
     * @var bool
     */
    private $isOptional;
    /**
     * @param \PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction $function
     */
    private function __construct(Reflector $reflector, ParamNode $node, $function, int $parameterIndex, bool $isOptional)
    {
        $this->reflector = $reflector;
        $this->function = $function;
        $this->parameterIndex = $parameterIndex;
        $this->isOptional = $isOptional;
        assert($node->var instanceof Node\Expr\Variable);
        assert(is_string($node->var->name));
        $name = $node->var->name;
        assert($name !== '');
        $this->name = $name;
        $this->default = $node->default;
        $this->type = $this->createType($node);
        $this->isVariadic = $node->variadic;
        $this->byRef = $node->byRef;
        $this->isPromoted = $node->flags !== 0;
        $this->attributes = ReflectionAttributeHelper::createAttributes($reflector, $this, $node->attrGroups);
        if ($node->hasAttribute('startLine')) {
            $startLine = $node->getStartLine();
            assert($startLine > 0);
        } else {
            $startLine = null;
        }
        if ($node->hasAttribute('endLine')) {
            $endLine = $node->getEndLine();
            assert($endLine > 0);
        } else {
            $endLine = null;
        }
        $this->startLine = $startLine;
        $this->endLine = $endLine;
        try {
            $this->startColumn = CalculateReflectionColumn::getStartColumn($function->getLocatedSource()->getSource(), $node);
        } catch (NoNodePosition $exception) {
            $this->startColumn = null;
        }
        try {
            $this->endColumn = CalculateReflectionColumn::getEndColumn($function->getLocatedSource()->getSource(), $node);
        } catch (NoNodePosition $exception) {
            $this->endColumn = null;
        }
    }
    /**
     * Create a reflection of a parameter using a class name
     *
     * @param non-empty-string $methodName
     * @param non-empty-string $parameterName
     *
     * @throws OutOfBoundsException
     */
    public static function createFromClassNameAndMethod(string $className, string $methodName, string $parameterName) : self
    {
        $parameter = ($getMethod = \PHPStan\BetterReflection\Reflection\ReflectionClass::createFromName($className)->getMethod($methodName)) ? $getMethod->getParameter($parameterName) : null;
        if ($parameter === null) {
            throw new OutOfBoundsException(sprintf('Could not find parameter: %s', $parameterName));
        }
        return $parameter;
    }
    /**
     * Create a reflection of a parameter using an instance
     *
     * @param non-empty-string $methodName
     * @param non-empty-string $parameterName
     *
     * @throws OutOfBoundsException
     */
    public static function createFromClassInstanceAndMethod(object $instance, string $methodName, string $parameterName) : self
    {
        $parameter = ($getMethod = \PHPStan\BetterReflection\Reflection\ReflectionClass::createFromInstance($instance)->getMethod($methodName)) ? $getMethod->getParameter($parameterName) : null;
        if ($parameter === null) {
            throw new OutOfBoundsException(sprintf('Could not find parameter: %s', $parameterName));
        }
        return $parameter;
    }
    /**
     * Create a reflection of a parameter using a closure
     *
     * @param non-empty-string $parameterName
     *
     * @throws OutOfBoundsException
     */
    public static function createFromClosure(Closure $closure, string $parameterName) : \PHPStan\BetterReflection\Reflection\ReflectionParameter
    {
        $parameter = \PHPStan\BetterReflection\Reflection\ReflectionFunction::createFromClosure($closure)->getParameter($parameterName);
        if ($parameter === null) {
            throw new OutOfBoundsException(sprintf('Could not find parameter: %s', $parameterName));
        }
        return $parameter;
    }
    /**
     * Create the parameter from the given spec. Possible $spec parameters are:
     *
     *  - [$instance, 'method']
     *  - ['Foo', 'bar']
     *  - ['foo']
     *  - [function () {}]
     *
     * @param object[]|string[]|string|Closure $spec
     * @param non-empty-string                 $parameterName
     *
     * @throws Exception
     * @throws InvalidArgumentException
     */
    public static function createFromSpec($spec, string $parameterName) : self
    {
        try {
            if (is_array($spec) && count($spec) === 2 && is_string($spec[1])) {
                assert($spec[1] !== '');
                if (is_object($spec[0])) {
                    return self::createFromClassInstanceAndMethod($spec[0], $spec[1], $parameterName);
                }
                return self::createFromClassNameAndMethod($spec[0], $spec[1], $parameterName);
            }
            if (is_string($spec)) {
                $parameter = \PHPStan\BetterReflection\Reflection\ReflectionFunction::createFromName($spec)->getParameter($parameterName);
                if ($parameter === null) {
                    throw new OutOfBoundsException(sprintf('Could not find parameter: %s', $parameterName));
                }
                return $parameter;
            }
            if ($spec instanceof Closure) {
                return self::createFromClosure($spec, $parameterName);
            }
        } catch (OutOfBoundsException $e) {
            throw new InvalidArgumentException('Could not create reflection from the spec given', 0, $e);
        }
        throw new InvalidArgumentException('Could not create reflection from the spec given');
    }
    /** @return non-empty-string */
    public function __toString() : string
    {
        return ReflectionParameterStringCast::toString($this);
    }
    /**
     * @internal
     *
     * @param ParamNode $node Node has to be processed by the PhpParser\NodeVisitor\NameResolver
     * @param \PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction $function
     */
    public static function createFromNode(Reflector $reflector, ParamNode $node, $function, int $parameterIndex, bool $isOptional) : self
    {
        return new self($reflector, $node, $function, $parameterIndex, $isOptional);
    }
    /** @internal
     * @param \PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction $function */
    public function withFunction($function) : self
    {
        $clone = clone $this;
        $clone->function = $function;
        if ($clone->type !== null) {
            $clone->type = $clone->type->withOwner($clone);
        }
        $clone->attributes = array_map(static function (\PHPStan\BetterReflection\Reflection\ReflectionAttribute $attribute) use($clone) : \PHPStan\BetterReflection\Reflection\ReflectionAttribute {
            return $attribute->withOwner($clone);
        }, $this->attributes);
        $this->compiledDefaultValue = null;
        return $clone;
    }
    /** @throws LogicException */
    private function getCompiledDefaultValue() : CompiledValue
    {
        if (!$this->isDefaultValueAvailable()) {
            throw new LogicException('This parameter does not have a default value available');
        }
        if ($this->compiledDefaultValue === null) {
            $this->compiledDefaultValue = (new CompileNodeToValue())->__invoke($this->default, new CompilerContext($this->reflector, $this));
        }
        return $this->compiledDefaultValue;
    }
    /**
     * Get the name of the parameter.
     *
     * @return non-empty-string
     */
    public function getName() : string
    {
        return $this->name;
    }
    /**
     * Get the function (or method) that declared this parameter.
     * @return \PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction
     */
    public function getDeclaringFunction()
    {
        return $this->function;
    }
    /**
     * Get the class from the method that this parameter belongs to, if it
     * exists.
     *
     * This will return null if the declaring function is not a method.
     */
    public function getDeclaringClass() : ?\PHPStan\BetterReflection\Reflection\ReflectionClass
    {
        if ($this->function instanceof \PHPStan\BetterReflection\Reflection\ReflectionMethod) {
            return $this->function->getDeclaringClass();
        }
        return null;
    }
    public function getImplementingClass() : ?\PHPStan\BetterReflection\Reflection\ReflectionClass
    {
        if ($this->function instanceof \PHPStan\BetterReflection\Reflection\ReflectionMethod) {
            return $this->function->getImplementingClass();
        }
        return null;
    }
    /**
     * Is the parameter optional?
     *
     * Note this is distinct from "isDefaultValueAvailable" because you can have
     * a default value, but the parameter not be optional. In the example, the
     * $foo parameter isOptional() == false, but isDefaultValueAvailable == true
     *
     * @example someMethod($foo = 'foo', $bar)
     */
    public function isOptional() : bool
    {
        return $this->isOptional;
    }
    /**
     * Does the parameter have a default, regardless of whether it is optional.
     *
     * Note this is distinct from "isOptional" because you can have
     * a default value, but the parameter not be optional. In the example, the
     * $foo parameter isOptional() == false, but isDefaultValueAvailable == true
     *
     * @example someMethod($foo = 'foo', $bar)
     * @psalm-assert-if-true Node\Expr $this->default
     */
    public function isDefaultValueAvailable() : bool
    {
        return $this->default !== null;
    }
    /**
     * @deprecated Use getDefaultValueExpression()
     */
    public function getDefaultValueExpr() : ?\PhpParser\Node\Expr
    {
        return $this->getDefaultValueExpression();
    }
    public function getDefaultValueExpression() : ?\PhpParser\Node\Expr
    {
        return $this->default;
    }
    /**
     * Get the default value of the parameter.
     *
     * @deprecated Use getDefaultValueExpression()
     *
     * @throws LogicException
     * @throws UnableToCompileNode
     * @return mixed
     */
    public function getDefaultValue()
    {
        /** @psalm-var scalar|array<scalar>|null $value */
        $value = $this->getCompiledDefaultValue()->value;
        return $value;
    }
    /**
     * Does this method allow null for a parameter?
     */
    public function allowsNull() : bool
    {
        $type = $this->getType();
        if ($type === null) {
            return \true;
        }
        return $type->allowsNull();
    }
    /**
     * Find the position of the parameter, left to right, starting at zero.
     */
    public function getPosition() : int
    {
        return $this->parameterIndex;
    }
    /**
     * Get the ReflectionType instance representing the type declaration for
     * this parameter
     *
     * (note: this has nothing to do with DocBlocks).
     * @return \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType|null
     */
    public function getType()
    {
        return $this->type;
    }
    /**
     * @return \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType|null
     */
    private function createType(ParamNode $node)
    {
        $type = $node->type;
        if ($type === null) {
            return null;
        }
        assert($type instanceof Node\Identifier || $type instanceof Node\Name || $type instanceof Node\NullableType || $type instanceof Node\UnionType || $type instanceof Node\IntersectionType);
        $allowsNull = $this->default instanceof Node\Expr\ConstFetch && $this->default->name->toLowerString() === 'null';
        return \PHPStan\BetterReflection\Reflection\ReflectionType::createFromNode($this->reflector, $this, $type, $allowsNull);
    }
    /**
     * Does this parameter have a type declaration?
     *
     * (note: this has nothing to do with DocBlocks).
     */
    public function hasType() : bool
    {
        return $this->type !== null;
    }
    /**
     * Is this parameter a variadic (denoted by ...$param).
     */
    public function isVariadic() : bool
    {
        return $this->isVariadic;
    }
    /**
     * Is this parameter passed by reference (denoted by &$param).
     */
    public function isPassedByReference() : bool
    {
        return $this->byRef;
    }
    public function canBePassedByValue() : bool
    {
        return !$this->isPassedByReference();
    }
    public function isPromoted() : bool
    {
        return $this->isPromoted;
    }
    /** @throws LogicException */
    public function isDefaultValueConstant() : bool
    {
        return $this->getCompiledDefaultValue()->constantName !== null;
    }
    /** @throws LogicException */
    public function getDefaultValueConstantName() : string
    {
        $compiledDefaultValue = $this->getCompiledDefaultValue();
        if ($compiledDefaultValue->constantName === null) {
            throw new LogicException('This parameter is not a constant default value, so cannot have a constant name');
        }
        return $compiledDefaultValue->constantName;
    }
    /**
     * @return positive-int
     *
     * @throws CodeLocationMissing
     */
    public function getStartLine() : int
    {
        if ($this->startLine === null) {
            throw CodeLocationMissing::create();
        }
        return $this->startLine;
    }
    /**
     * @return positive-int
     *
     * @throws CodeLocationMissing
     */
    public function getEndLine() : int
    {
        if ($this->endLine === null) {
            throw CodeLocationMissing::create();
        }
        return $this->endLine;
    }
    /**
     * @return positive-int
     *
     * @throws CodeLocationMissing
     */
    public function getStartColumn() : int
    {
        if ($this->startColumn === null) {
            throw CodeLocationMissing::create();
        }
        return $this->startColumn;
    }
    /**
     * @return positive-int
     *
     * @throws CodeLocationMissing
     */
    public function getEndColumn() : int
    {
        if ($this->endColumn === null) {
            throw CodeLocationMissing::create();
        }
        return $this->endColumn;
    }
    /** @return list<ReflectionAttribute> */
    public function getAttributes() : array
    {
        return $this->attributes;
    }
    /** @return list<ReflectionAttribute> */
    public function getAttributesByName(string $name) : array
    {
        return ReflectionAttributeHelper::filterAttributesByName($this->getAttributes(), $name);
    }
    /**
     * @param class-string $className
     *
     * @return list<ReflectionAttribute>
     */
    public function getAttributesByInstance(string $className) : array
    {
        return ReflectionAttributeHelper::filterAttributesByInstance($this->getAttributes(), $className);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection;

use LogicException;
use PhpParser\Node;
use PhpParser\Node\Stmt\Class_ as ClassNode;
use PhpParser\Node\Stmt\Enum_ as EnumNode;
use PhpParser\Node\Stmt\Interface_ as InterfaceNode;
use PhpParser\Node\Stmt\Trait_ as TraitNode;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
use function array_combine;
use function array_filter;
use function array_key_exists;
use function array_map;
use function assert;
/** @psalm-immutable */
class ReflectionEnum extends \PHPStan\BetterReflection\Reflection\ReflectionClass
{
    /**
     * @var \PHPStan\BetterReflection\Reflection\ReflectionNamedType|null
     */
    private $backingType;
    /** @var array<non-empty-string, ReflectionEnumCase> */
    private $cases;
    /**
     * @var \PHPStan\BetterReflection\Reflector\Reflector
     */
    private $reflector;
    /** @phpcs:disable Generic.CodeAnalysis.UselessOverridingMethod.Found */
    private function __construct(Reflector $reflector, EnumNode $node, LocatedSource $locatedSource, ?string $namespace = null)
    {
        $this->reflector = $reflector;
        parent::__construct($reflector, $node, $locatedSource, $namespace);
        $this->backingType = $this->createBackingType($node);
        $this->cases = $this->createCases($node);
    }
    /**
     * @internal
     * @param ClassNode|InterfaceNode|TraitNode|EnumNode $node
     * @return $this
     */
    public static function createFromNode(Reflector $reflector, $node, LocatedSource $locatedSource, ?string $namespace = null) : \PHPStan\BetterReflection\Reflection\ReflectionClass
    {
        $node = $node;
        assert($node instanceof EnumNode);
        return new self($reflector, $node, $locatedSource, $namespace);
    }
    /** @param non-empty-string $name */
    public function hasCase(string $name) : bool
    {
        return array_key_exists($name, $this->cases);
    }
    /** @param non-empty-string $name */
    public function getCase(string $name) : ?\PHPStan\BetterReflection\Reflection\ReflectionEnumCase
    {
        return $this->cases[$name] ?? null;
    }
    /** @return array<non-empty-string, ReflectionEnumCase> */
    public function getCases() : array
    {
        return $this->cases;
    }
    /** @return array<non-empty-string, ReflectionEnumCase> */
    private function createCases(EnumNode $node) : array
    {
        $enumCasesNodes = array_filter($node->stmts, static function (Node\Stmt $stmt) : bool {
            return $stmt instanceof Node\Stmt\EnumCase;
        });
        return array_combine(array_map(static function (Node\Stmt\EnumCase $enumCaseNode) : string {
            $enumCaseName = $enumCaseNode->name->toString();
            assert($enumCaseName !== '');
            return $enumCaseName;
        }, $enumCasesNodes), array_map(function (Node\Stmt\EnumCase $enumCaseNode) : \PHPStan\BetterReflection\Reflection\ReflectionEnumCase {
            return \PHPStan\BetterReflection\Reflection\ReflectionEnumCase::createFromNode($this->reflector, $enumCaseNode, $this);
        }, $enumCasesNodes));
    }
    public function isBacked() : bool
    {
        return $this->backingType !== null;
    }
    public function getBackingType() : \PHPStan\BetterReflection\Reflection\ReflectionNamedType
    {
        if ($this->backingType === null) {
            throw new LogicException('This enum does not have a backing type available');
        }
        return $this->backingType;
    }
    private function createBackingType(EnumNode $node) : ?\PHPStan\BetterReflection\Reflection\ReflectionNamedType
    {
        if ($node->scalarType === null) {
            return null;
        }
        $backingType = \PHPStan\BetterReflection\Reflection\ReflectionNamedType::createFromNode($this->reflector, $this, $node->scalarType);
        assert($backingType instanceof \PHPStan\BetterReflection\Reflection\ReflectionNamedType);
        return $backingType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection;

use PhpParser\Node\Identifier;
use PhpParser\Node\IntersectionType;
use PhpParser\Node\Name;
use PhpParser\Node\NullableType;
use PhpParser\Node\UnionType;
use PHPStan\BetterReflection\Reflector\Reflector;
/** @psalm-immutable */
abstract class ReflectionType
{
    /**
     * @internal
     *
     * @psalm-pure
     * @param \PHPStan\BetterReflection\Reflection\ReflectionParameter|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionEnum|\PHPStan\BetterReflection\Reflection\ReflectionProperty $owner
     * @param \PhpParser\Node\Identifier|\PhpParser\Node\Name|\PhpParser\Node\NullableType|\PhpParser\Node\UnionType|\PhpParser\Node\IntersectionType $type
     * @return \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType
     */
    public static function createFromNode(Reflector $reflector, $owner, $type, bool $allowsNull = \false)
    {
        if ($type instanceof NullableType) {
            $type = $type->type;
            $allowsNull = \true;
        }
        if ($type instanceof Identifier || $type instanceof Name) {
            if ($type->toLowerString() === 'null' || $type->toLowerString() === 'mixed' || !$allowsNull) {
                return new \PHPStan\BetterReflection\Reflection\ReflectionNamedType($reflector, $owner, $type);
            }
            return new \PHPStan\BetterReflection\Reflection\ReflectionUnionType($reflector, $owner, new UnionType([$type, new Identifier('null')]));
        }
        if ($type instanceof IntersectionType) {
            return new \PHPStan\BetterReflection\Reflection\ReflectionIntersectionType($reflector, $owner, $type);
        }
        if (!$allowsNull) {
            return new \PHPStan\BetterReflection\Reflection\ReflectionUnionType($reflector, $owner, $type);
        }
        foreach ($type->types as $innerUnionType) {
            if (($innerUnionType instanceof Identifier || $innerUnionType instanceof Name) && $innerUnionType->toLowerString() === 'null') {
                return new \PHPStan\BetterReflection\Reflection\ReflectionUnionType($reflector, $owner, $type);
            }
        }
        $types = $type->types;
        $types[] = new Identifier('null');
        return new \PHPStan\BetterReflection\Reflection\ReflectionUnionType($reflector, $owner, new UnionType($types));
    }
    /**
     * Does the type allow null?
     */
    public abstract function allowsNull() : bool;
    /**
     * Convert this string type to a string
     *
     * @return non-empty-string
     */
    public abstract function __toString() : string;
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Attribute;

use PhpParser\Node;
use PHPStan\BetterReflection\Reflection\ReflectionAttribute;
use PHPStan\BetterReflection\Reflection\ReflectionClass;
use PHPStan\BetterReflection\Reflection\ReflectionClassConstant;
use PHPStan\BetterReflection\Reflection\ReflectionEnumCase;
use PHPStan\BetterReflection\Reflection\ReflectionFunction;
use PHPStan\BetterReflection\Reflection\ReflectionMethod;
use PHPStan\BetterReflection\Reflection\ReflectionParameter;
use PHPStan\BetterReflection\Reflection\ReflectionProperty;
use PHPStan\BetterReflection\Reflector\Reflector;
use function array_filter;
use function array_values;
use function count;
/** @internal */
class ReflectionAttributeHelper
{
    /**
     * @param Node\AttributeGroup[] $attrGroups
     *
     * @return list<ReflectionAttribute>
     *
     * @psalm-pure
     * @param \PHPStan\BetterReflection\Reflection\ReflectionClass|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionClassConstant|\PHPStan\BetterReflection\Reflection\ReflectionEnumCase|\PHPStan\BetterReflection\Reflection\ReflectionProperty|\PHPStan\BetterReflection\Reflection\ReflectionParameter $reflection
     */
    public static function createAttributes(Reflector $reflector, $reflection, array $attrGroups)
    {
        $repeated = [];
        foreach ($attrGroups as $attributesGroupNode) {
            foreach ($attributesGroupNode->attrs as $attributeNode) {
                $repeated[$attributeNode->name->toLowerString()][] = $attributeNode;
            }
        }
        $attributes = [];
        foreach ($attrGroups as $attributesGroupNode) {
            foreach ($attributesGroupNode->attrs as $attributeNode) {
                $attributes[] = new ReflectionAttribute($reflector, $attributeNode, $reflection, count($repeated[$attributeNode->name->toLowerString()]) > 1);
            }
        }
        return $attributes;
    }
    /**
     * @param list<ReflectionAttribute> $attributes
     *
     * @return list<ReflectionAttribute>
     *
     * @psalm-pure
     */
    public static function filterAttributesByName(array $attributes, string $name) : array
    {
        return array_values(array_filter($attributes, static function (ReflectionAttribute $attribute) use($name) : bool {
            return $attribute->getName() === $name;
        }));
    }
    /**
     * @param list<ReflectionAttribute> $attributes
     * @param class-string              $className
     *
     * @return list<ReflectionAttribute>
     *
     * @psalm-pure
     */
    public static function filterAttributesByInstance(array $attributes, string $className) : array
    {
        return array_values(array_filter($attributes, static function (ReflectionAttribute $attribute) use($className) : bool {
            $class = $attribute->getClass();
            return $class->getName() === $className || $class->isSubclassOf($className) || $class->implementsInterface($className);
        }));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection;

use PhpParser\Node;
use PhpParser\Node\IntersectionType;
use PHPStan\BetterReflection\Reflector\Reflector;
use function array_map;
use function assert;
use function implode;
/** @psalm-immutable */
class ReflectionIntersectionType extends \PHPStan\BetterReflection\Reflection\ReflectionType
{
    /** @var non-empty-list<ReflectionNamedType> */
    private $types;
    /** @internal
     * @param \PHPStan\BetterReflection\Reflection\ReflectionParameter|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionEnum|\PHPStan\BetterReflection\Reflection\ReflectionProperty $owner */
    public function __construct(Reflector $reflector, $owner, IntersectionType $type)
    {
        /** @var non-empty-list<ReflectionNamedType> $types */
        $types = array_map(static function ($type) use($reflector, $owner) : \PHPStan\BetterReflection\Reflection\ReflectionNamedType {
            $type = \PHPStan\BetterReflection\Reflection\ReflectionType::createFromNode($reflector, $owner, $type);
            assert($type instanceof \PHPStan\BetterReflection\Reflection\ReflectionNamedType);
            return $type;
        }, $type->types);
        $this->types = $types;
    }
    /** @internal
     * @param \PHPStan\BetterReflection\Reflection\ReflectionParameter|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionEnum|\PHPStan\BetterReflection\Reflection\ReflectionProperty $owner
     * @return $this */
    public function withOwner($owner)
    {
        $clone = clone $this;
        foreach ($clone->types as $typeNo => $innerType) {
            $clone->types[$typeNo] = $innerType->withOwner($owner);
        }
        return $clone;
    }
    /** @return non-empty-list<ReflectionNamedType> */
    public function getTypes() : array
    {
        return $this->types;
    }
    /** @return false */
    public function allowsNull() : bool
    {
        return \false;
    }
    /** @return non-empty-string */
    public function __toString() : string
    {
        // @infection-ignore-all UnwrapArrayMap: It works without array_map() as well but this is less magical
        return implode('&', array_map(static function (\PHPStan\BetterReflection\Reflection\ReflectionNamedType $type) : string {
            return $type->__toString();
        }, $this->types));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection;

use LogicException;
use PhpParser\Node;
use PhpParser\Node\Stmt\EnumCase;
use PHPStan\BetterReflection\NodeCompiler\CompiledValue;
use PHPStan\BetterReflection\NodeCompiler\CompileNodeToValue;
use PHPStan\BetterReflection\NodeCompiler\CompilerContext;
use PHPStan\BetterReflection\Reflection\Annotation\AnnotationHelper;
use PHPStan\BetterReflection\Reflection\Attribute\ReflectionAttributeHelper;
use PHPStan\BetterReflection\Reflection\StringCast\ReflectionEnumCaseStringCast;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\Util\CalculateReflectionColumn;
use PHPStan\BetterReflection\Util\GetLastDocComment;
use function assert;
use function is_int;
use function is_string;
/** @psalm-immutable */
class ReflectionEnumCase
{
    /** @var non-empty-string */
    private $name;
    /**
     * @var \PhpParser\Node\Expr|null
     */
    private $value;
    /** @var list<ReflectionAttribute> */
    private $attributes;
    /** @var non-empty-string|null */
    private $docComment;
    /** @var positive-int */
    private $startLine;
    /** @var positive-int */
    private $endLine;
    /** @var positive-int */
    private $startColumn;
    /** @var positive-int */
    private $endColumn;
    /** @psalm-allow-private-mutation
     * @var \PHPStan\BetterReflection\NodeCompiler\CompiledValue|null */
    private $compiledValue = null;
    /**
     * @var \PHPStan\BetterReflection\Reflector\Reflector
     */
    private $reflector;
    /**
     * @var \PHPStan\BetterReflection\Reflection\ReflectionEnum
     */
    private $enum;
    private function __construct(Reflector $reflector, EnumCase $node, \PHPStan\BetterReflection\Reflection\ReflectionEnum $enum)
    {
        $this->reflector = $reflector;
        $this->enum = $enum;
        $name = $node->name->toString();
        assert($name !== '');
        $this->name = $name;
        $this->value = $node->expr;
        $this->attributes = ReflectionAttributeHelper::createAttributes($reflector, $this, $node->attrGroups);
        $this->docComment = GetLastDocComment::forNode($node);
        $startLine = $node->getStartLine();
        assert($startLine > 0);
        $endLine = $node->getEndLine();
        assert($endLine > 0);
        $this->startLine = $startLine;
        $this->endLine = $endLine;
        $this->startColumn = CalculateReflectionColumn::getStartColumn($this->enum->getLocatedSource()->getSource(), $node);
        $this->endColumn = CalculateReflectionColumn::getEndColumn($this->enum->getLocatedSource()->getSource(), $node);
    }
    /** @internal */
    public static function createFromNode(Reflector $reflector, EnumCase $node, \PHPStan\BetterReflection\Reflection\ReflectionEnum $enum) : self
    {
        return new self($reflector, $node, $enum);
    }
    /** @return non-empty-string */
    public function getName() : string
    {
        return $this->name;
    }
    /**
     * @deprecated Use getValueExpression()
     */
    public function getValueExpr() : Node\Expr
    {
        return $this->getValueExpression();
    }
    /**
     * Check ReflectionEnum::isBacked() being true first to avoid throwing exception.
     *
     * @throws LogicException
     */
    public function getValueExpression() : Node\Expr
    {
        if ($this->value === null) {
            throw new LogicException('This enum case does not have a value');
        }
        return $this->value;
    }
    /**
     * @return string|int
     */
    public function getValue()
    {
        $value = $this->getCompiledValue()->value;
        assert(is_string($value) || is_int($value));
        return $value;
    }
    /**
     * Check ReflectionEnum::isBacked() being true first to avoid throwing exception.
     *
     * @throws LogicException
     */
    private function getCompiledValue() : CompiledValue
    {
        if ($this->value === null) {
            throw new LogicException('This enum case does not have a value');
        }
        if ($this->compiledValue === null) {
            $this->compiledValue = (new CompileNodeToValue())->__invoke($this->value, new CompilerContext($this->reflector, $this));
        }
        return $this->compiledValue;
    }
    /** @return positive-int */
    public function getStartLine() : int
    {
        return $this->startLine;
    }
    /** @return positive-int */
    public function getEndLine() : int
    {
        return $this->endLine;
    }
    /** @return positive-int */
    public function getStartColumn() : int
    {
        return $this->startColumn;
    }
    /** @return positive-int */
    public function getEndColumn() : int
    {
        return $this->endColumn;
    }
    public function getDeclaringEnum() : \PHPStan\BetterReflection\Reflection\ReflectionEnum
    {
        return $this->enum;
    }
    public function getDeclaringClass() : \PHPStan\BetterReflection\Reflection\ReflectionClass
    {
        return $this->enum;
    }
    /** @return non-empty-string|null */
    public function getDocComment() : ?string
    {
        return $this->docComment;
    }
    public function isDeprecated() : bool
    {
        return AnnotationHelper::isDeprecated($this->docComment);
    }
    /** @return list<ReflectionAttribute> */
    public function getAttributes() : array
    {
        return $this->attributes;
    }
    /** @return list<ReflectionAttribute> */
    public function getAttributesByName(string $name) : array
    {
        return ReflectionAttributeHelper::filterAttributesByName($this->getAttributes(), $name);
    }
    /**
     * @param class-string $className
     *
     * @return list<ReflectionAttribute>
     */
    public function getAttributesByInstance(string $className) : array
    {
        return ReflectionAttributeHelper::filterAttributesByInstance($this->getAttributes(), $className);
    }
    /** @return non-empty-string */
    public function __toString() : string
    {
        return ReflectionEnumCaseStringCast::toString($this);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection;

use Attribute;
use LogicException;
use PhpParser\Node;
use PHPStan\BetterReflection\NodeCompiler\CompileNodeToValue;
use PHPStan\BetterReflection\NodeCompiler\CompilerContext;
use PHPStan\BetterReflection\Reflection\StringCast\ReflectionAttributeStringCast;
use PHPStan\BetterReflection\Reflector\Reflector;
use function array_map;
use function assert;
/** @psalm-immutable */
class ReflectionAttribute
{
    /** @var non-empty-string */
    private $name;
    /** @var array<int|string, Node\Expr> */
    private $arguments = [];
    /**
     * @var \PHPStan\BetterReflection\Reflector\Reflector
     */
    private $reflector;
    /**
     * @var \PHPStan\BetterReflection\Reflection\ReflectionClass|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionClassConstant|\PHPStan\BetterReflection\Reflection\ReflectionEnumCase|\PHPStan\BetterReflection\Reflection\ReflectionProperty|\PHPStan\BetterReflection\Reflection\ReflectionParameter
     */
    private $owner;
    /**
     * @var bool
     */
    private $isRepeated;
    /** @internal
     * @param \PHPStan\BetterReflection\Reflection\ReflectionClass|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionClassConstant|\PHPStan\BetterReflection\Reflection\ReflectionEnumCase|\PHPStan\BetterReflection\Reflection\ReflectionProperty|\PHPStan\BetterReflection\Reflection\ReflectionParameter $owner */
    public function __construct(Reflector $reflector, Node\Attribute $node, $owner, bool $isRepeated)
    {
        $this->reflector = $reflector;
        $this->owner = $owner;
        $this->isRepeated = $isRepeated;
        $name = $node->name->toString();
        assert($name !== '');
        $this->name = $name;
        foreach ($node->args as $argNo => $arg) {
            $this->arguments[(($argName = $arg->name) ? $argName->toString() : null) ?? $argNo] = $arg->value;
        }
    }
    /** @internal
     * @param \PHPStan\BetterReflection\Reflection\ReflectionClass|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionClassConstant|\PHPStan\BetterReflection\Reflection\ReflectionEnumCase|\PHPStan\BetterReflection\Reflection\ReflectionProperty|\PHPStan\BetterReflection\Reflection\ReflectionParameter $owner */
    public function withOwner($owner) : self
    {
        $clone = clone $this;
        $clone->owner = $owner;
        return $clone;
    }
    /** @return non-empty-string */
    public function getName() : string
    {
        return $this->name;
    }
    public function getClass() : \PHPStan\BetterReflection\Reflection\ReflectionClass
    {
        return $this->reflector->reflectClass($this->getName());
    }
    /** @return array<int|string, Node\Expr> */
    public function getArgumentsExpressions() : array
    {
        return $this->arguments;
    }
    /**
     * @deprecated Use getArgumentsExpressions()
     * @return array<int|string, mixed>
     */
    public function getArguments() : array
    {
        $compiler = new CompileNodeToValue();
        $context = new CompilerContext($this->reflector, $this->owner);
        return array_map(static function (Node\Expr $value) use($compiler, $context) {
            return $compiler->__invoke($value, $context)->value;
        }, $this->arguments);
    }
    /** @return int-mask-of<Attribute::TARGET_*> */
    public function getTarget() : int
    {
        switch (\true) {
            case $this->owner instanceof \PHPStan\BetterReflection\Reflection\ReflectionClass:
                return Attribute::TARGET_CLASS;
            case $this->owner instanceof \PHPStan\BetterReflection\Reflection\ReflectionFunction:
                return Attribute::TARGET_FUNCTION;
            case $this->owner instanceof \PHPStan\BetterReflection\Reflection\ReflectionMethod:
                return Attribute::TARGET_METHOD;
            case $this->owner instanceof \PHPStan\BetterReflection\Reflection\ReflectionProperty:
                return Attribute::TARGET_PROPERTY;
            case $this->owner instanceof \PHPStan\BetterReflection\Reflection\ReflectionClassConstant:
                return Attribute::TARGET_CLASS_CONSTANT;
            case $this->owner instanceof \PHPStan\BetterReflection\Reflection\ReflectionEnumCase:
                return Attribute::TARGET_CLASS_CONSTANT;
            case $this->owner instanceof \PHPStan\BetterReflection\Reflection\ReflectionParameter:
                return Attribute::TARGET_PARAMETER;
            default:
                throw new LogicException('unknown owner');
        }
    }
    public function isRepeated() : bool
    {
        return $this->isRepeated;
    }
    /** @return non-empty-string */
    public function __toString() : string
    {
        return ReflectionAttributeStringCast::toString($this);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection;

/**
 * This interface is used internally by the Generic reflector in order to
 * ensure we are working with BetterReflection reflections.
 *
 * @internal
 *
 * @psalm-immutable
 */
interface Reflection
{
    /**
     * Get the name of the reflection (e.g. if this is a ReflectionClass this
     * will be the class name).
     */
    public function getName() : string;
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection;

use InvalidArgumentException;
use PhpParser\Builder\Property as PropertyNodeBuilder;
use PhpParser\Node\Stmt\Property as PropertyNode;
use ReflectionException;
use ReflectionObject as CoreReflectionObject;
use ReflectionProperty as CoreReflectionProperty;
use PHPStan\BetterReflection\BetterReflection;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty as ReflectionPropertyAdapter;
use PHPStan\BetterReflection\Reflector\DefaultReflector;
use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\AnonymousClassObjectSourceLocator;
use function array_filter;
use function array_map;
use function array_merge;
use function preg_match;
/** @psalm-immutable */
class ReflectionObject extends \PHPStan\BetterReflection\Reflection\ReflectionClass
{
    /**
     * @var \PHPStan\BetterReflection\Reflector\Reflector
     */
    private $reflector;
    /**
     * @var \PHPStan\BetterReflection\Reflection\ReflectionClass
     */
    private $reflectionClass;
    /**
     * @var object
     */
    private $object;
    protected function __construct(Reflector $reflector, \PHPStan\BetterReflection\Reflection\ReflectionClass $reflectionClass, object $object)
    {
        $this->reflector = $reflector;
        $this->reflectionClass = $reflectionClass;
        $this->object = $object;
    }
    /**
     * Pass an instance of an object to this method to reflect it
     *
     * @throws ReflectionException
     * @throws IdentifierNotFound
     */
    public static function createFromInstance(object $instance) : \PHPStan\BetterReflection\Reflection\ReflectionClass
    {
        $className = \get_class($instance);
        $betterReflection = new BetterReflection();
        if (preg_match(\PHPStan\BetterReflection\Reflection\ReflectionClass::ANONYMOUS_CLASS_NAME_PREFIX_REGEXP, $className) === 1) {
            $reflector = new DefaultReflector(new AggregateSourceLocator([$betterReflection->sourceLocator(), new AnonymousClassObjectSourceLocator($instance, $betterReflection->phpParser())]));
        } else {
            $reflector = $betterReflection->reflector();
        }
        return new self($reflector, $reflector->reflectClass($className), $instance);
    }
    /**
     * Reflect on runtime properties for the current instance
     *
     * @see ReflectionClass::getProperties() for the usage of $filter
     *
     * @param int-mask-of<ReflectionPropertyAdapter::IS_*> $filter
     *
     * @return array<non-empty-string, ReflectionProperty>
     */
    private function getRuntimeProperties(int $filter = 0) : array
    {
        if (!$this->reflectionClass->isInstance($this->object)) {
            throw new InvalidArgumentException('Cannot reflect runtime properties of a separate class');
        }
        if ($filter !== 0 && !($filter & CoreReflectionProperty::IS_PUBLIC)) {
            return [];
        }
        // Ensure we have already cached existing properties so we can add to them
        $this->reflectionClass->getProperties();
        // Only known current way is to use internal ReflectionObject to get
        // the runtime-declared properties  :/
        $reflectionProperties = (new CoreReflectionObject($this->object))->getProperties();
        $runtimeProperties = [];
        foreach ($reflectionProperties as $property) {
            $propertyName = $property->getName();
            if ($this->reflectionClass->hasProperty($propertyName)) {
                continue;
            }
            $propertyNode = $this->createPropertyNodeFromRuntimePropertyReflection($property, $this->object);
            $runtimeProperties[$propertyName] = \PHPStan\BetterReflection\Reflection\ReflectionProperty::createFromNode($this->reflector, $propertyNode, $propertyNode->props[0], $this, $this, \false, \false);
        }
        return $runtimeProperties;
    }
    /**
     * Create an AST PropertyNode given a reflection
     *
     * Note that we don't copy across DocBlock, protected, private or static
     * because runtime properties can't have these attributes.
     */
    private function createPropertyNodeFromRuntimePropertyReflection(CoreReflectionProperty $property, object $instance) : PropertyNode
    {
        $builder = new PropertyNodeBuilder($property->getName());
        $builder->setDefault($property->getValue($instance));
        $builder->makePublic();
        return $builder->getNode();
    }
    public function getShortName() : string
    {
        return $this->reflectionClass->getShortName();
    }
    public function getName() : string
    {
        return $this->reflectionClass->getName();
    }
    public function getNamespaceName() : ?string
    {
        return $this->reflectionClass->getNamespaceName();
    }
    public function inNamespace() : bool
    {
        return $this->reflectionClass->inNamespace();
    }
    /** @return non-empty-string|null */
    public function getExtensionName() : ?string
    {
        return $this->reflectionClass->getExtensionName();
    }
    /**
     * {@inheritdoc}
     */
    public function getMethods(int $filter = 0) : array
    {
        return $this->reflectionClass->getMethods($filter);
    }
    /**
     * {@inheritdoc}
     */
    public function getImmediateMethods(int $filter = 0) : array
    {
        return $this->reflectionClass->getImmediateMethods($filter);
    }
    /** @param non-empty-string $methodName */
    public function getMethod(string $methodName) : ?\PHPStan\BetterReflection\Reflection\ReflectionMethod
    {
        return $this->reflectionClass->getMethod($methodName);
    }
    /** @param non-empty-string $methodName */
    public function hasMethod(string $methodName) : bool
    {
        return $this->reflectionClass->hasMethod($methodName);
    }
    /**
     * {@inheritdoc}
     */
    public function getImmediateConstants(int $filter = 0) : array
    {
        return $this->reflectionClass->getImmediateConstants($filter);
    }
    /**
     * {@inheritdoc}
     */
    public function getConstants(int $filter = 0) : array
    {
        return $this->reflectionClass->getConstants($filter);
    }
    public function hasConstant(string $name) : bool
    {
        return $this->reflectionClass->hasConstant($name);
    }
    public function getConstant(string $name) : ?\PHPStan\BetterReflection\Reflection\ReflectionClassConstant
    {
        return $this->reflectionClass->getConstant($name);
    }
    public function getConstructor() : ?\PHPStan\BetterReflection\Reflection\ReflectionMethod
    {
        return $this->reflectionClass->getConstructor();
    }
    /**
     * {@inheritdoc}
     */
    public function getProperties(int $filter = 0) : array
    {
        return array_merge($this->reflectionClass->getProperties($filter), $this->getRuntimeProperties($filter));
    }
    /**
     * {@inheritdoc}
     */
    public function getImmediateProperties(int $filter = 0) : array
    {
        return array_merge($this->reflectionClass->getImmediateProperties($filter), $this->getRuntimeProperties($filter));
    }
    public function getProperty(string $name) : ?\PHPStan\BetterReflection\Reflection\ReflectionProperty
    {
        $runtimeProperties = $this->getRuntimeProperties();
        if (isset($runtimeProperties[$name])) {
            return $runtimeProperties[$name];
        }
        return $this->reflectionClass->getProperty($name);
    }
    public function hasProperty(string $name) : bool
    {
        $runtimeProperties = $this->getRuntimeProperties();
        return isset($runtimeProperties[$name]) || $this->reflectionClass->hasProperty($name);
    }
    /**
     * {@inheritdoc}
     */
    public function getDefaultProperties() : array
    {
        return array_map(static function (\PHPStan\BetterReflection\Reflection\ReflectionProperty $property) {
            return $property->getDefaultValue();
        }, array_filter($this->getProperties(), static function (\PHPStan\BetterReflection\Reflection\ReflectionProperty $property) : bool {
            return $property->isDefault();
        }));
    }
    /** @return non-empty-string|null */
    public function getFileName() : ?string
    {
        return $this->reflectionClass->getFileName();
    }
    public function getLocatedSource() : LocatedSource
    {
        return $this->reflectionClass->getLocatedSource();
    }
    public function getStartLine() : int
    {
        return $this->reflectionClass->getStartLine();
    }
    public function getEndLine() : int
    {
        return $this->reflectionClass->getEndLine();
    }
    public function getStartColumn() : int
    {
        return $this->reflectionClass->getStartColumn();
    }
    public function getEndColumn() : int
    {
        return $this->reflectionClass->getEndColumn();
    }
    public function getParentClass() : ?\PHPStan\BetterReflection\Reflection\ReflectionClass
    {
        return $this->reflectionClass->getParentClass();
    }
    /**
     * {@inheritdoc}
     */
    public function getParentClassNames() : array
    {
        return $this->reflectionClass->getParentClassNames();
    }
    /** @return non-empty-string|null */
    public function getDocComment() : ?string
    {
        return $this->reflectionClass->getDocComment();
    }
    public function isAnonymous() : bool
    {
        return $this->reflectionClass->isAnonymous();
    }
    public function isInternal() : bool
    {
        return $this->reflectionClass->isInternal();
    }
    public function isUserDefined() : bool
    {
        return $this->reflectionClass->isUserDefined();
    }
    public function isDeprecated() : bool
    {
        return $this->reflectionClass->isDeprecated();
    }
    public function isAbstract() : bool
    {
        return $this->reflectionClass->isAbstract();
    }
    public function isFinal() : bool
    {
        return $this->reflectionClass->isFinal();
    }
    public function isReadOnly() : bool
    {
        return $this->reflectionClass->isReadOnly();
    }
    public function getModifiers() : int
    {
        return $this->reflectionClass->getModifiers();
    }
    public function isTrait() : bool
    {
        return $this->reflectionClass->isTrait();
    }
    public function isInterface() : bool
    {
        return $this->reflectionClass->isInterface();
    }
    /**
     * {@inheritdoc}
     */
    public function getTraits() : array
    {
        return $this->reflectionClass->getTraits();
    }
    /**
     * {@inheritdoc}
     */
    public function getTraitNames() : array
    {
        return $this->reflectionClass->getTraitNames();
    }
    /**
     * {@inheritdoc}
     */
    public function getTraitAliases() : array
    {
        return $this->reflectionClass->getTraitAliases();
    }
    /**
     * {@inheritdoc}
     */
    public function getInterfaces() : array
    {
        return $this->reflectionClass->getInterfaces();
    }
    /**
     * {@inheritdoc}
     */
    public function getImmediateInterfaces() : array
    {
        return $this->reflectionClass->getImmediateInterfaces();
    }
    /**
     * {@inheritdoc}
     */
    public function getInterfaceNames() : array
    {
        return $this->reflectionClass->getInterfaceNames();
    }
    public function isInstance(object $object) : bool
    {
        return $this->reflectionClass->isInstance($object);
    }
    public function isSubclassOf(string $className) : bool
    {
        return $this->reflectionClass->isSubclassOf($className);
    }
    public function implementsInterface(string $interfaceName) : bool
    {
        return $this->reflectionClass->implementsInterface($interfaceName);
    }
    public function isInstantiable() : bool
    {
        return $this->reflectionClass->isInstantiable();
    }
    public function isCloneable() : bool
    {
        return $this->reflectionClass->isCloneable();
    }
    public function isIterateable() : bool
    {
        return $this->reflectionClass->isIterateable();
    }
    public function isEnum() : bool
    {
        return $this->reflectionClass->isEnum();
    }
    /**
     * {@inheritdoc}
     */
    public function getStaticProperties() : array
    {
        return $this->reflectionClass->getStaticProperties();
    }
    /**
     * @param mixed $value
     */
    public function setStaticPropertyValue(string $propertyName, $value) : void
    {
        $this->reflectionClass->setStaticPropertyValue($propertyName, $value);
    }
    /**
     * @return mixed
     */
    public function getStaticPropertyValue(string $propertyName)
    {
        return $this->reflectionClass->getStaticPropertyValue($propertyName);
    }
    /** @return list<ReflectionAttribute> */
    public function getAttributes() : array
    {
        return $this->reflectionClass->getAttributes();
    }
    /** @return list<ReflectionAttribute> */
    public function getAttributesByName(string $name) : array
    {
        return $this->reflectionClass->getAttributesByName($name);
    }
    /**
     * @param class-string $className
     *
     * @return list<ReflectionAttribute>
     */
    public function getAttributesByInstance(string $className) : array
    {
        return $this->reflectionClass->getAttributesByInstance($className);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection;

use PhpParser\Node;
use PhpParser\Node\Stmt\ClassConst;
use ReflectionClassConstant as CoreReflectionClassConstant;
use PHPStan\BetterReflection\BetterReflection;
use PHPStan\BetterReflection\NodeCompiler\CompiledValue;
use PHPStan\BetterReflection\NodeCompiler\CompileNodeToValue;
use PHPStan\BetterReflection\NodeCompiler\CompilerContext;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClassConstant as ReflectionClassConstantAdapter;
use PHPStan\BetterReflection\Reflection\Annotation\AnnotationHelper;
use PHPStan\BetterReflection\Reflection\Attribute\ReflectionAttributeHelper;
use PHPStan\BetterReflection\Reflection\StringCast\ReflectionClassConstantStringCast;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\Util\CalculateReflectionColumn;
use PHPStan\BetterReflection\Util\GetLastDocComment;
use function array_map;
use function assert;
/** @psalm-immutable */
class ReflectionClassConstant
{
    /** @var non-empty-string */
    private $name;
    /** @var int-mask-of<ReflectionClassConstantAdapter::IS_*> */
    private $modifiers;
    /**
     * @var \PhpParser\Node\Expr
     */
    private $value;
    /** @var non-empty-string|null */
    private $docComment;
    /** @var list<ReflectionAttribute> */
    private $attributes;
    /** @var positive-int */
    private $startLine;
    /** @var positive-int */
    private $endLine;
    /** @var positive-int */
    private $startColumn;
    /** @var positive-int */
    private $endColumn;
    /** @psalm-allow-private-mutation
     * @var \PHPStan\BetterReflection\NodeCompiler\CompiledValue|null */
    private $compiledValue = null;
    /**
     * @var \PHPStan\BetterReflection\Reflector\Reflector
     */
    private $reflector;
    /**
     * @var \PHPStan\BetterReflection\Reflection\ReflectionClass
     */
    private $declaringClass;
    /**
     * @var \PHPStan\BetterReflection\Reflection\ReflectionClass
     */
    private $implementingClass;
    private function __construct(Reflector $reflector, ClassConst $node, int $positionInNode, \PHPStan\BetterReflection\Reflection\ReflectionClass $declaringClass, \PHPStan\BetterReflection\Reflection\ReflectionClass $implementingClass)
    {
        $this->reflector = $reflector;
        $this->declaringClass = $declaringClass;
        $this->implementingClass = $implementingClass;
        $name = $node->consts[$positionInNode]->name->name;
        assert($name !== '');
        $this->name = $name;
        $this->modifiers = $this->computeModifiers($node);
        $this->value = $node->consts[$positionInNode]->value;
        $this->docComment = GetLastDocComment::forNode($node);
        $this->attributes = ReflectionAttributeHelper::createAttributes($reflector, $this, $node->attrGroups);
        $startLine = $node->getStartLine();
        assert($startLine > 0);
        $endLine = $node->getEndLine();
        assert($endLine > 0);
        $this->startLine = $startLine;
        $this->endLine = $endLine;
        $this->startColumn = CalculateReflectionColumn::getStartColumn($declaringClass->getLocatedSource()->getSource(), $node);
        $this->endColumn = CalculateReflectionColumn::getEndColumn($declaringClass->getLocatedSource()->getSource(), $node);
    }
    /**
     * Create a reflection of a class's constant by Const Node
     *
     * @internal
     */
    public static function createFromNode(Reflector $reflector, ClassConst $node, int $positionInNode, \PHPStan\BetterReflection\Reflection\ReflectionClass $declaringClass, \PHPStan\BetterReflection\Reflection\ReflectionClass $implementingClass) : self
    {
        return new self($reflector, $node, $positionInNode, $declaringClass, $implementingClass);
    }
    /** @internal */
    public function withImplementingClass(\PHPStan\BetterReflection\Reflection\ReflectionClass $implementingClass) : self
    {
        $clone = clone $this;
        $clone->implementingClass = $implementingClass;
        $clone->attributes = array_map(static function (\PHPStan\BetterReflection\Reflection\ReflectionAttribute $attribute) use($clone) : \PHPStan\BetterReflection\Reflection\ReflectionAttribute {
            return $attribute->withOwner($clone);
        }, $this->attributes);
        $this->compiledValue = null;
        return $clone;
    }
    /**
     * Get the name of the reflection (e.g. if this is a ReflectionClass this
     * will be the class name).
     *
     * @return non-empty-string
     */
    public function getName() : string
    {
        return $this->name;
    }
    /**
     * @deprecated Use getValueExpression
     */
    public function getValueExpr() : Node\Expr
    {
        return $this->getValueExpression();
    }
    public function getValueExpression() : Node\Expr
    {
        return $this->value;
    }
    /**
     * Returns constant value
     *
     * @deprecated Use getValueExpression()
     * @return mixed
     */
    public function getValue()
    {
        if ($this->compiledValue === null) {
            $this->compiledValue = (new CompileNodeToValue())->__invoke($this->value, new CompilerContext($this->reflector, $this));
        }
        return $this->compiledValue->value;
    }
    /**
     * Constant is public
     */
    public function isPublic() : bool
    {
        return ($this->modifiers & ReflectionClassConstantAdapter::IS_PUBLIC) === ReflectionClassConstantAdapter::IS_PUBLIC;
    }
    /**
     * Constant is private
     */
    public function isPrivate() : bool
    {
        // Private constant cannot be final
        return $this->modifiers === ReflectionClassConstantAdapter::IS_PRIVATE;
    }
    /**
     * Constant is protected
     */
    public function isProtected() : bool
    {
        return ($this->modifiers & ReflectionClassConstantAdapter::IS_PROTECTED) === ReflectionClassConstantAdapter::IS_PROTECTED;
    }
    public function isFinal() : bool
    {
        $final = ($this->modifiers & ReflectionClassConstantAdapter::IS_FINAL) === ReflectionClassConstantAdapter::IS_FINAL;
        if ($final) {
            return \true;
        }
        if (BetterReflection::$phpVersion >= 80100) {
            return \false;
        }
        return $this->getDeclaringClass()->isInterface();
    }
    /**
     * Returns a bitfield of the access modifiers for this constant
     *
     * @return int-mask-of<ReflectionClassConstantAdapter::IS_*>
     */
    public function getModifiers() : int
    {
        return $this->modifiers;
    }
    /**
     * Get the line number that this constant starts on.
     *
     * @return positive-int
     */
    public function getStartLine() : int
    {
        return $this->startLine;
    }
    /**
     * Get the line number that this constant ends on.
     *
     * @return positive-int
     */
    public function getEndLine() : int
    {
        return $this->endLine;
    }
    /** @return positive-int */
    public function getStartColumn() : int
    {
        return $this->startColumn;
    }
    /** @return positive-int */
    public function getEndColumn() : int
    {
        return $this->endColumn;
    }
    /**
     * Get the declaring class
     */
    public function getDeclaringClass() : \PHPStan\BetterReflection\Reflection\ReflectionClass
    {
        return $this->declaringClass;
    }
    /**
     * Get the class that implemented the method based on trait use.
     */
    public function getImplementingClass() : \PHPStan\BetterReflection\Reflection\ReflectionClass
    {
        return $this->implementingClass;
    }
    /** @return non-empty-string|null */
    public function getDocComment() : ?string
    {
        return $this->docComment;
    }
    public function isDeprecated() : bool
    {
        return AnnotationHelper::isDeprecated($this->getDocComment());
    }
    /** @return non-empty-string */
    public function __toString() : string
    {
        return ReflectionClassConstantStringCast::toString($this);
    }
    /** @return list<ReflectionAttribute> */
    public function getAttributes() : array
    {
        return $this->attributes;
    }
    /** @return list<ReflectionAttribute> */
    public function getAttributesByName(string $name) : array
    {
        return ReflectionAttributeHelper::filterAttributesByName($this->getAttributes(), $name);
    }
    /**
     * @param class-string $className
     *
     * @return list<ReflectionAttribute>
     */
    public function getAttributesByInstance(string $className) : array
    {
        return ReflectionAttributeHelper::filterAttributesByInstance($this->getAttributes(), $className);
    }
    /** @return int-mask-of<ReflectionClassConstantAdapter::IS_*> */
    private function computeModifiers(ClassConst $node) : int
    {
        $modifiers = $node->isFinal() ? ReflectionClassConstantAdapter::IS_FINAL : 0;
        $modifiers += $node->isPrivate() ? ReflectionClassConstantAdapter::IS_PRIVATE : 0;
        $modifiers += $node->isProtected() ? ReflectionClassConstantAdapter::IS_PROTECTED : 0;
        $modifiers += $node->isPublic() ? ReflectionClassConstantAdapter::IS_PUBLIC : 0;
        return $modifiers;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Exception;

use RuntimeException;
class CodeLocationMissing extends RuntimeException
{
    public static function create() : self
    {
        return new self('Code location is missing');
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Exception;

use RuntimeException;
class InvalidDefaultValueType extends RuntimeException
{
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Exception;

use LogicException;
class NoParent extends LogicException
{
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Exception;

use RuntimeException;
use function sprintf;
class PropertyDoesNotExist extends RuntimeException
{
    public static function fromName(string $propertyName) : self
    {
        return new self(sprintf('Property "%s" does not exist', $propertyName));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Exception;

use PhpParser\Node;
use PhpParser\PrettyPrinter\Standard;
use RuntimeException;
use function sprintf;
use function substr;
class InvalidConstantNode extends RuntimeException
{
    public static function create(Node $node) : self
    {
        return new self(sprintf('Invalid constant node (first 50 characters: %s)', substr((new Standard())->prettyPrint([$node]), 0, 50)));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Exception;

use RuntimeException;
use function sprintf;
class PropertyIsNotStatic extends RuntimeException
{
    public static function fromName(string $propertyName) : self
    {
        return new self(sprintf('Property "%s" is not static', $propertyName));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Exception;

use PHPStan\BetterReflection\Reflection\Reflection;
use RuntimeException;
use function sprintf;
class ClassDoesNotExist extends RuntimeException
{
    public static function forDifferentReflectionType(Reflection $reflection) : self
    {
        return new self(sprintf('The reflected type "%s" is not a class', $reflection->getName()));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Exception;

use PHPStan\BetterReflection\Reflection\ReflectionClass;
use UnexpectedValueException;
use function sprintf;
class NotAClassReflection extends UnexpectedValueException
{
    public static function fromReflectionClass(ReflectionClass $class) : self
    {
        $type = 'interface';
        if ($class->isTrait()) {
            $type = 'trait';
        }
        return new self(sprintf('Provided node "%s" is not class, but "%s"', $class->getName(), $type));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Exception;

use UnexpectedValueException;
use function sprintf;
class CircularReference extends UnexpectedValueException
{
    public static function fromClassName(string $className) : self
    {
        return new self(sprintf('Circular reference to class "%s"', $className));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Exception;

use RuntimeException;
use function sprintf;
class FunctionDoesNotExist extends RuntimeException
{
    public static function fromName(string $functionName) : self
    {
        return new self(sprintf('Function "%s" cannot be used as the function is not loaded', $functionName));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Exception;

use ReflectionException;
class MethodPrototypeNotFound extends ReflectionException
{
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Exception;

use PhpParser\Node\Stmt;
use PhpParser\PrettyPrinter\Standard;
use RuntimeException;
use function sprintf;
use function substr;
class InvalidArrowFunctionBodyNode extends RuntimeException
{
    public static function create(Stmt $node) : self
    {
        return new self(sprintf('Invalid arrow function body node (first 50 characters: %s)', substr((new Standard())->prettyPrint([$node]), 0, 50)));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Exception;

use InvalidArgumentException;
class NoObjectProvided extends InvalidArgumentException
{
    public static function create() : self
    {
        return new self('No object provided');
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Exception;

use InvalidArgumentException;
use function gettype;
use function sprintf;
class NotAnObject extends InvalidArgumentException
{
    /**
     * @param mixed $nonObject
     */
    public static function fromNonObject($nonObject) : self
    {
        return new self(sprintf('Provided "%s" is not an object', gettype($nonObject)));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Exception;

use PHPStan\BetterReflection\Reflection\ReflectionClass;
use UnexpectedValueException;
use function sprintf;
class NotAnInterfaceReflection extends UnexpectedValueException
{
    public static function fromReflectionClass(ReflectionClass $class) : self
    {
        $type = 'class';
        if ($class->isTrait()) {
            $type = 'trait';
        }
        return new self(sprintf('Provided node "%s" is not interface, but "%s"', $class->getName(), $type));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Exception;

use InvalidArgumentException;
use function sprintf;
class ObjectNotInstanceOfClass extends InvalidArgumentException
{
    public static function fromClassName(string $className) : self
    {
        return new self(sprintf('Object is not instance of class "%s"', $className));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection;

use Closure;
use OutOfBoundsException;
use PhpParser\Node;
use PhpParser\Node\Stmt\ClassMethod as MethodNode;
use ReflectionException;
use ReflectionMethod as CoreReflectionMethod;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod as ReflectionMethodAdapter;
use PHPStan\BetterReflection\Reflection\Exception\ClassDoesNotExist;
use PHPStan\BetterReflection\Reflection\Exception\NoObjectProvided;
use PHPStan\BetterReflection\Reflection\Exception\ObjectNotInstanceOfClass;
use PHPStan\BetterReflection\Reflection\StringCast\ReflectionMethodStringCast;
use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
use PHPStan\BetterReflection\Util\ClassExistenceChecker;
use function array_map;
use function assert;
use function sprintf;
use function strtolower;
/** @psalm-immutable */
class ReflectionMethod
{
    use \PHPStan\BetterReflection\Reflection\ReflectionFunctionAbstract;
    /** @var int-mask-of<ReflectionMethodAdapter::IS_*> */
    private $modifiers;
    /**
     * @var \PHPStan\BetterReflection\Reflector\Reflector
     */
    private $reflector;
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\Located\LocatedSource
     */
    private $locatedSource;
    /**
     * @var string|null
     */
    private $namespace;
    /**
     * @var \PHPStan\BetterReflection\Reflection\ReflectionClass
     */
    private $declaringClass;
    /**
     * @var \PHPStan\BetterReflection\Reflection\ReflectionClass
     */
    private $implementingClass;
    /**
     * @var \PHPStan\BetterReflection\Reflection\ReflectionClass
     */
    private $currentClass;
    /**
     * @var non-empty-string|null
     */
    private $aliasName;
    /** @param non-empty-string|null $aliasName
     * @param MethodNode|\PhpParser\Node\Stmt\Function_|\PhpParser\Node\Expr\Closure|\PhpParser\Node\Expr\ArrowFunction $node */
    private function __construct(Reflector $reflector, $node, LocatedSource $locatedSource, ?string $namespace, \PHPStan\BetterReflection\Reflection\ReflectionClass $declaringClass, \PHPStan\BetterReflection\Reflection\ReflectionClass $implementingClass, \PHPStan\BetterReflection\Reflection\ReflectionClass $currentClass, ?string $aliasName)
    {
        $this->reflector = $reflector;
        $this->locatedSource = $locatedSource;
        $this->namespace = $namespace;
        $this->declaringClass = $declaringClass;
        $this->implementingClass = $implementingClass;
        $this->currentClass = $currentClass;
        $this->aliasName = $aliasName;
        assert($node instanceof MethodNode);
        $name = $node->name->name;
        assert($name !== '');
        $this->name = $name;
        $this->modifiers = $this->computeModifiers($node);
        $this->fillFromNode($node);
    }
    /**
     * @internal
     *
     * @param non-empty-string|null $aliasName
     */
    public static function createFromNode(Reflector $reflector, MethodNode $node, LocatedSource $locatedSource, ?string $namespace, \PHPStan\BetterReflection\Reflection\ReflectionClass $declaringClass, \PHPStan\BetterReflection\Reflection\ReflectionClass $implementingClass, \PHPStan\BetterReflection\Reflection\ReflectionClass $currentClass, ?string $aliasName = null) : self
    {
        return new self($reflector, $node, $locatedSource, $namespace, $declaringClass, $implementingClass, $currentClass, $aliasName);
    }
    /**
     * Create a reflection of a method by it's name using a named class
     *
     * @param non-empty-string $methodName
     *
     * @throws IdentifierNotFound
     * @throws OutOfBoundsException
     */
    public static function createFromName(string $className, string $methodName) : self
    {
        $method = \PHPStan\BetterReflection\Reflection\ReflectionClass::createFromName($className)->getMethod($methodName);
        if ($method === null) {
            throw new OutOfBoundsException(sprintf('Could not find method: %s', $methodName));
        }
        return $method;
    }
    /**
     * Create a reflection of a method by it's name using an instance
     *
     * @param non-empty-string $methodName
     *
     * @throws ReflectionException
     * @throws IdentifierNotFound
     * @throws OutOfBoundsException
     */
    public static function createFromInstance(object $instance, string $methodName) : self
    {
        $method = \PHPStan\BetterReflection\Reflection\ReflectionClass::createFromInstance($instance)->getMethod($methodName);
        if ($method === null) {
            throw new OutOfBoundsException(sprintf('Could not find method: %s', $methodName));
        }
        return $method;
    }
    /**
     * @internal
     *
     * @param non-empty-string|null                      $aliasName
     * @param int-mask-of<ReflectionMethodAdapter::IS_*> $modifiers
     */
    public function withImplementingClass(\PHPStan\BetterReflection\Reflection\ReflectionClass $implementingClass, ?string $aliasName, int $modifiers) : self
    {
        $clone = clone $this;
        $clone->aliasName = $aliasName;
        $clone->modifiers = $modifiers;
        $clone->implementingClass = $implementingClass;
        $clone->currentClass = $implementingClass;
        if ($clone->returnType !== null) {
            $clone->returnType = $clone->returnType->withOwner($clone);
        }
        $clone->parameters = array_map(static function (\PHPStan\BetterReflection\Reflection\ReflectionParameter $parameter) use($clone) : \PHPStan\BetterReflection\Reflection\ReflectionParameter {
            return $parameter->withFunction($clone);
        }, $this->parameters);
        $clone->attributes = array_map(static function (\PHPStan\BetterReflection\Reflection\ReflectionAttribute $attribute) use($clone) : \PHPStan\BetterReflection\Reflection\ReflectionAttribute {
            return $attribute->withOwner($clone);
        }, $this->attributes);
        return $clone;
    }
    /** @internal */
    public function withCurrentClass(\PHPStan\BetterReflection\Reflection\ReflectionClass $currentClass) : self
    {
        $clone = clone $this;
        $clone->currentClass = $currentClass;
        if ($clone->returnType !== null) {
            $clone->returnType = $clone->returnType->withOwner($clone);
        }
        // We don't need to clone parameters and attributes
        return $clone;
    }
    /** @return non-empty-string */
    public function getShortName() : string
    {
        if ($this->aliasName !== null) {
            return $this->aliasName;
        }
        return $this->name;
    }
    /** @return non-empty-string|null */
    public function getAliasName() : ?string
    {
        return $this->aliasName;
    }
    /**
     * Find the prototype for this method, if it exists. If it does not exist
     * it will throw a MethodPrototypeNotFound exception.
     *
     * @throws Exception\MethodPrototypeNotFound
     */
    public function getPrototype() : self
    {
        $currentClass = $this->getImplementingClass();
        foreach ($currentClass->getImmediateInterfaces() as $interface) {
            $interfaceMethod = $interface->getMethod($this->getName());
            if ($interfaceMethod !== null) {
                return $interfaceMethod;
            }
        }
        $currentClass = $currentClass->getParentClass();
        if ($currentClass !== null) {
            $prototype = ($getMethod = $currentClass->getMethod($this->getName())) ? $getMethod->findPrototype() : null;
            if ($prototype !== null && (!$this->isConstructor() || $prototype->isAbstract())) {
                return $prototype;
            }
        }
        throw new \PHPStan\BetterReflection\Reflection\Exception\MethodPrototypeNotFound(sprintf('Method %s::%s does not have a prototype', $this->getDeclaringClass()->getName(), $this->getName()));
    }
    private function findPrototype() : ?self
    {
        if ($this->isAbstract()) {
            return $this;
        }
        if ($this->isPrivate()) {
            return null;
        }
        try {
            return $this->getPrototype();
        } catch (\PHPStan\BetterReflection\Reflection\Exception\MethodPrototypeNotFound $exception) {
            return $this;
        }
    }
    /**
     * Get the core-reflection-compatible modifier values.
     *
     * @return int-mask-of<ReflectionMethodAdapter::IS_*>
     */
    public function getModifiers() : int
    {
        return $this->modifiers;
    }
    /** @return int-mask-of<ReflectionMethodAdapter::IS_*> */
    private function computeModifiers(MethodNode $node) : int
    {
        $modifiers = $node->isStatic() ? CoreReflectionMethod::IS_STATIC : 0;
        $modifiers += $node->isPublic() ? CoreReflectionMethod::IS_PUBLIC : 0;
        $modifiers += $node->isProtected() ? CoreReflectionMethod::IS_PROTECTED : 0;
        $modifiers += $node->isPrivate() ? CoreReflectionMethod::IS_PRIVATE : 0;
        $modifiers += $node->isAbstract() ? CoreReflectionMethod::IS_ABSTRACT : 0;
        $modifiers += $node->isFinal() ? CoreReflectionMethod::IS_FINAL : 0;
        return $modifiers;
    }
    /** @return non-empty-string */
    public function __toString() : string
    {
        return ReflectionMethodStringCast::toString($this);
    }
    public function inNamespace() : bool
    {
        return \false;
    }
    public function getNamespaceName() : ?string
    {
        return null;
    }
    public function isClosure() : bool
    {
        return \false;
    }
    /**
     * Is the method abstract.
     */
    public function isAbstract() : bool
    {
        return ($this->modifiers & CoreReflectionMethod::IS_ABSTRACT) === CoreReflectionMethod::IS_ABSTRACT || $this->declaringClass->isInterface();
    }
    /**
     * Is the method final.
     */
    public function isFinal() : bool
    {
        return ($this->modifiers & CoreReflectionMethod::IS_FINAL) === CoreReflectionMethod::IS_FINAL;
    }
    /**
     * Is the method private visibility.
     */
    public function isPrivate() : bool
    {
        return ($this->modifiers & CoreReflectionMethod::IS_PRIVATE) === CoreReflectionMethod::IS_PRIVATE;
    }
    /**
     * Is the method protected visibility.
     */
    public function isProtected() : bool
    {
        return ($this->modifiers & CoreReflectionMethod::IS_PROTECTED) === CoreReflectionMethod::IS_PROTECTED;
    }
    /**
     * Is the method public visibility.
     */
    public function isPublic() : bool
    {
        return ($this->modifiers & CoreReflectionMethod::IS_PUBLIC) === CoreReflectionMethod::IS_PUBLIC;
    }
    /**
     * Is the method static.
     */
    public function isStatic() : bool
    {
        return ($this->modifiers & CoreReflectionMethod::IS_STATIC) === CoreReflectionMethod::IS_STATIC;
    }
    /**
     * Is the method a constructor.
     */
    public function isConstructor() : bool
    {
        if (strtolower($this->getName()) === '__construct') {
            return \true;
        }
        $declaringClass = $this->getDeclaringClass();
        if ($declaringClass->inNamespace()) {
            return \false;
        }
        return strtolower($this->getName()) === strtolower($declaringClass->getShortName());
    }
    /**
     * Is the method a destructor.
     */
    public function isDestructor() : bool
    {
        return strtolower($this->getName()) === '__destruct';
    }
    /**
     * Get the class that declares this method.
     */
    public function getDeclaringClass() : \PHPStan\BetterReflection\Reflection\ReflectionClass
    {
        return $this->declaringClass;
    }
    /**
     * Get the class that implemented the method based on trait use.
     */
    public function getImplementingClass() : \PHPStan\BetterReflection\Reflection\ReflectionClass
    {
        return $this->implementingClass;
    }
    /**
     * Get the current reflected class.
     *
     * @internal
     */
    public function getCurrentClass() : \PHPStan\BetterReflection\Reflection\ReflectionClass
    {
        return $this->currentClass;
    }
    /**
     * @throws ClassDoesNotExist
     * @throws NoObjectProvided
     * @throws ObjectNotInstanceOfClass
     */
    public function getClosure($object = null) : Closure
    {
        $declaringClassName = $this->getDeclaringClass()->getName();
        if ($this->isStatic()) {
            $this->assertClassExist($declaringClassName);
            return function (...$args) {
                return $this->callStaticMethod($args);
            };
        }
        $instance = $this->assertObject($object);
        return function (...$args) use($instance) {
            return $this->callObjectMethod($instance, $args);
        };
    }
    /**
     * @throws ClassDoesNotExist
     * @throws NoObjectProvided
     * @throws ObjectNotInstanceOfClass
     * @param mixed ...$args
     * @return mixed
     */
    public function invoke($object = null, ...$args)
    {
        return $this->invokeArgs($object, $args);
    }
    /**
     * @param array<mixed> $args
     *
     * @throws ClassDoesNotExist
     * @throws NoObjectProvided
     * @throws ObjectNotInstanceOfClass
     * @return mixed
     */
    public function invokeArgs($object = null, array $args = [])
    {
        $implementingClassName = $this->getImplementingClass()->getName();
        if ($this->isStatic()) {
            $this->assertClassExist($implementingClassName);
            return $this->callStaticMethod($args);
        }
        return $this->callObjectMethod($this->assertObject($object), $args);
    }
    /** @param array<mixed> $args
     * @return mixed */
    private function callStaticMethod(array $args)
    {
        $implementingClassName = $this->getImplementingClass()->getName();
        /** @psalm-suppress InvalidStringClass */
        $closure = Closure::bind(function (string $implementingClassName, string $_methodName, array $methodArgs) {
            return $implementingClassName::$_methodName(...$methodArgs);
        }, null, $implementingClassName);
        assert($closure instanceof Closure);
        return $closure->__invoke($implementingClassName, $this->getName(), $args);
    }
    /** @param array<mixed> $args
     * @return mixed */
    private function callObjectMethod(object $object, array $args)
    {
        /** @psalm-suppress MixedMethodCall */
        $closure = Closure::bind(function (object $object, string $methodName, array $methodArgs) {
            return $object->{$methodName}(...$methodArgs);
        }, $object, $this->getImplementingClass()->getName());
        assert($closure instanceof Closure);
        return $closure->__invoke($object, $this->getName(), $args);
    }
    /** @throws ClassDoesNotExist */
    private function assertClassExist(string $className) : void
    {
        if (!ClassExistenceChecker::classExists($className, \true) && !ClassExistenceChecker::traitExists($className, \true)) {
            throw new ClassDoesNotExist(sprintf('Method of class %s cannot be used as the class does not exist', $className));
        }
    }
    /**
     * @throws NoObjectProvided
     * @throws ObjectNotInstanceOfClass
     */
    private function assertObject($object) : object
    {
        if ($object === null) {
            throw NoObjectProvided::create();
        }
        $implementingClassName = $this->getImplementingClass()->getName();
        if (\get_class($object) !== $implementingClassName) {
            throw ObjectNotInstanceOfClass::fromClassName($implementingClassName);
        }
        return $object;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection;

use PhpParser\Node;
use PHPStan\BetterReflection\BetterReflection;
use PHPStan\BetterReflection\NodeCompiler\CompiledValue;
use PHPStan\BetterReflection\NodeCompiler\CompileNodeToValue;
use PHPStan\BetterReflection\NodeCompiler\CompilerContext;
use PHPStan\BetterReflection\Reflection\Annotation\AnnotationHelper;
use PHPStan\BetterReflection\Reflection\Exception\InvalidConstantNode;
use PHPStan\BetterReflection\Reflection\StringCast\ReflectionConstantStringCast;
use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
use PHPStan\BetterReflection\Util\CalculateReflectionColumn;
use PHPStan\BetterReflection\Util\ConstantNodeChecker;
use PHPStan\BetterReflection\Util\GetLastDocComment;
use function array_slice;
use function assert;
use function count;
use function explode;
use function implode;
use function is_int;
/** @psalm-immutable */
class ReflectionConstant implements \PHPStan\BetterReflection\Reflection\Reflection
{
    /**
     * @var non-empty-string
     * @psalm-allow-private-mutation
     */
    private $name;
    /**
     * @var non-empty-string
     * @psalm-allow-private-mutation
     */
    private $shortName;
    /**
     * @var \PhpParser\Node\Expr
     */
    private $value;
    /** @var non-empty-string|null */
    private $docComment;
    /** @var positive-int */
    private $startLine;
    /** @var positive-int */
    private $endLine;
    /** @var positive-int */
    private $startColumn;
    /** @var positive-int */
    private $endColumn;
    /** @psalm-allow-private-mutation
     * @var \PHPStan\BetterReflection\NodeCompiler\CompiledValue|null */
    private $compiledValue = null;
    /**
     * @var \PHPStan\BetterReflection\Reflector\Reflector
     */
    private $reflector;
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\Located\LocatedSource
     */
    private $locatedSource;
    /**
     * @var string|null
     */
    private $namespace = null;
    /**
     * @param \PhpParser\Node\Stmt\Const_|\PhpParser\Node\Expr\FuncCall $node
     */
    private function __construct(Reflector $reflector, $node, LocatedSource $locatedSource, ?string $namespace = null, ?int $positionInNode = null)
    {
        $this->reflector = $reflector;
        $this->locatedSource = $locatedSource;
        /** @psalm-allow-private-mutation */
        $this->namespace = $namespace;
        $this->setNamesFromNode($node, $positionInNode);
        if ($node instanceof Node\Expr\FuncCall) {
            $argumentValueNode = $node->args[1];
            assert($argumentValueNode instanceof Node\Arg);
            $this->value = $argumentValueNode->value;
        } else {
            /** @psalm-suppress PossiblyNullArrayOffset */
            $this->value = $node->consts[$positionInNode]->value;
        }
        $this->docComment = GetLastDocComment::forNode($node);
        $startLine = $node->getStartLine();
        assert($startLine > 0);
        $endLine = $node->getEndLine();
        assert($endLine > 0);
        $this->startLine = $startLine;
        $this->endLine = $endLine;
        $this->startColumn = CalculateReflectionColumn::getStartColumn($this->locatedSource->getSource(), $node);
        $this->endColumn = CalculateReflectionColumn::getEndColumn($this->locatedSource->getSource(), $node);
    }
    /**
     * Create a ReflectionConstant by name, using default reflectors etc.
     *
     * @deprecated Use Reflector instead.
     *
     * @throws IdentifierNotFound
     */
    public static function createFromName(string $constantName) : self
    {
        return (new BetterReflection())->reflector()->reflectConstant($constantName);
    }
    /**
     * Create a reflection of a constant
     *
     * @internal
     *
     * @param Node\Stmt\Const_|Node\Expr\FuncCall $node Node has to be processed by the PhpParser\NodeVisitor\NameResolver
     */
    public static function createFromNode(Reflector $reflector, Node $node, LocatedSource $locatedSource, ?string $namespace = null, ?int $positionInNode = null) : self
    {
        if ($node instanceof Node\Stmt\Const_) {
            assert(is_int($positionInNode));
            return self::createFromConstKeyword($reflector, $node, $locatedSource, $namespace, $positionInNode);
        }
        return self::createFromDefineFunctionCall($reflector, $node, $locatedSource);
    }
    private static function createFromConstKeyword(Reflector $reflector, Node\Stmt\Const_ $node, LocatedSource $locatedSource, ?string $namespace, int $positionInNode) : self
    {
        return new self($reflector, $node, $locatedSource, $namespace, $positionInNode);
    }
    /** @throws InvalidConstantNode */
    private static function createFromDefineFunctionCall(Reflector $reflector, Node\Expr\FuncCall $node, LocatedSource $locatedSource) : self
    {
        ConstantNodeChecker::assertValidDefineFunctionCall($node);
        return new self($reflector, $node, $locatedSource);
    }
    /**
     * Get the "short" name of the constant (e.g. for A\B\FOO, this will return
     * "FOO").
     *
     * @return non-empty-string
     */
    public function getShortName() : string
    {
        return $this->shortName;
    }
    /**
     * Get the "full" name of the constant (e.g. for A\B\FOO, this will return
     * "A\B\FOO").
     *
     * @return non-empty-string
     */
    public function getName() : string
    {
        return $this->name;
    }
    /**
     * Get the "namespace" name of the constant (e.g. for A\B\FOO, this will
     * return "A\B").
     */
    public function getNamespaceName() : ?string
    {
        return $this->namespace;
    }
    /**
     * Decide if this constant is part of a namespace. Returns false if the constant
     * is in the global namespace or does not have a specified namespace.
     */
    public function inNamespace() : bool
    {
        return $this->namespace !== null;
    }
    /** @return non-empty-string|null */
    public function getExtensionName() : ?string
    {
        return $this->locatedSource->getExtensionName();
    }
    /**
     * Is this an internal constant?
     */
    public function isInternal() : bool
    {
        return $this->locatedSource->isInternal();
    }
    /**
     * Is this a user-defined function (will always return the opposite of
     * whatever isInternal returns).
     */
    public function isUserDefined() : bool
    {
        return !$this->isInternal();
    }
    public function isDeprecated() : bool
    {
        return AnnotationHelper::isDeprecated($this->getDocComment());
    }
    /**
     * @deprecated Use getValueExpression()
     * @return Node\Expr
     */
    public function getValueExpr() : Node\Expr
    {
        return $this->getValueExpression();
    }
    public function getValueExpression() : Node\Expr
    {
        return $this->value;
    }
    /**
     * @deprecated Use getValueExpression()
     * @return mixed
     */
    public function getValue()
    {
        if ($this->compiledValue === null) {
            $this->compiledValue = (new CompileNodeToValue())->__invoke($this->value, new CompilerContext($this->reflector, $this));
        }
        return $this->compiledValue->value;
    }
    /** @return non-empty-string|null */
    public function getFileName() : ?string
    {
        return $this->locatedSource->getFileName();
    }
    public function getLocatedSource() : LocatedSource
    {
        return $this->locatedSource;
    }
    /**
     * Get the line number that this constant starts on.
     *
     * @return positive-int
     */
    public function getStartLine() : int
    {
        return $this->startLine;
    }
    /**
     * Get the line number that this constant ends on.
     *
     * @return positive-int
     */
    public function getEndLine() : int
    {
        return $this->endLine;
    }
    /** @return positive-int */
    public function getStartColumn() : int
    {
        return $this->startColumn;
    }
    /** @return positive-int */
    public function getEndColumn() : int
    {
        return $this->endColumn;
    }
    /** @return non-empty-string|null */
    public function getDocComment() : ?string
    {
        return $this->docComment;
    }
    /** @return non-empty-string */
    public function __toString() : string
    {
        return ReflectionConstantStringCast::toString($this);
    }
    /**
     * @param \PhpParser\Node\Stmt\Const_|\PhpParser\Node\Expr\FuncCall $node
     */
    private function setNamesFromNode($node, ?int $positionInNode) : void
    {
        if ($node instanceof Node\Expr\FuncCall) {
            $name = $this->getNameFromDefineFunctionCall($node);
            $nameParts = explode('\\', $name);
            $this->namespace = implode('\\', array_slice($nameParts, 0, -1)) ?: null;
            $shortName = $nameParts[count($nameParts) - 1];
            assert($shortName !== '');
        } else {
            /** @psalm-suppress PossiblyNullArrayOffset */
            $constNode = $node->consts[$positionInNode];
            $namespacedName = $constNode->namespacedName;
            assert($namespacedName instanceof Node\Name);
            $name = $namespacedName->toString();
            assert($name !== '');
            $shortName = $constNode->name->name;
            assert($shortName !== '');
        }
        $this->name = $name;
        $this->shortName = $shortName;
    }
    /** @return non-empty-string */
    private function getNameFromDefineFunctionCall(Node\Expr\FuncCall $node) : string
    {
        $argumentNameNode = $node->args[0];
        assert($argumentNameNode instanceof Node\Arg);
        $nameNode = $argumentNameNode->value;
        assert($nameNode instanceof Node\Scalar\String_);
        /** @psalm-var non-empty-string */
        return $nameNode->value;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection\Support;

use PHPStan\BetterReflection\Reflection\Exception\CircularReference;
use function array_key_exists;
/** @internal */
final class AlreadyVisitedClasses
{
    /**
     * @var array<class-string, null>
     */
    private $classNames;
    /** @param array<class-string, null> $classNames */
    private function __construct(array $classNames)
    {
        $this->classNames = $classNames;
    }
    public static function createEmpty() : self
    {
        return new self([]);
    }
    /** @param class-string $className */
    public function push(string $className) : void
    {
        if (array_key_exists($className, $this->classNames)) {
            throw CircularReference::fromClassName($className);
        }
        $this->classNames[$className] = null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection;

use Closure;
use Error;
use OutOfBoundsException;
use PhpParser\Node;
use PhpParser\Node\Stmt\Property as PropertyNode;
use ReflectionException;
use ReflectionProperty as CoreReflectionProperty;
use PHPStan\BetterReflection\NodeCompiler\CompiledValue;
use PHPStan\BetterReflection\NodeCompiler\CompileNodeToValue;
use PHPStan\BetterReflection\NodeCompiler\CompilerContext;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty as ReflectionPropertyAdapter;
use PHPStan\BetterReflection\Reflection\Annotation\AnnotationHelper;
use PHPStan\BetterReflection\Reflection\Attribute\ReflectionAttributeHelper;
use PHPStan\BetterReflection\Reflection\Exception\ClassDoesNotExist;
use PHPStan\BetterReflection\Reflection\Exception\CodeLocationMissing;
use PHPStan\BetterReflection\Reflection\Exception\NoObjectProvided;
use PHPStan\BetterReflection\Reflection\Exception\NotAnObject;
use PHPStan\BetterReflection\Reflection\Exception\ObjectNotInstanceOfClass;
use PHPStan\BetterReflection\Reflection\StringCast\ReflectionPropertyStringCast;
use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\Util\CalculateReflectionColumn;
use PHPStan\BetterReflection\Util\ClassExistenceChecker;
use PHPStan\BetterReflection\Util\Exception\NoNodePosition;
use PHPStan\BetterReflection\Util\GetLastDocComment;
use function array_map;
use function assert;
use function func_num_args;
use function is_object;
use function sprintf;
use function str_contains;
/** @psalm-immutable */
class ReflectionProperty
{
    /** @var non-empty-string */
    private $name;
    /** @var int-mask-of<ReflectionPropertyAdapter::IS_*> */
    private $modifiers;
    /**
     * @var \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType|null
     */
    private $type;
    /**
     * @var \PhpParser\Node\Expr|null
     */
    private $default;
    /** @var non-empty-string|null */
    private $docComment;
    /** @var list<ReflectionAttribute> */
    private $attributes;
    /** @var positive-int|null */
    private $startLine;
    /** @var positive-int|null */
    private $endLine;
    /** @var positive-int|null */
    private $startColumn;
    /** @var positive-int|null */
    private $endColumn;
    /** @psalm-allow-private-mutation
     * @var \PHPStan\BetterReflection\NodeCompiler\CompiledValue|null */
    private $compiledDefaultValue = null;
    /**
     * @var \PHPStan\BetterReflection\Reflector\Reflector
     */
    private $reflector;
    /**
     * @var \PHPStan\BetterReflection\Reflection\ReflectionClass
     */
    private $declaringClass;
    /**
     * @var \PHPStan\BetterReflection\Reflection\ReflectionClass
     */
    private $implementingClass;
    /**
     * @var bool
     */
    private $isPromoted;
    /**
     * @var bool
     */
    private $declaredAtCompileTime;
    private function __construct(Reflector $reflector, PropertyNode $node, Node\Stmt\PropertyProperty $propertyNode, \PHPStan\BetterReflection\Reflection\ReflectionClass $declaringClass, \PHPStan\BetterReflection\Reflection\ReflectionClass $implementingClass, bool $isPromoted, bool $declaredAtCompileTime)
    {
        $this->reflector = $reflector;
        $this->declaringClass = $declaringClass;
        $this->implementingClass = $implementingClass;
        $this->isPromoted = $isPromoted;
        $this->declaredAtCompileTime = $declaredAtCompileTime;
        $name = $propertyNode->name->name;
        assert($name !== '');
        $this->name = $name;
        $this->modifiers = $this->computeModifiers($node);
        $this->type = $this->createType($node);
        $this->default = $propertyNode->default;
        $this->docComment = GetLastDocComment::forNode($node);
        $this->attributes = ReflectionAttributeHelper::createAttributes($reflector, $this, $node->attrGroups);
        $startLine = null;
        if ($node->hasAttribute('startLine')) {
            $startLine = $node->getStartLine();
            assert($startLine > 0);
        }
        $endLine = null;
        if ($node->hasAttribute('endLine')) {
            $endLine = $node->getEndLine();
            assert($endLine > 0);
        }
        $this->startLine = $startLine;
        $this->endLine = $endLine;
        try {
            $this->startColumn = CalculateReflectionColumn::getStartColumn($declaringClass->getLocatedSource()->getSource(), $node);
        } catch (NoNodePosition $exception) {
            $this->startColumn = null;
        }
        try {
            $this->endColumn = CalculateReflectionColumn::getEndColumn($declaringClass->getLocatedSource()->getSource(), $node);
        } catch (NoNodePosition $exception) {
            $this->endColumn = null;
        }
    }
    /**
     * Create a reflection of a class's property by its name
     *
     * @param non-empty-string $propertyName
     *
     * @throws OutOfBoundsException
     */
    public static function createFromName(string $className, string $propertyName) : self
    {
        $property = \PHPStan\BetterReflection\Reflection\ReflectionClass::createFromName($className)->getProperty($propertyName);
        if ($property === null) {
            throw new OutOfBoundsException(sprintf('Could not find property: %s', $propertyName));
        }
        return $property;
    }
    /**
     * Create a reflection of an instance's property by its name
     *
     * @param non-empty-string $propertyName
     *
     * @throws ReflectionException
     * @throws IdentifierNotFound
     * @throws OutOfBoundsException
     */
    public static function createFromInstance(object $instance, string $propertyName) : self
    {
        $property = \PHPStan\BetterReflection\Reflection\ReflectionClass::createFromInstance($instance)->getProperty($propertyName);
        if ($property === null) {
            throw new OutOfBoundsException(sprintf('Could not find property: %s', $propertyName));
        }
        return $property;
    }
    /** @internal */
    public function withImplementingClass(\PHPStan\BetterReflection\Reflection\ReflectionClass $implementingClass) : self
    {
        $clone = clone $this;
        $clone->implementingClass = $implementingClass;
        if ($clone->type !== null) {
            $clone->type = $clone->type->withOwner($clone);
        }
        $clone->attributes = array_map(static function (\PHPStan\BetterReflection\Reflection\ReflectionAttribute $attribute) use($clone) : \PHPStan\BetterReflection\Reflection\ReflectionAttribute {
            return $attribute->withOwner($clone);
        }, $this->attributes);
        $this->compiledDefaultValue = null;
        return $clone;
    }
    /** @return non-empty-string */
    public function __toString() : string
    {
        return ReflectionPropertyStringCast::toString($this);
    }
    /**
     * @internal
     *
     * @param PropertyNode $node Node has to be processed by the PhpParser\NodeVisitor\NameResolver
     */
    public static function createFromNode(Reflector $reflector, PropertyNode $node, Node\Stmt\PropertyProperty $propertyProperty, \PHPStan\BetterReflection\Reflection\ReflectionClass $declaringClass, \PHPStan\BetterReflection\Reflection\ReflectionClass $implementingClass, bool $isPromoted = \false, bool $declaredAtCompileTime = \true) : self
    {
        return new self($reflector, $node, $propertyProperty, $declaringClass, $implementingClass, $isPromoted, $declaredAtCompileTime);
    }
    /**
     * Has the property been declared at compile-time?
     *
     * Note that unless the property is static, this is hard coded to return
     * true, because we are unable to reflect instances of classes, therefore
     * we can be sure that all properties are always declared at compile-time.
     */
    public function isDefault() : bool
    {
        return $this->declaredAtCompileTime;
    }
    /**
     * Get the core-reflection-compatible modifier values.
     *
     * @return int-mask-of<ReflectionPropertyAdapter::IS_*>
     */
    public function getModifiers() : int
    {
        return $this->modifiers;
    }
    /**
     * Get the name of the property.
     *
     * @return non-empty-string
     */
    public function getName() : string
    {
        return $this->name;
    }
    /**
     * Is the property private?
     */
    public function isPrivate() : bool
    {
        return ($this->modifiers & CoreReflectionProperty::IS_PRIVATE) === CoreReflectionProperty::IS_PRIVATE;
    }
    /**
     * Is the property protected?
     */
    public function isProtected() : bool
    {
        return ($this->modifiers & CoreReflectionProperty::IS_PROTECTED) === CoreReflectionProperty::IS_PROTECTED;
    }
    /**
     * Is the property public?
     */
    public function isPublic() : bool
    {
        return ($this->modifiers & CoreReflectionProperty::IS_PUBLIC) === CoreReflectionProperty::IS_PUBLIC;
    }
    /**
     * Is the property static?
     */
    public function isStatic() : bool
    {
        return ($this->modifiers & CoreReflectionProperty::IS_STATIC) === CoreReflectionProperty::IS_STATIC;
    }
    public function isPromoted() : bool
    {
        return $this->isPromoted;
    }
    public function isInitialized($object = null) : bool
    {
        if ($object === null && $this->isStatic()) {
            return !$this->hasType() || $this->hasDefaultValue();
        }
        try {
            $this->getValue($object);
            return \true;
            // @phpstan-ignore-next-line
        } catch (Error $e) {
            if (\strpos($e->getMessage(), 'must not be accessed before initialization') !== \false) {
                return \false;
            }
            throw $e;
        }
    }
    public function isReadOnly() : bool
    {
        return ($this->modifiers & ReflectionPropertyAdapter::IS_READONLY) === ReflectionPropertyAdapter::IS_READONLY || $this->getDeclaringClass()->isReadOnly();
    }
    public function getDeclaringClass() : \PHPStan\BetterReflection\Reflection\ReflectionClass
    {
        return $this->declaringClass;
    }
    public function getImplementingClass() : \PHPStan\BetterReflection\Reflection\ReflectionClass
    {
        return $this->implementingClass;
    }
    /** @return non-empty-string|null */
    public function getDocComment() : ?string
    {
        return $this->docComment;
    }
    public function hasDefaultValue() : bool
    {
        return !$this->hasType() || $this->default !== null;
    }
    /**
     * @deprecated Use getDefaultValueExpression()
     */
    public function getDefaultValueExpr() : ?\PhpParser\Node\Expr
    {
        return $this->getDefaultValueExpression();
    }
    public function getDefaultValueExpression() : ?\PhpParser\Node\Expr
    {
        return $this->default;
    }
    /**
     * Get the default value of the property (as defined before constructor is
     * called, when the property is defined)
     *
     * @deprecated Use getDefaultValueExpr()
     * @return mixed
     */
    public function getDefaultValue()
    {
        if ($this->default === null) {
            return null;
        }
        if ($this->compiledDefaultValue === null) {
            $this->compiledDefaultValue = (new CompileNodeToValue())->__invoke($this->default, new CompilerContext($this->reflector, $this));
        }
        /** @psalm-var scalar|array<scalar>|null $value */
        $value = $this->compiledDefaultValue->value;
        return $value;
    }
    public function isDeprecated() : bool
    {
        return AnnotationHelper::isDeprecated($this->getDocComment());
    }
    /**
     * Get the line number that this property starts on.
     *
     * @return positive-int
     *
     * @throws CodeLocationMissing
     */
    public function getStartLine() : int
    {
        if ($this->startLine === null) {
            throw CodeLocationMissing::create();
        }
        return $this->startLine;
    }
    /**
     * Get the line number that this property ends on.
     *
     * @return positive-int
     *
     * @throws CodeLocationMissing
     */
    public function getEndLine() : int
    {
        if ($this->endLine === null) {
            throw CodeLocationMissing::create();
        }
        return $this->endLine;
    }
    /**
     * @return positive-int
     *
     * @throws CodeLocationMissing
     */
    public function getStartColumn() : int
    {
        if ($this->startColumn === null) {
            throw CodeLocationMissing::create();
        }
        return $this->startColumn;
    }
    /**
     * @return positive-int
     *
     * @throws CodeLocationMissing
     */
    public function getEndColumn() : int
    {
        if ($this->endColumn === null) {
            throw CodeLocationMissing::create();
        }
        return $this->endColumn;
    }
    /** @return list<ReflectionAttribute> */
    public function getAttributes() : array
    {
        return $this->attributes;
    }
    /** @return list<ReflectionAttribute> */
    public function getAttributesByName(string $name) : array
    {
        return ReflectionAttributeHelper::filterAttributesByName($this->getAttributes(), $name);
    }
    /**
     * @param class-string $className
     *
     * @return list<ReflectionAttribute>
     */
    public function getAttributesByInstance(string $className) : array
    {
        return ReflectionAttributeHelper::filterAttributesByInstance($this->getAttributes(), $className);
    }
    /**
     * @throws ClassDoesNotExist
     * @throws NoObjectProvided
     * @throws ObjectNotInstanceOfClass
     * @return mixed
     */
    public function getValue($object = null)
    {
        $implementingClassName = $this->getImplementingClass()->getName();
        if ($this->isStatic()) {
            $this->assertClassExist($implementingClassName);
            $closure = Closure::bind(function (string $implementingClassName, string $propertyName) {
                return $implementingClassName::${$propertyName};
            }, null, $implementingClassName);
            assert($closure instanceof Closure);
            return $closure->__invoke($implementingClassName, $this->getName());
        }
        $instance = $this->assertObject($object);
        $closure = Closure::bind(function (object $instance, string $propertyName) {
            return $instance->{$propertyName};
        }, $instance, $implementingClassName);
        assert($closure instanceof Closure);
        return $closure->__invoke($instance, $this->getName());
    }
    /**
     * @throws ClassDoesNotExist
     * @throws NoObjectProvided
     * @throws NotAnObject
     * @throws ObjectNotInstanceOfClass
     * @param mixed $object
     * @param mixed $value
     */
    public function setValue($object, $value = null) : void
    {
        $implementingClassName = $this->getImplementingClass()->getName();
        if ($this->isStatic()) {
            $this->assertClassExist($implementingClassName);
            $closure = Closure::bind(function (string $_implementingClassName, string $_propertyName, $value) : void {
                /** @psalm-suppress MixedAssignment */
                $_implementingClassName::${$_propertyName} = $value;
            }, null, $implementingClassName);
            assert($closure instanceof Closure);
            $closure->__invoke($implementingClassName, $this->getName(), func_num_args() === 2 ? $value : $object);
            return;
        }
        $instance = $this->assertObject($object);
        $closure = Closure::bind(function (object $instance, string $propertyName, $value) : void {
            $instance->{$propertyName} = $value;
        }, $instance, $implementingClassName);
        assert($closure instanceof Closure);
        $closure->__invoke($instance, $this->getName(), $value);
    }
    /**
     * Does this property allow null?
     */
    public function allowsNull() : bool
    {
        return $this->type === null || $this->type->allowsNull();
    }
    /**
     * @return \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType|null
     */
    private function createType(PropertyNode $node)
    {
        $type = $node->type;
        if ($type === null) {
            return null;
        }
        assert($type instanceof Node\Identifier || $type instanceof Node\Name || $type instanceof Node\NullableType || $type instanceof Node\UnionType || $type instanceof Node\IntersectionType);
        return \PHPStan\BetterReflection\Reflection\ReflectionType::createFromNode($this->reflector, $this, $type);
    }
    /**
     * Get the ReflectionType instance representing the type declaration for
     * this property
     *
     * (note: this has nothing to do with DocBlocks).
     * @return \PHPStan\BetterReflection\Reflection\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\ReflectionIntersectionType|null
     */
    public function getType()
    {
        return $this->type;
    }
    /**
     * Does this property have a type declaration?
     *
     * (note: this has nothing to do with DocBlocks).
     */
    public function hasType() : bool
    {
        return $this->type !== null;
    }
    /**
     * @param class-string $className
     *
     * @throws ClassDoesNotExist
     */
    private function assertClassExist(string $className) : void
    {
        if (!ClassExistenceChecker::classExists($className, \true) && !ClassExistenceChecker::traitExists($className, \true)) {
            throw new ClassDoesNotExist('Property cannot be retrieved as the class does not exist');
        }
    }
    /**
     * @throws NoObjectProvided
     * @throws NotAnObject
     * @throws ObjectNotInstanceOfClass
     *
     * @psalm-assert object $object
     * @param mixed $object
     */
    private function assertObject($object) : object
    {
        if ($object === null) {
            throw NoObjectProvided::create();
        }
        if (!is_object($object)) {
            throw NotAnObject::fromNonObject($object);
        }
        $implementingClassName = $this->getImplementingClass()->getName();
        if (\get_class($object) !== $implementingClassName) {
            throw ObjectNotInstanceOfClass::fromClassName($implementingClassName);
        }
        return $object;
    }
    /** @return int-mask-of<ReflectionPropertyAdapter::IS_*> */
    private function computeModifiers(PropertyNode $node) : int
    {
        $modifiers = $node->isReadonly() ? ReflectionPropertyAdapter::IS_READONLY : 0;
        $modifiers += $node->isStatic() ? CoreReflectionProperty::IS_STATIC : 0;
        $modifiers += $node->isPrivate() ? CoreReflectionProperty::IS_PRIVATE : 0;
        $modifiers += $node->isProtected() ? CoreReflectionProperty::IS_PROTECTED : 0;
        $modifiers += $node->isPublic() ? CoreReflectionProperty::IS_PUBLIC : 0;
        return $modifiers;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection;

use Closure;
use PhpParser\Node;
use PHPStan\BetterReflection\BetterReflection;
use PHPStan\BetterReflection\Reflection\Adapter\Exception\NotImplemented;
use PHPStan\BetterReflection\Reflection\Exception\FunctionDoesNotExist;
use PHPStan\BetterReflection\Reflection\StringCast\ReflectionFunctionStringCast;
use PHPStan\BetterReflection\Reflector\DefaultReflector;
use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\ClosureSourceLocator;
use function assert;
use function function_exists;
/** @psalm-immutable */
class ReflectionFunction implements \PHPStan\BetterReflection\Reflection\Reflection
{
    use \PHPStan\BetterReflection\Reflection\ReflectionFunctionAbstract;
    public const CLOSURE_NAME = '{closure}';
    /**
     * @var bool
     */
    private $isStatic;
    /**
     * @var \PHPStan\BetterReflection\Reflector\Reflector
     */
    private $reflector;
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\Located\LocatedSource
     */
    private $locatedSource;
    /**
     * @var string|null
     */
    private $namespace = null;
    /**
     * @param \PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Function_|\PhpParser\Node\Expr\Closure|\PhpParser\Node\Expr\ArrowFunction $node
     */
    private function __construct(Reflector $reflector, $node, LocatedSource $locatedSource, ?string $namespace = null)
    {
        $this->reflector = $reflector;
        $this->locatedSource = $locatedSource;
        $this->namespace = $namespace;
        assert($node instanceof Node\Stmt\Function_ || $node instanceof Node\Expr\Closure || $node instanceof Node\Expr\ArrowFunction);
        $name = $node instanceof Node\Expr\Closure || $node instanceof Node\Expr\ArrowFunction ? self::CLOSURE_NAME : $node->name->name;
        assert($name !== '');
        $this->name = $name;
        $this->fillFromNode($node);
        $isClosure = $node instanceof Node\Expr\Closure || $node instanceof Node\Expr\ArrowFunction;
        $this->isStatic = $isClosure && $node->static;
        $this->isClosure = $isClosure;
        $this->isGenerator = $this->nodeIsOrContainsYield($node);
    }
    /**
     * @deprecated Use Reflector instead.
     *
     * @throws IdentifierNotFound
     */
    public static function createFromName(string $functionName) : self
    {
        return (new BetterReflection())->reflector()->reflectFunction($functionName);
    }
    /** @throws IdentifierNotFound */
    public static function createFromClosure(Closure $closure) : self
    {
        $configuration = new BetterReflection();
        return (new DefaultReflector(new AggregateSourceLocator([$configuration->sourceLocator(), new ClosureSourceLocator($closure, $configuration->phpParser())])))->reflectFunction(self::CLOSURE_NAME);
    }
    /** @return non-empty-string */
    public function __toString() : string
    {
        return ReflectionFunctionStringCast::toString($this);
    }
    /** @internal
     * @param \PhpParser\Node\Stmt\Function_|\PhpParser\Node\Expr\Closure|\PhpParser\Node\Expr\ArrowFunction $node */
    public static function createFromNode(Reflector $reflector, $node, LocatedSource $locatedSource, ?string $namespace = null) : self
    {
        return new self($reflector, $node, $locatedSource, $namespace);
    }
    /**
     * Get the "short" name of the function (e.g. for A\B\foo, this will return
     * "foo").
     *
     * @return non-empty-string
     */
    public function getShortName() : string
    {
        return $this->name;
    }
    /**
     * Check to see if this function has been disabled (by the PHP INI file
     * directive `disable_functions`).
     *
     * Note - we cannot reflect on internal functions (as there is no PHP source
     * code we can access. This means, at present, we can only EVER return false
     * from this function, because you cannot disable user-defined functions.
     *
     * @see https://php.net/manual/en/ini.core.php#ini.disable-functions
     *
     * @todo https://github.com/Roave/BetterReflection/issues/14
     */
    public function isDisabled() : bool
    {
        return \false;
    }
    public function isStatic() : bool
    {
        return $this->isStatic;
    }
    /**
     * @throws NotImplemented
     * @throws FunctionDoesNotExist
     */
    public function getClosure() : Closure
    {
        $this->assertIsNoClosure();
        $functionName = $this->getName();
        $this->assertFunctionExist($functionName);
        return static function (...$args) use($functionName) {
            return $functionName(...$args);
        };
    }
    /**
     * @throws NotImplemented
     * @throws FunctionDoesNotExist
     * @param mixed ...$args
     * @return mixed
     */
    public function invoke(...$args)
    {
        return $this->invokeArgs($args);
    }
    /**
     * @param array<mixed> $args
     *
     * @throws NotImplemented
     * @throws FunctionDoesNotExist
     * @return mixed
     */
    public function invokeArgs(array $args = [])
    {
        $this->assertIsNoClosure();
        $functionName = $this->getName();
        $this->assertFunctionExist($functionName);
        return $functionName(...$args);
    }
    /** @throws NotImplemented */
    private function assertIsNoClosure() : void
    {
        if ($this->isClosure()) {
            throw new NotImplemented('Not implemented for closures');
        }
    }
    /** @throws FunctionDoesNotExist */
    private function assertFunctionExist(string $functionName) : void
    {
        if (!function_exists($functionName)) {
            throw FunctionDoesNotExist::fromName($functionName);
        }
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\BetterReflection\Reflection;

use PhpParser\Node\Identifier;
use PhpParser\Node\IntersectionType;
use PhpParser\Node\Name;
use PhpParser\Node\UnionType;
use PHPStan\BetterReflection\Reflector\Reflector;
use function array_map;
use function assert;
use function implode;
use function sprintf;
/** @psalm-immutable */
class ReflectionUnionType extends \PHPStan\BetterReflection\Reflection\ReflectionType
{
    /** @var non-empty-list<ReflectionNamedType|ReflectionIntersectionType> */
    private $types;
    /** @internal
     * @param \PHPStan\BetterReflection\Reflection\ReflectionParameter|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionEnum|\PHPStan\BetterReflection\Reflection\ReflectionProperty $owner */
    public function __construct(Reflector $reflector, $owner, UnionType $type)
    {
        /** @var non-empty-list<ReflectionNamedType|ReflectionIntersectionType> $types */
        $types = array_map(static function ($type) use($reflector, $owner) {
            $type = \PHPStan\BetterReflection\Reflection\ReflectionType::createFromNode($reflector, $owner, $type);
            assert($type instanceof \PHPStan\BetterReflection\Reflection\ReflectionNamedType || $type instanceof \PHPStan\BetterReflection\Reflection\ReflectionIntersectionType);
            return $type;
        }, $type->types);
        $this->types = $types;
    }
    /** @internal
     * @param \PHPStan\BetterReflection\Reflection\ReflectionParameter|\PHPStan\BetterReflection\Reflection\ReflectionMethod|\PHPStan\BetterReflection\Reflection\ReflectionFunction|\PHPStan\BetterReflection\Reflection\ReflectionEnum|\PHPStan\BetterReflection\Reflection\ReflectionProperty $owner
     * @return $this */
    public function withOwner($owner)
    {
        $clone = clone $this;
        foreach ($clone->types as $typeNo => $innerType) {
            $clone->types[$typeNo] = $innerType->withOwner($owner);
        }
        return $clone;
    }
    /** @return non-empty-list<ReflectionNamedType|ReflectionIntersectionType> */
    public function getTypes() : array
    {
        return $this->types;
    }
    public function allowsNull() : bool
    {
        foreach ($this->types as $type) {
            if ($type->allowsNull()) {
                return \true;
            }
        }
        return \false;
    }
    /** @return non-empty-string */
    public function __toString() : string
    {
        return implode('|', array_map(static function (\PHPStan\BetterReflection\Reflection\ReflectionType $type) : string {
            if ($type instanceof \PHPStan\BetterReflection\Reflection\ReflectionIntersectionType) {
                return sprintf('(%s)', $type->__toString());
            }
            return $type->__toString();
        }, $this->types));
    }
}
{
    "$schema": "https://docs.renovatebot.com/renovate-schema.json",
    "extends": [
        "local>Ocramius/.github:renovate-config"
    ]
}
The MIT License (MIT)

Copyright (c) 2017 Roave, LLC.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\String;

use _PHPStan_dcc7b7cff\Symfony\Component\String\Exception\ExceptionInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\String\Exception\InvalidArgumentException;
/**
 * Represents a string of Unicode code points encoded as UTF-8.
 *
 * @author Nicolas Grekas <p@tchwork.com>
 * @author Hugo Hamon <hugohamon@neuf.fr>
 *
 * @throws ExceptionInterface
 */
class CodePointString extends AbstractUnicodeString
{
    public function __construct(string $string = '')
    {
        if ('' !== $string && !\preg_match('//u', $string)) {
            throw new InvalidArgumentException('Invalid UTF-8 string.');
        }
        $this->string = $string;
    }
    public function append(string ...$suffix) : AbstractString
    {
        $str = clone $this;
        $str->string .= 1 >= \count($suffix) ? $suffix[0] ?? '' : \implode('', $suffix);
        if (!\preg_match('//u', $str->string)) {
            throw new InvalidArgumentException('Invalid UTF-8 string.');
        }
        return $str;
    }
    public function chunk(int $length = 1) : array
    {
        if (1 > $length) {
            throw new InvalidArgumentException('The chunk length must be greater than zero.');
        }
        if ('' === $this->string) {
            return [];
        }
        $rx = '/(';
        while (65535 < $length) {
            $rx .= '.{65535}';
            $length -= 65535;
        }
        $rx .= '.{' . $length . '})/us';
        $str = clone $this;
        $chunks = [];
        foreach (\preg_split($rx, $this->string, -1, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY) as $chunk) {
            $str->string = $chunk;
            $chunks[] = clone $str;
        }
        return $chunks;
    }
    public function codePointsAt(int $offset) : array
    {
        $str = $offset ? $this->slice($offset, 1) : $this;
        return '' === $str->string ? [] : [\mb_ord($str->string, 'UTF-8')];
    }
    public function endsWith($suffix) : bool
    {
        if ($suffix instanceof AbstractString) {
            $suffix = $suffix->string;
        } elseif (\is_array($suffix) || $suffix instanceof \Traversable) {
            return parent::endsWith($suffix);
        } else {
            $suffix = (string) $suffix;
        }
        if ('' === $suffix || !\preg_match('//u', $suffix)) {
            return \false;
        }
        if ($this->ignoreCase) {
            return \preg_match('{' . \preg_quote($suffix) . '$}iuD', $this->string);
        }
        return \strlen($this->string) >= \strlen($suffix) && 0 === \substr_compare($this->string, $suffix, -\strlen($suffix));
    }
    public function equalsTo($string) : bool
    {
        if ($string instanceof AbstractString) {
            $string = $string->string;
        } elseif (\is_array($string) || $string instanceof \Traversable) {
            return parent::equalsTo($string);
        } else {
            $string = (string) $string;
        }
        if ('' !== $string && $this->ignoreCase) {
            return \strlen($string) === \strlen($this->string) && 0 === \mb_stripos($this->string, $string, 0, 'UTF-8');
        }
        return $string === $this->string;
    }
    public function indexOf($needle, int $offset = 0) : ?int
    {
        if ($needle instanceof AbstractString) {
            $needle = $needle->string;
        } elseif (\is_array($needle) || $needle instanceof \Traversable) {
            return parent::indexOf($needle, $offset);
        } else {
            $needle = (string) $needle;
        }
        if ('' === $needle) {
            return null;
        }
        $i = $this->ignoreCase ? \mb_stripos($this->string, $needle, $offset, 'UTF-8') : \mb_strpos($this->string, $needle, $offset, 'UTF-8');
        return \false === $i ? null : $i;
    }
    public function indexOfLast($needle, int $offset = 0) : ?int
    {
        if ($needle instanceof AbstractString) {
            $needle = $needle->string;
        } elseif (\is_array($needle) || $needle instanceof \Traversable) {
            return parent::indexOfLast($needle, $offset);
        } else {
            $needle = (string) $needle;
        }
        if ('' === $needle) {
            return null;
        }
        $i = $this->ignoreCase ? \mb_strripos($this->string, $needle, $offset, 'UTF-8') : \mb_strrpos($this->string, $needle, $offset, 'UTF-8');
        return \false === $i ? null : $i;
    }
    public function length() : int
    {
        return \mb_strlen($this->string, 'UTF-8');
    }
    public function prepend(string ...$prefix) : AbstractString
    {
        $str = clone $this;
        $str->string = (1 >= \count($prefix) ? $prefix[0] ?? '' : \implode('', $prefix)) . $this->string;
        if (!\preg_match('//u', $str->string)) {
            throw new InvalidArgumentException('Invalid UTF-8 string.');
        }
        return $str;
    }
    public function replace(string $from, string $to) : AbstractString
    {
        $str = clone $this;
        if ('' === $from || !\preg_match('//u', $from)) {
            return $str;
        }
        if ('' !== $to && !\preg_match('//u', $to)) {
            throw new InvalidArgumentException('Invalid UTF-8 string.');
        }
        if ($this->ignoreCase) {
            $str->string = \implode($to, \preg_split('{' . \preg_quote($from) . '}iuD', $this->string));
        } else {
            $str->string = \str_replace($from, $to, $this->string);
        }
        return $str;
    }
    public function slice(int $start = 0, int $length = null) : AbstractString
    {
        $str = clone $this;
        $str->string = \mb_substr($this->string, $start, $length, 'UTF-8');
        return $str;
    }
    public function splice(string $replacement, int $start = 0, int $length = null) : AbstractString
    {
        if (!\preg_match('//u', $replacement)) {
            throw new InvalidArgumentException('Invalid UTF-8 string.');
        }
        $str = clone $this;
        $start = $start ? \strlen(\mb_substr($this->string, 0, $start, 'UTF-8')) : 0;
        $length = $length ? \strlen(\mb_substr($this->string, $start, $length, 'UTF-8')) : $length;
        $str->string = \substr_replace($this->string, $replacement, $start, $length ?? \PHP_INT_MAX);
        return $str;
    }
    public function split(string $delimiter, int $limit = null, int $flags = null) : array
    {
        if (1 > ($limit = $limit ?? \PHP_INT_MAX)) {
            throw new InvalidArgumentException('Split limit must be a positive integer.');
        }
        if ('' === $delimiter) {
            throw new InvalidArgumentException('Split delimiter is empty.');
        }
        if (null !== $flags) {
            return parent::split($delimiter . 'u', $limit, $flags);
        }
        if (!\preg_match('//u', $delimiter)) {
            throw new InvalidArgumentException('Split delimiter is not a valid UTF-8 string.');
        }
        $str = clone $this;
        $chunks = $this->ignoreCase ? \preg_split('{' . \preg_quote($delimiter) . '}iuD', $this->string, $limit) : \explode($delimiter, $this->string, $limit);
        foreach ($chunks as &$chunk) {
            $str->string = $chunk;
            $chunk = clone $str;
        }
        return $chunks;
    }
    public function startsWith($prefix) : bool
    {
        if ($prefix instanceof AbstractString) {
            $prefix = $prefix->string;
        } elseif (\is_array($prefix) || $prefix instanceof \Traversable) {
            return parent::startsWith($prefix);
        } else {
            $prefix = (string) $prefix;
        }
        if ('' === $prefix || !\preg_match('//u', $prefix)) {
            return \false;
        }
        if ($this->ignoreCase) {
            return 0 === \mb_stripos($this->string, $prefix, 0, 'UTF-8');
        }
        return 0 === \strncmp($this->string, $prefix, \strlen($prefix));
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\String;

use _PHPStan_dcc7b7cff\Symfony\Component\String\Exception\ExceptionInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\String\Exception\InvalidArgumentException;
/**
 * Represents a string of Unicode grapheme clusters encoded as UTF-8.
 *
 * A letter followed by combining characters (accents typically) form what Unicode defines
 * as a grapheme cluster: a character as humans mean it in written texts. This class knows
 * about the concept and won't split a letter apart from its combining accents. It also
 * ensures all string comparisons happen on their canonically-composed representation,
 * ignoring e.g. the order in which accents are listed when a letter has many of them.
 *
 * @see https://unicode.org/reports/tr15/
 *
 * @author Nicolas Grekas <p@tchwork.com>
 * @author Hugo Hamon <hugohamon@neuf.fr>
 *
 * @throws ExceptionInterface
 */
class UnicodeString extends AbstractUnicodeString
{
    public function __construct(string $string = '')
    {
        $this->string = \normalizer_is_normalized($string) ? $string : \normalizer_normalize($string);
        if (\false === $this->string) {
            throw new InvalidArgumentException('Invalid UTF-8 string.');
        }
    }
    public function append(string ...$suffix) : AbstractString
    {
        $str = clone $this;
        $str->string = $this->string . (1 >= \count($suffix) ? $suffix[0] ?? '' : \implode('', $suffix));
        \normalizer_is_normalized($str->string) ?: ($str->string = \normalizer_normalize($str->string));
        if (\false === $str->string) {
            throw new InvalidArgumentException('Invalid UTF-8 string.');
        }
        return $str;
    }
    public function chunk(int $length = 1) : array
    {
        if (1 > $length) {
            throw new InvalidArgumentException('The chunk length must be greater than zero.');
        }
        if ('' === $this->string) {
            return [];
        }
        $rx = '/(';
        while (65535 < $length) {
            $rx .= '\\X{65535}';
            $length -= 65535;
        }
        $rx .= '\\X{' . $length . '})/u';
        $str = clone $this;
        $chunks = [];
        foreach (\preg_split($rx, $this->string, -1, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY) as $chunk) {
            $str->string = $chunk;
            $chunks[] = clone $str;
        }
        return $chunks;
    }
    public function endsWith($suffix) : bool
    {
        if ($suffix instanceof AbstractString) {
            $suffix = $suffix->string;
        } elseif (\is_array($suffix) || $suffix instanceof \Traversable) {
            return parent::endsWith($suffix);
        } else {
            $suffix = (string) $suffix;
        }
        $form = null === $this->ignoreCase ? \Normalizer::NFD : \Normalizer::NFC;
        \normalizer_is_normalized($suffix, $form) ?: ($suffix = \normalizer_normalize($suffix, $form));
        if ('' === $suffix || \false === $suffix) {
            return \false;
        }
        if ($this->ignoreCase) {
            return 0 === \mb_stripos(\grapheme_extract($this->string, \strlen($suffix), \GRAPHEME_EXTR_MAXBYTES, \strlen($this->string) - \strlen($suffix)), $suffix, 0, 'UTF-8');
        }
        return $suffix === \grapheme_extract($this->string, \strlen($suffix), \GRAPHEME_EXTR_MAXBYTES, \strlen($this->string) - \strlen($suffix));
    }
    public function equalsTo($string) : bool
    {
        if ($string instanceof AbstractString) {
            $string = $string->string;
        } elseif (\is_array($string) || $string instanceof \Traversable) {
            return parent::equalsTo($string);
        } else {
            $string = (string) $string;
        }
        $form = null === $this->ignoreCase ? \Normalizer::NFD : \Normalizer::NFC;
        \normalizer_is_normalized($string, $form) ?: ($string = \normalizer_normalize($string, $form));
        if ('' !== $string && \false !== $string && $this->ignoreCase) {
            return \strlen($string) === \strlen($this->string) && 0 === \mb_stripos($this->string, $string, 0, 'UTF-8');
        }
        return $string === $this->string;
    }
    public function indexOf($needle, int $offset = 0) : ?int
    {
        if ($needle instanceof AbstractString) {
            $needle = $needle->string;
        } elseif (\is_array($needle) || $needle instanceof \Traversable) {
            return parent::indexOf($needle, $offset);
        } else {
            $needle = (string) $needle;
        }
        $form = null === $this->ignoreCase ? \Normalizer::NFD : \Normalizer::NFC;
        \normalizer_is_normalized($needle, $form) ?: ($needle = \normalizer_normalize($needle, $form));
        if ('' === $needle || \false === $needle) {
            return null;
        }
        try {
            $i = $this->ignoreCase ? \grapheme_stripos($this->string, $needle, $offset) : \grapheme_strpos($this->string, $needle, $offset);
        } catch (\ValueError $e) {
            return null;
        }
        return \false === $i ? null : $i;
    }
    public function indexOfLast($needle, int $offset = 0) : ?int
    {
        if ($needle instanceof AbstractString) {
            $needle = $needle->string;
        } elseif (\is_array($needle) || $needle instanceof \Traversable) {
            return parent::indexOfLast($needle, $offset);
        } else {
            $needle = (string) $needle;
        }
        $form = null === $this->ignoreCase ? \Normalizer::NFD : \Normalizer::NFC;
        \normalizer_is_normalized($needle, $form) ?: ($needle = \normalizer_normalize($needle, $form));
        if ('' === $needle || \false === $needle) {
            return null;
        }
        $string = $this->string;
        if (0 > $offset) {
            // workaround https://bugs.php.net/74264
            if (0 > ($offset += \grapheme_strlen($needle))) {
                $string = \grapheme_substr($string, 0, $offset);
            }
            $offset = 0;
        }
        $i = $this->ignoreCase ? \grapheme_strripos($string, $needle, $offset) : \grapheme_strrpos($string, $needle, $offset);
        return \false === $i ? null : $i;
    }
    public function join(array $strings, string $lastGlue = null) : AbstractString
    {
        $str = parent::join($strings, $lastGlue);
        \normalizer_is_normalized($str->string) ?: ($str->string = \normalizer_normalize($str->string));
        return $str;
    }
    public function length() : int
    {
        return \grapheme_strlen($this->string);
    }
    /**
     * @return static
     */
    public function normalize(int $form = self::NFC) : parent
    {
        $str = clone $this;
        if (\in_array($form, [self::NFC, self::NFKC], \true)) {
            \normalizer_is_normalized($str->string, $form) ?: ($str->string = \normalizer_normalize($str->string, $form));
        } elseif (!\in_array($form, [self::NFD, self::NFKD], \true)) {
            throw new InvalidArgumentException('Unsupported normalization form.');
        } elseif (!\normalizer_is_normalized($str->string, $form)) {
            $str->string = \normalizer_normalize($str->string, $form);
            $str->ignoreCase = null;
        }
        return $str;
    }
    public function prepend(string ...$prefix) : AbstractString
    {
        $str = clone $this;
        $str->string = (1 >= \count($prefix) ? $prefix[0] ?? '' : \implode('', $prefix)) . $this->string;
        \normalizer_is_normalized($str->string) ?: ($str->string = \normalizer_normalize($str->string));
        if (\false === $str->string) {
            throw new InvalidArgumentException('Invalid UTF-8 string.');
        }
        return $str;
    }
    public function replace(string $from, string $to) : AbstractString
    {
        $str = clone $this;
        \normalizer_is_normalized($from) ?: ($from = \normalizer_normalize($from));
        if ('' !== $from && \false !== $from) {
            $tail = $str->string;
            $result = '';
            $indexOf = $this->ignoreCase ? 'grapheme_stripos' : 'grapheme_strpos';
            while ('' !== $tail && \false !== ($i = $indexOf($tail, $from))) {
                $slice = \grapheme_substr($tail, 0, $i);
                $result .= $slice . $to;
                $tail = \substr($tail, \strlen($slice) + \strlen($from));
            }
            $str->string = $result . $tail;
            \normalizer_is_normalized($str->string) ?: ($str->string = \normalizer_normalize($str->string));
            if (\false === $str->string) {
                throw new InvalidArgumentException('Invalid UTF-8 string.');
            }
        }
        return $str;
    }
    public function replaceMatches(string $fromRegexp, $to) : AbstractString
    {
        $str = parent::replaceMatches($fromRegexp, $to);
        \normalizer_is_normalized($str->string) ?: ($str->string = \normalizer_normalize($str->string));
        return $str;
    }
    public function slice(int $start = 0, int $length = null) : AbstractString
    {
        $str = clone $this;
        if (\PHP_VERSION_ID < 80000 && 0 > $start && \grapheme_strlen($this->string) < -$start) {
            $start = 0;
        }
        $str->string = (string) \grapheme_substr($this->string, $start, $length ?? 2147483647);
        return $str;
    }
    public function splice(string $replacement, int $start = 0, int $length = null) : AbstractString
    {
        $str = clone $this;
        if (\PHP_VERSION_ID < 80000 && 0 > $start && \grapheme_strlen($this->string) < -$start) {
            $start = 0;
        }
        $start = $start ? \strlen(\grapheme_substr($this->string, 0, $start)) : 0;
        $length = $length ? \strlen(\grapheme_substr($this->string, $start, $length ?? 2147483647)) : $length;
        $str->string = \substr_replace($this->string, $replacement, $start, $length ?? 2147483647);
        \normalizer_is_normalized($str->string) ?: ($str->string = \normalizer_normalize($str->string));
        if (\false === $str->string) {
            throw new InvalidArgumentException('Invalid UTF-8 string.');
        }
        return $str;
    }
    public function split(string $delimiter, int $limit = null, int $flags = null) : array
    {
        if (1 > ($limit = $limit ?? 2147483647)) {
            throw new InvalidArgumentException('Split limit must be a positive integer.');
        }
        if ('' === $delimiter) {
            throw new InvalidArgumentException('Split delimiter is empty.');
        }
        if (null !== $flags) {
            return parent::split($delimiter . 'u', $limit, $flags);
        }
        \normalizer_is_normalized($delimiter) ?: ($delimiter = \normalizer_normalize($delimiter));
        if (\false === $delimiter) {
            throw new InvalidArgumentException('Split delimiter is not a valid UTF-8 string.');
        }
        $str = clone $this;
        $tail = $this->string;
        $chunks = [];
        $indexOf = $this->ignoreCase ? 'grapheme_stripos' : 'grapheme_strpos';
        while (1 < $limit && \false !== ($i = $indexOf($tail, $delimiter))) {
            $str->string = \grapheme_substr($tail, 0, $i);
            $chunks[] = clone $str;
            $tail = \substr($tail, \strlen($str->string) + \strlen($delimiter));
            --$limit;
        }
        $str->string = $tail;
        $chunks[] = clone $str;
        return $chunks;
    }
    public function startsWith($prefix) : bool
    {
        if ($prefix instanceof AbstractString) {
            $prefix = $prefix->string;
        } elseif (\is_array($prefix) || $prefix instanceof \Traversable) {
            return parent::startsWith($prefix);
        } else {
            $prefix = (string) $prefix;
        }
        $form = null === $this->ignoreCase ? \Normalizer::NFD : \Normalizer::NFC;
        \normalizer_is_normalized($prefix, $form) ?: ($prefix = \normalizer_normalize($prefix, $form));
        if ('' === $prefix || \false === $prefix) {
            return \false;
        }
        if ($this->ignoreCase) {
            return 0 === \mb_stripos(\grapheme_extract($this->string, \strlen($prefix), \GRAPHEME_EXTR_MAXBYTES), $prefix, 0, 'UTF-8');
        }
        return $prefix === \grapheme_extract($this->string, \strlen($prefix), \GRAPHEME_EXTR_MAXBYTES);
    }
    public function __wakeup()
    {
        if (!\is_string($this->string)) {
            throw new \BadMethodCallException('Cannot unserialize ' . __CLASS__);
        }
        \normalizer_is_normalized($this->string) ?: ($this->string = \normalizer_normalize($this->string));
    }
    public function __clone()
    {
        if (null === $this->ignoreCase) {
            \normalizer_is_normalized($this->string) ?: ($this->string = \normalizer_normalize($this->string));
        }
        $this->ignoreCase = \false;
    }
}
Copyright (c) 2019-present Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\String;

/**
 * A string whose value is computed lazily by a callback.
 *
 * @author Nicolas Grekas <p@tchwork.com>
 */
class LazyString implements \Stringable, \JsonSerializable
{
    private $value;
    /**
     * @param callable|array $callback A callable or a [Closure, method] lazy-callable
     *
     * @return static
     */
    public static function fromCallable($callback, ...$arguments) : self
    {
        if (!\is_callable($callback) && !(\is_array($callback) && isset($callback[0]) && $callback[0] instanceof \Closure && 2 >= \count($callback))) {
            throw new \TypeError(\sprintf('Argument 1 passed to "%s()" must be a callable or a [Closure, method] lazy-callable, "%s" given.', __METHOD__, \get_debug_type($callback)));
        }
        $lazyString = new static();
        $lazyString->value = static function () use(&$callback, &$arguments, &$value) : string {
            if (null !== $arguments) {
                if (!\is_callable($callback)) {
                    $callback[0] = $callback[0]();
                    $callback[1] = $callback[1] ?? '__invoke';
                }
                $value = $callback(...$arguments);
                $callback = self::getPrettyName($callback);
                $arguments = null;
            }
            return $value ?? '';
        };
        return $lazyString;
    }
    /**
     * @param string|int|float|bool|\Stringable $value
     *
     * @return static
     */
    public static function fromStringable($value) : self
    {
        if (!self::isStringable($value)) {
            throw new \TypeError(\sprintf('Argument 1 passed to "%s()" must be a scalar or a stringable object, "%s" given.', __METHOD__, \get_debug_type($value)));
        }
        if (\is_object($value)) {
            return static::fromCallable([$value, '__toString']);
        }
        $lazyString = new static();
        $lazyString->value = (string) $value;
        return $lazyString;
    }
    /**
     * Tells whether the provided value can be cast to string.
     */
    public static final function isStringable($value) : bool
    {
        return \is_string($value) || $value instanceof self || (\is_object($value) ? \method_exists($value, '__toString') : \is_scalar($value));
    }
    /**
     * Casts scalars and stringable objects to strings.
     *
     * @param object|string|int|float|bool $value
     *
     * @throws \TypeError When the provided value is not stringable
     */
    public static final function resolve($value) : string
    {
        return $value;
    }
    /**
     * @return string
     */
    public function __toString()
    {
        if (\is_string($this->value)) {
            return $this->value;
        }
        try {
            return $this->value = ($this->value)();
        } catch (\Throwable $e) {
            if (\TypeError::class === \get_class($e) && __FILE__ === $e->getFile()) {
                $type = \explode(', ', $e->getMessage());
                $type = \substr(\array_pop($type), 0, -\strlen(' returned'));
                $r = new \ReflectionFunction($this->value);
                $callback = $r->getStaticVariables()['callback'];
                $e = new \TypeError(\sprintf('Return value of %s() passed to %s::fromCallable() must be of the type string, %s returned.', $callback, static::class, $type));
            }
            if (\PHP_VERSION_ID < 70400) {
                // leverage the ErrorHandler component with graceful fallback when it's not available
                return \trigger_error($e, \E_USER_ERROR);
            }
            throw $e;
        }
    }
    public function __sleep() : array
    {
        $this->__toString();
        return ['value'];
    }
    public function jsonSerialize() : string
    {
        return $this->__toString();
    }
    private function __construct()
    {
    }
    private static function getPrettyName(callable $callback) : string
    {
        if (\is_string($callback)) {
            return $callback;
        }
        if (\is_array($callback)) {
            $class = \is_object($callback[0]) ? \get_debug_type($callback[0]) : $callback[0];
            $method = $callback[1];
        } elseif ($callback instanceof \Closure) {
            $r = new \ReflectionFunction($callback);
            if (\false !== \strpos($r->name, '{closure}') || !($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass())) {
                return $r->name;
            }
            $class = $class->name;
            $method = $r->name;
        } else {
            $class = \get_debug_type($callback);
            $method = '__invoke';
        }
        return $class . '::' . $method;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\String;

use _PHPStan_dcc7b7cff\Symfony\Component\String\Exception\ExceptionInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\String\Exception\InvalidArgumentException;
use _PHPStan_dcc7b7cff\Symfony\Component\String\Exception\RuntimeException;
/**
 * Represents a string of abstract Unicode characters.
 *
 * Unicode defines 3 types of "characters" (bytes, code points and grapheme clusters).
 * This class is the abstract type to use as a type-hint when the logic you want to
 * implement is Unicode-aware but doesn't care about code points vs grapheme clusters.
 *
 * @author Nicolas Grekas <p@tchwork.com>
 *
 * @throws ExceptionInterface
 */
abstract class AbstractUnicodeString extends AbstractString
{
    public const NFC = \Normalizer::NFC;
    public const NFD = \Normalizer::NFD;
    public const NFKC = \Normalizer::NFKC;
    public const NFKD = \Normalizer::NFKD;
    // all ASCII letters sorted by typical frequency of occurrence
    private const ASCII = " eiasntrolud][cmp'\ng|hv.fb,:=-q10C2*yx)(L9AS/P\"EjMIk3>5T<D4}B{8FwR67UGN;JzV#HOW_&!K?XQ%Y\\\tZ+~^\$@`\x00\x01\x02\x03\x04\x05\x06\x07\x08\v\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f";
    // the subset of folded case mappings that is not in lower case mappings
    private const FOLD_FROM = ['İ', 'µ', 'ſ', "ͅ", 'ς', 'ϐ', 'ϑ', 'ϕ', 'ϖ', 'ϰ', 'ϱ', 'ϵ', 'ẛ', "ι", 'ß', 'ʼn', 'ǰ', 'ΐ', 'ΰ', 'և', 'ẖ', 'ẗ', 'ẘ', 'ẙ', 'ẚ', 'ẞ', 'ὐ', 'ὒ', 'ὔ', 'ὖ', 'ᾀ', 'ᾁ', 'ᾂ', 'ᾃ', 'ᾄ', 'ᾅ', 'ᾆ', 'ᾇ', 'ᾈ', 'ᾉ', 'ᾊ', 'ᾋ', 'ᾌ', 'ᾍ', 'ᾎ', 'ᾏ', 'ᾐ', 'ᾑ', 'ᾒ', 'ᾓ', 'ᾔ', 'ᾕ', 'ᾖ', 'ᾗ', 'ᾘ', 'ᾙ', 'ᾚ', 'ᾛ', 'ᾜ', 'ᾝ', 'ᾞ', 'ᾟ', 'ᾠ', 'ᾡ', 'ᾢ', 'ᾣ', 'ᾤ', 'ᾥ', 'ᾦ', 'ᾧ', 'ᾨ', 'ᾩ', 'ᾪ', 'ᾫ', 'ᾬ', 'ᾭ', 'ᾮ', 'ᾯ', 'ᾲ', 'ᾳ', 'ᾴ', 'ᾶ', 'ᾷ', 'ᾼ', 'ῂ', 'ῃ', 'ῄ', 'ῆ', 'ῇ', 'ῌ', 'ῒ', 'ῖ', 'ῗ', 'ῢ', 'ῤ', 'ῦ', 'ῧ', 'ῲ', 'ῳ', 'ῴ', 'ῶ', 'ῷ', 'ῼ', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'ſt', 'st', 'ﬓ', 'ﬔ', 'ﬕ', 'ﬖ', 'ﬗ'];
    private const FOLD_TO = ['i̇', 'μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', 'ṡ', 'ι', 'ss', 'ʼn', 'ǰ', 'ΐ', 'ΰ', 'եւ', 'ẖ', 'ẗ', 'ẘ', 'ẙ', 'aʾ', 'ss', 'ὐ', 'ὒ', 'ὔ', 'ὖ', 'ἀι', 'ἁι', 'ἂι', 'ἃι', 'ἄι', 'ἅι', 'ἆι', 'ἇι', 'ἀι', 'ἁι', 'ἂι', 'ἃι', 'ἄι', 'ἅι', 'ἆι', 'ἇι', 'ἠι', 'ἡι', 'ἢι', 'ἣι', 'ἤι', 'ἥι', 'ἦι', 'ἧι', 'ἠι', 'ἡι', 'ἢι', 'ἣι', 'ἤι', 'ἥι', 'ἦι', 'ἧι', 'ὠι', 'ὡι', 'ὢι', 'ὣι', 'ὤι', 'ὥι', 'ὦι', 'ὧι', 'ὠι', 'ὡι', 'ὢι', 'ὣι', 'ὤι', 'ὥι', 'ὦι', 'ὧι', 'ὰι', 'αι', 'άι', 'ᾶ', 'ᾶι', 'αι', 'ὴι', 'ηι', 'ήι', 'ῆ', 'ῆι', 'ηι', 'ῒ', 'ῖ', 'ῗ', 'ῢ', 'ῤ', 'ῦ', 'ῧ', 'ὼι', 'ωι', 'ώι', 'ῶ', 'ῶι', 'ωι', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'st', 'st', 'մն', 'մե', 'մի', 'վն', 'մխ'];
    // the subset of upper case mappings that map one code point to many code points
    private const UPPER_FROM = ['ß', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'ſt', 'st', 'և', 'ﬓ', 'ﬔ', 'ﬕ', 'ﬖ', 'ﬗ', 'ʼn', 'ΐ', 'ΰ', 'ǰ', 'ẖ', 'ẗ', 'ẘ', 'ẙ', 'ẚ', 'ὐ', 'ὒ', 'ὔ', 'ὖ', 'ᾶ', 'ῆ', 'ῒ', 'ΐ', 'ῖ', 'ῗ', 'ῢ', 'ΰ', 'ῤ', 'ῦ', 'ῧ', 'ῶ'];
    private const UPPER_TO = ['SS', 'FF', 'FI', 'FL', 'FFI', 'FFL', 'ST', 'ST', 'ԵՒ', 'ՄՆ', 'ՄԵ', 'ՄԻ', 'ՎՆ', 'ՄԽ', 'ʼN', 'Ϊ́', 'Ϋ́', 'J̌', 'H̱', 'T̈', 'W̊', 'Y̊', 'Aʾ', 'Υ̓', 'Υ̓̀', 'Υ̓́', 'Υ̓͂', 'Α͂', 'Η͂', 'Ϊ̀', 'Ϊ́', 'Ι͂', 'Ϊ͂', 'Ϋ̀', 'Ϋ́', 'Ρ̓', 'Υ͂', 'Ϋ͂', 'Ω͂'];
    // the subset of https://github.com/unicode-org/cldr/blob/master/common/transforms/Latin-ASCII.xml that is not in NFKD
    private const TRANSLIT_FROM = ['Æ', 'Ð', 'Ø', 'Þ', 'ß', 'æ', 'ð', 'ø', 'þ', 'Đ', 'đ', 'Ħ', 'ħ', 'ı', 'ĸ', 'Ŀ', 'ŀ', 'Ł', 'ł', 'ʼn', 'Ŋ', 'ŋ', 'Œ', 'œ', 'Ŧ', 'ŧ', 'ƀ', 'Ɓ', 'Ƃ', 'ƃ', 'Ƈ', 'ƈ', 'Ɖ', 'Ɗ', 'Ƌ', 'ƌ', 'Ɛ', 'Ƒ', 'ƒ', 'Ɠ', 'ƕ', 'Ɩ', 'Ɨ', 'Ƙ', 'ƙ', 'ƚ', 'Ɲ', 'ƞ', 'Ƣ', 'ƣ', 'Ƥ', 'ƥ', 'ƫ', 'Ƭ', 'ƭ', 'Ʈ', 'Ʋ', 'Ƴ', 'ƴ', 'Ƶ', 'ƶ', 'DŽ', 'Dž', 'dž', 'Ǥ', 'ǥ', 'ȡ', 'Ȥ', 'ȥ', 'ȴ', 'ȵ', 'ȶ', 'ȷ', 'ȸ', 'ȹ', 'Ⱥ', 'Ȼ', 'ȼ', 'Ƚ', 'Ⱦ', 'ȿ', 'ɀ', 'Ƀ', 'Ʉ', 'Ɇ', 'ɇ', 'Ɉ', 'ɉ', 'Ɍ', 'ɍ', 'Ɏ', 'ɏ', 'ɓ', 'ɕ', 'ɖ', 'ɗ', 'ɛ', 'ɟ', 'ɠ', 'ɡ', 'ɢ', 'ɦ', 'ɧ', 'ɨ', 'ɪ', 'ɫ', 'ɬ', 'ɭ', 'ɱ', 'ɲ', 'ɳ', 'ɴ', 'ɶ', 'ɼ', 'ɽ', 'ɾ', 'ʀ', 'ʂ', 'ʈ', 'ʉ', 'ʋ', 'ʏ', 'ʐ', 'ʑ', 'ʙ', 'ʛ', 'ʜ', 'ʝ', 'ʟ', 'ʠ', 'ʣ', 'ʥ', 'ʦ', 'ʪ', 'ʫ', 'ᴀ', 'ᴁ', 'ᴃ', 'ᴄ', 'ᴅ', 'ᴆ', 'ᴇ', 'ᴊ', 'ᴋ', 'ᴌ', 'ᴍ', 'ᴏ', 'ᴘ', 'ᴛ', 'ᴜ', 'ᴠ', 'ᴡ', 'ᴢ', 'ᵫ', 'ᵬ', 'ᵭ', 'ᵮ', 'ᵯ', 'ᵰ', 'ᵱ', 'ᵲ', 'ᵳ', 'ᵴ', 'ᵵ', 'ᵶ', 'ᵺ', 'ᵻ', 'ᵽ', 'ᵾ', 'ᶀ', 'ᶁ', 'ᶂ', 'ᶃ', 'ᶄ', 'ᶅ', 'ᶆ', 'ᶇ', 'ᶈ', 'ᶉ', 'ᶊ', 'ᶌ', 'ᶍ', 'ᶎ', 'ᶏ', 'ᶑ', 'ᶒ', 'ᶓ', 'ᶖ', 'ᶙ', 'ẚ', 'ẜ', 'ẝ', 'ẞ', 'Ỻ', 'ỻ', 'Ỽ', 'ỽ', 'Ỿ', 'ỿ', '©', '®', '₠', '₢', '₣', '₤', '₧', '₺', '₹', 'ℌ', '℞', '㎧', '㎮', '㏆', '㏗', '㏞', '㏟', '¼', '½', '¾', '⅓', '⅔', '⅕', '⅖', '⅗', '⅘', '⅙', '⅚', '⅛', '⅜', '⅝', '⅞', '⅟', '〇', '‘', '’', '‚', '‛', '“', '”', '„', '‟', '′', '″', '〝', '〞', '«', '»', '‹', '›', '‐', '‑', '‒', '–', '—', '―', '︱', '︲', '﹘', '‖', '⁄', '⁅', '⁆', '⁎', '、', '。', '〈', '〉', '《', '》', '〔', '〕', '〘', '〙', '〚', '〛', '︑', '︒', '︹', '︺', '︽', '︾', '︿', '﹀', '﹑', '﹝', '﹞', '⦅', '⦆', '。', '、', '×', '÷', '−', '∕', '∖', '∣', '∥', '≪', '≫', '⦅', '⦆'];
    private const TRANSLIT_TO = ['AE', 'D', 'O', 'TH', 'ss', 'ae', 'd', 'o', 'th', 'D', 'd', 'H', 'h', 'i', 'q', 'L', 'l', 'L', 'l', '\'n', 'N', 'n', 'OE', 'oe', 'T', 't', 'b', 'B', 'B', 'b', 'C', 'c', 'D', 'D', 'D', 'd', 'E', 'F', 'f', 'G', 'hv', 'I', 'I', 'K', 'k', 'l', 'N', 'n', 'OI', 'oi', 'P', 'p', 't', 'T', 't', 'T', 'V', 'Y', 'y', 'Z', 'z', 'DZ', 'Dz', 'dz', 'G', 'g', 'd', 'Z', 'z', 'l', 'n', 't', 'j', 'db', 'qp', 'A', 'C', 'c', 'L', 'T', 's', 'z', 'B', 'U', 'E', 'e', 'J', 'j', 'R', 'r', 'Y', 'y', 'b', 'c', 'd', 'd', 'e', 'j', 'g', 'g', 'G', 'h', 'h', 'i', 'I', 'l', 'l', 'l', 'm', 'n', 'n', 'N', 'OE', 'r', 'r', 'r', 'R', 's', 't', 'u', 'v', 'Y', 'z', 'z', 'B', 'G', 'H', 'j', 'L', 'q', 'dz', 'dz', 'ts', 'ls', 'lz', 'A', 'AE', 'B', 'C', 'D', 'D', 'E', 'J', 'K', 'L', 'M', 'O', 'P', 'T', 'U', 'V', 'W', 'Z', 'ue', 'b', 'd', 'f', 'm', 'n', 'p', 'r', 'r', 's', 't', 'z', 'th', 'I', 'p', 'U', 'b', 'd', 'f', 'g', 'k', 'l', 'm', 'n', 'p', 'r', 's', 'v', 'x', 'z', 'a', 'd', 'e', 'e', 'i', 'u', 'a', 's', 's', 'SS', 'LL', 'll', 'V', 'v', 'Y', 'y', '(C)', '(R)', 'CE', 'Cr', 'Fr.', 'L.', 'Pts', 'TL', 'Rs', 'x', 'Rx', 'm/s', 'rad/s', 'C/kg', 'pH', 'V/m', 'A/m', ' 1/4', ' 1/2', ' 3/4', ' 1/3', ' 2/3', ' 1/5', ' 2/5', ' 3/5', ' 4/5', ' 1/6', ' 5/6', ' 1/8', ' 3/8', ' 5/8', ' 7/8', ' 1/', '0', '\'', '\'', ',', '\'', '"', '"', ',,', '"', '\'', '"', '"', '"', '<<', '>>', '<', '>', '-', '-', '-', '-', '-', '-', '-', '-', '-', '||', '/', '[', ']', '*', ',', '.', '<', '>', '<<', '>>', '[', ']', '[', ']', '[', ']', ',', '.', '[', ']', '<<', '>>', '<', '>', ',', '[', ']', '((', '))', '.', ',', '*', '/', '-', '/', '\\', '|', '||', '<<', '>>', '((', '))'];
    private static $transliterators = [];
    private static $tableZero;
    private static $tableWide;
    /**
     * @return static
     */
    public static function fromCodePoints(int ...$codes) : self
    {
        $string = '';
        foreach ($codes as $code) {
            if (0x80 > ($code %= 0x200000)) {
                $string .= \chr($code);
            } elseif (0x800 > $code) {
                $string .= \chr(0xc0 | $code >> 6) . \chr(0x80 | $code & 0x3f);
            } elseif (0x10000 > $code) {
                $string .= \chr(0xe0 | $code >> 12) . \chr(0x80 | $code >> 6 & 0x3f) . \chr(0x80 | $code & 0x3f);
            } else {
                $string .= \chr(0xf0 | $code >> 18) . \chr(0x80 | $code >> 12 & 0x3f) . \chr(0x80 | $code >> 6 & 0x3f) . \chr(0x80 | $code & 0x3f);
            }
        }
        return new static($string);
    }
    /**
     * Generic UTF-8 to ASCII transliteration.
     *
     * Install the intl extension for best results.
     *
     * @param string[]|\Transliterator[]|\Closure[] $rules See "*-Latin" rules from Transliterator::listIDs()
     */
    public function ascii(array $rules = []) : self
    {
        $str = clone $this;
        $s = $str->string;
        $str->string = '';
        \array_unshift($rules, 'nfd');
        $rules[] = 'latin-ascii';
        if (\function_exists('transliterator_transliterate')) {
            $rules[] = 'any-latin/bgn';
        }
        $rules[] = 'nfkd';
        $rules[] = '[:nonspacing mark:] remove';
        while (\strlen($s) - 1 > ($i = \strspn($s, self::ASCII))) {
            if (0 < --$i) {
                $str->string .= \substr($s, 0, $i);
                $s = \substr($s, $i);
            }
            if (!($rule = \array_shift($rules))) {
                $rules = [];
                // An empty rule interrupts the next ones
            }
            if ($rule instanceof \Transliterator) {
                $s = $rule->transliterate($s);
            } elseif ($rule instanceof \Closure) {
                $s = $rule($s);
            } elseif ($rule) {
                if ('nfd' === ($rule = \strtolower($rule))) {
                    \normalizer_is_normalized($s, self::NFD) ?: ($s = \normalizer_normalize($s, self::NFD));
                } elseif ('nfkd' === $rule) {
                    \normalizer_is_normalized($s, self::NFKD) ?: ($s = \normalizer_normalize($s, self::NFKD));
                } elseif ('[:nonspacing mark:] remove' === $rule) {
                    $s = \preg_replace('/\\p{Mn}++/u', '', $s);
                } elseif ('latin-ascii' === $rule) {
                    $s = \str_replace(self::TRANSLIT_FROM, self::TRANSLIT_TO, $s);
                } elseif ('de-ascii' === $rule) {
                    $s = \preg_replace("/([AUO])̈(?=\\p{Ll})/u", '$1e', $s);
                    $s = \str_replace(["ä", "ö", "ü", "Ä", "Ö", "Ü"], ['ae', 'oe', 'ue', 'AE', 'OE', 'UE'], $s);
                } elseif (\function_exists('transliterator_transliterate')) {
                    if (null === ($transliterator = self::$transliterators[$rule] ?? (self::$transliterators[$rule] = \Transliterator::create($rule)))) {
                        if ('any-latin/bgn' === $rule) {
                            $rule = 'any-latin';
                            $transliterator = self::$transliterators[$rule] ?? (self::$transliterators[$rule] = \Transliterator::create($rule));
                        }
                        if (null === $transliterator) {
                            throw new InvalidArgumentException(\sprintf('Unknown transliteration rule "%s".', $rule));
                        }
                        self::$transliterators['any-latin/bgn'] = $transliterator;
                    }
                    $s = $transliterator->transliterate($s);
                }
            } elseif (!\function_exists('iconv')) {
                $s = \preg_replace('/[^\\x00-\\x7F]/u', '?', $s);
            } else {
                $s = @\preg_replace_callback('/[^\\x00-\\x7F]/u', static function ($c) {
                    $c = (string) \iconv('UTF-8', 'ASCII//TRANSLIT', $c[0]);
                    if ('' === $c && '' === \iconv('UTF-8', 'ASCII//TRANSLIT', '²')) {
                        throw new \LogicException(\sprintf('"%s" requires a translit-able iconv implementation, try installing "gnu-libiconv" if you\'re using Alpine Linux.', static::class));
                    }
                    return 1 < \strlen($c) ? \ltrim($c, '\'`"^~') : ('' !== $c ? $c : '?');
                }, $s);
            }
        }
        $str->string .= $s;
        return $str;
    }
    public function camel() : parent
    {
        $str = clone $this;
        $str->string = \str_replace(' ', '', \preg_replace_callback('/\\b.(?![A-Z]{2,})/u', static function ($m) use(&$i) {
            return 1 === ++$i ? 'İ' === $m[0] ? 'i̇' : \mb_strtolower($m[0], 'UTF-8') : \mb_convert_case($m[0], \MB_CASE_TITLE, 'UTF-8');
        }, \preg_replace('/[^\\pL0-9]++/u', ' ', $this->string)));
        return $str;
    }
    /**
     * @return int[]
     */
    public function codePointsAt(int $offset) : array
    {
        $str = $this->slice($offset, 1);
        if ('' === $str->string) {
            return [];
        }
        $codePoints = [];
        foreach (\preg_split('//u', $str->string, -1, \PREG_SPLIT_NO_EMPTY) as $c) {
            $codePoints[] = \mb_ord($c, 'UTF-8');
        }
        return $codePoints;
    }
    public function folded(bool $compat = \true) : parent
    {
        $str = clone $this;
        if (!$compat || \PHP_VERSION_ID < 70300 || !\defined('Normalizer::NFKC_CF')) {
            $str->string = \normalizer_normalize($str->string, $compat ? \Normalizer::NFKC : \Normalizer::NFC);
            $str->string = \mb_strtolower(\str_replace(self::FOLD_FROM, self::FOLD_TO, $this->string), 'UTF-8');
        } else {
            $str->string = \normalizer_normalize($str->string, \Normalizer::NFKC_CF);
        }
        return $str;
    }
    public function join(array $strings, string $lastGlue = null) : parent
    {
        $str = clone $this;
        $tail = null !== $lastGlue && 1 < \count($strings) ? $lastGlue . \array_pop($strings) : '';
        $str->string = \implode($this->string, $strings) . $tail;
        if (!\preg_match('//u', $str->string)) {
            throw new InvalidArgumentException('Invalid UTF-8 string.');
        }
        return $str;
    }
    public function lower() : parent
    {
        $str = clone $this;
        $str->string = \mb_strtolower(\str_replace('İ', 'i̇', $str->string), 'UTF-8');
        return $str;
    }
    public function match(string $regexp, int $flags = 0, int $offset = 0) : array
    {
        $match = (\PREG_PATTERN_ORDER | \PREG_SET_ORDER) & $flags ? 'preg_match_all' : 'preg_match';
        if ($this->ignoreCase) {
            $regexp .= 'i';
        }
        \set_error_handler(static function ($t, $m) {
            throw new InvalidArgumentException($m);
        });
        try {
            if (\false === $match($regexp . 'u', $this->string, $matches, $flags | \PREG_UNMATCHED_AS_NULL, $offset)) {
                $lastError = \preg_last_error();
                foreach (\get_defined_constants(\true)['pcre'] as $k => $v) {
                    if ($lastError === $v && '_ERROR' === \substr($k, -6)) {
                        throw new RuntimeException('Matching failed with ' . $k . '.');
                    }
                }
                throw new RuntimeException('Matching failed with unknown error code.');
            }
        } finally {
            \restore_error_handler();
        }
        return $matches;
    }
    /**
     * @return static
     */
    public function normalize(int $form = self::NFC) : self
    {
        if (!\in_array($form, [self::NFC, self::NFD, self::NFKC, self::NFKD])) {
            throw new InvalidArgumentException('Unsupported normalization form.');
        }
        $str = clone $this;
        \normalizer_is_normalized($str->string, $form) ?: ($str->string = \normalizer_normalize($str->string, $form));
        return $str;
    }
    public function padBoth(int $length, string $padStr = ' ') : parent
    {
        if ('' === $padStr || !\preg_match('//u', $padStr)) {
            throw new InvalidArgumentException('Invalid UTF-8 string.');
        }
        $pad = clone $this;
        $pad->string = $padStr;
        return $this->pad($length, $pad, \STR_PAD_BOTH);
    }
    public function padEnd(int $length, string $padStr = ' ') : parent
    {
        if ('' === $padStr || !\preg_match('//u', $padStr)) {
            throw new InvalidArgumentException('Invalid UTF-8 string.');
        }
        $pad = clone $this;
        $pad->string = $padStr;
        return $this->pad($length, $pad, \STR_PAD_RIGHT);
    }
    public function padStart(int $length, string $padStr = ' ') : parent
    {
        if ('' === $padStr || !\preg_match('//u', $padStr)) {
            throw new InvalidArgumentException('Invalid UTF-8 string.');
        }
        $pad = clone $this;
        $pad->string = $padStr;
        return $this->pad($length, $pad, \STR_PAD_LEFT);
    }
    public function replaceMatches(string $fromRegexp, $to) : parent
    {
        if ($this->ignoreCase) {
            $fromRegexp .= 'i';
        }
        if (\is_array($to) || $to instanceof \Closure) {
            if (!\is_callable($to)) {
                throw new \TypeError(\sprintf('Argument 2 passed to "%s::replaceMatches()" must be callable, array given.', static::class));
            }
            $replace = 'preg_replace_callback';
            $to = static function (array $m) use($to) : string {
                $to = $to($m);
                if ('' !== $to && (!\is_string($to) || !\preg_match('//u', $to))) {
                    throw new InvalidArgumentException('Replace callback must return a valid UTF-8 string.');
                }
                return $to;
            };
        } elseif ('' !== $to && !\preg_match('//u', $to)) {
            throw new InvalidArgumentException('Invalid UTF-8 string.');
        } else {
            $replace = 'preg_replace';
        }
        \set_error_handler(static function ($t, $m) {
            throw new InvalidArgumentException($m);
        });
        try {
            if (null === ($string = $replace($fromRegexp . 'u', $to, $this->string))) {
                $lastError = \preg_last_error();
                foreach (\get_defined_constants(\true)['pcre'] as $k => $v) {
                    if ($lastError === $v && '_ERROR' === \substr($k, -6)) {
                        throw new RuntimeException('Matching failed with ' . $k . '.');
                    }
                }
                throw new RuntimeException('Matching failed with unknown error code.');
            }
        } finally {
            \restore_error_handler();
        }
        $str = clone $this;
        $str->string = $string;
        return $str;
    }
    public function reverse() : parent
    {
        $str = clone $this;
        $str->string = \implode('', \array_reverse(\preg_split('/(\\X)/u', $str->string, -1, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY)));
        return $str;
    }
    public function snake() : parent
    {
        $str = $this->camel();
        $str->string = \mb_strtolower(\preg_replace(['/(\\p{Lu}+)(\\p{Lu}\\p{Ll})/u', '/([\\p{Ll}0-9])(\\p{Lu})/u'], '_PHPStan_dcc7b7cff\\1_\\2', $str->string), 'UTF-8');
        return $str;
    }
    public function title(bool $allWords = \false) : parent
    {
        $str = clone $this;
        $limit = $allWords ? -1 : 1;
        $str->string = \preg_replace_callback('/\\b./u', static function (array $m) : string {
            return \mb_convert_case($m[0], \MB_CASE_TITLE, 'UTF-8');
        }, $str->string, $limit);
        return $str;
    }
    public function trim(string $chars = " \t\n\r\x00\v\f ") : parent
    {
        if (" \t\n\r\x00\v\f " !== $chars && !\preg_match('//u', $chars)) {
            throw new InvalidArgumentException('Invalid UTF-8 chars.');
        }
        $chars = \preg_quote($chars);
        $str = clone $this;
        $str->string = \preg_replace("{^[{$chars}]++|[{$chars}]++\$}uD", '', $str->string);
        return $str;
    }
    public function trimEnd(string $chars = " \t\n\r\x00\v\f ") : parent
    {
        if (" \t\n\r\x00\v\f " !== $chars && !\preg_match('//u', $chars)) {
            throw new InvalidArgumentException('Invalid UTF-8 chars.');
        }
        $chars = \preg_quote($chars);
        $str = clone $this;
        $str->string = \preg_replace("{[{$chars}]++\$}uD", '', $str->string);
        return $str;
    }
    public function trimPrefix($prefix) : parent
    {
        if (!$this->ignoreCase) {
            return parent::trimPrefix($prefix);
        }
        $str = clone $this;
        if ($prefix instanceof \Traversable) {
            $prefix = \iterator_to_array($prefix, \false);
        } elseif ($prefix instanceof parent) {
            $prefix = $prefix->string;
        }
        $prefix = \implode('|', \array_map('preg_quote', (array) $prefix));
        $str->string = \preg_replace("{^(?:{$prefix})}iuD", '', $this->string);
        return $str;
    }
    public function trimStart(string $chars = " \t\n\r\x00\v\f ") : parent
    {
        if (" \t\n\r\x00\v\f " !== $chars && !\preg_match('//u', $chars)) {
            throw new InvalidArgumentException('Invalid UTF-8 chars.');
        }
        $chars = \preg_quote($chars);
        $str = clone $this;
        $str->string = \preg_replace("{^[{$chars}]++}uD", '', $str->string);
        return $str;
    }
    public function trimSuffix($suffix) : parent
    {
        if (!$this->ignoreCase) {
            return parent::trimSuffix($suffix);
        }
        $str = clone $this;
        if ($suffix instanceof \Traversable) {
            $suffix = \iterator_to_array($suffix, \false);
        } elseif ($suffix instanceof parent) {
            $suffix = $suffix->string;
        }
        $suffix = \implode('|', \array_map('preg_quote', (array) $suffix));
        $str->string = \preg_replace("{(?:{$suffix})\$}iuD", '', $this->string);
        return $str;
    }
    public function upper() : parent
    {
        $str = clone $this;
        $str->string = \mb_strtoupper($str->string, 'UTF-8');
        if (\PHP_VERSION_ID < 70300) {
            $str->string = \str_replace(self::UPPER_FROM, self::UPPER_TO, $str->string);
        }
        return $str;
    }
    public function width(bool $ignoreAnsiDecoration = \true) : int
    {
        $width = 0;
        $s = \str_replace(["\x00", "\x05", "\x07"], '', $this->string);
        if (\false !== \strpos($s, "\r")) {
            $s = \str_replace(["\r\n", "\r"], "\n", $s);
        }
        if (!$ignoreAnsiDecoration) {
            $s = \preg_replace('/[\\p{Cc}\\x7F]++/u', '', $s);
        }
        foreach (\explode("\n", $s) as $s) {
            if ($ignoreAnsiDecoration) {
                $s = \preg_replace('/(?:\\x1B(?:
                    \\[ [\\x30-\\x3F]*+ [\\x20-\\x2F]*+ [\\x40-\\x7E]
                    | [P\\]X^_] .*? \\x1B\\\\
                    | [\\x41-\\x7E]
                )|[\\p{Cc}\\x7F]++)/xu', '', $s);
            }
            $lineWidth = $this->wcswidth($s);
            if ($lineWidth > $width) {
                $width = $lineWidth;
            }
        }
        return $width;
    }
    /**
     * @return static
     */
    private function pad(int $len, self $pad, int $type) : parent
    {
        $sLen = $this->length();
        if ($len <= $sLen) {
            return clone $this;
        }
        $padLen = $pad->length();
        $freeLen = $len - $sLen;
        $len = $freeLen % $padLen;
        switch ($type) {
            case \STR_PAD_RIGHT:
                return $this->append(\str_repeat($pad->string, \intdiv($freeLen, $padLen)) . ($len ? $pad->slice(0, $len) : ''));
            case \STR_PAD_LEFT:
                return $this->prepend(\str_repeat($pad->string, \intdiv($freeLen, $padLen)) . ($len ? $pad->slice(0, $len) : ''));
            case \STR_PAD_BOTH:
                $freeLen /= 2;
                $rightLen = \ceil($freeLen);
                $len = $rightLen % $padLen;
                $str = $this->append(\str_repeat($pad->string, \intdiv($rightLen, $padLen)) . ($len ? $pad->slice(0, $len) : ''));
                $leftLen = \floor($freeLen);
                $len = $leftLen % $padLen;
                return $str->prepend(\str_repeat($pad->string, \intdiv($leftLen, $padLen)) . ($len ? $pad->slice(0, $len) : ''));
            default:
                throw new InvalidArgumentException('Invalid padding type.');
        }
    }
    /**
     * Based on https://github.com/jquast/wcwidth, a Python implementation of https://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c.
     */
    private function wcswidth(string $string) : int
    {
        $width = 0;
        foreach (\preg_split('//u', $string, -1, \PREG_SPLIT_NO_EMPTY) as $c) {
            $codePoint = \mb_ord($c, 'UTF-8');
            if (0 === $codePoint || 0x34f === $codePoint || 0x200b <= $codePoint && 0x200f >= $codePoint || 0x2028 === $codePoint || 0x2029 === $codePoint || 0x202a <= $codePoint && 0x202e >= $codePoint || 0x2060 <= $codePoint && 0x2063 >= $codePoint) {
                continue;
            }
            // Non printable characters
            if (32 > $codePoint || 0x7f <= $codePoint && 0xa0 > $codePoint) {
                return -1;
            }
            if (null === self::$tableZero) {
                self::$tableZero = (require __DIR__ . '/Resources/data/wcswidth_table_zero.php');
            }
            if ($codePoint >= self::$tableZero[0][0] && $codePoint <= self::$tableZero[$ubound = \count(self::$tableZero) - 1][1]) {
                $lbound = 0;
                while ($ubound >= $lbound) {
                    $mid = \floor(($lbound + $ubound) / 2);
                    if ($codePoint > self::$tableZero[$mid][1]) {
                        $lbound = $mid + 1;
                    } elseif ($codePoint < self::$tableZero[$mid][0]) {
                        $ubound = $mid - 1;
                    } else {
                        continue 2;
                    }
                }
            }
            if (null === self::$tableWide) {
                self::$tableWide = (require __DIR__ . '/Resources/data/wcswidth_table_wide.php');
            }
            if ($codePoint >= self::$tableWide[0][0] && $codePoint <= self::$tableWide[$ubound = \count(self::$tableWide) - 1][1]) {
                $lbound = 0;
                while ($ubound >= $lbound) {
                    $mid = \floor(($lbound + $ubound) / 2);
                    if ($codePoint > self::$tableWide[$mid][1]) {
                        $lbound = $mid + 1;
                    } elseif ($codePoint < self::$tableWide[$mid][0]) {
                        $ubound = $mid - 1;
                    } else {
                        $width += 2;
                        continue 2;
                    }
                }
            }
            ++$width;
        }
        return $width;
    }
}
<?php

namespace _PHPStan_dcc7b7cff;

/*
 * This file has been auto-generated by the Symfony String Component for internal use.
 *
 * Unicode version: 15.0.0
 * Date: 2022-10-05T17:16:36+02:00
 */
return [[4352, 4447], [8986, 8987], [9001, 9001], [9002, 9002], [9193, 9196], [9200, 9200], [9203, 9203], [9725, 9726], [9748, 9749], [9800, 9811], [9855, 9855], [9875, 9875], [9889, 9889], [9898, 9899], [9917, 9918], [9924, 9925], [9934, 9934], [9940, 9940], [9962, 9962], [9970, 9971], [9973, 9973], [9978, 9978], [9981, 9981], [9989, 9989], [9994, 9995], [10024, 10024], [10060, 10060], [10062, 10062], [10067, 10069], [10071, 10071], [10133, 10135], [10160, 10160], [10175, 10175], [11035, 11036], [11088, 11088], [11093, 11093], [11904, 11929], [11931, 12019], [12032, 12245], [12272, 12283], [12288, 12288], [12289, 12291], [12292, 12292], [12293, 12293], [12294, 12294], [12295, 12295], [12296, 12296], [12297, 12297], [12298, 12298], [12299, 12299], [12300, 12300], [12301, 12301], [12302, 12302], [12303, 12303], [12304, 12304], [12305, 12305], [12306, 12307], [12308, 12308], [12309, 12309], [12310, 12310], [12311, 12311], [12312, 12312], [12313, 12313], [12314, 12314], [12315, 12315], [12316, 12316], [12317, 12317], [12318, 12319], [12320, 12320], [12321, 12329], [12330, 12333], [12334, 12335], [12336, 12336], [12337, 12341], [12342, 12343], [12344, 12346], [12347, 12347], [12348, 12348], [12349, 12349], [12350, 12350], [12353, 12438], [12441, 12442], [12443, 12444], [12445, 12446], [12447, 12447], [12448, 12448], [12449, 12538], [12539, 12539], [12540, 12542], [12543, 12543], [12549, 12591], [12593, 12686], [12688, 12689], [12690, 12693], [12694, 12703], [12704, 12735], [12736, 12771], [12784, 12799], [12800, 12830], [12832, 12841], [12842, 12871], [12880, 12880], [12881, 12895], [12896, 12927], [12928, 12937], [12938, 12976], [12977, 12991], [12992, 13055], [13056, 13311], [13312, 19903], [19968, 40959], [40960, 40980], [40981, 40981], [40982, 42124], [42128, 42182], [43360, 43388], [44032, 55203], [63744, 64109], [64110, 64111], [64112, 64217], [64218, 64255], [65040, 65046], [65047, 65047], [65048, 65048], [65049, 65049], [65072, 65072], [65073, 65074], [65075, 65076], [65077, 65077], [65078, 65078], [65079, 65079], [65080, 65080], [65081, 65081], [65082, 65082], [65083, 65083], [65084, 65084], [65085, 65085], [65086, 65086], [65087, 65087], [65088, 65088], [65089, 65089], [65090, 65090], [65091, 65091], [65092, 65092], [65093, 65094], [65095, 65095], [65096, 65096], [65097, 65100], [65101, 65103], [65104, 65106], [65108, 65111], [65112, 65112], [65113, 65113], [65114, 65114], [65115, 65115], [65116, 65116], [65117, 65117], [65118, 65118], [65119, 65121], [65122, 65122], [65123, 65123], [65124, 65126], [65128, 65128], [65129, 65129], [65130, 65131], [65281, 65283], [65284, 65284], [65285, 65287], [65288, 65288], [65289, 65289], [65290, 65290], [65291, 65291], [65292, 65292], [65293, 65293], [65294, 65295], [65296, 65305], [65306, 65307], [65308, 65310], [65311, 65312], [65313, 65338], [65339, 65339], [65340, 65340], [65341, 65341], [65342, 65342], [65343, 65343], [65344, 65344], [65345, 65370], [65371, 65371], [65372, 65372], [65373, 65373], [65374, 65374], [65375, 65375], [65376, 65376], [65504, 65505], [65506, 65506], [65507, 65507], [65508, 65508], [65509, 65510], [94176, 94177], [94178, 94178], [94179, 94179], [94180, 94180], [94192, 94193], [94208, 100343], [100352, 101119], [101120, 101589], [101632, 101640], [110576, 110579], [110581, 110587], [110589, 110590], [110592, 110847], [110848, 110882], [110898, 110898], [110928, 110930], [110933, 110933], [110948, 110951], [110960, 111355], [126980, 126980], [127183, 127183], [127374, 127374], [127377, 127386], [127488, 127490], [127504, 127547], [127552, 127560], [127568, 127569], [127584, 127589], [127744, 127776], [127789, 127797], [127799, 127868], [127870, 127891], [127904, 127946], [127951, 127955], [127968, 127984], [127988, 127988], [127992, 127994], [127995, 127999], [128000, 128062], [128064, 128064], [128066, 128252], [128255, 128317], [128331, 128334], [128336, 128359], [128378, 128378], [128405, 128406], [128420, 128420], [128507, 128511], [128512, 128591], [128640, 128709], [128716, 128716], [128720, 128722], [128725, 128727], [128732, 128735], [128747, 128748], [128756, 128764], [128992, 129003], [129008, 129008], [129292, 129338], [129340, 129349], [129351, 129535], [129648, 129660], [129664, 129672], [129680, 129725], [129727, 129733], [129742, 129755], [129760, 129768], [129776, 129784], [131072, 173791], [173792, 173823], [173824, 177977], [177978, 177983], [177984, 178205], [178206, 178207], [178208, 183969], [183970, 183983], [183984, 191456], [191457, 194559], [194560, 195101], [195102, 195103], [195104, 196605], [196608, 201546], [201547, 201551], [201552, 205743], [205744, 262141]];
<?php

namespace _PHPStan_dcc7b7cff;

/*
 * This file has been auto-generated by the Symfony String Component for internal use.
 *
 * Unicode version: 15.0.0
 * Date: 2022-10-05T17:16:37+02:00
 */
return [[768, 879], [1155, 1159], [1160, 1161], [1425, 1469], [1471, 1471], [1473, 1474], [1476, 1477], [1479, 1479], [1552, 1562], [1611, 1631], [1648, 1648], [1750, 1756], [1759, 1764], [1767, 1768], [1770, 1773], [1809, 1809], [1840, 1866], [1958, 1968], [2027, 2035], [2045, 2045], [2070, 2073], [2075, 2083], [2085, 2087], [2089, 2093], [2137, 2139], [2200, 2207], [2250, 2273], [2275, 2306], [2362, 2362], [2364, 2364], [2369, 2376], [2381, 2381], [2385, 2391], [2402, 2403], [2433, 2433], [2492, 2492], [2497, 2500], [2509, 2509], [2530, 2531], [2558, 2558], [2561, 2562], [2620, 2620], [2625, 2626], [2631, 2632], [2635, 2637], [2641, 2641], [2672, 2673], [2677, 2677], [2689, 2690], [2748, 2748], [2753, 2757], [2759, 2760], [2765, 2765], [2786, 2787], [2810, 2815], [2817, 2817], [2876, 2876], [2879, 2879], [2881, 2884], [2893, 2893], [2901, 2902], [2914, 2915], [2946, 2946], [3008, 3008], [3021, 3021], [3072, 3072], [3076, 3076], [3132, 3132], [3134, 3136], [3142, 3144], [3146, 3149], [3157, 3158], [3170, 3171], [3201, 3201], [3260, 3260], [3263, 3263], [3270, 3270], [3276, 3277], [3298, 3299], [3328, 3329], [3387, 3388], [3393, 3396], [3405, 3405], [3426, 3427], [3457, 3457], [3530, 3530], [3538, 3540], [3542, 3542], [3633, 3633], [3636, 3642], [3655, 3662], [3761, 3761], [3764, 3772], [3784, 3790], [3864, 3865], [3893, 3893], [3895, 3895], [3897, 3897], [3953, 3966], [3968, 3972], [3974, 3975], [3981, 3991], [3993, 4028], [4038, 4038], [4141, 4144], [4146, 4151], [4153, 4154], [4157, 4158], [4184, 4185], [4190, 4192], [4209, 4212], [4226, 4226], [4229, 4230], [4237, 4237], [4253, 4253], [4957, 4959], [5906, 5908], [5938, 5939], [5970, 5971], [6002, 6003], [6068, 6069], [6071, 6077], [6086, 6086], [6089, 6099], [6109, 6109], [6155, 6157], [6159, 6159], [6277, 6278], [6313, 6313], [6432, 6434], [6439, 6440], [6450, 6450], [6457, 6459], [6679, 6680], [6683, 6683], [6742, 6742], [6744, 6750], [6752, 6752], [6754, 6754], [6757, 6764], [6771, 6780], [6783, 6783], [6832, 6845], [6846, 6846], [6847, 6862], [6912, 6915], [6964, 6964], [6966, 6970], [6972, 6972], [6978, 6978], [7019, 7027], [7040, 7041], [7074, 7077], [7080, 7081], [7083, 7085], [7142, 7142], [7144, 7145], [7149, 7149], [7151, 7153], [7212, 7219], [7222, 7223], [7376, 7378], [7380, 7392], [7394, 7400], [7405, 7405], [7412, 7412], [7416, 7417], [7616, 7679], [8400, 8412], [8413, 8416], [8417, 8417], [8418, 8420], [8421, 8432], [11503, 11505], [11647, 11647], [11744, 11775], [12330, 12333], [12441, 12442], [42607, 42607], [42608, 42610], [42612, 42621], [42654, 42655], [42736, 42737], [43010, 43010], [43014, 43014], [43019, 43019], [43045, 43046], [43052, 43052], [43204, 43205], [43232, 43249], [43263, 43263], [43302, 43309], [43335, 43345], [43392, 43394], [43443, 43443], [43446, 43449], [43452, 43453], [43493, 43493], [43561, 43566], [43569, 43570], [43573, 43574], [43587, 43587], [43596, 43596], [43644, 43644], [43696, 43696], [43698, 43700], [43703, 43704], [43710, 43711], [43713, 43713], [43756, 43757], [43766, 43766], [44005, 44005], [44008, 44008], [44013, 44013], [64286, 64286], [65024, 65039], [65056, 65071], [66045, 66045], [66272, 66272], [66422, 66426], [68097, 68099], [68101, 68102], [68108, 68111], [68152, 68154], [68159, 68159], [68325, 68326], [68900, 68903], [69291, 69292], [69373, 69375], [69446, 69456], [69506, 69509], [69633, 69633], [69688, 69702], [69744, 69744], [69747, 69748], [69759, 69761], [69811, 69814], [69817, 69818], [69826, 69826], [69888, 69890], [69927, 69931], [69933, 69940], [70003, 70003], [70016, 70017], [70070, 70078], [70089, 70092], [70095, 70095], [70191, 70193], [70196, 70196], [70198, 70199], [70206, 70206], [70209, 70209], [70367, 70367], [70371, 70378], [70400, 70401], [70459, 70460], [70464, 70464], [70502, 70508], [70512, 70516], [70712, 70719], [70722, 70724], [70726, 70726], [70750, 70750], [70835, 70840], [70842, 70842], [70847, 70848], [70850, 70851], [71090, 71093], [71100, 71101], [71103, 71104], [71132, 71133], [71219, 71226], [71229, 71229], [71231, 71232], [71339, 71339], [71341, 71341], [71344, 71349], [71351, 71351], [71453, 71455], [71458, 71461], [71463, 71467], [71727, 71735], [71737, 71738], [71995, 71996], [71998, 71998], [72003, 72003], [72148, 72151], [72154, 72155], [72160, 72160], [72193, 72202], [72243, 72248], [72251, 72254], [72263, 72263], [72273, 72278], [72281, 72283], [72330, 72342], [72344, 72345], [72752, 72758], [72760, 72765], [72767, 72767], [72850, 72871], [72874, 72880], [72882, 72883], [72885, 72886], [73009, 73014], [73018, 73018], [73020, 73021], [73023, 73029], [73031, 73031], [73104, 73105], [73109, 73109], [73111, 73111], [73459, 73460], [73472, 73473], [73526, 73530], [73536, 73536], [73538, 73538], [78912, 78912], [78919, 78933], [92912, 92916], [92976, 92982], [94031, 94031], [94095, 94098], [94180, 94180], [113821, 113822], [118528, 118573], [118576, 118598], [119143, 119145], [119163, 119170], [119173, 119179], [119210, 119213], [119362, 119364], [121344, 121398], [121403, 121452], [121461, 121461], [121476, 121476], [121499, 121503], [121505, 121519], [122880, 122886], [122888, 122904], [122907, 122913], [122915, 122916], [122918, 122922], [123023, 123023], [123184, 123190], [123566, 123566], [123628, 123631], [124140, 124143], [125136, 125142], [125252, 125258], [917760, 917999]];
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\String;

if (!\function_exists(u::class)) {
    function u(?string $string = '') : UnicodeString
    {
        return new UnicodeString($string ?? '');
    }
}
if (!\function_exists(b::class)) {
    function b(?string $string = '') : ByteString
    {
        return new ByteString($string ?? '');
    }
}
if (!\function_exists(s::class)) {
    /**
     * @return UnicodeString|ByteString
     */
    function s(?string $string = '') : AbstractString
    {
        $string = $string ?? '';
        return \preg_match('//u', $string) ? new UnicodeString($string) : new ByteString($string);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\String\Exception;

interface ExceptionInterface extends \Throwable
{
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\String\Exception;

class RuntimeException extends \RuntimeException implements ExceptionInterface
{
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\String\Exception;

class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
{
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\String;

use _PHPStan_dcc7b7cff\Symfony\Component\String\Exception\ExceptionInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\String\Exception\InvalidArgumentException;
use _PHPStan_dcc7b7cff\Symfony\Component\String\Exception\RuntimeException;
/**
 * Represents a binary-safe string of bytes.
 *
 * @author Nicolas Grekas <p@tchwork.com>
 * @author Hugo Hamon <hugohamon@neuf.fr>
 *
 * @throws ExceptionInterface
 */
class ByteString extends AbstractString
{
    private const ALPHABET_ALPHANUMERIC = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
    public function __construct(string $string = '')
    {
        $this->string = $string;
    }
    /*
     * The following method was derived from code of the Hack Standard Library (v4.40 - 2020-05-03)
     *
     * https://github.com/hhvm/hsl/blob/80a42c02f036f72a42f0415e80d6b847f4bf62d5/src/random/private.php#L16
     *
     * Code subject to the MIT license (https://github.com/hhvm/hsl/blob/master/LICENSE).
     *
     * Copyright (c) 2004-2020, Facebook, Inc. (https://www.facebook.com/)
     */
    public static function fromRandom(int $length = 16, string $alphabet = null) : self
    {
        if ($length <= 0) {
            throw new InvalidArgumentException(\sprintf('A strictly positive length is expected, "%d" given.', $length));
        }
        $alphabet = $alphabet ?? self::ALPHABET_ALPHANUMERIC;
        $alphabetSize = \strlen($alphabet);
        $bits = (int) \ceil(\log($alphabetSize, 2.0));
        if ($bits <= 0 || $bits > 56) {
            throw new InvalidArgumentException('The length of the alphabet must in the [2^1, 2^56] range.');
        }
        $ret = '';
        while ($length > 0) {
            $urandomLength = (int) \ceil(2 * $length * $bits / 8.0);
            $data = \random_bytes($urandomLength);
            $unpackedData = 0;
            $unpackedBits = 0;
            for ($i = 0; $i < $urandomLength && $length > 0; ++$i) {
                // Unpack 8 bits
                $unpackedData = $unpackedData << 8 | \ord($data[$i]);
                $unpackedBits += 8;
                // While we have enough bits to select a character from the alphabet, keep
                // consuming the random data
                for (; $unpackedBits >= $bits && $length > 0; $unpackedBits -= $bits) {
                    $index = $unpackedData & (1 << $bits) - 1;
                    $unpackedData >>= $bits;
                    // Unfortunately, the alphabet size is not necessarily a power of two.
                    // Worst case, it is 2^k + 1, which means we need (k+1) bits and we
                    // have around a 50% chance of missing as k gets larger
                    if ($index < $alphabetSize) {
                        $ret .= $alphabet[$index];
                        --$length;
                    }
                }
            }
        }
        return new static($ret);
    }
    public function bytesAt(int $offset) : array
    {
        $str = $this->string[$offset] ?? '';
        return '' === $str ? [] : [\ord($str)];
    }
    public function append(string ...$suffix) : parent
    {
        $str = clone $this;
        $str->string .= 1 >= \count($suffix) ? $suffix[0] ?? '' : \implode('', $suffix);
        return $str;
    }
    public function camel() : parent
    {
        $str = clone $this;
        $parts = \explode(' ', \trim(\ucwords(\preg_replace('/[^a-zA-Z0-9\\x7f-\\xff]++/', ' ', $this->string))));
        $parts[0] = 1 !== \strlen($parts[0]) && \ctype_upper($parts[0]) ? $parts[0] : \lcfirst($parts[0]);
        $str->string = \implode('', $parts);
        return $str;
    }
    public function chunk(int $length = 1) : array
    {
        if (1 > $length) {
            throw new InvalidArgumentException('The chunk length must be greater than zero.');
        }
        if ('' === $this->string) {
            return [];
        }
        $str = clone $this;
        $chunks = [];
        foreach (\str_split($this->string, $length) as $chunk) {
            $str->string = $chunk;
            $chunks[] = clone $str;
        }
        return $chunks;
    }
    public function endsWith($suffix) : bool
    {
        if ($suffix instanceof parent) {
            $suffix = $suffix->string;
        } elseif (\is_array($suffix) || $suffix instanceof \Traversable) {
            return parent::endsWith($suffix);
        } else {
            $suffix = (string) $suffix;
        }
        return '' !== $suffix && \strlen($this->string) >= \strlen($suffix) && 0 === \substr_compare($this->string, $suffix, -\strlen($suffix), null, $this->ignoreCase);
    }
    public function equalsTo($string) : bool
    {
        if ($string instanceof parent) {
            $string = $string->string;
        } elseif (\is_array($string) || $string instanceof \Traversable) {
            return parent::equalsTo($string);
        } else {
            $string = (string) $string;
        }
        if ('' !== $string && $this->ignoreCase) {
            return 0 === \strcasecmp($string, $this->string);
        }
        return $string === $this->string;
    }
    public function folded() : parent
    {
        $str = clone $this;
        $str->string = \strtolower($str->string);
        return $str;
    }
    public function indexOf($needle, int $offset = 0) : ?int
    {
        if ($needle instanceof parent) {
            $needle = $needle->string;
        } elseif (\is_array($needle) || $needle instanceof \Traversable) {
            return parent::indexOf($needle, $offset);
        } else {
            $needle = (string) $needle;
        }
        if ('' === $needle) {
            return null;
        }
        $i = $this->ignoreCase ? \stripos($this->string, $needle, $offset) : \strpos($this->string, $needle, $offset);
        return \false === $i ? null : $i;
    }
    public function indexOfLast($needle, int $offset = 0) : ?int
    {
        if ($needle instanceof parent) {
            $needle = $needle->string;
        } elseif (\is_array($needle) || $needle instanceof \Traversable) {
            return parent::indexOfLast($needle, $offset);
        } else {
            $needle = (string) $needle;
        }
        if ('' === $needle) {
            return null;
        }
        $i = $this->ignoreCase ? \strripos($this->string, $needle, $offset) : \strrpos($this->string, $needle, $offset);
        return \false === $i ? null : $i;
    }
    public function isUtf8() : bool
    {
        return '' === $this->string || \preg_match('//u', $this->string);
    }
    public function join(array $strings, string $lastGlue = null) : parent
    {
        $str = clone $this;
        $tail = null !== $lastGlue && 1 < \count($strings) ? $lastGlue . \array_pop($strings) : '';
        $str->string = \implode($this->string, $strings) . $tail;
        return $str;
    }
    public function length() : int
    {
        return \strlen($this->string);
    }
    public function lower() : parent
    {
        $str = clone $this;
        $str->string = \strtolower($str->string);
        return $str;
    }
    public function match(string $regexp, int $flags = 0, int $offset = 0) : array
    {
        $match = (\PREG_PATTERN_ORDER | \PREG_SET_ORDER) & $flags ? 'preg_match_all' : 'preg_match';
        if ($this->ignoreCase) {
            $regexp .= 'i';
        }
        \set_error_handler(static function ($t, $m) {
            throw new InvalidArgumentException($m);
        });
        try {
            if (\false === $match($regexp, $this->string, $matches, $flags | \PREG_UNMATCHED_AS_NULL, $offset)) {
                $lastError = \preg_last_error();
                foreach (\get_defined_constants(\true)['pcre'] as $k => $v) {
                    if ($lastError === $v && '_ERROR' === \substr($k, -6)) {
                        throw new RuntimeException('Matching failed with ' . $k . '.');
                    }
                }
                throw new RuntimeException('Matching failed with unknown error code.');
            }
        } finally {
            \restore_error_handler();
        }
        return $matches;
    }
    public function padBoth(int $length, string $padStr = ' ') : parent
    {
        $str = clone $this;
        $str->string = \str_pad($this->string, $length, $padStr, \STR_PAD_BOTH);
        return $str;
    }
    public function padEnd(int $length, string $padStr = ' ') : parent
    {
        $str = clone $this;
        $str->string = \str_pad($this->string, $length, $padStr, \STR_PAD_RIGHT);
        return $str;
    }
    public function padStart(int $length, string $padStr = ' ') : parent
    {
        $str = clone $this;
        $str->string = \str_pad($this->string, $length, $padStr, \STR_PAD_LEFT);
        return $str;
    }
    public function prepend(string ...$prefix) : parent
    {
        $str = clone $this;
        $str->string = (1 >= \count($prefix) ? $prefix[0] ?? '' : \implode('', $prefix)) . $str->string;
        return $str;
    }
    public function replace(string $from, string $to) : parent
    {
        $str = clone $this;
        if ('' !== $from) {
            $str->string = $this->ignoreCase ? \str_ireplace($from, $to, $this->string) : \str_replace($from, $to, $this->string);
        }
        return $str;
    }
    public function replaceMatches(string $fromRegexp, $to) : parent
    {
        if ($this->ignoreCase) {
            $fromRegexp .= 'i';
        }
        if (\is_array($to)) {
            if (!\is_callable($to)) {
                throw new \TypeError(\sprintf('Argument 2 passed to "%s::replaceMatches()" must be callable, array given.', static::class));
            }
            $replace = 'preg_replace_callback';
        } else {
            $replace = $to instanceof \Closure ? 'preg_replace_callback' : 'preg_replace';
        }
        \set_error_handler(static function ($t, $m) {
            throw new InvalidArgumentException($m);
        });
        try {
            if (null === ($string = $replace($fromRegexp, $to, $this->string))) {
                $lastError = \preg_last_error();
                foreach (\get_defined_constants(\true)['pcre'] as $k => $v) {
                    if ($lastError === $v && '_ERROR' === \substr($k, -6)) {
                        throw new RuntimeException('Matching failed with ' . $k . '.');
                    }
                }
                throw new RuntimeException('Matching failed with unknown error code.');
            }
        } finally {
            \restore_error_handler();
        }
        $str = clone $this;
        $str->string = $string;
        return $str;
    }
    public function reverse() : parent
    {
        $str = clone $this;
        $str->string = \strrev($str->string);
        return $str;
    }
    public function slice(int $start = 0, int $length = null) : parent
    {
        $str = clone $this;
        $str->string = (string) \substr($this->string, $start, $length ?? \PHP_INT_MAX);
        return $str;
    }
    public function snake() : parent
    {
        $str = $this->camel();
        $str->string = \strtolower(\preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\\d])([A-Z])/'], '_PHPStan_dcc7b7cff\\1_\\2', $str->string));
        return $str;
    }
    public function splice(string $replacement, int $start = 0, int $length = null) : parent
    {
        $str = clone $this;
        $str->string = \substr_replace($this->string, $replacement, $start, $length ?? \PHP_INT_MAX);
        return $str;
    }
    public function split(string $delimiter, int $limit = null, int $flags = null) : array
    {
        if (1 > ($limit = $limit ?? \PHP_INT_MAX)) {
            throw new InvalidArgumentException('Split limit must be a positive integer.');
        }
        if ('' === $delimiter) {
            throw new InvalidArgumentException('Split delimiter is empty.');
        }
        if (null !== $flags) {
            return parent::split($delimiter, $limit, $flags);
        }
        $str = clone $this;
        $chunks = $this->ignoreCase ? \preg_split('{' . \preg_quote($delimiter) . '}iD', $this->string, $limit) : \explode($delimiter, $this->string, $limit);
        foreach ($chunks as &$chunk) {
            $str->string = $chunk;
            $chunk = clone $str;
        }
        return $chunks;
    }
    public function startsWith($prefix) : bool
    {
        if ($prefix instanceof parent) {
            $prefix = $prefix->string;
        } elseif (!\is_string($prefix)) {
            return parent::startsWith($prefix);
        }
        return '' !== $prefix && 0 === ($this->ignoreCase ? \strncasecmp($this->string, $prefix, \strlen($prefix)) : \strncmp($this->string, $prefix, \strlen($prefix)));
    }
    public function title(bool $allWords = \false) : parent
    {
        $str = clone $this;
        $str->string = $allWords ? \ucwords($str->string) : \ucfirst($str->string);
        return $str;
    }
    public function toUnicodeString(string $fromEncoding = null) : UnicodeString
    {
        return new UnicodeString($this->toCodePointString($fromEncoding)->string);
    }
    public function toCodePointString(string $fromEncoding = null) : CodePointString
    {
        $u = new CodePointString();
        if (\in_array($fromEncoding, [null, 'utf8', 'utf-8', 'UTF8', 'UTF-8'], \true) && \preg_match('//u', $this->string)) {
            $u->string = $this->string;
            return $u;
        }
        \set_error_handler(static function ($t, $m) {
            throw new InvalidArgumentException($m);
        });
        try {
            try {
                $validEncoding = \false !== \mb_detect_encoding($this->string, $fromEncoding ?? 'Windows-1252', \true);
            } catch (InvalidArgumentException $e) {
                if (!\function_exists('iconv')) {
                    throw $e;
                }
                $u->string = \iconv($fromEncoding ?? 'Windows-1252', 'UTF-8', $this->string);
                return $u;
            }
        } finally {
            \restore_error_handler();
        }
        if (!$validEncoding) {
            throw new InvalidArgumentException(\sprintf('Invalid "%s" string.', $fromEncoding ?? 'Windows-1252'));
        }
        $u->string = \mb_convert_encoding($this->string, 'UTF-8', $fromEncoding ?? 'Windows-1252');
        return $u;
    }
    public function trim(string $chars = " \t\n\r\x00\v\f") : parent
    {
        $str = clone $this;
        $str->string = \trim($str->string, $chars);
        return $str;
    }
    public function trimEnd(string $chars = " \t\n\r\x00\v\f") : parent
    {
        $str = clone $this;
        $str->string = \rtrim($str->string, $chars);
        return $str;
    }
    public function trimStart(string $chars = " \t\n\r\x00\v\f") : parent
    {
        $str = clone $this;
        $str->string = \ltrim($str->string, $chars);
        return $str;
    }
    public function upper() : parent
    {
        $str = clone $this;
        $str->string = \strtoupper($str->string);
        return $str;
    }
    public function width(bool $ignoreAnsiDecoration = \true) : int
    {
        $string = \preg_match('//u', $this->string) ? $this->string : \preg_replace('/[\\x80-\\xFF]/', '?', $this->string);
        return (new CodePointString($string))->width($ignoreAnsiDecoration);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\String;

use _PHPStan_dcc7b7cff\Symfony\Component\String\Exception\ExceptionInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\String\Exception\InvalidArgumentException;
use _PHPStan_dcc7b7cff\Symfony\Component\String\Exception\RuntimeException;
/**
 * Represents a string of abstract characters.
 *
 * Unicode defines 3 types of "characters" (bytes, code points and grapheme clusters).
 * This class is the abstract type to use as a type-hint when the logic you want to
 * implement doesn't care about the exact variant it deals with.
 *
 * @author Nicolas Grekas <p@tchwork.com>
 * @author Hugo Hamon <hugohamon@neuf.fr>
 *
 * @throws ExceptionInterface
 */
abstract class AbstractString implements \Stringable, \JsonSerializable
{
    public const PREG_PATTERN_ORDER = \PREG_PATTERN_ORDER;
    public const PREG_SET_ORDER = \PREG_SET_ORDER;
    public const PREG_OFFSET_CAPTURE = \PREG_OFFSET_CAPTURE;
    public const PREG_UNMATCHED_AS_NULL = \PREG_UNMATCHED_AS_NULL;
    public const PREG_SPLIT = 0;
    public const PREG_SPLIT_NO_EMPTY = \PREG_SPLIT_NO_EMPTY;
    public const PREG_SPLIT_DELIM_CAPTURE = \PREG_SPLIT_DELIM_CAPTURE;
    public const PREG_SPLIT_OFFSET_CAPTURE = \PREG_SPLIT_OFFSET_CAPTURE;
    protected $string = '';
    protected $ignoreCase = \false;
    public abstract function __construct(string $string = '');
    /**
     * Unwraps instances of AbstractString back to strings.
     *
     * @return string[]|array
     */
    public static function unwrap(array $values) : array
    {
        foreach ($values as $k => $v) {
            if ($v instanceof self) {
                $values[$k] = $v->__toString();
            } elseif (\is_array($v) && $values[$k] !== ($v = static::unwrap($v))) {
                $values[$k] = $v;
            }
        }
        return $values;
    }
    /**
     * Wraps (and normalizes) strings in instances of AbstractString.
     *
     * @return static[]|array
     */
    public static function wrap(array $values) : array
    {
        $i = 0;
        $keys = null;
        foreach ($values as $k => $v) {
            if (\is_string($k) && '' !== $k && $k !== ($j = (string) new static($k))) {
                $keys = $keys ?? \array_keys($values);
                $keys[$i] = $j;
            }
            if (\is_string($v)) {
                $values[$k] = new static($v);
            } elseif (\is_array($v) && $values[$k] !== ($v = static::wrap($v))) {
                $values[$k] = $v;
            }
            ++$i;
        }
        return null !== $keys ? \array_combine($keys, $values) : $values;
    }
    /**
     * @param string|string[] $needle
     *
     * @return static
     */
    public function after($needle, bool $includeNeedle = \false, int $offset = 0) : self
    {
        $str = clone $this;
        $i = \PHP_INT_MAX;
        foreach ((array) $needle as $n) {
            $n = (string) $n;
            $j = $this->indexOf($n, $offset);
            if (null !== $j && $j < $i) {
                $i = $j;
                $str->string = $n;
            }
        }
        if (\PHP_INT_MAX === $i) {
            return $str;
        }
        if (!$includeNeedle) {
            $i += $str->length();
        }
        return $this->slice($i);
    }
    /**
     * @param string|string[] $needle
     *
     * @return static
     */
    public function afterLast($needle, bool $includeNeedle = \false, int $offset = 0) : self
    {
        $str = clone $this;
        $i = null;
        foreach ((array) $needle as $n) {
            $n = (string) $n;
            $j = $this->indexOfLast($n, $offset);
            if (null !== $j && $j >= $i) {
                $i = $offset = $j;
                $str->string = $n;
            }
        }
        if (null === $i) {
            return $str;
        }
        if (!$includeNeedle) {
            $i += $str->length();
        }
        return $this->slice($i);
    }
    /**
     * @return static
     */
    public abstract function append(string ...$suffix) : self;
    /**
     * @param string|string[] $needle
     *
     * @return static
     */
    public function before($needle, bool $includeNeedle = \false, int $offset = 0) : self
    {
        $str = clone $this;
        $i = \PHP_INT_MAX;
        foreach ((array) $needle as $n) {
            $n = (string) $n;
            $j = $this->indexOf($n, $offset);
            if (null !== $j && $j < $i) {
                $i = $j;
                $str->string = $n;
            }
        }
        if (\PHP_INT_MAX === $i) {
            return $str;
        }
        if ($includeNeedle) {
            $i += $str->length();
        }
        return $this->slice(0, $i);
    }
    /**
     * @param string|string[] $needle
     *
     * @return static
     */
    public function beforeLast($needle, bool $includeNeedle = \false, int $offset = 0) : self
    {
        $str = clone $this;
        $i = null;
        foreach ((array) $needle as $n) {
            $n = (string) $n;
            $j = $this->indexOfLast($n, $offset);
            if (null !== $j && $j >= $i) {
                $i = $offset = $j;
                $str->string = $n;
            }
        }
        if (null === $i) {
            return $str;
        }
        if ($includeNeedle) {
            $i += $str->length();
        }
        return $this->slice(0, $i);
    }
    /**
     * @return int[]
     */
    public function bytesAt(int $offset) : array
    {
        $str = $this->slice($offset, 1);
        return '' === $str->string ? [] : \array_values(\unpack('C*', $str->string));
    }
    /**
     * @return static
     */
    public abstract function camel() : self;
    /**
     * @return static[]
     */
    public abstract function chunk(int $length = 1) : array;
    /**
     * @return static
     */
    public function collapseWhitespace() : self
    {
        $str = clone $this;
        $str->string = \trim(\preg_replace("/(?:[ \n\r\t\f]{2,}+|[\n\r\t\f])/", ' ', $str->string), " \n\r\t\f");
        return $str;
    }
    /**
     * @param string|string[] $needle
     */
    public function containsAny($needle) : bool
    {
        return null !== $this->indexOf($needle);
    }
    /**
     * @param string|string[] $suffix
     */
    public function endsWith($suffix) : bool
    {
        if (!\is_array($suffix) && !$suffix instanceof \Traversable) {
            throw new \TypeError(\sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));
        }
        foreach ($suffix as $s) {
            if ($this->endsWith((string) $s)) {
                return \true;
            }
        }
        return \false;
    }
    /**
     * @return static
     */
    public function ensureEnd(string $suffix) : self
    {
        if (!$this->endsWith($suffix)) {
            return $this->append($suffix);
        }
        $suffix = \preg_quote($suffix);
        $regex = '{(' . $suffix . ')(?:' . $suffix . ')++$}D';
        return $this->replaceMatches($regex . ($this->ignoreCase ? 'i' : ''), '$1');
    }
    /**
     * @return static
     */
    public function ensureStart(string $prefix) : self
    {
        $prefix = new static($prefix);
        if (!$this->startsWith($prefix)) {
            return $this->prepend($prefix);
        }
        $str = clone $this;
        $i = $prefixLen = $prefix->length();
        while ($this->indexOf($prefix, $i) === $i) {
            $str = $str->slice($prefixLen);
            $i += $prefixLen;
        }
        return $str;
    }
    /**
     * @param string|string[] $string
     */
    public function equalsTo($string) : bool
    {
        if (!\is_array($string) && !$string instanceof \Traversable) {
            throw new \TypeError(\sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));
        }
        foreach ($string as $s) {
            if ($this->equalsTo((string) $s)) {
                return \true;
            }
        }
        return \false;
    }
    /**
     * @return static
     */
    public abstract function folded() : self;
    /**
     * @return static
     */
    public function ignoreCase() : self
    {
        $str = clone $this;
        $str->ignoreCase = \true;
        return $str;
    }
    /**
     * @param string|string[] $needle
     */
    public function indexOf($needle, int $offset = 0) : ?int
    {
        if (!\is_array($needle) && !$needle instanceof \Traversable) {
            throw new \TypeError(\sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));
        }
        $i = \PHP_INT_MAX;
        foreach ($needle as $n) {
            $j = $this->indexOf((string) $n, $offset);
            if (null !== $j && $j < $i) {
                $i = $j;
            }
        }
        return \PHP_INT_MAX === $i ? null : $i;
    }
    /**
     * @param string|string[] $needle
     */
    public function indexOfLast($needle, int $offset = 0) : ?int
    {
        if (!\is_array($needle) && !$needle instanceof \Traversable) {
            throw new \TypeError(\sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));
        }
        $i = null;
        foreach ($needle as $n) {
            $j = $this->indexOfLast((string) $n, $offset);
            if (null !== $j && $j >= $i) {
                $i = $offset = $j;
            }
        }
        return $i;
    }
    public function isEmpty() : bool
    {
        return '' === $this->string;
    }
    /**
     * @return static
     */
    public abstract function join(array $strings, string $lastGlue = null) : self;
    public function jsonSerialize() : string
    {
        return $this->string;
    }
    public abstract function length() : int;
    /**
     * @return static
     */
    public abstract function lower() : self;
    /**
     * Matches the string using a regular expression.
     *
     * Pass PREG_PATTERN_ORDER or PREG_SET_ORDER as $flags to get all occurrences matching the regular expression.
     *
     * @return array All matches in a multi-dimensional array ordered according to flags
     */
    public abstract function match(string $regexp, int $flags = 0, int $offset = 0) : array;
    /**
     * @return static
     */
    public abstract function padBoth(int $length, string $padStr = ' ') : self;
    /**
     * @return static
     */
    public abstract function padEnd(int $length, string $padStr = ' ') : self;
    /**
     * @return static
     */
    public abstract function padStart(int $length, string $padStr = ' ') : self;
    /**
     * @return static
     */
    public abstract function prepend(string ...$prefix) : self;
    /**
     * @return static
     */
    public function repeat(int $multiplier) : self
    {
        if (0 > $multiplier) {
            throw new InvalidArgumentException(\sprintf('Multiplier must be positive, %d given.', $multiplier));
        }
        $str = clone $this;
        $str->string = \str_repeat($str->string, $multiplier);
        return $str;
    }
    /**
     * @return static
     */
    public abstract function replace(string $from, string $to) : self;
    /**
     * @param string|callable $to
     *
     * @return static
     */
    public abstract function replaceMatches(string $fromRegexp, $to) : self;
    /**
     * @return static
     */
    public abstract function reverse() : self;
    /**
     * @return static
     */
    public abstract function slice(int $start = 0, int $length = null) : self;
    /**
     * @return static
     */
    public abstract function snake() : self;
    /**
     * @return static
     */
    public abstract function splice(string $replacement, int $start = 0, int $length = null) : self;
    /**
     * @return static[]
     */
    public function split(string $delimiter, int $limit = null, int $flags = null) : array
    {
        if (null === $flags) {
            throw new \TypeError('Split behavior when $flags is null must be implemented by child classes.');
        }
        if ($this->ignoreCase) {
            $delimiter .= 'i';
        }
        \set_error_handler(static function ($t, $m) {
            throw new InvalidArgumentException($m);
        });
        try {
            if (\false === ($chunks = \preg_split($delimiter, $this->string, $limit, $flags))) {
                $lastError = \preg_last_error();
                foreach (\get_defined_constants(\true)['pcre'] as $k => $v) {
                    if ($lastError === $v && '_ERROR' === \substr($k, -6)) {
                        throw new RuntimeException('Splitting failed with ' . $k . '.');
                    }
                }
                throw new RuntimeException('Splitting failed with unknown error code.');
            }
        } finally {
            \restore_error_handler();
        }
        $str = clone $this;
        if (self::PREG_SPLIT_OFFSET_CAPTURE & $flags) {
            foreach ($chunks as &$chunk) {
                $str->string = $chunk[0];
                $chunk[0] = clone $str;
            }
        } else {
            foreach ($chunks as &$chunk) {
                $str->string = $chunk;
                $chunk = clone $str;
            }
        }
        return $chunks;
    }
    /**
     * @param string|string[] $prefix
     */
    public function startsWith($prefix) : bool
    {
        if (!\is_array($prefix) && !$prefix instanceof \Traversable) {
            throw new \TypeError(\sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));
        }
        foreach ($prefix as $prefix) {
            if ($this->startsWith((string) $prefix)) {
                return \true;
            }
        }
        return \false;
    }
    /**
     * @return static
     */
    public abstract function title(bool $allWords = \false) : self;
    public function toByteString(string $toEncoding = null) : ByteString
    {
        $b = new ByteString();
        $toEncoding = \in_array($toEncoding, ['utf8', 'utf-8', 'UTF8'], \true) ? 'UTF-8' : $toEncoding;
        if (null === $toEncoding || $toEncoding === ($fromEncoding = $this instanceof AbstractUnicodeString || \preg_match('//u', $b->string) ? 'UTF-8' : 'Windows-1252')) {
            $b->string = $this->string;
            return $b;
        }
        \set_error_handler(static function ($t, $m) {
            throw new InvalidArgumentException($m);
        });
        try {
            try {
                $b->string = \mb_convert_encoding($this->string, $toEncoding, 'UTF-8');
            } catch (InvalidArgumentException $e) {
                if (!\function_exists('iconv')) {
                    throw $e;
                }
                $b->string = \iconv('UTF-8', $toEncoding, $this->string);
            }
        } finally {
            \restore_error_handler();
        }
        return $b;
    }
    public function toCodePointString() : CodePointString
    {
        return new CodePointString($this->string);
    }
    public function toString() : string
    {
        return $this->string;
    }
    public function toUnicodeString() : UnicodeString
    {
        return new UnicodeString($this->string);
    }
    /**
     * @return static
     */
    public abstract function trim(string $chars = " \t\n\r\x00\v\f ") : self;
    /**
     * @return static
     */
    public abstract function trimEnd(string $chars = " \t\n\r\x00\v\f ") : self;
    /**
     * @param string|string[] $prefix
     *
     * @return static
     */
    public function trimPrefix($prefix) : self
    {
        if (\is_array($prefix) || $prefix instanceof \Traversable) {
            foreach ($prefix as $s) {
                $t = $this->trimPrefix($s);
                if ($t->string !== $this->string) {
                    return $t;
                }
            }
            return clone $this;
        }
        $str = clone $this;
        if ($prefix instanceof self) {
            $prefix = $prefix->string;
        } else {
            $prefix = (string) $prefix;
        }
        if ('' !== $prefix && \strlen($this->string) >= \strlen($prefix) && 0 === \substr_compare($this->string, $prefix, 0, \strlen($prefix), $this->ignoreCase)) {
            $str->string = \substr($this->string, \strlen($prefix));
        }
        return $str;
    }
    /**
     * @return static
     */
    public abstract function trimStart(string $chars = " \t\n\r\x00\v\f ") : self;
    /**
     * @param string|string[] $suffix
     *
     * @return static
     */
    public function trimSuffix($suffix) : self
    {
        if (\is_array($suffix) || $suffix instanceof \Traversable) {
            foreach ($suffix as $s) {
                $t = $this->trimSuffix($s);
                if ($t->string !== $this->string) {
                    return $t;
                }
            }
            return clone $this;
        }
        $str = clone $this;
        if ($suffix instanceof self) {
            $suffix = $suffix->string;
        } else {
            $suffix = (string) $suffix;
        }
        if ('' !== $suffix && \strlen($this->string) >= \strlen($suffix) && 0 === \substr_compare($this->string, $suffix, -\strlen($suffix), null, $this->ignoreCase)) {
            $str->string = \substr($this->string, 0, -\strlen($suffix));
        }
        return $str;
    }
    /**
     * @return static
     */
    public function truncate(int $length, string $ellipsis = '', bool $cut = \true) : self
    {
        $stringLength = $this->length();
        if ($stringLength <= $length) {
            return clone $this;
        }
        $ellipsisLength = '' !== $ellipsis ? (new static($ellipsis))->length() : 0;
        if ($length < $ellipsisLength) {
            $ellipsisLength = 0;
        }
        if (!$cut) {
            if (null === ($length = $this->indexOf([' ', "\r", "\n", "\t"], ($length ?: 1) - 1))) {
                return clone $this;
            }
            $length += $ellipsisLength;
        }
        $str = $this->slice(0, $length - $ellipsisLength);
        return $ellipsisLength ? $str->trimEnd()->append($ellipsis) : $str;
    }
    /**
     * @return static
     */
    public abstract function upper() : self;
    /**
     * Returns the printable length on a terminal.
     */
    public abstract function width(bool $ignoreAnsiDecoration = \true) : int;
    /**
     * @return static
     */
    public function wordwrap(int $width = 75, string $break = "\n", bool $cut = \false) : self
    {
        $lines = '' !== $break ? $this->split($break) : [clone $this];
        $chars = [];
        $mask = '';
        if (1 === \count($lines) && '' === $lines[0]->string) {
            return $lines[0];
        }
        foreach ($lines as $i => $line) {
            if ($i) {
                $chars[] = $break;
                $mask .= '#';
            }
            foreach ($line->chunk() as $char) {
                $chars[] = $char->string;
                $mask .= ' ' === $char->string ? ' ' : '?';
            }
        }
        $string = '';
        $j = 0;
        $b = $i = -1;
        $mask = \wordwrap($mask, $width, '#', $cut);
        while (\false !== ($b = \strpos($mask, '#', $b + 1))) {
            for (++$i; $i < $b; ++$i) {
                $string .= $chars[$j];
                unset($chars[$j++]);
            }
            if ($break === $chars[$j] || ' ' === $chars[$j]) {
                unset($chars[$j++]);
            }
            $string .= $break;
        }
        $str = clone $this;
        $str->string = $string . \implode('', $chars);
        return $str;
    }
    public function __sleep() : array
    {
        return ['string'];
    }
    public function __clone()
    {
        $this->ignoreCase = \false;
    }
    public function __toString() : string
    {
        return $this->string;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\String\Inflector;

/**
 * French inflector.
 *
 * This class does only inflect nouns; not adjectives nor composed words like "soixante-dix".
 */
final class FrenchInflector implements InflectorInterface
{
    /**
     * A list of all rules for pluralise.
     *
     * @see https://la-conjugaison.nouvelobs.com/regles/grammaire/le-pluriel-des-noms-121.php
     */
    private const PLURALIZE_REGEXP = [
        // First entry: regexp
        // Second entry: replacement
        // Words finishing with "s", "x" or "z" are invariables
        // Les mots finissant par "s", "x" ou "z" sont invariables
        ['/(s|x|z)$/i', '\\1'],
        // Words finishing with "eau" are pluralized with a "x"
        // Les mots finissant par "eau" prennent tous un "x" au pluriel
        ['/(eau)$/i', '\\1x'],
        // Words finishing with "au" are pluralized with a "x" excepted "landau"
        // Les mots finissant par "au" prennent un "x" au pluriel sauf "landau"
        ['/^(landau)$/i', '\\1s'],
        ['/(au)$/i', '\\1x'],
        // Words finishing with "eu" are pluralized with a "x" excepted "pneu", "bleu", "émeu"
        // Les mots finissant en "eu" prennent un "x" au pluriel sauf "pneu", "bleu", "émeu"
        ['/^(pneu|bleu|émeu)$/i', '\\1s'],
        ['/(eu)$/i', '\\1x'],
        // Words finishing with "al" are pluralized with a "aux" excepted
        // Les mots finissant en "al" se terminent en "aux" sauf
        ['/^(bal|carnaval|caracal|chacal|choral|corral|étal|festival|récital|val)$/i', '\\1s'],
        ['/al$/i', '\\1aux'],
        // Aspirail, bail, corail, émail, fermail, soupirail, travail, vantail et vitrail font leur pluriel en -aux
        ['/^(aspir|b|cor|ém|ferm|soupir|trav|vant|vitr)ail$/i', '\\1aux'],
        // Bijou, caillou, chou, genou, hibou, joujou et pou qui prennent un x au pluriel
        ['/^(bij|caill|ch|gen|hib|jouj|p)ou$/i', '\\1oux'],
        // Invariable words
        ['/^(cinquante|soixante|mille)$/i', '\\1'],
        // French titles
        ['/^(mon|ma)(sieur|dame|demoiselle|seigneur)$/', '_PHPStan_dcc7b7cff\\mes\\2s'],
        ['/^(Mon|Ma)(sieur|dame|demoiselle|seigneur)$/', '_PHPStan_dcc7b7cff\\Mes\\2s'],
    ];
    /**
     * A list of all rules for singularize.
     */
    private const SINGULARIZE_REGEXP = [
        // First entry: regexp
        // Second entry: replacement
        // Aspirail, bail, corail, émail, fermail, soupirail, travail, vantail et vitrail font leur pluriel en -aux
        ['/((aspir|b|cor|ém|ferm|soupir|trav|vant|vitr))aux$/i', '\\1ail'],
        // Words finishing with "eau" are pluralized with a "x"
        // Les mots finissant par "eau" prennent tous un "x" au pluriel
        ['/(eau)x$/i', '\\1'],
        // Words finishing with "al" are pluralized with a "aux" expected
        // Les mots finissant en "al" se terminent en "aux" sauf
        ['/(amir|anim|arsen|boc|can|capit|capor|chev|crist|génér|hopit|hôpit|idé|journ|littor|loc|m|mét|minér|princip|radic|termin)aux$/i', '\\1al'],
        // Words finishing with "au" are pluralized with a "x" excepted "landau"
        // Les mots finissant par "au" prennent un "x" au pluriel sauf "landau"
        ['/(au)x$/i', '\\1'],
        // Words finishing with "eu" are pluralized with a "x" excepted "pneu", "bleu", "émeu"
        // Les mots finissant en "eu" prennent un "x" au pluriel sauf "pneu", "bleu", "émeu"
        ['/(eu)x$/i', '\\1'],
        //  Words finishing with "ou" are pluralized with a "s" excepted bijou, caillou, chou, genou, hibou, joujou, pou
        // Les mots finissant par "ou" prennent un "s" sauf bijou, caillou, chou, genou, hibou, joujou, pou
        ['/(bij|caill|ch|gen|hib|jouj|p)oux$/i', '\\1ou'],
        // French titles
        ['/^mes(dame|demoiselle)s$/', '_PHPStan_dcc7b7cff\\ma\\1'],
        ['/^Mes(dame|demoiselle)s$/', '_PHPStan_dcc7b7cff\\Ma\\1'],
        ['/^mes(sieur|seigneur)s$/', '_PHPStan_dcc7b7cff\\mon\\1'],
        ['/^Mes(sieur|seigneur)s$/', '_PHPStan_dcc7b7cff\\Mon\\1'],
        // Default rule
        ['/s$/i', ''],
    ];
    /**
     * A list of words which should not be inflected.
     * This list is only used by singularize.
     */
    private const UNINFLECTED = '/^(abcès|accès|abus|albatros|anchois|anglais|autobus|bois|brebis|carquois|cas|chas|colis|concours|corps|cours|cyprès|décès|devis|discours|dos|embarras|engrais|entrelacs|excès|fils|fois|gâchis|gars|glas|héros|intrus|jars|jus|kermès|lacis|legs|lilas|marais|mars|matelas|mépris|mets|mois|mors|obus|os|palais|paradis|parcours|pardessus|pays|plusieurs|poids|pois|pouls|printemps|processus|progrès|puits|pus|rabais|radis|recors|recours|refus|relais|remords|remous|rictus|rhinocéros|repas|rubis|sans|sas|secours|sens|souris|succès|talus|tapis|tas|taudis|temps|tiers|univers|velours|verglas|vernis|virus)$/i';
    /**
     * {@inheritdoc}
     */
    public function singularize(string $plural) : array
    {
        if ($this->isInflectedWord($plural)) {
            return [$plural];
        }
        foreach (self::SINGULARIZE_REGEXP as $rule) {
            [$regexp, $replace] = $rule;
            if (1 === \preg_match($regexp, $plural)) {
                return [\preg_replace($regexp, $replace, $plural)];
            }
        }
        return [$plural];
    }
    /**
     * {@inheritdoc}
     */
    public function pluralize(string $singular) : array
    {
        if ($this->isInflectedWord($singular)) {
            return [$singular];
        }
        foreach (self::PLURALIZE_REGEXP as $rule) {
            [$regexp, $replace] = $rule;
            if (1 === \preg_match($regexp, $singular)) {
                return [\preg_replace($regexp, $replace, $singular)];
            }
        }
        return [$singular . 's'];
    }
    private function isInflectedWord(string $word) : bool
    {
        return 1 === \preg_match(self::UNINFLECTED, $word);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\String\Inflector;

interface InflectorInterface
{
    /**
     * Returns the singular forms of a string.
     *
     * If the method can't determine the form with certainty, several possible singulars are returned.
     *
     * @return string[]
     */
    public function singularize(string $plural) : array;
    /**
     * Returns the plural forms of a string.
     *
     * If the method can't determine the form with certainty, several possible plurals are returned.
     *
     * @return string[]
     */
    public function pluralize(string $singular) : array;
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\String\Inflector;

final class EnglishInflector implements InflectorInterface
{
    /**
     * Map English plural to singular suffixes.
     *
     * @see http://english-zone.com/spelling/plurals.html
     */
    private const PLURAL_MAP = [
        // First entry: plural suffix, reversed
        // Second entry: length of plural suffix
        // Third entry: Whether the suffix may succeed a vocal
        // Fourth entry: Whether the suffix may succeed a consonant
        // Fifth entry: singular suffix, normal
        // bacteria (bacterium), criteria (criterion), phenomena (phenomenon)
        ['a', 1, \true, \true, ['on', 'um']],
        // nebulae (nebula)
        ['ea', 2, \true, \true, 'a'],
        // services (service)
        ['secivres', 8, \true, \true, 'service'],
        // mice (mouse), lice (louse)
        ['eci', 3, \false, \true, 'ouse'],
        // geese (goose)
        ['esee', 4, \false, \true, 'oose'],
        // fungi (fungus), alumni (alumnus), syllabi (syllabus), radii (radius)
        ['i', 1, \true, \true, 'us'],
        // men (man), women (woman)
        ['nem', 3, \true, \true, 'man'],
        // children (child)
        ['nerdlihc', 8, \true, \true, 'child'],
        // oxen (ox)
        ['nexo', 4, \false, \false, 'ox'],
        // indices (index), appendices (appendix), prices (price)
        ['seci', 4, \false, \true, ['ex', 'ix', 'ice']],
        // codes (code)
        ['sedoc', 5, \false, \true, 'code'],
        // selfies (selfie)
        ['seifles', 7, \true, \true, 'selfie'],
        // zombies (zombie)
        ['seibmoz', 7, \true, \true, 'zombie'],
        // movies (movie)
        ['seivom', 6, \true, \true, 'movie'],
        // names (name)
        ['seman', 5, \true, \false, 'name'],
        // conspectuses (conspectus), prospectuses (prospectus)
        ['sesutcep', 8, \true, \true, 'pectus'],
        // feet (foot)
        ['teef', 4, \true, \true, 'foot'],
        // geese (goose)
        ['eseeg', 5, \true, \true, 'goose'],
        // teeth (tooth)
        ['hteet', 5, \true, \true, 'tooth'],
        // news (news)
        ['swen', 4, \true, \true, 'news'],
        // series (series)
        ['seires', 6, \true, \true, 'series'],
        // babies (baby)
        ['sei', 3, \false, \true, 'y'],
        // accesses (access), addresses (address), kisses (kiss)
        ['sess', 4, \true, \false, 'ss'],
        // analyses (analysis), ellipses (ellipsis), fungi (fungus),
        // neuroses (neurosis), theses (thesis), emphases (emphasis),
        // oases (oasis), crises (crisis), houses (house), bases (base),
        // atlases (atlas)
        ['ses', 3, \true, \true, ['s', 'se', 'sis']],
        // objectives (objective), alternative (alternatives)
        ['sevit', 5, \true, \true, 'tive'],
        // drives (drive)
        ['sevird', 6, \false, \true, 'drive'],
        // lives (life), wives (wife)
        ['sevi', 4, \false, \true, 'ife'],
        // moves (move)
        ['sevom', 5, \true, \true, 'move'],
        // hooves (hoof), dwarves (dwarf), elves (elf), leaves (leaf), caves (cave), staves (staff)
        ['sev', 3, \true, \true, ['f', 've', 'ff']],
        // axes (axis), axes (ax), axes (axe)
        ['sexa', 4, \false, \false, ['ax', 'axe', 'axis']],
        // indexes (index), matrixes (matrix)
        ['sex', 3, \true, \false, 'x'],
        // quizzes (quiz)
        ['sezz', 4, \true, \false, 'z'],
        // bureaus (bureau)
        ['suae', 4, \false, \true, 'eau'],
        // fees (fee), trees (tree), employees (employee)
        ['see', 3, \true, \true, 'ee'],
        // edges (edge)
        ['segd', 4, \true, \true, 'dge'],
        // roses (rose), garages (garage), cassettes (cassette),
        // waltzes (waltz), heroes (hero), bushes (bush), arches (arch),
        // shoes (shoe)
        ['se', 2, \true, \true, ['', 'e']],
        // tags (tag)
        ['s', 1, \true, \true, ''],
        // chateaux (chateau)
        ['xuae', 4, \false, \true, 'eau'],
        // people (person)
        ['elpoep', 6, \true, \true, 'person'],
    ];
    /**
     * Map English singular to plural suffixes.
     *
     * @see http://english-zone.com/spelling/plurals.html
     */
    private const SINGULAR_MAP = [
        // First entry: singular suffix, reversed
        // Second entry: length of singular suffix
        // Third entry: Whether the suffix may succeed a vocal
        // Fourth entry: Whether the suffix may succeed a consonant
        // Fifth entry: plural suffix, normal
        // criterion (criteria)
        ['airetirc', 8, \false, \false, 'criterion'],
        // nebulae (nebula)
        ['aluben', 6, \false, \false, 'nebulae'],
        // children (child)
        ['dlihc', 5, \true, \true, 'children'],
        // prices (price)
        ['eci', 3, \false, \true, 'ices'],
        // services (service)
        ['ecivres', 7, \true, \true, 'services'],
        // lives (life), wives (wife)
        ['efi', 3, \false, \true, 'ives'],
        // selfies (selfie)
        ['eifles', 6, \true, \true, 'selfies'],
        // movies (movie)
        ['eivom', 5, \true, \true, 'movies'],
        // lice (louse)
        ['esuol', 5, \false, \true, 'lice'],
        // mice (mouse)
        ['esuom', 5, \false, \true, 'mice'],
        // geese (goose)
        ['esoo', 4, \false, \true, 'eese'],
        // houses (house), bases (base)
        ['es', 2, \true, \true, 'ses'],
        // geese (goose)
        ['esoog', 5, \true, \true, 'geese'],
        // caves (cave)
        ['ev', 2, \true, \true, 'ves'],
        // drives (drive)
        ['evird', 5, \false, \true, 'drives'],
        // objectives (objective), alternative (alternatives)
        ['evit', 4, \true, \true, 'tives'],
        // moves (move)
        ['evom', 4, \true, \true, 'moves'],
        // staves (staff)
        ['ffats', 5, \true, \true, 'staves'],
        // hooves (hoof), dwarves (dwarf), elves (elf), leaves (leaf)
        ['ff', 2, \true, \true, 'ffs'],
        // hooves (hoof), dwarves (dwarf), elves (elf), leaves (leaf)
        ['f', 1, \true, \true, ['fs', 'ves']],
        // arches (arch)
        ['hc', 2, \true, \true, 'ches'],
        // bushes (bush)
        ['hs', 2, \true, \true, 'shes'],
        // teeth (tooth)
        ['htoot', 5, \true, \true, 'teeth'],
        // bacteria (bacterium), criteria (criterion), phenomena (phenomenon)
        ['mu', 2, \true, \true, 'a'],
        // men (man), women (woman)
        ['nam', 3, \true, \true, 'men'],
        // people (person)
        ['nosrep', 6, \true, \true, ['persons', 'people']],
        // bacteria (bacterium), criteria (criterion), phenomena (phenomenon)
        ['noi', 3, \true, \true, 'ions'],
        // coupon (coupons)
        ['nop', 3, \true, \true, 'pons'],
        // seasons (season), treasons (treason), poisons (poison), lessons (lesson)
        ['nos', 3, \true, \true, 'sons'],
        // bacteria (bacterium), criteria (criterion), phenomena (phenomenon)
        ['no', 2, \true, \true, 'a'],
        // echoes (echo)
        ['ohce', 4, \true, \true, 'echoes'],
        // heroes (hero)
        ['oreh', 4, \true, \true, 'heroes'],
        // atlases (atlas)
        ['salta', 5, \true, \true, 'atlases'],
        // irises (iris)
        ['siri', 4, \true, \true, 'irises'],
        // analyses (analysis), ellipses (ellipsis), neuroses (neurosis)
        // theses (thesis), emphases (emphasis), oases (oasis),
        // crises (crisis)
        ['sis', 3, \true, \true, 'ses'],
        // accesses (access), addresses (address), kisses (kiss)
        ['ss', 2, \true, \false, 'sses'],
        // syllabi (syllabus)
        ['suballys', 8, \true, \true, 'syllabi'],
        // buses (bus)
        ['sub', 3, \true, \true, 'buses'],
        // circuses (circus)
        ['suc', 3, \true, \true, 'cuses'],
        // conspectuses (conspectus), prospectuses (prospectus)
        ['sutcep', 6, \true, \true, 'pectuses'],
        // fungi (fungus), alumni (alumnus), syllabi (syllabus), radii (radius)
        ['su', 2, \true, \true, 'i'],
        // news (news)
        ['swen', 4, \true, \true, 'news'],
        // feet (foot)
        ['toof', 4, \true, \true, 'feet'],
        // chateaux (chateau), bureaus (bureau)
        ['uae', 3, \false, \true, ['eaus', 'eaux']],
        // oxen (ox)
        ['xo', 2, \false, \false, 'oxen'],
        // hoaxes (hoax)
        ['xaoh', 4, \true, \false, 'hoaxes'],
        // indices (index)
        ['xedni', 5, \false, \true, ['indicies', 'indexes']],
        // boxes (box)
        ['xo', 2, \false, \true, 'oxes'],
        // indexes (index), matrixes (matrix)
        ['x', 1, \true, \false, ['cies', 'xes']],
        // appendices (appendix)
        ['xi', 2, \false, \true, 'ices'],
        // babies (baby)
        ['y', 1, \false, \true, 'ies'],
        // quizzes (quiz)
        ['ziuq', 4, \true, \false, 'quizzes'],
        // waltzes (waltz)
        ['z', 1, \true, \true, 'zes'],
    ];
    /**
     * A list of words which should not be inflected, reversed.
     */
    private const UNINFLECTED = [
        '',
        // data
        'atad',
        // deer
        'reed',
        // feedback
        'kcabdeef',
        // fish
        'hsif',
        // info
        'ofni',
        // moose
        'esoom',
        // series
        'seires',
        // sheep
        'peehs',
        // species
        'seiceps',
    ];
    /**
     * {@inheritdoc}
     */
    public function singularize(string $plural) : array
    {
        $pluralRev = \strrev($plural);
        $lowerPluralRev = \strtolower($pluralRev);
        $pluralLength = \strlen($lowerPluralRev);
        // Check if the word is one which is not inflected, return early if so
        if (\in_array($lowerPluralRev, self::UNINFLECTED, \true)) {
            return [$plural];
        }
        // The outer loop iterates over the entries of the plural table
        // The inner loop $j iterates over the characters of the plural suffix
        // in the plural table to compare them with the characters of the actual
        // given plural suffix
        foreach (self::PLURAL_MAP as $map) {
            $suffix = $map[0];
            $suffixLength = $map[1];
            $j = 0;
            // Compare characters in the plural table and of the suffix of the
            // given plural one by one
            while ($suffix[$j] === $lowerPluralRev[$j]) {
                // Let $j point to the next character
                ++$j;
                // Successfully compared the last character
                // Add an entry with the singular suffix to the singular array
                if ($j === $suffixLength) {
                    // Is there any character preceding the suffix in the plural string?
                    if ($j < $pluralLength) {
                        $nextIsVocal = \false !== \strpos('aeiou', $lowerPluralRev[$j]);
                        if (!$map[2] && $nextIsVocal) {
                            // suffix may not succeed a vocal but next char is one
                            break;
                        }
                        if (!$map[3] && !$nextIsVocal) {
                            // suffix may not succeed a consonant but next char is one
                            break;
                        }
                    }
                    $newBase = \substr($plural, 0, $pluralLength - $suffixLength);
                    $newSuffix = $map[4];
                    // Check whether the first character in the plural suffix
                    // is uppercased. If yes, uppercase the first character in
                    // the singular suffix too
                    $firstUpper = \ctype_upper($pluralRev[$j - 1]);
                    if (\is_array($newSuffix)) {
                        $singulars = [];
                        foreach ($newSuffix as $newSuffixEntry) {
                            $singulars[] = $newBase . ($firstUpper ? \ucfirst($newSuffixEntry) : $newSuffixEntry);
                        }
                        return $singulars;
                    }
                    return [$newBase . ($firstUpper ? \ucfirst($newSuffix) : $newSuffix)];
                }
                // Suffix is longer than word
                if ($j === $pluralLength) {
                    break;
                }
            }
        }
        // Assume that plural and singular is identical
        return [$plural];
    }
    /**
     * {@inheritdoc}
     */
    public function pluralize(string $singular) : array
    {
        $singularRev = \strrev($singular);
        $lowerSingularRev = \strtolower($singularRev);
        $singularLength = \strlen($lowerSingularRev);
        // Check if the word is one which is not inflected, return early if so
        if (\in_array($lowerSingularRev, self::UNINFLECTED, \true)) {
            return [$singular];
        }
        // The outer loop iterates over the entries of the singular table
        // The inner loop $j iterates over the characters of the singular suffix
        // in the singular table to compare them with the characters of the actual
        // given singular suffix
        foreach (self::SINGULAR_MAP as $map) {
            $suffix = $map[0];
            $suffixLength = $map[1];
            $j = 0;
            // Compare characters in the singular table and of the suffix of the
            // given plural one by one
            while ($suffix[$j] === $lowerSingularRev[$j]) {
                // Let $j point to the next character
                ++$j;
                // Successfully compared the last character
                // Add an entry with the plural suffix to the plural array
                if ($j === $suffixLength) {
                    // Is there any character preceding the suffix in the plural string?
                    if ($j < $singularLength) {
                        $nextIsVocal = \false !== \strpos('aeiou', $lowerSingularRev[$j]);
                        if (!$map[2] && $nextIsVocal) {
                            // suffix may not succeed a vocal but next char is one
                            break;
                        }
                        if (!$map[3] && !$nextIsVocal) {
                            // suffix may not succeed a consonant but next char is one
                            break;
                        }
                    }
                    $newBase = \substr($singular, 0, $singularLength - $suffixLength);
                    $newSuffix = $map[4];
                    // Check whether the first character in the singular suffix
                    // is uppercased. If yes, uppercase the first character in
                    // the singular suffix too
                    $firstUpper = \ctype_upper($singularRev[$j - 1]);
                    if (\is_array($newSuffix)) {
                        $plurals = [];
                        foreach ($newSuffix as $newSuffixEntry) {
                            $plurals[] = $newBase . ($firstUpper ? \ucfirst($newSuffixEntry) : $newSuffixEntry);
                        }
                        return $plurals;
                    }
                    return [$newBase . ($firstUpper ? \ucfirst($newSuffix) : $newSuffix)];
                }
                // Suffix is longer than word
                if ($j === $singularLength) {
                    break;
                }
            }
        }
        // Assume that plural is singular with a trailing `s`
        return [$singular . 's'];
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\String\Slugger;

use _PHPStan_dcc7b7cff\Symfony\Component\String\AbstractUnicodeString;
use _PHPStan_dcc7b7cff\Symfony\Component\String\UnicodeString;
use _PHPStan_dcc7b7cff\Symfony\Contracts\Translation\LocaleAwareInterface;
if (!\interface_exists(LocaleAwareInterface::class)) {
    throw new \LogicException('You cannot use the "Symfony\\Component\\String\\Slugger\\AsciiSlugger" as the "symfony/translation-contracts" package is not installed. Try running "composer require symfony/translation-contracts".');
}
/**
 * @author Titouan Galopin <galopintitouan@gmail.com>
 */
class AsciiSlugger implements SluggerInterface, LocaleAwareInterface
{
    private const LOCALE_TO_TRANSLITERATOR_ID = ['am' => 'Amharic-Latin', 'ar' => 'Arabic-Latin', 'az' => 'Azerbaijani-Latin', 'be' => 'Belarusian-Latin', 'bg' => 'Bulgarian-Latin', 'bn' => 'Bengali-Latin', 'de' => 'de-ASCII', 'el' => 'Greek-Latin', 'fa' => 'Persian-Latin', 'he' => 'Hebrew-Latin', 'hy' => 'Armenian-Latin', 'ka' => 'Georgian-Latin', 'kk' => 'Kazakh-Latin', 'ky' => 'Kirghiz-Latin', 'ko' => 'Korean-Latin', 'mk' => 'Macedonian-Latin', 'mn' => 'Mongolian-Latin', 'or' => 'Oriya-Latin', 'ps' => 'Pashto-Latin', 'ru' => 'Russian-Latin', 'sr' => 'Serbian-Latin', 'sr_Cyrl' => 'Serbian-Latin', 'th' => 'Thai-Latin', 'tk' => 'Turkmen-Latin', 'uk' => 'Ukrainian-Latin', 'uz' => 'Uzbek-Latin', 'zh' => 'Han-Latin'];
    private $defaultLocale;
    private $symbolsMap = ['en' => ['@' => 'at', '&' => 'and']];
    /**
     * Cache of transliterators per locale.
     *
     * @var \Transliterator[]
     */
    private $transliterators = [];
    /**
     * @param array|\Closure|null $symbolsMap
     */
    public function __construct(string $defaultLocale = null, $symbolsMap = null)
    {
        if (null !== $symbolsMap && !\is_array($symbolsMap) && !$symbolsMap instanceof \Closure) {
            throw new \TypeError(\sprintf('Argument 2 passed to "%s()" must be array, Closure or null, "%s" given.', __METHOD__, \gettype($symbolsMap)));
        }
        $this->defaultLocale = $defaultLocale;
        $this->symbolsMap = $symbolsMap ?? $this->symbolsMap;
    }
    /**
     * {@inheritdoc}
     */
    public function setLocale($locale)
    {
        $this->defaultLocale = $locale;
    }
    /**
     * {@inheritdoc}
     */
    public function getLocale()
    {
        return $this->defaultLocale;
    }
    /**
     * {@inheritdoc}
     */
    public function slug(string $string, string $separator = '-', string $locale = null) : AbstractUnicodeString
    {
        $locale = $locale ?? $this->defaultLocale;
        $transliterator = [];
        if ($locale && ('de' === $locale || 0 === \strpos($locale, 'de_'))) {
            // Use the shortcut for German in UnicodeString::ascii() if possible (faster and no requirement on intl)
            $transliterator = ['de-ASCII'];
        } elseif (\function_exists('transliterator_transliterate') && $locale) {
            $transliterator = (array) $this->createTransliterator($locale);
        }
        if ($this->symbolsMap instanceof \Closure) {
            // If the symbols map is passed as a closure, there is no need to fallback to the parent locale
            // as the closure can just provide substitutions for all locales of interest.
            $symbolsMap = $this->symbolsMap;
            \array_unshift($transliterator, static function ($s) use($symbolsMap, $locale) {
                return $symbolsMap($s, $locale);
            });
        }
        $unicodeString = (new UnicodeString($string))->ascii($transliterator);
        if (\is_array($this->symbolsMap)) {
            $map = null;
            if (isset($this->symbolsMap[$locale])) {
                $map = $this->symbolsMap[$locale];
            } else {
                $parent = self::getParentLocale($locale);
                if ($parent && isset($this->symbolsMap[$parent])) {
                    $map = $this->symbolsMap[$parent];
                }
            }
            if ($map) {
                foreach ($map as $char => $replace) {
                    $unicodeString = $unicodeString->replace($char, ' ' . $replace . ' ');
                }
            }
        }
        return $unicodeString->replaceMatches('/[^A-Za-z0-9]++/', $separator)->trim($separator);
    }
    private function createTransliterator(string $locale) : ?\Transliterator
    {
        if (\array_key_exists($locale, $this->transliterators)) {
            return $this->transliterators[$locale];
        }
        // Exact locale supported, cache and return
        if ($id = self::LOCALE_TO_TRANSLITERATOR_ID[$locale] ?? null) {
            return $this->transliterators[$locale] = \Transliterator::create($id . '/BGN') ?? \Transliterator::create($id);
        }
        // Locale not supported and no parent, fallback to any-latin
        if (!($parent = self::getParentLocale($locale))) {
            return $this->transliterators[$locale] = null;
        }
        // Try to use the parent locale (ie. try "de" for "de_AT") and cache both locales
        if ($id = self::LOCALE_TO_TRANSLITERATOR_ID[$parent] ?? null) {
            $transliterator = \Transliterator::create($id . '/BGN') ?? \Transliterator::create($id);
        }
        return $this->transliterators[$locale] = $this->transliterators[$parent] = $transliterator ?? null;
    }
    private static function getParentLocale(?string $locale) : ?string
    {
        if (!$locale) {
            return null;
        }
        if (\false === ($str = \strrchr($locale, '_'))) {
            // no parent locale
            return null;
        }
        return \substr($locale, 0, -\strlen($str));
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\String\Slugger;

use _PHPStan_dcc7b7cff\Symfony\Component\String\AbstractUnicodeString;
/**
 * Creates a URL-friendly slug from a given string.
 *
 * @author Titouan Galopin <galopintitouan@gmail.com>
 */
interface SluggerInterface
{
    /**
     * Creates a slug for the given string and locale, using appropriate transliteration when needed.
     */
    public function slug(string $string, string $separator = '-', string $locale = null) : AbstractUnicodeString;
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Process;

use _PHPStan_dcc7b7cff\Symfony\Component\Process\Exception\InvalidArgumentException;
/**
 * ProcessUtils is a bunch of utility methods.
 *
 * This class contains static methods only and is not meant to be instantiated.
 *
 * @author Martin Hasoň <martin.hason@gmail.com>
 */
class ProcessUtils
{
    /**
     * This class should not be instantiated.
     */
    private function __construct()
    {
    }
    /**
     * Validates and normalizes a Process input.
     *
     * @param string $caller The name of method call that validates the input
     * @param mixed  $input  The input to validate
     *
     * @return mixed
     *
     * @throws InvalidArgumentException In case the input is not valid
     */
    public static function validateInput(string $caller, $input)
    {
        if (null !== $input) {
            if (\is_resource($input)) {
                return $input;
            }
            if (\is_string($input)) {
                return $input;
            }
            if (\is_scalar($input)) {
                return (string) $input;
            }
            if ($input instanceof Process) {
                return $input->getIterator($input::ITER_SKIP_ERR);
            }
            if ($input instanceof \Iterator) {
                return $input;
            }
            if ($input instanceof \Traversable) {
                return new \IteratorIterator($input);
            }
            throw new InvalidArgumentException(\sprintf('"%s" only accepts strings, Traversable objects or stream resources.', $caller));
        }
        return $input;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Process;

use _PHPStan_dcc7b7cff\Symfony\Component\Process\Exception\LogicException;
use _PHPStan_dcc7b7cff\Symfony\Component\Process\Exception\RuntimeException;
/**
 * PhpProcess runs a PHP script in an independent process.
 *
 *     $p = new PhpProcess('<?php echo "foo"; ?>');
 *     $p->run();
 *     print $p->getOutput()."\n";
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class PhpProcess extends Process
{
    /**
     * @param string      $script  The PHP script to run (as a string)
     * @param string|null $cwd     The working directory or null to use the working dir of the current PHP process
     * @param array|null  $env     The environment variables or null to use the same environment as the current PHP process
     * @param int         $timeout The timeout in seconds
     * @param array|null  $php     Path to the PHP binary to use with any additional arguments
     */
    public function __construct(string $script, string $cwd = null, array $env = null, int $timeout = 60, array $php = null)
    {
        if (null === $php) {
            $executableFinder = new PhpExecutableFinder();
            $php = $executableFinder->find(\false);
            $php = \false === $php ? null : \array_merge([$php], $executableFinder->findArguments());
        }
        if ('phpdbg' === \PHP_SAPI) {
            $file = \tempnam(\sys_get_temp_dir(), 'dbg');
            \file_put_contents($file, $script);
            \register_shutdown_function('unlink', $file);
            $php[] = $file;
            $script = null;
        }
        parent::__construct($php, $cwd, $env, $script, $timeout);
    }
    /**
     * {@inheritdoc}
     */
    public static function fromShellCommandline(string $command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60)
    {
        throw new LogicException(\sprintf('The "%s()" method cannot be called when using "%s".', __METHOD__, self::class));
    }
    /**
     * {@inheritdoc}
     */
    public function start(callable $callback = null, array $env = [])
    {
        if (null === $this->getCommandLine()) {
            throw new RuntimeException('Unable to find the PHP executable.');
        }
        parent::start($callback, $env);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Process;

use _PHPStan_dcc7b7cff\Symfony\Component\Process\Exception\InvalidArgumentException;
use _PHPStan_dcc7b7cff\Symfony\Component\Process\Exception\LogicException;
use _PHPStan_dcc7b7cff\Symfony\Component\Process\Exception\ProcessFailedException;
use _PHPStan_dcc7b7cff\Symfony\Component\Process\Exception\ProcessSignaledException;
use _PHPStan_dcc7b7cff\Symfony\Component\Process\Exception\ProcessTimedOutException;
use _PHPStan_dcc7b7cff\Symfony\Component\Process\Exception\RuntimeException;
use _PHPStan_dcc7b7cff\Symfony\Component\Process\Pipes\PipesInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Process\Pipes\UnixPipes;
use _PHPStan_dcc7b7cff\Symfony\Component\Process\Pipes\WindowsPipes;
/**
 * Process is a thin wrapper around proc_* functions to easily
 * start independent PHP processes.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 * @author Romain Neutron <imprec@gmail.com>
 *
 * @implements \IteratorAggregate<string, string>
 */
class Process implements \IteratorAggregate
{
    public const ERR = 'err';
    public const OUT = 'out';
    public const STATUS_READY = 'ready';
    public const STATUS_STARTED = 'started';
    public const STATUS_TERMINATED = 'terminated';
    public const STDIN = 0;
    public const STDOUT = 1;
    public const STDERR = 2;
    // Timeout Precision in seconds.
    public const TIMEOUT_PRECISION = 0.2;
    public const ITER_NON_BLOCKING = 1;
    // By default, iterating over outputs is a blocking call, use this flag to make it non-blocking
    public const ITER_KEEP_OUTPUT = 2;
    // By default, outputs are cleared while iterating, use this flag to keep them in memory
    public const ITER_SKIP_OUT = 4;
    // Use this flag to skip STDOUT while iterating
    public const ITER_SKIP_ERR = 8;
    // Use this flag to skip STDERR while iterating
    private $callback;
    private $hasCallback = \false;
    private $commandline;
    private $cwd;
    private $env = [];
    private $input;
    private $starttime;
    private $lastOutputTime;
    private $timeout;
    private $idleTimeout;
    private $exitcode;
    private $fallbackStatus = [];
    private $processInformation;
    private $outputDisabled = \false;
    private $stdout;
    private $stderr;
    private $process;
    private $status = self::STATUS_READY;
    private $incrementalOutputOffset = 0;
    private $incrementalErrorOutputOffset = 0;
    private $tty = \false;
    private $pty;
    private $options = ['suppress_errors' => \true, 'bypass_shell' => \true];
    private $useFileHandles = \false;
    /** @var PipesInterface */
    private $processPipes;
    private $latestSignal;
    private static $sigchild;
    /**
     * Exit codes translation table.
     *
     * User-defined errors must use exit codes in the 64-113 range.
     */
    public static $exitCodes = [
        0 => 'OK',
        1 => 'General error',
        2 => 'Misuse of shell builtins',
        126 => 'Invoked command cannot execute',
        127 => 'Command not found',
        128 => 'Invalid exit argument',
        // signals
        129 => 'Hangup',
        130 => 'Interrupt',
        131 => 'Quit and dump core',
        132 => 'Illegal instruction',
        133 => 'Trace/breakpoint trap',
        134 => 'Process aborted',
        135 => 'Bus error: "access to undefined portion of memory object"',
        136 => 'Floating point exception: "erroneous arithmetic operation"',
        137 => 'Kill (terminate immediately)',
        138 => 'User-defined 1',
        139 => 'Segmentation violation',
        140 => 'User-defined 2',
        141 => 'Write to pipe with no one reading',
        142 => 'Signal raised by alarm',
        143 => 'Termination (request to terminate)',
        // 144 - not defined
        145 => 'Child process terminated, stopped (or continued*)',
        146 => 'Continue if stopped',
        147 => 'Stop executing temporarily',
        148 => 'Terminal stop signal',
        149 => 'Background process attempting to read from tty ("in")',
        150 => 'Background process attempting to write to tty ("out")',
        151 => 'Urgent data available on socket',
        152 => 'CPU time limit exceeded',
        153 => 'File size limit exceeded',
        154 => 'Signal raised by timer counting virtual time: "virtual timer expired"',
        155 => 'Profiling timer expired',
        // 156 - not defined
        157 => 'Pollable event',
        // 158 - not defined
        159 => 'Bad syscall',
    ];
    /**
     * @param array          $command The command to run and its arguments listed as separate entries
     * @param string|null    $cwd     The working directory or null to use the working dir of the current PHP process
     * @param array|null     $env     The environment variables or null to use the same environment as the current PHP process
     * @param mixed          $input   The input as stream resource, scalar or \Traversable, or null for no input
     * @param int|float|null $timeout The timeout in seconds or null to disable
     *
     * @throws LogicException When proc_open is not installed
     */
    public function __construct(array $command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60)
    {
        if (!\function_exists('proc_open')) {
            throw new LogicException('The Process class relies on proc_open, which is not available on your PHP installation.');
        }
        $this->commandline = $command;
        $this->cwd = $cwd;
        // on Windows, if the cwd changed via chdir(), proc_open defaults to the dir where PHP was started
        // on Gnu/Linux, PHP builds with --enable-maintainer-zts are also affected
        // @see : https://bugs.php.net/51800
        // @see : https://bugs.php.net/50524
        if (null === $this->cwd && (\defined('ZEND_THREAD_SAFE') || '\\' === \DIRECTORY_SEPARATOR)) {
            $this->cwd = \getcwd();
        }
        if (null !== $env) {
            $this->setEnv($env);
        }
        $this->setInput($input);
        $this->setTimeout($timeout);
        $this->useFileHandles = '\\' === \DIRECTORY_SEPARATOR;
        $this->pty = \false;
    }
    /**
     * Creates a Process instance as a command-line to be run in a shell wrapper.
     *
     * Command-lines are parsed by the shell of your OS (/bin/sh on Unix-like, cmd.exe on Windows.)
     * This allows using e.g. pipes or conditional execution. In this mode, signals are sent to the
     * shell wrapper and not to your commands.
     *
     * In order to inject dynamic values into command-lines, we strongly recommend using placeholders.
     * This will save escaping values, which is not portable nor secure anyway:
     *
     *   $process = Process::fromShellCommandline('my_command "${:MY_VAR}"');
     *   $process->run(null, ['MY_VAR' => $theValue]);
     *
     * @param string         $command The command line to pass to the shell of the OS
     * @param string|null    $cwd     The working directory or null to use the working dir of the current PHP process
     * @param array|null     $env     The environment variables or null to use the same environment as the current PHP process
     * @param mixed          $input   The input as stream resource, scalar or \Traversable, or null for no input
     * @param int|float|null $timeout The timeout in seconds or null to disable
     *
     * @return static
     *
     * @throws LogicException When proc_open is not installed
     */
    public static function fromShellCommandline(string $command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60)
    {
        $process = new static([], $cwd, $env, $input, $timeout);
        $process->commandline = $command;
        return $process;
    }
    /**
     * @return array
     */
    public function __sleep()
    {
        throw new \BadMethodCallException('Cannot serialize ' . __CLASS__);
    }
    public function __wakeup()
    {
        throw new \BadMethodCallException('Cannot unserialize ' . __CLASS__);
    }
    public function __destruct()
    {
        if ($this->options['create_new_console'] ?? \false) {
            $this->processPipes->close();
        } else {
            $this->stop(0);
        }
    }
    public function __clone()
    {
        $this->resetProcessData();
    }
    /**
     * Runs the process.
     *
     * The callback receives the type of output (out or err) and
     * some bytes from the output in real-time. It allows to have feedback
     * from the independent process during execution.
     *
     * The STDOUT and STDERR are also available after the process is finished
     * via the getOutput() and getErrorOutput() methods.
     *
     * @param callable|null $callback A PHP callback to run whenever there is some
     *                                output available on STDOUT or STDERR
     *
     * @return int The exit status code
     *
     * @throws RuntimeException         When process can't be launched
     * @throws RuntimeException         When process is already running
     * @throws ProcessTimedOutException When process timed out
     * @throws ProcessSignaledException When process stopped after receiving signal
     * @throws LogicException           In case a callback is provided and output has been disabled
     *
     * @final
     */
    public function run(callable $callback = null, array $env = []) : int
    {
        $this->start($callback, $env);
        return $this->wait();
    }
    /**
     * Runs the process.
     *
     * This is identical to run() except that an exception is thrown if the process
     * exits with a non-zero exit code.
     *
     * @return $this
     *
     * @throws ProcessFailedException if the process didn't terminate successfully
     *
     * @final
     */
    public function mustRun(callable $callback = null, array $env = []) : self
    {
        if (0 !== $this->run($callback, $env)) {
            throw new ProcessFailedException($this);
        }
        return $this;
    }
    /**
     * Starts the process and returns after writing the input to STDIN.
     *
     * This method blocks until all STDIN data is sent to the process then it
     * returns while the process runs in the background.
     *
     * The termination of the process can be awaited with wait().
     *
     * The callback receives the type of output (out or err) and some bytes from
     * the output in real-time while writing the standard input to the process.
     * It allows to have feedback from the independent process during execution.
     *
     * @param callable|null $callback A PHP callback to run whenever there is some
     *                                output available on STDOUT or STDERR
     *
     * @throws RuntimeException When process can't be launched
     * @throws RuntimeException When process is already running
     * @throws LogicException   In case a callback is provided and output has been disabled
     */
    public function start(callable $callback = null, array $env = [])
    {
        if ($this->isRunning()) {
            throw new RuntimeException('Process is already running.');
        }
        $this->resetProcessData();
        $this->starttime = $this->lastOutputTime = \microtime(\true);
        $this->callback = $this->buildCallback($callback);
        $this->hasCallback = null !== $callback;
        $descriptors = $this->getDescriptors();
        if ($this->env) {
            $env += '\\' === \DIRECTORY_SEPARATOR ? \array_diff_ukey($this->env, $env, 'strcasecmp') : $this->env;
        }
        $env += '\\' === \DIRECTORY_SEPARATOR ? \array_diff_ukey($this->getDefaultEnv(), $env, 'strcasecmp') : $this->getDefaultEnv();
        if (\is_array($commandline = $this->commandline)) {
            $commandline = \implode(' ', \array_map([$this, 'escapeArgument'], $commandline));
            if ('\\' !== \DIRECTORY_SEPARATOR) {
                // exec is mandatory to deal with sending a signal to the process
                $commandline = 'exec ' . $commandline;
            }
        } else {
            $commandline = $this->replacePlaceholders($commandline, $env);
        }
        if ('\\' === \DIRECTORY_SEPARATOR) {
            $commandline = $this->prepareWindowsCommandLine($commandline, $env);
        } elseif (!$this->useFileHandles && $this->isSigchildEnabled()) {
            // last exit code is output on the fourth pipe and caught to work around --enable-sigchild
            $descriptors[3] = ['pipe', 'w'];
            // See https://unix.stackexchange.com/questions/71205/background-process-pipe-input
            $commandline = '{ (' . $commandline . ') <&3 3<&- 3>/dev/null & } 3<&0;';
            $commandline .= 'pid=$!; echo $pid >&3; wait $pid; code=$?; echo $code >&3; exit $code';
            // Workaround for the bug, when PTS functionality is enabled.
            // @see : https://bugs.php.net/69442
            $ptsWorkaround = \fopen(__FILE__, 'r');
        }
        $envPairs = [];
        foreach ($env as $k => $v) {
            if (\false !== $v && \false === \in_array($k, ['argc', 'argv', 'ARGC', 'ARGV'], \true)) {
                $envPairs[] = $k . '=' . $v;
            }
        }
        if (!\is_dir($this->cwd)) {
            throw new RuntimeException(\sprintf('The provided cwd "%s" does not exist.', $this->cwd));
        }
        $this->process = @\proc_open($commandline, $descriptors, $this->processPipes->pipes, $this->cwd, $envPairs, $this->options);
        if (!\is_resource($this->process)) {
            throw new RuntimeException('Unable to launch a new process.');
        }
        $this->status = self::STATUS_STARTED;
        if (isset($descriptors[3])) {
            $this->fallbackStatus['pid'] = (int) \fgets($this->processPipes->pipes[3]);
        }
        if ($this->tty) {
            return;
        }
        $this->updateStatus(\false);
        $this->checkTimeout();
    }
    /**
     * Restarts the process.
     *
     * Be warned that the process is cloned before being started.
     *
     * @param callable|null $callback A PHP callback to run whenever there is some
     *                                output available on STDOUT or STDERR
     *
     * @return static
     *
     * @throws RuntimeException When process can't be launched
     * @throws RuntimeException When process is already running
     *
     * @see start()
     *
     * @final
     */
    public function restart(callable $callback = null, array $env = []) : self
    {
        if ($this->isRunning()) {
            throw new RuntimeException('Process is already running.');
        }
        $process = clone $this;
        $process->start($callback, $env);
        return $process;
    }
    /**
     * Waits for the process to terminate.
     *
     * The callback receives the type of output (out or err) and some bytes
     * from the output in real-time while writing the standard input to the process.
     * It allows to have feedback from the independent process during execution.
     *
     * @param callable|null $callback A valid PHP callback
     *
     * @return int The exitcode of the process
     *
     * @throws ProcessTimedOutException When process timed out
     * @throws ProcessSignaledException When process stopped after receiving signal
     * @throws LogicException           When process is not yet started
     */
    public function wait(callable $callback = null)
    {
        $this->requireProcessIsStarted(__FUNCTION__);
        $this->updateStatus(\false);
        if (null !== $callback) {
            if (!$this->processPipes->haveReadSupport()) {
                $this->stop(0);
                throw new LogicException('Pass the callback to the "Process::start" method or call enableOutput to use a callback with "Process::wait".');
            }
            $this->callback = $this->buildCallback($callback);
        }
        do {
            $this->checkTimeout();
            $running = '\\' === \DIRECTORY_SEPARATOR ? $this->isRunning() : $this->processPipes->areOpen();
            $this->readPipes($running, '\\' !== \DIRECTORY_SEPARATOR || !$running);
        } while ($running);
        while ($this->isRunning()) {
            $this->checkTimeout();
            \usleep(1000);
        }
        if ($this->processInformation['signaled'] && $this->processInformation['termsig'] !== $this->latestSignal) {
            throw new ProcessSignaledException($this);
        }
        return $this->exitcode;
    }
    /**
     * Waits until the callback returns true.
     *
     * The callback receives the type of output (out or err) and some bytes
     * from the output in real-time while writing the standard input to the process.
     * It allows to have feedback from the independent process during execution.
     *
     * @throws RuntimeException         When process timed out
     * @throws LogicException           When process is not yet started
     * @throws ProcessTimedOutException In case the timeout was reached
     */
    public function waitUntil(callable $callback) : bool
    {
        $this->requireProcessIsStarted(__FUNCTION__);
        $this->updateStatus(\false);
        if (!$this->processPipes->haveReadSupport()) {
            $this->stop(0);
            throw new LogicException('Pass the callback to the "Process::start" method or call enableOutput to use a callback with "Process::waitUntil".');
        }
        $callback = $this->buildCallback($callback);
        $ready = \false;
        while (\true) {
            $this->checkTimeout();
            $running = '\\' === \DIRECTORY_SEPARATOR ? $this->isRunning() : $this->processPipes->areOpen();
            $output = $this->processPipes->readAndWrite($running, '\\' !== \DIRECTORY_SEPARATOR || !$running);
            foreach ($output as $type => $data) {
                if (3 !== $type) {
                    $ready = $callback(self::STDOUT === $type ? self::OUT : self::ERR, $data) || $ready;
                } elseif (!isset($this->fallbackStatus['signaled'])) {
                    $this->fallbackStatus['exitcode'] = (int) $data;
                }
            }
            if ($ready) {
                return \true;
            }
            if (!$running) {
                return \false;
            }
            \usleep(1000);
        }
    }
    /**
     * Returns the Pid (process identifier), if applicable.
     *
     * @return int|null The process id if running, null otherwise
     */
    public function getPid()
    {
        return $this->isRunning() ? $this->processInformation['pid'] : null;
    }
    /**
     * Sends a POSIX signal to the process.
     *
     * @param int $signal A valid POSIX signal (see https://php.net/pcntl.constants)
     *
     * @return $this
     *
     * @throws LogicException   In case the process is not running
     * @throws RuntimeException In case --enable-sigchild is activated and the process can't be killed
     * @throws RuntimeException In case of failure
     */
    public function signal(int $signal)
    {
        $this->doSignal($signal, \true);
        return $this;
    }
    /**
     * Disables fetching output and error output from the underlying process.
     *
     * @return $this
     *
     * @throws RuntimeException In case the process is already running
     * @throws LogicException   if an idle timeout is set
     */
    public function disableOutput()
    {
        if ($this->isRunning()) {
            throw new RuntimeException('Disabling output while the process is running is not possible.');
        }
        if (null !== $this->idleTimeout) {
            throw new LogicException('Output cannot be disabled while an idle timeout is set.');
        }
        $this->outputDisabled = \true;
        return $this;
    }
    /**
     * Enables fetching output and error output from the underlying process.
     *
     * @return $this
     *
     * @throws RuntimeException In case the process is already running
     */
    public function enableOutput()
    {
        if ($this->isRunning()) {
            throw new RuntimeException('Enabling output while the process is running is not possible.');
        }
        $this->outputDisabled = \false;
        return $this;
    }
    /**
     * Returns true in case the output is disabled, false otherwise.
     *
     * @return bool
     */
    public function isOutputDisabled()
    {
        return $this->outputDisabled;
    }
    /**
     * Returns the current output of the process (STDOUT).
     *
     * @return string
     *
     * @throws LogicException in case the output has been disabled
     * @throws LogicException In case the process is not started
     */
    public function getOutput()
    {
        $this->readPipesForOutput(__FUNCTION__);
        if (\false === ($ret = \stream_get_contents($this->stdout, -1, 0))) {
            return '';
        }
        return $ret;
    }
    /**
     * Returns the output incrementally.
     *
     * In comparison with the getOutput method which always return the whole
     * output, this one returns the new output since the last call.
     *
     * @return string
     *
     * @throws LogicException in case the output has been disabled
     * @throws LogicException In case the process is not started
     */
    public function getIncrementalOutput()
    {
        $this->readPipesForOutput(__FUNCTION__);
        $latest = \stream_get_contents($this->stdout, -1, $this->incrementalOutputOffset);
        $this->incrementalOutputOffset = \ftell($this->stdout);
        if (\false === $latest) {
            return '';
        }
        return $latest;
    }
    /**
     * Returns an iterator to the output of the process, with the output type as keys (Process::OUT/ERR).
     *
     * @param int $flags A bit field of Process::ITER_* flags
     *
     * @return \Generator<string, string>
     *
     * @throws LogicException in case the output has been disabled
     * @throws LogicException In case the process is not started
     */
    #[\ReturnTypeWillChange]
    public function getIterator(int $flags = 0)
    {
        $this->readPipesForOutput(__FUNCTION__, \false);
        $clearOutput = !(self::ITER_KEEP_OUTPUT & $flags);
        $blocking = !(self::ITER_NON_BLOCKING & $flags);
        $yieldOut = !(self::ITER_SKIP_OUT & $flags);
        $yieldErr = !(self::ITER_SKIP_ERR & $flags);
        while (null !== $this->callback || $yieldOut && !\feof($this->stdout) || $yieldErr && !\feof($this->stderr)) {
            if ($yieldOut) {
                $out = \stream_get_contents($this->stdout, -1, $this->incrementalOutputOffset);
                if (isset($out[0])) {
                    if ($clearOutput) {
                        $this->clearOutput();
                    } else {
                        $this->incrementalOutputOffset = \ftell($this->stdout);
                    }
                    (yield self::OUT => $out);
                }
            }
            if ($yieldErr) {
                $err = \stream_get_contents($this->stderr, -1, $this->incrementalErrorOutputOffset);
                if (isset($err[0])) {
                    if ($clearOutput) {
                        $this->clearErrorOutput();
                    } else {
                        $this->incrementalErrorOutputOffset = \ftell($this->stderr);
                    }
                    (yield self::ERR => $err);
                }
            }
            if (!$blocking && !isset($out[0]) && !isset($err[0])) {
                (yield self::OUT => '');
            }
            $this->checkTimeout();
            $this->readPipesForOutput(__FUNCTION__, $blocking);
        }
    }
    /**
     * Clears the process output.
     *
     * @return $this
     */
    public function clearOutput()
    {
        \ftruncate($this->stdout, 0);
        \fseek($this->stdout, 0);
        $this->incrementalOutputOffset = 0;
        return $this;
    }
    /**
     * Returns the current error output of the process (STDERR).
     *
     * @return string
     *
     * @throws LogicException in case the output has been disabled
     * @throws LogicException In case the process is not started
     */
    public function getErrorOutput()
    {
        $this->readPipesForOutput(__FUNCTION__);
        if (\false === ($ret = \stream_get_contents($this->stderr, -1, 0))) {
            return '';
        }
        return $ret;
    }
    /**
     * Returns the errorOutput incrementally.
     *
     * In comparison with the getErrorOutput method which always return the
     * whole error output, this one returns the new error output since the last
     * call.
     *
     * @return string
     *
     * @throws LogicException in case the output has been disabled
     * @throws LogicException In case the process is not started
     */
    public function getIncrementalErrorOutput()
    {
        $this->readPipesForOutput(__FUNCTION__);
        $latest = \stream_get_contents($this->stderr, -1, $this->incrementalErrorOutputOffset);
        $this->incrementalErrorOutputOffset = \ftell($this->stderr);
        if (\false === $latest) {
            return '';
        }
        return $latest;
    }
    /**
     * Clears the process output.
     *
     * @return $this
     */
    public function clearErrorOutput()
    {
        \ftruncate($this->stderr, 0);
        \fseek($this->stderr, 0);
        $this->incrementalErrorOutputOffset = 0;
        return $this;
    }
    /**
     * Returns the exit code returned by the process.
     *
     * @return int|null The exit status code, null if the Process is not terminated
     */
    public function getExitCode()
    {
        $this->updateStatus(\false);
        return $this->exitcode;
    }
    /**
     * Returns a string representation for the exit code returned by the process.
     *
     * This method relies on the Unix exit code status standardization
     * and might not be relevant for other operating systems.
     *
     * @return string|null A string representation for the exit status code, null if the Process is not terminated
     *
     * @see http://tldp.org/LDP/abs/html/exitcodes.html
     * @see http://en.wikipedia.org/wiki/Unix_signal
     */
    public function getExitCodeText()
    {
        if (null === ($exitcode = $this->getExitCode())) {
            return null;
        }
        return self::$exitCodes[$exitcode] ?? 'Unknown error';
    }
    /**
     * Checks if the process ended successfully.
     *
     * @return bool
     */
    public function isSuccessful()
    {
        return 0 === $this->getExitCode();
    }
    /**
     * Returns true if the child process has been terminated by an uncaught signal.
     *
     * It always returns false on Windows.
     *
     * @return bool
     *
     * @throws LogicException In case the process is not terminated
     */
    public function hasBeenSignaled()
    {
        $this->requireProcessIsTerminated(__FUNCTION__);
        return $this->processInformation['signaled'];
    }
    /**
     * Returns the number of the signal that caused the child process to terminate its execution.
     *
     * It is only meaningful if hasBeenSignaled() returns true.
     *
     * @return int
     *
     * @throws RuntimeException In case --enable-sigchild is activated
     * @throws LogicException   In case the process is not terminated
     */
    public function getTermSignal()
    {
        $this->requireProcessIsTerminated(__FUNCTION__);
        if ($this->isSigchildEnabled() && -1 === $this->processInformation['termsig']) {
            throw new RuntimeException('This PHP has been compiled with --enable-sigchild. Term signal cannot be retrieved.');
        }
        return $this->processInformation['termsig'];
    }
    /**
     * Returns true if the child process has been stopped by a signal.
     *
     * It always returns false on Windows.
     *
     * @return bool
     *
     * @throws LogicException In case the process is not terminated
     */
    public function hasBeenStopped()
    {
        $this->requireProcessIsTerminated(__FUNCTION__);
        return $this->processInformation['stopped'];
    }
    /**
     * Returns the number of the signal that caused the child process to stop its execution.
     *
     * It is only meaningful if hasBeenStopped() returns true.
     *
     * @return int
     *
     * @throws LogicException In case the process is not terminated
     */
    public function getStopSignal()
    {
        $this->requireProcessIsTerminated(__FUNCTION__);
        return $this->processInformation['stopsig'];
    }
    /**
     * Checks if the process is currently running.
     *
     * @return bool
     */
    public function isRunning()
    {
        if (self::STATUS_STARTED !== $this->status) {
            return \false;
        }
        $this->updateStatus(\false);
        return $this->processInformation['running'];
    }
    /**
     * Checks if the process has been started with no regard to the current state.
     *
     * @return bool
     */
    public function isStarted()
    {
        return self::STATUS_READY != $this->status;
    }
    /**
     * Checks if the process is terminated.
     *
     * @return bool
     */
    public function isTerminated()
    {
        $this->updateStatus(\false);
        return self::STATUS_TERMINATED == $this->status;
    }
    /**
     * Gets the process status.
     *
     * The status is one of: ready, started, terminated.
     *
     * @return string
     */
    public function getStatus()
    {
        $this->updateStatus(\false);
        return $this->status;
    }
    /**
     * Stops the process.
     *
     * @param int|float $timeout The timeout in seconds
     * @param int|null  $signal  A POSIX signal to send in case the process has not stop at timeout, default is SIGKILL (9)
     *
     * @return int|null The exit-code of the process or null if it's not running
     */
    public function stop(float $timeout = 10, int $signal = null)
    {
        $timeoutMicro = \microtime(\true) + $timeout;
        if ($this->isRunning()) {
            // given SIGTERM may not be defined and that "proc_terminate" uses the constant value and not the constant itself, we use the same here
            $this->doSignal(15, \false);
            do {
                \usleep(1000);
            } while ($this->isRunning() && \microtime(\true) < $timeoutMicro);
            if ($this->isRunning()) {
                // Avoid exception here: process is supposed to be running, but it might have stopped just
                // after this line. In any case, let's silently discard the error, we cannot do anything.
                $this->doSignal($signal ?: 9, \false);
            }
        }
        if ($this->isRunning()) {
            if (isset($this->fallbackStatus['pid'])) {
                unset($this->fallbackStatus['pid']);
                return $this->stop(0, $signal);
            }
            $this->close();
        }
        return $this->exitcode;
    }
    /**
     * Adds a line to the STDOUT stream.
     *
     * @internal
     */
    public function addOutput(string $line)
    {
        $this->lastOutputTime = \microtime(\true);
        \fseek($this->stdout, 0, \SEEK_END);
        \fwrite($this->stdout, $line);
        \fseek($this->stdout, $this->incrementalOutputOffset);
    }
    /**
     * Adds a line to the STDERR stream.
     *
     * @internal
     */
    public function addErrorOutput(string $line)
    {
        $this->lastOutputTime = \microtime(\true);
        \fseek($this->stderr, 0, \SEEK_END);
        \fwrite($this->stderr, $line);
        \fseek($this->stderr, $this->incrementalErrorOutputOffset);
    }
    /**
     * Gets the last output time in seconds.
     */
    public function getLastOutputTime() : ?float
    {
        return $this->lastOutputTime;
    }
    /**
     * Gets the command line to be executed.
     *
     * @return string
     */
    public function getCommandLine()
    {
        return \is_array($this->commandline) ? \implode(' ', \array_map([$this, 'escapeArgument'], $this->commandline)) : $this->commandline;
    }
    /**
     * Gets the process timeout in seconds (max. runtime).
     *
     * @return float|null
     */
    public function getTimeout()
    {
        return $this->timeout;
    }
    /**
     * Gets the process idle timeout in seconds (max. time since last output).
     *
     * @return float|null
     */
    public function getIdleTimeout()
    {
        return $this->idleTimeout;
    }
    /**
     * Sets the process timeout (max. runtime) in seconds.
     *
     * To disable the timeout, set this value to null.
     *
     * @return $this
     *
     * @throws InvalidArgumentException if the timeout is negative
     */
    public function setTimeout(?float $timeout)
    {
        $this->timeout = $this->validateTimeout($timeout);
        return $this;
    }
    /**
     * Sets the process idle timeout (max. time since last output) in seconds.
     *
     * To disable the timeout, set this value to null.
     *
     * @return $this
     *
     * @throws LogicException           if the output is disabled
     * @throws InvalidArgumentException if the timeout is negative
     */
    public function setIdleTimeout(?float $timeout)
    {
        if (null !== $timeout && $this->outputDisabled) {
            throw new LogicException('Idle timeout cannot be set while the output is disabled.');
        }
        $this->idleTimeout = $this->validateTimeout($timeout);
        return $this;
    }
    /**
     * Enables or disables the TTY mode.
     *
     * @return $this
     *
     * @throws RuntimeException In case the TTY mode is not supported
     */
    public function setTty(bool $tty)
    {
        if ('\\' === \DIRECTORY_SEPARATOR && $tty) {
            throw new RuntimeException('TTY mode is not supported on Windows platform.');
        }
        if ($tty && !self::isTtySupported()) {
            throw new RuntimeException('TTY mode requires /dev/tty to be read/writable.');
        }
        $this->tty = $tty;
        return $this;
    }
    /**
     * Checks if the TTY mode is enabled.
     *
     * @return bool
     */
    public function isTty()
    {
        return $this->tty;
    }
    /**
     * Sets PTY mode.
     *
     * @return $this
     */
    public function setPty(bool $bool)
    {
        $this->pty = $bool;
        return $this;
    }
    /**
     * Returns PTY state.
     *
     * @return bool
     */
    public function isPty()
    {
        return $this->pty;
    }
    /**
     * Gets the working directory.
     *
     * @return string|null
     */
    public function getWorkingDirectory()
    {
        if (null === $this->cwd) {
            // getcwd() will return false if any one of the parent directories does not have
            // the readable or search mode set, even if the current directory does
            return \getcwd() ?: null;
        }
        return $this->cwd;
    }
    /**
     * Sets the current working directory.
     *
     * @return $this
     */
    public function setWorkingDirectory(string $cwd)
    {
        $this->cwd = $cwd;
        return $this;
    }
    /**
     * Gets the environment variables.
     *
     * @return array
     */
    public function getEnv()
    {
        return $this->env;
    }
    /**
     * Sets the environment variables.
     *
     * @param array<string|\Stringable> $env The new environment variables
     *
     * @return $this
     */
    public function setEnv(array $env)
    {
        $this->env = $env;
        return $this;
    }
    /**
     * Gets the Process input.
     *
     * @return resource|string|\Iterator|null
     */
    public function getInput()
    {
        return $this->input;
    }
    /**
     * Sets the input.
     *
     * This content will be passed to the underlying process standard input.
     *
     * @param string|int|float|bool|resource|\Traversable|null $input The content
     *
     * @return $this
     *
     * @throws LogicException In case the process is running
     */
    public function setInput($input)
    {
        if ($this->isRunning()) {
            throw new LogicException('Input cannot be set while the process is running.');
        }
        $this->input = ProcessUtils::validateInput(__METHOD__, $input);
        return $this;
    }
    /**
     * Performs a check between the timeout definition and the time the process started.
     *
     * In case you run a background process (with the start method), you should
     * trigger this method regularly to ensure the process timeout
     *
     * @throws ProcessTimedOutException In case the timeout was reached
     */
    public function checkTimeout()
    {
        if (self::STATUS_STARTED !== $this->status) {
            return;
        }
        if (null !== $this->timeout && $this->timeout < \microtime(\true) - $this->starttime) {
            $this->stop(0);
            throw new ProcessTimedOutException($this, ProcessTimedOutException::TYPE_GENERAL);
        }
        if (null !== $this->idleTimeout && $this->idleTimeout < \microtime(\true) - $this->lastOutputTime) {
            $this->stop(0);
            throw new ProcessTimedOutException($this, ProcessTimedOutException::TYPE_IDLE);
        }
    }
    /**
     * @throws LogicException in case process is not started
     */
    public function getStartTime() : float
    {
        if (!$this->isStarted()) {
            throw new LogicException('Start time is only available after process start.');
        }
        return $this->starttime;
    }
    /**
     * Defines options to pass to the underlying proc_open().
     *
     * @see https://php.net/proc_open for the options supported by PHP.
     *
     * Enabling the "create_new_console" option allows a subprocess to continue
     * to run after the main process exited, on both Windows and *nix
     */
    public function setOptions(array $options)
    {
        if ($this->isRunning()) {
            throw new RuntimeException('Setting options while the process is running is not possible.');
        }
        $defaultOptions = $this->options;
        $existingOptions = ['blocking_pipes', 'create_process_group', 'create_new_console'];
        foreach ($options as $key => $value) {
            if (!\in_array($key, $existingOptions)) {
                $this->options = $defaultOptions;
                throw new LogicException(\sprintf('Invalid option "%s" passed to "%s()". Supported options are "%s".', $key, __METHOD__, \implode('", "', $existingOptions)));
            }
            $this->options[$key] = $value;
        }
    }
    /**
     * Returns whether TTY is supported on the current operating system.
     */
    public static function isTtySupported() : bool
    {
        static $isTtySupported;
        if (null === $isTtySupported) {
            $isTtySupported = (bool) @\proc_open('echo 1 >/dev/null', [['file', '/dev/tty', 'r'], ['file', '/dev/tty', 'w'], ['file', '/dev/tty', 'w']], $pipes);
        }
        return $isTtySupported;
    }
    /**
     * Returns whether PTY is supported on the current operating system.
     *
     * @return bool
     */
    public static function isPtySupported()
    {
        static $result;
        if (null !== $result) {
            return $result;
        }
        if ('\\' === \DIRECTORY_SEPARATOR) {
            return $result = \false;
        }
        return $result = (bool) @\proc_open('echo 1 >/dev/null', [['pty'], ['pty'], ['pty']], $pipes);
    }
    /**
     * Creates the descriptors needed by the proc_open.
     */
    private function getDescriptors() : array
    {
        if ($this->input instanceof \Iterator) {
            $this->input->rewind();
        }
        if ('\\' === \DIRECTORY_SEPARATOR) {
            $this->processPipes = new WindowsPipes($this->input, !$this->outputDisabled || $this->hasCallback);
        } else {
            $this->processPipes = new UnixPipes($this->isTty(), $this->isPty(), $this->input, !$this->outputDisabled || $this->hasCallback);
        }
        return $this->processPipes->getDescriptors();
    }
    /**
     * Builds up the callback used by wait().
     *
     * The callbacks adds all occurred output to the specific buffer and calls
     * the user callback (if present) with the received output.
     *
     * @param callable|null $callback The user defined PHP callback
     *
     * @return \Closure
     */
    protected function buildCallback(callable $callback = null)
    {
        if ($this->outputDisabled) {
            return function ($type, $data) use($callback) : bool {
                return null !== $callback && $callback($type, $data);
            };
        }
        $out = self::OUT;
        return function ($type, $data) use($callback, $out) : bool {
            if ($out == $type) {
                $this->addOutput($data);
            } else {
                $this->addErrorOutput($data);
            }
            return null !== $callback && $callback($type, $data);
        };
    }
    /**
     * Updates the status of the process, reads pipes.
     *
     * @param bool $blocking Whether to use a blocking read call
     */
    protected function updateStatus(bool $blocking)
    {
        if (self::STATUS_STARTED !== $this->status) {
            return;
        }
        $this->processInformation = \proc_get_status($this->process);
        $running = $this->processInformation['running'];
        $this->readPipes($running && $blocking, '\\' !== \DIRECTORY_SEPARATOR || !$running);
        if ($this->fallbackStatus && $this->isSigchildEnabled()) {
            $this->processInformation = $this->fallbackStatus + $this->processInformation;
        }
        if (!$running) {
            $this->close();
        }
    }
    /**
     * Returns whether PHP has been compiled with the '--enable-sigchild' option or not.
     *
     * @return bool
     */
    protected function isSigchildEnabled()
    {
        if (null !== self::$sigchild) {
            return self::$sigchild;
        }
        if (!\function_exists('phpinfo')) {
            return self::$sigchild = \false;
        }
        \ob_start();
        \phpinfo(\INFO_GENERAL);
        return self::$sigchild = \str_contains(\ob_get_clean(), '--enable-sigchild');
    }
    /**
     * Reads pipes for the freshest output.
     *
     * @param string $caller   The name of the method that needs fresh outputs
     * @param bool   $blocking Whether to use blocking calls or not
     *
     * @throws LogicException in case output has been disabled or process is not started
     */
    private function readPipesForOutput(string $caller, bool $blocking = \false)
    {
        if ($this->outputDisabled) {
            throw new LogicException('Output has been disabled.');
        }
        $this->requireProcessIsStarted($caller);
        $this->updateStatus($blocking);
    }
    /**
     * Validates and returns the filtered timeout.
     *
     * @throws InvalidArgumentException if the given timeout is a negative number
     */
    private function validateTimeout(?float $timeout) : ?float
    {
        $timeout = (float) $timeout;
        if (0.0 === $timeout) {
            $timeout = null;
        } elseif ($timeout < 0) {
            throw new InvalidArgumentException('The timeout value must be a valid positive integer or float number.');
        }
        return $timeout;
    }
    /**
     * Reads pipes, executes callback.
     *
     * @param bool $blocking Whether to use blocking calls or not
     * @param bool $close    Whether to close file handles or not
     */
    private function readPipes(bool $blocking, bool $close)
    {
        $result = $this->processPipes->readAndWrite($blocking, $close);
        $callback = $this->callback;
        foreach ($result as $type => $data) {
            if (3 !== $type) {
                $callback(self::STDOUT === $type ? self::OUT : self::ERR, $data);
            } elseif (!isset($this->fallbackStatus['signaled'])) {
                $this->fallbackStatus['exitcode'] = (int) $data;
            }
        }
    }
    /**
     * Closes process resource, closes file handles, sets the exitcode.
     *
     * @return int The exitcode
     */
    private function close() : int
    {
        $this->processPipes->close();
        if (\is_resource($this->process)) {
            \proc_close($this->process);
        }
        $this->exitcode = $this->processInformation['exitcode'];
        $this->status = self::STATUS_TERMINATED;
        if (-1 === $this->exitcode) {
            if ($this->processInformation['signaled'] && 0 < $this->processInformation['termsig']) {
                // if process has been signaled, no exitcode but a valid termsig, apply Unix convention
                $this->exitcode = 128 + $this->processInformation['termsig'];
            } elseif ($this->isSigchildEnabled()) {
                $this->processInformation['signaled'] = \true;
                $this->processInformation['termsig'] = -1;
            }
        }
        // Free memory from self-reference callback created by buildCallback
        // Doing so in other contexts like __destruct or by garbage collector is ineffective
        // Now pipes are closed, so the callback is no longer necessary
        $this->callback = null;
        return $this->exitcode;
    }
    /**
     * Resets data related to the latest run of the process.
     */
    private function resetProcessData()
    {
        $this->starttime = null;
        $this->callback = null;
        $this->exitcode = null;
        $this->fallbackStatus = [];
        $this->processInformation = null;
        $this->stdout = \fopen('php://temp/maxmemory:' . 1024 * 1024, 'w+');
        $this->stderr = \fopen('php://temp/maxmemory:' . 1024 * 1024, 'w+');
        $this->process = null;
        $this->latestSignal = null;
        $this->status = self::STATUS_READY;
        $this->incrementalOutputOffset = 0;
        $this->incrementalErrorOutputOffset = 0;
    }
    /**
     * Sends a POSIX signal to the process.
     *
     * @param int  $signal         A valid POSIX signal (see https://php.net/pcntl.constants)
     * @param bool $throwException Whether to throw exception in case signal failed
     *
     * @throws LogicException   In case the process is not running
     * @throws RuntimeException In case --enable-sigchild is activated and the process can't be killed
     * @throws RuntimeException In case of failure
     */
    private function doSignal(int $signal, bool $throwException) : bool
    {
        if (null === ($pid = $this->getPid())) {
            if ($throwException) {
                throw new LogicException('Cannot send signal on a non running process.');
            }
            return \false;
        }
        if ('\\' === \DIRECTORY_SEPARATOR) {
            \exec(\sprintf('taskkill /F /T /PID %d 2>&1', $pid), $output, $exitCode);
            if ($exitCode && $this->isRunning()) {
                if ($throwException) {
                    throw new RuntimeException(\sprintf('Unable to kill the process (%s).', \implode(' ', $output)));
                }
                return \false;
            }
        } else {
            if (!$this->isSigchildEnabled()) {
                $ok = @\proc_terminate($this->process, $signal);
            } elseif (\function_exists('posix_kill')) {
                $ok = @\posix_kill($pid, $signal);
            } elseif ($ok = \proc_open(\sprintf('kill -%d %d', $signal, $pid), [2 => ['pipe', 'w']], $pipes)) {
                $ok = \false === \fgets($pipes[2]);
            }
            if (!$ok) {
                if ($throwException) {
                    throw new RuntimeException(\sprintf('Error while sending signal "%s".', $signal));
                }
                return \false;
            }
        }
        $this->latestSignal = $signal;
        $this->fallbackStatus['signaled'] = \true;
        $this->fallbackStatus['exitcode'] = -1;
        $this->fallbackStatus['termsig'] = $this->latestSignal;
        return \true;
    }
    private function prepareWindowsCommandLine(string $cmd, array &$env) : string
    {
        $uid = \uniqid('', \true);
        $varCount = 0;
        $varCache = [];
        $cmd = \preg_replace_callback('/"(?:(
                [^"%!^]*+
                (?:
                    (?: !LF! | "(?:\\^[%!^])?+" )
                    [^"%!^]*+
                )++
            ) | [^"]*+ )"/x', function ($m) use(&$env, &$varCache, &$varCount, $uid) {
            if (!isset($m[1])) {
                return $m[0];
            }
            if (isset($varCache[$m[0]])) {
                return $varCache[$m[0]];
            }
            if (\str_contains($value = $m[1], "\x00")) {
                $value = \str_replace("\x00", '?', $value);
            }
            if (\false === \strpbrk($value, "\"%!\n")) {
                return '"' . $value . '"';
            }
            $value = \str_replace(['!LF!', '"^!"', '"^%"', '"^^"', '""'], ["\n", '!', '%', '^', '"'], $value);
            $value = '"' . \preg_replace('/(\\\\*)"/', '$1$1\\"', $value) . '"';
            $var = $uid . ++$varCount;
            $env[$var] = $value;
            return $varCache[$m[0]] = '!' . $var . '!';
        }, $cmd);
        $cmd = 'cmd /V:ON /E:ON /D /C (' . \str_replace("\n", ' ', $cmd) . ')';
        foreach ($this->processPipes->getFiles() as $offset => $filename) {
            $cmd .= ' ' . $offset . '>"' . $filename . '"';
        }
        return $cmd;
    }
    /**
     * Ensures the process is running or terminated, throws a LogicException if the process has a not started.
     *
     * @throws LogicException if the process has not run
     */
    private function requireProcessIsStarted(string $functionName)
    {
        if (!$this->isStarted()) {
            throw new LogicException(\sprintf('Process must be started before calling "%s()".', $functionName));
        }
    }
    /**
     * Ensures the process is terminated, throws a LogicException if the process has a status different than "terminated".
     *
     * @throws LogicException if the process is not yet terminated
     */
    private function requireProcessIsTerminated(string $functionName)
    {
        if (!$this->isTerminated()) {
            throw new LogicException(\sprintf('Process must be terminated before calling "%s()".', $functionName));
        }
    }
    /**
     * Escapes a string to be used as a shell argument.
     */
    private function escapeArgument(?string $argument) : string
    {
        if ('' === $argument || null === $argument) {
            return '""';
        }
        if ('\\' !== \DIRECTORY_SEPARATOR) {
            return "'" . \str_replace("'", "'\\''", $argument) . "'";
        }
        if (\str_contains($argument, "\x00")) {
            $argument = \str_replace("\x00", '?', $argument);
        }
        if (!\preg_match('/[\\/()%!^"<>&|\\s]/', $argument)) {
            return $argument;
        }
        $argument = \preg_replace('/(\\\\+)$/', '$1$1', $argument);
        return '"' . \str_replace(['"', '^', '%', '!', "\n"], ['""', '"^^"', '"^%"', '"^!"', '!LF!'], $argument) . '"';
    }
    private function replacePlaceholders(string $commandline, array $env)
    {
        return \preg_replace_callback('/"\\$\\{:([_a-zA-Z]++[_a-zA-Z0-9]*+)\\}"/', function ($matches) use($commandline, $env) {
            if (!isset($env[$matches[1]]) || \false === $env[$matches[1]]) {
                throw new InvalidArgumentException(\sprintf('Command line is missing a value for parameter "%s": ', $matches[1]) . $commandline);
            }
            return $this->escapeArgument($env[$matches[1]]);
        }, $commandline);
    }
    private function getDefaultEnv() : array
    {
        $env = \getenv();
        $env = ('\\' === \DIRECTORY_SEPARATOR ? \array_intersect_ukey($env, $_SERVER, 'strcasecmp') : \array_intersect_key($env, $_SERVER)) ?: $env;
        return $_ENV + ('\\' === \DIRECTORY_SEPARATOR ? \array_diff_ukey($env, $_ENV, 'strcasecmp') : $env);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Process\Pipes;

use _PHPStan_dcc7b7cff\Symfony\Component\Process\Process;
/**
 * UnixPipes implementation uses unix pipes as handles.
 *
 * @author Romain Neutron <imprec@gmail.com>
 *
 * @internal
 */
class UnixPipes extends AbstractPipes
{
    private $ttyMode;
    private $ptyMode;
    private $haveReadSupport;
    public function __construct(?bool $ttyMode, bool $ptyMode, $input, bool $haveReadSupport)
    {
        $this->ttyMode = $ttyMode;
        $this->ptyMode = $ptyMode;
        $this->haveReadSupport = $haveReadSupport;
        parent::__construct($input);
    }
    public function __sleep() : array
    {
        throw new \BadMethodCallException('Cannot serialize ' . __CLASS__);
    }
    public function __wakeup()
    {
        throw new \BadMethodCallException('Cannot unserialize ' . __CLASS__);
    }
    public function __destruct()
    {
        $this->close();
    }
    /**
     * {@inheritdoc}
     */
    public function getDescriptors() : array
    {
        if (!$this->haveReadSupport) {
            $nullstream = \fopen('/dev/null', 'c');
            return [['pipe', 'r'], $nullstream, $nullstream];
        }
        if ($this->ttyMode) {
            return [['file', '/dev/tty', 'r'], ['file', '/dev/tty', 'w'], ['file', '/dev/tty', 'w']];
        }
        if ($this->ptyMode && Process::isPtySupported()) {
            return [['pty'], ['pty'], ['pty']];
        }
        return [
            ['pipe', 'r'],
            ['pipe', 'w'],
            // stdout
            ['pipe', 'w'],
        ];
    }
    /**
     * {@inheritdoc}
     */
    public function getFiles() : array
    {
        return [];
    }
    /**
     * {@inheritdoc}
     */
    public function readAndWrite(bool $blocking, bool $close = \false) : array
    {
        $this->unblock();
        $w = $this->write();
        $read = $e = [];
        $r = $this->pipes;
        unset($r[0]);
        // let's have a look if something changed in streams
        \set_error_handler([$this, 'handleError']);
        if (($r || $w) && \false === \stream_select($r, $w, $e, 0, $blocking ? Process::TIMEOUT_PRECISION * 1000000.0 : 0)) {
            \restore_error_handler();
            // if a system call has been interrupted, forget about it, let's try again
            // otherwise, an error occurred, let's reset pipes
            if (!$this->hasSystemCallBeenInterrupted()) {
                $this->pipes = [];
            }
            return $read;
        }
        \restore_error_handler();
        foreach ($r as $pipe) {
            // prior PHP 5.4 the array passed to stream_select is modified and
            // lose key association, we have to find back the key
            $read[$type = \array_search($pipe, $this->pipes, \true)] = '';
            do {
                $data = @\fread($pipe, self::CHUNK_SIZE);
                $read[$type] .= $data;
            } while (isset($data[0]) && ($close || isset($data[self::CHUNK_SIZE - 1])));
            if (!isset($read[$type][0])) {
                unset($read[$type]);
            }
            if ($close && \feof($pipe)) {
                \fclose($pipe);
                unset($this->pipes[$type]);
            }
        }
        return $read;
    }
    /**
     * {@inheritdoc}
     */
    public function haveReadSupport() : bool
    {
        return $this->haveReadSupport;
    }
    /**
     * {@inheritdoc}
     */
    public function areOpen() : bool
    {
        return (bool) $this->pipes;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Process\Pipes;

use _PHPStan_dcc7b7cff\Symfony\Component\Process\Exception\RuntimeException;
use _PHPStan_dcc7b7cff\Symfony\Component\Process\Process;
/**
 * WindowsPipes implementation uses temporary files as handles.
 *
 * @see https://bugs.php.net/51800
 * @see https://bugs.php.net/65650
 *
 * @author Romain Neutron <imprec@gmail.com>
 *
 * @internal
 */
class WindowsPipes extends AbstractPipes
{
    private $files = [];
    private $fileHandles = [];
    private $lockHandles = [];
    private $readBytes = [Process::STDOUT => 0, Process::STDERR => 0];
    private $haveReadSupport;
    public function __construct($input, bool $haveReadSupport)
    {
        $this->haveReadSupport = $haveReadSupport;
        if ($this->haveReadSupport) {
            // Fix for PHP bug #51800: reading from STDOUT pipe hangs forever on Windows if the output is too big.
            // Workaround for this problem is to use temporary files instead of pipes on Windows platform.
            //
            // @see https://bugs.php.net/51800
            $pipes = [Process::STDOUT => Process::OUT, Process::STDERR => Process::ERR];
            $tmpDir = \sys_get_temp_dir();
            $lastError = 'unknown reason';
            \set_error_handler(function ($type, $msg) use(&$lastError) {
                $lastError = $msg;
            });
            for ($i = 0;; ++$i) {
                foreach ($pipes as $pipe => $name) {
                    $file = \sprintf('%s\\sf_proc_%02X.%s', $tmpDir, $i, $name);
                    if (!($h = \fopen($file . '.lock', 'w'))) {
                        if (\file_exists($file . '.lock')) {
                            continue 2;
                        }
                        \restore_error_handler();
                        throw new RuntimeException('A temporary file could not be opened to write the process output: ' . $lastError);
                    }
                    if (!\flock($h, \LOCK_EX | \LOCK_NB)) {
                        continue 2;
                    }
                    if (isset($this->lockHandles[$pipe])) {
                        \flock($this->lockHandles[$pipe], \LOCK_UN);
                        \fclose($this->lockHandles[$pipe]);
                    }
                    $this->lockHandles[$pipe] = $h;
                    if (!($h = \fopen($file, 'w')) || !\fclose($h) || !($h = \fopen($file, 'r'))) {
                        \flock($this->lockHandles[$pipe], \LOCK_UN);
                        \fclose($this->lockHandles[$pipe]);
                        unset($this->lockHandles[$pipe]);
                        continue 2;
                    }
                    $this->fileHandles[$pipe] = $h;
                    $this->files[$pipe] = $file;
                }
                break;
            }
            \restore_error_handler();
        }
        parent::__construct($input);
    }
    public function __sleep() : array
    {
        throw new \BadMethodCallException('Cannot serialize ' . __CLASS__);
    }
    public function __wakeup()
    {
        throw new \BadMethodCallException('Cannot unserialize ' . __CLASS__);
    }
    public function __destruct()
    {
        $this->close();
    }
    /**
     * {@inheritdoc}
     */
    public function getDescriptors() : array
    {
        if (!$this->haveReadSupport) {
            $nullstream = \fopen('NUL', 'c');
            return [['pipe', 'r'], $nullstream, $nullstream];
        }
        // We're not using pipe on Windows platform as it hangs (https://bugs.php.net/51800)
        // We're not using file handles as it can produce corrupted output https://bugs.php.net/65650
        // So we redirect output within the commandline and pass the nul device to the process
        return [['pipe', 'r'], ['file', 'NUL', 'w'], ['file', 'NUL', 'w']];
    }
    /**
     * {@inheritdoc}
     */
    public function getFiles() : array
    {
        return $this->files;
    }
    /**
     * {@inheritdoc}
     */
    public function readAndWrite(bool $blocking, bool $close = \false) : array
    {
        $this->unblock();
        $w = $this->write();
        $read = $r = $e = [];
        if ($blocking) {
            if ($w) {
                @\stream_select($r, $w, $e, 0, Process::TIMEOUT_PRECISION * 1000000.0);
            } elseif ($this->fileHandles) {
                \usleep(Process::TIMEOUT_PRECISION * 1000000.0);
            }
        }
        foreach ($this->fileHandles as $type => $fileHandle) {
            $data = \stream_get_contents($fileHandle, -1, $this->readBytes[$type]);
            if (isset($data[0])) {
                $this->readBytes[$type] += \strlen($data);
                $read[$type] = $data;
            }
            if ($close) {
                \ftruncate($fileHandle, 0);
                \fclose($fileHandle);
                \flock($this->lockHandles[$type], \LOCK_UN);
                \fclose($this->lockHandles[$type]);
                unset($this->fileHandles[$type], $this->lockHandles[$type]);
            }
        }
        return $read;
    }
    /**
     * {@inheritdoc}
     */
    public function haveReadSupport() : bool
    {
        return $this->haveReadSupport;
    }
    /**
     * {@inheritdoc}
     */
    public function areOpen() : bool
    {
        return $this->pipes && $this->fileHandles;
    }
    /**
     * {@inheritdoc}
     */
    public function close()
    {
        parent::close();
        foreach ($this->fileHandles as $type => $handle) {
            \ftruncate($handle, 0);
            \fclose($handle);
            \flock($this->lockHandles[$type], \LOCK_UN);
            \fclose($this->lockHandles[$type]);
        }
        $this->fileHandles = $this->lockHandles = [];
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Process\Pipes;

use _PHPStan_dcc7b7cff\Symfony\Component\Process\Exception\InvalidArgumentException;
/**
 * @author Romain Neutron <imprec@gmail.com>
 *
 * @internal
 */
abstract class AbstractPipes implements PipesInterface
{
    public $pipes = [];
    private $inputBuffer = '';
    private $input;
    private $blocked = \true;
    private $lastError;
    /**
     * @param resource|string|int|float|bool|\Iterator|null $input
     */
    public function __construct($input)
    {
        if (\is_resource($input) || $input instanceof \Iterator) {
            $this->input = $input;
        } elseif (\is_string($input)) {
            $this->inputBuffer = $input;
        } else {
            $this->inputBuffer = (string) $input;
        }
    }
    /**
     * {@inheritdoc}
     */
    public function close()
    {
        foreach ($this->pipes as $pipe) {
            if (\is_resource($pipe)) {
                \fclose($pipe);
            }
        }
        $this->pipes = [];
    }
    /**
     * Returns true if a system call has been interrupted.
     */
    protected function hasSystemCallBeenInterrupted() : bool
    {
        $lastError = $this->lastError;
        $this->lastError = null;
        // stream_select returns false when the `select` system call is interrupted by an incoming signal
        return null !== $lastError && \false !== \stripos($lastError, 'interrupted system call');
    }
    /**
     * Unblocks streams.
     */
    protected function unblock()
    {
        if (!$this->blocked) {
            return;
        }
        foreach ($this->pipes as $pipe) {
            \stream_set_blocking($pipe, 0);
        }
        if (\is_resource($this->input)) {
            \stream_set_blocking($this->input, 0);
        }
        $this->blocked = \false;
    }
    /**
     * Writes input to stdin.
     *
     * @throws InvalidArgumentException When an input iterator yields a non supported value
     */
    protected function write() : ?array
    {
        if (!isset($this->pipes[0])) {
            return null;
        }
        $input = $this->input;
        if ($input instanceof \Iterator) {
            if (!$input->valid()) {
                $input = null;
            } elseif (\is_resource($input = $input->current())) {
                \stream_set_blocking($input, 0);
            } elseif (!isset($this->inputBuffer[0])) {
                if (!\is_string($input)) {
                    if (!\is_scalar($input)) {
                        throw new InvalidArgumentException(\sprintf('"%s" yielded a value of type "%s", but only scalars and stream resources are supported.', \get_debug_type($this->input), \get_debug_type($input)));
                    }
                    $input = (string) $input;
                }
                $this->inputBuffer = $input;
                $this->input->next();
                $input = null;
            } else {
                $input = null;
            }
        }
        $r = $e = [];
        $w = [$this->pipes[0]];
        // let's have a look if something changed in streams
        if (\false === @\stream_select($r, $w, $e, 0, 0)) {
            return null;
        }
        foreach ($w as $stdin) {
            if (isset($this->inputBuffer[0])) {
                $written = \fwrite($stdin, $this->inputBuffer);
                $this->inputBuffer = \substr($this->inputBuffer, $written);
                if (isset($this->inputBuffer[0])) {
                    return [$this->pipes[0]];
                }
            }
            if ($input) {
                while (\true) {
                    $data = \fread($input, self::CHUNK_SIZE);
                    if (!isset($data[0])) {
                        break;
                    }
                    $written = \fwrite($stdin, $data);
                    $data = \substr($data, $written);
                    if (isset($data[0])) {
                        $this->inputBuffer = $data;
                        return [$this->pipes[0]];
                    }
                }
                if (\feof($input)) {
                    if ($this->input instanceof \Iterator) {
                        $this->input->next();
                    } else {
                        $this->input = null;
                    }
                }
            }
        }
        // no input to read on resource, buffer is empty
        if (!isset($this->inputBuffer[0]) && !($this->input instanceof \Iterator ? $this->input->valid() : $this->input)) {
            $this->input = null;
            \fclose($this->pipes[0]);
            unset($this->pipes[0]);
        } elseif (!$w) {
            return [$this->pipes[0]];
        }
        return null;
    }
    /**
     * @internal
     */
    public function handleError(int $type, string $msg)
    {
        $this->lastError = $msg;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Process\Pipes;

/**
 * PipesInterface manages descriptors and pipes for the use of proc_open.
 *
 * @author Romain Neutron <imprec@gmail.com>
 *
 * @internal
 */
interface PipesInterface
{
    public const CHUNK_SIZE = 16384;
    /**
     * Returns an array of descriptors for the use of proc_open.
     */
    public function getDescriptors() : array;
    /**
     * Returns an array of filenames indexed by their related stream in case these pipes use temporary files.
     *
     * @return string[]
     */
    public function getFiles() : array;
    /**
     * Reads data in file handles and pipes.
     *
     * @param bool $blocking Whether to use blocking calls or not
     * @param bool $close    Whether to close pipes if they've reached EOF
     *
     * @return string[] An array of read data indexed by their fd
     */
    public function readAndWrite(bool $blocking, bool $close = \false) : array;
    /**
     * Returns if the current state has open file handles or pipes.
     */
    public function areOpen() : bool;
    /**
     * Returns if pipes are able to read output.
     */
    public function haveReadSupport() : bool;
    /**
     * Closes file handles and pipes.
     */
    public function close();
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Process;

/**
 * An executable finder specifically designed for the PHP executable.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 * @author Johannes M. Schmitt <schmittjoh@gmail.com>
 */
class PhpExecutableFinder
{
    private $executableFinder;
    public function __construct()
    {
        $this->executableFinder = new ExecutableFinder();
    }
    /**
     * Finds The PHP executable.
     *
     * @return string|false
     */
    public function find(bool $includeArgs = \true)
    {
        if ($php = \getenv('PHP_BINARY')) {
            if (!\is_executable($php)) {
                $command = '\\' === \DIRECTORY_SEPARATOR ? 'where' : 'command -v';
                if ($php = \strtok(\exec($command . ' ' . \escapeshellarg($php)), \PHP_EOL)) {
                    if (!\is_executable($php)) {
                        return \false;
                    }
                } else {
                    return \false;
                }
            }
            if (@\is_dir($php)) {
                return \false;
            }
            return $php;
        }
        $args = $this->findArguments();
        $args = $includeArgs && $args ? ' ' . \implode(' ', $args) : '';
        // PHP_BINARY return the current sapi executable
        if (\PHP_BINARY && \in_array(\PHP_SAPI, ['cli', 'cli-server', 'phpdbg'], \true)) {
            return \PHP_BINARY . $args;
        }
        if ($php = \getenv('PHP_PATH')) {
            if (!@\is_executable($php) || @\is_dir($php)) {
                return \false;
            }
            return $php;
        }
        if ($php = \getenv('PHP_PEAR_PHP_BIN')) {
            if (@\is_executable($php) && !@\is_dir($php)) {
                return $php;
            }
        }
        if (@\is_executable($php = \PHP_BINDIR . ('\\' === \DIRECTORY_SEPARATOR ? '\\php.exe' : '/php')) && !@\is_dir($php)) {
            return $php;
        }
        $dirs = [\PHP_BINDIR];
        if ('\\' === \DIRECTORY_SEPARATOR) {
            $dirs[] = 'C:\\xampp\\php\\';
        }
        return $this->executableFinder->find('php', \false, $dirs);
    }
    /**
     * Finds the PHP executable arguments.
     *
     * @return array
     */
    public function findArguments()
    {
        $arguments = [];
        if ('phpdbg' === \PHP_SAPI) {
            $arguments[] = '-qrr';
        }
        return $arguments;
    }
}
Copyright (c) 2004-present Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Process;

use _PHPStan_dcc7b7cff\Symfony\Component\Process\Exception\RuntimeException;
/**
 * Provides a way to continuously write to the input of a Process until the InputStream is closed.
 *
 * @author Nicolas Grekas <p@tchwork.com>
 *
 * @implements \IteratorAggregate<int, string>
 */
class InputStream implements \IteratorAggregate
{
    /** @var callable|null */
    private $onEmpty = null;
    private $input = [];
    private $open = \true;
    /**
     * Sets a callback that is called when the write buffer becomes empty.
     */
    public function onEmpty(callable $onEmpty = null)
    {
        $this->onEmpty = $onEmpty;
    }
    /**
     * Appends an input to the write buffer.
     *
     * @param resource|string|int|float|bool|\Traversable|null $input The input to append as scalar,
     *                                                                stream resource or \Traversable
     */
    public function write($input)
    {
        if (null === $input) {
            return;
        }
        if ($this->isClosed()) {
            throw new RuntimeException(\sprintf('"%s" is closed.', static::class));
        }
        $this->input[] = ProcessUtils::validateInput(__METHOD__, $input);
    }
    /**
     * Closes the write buffer.
     */
    public function close()
    {
        $this->open = \false;
    }
    /**
     * Tells whether the write buffer is closed or not.
     */
    public function isClosed()
    {
        return !$this->open;
    }
    /**
     * @return \Traversable<int, string>
     */
    #[\ReturnTypeWillChange]
    public function getIterator()
    {
        $this->open = \true;
        while ($this->open || $this->input) {
            if (!$this->input) {
                (yield '');
                continue;
            }
            $current = \array_shift($this->input);
            if ($current instanceof \Iterator) {
                yield from $current;
            } else {
                (yield $current);
            }
            if (!$this->input && $this->open && null !== ($onEmpty = $this->onEmpty)) {
                $this->write($onEmpty($this));
            }
        }
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Process;

/**
 * Generic executable finder.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 * @author Johannes M. Schmitt <schmittjoh@gmail.com>
 */
class ExecutableFinder
{
    private $suffixes = ['.exe', '.bat', '.cmd', '.com'];
    /**
     * Replaces default suffixes of executable.
     */
    public function setSuffixes(array $suffixes)
    {
        $this->suffixes = $suffixes;
    }
    /**
     * Adds new possible suffix to check for executable.
     */
    public function addSuffix(string $suffix)
    {
        $this->suffixes[] = $suffix;
    }
    /**
     * Finds an executable by name.
     *
     * @param string      $name      The executable name (without the extension)
     * @param string|null $default   The default to return if no executable is found
     * @param array       $extraDirs Additional dirs to check into
     *
     * @return string|null
     */
    public function find(string $name, string $default = null, array $extraDirs = [])
    {
        if (\ini_get('open_basedir')) {
            $searchPath = \array_merge(\explode(\PATH_SEPARATOR, \ini_get('open_basedir')), $extraDirs);
            $dirs = [];
            foreach ($searchPath as $path) {
                // Silencing against https://bugs.php.net/69240
                if (@\is_dir($path)) {
                    $dirs[] = $path;
                } else {
                    if (\basename($path) == $name && @\is_executable($path)) {
                        return $path;
                    }
                }
            }
        } else {
            $dirs = \array_merge(\explode(\PATH_SEPARATOR, \getenv('PATH') ?: \getenv('Path')), $extraDirs);
        }
        $suffixes = [''];
        if ('\\' === \DIRECTORY_SEPARATOR) {
            $pathExt = \getenv('PATHEXT');
            $suffixes = \array_merge($pathExt ? \explode(\PATH_SEPARATOR, $pathExt) : $this->suffixes, $suffixes);
        }
        foreach ($suffixes as $suffix) {
            foreach ($dirs as $dir) {
                if (@\is_file($file = $dir . \DIRECTORY_SEPARATOR . $name . $suffix) && ('\\' === \DIRECTORY_SEPARATOR || @\is_executable($file))) {
                    return $file;
                }
            }
        }
        return $default;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Process\Exception;

/**
 * Marker Interface for the Process Component.
 *
 * @author Johannes M. Schmitt <schmittjoh@gmail.com>
 */
interface ExceptionInterface extends \Throwable
{
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Process\Exception;

/**
 * RuntimeException for the Process Component.
 *
 * @author Johannes M. Schmitt <schmittjoh@gmail.com>
 */
class RuntimeException extends \RuntimeException implements ExceptionInterface
{
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Process\Exception;

use _PHPStan_dcc7b7cff\Symfony\Component\Process\Process;
/**
 * Exception for failed processes.
 *
 * @author Johannes M. Schmitt <schmittjoh@gmail.com>
 */
class ProcessFailedException extends RuntimeException
{
    private $process;
    public function __construct(Process $process)
    {
        if ($process->isSuccessful()) {
            throw new InvalidArgumentException('Expected a failed process, but the given process was successful.');
        }
        $error = \sprintf('The command "%s" failed.' . "\n\nExit Code: %s(%s)\n\nWorking directory: %s", $process->getCommandLine(), $process->getExitCode(), $process->getExitCodeText(), $process->getWorkingDirectory());
        if (!$process->isOutputDisabled()) {
            $error .= \sprintf("\n\nOutput:\n================\n%s\n\nError Output:\n================\n%s", $process->getOutput(), $process->getErrorOutput());
        }
        parent::__construct($error);
        $this->process = $process;
    }
    public function getProcess()
    {
        return $this->process;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Process\Exception;

/**
 * LogicException for the Process Component.
 *
 * @author Romain Neutron <imprec@gmail.com>
 */
class LogicException extends \LogicException implements ExceptionInterface
{
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Process\Exception;

use _PHPStan_dcc7b7cff\Symfony\Component\Process\Process;
/**
 * Exception that is thrown when a process has been signaled.
 *
 * @author Sullivan Senechal <soullivaneuh@gmail.com>
 */
final class ProcessSignaledException extends RuntimeException
{
    private $process;
    public function __construct(Process $process)
    {
        $this->process = $process;
        parent::__construct(\sprintf('The process has been signaled with signal "%s".', $process->getTermSignal()));
    }
    public function getProcess() : Process
    {
        return $this->process;
    }
    public function getSignal() : int
    {
        return $this->getProcess()->getTermSignal();
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Process\Exception;

/**
 * InvalidArgumentException for the Process Component.
 *
 * @author Romain Neutron <imprec@gmail.com>
 */
class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
{
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Process\Exception;

use _PHPStan_dcc7b7cff\Symfony\Component\Process\Process;
/**
 * Exception that is thrown when a process times out.
 *
 * @author Johannes M. Schmitt <schmittjoh@gmail.com>
 */
class ProcessTimedOutException extends RuntimeException
{
    public const TYPE_GENERAL = 1;
    public const TYPE_IDLE = 2;
    private $process;
    private $timeoutType;
    public function __construct(Process $process, int $timeoutType)
    {
        $this->process = $process;
        $this->timeoutType = $timeoutType;
        parent::__construct(\sprintf('The process "%s" exceeded the timeout of %s seconds.', $process->getCommandLine(), $this->getExceededTimeout()));
    }
    public function getProcess()
    {
        return $this->process;
    }
    public function isGeneralTimeout()
    {
        return self::TYPE_GENERAL === $this->timeoutType;
    }
    public function isIdleTimeout()
    {
        return self::TYPE_IDLE === $this->timeoutType;
    }
    public function getExceededTimeout()
    {
        switch ($this->timeoutType) {
            case self::TYPE_GENERAL:
                return $this->process->getTimeout();
            case self::TYPE_IDLE:
                return $this->process->getIdleTimeout();
            default:
                throw new \LogicException(\sprintf('Unknown timeout type "%d".', $this->timeoutType));
        }
    }
}
Copyright (c) 2020 Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

use Symfony\Polyfill\Php80 as p;

if (\PHP_VERSION_ID >= 80000) {
    return;
}

if (!defined('FILTER_VALIDATE_BOOL') && defined('FILTER_VALIDATE_BOOLEAN')) {
    define('FILTER_VALIDATE_BOOL', \FILTER_VALIDATE_BOOLEAN);
}

if (!function_exists('fdiv')) {
    function fdiv(float $num1, float $num2): float { return p\Php80::fdiv($num1, $num2); }
}
if (!function_exists('preg_last_error_msg')) {
    function preg_last_error_msg(): string { return p\Php80::preg_last_error_msg(); }
}
if (!function_exists('str_contains')) {
    function str_contains(?string $haystack, ?string $needle): bool { return p\Php80::str_contains($haystack ?? '', $needle ?? ''); }
}
if (!function_exists('str_starts_with')) {
    function str_starts_with(?string $haystack, ?string $needle): bool { return p\Php80::str_starts_with($haystack ?? '', $needle ?? ''); }
}
if (!function_exists('str_ends_with')) {
    function str_ends_with(?string $haystack, ?string $needle): bool { return p\Php80::str_ends_with($haystack ?? '', $needle ?? ''); }
}
if (!function_exists('get_debug_type')) {
    function get_debug_type($value): string { return p\Php80::get_debug_type($value); }
}
if (!function_exists('get_resource_id')) {
    function get_resource_id($resource): int { return p\Php80::get_resource_id($resource); }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

if (\PHP_VERSION_ID < 80000) {
    class ValueError extends Error
    {
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

#[Attribute(Attribute::TARGET_CLASS)]
final class Attribute
{
    public const TARGET_CLASS = 1;
    public const TARGET_FUNCTION = 2;
    public const TARGET_METHOD = 4;
    public const TARGET_PROPERTY = 8;
    public const TARGET_CLASS_CONSTANT = 16;
    public const TARGET_PARAMETER = 32;
    public const TARGET_ALL = 63;
    public const IS_REPEATABLE = 64;

    /** @var int */
    public $flags;

    public function __construct(int $flags = self::TARGET_ALL)
    {
        $this->flags = $flags;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

if (\PHP_VERSION_ID < 80000) {
    class UnhandledMatchError extends Error
    {
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

if (\PHP_VERSION_ID < 80000 && extension_loaded('tokenizer')) {
    class PhpToken extends Symfony\Polyfill\Php80\PhpToken
    {
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

if (\PHP_VERSION_ID < 80000) {
    interface Stringable
    {
        /**
         * @return string
         */
        public function __toString();
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Polyfill\Php80;

/**
 * @author Fedonyuk Anton <info@ensostudio.ru>
 *
 * @internal
 */
class PhpToken implements \Stringable
{
    /**
     * @var int
     */
    public $id;

    /**
     * @var string
     */
    public $text;

    /**
     * @var int
     */
    public $line;

    /**
     * @var int
     */
    public $pos;

    public function __construct(int $id, string $text, int $line = -1, int $position = -1)
    {
        $this->id = $id;
        $this->text = $text;
        $this->line = $line;
        $this->pos = $position;
    }

    public function getTokenName(): ?string
    {
        if ('UNKNOWN' === $name = token_name($this->id)) {
            $name = \strlen($this->text) > 1 || \ord($this->text) < 32 ? null : $this->text;
        }

        return $name;
    }

    /**
     * @param int|string|array $kind
     */
    public function is($kind): bool
    {
        foreach ((array) $kind as $value) {
            if (\in_array($value, [$this->id, $this->text], true)) {
                return true;
            }
        }

        return false;
    }

    public function isIgnorable(): bool
    {
        return \in_array($this->id, [\T_WHITESPACE, \T_COMMENT, \T_DOC_COMMENT, \T_OPEN_TAG], true);
    }

    public function __toString(): string
    {
        return (string) $this->text;
    }

    /**
     * @return static[]
     */
    public static function tokenize(string $code, int $flags = 0): array
    {
        $line = 1;
        $position = 0;
        $tokens = token_get_all($code, $flags);
        foreach ($tokens as $index => $token) {
            if (\is_string($token)) {
                $id = \ord($token);
                $text = $token;
            } else {
                [$id, $text, $line] = $token;
            }
            $tokens[$index] = new static($id, $text, $line, $position);
            $position += \strlen($text);
        }

        return $tokens;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Polyfill\Php80;

/**
 * @author Ion Bazan <ion.bazan@gmail.com>
 * @author Nico Oelgart <nicoswd@gmail.com>
 * @author Nicolas Grekas <p@tchwork.com>
 *
 * @internal
 */
final class Php80
{
    public static function fdiv(float $dividend, float $divisor): float
    {
        return @($dividend / $divisor);
    }

    public static function get_debug_type($value): string
    {
        switch (true) {
            case null === $value: return 'null';
            case \is_bool($value): return 'bool';
            case \is_string($value): return 'string';
            case \is_array($value): return 'array';
            case \is_int($value): return 'int';
            case \is_float($value): return 'float';
            case \is_object($value): break;
            case $value instanceof \__PHP_Incomplete_Class: return '__PHP_Incomplete_Class';
            default:
                if (null === $type = @get_resource_type($value)) {
                    return 'unknown';
                }

                if ('Unknown' === $type) {
                    $type = 'closed';
                }

                return "resource ($type)";
        }

        $class = \get_class($value);

        if (false === strpos($class, '@')) {
            return $class;
        }

        return (get_parent_class($class) ?: key(class_implements($class)) ?: 'class').'@anonymous';
    }

    public static function get_resource_id($res): int
    {
        if (!\is_resource($res) && null === @get_resource_type($res)) {
            throw new \TypeError(sprintf('Argument 1 passed to get_resource_id() must be of the type resource, %s given', get_debug_type($res)));
        }

        return (int) $res;
    }

    public static function preg_last_error_msg(): string
    {
        switch (preg_last_error()) {
            case \PREG_INTERNAL_ERROR:
                return 'Internal error';
            case \PREG_BAD_UTF8_ERROR:
                return 'Malformed UTF-8 characters, possibly incorrectly encoded';
            case \PREG_BAD_UTF8_OFFSET_ERROR:
                return 'The offset did not correspond to the beginning of a valid UTF-8 code point';
            case \PREG_BACKTRACK_LIMIT_ERROR:
                return 'Backtrack limit exhausted';
            case \PREG_RECURSION_LIMIT_ERROR:
                return 'Recursion limit exhausted';
            case \PREG_JIT_STACKLIMIT_ERROR:
                return 'JIT stack limit exhausted';
            case \PREG_NO_ERROR:
                return 'No error';
            default:
                return 'Unknown error';
        }
    }

    public static function str_contains(string $haystack, string $needle): bool
    {
        return '' === $needle || false !== strpos($haystack, $needle);
    }

    public static function str_starts_with(string $haystack, string $needle): bool
    {
        return 0 === strncmp($haystack, $needle, \strlen($needle));
    }

    public static function str_ends_with(string $haystack, string $needle): bool
    {
        if ('' === $needle || $needle === $haystack) {
            return true;
        }

        if ('' === $haystack) {
            return false;
        }

        $needleLength = \strlen($needle);

        return $needleLength <= \strlen($haystack) && 0 === substr_compare($haystack, $needle, -$needleLength);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Polyfill\Mbstring;

/**
 * Partial mbstring implementation in PHP, iconv based, UTF-8 centric.
 *
 * Implemented:
 * - mb_chr                  - Returns a specific character from its Unicode code point
 * - mb_convert_encoding     - Convert character encoding
 * - mb_convert_variables    - Convert character code in variable(s)
 * - mb_decode_mimeheader    - Decode string in MIME header field
 * - mb_encode_mimeheader    - Encode string for MIME header XXX NATIVE IMPLEMENTATION IS REALLY BUGGED
 * - mb_decode_numericentity - Decode HTML numeric string reference to character
 * - mb_encode_numericentity - Encode character to HTML numeric string reference
 * - mb_convert_case         - Perform case folding on a string
 * - mb_detect_encoding      - Detect character encoding
 * - mb_get_info             - Get internal settings of mbstring
 * - mb_http_input           - Detect HTTP input character encoding
 * - mb_http_output          - Set/Get HTTP output character encoding
 * - mb_internal_encoding    - Set/Get internal character encoding
 * - mb_list_encodings       - Returns an array of all supported encodings
 * - mb_ord                  - Returns the Unicode code point of a character
 * - mb_output_handler       - Callback function converts character encoding in output buffer
 * - mb_scrub                - Replaces ill-formed byte sequences with substitute characters
 * - mb_strlen               - Get string length
 * - mb_strpos               - Find position of first occurrence of string in a string
 * - mb_strrpos              - Find position of last occurrence of a string in a string
 * - mb_str_split            - Convert a string to an array
 * - mb_strtolower           - Make a string lowercase
 * - mb_strtoupper           - Make a string uppercase
 * - mb_substitute_character - Set/Get substitution character
 * - mb_substr               - Get part of string
 * - mb_stripos              - Finds position of first occurrence of a string within another, case insensitive
 * - mb_stristr              - Finds first occurrence of a string within another, case insensitive
 * - mb_strrchr              - Finds the last occurrence of a character in a string within another
 * - mb_strrichr             - Finds the last occurrence of a character in a string within another, case insensitive
 * - mb_strripos             - Finds position of last occurrence of a string within another, case insensitive
 * - mb_strstr               - Finds first occurrence of a string within another
 * - mb_strwidth             - Return width of string
 * - mb_substr_count         - Count the number of substring occurrences
 *
 * Not implemented:
 * - mb_convert_kana         - Convert "kana" one from another ("zen-kaku", "han-kaku" and more)
 * - mb_ereg_*               - Regular expression with multibyte support
 * - mb_parse_str            - Parse GET/POST/COOKIE data and set global variable
 * - mb_preferred_mime_name  - Get MIME charset string
 * - mb_regex_encoding       - Returns current encoding for multibyte regex as string
 * - mb_regex_set_options    - Set/Get the default options for mbregex functions
 * - mb_send_mail            - Send encoded mail
 * - mb_split                - Split multibyte string using regular expression
 * - mb_strcut               - Get part of string
 * - mb_strimwidth           - Get truncated string with specified width
 *
 * @author Nicolas Grekas <p@tchwork.com>
 *
 * @internal
 */
final class Mbstring
{
    public const MB_CASE_FOLD = \PHP_INT_MAX;

    private const CASE_FOLD = [
        ['µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"],
        ['μ', 's', 'ι',        'σ', 'β',        'θ',        'φ',        'π',        'κ',        'ρ',        'ε',        "\xE1\xB9\xA1", 'ι'],
    ];

    private static $encodingList = ['ASCII', 'UTF-8'];
    private static $language = 'neutral';
    private static $internalEncoding = 'UTF-8';

    public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null)
    {
        if (\is_array($fromEncoding) || (null !== $fromEncoding && false !== strpos($fromEncoding, ','))) {
            $fromEncoding = self::mb_detect_encoding($s, $fromEncoding);
        } else {
            $fromEncoding = self::getEncoding($fromEncoding);
        }

        $toEncoding = self::getEncoding($toEncoding);

        if ('BASE64' === $fromEncoding) {
            $s = base64_decode($s);
            $fromEncoding = $toEncoding;
        }

        if ('BASE64' === $toEncoding) {
            return base64_encode($s);
        }

        if ('HTML-ENTITIES' === $toEncoding || 'HTML' === $toEncoding) {
            if ('HTML-ENTITIES' === $fromEncoding || 'HTML' === $fromEncoding) {
                $fromEncoding = 'Windows-1252';
            }
            if ('UTF-8' !== $fromEncoding) {
                $s = iconv($fromEncoding, 'UTF-8//IGNORE', $s);
            }

            return preg_replace_callback('/[\x80-\xFF]+/', [__CLASS__, 'html_encoding_callback'], $s);
        }

        if ('HTML-ENTITIES' === $fromEncoding) {
            $s = html_entity_decode($s, \ENT_COMPAT, 'UTF-8');
            $fromEncoding = 'UTF-8';
        }

        return iconv($fromEncoding, $toEncoding.'//IGNORE', $s);
    }

    public static function mb_convert_variables($toEncoding, $fromEncoding, &...$vars)
    {
        $ok = true;
        array_walk_recursive($vars, function (&$v) use (&$ok, $toEncoding, $fromEncoding) {
            if (false === $v = self::mb_convert_encoding($v, $toEncoding, $fromEncoding)) {
                $ok = false;
            }
        });

        return $ok ? $fromEncoding : false;
    }

    public static function mb_decode_mimeheader($s)
    {
        return iconv_mime_decode($s, 2, self::$internalEncoding);
    }

    public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null)
    {
        trigger_error('mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead', \E_USER_WARNING);
    }

    public static function mb_decode_numericentity($s, $convmap, $encoding = null)
    {
        if (null !== $s && !\is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) {
            trigger_error('mb_decode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING);

            return null;
        }

        if (!\is_array($convmap) || (80000 > \PHP_VERSION_ID && !$convmap)) {
            return false;
        }

        if (null !== $encoding && !\is_scalar($encoding)) {
            trigger_error('mb_decode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING);

            return '';  // Instead of null (cf. mb_encode_numericentity).
        }

        $s = (string) $s;
        if ('' === $s) {
            return '';
        }

        $encoding = self::getEncoding($encoding);

        if ('UTF-8' === $encoding) {
            $encoding = null;
            if (!preg_match('//u', $s)) {
                $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s);
            }
        } else {
            $s = iconv($encoding, 'UTF-8//IGNORE', $s);
        }

        $cnt = floor(\count($convmap) / 4) * 4;

        for ($i = 0; $i < $cnt; $i += 4) {
            // collector_decode_htmlnumericentity ignores $convmap[$i + 3]
            $convmap[$i] += $convmap[$i + 2];
            $convmap[$i + 1] += $convmap[$i + 2];
        }

        $s = preg_replace_callback('/&#(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function (array $m) use ($cnt, $convmap) {
            $c = isset($m[2]) ? (int) hexdec($m[2]) : $m[1];
            for ($i = 0; $i < $cnt; $i += 4) {
                if ($c >= $convmap[$i] && $c <= $convmap[$i + 1]) {
                    return self::mb_chr($c - $convmap[$i + 2]);
                }
            }

            return $m[0];
        }, $s);

        if (null === $encoding) {
            return $s;
        }

        return iconv('UTF-8', $encoding.'//IGNORE', $s);
    }

    public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false)
    {
        if (null !== $s && !\is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) {
            trigger_error('mb_encode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING);

            return null;
        }

        if (!\is_array($convmap) || (80000 > \PHP_VERSION_ID && !$convmap)) {
            return false;
        }

        if (null !== $encoding && !\is_scalar($encoding)) {
            trigger_error('mb_encode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING);

            return null;  // Instead of '' (cf. mb_decode_numericentity).
        }

        if (null !== $is_hex && !\is_scalar($is_hex)) {
            trigger_error('mb_encode_numericentity() expects parameter 4 to be boolean, '.\gettype($s).' given', \E_USER_WARNING);

            return null;
        }

        $s = (string) $s;
        if ('' === $s) {
            return '';
        }

        $encoding = self::getEncoding($encoding);

        if ('UTF-8' === $encoding) {
            $encoding = null;
            if (!preg_match('//u', $s)) {
                $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s);
            }
        } else {
            $s = iconv($encoding, 'UTF-8//IGNORE', $s);
        }

        static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4];

        $cnt = floor(\count($convmap) / 4) * 4;
        $i = 0;
        $len = \strlen($s);
        $result = '';

        while ($i < $len) {
            $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"];
            $uchr = substr($s, $i, $ulen);
            $i += $ulen;
            $c = self::mb_ord($uchr);

            for ($j = 0; $j < $cnt; $j += 4) {
                if ($c >= $convmap[$j] && $c <= $convmap[$j + 1]) {
                    $cOffset = ($c + $convmap[$j + 2]) & $convmap[$j + 3];
                    $result .= $is_hex ? sprintf('&#x%X;', $cOffset) : '&#'.$cOffset.';';
                    continue 2;
                }
            }
            $result .= $uchr;
        }

        if (null === $encoding) {
            return $result;
        }

        return iconv('UTF-8', $encoding.'//IGNORE', $result);
    }

    public static function mb_convert_case($s, $mode, $encoding = null)
    {
        $s = (string) $s;
        if ('' === $s) {
            return '';
        }

        $encoding = self::getEncoding($encoding);

        if ('UTF-8' === $encoding) {
            $encoding = null;
            if (!preg_match('//u', $s)) {
                $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s);
            }
        } else {
            $s = iconv($encoding, 'UTF-8//IGNORE', $s);
        }

        if (\MB_CASE_TITLE == $mode) {
            static $titleRegexp = null;
            if (null === $titleRegexp) {
                $titleRegexp = self::getData('titleCaseRegexp');
            }
            $s = preg_replace_callback($titleRegexp, [__CLASS__, 'title_case'], $s);
        } else {
            if (\MB_CASE_UPPER == $mode) {
                static $upper = null;
                if (null === $upper) {
                    $upper = self::getData('upperCase');
                }
                $map = $upper;
            } else {
                if (self::MB_CASE_FOLD === $mode) {
                    $s = str_replace(self::CASE_FOLD[0], self::CASE_FOLD[1], $s);
                }

                static $lower = null;
                if (null === $lower) {
                    $lower = self::getData('lowerCase');
                }
                $map = $lower;
            }

            static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4];

            $i = 0;
            $len = \strlen($s);

            while ($i < $len) {
                $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"];
                $uchr = substr($s, $i, $ulen);
                $i += $ulen;

                if (isset($map[$uchr])) {
                    $uchr = $map[$uchr];
                    $nlen = \strlen($uchr);

                    if ($nlen == $ulen) {
                        $nlen = $i;
                        do {
                            $s[--$nlen] = $uchr[--$ulen];
                        } while ($ulen);
                    } else {
                        $s = substr_replace($s, $uchr, $i - $ulen, $ulen);
                        $len += $nlen - $ulen;
                        $i += $nlen - $ulen;
                    }
                }
            }
        }

        if (null === $encoding) {
            return $s;
        }

        return iconv('UTF-8', $encoding.'//IGNORE', $s);
    }

    public static function mb_internal_encoding($encoding = null)
    {
        if (null === $encoding) {
            return self::$internalEncoding;
        }

        $normalizedEncoding = self::getEncoding($encoding);

        if ('UTF-8' === $normalizedEncoding || false !== @iconv($normalizedEncoding, $normalizedEncoding, ' ')) {
            self::$internalEncoding = $normalizedEncoding;

            return true;
        }

        if (80000 > \PHP_VERSION_ID) {
            return false;
        }

        throw new \ValueError(sprintf('Argument #1 ($encoding) must be a valid encoding, "%s" given', $encoding));
    }

    public static function mb_language($lang = null)
    {
        if (null === $lang) {
            return self::$language;
        }

        switch ($normalizedLang = strtolower($lang)) {
            case 'uni':
            case 'neutral':
                self::$language = $normalizedLang;

                return true;
        }

        if (80000 > \PHP_VERSION_ID) {
            return false;
        }

        throw new \ValueError(sprintf('Argument #1 ($language) must be a valid language, "%s" given', $lang));
    }

    public static function mb_list_encodings()
    {
        return ['UTF-8'];
    }

    public static function mb_encoding_aliases($encoding)
    {
        switch (strtoupper($encoding)) {
            case 'UTF8':
            case 'UTF-8':
                return ['utf8'];
        }

        return false;
    }

    public static function mb_check_encoding($var = null, $encoding = null)
    {
        if (null === $encoding) {
            if (null === $var) {
                return false;
            }
            $encoding = self::$internalEncoding;
        }

        return self::mb_detect_encoding($var, [$encoding]) || false !== @iconv($encoding, $encoding, $var);
    }

    public static function mb_detect_encoding($str, $encodingList = null, $strict = false)
    {
        if (null === $encodingList) {
            $encodingList = self::$encodingList;
        } else {
            if (!\is_array($encodingList)) {
                $encodingList = array_map('trim', explode(',', $encodingList));
            }
            $encodingList = array_map('strtoupper', $encodingList);
        }

        foreach ($encodingList as $enc) {
            switch ($enc) {
                case 'ASCII':
                    if (!preg_match('/[\x80-\xFF]/', $str)) {
                        return $enc;
                    }
                    break;

                case 'UTF8':
                case 'UTF-8':
                    if (preg_match('//u', $str)) {
                        return 'UTF-8';
                    }
                    break;

                default:
                    if (0 === strncmp($enc, 'ISO-8859-', 9)) {
                        return $enc;
                    }
            }
        }

        return false;
    }

    public static function mb_detect_order($encodingList = null)
    {
        if (null === $encodingList) {
            return self::$encodingList;
        }

        if (!\is_array($encodingList)) {
            $encodingList = array_map('trim', explode(',', $encodingList));
        }
        $encodingList = array_map('strtoupper', $encodingList);

        foreach ($encodingList as $enc) {
            switch ($enc) {
                default:
                    if (strncmp($enc, 'ISO-8859-', 9)) {
                        return false;
                    }
                    // no break
                case 'ASCII':
                case 'UTF8':
                case 'UTF-8':
            }
        }

        self::$encodingList = $encodingList;

        return true;
    }

    public static function mb_strlen($s, $encoding = null)
    {
        $encoding = self::getEncoding($encoding);
        if ('CP850' === $encoding || 'ASCII' === $encoding) {
            return \strlen($s);
        }

        return @iconv_strlen($s, $encoding);
    }

    public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null)
    {
        $encoding = self::getEncoding($encoding);
        if ('CP850' === $encoding || 'ASCII' === $encoding) {
            return strpos($haystack, $needle, $offset);
        }

        $needle = (string) $needle;
        if ('' === $needle) {
            if (80000 > \PHP_VERSION_ID) {
                trigger_error(__METHOD__.': Empty delimiter', \E_USER_WARNING);

                return false;
            }

            return 0;
        }

        return iconv_strpos($haystack, $needle, $offset, $encoding);
    }

    public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null)
    {
        $encoding = self::getEncoding($encoding);
        if ('CP850' === $encoding || 'ASCII' === $encoding) {
            return strrpos($haystack, $needle, $offset);
        }

        if ($offset != (int) $offset) {
            $offset = 0;
        } elseif ($offset = (int) $offset) {
            if ($offset < 0) {
                if (0 > $offset += self::mb_strlen($needle)) {
                    $haystack = self::mb_substr($haystack, 0, $offset, $encoding);
                }
                $offset = 0;
            } else {
                $haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding);
            }
        }

        $pos = '' !== $needle || 80000 > \PHP_VERSION_ID
            ? iconv_strrpos($haystack, $needle, $encoding)
            : self::mb_strlen($haystack, $encoding);

        return false !== $pos ? $offset + $pos : false;
    }

    public static function mb_str_split($string, $split_length = 1, $encoding = null)
    {
        if (null !== $string && !\is_scalar($string) && !(\is_object($string) && method_exists($string, '__toString'))) {
            trigger_error('mb_str_split() expects parameter 1 to be string, '.\gettype($string).' given', \E_USER_WARNING);

            return null;
        }

        if (1 > $split_length = (int) $split_length) {
            if (80000 > \PHP_VERSION_ID) {
                trigger_error('The length of each segment must be greater than zero', \E_USER_WARNING);

                return false;
            }

            throw new \ValueError('Argument #2 ($length) must be greater than 0');
        }

        if (null === $encoding) {
            $encoding = mb_internal_encoding();
        }

        if ('UTF-8' === $encoding = self::getEncoding($encoding)) {
            $rx = '/(';
            while (65535 < $split_length) {
                $rx .= '.{65535}';
                $split_length -= 65535;
            }
            $rx .= '.{'.$split_length.'})/us';

            return preg_split($rx, $string, -1, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY);
        }

        $result = [];
        $length = mb_strlen($string, $encoding);

        for ($i = 0; $i < $length; $i += $split_length) {
            $result[] = mb_substr($string, $i, $split_length, $encoding);
        }

        return $result;
    }

    public static function mb_strtolower($s, $encoding = null)
    {
        return self::mb_convert_case($s, \MB_CASE_LOWER, $encoding);
    }

    public static function mb_strtoupper($s, $encoding = null)
    {
        return self::mb_convert_case($s, \MB_CASE_UPPER, $encoding);
    }

    public static function mb_substitute_character($c = null)
    {
        if (null === $c) {
            return 'none';
        }
        if (0 === strcasecmp($c, 'none')) {
            return true;
        }
        if (80000 > \PHP_VERSION_ID) {
            return false;
        }
        if (\is_int($c) || 'long' === $c || 'entity' === $c) {
            return false;
        }

        throw new \ValueError('Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint');
    }

    public static function mb_substr($s, $start, $length = null, $encoding = null)
    {
        $encoding = self::getEncoding($encoding);
        if ('CP850' === $encoding || 'ASCII' === $encoding) {
            return (string) substr($s, $start, null === $length ? 2147483647 : $length);
        }

        if ($start < 0) {
            $start = iconv_strlen($s, $encoding) + $start;
            if ($start < 0) {
                $start = 0;
            }
        }

        if (null === $length) {
            $length = 2147483647;
        } elseif ($length < 0) {
            $length = iconv_strlen($s, $encoding) + $length - $start;
            if ($length < 0) {
                return '';
            }
        }

        return (string) iconv_substr($s, $start, $length, $encoding);
    }

    public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null)
    {
        $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding);
        $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding);

        return self::mb_strpos($haystack, $needle, $offset, $encoding);
    }

    public static function mb_stristr($haystack, $needle, $part = false, $encoding = null)
    {
        $pos = self::mb_stripos($haystack, $needle, 0, $encoding);

        return self::getSubpart($pos, $part, $haystack, $encoding);
    }

    public static function mb_strrchr($haystack, $needle, $part = false, $encoding = null)
    {
        $encoding = self::getEncoding($encoding);
        if ('CP850' === $encoding || 'ASCII' === $encoding) {
            $pos = strrpos($haystack, $needle);
        } else {
            $needle = self::mb_substr($needle, 0, 1, $encoding);
            $pos = iconv_strrpos($haystack, $needle, $encoding);
        }

        return self::getSubpart($pos, $part, $haystack, $encoding);
    }

    public static function mb_strrichr($haystack, $needle, $part = false, $encoding = null)
    {
        $needle = self::mb_substr($needle, 0, 1, $encoding);
        $pos = self::mb_strripos($haystack, $needle, $encoding);

        return self::getSubpart($pos, $part, $haystack, $encoding);
    }

    public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null)
    {
        $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding);
        $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding);

        return self::mb_strrpos($haystack, $needle, $offset, $encoding);
    }

    public static function mb_strstr($haystack, $needle, $part = false, $encoding = null)
    {
        $pos = strpos($haystack, $needle);
        if (false === $pos) {
            return false;
        }
        if ($part) {
            return substr($haystack, 0, $pos);
        }

        return substr($haystack, $pos);
    }

    public static function mb_get_info($type = 'all')
    {
        $info = [
            'internal_encoding' => self::$internalEncoding,
            'http_output' => 'pass',
            'http_output_conv_mimetypes' => '^(text/|application/xhtml\+xml)',
            'func_overload' => 0,
            'func_overload_list' => 'no overload',
            'mail_charset' => 'UTF-8',
            'mail_header_encoding' => 'BASE64',
            'mail_body_encoding' => 'BASE64',
            'illegal_chars' => 0,
            'encoding_translation' => 'Off',
            'language' => self::$language,
            'detect_order' => self::$encodingList,
            'substitute_character' => 'none',
            'strict_detection' => 'Off',
        ];

        if ('all' === $type) {
            return $info;
        }
        if (isset($info[$type])) {
            return $info[$type];
        }

        return false;
    }

    public static function mb_http_input($type = '')
    {
        return false;
    }

    public static function mb_http_output($encoding = null)
    {
        return null !== $encoding ? 'pass' === $encoding : 'pass';
    }

    public static function mb_strwidth($s, $encoding = null)
    {
        $encoding = self::getEncoding($encoding);

        if ('UTF-8' !== $encoding) {
            $s = iconv($encoding, 'UTF-8//IGNORE', $s);
        }

        $s = preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $s, -1, $wide);

        return ($wide << 1) + iconv_strlen($s, 'UTF-8');
    }

    public static function mb_substr_count($haystack, $needle, $encoding = null)
    {
        return substr_count($haystack, $needle);
    }

    public static function mb_output_handler($contents, $status)
    {
        return $contents;
    }

    public static function mb_chr($code, $encoding = null)
    {
        if (0x80 > $code %= 0x200000) {
            $s = \chr($code);
        } elseif (0x800 > $code) {
            $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F);
        } elseif (0x10000 > $code) {
            $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F);
        } else {
            $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F);
        }

        if ('UTF-8' !== $encoding = self::getEncoding($encoding)) {
            $s = mb_convert_encoding($s, $encoding, 'UTF-8');
        }

        return $s;
    }

    public static function mb_ord($s, $encoding = null)
    {
        if ('UTF-8' !== $encoding = self::getEncoding($encoding)) {
            $s = mb_convert_encoding($s, 'UTF-8', $encoding);
        }

        if (1 === \strlen($s)) {
            return \ord($s);
        }

        $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0;
        if (0xF0 <= $code) {
            return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80;
        }
        if (0xE0 <= $code) {
            return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80;
        }
        if (0xC0 <= $code) {
            return (($code - 0xC0) << 6) + $s[2] - 0x80;
        }

        return $code;
    }

    private static function getSubpart($pos, $part, $haystack, $encoding)
    {
        if (false === $pos) {
            return false;
        }
        if ($part) {
            return self::mb_substr($haystack, 0, $pos, $encoding);
        }

        return self::mb_substr($haystack, $pos, null, $encoding);
    }

    private static function html_encoding_callback(array $m)
    {
        $i = 1;
        $entities = '';
        $m = unpack('C*', htmlentities($m[0], \ENT_COMPAT, 'UTF-8'));

        while (isset($m[$i])) {
            if (0x80 > $m[$i]) {
                $entities .= \chr($m[$i++]);
                continue;
            }
            if (0xF0 <= $m[$i]) {
                $c = (($m[$i++] - 0xF0) << 18) + (($m[$i++] - 0x80) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80;
            } elseif (0xE0 <= $m[$i]) {
                $c = (($m[$i++] - 0xE0) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80;
            } else {
                $c = (($m[$i++] - 0xC0) << 6) + $m[$i++] - 0x80;
            }

            $entities .= '&#'.$c.';';
        }

        return $entities;
    }

    private static function title_case(array $s)
    {
        return self::mb_convert_case($s[1], \MB_CASE_UPPER, 'UTF-8').self::mb_convert_case($s[2], \MB_CASE_LOWER, 'UTF-8');
    }

    private static function getData($file)
    {
        if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) {
            return require $file;
        }

        return false;
    }

    private static function getEncoding($encoding)
    {
        if (null === $encoding) {
            return self::$internalEncoding;
        }

        if ('UTF-8' === $encoding) {
            return 'UTF-8';
        }

        $encoding = strtoupper($encoding);

        if ('8BIT' === $encoding || 'BINARY' === $encoding) {
            return 'CP850';
        }

        if ('UTF8' === $encoding) {
            return 'UTF-8';
        }

        return $encoding;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

use Symfony\Polyfill\Mbstring as p;

if (!function_exists('mb_convert_encoding')) {
    function mb_convert_encoding(array|string|null $string, ?string $to_encoding, array|string|null $from_encoding = null): array|string|false { return p\Mbstring::mb_convert_encoding($string ?? '', (string) $to_encoding, $from_encoding); }
}
if (!function_exists('mb_decode_mimeheader')) {
    function mb_decode_mimeheader(?string $string): string { return p\Mbstring::mb_decode_mimeheader((string) $string); }
}
if (!function_exists('mb_encode_mimeheader')) {
    function mb_encode_mimeheader(?string $string, ?string $charset = null, ?string $transfer_encoding = null, ?string $newline = "\r\n", ?int $indent = 0): string { return p\Mbstring::mb_encode_mimeheader((string) $string, $charset, $transfer_encoding, (string) $newline, (int) $indent); }
}
if (!function_exists('mb_decode_numericentity')) {
    function mb_decode_numericentity(?string $string, array $map, ?string $encoding = null): string { return p\Mbstring::mb_decode_numericentity((string) $string, $map, $encoding); }
}
if (!function_exists('mb_encode_numericentity')) {
    function mb_encode_numericentity(?string $string, array $map, ?string $encoding = null, ?bool $hex = false): string { return p\Mbstring::mb_encode_numericentity((string) $string, $map, $encoding, (bool) $hex); }
}
if (!function_exists('mb_convert_case')) {
    function mb_convert_case(?string $string, ?int $mode, ?string $encoding = null): string { return p\Mbstring::mb_convert_case((string) $string, (int) $mode, $encoding); }
}
if (!function_exists('mb_internal_encoding')) {
    function mb_internal_encoding(?string $encoding = null): string|bool { return p\Mbstring::mb_internal_encoding($encoding); }
}
if (!function_exists('mb_language')) {
    function mb_language(?string $language = null): string|bool { return p\Mbstring::mb_language($language); }
}
if (!function_exists('mb_list_encodings')) {
    function mb_list_encodings(): array { return p\Mbstring::mb_list_encodings(); }
}
if (!function_exists('mb_encoding_aliases')) {
    function mb_encoding_aliases(?string $encoding): array { return p\Mbstring::mb_encoding_aliases((string) $encoding); }
}
if (!function_exists('mb_check_encoding')) {
    function mb_check_encoding(array|string|null $value = null, ?string $encoding = null): bool { return p\Mbstring::mb_check_encoding($value, $encoding); }
}
if (!function_exists('mb_detect_encoding')) {
    function mb_detect_encoding(?string $string, array|string|null $encodings = null, ?bool $strict = false): string|false { return p\Mbstring::mb_detect_encoding((string) $string, $encodings, (bool) $strict); }
}
if (!function_exists('mb_detect_order')) {
    function mb_detect_order(array|string|null $encoding = null): array|bool { return p\Mbstring::mb_detect_order($encoding); }
}
if (!function_exists('mb_parse_str')) {
    function mb_parse_str(?string $string, &$result = []): bool { parse_str((string) $string, $result); return (bool) $result; }
}
if (!function_exists('mb_strlen')) {
    function mb_strlen(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strlen((string) $string, $encoding); }
}
if (!function_exists('mb_strpos')) {
    function mb_strpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strpos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
}
if (!function_exists('mb_strtolower')) {
    function mb_strtolower(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtolower((string) $string, $encoding); }
}
if (!function_exists('mb_strtoupper')) {
    function mb_strtoupper(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtoupper((string) $string, $encoding); }
}
if (!function_exists('mb_substitute_character')) {
    function mb_substitute_character(string|int|null $substitute_character = null): string|int|bool { return p\Mbstring::mb_substitute_character($substitute_character); }
}
if (!function_exists('mb_substr')) {
    function mb_substr(?string $string, ?int $start, ?int $length = null, ?string $encoding = null): string { return p\Mbstring::mb_substr((string) $string, (int) $start, $length, $encoding); }
}
if (!function_exists('mb_stripos')) {
    function mb_stripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_stripos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
}
if (!function_exists('mb_stristr')) {
    function mb_stristr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_stristr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
}
if (!function_exists('mb_strrchr')) {
    function mb_strrchr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrchr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
}
if (!function_exists('mb_strrichr')) {
    function mb_strrichr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrichr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
}
if (!function_exists('mb_strripos')) {
    function mb_strripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strripos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
}
if (!function_exists('mb_strrpos')) {
    function mb_strrpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strrpos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
}
if (!function_exists('mb_strstr')) {
    function mb_strstr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strstr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
}
if (!function_exists('mb_get_info')) {
    function mb_get_info(?string $type = 'all'): array|string|int|false { return p\Mbstring::mb_get_info((string) $type); }
}
if (!function_exists('mb_http_output')) {
    function mb_http_output(?string $encoding = null): string|bool { return p\Mbstring::mb_http_output($encoding); }
}
if (!function_exists('mb_strwidth')) {
    function mb_strwidth(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strwidth((string) $string, $encoding); }
}
if (!function_exists('mb_substr_count')) {
    function mb_substr_count(?string $haystack, ?string $needle, ?string $encoding = null): int { return p\Mbstring::mb_substr_count((string) $haystack, (string) $needle, $encoding); }
}
if (!function_exists('mb_output_handler')) {
    function mb_output_handler(?string $string, ?int $status): string { return p\Mbstring::mb_output_handler((string) $string, (int) $status); }
}
if (!function_exists('mb_http_input')) {
    function mb_http_input(?string $type = null): array|string|false { return p\Mbstring::mb_http_input($type); }
}

if (!function_exists('mb_convert_variables')) {
    function mb_convert_variables(?string $to_encoding, array|string|null $from_encoding, mixed &$var, mixed &...$vars): string|false { return p\Mbstring::mb_convert_variables((string) $to_encoding, $from_encoding ?? '', $var, ...$vars); }
}

if (!function_exists('mb_ord')) {
    function mb_ord(?string $string, ?string $encoding = null): int|false { return p\Mbstring::mb_ord((string) $string, $encoding); }
}
if (!function_exists('mb_chr')) {
    function mb_chr(?int $codepoint, ?string $encoding = null): string|false { return p\Mbstring::mb_chr((int) $codepoint, $encoding); }
}
if (!function_exists('mb_scrub')) {
    function mb_scrub(?string $string, ?string $encoding = null): string { $encoding ??= mb_internal_encoding(); return mb_convert_encoding((string) $string, $encoding, $encoding); }
}
if (!function_exists('mb_str_split')) {
    function mb_str_split(?string $string, ?int $length = 1, ?string $encoding = null): array { return p\Mbstring::mb_str_split((string) $string, (int) $length, $encoding); }
}

if (extension_loaded('mbstring')) {
    return;
}

if (!defined('MB_CASE_UPPER')) {
    define('MB_CASE_UPPER', 0);
}
if (!defined('MB_CASE_LOWER')) {
    define('MB_CASE_LOWER', 1);
}
if (!defined('MB_CASE_TITLE')) {
    define('MB_CASE_TITLE', 2);
}
Copyright (c) 2015-2019 Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

use Symfony\Polyfill\Mbstring as p;

if (\PHP_VERSION_ID >= 80000) {
    return require __DIR__.'/bootstrap80.php';
}

if (!function_exists('mb_convert_encoding')) {
    function mb_convert_encoding($string, $to_encoding, $from_encoding = null) { return p\Mbstring::mb_convert_encoding($string, $to_encoding, $from_encoding); }
}
if (!function_exists('mb_decode_mimeheader')) {
    function mb_decode_mimeheader($string) { return p\Mbstring::mb_decode_mimeheader($string); }
}
if (!function_exists('mb_encode_mimeheader')) {
    function mb_encode_mimeheader($string, $charset = null, $transfer_encoding = null, $newline = "\r\n", $indent = 0) { return p\Mbstring::mb_encode_mimeheader($string, $charset, $transfer_encoding, $newline, $indent); }
}
if (!function_exists('mb_decode_numericentity')) {
    function mb_decode_numericentity($string, $map, $encoding = null) { return p\Mbstring::mb_decode_numericentity($string, $map, $encoding); }
}
if (!function_exists('mb_encode_numericentity')) {
    function mb_encode_numericentity($string, $map, $encoding = null, $hex = false) { return p\Mbstring::mb_encode_numericentity($string, $map, $encoding, $hex); }
}
if (!function_exists('mb_convert_case')) {
    function mb_convert_case($string, $mode, $encoding = null) { return p\Mbstring::mb_convert_case($string, $mode, $encoding); }
}
if (!function_exists('mb_internal_encoding')) {
    function mb_internal_encoding($encoding = null) { return p\Mbstring::mb_internal_encoding($encoding); }
}
if (!function_exists('mb_language')) {
    function mb_language($language = null) { return p\Mbstring::mb_language($language); }
}
if (!function_exists('mb_list_encodings')) {
    function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); }
}
if (!function_exists('mb_encoding_aliases')) {
    function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); }
}
if (!function_exists('mb_check_encoding')) {
    function mb_check_encoding($value = null, $encoding = null) { return p\Mbstring::mb_check_encoding($value, $encoding); }
}
if (!function_exists('mb_detect_encoding')) {
    function mb_detect_encoding($string, $encodings = null, $strict = false) { return p\Mbstring::mb_detect_encoding($string, $encodings, $strict); }
}
if (!function_exists('mb_detect_order')) {
    function mb_detect_order($encoding = null) { return p\Mbstring::mb_detect_order($encoding); }
}
if (!function_exists('mb_parse_str')) {
    function mb_parse_str($string, &$result = []) { parse_str($string, $result); return (bool) $result; }
}
if (!function_exists('mb_strlen')) {
    function mb_strlen($string, $encoding = null) { return p\Mbstring::mb_strlen($string, $encoding); }
}
if (!function_exists('mb_strpos')) {
    function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strpos($haystack, $needle, $offset, $encoding); }
}
if (!function_exists('mb_strtolower')) {
    function mb_strtolower($string, $encoding = null) { return p\Mbstring::mb_strtolower($string, $encoding); }
}
if (!function_exists('mb_strtoupper')) {
    function mb_strtoupper($string, $encoding = null) { return p\Mbstring::mb_strtoupper($string, $encoding); }
}
if (!function_exists('mb_substitute_character')) {
    function mb_substitute_character($substitute_character = null) { return p\Mbstring::mb_substitute_character($substitute_character); }
}
if (!function_exists('mb_substr')) {
    function mb_substr($string, $start, $length = 2147483647, $encoding = null) { return p\Mbstring::mb_substr($string, $start, $length, $encoding); }
}
if (!function_exists('mb_stripos')) {
    function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_stripos($haystack, $needle, $offset, $encoding); }
}
if (!function_exists('mb_stristr')) {
    function mb_stristr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_stristr($haystack, $needle, $before_needle, $encoding); }
}
if (!function_exists('mb_strrchr')) {
    function mb_strrchr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrchr($haystack, $needle, $before_needle, $encoding); }
}
if (!function_exists('mb_strrichr')) {
    function mb_strrichr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrichr($haystack, $needle, $before_needle, $encoding); }
}
if (!function_exists('mb_strripos')) {
    function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strripos($haystack, $needle, $offset, $encoding); }
}
if (!function_exists('mb_strrpos')) {
    function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strrpos($haystack, $needle, $offset, $encoding); }
}
if (!function_exists('mb_strstr')) {
    function mb_strstr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strstr($haystack, $needle, $before_needle, $encoding); }
}
if (!function_exists('mb_get_info')) {
    function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); }
}
if (!function_exists('mb_http_output')) {
    function mb_http_output($encoding = null) { return p\Mbstring::mb_http_output($encoding); }
}
if (!function_exists('mb_strwidth')) {
    function mb_strwidth($string, $encoding = null) { return p\Mbstring::mb_strwidth($string, $encoding); }
}
if (!function_exists('mb_substr_count')) {
    function mb_substr_count($haystack, $needle, $encoding = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $encoding); }
}
if (!function_exists('mb_output_handler')) {
    function mb_output_handler($string, $status) { return p\Mbstring::mb_output_handler($string, $status); }
}
if (!function_exists('mb_http_input')) {
    function mb_http_input($type = null) { return p\Mbstring::mb_http_input($type); }
}

if (!function_exists('mb_convert_variables')) {
    function mb_convert_variables($to_encoding, $from_encoding, &...$vars) { return p\Mbstring::mb_convert_variables($to_encoding, $from_encoding, ...$vars); }
}

if (!function_exists('mb_ord')) {
    function mb_ord($string, $encoding = null) { return p\Mbstring::mb_ord($string, $encoding); }
}
if (!function_exists('mb_chr')) {
    function mb_chr($codepoint, $encoding = null) { return p\Mbstring::mb_chr($codepoint, $encoding); }
}
if (!function_exists('mb_scrub')) {
    function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); }
}
if (!function_exists('mb_str_split')) {
    function mb_str_split($string, $length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $length, $encoding); }
}

if (extension_loaded('mbstring')) {
    return;
}

if (!defined('MB_CASE_UPPER')) {
    define('MB_CASE_UPPER', 0);
}
if (!defined('MB_CASE_LOWER')) {
    define('MB_CASE_LOWER', 1);
}
if (!defined('MB_CASE_TITLE')) {
    define('MB_CASE_TITLE', 2);
}
<?php

// from Case_Ignorable in https://unicode.org/Public/UNIDATA/DerivedCoreProperties.txt

return '/(?<![\x{0027}\x{002E}\x{003A}\x{005E}\x{0060}\x{00A8}\x{00AD}\x{00AF}\x{00B4}\x{00B7}\x{00B8}\x{02B0}-\x{02C1}\x{02C2}-\x{02C5}\x{02C6}-\x{02D1}\x{02D2}-\x{02DF}\x{02E0}-\x{02E4}\x{02E5}-\x{02EB}\x{02EC}\x{02ED}\x{02EE}\x{02EF}-\x{02FF}\x{0300}-\x{036F}\x{0374}\x{0375}\x{037A}\x{0384}-\x{0385}\x{0387}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{0559}\x{0591}-\x{05BD}\x{05BF}\x{05C1}-\x{05C2}\x{05C4}-\x{05C5}\x{05C7}\x{05F4}\x{0600}-\x{0605}\x{0610}-\x{061A}\x{061C}\x{0640}\x{064B}-\x{065F}\x{0670}\x{06D6}-\x{06DC}\x{06DD}\x{06DF}-\x{06E4}\x{06E5}-\x{06E6}\x{06E7}-\x{06E8}\x{06EA}-\x{06ED}\x{070F}\x{0711}\x{0730}-\x{074A}\x{07A6}-\x{07B0}\x{07EB}-\x{07F3}\x{07F4}-\x{07F5}\x{07FA}\x{07FD}\x{0816}-\x{0819}\x{081A}\x{081B}-\x{0823}\x{0824}\x{0825}-\x{0827}\x{0828}\x{0829}-\x{082D}\x{0859}-\x{085B}\x{08D3}-\x{08E1}\x{08E2}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0971}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C81}\x{0CBC}\x{0CBF}\x{0CC6}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E46}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EB9}\x{0EBB}-\x{0EBC}\x{0EC6}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{10FC}\x{135D}-\x{135F}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17D7}\x{17DD}\x{180B}-\x{180D}\x{180E}\x{1843}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AA7}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1C78}-\x{1C7D}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1D2C}-\x{1D6A}\x{1D78}\x{1D9B}-\x{1DBF}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{1FBD}\x{1FBF}-\x{1FC1}\x{1FCD}-\x{1FCF}\x{1FDD}-\x{1FDF}\x{1FED}-\x{1FEF}\x{1FFD}-\x{1FFE}\x{200B}-\x{200F}\x{2018}\x{2019}\x{2024}\x{2027}\x{202A}-\x{202E}\x{2060}-\x{2064}\x{2066}-\x{206F}\x{2071}\x{207F}\x{2090}-\x{209C}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2C7C}-\x{2C7D}\x{2CEF}-\x{2CF1}\x{2D6F}\x{2D7F}\x{2DE0}-\x{2DFF}\x{2E2F}\x{3005}\x{302A}-\x{302D}\x{3031}-\x{3035}\x{303B}\x{3099}-\x{309A}\x{309B}-\x{309C}\x{309D}-\x{309E}\x{30FC}-\x{30FE}\x{A015}\x{A4F8}-\x{A4FD}\x{A60C}\x{A66F}\x{A670}-\x{A672}\x{A674}-\x{A67D}\x{A67F}\x{A69C}-\x{A69D}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A700}-\x{A716}\x{A717}-\x{A71F}\x{A720}-\x{A721}\x{A770}\x{A788}\x{A789}-\x{A78A}\x{A7F8}-\x{A7F9}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}\x{A9CF}\x{A9E5}\x{A9E6}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA70}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AADD}\x{AAEC}-\x{AAED}\x{AAF3}-\x{AAF4}\x{AAF6}\x{AB5B}\x{AB5C}-\x{AB5F}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1E}\x{FBB2}-\x{FBC1}\x{FE00}-\x{FE0F}\x{FE13}\x{FE20}-\x{FE2F}\x{FE52}\x{FE55}\x{FEFF}\x{FF07}\x{FF0E}\x{FF1A}\x{FF3E}\x{FF40}\x{FF70}\x{FF9E}-\x{FF9F}\x{FFE3}\x{FFF9}-\x{FFFB}\x{101FD}\x{102E0}\x{10376}-\x{1037A}\x{10A01}-\x{10A03}\x{10A05}-\x{10A06}\x{10A0C}-\x{10A0F}\x{10A38}-\x{10A3A}\x{10A3F}\x{10AE5}-\x{10AE6}\x{10D24}-\x{10D27}\x{10F46}-\x{10F50}\x{11001}\x{11038}-\x{11046}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{110BD}\x{110CD}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{11A01}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C3F}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16B40}-\x{16B43}\x{16F8F}-\x{16F92}\x{16F93}-\x{16F9F}\x{16FE0}-\x{16FE1}\x{1BC9D}-\x{1BC9E}\x{1BCA0}-\x{1BCA3}\x{1D167}-\x{1D169}\x{1D173}-\x{1D17A}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D242}-\x{1D244}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E8D0}-\x{1E8D6}\x{1E944}-\x{1E94A}\x{1F3FB}-\x{1F3FF}\x{E0001}\x{E0020}-\x{E007F}\x{E0100}-\x{E01EF}])(\pL)(\pL*+)/u';
<?php

return array (
  'A' => 'a',
  'B' => 'b',
  'C' => 'c',
  'D' => 'd',
  'E' => 'e',
  'F' => 'f',
  'G' => 'g',
  'H' => 'h',
  'I' => 'i',
  'J' => 'j',
  'K' => 'k',
  'L' => 'l',
  'M' => 'm',
  'N' => 'n',
  'O' => 'o',
  'P' => 'p',
  'Q' => 'q',
  'R' => 'r',
  'S' => 's',
  'T' => 't',
  'U' => 'u',
  'V' => 'v',
  'W' => 'w',
  'X' => 'x',
  'Y' => 'y',
  'Z' => 'z',
  'À' => 'à',
  'Á' => 'á',
  'Â' => 'â',
  'Ã' => 'ã',
  'Ä' => 'ä',
  'Å' => 'å',
  'Æ' => 'æ',
  'Ç' => 'ç',
  'È' => 'è',
  'É' => 'é',
  'Ê' => 'ê',
  'Ë' => 'ë',
  'Ì' => 'ì',
  'Í' => 'í',
  'Î' => 'î',
  'Ï' => 'ï',
  'Ð' => 'ð',
  'Ñ' => 'ñ',
  'Ò' => 'ò',
  'Ó' => 'ó',
  'Ô' => 'ô',
  'Õ' => 'õ',
  'Ö' => 'ö',
  'Ø' => 'ø',
  'Ù' => 'ù',
  'Ú' => 'ú',
  'Û' => 'û',
  'Ü' => 'ü',
  'Ý' => 'ý',
  'Þ' => 'þ',
  'Ā' => 'ā',
  'Ă' => 'ă',
  'Ą' => 'ą',
  'Ć' => 'ć',
  'Ĉ' => 'ĉ',
  'Ċ' => 'ċ',
  'Č' => 'č',
  'Ď' => 'ď',
  'Đ' => 'đ',
  'Ē' => 'ē',
  'Ĕ' => 'ĕ',
  'Ė' => 'ė',
  'Ę' => 'ę',
  'Ě' => 'ě',
  'Ĝ' => 'ĝ',
  'Ğ' => 'ğ',
  'Ġ' => 'ġ',
  'Ģ' => 'ģ',
  'Ĥ' => 'ĥ',
  'Ħ' => 'ħ',
  'Ĩ' => 'ĩ',
  'Ī' => 'ī',
  'Ĭ' => 'ĭ',
  'Į' => 'į',
  'İ' => 'i̇',
  'IJ' => 'ij',
  'Ĵ' => 'ĵ',
  'Ķ' => 'ķ',
  'Ĺ' => 'ĺ',
  'Ļ' => 'ļ',
  'Ľ' => 'ľ',
  'Ŀ' => 'ŀ',
  'Ł' => 'ł',
  'Ń' => 'ń',
  'Ņ' => 'ņ',
  'Ň' => 'ň',
  'Ŋ' => 'ŋ',
  'Ō' => 'ō',
  'Ŏ' => 'ŏ',
  'Ő' => 'ő',
  'Œ' => 'œ',
  'Ŕ' => 'ŕ',
  'Ŗ' => 'ŗ',
  'Ř' => 'ř',
  'Ś' => 'ś',
  'Ŝ' => 'ŝ',
  'Ş' => 'ş',
  'Š' => 'š',
  'Ţ' => 'ţ',
  'Ť' => 'ť',
  'Ŧ' => 'ŧ',
  'Ũ' => 'ũ',
  'Ū' => 'ū',
  'Ŭ' => 'ŭ',
  'Ů' => 'ů',
  'Ű' => 'ű',
  'Ų' => 'ų',
  'Ŵ' => 'ŵ',
  'Ŷ' => 'ŷ',
  'Ÿ' => 'ÿ',
  'Ź' => 'ź',
  'Ż' => 'ż',
  'Ž' => 'ž',
  'Ɓ' => 'ɓ',
  'Ƃ' => 'ƃ',
  'Ƅ' => 'ƅ',
  'Ɔ' => 'ɔ',
  'Ƈ' => 'ƈ',
  'Ɖ' => 'ɖ',
  'Ɗ' => 'ɗ',
  'Ƌ' => 'ƌ',
  'Ǝ' => 'ǝ',
  'Ə' => 'ə',
  'Ɛ' => 'ɛ',
  'Ƒ' => 'ƒ',
  'Ɠ' => 'ɠ',
  'Ɣ' => 'ɣ',
  'Ɩ' => 'ɩ',
  'Ɨ' => 'ɨ',
  'Ƙ' => 'ƙ',
  'Ɯ' => 'ɯ',
  'Ɲ' => 'ɲ',
  'Ɵ' => 'ɵ',
  'Ơ' => 'ơ',
  'Ƣ' => 'ƣ',
  'Ƥ' => 'ƥ',
  'Ʀ' => 'ʀ',
  'Ƨ' => 'ƨ',
  'Ʃ' => 'ʃ',
  'Ƭ' => 'ƭ',
  'Ʈ' => 'ʈ',
  'Ư' => 'ư',
  'Ʊ' => 'ʊ',
  'Ʋ' => 'ʋ',
  'Ƴ' => 'ƴ',
  'Ƶ' => 'ƶ',
  'Ʒ' => 'ʒ',
  'Ƹ' => 'ƹ',
  'Ƽ' => 'ƽ',
  'DŽ' => 'dž',
  'Dž' => 'dž',
  'LJ' => 'lj',
  'Lj' => 'lj',
  'NJ' => 'nj',
  'Nj' => 'nj',
  'Ǎ' => 'ǎ',
  'Ǐ' => 'ǐ',
  'Ǒ' => 'ǒ',
  'Ǔ' => 'ǔ',
  'Ǖ' => 'ǖ',
  'Ǘ' => 'ǘ',
  'Ǚ' => 'ǚ',
  'Ǜ' => 'ǜ',
  'Ǟ' => 'ǟ',
  'Ǡ' => 'ǡ',
  'Ǣ' => 'ǣ',
  'Ǥ' => 'ǥ',
  'Ǧ' => 'ǧ',
  'Ǩ' => 'ǩ',
  'Ǫ' => 'ǫ',
  'Ǭ' => 'ǭ',
  'Ǯ' => 'ǯ',
  'DZ' => 'dz',
  'Dz' => 'dz',
  'Ǵ' => 'ǵ',
  'Ƕ' => 'ƕ',
  'Ƿ' => 'ƿ',
  'Ǹ' => 'ǹ',
  'Ǻ' => 'ǻ',
  'Ǽ' => 'ǽ',
  'Ǿ' => 'ǿ',
  'Ȁ' => 'ȁ',
  'Ȃ' => 'ȃ',
  'Ȅ' => 'ȅ',
  'Ȇ' => 'ȇ',
  'Ȉ' => 'ȉ',
  'Ȋ' => 'ȋ',
  'Ȍ' => 'ȍ',
  'Ȏ' => 'ȏ',
  'Ȑ' => 'ȑ',
  'Ȓ' => 'ȓ',
  'Ȕ' => 'ȕ',
  'Ȗ' => 'ȗ',
  'Ș' => 'ș',
  'Ț' => 'ț',
  'Ȝ' => 'ȝ',
  'Ȟ' => 'ȟ',
  'Ƞ' => 'ƞ',
  'Ȣ' => 'ȣ',
  'Ȥ' => 'ȥ',
  'Ȧ' => 'ȧ',
  'Ȩ' => 'ȩ',
  'Ȫ' => 'ȫ',
  'Ȭ' => 'ȭ',
  'Ȯ' => 'ȯ',
  'Ȱ' => 'ȱ',
  'Ȳ' => 'ȳ',
  'Ⱥ' => 'ⱥ',
  'Ȼ' => 'ȼ',
  'Ƚ' => 'ƚ',
  'Ⱦ' => 'ⱦ',
  'Ɂ' => 'ɂ',
  'Ƀ' => 'ƀ',
  'Ʉ' => 'ʉ',
  'Ʌ' => 'ʌ',
  'Ɇ' => 'ɇ',
  'Ɉ' => 'ɉ',
  'Ɋ' => 'ɋ',
  'Ɍ' => 'ɍ',
  'Ɏ' => 'ɏ',
  'Ͱ' => 'ͱ',
  'Ͳ' => 'ͳ',
  'Ͷ' => 'ͷ',
  'Ϳ' => 'ϳ',
  'Ά' => 'ά',
  'Έ' => 'έ',
  'Ή' => 'ή',
  'Ί' => 'ί',
  'Ό' => 'ό',
  'Ύ' => 'ύ',
  'Ώ' => 'ώ',
  'Α' => 'α',
  'Β' => 'β',
  'Γ' => 'γ',
  'Δ' => 'δ',
  'Ε' => 'ε',
  'Ζ' => 'ζ',
  'Η' => 'η',
  'Θ' => 'θ',
  'Ι' => 'ι',
  'Κ' => 'κ',
  'Λ' => 'λ',
  'Μ' => 'μ',
  'Ν' => 'ν',
  'Ξ' => 'ξ',
  'Ο' => 'ο',
  'Π' => 'π',
  'Ρ' => 'ρ',
  'Σ' => 'σ',
  'Τ' => 'τ',
  'Υ' => 'υ',
  'Φ' => 'φ',
  'Χ' => 'χ',
  'Ψ' => 'ψ',
  'Ω' => 'ω',
  'Ϊ' => 'ϊ',
  'Ϋ' => 'ϋ',
  'Ϗ' => 'ϗ',
  'Ϙ' => 'ϙ',
  'Ϛ' => 'ϛ',
  'Ϝ' => 'ϝ',
  'Ϟ' => 'ϟ',
  'Ϡ' => 'ϡ',
  'Ϣ' => 'ϣ',
  'Ϥ' => 'ϥ',
  'Ϧ' => 'ϧ',
  'Ϩ' => 'ϩ',
  'Ϫ' => 'ϫ',
  'Ϭ' => 'ϭ',
  'Ϯ' => 'ϯ',
  'ϴ' => 'θ',
  'Ϸ' => 'ϸ',
  'Ϲ' => 'ϲ',
  'Ϻ' => 'ϻ',
  'Ͻ' => 'ͻ',
  'Ͼ' => 'ͼ',
  'Ͽ' => 'ͽ',
  'Ѐ' => 'ѐ',
  'Ё' => 'ё',
  'Ђ' => 'ђ',
  'Ѓ' => 'ѓ',
  'Є' => 'є',
  'Ѕ' => 'ѕ',
  'І' => 'і',
  'Ї' => 'ї',
  'Ј' => 'ј',
  'Љ' => 'љ',
  'Њ' => 'њ',
  'Ћ' => 'ћ',
  'Ќ' => 'ќ',
  'Ѝ' => 'ѝ',
  'Ў' => 'ў',
  'Џ' => 'џ',
  'А' => 'а',
  'Б' => 'б',
  'В' => 'в',
  'Г' => 'г',
  'Д' => 'д',
  'Е' => 'е',
  'Ж' => 'ж',
  'З' => 'з',
  'И' => 'и',
  'Й' => 'й',
  'К' => 'к',
  'Л' => 'л',
  'М' => 'м',
  'Н' => 'н',
  'О' => 'о',
  'П' => 'п',
  'Р' => 'р',
  'С' => 'с',
  'Т' => 'т',
  'У' => 'у',
  'Ф' => 'ф',
  'Х' => 'х',
  'Ц' => 'ц',
  'Ч' => 'ч',
  'Ш' => 'ш',
  'Щ' => 'щ',
  'Ъ' => 'ъ',
  'Ы' => 'ы',
  'Ь' => 'ь',
  'Э' => 'э',
  'Ю' => 'ю',
  'Я' => 'я',
  'Ѡ' => 'ѡ',
  'Ѣ' => 'ѣ',
  'Ѥ' => 'ѥ',
  'Ѧ' => 'ѧ',
  'Ѩ' => 'ѩ',
  'Ѫ' => 'ѫ',
  'Ѭ' => 'ѭ',
  'Ѯ' => 'ѯ',
  'Ѱ' => 'ѱ',
  'Ѳ' => 'ѳ',
  'Ѵ' => 'ѵ',
  'Ѷ' => 'ѷ',
  'Ѹ' => 'ѹ',
  'Ѻ' => 'ѻ',
  'Ѽ' => 'ѽ',
  'Ѿ' => 'ѿ',
  'Ҁ' => 'ҁ',
  'Ҋ' => 'ҋ',
  'Ҍ' => 'ҍ',
  'Ҏ' => 'ҏ',
  'Ґ' => 'ґ',
  'Ғ' => 'ғ',
  'Ҕ' => 'ҕ',
  'Җ' => 'җ',
  'Ҙ' => 'ҙ',
  'Қ' => 'қ',
  'Ҝ' => 'ҝ',
  'Ҟ' => 'ҟ',
  'Ҡ' => 'ҡ',
  'Ң' => 'ң',
  'Ҥ' => 'ҥ',
  'Ҧ' => 'ҧ',
  'Ҩ' => 'ҩ',
  'Ҫ' => 'ҫ',
  'Ҭ' => 'ҭ',
  'Ү' => 'ү',
  'Ұ' => 'ұ',
  'Ҳ' => 'ҳ',
  'Ҵ' => 'ҵ',
  'Ҷ' => 'ҷ',
  'Ҹ' => 'ҹ',
  'Һ' => 'һ',
  'Ҽ' => 'ҽ',
  'Ҿ' => 'ҿ',
  'Ӏ' => 'ӏ',
  'Ӂ' => 'ӂ',
  'Ӄ' => 'ӄ',
  'Ӆ' => 'ӆ',
  'Ӈ' => 'ӈ',
  'Ӊ' => 'ӊ',
  'Ӌ' => 'ӌ',
  'Ӎ' => 'ӎ',
  'Ӑ' => 'ӑ',
  'Ӓ' => 'ӓ',
  'Ӕ' => 'ӕ',
  'Ӗ' => 'ӗ',
  'Ә' => 'ә',
  'Ӛ' => 'ӛ',
  'Ӝ' => 'ӝ',
  'Ӟ' => 'ӟ',
  'Ӡ' => 'ӡ',
  'Ӣ' => 'ӣ',
  'Ӥ' => 'ӥ',
  'Ӧ' => 'ӧ',
  'Ө' => 'ө',
  'Ӫ' => 'ӫ',
  'Ӭ' => 'ӭ',
  'Ӯ' => 'ӯ',
  'Ӱ' => 'ӱ',
  'Ӳ' => 'ӳ',
  'Ӵ' => 'ӵ',
  'Ӷ' => 'ӷ',
  'Ӹ' => 'ӹ',
  'Ӻ' => 'ӻ',
  'Ӽ' => 'ӽ',
  'Ӿ' => 'ӿ',
  'Ԁ' => 'ԁ',
  'Ԃ' => 'ԃ',
  'Ԅ' => 'ԅ',
  'Ԇ' => 'ԇ',
  'Ԉ' => 'ԉ',
  'Ԋ' => 'ԋ',
  'Ԍ' => 'ԍ',
  'Ԏ' => 'ԏ',
  'Ԑ' => 'ԑ',
  'Ԓ' => 'ԓ',
  'Ԕ' => 'ԕ',
  'Ԗ' => 'ԗ',
  'Ԙ' => 'ԙ',
  'Ԛ' => 'ԛ',
  'Ԝ' => 'ԝ',
  'Ԟ' => 'ԟ',
  'Ԡ' => 'ԡ',
  'Ԣ' => 'ԣ',
  'Ԥ' => 'ԥ',
  'Ԧ' => 'ԧ',
  'Ԩ' => 'ԩ',
  'Ԫ' => 'ԫ',
  'Ԭ' => 'ԭ',
  'Ԯ' => 'ԯ',
  'Ա' => 'ա',
  'Բ' => 'բ',
  'Գ' => 'գ',
  'Դ' => 'դ',
  'Ե' => 'ե',
  'Զ' => 'զ',
  'Է' => 'է',
  'Ը' => 'ը',
  'Թ' => 'թ',
  'Ժ' => 'ժ',
  'Ի' => 'ի',
  'Լ' => 'լ',
  'Խ' => 'խ',
  'Ծ' => 'ծ',
  'Կ' => 'կ',
  'Հ' => 'հ',
  'Ձ' => 'ձ',
  'Ղ' => 'ղ',
  'Ճ' => 'ճ',
  'Մ' => 'մ',
  'Յ' => 'յ',
  'Ն' => 'ն',
  'Շ' => 'շ',
  'Ո' => 'ո',
  'Չ' => 'չ',
  'Պ' => 'պ',
  'Ջ' => 'ջ',
  'Ռ' => 'ռ',
  'Ս' => 'ս',
  'Վ' => 'վ',
  'Տ' => 'տ',
  'Ր' => 'ր',
  'Ց' => 'ց',
  'Ւ' => 'ւ',
  'Փ' => 'փ',
  'Ք' => 'ք',
  'Օ' => 'օ',
  'Ֆ' => 'ֆ',
  'Ⴀ' => 'ⴀ',
  'Ⴁ' => 'ⴁ',
  'Ⴂ' => 'ⴂ',
  'Ⴃ' => 'ⴃ',
  'Ⴄ' => 'ⴄ',
  'Ⴅ' => 'ⴅ',
  'Ⴆ' => 'ⴆ',
  'Ⴇ' => 'ⴇ',
  'Ⴈ' => 'ⴈ',
  'Ⴉ' => 'ⴉ',
  'Ⴊ' => 'ⴊ',
  'Ⴋ' => 'ⴋ',
  'Ⴌ' => 'ⴌ',
  'Ⴍ' => 'ⴍ',
  'Ⴎ' => 'ⴎ',
  'Ⴏ' => 'ⴏ',
  'Ⴐ' => 'ⴐ',
  'Ⴑ' => 'ⴑ',
  'Ⴒ' => 'ⴒ',
  'Ⴓ' => 'ⴓ',
  'Ⴔ' => 'ⴔ',
  'Ⴕ' => 'ⴕ',
  'Ⴖ' => 'ⴖ',
  'Ⴗ' => 'ⴗ',
  'Ⴘ' => 'ⴘ',
  'Ⴙ' => 'ⴙ',
  'Ⴚ' => 'ⴚ',
  'Ⴛ' => 'ⴛ',
  'Ⴜ' => 'ⴜ',
  'Ⴝ' => 'ⴝ',
  'Ⴞ' => 'ⴞ',
  'Ⴟ' => 'ⴟ',
  'Ⴠ' => 'ⴠ',
  'Ⴡ' => 'ⴡ',
  'Ⴢ' => 'ⴢ',
  'Ⴣ' => 'ⴣ',
  'Ⴤ' => 'ⴤ',
  'Ⴥ' => 'ⴥ',
  'Ⴧ' => 'ⴧ',
  'Ⴭ' => 'ⴭ',
  'Ꭰ' => 'ꭰ',
  'Ꭱ' => 'ꭱ',
  'Ꭲ' => 'ꭲ',
  'Ꭳ' => 'ꭳ',
  'Ꭴ' => 'ꭴ',
  'Ꭵ' => 'ꭵ',
  'Ꭶ' => 'ꭶ',
  'Ꭷ' => 'ꭷ',
  'Ꭸ' => 'ꭸ',
  'Ꭹ' => 'ꭹ',
  'Ꭺ' => 'ꭺ',
  'Ꭻ' => 'ꭻ',
  'Ꭼ' => 'ꭼ',
  'Ꭽ' => 'ꭽ',
  'Ꭾ' => 'ꭾ',
  'Ꭿ' => 'ꭿ',
  'Ꮀ' => 'ꮀ',
  'Ꮁ' => 'ꮁ',
  'Ꮂ' => 'ꮂ',
  'Ꮃ' => 'ꮃ',
  'Ꮄ' => 'ꮄ',
  'Ꮅ' => 'ꮅ',
  'Ꮆ' => 'ꮆ',
  'Ꮇ' => 'ꮇ',
  'Ꮈ' => 'ꮈ',
  'Ꮉ' => 'ꮉ',
  'Ꮊ' => 'ꮊ',
  'Ꮋ' => 'ꮋ',
  'Ꮌ' => 'ꮌ',
  'Ꮍ' => 'ꮍ',
  'Ꮎ' => 'ꮎ',
  'Ꮏ' => 'ꮏ',
  'Ꮐ' => 'ꮐ',
  'Ꮑ' => 'ꮑ',
  'Ꮒ' => 'ꮒ',
  'Ꮓ' => 'ꮓ',
  'Ꮔ' => 'ꮔ',
  'Ꮕ' => 'ꮕ',
  'Ꮖ' => 'ꮖ',
  'Ꮗ' => 'ꮗ',
  'Ꮘ' => 'ꮘ',
  'Ꮙ' => 'ꮙ',
  'Ꮚ' => 'ꮚ',
  'Ꮛ' => 'ꮛ',
  'Ꮜ' => 'ꮜ',
  'Ꮝ' => 'ꮝ',
  'Ꮞ' => 'ꮞ',
  'Ꮟ' => 'ꮟ',
  'Ꮠ' => 'ꮠ',
  'Ꮡ' => 'ꮡ',
  'Ꮢ' => 'ꮢ',
  'Ꮣ' => 'ꮣ',
  'Ꮤ' => 'ꮤ',
  'Ꮥ' => 'ꮥ',
  'Ꮦ' => 'ꮦ',
  'Ꮧ' => 'ꮧ',
  'Ꮨ' => 'ꮨ',
  'Ꮩ' => 'ꮩ',
  'Ꮪ' => 'ꮪ',
  'Ꮫ' => 'ꮫ',
  'Ꮬ' => 'ꮬ',
  'Ꮭ' => 'ꮭ',
  'Ꮮ' => 'ꮮ',
  'Ꮯ' => 'ꮯ',
  'Ꮰ' => 'ꮰ',
  'Ꮱ' => 'ꮱ',
  'Ꮲ' => 'ꮲ',
  'Ꮳ' => 'ꮳ',
  'Ꮴ' => 'ꮴ',
  'Ꮵ' => 'ꮵ',
  'Ꮶ' => 'ꮶ',
  'Ꮷ' => 'ꮷ',
  'Ꮸ' => 'ꮸ',
  'Ꮹ' => 'ꮹ',
  'Ꮺ' => 'ꮺ',
  'Ꮻ' => 'ꮻ',
  'Ꮼ' => 'ꮼ',
  'Ꮽ' => 'ꮽ',
  'Ꮾ' => 'ꮾ',
  'Ꮿ' => 'ꮿ',
  'Ᏸ' => 'ᏸ',
  'Ᏹ' => 'ᏹ',
  'Ᏺ' => 'ᏺ',
  'Ᏻ' => 'ᏻ',
  'Ᏼ' => 'ᏼ',
  'Ᏽ' => 'ᏽ',
  'Ა' => 'ა',
  'Ბ' => 'ბ',
  'Გ' => 'გ',
  'Დ' => 'დ',
  'Ე' => 'ე',
  'Ვ' => 'ვ',
  'Ზ' => 'ზ',
  'Თ' => 'თ',
  'Ი' => 'ი',
  'Კ' => 'კ',
  'Ლ' => 'ლ',
  'Მ' => 'მ',
  'Ნ' => 'ნ',
  'Ო' => 'ო',
  'Პ' => 'პ',
  'Ჟ' => 'ჟ',
  'Რ' => 'რ',
  'Ს' => 'ს',
  'Ტ' => 'ტ',
  'Უ' => 'უ',
  'Ფ' => 'ფ',
  'Ქ' => 'ქ',
  'Ღ' => 'ღ',
  'Ყ' => 'ყ',
  'Შ' => 'შ',
  'Ჩ' => 'ჩ',
  'Ც' => 'ც',
  'Ძ' => 'ძ',
  'Წ' => 'წ',
  'Ჭ' => 'ჭ',
  'Ხ' => 'ხ',
  'Ჯ' => 'ჯ',
  'Ჰ' => 'ჰ',
  'Ჱ' => 'ჱ',
  'Ჲ' => 'ჲ',
  'Ჳ' => 'ჳ',
  'Ჴ' => 'ჴ',
  'Ჵ' => 'ჵ',
  'Ჶ' => 'ჶ',
  'Ჷ' => 'ჷ',
  'Ჸ' => 'ჸ',
  'Ჹ' => 'ჹ',
  'Ჺ' => 'ჺ',
  'Ჽ' => 'ჽ',
  'Ჾ' => 'ჾ',
  'Ჿ' => 'ჿ',
  'Ḁ' => 'ḁ',
  'Ḃ' => 'ḃ',
  'Ḅ' => 'ḅ',
  'Ḇ' => 'ḇ',
  'Ḉ' => 'ḉ',
  'Ḋ' => 'ḋ',
  'Ḍ' => 'ḍ',
  'Ḏ' => 'ḏ',
  'Ḑ' => 'ḑ',
  'Ḓ' => 'ḓ',
  'Ḕ' => 'ḕ',
  'Ḗ' => 'ḗ',
  'Ḙ' => 'ḙ',
  'Ḛ' => 'ḛ',
  'Ḝ' => 'ḝ',
  'Ḟ' => 'ḟ',
  'Ḡ' => 'ḡ',
  'Ḣ' => 'ḣ',
  'Ḥ' => 'ḥ',
  'Ḧ' => 'ḧ',
  'Ḩ' => 'ḩ',
  'Ḫ' => 'ḫ',
  'Ḭ' => 'ḭ',
  'Ḯ' => 'ḯ',
  'Ḱ' => 'ḱ',
  'Ḳ' => 'ḳ',
  'Ḵ' => 'ḵ',
  'Ḷ' => 'ḷ',
  'Ḹ' => 'ḹ',
  'Ḻ' => 'ḻ',
  'Ḽ' => 'ḽ',
  'Ḿ' => 'ḿ',
  'Ṁ' => 'ṁ',
  'Ṃ' => 'ṃ',
  'Ṅ' => 'ṅ',
  'Ṇ' => 'ṇ',
  'Ṉ' => 'ṉ',
  'Ṋ' => 'ṋ',
  'Ṍ' => 'ṍ',
  'Ṏ' => 'ṏ',
  'Ṑ' => 'ṑ',
  'Ṓ' => 'ṓ',
  'Ṕ' => 'ṕ',
  'Ṗ' => 'ṗ',
  'Ṙ' => 'ṙ',
  'Ṛ' => 'ṛ',
  'Ṝ' => 'ṝ',
  'Ṟ' => 'ṟ',
  'Ṡ' => 'ṡ',
  'Ṣ' => 'ṣ',
  'Ṥ' => 'ṥ',
  'Ṧ' => 'ṧ',
  'Ṩ' => 'ṩ',
  'Ṫ' => 'ṫ',
  'Ṭ' => 'ṭ',
  'Ṯ' => 'ṯ',
  'Ṱ' => 'ṱ',
  'Ṳ' => 'ṳ',
  'Ṵ' => 'ṵ',
  'Ṷ' => 'ṷ',
  'Ṹ' => 'ṹ',
  'Ṻ' => 'ṻ',
  'Ṽ' => 'ṽ',
  'Ṿ' => 'ṿ',
  'Ẁ' => 'ẁ',
  'Ẃ' => 'ẃ',
  'Ẅ' => 'ẅ',
  'Ẇ' => 'ẇ',
  'Ẉ' => 'ẉ',
  'Ẋ' => 'ẋ',
  'Ẍ' => 'ẍ',
  'Ẏ' => 'ẏ',
  'Ẑ' => 'ẑ',
  'Ẓ' => 'ẓ',
  'Ẕ' => 'ẕ',
  'ẞ' => 'ß',
  'Ạ' => 'ạ',
  'Ả' => 'ả',
  'Ấ' => 'ấ',
  'Ầ' => 'ầ',
  'Ẩ' => 'ẩ',
  'Ẫ' => 'ẫ',
  'Ậ' => 'ậ',
  'Ắ' => 'ắ',
  'Ằ' => 'ằ',
  'Ẳ' => 'ẳ',
  'Ẵ' => 'ẵ',
  'Ặ' => 'ặ',
  'Ẹ' => 'ẹ',
  'Ẻ' => 'ẻ',
  'Ẽ' => 'ẽ',
  'Ế' => 'ế',
  'Ề' => 'ề',
  'Ể' => 'ể',
  'Ễ' => 'ễ',
  'Ệ' => 'ệ',
  'Ỉ' => 'ỉ',
  'Ị' => 'ị',
  'Ọ' => 'ọ',
  'Ỏ' => 'ỏ',
  'Ố' => 'ố',
  'Ồ' => 'ồ',
  'Ổ' => 'ổ',
  'Ỗ' => 'ỗ',
  'Ộ' => 'ộ',
  'Ớ' => 'ớ',
  'Ờ' => 'ờ',
  'Ở' => 'ở',
  'Ỡ' => 'ỡ',
  'Ợ' => 'ợ',
  'Ụ' => 'ụ',
  'Ủ' => 'ủ',
  'Ứ' => 'ứ',
  'Ừ' => 'ừ',
  'Ử' => 'ử',
  'Ữ' => 'ữ',
  'Ự' => 'ự',
  'Ỳ' => 'ỳ',
  'Ỵ' => 'ỵ',
  'Ỷ' => 'ỷ',
  'Ỹ' => 'ỹ',
  'Ỻ' => 'ỻ',
  'Ỽ' => 'ỽ',
  'Ỿ' => 'ỿ',
  'Ἀ' => 'ἀ',
  'Ἁ' => 'ἁ',
  'Ἂ' => 'ἂ',
  'Ἃ' => 'ἃ',
  'Ἄ' => 'ἄ',
  'Ἅ' => 'ἅ',
  'Ἆ' => 'ἆ',
  'Ἇ' => 'ἇ',
  'Ἐ' => 'ἐ',
  'Ἑ' => 'ἑ',
  'Ἒ' => 'ἒ',
  'Ἓ' => 'ἓ',
  'Ἔ' => 'ἔ',
  'Ἕ' => 'ἕ',
  'Ἠ' => 'ἠ',
  'Ἡ' => 'ἡ',
  'Ἢ' => 'ἢ',
  'Ἣ' => 'ἣ',
  'Ἤ' => 'ἤ',
  'Ἥ' => 'ἥ',
  'Ἦ' => 'ἦ',
  'Ἧ' => 'ἧ',
  'Ἰ' => 'ἰ',
  'Ἱ' => 'ἱ',
  'Ἲ' => 'ἲ',
  'Ἳ' => 'ἳ',
  'Ἴ' => 'ἴ',
  'Ἵ' => 'ἵ',
  'Ἶ' => 'ἶ',
  'Ἷ' => 'ἷ',
  'Ὀ' => 'ὀ',
  'Ὁ' => 'ὁ',
  'Ὂ' => 'ὂ',
  'Ὃ' => 'ὃ',
  'Ὄ' => 'ὄ',
  'Ὅ' => 'ὅ',
  'Ὑ' => 'ὑ',
  'Ὓ' => 'ὓ',
  'Ὕ' => 'ὕ',
  'Ὗ' => 'ὗ',
  'Ὠ' => 'ὠ',
  'Ὡ' => 'ὡ',
  'Ὢ' => 'ὢ',
  'Ὣ' => 'ὣ',
  'Ὤ' => 'ὤ',
  'Ὥ' => 'ὥ',
  'Ὦ' => 'ὦ',
  'Ὧ' => 'ὧ',
  'ᾈ' => 'ᾀ',
  'ᾉ' => 'ᾁ',
  'ᾊ' => 'ᾂ',
  'ᾋ' => 'ᾃ',
  'ᾌ' => 'ᾄ',
  'ᾍ' => 'ᾅ',
  'ᾎ' => 'ᾆ',
  'ᾏ' => 'ᾇ',
  'ᾘ' => 'ᾐ',
  'ᾙ' => 'ᾑ',
  'ᾚ' => 'ᾒ',
  'ᾛ' => 'ᾓ',
  'ᾜ' => 'ᾔ',
  'ᾝ' => 'ᾕ',
  'ᾞ' => 'ᾖ',
  'ᾟ' => 'ᾗ',
  'ᾨ' => 'ᾠ',
  'ᾩ' => 'ᾡ',
  'ᾪ' => 'ᾢ',
  'ᾫ' => 'ᾣ',
  'ᾬ' => 'ᾤ',
  'ᾭ' => 'ᾥ',
  'ᾮ' => 'ᾦ',
  'ᾯ' => 'ᾧ',
  'Ᾰ' => 'ᾰ',
  'Ᾱ' => 'ᾱ',
  'Ὰ' => 'ὰ',
  'Ά' => 'ά',
  'ᾼ' => 'ᾳ',
  'Ὲ' => 'ὲ',
  'Έ' => 'έ',
  'Ὴ' => 'ὴ',
  'Ή' => 'ή',
  'ῌ' => 'ῃ',
  'Ῐ' => 'ῐ',
  'Ῑ' => 'ῑ',
  'Ὶ' => 'ὶ',
  'Ί' => 'ί',
  'Ῠ' => 'ῠ',
  'Ῡ' => 'ῡ',
  'Ὺ' => 'ὺ',
  'Ύ' => 'ύ',
  'Ῥ' => 'ῥ',
  'Ὸ' => 'ὸ',
  'Ό' => 'ό',
  'Ὼ' => 'ὼ',
  'Ώ' => 'ώ',
  'ῼ' => 'ῳ',
  'Ω' => 'ω',
  'K' => 'k',
  'Å' => 'å',
  'Ⅎ' => 'ⅎ',
  'Ⅰ' => 'ⅰ',
  'Ⅱ' => 'ⅱ',
  'Ⅲ' => 'ⅲ',
  'Ⅳ' => 'ⅳ',
  'Ⅴ' => 'ⅴ',
  'Ⅵ' => 'ⅵ',
  'Ⅶ' => 'ⅶ',
  'Ⅷ' => 'ⅷ',
  'Ⅸ' => 'ⅸ',
  'Ⅹ' => 'ⅹ',
  'Ⅺ' => 'ⅺ',
  'Ⅻ' => 'ⅻ',
  'Ⅼ' => 'ⅼ',
  'Ⅽ' => 'ⅽ',
  'Ⅾ' => 'ⅾ',
  'Ⅿ' => 'ⅿ',
  'Ↄ' => 'ↄ',
  'Ⓐ' => 'ⓐ',
  'Ⓑ' => 'ⓑ',
  'Ⓒ' => 'ⓒ',
  'Ⓓ' => 'ⓓ',
  'Ⓔ' => 'ⓔ',
  'Ⓕ' => 'ⓕ',
  'Ⓖ' => 'ⓖ',
  'Ⓗ' => 'ⓗ',
  'Ⓘ' => 'ⓘ',
  'Ⓙ' => 'ⓙ',
  'Ⓚ' => 'ⓚ',
  'Ⓛ' => 'ⓛ',
  'Ⓜ' => 'ⓜ',
  'Ⓝ' => 'ⓝ',
  'Ⓞ' => 'ⓞ',
  'Ⓟ' => 'ⓟ',
  'Ⓠ' => 'ⓠ',
  'Ⓡ' => 'ⓡ',
  'Ⓢ' => 'ⓢ',
  'Ⓣ' => 'ⓣ',
  'Ⓤ' => 'ⓤ',
  'Ⓥ' => 'ⓥ',
  'Ⓦ' => 'ⓦ',
  'Ⓧ' => 'ⓧ',
  'Ⓨ' => 'ⓨ',
  'Ⓩ' => 'ⓩ',
  'Ⰰ' => 'ⰰ',
  'Ⰱ' => 'ⰱ',
  'Ⰲ' => 'ⰲ',
  'Ⰳ' => 'ⰳ',
  'Ⰴ' => 'ⰴ',
  'Ⰵ' => 'ⰵ',
  'Ⰶ' => 'ⰶ',
  'Ⰷ' => 'ⰷ',
  'Ⰸ' => 'ⰸ',
  'Ⰹ' => 'ⰹ',
  'Ⰺ' => 'ⰺ',
  'Ⰻ' => 'ⰻ',
  'Ⰼ' => 'ⰼ',
  'Ⰽ' => 'ⰽ',
  'Ⰾ' => 'ⰾ',
  'Ⰿ' => 'ⰿ',
  'Ⱀ' => 'ⱀ',
  'Ⱁ' => 'ⱁ',
  'Ⱂ' => 'ⱂ',
  'Ⱃ' => 'ⱃ',
  'Ⱄ' => 'ⱄ',
  'Ⱅ' => 'ⱅ',
  'Ⱆ' => 'ⱆ',
  'Ⱇ' => 'ⱇ',
  'Ⱈ' => 'ⱈ',
  'Ⱉ' => 'ⱉ',
  'Ⱊ' => 'ⱊ',
  'Ⱋ' => 'ⱋ',
  'Ⱌ' => 'ⱌ',
  'Ⱍ' => 'ⱍ',
  'Ⱎ' => 'ⱎ',
  'Ⱏ' => 'ⱏ',
  'Ⱐ' => 'ⱐ',
  'Ⱑ' => 'ⱑ',
  'Ⱒ' => 'ⱒ',
  'Ⱓ' => 'ⱓ',
  'Ⱔ' => 'ⱔ',
  'Ⱕ' => 'ⱕ',
  'Ⱖ' => 'ⱖ',
  'Ⱗ' => 'ⱗ',
  'Ⱘ' => 'ⱘ',
  'Ⱙ' => 'ⱙ',
  'Ⱚ' => 'ⱚ',
  'Ⱛ' => 'ⱛ',
  'Ⱜ' => 'ⱜ',
  'Ⱝ' => 'ⱝ',
  'Ⱞ' => 'ⱞ',
  'Ⱡ' => 'ⱡ',
  'Ɫ' => 'ɫ',
  'Ᵽ' => 'ᵽ',
  'Ɽ' => 'ɽ',
  'Ⱨ' => 'ⱨ',
  'Ⱪ' => 'ⱪ',
  'Ⱬ' => 'ⱬ',
  'Ɑ' => 'ɑ',
  'Ɱ' => 'ɱ',
  'Ɐ' => 'ɐ',
  'Ɒ' => 'ɒ',
  'Ⱳ' => 'ⱳ',
  'Ⱶ' => 'ⱶ',
  'Ȿ' => 'ȿ',
  'Ɀ' => 'ɀ',
  'Ⲁ' => 'ⲁ',
  'Ⲃ' => 'ⲃ',
  'Ⲅ' => 'ⲅ',
  'Ⲇ' => 'ⲇ',
  'Ⲉ' => 'ⲉ',
  'Ⲋ' => 'ⲋ',
  'Ⲍ' => 'ⲍ',
  'Ⲏ' => 'ⲏ',
  'Ⲑ' => 'ⲑ',
  'Ⲓ' => 'ⲓ',
  'Ⲕ' => 'ⲕ',
  'Ⲗ' => 'ⲗ',
  'Ⲙ' => 'ⲙ',
  'Ⲛ' => 'ⲛ',
  'Ⲝ' => 'ⲝ',
  'Ⲟ' => 'ⲟ',
  'Ⲡ' => 'ⲡ',
  'Ⲣ' => 'ⲣ',
  'Ⲥ' => 'ⲥ',
  'Ⲧ' => 'ⲧ',
  'Ⲩ' => 'ⲩ',
  'Ⲫ' => 'ⲫ',
  'Ⲭ' => 'ⲭ',
  'Ⲯ' => 'ⲯ',
  'Ⲱ' => 'ⲱ',
  'Ⲳ' => 'ⲳ',
  'Ⲵ' => 'ⲵ',
  'Ⲷ' => 'ⲷ',
  'Ⲹ' => 'ⲹ',
  'Ⲻ' => 'ⲻ',
  'Ⲽ' => 'ⲽ',
  'Ⲿ' => 'ⲿ',
  'Ⳁ' => 'ⳁ',
  'Ⳃ' => 'ⳃ',
  'Ⳅ' => 'ⳅ',
  'Ⳇ' => 'ⳇ',
  'Ⳉ' => 'ⳉ',
  'Ⳋ' => 'ⳋ',
  'Ⳍ' => 'ⳍ',
  'Ⳏ' => 'ⳏ',
  'Ⳑ' => 'ⳑ',
  'Ⳓ' => 'ⳓ',
  'Ⳕ' => 'ⳕ',
  'Ⳗ' => 'ⳗ',
  'Ⳙ' => 'ⳙ',
  'Ⳛ' => 'ⳛ',
  'Ⳝ' => 'ⳝ',
  'Ⳟ' => 'ⳟ',
  'Ⳡ' => 'ⳡ',
  'Ⳣ' => 'ⳣ',
  'Ⳬ' => 'ⳬ',
  'Ⳮ' => 'ⳮ',
  'Ⳳ' => 'ⳳ',
  'Ꙁ' => 'ꙁ',
  'Ꙃ' => 'ꙃ',
  'Ꙅ' => 'ꙅ',
  'Ꙇ' => 'ꙇ',
  'Ꙉ' => 'ꙉ',
  'Ꙋ' => 'ꙋ',
  'Ꙍ' => 'ꙍ',
  'Ꙏ' => 'ꙏ',
  'Ꙑ' => 'ꙑ',
  'Ꙓ' => 'ꙓ',
  'Ꙕ' => 'ꙕ',
  'Ꙗ' => 'ꙗ',
  'Ꙙ' => 'ꙙ',
  'Ꙛ' => 'ꙛ',
  'Ꙝ' => 'ꙝ',
  'Ꙟ' => 'ꙟ',
  'Ꙡ' => 'ꙡ',
  'Ꙣ' => 'ꙣ',
  'Ꙥ' => 'ꙥ',
  'Ꙧ' => 'ꙧ',
  'Ꙩ' => 'ꙩ',
  'Ꙫ' => 'ꙫ',
  'Ꙭ' => 'ꙭ',
  'Ꚁ' => 'ꚁ',
  'Ꚃ' => 'ꚃ',
  'Ꚅ' => 'ꚅ',
  'Ꚇ' => 'ꚇ',
  'Ꚉ' => 'ꚉ',
  'Ꚋ' => 'ꚋ',
  'Ꚍ' => 'ꚍ',
  'Ꚏ' => 'ꚏ',
  'Ꚑ' => 'ꚑ',
  'Ꚓ' => 'ꚓ',
  'Ꚕ' => 'ꚕ',
  'Ꚗ' => 'ꚗ',
  'Ꚙ' => 'ꚙ',
  'Ꚛ' => 'ꚛ',
  'Ꜣ' => 'ꜣ',
  'Ꜥ' => 'ꜥ',
  'Ꜧ' => 'ꜧ',
  'Ꜩ' => 'ꜩ',
  'Ꜫ' => 'ꜫ',
  'Ꜭ' => 'ꜭ',
  'Ꜯ' => 'ꜯ',
  'Ꜳ' => 'ꜳ',
  'Ꜵ' => 'ꜵ',
  'Ꜷ' => 'ꜷ',
  'Ꜹ' => 'ꜹ',
  'Ꜻ' => 'ꜻ',
  'Ꜽ' => 'ꜽ',
  'Ꜿ' => 'ꜿ',
  'Ꝁ' => 'ꝁ',
  'Ꝃ' => 'ꝃ',
  'Ꝅ' => 'ꝅ',
  'Ꝇ' => 'ꝇ',
  'Ꝉ' => 'ꝉ',
  'Ꝋ' => 'ꝋ',
  'Ꝍ' => 'ꝍ',
  'Ꝏ' => 'ꝏ',
  'Ꝑ' => 'ꝑ',
  'Ꝓ' => 'ꝓ',
  'Ꝕ' => 'ꝕ',
  'Ꝗ' => 'ꝗ',
  'Ꝙ' => 'ꝙ',
  'Ꝛ' => 'ꝛ',
  'Ꝝ' => 'ꝝ',
  'Ꝟ' => 'ꝟ',
  'Ꝡ' => 'ꝡ',
  'Ꝣ' => 'ꝣ',
  'Ꝥ' => 'ꝥ',
  'Ꝧ' => 'ꝧ',
  'Ꝩ' => 'ꝩ',
  'Ꝫ' => 'ꝫ',
  'Ꝭ' => 'ꝭ',
  'Ꝯ' => 'ꝯ',
  'Ꝺ' => 'ꝺ',
  'Ꝼ' => 'ꝼ',
  'Ᵹ' => 'ᵹ',
  'Ꝿ' => 'ꝿ',
  'Ꞁ' => 'ꞁ',
  'Ꞃ' => 'ꞃ',
  'Ꞅ' => 'ꞅ',
  'Ꞇ' => 'ꞇ',
  'Ꞌ' => 'ꞌ',
  'Ɥ' => 'ɥ',
  'Ꞑ' => 'ꞑ',
  'Ꞓ' => 'ꞓ',
  'Ꞗ' => 'ꞗ',
  'Ꞙ' => 'ꞙ',
  'Ꞛ' => 'ꞛ',
  'Ꞝ' => 'ꞝ',
  'Ꞟ' => 'ꞟ',
  'Ꞡ' => 'ꞡ',
  'Ꞣ' => 'ꞣ',
  'Ꞥ' => 'ꞥ',
  'Ꞧ' => 'ꞧ',
  'Ꞩ' => 'ꞩ',
  'Ɦ' => 'ɦ',
  'Ɜ' => 'ɜ',
  'Ɡ' => 'ɡ',
  'Ɬ' => 'ɬ',
  'Ɪ' => 'ɪ',
  'Ʞ' => 'ʞ',
  'Ʇ' => 'ʇ',
  'Ʝ' => 'ʝ',
  'Ꭓ' => 'ꭓ',
  'Ꞵ' => 'ꞵ',
  'Ꞷ' => 'ꞷ',
  'Ꞹ' => 'ꞹ',
  'Ꞻ' => 'ꞻ',
  'Ꞽ' => 'ꞽ',
  'Ꞿ' => 'ꞿ',
  'Ꟃ' => 'ꟃ',
  'Ꞔ' => 'ꞔ',
  'Ʂ' => 'ʂ',
  'Ᶎ' => 'ᶎ',
  'Ꟈ' => 'ꟈ',
  'Ꟊ' => 'ꟊ',
  'Ꟶ' => 'ꟶ',
  'A' => 'a',
  'B' => 'b',
  'C' => 'c',
  'D' => 'd',
  'E' => 'e',
  'F' => 'f',
  'G' => 'g',
  'H' => 'h',
  'I' => 'i',
  'J' => 'j',
  'K' => 'k',
  'L' => 'l',
  'M' => 'm',
  'N' => 'n',
  'O' => 'o',
  'P' => 'p',
  'Q' => 'q',
  'R' => 'r',
  'S' => 's',
  'T' => 't',
  'U' => 'u',
  'V' => 'v',
  'W' => 'w',
  'X' => 'x',
  'Y' => 'y',
  'Z' => 'z',
  '𐐀' => '𐐨',
  '𐐁' => '𐐩',
  '𐐂' => '𐐪',
  '𐐃' => '𐐫',
  '𐐄' => '𐐬',
  '𐐅' => '𐐭',
  '𐐆' => '𐐮',
  '𐐇' => '𐐯',
  '𐐈' => '𐐰',
  '𐐉' => '𐐱',
  '𐐊' => '𐐲',
  '𐐋' => '𐐳',
  '𐐌' => '𐐴',
  '𐐍' => '𐐵',
  '𐐎' => '𐐶',
  '𐐏' => '𐐷',
  '𐐐' => '𐐸',
  '𐐑' => '𐐹',
  '𐐒' => '𐐺',
  '𐐓' => '𐐻',
  '𐐔' => '𐐼',
  '𐐕' => '𐐽',
  '𐐖' => '𐐾',
  '𐐗' => '𐐿',
  '𐐘' => '𐑀',
  '𐐙' => '𐑁',
  '𐐚' => '𐑂',
  '𐐛' => '𐑃',
  '𐐜' => '𐑄',
  '𐐝' => '𐑅',
  '𐐞' => '𐑆',
  '𐐟' => '𐑇',
  '𐐠' => '𐑈',
  '𐐡' => '𐑉',
  '𐐢' => '𐑊',
  '𐐣' => '𐑋',
  '𐐤' => '𐑌',
  '𐐥' => '𐑍',
  '𐐦' => '𐑎',
  '𐐧' => '𐑏',
  '𐒰' => '𐓘',
  '𐒱' => '𐓙',
  '𐒲' => '𐓚',
  '𐒳' => '𐓛',
  '𐒴' => '𐓜',
  '𐒵' => '𐓝',
  '𐒶' => '𐓞',
  '𐒷' => '𐓟',
  '𐒸' => '𐓠',
  '𐒹' => '𐓡',
  '𐒺' => '𐓢',
  '𐒻' => '𐓣',
  '𐒼' => '𐓤',
  '𐒽' => '𐓥',
  '𐒾' => '𐓦',
  '𐒿' => '𐓧',
  '𐓀' => '𐓨',
  '𐓁' => '𐓩',
  '𐓂' => '𐓪',
  '𐓃' => '𐓫',
  '𐓄' => '𐓬',
  '𐓅' => '𐓭',
  '𐓆' => '𐓮',
  '𐓇' => '𐓯',
  '𐓈' => '𐓰',
  '𐓉' => '𐓱',
  '𐓊' => '𐓲',
  '𐓋' => '𐓳',
  '𐓌' => '𐓴',
  '𐓍' => '𐓵',
  '𐓎' => '𐓶',
  '𐓏' => '𐓷',
  '𐓐' => '𐓸',
  '𐓑' => '𐓹',
  '𐓒' => '𐓺',
  '𐓓' => '𐓻',
  '𐲀' => '𐳀',
  '𐲁' => '𐳁',
  '𐲂' => '𐳂',
  '𐲃' => '𐳃',
  '𐲄' => '𐳄',
  '𐲅' => '𐳅',
  '𐲆' => '𐳆',
  '𐲇' => '𐳇',
  '𐲈' => '𐳈',
  '𐲉' => '𐳉',
  '𐲊' => '𐳊',
  '𐲋' => '𐳋',
  '𐲌' => '𐳌',
  '𐲍' => '𐳍',
  '𐲎' => '𐳎',
  '𐲏' => '𐳏',
  '𐲐' => '𐳐',
  '𐲑' => '𐳑',
  '𐲒' => '𐳒',
  '𐲓' => '𐳓',
  '𐲔' => '𐳔',
  '𐲕' => '𐳕',
  '𐲖' => '𐳖',
  '𐲗' => '𐳗',
  '𐲘' => '𐳘',
  '𐲙' => '𐳙',
  '𐲚' => '𐳚',
  '𐲛' => '𐳛',
  '𐲜' => '𐳜',
  '𐲝' => '𐳝',
  '𐲞' => '𐳞',
  '𐲟' => '𐳟',
  '𐲠' => '𐳠',
  '𐲡' => '𐳡',
  '𐲢' => '𐳢',
  '𐲣' => '𐳣',
  '𐲤' => '𐳤',
  '𐲥' => '𐳥',
  '𐲦' => '𐳦',
  '𐲧' => '𐳧',
  '𐲨' => '𐳨',
  '𐲩' => '𐳩',
  '𐲪' => '𐳪',
  '𐲫' => '𐳫',
  '𐲬' => '𐳬',
  '𐲭' => '𐳭',
  '𐲮' => '𐳮',
  '𐲯' => '𐳯',
  '𐲰' => '𐳰',
  '𐲱' => '𐳱',
  '𐲲' => '𐳲',
  '𑢠' => '𑣀',
  '𑢡' => '𑣁',
  '𑢢' => '𑣂',
  '𑢣' => '𑣃',
  '𑢤' => '𑣄',
  '𑢥' => '𑣅',
  '𑢦' => '𑣆',
  '𑢧' => '𑣇',
  '𑢨' => '𑣈',
  '𑢩' => '𑣉',
  '𑢪' => '𑣊',
  '𑢫' => '𑣋',
  '𑢬' => '𑣌',
  '𑢭' => '𑣍',
  '𑢮' => '𑣎',
  '𑢯' => '𑣏',
  '𑢰' => '𑣐',
  '𑢱' => '𑣑',
  '𑢲' => '𑣒',
  '𑢳' => '𑣓',
  '𑢴' => '𑣔',
  '𑢵' => '𑣕',
  '𑢶' => '𑣖',
  '𑢷' => '𑣗',
  '𑢸' => '𑣘',
  '𑢹' => '𑣙',
  '𑢺' => '𑣚',
  '𑢻' => '𑣛',
  '𑢼' => '𑣜',
  '𑢽' => '𑣝',
  '𑢾' => '𑣞',
  '𑢿' => '𑣟',
  '𖹀' => '𖹠',
  '𖹁' => '𖹡',
  '𖹂' => '𖹢',
  '𖹃' => '𖹣',
  '𖹄' => '𖹤',
  '𖹅' => '𖹥',
  '𖹆' => '𖹦',
  '𖹇' => '𖹧',
  '𖹈' => '𖹨',
  '𖹉' => '𖹩',
  '𖹊' => '𖹪',
  '𖹋' => '𖹫',
  '𖹌' => '𖹬',
  '𖹍' => '𖹭',
  '𖹎' => '𖹮',
  '𖹏' => '𖹯',
  '𖹐' => '𖹰',
  '𖹑' => '𖹱',
  '𖹒' => '𖹲',
  '𖹓' => '𖹳',
  '𖹔' => '𖹴',
  '𖹕' => '𖹵',
  '𖹖' => '𖹶',
  '𖹗' => '𖹷',
  '𖹘' => '𖹸',
  '𖹙' => '𖹹',
  '𖹚' => '𖹺',
  '𖹛' => '𖹻',
  '𖹜' => '𖹼',
  '𖹝' => '𖹽',
  '𖹞' => '𖹾',
  '𖹟' => '𖹿',
  '𞤀' => '𞤢',
  '𞤁' => '𞤣',
  '𞤂' => '𞤤',
  '𞤃' => '𞤥',
  '𞤄' => '𞤦',
  '𞤅' => '𞤧',
  '𞤆' => '𞤨',
  '𞤇' => '𞤩',
  '𞤈' => '𞤪',
  '𞤉' => '𞤫',
  '𞤊' => '𞤬',
  '𞤋' => '𞤭',
  '𞤌' => '𞤮',
  '𞤍' => '𞤯',
  '𞤎' => '𞤰',
  '𞤏' => '𞤱',
  '𞤐' => '𞤲',
  '𞤑' => '𞤳',
  '𞤒' => '𞤴',
  '𞤓' => '𞤵',
  '𞤔' => '𞤶',
  '𞤕' => '𞤷',
  '𞤖' => '𞤸',
  '𞤗' => '𞤹',
  '𞤘' => '𞤺',
  '𞤙' => '𞤻',
  '𞤚' => '𞤼',
  '𞤛' => '𞤽',
  '𞤜' => '𞤾',
  '𞤝' => '𞤿',
  '𞤞' => '𞥀',
  '𞤟' => '𞥁',
  '𞤠' => '𞥂',
  '𞤡' => '𞥃',
);
<?php

return array (
  'a' => 'A',
  'b' => 'B',
  'c' => 'C',
  'd' => 'D',
  'e' => 'E',
  'f' => 'F',
  'g' => 'G',
  'h' => 'H',
  'i' => 'I',
  'j' => 'J',
  'k' => 'K',
  'l' => 'L',
  'm' => 'M',
  'n' => 'N',
  'o' => 'O',
  'p' => 'P',
  'q' => 'Q',
  'r' => 'R',
  's' => 'S',
  't' => 'T',
  'u' => 'U',
  'v' => 'V',
  'w' => 'W',
  'x' => 'X',
  'y' => 'Y',
  'z' => 'Z',
  'µ' => 'Μ',
  'à' => 'À',
  'á' => 'Á',
  'â' => 'Â',
  'ã' => 'Ã',
  'ä' => 'Ä',
  'å' => 'Å',
  'æ' => 'Æ',
  'ç' => 'Ç',
  'è' => 'È',
  'é' => 'É',
  'ê' => 'Ê',
  'ë' => 'Ë',
  'ì' => 'Ì',
  'í' => 'Í',
  'î' => 'Î',
  'ï' => 'Ï',
  'ð' => 'Ð',
  'ñ' => 'Ñ',
  'ò' => 'Ò',
  'ó' => 'Ó',
  'ô' => 'Ô',
  'õ' => 'Õ',
  'ö' => 'Ö',
  'ø' => 'Ø',
  'ù' => 'Ù',
  'ú' => 'Ú',
  'û' => 'Û',
  'ü' => 'Ü',
  'ý' => 'Ý',
  'þ' => 'Þ',
  'ÿ' => 'Ÿ',
  'ā' => 'Ā',
  'ă' => 'Ă',
  'ą' => 'Ą',
  'ć' => 'Ć',
  'ĉ' => 'Ĉ',
  'ċ' => 'Ċ',
  'č' => 'Č',
  'ď' => 'Ď',
  'đ' => 'Đ',
  'ē' => 'Ē',
  'ĕ' => 'Ĕ',
  'ė' => 'Ė',
  'ę' => 'Ę',
  'ě' => 'Ě',
  'ĝ' => 'Ĝ',
  'ğ' => 'Ğ',
  'ġ' => 'Ġ',
  'ģ' => 'Ģ',
  'ĥ' => 'Ĥ',
  'ħ' => 'Ħ',
  'ĩ' => 'Ĩ',
  'ī' => 'Ī',
  'ĭ' => 'Ĭ',
  'į' => 'Į',
  'ı' => 'I',
  'ij' => 'IJ',
  'ĵ' => 'Ĵ',
  'ķ' => 'Ķ',
  'ĺ' => 'Ĺ',
  'ļ' => 'Ļ',
  'ľ' => 'Ľ',
  'ŀ' => 'Ŀ',
  'ł' => 'Ł',
  'ń' => 'Ń',
  'ņ' => 'Ņ',
  'ň' => 'Ň',
  'ŋ' => 'Ŋ',
  'ō' => 'Ō',
  'ŏ' => 'Ŏ',
  'ő' => 'Ő',
  'œ' => 'Œ',
  'ŕ' => 'Ŕ',
  'ŗ' => 'Ŗ',
  'ř' => 'Ř',
  'ś' => 'Ś',
  'ŝ' => 'Ŝ',
  'ş' => 'Ş',
  'š' => 'Š',
  'ţ' => 'Ţ',
  'ť' => 'Ť',
  'ŧ' => 'Ŧ',
  'ũ' => 'Ũ',
  'ū' => 'Ū',
  'ŭ' => 'Ŭ',
  'ů' => 'Ů',
  'ű' => 'Ű',
  'ų' => 'Ų',
  'ŵ' => 'Ŵ',
  'ŷ' => 'Ŷ',
  'ź' => 'Ź',
  'ż' => 'Ż',
  'ž' => 'Ž',
  'ſ' => 'S',
  'ƀ' => 'Ƀ',
  'ƃ' => 'Ƃ',
  'ƅ' => 'Ƅ',
  'ƈ' => 'Ƈ',
  'ƌ' => 'Ƌ',
  'ƒ' => 'Ƒ',
  'ƕ' => 'Ƕ',
  'ƙ' => 'Ƙ',
  'ƚ' => 'Ƚ',
  'ƞ' => 'Ƞ',
  'ơ' => 'Ơ',
  'ƣ' => 'Ƣ',
  'ƥ' => 'Ƥ',
  'ƨ' => 'Ƨ',
  'ƭ' => 'Ƭ',
  'ư' => 'Ư',
  'ƴ' => 'Ƴ',
  'ƶ' => 'Ƶ',
  'ƹ' => 'Ƹ',
  'ƽ' => 'Ƽ',
  'ƿ' => 'Ƿ',
  'Dž' => 'DŽ',
  'dž' => 'DŽ',
  'Lj' => 'LJ',
  'lj' => 'LJ',
  'Nj' => 'NJ',
  'nj' => 'NJ',
  'ǎ' => 'Ǎ',
  'ǐ' => 'Ǐ',
  'ǒ' => 'Ǒ',
  'ǔ' => 'Ǔ',
  'ǖ' => 'Ǖ',
  'ǘ' => 'Ǘ',
  'ǚ' => 'Ǚ',
  'ǜ' => 'Ǜ',
  'ǝ' => 'Ǝ',
  'ǟ' => 'Ǟ',
  'ǡ' => 'Ǡ',
  'ǣ' => 'Ǣ',
  'ǥ' => 'Ǥ',
  'ǧ' => 'Ǧ',
  'ǩ' => 'Ǩ',
  'ǫ' => 'Ǫ',
  'ǭ' => 'Ǭ',
  'ǯ' => 'Ǯ',
  'Dz' => 'DZ',
  'dz' => 'DZ',
  'ǵ' => 'Ǵ',
  'ǹ' => 'Ǹ',
  'ǻ' => 'Ǻ',
  'ǽ' => 'Ǽ',
  'ǿ' => 'Ǿ',
  'ȁ' => 'Ȁ',
  'ȃ' => 'Ȃ',
  'ȅ' => 'Ȅ',
  'ȇ' => 'Ȇ',
  'ȉ' => 'Ȉ',
  'ȋ' => 'Ȋ',
  'ȍ' => 'Ȍ',
  'ȏ' => 'Ȏ',
  'ȑ' => 'Ȑ',
  'ȓ' => 'Ȓ',
  'ȕ' => 'Ȕ',
  'ȗ' => 'Ȗ',
  'ș' => 'Ș',
  'ț' => 'Ț',
  'ȝ' => 'Ȝ',
  'ȟ' => 'Ȟ',
  'ȣ' => 'Ȣ',
  'ȥ' => 'Ȥ',
  'ȧ' => 'Ȧ',
  'ȩ' => 'Ȩ',
  'ȫ' => 'Ȫ',
  'ȭ' => 'Ȭ',
  'ȯ' => 'Ȯ',
  'ȱ' => 'Ȱ',
  'ȳ' => 'Ȳ',
  'ȼ' => 'Ȼ',
  'ȿ' => 'Ȿ',
  'ɀ' => 'Ɀ',
  'ɂ' => 'Ɂ',
  'ɇ' => 'Ɇ',
  'ɉ' => 'Ɉ',
  'ɋ' => 'Ɋ',
  'ɍ' => 'Ɍ',
  'ɏ' => 'Ɏ',
  'ɐ' => 'Ɐ',
  'ɑ' => 'Ɑ',
  'ɒ' => 'Ɒ',
  'ɓ' => 'Ɓ',
  'ɔ' => 'Ɔ',
  'ɖ' => 'Ɖ',
  'ɗ' => 'Ɗ',
  'ə' => 'Ə',
  'ɛ' => 'Ɛ',
  'ɜ' => 'Ɜ',
  'ɠ' => 'Ɠ',
  'ɡ' => 'Ɡ',
  'ɣ' => 'Ɣ',
  'ɥ' => 'Ɥ',
  'ɦ' => 'Ɦ',
  'ɨ' => 'Ɨ',
  'ɩ' => 'Ɩ',
  'ɪ' => 'Ɪ',
  'ɫ' => 'Ɫ',
  'ɬ' => 'Ɬ',
  'ɯ' => 'Ɯ',
  'ɱ' => 'Ɱ',
  'ɲ' => 'Ɲ',
  'ɵ' => 'Ɵ',
  'ɽ' => 'Ɽ',
  'ʀ' => 'Ʀ',
  'ʂ' => 'Ʂ',
  'ʃ' => 'Ʃ',
  'ʇ' => 'Ʇ',
  'ʈ' => 'Ʈ',
  'ʉ' => 'Ʉ',
  'ʊ' => 'Ʊ',
  'ʋ' => 'Ʋ',
  'ʌ' => 'Ʌ',
  'ʒ' => 'Ʒ',
  'ʝ' => 'Ʝ',
  'ʞ' => 'Ʞ',
  'ͅ' => 'Ι',
  'ͱ' => 'Ͱ',
  'ͳ' => 'Ͳ',
  'ͷ' => 'Ͷ',
  'ͻ' => 'Ͻ',
  'ͼ' => 'Ͼ',
  'ͽ' => 'Ͽ',
  'ά' => 'Ά',
  'έ' => 'Έ',
  'ή' => 'Ή',
  'ί' => 'Ί',
  'α' => 'Α',
  'β' => 'Β',
  'γ' => 'Γ',
  'δ' => 'Δ',
  'ε' => 'Ε',
  'ζ' => 'Ζ',
  'η' => 'Η',
  'θ' => 'Θ',
  'ι' => 'Ι',
  'κ' => 'Κ',
  'λ' => 'Λ',
  'μ' => 'Μ',
  'ν' => 'Ν',
  'ξ' => 'Ξ',
  'ο' => 'Ο',
  'π' => 'Π',
  'ρ' => 'Ρ',
  'ς' => 'Σ',
  'σ' => 'Σ',
  'τ' => 'Τ',
  'υ' => 'Υ',
  'φ' => 'Φ',
  'χ' => 'Χ',
  'ψ' => 'Ψ',
  'ω' => 'Ω',
  'ϊ' => 'Ϊ',
  'ϋ' => 'Ϋ',
  'ό' => 'Ό',
  'ύ' => 'Ύ',
  'ώ' => 'Ώ',
  'ϐ' => 'Β',
  'ϑ' => 'Θ',
  'ϕ' => 'Φ',
  'ϖ' => 'Π',
  'ϗ' => 'Ϗ',
  'ϙ' => 'Ϙ',
  'ϛ' => 'Ϛ',
  'ϝ' => 'Ϝ',
  'ϟ' => 'Ϟ',
  'ϡ' => 'Ϡ',
  'ϣ' => 'Ϣ',
  'ϥ' => 'Ϥ',
  'ϧ' => 'Ϧ',
  'ϩ' => 'Ϩ',
  'ϫ' => 'Ϫ',
  'ϭ' => 'Ϭ',
  'ϯ' => 'Ϯ',
  'ϰ' => 'Κ',
  'ϱ' => 'Ρ',
  'ϲ' => 'Ϲ',
  'ϳ' => 'Ϳ',
  'ϵ' => 'Ε',
  'ϸ' => 'Ϸ',
  'ϻ' => 'Ϻ',
  'а' => 'А',
  'б' => 'Б',
  'в' => 'В',
  'г' => 'Г',
  'д' => 'Д',
  'е' => 'Е',
  'ж' => 'Ж',
  'з' => 'З',
  'и' => 'И',
  'й' => 'Й',
  'к' => 'К',
  'л' => 'Л',
  'м' => 'М',
  'н' => 'Н',
  'о' => 'О',
  'п' => 'П',
  'р' => 'Р',
  'с' => 'С',
  'т' => 'Т',
  'у' => 'У',
  'ф' => 'Ф',
  'х' => 'Х',
  'ц' => 'Ц',
  'ч' => 'Ч',
  'ш' => 'Ш',
  'щ' => 'Щ',
  'ъ' => 'Ъ',
  'ы' => 'Ы',
  'ь' => 'Ь',
  'э' => 'Э',
  'ю' => 'Ю',
  'я' => 'Я',
  'ѐ' => 'Ѐ',
  'ё' => 'Ё',
  'ђ' => 'Ђ',
  'ѓ' => 'Ѓ',
  'є' => 'Є',
  'ѕ' => 'Ѕ',
  'і' => 'І',
  'ї' => 'Ї',
  'ј' => 'Ј',
  'љ' => 'Љ',
  'њ' => 'Њ',
  'ћ' => 'Ћ',
  'ќ' => 'Ќ',
  'ѝ' => 'Ѝ',
  'ў' => 'Ў',
  'џ' => 'Џ',
  'ѡ' => 'Ѡ',
  'ѣ' => 'Ѣ',
  'ѥ' => 'Ѥ',
  'ѧ' => 'Ѧ',
  'ѩ' => 'Ѩ',
  'ѫ' => 'Ѫ',
  'ѭ' => 'Ѭ',
  'ѯ' => 'Ѯ',
  'ѱ' => 'Ѱ',
  'ѳ' => 'Ѳ',
  'ѵ' => 'Ѵ',
  'ѷ' => 'Ѷ',
  'ѹ' => 'Ѹ',
  'ѻ' => 'Ѻ',
  'ѽ' => 'Ѽ',
  'ѿ' => 'Ѿ',
  'ҁ' => 'Ҁ',
  'ҋ' => 'Ҋ',
  'ҍ' => 'Ҍ',
  'ҏ' => 'Ҏ',
  'ґ' => 'Ґ',
  'ғ' => 'Ғ',
  'ҕ' => 'Ҕ',
  'җ' => 'Җ',
  'ҙ' => 'Ҙ',
  'қ' => 'Қ',
  'ҝ' => 'Ҝ',
  'ҟ' => 'Ҟ',
  'ҡ' => 'Ҡ',
  'ң' => 'Ң',
  'ҥ' => 'Ҥ',
  'ҧ' => 'Ҧ',
  'ҩ' => 'Ҩ',
  'ҫ' => 'Ҫ',
  'ҭ' => 'Ҭ',
  'ү' => 'Ү',
  'ұ' => 'Ұ',
  'ҳ' => 'Ҳ',
  'ҵ' => 'Ҵ',
  'ҷ' => 'Ҷ',
  'ҹ' => 'Ҹ',
  'һ' => 'Һ',
  'ҽ' => 'Ҽ',
  'ҿ' => 'Ҿ',
  'ӂ' => 'Ӂ',
  'ӄ' => 'Ӄ',
  'ӆ' => 'Ӆ',
  'ӈ' => 'Ӈ',
  'ӊ' => 'Ӊ',
  'ӌ' => 'Ӌ',
  'ӎ' => 'Ӎ',
  'ӏ' => 'Ӏ',
  'ӑ' => 'Ӑ',
  'ӓ' => 'Ӓ',
  'ӕ' => 'Ӕ',
  'ӗ' => 'Ӗ',
  'ә' => 'Ә',
  'ӛ' => 'Ӛ',
  'ӝ' => 'Ӝ',
  'ӟ' => 'Ӟ',
  'ӡ' => 'Ӡ',
  'ӣ' => 'Ӣ',
  'ӥ' => 'Ӥ',
  'ӧ' => 'Ӧ',
  'ө' => 'Ө',
  'ӫ' => 'Ӫ',
  'ӭ' => 'Ӭ',
  'ӯ' => 'Ӯ',
  'ӱ' => 'Ӱ',
  'ӳ' => 'Ӳ',
  'ӵ' => 'Ӵ',
  'ӷ' => 'Ӷ',
  'ӹ' => 'Ӹ',
  'ӻ' => 'Ӻ',
  'ӽ' => 'Ӽ',
  'ӿ' => 'Ӿ',
  'ԁ' => 'Ԁ',
  'ԃ' => 'Ԃ',
  'ԅ' => 'Ԅ',
  'ԇ' => 'Ԇ',
  'ԉ' => 'Ԉ',
  'ԋ' => 'Ԋ',
  'ԍ' => 'Ԍ',
  'ԏ' => 'Ԏ',
  'ԑ' => 'Ԑ',
  'ԓ' => 'Ԓ',
  'ԕ' => 'Ԕ',
  'ԗ' => 'Ԗ',
  'ԙ' => 'Ԙ',
  'ԛ' => 'Ԛ',
  'ԝ' => 'Ԝ',
  'ԟ' => 'Ԟ',
  'ԡ' => 'Ԡ',
  'ԣ' => 'Ԣ',
  'ԥ' => 'Ԥ',
  'ԧ' => 'Ԧ',
  'ԩ' => 'Ԩ',
  'ԫ' => 'Ԫ',
  'ԭ' => 'Ԭ',
  'ԯ' => 'Ԯ',
  'ա' => 'Ա',
  'բ' => 'Բ',
  'գ' => 'Գ',
  'դ' => 'Դ',
  'ե' => 'Ե',
  'զ' => 'Զ',
  'է' => 'Է',
  'ը' => 'Ը',
  'թ' => 'Թ',
  'ժ' => 'Ժ',
  'ի' => 'Ի',
  'լ' => 'Լ',
  'խ' => 'Խ',
  'ծ' => 'Ծ',
  'կ' => 'Կ',
  'հ' => 'Հ',
  'ձ' => 'Ձ',
  'ղ' => 'Ղ',
  'ճ' => 'Ճ',
  'մ' => 'Մ',
  'յ' => 'Յ',
  'ն' => 'Ն',
  'շ' => 'Շ',
  'ո' => 'Ո',
  'չ' => 'Չ',
  'պ' => 'Պ',
  'ջ' => 'Ջ',
  'ռ' => 'Ռ',
  'ս' => 'Ս',
  'վ' => 'Վ',
  'տ' => 'Տ',
  'ր' => 'Ր',
  'ց' => 'Ց',
  'ւ' => 'Ւ',
  'փ' => 'Փ',
  'ք' => 'Ք',
  'օ' => 'Օ',
  'ֆ' => 'Ֆ',
  'ა' => 'Ა',
  'ბ' => 'Ბ',
  'გ' => 'Გ',
  'დ' => 'Დ',
  'ე' => 'Ე',
  'ვ' => 'Ვ',
  'ზ' => 'Ზ',
  'თ' => 'Თ',
  'ი' => 'Ი',
  'კ' => 'Კ',
  'ლ' => 'Ლ',
  'მ' => 'Მ',
  'ნ' => 'Ნ',
  'ო' => 'Ო',
  'პ' => 'Პ',
  'ჟ' => 'Ჟ',
  'რ' => 'Რ',
  'ს' => 'Ს',
  'ტ' => 'Ტ',
  'უ' => 'Უ',
  'ფ' => 'Ფ',
  'ქ' => 'Ქ',
  'ღ' => 'Ღ',
  'ყ' => 'Ყ',
  'შ' => 'Შ',
  'ჩ' => 'Ჩ',
  'ც' => 'Ც',
  'ძ' => 'Ძ',
  'წ' => 'Წ',
  'ჭ' => 'Ჭ',
  'ხ' => 'Ხ',
  'ჯ' => 'Ჯ',
  'ჰ' => 'Ჰ',
  'ჱ' => 'Ჱ',
  'ჲ' => 'Ჲ',
  'ჳ' => 'Ჳ',
  'ჴ' => 'Ჴ',
  'ჵ' => 'Ჵ',
  'ჶ' => 'Ჶ',
  'ჷ' => 'Ჷ',
  'ჸ' => 'Ჸ',
  'ჹ' => 'Ჹ',
  'ჺ' => 'Ჺ',
  'ჽ' => 'Ჽ',
  'ჾ' => 'Ჾ',
  'ჿ' => 'Ჿ',
  'ᏸ' => 'Ᏸ',
  'ᏹ' => 'Ᏹ',
  'ᏺ' => 'Ᏺ',
  'ᏻ' => 'Ᏻ',
  'ᏼ' => 'Ᏼ',
  'ᏽ' => 'Ᏽ',
  'ᲀ' => 'В',
  'ᲁ' => 'Д',
  'ᲂ' => 'О',
  'ᲃ' => 'С',
  'ᲄ' => 'Т',
  'ᲅ' => 'Т',
  'ᲆ' => 'Ъ',
  'ᲇ' => 'Ѣ',
  'ᲈ' => 'Ꙋ',
  'ᵹ' => 'Ᵹ',
  'ᵽ' => 'Ᵽ',
  'ᶎ' => 'Ᶎ',
  'ḁ' => 'Ḁ',
  'ḃ' => 'Ḃ',
  'ḅ' => 'Ḅ',
  'ḇ' => 'Ḇ',
  'ḉ' => 'Ḉ',
  'ḋ' => 'Ḋ',
  'ḍ' => 'Ḍ',
  'ḏ' => 'Ḏ',
  'ḑ' => 'Ḑ',
  'ḓ' => 'Ḓ',
  'ḕ' => 'Ḕ',
  'ḗ' => 'Ḗ',
  'ḙ' => 'Ḙ',
  'ḛ' => 'Ḛ',
  'ḝ' => 'Ḝ',
  'ḟ' => 'Ḟ',
  'ḡ' => 'Ḡ',
  'ḣ' => 'Ḣ',
  'ḥ' => 'Ḥ',
  'ḧ' => 'Ḧ',
  'ḩ' => 'Ḩ',
  'ḫ' => 'Ḫ',
  'ḭ' => 'Ḭ',
  'ḯ' => 'Ḯ',
  'ḱ' => 'Ḱ',
  'ḳ' => 'Ḳ',
  'ḵ' => 'Ḵ',
  'ḷ' => 'Ḷ',
  'ḹ' => 'Ḹ',
  'ḻ' => 'Ḻ',
  'ḽ' => 'Ḽ',
  'ḿ' => 'Ḿ',
  'ṁ' => 'Ṁ',
  'ṃ' => 'Ṃ',
  'ṅ' => 'Ṅ',
  'ṇ' => 'Ṇ',
  'ṉ' => 'Ṉ',
  'ṋ' => 'Ṋ',
  'ṍ' => 'Ṍ',
  'ṏ' => 'Ṏ',
  'ṑ' => 'Ṑ',
  'ṓ' => 'Ṓ',
  'ṕ' => 'Ṕ',
  'ṗ' => 'Ṗ',
  'ṙ' => 'Ṙ',
  'ṛ' => 'Ṛ',
  'ṝ' => 'Ṝ',
  'ṟ' => 'Ṟ',
  'ṡ' => 'Ṡ',
  'ṣ' => 'Ṣ',
  'ṥ' => 'Ṥ',
  'ṧ' => 'Ṧ',
  'ṩ' => 'Ṩ',
  'ṫ' => 'Ṫ',
  'ṭ' => 'Ṭ',
  'ṯ' => 'Ṯ',
  'ṱ' => 'Ṱ',
  'ṳ' => 'Ṳ',
  'ṵ' => 'Ṵ',
  'ṷ' => 'Ṷ',
  'ṹ' => 'Ṹ',
  'ṻ' => 'Ṻ',
  'ṽ' => 'Ṽ',
  'ṿ' => 'Ṿ',
  'ẁ' => 'Ẁ',
  'ẃ' => 'Ẃ',
  'ẅ' => 'Ẅ',
  'ẇ' => 'Ẇ',
  'ẉ' => 'Ẉ',
  'ẋ' => 'Ẋ',
  'ẍ' => 'Ẍ',
  'ẏ' => 'Ẏ',
  'ẑ' => 'Ẑ',
  'ẓ' => 'Ẓ',
  'ẕ' => 'Ẕ',
  'ẛ' => 'Ṡ',
  'ạ' => 'Ạ',
  'ả' => 'Ả',
  'ấ' => 'Ấ',
  'ầ' => 'Ầ',
  'ẩ' => 'Ẩ',
  'ẫ' => 'Ẫ',
  'ậ' => 'Ậ',
  'ắ' => 'Ắ',
  'ằ' => 'Ằ',
  'ẳ' => 'Ẳ',
  'ẵ' => 'Ẵ',
  'ặ' => 'Ặ',
  'ẹ' => 'Ẹ',
  'ẻ' => 'Ẻ',
  'ẽ' => 'Ẽ',
  'ế' => 'Ế',
  'ề' => 'Ề',
  'ể' => 'Ể',
  'ễ' => 'Ễ',
  'ệ' => 'Ệ',
  'ỉ' => 'Ỉ',
  'ị' => 'Ị',
  'ọ' => 'Ọ',
  'ỏ' => 'Ỏ',
  'ố' => 'Ố',
  'ồ' => 'Ồ',
  'ổ' => 'Ổ',
  'ỗ' => 'Ỗ',
  'ộ' => 'Ộ',
  'ớ' => 'Ớ',
  'ờ' => 'Ờ',
  'ở' => 'Ở',
  'ỡ' => 'Ỡ',
  'ợ' => 'Ợ',
  'ụ' => 'Ụ',
  'ủ' => 'Ủ',
  'ứ' => 'Ứ',
  'ừ' => 'Ừ',
  'ử' => 'Ử',
  'ữ' => 'Ữ',
  'ự' => 'Ự',
  'ỳ' => 'Ỳ',
  'ỵ' => 'Ỵ',
  'ỷ' => 'Ỷ',
  'ỹ' => 'Ỹ',
  'ỻ' => 'Ỻ',
  'ỽ' => 'Ỽ',
  'ỿ' => 'Ỿ',
  'ἀ' => 'Ἀ',
  'ἁ' => 'Ἁ',
  'ἂ' => 'Ἂ',
  'ἃ' => 'Ἃ',
  'ἄ' => 'Ἄ',
  'ἅ' => 'Ἅ',
  'ἆ' => 'Ἆ',
  'ἇ' => 'Ἇ',
  'ἐ' => 'Ἐ',
  'ἑ' => 'Ἑ',
  'ἒ' => 'Ἒ',
  'ἓ' => 'Ἓ',
  'ἔ' => 'Ἔ',
  'ἕ' => 'Ἕ',
  'ἠ' => 'Ἠ',
  'ἡ' => 'Ἡ',
  'ἢ' => 'Ἢ',
  'ἣ' => 'Ἣ',
  'ἤ' => 'Ἤ',
  'ἥ' => 'Ἥ',
  'ἦ' => 'Ἦ',
  'ἧ' => 'Ἧ',
  'ἰ' => 'Ἰ',
  'ἱ' => 'Ἱ',
  'ἲ' => 'Ἲ',
  'ἳ' => 'Ἳ',
  'ἴ' => 'Ἴ',
  'ἵ' => 'Ἵ',
  'ἶ' => 'Ἶ',
  'ἷ' => 'Ἷ',
  'ὀ' => 'Ὀ',
  'ὁ' => 'Ὁ',
  'ὂ' => 'Ὂ',
  'ὃ' => 'Ὃ',
  'ὄ' => 'Ὄ',
  'ὅ' => 'Ὅ',
  'ὑ' => 'Ὑ',
  'ὓ' => 'Ὓ',
  'ὕ' => 'Ὕ',
  'ὗ' => 'Ὗ',
  'ὠ' => 'Ὠ',
  'ὡ' => 'Ὡ',
  'ὢ' => 'Ὢ',
  'ὣ' => 'Ὣ',
  'ὤ' => 'Ὤ',
  'ὥ' => 'Ὥ',
  'ὦ' => 'Ὦ',
  'ὧ' => 'Ὧ',
  'ὰ' => 'Ὰ',
  'ά' => 'Ά',
  'ὲ' => 'Ὲ',
  'έ' => 'Έ',
  'ὴ' => 'Ὴ',
  'ή' => 'Ή',
  'ὶ' => 'Ὶ',
  'ί' => 'Ί',
  'ὸ' => 'Ὸ',
  'ό' => 'Ό',
  'ὺ' => 'Ὺ',
  'ύ' => 'Ύ',
  'ὼ' => 'Ὼ',
  'ώ' => 'Ώ',
  'ᾀ' => 'ἈΙ',
  'ᾁ' => 'ἉΙ',
  'ᾂ' => 'ἊΙ',
  'ᾃ' => 'ἋΙ',
  'ᾄ' => 'ἌΙ',
  'ᾅ' => 'ἍΙ',
  'ᾆ' => 'ἎΙ',
  'ᾇ' => 'ἏΙ',
  'ᾐ' => 'ἨΙ',
  'ᾑ' => 'ἩΙ',
  'ᾒ' => 'ἪΙ',
  'ᾓ' => 'ἫΙ',
  'ᾔ' => 'ἬΙ',
  'ᾕ' => 'ἭΙ',
  'ᾖ' => 'ἮΙ',
  'ᾗ' => 'ἯΙ',
  'ᾠ' => 'ὨΙ',
  'ᾡ' => 'ὩΙ',
  'ᾢ' => 'ὪΙ',
  'ᾣ' => 'ὫΙ',
  'ᾤ' => 'ὬΙ',
  'ᾥ' => 'ὭΙ',
  'ᾦ' => 'ὮΙ',
  'ᾧ' => 'ὯΙ',
  'ᾰ' => 'Ᾰ',
  'ᾱ' => 'Ᾱ',
  'ᾳ' => 'ΑΙ',
  'ι' => 'Ι',
  'ῃ' => 'ΗΙ',
  'ῐ' => 'Ῐ',
  'ῑ' => 'Ῑ',
  'ῠ' => 'Ῠ',
  'ῡ' => 'Ῡ',
  'ῥ' => 'Ῥ',
  'ῳ' => 'ΩΙ',
  'ⅎ' => 'Ⅎ',
  'ⅰ' => 'Ⅰ',
  'ⅱ' => 'Ⅱ',
  'ⅲ' => 'Ⅲ',
  'ⅳ' => 'Ⅳ',
  'ⅴ' => 'Ⅴ',
  'ⅵ' => 'Ⅵ',
  'ⅶ' => 'Ⅶ',
  'ⅷ' => 'Ⅷ',
  'ⅸ' => 'Ⅸ',
  'ⅹ' => 'Ⅹ',
  'ⅺ' => 'Ⅺ',
  'ⅻ' => 'Ⅻ',
  'ⅼ' => 'Ⅼ',
  'ⅽ' => 'Ⅽ',
  'ⅾ' => 'Ⅾ',
  'ⅿ' => 'Ⅿ',
  'ↄ' => 'Ↄ',
  'ⓐ' => 'Ⓐ',
  'ⓑ' => 'Ⓑ',
  'ⓒ' => 'Ⓒ',
  'ⓓ' => 'Ⓓ',
  'ⓔ' => 'Ⓔ',
  'ⓕ' => 'Ⓕ',
  'ⓖ' => 'Ⓖ',
  'ⓗ' => 'Ⓗ',
  'ⓘ' => 'Ⓘ',
  'ⓙ' => 'Ⓙ',
  'ⓚ' => 'Ⓚ',
  'ⓛ' => 'Ⓛ',
  'ⓜ' => 'Ⓜ',
  'ⓝ' => 'Ⓝ',
  'ⓞ' => 'Ⓞ',
  'ⓟ' => 'Ⓟ',
  'ⓠ' => 'Ⓠ',
  'ⓡ' => 'Ⓡ',
  'ⓢ' => 'Ⓢ',
  'ⓣ' => 'Ⓣ',
  'ⓤ' => 'Ⓤ',
  'ⓥ' => 'Ⓥ',
  'ⓦ' => 'Ⓦ',
  'ⓧ' => 'Ⓧ',
  'ⓨ' => 'Ⓨ',
  'ⓩ' => 'Ⓩ',
  'ⰰ' => 'Ⰰ',
  'ⰱ' => 'Ⰱ',
  'ⰲ' => 'Ⰲ',
  'ⰳ' => 'Ⰳ',
  'ⰴ' => 'Ⰴ',
  'ⰵ' => 'Ⰵ',
  'ⰶ' => 'Ⰶ',
  'ⰷ' => 'Ⰷ',
  'ⰸ' => 'Ⰸ',
  'ⰹ' => 'Ⰹ',
  'ⰺ' => 'Ⰺ',
  'ⰻ' => 'Ⰻ',
  'ⰼ' => 'Ⰼ',
  'ⰽ' => 'Ⰽ',
  'ⰾ' => 'Ⰾ',
  'ⰿ' => 'Ⰿ',
  'ⱀ' => 'Ⱀ',
  'ⱁ' => 'Ⱁ',
  'ⱂ' => 'Ⱂ',
  'ⱃ' => 'Ⱃ',
  'ⱄ' => 'Ⱄ',
  'ⱅ' => 'Ⱅ',
  'ⱆ' => 'Ⱆ',
  'ⱇ' => 'Ⱇ',
  'ⱈ' => 'Ⱈ',
  'ⱉ' => 'Ⱉ',
  'ⱊ' => 'Ⱊ',
  'ⱋ' => 'Ⱋ',
  'ⱌ' => 'Ⱌ',
  'ⱍ' => 'Ⱍ',
  'ⱎ' => 'Ⱎ',
  'ⱏ' => 'Ⱏ',
  'ⱐ' => 'Ⱐ',
  'ⱑ' => 'Ⱑ',
  'ⱒ' => 'Ⱒ',
  'ⱓ' => 'Ⱓ',
  'ⱔ' => 'Ⱔ',
  'ⱕ' => 'Ⱕ',
  'ⱖ' => 'Ⱖ',
  'ⱗ' => 'Ⱗ',
  'ⱘ' => 'Ⱘ',
  'ⱙ' => 'Ⱙ',
  'ⱚ' => 'Ⱚ',
  'ⱛ' => 'Ⱛ',
  'ⱜ' => 'Ⱜ',
  'ⱝ' => 'Ⱝ',
  'ⱞ' => 'Ⱞ',
  'ⱡ' => 'Ⱡ',
  'ⱥ' => 'Ⱥ',
  'ⱦ' => 'Ⱦ',
  'ⱨ' => 'Ⱨ',
  'ⱪ' => 'Ⱪ',
  'ⱬ' => 'Ⱬ',
  'ⱳ' => 'Ⱳ',
  'ⱶ' => 'Ⱶ',
  'ⲁ' => 'Ⲁ',
  'ⲃ' => 'Ⲃ',
  'ⲅ' => 'Ⲅ',
  'ⲇ' => 'Ⲇ',
  'ⲉ' => 'Ⲉ',
  'ⲋ' => 'Ⲋ',
  'ⲍ' => 'Ⲍ',
  'ⲏ' => 'Ⲏ',
  'ⲑ' => 'Ⲑ',
  'ⲓ' => 'Ⲓ',
  'ⲕ' => 'Ⲕ',
  'ⲗ' => 'Ⲗ',
  'ⲙ' => 'Ⲙ',
  'ⲛ' => 'Ⲛ',
  'ⲝ' => 'Ⲝ',
  'ⲟ' => 'Ⲟ',
  'ⲡ' => 'Ⲡ',
  'ⲣ' => 'Ⲣ',
  'ⲥ' => 'Ⲥ',
  'ⲧ' => 'Ⲧ',
  'ⲩ' => 'Ⲩ',
  'ⲫ' => 'Ⲫ',
  'ⲭ' => 'Ⲭ',
  'ⲯ' => 'Ⲯ',
  'ⲱ' => 'Ⲱ',
  'ⲳ' => 'Ⲳ',
  'ⲵ' => 'Ⲵ',
  'ⲷ' => 'Ⲷ',
  'ⲹ' => 'Ⲹ',
  'ⲻ' => 'Ⲻ',
  'ⲽ' => 'Ⲽ',
  'ⲿ' => 'Ⲿ',
  'ⳁ' => 'Ⳁ',
  'ⳃ' => 'Ⳃ',
  'ⳅ' => 'Ⳅ',
  'ⳇ' => 'Ⳇ',
  'ⳉ' => 'Ⳉ',
  'ⳋ' => 'Ⳋ',
  'ⳍ' => 'Ⳍ',
  'ⳏ' => 'Ⳏ',
  'ⳑ' => 'Ⳑ',
  'ⳓ' => 'Ⳓ',
  'ⳕ' => 'Ⳕ',
  'ⳗ' => 'Ⳗ',
  'ⳙ' => 'Ⳙ',
  'ⳛ' => 'Ⳛ',
  'ⳝ' => 'Ⳝ',
  'ⳟ' => 'Ⳟ',
  'ⳡ' => 'Ⳡ',
  'ⳣ' => 'Ⳣ',
  'ⳬ' => 'Ⳬ',
  'ⳮ' => 'Ⳮ',
  'ⳳ' => 'Ⳳ',
  'ⴀ' => 'Ⴀ',
  'ⴁ' => 'Ⴁ',
  'ⴂ' => 'Ⴂ',
  'ⴃ' => 'Ⴃ',
  'ⴄ' => 'Ⴄ',
  'ⴅ' => 'Ⴅ',
  'ⴆ' => 'Ⴆ',
  'ⴇ' => 'Ⴇ',
  'ⴈ' => 'Ⴈ',
  'ⴉ' => 'Ⴉ',
  'ⴊ' => 'Ⴊ',
  'ⴋ' => 'Ⴋ',
  'ⴌ' => 'Ⴌ',
  'ⴍ' => 'Ⴍ',
  'ⴎ' => 'Ⴎ',
  'ⴏ' => 'Ⴏ',
  'ⴐ' => 'Ⴐ',
  'ⴑ' => 'Ⴑ',
  'ⴒ' => 'Ⴒ',
  'ⴓ' => 'Ⴓ',
  'ⴔ' => 'Ⴔ',
  'ⴕ' => 'Ⴕ',
  'ⴖ' => 'Ⴖ',
  'ⴗ' => 'Ⴗ',
  'ⴘ' => 'Ⴘ',
  'ⴙ' => 'Ⴙ',
  'ⴚ' => 'Ⴚ',
  'ⴛ' => 'Ⴛ',
  'ⴜ' => 'Ⴜ',
  'ⴝ' => 'Ⴝ',
  'ⴞ' => 'Ⴞ',
  'ⴟ' => 'Ⴟ',
  'ⴠ' => 'Ⴠ',
  'ⴡ' => 'Ⴡ',
  'ⴢ' => 'Ⴢ',
  'ⴣ' => 'Ⴣ',
  'ⴤ' => 'Ⴤ',
  'ⴥ' => 'Ⴥ',
  'ⴧ' => 'Ⴧ',
  'ⴭ' => 'Ⴭ',
  'ꙁ' => 'Ꙁ',
  'ꙃ' => 'Ꙃ',
  'ꙅ' => 'Ꙅ',
  'ꙇ' => 'Ꙇ',
  'ꙉ' => 'Ꙉ',
  'ꙋ' => 'Ꙋ',
  'ꙍ' => 'Ꙍ',
  'ꙏ' => 'Ꙏ',
  'ꙑ' => 'Ꙑ',
  'ꙓ' => 'Ꙓ',
  'ꙕ' => 'Ꙕ',
  'ꙗ' => 'Ꙗ',
  'ꙙ' => 'Ꙙ',
  'ꙛ' => 'Ꙛ',
  'ꙝ' => 'Ꙝ',
  'ꙟ' => 'Ꙟ',
  'ꙡ' => 'Ꙡ',
  'ꙣ' => 'Ꙣ',
  'ꙥ' => 'Ꙥ',
  'ꙧ' => 'Ꙧ',
  'ꙩ' => 'Ꙩ',
  'ꙫ' => 'Ꙫ',
  'ꙭ' => 'Ꙭ',
  'ꚁ' => 'Ꚁ',
  'ꚃ' => 'Ꚃ',
  'ꚅ' => 'Ꚅ',
  'ꚇ' => 'Ꚇ',
  'ꚉ' => 'Ꚉ',
  'ꚋ' => 'Ꚋ',
  'ꚍ' => 'Ꚍ',
  'ꚏ' => 'Ꚏ',
  'ꚑ' => 'Ꚑ',
  'ꚓ' => 'Ꚓ',
  'ꚕ' => 'Ꚕ',
  'ꚗ' => 'Ꚗ',
  'ꚙ' => 'Ꚙ',
  'ꚛ' => 'Ꚛ',
  'ꜣ' => 'Ꜣ',
  'ꜥ' => 'Ꜥ',
  'ꜧ' => 'Ꜧ',
  'ꜩ' => 'Ꜩ',
  'ꜫ' => 'Ꜫ',
  'ꜭ' => 'Ꜭ',
  'ꜯ' => 'Ꜯ',
  'ꜳ' => 'Ꜳ',
  'ꜵ' => 'Ꜵ',
  'ꜷ' => 'Ꜷ',
  'ꜹ' => 'Ꜹ',
  'ꜻ' => 'Ꜻ',
  'ꜽ' => 'Ꜽ',
  'ꜿ' => 'Ꜿ',
  'ꝁ' => 'Ꝁ',
  'ꝃ' => 'Ꝃ',
  'ꝅ' => 'Ꝅ',
  'ꝇ' => 'Ꝇ',
  'ꝉ' => 'Ꝉ',
  'ꝋ' => 'Ꝋ',
  'ꝍ' => 'Ꝍ',
  'ꝏ' => 'Ꝏ',
  'ꝑ' => 'Ꝑ',
  'ꝓ' => 'Ꝓ',
  'ꝕ' => 'Ꝕ',
  'ꝗ' => 'Ꝗ',
  'ꝙ' => 'Ꝙ',
  'ꝛ' => 'Ꝛ',
  'ꝝ' => 'Ꝝ',
  'ꝟ' => 'Ꝟ',
  'ꝡ' => 'Ꝡ',
  'ꝣ' => 'Ꝣ',
  'ꝥ' => 'Ꝥ',
  'ꝧ' => 'Ꝧ',
  'ꝩ' => 'Ꝩ',
  'ꝫ' => 'Ꝫ',
  'ꝭ' => 'Ꝭ',
  'ꝯ' => 'Ꝯ',
  'ꝺ' => 'Ꝺ',
  'ꝼ' => 'Ꝼ',
  'ꝿ' => 'Ꝿ',
  'ꞁ' => 'Ꞁ',
  'ꞃ' => 'Ꞃ',
  'ꞅ' => 'Ꞅ',
  'ꞇ' => 'Ꞇ',
  'ꞌ' => 'Ꞌ',
  'ꞑ' => 'Ꞑ',
  'ꞓ' => 'Ꞓ',
  'ꞔ' => 'Ꞔ',
  'ꞗ' => 'Ꞗ',
  'ꞙ' => 'Ꞙ',
  'ꞛ' => 'Ꞛ',
  'ꞝ' => 'Ꞝ',
  'ꞟ' => 'Ꞟ',
  'ꞡ' => 'Ꞡ',
  'ꞣ' => 'Ꞣ',
  'ꞥ' => 'Ꞥ',
  'ꞧ' => 'Ꞧ',
  'ꞩ' => 'Ꞩ',
  'ꞵ' => 'Ꞵ',
  'ꞷ' => 'Ꞷ',
  'ꞹ' => 'Ꞹ',
  'ꞻ' => 'Ꞻ',
  'ꞽ' => 'Ꞽ',
  'ꞿ' => 'Ꞿ',
  'ꟃ' => 'Ꟃ',
  'ꟈ' => 'Ꟈ',
  'ꟊ' => 'Ꟊ',
  'ꟶ' => 'Ꟶ',
  'ꭓ' => 'Ꭓ',
  'ꭰ' => 'Ꭰ',
  'ꭱ' => 'Ꭱ',
  'ꭲ' => 'Ꭲ',
  'ꭳ' => 'Ꭳ',
  'ꭴ' => 'Ꭴ',
  'ꭵ' => 'Ꭵ',
  'ꭶ' => 'Ꭶ',
  'ꭷ' => 'Ꭷ',
  'ꭸ' => 'Ꭸ',
  'ꭹ' => 'Ꭹ',
  'ꭺ' => 'Ꭺ',
  'ꭻ' => 'Ꭻ',
  'ꭼ' => 'Ꭼ',
  'ꭽ' => 'Ꭽ',
  'ꭾ' => 'Ꭾ',
  'ꭿ' => 'Ꭿ',
  'ꮀ' => 'Ꮀ',
  'ꮁ' => 'Ꮁ',
  'ꮂ' => 'Ꮂ',
  'ꮃ' => 'Ꮃ',
  'ꮄ' => 'Ꮄ',
  'ꮅ' => 'Ꮅ',
  'ꮆ' => 'Ꮆ',
  'ꮇ' => 'Ꮇ',
  'ꮈ' => 'Ꮈ',
  'ꮉ' => 'Ꮉ',
  'ꮊ' => 'Ꮊ',
  'ꮋ' => 'Ꮋ',
  'ꮌ' => 'Ꮌ',
  'ꮍ' => 'Ꮍ',
  'ꮎ' => 'Ꮎ',
  'ꮏ' => 'Ꮏ',
  'ꮐ' => 'Ꮐ',
  'ꮑ' => 'Ꮑ',
  'ꮒ' => 'Ꮒ',
  'ꮓ' => 'Ꮓ',
  'ꮔ' => 'Ꮔ',
  'ꮕ' => 'Ꮕ',
  'ꮖ' => 'Ꮖ',
  'ꮗ' => 'Ꮗ',
  'ꮘ' => 'Ꮘ',
  'ꮙ' => 'Ꮙ',
  'ꮚ' => 'Ꮚ',
  'ꮛ' => 'Ꮛ',
  'ꮜ' => 'Ꮜ',
  'ꮝ' => 'Ꮝ',
  'ꮞ' => 'Ꮞ',
  'ꮟ' => 'Ꮟ',
  'ꮠ' => 'Ꮠ',
  'ꮡ' => 'Ꮡ',
  'ꮢ' => 'Ꮢ',
  'ꮣ' => 'Ꮣ',
  'ꮤ' => 'Ꮤ',
  'ꮥ' => 'Ꮥ',
  'ꮦ' => 'Ꮦ',
  'ꮧ' => 'Ꮧ',
  'ꮨ' => 'Ꮨ',
  'ꮩ' => 'Ꮩ',
  'ꮪ' => 'Ꮪ',
  'ꮫ' => 'Ꮫ',
  'ꮬ' => 'Ꮬ',
  'ꮭ' => 'Ꮭ',
  'ꮮ' => 'Ꮮ',
  'ꮯ' => 'Ꮯ',
  'ꮰ' => 'Ꮰ',
  'ꮱ' => 'Ꮱ',
  'ꮲ' => 'Ꮲ',
  'ꮳ' => 'Ꮳ',
  'ꮴ' => 'Ꮴ',
  'ꮵ' => 'Ꮵ',
  'ꮶ' => 'Ꮶ',
  'ꮷ' => 'Ꮷ',
  'ꮸ' => 'Ꮸ',
  'ꮹ' => 'Ꮹ',
  'ꮺ' => 'Ꮺ',
  'ꮻ' => 'Ꮻ',
  'ꮼ' => 'Ꮼ',
  'ꮽ' => 'Ꮽ',
  'ꮾ' => 'Ꮾ',
  'ꮿ' => 'Ꮿ',
  'a' => 'A',
  'b' => 'B',
  'c' => 'C',
  'd' => 'D',
  'e' => 'E',
  'f' => 'F',
  'g' => 'G',
  'h' => 'H',
  'i' => 'I',
  'j' => 'J',
  'k' => 'K',
  'l' => 'L',
  'm' => 'M',
  'n' => 'N',
  'o' => 'O',
  'p' => 'P',
  'q' => 'Q',
  'r' => 'R',
  's' => 'S',
  't' => 'T',
  'u' => 'U',
  'v' => 'V',
  'w' => 'W',
  'x' => 'X',
  'y' => 'Y',
  'z' => 'Z',
  '𐐨' => '𐐀',
  '𐐩' => '𐐁',
  '𐐪' => '𐐂',
  '𐐫' => '𐐃',
  '𐐬' => '𐐄',
  '𐐭' => '𐐅',
  '𐐮' => '𐐆',
  '𐐯' => '𐐇',
  '𐐰' => '𐐈',
  '𐐱' => '𐐉',
  '𐐲' => '𐐊',
  '𐐳' => '𐐋',
  '𐐴' => '𐐌',
  '𐐵' => '𐐍',
  '𐐶' => '𐐎',
  '𐐷' => '𐐏',
  '𐐸' => '𐐐',
  '𐐹' => '𐐑',
  '𐐺' => '𐐒',
  '𐐻' => '𐐓',
  '𐐼' => '𐐔',
  '𐐽' => '𐐕',
  '𐐾' => '𐐖',
  '𐐿' => '𐐗',
  '𐑀' => '𐐘',
  '𐑁' => '𐐙',
  '𐑂' => '𐐚',
  '𐑃' => '𐐛',
  '𐑄' => '𐐜',
  '𐑅' => '𐐝',
  '𐑆' => '𐐞',
  '𐑇' => '𐐟',
  '𐑈' => '𐐠',
  '𐑉' => '𐐡',
  '𐑊' => '𐐢',
  '𐑋' => '𐐣',
  '𐑌' => '𐐤',
  '𐑍' => '𐐥',
  '𐑎' => '𐐦',
  '𐑏' => '𐐧',
  '𐓘' => '𐒰',
  '𐓙' => '𐒱',
  '𐓚' => '𐒲',
  '𐓛' => '𐒳',
  '𐓜' => '𐒴',
  '𐓝' => '𐒵',
  '𐓞' => '𐒶',
  '𐓟' => '𐒷',
  '𐓠' => '𐒸',
  '𐓡' => '𐒹',
  '𐓢' => '𐒺',
  '𐓣' => '𐒻',
  '𐓤' => '𐒼',
  '𐓥' => '𐒽',
  '𐓦' => '𐒾',
  '𐓧' => '𐒿',
  '𐓨' => '𐓀',
  '𐓩' => '𐓁',
  '𐓪' => '𐓂',
  '𐓫' => '𐓃',
  '𐓬' => '𐓄',
  '𐓭' => '𐓅',
  '𐓮' => '𐓆',
  '𐓯' => '𐓇',
  '𐓰' => '𐓈',
  '𐓱' => '𐓉',
  '𐓲' => '𐓊',
  '𐓳' => '𐓋',
  '𐓴' => '𐓌',
  '𐓵' => '𐓍',
  '𐓶' => '𐓎',
  '𐓷' => '𐓏',
  '𐓸' => '𐓐',
  '𐓹' => '𐓑',
  '𐓺' => '𐓒',
  '𐓻' => '𐓓',
  '𐳀' => '𐲀',
  '𐳁' => '𐲁',
  '𐳂' => '𐲂',
  '𐳃' => '𐲃',
  '𐳄' => '𐲄',
  '𐳅' => '𐲅',
  '𐳆' => '𐲆',
  '𐳇' => '𐲇',
  '𐳈' => '𐲈',
  '𐳉' => '𐲉',
  '𐳊' => '𐲊',
  '𐳋' => '𐲋',
  '𐳌' => '𐲌',
  '𐳍' => '𐲍',
  '𐳎' => '𐲎',
  '𐳏' => '𐲏',
  '𐳐' => '𐲐',
  '𐳑' => '𐲑',
  '𐳒' => '𐲒',
  '𐳓' => '𐲓',
  '𐳔' => '𐲔',
  '𐳕' => '𐲕',
  '𐳖' => '𐲖',
  '𐳗' => '𐲗',
  '𐳘' => '𐲘',
  '𐳙' => '𐲙',
  '𐳚' => '𐲚',
  '𐳛' => '𐲛',
  '𐳜' => '𐲜',
  '𐳝' => '𐲝',
  '𐳞' => '𐲞',
  '𐳟' => '𐲟',
  '𐳠' => '𐲠',
  '𐳡' => '𐲡',
  '𐳢' => '𐲢',
  '𐳣' => '𐲣',
  '𐳤' => '𐲤',
  '𐳥' => '𐲥',
  '𐳦' => '𐲦',
  '𐳧' => '𐲧',
  '𐳨' => '𐲨',
  '𐳩' => '𐲩',
  '𐳪' => '𐲪',
  '𐳫' => '𐲫',
  '𐳬' => '𐲬',
  '𐳭' => '𐲭',
  '𐳮' => '𐲮',
  '𐳯' => '𐲯',
  '𐳰' => '𐲰',
  '𐳱' => '𐲱',
  '𐳲' => '𐲲',
  '𑣀' => '𑢠',
  '𑣁' => '𑢡',
  '𑣂' => '𑢢',
  '𑣃' => '𑢣',
  '𑣄' => '𑢤',
  '𑣅' => '𑢥',
  '𑣆' => '𑢦',
  '𑣇' => '𑢧',
  '𑣈' => '𑢨',
  '𑣉' => '𑢩',
  '𑣊' => '𑢪',
  '𑣋' => '𑢫',
  '𑣌' => '𑢬',
  '𑣍' => '𑢭',
  '𑣎' => '𑢮',
  '𑣏' => '𑢯',
  '𑣐' => '𑢰',
  '𑣑' => '𑢱',
  '𑣒' => '𑢲',
  '𑣓' => '𑢳',
  '𑣔' => '𑢴',
  '𑣕' => '𑢵',
  '𑣖' => '𑢶',
  '𑣗' => '𑢷',
  '𑣘' => '𑢸',
  '𑣙' => '𑢹',
  '𑣚' => '𑢺',
  '𑣛' => '𑢻',
  '𑣜' => '𑢼',
  '𑣝' => '𑢽',
  '𑣞' => '𑢾',
  '𑣟' => '𑢿',
  '𖹠' => '𖹀',
  '𖹡' => '𖹁',
  '𖹢' => '𖹂',
  '𖹣' => '𖹃',
  '𖹤' => '𖹄',
  '𖹥' => '𖹅',
  '𖹦' => '𖹆',
  '𖹧' => '𖹇',
  '𖹨' => '𖹈',
  '𖹩' => '𖹉',
  '𖹪' => '𖹊',
  '𖹫' => '𖹋',
  '𖹬' => '𖹌',
  '𖹭' => '𖹍',
  '𖹮' => '𖹎',
  '𖹯' => '𖹏',
  '𖹰' => '𖹐',
  '𖹱' => '𖹑',
  '𖹲' => '𖹒',
  '𖹳' => '𖹓',
  '𖹴' => '𖹔',
  '𖹵' => '𖹕',
  '𖹶' => '𖹖',
  '𖹷' => '𖹗',
  '𖹸' => '𖹘',
  '𖹹' => '𖹙',
  '𖹺' => '𖹚',
  '𖹻' => '𖹛',
  '𖹼' => '𖹜',
  '𖹽' => '𖹝',
  '𖹾' => '𖹞',
  '𖹿' => '𖹟',
  '𞤢' => '𞤀',
  '𞤣' => '𞤁',
  '𞤤' => '𞤂',
  '𞤥' => '𞤃',
  '𞤦' => '𞤄',
  '𞤧' => '𞤅',
  '𞤨' => '𞤆',
  '𞤩' => '𞤇',
  '𞤪' => '𞤈',
  '𞤫' => '𞤉',
  '𞤬' => '𞤊',
  '𞤭' => '𞤋',
  '𞤮' => '𞤌',
  '𞤯' => '𞤍',
  '𞤰' => '𞤎',
  '𞤱' => '𞤏',
  '𞤲' => '𞤐',
  '𞤳' => '𞤑',
  '𞤴' => '𞤒',
  '𞤵' => '𞤓',
  '𞤶' => '𞤔',
  '𞤷' => '𞤕',
  '𞤸' => '𞤖',
  '𞤹' => '𞤗',
  '𞤺' => '𞤘',
  '𞤻' => '𞤙',
  '𞤼' => '𞤚',
  '𞤽' => '𞤛',
  '𞤾' => '𞤜',
  '𞤿' => '𞤝',
  '𞥀' => '𞤞',
  '𞥁' => '𞤟',
  '𞥂' => '𞤠',
  '𞥃' => '𞤡',
  'ß' => 'SS',
  'ff' => 'FF',
  'fi' => 'FI',
  'fl' => 'FL',
  'ffi' => 'FFI',
  'ffl' => 'FFL',
  'ſt' => 'ST',
  'st' => 'ST',
  'և' => 'ԵՒ',
  'ﬓ' => 'ՄՆ',
  'ﬔ' => 'ՄԵ',
  'ﬕ' => 'ՄԻ',
  'ﬖ' => 'ՎՆ',
  'ﬗ' => 'ՄԽ',
  'ʼn' => 'ʼN',
  'ΐ' => 'Ϊ́',
  'ΰ' => 'Ϋ́',
  'ǰ' => 'J̌',
  'ẖ' => 'H̱',
  'ẗ' => 'T̈',
  'ẘ' => 'W̊',
  'ẙ' => 'Y̊',
  'ẚ' => 'Aʾ',
  'ὐ' => 'Υ̓',
  'ὒ' => 'Υ̓̀',
  'ὔ' => 'Υ̓́',
  'ὖ' => 'Υ̓͂',
  'ᾶ' => 'Α͂',
  'ῆ' => 'Η͂',
  'ῒ' => 'Ϊ̀',
  'ΐ' => 'Ϊ́',
  'ῖ' => 'Ι͂',
  'ῗ' => 'Ϊ͂',
  'ῢ' => 'Ϋ̀',
  'ΰ' => 'Ϋ́',
  'ῤ' => 'Ρ̓',
  'ῦ' => 'Υ͂',
  'ῧ' => 'Ϋ͂',
  'ῶ' => 'Ω͂',
  'ᾈ' => 'ἈΙ',
  'ᾉ' => 'ἉΙ',
  'ᾊ' => 'ἊΙ',
  'ᾋ' => 'ἋΙ',
  'ᾌ' => 'ἌΙ',
  'ᾍ' => 'ἍΙ',
  'ᾎ' => 'ἎΙ',
  'ᾏ' => 'ἏΙ',
  'ᾘ' => 'ἨΙ',
  'ᾙ' => 'ἩΙ',
  'ᾚ' => 'ἪΙ',
  'ᾛ' => 'ἫΙ',
  'ᾜ' => 'ἬΙ',
  'ᾝ' => 'ἭΙ',
  'ᾞ' => 'ἮΙ',
  'ᾟ' => 'ἯΙ',
  'ᾨ' => 'ὨΙ',
  'ᾩ' => 'ὩΙ',
  'ᾪ' => 'ὪΙ',
  'ᾫ' => 'ὫΙ',
  'ᾬ' => 'ὬΙ',
  'ᾭ' => 'ὭΙ',
  'ᾮ' => 'ὮΙ',
  'ᾯ' => 'ὯΙ',
  'ᾼ' => 'ΑΙ',
  'ῌ' => 'ΗΙ',
  'ῼ' => 'ΩΙ',
  'ᾲ' => 'ᾺΙ',
  'ᾴ' => 'ΆΙ',
  'ῂ' => 'ῊΙ',
  'ῄ' => 'ΉΙ',
  'ῲ' => 'ῺΙ',
  'ῴ' => 'ΏΙ',
  'ᾷ' => 'Α͂Ι',
  'ῇ' => 'Η͂Ι',
  'ῷ' => 'Ω͂Ι',
);
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Output;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter\NullOutputFormatter;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter\OutputFormatterInterface;
/**
 * NullOutput suppresses all output.
 *
 *     $output = new NullOutput();
 *
 * @author Fabien Potencier <fabien@symfony.com>
 * @author Tobias Schultze <http://tobion.de>
 */
class NullOutput implements OutputInterface
{
    private $formatter;
    /**
     * {@inheritdoc}
     */
    public function setFormatter(OutputFormatterInterface $formatter)
    {
        // do nothing
    }
    /**
     * {@inheritdoc}
     */
    public function getFormatter()
    {
        if ($this->formatter) {
            return $this->formatter;
        }
        // to comply with the interface we must return a OutputFormatterInterface
        return $this->formatter = new NullOutputFormatter();
    }
    /**
     * {@inheritdoc}
     */
    public function setDecorated(bool $decorated)
    {
        // do nothing
    }
    /**
     * {@inheritdoc}
     */
    public function isDecorated()
    {
        return \false;
    }
    /**
     * {@inheritdoc}
     */
    public function setVerbosity(int $level)
    {
        // do nothing
    }
    /**
     * {@inheritdoc}
     */
    public function getVerbosity()
    {
        return self::VERBOSITY_QUIET;
    }
    /**
     * {@inheritdoc}
     */
    public function isQuiet()
    {
        return \true;
    }
    /**
     * {@inheritdoc}
     */
    public function isVerbose()
    {
        return \false;
    }
    /**
     * {@inheritdoc}
     */
    public function isVeryVerbose()
    {
        return \false;
    }
    /**
     * {@inheritdoc}
     */
    public function isDebug()
    {
        return \false;
    }
    /**
     * {@inheritdoc}
     */
    public function writeln($messages, int $options = self::OUTPUT_NORMAL)
    {
        // do nothing
    }
    /**
     * {@inheritdoc}
     */
    public function write($messages, bool $newline = \false, int $options = self::OUTPUT_NORMAL)
    {
        // do nothing
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Output;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter\OutputFormatter;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter\OutputFormatterInterface;
/**
 * Base class for output classes.
 *
 * There are five levels of verbosity:
 *
 *  * normal: no option passed (normal output)
 *  * verbose: -v (more output)
 *  * very verbose: -vv (highly extended output)
 *  * debug: -vvv (all debug output)
 *  * quiet: -q (no output)
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
abstract class Output implements OutputInterface
{
    private $verbosity;
    private $formatter;
    /**
     * @param int|null                      $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface)
     * @param bool                          $decorated Whether to decorate messages
     * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter)
     */
    public function __construct(?int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = \false, OutputFormatterInterface $formatter = null)
    {
        $this->verbosity = $verbosity ?? self::VERBOSITY_NORMAL;
        $this->formatter = $formatter ?? new OutputFormatter();
        $this->formatter->setDecorated($decorated);
    }
    /**
     * {@inheritdoc}
     */
    public function setFormatter(OutputFormatterInterface $formatter)
    {
        $this->formatter = $formatter;
    }
    /**
     * {@inheritdoc}
     */
    public function getFormatter()
    {
        return $this->formatter;
    }
    /**
     * {@inheritdoc}
     */
    public function setDecorated(bool $decorated)
    {
        $this->formatter->setDecorated($decorated);
    }
    /**
     * {@inheritdoc}
     */
    public function isDecorated()
    {
        return $this->formatter->isDecorated();
    }
    /**
     * {@inheritdoc}
     */
    public function setVerbosity(int $level)
    {
        $this->verbosity = $level;
    }
    /**
     * {@inheritdoc}
     */
    public function getVerbosity()
    {
        return $this->verbosity;
    }
    /**
     * {@inheritdoc}
     */
    public function isQuiet()
    {
        return self::VERBOSITY_QUIET === $this->verbosity;
    }
    /**
     * {@inheritdoc}
     */
    public function isVerbose()
    {
        return self::VERBOSITY_VERBOSE <= $this->verbosity;
    }
    /**
     * {@inheritdoc}
     */
    public function isVeryVerbose()
    {
        return self::VERBOSITY_VERY_VERBOSE <= $this->verbosity;
    }
    /**
     * {@inheritdoc}
     */
    public function isDebug()
    {
        return self::VERBOSITY_DEBUG <= $this->verbosity;
    }
    /**
     * {@inheritdoc}
     */
    public function writeln($messages, int $options = self::OUTPUT_NORMAL)
    {
        $this->write($messages, \true, $options);
    }
    /**
     * {@inheritdoc}
     */
    public function write($messages, bool $newline = \false, int $options = self::OUTPUT_NORMAL)
    {
        if (!\is_iterable($messages)) {
            $messages = [$messages];
        }
        $types = self::OUTPUT_NORMAL | self::OUTPUT_RAW | self::OUTPUT_PLAIN;
        $type = $types & $options ?: self::OUTPUT_NORMAL;
        $verbosities = self::VERBOSITY_QUIET | self::VERBOSITY_NORMAL | self::VERBOSITY_VERBOSE | self::VERBOSITY_VERY_VERBOSE | self::VERBOSITY_DEBUG;
        $verbosity = $verbosities & $options ?: self::VERBOSITY_NORMAL;
        if ($verbosity > $this->getVerbosity()) {
            return;
        }
        foreach ($messages as $message) {
            switch ($type) {
                case OutputInterface::OUTPUT_NORMAL:
                    $message = $this->formatter->format($message);
                    break;
                case OutputInterface::OUTPUT_RAW:
                    break;
                case OutputInterface::OUTPUT_PLAIN:
                    $message = \strip_tags($this->formatter->format($message));
                    break;
            }
            $this->doWrite($message ?? '', $newline);
        }
    }
    /**
     * Writes a message to the output.
     */
    protected abstract function doWrite(string $message, bool $newline);
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Output;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter\OutputFormatterInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper\Helper;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Terminal;
/**
 * @author Pierre du Plessis <pdples@gmail.com>
 * @author Gabriel Ostrolucký <gabriel.ostrolucky@gmail.com>
 */
class ConsoleSectionOutput extends StreamOutput
{
    private $content = [];
    private $lines = 0;
    private $sections;
    private $terminal;
    /**
     * @param resource               $stream
     * @param ConsoleSectionOutput[] $sections
     */
    public function __construct($stream, array &$sections, int $verbosity, bool $decorated, OutputFormatterInterface $formatter)
    {
        parent::__construct($stream, $verbosity, $decorated, $formatter);
        \array_unshift($sections, $this);
        $this->sections =& $sections;
        $this->terminal = new Terminal();
    }
    /**
     * Clears previous output for this section.
     *
     * @param int $lines Number of lines to clear. If null, then the entire output of this section is cleared
     */
    public function clear(int $lines = null)
    {
        if (empty($this->content) || !$this->isDecorated()) {
            return;
        }
        if ($lines) {
            \array_splice($this->content, -($lines * 2));
            // Multiply lines by 2 to cater for each new line added between content
        } else {
            $lines = $this->lines;
            $this->content = [];
        }
        $this->lines -= $lines;
        parent::doWrite($this->popStreamContentUntilCurrentSection($lines), \false);
    }
    /**
     * Overwrites the previous output with a new message.
     *
     * @param array|string $message
     */
    public function overwrite($message)
    {
        $this->clear();
        $this->writeln($message);
    }
    public function getContent() : string
    {
        return \implode('', $this->content);
    }
    /**
     * @internal
     */
    public function addContent(string $input)
    {
        foreach (\explode(\PHP_EOL, $input) as $lineContent) {
            $this->lines += \ceil($this->getDisplayLength($lineContent) / $this->terminal->getWidth()) ?: 1;
            $this->content[] = $lineContent;
            $this->content[] = \PHP_EOL;
        }
    }
    /**
     * {@inheritdoc}
     */
    protected function doWrite(string $message, bool $newline)
    {
        if (!$this->isDecorated()) {
            parent::doWrite($message, $newline);
            return;
        }
        $erasedContent = $this->popStreamContentUntilCurrentSection();
        $this->addContent($message);
        parent::doWrite($message, \true);
        parent::doWrite($erasedContent, \false);
    }
    /**
     * At initial stage, cursor is at the end of stream output. This method makes cursor crawl upwards until it hits
     * current section. Then it erases content it crawled through. Optionally, it erases part of current section too.
     */
    private function popStreamContentUntilCurrentSection(int $numberOfLinesToClearFromCurrentSection = 0) : string
    {
        $numberOfLinesToClear = $numberOfLinesToClearFromCurrentSection;
        $erasedContent = [];
        foreach ($this->sections as $section) {
            if ($section === $this) {
                break;
            }
            $numberOfLinesToClear += $section->lines;
            $erasedContent[] = $section->getContent();
        }
        if ($numberOfLinesToClear > 0) {
            // move cursor up n lines
            parent::doWrite(\sprintf("\x1b[%dA", $numberOfLinesToClear), \false);
            // erase to end of screen
            parent::doWrite("\x1b[0J", \false);
        }
        return \implode('', \array_reverse($erasedContent));
    }
    private function getDisplayLength(string $text) : int
    {
        return Helper::width(Helper::removeDecoration($this->getFormatter(), \str_replace("\t", '        ', $text)));
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Output;

/**
 * @author Jean-François Simon <contact@jfsimon.fr>
 */
class BufferedOutput extends Output
{
    private $buffer = '';
    /**
     * Empties buffer and returns its content.
     *
     * @return string
     */
    public function fetch()
    {
        $content = $this->buffer;
        $this->buffer = '';
        return $content;
    }
    /**
     * {@inheritdoc}
     */
    protected function doWrite(string $message, bool $newline)
    {
        $this->buffer .= $message;
        if ($newline) {
            $this->buffer .= \PHP_EOL;
        }
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Output;

/**
 * ConsoleOutputInterface is the interface implemented by ConsoleOutput class.
 * This adds information about stderr and section output stream.
 *
 * @author Dariusz Górecki <darek.krk@gmail.com>
 */
interface ConsoleOutputInterface extends OutputInterface
{
    /**
     * Gets the OutputInterface for errors.
     *
     * @return OutputInterface
     */
    public function getErrorOutput();
    public function setErrorOutput(OutputInterface $error);
    public function section() : ConsoleSectionOutput;
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Output;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\InvalidArgumentException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter\OutputFormatterInterface;
/**
 * StreamOutput writes the output to a given stream.
 *
 * Usage:
 *
 *     $output = new StreamOutput(fopen('php://stdout', 'w'));
 *
 * As `StreamOutput` can use any stream, you can also use a file:
 *
 *     $output = new StreamOutput(fopen('/path/to/output.log', 'a', false));
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class StreamOutput extends Output
{
    private $stream;
    /**
     * @param resource                      $stream    A stream resource
     * @param int                           $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface)
     * @param bool|null                     $decorated Whether to decorate messages (null for auto-guessing)
     * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter)
     *
     * @throws InvalidArgumentException When first argument is not a real stream
     */
    public function __construct($stream, int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = null, OutputFormatterInterface $formatter = null)
    {
        if (!\is_resource($stream) || 'stream' !== \get_resource_type($stream)) {
            throw new InvalidArgumentException('The StreamOutput class needs a stream as its first argument.');
        }
        $this->stream = $stream;
        if (null === $decorated) {
            $decorated = $this->hasColorSupport();
        }
        parent::__construct($verbosity, $decorated, $formatter);
    }
    /**
     * Gets the stream attached to this StreamOutput instance.
     *
     * @return resource
     */
    public function getStream()
    {
        return $this->stream;
    }
    /**
     * {@inheritdoc}
     */
    protected function doWrite(string $message, bool $newline)
    {
        if ($newline) {
            $message .= \PHP_EOL;
        }
        @\fwrite($this->stream, $message);
        \fflush($this->stream);
    }
    /**
     * Returns true if the stream supports colorization.
     *
     * Colorization is disabled if not supported by the stream:
     *
     * This is tricky on Windows, because Cygwin, Msys2 etc emulate pseudo
     * terminals via named pipes, so we can only check the environment.
     *
     * Reference: Composer\XdebugHandler\Process::supportsColor
     * https://github.com/composer/xdebug-handler
     *
     * @return bool true if the stream supports colorization, false otherwise
     */
    protected function hasColorSupport()
    {
        // Follow https://no-color.org/
        if (isset($_SERVER['NO_COLOR']) || \false !== \getenv('NO_COLOR')) {
            return \false;
        }
        if ('Hyper' === \getenv('TERM_PROGRAM')) {
            return \true;
        }
        if (\DIRECTORY_SEPARATOR === '\\') {
            return \function_exists('sapi_windows_vt100_support') && @\sapi_windows_vt100_support($this->stream) || \false !== \getenv('ANSICON') || 'ON' === \getenv('ConEmuANSI') || 'xterm' === \getenv('TERM');
        }
        return \stream_isatty($this->stream);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Output;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\InvalidArgumentException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter\OutputFormatterInterface;
/**
 * A BufferedOutput that keeps only the last N chars.
 *
 * @author Jérémy Derussé <jeremy@derusse.com>
 */
class TrimmedBufferOutput extends Output
{
    private $maxLength;
    private $buffer = '';
    public function __construct(int $maxLength, ?int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = \false, OutputFormatterInterface $formatter = null)
    {
        if ($maxLength <= 0) {
            throw new InvalidArgumentException(\sprintf('"%s()" expects a strictly positive maxLength. Got %d.', __METHOD__, $maxLength));
        }
        parent::__construct($verbosity, $decorated, $formatter);
        $this->maxLength = $maxLength;
    }
    /**
     * Empties buffer and returns its content.
     *
     * @return string
     */
    public function fetch()
    {
        $content = $this->buffer;
        $this->buffer = '';
        return $content;
    }
    /**
     * {@inheritdoc}
     */
    protected function doWrite(string $message, bool $newline)
    {
        $this->buffer .= $message;
        if ($newline) {
            $this->buffer .= \PHP_EOL;
        }
        $this->buffer = \substr($this->buffer, 0 - $this->maxLength);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Output;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter\OutputFormatterInterface;
/**
 * OutputInterface is the interface implemented by all Output classes.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
interface OutputInterface
{
    public const VERBOSITY_QUIET = 16;
    public const VERBOSITY_NORMAL = 32;
    public const VERBOSITY_VERBOSE = 64;
    public const VERBOSITY_VERY_VERBOSE = 128;
    public const VERBOSITY_DEBUG = 256;
    public const OUTPUT_NORMAL = 1;
    public const OUTPUT_RAW = 2;
    public const OUTPUT_PLAIN = 4;
    /**
     * Writes a message to the output.
     *
     * @param string|iterable $messages The message as an iterable of strings or a single string
     * @param bool            $newline  Whether to add a newline
     * @param int             $options  A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL
     */
    public function write($messages, bool $newline = \false, int $options = 0);
    /**
     * Writes a message to the output and adds a newline at the end.
     *
     * @param string|iterable $messages The message as an iterable of strings or a single string
     * @param int             $options  A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL
     */
    public function writeln($messages, int $options = 0);
    /**
     * Sets the verbosity of the output.
     */
    public function setVerbosity(int $level);
    /**
     * Gets the current verbosity of the output.
     *
     * @return int
     */
    public function getVerbosity();
    /**
     * Returns whether verbosity is quiet (-q).
     *
     * @return bool
     */
    public function isQuiet();
    /**
     * Returns whether verbosity is verbose (-v).
     *
     * @return bool
     */
    public function isVerbose();
    /**
     * Returns whether verbosity is very verbose (-vv).
     *
     * @return bool
     */
    public function isVeryVerbose();
    /**
     * Returns whether verbosity is debug (-vvv).
     *
     * @return bool
     */
    public function isDebug();
    /**
     * Sets the decorated flag.
     */
    public function setDecorated(bool $decorated);
    /**
     * Gets the decorated flag.
     *
     * @return bool
     */
    public function isDecorated();
    public function setFormatter(OutputFormatterInterface $formatter);
    /**
     * Returns current output formatter instance.
     *
     * @return OutputFormatterInterface
     */
    public function getFormatter();
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Output;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter\OutputFormatterInterface;
/**
 * ConsoleOutput is the default class for all CLI output. It uses STDOUT and STDERR.
 *
 * This class is a convenient wrapper around `StreamOutput` for both STDOUT and STDERR.
 *
 *     $output = new ConsoleOutput();
 *
 * This is equivalent to:
 *
 *     $output = new StreamOutput(fopen('php://stdout', 'w'));
 *     $stdErr = new StreamOutput(fopen('php://stderr', 'w'));
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface
{
    private $stderr;
    private $consoleSectionOutputs = [];
    /**
     * @param int                           $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface)
     * @param bool|null                     $decorated Whether to decorate messages (null for auto-guessing)
     * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter)
     */
    public function __construct(int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = null, OutputFormatterInterface $formatter = null)
    {
        parent::__construct($this->openOutputStream(), $verbosity, $decorated, $formatter);
        if (null === $formatter) {
            // for BC reasons, stdErr has it own Formatter only when user don't inject a specific formatter.
            $this->stderr = new StreamOutput($this->openErrorStream(), $verbosity, $decorated);
            return;
        }
        $actualDecorated = $this->isDecorated();
        $this->stderr = new StreamOutput($this->openErrorStream(), $verbosity, $decorated, $this->getFormatter());
        if (null === $decorated) {
            $this->setDecorated($actualDecorated && $this->stderr->isDecorated());
        }
    }
    /**
     * Creates a new output section.
     */
    public function section() : ConsoleSectionOutput
    {
        return new ConsoleSectionOutput($this->getStream(), $this->consoleSectionOutputs, $this->getVerbosity(), $this->isDecorated(), $this->getFormatter());
    }
    /**
     * {@inheritdoc}
     */
    public function setDecorated(bool $decorated)
    {
        parent::setDecorated($decorated);
        $this->stderr->setDecorated($decorated);
    }
    /**
     * {@inheritdoc}
     */
    public function setFormatter(OutputFormatterInterface $formatter)
    {
        parent::setFormatter($formatter);
        $this->stderr->setFormatter($formatter);
    }
    /**
     * {@inheritdoc}
     */
    public function setVerbosity(int $level)
    {
        parent::setVerbosity($level);
        $this->stderr->setVerbosity($level);
    }
    /**
     * {@inheritdoc}
     */
    public function getErrorOutput()
    {
        return $this->stderr;
    }
    /**
     * {@inheritdoc}
     */
    public function setErrorOutput(OutputInterface $error)
    {
        $this->stderr = $error;
    }
    /**
     * Returns true if current environment supports writing console output to
     * STDOUT.
     *
     * @return bool
     */
    protected function hasStdoutSupport()
    {
        return \false === $this->isRunningOS400();
    }
    /**
     * Returns true if current environment supports writing console output to
     * STDERR.
     *
     * @return bool
     */
    protected function hasStderrSupport()
    {
        return \false === $this->isRunningOS400();
    }
    /**
     * Checks if current executing environment is IBM iSeries (OS400), which
     * doesn't properly convert character-encodings between ASCII to EBCDIC.
     */
    private function isRunningOS400() : bool
    {
        $checks = [\function_exists('php_uname') ? \php_uname('s') : '', \getenv('OSTYPE'), \PHP_OS];
        return \false !== \stripos(\implode(';', $checks), 'OS400');
    }
    /**
     * @return resource
     */
    private function openOutputStream()
    {
        if (!$this->hasStdoutSupport()) {
            return \fopen('php://output', 'w');
        }
        // Use STDOUT when possible to prevent from opening too many file descriptors
        return \defined('STDOUT') ? \STDOUT : (@\fopen('php://stdout', 'w') ?: \fopen('php://output', 'w'));
    }
    /**
     * @return resource
     */
    private function openErrorStream()
    {
        if (!$this->hasStderrSupport()) {
            return \fopen('php://output', 'w');
        }
        // Use STDERR when possible to prevent from opening too many file descriptors
        return \defined('STDERR') ? \STDERR : (@\fopen('php://stderr', 'w') ?: \fopen('php://output', 'w'));
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\SignalRegistry;

final class SignalRegistry
{
    private $signalHandlers = [];
    public function __construct()
    {
        if (\function_exists('pcntl_async_signals')) {
            \pcntl_async_signals(\true);
        }
    }
    public function register(int $signal, callable $signalHandler) : void
    {
        if (!isset($this->signalHandlers[$signal])) {
            $previousCallback = \pcntl_signal_get_handler($signal);
            if (\is_callable($previousCallback)) {
                $this->signalHandlers[$signal][] = $previousCallback;
            }
        }
        $this->signalHandlers[$signal][] = $signalHandler;
        \pcntl_signal($signal, [$this, 'handle']);
    }
    public static function isSupported() : bool
    {
        if (!\function_exists('pcntl_signal')) {
            return \false;
        }
        if (\in_array('pcntl_signal', \explode(',', \ini_get('disable_functions')))) {
            return \false;
        }
        return \true;
    }
    /**
     * @internal
     */
    public function handle(int $signal) : void
    {
        $count = \count($this->signalHandlers[$signal]);
        foreach ($this->signalHandlers[$signal] as $i => $signalHandler) {
            $hasNext = $i !== $count - 1;
            $signalHandler($signal, $hasNext);
        }
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\CommandLoader;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\Command;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\CommandNotFoundException;
/**
 * @author Robin Chalas <robin.chalas@gmail.com>
 */
interface CommandLoaderInterface
{
    /**
     * Loads a command.
     *
     * @return Command
     *
     * @throws CommandNotFoundException
     */
    public function get(string $name);
    /**
     * Checks if a command exists.
     *
     * @return bool
     */
    public function has(string $name);
    /**
     * @return string[]
     */
    public function getNames();
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\CommandLoader;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\CommandNotFoundException;
/**
 * A simple command loader using factories to instantiate commands lazily.
 *
 * @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
 */
class FactoryCommandLoader implements CommandLoaderInterface
{
    private $factories;
    /**
     * @param callable[] $factories Indexed by command names
     */
    public function __construct(array $factories)
    {
        $this->factories = $factories;
    }
    /**
     * {@inheritdoc}
     */
    public function has(string $name)
    {
        return isset($this->factories[$name]);
    }
    /**
     * {@inheritdoc}
     */
    public function get(string $name)
    {
        if (!isset($this->factories[$name])) {
            throw new CommandNotFoundException(\sprintf('Command "%s" does not exist.', $name));
        }
        $factory = $this->factories[$name];
        return $factory();
    }
    /**
     * {@inheritdoc}
     */
    public function getNames()
    {
        return \array_keys($this->factories);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\CommandLoader;

use _PHPStan_dcc7b7cff\Psr\Container\ContainerInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\CommandNotFoundException;
/**
 * Loads commands from a PSR-11 container.
 *
 * @author Robin Chalas <robin.chalas@gmail.com>
 */
class ContainerCommandLoader implements CommandLoaderInterface
{
    private $container;
    private $commandMap;
    /**
     * @param array $commandMap An array with command names as keys and service ids as values
     */
    public function __construct(ContainerInterface $container, array $commandMap)
    {
        $this->container = $container;
        $this->commandMap = $commandMap;
    }
    /**
     * {@inheritdoc}
     */
    public function get(string $name)
    {
        if (!$this->has($name)) {
            throw new CommandNotFoundException(\sprintf('Command "%s" does not exist.', $name));
        }
        return $this->container->get($this->commandMap[$name]);
    }
    /**
     * {@inheritdoc}
     */
    public function has(string $name)
    {
        return isset($this->commandMap[$name]) && $this->container->has($this->commandMap[$name]);
    }
    /**
     * {@inheritdoc}
     */
    public function getNames()
    {
        return \array_keys($this->commandMap);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\Command;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
/**
 * @author Grégoire Pineau <lyrixx@lyrixx.info>
 */
class SingleCommandApplication extends Command
{
    private $version = 'UNKNOWN';
    private $autoExit = \true;
    private $running = \false;
    /**
     * @return $this
     */
    public function setVersion(string $version) : self
    {
        $this->version = $version;
        return $this;
    }
    /**
     * @final
     *
     * @return $this
     */
    public function setAutoExit(bool $autoExit) : self
    {
        $this->autoExit = $autoExit;
        return $this;
    }
    public function run(InputInterface $input = null, OutputInterface $output = null) : int
    {
        if ($this->running) {
            return parent::run($input, $output);
        }
        // We use the command name as the application name
        $application = new Application($this->getName() ?: 'UNKNOWN', $this->version);
        $application->setAutoExit($this->autoExit);
        // Fix the usage of the command displayed with "--help"
        $this->setName($_SERVER['argv'][0]);
        $application->add($this);
        $application->setDefaultCommand($this->getName(), \true);
        $this->running = \true;
        try {
            $ret = $application->run($input, $output);
        } finally {
            $this->running = \false;
        }
        return $ret ?? 1;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Question;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\InvalidArgumentException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\LogicException;
/**
 * Represents a Question.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class Question
{
    private $question;
    private $attempts;
    private $hidden = \false;
    private $hiddenFallback = \true;
    private $autocompleterCallback;
    private $validator;
    private $default;
    private $normalizer;
    private $trimmable = \true;
    private $multiline = \false;
    /**
     * @param string                     $question The question to ask to the user
     * @param string|bool|int|float|null $default  The default answer to return if the user enters nothing
     */
    public function __construct(string $question, $default = null)
    {
        $this->question = $question;
        $this->default = $default;
    }
    /**
     * Returns the question.
     *
     * @return string
     */
    public function getQuestion()
    {
        return $this->question;
    }
    /**
     * Returns the default answer.
     *
     * @return string|bool|int|float|null
     */
    public function getDefault()
    {
        return $this->default;
    }
    /**
     * Returns whether the user response accepts newline characters.
     */
    public function isMultiline() : bool
    {
        return $this->multiline;
    }
    /**
     * Sets whether the user response should accept newline characters.
     *
     * @return $this
     */
    public function setMultiline(bool $multiline) : self
    {
        $this->multiline = $multiline;
        return $this;
    }
    /**
     * Returns whether the user response must be hidden.
     *
     * @return bool
     */
    public function isHidden()
    {
        return $this->hidden;
    }
    /**
     * Sets whether the user response must be hidden or not.
     *
     * @return $this
     *
     * @throws LogicException In case the autocompleter is also used
     */
    public function setHidden(bool $hidden)
    {
        if ($this->autocompleterCallback) {
            throw new LogicException('A hidden question cannot use the autocompleter.');
        }
        $this->hidden = $hidden;
        return $this;
    }
    /**
     * In case the response cannot be hidden, whether to fallback on non-hidden question or not.
     *
     * @return bool
     */
    public function isHiddenFallback()
    {
        return $this->hiddenFallback;
    }
    /**
     * Sets whether to fallback on non-hidden question if the response cannot be hidden.
     *
     * @return $this
     */
    public function setHiddenFallback(bool $fallback)
    {
        $this->hiddenFallback = $fallback;
        return $this;
    }
    /**
     * Gets values for the autocompleter.
     *
     * @return iterable|null
     */
    public function getAutocompleterValues()
    {
        $callback = $this->getAutocompleterCallback();
        return $callback ? $callback('') : null;
    }
    /**
     * Sets values for the autocompleter.
     *
     * @return $this
     *
     * @throws LogicException
     */
    public function setAutocompleterValues(?iterable $values)
    {
        if (\is_array($values)) {
            $values = $this->isAssoc($values) ? \array_merge(\array_keys($values), \array_values($values)) : \array_values($values);
            $callback = static function () use($values) {
                return $values;
            };
        } elseif ($values instanceof \Traversable) {
            $valueCache = null;
            $callback = static function () use($values, &$valueCache) {
                return $valueCache ?? ($valueCache = \iterator_to_array($values, \false));
            };
        } else {
            $callback = null;
        }
        return $this->setAutocompleterCallback($callback);
    }
    /**
     * Gets the callback function used for the autocompleter.
     */
    public function getAutocompleterCallback() : ?callable
    {
        return $this->autocompleterCallback;
    }
    /**
     * Sets the callback function used for the autocompleter.
     *
     * The callback is passed the user input as argument and should return an iterable of corresponding suggestions.
     *
     * @return $this
     */
    public function setAutocompleterCallback(callable $callback = null) : self
    {
        if ($this->hidden && null !== $callback) {
            throw new LogicException('A hidden question cannot use the autocompleter.');
        }
        $this->autocompleterCallback = $callback;
        return $this;
    }
    /**
     * Sets a validator for the question.
     *
     * @return $this
     */
    public function setValidator(callable $validator = null)
    {
        $this->validator = $validator;
        return $this;
    }
    /**
     * Gets the validator for the question.
     *
     * @return callable|null
     */
    public function getValidator()
    {
        return $this->validator;
    }
    /**
     * Sets the maximum number of attempts.
     *
     * Null means an unlimited number of attempts.
     *
     * @return $this
     *
     * @throws InvalidArgumentException in case the number of attempts is invalid
     */
    public function setMaxAttempts(?int $attempts)
    {
        if (null !== $attempts && $attempts < 1) {
            throw new InvalidArgumentException('Maximum number of attempts must be a positive value.');
        }
        $this->attempts = $attempts;
        return $this;
    }
    /**
     * Gets the maximum number of attempts.
     *
     * Null means an unlimited number of attempts.
     *
     * @return int|null
     */
    public function getMaxAttempts()
    {
        return $this->attempts;
    }
    /**
     * Sets a normalizer for the response.
     *
     * The normalizer can be a callable (a string), a closure or a class implementing __invoke.
     *
     * @return $this
     */
    public function setNormalizer(callable $normalizer)
    {
        $this->normalizer = $normalizer;
        return $this;
    }
    /**
     * Gets the normalizer for the response.
     *
     * The normalizer can ba a callable (a string), a closure or a class implementing __invoke.
     *
     * @return callable|null
     */
    public function getNormalizer()
    {
        return $this->normalizer;
    }
    protected function isAssoc(array $array)
    {
        return (bool) \count(\array_filter(\array_keys($array), 'is_string'));
    }
    public function isTrimmable() : bool
    {
        return $this->trimmable;
    }
    /**
     * @return $this
     */
    public function setTrimmable(bool $trimmable) : self
    {
        $this->trimmable = $trimmable;
        return $this;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Question;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\InvalidArgumentException;
/**
 * Represents a choice question.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class ChoiceQuestion extends Question
{
    private $choices;
    private $multiselect = \false;
    private $prompt = ' > ';
    private $errorMessage = 'Value "%s" is invalid';
    /**
     * @param string $question The question to ask to the user
     * @param array  $choices  The list of available choices
     * @param mixed  $default  The default answer to return
     */
    public function __construct(string $question, array $choices, $default = null)
    {
        if (!$choices) {
            throw new \LogicException('Choice question must have at least 1 choice available.');
        }
        parent::__construct($question, $default);
        $this->choices = $choices;
        $this->setValidator($this->getDefaultValidator());
        $this->setAutocompleterValues($choices);
    }
    /**
     * Returns available choices.
     *
     * @return array
     */
    public function getChoices()
    {
        return $this->choices;
    }
    /**
     * Sets multiselect option.
     *
     * When multiselect is set to true, multiple choices can be answered.
     *
     * @return $this
     */
    public function setMultiselect(bool $multiselect)
    {
        $this->multiselect = $multiselect;
        $this->setValidator($this->getDefaultValidator());
        return $this;
    }
    /**
     * Returns whether the choices are multiselect.
     *
     * @return bool
     */
    public function isMultiselect()
    {
        return $this->multiselect;
    }
    /**
     * Gets the prompt for choices.
     *
     * @return string
     */
    public function getPrompt()
    {
        return $this->prompt;
    }
    /**
     * Sets the prompt for choices.
     *
     * @return $this
     */
    public function setPrompt(string $prompt)
    {
        $this->prompt = $prompt;
        return $this;
    }
    /**
     * Sets the error message for invalid values.
     *
     * The error message has a string placeholder (%s) for the invalid value.
     *
     * @return $this
     */
    public function setErrorMessage(string $errorMessage)
    {
        $this->errorMessage = $errorMessage;
        $this->setValidator($this->getDefaultValidator());
        return $this;
    }
    private function getDefaultValidator() : callable
    {
        $choices = $this->choices;
        $errorMessage = $this->errorMessage;
        $multiselect = $this->multiselect;
        $isAssoc = $this->isAssoc($choices);
        return function ($selected) use($choices, $errorMessage, $multiselect, $isAssoc) {
            if ($multiselect) {
                // Check for a separated comma values
                if (!\preg_match('/^[^,]+(?:,[^,]+)*$/', (string) $selected, $matches)) {
                    throw new InvalidArgumentException(\sprintf($errorMessage, $selected));
                }
                $selectedChoices = \explode(',', (string) $selected);
            } else {
                $selectedChoices = [$selected];
            }
            if ($this->isTrimmable()) {
                foreach ($selectedChoices as $k => $v) {
                    $selectedChoices[$k] = \trim((string) $v);
                }
            }
            $multiselectChoices = [];
            foreach ($selectedChoices as $value) {
                $results = [];
                foreach ($choices as $key => $choice) {
                    if ($choice === $value) {
                        $results[] = $key;
                    }
                }
                if (\count($results) > 1) {
                    throw new InvalidArgumentException(\sprintf('The provided answer is ambiguous. Value should be one of "%s".', \implode('" or "', $results)));
                }
                $result = \array_search($value, $choices);
                if (!$isAssoc) {
                    if (\false !== $result) {
                        $result = $choices[$result];
                    } elseif (isset($choices[$value])) {
                        $result = $choices[$value];
                    }
                } elseif (\false === $result && isset($choices[$value])) {
                    $result = $value;
                }
                if (\false === $result) {
                    throw new InvalidArgumentException(\sprintf($errorMessage, $value));
                }
                // For associative choices, consistently return the key as string:
                $multiselectChoices[] = $isAssoc ? (string) $result : $result;
            }
            if ($multiselect) {
                return $multiselectChoices;
            }
            return \current($multiselectChoices);
        };
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Question;

/**
 * Represents a yes/no question.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class ConfirmationQuestion extends Question
{
    private $trueAnswerRegex;
    /**
     * @param string $question        The question to ask to the user
     * @param bool   $default         The default answer to return, true or false
     * @param string $trueAnswerRegex A regex to match the "yes" answer
     */
    public function __construct(string $question, bool $default = \true, string $trueAnswerRegex = '/^y/i')
    {
        parent::__construct($question, $default);
        $this->trueAnswerRegex = $trueAnswerRegex;
        $this->setNormalizer($this->getDefaultNormalizer());
    }
    /**
     * Returns the default answer normalizer.
     */
    private function getDefaultNormalizer() : callable
    {
        $default = $this->getDefault();
        $regex = $this->trueAnswerRegex;
        return function ($answer) use($default, $regex) {
            if (\is_bool($answer)) {
                return $answer;
            }
            $answerIsTrue = (bool) \preg_match($regex, $answer);
            if (\false === $default) {
                return $answer && $answerIsTrue;
            }
            return '' === $answer || $answerIsTrue;
        };
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Input;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\InvalidArgumentException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\RuntimeException;
/**
 * Input is the base class for all concrete Input classes.
 *
 * Three concrete classes are provided by default:
 *
 *  * `ArgvInput`: The input comes from the CLI arguments (argv)
 *  * `StringInput`: The input is provided as a string
 *  * `ArrayInput`: The input is provided as an array
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
abstract class Input implements InputInterface, StreamableInputInterface
{
    protected $definition;
    protected $stream;
    protected $options = [];
    protected $arguments = [];
    protected $interactive = \true;
    public function __construct(InputDefinition $definition = null)
    {
        if (null === $definition) {
            $this->definition = new InputDefinition();
        } else {
            $this->bind($definition);
            $this->validate();
        }
    }
    /**
     * {@inheritdoc}
     */
    public function bind(InputDefinition $definition)
    {
        $this->arguments = [];
        $this->options = [];
        $this->definition = $definition;
        $this->parse();
    }
    /**
     * Processes command line arguments.
     */
    protected abstract function parse();
    /**
     * {@inheritdoc}
     */
    public function validate()
    {
        $definition = $this->definition;
        $givenArguments = $this->arguments;
        $missingArguments = \array_filter(\array_keys($definition->getArguments()), function ($argument) use($definition, $givenArguments) {
            return !\array_key_exists($argument, $givenArguments) && $definition->getArgument($argument)->isRequired();
        });
        if (\count($missingArguments) > 0) {
            throw new RuntimeException(\sprintf('Not enough arguments (missing: "%s").', \implode(', ', $missingArguments)));
        }
    }
    /**
     * {@inheritdoc}
     */
    public function isInteractive()
    {
        return $this->interactive;
    }
    /**
     * {@inheritdoc}
     */
    public function setInteractive(bool $interactive)
    {
        $this->interactive = $interactive;
    }
    /**
     * {@inheritdoc}
     */
    public function getArguments()
    {
        return \array_merge($this->definition->getArgumentDefaults(), $this->arguments);
    }
    /**
     * {@inheritdoc}
     */
    public function getArgument(string $name)
    {
        if (!$this->definition->hasArgument($name)) {
            throw new InvalidArgumentException(\sprintf('The "%s" argument does not exist.', $name));
        }
        return $this->arguments[$name] ?? $this->definition->getArgument($name)->getDefault();
    }
    /**
     * {@inheritdoc}
     */
    public function setArgument(string $name, $value)
    {
        if (!$this->definition->hasArgument($name)) {
            throw new InvalidArgumentException(\sprintf('The "%s" argument does not exist.', $name));
        }
        $this->arguments[$name] = $value;
    }
    /**
     * {@inheritdoc}
     */
    public function hasArgument(string $name)
    {
        return $this->definition->hasArgument($name);
    }
    /**
     * {@inheritdoc}
     */
    public function getOptions()
    {
        return \array_merge($this->definition->getOptionDefaults(), $this->options);
    }
    /**
     * {@inheritdoc}
     */
    public function getOption(string $name)
    {
        if ($this->definition->hasNegation($name)) {
            if (null === ($value = $this->getOption($this->definition->negationToName($name)))) {
                return $value;
            }
            return !$value;
        }
        if (!$this->definition->hasOption($name)) {
            throw new InvalidArgumentException(\sprintf('The "%s" option does not exist.', $name));
        }
        return \array_key_exists($name, $this->options) ? $this->options[$name] : $this->definition->getOption($name)->getDefault();
    }
    /**
     * {@inheritdoc}
     */
    public function setOption(string $name, $value)
    {
        if ($this->definition->hasNegation($name)) {
            $this->options[$this->definition->negationToName($name)] = !$value;
            return;
        } elseif (!$this->definition->hasOption($name)) {
            throw new InvalidArgumentException(\sprintf('The "%s" option does not exist.', $name));
        }
        $this->options[$name] = $value;
    }
    /**
     * {@inheritdoc}
     */
    public function hasOption(string $name)
    {
        return $this->definition->hasOption($name) || $this->definition->hasNegation($name);
    }
    /**
     * Escapes a token through escapeshellarg if it contains unsafe chars.
     *
     * @return string
     */
    public function escapeToken(string $token)
    {
        return \preg_match('{^[\\w-]+$}', $token) ? $token : \escapeshellarg($token);
    }
    /**
     * {@inheritdoc}
     */
    public function setStream($stream)
    {
        $this->stream = $stream;
    }
    /**
     * {@inheritdoc}
     */
    public function getStream()
    {
        return $this->stream;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Input;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\InvalidArgumentException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\LogicException;
/**
 * A InputDefinition represents a set of valid command line arguments and options.
 *
 * Usage:
 *
 *     $definition = new InputDefinition([
 *         new InputArgument('name', InputArgument::REQUIRED),
 *         new InputOption('foo', 'f', InputOption::VALUE_REQUIRED),
 *     ]);
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class InputDefinition
{
    private $arguments;
    private $requiredCount;
    private $lastArrayArgument;
    private $lastOptionalArgument;
    private $options;
    private $negations;
    private $shortcuts;
    /**
     * @param array $definition An array of InputArgument and InputOption instance
     */
    public function __construct(array $definition = [])
    {
        $this->setDefinition($definition);
    }
    /**
     * Sets the definition of the input.
     */
    public function setDefinition(array $definition)
    {
        $arguments = [];
        $options = [];
        foreach ($definition as $item) {
            if ($item instanceof InputOption) {
                $options[] = $item;
            } else {
                $arguments[] = $item;
            }
        }
        $this->setArguments($arguments);
        $this->setOptions($options);
    }
    /**
     * Sets the InputArgument objects.
     *
     * @param InputArgument[] $arguments An array of InputArgument objects
     */
    public function setArguments(array $arguments = [])
    {
        $this->arguments = [];
        $this->requiredCount = 0;
        $this->lastOptionalArgument = null;
        $this->lastArrayArgument = null;
        $this->addArguments($arguments);
    }
    /**
     * Adds an array of InputArgument objects.
     *
     * @param InputArgument[] $arguments An array of InputArgument objects
     */
    public function addArguments(?array $arguments = [])
    {
        if (null !== $arguments) {
            foreach ($arguments as $argument) {
                $this->addArgument($argument);
            }
        }
    }
    /**
     * @throws LogicException When incorrect argument is given
     */
    public function addArgument(InputArgument $argument)
    {
        if (isset($this->arguments[$argument->getName()])) {
            throw new LogicException(\sprintf('An argument with name "%s" already exists.', $argument->getName()));
        }
        if (null !== $this->lastArrayArgument) {
            throw new LogicException(\sprintf('Cannot add a required argument "%s" after an array argument "%s".', $argument->getName(), $this->lastArrayArgument->getName()));
        }
        if ($argument->isRequired() && null !== $this->lastOptionalArgument) {
            throw new LogicException(\sprintf('Cannot add a required argument "%s" after an optional one "%s".', $argument->getName(), $this->lastOptionalArgument->getName()));
        }
        if ($argument->isArray()) {
            $this->lastArrayArgument = $argument;
        }
        if ($argument->isRequired()) {
            ++$this->requiredCount;
        } else {
            $this->lastOptionalArgument = $argument;
        }
        $this->arguments[$argument->getName()] = $argument;
    }
    /**
     * Returns an InputArgument by name or by position.
     *
     * @param string|int $name The InputArgument name or position
     *
     * @return InputArgument
     *
     * @throws InvalidArgumentException When argument given doesn't exist
     */
    public function getArgument($name)
    {
        if (!$this->hasArgument($name)) {
            throw new InvalidArgumentException(\sprintf('The "%s" argument does not exist.', $name));
        }
        $arguments = \is_int($name) ? \array_values($this->arguments) : $this->arguments;
        return $arguments[$name];
    }
    /**
     * Returns true if an InputArgument object exists by name or position.
     *
     * @param string|int $name The InputArgument name or position
     *
     * @return bool
     */
    public function hasArgument($name)
    {
        $arguments = \is_int($name) ? \array_values($this->arguments) : $this->arguments;
        return isset($arguments[$name]);
    }
    /**
     * Gets the array of InputArgument objects.
     *
     * @return InputArgument[]
     */
    public function getArguments()
    {
        return $this->arguments;
    }
    /**
     * Returns the number of InputArguments.
     *
     * @return int
     */
    public function getArgumentCount()
    {
        return null !== $this->lastArrayArgument ? \PHP_INT_MAX : \count($this->arguments);
    }
    /**
     * Returns the number of required InputArguments.
     *
     * @return int
     */
    public function getArgumentRequiredCount()
    {
        return $this->requiredCount;
    }
    /**
     * @return array<string|bool|int|float|array|null>
     */
    public function getArgumentDefaults()
    {
        $values = [];
        foreach ($this->arguments as $argument) {
            $values[$argument->getName()] = $argument->getDefault();
        }
        return $values;
    }
    /**
     * Sets the InputOption objects.
     *
     * @param InputOption[] $options An array of InputOption objects
     */
    public function setOptions(array $options = [])
    {
        $this->options = [];
        $this->shortcuts = [];
        $this->negations = [];
        $this->addOptions($options);
    }
    /**
     * Adds an array of InputOption objects.
     *
     * @param InputOption[] $options An array of InputOption objects
     */
    public function addOptions(array $options = [])
    {
        foreach ($options as $option) {
            $this->addOption($option);
        }
    }
    /**
     * @throws LogicException When option given already exist
     */
    public function addOption(InputOption $option)
    {
        if (isset($this->options[$option->getName()]) && !$option->equals($this->options[$option->getName()])) {
            throw new LogicException(\sprintf('An option named "%s" already exists.', $option->getName()));
        }
        if (isset($this->negations[$option->getName()])) {
            throw new LogicException(\sprintf('An option named "%s" already exists.', $option->getName()));
        }
        if ($option->getShortcut()) {
            foreach (\explode('|', $option->getShortcut()) as $shortcut) {
                if (isset($this->shortcuts[$shortcut]) && !$option->equals($this->options[$this->shortcuts[$shortcut]])) {
                    throw new LogicException(\sprintf('An option with shortcut "%s" already exists.', $shortcut));
                }
            }
        }
        $this->options[$option->getName()] = $option;
        if ($option->getShortcut()) {
            foreach (\explode('|', $option->getShortcut()) as $shortcut) {
                $this->shortcuts[$shortcut] = $option->getName();
            }
        }
        if ($option->isNegatable()) {
            $negatedName = 'no-' . $option->getName();
            if (isset($this->options[$negatedName])) {
                throw new LogicException(\sprintf('An option named "%s" already exists.', $negatedName));
            }
            $this->negations[$negatedName] = $option->getName();
        }
    }
    /**
     * Returns an InputOption by name.
     *
     * @return InputOption
     *
     * @throws InvalidArgumentException When option given doesn't exist
     */
    public function getOption(string $name)
    {
        if (!$this->hasOption($name)) {
            throw new InvalidArgumentException(\sprintf('The "--%s" option does not exist.', $name));
        }
        return $this->options[$name];
    }
    /**
     * Returns true if an InputOption object exists by name.
     *
     * This method can't be used to check if the user included the option when
     * executing the command (use getOption() instead).
     *
     * @return bool
     */
    public function hasOption(string $name)
    {
        return isset($this->options[$name]);
    }
    /**
     * Gets the array of InputOption objects.
     *
     * @return InputOption[]
     */
    public function getOptions()
    {
        return $this->options;
    }
    /**
     * Returns true if an InputOption object exists by shortcut.
     *
     * @return bool
     */
    public function hasShortcut(string $name)
    {
        return isset($this->shortcuts[$name]);
    }
    /**
     * Returns true if an InputOption object exists by negated name.
     */
    public function hasNegation(string $name) : bool
    {
        return isset($this->negations[$name]);
    }
    /**
     * Gets an InputOption by shortcut.
     *
     * @return InputOption
     */
    public function getOptionForShortcut(string $shortcut)
    {
        return $this->getOption($this->shortcutToName($shortcut));
    }
    /**
     * @return array<string|bool|int|float|array|null>
     */
    public function getOptionDefaults()
    {
        $values = [];
        foreach ($this->options as $option) {
            $values[$option->getName()] = $option->getDefault();
        }
        return $values;
    }
    /**
     * Returns the InputOption name given a shortcut.
     *
     * @throws InvalidArgumentException When option given does not exist
     *
     * @internal
     */
    public function shortcutToName(string $shortcut) : string
    {
        if (!isset($this->shortcuts[$shortcut])) {
            throw new InvalidArgumentException(\sprintf('The "-%s" option does not exist.', $shortcut));
        }
        return $this->shortcuts[$shortcut];
    }
    /**
     * Returns the InputOption name given a negation.
     *
     * @throws InvalidArgumentException When option given does not exist
     *
     * @internal
     */
    public function negationToName(string $negation) : string
    {
        if (!isset($this->negations[$negation])) {
            throw new InvalidArgumentException(\sprintf('The "--%s" option does not exist.', $negation));
        }
        return $this->negations[$negation];
    }
    /**
     * Gets the synopsis.
     *
     * @return string
     */
    public function getSynopsis(bool $short = \false)
    {
        $elements = [];
        if ($short && $this->getOptions()) {
            $elements[] = '[options]';
        } elseif (!$short) {
            foreach ($this->getOptions() as $option) {
                $value = '';
                if ($option->acceptValue()) {
                    $value = \sprintf(' %s%s%s', $option->isValueOptional() ? '[' : '', \strtoupper($option->getName()), $option->isValueOptional() ? ']' : '');
                }
                $shortcut = $option->getShortcut() ? \sprintf('-%s|', $option->getShortcut()) : '';
                $negation = $option->isNegatable() ? \sprintf('|--no-%s', $option->getName()) : '';
                $elements[] = \sprintf('[%s--%s%s%s]', $shortcut, $option->getName(), $value, $negation);
            }
        }
        if (\count($elements) && $this->getArguments()) {
            $elements[] = '[--]';
        }
        $tail = '';
        foreach ($this->getArguments() as $argument) {
            $element = '<' . $argument->getName() . '>';
            if ($argument->isArray()) {
                $element .= '...';
            }
            if (!$argument->isRequired()) {
                $element = '[' . $element;
                $tail .= ']';
            }
            $elements[] = $element;
        }
        return \implode(' ', $elements) . $tail;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Input;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\InvalidArgumentException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\LogicException;
/**
 * Represents a command line argument.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class InputArgument
{
    public const REQUIRED = 1;
    public const OPTIONAL = 2;
    public const IS_ARRAY = 4;
    private $name;
    private $mode;
    private $default;
    private $description;
    /**
     * @param string                           $name        The argument name
     * @param int|null                         $mode        The argument mode: self::REQUIRED or self::OPTIONAL
     * @param string                           $description A description text
     * @param string|bool|int|float|array|null $default     The default value (for self::OPTIONAL mode only)
     *
     * @throws InvalidArgumentException When argument mode is not valid
     */
    public function __construct(string $name, int $mode = null, string $description = '', $default = null)
    {
        if (null === $mode) {
            $mode = self::OPTIONAL;
        } elseif ($mode > 7 || $mode < 1) {
            throw new InvalidArgumentException(\sprintf('Argument mode "%s" is not valid.', $mode));
        }
        $this->name = $name;
        $this->mode = $mode;
        $this->description = $description;
        $this->setDefault($default);
    }
    /**
     * Returns the argument name.
     *
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }
    /**
     * Returns true if the argument is required.
     *
     * @return bool true if parameter mode is self::REQUIRED, false otherwise
     */
    public function isRequired()
    {
        return self::REQUIRED === (self::REQUIRED & $this->mode);
    }
    /**
     * Returns true if the argument can take multiple values.
     *
     * @return bool true if mode is self::IS_ARRAY, false otherwise
     */
    public function isArray()
    {
        return self::IS_ARRAY === (self::IS_ARRAY & $this->mode);
    }
    /**
     * Sets the default value.
     *
     * @param string|bool|int|float|array|null $default
     *
     * @throws LogicException When incorrect default value is given
     */
    public function setDefault($default = null)
    {
        if ($this->isRequired() && null !== $default) {
            throw new LogicException('Cannot set a default value except for InputArgument::OPTIONAL mode.');
        }
        if ($this->isArray()) {
            if (null === $default) {
                $default = [];
            } elseif (!\is_array($default)) {
                throw new LogicException('A default value for an array argument must be an array.');
            }
        }
        $this->default = $default;
    }
    /**
     * Returns the default value.
     *
     * @return string|bool|int|float|array|null
     */
    public function getDefault()
    {
        return $this->default;
    }
    /**
     * Returns the description text.
     *
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Input;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\InvalidArgumentException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\RuntimeException;
/**
 * InputInterface is the interface implemented by all input classes.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
interface InputInterface
{
    /**
     * Returns the first argument from the raw parameters (not parsed).
     *
     * @return string|null
     */
    public function getFirstArgument();
    /**
     * Returns true if the raw parameters (not parsed) contain a value.
     *
     * This method is to be used to introspect the input parameters
     * before they have been validated. It must be used carefully.
     * Does not necessarily return the correct result for short options
     * when multiple flags are combined in the same option.
     *
     * @param string|array $values     The values to look for in the raw parameters (can be an array)
     * @param bool         $onlyParams Only check real parameters, skip those following an end of options (--) signal
     *
     * @return bool
     */
    public function hasParameterOption($values, bool $onlyParams = \false);
    /**
     * Returns the value of a raw option (not parsed).
     *
     * This method is to be used to introspect the input parameters
     * before they have been validated. It must be used carefully.
     * Does not necessarily return the correct result for short options
     * when multiple flags are combined in the same option.
     *
     * @param string|array                     $values     The value(s) to look for in the raw parameters (can be an array)
     * @param string|bool|int|float|array|null $default    The default value to return if no result is found
     * @param bool                             $onlyParams Only check real parameters, skip those following an end of options (--) signal
     *
     * @return mixed
     */
    public function getParameterOption($values, $default = \false, bool $onlyParams = \false);
    /**
     * Binds the current Input instance with the given arguments and options.
     *
     * @throws RuntimeException
     */
    public function bind(InputDefinition $definition);
    /**
     * Validates the input.
     *
     * @throws RuntimeException When not enough arguments are given
     */
    public function validate();
    /**
     * Returns all the given arguments merged with the default values.
     *
     * @return array<string|bool|int|float|array|null>
     */
    public function getArguments();
    /**
     * Returns the argument value for a given argument name.
     *
     * @return mixed
     *
     * @throws InvalidArgumentException When argument given doesn't exist
     */
    public function getArgument(string $name);
    /**
     * Sets an argument value by name.
     *
     * @param mixed $value The argument value
     *
     * @throws InvalidArgumentException When argument given doesn't exist
     */
    public function setArgument(string $name, $value);
    /**
     * Returns true if an InputArgument object exists by name or position.
     *
     * @return bool
     */
    public function hasArgument(string $name);
    /**
     * Returns all the given options merged with the default values.
     *
     * @return array<string|bool|int|float|array|null>
     */
    public function getOptions();
    /**
     * Returns the option value for a given option name.
     *
     * @return mixed
     *
     * @throws InvalidArgumentException When option given doesn't exist
     */
    public function getOption(string $name);
    /**
     * Sets an option value by name.
     *
     * @param mixed $value The option value
     *
     * @throws InvalidArgumentException When option given doesn't exist
     */
    public function setOption(string $name, $value);
    /**
     * Returns true if an InputOption object exists by name.
     *
     * @return bool
     */
    public function hasOption(string $name);
    /**
     * Is this input means interactive?
     *
     * @return bool
     */
    public function isInteractive();
    /**
     * Sets the input interactivity.
     */
    public function setInteractive(bool $interactive);
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Input;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\InvalidArgumentException;
/**
 * StringInput represents an input provided as a string.
 *
 * Usage:
 *
 *     $input = new StringInput('foo --bar="foobar"');
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class StringInput extends ArgvInput
{
    public const REGEX_STRING = '([^\\s]+?)(?:\\s|(?<!\\\\)"|(?<!\\\\)\'|$)';
    public const REGEX_UNQUOTED_STRING = '([^\\s\\\\]+?)';
    public const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\')';
    /**
     * @param string $input A string representing the parameters from the CLI
     */
    public function __construct(string $input)
    {
        parent::__construct([]);
        $this->setTokens($this->tokenize($input));
    }
    /**
     * Tokenizes a string.
     *
     * @throws InvalidArgumentException When unable to parse input (should never happen)
     */
    private function tokenize(string $input) : array
    {
        $tokens = [];
        $length = \strlen($input);
        $cursor = 0;
        $token = null;
        while ($cursor < $length) {
            if ('\\' === $input[$cursor]) {
                $token .= $input[++$cursor] ?? '';
                ++$cursor;
                continue;
            }
            if (\preg_match('/\\s+/A', $input, $match, 0, $cursor)) {
                if (null !== $token) {
                    $tokens[] = $token;
                    $token = null;
                }
            } elseif (\preg_match('/([^="\'\\s]+?)(=?)(' . self::REGEX_QUOTED_STRING . '+)/A', $input, $match, 0, $cursor)) {
                $token .= $match[1] . $match[2] . \stripcslashes(\str_replace(['"\'', '\'"', '\'\'', '""'], '', \substr($match[3], 1, -1)));
            } elseif (\preg_match('/' . self::REGEX_QUOTED_STRING . '/A', $input, $match, 0, $cursor)) {
                $token .= \stripcslashes(\substr($match[0], 1, -1));
            } elseif (\preg_match('/' . self::REGEX_UNQUOTED_STRING . '/A', $input, $match, 0, $cursor)) {
                $token .= $match[1];
            } else {
                // should never happen
                throw new InvalidArgumentException(\sprintf('Unable to parse input near "... %s ...".', \substr($input, $cursor, 10)));
            }
            $cursor += \strlen($match[0]);
        }
        if (null !== $token) {
            $tokens[] = $token;
        }
        return $tokens;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Input;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\InvalidArgumentException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\InvalidOptionException;
/**
 * ArrayInput represents an input provided as an array.
 *
 * Usage:
 *
 *     $input = new ArrayInput(['command' => 'foo:bar', 'foo' => 'bar', '--bar' => 'foobar']);
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class ArrayInput extends Input
{
    private $parameters;
    public function __construct(array $parameters, InputDefinition $definition = null)
    {
        $this->parameters = $parameters;
        parent::__construct($definition);
    }
    /**
     * {@inheritdoc}
     */
    public function getFirstArgument()
    {
        foreach ($this->parameters as $param => $value) {
            if ($param && \is_string($param) && '-' === $param[0]) {
                continue;
            }
            return $value;
        }
        return null;
    }
    /**
     * {@inheritdoc}
     */
    public function hasParameterOption($values, bool $onlyParams = \false)
    {
        $values = (array) $values;
        foreach ($this->parameters as $k => $v) {
            if (!\is_int($k)) {
                $v = $k;
            }
            if ($onlyParams && '--' === $v) {
                return \false;
            }
            if (\in_array($v, $values)) {
                return \true;
            }
        }
        return \false;
    }
    /**
     * {@inheritdoc}
     */
    public function getParameterOption($values, $default = \false, bool $onlyParams = \false)
    {
        $values = (array) $values;
        foreach ($this->parameters as $k => $v) {
            if ($onlyParams && ('--' === $k || \is_int($k) && '--' === $v)) {
                return $default;
            }
            if (\is_int($k)) {
                if (\in_array($v, $values)) {
                    return \true;
                }
            } elseif (\in_array($k, $values)) {
                return $v;
            }
        }
        return $default;
    }
    /**
     * Returns a stringified representation of the args passed to the command.
     *
     * @return string
     */
    public function __toString()
    {
        $params = [];
        foreach ($this->parameters as $param => $val) {
            if ($param && \is_string($param) && '-' === $param[0]) {
                $glue = '-' === $param[1] ? '=' : ' ';
                if (\is_array($val)) {
                    foreach ($val as $v) {
                        $params[] = $param . ('' != $v ? $glue . $this->escapeToken($v) : '');
                    }
                } else {
                    $params[] = $param . ('' != $val ? $glue . $this->escapeToken($val) : '');
                }
            } else {
                $params[] = \is_array($val) ? \implode(' ', \array_map([$this, 'escapeToken'], $val)) : $this->escapeToken($val);
            }
        }
        return \implode(' ', $params);
    }
    /**
     * {@inheritdoc}
     */
    protected function parse()
    {
        foreach ($this->parameters as $key => $value) {
            if ('--' === $key) {
                return;
            }
            if (\str_starts_with($key, '--')) {
                $this->addLongOption(\substr($key, 2), $value);
            } elseif (\str_starts_with($key, '-')) {
                $this->addShortOption(\substr($key, 1), $value);
            } else {
                $this->addArgument($key, $value);
            }
        }
    }
    /**
     * Adds a short option value.
     *
     * @throws InvalidOptionException When option given doesn't exist
     */
    private function addShortOption(string $shortcut, $value)
    {
        if (!$this->definition->hasShortcut($shortcut)) {
            throw new InvalidOptionException(\sprintf('The "-%s" option does not exist.', $shortcut));
        }
        $this->addLongOption($this->definition->getOptionForShortcut($shortcut)->getName(), $value);
    }
    /**
     * Adds a long option value.
     *
     * @throws InvalidOptionException When option given doesn't exist
     * @throws InvalidOptionException When a required value is missing
     */
    private function addLongOption(string $name, $value)
    {
        if (!$this->definition->hasOption($name)) {
            if (!$this->definition->hasNegation($name)) {
                throw new InvalidOptionException(\sprintf('The "--%s" option does not exist.', $name));
            }
            $optionName = $this->definition->negationToName($name);
            $this->options[$optionName] = \false;
            return;
        }
        $option = $this->definition->getOption($name);
        if (null === $value) {
            if ($option->isValueRequired()) {
                throw new InvalidOptionException(\sprintf('The "--%s" option requires a value.', $name));
            }
            if (!$option->isValueOptional()) {
                $value = \true;
            }
        }
        $this->options[$name] = $value;
    }
    /**
     * Adds an argument value.
     *
     * @param string|int $name  The argument name
     * @param mixed      $value The value for the argument
     *
     * @throws InvalidArgumentException When argument given doesn't exist
     */
    private function addArgument($name, $value)
    {
        if (!$this->definition->hasArgument($name)) {
            throw new InvalidArgumentException(\sprintf('The "%s" argument does not exist.', $name));
        }
        $this->arguments[$name] = $value;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Input;

/**
 * StreamableInputInterface is the interface implemented by all input classes
 * that have an input stream.
 *
 * @author Robin Chalas <robin.chalas@gmail.com>
 */
interface StreamableInputInterface extends InputInterface
{
    /**
     * Sets the input stream to read from when interacting with the user.
     *
     * This is mainly useful for testing purpose.
     *
     * @param resource $stream The input stream
     */
    public function setStream($stream);
    /**
     * Returns the input stream.
     *
     * @return resource|null
     */
    public function getStream();
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Input;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\RuntimeException;
/**
 * ArgvInput represents an input coming from the CLI arguments.
 *
 * Usage:
 *
 *     $input = new ArgvInput();
 *
 * By default, the `$_SERVER['argv']` array is used for the input values.
 *
 * This can be overridden by explicitly passing the input values in the constructor:
 *
 *     $input = new ArgvInput($_SERVER['argv']);
 *
 * If you pass it yourself, don't forget that the first element of the array
 * is the name of the running application.
 *
 * When passing an argument to the constructor, be sure that it respects
 * the same rules as the argv one. It's almost always better to use the
 * `StringInput` when you want to provide your own input.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 *
 * @see http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html
 * @see http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html#tag_12_02
 */
class ArgvInput extends Input
{
    private $tokens;
    private $parsed;
    public function __construct(array $argv = null, InputDefinition $definition = null)
    {
        $argv = $argv ?? $_SERVER['argv'] ?? [];
        // strip the application name
        \array_shift($argv);
        $this->tokens = $argv;
        parent::__construct($definition);
    }
    protected function setTokens(array $tokens)
    {
        $this->tokens = $tokens;
    }
    /**
     * {@inheritdoc}
     */
    protected function parse()
    {
        $parseOptions = \true;
        $this->parsed = $this->tokens;
        while (null !== ($token = \array_shift($this->parsed))) {
            $parseOptions = $this->parseToken($token, $parseOptions);
        }
    }
    protected function parseToken(string $token, bool $parseOptions) : bool
    {
        if ($parseOptions && '' == $token) {
            $this->parseArgument($token);
        } elseif ($parseOptions && '--' == $token) {
            return \false;
        } elseif ($parseOptions && \str_starts_with($token, '--')) {
            $this->parseLongOption($token);
        } elseif ($parseOptions && '-' === $token[0] && '-' !== $token) {
            $this->parseShortOption($token);
        } else {
            $this->parseArgument($token);
        }
        return $parseOptions;
    }
    /**
     * Parses a short option.
     */
    private function parseShortOption(string $token)
    {
        $name = \substr($token, 1);
        if (\strlen($name) > 1) {
            if ($this->definition->hasShortcut($name[0]) && $this->definition->getOptionForShortcut($name[0])->acceptValue()) {
                // an option with a value (with no space)
                $this->addShortOption($name[0], \substr($name, 1));
            } else {
                $this->parseShortOptionSet($name);
            }
        } else {
            $this->addShortOption($name, null);
        }
    }
    /**
     * Parses a short option set.
     *
     * @throws RuntimeException When option given doesn't exist
     */
    private function parseShortOptionSet(string $name)
    {
        $len = \strlen($name);
        for ($i = 0; $i < $len; ++$i) {
            if (!$this->definition->hasShortcut($name[$i])) {
                $encoding = \mb_detect_encoding($name, null, \true);
                throw new RuntimeException(\sprintf('The "-%s" option does not exist.', \false === $encoding ? $name[$i] : \mb_substr($name, $i, 1, $encoding)));
            }
            $option = $this->definition->getOptionForShortcut($name[$i]);
            if ($option->acceptValue()) {
                $this->addLongOption($option->getName(), $i === $len - 1 ? null : \substr($name, $i + 1));
                break;
            } else {
                $this->addLongOption($option->getName(), null);
            }
        }
    }
    /**
     * Parses a long option.
     */
    private function parseLongOption(string $token)
    {
        $name = \substr($token, 2);
        if (\false !== ($pos = \strpos($name, '='))) {
            if ('' === ($value = \substr($name, $pos + 1))) {
                \array_unshift($this->parsed, $value);
            }
            $this->addLongOption(\substr($name, 0, $pos), $value);
        } else {
            $this->addLongOption($name, null);
        }
    }
    /**
     * Parses an argument.
     *
     * @throws RuntimeException When too many arguments are given
     */
    private function parseArgument(string $token)
    {
        $c = \count($this->arguments);
        // if input is expecting another argument, add it
        if ($this->definition->hasArgument($c)) {
            $arg = $this->definition->getArgument($c);
            $this->arguments[$arg->getName()] = $arg->isArray() ? [$token] : $token;
            // if last argument isArray(), append token to last argument
        } elseif ($this->definition->hasArgument($c - 1) && $this->definition->getArgument($c - 1)->isArray()) {
            $arg = $this->definition->getArgument($c - 1);
            $this->arguments[$arg->getName()][] = $token;
            // unexpected argument
        } else {
            $all = $this->definition->getArguments();
            $symfonyCommandName = null;
            if (($inputArgument = $all[$key = \array_key_first($all)] ?? null) && 'command' === $inputArgument->getName()) {
                $symfonyCommandName = $this->arguments['command'] ?? null;
                unset($all[$key]);
            }
            if (\count($all)) {
                if ($symfonyCommandName) {
                    $message = \sprintf('Too many arguments to "%s" command, expected arguments "%s".', $symfonyCommandName, \implode('" "', \array_keys($all)));
                } else {
                    $message = \sprintf('Too many arguments, expected arguments "%s".', \implode('" "', \array_keys($all)));
                }
            } elseif ($symfonyCommandName) {
                $message = \sprintf('No arguments expected for "%s" command, got "%s".', $symfonyCommandName, $token);
            } else {
                $message = \sprintf('No arguments expected, got "%s".', $token);
            }
            throw new RuntimeException($message);
        }
    }
    /**
     * Adds a short option value.
     *
     * @throws RuntimeException When option given doesn't exist
     */
    private function addShortOption(string $shortcut, $value)
    {
        if (!$this->definition->hasShortcut($shortcut)) {
            throw new RuntimeException(\sprintf('The "-%s" option does not exist.', $shortcut));
        }
        $this->addLongOption($this->definition->getOptionForShortcut($shortcut)->getName(), $value);
    }
    /**
     * Adds a long option value.
     *
     * @throws RuntimeException When option given doesn't exist
     */
    private function addLongOption(string $name, $value)
    {
        if (!$this->definition->hasOption($name)) {
            if (!$this->definition->hasNegation($name)) {
                throw new RuntimeException(\sprintf('The "--%s" option does not exist.', $name));
            }
            $optionName = $this->definition->negationToName($name);
            if (null !== $value) {
                throw new RuntimeException(\sprintf('The "--%s" option does not accept a value.', $name));
            }
            $this->options[$optionName] = \false;
            return;
        }
        $option = $this->definition->getOption($name);
        if (null !== $value && !$option->acceptValue()) {
            throw new RuntimeException(\sprintf('The "--%s" option does not accept a value.', $name));
        }
        if (\in_array($value, ['', null], \true) && $option->acceptValue() && \count($this->parsed)) {
            // if option accepts an optional or mandatory argument
            // let's see if there is one provided
            $next = \array_shift($this->parsed);
            if (isset($next[0]) && '-' !== $next[0] || \in_array($next, ['', null], \true)) {
                $value = $next;
            } else {
                \array_unshift($this->parsed, $next);
            }
        }
        if (null === $value) {
            if ($option->isValueRequired()) {
                throw new RuntimeException(\sprintf('The "--%s" option requires a value.', $name));
            }
            if (!$option->isArray() && !$option->isValueOptional()) {
                $value = \true;
            }
        }
        if ($option->isArray()) {
            $this->options[$name][] = $value;
        } else {
            $this->options[$name] = $value;
        }
    }
    /**
     * {@inheritdoc}
     */
    public function getFirstArgument()
    {
        $isOption = \false;
        foreach ($this->tokens as $i => $token) {
            if ($token && '-' === $token[0]) {
                if (\str_contains($token, '=') || !isset($this->tokens[$i + 1])) {
                    continue;
                }
                // If it's a long option, consider that everything after "--" is the option name.
                // Otherwise, use the last char (if it's a short option set, only the last one can take a value with space separator)
                $name = '-' === $token[1] ? \substr($token, 2) : \substr($token, -1);
                if (!isset($this->options[$name]) && !$this->definition->hasShortcut($name)) {
                    // noop
                } elseif ((isset($this->options[$name]) || isset($this->options[$name = $this->definition->shortcutToName($name)])) && $this->tokens[$i + 1] === $this->options[$name]) {
                    $isOption = \true;
                }
                continue;
            }
            if ($isOption) {
                $isOption = \false;
                continue;
            }
            return $token;
        }
        return null;
    }
    /**
     * {@inheritdoc}
     */
    public function hasParameterOption($values, bool $onlyParams = \false)
    {
        $values = (array) $values;
        foreach ($this->tokens as $token) {
            if ($onlyParams && '--' === $token) {
                return \false;
            }
            foreach ($values as $value) {
                // Options with values:
                //   For long options, test for '--option=' at beginning
                //   For short options, test for '-o' at beginning
                $leading = \str_starts_with($value, '--') ? $value . '=' : $value;
                if ($token === $value || '' !== $leading && \str_starts_with($token, $leading)) {
                    return \true;
                }
            }
        }
        return \false;
    }
    /**
     * {@inheritdoc}
     */
    public function getParameterOption($values, $default = \false, bool $onlyParams = \false)
    {
        $values = (array) $values;
        $tokens = $this->tokens;
        while (0 < \count($tokens)) {
            $token = \array_shift($tokens);
            if ($onlyParams && '--' === $token) {
                return $default;
            }
            foreach ($values as $value) {
                if ($token === $value) {
                    return \array_shift($tokens);
                }
                // Options with values:
                //   For long options, test for '--option=' at beginning
                //   For short options, test for '-o' at beginning
                $leading = \str_starts_with($value, '--') ? $value . '=' : $value;
                if ('' !== $leading && \str_starts_with($token, $leading)) {
                    return \substr($token, \strlen($leading));
                }
            }
        }
        return $default;
    }
    /**
     * Returns a stringified representation of the args passed to the command.
     *
     * @return string
     */
    public function __toString()
    {
        $tokens = \array_map(function ($token) {
            if (\preg_match('{^(-[^=]+=)(.+)}', $token, $match)) {
                return $match[1] . $this->escapeToken($match[2]);
            }
            if ($token && '-' !== $token[0]) {
                return $this->escapeToken($token);
            }
            return $token;
        }, $this->tokens);
        return \implode(' ', $tokens);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Input;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\InvalidArgumentException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\LogicException;
/**
 * Represents a command line option.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class InputOption
{
    /**
     * Do not accept input for the option (e.g. --yell). This is the default behavior of options.
     */
    public const VALUE_NONE = 1;
    /**
     * A value must be passed when the option is used (e.g. --iterations=5 or -i5).
     */
    public const VALUE_REQUIRED = 2;
    /**
     * The option may or may not have a value (e.g. --yell or --yell=loud).
     */
    public const VALUE_OPTIONAL = 4;
    /**
     * The option accepts multiple values (e.g. --dir=/foo --dir=/bar).
     */
    public const VALUE_IS_ARRAY = 8;
    /**
     * The option may have either positive or negative value (e.g. --ansi or --no-ansi).
     */
    public const VALUE_NEGATABLE = 16;
    private $name;
    private $shortcut;
    private $mode;
    private $default;
    private $description;
    /**
     * @param string|array|null                $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
     * @param int|null                         $mode     The option mode: One of the VALUE_* constants
     * @param string|bool|int|float|array|null $default  The default value (must be null for self::VALUE_NONE)
     *
     * @throws InvalidArgumentException If option mode is invalid or incompatible
     */
    public function __construct(string $name, $shortcut = null, int $mode = null, string $description = '', $default = null)
    {
        if (\str_starts_with($name, '--')) {
            $name = \substr($name, 2);
        }
        if (empty($name)) {
            throw new InvalidArgumentException('An option name cannot be empty.');
        }
        if (empty($shortcut)) {
            $shortcut = null;
        }
        if (null !== $shortcut) {
            if (\is_array($shortcut)) {
                $shortcut = \implode('|', $shortcut);
            }
            $shortcuts = \preg_split('{(\\|)-?}', \ltrim($shortcut, '-'));
            $shortcuts = \array_filter($shortcuts);
            $shortcut = \implode('|', $shortcuts);
            if (empty($shortcut)) {
                throw new InvalidArgumentException('An option shortcut cannot be empty.');
            }
        }
        if (null === $mode) {
            $mode = self::VALUE_NONE;
        } elseif ($mode >= self::VALUE_NEGATABLE << 1 || $mode < 1) {
            throw new InvalidArgumentException(\sprintf('Option mode "%s" is not valid.', $mode));
        }
        $this->name = $name;
        $this->shortcut = $shortcut;
        $this->mode = $mode;
        $this->description = $description;
        if ($this->isArray() && !$this->acceptValue()) {
            throw new InvalidArgumentException('Impossible to have an option mode VALUE_IS_ARRAY if the option does not accept a value.');
        }
        if ($this->isNegatable() && $this->acceptValue()) {
            throw new InvalidArgumentException('Impossible to have an option mode VALUE_NEGATABLE if the option also accepts a value.');
        }
        $this->setDefault($default);
    }
    /**
     * Returns the option shortcut.
     *
     * @return string|null
     */
    public function getShortcut()
    {
        return $this->shortcut;
    }
    /**
     * Returns the option name.
     *
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }
    /**
     * Returns true if the option accepts a value.
     *
     * @return bool true if value mode is not self::VALUE_NONE, false otherwise
     */
    public function acceptValue()
    {
        return $this->isValueRequired() || $this->isValueOptional();
    }
    /**
     * Returns true if the option requires a value.
     *
     * @return bool true if value mode is self::VALUE_REQUIRED, false otherwise
     */
    public function isValueRequired()
    {
        return self::VALUE_REQUIRED === (self::VALUE_REQUIRED & $this->mode);
    }
    /**
     * Returns true if the option takes an optional value.
     *
     * @return bool true if value mode is self::VALUE_OPTIONAL, false otherwise
     */
    public function isValueOptional()
    {
        return self::VALUE_OPTIONAL === (self::VALUE_OPTIONAL & $this->mode);
    }
    /**
     * Returns true if the option can take multiple values.
     *
     * @return bool true if mode is self::VALUE_IS_ARRAY, false otherwise
     */
    public function isArray()
    {
        return self::VALUE_IS_ARRAY === (self::VALUE_IS_ARRAY & $this->mode);
    }
    public function isNegatable() : bool
    {
        return self::VALUE_NEGATABLE === (self::VALUE_NEGATABLE & $this->mode);
    }
    /**
     * @param string|bool|int|float|array|null $default
     */
    public function setDefault($default = null)
    {
        if (self::VALUE_NONE === (self::VALUE_NONE & $this->mode) && null !== $default) {
            throw new LogicException('Cannot set a default value when using InputOption::VALUE_NONE mode.');
        }
        if ($this->isArray()) {
            if (null === $default) {
                $default = [];
            } elseif (!\is_array($default)) {
                throw new LogicException('A default value for an array option must be an array.');
            }
        }
        $this->default = $this->acceptValue() || $this->isNegatable() ? $default : \false;
    }
    /**
     * Returns the default value.
     *
     * @return string|bool|int|float|array|null
     */
    public function getDefault()
    {
        return $this->default;
    }
    /**
     * Returns the description text.
     *
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }
    /**
     * Checks whether the given option equals this one.
     *
     * @return bool
     */
    public function equals(self $option)
    {
        return $option->getName() === $this->getName() && $option->getShortcut() === $this->getShortcut() && $option->getDefault() === $this->getDefault() && $option->isNegatable() === $this->isNegatable() && $option->isArray() === $this->isArray() && $option->isValueRequired() === $this->isValueRequired() && $option->isValueOptional() === $this->isValueOptional();
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Input;

/**
 * InputAwareInterface should be implemented by classes that depends on the
 * Console Input.
 *
 * @author Wouter J <waldio.webdesign@gmail.com>
 */
interface InputAwareInterface
{
    /**
     * Sets the Console Input.
     */
    public function setInput(InputInterface $input);
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Descriptor;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Application;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\Command;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputArgument;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputDefinition;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputOption;
/**
 * XML descriptor.
 *
 * @author Jean-François Simon <contact@jfsimon.fr>
 *
 * @internal
 */
class XmlDescriptor extends Descriptor
{
    public function getInputDefinitionDocument(InputDefinition $definition) : \DOMDocument
    {
        $dom = new \DOMDocument('1.0', 'UTF-8');
        $dom->appendChild($definitionXML = $dom->createElement('definition'));
        $definitionXML->appendChild($argumentsXML = $dom->createElement('arguments'));
        foreach ($definition->getArguments() as $argument) {
            $this->appendDocument($argumentsXML, $this->getInputArgumentDocument($argument));
        }
        $definitionXML->appendChild($optionsXML = $dom->createElement('options'));
        foreach ($definition->getOptions() as $option) {
            $this->appendDocument($optionsXML, $this->getInputOptionDocument($option));
        }
        return $dom;
    }
    public function getCommandDocument(Command $command, bool $short = \false) : \DOMDocument
    {
        $dom = new \DOMDocument('1.0', 'UTF-8');
        $dom->appendChild($commandXML = $dom->createElement('command'));
        $commandXML->setAttribute('id', $command->getName());
        $commandXML->setAttribute('name', $command->getName());
        $commandXML->setAttribute('hidden', $command->isHidden() ? 1 : 0);
        $commandXML->appendChild($usagesXML = $dom->createElement('usages'));
        $commandXML->appendChild($descriptionXML = $dom->createElement('description'));
        $descriptionXML->appendChild($dom->createTextNode(\str_replace("\n", "\n ", $command->getDescription())));
        if ($short) {
            foreach ($command->getAliases() as $usage) {
                $usagesXML->appendChild($dom->createElement('usage', $usage));
            }
        } else {
            $command->mergeApplicationDefinition(\false);
            foreach (\array_merge([$command->getSynopsis()], $command->getAliases(), $command->getUsages()) as $usage) {
                $usagesXML->appendChild($dom->createElement('usage', $usage));
            }
            $commandXML->appendChild($helpXML = $dom->createElement('help'));
            $helpXML->appendChild($dom->createTextNode(\str_replace("\n", "\n ", $command->getProcessedHelp())));
            $definitionXML = $this->getInputDefinitionDocument($command->getDefinition());
            $this->appendDocument($commandXML, $definitionXML->getElementsByTagName('definition')->item(0));
        }
        return $dom;
    }
    public function getApplicationDocument(Application $application, string $namespace = null, bool $short = \false) : \DOMDocument
    {
        $dom = new \DOMDocument('1.0', 'UTF-8');
        $dom->appendChild($rootXml = $dom->createElement('symfony'));
        if ('UNKNOWN' !== $application->getName()) {
            $rootXml->setAttribute('name', $application->getName());
            if ('UNKNOWN' !== $application->getVersion()) {
                $rootXml->setAttribute('version', $application->getVersion());
            }
        }
        $rootXml->appendChild($commandsXML = $dom->createElement('commands'));
        $description = new ApplicationDescription($application, $namespace, \true);
        if ($namespace) {
            $commandsXML->setAttribute('namespace', $namespace);
        }
        foreach ($description->getCommands() as $command) {
            $this->appendDocument($commandsXML, $this->getCommandDocument($command, $short));
        }
        if (!$namespace) {
            $rootXml->appendChild($namespacesXML = $dom->createElement('namespaces'));
            foreach ($description->getNamespaces() as $namespaceDescription) {
                $namespacesXML->appendChild($namespaceArrayXML = $dom->createElement('namespace'));
                $namespaceArrayXML->setAttribute('id', $namespaceDescription['id']);
                foreach ($namespaceDescription['commands'] as $name) {
                    $namespaceArrayXML->appendChild($commandXML = $dom->createElement('command'));
                    $commandXML->appendChild($dom->createTextNode($name));
                }
            }
        }
        return $dom;
    }
    /**
     * {@inheritdoc}
     */
    protected function describeInputArgument(InputArgument $argument, array $options = [])
    {
        $this->writeDocument($this->getInputArgumentDocument($argument));
    }
    /**
     * {@inheritdoc}
     */
    protected function describeInputOption(InputOption $option, array $options = [])
    {
        $this->writeDocument($this->getInputOptionDocument($option));
    }
    /**
     * {@inheritdoc}
     */
    protected function describeInputDefinition(InputDefinition $definition, array $options = [])
    {
        $this->writeDocument($this->getInputDefinitionDocument($definition));
    }
    /**
     * {@inheritdoc}
     */
    protected function describeCommand(Command $command, array $options = [])
    {
        $this->writeDocument($this->getCommandDocument($command, $options['short'] ?? \false));
    }
    /**
     * {@inheritdoc}
     */
    protected function describeApplication(Application $application, array $options = [])
    {
        $this->writeDocument($this->getApplicationDocument($application, $options['namespace'] ?? null, $options['short'] ?? \false));
    }
    /**
     * Appends document children to parent node.
     */
    private function appendDocument(\DOMNode $parentNode, \DOMNode $importedParent)
    {
        foreach ($importedParent->childNodes as $childNode) {
            $parentNode->appendChild($parentNode->ownerDocument->importNode($childNode, \true));
        }
    }
    /**
     * Writes DOM document.
     */
    private function writeDocument(\DOMDocument $dom)
    {
        $dom->formatOutput = \true;
        $this->write($dom->saveXML());
    }
    private function getInputArgumentDocument(InputArgument $argument) : \DOMDocument
    {
        $dom = new \DOMDocument('1.0', 'UTF-8');
        $dom->appendChild($objectXML = $dom->createElement('argument'));
        $objectXML->setAttribute('name', $argument->getName());
        $objectXML->setAttribute('is_required', $argument->isRequired() ? 1 : 0);
        $objectXML->setAttribute('is_array', $argument->isArray() ? 1 : 0);
        $objectXML->appendChild($descriptionXML = $dom->createElement('description'));
        $descriptionXML->appendChild($dom->createTextNode($argument->getDescription()));
        $objectXML->appendChild($defaultsXML = $dom->createElement('defaults'));
        $defaults = \is_array($argument->getDefault()) ? $argument->getDefault() : (\is_bool($argument->getDefault()) ? [\var_export($argument->getDefault(), \true)] : ($argument->getDefault() ? [$argument->getDefault()] : []));
        foreach ($defaults as $default) {
            $defaultsXML->appendChild($defaultXML = $dom->createElement('default'));
            $defaultXML->appendChild($dom->createTextNode($default));
        }
        return $dom;
    }
    private function getInputOptionDocument(InputOption $option) : \DOMDocument
    {
        $dom = new \DOMDocument('1.0', 'UTF-8');
        $dom->appendChild($objectXML = $dom->createElement('option'));
        $objectXML->setAttribute('name', '--' . $option->getName());
        $pos = \strpos($option->getShortcut() ?? '', '|');
        if (\false !== $pos) {
            $objectXML->setAttribute('shortcut', '-' . \substr($option->getShortcut(), 0, $pos));
            $objectXML->setAttribute('shortcuts', '-' . \str_replace('|', '|-', $option->getShortcut()));
        } else {
            $objectXML->setAttribute('shortcut', $option->getShortcut() ? '-' . $option->getShortcut() : '');
        }
        $objectXML->setAttribute('accept_value', $option->acceptValue() ? 1 : 0);
        $objectXML->setAttribute('is_value_required', $option->isValueRequired() ? 1 : 0);
        $objectXML->setAttribute('is_multiple', $option->isArray() ? 1 : 0);
        $objectXML->appendChild($descriptionXML = $dom->createElement('description'));
        $descriptionXML->appendChild($dom->createTextNode($option->getDescription()));
        if ($option->acceptValue()) {
            $defaults = \is_array($option->getDefault()) ? $option->getDefault() : (\is_bool($option->getDefault()) ? [\var_export($option->getDefault(), \true)] : ($option->getDefault() ? [$option->getDefault()] : []));
            $objectXML->appendChild($defaultsXML = $dom->createElement('defaults'));
            if (!empty($defaults)) {
                foreach ($defaults as $default) {
                    $defaultsXML->appendChild($defaultXML = $dom->createElement('default'));
                    $defaultXML->appendChild($dom->createTextNode($default));
                }
            }
        }
        if ($option->isNegatable()) {
            $dom->appendChild($objectXML = $dom->createElement('option'));
            $objectXML->setAttribute('name', '--no-' . $option->getName());
            $objectXML->setAttribute('shortcut', '');
            $objectXML->setAttribute('accept_value', 0);
            $objectXML->setAttribute('is_value_required', 0);
            $objectXML->setAttribute('is_multiple', 0);
            $objectXML->appendChild($descriptionXML = $dom->createElement('description'));
            $descriptionXML->appendChild($dom->createTextNode('Negate the "--' . $option->getName() . '" option'));
        }
        return $dom;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Descriptor;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Application;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\Command;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\InvalidArgumentException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputArgument;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputDefinition;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputOption;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
/**
 * @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
 *
 * @internal
 */
abstract class Descriptor implements DescriptorInterface
{
    /**
     * @var OutputInterface
     */
    protected $output;
    /**
     * {@inheritdoc}
     */
    public function describe(OutputInterface $output, object $object, array $options = [])
    {
        $this->output = $output;
        switch (\true) {
            case $object instanceof InputArgument:
                $this->describeInputArgument($object, $options);
                break;
            case $object instanceof InputOption:
                $this->describeInputOption($object, $options);
                break;
            case $object instanceof InputDefinition:
                $this->describeInputDefinition($object, $options);
                break;
            case $object instanceof Command:
                $this->describeCommand($object, $options);
                break;
            case $object instanceof Application:
                $this->describeApplication($object, $options);
                break;
            default:
                throw new InvalidArgumentException(\sprintf('Object of type "%s" is not describable.', \get_debug_type($object)));
        }
    }
    /**
     * Writes content to output.
     */
    protected function write(string $content, bool $decorated = \false)
    {
        $this->output->write($content, \false, $decorated ? OutputInterface::OUTPUT_NORMAL : OutputInterface::OUTPUT_RAW);
    }
    /**
     * Describes an InputArgument instance.
     */
    protected abstract function describeInputArgument(InputArgument $argument, array $options = []);
    /**
     * Describes an InputOption instance.
     */
    protected abstract function describeInputOption(InputOption $option, array $options = []);
    /**
     * Describes an InputDefinition instance.
     */
    protected abstract function describeInputDefinition(InputDefinition $definition, array $options = []);
    /**
     * Describes a Command instance.
     */
    protected abstract function describeCommand(Command $command, array $options = []);
    /**
     * Describes an Application instance.
     */
    protected abstract function describeApplication(Application $application, array $options = []);
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Descriptor;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Application;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\Command;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper\Helper;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputArgument;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputDefinition;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputOption;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
/**
 * Markdown descriptor.
 *
 * @author Jean-François Simon <contact@jfsimon.fr>
 *
 * @internal
 */
class MarkdownDescriptor extends Descriptor
{
    /**
     * {@inheritdoc}
     */
    public function describe(OutputInterface $output, object $object, array $options = [])
    {
        $decorated = $output->isDecorated();
        $output->setDecorated(\false);
        parent::describe($output, $object, $options);
        $output->setDecorated($decorated);
    }
    /**
     * {@inheritdoc}
     */
    protected function write(string $content, bool $decorated = \true)
    {
        parent::write($content, $decorated);
    }
    /**
     * {@inheritdoc}
     */
    protected function describeInputArgument(InputArgument $argument, array $options = [])
    {
        $this->write('#### `' . ($argument->getName() ?: '<none>') . "`\n\n" . ($argument->getDescription() ? \preg_replace('/\\s*[\\r\\n]\\s*/', "\n", $argument->getDescription()) . "\n\n" : '') . '* Is required: ' . ($argument->isRequired() ? 'yes' : 'no') . "\n" . '* Is array: ' . ($argument->isArray() ? 'yes' : 'no') . "\n" . '* Default: `' . \str_replace("\n", '', \var_export($argument->getDefault(), \true)) . '`');
    }
    /**
     * {@inheritdoc}
     */
    protected function describeInputOption(InputOption $option, array $options = [])
    {
        $name = '--' . $option->getName();
        if ($option->isNegatable()) {
            $name .= '|--no-' . $option->getName();
        }
        if ($option->getShortcut()) {
            $name .= '|-' . \str_replace('|', '|-', $option->getShortcut()) . '';
        }
        $this->write('#### `' . $name . '`' . "\n\n" . ($option->getDescription() ? \preg_replace('/\\s*[\\r\\n]\\s*/', "\n", $option->getDescription()) . "\n\n" : '') . '* Accept value: ' . ($option->acceptValue() ? 'yes' : 'no') . "\n" . '* Is value required: ' . ($option->isValueRequired() ? 'yes' : 'no') . "\n" . '* Is multiple: ' . ($option->isArray() ? 'yes' : 'no') . "\n" . '* Is negatable: ' . ($option->isNegatable() ? 'yes' : 'no') . "\n" . '* Default: `' . \str_replace("\n", '', \var_export($option->getDefault(), \true)) . '`');
    }
    /**
     * {@inheritdoc}
     */
    protected function describeInputDefinition(InputDefinition $definition, array $options = [])
    {
        if ($showArguments = \count($definition->getArguments()) > 0) {
            $this->write('### Arguments');
            foreach ($definition->getArguments() as $argument) {
                $this->write("\n\n");
                if (null !== ($describeInputArgument = $this->describeInputArgument($argument))) {
                    $this->write($describeInputArgument);
                }
            }
        }
        if (\count($definition->getOptions()) > 0) {
            if ($showArguments) {
                $this->write("\n\n");
            }
            $this->write('### Options');
            foreach ($definition->getOptions() as $option) {
                $this->write("\n\n");
                if (null !== ($describeInputOption = $this->describeInputOption($option))) {
                    $this->write($describeInputOption);
                }
            }
        }
    }
    /**
     * {@inheritdoc}
     */
    protected function describeCommand(Command $command, array $options = [])
    {
        if ($options['short'] ?? \false) {
            $this->write('`' . $command->getName() . "`\n" . \str_repeat('-', Helper::width($command->getName()) + 2) . "\n\n" . ($command->getDescription() ? $command->getDescription() . "\n\n" : '') . '### Usage' . "\n\n" . \array_reduce($command->getAliases(), function ($carry, $usage) {
                return $carry . '* `' . $usage . '`' . "\n";
            }));
            return;
        }
        $command->mergeApplicationDefinition(\false);
        $this->write('`' . $command->getName() . "`\n" . \str_repeat('-', Helper::width($command->getName()) + 2) . "\n\n" . ($command->getDescription() ? $command->getDescription() . "\n\n" : '') . '### Usage' . "\n\n" . \array_reduce(\array_merge([$command->getSynopsis()], $command->getAliases(), $command->getUsages()), function ($carry, $usage) {
            return $carry . '* `' . $usage . '`' . "\n";
        }));
        if ($help = $command->getProcessedHelp()) {
            $this->write("\n");
            $this->write($help);
        }
        $definition = $command->getDefinition();
        if ($definition->getOptions() || $definition->getArguments()) {
            $this->write("\n\n");
            $this->describeInputDefinition($definition);
        }
    }
    /**
     * {@inheritdoc}
     */
    protected function describeApplication(Application $application, array $options = [])
    {
        $describedNamespace = $options['namespace'] ?? null;
        $description = new ApplicationDescription($application, $describedNamespace);
        $title = $this->getApplicationTitle($application);
        $this->write($title . "\n" . \str_repeat('=', Helper::width($title)));
        foreach ($description->getNamespaces() as $namespace) {
            if (ApplicationDescription::GLOBAL_NAMESPACE !== $namespace['id']) {
                $this->write("\n\n");
                $this->write('**' . $namespace['id'] . ':**');
            }
            $this->write("\n\n");
            $this->write(\implode("\n", \array_map(function ($commandName) use($description) {
                return \sprintf('* [`%s`](#%s)', $commandName, \str_replace(':', '', $description->getCommand($commandName)->getName()));
            }, $namespace['commands'])));
        }
        foreach ($description->getCommands() as $command) {
            $this->write("\n\n");
            if (null !== ($describeCommand = $this->describeCommand($command, $options))) {
                $this->write($describeCommand);
            }
        }
    }
    private function getApplicationTitle(Application $application) : string
    {
        if ('UNKNOWN' !== $application->getName()) {
            if ('UNKNOWN' !== $application->getVersion()) {
                return \sprintf('%s %s', $application->getName(), $application->getVersion());
            }
            return $application->getName();
        }
        return 'Console Tool';
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Descriptor;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Application;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\Command;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\CommandNotFoundException;
/**
 * @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
 *
 * @internal
 */
class ApplicationDescription
{
    public const GLOBAL_NAMESPACE = '_global';
    private $application;
    private $namespace;
    private $showHidden;
    /**
     * @var array
     */
    private $namespaces;
    /**
     * @var array<string, Command>
     */
    private $commands;
    /**
     * @var array<string, Command>
     */
    private $aliases;
    public function __construct(Application $application, string $namespace = null, bool $showHidden = \false)
    {
        $this->application = $application;
        $this->namespace = $namespace;
        $this->showHidden = $showHidden;
    }
    public function getNamespaces() : array
    {
        if (null === $this->namespaces) {
            $this->inspectApplication();
        }
        return $this->namespaces;
    }
    /**
     * @return Command[]
     */
    public function getCommands() : array
    {
        if (null === $this->commands) {
            $this->inspectApplication();
        }
        return $this->commands;
    }
    /**
     * @throws CommandNotFoundException
     */
    public function getCommand(string $name) : Command
    {
        if (!isset($this->commands[$name]) && !isset($this->aliases[$name])) {
            throw new CommandNotFoundException(\sprintf('Command "%s" does not exist.', $name));
        }
        return $this->commands[$name] ?? $this->aliases[$name];
    }
    private function inspectApplication()
    {
        $this->commands = [];
        $this->namespaces = [];
        $all = $this->application->all($this->namespace ? $this->application->findNamespace($this->namespace) : null);
        foreach ($this->sortCommands($all) as $namespace => $commands) {
            $names = [];
            /** @var Command $command */
            foreach ($commands as $name => $command) {
                if (!$command->getName() || !$this->showHidden && $command->isHidden()) {
                    continue;
                }
                if ($command->getName() === $name) {
                    $this->commands[$name] = $command;
                } else {
                    $this->aliases[$name] = $command;
                }
                $names[] = $name;
            }
            $this->namespaces[$namespace] = ['id' => $namespace, 'commands' => $names];
        }
    }
    private function sortCommands(array $commands) : array
    {
        $namespacedCommands = [];
        $globalCommands = [];
        $sortedCommands = [];
        foreach ($commands as $name => $command) {
            $key = $this->application->extractNamespace($name, 1);
            if (\in_array($key, ['', self::GLOBAL_NAMESPACE], \true)) {
                $globalCommands[$name] = $command;
            } else {
                $namespacedCommands[$key][$name] = $command;
            }
        }
        if ($globalCommands) {
            \ksort($globalCommands);
            $sortedCommands[self::GLOBAL_NAMESPACE] = $globalCommands;
        }
        if ($namespacedCommands) {
            \ksort($namespacedCommands, \SORT_STRING);
            foreach ($namespacedCommands as $key => $commandsSet) {
                \ksort($commandsSet);
                $sortedCommands[$key] = $commandsSet;
            }
        }
        return $sortedCommands;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Descriptor;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Application;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\Command;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter\OutputFormatter;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper\Helper;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputArgument;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputDefinition;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputOption;
/**
 * Text descriptor.
 *
 * @author Jean-François Simon <contact@jfsimon.fr>
 *
 * @internal
 */
class TextDescriptor extends Descriptor
{
    /**
     * {@inheritdoc}
     */
    protected function describeInputArgument(InputArgument $argument, array $options = [])
    {
        if (null !== $argument->getDefault() && (!\is_array($argument->getDefault()) || \count($argument->getDefault()))) {
            $default = \sprintf('<comment> [default: %s]</comment>', $this->formatDefaultValue($argument->getDefault()));
        } else {
            $default = '';
        }
        $totalWidth = $options['total_width'] ?? Helper::width($argument->getName());
        $spacingWidth = $totalWidth - \strlen($argument->getName());
        $this->writeText(\sprintf(
            '  <info>%s</info>  %s%s%s',
            $argument->getName(),
            \str_repeat(' ', $spacingWidth),
            // + 4 = 2 spaces before <info>, 2 spaces after </info>
            \preg_replace('/\\s*[\\r\\n]\\s*/', "\n" . \str_repeat(' ', $totalWidth + 4), $argument->getDescription()),
            $default
        ), $options);
    }
    /**
     * {@inheritdoc}
     */
    protected function describeInputOption(InputOption $option, array $options = [])
    {
        if ($option->acceptValue() && null !== $option->getDefault() && (!\is_array($option->getDefault()) || \count($option->getDefault()))) {
            $default = \sprintf('<comment> [default: %s]</comment>', $this->formatDefaultValue($option->getDefault()));
        } else {
            $default = '';
        }
        $value = '';
        if ($option->acceptValue()) {
            $value = '=' . \strtoupper($option->getName());
            if ($option->isValueOptional()) {
                $value = '[' . $value . ']';
            }
        }
        $totalWidth = $options['total_width'] ?? $this->calculateTotalWidthForOptions([$option]);
        $synopsis = \sprintf('%s%s', $option->getShortcut() ? \sprintf('-%s, ', $option->getShortcut()) : '    ', \sprintf($option->isNegatable() ? '--%1$s|--no-%1$s' : '--%1$s%2$s', $option->getName(), $value));
        $spacingWidth = $totalWidth - Helper::width($synopsis);
        $this->writeText(\sprintf(
            '  <info>%s</info>  %s%s%s%s',
            $synopsis,
            \str_repeat(' ', $spacingWidth),
            // + 4 = 2 spaces before <info>, 2 spaces after </info>
            \preg_replace('/\\s*[\\r\\n]\\s*/', "\n" . \str_repeat(' ', $totalWidth + 4), $option->getDescription()),
            $default,
            $option->isArray() ? '<comment> (multiple values allowed)</comment>' : ''
        ), $options);
    }
    /**
     * {@inheritdoc}
     */
    protected function describeInputDefinition(InputDefinition $definition, array $options = [])
    {
        $totalWidth = $this->calculateTotalWidthForOptions($definition->getOptions());
        foreach ($definition->getArguments() as $argument) {
            $totalWidth = \max($totalWidth, Helper::width($argument->getName()));
        }
        if ($definition->getArguments()) {
            $this->writeText('<comment>Arguments:</comment>', $options);
            $this->writeText("\n");
            foreach ($definition->getArguments() as $argument) {
                $this->describeInputArgument($argument, \array_merge($options, ['total_width' => $totalWidth]));
                $this->writeText("\n");
            }
        }
        if ($definition->getArguments() && $definition->getOptions()) {
            $this->writeText("\n");
        }
        if ($definition->getOptions()) {
            $laterOptions = [];
            $this->writeText('<comment>Options:</comment>', $options);
            foreach ($definition->getOptions() as $option) {
                if (\strlen($option->getShortcut() ?? '') > 1) {
                    $laterOptions[] = $option;
                    continue;
                }
                $this->writeText("\n");
                $this->describeInputOption($option, \array_merge($options, ['total_width' => $totalWidth]));
            }
            foreach ($laterOptions as $option) {
                $this->writeText("\n");
                $this->describeInputOption($option, \array_merge($options, ['total_width' => $totalWidth]));
            }
        }
    }
    /**
     * {@inheritdoc}
     */
    protected function describeCommand(Command $command, array $options = [])
    {
        $command->mergeApplicationDefinition(\false);
        if ($description = $command->getDescription()) {
            $this->writeText('<comment>Description:</comment>', $options);
            $this->writeText("\n");
            $this->writeText('  ' . $description);
            $this->writeText("\n\n");
        }
        $this->writeText('<comment>Usage:</comment>', $options);
        foreach (\array_merge([$command->getSynopsis(\true)], $command->getAliases(), $command->getUsages()) as $usage) {
            $this->writeText("\n");
            $this->writeText('  ' . OutputFormatter::escape($usage), $options);
        }
        $this->writeText("\n");
        $definition = $command->getDefinition();
        if ($definition->getOptions() || $definition->getArguments()) {
            $this->writeText("\n");
            $this->describeInputDefinition($definition, $options);
            $this->writeText("\n");
        }
        $help = $command->getProcessedHelp();
        if ($help && $help !== $description) {
            $this->writeText("\n");
            $this->writeText('<comment>Help:</comment>', $options);
            $this->writeText("\n");
            $this->writeText('  ' . \str_replace("\n", "\n  ", $help), $options);
            $this->writeText("\n");
        }
    }
    /**
     * {@inheritdoc}
     */
    protected function describeApplication(Application $application, array $options = [])
    {
        $describedNamespace = $options['namespace'] ?? null;
        $description = new ApplicationDescription($application, $describedNamespace);
        if (isset($options['raw_text']) && $options['raw_text']) {
            $width = $this->getColumnWidth($description->getCommands());
            foreach ($description->getCommands() as $command) {
                $this->writeText(\sprintf("%-{$width}s %s", $command->getName(), $command->getDescription()), $options);
                $this->writeText("\n");
            }
        } else {
            if ('' != ($help = $application->getHelp())) {
                $this->writeText("{$help}\n\n", $options);
            }
            $this->writeText("<comment>Usage:</comment>\n", $options);
            $this->writeText("  command [options] [arguments]\n\n", $options);
            $this->describeInputDefinition(new InputDefinition($application->getDefinition()->getOptions()), $options);
            $this->writeText("\n");
            $this->writeText("\n");
            $commands = $description->getCommands();
            $namespaces = $description->getNamespaces();
            if ($describedNamespace && $namespaces) {
                // make sure all alias commands are included when describing a specific namespace
                $describedNamespaceInfo = \reset($namespaces);
                foreach ($describedNamespaceInfo['commands'] as $name) {
                    $commands[$name] = $description->getCommand($name);
                }
            }
            // calculate max. width based on available commands per namespace
            $width = $this->getColumnWidth(\array_merge(...\array_values(\array_map(function ($namespace) use($commands) {
                return \array_intersect($namespace['commands'], \array_keys($commands));
            }, \array_values($namespaces)))));
            if ($describedNamespace) {
                $this->writeText(\sprintf('<comment>Available commands for the "%s" namespace:</comment>', $describedNamespace), $options);
            } else {
                $this->writeText('<comment>Available commands:</comment>', $options);
            }
            foreach ($namespaces as $namespace) {
                $namespace['commands'] = \array_filter($namespace['commands'], function ($name) use($commands) {
                    return isset($commands[$name]);
                });
                if (!$namespace['commands']) {
                    continue;
                }
                if (!$describedNamespace && ApplicationDescription::GLOBAL_NAMESPACE !== $namespace['id']) {
                    $this->writeText("\n");
                    $this->writeText(' <comment>' . $namespace['id'] . '</comment>', $options);
                }
                foreach ($namespace['commands'] as $name) {
                    $this->writeText("\n");
                    $spacingWidth = $width - Helper::width($name);
                    $command = $commands[$name];
                    $commandAliases = $name === $command->getName() ? $this->getCommandAliasesText($command) : '';
                    $this->writeText(\sprintf('  <info>%s</info>%s%s', $name, \str_repeat(' ', $spacingWidth), $commandAliases . $command->getDescription()), $options);
                }
            }
            $this->writeText("\n");
        }
    }
    /**
     * {@inheritdoc}
     */
    private function writeText(string $content, array $options = [])
    {
        $this->write(isset($options['raw_text']) && $options['raw_text'] ? \strip_tags($content) : $content, isset($options['raw_output']) ? !$options['raw_output'] : \true);
    }
    /**
     * Formats command aliases to show them in the command description.
     */
    private function getCommandAliasesText(Command $command) : string
    {
        $text = '';
        $aliases = $command->getAliases();
        if ($aliases) {
            $text = '[' . \implode('|', $aliases) . '] ';
        }
        return $text;
    }
    /**
     * Formats input option/argument default value.
     *
     * @param mixed $default
     */
    private function formatDefaultValue($default) : string
    {
        if (\INF === $default) {
            return 'INF';
        }
        if (\is_string($default)) {
            $default = OutputFormatter::escape($default);
        } elseif (\is_array($default)) {
            foreach ($default as $key => $value) {
                if (\is_string($value)) {
                    $default[$key] = OutputFormatter::escape($value);
                }
            }
        }
        return \str_replace('\\\\', '\\', \json_encode($default, \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE));
    }
    /**
     * @param array<Command|string> $commands
     */
    private function getColumnWidth(array $commands) : int
    {
        $widths = [];
        foreach ($commands as $command) {
            if ($command instanceof Command) {
                $widths[] = Helper::width($command->getName());
                foreach ($command->getAliases() as $alias) {
                    $widths[] = Helper::width($alias);
                }
            } else {
                $widths[] = Helper::width($command);
            }
        }
        return $widths ? \max($widths) + 2 : 0;
    }
    /**
     * @param InputOption[] $options
     */
    private function calculateTotalWidthForOptions(array $options) : int
    {
        $totalWidth = 0;
        foreach ($options as $option) {
            // "-" + shortcut + ", --" + name
            $nameLength = 1 + \max(Helper::width($option->getShortcut()), 1) + 4 + Helper::width($option->getName());
            if ($option->isNegatable()) {
                $nameLength += 6 + Helper::width($option->getName());
                // |--no- + name
            } elseif ($option->acceptValue()) {
                $valueLength = 1 + Helper::width($option->getName());
                // = + value
                $valueLength += $option->isValueOptional() ? 2 : 0;
                // [ + ]
                $nameLength += $valueLength;
            }
            $totalWidth = \max($totalWidth, $nameLength);
        }
        return $totalWidth;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Descriptor;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
/**
 * Descriptor interface.
 *
 * @author Jean-François Simon <contact@jfsimon.fr>
 */
interface DescriptorInterface
{
    public function describe(OutputInterface $output, object $object, array $options = []);
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Descriptor;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Application;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\Command;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputArgument;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputDefinition;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputOption;
/**
 * JSON descriptor.
 *
 * @author Jean-François Simon <contact@jfsimon.fr>
 *
 * @internal
 */
class JsonDescriptor extends Descriptor
{
    /**
     * {@inheritdoc}
     */
    protected function describeInputArgument(InputArgument $argument, array $options = [])
    {
        $this->writeData($this->getInputArgumentData($argument), $options);
    }
    /**
     * {@inheritdoc}
     */
    protected function describeInputOption(InputOption $option, array $options = [])
    {
        $this->writeData($this->getInputOptionData($option), $options);
        if ($option->isNegatable()) {
            $this->writeData($this->getInputOptionData($option, \true), $options);
        }
    }
    /**
     * {@inheritdoc}
     */
    protected function describeInputDefinition(InputDefinition $definition, array $options = [])
    {
        $this->writeData($this->getInputDefinitionData($definition), $options);
    }
    /**
     * {@inheritdoc}
     */
    protected function describeCommand(Command $command, array $options = [])
    {
        $this->writeData($this->getCommandData($command, $options['short'] ?? \false), $options);
    }
    /**
     * {@inheritdoc}
     */
    protected function describeApplication(Application $application, array $options = [])
    {
        $describedNamespace = $options['namespace'] ?? null;
        $description = new ApplicationDescription($application, $describedNamespace, \true);
        $commands = [];
        foreach ($description->getCommands() as $command) {
            $commands[] = $this->getCommandData($command, $options['short'] ?? \false);
        }
        $data = [];
        if ('UNKNOWN' !== $application->getName()) {
            $data['application']['name'] = $application->getName();
            if ('UNKNOWN' !== $application->getVersion()) {
                $data['application']['version'] = $application->getVersion();
            }
        }
        $data['commands'] = $commands;
        if ($describedNamespace) {
            $data['namespace'] = $describedNamespace;
        } else {
            $data['namespaces'] = \array_values($description->getNamespaces());
        }
        $this->writeData($data, $options);
    }
    /**
     * Writes data as json.
     */
    private function writeData(array $data, array $options)
    {
        $flags = $options['json_encoding'] ?? 0;
        $this->write(\json_encode($data, $flags));
    }
    private function getInputArgumentData(InputArgument $argument) : array
    {
        return ['name' => $argument->getName(), 'is_required' => $argument->isRequired(), 'is_array' => $argument->isArray(), 'description' => \preg_replace('/\\s*[\\r\\n]\\s*/', ' ', $argument->getDescription()), 'default' => \INF === $argument->getDefault() ? 'INF' : $argument->getDefault()];
    }
    private function getInputOptionData(InputOption $option, bool $negated = \false) : array
    {
        return $negated ? ['name' => '--no-' . $option->getName(), 'shortcut' => '', 'accept_value' => \false, 'is_value_required' => \false, 'is_multiple' => \false, 'description' => 'Negate the "--' . $option->getName() . '" option', 'default' => \false] : ['name' => '--' . $option->getName(), 'shortcut' => $option->getShortcut() ? '-' . \str_replace('|', '|-', $option->getShortcut()) : '', 'accept_value' => $option->acceptValue(), 'is_value_required' => $option->isValueRequired(), 'is_multiple' => $option->isArray(), 'description' => \preg_replace('/\\s*[\\r\\n]\\s*/', ' ', $option->getDescription()), 'default' => \INF === $option->getDefault() ? 'INF' : $option->getDefault()];
    }
    private function getInputDefinitionData(InputDefinition $definition) : array
    {
        $inputArguments = [];
        foreach ($definition->getArguments() as $name => $argument) {
            $inputArguments[$name] = $this->getInputArgumentData($argument);
        }
        $inputOptions = [];
        foreach ($definition->getOptions() as $name => $option) {
            $inputOptions[$name] = $this->getInputOptionData($option);
            if ($option->isNegatable()) {
                $inputOptions['no-' . $name] = $this->getInputOptionData($option, \true);
            }
        }
        return ['arguments' => $inputArguments, 'options' => $inputOptions];
    }
    private function getCommandData(Command $command, bool $short = \false) : array
    {
        $data = ['name' => $command->getName(), 'description' => $command->getDescription()];
        if ($short) {
            $data += ['usage' => $command->getAliases()];
        } else {
            $command->mergeApplicationDefinition(\false);
            $data += ['usage' => \array_merge([$command->getSynopsis()], $command->getUsages(), $command->getAliases()), 'help' => $command->getProcessedHelp(), 'definition' => $this->getInputDefinitionData($command->getDefinition())];
        }
        $data['hidden'] = $command->isHidden();
        return $data;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Logger;

use _PHPStan_dcc7b7cff\Psr\Log\AbstractLogger;
use _PHPStan_dcc7b7cff\Psr\Log\InvalidArgumentException;
use _PHPStan_dcc7b7cff\Psr\Log\LogLevel;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\ConsoleOutputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
/**
 * PSR-3 compliant console logger.
 *
 * @author Kévin Dunglas <dunglas@gmail.com>
 *
 * @see https://www.php-fig.org/psr/psr-3/
 */
class ConsoleLogger extends AbstractLogger
{
    public const INFO = 'info';
    public const ERROR = 'error';
    private $output;
    private $verbosityLevelMap = [LogLevel::EMERGENCY => OutputInterface::VERBOSITY_NORMAL, LogLevel::ALERT => OutputInterface::VERBOSITY_NORMAL, LogLevel::CRITICAL => OutputInterface::VERBOSITY_NORMAL, LogLevel::ERROR => OutputInterface::VERBOSITY_NORMAL, LogLevel::WARNING => OutputInterface::VERBOSITY_NORMAL, LogLevel::NOTICE => OutputInterface::VERBOSITY_VERBOSE, LogLevel::INFO => OutputInterface::VERBOSITY_VERY_VERBOSE, LogLevel::DEBUG => OutputInterface::VERBOSITY_DEBUG];
    private $formatLevelMap = [LogLevel::EMERGENCY => self::ERROR, LogLevel::ALERT => self::ERROR, LogLevel::CRITICAL => self::ERROR, LogLevel::ERROR => self::ERROR, LogLevel::WARNING => self::INFO, LogLevel::NOTICE => self::INFO, LogLevel::INFO => self::INFO, LogLevel::DEBUG => self::INFO];
    private $errored = \false;
    public function __construct(OutputInterface $output, array $verbosityLevelMap = [], array $formatLevelMap = [])
    {
        $this->output = $output;
        $this->verbosityLevelMap = $verbosityLevelMap + $this->verbosityLevelMap;
        $this->formatLevelMap = $formatLevelMap + $this->formatLevelMap;
    }
    /**
     * {@inheritdoc}
     *
     * @return void
     */
    public function log($level, $message, array $context = [])
    {
        if (!isset($this->verbosityLevelMap[$level])) {
            throw new InvalidArgumentException(\sprintf('The log level "%s" does not exist.', $level));
        }
        $output = $this->output;
        // Write to the error output if necessary and available
        if (self::ERROR === $this->formatLevelMap[$level]) {
            if ($this->output instanceof ConsoleOutputInterface) {
                $output = $output->getErrorOutput();
            }
            $this->errored = \true;
        }
        // the if condition check isn't necessary -- it's the same one that $output will do internally anyway.
        // We only do it for efficiency here as the message formatting is relatively expensive.
        if ($output->getVerbosity() >= $this->verbosityLevelMap[$level]) {
            $output->writeln(\sprintf('<%1$s>[%2$s] %3$s</%1$s>', $this->formatLevelMap[$level], $level, $this->interpolate($message, $context)), $this->verbosityLevelMap[$level]);
        }
    }
    /**
     * Returns true when any messages have been logged at error levels.
     *
     * @return bool
     */
    public function hasErrored()
    {
        return $this->errored;
    }
    /**
     * Interpolates context values into the message placeholders.
     *
     * @author PHP Framework Interoperability Group
     */
    private function interpolate(string $message, array $context) : string
    {
        if (!\str_contains($message, '{')) {
            return $message;
        }
        $replacements = [];
        foreach ($context as $key => $val) {
            if (null === $val || \is_scalar($val) || \is_object($val) && \method_exists($val, '__toString')) {
                $replacements["{{$key}}"] = $val;
            } elseif ($val instanceof \DateTimeInterface) {
                $replacements["{{$key}}"] = $val->format(\DateTime::RFC3339);
            } elseif (\is_object($val)) {
                $replacements["{{$key}}"] = '[object ' . \get_class($val) . ']';
            } else {
                $replacements["{{$key}}"] = '[' . \gettype($val) . ']';
            }
        }
        return \strtr($message, $replacements);
    }
}
Copyright (c) 2004-present Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Attribute;

/**
 * Service tag to autoconfigure commands.
 */
#[\Attribute(\Attribute::TARGET_CLASS)]
class AsCommand
{
    public function __construct(public string $name, public ?string $description = null, array $aliases = [], bool $hidden = \false)
    {
        if (!$hidden && !$aliases) {
            return;
        }
        $name = \explode('|', $name);
        $name = \array_merge($name, $aliases);
        if ($hidden && '' !== $name[0]) {
            \array_unshift($name, '');
        }
        $this->name = \implode('|', $name);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\DependencyInjection;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\Command;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\LazyCommand;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\CommandLoader\ContainerCommandLoader;
use _PHPStan_dcc7b7cff\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
use _PHPStan_dcc7b7cff\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass;
use _PHPStan_dcc7b7cff\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PHPStan_dcc7b7cff\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use _PHPStan_dcc7b7cff\Symfony\Component\DependencyInjection\Reference;
use _PHPStan_dcc7b7cff\Symfony\Component\DependencyInjection\TypedReference;
/**
 * Registers console commands.
 *
 * @author Grégoire Pineau <lyrixx@lyrixx.info>
 */
class AddConsoleCommandPass implements CompilerPassInterface
{
    private $commandLoaderServiceId;
    private $commandTag;
    private $noPreloadTag;
    private $privateTagName;
    public function __construct(string $commandLoaderServiceId = 'console.command_loader', string $commandTag = 'console.command', string $noPreloadTag = 'container.no_preload', string $privateTagName = 'container.private')
    {
        if (0 < \func_num_args()) {
            trigger_deprecation('symfony/console', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
        }
        $this->commandLoaderServiceId = $commandLoaderServiceId;
        $this->commandTag = $commandTag;
        $this->noPreloadTag = $noPreloadTag;
        $this->privateTagName = $privateTagName;
    }
    public function process(ContainerBuilder $container)
    {
        $commandServices = $container->findTaggedServiceIds($this->commandTag, \true);
        $lazyCommandMap = [];
        $lazyCommandRefs = [];
        $serviceIds = [];
        foreach ($commandServices as $id => $tags) {
            $definition = $container->getDefinition($id);
            $definition->addTag($this->noPreloadTag);
            $class = $container->getParameterBag()->resolveValue($definition->getClass());
            if (isset($tags[0]['command'])) {
                $aliases = $tags[0]['command'];
            } else {
                if (!($r = $container->getReflectionClass($class))) {
                    throw new InvalidArgumentException(\sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id));
                }
                if (!$r->isSubclassOf(Command::class)) {
                    throw new InvalidArgumentException(\sprintf('The service "%s" tagged "%s" must be a subclass of "%s".', $id, $this->commandTag, Command::class));
                }
                $aliases = \str_replace('%', '%%', $class::getDefaultName() ?? '');
            }
            $aliases = \explode('|', $aliases ?? '');
            $commandName = \array_shift($aliases);
            if ($isHidden = '' === $commandName) {
                $commandName = \array_shift($aliases);
            }
            if (null === $commandName) {
                if (!$definition->isPublic() || $definition->isPrivate() || $definition->hasTag($this->privateTagName)) {
                    $commandId = 'console.command.public_alias.' . $id;
                    $container->setAlias($commandId, $id)->setPublic(\true);
                    $id = $commandId;
                }
                $serviceIds[] = $id;
                continue;
            }
            $description = $tags[0]['description'] ?? null;
            unset($tags[0]);
            $lazyCommandMap[$commandName] = $id;
            $lazyCommandRefs[$id] = new TypedReference($id, $class);
            foreach ($aliases as $alias) {
                $lazyCommandMap[$alias] = $id;
            }
            foreach ($tags as $tag) {
                if (isset($tag['command'])) {
                    $aliases[] = $tag['command'];
                    $lazyCommandMap[$tag['command']] = $id;
                }
                $description = $description ?? $tag['description'] ?? null;
            }
            $definition->addMethodCall('setName', [$commandName]);
            if ($aliases) {
                $definition->addMethodCall('setAliases', [$aliases]);
            }
            if ($isHidden) {
                $definition->addMethodCall('setHidden', [\true]);
            }
            if (!$description) {
                if (!($r = $container->getReflectionClass($class))) {
                    throw new InvalidArgumentException(\sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id));
                }
                if (!$r->isSubclassOf(Command::class)) {
                    throw new InvalidArgumentException(\sprintf('The service "%s" tagged "%s" must be a subclass of "%s".', $id, $this->commandTag, Command::class));
                }
                $description = \str_replace('%', '%%', $class::getDefaultDescription() ?? '');
            }
            if ($description) {
                $definition->addMethodCall('setDescription', [$description]);
                $container->register('.' . $id . '.lazy', LazyCommand::class)->setArguments([$commandName, $aliases, $description, $isHidden, new ServiceClosureArgument($lazyCommandRefs[$id])]);
                $lazyCommandRefs[$id] = new Reference('.' . $id . '.lazy');
            }
        }
        $container->register($this->commandLoaderServiceId, ContainerCommandLoader::class)->setPublic(\true)->addTag($this->noPreloadTag)->setArguments([ServiceLocatorTagPass::register($container, $lazyCommandRefs), $lazyCommandMap]);
        $container->setParameter('console.command.ids', $serviceIds);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Completion\Output;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Completion\CompletionSuggestions;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
/**
 * Transforms the {@see CompletionSuggestions} object into output readable by the shell completion.
 *
 * @author Wouter de Jong <wouter@wouterj.nl>
 */
interface CompletionOutputInterface
{
    public function write(CompletionSuggestions $suggestions, OutputInterface $output) : void;
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Completion\Output;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Completion\CompletionSuggestions;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
/**
 * @author Wouter de Jong <wouter@wouterj.nl>
 */
class BashCompletionOutput implements CompletionOutputInterface
{
    public function write(CompletionSuggestions $suggestions, OutputInterface $output) : void
    {
        $values = $suggestions->getValueSuggestions();
        foreach ($suggestions->getOptionSuggestions() as $option) {
            $values[] = '--' . $option->getName();
            if ($option->isNegatable()) {
                $values[] = '--no-' . $option->getName();
            }
        }
        $output->writeln(\implode("\n", $values));
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Completion;

/**
 * Represents a single suggested value.
 *
 * @author Wouter de Jong <wouter@wouterj.nl>
 */
class Suggestion
{
    private $value;
    public function __construct(string $value)
    {
        $this->value = $value;
    }
    public function getValue() : string
    {
        return $this->value;
    }
    public function __toString() : string
    {
        return $this->getValue();
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Completion;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputOption;
/**
 * Stores all completion suggestions for the current input.
 *
 * @author Wouter de Jong <wouter@wouterj.nl>
 */
final class CompletionSuggestions
{
    private $valueSuggestions = [];
    private $optionSuggestions = [];
    /**
     * Add a suggested value for an input option or argument.
     *
     * @param string|Suggestion $value
     *
     * @return $this
     */
    public function suggestValue($value) : self
    {
        $this->valueSuggestions[] = !$value instanceof Suggestion ? new Suggestion($value) : $value;
        return $this;
    }
    /**
     * Add multiple suggested values at once for an input option or argument.
     *
     * @param list<string|Suggestion> $values
     *
     * @return $this
     */
    public function suggestValues(array $values) : self
    {
        foreach ($values as $value) {
            $this->suggestValue($value);
        }
        return $this;
    }
    /**
     * Add a suggestion for an input option name.
     *
     * @return $this
     */
    public function suggestOption(InputOption $option) : self
    {
        $this->optionSuggestions[] = $option;
        return $this;
    }
    /**
     * Add multiple suggestions for input option names at once.
     *
     * @param InputOption[] $options
     *
     * @return $this
     */
    public function suggestOptions(array $options) : self
    {
        foreach ($options as $option) {
            $this->suggestOption($option);
        }
        return $this;
    }
    /**
     * @return InputOption[]
     */
    public function getOptionSuggestions() : array
    {
        return $this->optionSuggestions;
    }
    /**
     * @return Suggestion[]
     */
    public function getValueSuggestions() : array
    {
        return $this->valueSuggestions;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Completion;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\RuntimeException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\ArgvInput;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputDefinition;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputOption;
/**
 * An input specialized for shell completion.
 *
 * This input allows unfinished option names or values and exposes what kind of
 * completion is expected.
 *
 * @author Wouter de Jong <wouter@wouterj.nl>
 */
final class CompletionInput extends ArgvInput
{
    public const TYPE_ARGUMENT_VALUE = 'argument_value';
    public const TYPE_OPTION_VALUE = 'option_value';
    public const TYPE_OPTION_NAME = 'option_name';
    public const TYPE_NONE = 'none';
    private $tokens;
    private $currentIndex;
    private $completionType;
    private $completionName = null;
    private $completionValue = '';
    /**
     * Converts a terminal string into tokens.
     *
     * This is required for shell completions without COMP_WORDS support.
     */
    public static function fromString(string $inputStr, int $currentIndex) : self
    {
        \preg_match_all('/(?<=^|\\s)([\'"]?)(.+?)(?<!\\\\)\\1(?=$|\\s)/', $inputStr, $tokens);
        return self::fromTokens($tokens[0], $currentIndex);
    }
    /**
     * Create an input based on an COMP_WORDS token list.
     *
     * @param string[] $tokens       the set of split tokens (e.g. COMP_WORDS or argv)
     * @param          $currentIndex the index of the cursor (e.g. COMP_CWORD)
     */
    public static function fromTokens(array $tokens, int $currentIndex) : self
    {
        $input = new self($tokens);
        $input->tokens = $tokens;
        $input->currentIndex = $currentIndex;
        return $input;
    }
    /**
     * {@inheritdoc}
     */
    public function bind(InputDefinition $definition) : void
    {
        parent::bind($definition);
        $relevantToken = $this->getRelevantToken();
        if ('-' === $relevantToken[0]) {
            // the current token is an input option: complete either option name or option value
            [$optionToken, $optionValue] = \explode('=', $relevantToken, 2) + ['', ''];
            $option = $this->getOptionFromToken($optionToken);
            if (null === $option && !$this->isCursorFree()) {
                $this->completionType = self::TYPE_OPTION_NAME;
                $this->completionValue = $relevantToken;
                return;
            }
            if (null !== $option && $option->acceptValue()) {
                $this->completionType = self::TYPE_OPTION_VALUE;
                $this->completionName = $option->getName();
                $this->completionValue = $optionValue ?: (!\str_starts_with($optionToken, '--') ? \substr($optionToken, 2) : '');
                return;
            }
        }
        $previousToken = $this->tokens[$this->currentIndex - 1];
        if ('-' === $previousToken[0] && '' !== \trim($previousToken, '-')) {
            // check if previous option accepted a value
            $previousOption = $this->getOptionFromToken($previousToken);
            if (null !== $previousOption && $previousOption->acceptValue()) {
                $this->completionType = self::TYPE_OPTION_VALUE;
                $this->completionName = $previousOption->getName();
                $this->completionValue = $relevantToken;
                return;
            }
        }
        // complete argument value
        $this->completionType = self::TYPE_ARGUMENT_VALUE;
        foreach ($this->definition->getArguments() as $argumentName => $argument) {
            if (!isset($this->arguments[$argumentName])) {
                break;
            }
            $argumentValue = $this->arguments[$argumentName];
            $this->completionName = $argumentName;
            if (\is_array($argumentValue)) {
                $this->completionValue = $argumentValue ? $argumentValue[\array_key_last($argumentValue)] : null;
            } else {
                $this->completionValue = $argumentValue;
            }
        }
        if ($this->currentIndex >= \count($this->tokens)) {
            if (!isset($this->arguments[$argumentName]) || $this->definition->getArgument($argumentName)->isArray()) {
                $this->completionName = $argumentName;
                $this->completionValue = '';
            } else {
                // we've reached the end
                $this->completionType = self::TYPE_NONE;
                $this->completionName = null;
                $this->completionValue = '';
            }
        }
    }
    /**
     * Returns the type of completion required.
     *
     * TYPE_ARGUMENT_VALUE when completing the value of an input argument
     * TYPE_OPTION_VALUE   when completing the value of an input option
     * TYPE_OPTION_NAME    when completing the name of an input option
     * TYPE_NONE           when nothing should be completed
     *
     * @return string One of self::TYPE_* constants. TYPE_OPTION_NAME and TYPE_NONE are already implemented by the Console component
     */
    public function getCompletionType() : string
    {
        return $this->completionType;
    }
    /**
     * The name of the input option or argument when completing a value.
     *
     * @return string|null returns null when completing an option name
     */
    public function getCompletionName() : ?string
    {
        return $this->completionName;
    }
    /**
     * The value already typed by the user (or empty string).
     */
    public function getCompletionValue() : string
    {
        return $this->completionValue;
    }
    public function mustSuggestOptionValuesFor(string $optionName) : bool
    {
        return self::TYPE_OPTION_VALUE === $this->getCompletionType() && $optionName === $this->getCompletionName();
    }
    public function mustSuggestArgumentValuesFor(string $argumentName) : bool
    {
        return self::TYPE_ARGUMENT_VALUE === $this->getCompletionType() && $argumentName === $this->getCompletionName();
    }
    protected function parseToken(string $token, bool $parseOptions) : bool
    {
        try {
            return parent::parseToken($token, $parseOptions);
        } catch (RuntimeException $e) {
            // suppress errors, completed input is almost never valid
        }
        return $parseOptions;
    }
    private function getOptionFromToken(string $optionToken) : ?InputOption
    {
        $optionName = \ltrim($optionToken, '-');
        if (!$optionName) {
            return null;
        }
        if ('-' === ($optionToken[1] ?? ' ')) {
            // long option name
            return $this->definition->hasOption($optionName) ? $this->definition->getOption($optionName) : null;
        }
        // short option name
        return $this->definition->hasShortcut($optionName[0]) ? $this->definition->getOptionForShortcut($optionName[0]) : null;
    }
    /**
     * The token of the cursor, or the last token if the cursor is at the end of the input.
     */
    private function getRelevantToken() : string
    {
        return $this->tokens[$this->isCursorFree() ? $this->currentIndex - 1 : $this->currentIndex];
    }
    /**
     * Whether the cursor is "free" (i.e. at the end of the input preceded by a space).
     */
    private function isCursorFree() : bool
    {
        $nrOfTokens = \count($this->tokens);
        if ($this->currentIndex > $nrOfTokens) {
            throw new \LogicException('Current index is invalid, it must be the number of input tokens or one more.');
        }
        return $this->currentIndex >= $nrOfTokens;
    }
    public function __toString()
    {
        $str = '';
        foreach ($this->tokens as $i => $token) {
            $str .= $token;
            if ($this->currentIndex === $i) {
                $str .= '|';
            }
            $str .= ' ';
        }
        if ($this->currentIndex > $i) {
            $str .= '|';
        }
        return \rtrim($str);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Command;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Application;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Completion\CompletionInput;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Completion\CompletionSuggestions;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper\HelperSet;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputDefinition;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
/**
 * @author Nicolas Grekas <p@tchwork.com>
 */
final class LazyCommand extends Command
{
    private $command;
    private $isEnabled;
    public function __construct(string $name, array $aliases, string $description, bool $isHidden, \Closure $commandFactory, ?bool $isEnabled = \true)
    {
        $this->setName($name)->setAliases($aliases)->setHidden($isHidden)->setDescription($description);
        $this->command = $commandFactory;
        $this->isEnabled = $isEnabled;
    }
    public function ignoreValidationErrors() : void
    {
        $this->getCommand()->ignoreValidationErrors();
    }
    public function setApplication(Application $application = null) : void
    {
        if ($this->command instanceof parent) {
            $this->command->setApplication($application);
        }
        parent::setApplication($application);
    }
    public function setHelperSet(HelperSet $helperSet) : void
    {
        if ($this->command instanceof parent) {
            $this->command->setHelperSet($helperSet);
        }
        parent::setHelperSet($helperSet);
    }
    public function isEnabled() : bool
    {
        return $this->isEnabled ?? $this->getCommand()->isEnabled();
    }
    public function run(InputInterface $input, OutputInterface $output) : int
    {
        return $this->getCommand()->run($input, $output);
    }
    public function complete(CompletionInput $input, CompletionSuggestions $suggestions) : void
    {
        $this->getCommand()->complete($input, $suggestions);
    }
    /**
     * @return $this
     */
    public function setCode(callable $code) : self
    {
        $this->getCommand()->setCode($code);
        return $this;
    }
    /**
     * @internal
     */
    public function mergeApplicationDefinition(bool $mergeArgs = \true) : void
    {
        $this->getCommand()->mergeApplicationDefinition($mergeArgs);
    }
    /**
     * @return $this
     */
    public function setDefinition($definition) : self
    {
        $this->getCommand()->setDefinition($definition);
        return $this;
    }
    public function getDefinition() : InputDefinition
    {
        return $this->getCommand()->getDefinition();
    }
    public function getNativeDefinition() : InputDefinition
    {
        return $this->getCommand()->getNativeDefinition();
    }
    /**
     * @return $this
     */
    public function addArgument(string $name, int $mode = null, string $description = '', $default = null) : self
    {
        $this->getCommand()->addArgument($name, $mode, $description, $default);
        return $this;
    }
    /**
     * @return $this
     */
    public function addOption(string $name, $shortcut = null, int $mode = null, string $description = '', $default = null) : self
    {
        $this->getCommand()->addOption($name, $shortcut, $mode, $description, $default);
        return $this;
    }
    /**
     * @return $this
     */
    public function setProcessTitle(string $title) : self
    {
        $this->getCommand()->setProcessTitle($title);
        return $this;
    }
    /**
     * @return $this
     */
    public function setHelp(string $help) : self
    {
        $this->getCommand()->setHelp($help);
        return $this;
    }
    public function getHelp() : string
    {
        return $this->getCommand()->getHelp();
    }
    public function getProcessedHelp() : string
    {
        return $this->getCommand()->getProcessedHelp();
    }
    public function getSynopsis(bool $short = \false) : string
    {
        return $this->getCommand()->getSynopsis($short);
    }
    /**
     * @return $this
     */
    public function addUsage(string $usage) : self
    {
        $this->getCommand()->addUsage($usage);
        return $this;
    }
    public function getUsages() : array
    {
        return $this->getCommand()->getUsages();
    }
    /**
     * @return mixed
     */
    public function getHelper(string $name)
    {
        return $this->getCommand()->getHelper($name);
    }
    public function getCommand() : parent
    {
        if (!$this->command instanceof \Closure) {
            return $this->command;
        }
        $command = $this->command = ($this->command)();
        $command->setApplication($this->getApplication());
        if (null !== $this->getHelperSet()) {
            $command->setHelperSet($this->getHelperSet());
        }
        $command->setName($this->getName())->setAliases($this->getAliases())->setHidden($this->isHidden())->setDescription($this->getDescription());
        // Will throw if the command is not correctly initialized.
        $command->getDefinition();
        return $command;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Command;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\LogicException;
use _PHPStan_dcc7b7cff\Symfony\Component\Lock\LockFactory;
use _PHPStan_dcc7b7cff\Symfony\Component\Lock\LockInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Lock\Store\FlockStore;
use _PHPStan_dcc7b7cff\Symfony\Component\Lock\Store\SemaphoreStore;
/**
 * Basic lock feature for commands.
 *
 * @author Geoffrey Brier <geoffrey.brier@gmail.com>
 */
trait LockableTrait
{
    /** @var LockInterface|null */
    private $lock;
    /**
     * Locks a command.
     */
    private function lock(string $name = null, bool $blocking = \false) : bool
    {
        if (!\class_exists(SemaphoreStore::class)) {
            throw new LogicException('To enable the locking feature you must install the symfony/lock component.');
        }
        if (null !== $this->lock) {
            throw new LogicException('A lock is already in place.');
        }
        if (SemaphoreStore::isSupported()) {
            $store = new SemaphoreStore();
        } else {
            $store = new FlockStore();
        }
        $this->lock = (new LockFactory($store))->createLock($name ?: $this->getName());
        if (!$this->lock->acquire($blocking)) {
            $this->lock = null;
            return \false;
        }
        return \true;
    }
    /**
     * Releases the command lock if there is one.
     */
    private function release()
    {
        if ($this->lock) {
            $this->lock->release();
            $this->lock = null;
        }
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Command;

/**
 * Interface for command reacting to signal.
 *
 * @author Grégoire Pineau <lyrixx@lyrix.info>
 */
interface SignalableCommandInterface
{
    /**
     * Returns the list of signals to subscribe.
     */
    public function getSubscribedSignals() : array;
    /**
     * The method will be called when the application is signaled.
     */
    public function handleSignal(int $signal) : void;
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Command;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Completion\CompletionInput;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Completion\CompletionSuggestions;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Descriptor\ApplicationDescription;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper\DescriptorHelper;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputArgument;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputOption;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
/**
 * HelpCommand displays the help for a given command.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class HelpCommand extends Command
{
    private $command;
    /**
     * {@inheritdoc}
     */
    protected function configure()
    {
        $this->ignoreValidationErrors();
        $this->setName('help')->setDefinition([new InputArgument('command_name', InputArgument::OPTIONAL, 'The command name', 'help'), new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command help')])->setDescription('Display help for a command')->setHelp(<<<'EOF'
The <info>%command.name%</info> command displays help for a given command:

  <info>%command.full_name% list</info>

You can also output the help in other formats by using the <comment>--format</comment> option:

  <info>%command.full_name% --format=xml list</info>

To display the list of available commands, please use the <info>list</info> command.
EOF
);
    }
    public function setCommand(Command $command)
    {
        $this->command = $command;
    }
    /**
     * {@inheritdoc}
     */
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        if (null === $this->command) {
            $this->command = $this->getApplication()->find($input->getArgument('command_name'));
        }
        $helper = new DescriptorHelper();
        $helper->describe($output, $this->command, ['format' => $input->getOption('format'), 'raw_text' => $input->getOption('raw')]);
        $this->command = null;
        return 0;
    }
    public function complete(CompletionInput $input, CompletionSuggestions $suggestions) : void
    {
        if ($input->mustSuggestArgumentValuesFor('command_name')) {
            $descriptor = new ApplicationDescription($this->getApplication());
            $suggestions->suggestValues(\array_keys($descriptor->getCommands()));
            return;
        }
        if ($input->mustSuggestOptionValuesFor('format')) {
            $helper = new DescriptorHelper();
            $suggestions->suggestValues($helper->getFormats());
        }
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Command;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Completion\CompletionInput;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Completion\CompletionSuggestions;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Completion\Output\BashCompletionOutput;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Completion\Output\CompletionOutputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\CommandNotFoundException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\ExceptionInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputOption;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
/**
 * Responsible for providing the values to the shell completion.
 *
 * @author Wouter de Jong <wouter@wouterj.nl>
 */
final class CompleteCommand extends Command
{
    protected static $defaultName = '|_complete';
    protected static $defaultDescription = 'Internal command to provide shell completion suggestions';
    private $completionOutputs;
    private $isDebug = \false;
    /**
     * @param array<string, class-string<CompletionOutputInterface>> $completionOutputs A list of additional completion outputs, with shell name as key and FQCN as value
     */
    public function __construct(array $completionOutputs = [])
    {
        // must be set before the parent constructor, as the property value is used in configure()
        $this->completionOutputs = $completionOutputs + ['bash' => BashCompletionOutput::class];
        parent::__construct();
    }
    protected function configure() : void
    {
        $this->addOption('shell', 's', InputOption::VALUE_REQUIRED, 'The shell type ("' . \implode('", "', \array_keys($this->completionOutputs)) . '")')->addOption('input', 'i', InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'An array of input tokens (e.g. COMP_WORDS or argv)')->addOption('current', 'c', InputOption::VALUE_REQUIRED, 'The index of the "input" array that the cursor is in (e.g. COMP_CWORD)')->addOption('symfony', 'S', InputOption::VALUE_REQUIRED, 'The version of the completion script');
    }
    protected function initialize(InputInterface $input, OutputInterface $output)
    {
        $this->isDebug = \filter_var(\getenv('SYMFONY_COMPLETION_DEBUG'), \FILTER_VALIDATE_BOOLEAN);
    }
    protected function execute(InputInterface $input, OutputInterface $output) : int
    {
        try {
            // uncomment when a bugfix or BC break has been introduced in the shell completion scripts
            // $version = $input->getOption('symfony');
            // if ($version && version_compare($version, 'x.y', '>=')) {
            //    $message = sprintf('Completion script version is not supported ("%s" given, ">=x.y" required).', $version);
            //    $this->log($message);
            //    $output->writeln($message.' Install the Symfony completion script again by using the "completion" command.');
            //    return 126;
            // }
            $shell = $input->getOption('shell');
            if (!$shell) {
                throw new \RuntimeException('The "--shell" option must be set.');
            }
            if (!($completionOutput = $this->completionOutputs[$shell] ?? \false)) {
                throw new \RuntimeException(\sprintf('Shell completion is not supported for your shell: "%s" (supported: "%s").', $shell, \implode('", "', \array_keys($this->completionOutputs))));
            }
            $completionInput = $this->createCompletionInput($input);
            $suggestions = new CompletionSuggestions();
            $this->log(['', '<comment>' . \date('Y-m-d H:i:s') . '</>', '<info>Input:</> <comment>("|" indicates the cursor position)</>', '  ' . (string) $completionInput, '<info>Command:</>', '  ' . (string) \implode(' ', $_SERVER['argv']), '<info>Messages:</>']);
            $command = $this->findCommand($completionInput, $output);
            if (null === $command) {
                $this->log('  No command found, completing using the Application class.');
                $this->getApplication()->complete($completionInput, $suggestions);
            } elseif ($completionInput->mustSuggestArgumentValuesFor('command') && $command->getName() !== $completionInput->getCompletionValue() && !\in_array($completionInput->getCompletionValue(), $command->getAliases(), \true)) {
                $this->log('  No command found, completing using the Application class.');
                // expand shortcut names ("cache:cl<TAB>") into their full name ("cache:clear")
                $suggestions->suggestValues(\array_filter(\array_merge([$command->getName()], $command->getAliases())));
            } else {
                $command->mergeApplicationDefinition();
                $completionInput->bind($command->getDefinition());
                if (CompletionInput::TYPE_OPTION_NAME === $completionInput->getCompletionType()) {
                    $this->log('  Completing option names for the <comment>' . \get_class($command instanceof LazyCommand ? $command->getCommand() : $command) . '</> command.');
                    $suggestions->suggestOptions($command->getDefinition()->getOptions());
                } else {
                    $this->log(['  Completing using the <comment>' . \get_class($command instanceof LazyCommand ? $command->getCommand() : $command) . '</> class.', '  Completing <comment>' . $completionInput->getCompletionType() . '</> for <comment>' . $completionInput->getCompletionName() . '</>']);
                    if (null !== ($compval = $completionInput->getCompletionValue())) {
                        $this->log('  Current value: <comment>' . $compval . '</>');
                    }
                    $command->complete($completionInput, $suggestions);
                }
            }
            /** @var CompletionOutputInterface $completionOutput */
            $completionOutput = new $completionOutput();
            $this->log('<info>Suggestions:</>');
            if ($options = $suggestions->getOptionSuggestions()) {
                $this->log('  --' . \implode(' --', \array_map(function ($o) {
                    return $o->getName();
                }, $options)));
            } elseif ($values = $suggestions->getValueSuggestions()) {
                $this->log('  ' . \implode(' ', $values));
            } else {
                $this->log('  <comment>No suggestions were provided</>');
            }
            $completionOutput->write($suggestions, $output);
        } catch (\Throwable $e) {
            $this->log(['<error>Error!</error>', (string) $e]);
            if ($output->isDebug()) {
                throw $e;
            }
            return self::FAILURE;
        }
        return self::SUCCESS;
    }
    private function createCompletionInput(InputInterface $input) : CompletionInput
    {
        $currentIndex = $input->getOption('current');
        if (!$currentIndex || !\ctype_digit($currentIndex)) {
            throw new \RuntimeException('The "--current" option must be set and it must be an integer.');
        }
        $completionInput = CompletionInput::fromTokens($input->getOption('input'), (int) $currentIndex);
        try {
            $completionInput->bind($this->getApplication()->getDefinition());
        } catch (ExceptionInterface $e) {
        }
        return $completionInput;
    }
    private function findCommand(CompletionInput $completionInput, OutputInterface $output) : ?Command
    {
        try {
            $inputName = $completionInput->getFirstArgument();
            if (null === $inputName) {
                return null;
            }
            return $this->getApplication()->find($inputName);
        } catch (CommandNotFoundException $e) {
        }
        return null;
    }
    private function log($messages) : void
    {
        if (!$this->isDebug) {
            return;
        }
        $commandName = \basename($_SERVER['argv'][0]);
        \file_put_contents(\sys_get_temp_dir() . '/sf_' . $commandName . '.log', \implode(\PHP_EOL, (array) $messages) . \PHP_EOL, \FILE_APPEND);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Command;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Completion\CompletionInput;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Completion\CompletionSuggestions;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Descriptor\ApplicationDescription;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper\DescriptorHelper;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputArgument;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputOption;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
/**
 * ListCommand displays the list of all available commands for the application.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class ListCommand extends Command
{
    /**
     * {@inheritdoc}
     */
    protected function configure()
    {
        $this->setName('list')->setDefinition([new InputArgument('namespace', InputArgument::OPTIONAL, 'The namespace name'), new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command list'), new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), new InputOption('short', null, InputOption::VALUE_NONE, 'To skip describing commands\' arguments')])->setDescription('List commands')->setHelp(<<<'EOF'
The <info>%command.name%</info> command lists all commands:

  <info>%command.full_name%</info>

You can also display the commands for a specific namespace:

  <info>%command.full_name% test</info>

You can also output the information in other formats by using the <comment>--format</comment> option:

  <info>%command.full_name% --format=xml</info>

It's also possible to get raw list of commands (useful for embedding command runner):

  <info>%command.full_name% --raw</info>
EOF
);
    }
    /**
     * {@inheritdoc}
     */
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $helper = new DescriptorHelper();
        $helper->describe($output, $this->getApplication(), ['format' => $input->getOption('format'), 'raw_text' => $input->getOption('raw'), 'namespace' => $input->getArgument('namespace'), 'short' => $input->getOption('short')]);
        return 0;
    }
    public function complete(CompletionInput $input, CompletionSuggestions $suggestions) : void
    {
        if ($input->mustSuggestArgumentValuesFor('namespace')) {
            $descriptor = new ApplicationDescription($this->getApplication());
            $suggestions->suggestValues(\array_keys($descriptor->getNamespaces()));
            return;
        }
        if ($input->mustSuggestOptionValuesFor('format')) {
            $helper = new DescriptorHelper();
            $suggestions->suggestValues($helper->getFormats());
        }
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Command;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Application;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Attribute\AsCommand;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Completion\CompletionInput;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Completion\CompletionSuggestions;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\ExceptionInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\InvalidArgumentException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\LogicException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper\HelperSet;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputArgument;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputDefinition;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputOption;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
/**
 * Base class for all commands.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class Command
{
    // see https://tldp.org/LDP/abs/html/exitcodes.html
    public const SUCCESS = 0;
    public const FAILURE = 1;
    public const INVALID = 2;
    /**
     * @var string|null The default command name
     */
    protected static $defaultName;
    /**
     * @var string|null The default command description
     */
    protected static $defaultDescription;
    private $application;
    private $name;
    private $processTitle;
    private $aliases = [];
    private $definition;
    private $hidden = \false;
    private $help = '';
    private $description = '';
    private $fullDefinition;
    private $ignoreValidationErrors = \false;
    private $code;
    private $synopsis = [];
    private $usages = [];
    private $helperSet;
    /**
     * @return string|null
     */
    public static function getDefaultName()
    {
        $class = static::class;
        if (\PHP_VERSION_ID >= 80000 && ($attribute = (new \ReflectionClass($class))->getAttributes(AsCommand::class))) {
            return $attribute[0]->newInstance()->name;
        }
        $r = new \ReflectionProperty($class, 'defaultName');
        return $class === $r->class ? static::$defaultName : null;
    }
    public static function getDefaultDescription() : ?string
    {
        $class = static::class;
        if (\PHP_VERSION_ID >= 80000 && ($attribute = (new \ReflectionClass($class))->getAttributes(AsCommand::class))) {
            return $attribute[0]->newInstance()->description;
        }
        $r = new \ReflectionProperty($class, 'defaultDescription');
        return $class === $r->class ? static::$defaultDescription : null;
    }
    /**
     * @param string|null $name The name of the command; passing null means it must be set in configure()
     *
     * @throws LogicException When the command name is empty
     */
    public function __construct(string $name = null)
    {
        $this->definition = new InputDefinition();
        if (null === $name && null !== ($name = static::getDefaultName())) {
            $aliases = \explode('|', $name);
            if ('' === ($name = \array_shift($aliases))) {
                $this->setHidden(\true);
                $name = \array_shift($aliases);
            }
            $this->setAliases($aliases);
        }
        if (null !== $name) {
            $this->setName($name);
        }
        if ('' === $this->description) {
            $this->setDescription(static::getDefaultDescription() ?? '');
        }
        $this->configure();
    }
    /**
     * Ignores validation errors.
     *
     * This is mainly useful for the help command.
     */
    public function ignoreValidationErrors()
    {
        $this->ignoreValidationErrors = \true;
    }
    public function setApplication(Application $application = null)
    {
        $this->application = $application;
        if ($application) {
            $this->setHelperSet($application->getHelperSet());
        } else {
            $this->helperSet = null;
        }
        $this->fullDefinition = null;
    }
    public function setHelperSet(HelperSet $helperSet)
    {
        $this->helperSet = $helperSet;
    }
    /**
     * Gets the helper set.
     *
     * @return HelperSet|null
     */
    public function getHelperSet()
    {
        return $this->helperSet;
    }
    /**
     * Gets the application instance for this command.
     *
     * @return Application|null
     */
    public function getApplication()
    {
        return $this->application;
    }
    /**
     * Checks whether the command is enabled or not in the current environment.
     *
     * Override this to check for x or y and return false if the command cannot
     * run properly under the current conditions.
     *
     * @return bool
     */
    public function isEnabled()
    {
        return \true;
    }
    /**
     * Configures the current command.
     */
    protected function configure()
    {
    }
    /**
     * Executes the current command.
     *
     * This method is not abstract because you can use this class
     * as a concrete class. In this case, instead of defining the
     * execute() method, you set the code to execute by passing
     * a Closure to the setCode() method.
     *
     * @return int 0 if everything went fine, or an exit code
     *
     * @throws LogicException When this abstract method is not implemented
     *
     * @see setCode()
     */
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        throw new LogicException('You must override the execute() method in the concrete command class.');
    }
    /**
     * Interacts with the user.
     *
     * This method is executed before the InputDefinition is validated.
     * This means that this is the only place where the command can
     * interactively ask for values of missing required arguments.
     */
    protected function interact(InputInterface $input, OutputInterface $output)
    {
    }
    /**
     * Initializes the command after the input has been bound and before the input
     * is validated.
     *
     * This is mainly useful when a lot of commands extends one main command
     * where some things need to be initialized based on the input arguments and options.
     *
     * @see InputInterface::bind()
     * @see InputInterface::validate()
     */
    protected function initialize(InputInterface $input, OutputInterface $output)
    {
    }
    /**
     * Runs the command.
     *
     * The code to execute is either defined directly with the
     * setCode() method or by overriding the execute() method
     * in a sub-class.
     *
     * @return int The command exit code
     *
     * @throws ExceptionInterface When input binding fails. Bypass this by calling {@link ignoreValidationErrors()}.
     *
     * @see setCode()
     * @see execute()
     */
    public function run(InputInterface $input, OutputInterface $output)
    {
        // add the application arguments and options
        $this->mergeApplicationDefinition();
        // bind the input against the command specific arguments/options
        try {
            $input->bind($this->getDefinition());
        } catch (ExceptionInterface $e) {
            if (!$this->ignoreValidationErrors) {
                throw $e;
            }
        }
        $this->initialize($input, $output);
        if (null !== $this->processTitle) {
            if (\function_exists('cli_set_process_title')) {
                if (!@\cli_set_process_title($this->processTitle)) {
                    if ('Darwin' === \PHP_OS) {
                        $output->writeln('<comment>Running "cli_set_process_title" as an unprivileged user is not supported on MacOS.</comment>', OutputInterface::VERBOSITY_VERY_VERBOSE);
                    } else {
                        \cli_set_process_title($this->processTitle);
                    }
                }
            } elseif (\function_exists('_PHPStan_dcc7b7cff\\setproctitle')) {
                setproctitle($this->processTitle);
            } elseif (OutputInterface::VERBOSITY_VERY_VERBOSE === $output->getVerbosity()) {
                $output->writeln('<comment>Install the proctitle PECL to be able to change the process title.</comment>');
            }
        }
        if ($input->isInteractive()) {
            $this->interact($input, $output);
        }
        // The command name argument is often omitted when a command is executed directly with its run() method.
        // It would fail the validation if we didn't make sure the command argument is present,
        // since it's required by the application.
        if ($input->hasArgument('command') && null === $input->getArgument('command')) {
            $input->setArgument('command', $this->getName());
        }
        $input->validate();
        if ($this->code) {
            $statusCode = ($this->code)($input, $output);
        } else {
            $statusCode = $this->execute($input, $output);
            if (!\is_int($statusCode)) {
                throw new \TypeError(\sprintf('Return value of "%s::execute()" must be of the type int, "%s" returned.', static::class, \get_debug_type($statusCode)));
            }
        }
        return \is_numeric($statusCode) ? (int) $statusCode : 0;
    }
    /**
     * Adds suggestions to $suggestions for the current completion input (e.g. option or argument).
     */
    public function complete(CompletionInput $input, CompletionSuggestions $suggestions) : void
    {
    }
    /**
     * Sets the code to execute when running this command.
     *
     * If this method is used, it overrides the code defined
     * in the execute() method.
     *
     * @param callable $code A callable(InputInterface $input, OutputInterface $output)
     *
     * @return $this
     *
     * @throws InvalidArgumentException
     *
     * @see execute()
     */
    public function setCode(callable $code)
    {
        if ($code instanceof \Closure) {
            $r = new \ReflectionFunction($code);
            if (null === $r->getClosureThis()) {
                \set_error_handler(static function () {
                });
                try {
                    if ($c = \Closure::bind($code, $this)) {
                        $code = $c;
                    }
                } finally {
                    \restore_error_handler();
                }
            }
        }
        $this->code = $code;
        return $this;
    }
    /**
     * Merges the application definition with the command definition.
     *
     * This method is not part of public API and should not be used directly.
     *
     * @param bool $mergeArgs Whether to merge or not the Application definition arguments to Command definition arguments
     *
     * @internal
     */
    public function mergeApplicationDefinition(bool $mergeArgs = \true)
    {
        if (null === $this->application) {
            return;
        }
        $this->fullDefinition = new InputDefinition();
        $this->fullDefinition->setOptions($this->definition->getOptions());
        $this->fullDefinition->addOptions($this->application->getDefinition()->getOptions());
        if ($mergeArgs) {
            $this->fullDefinition->setArguments($this->application->getDefinition()->getArguments());
            $this->fullDefinition->addArguments($this->definition->getArguments());
        } else {
            $this->fullDefinition->setArguments($this->definition->getArguments());
        }
    }
    /**
     * Sets an array of argument and option instances.
     *
     * @param array|InputDefinition $definition An array of argument and option instances or a definition instance
     *
     * @return $this
     */
    public function setDefinition($definition)
    {
        if ($definition instanceof InputDefinition) {
            $this->definition = $definition;
        } else {
            $this->definition->setDefinition($definition);
        }
        $this->fullDefinition = null;
        return $this;
    }
    /**
     * Gets the InputDefinition attached to this Command.
     *
     * @return InputDefinition
     */
    public function getDefinition()
    {
        return $this->fullDefinition ?? $this->getNativeDefinition();
    }
    /**
     * Gets the InputDefinition to be used to create representations of this Command.
     *
     * Can be overridden to provide the original command representation when it would otherwise
     * be changed by merging with the application InputDefinition.
     *
     * This method is not part of public API and should not be used directly.
     *
     * @return InputDefinition
     */
    public function getNativeDefinition()
    {
        if (null === $this->definition) {
            throw new LogicException(\sprintf('Command class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', static::class));
        }
        return $this->definition;
    }
    /**
     * Adds an argument.
     *
     * @param int|null $mode    The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL
     * @param mixed    $default The default value (for InputArgument::OPTIONAL mode only)
     *
     * @return $this
     *
     * @throws InvalidArgumentException When argument mode is not valid
     */
    public function addArgument(string $name, int $mode = null, string $description = '', $default = null)
    {
        $this->definition->addArgument(new InputArgument($name, $mode, $description, $default));
        if (null !== $this->fullDefinition) {
            $this->fullDefinition->addArgument(new InputArgument($name, $mode, $description, $default));
        }
        return $this;
    }
    /**
     * Adds an option.
     *
     * @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
     * @param int|null          $mode     The option mode: One of the InputOption::VALUE_* constants
     * @param mixed             $default  The default value (must be null for InputOption::VALUE_NONE)
     *
     * @return $this
     *
     * @throws InvalidArgumentException If option mode is invalid or incompatible
     */
    public function addOption(string $name, $shortcut = null, int $mode = null, string $description = '', $default = null)
    {
        $this->definition->addOption(new InputOption($name, $shortcut, $mode, $description, $default));
        if (null !== $this->fullDefinition) {
            $this->fullDefinition->addOption(new InputOption($name, $shortcut, $mode, $description, $default));
        }
        return $this;
    }
    /**
     * Sets the name of the command.
     *
     * This method can set both the namespace and the name if
     * you separate them by a colon (:)
     *
     *     $command->setName('foo:bar');
     *
     * @return $this
     *
     * @throws InvalidArgumentException When the name is invalid
     */
    public function setName(string $name)
    {
        $this->validateName($name);
        $this->name = $name;
        return $this;
    }
    /**
     * Sets the process title of the command.
     *
     * This feature should be used only when creating a long process command,
     * like a daemon.
     *
     * @return $this
     */
    public function setProcessTitle(string $title)
    {
        $this->processTitle = $title;
        return $this;
    }
    /**
     * Returns the command name.
     *
     * @return string|null
     */
    public function getName()
    {
        return $this->name;
    }
    /**
     * @param bool $hidden Whether or not the command should be hidden from the list of commands
     *                     The default value will be true in Symfony 6.0
     *
     * @return $this
     *
     * @final since Symfony 5.1
     */
    public function setHidden(bool $hidden)
    {
        $this->hidden = $hidden;
        return $this;
    }
    /**
     * @return bool whether the command should be publicly shown or not
     */
    public function isHidden()
    {
        return $this->hidden;
    }
    /**
     * Sets the description for the command.
     *
     * @return $this
     */
    public function setDescription(string $description)
    {
        $this->description = $description;
        return $this;
    }
    /**
     * Returns the description for the command.
     *
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }
    /**
     * Sets the help for the command.
     *
     * @return $this
     */
    public function setHelp(string $help)
    {
        $this->help = $help;
        return $this;
    }
    /**
     * Returns the help for the command.
     *
     * @return string
     */
    public function getHelp()
    {
        return $this->help;
    }
    /**
     * Returns the processed help for the command replacing the %command.name% and
     * %command.full_name% patterns with the real values dynamically.
     *
     * @return string
     */
    public function getProcessedHelp()
    {
        $name = $this->name;
        $isSingleCommand = $this->application && $this->application->isSingleCommand();
        $placeholders = ['%command.name%', '%command.full_name%'];
        $replacements = [$name, $isSingleCommand ? $_SERVER['PHP_SELF'] : $_SERVER['PHP_SELF'] . ' ' . $name];
        return \str_replace($placeholders, $replacements, $this->getHelp() ?: $this->getDescription());
    }
    /**
     * Sets the aliases for the command.
     *
     * @param string[] $aliases An array of aliases for the command
     *
     * @return $this
     *
     * @throws InvalidArgumentException When an alias is invalid
     */
    public function setAliases(iterable $aliases)
    {
        $list = [];
        foreach ($aliases as $alias) {
            $this->validateName($alias);
            $list[] = $alias;
        }
        $this->aliases = \is_array($aliases) ? $aliases : $list;
        return $this;
    }
    /**
     * Returns the aliases for the command.
     *
     * @return array
     */
    public function getAliases()
    {
        return $this->aliases;
    }
    /**
     * Returns the synopsis for the command.
     *
     * @param bool $short Whether to show the short version of the synopsis (with options folded) or not
     *
     * @return string
     */
    public function getSynopsis(bool $short = \false)
    {
        $key = $short ? 'short' : 'long';
        if (!isset($this->synopsis[$key])) {
            $this->synopsis[$key] = \trim(\sprintf('%s %s', $this->name, $this->definition->getSynopsis($short)));
        }
        return $this->synopsis[$key];
    }
    /**
     * Add a command usage example, it'll be prefixed with the command name.
     *
     * @return $this
     */
    public function addUsage(string $usage)
    {
        if (!\str_starts_with($usage, $this->name)) {
            $usage = \sprintf('%s %s', $this->name, $usage);
        }
        $this->usages[] = $usage;
        return $this;
    }
    /**
     * Returns alternative usages of the command.
     *
     * @return array
     */
    public function getUsages()
    {
        return $this->usages;
    }
    /**
     * Gets a helper instance by name.
     *
     * @return mixed
     *
     * @throws LogicException           if no HelperSet is defined
     * @throws InvalidArgumentException if the helper is not defined
     */
    public function getHelper(string $name)
    {
        if (null === $this->helperSet) {
            throw new LogicException(\sprintf('Cannot retrieve helper "%s" because there is no HelperSet defined. Did you forget to add your command to the application or to set the application on the command using the setApplication() method? You can also set the HelperSet directly using the setHelperSet() method.', $name));
        }
        return $this->helperSet->get($name);
    }
    /**
     * Validates a command name.
     *
     * It must be non-empty and parts can optionally be separated by ":".
     *
     * @throws InvalidArgumentException When the name is invalid
     */
    private function validateName(string $name)
    {
        if (!\preg_match('/^[^\\:]++(\\:[^\\:]++)*$/', $name)) {
            throw new InvalidArgumentException(\sprintf('Command name "%s" is invalid.', $name));
        }
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Command;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Completion\CompletionInput;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Completion\CompletionSuggestions;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputArgument;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputOption;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\ConsoleOutputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Process\Process;
/**
 * Dumps the completion script for the current shell.
 *
 * @author Wouter de Jong <wouter@wouterj.nl>
 */
final class DumpCompletionCommand extends Command
{
    protected static $defaultName = 'completion';
    protected static $defaultDescription = 'Dump the shell completion script';
    public function complete(CompletionInput $input, CompletionSuggestions $suggestions) : void
    {
        if ($input->mustSuggestArgumentValuesFor('shell')) {
            $suggestions->suggestValues($this->getSupportedShells());
        }
    }
    protected function configure()
    {
        $fullCommand = $_SERVER['PHP_SELF'];
        $commandName = \basename($fullCommand);
        $fullCommand = @\realpath($fullCommand) ?: $fullCommand;
        $this->setHelp(<<<EOH
The <info>%command.name%</> command dumps the shell completion script required
to use shell autocompletion (currently only bash completion is supported).

<comment>Static installation
-------------------</>

Dump the script to a global completion file and restart your shell:

    <info>%command.full_name% bash | sudo tee /etc/bash_completion.d/{$commandName}</>

Or dump the script to a local file and source it:

    <info>%command.full_name% bash > completion.sh</>

    <comment># source the file whenever you use the project</>
    <info>source completion.sh</>

    <comment># or add this line at the end of your "~/.bashrc" file:</>
    <info>source /path/to/completion.sh</>

<comment>Dynamic installation
--------------------</>

Add this to the end of your shell configuration file (e.g. <info>"~/.bashrc"</>):

    <info>eval "\$({$fullCommand} completion bash)"</>
EOH
)->addArgument('shell', InputArgument::OPTIONAL, 'The shell type (e.g. "bash"), the value of the "$SHELL" env var will be used if this is not given')->addOption('debug', null, InputOption::VALUE_NONE, 'Tail the completion debug log');
    }
    protected function execute(InputInterface $input, OutputInterface $output) : int
    {
        $commandName = \basename($_SERVER['argv'][0]);
        if ($input->getOption('debug')) {
            $this->tailDebugLog($commandName, $output);
            return self::SUCCESS;
        }
        $shell = $input->getArgument('shell') ?? self::guessShell();
        $completionFile = __DIR__ . '/../Resources/completion.' . $shell;
        if (!\file_exists($completionFile)) {
            $supportedShells = $this->getSupportedShells();
            if ($output instanceof ConsoleOutputInterface) {
                $output = $output->getErrorOutput();
            }
            if ($shell) {
                $output->writeln(\sprintf('<error>Detected shell "%s", which is not supported by Symfony shell completion (supported shells: "%s").</>', $shell, \implode('", "', $supportedShells)));
            } else {
                $output->writeln(\sprintf('<error>Shell not detected, Symfony shell completion only supports "%s").</>', \implode('", "', $supportedShells)));
            }
            return self::INVALID;
        }
        $output->write(\str_replace(['{{ COMMAND_NAME }}', '{{ VERSION }}'], [$commandName, $this->getApplication()->getVersion()], \file_get_contents($completionFile)));
        return self::SUCCESS;
    }
    private static function guessShell() : string
    {
        return \basename($_SERVER['SHELL'] ?? '');
    }
    private function tailDebugLog(string $commandName, OutputInterface $output) : void
    {
        $debugFile = \sys_get_temp_dir() . '/sf_' . $commandName . '.log';
        if (!\file_exists($debugFile)) {
            \touch($debugFile);
        }
        $process = new Process(['tail', '-f', $debugFile], null, null, null, 0);
        $process->run(function (string $type, string $line) use($output) : void {
            $output->write($line);
        });
    }
    /**
     * @return string[]
     */
    private function getSupportedShells() : array
    {
        $shells = [];
        foreach (new \DirectoryIterator(__DIR__ . '/../Resources/') as $file) {
            if (\str_starts_with($file->getBasename(), 'completion.') && $file->isFile()) {
                $shells[] = $file->getExtension();
            }
        }
        return $shells;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\InvalidArgumentException;
/**
 * @author Fabien Potencier <fabien@symfony.com>
 */
final class Color
{
    private const COLORS = ['black' => 0, 'red' => 1, 'green' => 2, 'yellow' => 3, 'blue' => 4, 'magenta' => 5, 'cyan' => 6, 'white' => 7, 'default' => 9];
    private const BRIGHT_COLORS = ['gray' => 0, 'bright-red' => 1, 'bright-green' => 2, 'bright-yellow' => 3, 'bright-blue' => 4, 'bright-magenta' => 5, 'bright-cyan' => 6, 'bright-white' => 7];
    private const AVAILABLE_OPTIONS = ['bold' => ['set' => 1, 'unset' => 22], 'underscore' => ['set' => 4, 'unset' => 24], 'blink' => ['set' => 5, 'unset' => 25], 'reverse' => ['set' => 7, 'unset' => 27], 'conceal' => ['set' => 8, 'unset' => 28]];
    private $foreground;
    private $background;
    private $options = [];
    public function __construct(string $foreground = '', string $background = '', array $options = [])
    {
        $this->foreground = $this->parseColor($foreground);
        $this->background = $this->parseColor($background, \true);
        foreach ($options as $option) {
            if (!isset(self::AVAILABLE_OPTIONS[$option])) {
                throw new InvalidArgumentException(\sprintf('Invalid option specified: "%s". Expected one of (%s).', $option, \implode(', ', \array_keys(self::AVAILABLE_OPTIONS))));
            }
            $this->options[$option] = self::AVAILABLE_OPTIONS[$option];
        }
    }
    public function apply(string $text) : string
    {
        return $this->set() . $text . $this->unset();
    }
    public function set() : string
    {
        $setCodes = [];
        if ('' !== $this->foreground) {
            $setCodes[] = $this->foreground;
        }
        if ('' !== $this->background) {
            $setCodes[] = $this->background;
        }
        foreach ($this->options as $option) {
            $setCodes[] = $option['set'];
        }
        if (0 === \count($setCodes)) {
            return '';
        }
        return \sprintf("\x1b[%sm", \implode(';', $setCodes));
    }
    public function unset() : string
    {
        $unsetCodes = [];
        if ('' !== $this->foreground) {
            $unsetCodes[] = 39;
        }
        if ('' !== $this->background) {
            $unsetCodes[] = 49;
        }
        foreach ($this->options as $option) {
            $unsetCodes[] = $option['unset'];
        }
        if (0 === \count($unsetCodes)) {
            return '';
        }
        return \sprintf("\x1b[%sm", \implode(';', $unsetCodes));
    }
    private function parseColor(string $color, bool $background = \false) : string
    {
        if ('' === $color) {
            return '';
        }
        if ('#' === $color[0]) {
            $color = \substr($color, 1);
            if (3 === \strlen($color)) {
                $color = $color[0] . $color[0] . $color[1] . $color[1] . $color[2] . $color[2];
            }
            if (6 !== \strlen($color)) {
                throw new InvalidArgumentException(\sprintf('Invalid "%s" color.', $color));
            }
            return ($background ? '4' : '3') . $this->convertHexColorToAnsi(\hexdec($color));
        }
        if (isset(self::COLORS[$color])) {
            return ($background ? '4' : '3') . self::COLORS[$color];
        }
        if (isset(self::BRIGHT_COLORS[$color])) {
            return ($background ? '10' : '9') . self::BRIGHT_COLORS[$color];
        }
        throw new InvalidArgumentException(\sprintf('Invalid "%s" color; expected one of (%s).', $color, \implode(', ', \array_merge(\array_keys(self::COLORS), \array_keys(self::BRIGHT_COLORS)))));
    }
    private function convertHexColorToAnsi(int $color) : string
    {
        $r = $color >> 16 & 255;
        $g = $color >> 8 & 255;
        $b = $color & 255;
        // see https://github.com/termstandard/colors/ for more information about true color support
        if ('truecolor' !== \getenv('COLORTERM')) {
            return (string) $this->degradeHexColorToAnsi($r, $g, $b);
        }
        return \sprintf('8;2;%d;%d;%d', $r, $g, $b);
    }
    private function degradeHexColorToAnsi(int $r, int $g, int $b) : int
    {
        if (0 === \round($this->getSaturation($r, $g, $b) / 50)) {
            return 0;
        }
        return \round($b / 255) << 2 | \round($g / 255) << 1 | \round($r / 255);
    }
    private function getSaturation(int $r, int $g, int $b) : int
    {
        $r = $r / 255;
        $g = $g / 255;
        $b = $b / 255;
        $v = \max($r, $g, $b);
        if (0 === ($diff = $v - \min($r, $g, $b))) {
            return 0;
        }
        return (int) $diff * 100 / $v;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
/**
 * @author Pierre du Plessis <pdples@gmail.com>
 */
final class Cursor
{
    private $output;
    private $input;
    /**
     * @param resource|null $input
     */
    public function __construct(OutputInterface $output, $input = null)
    {
        $this->output = $output;
        $this->input = $input ?? (\defined('STDIN') ? \STDIN : \fopen('php://input', 'r+'));
    }
    /**
     * @return $this
     */
    public function moveUp(int $lines = 1) : self
    {
        $this->output->write(\sprintf("\x1b[%dA", $lines));
        return $this;
    }
    /**
     * @return $this
     */
    public function moveDown(int $lines = 1) : self
    {
        $this->output->write(\sprintf("\x1b[%dB", $lines));
        return $this;
    }
    /**
     * @return $this
     */
    public function moveRight(int $columns = 1) : self
    {
        $this->output->write(\sprintf("\x1b[%dC", $columns));
        return $this;
    }
    /**
     * @return $this
     */
    public function moveLeft(int $columns = 1) : self
    {
        $this->output->write(\sprintf("\x1b[%dD", $columns));
        return $this;
    }
    /**
     * @return $this
     */
    public function moveToColumn(int $column) : self
    {
        $this->output->write(\sprintf("\x1b[%dG", $column));
        return $this;
    }
    /**
     * @return $this
     */
    public function moveToPosition(int $column, int $row) : self
    {
        $this->output->write(\sprintf("\x1b[%d;%dH", $row + 1, $column));
        return $this;
    }
    /**
     * @return $this
     */
    public function savePosition() : self
    {
        $this->output->write("\x1b7");
        return $this;
    }
    /**
     * @return $this
     */
    public function restorePosition() : self
    {
        $this->output->write("\x1b8");
        return $this;
    }
    /**
     * @return $this
     */
    public function hide() : self
    {
        $this->output->write("\x1b[?25l");
        return $this;
    }
    /**
     * @return $this
     */
    public function show() : self
    {
        $this->output->write("\x1b[?25h\x1b[?0c");
        return $this;
    }
    /**
     * Clears all the output from the current line.
     *
     * @return $this
     */
    public function clearLine() : self
    {
        $this->output->write("\x1b[2K");
        return $this;
    }
    /**
     * Clears all the output from the current line after the current position.
     */
    public function clearLineAfter() : self
    {
        $this->output->write("\x1b[K");
        return $this;
    }
    /**
     * Clears all the output from the cursors' current position to the end of the screen.
     *
     * @return $this
     */
    public function clearOutput() : self
    {
        $this->output->write("\x1b[0J");
        return $this;
    }
    /**
     * Clears the entire screen.
     *
     * @return $this
     */
    public function clearScreen() : self
    {
        $this->output->write("\x1b[2J");
        return $this;
    }
    /**
     * Returns the current cursor position as x,y coordinates.
     */
    public function getCurrentPosition() : array
    {
        static $isTtySupported;
        if (null === $isTtySupported && \function_exists('proc_open')) {
            $isTtySupported = (bool) @\proc_open('echo 1 >/dev/null', [['file', '/dev/tty', 'r'], ['file', '/dev/tty', 'w'], ['file', '/dev/tty', 'w']], $pipes);
        }
        if (!$isTtySupported) {
            return [1, 1];
        }
        $sttyMode = \shell_exec('stty -g');
        \shell_exec('stty -icanon -echo');
        @\fwrite($this->input, "\x1b[6n");
        $code = \trim(\fread($this->input, 1024));
        \shell_exec(\sprintf('stty %s', $sttyMode));
        \sscanf($code, "\x1b[%d;%dR", $row, $col);
        return [$col, $row];
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console;

class Terminal
{
    private static $width;
    private static $height;
    private static $stty;
    /**
     * Gets the terminal width.
     *
     * @return int
     */
    public function getWidth()
    {
        $width = \getenv('COLUMNS');
        if (\false !== $width) {
            return (int) \trim($width);
        }
        if (null === self::$width) {
            self::initDimensions();
        }
        return self::$width ?: 80;
    }
    /**
     * Gets the terminal height.
     *
     * @return int
     */
    public function getHeight()
    {
        $height = \getenv('LINES');
        if (\false !== $height) {
            return (int) \trim($height);
        }
        if (null === self::$height) {
            self::initDimensions();
        }
        return self::$height ?: 50;
    }
    /**
     * @internal
     */
    public static function hasSttyAvailable() : bool
    {
        if (null !== self::$stty) {
            return self::$stty;
        }
        // skip check if exec function is disabled
        if (!\function_exists('exec')) {
            return \false;
        }
        \exec('stty 2>&1', $output, $exitcode);
        return self::$stty = 0 === $exitcode;
    }
    private static function initDimensions()
    {
        if ('\\' === \DIRECTORY_SEPARATOR) {
            $ansicon = \getenv('ANSICON');
            if (\false !== $ansicon && \preg_match('/^(\\d+)x(\\d+)(?: \\((\\d+)x(\\d+)\\))?$/', \trim($ansicon), $matches)) {
                // extract [w, H] from "wxh (WxH)"
                // or [w, h] from "wxh"
                self::$width = (int) $matches[1];
                self::$height = isset($matches[4]) ? (int) $matches[4] : (int) $matches[2];
            } elseif (!self::hasVt100Support() && self::hasSttyAvailable()) {
                // only use stty on Windows if the terminal does not support vt100 (e.g. Windows 7 + git-bash)
                // testing for stty in a Windows 10 vt100-enabled console will implicitly disable vt100 support on STDOUT
                self::initDimensionsUsingStty();
            } elseif (null !== ($dimensions = self::getConsoleMode())) {
                // extract [w, h] from "wxh"
                self::$width = (int) $dimensions[0];
                self::$height = (int) $dimensions[1];
            }
        } else {
            self::initDimensionsUsingStty();
        }
    }
    /**
     * Returns whether STDOUT has vt100 support (some Windows 10+ configurations).
     */
    private static function hasVt100Support() : bool
    {
        return \function_exists('sapi_windows_vt100_support') && \sapi_windows_vt100_support(\fopen('php://stdout', 'w'));
    }
    /**
     * Initializes dimensions using the output of an stty columns line.
     */
    private static function initDimensionsUsingStty()
    {
        if ($sttyString = self::getSttyColumns()) {
            if (\preg_match('/rows.(\\d+);.columns.(\\d+);/i', $sttyString, $matches)) {
                // extract [w, h] from "rows h; columns w;"
                self::$width = (int) $matches[2];
                self::$height = (int) $matches[1];
            } elseif (\preg_match('/;.(\\d+).rows;.(\\d+).columns/i', $sttyString, $matches)) {
                // extract [w, h] from "; h rows; w columns"
                self::$width = (int) $matches[2];
                self::$height = (int) $matches[1];
            }
        }
    }
    /**
     * Runs and parses mode CON if it's available, suppressing any error output.
     *
     * @return int[]|null An array composed of the width and the height or null if it could not be parsed
     */
    private static function getConsoleMode() : ?array
    {
        $info = self::readFromProcess('mode CON');
        if (null === $info || !\preg_match('/--------+\\r?\\n.+?(\\d+)\\r?\\n.+?(\\d+)\\r?\\n/', $info, $matches)) {
            return null;
        }
        return [(int) $matches[2], (int) $matches[1]];
    }
    /**
     * Runs and parses stty -a if it's available, suppressing any error output.
     */
    private static function getSttyColumns() : ?string
    {
        return self::readFromProcess('stty -a | grep columns');
    }
    private static function readFromProcess(string $command) : ?string
    {
        if (!\function_exists('proc_open')) {
            return null;
        }
        $descriptorspec = [1 => ['pipe', 'w'], 2 => ['pipe', 'w']];
        $cp = \function_exists('sapi_windows_cp_set') ? \sapi_windows_cp_get() : 0;
        $process = \proc_open($command, $descriptorspec, $pipes, null, null, ['suppress_errors' => \true]);
        if (!\is_resource($process)) {
            return null;
        }
        $info = \stream_get_contents($pipes[1]);
        \fclose($pipes[1]);
        \fclose($pipes[2]);
        \proc_close($process);
        if ($cp) {
            \sapi_windows_cp_set($cp);
        }
        return $info;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Event\ConsoleCommandEvent;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Event\ConsoleErrorEvent;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Event\ConsoleSignalEvent;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Event\ConsoleTerminateEvent;
/**
 * Contains all events dispatched by an Application.
 *
 * @author Francesco Levorato <git@flevour.net>
 */
final class ConsoleEvents
{
    /**
     * The COMMAND event allows you to attach listeners before any command is
     * executed by the console. It also allows you to modify the command, input and output
     * before they are handed to the command.
     *
     * @Event("Symfony\Component\Console\Event\ConsoleCommandEvent")
     */
    public const COMMAND = 'console.command';
    /**
     * The SIGNAL event allows you to perform some actions
     * after the command execution was interrupted.
     *
     * @Event("Symfony\Component\Console\Event\ConsoleSignalEvent")
     */
    public const SIGNAL = 'console.signal';
    /**
     * The TERMINATE event allows you to attach listeners after a command is
     * executed by the console.
     *
     * @Event("Symfony\Component\Console\Event\ConsoleTerminateEvent")
     */
    public const TERMINATE = 'console.terminate';
    /**
     * The ERROR event occurs when an uncaught exception or error appears.
     *
     * This event allows you to deal with the exception/error or
     * to modify the thrown exception.
     *
     * @Event("Symfony\Component\Console\Event\ConsoleErrorEvent")
     */
    public const ERROR = 'console.error';
    /**
     * Event aliases.
     *
     * These aliases can be consumed by RegisterListenersPass.
     */
    public const ALIASES = [ConsoleCommandEvent::class => self::COMMAND, ConsoleErrorEvent::class => self::ERROR, ConsoleSignalEvent::class => self::SIGNAL, ConsoleTerminateEvent::class => self::TERMINATE];
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter;

/**
 * Formatter interface for console output.
 *
 * @author Konstantin Kudryashov <ever.zet@gmail.com>
 */
interface OutputFormatterInterface
{
    /**
     * Sets the decorated flag.
     */
    public function setDecorated(bool $decorated);
    /**
     * Whether the output will decorate messages.
     *
     * @return bool
     */
    public function isDecorated();
    /**
     * Sets a new style.
     */
    public function setStyle(string $name, OutputFormatterStyleInterface $style);
    /**
     * Checks if output formatter has style with specified name.
     *
     * @return bool
     */
    public function hasStyle(string $name);
    /**
     * Gets style options from style with specified name.
     *
     * @return OutputFormatterStyleInterface
     *
     * @throws \InvalidArgumentException When style isn't defined
     */
    public function getStyle(string $name);
    /**
     * Formats a message according to the given styles.
     *
     * @return string|null
     */
    public function format(?string $message);
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter;

/**
 * @author Tien Xuan Vo <tien.xuan.vo@gmail.com>
 */
final class NullOutputFormatter implements OutputFormatterInterface
{
    private $style;
    /**
     * {@inheritdoc}
     */
    public function format(?string $message) : ?string
    {
        return null;
    }
    /**
     * {@inheritdoc}
     */
    public function getStyle(string $name) : OutputFormatterStyleInterface
    {
        // to comply with the interface we must return a OutputFormatterStyleInterface
        return $this->style ?? ($this->style = new NullOutputFormatterStyle());
    }
    /**
     * {@inheritdoc}
     */
    public function hasStyle(string $name) : bool
    {
        return \false;
    }
    /**
     * {@inheritdoc}
     */
    public function isDecorated() : bool
    {
        return \false;
    }
    /**
     * {@inheritdoc}
     */
    public function setDecorated(bool $decorated) : void
    {
        // do nothing
    }
    /**
     * {@inheritdoc}
     */
    public function setStyle(string $name, OutputFormatterStyleInterface $style) : void
    {
        // do nothing
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter;

/**
 * Formatter style interface for defining styles.
 *
 * @author Konstantin Kudryashov <ever.zet@gmail.com>
 */
interface OutputFormatterStyleInterface
{
    /**
     * Sets style foreground color.
     */
    public function setForeground(string $color = null);
    /**
     * Sets style background color.
     */
    public function setBackground(string $color = null);
    /**
     * Sets some specific style option.
     */
    public function setOption(string $option);
    /**
     * Unsets some specific style option.
     */
    public function unsetOption(string $option);
    /**
     * Sets multiple style options at once.
     */
    public function setOptions(array $options);
    /**
     * Applies the style to a given text.
     *
     * @return string
     */
    public function apply(string $text);
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Color;
/**
 * Formatter style class for defining styles.
 *
 * @author Konstantin Kudryashov <ever.zet@gmail.com>
 */
class OutputFormatterStyle implements OutputFormatterStyleInterface
{
    private $color;
    private $foreground;
    private $background;
    private $options;
    private $href;
    private $handlesHrefGracefully;
    /**
     * Initializes output formatter style.
     *
     * @param string|null $foreground The style foreground color name
     * @param string|null $background The style background color name
     */
    public function __construct(string $foreground = null, string $background = null, array $options = [])
    {
        $this->color = new Color($this->foreground = $foreground ?: '', $this->background = $background ?: '', $this->options = $options);
    }
    /**
     * {@inheritdoc}
     */
    public function setForeground(string $color = null)
    {
        $this->color = new Color($this->foreground = $color ?: '', $this->background, $this->options);
    }
    /**
     * {@inheritdoc}
     */
    public function setBackground(string $color = null)
    {
        $this->color = new Color($this->foreground, $this->background = $color ?: '', $this->options);
    }
    public function setHref(string $url) : void
    {
        $this->href = $url;
    }
    /**
     * {@inheritdoc}
     */
    public function setOption(string $option)
    {
        $this->options[] = $option;
        $this->color = new Color($this->foreground, $this->background, $this->options);
    }
    /**
     * {@inheritdoc}
     */
    public function unsetOption(string $option)
    {
        $pos = \array_search($option, $this->options);
        if (\false !== $pos) {
            unset($this->options[$pos]);
        }
        $this->color = new Color($this->foreground, $this->background, $this->options);
    }
    /**
     * {@inheritdoc}
     */
    public function setOptions(array $options)
    {
        $this->color = new Color($this->foreground, $this->background, $this->options = $options);
    }
    /**
     * {@inheritdoc}
     */
    public function apply(string $text)
    {
        if (null === $this->handlesHrefGracefully) {
            $this->handlesHrefGracefully = 'JetBrains-JediTerm' !== \getenv('TERMINAL_EMULATOR') && (!\getenv('KONSOLE_VERSION') || (int) \getenv('KONSOLE_VERSION') > 201100) && !isset($_SERVER['IDEA_INITIAL_DIRECTORY']);
        }
        if (null !== $this->href && $this->handlesHrefGracefully) {
            $text = "\x1b]8;;{$this->href}\x1b\\{$text}\x1b]8;;\x1b\\";
        }
        return $this->color->apply($text);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\InvalidArgumentException;
use _PHPStan_dcc7b7cff\Symfony\Contracts\Service\ResetInterface;
/**
 * @author Jean-François Simon <contact@jfsimon.fr>
 */
class OutputFormatterStyleStack implements ResetInterface
{
    /**
     * @var OutputFormatterStyleInterface[]
     */
    private $styles;
    private $emptyStyle;
    public function __construct(OutputFormatterStyleInterface $emptyStyle = null)
    {
        $this->emptyStyle = $emptyStyle ?? new OutputFormatterStyle();
        $this->reset();
    }
    /**
     * Resets stack (ie. empty internal arrays).
     */
    public function reset()
    {
        $this->styles = [];
    }
    /**
     * Pushes a style in the stack.
     */
    public function push(OutputFormatterStyleInterface $style)
    {
        $this->styles[] = $style;
    }
    /**
     * Pops a style from the stack.
     *
     * @return OutputFormatterStyleInterface
     *
     * @throws InvalidArgumentException When style tags incorrectly nested
     */
    public function pop(OutputFormatterStyleInterface $style = null)
    {
        if (empty($this->styles)) {
            return $this->emptyStyle;
        }
        if (null === $style) {
            return \array_pop($this->styles);
        }
        foreach (\array_reverse($this->styles, \true) as $index => $stackedStyle) {
            if ($style->apply('') === $stackedStyle->apply('')) {
                $this->styles = \array_slice($this->styles, 0, $index);
                return $stackedStyle;
            }
        }
        throw new InvalidArgumentException('Incorrectly nested style tag found.');
    }
    /**
     * Computes current style with stacks top codes.
     *
     * @return OutputFormatterStyle
     */
    public function getCurrent()
    {
        if (empty($this->styles)) {
            return $this->emptyStyle;
        }
        return $this->styles[\count($this->styles) - 1];
    }
    /**
     * @return $this
     */
    public function setEmptyStyle(OutputFormatterStyleInterface $emptyStyle)
    {
        $this->emptyStyle = $emptyStyle;
        return $this;
    }
    /**
     * @return OutputFormatterStyleInterface
     */
    public function getEmptyStyle()
    {
        return $this->emptyStyle;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter;

/**
 * Formatter interface for console output that supports word wrapping.
 *
 * @author Roland Franssen <franssen.roland@gmail.com>
 */
interface WrappableOutputFormatterInterface extends OutputFormatterInterface
{
    /**
     * Formats a message according to the given styles, wrapping at `$width` (0 means no wrapping).
     */
    public function formatAndWrap(?string $message, int $width);
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\InvalidArgumentException;
/**
 * Formatter class for console output.
 *
 * @author Konstantin Kudryashov <ever.zet@gmail.com>
 * @author Roland Franssen <franssen.roland@gmail.com>
 */
class OutputFormatter implements WrappableOutputFormatterInterface
{
    private $decorated;
    private $styles = [];
    private $styleStack;
    public function __clone()
    {
        $this->styleStack = clone $this->styleStack;
        foreach ($this->styles as $key => $value) {
            $this->styles[$key] = clone $value;
        }
    }
    /**
     * Escapes "<" and ">" special chars in given text.
     *
     * @return string
     */
    public static function escape(string $text)
    {
        $text = \preg_replace('/([^\\\\]|^)([<>])/', '$1\\\\$2', $text);
        return self::escapeTrailingBackslash($text);
    }
    /**
     * Escapes trailing "\" in given text.
     *
     * @internal
     */
    public static function escapeTrailingBackslash(string $text) : string
    {
        if (\str_ends_with($text, '\\')) {
            $len = \strlen($text);
            $text = \rtrim($text, '\\');
            $text = \str_replace("\x00", '', $text);
            $text .= \str_repeat("\x00", $len - \strlen($text));
        }
        return $text;
    }
    /**
     * Initializes console output formatter.
     *
     * @param OutputFormatterStyleInterface[] $styles Array of "name => FormatterStyle" instances
     */
    public function __construct(bool $decorated = \false, array $styles = [])
    {
        $this->decorated = $decorated;
        $this->setStyle('error', new OutputFormatterStyle('white', 'red'));
        $this->setStyle('info', new OutputFormatterStyle('green'));
        $this->setStyle('comment', new OutputFormatterStyle('yellow'));
        $this->setStyle('question', new OutputFormatterStyle('black', 'cyan'));
        foreach ($styles as $name => $style) {
            $this->setStyle($name, $style);
        }
        $this->styleStack = new OutputFormatterStyleStack();
    }
    /**
     * {@inheritdoc}
     */
    public function setDecorated(bool $decorated)
    {
        $this->decorated = $decorated;
    }
    /**
     * {@inheritdoc}
     */
    public function isDecorated()
    {
        return $this->decorated;
    }
    /**
     * {@inheritdoc}
     */
    public function setStyle(string $name, OutputFormatterStyleInterface $style)
    {
        $this->styles[\strtolower($name)] = $style;
    }
    /**
     * {@inheritdoc}
     */
    public function hasStyle(string $name)
    {
        return isset($this->styles[\strtolower($name)]);
    }
    /**
     * {@inheritdoc}
     */
    public function getStyle(string $name)
    {
        if (!$this->hasStyle($name)) {
            throw new InvalidArgumentException(\sprintf('Undefined style: "%s".', $name));
        }
        return $this->styles[\strtolower($name)];
    }
    /**
     * {@inheritdoc}
     */
    public function format(?string $message)
    {
        return $this->formatAndWrap($message, 0);
    }
    /**
     * {@inheritdoc}
     */
    public function formatAndWrap(?string $message, int $width)
    {
        if (null === $message) {
            return '';
        }
        $offset = 0;
        $output = '';
        $openTagRegex = '[a-z](?:[^\\\\<>]*+ | \\\\.)*';
        $closeTagRegex = '[a-z][^<>]*+';
        $currentLineLength = 0;
        \preg_match_all("#<(({$openTagRegex}) | /({$closeTagRegex})?)>#ix", $message, $matches, \PREG_OFFSET_CAPTURE);
        foreach ($matches[0] as $i => $match) {
            $pos = $match[1];
            $text = $match[0];
            if (0 != $pos && '\\' == $message[$pos - 1]) {
                continue;
            }
            // add the text up to the next tag
            $output .= $this->applyCurrentStyle(\substr($message, $offset, $pos - $offset), $output, $width, $currentLineLength);
            $offset = $pos + \strlen($text);
            // opening tag?
            if ($open = '/' != $text[1]) {
                $tag = $matches[1][$i][0];
            } else {
                $tag = $matches[3][$i][0] ?? '';
            }
            if (!$open && !$tag) {
                // </>
                $this->styleStack->pop();
            } elseif (null === ($style = $this->createStyleFromString($tag))) {
                $output .= $this->applyCurrentStyle($text, $output, $width, $currentLineLength);
            } elseif ($open) {
                $this->styleStack->push($style);
            } else {
                $this->styleStack->pop($style);
            }
        }
        $output .= $this->applyCurrentStyle(\substr($message, $offset), $output, $width, $currentLineLength);
        return \strtr($output, ["\x00" => '\\', '\\<' => '<', '\\>' => '>']);
    }
    /**
     * @return OutputFormatterStyleStack
     */
    public function getStyleStack()
    {
        return $this->styleStack;
    }
    /**
     * Tries to create new style instance from string.
     */
    private function createStyleFromString(string $string) : ?OutputFormatterStyleInterface
    {
        if (isset($this->styles[$string])) {
            return $this->styles[$string];
        }
        if (!\preg_match_all('/([^=]+)=([^;]+)(;|$)/', $string, $matches, \PREG_SET_ORDER)) {
            return null;
        }
        $style = new OutputFormatterStyle();
        foreach ($matches as $match) {
            \array_shift($match);
            $match[0] = \strtolower($match[0]);
            if ('fg' == $match[0]) {
                $style->setForeground(\strtolower($match[1]));
            } elseif ('bg' == $match[0]) {
                $style->setBackground(\strtolower($match[1]));
            } elseif ('href' === $match[0]) {
                $url = \preg_replace('{\\\\([<>])}', '$1', $match[1]);
                $style->setHref($url);
            } elseif ('options' === $match[0]) {
                \preg_match_all('([^,;]+)', \strtolower($match[1]), $options);
                $options = \array_shift($options);
                foreach ($options as $option) {
                    $style->setOption($option);
                }
            } else {
                return null;
            }
        }
        return $style;
    }
    /**
     * Applies current style from stack to text, if must be applied.
     */
    private function applyCurrentStyle(string $text, string $current, int $width, int &$currentLineLength) : string
    {
        if ('' === $text) {
            return '';
        }
        if (!$width) {
            return $this->isDecorated() ? $this->styleStack->getCurrent()->apply($text) : $text;
        }
        if (!$currentLineLength && '' !== $current) {
            $text = \ltrim($text);
        }
        if ($currentLineLength) {
            $prefix = \substr($text, 0, $i = $width - $currentLineLength) . "\n";
            $text = \substr($text, $i);
        } else {
            $prefix = '';
        }
        \preg_match('~(\\n)$~', $text, $matches);
        $text = $prefix . \preg_replace('~([^\\n]{' . $width . '})\\ *~', "\$1\n", $text);
        $text = \rtrim($text, "\n") . ($matches[1] ?? '');
        if (!$currentLineLength && '' !== $current && "\n" !== \substr($current, -1)) {
            $text = "\n" . $text;
        }
        $lines = \explode("\n", $text);
        foreach ($lines as $line) {
            $currentLineLength += \strlen($line);
            if ($width <= $currentLineLength) {
                $currentLineLength = 0;
            }
        }
        if ($this->isDecorated()) {
            foreach ($lines as $i => $line) {
                $lines[$i] = $this->styleStack->getCurrent()->apply($line);
            }
        }
        return \implode("\n", $lines);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter;

/**
 * @author Tien Xuan Vo <tien.xuan.vo@gmail.com>
 */
final class NullOutputFormatterStyle implements OutputFormatterStyleInterface
{
    /**
     * {@inheritdoc}
     */
    public function apply(string $text) : string
    {
        return $text;
    }
    /**
     * {@inheritdoc}
     */
    public function setBackground(string $color = null) : void
    {
        // do nothing
    }
    /**
     * {@inheritdoc}
     */
    public function setForeground(string $color = null) : void
    {
        // do nothing
    }
    /**
     * {@inheritdoc}
     */
    public function setOption(string $option) : void
    {
        // do nothing
    }
    /**
     * {@inheritdoc}
     */
    public function setOptions(array $options) : void
    {
        // do nothing
    }
    /**
     * {@inheritdoc}
     */
    public function unsetOption(string $option) : void
    {
        // do nothing
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Event;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\Command;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
use _PHPStan_dcc7b7cff\Symfony\Contracts\EventDispatcher\Event;
/**
 * Allows to inspect input and output of a command.
 *
 * @author Francesco Levorato <git@flevour.net>
 */
class ConsoleEvent extends Event
{
    protected $command;
    private $input;
    private $output;
    public function __construct(?Command $command, InputInterface $input, OutputInterface $output)
    {
        $this->command = $command;
        $this->input = $input;
        $this->output = $output;
    }
    /**
     * Gets the command that is executed.
     *
     * @return Command|null
     */
    public function getCommand()
    {
        return $this->command;
    }
    /**
     * Gets the input instance.
     *
     * @return InputInterface
     */
    public function getInput()
    {
        return $this->input;
    }
    /**
     * Gets the output instance.
     *
     * @return OutputInterface
     */
    public function getOutput()
    {
        return $this->output;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Event;

/**
 * Allows to do things before the command is executed, like skipping the command or changing the input.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
final class ConsoleCommandEvent extends ConsoleEvent
{
    /**
     * The return code for skipped commands, this will also be passed into the terminate event.
     */
    public const RETURN_CODE_DISABLED = 113;
    /**
     * Indicates if the command should be run or skipped.
     */
    private $commandShouldRun = \true;
    /**
     * Disables the command, so it won't be run.
     */
    public function disableCommand() : bool
    {
        return $this->commandShouldRun = \false;
    }
    public function enableCommand() : bool
    {
        return $this->commandShouldRun = \true;
    }
    /**
     * Returns true if the command is runnable, false otherwise.
     */
    public function commandShouldRun() : bool
    {
        return $this->commandShouldRun;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Event;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\Command;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
/**
 * @author marie <marie@users.noreply.github.com>
 */
final class ConsoleSignalEvent extends ConsoleEvent
{
    private $handlingSignal;
    public function __construct(Command $command, InputInterface $input, OutputInterface $output, int $handlingSignal)
    {
        parent::__construct($command, $input, $output);
        $this->handlingSignal = $handlingSignal;
    }
    public function getHandlingSignal() : int
    {
        return $this->handlingSignal;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Event;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\Command;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
/**
 * Allows to manipulate the exit code of a command after its execution.
 *
 * @author Francesco Levorato <git@flevour.net>
 */
final class ConsoleTerminateEvent extends ConsoleEvent
{
    private $exitCode;
    public function __construct(Command $command, InputInterface $input, OutputInterface $output, int $exitCode)
    {
        parent::__construct($command, $input, $output);
        $this->setExitCode($exitCode);
    }
    public function setExitCode(int $exitCode) : void
    {
        $this->exitCode = $exitCode;
    }
    public function getExitCode() : int
    {
        return $this->exitCode;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Event;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\Command;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
/**
 * Allows to handle throwables thrown while running a command.
 *
 * @author Wouter de Jong <wouter@wouterj.nl>
 */
final class ConsoleErrorEvent extends ConsoleEvent
{
    private $error;
    private $exitCode;
    public function __construct(InputInterface $input, OutputInterface $output, \Throwable $error, Command $command = null)
    {
        parent::__construct($command, $input, $output);
        $this->error = $error;
    }
    public function getError() : \Throwable
    {
        return $this->error;
    }
    public function setError(\Throwable $error) : void
    {
        $this->error = $error;
    }
    public function setExitCode(int $exitCode) : void
    {
        $this->exitCode = $exitCode;
        $r = new \ReflectionProperty($this->error, 'code');
        $r->setAccessible(\true);
        $r->setValue($this->error, $this->exitCode);
    }
    public function getExitCode() : int
    {
        return $this->exitCode ?? (\is_int($this->error->getCode()) && 0 !== $this->error->getCode() ? $this->error->getCode() : 1);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\EventListener;

use _PHPStan_dcc7b7cff\Psr\Log\LoggerInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\ConsoleEvents;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Event\ConsoleErrorEvent;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Event\ConsoleEvent;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Event\ConsoleTerminateEvent;
use _PHPStan_dcc7b7cff\Symfony\Component\EventDispatcher\EventSubscriberInterface;
/**
 * @author James Halsall <james.t.halsall@googlemail.com>
 * @author Robin Chalas <robin.chalas@gmail.com>
 */
class ErrorListener implements EventSubscriberInterface
{
    private $logger;
    public function __construct(LoggerInterface $logger = null)
    {
        $this->logger = $logger;
    }
    public function onConsoleError(ConsoleErrorEvent $event)
    {
        if (null === $this->logger) {
            return;
        }
        $error = $event->getError();
        if (!($inputString = $this->getInputString($event))) {
            $this->logger->critical('An error occurred while using the console. Message: "{message}"', ['exception' => $error, 'message' => $error->getMessage()]);
            return;
        }
        $this->logger->critical('Error thrown while running command "{command}". Message: "{message}"', ['exception' => $error, 'command' => $inputString, 'message' => $error->getMessage()]);
    }
    public function onConsoleTerminate(ConsoleTerminateEvent $event)
    {
        if (null === $this->logger) {
            return;
        }
        $exitCode = $event->getExitCode();
        if (0 === $exitCode) {
            return;
        }
        if (!($inputString = $this->getInputString($event))) {
            $this->logger->debug('The console exited with code "{code}"', ['code' => $exitCode]);
            return;
        }
        $this->logger->debug('Command "{command}" exited with code "{code}"', ['command' => $inputString, 'code' => $exitCode]);
    }
    public static function getSubscribedEvents()
    {
        return [ConsoleEvents::ERROR => ['onConsoleError', -128], ConsoleEvents::TERMINATE => ['onConsoleTerminate', -128]];
    }
    private static function getInputString(ConsoleEvent $event) : ?string
    {
        $commandName = $event->getCommand() ? $event->getCommand()->getName() : null;
        $input = $event->getInput();
        if (\method_exists($input, '__toString')) {
            if ($commandName) {
                return \str_replace(["'{$commandName}'", "\"{$commandName}\""], $commandName, (string) $input);
            }
            return (string) $input;
        }
        return $commandName;
    }
}
# This file is part of the Symfony package.
#
# (c) Fabien Potencier <fabien@symfony.com>
#
# For the full copyright and license information, please view
# https://symfony.com/doc/current/contributing/code/license.html

_sf_{{ COMMAND_NAME }}() {
    # Use newline as only separator to allow space in completion values
    IFS=$'\n'
    local sf_cmd="${COMP_WORDS[0]}"

    # for an alias, get the real script behind it
    sf_cmd_type=$(type -t $sf_cmd)
    if [[ $sf_cmd_type == "alias" ]]; then
        sf_cmd=$(alias $sf_cmd | sed -E "s/alias $sf_cmd='(.*)'/\1/")
    elif [[ $sf_cmd_type == "file" ]]; then
        sf_cmd=$(type -p $sf_cmd)
    fi

    if [[ $sf_cmd_type != "function" && ! -x $sf_cmd ]]; then
        return 1
    fi

    local cur prev words cword
    _get_comp_words_by_ref -n := cur prev words cword

    local completecmd=("$sf_cmd" "_complete" "--no-interaction" "-sbash" "-c$cword" "-S{{ VERSION }}")
    for w in ${words[@]}; do
        w=$(printf -- '%b' "$w")
        # remove quotes from typed values
        quote="${w:0:1}"
        if [ "$quote" == \' ]; then
            w="${w%\'}"
            w="${w#\'}"
        elif [ "$quote" == \" ]; then
            w="${w%\"}"
            w="${w#\"}"
        fi
        # empty values are ignored
        if [ ! -z "$w" ]; then
            completecmd+=("-i$w")
        fi
    done

    local sfcomplete
    if sfcomplete=$(${completecmd[@]} 2>&1); then
        local quote suggestions
        quote=${cur:0:1}

        # Use single quotes by default if suggestions contains backslash (FQCN)
        if [ "$quote" == '' ] && [[ "$sfcomplete" =~ \\ ]]; then
            quote=\'
        fi

        if [ "$quote" == \' ]; then
            # single quotes: no additional escaping (does not accept ' in values)
            suggestions=$(for s in $sfcomplete; do printf $'%q%q%q\n' "$quote" "$s" "$quote"; done)
        elif [ "$quote" == \" ]; then
            # double quotes: double escaping for \ $ ` "
            suggestions=$(for s in $sfcomplete; do
                s=${s//\\/\\\\}
                s=${s//\$/\\\$}
                s=${s//\`/\\\`}
                s=${s//\"/\\\"}
                printf $'%q%q%q\n' "$quote" "$s" "$quote";
            done)
        else
            # no quotes: double escaping
            suggestions=$(for s in $sfcomplete; do printf $'%q\n' $(printf '%q' "$s"); done)
        fi
        COMPREPLY=($(IFS=$'\n' compgen -W "$suggestions" -- $(printf -- "%q" "$cur")))
        __ltrim_colon_completions "$cur"
    else
        if [[ "$sfcomplete" != *"Command \"_complete\" is not defined."* ]]; then
            >&2 echo
            >&2 echo $sfcomplete
        fi

        return 1
    fi
}

complete -F _sf_{{ COMMAND_NAME }} {{ COMMAND_NAME }}
MZ����@���	�!�L�!This program cannot be run in DOS mode.

$�,�;�B�;�B�;�B�2�מ:�B�2��-�B�2�ƞ9�B�2�ў?�B�a9�8�B�;�C��B�2�Ȟ:�B�2�֞:�B�2�Ӟ:�B�Rich;�B�PEL�MoO�	
8 @`?�@��"P@ Pp!8!@ �.text	
 `.rdata�	 
@@.data�0@�.rsrc @@@.reloc�P"@Bj$��@�xj�� @�e���E�PV� @�EЃ�PV� @�M�X @�e��E�P�5H @�L @YY�5\ @�E�P�5` @�D @YY��P @�M���M�T @3��H�;
0@u���h�@��l3@�$40@�5h3@�40@h$0@h(0@h 0@�� @���00@��}j�Y�jh"@�3ۉ]�d��p�]俀3@SVW�0 @;�t;�u3�F�u��h��4 @��3�F�|3@;�u
j�\Y�;�|3@��u,�5|3@h� @h� @�YY��t�E����������5<0@�|3@;�uh� @h� @�lYY�|3@9]�uSW�8 @9�3@th�3@�Y��t
SjS��3@�$0@�
� @��5$0@�5(0@�5 0@�������80@9,0@u7P�� @�E��	�M�PQ�YYËe�E�80@3�9,0@uP�h @9<0@u�� @�E������80@�øMZf9@t3��M�<@��@�8PEu��H��t��uՃ��v�3�9����xtv�3�9������j�,0@�p @j��l @YY��3@��3@�� @�
t3@��� @�
p3@��� @��x3@�V��=0@uh�@�� @Y�g�=0@�u	j��� @Y3���{�����U���(�H1@�
D1@�@1@�<1@�581@�=41@f�`1@f�
T1@f�01@f�,1@f�%(1@f�-$1@��X1@�E�L1@�E�P1@�E�\1@������0@�P1@�L0@�@0@	��D0@�0@������0@������ @��0@j�?Yj�  @h!@�$ @�=�0@uj�Yh	��( @P�, @�Ë�U��E��8csm�u*�xu$�@= �t=!�t="�t=@�u��3�]�hH@�  @3��%� @jh("@�b�5�3@�5� @��Y�E��u�u�� @Y�gj�Y�e��5�3@�։E�5�3@��YY�E�E�P�E�P�u�5l @��YP�U�E�u�֣�3@�u�փ���3@�E������	�E���j�YË�U��u�N��������YH]Ë�V��!@��!@W��;�s���t�Ѓ�;�r�_^Ë�V�"@�"@W��;�s���t�Ѓ�;�r�_^�%� @���̋�U��M�MZf9t3�]ËA<��8PEu�3ҹf9H�‹�]�����������̋�U��E�H<��ASV�q3�W�D��v�}�H;�r	�X�;�r
B��(;�r�3�_^[]������������̋�U��j�hH"@he@d�P��SVW�0@1E�3�P�E�d��e��E�h@�*�������tU�E-@Ph@�P�������t;�@$���Ѓ��E������M�d�
Y_^[��]ËE��3�=��‹�Ëe��E�����3��M�d�
Y_^[��]��%� @�%� @��he@d�5�D$�l$�l$+�SVW�0@1E�3�P�e�u��E��E������E��E�d�ËM�d�
Y__^[��]Q�U��u�u�u�uh�@h0@����]�Vhh3�V������t
VVVVV����^�3��U����0@�e��e�SW�N�@����;�t
��t	�У0@�`V�E�P�< @�u�3u�� @3� @3� @3�E�P� @�E�3E�3�;�u�O�@����u����50@�։50@^_[��%t @�%x @�%| @�%� @�%� @�%� @�%� @�%� @�%� @Pd�5�D$+d$SVW�(��0@3�P�E�u��E������E�d�ËM�d�
Y__^[��]QËM�3���������M�%T @�T$�B�J�3�����J�3�����l"@�s����#�#�#�)r)b)H)4))�(�(�(�(�(�(�)�#�$%�%&d&�&�$('�'�'�'�'(((6(�'H(Z(t(�('''�'�'l'^'R'F'>'>(0'�'�)�@W@�@�MoOl�!�@0@�0@bad allocationH0@�!@RSDSь���J�!���LZc:\users\seld\documents\visual studio 2010\Projects\hiddeninp\Release\hiddeninp.pdbe������������@@�����������:@������������@�@�����@"�d"@�"�# $#�&D H#(h �#�#�#�)r)b)H)4))�(�(�(�(�(�(�)�#�$%�%&d&�&�$('�'�'�'�'(((6(�'H(Z(t(�('''�'�'l'^'R'F'>'>(0'�'�)�GetConsoleMode�SetConsoleMode;GetStdHandleKERNEL32.dll??$?6DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z�?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@AJ?cin@std@@3V?$basic_istream@DU?$char_traits@D@std@@@1@A�??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z_??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ{??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ�?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@ZMSVCP90.dll_amsg_exit�__getmainargs,_cexit|_exitf_XcptFilter�exit�__initenv_initterm_initterm_e<_configthreadlocale�__setusermatherr_adjust_fdiv�__p__commode�__p__fmodej_encode_pointer�__set_app_typeK_crt_debugger_hookC?terminate@@YAXXZMSVCR90.dll�_unlock�__dllonexitv_lock_onexit`_decode_pointers_except_handler4_common_invoke_watson?_controlfp_s�InterlockedExchange!Sleep�InterlockedCompareExchange-TerminateProcess�GetCurrentProcess>UnhandledExceptionFilterSetUnhandledExceptionFilter�IsDebuggerPresentTQueryPerformanceCounterfGetTickCount�GetCurrentThreadId�GetCurrentProcessIdOGetSystemTimeAsFileTimes__CxxFrameHandler3N�@���D������������$!@ �8�P�h�	�	��@(��CV�(4VS_VERSION_INFO���StringFileInfob040904b0�QFileDescriptionReads from stdin without leaking info to the terminal and outputs back to stdout6FileVersion1, 0, 0, 08InternalNamehiddeninputPLegalCopyrightJordi Boggiano - 2012HOriginalFilenamehiddeninput.exe:
ProductNameHidden Input:ProductVersion1, 0, 0, 0DVarFileInfo$Translation	�<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
      </requestedPrivileges>
    </security>
  </trustInfo>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
</assembly>PAPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDING@00!0/080F0L0T0^0d0n0{0�0�0�0�0�0�0�0�0�0�0�0�0�01#1-1@1J1O1T1v1{1�1�1�1�1�1�1�1�1�1�1�1�1�1�12"2*23292A2M2_2j2p2�2�2�2�2�2�2�2�2�2�2�2333%303N3T3Z3`3f3l3s3z3�3�3�3�3�3�3�3�3�3�3�3�3�3�3�3�34444%4;4B4�4�4�4�4�4�4�4�4�4�45!5^5c5�5�5�5H6M6_6}6�6�677
7*7w7|7�7�7�7�78
88=8E8P8V8\8b8h8n8t8z8�8�8�89 $�0�0�01 1t1x12 2@2\2`2h2t200<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\CI;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
/**
 * Utility class for Github actions.
 *
 * @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
 */
class GithubActionReporter
{
    private $output;
    /**
     * @see https://github.com/actions/toolkit/blob/5e5e1b7aacba68a53836a34db4a288c3c1c1585b/packages/core/src/command.ts#L80-L85
     */
    private const ESCAPED_DATA = ['%' => '%25', "\r" => '%0D', "\n" => '%0A'];
    /**
     * @see https://github.com/actions/toolkit/blob/5e5e1b7aacba68a53836a34db4a288c3c1c1585b/packages/core/src/command.ts#L87-L94
     */
    private const ESCAPED_PROPERTIES = ['%' => '%25', "\r" => '%0D', "\n" => '%0A', ':' => '%3A', ',' => '%2C'];
    public function __construct(OutputInterface $output)
    {
        $this->output = $output;
    }
    public static function isGithubActionEnvironment() : bool
    {
        return \false !== \getenv('GITHUB_ACTIONS');
    }
    /**
     * Output an error using the Github annotations format.
     *
     * @see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
     */
    public function error(string $message, string $file = null, int $line = null, int $col = null) : void
    {
        $this->log('error', $message, $file, $line, $col);
    }
    /**
     * Output a warning using the Github annotations format.
     *
     * @see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-a-warning-message
     */
    public function warning(string $message, string $file = null, int $line = null, int $col = null) : void
    {
        $this->log('warning', $message, $file, $line, $col);
    }
    /**
     * Output a debug log using the Github annotations format.
     *
     * @see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-a-debug-message
     */
    public function debug(string $message, string $file = null, int $line = null, int $col = null) : void
    {
        $this->log('debug', $message, $file, $line, $col);
    }
    private function log(string $type, string $message, string $file = null, int $line = null, int $col = null) : void
    {
        // Some values must be encoded.
        $message = \strtr($message, self::ESCAPED_DATA);
        if (!$file) {
            // No file provided, output the message solely:
            $this->output->writeln(\sprintf('::%s::%s', $type, $message));
            return;
        }
        $this->output->writeln(\sprintf('::%s file=%s,line=%s,col=%s::%s', $type, \strtr($file, self::ESCAPED_PROPERTIES), \strtr($line ?? 1, self::ESCAPED_PROPERTIES), \strtr($col ?? 0, self::ESCAPED_PROPERTIES), $message));
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper;

/**
 * @internal
 */
class TableRows implements \IteratorAggregate
{
    private $generator;
    public function __construct(\Closure $generator)
    {
        $this->generator = $generator;
    }
    public function getIterator() : \Traversable
    {
        return ($this->generator)();
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Cursor;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\LogicException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\ConsoleOutputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\ConsoleSectionOutput;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Terminal;
/**
 * The ProgressBar provides helpers to display progress output.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 * @author Chris Jones <leeked@gmail.com>
 */
final class ProgressBar
{
    public const FORMAT_VERBOSE = 'verbose';
    public const FORMAT_VERY_VERBOSE = 'very_verbose';
    public const FORMAT_DEBUG = 'debug';
    public const FORMAT_NORMAL = 'normal';
    private const FORMAT_VERBOSE_NOMAX = 'verbose_nomax';
    private const FORMAT_VERY_VERBOSE_NOMAX = 'very_verbose_nomax';
    private const FORMAT_DEBUG_NOMAX = 'debug_nomax';
    private const FORMAT_NORMAL_NOMAX = 'normal_nomax';
    private $barWidth = 28;
    private $barChar;
    private $emptyBarChar = '-';
    private $progressChar = '>';
    private $format;
    private $internalFormat;
    private $redrawFreq = 1;
    private $writeCount;
    private $lastWriteTime;
    private $minSecondsBetweenRedraws = 0;
    private $maxSecondsBetweenRedraws = 1;
    private $output;
    private $step = 0;
    private $max;
    private $startTime;
    private $stepWidth;
    private $percent = 0.0;
    private $messages = [];
    private $overwrite = \true;
    private $terminal;
    private $previousMessage;
    private $cursor;
    private static $formatters;
    private static $formats;
    /**
     * @param int $max Maximum steps (0 if unknown)
     */
    public function __construct(OutputInterface $output, int $max = 0, float $minSecondsBetweenRedraws = 1 / 25)
    {
        if ($output instanceof ConsoleOutputInterface) {
            $output = $output->getErrorOutput();
        }
        $this->output = $output;
        $this->setMaxSteps($max);
        $this->terminal = new Terminal();
        if (0 < $minSecondsBetweenRedraws) {
            $this->redrawFreq = null;
            $this->minSecondsBetweenRedraws = $minSecondsBetweenRedraws;
        }
        if (!$this->output->isDecorated()) {
            // disable overwrite when output does not support ANSI codes.
            $this->overwrite = \false;
            // set a reasonable redraw frequency so output isn't flooded
            $this->redrawFreq = null;
        }
        $this->startTime = \time();
        $this->cursor = new Cursor($output);
    }
    /**
     * Sets a placeholder formatter for a given name.
     *
     * This method also allow you to override an existing placeholder.
     *
     * @param string   $name     The placeholder name (including the delimiter char like %)
     * @param callable $callable A PHP callable
     */
    public static function setPlaceholderFormatterDefinition(string $name, callable $callable) : void
    {
        if (!self::$formatters) {
            self::$formatters = self::initPlaceholderFormatters();
        }
        self::$formatters[$name] = $callable;
    }
    /**
     * Gets the placeholder formatter for a given name.
     *
     * @param string $name The placeholder name (including the delimiter char like %)
     */
    public static function getPlaceholderFormatterDefinition(string $name) : ?callable
    {
        if (!self::$formatters) {
            self::$formatters = self::initPlaceholderFormatters();
        }
        return self::$formatters[$name] ?? null;
    }
    /**
     * Sets a format for a given name.
     *
     * This method also allow you to override an existing format.
     *
     * @param string $name   The format name
     * @param string $format A format string
     */
    public static function setFormatDefinition(string $name, string $format) : void
    {
        if (!self::$formats) {
            self::$formats = self::initFormats();
        }
        self::$formats[$name] = $format;
    }
    /**
     * Gets the format for a given name.
     *
     * @param string $name The format name
     */
    public static function getFormatDefinition(string $name) : ?string
    {
        if (!self::$formats) {
            self::$formats = self::initFormats();
        }
        return self::$formats[$name] ?? null;
    }
    /**
     * Associates a text with a named placeholder.
     *
     * The text is displayed when the progress bar is rendered but only
     * when the corresponding placeholder is part of the custom format line
     * (by wrapping the name with %).
     *
     * @param string $message The text to associate with the placeholder
     * @param string $name    The name of the placeholder
     */
    public function setMessage(string $message, string $name = 'message')
    {
        $this->messages[$name] = $message;
    }
    public function getMessage(string $name = 'message')
    {
        return $this->messages[$name];
    }
    public function getStartTime() : int
    {
        return $this->startTime;
    }
    public function getMaxSteps() : int
    {
        return $this->max;
    }
    public function getProgress() : int
    {
        return $this->step;
    }
    private function getStepWidth() : int
    {
        return $this->stepWidth;
    }
    public function getProgressPercent() : float
    {
        return $this->percent;
    }
    public function getBarOffset() : float
    {
        return \floor($this->max ? $this->percent * $this->barWidth : (null === $this->redrawFreq ? (int) (\min(5, $this->barWidth / 15) * $this->writeCount) : $this->step) % $this->barWidth);
    }
    public function getEstimated() : float
    {
        if (!$this->step) {
            return 0;
        }
        return \round((\time() - $this->startTime) / $this->step * $this->max);
    }
    public function getRemaining() : float
    {
        if (!$this->step) {
            return 0;
        }
        return \round((\time() - $this->startTime) / $this->step * ($this->max - $this->step));
    }
    public function setBarWidth(int $size)
    {
        $this->barWidth = \max(1, $size);
    }
    public function getBarWidth() : int
    {
        return $this->barWidth;
    }
    public function setBarCharacter(string $char)
    {
        $this->barChar = $char;
    }
    public function getBarCharacter() : string
    {
        return $this->barChar ?? ($this->max ? '=' : $this->emptyBarChar);
    }
    public function setEmptyBarCharacter(string $char)
    {
        $this->emptyBarChar = $char;
    }
    public function getEmptyBarCharacter() : string
    {
        return $this->emptyBarChar;
    }
    public function setProgressCharacter(string $char)
    {
        $this->progressChar = $char;
    }
    public function getProgressCharacter() : string
    {
        return $this->progressChar;
    }
    public function setFormat(string $format)
    {
        $this->format = null;
        $this->internalFormat = $format;
    }
    /**
     * Sets the redraw frequency.
     *
     * @param int|null $freq The frequency in steps
     */
    public function setRedrawFrequency(?int $freq)
    {
        $this->redrawFreq = null !== $freq ? \max(1, $freq) : null;
    }
    public function minSecondsBetweenRedraws(float $seconds) : void
    {
        $this->minSecondsBetweenRedraws = $seconds;
    }
    public function maxSecondsBetweenRedraws(float $seconds) : void
    {
        $this->maxSecondsBetweenRedraws = $seconds;
    }
    /**
     * Returns an iterator that will automatically update the progress bar when iterated.
     *
     * @param int|null $max Number of steps to complete the bar (0 if indeterminate), if null it will be inferred from $iterable
     */
    public function iterate(iterable $iterable, int $max = null) : iterable
    {
        $this->start($max ?? (\is_countable($iterable) ? \count($iterable) : 0));
        foreach ($iterable as $key => $value) {
            (yield $key => $value);
            $this->advance();
        }
        $this->finish();
    }
    /**
     * Starts the progress output.
     *
     * @param int|null $max Number of steps to complete the bar (0 if indeterminate), null to leave unchanged
     */
    public function start(int $max = null)
    {
        $this->startTime = \time();
        $this->step = 0;
        $this->percent = 0.0;
        if (null !== $max) {
            $this->setMaxSteps($max);
        }
        $this->display();
    }
    /**
     * Advances the progress output X steps.
     *
     * @param int $step Number of steps to advance
     */
    public function advance(int $step = 1)
    {
        $this->setProgress($this->step + $step);
    }
    /**
     * Sets whether to overwrite the progressbar, false for new line.
     */
    public function setOverwrite(bool $overwrite)
    {
        $this->overwrite = $overwrite;
    }
    public function setProgress(int $step)
    {
        if ($this->max && $step > $this->max) {
            $this->max = $step;
        } elseif ($step < 0) {
            $step = 0;
        }
        $redrawFreq = $this->redrawFreq ?? ($this->max ?: 10) / 10;
        $prevPeriod = (int) ($this->step / $redrawFreq);
        $currPeriod = (int) ($step / $redrawFreq);
        $this->step = $step;
        $this->percent = $this->max ? (float) $this->step / $this->max : 0;
        $timeInterval = \microtime(\true) - $this->lastWriteTime;
        // Draw regardless of other limits
        if ($this->max === $step) {
            $this->display();
            return;
        }
        // Throttling
        if ($timeInterval < $this->minSecondsBetweenRedraws) {
            return;
        }
        // Draw each step period, but not too late
        if ($prevPeriod !== $currPeriod || $timeInterval >= $this->maxSecondsBetweenRedraws) {
            $this->display();
        }
    }
    public function setMaxSteps(int $max)
    {
        $this->format = null;
        $this->max = \max(0, $max);
        $this->stepWidth = $this->max ? Helper::width((string) $this->max) : 4;
    }
    /**
     * Finishes the progress output.
     */
    public function finish() : void
    {
        if (!$this->max) {
            $this->max = $this->step;
        }
        if ($this->step === $this->max && !$this->overwrite) {
            // prevent double 100% output
            return;
        }
        $this->setProgress($this->max);
    }
    /**
     * Outputs the current progress string.
     */
    public function display() : void
    {
        if (OutputInterface::VERBOSITY_QUIET === $this->output->getVerbosity()) {
            return;
        }
        if (null === $this->format) {
            $this->setRealFormat($this->internalFormat ?: $this->determineBestFormat());
        }
        $this->overwrite($this->buildLine());
    }
    /**
     * Removes the progress bar from the current line.
     *
     * This is useful if you wish to write some output
     * while a progress bar is running.
     * Call display() to show the progress bar again.
     */
    public function clear() : void
    {
        if (!$this->overwrite) {
            return;
        }
        if (null === $this->format) {
            $this->setRealFormat($this->internalFormat ?: $this->determineBestFormat());
        }
        $this->overwrite('');
    }
    private function setRealFormat(string $format)
    {
        // try to use the _nomax variant if available
        if (!$this->max && null !== self::getFormatDefinition($format . '_nomax')) {
            $this->format = self::getFormatDefinition($format . '_nomax');
        } elseif (null !== self::getFormatDefinition($format)) {
            $this->format = self::getFormatDefinition($format);
        } else {
            $this->format = $format;
        }
    }
    /**
     * Overwrites a previous message to the output.
     */
    private function overwrite(string $message) : void
    {
        if ($this->previousMessage === $message) {
            return;
        }
        $originalMessage = $message;
        if ($this->overwrite) {
            if (null !== $this->previousMessage) {
                if ($this->output instanceof ConsoleSectionOutput) {
                    $messageLines = \explode("\n", $this->previousMessage);
                    $lineCount = \count($messageLines);
                    foreach ($messageLines as $messageLine) {
                        $messageLineLength = Helper::width(Helper::removeDecoration($this->output->getFormatter(), $messageLine));
                        if ($messageLineLength > $this->terminal->getWidth()) {
                            $lineCount += \floor($messageLineLength / $this->terminal->getWidth());
                        }
                    }
                    $this->output->clear($lineCount);
                } else {
                    $lineCount = \substr_count($this->previousMessage, "\n");
                    for ($i = 0; $i < $lineCount; ++$i) {
                        $this->cursor->moveToColumn(1);
                        $this->cursor->clearLine();
                        $this->cursor->moveUp();
                    }
                    $this->cursor->moveToColumn(1);
                    $this->cursor->clearLine();
                }
            }
        } elseif ($this->step > 0) {
            $message = \PHP_EOL . $message;
        }
        $this->previousMessage = $originalMessage;
        $this->lastWriteTime = \microtime(\true);
        $this->output->write($message);
        ++$this->writeCount;
    }
    private function determineBestFormat() : string
    {
        switch ($this->output->getVerbosity()) {
            // OutputInterface::VERBOSITY_QUIET: display is disabled anyway
            case OutputInterface::VERBOSITY_VERBOSE:
                return $this->max ? self::FORMAT_VERBOSE : self::FORMAT_VERBOSE_NOMAX;
            case OutputInterface::VERBOSITY_VERY_VERBOSE:
                return $this->max ? self::FORMAT_VERY_VERBOSE : self::FORMAT_VERY_VERBOSE_NOMAX;
            case OutputInterface::VERBOSITY_DEBUG:
                return $this->max ? self::FORMAT_DEBUG : self::FORMAT_DEBUG_NOMAX;
            default:
                return $this->max ? self::FORMAT_NORMAL : self::FORMAT_NORMAL_NOMAX;
        }
    }
    private static function initPlaceholderFormatters() : array
    {
        return ['bar' => function (self $bar, OutputInterface $output) {
            $completeBars = $bar->getBarOffset();
            $display = \str_repeat($bar->getBarCharacter(), $completeBars);
            if ($completeBars < $bar->getBarWidth()) {
                $emptyBars = $bar->getBarWidth() - $completeBars - Helper::length(Helper::removeDecoration($output->getFormatter(), $bar->getProgressCharacter()));
                $display .= $bar->getProgressCharacter() . \str_repeat($bar->getEmptyBarCharacter(), $emptyBars);
            }
            return $display;
        }, 'elapsed' => function (self $bar) {
            return Helper::formatTime(\time() - $bar->getStartTime());
        }, 'remaining' => function (self $bar) {
            if (!$bar->getMaxSteps()) {
                throw new LogicException('Unable to display the remaining time if the maximum number of steps is not set.');
            }
            return Helper::formatTime($bar->getRemaining());
        }, 'estimated' => function (self $bar) {
            if (!$bar->getMaxSteps()) {
                throw new LogicException('Unable to display the estimated time if the maximum number of steps is not set.');
            }
            return Helper::formatTime($bar->getEstimated());
        }, 'memory' => function (self $bar) {
            return Helper::formatMemory(\memory_get_usage(\true));
        }, 'current' => function (self $bar) {
            return \str_pad($bar->getProgress(), $bar->getStepWidth(), ' ', \STR_PAD_LEFT);
        }, 'max' => function (self $bar) {
            return $bar->getMaxSteps();
        }, 'percent' => function (self $bar) {
            return \floor($bar->getProgressPercent() * 100);
        }];
    }
    private static function initFormats() : array
    {
        return [self::FORMAT_NORMAL => ' %current%/%max% [%bar%] %percent:3s%%', self::FORMAT_NORMAL_NOMAX => ' %current% [%bar%]', self::FORMAT_VERBOSE => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%', self::FORMAT_VERBOSE_NOMAX => ' %current% [%bar%] %elapsed:6s%', self::FORMAT_VERY_VERBOSE => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s%', self::FORMAT_VERY_VERBOSE_NOMAX => ' %current% [%bar%] %elapsed:6s%', self::FORMAT_DEBUG => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%', self::FORMAT_DEBUG_NOMAX => ' %current% [%bar%] %elapsed:6s% %memory:6s%'];
    }
    private function buildLine() : string
    {
        $regex = "{%([a-z\\-_]+)(?:\\:([^%]+))?%}i";
        $callback = function ($matches) {
            if ($formatter = $this::getPlaceholderFormatterDefinition($matches[1])) {
                $text = $formatter($this, $this->output);
            } elseif (isset($this->messages[$matches[1]])) {
                $text = $this->messages[$matches[1]];
            } else {
                return $matches[0];
            }
            if (isset($matches[2])) {
                $text = \sprintf('%' . $matches[2], $text);
            }
            return $text;
        };
        $line = \preg_replace_callback($regex, $callback, $this->format);
        // gets string length for each sub line with multiline format
        $linesLength = \array_map(function ($subLine) {
            return Helper::width(Helper::removeDecoration($this->output->getFormatter(), \rtrim($subLine, "\r")));
        }, \explode("\n", $line));
        $linesWidth = \max($linesLength);
        $terminalWidth = $this->terminal->getWidth();
        if ($linesWidth <= $terminalWidth) {
            return $line;
        }
        $this->setBarWidth($this->barWidth - $linesWidth + $terminalWidth);
        return \preg_replace_callback($regex, $callback, $this->format);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\InvalidArgumentException;
/**
 * @author Abdellatif Ait boudad <a.aitboudad@gmail.com>
 */
class TableCell
{
    private $value;
    private $options = ['rowspan' => 1, 'colspan' => 1, 'style' => null];
    public function __construct(string $value = '', array $options = [])
    {
        $this->value = $value;
        // check option names
        if ($diff = \array_diff(\array_keys($options), \array_keys($this->options))) {
            throw new InvalidArgumentException(\sprintf('The TableCell does not support the following options: \'%s\'.', \implode('\', \'', $diff)));
        }
        if (isset($options['style']) && !$options['style'] instanceof TableCellStyle) {
            throw new InvalidArgumentException('The style option must be an instance of "TableCellStyle".');
        }
        $this->options = \array_merge($this->options, $options);
    }
    /**
     * Returns the cell value.
     *
     * @return string
     */
    public function __toString()
    {
        return $this->value;
    }
    /**
     * Gets number of colspan.
     *
     * @return int
     */
    public function getColspan()
    {
        return (int) $this->options['colspan'];
    }
    /**
     * Gets number of rowspan.
     *
     * @return int
     */
    public function getRowspan()
    {
        return (int) $this->options['rowspan'];
    }
    public function getStyle() : ?TableCellStyle
    {
        return $this->options['style'];
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter\OutputFormatter;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Question\ChoiceQuestion;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Question\ConfirmationQuestion;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Question\Question;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Style\SymfonyStyle;
/**
 * Symfony Style Guide compliant question helper.
 *
 * @author Kevin Bond <kevinbond@gmail.com>
 */
class SymfonyQuestionHelper extends QuestionHelper
{
    /**
     * {@inheritdoc}
     */
    protected function writePrompt(OutputInterface $output, Question $question)
    {
        $text = OutputFormatter::escapeTrailingBackslash($question->getQuestion());
        $default = $question->getDefault();
        if ($question->isMultiline()) {
            $text .= \sprintf(' (press %s to continue)', $this->getEofShortcut());
        }
        switch (\true) {
            case null === $default:
                $text = \sprintf(' <info>%s</info>:', $text);
                break;
            case $question instanceof ConfirmationQuestion:
                $text = \sprintf(' <info>%s (yes/no)</info> [<comment>%s</comment>]:', $text, $default ? 'yes' : 'no');
                break;
            case $question instanceof ChoiceQuestion && $question->isMultiselect():
                $choices = $question->getChoices();
                $default = \explode(',', $default);
                foreach ($default as $key => $value) {
                    $default[$key] = $choices[\trim($value)];
                }
                $text = \sprintf(' <info>%s</info> [<comment>%s</comment>]:', $text, OutputFormatter::escape(\implode(', ', $default)));
                break;
            case $question instanceof ChoiceQuestion:
                $choices = $question->getChoices();
                $text = \sprintf(' <info>%s</info> [<comment>%s</comment>]:', $text, OutputFormatter::escape($choices[$default] ?? $default));
                break;
            default:
                $text = \sprintf(' <info>%s</info> [<comment>%s</comment>]:', $text, OutputFormatter::escape($default));
        }
        $output->writeln($text);
        $prompt = ' > ';
        if ($question instanceof ChoiceQuestion) {
            $output->writeln($this->formatChoiceQuestionChoices($question, 'comment'));
            $prompt = $question->getPrompt();
        }
        $output->write($prompt);
    }
    /**
     * {@inheritdoc}
     */
    protected function writeError(OutputInterface $output, \Exception $error)
    {
        if ($output instanceof SymfonyStyle) {
            $output->newLine();
            $output->error($error->getMessage());
            return;
        }
        parent::writeError($output, $error);
    }
    private function getEofShortcut() : string
    {
        if ('Windows' === \PHP_OS_FAMILY) {
            return '<comment>Ctrl+Z</comment> then <comment>Enter</comment>';
        }
        return '<comment>Ctrl+D</comment>';
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter\OutputFormatterInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\String\UnicodeString;
/**
 * Helper is the base class for all helper classes.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
abstract class Helper implements HelperInterface
{
    protected $helperSet = null;
    /**
     * {@inheritdoc}
     */
    public function setHelperSet(HelperSet $helperSet = null)
    {
        $this->helperSet = $helperSet;
    }
    /**
     * {@inheritdoc}
     */
    public function getHelperSet()
    {
        return $this->helperSet;
    }
    /**
     * Returns the length of a string, using mb_strwidth if it is available.
     *
     * @deprecated since Symfony 5.3
     *
     * @return int
     */
    public static function strlen(?string $string)
    {
        trigger_deprecation('symfony/console', '5.3', 'Method "%s()" is deprecated and will be removed in Symfony 6.0. Use Helper::width() or Helper::length() instead.', __METHOD__);
        return self::width($string);
    }
    /**
     * Returns the width of a string, using mb_strwidth if it is available.
     * The width is how many characters positions the string will use.
     */
    public static function width(?string $string) : int
    {
        $string ?? ($string = '');
        if (\preg_match('//u', $string)) {
            return (new UnicodeString($string))->width(\false);
        }
        if (\false === ($encoding = \mb_detect_encoding($string, null, \true))) {
            return \strlen($string);
        }
        return \mb_strwidth($string, $encoding);
    }
    /**
     * Returns the length of a string, using mb_strlen if it is available.
     * The length is related to how many bytes the string will use.
     */
    public static function length(?string $string) : int
    {
        $string ?? ($string = '');
        if (\preg_match('//u', $string)) {
            return (new UnicodeString($string))->length();
        }
        if (\false === ($encoding = \mb_detect_encoding($string, null, \true))) {
            return \strlen($string);
        }
        return \mb_strlen($string, $encoding);
    }
    /**
     * Returns the subset of a string, using mb_substr if it is available.
     *
     * @return string
     */
    public static function substr(?string $string, int $from, int $length = null)
    {
        $string ?? ($string = '');
        if (\false === ($encoding = \mb_detect_encoding($string, null, \true))) {
            return \substr($string, $from, $length);
        }
        return \mb_substr($string, $from, $length, $encoding);
    }
    public static function formatTime($secs)
    {
        static $timeFormats = [[0, '< 1 sec'], [1, '1 sec'], [2, 'secs', 1], [60, '1 min'], [120, 'mins', 60], [3600, '1 hr'], [7200, 'hrs', 3600], [86400, '1 day'], [172800, 'days', 86400]];
        foreach ($timeFormats as $index => $format) {
            if ($secs >= $format[0]) {
                if (isset($timeFormats[$index + 1]) && $secs < $timeFormats[$index + 1][0] || $index == \count($timeFormats) - 1) {
                    if (2 == \count($format)) {
                        return $format[1];
                    }
                    return \floor($secs / $format[2]) . ' ' . $format[1];
                }
            }
        }
    }
    public static function formatMemory(int $memory)
    {
        if ($memory >= 1024 * 1024 * 1024) {
            return \sprintf('%.1f GiB', $memory / 1024 / 1024 / 1024);
        }
        if ($memory >= 1024 * 1024) {
            return \sprintf('%.1f MiB', $memory / 1024 / 1024);
        }
        if ($memory >= 1024) {
            return \sprintf('%d KiB', $memory / 1024);
        }
        return \sprintf('%d B', $memory);
    }
    /**
     * @deprecated since Symfony 5.3
     */
    public static function strlenWithoutDecoration(OutputFormatterInterface $formatter, ?string $string)
    {
        trigger_deprecation('symfony/console', '5.3', 'Method "%s()" is deprecated and will be removed in Symfony 6.0. Use Helper::removeDecoration() instead.', __METHOD__);
        return self::width(self::removeDecoration($formatter, $string));
    }
    public static function removeDecoration(OutputFormatterInterface $formatter, ?string $string)
    {
        $isDecorated = $formatter->isDecorated();
        $formatter->setDecorated(\false);
        // remove <...> formatting
        $string = $formatter->format($string ?? '');
        // remove already formatted characters
        $string = \preg_replace("/\x1b\\[[^m]*m/", '', $string ?? '');
        // remove terminal hyperlinks
        $string = \preg_replace('/\\033]8;[^;]*;[^\\033]*\\033\\\\/', '', $string ?? '');
        $formatter->setDecorated($isDecorated);
        return $string;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\InvalidArgumentException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\LogicException;
/**
 * Defines the styles for a Table.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 * @author Саша Стаменковић <umpirsky@gmail.com>
 * @author Dany Maillard <danymaillard93b@gmail.com>
 */
class TableStyle
{
    private $paddingChar = ' ';
    private $horizontalOutsideBorderChar = '-';
    private $horizontalInsideBorderChar = '-';
    private $verticalOutsideBorderChar = '|';
    private $verticalInsideBorderChar = '|';
    private $crossingChar = '+';
    private $crossingTopRightChar = '+';
    private $crossingTopMidChar = '+';
    private $crossingTopLeftChar = '+';
    private $crossingMidRightChar = '+';
    private $crossingBottomRightChar = '+';
    private $crossingBottomMidChar = '+';
    private $crossingBottomLeftChar = '+';
    private $crossingMidLeftChar = '+';
    private $crossingTopLeftBottomChar = '+';
    private $crossingTopMidBottomChar = '+';
    private $crossingTopRightBottomChar = '+';
    private $headerTitleFormat = '<fg=black;bg=white;options=bold> %s </>';
    private $footerTitleFormat = '<fg=black;bg=white;options=bold> %s </>';
    private $cellHeaderFormat = '<info>%s</info>';
    private $cellRowFormat = '%s';
    private $cellRowContentFormat = ' %s ';
    private $borderFormat = '%s';
    private $padType = \STR_PAD_RIGHT;
    /**
     * Sets padding character, used for cell padding.
     *
     * @return $this
     */
    public function setPaddingChar(string $paddingChar)
    {
        if (!$paddingChar) {
            throw new LogicException('The padding char must not be empty.');
        }
        $this->paddingChar = $paddingChar;
        return $this;
    }
    /**
     * Gets padding character, used for cell padding.
     *
     * @return string
     */
    public function getPaddingChar()
    {
        return $this->paddingChar;
    }
    /**
     * Sets horizontal border characters.
     *
     * <code>
     * ╔═══════════════╤══════════════════════════╤══════════════════╗
     * 1 ISBN          2 Title                    │ Author           ║
     * ╠═══════════════╪══════════════════════════╪══════════════════╣
     * ║ 99921-58-10-7 │ Divine Comedy            │ Dante Alighieri  ║
     * ║ 9971-5-0210-0 │ A Tale of Two Cities     │ Charles Dickens  ║
     * ║ 960-425-059-0 │ The Lord of the Rings    │ J. R. R. Tolkien ║
     * ║ 80-902734-1-6 │ And Then There Were None │ Agatha Christie  ║
     * ╚═══════════════╧══════════════════════════╧══════════════════╝
     * </code>
     *
     * @return $this
     */
    public function setHorizontalBorderChars(string $outside, string $inside = null) : self
    {
        $this->horizontalOutsideBorderChar = $outside;
        $this->horizontalInsideBorderChar = $inside ?? $outside;
        return $this;
    }
    /**
     * Sets vertical border characters.
     *
     * <code>
     * ╔═══════════════╤══════════════════════════╤══════════════════╗
     * ║ ISBN          │ Title                    │ Author           ║
     * ╠═══════1═══════╪══════════════════════════╪══════════════════╣
     * ║ 99921-58-10-7 │ Divine Comedy            │ Dante Alighieri  ║
     * ║ 9971-5-0210-0 │ A Tale of Two Cities     │ Charles Dickens  ║
     * ╟───────2───────┼──────────────────────────┼──────────────────╢
     * ║ 960-425-059-0 │ The Lord of the Rings    │ J. R. R. Tolkien ║
     * ║ 80-902734-1-6 │ And Then There Were None │ Agatha Christie  ║
     * ╚═══════════════╧══════════════════════════╧══════════════════╝
     * </code>
     *
     * @return $this
     */
    public function setVerticalBorderChars(string $outside, string $inside = null) : self
    {
        $this->verticalOutsideBorderChar = $outside;
        $this->verticalInsideBorderChar = $inside ?? $outside;
        return $this;
    }
    /**
     * Gets border characters.
     *
     * @internal
     */
    public function getBorderChars() : array
    {
        return [$this->horizontalOutsideBorderChar, $this->verticalOutsideBorderChar, $this->horizontalInsideBorderChar, $this->verticalInsideBorderChar];
    }
    /**
     * Sets crossing characters.
     *
     * Example:
     * <code>
     * 1═══════════════2══════════════════════════2══════════════════3
     * ║ ISBN          │ Title                    │ Author           ║
     * 8'══════════════0'═════════════════════════0'═════════════════4'
     * ║ 99921-58-10-7 │ Divine Comedy            │ Dante Alighieri  ║
     * ║ 9971-5-0210-0 │ A Tale of Two Cities     │ Charles Dickens  ║
     * 8───────────────0──────────────────────────0──────────────────4
     * ║ 960-425-059-0 │ The Lord of the Rings    │ J. R. R. Tolkien ║
     * ║ 80-902734-1-6 │ And Then There Were None │ Agatha Christie  ║
     * 7═══════════════6══════════════════════════6══════════════════5
     * </code>
     *
     * @param string      $cross          Crossing char (see #0 of example)
     * @param string      $topLeft        Top left char (see #1 of example)
     * @param string      $topMid         Top mid char (see #2 of example)
     * @param string      $topRight       Top right char (see #3 of example)
     * @param string      $midRight       Mid right char (see #4 of example)
     * @param string      $bottomRight    Bottom right char (see #5 of example)
     * @param string      $bottomMid      Bottom mid char (see #6 of example)
     * @param string      $bottomLeft     Bottom left char (see #7 of example)
     * @param string      $midLeft        Mid left char (see #8 of example)
     * @param string|null $topLeftBottom  Top left bottom char (see #8' of example), equals to $midLeft if null
     * @param string|null $topMidBottom   Top mid bottom char (see #0' of example), equals to $cross if null
     * @param string|null $topRightBottom Top right bottom char (see #4' of example), equals to $midRight if null
     *
     * @return $this
     */
    public function setCrossingChars(string $cross, string $topLeft, string $topMid, string $topRight, string $midRight, string $bottomRight, string $bottomMid, string $bottomLeft, string $midLeft, string $topLeftBottom = null, string $topMidBottom = null, string $topRightBottom = null) : self
    {
        $this->crossingChar = $cross;
        $this->crossingTopLeftChar = $topLeft;
        $this->crossingTopMidChar = $topMid;
        $this->crossingTopRightChar = $topRight;
        $this->crossingMidRightChar = $midRight;
        $this->crossingBottomRightChar = $bottomRight;
        $this->crossingBottomMidChar = $bottomMid;
        $this->crossingBottomLeftChar = $bottomLeft;
        $this->crossingMidLeftChar = $midLeft;
        $this->crossingTopLeftBottomChar = $topLeftBottom ?? $midLeft;
        $this->crossingTopMidBottomChar = $topMidBottom ?? $cross;
        $this->crossingTopRightBottomChar = $topRightBottom ?? $midRight;
        return $this;
    }
    /**
     * Sets default crossing character used for each cross.
     *
     * @see {@link setCrossingChars()} for setting each crossing individually.
     */
    public function setDefaultCrossingChar(string $char) : self
    {
        return $this->setCrossingChars($char, $char, $char, $char, $char, $char, $char, $char, $char);
    }
    /**
     * Gets crossing character.
     *
     * @return string
     */
    public function getCrossingChar()
    {
        return $this->crossingChar;
    }
    /**
     * Gets crossing characters.
     *
     * @internal
     */
    public function getCrossingChars() : array
    {
        return [$this->crossingChar, $this->crossingTopLeftChar, $this->crossingTopMidChar, $this->crossingTopRightChar, $this->crossingMidRightChar, $this->crossingBottomRightChar, $this->crossingBottomMidChar, $this->crossingBottomLeftChar, $this->crossingMidLeftChar, $this->crossingTopLeftBottomChar, $this->crossingTopMidBottomChar, $this->crossingTopRightBottomChar];
    }
    /**
     * Sets header cell format.
     *
     * @return $this
     */
    public function setCellHeaderFormat(string $cellHeaderFormat)
    {
        $this->cellHeaderFormat = $cellHeaderFormat;
        return $this;
    }
    /**
     * Gets header cell format.
     *
     * @return string
     */
    public function getCellHeaderFormat()
    {
        return $this->cellHeaderFormat;
    }
    /**
     * Sets row cell format.
     *
     * @return $this
     */
    public function setCellRowFormat(string $cellRowFormat)
    {
        $this->cellRowFormat = $cellRowFormat;
        return $this;
    }
    /**
     * Gets row cell format.
     *
     * @return string
     */
    public function getCellRowFormat()
    {
        return $this->cellRowFormat;
    }
    /**
     * Sets row cell content format.
     *
     * @return $this
     */
    public function setCellRowContentFormat(string $cellRowContentFormat)
    {
        $this->cellRowContentFormat = $cellRowContentFormat;
        return $this;
    }
    /**
     * Gets row cell content format.
     *
     * @return string
     */
    public function getCellRowContentFormat()
    {
        return $this->cellRowContentFormat;
    }
    /**
     * Sets table border format.
     *
     * @return $this
     */
    public function setBorderFormat(string $borderFormat)
    {
        $this->borderFormat = $borderFormat;
        return $this;
    }
    /**
     * Gets table border format.
     *
     * @return string
     */
    public function getBorderFormat()
    {
        return $this->borderFormat;
    }
    /**
     * Sets cell padding type.
     *
     * @return $this
     */
    public function setPadType(int $padType)
    {
        if (!\in_array($padType, [\STR_PAD_LEFT, \STR_PAD_RIGHT, \STR_PAD_BOTH], \true)) {
            throw new InvalidArgumentException('Invalid padding type. Expected one of (STR_PAD_LEFT, STR_PAD_RIGHT, STR_PAD_BOTH).');
        }
        $this->padType = $padType;
        return $this;
    }
    /**
     * Gets cell padding type.
     *
     * @return int
     */
    public function getPadType()
    {
        return $this->padType;
    }
    public function getHeaderTitleFormat() : string
    {
        return $this->headerTitleFormat;
    }
    /**
     * @return $this
     */
    public function setHeaderTitleFormat(string $format) : self
    {
        $this->headerTitleFormat = $format;
        return $this;
    }
    public function getFooterTitleFormat() : string
    {
        return $this->footerTitleFormat;
    }
    /**
     * @return $this
     */
    public function setFooterTitleFormat(string $format) : self
    {
        $this->footerTitleFormat = $format;
        return $this;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\InvalidArgumentException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\LogicException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
/**
 * @author Kevin Bond <kevinbond@gmail.com>
 */
class ProgressIndicator
{
    private const FORMATS = ['normal' => ' %indicator% %message%', 'normal_no_ansi' => ' %message%', 'verbose' => ' %indicator% %message% (%elapsed:6s%)', 'verbose_no_ansi' => ' %message% (%elapsed:6s%)', 'very_verbose' => ' %indicator% %message% (%elapsed:6s%, %memory:6s%)', 'very_verbose_no_ansi' => ' %message% (%elapsed:6s%, %memory:6s%)'];
    private $output;
    private $startTime;
    private $format;
    private $message;
    private $indicatorValues;
    private $indicatorCurrent;
    private $indicatorChangeInterval;
    private $indicatorUpdateTime;
    private $started = \false;
    /**
     * @var array<string, callable>
     */
    private static $formatters;
    /**
     * @param int        $indicatorChangeInterval Change interval in milliseconds
     * @param array|null $indicatorValues         Animated indicator characters
     */
    public function __construct(OutputInterface $output, string $format = null, int $indicatorChangeInterval = 100, array $indicatorValues = null)
    {
        $this->output = $output;
        if (null === $format) {
            $format = $this->determineBestFormat();
        }
        if (null === $indicatorValues) {
            $indicatorValues = ['-', '\\', '|', '/'];
        }
        $indicatorValues = \array_values($indicatorValues);
        if (2 > \count($indicatorValues)) {
            throw new InvalidArgumentException('Must have at least 2 indicator value characters.');
        }
        $this->format = self::getFormatDefinition($format);
        $this->indicatorChangeInterval = $indicatorChangeInterval;
        $this->indicatorValues = $indicatorValues;
        $this->startTime = \time();
    }
    /**
     * Sets the current indicator message.
     */
    public function setMessage(?string $message)
    {
        $this->message = $message;
        $this->display();
    }
    /**
     * Starts the indicator output.
     */
    public function start(string $message)
    {
        if ($this->started) {
            throw new LogicException('Progress indicator already started.');
        }
        $this->message = $message;
        $this->started = \true;
        $this->startTime = \time();
        $this->indicatorUpdateTime = $this->getCurrentTimeInMilliseconds() + $this->indicatorChangeInterval;
        $this->indicatorCurrent = 0;
        $this->display();
    }
    /**
     * Advances the indicator.
     */
    public function advance()
    {
        if (!$this->started) {
            throw new LogicException('Progress indicator has not yet been started.');
        }
        if (!$this->output->isDecorated()) {
            return;
        }
        $currentTime = $this->getCurrentTimeInMilliseconds();
        if ($currentTime < $this->indicatorUpdateTime) {
            return;
        }
        $this->indicatorUpdateTime = $currentTime + $this->indicatorChangeInterval;
        ++$this->indicatorCurrent;
        $this->display();
    }
    /**
     * Finish the indicator with message.
     *
     * @param $message
     */
    public function finish(string $message)
    {
        if (!$this->started) {
            throw new LogicException('Progress indicator has not yet been started.');
        }
        $this->message = $message;
        $this->display();
        $this->output->writeln('');
        $this->started = \false;
    }
    /**
     * Gets the format for a given name.
     *
     * @return string|null
     */
    public static function getFormatDefinition(string $name)
    {
        return self::FORMATS[$name] ?? null;
    }
    /**
     * Sets a placeholder formatter for a given name.
     *
     * This method also allow you to override an existing placeholder.
     */
    public static function setPlaceholderFormatterDefinition(string $name, callable $callable)
    {
        if (!self::$formatters) {
            self::$formatters = self::initPlaceholderFormatters();
        }
        self::$formatters[$name] = $callable;
    }
    /**
     * Gets the placeholder formatter for a given name (including the delimiter char like %).
     *
     * @return callable|null
     */
    public static function getPlaceholderFormatterDefinition(string $name)
    {
        if (!self::$formatters) {
            self::$formatters = self::initPlaceholderFormatters();
        }
        return self::$formatters[$name] ?? null;
    }
    private function display()
    {
        if (OutputInterface::VERBOSITY_QUIET === $this->output->getVerbosity()) {
            return;
        }
        $this->overwrite(\preg_replace_callback("{%([a-z\\-_]+)(?:\\:([^%]+))?%}i", function ($matches) {
            if ($formatter = self::getPlaceholderFormatterDefinition($matches[1])) {
                return $formatter($this);
            }
            return $matches[0];
        }, $this->format ?? ''));
    }
    private function determineBestFormat() : string
    {
        switch ($this->output->getVerbosity()) {
            // OutputInterface::VERBOSITY_QUIET: display is disabled anyway
            case OutputInterface::VERBOSITY_VERBOSE:
                return $this->output->isDecorated() ? 'verbose' : 'verbose_no_ansi';
            case OutputInterface::VERBOSITY_VERY_VERBOSE:
            case OutputInterface::VERBOSITY_DEBUG:
                return $this->output->isDecorated() ? 'very_verbose' : 'very_verbose_no_ansi';
            default:
                return $this->output->isDecorated() ? 'normal' : 'normal_no_ansi';
        }
    }
    /**
     * Overwrites a previous message to the output.
     */
    private function overwrite(string $message)
    {
        if ($this->output->isDecorated()) {
            $this->output->write("\r\x1b[2K");
            $this->output->write($message);
        } else {
            $this->output->writeln($message);
        }
    }
    private function getCurrentTimeInMilliseconds() : float
    {
        return \round(\microtime(\true) * 1000);
    }
    private static function initPlaceholderFormatters() : array
    {
        return ['indicator' => function (self $indicator) {
            return $indicator->indicatorValues[$indicator->indicatorCurrent % \count($indicator->indicatorValues)];
        }, 'message' => function (self $indicator) {
            return $indicator->message;
        }, 'elapsed' => function (self $indicator) {
            return Helper::formatTime(\time() - $indicator->startTime);
        }, 'memory' => function () {
            return Helper::formatMemory(\memory_get_usage(\true));
        }];
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\ConsoleOutputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Process\Exception\ProcessFailedException;
use _PHPStan_dcc7b7cff\Symfony\Component\Process\Process;
/**
 * The ProcessHelper class provides helpers to run external processes.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 *
 * @final
 */
class ProcessHelper extends Helper
{
    /**
     * Runs an external process.
     *
     * @param array|Process $cmd      An instance of Process or an array of the command and arguments
     * @param callable|null $callback A PHP callback to run whenever there is some
     *                                output available on STDOUT or STDERR
     */
    public function run(OutputInterface $output, $cmd, string $error = null, callable $callback = null, int $verbosity = OutputInterface::VERBOSITY_VERY_VERBOSE) : Process
    {
        if (!\class_exists(Process::class)) {
            throw new \LogicException('The ProcessHelper cannot be run as the Process component is not installed. Try running "compose require symfony/process".');
        }
        if ($output instanceof ConsoleOutputInterface) {
            $output = $output->getErrorOutput();
        }
        $formatter = $this->getHelperSet()->get('debug_formatter');
        if ($cmd instanceof Process) {
            $cmd = [$cmd];
        }
        if (!\is_array($cmd)) {
            throw new \TypeError(\sprintf('The "command" argument of "%s()" must be an array or a "%s" instance, "%s" given.', __METHOD__, Process::class, \get_debug_type($cmd)));
        }
        if (\is_string($cmd[0] ?? null)) {
            $process = new Process($cmd);
            $cmd = [];
        } elseif (($cmd[0] ?? null) instanceof Process) {
            $process = $cmd[0];
            unset($cmd[0]);
        } else {
            throw new \InvalidArgumentException(\sprintf('Invalid command provided to "%s()": the command should be an array whose first element is either the path to the binary to run or a "Process" object.', __METHOD__));
        }
        if ($verbosity <= $output->getVerbosity()) {
            $output->write($formatter->start(\spl_object_hash($process), $this->escapeString($process->getCommandLine())));
        }
        if ($output->isDebug()) {
            $callback = $this->wrapCallback($output, $process, $callback);
        }
        $process->run($callback, $cmd);
        if ($verbosity <= $output->getVerbosity()) {
            $message = $process->isSuccessful() ? 'Command ran successfully' : \sprintf('%s Command did not run successfully', $process->getExitCode());
            $output->write($formatter->stop(\spl_object_hash($process), $message, $process->isSuccessful()));
        }
        if (!$process->isSuccessful() && null !== $error) {
            $output->writeln(\sprintf('<error>%s</error>', $this->escapeString($error)));
        }
        return $process;
    }
    /**
     * Runs the process.
     *
     * This is identical to run() except that an exception is thrown if the process
     * exits with a non-zero exit code.
     *
     * @param array|Process $cmd      An instance of Process or a command to run
     * @param callable|null $callback A PHP callback to run whenever there is some
     *                                output available on STDOUT or STDERR
     *
     * @throws ProcessFailedException
     *
     * @see run()
     */
    public function mustRun(OutputInterface $output, $cmd, string $error = null, callable $callback = null) : Process
    {
        $process = $this->run($output, $cmd, $error, $callback);
        if (!$process->isSuccessful()) {
            throw new ProcessFailedException($process);
        }
        return $process;
    }
    /**
     * Wraps a Process callback to add debugging output.
     */
    public function wrapCallback(OutputInterface $output, Process $process, callable $callback = null) : callable
    {
        if ($output instanceof ConsoleOutputInterface) {
            $output = $output->getErrorOutput();
        }
        $formatter = $this->getHelperSet()->get('debug_formatter');
        return function ($type, $buffer) use($output, $process, $callback, $formatter) {
            $output->write($formatter->progress(\spl_object_hash($process), $this->escapeString($buffer), Process::ERR === $type));
            if (null !== $callback) {
                $callback($type, $buffer);
            }
        };
    }
    private function escapeString(string $str) : string
    {
        return \str_replace('<', '\\<', $str);
    }
    /**
     * {@inheritdoc}
     */
    public function getName() : string
    {
        return 'process';
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Descriptor\DescriptorInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Descriptor\JsonDescriptor;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Descriptor\MarkdownDescriptor;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Descriptor\TextDescriptor;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Descriptor\XmlDescriptor;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\InvalidArgumentException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
/**
 * This class adds helper method to describe objects in various formats.
 *
 * @author Jean-François Simon <contact@jfsimon.fr>
 */
class DescriptorHelper extends Helper
{
    /**
     * @var DescriptorInterface[]
     */
    private $descriptors = [];
    public function __construct()
    {
        $this->register('txt', new TextDescriptor())->register('xml', new XmlDescriptor())->register('json', new JsonDescriptor())->register('md', new MarkdownDescriptor());
    }
    /**
     * Describes an object if supported.
     *
     * Available options are:
     * * format: string, the output format name
     * * raw_text: boolean, sets output type as raw
     *
     * @throws InvalidArgumentException when the given format is not supported
     */
    public function describe(OutputInterface $output, ?object $object, array $options = [])
    {
        $options = \array_merge(['raw_text' => \false, 'format' => 'txt'], $options);
        if (!isset($this->descriptors[$options['format']])) {
            throw new InvalidArgumentException(\sprintf('Unsupported format "%s".', $options['format']));
        }
        $descriptor = $this->descriptors[$options['format']];
        $descriptor->describe($output, $object, $options);
    }
    /**
     * Registers a descriptor.
     *
     * @return $this
     */
    public function register(string $format, DescriptorInterface $descriptor)
    {
        $this->descriptors[$format] = $descriptor;
        return $this;
    }
    /**
     * {@inheritdoc}
     */
    public function getName()
    {
        return 'descriptor';
    }
    public function getFormats() : array
    {
        return \array_keys($this->descriptors);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\VarDumper\Cloner\ClonerInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\VarDumper\Cloner\VarCloner;
use _PHPStan_dcc7b7cff\Symfony\Component\VarDumper\Dumper\CliDumper;
/**
 * @author Roland Franssen <franssen.roland@gmail.com>
 */
final class Dumper
{
    private $output;
    private $dumper;
    private $cloner;
    private $handler;
    public function __construct(OutputInterface $output, CliDumper $dumper = null, ClonerInterface $cloner = null)
    {
        $this->output = $output;
        $this->dumper = $dumper;
        $this->cloner = $cloner;
        if (\class_exists(CliDumper::class)) {
            $this->handler = function ($var) : string {
                $dumper = $this->dumper ?? ($this->dumper = new CliDumper(null, null, CliDumper::DUMP_LIGHT_ARRAY | CliDumper::DUMP_COMMA_SEPARATOR));
                $dumper->setColors($this->output->isDecorated());
                return \rtrim($dumper->dump(($this->cloner ?? ($this->cloner = new VarCloner()))->cloneVar($var)->withRefHandles(\false), \true));
            };
        } else {
            $this->handler = function ($var) : string {
                switch (\true) {
                    case null === $var:
                        return 'null';
                    case \true === $var:
                        return 'true';
                    case \false === $var:
                        return 'false';
                    case \is_string($var):
                        return '"' . $var . '"';
                    default:
                        return \rtrim(\print_r($var, \true));
                }
            };
        }
    }
    public function __invoke($var) : string
    {
        return ($this->handler)($var);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Cursor;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\MissingInputException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\RuntimeException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter\OutputFormatter;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter\OutputFormatterStyle;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\StreamableInputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\ConsoleOutputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\ConsoleSectionOutput;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Question\ChoiceQuestion;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Question\Question;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Terminal;
use function _PHPStan_dcc7b7cff\Symfony\Component\String\s;
/**
 * The QuestionHelper class provides helpers to interact with the user.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class QuestionHelper extends Helper
{
    /**
     * @var resource|null
     */
    private $inputStream;
    private static $stty = \true;
    private static $stdinIsInteractive;
    /**
     * Asks a question to the user.
     *
     * @return mixed The user answer
     *
     * @throws RuntimeException If there is no data to read in the input stream
     */
    public function ask(InputInterface $input, OutputInterface $output, Question $question)
    {
        if ($output instanceof ConsoleOutputInterface) {
            $output = $output->getErrorOutput();
        }
        if (!$input->isInteractive()) {
            return $this->getDefaultAnswer($question);
        }
        if ($input instanceof StreamableInputInterface && ($stream = $input->getStream())) {
            $this->inputStream = $stream;
        }
        try {
            if (!$question->getValidator()) {
                return $this->doAsk($output, $question);
            }
            $interviewer = function () use($output, $question) {
                return $this->doAsk($output, $question);
            };
            return $this->validateAttempts($interviewer, $output, $question);
        } catch (MissingInputException $exception) {
            $input->setInteractive(\false);
            if (null === ($fallbackOutput = $this->getDefaultAnswer($question))) {
                throw $exception;
            }
            return $fallbackOutput;
        }
    }
    /**
     * {@inheritdoc}
     */
    public function getName()
    {
        return 'question';
    }
    /**
     * Prevents usage of stty.
     */
    public static function disableStty()
    {
        self::$stty = \false;
    }
    /**
     * Asks the question to the user.
     *
     * @return mixed
     *
     * @throws RuntimeException In case the fallback is deactivated and the response cannot be hidden
     */
    private function doAsk(OutputInterface $output, Question $question)
    {
        $this->writePrompt($output, $question);
        $inputStream = $this->inputStream ?: \STDIN;
        $autocomplete = $question->getAutocompleterCallback();
        if (null === $autocomplete || !self::$stty || !Terminal::hasSttyAvailable()) {
            $ret = \false;
            if ($question->isHidden()) {
                try {
                    $hiddenResponse = $this->getHiddenResponse($output, $inputStream, $question->isTrimmable());
                    $ret = $question->isTrimmable() ? \trim($hiddenResponse) : $hiddenResponse;
                } catch (RuntimeException $e) {
                    if (!$question->isHiddenFallback()) {
                        throw $e;
                    }
                }
            }
            if (\false === $ret) {
                $ret = $this->readInput($inputStream, $question);
                if (\false === $ret) {
                    throw new MissingInputException('Aborted.');
                }
                if ($question->isTrimmable()) {
                    $ret = \trim($ret);
                }
            }
        } else {
            $autocomplete = $this->autocomplete($output, $question, $inputStream, $autocomplete);
            $ret = $question->isTrimmable() ? \trim($autocomplete) : $autocomplete;
        }
        if ($output instanceof ConsoleSectionOutput) {
            $output->addContent($ret);
        }
        $ret = \strlen($ret) > 0 ? $ret : $question->getDefault();
        if ($normalizer = $question->getNormalizer()) {
            return $normalizer($ret);
        }
        return $ret;
    }
    /**
     * @return mixed
     */
    private function getDefaultAnswer(Question $question)
    {
        $default = $question->getDefault();
        if (null === $default) {
            return $default;
        }
        if ($validator = $question->getValidator()) {
            return \call_user_func($question->getValidator(), $default);
        } elseif ($question instanceof ChoiceQuestion) {
            $choices = $question->getChoices();
            if (!$question->isMultiselect()) {
                return $choices[$default] ?? $default;
            }
            $default = \explode(',', $default);
            foreach ($default as $k => $v) {
                $v = $question->isTrimmable() ? \trim($v) : $v;
                $default[$k] = $choices[$v] ?? $v;
            }
        }
        return $default;
    }
    /**
     * Outputs the question prompt.
     */
    protected function writePrompt(OutputInterface $output, Question $question)
    {
        $message = $question->getQuestion();
        if ($question instanceof ChoiceQuestion) {
            $output->writeln(\array_merge([$question->getQuestion()], $this->formatChoiceQuestionChoices($question, 'info')));
            $message = $question->getPrompt();
        }
        $output->write($message);
    }
    /**
     * @return string[]
     */
    protected function formatChoiceQuestionChoices(ChoiceQuestion $question, string $tag)
    {
        $messages = [];
        $maxWidth = \max(\array_map([__CLASS__, 'width'], \array_keys($choices = $question->getChoices())));
        foreach ($choices as $key => $value) {
            $padding = \str_repeat(' ', $maxWidth - self::width($key));
            $messages[] = \sprintf("  [<{$tag}>%s{$padding}</{$tag}>] %s", $key, $value);
        }
        return $messages;
    }
    /**
     * Outputs an error message.
     */
    protected function writeError(OutputInterface $output, \Exception $error)
    {
        if (null !== $this->getHelperSet() && $this->getHelperSet()->has('formatter')) {
            $message = $this->getHelperSet()->get('formatter')->formatBlock($error->getMessage(), 'error');
        } else {
            $message = '<error>' . $error->getMessage() . '</error>';
        }
        $output->writeln($message);
    }
    /**
     * Autocompletes a question.
     *
     * @param resource $inputStream
     */
    private function autocomplete(OutputInterface $output, Question $question, $inputStream, callable $autocomplete) : string
    {
        $cursor = new Cursor($output, $inputStream);
        $fullChoice = '';
        $ret = '';
        $i = 0;
        $ofs = -1;
        $matches = $autocomplete($ret);
        $numMatches = \count($matches);
        $sttyMode = \shell_exec('stty -g');
        $isStdin = 'php://stdin' === (\stream_get_meta_data($inputStream)['uri'] ?? null);
        $r = [$inputStream];
        $w = [];
        // Disable icanon (so we can fread each keypress) and echo (we'll do echoing here instead)
        \shell_exec('stty -icanon -echo');
        // Add highlighted text style
        $output->getFormatter()->setStyle('hl', new OutputFormatterStyle('black', 'white'));
        // Read a keypress
        while (!\feof($inputStream)) {
            while ($isStdin && 0 === @\stream_select($r, $w, $w, 0, 100)) {
                // Give signal handlers a chance to run
                $r = [$inputStream];
            }
            $c = \fread($inputStream, 1);
            // as opposed to fgets(), fread() returns an empty string when the stream content is empty, not false.
            if (\false === $c || '' === $ret && '' === $c && null === $question->getDefault()) {
                \shell_exec('stty ' . $sttyMode);
                throw new MissingInputException('Aborted.');
            } elseif ("" === $c) {
                // Backspace Character
                if (0 === $numMatches && 0 !== $i) {
                    --$i;
                    $cursor->moveLeft(s($fullChoice)->slice(-1)->width(\false));
                    $fullChoice = self::substr($fullChoice, 0, $i);
                }
                if (0 === $i) {
                    $ofs = -1;
                    $matches = $autocomplete($ret);
                    $numMatches = \count($matches);
                } else {
                    $numMatches = 0;
                }
                // Pop the last character off the end of our string
                $ret = self::substr($ret, 0, $i);
            } elseif ("\x1b" === $c) {
                // Did we read an escape sequence?
                $c .= \fread($inputStream, 2);
                // A = Up Arrow. B = Down Arrow
                if (isset($c[2]) && ('A' === $c[2] || 'B' === $c[2])) {
                    if ('A' === $c[2] && -1 === $ofs) {
                        $ofs = 0;
                    }
                    if (0 === $numMatches) {
                        continue;
                    }
                    $ofs += 'A' === $c[2] ? -1 : 1;
                    $ofs = ($numMatches + $ofs) % $numMatches;
                }
            } elseif (\ord($c) < 32) {
                if ("\t" === $c || "\n" === $c) {
                    if ($numMatches > 0 && -1 !== $ofs) {
                        $ret = (string) $matches[$ofs];
                        // Echo out remaining chars for current match
                        $remainingCharacters = \substr($ret, \strlen(\trim($this->mostRecentlyEnteredValue($fullChoice))));
                        $output->write($remainingCharacters);
                        $fullChoice .= $remainingCharacters;
                        $i = \false === ($encoding = \mb_detect_encoding($fullChoice, null, \true)) ? \strlen($fullChoice) : \mb_strlen($fullChoice, $encoding);
                        $matches = \array_filter($autocomplete($ret), function ($match) use($ret) {
                            return '' === $ret || \str_starts_with($match, $ret);
                        });
                        $numMatches = \count($matches);
                        $ofs = -1;
                    }
                    if ("\n" === $c) {
                        $output->write($c);
                        break;
                    }
                    $numMatches = 0;
                }
                continue;
            } else {
                if ("\x80" <= $c) {
                    $c .= \fread($inputStream, ["\xc0" => 1, "\xd0" => 1, "\xe0" => 2, "\xf0" => 3][$c & "\xf0"]);
                }
                $output->write($c);
                $ret .= $c;
                $fullChoice .= $c;
                ++$i;
                $tempRet = $ret;
                if ($question instanceof ChoiceQuestion && $question->isMultiselect()) {
                    $tempRet = $this->mostRecentlyEnteredValue($fullChoice);
                }
                $numMatches = 0;
                $ofs = 0;
                foreach ($autocomplete($ret) as $value) {
                    // If typed characters match the beginning chunk of value (e.g. [AcmeDe]moBundle)
                    if (\str_starts_with($value, $tempRet)) {
                        $matches[$numMatches++] = $value;
                    }
                }
            }
            $cursor->clearLineAfter();
            if ($numMatches > 0 && -1 !== $ofs) {
                $cursor->savePosition();
                // Write highlighted text, complete the partially entered response
                $charactersEntered = \strlen(\trim($this->mostRecentlyEnteredValue($fullChoice)));
                $output->write('<hl>' . OutputFormatter::escapeTrailingBackslash(\substr($matches[$ofs], $charactersEntered)) . '</hl>');
                $cursor->restorePosition();
            }
        }
        // Reset stty so it behaves normally again
        \shell_exec('stty ' . $sttyMode);
        return $fullChoice;
    }
    private function mostRecentlyEnteredValue(string $entered) : string
    {
        // Determine the most recent value that the user entered
        if (!\str_contains($entered, ',')) {
            return $entered;
        }
        $choices = \explode(',', $entered);
        if ('' !== ($lastChoice = \trim($choices[\count($choices) - 1]))) {
            return $lastChoice;
        }
        return $entered;
    }
    /**
     * Gets a hidden response from user.
     *
     * @param resource $inputStream The handler resource
     * @param bool     $trimmable   Is the answer trimmable
     *
     * @throws RuntimeException In case the fallback is deactivated and the response cannot be hidden
     */
    private function getHiddenResponse(OutputInterface $output, $inputStream, bool $trimmable = \true) : string
    {
        if ('\\' === \DIRECTORY_SEPARATOR) {
            $exe = __DIR__ . '/../Resources/bin/hiddeninput.exe';
            // handle code running from a phar
            if ('phar:' === \substr(__FILE__, 0, 5)) {
                $tmpExe = \sys_get_temp_dir() . '/hiddeninput.exe';
                \copy($exe, $tmpExe);
                $exe = $tmpExe;
            }
            $sExec = \shell_exec('"' . $exe . '"');
            $value = $trimmable ? \rtrim($sExec) : $sExec;
            $output->writeln('');
            if (isset($tmpExe)) {
                \unlink($tmpExe);
            }
            return $value;
        }
        if (self::$stty && Terminal::hasSttyAvailable()) {
            $sttyMode = \shell_exec('stty -g');
            \shell_exec('stty -echo');
        } elseif ($this->isInteractiveInput($inputStream)) {
            throw new RuntimeException('Unable to hide the response.');
        }
        $value = \fgets($inputStream, 4096);
        if (self::$stty && Terminal::hasSttyAvailable()) {
            \shell_exec('stty ' . $sttyMode);
        }
        if (\false === $value) {
            throw new MissingInputException('Aborted.');
        }
        if ($trimmable) {
            $value = \trim($value);
        }
        $output->writeln('');
        return $value;
    }
    /**
     * Validates an attempt.
     *
     * @param callable $interviewer A callable that will ask for a question and return the result
     *
     * @return mixed The validated response
     *
     * @throws \Exception In case the max number of attempts has been reached and no valid response has been given
     */
    private function validateAttempts(callable $interviewer, OutputInterface $output, Question $question)
    {
        $error = null;
        $attempts = $question->getMaxAttempts();
        while (null === $attempts || $attempts--) {
            if (null !== $error) {
                $this->writeError($output, $error);
            }
            try {
                return $question->getValidator()($interviewer());
            } catch (RuntimeException $e) {
                throw $e;
            } catch (\Exception $error) {
            }
        }
        throw $error;
    }
    private function isInteractiveInput($inputStream) : bool
    {
        if ('php://stdin' !== (\stream_get_meta_data($inputStream)['uri'] ?? null)) {
            return \false;
        }
        if (null !== self::$stdinIsInteractive) {
            return self::$stdinIsInteractive;
        }
        if (\function_exists('stream_isatty')) {
            return self::$stdinIsInteractive = @\stream_isatty(\fopen('php://stdin', 'r'));
        }
        if (\function_exists('posix_isatty')) {
            return self::$stdinIsInteractive = @\posix_isatty(\fopen('php://stdin', 'r'));
        }
        if (!\function_exists('exec')) {
            return self::$stdinIsInteractive = \true;
        }
        \exec('stty 2> /dev/null', $output, $status);
        return self::$stdinIsInteractive = 1 !== $status;
    }
    /**
     * Reads one or more lines of input and returns what is read.
     *
     * @param resource $inputStream The handler resource
     * @param Question $question    The question being asked
     *
     * @return string|false The input received, false in case input could not be read
     */
    private function readInput($inputStream, Question $question)
    {
        if (!$question->isMultiline()) {
            $cp = $this->setIOCodepage();
            $ret = \fgets($inputStream, 4096);
            return $this->resetIOCodepage($cp, $ret);
        }
        $multiLineStreamReader = $this->cloneInputStream($inputStream);
        if (null === $multiLineStreamReader) {
            return \false;
        }
        $ret = '';
        $cp = $this->setIOCodepage();
        while (\false !== ($char = \fgetc($multiLineStreamReader))) {
            if (\PHP_EOL === "{$ret}{$char}") {
                break;
            }
            $ret .= $char;
        }
        return $this->resetIOCodepage($cp, $ret);
    }
    /**
     * Sets console I/O to the host code page.
     *
     * @return int Previous code page in IBM/EBCDIC format
     */
    private function setIOCodepage() : int
    {
        if (\function_exists('sapi_windows_cp_set')) {
            $cp = \sapi_windows_cp_get();
            \sapi_windows_cp_set(\sapi_windows_cp_get('oem'));
            return $cp;
        }
        return 0;
    }
    /**
     * Sets console I/O to the specified code page and converts the user input.
     *
     * @param string|false $input
     *
     * @return string|false
     */
    private function resetIOCodepage(int $cp, $input)
    {
        if (0 !== $cp) {
            \sapi_windows_cp_set($cp);
            if (\false !== $input && '' !== $input) {
                $input = \sapi_windows_cp_conv(\sapi_windows_cp_get('oem'), $cp, $input);
            }
        }
        return $input;
    }
    /**
     * Clones an input stream in order to act on one instance of the same
     * stream without affecting the other instance.
     *
     * @param resource $inputStream The handler resource
     *
     * @return resource|null The cloned resource, null in case it could not be cloned
     */
    private function cloneInputStream($inputStream)
    {
        $streamMetaData = \stream_get_meta_data($inputStream);
        $seekable = $streamMetaData['seekable'] ?? \false;
        $mode = $streamMetaData['mode'] ?? 'rb';
        $uri = $streamMetaData['uri'] ?? null;
        if (null === $uri) {
            return null;
        }
        $cloneStream = \fopen($uri, $mode);
        // For seekable and writable streams, add all the same data to the
        // cloned stream and then seek to the same offset.
        if (\true === $seekable && !\in_array($mode, ['r', 'rb', 'rt'])) {
            $offset = \ftell($inputStream);
            \rewind($inputStream);
            \stream_copy_to_stream($inputStream, $cloneStream);
            \fseek($inputStream, $offset);
            \fseek($cloneStream, $offset);
        }
        return $cloneStream;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper;

/**
 * Marks a row as being a separator.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class TableSeparator extends TableCell
{
    public function __construct(array $options = [])
    {
        parent::__construct('', $options);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\InvalidArgumentException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\RuntimeException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter\OutputFormatter;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter\WrappableOutputFormatterInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\ConsoleSectionOutput;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
/**
 * Provides helpers to display a table.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 * @author Саша Стаменковић <umpirsky@gmail.com>
 * @author Abdellatif Ait boudad <a.aitboudad@gmail.com>
 * @author Max Grigorian <maxakawizard@gmail.com>
 * @author Dany Maillard <danymaillard93b@gmail.com>
 */
class Table
{
    private const SEPARATOR_TOP = 0;
    private const SEPARATOR_TOP_BOTTOM = 1;
    private const SEPARATOR_MID = 2;
    private const SEPARATOR_BOTTOM = 3;
    private const BORDER_OUTSIDE = 0;
    private const BORDER_INSIDE = 1;
    private $headerTitle;
    private $footerTitle;
    /**
     * Table headers.
     */
    private $headers = [];
    /**
     * Table rows.
     */
    private $rows = [];
    private $horizontal = \false;
    /**
     * Column widths cache.
     */
    private $effectiveColumnWidths = [];
    /**
     * Number of columns cache.
     *
     * @var int
     */
    private $numberOfColumns;
    /**
     * @var OutputInterface
     */
    private $output;
    /**
     * @var TableStyle
     */
    private $style;
    /**
     * @var array
     */
    private $columnStyles = [];
    /**
     * User set column widths.
     *
     * @var array
     */
    private $columnWidths = [];
    private $columnMaxWidths = [];
    /**
     * @var array<string, TableStyle>|null
     */
    private static $styles;
    private $rendered = \false;
    public function __construct(OutputInterface $output)
    {
        $this->output = $output;
        if (!self::$styles) {
            self::$styles = self::initStyles();
        }
        $this->setStyle('default');
    }
    /**
     * Sets a style definition.
     */
    public static function setStyleDefinition(string $name, TableStyle $style)
    {
        if (!self::$styles) {
            self::$styles = self::initStyles();
        }
        self::$styles[$name] = $style;
    }
    /**
     * Gets a style definition by name.
     *
     * @return TableStyle
     */
    public static function getStyleDefinition(string $name)
    {
        if (!self::$styles) {
            self::$styles = self::initStyles();
        }
        if (isset(self::$styles[$name])) {
            return self::$styles[$name];
        }
        throw new InvalidArgumentException(\sprintf('Style "%s" is not defined.', $name));
    }
    /**
     * Sets table style.
     *
     * @param TableStyle|string $name The style name or a TableStyle instance
     *
     * @return $this
     */
    public function setStyle($name)
    {
        $this->style = $this->resolveStyle($name);
        return $this;
    }
    /**
     * Gets the current table style.
     *
     * @return TableStyle
     */
    public function getStyle()
    {
        return $this->style;
    }
    /**
     * Sets table column style.
     *
     * @param TableStyle|string $name The style name or a TableStyle instance
     *
     * @return $this
     */
    public function setColumnStyle(int $columnIndex, $name)
    {
        $this->columnStyles[$columnIndex] = $this->resolveStyle($name);
        return $this;
    }
    /**
     * Gets the current style for a column.
     *
     * If style was not set, it returns the global table style.
     *
     * @return TableStyle
     */
    public function getColumnStyle(int $columnIndex)
    {
        return $this->columnStyles[$columnIndex] ?? $this->getStyle();
    }
    /**
     * Sets the minimum width of a column.
     *
     * @return $this
     */
    public function setColumnWidth(int $columnIndex, int $width)
    {
        $this->columnWidths[$columnIndex] = $width;
        return $this;
    }
    /**
     * Sets the minimum width of all columns.
     *
     * @return $this
     */
    public function setColumnWidths(array $widths)
    {
        $this->columnWidths = [];
        foreach ($widths as $index => $width) {
            $this->setColumnWidth($index, $width);
        }
        return $this;
    }
    /**
     * Sets the maximum width of a column.
     *
     * Any cell within this column which contents exceeds the specified width will be wrapped into multiple lines, while
     * formatted strings are preserved.
     *
     * @return $this
     */
    public function setColumnMaxWidth(int $columnIndex, int $width) : self
    {
        if (!$this->output->getFormatter() instanceof WrappableOutputFormatterInterface) {
            throw new \LogicException(\sprintf('Setting a maximum column width is only supported when using a "%s" formatter, got "%s".', WrappableOutputFormatterInterface::class, \get_debug_type($this->output->getFormatter())));
        }
        $this->columnMaxWidths[$columnIndex] = $width;
        return $this;
    }
    /**
     * @return $this
     */
    public function setHeaders(array $headers)
    {
        $headers = \array_values($headers);
        if (!empty($headers) && !\is_array($headers[0])) {
            $headers = [$headers];
        }
        $this->headers = $headers;
        return $this;
    }
    public function setRows(array $rows)
    {
        $this->rows = [];
        return $this->addRows($rows);
    }
    /**
     * @return $this
     */
    public function addRows(array $rows)
    {
        foreach ($rows as $row) {
            $this->addRow($row);
        }
        return $this;
    }
    /**
     * @return $this
     */
    public function addRow($row)
    {
        if ($row instanceof TableSeparator) {
            $this->rows[] = $row;
            return $this;
        }
        if (!\is_array($row)) {
            throw new InvalidArgumentException('A row must be an array or a TableSeparator instance.');
        }
        $this->rows[] = \array_values($row);
        return $this;
    }
    /**
     * Adds a row to the table, and re-renders the table.
     *
     * @return $this
     */
    public function appendRow($row) : self
    {
        if (!$this->output instanceof ConsoleSectionOutput) {
            throw new RuntimeException(\sprintf('Output should be an instance of "%s" when calling "%s".', ConsoleSectionOutput::class, __METHOD__));
        }
        if ($this->rendered) {
            $this->output->clear($this->calculateRowCount());
        }
        $this->addRow($row);
        $this->render();
        return $this;
    }
    /**
     * @return $this
     */
    public function setRow($column, array $row)
    {
        $this->rows[$column] = $row;
        return $this;
    }
    /**
     * @return $this
     */
    public function setHeaderTitle(?string $title) : self
    {
        $this->headerTitle = $title;
        return $this;
    }
    /**
     * @return $this
     */
    public function setFooterTitle(?string $title) : self
    {
        $this->footerTitle = $title;
        return $this;
    }
    /**
     * @return $this
     */
    public function setHorizontal(bool $horizontal = \true) : self
    {
        $this->horizontal = $horizontal;
        return $this;
    }
    /**
     * Renders table to output.
     *
     * Example:
     *
     *     +---------------+-----------------------+------------------+
     *     | ISBN          | Title                 | Author           |
     *     +---------------+-----------------------+------------------+
     *     | 99921-58-10-7 | Divine Comedy         | Dante Alighieri  |
     *     | 9971-5-0210-0 | A Tale of Two Cities  | Charles Dickens  |
     *     | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien |
     *     +---------------+-----------------------+------------------+
     */
    public function render()
    {
        $divider = new TableSeparator();
        if ($this->horizontal) {
            $rows = [];
            foreach ($this->headers[0] ?? [] as $i => $header) {
                $rows[$i] = [$header];
                foreach ($this->rows as $row) {
                    if ($row instanceof TableSeparator) {
                        continue;
                    }
                    if (isset($row[$i])) {
                        $rows[$i][] = $row[$i];
                    } elseif ($rows[$i][0] instanceof TableCell && $rows[$i][0]->getColspan() >= 2) {
                        // Noop, there is a "title"
                    } else {
                        $rows[$i][] = null;
                    }
                }
            }
        } else {
            $rows = \array_merge($this->headers, [$divider], $this->rows);
        }
        $this->calculateNumberOfColumns($rows);
        $rowGroups = $this->buildTableRows($rows);
        $this->calculateColumnsWidth($rowGroups);
        $isHeader = !$this->horizontal;
        $isFirstRow = $this->horizontal;
        $hasTitle = (bool) $this->headerTitle;
        foreach ($rowGroups as $rowGroup) {
            $isHeaderSeparatorRendered = \false;
            foreach ($rowGroup as $row) {
                if ($divider === $row) {
                    $isHeader = \false;
                    $isFirstRow = \true;
                    continue;
                }
                if ($row instanceof TableSeparator) {
                    $this->renderRowSeparator();
                    continue;
                }
                if (!$row) {
                    continue;
                }
                if ($isHeader && !$isHeaderSeparatorRendered) {
                    $this->renderRowSeparator($isHeader ? self::SEPARATOR_TOP : self::SEPARATOR_TOP_BOTTOM, $hasTitle ? $this->headerTitle : null, $hasTitle ? $this->style->getHeaderTitleFormat() : null);
                    $hasTitle = \false;
                    $isHeaderSeparatorRendered = \true;
                }
                if ($isFirstRow) {
                    $this->renderRowSeparator($isHeader ? self::SEPARATOR_TOP : self::SEPARATOR_TOP_BOTTOM, $hasTitle ? $this->headerTitle : null, $hasTitle ? $this->style->getHeaderTitleFormat() : null);
                    $isFirstRow = \false;
                    $hasTitle = \false;
                }
                if ($this->horizontal) {
                    $this->renderRow($row, $this->style->getCellRowFormat(), $this->style->getCellHeaderFormat());
                } else {
                    $this->renderRow($row, $isHeader ? $this->style->getCellHeaderFormat() : $this->style->getCellRowFormat());
                }
            }
        }
        $this->renderRowSeparator(self::SEPARATOR_BOTTOM, $this->footerTitle, $this->style->getFooterTitleFormat());
        $this->cleanup();
        $this->rendered = \true;
    }
    /**
     * Renders horizontal header separator.
     *
     * Example:
     *
     *     +-----+-----------+-------+
     */
    private function renderRowSeparator(int $type = self::SEPARATOR_MID, string $title = null, string $titleFormat = null)
    {
        if (0 === ($count = $this->numberOfColumns)) {
            return;
        }
        $borders = $this->style->getBorderChars();
        if (!$borders[0] && !$borders[2] && !$this->style->getCrossingChar()) {
            return;
        }
        $crossings = $this->style->getCrossingChars();
        if (self::SEPARATOR_MID === $type) {
            [$horizontal, $leftChar, $midChar, $rightChar] = [$borders[2], $crossings[8], $crossings[0], $crossings[4]];
        } elseif (self::SEPARATOR_TOP === $type) {
            [$horizontal, $leftChar, $midChar, $rightChar] = [$borders[0], $crossings[1], $crossings[2], $crossings[3]];
        } elseif (self::SEPARATOR_TOP_BOTTOM === $type) {
            [$horizontal, $leftChar, $midChar, $rightChar] = [$borders[0], $crossings[9], $crossings[10], $crossings[11]];
        } else {
            [$horizontal, $leftChar, $midChar, $rightChar] = [$borders[0], $crossings[7], $crossings[6], $crossings[5]];
        }
        $markup = $leftChar;
        for ($column = 0; $column < $count; ++$column) {
            $markup .= \str_repeat($horizontal, $this->effectiveColumnWidths[$column]);
            $markup .= $column === $count - 1 ? $rightChar : $midChar;
        }
        if (null !== $title) {
            $titleLength = Helper::width(Helper::removeDecoration($formatter = $this->output->getFormatter(), $formattedTitle = \sprintf($titleFormat, $title)));
            $markupLength = Helper::width($markup);
            if ($titleLength > ($limit = $markupLength - 4)) {
                $titleLength = $limit;
                $formatLength = Helper::width(Helper::removeDecoration($formatter, \sprintf($titleFormat, '')));
                $formattedTitle = \sprintf($titleFormat, Helper::substr($title, 0, $limit - $formatLength - 3) . '...');
            }
            $titleStart = \intdiv($markupLength - $titleLength, 2);
            if (\false === \mb_detect_encoding($markup, null, \true)) {
                $markup = \substr_replace($markup, $formattedTitle, $titleStart, $titleLength);
            } else {
                $markup = \mb_substr($markup, 0, $titleStart) . $formattedTitle . \mb_substr($markup, $titleStart + $titleLength);
            }
        }
        $this->output->writeln(\sprintf($this->style->getBorderFormat(), $markup));
    }
    /**
     * Renders vertical column separator.
     */
    private function renderColumnSeparator(int $type = self::BORDER_OUTSIDE) : string
    {
        $borders = $this->style->getBorderChars();
        return \sprintf($this->style->getBorderFormat(), self::BORDER_OUTSIDE === $type ? $borders[1] : $borders[3]);
    }
    /**
     * Renders table row.
     *
     * Example:
     *
     *     | 9971-5-0210-0 | A Tale of Two Cities  | Charles Dickens  |
     */
    private function renderRow(array $row, string $cellFormat, string $firstCellFormat = null)
    {
        $rowContent = $this->renderColumnSeparator(self::BORDER_OUTSIDE);
        $columns = $this->getRowColumns($row);
        $last = \count($columns) - 1;
        foreach ($columns as $i => $column) {
            if ($firstCellFormat && 0 === $i) {
                $rowContent .= $this->renderCell($row, $column, $firstCellFormat);
            } else {
                $rowContent .= $this->renderCell($row, $column, $cellFormat);
            }
            $rowContent .= $this->renderColumnSeparator($last === $i ? self::BORDER_OUTSIDE : self::BORDER_INSIDE);
        }
        $this->output->writeln($rowContent);
    }
    /**
     * Renders table cell with padding.
     */
    private function renderCell(array $row, int $column, string $cellFormat) : string
    {
        $cell = $row[$column] ?? '';
        $width = $this->effectiveColumnWidths[$column];
        if ($cell instanceof TableCell && $cell->getColspan() > 1) {
            // add the width of the following columns(numbers of colspan).
            foreach (\range($column + 1, $column + $cell->getColspan() - 1) as $nextColumn) {
                $width += $this->getColumnSeparatorWidth() + $this->effectiveColumnWidths[$nextColumn];
            }
        }
        // str_pad won't work properly with multi-byte strings, we need to fix the padding
        if (\false !== ($encoding = \mb_detect_encoding($cell, null, \true))) {
            $width += \strlen($cell) - \mb_strwidth($cell, $encoding);
        }
        $style = $this->getColumnStyle($column);
        if ($cell instanceof TableSeparator) {
            return \sprintf($style->getBorderFormat(), \str_repeat($style->getBorderChars()[2], $width));
        }
        $width += Helper::length($cell) - Helper::length(Helper::removeDecoration($this->output->getFormatter(), $cell));
        $content = \sprintf($style->getCellRowContentFormat(), $cell);
        $padType = $style->getPadType();
        if ($cell instanceof TableCell && $cell->getStyle() instanceof TableCellStyle) {
            $isNotStyledByTag = !\preg_match('/^<(\\w+|(\\w+=[\\w,]+;?)*)>.+<\\/(\\w+|(\\w+=\\w+;?)*)?>$/', $cell);
            if ($isNotStyledByTag) {
                $cellFormat = $cell->getStyle()->getCellFormat();
                if (!\is_string($cellFormat)) {
                    $tag = \http_build_query($cell->getStyle()->getTagOptions(), '', ';');
                    $cellFormat = '<' . $tag . '>%s</>';
                }
                if (\strstr($content, '</>')) {
                    $content = \str_replace('</>', '', $content);
                    $width -= 3;
                }
                if (\strstr($content, '<fg=default;bg=default>')) {
                    $content = \str_replace('<fg=default;bg=default>', '', $content);
                    $width -= \strlen('<fg=default;bg=default>');
                }
            }
            $padType = $cell->getStyle()->getPadByAlign();
        }
        return \sprintf($cellFormat, \str_pad($content, $width, $style->getPaddingChar(), $padType));
    }
    /**
     * Calculate number of columns for this table.
     */
    private function calculateNumberOfColumns(array $rows)
    {
        $columns = [0];
        foreach ($rows as $row) {
            if ($row instanceof TableSeparator) {
                continue;
            }
            $columns[] = $this->getNumberOfColumns($row);
        }
        $this->numberOfColumns = \max($columns);
    }
    private function buildTableRows(array $rows) : TableRows
    {
        /** @var WrappableOutputFormatterInterface $formatter */
        $formatter = $this->output->getFormatter();
        $unmergedRows = [];
        for ($rowKey = 0; $rowKey < \count($rows); ++$rowKey) {
            $rows = $this->fillNextRows($rows, $rowKey);
            // Remove any new line breaks and replace it with a new line
            foreach ($rows[$rowKey] as $column => $cell) {
                $colspan = $cell instanceof TableCell ? $cell->getColspan() : 1;
                if (isset($this->columnMaxWidths[$column]) && Helper::width(Helper::removeDecoration($formatter, $cell)) > $this->columnMaxWidths[$column]) {
                    $cell = $formatter->formatAndWrap($cell, $this->columnMaxWidths[$column] * $colspan);
                }
                if (!\strstr($cell ?? '', "\n")) {
                    continue;
                }
                $escaped = \implode("\n", \array_map([OutputFormatter::class, 'escapeTrailingBackslash'], \explode("\n", $cell)));
                $cell = $cell instanceof TableCell ? new TableCell($escaped, ['colspan' => $cell->getColspan()]) : $escaped;
                $lines = \explode("\n", \str_replace("\n", "<fg=default;bg=default></>\n", $cell));
                foreach ($lines as $lineKey => $line) {
                    if ($colspan > 1) {
                        $line = new TableCell($line, ['colspan' => $colspan]);
                    }
                    if (0 === $lineKey) {
                        $rows[$rowKey][$column] = $line;
                    } else {
                        if (!\array_key_exists($rowKey, $unmergedRows) || !\array_key_exists($lineKey, $unmergedRows[$rowKey])) {
                            $unmergedRows[$rowKey][$lineKey] = $this->copyRow($rows, $rowKey);
                        }
                        $unmergedRows[$rowKey][$lineKey][$column] = $line;
                    }
                }
            }
        }
        return new TableRows(function () use($rows, $unmergedRows) : \Traversable {
            foreach ($rows as $rowKey => $row) {
                $rowGroup = [$row instanceof TableSeparator ? $row : $this->fillCells($row)];
                if (isset($unmergedRows[$rowKey])) {
                    foreach ($unmergedRows[$rowKey] as $row) {
                        $rowGroup[] = $row instanceof TableSeparator ? $row : $this->fillCells($row);
                    }
                }
                (yield $rowGroup);
            }
        });
    }
    private function calculateRowCount() : int
    {
        $numberOfRows = \count(\iterator_to_array($this->buildTableRows(\array_merge($this->headers, [new TableSeparator()], $this->rows))));
        if ($this->headers) {
            ++$numberOfRows;
            // Add row for header separator
        }
        if (\count($this->rows) > 0) {
            ++$numberOfRows;
            // Add row for footer separator
        }
        return $numberOfRows;
    }
    /**
     * fill rows that contains rowspan > 1.
     *
     * @throws InvalidArgumentException
     */
    private function fillNextRows(array $rows, int $line) : array
    {
        $unmergedRows = [];
        foreach ($rows[$line] as $column => $cell) {
            if (null !== $cell && !$cell instanceof TableCell && !\is_scalar($cell) && !(\is_object($cell) && \method_exists($cell, '__toString'))) {
                throw new InvalidArgumentException(\sprintf('A cell must be a TableCell, a scalar or an object implementing "__toString()", "%s" given.', \get_debug_type($cell)));
            }
            if ($cell instanceof TableCell && $cell->getRowspan() > 1) {
                $nbLines = $cell->getRowspan() - 1;
                $lines = [$cell];
                if (\strstr($cell, "\n")) {
                    $lines = \explode("\n", \str_replace("\n", "<fg=default;bg=default>\n</>", $cell));
                    $nbLines = \count($lines) > $nbLines ? \substr_count($cell, "\n") : $nbLines;
                    $rows[$line][$column] = new TableCell($lines[0], ['colspan' => $cell->getColspan(), 'style' => $cell->getStyle()]);
                    unset($lines[0]);
                }
                // create a two dimensional array (rowspan x colspan)
                $unmergedRows = \array_replace_recursive(\array_fill($line + 1, $nbLines, []), $unmergedRows);
                foreach ($unmergedRows as $unmergedRowKey => $unmergedRow) {
                    $value = $lines[$unmergedRowKey - $line] ?? '';
                    $unmergedRows[$unmergedRowKey][$column] = new TableCell($value, ['colspan' => $cell->getColspan(), 'style' => $cell->getStyle()]);
                    if ($nbLines === $unmergedRowKey - $line) {
                        break;
                    }
                }
            }
        }
        foreach ($unmergedRows as $unmergedRowKey => $unmergedRow) {
            // we need to know if $unmergedRow will be merged or inserted into $rows
            if (isset($rows[$unmergedRowKey]) && \is_array($rows[$unmergedRowKey]) && $this->getNumberOfColumns($rows[$unmergedRowKey]) + $this->getNumberOfColumns($unmergedRows[$unmergedRowKey]) <= $this->numberOfColumns) {
                foreach ($unmergedRow as $cellKey => $cell) {
                    // insert cell into row at cellKey position
                    \array_splice($rows[$unmergedRowKey], $cellKey, 0, [$cell]);
                }
            } else {
                $row = $this->copyRow($rows, $unmergedRowKey - 1);
                foreach ($unmergedRow as $column => $cell) {
                    if (!empty($cell)) {
                        $row[$column] = $unmergedRow[$column];
                    }
                }
                \array_splice($rows, $unmergedRowKey, 0, [$row]);
            }
        }
        return $rows;
    }
    /**
     * fill cells for a row that contains colspan > 1.
     */
    private function fillCells(iterable $row)
    {
        $newRow = [];
        foreach ($row as $column => $cell) {
            $newRow[] = $cell;
            if ($cell instanceof TableCell && $cell->getColspan() > 1) {
                foreach (\range($column + 1, $column + $cell->getColspan() - 1) as $position) {
                    // insert empty value at column position
                    $newRow[] = '';
                }
            }
        }
        return $newRow ?: $row;
    }
    private function copyRow(array $rows, int $line) : array
    {
        $row = $rows[$line];
        foreach ($row as $cellKey => $cellValue) {
            $row[$cellKey] = '';
            if ($cellValue instanceof TableCell) {
                $row[$cellKey] = new TableCell('', ['colspan' => $cellValue->getColspan()]);
            }
        }
        return $row;
    }
    /**
     * Gets number of columns by row.
     */
    private function getNumberOfColumns(array $row) : int
    {
        $columns = \count($row);
        foreach ($row as $column) {
            $columns += $column instanceof TableCell ? $column->getColspan() - 1 : 0;
        }
        return $columns;
    }
    /**
     * Gets list of columns for the given row.
     */
    private function getRowColumns(array $row) : array
    {
        $columns = \range(0, $this->numberOfColumns - 1);
        foreach ($row as $cellKey => $cell) {
            if ($cell instanceof TableCell && $cell->getColspan() > 1) {
                // exclude grouped columns.
                $columns = \array_diff($columns, \range($cellKey + 1, $cellKey + $cell->getColspan() - 1));
            }
        }
        return $columns;
    }
    /**
     * Calculates columns widths.
     */
    private function calculateColumnsWidth(iterable $groups)
    {
        for ($column = 0; $column < $this->numberOfColumns; ++$column) {
            $lengths = [];
            foreach ($groups as $group) {
                foreach ($group as $row) {
                    if ($row instanceof TableSeparator) {
                        continue;
                    }
                    foreach ($row as $i => $cell) {
                        if ($cell instanceof TableCell) {
                            $textContent = Helper::removeDecoration($this->output->getFormatter(), $cell);
                            $textLength = Helper::width($textContent);
                            if ($textLength > 0) {
                                $contentColumns = \mb_str_split($textContent, \ceil($textLength / $cell->getColspan()));
                                foreach ($contentColumns as $position => $content) {
                                    $row[$i + $position] = $content;
                                }
                            }
                        }
                    }
                    $lengths[] = $this->getCellWidth($row, $column);
                }
            }
            $this->effectiveColumnWidths[$column] = \max($lengths) + Helper::width($this->style->getCellRowContentFormat()) - 2;
        }
    }
    private function getColumnSeparatorWidth() : int
    {
        return Helper::width(\sprintf($this->style->getBorderFormat(), $this->style->getBorderChars()[3]));
    }
    private function getCellWidth(array $row, int $column) : int
    {
        $cellWidth = 0;
        if (isset($row[$column])) {
            $cell = $row[$column];
            $cellWidth = Helper::width(Helper::removeDecoration($this->output->getFormatter(), $cell));
        }
        $columnWidth = $this->columnWidths[$column] ?? 0;
        $cellWidth = \max($cellWidth, $columnWidth);
        return isset($this->columnMaxWidths[$column]) ? \min($this->columnMaxWidths[$column], $cellWidth) : $cellWidth;
    }
    /**
     * Called after rendering to cleanup cache data.
     */
    private function cleanup()
    {
        $this->effectiveColumnWidths = [];
        $this->numberOfColumns = null;
    }
    /**
     * @return array<string, TableStyle>
     */
    private static function initStyles() : array
    {
        $borderless = new TableStyle();
        $borderless->setHorizontalBorderChars('=')->setVerticalBorderChars(' ')->setDefaultCrossingChar(' ');
        $compact = new TableStyle();
        $compact->setHorizontalBorderChars('')->setVerticalBorderChars('')->setDefaultCrossingChar('')->setCellRowContentFormat('%s ');
        $styleGuide = new TableStyle();
        $styleGuide->setHorizontalBorderChars('-')->setVerticalBorderChars(' ')->setDefaultCrossingChar(' ')->setCellHeaderFormat('%s');
        $box = (new TableStyle())->setHorizontalBorderChars('─')->setVerticalBorderChars('│')->setCrossingChars('┼', '┌', '┬', '┐', '┤', '┘', '┴', '└', '├');
        $boxDouble = (new TableStyle())->setHorizontalBorderChars('═', '─')->setVerticalBorderChars('║', '│')->setCrossingChars('┼', '╔', '╤', '╗', '╢', '╝', '╧', '╚', '╟', '╠', '╪', '╣');
        return ['default' => new TableStyle(), 'borderless' => $borderless, 'compact' => $compact, 'symfony-style-guide' => $styleGuide, 'box' => $box, 'box-double' => $boxDouble];
    }
    private function resolveStyle($name) : TableStyle
    {
        if ($name instanceof TableStyle) {
            return $name;
        }
        if (isset(self::$styles[$name])) {
            return self::$styles[$name];
        }
        throw new InvalidArgumentException(\sprintf('Style "%s" is not defined.', $name));
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter\OutputFormatter;
/**
 * The Formatter class provides helpers to format messages.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class FormatterHelper extends Helper
{
    /**
     * Formats a message within a section.
     *
     * @return string
     */
    public function formatSection(string $section, string $message, string $style = 'info')
    {
        return \sprintf('<%s>[%s]</%s> %s', $style, $section, $style, $message);
    }
    /**
     * Formats a message as a block of text.
     *
     * @param string|array $messages The message to write in the block
     *
     * @return string
     */
    public function formatBlock($messages, string $style, bool $large = \false)
    {
        if (!\is_array($messages)) {
            $messages = [$messages];
        }
        $len = 0;
        $lines = [];
        foreach ($messages as $message) {
            $message = OutputFormatter::escape($message);
            $lines[] = \sprintf($large ? '  %s  ' : ' %s ', $message);
            $len = \max(self::width($message) + ($large ? 4 : 2), $len);
        }
        $messages = $large ? [\str_repeat(' ', $len)] : [];
        for ($i = 0; isset($lines[$i]); ++$i) {
            $messages[] = $lines[$i] . \str_repeat(' ', $len - self::width($lines[$i]));
        }
        if ($large) {
            $messages[] = \str_repeat(' ', $len);
        }
        for ($i = 0; isset($messages[$i]); ++$i) {
            $messages[$i] = \sprintf('<%s>%s</%s>', $style, $messages[$i], $style);
        }
        return \implode("\n", $messages);
    }
    /**
     * Truncates a message to the given length.
     *
     * @return string
     */
    public function truncate(string $message, int $length, string $suffix = '...')
    {
        $computedLength = $length - self::width($suffix);
        if ($computedLength > self::width($message)) {
            return $message;
        }
        return self::substr($message, 0, $length) . $suffix;
    }
    /**
     * {@inheritdoc}
     */
    public function getName()
    {
        return 'formatter';
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper;

/**
 * Helps outputting debug information when running an external program from a command.
 *
 * An external program can be a Process, an HTTP request, or anything else.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class DebugFormatterHelper extends Helper
{
    private const COLORS = ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'default'];
    private $started = [];
    private $count = -1;
    /**
     * Starts a debug formatting session.
     *
     * @return string
     */
    public function start(string $id, string $message, string $prefix = 'RUN')
    {
        $this->started[$id] = ['border' => ++$this->count % \count(self::COLORS)];
        return \sprintf("%s<bg=blue;fg=white> %s </> <fg=blue>%s</>\n", $this->getBorder($id), $prefix, $message);
    }
    /**
     * Adds progress to a formatting session.
     *
     * @return string
     */
    public function progress(string $id, string $buffer, bool $error = \false, string $prefix = 'OUT', string $errorPrefix = 'ERR')
    {
        $message = '';
        if ($error) {
            if (isset($this->started[$id]['out'])) {
                $message .= "\n";
                unset($this->started[$id]['out']);
            }
            if (!isset($this->started[$id]['err'])) {
                $message .= \sprintf('%s<bg=red;fg=white> %s </> ', $this->getBorder($id), $errorPrefix);
                $this->started[$id]['err'] = \true;
            }
            $message .= \str_replace("\n", \sprintf("\n%s<bg=red;fg=white> %s </> ", $this->getBorder($id), $errorPrefix), $buffer);
        } else {
            if (isset($this->started[$id]['err'])) {
                $message .= "\n";
                unset($this->started[$id]['err']);
            }
            if (!isset($this->started[$id]['out'])) {
                $message .= \sprintf('%s<bg=green;fg=white> %s </> ', $this->getBorder($id), $prefix);
                $this->started[$id]['out'] = \true;
            }
            $message .= \str_replace("\n", \sprintf("\n%s<bg=green;fg=white> %s </> ", $this->getBorder($id), $prefix), $buffer);
        }
        return $message;
    }
    /**
     * Stops a formatting session.
     *
     * @return string
     */
    public function stop(string $id, string $message, bool $successful, string $prefix = 'RES')
    {
        $trailingEOL = isset($this->started[$id]['out']) || isset($this->started[$id]['err']) ? "\n" : '';
        if ($successful) {
            return \sprintf("%s%s<bg=green;fg=white> %s </> <fg=green>%s</>\n", $trailingEOL, $this->getBorder($id), $prefix, $message);
        }
        $message = \sprintf("%s%s<bg=red;fg=white> %s </> <fg=red>%s</>\n", $trailingEOL, $this->getBorder($id), $prefix, $message);
        unset($this->started[$id]['out'], $this->started[$id]['err']);
        return $message;
    }
    private function getBorder(string $id) : string
    {
        return \sprintf('<bg=%s> </>', self::COLORS[$this->started[$id]['border']]);
    }
    /**
     * {@inheritdoc}
     */
    public function getName()
    {
        return 'debug_formatter';
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper;

/**
 * HelperInterface is the interface all helpers must implement.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
interface HelperInterface
{
    /**
     * Sets the helper set associated with this helper.
     */
    public function setHelperSet(HelperSet $helperSet = null);
    /**
     * Gets the helper set associated with this helper.
     *
     * @return HelperSet|null
     */
    public function getHelperSet();
    /**
     * Returns the canonical name of this helper.
     *
     * @return string
     */
    public function getName();
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\Command;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\InvalidArgumentException;
/**
 * HelperSet represents a set of helpers to be used with a command.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 *
 * @implements \IteratorAggregate<string, Helper>
 */
class HelperSet implements \IteratorAggregate
{
    /** @var array<string, Helper> */
    private $helpers = [];
    private $command;
    /**
     * @param Helper[] $helpers An array of helper
     */
    public function __construct(array $helpers = [])
    {
        foreach ($helpers as $alias => $helper) {
            $this->set($helper, \is_int($alias) ? null : $alias);
        }
    }
    public function set(HelperInterface $helper, string $alias = null)
    {
        $this->helpers[$helper->getName()] = $helper;
        if (null !== $alias) {
            $this->helpers[$alias] = $helper;
        }
        $helper->setHelperSet($this);
    }
    /**
     * Returns true if the helper if defined.
     *
     * @return bool
     */
    public function has(string $name)
    {
        return isset($this->helpers[$name]);
    }
    /**
     * Gets a helper value.
     *
     * @return HelperInterface
     *
     * @throws InvalidArgumentException if the helper is not defined
     */
    public function get(string $name)
    {
        if (!$this->has($name)) {
            throw new InvalidArgumentException(\sprintf('The helper "%s" is not defined.', $name));
        }
        return $this->helpers[$name];
    }
    /**
     * @deprecated since Symfony 5.4
     */
    public function setCommand(Command $command = null)
    {
        trigger_deprecation('symfony/console', '5.4', 'Method "%s()" is deprecated.', __METHOD__);
        $this->command = $command;
    }
    /**
     * Gets the command associated with this helper set.
     *
     * @return Command
     *
     * @deprecated since Symfony 5.4
     */
    public function getCommand()
    {
        trigger_deprecation('symfony/console', '5.4', 'Method "%s()" is deprecated.', __METHOD__);
        return $this->command;
    }
    /**
     * @return \Traversable<string, Helper>
     */
    #[\ReturnTypeWillChange]
    public function getIterator()
    {
        return new \ArrayIterator($this->helpers);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\InvalidArgumentException;
/**
 * @author Yewhen Khoptynskyi <khoptynskyi@gmail.com>
 */
class TableCellStyle
{
    public const DEFAULT_ALIGN = 'left';
    private const TAG_OPTIONS = ['fg', 'bg', 'options'];
    private const ALIGN_MAP = ['left' => \STR_PAD_RIGHT, 'center' => \STR_PAD_BOTH, 'right' => \STR_PAD_LEFT];
    private $options = ['fg' => 'default', 'bg' => 'default', 'options' => null, 'align' => self::DEFAULT_ALIGN, 'cellFormat' => null];
    public function __construct(array $options = [])
    {
        if ($diff = \array_diff(\array_keys($options), \array_keys($this->options))) {
            throw new InvalidArgumentException(\sprintf('The TableCellStyle does not support the following options: \'%s\'.', \implode('\', \'', $diff)));
        }
        if (isset($options['align']) && !\array_key_exists($options['align'], self::ALIGN_MAP)) {
            throw new InvalidArgumentException(\sprintf('Wrong align value. Value must be following: \'%s\'.', \implode('\', \'', \array_keys(self::ALIGN_MAP))));
        }
        $this->options = \array_merge($this->options, $options);
    }
    public function getOptions() : array
    {
        return $this->options;
    }
    /**
     * Gets options we need for tag for example fg, bg.
     *
     * @return string[]
     */
    public function getTagOptions()
    {
        return \array_filter($this->getOptions(), function ($key) {
            return \in_array($key, self::TAG_OPTIONS) && isset($this->options[$key]);
        }, \ARRAY_FILTER_USE_KEY);
    }
    /**
     * @return int
     */
    public function getPadByAlign()
    {
        return self::ALIGN_MAP[$this->getOptions()['align']];
    }
    public function getCellFormat() : ?string
    {
        return $this->getOptions()['cellFormat'];
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputAwareInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
/**
 * An implementation of InputAwareInterface for Helpers.
 *
 * @author Wouter J <waldio.webdesign@gmail.com>
 */
abstract class InputAwareHelper extends Helper implements InputAwareInterface
{
    protected $input;
    /**
     * {@inheritdoc}
     */
    public function setInput(InputInterface $input)
    {
        $this->input = $input;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception;

/**
 * ExceptionInterface.
 *
 * @author Jérôme Tamarelle <jerome@tamarelle.net>
 */
interface ExceptionInterface extends \Throwable
{
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception;

/**
 * @author Jérôme Tamarelle <jerome@tamarelle.net>
 */
class RuntimeException extends \RuntimeException implements ExceptionInterface
{
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception;

/**
 * Represents an incorrect command name typed in the console.
 *
 * @author Jérôme Tamarelle <jerome@tamarelle.net>
 */
class CommandNotFoundException extends \InvalidArgumentException implements ExceptionInterface
{
    private $alternatives;
    /**
     * @param string          $message      Exception message to throw
     * @param string[]        $alternatives List of similar defined names
     * @param int             $code         Exception code
     * @param \Throwable|null $previous     Previous exception used for the exception chaining
     */
    public function __construct(string $message, array $alternatives = [], int $code = 0, \Throwable $previous = null)
    {
        parent::__construct($message, $code, $previous);
        $this->alternatives = $alternatives;
    }
    /**
     * @return string[]
     */
    public function getAlternatives()
    {
        return $this->alternatives;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception;

/**
 * @author Jérôme Tamarelle <jerome@tamarelle.net>
 */
class LogicException extends \LogicException implements ExceptionInterface
{
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception;

/**
 * Represents failure to read input from stdin.
 *
 * @author Gabriel Ostrolucký <gabriel.ostrolucky@gmail.com>
 */
class MissingInputException extends RuntimeException implements ExceptionInterface
{
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception;

/**
 * Represents an incorrect option name or value typed in the console.
 *
 * @author Jérôme Tamarelle <jerome@tamarelle.net>
 */
class InvalidOptionException extends \InvalidArgumentException implements ExceptionInterface
{
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception;

/**
 * @author Jérôme Tamarelle <jerome@tamarelle.net>
 */
class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
{
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception;

/**
 * Represents an incorrect namespace typed in the console.
 *
 * @author Pierre du Plessis <pdples@gmail.com>
 */
class NamespaceNotFoundException extends CommandNotFoundException
{
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Style;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\InvalidArgumentException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\RuntimeException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter\OutputFormatter;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper\Helper;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper\ProgressBar;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper\SymfonyQuestionHelper;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper\Table;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper\TableCell;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper\TableSeparator;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\ConsoleOutputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\TrimmedBufferOutput;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Question\ChoiceQuestion;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Question\ConfirmationQuestion;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Question\Question;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Terminal;
/**
 * Output decorator helpers for the Symfony Style Guide.
 *
 * @author Kevin Bond <kevinbond@gmail.com>
 */
class SymfonyStyle extends OutputStyle
{
    public const MAX_LINE_LENGTH = 120;
    private $input;
    private $output;
    private $questionHelper;
    private $progressBar;
    private $lineLength;
    private $bufferedOutput;
    public function __construct(InputInterface $input, OutputInterface $output)
    {
        $this->input = $input;
        $this->bufferedOutput = new TrimmedBufferOutput(\DIRECTORY_SEPARATOR === '\\' ? 4 : 2, $output->getVerbosity(), \false, clone $output->getFormatter());
        // Windows cmd wraps lines as soon as the terminal width is reached, whether there are following chars or not.
        $width = (new Terminal())->getWidth() ?: self::MAX_LINE_LENGTH;
        $this->lineLength = \min($width - (int) (\DIRECTORY_SEPARATOR === '\\'), self::MAX_LINE_LENGTH);
        parent::__construct($this->output = $output);
    }
    /**
     * Formats a message as a block of text.
     *
     * @param string|array $messages The message to write in the block
     */
    public function block($messages, string $type = null, string $style = null, string $prefix = ' ', bool $padding = \false, bool $escape = \true)
    {
        $messages = \is_array($messages) ? \array_values($messages) : [$messages];
        $this->autoPrependBlock();
        $this->writeln($this->createBlock($messages, $type, $style, $prefix, $padding, $escape));
        $this->newLine();
    }
    /**
     * {@inheritdoc}
     */
    public function title(string $message)
    {
        $this->autoPrependBlock();
        $this->writeln([\sprintf('<comment>%s</>', OutputFormatter::escapeTrailingBackslash($message)), \sprintf('<comment>%s</>', \str_repeat('=', Helper::width(Helper::removeDecoration($this->getFormatter(), $message))))]);
        $this->newLine();
    }
    /**
     * {@inheritdoc}
     */
    public function section(string $message)
    {
        $this->autoPrependBlock();
        $this->writeln([\sprintf('<comment>%s</>', OutputFormatter::escapeTrailingBackslash($message)), \sprintf('<comment>%s</>', \str_repeat('-', Helper::width(Helper::removeDecoration($this->getFormatter(), $message))))]);
        $this->newLine();
    }
    /**
     * {@inheritdoc}
     */
    public function listing(array $elements)
    {
        $this->autoPrependText();
        $elements = \array_map(function ($element) {
            return \sprintf(' * %s', $element);
        }, $elements);
        $this->writeln($elements);
        $this->newLine();
    }
    /**
     * {@inheritdoc}
     */
    public function text($message)
    {
        $this->autoPrependText();
        $messages = \is_array($message) ? \array_values($message) : [$message];
        foreach ($messages as $message) {
            $this->writeln(\sprintf(' %s', $message));
        }
    }
    /**
     * Formats a command comment.
     *
     * @param string|array $message
     */
    public function comment($message)
    {
        $this->block($message, null, null, '<fg=default;bg=default> // </>', \false, \false);
    }
    /**
     * {@inheritdoc}
     */
    public function success($message)
    {
        $this->block($message, 'OK', 'fg=black;bg=green', ' ', \true);
    }
    /**
     * {@inheritdoc}
     */
    public function error($message)
    {
        $this->block($message, 'ERROR', 'fg=white;bg=red', ' ', \true);
    }
    /**
     * {@inheritdoc}
     */
    public function warning($message)
    {
        $this->block($message, 'WARNING', 'fg=black;bg=yellow', ' ', \true);
    }
    /**
     * {@inheritdoc}
     */
    public function note($message)
    {
        $this->block($message, 'NOTE', 'fg=yellow', ' ! ');
    }
    /**
     * Formats an info message.
     *
     * @param string|array $message
     */
    public function info($message)
    {
        $this->block($message, 'INFO', 'fg=green', ' ', \true);
    }
    /**
     * {@inheritdoc}
     */
    public function caution($message)
    {
        $this->block($message, 'CAUTION', 'fg=white;bg=red', ' ! ', \true);
    }
    /**
     * {@inheritdoc}
     */
    public function table(array $headers, array $rows)
    {
        $this->createTable()->setHeaders($headers)->setRows($rows)->render();
        $this->newLine();
    }
    /**
     * Formats a horizontal table.
     */
    public function horizontalTable(array $headers, array $rows)
    {
        $this->createTable()->setHorizontal(\true)->setHeaders($headers)->setRows($rows)->render();
        $this->newLine();
    }
    /**
     * Formats a list of key/value horizontally.
     *
     * Each row can be one of:
     * * 'A title'
     * * ['key' => 'value']
     * * new TableSeparator()
     *
     * @param string|array|TableSeparator ...$list
     */
    public function definitionList(...$list)
    {
        $headers = [];
        $row = [];
        foreach ($list as $value) {
            if ($value instanceof TableSeparator) {
                $headers[] = $value;
                $row[] = $value;
                continue;
            }
            if (\is_string($value)) {
                $headers[] = new TableCell($value, ['colspan' => 2]);
                $row[] = null;
                continue;
            }
            if (!\is_array($value)) {
                throw new InvalidArgumentException('Value should be an array, string, or an instance of TableSeparator.');
            }
            $headers[] = \key($value);
            $row[] = \current($value);
        }
        $this->horizontalTable($headers, [$row]);
    }
    /**
     * {@inheritdoc}
     */
    public function ask(string $question, string $default = null, callable $validator = null)
    {
        $question = new Question($question, $default);
        $question->setValidator($validator);
        return $this->askQuestion($question);
    }
    /**
     * {@inheritdoc}
     */
    public function askHidden(string $question, callable $validator = null)
    {
        $question = new Question($question);
        $question->setHidden(\true);
        $question->setValidator($validator);
        return $this->askQuestion($question);
    }
    /**
     * {@inheritdoc}
     */
    public function confirm(string $question, bool $default = \true)
    {
        return $this->askQuestion(new ConfirmationQuestion($question, $default));
    }
    /**
     * {@inheritdoc}
     */
    public function choice(string $question, array $choices, $default = null)
    {
        if (null !== $default) {
            $values = \array_flip($choices);
            $default = $values[$default] ?? $default;
        }
        return $this->askQuestion(new ChoiceQuestion($question, $choices, $default));
    }
    /**
     * {@inheritdoc}
     */
    public function progressStart(int $max = 0)
    {
        $this->progressBar = $this->createProgressBar($max);
        $this->progressBar->start();
    }
    /**
     * {@inheritdoc}
     */
    public function progressAdvance(int $step = 1)
    {
        $this->getProgressBar()->advance($step);
    }
    /**
     * {@inheritdoc}
     */
    public function progressFinish()
    {
        $this->getProgressBar()->finish();
        $this->newLine(2);
        $this->progressBar = null;
    }
    /**
     * {@inheritdoc}
     */
    public function createProgressBar(int $max = 0)
    {
        $progressBar = parent::createProgressBar($max);
        if ('\\' !== \DIRECTORY_SEPARATOR || 'Hyper' === \getenv('TERM_PROGRAM')) {
            $progressBar->setEmptyBarCharacter('░');
            // light shade character \u2591
            $progressBar->setProgressCharacter('');
            $progressBar->setBarCharacter('▓');
            // dark shade character \u2593
        }
        return $progressBar;
    }
    /**
     * @see ProgressBar::iterate()
     */
    public function progressIterate(iterable $iterable, int $max = null) : iterable
    {
        yield from $this->createProgressBar()->iterate($iterable, $max);
        $this->newLine(2);
    }
    /**
     * @return mixed
     */
    public function askQuestion(Question $question)
    {
        if ($this->input->isInteractive()) {
            $this->autoPrependBlock();
        }
        if (!$this->questionHelper) {
            $this->questionHelper = new SymfonyQuestionHelper();
        }
        $answer = $this->questionHelper->ask($this->input, $this, $question);
        if ($this->input->isInteractive()) {
            $this->newLine();
            $this->bufferedOutput->write("\n");
        }
        return $answer;
    }
    /**
     * {@inheritdoc}
     */
    public function writeln($messages, int $type = self::OUTPUT_NORMAL)
    {
        if (!\is_iterable($messages)) {
            $messages = [$messages];
        }
        foreach ($messages as $message) {
            parent::writeln($message, $type);
            $this->writeBuffer($message, \true, $type);
        }
    }
    /**
     * {@inheritdoc}
     */
    public function write($messages, bool $newline = \false, int $type = self::OUTPUT_NORMAL)
    {
        if (!\is_iterable($messages)) {
            $messages = [$messages];
        }
        foreach ($messages as $message) {
            parent::write($message, $newline, $type);
            $this->writeBuffer($message, $newline, $type);
        }
    }
    /**
     * {@inheritdoc}
     */
    public function newLine(int $count = 1)
    {
        parent::newLine($count);
        $this->bufferedOutput->write(\str_repeat("\n", $count));
    }
    /**
     * Returns a new instance which makes use of stderr if available.
     *
     * @return self
     */
    public function getErrorStyle()
    {
        return new self($this->input, $this->getErrorOutput());
    }
    public function createTable() : Table
    {
        $output = $this->output instanceof ConsoleOutputInterface ? $this->output->section() : $this->output;
        $style = clone Table::getStyleDefinition('symfony-style-guide');
        $style->setCellHeaderFormat('<info>%s</info>');
        return (new Table($output))->setStyle($style);
    }
    private function getProgressBar() : ProgressBar
    {
        if (!$this->progressBar) {
            throw new RuntimeException('The ProgressBar is not started.');
        }
        return $this->progressBar;
    }
    private function autoPrependBlock() : void
    {
        $chars = \substr(\str_replace(\PHP_EOL, "\n", $this->bufferedOutput->fetch()), -2);
        if (!isset($chars[0])) {
            $this->newLine();
            // empty history, so we should start with a new line.
            return;
        }
        // Prepend new line for each non LF chars (This means no blank line was output before)
        $this->newLine(2 - \substr_count($chars, "\n"));
    }
    private function autoPrependText() : void
    {
        $fetched = $this->bufferedOutput->fetch();
        // Prepend new line if last char isn't EOL:
        if (!\str_ends_with($fetched, "\n")) {
            $this->newLine();
        }
    }
    private function writeBuffer(string $message, bool $newLine, int $type) : void
    {
        // We need to know if the last chars are PHP_EOL
        $this->bufferedOutput->write($message, $newLine, $type);
    }
    private function createBlock(iterable $messages, string $type = null, string $style = null, string $prefix = ' ', bool $padding = \false, bool $escape = \false) : array
    {
        $indentLength = 0;
        $prefixLength = Helper::width(Helper::removeDecoration($this->getFormatter(), $prefix));
        $lines = [];
        if (null !== $type) {
            $type = \sprintf('[%s] ', $type);
            $indentLength = \strlen($type);
            $lineIndentation = \str_repeat(' ', $indentLength);
        }
        // wrap and add newlines for each element
        foreach ($messages as $key => $message) {
            if ($escape) {
                $message = OutputFormatter::escape($message);
            }
            $decorationLength = Helper::width($message) - Helper::width(Helper::removeDecoration($this->getFormatter(), $message));
            $messageLineLength = \min($this->lineLength - $prefixLength - $indentLength + $decorationLength, $this->lineLength);
            $messageLines = \explode(\PHP_EOL, \wordwrap($message, $messageLineLength, \PHP_EOL, \true));
            foreach ($messageLines as $messageLine) {
                $lines[] = $messageLine;
            }
            if (\count($messages) > 1 && $key < \count($messages) - 1) {
                $lines[] = '';
            }
        }
        $firstLineIndex = 0;
        if ($padding && $this->isDecorated()) {
            $firstLineIndex = 1;
            \array_unshift($lines, '');
            $lines[] = '';
        }
        foreach ($lines as $i => &$line) {
            if (null !== $type) {
                $line = $firstLineIndex === $i ? $type . $line : $lineIndentation . $line;
            }
            $line = $prefix . $line;
            $line .= \str_repeat(' ', \max($this->lineLength - Helper::width(Helper::removeDecoration($this->getFormatter(), $line)), 0));
            if ($style) {
                $line = \sprintf('<%s>%s</>', $style, $line);
            }
        }
        return $lines;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Style;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter\OutputFormatterInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper\ProgressBar;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\ConsoleOutputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
/**
 * Decorates output to add console style guide helpers.
 *
 * @author Kevin Bond <kevinbond@gmail.com>
 */
abstract class OutputStyle implements OutputInterface, StyleInterface
{
    private $output;
    public function __construct(OutputInterface $output)
    {
        $this->output = $output;
    }
    /**
     * {@inheritdoc}
     */
    public function newLine(int $count = 1)
    {
        $this->output->write(\str_repeat(\PHP_EOL, $count));
    }
    /**
     * @return ProgressBar
     */
    public function createProgressBar(int $max = 0)
    {
        return new ProgressBar($this->output, $max);
    }
    /**
     * {@inheritdoc}
     */
    public function write($messages, bool $newline = \false, int $type = self::OUTPUT_NORMAL)
    {
        $this->output->write($messages, $newline, $type);
    }
    /**
     * {@inheritdoc}
     */
    public function writeln($messages, int $type = self::OUTPUT_NORMAL)
    {
        $this->output->writeln($messages, $type);
    }
    /**
     * {@inheritdoc}
     */
    public function setVerbosity(int $level)
    {
        $this->output->setVerbosity($level);
    }
    /**
     * {@inheritdoc}
     */
    public function getVerbosity()
    {
        return $this->output->getVerbosity();
    }
    /**
     * {@inheritdoc}
     */
    public function setDecorated(bool $decorated)
    {
        $this->output->setDecorated($decorated);
    }
    /**
     * {@inheritdoc}
     */
    public function isDecorated()
    {
        return $this->output->isDecorated();
    }
    /**
     * {@inheritdoc}
     */
    public function setFormatter(OutputFormatterInterface $formatter)
    {
        $this->output->setFormatter($formatter);
    }
    /**
     * {@inheritdoc}
     */
    public function getFormatter()
    {
        return $this->output->getFormatter();
    }
    /**
     * {@inheritdoc}
     */
    public function isQuiet()
    {
        return $this->output->isQuiet();
    }
    /**
     * {@inheritdoc}
     */
    public function isVerbose()
    {
        return $this->output->isVerbose();
    }
    /**
     * {@inheritdoc}
     */
    public function isVeryVerbose()
    {
        return $this->output->isVeryVerbose();
    }
    /**
     * {@inheritdoc}
     */
    public function isDebug()
    {
        return $this->output->isDebug();
    }
    protected function getErrorOutput()
    {
        if (!$this->output instanceof ConsoleOutputInterface) {
            return $this->output;
        }
        return $this->output->getErrorOutput();
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Style;

/**
 * Output style helpers.
 *
 * @author Kevin Bond <kevinbond@gmail.com>
 */
interface StyleInterface
{
    /**
     * Formats a command title.
     */
    public function title(string $message);
    /**
     * Formats a section title.
     */
    public function section(string $message);
    /**
     * Formats a list.
     */
    public function listing(array $elements);
    /**
     * Formats informational text.
     *
     * @param string|array $message
     */
    public function text($message);
    /**
     * Formats a success result bar.
     *
     * @param string|array $message
     */
    public function success($message);
    /**
     * Formats an error result bar.
     *
     * @param string|array $message
     */
    public function error($message);
    /**
     * Formats an warning result bar.
     *
     * @param string|array $message
     */
    public function warning($message);
    /**
     * Formats a note admonition.
     *
     * @param string|array $message
     */
    public function note($message);
    /**
     * Formats a caution admonition.
     *
     * @param string|array $message
     */
    public function caution($message);
    /**
     * Formats a table.
     */
    public function table(array $headers, array $rows);
    /**
     * Asks a question.
     *
     * @return mixed
     */
    public function ask(string $question, string $default = null, callable $validator = null);
    /**
     * Asks a question with the user input hidden.
     *
     * @return mixed
     */
    public function askHidden(string $question, callable $validator = null);
    /**
     * Asks for confirmation.
     *
     * @return bool
     */
    public function confirm(string $question, bool $default = \true);
    /**
     * Asks a choice question.
     *
     * @param string|int|null $default
     *
     * @return mixed
     */
    public function choice(string $question, array $choices, $default = null);
    /**
     * Add newline(s).
     */
    public function newLine(int $count = 1);
    /**
     * Starts the progress output.
     */
    public function progressStart(int $max = 0);
    /**
     * Advances the progress output X steps.
     */
    public function progressAdvance(int $step = 1);
    /**
     * Finishes the progress output.
     */
    public function progressFinish();
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\Command;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\CompleteCommand;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\DumpCompletionCommand;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\HelpCommand;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\LazyCommand;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\ListCommand;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\SignalableCommandInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\CommandLoader\CommandLoaderInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Completion\CompletionInput;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Completion\CompletionSuggestions;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Event\ConsoleCommandEvent;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Event\ConsoleErrorEvent;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Event\ConsoleSignalEvent;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Event\ConsoleTerminateEvent;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\CommandNotFoundException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\ExceptionInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\LogicException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\NamespaceNotFoundException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Exception\RuntimeException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter\OutputFormatter;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper\DebugFormatterHelper;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper\FormatterHelper;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper\Helper;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper\HelperSet;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper\ProcessHelper;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper\QuestionHelper;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\ArgvInput;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\ArrayInput;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputArgument;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputAwareInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputDefinition;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputOption;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\ConsoleOutput;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\ConsoleOutputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\SignalRegistry\SignalRegistry;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Style\SymfonyStyle;
use _PHPStan_dcc7b7cff\Symfony\Component\ErrorHandler\ErrorHandler;
use _PHPStan_dcc7b7cff\Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use _PHPStan_dcc7b7cff\Symfony\Contracts\Service\ResetInterface;
/**
 * An Application is the container for a collection of commands.
 *
 * It is the main entry point of a Console application.
 *
 * This class is optimized for a standard CLI environment.
 *
 * Usage:
 *
 *     $app = new Application('myapp', '1.0 (stable)');
 *     $app->add(new SimpleCommand());
 *     $app->run();
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class Application implements ResetInterface
{
    private $commands = [];
    private $wantHelps = \false;
    private $runningCommand;
    private $name;
    private $version;
    private $commandLoader;
    private $catchExceptions = \true;
    private $autoExit = \true;
    private $definition;
    private $helperSet;
    private $dispatcher;
    private $terminal;
    private $defaultCommand;
    private $singleCommand = \false;
    private $initialized;
    private $signalRegistry;
    private $signalsToDispatchEvent = [];
    public function __construct(string $name = 'UNKNOWN', string $version = 'UNKNOWN')
    {
        $this->name = $name;
        $this->version = $version;
        $this->terminal = new Terminal();
        $this->defaultCommand = 'list';
        if (\defined('SIGINT') && SignalRegistry::isSupported()) {
            $this->signalRegistry = new SignalRegistry();
            $this->signalsToDispatchEvent = [\SIGINT, \SIGTERM, \SIGUSR1, \SIGUSR2];
        }
    }
    /**
     * @final
     */
    public function setDispatcher(EventDispatcherInterface $dispatcher)
    {
        $this->dispatcher = $dispatcher;
    }
    public function setCommandLoader(CommandLoaderInterface $commandLoader)
    {
        $this->commandLoader = $commandLoader;
    }
    public function getSignalRegistry() : SignalRegistry
    {
        if (!$this->signalRegistry) {
            throw new RuntimeException('Signals are not supported. Make sure that the `pcntl` extension is installed and that "pcntl_*" functions are not disabled by your php.ini\'s "disable_functions" directive.');
        }
        return $this->signalRegistry;
    }
    public function setSignalsToDispatchEvent(int ...$signalsToDispatchEvent)
    {
        $this->signalsToDispatchEvent = $signalsToDispatchEvent;
    }
    /**
     * Runs the current application.
     *
     * @return int 0 if everything went fine, or an error code
     *
     * @throws \Exception When running fails. Bypass this when {@link setCatchExceptions()}.
     */
    public function run(InputInterface $input = null, OutputInterface $output = null)
    {
        if (\function_exists('putenv')) {
            @\putenv('LINES=' . $this->terminal->getHeight());
            @\putenv('COLUMNS=' . $this->terminal->getWidth());
        }
        if (null === $input) {
            $input = new ArgvInput();
        }
        if (null === $output) {
            $output = new ConsoleOutput();
        }
        $renderException = function (\Throwable $e) use($output) {
            if ($output instanceof ConsoleOutputInterface) {
                $this->renderThrowable($e, $output->getErrorOutput());
            } else {
                $this->renderThrowable($e, $output);
            }
        };
        if ($phpHandler = \set_exception_handler($renderException)) {
            \restore_exception_handler();
            if (!\is_array($phpHandler) || !$phpHandler[0] instanceof ErrorHandler) {
                $errorHandler = \true;
            } elseif ($errorHandler = $phpHandler[0]->setExceptionHandler($renderException)) {
                $phpHandler[0]->setExceptionHandler($errorHandler);
            }
        }
        $this->configureIO($input, $output);
        try {
            $exitCode = $this->doRun($input, $output);
        } catch (\Exception $e) {
            if (!$this->catchExceptions) {
                throw $e;
            }
            $renderException($e);
            $exitCode = $e->getCode();
            if (\is_numeric($exitCode)) {
                $exitCode = (int) $exitCode;
                if ($exitCode <= 0) {
                    $exitCode = 1;
                }
            } else {
                $exitCode = 1;
            }
        } finally {
            // if the exception handler changed, keep it
            // otherwise, unregister $renderException
            if (!$phpHandler) {
                if (\set_exception_handler($renderException) === $renderException) {
                    \restore_exception_handler();
                }
                \restore_exception_handler();
            } elseif (!$errorHandler) {
                $finalHandler = $phpHandler[0]->setExceptionHandler(null);
                if ($finalHandler !== $renderException) {
                    $phpHandler[0]->setExceptionHandler($finalHandler);
                }
            }
        }
        if ($this->autoExit) {
            if ($exitCode > 255) {
                $exitCode = 255;
            }
            exit($exitCode);
        }
        return $exitCode;
    }
    /**
     * Runs the current application.
     *
     * @return int 0 if everything went fine, or an error code
     */
    public function doRun(InputInterface $input, OutputInterface $output)
    {
        if (\true === $input->hasParameterOption(['--version', '-V'], \true)) {
            $output->writeln($this->getLongVersion());
            return 0;
        }
        try {
            // Makes ArgvInput::getFirstArgument() able to distinguish an option from an argument.
            $input->bind($this->getDefinition());
        } catch (ExceptionInterface $e) {
            // Errors must be ignored, full binding/validation happens later when the command is known.
        }
        $name = $this->getCommandName($input);
        if (\true === $input->hasParameterOption(['--help', '-h'], \true)) {
            if (!$name) {
                $name = 'help';
                $input = new ArrayInput(['command_name' => $this->defaultCommand]);
            } else {
                $this->wantHelps = \true;
            }
        }
        if (!$name) {
            $name = $this->defaultCommand;
            $definition = $this->getDefinition();
            $definition->setArguments(\array_merge($definition->getArguments(), ['command' => new InputArgument('command', InputArgument::OPTIONAL, $definition->getArgument('command')->getDescription(), $name)]));
        }
        try {
            $this->runningCommand = null;
            // the command name MUST be the first element of the input
            $command = $this->find($name);
        } catch (\Throwable $e) {
            if (!($e instanceof CommandNotFoundException && !$e instanceof NamespaceNotFoundException) || 1 !== \count($alternatives = $e->getAlternatives()) || !$input->isInteractive()) {
                if (null !== $this->dispatcher) {
                    $event = new ConsoleErrorEvent($input, $output, $e);
                    $this->dispatcher->dispatch($event, ConsoleEvents::ERROR);
                    if (0 === $event->getExitCode()) {
                        return 0;
                    }
                    $e = $event->getError();
                }
                throw $e;
            }
            $alternative = $alternatives[0];
            $style = new SymfonyStyle($input, $output);
            $output->writeln('');
            $formattedBlock = (new FormatterHelper())->formatBlock(\sprintf('Command "%s" is not defined.', $name), 'error', \true);
            $output->writeln($formattedBlock);
            if (!$style->confirm(\sprintf('Do you want to run "%s" instead? ', $alternative), \false)) {
                if (null !== $this->dispatcher) {
                    $event = new ConsoleErrorEvent($input, $output, $e);
                    $this->dispatcher->dispatch($event, ConsoleEvents::ERROR);
                    return $event->getExitCode();
                }
                return 1;
            }
            $command = $this->find($alternative);
        }
        if ($command instanceof LazyCommand) {
            $command = $command->getCommand();
        }
        $this->runningCommand = $command;
        $exitCode = $this->doRunCommand($command, $input, $output);
        $this->runningCommand = null;
        return $exitCode;
    }
    /**
     * {@inheritdoc}
     */
    public function reset()
    {
    }
    public function setHelperSet(HelperSet $helperSet)
    {
        $this->helperSet = $helperSet;
    }
    /**
     * Get the helper set associated with the command.
     *
     * @return HelperSet
     */
    public function getHelperSet()
    {
        if (!$this->helperSet) {
            $this->helperSet = $this->getDefaultHelperSet();
        }
        return $this->helperSet;
    }
    public function setDefinition(InputDefinition $definition)
    {
        $this->definition = $definition;
    }
    /**
     * Gets the InputDefinition related to this Application.
     *
     * @return InputDefinition
     */
    public function getDefinition()
    {
        if (!$this->definition) {
            $this->definition = $this->getDefaultInputDefinition();
        }
        if ($this->singleCommand) {
            $inputDefinition = $this->definition;
            $inputDefinition->setArguments();
            return $inputDefinition;
        }
        return $this->definition;
    }
    /**
     * Adds suggestions to $suggestions for the current completion input (e.g. option or argument).
     */
    public function complete(CompletionInput $input, CompletionSuggestions $suggestions) : void
    {
        if (CompletionInput::TYPE_ARGUMENT_VALUE === $input->getCompletionType() && 'command' === $input->getCompletionName()) {
            $commandNames = [];
            foreach ($this->all() as $name => $command) {
                // skip hidden commands and aliased commands as they already get added below
                if ($command->isHidden() || $command->getName() !== $name) {
                    continue;
                }
                $commandNames[] = $command->getName();
                foreach ($command->getAliases() as $name) {
                    $commandNames[] = $name;
                }
            }
            $suggestions->suggestValues(\array_filter($commandNames));
            return;
        }
        if (CompletionInput::TYPE_OPTION_NAME === $input->getCompletionType()) {
            $suggestions->suggestOptions($this->getDefinition()->getOptions());
            return;
        }
    }
    /**
     * Gets the help message.
     *
     * @return string
     */
    public function getHelp()
    {
        return $this->getLongVersion();
    }
    /**
     * Gets whether to catch exceptions or not during commands execution.
     *
     * @return bool
     */
    public function areExceptionsCaught()
    {
        return $this->catchExceptions;
    }
    /**
     * Sets whether to catch exceptions or not during commands execution.
     */
    public function setCatchExceptions(bool $boolean)
    {
        $this->catchExceptions = $boolean;
    }
    /**
     * Gets whether to automatically exit after a command execution or not.
     *
     * @return bool
     */
    public function isAutoExitEnabled()
    {
        return $this->autoExit;
    }
    /**
     * Sets whether to automatically exit after a command execution or not.
     */
    public function setAutoExit(bool $boolean)
    {
        $this->autoExit = $boolean;
    }
    /**
     * Gets the name of the application.
     *
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }
    /**
     * Sets the application name.
     **/
    public function setName(string $name)
    {
        $this->name = $name;
    }
    /**
     * Gets the application version.
     *
     * @return string
     */
    public function getVersion()
    {
        return $this->version;
    }
    /**
     * Sets the application version.
     */
    public function setVersion(string $version)
    {
        $this->version = $version;
    }
    /**
     * Returns the long version of the application.
     *
     * @return string
     */
    public function getLongVersion()
    {
        if ('UNKNOWN' !== $this->getName()) {
            if ('UNKNOWN' !== $this->getVersion()) {
                return \sprintf('%s <info>%s</info>', $this->getName(), $this->getVersion());
            }
            return $this->getName();
        }
        return 'Console Tool';
    }
    /**
     * Registers a new command.
     *
     * @return Command
     */
    public function register(string $name)
    {
        return $this->add(new Command($name));
    }
    /**
     * Adds an array of command objects.
     *
     * If a Command is not enabled it will not be added.
     *
     * @param Command[] $commands An array of commands
     */
    public function addCommands(array $commands)
    {
        foreach ($commands as $command) {
            $this->add($command);
        }
    }
    /**
     * Adds a command object.
     *
     * If a command with the same name already exists, it will be overridden.
     * If the command is not enabled it will not be added.
     *
     * @return Command|null
     */
    public function add(Command $command)
    {
        $this->init();
        $command->setApplication($this);
        if (!$command->isEnabled()) {
            $command->setApplication(null);
            return null;
        }
        if (!$command instanceof LazyCommand) {
            // Will throw if the command is not correctly initialized.
            $command->getDefinition();
        }
        if (!$command->getName()) {
            throw new LogicException(\sprintf('The command defined in "%s" cannot have an empty name.', \get_debug_type($command)));
        }
        $this->commands[$command->getName()] = $command;
        foreach ($command->getAliases() as $alias) {
            $this->commands[$alias] = $command;
        }
        return $command;
    }
    /**
     * Returns a registered command by name or alias.
     *
     * @return Command
     *
     * @throws CommandNotFoundException When given command name does not exist
     */
    public function get(string $name)
    {
        $this->init();
        if (!$this->has($name)) {
            throw new CommandNotFoundException(\sprintf('The command "%s" does not exist.', $name));
        }
        // When the command has a different name than the one used at the command loader level
        if (!isset($this->commands[$name])) {
            throw new CommandNotFoundException(\sprintf('The "%s" command cannot be found because it is registered under multiple names. Make sure you don\'t set a different name via constructor or "setName()".', $name));
        }
        $command = $this->commands[$name];
        if ($this->wantHelps) {
            $this->wantHelps = \false;
            $helpCommand = $this->get('help');
            $helpCommand->setCommand($command);
            return $helpCommand;
        }
        return $command;
    }
    /**
     * Returns true if the command exists, false otherwise.
     *
     * @return bool
     */
    public function has(string $name)
    {
        $this->init();
        return isset($this->commands[$name]) || $this->commandLoader && $this->commandLoader->has($name) && $this->add($this->commandLoader->get($name));
    }
    /**
     * Returns an array of all unique namespaces used by currently registered commands.
     *
     * It does not return the global namespace which always exists.
     *
     * @return string[]
     */
    public function getNamespaces()
    {
        $namespaces = [];
        foreach ($this->all() as $command) {
            if ($command->isHidden()) {
                continue;
            }
            $namespaces[] = $this->extractAllNamespaces($command->getName());
            foreach ($command->getAliases() as $alias) {
                $namespaces[] = $this->extractAllNamespaces($alias);
            }
        }
        return \array_values(\array_unique(\array_filter(\array_merge([], ...$namespaces))));
    }
    /**
     * Finds a registered namespace by a name or an abbreviation.
     *
     * @return string
     *
     * @throws NamespaceNotFoundException When namespace is incorrect or ambiguous
     */
    public function findNamespace(string $namespace)
    {
        $allNamespaces = $this->getNamespaces();
        $expr = \implode('[^:]*:', \array_map('preg_quote', \explode(':', $namespace))) . '[^:]*';
        $namespaces = \preg_grep('{^' . $expr . '}', $allNamespaces);
        if (empty($namespaces)) {
            $message = \sprintf('There are no commands defined in the "%s" namespace.', $namespace);
            if ($alternatives = $this->findAlternatives($namespace, $allNamespaces)) {
                if (1 == \count($alternatives)) {
                    $message .= "\n\nDid you mean this?\n    ";
                } else {
                    $message .= "\n\nDid you mean one of these?\n    ";
                }
                $message .= \implode("\n    ", $alternatives);
            }
            throw new NamespaceNotFoundException($message, $alternatives);
        }
        $exact = \in_array($namespace, $namespaces, \true);
        if (\count($namespaces) > 1 && !$exact) {
            throw new NamespaceNotFoundException(\sprintf("The namespace \"%s\" is ambiguous.\nDid you mean one of these?\n%s.", $namespace, $this->getAbbreviationSuggestions(\array_values($namespaces))), \array_values($namespaces));
        }
        return $exact ? $namespace : \reset($namespaces);
    }
    /**
     * Finds a command by name or alias.
     *
     * Contrary to get, this command tries to find the best
     * match if you give it an abbreviation of a name or alias.
     *
     * @return Command
     *
     * @throws CommandNotFoundException When command name is incorrect or ambiguous
     */
    public function find(string $name)
    {
        $this->init();
        $aliases = [];
        foreach ($this->commands as $command) {
            foreach ($command->getAliases() as $alias) {
                if (!$this->has($alias)) {
                    $this->commands[$alias] = $command;
                }
            }
        }
        if ($this->has($name)) {
            return $this->get($name);
        }
        $allCommands = $this->commandLoader ? \array_merge($this->commandLoader->getNames(), \array_keys($this->commands)) : \array_keys($this->commands);
        $expr = \implode('[^:]*:', \array_map('preg_quote', \explode(':', $name))) . '[^:]*';
        $commands = \preg_grep('{^' . $expr . '}', $allCommands);
        if (empty($commands)) {
            $commands = \preg_grep('{^' . $expr . '}i', $allCommands);
        }
        // if no commands matched or we just matched namespaces
        if (empty($commands) || \count(\preg_grep('{^' . $expr . '$}i', $commands)) < 1) {
            if (\false !== ($pos = \strrpos($name, ':'))) {
                // check if a namespace exists and contains commands
                $this->findNamespace(\substr($name, 0, $pos));
            }
            $message = \sprintf('Command "%s" is not defined.', $name);
            if ($alternatives = $this->findAlternatives($name, $allCommands)) {
                // remove hidden commands
                $alternatives = \array_filter($alternatives, function ($name) {
                    return !$this->get($name)->isHidden();
                });
                if (1 == \count($alternatives)) {
                    $message .= "\n\nDid you mean this?\n    ";
                } else {
                    $message .= "\n\nDid you mean one of these?\n    ";
                }
                $message .= \implode("\n    ", $alternatives);
            }
            throw new CommandNotFoundException($message, \array_values($alternatives));
        }
        // filter out aliases for commands which are already on the list
        if (\count($commands) > 1) {
            $commandList = $this->commandLoader ? \array_merge(\array_flip($this->commandLoader->getNames()), $this->commands) : $this->commands;
            $commands = \array_unique(\array_filter($commands, function ($nameOrAlias) use(&$commandList, $commands, &$aliases) {
                if (!$commandList[$nameOrAlias] instanceof Command) {
                    $commandList[$nameOrAlias] = $this->commandLoader->get($nameOrAlias);
                }
                $commandName = $commandList[$nameOrAlias]->getName();
                $aliases[$nameOrAlias] = $commandName;
                return $commandName === $nameOrAlias || !\in_array($commandName, $commands);
            }));
        }
        if (\count($commands) > 1) {
            $usableWidth = $this->terminal->getWidth() - 10;
            $abbrevs = \array_values($commands);
            $maxLen = 0;
            foreach ($abbrevs as $abbrev) {
                $maxLen = \max(Helper::width($abbrev), $maxLen);
            }
            $abbrevs = \array_map(function ($cmd) use($commandList, $usableWidth, $maxLen, &$commands) {
                if ($commandList[$cmd]->isHidden()) {
                    unset($commands[\array_search($cmd, $commands)]);
                    return \false;
                }
                $abbrev = \str_pad($cmd, $maxLen, ' ') . ' ' . $commandList[$cmd]->getDescription();
                return Helper::width($abbrev) > $usableWidth ? Helper::substr($abbrev, 0, $usableWidth - 3) . '...' : $abbrev;
            }, \array_values($commands));
            if (\count($commands) > 1) {
                $suggestions = $this->getAbbreviationSuggestions(\array_filter($abbrevs));
                throw new CommandNotFoundException(\sprintf("Command \"%s\" is ambiguous.\nDid you mean one of these?\n%s.", $name, $suggestions), \array_values($commands));
            }
        }
        $command = $this->get(\reset($commands));
        if ($command->isHidden()) {
            throw new CommandNotFoundException(\sprintf('The command "%s" does not exist.', $name));
        }
        return $command;
    }
    /**
     * Gets the commands (registered in the given namespace if provided).
     *
     * The array keys are the full names and the values the command instances.
     *
     * @return Command[]
     */
    public function all(string $namespace = null)
    {
        $this->init();
        if (null === $namespace) {
            if (!$this->commandLoader) {
                return $this->commands;
            }
            $commands = $this->commands;
            foreach ($this->commandLoader->getNames() as $name) {
                if (!isset($commands[$name]) && $this->has($name)) {
                    $commands[$name] = $this->get($name);
                }
            }
            return $commands;
        }
        $commands = [];
        foreach ($this->commands as $name => $command) {
            if ($namespace === $this->extractNamespace($name, \substr_count($namespace, ':') + 1)) {
                $commands[$name] = $command;
            }
        }
        if ($this->commandLoader) {
            foreach ($this->commandLoader->getNames() as $name) {
                if (!isset($commands[$name]) && $namespace === $this->extractNamespace($name, \substr_count($namespace, ':') + 1) && $this->has($name)) {
                    $commands[$name] = $this->get($name);
                }
            }
        }
        return $commands;
    }
    /**
     * Returns an array of possible abbreviations given a set of names.
     *
     * @return string[][]
     */
    public static function getAbbreviations(array $names)
    {
        $abbrevs = [];
        foreach ($names as $name) {
            for ($len = \strlen($name); $len > 0; --$len) {
                $abbrev = \substr($name, 0, $len);
                $abbrevs[$abbrev][] = $name;
            }
        }
        return $abbrevs;
    }
    public function renderThrowable(\Throwable $e, OutputInterface $output) : void
    {
        $output->writeln('', OutputInterface::VERBOSITY_QUIET);
        $this->doRenderThrowable($e, $output);
        if (null !== $this->runningCommand) {
            $output->writeln(\sprintf('<info>%s</info>', OutputFormatter::escape(\sprintf($this->runningCommand->getSynopsis(), $this->getName()))), OutputInterface::VERBOSITY_QUIET);
            $output->writeln('', OutputInterface::VERBOSITY_QUIET);
        }
    }
    protected function doRenderThrowable(\Throwable $e, OutputInterface $output) : void
    {
        do {
            $message = \trim($e->getMessage());
            if ('' === $message || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
                $class = \get_debug_type($e);
                $title = \sprintf('  [%s%s]  ', $class, 0 !== ($code = $e->getCode()) ? ' (' . $code . ')' : '');
                $len = Helper::width($title);
            } else {
                $len = 0;
            }
            if (\str_contains($message, "@anonymous\x00")) {
                $message = \preg_replace_callback('/[a-zA-Z_\\x7f-\\xff][\\\\a-zA-Z0-9_\\x7f-\\xff]*+@anonymous\\x00.*?\\.php(?:0x?|:[0-9]++\\$)[0-9a-fA-F]++/', function ($m) {
                    return \class_exists($m[0], \false) ? ((\get_parent_class($m[0]) ?: \key(\class_implements($m[0]))) ?: 'class') . '@anonymous' : $m[0];
                }, $message);
            }
            $width = $this->terminal->getWidth() ? $this->terminal->getWidth() - 1 : \PHP_INT_MAX;
            $lines = [];
            foreach ('' !== $message ? \preg_split('/\\r?\\n/', $message) : [] as $line) {
                foreach ($this->splitStringByWidth($line, $width - 4) as $line) {
                    // pre-format lines to get the right string length
                    $lineLength = Helper::width($line) + 4;
                    $lines[] = [$line, $lineLength];
                    $len = \max($lineLength, $len);
                }
            }
            $messages = [];
            if (!$e instanceof ExceptionInterface || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
                $messages[] = \sprintf('<comment>%s</comment>', OutputFormatter::escape(\sprintf('In %s line %s:', \basename($e->getFile()) ?: 'n/a', $e->getLine() ?: 'n/a')));
            }
            $messages[] = $emptyLine = \sprintf('<error>%s</error>', \str_repeat(' ', $len));
            if ('' === $message || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
                $messages[] = \sprintf('<error>%s%s</error>', $title, \str_repeat(' ', \max(0, $len - Helper::width($title))));
            }
            foreach ($lines as $line) {
                $messages[] = \sprintf('<error>  %s  %s</error>', OutputFormatter::escape($line[0]), \str_repeat(' ', $len - $line[1]));
            }
            $messages[] = $emptyLine;
            $messages[] = '';
            $output->writeln($messages, OutputInterface::VERBOSITY_QUIET);
            if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
                $output->writeln('<comment>Exception trace:</comment>', OutputInterface::VERBOSITY_QUIET);
                // exception related properties
                $trace = $e->getTrace();
                \array_unshift($trace, ['function' => '', 'file' => $e->getFile() ?: 'n/a', 'line' => $e->getLine() ?: 'n/a', 'args' => []]);
                for ($i = 0, $count = \count($trace); $i < $count; ++$i) {
                    $class = $trace[$i]['class'] ?? '';
                    $type = $trace[$i]['type'] ?? '';
                    $function = $trace[$i]['function'] ?? '';
                    $file = $trace[$i]['file'] ?? 'n/a';
                    $line = $trace[$i]['line'] ?? 'n/a';
                    $output->writeln(\sprintf(' %s%s at <info>%s:%s</info>', $class, $function ? $type . $function . '()' : '', $file, $line), OutputInterface::VERBOSITY_QUIET);
                }
                $output->writeln('', OutputInterface::VERBOSITY_QUIET);
            }
        } while ($e = $e->getPrevious());
    }
    /**
     * Configures the input and output instances based on the user arguments and options.
     */
    protected function configureIO(InputInterface $input, OutputInterface $output)
    {
        if (\true === $input->hasParameterOption(['--ansi'], \true)) {
            $output->setDecorated(\true);
        } elseif (\true === $input->hasParameterOption(['--no-ansi'], \true)) {
            $output->setDecorated(\false);
        }
        if (\true === $input->hasParameterOption(['--no-interaction', '-n'], \true)) {
            $input->setInteractive(\false);
        }
        switch ($shellVerbosity = (int) \getenv('SHELL_VERBOSITY')) {
            case -1:
                $output->setVerbosity(OutputInterface::VERBOSITY_QUIET);
                break;
            case 1:
                $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE);
                break;
            case 2:
                $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE);
                break;
            case 3:
                $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG);
                break;
            default:
                $shellVerbosity = 0;
                break;
        }
        if (\true === $input->hasParameterOption(['--quiet', '-q'], \true)) {
            $output->setVerbosity(OutputInterface::VERBOSITY_QUIET);
            $shellVerbosity = -1;
        } else {
            if ($input->hasParameterOption('-vvv', \true) || $input->hasParameterOption('--verbose=3', \true) || 3 === $input->getParameterOption('--verbose', \false, \true)) {
                $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG);
                $shellVerbosity = 3;
            } elseif ($input->hasParameterOption('-vv', \true) || $input->hasParameterOption('--verbose=2', \true) || 2 === $input->getParameterOption('--verbose', \false, \true)) {
                $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE);
                $shellVerbosity = 2;
            } elseif ($input->hasParameterOption('-v', \true) || $input->hasParameterOption('--verbose=1', \true) || $input->hasParameterOption('--verbose', \true) || $input->getParameterOption('--verbose', \false, \true)) {
                $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE);
                $shellVerbosity = 1;
            }
        }
        if (-1 === $shellVerbosity) {
            $input->setInteractive(\false);
        }
        if (\function_exists('putenv')) {
            @\putenv('SHELL_VERBOSITY=' . $shellVerbosity);
        }
        $_ENV['SHELL_VERBOSITY'] = $shellVerbosity;
        $_SERVER['SHELL_VERBOSITY'] = $shellVerbosity;
    }
    /**
     * Runs the current command.
     *
     * If an event dispatcher has been attached to the application,
     * events are also dispatched during the life-cycle of the command.
     *
     * @return int 0 if everything went fine, or an error code
     */
    protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output)
    {
        foreach ($command->getHelperSet() as $helper) {
            if ($helper instanceof InputAwareInterface) {
                $helper->setInput($input);
            }
        }
        if ($this->signalsToDispatchEvent) {
            $commandSignals = $command instanceof SignalableCommandInterface ? $command->getSubscribedSignals() : [];
            if ($commandSignals || null !== $this->dispatcher) {
                if (!$this->signalRegistry) {
                    throw new RuntimeException('Unable to subscribe to signal events. Make sure that the `pcntl` extension is installed and that "pcntl_*" functions are not disabled by your php.ini\'s "disable_functions" directive.');
                }
                if (Terminal::hasSttyAvailable()) {
                    $sttyMode = \shell_exec('stty -g');
                    foreach ([\SIGINT, \SIGTERM] as $signal) {
                        $this->signalRegistry->register($signal, static function () use($sttyMode) {
                            \shell_exec('stty ' . $sttyMode);
                        });
                    }
                }
            }
            if (null !== $this->dispatcher) {
                foreach ($this->signalsToDispatchEvent as $signal) {
                    $event = new ConsoleSignalEvent($command, $input, $output, $signal);
                    $this->signalRegistry->register($signal, function ($signal, $hasNext) use($event) {
                        $this->dispatcher->dispatch($event, ConsoleEvents::SIGNAL);
                        // No more handlers, we try to simulate PHP default behavior
                        if (!$hasNext) {
                            if (!\in_array($signal, [\SIGUSR1, \SIGUSR2], \true)) {
                                exit(0);
                            }
                        }
                    });
                }
            }
            foreach ($commandSignals as $signal) {
                $this->signalRegistry->register($signal, [$command, 'handleSignal']);
            }
        }
        if (null === $this->dispatcher) {
            return $command->run($input, $output);
        }
        // bind before the console.command event, so the listeners have access to input options/arguments
        try {
            $command->mergeApplicationDefinition();
            $input->bind($command->getDefinition());
        } catch (ExceptionInterface $e) {
            // ignore invalid options/arguments for now, to allow the event listeners to customize the InputDefinition
        }
        $event = new ConsoleCommandEvent($command, $input, $output);
        $e = null;
        try {
            $this->dispatcher->dispatch($event, ConsoleEvents::COMMAND);
            if ($event->commandShouldRun()) {
                $exitCode = $command->run($input, $output);
            } else {
                $exitCode = ConsoleCommandEvent::RETURN_CODE_DISABLED;
            }
        } catch (\Throwable $e) {
            $event = new ConsoleErrorEvent($input, $output, $e, $command);
            $this->dispatcher->dispatch($event, ConsoleEvents::ERROR);
            $e = $event->getError();
            if (0 === ($exitCode = $event->getExitCode())) {
                $e = null;
            }
        }
        $event = new ConsoleTerminateEvent($command, $input, $output, $exitCode);
        $this->dispatcher->dispatch($event, ConsoleEvents::TERMINATE);
        if (null !== $e) {
            throw $e;
        }
        return $event->getExitCode();
    }
    /**
     * Gets the name of the command based on input.
     *
     * @return string|null
     */
    protected function getCommandName(InputInterface $input)
    {
        return $this->singleCommand ? $this->defaultCommand : $input->getFirstArgument();
    }
    /**
     * Gets the default input definition.
     *
     * @return InputDefinition
     */
    protected function getDefaultInputDefinition()
    {
        return new InputDefinition([new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'), new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display help for the given command. When no command is given display help for the <info>' . $this->defaultCommand . '</info> command'), new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message'), new InputOption('--verbose', '-v|vv|vvv', InputOption::VALUE_NONE, 'Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug'), new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this application version'), new InputOption('--ansi', '', InputOption::VALUE_NEGATABLE, 'Force (or disable --no-ansi) ANSI output', null), new InputOption('--no-interaction', '-n', InputOption::VALUE_NONE, 'Do not ask any interactive question')]);
    }
    /**
     * Gets the default commands that should always be available.
     *
     * @return Command[]
     */
    protected function getDefaultCommands()
    {
        return [new HelpCommand(), new ListCommand(), new CompleteCommand(), new DumpCompletionCommand()];
    }
    /**
     * Gets the default helper set with the helpers that should always be available.
     *
     * @return HelperSet
     */
    protected function getDefaultHelperSet()
    {
        return new HelperSet([new FormatterHelper(), new DebugFormatterHelper(), new ProcessHelper(), new QuestionHelper()]);
    }
    /**
     * Returns abbreviated suggestions in string format.
     */
    private function getAbbreviationSuggestions(array $abbrevs) : string
    {
        return '    ' . \implode("\n    ", $abbrevs);
    }
    /**
     * Returns the namespace part of the command name.
     *
     * This method is not part of public API and should not be used directly.
     *
     * @return string
     */
    public function extractNamespace(string $name, int $limit = null)
    {
        $parts = \explode(':', $name, -1);
        return \implode(':', null === $limit ? $parts : \array_slice($parts, 0, $limit));
    }
    /**
     * Finds alternative of $name among $collection,
     * if nothing is found in $collection, try in $abbrevs.
     *
     * @return string[]
     */
    private function findAlternatives(string $name, iterable $collection) : array
    {
        $threshold = 1000.0;
        $alternatives = [];
        $collectionParts = [];
        foreach ($collection as $item) {
            $collectionParts[$item] = \explode(':', $item);
        }
        foreach (\explode(':', $name) as $i => $subname) {
            foreach ($collectionParts as $collectionName => $parts) {
                $exists = isset($alternatives[$collectionName]);
                if (!isset($parts[$i]) && $exists) {
                    $alternatives[$collectionName] += $threshold;
                    continue;
                } elseif (!isset($parts[$i])) {
                    continue;
                }
                $lev = \levenshtein($subname, $parts[$i]);
                if ($lev <= \strlen($subname) / 3 || '' !== $subname && \str_contains($parts[$i], $subname)) {
                    $alternatives[$collectionName] = $exists ? $alternatives[$collectionName] + $lev : $lev;
                } elseif ($exists) {
                    $alternatives[$collectionName] += $threshold;
                }
            }
        }
        foreach ($collection as $item) {
            $lev = \levenshtein($name, $item);
            if ($lev <= \strlen($name) / 3 || \str_contains($item, $name)) {
                $alternatives[$item] = isset($alternatives[$item]) ? $alternatives[$item] - $lev : $lev;
            }
        }
        $alternatives = \array_filter($alternatives, function ($lev) use($threshold) {
            return $lev < 2 * $threshold;
        });
        \ksort($alternatives, \SORT_NATURAL | \SORT_FLAG_CASE);
        return \array_keys($alternatives);
    }
    /**
     * Sets the default Command name.
     *
     * @return $this
     */
    public function setDefaultCommand(string $commandName, bool $isSingleCommand = \false)
    {
        $this->defaultCommand = \explode('|', \ltrim($commandName, '|'))[0];
        if ($isSingleCommand) {
            // Ensure the command exist
            $this->find($commandName);
            $this->singleCommand = \true;
        }
        return $this;
    }
    /**
     * @internal
     */
    public function isSingleCommand() : bool
    {
        return $this->singleCommand;
    }
    private function splitStringByWidth(string $string, int $width) : array
    {
        // str_split is not suitable for multi-byte characters, we should use preg_split to get char array properly.
        // additionally, array_slice() is not enough as some character has doubled width.
        // we need a function to split string not by character count but by string width
        if (\false === ($encoding = \mb_detect_encoding($string, null, \true))) {
            return \str_split($string, $width);
        }
        $utf8String = \mb_convert_encoding($string, 'utf8', $encoding);
        $lines = [];
        $line = '';
        $offset = 0;
        while (\preg_match('/.{1,10000}/u', $utf8String, $m, 0, $offset)) {
            $offset += \strlen($m[0]);
            foreach (\preg_split('//u', $m[0]) as $char) {
                // test if $char could be appended to current line
                if (\mb_strwidth($line . $char, 'utf8') <= $width) {
                    $line .= $char;
                    continue;
                }
                // if not, push current line to array and make new line
                $lines[] = \str_pad($line, $width);
                $line = $char;
            }
        }
        $lines[] = \count($lines) ? \str_pad($line, $width) : $line;
        \mb_convert_variables($encoding, 'utf8', $lines);
        return $lines;
    }
    /**
     * Returns all namespaces of the command name.
     *
     * @return string[]
     */
    private function extractAllNamespaces(string $name) : array
    {
        // -1 as third argument is needed to skip the command short name when exploding
        $parts = \explode(':', $name, -1);
        $namespaces = [];
        foreach ($parts as $part) {
            if (\count($namespaces)) {
                $namespaces[] = \end($namespaces) . ':' . $part;
            } else {
                $namespaces[] = $part;
            }
        }
        return $namespaces;
    }
    private function init()
    {
        if ($this->initialized) {
            return;
        }
        $this->initialized = \true;
        foreach ($this->getDefaultCommands() as $command) {
            $this->add($command);
        }
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Tester\Constraint;

use PHPUnit\Framework\Constraint\Constraint;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\Command;
final class CommandIsSuccessful extends Constraint
{
    /**
     * {@inheritdoc}
     */
    public function toString() : string
    {
        return 'is successful';
    }
    /**
     * {@inheritdoc}
     */
    protected function matches($other) : bool
    {
        return Command::SUCCESS === $other;
    }
    /**
     * {@inheritdoc}
     */
    protected function failureDescription($other) : string
    {
        return 'the command ' . $this->toString();
    }
    /**
     * {@inheritdoc}
     */
    protected function additionalFailureDescription($other) : string
    {
        $mapping = [Command::FAILURE => 'Command failed.', Command::INVALID => 'Command was invalid.'];
        return $mapping[$other] ?? \sprintf('Command returned exit status %d.', $other);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Tester;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\Command;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Completion\CompletionInput;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Completion\CompletionSuggestions;
/**
 * Eases the testing of command completion.
 *
 * @author Jérôme Tamarelle <jerome@tamarelle.net>
 */
class CommandCompletionTester
{
    private $command;
    public function __construct(Command $command)
    {
        $this->command = $command;
    }
    /**
     * Create completion suggestions from input tokens.
     */
    public function complete(array $input) : array
    {
        $currentIndex = \count($input);
        if ('' === \end($input)) {
            \array_pop($input);
        }
        \array_unshift($input, $this->command->getName());
        $completionInput = CompletionInput::fromTokens($input, $currentIndex);
        $completionInput->bind($this->command->getDefinition());
        $suggestions = new CompletionSuggestions();
        $this->command->complete($completionInput, $suggestions);
        $options = [];
        foreach ($suggestions->getOptionSuggestions() as $option) {
            $options[] = '--' . $option->getName();
        }
        return \array_map('strval', \array_merge($options, $suggestions->getValueSuggestions()));
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Tester;

use PHPUnit\Framework\Assert;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\ConsoleOutput;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\StreamOutput;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Tester\Constraint\CommandIsSuccessful;
/**
 * @author Amrouche Hamza <hamza.simperfit@gmail.com>
 */
trait TesterTrait
{
    /** @var StreamOutput */
    private $output;
    private $inputs = [];
    private $captureStreamsIndependently = \false;
    /** @var InputInterface */
    private $input;
    /** @var int */
    private $statusCode;
    /**
     * Gets the display returned by the last execution of the command or application.
     *
     * @return string
     *
     * @throws \RuntimeException If it's called before the execute method
     */
    public function getDisplay(bool $normalize = \false)
    {
        if (null === $this->output) {
            throw new \RuntimeException('Output not initialized, did you execute the command before requesting the display?');
        }
        \rewind($this->output->getStream());
        $display = \stream_get_contents($this->output->getStream());
        if ($normalize) {
            $display = \str_replace(\PHP_EOL, "\n", $display);
        }
        return $display;
    }
    /**
     * Gets the output written to STDERR by the application.
     *
     * @param bool $normalize Whether to normalize end of lines to \n or not
     *
     * @return string
     */
    public function getErrorOutput(bool $normalize = \false)
    {
        if (!$this->captureStreamsIndependently) {
            throw new \LogicException('The error output is not available when the tester is run without "capture_stderr_separately" option set.');
        }
        \rewind($this->output->getErrorOutput()->getStream());
        $display = \stream_get_contents($this->output->getErrorOutput()->getStream());
        if ($normalize) {
            $display = \str_replace(\PHP_EOL, "\n", $display);
        }
        return $display;
    }
    /**
     * Gets the input instance used by the last execution of the command or application.
     *
     * @return InputInterface
     */
    public function getInput()
    {
        return $this->input;
    }
    /**
     * Gets the output instance used by the last execution of the command or application.
     *
     * @return OutputInterface
     */
    public function getOutput()
    {
        return $this->output;
    }
    /**
     * Gets the status code returned by the last execution of the command or application.
     *
     * @return int
     *
     * @throws \RuntimeException If it's called before the execute method
     */
    public function getStatusCode()
    {
        if (null === $this->statusCode) {
            throw new \RuntimeException('Status code not initialized, did you execute the command before requesting the status code?');
        }
        return $this->statusCode;
    }
    public function assertCommandIsSuccessful(string $message = '') : void
    {
        Assert::assertThat($this->statusCode, new CommandIsSuccessful(), $message);
    }
    /**
     * Sets the user inputs.
     *
     * @param array $inputs An array of strings representing each input
     *                      passed to the command input stream
     *
     * @return $this
     */
    public function setInputs(array $inputs)
    {
        $this->inputs = $inputs;
        return $this;
    }
    /**
     * Initializes the output property.
     *
     * Available options:
     *
     *  * decorated:                 Sets the output decorated flag
     *  * verbosity:                 Sets the output verbosity flag
     *  * capture_stderr_separately: Make output of stdOut and stdErr separately available
     */
    private function initOutput(array $options)
    {
        $this->captureStreamsIndependently = \array_key_exists('capture_stderr_separately', $options) && $options['capture_stderr_separately'];
        if (!$this->captureStreamsIndependently) {
            $this->output = new StreamOutput(\fopen('php://memory', 'w', \false));
            if (isset($options['decorated'])) {
                $this->output->setDecorated($options['decorated']);
            }
            if (isset($options['verbosity'])) {
                $this->output->setVerbosity($options['verbosity']);
            }
        } else {
            $this->output = new ConsoleOutput($options['verbosity'] ?? ConsoleOutput::VERBOSITY_NORMAL, $options['decorated'] ?? null);
            $errorOutput = new StreamOutput(\fopen('php://memory', 'w', \false));
            $errorOutput->setFormatter($this->output->getFormatter());
            $errorOutput->setVerbosity($this->output->getVerbosity());
            $errorOutput->setDecorated($this->output->isDecorated());
            $reflectedOutput = new \ReflectionObject($this->output);
            $strErrProperty = $reflectedOutput->getProperty('stderr');
            $strErrProperty->setAccessible(\true);
            $strErrProperty->setValue($this->output, $errorOutput);
            $reflectedParent = $reflectedOutput->getParentClass();
            $streamProperty = $reflectedParent->getProperty('stream');
            $streamProperty->setAccessible(\true);
            $streamProperty->setValue($this->output, \fopen('php://memory', 'w', \false));
        }
    }
    /**
     * @return resource
     */
    private static function createStream(array $inputs)
    {
        $stream = \fopen('php://memory', 'r+', \false);
        foreach ($inputs as $input) {
            \fwrite($stream, $input . \PHP_EOL);
        }
        \rewind($stream);
        return $stream;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Tester;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Application;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\ArrayInput;
/**
 * Eases the testing of console applications.
 *
 * When testing an application, don't forget to disable the auto exit flag:
 *
 *     $application = new Application();
 *     $application->setAutoExit(false);
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class ApplicationTester
{
    use TesterTrait;
    private $application;
    public function __construct(Application $application)
    {
        $this->application = $application;
    }
    /**
     * Executes the application.
     *
     * Available options:
     *
     *  * interactive:               Sets the input interactive flag
     *  * decorated:                 Sets the output decorated flag
     *  * verbosity:                 Sets the output verbosity flag
     *  * capture_stderr_separately: Make output of stdOut and stdErr separately available
     *
     * @return int The command exit code
     */
    public function run(array $input, array $options = [])
    {
        $prevShellVerbosity = \getenv('SHELL_VERBOSITY');
        try {
            $this->input = new ArrayInput($input);
            if (isset($options['interactive'])) {
                $this->input->setInteractive($options['interactive']);
            }
            if ($this->inputs) {
                $this->input->setStream(self::createStream($this->inputs));
            }
            $this->initOutput($options);
            return $this->statusCode = $this->application->run($this->input, $this->output);
        } finally {
            // SHELL_VERBOSITY is set by Application::configureIO so we need to unset/reset it
            // to its previous value to avoid one test's verbosity to spread to the following tests
            if (\false === $prevShellVerbosity) {
                if (\function_exists('putenv')) {
                    @\putenv('SHELL_VERBOSITY');
                }
                unset($_ENV['SHELL_VERBOSITY']);
                unset($_SERVER['SHELL_VERBOSITY']);
            } else {
                if (\function_exists('putenv')) {
                    @\putenv('SHELL_VERBOSITY=' . $prevShellVerbosity);
                }
                $_ENV['SHELL_VERBOSITY'] = $prevShellVerbosity;
                $_SERVER['SHELL_VERBOSITY'] = $prevShellVerbosity;
            }
        }
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Console\Tester;

use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\Command;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\ArrayInput;
/**
 * Eases the testing of console commands.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 * @author Robin Chalas <robin.chalas@gmail.com>
 */
class CommandTester
{
    use TesterTrait;
    private $command;
    public function __construct(Command $command)
    {
        $this->command = $command;
    }
    /**
     * Executes the command.
     *
     * Available execution options:
     *
     *  * interactive:               Sets the input interactive flag
     *  * decorated:                 Sets the output decorated flag
     *  * verbosity:                 Sets the output verbosity flag
     *  * capture_stderr_separately: Make output of stdOut and stdErr separately available
     *
     * @param array $input   An array of command arguments and options
     * @param array $options An array of execution options
     *
     * @return int The command exit code
     */
    public function execute(array $input, array $options = [])
    {
        // set the command name automatically if the application requires
        // this argument and no command name was passed
        if (!isset($input['command']) && null !== ($application = $this->command->getApplication()) && $application->getDefinition()->hasArgument('command')) {
            $input = \array_merge(['command' => $this->command->getName()], $input);
        }
        $this->input = new ArrayInput($input);
        // Use an in-memory input stream even if no inputs are set so that QuestionHelper::ask() does not rely on the blocking STDIN.
        $this->input->setStream(self::createStream($this->inputs));
        if (isset($options['interactive'])) {
            $this->input->setInteractive($options['interactive']);
        }
        if (!isset($options['decorated'])) {
            $options['decorated'] = \false;
        }
        $this->initOutput($options);
        return $this->statusCode = $this->command->run($this->input, $this->output);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

use Symfony\Polyfill\Intl\Normalizer as p;

if (!function_exists('normalizer_is_normalized')) {
    function normalizer_is_normalized(?string $string, ?int $form = p\Normalizer::FORM_C): bool { return p\Normalizer::isNormalized((string) $string, (int) $form); }
}
if (!function_exists('normalizer_normalize')) {
    function normalizer_normalize(?string $string, ?int $form = p\Normalizer::FORM_C): string|false { return p\Normalizer::normalize((string) $string, (int) $form); }
}
Copyright (c) 2015-2019 Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

use Symfony\Polyfill\Intl\Normalizer as p;

if (\PHP_VERSION_ID >= 80000) {
    return require __DIR__.'/bootstrap80.php';
}

if (!function_exists('normalizer_is_normalized')) {
    function normalizer_is_normalized($string, $form = p\Normalizer::FORM_C) { return p\Normalizer::isNormalized($string, $form); }
}
if (!function_exists('normalizer_normalize')) {
    function normalizer_normalize($string, $form = p\Normalizer::FORM_C) { return p\Normalizer::normalize($string, $form); }
}
<?php

return array (
  '̀' => 230,
  '́' => 230,
  '̂' => 230,
  '̃' => 230,
  '̄' => 230,
  '̅' => 230,
  '̆' => 230,
  '̇' => 230,
  '̈' => 230,
  '̉' => 230,
  '̊' => 230,
  '̋' => 230,
  '̌' => 230,
  '̍' => 230,
  '̎' => 230,
  '̏' => 230,
  '̐' => 230,
  '̑' => 230,
  '̒' => 230,
  '̓' => 230,
  '̔' => 230,
  '̕' => 232,
  '̖' => 220,
  '̗' => 220,
  '̘' => 220,
  '̙' => 220,
  '̚' => 232,
  '̛' => 216,
  '̜' => 220,
  '̝' => 220,
  '̞' => 220,
  '̟' => 220,
  '̠' => 220,
  '̡' => 202,
  '̢' => 202,
  '̣' => 220,
  '̤' => 220,
  '̥' => 220,
  '̦' => 220,
  '̧' => 202,
  '̨' => 202,
  '̩' => 220,
  '̪' => 220,
  '̫' => 220,
  '̬' => 220,
  '̭' => 220,
  '̮' => 220,
  '̯' => 220,
  '̰' => 220,
  '̱' => 220,
  '̲' => 220,
  '̳' => 220,
  '̴' => 1,
  '̵' => 1,
  '̶' => 1,
  '̷' => 1,
  '̸' => 1,
  '̹' => 220,
  '̺' => 220,
  '̻' => 220,
  '̼' => 220,
  '̽' => 230,
  '̾' => 230,
  '̿' => 230,
  '̀' => 230,
  '́' => 230,
  '͂' => 230,
  '̓' => 230,
  '̈́' => 230,
  'ͅ' => 240,
  '͆' => 230,
  '͇' => 220,
  '͈' => 220,
  '͉' => 220,
  '͊' => 230,
  '͋' => 230,
  '͌' => 230,
  '͍' => 220,
  '͎' => 220,
  '͐' => 230,
  '͑' => 230,
  '͒' => 230,
  '͓' => 220,
  '͔' => 220,
  '͕' => 220,
  '͖' => 220,
  '͗' => 230,
  '͘' => 232,
  '͙' => 220,
  '͚' => 220,
  '͛' => 230,
  '͜' => 233,
  '͝' => 234,
  '͞' => 234,
  '͟' => 233,
  '͠' => 234,
  '͡' => 234,
  '͢' => 233,
  'ͣ' => 230,
  'ͤ' => 230,
  'ͥ' => 230,
  'ͦ' => 230,
  'ͧ' => 230,
  'ͨ' => 230,
  'ͩ' => 230,
  'ͪ' => 230,
  'ͫ' => 230,
  'ͬ' => 230,
  'ͭ' => 230,
  'ͮ' => 230,
  'ͯ' => 230,
  '҃' => 230,
  '҄' => 230,
  '҅' => 230,
  '҆' => 230,
  '҇' => 230,
  '֑' => 220,
  '֒' => 230,
  '֓' => 230,
  '֔' => 230,
  '֕' => 230,
  '֖' => 220,
  '֗' => 230,
  '֘' => 230,
  '֙' => 230,
  '֚' => 222,
  '֛' => 220,
  '֜' => 230,
  '֝' => 230,
  '֞' => 230,
  '֟' => 230,
  '֠' => 230,
  '֡' => 230,
  '֢' => 220,
  '֣' => 220,
  '֤' => 220,
  '֥' => 220,
  '֦' => 220,
  '֧' => 220,
  '֨' => 230,
  '֩' => 230,
  '֪' => 220,
  '֫' => 230,
  '֬' => 230,
  '֭' => 222,
  '֮' => 228,
  '֯' => 230,
  'ְ' => 10,
  'ֱ' => 11,
  'ֲ' => 12,
  'ֳ' => 13,
  'ִ' => 14,
  'ֵ' => 15,
  'ֶ' => 16,
  'ַ' => 17,
  'ָ' => 18,
  'ֹ' => 19,
  'ֺ' => 19,
  'ֻ' => 20,
  'ּ' => 21,
  'ֽ' => 22,
  'ֿ' => 23,
  'ׁ' => 24,
  'ׂ' => 25,
  'ׄ' => 230,
  'ׅ' => 220,
  'ׇ' => 18,
  'ؐ' => 230,
  'ؑ' => 230,
  'ؒ' => 230,
  'ؓ' => 230,
  'ؔ' => 230,
  'ؕ' => 230,
  'ؖ' => 230,
  'ؗ' => 230,
  'ؘ' => 30,
  'ؙ' => 31,
  'ؚ' => 32,
  'ً' => 27,
  'ٌ' => 28,
  'ٍ' => 29,
  'َ' => 30,
  'ُ' => 31,
  'ِ' => 32,
  'ّ' => 33,
  'ْ' => 34,
  'ٓ' => 230,
  'ٔ' => 230,
  'ٕ' => 220,
  'ٖ' => 220,
  'ٗ' => 230,
  '٘' => 230,
  'ٙ' => 230,
  'ٚ' => 230,
  'ٛ' => 230,
  'ٜ' => 220,
  'ٝ' => 230,
  'ٞ' => 230,
  'ٟ' => 220,
  'ٰ' => 35,
  'ۖ' => 230,
  'ۗ' => 230,
  'ۘ' => 230,
  'ۙ' => 230,
  'ۚ' => 230,
  'ۛ' => 230,
  'ۜ' => 230,
  '۟' => 230,
  '۠' => 230,
  'ۡ' => 230,
  'ۢ' => 230,
  'ۣ' => 220,
  'ۤ' => 230,
  'ۧ' => 230,
  'ۨ' => 230,
  '۪' => 220,
  '۫' => 230,
  '۬' => 230,
  'ۭ' => 220,
  'ܑ' => 36,
  'ܰ' => 230,
  'ܱ' => 220,
  'ܲ' => 230,
  'ܳ' => 230,
  'ܴ' => 220,
  'ܵ' => 230,
  'ܶ' => 230,
  'ܷ' => 220,
  'ܸ' => 220,
  'ܹ' => 220,
  'ܺ' => 230,
  'ܻ' => 220,
  'ܼ' => 220,
  'ܽ' => 230,
  'ܾ' => 220,
  'ܿ' => 230,
  '݀' => 230,
  '݁' => 230,
  '݂' => 220,
  '݃' => 230,
  '݄' => 220,
  '݅' => 230,
  '݆' => 220,
  '݇' => 230,
  '݈' => 220,
  '݉' => 230,
  '݊' => 230,
  '߫' => 230,
  '߬' => 230,
  '߭' => 230,
  '߮' => 230,
  '߯' => 230,
  '߰' => 230,
  '߱' => 230,
  '߲' => 220,
  '߳' => 230,
  '߽' => 220,
  'ࠖ' => 230,
  'ࠗ' => 230,
  '࠘' => 230,
  '࠙' => 230,
  'ࠛ' => 230,
  'ࠜ' => 230,
  'ࠝ' => 230,
  'ࠞ' => 230,
  'ࠟ' => 230,
  'ࠠ' => 230,
  'ࠡ' => 230,
  'ࠢ' => 230,
  'ࠣ' => 230,
  'ࠥ' => 230,
  'ࠦ' => 230,
  'ࠧ' => 230,
  'ࠩ' => 230,
  'ࠪ' => 230,
  'ࠫ' => 230,
  'ࠬ' => 230,
  '࠭' => 230,
  '࡙' => 220,
  '࡚' => 220,
  '࡛' => 220,
  '࣓' => 220,
  'ࣔ' => 230,
  'ࣕ' => 230,
  'ࣖ' => 230,
  'ࣗ' => 230,
  'ࣘ' => 230,
  'ࣙ' => 230,
  'ࣚ' => 230,
  'ࣛ' => 230,
  'ࣜ' => 230,
  'ࣝ' => 230,
  'ࣞ' => 230,
  'ࣟ' => 230,
  '࣠' => 230,
  '࣡' => 230,
  'ࣣ' => 220,
  'ࣤ' => 230,
  'ࣥ' => 230,
  'ࣦ' => 220,
  'ࣧ' => 230,
  'ࣨ' => 230,
  'ࣩ' => 220,
  '࣪' => 230,
  '࣫' => 230,
  '࣬' => 230,
  '࣭' => 220,
  '࣮' => 220,
  '࣯' => 220,
  'ࣰ' => 27,
  'ࣱ' => 28,
  'ࣲ' => 29,
  'ࣳ' => 230,
  'ࣴ' => 230,
  'ࣵ' => 230,
  'ࣶ' => 220,
  'ࣷ' => 230,
  'ࣸ' => 230,
  'ࣹ' => 220,
  'ࣺ' => 220,
  'ࣻ' => 230,
  'ࣼ' => 230,
  'ࣽ' => 230,
  'ࣾ' => 230,
  'ࣿ' => 230,
  '़' => 7,
  '्' => 9,
  '॑' => 230,
  '॒' => 220,
  '॓' => 230,
  '॔' => 230,
  '়' => 7,
  '্' => 9,
  '৾' => 230,
  '਼' => 7,
  '੍' => 9,
  '઼' => 7,
  '્' => 9,
  '଼' => 7,
  '୍' => 9,
  '்' => 9,
  '్' => 9,
  'ౕ' => 84,
  'ౖ' => 91,
  '಼' => 7,
  '್' => 9,
  '഻' => 9,
  '഼' => 9,
  '്' => 9,
  '්' => 9,
  'ุ' => 103,
  'ู' => 103,
  'ฺ' => 9,
  '่' => 107,
  '้' => 107,
  '๊' => 107,
  '๋' => 107,
  'ຸ' => 118,
  'ູ' => 118,
  '຺' => 9,
  '່' => 122,
  '້' => 122,
  '໊' => 122,
  '໋' => 122,
  '༘' => 220,
  '༙' => 220,
  '༵' => 220,
  '༷' => 220,
  '༹' => 216,
  'ཱ' => 129,
  'ི' => 130,
  'ུ' => 132,
  'ེ' => 130,
  'ཻ' => 130,
  'ོ' => 130,
  'ཽ' => 130,
  'ྀ' => 130,
  'ྂ' => 230,
  'ྃ' => 230,
  '྄' => 9,
  '྆' => 230,
  '྇' => 230,
  '࿆' => 220,
  '့' => 7,
  '္' => 9,
  '်' => 9,
  'ႍ' => 220,
  '፝' => 230,
  '፞' => 230,
  '፟' => 230,
  '᜔' => 9,
  '᜴' => 9,
  '្' => 9,
  '៝' => 230,
  'ᢩ' => 228,
  '᤹' => 222,
  '᤺' => 230,
  '᤻' => 220,
  'ᨗ' => 230,
  'ᨘ' => 220,
  '᩠' => 9,
  '᩵' => 230,
  '᩶' => 230,
  '᩷' => 230,
  '᩸' => 230,
  '᩹' => 230,
  '᩺' => 230,
  '᩻' => 230,
  '᩼' => 230,
  '᩿' => 220,
  '᪰' => 230,
  '᪱' => 230,
  '᪲' => 230,
  '᪳' => 230,
  '᪴' => 230,
  '᪵' => 220,
  '᪶' => 220,
  '᪷' => 220,
  '᪸' => 220,
  '᪹' => 220,
  '᪺' => 220,
  '᪻' => 230,
  '᪼' => 230,
  '᪽' => 220,
  'ᪿ' => 220,
  'ᫀ' => 220,
  '᬴' => 7,
  '᭄' => 9,
  '᭫' => 230,
  '᭬' => 220,
  '᭭' => 230,
  '᭮' => 230,
  '᭯' => 230,
  '᭰' => 230,
  '᭱' => 230,
  '᭲' => 230,
  '᭳' => 230,
  '᮪' => 9,
  '᮫' => 9,
  '᯦' => 7,
  '᯲' => 9,
  '᯳' => 9,
  '᰷' => 7,
  '᳐' => 230,
  '᳑' => 230,
  '᳒' => 230,
  '᳔' => 1,
  '᳕' => 220,
  '᳖' => 220,
  '᳗' => 220,
  '᳘' => 220,
  '᳙' => 220,
  '᳚' => 230,
  '᳛' => 230,
  '᳜' => 220,
  '᳝' => 220,
  '᳞' => 220,
  '᳟' => 220,
  '᳠' => 230,
  '᳢' => 1,
  '᳣' => 1,
  '᳤' => 1,
  '᳥' => 1,
  '᳦' => 1,
  '᳧' => 1,
  '᳨' => 1,
  '᳭' => 220,
  '᳴' => 230,
  '᳸' => 230,
  '᳹' => 230,
  '᷀' => 230,
  '᷁' => 230,
  '᷂' => 220,
  '᷃' => 230,
  '᷄' => 230,
  '᷅' => 230,
  '᷆' => 230,
  '᷇' => 230,
  '᷈' => 230,
  '᷉' => 230,
  '᷊' => 220,
  '᷋' => 230,
  '᷌' => 230,
  '᷍' => 234,
  '᷎' => 214,
  '᷏' => 220,
  '᷐' => 202,
  '᷑' => 230,
  '᷒' => 230,
  'ᷓ' => 230,
  'ᷔ' => 230,
  'ᷕ' => 230,
  'ᷖ' => 230,
  'ᷗ' => 230,
  'ᷘ' => 230,
  'ᷙ' => 230,
  'ᷚ' => 230,
  'ᷛ' => 230,
  'ᷜ' => 230,
  'ᷝ' => 230,
  'ᷞ' => 230,
  'ᷟ' => 230,
  'ᷠ' => 230,
  'ᷡ' => 230,
  'ᷢ' => 230,
  'ᷣ' => 230,
  'ᷤ' => 230,
  'ᷥ' => 230,
  'ᷦ' => 230,
  'ᷧ' => 230,
  'ᷨ' => 230,
  'ᷩ' => 230,
  'ᷪ' => 230,
  'ᷫ' => 230,
  'ᷬ' => 230,
  'ᷭ' => 230,
  'ᷮ' => 230,
  'ᷯ' => 230,
  'ᷰ' => 230,
  'ᷱ' => 230,
  'ᷲ' => 230,
  'ᷳ' => 230,
  'ᷴ' => 230,
  '᷵' => 230,
  '᷶' => 232,
  '᷷' => 228,
  '᷸' => 228,
  '᷹' => 220,
  '᷻' => 230,
  '᷼' => 233,
  '᷽' => 220,
  '᷾' => 230,
  '᷿' => 220,
  '⃐' => 230,
  '⃑' => 230,
  '⃒' => 1,
  '⃓' => 1,
  '⃔' => 230,
  '⃕' => 230,
  '⃖' => 230,
  '⃗' => 230,
  '⃘' => 1,
  '⃙' => 1,
  '⃚' => 1,
  '⃛' => 230,
  '⃜' => 230,
  '⃡' => 230,
  '⃥' => 1,
  '⃦' => 1,
  '⃧' => 230,
  '⃨' => 220,
  '⃩' => 230,
  '⃪' => 1,
  '⃫' => 1,
  '⃬' => 220,
  '⃭' => 220,
  '⃮' => 220,
  '⃯' => 220,
  '⃰' => 230,
  '⳯' => 230,
  '⳰' => 230,
  '⳱' => 230,
  '⵿' => 9,
  'ⷠ' => 230,
  'ⷡ' => 230,
  'ⷢ' => 230,
  'ⷣ' => 230,
  'ⷤ' => 230,
  'ⷥ' => 230,
  'ⷦ' => 230,
  'ⷧ' => 230,
  'ⷨ' => 230,
  'ⷩ' => 230,
  'ⷪ' => 230,
  'ⷫ' => 230,
  'ⷬ' => 230,
  'ⷭ' => 230,
  'ⷮ' => 230,
  'ⷯ' => 230,
  'ⷰ' => 230,
  'ⷱ' => 230,
  'ⷲ' => 230,
  'ⷳ' => 230,
  'ⷴ' => 230,
  'ⷵ' => 230,
  'ⷶ' => 230,
  'ⷷ' => 230,
  'ⷸ' => 230,
  'ⷹ' => 230,
  'ⷺ' => 230,
  'ⷻ' => 230,
  'ⷼ' => 230,
  'ⷽ' => 230,
  'ⷾ' => 230,
  'ⷿ' => 230,
  '〪' => 218,
  '〫' => 228,
  '〬' => 232,
  '〭' => 222,
  '〮' => 224,
  '〯' => 224,
  '゙' => 8,
  '゚' => 8,
  '꙯' => 230,
  'ꙴ' => 230,
  'ꙵ' => 230,
  'ꙶ' => 230,
  'ꙷ' => 230,
  'ꙸ' => 230,
  'ꙹ' => 230,
  'ꙺ' => 230,
  'ꙻ' => 230,
  '꙼' => 230,
  '꙽' => 230,
  'ꚞ' => 230,
  'ꚟ' => 230,
  '꛰' => 230,
  '꛱' => 230,
  '꠆' => 9,
  '꠬' => 9,
  '꣄' => 9,
  '꣠' => 230,
  '꣡' => 230,
  '꣢' => 230,
  '꣣' => 230,
  '꣤' => 230,
  '꣥' => 230,
  '꣦' => 230,
  '꣧' => 230,
  '꣨' => 230,
  '꣩' => 230,
  '꣪' => 230,
  '꣫' => 230,
  '꣬' => 230,
  '꣭' => 230,
  '꣮' => 230,
  '꣯' => 230,
  '꣰' => 230,
  '꣱' => 230,
  '꤫' => 220,
  '꤬' => 220,
  '꤭' => 220,
  '꥓' => 9,
  '꦳' => 7,
  '꧀' => 9,
  'ꪰ' => 230,
  'ꪲ' => 230,
  'ꪳ' => 230,
  'ꪴ' => 220,
  'ꪷ' => 230,
  'ꪸ' => 230,
  'ꪾ' => 230,
  '꪿' => 230,
  '꫁' => 230,
  '꫶' => 9,
  '꯭' => 9,
  'ﬞ' => 26,
  '︠' => 230,
  '︡' => 230,
  '︢' => 230,
  '︣' => 230,
  '︤' => 230,
  '︥' => 230,
  '︦' => 230,
  '︧' => 220,
  '︨' => 220,
  '︩' => 220,
  '︪' => 220,
  '︫' => 220,
  '︬' => 220,
  '︭' => 220,
  '︮' => 230,
  '︯' => 230,
  '𐇽' => 220,
  '𐋠' => 220,
  '𐍶' => 230,
  '𐍷' => 230,
  '𐍸' => 230,
  '𐍹' => 230,
  '𐍺' => 230,
  '𐨍' => 220,
  '𐨏' => 230,
  '𐨸' => 230,
  '𐨹' => 1,
  '𐨺' => 220,
  '𐨿' => 9,
  '𐫥' => 230,
  '𐫦' => 220,
  '𐴤' => 230,
  '𐴥' => 230,
  '𐴦' => 230,
  '𐴧' => 230,
  '𐺫' => 230,
  '𐺬' => 230,
  '𐽆' => 220,
  '𐽇' => 220,
  '𐽈' => 230,
  '𐽉' => 230,
  '𐽊' => 230,
  '𐽋' => 220,
  '𐽌' => 230,
  '𐽍' => 220,
  '𐽎' => 220,
  '𐽏' => 220,
  '𐽐' => 220,
  '𑁆' => 9,
  '𑁿' => 9,
  '𑂹' => 9,
  '𑂺' => 7,
  '𑄀' => 230,
  '𑄁' => 230,
  '𑄂' => 230,
  '𑄳' => 9,
  '𑄴' => 9,
  '𑅳' => 7,
  '𑇀' => 9,
  '𑇊' => 7,
  '𑈵' => 9,
  '𑈶' => 7,
  '𑋩' => 7,
  '𑋪' => 9,
  '𑌻' => 7,
  '𑌼' => 7,
  '𑍍' => 9,
  '𑍦' => 230,
  '𑍧' => 230,
  '𑍨' => 230,
  '𑍩' => 230,
  '𑍪' => 230,
  '𑍫' => 230,
  '𑍬' => 230,
  '𑍰' => 230,
  '𑍱' => 230,
  '𑍲' => 230,
  '𑍳' => 230,
  '𑍴' => 230,
  '𑑂' => 9,
  '𑑆' => 7,
  '𑑞' => 230,
  '𑓂' => 9,
  '𑓃' => 7,
  '𑖿' => 9,
  '𑗀' => 7,
  '𑘿' => 9,
  '𑚶' => 9,
  '𑚷' => 7,
  '𑜫' => 9,
  '𑠹' => 9,
  '𑠺' => 7,
  '𑤽' => 9,
  '𑤾' => 9,
  '𑥃' => 7,
  '𑧠' => 9,
  '𑨴' => 9,
  '𑩇' => 9,
  '𑪙' => 9,
  '𑰿' => 9,
  '𑵂' => 7,
  '𑵄' => 9,
  '𑵅' => 9,
  '𑶗' => 9,
  '𖫰' => 1,
  '𖫱' => 1,
  '𖫲' => 1,
  '𖫳' => 1,
  '𖫴' => 1,
  '𖬰' => 230,
  '𖬱' => 230,
  '𖬲' => 230,
  '𖬳' => 230,
  '𖬴' => 230,
  '𖬵' => 230,
  '𖬶' => 230,
  '𖿰' => 6,
  '𖿱' => 6,
  '𛲞' => 1,
  '𝅥' => 216,
  '𝅦' => 216,
  '𝅧' => 1,
  '𝅨' => 1,
  '𝅩' => 1,
  '𝅭' => 226,
  '𝅮' => 216,
  '𝅯' => 216,
  '𝅰' => 216,
  '𝅱' => 216,
  '𝅲' => 216,
  '𝅻' => 220,
  '𝅼' => 220,
  '𝅽' => 220,
  '𝅾' => 220,
  '𝅿' => 220,
  '𝆀' => 220,
  '𝆁' => 220,
  '𝆂' => 220,
  '𝆅' => 230,
  '𝆆' => 230,
  '𝆇' => 230,
  '𝆈' => 230,
  '𝆉' => 230,
  '𝆊' => 220,
  '𝆋' => 220,
  '𝆪' => 230,
  '𝆫' => 230,
  '𝆬' => 230,
  '𝆭' => 230,
  '𝉂' => 230,
  '𝉃' => 230,
  '𝉄' => 230,
  '𞀀' => 230,
  '𞀁' => 230,
  '𞀂' => 230,
  '𞀃' => 230,
  '𞀄' => 230,
  '𞀅' => 230,
  '𞀆' => 230,
  '𞀈' => 230,
  '𞀉' => 230,
  '𞀊' => 230,
  '𞀋' => 230,
  '𞀌' => 230,
  '𞀍' => 230,
  '𞀎' => 230,
  '𞀏' => 230,
  '𞀐' => 230,
  '𞀑' => 230,
  '𞀒' => 230,
  '𞀓' => 230,
  '𞀔' => 230,
  '𞀕' => 230,
  '𞀖' => 230,
  '𞀗' => 230,
  '𞀘' => 230,
  '𞀛' => 230,
  '𞀜' => 230,
  '𞀝' => 230,
  '𞀞' => 230,
  '𞀟' => 230,
  '𞀠' => 230,
  '𞀡' => 230,
  '𞀣' => 230,
  '𞀤' => 230,
  '𞀦' => 230,
  '𞀧' => 230,
  '𞀨' => 230,
  '𞀩' => 230,
  '𞀪' => 230,
  '𞄰' => 230,
  '𞄱' => 230,
  '𞄲' => 230,
  '𞄳' => 230,
  '𞄴' => 230,
  '𞄵' => 230,
  '𞄶' => 230,
  '𞋬' => 230,
  '𞋭' => 230,
  '𞋮' => 230,
  '𞋯' => 230,
  '𞣐' => 220,
  '𞣑' => 220,
  '𞣒' => 220,
  '𞣓' => 220,
  '𞣔' => 220,
  '𞣕' => 220,
  '𞣖' => 220,
  '𞥄' => 230,
  '𞥅' => 230,
  '𞥆' => 230,
  '𞥇' => 230,
  '𞥈' => 230,
  '𞥉' => 230,
  '𞥊' => 7,
);
<?php

return array (
  ' ' => ' ',
  '¨' => ' ̈',
  'ª' => 'a',
  '¯' => ' ̄',
  '²' => '2',
  '³' => '3',
  '´' => ' ́',
  'µ' => 'μ',
  '¸' => ' ̧',
  '¹' => '1',
  'º' => 'o',
  '¼' => '1⁄4',
  '½' => '1⁄2',
  '¾' => '3⁄4',
  'IJ' => 'IJ',
  'ij' => 'ij',
  'Ŀ' => 'L·',
  'ŀ' => 'l·',
  'ʼn' => 'ʼn',
  'ſ' => 's',
  'DŽ' => 'DŽ',
  'Dž' => 'Dž',
  'dž' => 'dž',
  'LJ' => 'LJ',
  'Lj' => 'Lj',
  'lj' => 'lj',
  'NJ' => 'NJ',
  'Nj' => 'Nj',
  'nj' => 'nj',
  'DZ' => 'DZ',
  'Dz' => 'Dz',
  'dz' => 'dz',
  'ʰ' => 'h',
  'ʱ' => 'ɦ',
  'ʲ' => 'j',
  'ʳ' => 'r',
  'ʴ' => 'ɹ',
  'ʵ' => 'ɻ',
  'ʶ' => 'ʁ',
  'ʷ' => 'w',
  'ʸ' => 'y',
  '˘' => ' ̆',
  '˙' => ' ̇',
  '˚' => ' ̊',
  '˛' => ' ̨',
  '˜' => ' ̃',
  '˝' => ' ̋',
  'ˠ' => 'ɣ',
  'ˡ' => 'l',
  'ˢ' => 's',
  'ˣ' => 'x',
  'ˤ' => 'ʕ',
  'ͺ' => ' ͅ',
  '΄' => ' ́',
  '΅' => ' ̈́',
  'ϐ' => 'β',
  'ϑ' => 'θ',
  'ϒ' => 'Υ',
  'ϓ' => 'Ύ',
  'ϔ' => 'Ϋ',
  'ϕ' => 'φ',
  'ϖ' => 'π',
  'ϰ' => 'κ',
  'ϱ' => 'ρ',
  'ϲ' => 'ς',
  'ϴ' => 'Θ',
  'ϵ' => 'ε',
  'Ϲ' => 'Σ',
  'և' => 'եւ',
  'ٵ' => 'اٴ',
  'ٶ' => 'وٴ',
  'ٷ' => 'ۇٴ',
  'ٸ' => 'يٴ',
  'ำ' => 'ํา',
  'ຳ' => 'ໍາ',
  'ໜ' => 'ຫນ',
  'ໝ' => 'ຫມ',
  '༌' => '་',
  'ཷ' => 'ྲཱྀ',
  'ཹ' => 'ླཱྀ',
  'ჼ' => 'ნ',
  'ᴬ' => 'A',
  'ᴭ' => 'Æ',
  'ᴮ' => 'B',
  'ᴰ' => 'D',
  'ᴱ' => 'E',
  'ᴲ' => 'Ǝ',
  'ᴳ' => 'G',
  'ᴴ' => 'H',
  'ᴵ' => 'I',
  'ᴶ' => 'J',
  'ᴷ' => 'K',
  'ᴸ' => 'L',
  'ᴹ' => 'M',
  'ᴺ' => 'N',
  'ᴼ' => 'O',
  'ᴽ' => 'Ȣ',
  'ᴾ' => 'P',
  'ᴿ' => 'R',
  'ᵀ' => 'T',
  'ᵁ' => 'U',
  'ᵂ' => 'W',
  'ᵃ' => 'a',
  'ᵄ' => 'ɐ',
  'ᵅ' => 'ɑ',
  'ᵆ' => 'ᴂ',
  'ᵇ' => 'b',
  'ᵈ' => 'd',
  'ᵉ' => 'e',
  'ᵊ' => 'ə',
  'ᵋ' => 'ɛ',
  'ᵌ' => 'ɜ',
  'ᵍ' => 'g',
  'ᵏ' => 'k',
  'ᵐ' => 'm',
  'ᵑ' => 'ŋ',
  'ᵒ' => 'o',
  'ᵓ' => 'ɔ',
  'ᵔ' => 'ᴖ',
  'ᵕ' => 'ᴗ',
  'ᵖ' => 'p',
  'ᵗ' => 't',
  'ᵘ' => 'u',
  'ᵙ' => 'ᴝ',
  'ᵚ' => 'ɯ',
  'ᵛ' => 'v',
  'ᵜ' => 'ᴥ',
  'ᵝ' => 'β',
  'ᵞ' => 'γ',
  'ᵟ' => 'δ',
  'ᵠ' => 'φ',
  'ᵡ' => 'χ',
  'ᵢ' => 'i',
  'ᵣ' => 'r',
  'ᵤ' => 'u',
  'ᵥ' => 'v',
  'ᵦ' => 'β',
  'ᵧ' => 'γ',
  'ᵨ' => 'ρ',
  'ᵩ' => 'φ',
  'ᵪ' => 'χ',
  'ᵸ' => 'н',
  'ᶛ' => 'ɒ',
  'ᶜ' => 'c',
  'ᶝ' => 'ɕ',
  'ᶞ' => 'ð',
  'ᶟ' => 'ɜ',
  'ᶠ' => 'f',
  'ᶡ' => 'ɟ',
  'ᶢ' => 'ɡ',
  'ᶣ' => 'ɥ',
  'ᶤ' => 'ɨ',
  'ᶥ' => 'ɩ',
  'ᶦ' => 'ɪ',
  'ᶧ' => 'ᵻ',
  'ᶨ' => 'ʝ',
  'ᶩ' => 'ɭ',
  'ᶪ' => 'ᶅ',
  'ᶫ' => 'ʟ',
  'ᶬ' => 'ɱ',
  'ᶭ' => 'ɰ',
  'ᶮ' => 'ɲ',
  'ᶯ' => 'ɳ',
  'ᶰ' => 'ɴ',
  'ᶱ' => 'ɵ',
  'ᶲ' => 'ɸ',
  'ᶳ' => 'ʂ',
  'ᶴ' => 'ʃ',
  'ᶵ' => 'ƫ',
  'ᶶ' => 'ʉ',
  'ᶷ' => 'ʊ',
  'ᶸ' => 'ᴜ',
  'ᶹ' => 'ʋ',
  'ᶺ' => 'ʌ',
  'ᶻ' => 'z',
  'ᶼ' => 'ʐ',
  'ᶽ' => 'ʑ',
  'ᶾ' => 'ʒ',
  'ᶿ' => 'θ',
  'ẚ' => 'aʾ',
  'ẛ' => 'ṡ',
  '᾽' => ' ̓',
  '᾿' => ' ̓',
  '῀' => ' ͂',
  '῁' => ' ̈͂',
  '῍' => ' ̓̀',
  '῎' => ' ̓́',
  '῏' => ' ̓͂',
  '῝' => ' ̔̀',
  '῞' => ' ̔́',
  '῟' => ' ̔͂',
  '῭' => ' ̈̀',
  '΅' => ' ̈́',
  '´' => ' ́',
  '῾' => ' ̔',
  ' ' => ' ',
  ' ' => ' ',
  ' ' => ' ',
  ' ' => ' ',
  ' ' => ' ',
  ' ' => ' ',
  ' ' => ' ',
  ' ' => ' ',
  ' ' => ' ',
  ' ' => ' ',
  ' ' => ' ',
  '‑' => '‐',
  '‗' => ' ̳',
  '․' => '.',
  '‥' => '..',
  '…' => '...',
  ' ' => ' ',
  '″' => '′′',
  '‴' => '′′′',
  '‶' => '‵‵',
  '‷' => '‵‵‵',
  '‼' => '!!',
  '‾' => ' ̅',
  '⁇' => '??',
  '⁈' => '?!',
  '⁉' => '!?',
  '⁗' => '′′′′',
  ' ' => ' ',
  '⁰' => '0',
  'ⁱ' => 'i',
  '⁴' => '4',
  '⁵' => '5',
  '⁶' => '6',
  '⁷' => '7',
  '⁸' => '8',
  '⁹' => '9',
  '⁺' => '+',
  '⁻' => '−',
  '⁼' => '=',
  '⁽' => '(',
  '⁾' => ')',
  'ⁿ' => 'n',
  '₀' => '0',
  '₁' => '1',
  '₂' => '2',
  '₃' => '3',
  '₄' => '4',
  '₅' => '5',
  '₆' => '6',
  '₇' => '7',
  '₈' => '8',
  '₉' => '9',
  '₊' => '+',
  '₋' => '−',
  '₌' => '=',
  '₍' => '(',
  '₎' => ')',
  'ₐ' => 'a',
  'ₑ' => 'e',
  'ₒ' => 'o',
  'ₓ' => 'x',
  'ₔ' => 'ə',
  'ₕ' => 'h',
  'ₖ' => 'k',
  'ₗ' => 'l',
  'ₘ' => 'm',
  'ₙ' => 'n',
  'ₚ' => 'p',
  'ₛ' => 's',
  'ₜ' => 't',
  '₨' => 'Rs',
  '℀' => 'a/c',
  '℁' => 'a/s',
  'ℂ' => 'C',
  '℃' => '°C',
  '℅' => 'c/o',
  '℆' => 'c/u',
  'ℇ' => 'Ɛ',
  '℉' => '°F',
  'ℊ' => 'g',
  'ℋ' => 'H',
  'ℌ' => 'H',
  'ℍ' => 'H',
  'ℎ' => 'h',
  'ℏ' => 'ħ',
  'ℐ' => 'I',
  'ℑ' => 'I',
  'ℒ' => 'L',
  'ℓ' => 'l',
  'ℕ' => 'N',
  '№' => 'No',
  'ℙ' => 'P',
  'ℚ' => 'Q',
  'ℛ' => 'R',
  'ℜ' => 'R',
  'ℝ' => 'R',
  '℠' => 'SM',
  '℡' => 'TEL',
  '™' => 'TM',
  'ℤ' => 'Z',
  'ℨ' => 'Z',
  'ℬ' => 'B',
  'ℭ' => 'C',
  'ℯ' => 'e',
  'ℰ' => 'E',
  'ℱ' => 'F',
  'ℳ' => 'M',
  'ℴ' => 'o',
  'ℵ' => 'א',
  'ℶ' => 'ב',
  'ℷ' => 'ג',
  'ℸ' => 'ד',
  'ℹ' => 'i',
  '℻' => 'FAX',
  'ℼ' => 'π',
  'ℽ' => 'γ',
  'ℾ' => 'Γ',
  'ℿ' => 'Π',
  '⅀' => '∑',
  'ⅅ' => 'D',
  'ⅆ' => 'd',
  'ⅇ' => 'e',
  'ⅈ' => 'i',
  'ⅉ' => 'j',
  '⅐' => '1⁄7',
  '⅑' => '1⁄9',
  '⅒' => '1⁄10',
  '⅓' => '1⁄3',
  '⅔' => '2⁄3',
  '⅕' => '1⁄5',
  '⅖' => '2⁄5',
  '⅗' => '3⁄5',
  '⅘' => '4⁄5',
  '⅙' => '1⁄6',
  '⅚' => '5⁄6',
  '⅛' => '1⁄8',
  '⅜' => '3⁄8',
  '⅝' => '5⁄8',
  '⅞' => '7⁄8',
  '⅟' => '1⁄',
  'Ⅰ' => 'I',
  'Ⅱ' => 'II',
  'Ⅲ' => 'III',
  'Ⅳ' => 'IV',
  'Ⅴ' => 'V',
  'Ⅵ' => 'VI',
  'Ⅶ' => 'VII',
  'Ⅷ' => 'VIII',
  'Ⅸ' => 'IX',
  'Ⅹ' => 'X',
  'Ⅺ' => 'XI',
  'Ⅻ' => 'XII',
  'Ⅼ' => 'L',
  'Ⅽ' => 'C',
  'Ⅾ' => 'D',
  'Ⅿ' => 'M',
  'ⅰ' => 'i',
  'ⅱ' => 'ii',
  'ⅲ' => 'iii',
  'ⅳ' => 'iv',
  'ⅴ' => 'v',
  'ⅵ' => 'vi',
  'ⅶ' => 'vii',
  'ⅷ' => 'viii',
  'ⅸ' => 'ix',
  'ⅹ' => 'x',
  'ⅺ' => 'xi',
  'ⅻ' => 'xii',
  'ⅼ' => 'l',
  'ⅽ' => 'c',
  'ⅾ' => 'd',
  'ⅿ' => 'm',
  '↉' => '0⁄3',
  '∬' => '∫∫',
  '∭' => '∫∫∫',
  '∯' => '∮∮',
  '∰' => '∮∮∮',
  '①' => '1',
  '②' => '2',
  '③' => '3',
  '④' => '4',
  '⑤' => '5',
  '⑥' => '6',
  '⑦' => '7',
  '⑧' => '8',
  '⑨' => '9',
  '⑩' => '10',
  '⑪' => '11',
  '⑫' => '12',
  '⑬' => '13',
  '⑭' => '14',
  '⑮' => '15',
  '⑯' => '16',
  '⑰' => '17',
  '⑱' => '18',
  '⑲' => '19',
  '⑳' => '20',
  '⑴' => '(1)',
  '⑵' => '(2)',
  '⑶' => '(3)',
  '⑷' => '(4)',
  '⑸' => '(5)',
  '⑹' => '(6)',
  '⑺' => '(7)',
  '⑻' => '(8)',
  '⑼' => '(9)',
  '⑽' => '(10)',
  '⑾' => '(11)',
  '⑿' => '(12)',
  '⒀' => '(13)',
  '⒁' => '(14)',
  '⒂' => '(15)',
  '⒃' => '(16)',
  '⒄' => '(17)',
  '⒅' => '(18)',
  '⒆' => '(19)',
  '⒇' => '(20)',
  '⒈' => '1.',
  '⒉' => '2.',
  '⒊' => '3.',
  '⒋' => '4.',
  '⒌' => '5.',
  '⒍' => '6.',
  '⒎' => '7.',
  '⒏' => '8.',
  '⒐' => '9.',
  '⒑' => '10.',
  '⒒' => '11.',
  '⒓' => '12.',
  '⒔' => '13.',
  '⒕' => '14.',
  '⒖' => '15.',
  '⒗' => '16.',
  '⒘' => '17.',
  '⒙' => '18.',
  '⒚' => '19.',
  '⒛' => '20.',
  '⒜' => '(a)',
  '⒝' => '(b)',
  '⒞' => '(c)',
  '⒟' => '(d)',
  '⒠' => '(e)',
  '⒡' => '(f)',
  '⒢' => '(g)',
  '⒣' => '(h)',
  '⒤' => '(i)',
  '⒥' => '(j)',
  '⒦' => '(k)',
  '⒧' => '(l)',
  '⒨' => '(m)',
  '⒩' => '(n)',
  '⒪' => '(o)',
  '⒫' => '(p)',
  '⒬' => '(q)',
  '⒭' => '(r)',
  '⒮' => '(s)',
  '⒯' => '(t)',
  '⒰' => '(u)',
  '⒱' => '(v)',
  '⒲' => '(w)',
  '⒳' => '(x)',
  '⒴' => '(y)',
  '⒵' => '(z)',
  'Ⓐ' => 'A',
  'Ⓑ' => 'B',
  'Ⓒ' => 'C',
  'Ⓓ' => 'D',
  'Ⓔ' => 'E',
  'Ⓕ' => 'F',
  'Ⓖ' => 'G',
  'Ⓗ' => 'H',
  'Ⓘ' => 'I',
  'Ⓙ' => 'J',
  'Ⓚ' => 'K',
  'Ⓛ' => 'L',
  'Ⓜ' => 'M',
  'Ⓝ' => 'N',
  'Ⓞ' => 'O',
  'Ⓟ' => 'P',
  'Ⓠ' => 'Q',
  'Ⓡ' => 'R',
  'Ⓢ' => 'S',
  'Ⓣ' => 'T',
  'Ⓤ' => 'U',
  'Ⓥ' => 'V',
  'Ⓦ' => 'W',
  'Ⓧ' => 'X',
  'Ⓨ' => 'Y',
  'Ⓩ' => 'Z',
  'ⓐ' => 'a',
  'ⓑ' => 'b',
  'ⓒ' => 'c',
  'ⓓ' => 'd',
  'ⓔ' => 'e',
  'ⓕ' => 'f',
  'ⓖ' => 'g',
  'ⓗ' => 'h',
  'ⓘ' => 'i',
  'ⓙ' => 'j',
  'ⓚ' => 'k',
  'ⓛ' => 'l',
  'ⓜ' => 'm',
  'ⓝ' => 'n',
  'ⓞ' => 'o',
  'ⓟ' => 'p',
  'ⓠ' => 'q',
  'ⓡ' => 'r',
  'ⓢ' => 's',
  'ⓣ' => 't',
  'ⓤ' => 'u',
  'ⓥ' => 'v',
  'ⓦ' => 'w',
  'ⓧ' => 'x',
  'ⓨ' => 'y',
  'ⓩ' => 'z',
  '⓪' => '0',
  '⨌' => '∫∫∫∫',
  '⩴' => '::=',
  '⩵' => '==',
  '⩶' => '===',
  'ⱼ' => 'j',
  'ⱽ' => 'V',
  'ⵯ' => 'ⵡ',
  '⺟' => '母',
  '⻳' => '龟',
  '⼀' => '一',
  '⼁' => '丨',
  '⼂' => '丶',
  '⼃' => '丿',
  '⼄' => '乙',
  '⼅' => '亅',
  '⼆' => '二',
  '⼇' => '亠',
  '⼈' => '人',
  '⼉' => '儿',
  '⼊' => '入',
  '⼋' => '八',
  '⼌' => '冂',
  '⼍' => '冖',
  '⼎' => '冫',
  '⼏' => '几',
  '⼐' => '凵',
  '⼑' => '刀',
  '⼒' => '力',
  '⼓' => '勹',
  '⼔' => '匕',
  '⼕' => '匚',
  '⼖' => '匸',
  '⼗' => '十',
  '⼘' => '卜',
  '⼙' => '卩',
  '⼚' => '厂',
  '⼛' => '厶',
  '⼜' => '又',
  '⼝' => '口',
  '⼞' => '囗',
  '⼟' => '土',
  '⼠' => '士',
  '⼡' => '夂',
  '⼢' => '夊',
  '⼣' => '夕',
  '⼤' => '大',
  '⼥' => '女',
  '⼦' => '子',
  '⼧' => '宀',
  '⼨' => '寸',
  '⼩' => '小',
  '⼪' => '尢',
  '⼫' => '尸',
  '⼬' => '屮',
  '⼭' => '山',
  '⼮' => '巛',
  '⼯' => '工',
  '⼰' => '己',
  '⼱' => '巾',
  '⼲' => '干',
  '⼳' => '幺',
  '⼴' => '广',
  '⼵' => '廴',
  '⼶' => '廾',
  '⼷' => '弋',
  '⼸' => '弓',
  '⼹' => '彐',
  '⼺' => '彡',
  '⼻' => '彳',
  '⼼' => '心',
  '⼽' => '戈',
  '⼾' => '戶',
  '⼿' => '手',
  '⽀' => '支',
  '⽁' => '攴',
  '⽂' => '文',
  '⽃' => '斗',
  '⽄' => '斤',
  '⽅' => '方',
  '⽆' => '无',
  '⽇' => '日',
  '⽈' => '曰',
  '⽉' => '月',
  '⽊' => '木',
  '⽋' => '欠',
  '⽌' => '止',
  '⽍' => '歹',
  '⽎' => '殳',
  '⽏' => '毋',
  '⽐' => '比',
  '⽑' => '毛',
  '⽒' => '氏',
  '⽓' => '气',
  '⽔' => '水',
  '⽕' => '火',
  '⽖' => '爪',
  '⽗' => '父',
  '⽘' => '爻',
  '⽙' => '爿',
  '⽚' => '片',
  '⽛' => '牙',
  '⽜' => '牛',
  '⽝' => '犬',
  '⽞' => '玄',
  '⽟' => '玉',
  '⽠' => '瓜',
  '⽡' => '瓦',
  '⽢' => '甘',
  '⽣' => '生',
  '⽤' => '用',
  '⽥' => '田',
  '⽦' => '疋',
  '⽧' => '疒',
  '⽨' => '癶',
  '⽩' => '白',
  '⽪' => '皮',
  '⽫' => '皿',
  '⽬' => '目',
  '⽭' => '矛',
  '⽮' => '矢',
  '⽯' => '石',
  '⽰' => '示',
  '⽱' => '禸',
  '⽲' => '禾',
  '⽳' => '穴',
  '⽴' => '立',
  '⽵' => '竹',
  '⽶' => '米',
  '⽷' => '糸',
  '⽸' => '缶',
  '⽹' => '网',
  '⽺' => '羊',
  '⽻' => '羽',
  '⽼' => '老',
  '⽽' => '而',
  '⽾' => '耒',
  '⽿' => '耳',
  '⾀' => '聿',
  '⾁' => '肉',
  '⾂' => '臣',
  '⾃' => '自',
  '⾄' => '至',
  '⾅' => '臼',
  '⾆' => '舌',
  '⾇' => '舛',
  '⾈' => '舟',
  '⾉' => '艮',
  '⾊' => '色',
  '⾋' => '艸',
  '⾌' => '虍',
  '⾍' => '虫',
  '⾎' => '血',
  '⾏' => '行',
  '⾐' => '衣',
  '⾑' => '襾',
  '⾒' => '見',
  '⾓' => '角',
  '⾔' => '言',
  '⾕' => '谷',
  '⾖' => '豆',
  '⾗' => '豕',
  '⾘' => '豸',
  '⾙' => '貝',
  '⾚' => '赤',
  '⾛' => '走',
  '⾜' => '足',
  '⾝' => '身',
  '⾞' => '車',
  '⾟' => '辛',
  '⾠' => '辰',
  '⾡' => '辵',
  '⾢' => '邑',
  '⾣' => '酉',
  '⾤' => '釆',
  '⾥' => '里',
  '⾦' => '金',
  '⾧' => '長',
  '⾨' => '門',
  '⾩' => '阜',
  '⾪' => '隶',
  '⾫' => '隹',
  '⾬' => '雨',
  '⾭' => '靑',
  '⾮' => '非',
  '⾯' => '面',
  '⾰' => '革',
  '⾱' => '韋',
  '⾲' => '韭',
  '⾳' => '音',
  '⾴' => '頁',
  '⾵' => '風',
  '⾶' => '飛',
  '⾷' => '食',
  '⾸' => '首',
  '⾹' => '香',
  '⾺' => '馬',
  '⾻' => '骨',
  '⾼' => '高',
  '⾽' => '髟',
  '⾾' => '鬥',
  '⾿' => '鬯',
  '⿀' => '鬲',
  '⿁' => '鬼',
  '⿂' => '魚',
  '⿃' => '鳥',
  '⿄' => '鹵',
  '⿅' => '鹿',
  '⿆' => '麥',
  '⿇' => '麻',
  '⿈' => '黃',
  '⿉' => '黍',
  '⿊' => '黑',
  '⿋' => '黹',
  '⿌' => '黽',
  '⿍' => '鼎',
  '⿎' => '鼓',
  '⿏' => '鼠',
  '⿐' => '鼻',
  '⿑' => '齊',
  '⿒' => '齒',
  '⿓' => '龍',
  '⿔' => '龜',
  '⿕' => '龠',
  ' ' => ' ',
  '〶' => '〒',
  '〸' => '十',
  '〹' => '卄',
  '〺' => '卅',
  '゛' => ' ゙',
  '゜' => ' ゚',
  'ゟ' => 'より',
  'ヿ' => 'コト',
  'ㄱ' => 'ᄀ',
  'ㄲ' => 'ᄁ',
  'ㄳ' => 'ᆪ',
  'ㄴ' => 'ᄂ',
  'ㄵ' => 'ᆬ',
  'ㄶ' => 'ᆭ',
  'ㄷ' => 'ᄃ',
  'ㄸ' => 'ᄄ',
  'ㄹ' => 'ᄅ',
  'ㄺ' => 'ᆰ',
  'ㄻ' => 'ᆱ',
  'ㄼ' => 'ᆲ',
  'ㄽ' => 'ᆳ',
  'ㄾ' => 'ᆴ',
  'ㄿ' => 'ᆵ',
  'ㅀ' => 'ᄚ',
  'ㅁ' => 'ᄆ',
  'ㅂ' => 'ᄇ',
  'ㅃ' => 'ᄈ',
  'ㅄ' => 'ᄡ',
  'ㅅ' => 'ᄉ',
  'ㅆ' => 'ᄊ',
  'ㅇ' => 'ᄋ',
  'ㅈ' => 'ᄌ',
  'ㅉ' => 'ᄍ',
  'ㅊ' => 'ᄎ',
  'ㅋ' => 'ᄏ',
  'ㅌ' => 'ᄐ',
  'ㅍ' => 'ᄑ',
  'ㅎ' => 'ᄒ',
  'ㅏ' => 'ᅡ',
  'ㅐ' => 'ᅢ',
  'ㅑ' => 'ᅣ',
  'ㅒ' => 'ᅤ',
  'ㅓ' => 'ᅥ',
  'ㅔ' => 'ᅦ',
  'ㅕ' => 'ᅧ',
  'ㅖ' => 'ᅨ',
  'ㅗ' => 'ᅩ',
  'ㅘ' => 'ᅪ',
  'ㅙ' => 'ᅫ',
  'ㅚ' => 'ᅬ',
  'ㅛ' => 'ᅭ',
  'ㅜ' => 'ᅮ',
  'ㅝ' => 'ᅯ',
  'ㅞ' => 'ᅰ',
  'ㅟ' => 'ᅱ',
  'ㅠ' => 'ᅲ',
  'ㅡ' => 'ᅳ',
  'ㅢ' => 'ᅴ',
  'ㅣ' => 'ᅵ',
  'ㅤ' => 'ᅠ',
  'ㅥ' => 'ᄔ',
  'ㅦ' => 'ᄕ',
  'ㅧ' => 'ᇇ',
  'ㅨ' => 'ᇈ',
  'ㅩ' => 'ᇌ',
  'ㅪ' => 'ᇎ',
  'ㅫ' => 'ᇓ',
  'ㅬ' => 'ᇗ',
  'ㅭ' => 'ᇙ',
  'ㅮ' => 'ᄜ',
  'ㅯ' => 'ᇝ',
  'ㅰ' => 'ᇟ',
  'ㅱ' => 'ᄝ',
  'ㅲ' => 'ᄞ',
  'ㅳ' => 'ᄠ',
  'ㅴ' => 'ᄢ',
  'ㅵ' => 'ᄣ',
  'ㅶ' => 'ᄧ',
  'ㅷ' => 'ᄩ',
  'ㅸ' => 'ᄫ',
  'ㅹ' => 'ᄬ',
  'ㅺ' => 'ᄭ',
  'ㅻ' => 'ᄮ',
  'ㅼ' => 'ᄯ',
  'ㅽ' => 'ᄲ',
  'ㅾ' => 'ᄶ',
  'ㅿ' => 'ᅀ',
  'ㆀ' => 'ᅇ',
  'ㆁ' => 'ᅌ',
  'ㆂ' => 'ᇱ',
  'ㆃ' => 'ᇲ',
  'ㆄ' => 'ᅗ',
  'ㆅ' => 'ᅘ',
  'ㆆ' => 'ᅙ',
  'ㆇ' => 'ᆄ',
  'ㆈ' => 'ᆅ',
  'ㆉ' => 'ᆈ',
  'ㆊ' => 'ᆑ',
  'ㆋ' => 'ᆒ',
  'ㆌ' => 'ᆔ',
  'ㆍ' => 'ᆞ',
  'ㆎ' => 'ᆡ',
  '㆒' => '一',
  '㆓' => '二',
  '㆔' => '三',
  '㆕' => '四',
  '㆖' => '上',
  '㆗' => '中',
  '㆘' => '下',
  '㆙' => '甲',
  '㆚' => '乙',
  '㆛' => '丙',
  '㆜' => '丁',
  '㆝' => '天',
  '㆞' => '地',
  '㆟' => '人',
  '㈀' => '(ᄀ)',
  '㈁' => '(ᄂ)',
  '㈂' => '(ᄃ)',
  '㈃' => '(ᄅ)',
  '㈄' => '(ᄆ)',
  '㈅' => '(ᄇ)',
  '㈆' => '(ᄉ)',
  '㈇' => '(ᄋ)',
  '㈈' => '(ᄌ)',
  '㈉' => '(ᄎ)',
  '㈊' => '(ᄏ)',
  '㈋' => '(ᄐ)',
  '㈌' => '(ᄑ)',
  '㈍' => '(ᄒ)',
  '㈎' => '(가)',
  '㈏' => '(나)',
  '㈐' => '(다)',
  '㈑' => '(라)',
  '㈒' => '(마)',
  '㈓' => '(바)',
  '㈔' => '(사)',
  '㈕' => '(아)',
  '㈖' => '(자)',
  '㈗' => '(차)',
  '㈘' => '(카)',
  '㈙' => '(타)',
  '㈚' => '(파)',
  '㈛' => '(하)',
  '㈜' => '(주)',
  '㈝' => '(오전)',
  '㈞' => '(오후)',
  '㈠' => '(一)',
  '㈡' => '(二)',
  '㈢' => '(三)',
  '㈣' => '(四)',
  '㈤' => '(五)',
  '㈥' => '(六)',
  '㈦' => '(七)',
  '㈧' => '(八)',
  '㈨' => '(九)',
  '㈩' => '(十)',
  '㈪' => '(月)',
  '㈫' => '(火)',
  '㈬' => '(水)',
  '㈭' => '(木)',
  '㈮' => '(金)',
  '㈯' => '(土)',
  '㈰' => '(日)',
  '㈱' => '(株)',
  '㈲' => '(有)',
  '㈳' => '(社)',
  '㈴' => '(名)',
  '㈵' => '(特)',
  '㈶' => '(財)',
  '㈷' => '(祝)',
  '㈸' => '(労)',
  '㈹' => '(代)',
  '㈺' => '(呼)',
  '㈻' => '(学)',
  '㈼' => '(監)',
  '㈽' => '(企)',
  '㈾' => '(資)',
  '㈿' => '(協)',
  '㉀' => '(祭)',
  '㉁' => '(休)',
  '㉂' => '(自)',
  '㉃' => '(至)',
  '㉄' => '問',
  '㉅' => '幼',
  '㉆' => '文',
  '㉇' => '箏',
  '㉐' => 'PTE',
  '㉑' => '21',
  '㉒' => '22',
  '㉓' => '23',
  '㉔' => '24',
  '㉕' => '25',
  '㉖' => '26',
  '㉗' => '27',
  '㉘' => '28',
  '㉙' => '29',
  '㉚' => '30',
  '㉛' => '31',
  '㉜' => '32',
  '㉝' => '33',
  '㉞' => '34',
  '㉟' => '35',
  '㉠' => 'ᄀ',
  '㉡' => 'ᄂ',
  '㉢' => 'ᄃ',
  '㉣' => 'ᄅ',
  '㉤' => 'ᄆ',
  '㉥' => 'ᄇ',
  '㉦' => 'ᄉ',
  '㉧' => 'ᄋ',
  '㉨' => 'ᄌ',
  '㉩' => 'ᄎ',
  '㉪' => 'ᄏ',
  '㉫' => 'ᄐ',
  '㉬' => 'ᄑ',
  '㉭' => 'ᄒ',
  '㉮' => '가',
  '㉯' => '나',
  '㉰' => '다',
  '㉱' => '라',
  '㉲' => '마',
  '㉳' => '바',
  '㉴' => '사',
  '㉵' => '아',
  '㉶' => '자',
  '㉷' => '차',
  '㉸' => '카',
  '㉹' => '타',
  '㉺' => '파',
  '㉻' => '하',
  '㉼' => '참고',
  '㉽' => '주의',
  '㉾' => '우',
  '㊀' => '一',
  '㊁' => '二',
  '㊂' => '三',
  '㊃' => '四',
  '㊄' => '五',
  '㊅' => '六',
  '㊆' => '七',
  '㊇' => '八',
  '㊈' => '九',
  '㊉' => '十',
  '㊊' => '月',
  '㊋' => '火',
  '㊌' => '水',
  '㊍' => '木',
  '㊎' => '金',
  '㊏' => '土',
  '㊐' => '日',
  '㊑' => '株',
  '㊒' => '有',
  '㊓' => '社',
  '㊔' => '名',
  '㊕' => '特',
  '㊖' => '財',
  '㊗' => '祝',
  '㊘' => '労',
  '㊙' => '秘',
  '㊚' => '男',
  '㊛' => '女',
  '㊜' => '適',
  '㊝' => '優',
  '㊞' => '印',
  '㊟' => '注',
  '㊠' => '項',
  '㊡' => '休',
  '㊢' => '写',
  '㊣' => '正',
  '㊤' => '上',
  '㊥' => '中',
  '㊦' => '下',
  '㊧' => '左',
  '㊨' => '右',
  '㊩' => '医',
  '㊪' => '宗',
  '㊫' => '学',
  '㊬' => '監',
  '㊭' => '企',
  '㊮' => '資',
  '㊯' => '協',
  '㊰' => '夜',
  '㊱' => '36',
  '㊲' => '37',
  '㊳' => '38',
  '㊴' => '39',
  '㊵' => '40',
  '㊶' => '41',
  '㊷' => '42',
  '㊸' => '43',
  '㊹' => '44',
  '㊺' => '45',
  '㊻' => '46',
  '㊼' => '47',
  '㊽' => '48',
  '㊾' => '49',
  '㊿' => '50',
  '㋀' => '1月',
  '㋁' => '2月',
  '㋂' => '3月',
  '㋃' => '4月',
  '㋄' => '5月',
  '㋅' => '6月',
  '㋆' => '7月',
  '㋇' => '8月',
  '㋈' => '9月',
  '㋉' => '10月',
  '㋊' => '11月',
  '㋋' => '12月',
  '㋌' => 'Hg',
  '㋍' => 'erg',
  '㋎' => 'eV',
  '㋏' => 'LTD',
  '㋐' => 'ア',
  '㋑' => 'イ',
  '㋒' => 'ウ',
  '㋓' => 'エ',
  '㋔' => 'オ',
  '㋕' => 'カ',
  '㋖' => 'キ',
  '㋗' => 'ク',
  '㋘' => 'ケ',
  '㋙' => 'コ',
  '㋚' => 'サ',
  '㋛' => 'シ',
  '㋜' => 'ス',
  '㋝' => 'セ',
  '㋞' => 'ソ',
  '㋟' => 'タ',
  '㋠' => 'チ',
  '㋡' => 'ツ',
  '㋢' => 'テ',
  '㋣' => 'ト',
  '㋤' => 'ナ',
  '㋥' => 'ニ',
  '㋦' => 'ヌ',
  '㋧' => 'ネ',
  '㋨' => 'ノ',
  '㋩' => 'ハ',
  '㋪' => 'ヒ',
  '㋫' => 'フ',
  '㋬' => 'ヘ',
  '㋭' => 'ホ',
  '㋮' => 'マ',
  '㋯' => 'ミ',
  '㋰' => 'ム',
  '㋱' => 'メ',
  '㋲' => 'モ',
  '㋳' => 'ヤ',
  '㋴' => 'ユ',
  '㋵' => 'ヨ',
  '㋶' => 'ラ',
  '㋷' => 'リ',
  '㋸' => 'ル',
  '㋹' => 'レ',
  '㋺' => 'ロ',
  '㋻' => 'ワ',
  '㋼' => 'ヰ',
  '㋽' => 'ヱ',
  '㋾' => 'ヲ',
  '㋿' => '令和',
  '㌀' => 'アパート',
  '㌁' => 'アルファ',
  '㌂' => 'アンペア',
  '㌃' => 'アール',
  '㌄' => 'イニング',
  '㌅' => 'インチ',
  '㌆' => 'ウォン',
  '㌇' => 'エスクード',
  '㌈' => 'エーカー',
  '㌉' => 'オンス',
  '㌊' => 'オーム',
  '㌋' => 'カイリ',
  '㌌' => 'カラット',
  '㌍' => 'カロリー',
  '㌎' => 'ガロン',
  '㌏' => 'ガンマ',
  '㌐' => 'ギガ',
  '㌑' => 'ギニー',
  '㌒' => 'キュリー',
  '㌓' => 'ギルダー',
  '㌔' => 'キロ',
  '㌕' => 'キログラム',
  '㌖' => 'キロメートル',
  '㌗' => 'キロワット',
  '㌘' => 'グラム',
  '㌙' => 'グラムトン',
  '㌚' => 'クルゼイロ',
  '㌛' => 'クローネ',
  '㌜' => 'ケース',
  '㌝' => 'コルナ',
  '㌞' => 'コーポ',
  '㌟' => 'サイクル',
  '㌠' => 'サンチーム',
  '㌡' => 'シリング',
  '㌢' => 'センチ',
  '㌣' => 'セント',
  '㌤' => 'ダース',
  '㌥' => 'デシ',
  '㌦' => 'ドル',
  '㌧' => 'トン',
  '㌨' => 'ナノ',
  '㌩' => 'ノット',
  '㌪' => 'ハイツ',
  '㌫' => 'パーセント',
  '㌬' => 'パーツ',
  '㌭' => 'バーレル',
  '㌮' => 'ピアストル',
  '㌯' => 'ピクル',
  '㌰' => 'ピコ',
  '㌱' => 'ビル',
  '㌲' => 'ファラッド',
  '㌳' => 'フィート',
  '㌴' => 'ブッシェル',
  '㌵' => 'フラン',
  '㌶' => 'ヘクタール',
  '㌷' => 'ペソ',
  '㌸' => 'ペニヒ',
  '㌹' => 'ヘルツ',
  '㌺' => 'ペンス',
  '㌻' => 'ページ',
  '㌼' => 'ベータ',
  '㌽' => 'ポイント',
  '㌾' => 'ボルト',
  '㌿' => 'ホン',
  '㍀' => 'ポンド',
  '㍁' => 'ホール',
  '㍂' => 'ホーン',
  '㍃' => 'マイクロ',
  '㍄' => 'マイル',
  '㍅' => 'マッハ',
  '㍆' => 'マルク',
  '㍇' => 'マンション',
  '㍈' => 'ミクロン',
  '㍉' => 'ミリ',
  '㍊' => 'ミリバール',
  '㍋' => 'メガ',
  '㍌' => 'メガトン',
  '㍍' => 'メートル',
  '㍎' => 'ヤード',
  '㍏' => 'ヤール',
  '㍐' => 'ユアン',
  '㍑' => 'リットル',
  '㍒' => 'リラ',
  '㍓' => 'ルピー',
  '㍔' => 'ルーブル',
  '㍕' => 'レム',
  '㍖' => 'レントゲン',
  '㍗' => 'ワット',
  '㍘' => '0点',
  '㍙' => '1点',
  '㍚' => '2点',
  '㍛' => '3点',
  '㍜' => '4点',
  '㍝' => '5点',
  '㍞' => '6点',
  '㍟' => '7点',
  '㍠' => '8点',
  '㍡' => '9点',
  '㍢' => '10点',
  '㍣' => '11点',
  '㍤' => '12点',
  '㍥' => '13点',
  '㍦' => '14点',
  '㍧' => '15点',
  '㍨' => '16点',
  '㍩' => '17点',
  '㍪' => '18点',
  '㍫' => '19点',
  '㍬' => '20点',
  '㍭' => '21点',
  '㍮' => '22点',
  '㍯' => '23点',
  '㍰' => '24点',
  '㍱' => 'hPa',
  '㍲' => 'da',
  '㍳' => 'AU',
  '㍴' => 'bar',
  '㍵' => 'oV',
  '㍶' => 'pc',
  '㍷' => 'dm',
  '㍸' => 'dm2',
  '㍹' => 'dm3',
  '㍺' => 'IU',
  '㍻' => '平成',
  '㍼' => '昭和',
  '㍽' => '大正',
  '㍾' => '明治',
  '㍿' => '株式会社',
  '㎀' => 'pA',
  '㎁' => 'nA',
  '㎂' => 'μA',
  '㎃' => 'mA',
  '㎄' => 'kA',
  '㎅' => 'KB',
  '㎆' => 'MB',
  '㎇' => 'GB',
  '㎈' => 'cal',
  '㎉' => 'kcal',
  '㎊' => 'pF',
  '㎋' => 'nF',
  '㎌' => 'μF',
  '㎍' => 'μg',
  '㎎' => 'mg',
  '㎏' => 'kg',
  '㎐' => 'Hz',
  '㎑' => 'kHz',
  '㎒' => 'MHz',
  '㎓' => 'GHz',
  '㎔' => 'THz',
  '㎕' => 'μl',
  '㎖' => 'ml',
  '㎗' => 'dl',
  '㎘' => 'kl',
  '㎙' => 'fm',
  '㎚' => 'nm',
  '㎛' => 'μm',
  '㎜' => 'mm',
  '㎝' => 'cm',
  '㎞' => 'km',
  '㎟' => 'mm2',
  '㎠' => 'cm2',
  '㎡' => 'm2',
  '㎢' => 'km2',
  '㎣' => 'mm3',
  '㎤' => 'cm3',
  '㎥' => 'm3',
  '㎦' => 'km3',
  '㎧' => 'm∕s',
  '㎨' => 'm∕s2',
  '㎩' => 'Pa',
  '㎪' => 'kPa',
  '㎫' => 'MPa',
  '㎬' => 'GPa',
  '㎭' => 'rad',
  '㎮' => 'rad∕s',
  '㎯' => 'rad∕s2',
  '㎰' => 'ps',
  '㎱' => 'ns',
  '㎲' => 'μs',
  '㎳' => 'ms',
  '㎴' => 'pV',
  '㎵' => 'nV',
  '㎶' => 'μV',
  '㎷' => 'mV',
  '㎸' => 'kV',
  '㎹' => 'MV',
  '㎺' => 'pW',
  '㎻' => 'nW',
  '㎼' => 'μW',
  '㎽' => 'mW',
  '㎾' => 'kW',
  '㎿' => 'MW',
  '㏀' => 'kΩ',
  '㏁' => 'MΩ',
  '㏂' => 'a.m.',
  '㏃' => 'Bq',
  '㏄' => 'cc',
  '㏅' => 'cd',
  '㏆' => 'C∕kg',
  '㏇' => 'Co.',
  '㏈' => 'dB',
  '㏉' => 'Gy',
  '㏊' => 'ha',
  '㏋' => 'HP',
  '㏌' => 'in',
  '㏍' => 'KK',
  '㏎' => 'KM',
  '㏏' => 'kt',
  '㏐' => 'lm',
  '㏑' => 'ln',
  '㏒' => 'log',
  '㏓' => 'lx',
  '㏔' => 'mb',
  '㏕' => 'mil',
  '㏖' => 'mol',
  '㏗' => 'PH',
  '㏘' => 'p.m.',
  '㏙' => 'PPM',
  '㏚' => 'PR',
  '㏛' => 'sr',
  '㏜' => 'Sv',
  '㏝' => 'Wb',
  '㏞' => 'V∕m',
  '㏟' => 'A∕m',
  '㏠' => '1日',
  '㏡' => '2日',
  '㏢' => '3日',
  '㏣' => '4日',
  '㏤' => '5日',
  '㏥' => '6日',
  '㏦' => '7日',
  '㏧' => '8日',
  '㏨' => '9日',
  '㏩' => '10日',
  '㏪' => '11日',
  '㏫' => '12日',
  '㏬' => '13日',
  '㏭' => '14日',
  '㏮' => '15日',
  '㏯' => '16日',
  '㏰' => '17日',
  '㏱' => '18日',
  '㏲' => '19日',
  '㏳' => '20日',
  '㏴' => '21日',
  '㏵' => '22日',
  '㏶' => '23日',
  '㏷' => '24日',
  '㏸' => '25日',
  '㏹' => '26日',
  '㏺' => '27日',
  '㏻' => '28日',
  '㏼' => '29日',
  '㏽' => '30日',
  '㏾' => '31日',
  '㏿' => 'gal',
  'ꚜ' => 'ъ',
  'ꚝ' => 'ь',
  'ꝰ' => 'ꝯ',
  'ꟸ' => 'Ħ',
  'ꟹ' => 'œ',
  'ꭜ' => 'ꜧ',
  'ꭝ' => 'ꬷ',
  'ꭞ' => 'ɫ',
  'ꭟ' => 'ꭒ',
  'ꭩ' => 'ʍ',
  'ff' => 'ff',
  'fi' => 'fi',
  'fl' => 'fl',
  'ffi' => 'ffi',
  'ffl' => 'ffl',
  'ſt' => 'st',
  'st' => 'st',
  'ﬓ' => 'մն',
  'ﬔ' => 'մե',
  'ﬕ' => 'մի',
  'ﬖ' => 'վն',
  'ﬗ' => 'մխ',
  'ﬠ' => 'ע',
  'ﬡ' => 'א',
  'ﬢ' => 'ד',
  'ﬣ' => 'ה',
  'ﬤ' => 'כ',
  'ﬥ' => 'ל',
  'ﬦ' => 'ם',
  'ﬧ' => 'ר',
  'ﬨ' => 'ת',
  '﬩' => '+',
  'ﭏ' => 'אל',
  'ﭐ' => 'ٱ',
  'ﭑ' => 'ٱ',
  'ﭒ' => 'ٻ',
  'ﭓ' => 'ٻ',
  'ﭔ' => 'ٻ',
  'ﭕ' => 'ٻ',
  'ﭖ' => 'پ',
  'ﭗ' => 'پ',
  'ﭘ' => 'پ',
  'ﭙ' => 'پ',
  'ﭚ' => 'ڀ',
  'ﭛ' => 'ڀ',
  'ﭜ' => 'ڀ',
  'ﭝ' => 'ڀ',
  'ﭞ' => 'ٺ',
  'ﭟ' => 'ٺ',
  'ﭠ' => 'ٺ',
  'ﭡ' => 'ٺ',
  'ﭢ' => 'ٿ',
  'ﭣ' => 'ٿ',
  'ﭤ' => 'ٿ',
  'ﭥ' => 'ٿ',
  'ﭦ' => 'ٹ',
  'ﭧ' => 'ٹ',
  'ﭨ' => 'ٹ',
  'ﭩ' => 'ٹ',
  'ﭪ' => 'ڤ',
  'ﭫ' => 'ڤ',
  'ﭬ' => 'ڤ',
  'ﭭ' => 'ڤ',
  'ﭮ' => 'ڦ',
  'ﭯ' => 'ڦ',
  'ﭰ' => 'ڦ',
  'ﭱ' => 'ڦ',
  'ﭲ' => 'ڄ',
  'ﭳ' => 'ڄ',
  'ﭴ' => 'ڄ',
  'ﭵ' => 'ڄ',
  'ﭶ' => 'ڃ',
  'ﭷ' => 'ڃ',
  'ﭸ' => 'ڃ',
  'ﭹ' => 'ڃ',
  'ﭺ' => 'چ',
  'ﭻ' => 'چ',
  'ﭼ' => 'چ',
  'ﭽ' => 'چ',
  'ﭾ' => 'ڇ',
  'ﭿ' => 'ڇ',
  'ﮀ' => 'ڇ',
  'ﮁ' => 'ڇ',
  'ﮂ' => 'ڍ',
  'ﮃ' => 'ڍ',
  'ﮄ' => 'ڌ',
  'ﮅ' => 'ڌ',
  'ﮆ' => 'ڎ',
  'ﮇ' => 'ڎ',
  'ﮈ' => 'ڈ',
  'ﮉ' => 'ڈ',
  'ﮊ' => 'ژ',
  'ﮋ' => 'ژ',
  'ﮌ' => 'ڑ',
  'ﮍ' => 'ڑ',
  'ﮎ' => 'ک',
  'ﮏ' => 'ک',
  'ﮐ' => 'ک',
  'ﮑ' => 'ک',
  'ﮒ' => 'گ',
  'ﮓ' => 'گ',
  'ﮔ' => 'گ',
  'ﮕ' => 'گ',
  'ﮖ' => 'ڳ',
  'ﮗ' => 'ڳ',
  'ﮘ' => 'ڳ',
  'ﮙ' => 'ڳ',
  'ﮚ' => 'ڱ',
  'ﮛ' => 'ڱ',
  'ﮜ' => 'ڱ',
  'ﮝ' => 'ڱ',
  'ﮞ' => 'ں',
  'ﮟ' => 'ں',
  'ﮠ' => 'ڻ',
  'ﮡ' => 'ڻ',
  'ﮢ' => 'ڻ',
  'ﮣ' => 'ڻ',
  'ﮤ' => 'ۀ',
  'ﮥ' => 'ۀ',
  'ﮦ' => 'ہ',
  'ﮧ' => 'ہ',
  'ﮨ' => 'ہ',
  'ﮩ' => 'ہ',
  'ﮪ' => 'ھ',
  'ﮫ' => 'ھ',
  'ﮬ' => 'ھ',
  'ﮭ' => 'ھ',
  'ﮮ' => 'ے',
  'ﮯ' => 'ے',
  'ﮰ' => 'ۓ',
  'ﮱ' => 'ۓ',
  'ﯓ' => 'ڭ',
  'ﯔ' => 'ڭ',
  'ﯕ' => 'ڭ',
  'ﯖ' => 'ڭ',
  'ﯗ' => 'ۇ',
  'ﯘ' => 'ۇ',
  'ﯙ' => 'ۆ',
  'ﯚ' => 'ۆ',
  'ﯛ' => 'ۈ',
  'ﯜ' => 'ۈ',
  'ﯝ' => 'ۇٴ',
  'ﯞ' => 'ۋ',
  'ﯟ' => 'ۋ',
  'ﯠ' => 'ۅ',
  'ﯡ' => 'ۅ',
  'ﯢ' => 'ۉ',
  'ﯣ' => 'ۉ',
  'ﯤ' => 'ې',
  'ﯥ' => 'ې',
  'ﯦ' => 'ې',
  'ﯧ' => 'ې',
  'ﯨ' => 'ى',
  'ﯩ' => 'ى',
  'ﯪ' => 'ئا',
  'ﯫ' => 'ئا',
  'ﯬ' => 'ئە',
  'ﯭ' => 'ئە',
  'ﯮ' => 'ئو',
  'ﯯ' => 'ئو',
  'ﯰ' => 'ئۇ',
  'ﯱ' => 'ئۇ',
  'ﯲ' => 'ئۆ',
  'ﯳ' => 'ئۆ',
  'ﯴ' => 'ئۈ',
  'ﯵ' => 'ئۈ',
  'ﯶ' => 'ئې',
  'ﯷ' => 'ئې',
  'ﯸ' => 'ئې',
  'ﯹ' => 'ئى',
  'ﯺ' => 'ئى',
  'ﯻ' => 'ئى',
  'ﯼ' => 'ی',
  'ﯽ' => 'ی',
  'ﯾ' => 'ی',
  'ﯿ' => 'ی',
  'ﰀ' => 'ئج',
  'ﰁ' => 'ئح',
  'ﰂ' => 'ئم',
  'ﰃ' => 'ئى',
  'ﰄ' => 'ئي',
  'ﰅ' => 'بج',
  'ﰆ' => 'بح',
  'ﰇ' => 'بخ',
  'ﰈ' => 'بم',
  'ﰉ' => 'بى',
  'ﰊ' => 'بي',
  'ﰋ' => 'تج',
  'ﰌ' => 'تح',
  'ﰍ' => 'تخ',
  'ﰎ' => 'تم',
  'ﰏ' => 'تى',
  'ﰐ' => 'تي',
  'ﰑ' => 'ثج',
  'ﰒ' => 'ثم',
  'ﰓ' => 'ثى',
  'ﰔ' => 'ثي',
  'ﰕ' => 'جح',
  'ﰖ' => 'جم',
  'ﰗ' => 'حج',
  'ﰘ' => 'حم',
  'ﰙ' => 'خج',
  'ﰚ' => 'خح',
  'ﰛ' => 'خم',
  'ﰜ' => 'سج',
  'ﰝ' => 'سح',
  'ﰞ' => 'سخ',
  'ﰟ' => 'سم',
  'ﰠ' => 'صح',
  'ﰡ' => 'صم',
  'ﰢ' => 'ضج',
  'ﰣ' => 'ضح',
  'ﰤ' => 'ضخ',
  'ﰥ' => 'ضم',
  'ﰦ' => 'طح',
  'ﰧ' => 'طم',
  'ﰨ' => 'ظم',
  'ﰩ' => 'عج',
  'ﰪ' => 'عم',
  'ﰫ' => 'غج',
  'ﰬ' => 'غم',
  'ﰭ' => 'فج',
  'ﰮ' => 'فح',
  'ﰯ' => 'فخ',
  'ﰰ' => 'فم',
  'ﰱ' => 'فى',
  'ﰲ' => 'في',
  'ﰳ' => 'قح',
  'ﰴ' => 'قم',
  'ﰵ' => 'قى',
  'ﰶ' => 'قي',
  'ﰷ' => 'كا',
  'ﰸ' => 'كج',
  'ﰹ' => 'كح',
  'ﰺ' => 'كخ',
  'ﰻ' => 'كل',
  'ﰼ' => 'كم',
  'ﰽ' => 'كى',
  'ﰾ' => 'كي',
  'ﰿ' => 'لج',
  'ﱀ' => 'لح',
  'ﱁ' => 'لخ',
  'ﱂ' => 'لم',
  'ﱃ' => 'لى',
  'ﱄ' => 'لي',
  'ﱅ' => 'مج',
  'ﱆ' => 'مح',
  'ﱇ' => 'مخ',
  'ﱈ' => 'مم',
  'ﱉ' => 'مى',
  'ﱊ' => 'مي',
  'ﱋ' => 'نج',
  'ﱌ' => 'نح',
  'ﱍ' => 'نخ',
  'ﱎ' => 'نم',
  'ﱏ' => 'نى',
  'ﱐ' => 'ني',
  'ﱑ' => 'هج',
  'ﱒ' => 'هم',
  'ﱓ' => 'هى',
  'ﱔ' => 'هي',
  'ﱕ' => 'يج',
  'ﱖ' => 'يح',
  'ﱗ' => 'يخ',
  'ﱘ' => 'يم',
  'ﱙ' => 'يى',
  'ﱚ' => 'يي',
  'ﱛ' => 'ذٰ',
  'ﱜ' => 'رٰ',
  'ﱝ' => 'ىٰ',
  'ﱞ' => ' ٌّ',
  'ﱟ' => ' ٍّ',
  'ﱠ' => ' َّ',
  'ﱡ' => ' ُّ',
  'ﱢ' => ' ِّ',
  'ﱣ' => ' ّٰ',
  'ﱤ' => 'ئر',
  'ﱥ' => 'ئز',
  'ﱦ' => 'ئم',
  'ﱧ' => 'ئن',
  'ﱨ' => 'ئى',
  'ﱩ' => 'ئي',
  'ﱪ' => 'بر',
  'ﱫ' => 'بز',
  'ﱬ' => 'بم',
  'ﱭ' => 'بن',
  'ﱮ' => 'بى',
  'ﱯ' => 'بي',
  'ﱰ' => 'تر',
  'ﱱ' => 'تز',
  'ﱲ' => 'تم',
  'ﱳ' => 'تن',
  'ﱴ' => 'تى',
  'ﱵ' => 'تي',
  'ﱶ' => 'ثر',
  'ﱷ' => 'ثز',
  'ﱸ' => 'ثم',
  'ﱹ' => 'ثن',
  'ﱺ' => 'ثى',
  'ﱻ' => 'ثي',
  'ﱼ' => 'فى',
  'ﱽ' => 'في',
  'ﱾ' => 'قى',
  'ﱿ' => 'قي',
  'ﲀ' => 'كا',
  'ﲁ' => 'كل',
  'ﲂ' => 'كم',
  'ﲃ' => 'كى',
  'ﲄ' => 'كي',
  'ﲅ' => 'لم',
  'ﲆ' => 'لى',
  'ﲇ' => 'لي',
  'ﲈ' => 'ما',
  'ﲉ' => 'مم',
  'ﲊ' => 'نر',
  'ﲋ' => 'نز',
  'ﲌ' => 'نم',
  'ﲍ' => 'نن',
  'ﲎ' => 'نى',
  'ﲏ' => 'ني',
  'ﲐ' => 'ىٰ',
  'ﲑ' => 'ير',
  'ﲒ' => 'يز',
  'ﲓ' => 'يم',
  'ﲔ' => 'ين',
  'ﲕ' => 'يى',
  'ﲖ' => 'يي',
  'ﲗ' => 'ئج',
  'ﲘ' => 'ئح',
  'ﲙ' => 'ئخ',
  'ﲚ' => 'ئم',
  'ﲛ' => 'ئه',
  'ﲜ' => 'بج',
  'ﲝ' => 'بح',
  'ﲞ' => 'بخ',
  'ﲟ' => 'بم',
  'ﲠ' => 'به',
  'ﲡ' => 'تج',
  'ﲢ' => 'تح',
  'ﲣ' => 'تخ',
  'ﲤ' => 'تم',
  'ﲥ' => 'ته',
  'ﲦ' => 'ثم',
  'ﲧ' => 'جح',
  'ﲨ' => 'جم',
  'ﲩ' => 'حج',
  'ﲪ' => 'حم',
  'ﲫ' => 'خج',
  'ﲬ' => 'خم',
  'ﲭ' => 'سج',
  'ﲮ' => 'سح',
  'ﲯ' => 'سخ',
  'ﲰ' => 'سم',
  'ﲱ' => 'صح',
  'ﲲ' => 'صخ',
  'ﲳ' => 'صم',
  'ﲴ' => 'ضج',
  'ﲵ' => 'ضح',
  'ﲶ' => 'ضخ',
  'ﲷ' => 'ضم',
  'ﲸ' => 'طح',
  'ﲹ' => 'ظم',
  'ﲺ' => 'عج',
  'ﲻ' => 'عم',
  'ﲼ' => 'غج',
  'ﲽ' => 'غم',
  'ﲾ' => 'فج',
  'ﲿ' => 'فح',
  'ﳀ' => 'فخ',
  'ﳁ' => 'فم',
  'ﳂ' => 'قح',
  'ﳃ' => 'قم',
  'ﳄ' => 'كج',
  'ﳅ' => 'كح',
  'ﳆ' => 'كخ',
  'ﳇ' => 'كل',
  'ﳈ' => 'كم',
  'ﳉ' => 'لج',
  'ﳊ' => 'لح',
  'ﳋ' => 'لخ',
  'ﳌ' => 'لم',
  'ﳍ' => 'له',
  'ﳎ' => 'مج',
  'ﳏ' => 'مح',
  'ﳐ' => 'مخ',
  'ﳑ' => 'مم',
  'ﳒ' => 'نج',
  'ﳓ' => 'نح',
  'ﳔ' => 'نخ',
  'ﳕ' => 'نم',
  'ﳖ' => 'نه',
  'ﳗ' => 'هج',
  'ﳘ' => 'هم',
  'ﳙ' => 'هٰ',
  'ﳚ' => 'يج',
  'ﳛ' => 'يح',
  'ﳜ' => 'يخ',
  'ﳝ' => 'يم',
  'ﳞ' => 'يه',
  'ﳟ' => 'ئم',
  'ﳠ' => 'ئه',
  'ﳡ' => 'بم',
  'ﳢ' => 'به',
  'ﳣ' => 'تم',
  'ﳤ' => 'ته',
  'ﳥ' => 'ثم',
  'ﳦ' => 'ثه',
  'ﳧ' => 'سم',
  'ﳨ' => 'سه',
  'ﳩ' => 'شم',
  'ﳪ' => 'شه',
  'ﳫ' => 'كل',
  'ﳬ' => 'كم',
  'ﳭ' => 'لم',
  'ﳮ' => 'نم',
  'ﳯ' => 'نه',
  'ﳰ' => 'يم',
  'ﳱ' => 'يه',
  'ﳲ' => 'ـَّ',
  'ﳳ' => 'ـُّ',
  'ﳴ' => 'ـِّ',
  'ﳵ' => 'طى',
  'ﳶ' => 'طي',
  'ﳷ' => 'عى',
  'ﳸ' => 'عي',
  'ﳹ' => 'غى',
  'ﳺ' => 'غي',
  'ﳻ' => 'سى',
  'ﳼ' => 'سي',
  'ﳽ' => 'شى',
  'ﳾ' => 'شي',
  'ﳿ' => 'حى',
  'ﴀ' => 'حي',
  'ﴁ' => 'جى',
  'ﴂ' => 'جي',
  'ﴃ' => 'خى',
  'ﴄ' => 'خي',
  'ﴅ' => 'صى',
  'ﴆ' => 'صي',
  'ﴇ' => 'ضى',
  'ﴈ' => 'ضي',
  'ﴉ' => 'شج',
  'ﴊ' => 'شح',
  'ﴋ' => 'شخ',
  'ﴌ' => 'شم',
  'ﴍ' => 'شر',
  'ﴎ' => 'سر',
  'ﴏ' => 'صر',
  'ﴐ' => 'ضر',
  'ﴑ' => 'طى',
  'ﴒ' => 'طي',
  'ﴓ' => 'عى',
  'ﴔ' => 'عي',
  'ﴕ' => 'غى',
  'ﴖ' => 'غي',
  'ﴗ' => 'سى',
  'ﴘ' => 'سي',
  'ﴙ' => 'شى',
  'ﴚ' => 'شي',
  'ﴛ' => 'حى',
  'ﴜ' => 'حي',
  'ﴝ' => 'جى',
  'ﴞ' => 'جي',
  'ﴟ' => 'خى',
  'ﴠ' => 'خي',
  'ﴡ' => 'صى',
  'ﴢ' => 'صي',
  'ﴣ' => 'ضى',
  'ﴤ' => 'ضي',
  'ﴥ' => 'شج',
  'ﴦ' => 'شح',
  'ﴧ' => 'شخ',
  'ﴨ' => 'شم',
  'ﴩ' => 'شر',
  'ﴪ' => 'سر',
  'ﴫ' => 'صر',
  'ﴬ' => 'ضر',
  'ﴭ' => 'شج',
  'ﴮ' => 'شح',
  'ﴯ' => 'شخ',
  'ﴰ' => 'شم',
  'ﴱ' => 'سه',
  'ﴲ' => 'شه',
  'ﴳ' => 'طم',
  'ﴴ' => 'سج',
  'ﴵ' => 'سح',
  'ﴶ' => 'سخ',
  'ﴷ' => 'شج',
  'ﴸ' => 'شح',
  'ﴹ' => 'شخ',
  'ﴺ' => 'طم',
  'ﴻ' => 'ظم',
  'ﴼ' => 'اً',
  'ﴽ' => 'اً',
  'ﵐ' => 'تجم',
  'ﵑ' => 'تحج',
  'ﵒ' => 'تحج',
  'ﵓ' => 'تحم',
  'ﵔ' => 'تخم',
  'ﵕ' => 'تمج',
  'ﵖ' => 'تمح',
  'ﵗ' => 'تمخ',
  'ﵘ' => 'جمح',
  'ﵙ' => 'جمح',
  'ﵚ' => 'حمي',
  'ﵛ' => 'حمى',
  'ﵜ' => 'سحج',
  'ﵝ' => 'سجح',
  'ﵞ' => 'سجى',
  'ﵟ' => 'سمح',
  'ﵠ' => 'سمح',
  'ﵡ' => 'سمج',
  'ﵢ' => 'سمم',
  'ﵣ' => 'سمم',
  'ﵤ' => 'صحح',
  'ﵥ' => 'صحح',
  'ﵦ' => 'صمم',
  'ﵧ' => 'شحم',
  'ﵨ' => 'شحم',
  'ﵩ' => 'شجي',
  'ﵪ' => 'شمخ',
  'ﵫ' => 'شمخ',
  'ﵬ' => 'شمم',
  'ﵭ' => 'شمم',
  'ﵮ' => 'ضحى',
  'ﵯ' => 'ضخم',
  'ﵰ' => 'ضخم',
  'ﵱ' => 'طمح',
  'ﵲ' => 'طمح',
  'ﵳ' => 'طمم',
  'ﵴ' => 'طمي',
  'ﵵ' => 'عجم',
  'ﵶ' => 'عمم',
  'ﵷ' => 'عمم',
  'ﵸ' => 'عمى',
  'ﵹ' => 'غمم',
  'ﵺ' => 'غمي',
  'ﵻ' => 'غمى',
  'ﵼ' => 'فخم',
  'ﵽ' => 'فخم',
  'ﵾ' => 'قمح',
  'ﵿ' => 'قمم',
  'ﶀ' => 'لحم',
  'ﶁ' => 'لحي',
  'ﶂ' => 'لحى',
  'ﶃ' => 'لجج',
  'ﶄ' => 'لجج',
  'ﶅ' => 'لخم',
  'ﶆ' => 'لخم',
  'ﶇ' => 'لمح',
  'ﶈ' => 'لمح',
  'ﶉ' => 'محج',
  'ﶊ' => 'محم',
  'ﶋ' => 'محي',
  'ﶌ' => 'مجح',
  'ﶍ' => 'مجم',
  'ﶎ' => 'مخج',
  'ﶏ' => 'مخم',
  'ﶒ' => 'مجخ',
  'ﶓ' => 'همج',
  'ﶔ' => 'همم',
  'ﶕ' => 'نحم',
  'ﶖ' => 'نحى',
  'ﶗ' => 'نجم',
  'ﶘ' => 'نجم',
  'ﶙ' => 'نجى',
  'ﶚ' => 'نمي',
  'ﶛ' => 'نمى',
  'ﶜ' => 'يمم',
  'ﶝ' => 'يمم',
  'ﶞ' => 'بخي',
  'ﶟ' => 'تجي',
  'ﶠ' => 'تجى',
  'ﶡ' => 'تخي',
  'ﶢ' => 'تخى',
  'ﶣ' => 'تمي',
  'ﶤ' => 'تمى',
  'ﶥ' => 'جمي',
  'ﶦ' => 'جحى',
  'ﶧ' => 'جمى',
  'ﶨ' => 'سخى',
  'ﶩ' => 'صحي',
  'ﶪ' => 'شحي',
  'ﶫ' => 'ضحي',
  'ﶬ' => 'لجي',
  'ﶭ' => 'لمي',
  'ﶮ' => 'يحي',
  'ﶯ' => 'يجي',
  'ﶰ' => 'يمي',
  'ﶱ' => 'ممي',
  'ﶲ' => 'قمي',
  'ﶳ' => 'نحي',
  'ﶴ' => 'قمح',
  'ﶵ' => 'لحم',
  'ﶶ' => 'عمي',
  'ﶷ' => 'كمي',
  'ﶸ' => 'نجح',
  'ﶹ' => 'مخي',
  'ﶺ' => 'لجم',
  'ﶻ' => 'كمم',
  'ﶼ' => 'لجم',
  'ﶽ' => 'نجح',
  'ﶾ' => 'جحي',
  'ﶿ' => 'حجي',
  'ﷀ' => 'مجي',
  'ﷁ' => 'فمي',
  'ﷂ' => 'بحي',
  'ﷃ' => 'كمم',
  'ﷄ' => 'عجم',
  'ﷅ' => 'صمم',
  'ﷆ' => 'سخي',
  'ﷇ' => 'نجي',
  'ﷰ' => 'صلے',
  'ﷱ' => 'قلے',
  'ﷲ' => 'الله',
  'ﷳ' => 'اكبر',
  'ﷴ' => 'محمد',
  'ﷵ' => 'صلعم',
  'ﷶ' => 'رسول',
  'ﷷ' => 'عليه',
  'ﷸ' => 'وسلم',
  'ﷹ' => 'صلى',
  'ﷺ' => 'صلى الله عليه وسلم',
  'ﷻ' => 'جل جلاله',
  '﷼' => 'ریال',
  '︐' => ',',
  '︑' => '、',
  '︒' => '。',
  '︓' => ':',
  '︔' => ';',
  '︕' => '!',
  '︖' => '?',
  '︗' => '〖',
  '︘' => '〗',
  '︙' => '...',
  '︰' => '..',
  '︱' => '—',
  '︲' => '–',
  '︳' => '_',
  '︴' => '_',
  '︵' => '(',
  '︶' => ')',
  '︷' => '{',
  '︸' => '}',
  '︹' => '〔',
  '︺' => '〕',
  '︻' => '【',
  '︼' => '】',
  '︽' => '《',
  '︾' => '》',
  '︿' => '〈',
  '﹀' => '〉',
  '﹁' => '「',
  '﹂' => '」',
  '﹃' => '『',
  '﹄' => '』',
  '﹇' => '[',
  '﹈' => ']',
  '﹉' => ' ̅',
  '﹊' => ' ̅',
  '﹋' => ' ̅',
  '﹌' => ' ̅',
  '﹍' => '_',
  '﹎' => '_',
  '﹏' => '_',
  '﹐' => ',',
  '﹑' => '、',
  '﹒' => '.',
  '﹔' => ';',
  '﹕' => ':',
  '﹖' => '?',
  '﹗' => '!',
  '﹘' => '—',
  '﹙' => '(',
  '﹚' => ')',
  '﹛' => '{',
  '﹜' => '}',
  '﹝' => '〔',
  '﹞' => '〕',
  '﹟' => '#',
  '﹠' => '&',
  '﹡' => '*',
  '﹢' => '+',
  '﹣' => '-',
  '﹤' => '<',
  '﹥' => '>',
  '﹦' => '=',
  '﹨' => '\\',
  '﹩' => '$',
  '﹪' => '%',
  '﹫' => '@',
  'ﹰ' => ' ً',
  'ﹱ' => 'ـً',
  'ﹲ' => ' ٌ',
  'ﹴ' => ' ٍ',
  'ﹶ' => ' َ',
  'ﹷ' => 'ـَ',
  'ﹸ' => ' ُ',
  'ﹹ' => 'ـُ',
  'ﹺ' => ' ِ',
  'ﹻ' => 'ـِ',
  'ﹼ' => ' ّ',
  'ﹽ' => 'ـّ',
  'ﹾ' => ' ْ',
  'ﹿ' => 'ـْ',
  'ﺀ' => 'ء',
  'ﺁ' => 'آ',
  'ﺂ' => 'آ',
  'ﺃ' => 'أ',
  'ﺄ' => 'أ',
  'ﺅ' => 'ؤ',
  'ﺆ' => 'ؤ',
  'ﺇ' => 'إ',
  'ﺈ' => 'إ',
  'ﺉ' => 'ئ',
  'ﺊ' => 'ئ',
  'ﺋ' => 'ئ',
  'ﺌ' => 'ئ',
  'ﺍ' => 'ا',
  'ﺎ' => 'ا',
  'ﺏ' => 'ب',
  'ﺐ' => 'ب',
  'ﺑ' => 'ب',
  'ﺒ' => 'ب',
  'ﺓ' => 'ة',
  'ﺔ' => 'ة',
  'ﺕ' => 'ت',
  'ﺖ' => 'ت',
  'ﺗ' => 'ت',
  'ﺘ' => 'ت',
  'ﺙ' => 'ث',
  'ﺚ' => 'ث',
  'ﺛ' => 'ث',
  'ﺜ' => 'ث',
  'ﺝ' => 'ج',
  'ﺞ' => 'ج',
  'ﺟ' => 'ج',
  'ﺠ' => 'ج',
  'ﺡ' => 'ح',
  'ﺢ' => 'ح',
  'ﺣ' => 'ح',
  'ﺤ' => 'ح',
  'ﺥ' => 'خ',
  'ﺦ' => 'خ',
  'ﺧ' => 'خ',
  'ﺨ' => 'خ',
  'ﺩ' => 'د',
  'ﺪ' => 'د',
  'ﺫ' => 'ذ',
  'ﺬ' => 'ذ',
  'ﺭ' => 'ر',
  'ﺮ' => 'ر',
  'ﺯ' => 'ز',
  'ﺰ' => 'ز',
  'ﺱ' => 'س',
  'ﺲ' => 'س',
  'ﺳ' => 'س',
  'ﺴ' => 'س',
  'ﺵ' => 'ش',
  'ﺶ' => 'ش',
  'ﺷ' => 'ش',
  'ﺸ' => 'ش',
  'ﺹ' => 'ص',
  'ﺺ' => 'ص',
  'ﺻ' => 'ص',
  'ﺼ' => 'ص',
  'ﺽ' => 'ض',
  'ﺾ' => 'ض',
  'ﺿ' => 'ض',
  'ﻀ' => 'ض',
  'ﻁ' => 'ط',
  'ﻂ' => 'ط',
  'ﻃ' => 'ط',
  'ﻄ' => 'ط',
  'ﻅ' => 'ظ',
  'ﻆ' => 'ظ',
  'ﻇ' => 'ظ',
  'ﻈ' => 'ظ',
  'ﻉ' => 'ع',
  'ﻊ' => 'ع',
  'ﻋ' => 'ع',
  'ﻌ' => 'ع',
  'ﻍ' => 'غ',
  'ﻎ' => 'غ',
  'ﻏ' => 'غ',
  'ﻐ' => 'غ',
  'ﻑ' => 'ف',
  'ﻒ' => 'ف',
  'ﻓ' => 'ف',
  'ﻔ' => 'ف',
  'ﻕ' => 'ق',
  'ﻖ' => 'ق',
  'ﻗ' => 'ق',
  'ﻘ' => 'ق',
  'ﻙ' => 'ك',
  'ﻚ' => 'ك',
  'ﻛ' => 'ك',
  'ﻜ' => 'ك',
  'ﻝ' => 'ل',
  'ﻞ' => 'ل',
  'ﻟ' => 'ل',
  'ﻠ' => 'ل',
  'ﻡ' => 'م',
  'ﻢ' => 'م',
  'ﻣ' => 'م',
  'ﻤ' => 'م',
  'ﻥ' => 'ن',
  'ﻦ' => 'ن',
  'ﻧ' => 'ن',
  'ﻨ' => 'ن',
  'ﻩ' => 'ه',
  'ﻪ' => 'ه',
  'ﻫ' => 'ه',
  'ﻬ' => 'ه',
  'ﻭ' => 'و',
  'ﻮ' => 'و',
  'ﻯ' => 'ى',
  'ﻰ' => 'ى',
  'ﻱ' => 'ي',
  'ﻲ' => 'ي',
  'ﻳ' => 'ي',
  'ﻴ' => 'ي',
  'ﻵ' => 'لآ',
  'ﻶ' => 'لآ',
  'ﻷ' => 'لأ',
  'ﻸ' => 'لأ',
  'ﻹ' => 'لإ',
  'ﻺ' => 'لإ',
  'ﻻ' => 'لا',
  'ﻼ' => 'لا',
  '!' => '!',
  '"' => '"',
  '#' => '#',
  '$' => '$',
  '%' => '%',
  '&' => '&',
  ''' => '\'',
  '(' => '(',
  ')' => ')',
  '*' => '*',
  '+' => '+',
  ',' => ',',
  '-' => '-',
  '.' => '.',
  '/' => '/',
  '0' => '0',
  '1' => '1',
  '2' => '2',
  '3' => '3',
  '4' => '4',
  '5' => '5',
  '6' => '6',
  '7' => '7',
  '8' => '8',
  '9' => '9',
  ':' => ':',
  ';' => ';',
  '<' => '<',
  '=' => '=',
  '>' => '>',
  '?' => '?',
  '@' => '@',
  'A' => 'A',
  'B' => 'B',
  'C' => 'C',
  'D' => 'D',
  'E' => 'E',
  'F' => 'F',
  'G' => 'G',
  'H' => 'H',
  'I' => 'I',
  'J' => 'J',
  'K' => 'K',
  'L' => 'L',
  'M' => 'M',
  'N' => 'N',
  'O' => 'O',
  'P' => 'P',
  'Q' => 'Q',
  'R' => 'R',
  'S' => 'S',
  'T' => 'T',
  'U' => 'U',
  'V' => 'V',
  'W' => 'W',
  'X' => 'X',
  'Y' => 'Y',
  'Z' => 'Z',
  '[' => '[',
  '\' => '\\',
  ']' => ']',
  '^' => '^',
  '_' => '_',
  '`' => '`',
  'a' => 'a',
  'b' => 'b',
  'c' => 'c',
  'd' => 'd',
  'e' => 'e',
  'f' => 'f',
  'g' => 'g',
  'h' => 'h',
  'i' => 'i',
  'j' => 'j',
  'k' => 'k',
  'l' => 'l',
  'm' => 'm',
  'n' => 'n',
  'o' => 'o',
  'p' => 'p',
  'q' => 'q',
  'r' => 'r',
  's' => 's',
  't' => 't',
  'u' => 'u',
  'v' => 'v',
  'w' => 'w',
  'x' => 'x',
  'y' => 'y',
  'z' => 'z',
  '{' => '{',
  '|' => '|',
  '}' => '}',
  '~' => '~',
  '⦅' => '⦅',
  '⦆' => '⦆',
  '。' => '。',
  '「' => '「',
  '」' => '」',
  '、' => '、',
  '・' => '・',
  'ヲ' => 'ヲ',
  'ァ' => 'ァ',
  'ィ' => 'ィ',
  'ゥ' => 'ゥ',
  'ェ' => 'ェ',
  'ォ' => 'ォ',
  'ャ' => 'ャ',
  'ュ' => 'ュ',
  'ョ' => 'ョ',
  'ッ' => 'ッ',
  'ー' => 'ー',
  'ア' => 'ア',
  'イ' => 'イ',
  'ウ' => 'ウ',
  'エ' => 'エ',
  'オ' => 'オ',
  'カ' => 'カ',
  'キ' => 'キ',
  'ク' => 'ク',
  'ケ' => 'ケ',
  'コ' => 'コ',
  'サ' => 'サ',
  'シ' => 'シ',
  'ス' => 'ス',
  'セ' => 'セ',
  'ソ' => 'ソ',
  'タ' => 'タ',
  'チ' => 'チ',
  'ツ' => 'ツ',
  'テ' => 'テ',
  'ト' => 'ト',
  'ナ' => 'ナ',
  'ニ' => 'ニ',
  'ヌ' => 'ヌ',
  'ネ' => 'ネ',
  'ノ' => 'ノ',
  'ハ' => 'ハ',
  'ヒ' => 'ヒ',
  'フ' => 'フ',
  'ヘ' => 'ヘ',
  'ホ' => 'ホ',
  'マ' => 'マ',
  'ミ' => 'ミ',
  'ム' => 'ム',
  'メ' => 'メ',
  'モ' => 'モ',
  'ヤ' => 'ヤ',
  'ユ' => 'ユ',
  'ヨ' => 'ヨ',
  'ラ' => 'ラ',
  'リ' => 'リ',
  'ル' => 'ル',
  'レ' => 'レ',
  'ロ' => 'ロ',
  'ワ' => 'ワ',
  'ン' => 'ン',
  '゙' => '゙',
  '゚' => '゚',
  'ᅠ' => 'ᅠ',
  'ᄀ' => 'ᄀ',
  'ᄁ' => 'ᄁ',
  'ᆪ' => 'ᆪ',
  'ᄂ' => 'ᄂ',
  'ᆬ' => 'ᆬ',
  'ᆭ' => 'ᆭ',
  'ᄃ' => 'ᄃ',
  'ᄄ' => 'ᄄ',
  'ᄅ' => 'ᄅ',
  'ᆰ' => 'ᆰ',
  'ᆱ' => 'ᆱ',
  'ᆲ' => 'ᆲ',
  'ᆳ' => 'ᆳ',
  'ᆴ' => 'ᆴ',
  'ᆵ' => 'ᆵ',
  'ᄚ' => 'ᄚ',
  'ᄆ' => 'ᄆ',
  'ᄇ' => 'ᄇ',
  'ᄈ' => 'ᄈ',
  'ᄡ' => 'ᄡ',
  'ᄉ' => 'ᄉ',
  'ᄊ' => 'ᄊ',
  'ᄋ' => 'ᄋ',
  'ᄌ' => 'ᄌ',
  'ᄍ' => 'ᄍ',
  'ᄎ' => 'ᄎ',
  'ᄏ' => 'ᄏ',
  'ᄐ' => 'ᄐ',
  'ᄑ' => 'ᄑ',
  'ᄒ' => 'ᄒ',
  'ᅡ' => 'ᅡ',
  'ᅢ' => 'ᅢ',
  'ᅣ' => 'ᅣ',
  'ᅤ' => 'ᅤ',
  'ᅥ' => 'ᅥ',
  'ᅦ' => 'ᅦ',
  'ᅧ' => 'ᅧ',
  'ᅨ' => 'ᅨ',
  'ᅩ' => 'ᅩ',
  'ᅪ' => 'ᅪ',
  'ᅫ' => 'ᅫ',
  'ᅬ' => 'ᅬ',
  'ᅭ' => 'ᅭ',
  'ᅮ' => 'ᅮ',
  'ᅯ' => 'ᅯ',
  'ᅰ' => 'ᅰ',
  'ᅱ' => 'ᅱ',
  'ᅲ' => 'ᅲ',
  'ᅳ' => 'ᅳ',
  'ᅴ' => 'ᅴ',
  'ᅵ' => 'ᅵ',
  '¢' => '¢',
  '£' => '£',
  '¬' => '¬',
  ' ̄' => ' ̄',
  '¦' => '¦',
  '¥' => '¥',
  '₩' => '₩',
  '│' => '│',
  '←' => '←',
  '↑' => '↑',
  '→' => '→',
  '↓' => '↓',
  '■' => '■',
  '○' => '○',
  '𝐀' => 'A',
  '𝐁' => 'B',
  '𝐂' => 'C',
  '𝐃' => 'D',
  '𝐄' => 'E',
  '𝐅' => 'F',
  '𝐆' => 'G',
  '𝐇' => 'H',
  '𝐈' => 'I',
  '𝐉' => 'J',
  '𝐊' => 'K',
  '𝐋' => 'L',
  '𝐌' => 'M',
  '𝐍' => 'N',
  '𝐎' => 'O',
  '𝐏' => 'P',
  '𝐐' => 'Q',
  '𝐑' => 'R',
  '𝐒' => 'S',
  '𝐓' => 'T',
  '𝐔' => 'U',
  '𝐕' => 'V',
  '𝐖' => 'W',
  '𝐗' => 'X',
  '𝐘' => 'Y',
  '𝐙' => 'Z',
  '𝐚' => 'a',
  '𝐛' => 'b',
  '𝐜' => 'c',
  '𝐝' => 'd',
  '𝐞' => 'e',
  '𝐟' => 'f',
  '𝐠' => 'g',
  '𝐡' => 'h',
  '𝐢' => 'i',
  '𝐣' => 'j',
  '𝐤' => 'k',
  '𝐥' => 'l',
  '𝐦' => 'm',
  '𝐧' => 'n',
  '𝐨' => 'o',
  '𝐩' => 'p',
  '𝐪' => 'q',
  '𝐫' => 'r',
  '𝐬' => 's',
  '𝐭' => 't',
  '𝐮' => 'u',
  '𝐯' => 'v',
  '𝐰' => 'w',
  '𝐱' => 'x',
  '𝐲' => 'y',
  '𝐳' => 'z',
  '𝐴' => 'A',
  '𝐵' => 'B',
  '𝐶' => 'C',
  '𝐷' => 'D',
  '𝐸' => 'E',
  '𝐹' => 'F',
  '𝐺' => 'G',
  '𝐻' => 'H',
  '𝐼' => 'I',
  '𝐽' => 'J',
  '𝐾' => 'K',
  '𝐿' => 'L',
  '𝑀' => 'M',
  '𝑁' => 'N',
  '𝑂' => 'O',
  '𝑃' => 'P',
  '𝑄' => 'Q',
  '𝑅' => 'R',
  '𝑆' => 'S',
  '𝑇' => 'T',
  '𝑈' => 'U',
  '𝑉' => 'V',
  '𝑊' => 'W',
  '𝑋' => 'X',
  '𝑌' => 'Y',
  '𝑍' => 'Z',
  '𝑎' => 'a',
  '𝑏' => 'b',
  '𝑐' => 'c',
  '𝑑' => 'd',
  '𝑒' => 'e',
  '𝑓' => 'f',
  '𝑔' => 'g',
  '𝑖' => 'i',
  '𝑗' => 'j',
  '𝑘' => 'k',
  '𝑙' => 'l',
  '𝑚' => 'm',
  '𝑛' => 'n',
  '𝑜' => 'o',
  '𝑝' => 'p',
  '𝑞' => 'q',
  '𝑟' => 'r',
  '𝑠' => 's',
  '𝑡' => 't',
  '𝑢' => 'u',
  '𝑣' => 'v',
  '𝑤' => 'w',
  '𝑥' => 'x',
  '𝑦' => 'y',
  '𝑧' => 'z',
  '𝑨' => 'A',
  '𝑩' => 'B',
  '𝑪' => 'C',
  '𝑫' => 'D',
  '𝑬' => 'E',
  '𝑭' => 'F',
  '𝑮' => 'G',
  '𝑯' => 'H',
  '𝑰' => 'I',
  '𝑱' => 'J',
  '𝑲' => 'K',
  '𝑳' => 'L',
  '𝑴' => 'M',
  '𝑵' => 'N',
  '𝑶' => 'O',
  '𝑷' => 'P',
  '𝑸' => 'Q',
  '𝑹' => 'R',
  '𝑺' => 'S',
  '𝑻' => 'T',
  '𝑼' => 'U',
  '𝑽' => 'V',
  '𝑾' => 'W',
  '𝑿' => 'X',
  '𝒀' => 'Y',
  '𝒁' => 'Z',
  '𝒂' => 'a',
  '𝒃' => 'b',
  '𝒄' => 'c',
  '𝒅' => 'd',
  '𝒆' => 'e',
  '𝒇' => 'f',
  '𝒈' => 'g',
  '𝒉' => 'h',
  '𝒊' => 'i',
  '𝒋' => 'j',
  '𝒌' => 'k',
  '𝒍' => 'l',
  '𝒎' => 'm',
  '𝒏' => 'n',
  '𝒐' => 'o',
  '𝒑' => 'p',
  '𝒒' => 'q',
  '𝒓' => 'r',
  '𝒔' => 's',
  '𝒕' => 't',
  '𝒖' => 'u',
  '𝒗' => 'v',
  '𝒘' => 'w',
  '𝒙' => 'x',
  '𝒚' => 'y',
  '𝒛' => 'z',
  '𝒜' => 'A',
  '𝒞' => 'C',
  '𝒟' => 'D',
  '𝒢' => 'G',
  '𝒥' => 'J',
  '𝒦' => 'K',
  '𝒩' => 'N',
  '𝒪' => 'O',
  '𝒫' => 'P',
  '𝒬' => 'Q',
  '𝒮' => 'S',
  '𝒯' => 'T',
  '𝒰' => 'U',
  '𝒱' => 'V',
  '𝒲' => 'W',
  '𝒳' => 'X',
  '𝒴' => 'Y',
  '𝒵' => 'Z',
  '𝒶' => 'a',
  '𝒷' => 'b',
  '𝒸' => 'c',
  '𝒹' => 'd',
  '𝒻' => 'f',
  '𝒽' => 'h',
  '𝒾' => 'i',
  '𝒿' => 'j',
  '𝓀' => 'k',
  '𝓁' => 'l',
  '𝓂' => 'm',
  '𝓃' => 'n',
  '𝓅' => 'p',
  '𝓆' => 'q',
  '𝓇' => 'r',
  '𝓈' => 's',
  '𝓉' => 't',
  '𝓊' => 'u',
  '𝓋' => 'v',
  '𝓌' => 'w',
  '𝓍' => 'x',
  '𝓎' => 'y',
  '𝓏' => 'z',
  '𝓐' => 'A',
  '𝓑' => 'B',
  '𝓒' => 'C',
  '𝓓' => 'D',
  '𝓔' => 'E',
  '𝓕' => 'F',
  '𝓖' => 'G',
  '𝓗' => 'H',
  '𝓘' => 'I',
  '𝓙' => 'J',
  '𝓚' => 'K',
  '𝓛' => 'L',
  '𝓜' => 'M',
  '𝓝' => 'N',
  '𝓞' => 'O',
  '𝓟' => 'P',
  '𝓠' => 'Q',
  '𝓡' => 'R',
  '𝓢' => 'S',
  '𝓣' => 'T',
  '𝓤' => 'U',
  '𝓥' => 'V',
  '𝓦' => 'W',
  '𝓧' => 'X',
  '𝓨' => 'Y',
  '𝓩' => 'Z',
  '𝓪' => 'a',
  '𝓫' => 'b',
  '𝓬' => 'c',
  '𝓭' => 'd',
  '𝓮' => 'e',
  '𝓯' => 'f',
  '𝓰' => 'g',
  '𝓱' => 'h',
  '𝓲' => 'i',
  '𝓳' => 'j',
  '𝓴' => 'k',
  '𝓵' => 'l',
  '𝓶' => 'm',
  '𝓷' => 'n',
  '𝓸' => 'o',
  '𝓹' => 'p',
  '𝓺' => 'q',
  '𝓻' => 'r',
  '𝓼' => 's',
  '𝓽' => 't',
  '𝓾' => 'u',
  '𝓿' => 'v',
  '𝔀' => 'w',
  '𝔁' => 'x',
  '𝔂' => 'y',
  '𝔃' => 'z',
  '𝔄' => 'A',
  '𝔅' => 'B',
  '𝔇' => 'D',
  '𝔈' => 'E',
  '𝔉' => 'F',
  '𝔊' => 'G',
  '𝔍' => 'J',
  '𝔎' => 'K',
  '𝔏' => 'L',
  '𝔐' => 'M',
  '𝔑' => 'N',
  '𝔒' => 'O',
  '𝔓' => 'P',
  '𝔔' => 'Q',
  '𝔖' => 'S',
  '𝔗' => 'T',
  '𝔘' => 'U',
  '𝔙' => 'V',
  '𝔚' => 'W',
  '𝔛' => 'X',
  '𝔜' => 'Y',
  '𝔞' => 'a',
  '𝔟' => 'b',
  '𝔠' => 'c',
  '𝔡' => 'd',
  '𝔢' => 'e',
  '𝔣' => 'f',
  '𝔤' => 'g',
  '𝔥' => 'h',
  '𝔦' => 'i',
  '𝔧' => 'j',
  '𝔨' => 'k',
  '𝔩' => 'l',
  '𝔪' => 'm',
  '𝔫' => 'n',
  '𝔬' => 'o',
  '𝔭' => 'p',
  '𝔮' => 'q',
  '𝔯' => 'r',
  '𝔰' => 's',
  '𝔱' => 't',
  '𝔲' => 'u',
  '𝔳' => 'v',
  '𝔴' => 'w',
  '𝔵' => 'x',
  '𝔶' => 'y',
  '𝔷' => 'z',
  '𝔸' => 'A',
  '𝔹' => 'B',
  '𝔻' => 'D',
  '𝔼' => 'E',
  '𝔽' => 'F',
  '𝔾' => 'G',
  '𝕀' => 'I',
  '𝕁' => 'J',
  '𝕂' => 'K',
  '𝕃' => 'L',
  '𝕄' => 'M',
  '𝕆' => 'O',
  '𝕊' => 'S',
  '𝕋' => 'T',
  '𝕌' => 'U',
  '𝕍' => 'V',
  '𝕎' => 'W',
  '𝕏' => 'X',
  '𝕐' => 'Y',
  '𝕒' => 'a',
  '𝕓' => 'b',
  '𝕔' => 'c',
  '𝕕' => 'd',
  '𝕖' => 'e',
  '𝕗' => 'f',
  '𝕘' => 'g',
  '𝕙' => 'h',
  '𝕚' => 'i',
  '𝕛' => 'j',
  '𝕜' => 'k',
  '𝕝' => 'l',
  '𝕞' => 'm',
  '𝕟' => 'n',
  '𝕠' => 'o',
  '𝕡' => 'p',
  '𝕢' => 'q',
  '𝕣' => 'r',
  '𝕤' => 's',
  '𝕥' => 't',
  '𝕦' => 'u',
  '𝕧' => 'v',
  '𝕨' => 'w',
  '𝕩' => 'x',
  '𝕪' => 'y',
  '𝕫' => 'z',
  '𝕬' => 'A',
  '𝕭' => 'B',
  '𝕮' => 'C',
  '𝕯' => 'D',
  '𝕰' => 'E',
  '𝕱' => 'F',
  '𝕲' => 'G',
  '𝕳' => 'H',
  '𝕴' => 'I',
  '𝕵' => 'J',
  '𝕶' => 'K',
  '𝕷' => 'L',
  '𝕸' => 'M',
  '𝕹' => 'N',
  '𝕺' => 'O',
  '𝕻' => 'P',
  '𝕼' => 'Q',
  '𝕽' => 'R',
  '𝕾' => 'S',
  '𝕿' => 'T',
  '𝖀' => 'U',
  '𝖁' => 'V',
  '𝖂' => 'W',
  '𝖃' => 'X',
  '𝖄' => 'Y',
  '𝖅' => 'Z',
  '𝖆' => 'a',
  '𝖇' => 'b',
  '𝖈' => 'c',
  '𝖉' => 'd',
  '𝖊' => 'e',
  '𝖋' => 'f',
  '𝖌' => 'g',
  '𝖍' => 'h',
  '𝖎' => 'i',
  '𝖏' => 'j',
  '𝖐' => 'k',
  '𝖑' => 'l',
  '𝖒' => 'm',
  '𝖓' => 'n',
  '𝖔' => 'o',
  '𝖕' => 'p',
  '𝖖' => 'q',
  '𝖗' => 'r',
  '𝖘' => 's',
  '𝖙' => 't',
  '𝖚' => 'u',
  '𝖛' => 'v',
  '𝖜' => 'w',
  '𝖝' => 'x',
  '𝖞' => 'y',
  '𝖟' => 'z',
  '𝖠' => 'A',
  '𝖡' => 'B',
  '𝖢' => 'C',
  '𝖣' => 'D',
  '𝖤' => 'E',
  '𝖥' => 'F',
  '𝖦' => 'G',
  '𝖧' => 'H',
  '𝖨' => 'I',
  '𝖩' => 'J',
  '𝖪' => 'K',
  '𝖫' => 'L',
  '𝖬' => 'M',
  '𝖭' => 'N',
  '𝖮' => 'O',
  '𝖯' => 'P',
  '𝖰' => 'Q',
  '𝖱' => 'R',
  '𝖲' => 'S',
  '𝖳' => 'T',
  '𝖴' => 'U',
  '𝖵' => 'V',
  '𝖶' => 'W',
  '𝖷' => 'X',
  '𝖸' => 'Y',
  '𝖹' => 'Z',
  '𝖺' => 'a',
  '𝖻' => 'b',
  '𝖼' => 'c',
  '𝖽' => 'd',
  '𝖾' => 'e',
  '𝖿' => 'f',
  '𝗀' => 'g',
  '𝗁' => 'h',
  '𝗂' => 'i',
  '𝗃' => 'j',
  '𝗄' => 'k',
  '𝗅' => 'l',
  '𝗆' => 'm',
  '𝗇' => 'n',
  '𝗈' => 'o',
  '𝗉' => 'p',
  '𝗊' => 'q',
  '𝗋' => 'r',
  '𝗌' => 's',
  '𝗍' => 't',
  '𝗎' => 'u',
  '𝗏' => 'v',
  '𝗐' => 'w',
  '𝗑' => 'x',
  '𝗒' => 'y',
  '𝗓' => 'z',
  '𝗔' => 'A',
  '𝗕' => 'B',
  '𝗖' => 'C',
  '𝗗' => 'D',
  '𝗘' => 'E',
  '𝗙' => 'F',
  '𝗚' => 'G',
  '𝗛' => 'H',
  '𝗜' => 'I',
  '𝗝' => 'J',
  '𝗞' => 'K',
  '𝗟' => 'L',
  '𝗠' => 'M',
  '𝗡' => 'N',
  '𝗢' => 'O',
  '𝗣' => 'P',
  '𝗤' => 'Q',
  '𝗥' => 'R',
  '𝗦' => 'S',
  '𝗧' => 'T',
  '𝗨' => 'U',
  '𝗩' => 'V',
  '𝗪' => 'W',
  '𝗫' => 'X',
  '𝗬' => 'Y',
  '𝗭' => 'Z',
  '𝗮' => 'a',
  '𝗯' => 'b',
  '𝗰' => 'c',
  '𝗱' => 'd',
  '𝗲' => 'e',
  '𝗳' => 'f',
  '𝗴' => 'g',
  '𝗵' => 'h',
  '𝗶' => 'i',
  '𝗷' => 'j',
  '𝗸' => 'k',
  '𝗹' => 'l',
  '𝗺' => 'm',
  '𝗻' => 'n',
  '𝗼' => 'o',
  '𝗽' => 'p',
  '𝗾' => 'q',
  '𝗿' => 'r',
  '𝘀' => 's',
  '𝘁' => 't',
  '𝘂' => 'u',
  '𝘃' => 'v',
  '𝘄' => 'w',
  '𝘅' => 'x',
  '𝘆' => 'y',
  '𝘇' => 'z',
  '𝘈' => 'A',
  '𝘉' => 'B',
  '𝘊' => 'C',
  '𝘋' => 'D',
  '𝘌' => 'E',
  '𝘍' => 'F',
  '𝘎' => 'G',
  '𝘏' => 'H',
  '𝘐' => 'I',
  '𝘑' => 'J',
  '𝘒' => 'K',
  '𝘓' => 'L',
  '𝘔' => 'M',
  '𝘕' => 'N',
  '𝘖' => 'O',
  '𝘗' => 'P',
  '𝘘' => 'Q',
  '𝘙' => 'R',
  '𝘚' => 'S',
  '𝘛' => 'T',
  '𝘜' => 'U',
  '𝘝' => 'V',
  '𝘞' => 'W',
  '𝘟' => 'X',
  '𝘠' => 'Y',
  '𝘡' => 'Z',
  '𝘢' => 'a',
  '𝘣' => 'b',
  '𝘤' => 'c',
  '𝘥' => 'd',
  '𝘦' => 'e',
  '𝘧' => 'f',
  '𝘨' => 'g',
  '𝘩' => 'h',
  '𝘪' => 'i',
  '𝘫' => 'j',
  '𝘬' => 'k',
  '𝘭' => 'l',
  '𝘮' => 'm',
  '𝘯' => 'n',
  '𝘰' => 'o',
  '𝘱' => 'p',
  '𝘲' => 'q',
  '𝘳' => 'r',
  '𝘴' => 's',
  '𝘵' => 't',
  '𝘶' => 'u',
  '𝘷' => 'v',
  '𝘸' => 'w',
  '𝘹' => 'x',
  '𝘺' => 'y',
  '𝘻' => 'z',
  '𝘼' => 'A',
  '𝘽' => 'B',
  '𝘾' => 'C',
  '𝘿' => 'D',
  '𝙀' => 'E',
  '𝙁' => 'F',
  '𝙂' => 'G',
  '𝙃' => 'H',
  '𝙄' => 'I',
  '𝙅' => 'J',
  '𝙆' => 'K',
  '𝙇' => 'L',
  '𝙈' => 'M',
  '𝙉' => 'N',
  '𝙊' => 'O',
  '𝙋' => 'P',
  '𝙌' => 'Q',
  '𝙍' => 'R',
  '𝙎' => 'S',
  '𝙏' => 'T',
  '𝙐' => 'U',
  '𝙑' => 'V',
  '𝙒' => 'W',
  '𝙓' => 'X',
  '𝙔' => 'Y',
  '𝙕' => 'Z',
  '𝙖' => 'a',
  '𝙗' => 'b',
  '𝙘' => 'c',
  '𝙙' => 'd',
  '𝙚' => 'e',
  '𝙛' => 'f',
  '𝙜' => 'g',
  '𝙝' => 'h',
  '𝙞' => 'i',
  '𝙟' => 'j',
  '𝙠' => 'k',
  '𝙡' => 'l',
  '𝙢' => 'm',
  '𝙣' => 'n',
  '𝙤' => 'o',
  '𝙥' => 'p',
  '𝙦' => 'q',
  '𝙧' => 'r',
  '𝙨' => 's',
  '𝙩' => 't',
  '𝙪' => 'u',
  '𝙫' => 'v',
  '𝙬' => 'w',
  '𝙭' => 'x',
  '𝙮' => 'y',
  '𝙯' => 'z',
  '𝙰' => 'A',
  '𝙱' => 'B',
  '𝙲' => 'C',
  '𝙳' => 'D',
  '𝙴' => 'E',
  '𝙵' => 'F',
  '𝙶' => 'G',
  '𝙷' => 'H',
  '𝙸' => 'I',
  '𝙹' => 'J',
  '𝙺' => 'K',
  '𝙻' => 'L',
  '𝙼' => 'M',
  '𝙽' => 'N',
  '𝙾' => 'O',
  '𝙿' => 'P',
  '𝚀' => 'Q',
  '𝚁' => 'R',
  '𝚂' => 'S',
  '𝚃' => 'T',
  '𝚄' => 'U',
  '𝚅' => 'V',
  '𝚆' => 'W',
  '𝚇' => 'X',
  '𝚈' => 'Y',
  '𝚉' => 'Z',
  '𝚊' => 'a',
  '𝚋' => 'b',
  '𝚌' => 'c',
  '𝚍' => 'd',
  '𝚎' => 'e',
  '𝚏' => 'f',
  '𝚐' => 'g',
  '𝚑' => 'h',
  '𝚒' => 'i',
  '𝚓' => 'j',
  '𝚔' => 'k',
  '𝚕' => 'l',
  '𝚖' => 'm',
  '𝚗' => 'n',
  '𝚘' => 'o',
  '𝚙' => 'p',
  '𝚚' => 'q',
  '𝚛' => 'r',
  '𝚜' => 's',
  '𝚝' => 't',
  '𝚞' => 'u',
  '𝚟' => 'v',
  '𝚠' => 'w',
  '𝚡' => 'x',
  '𝚢' => 'y',
  '𝚣' => 'z',
  '𝚤' => 'ı',
  '𝚥' => 'ȷ',
  '𝚨' => 'Α',
  '𝚩' => 'Β',
  '𝚪' => 'Γ',
  '𝚫' => 'Δ',
  '𝚬' => 'Ε',
  '𝚭' => 'Ζ',
  '𝚮' => 'Η',
  '𝚯' => 'Θ',
  '𝚰' => 'Ι',
  '𝚱' => 'Κ',
  '𝚲' => 'Λ',
  '𝚳' => 'Μ',
  '𝚴' => 'Ν',
  '𝚵' => 'Ξ',
  '𝚶' => 'Ο',
  '𝚷' => 'Π',
  '𝚸' => 'Ρ',
  '𝚹' => 'Θ',
  '𝚺' => 'Σ',
  '𝚻' => 'Τ',
  '𝚼' => 'Υ',
  '𝚽' => 'Φ',
  '𝚾' => 'Χ',
  '𝚿' => 'Ψ',
  '𝛀' => 'Ω',
  '𝛁' => '∇',
  '𝛂' => 'α',
  '𝛃' => 'β',
  '𝛄' => 'γ',
  '𝛅' => 'δ',
  '𝛆' => 'ε',
  '𝛇' => 'ζ',
  '𝛈' => 'η',
  '𝛉' => 'θ',
  '𝛊' => 'ι',
  '𝛋' => 'κ',
  '𝛌' => 'λ',
  '𝛍' => 'μ',
  '𝛎' => 'ν',
  '𝛏' => 'ξ',
  '𝛐' => 'ο',
  '𝛑' => 'π',
  '𝛒' => 'ρ',
  '𝛓' => 'ς',
  '𝛔' => 'σ',
  '𝛕' => 'τ',
  '𝛖' => 'υ',
  '𝛗' => 'φ',
  '𝛘' => 'χ',
  '𝛙' => 'ψ',
  '𝛚' => 'ω',
  '𝛛' => '∂',
  '𝛜' => 'ε',
  '𝛝' => 'θ',
  '𝛞' => 'κ',
  '𝛟' => 'φ',
  '𝛠' => 'ρ',
  '𝛡' => 'π',
  '𝛢' => 'Α',
  '𝛣' => 'Β',
  '𝛤' => 'Γ',
  '𝛥' => 'Δ',
  '𝛦' => 'Ε',
  '𝛧' => 'Ζ',
  '𝛨' => 'Η',
  '𝛩' => 'Θ',
  '𝛪' => 'Ι',
  '𝛫' => 'Κ',
  '𝛬' => 'Λ',
  '𝛭' => 'Μ',
  '𝛮' => 'Ν',
  '𝛯' => 'Ξ',
  '𝛰' => 'Ο',
  '𝛱' => 'Π',
  '𝛲' => 'Ρ',
  '𝛳' => 'Θ',
  '𝛴' => 'Σ',
  '𝛵' => 'Τ',
  '𝛶' => 'Υ',
  '𝛷' => 'Φ',
  '𝛸' => 'Χ',
  '𝛹' => 'Ψ',
  '𝛺' => 'Ω',
  '𝛻' => '∇',
  '𝛼' => 'α',
  '𝛽' => 'β',
  '𝛾' => 'γ',
  '𝛿' => 'δ',
  '𝜀' => 'ε',
  '𝜁' => 'ζ',
  '𝜂' => 'η',
  '𝜃' => 'θ',
  '𝜄' => 'ι',
  '𝜅' => 'κ',
  '𝜆' => 'λ',
  '𝜇' => 'μ',
  '𝜈' => 'ν',
  '𝜉' => 'ξ',
  '𝜊' => 'ο',
  '𝜋' => 'π',
  '𝜌' => 'ρ',
  '𝜍' => 'ς',
  '𝜎' => 'σ',
  '𝜏' => 'τ',
  '𝜐' => 'υ',
  '𝜑' => 'φ',
  '𝜒' => 'χ',
  '𝜓' => 'ψ',
  '𝜔' => 'ω',
  '𝜕' => '∂',
  '𝜖' => 'ε',
  '𝜗' => 'θ',
  '𝜘' => 'κ',
  '𝜙' => 'φ',
  '𝜚' => 'ρ',
  '𝜛' => 'π',
  '𝜜' => 'Α',
  '𝜝' => 'Β',
  '𝜞' => 'Γ',
  '𝜟' => 'Δ',
  '𝜠' => 'Ε',
  '𝜡' => 'Ζ',
  '𝜢' => 'Η',
  '𝜣' => 'Θ',
  '𝜤' => 'Ι',
  '𝜥' => 'Κ',
  '𝜦' => 'Λ',
  '𝜧' => 'Μ',
  '𝜨' => 'Ν',
  '𝜩' => 'Ξ',
  '𝜪' => 'Ο',
  '𝜫' => 'Π',
  '𝜬' => 'Ρ',
  '𝜭' => 'Θ',
  '𝜮' => 'Σ',
  '𝜯' => 'Τ',
  '𝜰' => 'Υ',
  '𝜱' => 'Φ',
  '𝜲' => 'Χ',
  '𝜳' => 'Ψ',
  '𝜴' => 'Ω',
  '𝜵' => '∇',
  '𝜶' => 'α',
  '𝜷' => 'β',
  '𝜸' => 'γ',
  '𝜹' => 'δ',
  '𝜺' => 'ε',
  '𝜻' => 'ζ',
  '𝜼' => 'η',
  '𝜽' => 'θ',
  '𝜾' => 'ι',
  '𝜿' => 'κ',
  '𝝀' => 'λ',
  '𝝁' => 'μ',
  '𝝂' => 'ν',
  '𝝃' => 'ξ',
  '𝝄' => 'ο',
  '𝝅' => 'π',
  '𝝆' => 'ρ',
  '𝝇' => 'ς',
  '𝝈' => 'σ',
  '𝝉' => 'τ',
  '𝝊' => 'υ',
  '𝝋' => 'φ',
  '𝝌' => 'χ',
  '𝝍' => 'ψ',
  '𝝎' => 'ω',
  '𝝏' => '∂',
  '𝝐' => 'ε',
  '𝝑' => 'θ',
  '𝝒' => 'κ',
  '𝝓' => 'φ',
  '𝝔' => 'ρ',
  '𝝕' => 'π',
  '𝝖' => 'Α',
  '𝝗' => 'Β',
  '𝝘' => 'Γ',
  '𝝙' => 'Δ',
  '𝝚' => 'Ε',
  '𝝛' => 'Ζ',
  '𝝜' => 'Η',
  '𝝝' => 'Θ',
  '𝝞' => 'Ι',
  '𝝟' => 'Κ',
  '𝝠' => 'Λ',
  '𝝡' => 'Μ',
  '𝝢' => 'Ν',
  '𝝣' => 'Ξ',
  '𝝤' => 'Ο',
  '𝝥' => 'Π',
  '𝝦' => 'Ρ',
  '𝝧' => 'Θ',
  '𝝨' => 'Σ',
  '𝝩' => 'Τ',
  '𝝪' => 'Υ',
  '𝝫' => 'Φ',
  '𝝬' => 'Χ',
  '𝝭' => 'Ψ',
  '𝝮' => 'Ω',
  '𝝯' => '∇',
  '𝝰' => 'α',
  '𝝱' => 'β',
  '𝝲' => 'γ',
  '𝝳' => 'δ',
  '𝝴' => 'ε',
  '𝝵' => 'ζ',
  '𝝶' => 'η',
  '𝝷' => 'θ',
  '𝝸' => 'ι',
  '𝝹' => 'κ',
  '𝝺' => 'λ',
  '𝝻' => 'μ',
  '𝝼' => 'ν',
  '𝝽' => 'ξ',
  '𝝾' => 'ο',
  '𝝿' => 'π',
  '𝞀' => 'ρ',
  '𝞁' => 'ς',
  '𝞂' => 'σ',
  '𝞃' => 'τ',
  '𝞄' => 'υ',
  '𝞅' => 'φ',
  '𝞆' => 'χ',
  '𝞇' => 'ψ',
  '𝞈' => 'ω',
  '𝞉' => '∂',
  '𝞊' => 'ε',
  '𝞋' => 'θ',
  '𝞌' => 'κ',
  '𝞍' => 'φ',
  '𝞎' => 'ρ',
  '𝞏' => 'π',
  '𝞐' => 'Α',
  '𝞑' => 'Β',
  '𝞒' => 'Γ',
  '𝞓' => 'Δ',
  '𝞔' => 'Ε',
  '𝞕' => 'Ζ',
  '𝞖' => 'Η',
  '𝞗' => 'Θ',
  '𝞘' => 'Ι',
  '𝞙' => 'Κ',
  '𝞚' => 'Λ',
  '𝞛' => 'Μ',
  '𝞜' => 'Ν',
  '𝞝' => 'Ξ',
  '𝞞' => 'Ο',
  '𝞟' => 'Π',
  '𝞠' => 'Ρ',
  '𝞡' => 'Θ',
  '𝞢' => 'Σ',
  '𝞣' => 'Τ',
  '𝞤' => 'Υ',
  '𝞥' => 'Φ',
  '𝞦' => 'Χ',
  '𝞧' => 'Ψ',
  '𝞨' => 'Ω',
  '𝞩' => '∇',
  '𝞪' => 'α',
  '𝞫' => 'β',
  '𝞬' => 'γ',
  '𝞭' => 'δ',
  '𝞮' => 'ε',
  '𝞯' => 'ζ',
  '𝞰' => 'η',
  '𝞱' => 'θ',
  '𝞲' => 'ι',
  '𝞳' => 'κ',
  '𝞴' => 'λ',
  '𝞵' => 'μ',
  '𝞶' => 'ν',
  '𝞷' => 'ξ',
  '𝞸' => 'ο',
  '𝞹' => 'π',
  '𝞺' => 'ρ',
  '𝞻' => 'ς',
  '𝞼' => 'σ',
  '𝞽' => 'τ',
  '𝞾' => 'υ',
  '𝞿' => 'φ',
  '𝟀' => 'χ',
  '𝟁' => 'ψ',
  '𝟂' => 'ω',
  '𝟃' => '∂',
  '𝟄' => 'ε',
  '𝟅' => 'θ',
  '𝟆' => 'κ',
  '𝟇' => 'φ',
  '𝟈' => 'ρ',
  '𝟉' => 'π',
  '𝟊' => 'Ϝ',
  '𝟋' => 'ϝ',
  '𝟎' => '0',
  '𝟏' => '1',
  '𝟐' => '2',
  '𝟑' => '3',
  '𝟒' => '4',
  '𝟓' => '5',
  '𝟔' => '6',
  '𝟕' => '7',
  '𝟖' => '8',
  '𝟗' => '9',
  '𝟘' => '0',
  '𝟙' => '1',
  '𝟚' => '2',
  '𝟛' => '3',
  '𝟜' => '4',
  '𝟝' => '5',
  '𝟞' => '6',
  '𝟟' => '7',
  '𝟠' => '8',
  '𝟡' => '9',
  '𝟢' => '0',
  '𝟣' => '1',
  '𝟤' => '2',
  '𝟥' => '3',
  '𝟦' => '4',
  '𝟧' => '5',
  '𝟨' => '6',
  '𝟩' => '7',
  '𝟪' => '8',
  '𝟫' => '9',
  '𝟬' => '0',
  '𝟭' => '1',
  '𝟮' => '2',
  '𝟯' => '3',
  '𝟰' => '4',
  '𝟱' => '5',
  '𝟲' => '6',
  '𝟳' => '7',
  '𝟴' => '8',
  '𝟵' => '9',
  '𝟶' => '0',
  '𝟷' => '1',
  '𝟸' => '2',
  '𝟹' => '3',
  '𝟺' => '4',
  '𝟻' => '5',
  '𝟼' => '6',
  '𝟽' => '7',
  '𝟾' => '8',
  '𝟿' => '9',
  '𞸀' => 'ا',
  '𞸁' => 'ب',
  '𞸂' => 'ج',
  '𞸃' => 'د',
  '𞸅' => 'و',
  '𞸆' => 'ز',
  '𞸇' => 'ح',
  '𞸈' => 'ط',
  '𞸉' => 'ي',
  '𞸊' => 'ك',
  '𞸋' => 'ل',
  '𞸌' => 'م',
  '𞸍' => 'ن',
  '𞸎' => 'س',
  '𞸏' => 'ع',
  '𞸐' => 'ف',
  '𞸑' => 'ص',
  '𞸒' => 'ق',
  '𞸓' => 'ر',
  '𞸔' => 'ش',
  '𞸕' => 'ت',
  '𞸖' => 'ث',
  '𞸗' => 'خ',
  '𞸘' => 'ذ',
  '𞸙' => 'ض',
  '𞸚' => 'ظ',
  '𞸛' => 'غ',
  '𞸜' => 'ٮ',
  '𞸝' => 'ں',
  '𞸞' => 'ڡ',
  '𞸟' => 'ٯ',
  '𞸡' => 'ب',
  '𞸢' => 'ج',
  '𞸤' => 'ه',
  '𞸧' => 'ح',
  '𞸩' => 'ي',
  '𞸪' => 'ك',
  '𞸫' => 'ل',
  '𞸬' => 'م',
  '𞸭' => 'ن',
  '𞸮' => 'س',
  '𞸯' => 'ع',
  '𞸰' => 'ف',
  '𞸱' => 'ص',
  '𞸲' => 'ق',
  '𞸴' => 'ش',
  '𞸵' => 'ت',
  '𞸶' => 'ث',
  '𞸷' => 'خ',
  '𞸹' => 'ض',
  '𞸻' => 'غ',
  '𞹂' => 'ج',
  '𞹇' => 'ح',
  '𞹉' => 'ي',
  '𞹋' => 'ل',
  '𞹍' => 'ن',
  '𞹎' => 'س',
  '𞹏' => 'ع',
  '𞹑' => 'ص',
  '𞹒' => 'ق',
  '𞹔' => 'ش',
  '𞹗' => 'خ',
  '𞹙' => 'ض',
  '𞹛' => 'غ',
  '𞹝' => 'ں',
  '𞹟' => 'ٯ',
  '𞹡' => 'ب',
  '𞹢' => 'ج',
  '𞹤' => 'ه',
  '𞹧' => 'ح',
  '𞹨' => 'ط',
  '𞹩' => 'ي',
  '𞹪' => 'ك',
  '𞹬' => 'م',
  '𞹭' => 'ن',
  '𞹮' => 'س',
  '𞹯' => 'ع',
  '𞹰' => 'ف',
  '𞹱' => 'ص',
  '𞹲' => 'ق',
  '𞹴' => 'ش',
  '𞹵' => 'ت',
  '𞹶' => 'ث',
  '𞹷' => 'خ',
  '𞹹' => 'ض',
  '𞹺' => 'ظ',
  '𞹻' => 'غ',
  '𞹼' => 'ٮ',
  '𞹾' => 'ڡ',
  '𞺀' => 'ا',
  '𞺁' => 'ب',
  '𞺂' => 'ج',
  '𞺃' => 'د',
  '𞺄' => 'ه',
  '𞺅' => 'و',
  '𞺆' => 'ز',
  '𞺇' => 'ح',
  '𞺈' => 'ط',
  '𞺉' => 'ي',
  '𞺋' => 'ل',
  '𞺌' => 'م',
  '𞺍' => 'ن',
  '𞺎' => 'س',
  '𞺏' => 'ع',
  '𞺐' => 'ف',
  '𞺑' => 'ص',
  '𞺒' => 'ق',
  '𞺓' => 'ر',
  '𞺔' => 'ش',
  '𞺕' => 'ت',
  '𞺖' => 'ث',
  '𞺗' => 'خ',
  '𞺘' => 'ذ',
  '𞺙' => 'ض',
  '𞺚' => 'ظ',
  '𞺛' => 'غ',
  '𞺡' => 'ب',
  '𞺢' => 'ج',
  '𞺣' => 'د',
  '𞺥' => 'و',
  '𞺦' => 'ز',
  '𞺧' => 'ح',
  '𞺨' => 'ط',
  '𞺩' => 'ي',
  '𞺫' => 'ل',
  '𞺬' => 'م',
  '𞺭' => 'ن',
  '𞺮' => 'س',
  '𞺯' => 'ع',
  '𞺰' => 'ف',
  '𞺱' => 'ص',
  '𞺲' => 'ق',
  '𞺳' => 'ر',
  '𞺴' => 'ش',
  '𞺵' => 'ت',
  '𞺶' => 'ث',
  '𞺷' => 'خ',
  '𞺸' => 'ذ',
  '𞺹' => 'ض',
  '𞺺' => 'ظ',
  '𞺻' => 'غ',
  '🄀' => '0.',
  '🄁' => '0,',
  '🄂' => '1,',
  '🄃' => '2,',
  '🄄' => '3,',
  '🄅' => '4,',
  '🄆' => '5,',
  '🄇' => '6,',
  '🄈' => '7,',
  '🄉' => '8,',
  '🄊' => '9,',
  '🄐' => '(A)',
  '🄑' => '(B)',
  '🄒' => '(C)',
  '🄓' => '(D)',
  '🄔' => '(E)',
  '🄕' => '(F)',
  '🄖' => '(G)',
  '🄗' => '(H)',
  '🄘' => '(I)',
  '🄙' => '(J)',
  '🄚' => '(K)',
  '🄛' => '(L)',
  '🄜' => '(M)',
  '🄝' => '(N)',
  '🄞' => '(O)',
  '🄟' => '(P)',
  '🄠' => '(Q)',
  '🄡' => '(R)',
  '🄢' => '(S)',
  '🄣' => '(T)',
  '🄤' => '(U)',
  '🄥' => '(V)',
  '🄦' => '(W)',
  '🄧' => '(X)',
  '🄨' => '(Y)',
  '🄩' => '(Z)',
  '🄪' => '〔S〕',
  '🄫' => 'C',
  '🄬' => 'R',
  '🄭' => 'CD',
  '🄮' => 'WZ',
  '🄰' => 'A',
  '🄱' => 'B',
  '🄲' => 'C',
  '🄳' => 'D',
  '🄴' => 'E',
  '🄵' => 'F',
  '🄶' => 'G',
  '🄷' => 'H',
  '🄸' => 'I',
  '🄹' => 'J',
  '🄺' => 'K',
  '🄻' => 'L',
  '🄼' => 'M',
  '🄽' => 'N',
  '🄾' => 'O',
  '🄿' => 'P',
  '🅀' => 'Q',
  '🅁' => 'R',
  '🅂' => 'S',
  '🅃' => 'T',
  '🅄' => 'U',
  '🅅' => 'V',
  '🅆' => 'W',
  '🅇' => 'X',
  '🅈' => 'Y',
  '🅉' => 'Z',
  '🅊' => 'HV',
  '🅋' => 'MV',
  '🅌' => 'SD',
  '🅍' => 'SS',
  '🅎' => 'PPV',
  '🅏' => 'WC',
  '🅪' => 'MC',
  '🅫' => 'MD',
  '🅬' => 'MR',
  '🆐' => 'DJ',
  '🈀' => 'ほか',
  '🈁' => 'ココ',
  '🈂' => 'サ',
  '🈐' => '手',
  '🈑' => '字',
  '🈒' => '双',
  '🈓' => 'デ',
  '🈔' => '二',
  '🈕' => '多',
  '🈖' => '解',
  '🈗' => '天',
  '🈘' => '交',
  '🈙' => '映',
  '🈚' => '無',
  '🈛' => '料',
  '🈜' => '前',
  '🈝' => '後',
  '🈞' => '再',
  '🈟' => '新',
  '🈠' => '初',
  '🈡' => '終',
  '🈢' => '生',
  '🈣' => '販',
  '🈤' => '声',
  '🈥' => '吹',
  '🈦' => '演',
  '🈧' => '投',
  '🈨' => '捕',
  '🈩' => '一',
  '🈪' => '三',
  '🈫' => '遊',
  '🈬' => '左',
  '🈭' => '中',
  '🈮' => '右',
  '🈯' => '指',
  '🈰' => '走',
  '🈱' => '打',
  '🈲' => '禁',
  '🈳' => '空',
  '🈴' => '合',
  '🈵' => '満',
  '🈶' => '有',
  '🈷' => '月',
  '🈸' => '申',
  '🈹' => '割',
  '🈺' => '営',
  '🈻' => '配',
  '🉀' => '〔本〕',
  '🉁' => '〔三〕',
  '🉂' => '〔二〕',
  '🉃' => '〔安〕',
  '🉄' => '〔点〕',
  '🉅' => '〔打〕',
  '🉆' => '〔盗〕',
  '🉇' => '〔勝〕',
  '🉈' => '〔敗〕',
  '🉐' => '得',
  '🉑' => '可',
  '🯰' => '0',
  '🯱' => '1',
  '🯲' => '2',
  '🯳' => '3',
  '🯴' => '4',
  '🯵' => '5',
  '🯶' => '6',
  '🯷' => '7',
  '🯸' => '8',
  '🯹' => '9',
);
<?php

return array (
  'À' => 'À',
  'Á' => 'Á',
  'Â' => 'Â',
  'Ã' => 'Ã',
  'Ä' => 'Ä',
  'Å' => 'Å',
  'Ç' => 'Ç',
  'È' => 'È',
  'É' => 'É',
  'Ê' => 'Ê',
  'Ë' => 'Ë',
  'Ì' => 'Ì',
  'Í' => 'Í',
  'Î' => 'Î',
  'Ï' => 'Ï',
  'Ñ' => 'Ñ',
  'Ò' => 'Ò',
  'Ó' => 'Ó',
  'Ô' => 'Ô',
  'Õ' => 'Õ',
  'Ö' => 'Ö',
  'Ù' => 'Ù',
  'Ú' => 'Ú',
  'Û' => 'Û',
  'Ü' => 'Ü',
  'Ý' => 'Ý',
  'à' => 'à',
  'á' => 'á',
  'â' => 'â',
  'ã' => 'ã',
  'ä' => 'ä',
  'å' => 'å',
  'ç' => 'ç',
  'è' => 'è',
  'é' => 'é',
  'ê' => 'ê',
  'ë' => 'ë',
  'ì' => 'ì',
  'í' => 'í',
  'î' => 'î',
  'ï' => 'ï',
  'ñ' => 'ñ',
  'ò' => 'ò',
  'ó' => 'ó',
  'ô' => 'ô',
  'õ' => 'õ',
  'ö' => 'ö',
  'ù' => 'ù',
  'ú' => 'ú',
  'û' => 'û',
  'ü' => 'ü',
  'ý' => 'ý',
  'ÿ' => 'ÿ',
  'Ā' => 'Ā',
  'ā' => 'ā',
  'Ă' => 'Ă',
  'ă' => 'ă',
  'Ą' => 'Ą',
  'ą' => 'ą',
  'Ć' => 'Ć',
  'ć' => 'ć',
  'Ĉ' => 'Ĉ',
  'ĉ' => 'ĉ',
  'Ċ' => 'Ċ',
  'ċ' => 'ċ',
  'Č' => 'Č',
  'č' => 'č',
  'Ď' => 'Ď',
  'ď' => 'ď',
  'Ē' => 'Ē',
  'ē' => 'ē',
  'Ĕ' => 'Ĕ',
  'ĕ' => 'ĕ',
  'Ė' => 'Ė',
  'ė' => 'ė',
  'Ę' => 'Ę',
  'ę' => 'ę',
  'Ě' => 'Ě',
  'ě' => 'ě',
  'Ĝ' => 'Ĝ',
  'ĝ' => 'ĝ',
  'Ğ' => 'Ğ',
  'ğ' => 'ğ',
  'Ġ' => 'Ġ',
  'ġ' => 'ġ',
  'Ģ' => 'Ģ',
  'ģ' => 'ģ',
  'Ĥ' => 'Ĥ',
  'ĥ' => 'ĥ',
  'Ĩ' => 'Ĩ',
  'ĩ' => 'ĩ',
  'Ī' => 'Ī',
  'ī' => 'ī',
  'Ĭ' => 'Ĭ',
  'ĭ' => 'ĭ',
  'Į' => 'Į',
  'į' => 'į',
  'İ' => 'İ',
  'Ĵ' => 'Ĵ',
  'ĵ' => 'ĵ',
  'Ķ' => 'Ķ',
  'ķ' => 'ķ',
  'Ĺ' => 'Ĺ',
  'ĺ' => 'ĺ',
  'Ļ' => 'Ļ',
  'ļ' => 'ļ',
  'Ľ' => 'Ľ',
  'ľ' => 'ľ',
  'Ń' => 'Ń',
  'ń' => 'ń',
  'Ņ' => 'Ņ',
  'ņ' => 'ņ',
  'Ň' => 'Ň',
  'ň' => 'ň',
  'Ō' => 'Ō',
  'ō' => 'ō',
  'Ŏ' => 'Ŏ',
  'ŏ' => 'ŏ',
  'Ő' => 'Ő',
  'ő' => 'ő',
  'Ŕ' => 'Ŕ',
  'ŕ' => 'ŕ',
  'Ŗ' => 'Ŗ',
  'ŗ' => 'ŗ',
  'Ř' => 'Ř',
  'ř' => 'ř',
  'Ś' => 'Ś',
  'ś' => 'ś',
  'Ŝ' => 'Ŝ',
  'ŝ' => 'ŝ',
  'Ş' => 'Ş',
  'ş' => 'ş',
  'Š' => 'Š',
  'š' => 'š',
  'Ţ' => 'Ţ',
  'ţ' => 'ţ',
  'Ť' => 'Ť',
  'ť' => 'ť',
  'Ũ' => 'Ũ',
  'ũ' => 'ũ',
  'Ū' => 'Ū',
  'ū' => 'ū',
  'Ŭ' => 'Ŭ',
  'ŭ' => 'ŭ',
  'Ů' => 'Ů',
  'ů' => 'ů',
  'Ű' => 'Ű',
  'ű' => 'ű',
  'Ų' => 'Ų',
  'ų' => 'ų',
  'Ŵ' => 'Ŵ',
  'ŵ' => 'ŵ',
  'Ŷ' => 'Ŷ',
  'ŷ' => 'ŷ',
  'Ÿ' => 'Ÿ',
  'Ź' => 'Ź',
  'ź' => 'ź',
  'Ż' => 'Ż',
  'ż' => 'ż',
  'Ž' => 'Ž',
  'ž' => 'ž',
  'Ơ' => 'Ơ',
  'ơ' => 'ơ',
  'Ư' => 'Ư',
  'ư' => 'ư',
  'Ǎ' => 'Ǎ',
  'ǎ' => 'ǎ',
  'Ǐ' => 'Ǐ',
  'ǐ' => 'ǐ',
  'Ǒ' => 'Ǒ',
  'ǒ' => 'ǒ',
  'Ǔ' => 'Ǔ',
  'ǔ' => 'ǔ',
  'Ǖ' => 'Ǖ',
  'ǖ' => 'ǖ',
  'Ǘ' => 'Ǘ',
  'ǘ' => 'ǘ',
  'Ǚ' => 'Ǚ',
  'ǚ' => 'ǚ',
  'Ǜ' => 'Ǜ',
  'ǜ' => 'ǜ',
  'Ǟ' => 'Ǟ',
  'ǟ' => 'ǟ',
  'Ǡ' => 'Ǡ',
  'ǡ' => 'ǡ',
  'Ǣ' => 'Ǣ',
  'ǣ' => 'ǣ',
  'Ǧ' => 'Ǧ',
  'ǧ' => 'ǧ',
  'Ǩ' => 'Ǩ',
  'ǩ' => 'ǩ',
  'Ǫ' => 'Ǫ',
  'ǫ' => 'ǫ',
  'Ǭ' => 'Ǭ',
  'ǭ' => 'ǭ',
  'Ǯ' => 'Ǯ',
  'ǯ' => 'ǯ',
  'ǰ' => 'ǰ',
  'Ǵ' => 'Ǵ',
  'ǵ' => 'ǵ',
  'Ǹ' => 'Ǹ',
  'ǹ' => 'ǹ',
  'Ǻ' => 'Ǻ',
  'ǻ' => 'ǻ',
  'Ǽ' => 'Ǽ',
  'ǽ' => 'ǽ',
  'Ǿ' => 'Ǿ',
  'ǿ' => 'ǿ',
  'Ȁ' => 'Ȁ',
  'ȁ' => 'ȁ',
  'Ȃ' => 'Ȃ',
  'ȃ' => 'ȃ',
  'Ȅ' => 'Ȅ',
  'ȅ' => 'ȅ',
  'Ȇ' => 'Ȇ',
  'ȇ' => 'ȇ',
  'Ȉ' => 'Ȉ',
  'ȉ' => 'ȉ',
  'Ȋ' => 'Ȋ',
  'ȋ' => 'ȋ',
  'Ȍ' => 'Ȍ',
  'ȍ' => 'ȍ',
  'Ȏ' => 'Ȏ',
  'ȏ' => 'ȏ',
  'Ȑ' => 'Ȑ',
  'ȑ' => 'ȑ',
  'Ȓ' => 'Ȓ',
  'ȓ' => 'ȓ',
  'Ȕ' => 'Ȕ',
  'ȕ' => 'ȕ',
  'Ȗ' => 'Ȗ',
  'ȗ' => 'ȗ',
  'Ș' => 'Ș',
  'ș' => 'ș',
  'Ț' => 'Ț',
  'ț' => 'ț',
  'Ȟ' => 'Ȟ',
  'ȟ' => 'ȟ',
  'Ȧ' => 'Ȧ',
  'ȧ' => 'ȧ',
  'Ȩ' => 'Ȩ',
  'ȩ' => 'ȩ',
  'Ȫ' => 'Ȫ',
  'ȫ' => 'ȫ',
  'Ȭ' => 'Ȭ',
  'ȭ' => 'ȭ',
  'Ȯ' => 'Ȯ',
  'ȯ' => 'ȯ',
  'Ȱ' => 'Ȱ',
  'ȱ' => 'ȱ',
  'Ȳ' => 'Ȳ',
  'ȳ' => 'ȳ',
  '̀' => '̀',
  '́' => '́',
  '̓' => '̓',
  '̈́' => '̈́',
  'ʹ' => 'ʹ',
  ';' => ';',
  '΅' => '΅',
  'Ά' => 'Ά',
  '·' => '·',
  'Έ' => 'Έ',
  'Ή' => 'Ή',
  'Ί' => 'Ί',
  'Ό' => 'Ό',
  'Ύ' => 'Ύ',
  'Ώ' => 'Ώ',
  'ΐ' => 'ΐ',
  'Ϊ' => 'Ϊ',
  'Ϋ' => 'Ϋ',
  'ά' => 'ά',
  'έ' => 'έ',
  'ή' => 'ή',
  'ί' => 'ί',
  'ΰ' => 'ΰ',
  'ϊ' => 'ϊ',
  'ϋ' => 'ϋ',
  'ό' => 'ό',
  'ύ' => 'ύ',
  'ώ' => 'ώ',
  'ϓ' => 'ϓ',
  'ϔ' => 'ϔ',
  'Ѐ' => 'Ѐ',
  'Ё' => 'Ё',
  'Ѓ' => 'Ѓ',
  'Ї' => 'Ї',
  'Ќ' => 'Ќ',
  'Ѝ' => 'Ѝ',
  'Ў' => 'Ў',
  'Й' => 'Й',
  'й' => 'й',
  'ѐ' => 'ѐ',
  'ё' => 'ё',
  'ѓ' => 'ѓ',
  'ї' => 'ї',
  'ќ' => 'ќ',
  'ѝ' => 'ѝ',
  'ў' => 'ў',
  'Ѷ' => 'Ѷ',
  'ѷ' => 'ѷ',
  'Ӂ' => 'Ӂ',
  'ӂ' => 'ӂ',
  'Ӑ' => 'Ӑ',
  'ӑ' => 'ӑ',
  'Ӓ' => 'Ӓ',
  'ӓ' => 'ӓ',
  'Ӗ' => 'Ӗ',
  'ӗ' => 'ӗ',
  'Ӛ' => 'Ӛ',
  'ӛ' => 'ӛ',
  'Ӝ' => 'Ӝ',
  'ӝ' => 'ӝ',
  'Ӟ' => 'Ӟ',
  'ӟ' => 'ӟ',
  'Ӣ' => 'Ӣ',
  'ӣ' => 'ӣ',
  'Ӥ' => 'Ӥ',
  'ӥ' => 'ӥ',
  'Ӧ' => 'Ӧ',
  'ӧ' => 'ӧ',
  'Ӫ' => 'Ӫ',
  'ӫ' => 'ӫ',
  'Ӭ' => 'Ӭ',
  'ӭ' => 'ӭ',
  'Ӯ' => 'Ӯ',
  'ӯ' => 'ӯ',
  'Ӱ' => 'Ӱ',
  'ӱ' => 'ӱ',
  'Ӳ' => 'Ӳ',
  'ӳ' => 'ӳ',
  'Ӵ' => 'Ӵ',
  'ӵ' => 'ӵ',
  'Ӹ' => 'Ӹ',
  'ӹ' => 'ӹ',
  'آ' => 'آ',
  'أ' => 'أ',
  'ؤ' => 'ؤ',
  'إ' => 'إ',
  'ئ' => 'ئ',
  'ۀ' => 'ۀ',
  'ۂ' => 'ۂ',
  'ۓ' => 'ۓ',
  'ऩ' => 'ऩ',
  'ऱ' => 'ऱ',
  'ऴ' => 'ऴ',
  'क़' => 'क़',
  'ख़' => 'ख़',
  'ग़' => 'ग़',
  'ज़' => 'ज़',
  'ड़' => 'ड़',
  'ढ़' => 'ढ़',
  'फ़' => 'फ़',
  'य़' => 'य़',
  'ো' => 'ো',
  'ৌ' => 'ৌ',
  'ড়' => 'ড়',
  'ঢ়' => 'ঢ়',
  'য়' => 'য়',
  'ਲ਼' => 'ਲ਼',
  'ਸ਼' => 'ਸ਼',
  'ਖ਼' => 'ਖ਼',
  'ਗ਼' => 'ਗ਼',
  'ਜ਼' => 'ਜ਼',
  'ਫ਼' => 'ਫ਼',
  'ୈ' => 'ୈ',
  'ୋ' => 'ୋ',
  'ୌ' => 'ୌ',
  'ଡ଼' => 'ଡ଼',
  'ଢ଼' => 'ଢ଼',
  'ஔ' => 'ஔ',
  'ொ' => 'ொ',
  'ோ' => 'ோ',
  'ௌ' => 'ௌ',
  'ై' => 'ై',
  'ೀ' => 'ೀ',
  'ೇ' => 'ೇ',
  'ೈ' => 'ೈ',
  'ೊ' => 'ೊ',
  'ೋ' => 'ೋ',
  'ൊ' => 'ൊ',
  'ോ' => 'ോ',
  'ൌ' => 'ൌ',
  'ේ' => 'ේ',
  'ො' => 'ො',
  'ෝ' => 'ෝ',
  'ෞ' => 'ෞ',
  'གྷ' => 'གྷ',
  'ཌྷ' => 'ཌྷ',
  'དྷ' => 'དྷ',
  'བྷ' => 'བྷ',
  'ཛྷ' => 'ཛྷ',
  'ཀྵ' => 'ཀྵ',
  'ཱི' => 'ཱི',
  'ཱུ' => 'ཱུ',
  'ྲྀ' => 'ྲྀ',
  'ླྀ' => 'ླྀ',
  'ཱྀ' => 'ཱྀ',
  'ྒྷ' => 'ྒྷ',
  'ྜྷ' => 'ྜྷ',
  'ྡྷ' => 'ྡྷ',
  'ྦྷ' => 'ྦྷ',
  'ྫྷ' => 'ྫྷ',
  'ྐྵ' => 'ྐྵ',
  'ဦ' => 'ဦ',
  'ᬆ' => 'ᬆ',
  'ᬈ' => 'ᬈ',
  'ᬊ' => 'ᬊ',
  'ᬌ' => 'ᬌ',
  'ᬎ' => 'ᬎ',
  'ᬒ' => 'ᬒ',
  'ᬻ' => 'ᬻ',
  'ᬽ' => 'ᬽ',
  'ᭀ' => 'ᭀ',
  'ᭁ' => 'ᭁ',
  'ᭃ' => 'ᭃ',
  'Ḁ' => 'Ḁ',
  'ḁ' => 'ḁ',
  'Ḃ' => 'Ḃ',
  'ḃ' => 'ḃ',
  'Ḅ' => 'Ḅ',
  'ḅ' => 'ḅ',
  'Ḇ' => 'Ḇ',
  'ḇ' => 'ḇ',
  'Ḉ' => 'Ḉ',
  'ḉ' => 'ḉ',
  'Ḋ' => 'Ḋ',
  'ḋ' => 'ḋ',
  'Ḍ' => 'Ḍ',
  'ḍ' => 'ḍ',
  'Ḏ' => 'Ḏ',
  'ḏ' => 'ḏ',
  'Ḑ' => 'Ḑ',
  'ḑ' => 'ḑ',
  'Ḓ' => 'Ḓ',
  'ḓ' => 'ḓ',
  'Ḕ' => 'Ḕ',
  'ḕ' => 'ḕ',
  'Ḗ' => 'Ḗ',
  'ḗ' => 'ḗ',
  'Ḙ' => 'Ḙ',
  'ḙ' => 'ḙ',
  'Ḛ' => 'Ḛ',
  'ḛ' => 'ḛ',
  'Ḝ' => 'Ḝ',
  'ḝ' => 'ḝ',
  'Ḟ' => 'Ḟ',
  'ḟ' => 'ḟ',
  'Ḡ' => 'Ḡ',
  'ḡ' => 'ḡ',
  'Ḣ' => 'Ḣ',
  'ḣ' => 'ḣ',
  'Ḥ' => 'Ḥ',
  'ḥ' => 'ḥ',
  'Ḧ' => 'Ḧ',
  'ḧ' => 'ḧ',
  'Ḩ' => 'Ḩ',
  'ḩ' => 'ḩ',
  'Ḫ' => 'Ḫ',
  'ḫ' => 'ḫ',
  'Ḭ' => 'Ḭ',
  'ḭ' => 'ḭ',
  'Ḯ' => 'Ḯ',
  'ḯ' => 'ḯ',
  'Ḱ' => 'Ḱ',
  'ḱ' => 'ḱ',
  'Ḳ' => 'Ḳ',
  'ḳ' => 'ḳ',
  'Ḵ' => 'Ḵ',
  'ḵ' => 'ḵ',
  'Ḷ' => 'Ḷ',
  'ḷ' => 'ḷ',
  'Ḹ' => 'Ḹ',
  'ḹ' => 'ḹ',
  'Ḻ' => 'Ḻ',
  'ḻ' => 'ḻ',
  'Ḽ' => 'Ḽ',
  'ḽ' => 'ḽ',
  'Ḿ' => 'Ḿ',
  'ḿ' => 'ḿ',
  'Ṁ' => 'Ṁ',
  'ṁ' => 'ṁ',
  'Ṃ' => 'Ṃ',
  'ṃ' => 'ṃ',
  'Ṅ' => 'Ṅ',
  'ṅ' => 'ṅ',
  'Ṇ' => 'Ṇ',
  'ṇ' => 'ṇ',
  'Ṉ' => 'Ṉ',
  'ṉ' => 'ṉ',
  'Ṋ' => 'Ṋ',
  'ṋ' => 'ṋ',
  'Ṍ' => 'Ṍ',
  'ṍ' => 'ṍ',
  'Ṏ' => 'Ṏ',
  'ṏ' => 'ṏ',
  'Ṑ' => 'Ṑ',
  'ṑ' => 'ṑ',
  'Ṓ' => 'Ṓ',
  'ṓ' => 'ṓ',
  'Ṕ' => 'Ṕ',
  'ṕ' => 'ṕ',
  'Ṗ' => 'Ṗ',
  'ṗ' => 'ṗ',
  'Ṙ' => 'Ṙ',
  'ṙ' => 'ṙ',
  'Ṛ' => 'Ṛ',
  'ṛ' => 'ṛ',
  'Ṝ' => 'Ṝ',
  'ṝ' => 'ṝ',
  'Ṟ' => 'Ṟ',
  'ṟ' => 'ṟ',
  'Ṡ' => 'Ṡ',
  'ṡ' => 'ṡ',
  'Ṣ' => 'Ṣ',
  'ṣ' => 'ṣ',
  'Ṥ' => 'Ṥ',
  'ṥ' => 'ṥ',
  'Ṧ' => 'Ṧ',
  'ṧ' => 'ṧ',
  'Ṩ' => 'Ṩ',
  'ṩ' => 'ṩ',
  'Ṫ' => 'Ṫ',
  'ṫ' => 'ṫ',
  'Ṭ' => 'Ṭ',
  'ṭ' => 'ṭ',
  'Ṯ' => 'Ṯ',
  'ṯ' => 'ṯ',
  'Ṱ' => 'Ṱ',
  'ṱ' => 'ṱ',
  'Ṳ' => 'Ṳ',
  'ṳ' => 'ṳ',
  'Ṵ' => 'Ṵ',
  'ṵ' => 'ṵ',
  'Ṷ' => 'Ṷ',
  'ṷ' => 'ṷ',
  'Ṹ' => 'Ṹ',
  'ṹ' => 'ṹ',
  'Ṻ' => 'Ṻ',
  'ṻ' => 'ṻ',
  'Ṽ' => 'Ṽ',
  'ṽ' => 'ṽ',
  'Ṿ' => 'Ṿ',
  'ṿ' => 'ṿ',
  'Ẁ' => 'Ẁ',
  'ẁ' => 'ẁ',
  'Ẃ' => 'Ẃ',
  'ẃ' => 'ẃ',
  'Ẅ' => 'Ẅ',
  'ẅ' => 'ẅ',
  'Ẇ' => 'Ẇ',
  'ẇ' => 'ẇ',
  'Ẉ' => 'Ẉ',
  'ẉ' => 'ẉ',
  'Ẋ' => 'Ẋ',
  'ẋ' => 'ẋ',
  'Ẍ' => 'Ẍ',
  'ẍ' => 'ẍ',
  'Ẏ' => 'Ẏ',
  'ẏ' => 'ẏ',
  'Ẑ' => 'Ẑ',
  'ẑ' => 'ẑ',
  'Ẓ' => 'Ẓ',
  'ẓ' => 'ẓ',
  'Ẕ' => 'Ẕ',
  'ẕ' => 'ẕ',
  'ẖ' => 'ẖ',
  'ẗ' => 'ẗ',
  'ẘ' => 'ẘ',
  'ẙ' => 'ẙ',
  'ẛ' => 'ẛ',
  'Ạ' => 'Ạ',
  'ạ' => 'ạ',
  'Ả' => 'Ả',
  'ả' => 'ả',
  'Ấ' => 'Ấ',
  'ấ' => 'ấ',
  'Ầ' => 'Ầ',
  'ầ' => 'ầ',
  'Ẩ' => 'Ẩ',
  'ẩ' => 'ẩ',
  'Ẫ' => 'Ẫ',
  'ẫ' => 'ẫ',
  'Ậ' => 'Ậ',
  'ậ' => 'ậ',
  'Ắ' => 'Ắ',
  'ắ' => 'ắ',
  'Ằ' => 'Ằ',
  'ằ' => 'ằ',
  'Ẳ' => 'Ẳ',
  'ẳ' => 'ẳ',
  'Ẵ' => 'Ẵ',
  'ẵ' => 'ẵ',
  'Ặ' => 'Ặ',
  'ặ' => 'ặ',
  'Ẹ' => 'Ẹ',
  'ẹ' => 'ẹ',
  'Ẻ' => 'Ẻ',
  'ẻ' => 'ẻ',
  'Ẽ' => 'Ẽ',
  'ẽ' => 'ẽ',
  'Ế' => 'Ế',
  'ế' => 'ế',
  'Ề' => 'Ề',
  'ề' => 'ề',
  'Ể' => 'Ể',
  'ể' => 'ể',
  'Ễ' => 'Ễ',
  'ễ' => 'ễ',
  'Ệ' => 'Ệ',
  'ệ' => 'ệ',
  'Ỉ' => 'Ỉ',
  'ỉ' => 'ỉ',
  'Ị' => 'Ị',
  'ị' => 'ị',
  'Ọ' => 'Ọ',
  'ọ' => 'ọ',
  'Ỏ' => 'Ỏ',
  'ỏ' => 'ỏ',
  'Ố' => 'Ố',
  'ố' => 'ố',
  'Ồ' => 'Ồ',
  'ồ' => 'ồ',
  'Ổ' => 'Ổ',
  'ổ' => 'ổ',
  'Ỗ' => 'Ỗ',
  'ỗ' => 'ỗ',
  'Ộ' => 'Ộ',
  'ộ' => 'ộ',
  'Ớ' => 'Ớ',
  'ớ' => 'ớ',
  'Ờ' => 'Ờ',
  'ờ' => 'ờ',
  'Ở' => 'Ở',
  'ở' => 'ở',
  'Ỡ' => 'Ỡ',
  'ỡ' => 'ỡ',
  'Ợ' => 'Ợ',
  'ợ' => 'ợ',
  'Ụ' => 'Ụ',
  'ụ' => 'ụ',
  'Ủ' => 'Ủ',
  'ủ' => 'ủ',
  'Ứ' => 'Ứ',
  'ứ' => 'ứ',
  'Ừ' => 'Ừ',
  'ừ' => 'ừ',
  'Ử' => 'Ử',
  'ử' => 'ử',
  'Ữ' => 'Ữ',
  'ữ' => 'ữ',
  'Ự' => 'Ự',
  'ự' => 'ự',
  'Ỳ' => 'Ỳ',
  'ỳ' => 'ỳ',
  'Ỵ' => 'Ỵ',
  'ỵ' => 'ỵ',
  'Ỷ' => 'Ỷ',
  'ỷ' => 'ỷ',
  'Ỹ' => 'Ỹ',
  'ỹ' => 'ỹ',
  'ἀ' => 'ἀ',
  'ἁ' => 'ἁ',
  'ἂ' => 'ἂ',
  'ἃ' => 'ἃ',
  'ἄ' => 'ἄ',
  'ἅ' => 'ἅ',
  'ἆ' => 'ἆ',
  'ἇ' => 'ἇ',
  'Ἀ' => 'Ἀ',
  'Ἁ' => 'Ἁ',
  'Ἂ' => 'Ἂ',
  'Ἃ' => 'Ἃ',
  'Ἄ' => 'Ἄ',
  'Ἅ' => 'Ἅ',
  'Ἆ' => 'Ἆ',
  'Ἇ' => 'Ἇ',
  'ἐ' => 'ἐ',
  'ἑ' => 'ἑ',
  'ἒ' => 'ἒ',
  'ἓ' => 'ἓ',
  'ἔ' => 'ἔ',
  'ἕ' => 'ἕ',
  'Ἐ' => 'Ἐ',
  'Ἑ' => 'Ἑ',
  'Ἒ' => 'Ἒ',
  'Ἓ' => 'Ἓ',
  'Ἔ' => 'Ἔ',
  'Ἕ' => 'Ἕ',
  'ἠ' => 'ἠ',
  'ἡ' => 'ἡ',
  'ἢ' => 'ἢ',
  'ἣ' => 'ἣ',
  'ἤ' => 'ἤ',
  'ἥ' => 'ἥ',
  'ἦ' => 'ἦ',
  'ἧ' => 'ἧ',
  'Ἠ' => 'Ἠ',
  'Ἡ' => 'Ἡ',
  'Ἢ' => 'Ἢ',
  'Ἣ' => 'Ἣ',
  'Ἤ' => 'Ἤ',
  'Ἥ' => 'Ἥ',
  'Ἦ' => 'Ἦ',
  'Ἧ' => 'Ἧ',
  'ἰ' => 'ἰ',
  'ἱ' => 'ἱ',
  'ἲ' => 'ἲ',
  'ἳ' => 'ἳ',
  'ἴ' => 'ἴ',
  'ἵ' => 'ἵ',
  'ἶ' => 'ἶ',
  'ἷ' => 'ἷ',
  'Ἰ' => 'Ἰ',
  'Ἱ' => 'Ἱ',
  'Ἲ' => 'Ἲ',
  'Ἳ' => 'Ἳ',
  'Ἴ' => 'Ἴ',
  'Ἵ' => 'Ἵ',
  'Ἶ' => 'Ἶ',
  'Ἷ' => 'Ἷ',
  'ὀ' => 'ὀ',
  'ὁ' => 'ὁ',
  'ὂ' => 'ὂ',
  'ὃ' => 'ὃ',
  'ὄ' => 'ὄ',
  'ὅ' => 'ὅ',
  'Ὀ' => 'Ὀ',
  'Ὁ' => 'Ὁ',
  'Ὂ' => 'Ὂ',
  'Ὃ' => 'Ὃ',
  'Ὄ' => 'Ὄ',
  'Ὅ' => 'Ὅ',
  'ὐ' => 'ὐ',
  'ὑ' => 'ὑ',
  'ὒ' => 'ὒ',
  'ὓ' => 'ὓ',
  'ὔ' => 'ὔ',
  'ὕ' => 'ὕ',
  'ὖ' => 'ὖ',
  'ὗ' => 'ὗ',
  'Ὑ' => 'Ὑ',
  'Ὓ' => 'Ὓ',
  'Ὕ' => 'Ὕ',
  'Ὗ' => 'Ὗ',
  'ὠ' => 'ὠ',
  'ὡ' => 'ὡ',
  'ὢ' => 'ὢ',
  'ὣ' => 'ὣ',
  'ὤ' => 'ὤ',
  'ὥ' => 'ὥ',
  'ὦ' => 'ὦ',
  'ὧ' => 'ὧ',
  'Ὠ' => 'Ὠ',
  'Ὡ' => 'Ὡ',
  'Ὢ' => 'Ὢ',
  'Ὣ' => 'Ὣ',
  'Ὤ' => 'Ὤ',
  'Ὥ' => 'Ὥ',
  'Ὦ' => 'Ὦ',
  'Ὧ' => 'Ὧ',
  'ὰ' => 'ὰ',
  'ά' => 'ά',
  'ὲ' => 'ὲ',
  'έ' => 'έ',
  'ὴ' => 'ὴ',
  'ή' => 'ή',
  'ὶ' => 'ὶ',
  'ί' => 'ί',
  'ὸ' => 'ὸ',
  'ό' => 'ό',
  'ὺ' => 'ὺ',
  'ύ' => 'ύ',
  'ὼ' => 'ὼ',
  'ώ' => 'ώ',
  'ᾀ' => 'ᾀ',
  'ᾁ' => 'ᾁ',
  'ᾂ' => 'ᾂ',
  'ᾃ' => 'ᾃ',
  'ᾄ' => 'ᾄ',
  'ᾅ' => 'ᾅ',
  'ᾆ' => 'ᾆ',
  'ᾇ' => 'ᾇ',
  'ᾈ' => 'ᾈ',
  'ᾉ' => 'ᾉ',
  'ᾊ' => 'ᾊ',
  'ᾋ' => 'ᾋ',
  'ᾌ' => 'ᾌ',
  'ᾍ' => 'ᾍ',
  'ᾎ' => 'ᾎ',
  'ᾏ' => 'ᾏ',
  'ᾐ' => 'ᾐ',
  'ᾑ' => 'ᾑ',
  'ᾒ' => 'ᾒ',
  'ᾓ' => 'ᾓ',
  'ᾔ' => 'ᾔ',
  'ᾕ' => 'ᾕ',
  'ᾖ' => 'ᾖ',
  'ᾗ' => 'ᾗ',
  'ᾘ' => 'ᾘ',
  'ᾙ' => 'ᾙ',
  'ᾚ' => 'ᾚ',
  'ᾛ' => 'ᾛ',
  'ᾜ' => 'ᾜ',
  'ᾝ' => 'ᾝ',
  'ᾞ' => 'ᾞ',
  'ᾟ' => 'ᾟ',
  'ᾠ' => 'ᾠ',
  'ᾡ' => 'ᾡ',
  'ᾢ' => 'ᾢ',
  'ᾣ' => 'ᾣ',
  'ᾤ' => 'ᾤ',
  'ᾥ' => 'ᾥ',
  'ᾦ' => 'ᾦ',
  'ᾧ' => 'ᾧ',
  'ᾨ' => 'ᾨ',
  'ᾩ' => 'ᾩ',
  'ᾪ' => 'ᾪ',
  'ᾫ' => 'ᾫ',
  'ᾬ' => 'ᾬ',
  'ᾭ' => 'ᾭ',
  'ᾮ' => 'ᾮ',
  'ᾯ' => 'ᾯ',
  'ᾰ' => 'ᾰ',
  'ᾱ' => 'ᾱ',
  'ᾲ' => 'ᾲ',
  'ᾳ' => 'ᾳ',
  'ᾴ' => 'ᾴ',
  'ᾶ' => 'ᾶ',
  'ᾷ' => 'ᾷ',
  'Ᾰ' => 'Ᾰ',
  'Ᾱ' => 'Ᾱ',
  'Ὰ' => 'Ὰ',
  'Ά' => 'Ά',
  'ᾼ' => 'ᾼ',
  'ι' => 'ι',
  '῁' => '῁',
  'ῂ' => 'ῂ',
  'ῃ' => 'ῃ',
  'ῄ' => 'ῄ',
  'ῆ' => 'ῆ',
  'ῇ' => 'ῇ',
  'Ὲ' => 'Ὲ',
  'Έ' => 'Έ',
  'Ὴ' => 'Ὴ',
  'Ή' => 'Ή',
  'ῌ' => 'ῌ',
  '῍' => '῍',
  '῎' => '῎',
  '῏' => '῏',
  'ῐ' => 'ῐ',
  'ῑ' => 'ῑ',
  'ῒ' => 'ῒ',
  'ΐ' => 'ΐ',
  'ῖ' => 'ῖ',
  'ῗ' => 'ῗ',
  'Ῐ' => 'Ῐ',
  'Ῑ' => 'Ῑ',
  'Ὶ' => 'Ὶ',
  'Ί' => 'Ί',
  '῝' => '῝',
  '῞' => '῞',
  '῟' => '῟',
  'ῠ' => 'ῠ',
  'ῡ' => 'ῡ',
  'ῢ' => 'ῢ',
  'ΰ' => 'ΰ',
  'ῤ' => 'ῤ',
  'ῥ' => 'ῥ',
  'ῦ' => 'ῦ',
  'ῧ' => 'ῧ',
  'Ῠ' => 'Ῠ',
  'Ῡ' => 'Ῡ',
  'Ὺ' => 'Ὺ',
  'Ύ' => 'Ύ',
  'Ῥ' => 'Ῥ',
  '῭' => '῭',
  '΅' => '΅',
  '`' => '`',
  'ῲ' => 'ῲ',
  'ῳ' => 'ῳ',
  'ῴ' => 'ῴ',
  'ῶ' => 'ῶ',
  'ῷ' => 'ῷ',
  'Ὸ' => 'Ὸ',
  'Ό' => 'Ό',
  'Ὼ' => 'Ὼ',
  'Ώ' => 'Ώ',
  'ῼ' => 'ῼ',
  '´' => '´',
  ' ' => ' ',
  ' ' => ' ',
  'Ω' => 'Ω',
  'K' => 'K',
  'Å' => 'Å',
  '↚' => '↚',
  '↛' => '↛',
  '↮' => '↮',
  '⇍' => '⇍',
  '⇎' => '⇎',
  '⇏' => '⇏',
  '∄' => '∄',
  '∉' => '∉',
  '∌' => '∌',
  '∤' => '∤',
  '∦' => '∦',
  '≁' => '≁',
  '≄' => '≄',
  '≇' => '≇',
  '≉' => '≉',
  '≠' => '≠',
  '≢' => '≢',
  '≭' => '≭',
  '≮' => '≮',
  '≯' => '≯',
  '≰' => '≰',
  '≱' => '≱',
  '≴' => '≴',
  '≵' => '≵',
  '≸' => '≸',
  '≹' => '≹',
  '⊀' => '⊀',
  '⊁' => '⊁',
  '⊄' => '⊄',
  '⊅' => '⊅',
  '⊈' => '⊈',
  '⊉' => '⊉',
  '⊬' => '⊬',
  '⊭' => '⊭',
  '⊮' => '⊮',
  '⊯' => '⊯',
  '⋠' => '⋠',
  '⋡' => '⋡',
  '⋢' => '⋢',
  '⋣' => '⋣',
  '⋪' => '⋪',
  '⋫' => '⋫',
  '⋬' => '⋬',
  '⋭' => '⋭',
  '〈' => '〈',
  '〉' => '〉',
  '⫝̸' => '⫝̸',
  'が' => 'が',
  'ぎ' => 'ぎ',
  'ぐ' => 'ぐ',
  'げ' => 'げ',
  'ご' => 'ご',
  'ざ' => 'ざ',
  'じ' => 'じ',
  'ず' => 'ず',
  'ぜ' => 'ぜ',
  'ぞ' => 'ぞ',
  'だ' => 'だ',
  'ぢ' => 'ぢ',
  'づ' => 'づ',
  'で' => 'で',
  'ど' => 'ど',
  'ば' => 'ば',
  'ぱ' => 'ぱ',
  'び' => 'び',
  'ぴ' => 'ぴ',
  'ぶ' => 'ぶ',
  'ぷ' => 'ぷ',
  'べ' => 'べ',
  'ぺ' => 'ぺ',
  'ぼ' => 'ぼ',
  'ぽ' => 'ぽ',
  'ゔ' => 'ゔ',
  'ゞ' => 'ゞ',
  'ガ' => 'ガ',
  'ギ' => 'ギ',
  'グ' => 'グ',
  'ゲ' => 'ゲ',
  'ゴ' => 'ゴ',
  'ザ' => 'ザ',
  'ジ' => 'ジ',
  'ズ' => 'ズ',
  'ゼ' => 'ゼ',
  'ゾ' => 'ゾ',
  'ダ' => 'ダ',
  'ヂ' => 'ヂ',
  'ヅ' => 'ヅ',
  'デ' => 'デ',
  'ド' => 'ド',
  'バ' => 'バ',
  'パ' => 'パ',
  'ビ' => 'ビ',
  'ピ' => 'ピ',
  'ブ' => 'ブ',
  'プ' => 'プ',
  'ベ' => 'ベ',
  'ペ' => 'ペ',
  'ボ' => 'ボ',
  'ポ' => 'ポ',
  'ヴ' => 'ヴ',
  'ヷ' => 'ヷ',
  'ヸ' => 'ヸ',
  'ヹ' => 'ヹ',
  'ヺ' => 'ヺ',
  'ヾ' => 'ヾ',
  '豈' => '豈',
  '更' => '更',
  '車' => '車',
  '賈' => '賈',
  '滑' => '滑',
  '串' => '串',
  '句' => '句',
  '龜' => '龜',
  '龜' => '龜',
  '契' => '契',
  '金' => '金',
  '喇' => '喇',
  '奈' => '奈',
  '懶' => '懶',
  '癩' => '癩',
  '羅' => '羅',
  '蘿' => '蘿',
  '螺' => '螺',
  '裸' => '裸',
  '邏' => '邏',
  '樂' => '樂',
  '洛' => '洛',
  '烙' => '烙',
  '珞' => '珞',
  '落' => '落',
  '酪' => '酪',
  '駱' => '駱',
  '亂' => '亂',
  '卵' => '卵',
  '欄' => '欄',
  '爛' => '爛',
  '蘭' => '蘭',
  '鸞' => '鸞',
  '嵐' => '嵐',
  '濫' => '濫',
  '藍' => '藍',
  '襤' => '襤',
  '拉' => '拉',
  '臘' => '臘',
  '蠟' => '蠟',
  '廊' => '廊',
  '朗' => '朗',
  '浪' => '浪',
  '狼' => '狼',
  '郎' => '郎',
  '來' => '來',
  '冷' => '冷',
  '勞' => '勞',
  '擄' => '擄',
  '櫓' => '櫓',
  '爐' => '爐',
  '盧' => '盧',
  '老' => '老',
  '蘆' => '蘆',
  '虜' => '虜',
  '路' => '路',
  '露' => '露',
  '魯' => '魯',
  '鷺' => '鷺',
  '碌' => '碌',
  '祿' => '祿',
  '綠' => '綠',
  '菉' => '菉',
  '錄' => '錄',
  '鹿' => '鹿',
  '論' => '論',
  '壟' => '壟',
  '弄' => '弄',
  '籠' => '籠',
  '聾' => '聾',
  '牢' => '牢',
  '磊' => '磊',
  '賂' => '賂',
  '雷' => '雷',
  '壘' => '壘',
  '屢' => '屢',
  '樓' => '樓',
  '淚' => '淚',
  '漏' => '漏',
  '累' => '累',
  '縷' => '縷',
  '陋' => '陋',
  '勒' => '勒',
  '肋' => '肋',
  '凜' => '凜',
  '凌' => '凌',
  '稜' => '稜',
  '綾' => '綾',
  '菱' => '菱',
  '陵' => '陵',
  '讀' => '讀',
  '拏' => '拏',
  '樂' => '樂',
  '諾' => '諾',
  '丹' => '丹',
  '寧' => '寧',
  '怒' => '怒',
  '率' => '率',
  '異' => '異',
  '北' => '北',
  '磻' => '磻',
  '便' => '便',
  '復' => '復',
  '不' => '不',
  '泌' => '泌',
  '數' => '數',
  '索' => '索',
  '參' => '參',
  '塞' => '塞',
  '省' => '省',
  '葉' => '葉',
  '說' => '說',
  '殺' => '殺',
  '辰' => '辰',
  '沈' => '沈',
  '拾' => '拾',
  '若' => '若',
  '掠' => '掠',
  '略' => '略',
  '亮' => '亮',
  '兩' => '兩',
  '凉' => '凉',
  '梁' => '梁',
  '糧' => '糧',
  '良' => '良',
  '諒' => '諒',
  '量' => '量',
  '勵' => '勵',
  '呂' => '呂',
  '女' => '女',
  '廬' => '廬',
  '旅' => '旅',
  '濾' => '濾',
  '礪' => '礪',
  '閭' => '閭',
  '驪' => '驪',
  '麗' => '麗',
  '黎' => '黎',
  '力' => '力',
  '曆' => '曆',
  '歷' => '歷',
  '轢' => '轢',
  '年' => '年',
  '憐' => '憐',
  '戀' => '戀',
  '撚' => '撚',
  '漣' => '漣',
  '煉' => '煉',
  '璉' => '璉',
  '秊' => '秊',
  '練' => '練',
  '聯' => '聯',
  '輦' => '輦',
  '蓮' => '蓮',
  '連' => '連',
  '鍊' => '鍊',
  '列' => '列',
  '劣' => '劣',
  '咽' => '咽',
  '烈' => '烈',
  '裂' => '裂',
  '說' => '說',
  '廉' => '廉',
  '念' => '念',
  '捻' => '捻',
  '殮' => '殮',
  '簾' => '簾',
  '獵' => '獵',
  '令' => '令',
  '囹' => '囹',
  '寧' => '寧',
  '嶺' => '嶺',
  '怜' => '怜',
  '玲' => '玲',
  '瑩' => '瑩',
  '羚' => '羚',
  '聆' => '聆',
  '鈴' => '鈴',
  '零' => '零',
  '靈' => '靈',
  '領' => '領',
  '例' => '例',
  '禮' => '禮',
  '醴' => '醴',
  '隸' => '隸',
  '惡' => '惡',
  '了' => '了',
  '僚' => '僚',
  '寮' => '寮',
  '尿' => '尿',
  '料' => '料',
  '樂' => '樂',
  '燎' => '燎',
  '療' => '療',
  '蓼' => '蓼',
  '遼' => '遼',
  '龍' => '龍',
  '暈' => '暈',
  '阮' => '阮',
  '劉' => '劉',
  '杻' => '杻',
  '柳' => '柳',
  '流' => '流',
  '溜' => '溜',
  '琉' => '琉',
  '留' => '留',
  '硫' => '硫',
  '紐' => '紐',
  '類' => '類',
  '六' => '六',
  '戮' => '戮',
  '陸' => '陸',
  '倫' => '倫',
  '崙' => '崙',
  '淪' => '淪',
  '輪' => '輪',
  '律' => '律',
  '慄' => '慄',
  '栗' => '栗',
  '率' => '率',
  '隆' => '隆',
  '利' => '利',
  '吏' => '吏',
  '履' => '履',
  '易' => '易',
  '李' => '李',
  '梨' => '梨',
  '泥' => '泥',
  '理' => '理',
  '痢' => '痢',
  '罹' => '罹',
  '裏' => '裏',
  '裡' => '裡',
  '里' => '里',
  '離' => '離',
  '匿' => '匿',
  '溺' => '溺',
  '吝' => '吝',
  '燐' => '燐',
  '璘' => '璘',
  '藺' => '藺',
  '隣' => '隣',
  '鱗' => '鱗',
  '麟' => '麟',
  '林' => '林',
  '淋' => '淋',
  '臨' => '臨',
  '立' => '立',
  '笠' => '笠',
  '粒' => '粒',
  '狀' => '狀',
  '炙' => '炙',
  '識' => '識',
  '什' => '什',
  '茶' => '茶',
  '刺' => '刺',
  '切' => '切',
  '度' => '度',
  '拓' => '拓',
  '糖' => '糖',
  '宅' => '宅',
  '洞' => '洞',
  '暴' => '暴',
  '輻' => '輻',
  '行' => '行',
  '降' => '降',
  '見' => '見',
  '廓' => '廓',
  '兀' => '兀',
  '嗀' => '嗀',
  '塚' => '塚',
  '晴' => '晴',
  '凞' => '凞',
  '猪' => '猪',
  '益' => '益',
  '礼' => '礼',
  '神' => '神',
  '祥' => '祥',
  '福' => '福',
  '靖' => '靖',
  '精' => '精',
  '羽' => '羽',
  '蘒' => '蘒',
  '諸' => '諸',
  '逸' => '逸',
  '都' => '都',
  '飯' => '飯',
  '飼' => '飼',
  '館' => '館',
  '鶴' => '鶴',
  '郞' => '郞',
  '隷' => '隷',
  '侮' => '侮',
  '僧' => '僧',
  '免' => '免',
  '勉' => '勉',
  '勤' => '勤',
  '卑' => '卑',
  '喝' => '喝',
  '嘆' => '嘆',
  '器' => '器',
  '塀' => '塀',
  '墨' => '墨',
  '層' => '層',
  '屮' => '屮',
  '悔' => '悔',
  '慨' => '慨',
  '憎' => '憎',
  '懲' => '懲',
  '敏' => '敏',
  '既' => '既',
  '暑' => '暑',
  '梅' => '梅',
  '海' => '海',
  '渚' => '渚',
  '漢' => '漢',
  '煮' => '煮',
  '爫' => '爫',
  '琢' => '琢',
  '碑' => '碑',
  '社' => '社',
  '祉' => '祉',
  '祈' => '祈',
  '祐' => '祐',
  '祖' => '祖',
  '祝' => '祝',
  '禍' => '禍',
  '禎' => '禎',
  '穀' => '穀',
  '突' => '突',
  '節' => '節',
  '練' => '練',
  '縉' => '縉',
  '繁' => '繁',
  '署' => '署',
  '者' => '者',
  '臭' => '臭',
  '艹' => '艹',
  '艹' => '艹',
  '著' => '著',
  '褐' => '褐',
  '視' => '視',
  '謁' => '謁',
  '謹' => '謹',
  '賓' => '賓',
  '贈' => '贈',
  '辶' => '辶',
  '逸' => '逸',
  '難' => '難',
  '響' => '響',
  '頻' => '頻',
  '恵' => '恵',
  '𤋮' => '𤋮',
  '舘' => '舘',
  '並' => '並',
  '况' => '况',
  '全' => '全',
  '侀' => '侀',
  '充' => '充',
  '冀' => '冀',
  '勇' => '勇',
  '勺' => '勺',
  '喝' => '喝',
  '啕' => '啕',
  '喙' => '喙',
  '嗢' => '嗢',
  '塚' => '塚',
  '墳' => '墳',
  '奄' => '奄',
  '奔' => '奔',
  '婢' => '婢',
  '嬨' => '嬨',
  '廒' => '廒',
  '廙' => '廙',
  '彩' => '彩',
  '徭' => '徭',
  '惘' => '惘',
  '慎' => '慎',
  '愈' => '愈',
  '憎' => '憎',
  '慠' => '慠',
  '懲' => '懲',
  '戴' => '戴',
  '揄' => '揄',
  '搜' => '搜',
  '摒' => '摒',
  '敖' => '敖',
  '晴' => '晴',
  '朗' => '朗',
  '望' => '望',
  '杖' => '杖',
  '歹' => '歹',
  '殺' => '殺',
  '流' => '流',
  '滛' => '滛',
  '滋' => '滋',
  '漢' => '漢',
  '瀞' => '瀞',
  '煮' => '煮',
  '瞧' => '瞧',
  '爵' => '爵',
  '犯' => '犯',
  '猪' => '猪',
  '瑱' => '瑱',
  '甆' => '甆',
  '画' => '画',
  '瘝' => '瘝',
  '瘟' => '瘟',
  '益' => '益',
  '盛' => '盛',
  '直' => '直',
  '睊' => '睊',
  '着' => '着',
  '磌' => '磌',
  '窱' => '窱',
  '節' => '節',
  '类' => '类',
  '絛' => '絛',
  '練' => '練',
  '缾' => '缾',
  '者' => '者',
  '荒' => '荒',
  '華' => '華',
  '蝹' => '蝹',
  '襁' => '襁',
  '覆' => '覆',
  '視' => '視',
  '調' => '調',
  '諸' => '諸',
  '請' => '請',
  '謁' => '謁',
  '諾' => '諾',
  '諭' => '諭',
  '謹' => '謹',
  '變' => '變',
  '贈' => '贈',
  '輸' => '輸',
  '遲' => '遲',
  '醙' => '醙',
  '鉶' => '鉶',
  '陼' => '陼',
  '難' => '難',
  '靖' => '靖',
  '韛' => '韛',
  '響' => '響',
  '頋' => '頋',
  '頻' => '頻',
  '鬒' => '鬒',
  '龜' => '龜',
  '𢡊' => '𢡊',
  '𢡄' => '𢡄',
  '𣏕' => '𣏕',
  '㮝' => '㮝',
  '䀘' => '䀘',
  '䀹' => '䀹',
  '𥉉' => '𥉉',
  '𥳐' => '𥳐',
  '𧻓' => '𧻓',
  '齃' => '齃',
  '龎' => '龎',
  'יִ' => 'יִ',
  'ײַ' => 'ײַ',
  'שׁ' => 'שׁ',
  'שׂ' => 'שׂ',
  'שּׁ' => 'שּׁ',
  'שּׂ' => 'שּׂ',
  'אַ' => 'אַ',
  'אָ' => 'אָ',
  'אּ' => 'אּ',
  'בּ' => 'בּ',
  'גּ' => 'גּ',
  'דּ' => 'דּ',
  'הּ' => 'הּ',
  'וּ' => 'וּ',
  'זּ' => 'זּ',
  'טּ' => 'טּ',
  'יּ' => 'יּ',
  'ךּ' => 'ךּ',
  'כּ' => 'כּ',
  'לּ' => 'לּ',
  'מּ' => 'מּ',
  'נּ' => 'נּ',
  'סּ' => 'סּ',
  'ףּ' => 'ףּ',
  'פּ' => 'פּ',
  'צּ' => 'צּ',
  'קּ' => 'קּ',
  'רּ' => 'רּ',
  'שּ' => 'שּ',
  'תּ' => 'תּ',
  'וֹ' => 'וֹ',
  'בֿ' => 'בֿ',
  'כֿ' => 'כֿ',
  'פֿ' => 'פֿ',
  '𑂚' => '𑂚',
  '𑂜' => '𑂜',
  '𑂫' => '𑂫',
  '𑄮' => '𑄮',
  '𑄯' => '𑄯',
  '𑍋' => '𑍋',
  '𑍌' => '𑍌',
  '𑒻' => '𑒻',
  '𑒼' => '𑒼',
  '𑒾' => '𑒾',
  '𑖺' => '𑖺',
  '𑖻' => '𑖻',
  '𑤸' => '𑤸',
  '𝅗𝅥' => '𝅗𝅥',
  '𝅘𝅥' => '𝅘𝅥',
  '𝅘𝅥𝅮' => '𝅘𝅥𝅮',
  '𝅘𝅥𝅯' => '𝅘𝅥𝅯',
  '𝅘𝅥𝅰' => '𝅘𝅥𝅰',
  '𝅘𝅥𝅱' => '𝅘𝅥𝅱',
  '𝅘𝅥𝅲' => '𝅘𝅥𝅲',
  '𝆹𝅥' => '𝆹𝅥',
  '𝆺𝅥' => '𝆺𝅥',
  '𝆹𝅥𝅮' => '𝆹𝅥𝅮',
  '𝆺𝅥𝅮' => '𝆺𝅥𝅮',
  '𝆹𝅥𝅯' => '𝆹𝅥𝅯',
  '𝆺𝅥𝅯' => '𝆺𝅥𝅯',
  '丽' => '丽',
  '丸' => '丸',
  '乁' => '乁',
  '𠄢' => '𠄢',
  '你' => '你',
  '侮' => '侮',
  '侻' => '侻',
  '倂' => '倂',
  '偺' => '偺',
  '備' => '備',
  '僧' => '僧',
  '像' => '像',
  '㒞' => '㒞',
  '𠘺' => '𠘺',
  '免' => '免',
  '兔' => '兔',
  '兤' => '兤',
  '具' => '具',
  '𠔜' => '𠔜',
  '㒹' => '㒹',
  '內' => '內',
  '再' => '再',
  '𠕋' => '𠕋',
  '冗' => '冗',
  '冤' => '冤',
  '仌' => '仌',
  '冬' => '冬',
  '况' => '况',
  '𩇟' => '𩇟',
  '凵' => '凵',
  '刃' => '刃',
  '㓟' => '㓟',
  '刻' => '刻',
  '剆' => '剆',
  '割' => '割',
  '剷' => '剷',
  '㔕' => '㔕',
  '勇' => '勇',
  '勉' => '勉',
  '勤' => '勤',
  '勺' => '勺',
  '包' => '包',
  '匆' => '匆',
  '北' => '北',
  '卉' => '卉',
  '卑' => '卑',
  '博' => '博',
  '即' => '即',
  '卽' => '卽',
  '卿' => '卿',
  '卿' => '卿',
  '卿' => '卿',
  '𠨬' => '𠨬',
  '灰' => '灰',
  '及' => '及',
  '叟' => '叟',
  '𠭣' => '𠭣',
  '叫' => '叫',
  '叱' => '叱',
  '吆' => '吆',
  '咞' => '咞',
  '吸' => '吸',
  '呈' => '呈',
  '周' => '周',
  '咢' => '咢',
  '哶' => '哶',
  '唐' => '唐',
  '啓' => '啓',
  '啣' => '啣',
  '善' => '善',
  '善' => '善',
  '喙' => '喙',
  '喫' => '喫',
  '喳' => '喳',
  '嗂' => '嗂',
  '圖' => '圖',
  '嘆' => '嘆',
  '圗' => '圗',
  '噑' => '噑',
  '噴' => '噴',
  '切' => '切',
  '壮' => '壮',
  '城' => '城',
  '埴' => '埴',
  '堍' => '堍',
  '型' => '型',
  '堲' => '堲',
  '報' => '報',
  '墬' => '墬',
  '𡓤' => '𡓤',
  '売' => '売',
  '壷' => '壷',
  '夆' => '夆',
  '多' => '多',
  '夢' => '夢',
  '奢' => '奢',
  '𡚨' => '𡚨',
  '𡛪' => '𡛪',
  '姬' => '姬',
  '娛' => '娛',
  '娧' => '娧',
  '姘' => '姘',
  '婦' => '婦',
  '㛮' => '㛮',
  '㛼' => '㛼',
  '嬈' => '嬈',
  '嬾' => '嬾',
  '嬾' => '嬾',
  '𡧈' => '𡧈',
  '寃' => '寃',
  '寘' => '寘',
  '寧' => '寧',
  '寳' => '寳',
  '𡬘' => '𡬘',
  '寿' => '寿',
  '将' => '将',
  '当' => '当',
  '尢' => '尢',
  '㞁' => '㞁',
  '屠' => '屠',
  '屮' => '屮',
  '峀' => '峀',
  '岍' => '岍',
  '𡷤' => '𡷤',
  '嵃' => '嵃',
  '𡷦' => '𡷦',
  '嵮' => '嵮',
  '嵫' => '嵫',
  '嵼' => '嵼',
  '巡' => '巡',
  '巢' => '巢',
  '㠯' => '㠯',
  '巽' => '巽',
  '帨' => '帨',
  '帽' => '帽',
  '幩' => '幩',
  '㡢' => '㡢',
  '𢆃' => '𢆃',
  '㡼' => '㡼',
  '庰' => '庰',
  '庳' => '庳',
  '庶' => '庶',
  '廊' => '廊',
  '𪎒' => '𪎒',
  '廾' => '廾',
  '𢌱' => '𢌱',
  '𢌱' => '𢌱',
  '舁' => '舁',
  '弢' => '弢',
  '弢' => '弢',
  '㣇' => '㣇',
  '𣊸' => '𣊸',
  '𦇚' => '𦇚',
  '形' => '形',
  '彫' => '彫',
  '㣣' => '㣣',
  '徚' => '徚',
  '忍' => '忍',
  '志' => '志',
  '忹' => '忹',
  '悁' => '悁',
  '㤺' => '㤺',
  '㤜' => '㤜',
  '悔' => '悔',
  '𢛔' => '𢛔',
  '惇' => '惇',
  '慈' => '慈',
  '慌' => '慌',
  '慎' => '慎',
  '慌' => '慌',
  '慺' => '慺',
  '憎' => '憎',
  '憲' => '憲',
  '憤' => '憤',
  '憯' => '憯',
  '懞' => '懞',
  '懲' => '懲',
  '懶' => '懶',
  '成' => '成',
  '戛' => '戛',
  '扝' => '扝',
  '抱' => '抱',
  '拔' => '拔',
  '捐' => '捐',
  '𢬌' => '𢬌',
  '挽' => '挽',
  '拼' => '拼',
  '捨' => '捨',
  '掃' => '掃',
  '揤' => '揤',
  '𢯱' => '𢯱',
  '搢' => '搢',
  '揅' => '揅',
  '掩' => '掩',
  '㨮' => '㨮',
  '摩' => '摩',
  '摾' => '摾',
  '撝' => '撝',
  '摷' => '摷',
  '㩬' => '㩬',
  '敏' => '敏',
  '敬' => '敬',
  '𣀊' => '𣀊',
  '旣' => '旣',
  '書' => '書',
  '晉' => '晉',
  '㬙' => '㬙',
  '暑' => '暑',
  '㬈' => '㬈',
  '㫤' => '㫤',
  '冒' => '冒',
  '冕' => '冕',
  '最' => '最',
  '暜' => '暜',
  '肭' => '肭',
  '䏙' => '䏙',
  '朗' => '朗',
  '望' => '望',
  '朡' => '朡',
  '杞' => '杞',
  '杓' => '杓',
  '𣏃' => '𣏃',
  '㭉' => '㭉',
  '柺' => '柺',
  '枅' => '枅',
  '桒' => '桒',
  '梅' => '梅',
  '𣑭' => '𣑭',
  '梎' => '梎',
  '栟' => '栟',
  '椔' => '椔',
  '㮝' => '㮝',
  '楂' => '楂',
  '榣' => '榣',
  '槪' => '槪',
  '檨' => '檨',
  '𣚣' => '𣚣',
  '櫛' => '櫛',
  '㰘' => '㰘',
  '次' => '次',
  '𣢧' => '𣢧',
  '歔' => '歔',
  '㱎' => '㱎',
  '歲' => '歲',
  '殟' => '殟',
  '殺' => '殺',
  '殻' => '殻',
  '𣪍' => '𣪍',
  '𡴋' => '𡴋',
  '𣫺' => '𣫺',
  '汎' => '汎',
  '𣲼' => '𣲼',
  '沿' => '沿',
  '泍' => '泍',
  '汧' => '汧',
  '洖' => '洖',
  '派' => '派',
  '海' => '海',
  '流' => '流',
  '浩' => '浩',
  '浸' => '浸',
  '涅' => '涅',
  '𣴞' => '𣴞',
  '洴' => '洴',
  '港' => '港',
  '湮' => '湮',
  '㴳' => '㴳',
  '滋' => '滋',
  '滇' => '滇',
  '𣻑' => '𣻑',
  '淹' => '淹',
  '潮' => '潮',
  '𣽞' => '𣽞',
  '𣾎' => '𣾎',
  '濆' => '濆',
  '瀹' => '瀹',
  '瀞' => '瀞',
  '瀛' => '瀛',
  '㶖' => '㶖',
  '灊' => '灊',
  '災' => '災',
  '灷' => '灷',
  '炭' => '炭',
  '𠔥' => '𠔥',
  '煅' => '煅',
  '𤉣' => '𤉣',
  '熜' => '熜',
  '𤎫' => '𤎫',
  '爨' => '爨',
  '爵' => '爵',
  '牐' => '牐',
  '𤘈' => '𤘈',
  '犀' => '犀',
  '犕' => '犕',
  '𤜵' => '𤜵',
  '𤠔' => '𤠔',
  '獺' => '獺',
  '王' => '王',
  '㺬' => '㺬',
  '玥' => '玥',
  '㺸' => '㺸',
  '㺸' => '㺸',
  '瑇' => '瑇',
  '瑜' => '瑜',
  '瑱' => '瑱',
  '璅' => '璅',
  '瓊' => '瓊',
  '㼛' => '㼛',
  '甤' => '甤',
  '𤰶' => '𤰶',
  '甾' => '甾',
  '𤲒' => '𤲒',
  '異' => '異',
  '𢆟' => '𢆟',
  '瘐' => '瘐',
  '𤾡' => '𤾡',
  '𤾸' => '𤾸',
  '𥁄' => '𥁄',
  '㿼' => '㿼',
  '䀈' => '䀈',
  '直' => '直',
  '𥃳' => '𥃳',
  '𥃲' => '𥃲',
  '𥄙' => '𥄙',
  '𥄳' => '𥄳',
  '眞' => '眞',
  '真' => '真',
  '真' => '真',
  '睊' => '睊',
  '䀹' => '䀹',
  '瞋' => '瞋',
  '䁆' => '䁆',
  '䂖' => '䂖',
  '𥐝' => '𥐝',
  '硎' => '硎',
  '碌' => '碌',
  '磌' => '磌',
  '䃣' => '䃣',
  '𥘦' => '𥘦',
  '祖' => '祖',
  '𥚚' => '𥚚',
  '𥛅' => '𥛅',
  '福' => '福',
  '秫' => '秫',
  '䄯' => '䄯',
  '穀' => '穀',
  '穊' => '穊',
  '穏' => '穏',
  '𥥼' => '𥥼',
  '𥪧' => '𥪧',
  '𥪧' => '𥪧',
  '竮' => '竮',
  '䈂' => '䈂',
  '𥮫' => '𥮫',
  '篆' => '篆',
  '築' => '築',
  '䈧' => '䈧',
  '𥲀' => '𥲀',
  '糒' => '糒',
  '䊠' => '䊠',
  '糨' => '糨',
  '糣' => '糣',
  '紀' => '紀',
  '𥾆' => '𥾆',
  '絣' => '絣',
  '䌁' => '䌁',
  '緇' => '緇',
  '縂' => '縂',
  '繅' => '繅',
  '䌴' => '䌴',
  '𦈨' => '𦈨',
  '𦉇' => '𦉇',
  '䍙' => '䍙',
  '𦋙' => '𦋙',
  '罺' => '罺',
  '𦌾' => '𦌾',
  '羕' => '羕',
  '翺' => '翺',
  '者' => '者',
  '𦓚' => '𦓚',
  '𦔣' => '𦔣',
  '聠' => '聠',
  '𦖨' => '𦖨',
  '聰' => '聰',
  '𣍟' => '𣍟',
  '䏕' => '䏕',
  '育' => '育',
  '脃' => '脃',
  '䐋' => '䐋',
  '脾' => '脾',
  '媵' => '媵',
  '𦞧' => '𦞧',
  '𦞵' => '𦞵',
  '𣎓' => '𣎓',
  '𣎜' => '𣎜',
  '舁' => '舁',
  '舄' => '舄',
  '辞' => '辞',
  '䑫' => '䑫',
  '芑' => '芑',
  '芋' => '芋',
  '芝' => '芝',
  '劳' => '劳',
  '花' => '花',
  '芳' => '芳',
  '芽' => '芽',
  '苦' => '苦',
  '𦬼' => '𦬼',
  '若' => '若',
  '茝' => '茝',
  '荣' => '荣',
  '莭' => '莭',
  '茣' => '茣',
  '莽' => '莽',
  '菧' => '菧',
  '著' => '著',
  '荓' => '荓',
  '菊' => '菊',
  '菌' => '菌',
  '菜' => '菜',
  '𦰶' => '𦰶',
  '𦵫' => '𦵫',
  '𦳕' => '𦳕',
  '䔫' => '䔫',
  '蓱' => '蓱',
  '蓳' => '蓳',
  '蔖' => '蔖',
  '𧏊' => '𧏊',
  '蕤' => '蕤',
  '𦼬' => '𦼬',
  '䕝' => '䕝',
  '䕡' => '䕡',
  '𦾱' => '𦾱',
  '𧃒' => '𧃒',
  '䕫' => '䕫',
  '虐' => '虐',
  '虜' => '虜',
  '虧' => '虧',
  '虩' => '虩',
  '蚩' => '蚩',
  '蚈' => '蚈',
  '蜎' => '蜎',
  '蛢' => '蛢',
  '蝹' => '蝹',
  '蜨' => '蜨',
  '蝫' => '蝫',
  '螆' => '螆',
  '䗗' => '䗗',
  '蟡' => '蟡',
  '蠁' => '蠁',
  '䗹' => '䗹',
  '衠' => '衠',
  '衣' => '衣',
  '𧙧' => '𧙧',
  '裗' => '裗',
  '裞' => '裞',
  '䘵' => '䘵',
  '裺' => '裺',
  '㒻' => '㒻',
  '𧢮' => '𧢮',
  '𧥦' => '𧥦',
  '䚾' => '䚾',
  '䛇' => '䛇',
  '誠' => '誠',
  '諭' => '諭',
  '變' => '變',
  '豕' => '豕',
  '𧲨' => '𧲨',
  '貫' => '貫',
  '賁' => '賁',
  '贛' => '贛',
  '起' => '起',
  '𧼯' => '𧼯',
  '𠠄' => '𠠄',
  '跋' => '跋',
  '趼' => '趼',
  '跰' => '跰',
  '𠣞' => '𠣞',
  '軔' => '軔',
  '輸' => '輸',
  '𨗒' => '𨗒',
  '𨗭' => '𨗭',
  '邔' => '邔',
  '郱' => '郱',
  '鄑' => '鄑',
  '𨜮' => '𨜮',
  '鄛' => '鄛',
  '鈸' => '鈸',
  '鋗' => '鋗',
  '鋘' => '鋘',
  '鉼' => '鉼',
  '鏹' => '鏹',
  '鐕' => '鐕',
  '𨯺' => '𨯺',
  '開' => '開',
  '䦕' => '䦕',
  '閷' => '閷',
  '𨵷' => '𨵷',
  '䧦' => '䧦',
  '雃' => '雃',
  '嶲' => '嶲',
  '霣' => '霣',
  '𩅅' => '𩅅',
  '𩈚' => '𩈚',
  '䩮' => '䩮',
  '䩶' => '䩶',
  '韠' => '韠',
  '𩐊' => '𩐊',
  '䪲' => '䪲',
  '𩒖' => '𩒖',
  '頋' => '頋',
  '頋' => '頋',
  '頩' => '頩',
  '𩖶' => '𩖶',
  '飢' => '飢',
  '䬳' => '䬳',
  '餩' => '餩',
  '馧' => '馧',
  '駂' => '駂',
  '駾' => '駾',
  '䯎' => '䯎',
  '𩬰' => '𩬰',
  '鬒' => '鬒',
  '鱀' => '鱀',
  '鳽' => '鳽',
  '䳎' => '䳎',
  '䳭' => '䳭',
  '鵧' => '鵧',
  '𪃎' => '𪃎',
  '䳸' => '䳸',
  '𪄅' => '𪄅',
  '𪈎' => '𪈎',
  '𪊑' => '𪊑',
  '麻' => '麻',
  '䵖' => '䵖',
  '黹' => '黹',
  '黾' => '黾',
  '鼅' => '鼅',
  '鼏' => '鼏',
  '鼖' => '鼖',
  '鼻' => '鼻',
  '𪘀' => '𪘀',
);
<?php

return array (
  'À' => 'À',
  'Á' => 'Á',
  'Â' => 'Â',
  'Ã' => 'Ã',
  'Ä' => 'Ä',
  'Å' => 'Å',
  'Ç' => 'Ç',
  'È' => 'È',
  'É' => 'É',
  'Ê' => 'Ê',
  'Ë' => 'Ë',
  'Ì' => 'Ì',
  'Í' => 'Í',
  'Î' => 'Î',
  'Ï' => 'Ï',
  'Ñ' => 'Ñ',
  'Ò' => 'Ò',
  'Ó' => 'Ó',
  'Ô' => 'Ô',
  'Õ' => 'Õ',
  'Ö' => 'Ö',
  'Ù' => 'Ù',
  'Ú' => 'Ú',
  'Û' => 'Û',
  'Ü' => 'Ü',
  'Ý' => 'Ý',
  'à' => 'à',
  'á' => 'á',
  'â' => 'â',
  'ã' => 'ã',
  'ä' => 'ä',
  'å' => 'å',
  'ç' => 'ç',
  'è' => 'è',
  'é' => 'é',
  'ê' => 'ê',
  'ë' => 'ë',
  'ì' => 'ì',
  'í' => 'í',
  'î' => 'î',
  'ï' => 'ï',
  'ñ' => 'ñ',
  'ò' => 'ò',
  'ó' => 'ó',
  'ô' => 'ô',
  'õ' => 'õ',
  'ö' => 'ö',
  'ù' => 'ù',
  'ú' => 'ú',
  'û' => 'û',
  'ü' => 'ü',
  'ý' => 'ý',
  'ÿ' => 'ÿ',
  'Ā' => 'Ā',
  'ā' => 'ā',
  'Ă' => 'Ă',
  'ă' => 'ă',
  'Ą' => 'Ą',
  'ą' => 'ą',
  'Ć' => 'Ć',
  'ć' => 'ć',
  'Ĉ' => 'Ĉ',
  'ĉ' => 'ĉ',
  'Ċ' => 'Ċ',
  'ċ' => 'ċ',
  'Č' => 'Č',
  'č' => 'č',
  'Ď' => 'Ď',
  'ď' => 'ď',
  'Ē' => 'Ē',
  'ē' => 'ē',
  'Ĕ' => 'Ĕ',
  'ĕ' => 'ĕ',
  'Ė' => 'Ė',
  'ė' => 'ė',
  'Ę' => 'Ę',
  'ę' => 'ę',
  'Ě' => 'Ě',
  'ě' => 'ě',
  'Ĝ' => 'Ĝ',
  'ĝ' => 'ĝ',
  'Ğ' => 'Ğ',
  'ğ' => 'ğ',
  'Ġ' => 'Ġ',
  'ġ' => 'ġ',
  'Ģ' => 'Ģ',
  'ģ' => 'ģ',
  'Ĥ' => 'Ĥ',
  'ĥ' => 'ĥ',
  'Ĩ' => 'Ĩ',
  'ĩ' => 'ĩ',
  'Ī' => 'Ī',
  'ī' => 'ī',
  'Ĭ' => 'Ĭ',
  'ĭ' => 'ĭ',
  'Į' => 'Į',
  'į' => 'į',
  'İ' => 'İ',
  'Ĵ' => 'Ĵ',
  'ĵ' => 'ĵ',
  'Ķ' => 'Ķ',
  'ķ' => 'ķ',
  'Ĺ' => 'Ĺ',
  'ĺ' => 'ĺ',
  'Ļ' => 'Ļ',
  'ļ' => 'ļ',
  'Ľ' => 'Ľ',
  'ľ' => 'ľ',
  'Ń' => 'Ń',
  'ń' => 'ń',
  'Ņ' => 'Ņ',
  'ņ' => 'ņ',
  'Ň' => 'Ň',
  'ň' => 'ň',
  'Ō' => 'Ō',
  'ō' => 'ō',
  'Ŏ' => 'Ŏ',
  'ŏ' => 'ŏ',
  'Ő' => 'Ő',
  'ő' => 'ő',
  'Ŕ' => 'Ŕ',
  'ŕ' => 'ŕ',
  'Ŗ' => 'Ŗ',
  'ŗ' => 'ŗ',
  'Ř' => 'Ř',
  'ř' => 'ř',
  'Ś' => 'Ś',
  'ś' => 'ś',
  'Ŝ' => 'Ŝ',
  'ŝ' => 'ŝ',
  'Ş' => 'Ş',
  'ş' => 'ş',
  'Š' => 'Š',
  'š' => 'š',
  'Ţ' => 'Ţ',
  'ţ' => 'ţ',
  'Ť' => 'Ť',
  'ť' => 'ť',
  'Ũ' => 'Ũ',
  'ũ' => 'ũ',
  'Ū' => 'Ū',
  'ū' => 'ū',
  'Ŭ' => 'Ŭ',
  'ŭ' => 'ŭ',
  'Ů' => 'Ů',
  'ů' => 'ů',
  'Ű' => 'Ű',
  'ű' => 'ű',
  'Ų' => 'Ų',
  'ų' => 'ų',
  'Ŵ' => 'Ŵ',
  'ŵ' => 'ŵ',
  'Ŷ' => 'Ŷ',
  'ŷ' => 'ŷ',
  'Ÿ' => 'Ÿ',
  'Ź' => 'Ź',
  'ź' => 'ź',
  'Ż' => 'Ż',
  'ż' => 'ż',
  'Ž' => 'Ž',
  'ž' => 'ž',
  'Ơ' => 'Ơ',
  'ơ' => 'ơ',
  'Ư' => 'Ư',
  'ư' => 'ư',
  'Ǎ' => 'Ǎ',
  'ǎ' => 'ǎ',
  'Ǐ' => 'Ǐ',
  'ǐ' => 'ǐ',
  'Ǒ' => 'Ǒ',
  'ǒ' => 'ǒ',
  'Ǔ' => 'Ǔ',
  'ǔ' => 'ǔ',
  'Ǖ' => 'Ǖ',
  'ǖ' => 'ǖ',
  'Ǘ' => 'Ǘ',
  'ǘ' => 'ǘ',
  'Ǚ' => 'Ǚ',
  'ǚ' => 'ǚ',
  'Ǜ' => 'Ǜ',
  'ǜ' => 'ǜ',
  'Ǟ' => 'Ǟ',
  'ǟ' => 'ǟ',
  'Ǡ' => 'Ǡ',
  'ǡ' => 'ǡ',
  'Ǣ' => 'Ǣ',
  'ǣ' => 'ǣ',
  'Ǧ' => 'Ǧ',
  'ǧ' => 'ǧ',
  'Ǩ' => 'Ǩ',
  'ǩ' => 'ǩ',
  'Ǫ' => 'Ǫ',
  'ǫ' => 'ǫ',
  'Ǭ' => 'Ǭ',
  'ǭ' => 'ǭ',
  'Ǯ' => 'Ǯ',
  'ǯ' => 'ǯ',
  'ǰ' => 'ǰ',
  'Ǵ' => 'Ǵ',
  'ǵ' => 'ǵ',
  'Ǹ' => 'Ǹ',
  'ǹ' => 'ǹ',
  'Ǻ' => 'Ǻ',
  'ǻ' => 'ǻ',
  'Ǽ' => 'Ǽ',
  'ǽ' => 'ǽ',
  'Ǿ' => 'Ǿ',
  'ǿ' => 'ǿ',
  'Ȁ' => 'Ȁ',
  'ȁ' => 'ȁ',
  'Ȃ' => 'Ȃ',
  'ȃ' => 'ȃ',
  'Ȅ' => 'Ȅ',
  'ȅ' => 'ȅ',
  'Ȇ' => 'Ȇ',
  'ȇ' => 'ȇ',
  'Ȉ' => 'Ȉ',
  'ȉ' => 'ȉ',
  'Ȋ' => 'Ȋ',
  'ȋ' => 'ȋ',
  'Ȍ' => 'Ȍ',
  'ȍ' => 'ȍ',
  'Ȏ' => 'Ȏ',
  'ȏ' => 'ȏ',
  'Ȑ' => 'Ȑ',
  'ȑ' => 'ȑ',
  'Ȓ' => 'Ȓ',
  'ȓ' => 'ȓ',
  'Ȕ' => 'Ȕ',
  'ȕ' => 'ȕ',
  'Ȗ' => 'Ȗ',
  'ȗ' => 'ȗ',
  'Ș' => 'Ș',
  'ș' => 'ș',
  'Ț' => 'Ț',
  'ț' => 'ț',
  'Ȟ' => 'Ȟ',
  'ȟ' => 'ȟ',
  'Ȧ' => 'Ȧ',
  'ȧ' => 'ȧ',
  'Ȩ' => 'Ȩ',
  'ȩ' => 'ȩ',
  'Ȫ' => 'Ȫ',
  'ȫ' => 'ȫ',
  'Ȭ' => 'Ȭ',
  'ȭ' => 'ȭ',
  'Ȯ' => 'Ȯ',
  'ȯ' => 'ȯ',
  'Ȱ' => 'Ȱ',
  'ȱ' => 'ȱ',
  'Ȳ' => 'Ȳ',
  'ȳ' => 'ȳ',
  '΅' => '΅',
  'Ά' => 'Ά',
  'Έ' => 'Έ',
  'Ή' => 'Ή',
  'Ί' => 'Ί',
  'Ό' => 'Ό',
  'Ύ' => 'Ύ',
  'Ώ' => 'Ώ',
  'ΐ' => 'ΐ',
  'Ϊ' => 'Ϊ',
  'Ϋ' => 'Ϋ',
  'ά' => 'ά',
  'έ' => 'έ',
  'ή' => 'ή',
  'ί' => 'ί',
  'ΰ' => 'ΰ',
  'ϊ' => 'ϊ',
  'ϋ' => 'ϋ',
  'ό' => 'ό',
  'ύ' => 'ύ',
  'ώ' => 'ώ',
  'ϓ' => 'ϓ',
  'ϔ' => 'ϔ',
  'Ѐ' => 'Ѐ',
  'Ё' => 'Ё',
  'Ѓ' => 'Ѓ',
  'Ї' => 'Ї',
  'Ќ' => 'Ќ',
  'Ѝ' => 'Ѝ',
  'Ў' => 'Ў',
  'Й' => 'Й',
  'й' => 'й',
  'ѐ' => 'ѐ',
  'ё' => 'ё',
  'ѓ' => 'ѓ',
  'ї' => 'ї',
  'ќ' => 'ќ',
  'ѝ' => 'ѝ',
  'ў' => 'ў',
  'Ѷ' => 'Ѷ',
  'ѷ' => 'ѷ',
  'Ӂ' => 'Ӂ',
  'ӂ' => 'ӂ',
  'Ӑ' => 'Ӑ',
  'ӑ' => 'ӑ',
  'Ӓ' => 'Ӓ',
  'ӓ' => 'ӓ',
  'Ӗ' => 'Ӗ',
  'ӗ' => 'ӗ',
  'Ӛ' => 'Ӛ',
  'ӛ' => 'ӛ',
  'Ӝ' => 'Ӝ',
  'ӝ' => 'ӝ',
  'Ӟ' => 'Ӟ',
  'ӟ' => 'ӟ',
  'Ӣ' => 'Ӣ',
  'ӣ' => 'ӣ',
  'Ӥ' => 'Ӥ',
  'ӥ' => 'ӥ',
  'Ӧ' => 'Ӧ',
  'ӧ' => 'ӧ',
  'Ӫ' => 'Ӫ',
  'ӫ' => 'ӫ',
  'Ӭ' => 'Ӭ',
  'ӭ' => 'ӭ',
  'Ӯ' => 'Ӯ',
  'ӯ' => 'ӯ',
  'Ӱ' => 'Ӱ',
  'ӱ' => 'ӱ',
  'Ӳ' => 'Ӳ',
  'ӳ' => 'ӳ',
  'Ӵ' => 'Ӵ',
  'ӵ' => 'ӵ',
  'Ӹ' => 'Ӹ',
  'ӹ' => 'ӹ',
  'آ' => 'آ',
  'أ' => 'أ',
  'ؤ' => 'ؤ',
  'إ' => 'إ',
  'ئ' => 'ئ',
  'ۀ' => 'ۀ',
  'ۂ' => 'ۂ',
  'ۓ' => 'ۓ',
  'ऩ' => 'ऩ',
  'ऱ' => 'ऱ',
  'ऴ' => 'ऴ',
  'ো' => 'ো',
  'ৌ' => 'ৌ',
  'ୈ' => 'ୈ',
  'ୋ' => 'ୋ',
  'ୌ' => 'ୌ',
  'ஔ' => 'ஔ',
  'ொ' => 'ொ',
  'ோ' => 'ோ',
  'ௌ' => 'ௌ',
  'ై' => 'ై',
  'ೀ' => 'ೀ',
  'ೇ' => 'ೇ',
  'ೈ' => 'ೈ',
  'ೊ' => 'ೊ',
  'ೋ' => 'ೋ',
  'ൊ' => 'ൊ',
  'ോ' => 'ോ',
  'ൌ' => 'ൌ',
  'ේ' => 'ේ',
  'ො' => 'ො',
  'ෝ' => 'ෝ',
  'ෞ' => 'ෞ',
  'ဦ' => 'ဦ',
  'ᬆ' => 'ᬆ',
  'ᬈ' => 'ᬈ',
  'ᬊ' => 'ᬊ',
  'ᬌ' => 'ᬌ',
  'ᬎ' => 'ᬎ',
  'ᬒ' => 'ᬒ',
  'ᬻ' => 'ᬻ',
  'ᬽ' => 'ᬽ',
  'ᭀ' => 'ᭀ',
  'ᭁ' => 'ᭁ',
  'ᭃ' => 'ᭃ',
  'Ḁ' => 'Ḁ',
  'ḁ' => 'ḁ',
  'Ḃ' => 'Ḃ',
  'ḃ' => 'ḃ',
  'Ḅ' => 'Ḅ',
  'ḅ' => 'ḅ',
  'Ḇ' => 'Ḇ',
  'ḇ' => 'ḇ',
  'Ḉ' => 'Ḉ',
  'ḉ' => 'ḉ',
  'Ḋ' => 'Ḋ',
  'ḋ' => 'ḋ',
  'Ḍ' => 'Ḍ',
  'ḍ' => 'ḍ',
  'Ḏ' => 'Ḏ',
  'ḏ' => 'ḏ',
  'Ḑ' => 'Ḑ',
  'ḑ' => 'ḑ',
  'Ḓ' => 'Ḓ',
  'ḓ' => 'ḓ',
  'Ḕ' => 'Ḕ',
  'ḕ' => 'ḕ',
  'Ḗ' => 'Ḗ',
  'ḗ' => 'ḗ',
  'Ḙ' => 'Ḙ',
  'ḙ' => 'ḙ',
  'Ḛ' => 'Ḛ',
  'ḛ' => 'ḛ',
  'Ḝ' => 'Ḝ',
  'ḝ' => 'ḝ',
  'Ḟ' => 'Ḟ',
  'ḟ' => 'ḟ',
  'Ḡ' => 'Ḡ',
  'ḡ' => 'ḡ',
  'Ḣ' => 'Ḣ',
  'ḣ' => 'ḣ',
  'Ḥ' => 'Ḥ',
  'ḥ' => 'ḥ',
  'Ḧ' => 'Ḧ',
  'ḧ' => 'ḧ',
  'Ḩ' => 'Ḩ',
  'ḩ' => 'ḩ',
  'Ḫ' => 'Ḫ',
  'ḫ' => 'ḫ',
  'Ḭ' => 'Ḭ',
  'ḭ' => 'ḭ',
  'Ḯ' => 'Ḯ',
  'ḯ' => 'ḯ',
  'Ḱ' => 'Ḱ',
  'ḱ' => 'ḱ',
  'Ḳ' => 'Ḳ',
  'ḳ' => 'ḳ',
  'Ḵ' => 'Ḵ',
  'ḵ' => 'ḵ',
  'Ḷ' => 'Ḷ',
  'ḷ' => 'ḷ',
  'Ḹ' => 'Ḹ',
  'ḹ' => 'ḹ',
  'Ḻ' => 'Ḻ',
  'ḻ' => 'ḻ',
  'Ḽ' => 'Ḽ',
  'ḽ' => 'ḽ',
  'Ḿ' => 'Ḿ',
  'ḿ' => 'ḿ',
  'Ṁ' => 'Ṁ',
  'ṁ' => 'ṁ',
  'Ṃ' => 'Ṃ',
  'ṃ' => 'ṃ',
  'Ṅ' => 'Ṅ',
  'ṅ' => 'ṅ',
  'Ṇ' => 'Ṇ',
  'ṇ' => 'ṇ',
  'Ṉ' => 'Ṉ',
  'ṉ' => 'ṉ',
  'Ṋ' => 'Ṋ',
  'ṋ' => 'ṋ',
  'Ṍ' => 'Ṍ',
  'ṍ' => 'ṍ',
  'Ṏ' => 'Ṏ',
  'ṏ' => 'ṏ',
  'Ṑ' => 'Ṑ',
  'ṑ' => 'ṑ',
  'Ṓ' => 'Ṓ',
  'ṓ' => 'ṓ',
  'Ṕ' => 'Ṕ',
  'ṕ' => 'ṕ',
  'Ṗ' => 'Ṗ',
  'ṗ' => 'ṗ',
  'Ṙ' => 'Ṙ',
  'ṙ' => 'ṙ',
  'Ṛ' => 'Ṛ',
  'ṛ' => 'ṛ',
  'Ṝ' => 'Ṝ',
  'ṝ' => 'ṝ',
  'Ṟ' => 'Ṟ',
  'ṟ' => 'ṟ',
  'Ṡ' => 'Ṡ',
  'ṡ' => 'ṡ',
  'Ṣ' => 'Ṣ',
  'ṣ' => 'ṣ',
  'Ṥ' => 'Ṥ',
  'ṥ' => 'ṥ',
  'Ṧ' => 'Ṧ',
  'ṧ' => 'ṧ',
  'Ṩ' => 'Ṩ',
  'ṩ' => 'ṩ',
  'Ṫ' => 'Ṫ',
  'ṫ' => 'ṫ',
  'Ṭ' => 'Ṭ',
  'ṭ' => 'ṭ',
  'Ṯ' => 'Ṯ',
  'ṯ' => 'ṯ',
  'Ṱ' => 'Ṱ',
  'ṱ' => 'ṱ',
  'Ṳ' => 'Ṳ',
  'ṳ' => 'ṳ',
  'Ṵ' => 'Ṵ',
  'ṵ' => 'ṵ',
  'Ṷ' => 'Ṷ',
  'ṷ' => 'ṷ',
  'Ṹ' => 'Ṹ',
  'ṹ' => 'ṹ',
  'Ṻ' => 'Ṻ',
  'ṻ' => 'ṻ',
  'Ṽ' => 'Ṽ',
  'ṽ' => 'ṽ',
  'Ṿ' => 'Ṿ',
  'ṿ' => 'ṿ',
  'Ẁ' => 'Ẁ',
  'ẁ' => 'ẁ',
  'Ẃ' => 'Ẃ',
  'ẃ' => 'ẃ',
  'Ẅ' => 'Ẅ',
  'ẅ' => 'ẅ',
  'Ẇ' => 'Ẇ',
  'ẇ' => 'ẇ',
  'Ẉ' => 'Ẉ',
  'ẉ' => 'ẉ',
  'Ẋ' => 'Ẋ',
  'ẋ' => 'ẋ',
  'Ẍ' => 'Ẍ',
  'ẍ' => 'ẍ',
  'Ẏ' => 'Ẏ',
  'ẏ' => 'ẏ',
  'Ẑ' => 'Ẑ',
  'ẑ' => 'ẑ',
  'Ẓ' => 'Ẓ',
  'ẓ' => 'ẓ',
  'Ẕ' => 'Ẕ',
  'ẕ' => 'ẕ',
  'ẖ' => 'ẖ',
  'ẗ' => 'ẗ',
  'ẘ' => 'ẘ',
  'ẙ' => 'ẙ',
  'ẛ' => 'ẛ',
  'Ạ' => 'Ạ',
  'ạ' => 'ạ',
  'Ả' => 'Ả',
  'ả' => 'ả',
  'Ấ' => 'Ấ',
  'ấ' => 'ấ',
  'Ầ' => 'Ầ',
  'ầ' => 'ầ',
  'Ẩ' => 'Ẩ',
  'ẩ' => 'ẩ',
  'Ẫ' => 'Ẫ',
  'ẫ' => 'ẫ',
  'Ậ' => 'Ậ',
  'ậ' => 'ậ',
  'Ắ' => 'Ắ',
  'ắ' => 'ắ',
  'Ằ' => 'Ằ',
  'ằ' => 'ằ',
  'Ẳ' => 'Ẳ',
  'ẳ' => 'ẳ',
  'Ẵ' => 'Ẵ',
  'ẵ' => 'ẵ',
  'Ặ' => 'Ặ',
  'ặ' => 'ặ',
  'Ẹ' => 'Ẹ',
  'ẹ' => 'ẹ',
  'Ẻ' => 'Ẻ',
  'ẻ' => 'ẻ',
  'Ẽ' => 'Ẽ',
  'ẽ' => 'ẽ',
  'Ế' => 'Ế',
  'ế' => 'ế',
  'Ề' => 'Ề',
  'ề' => 'ề',
  'Ể' => 'Ể',
  'ể' => 'ể',
  'Ễ' => 'Ễ',
  'ễ' => 'ễ',
  'Ệ' => 'Ệ',
  'ệ' => 'ệ',
  'Ỉ' => 'Ỉ',
  'ỉ' => 'ỉ',
  'Ị' => 'Ị',
  'ị' => 'ị',
  'Ọ' => 'Ọ',
  'ọ' => 'ọ',
  'Ỏ' => 'Ỏ',
  'ỏ' => 'ỏ',
  'Ố' => 'Ố',
  'ố' => 'ố',
  'Ồ' => 'Ồ',
  'ồ' => 'ồ',
  'Ổ' => 'Ổ',
  'ổ' => 'ổ',
  'Ỗ' => 'Ỗ',
  'ỗ' => 'ỗ',
  'Ộ' => 'Ộ',
  'ộ' => 'ộ',
  'Ớ' => 'Ớ',
  'ớ' => 'ớ',
  'Ờ' => 'Ờ',
  'ờ' => 'ờ',
  'Ở' => 'Ở',
  'ở' => 'ở',
  'Ỡ' => 'Ỡ',
  'ỡ' => 'ỡ',
  'Ợ' => 'Ợ',
  'ợ' => 'ợ',
  'Ụ' => 'Ụ',
  'ụ' => 'ụ',
  'Ủ' => 'Ủ',
  'ủ' => 'ủ',
  'Ứ' => 'Ứ',
  'ứ' => 'ứ',
  'Ừ' => 'Ừ',
  'ừ' => 'ừ',
  'Ử' => 'Ử',
  'ử' => 'ử',
  'Ữ' => 'Ữ',
  'ữ' => 'ữ',
  'Ự' => 'Ự',
  'ự' => 'ự',
  'Ỳ' => 'Ỳ',
  'ỳ' => 'ỳ',
  'Ỵ' => 'Ỵ',
  'ỵ' => 'ỵ',
  'Ỷ' => 'Ỷ',
  'ỷ' => 'ỷ',
  'Ỹ' => 'Ỹ',
  'ỹ' => 'ỹ',
  'ἀ' => 'ἀ',
  'ἁ' => 'ἁ',
  'ἂ' => 'ἂ',
  'ἃ' => 'ἃ',
  'ἄ' => 'ἄ',
  'ἅ' => 'ἅ',
  'ἆ' => 'ἆ',
  'ἇ' => 'ἇ',
  'Ἀ' => 'Ἀ',
  'Ἁ' => 'Ἁ',
  'Ἂ' => 'Ἂ',
  'Ἃ' => 'Ἃ',
  'Ἄ' => 'Ἄ',
  'Ἅ' => 'Ἅ',
  'Ἆ' => 'Ἆ',
  'Ἇ' => 'Ἇ',
  'ἐ' => 'ἐ',
  'ἑ' => 'ἑ',
  'ἒ' => 'ἒ',
  'ἓ' => 'ἓ',
  'ἔ' => 'ἔ',
  'ἕ' => 'ἕ',
  'Ἐ' => 'Ἐ',
  'Ἑ' => 'Ἑ',
  'Ἒ' => 'Ἒ',
  'Ἓ' => 'Ἓ',
  'Ἔ' => 'Ἔ',
  'Ἕ' => 'Ἕ',
  'ἠ' => 'ἠ',
  'ἡ' => 'ἡ',
  'ἢ' => 'ἢ',
  'ἣ' => 'ἣ',
  'ἤ' => 'ἤ',
  'ἥ' => 'ἥ',
  'ἦ' => 'ἦ',
  'ἧ' => 'ἧ',
  'Ἠ' => 'Ἠ',
  'Ἡ' => 'Ἡ',
  'Ἢ' => 'Ἢ',
  'Ἣ' => 'Ἣ',
  'Ἤ' => 'Ἤ',
  'Ἥ' => 'Ἥ',
  'Ἦ' => 'Ἦ',
  'Ἧ' => 'Ἧ',
  'ἰ' => 'ἰ',
  'ἱ' => 'ἱ',
  'ἲ' => 'ἲ',
  'ἳ' => 'ἳ',
  'ἴ' => 'ἴ',
  'ἵ' => 'ἵ',
  'ἶ' => 'ἶ',
  'ἷ' => 'ἷ',
  'Ἰ' => 'Ἰ',
  'Ἱ' => 'Ἱ',
  'Ἲ' => 'Ἲ',
  'Ἳ' => 'Ἳ',
  'Ἴ' => 'Ἴ',
  'Ἵ' => 'Ἵ',
  'Ἶ' => 'Ἶ',
  'Ἷ' => 'Ἷ',
  'ὀ' => 'ὀ',
  'ὁ' => 'ὁ',
  'ὂ' => 'ὂ',
  'ὃ' => 'ὃ',
  'ὄ' => 'ὄ',
  'ὅ' => 'ὅ',
  'Ὀ' => 'Ὀ',
  'Ὁ' => 'Ὁ',
  'Ὂ' => 'Ὂ',
  'Ὃ' => 'Ὃ',
  'Ὄ' => 'Ὄ',
  'Ὅ' => 'Ὅ',
  'ὐ' => 'ὐ',
  'ὑ' => 'ὑ',
  'ὒ' => 'ὒ',
  'ὓ' => 'ὓ',
  'ὔ' => 'ὔ',
  'ὕ' => 'ὕ',
  'ὖ' => 'ὖ',
  'ὗ' => 'ὗ',
  'Ὑ' => 'Ὑ',
  'Ὓ' => 'Ὓ',
  'Ὕ' => 'Ὕ',
  'Ὗ' => 'Ὗ',
  'ὠ' => 'ὠ',
  'ὡ' => 'ὡ',
  'ὢ' => 'ὢ',
  'ὣ' => 'ὣ',
  'ὤ' => 'ὤ',
  'ὥ' => 'ὥ',
  'ὦ' => 'ὦ',
  'ὧ' => 'ὧ',
  'Ὠ' => 'Ὠ',
  'Ὡ' => 'Ὡ',
  'Ὢ' => 'Ὢ',
  'Ὣ' => 'Ὣ',
  'Ὤ' => 'Ὤ',
  'Ὥ' => 'Ὥ',
  'Ὦ' => 'Ὦ',
  'Ὧ' => 'Ὧ',
  'ὰ' => 'ὰ',
  'ὲ' => 'ὲ',
  'ὴ' => 'ὴ',
  'ὶ' => 'ὶ',
  'ὸ' => 'ὸ',
  'ὺ' => 'ὺ',
  'ὼ' => 'ὼ',
  'ᾀ' => 'ᾀ',
  'ᾁ' => 'ᾁ',
  'ᾂ' => 'ᾂ',
  'ᾃ' => 'ᾃ',
  'ᾄ' => 'ᾄ',
  'ᾅ' => 'ᾅ',
  'ᾆ' => 'ᾆ',
  'ᾇ' => 'ᾇ',
  'ᾈ' => 'ᾈ',
  'ᾉ' => 'ᾉ',
  'ᾊ' => 'ᾊ',
  'ᾋ' => 'ᾋ',
  'ᾌ' => 'ᾌ',
  'ᾍ' => 'ᾍ',
  'ᾎ' => 'ᾎ',
  'ᾏ' => 'ᾏ',
  'ᾐ' => 'ᾐ',
  'ᾑ' => 'ᾑ',
  'ᾒ' => 'ᾒ',
  'ᾓ' => 'ᾓ',
  'ᾔ' => 'ᾔ',
  'ᾕ' => 'ᾕ',
  'ᾖ' => 'ᾖ',
  'ᾗ' => 'ᾗ',
  'ᾘ' => 'ᾘ',
  'ᾙ' => 'ᾙ',
  'ᾚ' => 'ᾚ',
  'ᾛ' => 'ᾛ',
  'ᾜ' => 'ᾜ',
  'ᾝ' => 'ᾝ',
  'ᾞ' => 'ᾞ',
  'ᾟ' => 'ᾟ',
  'ᾠ' => 'ᾠ',
  'ᾡ' => 'ᾡ',
  'ᾢ' => 'ᾢ',
  'ᾣ' => 'ᾣ',
  'ᾤ' => 'ᾤ',
  'ᾥ' => 'ᾥ',
  'ᾦ' => 'ᾦ',
  'ᾧ' => 'ᾧ',
  'ᾨ' => 'ᾨ',
  'ᾩ' => 'ᾩ',
  'ᾪ' => 'ᾪ',
  'ᾫ' => 'ᾫ',
  'ᾬ' => 'ᾬ',
  'ᾭ' => 'ᾭ',
  'ᾮ' => 'ᾮ',
  'ᾯ' => 'ᾯ',
  'ᾰ' => 'ᾰ',
  'ᾱ' => 'ᾱ',
  'ᾲ' => 'ᾲ',
  'ᾳ' => 'ᾳ',
  'ᾴ' => 'ᾴ',
  'ᾶ' => 'ᾶ',
  'ᾷ' => 'ᾷ',
  'Ᾰ' => 'Ᾰ',
  'Ᾱ' => 'Ᾱ',
  'Ὰ' => 'Ὰ',
  'ᾼ' => 'ᾼ',
  '῁' => '῁',
  'ῂ' => 'ῂ',
  'ῃ' => 'ῃ',
  'ῄ' => 'ῄ',
  'ῆ' => 'ῆ',
  'ῇ' => 'ῇ',
  'Ὲ' => 'Ὲ',
  'Ὴ' => 'Ὴ',
  'ῌ' => 'ῌ',
  '῍' => '῍',
  '῎' => '῎',
  '῏' => '῏',
  'ῐ' => 'ῐ',
  'ῑ' => 'ῑ',
  'ῒ' => 'ῒ',
  'ῖ' => 'ῖ',
  'ῗ' => 'ῗ',
  'Ῐ' => 'Ῐ',
  'Ῑ' => 'Ῑ',
  'Ὶ' => 'Ὶ',
  '῝' => '῝',
  '῞' => '῞',
  '῟' => '῟',
  'ῠ' => 'ῠ',
  'ῡ' => 'ῡ',
  'ῢ' => 'ῢ',
  'ῤ' => 'ῤ',
  'ῥ' => 'ῥ',
  'ῦ' => 'ῦ',
  'ῧ' => 'ῧ',
  'Ῠ' => 'Ῠ',
  'Ῡ' => 'Ῡ',
  'Ὺ' => 'Ὺ',
  'Ῥ' => 'Ῥ',
  '῭' => '῭',
  'ῲ' => 'ῲ',
  'ῳ' => 'ῳ',
  'ῴ' => 'ῴ',
  'ῶ' => 'ῶ',
  'ῷ' => 'ῷ',
  'Ὸ' => 'Ὸ',
  'Ὼ' => 'Ὼ',
  'ῼ' => 'ῼ',
  '↚' => '↚',
  '↛' => '↛',
  '↮' => '↮',
  '⇍' => '⇍',
  '⇎' => '⇎',
  '⇏' => '⇏',
  '∄' => '∄',
  '∉' => '∉',
  '∌' => '∌',
  '∤' => '∤',
  '∦' => '∦',
  '≁' => '≁',
  '≄' => '≄',
  '≇' => '≇',
  '≉' => '≉',
  '≠' => '≠',
  '≢' => '≢',
  '≭' => '≭',
  '≮' => '≮',
  '≯' => '≯',
  '≰' => '≰',
  '≱' => '≱',
  '≴' => '≴',
  '≵' => '≵',
  '≸' => '≸',
  '≹' => '≹',
  '⊀' => '⊀',
  '⊁' => '⊁',
  '⊄' => '⊄',
  '⊅' => '⊅',
  '⊈' => '⊈',
  '⊉' => '⊉',
  '⊬' => '⊬',
  '⊭' => '⊭',
  '⊮' => '⊮',
  '⊯' => '⊯',
  '⋠' => '⋠',
  '⋡' => '⋡',
  '⋢' => '⋢',
  '⋣' => '⋣',
  '⋪' => '⋪',
  '⋫' => '⋫',
  '⋬' => '⋬',
  '⋭' => '⋭',
  'が' => 'が',
  'ぎ' => 'ぎ',
  'ぐ' => 'ぐ',
  'げ' => 'げ',
  'ご' => 'ご',
  'ざ' => 'ざ',
  'じ' => 'じ',
  'ず' => 'ず',
  'ぜ' => 'ぜ',
  'ぞ' => 'ぞ',
  'だ' => 'だ',
  'ぢ' => 'ぢ',
  'づ' => 'づ',
  'で' => 'で',
  'ど' => 'ど',
  'ば' => 'ば',
  'ぱ' => 'ぱ',
  'び' => 'び',
  'ぴ' => 'ぴ',
  'ぶ' => 'ぶ',
  'ぷ' => 'ぷ',
  'べ' => 'べ',
  'ぺ' => 'ぺ',
  'ぼ' => 'ぼ',
  'ぽ' => 'ぽ',
  'ゔ' => 'ゔ',
  'ゞ' => 'ゞ',
  'ガ' => 'ガ',
  'ギ' => 'ギ',
  'グ' => 'グ',
  'ゲ' => 'ゲ',
  'ゴ' => 'ゴ',
  'ザ' => 'ザ',
  'ジ' => 'ジ',
  'ズ' => 'ズ',
  'ゼ' => 'ゼ',
  'ゾ' => 'ゾ',
  'ダ' => 'ダ',
  'ヂ' => 'ヂ',
  'ヅ' => 'ヅ',
  'デ' => 'デ',
  'ド' => 'ド',
  'バ' => 'バ',
  'パ' => 'パ',
  'ビ' => 'ビ',
  'ピ' => 'ピ',
  'ブ' => 'ブ',
  'プ' => 'プ',
  'ベ' => 'ベ',
  'ペ' => 'ペ',
  'ボ' => 'ボ',
  'ポ' => 'ポ',
  'ヴ' => 'ヴ',
  'ヷ' => 'ヷ',
  'ヸ' => 'ヸ',
  'ヹ' => 'ヹ',
  'ヺ' => 'ヺ',
  'ヾ' => 'ヾ',
  '𑂚' => '𑂚',
  '𑂜' => '𑂜',
  '𑂫' => '𑂫',
  '𑄮' => '𑄮',
  '𑄯' => '𑄯',
  '𑍋' => '𑍋',
  '𑍌' => '𑍌',
  '𑒻' => '𑒻',
  '𑒼' => '𑒼',
  '𑒾' => '𑒾',
  '𑖺' => '𑖺',
  '𑖻' => '𑖻',
  '𑤸' => '𑤸',
);
<?php

class Normalizer extends Symfony\Polyfill\Intl\Normalizer\Normalizer
{
    /**
     * @deprecated since ICU 56 and removed in PHP 8
     */
    public const NONE = 2;
    public const FORM_D = 4;
    public const FORM_KD = 8;
    public const FORM_C = 16;
    public const FORM_KC = 32;
    public const NFD = 4;
    public const NFKD = 8;
    public const NFC = 16;
    public const NFKC = 32;
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Polyfill\Intl\Normalizer;

/**
 * Normalizer is a PHP fallback implementation of the Normalizer class provided by the intl extension.
 *
 * It has been validated with Unicode 6.3 Normalization Conformance Test.
 * See http://www.unicode.org/reports/tr15/ for detailed info about Unicode normalizations.
 *
 * @author Nicolas Grekas <p@tchwork.com>
 *
 * @internal
 */
class Normalizer
{
    public const FORM_D = \Normalizer::FORM_D;
    public const FORM_KD = \Normalizer::FORM_KD;
    public const FORM_C = \Normalizer::FORM_C;
    public const FORM_KC = \Normalizer::FORM_KC;
    public const NFD = \Normalizer::NFD;
    public const NFKD = \Normalizer::NFKD;
    public const NFC = \Normalizer::NFC;
    public const NFKC = \Normalizer::NFKC;

    private static $C;
    private static $D;
    private static $KD;
    private static $cC;
    private static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4];
    private static $ASCII = "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F";

    public static function isNormalized(string $s, int $form = self::FORM_C)
    {
        if (!\in_array($form, [self::NFD, self::NFKD, self::NFC, self::NFKC])) {
            return false;
        }
        if (!isset($s[strspn($s, self::$ASCII)])) {
            return true;
        }
        if (self::NFC == $form && preg_match('//u', $s) && !preg_match('/[^\x00-\x{2FF}]/u', $s)) {
            return true;
        }

        return self::normalize($s, $form) === $s;
    }

    public static function normalize(string $s, int $form = self::FORM_C)
    {
        if (!preg_match('//u', $s)) {
            return false;
        }

        switch ($form) {
            case self::NFC: $C = true; $K = false; break;
            case self::NFD: $C = false; $K = false; break;
            case self::NFKC: $C = true; $K = true; break;
            case self::NFKD: $C = false; $K = true; break;
            default:
                if (\defined('Normalizer::NONE') && \Normalizer::NONE == $form) {
                    return $s;
                }

                if (80000 > \PHP_VERSION_ID) {
                    return false;
                }

                throw new \ValueError('normalizer_normalize(): Argument #2 ($form) must be a a valid normalization form');
        }

        if ('' === $s) {
            return '';
        }

        if ($K && null === self::$KD) {
            self::$KD = self::getData('compatibilityDecomposition');
        }

        if (null === self::$D) {
            self::$D = self::getData('canonicalDecomposition');
            self::$cC = self::getData('combiningClass');
        }

        if (null !== $mbEncoding = (2 /* MB_OVERLOAD_STRING */ & (int) \ini_get('mbstring.func_overload')) ? mb_internal_encoding() : null) {
            mb_internal_encoding('8bit');
        }

        $r = self::decompose($s, $K);

        if ($C) {
            if (null === self::$C) {
                self::$C = self::getData('canonicalComposition');
            }

            $r = self::recompose($r);
        }
        if (null !== $mbEncoding) {
            mb_internal_encoding($mbEncoding);
        }

        return $r;
    }

    private static function recompose($s)
    {
        $ASCII = self::$ASCII;
        $compMap = self::$C;
        $combClass = self::$cC;
        $ulenMask = self::$ulenMask;

        $result = $tail = '';

        $i = $s[0] < "\x80" ? 1 : $ulenMask[$s[0] & "\xF0"];
        $len = \strlen($s);

        $lastUchr = substr($s, 0, $i);
        $lastUcls = isset($combClass[$lastUchr]) ? 256 : 0;

        while ($i < $len) {
            if ($s[$i] < "\x80") {
                // ASCII chars

                if ($tail) {
                    $lastUchr .= $tail;
                    $tail = '';
                }

                if ($j = strspn($s, $ASCII, $i + 1)) {
                    $lastUchr .= substr($s, $i, $j);
                    $i += $j;
                }

                $result .= $lastUchr;
                $lastUchr = $s[$i];
                $lastUcls = 0;
                ++$i;
                continue;
            }

            $ulen = $ulenMask[$s[$i] & "\xF0"];
            $uchr = substr($s, $i, $ulen);

            if ($lastUchr < "\xE1\x84\x80" || "\xE1\x84\x92" < $lastUchr
                || $uchr < "\xE1\x85\xA1" || "\xE1\x85\xB5" < $uchr
                || $lastUcls) {
                // Table lookup and combining chars composition

                $ucls = $combClass[$uchr] ?? 0;

                if (isset($compMap[$lastUchr.$uchr]) && (!$lastUcls || $lastUcls < $ucls)) {
                    $lastUchr = $compMap[$lastUchr.$uchr];
                } elseif ($lastUcls = $ucls) {
                    $tail .= $uchr;
                } else {
                    if ($tail) {
                        $lastUchr .= $tail;
                        $tail = '';
                    }

                    $result .= $lastUchr;
                    $lastUchr = $uchr;
                }
            } else {
                // Hangul chars

                $L = \ord($lastUchr[2]) - 0x80;
                $V = \ord($uchr[2]) - 0xA1;
                $T = 0;

                $uchr = substr($s, $i + $ulen, 3);

                if ("\xE1\x86\xA7" <= $uchr && $uchr <= "\xE1\x87\x82") {
                    $T = \ord($uchr[2]) - 0xA7;
                    0 > $T && $T += 0x40;
                    $ulen += 3;
                }

                $L = 0xAC00 + ($L * 21 + $V) * 28 + $T;
                $lastUchr = \chr(0xE0 | $L >> 12).\chr(0x80 | $L >> 6 & 0x3F).\chr(0x80 | $L & 0x3F);
            }

            $i += $ulen;
        }

        return $result.$lastUchr.$tail;
    }

    private static function decompose($s, $c)
    {
        $result = '';

        $ASCII = self::$ASCII;
        $decompMap = self::$D;
        $combClass = self::$cC;
        $ulenMask = self::$ulenMask;
        if ($c) {
            $compatMap = self::$KD;
        }

        $c = [];
        $i = 0;
        $len = \strlen($s);

        while ($i < $len) {
            if ($s[$i] < "\x80") {
                // ASCII chars

                if ($c) {
                    ksort($c);
                    $result .= implode('', $c);
                    $c = [];
                }

                $j = 1 + strspn($s, $ASCII, $i + 1);
                $result .= substr($s, $i, $j);
                $i += $j;
                continue;
            }

            $ulen = $ulenMask[$s[$i] & "\xF0"];
            $uchr = substr($s, $i, $ulen);
            $i += $ulen;

            if ($uchr < "\xEA\xB0\x80" || "\xED\x9E\xA3" < $uchr) {
                // Table lookup

                if ($uchr !== $j = $compatMap[$uchr] ?? ($decompMap[$uchr] ?? $uchr)) {
                    $uchr = $j;

                    $j = \strlen($uchr);
                    $ulen = $uchr[0] < "\x80" ? 1 : $ulenMask[$uchr[0] & "\xF0"];

                    if ($ulen != $j) {
                        // Put trailing chars in $s

                        $j -= $ulen;
                        $i -= $j;

                        if (0 > $i) {
                            $s = str_repeat(' ', -$i).$s;
                            $len -= $i;
                            $i = 0;
                        }

                        while ($j--) {
                            $s[$i + $j] = $uchr[$ulen + $j];
                        }

                        $uchr = substr($uchr, 0, $ulen);
                    }
                }
                if (isset($combClass[$uchr])) {
                    // Combining chars, for sorting

                    if (!isset($c[$combClass[$uchr]])) {
                        $c[$combClass[$uchr]] = '';
                    }
                    $c[$combClass[$uchr]] .= $uchr;
                    continue;
                }
            } else {
                // Hangul chars

                $uchr = unpack('C*', $uchr);
                $j = (($uchr[1] - 224) << 12) + (($uchr[2] - 128) << 6) + $uchr[3] - 0xAC80;

                $uchr = "\xE1\x84".\chr(0x80 + (int) ($j / 588))
                       ."\xE1\x85".\chr(0xA1 + (int) (($j % 588) / 28));

                if ($j %= 28) {
                    $uchr .= $j < 25
                        ? ("\xE1\x86".\chr(0xA7 + $j))
                        : ("\xE1\x87".\chr(0x67 + $j));
                }
            }
            if ($c) {
                ksort($c);
                $result .= implode('', $c);
                $c = [];
            }

            $result .= $uchr;
        }

        if ($c) {
            ksort($c);
            $result .= implode('', $c);
        }

        return $result;
    }

    private static function getData($file)
    {
        if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) {
            return require $file;
        }

        return false;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Finder;

use _PHPStan_dcc7b7cff\Symfony\Component\Finder\Comparator\DateComparator;
use _PHPStan_dcc7b7cff\Symfony\Component\Finder\Comparator\NumberComparator;
use _PHPStan_dcc7b7cff\Symfony\Component\Finder\Exception\DirectoryNotFoundException;
use _PHPStan_dcc7b7cff\Symfony\Component\Finder\Iterator\CustomFilterIterator;
use _PHPStan_dcc7b7cff\Symfony\Component\Finder\Iterator\DateRangeFilterIterator;
use _PHPStan_dcc7b7cff\Symfony\Component\Finder\Iterator\DepthRangeFilterIterator;
use _PHPStan_dcc7b7cff\Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator;
use _PHPStan_dcc7b7cff\Symfony\Component\Finder\Iterator\FilecontentFilterIterator;
use _PHPStan_dcc7b7cff\Symfony\Component\Finder\Iterator\FilenameFilterIterator;
use _PHPStan_dcc7b7cff\Symfony\Component\Finder\Iterator\LazyIterator;
use _PHPStan_dcc7b7cff\Symfony\Component\Finder\Iterator\SizeRangeFilterIterator;
use _PHPStan_dcc7b7cff\Symfony\Component\Finder\Iterator\SortableIterator;
/**
 * Finder allows to build rules to find files and directories.
 *
 * It is a thin wrapper around several specialized iterator classes.
 *
 * All rules may be invoked several times.
 *
 * All methods return the current Finder object to allow chaining:
 *
 *     $finder = Finder::create()->files()->name('*.php')->in(__DIR__);
 *
 * @author Fabien Potencier <fabien@symfony.com>
 *
 * @implements \IteratorAggregate<string, SplFileInfo>
 */
class Finder implements \IteratorAggregate, \Countable
{
    public const IGNORE_VCS_FILES = 1;
    public const IGNORE_DOT_FILES = 2;
    public const IGNORE_VCS_IGNORED_FILES = 4;
    private $mode = 0;
    private $names = [];
    private $notNames = [];
    private $exclude = [];
    private $filters = [];
    private $depths = [];
    private $sizes = [];
    private $followLinks = \false;
    private $reverseSorting = \false;
    private $sort = \false;
    private $ignore = 0;
    private $dirs = [];
    private $dates = [];
    private $iterators = [];
    private $contains = [];
    private $notContains = [];
    private $paths = [];
    private $notPaths = [];
    private $ignoreUnreadableDirs = \false;
    private static $vcsPatterns = ['.svn', '_svn', 'CVS', '_darcs', '.arch-params', '.monotone', '.bzr', '.git', '.hg'];
    public function __construct()
    {
        $this->ignore = static::IGNORE_VCS_FILES | static::IGNORE_DOT_FILES;
    }
    /**
     * Creates a new Finder.
     *
     * @return static
     */
    public static function create()
    {
        return new static();
    }
    /**
     * Restricts the matching to directories only.
     *
     * @return $this
     */
    public function directories()
    {
        $this->mode = Iterator\FileTypeFilterIterator::ONLY_DIRECTORIES;
        return $this;
    }
    /**
     * Restricts the matching to files only.
     *
     * @return $this
     */
    public function files()
    {
        $this->mode = Iterator\FileTypeFilterIterator::ONLY_FILES;
        return $this;
    }
    /**
     * Adds tests for the directory depth.
     *
     * Usage:
     *
     *     $finder->depth('> 1') // the Finder will start matching at level 1.
     *     $finder->depth('< 3') // the Finder will descend at most 3 levels of directories below the starting point.
     *     $finder->depth(['>= 1', '< 3'])
     *
     * @param string|int|string[]|int[] $levels The depth level expression or an array of depth levels
     *
     * @return $this
     *
     * @see DepthRangeFilterIterator
     * @see NumberComparator
     */
    public function depth($levels)
    {
        foreach ((array) $levels as $level) {
            $this->depths[] = new Comparator\NumberComparator($level);
        }
        return $this;
    }
    /**
     * Adds tests for file dates (last modified).
     *
     * The date must be something that strtotime() is able to parse:
     *
     *     $finder->date('since yesterday');
     *     $finder->date('until 2 days ago');
     *     $finder->date('> now - 2 hours');
     *     $finder->date('>= 2005-10-15');
     *     $finder->date(['>= 2005-10-15', '<= 2006-05-27']);
     *
     * @param string|string[] $dates A date range string or an array of date ranges
     *
     * @return $this
     *
     * @see strtotime
     * @see DateRangeFilterIterator
     * @see DateComparator
     */
    public function date($dates)
    {
        foreach ((array) $dates as $date) {
            $this->dates[] = new Comparator\DateComparator($date);
        }
        return $this;
    }
    /**
     * Adds rules that files must match.
     *
     * You can use patterns (delimited with / sign), globs or simple strings.
     *
     *     $finder->name('*.php')
     *     $finder->name('/\.php$/') // same as above
     *     $finder->name('test.php')
     *     $finder->name(['test.py', 'test.php'])
     *
     * @param string|string[] $patterns A pattern (a regexp, a glob, or a string) or an array of patterns
     *
     * @return $this
     *
     * @see FilenameFilterIterator
     */
    public function name($patterns)
    {
        $this->names = \array_merge($this->names, (array) $patterns);
        return $this;
    }
    /**
     * Adds rules that files must not match.
     *
     * @param string|string[] $patterns A pattern (a regexp, a glob, or a string) or an array of patterns
     *
     * @return $this
     *
     * @see FilenameFilterIterator
     */
    public function notName($patterns)
    {
        $this->notNames = \array_merge($this->notNames, (array) $patterns);
        return $this;
    }
    /**
     * Adds tests that file contents must match.
     *
     * Strings or PCRE patterns can be used:
     *
     *     $finder->contains('Lorem ipsum')
     *     $finder->contains('/Lorem ipsum/i')
     *     $finder->contains(['dolor', '/ipsum/i'])
     *
     * @param string|string[] $patterns A pattern (string or regexp) or an array of patterns
     *
     * @return $this
     *
     * @see FilecontentFilterIterator
     */
    public function contains($patterns)
    {
        $this->contains = \array_merge($this->contains, (array) $patterns);
        return $this;
    }
    /**
     * Adds tests that file contents must not match.
     *
     * Strings or PCRE patterns can be used:
     *
     *     $finder->notContains('Lorem ipsum')
     *     $finder->notContains('/Lorem ipsum/i')
     *     $finder->notContains(['lorem', '/dolor/i'])
     *
     * @param string|string[] $patterns A pattern (string or regexp) or an array of patterns
     *
     * @return $this
     *
     * @see FilecontentFilterIterator
     */
    public function notContains($patterns)
    {
        $this->notContains = \array_merge($this->notContains, (array) $patterns);
        return $this;
    }
    /**
     * Adds rules that filenames must match.
     *
     * You can use patterns (delimited with / sign) or simple strings.
     *
     *     $finder->path('some/special/dir')
     *     $finder->path('/some\/special\/dir/') // same as above
     *     $finder->path(['some dir', 'another/dir'])
     *
     * Use only / as dirname separator.
     *
     * @param string|string[] $patterns A pattern (a regexp or a string) or an array of patterns
     *
     * @return $this
     *
     * @see FilenameFilterIterator
     */
    public function path($patterns)
    {
        $this->paths = \array_merge($this->paths, (array) $patterns);
        return $this;
    }
    /**
     * Adds rules that filenames must not match.
     *
     * You can use patterns (delimited with / sign) or simple strings.
     *
     *     $finder->notPath('some/special/dir')
     *     $finder->notPath('/some\/special\/dir/') // same as above
     *     $finder->notPath(['some/file.txt', 'another/file.log'])
     *
     * Use only / as dirname separator.
     *
     * @param string|string[] $patterns A pattern (a regexp or a string) or an array of patterns
     *
     * @return $this
     *
     * @see FilenameFilterIterator
     */
    public function notPath($patterns)
    {
        $this->notPaths = \array_merge($this->notPaths, (array) $patterns);
        return $this;
    }
    /**
     * Adds tests for file sizes.
     *
     *     $finder->size('> 10K');
     *     $finder->size('<= 1Ki');
     *     $finder->size(4);
     *     $finder->size(['> 10K', '< 20K'])
     *
     * @param string|int|string[]|int[] $sizes A size range string or an integer or an array of size ranges
     *
     * @return $this
     *
     * @see SizeRangeFilterIterator
     * @see NumberComparator
     */
    public function size($sizes)
    {
        foreach ((array) $sizes as $size) {
            $this->sizes[] = new Comparator\NumberComparator($size);
        }
        return $this;
    }
    /**
     * Excludes directories.
     *
     * Directories passed as argument must be relative to the ones defined with the `in()` method. For example:
     *
     *     $finder->in(__DIR__)->exclude('ruby');
     *
     * @param string|array $dirs A directory path or an array of directories
     *
     * @return $this
     *
     * @see ExcludeDirectoryFilterIterator
     */
    public function exclude($dirs)
    {
        $this->exclude = \array_merge($this->exclude, (array) $dirs);
        return $this;
    }
    /**
     * Excludes "hidden" directories and files (starting with a dot).
     *
     * This option is enabled by default.
     *
     * @return $this
     *
     * @see ExcludeDirectoryFilterIterator
     */
    public function ignoreDotFiles(bool $ignoreDotFiles)
    {
        if ($ignoreDotFiles) {
            $this->ignore |= static::IGNORE_DOT_FILES;
        } else {
            $this->ignore &= ~static::IGNORE_DOT_FILES;
        }
        return $this;
    }
    /**
     * Forces the finder to ignore version control directories.
     *
     * This option is enabled by default.
     *
     * @return $this
     *
     * @see ExcludeDirectoryFilterIterator
     */
    public function ignoreVCS(bool $ignoreVCS)
    {
        if ($ignoreVCS) {
            $this->ignore |= static::IGNORE_VCS_FILES;
        } else {
            $this->ignore &= ~static::IGNORE_VCS_FILES;
        }
        return $this;
    }
    /**
     * Forces Finder to obey .gitignore and ignore files based on rules listed there.
     *
     * This option is disabled by default.
     *
     * @return $this
     */
    public function ignoreVCSIgnored(bool $ignoreVCSIgnored)
    {
        if ($ignoreVCSIgnored) {
            $this->ignore |= static::IGNORE_VCS_IGNORED_FILES;
        } else {
            $this->ignore &= ~static::IGNORE_VCS_IGNORED_FILES;
        }
        return $this;
    }
    /**
     * Adds VCS patterns.
     *
     * @see ignoreVCS()
     *
     * @param string|string[] $pattern VCS patterns to ignore
     */
    public static function addVCSPattern($pattern)
    {
        foreach ((array) $pattern as $p) {
            self::$vcsPatterns[] = $p;
        }
        self::$vcsPatterns = \array_unique(self::$vcsPatterns);
    }
    /**
     * Sorts files and directories by an anonymous function.
     *
     * The anonymous function receives two \SplFileInfo instances to compare.
     *
     * This can be slow as all the matching files and directories must be retrieved for comparison.
     *
     * @return $this
     *
     * @see SortableIterator
     */
    public function sort(\Closure $closure)
    {
        $this->sort = $closure;
        return $this;
    }
    /**
     * Sorts files and directories by name.
     *
     * This can be slow as all the matching files and directories must be retrieved for comparison.
     *
     * @return $this
     *
     * @see SortableIterator
     */
    public function sortByName(bool $useNaturalSort = \false)
    {
        $this->sort = $useNaturalSort ? Iterator\SortableIterator::SORT_BY_NAME_NATURAL : Iterator\SortableIterator::SORT_BY_NAME;
        return $this;
    }
    /**
     * Sorts files and directories by type (directories before files), then by name.
     *
     * This can be slow as all the matching files and directories must be retrieved for comparison.
     *
     * @return $this
     *
     * @see SortableIterator
     */
    public function sortByType()
    {
        $this->sort = Iterator\SortableIterator::SORT_BY_TYPE;
        return $this;
    }
    /**
     * Sorts files and directories by the last accessed time.
     *
     * This is the time that the file was last accessed, read or written to.
     *
     * This can be slow as all the matching files and directories must be retrieved for comparison.
     *
     * @return $this
     *
     * @see SortableIterator
     */
    public function sortByAccessedTime()
    {
        $this->sort = Iterator\SortableIterator::SORT_BY_ACCESSED_TIME;
        return $this;
    }
    /**
     * Reverses the sorting.
     *
     * @return $this
     */
    public function reverseSorting()
    {
        $this->reverseSorting = \true;
        return $this;
    }
    /**
     * Sorts files and directories by the last inode changed time.
     *
     * This is the time that the inode information was last modified (permissions, owner, group or other metadata).
     *
     * On Windows, since inode is not available, changed time is actually the file creation time.
     *
     * This can be slow as all the matching files and directories must be retrieved for comparison.
     *
     * @return $this
     *
     * @see SortableIterator
     */
    public function sortByChangedTime()
    {
        $this->sort = Iterator\SortableIterator::SORT_BY_CHANGED_TIME;
        return $this;
    }
    /**
     * Sorts files and directories by the last modified time.
     *
     * This is the last time the actual contents of the file were last modified.
     *
     * This can be slow as all the matching files and directories must be retrieved for comparison.
     *
     * @return $this
     *
     * @see SortableIterator
     */
    public function sortByModifiedTime()
    {
        $this->sort = Iterator\SortableIterator::SORT_BY_MODIFIED_TIME;
        return $this;
    }
    /**
     * Filters the iterator with an anonymous function.
     *
     * The anonymous function receives a \SplFileInfo and must return false
     * to remove files.
     *
     * @return $this
     *
     * @see CustomFilterIterator
     */
    public function filter(\Closure $closure)
    {
        $this->filters[] = $closure;
        return $this;
    }
    /**
     * Forces the following of symlinks.
     *
     * @return $this
     */
    public function followLinks()
    {
        $this->followLinks = \true;
        return $this;
    }
    /**
     * Tells finder to ignore unreadable directories.
     *
     * By default, scanning unreadable directories content throws an AccessDeniedException.
     *
     * @return $this
     */
    public function ignoreUnreadableDirs(bool $ignore = \true)
    {
        $this->ignoreUnreadableDirs = $ignore;
        return $this;
    }
    /**
     * Searches files and directories which match defined rules.
     *
     * @param string|string[] $dirs A directory path or an array of directories
     *
     * @return $this
     *
     * @throws DirectoryNotFoundException if one of the directories does not exist
     */
    public function in($dirs)
    {
        $resolvedDirs = [];
        foreach ((array) $dirs as $dir) {
            if (\is_dir($dir)) {
                $resolvedDirs[] = [$this->normalizeDir($dir)];
            } elseif ($glob = \glob($dir, (\defined('GLOB_BRACE') ? \GLOB_BRACE : 0) | \GLOB_ONLYDIR | \GLOB_NOSORT)) {
                \sort($glob);
                $resolvedDirs[] = \array_map([$this, 'normalizeDir'], $glob);
            } else {
                throw new DirectoryNotFoundException(\sprintf('The "%s" directory does not exist.', $dir));
            }
        }
        $this->dirs = \array_merge($this->dirs, ...$resolvedDirs);
        return $this;
    }
    /**
     * Returns an Iterator for the current Finder configuration.
     *
     * This method implements the IteratorAggregate interface.
     *
     * @return \Iterator<string, SplFileInfo>
     *
     * @throws \LogicException if the in() method has not been called
     */
    #[\ReturnTypeWillChange]
    public function getIterator()
    {
        if (0 === \count($this->dirs) && 0 === \count($this->iterators)) {
            throw new \LogicException('You must call one of in() or append() methods before iterating over a Finder.');
        }
        if (1 === \count($this->dirs) && 0 === \count($this->iterators)) {
            $iterator = $this->searchInDirectory($this->dirs[0]);
            if ($this->sort || $this->reverseSorting) {
                $iterator = (new Iterator\SortableIterator($iterator, $this->sort, $this->reverseSorting))->getIterator();
            }
            return $iterator;
        }
        $iterator = new \AppendIterator();
        foreach ($this->dirs as $dir) {
            $iterator->append(new \IteratorIterator(new LazyIterator(function () use($dir) {
                return $this->searchInDirectory($dir);
            })));
        }
        foreach ($this->iterators as $it) {
            $iterator->append($it);
        }
        if ($this->sort || $this->reverseSorting) {
            $iterator = (new Iterator\SortableIterator($iterator, $this->sort, $this->reverseSorting))->getIterator();
        }
        return $iterator;
    }
    /**
     * Appends an existing set of files/directories to the finder.
     *
     * The set can be another Finder, an Iterator, an IteratorAggregate, or even a plain array.
     *
     * @return $this
     *
     * @throws \InvalidArgumentException when the given argument is not iterable
     */
    public function append(iterable $iterator)
    {
        if ($iterator instanceof \IteratorAggregate) {
            $this->iterators[] = $iterator->getIterator();
        } elseif ($iterator instanceof \Iterator) {
            $this->iterators[] = $iterator;
        } elseif (\is_iterable($iterator)) {
            $it = new \ArrayIterator();
            foreach ($iterator as $file) {
                $file = $file instanceof \SplFileInfo ? $file : new \SplFileInfo($file);
                $it[$file->getPathname()] = $file;
            }
            $this->iterators[] = $it;
        } else {
            throw new \InvalidArgumentException('Finder::append() method wrong argument type.');
        }
        return $this;
    }
    /**
     * Check if any results were found.
     *
     * @return bool
     */
    public function hasResults()
    {
        foreach ($this->getIterator() as $_) {
            return \true;
        }
        return \false;
    }
    /**
     * Counts all the results collected by the iterators.
     *
     * @return int
     */
    #[\ReturnTypeWillChange]
    public function count()
    {
        return \iterator_count($this->getIterator());
    }
    private function searchInDirectory(string $dir) : \Iterator
    {
        $exclude = $this->exclude;
        $notPaths = $this->notPaths;
        if (static::IGNORE_VCS_FILES === (static::IGNORE_VCS_FILES & $this->ignore)) {
            $exclude = \array_merge($exclude, self::$vcsPatterns);
        }
        if (static::IGNORE_DOT_FILES === (static::IGNORE_DOT_FILES & $this->ignore)) {
            $notPaths[] = '#(^|/)\\..+(/|$)#';
        }
        $minDepth = 0;
        $maxDepth = \PHP_INT_MAX;
        foreach ($this->depths as $comparator) {
            switch ($comparator->getOperator()) {
                case '>':
                    $minDepth = $comparator->getTarget() + 1;
                    break;
                case '>=':
                    $minDepth = $comparator->getTarget();
                    break;
                case '<':
                    $maxDepth = $comparator->getTarget() - 1;
                    break;
                case '<=':
                    $maxDepth = $comparator->getTarget();
                    break;
                default:
                    $minDepth = $maxDepth = $comparator->getTarget();
            }
        }
        $flags = \RecursiveDirectoryIterator::SKIP_DOTS;
        if ($this->followLinks) {
            $flags |= \RecursiveDirectoryIterator::FOLLOW_SYMLINKS;
        }
        $iterator = new Iterator\RecursiveDirectoryIterator($dir, $flags, $this->ignoreUnreadableDirs);
        if ($exclude) {
            $iterator = new Iterator\ExcludeDirectoryFilterIterator($iterator, $exclude);
        }
        $iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::SELF_FIRST);
        if ($minDepth > 0 || $maxDepth < \PHP_INT_MAX) {
            $iterator = new Iterator\DepthRangeFilterIterator($iterator, $minDepth, $maxDepth);
        }
        if ($this->mode) {
            $iterator = new Iterator\FileTypeFilterIterator($iterator, $this->mode);
        }
        if ($this->names || $this->notNames) {
            $iterator = new Iterator\FilenameFilterIterator($iterator, $this->names, $this->notNames);
        }
        if ($this->contains || $this->notContains) {
            $iterator = new Iterator\FilecontentFilterIterator($iterator, $this->contains, $this->notContains);
        }
        if ($this->sizes) {
            $iterator = new Iterator\SizeRangeFilterIterator($iterator, $this->sizes);
        }
        if ($this->dates) {
            $iterator = new Iterator\DateRangeFilterIterator($iterator, $this->dates);
        }
        if ($this->filters) {
            $iterator = new Iterator\CustomFilterIterator($iterator, $this->filters);
        }
        if ($this->paths || $notPaths) {
            $iterator = new Iterator\PathFilterIterator($iterator, $this->paths, $notPaths);
        }
        if (static::IGNORE_VCS_IGNORED_FILES === (static::IGNORE_VCS_IGNORED_FILES & $this->ignore)) {
            $iterator = new Iterator\VcsIgnoredFilterIterator($iterator, $dir);
        }
        return $iterator;
    }
    /**
     * Normalizes given directory names by removing trailing slashes.
     *
     * Excluding: (s)ftp:// or ssh2.(s)ftp:// wrapper
     */
    private function normalizeDir(string $dir) : string
    {
        if ('/' === $dir) {
            return $dir;
        }
        $dir = \rtrim($dir, '/' . \DIRECTORY_SEPARATOR);
        if (\preg_match('#^(ssh2\\.)?s?ftp://#', $dir)) {
            $dir .= '/';
        }
        return $dir;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Finder;

/**
 * Extends \SplFileInfo to support relative paths.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class SplFileInfo extends \SplFileInfo
{
    private $relativePath;
    private $relativePathname;
    /**
     * @param string $file             The file name
     * @param string $relativePath     The relative path
     * @param string $relativePathname The relative path name
     */
    public function __construct(string $file, string $relativePath, string $relativePathname)
    {
        parent::__construct($file);
        $this->relativePath = $relativePath;
        $this->relativePathname = $relativePathname;
    }
    /**
     * Returns the relative path.
     *
     * This path does not contain the file name.
     *
     * @return string
     */
    public function getRelativePath()
    {
        return $this->relativePath;
    }
    /**
     * Returns the relative path name.
     *
     * This path contains the file name.
     *
     * @return string
     */
    public function getRelativePathname()
    {
        return $this->relativePathname;
    }
    public function getFilenameWithoutExtension() : string
    {
        $filename = $this->getFilename();
        return \pathinfo($filename, \PATHINFO_FILENAME);
    }
    /**
     * Returns the contents of the file.
     *
     * @return string
     *
     * @throws \RuntimeException
     */
    public function getContents()
    {
        \set_error_handler(function ($type, $msg) use(&$error) {
            $error = $msg;
        });
        try {
            $content = \file_get_contents($this->getPathname());
        } finally {
            \restore_error_handler();
        }
        if (\false === $content) {
            throw new \RuntimeException($error);
        }
        return $content;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Finder;

/**
 * Glob matches globbing patterns against text.
 *
 *     if match_glob("foo.*", "foo.bar") echo "matched\n";
 *
 *     // prints foo.bar and foo.baz
 *     $regex = glob_to_regex("foo.*");
 *     for (['foo.bar', 'foo.baz', 'foo', 'bar'] as $t)
 *     {
 *         if (/$regex/) echo "matched: $car\n";
 *     }
 *
 * Glob implements glob(3) style matching that can be used to match
 * against text, rather than fetching names from a filesystem.
 *
 * Based on the Perl Text::Glob module.
 *
 * @author Fabien Potencier <fabien@symfony.com> PHP port
 * @author     Richard Clamp <richardc@unixbeard.net> Perl version
 * @copyright  2004-2005 Fabien Potencier <fabien@symfony.com>
 * @copyright  2002 Richard Clamp <richardc@unixbeard.net>
 */
class Glob
{
    /**
     * Returns a regexp which is the equivalent of the glob pattern.
     *
     * @return string
     */
    public static function toRegex(string $glob, bool $strictLeadingDot = \true, bool $strictWildcardSlash = \true, string $delimiter = '#')
    {
        $firstByte = \true;
        $escaping = \false;
        $inCurlies = 0;
        $regex = '';
        $sizeGlob = \strlen($glob);
        for ($i = 0; $i < $sizeGlob; ++$i) {
            $car = $glob[$i];
            if ($firstByte && $strictLeadingDot && '.' !== $car) {
                $regex .= '(?=[^\\.])';
            }
            $firstByte = '/' === $car;
            if ($firstByte && $strictWildcardSlash && isset($glob[$i + 2]) && '**' === $glob[$i + 1] . $glob[$i + 2] && (!isset($glob[$i + 3]) || '/' === $glob[$i + 3])) {
                $car = '[^/]++/';
                if (!isset($glob[$i + 3])) {
                    $car .= '?';
                }
                if ($strictLeadingDot) {
                    $car = '(?=[^\\.])' . $car;
                }
                $car = '/(?:' . $car . ')*';
                $i += 2 + isset($glob[$i + 3]);
                if ('/' === $delimiter) {
                    $car = \str_replace('/', '\\/', $car);
                }
            }
            if ($delimiter === $car || '.' === $car || '(' === $car || ')' === $car || '|' === $car || '+' === $car || '^' === $car || '$' === $car) {
                $regex .= "\\{$car}";
            } elseif ('*' === $car) {
                $regex .= $escaping ? '\\*' : ($strictWildcardSlash ? '[^/]*' : '.*');
            } elseif ('?' === $car) {
                $regex .= $escaping ? '\\?' : ($strictWildcardSlash ? '[^/]' : '.');
            } elseif ('{' === $car) {
                $regex .= $escaping ? '\\{' : '(';
                if (!$escaping) {
                    ++$inCurlies;
                }
            } elseif ('}' === $car && $inCurlies) {
                $regex .= $escaping ? '}' : ')';
                if (!$escaping) {
                    --$inCurlies;
                }
            } elseif (',' === $car && $inCurlies) {
                $regex .= $escaping ? ',' : '|';
            } elseif ('\\' === $car) {
                if ($escaping) {
                    $regex .= '\\\\';
                    $escaping = \false;
                } else {
                    $escaping = \true;
                }
                continue;
            } else {
                $regex .= $car;
            }
            $escaping = \false;
        }
        return $delimiter . '^' . $regex . '$' . $delimiter;
    }
}
Copyright (c) 2004-present Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Finder;

/**
 * Gitignore matches against text.
 *
 * @author Michael Voříšek <vorismi3@fel.cvut.cz>
 * @author Ahmed Abdou <mail@ahmd.io>
 */
class Gitignore
{
    /**
     * Returns a regexp which is the equivalent of the gitignore pattern.
     *
     * Format specification: https://git-scm.com/docs/gitignore#_pattern_format
     */
    public static function toRegex(string $gitignoreFileContent) : string
    {
        return self::buildRegex($gitignoreFileContent, \false);
    }
    public static function toRegexMatchingNegatedPatterns(string $gitignoreFileContent) : string
    {
        return self::buildRegex($gitignoreFileContent, \true);
    }
    private static function buildRegex(string $gitignoreFileContent, bool $inverted) : string
    {
        $gitignoreFileContent = \preg_replace('~(?<!\\\\)#[^\\n\\r]*~', '', $gitignoreFileContent);
        $gitignoreLines = \preg_split('~\\r\\n?|\\n~', $gitignoreFileContent);
        $res = self::lineToRegex('');
        foreach ($gitignoreLines as $line) {
            $line = \preg_replace('~(?<!\\\\)[ \\t]+$~', '', $line);
            if ('!' === \substr($line, 0, 1)) {
                $line = \substr($line, 1);
                $isNegative = \true;
            } else {
                $isNegative = \false;
            }
            if ('' !== $line) {
                if ($isNegative xor $inverted) {
                    $res = '(?!' . self::lineToRegex($line) . '$)' . $res;
                } else {
                    $res = '(?:' . $res . '|' . self::lineToRegex($line) . ')';
                }
            }
        }
        return '~^(?:' . $res . ')~s';
    }
    private static function lineToRegex(string $gitignoreLine) : string
    {
        if ('' === $gitignoreLine) {
            return '$f';
            // always false
        }
        $slashPos = \strpos($gitignoreLine, '/');
        if (\false !== $slashPos && \strlen($gitignoreLine) - 1 !== $slashPos) {
            if (0 === $slashPos) {
                $gitignoreLine = \substr($gitignoreLine, 1);
            }
            $isAbsolute = \true;
        } else {
            $isAbsolute = \false;
        }
        $regex = \preg_quote(\str_replace('\\', '', $gitignoreLine), '~');
        $regex = \preg_replace_callback('~\\\\\\[((?:\\\\!)?)([^\\[\\]]*)\\\\\\]~', function (array $matches) : string {
            return '[' . ('' !== $matches[1] ? '^' : '') . \str_replace('\\-', '-', $matches[2]) . ']';
        }, $regex);
        $regex = \preg_replace('~(?:(?:\\\\\\*){2,}(/?))+~', '(?:(?:(?!//).(?<!//))+$1)?', $regex);
        $regex = \preg_replace('~\\\\\\*~', '[^/]*', $regex);
        $regex = \preg_replace('~\\\\\\?~', '[^/]', $regex);
        return ($isAbsolute ? '' : '(?:[^/]+/)*') . $regex . (!\str_ends_with($gitignoreLine, '/') ? '(?:$|/)' : '');
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Finder\Exception;

/**
 * @author Andreas Erhard <andreas.erhard@i-med.ac.at>
 */
class DirectoryNotFoundException extends \InvalidArgumentException
{
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Finder\Exception;

/**
 * @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
 */
class AccessDeniedException extends \UnexpectedValueException
{
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Finder\Comparator;

/**
 * NumberComparator compiles a simple comparison to an anonymous
 * subroutine, which you can call with a value to be tested again.
 *
 * Now this would be very pointless, if NumberCompare didn't understand
 * magnitudes.
 *
 * The target value may use magnitudes of kilobytes (k, ki),
 * megabytes (m, mi), or gigabytes (g, gi).  Those suffixed
 * with an i use the appropriate 2**n version in accordance with the
 * IEC standard: http://physics.nist.gov/cuu/Units/binary.html
 *
 * Based on the Perl Number::Compare module.
 *
 * @author    Fabien Potencier <fabien@symfony.com> PHP port
 * @author    Richard Clamp <richardc@unixbeard.net> Perl version
 * @copyright 2004-2005 Fabien Potencier <fabien@symfony.com>
 * @copyright 2002 Richard Clamp <richardc@unixbeard.net>
 *
 * @see http://physics.nist.gov/cuu/Units/binary.html
 */
class NumberComparator extends Comparator
{
    /**
     * @param string|null $test A comparison string or null
     *
     * @throws \InvalidArgumentException If the test is not understood
     */
    public function __construct(?string $test)
    {
        if (null === $test || !\preg_match('#^\\s*(==|!=|[<>]=?)?\\s*([0-9\\.]+)\\s*([kmg]i?)?\\s*$#i', $test, $matches)) {
            throw new \InvalidArgumentException(\sprintf('Don\'t understand "%s" as a number test.', $test ?? 'null'));
        }
        $target = $matches[2];
        if (!\is_numeric($target)) {
            throw new \InvalidArgumentException(\sprintf('Invalid number "%s".', $target));
        }
        if (isset($matches[3])) {
            // magnitude
            switch (\strtolower($matches[3])) {
                case 'k':
                    $target *= 1000;
                    break;
                case 'ki':
                    $target *= 1024;
                    break;
                case 'm':
                    $target *= 1000000;
                    break;
                case 'mi':
                    $target *= 1024 * 1024;
                    break;
                case 'g':
                    $target *= 1000000000;
                    break;
                case 'gi':
                    $target *= 1024 * 1024 * 1024;
                    break;
            }
        }
        parent::__construct($target, $matches[1] ?: '==');
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Finder\Comparator;

/**
 * DateCompare compiles date comparisons.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class DateComparator extends Comparator
{
    /**
     * @param string $test A comparison string
     *
     * @throws \InvalidArgumentException If the test is not understood
     */
    public function __construct(string $test)
    {
        if (!\preg_match('#^\\s*(==|!=|[<>]=?|after|since|before|until)?\\s*(.+?)\\s*$#i', $test, $matches)) {
            throw new \InvalidArgumentException(\sprintf('Don\'t understand "%s" as a date test.', $test));
        }
        try {
            $date = new \DateTime($matches[2]);
            $target = $date->format('U');
        } catch (\Exception $e) {
            throw new \InvalidArgumentException(\sprintf('"%s" is not a valid date.', $matches[2]));
        }
        $operator = $matches[1] ?? '==';
        if ('since' === $operator || 'after' === $operator) {
            $operator = '>';
        }
        if ('until' === $operator || 'before' === $operator) {
            $operator = '<';
        }
        parent::__construct($target, $operator);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Finder\Comparator;

/**
 * @author Fabien Potencier <fabien@symfony.com>
 */
class Comparator
{
    private $target;
    private $operator = '==';
    public function __construct(string $target = null, string $operator = '==')
    {
        if (null === $target) {
            trigger_deprecation('symfony/finder', '5.4', 'Constructing a "%s" without setting "$target" is deprecated.', __CLASS__);
        }
        $this->target = $target;
        $this->doSetOperator($operator);
    }
    /**
     * Gets the target value.
     *
     * @return string
     */
    public function getTarget()
    {
        if (null === $this->target) {
            trigger_deprecation('symfony/finder', '5.4', 'Calling "%s" without initializing the target is deprecated.', __METHOD__);
        }
        return $this->target;
    }
    /**
     * @deprecated set the target via the constructor instead
     */
    public function setTarget(string $target)
    {
        trigger_deprecation('symfony/finder', '5.4', '"%s" is deprecated. Set the target via the constructor instead.', __METHOD__);
        $this->target = $target;
    }
    /**
     * Gets the comparison operator.
     *
     * @return string
     */
    public function getOperator()
    {
        return $this->operator;
    }
    /**
     * Sets the comparison operator.
     *
     * @throws \InvalidArgumentException
     *
     * @deprecated set the operator via the constructor instead
     */
    public function setOperator(string $operator)
    {
        trigger_deprecation('symfony/finder', '5.4', '"%s" is deprecated. Set the operator via the constructor instead.', __METHOD__);
        $this->doSetOperator('' === $operator ? '==' : $operator);
    }
    /**
     * Tests against the target.
     *
     * @param mixed $test A test value
     *
     * @return bool
     */
    public function test($test)
    {
        if (null === $this->target) {
            trigger_deprecation('symfony/finder', '5.4', 'Calling "%s" without initializing the target is deprecated.', __METHOD__);
        }
        switch ($this->operator) {
            case '>':
                return $test > $this->target;
            case '>=':
                return $test >= $this->target;
            case '<':
                return $test < $this->target;
            case '<=':
                return $test <= $this->target;
            case '!=':
                return $test != $this->target;
        }
        return $test == $this->target;
    }
    private function doSetOperator(string $operator) : void
    {
        if (!\in_array($operator, ['>', '<', '>=', '<=', '==', '!='])) {
            throw new \InvalidArgumentException(\sprintf('Invalid operator "%s".', $operator));
        }
        $this->operator = $operator;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Finder\Iterator;

/**
 * SortableIterator applies a sort on a given Iterator.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 *
 * @implements \IteratorAggregate<string, \SplFileInfo>
 */
class SortableIterator implements \IteratorAggregate
{
    public const SORT_BY_NONE = 0;
    public const SORT_BY_NAME = 1;
    public const SORT_BY_TYPE = 2;
    public const SORT_BY_ACCESSED_TIME = 3;
    public const SORT_BY_CHANGED_TIME = 4;
    public const SORT_BY_MODIFIED_TIME = 5;
    public const SORT_BY_NAME_NATURAL = 6;
    private $iterator;
    private $sort;
    /**
     * @param \Traversable<string, \SplFileInfo> $iterator
     * @param int|callable                       $sort     The sort type (SORT_BY_NAME, SORT_BY_TYPE, or a PHP callback)
     *
     * @throws \InvalidArgumentException
     */
    public function __construct(\Traversable $iterator, $sort, bool $reverseOrder = \false)
    {
        $this->iterator = $iterator;
        $order = $reverseOrder ? -1 : 1;
        if (self::SORT_BY_NAME === $sort) {
            $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use($order) {
                return $order * \strcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname());
            };
        } elseif (self::SORT_BY_NAME_NATURAL === $sort) {
            $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use($order) {
                return $order * \strnatcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname());
            };
        } elseif (self::SORT_BY_TYPE === $sort) {
            $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use($order) {
                if ($a->isDir() && $b->isFile()) {
                    return -$order;
                } elseif ($a->isFile() && $b->isDir()) {
                    return $order;
                }
                return $order * \strcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname());
            };
        } elseif (self::SORT_BY_ACCESSED_TIME === $sort) {
            $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use($order) {
                return $order * ($a->getATime() - $b->getATime());
            };
        } elseif (self::SORT_BY_CHANGED_TIME === $sort) {
            $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use($order) {
                return $order * ($a->getCTime() - $b->getCTime());
            };
        } elseif (self::SORT_BY_MODIFIED_TIME === $sort) {
            $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use($order) {
                return $order * ($a->getMTime() - $b->getMTime());
            };
        } elseif (self::SORT_BY_NONE === $sort) {
            $this->sort = $order;
        } elseif (\is_callable($sort)) {
            $this->sort = $reverseOrder ? static function (\SplFileInfo $a, \SplFileInfo $b) use($sort) {
                return -$sort($a, $b);
            } : $sort;
        } else {
            throw new \InvalidArgumentException('The SortableIterator takes a PHP callable or a valid built-in sort algorithm as an argument.');
        }
    }
    /**
     * @return \Traversable<string, \SplFileInfo>
     */
    #[\ReturnTypeWillChange]
    public function getIterator()
    {
        if (1 === $this->sort) {
            return $this->iterator;
        }
        $array = \iterator_to_array($this->iterator, \true);
        if (-1 === $this->sort) {
            $array = \array_reverse($array);
        } else {
            \uasort($array, $this->sort);
        }
        return new \ArrayIterator($array);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Finder\Iterator;

use _PHPStan_dcc7b7cff\Symfony\Component\Finder\Gitignore;
final class VcsIgnoredFilterIterator extends \FilterIterator
{
    /**
     * @var string
     */
    private $baseDir;
    /**
     * @var array<string, array{0: string, 1: string}|null>
     */
    private $gitignoreFilesCache = [];
    /**
     * @var array<string, bool>
     */
    private $ignoredPathsCache = [];
    public function __construct(\Iterator $iterator, string $baseDir)
    {
        $this->baseDir = $this->normalizePath($baseDir);
        parent::__construct($iterator);
    }
    public function accept() : bool
    {
        $file = $this->current();
        $fileRealPath = $this->normalizePath($file->getRealPath());
        return !$this->isIgnored($fileRealPath);
    }
    private function isIgnored(string $fileRealPath) : bool
    {
        if (\is_dir($fileRealPath) && !\str_ends_with($fileRealPath, '/')) {
            $fileRealPath .= '/';
        }
        if (isset($this->ignoredPathsCache[$fileRealPath])) {
            return $this->ignoredPathsCache[$fileRealPath];
        }
        $ignored = \false;
        foreach ($this->parentsDirectoryDownward($fileRealPath) as $parentDirectory) {
            if ($this->isIgnored($parentDirectory)) {
                // rules in ignored directories are ignored, no need to check further.
                break;
            }
            $fileRelativePath = \substr($fileRealPath, \strlen($parentDirectory) + 1);
            if (null === ($regexps = $this->readGitignoreFile("{$parentDirectory}/.gitignore"))) {
                continue;
            }
            [$exclusionRegex, $inclusionRegex] = $regexps;
            if (\preg_match($exclusionRegex, $fileRelativePath)) {
                $ignored = \true;
                continue;
            }
            if (\preg_match($inclusionRegex, $fileRelativePath)) {
                $ignored = \false;
            }
        }
        return $this->ignoredPathsCache[$fileRealPath] = $ignored;
    }
    /**
     * @return list<string>
     */
    private function parentsDirectoryDownward(string $fileRealPath) : array
    {
        $parentDirectories = [];
        $parentDirectory = $fileRealPath;
        while (\true) {
            $newParentDirectory = \dirname($parentDirectory);
            // dirname('/') = '/'
            if ($newParentDirectory === $parentDirectory) {
                break;
            }
            $parentDirectory = $newParentDirectory;
            if (0 !== \strpos($parentDirectory, $this->baseDir)) {
                break;
            }
            $parentDirectories[] = $parentDirectory;
        }
        return \array_reverse($parentDirectories);
    }
    /**
     * @return array{0: string, 1: string}|null
     */
    private function readGitignoreFile(string $path) : ?array
    {
        if (\array_key_exists($path, $this->gitignoreFilesCache)) {
            return $this->gitignoreFilesCache[$path];
        }
        if (!\file_exists($path)) {
            return $this->gitignoreFilesCache[$path] = null;
        }
        if (!\is_file($path) || !\is_readable($path)) {
            throw new \RuntimeException("The \"ignoreVCSIgnored\" option cannot be used by the Finder as the \"{$path}\" file is not readable.");
        }
        $gitignoreFileContent = \file_get_contents($path);
        return $this->gitignoreFilesCache[$path] = [Gitignore::toRegex($gitignoreFileContent), Gitignore::toRegexMatchingNegatedPatterns($gitignoreFileContent)];
    }
    private function normalizePath(string $path) : string
    {
        if ('\\' === \DIRECTORY_SEPARATOR) {
            return \str_replace('\\', '/', $path);
        }
        return $path;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Finder\Iterator;

use _PHPStan_dcc7b7cff\Symfony\Component\Finder\Comparator\NumberComparator;
/**
 * SizeRangeFilterIterator filters out files that are not in the given size range.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 *
 * @extends \FilterIterator<string, \SplFileInfo>
 */
class SizeRangeFilterIterator extends \FilterIterator
{
    private $comparators = [];
    /**
     * @param \Iterator<string, \SplFileInfo> $iterator
     * @param NumberComparator[]              $comparators
     */
    public function __construct(\Iterator $iterator, array $comparators)
    {
        $this->comparators = $comparators;
        parent::__construct($iterator);
    }
    /**
     * Filters the iterator values.
     *
     * @return bool
     */
    #[\ReturnTypeWillChange]
    public function accept()
    {
        $fileinfo = $this->current();
        if (!$fileinfo->isFile()) {
            return \true;
        }
        $filesize = $fileinfo->getSize();
        foreach ($this->comparators as $compare) {
            if (!$compare->test($filesize)) {
                return \false;
            }
        }
        return \true;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Finder\Iterator;

/**
 * PathFilterIterator filters files by path patterns (e.g. some/special/dir).
 *
 * @author Fabien Potencier  <fabien@symfony.com>
 * @author Włodzimierz Gajda <gajdaw@gajdaw.pl>
 *
 * @extends MultiplePcreFilterIterator<string, \SplFileInfo>
 */
class PathFilterIterator extends MultiplePcreFilterIterator
{
    /**
     * Filters the iterator values.
     *
     * @return bool
     */
    #[\ReturnTypeWillChange]
    public function accept()
    {
        $filename = $this->current()->getRelativePathname();
        if ('\\' === \DIRECTORY_SEPARATOR) {
            $filename = \str_replace('\\', '/', $filename);
        }
        return $this->isAccepted($filename);
    }
    /**
     * Converts strings to regexp.
     *
     * PCRE patterns are left unchanged.
     *
     * Default conversion:
     *     'lorem/ipsum/dolor' ==>  'lorem\/ipsum\/dolor/'
     *
     * Use only / as directory separator (on Windows also).
     *
     * @param string $str Pattern: regexp or dirname
     *
     * @return string
     */
    protected function toRegex(string $str)
    {
        return $this->isRegex($str) ? $str : '/' . \preg_quote($str, '/') . '/';
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Finder\Iterator;

/**
 * MultiplePcreFilterIterator filters files using patterns (regexps, globs or strings).
 *
 * @author Fabien Potencier <fabien@symfony.com>
 *
 * @template-covariant TKey
 * @template-covariant TValue
 *
 * @extends \FilterIterator<TKey, TValue>
 */
abstract class MultiplePcreFilterIterator extends \FilterIterator
{
    protected $matchRegexps = [];
    protected $noMatchRegexps = [];
    /**
     * @param \Iterator $iterator        The Iterator to filter
     * @param string[]  $matchPatterns   An array of patterns that need to match
     * @param string[]  $noMatchPatterns An array of patterns that need to not match
     */
    public function __construct(\Iterator $iterator, array $matchPatterns, array $noMatchPatterns)
    {
        foreach ($matchPatterns as $pattern) {
            $this->matchRegexps[] = $this->toRegex($pattern);
        }
        foreach ($noMatchPatterns as $pattern) {
            $this->noMatchRegexps[] = $this->toRegex($pattern);
        }
        parent::__construct($iterator);
    }
    /**
     * Checks whether the string is accepted by the regex filters.
     *
     * If there is no regexps defined in the class, this method will accept the string.
     * Such case can be handled by child classes before calling the method if they want to
     * apply a different behavior.
     *
     * @return bool
     */
    protected function isAccepted(string $string)
    {
        // should at least not match one rule to exclude
        foreach ($this->noMatchRegexps as $regex) {
            if (\preg_match($regex, $string)) {
                return \false;
            }
        }
        // should at least match one rule
        if ($this->matchRegexps) {
            foreach ($this->matchRegexps as $regex) {
                if (\preg_match($regex, $string)) {
                    return \true;
                }
            }
            return \false;
        }
        // If there is no match rules, the file is accepted
        return \true;
    }
    /**
     * Checks whether the string is a regex.
     *
     * @return bool
     */
    protected function isRegex(string $str)
    {
        $availableModifiers = 'imsxuADU';
        if (\PHP_VERSION_ID >= 80200) {
            $availableModifiers .= 'n';
        }
        if (\preg_match('/^(.{3,}?)[' . $availableModifiers . ']*$/', $str, $m)) {
            $start = \substr($m[1], 0, 1);
            $end = \substr($m[1], -1);
            if ($start === $end) {
                return !\preg_match('/[*?[:alnum:] \\\\]/', $start);
            }
            foreach ([['{', '}'], ['(', ')'], ['[', ']'], ['<', '>']] as $delimiters) {
                if ($start === $delimiters[0] && $end === $delimiters[1]) {
                    return \true;
                }
            }
        }
        return \false;
    }
    /**
     * Converts string into regexp.
     *
     * @return string
     */
    protected abstract function toRegex(string $str);
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Finder\Iterator;

/**
 * FilecontentFilterIterator filters files by their contents using patterns (regexps or strings).
 *
 * @author Fabien Potencier  <fabien@symfony.com>
 * @author Włodzimierz Gajda <gajdaw@gajdaw.pl>
 *
 * @extends MultiplePcreFilterIterator<string, \SplFileInfo>
 */
class FilecontentFilterIterator extends MultiplePcreFilterIterator
{
    /**
     * Filters the iterator values.
     *
     * @return bool
     */
    #[\ReturnTypeWillChange]
    public function accept()
    {
        if (!$this->matchRegexps && !$this->noMatchRegexps) {
            return \true;
        }
        $fileinfo = $this->current();
        if ($fileinfo->isDir() || !$fileinfo->isReadable()) {
            return \false;
        }
        $content = $fileinfo->getContents();
        if (!$content) {
            return \false;
        }
        return $this->isAccepted($content);
    }
    /**
     * Converts string to regexp if necessary.
     *
     * @param string $str Pattern: string or regexp
     *
     * @return string
     */
    protected function toRegex(string $str)
    {
        return $this->isRegex($str) ? $str : '/' . \preg_quote($str, '/') . '/';
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Finder\Iterator;

/**
 * @author Jérémy Derussé <jeremy@derusse.com>
 *
 * @internal
 */
class LazyIterator implements \IteratorAggregate
{
    private $iteratorFactory;
    public function __construct(callable $iteratorFactory)
    {
        $this->iteratorFactory = $iteratorFactory;
    }
    public function getIterator() : \Traversable
    {
        yield from ($this->iteratorFactory)();
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Finder\Iterator;

use _PHPStan_dcc7b7cff\Symfony\Component\Finder\Glob;
/**
 * FilenameFilterIterator filters files by patterns (a regexp, a glob, or a string).
 *
 * @author Fabien Potencier <fabien@symfony.com>
 *
 * @extends MultiplePcreFilterIterator<string, \SplFileInfo>
 */
class FilenameFilterIterator extends MultiplePcreFilterIterator
{
    /**
     * Filters the iterator values.
     *
     * @return bool
     */
    #[\ReturnTypeWillChange]
    public function accept()
    {
        return $this->isAccepted($this->current()->getFilename());
    }
    /**
     * Converts glob to regexp.
     *
     * PCRE patterns are left unchanged.
     * Glob strings are transformed with Glob::toRegex().
     *
     * @param string $str Pattern: glob or regexp
     *
     * @return string
     */
    protected function toRegex(string $str)
    {
        return $this->isRegex($str) ? $str : Glob::toRegex($str);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Finder\Iterator;

/**
 * ExcludeDirectoryFilterIterator filters out directories.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 *
 * @extends \FilterIterator<string, \SplFileInfo>
 *
 * @implements \RecursiveIterator<string, \SplFileInfo>
 */
class ExcludeDirectoryFilterIterator extends \FilterIterator implements \RecursiveIterator
{
    private $iterator;
    private $isRecursive;
    private $excludedDirs = [];
    private $excludedPattern;
    /**
     * @param \Iterator $iterator    The Iterator to filter
     * @param string[]  $directories An array of directories to exclude
     */
    public function __construct(\Iterator $iterator, array $directories)
    {
        $this->iterator = $iterator;
        $this->isRecursive = $iterator instanceof \RecursiveIterator;
        $patterns = [];
        foreach ($directories as $directory) {
            $directory = \rtrim($directory, '/');
            if (!$this->isRecursive || \str_contains($directory, '/')) {
                $patterns[] = \preg_quote($directory, '#');
            } else {
                $this->excludedDirs[$directory] = \true;
            }
        }
        if ($patterns) {
            $this->excludedPattern = '#(?:^|/)(?:' . \implode('|', $patterns) . ')(?:/|$)#';
        }
        parent::__construct($iterator);
    }
    /**
     * Filters the iterator values.
     *
     * @return bool
     */
    #[\ReturnTypeWillChange]
    public function accept()
    {
        if ($this->isRecursive && isset($this->excludedDirs[$this->getFilename()]) && $this->isDir()) {
            return \false;
        }
        if ($this->excludedPattern) {
            $path = $this->isDir() ? $this->current()->getRelativePathname() : $this->current()->getRelativePath();
            $path = \str_replace('\\', '/', $path);
            return !\preg_match($this->excludedPattern, $path);
        }
        return \true;
    }
    /**
     * @return bool
     */
    #[\ReturnTypeWillChange]
    public function hasChildren()
    {
        return $this->isRecursive && $this->iterator->hasChildren();
    }
    /**
     * @return self
     */
    #[\ReturnTypeWillChange]
    public function getChildren()
    {
        $children = new self($this->iterator->getChildren(), []);
        $children->excludedDirs = $this->excludedDirs;
        $children->excludedPattern = $this->excludedPattern;
        return $children;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Finder\Iterator;

/**
 * CustomFilterIterator filters files by applying anonymous functions.
 *
 * The anonymous function receives a \SplFileInfo and must return false
 * to remove files.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 *
 * @extends \FilterIterator<string, \SplFileInfo>
 */
class CustomFilterIterator extends \FilterIterator
{
    private $filters = [];
    /**
     * @param \Iterator<string, \SplFileInfo> $iterator The Iterator to filter
     * @param callable[]                      $filters  An array of PHP callbacks
     *
     * @throws \InvalidArgumentException
     */
    public function __construct(\Iterator $iterator, array $filters)
    {
        foreach ($filters as $filter) {
            if (!\is_callable($filter)) {
                throw new \InvalidArgumentException('Invalid PHP callback.');
            }
        }
        $this->filters = $filters;
        parent::__construct($iterator);
    }
    /**
     * Filters the iterator values.
     *
     * @return bool
     */
    #[\ReturnTypeWillChange]
    public function accept()
    {
        $fileinfo = $this->current();
        foreach ($this->filters as $filter) {
            if (\false === $filter($fileinfo)) {
                return \false;
            }
        }
        return \true;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Finder\Iterator;

/**
 * DepthRangeFilterIterator limits the directory depth.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 *
 * @template-covariant TKey
 * @template-covariant TValue
 *
 * @extends \FilterIterator<TKey, TValue>
 */
class DepthRangeFilterIterator extends \FilterIterator
{
    private $minDepth = 0;
    /**
     * @param \RecursiveIteratorIterator<\RecursiveIterator<TKey, TValue>> $iterator The Iterator to filter
     * @param int                                                          $minDepth The min depth
     * @param int                                                          $maxDepth The max depth
     */
    public function __construct(\RecursiveIteratorIterator $iterator, int $minDepth = 0, int $maxDepth = \PHP_INT_MAX)
    {
        $this->minDepth = $minDepth;
        $iterator->setMaxDepth(\PHP_INT_MAX === $maxDepth ? -1 : $maxDepth);
        parent::__construct($iterator);
    }
    /**
     * Filters the iterator values.
     *
     * @return bool
     */
    #[\ReturnTypeWillChange]
    public function accept()
    {
        return $this->getInnerIterator()->getDepth() >= $this->minDepth;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Finder\Iterator;

use _PHPStan_dcc7b7cff\Symfony\Component\Finder\Comparator\DateComparator;
/**
 * DateRangeFilterIterator filters out files that are not in the given date range (last modified dates).
 *
 * @author Fabien Potencier <fabien@symfony.com>
 *
 * @extends \FilterIterator<string, \SplFileInfo>
 */
class DateRangeFilterIterator extends \FilterIterator
{
    private $comparators = [];
    /**
     * @param \Iterator<string, \SplFileInfo> $iterator
     * @param DateComparator[]                $comparators
     */
    public function __construct(\Iterator $iterator, array $comparators)
    {
        $this->comparators = $comparators;
        parent::__construct($iterator);
    }
    /**
     * Filters the iterator values.
     *
     * @return bool
     */
    #[\ReturnTypeWillChange]
    public function accept()
    {
        $fileinfo = $this->current();
        if (!\file_exists($fileinfo->getPathname())) {
            return \false;
        }
        $filedate = $fileinfo->getMTime();
        foreach ($this->comparators as $compare) {
            if (!$compare->test($filedate)) {
                return \false;
            }
        }
        return \true;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Finder\Iterator;

use _PHPStan_dcc7b7cff\Symfony\Component\Finder\Exception\AccessDeniedException;
use _PHPStan_dcc7b7cff\Symfony\Component\Finder\SplFileInfo;
/**
 * Extends the \RecursiveDirectoryIterator to support relative paths.
 *
 * @author Victor Berchet <victor@suumit.com>
 */
class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator
{
    /**
     * @var bool
     */
    private $ignoreUnreadableDirs;
    /**
     * @var bool
     */
    private $rewindable;
    // these 3 properties take part of the performance optimization to avoid redoing the same work in all iterations
    private $rootPath;
    private $subPath;
    private $directorySeparator = '/';
    /**
     * @throws \RuntimeException
     */
    public function __construct(string $path, int $flags, bool $ignoreUnreadableDirs = \false)
    {
        if ($flags & (self::CURRENT_AS_PATHNAME | self::CURRENT_AS_SELF)) {
            throw new \RuntimeException('This iterator only support returning current as fileinfo.');
        }
        parent::__construct($path, $flags);
        $this->ignoreUnreadableDirs = $ignoreUnreadableDirs;
        $this->rootPath = $path;
        if ('/' !== \DIRECTORY_SEPARATOR && !($flags & self::UNIX_PATHS)) {
            $this->directorySeparator = \DIRECTORY_SEPARATOR;
        }
    }
    /**
     * Return an instance of SplFileInfo with support for relative paths.
     *
     * @return SplFileInfo
     */
    #[\ReturnTypeWillChange]
    public function current()
    {
        // the logic here avoids redoing the same work in all iterations
        if (null === ($subPathname = $this->subPath)) {
            $subPathname = $this->subPath = $this->getSubPath();
        }
        if ('' !== $subPathname) {
            $subPathname .= $this->directorySeparator;
        }
        $subPathname .= $this->getFilename();
        if ('/' !== ($basePath = $this->rootPath)) {
            $basePath .= $this->directorySeparator;
        }
        return new SplFileInfo($basePath . $subPathname, $this->subPath, $subPathname);
    }
    /**
     * @param bool $allowLinks
     *
     * @return bool
     */
    #[\ReturnTypeWillChange]
    public function hasChildren($allowLinks = \false)
    {
        $hasChildren = parent::hasChildren($allowLinks);
        if (!$hasChildren || !$this->ignoreUnreadableDirs) {
            return $hasChildren;
        }
        try {
            parent::getChildren();
            return \true;
        } catch (\UnexpectedValueException $e) {
            // If directory is unreadable and finder is set to ignore it, skip children
            return \false;
        }
    }
    /**
     * @return \RecursiveDirectoryIterator
     *
     * @throws AccessDeniedException
     */
    #[\ReturnTypeWillChange]
    public function getChildren()
    {
        try {
            $children = parent::getChildren();
            if ($children instanceof self) {
                // parent method will call the constructor with default arguments, so unreadable dirs won't be ignored anymore
                $children->ignoreUnreadableDirs = $this->ignoreUnreadableDirs;
                // performance optimization to avoid redoing the same work in all children
                $children->rewindable =& $this->rewindable;
                $children->rootPath = $this->rootPath;
            }
            return $children;
        } catch (\UnexpectedValueException $e) {
            throw new AccessDeniedException($e->getMessage(), $e->getCode(), $e);
        }
    }
    /**
     * Do nothing for non rewindable stream.
     *
     * @return void
     */
    #[\ReturnTypeWillChange]
    public function rewind()
    {
        if (\false === $this->isRewindable()) {
            return;
        }
        parent::rewind();
    }
    /**
     * Checks if the stream is rewindable.
     *
     * @return bool
     */
    public function isRewindable()
    {
        if (null !== $this->rewindable) {
            return $this->rewindable;
        }
        if (\false !== ($stream = @\opendir($this->getPath()))) {
            $infos = \stream_get_meta_data($stream);
            \closedir($stream);
            if ($infos['seekable']) {
                return $this->rewindable = \true;
            }
        }
        return $this->rewindable = \false;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Component\Finder\Iterator;

/**
 * FileTypeFilterIterator only keeps files, directories, or both.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 *
 * @extends \FilterIterator<string, \SplFileInfo>
 */
class FileTypeFilterIterator extends \FilterIterator
{
    public const ONLY_FILES = 1;
    public const ONLY_DIRECTORIES = 2;
    private $mode;
    /**
     * @param \Iterator $iterator The Iterator to filter
     * @param int       $mode     The mode (self::ONLY_FILES or self::ONLY_DIRECTORIES)
     */
    public function __construct(\Iterator $iterator, int $mode)
    {
        $this->mode = $mode;
        parent::__construct($iterator);
    }
    /**
     * Filters the iterator values.
     *
     * @return bool
     */
    #[\ReturnTypeWillChange]
    public function accept()
    {
        $fileinfo = $this->current();
        if (self::ONLY_DIRECTORIES === (self::ONLY_DIRECTORIES & $this->mode) && $fileinfo->isFile()) {
            return \false;
        } elseif (self::ONLY_FILES === (self::ONLY_FILES & $this->mode) && $fileinfo->isDir()) {
            return \false;
        }
        return \true;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

use Symfony\Polyfill\Intl\Grapheme as p;

if (!defined('GRAPHEME_EXTR_COUNT')) {
    define('GRAPHEME_EXTR_COUNT', 0);
}
if (!defined('GRAPHEME_EXTR_MAXBYTES')) {
    define('GRAPHEME_EXTR_MAXBYTES', 1);
}
if (!defined('GRAPHEME_EXTR_MAXCHARS')) {
    define('GRAPHEME_EXTR_MAXCHARS', 2);
}

if (!function_exists('grapheme_extract')) {
    function grapheme_extract(?string $haystack, ?int $size, ?int $type = GRAPHEME_EXTR_COUNT, ?int $offset = 0, &$next = null): string|false { return p\Grapheme::grapheme_extract((string) $haystack, (int) $size, (int) $type, (int) $offset, $next); }
}
if (!function_exists('grapheme_stripos')) {
    function grapheme_stripos(?string $haystack, ?string $needle, ?int $offset = 0): int|false { return p\Grapheme::grapheme_stripos((string) $haystack, (string) $needle, (int) $offset); }
}
if (!function_exists('grapheme_stristr')) {
    function grapheme_stristr(?string $haystack, ?string $needle, ?bool $beforeNeedle = false): string|false { return p\Grapheme::grapheme_stristr((string) $haystack, (string) $needle, (bool) $beforeNeedle); }
}
if (!function_exists('grapheme_strlen')) {
    function grapheme_strlen(?string $string): int|false|null { return p\Grapheme::grapheme_strlen((string) $string); }
}
if (!function_exists('grapheme_strpos')) {
    function grapheme_strpos(?string $haystack, ?string $needle, ?int $offset = 0): int|false { return p\Grapheme::grapheme_strpos((string) $haystack, (string) $needle, (int) $offset); }
}
if (!function_exists('grapheme_strripos')) {
    function grapheme_strripos(?string $haystack, ?string $needle, ?int $offset = 0): int|false { return p\Grapheme::grapheme_strripos((string) $haystack, (string) $needle, (int) $offset); }
}
if (!function_exists('grapheme_strrpos')) {
    function grapheme_strrpos(?string $haystack, ?string $needle, ?int $offset = 0): int|false { return p\Grapheme::grapheme_strrpos((string) $haystack, (string) $needle, (int) $offset); }
}
if (!function_exists('grapheme_strstr')) {
    function grapheme_strstr(?string $haystack, ?string $needle, ?bool $beforeNeedle = false): string|false { return p\Grapheme::grapheme_strstr((string) $haystack, (string) $needle, (bool) $beforeNeedle); }
}
if (!function_exists('grapheme_substr')) {
    function grapheme_substr(?string $string, ?int $offset, ?int $length = null): string|false { return p\Grapheme::grapheme_substr((string) $string, (int) $offset, $length); }
}
Copyright (c) 2015-2019 Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

use Symfony\Polyfill\Intl\Grapheme as p;

if (extension_loaded('intl')) {
    return;
}

if (\PHP_VERSION_ID >= 80000) {
    return require __DIR__.'/bootstrap80.php';
}

if (!defined('GRAPHEME_EXTR_COUNT')) {
    define('GRAPHEME_EXTR_COUNT', 0);
}
if (!defined('GRAPHEME_EXTR_MAXBYTES')) {
    define('GRAPHEME_EXTR_MAXBYTES', 1);
}
if (!defined('GRAPHEME_EXTR_MAXCHARS')) {
    define('GRAPHEME_EXTR_MAXCHARS', 2);
}

if (!function_exists('grapheme_extract')) {
    function grapheme_extract($haystack, $size, $type = 0, $start = 0, &$next = 0) { return p\Grapheme::grapheme_extract($haystack, $size, $type, $start, $next); }
}
if (!function_exists('grapheme_stripos')) {
    function grapheme_stripos($haystack, $needle, $offset = 0) { return p\Grapheme::grapheme_stripos($haystack, $needle, $offset); }
}
if (!function_exists('grapheme_stristr')) {
    function grapheme_stristr($haystack, $needle, $beforeNeedle = false) { return p\Grapheme::grapheme_stristr($haystack, $needle, $beforeNeedle); }
}
if (!function_exists('grapheme_strlen')) {
    function grapheme_strlen($input) { return p\Grapheme::grapheme_strlen($input); }
}
if (!function_exists('grapheme_strpos')) {
    function grapheme_strpos($haystack, $needle, $offset = 0) { return p\Grapheme::grapheme_strpos($haystack, $needle, $offset); }
}
if (!function_exists('grapheme_strripos')) {
    function grapheme_strripos($haystack, $needle, $offset = 0) { return p\Grapheme::grapheme_strripos($haystack, $needle, $offset); }
}
if (!function_exists('grapheme_strrpos')) {
    function grapheme_strrpos($haystack, $needle, $offset = 0) { return p\Grapheme::grapheme_strrpos($haystack, $needle, $offset); }
}
if (!function_exists('grapheme_strstr')) {
    function grapheme_strstr($haystack, $needle, $beforeNeedle = false) { return p\Grapheme::grapheme_strstr($haystack, $needle, $beforeNeedle); }
}
if (!function_exists('grapheme_substr')) {
    function grapheme_substr($string, $offset, $length = null) { return p\Grapheme::grapheme_substr($string, $offset, $length); }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Polyfill\Intl\Grapheme;

\define('SYMFONY_GRAPHEME_CLUSTER_RX', ((float) \PCRE_VERSION < 10 ? (float) \PCRE_VERSION >= 8.32 : (float) \PCRE_VERSION >= 10.39) ? '\X' : Grapheme::GRAPHEME_CLUSTER_RX);

/**
 * Partial intl implementation in pure PHP.
 *
 * Implemented:
 * - grapheme_extract  - Extract a sequence of grapheme clusters from a text buffer, which must be encoded in UTF-8
 * - grapheme_stripos  - Find position (in grapheme units) of first occurrence of a case-insensitive string
 * - grapheme_stristr  - Returns part of haystack string from the first occurrence of case-insensitive needle to the end of haystack
 * - grapheme_strlen   - Get string length in grapheme units
 * - grapheme_strpos   - Find position (in grapheme units) of first occurrence of a string
 * - grapheme_strripos - Find position (in grapheme units) of last occurrence of a case-insensitive string
 * - grapheme_strrpos  - Find position (in grapheme units) of last occurrence of a string
 * - grapheme_strstr   - Returns part of haystack string from the first occurrence of needle to the end of haystack
 * - grapheme_substr   - Return part of a string
 *
 * @author Nicolas Grekas <p@tchwork.com>
 *
 * @internal
 */
final class Grapheme
{
    // (CRLF|([ZWNJ-ZWJ]|T+|L*(LV?V+|LV|LVT)T*|L+|[^Control])[Extend]*|[Control])
    // This regular expression is a work around for http://bugs.exim.org/1279
    public const GRAPHEME_CLUSTER_RX = '(?:\r\n|(?:[ -~\x{200C}\x{200D}]|[ᆨ-ᇹ]+|[ᄀ-ᅟ]*(?:[가개갸걔거게겨계고과괘괴교구궈궤귀규그긔기까깨꺄꺠꺼께껴꼐꼬꽈꽤꾀꾜꾸꿔꿰뀌뀨끄끠끼나내냐냬너네녀녜노놔놰뇌뇨누눠눼뉘뉴느늬니다대댜댸더데뎌뎨도돠돼되됴두둬뒈뒤듀드듸디따때땨떄떠떼뗘뗴또똬뙈뙤뚀뚜뚸뛔뛰뜌뜨띄띠라래랴럐러레려례로롸뢔뢰료루뤄뤠뤼류르릐리마매먀먜머메며몌모뫄뫠뫼묘무뭐뭬뮈뮤므믜미바배뱌뱨버베벼볘보봐봬뵈뵤부붜붸뷔뷰브븨비빠빼뺘뺴뻐뻬뼈뼤뽀뽜뽸뾔뾰뿌뿨쀄쀠쀼쁘쁴삐사새샤섀서세셔셰소솨쇄쇠쇼수숴쉐쉬슈스싀시싸쌔쌰썌써쎄쎠쎼쏘쏴쐐쐬쑈쑤쒀쒜쒸쓔쓰씌씨아애야얘어에여예오와왜외요우워웨위유으의이자재쟈쟤저제져졔조좌좨죄죠주줘줴쥐쥬즈즤지짜째쨔쨰쩌쩨쪄쪠쪼쫘쫴쬐쬬쭈쭤쮀쮜쮸쯔쯰찌차채챠챼처체쳐쳬초촤쵀최쵸추춰췌취츄츠츼치카캐캬컈커케켜켸코콰쾌쾨쿄쿠쿼퀘퀴큐크킈키타태탸턔터테텨톄토톼퇘퇴툐투퉈퉤튀튜트틔티파패퍄퍠퍼페펴폐포퐈퐤푀표푸풔풰퓌퓨프픠피하해햐햬허헤혀혜호화홰회효후훠훼휘휴흐희히]?[ᅠ-ᆢ]+|[가-힣])[ᆨ-ᇹ]*|[ᄀ-ᅟ]+|[^\p{Cc}\p{Cf}\p{Zl}\p{Zp}])[\p{Mn}\p{Me}\x{09BE}\x{09D7}\x{0B3E}\x{0B57}\x{0BBE}\x{0BD7}\x{0CC2}\x{0CD5}\x{0CD6}\x{0D3E}\x{0D57}\x{0DCF}\x{0DDF}\x{200C}\x{200D}\x{1D165}\x{1D16E}-\x{1D172}]*|[\p{Cc}\p{Cf}\p{Zl}\p{Zp}])';

    private const CASE_FOLD = [
        ['µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"],
        ['μ', 's', 'ι',        'σ', 'β',        'θ',        'φ',        'π',        'κ',        'ρ',        'ε',        "\xE1\xB9\xA1", 'ι'],
    ];

    public static function grapheme_extract($s, $size, $type = \GRAPHEME_EXTR_COUNT, $start = 0, &$next = 0)
    {
        if (0 > $start) {
            $start = \strlen($s) + $start;
        }

        if (!\is_scalar($s)) {
            $hasError = false;
            set_error_handler(function () use (&$hasError) { $hasError = true; });
            $next = substr($s, $start);
            restore_error_handler();
            if ($hasError) {
                substr($s, $start);
                $s = '';
            } else {
                $s = $next;
            }
        } else {
            $s = substr($s, $start);
        }
        $size = (int) $size;
        $type = (int) $type;
        $start = (int) $start;

        if (\GRAPHEME_EXTR_COUNT !== $type && \GRAPHEME_EXTR_MAXBYTES !== $type && \GRAPHEME_EXTR_MAXCHARS !== $type) {
            if (80000 > \PHP_VERSION_ID) {
                return false;
            }

            throw new \ValueError('grapheme_extract(): Argument #3 ($type) must be one of GRAPHEME_EXTR_COUNT, GRAPHEME_EXTR_MAXBYTES, or GRAPHEME_EXTR_MAXCHARS');
        }

        if (!isset($s[0]) || 0 > $size || 0 > $start) {
            return false;
        }
        if (0 === $size) {
            return '';
        }

        $next = $start;

        $s = preg_split('/('.SYMFONY_GRAPHEME_CLUSTER_RX.')/u', "\r\n".$s, $size + 1, \PREG_SPLIT_NO_EMPTY | \PREG_SPLIT_DELIM_CAPTURE);

        if (!isset($s[1])) {
            return false;
        }

        $i = 1;
        $ret = '';

        do {
            if (\GRAPHEME_EXTR_COUNT === $type) {
                --$size;
            } elseif (\GRAPHEME_EXTR_MAXBYTES === $type) {
                $size -= \strlen($s[$i]);
            } else {
                $size -= iconv_strlen($s[$i], 'UTF-8//IGNORE');
            }

            if ($size >= 0) {
                $ret .= $s[$i];
            }
        } while (isset($s[++$i]) && $size > 0);

        $next += \strlen($ret);

        return $ret;
    }

    public static function grapheme_strlen($s)
    {
        preg_replace('/'.SYMFONY_GRAPHEME_CLUSTER_RX.'/u', '', $s, -1, $len);

        return 0 === $len && '' !== $s ? null : $len;
    }

    public static function grapheme_substr($s, $start, $len = null)
    {
        if (null === $len) {
            $len = 2147483647;
        }

        preg_match_all('/'.SYMFONY_GRAPHEME_CLUSTER_RX.'/u', $s, $s);

        $slen = \count($s[0]);
        $start = (int) $start;

        if (0 > $start) {
            $start += $slen;
        }
        if (0 > $start) {
            if (\PHP_VERSION_ID < 80000) {
                return false;
            }

            $start = 0;
        }
        if ($start >= $slen) {
            return \PHP_VERSION_ID >= 80000 ? '' : false;
        }

        $rem = $slen - $start;

        if (0 > $len) {
            $len += $rem;
        }
        if (0 === $len) {
            return '';
        }
        if (0 > $len) {
            return \PHP_VERSION_ID >= 80000 ? '' : false;
        }
        if ($len > $rem) {
            $len = $rem;
        }

        return implode('', \array_slice($s[0], $start, $len));
    }

    public static function grapheme_strpos($s, $needle, $offset = 0)
    {
        return self::grapheme_position($s, $needle, $offset, 0);
    }

    public static function grapheme_stripos($s, $needle, $offset = 0)
    {
        return self::grapheme_position($s, $needle, $offset, 1);
    }

    public static function grapheme_strrpos($s, $needle, $offset = 0)
    {
        return self::grapheme_position($s, $needle, $offset, 2);
    }

    public static function grapheme_strripos($s, $needle, $offset = 0)
    {
        return self::grapheme_position($s, $needle, $offset, 3);
    }

    public static function grapheme_stristr($s, $needle, $beforeNeedle = false)
    {
        return mb_stristr($s, $needle, $beforeNeedle, 'UTF-8');
    }

    public static function grapheme_strstr($s, $needle, $beforeNeedle = false)
    {
        return mb_strstr($s, $needle, $beforeNeedle, 'UTF-8');
    }

    private static function grapheme_position($s, $needle, $offset, $mode)
    {
        $needle = (string) $needle;
        if (80000 > \PHP_VERSION_ID && !preg_match('/./us', $needle)) {
            return false;
        }
        $s = (string) $s;
        if (!preg_match('/./us', $s)) {
            return false;
        }
        if ($offset > 0) {
            $s = self::grapheme_substr($s, $offset);
        } elseif ($offset < 0) {
            if (2 > $mode) {
                $offset += self::grapheme_strlen($s);
                $s = self::grapheme_substr($s, $offset);
                if (0 > $offset) {
                    $offset = 0;
                }
            } elseif (0 > $offset += self::grapheme_strlen($needle)) {
                $s = self::grapheme_substr($s, 0, $offset);
                $offset = 0;
            } else {
                $offset = 0;
            }
        }

        // As UTF-8 is self-synchronizing, and we have ensured the strings are valid UTF-8,
        // we can use normal binary string functions here. For case-insensitive searches,
        // case fold the strings first.
        $caseInsensitive = $mode & 1;
        $reverse = $mode & 2;
        if ($caseInsensitive) {
            // Use the same case folding mode as mbstring does for mb_stripos().
            // Stick to SIMPLE case folding to avoid changing the length of the string, which
            // might result in offsets being shifted.
            $mode = \defined('MB_CASE_FOLD_SIMPLE') ? \MB_CASE_FOLD_SIMPLE : \MB_CASE_LOWER;
            $s = mb_convert_case($s, $mode, 'UTF-8');
            $needle = mb_convert_case($needle, $mode, 'UTF-8');

            if (!\defined('MB_CASE_FOLD_SIMPLE')) {
                $s = str_replace(self::CASE_FOLD[0], self::CASE_FOLD[1], $s);
                $needle = str_replace(self::CASE_FOLD[0], self::CASE_FOLD[1], $needle);
            }
        }
        if ($reverse) {
            $needlePos = strrpos($s, $needle);
        } else {
            $needlePos = strpos($s, $needle);
        }

        return false !== $needlePos ? self::grapheme_strlen(substr($s, 0, $needlePos)) + $offset : false;
    }
}
<?php

namespace _PHPStan_dcc7b7cff;

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
use _PHPStan_dcc7b7cff\Symfony\Polyfill\Ctype as p;
if (!\function_exists('ctype_alnum')) {
    function ctype_alnum(mixed $text) : bool
    {
        return p\Ctype::ctype_alnum($text);
    }
}
if (!\function_exists('ctype_alpha')) {
    function ctype_alpha(mixed $text) : bool
    {
        return p\Ctype::ctype_alpha($text);
    }
}
if (!\function_exists('ctype_cntrl')) {
    function ctype_cntrl(mixed $text) : bool
    {
        return p\Ctype::ctype_cntrl($text);
    }
}
if (!\function_exists('ctype_digit')) {
    function ctype_digit(mixed $text) : bool
    {
        return p\Ctype::ctype_digit($text);
    }
}
if (!\function_exists('ctype_graph')) {
    function ctype_graph(mixed $text) : bool
    {
        return p\Ctype::ctype_graph($text);
    }
}
if (!\function_exists('ctype_lower')) {
    function ctype_lower(mixed $text) : bool
    {
        return p\Ctype::ctype_lower($text);
    }
}
if (!\function_exists('ctype_print')) {
    function ctype_print(mixed $text) : bool
    {
        return p\Ctype::ctype_print($text);
    }
}
if (!\function_exists('ctype_punct')) {
    function ctype_punct(mixed $text) : bool
    {
        return p\Ctype::ctype_punct($text);
    }
}
if (!\function_exists('ctype_space')) {
    function ctype_space(mixed $text) : bool
    {
        return p\Ctype::ctype_space($text);
    }
}
if (!\function_exists('ctype_upper')) {
    function ctype_upper(mixed $text) : bool
    {
        return p\Ctype::ctype_upper($text);
    }
}
if (!\function_exists('ctype_xdigit')) {
    function ctype_xdigit(mixed $text) : bool
    {
        return p\Ctype::ctype_xdigit($text);
    }
}
Copyright (c) 2018-2019 Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

namespace _PHPStan_dcc7b7cff;

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
use _PHPStan_dcc7b7cff\Symfony\Polyfill\Ctype as p;
if (\PHP_VERSION_ID >= 80000) {
    return require __DIR__ . '/bootstrap80.php';
}
if (!\function_exists('ctype_alnum')) {
    function ctype_alnum($text)
    {
        return p\Ctype::ctype_alnum($text);
    }
}
if (!\function_exists('ctype_alpha')) {
    function ctype_alpha($text)
    {
        return p\Ctype::ctype_alpha($text);
    }
}
if (!\function_exists('ctype_cntrl')) {
    function ctype_cntrl($text)
    {
        return p\Ctype::ctype_cntrl($text);
    }
}
if (!\function_exists('ctype_digit')) {
    function ctype_digit($text)
    {
        return p\Ctype::ctype_digit($text);
    }
}
if (!\function_exists('ctype_graph')) {
    function ctype_graph($text)
    {
        return p\Ctype::ctype_graph($text);
    }
}
if (!\function_exists('ctype_lower')) {
    function ctype_lower($text)
    {
        return p\Ctype::ctype_lower($text);
    }
}
if (!\function_exists('ctype_print')) {
    function ctype_print($text)
    {
        return p\Ctype::ctype_print($text);
    }
}
if (!\function_exists('ctype_punct')) {
    function ctype_punct($text)
    {
        return p\Ctype::ctype_punct($text);
    }
}
if (!\function_exists('ctype_space')) {
    function ctype_space($text)
    {
        return p\Ctype::ctype_space($text);
    }
}
if (!\function_exists('ctype_upper')) {
    function ctype_upper($text)
    {
        return p\Ctype::ctype_upper($text);
    }
}
if (!\function_exists('ctype_xdigit')) {
    function ctype_xdigit($text)
    {
        return p\Ctype::ctype_xdigit($text);
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Polyfill\Ctype;

/**
 * Ctype implementation through regex.
 *
 * @internal
 *
 * @author Gert de Pagter <BackEndTea@gmail.com>
 */
final class Ctype
{
    /**
     * Returns TRUE if every character in text is either a letter or a digit, FALSE otherwise.
     *
     * @see https://php.net/ctype-alnum
     *
     * @param mixed $text
     *
     * @return bool
     */
    public static function ctype_alnum($text)
    {
        $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
        return \is_string($text) && '' !== $text && !\preg_match('/[^A-Za-z0-9]/', $text);
    }
    /**
     * Returns TRUE if every character in text is a letter, FALSE otherwise.
     *
     * @see https://php.net/ctype-alpha
     *
     * @param mixed $text
     *
     * @return bool
     */
    public static function ctype_alpha($text)
    {
        $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
        return \is_string($text) && '' !== $text && !\preg_match('/[^A-Za-z]/', $text);
    }
    /**
     * Returns TRUE if every character in text is a control character from the current locale, FALSE otherwise.
     *
     * @see https://php.net/ctype-cntrl
     *
     * @param mixed $text
     *
     * @return bool
     */
    public static function ctype_cntrl($text)
    {
        $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
        return \is_string($text) && '' !== $text && !\preg_match('/[^\\x00-\\x1f\\x7f]/', $text);
    }
    /**
     * Returns TRUE if every character in the string text is a decimal digit, FALSE otherwise.
     *
     * @see https://php.net/ctype-digit
     *
     * @param mixed $text
     *
     * @return bool
     */
    public static function ctype_digit($text)
    {
        $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
        return \is_string($text) && '' !== $text && !\preg_match('/[^0-9]/', $text);
    }
    /**
     * Returns TRUE if every character in text is printable and actually creates visible output (no white space), FALSE otherwise.
     *
     * @see https://php.net/ctype-graph
     *
     * @param mixed $text
     *
     * @return bool
     */
    public static function ctype_graph($text)
    {
        $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
        return \is_string($text) && '' !== $text && !\preg_match('/[^!-~]/', $text);
    }
    /**
     * Returns TRUE if every character in text is a lowercase letter.
     *
     * @see https://php.net/ctype-lower
     *
     * @param mixed $text
     *
     * @return bool
     */
    public static function ctype_lower($text)
    {
        $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
        return \is_string($text) && '' !== $text && !\preg_match('/[^a-z]/', $text);
    }
    /**
     * Returns TRUE if every character in text will actually create output (including blanks). Returns FALSE if text contains control characters or characters that do not have any output or control function at all.
     *
     * @see https://php.net/ctype-print
     *
     * @param mixed $text
     *
     * @return bool
     */
    public static function ctype_print($text)
    {
        $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
        return \is_string($text) && '' !== $text && !\preg_match('/[^ -~]/', $text);
    }
    /**
     * Returns TRUE if every character in text is printable, but neither letter, digit or blank, FALSE otherwise.
     *
     * @see https://php.net/ctype-punct
     *
     * @param mixed $text
     *
     * @return bool
     */
    public static function ctype_punct($text)
    {
        $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
        return \is_string($text) && '' !== $text && !\preg_match('/[^!-\\/\\:-@\\[-`\\{-~]/', $text);
    }
    /**
     * Returns TRUE if every character in text creates some sort of white space, FALSE otherwise. Besides the blank character this also includes tab, vertical tab, line feed, carriage return and form feed characters.
     *
     * @see https://php.net/ctype-space
     *
     * @param mixed $text
     *
     * @return bool
     */
    public static function ctype_space($text)
    {
        $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
        return \is_string($text) && '' !== $text && !\preg_match('/[^\\s]/', $text);
    }
    /**
     * Returns TRUE if every character in text is an uppercase letter.
     *
     * @see https://php.net/ctype-upper
     *
     * @param mixed $text
     *
     * @return bool
     */
    public static function ctype_upper($text)
    {
        $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
        return \is_string($text) && '' !== $text && !\preg_match('/[^A-Z]/', $text);
    }
    /**
     * Returns TRUE if every character in text is a hexadecimal 'digit', that is a decimal digit or a character from [A-Fa-f] , FALSE otherwise.
     *
     * @see https://php.net/ctype-xdigit
     *
     * @param mixed $text
     *
     * @return bool
     */
    public static function ctype_xdigit($text)
    {
        $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
        return \is_string($text) && '' !== $text && !\preg_match('/[^A-Fa-f0-9]/', $text);
    }
    /**
     * Converts integers to their char versions according to normal ctype behaviour, if needed.
     *
     * If an integer between -128 and 255 inclusive is provided,
     * it is interpreted as the ASCII value of a single character
     * (negative values have 256 added in order to allow characters in the Extended ASCII range).
     * Any other integer is interpreted as a string containing the decimal digits of the integer.
     *
     * @param mixed  $int
     * @param string $function
     *
     * @return mixed
     */
    private static function convert_int_to_char_for_ctype($int, $function)
    {
        if (!\is_int($int)) {
            return $int;
        }
        if ($int < -128 || $int > 255) {
            return (string) $int;
        }
        if (\PHP_VERSION_ID >= 80100) {
            @\trigger_error($function . '(): Argument of type int will be interpreted as string in the future', \E_USER_DEPRECATED);
        }
        if ($int < 0) {
            $int += 256;
        }
        return \chr($int);
    }
}
Copyright (c) 2019 Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

use Symfony\Polyfill\Php74 as p;

if (\PHP_VERSION_ID >= 70400) {
    return;
}

if (!function_exists('get_mangled_object_vars')) {
    function get_mangled_object_vars($object) { return p\Php74::get_mangled_object_vars($object); }
}
if (!function_exists('mb_str_split') && function_exists('mb_substr')) {
    function mb_str_split($string, $length = 1, $encoding = null) { return p\Php74::mb_str_split($string, $length, $encoding); }
}
if (!function_exists('password_algos')) {
    function password_algos() { return p\Php74::password_algos(); }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Polyfill\Php74;

/**
 * @author Ion Bazan <ion.bazan@gmail.com>
 *
 * @internal
 */
final class Php74
{
    public static function get_mangled_object_vars($obj)
    {
        if (!\is_object($obj)) {
            trigger_error('get_mangled_object_vars() expects parameter 1 to be object, '.\gettype($obj).' given', \E_USER_WARNING);

            return null;
        }

        if ($obj instanceof \ArrayIterator || $obj instanceof \ArrayObject) {
            $reflector = new \ReflectionClass($obj instanceof \ArrayIterator ? 'ArrayIterator' : 'ArrayObject');
            $flags = $reflector->getMethod('getFlags')->invoke($obj);
            $reflector = $reflector->getMethod('setFlags');

            $reflector->invoke($obj, ($flags & \ArrayObject::STD_PROP_LIST) ? 0 : \ArrayObject::STD_PROP_LIST);
            $arr = (array) $obj;
            $reflector->invoke($obj, $flags);
        } else {
            $arr = (array) $obj;
        }

        return array_combine(array_keys($arr), array_values($arr));
    }

    public static function mb_str_split($string, $split_length = 1, $encoding = null)
    {
        if (null !== $string && !\is_scalar($string) && !(\is_object($string) && method_exists($string, '__toString'))) {
            trigger_error('mb_str_split() expects parameter 1 to be string, '.\gettype($string).' given', \E_USER_WARNING);

            return null;
        }

        if (1 > $split_length = (int) $split_length) {
            trigger_error('The length of each segment must be greater than zero', \E_USER_WARNING);

            return false;
        }

        if (null === $encoding) {
            $encoding = mb_internal_encoding();
        }

        if ('UTF-8' === $encoding || \in_array(strtoupper($encoding), ['UTF-8', 'UTF8'], true)) {
            return preg_split("/(.{{$split_length}})/u", $string, -1, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY);
        }

        $result = [];
        $length = mb_strlen($string, $encoding);

        for ($i = 0; $i < $length; $i += $split_length) {
            $result[] = mb_substr($string, $i, $split_length, $encoding);
        }

        return $result;
    }

    public static function password_algos()
    {
        $algos = [];

        if (\defined('PASSWORD_BCRYPT')) {
            $algos[] = \PASSWORD_BCRYPT;
        }

        if (\defined('PASSWORD_ARGON2I')) {
            $algos[] = \PASSWORD_ARGON2I;
        }

        if (\defined('PASSWORD_ARGON2ID')) {
            $algos[] = \PASSWORD_ARGON2ID;
        }

        return $algos;
    }
}
<?php

namespace _PHPStan_dcc7b7cff;

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
if (!\function_exists('_PHPStan_dcc7b7cff\\trigger_deprecation')) {
    /**
     * Triggers a silenced deprecation notice.
     *
     * @param string $package The name of the Composer package that is triggering the deprecation
     * @param string $version The version of the package that introduced the deprecation
     * @param string $message The message of the deprecation
     * @param mixed  ...$args Values to insert in the message using printf() formatting
     *
     * @author Nicolas Grekas <p@tchwork.com>
     */
    function trigger_deprecation(string $package, string $version, string $message, mixed ...$args) : void
    {
        @\trigger_error(($package || $version ? "Since {$package} {$version}: " : '') . ($args ? \vsprintf($message, $args) : $message), \E_USER_DEPRECATED);
    }
}
Copyright (c) 2020-present Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Contracts\Service;

use _PHPStan_dcc7b7cff\Psr\Container\ContainerInterface;
/**
 * A ServiceProviderInterface exposes the identifiers and the types of services provided by a container.
 *
 * @author Nicolas Grekas <p@tchwork.com>
 * @author Mateusz Sip <mateusz.sip@gmail.com>
 */
interface ServiceProviderInterface extends ContainerInterface
{
    /**
     * Returns an associative array of service types keyed by the identifiers provided by the current container.
     *
     * Examples:
     *
     *  * ['logger' => 'Psr\Log\LoggerInterface'] means the object provides a service named "logger" that implements Psr\Log\LoggerInterface
     *  * ['foo' => '?'] means the container provides service name "foo" of unspecified type
     *  * ['bar' => '?Bar\Baz'] means the container provides a service "bar" of type Bar\Baz|null
     *
     * @return string[] The provided service types, keyed by service names
     */
    public function getProvidedServices() : array;
}
Copyright (c) 2018-2022 Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Contracts\Service\Attribute;

use _PHPStan_dcc7b7cff\Symfony\Contracts\Service\ServiceSubscriberTrait;
/**
 * Use with {@see ServiceSubscriberTrait} to mark a method's return type
 * as a subscribed service.
 *
 * @author Kevin Bond <kevinbond@gmail.com>
 */
#[\Attribute(\Attribute::TARGET_METHOD)]
final class SubscribedService
{
    /**
     * @param string|null $key The key to use for the service
     *                         If null, use "ClassName::methodName"
     */
    public function __construct(public ?string $key = null)
    {
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Contracts\Service\Attribute;

/**
 * A required dependency.
 *
 * This attribute indicates that a property holds a required dependency. The annotated property or method should be
 * considered during the instantiation process of the containing class.
 *
 * @author Alexander M. Turek <me@derrabus.de>
 */
#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)]
final class Required
{
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Contracts\Service;

/**
 * Provides a way to reset an object to its initial state.
 *
 * When calling the "reset()" method on an object, it should be put back to its
 * initial state. This usually means clearing any internal buffers and forwarding
 * the call to internal dependencies. All properties of the object should be put
 * back to the same state it had when it was first ready to use.
 *
 * This method could be called, for example, to recycle objects that are used as
 * services, so that they can be used to handle several requests in the same
 * process loop (note that we advise making your services stateless instead of
 * implementing this interface when possible.)
 */
interface ResetInterface
{
    public function reset();
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Contracts\Service;

/**
 * A ServiceSubscriber exposes its dependencies via the static {@link getSubscribedServices} method.
 *
 * The getSubscribedServices method returns an array of service types required by such instances,
 * optionally keyed by the service names used internally. Service types that start with an interrogation
 * mark "?" are optional, while the other ones are mandatory service dependencies.
 *
 * The injected service locators SHOULD NOT allow access to any other services not specified by the method.
 *
 * It is expected that ServiceSubscriber instances consume PSR-11-based service locators internally.
 * This interface does not dictate any injection method for these service locators, although constructor
 * injection is recommended.
 *
 * @author Nicolas Grekas <p@tchwork.com>
 */
interface ServiceSubscriberInterface
{
    /**
     * Returns an array of service types required by such instances, optionally keyed by the service names used internally.
     *
     * For mandatory dependencies:
     *
     *  * ['logger' => 'Psr\Log\LoggerInterface'] means the objects use the "logger" name
     *    internally to fetch a service which must implement Psr\Log\LoggerInterface.
     *  * ['loggers' => 'Psr\Log\LoggerInterface[]'] means the objects use the "loggers" name
     *    internally to fetch an iterable of Psr\Log\LoggerInterface instances.
     *  * ['Psr\Log\LoggerInterface'] is a shortcut for
     *  * ['Psr\Log\LoggerInterface' => 'Psr\Log\LoggerInterface']
     *
     * otherwise:
     *
     *  * ['logger' => '?Psr\Log\LoggerInterface'] denotes an optional dependency
     *  * ['loggers' => '?Psr\Log\LoggerInterface[]'] denotes an optional iterable dependency
     *  * ['?Psr\Log\LoggerInterface'] is a shortcut for
     *  * ['Psr\Log\LoggerInterface' => '?Psr\Log\LoggerInterface']
     *
     * @return string[] The required service types, optionally keyed by service names
     */
    public static function getSubscribedServices();
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Contracts\Service;

use _PHPStan_dcc7b7cff\Psr\Container\ContainerInterface;
use _PHPStan_dcc7b7cff\Symfony\Contracts\Service\Attribute\SubscribedService;
/**
 * Implementation of ServiceSubscriberInterface that determines subscribed services from
 * method return types. Service ids are available as "ClassName::methodName".
 *
 * @author Kevin Bond <kevinbond@gmail.com>
 */
trait ServiceSubscriberTrait
{
    /** @var ContainerInterface */
    protected $container;
    /**
     * {@inheritdoc}
     */
    public static function getSubscribedServices() : array
    {
        $services = \method_exists(\get_parent_class(self::class) ?: '', __FUNCTION__) ? parent::getSubscribedServices() : [];
        $attributeOptIn = \false;
        if (\PHP_VERSION_ID >= 80000) {
            foreach ((new \ReflectionClass(self::class))->getMethods() as $method) {
                if (self::class !== $method->getDeclaringClass()->name) {
                    continue;
                }
                if (!($attribute = $method->getAttributes(SubscribedService::class)[0] ?? null)) {
                    continue;
                }
                if ($method->isStatic() || $method->isAbstract() || $method->isGenerator() || $method->isInternal() || $method->getNumberOfRequiredParameters()) {
                    throw new \LogicException(\sprintf('Cannot use "%s" on method "%s::%s()" (can only be used on non-static, non-abstract methods with no parameters).', SubscribedService::class, self::class, $method->name));
                }
                if (!($returnType = $method->getReturnType())) {
                    throw new \LogicException(\sprintf('Cannot use "%s" on methods without a return type in "%s::%s()".', SubscribedService::class, $method->name, self::class));
                }
                $serviceId = $returnType instanceof \ReflectionNamedType ? $returnType->getName() : (string) $returnType;
                if ($returnType->allowsNull()) {
                    $serviceId = '?' . $serviceId;
                }
                $services[$attribute->newInstance()->key ?? self::class . '::' . $method->name] = $serviceId;
                $attributeOptIn = \true;
            }
        }
        if (!$attributeOptIn) {
            foreach ((new \ReflectionClass(self::class))->getMethods() as $method) {
                if ($method->isStatic() || $method->isAbstract() || $method->isGenerator() || $method->isInternal() || $method->getNumberOfRequiredParameters()) {
                    continue;
                }
                if (self::class !== $method->getDeclaringClass()->name) {
                    continue;
                }
                if (!($returnType = $method->getReturnType()) instanceof \ReflectionNamedType) {
                    continue;
                }
                if ($returnType->isBuiltin()) {
                    continue;
                }
                if (\PHP_VERSION_ID >= 80000) {
                    trigger_deprecation('symfony/service-contracts', '2.5', 'Using "%s" in "%s" without using the "%s" attribute on any method is deprecated.', ServiceSubscriberTrait::class, self::class, SubscribedService::class);
                }
                $services[self::class . '::' . $method->name] = '?' . ($returnType instanceof \ReflectionNamedType ? $returnType->getName() : $returnType);
            }
        }
        return $services;
    }
    /**
     * @required
     *
     * @return ContainerInterface|null
     */
    public function setContainer(ContainerInterface $container)
    {
        $this->container = $container;
        if (\method_exists(\get_parent_class(self::class) ?: '', __FUNCTION__)) {
            return parent::setContainer($container);
        }
        return null;
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Symfony\Contracts\Service;

use _PHPStan_dcc7b7cff\Psr\Container\ContainerExceptionInterface;
use _PHPStan_dcc7b7cff\Psr\Container\NotFoundExceptionInterface;
// Help opcache.preload discover always-needed symbols
\class_exists(ContainerExceptionInterface::class);
\class_exists(NotFoundExceptionInterface::class);
/**
 * A trait to help implement ServiceProviderInterface.
 *
 * @author Robin Chalas <robin.chalas@gmail.com>
 * @author Nicolas Grekas <p@tchwork.com>
 */
trait ServiceLocatorTrait
{
    private $factories;
    private $loading = [];
    private $providedTypes;
    /**
     * @param callable[] $factories
     */
    public function __construct(array $factories)
    {
        $this->factories = $factories;
    }
    /**
     * {@inheritdoc}
     *
     * @return bool
     */
    public function has(string $id)
    {
        return isset($this->factories[$id]);
    }
    /**
     * {@inheritdoc}
     *
     * @return mixed
     */
    public function get(string $id)
    {
        if (!isset($this->factories[$id])) {
            throw $this->createNotFoundException($id);
        }
        if (isset($this->loading[$id])) {
            $ids = \array_values($this->loading);
            $ids = \array_slice($this->loading, \array_search($id, $ids));
            $ids[] = $id;
            throw $this->createCircularReferenceException($id, $ids);
        }
        $this->loading[$id] = $id;
        try {
            return $this->factories[$id]($this);
        } finally {
            unset($this->loading[$id]);
        }
    }
    /**
     * {@inheritdoc}
     */
    public function getProvidedServices() : array
    {
        if (null === $this->providedTypes) {
            $this->providedTypes = [];
            foreach ($this->factories as $name => $factory) {
                if (!\is_callable($factory)) {
                    $this->providedTypes[$name] = '?';
                } else {
                    $type = (new \ReflectionFunction($factory))->getReturnType();
                    $this->providedTypes[$name] = $type ? ($type->allowsNull() ? '?' : '') . ($type instanceof \ReflectionNamedType ? $type->getName() : $type) : '?';
                }
            }
        }
        return $this->providedTypes;
    }
    private function createNotFoundException(string $id) : NotFoundExceptionInterface
    {
        if (!($alternatives = \array_keys($this->factories))) {
            $message = 'is empty...';
        } else {
            $last = \array_pop($alternatives);
            if ($alternatives) {
                $message = \sprintf('only knows about the "%s" and "%s" services.', \implode('", "', $alternatives), $last);
            } else {
                $message = \sprintf('only knows about the "%s" service.', $last);
            }
        }
        if ($this->loading) {
            $message = \sprintf('The service "%s" has a dependency on a non-existent service "%s". This locator %s', \end($this->loading), $id, $message);
        } else {
            $message = \sprintf('Service "%s" not found: the current service locator %s', $id, $message);
        }
        return new class($message) extends \InvalidArgumentException implements NotFoundExceptionInterface
        {
        };
    }
    private function createCircularReferenceException(string $id, array $path) : ContainerExceptionInterface
    {
        return new class(\sprintf('Circular reference detected for service "%s", path: "%s".', $id, \implode(' -> ', $path))) extends \RuntimeException implements ContainerExceptionInterface
        {
        };
    }
}
Copyright (c) 2018-2019 Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

use Symfony\Polyfill\Php73 as p;

if (\PHP_VERSION_ID >= 70300) {
    return;
}

if (!function_exists('is_countable')) {
    function is_countable($value) { return is_array($value) || $value instanceof Countable || $value instanceof ResourceBundle || $value instanceof SimpleXmlElement; }
}
if (!function_exists('hrtime')) {
    require_once __DIR__.'/Php73.php';
    p\Php73::$startAt = (int) microtime(true);
    function hrtime($as_number = false) { return p\Php73::hrtime($as_number); }
}
if (!function_exists('array_key_first')) {
    function array_key_first(array $array) { foreach ($array as $key => $value) { return $key; } }
}
if (!function_exists('array_key_last')) {
    function array_key_last(array $array) { return key(array_slice($array, -1, 1, true)); }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Polyfill\Php73;

/**
 * @author Gabriel Caruso <carusogabriel34@gmail.com>
 * @author Ion Bazan <ion.bazan@gmail.com>
 *
 * @internal
 */
final class Php73
{
    public static $startAt = 1533462603;

    /**
     * @param bool $asNum
     *
     * @return array|float|int
     */
    public static function hrtime($asNum = false)
    {
        $ns = microtime(false);
        $s = substr($ns, 11) - self::$startAt;
        $ns = 1E9 * (float) $ns;

        if ($asNum) {
            $ns += $s * 1E9;

            return \PHP_INT_SIZE === 4 ? $ns : (int) $ns;
        }

        return [$s, (int) $ns];
    }
}
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

if (\PHP_VERSION_ID < 70300) {
    class JsonException extends Exception
    {
    }
}
<?php

/*
 * This file is part of composer/ca-bundle.
 *
 * (c) Composer <https://github.com/composer>
 *
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Composer\CaBundle;

use _PHPStan_dcc7b7cff\Psr\Log\LoggerInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Process\PhpProcess;
/**
 * @author Chris Smith <chris@cs278.org>
 * @author Jordi Boggiano <j.boggiano@seld.be>
 */
class CaBundle
{
    /** @var string|null */
    private static $caPath;
    /** @var array<string, bool> */
    private static $caFileValidity = array();
    /** @var bool|null */
    private static $useOpensslParse;
    /**
     * Returns the system CA bundle path, or a path to the bundled one
     *
     * This method was adapted from Sslurp.
     * https://github.com/EvanDotPro/Sslurp
     *
     * (c) Evan Coury <me@evancoury.com>
     *
     * For the full copyright and license information, please see below:
     *
     * Copyright (c) 2013, Evan Coury
     * All rights reserved.
     *
     * Redistribution and use in source and binary forms, with or without modification,
     * are permitted provided that the following conditions are met:
     *
     *     * Redistributions of source code must retain the above copyright notice,
     *       this list of conditions and the following disclaimer.
     *
     *     * Redistributions in binary form must reproduce the above copyright notice,
     *       this list of conditions and the following disclaimer in the documentation
     *       and/or other materials provided with the distribution.
     *
     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
     * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
     * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
     * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
     * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
     * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
     * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
     * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
     * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     *
     * @param  LoggerInterface $logger optional logger for information about which CA files were loaded
     * @return string          path to a CA bundle file or directory
     */
    public static function getSystemCaRootBundlePath(LoggerInterface $logger = null)
    {
        if (self::$caPath !== null) {
            return self::$caPath;
        }
        $caBundlePaths = array();
        // If SSL_CERT_FILE env variable points to a valid certificate/bundle, use that.
        // This mimics how OpenSSL uses the SSL_CERT_FILE env variable.
        $caBundlePaths[] = self::getEnvVariable('SSL_CERT_FILE');
        // If SSL_CERT_DIR env variable points to a valid certificate/bundle, use that.
        // This mimics how OpenSSL uses the SSL_CERT_FILE env variable.
        $caBundlePaths[] = self::getEnvVariable('SSL_CERT_DIR');
        $caBundlePaths[] = \ini_get('openssl.cafile');
        $caBundlePaths[] = \ini_get('openssl.capath');
        $otherLocations = array(
            '/etc/pki/tls/certs/ca-bundle.crt',
            // Fedora, RHEL, CentOS (ca-certificates package)
            '/etc/ssl/certs/ca-certificates.crt',
            // Debian, Ubuntu, Gentoo, Arch Linux (ca-certificates package)
            '/etc/ssl/ca-bundle.pem',
            // SUSE, openSUSE (ca-certificates package)
            '/usr/local/share/certs/ca-root-nss.crt',
            // FreeBSD (ca_root_nss_package)
            '/usr/ssl/certs/ca-bundle.crt',
            // Cygwin
            '/opt/local/share/curl/curl-ca-bundle.crt',
            // OS X macports, curl-ca-bundle package
            '/usr/local/share/curl/curl-ca-bundle.crt',
            // Default cURL CA bunde path (without --with-ca-bundle option)
            '/usr/share/ssl/certs/ca-bundle.crt',
            // Really old RedHat?
            '/etc/ssl/cert.pem',
            // OpenBSD
            '/usr/local/etc/ssl/cert.pem',
            // FreeBSD 10.x
            '/usr/local/etc/openssl/cert.pem',
            // OS X homebrew, openssl package
            '/usr/local/etc/openssl@1.1/cert.pem',
        );
        foreach ($otherLocations as $location) {
            $otherLocations[] = \dirname($location);
        }
        $caBundlePaths = \array_merge($caBundlePaths, $otherLocations);
        foreach ($caBundlePaths as $caBundle) {
            if ($caBundle && self::caFileUsable($caBundle, $logger)) {
                return self::$caPath = $caBundle;
            }
            if ($caBundle && self::caDirUsable($caBundle, $logger)) {
                return self::$caPath = $caBundle;
            }
        }
        return self::$caPath = static::getBundledCaBundlePath();
        // Bundled CA file, last resort
    }
    /**
     * Returns the path to the bundled CA file
     *
     * In case you don't want to trust the user or the system, you can use this directly
     *
     * @return string path to a CA bundle file
     */
    public static function getBundledCaBundlePath()
    {
        $caBundleFile = __DIR__ . '/../res/cacert.pem';
        // cURL does not understand 'phar://' paths
        // see https://github.com/composer/ca-bundle/issues/10
        if (0 === \strpos($caBundleFile, 'phar://')) {
            $tempCaBundleFile = \tempnam(\sys_get_temp_dir(), 'openssl-ca-bundle-');
            if (\false === $tempCaBundleFile) {
                throw new \RuntimeException('Could not create a temporary file to store the bundled CA file');
            }
            \file_put_contents($tempCaBundleFile, \file_get_contents($caBundleFile));
            \register_shutdown_function(function () use($tempCaBundleFile) {
                @\unlink($tempCaBundleFile);
            });
            $caBundleFile = $tempCaBundleFile;
        }
        return $caBundleFile;
    }
    /**
     * Validates a CA file using opensl_x509_parse only if it is safe to use
     *
     * @param string          $filename
     * @param LoggerInterface $logger   optional logger for information about which CA files were loaded
     *
     * @return bool
     */
    public static function validateCaFile($filename, LoggerInterface $logger = null)
    {
        static $warned = \false;
        if (isset(self::$caFileValidity[$filename])) {
            return self::$caFileValidity[$filename];
        }
        $contents = \file_get_contents($filename);
        // assume the CA is valid if php is vulnerable to
        // https://www.sektioneins.de/advisories/advisory-012013-php-openssl_x509_parse-memory-corruption-vulnerability.html
        if (!static::isOpensslParseSafe()) {
            if (!$warned && $logger) {
                $logger->warning(\sprintf('Your version of PHP, %s, is affected by CVE-2013-6420 and cannot safely perform certificate validation, we strongly suggest you upgrade.', \PHP_VERSION));
                $warned = \true;
            }
            $isValid = !empty($contents);
        } elseif (\is_string($contents) && \strlen($contents) > 0) {
            $contents = \preg_replace("/^(\\-+(?:BEGIN|END))\\s+TRUSTED\\s+(CERTIFICATE\\-+)\$/m", '$1 $2', $contents);
            if (null === $contents) {
                // regex extraction failed
                $isValid = \false;
            } else {
                $isValid = (bool) \openssl_x509_parse($contents);
            }
        } else {
            $isValid = \false;
        }
        if ($logger) {
            $logger->debug('Checked CA file ' . \realpath($filename) . ': ' . ($isValid ? 'valid' : 'invalid'));
        }
        return self::$caFileValidity[$filename] = $isValid;
    }
    /**
     * Test if it is safe to use the PHP function openssl_x509_parse().
     *
     * This checks if OpenSSL extensions is vulnerable to remote code execution
     * via the exploit documented as CVE-2013-6420.
     *
     * @return bool
     */
    public static function isOpensslParseSafe()
    {
        if (null !== self::$useOpensslParse) {
            return self::$useOpensslParse;
        }
        if (\PHP_VERSION_ID >= 50600) {
            return self::$useOpensslParse = \true;
        }
        // Vulnerable:
        // PHP 5.3.0 - PHP 5.3.27
        // PHP 5.4.0 - PHP 5.4.22
        // PHP 5.5.0 - PHP 5.5.6
        if (\PHP_VERSION_ID < 50400 && \PHP_VERSION_ID >= 50328 || \PHP_VERSION_ID < 50500 && \PHP_VERSION_ID >= 50423 || \PHP_VERSION_ID >= 50507) {
            // This version of PHP has the fix for CVE-2013-6420 applied.
            return self::$useOpensslParse = \true;
        }
        if (\defined('PHP_WINDOWS_VERSION_BUILD')) {
            // Windows is probably insecure in this case.
            return self::$useOpensslParse = \false;
        }
        $compareDistroVersionPrefix = function ($prefix, $fixedVersion) {
            $regex = '{^' . \preg_quote($prefix) . '([0-9]+)$}';
            if (\preg_match($regex, \PHP_VERSION, $m)) {
                return (int) $m[1] >= $fixedVersion;
            }
            return \false;
        };
        // Hard coded list of PHP distributions with the fix backported.
        if ($compareDistroVersionPrefix('5.3.3-7+squeeze', 18) || $compareDistroVersionPrefix('5.4.4-14+deb7u', 7) || $compareDistroVersionPrefix('5.3.10-1ubuntu3.', 9)) {
            return self::$useOpensslParse = \true;
        }
        // Symfony Process component is missing so we assume it is unsafe at this point
        if (!\class_exists('_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\PhpProcess')) {
            return self::$useOpensslParse = \false;
        }
        // This is where things get crazy, because distros backport security
        // fixes the chances are on NIX systems the fix has been applied but
        // it's not possible to verify that from the PHP version.
        //
        // To verify exec a new PHP process and run the issue testcase with
        // known safe input that replicates the bug.
        // Based on testcase in https://github.com/php/php-src/commit/c1224573c773b6845e83505f717fbf820fc18415
        // changes in https://github.com/php/php-src/commit/76a7fd893b7d6101300cc656058704a73254d593
        $cert = 'LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUVwRENDQTR5Z0F3SUJBZ0lKQUp6dThyNnU2ZUJjTUEwR0NTcUdTSWIzRFFFQkJRVUFNSUhETVFzd0NRWUQKVlFRR0V3SkVSVEVjTUJvR0ExVUVDQXdUVG05eVpISm9aV2x1TFZkbGMzUm1ZV3hsYmpFUU1BNEdBMVVFQnd3SApTOE9Ed3Jac2JqRVVNQklHQTFVRUNnd0xVMlZyZEdsdmJrVnBibk14SHpBZEJnTlZCQXNNRmsxaGJHbGphVzkxCmN5QkRaWEowSUZObFkzUnBiMjR4SVRBZkJnTlZCQU1NR0cxaGJHbGphVzkxY3k1elpXdDBhVzl1WldsdWN5NWsKWlRFcU1DZ0dDU3FHU0liM0RRRUpBUlliYzNSbFptRnVMbVZ6YzJWeVFITmxhM1JwYjI1bGFXNXpMbVJsTUhVWQpaREU1TnpBd01UQXhNREF3TURBd1dnQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBCkFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUEKQUFBQUFBQVhEVEUwTVRFeU9ERXhNemt6TlZvd2djTXhDekFKQmdOVkJBWVRBa1JGTVJ3d0dnWURWUVFJREJOTwpiM0prY21obGFXNHRWMlZ6ZEdaaGJHVnVNUkF3RGdZRFZRUUhEQWRMdzRQQ3RteHVNUlF3RWdZRFZRUUtEQXRUClpXdDBhVzl1UldsdWN6RWZNQjBHQTFVRUN3d1dUV0ZzYVdOcGIzVnpJRU5sY25RZ1UyVmpkR2x2YmpFaE1COEcKQTFVRUF3d1liV0ZzYVdOcGIzVnpMbk5sYTNScGIyNWxhVzV6TG1SbE1Tb3dLQVlKS29aSWh2Y05BUWtCRmh0egpkR1ZtWVc0dVpYTnpaWEpBYzJWcmRHbHZibVZwYm5NdVpHVXdnZ0VpTUEwR0NTcUdTSWIzRFFFQkFRVUFBNElCCkR3QXdnZ0VLQW9JQkFRRERBZjNobDdKWTBYY0ZuaXlFSnBTU0RxbjBPcUJyNlFQNjV1c0pQUnQvOFBhRG9xQnUKd0VZVC9OYSs2ZnNnUGpDMHVLOURaZ1dnMnRIV1dvYW5TYmxBTW96NVBINlorUzRTSFJaN2UyZERJalBqZGhqaAowbUxnMlVNTzV5cDBWNzk3R2dzOWxOdDZKUmZIODFNTjJvYlhXczROdHp0TE11RDZlZ3FwcjhkRGJyMzRhT3M4CnBrZHVpNVVhd1Raa3N5NXBMUEhxNWNNaEZHbTA2djY1Q0xvMFYyUGQ5K0tBb2tQclBjTjVLTEtlYno3bUxwazYKU01lRVhPS1A0aWRFcXh5UTdPN2ZCdUhNZWRzUWh1K3ByWTNzaTNCVXlLZlF0UDVDWm5YMmJwMHdLSHhYMTJEWAoxbmZGSXQ5RGJHdkhUY3lPdU4rblpMUEJtM3ZXeG50eUlJdlZBZ01CQUFHalFqQkFNQWtHQTFVZEV3UUNNQUF3CkVRWUpZSVpJQVliNFFnRUJCQVFEQWdlQU1Bc0dBMVVkRHdRRUF3SUZvREFUQmdOVkhTVUVEREFLQmdnckJnRUYKQlFjREFqQU5CZ2txaGtpRzl3MEJBUVVGQUFPQ0FRRUFHMGZaWVlDVGJkajFYWWMrMVNub2FQUit2SThDOENhRAo4KzBVWWhkbnlVNGdnYTBCQWNEclk5ZTk0ZUVBdTZacXljRjZGakxxWFhkQWJvcHBXb2NyNlQ2R0QxeDMzQ2tsClZBcnpHL0t4UW9oR0QySmVxa2hJTWxEb214SE83a2EzOStPYThpMnZXTFZ5alU4QVp2V01BcnVIYTRFRU55RzcKbFcyQWFnYUZLRkNyOVRuWFRmcmR4R1ZFYnY3S1ZRNmJkaGc1cDVTanBXSDErTXEwM3VSM1pYUEJZZHlWODMxOQpvMGxWajFLRkkyRENML2xpV2lzSlJvb2YrMWNSMzVDdGQwd1lCY3BCNlRac2xNY09QbDc2ZHdLd0pnZUpvMlFnClpzZm1jMnZDMS9xT2xOdU5xLzBUenprVkd2OEVUVDNDZ2FVK1VYZTRYT1Z2a2NjZWJKbjJkZz09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K';
        $script = <<<'EOT'

error_reporting(-1);
$info = openssl_x509_parse(base64_decode('%s'));
var_dump(PHP_VERSION, $info['issuer']['emailAddress'], $info['validFrom_time_t']);

EOT;
        $script = '<' . "?php\n" . \sprintf($script, $cert);
        try {
            $process = new PhpProcess($script);
            $process->mustRun();
        } catch (\Exception $e) {
            // In the case of any exceptions just accept it is not possible to
            // determine the safety of openssl_x509_parse and bail out.
            return self::$useOpensslParse = \false;
        }
        $output = \preg_split('{\\r?\\n}', \trim($process->getOutput()));
        $errorOutput = \trim($process->getErrorOutput());
        if (\is_array($output) && \count($output) === 3 && $output[0] === \sprintf('string(%d) "%s"', \strlen(\PHP_VERSION), \PHP_VERSION) && $output[1] === 'string(27) "stefan.esser@sektioneins.de"' && $output[2] === 'int(-1)' && \preg_match('{openssl_x509_parse\\(\\): illegal (?:ASN1 data type for|length in) timestamp in - on line \\d+}', $errorOutput)) {
            // This PHP has the fix backported probably by a distro security team.
            return self::$useOpensslParse = \true;
        }
        return self::$useOpensslParse = \false;
    }
    /**
     * Resets the static caches
     * @return void
     */
    public static function reset()
    {
        self::$caFileValidity = array();
        self::$caPath = null;
        self::$useOpensslParse = null;
    }
    /**
     * @param  string $name
     * @return string|false
     */
    private static function getEnvVariable($name)
    {
        if (isset($_SERVER[$name])) {
            return (string) $_SERVER[$name];
        }
        if (\PHP_SAPI === 'cli' && ($value = \getenv($name)) !== \false && $value !== null) {
            return (string) $value;
        }
        return \false;
    }
    /**
     * @param  string|false $certFile
     * @param  LoggerInterface|null $logger
     * @return bool
     */
    private static function caFileUsable($certFile, LoggerInterface $logger = null)
    {
        return $certFile && static::isFile($certFile, $logger) && static::isReadable($certFile, $logger) && static::validateCaFile($certFile, $logger);
    }
    /**
     * @param  string|false $certDir
     * @param  LoggerInterface|null $logger
     * @return bool
     */
    private static function caDirUsable($certDir, LoggerInterface $logger = null)
    {
        return $certDir && static::isDir($certDir, $logger) && static::isReadable($certDir, $logger) && static::glob($certDir . '/*', $logger);
    }
    /**
     * @param  string $certFile
     * @param  LoggerInterface|null $logger
     * @return bool
     */
    private static function isFile($certFile, LoggerInterface $logger = null)
    {
        $isFile = @\is_file($certFile);
        if (!$isFile && $logger) {
            $logger->debug(\sprintf('Checked CA file %s does not exist or it is not a file.', $certFile));
        }
        return $isFile;
    }
    /**
     * @param  string $certDir
     * @param  LoggerInterface|null $logger
     * @return bool
     */
    private static function isDir($certDir, LoggerInterface $logger = null)
    {
        $isDir = @\is_dir($certDir);
        if (!$isDir && $logger) {
            $logger->debug(\sprintf('Checked directory %s does not exist or it is not a directory.', $certDir));
        }
        return $isDir;
    }
    /**
     * @param  string $certFileOrDir
     * @param  LoggerInterface|null $logger
     * @return bool
     */
    private static function isReadable($certFileOrDir, LoggerInterface $logger = null)
    {
        $isReadable = @\is_readable($certFileOrDir);
        if (!$isReadable && $logger) {
            $logger->debug(\sprintf('Checked file or directory %s is not readable.', $certFileOrDir));
        }
        return $isReadable;
    }
    /**
     * @param  string $pattern
     * @param  LoggerInterface|null $logger
     * @return bool
     */
    private static function glob($pattern, LoggerInterface $logger = null)
    {
        $certs = \glob($pattern);
        if ($certs === \false) {
            if ($logger) {
                $logger->debug(\sprintf("An error occurred while trying to find certificates for pattern: %s", $pattern));
            }
            return \false;
        }
        if (\count($certs) === 0) {
            if ($logger) {
                $logger->debug(\sprintf("No CA files found for pattern: %s", $pattern));
            }
            return \false;
        }
        return \true;
    }
}
##
## Bundle of CA Root Certificates
##
## Certificate data from Mozilla as of: Tue Jan 10 04:12:06 2023 GMT
##
## This is a bundle of X.509 certificates of public Certificate Authorities
## (CA). These were automatically extracted from Mozilla's root certificates
## file (certdata.txt).  This file can be found in the mozilla source tree:
## https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt
##
## It contains the certificates in PEM format and therefore
## can be directly used with curl / libcurl / php_curl, or with
## an Apache+mod_ssl webserver for SSL client authentication.
## Just configure this file as the SSLCACertificateFile.
##
## Conversion done with mk-ca-bundle.pl version 1.29.
## SHA256: 90c470e705b4b5f36f09684dc50e2b79c8b86989a848b62cd1a7bd6460ee65f6
##


GlobalSign Root CA
==================
-----BEGIN CERTIFICATE-----
MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkGA1UEBhMCQkUx
GTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jvb3QgQ0ExGzAZBgNVBAMTEkds
b2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAwMDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNV
BAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYD
VQQDExJHbG9iYWxTaWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDa
DuaZjc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavpxy0Sy6sc
THAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp1Wrjsok6Vjk4bwY8iGlb
Kk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdGsnUOhugZitVtbNV4FpWi6cgKOOvyJBNP
c1STE4U6G7weNLWLBYy5d4ux2x8gkasJU26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrX
gzT/LCrBbBlDSgeF59N89iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV
HRMBAf8EBTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0BAQUF
AAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOzyj1hTdNGCbM+w6Dj
Y1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE38NflNUVyRRBnMRddWQVDf9VMOyG
j/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymPAbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhH
hm4qxFYxldBniYUr+WymXUadDKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveC
X4XSQRjbgbMEHMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A==
-----END CERTIFICATE-----

Entrust.net Premium 2048 Secure Server CA
=========================================
-----BEGIN CERTIFICATE-----
MIIEKjCCAxKgAwIBAgIEOGPe+DANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChMLRW50cnVzdC5u
ZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBpbmNvcnAuIGJ5IHJlZi4gKGxp
bWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNV
BAMTKkVudHJ1c3QubmV0IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQx
NzUwNTFaFw0yOTA3MjQxNDE1MTJaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3
d3d3LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTEl
MCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEGA1UEAxMqRW50cnVzdC5u
ZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgpMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
MIIBCgKCAQEArU1LqRKGsuqjIAcVFmQqK0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOL
Gp18EzoOH1u3Hs/lJBQesYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSr
hRSGlVuXMlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVTXTzW
nLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/HoZdenoVve8AjhUi
VBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH4QIDAQABo0IwQDAOBgNVHQ8BAf8E
BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUVeSB0RGAvtiJuQijMfmhJAkWuXAwDQYJ
KoZIhvcNAQEFBQADggEBADubj1abMOdTmXx6eadNl9cZlZD7Bh/KM3xGY4+WZiT6QBshJ8rmcnPy
T/4xmf3IDExoU8aAghOY+rat2l098c5u9hURlIIM7j+VrxGrD9cv3h8Dj1csHsm7mhpElesYT6Yf
zX1XEC+bBAlahLVu2B064dae0Wx5XnkcFMXj0EyTO2U87d89vqbllRrDtRnDvV5bu/8j72gZyxKT
J1wDLW8w0B62GqzeWvfRqqgnpv55gcR5mTNXuhKwqeBCbJPKVt7+bYQLCIt+jerXmCHG8+c8eS9e
nNFMFY3h7CI3zJpDC5fcgJCNs2ebb0gIFVbPv/ErfF6adulZkMV8gzURZVE=
-----END CERTIFICATE-----

Baltimore CyberTrust Root
=========================
-----BEGIN CERTIFICATE-----
MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJRTESMBAGA1UE
ChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlCYWx0aW1vcmUgQ3li
ZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoXDTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMC
SUUxEjAQBgNVBAoTCUJhbHRpbW9yZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFs
dGltb3JlIEN5YmVyVHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKME
uyKrmD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjrIZ3AQSsB
UnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeKmpYcqWe4PwzV9/lSEy/C
G9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSuXmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9
XbIGevOF6uvUA65ehD5f/xXtabz5OTZydc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjpr
l3RjM71oGDHweI12v/yejl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoI
VDaGezq1BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEB
BQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT929hkTI7gQCvlYpNRh
cL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3WgxjkzSswF07r51XgdIGn9w/xZchMB5
hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsa
Y71k5h+3zvDyny67G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9H
RCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp
-----END CERTIFICATE-----

Entrust Root Certification Authority
====================================
-----BEGIN CERTIFICATE-----
MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMCVVMxFjAUBgNV
BAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0Lm5ldC9DUFMgaXMgaW5jb3Jw
b3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMWKGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsG
A1UEAxMkRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0
MloXDTI2MTEyNzIwNTM0MlowgbAxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMu
MTkwNwYDVQQLEzB3d3cuZW50cnVzdC5uZXQvQ1BTIGlzIGluY29ycG9yYXRlZCBieSByZWZlcmVu
Y2UxHzAdBgNVBAsTFihjKSAyMDA2IEVudHJ1c3QsIEluYy4xLTArBgNVBAMTJEVudHJ1c3QgUm9v
dCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
ALaVtkNC+sZtKm9I35RMOVcF7sN5EUFoNu3s/poBj6E4KPz3EEZmLk0eGrEaTsbRwJWIsMn/MYsz
A9u3g3s+IIRe7bJWKKf44LlAcTfFy0cOlypowCKVYhXbR9n10Cv/gkvJrT7eTNuQgFA/CYqEAOww
Cj0Yzfv9KlmaI5UXLEWeH25DeW0MXJj+SKfFI0dcXv1u5x609mhF0YaDW6KKjbHjKYD+JXGIrb68
j6xSlkuqUY3kEzEZ6E5Nn9uss2rVvDlUccp6en+Q3X0dgNmBu1kmwhH+5pPi94DkZfs0Nw4pgHBN
rziGLp5/V6+eF67rHMsoIV+2HNjnogQi+dPa2MsCAwEAAaOBsDCBrTAOBgNVHQ8BAf8EBAMCAQYw
DwYDVR0TAQH/BAUwAwEB/zArBgNVHRAEJDAigA8yMDA2MTEyNzIwMjM0MlqBDzIwMjYxMTI3MjA1
MzQyWjAfBgNVHSMEGDAWgBRokORnpKZTgMeGZqTx90tD+4S9bTAdBgNVHQ4EFgQUaJDkZ6SmU4DH
hmak8fdLQ/uEvW0wHQYJKoZIhvZ9B0EABBAwDhsIVjcuMTo0LjADAgSQMA0GCSqGSIb3DQEBBQUA
A4IBAQCT1DCw1wMgKtD5Y+iRDAUgqV8ZyntyTtSx29CW+1RaGSwMCPeyvIWonX9tO1KzKtvn1ISM
Y/YPyyYBkVBs9F8U4pN0wBOeMDpQ47RgxRzwIkSNcUesyBrJ6ZuaAGAT/3B+XxFNSRuzFVJ7yVTa
v52Vr2ua2J7p8eRDjeIRRDq/r72DQnNSi6q7pynP9WQcCk3RvKqsnyrQ/39/2n3qse0wJcGE2jTS
W3iDVuycNsMm4hH2Z0kdkquM++v/eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0
tHuu2guQOHXvgR1m0vdXcDazv/wor3ElhVsT/h5/WrQ8
-----END CERTIFICATE-----

Comodo AAA Services root
========================
-----BEGIN CERTIFICATE-----
MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS
R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg
TGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAw
MFoXDTI4MTIzMTIzNTk1OVowezELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hl
c3RlcjEQMA4GA1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNV
BAMMGEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
ggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQuaBtDFcCLNSS1UY8y2bmhG
C1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe3M/vg4aijJRPn2jymJBGhCfHdr/jzDUs
i14HZGWCwEiwqJH5YZ92IFCokcdmtet4YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszW
Y19zjNoFmag4qMsXeDZRrOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjH
Ypy+g8cmez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQUoBEK
Iz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wewYDVR0f
BHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20vQUFBQ2VydGlmaWNhdGVTZXJ2aWNl
cy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29tb2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2Vz
LmNybDANBgkqhkiG9w0BAQUFAAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm
7l3sAg9g1o1QGE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz
Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2G9w84FoVxp7Z
8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsil2D4kF501KKaU73yqWjgom7C
12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg==
-----END CERTIFICATE-----

QuoVadis Root CA 2
==================
-----BEGIN CERTIFICATE-----
MIIFtzCCA5+gAwIBAgICBQkwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT
EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMjAeFw0wNjExMjQx
ODI3MDBaFw0zMTExMjQxODIzMzNaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM
aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4IC
DwAwggIKAoICAQCaGMpLlA0ALa8DKYrwD4HIrkwZhR0In6spRIXzL4GtMh6QRr+jhiYaHv5+HBg6
XJxgFyo6dIMzMH1hVBHL7avg5tKifvVrbxi3Cgst/ek+7wrGsxDp3MJGF/hd/aTa/55JWpzmM+Yk
lvc/ulsrHHo1wtZn/qtmUIttKGAr79dgw8eTvI02kfN/+NsRE8Scd3bBrrcCaoF6qUWD4gXmuVbB
lDePSHFjIuwXZQeVikvfj8ZaCuWw419eaxGrDPmF60Tp+ARz8un+XJiM9XOva7R+zdRcAitMOeGy
lZUtQofX1bOQQ7dsE/He3fbE+Ik/0XX1ksOR1YqI0JDs3G3eicJlcZaLDQP9nL9bFqyS2+r+eXyt
66/3FsvbzSUr5R/7mp/iUcw6UwxI5g69ybR2BlLmEROFcmMDBOAENisgGQLodKcftslWZvB1Jdxn
wQ5hYIizPtGo/KPaHbDRsSNU30R2be1B2MGyIrZTHN81Hdyhdyox5C315eXbyOD/5YDXC2Og/zOh
D7osFRXql7PSorW+8oyWHhqPHWykYTe5hnMz15eWniN9gqRMgeKh0bpnX5UHoycR7hYQe7xFSkyy
BNKr79X9DFHOUGoIMfmR2gyPZFwDwzqLID9ujWc9Otb+fVuIyV77zGHcizN300QyNQliBJIWENie
J0f7OyHj+OsdWwIDAQABo4GwMIGtMA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1Ud
DgQWBBQahGK8SEwzJQTU7tD2A8QZRtGUazBuBgNVHSMEZzBlgBQahGK8SEwzJQTU7tD2A8QZRtGU
a6FJpEcwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMT
ElF1b1ZhZGlzIFJvb3QgQ0EgMoICBQkwDQYJKoZIhvcNAQEFBQADggIBAD4KFk2fBluornFdLwUv
Z+YTRYPENvbzwCYMDbVHZF34tHLJRqUDGCdViXh9duqWNIAXINzng/iN/Ae42l9NLmeyhP3ZRPx3
UIHmfLTJDQtyU/h2BwdBR5YM++CCJpNVjP4iH2BlfF/nJrP3MpCYUNQ3cVX2kiF495V5+vgtJodm
VjB3pjd4M1IQWK4/YY7yarHvGH5KWWPKjaJW1acvvFYfzznB4vsKqBUsfU16Y8Zsl0Q80m/DShcK
+JDSV6IZUaUtl0HaB0+pUNqQjZRG4T7wlP0QADj1O+hA4bRuVhogzG9Yje0uRY/W6ZM/57Es3zrW
IozchLsib9D45MY56QSIPMO661V6bYCZJPVsAfv4l7CUW+v90m/xd2gNNWQjrLhVoQPRTUIZ3Ph1
WVaj+ahJefivDrkRoHy3au000LYmYjgahwz46P0u05B/B5EqHdZ+XIWDmbA4CD/pXvk1B+TJYm5X
f6dQlfe6yJvmjqIBxdZmv3lh8zwc4bmCXF2gw+nYSL0ZohEUGW6yhhtoPkg3Goi3XZZenMfvJ2II
4pEZXNLxId26F0KCl3GBUzGpn/Z9Yr9y4aOTHcyKJloJONDO1w2AFrR4pTqHTI2KpdVGl/IsELm8
VCLAAVBpQ570su9t+Oza8eOx79+Rj1QqCyXBJhnEUhAFZdWCEOrCMc0u
-----END CERTIFICATE-----

QuoVadis Root CA 3
==================
-----BEGIN CERTIFICATE-----
MIIGnTCCBIWgAwIBAgICBcYwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT
EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMzAeFw0wNjExMjQx
OTExMjNaFw0zMTExMjQxOTA2NDRaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM
aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4IC
DwAwggIKAoICAQDMV0IWVJzmmNPTTe7+7cefQzlKZbPoFog02w1ZkXTPkrgEQK0CSzGrvI2RaNgg
DhoB4hp7Thdd4oq3P5kazethq8Jlph+3t723j/z9cI8LoGe+AaJZz3HmDyl2/7FWeUUrH556VOij
KTVopAFPD6QuN+8bv+OPEKhyq1hX51SGyMnzW9os2l2ObjyjPtr7guXd8lyyBTNvijbO0BNO/79K
DDRMpsMhvVAEVeuxu537RR5kFd5VAYwCdrXLoT9CabwvvWhDFlaJKjdhkf2mrk7AyxRllDdLkgbv
BNDInIjbC3uBr7E9KsRlOni27tyAsdLTmZw67mtaa7ONt9XOnMK+pUsvFrGeaDsGb659n/je7Mwp
p5ijJUMv7/FfJuGITfhebtfZFG4ZM2mnO4SJk8RTVROhUXhA+LjJou57ulJCg54U7QVSWllWp5f8
nT8KKdjcT5EOE7zelaTfi5m+rJsziO+1ga8bxiJTyPbH7pcUsMV8eFLI8M5ud2CEpukqdiDtWAEX
MJPpGovgc2PZapKUSU60rUqFxKMiMPwJ7Wgic6aIDFUhWMXhOp8q3crhkODZc6tsgLjoC2SToJyM
Gf+z0gzskSaHirOi4XCPLArlzW1oUevaPwV/izLmE1xr/l9A4iLItLRkT9a6fUg+qGkM17uGcclz
uD87nSVL2v9A6wIDAQABo4IBlTCCAZEwDwYDVR0TAQH/BAUwAwEB/zCB4QYDVR0gBIHZMIHWMIHT
BgkrBgEEAb5YAAMwgcUwgZMGCCsGAQUFBwICMIGGGoGDQW55IHVzZSBvZiB0aGlzIENlcnRpZmlj
YXRlIGNvbnN0aXR1dGVzIGFjY2VwdGFuY2Ugb2YgdGhlIFF1b1ZhZGlzIFJvb3QgQ0EgMyBDZXJ0
aWZpY2F0ZSBQb2xpY3kgLyBDZXJ0aWZpY2F0aW9uIFByYWN0aWNlIFN0YXRlbWVudC4wLQYIKwYB
BQUHAgEWIWh0dHA6Ly93d3cucXVvdmFkaXNnbG9iYWwuY29tL2NwczALBgNVHQ8EBAMCAQYwHQYD
VR0OBBYEFPLAE+CCQz777i9nMpY1XNu4ywLQMG4GA1UdIwRnMGWAFPLAE+CCQz777i9nMpY1XNu4
ywLQoUmkRzBFMQswCQYDVQQGEwJCTTEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRlZDEbMBkGA1UE
AxMSUXVvVmFkaXMgUm9vdCBDQSAzggIFxjANBgkqhkiG9w0BAQUFAAOCAgEAT62gLEz6wPJv92ZV
qyM07ucp2sNbtrCD2dDQ4iH782CnO11gUyeim/YIIirnv6By5ZwkajGxkHon24QRiSemd1o417+s
hvzuXYO8BsbRd2sPbSQvS3pspweWyuOEn62Iix2rFo1bZhfZFvSLgNLd+LJ2w/w4E6oM3kJpK27z
POuAJ9v1pkQNn1pVWQvVDVJIxa6f8i+AxeoyUDUSly7B4f/xI4hROJ/yZlZ25w9Rl6VSDE1JUZU2
Pb+iSwwQHYaZTKrzchGT5Or2m9qoXadNt54CrnMAyNojA+j56hl0YgCUyyIgvpSnWbWCar6ZeXqp
8kokUvd0/bpO5qgdAm6xDYBEwa7TIzdfu4V8K5Iu6H6li92Z4b8nby1dqnuH/grdS/yO9SbkbnBC
bjPsMZ57k8HkyWkaPcBrTiJt7qtYTcbQQcEr6k8Sh17rRdhs9ZgC06DYVYoGmRmioHfRMJ6szHXu
g/WwYjnPbFfiTNKRCw51KBuav/0aQ/HKd/s7j2G4aSgWQgRecCocIdiP4b0jWy10QJLZYxkNc91p
vGJHvOB0K7Lrfb5BG7XARsWhIstfTsEokt4YutUqKLsRixeTmJlglFwjz1onl14LBQaTNx47aTbr
qZ5hHY8y2o4M1nQ+ewkk2gF3R8Q7zTSMmfXK4SVhM7JZG+Ju1zdXtg2pEto=
-----END CERTIFICATE-----

Security Communication Root CA
==============================
-----BEGIN CERTIFICATE-----
MIIDWjCCAkKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP
U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw
HhcNMDMwOTMwMDQyMDQ5WhcNMjMwOTMwMDQyMDQ5WjBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP
U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCzs/5/022x7xZ8V6UMbXaKL0u/ZPtM7orw
8yl89f/uKuDp6bpbZCKamm8sOiZpUQWZJtzVHGpxxpp9Hp3dfGzGjGdnSj74cbAZJ6kJDKaVv0uM
DPpVmDvY6CKhS3E4eayXkmmziX7qIWgGmBSWh9JhNrxtJ1aeV+7AwFb9Ms+k2Y7CI9eNqPPYJayX
5HA49LY6tJ07lyZDo6G8SVlyTCMwhwFY9k6+HGhWZq/NQV3Is00qVUarH9oe4kA92819uZKAnDfd
DJZkndwi92SL32HeFZRSFaB9UslLqCHJxrHty8OVYNEP8Ktw+N/LTX7s1vqr2b1/VPKl6Xn62dZ2
JChzAgMBAAGjPzA9MB0GA1UdDgQWBBSgc0mZaNyFW2XjmygvV5+9M7wHSDALBgNVHQ8EBAMCAQYw
DwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaECpqLvkT115swW1F7NgE+vGkl3g
0dNq/vu+m22/xwVtWSDEHPC32oRYAmP6SBbvT6UL90qY8j+eG61Ha2POCEfrUj94nK9NrvjVT8+a
mCoQQTlSxN3Zmw7vkwGusi7KaEIkQmywszo+zenaSMQVy+n5Bw+SUEmK3TGXX8npN6o7WWWXlDLJ
s58+OmJYxUmtYg5xpTKqL8aJdkNAExNnPaJUJRDL8Try2frbSVa7pv6nQTXD4IhhyYjH3zYQIphZ
6rBK+1YWc26sTfcioU+tHXotRSflMMFe8toTyyVCUZVHA4xsIcx0Qu1T/zOLjw9XARYvz6buyXAi
FL39vmwLAw==
-----END CERTIFICATE-----

XRamp Global CA Root
====================
-----BEGIN CERTIFICATE-----
MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCBgjELMAkGA1UE
BhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2Vj
dXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBB
dXRob3JpdHkwHhcNMDQxMTAxMTcxNDA0WhcNMzUwMTAxMDUzNzE5WjCBgjELMAkGA1UEBhMCVVMx
HjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2VjdXJpdHkg
U2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
dHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCYJB69FbS638eMpSe2OAtp87ZOqCwu
IR1cRN8hXX4jdP5efrRKt6atH67gBhbim1vZZ3RrXYCPKZ2GG9mcDZhtdhAoWORlsH9KmHmf4MMx
foArtYzAQDsRhtDLooY2YKTVMIJt2W7QDxIEM5dfT2Fa8OT5kavnHTu86M/0ay00fOJIYRyO82FE
zG+gSqmUsE3a56k0enI4qEHMPJQRfevIpoy3hsvKMzvZPTeL+3o+hiznc9cKV6xkmxnr9A8ECIqs
AxcZZPRaJSKNNCyy9mgdEm3Tih4U2sSPpuIjhdV6Db1q4Ons7Be7QhtnqiXtRYMh/MHJfNViPvry
xS3T/dRlAgMBAAGjgZ8wgZwwEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud
EwEB/wQFMAMBAf8wHQYDVR0OBBYEFMZPoj0GY4QJnM5i5ASsjVy16bYbMDYGA1UdHwQvMC0wK6Ap
oCeGJWh0dHA6Ly9jcmwueHJhbXBzZWN1cml0eS5jb20vWEdDQS5jcmwwEAYJKwYBBAGCNxUBBAMC
AQEwDQYJKoZIhvcNAQEFBQADggEBAJEVOQMBG2f7Shz5CmBbodpNl2L5JFMn14JkTpAuw0kbK5rc
/Kh4ZzXxHfARvbdI4xD2Dd8/0sm2qlWkSLoC295ZLhVbO50WfUfXN+pfTXYSNrsf16GBBEYgoyxt
qZ4Bfj8pzgCT3/3JknOJiWSe5yvkHJEs0rnOfc5vMZnT5r7SHpDwCRR5XCOrTdLaIR9NmXmd4c8n
nxCbHIgNsIpkQTG4DmyQJKSbXHGPurt+HBvbaoAPIbzp26a3QPSyi6mx5O+aGtA9aZnuqCij4Tyz
8LIRnM98QObd50N9otg6tamN8jSZxNQQ4Qb9CYQQO+7ETPTsJ3xCwnR8gooJybQDJbw=
-----END CERTIFICATE-----

Go Daddy Class 2 CA
===================
-----BEGIN CERTIFICATE-----
MIIEADCCAuigAwIBAgIBADANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMY
VGhlIEdvIERhZGR5IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRp
ZmljYXRpb24gQXV0aG9yaXR5MB4XDTA0MDYyOTE3MDYyMFoXDTM0MDYyOTE3MDYyMFowYzELMAkG
A1UEBhMCVVMxITAfBgNVBAoTGFRoZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28g
RGFkZHkgQ2xhc3MgMiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASAwDQYJKoZIhvcNAQEBBQAD
ggENADCCAQgCggEBAN6d1+pXGEmhW+vXX0iG6r7d/+TvZxz0ZWizV3GgXne77ZtJ6XCAPVYYYwhv
2vLM0D9/AlQiVBDYsoHUwHU9S3/Hd8M+eKsaA7Ugay9qK7HFiH7Eux6wwdhFJ2+qN1j3hybX2C32
qRe3H3I2TqYXP2WYktsqbl2i/ojgC95/5Y0V4evLOtXiEqITLdiOr18SPaAIBQi2XKVlOARFmR6j
YGB0xUGlcmIbYsUfb18aQr4CUWWoriMYavx4A6lNf4DD+qta/KFApMoZFv6yyO9ecw3ud72a9nmY
vLEHZ6IVDd2gWMZEewo+YihfukEHU1jPEX44dMX4/7VpkI+EdOqXG68CAQOjgcAwgb0wHQYDVR0O
BBYEFNLEsNKR1EwRcbNhyz2h/t2oatTjMIGNBgNVHSMEgYUwgYKAFNLEsNKR1EwRcbNhyz2h/t2o
atTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMu
MTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwG
A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wim
PQoZ+YeAEW5p5JYXMP80kWNyOO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKt
I3lpjbi2Tc7PTMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ
HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mERdEr/VxqHD3VI
Ls9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5CufReYNnyicsbkqWletNw+vHX/b
vZ8=
-----END CERTIFICATE-----

Starfield Class 2 CA
====================
-----BEGIN CERTIFICATE-----
MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzElMCMGA1UEChMc
U3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZpZWxkIENsYXNzIDIg
Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQwNjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBo
MQswCQYDVQQGEwJVUzElMCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAG
A1UECxMpU3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqG
SIb3DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf8MOh2tTY
bitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN+lq2cwQlZut3f+dZxkqZ
JRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVm
epsZGD3/cVE8MC5fvj13c7JdBmzDI1aaK4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSN
F4Azbl5KXZnJHoe0nRrA1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HF
MIHCMB0GA1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fRzt0f
hvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNo
bm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBDbGFzcyAyIENlcnRpZmljYXRpb24g
QXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGs
afPzWdqbAYcaT1epoXkJKtv3L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLM
PUxA2IGvd56Deruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl
xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynpVSJYACPq4xJD
KVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEYWQPJIrSPnNVeKtelttQKbfi3
QBFGmh95DmK/D5fs4C8fF5Q=
-----END CERTIFICATE-----

DigiCert Assured ID Root CA
===========================
-----BEGIN CERTIFICATE-----
MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQG
EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw
IgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzEx
MTEwMDAwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL
ExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0Ew
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtDhXO5EOAXLGH87dg+XESpa7cJpSIqvTO
9SA5KFhgDPiA2qkVlTJhPLWxKISKityfCgyDF3qPkKyK53lTXDGEKvYPmDI2dsze3Tyoou9q+yHy
UmHfnyDXH+Kx2f4YZNISW1/5WBg1vEfNoTb5a3/UsDg+wRvDjDPZ2C8Y/igPs6eD1sNuRMBhNZYW
/lmci3Zt1/GiSw0r/wty2p5g0I6QNcZ4VYcgoc/lbQrISXwxmDNsIumH0DJaoroTghHtORedmTpy
oeb6pNnVFzF1roV9Iq4/AUaG9ih5yLHa5FcXxH4cDrC0kqZWs72yl+2qp/C3xag/lRbQ/6GW6whf
GHdPAgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRF
66Kv9JLLgjEtUYunpyGd823IDzAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYunpyGd823IDzANBgkq
hkiG9w0BAQUFAAOCAQEAog683+Lt8ONyc3pklL/3cmbYMuRCdWKuh+vy1dneVrOfzM4UKLkNl2Bc
EkxY5NM9g0lFWJc1aRqoR+pWxnmrEthngYTffwk8lOa4JiwgvT2zKIn3X/8i4peEH+ll74fg38Fn
SbNd67IJKusm7Xi+fT8r87cmNW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i
8b5QZ7dsvfPxH2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe
+o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g==
-----END CERTIFICATE-----

DigiCert Global Root CA
=======================
-----BEGIN CERTIFICATE-----
MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQG
EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw
HgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAw
MDAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3
dy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkq
hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsBCSDMAZOn
TjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97nh6Vfe63SKMI2tavegw5
BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt43C/dxC//AH2hdmoRBBYMql1GNXRor5H
4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7PT19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y
7vrTC0LUq7dBMtoM1O/4gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQAB
o2MwYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbRTLtm
8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUwDQYJKoZIhvcNAQEF
BQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/EsrhMAtudXH/vTBH1jLuG2cenTnmCmr
EbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIt
tep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886
UAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk
CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=
-----END CERTIFICATE-----

DigiCert High Assurance EV Root CA
==================================
-----BEGIN CERTIFICATE-----
MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBsMQswCQYDVQQG
EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSsw
KQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5jZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAw
MFoXDTMxMTExMDAwMDAwMFowbDELMAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZ
MBcGA1UECxMQd3d3LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFu
Y2UgRVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm+9S75S0t
Mqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTWPNt0OKRKzE0lgvdKpVMS
OO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEMxChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3
MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFBIk5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQ
NAQTXKFx01p8VdteZOE3hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUe
h10aUAsgEsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMB
Af8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaAFLE+w2kD+L9HAdSY
JhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3NecnzyIZgYIVyHbIUf4KmeqvxgydkAQ
V8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6zeM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFp
myPInngiK3BD41VHMWEZ71jFhS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkK
mNEVX58Svnw2Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe
vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep+OkuE6N36B9K
-----END CERTIFICATE-----

SwissSign Gold CA - G2
======================
-----BEGIN CERTIFICATE-----
MIIFujCCA6KgAwIBAgIJALtAHEP1Xk+wMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNVBAYTAkNIMRUw
EwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMTFlN3aXNzU2lnbiBHb2xkIENBIC0gRzIwHhcN
MDYxMDI1MDgzMDM1WhcNMzYxMDI1MDgzMDM1WjBFMQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dp
c3NTaWduIEFHMR8wHQYDVQQDExZTd2lzc1NpZ24gR29sZCBDQSAtIEcyMIICIjANBgkqhkiG9w0B
AQEFAAOCAg8AMIICCgKCAgEAr+TufoskDhJuqVAtFkQ7kpJcyrhdhJJCEyq8ZVeCQD5XJM1QiyUq
t2/876LQwB8CJEoTlo8jE+YoWACjR8cGp4QjK7u9lit/VcyLwVcfDmJlD909Vopz2q5+bbqBHH5C
jCA12UNNhPqE21Is8w4ndwtrvxEvcnifLtg+5hg3Wipy+dpikJKVyh+c6bM8K8vzARO/Ws/BtQpg
vd21mWRTuKCWs2/iJneRjOBiEAKfNA+k1ZIzUd6+jbqEemA8atufK+ze3gE/bk3lUIbLtK/tREDF
ylqM2tIrfKjuvqblCqoOpd8FUrdVxyJdMmqXl2MT28nbeTZ7hTpKxVKJ+STnnXepgv9VHKVxaSvR
AiTysybUa9oEVeXBCsdtMDeQKuSeFDNeFhdVxVu1yzSJkvGdJo+hB9TGsnhQ2wwMC3wLjEHXuend
jIj3o02yMszYF9rNt85mndT9Xv+9lz4pded+p2JYryU0pUHHPbwNUMoDAw8IWh+Vc3hiv69yFGkO
peUDDniOJihC8AcLYiAQZzlG+qkDzAQ4embvIIO1jEpWjpEA/I5cgt6IoMPiaG59je883WX0XaxR
7ySArqpWl2/5rX3aYT+YdzylkbYcjCbaZaIJbcHiVOO5ykxMgI93e2CaHt+28kgeDrpOVG2Y4OGi
GqJ3UM/EY5LsRxmd6+ZrzsECAwEAAaOBrDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUw
AwEB/zAdBgNVHQ4EFgQUWyV7lqRlUX64OfPAeGZe6Drn8O4wHwYDVR0jBBgwFoAUWyV7lqRlUX64
OfPAeGZe6Drn8O4wRgYDVR0gBD8wPTA7BglghXQBWQECAQEwLjAsBggrBgEFBQcCARYgaHR0cDov
L3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBACe645R88a7A3hfm
5djV9VSwg/S7zV4Fe0+fdWavPOhWfvxyeDgD2StiGwC5+OlgzczOUYrHUDFu4Up+GC9pWbY9ZIEr
44OE5iKHjn3g7gKZYbge9LgriBIWhMIxkziWMaa5O1M/wySTVltpkuzFwbs4AOPsF6m43Md8AYOf
Mke6UiI0HTJ6CVanfCU2qT1L2sCCbwq7EsiHSycR+R4tx5M/nttfJmtS2S6K8RTGRI0Vqbe/vd6m
Gu6uLftIdxf+u+yvGPUqUfA5hJeVbG4bwyvEdGB5JbAKJ9/fXtI5z0V9QkvfsywexcZdylU6oJxp
mo/a77KwPJ+HbBIrZXAVUjEaJM9vMSNQH4xPjyPDdEFjHFWoFN0+4FFQz/EbMFYOkrCChdiDyyJk
vC24JdVUorgG6q2SpCSgwYa1ShNqR88uC1aVVMvOmttqtKay20EIhid392qgQmwLOM7XdVAyksLf
KzAiSNDVQTglXaTpXZ/GlHXQRf0wl0OPkKsKx4ZzYEppLd6leNcG2mqeSz53OiATIgHQv2ieY2Br
NU0LbbqhPcCT4H8js1WtciVORvnSFu+wZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6Lqj
viOvrv1vA+ACOzB2+httQc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ
-----END CERTIFICATE-----

SwissSign Silver CA - G2
========================
-----BEGIN CERTIFICATE-----
MIIFvTCCA6WgAwIBAgIITxvUL1S7L0swDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCQ0gxFTAT
BgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMB4X
DTA2MTAyNTA4MzI0NloXDTM2MTAyNTA4MzI0NlowRzELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3
aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMIICIjANBgkqhkiG
9w0BAQEFAAOCAg8AMIICCgKCAgEAxPGHf9N4Mfc4yfjDmUO8x/e8N+dOcbpLj6VzHVxumK4DV644
N0MvFz0fyM5oEMF4rhkDKxD6LHmD9ui5aLlV8gREpzn5/ASLHvGiTSf5YXu6t+WiE7brYT7QbNHm
+/pe7R20nqA1W6GSy/BJkv6FCgU+5tkL4k+73JU3/JHpMjUi0R86TieFnbAVlDLaYQ1HTWBCrpJH
6INaUFjpiou5XaHc3ZlKHzZnu0jkg7Y360g6rw9njxcH6ATK72oxh9TAtvmUcXtnZLi2kUpCe2Uu
MGoM9ZDulebyzYLs2aFK7PayS+VFheZteJMELpyCbTapxDFkH4aDCyr0NQp4yVXPQbBH6TCfmb5h
qAaEuSh6XzjZG6k4sIN/c8HDO0gqgg8hm7jMqDXDhBuDsz6+pJVpATqJAHgE2cn0mRmrVn5bi4Y5
FZGkECwJMoBgs5PAKrYYC51+jUnyEEp/+dVGLxmSo5mnJqy7jDzmDrxHB9xzUfFwZC8I+bRHHTBs
ROopN4WSaGa8gzj+ezku01DwH/teYLappvonQfGbGHLy9YR0SslnxFSuSGTfjNFusB3hB48IHpmc
celM2KX3RxIfdNFRnobzwqIjQAtz20um53MGjMGg6cFZrEb65i/4z3GcRm25xBWNOHkDRUjvxF3X
CO6HOSKGsg0PWEP3calILv3q1h8CAwEAAaOBrDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/
BAUwAwEB/zAdBgNVHQ4EFgQUF6DNweRBtjpbO8tFnb0cwpj6hlgwHwYDVR0jBBgwFoAUF6DNweRB
tjpbO8tFnb0cwpj6hlgwRgYDVR0gBD8wPTA7BglghXQBWQEDAQEwLjAsBggrBgEFBQcCARYgaHR0
cDovL3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBAHPGgeAn0i0P
4JUw4ppBf1AsX19iYamGamkYDHRJ1l2E6kFSGG9YrVBWIGrGvShpWJHckRE1qTodvBqlYJ7YH39F
kWnZfrt4csEGDyrOj4VwYaygzQu4OSlWhDJOhrs9xCrZ1x9y7v5RoSJBsXECYxqCsGKrXlcSH9/L
3XWgwF15kIwb4FDm3jH+mHtwX6WQ2K34ArZv02DdQEsixT2tOnqfGhpHkXkzuoLcMmkDlm4fS/Bx
/uNncqCxv1yL5PqZIseEuRuNI5c/7SXgz2W79WEE790eslpBIlqhn10s6FvJbakMDHiqYMZWjwFa
DGi8aRl5xB9+lwW/xekkUV7U1UtT7dkjWjYDZaPBA61BMPNGG4WQr2W11bHkFlt4dR2Xem1ZqSqP
e97Dh4kQmUlzeMg9vVE1dCrV8X5pGyq7O70luJpaPXJhkGaH7gzWTdQRdAtq/gsD/KNVV4n+Ssuu
WxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJ
DIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ub
DgEj8Z+7fNzcbBGXJbLytGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u
-----END CERTIFICATE-----

SecureTrust CA
==============
-----BEGIN CERTIFICATE-----
MIIDuDCCAqCgAwIBAgIQDPCOXAgWpa1Cf/DrJxhZ0DANBgkqhkiG9w0BAQUFADBIMQswCQYDVQQG
EwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xFzAVBgNVBAMTDlNlY3VyZVRy
dXN0IENBMB4XDTA2MTEwNzE5MzExOFoXDTI5MTIzMTE5NDA1NVowSDELMAkGA1UEBhMCVVMxIDAe
BgNVBAoTF1NlY3VyZVRydXN0IENvcnBvcmF0aW9uMRcwFQYDVQQDEw5TZWN1cmVUcnVzdCBDQTCC
ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKukgeWVzfX2FI7CT8rU4niVWJxB4Q2ZQCQX
OZEzZum+4YOvYlyJ0fwkW2Gz4BERQRwdbvC4u/jep4G6pkjGnx29vo6pQT64lO0pGtSO0gMdA+9t
DWccV9cGrcrI9f4Or2YlSASWC12juhbDCE/RRvgUXPLIXgGZbf2IzIaowW8xQmxSPmjL8xk037uH
GFaAJsTQ3MBv396gwpEWoGQRS0S8Hvbn+mPeZqx2pHGj7DaUaHp3pLHnDi+BeuK1cobvomuL8A/b
01k/unK8RCSc43Oz969XL0Imnal0ugBS8kvNU3xHCzaFDmapCJcWNFfBZveA4+1wVMeT4C4oFVmH
ursCAwEAAaOBnTCBmjATBgkrBgEEAYI3FAIEBh4EAEMAQTALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/
BAUwAwEB/zAdBgNVHQ4EFgQUQjK2FvoE/f5dS3rD/fdMQB1aQ68wNAYDVR0fBC0wKzApoCegJYYj
aHR0cDovL2NybC5zZWN1cmV0cnVzdC5jb20vU1RDQS5jcmwwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ
KoZIhvcNAQEFBQADggEBADDtT0rhWDpSclu1pqNlGKa7UTt36Z3q059c4EVlew3KW+JwULKUBRSu
SceNQQcSc5R+DCMh/bwQf2AQWnL1mA6s7Ll/3XpvXdMc9P+IBWlCqQVxyLesJugutIxq/3HcuLHf
mbx8IVQr5Fiiu1cprp6poxkmD5kuCLDv/WnPmRoJjeOnnyvJNjR7JLN4TJUXpAYmHrZkUjZfYGfZ
nMUFdAvnZyPSCPyI6a6Lf+Ew9Dd+/cYy2i2eRDAwbO4H3tI0/NL/QPZL9GZGBlSm8jIKYyYwa5vR
3ItHuuG51WLQoqD0ZwV4KWMabwTW+MZMo5qxN7SN5ShLHZ4swrhovO0C7jE=
-----END CERTIFICATE-----

Secure Global CA
================
-----BEGIN CERTIFICATE-----
MIIDvDCCAqSgAwIBAgIQB1YipOjUiolN9BPI8PjqpTANBgkqhkiG9w0BAQUFADBKMQswCQYDVQQG
EwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBH
bG9iYWwgQ0EwHhcNMDYxMTA3MTk0MjI4WhcNMjkxMjMxMTk1MjA2WjBKMQswCQYDVQQGEwJVUzEg
MB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBHbG9iYWwg
Q0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvNS7YrGxVaQZx5RNoJLNP2MwhR/jx
YDiJiQPpvepeRlMJ3Fz1Wuj3RSoC6zFh1ykzTM7HfAo3fg+6MpjhHZevj8fcyTiW89sa/FHtaMbQ
bqR8JNGuQsiWUGMu4P51/pinX0kuleM5M2SOHqRfkNJnPLLZ/kG5VacJjnIFHovdRIWCQtBJwB1g
8NEXLJXr9qXBkqPFwqcIYA1gBBCWeZ4WNOaptvolRTnIHmX5k/Wq8VLcmZg9pYYaDDUz+kulBAYV
HDGA76oYa8J719rO+TMg1fW9ajMtgQT7sFzUnKPiXB3jqUJ1XnvUd+85VLrJChgbEplJL4hL/VBi
0XPnj3pDAgMBAAGjgZ0wgZowEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud
EwEB/wQFMAMBAf8wHQYDVR0OBBYEFK9EBMJBfkiD2045AuzshHrmzsmkMDQGA1UdHwQtMCswKaAn
oCWGI2h0dHA6Ly9jcmwuc2VjdXJldHJ1c3QuY29tL1NHQ0EuY3JsMBAGCSsGAQQBgjcVAQQDAgEA
MA0GCSqGSIb3DQEBBQUAA4IBAQBjGghAfaReUw132HquHw0LURYD7xh8yOOvaliTFGCRsoTciE6+
OYo68+aCiV0BN7OrJKQVDpI1WkpEXk5X+nXOH0jOZvQ8QCaSmGwb7iRGDBezUqXbpZGRzzfTb+cn
CDpOGR86p1hcF895P4vkp9MmI50mD1hp/Ed+stCNi5O/KU9DaXR2Z0vPB4zmAve14bRDtUstFJ/5
3CYNv6ZHdAbYiNE6KTCEztI5gGIbqMdXSbxqVVFnFUq+NQfk1XWYN3kwFNspnWzFacxHVaIw98xc
f8LDmBxrThaA63p4ZUWiABqvDA1VZDRIuJK58bRQKfJPIx/abKwfROHdI3hRW8cW
-----END CERTIFICATE-----

COMODO Certification Authority
==============================
-----BEGIN CERTIFICATE-----
MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCBgTELMAkGA1UE
BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG
A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNVBAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1
dGhvcml0eTAeFw0wNjEyMDEwMDAwMDBaFw0yOTEyMzEyMzU5NTlaMIGBMQswCQYDVQQGEwJHQjEb
MBkGA1UECBMSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFD
T01PRE8gQ0EgTGltaXRlZDEnMCUGA1UEAxMeQ09NT0RPIENlcnRpZmljYXRpb24gQXV0aG9yaXR5
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0ECLi3LjkRv3UcEbVASY06m/weaKXTuH
+7uIzg3jLz8GlvCiKVCZrts7oVewdFFxze1CkU1B/qnI2GqGd0S7WWaXUF601CxwRM/aN5VCaTww
xHGzUvAhTaHYujl8HJ6jJJ3ygxaYqhZ8Q5sVW7euNJH+1GImGEaaP+vB+fGQV+useg2L23IwambV
4EajcNxo2f8ESIl33rXp+2dtQem8Ob0y2WIC8bGoPW43nOIv4tOiJovGuFVDiOEjPqXSJDlqR6sA
1KGzqSX+DT+nHbrTUcELpNqsOO9VUCQFZUaTNE8tja3G1CEZ0o7KBWFxB3NH5YoZEr0ETc5OnKVI
rLsm9wIDAQABo4GOMIGLMB0GA1UdDgQWBBQLWOWLxkwVN6RAqTCpIb5HNlpW/zAOBgNVHQ8BAf8E
BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zBJBgNVHR8EQjBAMD6gPKA6hjhodHRwOi8vY3JsLmNvbW9k
b2NhLmNvbS9DT01PRE9DZXJ0aWZpY2F0aW9uQXV0aG9yaXR5LmNybDANBgkqhkiG9w0BAQUFAAOC
AQEAPpiem/Yb6dc5t3iuHXIYSdOH5EOC6z/JqvWote9VfCFSZfnVDeFs9D6Mk3ORLgLETgdxb8CP
OGEIqB6BCsAvIC9Bi5HcSEW88cbeunZrM8gALTFGTO3nnc+IlP8zwFboJIYmuNg4ON8qa90SzMc/
RxdMosIGlgnW2/4/PEZB31jiVg88O8EckzXZOFKs7sjsLjBOlDW0JB9LeGna8gI4zJVSk/BwJVmc
IGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5ddBA6+C4OmF4O5MBKgxTMVBbkN
+8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IBZQ==
-----END CERTIFICATE-----

COMODO ECC Certification Authority
==================================
-----BEGIN CERTIFICATE-----
MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTELMAkGA1UEBhMC
R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE
ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBB
dXRob3JpdHkwHhcNMDgwMzA2MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0Ix
GzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR
Q09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRo
b3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQDR3svdcmCFYX7deSRFtSrYpn1PlILBs5BAH+X
4QokPB0BBO490o0JlwzgdeT6+3eKKvUDYEs2ixYjFq0JcfRK9ChQtP6IHG4/bC8vCVlbpVsLM5ni
wz2J+Wos77LTBumjQjBAMB0GA1UdDgQWBBR1cacZSBm8nZ3qQUfflMRId5nTeTAOBgNVHQ8BAf8E
BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjEA7wNbeqy3eApyt4jf/7VG
FAkK+qDmfQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdvGDeA
U/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY=
-----END CERTIFICATE-----

Certigna
========
-----BEGIN CERTIFICATE-----
MIIDqDCCApCgAwIBAgIJAP7c4wEPyUj/MA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNVBAYTAkZSMRIw
EAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hMB4XDTA3MDYyOTE1MTMwNVoXDTI3
MDYyOTE1MTMwNVowNDELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCURoaW15b3RpczERMA8GA1UEAwwI
Q2VydGlnbmEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDIaPHJ1tazNHUmgh7stL7q
XOEm7RFHYeGifBZ4QCHkYJ5ayGPhxLGWkv8YbWkj4Sti993iNi+RB7lIzw7sebYs5zRLcAglozyH
GxnygQcPOJAZ0xH+hrTy0V4eHpbNgGzOOzGTtvKg0KmVEn2lmsxryIRWijOp5yIVUxbwzBfsV1/p
ogqYCd7jX5xv3EjjhQsVWqa6n6xI4wmy9/Qy3l40vhx4XUJbzg4ij02Q130yGLMLLGq/jj8UEYkg
DncUtT2UCIf3JR7VsmAA7G8qKCVuKj4YYxclPz5EIBb2JsglrgVKtOdjLPOMFlN+XPsRGgjBRmKf
Irjxwo1p3Po6WAbfAgMBAAGjgbwwgbkwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUGu3+QTmQ
tCRZvgHyUtVF9lo53BEwZAYDVR0jBF0wW4AUGu3+QTmQtCRZvgHyUtVF9lo53BGhOKQ2MDQxCzAJ
BgNVBAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hggkA/tzjAQ/J
SP8wDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQUFAAOCAQEA
hQMeknH2Qq/ho2Ge6/PAD/Kl1NqV5ta+aDY9fm4fTIrv0Q8hbV6lUmPOEvjvKtpv6zf+EwLHyzs+
ImvaYS5/1HI93TDhHkxAGYwP15zRgzB7mFncfca5DClMoTOi62c6ZYTTluLtdkVwj7Ur3vkj1klu
PBS1xp81HlDQwY9qcEQCYsuuHWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY
1gkIl2PlwS6wt0QmwCbAr1UwnjvVNioZBPRcHv/PLLf/0P2HQBHVESO7SMAhqaQoLf0V+LBOK/Qw
WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg==
-----END CERTIFICATE-----

ePKI Root Certification Authority
=================================
-----BEGIN CERTIFICATE-----
MIIFsDCCA5igAwIBAgIQFci9ZUdcr7iXAF7kBtK8nTANBgkqhkiG9w0BAQUFADBeMQswCQYDVQQG
EwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0ZC4xKjAoBgNVBAsMIWVQS0kg
Um9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNDEyMjAwMjMxMjdaFw0zNDEyMjAwMjMx
MjdaMF4xCzAJBgNVBAYTAlRXMSMwIQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEq
MCgGA1UECwwhZVBLSSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0B
AQEFAAOCAg8AMIICCgKCAgEA4SUP7o3biDN1Z82tH306Tm2d0y8U82N0ywEhajfqhFAHSyZbCUNs
IZ5qyNUD9WBpj8zwIuQf5/dqIjG3LBXy4P4AakP/h2XGtRrBp0xtInAhijHyl3SJCRImHJ7K2RKi
lTza6We/CKBk49ZCt0Xvl/T29de1ShUCWH2YWEtgvM3XDZoTM1PRYfl61dd4s5oz9wCGzh1NlDiv
qOx4UXCKXBCDUSH3ET00hl7lSM2XgYI1TBnsZfZrxQWh7kcT1rMhJ5QQCtkkO7q+RBNGMD+XPNjX
12ruOzjjK9SXDrkb5wdJfzcq+Xd4z1TtW0ado4AOkUPB1ltfFLqfpo0kR0BZv3I4sjZsN/+Z0V0O
WQqraffAsgRFelQArr5T9rXn4fg8ozHSqf4hUmTFpmfwdQcGlBSBVcYn5AGPF8Fqcde+S/uUWH1+
ETOxQvdibBjWzwloPn9s9h6PYq2lY9sJpx8iQkEeb5mKPtf5P0B6ebClAZLSnT0IFaUQAS2zMnao
lQ2zepr7BxB4EW/hj8e6DyUadCrlHJhBmd8hh+iVBmoKs2pHdmX2Os+PYhcZewoozRrSgx4hxyy/
vv9haLdnG7t4TY3OZ+XkwY63I2binZB1NJipNiuKmpS5nezMirH4JYlcWrYvjB9teSSnUmjDhDXi
Zo1jDiVN1Rmy5nk3pyKdVDECAwEAAaNqMGgwHQYDVR0OBBYEFB4M97Zn8uGSJglFwFU5Lnc/Qkqi
MAwGA1UdEwQFMAMBAf8wOQYEZyoHAAQxMC8wLQIBADAJBgUrDgMCGgUAMAcGBWcqAwAABBRFsMLH
ClZ87lt4DJX5GFPBphzYEDANBgkqhkiG9w0BAQUFAAOCAgEACbODU1kBPpVJufGBuvl2ICO1J2B0
1GqZNF5sAFPZn/KmsSQHRGoqxqWOeBLoR9lYGxMqXnmbnwoqZ6YlPwZpVnPDimZI+ymBV3QGypzq
KOg4ZyYr8dW1P2WT+DZdjo2NQCCHGervJ8A9tDkPJXtoUHRVnAxZfVo9QZQlUgjgRywVMRnVvwdV
xrsStZf0X4OFunHB2WyBEXYKCrC/gpf36j36+uwtqSiUO1bd0lEursC9CBWMd1I0ltabrNMdjmEP
NXubrjlpC2JgQCA2j6/7Nu4tCEoduL+bXPjqpRugc6bY+G7gMwRfaKonh+3ZwZCc7b3jajWvY9+r
GNm65ulK6lCKD2GTHuItGeIwlDWSXQ62B68ZgI9HkFFLLk3dheLSClIKF5r8GrBQAuUBo2M3IUxE
xJtRmREOc5wGj1QupyheRDmHVi03vYVElOEMSyycw5KFNGHLD7ibSkNS/jQ6fbjpKdx2qcgw+BRx
gMYeNkh0IkFch4LoGHGLQYlE535YW6i4jRPpp2zDR+2zGp1iro2C6pSe3VkQw63d4k3jMdXH7Ojy
sP6SHhYKGvzZ8/gntsm+HbRsZJB/9OTEW9c3rkIO3aQab3yIVMUWbuF6aC74Or8NpDyJO3inTmOD
BCEIZ43ygknQW/2xzQ+DhNQ+IIX3Sj0rnP0qCglN6oH4EZw=
-----END CERTIFICATE-----

certSIGN ROOT CA
================
-----BEGIN CERTIFICATE-----
MIIDODCCAiCgAwIBAgIGIAYFFnACMA0GCSqGSIb3DQEBBQUAMDsxCzAJBgNVBAYTAlJPMREwDwYD
VQQKEwhjZXJ0U0lHTjEZMBcGA1UECxMQY2VydFNJR04gUk9PVCBDQTAeFw0wNjA3MDQxNzIwMDRa
Fw0zMTA3MDQxNzIwMDRaMDsxCzAJBgNVBAYTAlJPMREwDwYDVQQKEwhjZXJ0U0lHTjEZMBcGA1UE
CxMQY2VydFNJR04gUk9PVCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALczuX7I
JUqOtdu0KBuqV5Do0SLTZLrTk+jUrIZhQGpgV2hUhE28alQCBf/fm5oqrl0Hj0rDKH/v+yv6efHH
rfAQUySQi2bJqIirr1qjAOm+ukbuW3N7LBeCgV5iLKECZbO9xSsAfsT8AzNXDe3i+s5dRdY4zTW2
ssHQnIFKquSyAVwdj1+ZxLGt24gh65AIgoDzMKND5pCCrlUoSe1b16kQOA7+j0xbm0bqQfWwCHTD
0IgztnzXdN/chNFDDnU5oSVAKOp4yw4sLjmdjItuFhwvJoIQ4uNllAoEwF73XVv4EOLQunpL+943
AAAaWyjj0pxzPjKHmKHJUS/X3qwzs08CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8B
Af8EBAMCAcYwHQYDVR0OBBYEFOCMm9slSbPxfIbWskKHC9BroNnkMA0GCSqGSIb3DQEBBQUAA4IB
AQA+0hyJLjX8+HXd5n9liPRyTMks1zJO890ZeUe9jjtbkw9QSSQTaxQGcu8J06Gh40CEyecYMnQ8
SG4Pn0vU9x7Tk4ZkVJdjclDVVc/6IJMCopvDI5NOFlV2oHB5bc0hH88vLbwZ44gx+FkagQnIl6Z0
x2DEW8xXjrJ1/RsCCdtZb3KTafcxQdaIOL+Hsr0Wefmq5L6IJd1hJyMctTEHBDa0GpC9oHRxUIlt
vBTjD4au8as+x6AJzKNI0eDbZOeStc+vckNwi/nDhDwTqn6Sm1dTk/pwwpEOMfmbZ13pljheX7Nz
TogVZ96edhBiIL5VaZVDADlN9u6wWk5JRFRYX0KD
-----END CERTIFICATE-----

NetLock Arany (Class Gold) Főtanúsítvány
========================================
-----BEGIN CERTIFICATE-----
MIIEFTCCAv2gAwIBAgIGSUEs5AAQMA0GCSqGSIb3DQEBCwUAMIGnMQswCQYDVQQGEwJIVTERMA8G
A1UEBwwIQnVkYXBlc3QxFTATBgNVBAoMDE5ldExvY2sgS2Z0LjE3MDUGA1UECwwuVGFuw7pzw610
dsOhbnlraWFkw7NrIChDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzKTE1MDMGA1UEAwwsTmV0TG9jayBB
cmFueSAoQ2xhc3MgR29sZCkgRsWRdGFuw7pzw610dsOhbnkwHhcNMDgxMjExMTUwODIxWhcNMjgx
MjA2MTUwODIxWjCBpzELMAkGA1UEBhMCSFUxETAPBgNVBAcMCEJ1ZGFwZXN0MRUwEwYDVQQKDAxO
ZXRMb2NrIEtmdC4xNzA1BgNVBAsMLlRhbsO6c8OtdHbDoW55a2lhZMOzayAoQ2VydGlmaWNhdGlv
biBTZXJ2aWNlcykxNTAzBgNVBAMMLE5ldExvY2sgQXJhbnkgKENsYXNzIEdvbGQpIEbFkXRhbsO6
c8OtdHbDoW55MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxCRec75LbRTDofTjl5Bu
0jBFHjzuZ9lk4BqKf8owyoPjIMHj9DrTlF8afFttvzBPhCf2nx9JvMaZCpDyD/V/Q4Q3Y1GLeqVw
/HpYzY6b7cNGbIRwXdrzAZAj/E4wqX7hJ2Pn7WQ8oLjJM2P+FpD/sLj916jAwJRDC7bVWaaeVtAk
H3B5r9s5VA1lddkVQZQBr17s9o3x/61k/iCa11zr/qYfCGSji3ZVrR47KGAuhyXoqq8fxmRGILdw
fzzeSNuWU7c5d+Qa4scWhHaXWy+7GRWF+GmF9ZmnqfI0p6m2pgP8b4Y9VHx2BJtr+UBdADTHLpl1
neWIA6pN+APSQnbAGwIDAKiLo0UwQzASBgNVHRMBAf8ECDAGAQH/AgEEMA4GA1UdDwEB/wQEAwIB
BjAdBgNVHQ4EFgQUzPpnk/C2uNClwB7zU/2MU9+D15YwDQYJKoZIhvcNAQELBQADggEBAKt/7hwW
qZw8UQCgwBEIBaeZ5m8BiFRhbvG5GK1Krf6BQCOUL/t1fC8oS2IkgYIL9WHxHG64YTjrgfpioTta
YtOUZcTh5m2C+C8lcLIhJsFyUR+MLMOEkMNaj7rP9KdlpeuY0fsFskZ1FSNqb4VjMIDw1Z4fKRzC
bLBQWV2QWzuoDTDPv31/zvGdg73JRm4gpvlhUbohL3u+pRVjodSVh/GeufOJ8z2FuLjbvrW5Kfna
NwUASZQDhETnv0Mxz3WLJdH0pmT1kvarBes96aULNmLazAZfNou2XjG4Kvte9nHfRCaexOYNkbQu
dZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E=
-----END CERTIFICATE-----

Hongkong Post Root CA 1
=======================
-----BEGIN CERTIFICATE-----
MIIDMDCCAhigAwIBAgICA+gwDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoT
DUhvbmdrb25nIFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMB4XDTAzMDUx
NTA1MTMxNFoXDTIzMDUxNTA0NTIyOVowRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoTDUhvbmdrb25n
IFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMIIBIjANBgkqhkiG9w0BAQEF
AAOCAQ8AMIIBCgKCAQEArP84tulmAknjorThkPlAj3n54r15/gK97iSSHSL22oVyaf7XPwnU3ZG1
ApzQjVrhVcNQhrkpJsLj2aDxaQMoIIBFIi1WpztUlVYiWR8o3x8gPW2iNr4joLFutbEnPzlTCeqr
auh0ssJlXI6/fMN4hM2eFvz1Lk8gKgifd/PFHsSaUmYeSF7jEAaPIpjhZY4bXSNmO7ilMlHIhqqh
qZ5/dpTCpmy3QfDVyAY45tQM4vM7TG1QjMSDJ8EThFk9nnV0ttgCXjqQesBCNnLsak3c78QA3xMY
V18meMjWCnl3v/evt3a5pQuEF10Q6m/hq5URX208o1xNg1vysxmKgIsLhwIDAQABoyYwJDASBgNV
HRMBAf8ECDAGAQH/AgEDMA4GA1UdDwEB/wQEAwIBxjANBgkqhkiG9w0BAQUFAAOCAQEADkbVPK7i
h9legYsCmEEIjEy82tvuJxuC52pF7BaLT4Wg87JwvVqWuspube5Gi27nKi6Wsxkz67SfqLI37pio
l7Yutmcn1KZJ/RyTZXaeQi/cImyaT/JaFTmxcdcrUehtHJjA2Sr0oYJ71clBoiMBdDhViw+5Lmei
IAQ32pwL0xch4I+XeTRvhEgCIDMb5jREn5Fw9IBehEPCKdJsEhTkYY2sEJCehFC78JZvRZ+K88ps
T/oROhUVRsPNH4NbLUES7VBnQRM9IauUiqpOfMGx+6fWtScvl6tu4B3i0RwsH0Ti/L6RoZz71ilT
c4afU9hDDl3WY4JxHYB0yvbiAmvZWg==
-----END CERTIFICATE-----

SecureSign RootCA11
===================
-----BEGIN CERTIFICATE-----
MIIDbTCCAlWgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQGEwJKUDErMCkGA1UEChMi
SmFwYW4gQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcywgSW5jLjEcMBoGA1UEAxMTU2VjdXJlU2lnbiBS
b290Q0ExMTAeFw0wOTA0MDgwNDU2NDdaFw0yOTA0MDgwNDU2NDdaMFgxCzAJBgNVBAYTAkpQMSsw
KQYDVQQKEyJKYXBhbiBDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzLCBJbmMuMRwwGgYDVQQDExNTZWN1
cmVTaWduIFJvb3RDQTExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA/XeqpRyQBTvL
TJszi1oURaTnkBbR31fSIRCkF/3frNYfp+TbfPfs37gD2pRY/V1yfIw/XwFndBWW4wI8h9uuywGO
wvNmxoVF9ALGOrVisq/6nL+k5tSAMJjzDbaTj6nU2DbysPyKyiyhFTOVMdrAG/LuYpmGYz+/3ZMq
g6h2uRMft85OQoWPIucuGvKVCbIFtUROd6EgvanyTgp9UK31BQ1FT0Zx/Sg+U/sE2C3XZR1KG/rP
O7AxmjVuyIsG0wCR8pQIZUyxNAYAeoni8McDWc/V1uinMrPmmECGxc0nEovMe863ETxiYAcjPitA
bpSACW22s293bzUIUPsCh8U+iQIDAQABo0IwQDAdBgNVHQ4EFgQUW/hNT7KlhtQ60vFjmqC+CfZX
t94wDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAKCh
OBZmLqdWHyGcBvod7bkixTgm2E5P7KN/ed5GIaGHd48HCJqypMWvDzKYC3xmKbabfSVSSUOrTC4r
bnpwrxYO4wJs+0LmGJ1F2FXI6Dvd5+H0LgscNFxsWEr7jIhQX5Ucv+2rIrVls4W6ng+4reV6G4pQ
Oh29Dbx7VFALuUKvVaAYga1lme++5Jy/xIWrQbJUb9wlze144o4MjQlJ3WN7WmmWAiGovVJZ6X01
y8hSyn+B/tlr0/cR7SXf+Of5pPpyl4RTDaXQMhhRdlkUbA/r7F+AjHVDg8OFmP9Mni0N5HeDk061
lgeLKBObjBmNQSdJQO7e5iNEOdyhIta6A/I=
-----END CERTIFICATE-----

Microsec e-Szigno Root CA 2009
==============================
-----BEGIN CERTIFICATE-----
MIIECjCCAvKgAwIBAgIJAMJ+QwRORz8ZMA0GCSqGSIb3DQEBCwUAMIGCMQswCQYDVQQGEwJIVTER
MA8GA1UEBwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jv
c2VjIGUtU3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5o
dTAeFw0wOTA2MTYxMTMwMThaFw0yOTEyMzAxMTMwMThaMIGCMQswCQYDVQQGEwJIVTERMA8GA1UE
BwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jvc2VjIGUt
U3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5odTCCASIw
DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOn4j/NjrdqG2KfgQvvPkd6mJviZpWNwrZuuyjNA
fW2WbqEORO7hE52UQlKavXWFdCyoDh2Tthi3jCyoz/tccbna7P7ofo/kLx2yqHWH2Leh5TvPmUpG
0IMZfcChEhyVbUr02MelTTMuhTlAdX4UfIASmFDHQWe4oIBhVKZsTh/gnQ4H6cm6M+f+wFUoLAKA
pxn1ntxVUwOXewdI/5n7N4okxFnMUBBjjqqpGrCEGob5X7uxUG6k0QrM1XF+H6cbfPVTbiJfyyvm
1HxdrtbCxkzlBQHZ7Vf8wSN5/PrIJIOV87VqUQHQd9bpEqH5GoP7ghu5sJf0dgYzQ0mg/wu1+rUC
AwEAAaOBgDB+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTLD8bf
QkPMPcu1SCOhGnqmKrs0aDAfBgNVHSMEGDAWgBTLD8bfQkPMPcu1SCOhGnqmKrs0aDAbBgNVHREE
FDASgRBpbmZvQGUtc3ppZ25vLmh1MA0GCSqGSIb3DQEBCwUAA4IBAQDJ0Q5eLtXMs3w+y/w9/w0o
lZMEyL/azXm4Q5DwpL7v8u8hmLzU1F0G9u5C7DBsoKqpyvGvivo/C3NqPuouQH4frlRheesuCDfX
I/OMn74dseGkddug4lQUsbocKaQY9hK6ohQU4zE1yED/t+AFdlfBHFny+L/k7SViXITwfn4fs775
tyERzAMBVnCnEJIeGzSBHq2cGsMEPO0CYdYeBvNfOofyK/FFh+U9rNHHV4S9a67c2Pm2G2JwCz02
yULyMtd6YebS2z3PyKnJm9zbWETXbzivf3jTo60adbocwTZ8jx5tHMN1Rq41Bab2XD0h7lbwyYIi
LXpUq3DDfSJlgnCW
-----END CERTIFICATE-----

GlobalSign Root CA - R3
=======================
-----BEGIN CERTIFICATE-----
MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4GA1UECxMXR2xv
YmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh
bFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT
aWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln
bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWt
iHL8RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsTgHeMCOFJ
0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmmKPZpO/bLyCiR5Z2KYVc3
rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zdQQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjl
OCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZXriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2
xmmFghcCAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE
FI/wS3+oLkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZURUm7
lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMpjjM5RcOO5LlXbKr8
EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK6fBdRoyV3XpYKBovHd7NADdBj+1E
bddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQXmcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18
YIvDQVETI53O9zJrlAGomecsMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7r
kpeDMdmztcpHWD9f
-----END CERTIFICATE-----

Autoridad de Certificacion Firmaprofesional CIF A62634068
=========================================================
-----BEGIN CERTIFICATE-----
MIIGFDCCA/ygAwIBAgIIU+w77vuySF8wDQYJKoZIhvcNAQEFBQAwUTELMAkGA1UEBhMCRVMxQjBA
BgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2
MjYzNDA2ODAeFw0wOTA1MjAwODM4MTVaFw0zMDEyMzEwODM4MTVaMFExCzAJBgNVBAYTAkVTMUIw
QAYDVQQDDDlBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBB
NjI2MzQwNjgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKlmuO6vj78aI14H9M2uDD
Utd9thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOSL/UR5GLXMnE42QQMcas9UX4P
B99jBVzpv5RvwSmCwLTaUbDBPLutN0pcyvFLNg4kq7/DhHf9qFD0sefGL9ItWY16Ck6WaVICqjaY
7Pz6FIMMNx/Jkjd/14Et5cS54D40/mf0PmbR0/RAz15iNA9wBj4gGFrO93IbJWyTdBSTo3OxDqqH
ECNZXyAFGUftaI6SEspd/NYrspI8IM/hX68gvqB2f3bl7BqGYTM+53u0P6APjqK5am+5hyZvQWyI
plD9amML9ZMWGxmPsu2bm8mQ9QEM3xk9Dz44I8kvjwzRAv4bVdZO0I08r0+k8/6vKtMFnXkIoctX
MbScyJCyZ/QYFpM6/EfY0XiWMR+6KwxfXZmtY4laJCB22N/9q06mIqqdXuYnin1oKaPnirjaEbsX
LZmdEyRG98Xi2J+Of8ePdG1asuhy9azuJBCtLxTa/y2aRnFHvkLfuwHb9H/TKI8xWVvTyQKmtFLK
bpf7Q8UIJm+K9Lv9nyiqDdVF8xM6HdjAeI9BZzwelGSuewvF6NkBiDkal4ZkQdU7hwxu+g/GvUgU
vzlN1J5Bto+WHWOWk9mVBngxaJ43BjuAiUVhOSPHG0SjFeUc+JIwuwIDAQABo4HvMIHsMBIGA1Ud
EwEB/wQIMAYBAf8CAQEwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRlzeurNR4APn7VdMActHNH
DhpkLzCBpgYDVR0gBIGeMIGbMIGYBgRVHSAAMIGPMC8GCCsGAQUFBwIBFiNodHRwOi8vd3d3LmZp
cm1hcHJvZmVzaW9uYWwuY29tL2NwczBcBggrBgEFBQcCAjBQHk4AUABhAHMAZQBvACAAZABlACAA
bABhACAAQgBvAG4AYQBuAG8AdgBhACAANAA3ACAAQgBhAHIAYwBlAGwAbwBuAGEAIAAwADgAMAAx
ADcwDQYJKoZIhvcNAQEFBQADggIBABd9oPm03cXF661LJLWhAqvdpYhKsg9VSytXjDvlMd3+xDLx
51tkljYyGOylMnfX40S2wBEqgLk9am58m9Ot/MPWo+ZkKXzR4Tgegiv/J2Wv+xYVxC5xhOW1//qk
R71kMrv2JYSiJ0L1ILDCExARzRAVukKQKtJE4ZYm6zFIEv0q2skGz3QeqUvVhyj5eTSSPi5E6PaP
T481PyWzOdxjKpBrIF/EUhJOlywqrJ2X3kjyo2bbwtKDlaZmp54lD+kLM5FlClrD2VQS3a/DTg4f
Jl4N3LON7NWBcN7STyQF82xO9UxJZo3R/9ILJUFI/lGExkKvgATP0H5kSeTy36LssUzAKh3ntLFl
osS88Zj0qnAHY7S42jtM+kAiMFsRpvAFDsYCA0irhpuF3dvd6qJ2gHN99ZwExEWN57kci57q13XR
crHedUTnQn3iV2t93Jm8PYMo6oCTjcVMZcFwgbg4/EMxsvYDNEeyrPsiBsse3RdHHF9mudMaotoR
saS8I8nkvof/uZS2+F0gStRf571oe2XyFR7SOqkt6dhrJKyXWERHrVkY8SFlcN7ONGCoQPHzPKTD
KCOM/iczQ0CgFzzr6juwcqajuUpLXhZI9LK8yIySxZ2frHI2vDSANGupi5LAuBft7HZT9SQBjLMi
6Et8Vcad+qMUu2WFbm5PEn4KPJ2V
-----END CERTIFICATE-----

Izenpe.com
==========
-----BEGIN CERTIFICATE-----
MIIF8TCCA9mgAwIBAgIQALC3WhZIX7/hy/WL1xnmfTANBgkqhkiG9w0BAQsFADA4MQswCQYDVQQG
EwJFUzEUMBIGA1UECgwLSVpFTlBFIFMuQS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wHhcNMDcxMjEz
MTMwODI4WhcNMzcxMjEzMDgyNzI1WjA4MQswCQYDVQQGEwJFUzEUMBIGA1UECgwLSVpFTlBFIFMu
QS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDJ
03rKDx6sp4boFmVqscIbRTJxldn+EFvMr+eleQGPicPK8lVx93e+d5TzcqQsRNiekpsUOqHnJJAK
ClaOxdgmlOHZSOEtPtoKct2jmRXagaKH9HtuJneJWK3W6wyyQXpzbm3benhB6QiIEn6HLmYRY2xU
+zydcsC8Lv/Ct90NduM61/e0aL6i9eOBbsFGb12N4E3GVFWJGjMxCrFXuaOKmMPsOzTFlUFpfnXC
PCDFYbpRR6AgkJOhkEvzTnyFRVSa0QUmQbC1TR0zvsQDyCV8wXDbO/QJLVQnSKwv4cSsPsjLkkxT
OTcj7NMB+eAJRE1NZMDhDVqHIrytG6P+JrUV86f8hBnp7KGItERphIPzidF0BqnMC9bC3ieFUCbK
F7jJeodWLBoBHmy+E60QrLUk9TiRodZL2vG70t5HtfG8gfZZa88ZU+mNFctKy6lvROUbQc/hhqfK
0GqfvEyNBjNaooXlkDWgYlwWTvDjovoDGrQscbNYLN57C9saD+veIR8GdwYDsMnvmfzAuU8Lhij+
0rnq49qlw0dpEuDb8PYZi+17cNcC1u2HGCgsBCRMd+RIihrGO5rUD8r6ddIBQFqNeb+Lz0vPqhbB
leStTIo+F5HUsWLlguWABKQDfo2/2n+iD5dPDNMN+9fR5XJ+HMh3/1uaD7euBUbl8agW7EekFwID
AQABo4H2MIHzMIGwBgNVHREEgagwgaWBD2luZm9AaXplbnBlLmNvbaSBkTCBjjFHMEUGA1UECgw+
SVpFTlBFIFMuQS4gLSBDSUYgQTAxMzM3MjYwLVJNZXJjLlZpdG9yaWEtR2FzdGVpeiBUMTA1NSBG
NjIgUzgxQzBBBgNVBAkMOkF2ZGEgZGVsIE1lZGl0ZXJyYW5lbyBFdG9yYmlkZWEgMTQgLSAwMTAx
MCBWaXRvcmlhLUdhc3RlaXowDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0O
BBYEFB0cZQ6o8iV7tJHP5LGx5r1VdGwFMA0GCSqGSIb3DQEBCwUAA4ICAQB4pgwWSp9MiDrAyw6l
Fn2fuUhfGI8NYjb2zRlrrKvV9pF9rnHzP7MOeIWblaQnIUdCSnxIOvVFfLMMjlF4rJUT3sb9fbga
kEyrkgPH7UIBzg/YsfqikuFgba56awmqxinuaElnMIAkejEWOVt+8Rwu3WwJrfIxwYJOubv5vr8q
hT/AQKM6WfxZSzwoJNu0FXWuDYi6LnPAvViH5ULy617uHjAimcs30cQhbIHsvm0m5hzkQiCeR7Cs
g1lwLDXWrzY0tM07+DKo7+N4ifuNRSzanLh+QBxh5z6ikixL8s36mLYp//Pye6kfLqCTVyvehQP5
aTfLnnhqBbTFMXiJ7HqnheG5ezzevh55hM6fcA5ZwjUukCox2eRFekGkLhObNA5me0mrZJfQRsN5
nXJQY6aYWwa9SG3YOYNw6DXwBdGqvOPbyALqfP2C2sJbUjWumDqtujWTI6cfSN01RpiyEGjkpTHC
ClguGYEQyVB1/OpaFs4R1+7vUIgtYf8/QnMFlEPVjjxOAToZpR9GTnfQXeWBIiGH/pR9hNiTrdZo
Q0iy2+tzJOeRf1SktoA+naM8THLCV8Sg1Mw4J87VBp6iSNnpn86CcDaTmjvfliHjWbcM2pE38P1Z
WrOZyGlsQyYBNWNgVYkDOnXYukrZVP/u3oDYLdE41V4tC5h9Pmzb/CaIxw==
-----END CERTIFICATE-----

Go Daddy Root Certificate Authority - G2
========================================
-----BEGIN CERTIFICATE-----
MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT
B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoTEUdvRGFkZHkuY29tLCBJbmMu
MTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5
MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6
b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8G
A1UEAxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKDE6bFIEMBO4Tx5oVJnyfq
9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH/PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD
+qK+ihVqf94Lw7YZFAXK6sOoBJQ7RnwyDfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutd
fMh8+7ArU6SSYmlRJQVhGkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMl
NAJWJwGRtDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEAAaNC
MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFDqahQcQZyi27/a9
BUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmXWWcDYfF+OwYxdS2hII5PZYe096ac
vNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r
5N9ss4UXnT3ZJE95kTXWXwTrgIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYV
N8Gb5DKj7Tjo2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO
LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI4uJEvlz36hz1
-----END CERTIFICATE-----

Starfield Root Certificate Authority - G2
=========================================
-----BEGIN CERTIFICATE-----
MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT
B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s
b2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVsZCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0
eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgY8xCzAJBgNVBAYTAlVTMRAw
DgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFyZmllbGQg
VGVjaG5vbG9naWVzLCBJbmMuMTIwMAYDVQQDEylTdGFyZmllbGQgUm9vdCBDZXJ0aWZpY2F0ZSBB
dXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3twQP89o/8ArFv
W59I2Z154qK3A2FWGMNHttfKPTUuiUP3oWmb3ooa/RMgnLRJdzIpVv257IzdIvpy3Cdhl+72WoTs
bhm5iSzchFvVdPtrX8WJpRBSiUZV9Lh1HOZ/5FSuS/hVclcCGfgXcVnrHigHdMWdSL5stPSksPNk
N3mSwOxGXn/hbVNMYq/NHwtjuzqd+/x5AJhhdM8mgkBj87JyahkNmcrUDnXMN/uLicFZ8WJ/X7Nf
ZTD4p7dNdloedl40wOiWVpmKs/B/pM293DIxfJHP4F8R+GuqSVzRmZTRouNjWwl2tVZi4Ut0HZbU
JtQIBFnQmA4O5t78w+wfkPECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
AQYwHQYDVR0OBBYEFHwMMh+n2TB/xH1oo2Kooc6rB1snMA0GCSqGSIb3DQEBCwUAA4IBAQARWfol
TwNvlJk7mh+ChTnUdgWUXuEok21iXQnCoKjUsHU48TRqneSfioYmUeYs0cYtbpUgSpIB7LiKZ3sx
4mcujJUDJi5DnUox9g61DLu34jd/IroAow57UvtruzvE03lRTs2Q9GcHGcg8RnoNAX3FWOdt5oUw
F5okxBDgBPfg8n/Uqgr/Qh037ZTlZFkSIHc40zI+OIF1lnP6aI+xy84fxez6nH7PfrHxBy22/L/K
pL/QlwVKvOoYKAKQvVR4CSFx09F9HdkWsKlhPdAKACL8x3vLCWRFCztAgfd9fDL1mMpYjn0q7pBZ
c2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0
-----END CERTIFICATE-----

Starfield Services Root Certificate Authority - G2
==================================================
-----BEGIN CERTIFICATE-----
MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMxEDAOBgNVBAgT
B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s
b2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVsZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRl
IEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNV
BAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxT
dGFyZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTswOQYDVQQDEzJTdGFyZmllbGQgU2VydmljZXMg
Um9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
AQoCggEBANUMOsQq+U7i9b4Zl1+OiFOxHz/Lz58gE20pOsgPfTz3a3Y4Y9k2YKibXlwAgLIvWX/2
h/klQ4bnaRtSmpDhcePYLQ1Ob/bISdm28xpWriu2dBTrz/sm4xq6HZYuajtYlIlHVv8loJNwU4Pa
hHQUw2eeBGg6345AWh1KTs9DkTvnVtYAcMtS7nt9rjrnvDH5RfbCYM8TWQIrgMw0R9+53pBlbQLP
LJGmpufehRhJfGZOozptqbXuNC66DQO4M99H67FrjSXZm86B0UVGMpZwh94CDklDhbZsc7tk6mFB
rMnUVN+HL8cisibMn1lUaJ/8viovxFUcdUBgF4UCVTmLfwUCAwEAAaNCMEAwDwYDVR0TAQH/BAUw
AwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJxfAN+qAdcwKziIorhtSpzyEZGDMA0GCSqG
SIb3DQEBCwUAA4IBAQBLNqaEd2ndOxmfZyMIbw5hyf2E3F/YNoHN2BtBLZ9g3ccaaNnRbobhiCPP
E95Dz+I0swSdHynVv/heyNXBve6SbzJ08pGCL72CQnqtKrcgfU28elUSwhXqvfdqlS5sdJ/PHLTy
xQGjhdByPq1zqwubdQxtRbeOlKyWN7Wg0I8VRw7j6IPdj/3vQQF3zCepYoUz8jcI73HPdwbeyBkd
iEDPfUYd/x7H4c7/I9vG+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn0q23KXB56jza
YyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCNsSi6
-----END CERTIFICATE-----

AffirmTrust Commercial
======================
-----BEGIN CERTIFICATE-----
MIIDTDCCAjSgAwIBAgIId3cGJyapsXwwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCVVMxFDAS
BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMB4XDTEw
MDEyOTE0MDYwNloXDTMwMTIzMTE0MDYwNlowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly
bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMIIBIjANBgkqhkiG9w0BAQEF
AAOCAQ8AMIIBCgKCAQEA9htPZwcroRX1BiLLHwGy43NFBkRJLLtJJRTWzsO3qyxPxkEylFf6Eqdb
DuKPHx6GGaeqtS25Xw2Kwq+FNXkyLbscYjfysVtKPcrNcV/pQr6U6Mje+SJIZMblq8Yrba0F8PrV
C8+a5fBQpIs7R6UjW3p6+DM/uO+Zl+MgwdYoic+U+7lF7eNAFxHUdPALMeIrJmqbTFeurCA+ukV6
BfO9m2kVrn1OIGPENXY6BwLJN/3HR+7o8XYdcxXyl6S1yHp52UKqK39c/s4mT6NmgTWvRLpUHhww
MmWd5jyTXlBOeuM61G7MGvv50jeuJCqrVwMiKA1JdX+3KNp1v47j3A55MQIDAQABo0IwQDAdBgNV
HQ4EFgQUnZPGU4teyq8/nx4P5ZmVvCT2lI8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
AQYwDQYJKoZIhvcNAQELBQADggEBAFis9AQOzcAN/wr91LoWXym9e2iZWEnStB03TX8nfUYGXUPG
hi4+c7ImfU+TqbbEKpqrIZcUsd6M06uJFdhrJNTxFq7YpFzUf1GO7RgBsZNjvbz4YYCanrHOQnDi
qX0GJX0nof5v7LMeJNrjS1UaADs1tDvZ110w/YETifLCBivtZ8SOyUOyXGsViQK8YvxO8rUzqrJv
0wqiUOP2O+guRMLbZjipM1ZI8W0bM40NjD9gN53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0kh
sUlHRUe072o0EclNmsxZt9YCnlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8=
-----END CERTIFICATE-----

AffirmTrust Networking
======================
-----BEGIN CERTIFICATE-----
MIIDTDCCAjSgAwIBAgIIfE8EORzUmS0wDQYJKoZIhvcNAQEFBQAwRDELMAkGA1UEBhMCVVMxFDAS
BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMB4XDTEw
MDEyOTE0MDgyNFoXDTMwMTIzMTE0MDgyNFowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly
bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMIIBIjANBgkqhkiG9w0BAQEF
AAOCAQ8AMIIBCgKCAQEAtITMMxcua5Rsa2FSoOujz3mUTOWUgJnLVWREZY9nZOIG41w3SfYvm4SE
Hi3yYJ0wTsyEheIszx6e/jarM3c1RNg1lho9Nuh6DtjVR6FqaYvZ/Ls6rnla1fTWcbuakCNrmreI
dIcMHl+5ni36q1Mr3Lt2PpNMCAiMHqIjHNRqrSK6mQEubWXLviRmVSRLQESxG9fhwoXA3hA/Pe24
/PHxI1Pcv2WXb9n5QHGNfb2V1M6+oF4nI979ptAmDgAp6zxG8D1gvz9Q0twmQVGeFDdCBKNwV6gb
h+0t+nvujArjqWaJGctB+d1ENmHP4ndGyH329JKBNv3bNPFyfvMMFr20FQIDAQABo0IwQDAdBgNV
HQ4EFgQUBx/S55zawm6iQLSwelAQUHTEyL0wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
AQYwDQYJKoZIhvcNAQEFBQADggEBAIlXshZ6qML91tmbmzTCnLQyFE2npN/svqe++EPbkTfOtDIu
UFUaNU52Q3Eg75N3ThVwLofDwR1t3Mu1J9QsVtFSUzpE0nPIxBsFZVpikpzuQY0x2+c06lkh1QF6
12S4ZDnNye2v7UsDSKegmQGA3GWjNq5lWUhPgkvIZfFXHeVZLgo/bNjR9eUJtGxUAArgFU2HdW23
WJZa3W3SAKD0m0i+wzekujbgfIeFlxoVot4uolu9rxj5kFDNcFn4J2dHy8egBzp90SxdbBk6ZrV9
/ZFvgrG+CJPbFEfxojfHRZ48x3evZKiT3/Zpg4Jg8klCNO1aAFSFHBY2kgxc+qatv9s=
-----END CERTIFICATE-----

AffirmTrust Premium
===================
-----BEGIN CERTIFICATE-----
MIIFRjCCAy6gAwIBAgIIbYwURrGmCu4wDQYJKoZIhvcNAQEMBQAwQTELMAkGA1UEBhMCVVMxFDAS
BgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVzdCBQcmVtaXVtMB4XDTEwMDEy
OTE0MTAzNloXDTQwMTIzMTE0MTAzNlowQTELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRy
dXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVzdCBQcmVtaXVtMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
MIICCgKCAgEAxBLfqV/+Qd3d9Z+K4/as4Tx4mrzY8H96oDMq3I0gW64tb+eT2TZwamjPjlGjhVtn
BKAQJG9dKILBl1fYSCkTtuG+kU3fhQxTGJoeJKJPj/CihQvL9Cl/0qRY7iZNyaqoe5rZ+jjeRFcV
5fiMyNlI4g0WJx0eyIOFJbe6qlVBzAMiSy2RjYvmia9mx+n/K+k8rNrSs8PhaJyJ+HoAVt70VZVs
+7pk3WKL3wt3MutizCaam7uqYoNMtAZ6MMgpv+0GTZe5HMQxK9VfvFMSF5yZVylmd2EhMQcuJUmd
GPLu8ytxjLW6OQdJd/zvLpKQBY0tL3d770O/Nbua2Plzpyzy0FfuKE4mX4+QaAkvuPjcBukumj5R
p9EixAqnOEhss/n/fauGV+O61oV4d7pD6kh/9ti+I20ev9E2bFhc8e6kGVQa9QPSdubhjL08s9NI
S+LI+H+SqHZGnEJlPqQewQcDWkYtuJfzt9WyVSHvutxMAJf7FJUnM7/oQ0dG0giZFmA7mn7S5u04
6uwBHjxIVkkJx0w3AJ6IDsBz4W9m6XJHMD4Q5QsDyZpCAGzFlH5hxIrff4IaC1nEWTJ3s7xgaVY5
/bQGeyzWZDbZvUjthB9+pSKPKrhC9IK31FOQeE4tGv2Bb0TXOwF0lkLgAOIua+rF7nKsu7/+6qqo
+Nz2snmKtmcCAwEAAaNCMEAwHQYDVR0OBBYEFJ3AZ6YMItkm9UWrpmVSESfYRaxjMA8GA1UdEwEB
/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBDAUAA4ICAQCzV00QYk465KzquByv
MiPIs0laUZx2KI15qldGF9X1Uva3ROgIRL8YhNILgM3FEv0AVQVhh0HctSSePMTYyPtwni94loMg
Nt58D2kTiKV1NpgIpsbfrM7jWNa3Pt668+s0QNiigfV4Py/VpfzZotReBA4Xrf5B8OWycvpEgjNC
6C1Y91aMYj+6QrCcDFx+LmUmXFNPALJ4fqENmS2NuB2OosSw/WDQMKSOyARiqcTtNd56l+0OOF6S
L5Nwpamcb6d9Ex1+xghIsV5n61EIJenmJWtSKZGc0jlzCFfemQa0W50QBuHCAKi4HEoCChTQwUHK
+4w1IX2COPKpVJEZNZOUbWo6xbLQu4mGk+ibyQ86p3q4ofB4Rvr8Ny/lioTz3/4E2aFooC8k4gmV
BtWVyuEklut89pMFu+1z6S3RdTnX5yTb2E5fQ4+e0BQ5v1VwSJlXMbSc7kqYA5YwH2AG7hsj/oFg
IxpHYoWlzBk0gG+zrBrjn/B7SK3VAdlntqlyk+otZrWyuOQ9PLLvTIzq6we/qzWaVYa8GKa1qF60
g2xraUDTn9zxw2lrueFtCfTxqlB2Cnp9ehehVZZCmTEJ3WARjQUwfuaORtGdFNrHF+QFlozEJLUb
zxQHskD4o55BhrwE0GuWyCqANP2/7waj3VjFhT0+j/6eKeC2uAloGRwYQw==
-----END CERTIFICATE-----

AffirmTrust Premium ECC
=======================
-----BEGIN CERTIFICATE-----
MIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMCVVMxFDASBgNV
BAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQcmVtaXVtIEVDQzAeFw0xMDAx
MjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJBgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1U
cnVzdDEgMB4GA1UEAwwXQWZmaXJtVHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQA
IgNiAAQNMF4bFZ0D0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQ
N8O9ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0GA1UdDgQW
BBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAK
BggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/VsaobgxCd05DhT1wV/GzTjxi+zygk8N53X
57hG8f2h4nECMEJZh0PUUd+60wkyWs6Iflc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKM
eQ==
-----END CERTIFICATE-----

Certum Trusted Network CA
=========================
-----BEGIN CERTIFICATE-----
MIIDuzCCAqOgAwIBAgIDBETAMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNVBAYTAlBMMSIwIAYDVQQK
ExlVbml6ZXRvIFRlY2hub2xvZ2llcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlv
biBBdXRob3JpdHkxIjAgBgNVBAMTGUNlcnR1bSBUcnVzdGVkIE5ldHdvcmsgQ0EwHhcNMDgxMDIy
MTIwNzM3WhcNMjkxMjMxMTIwNzM3WjB+MQswCQYDVQQGEwJQTDEiMCAGA1UEChMZVW5pemV0byBU
ZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENlcnRpZmljYXRpb24gQXV0aG9yaXR5
MSIwIAYDVQQDExlDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC
AQ8AMIIBCgKCAQEA4/t9o3K6wvDJFIf1awFO4W5AB7ptJ11/91sts1rHUV+rpDKmYYe2bg+G0jAC
l/jXaVehGDldamR5xgFZrDwxSjh80gTSSyjoIF87B6LMTXPb865Px1bVWqeWifrzq2jUI4ZZJ88J
J7ysbnKDHDBy3+Ci6dLhdHUZvSqeexVUBBvXQzmtVSjF4hq79MDkrjhJM8x2hZ85RdKknvISjFH4
fOQtf/WsX+sWn7Et0brMkUJ3TCXJkDhv2/DM+44el1k+1WBO5gUo7Ul5E0u6SNsv+XLTOcr+H9g0
cvW0QM8xAcPs3hEtF10fuFDRXhmnad4HMyjKUJX5p1TLVIZQRan5SQIDAQABo0IwQDAPBgNVHRMB
Af8EBTADAQH/MB0GA1UdDgQWBBQIds3LB/8k9sXN7buQvOKEN0Z19zAOBgNVHQ8BAf8EBAMCAQYw
DQYJKoZIhvcNAQEFBQADggEBAKaorSLOAT2mo/9i0Eidi15ysHhE49wcrwn9I0j6vSrEuVUEtRCj
jSfeC4Jj0O7eDDd5QVsisrCaQVymcODU0HfLI9MA4GxWL+FpDQ3Zqr8hgVDZBqWo/5U30Kr+4rP1
mS1FhIrlQgnXdAIv94nYmem8J9RHjboNRhx3zxSkHLmkMcScKHQDNP8zGSal6Q10tz6XxnboJ5aj
Zt3hrvJBW8qYVoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI
03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw=
-----END CERTIFICATE-----

TWCA Root Certification Authority
=================================
-----BEGIN CERTIFICATE-----
MIIDezCCAmOgAwIBAgIBATANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJUVzESMBAGA1UECgwJ
VEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NBIFJvb3QgQ2VydGlmaWNh
dGlvbiBBdXRob3JpdHkwHhcNMDgwODI4MDcyNDMzWhcNMzAxMjMxMTU1OTU5WjBfMQswCQYDVQQG
EwJUVzESMBAGA1UECgwJVEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NB
IFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
AoIBAQCwfnK4pAOU5qfeCTiRShFAh6d8WWQUe7UREN3+v9XAu1bihSX0NXIP+FPQQeFEAcK0HMMx
QhZHhTMidrIKbw/lJVBPhYa+v5guEGcevhEFhgWQxFnQfHgQsIBct+HHK3XLfJ+utdGdIzdjp9xC
oi2SBBtQwXu4PhvJVgSLL1KbralW6cH/ralYhzC2gfeXRfwZVzsrb+RH9JlF/h3x+JejiB03HFyP
4HYlmlD4oFT/RJB2I9IyxsOrBr/8+7/zrX2SYgJbKdM1o5OaQ2RgXbL6Mv87BK9NQGr5x+PvI/1r
y+UPizgN7gr8/g+YnzAx3WxSZfmLgb4i4RxYA7qRG4kHAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIB
BjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqOFsmjd6LWvJPelSDGRjjCDWmujANBgkqhkiG
9w0BAQUFAAOCAQEAPNV3PdrfibqHDAhUaiBQkr6wQT25JmSDCi/oQMCXKCeCMErJk/9q56YAf4lC
mtYR5VPOL8zy2gXE/uJQxDqGfczafhAJO5I1KlOy/usrBdlsXebQ79NqZp4VKIV66IIArB6nCWlW
QtNoURi+VJq/REG6Sb4gumlc7rh3zc5sH62Dlhh9DrUUOYTxKOkto557HnpyWoOzeW/vtPzQCqVY
T0bf+215WfKEIlKuD8z7fDvnaspHYcN6+NOSBB+4IIThNlQWx0DeO4pz3N/GCUzf7Nr/1FNCocny
Yh0igzyXxfkZYiesZSLX0zzG5Y6yU8xJzrww/nsOM5D77dIUkR8Hrw==
-----END CERTIFICATE-----

Security Communication RootCA2
==============================
-----BEGIN CERTIFICATE-----
MIIDdzCCAl+gAwIBAgIBADANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJKUDElMCMGA1UEChMc
U0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UECxMeU2VjdXJpdHkgQ29tbXVuaWNh
dGlvbiBSb290Q0EyMB4XDTA5MDUyOTA1MDAzOVoXDTI5MDUyOTA1MDAzOVowXTELMAkGA1UEBhMC
SlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xJzAlBgNVBAsTHlNlY3Vy
aXR5IENvbW11bmljYXRpb24gUm9vdENBMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
ANAVOVKxUrO6xVmCxF1SrjpDZYBLx/KWvNs2l9amZIyoXvDjChz335c9S672XewhtUGrzbl+dp++
+T42NKA7wfYxEUV0kz1XgMX5iZnK5atq1LXaQZAQwdbWQonCv/Q4EpVMVAX3NuRFg3sUZdbcDE3R
3n4MqzvEFb46VqZab3ZpUql6ucjrappdUtAtCms1FgkQhNBqyjoGADdH5H5XTz+L62e4iKrFvlNV
spHEfbmwhRkGeC7bYRr6hfVKkaHnFtWOojnflLhwHyg/i/xAXmODPIMqGplrz95Zajv8bxbXH/1K
EOtOghY6rCcMU/Gt1SSwawNQwS08Ft1ENCcadfsCAwEAAaNCMEAwHQYDVR0OBBYEFAqFqXdlBZh8
QIH4D5csOPEK7DzPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEB
CwUAA4IBAQBMOqNErLlFsceTfsgLCkLfZOoc7llsCLqJX2rKSpWeeo8HxdpFcoJxDjrSzG+ntKEj
u/Ykn8sX/oymzsLS28yN/HH8AynBbF0zX2S2ZTuJbxh2ePXcokgfGT+Ok+vx+hfuzU7jBBJV1uXk
3fs+BXziHV7Gp7yXT2g69ekuCkO2r1dcYmh8t/2jioSgrGK+KwmHNPBqAbubKVY8/gA3zyNs8U6q
tnRGEmyR7jTV7JqR50S+kDFy1UkC9gLl9B/rfNmWVan/7Ir5mUf/NVoCqgTLiluHcSmRvaS0eg29
mvVXIwAHIRc/SjnRBUkLp7Y3gaVdjKozXoEofKd9J+sAro03
-----END CERTIFICATE-----

Actalis Authentication Root CA
==============================
-----BEGIN CERTIFICATE-----
MIIFuzCCA6OgAwIBAgIIVwoRl0LE48wwDQYJKoZIhvcNAQELBQAwazELMAkGA1UEBhMCSVQxDjAM
BgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlzIFMucC5BLi8wMzM1ODUyMDk2NzEnMCUGA1UE
AwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290IENBMB4XDTExMDkyMjExMjIwMloXDTMwMDky
MjExMjIwMlowazELMAkGA1UEBhMCSVQxDjAMBgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlz
IFMucC5BLi8wMzM1ODUyMDk2NzEnMCUGA1UEAwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290
IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAp8bEpSmkLO/lGMWwUKNvUTufClrJ
wkg4CsIcoBh/kbWHuUA/3R1oHwiD1S0eiKD4j1aPbZkCkpAW1V8IbInX4ay8IMKx4INRimlNAJZa
by/ARH6jDuSRzVju3PvHHkVH3Se5CAGfpiEd9UEtL0z9KK3giq0itFZljoZUj5NDKd45RnijMCO6
zfB9E1fAXdKDa0hMxKufgFpbOr3JpyI/gCczWw63igxdBzcIy2zSekciRDXFzMwujt0q7bd9Zg1f
YVEiVRvjRuPjPdA1YprbrxTIW6HMiRvhMCb8oJsfgadHHwTrozmSBp+Z07/T6k9QnBn+locePGX2
oxgkg4YQ51Q+qDp2JE+BIcXjDwL4k5RHILv+1A7TaLndxHqEguNTVHnd25zS8gebLra8Pu2Fbe8l
EfKXGkJh90qX6IuxEAf6ZYGyojnP9zz/GPvG8VqLWeICrHuS0E4UT1lF9gxeKF+w6D9Fz8+vm2/7
hNN3WpVvrJSEnu68wEqPSpP4RCHiMUVhUE4Q2OM1fEwZtN4Fv6MGn8i1zeQf1xcGDXqVdFUNaBr8
EBtiZJ1t4JWgw5QHVw0U5r0F+7if5t+L4sbnfpb2U8WANFAoWPASUHEXMLrmeGO89LKtmyuy/uE5
jF66CyCU3nuDuP/jVo23Eek7jPKxwV2dpAtMK9myGPW1n0sCAwEAAaNjMGEwHQYDVR0OBBYEFFLY
iDrIn3hm7YnzezhwlMkCAjbQMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUUtiIOsifeGbt
ifN7OHCUyQICNtAwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBCwUAA4ICAQALe3KHwGCmSUyI
WOYdiPcUZEim2FgKDk8TNd81HdTtBjHIgT5q1d07GjLukD0R0i70jsNjLiNmsGe+b7bAEzlgqqI0
JZN1Ut6nna0Oh4lScWoWPBkdg/iaKWW+9D+a2fDzWochcYBNy+A4mz+7+uAwTc+G02UQGRjRlwKx
K3JCaKygvU5a2hi/a5iB0P2avl4VSM0RFbnAKVy06Ij3Pjaut2L9HmLecHgQHEhb2rykOLpn7VU+
Xlff1ANATIGk0k9jpwlCCRT8AKnCgHNPLsBA2RF7SOp6AsDT6ygBJlh0wcBzIm2Tlf05fbsq4/aC
4yyXX04fkZT6/iyj2HYauE2yOE+b+h1IYHkm4vP9qdCa6HCPSXrW5b0KDtst842/6+OkfcvHlXHo
2qN8xcL4dJIEG4aspCJTQLas/kx2z/uUMsA1n3Y/buWQbqCmJqK4LL7RK4X9p2jIugErsWx0Hbhz
lefut8cl8ABMALJ+tguLHPPAUJ4lueAI3jZm/zel0btUZCzJJ7VLkn5l/9Mt4blOvH+kQSGQQXem
OR/qnuOf0GZvBeyqdn6/axag67XH/JJULysRJyU3eExRarDzzFhdFPFqSBX/wge2sY0PjlxQRrM9
vwGYT7JZVEc+NHt4bVaTLnPqZih4zR0Uv6CPLy64Lo7yFIrM6bV8+2ydDKXhlg==
-----END CERTIFICATE-----

Buypass Class 2 Root CA
=======================
-----BEGIN CERTIFICATE-----
MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU
QnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMiBSb290IENBMB4X
DTEwMTAyNjA4MzgwM1oXDTQwMTAyNjA4MzgwM1owTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1
eXBhc3MgQVMtOTgzMTYzMzI3MSAwHgYDVQQDDBdCdXlwYXNzIENsYXNzIDIgUm9vdCBDQTCCAiIw
DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANfHXvfBB9R3+0Mh9PT1aeTuMgHbo4Yf5FkNuud1
g1Lr6hxhFUi7HQfKjK6w3Jad6sNgkoaCKHOcVgb/S2TwDCo3SbXlzwx87vFKu3MwZfPVL4O2fuPn
9Z6rYPnT8Z2SdIrkHJasW4DptfQxh6NR/Md+oW+OU3fUl8FVM5I+GC911K2GScuVr1QGbNgGE41b
/+EmGVnAJLqBcXmQRFBoJJRfuLMR8SlBYaNByyM21cHxMlAQTn/0hpPshNOOvEu/XAFOBz3cFIqU
CqTqc/sLUegTBxj6DvEr0VQVfTzh97QZQmdiXnfgolXsttlpF9U6r0TtSsWe5HonfOV116rLJeff
awrbD02TTqigzXsu8lkBarcNuAeBfos4GzjmCleZPe4h6KP1DBbdi+w0jpwqHAAVF41og9JwnxgI
zRFo1clrUs3ERo/ctfPYV3Me6ZQ5BL/T3jjetFPsaRyifsSP5BtwrfKi+fv3FmRmaZ9JUaLiFRhn
Bkp/1Wy1TbMz4GHrXb7pmA8y1x1LPC5aAVKRCfLf6o3YBkBjqhHk/sM3nhRSP/TizPJhk9H9Z2vX
Uq6/aKtAQ6BXNVN48FP4YUIHZMbXb5tMOA1jrGKvNouicwoN9SG9dKpN6nIDSdvHXx1iY8f93ZHs
M+71bbRuMGjeyNYmsHVee7QHIJihdjK4TWxPAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD
VR0OBBYEFMmAd+BikoL1RpzzuvdMw964o605MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsF
AAOCAgEAU18h9bqwOlI5LJKwbADJ784g7wbylp7ppHR/ehb8t/W2+xUbP6umwHJdELFx7rxP462s
A20ucS6vxOOto70MEae0/0qyexAQH6dXQbLArvQsWdZHEIjzIVEpMMpghq9Gqx3tOluwlN5E40EI
osHsHdb9T7bWR9AUC8rmyrV7d35BH16Dx7aMOZawP5aBQW9gkOLo+fsicdl9sz1Gv7SEr5AcD48S
aq/v7h56rgJKihcrdv6sVIkkLE8/trKnToyokZf7KcZ7XC25y2a2t6hbElGFtQl+Ynhw/qlqYLYd
DnkM/crqJIByw5c/8nerQyIKx+u2DISCLIBrQYoIwOula9+ZEsuK1V6ADJHgJgg2SMX6OBE1/yWD
LfJ6v9r9jv6ly0UsH8SIU653DtmadsWOLB2jutXsMq7Aqqz30XpN69QH4kj3Io6wpJ9qzo6ysmD0
oyLQI+uUWnpp3Q+/QFesa1lQ2aOZ4W7+jQF5JyMV3pKdewlNWudLSDBaGOYKbeaP4NK75t98biGC
wWg5TbSYWGZizEqQXsP6JwSxeRV0mcy+rSDeJmAc61ZRpqPq5KM/p/9h3PFaTWwyI0PurKju7koS
CTxdccK+efrCh2gdC/1cacwG0Jp9VJkqyTkaGa9LKkPzY11aWOIv4x3kqdbQCtCev9eBCfHJxyYN
rJgWVqA=
-----END CERTIFICATE-----

Buypass Class 3 Root CA
=======================
-----BEGIN CERTIFICATE-----
MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU
QnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMyBSb290IENBMB4X
DTEwMTAyNjA4Mjg1OFoXDTQwMTAyNjA4Mjg1OFowTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1
eXBhc3MgQVMtOTgzMTYzMzI3MSAwHgYDVQQDDBdCdXlwYXNzIENsYXNzIDMgUm9vdCBDQTCCAiIw
DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKXaCpUWUOOV8l6ddjEGMnqb8RB2uACatVI2zSRH
sJ8YZLya9vrVediQYkwiL944PdbgqOkcLNt4EemOaFEVcsfzM4fkoF0LXOBXByow9c3EN3coTRiR
5r/VUv1xLXA+58bEiuPwKAv0dpihi4dVsjoT/Lc+JzeOIuOoTyrvYLs9tznDDgFHmV0ST9tD+leh
7fmdvhFHJlsTmKtdFoqwNxxXnUX/iJY2v7vKB3tvh2PX0DJq1l1sDPGzbjniazEuOQAnFN44wOwZ
ZoYS6J1yFhNkUsepNxz9gjDthBgd9K5c/3ATAOux9TN6S9ZV+AWNS2mw9bMoNlwUxFFzTWsL8TQH
2xc519woe2v1n/MuwU8XKhDzzMro6/1rqy6any2CbgTUUgGTLT2G/H783+9CHaZr77kgxve9oKeV
/afmiSTYzIw0bOIjL9kSGiG5VZFvC5F5GQytQIgLcOJ60g7YaEi7ghM5EFjp2CoHxhLbWNvSO1UQ
RwUVZ2J+GGOmRj8JDlQyXr8NYnon74Do29lLBlo3WiXQCBJ31G8JUJc9yB3D34xFMFbG02SrZvPA
Xpacw8Tvw3xrizp5f7NJzz3iiZ+gMEuFuZyUJHmPfWupRWgPK9Dx2hzLabjKSWJtyNBjYt1gD1iq
j6G8BaVmos8bdrKEZLFMOVLAMLrwjEsCsLa3AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD
VR0OBBYEFEe4zf/lb+74suwvTg75JbCOPGvDMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsF
AAOCAgEAACAjQTUEkMJAYmDv4jVM1z+s4jSQuKFvdvoWFqRINyzpkMLyPPgKn9iB5btb2iUspKdV
cSQy9sgL8rxq+JOssgfCX5/bzMiKqr5qb+FJEMwx14C7u8jYog5kV+qi9cKpMRXSIGrs/CIBKM+G
uIAeqcwRpTzyFrNHnfzSgCHEy9BHcEGhyoMZCCxt8l13nIoUE9Q2HJLw5QY33KbmkJs4j1xrG0aG
Q0JfPgEHU1RdZX33inOhmlRaHylDFCfChQ+1iHsaO5S3HWCntZznKWlXWpuTekMwGwPXYshApqr8
ZORK15FTAaggiG6cX0S5y2CBNOxv033aSF/rtJC8LakcC6wc1aJoIIAE1vyxjy+7SjENSoYc6+I2
KSb12tjE8nVhz36udmNKekBlk4f4HoCMhuWG1o8O/FMsYOgWYRqiPkN7zTlgVGr18okmAWiDSKIz
6MkEkbIRNBE+6tBDGR8Dk5AM/1E9V/RBbuHLoL7ryWPNbczk+DaqaJ3tvV2XcEQNtg413OEMXbug
UZTLfhbrES+jkkXITHHZvMmZUldGL1DPvTVp9D0VzgalLA8+9oG6lLvDu79leNKGef9JOxqDDPDe
eOzI8k1MGt6CKfjBWtrt7uYnXuhF0J0cUahoq0Tj0Itq4/g7u9xN12TyUb7mqqta6THuBrxzvxNi
Cp/HuZc=
-----END CERTIFICATE-----

T-TeleSec GlobalRoot Class 3
============================
-----BEGIN CERTIFICATE-----
MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoM
IlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBU
cnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwHhcNMDgx
MDAxMTAyOTU2WhcNMzMxMDAxMjM1OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lz
dGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBD
ZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwggEiMA0GCSqGSIb3
DQEBAQUAA4IBDwAwggEKAoIBAQC9dZPwYiJvJK7genasfb3ZJNW4t/zN8ELg63iIVl6bmlQdTQyK
9tPPcPRStdiTBONGhnFBSivwKixVA9ZIw+A5OO3yXDw/RLyTPWGrTs0NvvAgJ1gORH8EGoel15YU
NpDQSXuhdfsaa3Ox+M6pCSzyU9XDFES4hqX2iys52qMzVNn6chr3IhUciJFrf2blw2qAsCTz34ZF
iP0Zf3WHHx+xGwpzJFu5ZeAsVMhg02YXP+HMVDNzkQI6pn97djmiH5a2OK61yJN0HZ65tOVgnS9W
0eDrXltMEnAMbEQgqxHY9Bn20pxSN+f6tsIxO0rUFJmtxxr1XV/6B7h8DR/Wgx6zAgMBAAGjQjBA
MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS1A/d2O2GCahKqGFPr
AyGUv/7OyjANBgkqhkiG9w0BAQsFAAOCAQEAVj3vlNW92nOyWL6ukK2YJ5f+AbGwUgC4TeQbIXQb
fsDuXmkqJa9c1h3a0nnJ85cp4IaH3gRZD/FZ1GSFS5mvJQQeyUapl96Cshtwn5z2r3Ex3XsFpSzT
ucpH9sry9uetuUg/vBa3wW306gmv7PO15wWeph6KU1HWk4HMdJP2udqmJQV0eVp+QD6CSyYRMG7h
P0HHRwA11fXT91Q+gT3aSWqas+8QPebrb9HIIkfLzM8BMZLZGOMivgkeGj5asuRrDFR6fUNOuIml
e9eiPZaGzPImNC1qkp2aGtAw4l1OBLBfiyB+d8E9lYLRRpo7PHi4b6HQDWSieB4pTpPDpFQUWw==
-----END CERTIFICATE-----

D-TRUST Root Class 3 CA 2 2009
==============================
-----BEGIN CERTIFICATE-----
MIIEMzCCAxugAwIBAgIDCYPzMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQK
DAxELVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTAe
Fw0wOTExMDUwODM1NThaFw0yOTExMDUwODM1NThaME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQKDAxE
LVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTCCASIw
DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANOySs96R+91myP6Oi/WUEWJNTrGa9v+2wBoqOAD
ER03UAifTUpolDWzU9GUY6cgVq/eUXjsKj3zSEhQPgrfRlWLJ23DEE0NkVJD2IfgXU42tSHKXzlA
BF9bfsyjxiupQB7ZNoTWSPOSHjRGICTBpFGOShrvUD9pXRl/RcPHAY9RySPocq60vFYJfxLLHLGv
KZAKyVXMD9O0Gu1HNVpK7ZxzBCHQqr0ME7UAyiZsxGsMlFqVlNpQmvH/pStmMaTJOKDfHR+4CS7z
p+hnUquVH+BGPtikw8paxTGA6Eian5Rp/hnd2HN8gcqW3o7tszIFZYQ05ub9VxC1X3a/L7AQDcUC
AwEAAaOCARowggEWMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFP3aFMSfMN4hvR5COfyrYyNJ
4PGEMA4GA1UdDwEB/wQEAwIBBjCB0wYDVR0fBIHLMIHIMIGAoH6gfIZ6bGRhcDovL2RpcmVjdG9y
eS5kLXRydXN0Lm5ldC9DTj1ELVRSVVNUJTIwUm9vdCUyMENsYXNzJTIwMyUyMENBJTIwMiUyMDIw
MDksTz1ELVRydXN0JTIwR21iSCxDPURFP2NlcnRpZmljYXRlcmV2b2NhdGlvbmxpc3QwQ6BBoD+G
PWh0dHA6Ly93d3cuZC10cnVzdC5uZXQvY3JsL2QtdHJ1c3Rfcm9vdF9jbGFzc18zX2NhXzJfMjAw
OS5jcmwwDQYJKoZIhvcNAQELBQADggEBAH+X2zDI36ScfSF6gHDOFBJpiBSVYEQBrLLpME+bUMJm
2H6NMLVwMeniacfzcNsgFYbQDfC+rAF1hM5+n02/t2A7nPPKHeJeaNijnZflQGDSNiH+0LS4F9p0
o3/U37CYAqxva2ssJSRyoWXuJVrl5jLn8t+rSfrzkGkj2wTZ51xY/GXUl77M/C4KzCUqNQT4YJEV
dT1B/yMfGchs64JTBKbkTCJNjYy6zltz7GRUUG3RnFX7acM2w4y8PIWmawomDeCTmGCufsYkl4ph
X5GOZpIJhzbNi5stPvZR1FDUWSi9g/LMKHtThm3YJohw1+qRzT65ysCQblrGXnRl11z+o+I=
-----END CERTIFICATE-----

D-TRUST Root Class 3 CA 2 EV 2009
=================================
-----BEGIN CERTIFICATE-----
MIIEQzCCAyugAwIBAgIDCYP0MA0GCSqGSIb3DQEBCwUAMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK
DAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw
OTAeFw0wOTExMDUwODUwNDZaFw0yOTExMDUwODUwNDZaMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK
DAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw
OTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJnxhDRwui+3MKCOvXwEz75ivJn9gpfS
egpnljgJ9hBOlSJzmY3aFS3nBfwZcyK3jpgAvDw9rKFs+9Z5JUut8Mxk2og+KbgPCdM03TP1YtHh
zRnp7hhPTFiu4h7WDFsVWtg6uMQYZB7jM7K1iXdODL/ZlGsTl28So/6ZqQTMFexgaDbtCHu39b+T
7WYxg4zGcTSHThfqr4uRjRxWQa4iN1438h3Z0S0NL2lRp75mpoo6Kr3HGrHhFPC+Oh25z1uxav60
sUYgovseO3Dvk5h9jHOW8sXvhXCtKSb8HgQ+HKDYD8tSg2J87otTlZCpV6LqYQXY+U3EJ/pure35
11H3a6UCAwEAAaOCASQwggEgMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNOUikxiEyoZLsyv
cop9NteaHNxnMA4GA1UdDwEB/wQEAwIBBjCB3QYDVR0fBIHVMIHSMIGHoIGEoIGBhn9sZGFwOi8v
ZGlyZWN0b3J5LmQtdHJ1c3QubmV0L0NOPUQtVFJVU1QlMjBSb290JTIwQ2xhc3MlMjAzJTIwQ0El
MjAyJTIwRVYlMjAyMDA5LE89RC1UcnVzdCUyMEdtYkgsQz1ERT9jZXJ0aWZpY2F0ZXJldm9jYXRp
b25saXN0MEagRKBChkBodHRwOi8vd3d3LmQtdHJ1c3QubmV0L2NybC9kLXRydXN0X3Jvb3RfY2xh
c3NfM19jYV8yX2V2XzIwMDkuY3JsMA0GCSqGSIb3DQEBCwUAA4IBAQA07XtaPKSUiO8aEXUHL7P+
PPoeUSbrh/Yp3uDx1MYkCenBz1UbtDDZzhr+BlGmFaQt77JLvyAoJUnRpjZ3NOhk31KxEcdzes05
nsKtjHEh8lprr988TlWvsoRlFIm5d8sqMb7Po23Pb0iUMkZv53GMoKaEGTcH8gNFCSuGdXzfX2lX
ANtu2KZyIktQ1HWYVt+3GP9DQ1CuekR78HlR10M9p9OB0/DJT7naxpeG0ILD5EJt/rDiZE4OJudA
NCa1CInXCGNjOCd1HjPqbqjdn5lPdE2BiYBL3ZqXKVwvvoFBuYz/6n1gBp7N1z3TLqMVvKjmJuVv
w9y4AyHqnxbxLFS1
-----END CERTIFICATE-----

CA Disig Root R2
================
-----BEGIN CERTIFICATE-----
MIIFaTCCA1GgAwIBAgIJAJK4iNuwisFjMA0GCSqGSIb3DQEBCwUAMFIxCzAJBgNVBAYTAlNLMRMw
EQYDVQQHEwpCcmF0aXNsYXZhMRMwEQYDVQQKEwpEaXNpZyBhLnMuMRkwFwYDVQQDExBDQSBEaXNp
ZyBSb290IFIyMB4XDTEyMDcxOTA5MTUzMFoXDTQyMDcxOTA5MTUzMFowUjELMAkGA1UEBhMCU0sx
EzARBgNVBAcTCkJyYXRpc2xhdmExEzARBgNVBAoTCkRpc2lnIGEucy4xGTAXBgNVBAMTEENBIERp
c2lnIFJvb3QgUjIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCio8QACdaFXS1tFPbC
w3OeNcJxVX6B+6tGUODBfEl45qt5WDza/3wcn9iXAng+a0EE6UG9vgMsRfYvZNSrXaNHPWSb6Wia
xswbP7q+sos0Ai6YVRn8jG+qX9pMzk0DIaPY0jSTVpbLTAwAFjxfGs3Ix2ymrdMxp7zo5eFm1tL7
A7RBZckQrg4FY8aAamkw/dLukO8NJ9+flXP04SXabBbeQTg06ov80egEFGEtQX6sx3dOy1FU+16S
GBsEWmjGycT6txOgmLcRK7fWV8x8nhfRyyX+hk4kLlYMeE2eARKmK6cBZW58Yh2EhN/qwGu1pSqV
g8NTEQxzHQuyRpDRQjrOQG6Vrf/GlK1ul4SOfW+eioANSW1z4nuSHsPzwfPrLgVv2RvPN3YEyLRa
5Beny912H9AZdugsBbPWnDTYltxhh5EF5EQIM8HauQhl1K6yNg3ruji6DOWbnuuNZt2Zz9aJQfYE
koopKW1rOhzndX0CcQ7zwOe9yxndnWCywmZgtrEE7snmhrmaZkCo5xHtgUUDi/ZnWejBBhG93c+A
Ak9lQHhcR1DIm+YfgXvkRKhbhZri3lrVx/k6RGZL5DJUfORsnLMOPReisjQS1n6yqEm70XooQL6i
Fh/f5DcfEXP7kAplQ6INfPgGAVUzfbANuPT1rqVCV3w2EYx7XsQDnYx5nQIDAQABo0IwQDAPBgNV
HRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUtZn4r7CU9eMg1gqtzk5WpC5u
Qu0wDQYJKoZIhvcNAQELBQADggIBACYGXnDnZTPIgm7ZnBc6G3pmsgH2eDtpXi/q/075KMOYKmFM
tCQSin1tERT3nLXK5ryeJ45MGcipvXrA1zYObYVybqjGom32+nNjf7xueQgcnYqfGopTpti72TVV
sRHFqQOzVju5hJMiXn7B9hJSi+osZ7z+Nkz1uM/Rs0mSO9MpDpkblvdhuDvEK7Z4bLQjb/D907Je
dR+Zlais9trhxTF7+9FGs9K8Z7RiVLoJ92Owk6Ka+elSLotgEqv89WBW7xBci8QaQtyDW2QOy7W8
1k/BfDxujRNt+3vrMNDcTa/F1balTFtxyegxvug4BkihGuLq0t4SOVga/4AOgnXmt8kHbA7v/zjx
mHHEt38OFdAlab0inSvtBfZGR6ztwPDUO+Ls7pZbkBNOHlY667DvlruWIxG68kOGdGSVyCh13x01
utI3gzhTODY7z2zp+WsO0PsE6E9312UBeIYMej4hYvF/Y3EMyZ9E26gnonW+boE+18DrG5gPcFw0
sorMwIUY6256s/daoQe/qUKS82Ail+QUoQebTnbAjn39pCXHR+3/H3OszMOl6W8KjptlwlCFtaOg
UxLMVYdh84GuEEZhvUQhuMI9dM9+JDX6HAcOmz0iyu8xL4ysEr3vQCj8KWefshNPZiTEUxnpHikV
7+ZtsH8tZ/3zbBt1RqPlShfppNcL
-----END CERTIFICATE-----

ACCVRAIZ1
=========
-----BEGIN CERTIFICATE-----
MIIH0zCCBbugAwIBAgIIXsO3pkN/pOAwDQYJKoZIhvcNAQEFBQAwQjESMBAGA1UEAwwJQUNDVlJB
SVoxMRAwDgYDVQQLDAdQS0lBQ0NWMQ0wCwYDVQQKDARBQ0NWMQswCQYDVQQGEwJFUzAeFw0xMTA1
MDUwOTM3MzdaFw0zMDEyMzEwOTM3MzdaMEIxEjAQBgNVBAMMCUFDQ1ZSQUlaMTEQMA4GA1UECwwH
UEtJQUNDVjENMAsGA1UECgwEQUNDVjELMAkGA1UEBhMCRVMwggIiMA0GCSqGSIb3DQEBAQUAA4IC
DwAwggIKAoICAQCbqau/YUqXry+XZpp0X9DZlv3P4uRm7x8fRzPCRKPfmt4ftVTdFXxpNRFvu8gM
jmoYHtiP2Ra8EEg2XPBjs5BaXCQ316PWywlxufEBcoSwfdtNgM3802/J+Nq2DoLSRYWoG2ioPej0
RGy9ocLLA76MPhMAhN9KSMDjIgro6TenGEyxCQ0jVn8ETdkXhBilyNpAlHPrzg5XPAOBOp0KoVdD
aaxXbXmQeOW1tDvYvEyNKKGno6e6Ak4l0Squ7a4DIrhrIA8wKFSVf+DuzgpmndFALW4ir50awQUZ
0m/A8p/4e7MCQvtQqR0tkw8jq8bBD5L/0KIV9VMJcRz/RROE5iZe+OCIHAr8Fraocwa48GOEAqDG
WuzndN9wrqODJerWx5eHk6fGioozl2A3ED6XPm4pFdahD9GILBKfb6qkxkLrQaLjlUPTAYVtjrs7
8yM2x/474KElB0iryYl0/wiPgL/AlmXz7uxLaL2diMMxs0Dx6M/2OLuc5NF/1OVYm3z61PMOm3WR
5LpSLhl+0fXNWhn8ugb2+1KoS5kE3fj5tItQo05iifCHJPqDQsGH+tUtKSpacXpkatcnYGMN285J
9Y0fkIkyF/hzQ7jSWpOGYdbhdQrqeWZ2iE9x6wQl1gpaepPluUsXQA+xtrn13k/c4LOsOxFwYIRK
Q26ZIMApcQrAZQIDAQABo4ICyzCCAscwfQYIKwYBBQUHAQEEcTBvMEwGCCsGAQUFBzAChkBodHRw
Oi8vd3d3LmFjY3YuZXMvZmlsZWFkbWluL0FyY2hpdm9zL2NlcnRpZmljYWRvcy9yYWl6YWNjdjEu
Y3J0MB8GCCsGAQUFBzABhhNodHRwOi8vb2NzcC5hY2N2LmVzMB0GA1UdDgQWBBTSh7Tj3zcnk1X2
VuqB5TbMjB4/vTAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFNKHtOPfNyeTVfZW6oHlNsyM
Hj+9MIIBcwYDVR0gBIIBajCCAWYwggFiBgRVHSAAMIIBWDCCASIGCCsGAQUFBwICMIIBFB6CARAA
QQB1AHQAbwByAGkAZABhAGQAIABkAGUAIABDAGUAcgB0AGkAZgBpAGMAYQBjAGkA8wBuACAAUgBh
AO0AegAgAGQAZQAgAGwAYQAgAEEAQwBDAFYAIAAoAEEAZwBlAG4AYwBpAGEAIABkAGUAIABUAGUA
YwBuAG8AbABvAGcA7QBhACAAeQAgAEMAZQByAHQAaQBmAGkAYwBhAGMAaQDzAG4AIABFAGwAZQBj
AHQAcgDzAG4AaQBjAGEALAAgAEMASQBGACAAUQA0ADYAMAAxADEANQA2AEUAKQAuACAAQwBQAFMA
IABlAG4AIABoAHQAdABwADoALwAvAHcAdwB3AC4AYQBjAGMAdgAuAGUAczAwBggrBgEFBQcCARYk
aHR0cDovL3d3dy5hY2N2LmVzL2xlZ2lzbGFjaW9uX2MuaHRtMFUGA1UdHwROMEwwSqBIoEaGRGh0
dHA6Ly93d3cuYWNjdi5lcy9maWxlYWRtaW4vQXJjaGl2b3MvY2VydGlmaWNhZG9zL3JhaXphY2N2
MV9kZXIuY3JsMA4GA1UdDwEB/wQEAwIBBjAXBgNVHREEEDAOgQxhY2N2QGFjY3YuZXMwDQYJKoZI
hvcNAQEFBQADggIBAJcxAp/n/UNnSEQU5CmH7UwoZtCPNdpNYbdKl02125DgBS4OxnnQ8pdpD70E
R9m+27Up2pvZrqmZ1dM8MJP1jaGo/AaNRPTKFpV8M9xii6g3+CfYCS0b78gUJyCpZET/LtZ1qmxN
YEAZSUNUY9rizLpm5U9EelvZaoErQNV/+QEnWCzI7UiRfD+mAM/EKXMRNt6GGT6d7hmKG9Ww7Y49
nCrADdg9ZuM8Db3VlFzi4qc1GwQA9j9ajepDvV+JHanBsMyZ4k0ACtrJJ1vnE5Bc5PUzolVt3OAJ
TS+xJlsndQAJxGJ3KQhfnlmstn6tn1QwIgPBHnFk/vk4CpYY3QIUrCPLBhwepH2NDd4nQeit2hW3
sCPdK6jT2iWH7ehVRE2I9DZ+hJp4rPcOVkkO1jMl1oRQQmwgEh0q1b688nCBpHBgvgW1m54ERL5h
I6zppSSMEYCUWqKiuUnSwdzRp+0xESyeGabu4VXhwOrPDYTkF7eifKXeVSUG7szAh1xA2syVP1Xg
Nce4hL60Xc16gwFy7ofmXx2utYXGJt/mwZrpHgJHnyqobalbz+xFd3+YJ5oyXSrjhO7FmGYvliAd
3djDJ9ew+f7Zfc3Qn48LFFhRny+Lwzgt3uiP1o2HpPVWQxaZLPSkVrQ0uGE3ycJYgBugl6H8WY3p
EfbRD0tVNEYqi4Y7
-----END CERTIFICATE-----

TWCA Global Root CA
===================
-----BEGIN CERTIFICATE-----
MIIFQTCCAymgAwIBAgICDL4wDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCVFcxEjAQBgNVBAoT
CVRBSVdBTi1DQTEQMA4GA1UECxMHUm9vdCBDQTEcMBoGA1UEAxMTVFdDQSBHbG9iYWwgUm9vdCBD
QTAeFw0xMjA2MjcwNjI4MzNaFw0zMDEyMzExNTU5NTlaMFExCzAJBgNVBAYTAlRXMRIwEAYDVQQK
EwlUQUlXQU4tQ0ExEDAOBgNVBAsTB1Jvb3QgQ0ExHDAaBgNVBAMTE1RXQ0EgR2xvYmFsIFJvb3Qg
Q0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCwBdvI64zEbooh745NnHEKH1Jw7W2C
nJfF10xORUnLQEK1EjRsGcJ0pDFfhQKX7EMzClPSnIyOt7h52yvVavKOZsTuKwEHktSz0ALfUPZV
r2YOy+BHYC8rMjk1Ujoog/h7FsYYuGLWRyWRzvAZEk2tY/XTP3VfKfChMBwqoJimFb3u/Rk28OKR
Q4/6ytYQJ0lM793B8YVwm8rqqFpD/G2Gb3PpN0Wp8DbHzIh1HrtsBv+baz4X7GGqcXzGHaL3SekV
tTzWoWH1EfcFbx39Eb7QMAfCKbAJTibc46KokWofwpFFiFzlmLhxpRUZyXx1EcxwdE8tmx2RRP1W
KKD+u4ZqyPpcC1jcxkt2yKsi2XMPpfRaAok/T54igu6idFMqPVMnaR1sjjIsZAAmY2E2TqNGtz99
sy2sbZCilaLOz9qC5wc0GZbpuCGqKX6mOL6OKUohZnkfs8O1CWfe1tQHRvMq2uYiN2DLgbYPoA/p
yJV/v1WRBXrPPRXAb94JlAGD1zQbzECl8LibZ9WYkTunhHiVJqRaCPgrdLQABDzfuBSO6N+pjWxn
kjMdwLfS7JLIvgm/LCkFbwJrnu+8vyq8W8BQj0FwcYeyTbcEqYSjMq+u7msXi7Kx/mzhkIyIqJdI
zshNy/MGz19qCkKxHh53L46g5pIOBvwFItIm4TFRfTLcDwIDAQABoyMwITAOBgNVHQ8BAf8EBAMC
AQYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEAXzSBdu+WHdXltdkCY4QWwa6g
cFGn90xHNcgL1yg9iXHZqjNB6hQbbCEAwGxCGX6faVsgQt+i0trEfJdLjbDorMjupWkEmQqSpqsn
LhpNgb+E1HAerUf+/UqdM+DyucRFCCEK2mlpc3INvjT+lIutwx4116KD7+U4x6WFH6vPNOw/KP4M
8VeGTslV9xzU2KV9Bnpv1d8Q34FOIWWxtuEXeZVFBs5fzNxGiWNoRI2T9GRwoD2dKAXDOXC4Ynsg
/eTb6QihuJ49CcdP+yz4k3ZB3lLg4VfSnQO8d57+nile98FRYB/e2guyLXW3Q0iT5/Z5xoRdgFlg
lPx4mI88k1HtQJAH32RjJMtOcQWh15QaiDLxInQirqWm2BJpTGCjAu4r7NRjkgtevi92a6O2JryP
A9gK8kxkRr05YuWW6zRjESjMlfGt7+/cgFhI6Uu46mWs6fyAtbXIRfmswZ/ZuepiiI7E8UuDEq3m
i4TWnsLrgxifarsbJGAzcMzs9zLzXNl5fe+epP7JI8Mk7hWSsT2RTyaGvWZzJBPqpK5jwa19hAM8
EHiGG3njxPPyBJUgriOCxLM6AGK/5jYk4Ve6xx6QddVfP5VhK8E7zeWzaGHQRiapIVJpLesux+t3
zqY6tQMzT3bR51xUAV3LePTJDL/PEo4XLSNolOer/qmyKwbQBM0=
-----END CERTIFICATE-----

TeliaSonera Root CA v1
======================
-----BEGIN CERTIFICATE-----
MIIFODCCAyCgAwIBAgIRAJW+FqD3LkbxezmCcvqLzZYwDQYJKoZIhvcNAQEFBQAwNzEUMBIGA1UE
CgwLVGVsaWFTb25lcmExHzAdBgNVBAMMFlRlbGlhU29uZXJhIFJvb3QgQ0EgdjEwHhcNMDcxMDE4
MTIwMDUwWhcNMzIxMDE4MTIwMDUwWjA3MRQwEgYDVQQKDAtUZWxpYVNvbmVyYTEfMB0GA1UEAwwW
VGVsaWFTb25lcmEgUm9vdCBDQSB2MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMK+
6yfwIaPzaSZVfp3FVRaRXP3vIb9TgHot0pGMYzHw7CTww6XScnwQbfQ3t+XmfHnqjLWCi65ItqwA
3GV17CpNX8GH9SBlK4GoRz6JI5UwFpB/6FcHSOcZrr9FZ7E3GwYq/t75rH2D+1665I+XZ75Ljo1k
B1c4VWk0Nj0TSO9P4tNmHqTPGrdeNjPUtAa9GAH9d4RQAEX1jF3oI7x+/jXh7VB7qTCNGdMJjmhn
Xb88lxhTuylixcpecsHHltTbLaC0H2kD7OriUPEMPPCs81Mt8Bz17Ww5OXOAFshSsCPN4D7c3TxH
oLs1iuKYaIu+5b9y7tL6pe0S7fyYGKkmdtwoSxAgHNN/Fnct7W+A90m7UwW7XWjH1Mh1Fj+JWov3
F0fUTPHSiXk+TT2YqGHeOh7S+F4D4MHJHIzTjU3TlTazN19jY5szFPAtJmtTfImMMsJu7D0hADnJ
oWjiUIMusDor8zagrC/kb2HCUQk5PotTubtn2txTuXZZNp1D5SDgPTJghSJRt8czu90VL6R4pgd7
gUY2BIbdeTXHlSw7sKMXNeVzH7RcWe/a6hBle3rQf5+ztCo3O3CLm1u5K7fsslESl1MpWtTwEhDc
TwK7EpIvYtQ/aUN8Ddb8WHUBiJ1YFkveupD/RwGJBmr2X7KQarMCpgKIv7NHfirZ1fpoeDVNAgMB
AAGjPzA9MA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1UdDgQWBBTwj1k4ALP1j5qW
DNXr+nuqF+gTEjANBgkqhkiG9w0BAQUFAAOCAgEAvuRcYk4k9AwI//DTDGjkk0kiP0Qnb7tt3oNm
zqjMDfz1mgbldxSR651Be5kqhOX//CHBXfDkH1e3damhXwIm/9fH907eT/j3HEbAek9ALCI18Bmx
0GtnLLCo4MBANzX2hFxc469CeP6nyQ1Q6g2EdvZR74NTxnr/DlZJLo961gzmJ1TjTQpgcmLNkQfW
pb/ImWvtxBnmq0wROMVvMeJuScg/doAmAyYp4Db29iBT4xdwNBedY2gea+zDTYa4EzAvXUYNR0PV
G6pZDrlcjQZIrXSHX8f8MVRBE+LHIQ6e4B4N4cB7Q4WQxYpYxmUKeFfyxiMPAdkgS94P+5KFdSpc
c41teyWRyu5FrgZLAMzTsVlQ2jqIOylDRl6XK1TOU2+NSueW+r9xDkKLfP0ooNBIytrEgUy7onOT
JsjrDNYmiLbAJM+7vVvrdX3pCI6GMyx5dwlppYn8s3CQh3aP0yK7Qs69cwsgJirQmz1wHiRszYd2
qReWt88NkvuOGKmYSdGe/mBEciG5Ge3C9THxOUiIkCR1VBatzvT4aRRkOfujuLpwQMcnHL/EVlP6
Y2XQ8xwOFvVrhlhNGNTkDY6lnVuR3HYkUD/GKvvZt5y11ubQ2egZixVxSK236thZiNSQvxaz2ems
WWFUyBy6ysHK4bkgTI86k4mloMy/0/Z1pHWWbVY=
-----END CERTIFICATE-----

E-Tugra Certification Authority
===============================
-----BEGIN CERTIFICATE-----
MIIGSzCCBDOgAwIBAgIIamg+nFGby1MwDQYJKoZIhvcNAQELBQAwgbIxCzAJBgNVBAYTAlRSMQ8w
DQYDVQQHDAZBbmthcmExQDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamls
ZXJpIHZlIEhpem1ldGxlcmkgQS7Fni4xJjAkBgNVBAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBN
ZXJrZXppMSgwJgYDVQQDDB9FLVR1Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTEzMDMw
NTEyMDk0OFoXDTIzMDMwMzEyMDk0OFowgbIxCzAJBgNVBAYTAlRSMQ8wDQYDVQQHDAZBbmthcmEx
QDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamlsZXJpIHZlIEhpem1ldGxl
cmkgQS7Fni4xJjAkBgNVBAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBNZXJrZXppMSgwJgYDVQQD
DB9FLVR1Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
MIICCgKCAgEA4vU/kwVRHoViVF56C/UYB4Oufq9899SKa6VjQzm5S/fDxmSJPZQuVIBSOTkHS0vd
hQd2h8y/L5VMzH2nPbxHD5hw+IyFHnSOkm0bQNGZDbt1bsipa5rAhDGvykPL6ys06I+XawGb1Q5K
CKpbknSFQ9OArqGIW66z6l7LFpp3RMih9lRozt6Plyu6W0ACDGQXwLWTzeHxE2bODHnv0ZEoq1+g
ElIwcxmOj+GMB6LDu0rw6h8VqO4lzKRG+Bsi77MOQ7osJLjFLFzUHPhdZL3Dk14opz8n8Y4e0ypQ
BaNV2cvnOVPAmJ6MVGKLJrD3fY185MaeZkJVgkfnsliNZvcHfC425lAcP9tDJMW/hkd5s3kc91r0
E+xs+D/iWR+V7kI+ua2oMoVJl0b+SzGPWsutdEcf6ZG33ygEIqDUD13ieU/qbIWGvaimzuT6w+Gz
rt48Ue7LE3wBf4QOXVGUnhMMti6lTPk5cDZvlsouDERVxcr6XQKj39ZkjFqzAQqptQpHF//vkUAq
jqFGOjGY5RH8zLtJVor8udBhmm9lbObDyz51Sf6Pp+KJxWfXnUYTTjF2OySznhFlhqt/7x3U+Lzn
rFpct1pHXFXOVbQicVtbC/DP3KBhZOqp12gKY6fgDT+gr9Oq0n7vUaDmUStVkhUXU8u3Zg5mTPj5
dUyQ5xJwx0UCAwEAAaNjMGEwHQYDVR0OBBYEFC7j27JJ0JxUeVz6Jyr+zE7S6E5UMA8GA1UdEwEB
/wQFMAMBAf8wHwYDVR0jBBgwFoAULuPbsknQnFR5XPonKv7MTtLoTlQwDgYDVR0PAQH/BAQDAgEG
MA0GCSqGSIb3DQEBCwUAA4ICAQAFNzr0TbdF4kV1JI+2d1LoHNgQk2Xz8lkGpD4eKexd0dCrfOAK
kEh47U6YA5n+KGCRHTAduGN8qOY1tfrTYXbm1gdLymmasoR6d5NFFxWfJNCYExL/u6Au/U5Mh/jO
XKqYGwXgAEZKgoClM4so3O0409/lPun++1ndYYRP0lSWE2ETPo+Aab6TR7U1Q9Jauz1c77NCR807
VRMGsAnb/WP2OogKmW9+4c4bU2pEZiNRCHu8W1Ki/QY3OEBhj0qWuJA3+GbHeJAAFS6LrVE1Uweo
a2iu+U48BybNCAVwzDk/dr2l02cmAYamU9JgO3xDf1WKvJUawSg5TB9D0pH0clmKuVb8P7Sd2nCc
dlqMQ1DujjByTd//SffGqWfZbawCEeI6FiWnWAjLb1NBnEg4R2gz0dfHj9R0IdTDBZB6/86WiLEV
KV0jq9BgoRJP3vQXzTLlyb/IQ639Lo7xr+L0mPoSHyDYwKcMhcWQ9DstliaxLL5Mq+ux0orJ23gT
Dx4JnW2PAJ8C2sH6H3p6CcRK5ogql5+Ji/03X186zjhZhkuvcQu02PJwT58yE+Owp1fl2tpDy4Q0
8ijE6m30Ku/Ba3ba+367hTzSU8JNvnHhRdH9I2cNE3X7z2VnIp2usAnRCf8dNL/+I5c30jn6PQ0G
C7TbO6Orb1wdtn7os4I07QZcJA==
-----END CERTIFICATE-----

T-TeleSec GlobalRoot Class 2
============================
-----BEGIN CERTIFICATE-----
MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoM
IlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBU
cnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDIwHhcNMDgx
MDAxMTA0MDE0WhcNMzMxMDAxMjM1OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lz
dGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBD
ZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDIwggEiMA0GCSqGSIb3
DQEBAQUAA4IBDwAwggEKAoIBAQCqX9obX+hzkeXaXPSi5kfl82hVYAUdAqSzm1nzHoqvNK38DcLZ
SBnuaY/JIPwhqgcZ7bBcrGXHX+0CfHt8LRvWurmAwhiCFoT6ZrAIxlQjgeTNuUk/9k9uN0goOA/F
vudocP05l03Sx5iRUKrERLMjfTlH6VJi1hKTXrcxlkIF+3anHqP1wvzpesVsqXFP6st4vGCvx970
2cu+fjOlbpSD8DT6IavqjnKgP6TeMFvvhk1qlVtDRKgQFRzlAVfFmPHmBiiRqiDFt1MmUUOyCxGV
WOHAD3bZwI18gfNycJ5v/hqO2V81xrJvNHy+SE/iWjnX2J14np+GPgNeGYtEotXHAgMBAAGjQjBA
MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS/WSA2AHmgoCJrjNXy
YdK4LMuCSjANBgkqhkiG9w0BAQsFAAOCAQEAMQOiYQsfdOhyNsZt+U2e+iKo4YFWz827n+qrkRk4
r6p8FU3ztqONpfSO9kSpp+ghla0+AGIWiPACuvxhI+YzmzB6azZie60EI4RYZeLbK4rnJVM3YlNf
vNoBYimipidx5joifsFvHZVwIEoHNN/q/xWA5brXethbdXwFeilHfkCoMRN3zUA7tFFHei4R40cR
3p1m0IvVVGb6g1XqfMIpiRvpb7PO4gWEyS8+eIVibslfwXhjdFjASBgMmTnrpMwatXlajRWc2BQN
9noHV8cigwUtPJslJj0Ys6lDfMjIq2SPDqO/nBudMNva0Bkuqjzx+zOAduTNrRlPBSeOE6Fuwg==
-----END CERTIFICATE-----

Atos TrustedRoot 2011
=====================
-----BEGIN CERTIFICATE-----
MIIDdzCCAl+gAwIBAgIIXDPLYixfszIwDQYJKoZIhvcNAQELBQAwPDEeMBwGA1UEAwwVQXRvcyBU
cnVzdGVkUm9vdCAyMDExMQ0wCwYDVQQKDARBdG9zMQswCQYDVQQGEwJERTAeFw0xMTA3MDcxNDU4
MzBaFw0zMDEyMzEyMzU5NTlaMDwxHjAcBgNVBAMMFUF0b3MgVHJ1c3RlZFJvb3QgMjAxMTENMAsG
A1UECgwEQXRvczELMAkGA1UEBhMCREUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCV
hTuXbyo7LjvPpvMpNb7PGKw+qtn4TaA+Gke5vJrf8v7MPkfoepbCJI419KkM/IL9bcFyYie96mvr
54rMVD6QUM+A1JX76LWC1BTFtqlVJVfbsVD2sGBkWXppzwO3bw2+yj5vdHLqqjAqc2K+SZFhyBH+
DgMq92og3AIVDV4VavzjgsG1xZ1kCWyjWZgHJ8cblithdHFsQ/H3NYkQ4J7sVaE3IqKHBAUsR320
HLliKWYoyrfhk/WklAOZuXCFteZI6o1Q/NnezG8HDt0Lcp2AMBYHlT8oDv3FdU9T1nSatCQujgKR
z3bFmx5VdJx4IbHwLfELn8LVlhgf8FQieowHAgMBAAGjfTB7MB0GA1UdDgQWBBSnpQaxLKYJYO7R
l+lwrrw7GWzbITAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFKelBrEspglg7tGX6XCuvDsZ
bNshMBgGA1UdIAQRMA8wDQYLKwYBBAGwLQMEAQEwDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEB
CwUAA4IBAQAmdzTblEiGKkGdLD4GkGDEjKwLVLgfuXvTBznk+j57sj1O7Z8jvZfza1zv7v1Apt+h
k6EKhqzvINB5Ab149xnYJDE0BAGmuhWawyfc2E8PzBhj/5kPDpFrdRbhIfzYJsdHt6bPWHJxfrrh
TZVHO8mvbaG0weyJ9rQPOLXiZNwlz6bb65pcmaHFCN795trV1lpFDMS3wrUU77QR/w4VtfX128a9
61qn8FYiqTxlVMYVqL2Gns2Dlmh6cYGJ4Qvh6hEbaAjMaZ7snkGeRDImeuKHCnE96+RapNLbxc3G
3mB/ufNPRJLvKrcYPqcZ2Qt9sTdBQrC6YB3y/gkRsPCHe6ed
-----END CERTIFICATE-----

QuoVadis Root CA 1 G3
=====================
-----BEGIN CERTIFICATE-----
MIIFYDCCA0igAwIBAgIUeFhfLq0sGUvjNwc1NBMotZbUZZMwDQYJKoZIhvcNAQELBQAwSDELMAkG
A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv
b3QgQ0EgMSBHMzAeFw0xMjAxMTIxNzI3NDRaFw00MjAxMTIxNzI3NDRaMEgxCzAJBgNVBAYTAkJN
MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDEg
RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCgvlAQjunybEC0BJyFuTHK3C3kEakE
PBtVwedYMB0ktMPvhd6MLOHBPd+C5k+tR4ds7FtJwUrVu4/sh6x/gpqG7D0DmVIB0jWerNrwU8lm
PNSsAgHaJNM7qAJGr6Qc4/hzWHa39g6QDbXwz8z6+cZM5cOGMAqNF34168Xfuw6cwI2H44g4hWf6
Pser4BOcBRiYz5P1sZK0/CPTz9XEJ0ngnjybCKOLXSoh4Pw5qlPafX7PGglTvF0FBM+hSo+LdoIN
ofjSxxR3W5A2B4GbPgb6Ul5jxaYA/qXpUhtStZI5cgMJYr2wYBZupt0lwgNm3fME0UDiTouG9G/l
g6AnhF4EwfWQvTA9xO+oabw4m6SkltFi2mnAAZauy8RRNOoMqv8hjlmPSlzkYZqn0ukqeI1RPToV
7qJZjqlc3sX5kCLliEVx3ZGZbHqfPT2YfF72vhZooF6uCyP8Wg+qInYtyaEQHeTTRCOQiJ/GKubX
9ZqzWB4vMIkIG1SitZgj7Ah3HJVdYdHLiZxfokqRmu8hqkkWCKi9YSgxyXSthfbZxbGL0eUQMk1f
iyA6PEkfM4VZDdvLCXVDaXP7a3F98N/ETH3Goy7IlXnLc6KOTk0k+17kBL5yG6YnLUlamXrXXAkg
t3+UuU/xDRxeiEIbEbfnkduebPRq34wGmAOtzCjvpUfzUwIDAQABo0IwQDAPBgNVHRMBAf8EBTAD
AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUo5fW816iEOGrRZ88F2Q87gFwnMwwDQYJKoZI
hvcNAQELBQADggIBABj6W3X8PnrHX3fHyt/PX8MSxEBd1DKquGrX1RUVRpgjpeaQWxiZTOOtQqOC
MTaIzen7xASWSIsBx40Bz1szBpZGZnQdT+3Btrm0DWHMY37XLneMlhwqI2hrhVd2cDMT/uFPpiN3
GPoajOi9ZcnPP/TJF9zrx7zABC4tRi9pZsMbj/7sPtPKlL92CiUNqXsCHKnQO18LwIE6PWThv6ct
Tr1NxNgpxiIY0MWscgKCP6o6ojoilzHdCGPDdRS5YCgtW2jgFqlmgiNR9etT2DGbe+m3nUvriBbP
+V04ikkwj+3x6xn0dxoxGE1nVGwvb2X52z3sIexe9PSLymBlVNFxZPT5pqOBMzYzcfCkeF9OrYMh
3jRJjehZrJ3ydlo28hP0r+AJx2EqbPfgna67hkooby7utHnNkDPDs3b69fBsnQGQ+p6Q9pxyz0fa
wx/kNSBT8lTR32GDpgLiJTjehTItXnOQUl1CxM49S+H5GYQd1aJQzEH7QRTDvdbJWqNjZgKAvQU6
O0ec7AAmTPWIUb+oI38YB7AL7YsmoWTTYUrrXJ/es69nA7Mf3W1daWhpq1467HxpvMc7hU6eFbm0
FU/DlXpY18ls6Wy58yljXrQs8C097Vpl4KlbQMJImYFtnh8GKjwStIsPm6Ik8KaN1nrgS7ZklmOV
hMJKzRwuJIczYOXD
-----END CERTIFICATE-----

QuoVadis Root CA 2 G3
=====================
-----BEGIN CERTIFICATE-----
MIIFYDCCA0igAwIBAgIURFc0JFuBiZs18s64KztbpybwdSgwDQYJKoZIhvcNAQELBQAwSDELMAkG
A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv
b3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00MjAxMTIxODU5MzJaMEgxCzAJBgNVBAYTAkJN
MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDIg
RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQChriWyARjcV4g/Ruv5r+LrI3HimtFh
ZiFfqq8nUeVuGxbULX1QsFN3vXg6YOJkApt8hpvWGo6t/x8Vf9WVHhLL5hSEBMHfNrMWn4rjyduY
NM7YMxcoRvynyfDStNVNCXJJ+fKH46nafaF9a7I6JaltUkSs+L5u+9ymc5GQYaYDFCDy54ejiK2t
oIz/pgslUiXnFgHVy7g1gQyjO/Dh4fxaXc6AcW34Sas+O7q414AB+6XrW7PFXmAqMaCvN+ggOp+o
MiwMzAkd056OXbxMmO7FGmh77FOm6RQ1o9/NgJ8MSPsc9PG/Srj61YxxSscfrf5BmrODXfKEVu+l
V0POKa2Mq1W/xPtbAd0jIaFYAI7D0GoT7RPjEiuA3GfmlbLNHiJuKvhB1PLKFAeNilUSxmn1uIZo
L1NesNKqIcGY5jDjZ1XHm26sGahVpkUG0CM62+tlXSoREfA7T8pt9DTEceT/AFr2XK4jYIVz8eQQ
sSWu1ZK7E8EM4DnatDlXtas1qnIhO4M15zHfeiFuuDIIfR0ykRVKYnLP43ehvNURG3YBZwjgQQvD
6xVu+KQZ2aKrr+InUlYrAoosFCT5v0ICvybIxo/gbjh9Uy3l7ZizlWNof/k19N+IxWA1ksB8aRxh
lRbQ694Lrz4EEEVlWFA4r0jyWbYW8jwNkALGcC4BrTwV1wIDAQABo0IwQDAPBgNVHRMBAf8EBTAD
AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU7edvdlq/YOxJW8ald7tyFnGbxD0wDQYJKoZI
hvcNAQELBQADggIBAJHfgD9DCX5xwvfrs4iP4VGyvD11+ShdyLyZm3tdquXK4Qr36LLTn91nMX66
AarHakE7kNQIXLJgapDwyM4DYvmL7ftuKtwGTTwpD4kWilhMSA/ohGHqPHKmd+RCroijQ1h5fq7K
pVMNqT1wvSAZYaRsOPxDMuHBR//47PERIjKWnML2W2mWeyAMQ0GaW/ZZGYjeVYg3UQt4XAoeo0L9
x52ID8DyeAIkVJOviYeIyUqAHerQbj5hLja7NQ4nlv1mNDthcnPxFlxHBlRJAHpYErAK74X9sbgz
dWqTHBLmYF5vHX/JHyPLhGGfHoJE+V+tYlUkmlKY7VHnoX6XOuYvHxHaU4AshZ6rNRDbIl9qxV6X
U/IyAgkwo1jwDQHVcsaxfGl7w/U2Rcxhbl5MlMVerugOXou/983g7aEOGzPuVBj+D77vfoRrQ+Nw
mNtddbINWQeFFSM51vHfqSYP1kjHs6Yi9TM3WpVHn3u6GBVv/9YUZINJ0gpnIdsPNWNgKCLjsZWD
zYWm3S8P52dSbrsvhXz1SnPnxT7AvSESBT/8twNJAlvIJebiVDj1eYeMHVOyToV7BjjHLPj4sHKN
JeV3UvQDHEimUF+IIDBu8oJDqz2XhOdT+yHBTw8imoa4WSr2Rz0ZiC3oheGe7IUIarFsNMkd7Egr
O3jtZsSOeWmD3n+M
-----END CERTIFICATE-----

QuoVadis Root CA 3 G3
=====================
-----BEGIN CERTIFICATE-----
MIIFYDCCA0igAwIBAgIULvWbAiin23r/1aOp7r0DoM8Sah0wDQYJKoZIhvcNAQELBQAwSDELMAkG
A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv
b3QgQ0EgMyBHMzAeFw0xMjAxMTIyMDI2MzJaFw00MjAxMTIyMDI2MzJaMEgxCzAJBgNVBAYTAkJN
MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDMg
RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCzyw4QZ47qFJenMioKVjZ/aEzHs286
IxSR/xl/pcqs7rN2nXrpixurazHb+gtTTK/FpRp5PIpM/6zfJd5O2YIyC0TeytuMrKNuFoM7pmRL
Mon7FhY4futD4tN0SsJiCnMK3UmzV9KwCoWdcTzeo8vAMvMBOSBDGzXRU7Ox7sWTaYI+FrUoRqHe
6okJ7UO4BUaKhvVZR74bbwEhELn9qdIoyhA5CcoTNs+cra1AdHkrAj80//ogaX3T7mH1urPnMNA3
I4ZyYUUpSFlob3emLoG+B01vr87ERRORFHAGjx+f+IdpsQ7vw4kZ6+ocYfx6bIrc1gMLnia6Et3U
VDmrJqMz6nWB2i3ND0/kA9HvFZcba5DFApCTZgIhsUfei5pKgLlVj7WiL8DWM2fafsSntARE60f7
5li59wzweyuxwHApw0BiLTtIadwjPEjrewl5qW3aqDCYz4ByA4imW0aucnl8CAMhZa634RylsSqi
Md5mBPfAdOhx3v89WcyWJhKLhZVXGqtrdQtEPREoPHtht+KPZ0/l7DxMYIBpVzgeAVuNVejH38DM
dyM0SXV89pgR6y3e7UEuFAUCf+D+IOs15xGsIs5XPd7JMG0QA4XN8f+MFrXBsj6IbGB/kE+V9/Yt
rQE5BwT6dYB9v0lQ7e/JxHwc64B+27bQ3RP+ydOc17KXqQIDAQABo0IwQDAPBgNVHRMBAf8EBTAD
AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUxhfQvKjqAkPyGwaZXSuQILnXnOQwDQYJKoZI
hvcNAQELBQADggIBADRh2Va1EodVTd2jNTFGu6QHcrxfYWLopfsLN7E8trP6KZ1/AvWkyaiTt3px
KGmPc+FSkNrVvjrlt3ZqVoAh313m6Tqe5T72omnHKgqwGEfcIHB9UqM+WXzBusnIFUBhynLWcKzS
t/Ac5IYp8M7vaGPQtSCKFWGafoaYtMnCdvvMujAWzKNhxnQT5WvvoxXqA/4Ti2Tk08HS6IT7SdEQ
TXlm66r99I0xHnAUrdzeZxNMgRVhvLfZkXdxGYFgu/BYpbWcC/ePIlUnwEsBbTuZDdQdm2NnL9Du
DcpmvJRPpq3t/O5jrFc/ZSXPsoaP0Aj/uHYUbt7lJ+yreLVTubY/6CD50qi+YUbKh4yE8/nxoGib
Ih6BJpsQBJFxwAYf3KDTuVan45gtf4Od34wrnDKOMpTwATwiKp9Dwi7DmDkHOHv8XgBCH/MyJnmD
hPbl8MFREsALHgQjDFSlTC9JxUrRtm5gDWv8a4uFJGS3iQ6rJUdbPM9+Sb3H6QrG2vd+DhcI00iX
0HGS8A85PjRqHH3Y8iKuu2n0M7SmSFXRDw4m6Oy2Cy2nhTXN/VnIn9HNPlopNLk9hM6xZdRZkZFW
dSHBd575euFgndOtBBj0fOtek49TSiIp+EgrPk2GrFt/ywaZWWDYWGWVjUTR939+J399roD1B0y2
PpxxVJkES/1Y+Zj0
-----END CERTIFICATE-----

DigiCert Assured ID Root G2
===========================
-----BEGIN CERTIFICATE-----
MIIDljCCAn6gAwIBAgIQC5McOtY5Z+pnI7/Dr5r0SzANBgkqhkiG9w0BAQsFADBlMQswCQYDVQQG
EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw
IgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIwHhcNMTMwODAxMTIwMDAwWhcNMzgw
MTE1MTIwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL
ExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIw
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDZ5ygvUj82ckmIkzTz+GoeMVSAn61UQbVH
35ao1K+ALbkKz3X9iaV9JPrjIgwrvJUXCzO/GU1BBpAAvQxNEP4HteccbiJVMWWXvdMX0h5i89vq
bFCMP4QMls+3ywPgym2hFEwbid3tALBSfK+RbLE4E9HpEgjAALAcKxHad3A2m67OeYfcgnDmCXRw
VWmvo2ifv922ebPynXApVfSr/5Vh88lAbx3RvpO704gqu52/clpWcTs/1PPRCv4o76Pu2ZmvA9OP
YLfykqGxvYmJHzDNw6YuYjOuFgJ3RFrngQo8p0Quebg/BLxcoIfhG69Rjs3sLPr4/m3wOnyqi+Rn
lTGNAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTO
w0q5mVXyuNtgv6l+vVa1lzan1jANBgkqhkiG9w0BAQsFAAOCAQEAyqVVjOPIQW5pJ6d1Ee88hjZv
0p3GeDgdaZaikmkuOGybfQTUiaWxMTeKySHMq2zNixya1r9I0jJmwYrA8y8678Dj1JGG0VDjA9tz
d29KOVPt3ibHtX2vK0LRdWLjSisCx1BL4GnilmwORGYQRI+tBev4eaymG+g3NJ1TyWGqolKvSnAW
hsI6yLETcDbYz+70CjTVW0z9B5yiutkBclzzTcHdDrEcDcRjvq30FPuJ7KJBDkzMyFdA0G4Dqs0M
jomZmWzwPDCvON9vvKO+KSAnq3T/EyJ43pdSVR6DtVQgA+6uwE9W3jfMw3+qBCe703e4YtsXfJwo
IhNzbM8m9Yop5w==
-----END CERTIFICATE-----

DigiCert Assured ID Root G3
===========================
-----BEGIN CERTIFICATE-----
MIICRjCCAc2gAwIBAgIQC6Fa+h3foLVJRK/NJKBs7DAKBggqhkjOPQQDAzBlMQswCQYDVQQGEwJV
UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQwIgYD
VQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1
MTIwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwdjAQ
BgcqhkjOPQIBBgUrgQQAIgNiAAQZ57ysRGXtzbg/WPuNsVepRC0FFfLvC/8QdJ+1YlJfZn4f5dwb
RXkLzMZTCp2NXQLZqVneAlr2lSoOjThKiknGvMYDOAdfVdp+CW7if17QRSAPWXYQ1qAk8C3eNvJs
KTmjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTL0L2p4ZgF
UaFNN6KDec6NHSrkhDAKBggqhkjOPQQDAwNnADBkAjAlpIFFAmsSS3V0T8gj43DydXLefInwz5Fy
YZ5eEJJZVrmDxxDnOOlYJjZ91eQ0hjkCMHw2U/Aw5WJjOpnitqM7mzT6HtoQknFekROn3aRukswy
1vUhZscv6pZjamVFkpUBtA==
-----END CERTIFICATE-----

DigiCert Global Root G2
=======================
-----BEGIN CERTIFICATE-----
MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG
EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw
HgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUx
MjAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3
dy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkq
hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI2/Ou8jqJ
kTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx1x7e/dfgy5SDN67sH0NO
3Xss0r0upS/kqbitOtSZpLYl6ZtrAGCSYP9PIUkY92eQq2EGnI/yuum06ZIya7XzV+hdG82MHauV
BJVJ8zUtluNJbd134/tJS7SsVQepj5WztCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS0xZKBgyM
UNGPHgm+F6HmIcr9g+UQvIOlCsRnKPZzFBQ9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQAB
o0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV5uNu
5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY1Yl9PMWLSn/pvtsr
F9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4NeF22d+mQrvHRAiGfzZ0JFrabA0U
WTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NGFdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBH
QRFXGU7Aj64GxJUTFy8bJZ918rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/
iyK5S9kJRaTepLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl
MrY=
-----END CERTIFICATE-----

DigiCert Global Root G3
=======================
-----BEGIN CERTIFICATE-----
MIICPzCCAcWgAwIBAgIQBVVWvPJepDU1w6QP1atFcjAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV
UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD
VQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAw
MDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5k
aWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEczMHYwEAYHKoZIzj0C
AQYFK4EEACIDYgAE3afZu4q4C/sLfyHS8L6+c/MzXRq8NOrexpu80JX28MzQC7phW1FGfp4tn+6O
YwwX7Adw9c+ELkCDnOg/QW07rdOkFFk2eJ0DQ+4QE2xy3q6Ip6FrtUPOZ9wj/wMco+I+o0IwQDAP
BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUs9tIpPmhxdiuNkHMEWNp
Yim8S8YwCgYIKoZIzj0EAwMDaAAwZQIxAK288mw/EkrRLTnDCgmXc/SINoyIJ7vmiI1Qhadj+Z4y
3maTD/HMsQmP3Wyr+mt/oAIwOWZbwmSNuJ5Q3KjVSaLtx9zRSX8XAbjIho9OjIgrqJqpisXRAL34
VOKa5Vt8sycX
-----END CERTIFICATE-----

DigiCert Trusted Root G4
========================
-----BEGIN CERTIFICATE-----
MIIFkDCCA3igAwIBAgIQBZsbV56OITLiOQe9p3d1XDANBgkqhkiG9w0BAQwFADBiMQswCQYDVQQG
EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEw
HwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1
MTIwMDAwWjBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwggIiMA0G
CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC/5pBzaN675F1KPDAiMGkz7MKnJS7JIT3yithZwuEp
pz1Yq3aaza57G4QNxDAf8xukOBbrVsaXbR2rsnnyyhHS5F/WBTxSD1Ifxp4VpX6+n6lXFllVcq9o
k3DCsrp1mWpzMpTREEQQLt+C8weE5nQ7bXHiLQwb7iDVySAdYyktzuxeTsiT+CFhmzTrBcZe7Fsa
vOvJz82sNEBfsXpm7nfISKhmV1efVFiODCu3T6cw2Vbuyntd463JT17lNecxy9qTXtyOj4DatpGY
QJB5w3jHtrHEtWoYOAMQjdjUN6QuBX2I9YI+EJFwq1WCQTLX2wRzKm6RAXwhTNS8rhsDdV14Ztk6
MUSaM0C/CNdaSaTC5qmgZ92kJ7yhTzm1EVgX9yRcRo9k98FpiHaYdj1ZXUJ2h4mXaXpI8OCiEhtm
mnTK3kse5w5jrubU75KSOp493ADkRSWJtppEGSt+wJS00mFt6zPZxd9LBADMfRyVw4/3IbKyEbe7
f/LVjHAsQWCqsWMYRJUadmJ+9oCw++hkpjPRiQfhvbfmQ6QYuKZ3AeEPlAwhHbJUKSWJbOUOUlFH
dL4mrLZBdd56rF+NP8m800ERElvlEFDrMcXKchYiCd98THU/Y+whX8QgUWtvsauGi0/C1kVfnSD8
oR7FwI+isX4KJpn15GkvmB0t9dmpsh3lGwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1Ud
DwEB/wQEAwIBhjAdBgNVHQ4EFgQU7NfjgtJxXWRM3y5nP+e6mK4cD08wDQYJKoZIhvcNAQEMBQAD
ggIBALth2X2pbL4XxJEbw6GiAI3jZGgPVs93rnD5/ZpKmbnJeFwMDF/k5hQpVgs2SV1EY+CtnJYY
ZhsjDT156W1r1lT40jzBQ0CuHVD1UvyQO7uYmWlrx8GnqGikJ9yd+SeuMIW59mdNOj6PWTkiU0Tr
yF0Dyu1Qen1iIQqAyHNm0aAFYF/opbSnr6j3bTWcfFqK1qI4mfN4i/RN0iAL3gTujJtHgXINwBQy
7zBZLq7gcfJW5GqXb5JQbZaNaHqasjYUegbyJLkJEVDXCLG4iXqEI2FCKeWjzaIgQdfRnGTZ6iah
ixTXTBmyUEFxPT9NcCOGDErcgdLMMpSEDQgJlxxPwO5rIHQw0uA5NBCFIRUBCOhVMt5xSdkoF1BN
5r5N0XWs0Mr7QbhDparTwwVETyw2m+L64kW4I1NsBm9nVX9GtUw/bihaeSbSpKhil9Ie4u1Ki7wb
/UdKDd9nZn6yW0HQO+T0O/QEY+nvwlQAUaCKKsnOeMzV6ocEGLPOr0mIr/OSmbaz5mEP0oUA51Aa
5BuVnRmhuZyxm7EAHu/QD09CbMkKvO5D+jpxpchNJqU1/YldvIViHTLSoCtU7ZpXwdv6EM8Zt4tK
G48BtieVU+i2iW1bvGjUI+iLUaJW+fCmgKDWHrO8Dw9TdSmq6hN35N6MgSGtBxBHEa2HPQfRdbzP
82Z+
-----END CERTIFICATE-----

COMODO RSA Certification Authority
==================================
-----BEGIN CERTIFICATE-----
MIIF2DCCA8CgAwIBAgIQTKr5yttjb+Af907YWwOGnTANBgkqhkiG9w0BAQwFADCBhTELMAkGA1UE
BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG
A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlv
biBBdXRob3JpdHkwHhcNMTAwMTE5MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMC
R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE
ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBB
dXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCR6FSS0gpWsawNJN3Fz0Rn
dJkrN6N9I3AAcbxT38T6KhKPS38QVr2fcHK3YX/JSw8Xpz3jsARh7v8Rl8f0hj4K+j5c+ZPmNHrZ
FGvnnLOFoIJ6dq9xkNfs/Q36nGz637CC9BR++b7Epi9Pf5l/tfxnQ3K9DADWietrLNPtj5gcFKt+
5eNu/Nio5JIk2kNrYrhV/erBvGy2i/MOjZrkm2xpmfh4SDBF1a3hDTxFYPwyllEnvGfDyi62a+pG
x8cgoLEfZd5ICLqkTqnyg0Y3hOvozIFIQ2dOciqbXL1MGyiKXCJ7tKuY2e7gUYPDCUZObT6Z+pUX
2nwzV0E8jVHtC7ZcryxjGt9XyD+86V3Em69FmeKjWiS0uqlWPc9vqv9JWL7wqP/0uK3pN/u6uPQL
OvnoQ0IeidiEyxPx2bvhiWC4jChWrBQdnArncevPDt09qZahSL0896+1DSJMwBGB7FY79tOi4lu3
sgQiUpWAk2nojkxl8ZEDLXB0AuqLZxUpaVICu9ffUGpVRr+goyhhf3DQw6KqLCGqR84onAZFdr+C
GCe01a60y1Dma/RMhnEw6abfFobg2P9A3fvQQoh/ozM6LlweQRGBY84YcWsr7KaKtzFcOmpH4MN5
WdYgGq/yapiqcrxXStJLnbsQ/LBMQeXtHT1eKJ2czL+zUdqnR+WEUwIDAQABo0IwQDAdBgNVHQ4E
FgQUu69+Aj36pvE8hI6t7jiY7NkyMtQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8w
DQYJKoZIhvcNAQEMBQADggIBAArx1UaEt65Ru2yyTUEUAJNMnMvlwFTPoCWOAvn9sKIN9SCYPBMt
rFaisNZ+EZLpLrqeLppysb0ZRGxhNaKatBYSaVqM4dc+pBroLwP0rmEdEBsqpIt6xf4FpuHA1sj+
nq6PK7o9mfjYcwlYRm6mnPTXJ9OV2jeDchzTc+CiR5kDOF3VSXkAKRzH7JsgHAckaVd4sjn8OoSg
tZx8jb8uk2IntznaFxiuvTwJaP+EmzzV1gsD41eeFPfR60/IvYcjt7ZJQ3mFXLrrkguhxuhoqEwW
sRqZCuhTLJK7oQkYdQxlqHvLI7cawiiFwxv/0Cti76R7CZGYZ4wUAc1oBmpjIXUDgIiKboHGhfKp
pC3n9KUkEEeDys30jXlYsQab5xoq2Z0B15R97QNKyvDb6KkBPvVWmckejkk9u+UJueBPSZI9FoJA
zMxZxuY67RIuaTxslbH9qh17f4a+Hg4yRvv7E491f0yLS0Zj/gA0QHDBw7mh3aZw4gSzQbzpgJHq
ZJx64SIDqZxubw5lT2yHh17zbqD5daWbQOhTsiedSrnAdyGN/4fy3ryM7xfft0kL0fJuMAsaDk52
7RH89elWsn2/x20Kk4yl0MC2Hb46TpSi125sC8KKfPog88Tk5c0NqMuRkrF8hey1FGlmDoLnzc7I
LaZRfyHBNVOFBkpdn627G190
-----END CERTIFICATE-----

USERTrust RSA Certification Authority
=====================================
-----BEGIN CERTIFICATE-----
MIIF3jCCA8agAwIBAgIQAf1tMPyjylGoG7xkDjUDLTANBgkqhkiG9w0BAQwFADCBiDELMAkGA1UE
BhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK
ExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh
dGlvbiBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UE
BhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK
ExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh
dGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCAEmUXNg7D2wiz
0KxXDXbtzSfTTK1Qg2HiqiBNCS1kCdzOiZ/MPans9s/B3PHTsdZ7NygRK0faOca8Ohm0X6a9fZ2j
Y0K2dvKpOyuR+OJv0OwWIJAJPuLodMkYtJHUYmTbf6MG8YgYapAiPLz+E/CHFHv25B+O1ORRxhFn
RghRy4YUVD+8M/5+bJz/Fp0YvVGONaanZshyZ9shZrHUm3gDwFA66Mzw3LyeTP6vBZY1H1dat//O
+T23LLb2VN3I5xI6Ta5MirdcmrS3ID3KfyI0rn47aGYBROcBTkZTmzNg95S+UzeQc0PzMsNT79uq
/nROacdrjGCT3sTHDN/hMq7MkztReJVni+49Vv4M0GkPGw/zJSZrM233bkf6c0Plfg6lZrEpfDKE
Y1WJxA3Bk1QwGROs0303p+tdOmw1XNtB1xLaqUkL39iAigmTYo61Zs8liM2EuLE/pDkP2QKe6xJM
lXzzawWpXhaDzLhn4ugTncxbgtNMs+1b/97lc6wjOy0AvzVVdAlJ2ElYGn+SNuZRkg7zJn0cTRe8
yexDJtC/QV9AqURE9JnnV4eeUB9XVKg+/XRjL7FQZQnmWEIuQxpMtPAlR1n6BB6T1CZGSlCBst6+
eLf8ZxXhyVeEHg9j1uliutZfVS7qXMYoCAQlObgOK6nyTJccBz8NUvXt7y+CDwIDAQABo0IwQDAd
BgNVHQ4EFgQUU3m/WqorSs9UgOHYm8Cd8rIDZsswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF
MAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAFzUfA3P9wF9QZllDHPFUp/L+M+ZBn8b2kMVn54CVVeW
FPFSPCeHlCjtHzoBN6J2/FNQwISbxmtOuowhT6KOVWKR82kV2LyI48SqC/3vqOlLVSoGIG1VeCkZ
7l8wXEskEVX/JJpuXior7gtNn3/3ATiUFJVDBwn7YKnuHKsSjKCaXqeYalltiz8I+8jRRa8YFWSQ
Eg9zKC7F4iRO/Fjs8PRF/iKz6y+O0tlFYQXBl2+odnKPi4w2r78NBc5xjeambx9spnFixdjQg3IM
8WcRiQycE0xyNN+81XHfqnHd4blsjDwSXWXavVcStkNr/+XeTWYRUc+ZruwXtuhxkYzeSf7dNXGi
FSeUHM9h4ya7b6NnJSFd5t0dCy5oGzuCr+yDZ4XUmFF0sbmZgIn/f3gZXHlKYC6SQK5MNyosycdi
yA5d9zZbyuAlJQG03RoHnHcAP9Dc1ew91Pq7P8yF1m9/qS3fuQL39ZeatTXaw2ewh0qpKJ4jjv9c
J2vhsE/zB+4ALtRZh8tSQZXq9EfX7mRBVXyNWQKV3WKdwrnuWih0hKWbt5DHDAff9Yk2dDLWKMGw
sAvgnEzDHNb842m1R0aBL6KCq9NjRHDEjf8tM7qtj3u1cIiuPhnPQCjY/MiQu12ZIvVS5ljFH4gx
Q+6IHdfGjjxDah2nGN59PRbxYvnKkKj9
-----END CERTIFICATE-----

USERTrust ECC Certification Authority
=====================================
-----BEGIN CERTIFICATE-----
MIICjzCCAhWgAwIBAgIQXIuZxVqUxdJxVt7NiYDMJjAKBggqhkjOPQQDAzCBiDELMAkGA1UEBhMC
VVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU
aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv
biBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UEBhMC
VVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU
aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv
biBBdXRob3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQarFRaqfloI+d61SRvU8Za2EurxtW2
0eZzca7dnNYMYf3boIkDuAUU7FfO7l0/4iGzzvfUinngo4N+LZfQYcTxmdwlkWOrfzCjtHDix6Ez
nPO/LlxTsV+zfTJ/ijTjeXmjQjBAMB0GA1UdDgQWBBQ64QmG1M8ZwpZ2dEl23OA1xmNjmjAOBgNV
HQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjA2Z6EWCNzklwBB
HU6+4WMBzzuqQhFkoJ2UOQIReVx7Hfpkue4WQrO/isIJxOzksU0CMQDpKmFHjFJKS04YcPbWRNZu
9YO6bVi9JNlWSOrvxKJGgYhqOkbRqZtNyWHa0V1Xahg=
-----END CERTIFICATE-----

GlobalSign ECC Root CA - R5
===========================
-----BEGIN CERTIFICATE-----
MIICHjCCAaSgAwIBAgIRYFlJ4CYuu1X5CneKcflK2GwwCgYIKoZIzj0EAwMwUDEkMCIGA1UECxMb
R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD
EwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoXDTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMb
R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD
EwpHbG9iYWxTaWduMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAER0UOlvt9Xb/pOdEh+J8LttV7HpI6
SFkc8GIxLcB6KP4ap1yztsyX50XUWPrRd21DosCHZTQKH3rd6zwzocWdTaRvQZU4f8kehOvRnkmS
h5SHDDqFSmafnVmTTZdhBoZKo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAd
BgNVHQ4EFgQUPeYpSJvqB8ohREom3m7e0oPQn1kwCgYIKoZIzj0EAwMDaAAwZQIxAOVpEslu28Yx
uglB4Zf4+/2a4n0Sye18ZNPLBSWLVtmg515dTguDnFt2KaAJJiFqYgIwcdK1j1zqO+F4CYWodZI7
yFz9SO8NdCKoCOJuxUnOxwy8p2Fp8fc74SrL+SvzZpA3
-----END CERTIFICATE-----

IdenTrust Commercial Root CA 1
==============================
-----BEGIN CERTIFICATE-----
MIIFYDCCA0igAwIBAgIQCgFCgAAAAUUjyES1AAAAAjANBgkqhkiG9w0BAQsFADBKMQswCQYDVQQG
EwJVUzESMBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBS
b290IENBIDEwHhcNMTQwMTE2MTgxMjIzWhcNMzQwMTE2MTgxMjIzWjBKMQswCQYDVQQGEwJVUzES
MBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBSb290IENB
IDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCnUBneP5k91DNG8W9RYYKyqU+PZ4ld
hNlT3Qwo2dfw/66VQ3KZ+bVdfIrBQuExUHTRgQ18zZshq0PirK1ehm7zCYofWjK9ouuU+ehcCuz/
mNKvcbO0U59Oh++SvL3sTzIwiEsXXlfEU8L2ApeN2WIrvyQfYo3fw7gpS0l4PJNgiCL8mdo2yMKi
1CxUAGc1bnO/AljwpN3lsKImesrgNqUZFvX9t++uP0D1bVoE/c40yiTcdCMbXTMTEl3EASX2MN0C
XZ/g1Ue9tOsbobtJSdifWwLziuQkkORiT0/Br4sOdBeo0XKIanoBScy0RnnGF7HamB4HWfp1IYVl
3ZBWzvurpWCdxJ35UrCLvYf5jysjCiN2O/cz4ckA82n5S6LgTrx+kzmEB/dEcH7+B1rlsazRGMzy
NeVJSQjKVsk9+w8YfYs7wRPCTY/JTw436R+hDmrfYi7LNQZReSzIJTj0+kuniVyc0uMNOYZKdHzV
WYfCP04MXFL0PfdSgvHqo6z9STQaKPNBiDoT7uje/5kdX7rL6B7yuVBgwDHTc+XvvqDtMwt0viAg
xGds8AgDelWAf0ZOlqf0Hj7h9tgJ4TNkK2PXMl6f+cB7D3hvl7yTmvmcEpB4eoCHFddydJxVdHix
uuFucAS6T6C6aMN7/zHwcz09lCqxC0EOoP5NiGVreTO01wIDAQABo0IwQDAOBgNVHQ8BAf8EBAMC
AQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU7UQZwNPwBovupHu+QucmVMiONnYwDQYJKoZI
hvcNAQELBQADggIBAA2ukDL2pkt8RHYZYR4nKM1eVO8lvOMIkPkp165oCOGUAFjvLi5+U1KMtlwH
6oi6mYtQlNeCgN9hCQCTrQ0U5s7B8jeUeLBfnLOic7iPBZM4zY0+sLj7wM+x8uwtLRvM7Kqas6pg
ghstO8OEPVeKlh6cdbjTMM1gCIOQ045U8U1mwF10A0Cj7oV+wh93nAbowacYXVKV7cndJZ5t+qnt
ozo00Fl72u1Q8zW/7esUTTHHYPTa8Yec4kjixsU3+wYQ+nVZZjFHKdp2mhzpgq7vmrlR94gjmmmV
YjzlVYA211QC//G5Xc7UI2/YRYRKW2XviQzdFKcgyxilJbQN+QHwotL0AMh0jqEqSI5l2xPE4iUX
feu+h1sXIFRRk0pTAwvsXcoz7WL9RccvW9xYoIA55vrX/hMUpu09lEpCdNTDd1lzzY9GvlU47/ro
kTLql1gEIt44w8y8bckzOmoKaT+gyOpyj4xjhiO9bTyWnpXgSUyqorkqG5w2gXjtw+hG4iZZRHUe
2XWJUc0QhJ1hYMtd+ZciTY6Y5uN/9lu7rs3KSoFrXgvzUeF0K+l+J6fZmUlO+KWA2yUPHGNiiskz
Z2s8EIPGrd6ozRaOjfAHN3Gf8qv8QfXBi+wAN10J5U6A7/qxXDgGpRtK4dw4LTzcqx+QGtVKnO7R
cGzM7vRX+Bi6hG6H
-----END CERTIFICATE-----

IdenTrust Public Sector Root CA 1
=================================
-----BEGIN CERTIFICATE-----
MIIFZjCCA06gAwIBAgIQCgFCgAAAAUUjz0Z8AAAAAjANBgkqhkiG9w0BAQsFADBNMQswCQYDVQQG
EwJVUzESMBAGA1UEChMJSWRlblRydXN0MSowKAYDVQQDEyFJZGVuVHJ1c3QgUHVibGljIFNlY3Rv
ciBSb290IENBIDEwHhcNMTQwMTE2MTc1MzMyWhcNMzQwMTE2MTc1MzMyWjBNMQswCQYDVQQGEwJV
UzESMBAGA1UEChMJSWRlblRydXN0MSowKAYDVQQDEyFJZGVuVHJ1c3QgUHVibGljIFNlY3RvciBS
b290IENBIDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2IpT8pEiv6EdrCvsnduTy
P4o7ekosMSqMjbCpwzFrqHd2hCa2rIFCDQjrVVi7evi8ZX3yoG2LqEfpYnYeEe4IFNGyRBb06tD6
Hi9e28tzQa68ALBKK0CyrOE7S8ItneShm+waOh7wCLPQ5CQ1B5+ctMlSbdsHyo+1W/CD80/HLaXI
rcuVIKQxKFdYWuSNG5qrng0M8gozOSI5Cpcu81N3uURF/YTLNiCBWS2ab21ISGHKTN9T0a9SvESf
qy9rg3LvdYDaBjMbXcjaY8ZNzaxmMc3R3j6HEDbhuaR672BQssvKplbgN6+rNBM5Jeg5ZuSYeqoS
mJxZZoY+rfGwyj4GD3vwEUs3oERte8uojHH01bWRNszwFcYr3lEXsZdMUD2xlVl8BX0tIdUAvwFn
ol57plzy9yLxkA2T26pEUWbMfXYD62qoKjgZl3YNa4ph+bz27nb9cCvdKTz4Ch5bQhyLVi9VGxyh
LrXHFub4qjySjmm2AcG1hp2JDws4lFTo6tyePSW8Uybt1as5qsVATFSrsrTZ2fjXctscvG29ZV/v
iDUqZi/u9rNl8DONfJhBaUYPQxxp+pu10GFqzcpL2UyQRqsVWaFHVCkugyhfHMKiq3IXAAaOReyL
4jM9f9oZRORicsPfIsbyVtTdX5Vy7W1f90gDW/3FKqD2cyOEEBsB5wIDAQABo0IwQDAOBgNVHQ8B
Af8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU43HgntinQtnbcZFrlJPrw6PRFKMw
DQYJKoZIhvcNAQELBQADggIBAEf63QqwEZE4rU1d9+UOl1QZgkiHVIyqZJnYWv6IAcVYpZmxI1Qj
t2odIFflAWJBF9MJ23XLblSQdf4an4EKwt3X9wnQW3IV5B4Jaj0z8yGa5hV+rVHVDRDtfULAj+7A
mgjVQdZcDiFpboBhDhXAuM/FSRJSzL46zNQuOAXeNf0fb7iAaJg9TaDKQGXSc3z1i9kKlT/YPyNt
GtEqJBnZhbMX73huqVjRI9PHE+1yJX9dsXNw0H8GlwmEKYBhHfpe/3OsoOOJuBxxFcbeMX8S3OFt
m6/n6J91eEyrRjuazr8FGF1NFTwWmhlQBJqymm9li1JfPFgEKCXAZmExfrngdbkaqIHWchezxQMx
NRF4eKLg6TCMf4DfWN88uieW4oA0beOY02QnrEh+KHdcxiVhJfiFDGX6xDIvpZgF5PgLZxYWxoK4
Mhn5+bl53B/N66+rDt0b20XkeucC4pVd/GnwU2lhlXV5C15V5jgclKlZM57IcXR5f1GJtshquDDI
ajjDbp7hNxbqBWJMWxJH7ae0s1hWx0nzfxJoCTFx8G34Tkf71oXuxVhAGaQdp/lLQzfcaFpPz+vC
ZHTetBXZ9FRUGi8c15dxVJCO2SCdUyt/q4/i6jC8UDfv8Ue1fXwsBOxonbRJRBD0ckscZOf85muQ
3Wl9af0AVqW3rLatt8o+Ae+c
-----END CERTIFICATE-----

Entrust Root Certification Authority - G2
=========================================
-----BEGIN CERTIFICATE-----
MIIEPjCCAyagAwIBAgIESlOMKDANBgkqhkiG9w0BAQsFADCBvjELMAkGA1UEBhMCVVMxFjAUBgNV
BAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVy
bXMxOTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ug
b25seTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIw
HhcNMDkwNzA3MTcyNTU0WhcNMzAxMjA3MTc1NTU0WjCBvjELMAkGA1UEBhMCVVMxFjAUBgNVBAoT
DUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVybXMx
OTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ugb25s
eTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIwggEi
MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6hLZy254Ma+KZ6TABp3bqMriVQRrJ2mFOWHLP
/vaCeb9zYQYKpSfYs1/TRU4cctZOMvJyig/3gxnQaoCAAEUesMfnmr8SVycco2gvCoe9amsOXmXz
HHfV1IWNcCG0szLni6LVhjkCsbjSR87kyUnEO6fe+1R9V77w6G7CebI6C1XiUJgWMhNcL3hWwcKU
s/Ja5CeanyTXxuzQmyWC48zCxEXFjJd6BmsqEZ+pCm5IO2/b1BEZQvePB7/1U1+cPvQXLOZprE4y
TGJ36rfo5bs0vBmLrpxR57d+tVOxMyLlbc9wPBr64ptntoP0jaWvYkxN4FisZDQSA/i2jZRjJKRx
AgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqciZ6
0B7vfec7aVHUbI2fkBJmqzANBgkqhkiG9w0BAQsFAAOCAQEAeZ8dlsa2eT8ijYfThwMEYGprmi5Z
iXMRrEPR9RP/jTkrwPK9T3CMqS/qF8QLVJ7UG5aYMzyorWKiAHarWWluBh1+xLlEjZivEtRh2woZ
Rkfz6/djwUAFQKXSt/S1mja/qYh2iARVBCuch38aNzx+LaUa2NSJXsq9rD1s2G2v1fN2D807iDgi
nWyTmsQ9v4IbZT+mD12q/OWyFcq1rca8PdCE6OoGcrBNOTJ4vz4RnAuknZoh8/CbCzB428Hch0P+
vGOaysXCHMnHjf87ElgI5rY97HosTvuDls4MPGmHVHOkc8KT/1EQrBVUAdj8BbGJoX90g5pJ19xO
e4pIb4tF9g==
-----END CERTIFICATE-----

Entrust Root Certification Authority - EC1
==========================================
-----BEGIN CERTIFICATE-----
MIIC+TCCAoCgAwIBAgINAKaLeSkAAAAAUNCR+TAKBggqhkjOPQQDAzCBvzELMAkGA1UEBhMCVVMx
FjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVn
YWwtdGVybXMxOTA3BgNVBAsTMChjKSAyMDEyIEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXpl
ZCB1c2Ugb25seTEzMDEGA1UEAxMqRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5
IC0gRUMxMB4XDTEyMTIxODE1MjUzNloXDTM3MTIxODE1NTUzNlowgb8xCzAJBgNVBAYTAlVTMRYw
FAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3QubmV0L2xlZ2Fs
LXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxMiBFbnRydXN0LCBJbmMuIC0gZm9yIGF1dGhvcml6ZWQg
dXNlIG9ubHkxMzAxBgNVBAMTKkVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAt
IEVDMTB2MBAGByqGSM49AgEGBSuBBAAiA2IABIQTydC6bUF74mzQ61VfZgIaJPRbiWlH47jCffHy
AsWfoPZb1YsGGYZPUxBtByQnoaD41UcZYUx9ypMn6nQM72+WCf5j7HBdNq1nd67JnXxVRDqiY1Ef
9eNi1KlHBz7MIKNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE
FLdj5xrdjekIplWDpOBqUEFlEUJJMAoGCCqGSM49BAMDA2cAMGQCMGF52OVCR98crlOZF7ZvHH3h
vxGU0QOIdeSNiaSKd0bebWHvAvX7td/M/k7//qnmpwIwW5nXhTcGtXsI/esni0qU+eH6p44mCOh8
kmhtc9hvJqwhAriZtyZBWyVgrtBIGu4G
-----END CERTIFICATE-----

CFCA EV ROOT
============
-----BEGIN CERTIFICATE-----
MIIFjTCCA3WgAwIBAgIEGErM1jANBgkqhkiG9w0BAQsFADBWMQswCQYDVQQGEwJDTjEwMC4GA1UE
CgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRUwEwYDVQQDDAxDRkNB
IEVWIFJPT1QwHhcNMTIwODA4MDMwNzAxWhcNMjkxMjMxMDMwNzAxWjBWMQswCQYDVQQGEwJDTjEw
MC4GA1UECgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRUwEwYDVQQD
DAxDRkNBIEVWIFJPT1QwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDXXWvNED8fBVnV
BU03sQ7smCuOFR36k0sXgiFxEFLXUWRwFsJVaU2OFW2fvwwbwuCjZ9YMrM8irq93VCpLTIpTUnrD
7i7es3ElweldPe6hL6P3KjzJIx1qqx2hp/Hz7KDVRM8Vz3IvHWOX6Jn5/ZOkVIBMUtRSqy5J35DN
uF++P96hyk0g1CXohClTt7GIH//62pCfCqktQT+x8Rgp7hZZLDRJGqgG16iI0gNyejLi6mhNbiyW
ZXvKWfry4t3uMCz7zEasxGPrb382KzRzEpR/38wmnvFyXVBlWY9ps4deMm/DGIq1lY+wejfeWkU7
xzbh72fROdOXW3NiGUgthxwG+3SYIElz8AXSG7Ggo7cbcNOIabla1jj0Ytwli3i/+Oh+uFzJlU9f
py25IGvPa931DfSCt/SyZi4QKPaXWnuWFo8BGS1sbn85WAZkgwGDg8NNkt0yxoekN+kWzqotaK8K
gWU6cMGbrU1tVMoqLUuFG7OA5nBFDWteNfB/O7ic5ARwiRIlk9oKmSJgamNgTnYGmE69g60dWIol
hdLHZR4tjsbftsbhf4oEIRUpdPA+nJCdDC7xij5aqgwJHsfVPKPtl8MeNPo4+QgO48BdK4PRVmrJ
tqhUUy54Mmc9gn900PvhtgVguXDbjgv5E1hvcWAQUhC5wUEJ73IfZzF4/5YFjQIDAQABo2MwYTAf
BgNVHSMEGDAWgBTj/i39KNALtbq2osS/BqoFjJP7LzAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB
/wQEAwIBBjAdBgNVHQ4EFgQU4/4t/SjQC7W6tqLEvwaqBYyT+y8wDQYJKoZIhvcNAQELBQADggIB
ACXGumvrh8vegjmWPfBEp2uEcwPenStPuiB/vHiyz5ewG5zz13ku9Ui20vsXiObTej/tUxPQ4i9q
ecsAIyjmHjdXNYmEwnZPNDatZ8POQQaIxffu2Bq41gt/UP+TqhdLjOztUmCypAbqTuv0axn96/Ua
4CUqmtzHQTb3yHQFhDmVOdYLO6Qn+gjYXB74BGBSESgoA//vU2YApUo0FmZ8/Qmkrp5nGm9BC2sG
E5uPhnEFtC+NiWYzKXZUmhH4J/qyP5Hgzg0b8zAarb8iXRvTvyUFTeGSGn+ZnzxEk8rUQElsgIfX
BDrDMlI1Dlb4pd19xIsNER9Tyx6yF7Zod1rg1MvIB671Oi6ON7fQAUtDKXeMOZePglr4UeWJoBjn
aH9dCi77o0cOPaYjesYBx4/IXr9tgFa+iiS6M+qf4TIRnvHST4D2G0CvOJ4RUHlzEhLN5mydLIhy
PDCBBpEi6lmt2hkuIsKNuYyH4Ga8cyNfIWRjgEj1oDwYPZTISEEdQLpe/v5WOaHIz16eGWRGENoX
kbcFgKyLmZJ956LYBws2J+dIeWCKw9cTXPhyQN9Ky8+ZAAoACxGV2lZFA4gKn2fQ1XmxqI1AbQ3C
ekD6819kR5LLU7m7Wc5P/dAVUwHY3+vZ5nbv0CO7O6l5s9UCKc2Jo5YPSjXnTkLAdc0Hz+Ys63su
-----END CERTIFICATE-----

OISTE WISeKey Global Root GB CA
===============================
-----BEGIN CERTIFICATE-----
MIIDtTCCAp2gAwIBAgIQdrEgUnTwhYdGs/gjGvbCwDANBgkqhkiG9w0BAQsFADBtMQswCQYDVQQG
EwJDSDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNl
ZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQiBDQTAeFw0xNDEyMDExNTAw
MzJaFw0zOTEyMDExNTEwMzFaMG0xCzAJBgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYD
VQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEds
b2JhbCBSb290IEdCIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2Be3HEokKtaX
scriHvt9OO+Y9bI5mE4nuBFde9IllIiCFSZqGzG7qFshISvYD06fWvGxWuR51jIjK+FTzJlFXHtP
rby/h0oLS5daqPZI7H17Dc0hBt+eFf1Biki3IPShehtX1F1Q/7pn2COZH8g/497/b1t3sWtuuMlk
9+HKQUYOKXHQuSP8yYFfTvdv37+ErXNku7dCjmn21HYdfp2nuFeKUWdy19SouJVUQHMD9ur06/4o
Qnc/nSMbsrY9gBQHTC5P99UKFg29ZkM3fiNDecNAhvVMKdqOmq0NpQSHiB6F4+lT1ZvIiwNjeOvg
GUpuuy9rM2RYk61pv48b74JIxwIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB
/zAdBgNVHQ4EFgQUNQ/INmNe4qPs+TtmFc5RUuORmj0wEAYJKwYBBAGCNxUBBAMCAQAwDQYJKoZI
hvcNAQELBQADggEBAEBM+4eymYGQfp3FsLAmzYh7KzKNbrghcViXfa43FK8+5/ea4n32cZiZBKpD
dHij40lhPnOMTZTg+XHEthYOU3gf1qKHLwI5gSk8rxWYITD+KJAAjNHhy/peyP34EEY7onhCkRd0
VQreUGdNZtGn//3ZwLWoo4rOZvUPQ82nK1d7Y0Zqqi5S2PTt4W2tKZB4SLrhI6qjiey1q5bAtEui
HZeeevJuQHHfaPFlTc58Bd9TZaml8LGXBHAVRgOY1NK/VLSgWH1Sb9pWJmLU2NuJMW8c8CLC02Ic
Nc1MaRVUGpCY3useX8p3x8uOPUNpnJpY0CQ73xtAln41rYHHTnG6iBM=
-----END CERTIFICATE-----

SZAFIR ROOT CA2
===============
-----BEGIN CERTIFICATE-----
MIIDcjCCAlqgAwIBAgIUPopdB+xV0jLVt+O2XwHrLdzk1uQwDQYJKoZIhvcNAQELBQAwUTELMAkG
A1UEBhMCUEwxKDAmBgNVBAoMH0tyYWpvd2EgSXpiYSBSb3psaWN6ZW5pb3dhIFMuQS4xGDAWBgNV
BAMMD1NaQUZJUiBST09UIENBMjAeFw0xNTEwMTkwNzQzMzBaFw0zNTEwMTkwNzQzMzBaMFExCzAJ
BgNVBAYTAlBMMSgwJgYDVQQKDB9LcmFqb3dhIEl6YmEgUm96bGljemVuaW93YSBTLkEuMRgwFgYD
VQQDDA9TWkFGSVIgUk9PVCBDQTIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC3vD5Q
qEvNQLXOYeeWyrSh2gwisPq1e3YAd4wLz32ohswmUeQgPYUM1ljj5/QqGJ3a0a4m7utT3PSQ1hNK
DJA8w/Ta0o4NkjrcsbH/ON7Dui1fgLkCvUqdGw+0w8LBZwPd3BucPbOw3gAeqDRHu5rr/gsUvTaE
2g0gv/pby6kWIK05YO4vdbbnl5z5Pv1+TW9NL++IDWr63fE9biCloBK0TXC5ztdyO4mTp4CEHCdJ
ckm1/zuVnsHMyAHs6A6KCpbns6aH5db5BSsNl0BwPLqsdVqc1U2dAgrSS5tmS0YHF2Wtn2yIANwi
ieDhZNRnvDF5YTy7ykHNXGoAyDw4jlivAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0P
AQH/BAQDAgEGMB0GA1UdDgQWBBQuFqlKGLXLzPVvUPMjX/hd56zwyDANBgkqhkiG9w0BAQsFAAOC
AQEAtXP4A9xZWx126aMqe5Aosk3AM0+qmrHUuOQn/6mWmc5G4G18TKI4pAZw8PRBEew/R40/cof5
O/2kbytTAOD/OblqBw7rHRz2onKQy4I9EYKL0rufKq8h5mOGnXkZ7/e7DDWQw4rtTw/1zBLZpD67
oPwglV9PJi8RI4NOdQcPv5vRtB3pEAT+ymCPoky4rc/hkA/NrgrHXXu3UNLUYfrVFdvXn4dRVOul
4+vJhaAlIDf7js4MNIThPIGyd05DpYhfhmehPea0XGG2Ptv+tyjFogeutcrKjSoS75ftwjCkySp6
+/NNIxuZMzSgLvWpCz/UXeHPhJ/iGcJfitYgHuNztw==
-----END CERTIFICATE-----

Certum Trusted Network CA 2
===========================
-----BEGIN CERTIFICATE-----
MIIF0jCCA7qgAwIBAgIQIdbQSk8lD8kyN/yqXhKN6TANBgkqhkiG9w0BAQ0FADCBgDELMAkGA1UE
BhMCUEwxIjAgBgNVBAoTGVVuaXpldG8gVGVjaG5vbG9naWVzIFMuQS4xJzAlBgNVBAsTHkNlcnR1
bSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEkMCIGA1UEAxMbQ2VydHVtIFRydXN0ZWQgTmV0d29y
ayBDQSAyMCIYDzIwMTExMDA2MDgzOTU2WhgPMjA0NjEwMDYwODM5NTZaMIGAMQswCQYDVQQGEwJQ
TDEiMCAGA1UEChMZVW5pemV0byBUZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENl
cnRpZmljYXRpb24gQXV0aG9yaXR5MSQwIgYDVQQDExtDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENB
IDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC9+Xj45tWADGSdhhuWZGc/IjoedQF9
7/tcZ4zJzFxrqZHmuULlIEub2pt7uZld2ZuAS9eEQCsn0+i6MLs+CRqnSZXvK0AkwpfHp+6bJe+o
CgCXhVqqndwpyeI1B+twTUrWwbNWuKFBOJvR+zF/j+Bf4bE/D44WSWDXBo0Y+aomEKsq09DRZ40b
Rr5HMNUuctHFY9rnY3lEfktjJImGLjQ/KUxSiyqnwOKRKIm5wFv5HdnnJ63/mgKXwcZQkpsCLL2p
uTRZCr+ESv/f/rOf69me4Jgj7KZrdxYq28ytOxykh9xGc14ZYmhFV+SQgkK7QtbwYeDBoz1mo130
GO6IyY0XRSmZMnUCMe4pJshrAua1YkV/NxVaI2iJ1D7eTiew8EAMvE0Xy02isx7QBlrd9pPPV3WZ
9fqGGmd4s7+W/jTcvedSVuWz5XV710GRBdxdaeOVDUO5/IOWOZV7bIBaTxNyxtd9KXpEulKkKtVB
Rgkg/iKgtlswjbyJDNXXcPiHUv3a76xRLgezTv7QCdpw75j6VuZt27VXS9zlLCUVyJ4ueE742pye
hizKV/Ma5ciSixqClnrDvFASadgOWkaLOusm+iPJtrCBvkIApPjW/jAux9JG9uWOdf3yzLnQh1vM
BhBgu4M1t15n3kfsmUjxpKEV/q2MYo45VU85FrmxY53/twIDAQABo0IwQDAPBgNVHRMBAf8EBTAD
AQH/MB0GA1UdDgQWBBS2oVQ5AsOgP46KvPrU+Bym0ToO/TAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZI
hvcNAQENBQADggIBAHGlDs7k6b8/ONWJWsQCYftMxRQXLYtPU2sQF/xlhMcQSZDe28cmk4gmb3DW
Al45oPePq5a1pRNcgRRtDoGCERuKTsZPpd1iHkTfCVn0W3cLN+mLIMb4Ck4uWBzrM9DPhmDJ2vuA
L55MYIR4PSFk1vtBHxgP58l1cb29XN40hz5BsA72udY/CROWFC/emh1auVbONTqwX3BNXuMp8SMo
clm2q8KMZiYcdywmdjWLKKdpoPk79SPdhRB0yZADVpHnr7pH1BKXESLjokmUbOe3lEu6LaTaM4tM
pkT/WjzGHWTYtTHkpjx6qFcL2+1hGsvxznN3Y6SHb0xRONbkX8eftoEq5IVIeVheO/jbAoJnwTnb
w3RLPTYe+SmTiGhbqEQZIfCn6IENLOiTNrQ3ssqwGyZ6miUfmpqAnksqP/ujmv5zMnHCnsZy4Ypo
J/HkD7TETKVhk/iXEAcqMCWpuchxuO9ozC1+9eB+D4Kob7a6bINDd82Kkhehnlt4Fj1F4jNy3eFm
ypnTycUm/Q1oBEauttmbjL4ZvrHG8hnjXALKLNhvSgfZyTXaQHXyxKcZb55CEJh15pWLYLztxRLX
is7VmFxWlgPF7ncGNf/P5O4/E2Hu29othfDNrp2yGAlFw5Khchf8R7agCyzxxN5DaAhqXzvwdmP7
zAYspsbiDrW5viSP
-----END CERTIFICATE-----

Hellenic Academic and Research Institutions RootCA 2015
=======================================================
-----BEGIN CERTIFICATE-----
MIIGCzCCA/OgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBpjELMAkGA1UEBhMCR1IxDzANBgNVBAcT
BkF0aGVuczFEMEIGA1UEChM7SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0
aW9ucyBDZXJ0LiBBdXRob3JpdHkxQDA+BgNVBAMTN0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNl
YXJjaCBJbnN0aXR1dGlvbnMgUm9vdENBIDIwMTUwHhcNMTUwNzA3MTAxMTIxWhcNNDAwNjMwMTAx
MTIxWjCBpjELMAkGA1UEBhMCR1IxDzANBgNVBAcTBkF0aGVuczFEMEIGA1UEChM7SGVsbGVuaWMg
QWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9ucyBDZXJ0LiBBdXRob3JpdHkxQDA+BgNV
BAMTN0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgUm9vdENBIDIw
MTUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDC+Kk/G4n8PDwEXT2QNrCROnk8Zlrv
bTkBSRq0t89/TSNTt5AA4xMqKKYx8ZEA4yjsriFBzh/a/X0SWwGDD7mwX5nh8hKDgE0GPt+sr+eh
iGsxr/CL0BgzuNtFajT0AoAkKAoCFZVedioNmToUW/bLy1O8E00BiDeUJRtCvCLYjqOWXjrZMts+
6PAQZe104S+nfK8nNLspfZu2zwnI5dMK/IhlZXQK3HMcXM1AsRzUtoSMTFDPaI6oWa7CJ06CojXd
FPQf/7J31Ycvqm59JCfnxssm5uX+Zwdj2EUN3TpZZTlYepKZcj2chF6IIbjV9Cz82XBST3i4vTwr
i5WY9bPRaM8gFH5MXF/ni+X1NYEZN9cRCLdmvtNKzoNXADrDgfgXy5I2XdGj2HUb4Ysn6npIQf1F
GQatJ5lOwXBH3bWfgVMS5bGMSF0xQxfjjMZ6Y5ZLKTBOhE5iGV48zpeQpX8B653g+IuJ3SWYPZK2
fu/Z8VFRfS0myGlZYeCsargqNhEEelC9MoS+L9xy1dcdFkfkR2YgP/SWxa+OAXqlD3pk9Q0Yh9mu
iNX6hME6wGkoLfINaFGq46V3xqSQDqE3izEjR8EJCOtu93ib14L8hCCZSRm2Ekax+0VVFqmjZayc
Bw/qa9wfLgZy7IaIEuQt218FL+TwA9MmM+eAws1CoRc0CwIDAQABo0IwQDAPBgNVHRMBAf8EBTAD
AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUcRVnyMjJvXVdctA4GGqd83EkVAswDQYJKoZI
hvcNAQELBQADggIBAHW7bVRLqhBYRjTyYtcWNl0IXtVsyIe9tC5G8jH4fOpCtZMWVdyhDBKg2mF+
D1hYc2Ryx+hFjtyp8iY/xnmMsVMIM4GwVhO+5lFc2JsKT0ucVlMC6U/2DWDqTUJV6HwbISHTGzrM
d/K4kPFox/la/vot9L/J9UUbzjgQKjeKeaO04wlshYaT/4mWJ3iBj2fjRnRUjtkNaeJK9E10A/+y
d+2VZ5fkscWrv2oj6NSU4kQoYsRL4vDY4ilrGnB+JGGTe08DMiUNRSQrlrRGar9KC/eaj8GsGsVn
82800vpzY4zvFrCopEYq+OsS7HK07/grfoxSwIuEVPkvPuNVqNxmsdnhX9izjFk0WaSrT2y7Hxjb
davYy5LNlDhhDgcGH0tGEPEVvo2FXDtKK4F5D7Rpn0lQl033DlZdwJVqwjbDG2jJ9SrcR5q+ss7F
Jej6A7na+RZukYT1HCjI/CbM1xyQVqdfbzoEvM14iQuODy+jqk+iGxI9FghAD/FGTNeqewjBCvVt
J94Cj8rDtSvK6evIIVM4pcw72Hc3MKJP2W/R8kCtQXoXxdZKNYm3QdV8hn9VTYNKpXMgwDqvkPGa
JI7ZjnHKe7iG2rKPmT4dEw0SEe7Uq/DpFXYC5ODfqiAeW2GFZECpkJcNrVPSWh2HagCXZWK0vm9q
p/UsQu0yrbYhnr68
-----END CERTIFICATE-----

Hellenic Academic and Research Institutions ECC RootCA 2015
===========================================================
-----BEGIN CERTIFICATE-----
MIICwzCCAkqgAwIBAgIBADAKBggqhkjOPQQDAjCBqjELMAkGA1UEBhMCR1IxDzANBgNVBAcTBkF0
aGVuczFEMEIGA1UEChM7SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9u
cyBDZXJ0LiBBdXRob3JpdHkxRDBCBgNVBAMTO0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJj
aCBJbnN0aXR1dGlvbnMgRUNDIFJvb3RDQSAyMDE1MB4XDTE1MDcwNzEwMzcxMloXDTQwMDYzMDEw
MzcxMlowgaoxCzAJBgNVBAYTAkdSMQ8wDQYDVQQHEwZBdGhlbnMxRDBCBgNVBAoTO0hlbGxlbmlj
IEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ2VydC4gQXV0aG9yaXR5MUQwQgYD
VQQDEztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25zIEVDQyBSb290
Q0EgMjAxNTB2MBAGByqGSM49AgEGBSuBBAAiA2IABJKgQehLgoRc4vgxEZmGZE4JJS+dQS8KrjVP
dJWyUWRrjWvmP3CV8AVER6ZyOFB2lQJajq4onvktTpnvLEhvTCUp6NFxW98dwXU3tNf6e3pCnGoK
Vlp8aQuqgAkkbH7BRqNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0O
BBYEFLQiC4KZJAEOnLvkDv2/+5cgk5kqMAoGCCqGSM49BAMCA2cAMGQCMGfOFmI4oqxiRaeplSTA
GiecMjvAwNW6qef4BENThe5SId6d9SWDPp5YSy/XZxMOIQIwBeF1Ad5o7SofTUwJCA3sS61kFyjn
dc5FZXIhF8siQQ6ME5g4mlRtm8rifOoCWCKR
-----END CERTIFICATE-----

ISRG Root X1
============
-----BEGIN CERTIFICATE-----
MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAwTzELMAkGA1UE
BhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2VhcmNoIEdyb3VwMRUwEwYDVQQD
EwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4WhcNMzUwNjA0MTEwNDM4WjBPMQswCQYDVQQG
EwJVUzEpMCcGA1UEChMgSW50ZXJuZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMT
DElTUkcgUm9vdCBYMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3oJHP0FDfzm54r
Vygch77ct984kIxuPOZXoHj3dcKi/vVqbvYATyjb3miGbESTtrFj/RQSa78f0uoxmyF+0TM8ukj1
3Xnfs7j/EvEhmkvBioZxaUpmZmyPfjxwv60pIgbz5MDmgK7iS4+3mX6UA5/TR5d8mUgjU+g4rk8K
b4Mu0UlXjIB0ttov0DiNewNwIRt18jA8+o+u3dpjq+sWT8KOEUt+zwvo/7V3LvSye0rgTBIlDHCN
Aymg4VMk7BPZ7hm/ELNKjD+Jo2FR3qyHB5T0Y3HsLuJvW5iB4YlcNHlsdu87kGJ55tukmi8mxdAQ
4Q7e2RCOFvu396j3x+UCB5iPNgiV5+I3lg02dZ77DnKxHZu8A/lJBdiB3QW0KtZB6awBdpUKD9jf
1b0SHzUvKBds0pjBqAlkd25HN7rOrFleaJ1/ctaJxQZBKT5ZPt0m9STJEadao0xAH0ahmbWnOlFu
hjuefXKnEgV4We0+UXgVCwOPjdAvBbI+e0ocS3MFEvzG6uBQE3xDk3SzynTnjh8BCNAw1FtxNrQH
usEwMFxIt4I7mKZ9YIqioymCzLq9gwQbooMDQaHWBfEbwrbwqHyGO0aoSCqI3Haadr8faqU9GY/r
OPNk3sgrDQoo//fb4hVC1CLQJ13hef4Y53CIrU7m2Ys6xt0nUW7/vGT1M0NPAgMBAAGjQjBAMA4G
A1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBR5tFnme7bl5AFzgAiIyBpY
9umbbjANBgkqhkiG9w0BAQsFAAOCAgEAVR9YqbyyqFDQDLHYGmkgJykIrGF1XIpu+ILlaS/V9lZL
ubhzEFnTIZd+50xx+7LSYK05qAvqFyFWhfFQDlnrzuBZ6brJFe+GnY+EgPbk6ZGQ3BebYhtF8GaV
0nxvwuo77x/Py9auJ/GpsMiu/X1+mvoiBOv/2X/qkSsisRcOj/KKNFtY2PwByVS5uCbMiogziUwt
hDyC3+6WVwW6LLv3xLfHTjuCvjHIInNzktHCgKQ5ORAzI4JMPJ+GslWYHb4phowim57iaztXOoJw
TdwJx4nLCgdNbOhdjsnvzqvHu7UrTkXWStAmzOVyyghqpZXjFaH3pO3JLF+l+/+sKAIuvtd7u+Nx
e5AW0wdeRlN8NwdCjNPElpzVmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1NbdWhscdCb+ZA
JzVcoyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq4RgqsahD
YVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPAmRGunUHBcnWEvgJBQl9n
JEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57demyPxgcYxn/eR44/KJ4EBs+lVDR3veyJ
m+kXQ99b21/+jh5Xos1AnX5iItreGCc=
-----END CERTIFICATE-----

AC RAIZ FNMT-RCM
================
-----BEGIN CERTIFICATE-----
MIIFgzCCA2ugAwIBAgIPXZONMGc2yAYdGsdUhGkHMA0GCSqGSIb3DQEBCwUAMDsxCzAJBgNVBAYT
AkVTMREwDwYDVQQKDAhGTk1ULVJDTTEZMBcGA1UECwwQQUMgUkFJWiBGTk1ULVJDTTAeFw0wODEw
MjkxNTU5NTZaFw0zMDAxMDEwMDAwMDBaMDsxCzAJBgNVBAYTAkVTMREwDwYDVQQKDAhGTk1ULVJD
TTEZMBcGA1UECwwQQUMgUkFJWiBGTk1ULVJDTTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC
ggIBALpxgHpMhm5/yBNtwMZ9HACXjywMI7sQmkCpGreHiPibVmr75nuOi5KOpyVdWRHbNi63URcf
qQgfBBckWKo3Shjf5TnUV/3XwSyRAZHiItQDwFj8d0fsjz50Q7qsNI1NOHZnjrDIbzAzWHFctPVr
btQBULgTfmxKo0nRIBnuvMApGGWn3v7v3QqQIecaZ5JCEJhfTzC8PhxFtBDXaEAUwED653cXeuYL
j2VbPNmaUtu1vZ5Gzz3rkQUCwJaydkxNEJY7kvqcfw+Z374jNUUeAlz+taibmSXaXvMiwzn15Cou
08YfxGyqxRxqAQVKL9LFwag0Jl1mpdICIfkYtwb1TplvqKtMUejPUBjFd8g5CSxJkjKZqLsXF3mw
WsXmo8RZZUc1g16p6DULmbvkzSDGm0oGObVo/CK67lWMK07q87Hj/LaZmtVC+nFNCM+HHmpxffnT
tOmlcYF7wk5HlqX2doWjKI/pgG6BU6VtX7hI+cL5NqYuSf+4lsKMB7ObiFj86xsc3i1w4peSMKGJ
47xVqCfWS+2QrYv6YyVZLag13cqXM7zlzced0ezvXg5KkAYmY6252TUtB7p2ZSysV4999AeU14EC
ll2jB0nVetBX+RvnU0Z1qrB5QstocQjpYL05ac70r8NWQMetUqIJ5G+GR4of6ygnXYMgrwTJbFaa
i0b1AgMBAAGjgYMwgYAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE
FPd9xf3E6Jobd2Sn9R2gzL+HYJptMD4GA1UdIAQ3MDUwMwYEVR0gADArMCkGCCsGAQUFBwIBFh1o
dHRwOi8vd3d3LmNlcnQuZm5tdC5lcy9kcGNzLzANBgkqhkiG9w0BAQsFAAOCAgEAB5BK3/MjTvDD
nFFlm5wioooMhfNzKWtN/gHiqQxjAb8EZ6WdmF/9ARP67Jpi6Yb+tmLSbkyU+8B1RXxlDPiyN8+s
D8+Nb/kZ94/sHvJwnvDKuO+3/3Y3dlv2bojzr2IyIpMNOmqOFGYMLVN0V2Ue1bLdI4E7pWYjJ2cJ
j+F3qkPNZVEI7VFY/uY5+ctHhKQV8Xa7pO6kO8Rf77IzlhEYt8llvhjho6Tc+hj507wTmzl6NLrT
Qfv6MooqtyuGC2mDOL7Nii4LcK2NJpLuHvUBKwrZ1pebbuCoGRw6IYsMHkCtA+fdZn71uSANA+iW
+YJF1DngoABd15jmfZ5nc8OaKveri6E6FO80vFIOiZiaBECEHX5FaZNXzuvO+FB8TxxuBEOb+dY7
Ixjp6o7RTUaN8Tvkasq6+yO3m/qZASlaWFot4/nUbQ4mrcFuNLwy+AwF+mWj2zs3gyLp1txyM/1d
8iC9djwj2ij3+RvrWWTV3F9yfiD8zYm1kGdNYno/Tq0dwzn+evQoFt9B9kiABdcPUXmsEKvU7ANm
5mqwujGSQkBqvjrTcuFqN1W8rB2Vt2lh8kORdOag0wokRqEIr9baRRmW1FMdW4R58MD3R++Lj8UG
rp1MYp3/RgT408m2ECVAdf4WqslKYIYvuu8wd+RU4riEmViAqhOLUTpPSPaLtrM=
-----END CERTIFICATE-----

Amazon Root CA 1
================
-----BEGIN CERTIFICATE-----
MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsFADA5MQswCQYD
VQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAxMB4XDTE1
MDUyNjAwMDAwMFoXDTM4MDExNzAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpv
bjEZMBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
ggEBALJ4gHHKeNXjca9HgFB0fW7Y14h29Jlo91ghYPl0hAEvrAIthtOgQ3pOsqTQNroBvo3bSMgH
FzZM9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qwIFAGbHrQ
gLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6VOujw5H5SNz/0egwLX0t
dHA114gk957EWW67c4cX8jJGKLhD+rcdqsq08p8kDi1L93FcXmn/6pUCyziKrlA4b9v7LWIbxcce
VOF34GfID5yHI9Y/QCB/IIDEgEw+OyQmjgSubJrIqg0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB
/zAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFIQYzIU07LwMlJQuCFmcx7IQTgoIMA0GCSqGSIb3
DQEBCwUAA4IBAQCY8jdaQZChGsV2USggNiMOruYou6r4lK5IpDB/G/wkjUu0yKGX9rbxenDIU5PM
CCjjmCXPI6T53iHTfIUJrU6adTrCC2qJeHZERxhlbI1Bjjt/msv0tadQ1wUsN+gDS63pYaACbvXy
8MWy7Vu33PqUXHeeE6V/Uq2V8viTO96LXFvKWlJbYK8U90vvo/ufQJVtMVT8QtPHRh8jrdkPSHCa
2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2
xJNDd2ZhwLnoQdeXeGADbkpyrqXRfboQnoZsG4q5WTP468SQvvG5
-----END CERTIFICATE-----

Amazon Root CA 2
================
-----BEGIN CERTIFICATE-----
MIIFQTCCAymgAwIBAgITBmyf0pY1hp8KD+WGePhbJruKNzANBgkqhkiG9w0BAQwFADA5MQswCQYD
VQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAyMB4XDTE1
MDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpv
bjEZMBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC
ggIBAK2Wny2cSkxKgXlRmeyKy2tgURO8TW0G/LAIjd0ZEGrHJgw12MBvIITplLGbhQPDW9tK6Mj4
kHbZW0/jTOgGNk3Mmqw9DJArktQGGWCsN0R5hYGCrVo34A3MnaZMUnbqQ523BNFQ9lXg1dKmSYXp
N+nKfq5clU1Imj+uIFptiJXZNLhSGkOQsL9sBbm2eLfq0OQ6PBJTYv9K8nu+NQWpEjTj82R0Yiw9
AElaKP4yRLuH3WUnAnE72kr3H9rN9yFVkE8P7K6C4Z9r2UXTu/Bfh+08LDmG2j/e7HJV63mjrdvd
fLC6HM783k81ds8P+HgfajZRRidhW+mez/CiVX18JYpvL7TFz4QuK/0NURBs+18bvBt+xa47mAEx
kv8LV/SasrlX6avvDXbR8O70zoan4G7ptGmh32n2M8ZpLpcTnqWHsFcQgTfJU7O7f/aS0ZzQGPSS
btqDT6ZjmUyl+17vIWR6IF9sZIUVyzfpYgwLKhbcAS4y2j5L9Z469hdAlO+ekQiG+r5jqFoz7Mt0
Q5X5bGlSNscpb/xVA1wf+5+9R+vnSUeVC06JIglJ4PVhHvG/LopyboBZ/1c6+XUyo05f7O0oYtlN
c/LMgRdg7c3r3NunysV+Ar3yVAhU/bQtCSwXVEqY0VThUWcI0u1ufm8/0i2BWSlmy5A5lREedCf+
3euvAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSw
DPBMMPQFWAJI/TPlUq9LhONmUjANBgkqhkiG9w0BAQwFAAOCAgEAqqiAjw54o+Ci1M3m9Zh6O+oA
A7CXDpO8Wqj2LIxyh6mx/H9z/WNxeKWHWc8w4Q0QshNabYL1auaAn6AFC2jkR2vHat+2/XcycuUY
+gn0oJMsXdKMdYV2ZZAMA3m3MSNjrXiDCYZohMr/+c8mmpJ5581LxedhpxfL86kSk5Nrp+gvU5LE
YFiwzAJRGFuFjWJZY7attN6a+yb3ACfAXVU3dJnJUH/jWS5E4ywl7uxMMne0nxrpS10gxdr9HIcW
xkPo1LsmmkVwXqkLN1PiRnsn/eBG8om3zEK2yygmbtmlyTrIQRNg91CMFa6ybRoVGld45pIq2WWQ
gj9sAq+uEjonljYE1x2igGOpm/HlurR8FLBOybEfdF849lHqm/osohHUqS0nGkWxr7JOcQ3AWEbW
aQbLU8uz/mtBzUF+fUwPfHJ5elnNXkoOrJupmHN5fLT0zLm4BwyydFy4x2+IoZCn9Kr5v2c69BoV
Yh63n749sSmvZ6ES8lgQGVMDMBu4Gon2nL2XA46jCfMdiyHxtN/kHNGfZQIG6lzWE7OE76KlXIx3
KadowGuuQNKotOrN8I1LOJwZmhsoVLiJkO/KdYE+HvJkJMcYr07/R54H9jVlpNMKVv/1F2Rs76gi
JUmTtt8AF9pYfl3uxRuw0dFfIRDH+fO6AgonB8Xx1sfT4PsJYGw=
-----END CERTIFICATE-----

Amazon Root CA 3
================
-----BEGIN CERTIFICATE-----
MIIBtjCCAVugAwIBAgITBmyf1XSXNmY/Owua2eiedgPySjAKBggqhkjOPQQDAjA5MQswCQYDVQQG
EwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAzMB4XDTE1MDUy
NjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZ
MBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABCmXp8ZB
f8ANm+gBG1bG8lKlui2yEujSLtf6ycXYqm0fc4E7O5hrOXwzpcVOho6AF2hiRVd9RFgdszflZwjr
Zt6jQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSrttvXBp43
rDCGB5Fwx5zEGbF4wDAKBggqhkjOPQQDAgNJADBGAiEA4IWSoxe3jfkrBqWTrBqYaGFy+uGh0Psc
eGCmQ5nFuMQCIQCcAu/xlJyzlvnrxir4tiz+OpAUFteMYyRIHN8wfdVoOw==
-----END CERTIFICATE-----

Amazon Root CA 4
================
-----BEGIN CERTIFICATE-----
MIIB8jCCAXigAwIBAgITBmyf18G7EEwpQ+Vxe3ssyBrBDjAKBggqhkjOPQQDAzA5MQswCQYDVQQG
EwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSA0MB4XDTE1MDUy
NjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZ
MBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgNDB2MBAGByqGSM49AgEGBSuBBAAiA2IABNKrijdPo1MN
/sGKe0uoe0ZLY7Bi9i0b2whxIdIA6GO9mif78DluXeo9pcmBqqNbIJhFXRbb/egQbeOc4OO9X4Ri
83BkM6DLJC9wuoihKqB1+IGuYgbEgds5bimwHvouXKNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV
HQ8BAf8EBAMCAYYwHQYDVR0OBBYEFNPsxzplbszh2naaVvuc84ZtV+WBMAoGCCqGSM49BAMDA2gA
MGUCMDqLIfG9fhGt0O9Yli/W651+kI0rz2ZVwyzjKKlwCkcO8DdZEv8tmZQoTipPNU0zWgIxAOp1
AE47xDqUEpHJWEadIRNyp4iciuRMStuW1KyLa2tJElMzrdfkviT8tQp21KW8EA==
-----END CERTIFICATE-----

TUBITAK Kamu SM SSL Kok Sertifikasi - Surum 1
=============================================
-----BEGIN CERTIFICATE-----
MIIEYzCCA0ugAwIBAgIBATANBgkqhkiG9w0BAQsFADCB0jELMAkGA1UEBhMCVFIxGDAWBgNVBAcT
D0dlYnplIC0gS29jYWVsaTFCMEAGA1UEChM5VHVya2l5ZSBCaWxpbXNlbCB2ZSBUZWtub2xvamlr
IEFyYXN0aXJtYSBLdXJ1bXUgLSBUVUJJVEFLMS0wKwYDVQQLEyRLYW11IFNlcnRpZmlrYXN5b24g
TWVya2V6aSAtIEthbXUgU00xNjA0BgNVBAMTLVRVQklUQUsgS2FtdSBTTSBTU0wgS29rIFNlcnRp
ZmlrYXNpIC0gU3VydW0gMTAeFw0xMzExMjUwODI1NTVaFw00MzEwMjUwODI1NTVaMIHSMQswCQYD
VQQGEwJUUjEYMBYGA1UEBxMPR2ViemUgLSBLb2NhZWxpMUIwQAYDVQQKEzlUdXJraXllIEJpbGlt
c2VsIHZlIFRla25vbG9qaWsgQXJhc3Rpcm1hIEt1cnVtdSAtIFRVQklUQUsxLTArBgNVBAsTJEth
bXUgU2VydGlmaWthc3lvbiBNZXJrZXppIC0gS2FtdSBTTTE2MDQGA1UEAxMtVFVCSVRBSyBLYW11
IFNNIFNTTCBLb2sgU2VydGlmaWthc2kgLSBTdXJ1bSAxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
MIIBCgKCAQEAr3UwM6q7a9OZLBI3hNmNe5eA027n/5tQlT6QlVZC1xl8JoSNkvoBHToP4mQ4t4y8
6Ij5iySrLqP1N+RAjhgleYN1Hzv/bKjFxlb4tO2KRKOrbEz8HdDc72i9z+SqzvBV96I01INrN3wc
wv61A+xXzry0tcXtAA9TNypN9E8Mg/uGz8v+jE69h/mniyFXnHrfA2eJLJ2XYacQuFWQfw4tJzh0
3+f92k4S400VIgLI4OD8D62K18lUUMw7D8oWgITQUVbDjlZ/iSIzL+aFCr2lqBs23tPcLG07xxO9
WSMs5uWk99gL7eqQQESolbuT1dCANLZGeA4fAJNG4e7p+exPFwIDAQABo0IwQDAdBgNVHQ4EFgQU
ZT/HiobGPN08VFw1+DrtUgxHV8gwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJ
KoZIhvcNAQELBQADggEBACo/4fEyjq7hmFxLXs9rHmoJ0iKpEsdeV31zVmSAhHqT5Am5EM2fKifh
AHe+SMg1qIGf5LgsyX8OsNJLN13qudULXjS99HMpw+0mFZx+CFOKWI3QSyjfwbPfIPP54+M638yc
lNhOT8NrF7f3cuitZjO1JVOr4PhMqZ398g26rrnZqsZr+ZO7rqu4lzwDGrpDxpa5RXI4s6ehlj2R
e37AIVNMh+3yC1SVUZPVIqUNivGTDj5UDrDYyU7c8jEyVupk+eq1nRZmQnLzf9OxMUP8pI4X8W0j
q5Rm+K37DwhuJi1/FwcJsoz7UMCflo3Ptv0AnVoUmr8CRPXBwp8iXqIPoeM=
-----END CERTIFICATE-----

GDCA TrustAUTH R5 ROOT
======================
-----BEGIN CERTIFICATE-----
MIIFiDCCA3CgAwIBAgIIfQmX/vBH6nowDQYJKoZIhvcNAQELBQAwYjELMAkGA1UEBhMCQ04xMjAw
BgNVBAoMKUdVQU5HIERPTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZIENPLixMVEQuMR8wHQYDVQQD
DBZHRENBIFRydXN0QVVUSCBSNSBST09UMB4XDTE0MTEyNjA1MTMxNVoXDTQwMTIzMTE1NTk1OVow
YjELMAkGA1UEBhMCQ04xMjAwBgNVBAoMKUdVQU5HIERPTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZ
IENPLixMVEQuMR8wHQYDVQQDDBZHRENBIFRydXN0QVVUSCBSNSBST09UMIICIjANBgkqhkiG9w0B
AQEFAAOCAg8AMIICCgKCAgEA2aMW8Mh0dHeb7zMNOwZ+Vfy1YI92hhJCfVZmPoiC7XJjDp6L3TQs
AlFRwxn9WVSEyfFrs0yw6ehGXTjGoqcuEVe6ghWinI9tsJlKCvLriXBjTnnEt1u9ol2x8kECK62p
OqPseQrsXzrj/e+APK00mxqriCZ7VqKChh/rNYmDf1+uKU49tm7srsHwJ5uu4/Ts765/94Y9cnrr
pftZTqfrlYwiOXnhLQiPzLyRuEH3FMEjqcOtmkVEs7LXLM3GKeJQEK5cy4KOFxg2fZfmiJqwTTQJ
9Cy5WmYqsBebnh52nUpmMUHfP/vFBu8btn4aRjb3ZGM74zkYI+dndRTVdVeSN72+ahsmUPI2JgaQ
xXABZG12ZuGR224HwGGALrIuL4xwp9E7PLOR5G62xDtw8mySlwnNR30YwPO7ng/Wi64HtloPzgsM
R6flPri9fcebNaBhlzpBdRfMK5Z3KpIhHtmVdiBnaM8Nvd/WHwlqmuLMc3GkL30SgLdTMEZeS1SZ
D2fJpcjyIMGC7J0R38IC+xo70e0gmu9lZJIQDSri3nDxGGeCjGHeuLzRL5z7D9Ar7Rt2ueQ5Vfj4
oR24qoAATILnsn8JuLwwoC8N9VKejveSswoAHQBUlwbgsQfZxw9cZX08bVlX5O2ljelAU58VS6Bx
9hoh49pwBiFYFIeFd3mqgnkCAwEAAaNCMEAwHQYDVR0OBBYEFOLJQJ9NzuiaoXzPDj9lxSmIahlR
MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQDRSVfg
p8xoWLoBDysZzY2wYUWsEe1jUGn4H3++Fo/9nesLqjJHdtJnJO29fDMylyrHBYZmDRd9FBUb1Ov9
H5r2XpdptxolpAqzkT9fNqyL7FeoPueBihhXOYV0GkLH6VsTX4/5COmSdI31R9KrO9b7eGZONn35
6ZLpBN79SWP8bfsUcZNnL0dKt7n/HipzcEYwv1ryL3ml4Y0M2fmyYzeMN2WFcGpcWwlyua1jPLHd
+PwyvzeG5LuOmCd+uh8W4XAR8gPfJWIyJyYYMoSf/wA6E7qaTfRPuBRwIrHKK5DOKcFw9C+df/KQ
HtZa37dG/OaG+svgIHZ6uqbL9XzeYqWxi+7egmaKTjowHz+Ay60nugxe19CxVsp3cbK1daFQqUBD
F8Io2c9Si1vIY9RCPqAzekYu9wogRlR+ak8x8YF+QnQ4ZXMn7sZ8uI7XpTrXmKGcjBBV09tL7ECQ
8s1uV9JiDnxXk7Gnbc2dg7sq5+W2O3FYrf3RRbxake5TFW/TRQl1brqQXR4EzzffHqhmsYzmIGrv
/EhOdJhCrylvLmrH+33RZjEizIYAfmaDDEL0vTSSwxrqT8p+ck0LcIymSLumoRT2+1hEmRSuqguT
aaApJUqlyyvdimYHFngVV3Eb7PVHhPOeMTd61X8kreS8/f3MboPoDKi3QWwH3b08hpcv0g==
-----END CERTIFICATE-----

SSL.com Root Certification Authority RSA
========================================
-----BEGIN CERTIFICATE-----
MIIF3TCCA8WgAwIBAgIIeyyb0xaAMpkwDQYJKoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVVMxDjAM
BgNVBAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24x
MTAvBgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBSU0EwHhcNMTYw
MjEyMTczOTM5WhcNNDEwMjEyMTczOTM5WjB8MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMx
EDAOBgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NM
LmNvbSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IFJTQTCCAiIwDQYJKoZIhvcNAQEBBQAD
ggIPADCCAgoCggIBAPkP3aMrfcvQKv7sZ4Wm5y4bunfh4/WvpOz6Sl2RxFdHaxh3a3by/ZPkPQ/C
Fp4LZsNWlJ4Xg4XOVu/yFv0AYvUiCVToZRdOQbngT0aXqhvIuG5iXmmxX9sqAn78bMrzQdjt0Oj8
P2FI7bADFB0QDksZ4LtO7IZl/zbzXmcCC52GVWH9ejjt/uIZALdvoVBidXQ8oPrIJZK0bnoix/ge
oeOy3ZExqysdBP+lSgQ36YWkMyv94tZVNHwZpEpox7Ko07fKoZOI68GXvIz5HdkihCR0xwQ9aqkp
k8zruFvh/l8lqjRYyMEjVJ0bmBHDOJx+PYZspQ9AhnwC9FwCTyjLrnGfDzrIM/4RJTXq/LrFYD3Z
fBjVsqnTdXgDciLKOsMf7yzlLqn6niy2UUb9rwPW6mBo6oUWNmuF6R7As93EJNyAKoFBbZQ+yODJ
gUEAnl6/f8UImKIYLEJAs/lvOCdLToD0PYFH4Ih86hzOtXVcUS4cK38acijnALXRdMbX5J+tB5O2
UzU1/Dfkw/ZdFr4hc96SCvigY2q8lpJqPvi8ZVWb3vUNiSYE/CUapiVpy8JtynziWV+XrOvvLsi8
1xtZPCvM8hnIk2snYxnP/Okm+Mpxm3+T/jRnhE6Z6/yzeAkzcLpmpnbtG3PrGqUNxCITIJRWCk4s
bE6x/c+cCbqiM+2HAgMBAAGjYzBhMB0GA1UdDgQWBBTdBAkHovV6fVJTEpKV7jiAJQ2mWTAPBgNV
HRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFN0ECQei9Xp9UlMSkpXuOIAlDaZZMA4GA1UdDwEB/wQE
AwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAIBgRlCn7Jp0cHh5wYfGVcpNxJK1ok1iOMq8bs3AD/CUr
dIWQPXhq9LmLpZc7tRiRux6n+UBbkflVma8eEdBcHadm47GUBwwyOabqG7B52B2ccETjit3E+ZUf
ijhDPwGFpUenPUayvOUiaPd7nNgsPgohyC0zrL/FgZkxdMF1ccW+sfAjRfSda/wZY52jvATGGAsl
u1OJD7OAUN5F7kR/q5R4ZJjT9ijdh9hwZXT7DrkT66cPYakylszeu+1jTBi7qUD3oFRuIIhxdRjq
erQ0cuAjJ3dctpDqhiVAq+8zD8ufgr6iIPv2tS0a5sKFsXQP+8hlAqRSAUfdSSLBv9jra6x+3uxj
MxW3IwiPxg+NQVrdjsW5j+VFP3jbutIbQLH+cU0/4IGiul607BXgk90IH37hVZkLId6Tngr75qNJ
vTYw/ud3sqB1l7UtgYgXZSD32pAAn8lSzDLKNXz1PQ/YK9f1JmzJBjSWFupwWRoyeXkLtoh/D1JI
Pb9s2KJELtFOt3JY04kTlf5Eq/jXixtunLwsoFvVagCvXzfh1foQC5ichucmj87w7G6KVwuA406y
wKBjYZC6VWg3dGq2ktufoYYitmUnDuy2n0Jg5GfCtdpBC8TTi2EbvPofkSvXRAdeuims2cXp71NI
WuuA8ShYIc2wBlX7Jz9TkHCpBB5XJ7k=
-----END CERTIFICATE-----

SSL.com Root Certification Authority ECC
========================================
-----BEGIN CERTIFICATE-----
MIICjTCCAhSgAwIBAgIIdebfy8FoW6gwCgYIKoZIzj0EAwIwfDELMAkGA1UEBhMCVVMxDjAMBgNV
BAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xMTAv
BgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYwMjEy
MTgxNDAzWhcNNDEwMjEyMTgxNDAzWjB8MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMxEDAO
BgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NMLmNv
bSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzB2MBAGByqGSM49AgEGBSuBBAAiA2IA
BEVuqVDEpiM2nl8ojRfLliJkP9x6jh3MCLOicSS6jkm5BBtHllirLZXI7Z4INcgn64mMU1jrYor+
8FsPazFSY0E7ic3s7LaNGdM0B9y7xgZ/wkWV7Mt/qCPgCemB+vNH06NjMGEwHQYDVR0OBBYEFILR
hXMw5zUE044CkvvlpNHEIejNMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUgtGFczDnNQTT
jgKS++Wk0cQh6M0wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2cAMGQCMG/n61kRpGDPYbCW
e+0F+S8Tkdzt5fxQaxFGRrMcIQBiu77D5+jNB5n5DQtdcj7EqgIwH7y6C+IwJPt8bYBVCpk+gA0z
5Wajs6O7pdWLjwkspl1+4vAHCGht0nxpbl/f5Wpl
-----END CERTIFICATE-----

SSL.com EV Root Certification Authority RSA R2
==============================================
-----BEGIN CERTIFICATE-----
MIIF6zCCA9OgAwIBAgIIVrYpzTS8ePYwDQYJKoZIhvcNAQELBQAwgYIxCzAJBgNVBAYTAlVTMQ4w
DAYDVQQIDAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9u
MTcwNQYDVQQDDC5TU0wuY29tIEVWIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIy
MB4XDTE3MDUzMTE4MTQzN1oXDTQyMDUzMDE4MTQzN1owgYIxCzAJBgNVBAYTAlVTMQ4wDAYDVQQI
DAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9uMTcwNQYD
VQQDDC5TU0wuY29tIEVWIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIyMIICIjAN
BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAjzZlQOHWTcDXtOlG2mvqM0fNTPl9fb69LT3w23jh
hqXZuglXaO1XPqDQCEGD5yhBJB/jchXQARr7XnAjssufOePPxU7Gkm0mxnu7s9onnQqG6YE3Bf7w
cXHswxzpY6IXFJ3vG2fThVUCAtZJycxa4bH3bzKfydQ7iEGonL3Lq9ttewkfokxykNorCPzPPFTO
Zw+oz12WGQvE43LrrdF9HSfvkusQv1vrO6/PgN3B0pYEW3p+pKk8OHakYo6gOV7qd89dAFmPZiw+
B6KjBSYRaZfqhbcPlgtLyEDhULouisv3D5oi53+aNxPN8k0TayHRwMwi8qFG9kRpnMphNQcAb9Zh
CBHqurj26bNg5U257J8UZslXWNvNh2n4ioYSA0e/ZhN2rHd9NCSFg83XqpyQGp8hLH94t2S42Oim
9HizVcuE0jLEeK6jj2HdzghTreyI/BXkmg3mnxp3zkyPuBQVPWKchjgGAGYS5Fl2WlPAApiiECto
RHuOec4zSnaqW4EWG7WK2NAAe15itAnWhmMOpgWVSbooi4iTsjQc2KRVbrcc0N6ZVTsj9CLg+Slm
JuwgUHfbSguPvuUCYHBBXtSuUDkiFCbLsjtzdFVHB3mBOagwE0TlBIqulhMlQg+5U8Sb/M3kHN48
+qvWBkofZ6aYMBzdLNvcGJVXZsb/XItW9XcCAwEAAaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAfBgNV
HSMEGDAWgBT5YLvU49U09rj1BoAlp3PbRmmonjAdBgNVHQ4EFgQU+WC71OPVNPa49QaAJadz20Zp
qJ4wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQBWs47LCp1Jjr+kxJG7ZhcFUZh1
++VQLHqe8RT6q9OKPv+RKY9ji9i0qVQBDb6Thi/5Sm3HXvVX+cpVHBK+Rw82xd9qt9t1wkclf7nx
Y/hoLVUE0fKNsKTPvDxeH3jnpaAgcLAExbf3cqfeIg29MyVGjGSSJuM+LmOW2puMPfgYCdcDzH2G
guDKBAdRUNf/ktUM79qGn5nX67evaOI5JpS6aLe/g9Pqemc9YmeuJeVy6OLk7K4S9ksrPJ/psEDz
OFSz/bdoyNrGj1E8svuR3Bznm53htw1yj+KkxKl4+esUrMZDBcJlOSgYAsOCsp0FvmXtll9ldDz7
CTUue5wT/RsPXcdtgTpWD8w74a8CLyKsRspGPKAcTNZEtF4uXBVmCeEmKf7GUmG6sXP/wwyc5Wxq
lD8UykAWlYTzWamsX0xhk23RO8yilQwipmdnRC652dKKQbNmC1r7fSOl8hqw/96bg5Qu0T/fkreR
rwU7ZcegbLHNYhLDkBvjJc40vG93drEQw/cFGsDWr3RiSBd3kmmQYRzelYB0VI8YHMPzA9C/pEN1
hlMYegouCRw2n5H9gooiS9EOUCXdywMMF8mDAAhONU2Ki+3wApRmLER/y5UnlhetCTCstnEXbosX
9hwJ1C07mKVx01QT2WDz9UtmT/rx7iASjbSsV7FFY6GsdqnC+w==
-----END CERTIFICATE-----

SSL.com EV Root Certification Authority ECC
===========================================
-----BEGIN CERTIFICATE-----
MIIClDCCAhqgAwIBAgIILCmcWxbtBZUwCgYIKoZIzj0EAwIwfzELMAkGA1UEBhMCVVMxDjAMBgNV
BAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xNDAy
BgNVBAMMK1NTTC5jb20gRVYgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYw
MjEyMTgxNTIzWhcNNDEwMjEyMTgxNTIzWjB/MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMx
EDAOBgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjE0MDIGA1UEAwwrU1NM
LmNvbSBFViBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzB2MBAGByqGSM49AgEGBSuB
BAAiA2IABKoSR5CYG/vvw0AHgyBO8TCCogbR8pKGYfL2IWjKAMTH6kMAVIbc/R/fALhBYlzccBYy
3h+Z1MzFB8gIH2EWB1E9fVwHU+M1OIzfzZ/ZLg1KthkuWnBaBu2+8KGwytAJKaNjMGEwHQYDVR0O
BBYEFFvKXuXe0oGqzagtZFG22XKbl+ZPMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUW8pe
5d7SgarNqC1kUbbZcpuX5k8wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2gAMGUCMQCK5kCJ
N+vp1RPZytRrJPOwPYdGWBrssd9v+1a6cGvHOMzosYxPD/fxZ3YOg9AeUY8CMD32IygmTMZgh5Mm
m7I1HrrW9zzRHM76JTymGoEVW/MSD2zuZYrJh6j5B+BimoxcSg==
-----END CERTIFICATE-----

GlobalSign Root CA - R6
=======================
-----BEGIN CERTIFICATE-----
MIIFgzCCA2ugAwIBAgIORea7A4Mzw4VlSOb/RVEwDQYJKoZIhvcNAQEMBQAwTDEgMB4GA1UECxMX
R2xvYmFsU2lnbiBSb290IENBIC0gUjYxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkds
b2JhbFNpZ24wHhcNMTQxMjEwMDAwMDAwWhcNMzQxMjEwMDAwMDAwWjBMMSAwHgYDVQQLExdHbG9i
YWxTaWduIFJvb3QgQ0EgLSBSNjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFs
U2lnbjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAJUH6HPKZvnsFMp7PPcNCPG0RQss
grRIxutbPK6DuEGSMxSkb3/pKszGsIhrxbaJ0cay/xTOURQh7ErdG1rG1ofuTToVBu1kZguSgMpE
3nOUTvOniX9PeGMIyBJQbUJmL025eShNUhqKGoC3GYEOfsSKvGRMIRxDaNc9PIrFsmbVkJq3MQbF
vuJtMgamHvm566qjuL++gmNQ0PAYid/kD3n16qIfKtJwLnvnvJO7bVPiSHyMEAc4/2ayd2F+4OqM
PKq0pPbzlUoSB239jLKJz9CgYXfIWHSw1CM69106yqLbnQneXUQtkPGBzVeS+n68UARjNN9rkxi+
azayOeSsJDa38O+2HBNXk7besvjihbdzorg1qkXy4J02oW9UivFyVm4uiMVRQkQVlO6jxTiWm05O
WgtH8wY2SXcwvHE35absIQh1/OZhFj931dmRl4QKbNQCTXTAFO39OfuD8l4UoQSwC+n+7o/hbguy
CLNhZglqsQY6ZZZZwPA1/cnaKI0aEYdwgQqomnUdnjqGBQCe24DWJfncBZ4nWUx2OVvq+aWh2IMP
0f/fMBH5hc8zSPXKbWQULHpYT9NLCEnFlWQaYw55PfWzjMpYrZxCRXluDocZXFSxZba/jJvcE+kN
b7gu3GduyYsRtYQUigAZcIN5kZeR1BonvzceMgfYFGM8KEyvAgMBAAGjYzBhMA4GA1UdDwEB/wQE
AwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSubAWjkxPioufi1xzWx/B/yGdToDAfBgNV
HSMEGDAWgBSubAWjkxPioufi1xzWx/B/yGdToDANBgkqhkiG9w0BAQwFAAOCAgEAgyXt6NH9lVLN
nsAEoJFp5lzQhN7craJP6Ed41mWYqVuoPId8AorRbrcWc+ZfwFSY1XS+wc3iEZGtIxg93eFyRJa0
lV7Ae46ZeBZDE1ZXs6KzO7V33EByrKPrmzU+sQghoefEQzd5Mr6155wsTLxDKZmOMNOsIeDjHfrY
BzN2VAAiKrlNIC5waNrlU/yDXNOd8v9EDERm8tLjvUYAGm0CuiVdjaExUd1URhxN25mW7xocBFym
Fe944Hn+Xds+qkxV/ZoVqW/hpvvfcDDpw+5CRu3CkwWJ+n1jez/QcYF8AOiYrg54NMMl+68KnyBr
3TsTjxKM4kEaSHpzoHdpx7Zcf4LIHv5YGygrqGytXm3ABdJ7t+uA/iU3/gKbaKxCXcPu9czc8FB1
0jZpnOZ7BN9uBmm23goJSFmH63sUYHpkqmlD75HHTOwY3WzvUy2MmeFe8nI+z1TIvWfspA9MRf/T
uTAjB0yPEL+GltmZWrSZVxykzLsViVO6LAUP5MSeGbEYNNVMnbrt9x+vJJUEeKgDu+6B5dpffItK
oZB0JaezPkvILFa9x8jvOOJckvB595yEunQtYQEgfn7R8k8HWV+LLUNS60YMlOH1Zkd5d9VUWx+t
JDfLRVpOoERIyNiwmcUVhAn21klJwGW45hpxbqCo8YLoRT5s1gLXCmeDBVrJpBA=
-----END CERTIFICATE-----

OISTE WISeKey Global Root GC CA
===============================
-----BEGIN CERTIFICATE-----
MIICaTCCAe+gAwIBAgIQISpWDK7aDKtARb8roi066jAKBggqhkjOPQQDAzBtMQswCQYDVQQGEwJD
SDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEo
MCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQyBDQTAeFw0xNzA1MDkwOTQ4MzRa
Fw00MjA1MDkwOTU4MzNaMG0xCzAJBgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYDVQQL
ExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEdsb2Jh
bCBSb290IEdDIENBMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAETOlQwMYPchi82PG6s4nieUqjFqdr
VCTbUf/q9Akkwwsin8tqJ4KBDdLArzHkdIJuyiXZjHWd8dvQmqJLIX4Wp2OQ0jnUsYd4XxiWD1Ab
NTcPasbc2RNNpI6QN+a9WzGRo1QwUjAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAd
BgNVHQ4EFgQUSIcUrOPDnpBgOtfKie7TrYy0UGYwEAYJKwYBBAGCNxUBBAMCAQAwCgYIKoZIzj0E
AwMDaAAwZQIwJsdpW9zV57LnyAyMjMPdeYwbY9XJUpROTYJKcx6ygISpJcBMWm1JKWB4E+J+SOtk
AjEA2zQgMgj/mkkCtojeFK9dbJlxjRo/i9fgojaGHAeCOnZT/cKi7e97sIBPWA9LUzm9
-----END CERTIFICATE-----

UCA Global G2 Root
==================
-----BEGIN CERTIFICATE-----
MIIFRjCCAy6gAwIBAgIQXd+x2lqj7V2+WmUgZQOQ7zANBgkqhkiG9w0BAQsFADA9MQswCQYDVQQG
EwJDTjERMA8GA1UECgwIVW5pVHJ1c3QxGzAZBgNVBAMMElVDQSBHbG9iYWwgRzIgUm9vdDAeFw0x
NjAzMTEwMDAwMDBaFw00MDEyMzEwMDAwMDBaMD0xCzAJBgNVBAYTAkNOMREwDwYDVQQKDAhVbmlU
cnVzdDEbMBkGA1UEAwwSVUNBIEdsb2JhbCBHMiBSb290MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
MIICCgKCAgEAxeYrb3zvJgUno4Ek2m/LAfmZmqkywiKHYUGRO8vDaBsGxUypK8FnFyIdK+35KYmT
oni9kmugow2ifsqTs6bRjDXVdfkX9s9FxeV67HeToI8jrg4aA3++1NDtLnurRiNb/yzmVHqUwCoV
8MmNsHo7JOHXaOIxPAYzRrZUEaalLyJUKlgNAQLx+hVRZ2zA+te2G3/RVogvGjqNO7uCEeBHANBS
h6v7hn4PJGtAnTRnvI3HLYZveT6OqTwXS3+wmeOwcWDcC/Vkw85DvG1xudLeJ1uK6NjGruFZfc8o
LTW4lVYa8bJYS7cSN8h8s+1LgOGN+jIjtm+3SJUIsUROhYw6AlQgL9+/V087OpAh18EmNVQg7Mc/
R+zvWr9LesGtOxdQXGLYD0tK3Cv6brxzks3sx1DoQZbXqX5t2Okdj4q1uViSukqSKwxW/YDrCPBe
KW4bHAyvj5OJrdu9o54hyokZ7N+1wxrrFv54NkzWbtA+FxyQF2smuvt6L78RHBgOLXMDj6DlNaBa
4kx1HXHhOThTeEDMg5PXCp6dW4+K5OXgSORIskfNTip1KnvyIvbJvgmRlld6iIis7nCs+dwp4wwc
OxJORNanTrAmyPPZGpeRaOrvjUYG0lZFWJo8DA+DuAUlwznPO6Q0ibd5Ei9Hxeepl2n8pndntd97
8XplFeRhVmUCAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0O
BBYEFIHEjMz15DD/pQwIX4wVZyF0Ad/fMA0GCSqGSIb3DQEBCwUAA4ICAQATZSL1jiutROTL/7lo
5sOASD0Ee/ojL3rtNtqyzm325p7lX1iPyzcyochltq44PTUbPrw7tgTQvPlJ9Zv3hcU2tsu8+Mg5
1eRfB70VVJd0ysrtT7q6ZHafgbiERUlMjW+i67HM0cOU2kTC5uLqGOiiHycFutfl1qnN3e92mI0A
Ds0b+gO3joBYDic/UvuUospeZcnWhNq5NXHzJsBPd+aBJ9J3O5oUb3n09tDh05S60FdRvScFDcH9
yBIw7m+NESsIndTUv4BFFJqIRNow6rSn4+7vW4LVPtateJLbXDzz2K36uGt/xDYotgIVilQsnLAX
c47QN6MUPJiVAAwpBVueSUmxX8fjy88nZY41F7dXyDDZQVu5FLbowg+UMaeUmMxq67XhJ/UQqAHo
jhJi6IjMtX9Gl8CbEGY4GjZGXyJoPd/JxhMnq1MGrKI8hgZlb7F+sSlEmqO6SWkoaY/X5V+tBIZk
bxqgDMUIYs6Ao9Dz7GjevjPHF1t/gMRMTLGmhIrDO7gJzRSBuhjjVFc2/tsvfEehOjPI+Vg7RE+x
ygKJBJYoaMVLuCaJu9YzL1DV/pqJuhgyklTGW+Cd+V7lDSKb9triyCGyYiGqhkCyLmTTX8jjfhFn
RR8F/uOi77Oos/N9j/gMHyIfLXC0uAE0djAA5SN4p1bXUB+K+wb1whnw0A==
-----END CERTIFICATE-----

UCA Extended Validation Root
============================
-----BEGIN CERTIFICATE-----
MIIFWjCCA0KgAwIBAgIQT9Irj/VkyDOeTzRYZiNwYDANBgkqhkiG9w0BAQsFADBHMQswCQYDVQQG
EwJDTjERMA8GA1UECgwIVW5pVHJ1c3QxJTAjBgNVBAMMHFVDQSBFeHRlbmRlZCBWYWxpZGF0aW9u
IFJvb3QwHhcNMTUwMzEzMDAwMDAwWhcNMzgxMjMxMDAwMDAwWjBHMQswCQYDVQQGEwJDTjERMA8G
A1UECgwIVW5pVHJ1c3QxJTAjBgNVBAMMHFVDQSBFeHRlbmRlZCBWYWxpZGF0aW9uIFJvb3QwggIi
MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCpCQcoEwKwmeBkqh5DFnpzsZGgdT6o+uM4AHrs
iWogD4vFsJszA1qGxliG1cGFu0/GnEBNyr7uaZa4rYEwmnySBesFK5pI0Lh2PpbIILvSsPGP2KxF
Rv+qZ2C0d35qHzwaUnoEPQc8hQ2E0B92CvdqFN9y4zR8V05WAT558aopO2z6+I9tTcg1367r3CTu
eUWnhbYFiN6IXSV8l2RnCdm/WhUFhvMJHuxYMjMR83dksHYf5BA1FxvyDrFspCqjc/wJHx4yGVMR
59mzLC52LqGj3n5qiAno8geK+LLNEOfic0CTuwjRP+H8C5SzJe98ptfRr5//lpr1kXuYC3fUfugH
0mK1lTnj8/FtDw5lhIpjVMWAtuCeS31HJqcBCF3RiJ7XwzJE+oJKCmhUfzhTA8ykADNkUVkLo4KR
el7sFsLzKuZi2irbWWIQJUoqgQtHB0MGcIfS+pMRKXpITeuUx3BNr2fVUbGAIAEBtHoIppB/TuDv
B0GHr2qlXov7z1CymlSvw4m6WC31MJixNnI5fkkE/SmnTHnkBVfblLkWU41Gsx2VYVdWf6/wFlth
WG82UBEL2KwrlRYaDh8IzTY0ZRBiZtWAXxQgXy0MoHgKaNYs1+lvK9JKBZP8nm9rZ/+I8U6laUpS
NwXqxhaN0sSZ0YIrO7o1dfdRUVjzyAfd5LQDfwIDAQABo0IwQDAdBgNVHQ4EFgQU2XQ65DA9DfcS
3H5aBZ8eNJr34RQwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQEL
BQADggIBADaNl8xCFWQpN5smLNb7rhVpLGsaGvdftvkHTFnq88nIua7Mui563MD1sC3AO6+fcAUR
ap8lTwEpcOPlDOHqWnzcSbvBHiqB9RZLcpHIojG5qtr8nR/zXUACE/xOHAbKsxSQVBcZEhrxH9cM
aVr2cXj0lH2RC47skFSOvG+hTKv8dGT9cZr4QQehzZHkPJrgmzI5c6sq1WnIeJEmMX3ixzDx/BR4
dxIOE/TdFpS/S2d7cFOFyrC78zhNLJA5wA3CXWvp4uXViI3WLL+rG761KIcSF3Ru/H38j9CHJrAb
+7lsq+KePRXBOy5nAliRn+/4Qh8st2j1da3Ptfb/EX3C8CSlrdP6oDyp+l3cpaDvRKS+1ujl5BOW
F3sGPjLtx7dCvHaj2GU4Kzg1USEODm8uNBNA4StnDG1KQTAYI1oyVZnJF+A83vbsea0rWBmirSwi
GpWOvpaQXUJXxPkUAzUrHC1RVwinOt4/5Mi0A3PCwSaAuwtCH60NryZy2sy+s6ODWA2CxR9GUeOc
GMyNm43sSet1UNWMKFnKdDTajAshqx7qG+XH/RU+wBeq+yNuJkbL+vmxcmtpzyKEC2IPrNkZAJSi
djzULZrtBJ4tBmIQN1IchXIbJ+XMxjHsN+xjWZsLHXbMfjKaiJUINlK73nZfdklJrX+9ZSCyycEr
dhh2n1ax
-----END CERTIFICATE-----

Certigna Root CA
================
-----BEGIN CERTIFICATE-----
MIIGWzCCBEOgAwIBAgIRAMrpG4nxVQMNo+ZBbcTjpuEwDQYJKoZIhvcNAQELBQAwWjELMAkGA1UE
BhMCRlIxEjAQBgNVBAoMCURoaW15b3RpczEcMBoGA1UECwwTMDAwMiA0ODE0NjMwODEwMDAzNjEZ
MBcGA1UEAwwQQ2VydGlnbmEgUm9vdCBDQTAeFw0xMzEwMDEwODMyMjdaFw0zMzEwMDEwODMyMjda
MFoxCzAJBgNVBAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxHDAaBgNVBAsMEzAwMDIgNDgxNDYz
MDgxMDAwMzYxGTAXBgNVBAMMEENlcnRpZ25hIFJvb3QgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4IC
DwAwggIKAoICAQDNGDllGlmx6mQWDoyUJJV8g9PFOSbcDO8WV43X2KyjQn+Cyu3NW9sOty3tRQgX
stmzy9YXUnIo245Onoq2C/mehJpNdt4iKVzSs9IGPjA5qXSjklYcoW9MCiBtnyN6tMbaLOQdLNyz
KNAT8kxOAkmhVECe5uUFoC2EyP+YbNDrihqECB63aCPuI9Vwzm1RaRDuoXrC0SIxwoKF0vJVdlB8
JXrJhFwLrN1CTivngqIkicuQstDuI7pmTLtipPlTWmR7fJj6o0ieD5Wupxj0auwuA0Wv8HT4Ks16
XdG+RCYyKfHx9WzMfgIhC59vpD++nVPiz32pLHxYGpfhPTc3GGYo0kDFUYqMwy3OU4gkWGQwFsWq
4NYKpkDfePb1BHxpE4S80dGnBs8B92jAqFe7OmGtBIyT46388NtEbVncSVmurJqZNjBBe3YzIoej
wpKGbvlw7q6Hh5UbxHq9MfPU0uWZ/75I7HX1eBYdpnDBfzwboZL7z8g81sWTCo/1VTp2lc5ZmIoJ
lXcymoO6LAQ6l73UL77XbJuiyn1tJslV1c/DeVIICZkHJC1kJWumIWmbat10TWuXekG9qxf5kBdI
jzb5LdXF2+6qhUVB+s06RbFo5jZMm5BX7CO5hwjCxAnxl4YqKE3idMDaxIzb3+KhF1nOJFl0Mdp/
/TBt2dzhauH8XwIDAQABo4IBGjCCARYwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYw
HQYDVR0OBBYEFBiHVuBud+4kNTxOc5of1uHieX4rMB8GA1UdIwQYMBaAFBiHVuBud+4kNTxOc5of
1uHieX4rMEQGA1UdIAQ9MDswOQYEVR0gADAxMC8GCCsGAQUFBwIBFiNodHRwczovL3d3d3cuY2Vy
dGlnbmEuZnIvYXV0b3JpdGVzLzBtBgNVHR8EZjBkMC+gLaArhilodHRwOi8vY3JsLmNlcnRpZ25h
LmZyL2NlcnRpZ25hcm9vdGNhLmNybDAxoC+gLYYraHR0cDovL2NybC5kaGlteW90aXMuY29tL2Nl
cnRpZ25hcm9vdGNhLmNybDANBgkqhkiG9w0BAQsFAAOCAgEAlLieT/DjlQgi581oQfccVdV8AOIt
OoldaDgvUSILSo3L6btdPrtcPbEo/uRTVRPPoZAbAh1fZkYJMyjhDSSXcNMQH+pkV5a7XdrnxIxP
TGRGHVyH41neQtGbqH6mid2PHMkwgu07nM3A6RngatgCdTer9zQoKJHyBApPNeNgJgH60BGM+RFq
7q89w1DTj18zeTyGqHNFkIwgtnJzFyO+B2XleJINugHA64wcZr+shncBlA2c5uk5jR+mUYyZDDl3
4bSb+hxnV29qao6pK0xXeXpXIs/NX2NGjVxZOob4Mkdio2cNGJHc+6Zr9UhhcyNZjgKnvETq9Emd
8VRY+WCv2hikLyhF3HqgiIZd8zvn/yk1gPxkQ5Tm4xxvvq0OKmOZK8l+hfZx6AYDlf7ej0gcWtSS
6Cvu5zHbugRqh5jnxV/vfaci9wHYTfmJ0A6aBVmknpjZbyvKcL5kwlWj9Omvw5Ip3IgWJJk8jSaY
tlu3zM63Nwf9JtmYhST/WSMDmu2dnajkXjjO11INb9I/bbEFa0nOipFGc/T2L/Coc3cOZayhjWZS
aX5LaAzHHjcng6WMxwLkFM1JAbBzs/3GkDpv0mztO+7skb6iQ12LAEpmJURw3kAP+HwV96LOPNde
E4yBFxgX0b3xdxA61GU5wSesVywlVP+i2k+KYTlerj1KjL0=
-----END CERTIFICATE-----

emSign Root CA - G1
===================
-----BEGIN CERTIFICATE-----
MIIDlDCCAnygAwIBAgIKMfXkYgxsWO3W2DANBgkqhkiG9w0BAQsFADBnMQswCQYDVQQGEwJJTjET
MBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRl
ZDEcMBoGA1UEAxMTZW1TaWduIFJvb3QgQ0EgLSBHMTAeFw0xODAyMTgxODMwMDBaFw00MzAyMTgx
ODMwMDBaMGcxCzAJBgNVBAYTAklOMRMwEQYDVQQLEwplbVNpZ24gUEtJMSUwIwYDVQQKExxlTXVk
aHJhIFRlY2hub2xvZ2llcyBMaW1pdGVkMRwwGgYDVQQDExNlbVNpZ24gUm9vdCBDQSAtIEcxMIIB
IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAk0u76WaK7p1b1TST0Bsew+eeuGQzf2N4aLTN
LnF115sgxk0pvLZoYIr3IZpWNVrzdr3YzZr/k1ZLpVkGoZM0Kd0WNHVO8oG0x5ZOrRkVUkr+PHB1
cM2vK6sVmjM8qrOLqs1D/fXqcP/tzxE7lM5OMhbTI0Aqd7OvPAEsbO2ZLIvZTmmYsvePQbAyeGHW
DV/D+qJAkh1cF+ZwPjXnorfCYuKrpDhMtTk1b+oDafo6VGiFbdbyL0NVHpENDtjVaqSW0RM8LHhQ
6DqS0hdW5TUaQBw+jSztOd9C4INBdN+jzcKGYEho42kLVACL5HZpIQ15TjQIXhTCzLG3rdd8cIrH
hQIDAQABo0IwQDAdBgNVHQ4EFgQU++8Nhp6w492pufEhF38+/PB3KxowDgYDVR0PAQH/BAQDAgEG
MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAFn/8oz1h31xPaOfG1vR2vjTnGs2
vZupYeveFix0PZ7mddrXuqe8QhfnPZHr5X3dPpzxz5KsbEjMwiI/aTvFthUvozXGaCocV685743Q
NcMYDHsAVhzNixl03r4PEuDQqqE/AjSxcM6dGNYIAwlG7mDgfrbESQRRfXBgvKqy/3lyeqYdPV8q
+Mri/Tm3R7nrft8EI6/6nAYH6ftjk4BAtcZsCjEozgyfz7MjNYBBjWzEN3uBL4ChQEKF6dk4jeih
U80Bv2noWgbyRQuQ+q7hv53yrlc8pa6yVvSLZUDp/TGBLPQ5Cdjua6e0ph0VpZj3AYHYhX3zUVxx
iN66zB+Afko=
-----END CERTIFICATE-----

emSign ECC Root CA - G3
=======================
-----BEGIN CERTIFICATE-----
MIICTjCCAdOgAwIBAgIKPPYHqWhwDtqLhDAKBggqhkjOPQQDAzBrMQswCQYDVQQGEwJJTjETMBEG
A1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRlZDEg
MB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0gRzMwHhcNMTgwMjE4MTgzMDAwWhcNNDMwMjE4
MTgzMDAwWjBrMQswCQYDVQQGEwJJTjETMBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11
ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRlZDEgMB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0g
RzMwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQjpQy4LRL1KPOxst3iAhKAnjlfSU2fySU0WXTsuwYc
58Byr+iuL+FBVIcUqEqy6HyC5ltqtdyzdc6LBtCGI79G1Y4PPwT01xySfvalY8L1X44uT6EYGQIr
MgqCZH0Wk9GjQjBAMB0GA1UdDgQWBBR8XQKEE9TMipuBzhccLikenEhjQjAOBgNVHQ8BAf8EBAMC
AQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNpADBmAjEAvvNhzwIQHWSVB7gYboiFBS+D
CBeQyh+KTOgNG3qxrdWBCUfvO6wIBHxcmbHtRwfSAjEAnbpV/KlK6O3t5nYBQnvI+GDZjVGLVTv7
jHvrZQnD+JbNR6iC8hZVdyR+EhCVBCyj
-----END CERTIFICATE-----

emSign Root CA - C1
===================
-----BEGIN CERTIFICATE-----
MIIDczCCAlugAwIBAgILAK7PALrEzzL4Q7IwDQYJKoZIhvcNAQELBQAwVjELMAkGA1UEBhMCVVMx
EzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMRwwGgYDVQQDExNlbVNp
Z24gUm9vdCBDQSAtIEMxMB4XDTE4MDIxODE4MzAwMFoXDTQzMDIxODE4MzAwMFowVjELMAkGA1UE
BhMCVVMxEzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMRwwGgYDVQQD
ExNlbVNpZ24gUm9vdCBDQSAtIEMxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz+up
ufGZBczYKCFK83M0UYRWEPWgTywS4/oTmifQz/l5GnRfHXk5/Fv4cI7gklL35CX5VIPZHdPIWoU/
Xse2B+4+wM6ar6xWQio5JXDWv7V7Nq2s9nPczdcdioOl+yuQFTdrHCZH3DspVpNqs8FqOp099cGX
OFgFixwR4+S0uF2FHYP+eF8LRWgYSKVGczQ7/g/IdrvHGPMF0Ybzhe3nudkyrVWIzqa2kbBPrH4V
I5b2P/AgNBbeCsbEBEV5f6f9vtKppa+cxSMq9zwhbL2vj07FOrLzNBL834AaSaTUqZX3noleooms
lMuoaJuvimUnzYnu3Yy1aylwQ6BpC+S5DwIDAQABo0IwQDAdBgNVHQ4EFgQU/qHgcB4qAzlSWkK+
XJGFehiqTbUwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQAD
ggEBAMJKVvoVIXsoounlHfv4LcQ5lkFMOycsxGwYFYDGrK9HWS8mC+M2sO87/kOXSTKZEhVb3xEp
/6tT+LvBeA+snFOvV71ojD1pM/CjoCNjO2RnIkSt1XHLVip4kqNPEjE2NuLe/gDEo2APJ62gsIq1
NnpSob0n9CAnYuhNlCQT5AoE6TyrLshDCUrGYQTlSTR+08TI9Q/Aqum6VF7zYytPT1DU/rl7mYw9
wC68AivTxEDkigcxHpvOJpkT+xHqmiIMERnHXhuBUDDIlhJu58tBf5E7oke3VIAb3ADMmpDqw8NQ
BmIMMMAVSKeoWXzhriKi4gp6D/piq1JM4fHfyr6DDUI=
-----END CERTIFICATE-----

emSign ECC Root CA - C3
=======================
-----BEGIN CERTIFICATE-----
MIICKzCCAbGgAwIBAgIKe3G2gla4EnycqDAKBggqhkjOPQQDAzBaMQswCQYDVQQGEwJVUzETMBEG
A1UECxMKZW1TaWduIFBLSTEUMBIGA1UEChMLZU11ZGhyYSBJbmMxIDAeBgNVBAMTF2VtU2lnbiBF
Q0MgUm9vdCBDQSAtIEMzMB4XDTE4MDIxODE4MzAwMFoXDTQzMDIxODE4MzAwMFowWjELMAkGA1UE
BhMCVVMxEzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMSAwHgYDVQQD
ExdlbVNpZ24gRUNDIFJvb3QgQ0EgLSBDMzB2MBAGByqGSM49AgEGBSuBBAAiA2IABP2lYa57JhAd
6bciMK4G9IGzsUJxlTm801Ljr6/58pc1kjZGDoeVjbk5Wum739D+yAdBPLtVb4OjavtisIGJAnB9
SMVK4+kiVCJNk7tCDK93nCOmfddhEc5lx/h//vXyqaNCMEAwHQYDVR0OBBYEFPtaSNCAIEDyqOkA
B2kZd6fmw/TPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MAoGCCqGSM49BAMDA2gA
MGUCMQC02C8Cif22TGK6Q04ThHK1rt0c3ta13FaPWEBaLd4gTCKDypOofu4SQMfWh0/434UCMBwU
ZOR8loMRnLDRWmFLpg9J0wD8ofzkpf9/rdcw0Md3f76BB1UwUCAU9Vc4CqgxUQ==
-----END CERTIFICATE-----

Hongkong Post Root CA 3
=======================
-----BEGIN CERTIFICATE-----
MIIFzzCCA7egAwIBAgIUCBZfikyl7ADJk0DfxMauI7gcWqQwDQYJKoZIhvcNAQELBQAwbzELMAkG
A1UEBhMCSEsxEjAQBgNVBAgTCUhvbmcgS29uZzESMBAGA1UEBxMJSG9uZyBLb25nMRYwFAYDVQQK
Ew1Ib25na29uZyBQb3N0MSAwHgYDVQQDExdIb25na29uZyBQb3N0IFJvb3QgQ0EgMzAeFw0xNzA2
MDMwMjI5NDZaFw00MjA2MDMwMjI5NDZaMG8xCzAJBgNVBAYTAkhLMRIwEAYDVQQIEwlIb25nIEtv
bmcxEjAQBgNVBAcTCUhvbmcgS29uZzEWMBQGA1UEChMNSG9uZ2tvbmcgUG9zdDEgMB4GA1UEAxMX
SG9uZ2tvbmcgUG9zdCBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCz
iNfqzg8gTr7m1gNt7ln8wlffKWihgw4+aMdoWJwcYEuJQwy51BWy7sFOdem1p+/l6TWZ5Mwc50tf
jTMwIDNT2aa71T4Tjukfh0mtUC1Qyhi+AViiE3CWu4mIVoBc+L0sPOFMV4i707mV78vH9toxdCim
5lSJ9UExyuUmGs2C4HDaOym71QP1mbpV9WTRYA6ziUm4ii8F0oRFKHyPaFASePwLtVPLwpgchKOe
sL4jpNrcyCse2m5FHomY2vkALgbpDDtw1VAliJnLzXNg99X/NWfFobxeq81KuEXryGgeDQ0URhLj
0mRiikKYvLTGCAj4/ahMZJx2Ab0vqWwzD9g/KLg8aQFChn5pwckGyuV6RmXpwtZQQS4/t+TtbNe/
JgERohYpSms0BpDsE9K2+2p20jzt8NYt3eEV7KObLyzJPivkaTv/ciWxNoZbx39ri1UbSsUgYT2u
y1DhCDq+sI9jQVMwCFk8mB13umOResoQUGC/8Ne8lYePl8X+l2oBlKN8W4UdKjk60FSh0Tlxnf0h
+bV78OLgAo9uliQlLKAeLKjEiafv7ZkGL7YKTE/bosw3Gq9HhS2KX8Q0NEwA/RiTZxPRN+ZItIsG
xVd7GYYKecsAyVKvQv83j+GjHno9UKtjBucVtT+2RTeUN7F+8kjDf8V1/peNRY8apxpyKBpADwID
AQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAfBgNVHSMEGDAWgBQXnc0e
i9Y5K3DTXNSguB+wAPzFYTAdBgNVHQ4EFgQUF53NHovWOStw01zUoLgfsAD8xWEwDQYJKoZIhvcN
AQELBQADggIBAFbVe27mIgHSQpsY1Q7XZiNc4/6gx5LS6ZStS6LG7BJ8dNVI0lkUmcDrudHr9Egw
W62nV3OZqdPlt9EuWSRY3GguLmLYauRwCy0gUCCkMpXRAJi70/33MvJJrsZ64Ee+bs7Lo3I6LWld
y8joRTnU+kLBEUx3XZL7av9YROXrgZ6voJmtvqkBZss4HTzfQx/0TW60uhdG/H39h4F5ag0zD/ov
+BS5gLNdTaqX4fnkGMX41TiMJjz98iji7lpJiCzfeT2OnpA8vUFKOt1b9pq0zj8lMH8yfaIDlNDc
eqFS3m6TjRgm/VWsvY+b0s+v54Ysyx8Jb6NvqYTUc79NoXQbTiNg8swOqn+knEwlqLJmOzj/2ZQw
9nKEvmhVEA/GcywWaZMH/rFF7buiVWqw2rVKAiUnhde3t4ZEFolsgCs+l6mc1X5VTMbeRRAc6uk7
nwNT7u56AQIWeNTowr5GdogTPyK7SBIdUgC0An4hGh6cJfTzPV4e0hz5sy229zdcxsshTrD3mUcY
hcErulWuBurQB7Lcq9CClnXO0lD+mefPL5/ndtFhKvshuzHQqp9HpLIiyhY6UFfEW0NnxWViA0kB
60PZ2Pierc+xYw5F9KBaLJstxabArahH9CdMOA0uG0k7UvToiIMrVCjU8jVStDKDYmlkDJGcn5fq
dBb9HxEGmpv0
-----END CERTIFICATE-----

Entrust Root Certification Authority - G4
=========================================
-----BEGIN CERTIFICATE-----
MIIGSzCCBDOgAwIBAgIRANm1Q3+vqTkPAAAAAFVlrVgwDQYJKoZIhvcNAQELBQAwgb4xCzAJBgNV
BAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3Qu
bmV0L2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxNSBFbnRydXN0LCBJbmMuIC0gZm9yIGF1
dGhvcml6ZWQgdXNlIG9ubHkxMjAwBgNVBAMTKUVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1
dGhvcml0eSAtIEc0MB4XDTE1MDUyNzExMTExNloXDTM3MTIyNzExNDExNlowgb4xCzAJBgNVBAYT
AlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3QubmV0
L2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxNSBFbnRydXN0LCBJbmMuIC0gZm9yIGF1dGhv
cml6ZWQgdXNlIG9ubHkxMjAwBgNVBAMTKUVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhv
cml0eSAtIEc0MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAsewsQu7i0TD/pZJH4i3D
umSXbcr3DbVZwbPLqGgZ2K+EbTBwXX7zLtJTmeH+H17ZSK9dE43b/2MzTdMAArzE+NEGCJR5WIoV
3imz/f3ET+iq4qA7ec2/a0My3dl0ELn39GjUu9CH1apLiipvKgS1sqbHoHrmSKvS0VnM1n4j5pds
8ELl3FFLFUHtSUrJ3hCX1nbB76W1NhSXNdh4IjVS70O92yfbYVaCNNzLiGAMC1rlLAHGVK/XqsEQ
e9IFWrhAnoanw5CGAlZSCXqc0ieCU0plUmr1POeo8pyvi73TDtTUXm6Hnmo9RR3RXRv06QqsYJn7
ibT/mCzPfB3pAqoEmh643IhuJbNsZvc8kPNXwbMv9W3y+8qh+CmdRouzavbmZwe+LGcKKh9asj5X
xNMhIWNlUpEbsZmOeX7m640A2Vqq6nPopIICR5b+W45UYaPrL0swsIsjdXJ8ITzI9vF01Bx7owVV
7rtNOzK+mndmnqxpkCIHH2E6lr7lmk/MBTwoWdPBDFSoWWG9yHJM6Nyfh3+9nEg2XpWjDrk4JFX8
dWbrAuMINClKxuMrLzOg2qOGpRKX/YAr2hRC45K9PvJdXmd0LhyIRyk0X+IyqJwlN4y6mACXi0mW
Hv0liqzc2thddG5msP9E36EYxr5ILzeUePiVSj9/E15dWf10hkNjc0kCAwEAAaNCMEAwDwYDVR0T
AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJ84xFYjwznooHFs6FRM5Og6sb9n
MA0GCSqGSIb3DQEBCwUAA4ICAQAS5UKme4sPDORGpbZgQIeMJX6tuGguW8ZAdjwD+MlZ9POrYs4Q
jbRaZIxowLByQzTSGwv2LFPSypBLhmb8qoMi9IsabyZIrHZ3CL/FmFz0Jomee8O5ZDIBf9PD3Vht
7LGrhFV0d4QEJ1JrhkzO3bll/9bGXp+aEJlLdWr+aumXIOTkdnrG0CSqkM0gkLpHZPt/B7NTeLUK
YvJzQ85BK4FqLoUWlFPUa19yIqtRLULVAJyZv967lDtX/Zr1hstWO1uIAeV8KEsD+UmDfLJ/fOPt
jqF/YFOOVZ1QNBIPt5d7bIdKROf1beyAN/BYGW5KaHbwH5Lk6rWS02FREAutp9lfx1/cH6NcjKF+
m7ee01ZvZl4HliDtC3T7Zk6LERXpgUl+b7DUUH8i119lAg2m9IUe2K4GS0qn0jFmwvjO5QimpAKW
RGhXxNUzzxkvFMSUHHuk2fCfDrGA4tGeEWSpiBE6doLlYsKA2KSD7ZPvfC+QsDJMlhVoSFLUmQjA
JOgc47OlIQ6SwJAfzyBfyjs4x7dtOvPmRLgOMWuIjnDrnBdSqEGULoe256YSxXXfW8AKbnuk5F6G
+TaU33fD6Q3AOfF5u0aOq0NZJ7cguyPpVkAh7DE9ZapD8j3fcEThuk0mEDuYn/PIjhs4ViFqUZPT
kcpG2om3PVODLAgfi49T3f+sHw==
-----END CERTIFICATE-----

Microsoft ECC Root Certificate Authority 2017
=============================================
-----BEGIN CERTIFICATE-----
MIICWTCCAd+gAwIBAgIQZvI9r4fei7FK6gxXMQHC7DAKBggqhkjOPQQDAzBlMQswCQYDVQQGEwJV
UzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYwNAYDVQQDEy1NaWNyb3NvZnQgRUND
IFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcwHhcNMTkxMjE4MjMwNjQ1WhcNNDIwNzE4
MjMxNjA0WjBlMQswCQYDVQQGEwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYw
NAYDVQQDEy1NaWNyb3NvZnQgRUNDIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcwdjAQ
BgcqhkjOPQIBBgUrgQQAIgNiAATUvD0CQnVBEyPNgASGAlEvaqiBYgtlzPbKnR5vSmZRogPZnZH6
thaxjG7efM3beaYvzrvOcS/lpaso7GMEZpn4+vKTEAXhgShC48Zo9OYbhGBKia/teQ87zvH2RPUB
eMCjVDBSMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTIy5lycFIM
+Oa+sgRXKSrPQhDtNTAQBgkrBgEEAYI3FQEEAwIBADAKBggqhkjOPQQDAwNoADBlAjBY8k3qDPlf
Xu5gKcs68tvWMoQZP3zVL8KxzJOuULsJMsbG7X7JNpQS5GiFBqIb0C8CMQCZ6Ra0DvpWSNSkMBaR
eNtUjGUBiudQZsIxtzm6uBoiB078a1QWIP8rtedMDE2mT3M=
-----END CERTIFICATE-----

Microsoft RSA Root Certificate Authority 2017
=============================================
-----BEGIN CERTIFICATE-----
MIIFqDCCA5CgAwIBAgIQHtOXCV/YtLNHcB6qvn9FszANBgkqhkiG9w0BAQwFADBlMQswCQYDVQQG
EwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYwNAYDVQQDEy1NaWNyb3NvZnQg
UlNBIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcwHhcNMTkxMjE4MjI1MTIyWhcNNDIw
NzE4MjMwMDIzWjBlMQswCQYDVQQGEwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9u
MTYwNAYDVQQDEy1NaWNyb3NvZnQgUlNBIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcw
ggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKW76UM4wplZEWCpW9R2LBifOZNt9GkMml
7Xhqb0eRaPgnZ1AzHaGm++DlQ6OEAlcBXZxIQIJTELy/xztokLaCLeX0ZdDMbRnMlfl7rEqUrQ7e
S0MdhweSE5CAg2Q1OQT85elss7YfUJQ4ZVBcF0a5toW1HLUX6NZFndiyJrDKxHBKrmCk3bPZ7Pw7
1VdyvD/IybLeS2v4I2wDwAW9lcfNcztmgGTjGqwu+UcF8ga2m3P1eDNbx6H7JyqhtJqRjJHTOoI+
dkC0zVJhUXAoP8XFWvLJjEm7FFtNyP9nTUwSlq31/niol4fX/V4ggNyhSyL71Imtus5Hl0dVe49F
yGcohJUcaDDv70ngNXtk55iwlNpNhTs+VcQor1fznhPbRiefHqJeRIOkpcrVE7NLP8TjwuaGYaRS
MLl6IE9vDzhTyzMMEyuP1pq9KsgtsRx9S1HKR9FIJ3Jdh+vVReZIZZ2vUpC6W6IYZVcSn2i51BVr
lMRpIpj0M+Dt+VGOQVDJNE92kKz8OMHY4Xu54+OU4UZpyw4KUGsTuqwPN1q3ErWQgR5WrlcihtnJ
0tHXUeOrO8ZV/R4O03QK0dqq6mm4lyiPSMQH+FJDOvTKVTUssKZqwJz58oHhEmrARdlns87/I6KJ
ClTUFLkqqNfs+avNJVgyeY+QW5g5xAgGwax/Dj0ApQIDAQABo1QwUjAOBgNVHQ8BAf8EBAMCAYYw
DwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUCctZf4aycI8awznjwNnpv7tNsiMwEAYJKwYBBAGC
NxUBBAMCAQAwDQYJKoZIhvcNAQEMBQADggIBAKyvPl3CEZaJjqPnktaXFbgToqZCLgLNFgVZJ8og
6Lq46BrsTaiXVq5lQ7GPAJtSzVXNUzltYkyLDVt8LkS/gxCP81OCgMNPOsduET/m4xaRhPtthH80
dK2Jp86519efhGSSvpWhrQlTM93uCupKUY5vVau6tZRGrox/2KJQJWVggEbbMwSubLWYdFQl3JPk
+ONVFT24bcMKpBLBaYVu32TxU5nhSnUgnZUP5NbcA/FZGOhHibJXWpS2qdgXKxdJ5XbLwVaZOjex
/2kskZGT4d9Mozd2TaGf+G0eHdP67Pv0RR0Tbc/3WeUiJ3IrhvNXuzDtJE3cfVa7o7P4NHmJweDy
AmH3pvwPuxwXC65B2Xy9J6P9LjrRk5Sxcx0ki69bIImtt2dmefU6xqaWM/5TkshGsRGRxpl/j8nW
ZjEgQRCHLQzWwa80mMpkg/sTV9HB8Dx6jKXB/ZUhoHHBk2dxEuqPiAppGWSZI1b7rCoucL5mxAyE
7+WL85MB+GqQk2dLsmijtWKP6T+MejteD+eMuMZ87zf9dOLITzNy4ZQ5bb0Sr74MTnB8G2+NszKT
c0QWbej09+CVgI+WXTik9KveCjCHk9hNAHFiRSdLOkKEW39lt2c0Ui2cFmuqqNh7o0JMcccMyj6D
5KbvtwEwXlGjefVwaaZBRA+GsCyRxj3qrg+E
-----END CERTIFICATE-----

e-Szigno Root CA 2017
=====================
-----BEGIN CERTIFICATE-----
MIICQDCCAeWgAwIBAgIMAVRI7yH9l1kN9QQKMAoGCCqGSM49BAMCMHExCzAJBgNVBAYTAkhVMREw
DwYDVQQHDAhCdWRhcGVzdDEWMBQGA1UECgwNTWljcm9zZWMgTHRkLjEXMBUGA1UEYQwOVkFUSFUt
MjM1ODQ0OTcxHjAcBgNVBAMMFWUtU3ppZ25vIFJvb3QgQ0EgMjAxNzAeFw0xNzA4MjIxMjA3MDZa
Fw00MjA4MjIxMjA3MDZaMHExCzAJBgNVBAYTAkhVMREwDwYDVQQHDAhCdWRhcGVzdDEWMBQGA1UE
CgwNTWljcm9zZWMgTHRkLjEXMBUGA1UEYQwOVkFUSFUtMjM1ODQ0OTcxHjAcBgNVBAMMFWUtU3pp
Z25vIFJvb3QgQ0EgMjAxNzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJbcPYrYsHtvxie+RJCx
s1YVe45DJH0ahFnuY2iyxl6H0BVIHqiQrb1TotreOpCmYF9oMrWGQd+HWyx7xf58etqjYzBhMA8G
A1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBSHERUI0arBeAyxr87GyZDv
vzAEwDAfBgNVHSMEGDAWgBSHERUI0arBeAyxr87GyZDvvzAEwDAKBggqhkjOPQQDAgNJADBGAiEA
tVfd14pVCzbhhkT61NlojbjcI4qKDdQvfepz7L9NbKgCIQDLpbQS+ue16M9+k/zzNY9vTlp8tLxO
svxyqltZ+efcMQ==
-----END CERTIFICATE-----

certSIGN Root CA G2
===================
-----BEGIN CERTIFICATE-----
MIIFRzCCAy+gAwIBAgIJEQA0tk7GNi02MA0GCSqGSIb3DQEBCwUAMEExCzAJBgNVBAYTAlJPMRQw
EgYDVQQKEwtDRVJUU0lHTiBTQTEcMBoGA1UECxMTY2VydFNJR04gUk9PVCBDQSBHMjAeFw0xNzAy
MDYwOTI3MzVaFw00MjAyMDYwOTI3MzVaMEExCzAJBgNVBAYTAlJPMRQwEgYDVQQKEwtDRVJUU0lH
TiBTQTEcMBoGA1UECxMTY2VydFNJR04gUk9PVCBDQSBHMjCCAiIwDQYJKoZIhvcNAQEBBQADggIP
ADCCAgoCggIBAMDFdRmRfUR0dIf+DjuW3NgBFszuY5HnC2/OOwppGnzC46+CjobXXo9X69MhWf05
N0IwvlDqtg+piNguLWkh59E3GE59kdUWX2tbAMI5Qw02hVK5U2UPHULlj88F0+7cDBrZuIt4Imfk
abBoxTzkbFpG583H+u/E7Eu9aqSs/cwoUe+StCmrqzWaTOTECMYmzPhpn+Sc8CnTXPnGFiWeI8Mg
wT0PPzhAsP6CRDiqWhqKa2NYOLQV07YRaXseVO6MGiKscpc/I1mbySKEwQdPzH/iV8oScLumZfNp
dWO9lfsbl83kqK/20U6o2YpxJM02PbyWxPFsqa7lzw1uKA2wDrXKUXt4FMMgL3/7FFXhEZn91Qqh
ngLjYl/rNUssuHLoPj1PrCy7Lobio3aP5ZMqz6WryFyNSwb/EkaseMsUBzXgqd+L6a8VTxaJW732
jcZZroiFDsGJ6x9nxUWO/203Nit4ZoORUSs9/1F3dmKh7Gc+PoGD4FapUB8fepmrY7+EF3fxDTvf
95xhszWYijqy7DwaNz9+j5LP2RIUZNoQAhVB/0/E6xyjyfqZ90bp4RjZsbgyLcsUDFDYg2WD7rlc
z8sFWkz6GZdr1l0T08JcVLwyc6B49fFtHsufpaafItzRUZ6CeWRgKRM+o/1Pcmqr4tTluCRVLERL
iohEnMqE0yo7AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1Ud
DgQWBBSCIS1mxteg4BXrzkwJd8RgnlRuAzANBgkqhkiG9w0BAQsFAAOCAgEAYN4auOfyYILVAzOB
ywaK8SJJ6ejqkX/GM15oGQOGO0MBzwdw5AgeZYWR5hEit/UCI46uuR59H35s5r0l1ZUa8gWmr4UC
b6741jH/JclKyMeKqdmfS0mbEVeZkkMR3rYzpMzXjWR91M08KCy0mpbqTfXERMQlqiCA2ClV9+BB
/AYm/7k29UMUA2Z44RGx2iBfRgB4ACGlHgAoYXhvqAEBj500mv/0OJD7uNGzcgbJceaBxXntC6Z5
8hMLnPddDnskk7RI24Zf3lCGeOdA5jGokHZwYa+cNywRtYK3qq4kNFtyDGkNzVmf9nGvnAvRCjj5
BiKDUyUM/FHE5r7iOZULJK2v0ZXkltd0ZGtxTgI8qoXzIKNDOXZbbFD+mpwUHmUUihW9o4JFWklW
atKcsWMy5WHgUyIOpwpJ6st+H6jiYoD2EEVSmAYY3qXNL3+q1Ok+CHLsIwMCPKaq2LxndD0UF/tU
Sxfj03k9bWtJySgOLnRQvwzZRjoQhsmnP+mg7H/rpXdYaXHmgwo38oZJar55CJD2AhZkPuXaTH4M
NMn5X7azKFGnpyuqSfqNZSlO42sTp5SjLVFteAxEy9/eCG/Oo2Sr05WE1LlSVHJ7liXMvGnjSG4N
0MedJ5qq+BOS3R7fY581qRY27Iy4g/Q9iY/NtBde17MXQRBdJ3NghVdJIgc=
-----END CERTIFICATE-----

Trustwave Global Certification Authority
========================================
-----BEGIN CERTIFICATE-----
MIIF2jCCA8KgAwIBAgIMBfcOhtpJ80Y1LrqyMA0GCSqGSIb3DQEBCwUAMIGIMQswCQYDVQQGEwJV
UzERMA8GA1UECAwISWxsaW5vaXMxEDAOBgNVBAcMB0NoaWNhZ28xITAfBgNVBAoMGFRydXN0d2F2
ZSBIb2xkaW5ncywgSW5jLjExMC8GA1UEAwwoVHJ1c3R3YXZlIEdsb2JhbCBDZXJ0aWZpY2F0aW9u
IEF1dGhvcml0eTAeFw0xNzA4MjMxOTM0MTJaFw00MjA4MjMxOTM0MTJaMIGIMQswCQYDVQQGEwJV
UzERMA8GA1UECAwISWxsaW5vaXMxEDAOBgNVBAcMB0NoaWNhZ28xITAfBgNVBAoMGFRydXN0d2F2
ZSBIb2xkaW5ncywgSW5jLjExMC8GA1UEAwwoVHJ1c3R3YXZlIEdsb2JhbCBDZXJ0aWZpY2F0aW9u
IEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBALldUShLPDeS0YLOvR29
zd24q88KPuFd5dyqCblXAj7mY2Hf8g+CY66j96xz0XznswuvCAAJWX/NKSqIk4cXGIDtiLK0thAf
LdZfVaITXdHG6wZWiYj+rDKd/VzDBcdu7oaJuogDnXIhhpCujwOl3J+IKMujkkkP7NAP4m1ET4Bq
stTnoApTAbqOl5F2brz81Ws25kCI1nsvXwXoLG0R8+eyvpJETNKXpP7ScoFDB5zpET71ixpZfR9o
WN0EACyW80OzfpgZdNmcc9kYvkHHNHnZ9GLCQ7mzJ7Aiy/k9UscwR7PJPrhq4ufogXBeQotPJqX+
OsIgbrv4Fo7NDKm0G2x2EOFYeUY+VM6AqFcJNykbmROPDMjWLBz7BegIlT1lRtzuzWniTY+HKE40
Cz7PFNm73bZQmq131BnW2hqIyE4bJ3XYsgjxroMwuREOzYfwhI0Vcnyh78zyiGG69Gm7DIwLdVcE
uE4qFC49DxweMqZiNu5m4iK4BUBjECLzMx10coos9TkpoNPnG4CELcU9402x/RpvumUHO1jsQkUm
+9jaJXLE9gCxInm943xZYkqcBW89zubWR2OZxiRvchLIrH+QtAuRcOi35hYQcRfO3gZPSEF9NUqj
ifLJS3tBEW1ntwiYTOURGa5CgNz7kAXU+FDKvuStx8KU1xad5hePrzb7AgMBAAGjQjBAMA8GA1Ud
EwEB/wQFMAMBAf8wHQYDVR0OBBYEFJngGWcNYtt2s9o9uFvo/ULSMQ6HMA4GA1UdDwEB/wQEAwIB
BjANBgkqhkiG9w0BAQsFAAOCAgEAmHNw4rDT7TnsTGDZqRKGFx6W0OhUKDtkLSGm+J1WE2pIPU/H
PinbbViDVD2HfSMF1OQc3Og4ZYbFdada2zUFvXfeuyk3QAUHw5RSn8pk3fEbK9xGChACMf1KaA0H
ZJDmHvUqoai7PF35owgLEQzxPy0QlG/+4jSHg9bP5Rs1bdID4bANqKCqRieCNqcVtgimQlRXtpla
4gt5kNdXElE1GYhBaCXUNxeEFfsBctyV3lImIJgm4nb1J2/6ADtKYdkNy1GTKv0WBpanI5ojSP5R
vbbEsLFUzt5sQa0WZ37b/TjNuThOssFgy50X31ieemKyJo90lZvkWx3SD92YHJtZuSPTMaCm/zjd
zyBP6VhWOmfD0faZmZ26NraAL4hHT4a/RDqA5Dccprrql5gR0IRiR2Qequ5AvzSxnI9O4fKSTx+O
856X3vOmeWqJcU9LJxdI/uz0UA9PSX3MReO9ekDFQdxhVicGaeVyQYHTtgGJoC86cnn+OjC/QezH
Yj6RS8fZMXZC+fc8Y+wmjHMMfRod6qh8h6jCJ3zhM0EPz8/8AKAigJ5Kp28AsEFFtyLKaEjFQqKu
3R3y4G5OBVixwJAWKqQ9EEC+j2Jjg6mcgn0tAumDMHzLJ8n9HmYAsC7TIS+OMxZsmO0QqAfWzJPP
29FpHOTKyeC2nOnOcXHebD8WpHk=
-----END CERTIFICATE-----

Trustwave Global ECC P256 Certification Authority
=================================================
-----BEGIN CERTIFICATE-----
MIICYDCCAgegAwIBAgIMDWpfCD8oXD5Rld9dMAoGCCqGSM49BAMCMIGRMQswCQYDVQQGEwJVUzER
MA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRydXN0d2F2ZSBI
b2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDI1NiBDZXJ0aWZp
Y2F0aW9uIEF1dGhvcml0eTAeFw0xNzA4MjMxOTM1MTBaFw00MjA4MjMxOTM1MTBaMIGRMQswCQYD
VQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRy
dXN0d2F2ZSBIb2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDI1
NiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABH77bOYj
43MyCMpg5lOcunSNGLB4kFKA3TjASh3RqMyTpJcGOMoNFWLGjgEqZZ2q3zSRLoHB5DOSMcT9CTqm
P62jQzBBMA8GA1UdEwEB/wQFMAMBAf8wDwYDVR0PAQH/BAUDAwcGADAdBgNVHQ4EFgQUo0EGrJBt
0UrrdaVKEJmzsaGLSvcwCgYIKoZIzj0EAwIDRwAwRAIgB+ZU2g6gWrKuEZ+Hxbb/ad4lvvigtwjz
RM4q3wghDDcCIC0mA6AFvWvR9lz4ZcyGbbOcNEhjhAnFjXca4syc4XR7
-----END CERTIFICATE-----

Trustwave Global ECC P384 Certification Authority
=================================================
-----BEGIN CERTIFICATE-----
MIICnTCCAiSgAwIBAgIMCL2Fl2yZJ6SAaEc7MAoGCCqGSM49BAMDMIGRMQswCQYDVQQGEwJVUzER
MA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRydXN0d2F2ZSBI
b2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDM4NCBDZXJ0aWZp
Y2F0aW9uIEF1dGhvcml0eTAeFw0xNzA4MjMxOTM2NDNaFw00MjA4MjMxOTM2NDNaMIGRMQswCQYD
VQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRy
dXN0d2F2ZSBIb2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDM4
NCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTB2MBAGByqGSM49AgEGBSuBBAAiA2IABGvaDXU1CDFH
Ba5FmVXxERMuSvgQMSOjfoPTfygIOiYaOs+Xgh+AtycJj9GOMMQKmw6sWASr9zZ9lCOkmwqKi6vr
/TklZvFe/oyujUF5nQlgziip04pt89ZF1PKYhDhloKNDMEEwDwYDVR0TAQH/BAUwAwEB/zAPBgNV
HQ8BAf8EBQMDBwYAMB0GA1UdDgQWBBRVqYSJ0sEyvRjLbKYHTsjnnb6CkDAKBggqhkjOPQQDAwNn
ADBkAjA3AZKXRRJ+oPM+rRk6ct30UJMDEr5E0k9BpIycnR+j9sKS50gU/k6bpZFXrsY3crsCMGcl
CrEMXu6pY5Jv5ZAL/mYiykf9ijH3g/56vxC+GCsej/YpHpRZ744hN8tRmKVuSw==
-----END CERTIFICATE-----

NAVER Global Root Certification Authority
=========================================
-----BEGIN CERTIFICATE-----
MIIFojCCA4qgAwIBAgIUAZQwHqIL3fXFMyqxQ0Rx+NZQTQ0wDQYJKoZIhvcNAQEMBQAwaTELMAkG
A1UEBhMCS1IxJjAkBgNVBAoMHU5BVkVSIEJVU0lORVNTIFBMQVRGT1JNIENvcnAuMTIwMAYDVQQD
DClOQVZFUiBHbG9iYWwgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0xNzA4MTgwODU4
NDJaFw0zNzA4MTgyMzU5NTlaMGkxCzAJBgNVBAYTAktSMSYwJAYDVQQKDB1OQVZFUiBCVVNJTkVT
UyBQTEFURk9STSBDb3JwLjEyMDAGA1UEAwwpTkFWRVIgR2xvYmFsIFJvb3QgQ2VydGlmaWNhdGlv
biBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC21PGTXLVAiQqrDZBb
UGOukJR0F0Vy1ntlWilLp1agS7gvQnXp2XskWjFlqxcX0TM62RHcQDaH38dq6SZeWYp34+hInDEW
+j6RscrJo+KfziFTowI2MMtSAuXaMl3Dxeb57hHHi8lEHoSTGEq0n+USZGnQJoViAbbJAh2+g1G7
XNr4rRVqmfeSVPc0W+m/6imBEtRTkZazkVrd/pBzKPswRrXKCAfHcXLJZtM0l/aM9BhK4dA9WkW2
aacp+yPOiNgSnABIqKYPszuSjXEOdMWLyEz59JuOuDxp7W87UC9Y7cSw0BwbagzivESq2M0UXZR4
Yb8ObtoqvC8MC3GmsxY/nOb5zJ9TNeIDoKAYv7vxvvTWjIcNQvcGufFt7QSUqP620wbGQGHfnZ3z
VHbOUzoBppJB7ASjjw2i1QnK1sua8e9DXcCrpUHPXFNwcMmIpi3Ua2FzUCaGYQ5fG8Ir4ozVu53B
A0K6lNpfqbDKzE0K70dpAy8i+/Eozr9dUGWokG2zdLAIx6yo0es+nPxdGoMuK8u180SdOqcXYZai
cdNwlhVNt0xz7hlcxVs+Qf6sdWA7G2POAN3aCJBitOUt7kinaxeZVL6HSuOpXgRM6xBtVNbv8ejy
YhbLgGvtPe31HzClrkvJE+2KAQHJuFFYwGY6sWZLxNUxAmLpdIQM201GLQIDAQABo0IwQDAdBgNV
HQ4EFgQU0p+I36HNLL3s9TsBAZMzJ7LrYEswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMB
Af8wDQYJKoZIhvcNAQEMBQADggIBADLKgLOdPVQG3dLSLvCkASELZ0jKbY7gyKoNqo0hV4/GPnrK
21HUUrPUloSlWGB/5QuOH/XcChWB5Tu2tyIvCZwTFrFsDDUIbatjcu3cvuzHV+YwIHHW1xDBE1UB
jCpD5EHxzzp6U5LOogMFDTjfArsQLtk70pt6wKGm+LUx5vR1yblTmXVHIloUFcd4G7ad6Qz4G3bx
hYTeodoS76TiEJd6eN4MUZeoIUCLhr0N8F5OSza7OyAfikJW4Qsav3vQIkMsRIz75Sq0bBwcupTg
E34h5prCy8VCZLQelHsIJchxzIdFV4XTnyliIoNRlwAYl3dqmJLJfGBs32x9SuRwTMKeuB330DTH
D8z7p/8Dvq1wkNoL3chtl1+afwkyQf3NosxabUzyqkn+Zvjp2DXrDige7kgvOtB5CTh8piKCk5XQ
A76+AqAF3SAi428diDRgxuYKuQl1C/AH6GmWNcf7I4GOODm4RStDeKLRLBT/DShycpWbXgnbiUSY
qqFJu3FS8r/2/yehNq+4tneI3TqkbZs0kNwUXTC/t+sX5Ie3cdCh13cV1ELX8vMxmV2b3RZtP+oG
I/hGoiLtk/bdmuYqh7GYVPEi92tF4+KOdh2ajcQGjTa3FPOdVGm3jjzVpG2Tgbet9r1ke8LJaDmg
kpzNNIaRkPpkUZ3+/uul9XXeifdy
-----END CERTIFICATE-----

AC RAIZ FNMT-RCM SERVIDORES SEGUROS
===================================
-----BEGIN CERTIFICATE-----
MIICbjCCAfOgAwIBAgIQYvYybOXE42hcG2LdnC6dlTAKBggqhkjOPQQDAzB4MQswCQYDVQQGEwJF
UzERMA8GA1UECgwIRk5NVC1SQ00xDjAMBgNVBAsMBUNlcmVzMRgwFgYDVQRhDA9WQVRFUy1RMjgy
NjAwNEoxLDAqBgNVBAMMI0FDIFJBSVogRk5NVC1SQ00gU0VSVklET1JFUyBTRUdVUk9TMB4XDTE4
MTIyMDA5MzczM1oXDTQzMTIyMDA5MzczM1oweDELMAkGA1UEBhMCRVMxETAPBgNVBAoMCEZOTVQt
UkNNMQ4wDAYDVQQLDAVDZXJlczEYMBYGA1UEYQwPVkFURVMtUTI4MjYwMDRKMSwwKgYDVQQDDCNB
QyBSQUlaIEZOTVQtUkNNIFNFUlZJRE9SRVMgU0VHVVJPUzB2MBAGByqGSM49AgEGBSuBBAAiA2IA
BPa6V1PIyqvfNkpSIeSX0oNnnvBlUdBeh8dHsVnyV0ebAAKTRBdp20LHsbI6GA60XYyzZl2hNPk2
LEnb80b8s0RpRBNm/dfF/a82Tc4DTQdxz69qBdKiQ1oKUm8BA06Oi6NCMEAwDwYDVR0TAQH/BAUw
AwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFAG5L++/EYZg8k/QQW6rcx/n0m5JMAoGCCqG
SM49BAMDA2kAMGYCMQCuSuMrQMN0EfKVrRYj3k4MGuZdpSRea0R7/DjiT8ucRRcRTBQnJlU5dUoD
zBOQn5ICMQD6SmxgiHPz7riYYqnOK8LZiqZwMR2vsJRM60/G49HzYqc8/5MuB1xJAWdpEgJyv+c=
-----END CERTIFICATE-----

GlobalSign Root R46
===================
-----BEGIN CERTIFICATE-----
MIIFWjCCA0KgAwIBAgISEdK7udcjGJ5AXwqdLdDfJWfRMA0GCSqGSIb3DQEBDAUAMEYxCzAJBgNV
BAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRwwGgYDVQQDExNHbG9iYWxTaWduIFJv
b3QgUjQ2MB4XDTE5MDMyMDAwMDAwMFoXDTQ2MDMyMDAwMDAwMFowRjELMAkGA1UEBhMCQkUxGTAX
BgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExHDAaBgNVBAMTE0dsb2JhbFNpZ24gUm9vdCBSNDYwggIi
MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCsrHQy6LNl5brtQyYdpokNRbopiLKkHWPd08Es
CVeJOaFV6Wc0dwxu5FUdUiXSE2te4R2pt32JMl8Nnp8semNgQB+msLZ4j5lUlghYruQGvGIFAha/
r6gjA7aUD7xubMLL1aa7DOn2wQL7Id5m3RerdELv8HQvJfTqa1VbkNud316HCkD7rRlr+/fKYIje
2sGP1q7Vf9Q8g+7XFkyDRTNrJ9CG0Bwta/OrffGFqfUo0q3v84RLHIf8E6M6cqJaESvWJ3En7YEt
bWaBkoe0G1h6zD8K+kZPTXhc+CtI4wSEy132tGqzZfxCnlEmIyDLPRT5ge1lFgBPGmSXZgjPjHvj
K8Cd+RTyG/FWaha/LIWFzXg4mutCagI0GIMXTpRW+LaCtfOW3T3zvn8gdz57GSNrLNRyc0NXfeD4
12lPFzYE+cCQYDdF3uYM2HSNrpyibXRdQr4G9dlkbgIQrImwTDsHTUB+JMWKmIJ5jqSngiCNI/on
ccnfxkF0oE32kRbcRoxfKWMxWXEM2G/CtjJ9++ZdU6Z+Ffy7dXxd7Pj2Fxzsx2sZy/N78CsHpdls
eVR2bJ0cpm4O6XkMqCNqo98bMDGfsVR7/mrLZqrcZdCinkqaByFrgY/bxFn63iLABJzjqls2k+g9
vXqhnQt2sQvHnf3PmKgGwvgqo6GDoLclcqUC4wIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAYYwDwYD
VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA1yrc4GHqMywptWU4jaWSf8FmSwwDQYJKoZIhvcNAQEM
BQADggIBAHx47PYCLLtbfpIrXTncvtgdokIzTfnvpCo7RGkerNlFo048p9gkUbJUHJNOxO97k4Vg
JuoJSOD1u8fpaNK7ajFxzHmuEajwmf3lH7wvqMxX63bEIaZHU1VNaL8FpO7XJqti2kM3S+LGteWy
gxk6x9PbTZ4IevPuzz5i+6zoYMzRx6Fcg0XERczzF2sUyQQCPtIkpnnpHs6i58FZFZ8d4kuaPp92
CC1r2LpXFNqD6v6MVenQTqnMdzGxRBF6XLE+0xRFFRhiJBPSy03OXIPBNvIQtQ6IbbjhVp+J3pZm
OUdkLG5NrmJ7v2B0GbhWrJKsFjLtrWhV/pi60zTe9Mlhww6G9kuEYO4Ne7UyWHmRVSyBQ7N0H3qq
JZ4d16GLuc1CLgSkZoNNiTW2bKg2SnkheCLQQrzRQDGQob4Ez8pn7fXwgNNgyYMqIgXQBztSvwye
qiv5u+YfjyW6hY0XHgL+XVAEV8/+LbzvXMAaq7afJMbfc2hIkCwU9D9SGuTSyxTDYWnP4vkYxboz
nxSjBF25cfe1lNj2M8FawTSLfJvdkzrnE6JwYZ+vj+vYxXX4M2bUdGc6N3ec592kD3ZDZopD8p/7
DEJ4Y9HiD2971KE9dJeFt0g5QdYg/NA6s/rob8SKunE3vouXsXgxT7PntgMTzlSdriVZzH81Xwj3
QEUxeCp6
-----END CERTIFICATE-----

GlobalSign Root E46
===================
-----BEGIN CERTIFICATE-----
MIICCzCCAZGgAwIBAgISEdK7ujNu1LzmJGjFDYQdmOhDMAoGCCqGSM49BAMDMEYxCzAJBgNVBAYT
AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRwwGgYDVQQDExNHbG9iYWxTaWduIFJvb3Qg
RTQ2MB4XDTE5MDMyMDAwMDAwMFoXDTQ2MDMyMDAwMDAwMFowRjELMAkGA1UEBhMCQkUxGTAXBgNV
BAoTEEdsb2JhbFNpZ24gbnYtc2ExHDAaBgNVBAMTE0dsb2JhbFNpZ24gUm9vdCBFNDYwdjAQBgcq
hkjOPQIBBgUrgQQAIgNiAAScDrHPt+ieUnd1NPqlRqetMhkytAepJ8qUuwzSChDH2omwlwxwEwkB
jtjqR+q+soArzfwoDdusvKSGN+1wCAB16pMLey5SnCNoIwZD7JIvU4Tb+0cUB+hflGddyXqBPCCj
QjBAMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBQxCpCPtsad0kRL
gLWi5h+xEk8blTAKBggqhkjOPQQDAwNoADBlAjEA31SQ7Zvvi5QCkxeCmb6zniz2C5GMn0oUsfZk
vLtoURMMA/cVi4RguYv/Uo7njLwcAjA8+RHUjE7AwWHCFUyqqx0LMV87HOIAl0Qx5v5zli/altP+
CAezNIm8BZ/3Hobui3A=
-----END CERTIFICATE-----

GLOBALTRUST 2020
================
-----BEGIN CERTIFICATE-----
MIIFgjCCA2qgAwIBAgILWku9WvtPilv6ZeUwDQYJKoZIhvcNAQELBQAwTTELMAkGA1UEBhMCQVQx
IzAhBgNVBAoTGmUtY29tbWVyY2UgbW9uaXRvcmluZyBHbWJIMRkwFwYDVQQDExBHTE9CQUxUUlVT
VCAyMDIwMB4XDTIwMDIxMDAwMDAwMFoXDTQwMDYxMDAwMDAwMFowTTELMAkGA1UEBhMCQVQxIzAh
BgNVBAoTGmUtY29tbWVyY2UgbW9uaXRvcmluZyBHbWJIMRkwFwYDVQQDExBHTE9CQUxUUlVTVCAy
MDIwMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAri5WrRsc7/aVj6B3GyvTY4+ETUWi
D59bRatZe1E0+eyLinjF3WuvvcTfk0Uev5E4C64OFudBc/jbu9G4UeDLgztzOG53ig9ZYybNpyrO
VPu44sB8R85gfD+yc/LAGbaKkoc1DZAoouQVBGM+uq/ufF7MpotQsjj3QWPKzv9pj2gOlTblzLmM
CcpL3TGQlsjMH/1WljTbjhzqLL6FLmPdqqmV0/0plRPwyJiT2S0WR5ARg6I6IqIoV6Lr/sCMKKCm
fecqQjuCgGOlYx8ZzHyyZqjC0203b+J+BlHZRYQfEs4kUmSFC0iAToexIiIwquuuvuAC4EDosEKA
A1GqtH6qRNdDYfOiaxaJSaSjpCuKAsR49GiKweR6NrFvG5Ybd0mN1MkGco/PU+PcF4UgStyYJ9OR
JitHHmkHr96i5OTUawuzXnzUJIBHKWk7buis/UDr2O1xcSvy6Fgd60GXIsUf1DnQJ4+H4xj04KlG
DfV0OoIu0G4skaMxXDtG6nsEEFZegB31pWXogvziB4xiRfUg3kZwhqG8k9MedKZssCz3AwyIDMvU
clOGvGBG85hqwvG/Q/lwIHfKN0F5VVJjjVsSn8VoxIidrPIwq7ejMZdnrY8XD2zHc+0klGvIg5rQ
mjdJBKuxFshsSUktq6HQjJLyQUp5ISXbY9e2nKd+Qmn7OmMCAwEAAaNjMGEwDwYDVR0TAQH/BAUw
AwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFNwuH9FhN3nkq9XVsxJxaD1qaJwiMB8GA1Ud
IwQYMBaAFNwuH9FhN3nkq9XVsxJxaD1qaJwiMA0GCSqGSIb3DQEBCwUAA4ICAQCR8EICaEDuw2jA
VC/f7GLDw56KoDEoqoOOpFaWEhCGVrqXctJUMHytGdUdaG/7FELYjQ7ztdGl4wJCXtzoRlgHNQIw
4Lx0SsFDKv/bGtCwr2zD/cuz9X9tAy5ZVp0tLTWMstZDFyySCstd6IwPS3BD0IL/qMy/pJTAvoe9
iuOTe8aPmxadJ2W8esVCgmxcB9CpwYhgROmYhRZf+I/KARDOJcP5YBugxZfD0yyIMaK9MOzQ0MAS
8cE54+X1+NZK3TTN+2/BT+MAi1bikvcoskJ3ciNnxz8RFbLEAwW+uxF7Cr+obuf/WEPPm2eggAe2
HcqtbepBEX4tdJP7wry+UUTF72glJ4DjyKDUEuzZpTcdN3y0kcra1LGWge9oXHYQSa9+pTeAsRxS
vTOBTI/53WXZFM2KJVj04sWDpQmQ1GwUY7VA3+vA/MRYfg0UFodUJ25W5HCEuGwyEn6CMUO+1918
oa2u1qsgEu8KwxCMSZY13At1XrFP1U80DhEgB3VDRemjEdqso5nCtnkn4rnvyOL2NSl6dPrFf4IF
YqYK6miyeUcGbvJXqBUzxvd4Sj1Ce2t+/vdG6tHrju+IaFvowdlxfv1k7/9nR4hYJS8+hge9+6jl
gqispdNpQ80xiEmEU5LAsTkbOYMBMMTyqfrQA71yN2BWHzZ8vTmR9W0Nv3vXkg==
-----END CERTIFICATE-----

ANF Secure Server Root CA
=========================
-----BEGIN CERTIFICATE-----
MIIF7zCCA9egAwIBAgIIDdPjvGz5a7EwDQYJKoZIhvcNAQELBQAwgYQxEjAQBgNVBAUTCUc2MzI4
NzUxMDELMAkGA1UEBhMCRVMxJzAlBgNVBAoTHkFORiBBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lv
bjEUMBIGA1UECxMLQU5GIENBIFJhaXoxIjAgBgNVBAMTGUFORiBTZWN1cmUgU2VydmVyIFJvb3Qg
Q0EwHhcNMTkwOTA0MTAwMDM4WhcNMzkwODMwMTAwMDM4WjCBhDESMBAGA1UEBRMJRzYzMjg3NTEw
MQswCQYDVQQGEwJFUzEnMCUGA1UEChMeQU5GIEF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uMRQw
EgYDVQQLEwtBTkYgQ0EgUmFpejEiMCAGA1UEAxMZQU5GIFNlY3VyZSBTZXJ2ZXIgUm9vdCBDQTCC
AiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANvrayvmZFSVgpCjcqQZAZ2cC4Ffc0m6p6zz
BE57lgvsEeBbphzOG9INgxwruJ4dfkUyYA8H6XdYfp9qyGFOtibBTI3/TO80sh9l2Ll49a2pcbnv
T1gdpd50IJeh7WhM3pIXS7yr/2WanvtH2Vdy8wmhrnZEE26cLUQ5vPnHO6RYPUG9tMJJo8gN0pcv
B2VSAKduyK9o7PQUlrZXH1bDOZ8rbeTzPvY1ZNoMHKGESy9LS+IsJJ1tk0DrtSOOMspvRdOoiXse
zx76W0OLzc2oD2rKDF65nkeP8Nm2CgtYZRczuSPkdxl9y0oukntPLxB3sY0vaJxizOBQ+OyRp1RM
VwnVdmPF6GUe7m1qzwmd+nxPrWAI/VaZDxUse6mAq4xhj0oHdkLePfTdsiQzW7i1o0TJrH93PB0j
7IKppuLIBkwC/qxcmZkLLxCKpvR/1Yd0DVlJRfbwcVw5Kda/SiOL9V8BY9KHcyi1Swr1+KuCLH5z
JTIdC2MKF4EA/7Z2Xue0sUDKIbvVgFHlSFJnLNJhiQcND85Cd8BEc5xEUKDbEAotlRyBr+Qc5RQe
8TZBAQIvfXOn3kLMTOmJDVb3n5HUA8ZsyY/b2BzgQJhdZpmYgG4t/wHFzstGH6wCxkPmrqKEPMVO
Hj1tyRRM4y5Bu8o5vzY8KhmqQYdOpc5LMnndkEl/AgMBAAGjYzBhMB8GA1UdIwQYMBaAFJxf0Gxj
o1+TypOYCK2Mh6UsXME3MB0GA1UdDgQWBBScX9BsY6Nfk8qTmAitjIelLFzBNzAOBgNVHQ8BAf8E
BAMCAYYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEATh65isagmD9uw2nAalxJ
UqzLK114OMHVVISfk/CHGT0sZonrDUL8zPB1hT+L9IBdeeUXZ701guLyPI59WzbLWoAAKfLOKyzx
j6ptBZNscsdW699QIyjlRRA96Gejrw5VD5AJYu9LWaL2U/HANeQvwSS9eS9OICI7/RogsKQOLHDt
dD+4E5UGUcjohybKpFtqFiGS3XNgnhAY3jyB6ugYw3yJ8otQPr0R4hUDqDZ9MwFsSBXXiJCZBMXM
5gf0vPSQ7RPi6ovDj6MzD8EpTBNO2hVWcXNyglD2mjN8orGoGjR0ZVzO0eurU+AagNjqOknkJjCb
5RyKqKkVMoaZkgoQI1YS4PbOTOK7vtuNknMBZi9iPrJyJ0U27U1W45eZ/zo1PqVUSlJZS2Db7v54
EX9K3BR5YLZrZAPbFYPhor72I5dQ8AkzNqdxliXzuUJ92zg/LFis6ELhDtjTO0wugumDLmsx2d1H
hk9tl5EuT+IocTUW0fJz/iUrB0ckYyfI+PbZa/wSMVYIwFNCr5zQM378BvAxRAMU8Vjq8moNqRGy
g77FGr8H6lnco4g175x2MjxNBiLOFeXdntiP2t7SxDnlF4HPOEfrf4htWRvfn0IUrn7PqLBmZdo3
r5+qPeoott7VMVgWglvquxl1AnMaykgaIZOQCo6ThKd9OyMYkomgjaw=
-----END CERTIFICATE-----

Certum EC-384 CA
================
-----BEGIN CERTIFICATE-----
MIICZTCCAeugAwIBAgIQeI8nXIESUiClBNAt3bpz9DAKBggqhkjOPQQDAzB0MQswCQYDVQQGEwJQ
TDEhMB8GA1UEChMYQXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2Vy
dGlmaWNhdGlvbiBBdXRob3JpdHkxGTAXBgNVBAMTEENlcnR1bSBFQy0zODQgQ0EwHhcNMTgwMzI2
MDcyNDU0WhcNNDMwMzI2MDcyNDU0WjB0MQswCQYDVQQGEwJQTDEhMB8GA1UEChMYQXNzZWNvIERh
dGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkx
GTAXBgNVBAMTEENlcnR1bSBFQy0zODQgQ0EwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAATEKI6rGFtq
vm5kN2PkzeyrOvfMobgOgknXhimfoZTy42B4mIF4Bk3y7JoOV2CDn7TmFy8as10CW4kjPMIRBSqn
iBMY81CE1700LCeJVf/OTOffph8oxPBUw7l8t1Ot68KjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD
VR0OBBYEFI0GZnQkdjrzife81r1HfS+8EF9LMA4GA1UdDwEB/wQEAwIBBjAKBggqhkjOPQQDAwNo
ADBlAjADVS2m5hjEfO/JUG7BJw+ch69u1RsIGL2SKcHvlJF40jocVYli5RsJHrpka/F2tNQCMQC0
QoSZ/6vnnvuRlydd3LBbMHHOXjgaatkl5+r3YZJW+OraNsKHZZYuciUvf9/DE8k=
-----END CERTIFICATE-----

Certum Trusted Root CA
======================
-----BEGIN CERTIFICATE-----
MIIFwDCCA6igAwIBAgIQHr9ZULjJgDdMBvfrVU+17TANBgkqhkiG9w0BAQ0FADB6MQswCQYDVQQG
EwJQTDEhMB8GA1UEChMYQXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0g
Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkxHzAdBgNVBAMTFkNlcnR1bSBUcnVzdGVkIFJvb3QgQ0Ew
HhcNMTgwMzE2MTIxMDEzWhcNNDMwMzE2MTIxMDEzWjB6MQswCQYDVQQGEwJQTDEhMB8GA1UEChMY
QXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlvbiBB
dXRob3JpdHkxHzAdBgNVBAMTFkNlcnR1bSBUcnVzdGVkIFJvb3QgQ0EwggIiMA0GCSqGSIb3DQEB
AQUAA4ICDwAwggIKAoICAQDRLY67tzbqbTeRn06TpwXkKQMlzhyC93yZn0EGze2jusDbCSzBfN8p
fktlL5On1AFrAygYo9idBcEq2EXxkd7fO9CAAozPOA/qp1x4EaTByIVcJdPTsuclzxFUl6s1wB52
HO8AU5853BSlLCIls3Jy/I2z5T4IHhQqNwuIPMqw9MjCoa68wb4pZ1Xi/K1ZXP69VyywkI3C7Te2
fJmItdUDmj0VDT06qKhF8JVOJVkdzZhpu9PMMsmN74H+rX2Ju7pgE8pllWeg8xn2A1bUatMn4qGt
g/BKEiJ3HAVz4hlxQsDsdUaakFjgao4rpUYwBI4Zshfjvqm6f1bxJAPXsiEodg42MEx51UGamqi4
NboMOvJEGyCI98Ul1z3G4z5D3Yf+xOr1Uz5MZf87Sst4WmsXXw3Hw09Omiqi7VdNIuJGmj8PkTQk
fVXjjJU30xrwCSss0smNtA0Aq2cpKNgB9RkEth2+dv5yXMSFytKAQd8FqKPVhJBPC/PgP5sZ0jeJ
P/J7UhyM9uH3PAeXjA6iWYEMspA90+NZRu0PqafegGtaqge2Gcu8V/OXIXoMsSt0Puvap2ctTMSY
njYJdmZm/Bo/6khUHL4wvYBQv3y1zgD2DGHZ5yQD4OMBgQ692IU0iL2yNqh7XAjlRICMb/gv1SHK
HRzQ+8S1h9E6Tsd2tTVItQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSM+xx1
vALTn04uSNn5YFSqxLNP+jAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQENBQADggIBAEii1QAL
LtA/vBzVtVRJHlpr9OTy4EA34MwUe7nJ+jW1dReTagVphZzNTxl4WxmB82M+w85bj/UvXgF2Ez8s
ALnNllI5SW0ETsXpD4YN4fqzX4IS8TrOZgYkNCvozMrnadyHncI013nR03e4qllY/p0m+jiGPp2K
h2RX5Rc64vmNueMzeMGQ2Ljdt4NR5MTMI9UGfOZR0800McD2RrsLrfw9EAUqO0qRJe6M1ISHgCq8
CYyqOhNf6DR5UMEQGfnTKB7U0VEwKbOukGfWHwpjscWpxkIxYxeU72nLL/qMFH3EQxiJ2fAyQOaA
4kZf5ePBAFmo+eggvIksDkc0C+pXwlM2/KfUrzHN/gLldfq5Jwn58/U7yn2fqSLLiMmq0Uc9Nneo
WWRrJ8/vJ8HjJLWG965+Mk2weWjROeiQWMODvA8s1pfrzgzhIMfatz7DP78v3DSk+yshzWePS/Tj
6tQ/50+6uaWTRRxmHyH6ZF5v4HaUMst19W7l9o/HuKTMqJZ9ZPskWkoDbGs4xugDQ5r3V7mzKWmT
OPQD8rv7gmsHINFSH5pkAnuYZttcTVoP0ISVoDwUQwbKytu4QTbaakRnh6+v40URFWkIsr4WOZck
bxJF0WddCajJFdr60qZfE2Efv4WstK2tBZQIgx51F9NxO5NQI1mg7TyRVJ12AMXDuDjb
-----END CERTIFICATE-----

TunTrust Root CA
================
-----BEGIN CERTIFICATE-----
MIIFszCCA5ugAwIBAgIUEwLV4kBMkkaGFmddtLu7sms+/BMwDQYJKoZIhvcNAQELBQAwYTELMAkG
A1UEBhMCVE4xNzA1BgNVBAoMLkFnZW5jZSBOYXRpb25hbGUgZGUgQ2VydGlmaWNhdGlvbiBFbGVj
dHJvbmlxdWUxGTAXBgNVBAMMEFR1blRydXN0IFJvb3QgQ0EwHhcNMTkwNDI2MDg1NzU2WhcNNDQw
NDI2MDg1NzU2WjBhMQswCQYDVQQGEwJUTjE3MDUGA1UECgwuQWdlbmNlIE5hdGlvbmFsZSBkZSBD
ZXJ0aWZpY2F0aW9uIEVsZWN0cm9uaXF1ZTEZMBcGA1UEAwwQVHVuVHJ1c3QgUm9vdCBDQTCCAiIw
DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMPN0/y9BFPdDCA61YguBUtB9YOCfvdZn56eY+hz
2vYGqU8ftPkLHzmMmiDQfgbU7DTZhrx1W4eI8NLZ1KMKsmwb60ksPqxd2JQDoOw05TDENX37Jk0b
bjBU2PWARZw5rZzJJQRNmpA+TkBuimvNKWfGzC3gdOgFVwpIUPp6Q9p+7FuaDmJ2/uqdHYVy7BG7
NegfJ7/Boce7SBbdVtfMTqDhuazb1YMZGoXRlJfXyqNlC/M4+QKu3fZnz8k/9YosRxqZbwUN/dAd
gjH8KcwAWJeRTIAAHDOFli/LQcKLEITDCSSJH7UP2dl3RxiSlGBcx5kDPP73lad9UKGAwqmDrViW
VSHbhlnUr8a83YFuB9tgYv7sEG7aaAH0gxupPqJbI9dkxt/con3YS7qC0lH4Zr8GRuR5KiY2eY8f
Tpkdso8MDhz/yV3A/ZAQprE38806JG60hZC/gLkMjNWb1sjxVj8agIl6qeIbMlEsPvLfe/ZdeikZ
juXIvTZxi11Mwh0/rViizz1wTaZQmCXcI/m4WEEIcb9PuISgjwBUFfyRbVinljvrS5YnzWuioYas
DXxU5mZMZl+QviGaAkYt5IPCgLnPSz7ofzwB7I9ezX/SKEIBlYrilz0QIX32nRzFNKHsLA4KUiwS
VXAkPcvCFDVDXSdOvsC9qnyW5/yeYa1E0wCXAgMBAAGjYzBhMB0GA1UdDgQWBBQGmpsfU33x9aTI
04Y+oXNZtPdEITAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFAaamx9TffH1pMjThj6hc1m0
90QhMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAqgVutt0Vyb+zxiD2BkewhpMl
0425yAA/l/VSJ4hxyXT968pk21vvHl26v9Hr7lxpuhbI87mP0zYuQEkHDVneixCwSQXi/5E/S7fd
Ao74gShczNxtr18UnH1YeA32gAm56Q6XKRm4t+v4FstVEuTGfbvE7Pi1HE4+Z7/FXxttbUcoqgRY
YdZ2vyJ/0Adqp2RT8JeNnYA/u8EH22Wv5psymsNUk8QcCMNE+3tjEUPRahphanltkE8pjkcFwRJp
adbGNjHh/PqAulxPxOu3Mqz4dWEX1xAZufHSCe96Qp1bWgvUxpVOKs7/B9dPfhgGiPEZtdmYu65x
xBzndFlY7wyJz4sfdZMaBBSSSFCp61cpABbjNhzI+L/wM9VBD8TMPN3pM0MBkRArHtG5Xc0yGYuP
jCB31yLEQtyEFpslbei0VXF/sHyz03FJuc9SpAQ/3D2gu68zngowYI7bnV2UqL1g52KAdoGDDIzM
MEZJ4gzSqK/rYXHv5yJiqfdcZGyfFoxnNidF9Ql7v/YQCvGwjVRDjAS6oz/v4jXH+XTgbzRB0L9z
ZVcg+ZtnemZoJE6AZb0QmQZZ8mWvuMZHu/2QeItBcy6vVR/cO5JyboTT0GFMDcx2V+IthSIVNg3r
AZ3r2OvEhJn7wAzMMujjd9qDRIueVSjAi1jTkD5OGwDxFa2DK5o=
-----END CERTIFICATE-----

HARICA TLS RSA Root CA 2021
===========================
-----BEGIN CERTIFICATE-----
MIIFpDCCA4ygAwIBAgIQOcqTHO9D88aOk8f0ZIk4fjANBgkqhkiG9w0BAQsFADBsMQswCQYDVQQG
EwJHUjE3MDUGA1UECgwuSGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9u
cyBDQTEkMCIGA1UEAwwbSEFSSUNBIFRMUyBSU0EgUm9vdCBDQSAyMDIxMB4XDTIxMDIxOTEwNTUz
OFoXDTQ1MDIxMzEwNTUzN1owbDELMAkGA1UEBhMCR1IxNzA1BgNVBAoMLkhlbGxlbmljIEFjYWRl
bWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ0ExJDAiBgNVBAMMG0hBUklDQSBUTFMgUlNB
IFJvb3QgQ0EgMjAyMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAIvC569lmwVnlskN
JLnQDmT8zuIkGCyEf3dRywQRNrhe7Wlxp57kJQmXZ8FHws+RFjZiPTgE4VGC/6zStGndLuwRo0Xu
a2s7TL+MjaQenRG56Tj5eg4MmOIjHdFOY9TnuEFE+2uva9of08WRiFukiZLRgeaMOVig1mlDqa2Y
Ulhu2wr7a89o+uOkXjpFc5gH6l8Cct4MpbOfrqkdtx2z/IpZ525yZa31MJQjB/OCFks1mJxTuy/K
5FrZx40d/JiZ+yykgmvwKh+OC19xXFyuQnspiYHLA6OZyoieC0AJQTPb5lh6/a6ZcMBaD9YThnEv
dmn8kN3bLW7R8pv1GmuebxWMevBLKKAiOIAkbDakO/IwkfN4E8/BPzWr8R0RI7VDIp4BkrcYAuUR
0YLbFQDMYTfBKnya4dC6s1BG7oKsnTH4+yPiAwBIcKMJJnkVU2DzOFytOOqBAGMUuTNe3QvboEUH
GjMJ+E20pwKmafTCWQWIZYVWrkvL4N48fS0ayOn7H6NhStYqE613TBoYm5EPWNgGVMWX+Ko/IIqm
haZ39qb8HOLubpQzKoNQhArlT4b4UEV4AIHrW2jjJo3Me1xR9BQsQL4aYB16cmEdH2MtiKrOokWQ
CPxrvrNQKlr9qEgYRtaQQJKQCoReaDH46+0N0x3GfZkYVVYnZS6NRcUk7M7jAgMBAAGjQjBAMA8G
A1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFApII6ZgpJIKM+qTW8VX6iVNvRLuMA4GA1UdDwEB/wQE
AwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAPpBIqm5iFSVmewzVjIuJndftTgfvnNAUX15QvWiWkKQU
EapobQk1OUAJ2vQJLDSle1mESSmXdMgHHkdt8s4cUCbjnj1AUz/3f5Z2EMVGpdAgS1D0NTsY9FVq
QRtHBmg8uwkIYtlfVUKqrFOFrJVWNlar5AWMxajaH6NpvVMPxP/cyuN+8kyIhkdGGvMA9YCRotxD
QpSbIPDRzbLrLFPCU3hKTwSUQZqPJzLB5UkZv/HywouoCjkxKLR9YjYsTewfM7Z+d21+UPCfDtcR
j88YxeMn/ibvBZ3PzzfF0HvaO7AWhAw6k9a+F9sPPg4ZeAnHqQJyIkv3N3a6dcSFA1pj1bF1BcK5
vZStjBWZp5N99sXzqnTPBIWUmAD04vnKJGW/4GKvyMX6ssmeVkjaef2WdhW+o45WxLM0/L5H9MG0
qPzVMIho7suuyWPEdr6sOBjhXlzPrjoiUevRi7PzKzMHVIf6tLITe7pTBGIBnfHAT+7hOtSLIBD6
Alfm78ELt5BGnBkpjNxvoEppaZS3JGWg/6w/zgH7IS79aPib8qXPMThcFarmlwDB31qlpzmq6YR/
PFGoOtmUW4y/Twhx5duoXNTSpv4Ao8YWxw/ogM4cKGR0GQjTQuPOAF1/sdwTsOEFy9EgqoZ0njnn
kf3/W9b3raYvAwtt41dU63ZTGI0RmLo=
-----END CERTIFICATE-----

HARICA TLS ECC Root CA 2021
===========================
-----BEGIN CERTIFICATE-----
MIICVDCCAdugAwIBAgIQZ3SdjXfYO2rbIvT/WeK/zjAKBggqhkjOPQQDAzBsMQswCQYDVQQGEwJH
UjE3MDUGA1UECgwuSGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9ucyBD
QTEkMCIGA1UEAwwbSEFSSUNBIFRMUyBFQ0MgUm9vdCBDQSAyMDIxMB4XDTIxMDIxOTExMDExMFoX
DTQ1MDIxMzExMDEwOVowbDELMAkGA1UEBhMCR1IxNzA1BgNVBAoMLkhlbGxlbmljIEFjYWRlbWlj
IGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ0ExJDAiBgNVBAMMG0hBUklDQSBUTFMgRUNDIFJv
b3QgQ0EgMjAyMTB2MBAGByqGSM49AgEGBSuBBAAiA2IABDgI/rGgltJ6rK9JOtDA4MM7KKrxcm1l
AEeIhPyaJmuqS7psBAqIXhfyVYf8MLA04jRYVxqEU+kw2anylnTDUR9YSTHMmE5gEYd103KUkE+b
ECUqqHgtvpBBWJAVcqeht6NCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUyRtTgRL+BNUW
0aq8mm+3oJUZbsowDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMDA2cAMGQCMBHervjcToiwqfAi
rcJRQO9gcS3ujwLEXQNwSaSS6sUUiHCm0w2wqsosQJz76YJumgIwK0eaB8bRwoF8yguWGEEbo/Qw
CZ61IygNnxS2PFOiTAZpffpskcYqSUXm7LcT4Tps
-----END CERTIFICATE-----

Autoridad de Certificacion Firmaprofesional CIF A62634068
=========================================================
-----BEGIN CERTIFICATE-----
MIIGFDCCA/ygAwIBAgIIG3Dp0v+ubHEwDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCRVMxQjBA
BgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2
MjYzNDA2ODAeFw0xNDA5MjMxNTIyMDdaFw0zNjA1MDUxNTIyMDdaMFExCzAJBgNVBAYTAkVTMUIw
QAYDVQQDDDlBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBB
NjI2MzQwNjgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKlmuO6vj78aI14H9M2uDD
Utd9thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOSL/UR5GLXMnE42QQMcas9UX4P
B99jBVzpv5RvwSmCwLTaUbDBPLutN0pcyvFLNg4kq7/DhHf9qFD0sefGL9ItWY16Ck6WaVICqjaY
7Pz6FIMMNx/Jkjd/14Et5cS54D40/mf0PmbR0/RAz15iNA9wBj4gGFrO93IbJWyTdBSTo3OxDqqH
ECNZXyAFGUftaI6SEspd/NYrspI8IM/hX68gvqB2f3bl7BqGYTM+53u0P6APjqK5am+5hyZvQWyI
plD9amML9ZMWGxmPsu2bm8mQ9QEM3xk9Dz44I8kvjwzRAv4bVdZO0I08r0+k8/6vKtMFnXkIoctX
MbScyJCyZ/QYFpM6/EfY0XiWMR+6KwxfXZmtY4laJCB22N/9q06mIqqdXuYnin1oKaPnirjaEbsX
LZmdEyRG98Xi2J+Of8ePdG1asuhy9azuJBCtLxTa/y2aRnFHvkLfuwHb9H/TKI8xWVvTyQKmtFLK
bpf7Q8UIJm+K9Lv9nyiqDdVF8xM6HdjAeI9BZzwelGSuewvF6NkBiDkal4ZkQdU7hwxu+g/GvUgU
vzlN1J5Bto+WHWOWk9mVBngxaJ43BjuAiUVhOSPHG0SjFeUc+JIwuwIDAQABo4HvMIHsMB0GA1Ud
DgQWBBRlzeurNR4APn7VdMActHNHDhpkLzASBgNVHRMBAf8ECDAGAQH/AgEBMIGmBgNVHSAEgZ4w
gZswgZgGBFUdIAAwgY8wLwYIKwYBBQUHAgEWI2h0dHA6Ly93d3cuZmlybWFwcm9mZXNpb25hbC5j
b20vY3BzMFwGCCsGAQUFBwICMFAeTgBQAGEAcwBlAG8AIABkAGUAIABsAGEAIABCAG8AbgBhAG4A
bwB2AGEAIAA0ADcAIABCAGEAcgBjAGUAbABvAG4AYQAgADAAOAAwADEANzAOBgNVHQ8BAf8EBAMC
AQYwDQYJKoZIhvcNAQELBQADggIBAHSHKAIrdx9miWTtj3QuRhy7qPj4Cx2Dtjqn6EWKB7fgPiDL
4QjbEwj4KKE1soCzC1HA01aajTNFSa9J8OA9B3pFE1r/yJfY0xgsfZb43aJlQ3CTkBW6kN/oGbDb
LIpgD7dvlAceHabJhfa9NPhAeGIQcDq+fUs5gakQ1JZBu/hfHAsdCPKxsIl68veg4MSPi3i1O1il
I45PVf42O+AMt8oqMEEgtIDNrvx2ZnOorm7hfNoD6JQg5iKj0B+QXSBTFCZX2lSX3xZEEAEeiGaP
cjiT3SC3NL7X8e5jjkd5KAb881lFJWAiMxujX6i6KtoaPc1A6ozuBRWV1aUsIC+nmCjuRfzxuIgA
LI9C2lHVnOUTaHFFQ4ueCyE8S1wF3BqfmI7avSKecs2tCsvMo2ebKHTEm9caPARYpoKdrcd7b/+A
lun4jWq9GJAd/0kakFI3ky88Al2CdgtR5xbHV/g4+afNmyJU72OwFW1TZQNKXkqgsqeOSQBZONXH
9IBk9W6VULgRfhVwOEqwf9DEMnDAGf/JOC0ULGb0QkTmVXYbgBVX/8Cnp6o5qtjTcNAuuuuUavpf
NIbnYrX9ivAwhZTJryQCL2/W3Wf+47BVTwSYT6RBVuKT0Gro1vP7ZeDOdcQxWQzugsgMYDNKGbqE
ZycPvEJdvSRUDewdcAZfpLz6IHxV
-----END CERTIFICATE-----

vTrus ECC Root CA
=================
-----BEGIN CERTIFICATE-----
MIICDzCCAZWgAwIBAgIUbmq8WapTvpg5Z6LSa6Q75m0c1towCgYIKoZIzj0EAwMwRzELMAkGA1UE
BhMCQ04xHDAaBgNVBAoTE2lUcnVzQ2hpbmEgQ28uLEx0ZC4xGjAYBgNVBAMTEXZUcnVzIEVDQyBS
b290IENBMB4XDTE4MDczMTA3MjY0NFoXDTQzMDczMTA3MjY0NFowRzELMAkGA1UEBhMCQ04xHDAa
BgNVBAoTE2lUcnVzQ2hpbmEgQ28uLEx0ZC4xGjAYBgNVBAMTEXZUcnVzIEVDQyBSb290IENBMHYw
EAYHKoZIzj0CAQYFK4EEACIDYgAEZVBKrox5lkqqHAjDo6LN/llWQXf9JpRCux3NCNtzslt188+c
ToL0v/hhJoVs1oVbcnDS/dtitN9Ti72xRFhiQgnH+n9bEOf+QP3A2MMrMudwpremIFUde4BdS49n
TPEQo0IwQDAdBgNVHQ4EFgQUmDnNvtiyjPeyq+GtJK97fKHbH88wDwYDVR0TAQH/BAUwAwEB/zAO
BgNVHQ8BAf8EBAMCAQYwCgYIKoZIzj0EAwMDaAAwZQIwV53dVvHH4+m4SVBrm2nDb+zDfSXkV5UT
QJtS0zvzQBm8JsctBp61ezaf9SXUY2sAAjEA6dPGnlaaKsyh2j/IZivTWJwghfqrkYpwcBE4YGQL
YgmRWAD5Tfs0aNoJrSEGGJTO
-----END CERTIFICATE-----

vTrus Root CA
=============
-----BEGIN CERTIFICATE-----
MIIFVjCCAz6gAwIBAgIUQ+NxE9izWRRdt86M/TX9b7wFjUUwDQYJKoZIhvcNAQELBQAwQzELMAkG
A1UEBhMCQ04xHDAaBgNVBAoTE2lUcnVzQ2hpbmEgQ28uLEx0ZC4xFjAUBgNVBAMTDXZUcnVzIFJv
b3QgQ0EwHhcNMTgwNzMxMDcyNDA1WhcNNDMwNzMxMDcyNDA1WjBDMQswCQYDVQQGEwJDTjEcMBoG
A1UEChMTaVRydXNDaGluYSBDby4sTHRkLjEWMBQGA1UEAxMNdlRydXMgUm9vdCBDQTCCAiIwDQYJ
KoZIhvcNAQEBBQADggIPADCCAgoCggIBAL1VfGHTuB0EYgWgrmy3cLRB6ksDXhA/kFocizuwZots
SKYcIrrVQJLuM7IjWcmOvFjai57QGfIvWcaMY1q6n6MLsLOaXLoRuBLpDLvPbmyAhykUAyyNJJrI
ZIO1aqwTLDPxn9wsYTwaP3BVm60AUn/PBLn+NvqcwBauYv6WTEN+VRS+GrPSbcKvdmaVayqwlHeF
XgQPYh1jdfdr58tbmnDsPmcF8P4HCIDPKNsFxhQnL4Z98Cfe/+Z+M0jnCx5Y0ScrUw5XSmXX+6KA
YPxMvDVTAWqXcoKv8R1w6Jz1717CbMdHflqUhSZNO7rrTOiwCcJlwp2dCZtOtZcFrPUGoPc2BX70
kLJrxLT5ZOrpGgrIDajtJ8nU57O5q4IikCc9Kuh8kO+8T/3iCiSn3mUkpF3qwHYw03dQ+A0Em5Q2
AXPKBlim0zvc+gRGE1WKyURHuFE5Gi7oNOJ5y1lKCn+8pu8fA2dqWSslYpPZUxlmPCdiKYZNpGvu
/9ROutW04o5IWgAZCfEF2c6Rsffr6TlP9m8EQ5pV9T4FFL2/s1m02I4zhKOQUqqzApVg+QxMaPnu
1RcN+HFXtSXkKe5lXa/R7jwXC1pDxaWG6iSe4gUH3DRCEpHWOXSuTEGC2/KmSNGzm/MzqvOmwMVO
9fSddmPmAsYiS8GVP1BkLFTltvA8Kc9XAgMBAAGjQjBAMB0GA1UdDgQWBBRUYnBj8XWEQ1iO0RYg
scasGrz2iTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOC
AgEAKbqSSaet8PFww+SX8J+pJdVrnjT+5hpk9jprUrIQeBqfTNqK2uwcN1LgQkv7bHbKJAs5EhWd
nxEt/Hlk3ODg9d3gV8mlsnZwUKT+twpw1aA08XXXTUm6EdGz2OyC/+sOxL9kLX1jbhd47F18iMjr
jld22VkE+rxSH0Ws8HqA7Oxvdq6R2xCOBNyS36D25q5J08FsEhvMKar5CKXiNxTKsbhm7xqC5PD4
8acWabfbqWE8n/Uxy+QARsIvdLGx14HuqCaVvIivTDUHKgLKeBRtRytAVunLKmChZwOgzoy8sHJn
xDHO2zTlJQNgJXtxmOTAGytfdELSS8VZCAeHvsXDf+eW2eHcKJfWjwXj9ZtOyh1QRwVTsMo554Wg
icEFOwE30z9J4nfrI8iIZjs9OXYhRvHsXyO466JmdXTBQPfYaJqT4i2pLr0cox7IdMakLXogqzu4
sEb9b91fUlV1YvCXoHzXOP0l382gmxDPi7g4Xl7FtKYCNqEeXxzP4padKar9mK5S4fNBUvupLnKW
nyfjqnN9+BojZns7q2WwMgFLFT49ok8MKzWixtlnEjUwzXYuFrOZnk1PTi07NEPhmg4NpGaXutIc
SkwsKouLgU9xGqndXHt7CMUADTdA43x7VF8vhV929vensBxXVsFy6K2ir40zSbofitzmdHxghm+H
l3s=
-----END CERTIFICATE-----

ISRG Root X2
============
-----BEGIN CERTIFICATE-----
MIICGzCCAaGgAwIBAgIQQdKd0XLq7qeAwSxs6S+HUjAKBggqhkjOPQQDAzBPMQswCQYDVQQGEwJV
UzEpMCcGA1UEChMgSW50ZXJuZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMTDElT
UkcgUm9vdCBYMjAeFw0yMDA5MDQwMDAwMDBaFw00MDA5MTcxNjAwMDBaME8xCzAJBgNVBAYTAlVT
MSkwJwYDVQQKEyBJbnRlcm5ldCBTZWN1cml0eSBSZXNlYXJjaCBHcm91cDEVMBMGA1UEAxMMSVNS
RyBSb290IFgyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEzZvVn4CDCuwJSvMWSj5cz3es3mcFDR0H
ttwW+1qLFNvicWDEukWVEYmO6gbf9yoWHKS5xcUy4APgHoIYOIvXRdgKam7mAHf7AlF9ItgKbppb
d9/w+kHsOdx1ymgHDB/qo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNV
HQ4EFgQUfEKWrt5LSDv6kviejM9ti6lyN5UwCgYIKoZIzj0EAwMDaAAwZQIwe3lORlCEwkSHRhtF
cP9Ymd70/aTSVaYgLXTWNLxBo1BfASdWtL4ndQavEi51mI38AjEAi/V3bNTIZargCyzuFJ0nN6T5
U6VR5CmD1/iQMVtCnwr1/q4AaOeMSQ+2b1tbFfLn
-----END CERTIFICATE-----

HiPKI Root CA - G1
==================
-----BEGIN CERTIFICATE-----
MIIFajCCA1KgAwIBAgIQLd2szmKXlKFD6LDNdmpeYDANBgkqhkiG9w0BAQsFADBPMQswCQYDVQQG
EwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0ZC4xGzAZBgNVBAMMEkhpUEtJ
IFJvb3QgQ0EgLSBHMTAeFw0xOTAyMjIwOTQ2MDRaFw0zNzEyMzExNTU5NTlaME8xCzAJBgNVBAYT
AlRXMSMwIQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEbMBkGA1UEAwwSSGlQS0kg
Um9vdCBDQSAtIEcxMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA9B5/UnMyDHPkvRN0
o9QwqNCuS9i233VHZvR85zkEHmpwINJaR3JnVfSl6J3VHiGh8Ge6zCFovkRTv4354twvVcg3Px+k
wJyz5HdcoEb+d/oaoDjq7Zpy3iu9lFc6uux55199QmQ5eiY29yTw1S+6lZgRZq2XNdZ1AYDgr/SE
YYwNHl98h5ZeQa/rh+r4XfEuiAU+TCK72h8q3VJGZDnzQs7ZngyzsHeXZJzA9KMuH5UHsBffMNsA
GJZMoYFL3QRtU6M9/Aes1MU3guvklQgZKILSQjqj2FPseYlgSGDIcpJQ3AOPgz+yQlda22rpEZfd
hSi8MEyr48KxRURHH+CKFgeW0iEPU8DtqX7UTuybCeyvQqww1r/REEXgphaypcXTT3OUM3ECoWqj
1jOXTyFjHluP2cFeRXF3D4FdXyGarYPM+l7WjSNfGz1BryB1ZlpK9p/7qxj3ccC2HTHsOyDry+K4
9a6SsvfhhEvyovKTmiKe0xRvNlS9H15ZFblzqMF8b3ti6RZsR1pl8w4Rm0bZ/W3c1pzAtH2lsN0/
Vm+h+fbkEkj9Bn8SV7apI09bA8PgcSojt/ewsTu8mL3WmKgMa/aOEmem8rJY5AIJEzypuxC00jBF
8ez3ABHfZfjcK0NVvxaXxA/VLGGEqnKG/uY6fsI/fe78LxQ+5oXdUG+3Se0CAwEAAaNCMEAwDwYD
VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU8ncX+l6o/vY9cdVouslGDDjYr7AwDgYDVR0PAQH/BAQD
AgGGMA0GCSqGSIb3DQEBCwUAA4ICAQBQUfB13HAE4/+qddRxosuej6ip0691x1TPOhwEmSKsxBHi
7zNKpiMdDg1H2DfHb680f0+BazVP6XKlMeJ45/dOlBhbQH3PayFUhuaVevvGyuqcSE5XCV0vrPSl
tJczWNWseanMX/mF+lLFjfiRFOs6DRfQUsJ748JzjkZ4Bjgs6FzaZsT0pPBWGTMpWmWSBUdGSquE
wx4noR8RkpkndZMPvDY7l1ePJlsMu5wP1G4wB9TcXzZoZjmDlicmisjEOf6aIW/Vcobpf2Lll07Q
JNBAsNB1CI69aO4I1258EHBGG3zgiLKecoaZAeO/n0kZtCW+VmWuF2PlHt/o/0elv+EmBYTksMCv
5wiZqAxeJoBF1PhoL5aPruJKHJwWDBNvOIf2u8g0X5IDUXlwpt/L9ZlNec1OvFefQ05rLisY+Gpz
jLrFNe85akEez3GoorKGB1s6yeHvP2UEgEcyRHCVTjFnanRbEEV16rCf0OY1/k6fi8wrkkVbbiVg
hUbN0aqwdmaTd5a+g744tiROJgvM7XpWGuDpWsZkrUx6AEhEL7lAuxM+vhV4nYWBSipX3tUZQ9rb
yltHhoMLP7YNdnhzeSJesYAfz77RP1YQmCuVh6EfnWQUYDksswBVLuT1sw5XxJFBAJw/6KXf6vb/
yPCtbVKoF6ubYfwSUTXkJf2vqmqGOQ==
-----END CERTIFICATE-----

GlobalSign ECC Root CA - R4
===========================
-----BEGIN CERTIFICATE-----
MIIB3DCCAYOgAwIBAgINAgPlfvU/k/2lCSGypjAKBggqhkjOPQQDAjBQMSQwIgYDVQQLExtHbG9i
YWxTaWduIEVDQyBSb290IENBIC0gUjQxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkds
b2JhbFNpZ24wHhcNMTIxMTEzMDAwMDAwWhcNMzgwMTE5MDMxNDA3WjBQMSQwIgYDVQQLExtHbG9i
YWxTaWduIEVDQyBSb290IENBIC0gUjQxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkds
b2JhbFNpZ24wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAS4xnnTj2wlDp8uORkcA6SumuU5BwkW
ymOxuYb4ilfBV85C+nOh92VC/x7BALJucw7/xyHlGKSq2XE/qNS5zowdo0IwQDAOBgNVHQ8BAf8E
BAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUVLB7rUW44kB/+wpu+74zyTyjhNUwCgYI
KoZIzj0EAwIDRwAwRAIgIk90crlgr/HmnKAWBVBfw147bmF0774BxL4YSFlhgjICICadVGNA3jdg
UM/I2O2dgq43mLyjj0xMqTQrbO/7lZsm
-----END CERTIFICATE-----

GTS Root R1
===========
-----BEGIN CERTIFICATE-----
MIIFVzCCAz+gAwIBAgINAgPlk28xsBNJiGuiFzANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQGEwJV
UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg
UjEwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE
ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjEwggIiMA0G
CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2EQKLHuOhd5s73L+UPreVp0A8of2C+X0yBoJx9vaM
f/vo27xqLpeXo4xL+Sv2sfnOhB2x+cWX3u+58qPpvBKJXqeqUqv4IyfLpLGcY9vXmX7wCl7raKb0
xlpHDU0QM+NOsROjyBhsS+z8CZDfnWQpJSMHobTSPS5g4M/SCYe7zUjwTcLCeoiKu7rPWRnWr4+w
B7CeMfGCwcDfLqZtbBkOtdh+JhpFAz2weaSUKK0PfyblqAj+lug8aJRT7oM6iCsVlgmy4HqMLnXW
nOunVmSPlk9orj2XwoSPwLxAwAtcvfaHszVsrBhQf4TgTM2S0yDpM7xSma8ytSmzJSq0SPly4cpk
9+aCEI3oncKKiPo4Zor8Y/kB+Xj9e1x3+naH+uzfsQ55lVe0vSbv1gHR6xYKu44LtcXFilWr06zq
kUspzBmkMiVOKvFlRNACzqrOSbTqn3yDsEB750Orp2yjj32JgfpMpf/VjsPOS+C12LOORc92wO1A
K/1TD7Cn1TsNsYqiA94xrcx36m97PtbfkSIS5r762DL8EGMUUXLeXdYWk70paDPvOmbsB4om3xPX
V2V4J95eSRQAogB/mqghtqmxlbCluQ0WEdrHbEg8QOB+DVrNVjzRlwW5y0vtOUucxD/SVRNuJLDW
cfr0wbrM7Rv1/oFB2ACYPTrIrnqYNxgFlQIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0T
AQH/BAUwAwEB/zAdBgNVHQ4EFgQU5K8rJnEaK0gnhS9SZizv8IkTcT4wDQYJKoZIhvcNAQEMBQAD
ggIBAJ+qQibbC5u+/x6Wki4+omVKapi6Ist9wTrYggoGxval3sBOh2Z5ofmmWJyq+bXmYOfg6LEe
QkEzCzc9zolwFcq1JKjPa7XSQCGYzyI0zzvFIoTgxQ6KfF2I5DUkzps+GlQebtuyh6f88/qBVRRi
ClmpIgUxPoLW7ttXNLwzldMXG+gnoot7TiYaelpkttGsN/H9oPM47HLwEXWdyzRSjeZ2axfG34ar
J45JK3VmgRAhpuo+9K4l/3wV3s6MJT/KYnAK9y8JZgfIPxz88NtFMN9iiMG1D53Dn0reWVlHxYci
NuaCp+0KueIHoI17eko8cdLiA6EfMgfdG+RCzgwARWGAtQsgWSl4vflVy2PFPEz0tv/bal8xa5me
LMFrUKTX5hgUvYU/Z6tGn6D/Qqc6f1zLXbBwHSs09dR2CQzreExZBfMzQsNhFRAbd03OIozUhfJF
fbdT6u9AWpQKXCBfTkBdYiJ23//OYb2MI3jSNwLgjt7RETeJ9r/tSQdirpLsQBqvFAnZ0E6yove+
7u7Y/9waLd64NnHi/Hm3lCXRSHNboTXns5lndcEZOitHTtNCjv0xyBZm2tIMPNuzjsmhDYAPexZ3
FL//2wmUspO8IFgV6dtxQ/PeEMMA3KgqlbbC1j+Qa3bbbP6MvPJwNQzcmRk13NfIRmPVNnGuV/u3
gm3c
-----END CERTIFICATE-----

GTS Root R2
===========
-----BEGIN CERTIFICATE-----
MIIFVzCCAz+gAwIBAgINAgPlrsWNBCUaqxElqjANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQGEwJV
UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg
UjIwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE
ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjIwggIiMA0G
CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDO3v2m++zsFDQ8BwZabFn3GTXd98GdVarTzTukk3Lv
CvptnfbwhYBboUhSnznFt+4orO/LdmgUud+tAWyZH8QiHZ/+cnfgLFuv5AS/T3KgGjSY6Dlo7JUl
e3ah5mm5hRm9iYz+re026nO8/4Piy33B0s5Ks40FnotJk9/BW9BuXvAuMC6C/Pq8tBcKSOWIm8Wb
a96wyrQD8Nr0kLhlZPdcTK3ofmZemde4wj7I0BOdre7kRXuJVfeKH2JShBKzwkCX44ofR5GmdFrS
+LFjKBC4swm4VndAoiaYecb+3yXuPuWgf9RhD1FLPD+M2uFwdNjCaKH5wQzpoeJ/u1U8dgbuak7M
kogwTZq9TwtImoS1mKPV+3PBV2HdKFZ1E66HjucMUQkQdYhMvI35ezzUIkgfKtzra7tEscszcTJG
r61K8YzodDqs5xoic4DSMPclQsciOzsSrZYuxsN2B6ogtzVJV+mSSeh2FnIxZyuWfoqjx5RWIr9q
S34BIbIjMt/kmkRtWVtd9QCgHJvGeJeNkP+byKq0rxFROV7Z+2et1VsRnTKaG73VululycslaVNV
J1zgyjbLiGH7HrfQy+4W+9OmTN6SpdTi3/UGVN4unUu0kzCqgc7dGtxRcw1PcOnlthYhGXmy5okL
dWTK1au8CcEYof/UVKGFPP0UJAOyh9OktwIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0T
AQH/BAUwAwEB/zAdBgNVHQ4EFgQUu//KjiOfT5nK2+JopqUVJxce2Q4wDQYJKoZIhvcNAQEMBQAD
ggIBAB/Kzt3HvqGf2SdMC9wXmBFqiN495nFWcrKeGk6c1SuYJF2ba3uwM4IJvd8lRuqYnrYb/oM8
0mJhwQTtzuDFycgTE1XnqGOtjHsB/ncw4c5omwX4Eu55MaBBRTUoCnGkJE+M3DyCB19m3H0Q/gxh
swWV7uGugQ+o+MePTagjAiZrHYNSVc61LwDKgEDg4XSsYPWHgJ2uNmSRXbBoGOqKYcl3qJfEycel
/FVL8/B/uWU9J2jQzGv6U53hkRrJXRqWbTKH7QMgyALOWr7Z6v2yTcQvG99fevX4i8buMTolUVVn
jWQye+mew4K6Ki3pHrTgSAai/GevHyICc/sgCq+dVEuhzf9gR7A/Xe8bVr2XIZYtCtFenTgCR2y5
9PYjJbigapordwj6xLEokCZYCDzifqrXPW+6MYgKBesntaFJ7qBFVHvmJ2WZICGoo7z7GJa7Um8M
7YNRTOlZ4iBgxcJlkoKM8xAfDoqXvneCbT+PHV28SSe9zE8P4c52hgQjxcCMElv924SgJPFI/2R8
0L5cFtHvma3AH/vLrrw4IgYmZNralw4/KBVEqE8AyvCazM90arQ+POuV7LXTWtiBmelDGDfrs7vR
WGJB82bSj6p4lVQgw1oudCvV0b4YacCs1aTPObpRhANl6WLAYv7YTVWW4tAR+kg0Eeye7QUd5MjW
HYbL
-----END CERTIFICATE-----

GTS Root R3
===========
-----BEGIN CERTIFICATE-----
MIICCTCCAY6gAwIBAgINAgPluILrIPglJ209ZjAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJVUzEi
MCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjMw
HhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZ
R29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjMwdjAQBgcqhkjO
PQIBBgUrgQQAIgNiAAQfTzOHMymKoYTey8chWEGJ6ladK0uFxh1MJ7x/JlFyb+Kf1qPKzEUURout
736GjOyxfi//qXGdGIRFBEFVbivqJn+7kAHjSxm65FSWRQmx1WyRRK2EE46ajA2ADDL24CejQjBA
MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTB8Sa6oC2uhYHP0/Eq
Er24Cmf9vDAKBggqhkjOPQQDAwNpADBmAjEA9uEglRR7VKOQFhG/hMjqb2sXnh5GmCCbn9MN2azT
L818+FsuVbu/3ZL3pAzcMeGiAjEA/JdmZuVDFhOD3cffL74UOO0BzrEXGhF16b0DjyZ+hOXJYKaV
11RZt+cRLInUue4X
-----END CERTIFICATE-----

GTS Root R4
===========
-----BEGIN CERTIFICATE-----
MIICCTCCAY6gAwIBAgINAgPlwGjvYxqccpBQUjAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJVUzEi
MCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjQw
HhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZ
R29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjQwdjAQBgcqhkjO
PQIBBgUrgQQAIgNiAATzdHOnaItgrkO4NcWBMHtLSZ37wWHO5t5GvWvVYRg1rkDdc/eJkTBa6zzu
hXyiQHY7qca4R9gq55KRanPpsXI5nymfopjTX15YhmUPoYRlBtHci8nHc8iMai/lxKvRHYqjQjBA
MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSATNbrdP9JNqPV2Py1
PsVq8JQdjDAKBggqhkjOPQQDAwNpADBmAjEA6ED/g94D9J+uHXqnLrmvT/aDHQ4thQEd0dlq7A/C
r8deVl5c1RxYIigL9zC2L7F8AjEA8GE8p/SgguMh1YQdc4acLa/KNJvxn7kjNuK8YAOdgLOaVsjh
4rsUecrNIdSUtUlD
-----END CERTIFICATE-----

Telia Root CA v2
================
-----BEGIN CERTIFICATE-----
MIIFdDCCA1ygAwIBAgIPAWdfJ9b+euPkrL4JWwWeMA0GCSqGSIb3DQEBCwUAMEQxCzAJBgNVBAYT
AkZJMRowGAYDVQQKDBFUZWxpYSBGaW5sYW5kIE95ajEZMBcGA1UEAwwQVGVsaWEgUm9vdCBDQSB2
MjAeFw0xODExMjkxMTU1NTRaFw00MzExMjkxMTU1NTRaMEQxCzAJBgNVBAYTAkZJMRowGAYDVQQK
DBFUZWxpYSBGaW5sYW5kIE95ajEZMBcGA1UEAwwQVGVsaWEgUm9vdCBDQSB2MjCCAiIwDQYJKoZI
hvcNAQEBBQADggIPADCCAgoCggIBALLQPwe84nvQa5n44ndp586dpAO8gm2h/oFlH0wnrI4AuhZ7
6zBqAMCzdGh+sq/H1WKzej9Qyow2RCRj0jbpDIX2Q3bVTKFgcmfiKDOlyzG4OiIjNLh9vVYiQJ3q
9HsDrWj8soFPmNB06o3lfc1jw6P23pLCWBnglrvFxKk9pXSW/q/5iaq9lRdU2HhE8Qx3FZLgmEKn
pNaqIJLNwaCzlrI6hEKNfdWV5Nbb6WLEWLN5xYzTNTODn3WhUidhOPFZPY5Q4L15POdslv5e2QJl
tI5c0BE0312/UqeBAMN/mUWZFdUXyApT7GPzmX3MaRKGwhfwAZ6/hLzRUssbkmbOpFPlob/E2wnW
5olWK8jjfN7j/4nlNW4o6GwLI1GpJQXrSPjdscr6bAhR77cYbETKJuFzxokGgeWKrLDiKca5JLNr
RBH0pUPCTEPlcDaMtjNXepUugqD0XBCzYYP2AgWGLnwtbNwDRm41k9V6lS/eINhbfpSQBGq6WT0E
BXWdN6IOLj3rwaRSg/7Qa9RmjtzG6RJOHSpXqhC8fF6CfaamyfItufUXJ63RDolUK5X6wK0dmBR4
M0KGCqlztft0DbcbMBnEWg4cJ7faGND/isgFuvGqHKI3t+ZIpEYslOqodmJHixBTB0hXbOKSTbau
BcvcwUpej6w9GU7C7WB1K9vBykLVAgMBAAGjYzBhMB8GA1UdIwQYMBaAFHKs5DN5qkWH9v2sHZ7W
xy+G2CQ5MB0GA1UdDgQWBBRyrOQzeapFh/b9rB2e1scvhtgkOTAOBgNVHQ8BAf8EBAMCAQYwDwYD
VR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEAoDtZpwmUPjaE0n4vOaWWl/oRrfxn83EJ
8rKJhGdEr7nv7ZbsnGTbMjBvZ5qsfl+yqwE2foH65IRe0qw24GtixX1LDoJt0nZi0f6X+J8wfBj5
tFJ3gh1229MdqfDBmgC9bXXYfef6xzijnHDoRnkDry5023X4blMMA8iZGok1GTzTyVR8qPAs5m4H
eW9q4ebqkYJpCh3DflminmtGFZhb069GHWLIzoBSSRE/yQQSwxN8PzuKlts8oB4KtItUsiRnDe+C
y748fdHif64W1lZYudogsYMVoe+KTTJvQS8TUoKU1xrBeKJR3Stwbbca+few4GeXVtt8YVMJAygC
QMez2P2ccGrGKMOF6eLtGpOg3kuYooQ+BXcBlj37tCAPnHICehIv1aO6UXivKitEZU61/Qrowc15
h2Er3oBXRb9n8ZuRXqWk7FlIEA04x7D6w0RtBPV4UBySllva9bguulvP5fBqnUsvWHMtTy3EHD70
sz+rFQ47GUGKpMFXEmZxTPpT41frYpUJnlTd0cI8Vzy9OK2YZLe4A5pTVmBds9hCG1xLEooc6+t9
xnppxyd/pPiL8uSUZodL6ZQHCRJ5irLrdATczvREWeAWysUsWNc8e89ihmpQfTU2Zqf7N+cox9jQ
raVplI/owd8k+BsHMYeB2F326CjYSlKArBPuUBQemMc=
-----END CERTIFICATE-----

D-TRUST BR Root CA 1 2020
=========================
-----BEGIN CERTIFICATE-----
MIIC2zCCAmCgAwIBAgIQfMmPK4TX3+oPyWWa00tNljAKBggqhkjOPQQDAzBIMQswCQYDVQQGEwJE
RTEVMBMGA1UEChMMRC1UcnVzdCBHbWJIMSIwIAYDVQQDExlELVRSVVNUIEJSIFJvb3QgQ0EgMSAy
MDIwMB4XDTIwMDIxMTA5NDUwMFoXDTM1MDIxMTA5NDQ1OVowSDELMAkGA1UEBhMCREUxFTATBgNV
BAoTDEQtVHJ1c3QgR21iSDEiMCAGA1UEAxMZRC1UUlVTVCBCUiBSb290IENBIDEgMjAyMDB2MBAG
ByqGSM49AgEGBSuBBAAiA2IABMbLxyjR+4T1mu9CFCDhQ2tuda38KwOE1HaTJddZO0Flax7mNCq7
dPYSzuht56vkPE4/RAiLzRZxy7+SmfSk1zxQVFKQhYN4lGdnoxwJGT11NIXe7WB9xwy0QVK5buXu
QqOCAQ0wggEJMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFHOREKv/VbNafAkl1bK6CKBrqx9t
MA4GA1UdDwEB/wQEAwIBBjCBxgYDVR0fBIG+MIG7MD6gPKA6hjhodHRwOi8vY3JsLmQtdHJ1c3Qu
bmV0L2NybC9kLXRydXN0X2JyX3Jvb3RfY2FfMV8yMDIwLmNybDB5oHegdYZzbGRhcDovL2RpcmVj
dG9yeS5kLXRydXN0Lm5ldC9DTj1ELVRSVVNUJTIwQlIlMjBSb290JTIwQ0ElMjAxJTIwMjAyMCxP
PUQtVHJ1c3QlMjBHbWJILEM9REU/Y2VydGlmaWNhdGVyZXZvY2F0aW9ubGlzdDAKBggqhkjOPQQD
AwNpADBmAjEAlJAtE/rhY/hhY+ithXhUkZy4kzg+GkHaQBZTQgjKL47xPoFWwKrY7RjEsK70Pvom
AjEA8yjixtsrmfu3Ubgko6SUeho/5jbiA1czijDLgsfWFBHVdWNbFJWcHwHP2NVypw87
-----END CERTIFICATE-----

D-TRUST EV Root CA 1 2020
=========================
-----BEGIN CERTIFICATE-----
MIIC2zCCAmCgAwIBAgIQXwJB13qHfEwDo6yWjfv/0DAKBggqhkjOPQQDAzBIMQswCQYDVQQGEwJE
RTEVMBMGA1UEChMMRC1UcnVzdCBHbWJIMSIwIAYDVQQDExlELVRSVVNUIEVWIFJvb3QgQ0EgMSAy
MDIwMB4XDTIwMDIxMTEwMDAwMFoXDTM1MDIxMTA5NTk1OVowSDELMAkGA1UEBhMCREUxFTATBgNV
BAoTDEQtVHJ1c3QgR21iSDEiMCAGA1UEAxMZRC1UUlVTVCBFViBSb290IENBIDEgMjAyMDB2MBAG
ByqGSM49AgEGBSuBBAAiA2IABPEL3YZDIBnfl4XoIkqbz52Yv7QFJsnL46bSj8WeeHsxiamJrSc8
ZRCC/N/DnU7wMyPE0jL1HLDfMxddxfCxivnvubcUyilKwg+pf3VlSSowZ/Rk99Yad9rDwpdhQntJ
raOCAQ0wggEJMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFH8QARY3OqQo5FD4pPfsazK2/umL
MA4GA1UdDwEB/wQEAwIBBjCBxgYDVR0fBIG+MIG7MD6gPKA6hjhodHRwOi8vY3JsLmQtdHJ1c3Qu
bmV0L2NybC9kLXRydXN0X2V2X3Jvb3RfY2FfMV8yMDIwLmNybDB5oHegdYZzbGRhcDovL2RpcmVj
dG9yeS5kLXRydXN0Lm5ldC9DTj1ELVRSVVNUJTIwRVYlMjBSb290JTIwQ0ElMjAxJTIwMjAyMCxP
PUQtVHJ1c3QlMjBHbWJILEM9REU/Y2VydGlmaWNhdGVyZXZvY2F0aW9ubGlzdDAKBggqhkjOPQQD
AwNpADBmAjEAyjzGKnXCXnViOTYAYFqLwZOZzNnbQTs7h5kXO9XMT8oi96CAy/m0sRtW9XLS/BnR
AjEAkfcwkz8QRitxpNA7RJvAKQIFskF3UfN5Wp6OFKBOQtJbgfM0agPnIjhQW+0ZT0MW
-----END CERTIFICATE-----

DigiCert TLS ECC P384 Root G5
=============================
-----BEGIN CERTIFICATE-----
MIICGTCCAZ+gAwIBAgIQCeCTZaz32ci5PhwLBCou8zAKBggqhkjOPQQDAzBOMQswCQYDVQQGEwJV
UzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJjAkBgNVBAMTHURpZ2lDZXJ0IFRMUyBFQ0MgUDM4
NCBSb290IEc1MB4XDTIxMDExNTAwMDAwMFoXDTQ2MDExNDIzNTk1OVowTjELMAkGA1UEBhMCVVMx
FzAVBgNVBAoTDkRpZ2lDZXJ0LCBJbmMuMSYwJAYDVQQDEx1EaWdpQ2VydCBUTFMgRUNDIFAzODQg
Um9vdCBHNTB2MBAGByqGSM49AgEGBSuBBAAiA2IABMFEoc8Rl1Ca3iOCNQfN0MsYndLxf3c1Tzvd
lHJS7cI7+Oz6e2tYIOyZrsn8aLN1udsJ7MgT9U7GCh1mMEy7H0cKPGEQQil8pQgO4CLp0zVozptj
n4S1mU1YoI71VOeVyaNCMEAwHQYDVR0OBBYEFMFRRVBZqz7nLFr6ICISB4CIfBFqMA4GA1UdDwEB
/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MAoGCCqGSM49BAMDA2gAMGUCMQCJao1H5+z8blUD2Wds
Jk6Dxv3J+ysTvLd6jLRl0mlpYxNjOyZQLgGheQaRnUi/wr4CMEfDFXuxoJGZSZOoPHzoRgaLLPIx
AJSdYsiJvRmEFOml+wG4DXZDjC5Ty3zfDBeWUA==
-----END CERTIFICATE-----

DigiCert TLS RSA4096 Root G5
============================
-----BEGIN CERTIFICATE-----
MIIFZjCCA06gAwIBAgIQCPm0eKj6ftpqMzeJ3nzPijANBgkqhkiG9w0BAQwFADBNMQswCQYDVQQG
EwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJTAjBgNVBAMTHERpZ2lDZXJ0IFRMUyBSU0E0
MDk2IFJvb3QgRzUwHhcNMjEwMTE1MDAwMDAwWhcNNDYwMTE0MjM1OTU5WjBNMQswCQYDVQQGEwJV
UzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJTAjBgNVBAMTHERpZ2lDZXJ0IFRMUyBSU0E0MDk2
IFJvb3QgRzUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCz0PTJeRGd/fxmgefM1eS8
7IE+ajWOLrfn3q/5B03PMJ3qCQuZvWxX2hhKuHisOjmopkisLnLlvevxGs3npAOpPxG02C+JFvuU
AT27L/gTBaF4HI4o4EXgg/RZG5Wzrn4DReW+wkL+7vI8toUTmDKdFqgpwgscONyfMXdcvyej/Ces
tyu9dJsXLfKB2l2w4SMXPohKEiPQ6s+d3gMXsUJKoBZMpG2T6T867jp8nVid9E6P/DsjyG244gXa
zOvswzH016cpVIDPRFtMbzCe88zdH5RDnU1/cHAN1DrRN/BsnZvAFJNY781BOHW8EwOVfH/jXOnV
DdXifBBiqmvwPXbzP6PosMH976pXTayGpxi0KcEsDr9kvimM2AItzVwv8n/vFfQMFawKsPHTDU9q
TXeXAaDxZre3zu/O7Oyldcqs4+Fj97ihBMi8ez9dLRYiVu1ISf6nL3kwJZu6ay0/nTvEF+cdLvvy
z6b84xQslpghjLSR6Rlgg/IwKwZzUNWYOwbpx4oMYIwo+FKbbuH2TbsGJJvXKyY//SovcfXWJL5/
MZ4PbeiPT02jP/816t9JXkGPhvnxd3lLG7SjXi/7RgLQZhNeXoVPzthwiHvOAbWWl9fNff2C+MIk
wcoBOU+NosEUQB+cZtUMCUbW8tDRSHZWOkPLtgoRObqME2wGtZ7P6wIDAQABo0IwQDAdBgNVHQ4E
FgQUUTMc7TZArxfTJc1paPKvTiM+s0EwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8w
DQYJKoZIhvcNAQEMBQADggIBAGCmr1tfV9qJ20tQqcQjNSH/0GEwhJG3PxDPJY7Jv0Y02cEhJhxw
GXIeo8mH/qlDZJY6yFMECrZBu8RHANmfGBg7sg7zNOok992vIGCukihfNudd5N7HPNtQOa27PShN
lnx2xlv0wdsUpasZYgcYQF+Xkdycx6u1UQ3maVNVzDl92sURVXLFO4uJ+DQtpBflF+aZfTCIITfN
MBc9uPK8qHWgQ9w+iUuQrm0D4ByjoJYJu32jtyoQREtGBzRj7TG5BO6jm5qu5jF49OokYTurWGT/
u4cnYiWB39yhL/btp/96j1EuMPikAdKFOV8BmZZvWltwGUb+hmA+rYAQCd05JS9Yf7vSdPD3Rh9G
OUrYU9DzLjtxpdRv/PNn5AeP3SYZ4Y1b+qOTEZvpyDrDVWiakuFSdjjo4bq9+0/V77PnSIMx8IIh
47a+p6tv75/fTM8BuGJqIz3nCU2AG3swpMPdB380vqQmsvZB6Akd4yCYqjdP//fx4ilwMUc/dNAU
FvohigLVigmUdy7yWSiLfFCSCmZ4OIN1xLVaqBHG5cGdZlXPU8Sv13WFqUITVuwhd4GTWgzqltlJ
yqEI8pc7bZsEGCREjnwB8twl2F6GmrE52/WRMmrRpnCKovfepEWFJqgejF0pW8hL2JpqA15w8oVP
bEtoL8pU9ozaMv7Da4M/OMZ+
-----END CERTIFICATE-----

Certainly Root R1
=================
-----BEGIN CERTIFICATE-----
MIIFRzCCAy+gAwIBAgIRAI4P+UuQcWhlM1T01EQ5t+AwDQYJKoZIhvcNAQELBQAwPTELMAkGA1UE
BhMCVVMxEjAQBgNVBAoTCUNlcnRhaW5seTEaMBgGA1UEAxMRQ2VydGFpbmx5IFJvb3QgUjEwHhcN
MjEwNDAxMDAwMDAwWhcNNDYwNDAxMDAwMDAwWjA9MQswCQYDVQQGEwJVUzESMBAGA1UEChMJQ2Vy
dGFpbmx5MRowGAYDVQQDExFDZXJ0YWlubHkgUm9vdCBSMTCCAiIwDQYJKoZIhvcNAQEBBQADggIP
ADCCAgoCggIBANA21B/q3avk0bbm+yLA3RMNansiExyXPGhjZjKcA7WNpIGD2ngwEc/csiu+kr+O
5MQTvqRoTNoCaBZ0vrLdBORrKt03H2As2/X3oXyVtwxwhi7xOu9S98zTm/mLvg7fMbedaFySpvXl
8wo0tf97ouSHocavFwDvA5HtqRxOcT3Si2yJ9HiG5mpJoM610rCrm/b01C7jcvk2xusVtyWMOvwl
DbMicyF0yEqWYZL1LwsYpfSt4u5BvQF5+paMjRcCMLT5r3gajLQ2EBAHBXDQ9DGQilHFhiZ5shGI
XsXwClTNSaa/ApzSRKft43jvRl5tcdF5cBxGX1HpyTfcX35pe0HfNEXgO4T0oYoKNp43zGJS4YkN
KPl6I7ENPT2a/Z2B7yyQwHtETrtJ4A5KVpK8y7XdeReJkd5hiXSSqOMyhb5OhaRLWcsrxXiOcVTQ
AjeZjOVJ6uBUcqQRBi8LjMFbvrWhsFNunLhgkR9Za/kt9JQKl7XsxXYDVBtlUrpMklZRNaBA2Cnb
rlJ2Oy0wQJuK0EJWtLeIAaSHO1OWzaMWj/Nmqhexx2DgwUMFDO6bW2BvBlyHWyf5QBGenDPBt+U1
VwV/J84XIIwc/PH72jEpSe31C4SnT8H2TsIonPru4K8H+zMReiFPCyEQtkA6qyI6BJyLm4SGcprS
p6XEtHWRqSsjAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1Ud
DgQWBBTgqj8ljZ9EXME66C6ud0yEPmcM9DANBgkqhkiG9w0BAQsFAAOCAgEAuVevuBLaV4OPaAsz
HQNTVfSVcOQrPbA56/qJYv331hgELyE03fFo8NWWWt7CgKPBjcZq91l3rhVkz1t5BXdm6ozTaw3d
8VkswTOlMIAVRQdFGjEitpIAq5lNOo93r6kiyi9jyhXWx8bwPWz8HA2YEGGeEaIi1wrykXprOQ4v
MMM2SZ/g6Q8CRFA3lFV96p/2O7qUpUzpvD5RtOjKkjZUbVwlKNrdrRT90+7iIgXr0PK3aBLXWopB
GsaSpVo7Y0VPv+E6dyIvXL9G+VoDhRNCX8reU9ditaY1BMJH/5n9hN9czulegChB8n3nHpDYT3Y+
gjwN/KUD+nsa2UUeYNrEjvn8K8l7lcUq/6qJ34IxD3L/DCfXCh5WAFAeDJDBlrXYFIW7pw0WwfgH
JBu6haEaBQmAupVjyTrsJZ9/nbqkRxWbRHDxakvWOF5D8xh+UG7pWijmZeZ3Gzr9Hb4DJqPb1OG7
fpYnKx3upPvaJVQTA945xsMfTZDsjxtK0hzthZU4UHlG1sGQUDGpXJpuHfUzVounmdLyyCwzk5Iw
x06MZTMQZBf9JBeW0Y3COmor6xOLRPIh80oat3df1+2IpHLlOR+Vnb5nwXARPbv0+Em34yaXOp/S
X3z7wJl8OSngex2/DaeP0ik0biQVy96QXr8axGbqwua6OV+KmalBWQewLK8=
-----END CERTIFICATE-----

Certainly Root E1
=================
-----BEGIN CERTIFICATE-----
MIIB9zCCAX2gAwIBAgIQBiUzsUcDMydc+Y2aub/M+DAKBggqhkjOPQQDAzA9MQswCQYDVQQGEwJV
UzESMBAGA1UEChMJQ2VydGFpbmx5MRowGAYDVQQDExFDZXJ0YWlubHkgUm9vdCBFMTAeFw0yMTA0
MDEwMDAwMDBaFw00NjA0MDEwMDAwMDBaMD0xCzAJBgNVBAYTAlVTMRIwEAYDVQQKEwlDZXJ0YWlu
bHkxGjAYBgNVBAMTEUNlcnRhaW5seSBSb290IEUxMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE3m/4
fxzf7flHh4axpMCK+IKXgOqPyEpeKn2IaKcBYhSRJHpcnqMXfYqGITQYUBsQ3tA3SybHGWCA6TS9
YBk2QNYphwk8kXr2vBMj3VlOBF7PyAIcGFPBMdjaIOlEjeR2o0IwQDAOBgNVHQ8BAf8EBAMCAQYw
DwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU8ygYy2R17ikq6+2uI1g4hevIIgcwCgYIKoZIzj0E
AwMDaAAwZQIxALGOWiDDshliTd6wT99u0nCK8Z9+aozmut6Dacpps6kFtZaSF4fC0urQe87YQVt8
rgIwRt7qy12a7DLCZRawTDBcMPPaTnOGBtjOiQRINzf43TNRnXCve1XYAS59BWQOhriR
-----END CERTIFICATE-----

E-Tugra Global Root CA RSA v3
=============================
-----BEGIN CERTIFICATE-----
MIIF8zCCA9ugAwIBAgIUDU3FzRYilZYIfrgLfxUGNPt5EDQwDQYJKoZIhvcNAQELBQAwgYAxCzAJ
BgNVBAYTAlRSMQ8wDQYDVQQHEwZBbmthcmExGTAXBgNVBAoTEEUtVHVncmEgRUJHIEEuUy4xHTAb
BgNVBAsTFEUtVHVncmEgVHJ1c3QgQ2VudGVyMSYwJAYDVQQDEx1FLVR1Z3JhIEdsb2JhbCBSb290
IENBIFJTQSB2MzAeFw0yMDAzMTgwOTA3MTdaFw00NTAzMTIwOTA3MTdaMIGAMQswCQYDVQQGEwJU
UjEPMA0GA1UEBxMGQW5rYXJhMRkwFwYDVQQKExBFLVR1Z3JhIEVCRyBBLlMuMR0wGwYDVQQLExRF
LVR1Z3JhIFRydXN0IENlbnRlcjEmMCQGA1UEAxMdRS1UdWdyYSBHbG9iYWwgUm9vdCBDQSBSU0Eg
djMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCiZvCJt3J77gnJY9LTQ91ew6aEOErx
jYG7FL1H6EAX8z3DeEVypi6Q3po61CBxyryfHUuXCscxuj7X/iWpKo429NEvx7epXTPcMHD4QGxL
sqYxYdE0PD0xesevxKenhOGXpOhL9hd87jwH7eKKV9y2+/hDJVDqJ4GohryPUkqWOmAalrv9c/SF
/YP9f4RtNGx/ardLAQO/rWm31zLZ9Vdq6YaCPqVmMbMWPcLzJmAy01IesGykNz709a/r4d+ABs8q
QedmCeFLl+d3vSFtKbZnwy1+7dZ5ZdHPOrbRsV5WYVB6Ws5OUDGAA5hH5+QYfERaxqSzO8bGwzrw
bMOLyKSRBfP12baqBqG3q+Sx6iEUXIOk/P+2UNOMEiaZdnDpwA+mdPy70Bt4znKS4iicvObpCdg6
04nmvi533wEKb5b25Y08TVJ2Glbhc34XrD2tbKNSEhhw5oBOM/J+JjKsBY04pOZ2PJ8QaQ5tndLB
eSBrW88zjdGUdjXnXVXHt6woq0bM5zshtQoK5EpZ3IE1S0SVEgpnpaH/WwAH0sDM+T/8nzPyAPiM
bIedBi3x7+PmBvrFZhNb/FAHnnGGstpvdDDPk1Po3CLW3iAfYY2jLqN4MpBs3KwytQXk9TwzDdbg
h3cXTJ2w2AmoDVf3RIXwyAS+XF1a4xeOVGNpf0l0ZAWMowIDAQABo2MwYTAPBgNVHRMBAf8EBTAD
AQH/MB8GA1UdIwQYMBaAFLK0ruYt9ybVqnUtdkvAG1Mh0EjvMB0GA1UdDgQWBBSytK7mLfcm1ap1
LXZLwBtTIdBI7zAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQELBQADggIBAImocn+M684uGMQQ
gC0QDP/7FM0E4BQ8Tpr7nym/Ip5XuYJzEmMmtcyQ6dIqKe6cLcwsmb5FJ+Sxce3kOJUxQfJ9emN4
38o2Fi+CiJ+8EUdPdk3ILY7r3y18Tjvarvbj2l0Upq7ohUSdBm6O++96SmotKygY/r+QLHUWnw/q
ln0F7psTpURs+APQ3SPh/QMSEgj0GDSz4DcLdxEBSL9htLX4GdnLTeqjjO/98Aa1bZL0SmFQhO3s
SdPkvmjmLuMxC1QLGpLWgti2omU8ZgT5Vdps+9u1FGZNlIM7zR6mK7L+d0CGq+ffCsn99t2HVhjY
sCxVYJb6CH5SkPVLpi6HfMsg2wY+oF0Dd32iPBMbKaITVaA9FCKvb7jQmhty3QUBjYZgv6Rn7rWl
DdF/5horYmbDB7rnoEgcOMPpRfunf/ztAmgayncSd6YAVSgU7NbHEqIbZULpkejLPoeJVF3Zr52X
nGnnCv8PWniLYypMfUeUP95L6VPQMPHF9p5J3zugkaOj/s1YzOrfr28oO6Bpm4/srK4rVJ2bBLFH
IK+WEj5jlB0E5y67hscMmoi/dkfv97ALl2bSRM9gUgfh1SxKOidhd8rXj+eHDjD/DLsE4mHDosiX
YY60MGo8bcIHX0pzLz/5FooBZu+6kcpSV3uu1OYP3Qt6f4ueJiDPO++BcYNZ
-----END CERTIFICATE-----

E-Tugra Global Root CA ECC v3
=============================
-----BEGIN CERTIFICATE-----
MIICpTCCAiqgAwIBAgIUJkYZdzHhT28oNt45UYbm1JeIIsEwCgYIKoZIzj0EAwMwgYAxCzAJBgNV
BAYTAlRSMQ8wDQYDVQQHEwZBbmthcmExGTAXBgNVBAoTEEUtVHVncmEgRUJHIEEuUy4xHTAbBgNV
BAsTFEUtVHVncmEgVHJ1c3QgQ2VudGVyMSYwJAYDVQQDEx1FLVR1Z3JhIEdsb2JhbCBSb290IENB
IEVDQyB2MzAeFw0yMDAzMTgwOTQ2NThaFw00NTAzMTIwOTQ2NThaMIGAMQswCQYDVQQGEwJUUjEP
MA0GA1UEBxMGQW5rYXJhMRkwFwYDVQQKExBFLVR1Z3JhIEVCRyBBLlMuMR0wGwYDVQQLExRFLVR1
Z3JhIFRydXN0IENlbnRlcjEmMCQGA1UEAxMdRS1UdWdyYSBHbG9iYWwgUm9vdCBDQSBFQ0MgdjMw
djAQBgcqhkjOPQIBBgUrgQQAIgNiAASOmCm/xxAeJ9urA8woLNheSBkQKczLWYHMjLiSF4mDKpL2
w6QdTGLVn9agRtwcvHbB40fQWxPa56WzZkjnIZpKT4YKfWzqTTKACrJ6CZtpS5iB4i7sAnCWH/31
Rs7K3IKjYzBhMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAU/4Ixcj75xGZsrTie0bBRiKWQ
zPUwHQYDVR0OBBYEFP+CMXI++cRmbK04ntGwUYilkMz1MA4GA1UdDwEB/wQEAwIBBjAKBggqhkjO
PQQDAwNpADBmAjEA5gVYaWHlLcoNy/EZCL3W/VGSGn5jVASQkZo1kTmZ+gepZpO6yGjUij/67W4W
Aie3AjEA3VoXK3YdZUKWpqxdinlW2Iob35reX8dQj7FbcQwm32pAAOwzkSFxvmjkI6TZraE3
-----END CERTIFICATE-----

Security Communication RootCA3
==============================
-----BEGIN CERTIFICATE-----
MIIFfzCCA2egAwIBAgIJAOF8N0D9G/5nMA0GCSqGSIb3DQEBDAUAMF0xCzAJBgNVBAYTAkpQMSUw
IwYDVQQKExxTRUNPTSBUcnVzdCBTeXN0ZW1zIENPLixMVEQuMScwJQYDVQQDEx5TZWN1cml0eSBD
b21tdW5pY2F0aW9uIFJvb3RDQTMwHhcNMTYwNjE2MDYxNzE2WhcNMzgwMTE4MDYxNzE2WjBdMQsw
CQYDVQQGEwJKUDElMCMGA1UEChMcU0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UE
AxMeU2VjdXJpdHkgQ29tbXVuaWNhdGlvbiBSb290Q0EzMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
MIICCgKCAgEA48lySfcw3gl8qUCBWNO0Ot26YQ+TUG5pPDXC7ltzkBtnTCHsXzW7OT4rCmDvu20r
hvtxosis5FaU+cmvsXLUIKx00rgVrVH+hXShuRD+BYD5UpOzQD11EKzAlrenfna84xtSGc4RHwsE
NPXY9Wk8d/Nk9A2qhd7gCVAEF5aEt8iKvE1y/By7z/MGTfmfZPd+pmaGNXHIEYBMwXFAWB6+oHP2
/D5Q4eAvJj1+XCO1eXDe+uDRpdYMQXF79+qMHIjH7Iv10S9VlkZ8WjtYO/u62C21Jdp6Ts9EriGm
npjKIG58u4iFW/vAEGK78vknR+/RiTlDxN/e4UG/VHMgly1s2vPUB6PmudhvrvyMGS7TZ2crldtY
XLVqAvO4g160a75BflcJdURQVc1aEWEhCmHCqYj9E7wtiS/NYeCVvsq1e+F7NGcLH7YMx3weGVPK
p7FKFSBWFHA9K4IsD50VHUeAR/94mQ4xr28+j+2GaR57GIgUssL8gjMunEst+3A7caoreyYn8xrC
3PsXuKHqy6C0rtOUfnrQq8PsOC0RLoi/1D+tEjtCrI8Cbn3M0V9hvqG8OmpI6iZVIhZdXw3/JzOf
GAN0iltSIEdrRU0id4xVJ/CvHozJgyJUt5rQT9nO/NkuHJYosQLTA70lUhw0Zk8jq/R3gpYd0Vcw
CBEF/VfR2ccCAwEAAaNCMEAwHQYDVR0OBBYEFGQUfPxYchamCik0FW8qy7z8r6irMA4GA1UdDwEB
/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBDAUAA4ICAQDcAiMI4u8hOscNtybS
YpOnpSNyByCCYN8Y11StaSWSntkUz5m5UoHPrmyKO1o5yGwBQ8IibQLwYs1OY0PAFNr0Y/Dq9HHu
Tofjcan0yVflLl8cebsjqodEV+m9NU1Bu0soo5iyG9kLFwfl9+qd9XbXv8S2gVj/yP9kaWJ5rW4O
H3/uHWnlt3Jxs/6lATWUVCvAUm2PVcTJ0rjLyjQIUYWg9by0F1jqClx6vWPGOi//lkkZhOpn2ASx
YfQAW0q3nHE3GYV5v4GwxxMOdnE+OoAGrgYWp421wsTL/0ClXI2lyTrtcoHKXJg80jQDdwj98ClZ
XSEIx2C/pHF7uNkegr4Jr2VvKKu/S7XuPghHJ6APbw+LP6yVGPO5DtxnVW5inkYO0QR4ynKudtml
+LLfiAlhi+8kTtFZP1rUPcmTPCtk9YENFpb3ksP+MW/oKjJ0DvRMmEoYDjBU1cXrvMUVnuiZIesn
KwkK2/HmcBhWuwzkvvnoEKQTkrgc4NtnHVMDpCKn3F2SEDzq//wbEBrD2NCcnWXL0CsnMQMeNuE9
dnUM/0Umud1RvCPHX9jYhxBAEg09ODfnRDwYwFMJZI//1ZqmfHAuc1Uh6N//g7kdPjIe1qZ9LPFm
6Vwdp6POXiUyK+OVrCoHzrQoeIY8LaadTdJ0MN1kURXbg4NR16/9M51NZg==
-----END CERTIFICATE-----

Security Communication ECC RootCA1
==================================
-----BEGIN CERTIFICATE-----
MIICODCCAb6gAwIBAgIJANZdm7N4gS7rMAoGCCqGSM49BAMDMGExCzAJBgNVBAYTAkpQMSUwIwYD
VQQKExxTRUNPTSBUcnVzdCBTeXN0ZW1zIENPLixMVEQuMSswKQYDVQQDEyJTZWN1cml0eSBDb21t
dW5pY2F0aW9uIEVDQyBSb290Q0ExMB4XDTE2MDYxNjA1MTUyOFoXDTM4MDExODA1MTUyOFowYTEL
MAkGA1UEBhMCSlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xKzApBgNV
BAMTIlNlY3VyaXR5IENvbW11bmljYXRpb24gRUNDIFJvb3RDQTEwdjAQBgcqhkjOPQIBBgUrgQQA
IgNiAASkpW9gAwPDvTH00xecK4R1rOX9PVdu12O/5gSJko6BnOPpR27KkBLIE+CnnfdldB9sELLo
5OnvbYUymUSxXv3MdhDYW72ixvnWQuRXdtyQwjWpS4g8EkdtXP9JTxpKULGjQjBAMB0GA1UdDgQW
BBSGHOf+LaVKiwj+KBH6vqNm+GBZLzAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAK
BggqhkjOPQQDAwNoADBlAjAVXUI9/Lbu9zuxNuie9sRGKEkz0FhDKmMpzE2xtHqiuQ04pV1IKv3L
snNdo4gIxwwCMQDAqy0Obe0YottT6SXbVQjgUMzfRGEWgqtJsLKB7HOHeLRMsmIbEvoWTSVLY70e
N9k=
-----END CERTIFICATE-----
Copyright (C) 2016 Composer

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
<?php

// autoload_real.php @generated by Composer

class ComposerAutoloaderInit0fc888f20645a0056333807f0fcc1038
{
    private static $loader;

    public static function loadClassLoader($class)
    {
        if ('Composer\Autoload\ClassLoader' === $class) {
            require __DIR__ . '/ClassLoader.php';
        }
    }

    /**
     * @return \Composer\Autoload\ClassLoader
     */
    public static function getLoader()
    {
        if (null !== self::$loader) {
            return self::$loader;
        }

        spl_autoload_register(array('ComposerAutoloaderInit0fc888f20645a0056333807f0fcc1038', 'loadClassLoader'), true, true);
        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
        spl_autoload_unregister(array('ComposerAutoloaderInit0fc888f20645a0056333807f0fcc1038', 'loadClassLoader'));

        require __DIR__ . '/autoload_static.php';
        call_user_func(\Composer\Autoload\ComposerStaticInit0fc888f20645a0056333807f0fcc1038::getInitializer($loader));

        $loader->setClassMapAuthoritative(true);
        $loader->register(true);

        $filesToLoad = \Composer\Autoload\ComposerStaticInit0fc888f20645a0056333807f0fcc1038::$files;
        $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
            if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
                $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

                require $file;
            }
        }, null, null);
        foreach ($filesToLoad as $fileIdentifier => $file) {
            $requireFile($fileIdentifier, $file);
        }

        return $loader;
    }
}
<?php return array(
    'root' => array(
        'name' => 'phpstan/phpstan-src',
        'pretty_version' => '1.10.18',
        'version' => '1.10.18.0',
        'reference' => 'dcc7b7cffe621c59fd501b9bf62617022e1548d1',
        'type' => 'library',
        'install_path' => __DIR__ . '/../../',
        'aliases' => array(),
        'dev' => true,
    ),
    'versions' => array(
        'brianium/paratest' => array(
            'pretty_version' => 'v6.6.3',
            'version' => '6.6.3.0',
            'reference' => 'f2d781bb9136cda2f5e73ee778049e80ba681cf6',
            'type' => 'library',
            'install_path' => __DIR__ . '/../brianium/paratest',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'clue/ndjson-react' => array(
            'pretty_version' => 'v1.3.0',
            'version' => '1.3.0.0',
            'reference' => '392dc165fce93b5bb5c637b67e59619223c931b0',
            'type' => 'library',
            'install_path' => __DIR__ . '/../clue/ndjson-react',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'composer/ca-bundle' => array(
            'pretty_version' => '1.3.5',
            'version' => '1.3.5.0',
            'reference' => '74780ccf8c19d6acb8d65c5f39cd72110e132bbd',
            'type' => 'library',
            'install_path' => __DIR__ . '/./ca-bundle',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'composer/pcre' => array(
            'pretty_version' => '3.1.0',
            'version' => '3.1.0.0',
            'reference' => '4bff79ddd77851fe3cdd11616ed3f92841ba5bd2',
            'type' => 'library',
            'install_path' => __DIR__ . '/./pcre',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'composer/xdebug-handler' => array(
            'pretty_version' => '3.0.3',
            'version' => '3.0.3.0',
            'reference' => 'ced299686f41dce890debac69273b47ffe98a40c',
            'type' => 'library',
            'install_path' => __DIR__ . '/./xdebug-handler',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'cweagans/composer-patches' => array(
            'pretty_version' => '1.7.3',
            'version' => '1.7.3.0',
            'reference' => 'e190d4466fe2b103a55467dfa83fc2fecfcaf2db',
            'type' => 'composer-plugin',
            'install_path' => __DIR__ . '/../cweagans/composer-patches',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'doctrine/instantiator' => array(
            'pretty_version' => '1.4.1',
            'version' => '1.4.1.0',
            'reference' => '10dcfce151b967d20fde1b34ae6640712c3891bc',
            'type' => 'library',
            'install_path' => __DIR__ . '/../doctrine/instantiator',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'evenement/evenement' => array(
            'pretty_version' => 'v3.0.1',
            'version' => '3.0.1.0',
            'reference' => '531bfb9d15f8aa57454f5f0285b18bec903b8fb7',
            'type' => 'library',
            'install_path' => __DIR__ . '/../evenement/evenement',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'fidry/cpu-core-counter' => array(
            'pretty_version' => '0.5.1',
            'version' => '0.5.1.0',
            'reference' => 'b58e5a3933e541dc286cc91fc4f3898bbc6f1623',
            'type' => 'library',
            'install_path' => __DIR__ . '/../fidry/cpu-core-counter',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'fig/http-message-util' => array(
            'pretty_version' => '1.1.5',
            'version' => '1.1.5.0',
            'reference' => '9d94dc0154230ac39e5bf89398b324a86f63f765',
            'type' => 'library',
            'install_path' => __DIR__ . '/../fig/http-message-util',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'grogy/php-parallel-lint' => array(
            'dev_requirement' => true,
            'replaced' => array(
                0 => '*',
            ),
        ),
        'hoa/compiler' => array(
            'pretty_version' => '3.17.08.08',
            'version' => '3.17.08.08',
            'reference' => 'aa09caf0bf28adae6654ca6ee415ee2f522672de',
            'type' => 'library',
            'install_path' => __DIR__ . '/../hoa/compiler',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'hoa/consistency' => array(
            'pretty_version' => '1.17.05.02',
            'version' => '1.17.05.02',
            'reference' => 'fd7d0adc82410507f332516faf655b6ed22e4c2f',
            'type' => 'library',
            'install_path' => __DIR__ . '/../hoa/consistency',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'hoa/event' => array(
            'pretty_version' => '1.17.01.13',
            'version' => '1.17.01.13',
            'reference' => '6c0060dced212ffa3af0e34bb46624f990b29c54',
            'type' => 'library',
            'install_path' => __DIR__ . '/../hoa/event',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'hoa/exception' => array(
            'pretty_version' => '1.17.01.16',
            'version' => '1.17.01.16',
            'reference' => '091727d46420a3d7468ef0595651488bfc3a458f',
            'type' => 'library',
            'install_path' => __DIR__ . '/../hoa/exception',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'hoa/file' => array(
            'pretty_version' => '1.17.07.11',
            'version' => '1.17.07.11',
            'reference' => '35cb979b779bc54918d2f9a4e02ed6c7a1fa67ca',
            'type' => 'library',
            'install_path' => __DIR__ . '/../hoa/file',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'hoa/iterator' => array(
            'pretty_version' => '2.17.01.10',
            'version' => '2.17.01.10',
            'reference' => 'd1120ba09cb4ccd049c86d10058ab94af245f0cc',
            'type' => 'library',
            'install_path' => __DIR__ . '/../hoa/iterator',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'hoa/math' => array(
            'pretty_version' => '1.17.05.16',
            'version' => '1.17.05.16',
            'reference' => '7150785d30f5d565704912116a462e9f5bc83a0c',
            'type' => 'library',
            'install_path' => __DIR__ . '/../hoa/math',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'hoa/protocol' => array(
            'pretty_version' => '1.17.01.14',
            'version' => '1.17.01.14',
            'reference' => '5c2cf972151c45f373230da170ea015deecf19e2',
            'type' => 'library',
            'install_path' => __DIR__ . '/../hoa/protocol',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'hoa/regex' => array(
            'pretty_version' => '1.17.01.13',
            'version' => '1.17.01.13',
            'reference' => '7e263a61b6fb45c1d03d8e5ef77668518abd5bec',
            'type' => 'library',
            'install_path' => __DIR__ . '/../hoa/regex',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'hoa/stream' => array(
            'pretty_version' => '1.17.02.21',
            'version' => '1.17.02.21',
            'reference' => '3293cfffca2de10525df51436adf88a559151d82',
            'type' => 'library',
            'install_path' => __DIR__ . '/../hoa/stream',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'hoa/ustring' => array(
            'pretty_version' => '4.17.01.16',
            'version' => '4.17.01.16',
            'reference' => 'e6326e2739178799b1fe3fdd92029f9517fa17a0',
            'type' => 'library',
            'install_path' => __DIR__ . '/../hoa/ustring',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'hoa/visitor' => array(
            'pretty_version' => '2.17.01.16',
            'version' => '2.17.01.16',
            'reference' => 'c18fe1cbac98ae449e0d56e87469103ba08f224a',
            'type' => 'library',
            'install_path' => __DIR__ . '/../hoa/visitor',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'hoa/zformat' => array(
            'pretty_version' => '1.17.01.10',
            'version' => '1.17.01.10',
            'reference' => '522c381a2a075d4b9dbb42eb4592dd09520e4ac2',
            'type' => 'library',
            'install_path' => __DIR__ . '/../hoa/zformat',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'jakub-onderka/php-parallel-lint' => array(
            'dev_requirement' => true,
            'replaced' => array(
                0 => '*',
            ),
        ),
        'jean85/pretty-package-versions' => array(
            'pretty_version' => '2.0.5',
            'version' => '2.0.5.0',
            'reference' => 'ae547e455a3d8babd07b96966b17d7fd21d9c6af',
            'type' => 'library',
            'install_path' => __DIR__ . '/../jean85/pretty-package-versions',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'jetbrains/phpstorm-stubs' => array(
            'pretty_version' => 'dev-master',
            'version' => 'dev-master',
            'reference' => '077d371b23d38d7f6f039994bfb03732d7965fbc',
            'type' => 'library',
            'install_path' => __DIR__ . '/../jetbrains/phpstorm-stubs',
            'aliases' => array(
                0 => '9999999-dev',
            ),
            'dev_requirement' => false,
        ),
        'myclabs/deep-copy' => array(
            'pretty_version' => '1.11.0',
            'version' => '1.11.0.0',
            'reference' => '14daed4296fae74d9e3201d2c4925d1acb7aa614',
            'type' => 'library',
            'install_path' => __DIR__ . '/../myclabs/deep-copy',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'nette/bootstrap' => array(
            'pretty_version' => 'v3.1.4',
            'version' => '3.1.4.0',
            'reference' => '1a7965b4ee401ad0e3f673b9c016d2481afdc280',
            'type' => 'library',
            'install_path' => __DIR__ . '/../nette/bootstrap',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'nette/di' => array(
            'pretty_version' => 'v3.0.11',
            'version' => '3.0.11.0',
            'reference' => '942e406f63b88b57cb4e095ae0fd95c103d12c5b',
            'type' => 'library',
            'install_path' => __DIR__ . '/../nette/di',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'nette/finder' => array(
            'pretty_version' => 'v2.6.0',
            'version' => '2.6.0.0',
            'reference' => '991aefb42860abeab8e003970c3809a9d83cb932',
            'type' => 'library',
            'install_path' => __DIR__ . '/../nette/finder',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'nette/neon' => array(
            'pretty_version' => 'v3.3.2',
            'version' => '3.3.2.0',
            'reference' => '54b287d8c2cdbe577b02e28ca1713e275b05ece2',
            'type' => 'library',
            'install_path' => __DIR__ . '/../nette/neon',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'nette/php-generator' => array(
            'pretty_version' => 'v3.6.5',
            'version' => '3.6.5.0',
            'reference' => '9370403f9d9c25b51c4596ded1fbfe70347f7c82',
            'type' => 'library',
            'install_path' => __DIR__ . '/../nette/php-generator',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'nette/robot-loader' => array(
            'pretty_version' => 'v3.4.1',
            'version' => '3.4.1.0',
            'reference' => 'e2adc334cb958164c050f485d99c44c430f51fe2',
            'type' => 'library',
            'install_path' => __DIR__ . '/../nette/robot-loader',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'nette/schema' => array(
            'pretty_version' => 'v1.2.3',
            'version' => '1.2.3.0',
            'reference' => 'abbdbb70e0245d5f3bf77874cea1dfb0c930d06f',
            'type' => 'library',
            'install_path' => __DIR__ . '/../nette/schema',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'nette/utils' => array(
            'pretty_version' => 'v3.2.7',
            'version' => '3.2.7.0',
            'reference' => '0af4e3de4df9f1543534beab255ccf459e7a2c99',
            'type' => 'library',
            'install_path' => __DIR__ . '/../nette/utils',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'nikic/php-parser' => array(
            'pretty_version' => 'v4.15.4',
            'version' => '4.15.4.0',
            'reference' => '6bb5176bc4af8bcb7d926f88718db9b96a2d4290',
            'type' => 'library',
            'install_path' => __DIR__ . '/../nikic/php-parser',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'ondram/ci-detector' => array(
            'pretty_version' => '3.5.1',
            'version' => '3.5.1.0',
            'reference' => '594e61252843b68998bddd48078c5058fe9028bd',
            'type' => 'library',
            'install_path' => __DIR__ . '/../ondram/ci-detector',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'ondrejmirtes/better-reflection' => array(
            'pretty_version' => '6.8.0.1',
            'version' => '6.8.0.1',
            'reference' => '80955a36bd344a112bde564085652246f14a95e2',
            'type' => 'library',
            'install_path' => __DIR__ . '/../ondrejmirtes/better-reflection',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'phar-io/manifest' => array(
            'pretty_version' => '2.0.3',
            'version' => '2.0.3.0',
            'reference' => '97803eca37d319dfa7826cc2437fc020857acb53',
            'type' => 'library',
            'install_path' => __DIR__ . '/../phar-io/manifest',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'phar-io/version' => array(
            'pretty_version' => '3.2.1',
            'version' => '3.2.1.0',
            'reference' => '4f7fd7836c6f332bb2933569e566a0d6c4cbed74',
            'type' => 'library',
            'install_path' => __DIR__ . '/../phar-io/version',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'php-parallel-lint/php-parallel-lint' => array(
            'pretty_version' => 'v1.3.2',
            'version' => '1.3.2.0',
            'reference' => '6483c9832e71973ed29cf71bd6b3f4fde438a9de',
            'type' => 'library',
            'install_path' => __DIR__ . '/../php-parallel-lint/php-parallel-lint',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'phpstan/php-8-stubs' => array(
            'pretty_version' => '0.3.60',
            'version' => '0.3.60.0',
            'reference' => '945d7554e8bc083afb3d13ae4431017aaf786f52',
            'type' => 'library',
            'install_path' => __DIR__ . '/../phpstan/php-8-stubs',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'phpstan/phpdoc-parser' => array(
            'pretty_version' => '1.22.0',
            'version' => '1.22.0.0',
            'reference' => 'ec58baf7b3c7f1c81b3b00617c953249fb8cf30c',
            'type' => 'library',
            'install_path' => __DIR__ . '/../phpstan/phpdoc-parser',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'phpstan/phpstan' => array(
            'dev_requirement' => false,
            'replaced' => array(
                0 => '1.10.18',
            ),
        ),
        'phpstan/phpstan-deprecation-rules' => array(
            'pretty_version' => '1.1.3',
            'version' => '1.1.3.0',
            'reference' => 'a22b36b955a2e9a3d39fe533b6c1bb5359f9c319',
            'type' => 'phpstan-extension',
            'install_path' => __DIR__ . '/../phpstan/phpstan-deprecation-rules',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'phpstan/phpstan-nette' => array(
            'pretty_version' => '1.2.9',
            'version' => '1.2.9.0',
            'reference' => '0e3a6805917811d685e59bb83c2286315f2f6d78',
            'type' => 'phpstan-extension',
            'install_path' => __DIR__ . '/../phpstan/phpstan-nette',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'phpstan/phpstan-php-parser' => array(
            'pretty_version' => '1.1.0',
            'version' => '1.1.0.0',
            'reference' => '1c7670dd92da864b5d019f22d9f512a6ae18b78e',
            'type' => 'phpstan-extension',
            'install_path' => __DIR__ . '/../phpstan/phpstan-php-parser',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'phpstan/phpstan-phpunit' => array(
            'pretty_version' => '1.3.11',
            'version' => '1.3.11.0',
            'reference' => '9e1b9de6d260461f6e99b6a8f2dbb0bbb98b579c',
            'type' => 'phpstan-extension',
            'install_path' => __DIR__ . '/../phpstan/phpstan-phpunit',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'phpstan/phpstan-src' => array(
            'pretty_version' => '1.10.18',
            'version' => '1.10.18.0',
            'reference' => 'dcc7b7cffe621c59fd501b9bf62617022e1548d1',
            'type' => 'library',
            'install_path' => __DIR__ . '/../../',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'phpstan/phpstan-strict-rules' => array(
            'pretty_version' => '1.5.1',
            'version' => '1.5.1.0',
            'reference' => 'b21c03d4f6f3a446e4311155f4be9d65048218e6',
            'type' => 'phpstan-extension',
            'install_path' => __DIR__ . '/../phpstan/phpstan-strict-rules',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'phpunit/php-code-coverage' => array(
            'pretty_version' => '9.2.26',
            'version' => '9.2.26.0',
            'reference' => '443bc6912c9bd5b409254a40f4b0f4ced7c80ea1',
            'type' => 'library',
            'install_path' => __DIR__ . '/../phpunit/php-code-coverage',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'phpunit/php-file-iterator' => array(
            'pretty_version' => '3.0.6',
            'version' => '3.0.6.0',
            'reference' => 'cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf',
            'type' => 'library',
            'install_path' => __DIR__ . '/../phpunit/php-file-iterator',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'phpunit/php-invoker' => array(
            'pretty_version' => '3.1.1',
            'version' => '3.1.1.0',
            'reference' => '5a10147d0aaf65b58940a0b72f71c9ac0423cc67',
            'type' => 'library',
            'install_path' => __DIR__ . '/../phpunit/php-invoker',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'phpunit/php-text-template' => array(
            'pretty_version' => '2.0.4',
            'version' => '2.0.4.0',
            'reference' => '5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28',
            'type' => 'library',
            'install_path' => __DIR__ . '/../phpunit/php-text-template',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'phpunit/php-timer' => array(
            'pretty_version' => '5.0.3',
            'version' => '5.0.3.0',
            'reference' => '5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2',
            'type' => 'library',
            'install_path' => __DIR__ . '/../phpunit/php-timer',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'phpunit/phpunit' => array(
            'pretty_version' => '9.5.23',
            'version' => '9.5.23.0',
            'reference' => '888556852e7e9bbeeedb9656afe46118765ade34',
            'type' => 'library',
            'install_path' => __DIR__ . '/../phpunit/phpunit',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'psr/container' => array(
            'pretty_version' => '1.1.2',
            'version' => '1.1.2.0',
            'reference' => '513e0666f7216c7459170d56df27dfcefe1689ea',
            'type' => 'library',
            'install_path' => __DIR__ . '/../psr/container',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'psr/http-message' => array(
            'pretty_version' => '1.0.1',
            'version' => '1.0.1.0',
            'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363',
            'type' => 'library',
            'install_path' => __DIR__ . '/../psr/http-message',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'psr/http-message-implementation' => array(
            'dev_requirement' => false,
            'provided' => array(
                0 => '1.0',
            ),
        ),
        'psr/log' => array(
            'pretty_version' => '1.1.3',
            'version' => '1.1.3.0',
            'reference' => '0f73288fd15629204f9d42b7055f72dacbe811fc',
            'type' => 'library',
            'install_path' => __DIR__ . '/../psr/log',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'psr/log-implementation' => array(
            'dev_requirement' => false,
            'provided' => array(
                0 => '1.0|2.0',
            ),
        ),
        'react/async' => array(
            'pretty_version' => 'v3.0.0',
            'version' => '3.0.0.0',
            'reference' => '3c3b812be77aec14bf8300b052ba589c9a5bc95b',
            'type' => 'library',
            'install_path' => __DIR__ . '/../react/async',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'react/cache' => array(
            'pretty_version' => 'v1.2.0',
            'version' => '1.2.0.0',
            'reference' => 'd47c472b64aa5608225f47965a484b75c7817d5b',
            'type' => 'library',
            'install_path' => __DIR__ . '/../react/cache',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'react/child-process' => array(
            'pretty_version' => 'v0.6.5',
            'version' => '0.6.5.0',
            'reference' => 'e71eb1aa55f057c7a4a0d08d06b0b0a484bead43',
            'type' => 'library',
            'install_path' => __DIR__ . '/../react/child-process',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'react/dns' => array(
            'pretty_version' => 'v1.10.0',
            'version' => '1.10.0.0',
            'reference' => 'a5427e7dfa47713e438016905605819d101f238c',
            'type' => 'library',
            'install_path' => __DIR__ . '/../react/dns',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'react/event-loop' => array(
            'pretty_version' => 'v1.4.0',
            'version' => '1.4.0.0',
            'reference' => '6e7e587714fff7a83dcc7025aee42ab3b265ae05',
            'type' => 'library',
            'install_path' => __DIR__ . '/../react/event-loop',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'react/http' => array(
            'pretty_version' => 'v1.9.0',
            'version' => '1.9.0.0',
            'reference' => 'bb3154dbaf2dfe3f0467f956a05f614a69d5f1d0',
            'type' => 'library',
            'install_path' => __DIR__ . '/../react/http',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'react/promise' => array(
            'pretty_version' => 'v2.10.0',
            'version' => '2.10.0.0',
            'reference' => 'f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38',
            'type' => 'library',
            'install_path' => __DIR__ . '/../react/promise',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'react/promise-timer' => array(
            'pretty_version' => 'v1.9.0',
            'version' => '1.9.0.0',
            'reference' => 'aa7a73c74b8d8c0f622f5982ff7b0351bc29e495',
            'type' => 'library',
            'install_path' => __DIR__ . '/../react/promise-timer',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'react/socket' => array(
            'pretty_version' => 'v1.12.0',
            'version' => '1.12.0.0',
            'reference' => '81e1b4d7f5450ebd8d2e9a95bb008bb15ca95a7b',
            'type' => 'library',
            'install_path' => __DIR__ . '/../react/socket',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'react/stream' => array(
            'pretty_version' => 'v1.2.0',
            'version' => '1.2.0.0',
            'reference' => '7a423506ee1903e89f1e08ec5f0ed430ff784ae9',
            'type' => 'library',
            'install_path' => __DIR__ . '/../react/stream',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'rector/rector' => array(
            'pretty_version' => '0.15.13',
            'version' => '0.15.13.0',
            'reference' => '05df336f8e29873ed14c0790fbea68fa5de14f50',
            'type' => 'library',
            'install_path' => __DIR__ . '/../rector/rector',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'ringcentral/psr7' => array(
            'pretty_version' => '1.3.0',
            'version' => '1.3.0.0',
            'reference' => '360faaec4b563958b673fb52bbe94e37f14bc686',
            'type' => 'library',
            'install_path' => __DIR__ . '/../ringcentral/psr7',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'sebastian/cli-parser' => array(
            'pretty_version' => '1.0.1',
            'version' => '1.0.1.0',
            'reference' => '442e7c7e687e42adc03470c7b668bc4b2402c0b2',
            'type' => 'library',
            'install_path' => __DIR__ . '/../sebastian/cli-parser',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'sebastian/code-unit' => array(
            'pretty_version' => '1.0.8',
            'version' => '1.0.8.0',
            'reference' => '1fc9f64c0927627ef78ba436c9b17d967e68e120',
            'type' => 'library',
            'install_path' => __DIR__ . '/../sebastian/code-unit',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'sebastian/code-unit-reverse-lookup' => array(
            'pretty_version' => '2.0.3',
            'version' => '2.0.3.0',
            'reference' => 'ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5',
            'type' => 'library',
            'install_path' => __DIR__ . '/../sebastian/code-unit-reverse-lookup',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'sebastian/comparator' => array(
            'pretty_version' => '4.0.6',
            'version' => '4.0.6.0',
            'reference' => '55f4261989e546dc112258c7a75935a81a7ce382',
            'type' => 'library',
            'install_path' => __DIR__ . '/../sebastian/comparator',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'sebastian/complexity' => array(
            'pretty_version' => '2.0.2',
            'version' => '2.0.2.0',
            'reference' => '739b35e53379900cc9ac327b2147867b8b6efd88',
            'type' => 'library',
            'install_path' => __DIR__ . '/../sebastian/complexity',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'sebastian/diff' => array(
            'pretty_version' => '4.0.4',
            'version' => '4.0.4.0',
            'reference' => '3461e3fccc7cfdfc2720be910d3bd73c69be590d',
            'type' => 'library',
            'install_path' => __DIR__ . '/../sebastian/diff',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'sebastian/environment' => array(
            'pretty_version' => '5.1.5',
            'version' => '5.1.5.0',
            'reference' => '830c43a844f1f8d5b7a1f6d6076b784454d8b7ed',
            'type' => 'library',
            'install_path' => __DIR__ . '/../sebastian/environment',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'sebastian/exporter' => array(
            'pretty_version' => '4.0.4',
            'version' => '4.0.4.0',
            'reference' => '65e8b7db476c5dd267e65eea9cab77584d3cfff9',
            'type' => 'library',
            'install_path' => __DIR__ . '/../sebastian/exporter',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'sebastian/global-state' => array(
            'pretty_version' => '5.0.5',
            'version' => '5.0.5.0',
            'reference' => '0ca8db5a5fc9c8646244e629625ac486fa286bf2',
            'type' => 'library',
            'install_path' => __DIR__ . '/../sebastian/global-state',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'sebastian/lines-of-code' => array(
            'pretty_version' => '1.0.3',
            'version' => '1.0.3.0',
            'reference' => 'c1c2e997aa3146983ed888ad08b15470a2e22ecc',
            'type' => 'library',
            'install_path' => __DIR__ . '/../sebastian/lines-of-code',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'sebastian/object-enumerator' => array(
            'pretty_version' => '4.0.4',
            'version' => '4.0.4.0',
            'reference' => '5c9eeac41b290a3712d88851518825ad78f45c71',
            'type' => 'library',
            'install_path' => __DIR__ . '/../sebastian/object-enumerator',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'sebastian/object-reflector' => array(
            'pretty_version' => '2.0.4',
            'version' => '2.0.4.0',
            'reference' => 'b4f479ebdbf63ac605d183ece17d8d7fe49c15c7',
            'type' => 'library',
            'install_path' => __DIR__ . '/../sebastian/object-reflector',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'sebastian/recursion-context' => array(
            'pretty_version' => '4.0.4',
            'version' => '4.0.4.0',
            'reference' => 'cd9d8cf3c5804de4341c283ed787f099f5506172',
            'type' => 'library',
            'install_path' => __DIR__ . '/../sebastian/recursion-context',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'sebastian/resource-operations' => array(
            'pretty_version' => '3.0.3',
            'version' => '3.0.3.0',
            'reference' => '0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8',
            'type' => 'library',
            'install_path' => __DIR__ . '/../sebastian/resource-operations',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'sebastian/type' => array(
            'pretty_version' => '3.0.0',
            'version' => '3.0.0.0',
            'reference' => 'b233b84bc4465aff7b57cf1c4bc75c86d00d6dad',
            'type' => 'library',
            'install_path' => __DIR__ . '/../sebastian/type',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'sebastian/version' => array(
            'pretty_version' => '3.0.2',
            'version' => '3.0.2.0',
            'reference' => 'c6c1022351a901512170118436c764e473f6de8c',
            'type' => 'library',
            'install_path' => __DIR__ . '/../sebastian/version',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
        'symfony/console' => array(
            'pretty_version' => 'v5.4.23',
            'version' => '5.4.23.0',
            'reference' => '90f21e27d0d88ce38720556dd164d4a1e4c3934c',
            'type' => 'library',
            'install_path' => __DIR__ . '/../symfony/console',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'symfony/deprecation-contracts' => array(
            'pretty_version' => 'v3.2.1',
            'version' => '3.2.1.0',
            'reference' => 'e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e',
            'type' => 'library',
            'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'symfony/finder' => array(
            'pretty_version' => 'v5.4.21',
            'version' => '5.4.21.0',
            'reference' => '078e9a5e1871fcfe6a5ce421b539344c21afef19',
            'type' => 'library',
            'install_path' => __DIR__ . '/../symfony/finder',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'symfony/polyfill-ctype' => array(
            'pretty_version' => 'v1.27.0',
            'version' => '1.27.0.0',
            'reference' => '5bbc823adecdae860bb64756d639ecfec17b050a',
            'type' => 'library',
            'install_path' => __DIR__ . '/../symfony/polyfill-ctype',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'symfony/polyfill-intl-grapheme' => array(
            'pretty_version' => 'v1.27.0',
            'version' => '1.27.0.0',
            'reference' => '511a08c03c1960e08a883f4cffcacd219b758354',
            'type' => 'library',
            'install_path' => __DIR__ . '/../symfony/polyfill-intl-grapheme',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'symfony/polyfill-intl-normalizer' => array(
            'pretty_version' => 'v1.27.0',
            'version' => '1.27.0.0',
            'reference' => '19bd1e4fcd5b91116f14d8533c57831ed00571b6',
            'type' => 'library',
            'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'symfony/polyfill-mbstring' => array(
            'pretty_version' => 'v1.27.0',
            'version' => '1.27.0.0',
            'reference' => '8ad114f6b39e2c98a8b0e3bd907732c207c2b534',
            'type' => 'library',
            'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'symfony/polyfill-php73' => array(
            'pretty_version' => 'v1.27.0',
            'version' => '1.27.0.0',
            'reference' => '9e8ecb5f92152187c4799efd3c96b78ccab18ff9',
            'type' => 'library',
            'install_path' => __DIR__ . '/../symfony/polyfill-php73',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'symfony/polyfill-php74' => array(
            'pretty_version' => 'v1.27.0',
            'version' => '1.27.0.0',
            'reference' => 'aa7f1231a1aa56d695e626043252b7be6a90c4ce',
            'type' => 'library',
            'install_path' => __DIR__ . '/../symfony/polyfill-php74',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'symfony/polyfill-php80' => array(
            'pretty_version' => 'v1.27.0',
            'version' => '1.27.0.0',
            'reference' => '7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936',
            'type' => 'library',
            'install_path' => __DIR__ . '/../symfony/polyfill-php80',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'symfony/process' => array(
            'pretty_version' => 'v5.4.23',
            'version' => '5.4.23.0',
            'reference' => '4b842fc4b61609e0a155a114082bd94e31e98287',
            'type' => 'library',
            'install_path' => __DIR__ . '/../symfony/process',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'symfony/service-contracts' => array(
            'pretty_version' => 'v2.5.2',
            'version' => '2.5.2.0',
            'reference' => '4b426aac47d6427cc1a1d0f7e2ac724627f5966c',
            'type' => 'library',
            'install_path' => __DIR__ . '/../symfony/service-contracts',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'symfony/string' => array(
            'pretty_version' => 'v5.4.22',
            'version' => '5.4.22.0',
            'reference' => '8036a4c76c0dd29e60b6a7cafcacc50cf088ea62',
            'type' => 'library',
            'install_path' => __DIR__ . '/../symfony/string',
            'aliases' => array(),
            'dev_requirement' => false,
        ),
        'theseer/tokenizer' => array(
            'pretty_version' => '1.2.1',
            'version' => '1.2.1.0',
            'reference' => '34a41e998c2183e22995f158c581e7b5e755ab9e',
            'type' => 'library',
            'install_path' => __DIR__ . '/../theseer/tokenizer',
            'aliases' => array(),
            'dev_requirement' => true,
        ),
    ),
);
<?php

/*
 * This file is part of Composer.
 *
 * (c) Nils Adermann <naderman@naderman.de>
 *     Jordi Boggiano <j.boggiano@seld.be>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Composer;

use Composer\Autoload\ClassLoader;
use Composer\Semver\VersionParser;

/**
 * This class is copied in every Composer installed project and available to all
 *
 * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
 *
 * To require its presence, you can require `composer-runtime-api ^2.0`
 *
 * @final
 */
class InstalledVersions
{
    /**
     * @var mixed[]|null
     * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
     */
    private static $installed;

    /**
     * @var bool|null
     */
    private static $canGetVendors;

    /**
     * @var array[]
     * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
     */
    private static $installedByVendor = array();

    /**
     * Returns a list of all package names which are present, either by being installed, replaced or provided
     *
     * @return string[]
     * @psalm-return list<string>
     */
    public static function getInstalledPackages()
    {
        $packages = array();
        foreach (self::getInstalled() as $installed) {
            $packages[] = array_keys($installed['versions']);
        }

        if (1 === \count($packages)) {
            return $packages[0];
        }

        return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
    }

    /**
     * Returns a list of all package names with a specific type e.g. 'library'
     *
     * @param  string   $type
     * @return string[]
     * @psalm-return list<string>
     */
    public static function getInstalledPackagesByType($type)
    {
        $packagesByType = array();

        foreach (self::getInstalled() as $installed) {
            foreach ($installed['versions'] as $name => $package) {
                if (isset($package['type']) && $package['type'] === $type) {
                    $packagesByType[] = $name;
                }
            }
        }

        return $packagesByType;
    }

    /**
     * Checks whether the given package is installed
     *
     * This also returns true if the package name is provided or replaced by another package
     *
     * @param  string $packageName
     * @param  bool   $includeDevRequirements
     * @return bool
     */
    public static function isInstalled($packageName, $includeDevRequirements = true)
    {
        foreach (self::getInstalled() as $installed) {
            if (isset($installed['versions'][$packageName])) {
                return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
            }
        }

        return false;
    }

    /**
     * Checks whether the given package satisfies a version constraint
     *
     * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
     *
     *   Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
     *
     * @param  VersionParser $parser      Install composer/semver to have access to this class and functionality
     * @param  string        $packageName
     * @param  string|null   $constraint  A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
     * @return bool
     */
    public static function satisfies(VersionParser $parser, $packageName, $constraint)
    {
        $constraint = $parser->parseConstraints((string) $constraint);
        $provided = $parser->parseConstraints(self::getVersionRanges($packageName));

        return $provided->matches($constraint);
    }

    /**
     * Returns a version constraint representing all the range(s) which are installed for a given package
     *
     * It is easier to use this via isInstalled() with the $constraint argument if you need to check
     * whether a given version of a package is installed, and not just whether it exists
     *
     * @param  string $packageName
     * @return string Version constraint usable with composer/semver
     */
    public static function getVersionRanges($packageName)
    {
        foreach (self::getInstalled() as $installed) {
            if (!isset($installed['versions'][$packageName])) {
                continue;
            }

            $ranges = array();
            if (isset($installed['versions'][$packageName]['pretty_version'])) {
                $ranges[] = $installed['versions'][$packageName]['pretty_version'];
            }
            if (array_key_exists('aliases', $installed['versions'][$packageName])) {
                $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
            }
            if (array_key_exists('replaced', $installed['versions'][$packageName])) {
                $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
            }
            if (array_key_exists('provided', $installed['versions'][$packageName])) {
                $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
            }

            return implode(' || ', $ranges);
        }

        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
    }

    /**
     * @param  string      $packageName
     * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
     */
    public static function getVersion($packageName)
    {
        foreach (self::getInstalled() as $installed) {
            if (!isset($installed['versions'][$packageName])) {
                continue;
            }

            if (!isset($installed['versions'][$packageName]['version'])) {
                return null;
            }

            return $installed['versions'][$packageName]['version'];
        }

        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
    }

    /**
     * @param  string      $packageName
     * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
     */
    public static function getPrettyVersion($packageName)
    {
        foreach (self::getInstalled() as $installed) {
            if (!isset($installed['versions'][$packageName])) {
                continue;
            }

            if (!isset($installed['versions'][$packageName]['pretty_version'])) {
                return null;
            }

            return $installed['versions'][$packageName]['pretty_version'];
        }

        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
    }

    /**
     * @param  string      $packageName
     * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
     */
    public static function getReference($packageName)
    {
        foreach (self::getInstalled() as $installed) {
            if (!isset($installed['versions'][$packageName])) {
                continue;
            }

            if (!isset($installed['versions'][$packageName]['reference'])) {
                return null;
            }

            return $installed['versions'][$packageName]['reference'];
        }

        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
    }

    /**
     * @param  string      $packageName
     * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
     */
    public static function getInstallPath($packageName)
    {
        foreach (self::getInstalled() as $installed) {
            if (!isset($installed['versions'][$packageName])) {
                continue;
            }

            return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
        }

        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
    }

    /**
     * @return array
     * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
     */
    public static function getRootPackage()
    {
        $installed = self::getInstalled();

        return $installed[0]['root'];
    }

    /**
     * Returns the raw installed.php data for custom implementations
     *
     * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
     * @return array[]
     * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
     */
    public static function getRawData()
    {
        @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);

        if (null === self::$installed) {
            // only require the installed.php file if this file is loaded from its dumped location,
            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
            if (substr(__DIR__, -8, 1) !== 'C') {
                self::$installed = include __DIR__ . '/installed.php';
            } else {
                self::$installed = array();
            }
        }

        return self::$installed;
    }

    /**
     * Returns the raw data of all installed.php which are currently loaded for custom implementations
     *
     * @return array[]
     * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
     */
    public static function getAllRawData()
    {
        return self::getInstalled();
    }

    /**
     * Lets you reload the static array from another file
     *
     * This is only useful for complex integrations in which a project needs to use
     * this class but then also needs to execute another project's autoloader in process,
     * and wants to ensure both projects have access to their version of installed.php.
     *
     * A typical case would be PHPUnit, where it would need to make sure it reads all
     * the data it needs from this class, then call reload() with
     * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
     * the project in which it runs can then also use this class safely, without
     * interference between PHPUnit's dependencies and the project's dependencies.
     *
     * @param  array[] $data A vendor/composer/installed.php data set
     * @return void
     *
     * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
     */
    public static function reload($data)
    {
        self::$installed = $data;
        self::$installedByVendor = array();
    }

    /**
     * @return array[]
     * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
     */
    private static function getInstalled()
    {
        if (null === self::$canGetVendors) {
            self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
        }

        $installed = array();

        if (self::$canGetVendors) {
            foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
                if (isset(self::$installedByVendor[$vendorDir])) {
                    $installed[] = self::$installedByVendor[$vendorDir];
                } elseif (is_file($vendorDir.'/composer/installed.php')) {
                    /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
                    $required = require $vendorDir.'/composer/installed.php';
                    $installed[] = self::$installedByVendor[$vendorDir] = $required;
                    if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
                        self::$installed = $installed[count($installed) - 1];
                    }
                }
            }
        }

        if (null === self::$installed) {
            // only require the installed.php file if this file is loaded from its dumped location,
            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
            if (substr(__DIR__, -8, 1) !== 'C') {
                /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
                $required = require __DIR__ . '/installed.php';
                self::$installed = $required;
            } else {
                self::$installed = array();
            }
        }

        if (self::$installed !== array()) {
            $installed[] = self::$installed;
        }

        return $installed;
    }
}
<?php

/*
 * This file is part of composer/pcre.
 *
 * (c) Composer <https://github.com/composer>
 *
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Composer\Pcre;

final class MatchAllWithOffsetsResult
{
    /**
     * An array of match group => list of matches, every match being a pair of string matched + offset in bytes (or -1 if no match)
     *
     * @readonly
     * @var array<int|string, list<array{string|null, int}>>
     * @phpstan-var array<int|string, list<array{string|null, int<-1, max>}>>
     */
    public $matches;
    /**
     * @readonly
     * @var 0|positive-int
     */
    public $count;
    /**
     * @readonly
     * @var bool
     */
    public $matched;
    /**
     * @param 0|positive-int $count
     * @param array<int|string, list<array{string|null, int}>> $matches
     * @phpstan-param array<int|string, list<array{string|null, int<-1, max>}>> $matches
     */
    public function __construct(int $count, array $matches)
    {
        $this->matches = $matches;
        $this->matched = (bool) $count;
        $this->count = $count;
    }
}
<?php

/*
 * This file is part of composer/pcre.
 *
 * (c) Composer <https://github.com/composer>
 *
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Composer\Pcre;

class Regex
{
    /**
     * @param non-empty-string $pattern
     */
    public static function isMatch(string $pattern, string $subject, int $offset = 0) : bool
    {
        return (bool) Preg::match($pattern, $subject, $matches, 0, $offset);
    }
    /**
     * @param non-empty-string $pattern
     * @param int-mask<PREG_UNMATCHED_AS_NULL> $flags PREG_UNMATCHED_AS_NULL is always set, no other flags are supported
     */
    public static function match(string $pattern, string $subject, int $flags = 0, int $offset = 0) : MatchResult
    {
        self::checkOffsetCapture($flags, 'matchWithOffsets');
        $count = Preg::match($pattern, $subject, $matches, $flags, $offset);
        return new MatchResult($count, $matches);
    }
    /**
     * Variant of `match()` which returns non-null matches (or throws)
     *
     * @param non-empty-string $pattern
     * @param int-mask<PREG_UNMATCHED_AS_NULL> $flags PREG_UNMATCHED_AS_NULL is always set, no other flags are supported
     * @throws UnexpectedNullMatchException
     */
    public static function matchStrictGroups(string $pattern, string $subject, int $flags = 0, int $offset = 0) : MatchStrictGroupsResult
    {
        $count = Preg::matchStrictGroups($pattern, $subject, $matches, $flags, $offset);
        return new MatchStrictGroupsResult($count, $matches);
    }
    /**
     * Runs preg_match with PREG_OFFSET_CAPTURE
     *
     * @param non-empty-string $pattern
     * @param int-mask<PREG_UNMATCHED_AS_NULL|PREG_OFFSET_CAPTURE> $flags PREG_UNMATCHED_AS_NULL and PREG_MATCH_OFFSET are always set, no other flags are supported
     */
    public static function matchWithOffsets(string $pattern, string $subject, int $flags = 0, int $offset = 0) : MatchWithOffsetsResult
    {
        $count = Preg::matchWithOffsets($pattern, $subject, $matches, $flags, $offset);
        return new MatchWithOffsetsResult($count, $matches);
    }
    /**
     * @param non-empty-string $pattern
     * @param int-mask<PREG_UNMATCHED_AS_NULL> $flags PREG_UNMATCHED_AS_NULL is always set, no other flags are supported
     */
    public static function matchAll(string $pattern, string $subject, int $flags = 0, int $offset = 0) : MatchAllResult
    {
        self::checkOffsetCapture($flags, 'matchAllWithOffsets');
        self::checkSetOrder($flags);
        $count = Preg::matchAll($pattern, $subject, $matches, $flags, $offset);
        return new MatchAllResult($count, $matches);
    }
    /**
     * Variant of `matchAll()` which returns non-null matches (or throws)
     *
     * @param non-empty-string $pattern
     * @param int-mask<PREG_UNMATCHED_AS_NULL> $flags PREG_UNMATCHED_AS_NULL is always set, no other flags are supported
     * @throws UnexpectedNullMatchException
     */
    public static function matchAllStrictGroups(string $pattern, string $subject, int $flags = 0, int $offset = 0) : MatchAllStrictGroupsResult
    {
        self::checkOffsetCapture($flags, 'matchAllWithOffsets');
        self::checkSetOrder($flags);
        $count = Preg::matchAllStrictGroups($pattern, $subject, $matches, $flags, $offset);
        return new MatchAllStrictGroupsResult($count, $matches);
    }
    /**
     * Runs preg_match_all with PREG_OFFSET_CAPTURE
     *
     * @param non-empty-string $pattern
     * @param int-mask<PREG_UNMATCHED_AS_NULL|PREG_OFFSET_CAPTURE> $flags PREG_UNMATCHED_AS_NULL and PREG_MATCH_OFFSET are always set, no other flags are supported
     */
    public static function matchAllWithOffsets(string $pattern, string $subject, int $flags = 0, int $offset = 0) : MatchAllWithOffsetsResult
    {
        self::checkSetOrder($flags);
        $count = Preg::matchAllWithOffsets($pattern, $subject, $matches, $flags, $offset);
        return new MatchAllWithOffsetsResult($count, $matches);
    }
    /**
     * @param string|string[] $pattern
     * @param string|string[] $replacement
     * @param string          $subject
     */
    public static function replace($pattern, $replacement, $subject, int $limit = -1) : ReplaceResult
    {
        $result = Preg::replace($pattern, $replacement, $subject, $limit, $count);
        return new ReplaceResult($count, $result);
    }
    /**
     * @param string|string[] $pattern
     * @param callable(array<int|string, string|null>): string $replacement
     * @param string          $subject
     * @param int-mask<PREG_UNMATCHED_AS_NULL|PREG_OFFSET_CAPTURE> $flags PREG_OFFSET_CAPTURE is supported, PREG_UNMATCHED_AS_NULL is always set
     */
    public static function replaceCallback($pattern, callable $replacement, $subject, int $limit = -1, int $flags = 0) : ReplaceResult
    {
        $result = Preg::replaceCallback($pattern, $replacement, $subject, $limit, $count, $flags);
        return new ReplaceResult($count, $result);
    }
    /**
     * Variant of `replaceCallback()` which outputs non-null matches (or throws)
     *
     * @param string $pattern
     * @param callable(array<int|string, string>): string $replacement
     * @param string          $subject
     * @param int-mask<PREG_UNMATCHED_AS_NULL|PREG_OFFSET_CAPTURE> $flags PREG_OFFSET_CAPTURE or PREG_UNMATCHED_AS_NULL, only available on PHP 7.4+
     */
    public static function replaceCallbackStrictGroups($pattern, callable $replacement, $subject, int $limit = -1, int $flags = 0) : ReplaceResult
    {
        $result = Preg::replaceCallbackStrictGroups($pattern, $replacement, $subject, $limit, $count, $flags);
        return new ReplaceResult($count, $result);
    }
    /**
     * @param array<string, callable(array<int|string, string|null>): string> $pattern
     * @param string $subject
     * @param int-mask<PREG_UNMATCHED_AS_NULL|PREG_OFFSET_CAPTURE> $flags PREG_OFFSET_CAPTURE is supported, PREG_UNMATCHED_AS_NULL is always set
     */
    public static function replaceCallbackArray(array $pattern, $subject, int $limit = -1, int $flags = 0) : ReplaceResult
    {
        $result = Preg::replaceCallbackArray($pattern, $subject, $limit, $count, $flags);
        return new ReplaceResult($count, $result);
    }
    private static function checkOffsetCapture(int $flags, string $useFunctionName) : void
    {
        if (($flags & \PREG_OFFSET_CAPTURE) !== 0) {
            throw new \InvalidArgumentException('PREG_OFFSET_CAPTURE is not supported as it changes the return type, use ' . $useFunctionName . '() instead');
        }
    }
    private static function checkSetOrder(int $flags) : void
    {
        if (($flags & \PREG_SET_ORDER) !== 0) {
            throw new \InvalidArgumentException('PREG_SET_ORDER is not supported as it changes the return type');
        }
    }
}
<?php

/*
 * This file is part of composer/pcre.
 *
 * (c) Composer <https://github.com/composer>
 *
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Composer\Pcre;

final class ReplaceResult
{
    /**
     * @readonly
     * @var string
     */
    public $result;
    /**
     * @readonly
     * @var 0|positive-int
     */
    public $count;
    /**
     * @readonly
     * @var bool
     */
    public $matched;
    /**
     * @param 0|positive-int $count
     */
    public function __construct(int $count, string $result)
    {
        $this->count = $count;
        $this->matched = (bool) $count;
        $this->result = $result;
    }
}
<?php

/*
 * This file is part of composer/pcre.
 *
 * (c) Composer <https://github.com/composer>
 *
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Composer\Pcre;

final class MatchResult
{
    /**
     * An array of match group => string matched
     *
     * @readonly
     * @var array<int|string, string|null>
     */
    public $matches;
    /**
     * @readonly
     * @var bool
     */
    public $matched;
    /**
     * @param 0|positive-int $count
     * @param array<string|null> $matches
     */
    public function __construct(int $count, array $matches)
    {
        $this->matches = $matches;
        $this->matched = (bool) $count;
    }
}
<?php

/*
 * This file is part of composer/pcre.
 *
 * (c) Composer <https://github.com/composer>
 *
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Composer\Pcre;

final class MatchAllStrictGroupsResult
{
    /**
     * An array of match group => list of matched strings
     *
     * @readonly
     * @var array<int|string, list<string>>
     */
    public $matches;
    /**
     * @readonly
     * @var 0|positive-int
     */
    public $count;
    /**
     * @readonly
     * @var bool
     */
    public $matched;
    /**
     * @param 0|positive-int $count
     * @param array<array<string>> $matches
     */
    public function __construct(int $count, array $matches)
    {
        $this->matches = $matches;
        $this->matched = (bool) $count;
        $this->count = $count;
    }
}
<?php

/*
 * This file is part of composer/pcre.
 *
 * (c) Composer <https://github.com/composer>
 *
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Composer\Pcre;

class UnexpectedNullMatchException extends PcreException
{
    public static function fromFunction($function, $pattern)
    {
        throw new \LogicException('fromFunction should not be called on ' . self::class . ', use ' . PcreException::class);
    }
}
<?php

/*
 * This file is part of composer/pcre.
 *
 * (c) Composer <https://github.com/composer>
 *
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Composer\Pcre;

class Preg
{
    /** @internal */
    public const ARRAY_MSG = '$subject as an array is not supported. You can use \'foreach\' instead.';
    /** @internal */
    public const INVALID_TYPE_MSG = '$subject must be a string, %s given.';
    /**
     * @param non-empty-string   $pattern
     * @param array<string|null> $matches Set by method
     * @param int-mask<PREG_UNMATCHED_AS_NULL> $flags PREG_UNMATCHED_AS_NULL is always set, no other flags are supported
     * @return 0|1
     *
     * @param-out array<int|string, string|null> $matches
     */
    public static function match(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0) : int
    {
        self::checkOffsetCapture($flags, 'matchWithOffsets');
        $result = \preg_match($pattern, $subject, $matches, $flags | \PREG_UNMATCHED_AS_NULL, $offset);
        if ($result === \false) {
            throw PcreException::fromFunction('preg_match', $pattern);
        }
        return $result;
    }
    /**
     * Variant of `match()` which outputs non-null matches (or throws)
     *
     * @param non-empty-string $pattern
     * @param array<string> $matches Set by method
     * @param int-mask<PREG_UNMATCHED_AS_NULL> $flags PREG_UNMATCHED_AS_NULL is always set, no other flags are supported
     * @return 0|1
     * @throws UnexpectedNullMatchException
     *
     * @param-out array<int|string, string> $matches
     */
    public static function matchStrictGroups(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0) : int
    {
        $result = self::match($pattern, $subject, $matchesInternal, $flags, $offset);
        $matches = self::enforceNonNullMatches($pattern, $matchesInternal, 'match');
        return $result;
    }
    /**
     * Runs preg_match with PREG_OFFSET_CAPTURE
     *
     * @param non-empty-string   $pattern
     * @param array<int|string, array{string|null, int}> $matches Set by method
     * @param int-mask<PREG_UNMATCHED_AS_NULL|PREG_OFFSET_CAPTURE> $flags PREG_UNMATCHED_AS_NULL and PREG_OFFSET_CAPTURE are always set, no other flags are supported
     * @return 0|1
     *
     * @param-out array<int|string, array{string|null, int<-1, max>}> $matches
     */
    public static function matchWithOffsets(string $pattern, string $subject, ?array &$matches, int $flags = 0, int $offset = 0) : int
    {
        $result = \preg_match($pattern, $subject, $matches, $flags | \PREG_UNMATCHED_AS_NULL | \PREG_OFFSET_CAPTURE, $offset);
        if ($result === \false) {
            throw PcreException::fromFunction('preg_match', $pattern);
        }
        return $result;
    }
    /**
     * @param non-empty-string   $pattern
     * @param array<int|string, list<string|null>> $matches Set by method
     * @param int-mask<PREG_UNMATCHED_AS_NULL> $flags PREG_UNMATCHED_AS_NULL is always set, no other flags are supported
     * @return 0|positive-int
     *
     * @param-out array<int|string, list<string|null>> $matches
     */
    public static function matchAll(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0) : int
    {
        self::checkOffsetCapture($flags, 'matchAllWithOffsets');
        self::checkSetOrder($flags);
        $result = \preg_match_all($pattern, $subject, $matches, $flags | \PREG_UNMATCHED_AS_NULL, $offset);
        if (!\is_int($result)) {
            // PHP < 8 may return null, 8+ returns int|false
            throw PcreException::fromFunction('preg_match_all', $pattern);
        }
        return $result;
    }
    /**
     * Variant of `match()` which outputs non-null matches (or throws)
     *
     * @param non-empty-string   $pattern
     * @param array<int|string, list<string|null>> $matches Set by method
     * @param int-mask<PREG_UNMATCHED_AS_NULL> $flags PREG_UNMATCHED_AS_NULL is always set, no other flags are supported
     * @return 0|positive-int
     * @throws UnexpectedNullMatchException
     *
     * @param-out array<int|string, list<string>> $matches
     */
    public static function matchAllStrictGroups(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0) : int
    {
        $result = self::matchAll($pattern, $subject, $matchesInternal, $flags, $offset);
        $matches = self::enforceNonNullMatchAll($pattern, $matchesInternal, 'matchAll');
        return $result;
    }
    /**
     * Runs preg_match_all with PREG_OFFSET_CAPTURE
     *
     * @param non-empty-string   $pattern
     * @param array<int|string, list<array{string|null, int}>> $matches Set by method
     * @param int-mask<PREG_UNMATCHED_AS_NULL|PREG_OFFSET_CAPTURE> $flags PREG_UNMATCHED_AS_NULL and PREG_MATCH_OFFSET are always set, no other flags are supported
     * @return 0|positive-int
     *
     * @phpstan-param array<int|string, list<array{string|null, int<-1, max>}>> $matches
     */
    public static function matchAllWithOffsets(string $pattern, string $subject, ?array &$matches, int $flags = 0, int $offset = 0) : int
    {
        self::checkSetOrder($flags);
        $result = \preg_match_all($pattern, $subject, $matches, $flags | \PREG_UNMATCHED_AS_NULL | \PREG_OFFSET_CAPTURE, $offset);
        if (!\is_int($result)) {
            // PHP < 8 may return null, 8+ returns int|false
            throw PcreException::fromFunction('preg_match_all', $pattern);
        }
        return $result;
    }
    /**
     * @param string|string[] $pattern
     * @param string|string[] $replacement
     * @param string $subject
     * @param int             $count Set by method
     *
     * @param-out int<0, max> $count
     */
    public static function replace($pattern, $replacement, $subject, int $limit = -1, int &$count = null) : string
    {
        if (!\is_scalar($subject)) {
            if (\is_array($subject)) {
                throw new \InvalidArgumentException(static::ARRAY_MSG);
            }
            throw new \TypeError(\sprintf(static::INVALID_TYPE_MSG, \gettype($subject)));
        }
        $result = \preg_replace($pattern, $replacement, $subject, $limit, $count);
        if ($result === null) {
            throw PcreException::fromFunction('preg_replace', $pattern);
        }
        return $result;
    }
    /**
     * @param string|string[] $pattern
     * @param callable(array<int|string, string|null>): string $replacement
     * @param string $subject
     * @param int             $count Set by method
     * @param int-mask<PREG_UNMATCHED_AS_NULL|PREG_OFFSET_CAPTURE> $flags PREG_OFFSET_CAPTURE is supported, PREG_UNMATCHED_AS_NULL is always set
     *
     * @param-out int<0, max> $count
     */
    public static function replaceCallback($pattern, callable $replacement, $subject, int $limit = -1, int &$count = null, int $flags = 0) : string
    {
        if (!\is_scalar($subject)) {
            if (\is_array($subject)) {
                throw new \InvalidArgumentException(static::ARRAY_MSG);
            }
            throw new \TypeError(\sprintf(static::INVALID_TYPE_MSG, \gettype($subject)));
        }
        $result = \preg_replace_callback($pattern, $replacement, $subject, $limit, $count, $flags | \PREG_UNMATCHED_AS_NULL);
        if ($result === null) {
            throw PcreException::fromFunction('preg_replace_callback', $pattern);
        }
        return $result;
    }
    /**
     * Variant of `replaceCallback()` which outputs non-null matches (or throws)
     *
     * @param string $pattern
     * @param callable(array<int|string, string>): string $replacement
     * @param string $subject
     * @param int $count Set by method
     * @param int-mask<PREG_UNMATCHED_AS_NULL|PREG_OFFSET_CAPTURE> $flags PREG_OFFSET_CAPTURE or PREG_UNMATCHED_AS_NULL, only available on PHP 7.4+
     *
     * @param-out int<0, max> $count
     */
    public static function replaceCallbackStrictGroups(string $pattern, callable $replacement, $subject, int $limit = -1, int &$count = null, int $flags = 0) : string
    {
        return self::replaceCallback($pattern, function (array $matches) use($pattern, $replacement) {
            return $replacement(self::enforceNonNullMatches($pattern, $matches, 'replaceCallback'));
        }, $subject, $limit, $count, $flags);
    }
    /**
     * @param array<string, callable(array<int|string, string|null>): string> $pattern
     * @param string $subject
     * @param int    $count Set by method
     * @param int-mask<PREG_UNMATCHED_AS_NULL|PREG_OFFSET_CAPTURE> $flags PREG_OFFSET_CAPTURE is supported, PREG_UNMATCHED_AS_NULL is always set
     *
     * @param-out int<0, max> $count
     */
    public static function replaceCallbackArray(array $pattern, $subject, int $limit = -1, int &$count = null, int $flags = 0) : string
    {
        if (!\is_scalar($subject)) {
            if (\is_array($subject)) {
                throw new \InvalidArgumentException(static::ARRAY_MSG);
            }
            throw new \TypeError(\sprintf(static::INVALID_TYPE_MSG, \gettype($subject)));
        }
        $result = \preg_replace_callback_array($pattern, $subject, $limit, $count, $flags | \PREG_UNMATCHED_AS_NULL);
        if ($result === null) {
            $pattern = \array_keys($pattern);
            throw PcreException::fromFunction('preg_replace_callback_array', $pattern);
        }
        return $result;
    }
    /**
     * @param int-mask<PREG_SPLIT_NO_EMPTY|PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_OFFSET_CAPTURE> $flags PREG_SPLIT_NO_EMPTY or PREG_SPLIT_DELIM_CAPTURE
     * @return list<string>
     */
    public static function split(string $pattern, string $subject, int $limit = -1, int $flags = 0) : array
    {
        if (($flags & \PREG_SPLIT_OFFSET_CAPTURE) !== 0) {
            throw new \InvalidArgumentException('PREG_SPLIT_OFFSET_CAPTURE is not supported as it changes the type of $matches, use splitWithOffsets() instead');
        }
        $result = \preg_split($pattern, $subject, $limit, $flags);
        if ($result === \false) {
            throw PcreException::fromFunction('preg_split', $pattern);
        }
        return $result;
    }
    /**
     * @param int-mask<PREG_SPLIT_NO_EMPTY|PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_OFFSET_CAPTURE> $flags PREG_SPLIT_NO_EMPTY or PREG_SPLIT_DELIM_CAPTURE, PREG_SPLIT_OFFSET_CAPTURE is always set
     * @return list<array{string, int}>
     * @phpstan-return list<array{string, int<0, max>}>
     */
    public static function splitWithOffsets(string $pattern, string $subject, int $limit = -1, int $flags = 0) : array
    {
        $result = \preg_split($pattern, $subject, $limit, $flags | \PREG_SPLIT_OFFSET_CAPTURE);
        if ($result === \false) {
            throw PcreException::fromFunction('preg_split', $pattern);
        }
        return $result;
    }
    /**
     * @template T of string|\Stringable
     * @param string   $pattern
     * @param array<T> $array
     * @param int-mask<PREG_GREP_INVERT> $flags PREG_GREP_INVERT
     * @return array<T>
     */
    public static function grep(string $pattern, array $array, int $flags = 0) : array
    {
        $result = \preg_grep($pattern, $array, $flags);
        if ($result === \false) {
            throw PcreException::fromFunction('preg_grep', $pattern);
        }
        return $result;
    }
    /**
     * Variant of match() which returns a bool instead of int
     *
     * @param non-empty-string   $pattern
     * @param array<string|null> $matches Set by method
     * @param int-mask<PREG_UNMATCHED_AS_NULL> $flags PREG_UNMATCHED_AS_NULL is always set, no other flags are supported
     *
     * @param-out array<int|string, string|null> $matches
     */
    public static function isMatch(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0) : bool
    {
        return (bool) static::match($pattern, $subject, $matches, $flags, $offset);
    }
    /**
     * Variant of `isMatch()` which outputs non-null matches (or throws)
     *
     * @param non-empty-string $pattern
     * @param array<string> $matches Set by method
     * @param int-mask<PREG_UNMATCHED_AS_NULL> $flags PREG_UNMATCHED_AS_NULL is always set, no other flags are supported
     * @throws UnexpectedNullMatchException
     *
     * @param-out array<int|string, string> $matches
     */
    public static function isMatchStrictGroups(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0) : bool
    {
        return (bool) self::matchStrictGroups($pattern, $subject, $matches, $flags, $offset);
    }
    /**
     * Variant of matchAll() which returns a bool instead of int
     *
     * @param non-empty-string   $pattern
     * @param array<int|string, list<string|null>> $matches Set by method
     * @param int-mask<PREG_UNMATCHED_AS_NULL> $flags PREG_UNMATCHED_AS_NULL is always set, no other flags are supported
     *
     * @param-out array<int|string, list<string|null>> $matches
     */
    public static function isMatchAll(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0) : bool
    {
        return (bool) static::matchAll($pattern, $subject, $matches, $flags, $offset);
    }
    /**
     * Variant of `isMatchAll()` which outputs non-null matches (or throws)
     *
     * @param non-empty-string $pattern
     * @param array<int|string, list<string>> $matches Set by method
     * @param int-mask<PREG_UNMATCHED_AS_NULL> $flags PREG_UNMATCHED_AS_NULL is always set, no other flags are supported
     *
     * @param-out array<int|string, list<string>> $matches
     */
    public static function isMatchAllStrictGroups(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0) : bool
    {
        return (bool) self::matchAllStrictGroups($pattern, $subject, $matches, $flags, $offset);
    }
    /**
     * Variant of matchWithOffsets() which returns a bool instead of int
     *
     * Runs preg_match with PREG_OFFSET_CAPTURE
     *
     * @param non-empty-string   $pattern
     * @param array<int|string, array{string|null, int}> $matches Set by method
     * @param int-mask<PREG_UNMATCHED_AS_NULL> $flags PREG_UNMATCHED_AS_NULL is always set, no other flags are supported
     *
     * @param-out array<int|string, array{string|null, int<-1, max>}> $matches
     */
    public static function isMatchWithOffsets(string $pattern, string $subject, ?array &$matches, int $flags = 0, int $offset = 0) : bool
    {
        return (bool) static::matchWithOffsets($pattern, $subject, $matches, $flags, $offset);
    }
    /**
     * Variant of matchAllWithOffsets() which returns a bool instead of int
     *
     * Runs preg_match_all with PREG_OFFSET_CAPTURE
     *
     * @param non-empty-string   $pattern
     * @param array<int|string, list<array{string|null, int}>> $matches Set by method
     * @param int-mask<PREG_UNMATCHED_AS_NULL> $flags PREG_UNMATCHED_AS_NULL is always set, no other flags are supported
     *
     * @param-out array<int|string, list<array{string|null, int<-1, max>}>> $matches
     */
    public static function isMatchAllWithOffsets(string $pattern, string $subject, ?array &$matches, int $flags = 0, int $offset = 0) : bool
    {
        return (bool) static::matchAllWithOffsets($pattern, $subject, $matches, $flags, $offset);
    }
    private static function checkOffsetCapture(int $flags, string $useFunctionName) : void
    {
        if (($flags & \PREG_OFFSET_CAPTURE) !== 0) {
            throw new \InvalidArgumentException('PREG_OFFSET_CAPTURE is not supported as it changes the type of $matches, use ' . $useFunctionName . '() instead');
        }
    }
    private static function checkSetOrder(int $flags) : void
    {
        if (($flags & \PREG_SET_ORDER) !== 0) {
            throw new \InvalidArgumentException('PREG_SET_ORDER is not supported as it changes the type of $matches');
        }
    }
    /**
     * @param array<int|string, string|null> $matches
     * @return array<int|string, string>
     * @throws UnexpectedNullMatchException
     */
    private static function enforceNonNullMatches(string $pattern, array $matches, string $variantMethod)
    {
        foreach ($matches as $group => $match) {
            if (null === $match) {
                throw new UnexpectedNullMatchException('Pattern "' . $pattern . '" had an unexpected unmatched group "' . $group . '", make sure the pattern always matches or use ' . $variantMethod . '() instead.');
            }
        }
        /** @var array<string> */
        return $matches;
    }
    /**
     * @param array<int|string, list<string|null>> $matches
     * @return array<int|string, list<string>>
     * @throws UnexpectedNullMatchException
     */
    private static function enforceNonNullMatchAll(string $pattern, array $matches, string $variantMethod)
    {
        foreach ($matches as $group => $groupMatches) {
            foreach ($groupMatches as $match) {
                if (null === $match) {
                    throw new UnexpectedNullMatchException('Pattern "' . $pattern . '" had an unexpected unmatched group "' . $group . '", make sure the pattern always matches or use ' . $variantMethod . '() instead.');
                }
            }
        }
        /** @var array<int|string, list<string>> */
        return $matches;
    }
}
<?php

/*
 * This file is part of composer/pcre.
 *
 * (c) Composer <https://github.com/composer>
 *
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Composer\Pcre;

final class MatchAllResult
{
    /**
     * An array of match group => list of matched strings
     *
     * @readonly
     * @var array<int|string, list<string|null>>
     */
    public $matches;
    /**
     * @readonly
     * @var 0|positive-int
     */
    public $count;
    /**
     * @readonly
     * @var bool
     */
    public $matched;
    /**
     * @param 0|positive-int $count
     * @param array<int|string, array<string|null>> $matches
     */
    public function __construct(int $count, array $matches)
    {
        $this->matches = $matches;
        $this->matched = (bool) $count;
        $this->count = $count;
    }
}
<?php

/*
 * This file is part of composer/pcre.
 *
 * (c) Composer <https://github.com/composer>
 *
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Composer\Pcre;

final class MatchWithOffsetsResult
{
    /**
     * An array of match group => pair of string matched + offset in bytes (or -1 if no match)
     *
     * @readonly
     * @var array<int|string, array{string|null, int}>
     * @phpstan-var array<int|string, array{string|null, int<-1, max>}>
     */
    public $matches;
    /**
     * @readonly
     * @var bool
     */
    public $matched;
    /**
     * @param 0|positive-int $count
     * @param array<array{string|null, int}> $matches
     * @phpstan-param array<int|string, array{string|null, int<-1, max>}> $matches
     */
    public function __construct(int $count, array $matches)
    {
        $this->matches = $matches;
        $this->matched = (bool) $count;
    }
}
<?php

/*
 * This file is part of composer/pcre.
 *
 * (c) Composer <https://github.com/composer>
 *
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Composer\Pcre;

class PcreException extends \RuntimeException
{
    /**
     * @param  string $function
     * @param  string|string[] $pattern
     * @return self
     */
    public static function fromFunction($function, $pattern)
    {
        $code = \preg_last_error();
        if (\is_array($pattern)) {
            $pattern = \implode(', ', $pattern);
        }
        return new PcreException($function . '(): failed executing "' . $pattern . '": ' . self::pcreLastErrorMessage($code), $code);
    }
    /**
     * @param  int $code
     * @return string
     */
    private static function pcreLastErrorMessage($code)
    {
        if (\function_exists('preg_last_error_msg')) {
            return \preg_last_error_msg();
        }
        // older php versions did not set the code properly in all cases
        if (\PHP_VERSION_ID < 70201 && $code === 0) {
            return 'UNDEFINED_ERROR';
        }
        $constants = \get_defined_constants(\true);
        if (!isset($constants['pcre'])) {
            return 'UNDEFINED_ERROR';
        }
        foreach ($constants['pcre'] as $const => $val) {
            if ($val === $code && \substr($const, -6) === '_ERROR') {
                return $const;
            }
        }
        return 'UNDEFINED_ERROR';
    }
}
<?php

/*
 * This file is part of composer/pcre.
 *
 * (c) Composer <https://github.com/composer>
 *
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Composer\Pcre;

final class MatchStrictGroupsResult
{
    /**
     * An array of match group => string matched
     *
     * @readonly
     * @var array<int|string, string>
     */
    public $matches;
    /**
     * @readonly
     * @var bool
     */
    public $matched;
    /**
     * @param 0|positive-int $count
     * @param array<string> $matches
     */
    public function __construct(int $count, array $matches)
    {
        $this->matches = $matches;
        $this->matched = (bool) $count;
    }
}
Copyright (C) 2021 Composer

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Copyright (c) Nils Adermann, Jordi Boggiano

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

<?php

// autoload_psr4.php @generated by Composer

$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);

return array(
    '_PHPStan_dcc7b7cff\\Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
    '_PHPStan_dcc7b7cff\\Symfony\\Contracts\\Service\\' => array($vendorDir . '/symfony/service-contracts'),
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\' => array($vendorDir . '/symfony/string'),
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\' => array($vendorDir . '/symfony/process'),
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\' => array($vendorDir . '/symfony/finder'),
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'),
    '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\' => array($vendorDir . '/ringcentral/psr7/src'),
    '_PHPStan_dcc7b7cff\\React\\Stream\\' => array($vendorDir . '/react/stream/src'),
    '_PHPStan_dcc7b7cff\\React\\Socket\\' => array($vendorDir . '/react/socket/src'),
    '_PHPStan_dcc7b7cff\\React\\Promise\\Timer\\' => array($vendorDir . '/react/promise-timer/src'),
    '_PHPStan_dcc7b7cff\\React\\Promise\\' => array($vendorDir . '/react/promise/src'),
    '_PHPStan_dcc7b7cff\\React\\Http\\' => array($vendorDir . '/react/http/src'),
    '_PHPStan_dcc7b7cff\\React\\EventLoop\\' => array($vendorDir . '/react/event-loop/src'),
    '_PHPStan_dcc7b7cff\\React\\Dns\\' => array($vendorDir . '/react/dns/src'),
    '_PHPStan_dcc7b7cff\\React\\ChildProcess\\' => array($vendorDir . '/react/child-process/src'),
    '_PHPStan_dcc7b7cff\\React\\Cache\\' => array($vendorDir . '/react/cache/src'),
    '_PHPStan_dcc7b7cff\\Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
    '_PHPStan_dcc7b7cff\\Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
    '_PHPStan_dcc7b7cff\\Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
    '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\' => array($vendorDir . '/ondram/ci-detector/src'),
    '_PHPStan_dcc7b7cff\\Fig\\Http\\Message\\' => array($vendorDir . '/fig/http-message-util/src'),
    '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\' => array($vendorDir . '/fidry/cpu-core-counter/src'),
    '_PHPStan_dcc7b7cff\\Evenement\\' => array($vendorDir . '/evenement/evenement/src/Evenement'),
    '_PHPStan_dcc7b7cff\\Composer\\XdebugHandler\\' => array($vendorDir . '/composer/xdebug-handler/src'),
    '_PHPStan_dcc7b7cff\\Composer\\Pcre\\' => array($vendorDir . '/composer/pcre/src'),
    '_PHPStan_dcc7b7cff\\Composer\\CaBundle\\' => array($vendorDir . '/composer/ca-bundle/src'),
    '_PHPStan_dcc7b7cff\\Clue\\React\\NDJson\\' => array($vendorDir . '/clue/ndjson-react/src'),
    'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'),
    'Symfony\\Polyfill\\Php74\\' => array($vendorDir . '/symfony/polyfill-php74'),
    'Symfony\\Polyfill\\Php73\\' => array($vendorDir . '/symfony/polyfill-php73'),
    'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
    'Symfony\\Polyfill\\Intl\\Normalizer\\' => array($vendorDir . '/symfony/polyfill-intl-normalizer'),
    'Symfony\\Polyfill\\Intl\\Grapheme\\' => array($vendorDir . '/symfony/polyfill-intl-grapheme'),
    'PhpParser\\' => array($vendorDir . '/nikic/php-parser/lib/PhpParser'),
    'PHPStan\\PhpDocParser\\' => array($vendorDir . '/phpstan/phpdoc-parser/src'),
    'PHPStan\\BetterReflection\\' => array($vendorDir . '/ondrejmirtes/better-reflection/src'),
    'PHPStan\\' => array($baseDir . '/src'),
    'Hoa\\Zformat\\' => array($vendorDir . '/hoa/zformat'),
    'Hoa\\Visitor\\' => array($vendorDir . '/hoa/visitor'),
    'Hoa\\Ustring\\' => array($vendorDir . '/hoa/ustring'),
    'Hoa\\Stream\\' => array($vendorDir . '/hoa/stream'),
    'Hoa\\Regex\\' => array($vendorDir . '/hoa/regex'),
    'Hoa\\Protocol\\' => array($vendorDir . '/hoa/protocol'),
    'Hoa\\Math\\' => array($vendorDir . '/hoa/math'),
    'Hoa\\Iterator\\' => array($vendorDir . '/hoa/iterator'),
    'Hoa\\File\\' => array($vendorDir . '/hoa/file'),
    'Hoa\\Exception\\' => array($vendorDir . '/hoa/exception'),
    'Hoa\\Event\\' => array($vendorDir . '/hoa/event'),
    'Hoa\\Consistency\\' => array($vendorDir . '/hoa/consistency'),
    'Hoa\\Compiler\\' => array($vendorDir . '/hoa/compiler'),
);
<?php

declare (strict_types=1);
/*
 * This file is part of composer/xdebug-handler.
 *
 * (c) Composer <https://github.com/composer>
 *
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 */
namespace _PHPStan_dcc7b7cff\Composer\XdebugHandler;

/**
 * @author John Stevenson <john-stevenson@blueyonder.co.uk>
 *
 * @phpstan-type restartData array{tmpIni: string, scannedInis: bool, scanDir: false|string, phprc: false|string, inis: string[], skipped: string}
 */
class PhpConfig
{
    /**
     * Use the original PHP configuration
     *
     * @return string[] Empty array of PHP cli options
     */
    public function useOriginal() : array
    {
        $this->getDataAndReset();
        return [];
    }
    /**
     * Use standard restart settings
     *
     * @return string[] PHP cli options
     */
    public function useStandard() : array
    {
        $data = $this->getDataAndReset();
        if ($data !== null) {
            return ['-n', '-c', $data['tmpIni']];
        }
        return [];
    }
    /**
     * Use environment variables to persist settings
     *
     * @return string[] Empty array of PHP cli options
     */
    public function usePersistent() : array
    {
        $data = $this->getDataAndReset();
        if ($data !== null) {
            $this->updateEnv('PHPRC', $data['tmpIni']);
            $this->updateEnv('PHP_INI_SCAN_DIR', '');
        }
        return [];
    }
    /**
     * Returns restart data if available and resets the environment
     *
     * @phpstan-return restartData|null
     */
    private function getDataAndReset() : ?array
    {
        $data = XdebugHandler::getRestartSettings();
        if ($data !== null) {
            $this->updateEnv('PHPRC', $data['phprc']);
            $this->updateEnv('PHP_INI_SCAN_DIR', $data['scanDir']);
        }
        return $data;
    }
    /**
     * Updates a restart settings value in the environment
     *
     * @param string $name
     * @param string|false $value
     */
    private function updateEnv(string $name, $value) : void
    {
        Process::setEnv($name, \false !== $value ? $value : null);
    }
}
<?php

/*
 * This file is part of composer/xdebug-handler.
 *
 * (c) Composer <https://github.com/composer>
 *
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Composer\XdebugHandler;

use _PHPStan_dcc7b7cff\Composer\Pcre\Preg;
/**
 * Process utility functions
 *
 * @author John Stevenson <john-stevenson@blueyonder.co.uk>
 */
class Process
{
    /**
     * Escapes a string to be used as a shell argument.
     *
     * From https://github.com/johnstevenson/winbox-args
     * MIT Licensed (c) John Stevenson <john-stevenson@blueyonder.co.uk>
     *
     * @param string $arg  The argument to be escaped
     * @param bool $meta Additionally escape cmd.exe meta characters
     * @param bool $module The argument is the module to invoke
     */
    public static function escape(string $arg, bool $meta = \true, bool $module = \false) : string
    {
        if (!\defined('PHP_WINDOWS_VERSION_BUILD')) {
            return "'" . \str_replace("'", "'\\''", $arg) . "'";
        }
        $quote = \strpbrk($arg, " \t") !== \false || $arg === '';
        $arg = Preg::replace('/(\\\\*)"/', '$1$1\\"', $arg, -1, $dquotes);
        if ($meta) {
            $meta = $dquotes || Preg::isMatch('/%[^%]+%/', $arg);
            if (!$meta) {
                $quote = $quote || \strpbrk($arg, '^&|<>()') !== \false;
            } elseif ($module && !$dquotes && $quote) {
                $meta = \false;
            }
        }
        if ($quote) {
            $arg = '"' . Preg::replace('/(\\\\*)$/', '$1$1', $arg) . '"';
        }
        if ($meta) {
            $arg = Preg::replace('/(["^&|<>()%])/', '^$1', $arg);
        }
        return $arg;
    }
    /**
     * Escapes an array of arguments that make up a shell command
     *
     * @param string[] $args Argument list, with the module name first
     */
    public static function escapeShellCommand(array $args) : string
    {
        $command = '';
        $module = \array_shift($args);
        if ($module !== null) {
            $command = self::escape($module, \true, \true);
            foreach ($args as $arg) {
                $command .= ' ' . self::escape($arg);
            }
        }
        return $command;
    }
    /**
     * Makes putenv environment changes available in $_SERVER and $_ENV
     *
     * @param string $name
     * @param ?string $value A null value unsets the variable
     */
    public static function setEnv(string $name, ?string $value = null) : bool
    {
        $unset = null === $value;
        if (!\putenv($unset ? $name : $name . '=' . $value)) {
            return \false;
        }
        if ($unset) {
            unset($_SERVER[$name]);
        } else {
            $_SERVER[$name] = $value;
        }
        // Update $_ENV if it is being used
        if (\false !== \stripos((string) \ini_get('variables_order'), 'E')) {
            if ($unset) {
                unset($_ENV[$name]);
            } else {
                $_ENV[$name] = $value;
            }
        }
        return \true;
    }
}
<?php

/*
 * This file is part of composer/xdebug-handler.
 *
 * (c) Composer <https://github.com/composer>
 *
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Composer\XdebugHandler;

use _PHPStan_dcc7b7cff\Composer\Pcre\Preg;
use _PHPStan_dcc7b7cff\Psr\Log\LoggerInterface;
/**
 * @author John Stevenson <john-stevenson@blueyonder.co.uk>
 *
 * @phpstan-import-type restartData from PhpConfig
 */
class XdebugHandler
{
    const SUFFIX_ALLOW = '_ALLOW_XDEBUG';
    const SUFFIX_INIS = '_ORIGINAL_INIS';
    const RESTART_ID = 'internal';
    const RESTART_SETTINGS = 'XDEBUG_HANDLER_SETTINGS';
    const DEBUG = 'XDEBUG_HANDLER_DEBUG';
    /** @var string|null */
    protected $tmpIni;
    /** @var bool */
    private static $inRestart;
    /** @var string */
    private static $name;
    /** @var string|null */
    private static $skipped;
    /** @var bool */
    private static $xdebugActive;
    /** @var string|null */
    private static $xdebugMode;
    /** @var string|null */
    private static $xdebugVersion;
    /** @var bool */
    private $cli;
    /** @var string|null */
    private $debug;
    /** @var string */
    private $envAllowXdebug;
    /** @var string */
    private $envOriginalInis;
    /** @var bool */
    private $persistent;
    /** @var string|null */
    private $script;
    /** @var Status */
    private $statusWriter;
    /**
     * Constructor
     *
     * The $envPrefix is used to create distinct environment variables. It is
     * uppercased and prepended to the default base values. For example 'myapp'
     * would result in MYAPP_ALLOW_XDEBUG and MYAPP_ORIGINAL_INIS.
     *
     * @param string $envPrefix Value used in environment variables
     * @throws \RuntimeException If the parameter is invalid
     */
    public function __construct(string $envPrefix)
    {
        if ($envPrefix === '') {
            throw new \RuntimeException('Invalid constructor parameter');
        }
        self::$name = \strtoupper($envPrefix);
        $this->envAllowXdebug = self::$name . self::SUFFIX_ALLOW;
        $this->envOriginalInis = self::$name . self::SUFFIX_INIS;
        self::setXdebugDetails();
        self::$inRestart = \false;
        if ($this->cli = \PHP_SAPI === 'cli') {
            $this->debug = (string) \getenv(self::DEBUG);
        }
        $this->statusWriter = new Status($this->envAllowXdebug, (bool) $this->debug);
    }
    /**
     * Activates status message output to a PSR3 logger
     */
    public function setLogger(LoggerInterface $logger) : self
    {
        $this->statusWriter->setLogger($logger);
        return $this;
    }
    /**
     * Sets the main script location if it cannot be called from argv
     */
    public function setMainScript(string $script) : self
    {
        $this->script = $script;
        return $this;
    }
    /**
     * Persist the settings to keep Xdebug out of sub-processes
     */
    public function setPersistent() : self
    {
        $this->persistent = \true;
        return $this;
    }
    /**
     * Checks if Xdebug is loaded and the process needs to be restarted
     *
     * This behaviour can be disabled by setting the MYAPP_ALLOW_XDEBUG
     * environment variable to 1. This variable is used internally so that
     * the restarted process is created only once.
     */
    public function check() : void
    {
        $this->notify(Status::CHECK, self::$xdebugVersion . '|' . self::$xdebugMode);
        $envArgs = \explode('|', (string) \getenv($this->envAllowXdebug));
        if (!(bool) $envArgs[0] && $this->requiresRestart(self::$xdebugActive)) {
            // Restart required
            $this->notify(Status::RESTART);
            if ($this->prepareRestart()) {
                $command = $this->getCommand();
                $this->restart($command);
            }
            return;
        }
        if (self::RESTART_ID === $envArgs[0] && \count($envArgs) === 5) {
            // Restarted, so unset environment variable and use saved values
            $this->notify(Status::RESTARTED);
            Process::setEnv($this->envAllowXdebug);
            self::$inRestart = \true;
            if (self::$xdebugVersion === null) {
                // Skipped version is only set if Xdebug is not loaded
                self::$skipped = $envArgs[1];
            }
            $this->tryEnableSignals();
            // Put restart settings in the environment
            $this->setEnvRestartSettings($envArgs);
            return;
        }
        $this->notify(Status::NORESTART);
        $settings = self::getRestartSettings();
        if ($settings !== null) {
            // Called with existing settings, so sync our settings
            $this->syncSettings($settings);
        }
    }
    /**
     * Returns an array of php.ini locations with at least one entry
     *
     * The equivalent of calling php_ini_loaded_file then php_ini_scanned_files.
     * The loaded ini location is the first entry and may be empty.
     *
     * @return string[]
     */
    public static function getAllIniFiles() : array
    {
        if (self::$name !== null) {
            $env = \getenv(self::$name . self::SUFFIX_INIS);
            if (\false !== $env) {
                return \explode(\PATH_SEPARATOR, $env);
            }
        }
        $paths = [(string) \php_ini_loaded_file()];
        $scanned = \php_ini_scanned_files();
        if ($scanned !== \false) {
            $paths = \array_merge($paths, \array_map('trim', \explode(',', $scanned)));
        }
        return $paths;
    }
    /**
     * Returns an array of restart settings or null
     *
     * Settings will be available if the current process was restarted, or
     * called with the settings from an existing restart.
     *
     * @phpstan-return restartData|null
     */
    public static function getRestartSettings() : ?array
    {
        $envArgs = \explode('|', (string) \getenv(self::RESTART_SETTINGS));
        if (\count($envArgs) !== 6 || !self::$inRestart && \php_ini_loaded_file() !== $envArgs[0]) {
            return null;
        }
        return ['tmpIni' => $envArgs[0], 'scannedInis' => (bool) $envArgs[1], 'scanDir' => '*' === $envArgs[2] ? \false : $envArgs[2], 'phprc' => '*' === $envArgs[3] ? \false : $envArgs[3], 'inis' => \explode(\PATH_SEPARATOR, $envArgs[4]), 'skipped' => $envArgs[5]];
    }
    /**
     * Returns the Xdebug version that triggered a successful restart
     */
    public static function getSkippedVersion() : string
    {
        return (string) self::$skipped;
    }
    /**
     * Returns whether Xdebug is loaded and active
     *
     * true: if Xdebug is loaded and is running in an active mode.
     * false: if Xdebug is not loaded, or it is running with xdebug.mode=off.
     */
    public static function isXdebugActive() : bool
    {
        self::setXdebugDetails();
        return self::$xdebugActive;
    }
    /**
     * Allows an extending class to decide if there should be a restart
     *
     * The default is to restart if Xdebug is loaded and its mode is not "off".
     */
    protected function requiresRestart(bool $default) : bool
    {
        return $default;
    }
    /**
     * Allows an extending class to access the tmpIni
     *
     * @param string[] $command     *
     */
    protected function restart(array $command) : void
    {
        $this->doRestart($command);
    }
    /**
     * Executes the restarted command then deletes the tmp ini
     *
     * @param string[] $command
     * @phpstan-return never
     */
    private function doRestart(array $command) : void
    {
        $this->tryEnableSignals();
        $this->notify(Status::RESTARTING, \implode(' ', $command));
        if (\PHP_VERSION_ID >= 70400) {
            $cmd = $command;
        } else {
            $cmd = Process::escapeShellCommand($command);
            if (\defined('PHP_WINDOWS_VERSION_BUILD')) {
                // Outer quotes required on cmd string below PHP 8
                $cmd = '"' . $cmd . '"';
            }
        }
        $process = \proc_open($cmd, [], $pipes);
        if (\is_resource($process)) {
            $exitCode = \proc_close($process);
        }
        if (!isset($exitCode)) {
            // Unlikely that php or the default shell cannot be invoked
            $this->notify(Status::ERROR, 'Unable to restart process');
            $exitCode = -1;
        } else {
            $this->notify(Status::INFO, 'Restarted process exited ' . $exitCode);
        }
        if ($this->debug === '2') {
            $this->notify(Status::INFO, 'Temp ini saved: ' . $this->tmpIni);
        } else {
            @\unlink((string) $this->tmpIni);
        }
        exit($exitCode);
    }
    /**
     * Returns true if everything was written for the restart
     *
     * If any of the following fails (however unlikely) we must return false to
     * stop potential recursion:
     *   - tmp ini file creation
     *   - environment variable creation
     */
    private function prepareRestart() : bool
    {
        $error = null;
        $iniFiles = self::getAllIniFiles();
        $scannedInis = \count($iniFiles) > 1;
        $tmpDir = \sys_get_temp_dir();
        if (!$this->cli) {
            $error = 'Unsupported SAPI: ' . \PHP_SAPI;
        } elseif (!$this->checkConfiguration($info)) {
            $error = $info;
        } elseif (!$this->checkMainScript()) {
            $error = 'Unable to access main script: ' . $this->script;
        } elseif (!$this->writeTmpIni($iniFiles, $tmpDir, $error)) {
            $error = $error !== null ? $error : 'Unable to create temp ini file at: ' . $tmpDir;
        } elseif (!$this->setEnvironment($scannedInis, $iniFiles)) {
            $error = 'Unable to set environment variables';
        }
        if ($error !== null) {
            $this->notify(Status::ERROR, $error);
        }
        return $error === null;
    }
    /**
     * Returns true if the tmp ini file was written
     *
     * @param string[] $iniFiles All ini files used in the current process
     */
    private function writeTmpIni(array $iniFiles, string $tmpDir, ?string &$error) : bool
    {
        if (($tmpfile = @\tempnam($tmpDir, '')) === \false) {
            return \false;
        }
        $this->tmpIni = $tmpfile;
        // $iniFiles has at least one item and it may be empty
        if ($iniFiles[0] === '') {
            \array_shift($iniFiles);
        }
        $content = '';
        $sectionRegex = '/^\\s*\\[(?:PATH|HOST)\\s*=/mi';
        $xdebugRegex = '/^\\s*(zend_extension\\s*=.*xdebug.*)$/mi';
        foreach ($iniFiles as $file) {
            // Check for inaccessible ini files
            if (($data = @\file_get_contents($file)) === \false) {
                $error = 'Unable to read ini: ' . $file;
                return \false;
            }
            // Check and remove directives after HOST and PATH sections
            if (Preg::isMatchWithOffsets($sectionRegex, $data, $matches, \PREG_OFFSET_CAPTURE)) {
                $data = \substr($data, 0, $matches[0][1]);
            }
            $content .= Preg::replace($xdebugRegex, ';$1', $data) . \PHP_EOL;
        }
        // Merge loaded settings into our ini content, if it is valid
        $config = \parse_ini_string($content);
        $loaded = \ini_get_all(null, \false);
        if (\false === $config || \false === $loaded) {
            $error = 'Unable to parse ini data';
            return \false;
        }
        $content .= $this->mergeLoadedConfig($loaded, $config);
        // Work-around for https://bugs.php.net/bug.php?id=75932
        $content .= 'opcache.enable_cli=0' . \PHP_EOL;
        return (bool) @\file_put_contents($this->tmpIni, $content);
    }
    /**
     * Returns the command line arguments for the restart
     *
     * @return string[]
     */
    private function getCommand() : array
    {
        $php = [\PHP_BINARY];
        $args = \array_slice($_SERVER['argv'], 1);
        if (!$this->persistent) {
            // Use command-line options
            \array_push($php, '-n', '-c', $this->tmpIni);
        }
        return \array_merge($php, [$this->script], $args);
    }
    /**
     * Returns true if the restart environment variables were set
     *
     * No need to update $_SERVER since this is set in the restarted process.
     *
     * @param string[] $iniFiles All ini files used in the current process
     */
    private function setEnvironment(bool $scannedInis, array $iniFiles) : bool
    {
        $scanDir = \getenv('PHP_INI_SCAN_DIR');
        $phprc = \getenv('PHPRC');
        // Make original inis available to restarted process
        if (!\putenv($this->envOriginalInis . '=' . \implode(\PATH_SEPARATOR, $iniFiles))) {
            return \false;
        }
        if ($this->persistent) {
            // Use the environment to persist the settings
            if (!\putenv('PHP_INI_SCAN_DIR=') || !\putenv('PHPRC=' . $this->tmpIni)) {
                return \false;
            }
        }
        // Flag restarted process and save values for it to use
        $envArgs = [self::RESTART_ID, self::$xdebugVersion, (int) $scannedInis, \false === $scanDir ? '*' : $scanDir, \false === $phprc ? '*' : $phprc];
        return \putenv($this->envAllowXdebug . '=' . \implode('|', $envArgs));
    }
    /**
     * Logs status messages
     */
    private function notify(string $op, ?string $data = null) : void
    {
        $this->statusWriter->report($op, $data);
    }
    /**
     * Returns default, changed and command-line ini settings
     *
     * @param mixed[] $loadedConfig All current ini settings
     * @param mixed[] $iniConfig Settings from user ini files
     *
     */
    private function mergeLoadedConfig(array $loadedConfig, array $iniConfig) : string
    {
        $content = '';
        foreach ($loadedConfig as $name => $value) {
            // Value will either be null, string or array (HHVM only)
            if (!\is_string($value) || \strpos($name, 'xdebug') === 0 || $name === 'apc.mmap_file_mask') {
                continue;
            }
            if (!isset($iniConfig[$name]) || $iniConfig[$name] !== $value) {
                // Double-quote escape each value
                $content .= $name . '="' . \addcslashes($value, '\\"') . '"' . \PHP_EOL;
            }
        }
        return $content;
    }
    /**
     * Returns true if the script name can be used
     */
    private function checkMainScript() : bool
    {
        if ($this->script !== null) {
            // Allow an application to set -- for standard input
            return \file_exists($this->script) || '--' === $this->script;
        }
        if (\file_exists($this->script = $_SERVER['argv'][0])) {
            return \true;
        }
        // Use a backtrace to resolve Phar and chdir issues.
        $trace = \debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS);
        $main = \end($trace);
        if ($main !== \false && isset($main['file'])) {
            return \file_exists($this->script = $main['file']);
        }
        return \false;
    }
    /**
     * Adds restart settings to the environment
     *
     * @param string[] $envArgs
     */
    private function setEnvRestartSettings(array $envArgs) : void
    {
        $settings = [\php_ini_loaded_file(), $envArgs[2], $envArgs[3], $envArgs[4], \getenv($this->envOriginalInis), self::$skipped];
        Process::setEnv(self::RESTART_SETTINGS, \implode('|', $settings));
    }
    /**
     * Syncs settings and the environment if called with existing settings
     *
     * @phpstan-param restartData $settings
     */
    private function syncSettings(array $settings) : void
    {
        if (\false === \getenv($this->envOriginalInis)) {
            // Called by another app, so make original inis available
            Process::setEnv($this->envOriginalInis, \implode(\PATH_SEPARATOR, $settings['inis']));
        }
        self::$skipped = $settings['skipped'];
        $this->notify(Status::INFO, 'Process called with existing restart settings');
    }
    /**
     * Returns true if there are no known configuration issues
     */
    private function checkConfiguration(?string &$info) : bool
    {
        if (!\function_exists('proc_open')) {
            $info = 'proc_open function is disabled';
            return \false;
        }
        if (\extension_loaded('uopz') && !(bool) \ini_get('uopz.disable')) {
            // uopz works at opcode level and disables exit calls
            if (\function_exists('uopz_allow_exit')) {
                @\uopz_allow_exit(\true);
            } else {
                $info = 'uopz extension is not compatible';
                return \false;
            }
        }
        // Check UNC paths when using cmd.exe
        if (\defined('PHP_WINDOWS_VERSION_BUILD') && \PHP_VERSION_ID < 70400) {
            $workingDir = \getcwd();
            if ($workingDir === \false) {
                $info = 'unable to determine working directory';
                return \false;
            }
            if (0 === \strpos($workingDir, '\\\\')) {
                $info = 'cmd.exe does not support UNC paths: ' . $workingDir;
                return \false;
            }
        }
        return \true;
    }
    /**
     * Enables async signals and control interrupts in the restarted process
     *
     * Available on Unix PHP 7.1+ with the pcntl extension and Windows PHP 7.4+.
     */
    private function tryEnableSignals() : void
    {
        if (\function_exists('pcntl_async_signals') && \function_exists('pcntl_signal')) {
            \pcntl_async_signals(\true);
            $message = 'Async signals enabled';
            if (!self::$inRestart) {
                // Restarting, so ignore SIGINT in parent
                \pcntl_signal(\SIGINT, \SIG_IGN);
            } elseif (\is_int(\pcntl_signal_get_handler(\SIGINT))) {
                // Restarted, no handler set so force default action
                \pcntl_signal(\SIGINT, \SIG_DFL);
            }
        }
        if (!self::$inRestart && \function_exists('sapi_windows_set_ctrl_handler')) {
            // Restarting, so set a handler to ignore CTRL events in the parent.
            // This ensures that CTRL+C events will be available in the child
            // process without having to enable them there, which is unreliable.
            \sapi_windows_set_ctrl_handler(function ($evt) {
            });
        }
    }
    /**
     * Sets static properties $xdebugActive, $xdebugVersion and $xdebugMode
     */
    private static function setXdebugDetails() : void
    {
        if (self::$xdebugActive !== null) {
            return;
        }
        self::$xdebugActive = \false;
        if (!\extension_loaded('xdebug')) {
            return;
        }
        $version = \phpversion('xdebug');
        self::$xdebugVersion = $version !== \false ? $version : 'unknown';
        if (\version_compare(self::$xdebugVersion, '3.1', '>=')) {
            $modes = \xdebug_info('mode');
            self::$xdebugMode = \count($modes) === 0 ? 'off' : \implode(',', $modes);
            self::$xdebugActive = self::$xdebugMode !== 'off';
            return;
        }
        // See if xdebug.mode is supported in this version
        $iniMode = \ini_get('xdebug.mode');
        if ($iniMode === \false) {
            self::$xdebugActive = \true;
            return;
        }
        // Environment value wins but cannot be empty
        $envMode = (string) \getenv('XDEBUG_MODE');
        if ($envMode !== '') {
            self::$xdebugMode = $envMode;
        } else {
            self::$xdebugMode = $iniMode !== '' ? $iniMode : 'off';
        }
        // An empty comma-separated list is treated as mode 'off'
        if (Preg::isMatch('/^,+$/', \str_replace(' ', '', self::$xdebugMode))) {
            self::$xdebugMode = 'off';
        }
        self::$xdebugActive = self::$xdebugMode !== 'off';
    }
}
<?php

/*
 * This file is part of composer/xdebug-handler.
 *
 * (c) Composer <https://github.com/composer>
 *
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Composer\XdebugHandler;

use _PHPStan_dcc7b7cff\Psr\Log\LoggerInterface;
use _PHPStan_dcc7b7cff\Psr\Log\LogLevel;
/**
 * @author John Stevenson <john-stevenson@blueyonder.co.uk>
 * @internal
 */
class Status
{
    const ENV_RESTART = 'XDEBUG_HANDLER_RESTART';
    const CHECK = 'Check';
    const ERROR = 'Error';
    const INFO = 'Info';
    const NORESTART = 'NoRestart';
    const RESTART = 'Restart';
    const RESTARTING = 'Restarting';
    const RESTARTED = 'Restarted';
    /** @var bool */
    private $debug;
    /** @var string */
    private $envAllowXdebug;
    /** @var string|null */
    private $loaded;
    /** @var LoggerInterface|null */
    private $logger;
    /** @var bool */
    private $modeOff;
    /** @var float */
    private $time;
    /**
     * @param string $envAllowXdebug Prefixed _ALLOW_XDEBUG name
     * @param bool $debug Whether debug output is required
     */
    public function __construct(string $envAllowXdebug, bool $debug)
    {
        $start = \getenv(self::ENV_RESTART);
        Process::setEnv(self::ENV_RESTART);
        $this->time = \is_numeric($start) ? \round((\microtime(\true) - $start) * 1000) : 0;
        $this->envAllowXdebug = $envAllowXdebug;
        $this->debug = $debug && \defined('STDERR');
        $this->modeOff = \false;
    }
    /**
     * Activates status message output to a PSR3 logger
     *
     * @return void
     */
    public function setLogger(LoggerInterface $logger) : void
    {
        $this->logger = $logger;
    }
    /**
     * Calls a handler method to report a message
     *
     * @throws \InvalidArgumentException If $op is not known
     */
    public function report(string $op, ?string $data) : void
    {
        if ($this->logger !== null || $this->debug) {
            $callable = [$this, 'report' . $op];
            if (!\is_callable($callable)) {
                throw new \InvalidArgumentException('Unknown op handler: ' . $op);
            }
            $params = $data !== null ? [$data] : [];
            \call_user_func_array($callable, $params);
        }
    }
    /**
     * Outputs a status message
     */
    private function output(string $text, ?string $level = null) : void
    {
        if ($this->logger !== null) {
            $this->logger->log($level !== null ? $level : LogLevel::DEBUG, $text);
        }
        if ($this->debug) {
            \fwrite(\STDERR, \sprintf('xdebug-handler[%d] %s', \getmypid(), $text . \PHP_EOL));
        }
    }
    /**
     * Checking status message
     */
    private function reportCheck(string $loaded) : void
    {
        list($version, $mode) = \explode('|', $loaded);
        if ($version !== '') {
            $this->loaded = '(' . $version . ')' . ($mode !== '' ? ' xdebug.mode=' . $mode : '');
        }
        $this->modeOff = $mode === 'off';
        $this->output('Checking ' . $this->envAllowXdebug);
    }
    /**
     * Error status message
     */
    private function reportError(string $error) : void
    {
        $this->output(\sprintf('No restart (%s)', $error), LogLevel::WARNING);
    }
    /**
     * Info status message
     */
    private function reportInfo(string $info) : void
    {
        $this->output($info);
    }
    /**
     * No restart status message
     */
    private function reportNoRestart() : void
    {
        $this->output($this->getLoadedMessage());
        if ($this->loaded !== null) {
            $text = \sprintf('No restart (%s)', $this->getEnvAllow());
            if (!(bool) \getenv($this->envAllowXdebug)) {
                $text .= ' Allowed by ' . ($this->modeOff ? 'xdebug.mode' : 'application');
            }
            $this->output($text);
        }
    }
    /**
     * Restart status message
     */
    private function reportRestart() : void
    {
        $this->output($this->getLoadedMessage());
        Process::setEnv(self::ENV_RESTART, (string) \microtime(\true));
    }
    /**
     * Restarted status message
     */
    private function reportRestarted() : void
    {
        $loaded = $this->getLoadedMessage();
        $text = \sprintf('Restarted (%d ms). %s', $this->time, $loaded);
        $level = $this->loaded !== null ? LogLevel::WARNING : null;
        $this->output($text, $level);
    }
    /**
     * Restarting status message
     */
    private function reportRestarting(string $command) : void
    {
        $text = \sprintf('Process restarting (%s)', $this->getEnvAllow());
        $this->output($text);
        $text = 'Running ' . $command;
        $this->output($text);
    }
    /**
     * Returns the _ALLOW_XDEBUG environment variable as name=value
     */
    private function getEnvAllow() : string
    {
        return $this->envAllowXdebug . '=' . \getenv($this->envAllowXdebug);
    }
    /**
     * Returns the Xdebug status and version
     */
    private function getLoadedMessage() : string
    {
        $loaded = $this->loaded !== null ? \sprintf('loaded %s', $this->loaded) : 'not loaded';
        return 'The Xdebug extension is ' . $loaded;
    }
}
MIT License

Copyright (c) 2017 Composer

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
<?php

// autoload_files.php @generated by Composer

$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);

return array(
    'e88992873b7765f9b5710cab95ba5dd7' => $vendorDir . '/hoa/consistency/Prelude.php',
    '3e76f7f02b41af8cea96018933f6b7e3' => $vendorDir . '/hoa/protocol/Wrapper.php',
    'ad155f8f1cf0d418fe49e248db8c661b' => $vendorDir . '/react/promise/src/functions_include.php',
    '972fda704d680a3a53c68e34e193cb22' => $vendorDir . '/react/promise-timer/src/functions_include.php',
    'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
    '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
    '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
    '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
    '8825ede83f2f289127722d4e842cf7e8' => $vendorDir . '/symfony/polyfill-intl-grapheme/bootstrap.php',
    'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
    'fe1d4898277c26748a003292f432cd3b' => $vendorDir . '/jetbrains/phpstorm-stubs/PhpStormStubsMap.php',
    'ebf8799635f67b5d7248946fe2154f4a' => $vendorDir . '/ringcentral/psr7/src/functions_include.php',
    '0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php',
    'b6b991a57620e2fb6b2f66f03fe9ddc2' => $vendorDir . '/symfony/string/Resources/functions.php',
    'c4e03ecd470d2a87804979c0a8152284' => $vendorDir . '/react/async/src/functions_include.php',
    'b686b8e46447868025a15ce5d0cb2634' => $vendorDir . '/symfony/polyfill-php74/bootstrap.php',
    '8b3b25e11e82753923d43e298a70dcd0' => $baseDir . '/src/dumpType.php',
    '9662279e3e75f737d93030252673bf2d' => $baseDir . '/src/autoloadFunctions.php',
    '1a2eab53065eff9692bac238d15cc8cb' => $baseDir . '/src/Testing/functions.php',
);
<?php

// autoload_namespaces.php @generated by Composer

$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);

return array(
);
<?php

// autoload_classmap.php @generated by Composer

$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);

return array(
    'Attribute' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
    'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
    'Hoa\\Compiler\\Bin\\Pp' => $vendorDir . '/hoa/compiler/Bin/Pp.php',
    'Hoa\\Compiler\\Exception\\Exception' => $vendorDir . '/hoa/compiler/Exception/Exception.php',
    'Hoa\\Compiler\\Exception\\FinalStateHasNotBeenReached' => $vendorDir . '/hoa/compiler/Exception/FinalStateHasNotBeenReached.php',
    'Hoa\\Compiler\\Exception\\IllegalToken' => $vendorDir . '/hoa/compiler/Exception/IllegalToken.php',
    'Hoa\\Compiler\\Exception\\Lexer' => $vendorDir . '/hoa/compiler/Exception/Lexer.php',
    'Hoa\\Compiler\\Exception\\Rule' => $vendorDir . '/hoa/compiler/Exception/Rule.php',
    'Hoa\\Compiler\\Exception\\UnexpectedToken' => $vendorDir . '/hoa/compiler/Exception/UnexpectedToken.php',
    'Hoa\\Compiler\\Exception\\UnrecognizedToken' => $vendorDir . '/hoa/compiler/Exception/UnrecognizedToken.php',
    'Hoa\\Compiler\\Ll1' => $vendorDir . '/hoa/compiler/Ll1.php',
    'Hoa\\Compiler\\Llk\\Lexer' => $vendorDir . '/hoa/compiler/Llk/Lexer.php',
    'Hoa\\Compiler\\Llk\\Llk' => $vendorDir . '/hoa/compiler/Llk/Llk.php',
    'Hoa\\Compiler\\Llk\\Parser' => $vendorDir . '/hoa/compiler/Llk/Parser.php',
    'Hoa\\Compiler\\Llk\\Rule\\Analyzer' => $vendorDir . '/hoa/compiler/Llk/Rule/Analyzer.php',
    'Hoa\\Compiler\\Llk\\Rule\\Choice' => $vendorDir . '/hoa/compiler/Llk/Rule/Choice.php',
    'Hoa\\Compiler\\Llk\\Rule\\Concatenation' => $vendorDir . '/hoa/compiler/Llk/Rule/Concatenation.php',
    'Hoa\\Compiler\\Llk\\Rule\\Ekzit' => $vendorDir . '/hoa/compiler/Llk/Rule/Ekzit.php',
    'Hoa\\Compiler\\Llk\\Rule\\Entry' => $vendorDir . '/hoa/compiler/Llk/Rule/Entry.php',
    'Hoa\\Compiler\\Llk\\Rule\\Invocation' => $vendorDir . '/hoa/compiler/Llk/Rule/Invocation.php',
    'Hoa\\Compiler\\Llk\\Rule\\Repetition' => $vendorDir . '/hoa/compiler/Llk/Rule/Repetition.php',
    'Hoa\\Compiler\\Llk\\Rule\\Rule' => $vendorDir . '/hoa/compiler/Llk/Rule/Rule.php',
    'Hoa\\Compiler\\Llk\\Rule\\Token' => $vendorDir . '/hoa/compiler/Llk/Rule/Token.php',
    'Hoa\\Compiler\\Llk\\Sampler\\BoundedExhaustive' => $vendorDir . '/hoa/compiler/Llk/Sampler/BoundedExhaustive.php',
    'Hoa\\Compiler\\Llk\\Sampler\\Coverage' => $vendorDir . '/hoa/compiler/Llk/Sampler/Coverage.php',
    'Hoa\\Compiler\\Llk\\Sampler\\Exception' => $vendorDir . '/hoa/compiler/Llk/Sampler/Exception.php',
    'Hoa\\Compiler\\Llk\\Sampler\\Sampler' => $vendorDir . '/hoa/compiler/Llk/Sampler/Sampler.php',
    'Hoa\\Compiler\\Llk\\Sampler\\Uniform' => $vendorDir . '/hoa/compiler/Llk/Sampler/Uniform.php',
    'Hoa\\Compiler\\Llk\\TreeNode' => $vendorDir . '/hoa/compiler/Llk/TreeNode.php',
    'Hoa\\Compiler\\Visitor\\Dump' => $vendorDir . '/hoa/compiler/Visitor/Dump.php',
    'Hoa\\Consistency\\Autoloader' => $vendorDir . '/hoa/consistency/Autoloader.php',
    'Hoa\\Consistency\\Consistency' => $vendorDir . '/hoa/consistency/Consistency.php',
    'Hoa\\Consistency\\Exception' => $vendorDir . '/hoa/consistency/Exception.php',
    'Hoa\\Consistency\\Xcallable' => $vendorDir . '/hoa/consistency/Xcallable.php',
    'Hoa\\Event\\Bucket' => $vendorDir . '/hoa/event/Bucket.php',
    'Hoa\\Event\\Event' => $vendorDir . '/hoa/event/Event.php',
    'Hoa\\Event\\Exception' => $vendorDir . '/hoa/event/Exception.php',
    'Hoa\\Event\\Listenable' => $vendorDir . '/hoa/event/Listenable.php',
    'Hoa\\Event\\Listener' => $vendorDir . '/hoa/event/Listener.php',
    'Hoa\\Event\\Listens' => $vendorDir . '/hoa/event/Listens.php',
    'Hoa\\Event\\Source' => $vendorDir . '/hoa/event/Source.php',
    'Hoa\\Exception\\Error' => $vendorDir . '/hoa/exception/Error.php',
    'Hoa\\Exception\\Exception' => $vendorDir . '/hoa/exception/Exception.php',
    'Hoa\\Exception\\Group' => $vendorDir . '/hoa/exception/Group.php',
    'Hoa\\Exception\\Idle' => $vendorDir . '/hoa/exception/Idle.php',
    'Hoa\\File\\Directory' => $vendorDir . '/hoa/file/Directory.php',
    'Hoa\\File\\Exception\\Exception' => $vendorDir . '/hoa/file/Exception/Exception.php',
    'Hoa\\File\\Exception\\FileDoesNotExist' => $vendorDir . '/hoa/file/Exception/FileDoesNotExist.php',
    'Hoa\\File\\File' => $vendorDir . '/hoa/file/File.php',
    'Hoa\\File\\Finder' => $vendorDir . '/hoa/file/Finder.php',
    'Hoa\\File\\Generic' => $vendorDir . '/hoa/file/Generic.php',
    'Hoa\\File\\Link\\Link' => $vendorDir . '/hoa/file/Link/Link.php',
    'Hoa\\File\\Link\\Read' => $vendorDir . '/hoa/file/Link/Read.php',
    'Hoa\\File\\Link\\ReadWrite' => $vendorDir . '/hoa/file/Link/ReadWrite.php',
    'Hoa\\File\\Link\\Write' => $vendorDir . '/hoa/file/Link/Write.php',
    'Hoa\\File\\Read' => $vendorDir . '/hoa/file/Read.php',
    'Hoa\\File\\ReadWrite' => $vendorDir . '/hoa/file/ReadWrite.php',
    'Hoa\\File\\SplFileInfo' => $vendorDir . '/hoa/file/SplFileInfo.php',
    'Hoa\\File\\Temporary\\Read' => $vendorDir . '/hoa/file/Temporary/Read.php',
    'Hoa\\File\\Temporary\\ReadWrite' => $vendorDir . '/hoa/file/Temporary/ReadWrite.php',
    'Hoa\\File\\Temporary\\Temporary' => $vendorDir . '/hoa/file/Temporary/Temporary.php',
    'Hoa\\File\\Temporary\\Write' => $vendorDir . '/hoa/file/Temporary/Write.php',
    'Hoa\\File\\Watcher' => $vendorDir . '/hoa/file/Watcher.php',
    'Hoa\\File\\Write' => $vendorDir . '/hoa/file/Write.php',
    'Hoa\\Iterator\\Aggregate' => $vendorDir . '/hoa/iterator/Aggregate.php',
    'Hoa\\Iterator\\Append' => $vendorDir . '/hoa/iterator/Append.php',
    'Hoa\\Iterator\\Buffer' => $vendorDir . '/hoa/iterator/Buffer.php',
    'Hoa\\Iterator\\CallbackFilter' => $vendorDir . '/hoa/iterator/CallbackFilter.php',
    'Hoa\\Iterator\\CallbackGenerator' => $vendorDir . '/hoa/iterator/CallbackGenerator.php',
    'Hoa\\Iterator\\Counter' => $vendorDir . '/hoa/iterator/Counter.php',
    'Hoa\\Iterator\\Demultiplexer' => $vendorDir . '/hoa/iterator/Demultiplexer.php',
    'Hoa\\Iterator\\Directory' => $vendorDir . '/hoa/iterator/Directory.php',
    'Hoa\\Iterator\\Exception' => $vendorDir . '/hoa/iterator/Exception.php',
    'Hoa\\Iterator\\FileSystem' => $vendorDir . '/hoa/iterator/FileSystem.php',
    'Hoa\\Iterator\\Filter' => $vendorDir . '/hoa/iterator/Filter.php',
    'Hoa\\Iterator\\Glob' => $vendorDir . '/hoa/iterator/Glob.php',
    'Hoa\\Iterator\\Infinite' => $vendorDir . '/hoa/iterator/Infinite.php',
    'Hoa\\Iterator\\Iterator' => $vendorDir . '/hoa/iterator/Iterator.php',
    'Hoa\\Iterator\\IteratorIterator' => $vendorDir . '/hoa/iterator/IteratorIterator.php',
    'Hoa\\Iterator\\Limit' => $vendorDir . '/hoa/iterator/Limit.php',
    'Hoa\\Iterator\\Lookahead' => $vendorDir . '/hoa/iterator/Lookahead.php',
    'Hoa\\Iterator\\Lookbehind' => $vendorDir . '/hoa/iterator/Lookbehind.php',
    'Hoa\\Iterator\\Map' => $vendorDir . '/hoa/iterator/Map.php',
    'Hoa\\Iterator\\Mock' => $vendorDir . '/hoa/iterator/Mock.php',
    'Hoa\\Iterator\\Multiple' => $vendorDir . '/hoa/iterator/Multiple.php',
    'Hoa\\Iterator\\NoRewind' => $vendorDir . '/hoa/iterator/NoRewind.php',
    'Hoa\\Iterator\\Outer' => $vendorDir . '/hoa/iterator/Outer.php',
    'Hoa\\Iterator\\Recursive\\CallbackFilter' => $vendorDir . '/hoa/iterator/Recursive/CallbackFilter.php',
    'Hoa\\Iterator\\Recursive\\Directory' => $vendorDir . '/hoa/iterator/Recursive/Directory.php',
    'Hoa\\Iterator\\Recursive\\Filter' => $vendorDir . '/hoa/iterator/Recursive/Filter.php',
    'Hoa\\Iterator\\Recursive\\Iterator' => $vendorDir . '/hoa/iterator/Recursive/Iterator.php',
    'Hoa\\Iterator\\Recursive\\Map' => $vendorDir . '/hoa/iterator/Recursive/Map.php',
    'Hoa\\Iterator\\Recursive\\Mock' => $vendorDir . '/hoa/iterator/Recursive/Mock.php',
    'Hoa\\Iterator\\Recursive\\Recursive' => $vendorDir . '/hoa/iterator/Recursive/Recursive.php',
    'Hoa\\Iterator\\Recursive\\RegularExpression' => $vendorDir . '/hoa/iterator/Recursive/RegularExpression.php',
    'Hoa\\Iterator\\RegularExpression' => $vendorDir . '/hoa/iterator/RegularExpression.php',
    'Hoa\\Iterator\\Repeater' => $vendorDir . '/hoa/iterator/Repeater.php',
    'Hoa\\Iterator\\Seekable' => $vendorDir . '/hoa/iterator/Seekable.php',
    'Hoa\\Iterator\\SplFileInfo' => $vendorDir . '/hoa/iterator/SplFileInfo.php',
    'Hoa\\Math\\Bin\\Calc' => $vendorDir . '/hoa/math/Bin/Calc.php',
    'Hoa\\Math\\Combinatorics\\Combination\\CartesianProduct' => $vendorDir . '/hoa/math/Combinatorics/Combination/CartesianProduct.php',
    'Hoa\\Math\\Combinatorics\\Combination\\Combination' => $vendorDir . '/hoa/math/Combinatorics/Combination/Combination.php',
    'Hoa\\Math\\Combinatorics\\Combination\\Gamma' => $vendorDir . '/hoa/math/Combinatorics/Combination/Gamma.php',
    'Hoa\\Math\\Context' => $vendorDir . '/hoa/math/Context.php',
    'Hoa\\Math\\Exception\\AlreadyDefinedConstant' => $vendorDir . '/hoa/math/Exception/AlreadyDefinedConstant.php',
    'Hoa\\Math\\Exception\\Exception' => $vendorDir . '/hoa/math/Exception/Exception.php',
    'Hoa\\Math\\Exception\\UnknownConstant' => $vendorDir . '/hoa/math/Exception/UnknownConstant.php',
    'Hoa\\Math\\Exception\\UnknownFunction' => $vendorDir . '/hoa/math/Exception/UnknownFunction.php',
    'Hoa\\Math\\Exception\\UnknownVariable' => $vendorDir . '/hoa/math/Exception/UnknownVariable.php',
    'Hoa\\Math\\Sampler\\Random' => $vendorDir . '/hoa/math/Sampler/Random.php',
    'Hoa\\Math\\Sampler\\Sampler' => $vendorDir . '/hoa/math/Sampler/Sampler.php',
    'Hoa\\Math\\Util' => $vendorDir . '/hoa/math/Util.php',
    'Hoa\\Math\\Visitor\\Arithmetic' => $vendorDir . '/hoa/math/Visitor/Arithmetic.php',
    'Hoa\\Protocol\\Bin\\Resolve' => $vendorDir . '/hoa/protocol/Bin/Resolve.php',
    'Hoa\\Protocol\\Exception' => $vendorDir . '/hoa/protocol/Exception.php',
    'Hoa\\Protocol\\Node\\Library' => $vendorDir . '/hoa/protocol/Node/Library.php',
    'Hoa\\Protocol\\Node\\Node' => $vendorDir . '/hoa/protocol/Node/Node.php',
    'Hoa\\Protocol\\Protocol' => $vendorDir . '/hoa/protocol/Protocol.php',
    'Hoa\\Protocol\\Wrapper' => $vendorDir . '/hoa/protocol/Wrapper.php',
    'Hoa\\Regex\\Exception' => $vendorDir . '/hoa/regex/Exception.php',
    'Hoa\\Regex\\Visitor\\Isotropic' => $vendorDir . '/hoa/regex/Visitor/Isotropic.php',
    'Hoa\\Stream\\Bucket' => $vendorDir . '/hoa/stream/Bucket.php',
    'Hoa\\Stream\\Composite' => $vendorDir . '/hoa/stream/Composite.php',
    'Hoa\\Stream\\Context' => $vendorDir . '/hoa/stream/Context.php',
    'Hoa\\Stream\\Exception' => $vendorDir . '/hoa/stream/Exception.php',
    'Hoa\\Stream\\Filter\\Basic' => $vendorDir . '/hoa/stream/Filter/Basic.php',
    'Hoa\\Stream\\Filter\\Exception' => $vendorDir . '/hoa/stream/Filter/Exception.php',
    'Hoa\\Stream\\Filter\\Filter' => $vendorDir . '/hoa/stream/Filter/Filter.php',
    'Hoa\\Stream\\Filter\\LateComputed' => $vendorDir . '/hoa/stream/Filter/LateComputed.php',
    'Hoa\\Stream\\IStream\\Bufferable' => $vendorDir . '/hoa/stream/IStream/Bufferable.php',
    'Hoa\\Stream\\IStream\\In' => $vendorDir . '/hoa/stream/IStream/In.php',
    'Hoa\\Stream\\IStream\\Lockable' => $vendorDir . '/hoa/stream/IStream/Lockable.php',
    'Hoa\\Stream\\IStream\\Out' => $vendorDir . '/hoa/stream/IStream/Out.php',
    'Hoa\\Stream\\IStream\\Pathable' => $vendorDir . '/hoa/stream/IStream/Pathable.php',
    'Hoa\\Stream\\IStream\\Pointable' => $vendorDir . '/hoa/stream/IStream/Pointable.php',
    'Hoa\\Stream\\IStream\\Statable' => $vendorDir . '/hoa/stream/IStream/Statable.php',
    'Hoa\\Stream\\IStream\\Stream' => $vendorDir . '/hoa/stream/IStream/Stream.php',
    'Hoa\\Stream\\IStream\\Structural' => $vendorDir . '/hoa/stream/IStream/Structural.php',
    'Hoa\\Stream\\IStream\\Touchable' => $vendorDir . '/hoa/stream/IStream/Touchable.php',
    'Hoa\\Stream\\Stream' => $vendorDir . '/hoa/stream/Stream.php',
    'Hoa\\Stream\\Wrapper\\Exception' => $vendorDir . '/hoa/stream/Wrapper/Exception.php',
    'Hoa\\Stream\\Wrapper\\IWrapper\\File' => $vendorDir . '/hoa/stream/Wrapper/IWrapper/File.php',
    'Hoa\\Stream\\Wrapper\\IWrapper\\IWrapper' => $vendorDir . '/hoa/stream/Wrapper/IWrapper/IWrapper.php',
    'Hoa\\Stream\\Wrapper\\IWrapper\\Stream' => $vendorDir . '/hoa/stream/Wrapper/IWrapper/Stream.php',
    'Hoa\\Stream\\Wrapper\\Wrapper' => $vendorDir . '/hoa/stream/Wrapper/Wrapper.php',
    'Hoa\\Ustring\\Bin\\Fromcode' => $vendorDir . '/hoa/ustring/Bin/Fromcode.php',
    'Hoa\\Ustring\\Bin\\Tocode' => $vendorDir . '/hoa/ustring/Bin/Tocode.php',
    'Hoa\\Ustring\\Exception' => $vendorDir . '/hoa/ustring/Exception.php',
    'Hoa\\Ustring\\Search' => $vendorDir . '/hoa/ustring/Search.php',
    'Hoa\\Ustring\\Ustring' => $vendorDir . '/hoa/ustring/Ustring.php',
    'Hoa\\Visitor\\Element' => $vendorDir . '/hoa/visitor/Element.php',
    'Hoa\\Visitor\\Visit' => $vendorDir . '/hoa/visitor/Visit.php',
    'Hoa\\Zformat\\Exception' => $vendorDir . '/hoa/zformat/Exception.php',
    'Hoa\\Zformat\\Parameter' => $vendorDir . '/hoa/zformat/Parameter.php',
    'Hoa\\Zformat\\Parameterizable' => $vendorDir . '/hoa/zformat/Parameterizable.php',
    'JsonException' => $vendorDir . '/symfony/polyfill-php73/Resources/stubs/JsonException.php',
    'Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
    'PHPStan\\AnalysedCodeException' => $baseDir . '/src/AnalysedCodeException.php',
    'PHPStan\\Analyser\\Analyser' => $baseDir . '/src/Analyser/Analyser.php',
    'PHPStan\\Analyser\\AnalyserResult' => $baseDir . '/src/Analyser/AnalyserResult.php',
    'PHPStan\\Analyser\\ArgumentsNormalizer' => $baseDir . '/src/Analyser/ArgumentsNormalizer.php',
    'PHPStan\\Analyser\\ConditionalExpressionHolder' => $baseDir . '/src/Analyser/ConditionalExpressionHolder.php',
    'PHPStan\\Analyser\\ConstantResolver' => $baseDir . '/src/Analyser/ConstantResolver.php',
    'PHPStan\\Analyser\\ConstantResolverFactory' => $baseDir . '/src/Analyser/ConstantResolverFactory.php',
    'PHPStan\\Analyser\\DirectInternalScopeFactory' => $baseDir . '/src/Analyser/DirectInternalScopeFactory.php',
    'PHPStan\\Analyser\\EnsuredNonNullabilityResult' => $baseDir . '/src/Analyser/EnsuredNonNullabilityResult.php',
    'PHPStan\\Analyser\\EnsuredNonNullabilityResultExpression' => $baseDir . '/src/Analyser/EnsuredNonNullabilityResultExpression.php',
    'PHPStan\\Analyser\\Error' => $baseDir . '/src/Analyser/Error.php',
    'PHPStan\\Analyser\\ExpressionContext' => $baseDir . '/src/Analyser/ExpressionContext.php',
    'PHPStan\\Analyser\\ExpressionResult' => $baseDir . '/src/Analyser/ExpressionResult.php',
    'PHPStan\\Analyser\\ExpressionTypeHolder' => $baseDir . '/src/Analyser/ExpressionTypeHolder.php',
    'PHPStan\\Analyser\\FileAnalyser' => $baseDir . '/src/Analyser/FileAnalyser.php',
    'PHPStan\\Analyser\\FileAnalyserResult' => $baseDir . '/src/Analyser/FileAnalyserResult.php',
    'PHPStan\\Analyser\\IgnoredError' => $baseDir . '/src/Analyser/IgnoredError.php',
    'PHPStan\\Analyser\\IgnoredErrorHelper' => $baseDir . '/src/Analyser/IgnoredErrorHelper.php',
    'PHPStan\\Analyser\\IgnoredErrorHelperResult' => $baseDir . '/src/Analyser/IgnoredErrorHelperResult.php',
    'PHPStan\\Analyser\\InternalScopeFactory' => $baseDir . '/src/Analyser/InternalScopeFactory.php',
    'PHPStan\\Analyser\\LazyInternalScopeFactory' => $baseDir . '/src/Analyser/LazyInternalScopeFactory.php',
    'PHPStan\\Analyser\\MutatingScope' => $baseDir . '/src/Analyser/MutatingScope.php',
    'PHPStan\\Analyser\\NameScope' => $baseDir . '/src/Analyser/NameScope.php',
    'PHPStan\\Analyser\\NodeScopeResolver' => $baseDir . '/src/Analyser/NodeScopeResolver.php',
    'PHPStan\\Analyser\\NullsafeOperatorHelper' => $baseDir . '/src/Analyser/NullsafeOperatorHelper.php',
    'PHPStan\\Analyser\\OutOfClassScope' => $baseDir . '/src/Analyser/OutOfClassScope.php',
    'PHPStan\\Analyser\\ResultCache\\ResultCache' => $baseDir . '/src/Analyser/ResultCache/ResultCache.php',
    'PHPStan\\Analyser\\ResultCache\\ResultCacheClearer' => $baseDir . '/src/Analyser/ResultCache/ResultCacheClearer.php',
    'PHPStan\\Analyser\\ResultCache\\ResultCacheManager' => $baseDir . '/src/Analyser/ResultCache/ResultCacheManager.php',
    'PHPStan\\Analyser\\ResultCache\\ResultCacheManagerFactory' => $baseDir . '/src/Analyser/ResultCache/ResultCacheManagerFactory.php',
    'PHPStan\\Analyser\\ResultCache\\ResultCacheProcessResult' => $baseDir . '/src/Analyser/ResultCache/ResultCacheProcessResult.php',
    'PHPStan\\Analyser\\RuleErrorTransformer' => $baseDir . '/src/Analyser/RuleErrorTransformer.php',
    'PHPStan\\Analyser\\Scope' => $baseDir . '/src/Analyser/Scope.php',
    'PHPStan\\Analyser\\ScopeContext' => $baseDir . '/src/Analyser/ScopeContext.php',
    'PHPStan\\Analyser\\ScopeFactory' => $baseDir . '/src/Analyser/ScopeFactory.php',
    'PHPStan\\Analyser\\SpecifiedTypes' => $baseDir . '/src/Analyser/SpecifiedTypes.php',
    'PHPStan\\Analyser\\StatementContext' => $baseDir . '/src/Analyser/StatementContext.php',
    'PHPStan\\Analyser\\StatementExitPoint' => $baseDir . '/src/Analyser/StatementExitPoint.php',
    'PHPStan\\Analyser\\StatementResult' => $baseDir . '/src/Analyser/StatementResult.php',
    'PHPStan\\Analyser\\ThrowPoint' => $baseDir . '/src/Analyser/ThrowPoint.php',
    'PHPStan\\Analyser\\TypeSpecifier' => $baseDir . '/src/Analyser/TypeSpecifier.php',
    'PHPStan\\Analyser\\TypeSpecifierAwareExtension' => $baseDir . '/src/Analyser/TypeSpecifierAwareExtension.php',
    'PHPStan\\Analyser\\TypeSpecifierContext' => $baseDir . '/src/Analyser/TypeSpecifierContext.php',
    'PHPStan\\Analyser\\TypeSpecifierFactory' => $baseDir . '/src/Analyser/TypeSpecifierFactory.php',
    'PHPStan\\Analyser\\UndefinedVariableException' => $baseDir . '/src/Analyser/UndefinedVariableException.php',
    'PHPStan\\BetterReflection\\BetterReflection' => $vendorDir . '/ondrejmirtes/better-reflection/src/BetterReflection.php',
    'PHPStan\\BetterReflection\\Identifier\\Exception\\InvalidIdentifierName' => $vendorDir . '/ondrejmirtes/better-reflection/src/Identifier/Exception/InvalidIdentifierName.php',
    'PHPStan\\BetterReflection\\Identifier\\Identifier' => $vendorDir . '/ondrejmirtes/better-reflection/src/Identifier/Identifier.php',
    'PHPStan\\BetterReflection\\Identifier\\IdentifierType' => $vendorDir . '/ondrejmirtes/better-reflection/src/Identifier/IdentifierType.php',
    'PHPStan\\BetterReflection\\NodeCompiler\\CompileNodeToValue' => $vendorDir . '/ondrejmirtes/better-reflection/src/NodeCompiler/CompileNodeToValue.php',
    'PHPStan\\BetterReflection\\NodeCompiler\\CompiledValue' => $vendorDir . '/ondrejmirtes/better-reflection/src/NodeCompiler/CompiledValue.php',
    'PHPStan\\BetterReflection\\NodeCompiler\\CompilerContext' => $vendorDir . '/ondrejmirtes/better-reflection/src/NodeCompiler/CompilerContext.php',
    'PHPStan\\BetterReflection\\NodeCompiler\\Exception\\UnableToCompileNode' => $vendorDir . '/ondrejmirtes/better-reflection/src/NodeCompiler/Exception/UnableToCompileNode.php',
    'PHPStan\\BetterReflection\\Reflection\\Adapter\\Exception\\NotImplemented' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/Exception/NotImplemented.php',
    'PHPStan\\BetterReflection\\Reflection\\Adapter\\FakeReflectionAttribute' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/FakeReflectionAttribute.php',
    'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionAttribute' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionAttribute.php',
    'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionAttributeFactory' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionAttributeFactory.php',
    'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionClass' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionClass.php',
    'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionClassConstant' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionClassConstant.php',
    'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionEnum' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionEnum.php',
    'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionEnumBackedCase' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionEnumBackedCase.php',
    'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionEnumUnitCase' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionEnumUnitCase.php',
    'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionFunction' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionFunction.php',
    'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionIntersectionType' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionIntersectionType.php',
    'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionMethod' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionMethod.php',
    'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionNamedType' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionNamedType.php',
    'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionObject' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionObject.php',
    'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionParameter' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionParameter.php',
    'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionProperty' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionProperty.php',
    'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionType' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionType.php',
    'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionUnionType' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionUnionType.php',
    'PHPStan\\BetterReflection\\Reflection\\Annotation\\AnnotationHelper' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Annotation/AnnotationHelper.php',
    'PHPStan\\BetterReflection\\Reflection\\Attribute\\ReflectionAttributeHelper' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Attribute/ReflectionAttributeHelper.php',
    'PHPStan\\BetterReflection\\Reflection\\Exception\\CircularReference' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Exception/CircularReference.php',
    'PHPStan\\BetterReflection\\Reflection\\Exception\\ClassDoesNotExist' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Exception/ClassDoesNotExist.php',
    'PHPStan\\BetterReflection\\Reflection\\Exception\\CodeLocationMissing' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Exception/CodeLocationMissing.php',
    'PHPStan\\BetterReflection\\Reflection\\Exception\\FunctionDoesNotExist' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Exception/FunctionDoesNotExist.php',
    'PHPStan\\BetterReflection\\Reflection\\Exception\\InvalidArrowFunctionBodyNode' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Exception/InvalidArrowFunctionBodyNode.php',
    'PHPStan\\BetterReflection\\Reflection\\Exception\\InvalidConstantNode' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Exception/InvalidConstantNode.php',
    'PHPStan\\BetterReflection\\Reflection\\Exception\\InvalidDefaultValueType' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Exception/InvalidDefaultValueType.php',
    'PHPStan\\BetterReflection\\Reflection\\Exception\\MethodPrototypeNotFound' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Exception/MethodPrototypeNotFound.php',
    'PHPStan\\BetterReflection\\Reflection\\Exception\\NoObjectProvided' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Exception/NoObjectProvided.php',
    'PHPStan\\BetterReflection\\Reflection\\Exception\\NoParent' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Exception/NoParent.php',
    'PHPStan\\BetterReflection\\Reflection\\Exception\\NotAClassReflection' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Exception/NotAClassReflection.php',
    'PHPStan\\BetterReflection\\Reflection\\Exception\\NotAnInterfaceReflection' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Exception/NotAnInterfaceReflection.php',
    'PHPStan\\BetterReflection\\Reflection\\Exception\\NotAnObject' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Exception/NotAnObject.php',
    'PHPStan\\BetterReflection\\Reflection\\Exception\\ObjectNotInstanceOfClass' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Exception/ObjectNotInstanceOfClass.php',
    'PHPStan\\BetterReflection\\Reflection\\Exception\\PropertyDoesNotExist' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Exception/PropertyDoesNotExist.php',
    'PHPStan\\BetterReflection\\Reflection\\Exception\\PropertyIsNotStatic' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Exception/PropertyIsNotStatic.php',
    'PHPStan\\BetterReflection\\Reflection\\Reflection' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Reflection.php',
    'PHPStan\\BetterReflection\\Reflection\\ReflectionAttribute' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionAttribute.php',
    'PHPStan\\BetterReflection\\Reflection\\ReflectionClass' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionClass.php',
    'PHPStan\\BetterReflection\\Reflection\\ReflectionClassConstant' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionClassConstant.php',
    'PHPStan\\BetterReflection\\Reflection\\ReflectionConstant' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionConstant.php',
    'PHPStan\\BetterReflection\\Reflection\\ReflectionEnum' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionEnum.php',
    'PHPStan\\BetterReflection\\Reflection\\ReflectionEnumCase' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionEnumCase.php',
    'PHPStan\\BetterReflection\\Reflection\\ReflectionFunction' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionFunction.php',
    'PHPStan\\BetterReflection\\Reflection\\ReflectionFunctionAbstract' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionFunctionAbstract.php',
    'PHPStan\\BetterReflection\\Reflection\\ReflectionIntersectionType' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionIntersectionType.php',
    'PHPStan\\BetterReflection\\Reflection\\ReflectionMethod' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionMethod.php',
    'PHPStan\\BetterReflection\\Reflection\\ReflectionNamedType' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionNamedType.php',
    'PHPStan\\BetterReflection\\Reflection\\ReflectionObject' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionObject.php',
    'PHPStan\\BetterReflection\\Reflection\\ReflectionParameter' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionParameter.php',
    'PHPStan\\BetterReflection\\Reflection\\ReflectionProperty' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionProperty.php',
    'PHPStan\\BetterReflection\\Reflection\\ReflectionType' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionType.php',
    'PHPStan\\BetterReflection\\Reflection\\ReflectionUnionType' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionUnionType.php',
    'PHPStan\\BetterReflection\\Reflection\\StringCast\\ReflectionAttributeStringCast' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionAttributeStringCast.php',
    'PHPStan\\BetterReflection\\Reflection\\StringCast\\ReflectionClassConstantStringCast' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionClassConstantStringCast.php',
    'PHPStan\\BetterReflection\\Reflection\\StringCast\\ReflectionClassStringCast' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionClassStringCast.php',
    'PHPStan\\BetterReflection\\Reflection\\StringCast\\ReflectionConstantStringCast' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionConstantStringCast.php',
    'PHPStan\\BetterReflection\\Reflection\\StringCast\\ReflectionEnumCaseStringCast' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionEnumCaseStringCast.php',
    'PHPStan\\BetterReflection\\Reflection\\StringCast\\ReflectionFunctionStringCast' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionFunctionStringCast.php',
    'PHPStan\\BetterReflection\\Reflection\\StringCast\\ReflectionMethodStringCast' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionMethodStringCast.php',
    'PHPStan\\BetterReflection\\Reflection\\StringCast\\ReflectionParameterStringCast' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionParameterStringCast.php',
    'PHPStan\\BetterReflection\\Reflection\\StringCast\\ReflectionPropertyStringCast' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionPropertyStringCast.php',
    'PHPStan\\BetterReflection\\Reflection\\StringCast\\ReflectionTypeStringCast' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionTypeStringCast.php',
    'PHPStan\\BetterReflection\\Reflection\\Support\\AlreadyVisitedClasses' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflection/Support/AlreadyVisitedClasses.php',
    'PHPStan\\BetterReflection\\Reflector\\ClassReflector' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflector/ClassReflector.php',
    'PHPStan\\BetterReflection\\Reflector\\ConstantReflector' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflector/ConstantReflector.php',
    'PHPStan\\BetterReflection\\Reflector\\DefaultReflector' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflector/DefaultReflector.php',
    'PHPStan\\BetterReflection\\Reflector\\Exception\\IdentifierNotFound' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflector/Exception/IdentifierNotFound.php',
    'PHPStan\\BetterReflection\\Reflector\\FunctionReflector' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflector/FunctionReflector.php',
    'PHPStan\\BetterReflection\\Reflector\\Reflector' => $vendorDir . '/ondrejmirtes/better-reflection/src/Reflector/Reflector.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Ast\\Exception\\ParseToAstFailure' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Ast/Exception/ParseToAstFailure.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Ast\\FindReflectionsInTree' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Ast/FindReflectionsInTree.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Ast\\Locator' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Ast/Locator.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Ast\\Parser\\MemoizingParser' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Ast/Parser/MemoizingParser.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Ast\\Strategy\\AstConversionStrategy' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Ast/Strategy/AstConversionStrategy.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Ast\\Strategy\\NodeToReflection' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Ast/Strategy/NodeToReflection.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Exception\\EvaledAnonymousClassCannotBeLocated' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Exception/EvaledAnonymousClassCannotBeLocated.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Exception\\EvaledClosureCannotBeLocated' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Exception/EvaledClosureCannotBeLocated.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Exception\\FunctionUndefined' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Exception/FunctionUndefined.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Exception\\InvalidDirectory' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Exception/InvalidDirectory.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Exception\\InvalidFileInfo' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Exception/InvalidFileInfo.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Exception\\InvalidFileLocation' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Exception/InvalidFileLocation.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Exception\\NoAnonymousClassOnLine' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Exception/NoAnonymousClassOnLine.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Exception\\NoClosureOnLine' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Exception/NoClosureOnLine.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Exception\\NotInternalClass' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Exception/NotInternalClass.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Exception\\TwoAnonymousClassesOnSameLine' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Exception/TwoAnonymousClassesOnSameLine.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Exception\\TwoClosuresOnSameLine' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Exception/TwoClosuresOnSameLine.php',
    'PHPStan\\BetterReflection\\SourceLocator\\FileChecker' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/FileChecker.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Located\\AliasLocatedSource' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Located/AliasLocatedSource.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Located\\AnonymousLocatedSource' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Located/AnonymousLocatedSource.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Located\\EvaledLocatedSource' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Located/EvaledLocatedSource.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Located\\InternalLocatedSource' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Located/InternalLocatedSource.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Located\\LocatedSource' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Located/LocatedSource.php',
    'PHPStan\\BetterReflection\\SourceLocator\\SourceStubber\\AggregateSourceStubber' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/SourceStubber/AggregateSourceStubber.php',
    'PHPStan\\BetterReflection\\SourceLocator\\SourceStubber\\Exception\\CouldNotFindPhpStormStubs' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/SourceStubber/Exception/CouldNotFindPhpStormStubs.php',
    'PHPStan\\BetterReflection\\SourceLocator\\SourceStubber\\PhpStormStubsSourceStubber' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/SourceStubber/PhpStormStubsSourceStubber.php',
    'PHPStan\\BetterReflection\\SourceLocator\\SourceStubber\\PhpStormStubs\\CachingVisitor' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/SourceStubber/PhpStormStubs/CachingVisitor.php',
    'PHPStan\\BetterReflection\\SourceLocator\\SourceStubber\\ReflectionSourceStubber' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/SourceStubber/ReflectionSourceStubber.php',
    'PHPStan\\BetterReflection\\SourceLocator\\SourceStubber\\SourceStubber' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/SourceStubber/SourceStubber.php',
    'PHPStan\\BetterReflection\\SourceLocator\\SourceStubber\\StubData' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/SourceStubber/StubData.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\AbstractSourceLocator' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/AbstractSourceLocator.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\AggregateSourceLocator' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/AggregateSourceLocator.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\AnonymousClassObjectSourceLocator' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/AnonymousClassObjectSourceLocator.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\AutoloadSourceLocator' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/AutoloadSourceLocator.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\AutoloadSourceLocator\\FileReadTrapStreamWrapper' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/AutoloadSourceLocator/FileReadTrapStreamWrapper.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\ClosureSourceLocator' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/ClosureSourceLocator.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\ComposerSourceLocator' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/ComposerSourceLocator.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\Factory\\Exception\\Exception' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Factory/Exception/Exception.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\Factory\\Exception\\FailedToParseJson' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Factory/Exception/FailedToParseJson.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\Factory\\Exception\\InvalidProjectDirectory' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Factory/Exception/InvalidProjectDirectory.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\Factory\\Exception\\MissingComposerJson' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Factory/Exception/MissingComposerJson.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\Factory\\Exception\\MissingInstalledJson' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Factory/Exception/MissingInstalledJson.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\Factory\\MakeLocatorForComposerJson' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJson.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\Factory\\MakeLocatorForComposerJsonAndInstalledJson' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJsonAndInstalledJson.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\Factory\\MakeLocatorForInstalledJson' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Factory/MakeLocatorForInstalledJson.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\PsrAutoloaderLocator' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/PsrAutoloaderLocator.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\Psr\\Exception\\Exception' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Psr/Exception/Exception.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\Psr\\Exception\\InvalidPrefixMapping' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Psr/Exception/InvalidPrefixMapping.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\Psr\\Psr0Mapping' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Psr/Psr0Mapping.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\Psr\\Psr4Mapping' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Psr/Psr4Mapping.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\Psr\\PsrAutoloaderMapping' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Psr/PsrAutoloaderMapping.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\DirectoriesSourceLocator' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/DirectoriesSourceLocator.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\EvaledCodeSourceLocator' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/EvaledCodeSourceLocator.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\FileIteratorSourceLocator' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/FileIteratorSourceLocator.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\MemoizingSourceLocator' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/MemoizingSourceLocator.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\PhpInternalSourceLocator' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/PhpInternalSourceLocator.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\SingleFileSourceLocator' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/SingleFileSourceLocator.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\SourceLocator' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/SourceLocator.php',
    'PHPStan\\BetterReflection\\SourceLocator\\Type\\StringSourceLocator' => $vendorDir . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/StringSourceLocator.php',
    'PHPStan\\BetterReflection\\Util\\CalculateReflectionColumn' => $vendorDir . '/ondrejmirtes/better-reflection/src/Util/CalculateReflectionColumn.php',
    'PHPStan\\BetterReflection\\Util\\ClassExistenceChecker' => $vendorDir . '/ondrejmirtes/better-reflection/src/Util/ClassExistenceChecker.php',
    'PHPStan\\BetterReflection\\Util\\ConstantNodeChecker' => $vendorDir . '/ondrejmirtes/better-reflection/src/Util/ConstantNodeChecker.php',
    'PHPStan\\BetterReflection\\Util\\Exception\\InvalidNodePosition' => $vendorDir . '/ondrejmirtes/better-reflection/src/Util/Exception/InvalidNodePosition.php',
    'PHPStan\\BetterReflection\\Util\\Exception\\NoNodePosition' => $vendorDir . '/ondrejmirtes/better-reflection/src/Util/Exception/NoNodePosition.php',
    'PHPStan\\BetterReflection\\Util\\FileHelper' => $vendorDir . '/ondrejmirtes/better-reflection/src/Util/FileHelper.php',
    'PHPStan\\BetterReflection\\Util\\FindReflectionOnLine' => $vendorDir . '/ondrejmirtes/better-reflection/src/Util/FindReflectionOnLine.php',
    'PHPStan\\BetterReflection\\Util\\GetLastDocComment' => $vendorDir . '/ondrejmirtes/better-reflection/src/Util/GetLastDocComment.php',
    'PHPStan\\Broker\\AnonymousClassNameHelper' => $baseDir . '/src/Broker/AnonymousClassNameHelper.php',
    'PHPStan\\Broker\\Broker' => $baseDir . '/src/Broker/Broker.php',
    'PHPStan\\Broker\\BrokerFactory' => $baseDir . '/src/Broker/BrokerFactory.php',
    'PHPStan\\Broker\\ClassAutoloadingException' => $baseDir . '/src/Broker/ClassAutoloadingException.php',
    'PHPStan\\Broker\\ClassNotFoundException' => $baseDir . '/src/Broker/ClassNotFoundException.php',
    'PHPStan\\Broker\\ConstantNotFoundException' => $baseDir . '/src/Broker/ConstantNotFoundException.php',
    'PHPStan\\Broker\\FunctionNotFoundException' => $baseDir . '/src/Broker/FunctionNotFoundException.php',
    'PHPStan\\Cache\\Cache' => $baseDir . '/src/Cache/Cache.php',
    'PHPStan\\Cache\\CacheItem' => $baseDir . '/src/Cache/CacheItem.php',
    'PHPStan\\Cache\\CacheStorage' => $baseDir . '/src/Cache/CacheStorage.php',
    'PHPStan\\Cache\\FileCacheStorage' => $baseDir . '/src/Cache/FileCacheStorage.php',
    'PHPStan\\Cache\\MemoryCacheStorage' => $baseDir . '/src/Cache/MemoryCacheStorage.php',
    'PHPStan\\Collectors\\CollectedData' => $baseDir . '/src/Collectors/CollectedData.php',
    'PHPStan\\Collectors\\Collector' => $baseDir . '/src/Collectors/Collector.php',
    'PHPStan\\Collectors\\Registry' => $baseDir . '/src/Collectors/Registry.php',
    'PHPStan\\Collectors\\RegistryFactory' => $baseDir . '/src/Collectors/RegistryFactory.php',
    'PHPStan\\Command\\AnalyseApplication' => $baseDir . '/src/Command/AnalyseApplication.php',
    'PHPStan\\Command\\AnalyseCommand' => $baseDir . '/src/Command/AnalyseCommand.php',
    'PHPStan\\Command\\AnalyserRunner' => $baseDir . '/src/Command/AnalyserRunner.php',
    'PHPStan\\Command\\AnalysisResult' => $baseDir . '/src/Command/AnalysisResult.php',
    'PHPStan\\Command\\ClearResultCacheCommand' => $baseDir . '/src/Command/ClearResultCacheCommand.php',
    'PHPStan\\Command\\CommandHelper' => $baseDir . '/src/Command/CommandHelper.php',
    'PHPStan\\Command\\DumpParametersCommand' => $baseDir . '/src/Command/DumpParametersCommand.php',
    'PHPStan\\Command\\ErrorFormatter\\BaselineNeonErrorFormatter' => $baseDir . '/src/Command/ErrorFormatter/BaselineNeonErrorFormatter.php',
    'PHPStan\\Command\\ErrorFormatter\\BaselinePhpErrorFormatter' => $baseDir . '/src/Command/ErrorFormatter/BaselinePhpErrorFormatter.php',
    'PHPStan\\Command\\ErrorFormatter\\CheckstyleErrorFormatter' => $baseDir . '/src/Command/ErrorFormatter/CheckstyleErrorFormatter.php',
    'PHPStan\\Command\\ErrorFormatter\\CiDetectedErrorFormatter' => $baseDir . '/src/Command/ErrorFormatter/CiDetectedErrorFormatter.php',
    'PHPStan\\Command\\ErrorFormatter\\ErrorFormatter' => $baseDir . '/src/Command/ErrorFormatter/ErrorFormatter.php',
    'PHPStan\\Command\\ErrorFormatter\\GithubErrorFormatter' => $baseDir . '/src/Command/ErrorFormatter/GithubErrorFormatter.php',
    'PHPStan\\Command\\ErrorFormatter\\GitlabErrorFormatter' => $baseDir . '/src/Command/ErrorFormatter/GitlabErrorFormatter.php',
    'PHPStan\\Command\\ErrorFormatter\\JsonErrorFormatter' => $baseDir . '/src/Command/ErrorFormatter/JsonErrorFormatter.php',
    'PHPStan\\Command\\ErrorFormatter\\JunitErrorFormatter' => $baseDir . '/src/Command/ErrorFormatter/JunitErrorFormatter.php',
    'PHPStan\\Command\\ErrorFormatter\\RawErrorFormatter' => $baseDir . '/src/Command/ErrorFormatter/RawErrorFormatter.php',
    'PHPStan\\Command\\ErrorFormatter\\TableErrorFormatter' => $baseDir . '/src/Command/ErrorFormatter/TableErrorFormatter.php',
    'PHPStan\\Command\\ErrorFormatter\\TeamcityErrorFormatter' => $baseDir . '/src/Command/ErrorFormatter/TeamcityErrorFormatter.php',
    'PHPStan\\Command\\ErrorsConsoleStyle' => $baseDir . '/src/Command/ErrorsConsoleStyle.php',
    'PHPStan\\Command\\FixerApplication' => $baseDir . '/src/Command/FixerApplication.php',
    'PHPStan\\Command\\FixerProcessException' => $baseDir . '/src/Command/FixerProcessException.php',
    'PHPStan\\Command\\FixerWorkerCommand' => $baseDir . '/src/Command/FixerWorkerCommand.php',
    'PHPStan\\Command\\IgnoredRegexValidator' => $baseDir . '/src/Command/IgnoredRegexValidator.php',
    'PHPStan\\Command\\IgnoredRegexValidatorResult' => $baseDir . '/src/Command/IgnoredRegexValidatorResult.php',
    'PHPStan\\Command\\InceptionNotSuccessfulException' => $baseDir . '/src/Command/InceptionNotSuccessfulException.php',
    'PHPStan\\Command\\InceptionResult' => $baseDir . '/src/Command/InceptionResult.php',
    'PHPStan\\Command\\Output' => $baseDir . '/src/Command/Output.php',
    'PHPStan\\Command\\OutputStyle' => $baseDir . '/src/Command/OutputStyle.php',
    'PHPStan\\Command\\Symfony\\SymfonyOutput' => $baseDir . '/src/Command/Symfony/SymfonyOutput.php',
    'PHPStan\\Command\\Symfony\\SymfonyStyle' => $baseDir . '/src/Command/Symfony/SymfonyStyle.php',
    'PHPStan\\Command\\WorkerCommand' => $baseDir . '/src/Command/WorkerCommand.php',
    'PHPStan\\DependencyInjection\\BleedingEdgeToggle' => $baseDir . '/src/DependencyInjection/BleedingEdgeToggle.php',
    'PHPStan\\DependencyInjection\\ConditionalTagsExtension' => $baseDir . '/src/DependencyInjection/ConditionalTagsExtension.php',
    'PHPStan\\DependencyInjection\\Configurator' => $baseDir . '/src/DependencyInjection/Configurator.php',
    'PHPStan\\DependencyInjection\\Container' => $baseDir . '/src/DependencyInjection/Container.php',
    'PHPStan\\DependencyInjection\\ContainerFactory' => $baseDir . '/src/DependencyInjection/ContainerFactory.php',
    'PHPStan\\DependencyInjection\\DerivativeContainerFactory' => $baseDir . '/src/DependencyInjection/DerivativeContainerFactory.php',
    'PHPStan\\DependencyInjection\\DuplicateIncludedFilesException' => $baseDir . '/src/DependencyInjection/DuplicateIncludedFilesException.php',
    'PHPStan\\DependencyInjection\\InvalidIgnoredErrorPatternsException' => $baseDir . '/src/DependencyInjection/InvalidIgnoredErrorPatternsException.php',
    'PHPStan\\DependencyInjection\\LoaderFactory' => $baseDir . '/src/DependencyInjection/LoaderFactory.php',
    'PHPStan\\DependencyInjection\\MemoizingContainer' => $baseDir . '/src/DependencyInjection/MemoizingContainer.php',
    'PHPStan\\DependencyInjection\\NeonAdapter' => $baseDir . '/src/DependencyInjection/NeonAdapter.php',
    'PHPStan\\DependencyInjection\\NeonLoader' => $baseDir . '/src/DependencyInjection/NeonLoader.php',
    'PHPStan\\DependencyInjection\\Nette\\NetteContainer' => $baseDir . '/src/DependencyInjection/Nette/NetteContainer.php',
    'PHPStan\\DependencyInjection\\ParameterNotFoundException' => $baseDir . '/src/DependencyInjection/ParameterNotFoundException.php',
    'PHPStan\\DependencyInjection\\ParametersSchemaExtension' => $baseDir . '/src/DependencyInjection/ParametersSchemaExtension.php',
    'PHPStan\\DependencyInjection\\Reflection\\ClassReflectionExtensionRegistryProvider' => $baseDir . '/src/DependencyInjection/Reflection/ClassReflectionExtensionRegistryProvider.php',
    'PHPStan\\DependencyInjection\\Reflection\\DirectClassReflectionExtensionRegistryProvider' => $baseDir . '/src/DependencyInjection/Reflection/DirectClassReflectionExtensionRegistryProvider.php',
    'PHPStan\\DependencyInjection\\Reflection\\LazyClassReflectionExtensionRegistryProvider' => $baseDir . '/src/DependencyInjection/Reflection/LazyClassReflectionExtensionRegistryProvider.php',
    'PHPStan\\DependencyInjection\\RulesExtension' => $baseDir . '/src/DependencyInjection/RulesExtension.php',
    'PHPStan\\DependencyInjection\\Type\\DynamicReturnTypeExtensionRegistryProvider' => $baseDir . '/src/DependencyInjection/Type/DynamicReturnTypeExtensionRegistryProvider.php',
    'PHPStan\\DependencyInjection\\Type\\DynamicThrowTypeExtensionProvider' => $baseDir . '/src/DependencyInjection/Type/DynamicThrowTypeExtensionProvider.php',
    'PHPStan\\DependencyInjection\\Type\\LazyDynamicReturnTypeExtensionRegistryProvider' => $baseDir . '/src/DependencyInjection/Type/LazyDynamicReturnTypeExtensionRegistryProvider.php',
    'PHPStan\\DependencyInjection\\Type\\LazyDynamicThrowTypeExtensionProvider' => $baseDir . '/src/DependencyInjection/Type/LazyDynamicThrowTypeExtensionProvider.php',
    'PHPStan\\DependencyInjection\\Type\\LazyOperatorTypeSpecifyingExtensionRegistryProvider' => $baseDir . '/src/DependencyInjection/Type/LazyOperatorTypeSpecifyingExtensionRegistryProvider.php',
    'PHPStan\\DependencyInjection\\Type\\OperatorTypeSpecifyingExtensionRegistryProvider' => $baseDir . '/src/DependencyInjection/Type/OperatorTypeSpecifyingExtensionRegistryProvider.php',
    'PHPStan\\DependencyInjection\\ValidateIgnoredErrorsExtension' => $baseDir . '/src/DependencyInjection/ValidateIgnoredErrorsExtension.php',
    'PHPStan\\Dependency\\DependencyResolver' => $baseDir . '/src/Dependency/DependencyResolver.php',
    'PHPStan\\Dependency\\ExportedNode' => $baseDir . '/src/Dependency/ExportedNode.php',
    'PHPStan\\Dependency\\ExportedNodeFetcher' => $baseDir . '/src/Dependency/ExportedNodeFetcher.php',
    'PHPStan\\Dependency\\ExportedNodeResolver' => $baseDir . '/src/Dependency/ExportedNodeResolver.php',
    'PHPStan\\Dependency\\ExportedNodeVisitor' => $baseDir . '/src/Dependency/ExportedNodeVisitor.php',
    'PHPStan\\Dependency\\ExportedNode\\ExportedAttributeNode' => $baseDir . '/src/Dependency/ExportedNode/ExportedAttributeNode.php',
    'PHPStan\\Dependency\\ExportedNode\\ExportedClassConstantNode' => $baseDir . '/src/Dependency/ExportedNode/ExportedClassConstantNode.php',
    'PHPStan\\Dependency\\ExportedNode\\ExportedClassConstantsNode' => $baseDir . '/src/Dependency/ExportedNode/ExportedClassConstantsNode.php',
    'PHPStan\\Dependency\\ExportedNode\\ExportedClassNode' => $baseDir . '/src/Dependency/ExportedNode/ExportedClassNode.php',
    'PHPStan\\Dependency\\ExportedNode\\ExportedEnumCaseNode' => $baseDir . '/src/Dependency/ExportedNode/ExportedEnumCaseNode.php',
    'PHPStan\\Dependency\\ExportedNode\\ExportedEnumNode' => $baseDir . '/src/Dependency/ExportedNode/ExportedEnumNode.php',
    'PHPStan\\Dependency\\ExportedNode\\ExportedFunctionNode' => $baseDir . '/src/Dependency/ExportedNode/ExportedFunctionNode.php',
    'PHPStan\\Dependency\\ExportedNode\\ExportedInterfaceNode' => $baseDir . '/src/Dependency/ExportedNode/ExportedInterfaceNode.php',
    'PHPStan\\Dependency\\ExportedNode\\ExportedMethodNode' => $baseDir . '/src/Dependency/ExportedNode/ExportedMethodNode.php',
    'PHPStan\\Dependency\\ExportedNode\\ExportedParameterNode' => $baseDir . '/src/Dependency/ExportedNode/ExportedParameterNode.php',
    'PHPStan\\Dependency\\ExportedNode\\ExportedPhpDocNode' => $baseDir . '/src/Dependency/ExportedNode/ExportedPhpDocNode.php',
    'PHPStan\\Dependency\\ExportedNode\\ExportedPropertiesNode' => $baseDir . '/src/Dependency/ExportedNode/ExportedPropertiesNode.php',
    'PHPStan\\Dependency\\ExportedNode\\ExportedTraitNode' => $baseDir . '/src/Dependency/ExportedNode/ExportedTraitNode.php',
    'PHPStan\\Dependency\\ExportedNode\\ExportedTraitUseAdaptation' => $baseDir . '/src/Dependency/ExportedNode/ExportedTraitUseAdaptation.php',
    'PHPStan\\Dependency\\NodeDependencies' => $baseDir . '/src/Dependency/NodeDependencies.php',
    'PHPStan\\Dependency\\RootExportedNode' => $baseDir . '/src/Dependency/RootExportedNode.php',
    'PHPStan\\File\\CouldNotReadFileException' => $baseDir . '/src/File/CouldNotReadFileException.php',
    'PHPStan\\File\\CouldNotWriteFileException' => $baseDir . '/src/File/CouldNotWriteFileException.php',
    'PHPStan\\File\\FileExcluder' => $baseDir . '/src/File/FileExcluder.php',
    'PHPStan\\File\\FileExcluderFactory' => $baseDir . '/src/File/FileExcluderFactory.php',
    'PHPStan\\File\\FileExcluderRawFactory' => $baseDir . '/src/File/FileExcluderRawFactory.php',
    'PHPStan\\File\\FileFinder' => $baseDir . '/src/File/FileFinder.php',
    'PHPStan\\File\\FileFinderResult' => $baseDir . '/src/File/FileFinderResult.php',
    'PHPStan\\File\\FileHelper' => $baseDir . '/src/File/FileHelper.php',
    'PHPStan\\File\\FileMonitor' => $baseDir . '/src/File/FileMonitor.php',
    'PHPStan\\File\\FileMonitorResult' => $baseDir . '/src/File/FileMonitorResult.php',
    'PHPStan\\File\\FileReader' => $baseDir . '/src/File/FileReader.php',
    'PHPStan\\File\\FileWriter' => $baseDir . '/src/File/FileWriter.php',
    'PHPStan\\File\\FuzzyRelativePathHelper' => $baseDir . '/src/File/FuzzyRelativePathHelper.php',
    'PHPStan\\File\\NullRelativePathHelper' => $baseDir . '/src/File/NullRelativePathHelper.php',
    'PHPStan\\File\\ParentDirectoryRelativePathHelper' => $baseDir . '/src/File/ParentDirectoryRelativePathHelper.php',
    'PHPStan\\File\\PathNotFoundException' => $baseDir . '/src/File/PathNotFoundException.php',
    'PHPStan\\File\\RelativePathHelper' => $baseDir . '/src/File/RelativePathHelper.php',
    'PHPStan\\File\\SimpleRelativePathHelper' => $baseDir . '/src/File/SimpleRelativePathHelper.php',
    'PHPStan\\Internal\\BytesHelper' => $baseDir . '/src/Internal/BytesHelper.php',
    'PHPStan\\Internal\\ComposerHelper' => $baseDir . '/src/Internal/ComposerHelper.php',
    'PHPStan\\Internal\\ContainerDynamicReturnTypeExtension' => $baseDir . '/src/Internal/ContainerDynamicReturnTypeExtension.php',
    'PHPStan\\Internal\\SprintfHelper' => $baseDir . '/src/Internal/SprintfHelper.php',
    'PHPStan\\NodeVisitor\\StatementOrderVisitor' => $baseDir . '/src/NodeVisitor/StatementOrderVisitor.php',
    'PHPStan\\Node\\BooleanAndNode' => $baseDir . '/src/Node/BooleanAndNode.php',
    'PHPStan\\Node\\BooleanOrNode' => $baseDir . '/src/Node/BooleanOrNode.php',
    'PHPStan\\Node\\BreaklessWhileLoopNode' => $baseDir . '/src/Node/BreaklessWhileLoopNode.php',
    'PHPStan\\Node\\CatchWithUnthrownExceptionNode' => $baseDir . '/src/Node/CatchWithUnthrownExceptionNode.php',
    'PHPStan\\Node\\ClassConstantsNode' => $baseDir . '/src/Node/ClassConstantsNode.php',
    'PHPStan\\Node\\ClassMethod' => $baseDir . '/src/Node/ClassMethod.php',
    'PHPStan\\Node\\ClassMethodsNode' => $baseDir . '/src/Node/ClassMethodsNode.php',
    'PHPStan\\Node\\ClassPropertiesNode' => $baseDir . '/src/Node/ClassPropertiesNode.php',
    'PHPStan\\Node\\ClassPropertyNode' => $baseDir . '/src/Node/ClassPropertyNode.php',
    'PHPStan\\Node\\ClassStatementsGatherer' => $baseDir . '/src/Node/ClassStatementsGatherer.php',
    'PHPStan\\Node\\ClosureReturnStatementsNode' => $baseDir . '/src/Node/ClosureReturnStatementsNode.php',
    'PHPStan\\Node\\CollectedDataNode' => $baseDir . '/src/Node/CollectedDataNode.php',
    'PHPStan\\Node\\Constant\\ClassConstantFetch' => $baseDir . '/src/Node/Constant/ClassConstantFetch.php',
    'PHPStan\\Node\\DoWhileLoopConditionNode' => $baseDir . '/src/Node/DoWhileLoopConditionNode.php',
    'PHPStan\\Node\\ExecutionEndNode' => $baseDir . '/src/Node/ExecutionEndNode.php',
    'PHPStan\\Node\\Expr\\GetIterableKeyTypeExpr' => $baseDir . '/src/Node/Expr/GetIterableKeyTypeExpr.php',
    'PHPStan\\Node\\Expr\\GetIterableValueTypeExpr' => $baseDir . '/src/Node/Expr/GetIterableValueTypeExpr.php',
    'PHPStan\\Node\\Expr\\GetOffsetValueTypeExpr' => $baseDir . '/src/Node/Expr/GetOffsetValueTypeExpr.php',
    'PHPStan\\Node\\Expr\\OriginalPropertyTypeExpr' => $baseDir . '/src/Node/Expr/OriginalPropertyTypeExpr.php',
    'PHPStan\\Node\\Expr\\SetOffsetValueTypeExpr' => $baseDir . '/src/Node/Expr/SetOffsetValueTypeExpr.php',
    'PHPStan\\Node\\Expr\\TypeExpr' => $baseDir . '/src/Node/Expr/TypeExpr.php',
    'PHPStan\\Node\\FileNode' => $baseDir . '/src/Node/FileNode.php',
    'PHPStan\\Node\\FinallyExitPointsNode' => $baseDir . '/src/Node/FinallyExitPointsNode.php',
    'PHPStan\\Node\\FunctionCallableNode' => $baseDir . '/src/Node/FunctionCallableNode.php',
    'PHPStan\\Node\\FunctionReturnStatementsNode' => $baseDir . '/src/Node/FunctionReturnStatementsNode.php',
    'PHPStan\\Node\\InArrowFunctionNode' => $baseDir . '/src/Node/InArrowFunctionNode.php',
    'PHPStan\\Node\\InClassMethodNode' => $baseDir . '/src/Node/InClassMethodNode.php',
    'PHPStan\\Node\\InClassNode' => $baseDir . '/src/Node/InClassNode.php',
    'PHPStan\\Node\\InClosureNode' => $baseDir . '/src/Node/InClosureNode.php',
    'PHPStan\\Node\\InForeachNode' => $baseDir . '/src/Node/InForeachNode.php',
    'PHPStan\\Node\\InFunctionNode' => $baseDir . '/src/Node/InFunctionNode.php',
    'PHPStan\\Node\\InstantiationCallableNode' => $baseDir . '/src/Node/InstantiationCallableNode.php',
    'PHPStan\\Node\\LiteralArrayItem' => $baseDir . '/src/Node/LiteralArrayItem.php',
    'PHPStan\\Node\\LiteralArrayNode' => $baseDir . '/src/Node/LiteralArrayNode.php',
    'PHPStan\\Node\\MatchExpressionArm' => $baseDir . '/src/Node/MatchExpressionArm.php',
    'PHPStan\\Node\\MatchExpressionArmBody' => $baseDir . '/src/Node/MatchExpressionArmBody.php',
    'PHPStan\\Node\\MatchExpressionArmCondition' => $baseDir . '/src/Node/MatchExpressionArmCondition.php',
    'PHPStan\\Node\\MatchExpressionNode' => $baseDir . '/src/Node/MatchExpressionNode.php',
    'PHPStan\\Node\\MethodCallableNode' => $baseDir . '/src/Node/MethodCallableNode.php',
    'PHPStan\\Node\\MethodReturnStatementsNode' => $baseDir . '/src/Node/MethodReturnStatementsNode.php',
    'PHPStan\\Node\\Method\\MethodCall' => $baseDir . '/src/Node/Method/MethodCall.php',
    'PHPStan\\Node\\Printer\\ExprPrinter' => $baseDir . '/src/Node/Printer/ExprPrinter.php',
    'PHPStan\\Node\\Printer\\Printer' => $baseDir . '/src/Node/Printer/Printer.php',
    'PHPStan\\Node\\PropertyAssignNode' => $baseDir . '/src/Node/PropertyAssignNode.php',
    'PHPStan\\Node\\Property\\PropertyRead' => $baseDir . '/src/Node/Property/PropertyRead.php',
    'PHPStan\\Node\\Property\\PropertyWrite' => $baseDir . '/src/Node/Property/PropertyWrite.php',
    'PHPStan\\Node\\ReturnStatement' => $baseDir . '/src/Node/ReturnStatement.php',
    'PHPStan\\Node\\ReturnStatementsNode' => $baseDir . '/src/Node/ReturnStatementsNode.php',
    'PHPStan\\Node\\StaticMethodCallableNode' => $baseDir . '/src/Node/StaticMethodCallableNode.php',
    'PHPStan\\Node\\UnreachableStatementNode' => $baseDir . '/src/Node/UnreachableStatementNode.php',
    'PHPStan\\Node\\VarTagChangedExpressionTypeNode' => $baseDir . '/src/Node/VarTagChangedExpressionTypeNode.php',
    'PHPStan\\Node\\VirtualNode' => $baseDir . '/src/Node/VirtualNode.php',
    'PHPStan\\Parallel\\ParallelAnalyser' => $baseDir . '/src/Parallel/ParallelAnalyser.php',
    'PHPStan\\Parallel\\Process' => $baseDir . '/src/Parallel/Process.php',
    'PHPStan\\Parallel\\ProcessPool' => $baseDir . '/src/Parallel/ProcessPool.php',
    'PHPStan\\Parallel\\Schedule' => $baseDir . '/src/Parallel/Schedule.php',
    'PHPStan\\Parallel\\Scheduler' => $baseDir . '/src/Parallel/Scheduler.php',
    'PHPStan\\Parser\\ArrayFilterArgVisitor' => $baseDir . '/src/Parser/ArrayFilterArgVisitor.php',
    'PHPStan\\Parser\\ArrayMapArgVisitor' => $baseDir . '/src/Parser/ArrayMapArgVisitor.php',
    'PHPStan\\Parser\\ArrayWalkArgVisitor' => $baseDir . '/src/Parser/ArrayWalkArgVisitor.php',
    'PHPStan\\Parser\\ArrowFunctionArgVisitor' => $baseDir . '/src/Parser/ArrowFunctionArgVisitor.php',
    'PHPStan\\Parser\\CachedParser' => $baseDir . '/src/Parser/CachedParser.php',
    'PHPStan\\Parser\\CleaningParser' => $baseDir . '/src/Parser/CleaningParser.php',
    'PHPStan\\Parser\\CleaningVisitor' => $baseDir . '/src/Parser/CleaningVisitor.php',
    'PHPStan\\Parser\\ClosureArgVisitor' => $baseDir . '/src/Parser/ClosureArgVisitor.php',
    'PHPStan\\Parser\\CurlSetOptArgVisitor' => $baseDir . '/src/Parser/CurlSetOptArgVisitor.php',
    'PHPStan\\Parser\\FunctionCallStatementFinder' => $baseDir . '/src/Parser/FunctionCallStatementFinder.php',
    'PHPStan\\Parser\\LastConditionVisitor' => $baseDir . '/src/Parser/LastConditionVisitor.php',
    'PHPStan\\Parser\\LexerFactory' => $baseDir . '/src/Parser/LexerFactory.php',
    'PHPStan\\Parser\\NewAssignedToPropertyVisitor' => $baseDir . '/src/Parser/NewAssignedToPropertyVisitor.php',
    'PHPStan\\Parser\\ParentStmtTypesVisitor' => $baseDir . '/src/Parser/ParentStmtTypesVisitor.php',
    'PHPStan\\Parser\\Parser' => $baseDir . '/src/Parser/Parser.php',
    'PHPStan\\Parser\\ParserErrorsException' => $baseDir . '/src/Parser/ParserErrorsException.php',
    'PHPStan\\Parser\\PathRoutingParser' => $baseDir . '/src/Parser/PathRoutingParser.php',
    'PHPStan\\Parser\\PhpParserDecorator' => $baseDir . '/src/Parser/PhpParserDecorator.php',
    'PHPStan\\Parser\\RemoveUnusedCodeByPhpVersionIdVisitor' => $baseDir . '/src/Parser/RemoveUnusedCodeByPhpVersionIdVisitor.php',
    'PHPStan\\Parser\\RichParser' => $baseDir . '/src/Parser/RichParser.php',
    'PHPStan\\Parser\\SimpleParser' => $baseDir . '/src/Parser/SimpleParser.php',
    'PHPStan\\Parser\\TryCatchTypeVisitor' => $baseDir . '/src/Parser/TryCatchTypeVisitor.php',
    'PHPStan\\Parser\\TypeTraverserInstanceofVisitor' => $baseDir . '/src/Parser/TypeTraverserInstanceofVisitor.php',
    'PHPStan\\Php8StubsMap' => $vendorDir . '/phpstan/php-8-stubs/Php8StubsMap.php',
    'PHPStan\\PhpDocParser\\Ast\\AbstractNodeVisitor' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/AbstractNodeVisitor.php',
    'PHPStan\\PhpDocParser\\Ast\\Attribute' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Attribute.php',
    'PHPStan\\PhpDocParser\\Ast\\ConstExpr\\ConstExprArrayItemNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprArrayItemNode.php',
    'PHPStan\\PhpDocParser\\Ast\\ConstExpr\\ConstExprArrayNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprArrayNode.php',
    'PHPStan\\PhpDocParser\\Ast\\ConstExpr\\ConstExprFalseNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprFalseNode.php',
    'PHPStan\\PhpDocParser\\Ast\\ConstExpr\\ConstExprFloatNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprFloatNode.php',
    'PHPStan\\PhpDocParser\\Ast\\ConstExpr\\ConstExprIntegerNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprIntegerNode.php',
    'PHPStan\\PhpDocParser\\Ast\\ConstExpr\\ConstExprNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprNode.php',
    'PHPStan\\PhpDocParser\\Ast\\ConstExpr\\ConstExprNullNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprNullNode.php',
    'PHPStan\\PhpDocParser\\Ast\\ConstExpr\\ConstExprStringNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprStringNode.php',
    'PHPStan\\PhpDocParser\\Ast\\ConstExpr\\ConstExprTrueNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprTrueNode.php',
    'PHPStan\\PhpDocParser\\Ast\\ConstExpr\\ConstFetchNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstFetchNode.php',
    'PHPStan\\PhpDocParser\\Ast\\ConstExpr\\QuoteAwareConstExprStringNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/ConstExpr/QuoteAwareConstExprStringNode.php',
    'PHPStan\\PhpDocParser\\Ast\\Node' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Node.php',
    'PHPStan\\PhpDocParser\\Ast\\NodeAttributes' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/NodeAttributes.php',
    'PHPStan\\PhpDocParser\\Ast\\NodeTraverser' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/NodeTraverser.php',
    'PHPStan\\PhpDocParser\\Ast\\NodeVisitor' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/NodeVisitor.php',
    'PHPStan\\PhpDocParser\\Ast\\NodeVisitor\\CloningVisitor' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/NodeVisitor/CloningVisitor.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\AssertTagMethodValueNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/AssertTagMethodValueNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\AssertTagPropertyValueNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/AssertTagPropertyValueNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\AssertTagValueNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/AssertTagValueNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\DeprecatedTagValueNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/DeprecatedTagValueNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\Doctrine\\DoctrineAnnotation' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/Doctrine/DoctrineAnnotation.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\Doctrine\\DoctrineArgument' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/Doctrine/DoctrineArgument.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\Doctrine\\DoctrineArray' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/Doctrine/DoctrineArray.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\Doctrine\\DoctrineArrayItem' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/Doctrine/DoctrineArrayItem.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\Doctrine\\DoctrineTagValueNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/Doctrine/DoctrineTagValueNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\ExtendsTagValueNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/ExtendsTagValueNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\GenericTagValueNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/GenericTagValueNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\ImplementsTagValueNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/ImplementsTagValueNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\InvalidTagValueNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/InvalidTagValueNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\MethodTagValueNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/MethodTagValueNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\MethodTagValueParameterNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/MethodTagValueParameterNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\MixinTagValueNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/MixinTagValueNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\ParamOutTagValueNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/ParamOutTagValueNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\ParamTagValueNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/ParamTagValueNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\PhpDocChildNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocChildNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\PhpDocNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\PhpDocTagNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocTagNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\PhpDocTagValueNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocTagValueNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\PhpDocTextNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocTextNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\PropertyTagValueNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/PropertyTagValueNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\ReturnTagValueNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/ReturnTagValueNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\SelfOutTagValueNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/SelfOutTagValueNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\TemplateTagValueNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/TemplateTagValueNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\ThrowsTagValueNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/ThrowsTagValueNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\TypeAliasImportTagValueNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/TypeAliasImportTagValueNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\TypeAliasTagValueNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/TypeAliasTagValueNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\TypelessParamTagValueNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/TypelessParamTagValueNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\UsesTagValueNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/UsesTagValueNode.php',
    'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\VarTagValueNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/VarTagValueNode.php',
    'PHPStan\\PhpDocParser\\Ast\\Type\\ArrayShapeItemNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Type/ArrayShapeItemNode.php',
    'PHPStan\\PhpDocParser\\Ast\\Type\\ArrayShapeNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Type/ArrayShapeNode.php',
    'PHPStan\\PhpDocParser\\Ast\\Type\\ArrayTypeNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Type/ArrayTypeNode.php',
    'PHPStan\\PhpDocParser\\Ast\\Type\\CallableTypeNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Type/CallableTypeNode.php',
    'PHPStan\\PhpDocParser\\Ast\\Type\\CallableTypeParameterNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Type/CallableTypeParameterNode.php',
    'PHPStan\\PhpDocParser\\Ast\\Type\\ConditionalTypeForParameterNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Type/ConditionalTypeForParameterNode.php',
    'PHPStan\\PhpDocParser\\Ast\\Type\\ConditionalTypeNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Type/ConditionalTypeNode.php',
    'PHPStan\\PhpDocParser\\Ast\\Type\\ConstTypeNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Type/ConstTypeNode.php',
    'PHPStan\\PhpDocParser\\Ast\\Type\\GenericTypeNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Type/GenericTypeNode.php',
    'PHPStan\\PhpDocParser\\Ast\\Type\\IdentifierTypeNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Type/IdentifierTypeNode.php',
    'PHPStan\\PhpDocParser\\Ast\\Type\\IntersectionTypeNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Type/IntersectionTypeNode.php',
    'PHPStan\\PhpDocParser\\Ast\\Type\\InvalidTypeNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Type/InvalidTypeNode.php',
    'PHPStan\\PhpDocParser\\Ast\\Type\\NullableTypeNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Type/NullableTypeNode.php',
    'PHPStan\\PhpDocParser\\Ast\\Type\\ObjectShapeItemNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Type/ObjectShapeItemNode.php',
    'PHPStan\\PhpDocParser\\Ast\\Type\\ObjectShapeNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Type/ObjectShapeNode.php',
    'PHPStan\\PhpDocParser\\Ast\\Type\\OffsetAccessTypeNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Type/OffsetAccessTypeNode.php',
    'PHPStan\\PhpDocParser\\Ast\\Type\\ThisTypeNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Type/ThisTypeNode.php',
    'PHPStan\\PhpDocParser\\Ast\\Type\\TypeNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Type/TypeNode.php',
    'PHPStan\\PhpDocParser\\Ast\\Type\\UnionTypeNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Type/UnionTypeNode.php',
    'PHPStan\\PhpDocParser\\Lexer\\Lexer' => $vendorDir . '/phpstan/phpdoc-parser/src/Lexer/Lexer.php',
    'PHPStan\\PhpDocParser\\Parser\\ConstExprParser' => $vendorDir . '/phpstan/phpdoc-parser/src/Parser/ConstExprParser.php',
    'PHPStan\\PhpDocParser\\Parser\\ParserException' => $vendorDir . '/phpstan/phpdoc-parser/src/Parser/ParserException.php',
    'PHPStan\\PhpDocParser\\Parser\\PhpDocParser' => $vendorDir . '/phpstan/phpdoc-parser/src/Parser/PhpDocParser.php',
    'PHPStan\\PhpDocParser\\Parser\\StringUnescaper' => $vendorDir . '/phpstan/phpdoc-parser/src/Parser/StringUnescaper.php',
    'PHPStan\\PhpDocParser\\Parser\\TokenIterator' => $vendorDir . '/phpstan/phpdoc-parser/src/Parser/TokenIterator.php',
    'PHPStan\\PhpDocParser\\Parser\\TypeParser' => $vendorDir . '/phpstan/phpdoc-parser/src/Parser/TypeParser.php',
    'PHPStan\\PhpDocParser\\Printer\\DiffElem' => $vendorDir . '/phpstan/phpdoc-parser/src/Printer/DiffElem.php',
    'PHPStan\\PhpDocParser\\Printer\\Differ' => $vendorDir . '/phpstan/phpdoc-parser/src/Printer/Differ.php',
    'PHPStan\\PhpDocParser\\Printer\\Printer' => $vendorDir . '/phpstan/phpdoc-parser/src/Printer/Printer.php',
    'PHPStan\\PhpDoc\\ConstExprNodeResolver' => $baseDir . '/src/PhpDoc/ConstExprNodeResolver.php',
    'PHPStan\\PhpDoc\\ConstExprParserFactory' => $baseDir . '/src/PhpDoc/ConstExprParserFactory.php',
    'PHPStan\\PhpDoc\\CountableStubFilesExtension' => $baseDir . '/src/PhpDoc/CountableStubFilesExtension.php',
    'PHPStan\\PhpDoc\\DefaultStubFilesProvider' => $baseDir . '/src/PhpDoc/DefaultStubFilesProvider.php',
    'PHPStan\\PhpDoc\\DirectTypeNodeResolverExtensionRegistryProvider' => $baseDir . '/src/PhpDoc/DirectTypeNodeResolverExtensionRegistryProvider.php',
    'PHPStan\\PhpDoc\\LazyTypeNodeResolverExtensionRegistryProvider' => $baseDir . '/src/PhpDoc/LazyTypeNodeResolverExtensionRegistryProvider.php',
    'PHPStan\\PhpDoc\\PhpDocBlock' => $baseDir . '/src/PhpDoc/PhpDocBlock.php',
    'PHPStan\\PhpDoc\\PhpDocInheritanceResolver' => $baseDir . '/src/PhpDoc/PhpDocInheritanceResolver.php',
    'PHPStan\\PhpDoc\\PhpDocNodeResolver' => $baseDir . '/src/PhpDoc/PhpDocNodeResolver.php',
    'PHPStan\\PhpDoc\\PhpDocStringResolver' => $baseDir . '/src/PhpDoc/PhpDocStringResolver.php',
    'PHPStan\\PhpDoc\\ResolvedPhpDocBlock' => $baseDir . '/src/PhpDoc/ResolvedPhpDocBlock.php',
    'PHPStan\\PhpDoc\\StubFilesExtension' => $baseDir . '/src/PhpDoc/StubFilesExtension.php',
    'PHPStan\\PhpDoc\\StubFilesProvider' => $baseDir . '/src/PhpDoc/StubFilesProvider.php',
    'PHPStan\\PhpDoc\\StubPhpDocProvider' => $baseDir . '/src/PhpDoc/StubPhpDocProvider.php',
    'PHPStan\\PhpDoc\\StubSourceLocatorFactory' => $baseDir . '/src/PhpDoc/StubSourceLocatorFactory.php',
    'PHPStan\\PhpDoc\\StubValidator' => $baseDir . '/src/PhpDoc/StubValidator.php',
    'PHPStan\\PhpDoc\\Tag\\AssertTag' => $baseDir . '/src/PhpDoc/Tag/AssertTag.php',
    'PHPStan\\PhpDoc\\Tag\\AssertTagParameter' => $baseDir . '/src/PhpDoc/Tag/AssertTagParameter.php',
    'PHPStan\\PhpDoc\\Tag\\DeprecatedTag' => $baseDir . '/src/PhpDoc/Tag/DeprecatedTag.php',
    'PHPStan\\PhpDoc\\Tag\\ExtendsTag' => $baseDir . '/src/PhpDoc/Tag/ExtendsTag.php',
    'PHPStan\\PhpDoc\\Tag\\ImplementsTag' => $baseDir . '/src/PhpDoc/Tag/ImplementsTag.php',
    'PHPStan\\PhpDoc\\Tag\\MethodTag' => $baseDir . '/src/PhpDoc/Tag/MethodTag.php',
    'PHPStan\\PhpDoc\\Tag\\MethodTagParameter' => $baseDir . '/src/PhpDoc/Tag/MethodTagParameter.php',
    'PHPStan\\PhpDoc\\Tag\\MixinTag' => $baseDir . '/src/PhpDoc/Tag/MixinTag.php',
    'PHPStan\\PhpDoc\\Tag\\ParamOutTag' => $baseDir . '/src/PhpDoc/Tag/ParamOutTag.php',
    'PHPStan\\PhpDoc\\Tag\\ParamTag' => $baseDir . '/src/PhpDoc/Tag/ParamTag.php',
    'PHPStan\\PhpDoc\\Tag\\PropertyTag' => $baseDir . '/src/PhpDoc/Tag/PropertyTag.php',
    'PHPStan\\PhpDoc\\Tag\\ReturnTag' => $baseDir . '/src/PhpDoc/Tag/ReturnTag.php',
    'PHPStan\\PhpDoc\\Tag\\SelfOutTypeTag' => $baseDir . '/src/PhpDoc/Tag/SelfOutTypeTag.php',
    'PHPStan\\PhpDoc\\Tag\\TemplateTag' => $baseDir . '/src/PhpDoc/Tag/TemplateTag.php',
    'PHPStan\\PhpDoc\\Tag\\ThrowsTag' => $baseDir . '/src/PhpDoc/Tag/ThrowsTag.php',
    'PHPStan\\PhpDoc\\Tag\\TypeAliasImportTag' => $baseDir . '/src/PhpDoc/Tag/TypeAliasImportTag.php',
    'PHPStan\\PhpDoc\\Tag\\TypeAliasTag' => $baseDir . '/src/PhpDoc/Tag/TypeAliasTag.php',
    'PHPStan\\PhpDoc\\Tag\\TypedTag' => $baseDir . '/src/PhpDoc/Tag/TypedTag.php',
    'PHPStan\\PhpDoc\\Tag\\UsesTag' => $baseDir . '/src/PhpDoc/Tag/UsesTag.php',
    'PHPStan\\PhpDoc\\Tag\\VarTag' => $baseDir . '/src/PhpDoc/Tag/VarTag.php',
    'PHPStan\\PhpDoc\\TypeNodeResolver' => $baseDir . '/src/PhpDoc/TypeNodeResolver.php',
    'PHPStan\\PhpDoc\\TypeNodeResolverAwareExtension' => $baseDir . '/src/PhpDoc/TypeNodeResolverAwareExtension.php',
    'PHPStan\\PhpDoc\\TypeNodeResolverExtension' => $baseDir . '/src/PhpDoc/TypeNodeResolverExtension.php',
    'PHPStan\\PhpDoc\\TypeNodeResolverExtensionAwareRegistry' => $baseDir . '/src/PhpDoc/TypeNodeResolverExtensionAwareRegistry.php',
    'PHPStan\\PhpDoc\\TypeNodeResolverExtensionRegistry' => $baseDir . '/src/PhpDoc/TypeNodeResolverExtensionRegistry.php',
    'PHPStan\\PhpDoc\\TypeNodeResolverExtensionRegistryProvider' => $baseDir . '/src/PhpDoc/TypeNodeResolverExtensionRegistryProvider.php',
    'PHPStan\\PhpDoc\\TypeStringResolver' => $baseDir . '/src/PhpDoc/TypeStringResolver.php',
    'PHPStan\\Php\\PhpVersion' => $baseDir . '/src/Php/PhpVersion.php',
    'PHPStan\\Php\\PhpVersionFactory' => $baseDir . '/src/Php/PhpVersionFactory.php',
    'PHPStan\\Php\\PhpVersionFactoryFactory' => $baseDir . '/src/Php/PhpVersionFactoryFactory.php',
    'PHPStan\\Process\\CpuCoreCounter' => $baseDir . '/src/Process/CpuCoreCounter.php',
    'PHPStan\\Process\\ProcessCanceledException' => $baseDir . '/src/Process/ProcessCanceledException.php',
    'PHPStan\\Process\\ProcessCrashedException' => $baseDir . '/src/Process/ProcessCrashedException.php',
    'PHPStan\\Process\\ProcessHelper' => $baseDir . '/src/Process/ProcessHelper.php',
    'PHPStan\\Process\\ProcessPromise' => $baseDir . '/src/Process/ProcessPromise.php',
    'PHPStan\\Reflection\\AdditionalConstructorsExtension' => $baseDir . '/src/Reflection/AdditionalConstructorsExtension.php',
    'PHPStan\\Reflection\\AllowedSubTypesClassReflectionExtension' => $baseDir . '/src/Reflection/AllowedSubTypesClassReflectionExtension.php',
    'PHPStan\\Reflection\\Annotations\\AnnotationMethodReflection' => $baseDir . '/src/Reflection/Annotations/AnnotationMethodReflection.php',
    'PHPStan\\Reflection\\Annotations\\AnnotationPropertyReflection' => $baseDir . '/src/Reflection/Annotations/AnnotationPropertyReflection.php',
    'PHPStan\\Reflection\\Annotations\\AnnotationsMethodParameterReflection' => $baseDir . '/src/Reflection/Annotations/AnnotationsMethodParameterReflection.php',
    'PHPStan\\Reflection\\Annotations\\AnnotationsMethodsClassReflectionExtension' => $baseDir . '/src/Reflection/Annotations/AnnotationsMethodsClassReflectionExtension.php',
    'PHPStan\\Reflection\\Annotations\\AnnotationsPropertiesClassReflectionExtension' => $baseDir . '/src/Reflection/Annotations/AnnotationsPropertiesClassReflectionExtension.php',
    'PHPStan\\Reflection\\Assertions' => $baseDir . '/src/Reflection/Assertions.php',
    'PHPStan\\Reflection\\BetterReflection\\BetterReflectionProvider' => $baseDir . '/src/Reflection/BetterReflection/BetterReflectionProvider.php',
    'PHPStan\\Reflection\\BetterReflection\\BetterReflectionProviderFactory' => $baseDir . '/src/Reflection/BetterReflection/BetterReflectionProviderFactory.php',
    'PHPStan\\Reflection\\BetterReflection\\BetterReflectionSourceLocatorFactory' => $baseDir . '/src/Reflection/BetterReflection/BetterReflectionSourceLocatorFactory.php',
    'PHPStan\\Reflection\\BetterReflection\\Reflector\\MemoizingReflector' => $baseDir . '/src/Reflection/BetterReflection/Reflector/MemoizingReflector.php',
    'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\AutoloadFunctionsSourceLocator' => $baseDir . '/src/Reflection/BetterReflection/SourceLocator/AutoloadFunctionsSourceLocator.php',
    'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\AutoloadSourceLocator' => $baseDir . '/src/Reflection/BetterReflection/SourceLocator/AutoloadSourceLocator.php',
    'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\CachingVisitor' => $baseDir . '/src/Reflection/BetterReflection/SourceLocator/CachingVisitor.php',
    'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\ComposerJsonAndInstalledJsonSourceLocatorMaker' => $baseDir . '/src/Reflection/BetterReflection/SourceLocator/ComposerJsonAndInstalledJsonSourceLocatorMaker.php',
    'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\FetchedNode' => $baseDir . '/src/Reflection/BetterReflection/SourceLocator/FetchedNode.php',
    'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\FetchedNodesResult' => $baseDir . '/src/Reflection/BetterReflection/SourceLocator/FetchedNodesResult.php',
    'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\FileNodesFetcher' => $baseDir . '/src/Reflection/BetterReflection/SourceLocator/FileNodesFetcher.php',
    'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\FileReadTrapStreamWrapper' => $baseDir . '/src/Reflection/BetterReflection/SourceLocator/FileReadTrapStreamWrapper.php',
    'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\OptimizedDirectorySourceLocator' => $baseDir . '/src/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocator.php',
    'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\OptimizedDirectorySourceLocatorFactory' => $baseDir . '/src/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocatorFactory.php',
    'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\OptimizedDirectorySourceLocatorRepository' => $baseDir . '/src/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocatorRepository.php',
    'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\OptimizedPsrAutoloaderLocator' => $baseDir . '/src/Reflection/BetterReflection/SourceLocator/OptimizedPsrAutoloaderLocator.php',
    'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\OptimizedPsrAutoloaderLocatorFactory' => $baseDir . '/src/Reflection/BetterReflection/SourceLocator/OptimizedPsrAutoloaderLocatorFactory.php',
    'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\OptimizedSingleFileSourceLocator' => $baseDir . '/src/Reflection/BetterReflection/SourceLocator/OptimizedSingleFileSourceLocator.php',
    'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\OptimizedSingleFileSourceLocatorFactory' => $baseDir . '/src/Reflection/BetterReflection/SourceLocator/OptimizedSingleFileSourceLocatorFactory.php',
    'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\OptimizedSingleFileSourceLocatorRepository' => $baseDir . '/src/Reflection/BetterReflection/SourceLocator/OptimizedSingleFileSourceLocatorRepository.php',
    'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\PhpFileCleaner' => $baseDir . '/src/Reflection/BetterReflection/SourceLocator/PhpFileCleaner.php',
    'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\PhpVersionBlacklistSourceLocator' => $baseDir . '/src/Reflection/BetterReflection/SourceLocator/PhpVersionBlacklistSourceLocator.php',
    'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\ReflectionClassSourceLocator' => $baseDir . '/src/Reflection/BetterReflection/SourceLocator/ReflectionClassSourceLocator.php',
    'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\RewriteClassAliasSourceLocator' => $baseDir . '/src/Reflection/BetterReflection/SourceLocator/RewriteClassAliasSourceLocator.php',
    'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\SkipClassAliasSourceLocator' => $baseDir . '/src/Reflection/BetterReflection/SourceLocator/SkipClassAliasSourceLocator.php',
    'PHPStan\\Reflection\\BetterReflection\\SourceStubber\\PhpStormStubsSourceStubberFactory' => $baseDir . '/src/Reflection/BetterReflection/SourceStubber/PhpStormStubsSourceStubberFactory.php',
    'PHPStan\\Reflection\\BrokerAwareExtension' => $baseDir . '/src/Reflection/BrokerAwareExtension.php',
    'PHPStan\\Reflection\\ClassConstantReflection' => $baseDir . '/src/Reflection/ClassConstantReflection.php',
    'PHPStan\\Reflection\\ClassMemberAccessAnswerer' => $baseDir . '/src/Reflection/ClassMemberAccessAnswerer.php',
    'PHPStan\\Reflection\\ClassMemberReflection' => $baseDir . '/src/Reflection/ClassMemberReflection.php',
    'PHPStan\\Reflection\\ClassNameHelper' => $baseDir . '/src/Reflection/ClassNameHelper.php',
    'PHPStan\\Reflection\\ClassReflection' => $baseDir . '/src/Reflection/ClassReflection.php',
    'PHPStan\\Reflection\\ClassReflectionExtensionRegistry' => $baseDir . '/src/Reflection/ClassReflectionExtensionRegistry.php',
    'PHPStan\\Reflection\\ConstantNameHelper' => $baseDir . '/src/Reflection/ConstantNameHelper.php',
    'PHPStan\\Reflection\\ConstantReflection' => $baseDir . '/src/Reflection/ConstantReflection.php',
    'PHPStan\\Reflection\\Constant\\RuntimeConstantReflection' => $baseDir . '/src/Reflection/Constant/RuntimeConstantReflection.php',
    'PHPStan\\Reflection\\ConstructorsHelper' => $baseDir . '/src/Reflection/ConstructorsHelper.php',
    'PHPStan\\Reflection\\Dummy\\ChangedTypeMethodReflection' => $baseDir . '/src/Reflection/Dummy/ChangedTypeMethodReflection.php',
    'PHPStan\\Reflection\\Dummy\\ChangedTypePropertyReflection' => $baseDir . '/src/Reflection/Dummy/ChangedTypePropertyReflection.php',
    'PHPStan\\Reflection\\Dummy\\DummyConstantReflection' => $baseDir . '/src/Reflection/Dummy/DummyConstantReflection.php',
    'PHPStan\\Reflection\\Dummy\\DummyConstructorReflection' => $baseDir . '/src/Reflection/Dummy/DummyConstructorReflection.php',
    'PHPStan\\Reflection\\Dummy\\DummyMethodReflection' => $baseDir . '/src/Reflection/Dummy/DummyMethodReflection.php',
    'PHPStan\\Reflection\\Dummy\\DummyPropertyReflection' => $baseDir . '/src/Reflection/Dummy/DummyPropertyReflection.php',
    'PHPStan\\Reflection\\EnumCaseReflection' => $baseDir . '/src/Reflection/EnumCaseReflection.php',
    'PHPStan\\Reflection\\ExtendedMethodReflection' => $baseDir . '/src/Reflection/ExtendedMethodReflection.php',
    'PHPStan\\Reflection\\FunctionReflection' => $baseDir . '/src/Reflection/FunctionReflection.php',
    'PHPStan\\Reflection\\FunctionReflectionFactory' => $baseDir . '/src/Reflection/FunctionReflectionFactory.php',
    'PHPStan\\Reflection\\FunctionVariant' => $baseDir . '/src/Reflection/FunctionVariant.php',
    'PHPStan\\Reflection\\FunctionVariantWithPhpDocs' => $baseDir . '/src/Reflection/FunctionVariantWithPhpDocs.php',
    'PHPStan\\Reflection\\GenericParametersAcceptorResolver' => $baseDir . '/src/Reflection/GenericParametersAcceptorResolver.php',
    'PHPStan\\Reflection\\GlobalConstantReflection' => $baseDir . '/src/Reflection/GlobalConstantReflection.php',
    'PHPStan\\Reflection\\InaccessibleMethod' => $baseDir . '/src/Reflection/InaccessibleMethod.php',
    'PHPStan\\Reflection\\InitializerExprContext' => $baseDir . '/src/Reflection/InitializerExprContext.php',
    'PHPStan\\Reflection\\InitializerExprTypeResolver' => $baseDir . '/src/Reflection/InitializerExprTypeResolver.php',
    'PHPStan\\Reflection\\MethodPrototypeReflection' => $baseDir . '/src/Reflection/MethodPrototypeReflection.php',
    'PHPStan\\Reflection\\MethodReflection' => $baseDir . '/src/Reflection/MethodReflection.php',
    'PHPStan\\Reflection\\MethodsClassReflectionExtension' => $baseDir . '/src/Reflection/MethodsClassReflectionExtension.php',
    'PHPStan\\Reflection\\MissingConstantFromReflectionException' => $baseDir . '/src/Reflection/MissingConstantFromReflectionException.php',
    'PHPStan\\Reflection\\MissingMethodFromReflectionException' => $baseDir . '/src/Reflection/MissingMethodFromReflectionException.php',
    'PHPStan\\Reflection\\MissingPropertyFromReflectionException' => $baseDir . '/src/Reflection/MissingPropertyFromReflectionException.php',
    'PHPStan\\Reflection\\Mixin\\MixinMethodReflection' => $baseDir . '/src/Reflection/Mixin/MixinMethodReflection.php',
    'PHPStan\\Reflection\\Mixin\\MixinMethodsClassReflectionExtension' => $baseDir . '/src/Reflection/Mixin/MixinMethodsClassReflectionExtension.php',
    'PHPStan\\Reflection\\Mixin\\MixinPropertiesClassReflectionExtension' => $baseDir . '/src/Reflection/Mixin/MixinPropertiesClassReflectionExtension.php',
    'PHPStan\\Reflection\\NamespaceAnswerer' => $baseDir . '/src/Reflection/NamespaceAnswerer.php',
    'PHPStan\\Reflection\\Native\\NativeFunctionReflection' => $baseDir . '/src/Reflection/Native/NativeFunctionReflection.php',
    'PHPStan\\Reflection\\Native\\NativeMethodReflection' => $baseDir . '/src/Reflection/Native/NativeMethodReflection.php',
    'PHPStan\\Reflection\\Native\\NativeParameterReflection' => $baseDir . '/src/Reflection/Native/NativeParameterReflection.php',
    'PHPStan\\Reflection\\Native\\NativeParameterWithPhpDocsReflection' => $baseDir . '/src/Reflection/Native/NativeParameterWithPhpDocsReflection.php',
    'PHPStan\\Reflection\\ParameterReflection' => $baseDir . '/src/Reflection/ParameterReflection.php',
    'PHPStan\\Reflection\\ParameterReflectionWithPhpDocs' => $baseDir . '/src/Reflection/ParameterReflectionWithPhpDocs.php',
    'PHPStan\\Reflection\\ParametersAcceptor' => $baseDir . '/src/Reflection/ParametersAcceptor.php',
    'PHPStan\\Reflection\\ParametersAcceptorSelector' => $baseDir . '/src/Reflection/ParametersAcceptorSelector.php',
    'PHPStan\\Reflection\\ParametersAcceptorWithPhpDocs' => $baseDir . '/src/Reflection/ParametersAcceptorWithPhpDocs.php',
    'PHPStan\\Reflection\\PassedByReference' => $baseDir . '/src/Reflection/PassedByReference.php',
    'PHPStan\\Reflection\\Php\\BuiltinMethodReflection' => $baseDir . '/src/Reflection/Php/BuiltinMethodReflection.php',
    'PHPStan\\Reflection\\Php\\ClosureCallMethodReflection' => $baseDir . '/src/Reflection/Php/ClosureCallMethodReflection.php',
    'PHPStan\\Reflection\\Php\\ClosureCallUnresolvedMethodPrototypeReflection' => $baseDir . '/src/Reflection/Php/ClosureCallUnresolvedMethodPrototypeReflection.php',
    'PHPStan\\Reflection\\Php\\DummyParameter' => $baseDir . '/src/Reflection/Php/DummyParameter.php',
    'PHPStan\\Reflection\\Php\\DummyParameterWithPhpDocs' => $baseDir . '/src/Reflection/Php/DummyParameterWithPhpDocs.php',
    'PHPStan\\Reflection\\Php\\EnumAllowedSubTypesClassReflectionExtension' => $baseDir . '/src/Reflection/Php/EnumAllowedSubTypesClassReflectionExtension.php',
    'PHPStan\\Reflection\\Php\\EnumCasesMethodReflection' => $baseDir . '/src/Reflection/Php/EnumCasesMethodReflection.php',
    'PHPStan\\Reflection\\Php\\EnumPropertyReflection' => $baseDir . '/src/Reflection/Php/EnumPropertyReflection.php',
    'PHPStan\\Reflection\\Php\\EnumUnresolvedPropertyPrototypeReflection' => $baseDir . '/src/Reflection/Php/EnumUnresolvedPropertyPrototypeReflection.php',
    'PHPStan\\Reflection\\Php\\FakeBuiltinMethodReflection' => $baseDir . '/src/Reflection/Php/FakeBuiltinMethodReflection.php',
    'PHPStan\\Reflection\\Php\\NativeBuiltinMethodReflection' => $baseDir . '/src/Reflection/Php/NativeBuiltinMethodReflection.php',
    'PHPStan\\Reflection\\Php\\PhpClassReflectionExtension' => $baseDir . '/src/Reflection/Php/PhpClassReflectionExtension.php',
    'PHPStan\\Reflection\\Php\\PhpFunctionFromParserNodeReflection' => $baseDir . '/src/Reflection/Php/PhpFunctionFromParserNodeReflection.php',
    'PHPStan\\Reflection\\Php\\PhpFunctionReflection' => $baseDir . '/src/Reflection/Php/PhpFunctionReflection.php',
    'PHPStan\\Reflection\\Php\\PhpMethodFromParserNodeReflection' => $baseDir . '/src/Reflection/Php/PhpMethodFromParserNodeReflection.php',
    'PHPStan\\Reflection\\Php\\PhpMethodReflection' => $baseDir . '/src/Reflection/Php/PhpMethodReflection.php',
    'PHPStan\\Reflection\\Php\\PhpMethodReflectionFactory' => $baseDir . '/src/Reflection/Php/PhpMethodReflectionFactory.php',
    'PHPStan\\Reflection\\Php\\PhpParameterFromParserNodeReflection' => $baseDir . '/src/Reflection/Php/PhpParameterFromParserNodeReflection.php',
    'PHPStan\\Reflection\\Php\\PhpParameterReflection' => $baseDir . '/src/Reflection/Php/PhpParameterReflection.php',
    'PHPStan\\Reflection\\Php\\PhpPropertyReflection' => $baseDir . '/src/Reflection/Php/PhpPropertyReflection.php',
    'PHPStan\\Reflection\\Php\\SimpleXMLElementProperty' => $baseDir . '/src/Reflection/Php/SimpleXMLElementProperty.php',
    'PHPStan\\Reflection\\Php\\Soap\\SoapClientMethodReflection' => $baseDir . '/src/Reflection/Php/Soap/SoapClientMethodReflection.php',
    'PHPStan\\Reflection\\Php\\Soap\\SoapClientMethodsClassReflectionExtension' => $baseDir . '/src/Reflection/Php/Soap/SoapClientMethodsClassReflectionExtension.php',
    'PHPStan\\Reflection\\Php\\UniversalObjectCrateProperty' => $baseDir . '/src/Reflection/Php/UniversalObjectCrateProperty.php',
    'PHPStan\\Reflection\\Php\\UniversalObjectCratesClassReflectionExtension' => $baseDir . '/src/Reflection/Php/UniversalObjectCratesClassReflectionExtension.php',
    'PHPStan\\Reflection\\PropertiesClassReflectionExtension' => $baseDir . '/src/Reflection/PropertiesClassReflectionExtension.php',
    'PHPStan\\Reflection\\PropertyReflection' => $baseDir . '/src/Reflection/PropertyReflection.php',
    'PHPStan\\Reflection\\ReflectionProvider' => $baseDir . '/src/Reflection/ReflectionProvider.php',
    'PHPStan\\Reflection\\ReflectionProviderStaticAccessor' => $baseDir . '/src/Reflection/ReflectionProviderStaticAccessor.php',
    'PHPStan\\Reflection\\ReflectionProvider\\DirectReflectionProviderProvider' => $baseDir . '/src/Reflection/ReflectionProvider/DirectReflectionProviderProvider.php',
    'PHPStan\\Reflection\\ReflectionProvider\\DummyReflectionProvider' => $baseDir . '/src/Reflection/ReflectionProvider/DummyReflectionProvider.php',
    'PHPStan\\Reflection\\ReflectionProvider\\LazyReflectionProviderProvider' => $baseDir . '/src/Reflection/ReflectionProvider/LazyReflectionProviderProvider.php',
    'PHPStan\\Reflection\\ReflectionProvider\\MemoizingReflectionProvider' => $baseDir . '/src/Reflection/ReflectionProvider/MemoizingReflectionProvider.php',
    'PHPStan\\Reflection\\ReflectionProvider\\ReflectionProviderFactory' => $baseDir . '/src/Reflection/ReflectionProvider/ReflectionProviderFactory.php',
    'PHPStan\\Reflection\\ReflectionProvider\\ReflectionProviderProvider' => $baseDir . '/src/Reflection/ReflectionProvider/ReflectionProviderProvider.php',
    'PHPStan\\Reflection\\ReflectionProvider\\SetterReflectionProviderProvider' => $baseDir . '/src/Reflection/ReflectionProvider/SetterReflectionProviderProvider.php',
    'PHPStan\\Reflection\\ResolvedFunctionVariant' => $baseDir . '/src/Reflection/ResolvedFunctionVariant.php',
    'PHPStan\\Reflection\\ResolvedMethodReflection' => $baseDir . '/src/Reflection/ResolvedMethodReflection.php',
    'PHPStan\\Reflection\\ResolvedPropertyReflection' => $baseDir . '/src/Reflection/ResolvedPropertyReflection.php',
    'PHPStan\\Reflection\\SignatureMap\\FunctionSignature' => $baseDir . '/src/Reflection/SignatureMap/FunctionSignature.php',
    'PHPStan\\Reflection\\SignatureMap\\FunctionSignatureMapProvider' => $baseDir . '/src/Reflection/SignatureMap/FunctionSignatureMapProvider.php',
    'PHPStan\\Reflection\\SignatureMap\\NativeFunctionReflectionProvider' => $baseDir . '/src/Reflection/SignatureMap/NativeFunctionReflectionProvider.php',
    'PHPStan\\Reflection\\SignatureMap\\ParameterSignature' => $baseDir . '/src/Reflection/SignatureMap/ParameterSignature.php',
    'PHPStan\\Reflection\\SignatureMap\\Php8SignatureMapProvider' => $baseDir . '/src/Reflection/SignatureMap/Php8SignatureMapProvider.php',
    'PHPStan\\Reflection\\SignatureMap\\SignatureMapParser' => $baseDir . '/src/Reflection/SignatureMap/SignatureMapParser.php',
    'PHPStan\\Reflection\\SignatureMap\\SignatureMapProvider' => $baseDir . '/src/Reflection/SignatureMap/SignatureMapProvider.php',
    'PHPStan\\Reflection\\SignatureMap\\SignatureMapProviderFactory' => $baseDir . '/src/Reflection/SignatureMap/SignatureMapProviderFactory.php',
    'PHPStan\\Reflection\\TrivialParametersAcceptor' => $baseDir . '/src/Reflection/TrivialParametersAcceptor.php',
    'PHPStan\\Reflection\\Type\\CallbackUnresolvedMethodPrototypeReflection' => $baseDir . '/src/Reflection/Type/CallbackUnresolvedMethodPrototypeReflection.php',
    'PHPStan\\Reflection\\Type\\CallbackUnresolvedPropertyPrototypeReflection' => $baseDir . '/src/Reflection/Type/CallbackUnresolvedPropertyPrototypeReflection.php',
    'PHPStan\\Reflection\\Type\\CalledOnTypeUnresolvedMethodPrototypeReflection' => $baseDir . '/src/Reflection/Type/CalledOnTypeUnresolvedMethodPrototypeReflection.php',
    'PHPStan\\Reflection\\Type\\CalledOnTypeUnresolvedPropertyPrototypeReflection' => $baseDir . '/src/Reflection/Type/CalledOnTypeUnresolvedPropertyPrototypeReflection.php',
    'PHPStan\\Reflection\\Type\\IntersectionTypeMethodReflection' => $baseDir . '/src/Reflection/Type/IntersectionTypeMethodReflection.php',
    'PHPStan\\Reflection\\Type\\IntersectionTypePropertyReflection' => $baseDir . '/src/Reflection/Type/IntersectionTypePropertyReflection.php',
    'PHPStan\\Reflection\\Type\\IntersectionTypeUnresolvedMethodPrototypeReflection' => $baseDir . '/src/Reflection/Type/IntersectionTypeUnresolvedMethodPrototypeReflection.php',
    'PHPStan\\Reflection\\Type\\IntersectionTypeUnresolvedPropertyPrototypeReflection' => $baseDir . '/src/Reflection/Type/IntersectionTypeUnresolvedPropertyPrototypeReflection.php',
    'PHPStan\\Reflection\\Type\\UnionTypeMethodReflection' => $baseDir . '/src/Reflection/Type/UnionTypeMethodReflection.php',
    'PHPStan\\Reflection\\Type\\UnionTypePropertyReflection' => $baseDir . '/src/Reflection/Type/UnionTypePropertyReflection.php',
    'PHPStan\\Reflection\\Type\\UnionTypeUnresolvedMethodPrototypeReflection' => $baseDir . '/src/Reflection/Type/UnionTypeUnresolvedMethodPrototypeReflection.php',
    'PHPStan\\Reflection\\Type\\UnionTypeUnresolvedPropertyPrototypeReflection' => $baseDir . '/src/Reflection/Type/UnionTypeUnresolvedPropertyPrototypeReflection.php',
    'PHPStan\\Reflection\\Type\\UnresolvedMethodPrototypeReflection' => $baseDir . '/src/Reflection/Type/UnresolvedMethodPrototypeReflection.php',
    'PHPStan\\Reflection\\Type\\UnresolvedPropertyPrototypeReflection' => $baseDir . '/src/Reflection/Type/UnresolvedPropertyPrototypeReflection.php',
    'PHPStan\\Reflection\\WrappedExtendedMethodReflection' => $baseDir . '/src/Reflection/WrappedExtendedMethodReflection.php',
    'PHPStan\\Reflection\\WrapperPropertyReflection' => $baseDir . '/src/Reflection/WrapperPropertyReflection.php',
    'PHPStan\\Rules\\Api\\ApiClassConstFetchRule' => $baseDir . '/src/Rules/Api/ApiClassConstFetchRule.php',
    'PHPStan\\Rules\\Api\\ApiClassExtendsRule' => $baseDir . '/src/Rules/Api/ApiClassExtendsRule.php',
    'PHPStan\\Rules\\Api\\ApiClassImplementsRule' => $baseDir . '/src/Rules/Api/ApiClassImplementsRule.php',
    'PHPStan\\Rules\\Api\\ApiInstanceofRule' => $baseDir . '/src/Rules/Api/ApiInstanceofRule.php',
    'PHPStan\\Rules\\Api\\ApiInstanceofTypeRule' => $baseDir . '/src/Rules/Api/ApiInstanceofTypeRule.php',
    'PHPStan\\Rules\\Api\\ApiInstantiationRule' => $baseDir . '/src/Rules/Api/ApiInstantiationRule.php',
    'PHPStan\\Rules\\Api\\ApiInterfaceExtendsRule' => $baseDir . '/src/Rules/Api/ApiInterfaceExtendsRule.php',
    'PHPStan\\Rules\\Api\\ApiMethodCallRule' => $baseDir . '/src/Rules/Api/ApiMethodCallRule.php',
    'PHPStan\\Rules\\Api\\ApiRuleHelper' => $baseDir . '/src/Rules/Api/ApiRuleHelper.php',
    'PHPStan\\Rules\\Api\\ApiStaticCallRule' => $baseDir . '/src/Rules/Api/ApiStaticCallRule.php',
    'PHPStan\\Rules\\Api\\ApiTraitUseRule' => $baseDir . '/src/Rules/Api/ApiTraitUseRule.php',
    'PHPStan\\Rules\\Api\\BcUncoveredInterface' => $baseDir . '/src/Rules/Api/BcUncoveredInterface.php',
    'PHPStan\\Rules\\Api\\GetTemplateTypeRule' => $baseDir . '/src/Rules/Api/GetTemplateTypeRule.php',
    'PHPStan\\Rules\\Api\\NodeConnectingVisitorAttributesRule' => $baseDir . '/src/Rules/Api/NodeConnectingVisitorAttributesRule.php',
    'PHPStan\\Rules\\Api\\PhpStanNamespaceIn3rdPartyPackageRule' => $baseDir . '/src/Rules/Api/PhpStanNamespaceIn3rdPartyPackageRule.php',
    'PHPStan\\Rules\\Api\\RuntimeReflectionFunctionRule' => $baseDir . '/src/Rules/Api/RuntimeReflectionFunctionRule.php',
    'PHPStan\\Rules\\Api\\RuntimeReflectionInstantiationRule' => $baseDir . '/src/Rules/Api/RuntimeReflectionInstantiationRule.php',
    'PHPStan\\Rules\\Arrays\\AllowedArrayKeysTypes' => $baseDir . '/src/Rules/Arrays/AllowedArrayKeysTypes.php',
    'PHPStan\\Rules\\Arrays\\AppendedArrayItemTypeRule' => $baseDir . '/src/Rules/Arrays/AppendedArrayItemTypeRule.php',
    'PHPStan\\Rules\\Arrays\\AppendedArrayKeyTypeRule' => $baseDir . '/src/Rules/Arrays/AppendedArrayKeyTypeRule.php',
    'PHPStan\\Rules\\Arrays\\ArrayDestructuringRule' => $baseDir . '/src/Rules/Arrays/ArrayDestructuringRule.php',
    'PHPStan\\Rules\\Arrays\\ArrayUnpackingRule' => $baseDir . '/src/Rules/Arrays/ArrayUnpackingRule.php',
    'PHPStan\\Rules\\Arrays\\DeadForeachRule' => $baseDir . '/src/Rules/Arrays/DeadForeachRule.php',
    'PHPStan\\Rules\\Arrays\\DuplicateKeysInLiteralArraysRule' => $baseDir . '/src/Rules/Arrays/DuplicateKeysInLiteralArraysRule.php',
    'PHPStan\\Rules\\Arrays\\EmptyArrayItemRule' => $baseDir . '/src/Rules/Arrays/EmptyArrayItemRule.php',
    'PHPStan\\Rules\\Arrays\\InvalidKeyInArrayDimFetchRule' => $baseDir . '/src/Rules/Arrays/InvalidKeyInArrayDimFetchRule.php',
    'PHPStan\\Rules\\Arrays\\InvalidKeyInArrayItemRule' => $baseDir . '/src/Rules/Arrays/InvalidKeyInArrayItemRule.php',
    'PHPStan\\Rules\\Arrays\\IterableInForeachRule' => $baseDir . '/src/Rules/Arrays/IterableInForeachRule.php',
    'PHPStan\\Rules\\Arrays\\NonexistentOffsetInArrayDimFetchCheck' => $baseDir . '/src/Rules/Arrays/NonexistentOffsetInArrayDimFetchCheck.php',
    'PHPStan\\Rules\\Arrays\\NonexistentOffsetInArrayDimFetchRule' => $baseDir . '/src/Rules/Arrays/NonexistentOffsetInArrayDimFetchRule.php',
    'PHPStan\\Rules\\Arrays\\OffsetAccessAssignOpRule' => $baseDir . '/src/Rules/Arrays/OffsetAccessAssignOpRule.php',
    'PHPStan\\Rules\\Arrays\\OffsetAccessAssignmentRule' => $baseDir . '/src/Rules/Arrays/OffsetAccessAssignmentRule.php',
    'PHPStan\\Rules\\Arrays\\OffsetAccessValueAssignmentRule' => $baseDir . '/src/Rules/Arrays/OffsetAccessValueAssignmentRule.php',
    'PHPStan\\Rules\\Arrays\\OffsetAccessWithoutDimForReadingRule' => $baseDir . '/src/Rules/Arrays/OffsetAccessWithoutDimForReadingRule.php',
    'PHPStan\\Rules\\Arrays\\UnpackIterableInArrayRule' => $baseDir . '/src/Rules/Arrays/UnpackIterableInArrayRule.php',
    'PHPStan\\Rules\\AttributesCheck' => $baseDir . '/src/Rules/AttributesCheck.php',
    'PHPStan\\Rules\\Cast\\EchoRule' => $baseDir . '/src/Rules/Cast/EchoRule.php',
    'PHPStan\\Rules\\Cast\\InvalidCastRule' => $baseDir . '/src/Rules/Cast/InvalidCastRule.php',
    'PHPStan\\Rules\\Cast\\InvalidPartOfEncapsedStringRule' => $baseDir . '/src/Rules/Cast/InvalidPartOfEncapsedStringRule.php',
    'PHPStan\\Rules\\Cast\\PrintRule' => $baseDir . '/src/Rules/Cast/PrintRule.php',
    'PHPStan\\Rules\\Cast\\UnsetCastRule' => $baseDir . '/src/Rules/Cast/UnsetCastRule.php',
    'PHPStan\\Rules\\ClassCaseSensitivityCheck' => $baseDir . '/src/Rules/ClassCaseSensitivityCheck.php',
    'PHPStan\\Rules\\ClassNameNodePair' => $baseDir . '/src/Rules/ClassNameNodePair.php',
    'PHPStan\\Rules\\Classes\\AccessPrivateConstantThroughStaticRule' => $baseDir . '/src/Rules/Classes/AccessPrivateConstantThroughStaticRule.php',
    'PHPStan\\Rules\\Classes\\AllowedSubTypesRule' => $baseDir . '/src/Rules/Classes/AllowedSubTypesRule.php',
    'PHPStan\\Rules\\Classes\\ClassAttributesRule' => $baseDir . '/src/Rules/Classes/ClassAttributesRule.php',
    'PHPStan\\Rules\\Classes\\ClassConstantAttributesRule' => $baseDir . '/src/Rules/Classes/ClassConstantAttributesRule.php',
    'PHPStan\\Rules\\Classes\\ClassConstantRule' => $baseDir . '/src/Rules/Classes/ClassConstantRule.php',
    'PHPStan\\Rules\\Classes\\DuplicateClassDeclarationRule' => $baseDir . '/src/Rules/Classes/DuplicateClassDeclarationRule.php',
    'PHPStan\\Rules\\Classes\\DuplicateDeclarationRule' => $baseDir . '/src/Rules/Classes/DuplicateDeclarationRule.php',
    'PHPStan\\Rules\\Classes\\EnumSanityRule' => $baseDir . '/src/Rules/Classes/EnumSanityRule.php',
    'PHPStan\\Rules\\Classes\\ExistingClassInClassExtendsRule' => $baseDir . '/src/Rules/Classes/ExistingClassInClassExtendsRule.php',
    'PHPStan\\Rules\\Classes\\ExistingClassInInstanceOfRule' => $baseDir . '/src/Rules/Classes/ExistingClassInInstanceOfRule.php',
    'PHPStan\\Rules\\Classes\\ExistingClassInTraitUseRule' => $baseDir . '/src/Rules/Classes/ExistingClassInTraitUseRule.php',
    'PHPStan\\Rules\\Classes\\ExistingClassesInClassImplementsRule' => $baseDir . '/src/Rules/Classes/ExistingClassesInClassImplementsRule.php',
    'PHPStan\\Rules\\Classes\\ExistingClassesInEnumImplementsRule' => $baseDir . '/src/Rules/Classes/ExistingClassesInEnumImplementsRule.php',
    'PHPStan\\Rules\\Classes\\ExistingClassesInInterfaceExtendsRule' => $baseDir . '/src/Rules/Classes/ExistingClassesInInterfaceExtendsRule.php',
    'PHPStan\\Rules\\Classes\\ImpossibleInstanceOfRule' => $baseDir . '/src/Rules/Classes/ImpossibleInstanceOfRule.php',
    'PHPStan\\Rules\\Classes\\InstantiationCallableRule' => $baseDir . '/src/Rules/Classes/InstantiationCallableRule.php',
    'PHPStan\\Rules\\Classes\\InstantiationRule' => $baseDir . '/src/Rules/Classes/InstantiationRule.php',
    'PHPStan\\Rules\\Classes\\InvalidPromotedPropertiesRule' => $baseDir . '/src/Rules/Classes/InvalidPromotedPropertiesRule.php',
    'PHPStan\\Rules\\Classes\\LocalTypeAliasesCheck' => $baseDir . '/src/Rules/Classes/LocalTypeAliasesCheck.php',
    'PHPStan\\Rules\\Classes\\LocalTypeAliasesRule' => $baseDir . '/src/Rules/Classes/LocalTypeAliasesRule.php',
    'PHPStan\\Rules\\Classes\\LocalTypeTraitAliasesRule' => $baseDir . '/src/Rules/Classes/LocalTypeTraitAliasesRule.php',
    'PHPStan\\Rules\\Classes\\MixinRule' => $baseDir . '/src/Rules/Classes/MixinRule.php',
    'PHPStan\\Rules\\Classes\\NewStaticRule' => $baseDir . '/src/Rules/Classes/NewStaticRule.php',
    'PHPStan\\Rules\\Classes\\NonClassAttributeClassRule' => $baseDir . '/src/Rules/Classes/NonClassAttributeClassRule.php',
    'PHPStan\\Rules\\Classes\\TraitAttributeClassRule' => $baseDir . '/src/Rules/Classes/TraitAttributeClassRule.php',
    'PHPStan\\Rules\\Classes\\UnusedConstructorParametersRule' => $baseDir . '/src/Rules/Classes/UnusedConstructorParametersRule.php',
    'PHPStan\\Rules\\Comparison\\BooleanAndConstantConditionRule' => $baseDir . '/src/Rules/Comparison/BooleanAndConstantConditionRule.php',
    'PHPStan\\Rules\\Comparison\\BooleanNotConstantConditionRule' => $baseDir . '/src/Rules/Comparison/BooleanNotConstantConditionRule.php',
    'PHPStan\\Rules\\Comparison\\BooleanOrConstantConditionRule' => $baseDir . '/src/Rules/Comparison/BooleanOrConstantConditionRule.php',
    'PHPStan\\Rules\\Comparison\\ConstantConditionRuleHelper' => $baseDir . '/src/Rules/Comparison/ConstantConditionRuleHelper.php',
    'PHPStan\\Rules\\Comparison\\ConstantLooseComparisonRule' => $baseDir . '/src/Rules/Comparison/ConstantLooseComparisonRule.php',
    'PHPStan\\Rules\\Comparison\\DoWhileLoopConstantConditionRule' => $baseDir . '/src/Rules/Comparison/DoWhileLoopConstantConditionRule.php',
    'PHPStan\\Rules\\Comparison\\ElseIfConstantConditionRule' => $baseDir . '/src/Rules/Comparison/ElseIfConstantConditionRule.php',
    'PHPStan\\Rules\\Comparison\\IfConstantConditionRule' => $baseDir . '/src/Rules/Comparison/IfConstantConditionRule.php',
    'PHPStan\\Rules\\Comparison\\ImpossibleCheckTypeFunctionCallRule' => $baseDir . '/src/Rules/Comparison/ImpossibleCheckTypeFunctionCallRule.php',
    'PHPStan\\Rules\\Comparison\\ImpossibleCheckTypeHelper' => $baseDir . '/src/Rules/Comparison/ImpossibleCheckTypeHelper.php',
    'PHPStan\\Rules\\Comparison\\ImpossibleCheckTypeMethodCallRule' => $baseDir . '/src/Rules/Comparison/ImpossibleCheckTypeMethodCallRule.php',
    'PHPStan\\Rules\\Comparison\\ImpossibleCheckTypeStaticMethodCallRule' => $baseDir . '/src/Rules/Comparison/ImpossibleCheckTypeStaticMethodCallRule.php',
    'PHPStan\\Rules\\Comparison\\MatchExpressionRule' => $baseDir . '/src/Rules/Comparison/MatchExpressionRule.php',
    'PHPStan\\Rules\\Comparison\\NumberComparisonOperatorsConstantConditionRule' => $baseDir . '/src/Rules/Comparison/NumberComparisonOperatorsConstantConditionRule.php',
    'PHPStan\\Rules\\Comparison\\StrictComparisonOfDifferentTypesRule' => $baseDir . '/src/Rules/Comparison/StrictComparisonOfDifferentTypesRule.php',
    'PHPStan\\Rules\\Comparison\\TernaryOperatorConstantConditionRule' => $baseDir . '/src/Rules/Comparison/TernaryOperatorConstantConditionRule.php',
    'PHPStan\\Rules\\Comparison\\UnreachableIfBranchesRule' => $baseDir . '/src/Rules/Comparison/UnreachableIfBranchesRule.php',
    'PHPStan\\Rules\\Comparison\\UnreachableTernaryElseBranchRule' => $baseDir . '/src/Rules/Comparison/UnreachableTernaryElseBranchRule.php',
    'PHPStan\\Rules\\Comparison\\UsageOfVoidMatchExpressionRule' => $baseDir . '/src/Rules/Comparison/UsageOfVoidMatchExpressionRule.php',
    'PHPStan\\Rules\\Comparison\\WhileLoopAlwaysFalseConditionRule' => $baseDir . '/src/Rules/Comparison/WhileLoopAlwaysFalseConditionRule.php',
    'PHPStan\\Rules\\Comparison\\WhileLoopAlwaysTrueConditionRule' => $baseDir . '/src/Rules/Comparison/WhileLoopAlwaysTrueConditionRule.php',
    'PHPStan\\Rules\\Constants\\AlwaysUsedClassConstantsExtension' => $baseDir . '/src/Rules/Constants/AlwaysUsedClassConstantsExtension.php',
    'PHPStan\\Rules\\Constants\\AlwaysUsedClassConstantsExtensionProvider' => $baseDir . '/src/Rules/Constants/AlwaysUsedClassConstantsExtensionProvider.php',
    'PHPStan\\Rules\\Constants\\ConstantRule' => $baseDir . '/src/Rules/Constants/ConstantRule.php',
    'PHPStan\\Rules\\Constants\\FinalConstantRule' => $baseDir . '/src/Rules/Constants/FinalConstantRule.php',
    'PHPStan\\Rules\\Constants\\LazyAlwaysUsedClassConstantsExtensionProvider' => $baseDir . '/src/Rules/Constants/LazyAlwaysUsedClassConstantsExtensionProvider.php',
    'PHPStan\\Rules\\Constants\\MissingClassConstantTypehintRule' => $baseDir . '/src/Rules/Constants/MissingClassConstantTypehintRule.php',
    'PHPStan\\Rules\\Constants\\OverridingConstantRule' => $baseDir . '/src/Rules/Constants/OverridingConstantRule.php',
    'PHPStan\\Rules\\DateTimeInstantiationRule' => $baseDir . '/src/Rules/DateTimeInstantiationRule.php',
    'PHPStan\\Rules\\DeadCode\\NoopRule' => $baseDir . '/src/Rules/DeadCode/NoopRule.php',
    'PHPStan\\Rules\\DeadCode\\UnreachableStatementRule' => $baseDir . '/src/Rules/DeadCode/UnreachableStatementRule.php',
    'PHPStan\\Rules\\DeadCode\\UnusedPrivateConstantRule' => $baseDir . '/src/Rules/DeadCode/UnusedPrivateConstantRule.php',
    'PHPStan\\Rules\\DeadCode\\UnusedPrivateMethodRule' => $baseDir . '/src/Rules/DeadCode/UnusedPrivateMethodRule.php',
    'PHPStan\\Rules\\DeadCode\\UnusedPrivatePropertyRule' => $baseDir . '/src/Rules/DeadCode/UnusedPrivatePropertyRule.php',
    'PHPStan\\Rules\\Debug\\DumpTypeRule' => $baseDir . '/src/Rules/Debug/DumpTypeRule.php',
    'PHPStan\\Rules\\Debug\\FileAssertRule' => $baseDir . '/src/Rules/Debug/FileAssertRule.php',
    'PHPStan\\Rules\\DirectRegistry' => $baseDir . '/src/Rules/DirectRegistry.php',
    'PHPStan\\Rules\\EnumCases\\EnumCaseAttributesRule' => $baseDir . '/src/Rules/EnumCases/EnumCaseAttributesRule.php',
    'PHPStan\\Rules\\Exceptions\\CatchWithUnthrownExceptionRule' => $baseDir . '/src/Rules/Exceptions/CatchWithUnthrownExceptionRule.php',
    'PHPStan\\Rules\\Exceptions\\CaughtExceptionExistenceRule' => $baseDir . '/src/Rules/Exceptions/CaughtExceptionExistenceRule.php',
    'PHPStan\\Rules\\Exceptions\\DefaultExceptionTypeResolver' => $baseDir . '/src/Rules/Exceptions/DefaultExceptionTypeResolver.php',
    'PHPStan\\Rules\\Exceptions\\ExceptionTypeResolver' => $baseDir . '/src/Rules/Exceptions/ExceptionTypeResolver.php',
    'PHPStan\\Rules\\Exceptions\\MissingCheckedExceptionInFunctionThrowsRule' => $baseDir . '/src/Rules/Exceptions/MissingCheckedExceptionInFunctionThrowsRule.php',
    'PHPStan\\Rules\\Exceptions\\MissingCheckedExceptionInMethodThrowsRule' => $baseDir . '/src/Rules/Exceptions/MissingCheckedExceptionInMethodThrowsRule.php',
    'PHPStan\\Rules\\Exceptions\\MissingCheckedExceptionInThrowsCheck' => $baseDir . '/src/Rules/Exceptions/MissingCheckedExceptionInThrowsCheck.php',
    'PHPStan\\Rules\\Exceptions\\OverwrittenExitPointByFinallyRule' => $baseDir . '/src/Rules/Exceptions/OverwrittenExitPointByFinallyRule.php',
    'PHPStan\\Rules\\Exceptions\\ThrowExpressionRule' => $baseDir . '/src/Rules/Exceptions/ThrowExpressionRule.php',
    'PHPStan\\Rules\\Exceptions\\ThrowsVoidFunctionWithExplicitThrowPointRule' => $baseDir . '/src/Rules/Exceptions/ThrowsVoidFunctionWithExplicitThrowPointRule.php',
    'PHPStan\\Rules\\Exceptions\\ThrowsVoidMethodWithExplicitThrowPointRule' => $baseDir . '/src/Rules/Exceptions/ThrowsVoidMethodWithExplicitThrowPointRule.php',
    'PHPStan\\Rules\\Exceptions\\TooWideFunctionThrowTypeRule' => $baseDir . '/src/Rules/Exceptions/TooWideFunctionThrowTypeRule.php',
    'PHPStan\\Rules\\Exceptions\\TooWideMethodThrowTypeRule' => $baseDir . '/src/Rules/Exceptions/TooWideMethodThrowTypeRule.php',
    'PHPStan\\Rules\\Exceptions\\TooWideThrowTypeCheck' => $baseDir . '/src/Rules/Exceptions/TooWideThrowTypeCheck.php',
    'PHPStan\\Rules\\FileRuleError' => $baseDir . '/src/Rules/FileRuleError.php',
    'PHPStan\\Rules\\FoundTypeResult' => $baseDir . '/src/Rules/FoundTypeResult.php',
    'PHPStan\\Rules\\FunctionCallParametersCheck' => $baseDir . '/src/Rules/FunctionCallParametersCheck.php',
    'PHPStan\\Rules\\FunctionDefinitionCheck' => $baseDir . '/src/Rules/FunctionDefinitionCheck.php',
    'PHPStan\\Rules\\FunctionReturnTypeCheck' => $baseDir . '/src/Rules/FunctionReturnTypeCheck.php',
    'PHPStan\\Rules\\Functions\\ArrayFilterRule' => $baseDir . '/src/Rules/Functions/ArrayFilterRule.php',
    'PHPStan\\Rules\\Functions\\ArrowFunctionAttributesRule' => $baseDir . '/src/Rules/Functions/ArrowFunctionAttributesRule.php',
    'PHPStan\\Rules\\Functions\\ArrowFunctionReturnNullsafeByRefRule' => $baseDir . '/src/Rules/Functions/ArrowFunctionReturnNullsafeByRefRule.php',
    'PHPStan\\Rules\\Functions\\ArrowFunctionReturnTypeRule' => $baseDir . '/src/Rules/Functions/ArrowFunctionReturnTypeRule.php',
    'PHPStan\\Rules\\Functions\\CallCallablesRule' => $baseDir . '/src/Rules/Functions/CallCallablesRule.php',
    'PHPStan\\Rules\\Functions\\CallToFunctionParametersRule' => $baseDir . '/src/Rules/Functions/CallToFunctionParametersRule.php',
    'PHPStan\\Rules\\Functions\\CallToFunctionStatementWithoutSideEffectsRule' => $baseDir . '/src/Rules/Functions/CallToFunctionStatementWithoutSideEffectsRule.php',
    'PHPStan\\Rules\\Functions\\CallToNonExistentFunctionRule' => $baseDir . '/src/Rules/Functions/CallToNonExistentFunctionRule.php',
    'PHPStan\\Rules\\Functions\\ClosureAttributesRule' => $baseDir . '/src/Rules/Functions/ClosureAttributesRule.php',
    'PHPStan\\Rules\\Functions\\ClosureReturnTypeRule' => $baseDir . '/src/Rules/Functions/ClosureReturnTypeRule.php',
    'PHPStan\\Rules\\Functions\\DefineParametersRule' => $baseDir . '/src/Rules/Functions/DefineParametersRule.php',
    'PHPStan\\Rules\\Functions\\DuplicateFunctionDeclarationRule' => $baseDir . '/src/Rules/Functions/DuplicateFunctionDeclarationRule.php',
    'PHPStan\\Rules\\Functions\\ExistingClassesInArrowFunctionTypehintsRule' => $baseDir . '/src/Rules/Functions/ExistingClassesInArrowFunctionTypehintsRule.php',
    'PHPStan\\Rules\\Functions\\ExistingClassesInClosureTypehintsRule' => $baseDir . '/src/Rules/Functions/ExistingClassesInClosureTypehintsRule.php',
    'PHPStan\\Rules\\Functions\\ExistingClassesInTypehintsRule' => $baseDir . '/src/Rules/Functions/ExistingClassesInTypehintsRule.php',
    'PHPStan\\Rules\\Functions\\FunctionAttributesRule' => $baseDir . '/src/Rules/Functions/FunctionAttributesRule.php',
    'PHPStan\\Rules\\Functions\\FunctionCallableRule' => $baseDir . '/src/Rules/Functions/FunctionCallableRule.php',
    'PHPStan\\Rules\\Functions\\ImplodeFunctionRule' => $baseDir . '/src/Rules/Functions/ImplodeFunctionRule.php',
    'PHPStan\\Rules\\Functions\\IncompatibleArrowFunctionDefaultParameterTypeRule' => $baseDir . '/src/Rules/Functions/IncompatibleArrowFunctionDefaultParameterTypeRule.php',
    'PHPStan\\Rules\\Functions\\IncompatibleClosureDefaultParameterTypeRule' => $baseDir . '/src/Rules/Functions/IncompatibleClosureDefaultParameterTypeRule.php',
    'PHPStan\\Rules\\Functions\\IncompatibleDefaultParameterTypeRule' => $baseDir . '/src/Rules/Functions/IncompatibleDefaultParameterTypeRule.php',
    'PHPStan\\Rules\\Functions\\InnerFunctionRule' => $baseDir . '/src/Rules/Functions/InnerFunctionRule.php',
    'PHPStan\\Rules\\Functions\\MissingFunctionParameterTypehintRule' => $baseDir . '/src/Rules/Functions/MissingFunctionParameterTypehintRule.php',
    'PHPStan\\Rules\\Functions\\MissingFunctionReturnTypehintRule' => $baseDir . '/src/Rules/Functions/MissingFunctionReturnTypehintRule.php',
    'PHPStan\\Rules\\Functions\\ParamAttributesRule' => $baseDir . '/src/Rules/Functions/ParamAttributesRule.php',
    'PHPStan\\Rules\\Functions\\PrintfParametersRule' => $baseDir . '/src/Rules/Functions/PrintfParametersRule.php',
    'PHPStan\\Rules\\Functions\\RandomIntParametersRule' => $baseDir . '/src/Rules/Functions/RandomIntParametersRule.php',
    'PHPStan\\Rules\\Functions\\ReturnNullsafeByRefRule' => $baseDir . '/src/Rules/Functions/ReturnNullsafeByRefRule.php',
    'PHPStan\\Rules\\Functions\\ReturnTypeRule' => $baseDir . '/src/Rules/Functions/ReturnTypeRule.php',
    'PHPStan\\Rules\\Functions\\UnusedClosureUsesRule' => $baseDir . '/src/Rules/Functions/UnusedClosureUsesRule.php',
    'PHPStan\\Rules\\Generators\\YieldFromTypeRule' => $baseDir . '/src/Rules/Generators/YieldFromTypeRule.php',
    'PHPStan\\Rules\\Generators\\YieldInGeneratorRule' => $baseDir . '/src/Rules/Generators/YieldInGeneratorRule.php',
    'PHPStan\\Rules\\Generators\\YieldTypeRule' => $baseDir . '/src/Rules/Generators/YieldTypeRule.php',
    'PHPStan\\Rules\\Generics\\ClassAncestorsRule' => $baseDir . '/src/Rules/Generics/ClassAncestorsRule.php',
    'PHPStan\\Rules\\Generics\\ClassTemplateTypeRule' => $baseDir . '/src/Rules/Generics/ClassTemplateTypeRule.php',
    'PHPStan\\Rules\\Generics\\CrossCheckInterfacesHelper' => $baseDir . '/src/Rules/Generics/CrossCheckInterfacesHelper.php',
    'PHPStan\\Rules\\Generics\\EnumAncestorsRule' => $baseDir . '/src/Rules/Generics/EnumAncestorsRule.php',
    'PHPStan\\Rules\\Generics\\EnumTemplateTypeRule' => $baseDir . '/src/Rules/Generics/EnumTemplateTypeRule.php',
    'PHPStan\\Rules\\Generics\\FunctionSignatureVarianceRule' => $baseDir . '/src/Rules/Generics/FunctionSignatureVarianceRule.php',
    'PHPStan\\Rules\\Generics\\FunctionTemplateTypeRule' => $baseDir . '/src/Rules/Generics/FunctionTemplateTypeRule.php',
    'PHPStan\\Rules\\Generics\\GenericAncestorsCheck' => $baseDir . '/src/Rules/Generics/GenericAncestorsCheck.php',
    'PHPStan\\Rules\\Generics\\GenericObjectTypeCheck' => $baseDir . '/src/Rules/Generics/GenericObjectTypeCheck.php',
    'PHPStan\\Rules\\Generics\\InterfaceAncestorsRule' => $baseDir . '/src/Rules/Generics/InterfaceAncestorsRule.php',
    'PHPStan\\Rules\\Generics\\InterfaceTemplateTypeRule' => $baseDir . '/src/Rules/Generics/InterfaceTemplateTypeRule.php',
    'PHPStan\\Rules\\Generics\\MethodSignatureVarianceRule' => $baseDir . '/src/Rules/Generics/MethodSignatureVarianceRule.php',
    'PHPStan\\Rules\\Generics\\MethodTemplateTypeRule' => $baseDir . '/src/Rules/Generics/MethodTemplateTypeRule.php',
    'PHPStan\\Rules\\Generics\\PropertyVarianceRule' => $baseDir . '/src/Rules/Generics/PropertyVarianceRule.php',
    'PHPStan\\Rules\\Generics\\TemplateTypeCheck' => $baseDir . '/src/Rules/Generics/TemplateTypeCheck.php',
    'PHPStan\\Rules\\Generics\\TraitTemplateTypeRule' => $baseDir . '/src/Rules/Generics/TraitTemplateTypeRule.php',
    'PHPStan\\Rules\\Generics\\UsedTraitsRule' => $baseDir . '/src/Rules/Generics/UsedTraitsRule.php',
    'PHPStan\\Rules\\Generics\\VarianceCheck' => $baseDir . '/src/Rules/Generics/VarianceCheck.php',
    'PHPStan\\Rules\\IdentifierRuleError' => $baseDir . '/src/Rules/IdentifierRuleError.php',
    'PHPStan\\Rules\\IssetCheck' => $baseDir . '/src/Rules/IssetCheck.php',
    'PHPStan\\Rules\\Keywords\\ContinueBreakInLoopRule' => $baseDir . '/src/Rules/Keywords/ContinueBreakInLoopRule.php',
    'PHPStan\\Rules\\LazyRegistry' => $baseDir . '/src/Rules/LazyRegistry.php',
    'PHPStan\\Rules\\LineRuleError' => $baseDir . '/src/Rules/LineRuleError.php',
    'PHPStan\\Rules\\MetadataRuleError' => $baseDir . '/src/Rules/MetadataRuleError.php',
    'PHPStan\\Rules\\Methods\\AbstractMethodInNonAbstractClassRule' => $baseDir . '/src/Rules/Methods/AbstractMethodInNonAbstractClassRule.php',
    'PHPStan\\Rules\\Methods\\CallMethodsRule' => $baseDir . '/src/Rules/Methods/CallMethodsRule.php',
    'PHPStan\\Rules\\Methods\\CallPrivateMethodThroughStaticRule' => $baseDir . '/src/Rules/Methods/CallPrivateMethodThroughStaticRule.php',
    'PHPStan\\Rules\\Methods\\CallStaticMethodsRule' => $baseDir . '/src/Rules/Methods/CallStaticMethodsRule.php',
    'PHPStan\\Rules\\Methods\\CallToConstructorStatementWithoutSideEffectsRule' => $baseDir . '/src/Rules/Methods/CallToConstructorStatementWithoutSideEffectsRule.php',
    'PHPStan\\Rules\\Methods\\CallToMethodStatementWithoutSideEffectsRule' => $baseDir . '/src/Rules/Methods/CallToMethodStatementWithoutSideEffectsRule.php',
    'PHPStan\\Rules\\Methods\\CallToStaticMethodStatementWithoutSideEffectsRule' => $baseDir . '/src/Rules/Methods/CallToStaticMethodStatementWithoutSideEffectsRule.php',
    'PHPStan\\Rules\\Methods\\ConsistentConstructorRule' => $baseDir . '/src/Rules/Methods/ConsistentConstructorRule.php',
    'PHPStan\\Rules\\Methods\\ExistingClassesInTypehintsRule' => $baseDir . '/src/Rules/Methods/ExistingClassesInTypehintsRule.php',
    'PHPStan\\Rules\\Methods\\FinalPrivateMethodRule' => $baseDir . '/src/Rules/Methods/FinalPrivateMethodRule.php',
    'PHPStan\\Rules\\Methods\\IllegalConstructorMethodCallRule' => $baseDir . '/src/Rules/Methods/IllegalConstructorMethodCallRule.php',
    'PHPStan\\Rules\\Methods\\IllegalConstructorStaticCallRule' => $baseDir . '/src/Rules/Methods/IllegalConstructorStaticCallRule.php',
    'PHPStan\\Rules\\Methods\\IncompatibleDefaultParameterTypeRule' => $baseDir . '/src/Rules/Methods/IncompatibleDefaultParameterTypeRule.php',
    'PHPStan\\Rules\\Methods\\MethodAttributesRule' => $baseDir . '/src/Rules/Methods/MethodAttributesRule.php',
    'PHPStan\\Rules\\Methods\\MethodCallCheck' => $baseDir . '/src/Rules/Methods/MethodCallCheck.php',
    'PHPStan\\Rules\\Methods\\MethodCallableRule' => $baseDir . '/src/Rules/Methods/MethodCallableRule.php',
    'PHPStan\\Rules\\Methods\\MethodParameterComparisonHelper' => $baseDir . '/src/Rules/Methods/MethodParameterComparisonHelper.php',
    'PHPStan\\Rules\\Methods\\MethodSignatureRule' => $baseDir . '/src/Rules/Methods/MethodSignatureRule.php',
    'PHPStan\\Rules\\Methods\\MissingMagicSerializationMethodsRule' => $baseDir . '/src/Rules/Methods/MissingMagicSerializationMethodsRule.php',
    'PHPStan\\Rules\\Methods\\MissingMethodImplementationRule' => $baseDir . '/src/Rules/Methods/MissingMethodImplementationRule.php',
    'PHPStan\\Rules\\Methods\\MissingMethodParameterTypehintRule' => $baseDir . '/src/Rules/Methods/MissingMethodParameterTypehintRule.php',
    'PHPStan\\Rules\\Methods\\MissingMethodReturnTypehintRule' => $baseDir . '/src/Rules/Methods/MissingMethodReturnTypehintRule.php',
    'PHPStan\\Rules\\Methods\\NullsafeMethodCallRule' => $baseDir . '/src/Rules/Methods/NullsafeMethodCallRule.php',
    'PHPStan\\Rules\\Methods\\OverridingMethodRule' => $baseDir . '/src/Rules/Methods/OverridingMethodRule.php',
    'PHPStan\\Rules\\Methods\\ReturnTypeRule' => $baseDir . '/src/Rules/Methods/ReturnTypeRule.php',
    'PHPStan\\Rules\\Methods\\StaticMethodCallCheck' => $baseDir . '/src/Rules/Methods/StaticMethodCallCheck.php',
    'PHPStan\\Rules\\Methods\\StaticMethodCallableRule' => $baseDir . '/src/Rules/Methods/StaticMethodCallableRule.php',
    'PHPStan\\Rules\\MissingTypehintCheck' => $baseDir . '/src/Rules/MissingTypehintCheck.php',
    'PHPStan\\Rules\\Missing\\MissingReturnRule' => $baseDir . '/src/Rules/Missing/MissingReturnRule.php',
    'PHPStan\\Rules\\Namespaces\\ExistingNamesInGroupUseRule' => $baseDir . '/src/Rules/Namespaces/ExistingNamesInGroupUseRule.php',
    'PHPStan\\Rules\\Namespaces\\ExistingNamesInUseRule' => $baseDir . '/src/Rules/Namespaces/ExistingNamesInUseRule.php',
    'PHPStan\\Rules\\NonIgnorableRuleError' => $baseDir . '/src/Rules/NonIgnorableRuleError.php',
    'PHPStan\\Rules\\NullsafeCheck' => $baseDir . '/src/Rules/NullsafeCheck.php',
    'PHPStan\\Rules\\Operators\\InvalidAssignVarRule' => $baseDir . '/src/Rules/Operators/InvalidAssignVarRule.php',
    'PHPStan\\Rules\\Operators\\InvalidBinaryOperationRule' => $baseDir . '/src/Rules/Operators/InvalidBinaryOperationRule.php',
    'PHPStan\\Rules\\Operators\\InvalidComparisonOperationRule' => $baseDir . '/src/Rules/Operators/InvalidComparisonOperationRule.php',
    'PHPStan\\Rules\\Operators\\InvalidIncDecOperationRule' => $baseDir . '/src/Rules/Operators/InvalidIncDecOperationRule.php',
    'PHPStan\\Rules\\Operators\\InvalidUnaryOperationRule' => $baseDir . '/src/Rules/Operators/InvalidUnaryOperationRule.php',
    'PHPStan\\Rules\\PhpDoc\\AssertRuleHelper' => $baseDir . '/src/Rules/PhpDoc/AssertRuleHelper.php',
    'PHPStan\\Rules\\PhpDoc\\ConditionalReturnTypeRuleHelper' => $baseDir . '/src/Rules/PhpDoc/ConditionalReturnTypeRuleHelper.php',
    'PHPStan\\Rules\\PhpDoc\\FunctionAssertRule' => $baseDir . '/src/Rules/PhpDoc/FunctionAssertRule.php',
    'PHPStan\\Rules\\PhpDoc\\FunctionConditionalReturnTypeRule' => $baseDir . '/src/Rules/PhpDoc/FunctionConditionalReturnTypeRule.php',
    'PHPStan\\Rules\\PhpDoc\\IncompatibleClassConstantPhpDocTypeRule' => $baseDir . '/src/Rules/PhpDoc/IncompatibleClassConstantPhpDocTypeRule.php',
    'PHPStan\\Rules\\PhpDoc\\IncompatiblePhpDocTypeRule' => $baseDir . '/src/Rules/PhpDoc/IncompatiblePhpDocTypeRule.php',
    'PHPStan\\Rules\\PhpDoc\\IncompatiblePropertyPhpDocTypeRule' => $baseDir . '/src/Rules/PhpDoc/IncompatiblePropertyPhpDocTypeRule.php',
    'PHPStan\\Rules\\PhpDoc\\IncompatibleSelfOutTypeRule' => $baseDir . '/src/Rules/PhpDoc/IncompatibleSelfOutTypeRule.php',
    'PHPStan\\Rules\\PhpDoc\\InvalidPHPStanDocTagRule' => $baseDir . '/src/Rules/PhpDoc/InvalidPHPStanDocTagRule.php',
    'PHPStan\\Rules\\PhpDoc\\InvalidPhpDocTagValueRule' => $baseDir . '/src/Rules/PhpDoc/InvalidPhpDocTagValueRule.php',
    'PHPStan\\Rules\\PhpDoc\\InvalidPhpDocVarTagTypeRule' => $baseDir . '/src/Rules/PhpDoc/InvalidPhpDocVarTagTypeRule.php',
    'PHPStan\\Rules\\PhpDoc\\InvalidThrowsPhpDocValueRule' => $baseDir . '/src/Rules/PhpDoc/InvalidThrowsPhpDocValueRule.php',
    'PHPStan\\Rules\\PhpDoc\\MethodAssertRule' => $baseDir . '/src/Rules/PhpDoc/MethodAssertRule.php',
    'PHPStan\\Rules\\PhpDoc\\MethodConditionalReturnTypeRule' => $baseDir . '/src/Rules/PhpDoc/MethodConditionalReturnTypeRule.php',
    'PHPStan\\Rules\\PhpDoc\\UnresolvableTypeHelper' => $baseDir . '/src/Rules/PhpDoc/UnresolvableTypeHelper.php',
    'PHPStan\\Rules\\PhpDoc\\VarTagChangedExpressionTypeRule' => $baseDir . '/src/Rules/PhpDoc/VarTagChangedExpressionTypeRule.php',
    'PHPStan\\Rules\\PhpDoc\\VarTagTypeRuleHelper' => $baseDir . '/src/Rules/PhpDoc/VarTagTypeRuleHelper.php',
    'PHPStan\\Rules\\PhpDoc\\WrongVariableNameInVarTagRule' => $baseDir . '/src/Rules/PhpDoc/WrongVariableNameInVarTagRule.php',
    'PHPStan\\Rules\\Playground\\FunctionNeverRule' => $baseDir . '/src/Rules/Playground/FunctionNeverRule.php',
    'PHPStan\\Rules\\Playground\\MethodNeverRule' => $baseDir . '/src/Rules/Playground/MethodNeverRule.php',
    'PHPStan\\Rules\\Playground\\NeverRuleHelper' => $baseDir . '/src/Rules/Playground/NeverRuleHelper.php',
    'PHPStan\\Rules\\Properties\\AccessPrivatePropertyThroughStaticRule' => $baseDir . '/src/Rules/Properties/AccessPrivatePropertyThroughStaticRule.php',
    'PHPStan\\Rules\\Properties\\AccessPropertiesInAssignRule' => $baseDir . '/src/Rules/Properties/AccessPropertiesInAssignRule.php',
    'PHPStan\\Rules\\Properties\\AccessPropertiesRule' => $baseDir . '/src/Rules/Properties/AccessPropertiesRule.php',
    'PHPStan\\Rules\\Properties\\AccessStaticPropertiesInAssignRule' => $baseDir . '/src/Rules/Properties/AccessStaticPropertiesInAssignRule.php',
    'PHPStan\\Rules\\Properties\\AccessStaticPropertiesRule' => $baseDir . '/src/Rules/Properties/AccessStaticPropertiesRule.php',
    'PHPStan\\Rules\\Properties\\DefaultValueTypesAssignedToPropertiesRule' => $baseDir . '/src/Rules/Properties/DefaultValueTypesAssignedToPropertiesRule.php',
    'PHPStan\\Rules\\Properties\\DirectReadWritePropertiesExtensionProvider' => $baseDir . '/src/Rules/Properties/DirectReadWritePropertiesExtensionProvider.php',
    'PHPStan\\Rules\\Properties\\ExistingClassesInPropertiesRule' => $baseDir . '/src/Rules/Properties/ExistingClassesInPropertiesRule.php',
    'PHPStan\\Rules\\Properties\\FoundPropertyReflection' => $baseDir . '/src/Rules/Properties/FoundPropertyReflection.php',
    'PHPStan\\Rules\\Properties\\LazyReadWritePropertiesExtensionProvider' => $baseDir . '/src/Rules/Properties/LazyReadWritePropertiesExtensionProvider.php',
    'PHPStan\\Rules\\Properties\\MissingPropertyTypehintRule' => $baseDir . '/src/Rules/Properties/MissingPropertyTypehintRule.php',
    'PHPStan\\Rules\\Properties\\MissingReadOnlyByPhpDocPropertyAssignRule' => $baseDir . '/src/Rules/Properties/MissingReadOnlyByPhpDocPropertyAssignRule.php',
    'PHPStan\\Rules\\Properties\\MissingReadOnlyPropertyAssignRule' => $baseDir . '/src/Rules/Properties/MissingReadOnlyPropertyAssignRule.php',
    'PHPStan\\Rules\\Properties\\NullsafePropertyFetchRule' => $baseDir . '/src/Rules/Properties/NullsafePropertyFetchRule.php',
    'PHPStan\\Rules\\Properties\\OverridingPropertyRule' => $baseDir . '/src/Rules/Properties/OverridingPropertyRule.php',
    'PHPStan\\Rules\\Properties\\PropertyAttributesRule' => $baseDir . '/src/Rules/Properties/PropertyAttributesRule.php',
    'PHPStan\\Rules\\Properties\\PropertyDescriptor' => $baseDir . '/src/Rules/Properties/PropertyDescriptor.php',
    'PHPStan\\Rules\\Properties\\PropertyReflectionFinder' => $baseDir . '/src/Rules/Properties/PropertyReflectionFinder.php',
    'PHPStan\\Rules\\Properties\\ReadOnlyByPhpDocPropertyAssignRefRule' => $baseDir . '/src/Rules/Properties/ReadOnlyByPhpDocPropertyAssignRefRule.php',
    'PHPStan\\Rules\\Properties\\ReadOnlyByPhpDocPropertyAssignRule' => $baseDir . '/src/Rules/Properties/ReadOnlyByPhpDocPropertyAssignRule.php',
    'PHPStan\\Rules\\Properties\\ReadOnlyByPhpDocPropertyRule' => $baseDir . '/src/Rules/Properties/ReadOnlyByPhpDocPropertyRule.php',
    'PHPStan\\Rules\\Properties\\ReadOnlyPropertyAssignRefRule' => $baseDir . '/src/Rules/Properties/ReadOnlyPropertyAssignRefRule.php',
    'PHPStan\\Rules\\Properties\\ReadOnlyPropertyAssignRule' => $baseDir . '/src/Rules/Properties/ReadOnlyPropertyAssignRule.php',
    'PHPStan\\Rules\\Properties\\ReadOnlyPropertyRule' => $baseDir . '/src/Rules/Properties/ReadOnlyPropertyRule.php',
    'PHPStan\\Rules\\Properties\\ReadWritePropertiesExtension' => $baseDir . '/src/Rules/Properties/ReadWritePropertiesExtension.php',
    'PHPStan\\Rules\\Properties\\ReadWritePropertiesExtensionProvider' => $baseDir . '/src/Rules/Properties/ReadWritePropertiesExtensionProvider.php',
    'PHPStan\\Rules\\Properties\\ReadingWriteOnlyPropertiesRule' => $baseDir . '/src/Rules/Properties/ReadingWriteOnlyPropertiesRule.php',
    'PHPStan\\Rules\\Properties\\TypesAssignedToPropertiesRule' => $baseDir . '/src/Rules/Properties/TypesAssignedToPropertiesRule.php',
    'PHPStan\\Rules\\Properties\\UninitializedPropertyRule' => $baseDir . '/src/Rules/Properties/UninitializedPropertyRule.php',
    'PHPStan\\Rules\\Properties\\WritingToReadOnlyPropertiesRule' => $baseDir . '/src/Rules/Properties/WritingToReadOnlyPropertiesRule.php',
    'PHPStan\\Rules\\Regexp\\RegularExpressionPatternRule' => $baseDir . '/src/Rules/Regexp/RegularExpressionPatternRule.php',
    'PHPStan\\Rules\\Registry' => $baseDir . '/src/Rules/Registry.php',
    'PHPStan\\Rules\\Rule' => $baseDir . '/src/Rules/Rule.php',
    'PHPStan\\Rules\\RuleError' => $baseDir . '/src/Rules/RuleError.php',
    'PHPStan\\Rules\\RuleErrorBuilder' => $baseDir . '/src/Rules/RuleErrorBuilder.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError1' => $baseDir . '/src/Rules/RuleErrors/RuleError1.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError101' => $baseDir . '/src/Rules/RuleErrors/RuleError101.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError103' => $baseDir . '/src/Rules/RuleErrors/RuleError103.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError105' => $baseDir . '/src/Rules/RuleErrors/RuleError105.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError107' => $baseDir . '/src/Rules/RuleErrors/RuleError107.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError109' => $baseDir . '/src/Rules/RuleErrors/RuleError109.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError11' => $baseDir . '/src/Rules/RuleErrors/RuleError11.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError111' => $baseDir . '/src/Rules/RuleErrors/RuleError111.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError113' => $baseDir . '/src/Rules/RuleErrors/RuleError113.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError115' => $baseDir . '/src/Rules/RuleErrors/RuleError115.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError117' => $baseDir . '/src/Rules/RuleErrors/RuleError117.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError119' => $baseDir . '/src/Rules/RuleErrors/RuleError119.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError121' => $baseDir . '/src/Rules/RuleErrors/RuleError121.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError123' => $baseDir . '/src/Rules/RuleErrors/RuleError123.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError125' => $baseDir . '/src/Rules/RuleErrors/RuleError125.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError127' => $baseDir . '/src/Rules/RuleErrors/RuleError127.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError13' => $baseDir . '/src/Rules/RuleErrors/RuleError13.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError15' => $baseDir . '/src/Rules/RuleErrors/RuleError15.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError17' => $baseDir . '/src/Rules/RuleErrors/RuleError17.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError19' => $baseDir . '/src/Rules/RuleErrors/RuleError19.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError21' => $baseDir . '/src/Rules/RuleErrors/RuleError21.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError23' => $baseDir . '/src/Rules/RuleErrors/RuleError23.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError25' => $baseDir . '/src/Rules/RuleErrors/RuleError25.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError27' => $baseDir . '/src/Rules/RuleErrors/RuleError27.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError29' => $baseDir . '/src/Rules/RuleErrors/RuleError29.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError3' => $baseDir . '/src/Rules/RuleErrors/RuleError3.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError31' => $baseDir . '/src/Rules/RuleErrors/RuleError31.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError33' => $baseDir . '/src/Rules/RuleErrors/RuleError33.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError35' => $baseDir . '/src/Rules/RuleErrors/RuleError35.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError37' => $baseDir . '/src/Rules/RuleErrors/RuleError37.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError39' => $baseDir . '/src/Rules/RuleErrors/RuleError39.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError41' => $baseDir . '/src/Rules/RuleErrors/RuleError41.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError43' => $baseDir . '/src/Rules/RuleErrors/RuleError43.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError45' => $baseDir . '/src/Rules/RuleErrors/RuleError45.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError47' => $baseDir . '/src/Rules/RuleErrors/RuleError47.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError49' => $baseDir . '/src/Rules/RuleErrors/RuleError49.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError5' => $baseDir . '/src/Rules/RuleErrors/RuleError5.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError51' => $baseDir . '/src/Rules/RuleErrors/RuleError51.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError53' => $baseDir . '/src/Rules/RuleErrors/RuleError53.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError55' => $baseDir . '/src/Rules/RuleErrors/RuleError55.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError57' => $baseDir . '/src/Rules/RuleErrors/RuleError57.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError59' => $baseDir . '/src/Rules/RuleErrors/RuleError59.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError61' => $baseDir . '/src/Rules/RuleErrors/RuleError61.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError63' => $baseDir . '/src/Rules/RuleErrors/RuleError63.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError65' => $baseDir . '/src/Rules/RuleErrors/RuleError65.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError67' => $baseDir . '/src/Rules/RuleErrors/RuleError67.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError69' => $baseDir . '/src/Rules/RuleErrors/RuleError69.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError7' => $baseDir . '/src/Rules/RuleErrors/RuleError7.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError71' => $baseDir . '/src/Rules/RuleErrors/RuleError71.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError73' => $baseDir . '/src/Rules/RuleErrors/RuleError73.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError75' => $baseDir . '/src/Rules/RuleErrors/RuleError75.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError77' => $baseDir . '/src/Rules/RuleErrors/RuleError77.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError79' => $baseDir . '/src/Rules/RuleErrors/RuleError79.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError81' => $baseDir . '/src/Rules/RuleErrors/RuleError81.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError83' => $baseDir . '/src/Rules/RuleErrors/RuleError83.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError85' => $baseDir . '/src/Rules/RuleErrors/RuleError85.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError87' => $baseDir . '/src/Rules/RuleErrors/RuleError87.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError89' => $baseDir . '/src/Rules/RuleErrors/RuleError89.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError9' => $baseDir . '/src/Rules/RuleErrors/RuleError9.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError91' => $baseDir . '/src/Rules/RuleErrors/RuleError91.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError93' => $baseDir . '/src/Rules/RuleErrors/RuleError93.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError95' => $baseDir . '/src/Rules/RuleErrors/RuleError95.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError97' => $baseDir . '/src/Rules/RuleErrors/RuleError97.php',
    'PHPStan\\Rules\\RuleErrors\\RuleError99' => $baseDir . '/src/Rules/RuleErrors/RuleError99.php',
    'PHPStan\\Rules\\RuleLevelHelper' => $baseDir . '/src/Rules/RuleLevelHelper.php',
    'PHPStan\\Rules\\RuleLevelHelperAcceptsResult' => $baseDir . '/src/Rules/RuleLevelHelperAcceptsResult.php',
    'PHPStan\\Rules\\TipRuleError' => $baseDir . '/src/Rules/TipRuleError.php',
    'PHPStan\\Rules\\TooWideTypehints\\TooWideArrowFunctionReturnTypehintRule' => $baseDir . '/src/Rules/TooWideTypehints/TooWideArrowFunctionReturnTypehintRule.php',
    'PHPStan\\Rules\\TooWideTypehints\\TooWideClosureReturnTypehintRule' => $baseDir . '/src/Rules/TooWideTypehints/TooWideClosureReturnTypehintRule.php',
    'PHPStan\\Rules\\TooWideTypehints\\TooWideFunctionReturnTypehintRule' => $baseDir . '/src/Rules/TooWideTypehints/TooWideFunctionReturnTypehintRule.php',
    'PHPStan\\Rules\\TooWideTypehints\\TooWideMethodReturnTypehintRule' => $baseDir . '/src/Rules/TooWideTypehints/TooWideMethodReturnTypehintRule.php',
    'PHPStan\\Rules\\Traits\\NotAnalysedTraitRule' => $baseDir . '/src/Rules/Traits/NotAnalysedTraitRule.php',
    'PHPStan\\Rules\\Traits\\TraitDeclarationCollector' => $baseDir . '/src/Rules/Traits/TraitDeclarationCollector.php',
    'PHPStan\\Rules\\Traits\\TraitUseCollector' => $baseDir . '/src/Rules/Traits/TraitUseCollector.php',
    'PHPStan\\Rules\\UnusedFunctionParametersCheck' => $baseDir . '/src/Rules/UnusedFunctionParametersCheck.php',
    'PHPStan\\Rules\\Variables\\CompactVariablesRule' => $baseDir . '/src/Rules/Variables/CompactVariablesRule.php',
    'PHPStan\\Rules\\Variables\\DefinedVariableRule' => $baseDir . '/src/Rules/Variables/DefinedVariableRule.php',
    'PHPStan\\Rules\\Variables\\EmptyRule' => $baseDir . '/src/Rules/Variables/EmptyRule.php',
    'PHPStan\\Rules\\Variables\\IssetRule' => $baseDir . '/src/Rules/Variables/IssetRule.php',
    'PHPStan\\Rules\\Variables\\NullCoalesceRule' => $baseDir . '/src/Rules/Variables/NullCoalesceRule.php',
    'PHPStan\\Rules\\Variables\\ThrowTypeRule' => $baseDir . '/src/Rules/Variables/ThrowTypeRule.php',
    'PHPStan\\Rules\\Variables\\UnsetRule' => $baseDir . '/src/Rules/Variables/UnsetRule.php',
    'PHPStan\\Rules\\Variables\\VariableCloningRule' => $baseDir . '/src/Rules/Variables/VariableCloningRule.php',
    'PHPStan\\Rules\\Whitespace\\FileWhitespaceRule' => $baseDir . '/src/Rules/Whitespace/FileWhitespaceRule.php',
    'PHPStan\\ShouldNotHappenException' => $baseDir . '/src/ShouldNotHappenException.php',
    'PHPStan\\Testing\\ErrorFormatterTestCase' => $baseDir . '/src/Testing/ErrorFormatterTestCase.php',
    'PHPStan\\Testing\\LevelsTestCase' => $baseDir . '/src/Testing/LevelsTestCase.php',
    'PHPStan\\Testing\\PHPStanTestCase' => $baseDir . '/src/Testing/PHPStanTestCase.php',
    'PHPStan\\Testing\\RuleTestCase' => $baseDir . '/src/Testing/RuleTestCase.php',
    'PHPStan\\Testing\\TestCaseSourceLocatorFactory' => $baseDir . '/src/Testing/TestCaseSourceLocatorFactory.php',
    'PHPStan\\Testing\\TypeInferenceTestCase' => $baseDir . '/src/Testing/TypeInferenceTestCase.php',
    'PHPStan\\TrinaryLogic' => $baseDir . '/src/TrinaryLogic.php',
    'PHPStan\\Type\\AcceptsResult' => $baseDir . '/src/Type/AcceptsResult.php',
    'PHPStan\\Type\\Accessory\\AccessoryArrayListType' => $baseDir . '/src/Type/Accessory/AccessoryArrayListType.php',
    'PHPStan\\Type\\Accessory\\AccessoryLiteralStringType' => $baseDir . '/src/Type/Accessory/AccessoryLiteralStringType.php',
    'PHPStan\\Type\\Accessory\\AccessoryNonEmptyStringType' => $baseDir . '/src/Type/Accessory/AccessoryNonEmptyStringType.php',
    'PHPStan\\Type\\Accessory\\AccessoryNonFalsyStringType' => $baseDir . '/src/Type/Accessory/AccessoryNonFalsyStringType.php',
    'PHPStan\\Type\\Accessory\\AccessoryNumericStringType' => $baseDir . '/src/Type/Accessory/AccessoryNumericStringType.php',
    'PHPStan\\Type\\Accessory\\AccessoryType' => $baseDir . '/src/Type/Accessory/AccessoryType.php',
    'PHPStan\\Type\\Accessory\\HasMethodType' => $baseDir . '/src/Type/Accessory/HasMethodType.php',
    'PHPStan\\Type\\Accessory\\HasOffsetType' => $baseDir . '/src/Type/Accessory/HasOffsetType.php',
    'PHPStan\\Type\\Accessory\\HasOffsetValueType' => $baseDir . '/src/Type/Accessory/HasOffsetValueType.php',
    'PHPStan\\Type\\Accessory\\HasPropertyType' => $baseDir . '/src/Type/Accessory/HasPropertyType.php',
    'PHPStan\\Type\\Accessory\\NonEmptyArrayType' => $baseDir . '/src/Type/Accessory/NonEmptyArrayType.php',
    'PHPStan\\Type\\Accessory\\OversizedArrayType' => $baseDir . '/src/Type/Accessory/OversizedArrayType.php',
    'PHPStan\\Type\\ArrayType' => $baseDir . '/src/Type/ArrayType.php',
    'PHPStan\\Type\\BenevolentUnionType' => $baseDir . '/src/Type/BenevolentUnionType.php',
    'PHPStan\\Type\\BitwiseFlagHelper' => $baseDir . '/src/Type/BitwiseFlagHelper.php',
    'PHPStan\\Type\\BooleanType' => $baseDir . '/src/Type/BooleanType.php',
    'PHPStan\\Type\\CallableType' => $baseDir . '/src/Type/CallableType.php',
    'PHPStan\\Type\\CallableTypeHelper' => $baseDir . '/src/Type/CallableTypeHelper.php',
    'PHPStan\\Type\\CircularTypeAliasDefinitionException' => $baseDir . '/src/Type/CircularTypeAliasDefinitionException.php',
    'PHPStan\\Type\\CircularTypeAliasErrorType' => $baseDir . '/src/Type/CircularTypeAliasErrorType.php',
    'PHPStan\\Type\\ClassStringType' => $baseDir . '/src/Type/ClassStringType.php',
    'PHPStan\\Type\\ClosureType' => $baseDir . '/src/Type/ClosureType.php',
    'PHPStan\\Type\\ClosureTypeFactory' => $baseDir . '/src/Type/ClosureTypeFactory.php',
    'PHPStan\\Type\\CompoundType' => $baseDir . '/src/Type/CompoundType.php',
    'PHPStan\\Type\\ConditionalType' => $baseDir . '/src/Type/ConditionalType.php',
    'PHPStan\\Type\\ConditionalTypeForParameter' => $baseDir . '/src/Type/ConditionalTypeForParameter.php',
    'PHPStan\\Type\\ConstantScalarType' => $baseDir . '/src/Type/ConstantScalarType.php',
    'PHPStan\\Type\\ConstantType' => $baseDir . '/src/Type/ConstantType.php',
    'PHPStan\\Type\\ConstantTypeHelper' => $baseDir . '/src/Type/ConstantTypeHelper.php',
    'PHPStan\\Type\\Constant\\ConstantArrayType' => $baseDir . '/src/Type/Constant/ConstantArrayType.php',
    'PHPStan\\Type\\Constant\\ConstantArrayTypeAndMethod' => $baseDir . '/src/Type/Constant/ConstantArrayTypeAndMethod.php',
    'PHPStan\\Type\\Constant\\ConstantArrayTypeBuilder' => $baseDir . '/src/Type/Constant/ConstantArrayTypeBuilder.php',
    'PHPStan\\Type\\Constant\\ConstantBooleanType' => $baseDir . '/src/Type/Constant/ConstantBooleanType.php',
    'PHPStan\\Type\\Constant\\ConstantFloatType' => $baseDir . '/src/Type/Constant/ConstantFloatType.php',
    'PHPStan\\Type\\Constant\\ConstantIntegerType' => $baseDir . '/src/Type/Constant/ConstantIntegerType.php',
    'PHPStan\\Type\\Constant\\ConstantScalarToBooleanTrait' => $baseDir . '/src/Type/Constant/ConstantScalarToBooleanTrait.php',
    'PHPStan\\Type\\Constant\\ConstantStringType' => $baseDir . '/src/Type/Constant/ConstantStringType.php',
    'PHPStan\\Type\\Constant\\OversizedArrayBuilder' => $baseDir . '/src/Type/Constant/OversizedArrayBuilder.php',
    'PHPStan\\Type\\DirectTypeAliasResolverProvider' => $baseDir . '/src/Type/DirectTypeAliasResolverProvider.php',
    'PHPStan\\Type\\DynamicFunctionReturnTypeExtension' => $baseDir . '/src/Type/DynamicFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\DynamicFunctionThrowTypeExtension' => $baseDir . '/src/Type/DynamicFunctionThrowTypeExtension.php',
    'PHPStan\\Type\\DynamicMethodReturnTypeExtension' => $baseDir . '/src/Type/DynamicMethodReturnTypeExtension.php',
    'PHPStan\\Type\\DynamicMethodThrowTypeExtension' => $baseDir . '/src/Type/DynamicMethodThrowTypeExtension.php',
    'PHPStan\\Type\\DynamicReturnTypeExtensionRegistry' => $baseDir . '/src/Type/DynamicReturnTypeExtensionRegistry.php',
    'PHPStan\\Type\\DynamicStaticMethodReturnTypeExtension' => $baseDir . '/src/Type/DynamicStaticMethodReturnTypeExtension.php',
    'PHPStan\\Type\\DynamicStaticMethodThrowTypeExtension' => $baseDir . '/src/Type/DynamicStaticMethodThrowTypeExtension.php',
    'PHPStan\\Type\\Enum\\EnumCaseObjectType' => $baseDir . '/src/Type/Enum/EnumCaseObjectType.php',
    'PHPStan\\Type\\ErrorType' => $baseDir . '/src/Type/ErrorType.php',
    'PHPStan\\Type\\ExponentiateHelper' => $baseDir . '/src/Type/ExponentiateHelper.php',
    'PHPStan\\Type\\FileTypeMapper' => $baseDir . '/src/Type/FileTypeMapper.php',
    'PHPStan\\Type\\FloatType' => $baseDir . '/src/Type/FloatType.php',
    'PHPStan\\Type\\FunctionTypeSpecifyingExtension' => $baseDir . '/src/Type/FunctionTypeSpecifyingExtension.php',
    'PHPStan\\Type\\GeneralizePrecision' => $baseDir . '/src/Type/GeneralizePrecision.php',
    'PHPStan\\Type\\GenericTypeVariableResolver' => $baseDir . '/src/Type/GenericTypeVariableResolver.php',
    'PHPStan\\Type\\Generic\\GenericClassStringType' => $baseDir . '/src/Type/Generic/GenericClassStringType.php',
    'PHPStan\\Type\\Generic\\GenericObjectType' => $baseDir . '/src/Type/Generic/GenericObjectType.php',
    'PHPStan\\Type\\Generic\\TemplateArrayType' => $baseDir . '/src/Type/Generic/TemplateArrayType.php',
    'PHPStan\\Type\\Generic\\TemplateBenevolentUnionType' => $baseDir . '/src/Type/Generic/TemplateBenevolentUnionType.php',
    'PHPStan\\Type\\Generic\\TemplateBooleanType' => $baseDir . '/src/Type/Generic/TemplateBooleanType.php',
    'PHPStan\\Type\\Generic\\TemplateConstantArrayType' => $baseDir . '/src/Type/Generic/TemplateConstantArrayType.php',
    'PHPStan\\Type\\Generic\\TemplateConstantIntegerType' => $baseDir . '/src/Type/Generic/TemplateConstantIntegerType.php',
    'PHPStan\\Type\\Generic\\TemplateConstantStringType' => $baseDir . '/src/Type/Generic/TemplateConstantStringType.php',
    'PHPStan\\Type\\Generic\\TemplateFloatType' => $baseDir . '/src/Type/Generic/TemplateFloatType.php',
    'PHPStan\\Type\\Generic\\TemplateGenericObjectType' => $baseDir . '/src/Type/Generic/TemplateGenericObjectType.php',
    'PHPStan\\Type\\Generic\\TemplateIntegerType' => $baseDir . '/src/Type/Generic/TemplateIntegerType.php',
    'PHPStan\\Type\\Generic\\TemplateIntersectionType' => $baseDir . '/src/Type/Generic/TemplateIntersectionType.php',
    'PHPStan\\Type\\Generic\\TemplateKeyOfType' => $baseDir . '/src/Type/Generic/TemplateKeyOfType.php',
    'PHPStan\\Type\\Generic\\TemplateMixedType' => $baseDir . '/src/Type/Generic/TemplateMixedType.php',
    'PHPStan\\Type\\Generic\\TemplateObjectShapeType' => $baseDir . '/src/Type/Generic/TemplateObjectShapeType.php',
    'PHPStan\\Type\\Generic\\TemplateObjectType' => $baseDir . '/src/Type/Generic/TemplateObjectType.php',
    'PHPStan\\Type\\Generic\\TemplateObjectWithoutClassType' => $baseDir . '/src/Type/Generic/TemplateObjectWithoutClassType.php',
    'PHPStan\\Type\\Generic\\TemplateStrictMixedType' => $baseDir . '/src/Type/Generic/TemplateStrictMixedType.php',
    'PHPStan\\Type\\Generic\\TemplateStringType' => $baseDir . '/src/Type/Generic/TemplateStringType.php',
    'PHPStan\\Type\\Generic\\TemplateType' => $baseDir . '/src/Type/Generic/TemplateType.php',
    'PHPStan\\Type\\Generic\\TemplateTypeArgumentStrategy' => $baseDir . '/src/Type/Generic/TemplateTypeArgumentStrategy.php',
    'PHPStan\\Type\\Generic\\TemplateTypeFactory' => $baseDir . '/src/Type/Generic/TemplateTypeFactory.php',
    'PHPStan\\Type\\Generic\\TemplateTypeHelper' => $baseDir . '/src/Type/Generic/TemplateTypeHelper.php',
    'PHPStan\\Type\\Generic\\TemplateTypeMap' => $baseDir . '/src/Type/Generic/TemplateTypeMap.php',
    'PHPStan\\Type\\Generic\\TemplateTypeParameterStrategy' => $baseDir . '/src/Type/Generic/TemplateTypeParameterStrategy.php',
    'PHPStan\\Type\\Generic\\TemplateTypeReference' => $baseDir . '/src/Type/Generic/TemplateTypeReference.php',
    'PHPStan\\Type\\Generic\\TemplateTypeScope' => $baseDir . '/src/Type/Generic/TemplateTypeScope.php',
    'PHPStan\\Type\\Generic\\TemplateTypeStrategy' => $baseDir . '/src/Type/Generic/TemplateTypeStrategy.php',
    'PHPStan\\Type\\Generic\\TemplateTypeTrait' => $baseDir . '/src/Type/Generic/TemplateTypeTrait.php',
    'PHPStan\\Type\\Generic\\TemplateTypeVariance' => $baseDir . '/src/Type/Generic/TemplateTypeVariance.php',
    'PHPStan\\Type\\Generic\\TemplateUnionType' => $baseDir . '/src/Type/Generic/TemplateUnionType.php',
    'PHPStan\\Type\\Helper\\GetTemplateTypeType' => $baseDir . '/src/Type/Helper/GetTemplateTypeType.php',
    'PHPStan\\Type\\IntegerRangeType' => $baseDir . '/src/Type/IntegerRangeType.php',
    'PHPStan\\Type\\IntegerType' => $baseDir . '/src/Type/IntegerType.php',
    'PHPStan\\Type\\IntersectionType' => $baseDir . '/src/Type/IntersectionType.php',
    'PHPStan\\Type\\IterableType' => $baseDir . '/src/Type/IterableType.php',
    'PHPStan\\Type\\JustNullableTypeTrait' => $baseDir . '/src/Type/JustNullableTypeTrait.php',
    'PHPStan\\Type\\KeyOfType' => $baseDir . '/src/Type/KeyOfType.php',
    'PHPStan\\Type\\LateResolvableType' => $baseDir . '/src/Type/LateResolvableType.php',
    'PHPStan\\Type\\LazyTypeAliasResolverProvider' => $baseDir . '/src/Type/LazyTypeAliasResolverProvider.php',
    'PHPStan\\Type\\LooseComparisonHelper' => $baseDir . '/src/Type/LooseComparisonHelper.php',
    'PHPStan\\Type\\MethodTypeSpecifyingExtension' => $baseDir . '/src/Type/MethodTypeSpecifyingExtension.php',
    'PHPStan\\Type\\MixedType' => $baseDir . '/src/Type/MixedType.php',
    'PHPStan\\Type\\NeverType' => $baseDir . '/src/Type/NeverType.php',
    'PHPStan\\Type\\NonexistentParentClassType' => $baseDir . '/src/Type/NonexistentParentClassType.php',
    'PHPStan\\Type\\NullType' => $baseDir . '/src/Type/NullType.php',
    'PHPStan\\Type\\ObjectShapePropertyReflection' => $baseDir . '/src/Type/ObjectShapePropertyReflection.php',
    'PHPStan\\Type\\ObjectShapeType' => $baseDir . '/src/Type/ObjectShapeType.php',
    'PHPStan\\Type\\ObjectType' => $baseDir . '/src/Type/ObjectType.php',
    'PHPStan\\Type\\ObjectWithoutClassType' => $baseDir . '/src/Type/ObjectWithoutClassType.php',
    'PHPStan\\Type\\OffsetAccessType' => $baseDir . '/src/Type/OffsetAccessType.php',
    'PHPStan\\Type\\OperatorTypeSpecifyingExtension' => $baseDir . '/src/Type/OperatorTypeSpecifyingExtension.php',
    'PHPStan\\Type\\OperatorTypeSpecifyingExtensionRegistry' => $baseDir . '/src/Type/OperatorTypeSpecifyingExtensionRegistry.php',
    'PHPStan\\Type\\ParserNodeTypeToPHPStanType' => $baseDir . '/src/Type/ParserNodeTypeToPHPStanType.php',
    'PHPStan\\Type\\Php\\ArgumentBasedFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/ArgumentBasedFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArrayChunkFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/ArrayChunkFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArrayColumnFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/ArrayColumnFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArrayCombineFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/ArrayCombineFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArrayCurrentDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/ArrayCurrentDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArrayFillFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/ArrayFillFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArrayFillKeysFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/ArrayFillKeysFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArrayFilterFunctionReturnTypeReturnTypeExtension' => $baseDir . '/src/Type/Php/ArrayFilterFunctionReturnTypeReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArrayFlipFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/ArrayFlipFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArrayIntersectKeyFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/ArrayIntersectKeyFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArrayKeyDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/ArrayKeyDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArrayKeyExistsFunctionTypeSpecifyingExtension' => $baseDir . '/src/Type/Php/ArrayKeyExistsFunctionTypeSpecifyingExtension.php',
    'PHPStan\\Type\\Php\\ArrayKeyFirstDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/ArrayKeyFirstDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArrayKeyLastDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/ArrayKeyLastDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArrayKeysFunctionDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/ArrayKeysFunctionDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArrayMapFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/ArrayMapFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArrayMergeFunctionDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/ArrayMergeFunctionDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArrayNextDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/ArrayNextDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArrayPointerFunctionsDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/ArrayPointerFunctionsDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArrayPopFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/ArrayPopFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArrayRandFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/ArrayRandFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArrayReduceFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/ArrayReduceFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArrayReplaceFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/ArrayReplaceFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArrayReverseFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/ArrayReverseFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArraySearchFunctionDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/ArraySearchFunctionDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArraySearchFunctionTypeSpecifyingExtension' => $baseDir . '/src/Type/Php/ArraySearchFunctionTypeSpecifyingExtension.php',
    'PHPStan\\Type\\Php\\ArrayShiftFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/ArrayShiftFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArraySliceFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/ArraySliceFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArraySpliceFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/ArraySpliceFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArraySumFunctionDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/ArraySumFunctionDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ArrayValuesFunctionDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/ArrayValuesFunctionDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\AssertFunctionTypeSpecifyingExtension' => $baseDir . '/src/Type/Php/AssertFunctionTypeSpecifyingExtension.php',
    'PHPStan\\Type\\Php\\BackedEnumFromMethodDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/BackedEnumFromMethodDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\Base64DecodeDynamicFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/Base64DecodeDynamicFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\BcMathStringOrNullReturnTypeExtension' => $baseDir . '/src/Type/Php/BcMathStringOrNullReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ClassExistsFunctionTypeSpecifyingExtension' => $baseDir . '/src/Type/Php/ClassExistsFunctionTypeSpecifyingExtension.php',
    'PHPStan\\Type\\Php\\ClassImplementsFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/ClassImplementsFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ClosureBindDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/ClosureBindDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ClosureBindToDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/ClosureBindToDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ClosureFromCallableDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/ClosureFromCallableDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\CompactFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/CompactFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\CountFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/CountFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\CountFunctionTypeSpecifyingExtension' => $baseDir . '/src/Type/Php/CountFunctionTypeSpecifyingExtension.php',
    'PHPStan\\Type\\Php\\CtypeDigitFunctionTypeSpecifyingExtension' => $baseDir . '/src/Type/Php/CtypeDigitFunctionTypeSpecifyingExtension.php',
    'PHPStan\\Type\\Php\\CurlGetinfoFunctionDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/CurlGetinfoFunctionDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\CurlInitReturnTypeExtension' => $baseDir . '/src/Type/Php/CurlInitReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\DateFormatFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/DateFormatFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\DateFormatMethodReturnTypeExtension' => $baseDir . '/src/Type/Php/DateFormatMethodReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\DateFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/DateFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\DateIntervalConstructorThrowTypeExtension' => $baseDir . '/src/Type/Php/DateIntervalConstructorThrowTypeExtension.php',
    'PHPStan\\Type\\Php\\DateIntervalDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/DateIntervalDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\DatePeriodConstructorReturnTypeExtension' => $baseDir . '/src/Type/Php/DatePeriodConstructorReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\DateTimeConstructorThrowTypeExtension' => $baseDir . '/src/Type/Php/DateTimeConstructorThrowTypeExtension.php',
    'PHPStan\\Type\\Php\\DateTimeCreateDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/DateTimeCreateDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\DateTimeDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/DateTimeDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\DateTimeModifyReturnTypeExtension' => $baseDir . '/src/Type/Php/DateTimeModifyReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\DateTimeZoneConstructorThrowTypeExtension' => $baseDir . '/src/Type/Php/DateTimeZoneConstructorThrowTypeExtension.php',
    'PHPStan\\Type\\Php\\DefineConstantTypeSpecifyingExtension' => $baseDir . '/src/Type/Php/DefineConstantTypeSpecifyingExtension.php',
    'PHPStan\\Type\\Php\\DefinedConstantTypeSpecifyingExtension' => $baseDir . '/src/Type/Php/DefinedConstantTypeSpecifyingExtension.php',
    'PHPStan\\Type\\Php\\DioStatDynamicFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/DioStatDynamicFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\DsMapDynamicMethodThrowTypeExtension' => $baseDir . '/src/Type/Php/DsMapDynamicMethodThrowTypeExtension.php',
    'PHPStan\\Type\\Php\\DsMapDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/DsMapDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ExplodeFunctionDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/ExplodeFunctionDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\FilterFunctionReturnTypeHelper' => $baseDir . '/src/Type/Php/FilterFunctionReturnTypeHelper.php',
    'PHPStan\\Type\\Php\\FilterInputDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/FilterInputDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\FilterVarArrayDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/FilterVarArrayDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\FilterVarDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/FilterVarDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\FunctionExistsFunctionTypeSpecifyingExtension' => $baseDir . '/src/Type/Php/FunctionExistsFunctionTypeSpecifyingExtension.php',
    'PHPStan\\Type\\Php\\GetCalledClassDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/GetCalledClassDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\GetClassDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/GetClassDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\GetParentClassDynamicFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/GetParentClassDynamicFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\GettimeofdayDynamicFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/GettimeofdayDynamicFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\HashFunctionsReturnTypeExtension' => $baseDir . '/src/Type/Php/HashFunctionsReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\HrtimeFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/HrtimeFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ImplodeFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/ImplodeFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\InArrayFunctionTypeSpecifyingExtension' => $baseDir . '/src/Type/Php/InArrayFunctionTypeSpecifyingExtension.php',
    'PHPStan\\Type\\Php\\IniGetReturnTypeExtension' => $baseDir . '/src/Type/Php/IniGetReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\IntdivThrowTypeExtension' => $baseDir . '/src/Type/Php/IntdivThrowTypeExtension.php',
    'PHPStan\\Type\\Php\\IsAFunctionTypeSpecifyingExtension' => $baseDir . '/src/Type/Php/IsAFunctionTypeSpecifyingExtension.php',
    'PHPStan\\Type\\Php\\IsAFunctionTypeSpecifyingHelper' => $baseDir . '/src/Type/Php/IsAFunctionTypeSpecifyingHelper.php',
    'PHPStan\\Type\\Php\\IsArrayFunctionTypeSpecifyingExtension' => $baseDir . '/src/Type/Php/IsArrayFunctionTypeSpecifyingExtension.php',
    'PHPStan\\Type\\Php\\IsCallableFunctionTypeSpecifyingExtension' => $baseDir . '/src/Type/Php/IsCallableFunctionTypeSpecifyingExtension.php',
    'PHPStan\\Type\\Php\\IsIterableFunctionTypeSpecifyingExtension' => $baseDir . '/src/Type/Php/IsIterableFunctionTypeSpecifyingExtension.php',
    'PHPStan\\Type\\Php\\IsSubclassOfFunctionTypeSpecifyingExtension' => $baseDir . '/src/Type/Php/IsSubclassOfFunctionTypeSpecifyingExtension.php',
    'PHPStan\\Type\\Php\\IteratorToArrayFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/IteratorToArrayFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\JsonThrowOnErrorDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/JsonThrowOnErrorDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\JsonThrowTypeExtension' => $baseDir . '/src/Type/Php/JsonThrowTypeExtension.php',
    'PHPStan\\Type\\Php\\LtrimFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/LtrimFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\MbConvertEncodingFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/MbConvertEncodingFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\MbFunctionsReturnTypeExtension' => $baseDir . '/src/Type/Php/MbFunctionsReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\MbFunctionsReturnTypeExtensionTrait' => $baseDir . '/src/Type/Php/MbFunctionsReturnTypeExtensionTrait.php',
    'PHPStan\\Type\\Php\\MbStrlenFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/MbStrlenFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\MbSubstituteCharacterDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/MbSubstituteCharacterDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\MethodExistsTypeSpecifyingExtension' => $baseDir . '/src/Type/Php/MethodExistsTypeSpecifyingExtension.php',
    'PHPStan\\Type\\Php\\MicrotimeFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/MicrotimeFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\MinMaxFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/MinMaxFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\NonEmptyStringFunctionsReturnTypeExtension' => $baseDir . '/src/Type/Php/NonEmptyStringFunctionsReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\NumberFormatFunctionDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/NumberFormatFunctionDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ParseUrlFunctionDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/ParseUrlFunctionDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\PathinfoFunctionDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/PathinfoFunctionDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\PowFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/PowFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\PregFilterFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/PregFilterFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\PregSplitDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/PregSplitDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\PropertyExistsTypeSpecifyingExtension' => $baseDir . '/src/Type/Php/PropertyExistsTypeSpecifyingExtension.php',
    'PHPStan\\Type\\Php\\RandomIntFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/RandomIntFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\RangeFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/RangeFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ReflectionClassConstructorThrowTypeExtension' => $baseDir . '/src/Type/Php/ReflectionClassConstructorThrowTypeExtension.php',
    'PHPStan\\Type\\Php\\ReflectionClassIsSubclassOfTypeSpecifyingExtension' => $baseDir . '/src/Type/Php/ReflectionClassIsSubclassOfTypeSpecifyingExtension.php',
    'PHPStan\\Type\\Php\\ReflectionFunctionConstructorThrowTypeExtension' => $baseDir . '/src/Type/Php/ReflectionFunctionConstructorThrowTypeExtension.php',
    'PHPStan\\Type\\Php\\ReflectionGetAttributesMethodReturnTypeExtension' => $baseDir . '/src/Type/Php/ReflectionGetAttributesMethodReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ReflectionMethodConstructorThrowTypeExtension' => $baseDir . '/src/Type/Php/ReflectionMethodConstructorThrowTypeExtension.php',
    'PHPStan\\Type\\Php\\ReflectionPropertyConstructorThrowTypeExtension' => $baseDir . '/src/Type/Php/ReflectionPropertyConstructorThrowTypeExtension.php',
    'PHPStan\\Type\\Php\\ReplaceFunctionsDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/ReplaceFunctionsDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\RoundFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/RoundFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\SimpleXMLElementAsXMLMethodReturnTypeExtension' => $baseDir . '/src/Type/Php/SimpleXMLElementAsXMLMethodReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\SimpleXMLElementClassPropertyReflectionExtension' => $baseDir . '/src/Type/Php/SimpleXMLElementClassPropertyReflectionExtension.php',
    'PHPStan\\Type\\Php\\SimpleXMLElementConstructorThrowTypeExtension' => $baseDir . '/src/Type/Php/SimpleXMLElementConstructorThrowTypeExtension.php',
    'PHPStan\\Type\\Php\\SimpleXMLElementXpathMethodReturnTypeExtension' => $baseDir . '/src/Type/Php/SimpleXMLElementXpathMethodReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\SprintfFunctionDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/SprintfFunctionDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\SscanfFunctionDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/SscanfFunctionDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\StatDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/StatDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\StrCaseFunctionsReturnTypeExtension' => $baseDir . '/src/Type/Php/StrCaseFunctionsReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\StrContainingTypeSpecifyingExtension' => $baseDir . '/src/Type/Php/StrContainingTypeSpecifyingExtension.php',
    'PHPStan\\Type\\Php\\StrPadFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/StrPadFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\StrRepeatFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/StrRepeatFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\StrSplitFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/StrSplitFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\StrTokFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/StrTokFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\StrWordCountFunctionDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/StrWordCountFunctionDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\StrlenFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/StrlenFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\StrtotimeFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/StrtotimeFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\StrvalFamilyFunctionReturnTypeExtension' => $baseDir . '/src/Type/Php/StrvalFamilyFunctionReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\SubstrDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/SubstrDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\ThrowableReturnTypeExtension' => $baseDir . '/src/Type/Php/ThrowableReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\TriggerErrorDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/TriggerErrorDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\TypeSpecifyingFunctionsDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/TypeSpecifyingFunctionsDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\VersionCompareFunctionDynamicReturnTypeExtension' => $baseDir . '/src/Type/Php/VersionCompareFunctionDynamicReturnTypeExtension.php',
    'PHPStan\\Type\\Php\\XMLReaderOpenReturnTypeExtension' => $baseDir . '/src/Type/Php/XMLReaderOpenReturnTypeExtension.php',
    'PHPStan\\Type\\RecursionGuard' => $baseDir . '/src/Type/RecursionGuard.php',
    'PHPStan\\Type\\ResourceType' => $baseDir . '/src/Type/ResourceType.php',
    'PHPStan\\Type\\SimultaneousTypeTraverser' => $baseDir . '/src/Type/SimultaneousTypeTraverser.php',
    'PHPStan\\Type\\StaticMethodTypeSpecifyingExtension' => $baseDir . '/src/Type/StaticMethodTypeSpecifyingExtension.php',
    'PHPStan\\Type\\StaticType' => $baseDir . '/src/Type/StaticType.php',
    'PHPStan\\Type\\StaticTypeFactory' => $baseDir . '/src/Type/StaticTypeFactory.php',
    'PHPStan\\Type\\StrictMixedType' => $baseDir . '/src/Type/StrictMixedType.php',
    'PHPStan\\Type\\StringAlwaysAcceptingObjectWithToStringType' => $baseDir . '/src/Type/StringAlwaysAcceptingObjectWithToStringType.php',
    'PHPStan\\Type\\StringType' => $baseDir . '/src/Type/StringType.php',
    'PHPStan\\Type\\SubtractableType' => $baseDir . '/src/Type/SubtractableType.php',
    'PHPStan\\Type\\ThisType' => $baseDir . '/src/Type/ThisType.php',
    'PHPStan\\Type\\Traits\\ConstantNumericComparisonTypeTrait' => $baseDir . '/src/Type/Traits/ConstantNumericComparisonTypeTrait.php',
    'PHPStan\\Type\\Traits\\ConstantScalarTypeTrait' => $baseDir . '/src/Type/Traits/ConstantScalarTypeTrait.php',
    'PHPStan\\Type\\Traits\\FalseyBooleanTypeTrait' => $baseDir . '/src/Type/Traits/FalseyBooleanTypeTrait.php',
    'PHPStan\\Type\\Traits\\LateResolvableTypeTrait' => $baseDir . '/src/Type/Traits/LateResolvableTypeTrait.php',
    'PHPStan\\Type\\Traits\\MaybeArrayTypeTrait' => $baseDir . '/src/Type/Traits/MaybeArrayTypeTrait.php',
    'PHPStan\\Type\\Traits\\MaybeCallableTypeTrait' => $baseDir . '/src/Type/Traits/MaybeCallableTypeTrait.php',
    'PHPStan\\Type\\Traits\\MaybeIterableTypeTrait' => $baseDir . '/src/Type/Traits/MaybeIterableTypeTrait.php',
    'PHPStan\\Type\\Traits\\MaybeObjectTypeTrait' => $baseDir . '/src/Type/Traits/MaybeObjectTypeTrait.php',
    'PHPStan\\Type\\Traits\\MaybeOffsetAccessibleTypeTrait' => $baseDir . '/src/Type/Traits/MaybeOffsetAccessibleTypeTrait.php',
    'PHPStan\\Type\\Traits\\NonArrayTypeTrait' => $baseDir . '/src/Type/Traits/NonArrayTypeTrait.php',
    'PHPStan\\Type\\Traits\\NonCallableTypeTrait' => $baseDir . '/src/Type/Traits/NonCallableTypeTrait.php',
    'PHPStan\\Type\\Traits\\NonGeneralizableTypeTrait' => $baseDir . '/src/Type/Traits/NonGeneralizableTypeTrait.php',
    'PHPStan\\Type\\Traits\\NonGenericTypeTrait' => $baseDir . '/src/Type/Traits/NonGenericTypeTrait.php',
    'PHPStan\\Type\\Traits\\NonIterableTypeTrait' => $baseDir . '/src/Type/Traits/NonIterableTypeTrait.php',
    'PHPStan\\Type\\Traits\\NonObjectTypeTrait' => $baseDir . '/src/Type/Traits/NonObjectTypeTrait.php',
    'PHPStan\\Type\\Traits\\NonOffsetAccessibleTypeTrait' => $baseDir . '/src/Type/Traits/NonOffsetAccessibleTypeTrait.php',
    'PHPStan\\Type\\Traits\\NonRemoveableTypeTrait' => $baseDir . '/src/Type/Traits/NonRemoveableTypeTrait.php',
    'PHPStan\\Type\\Traits\\ObjectTypeTrait' => $baseDir . '/src/Type/Traits/ObjectTypeTrait.php',
    'PHPStan\\Type\\Traits\\TruthyBooleanTypeTrait' => $baseDir . '/src/Type/Traits/TruthyBooleanTypeTrait.php',
    'PHPStan\\Type\\Traits\\UndecidedBooleanTypeTrait' => $baseDir . '/src/Type/Traits/UndecidedBooleanTypeTrait.php',
    'PHPStan\\Type\\Traits\\UndecidedComparisonCompoundTypeTrait' => $baseDir . '/src/Type/Traits/UndecidedComparisonCompoundTypeTrait.php',
    'PHPStan\\Type\\Traits\\UndecidedComparisonTypeTrait' => $baseDir . '/src/Type/Traits/UndecidedComparisonTypeTrait.php',
    'PHPStan\\Type\\Type' => $baseDir . '/src/Type/Type.php',
    'PHPStan\\Type\\TypeAlias' => $baseDir . '/src/Type/TypeAlias.php',
    'PHPStan\\Type\\TypeAliasResolver' => $baseDir . '/src/Type/TypeAliasResolver.php',
    'PHPStan\\Type\\TypeAliasResolverProvider' => $baseDir . '/src/Type/TypeAliasResolverProvider.php',
    'PHPStan\\Type\\TypeCombinator' => $baseDir . '/src/Type/TypeCombinator.php',
    'PHPStan\\Type\\TypeTraverser' => $baseDir . '/src/Type/TypeTraverser.php',
    'PHPStan\\Type\\TypeUtils' => $baseDir . '/src/Type/TypeUtils.php',
    'PHPStan\\Type\\TypeWithClassName' => $baseDir . '/src/Type/TypeWithClassName.php',
    'PHPStan\\Type\\TypehintHelper' => $baseDir . '/src/Type/TypehintHelper.php',
    'PHPStan\\Type\\UnionType' => $baseDir . '/src/Type/UnionType.php',
    'PHPStan\\Type\\UnionTypeHelper' => $baseDir . '/src/Type/UnionTypeHelper.php',
    'PHPStan\\Type\\UsefulTypeAliasResolver' => $baseDir . '/src/Type/UsefulTypeAliasResolver.php',
    'PHPStan\\Type\\ValueOfType' => $baseDir . '/src/Type/ValueOfType.php',
    'PHPStan\\Type\\VerbosityLevel' => $baseDir . '/src/Type/VerbosityLevel.php',
    'PHPStan\\Type\\VoidType' => $baseDir . '/src/Type/VoidType.php',
    'PhpParser\\Builder' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder.php',
    'PhpParser\\BuilderFactory' => $vendorDir . '/nikic/php-parser/lib/PhpParser/BuilderFactory.php',
    'PhpParser\\BuilderHelpers' => $vendorDir . '/nikic/php-parser/lib/PhpParser/BuilderHelpers.php',
    'PhpParser\\Builder\\ClassConst' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php',
    'PhpParser\\Builder\\Class_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Class_.php',
    'PhpParser\\Builder\\Declaration' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Declaration.php',
    'PhpParser\\Builder\\EnumCase' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php',
    'PhpParser\\Builder\\Enum_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Enum_.php',
    'PhpParser\\Builder\\FunctionLike' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php',
    'PhpParser\\Builder\\Function_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Function_.php',
    'PhpParser\\Builder\\Interface_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Interface_.php',
    'PhpParser\\Builder\\Method' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Method.php',
    'PhpParser\\Builder\\Namespace_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php',
    'PhpParser\\Builder\\Param' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Param.php',
    'PhpParser\\Builder\\Property' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Property.php',
    'PhpParser\\Builder\\TraitUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php',
    'PhpParser\\Builder\\TraitUseAdaptation' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php',
    'PhpParser\\Builder\\Trait_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Trait_.php',
    'PhpParser\\Builder\\Use_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Use_.php',
    'PhpParser\\Comment' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Comment.php',
    'PhpParser\\Comment\\Doc' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Comment/Doc.php',
    'PhpParser\\ConstExprEvaluationException' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php',
    'PhpParser\\ConstExprEvaluator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php',
    'PhpParser\\Error' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Error.php',
    'PhpParser\\ErrorHandler' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ErrorHandler.php',
    'PhpParser\\ErrorHandler\\Collecting' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php',
    'PhpParser\\ErrorHandler\\Throwing' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php',
    'PhpParser\\Internal\\DiffElem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php',
    'PhpParser\\Internal\\Differ' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/Differ.php',
    'PhpParser\\Internal\\PrintableNewAnonClassNode' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php',
    'PhpParser\\Internal\\TokenStream' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php',
    'PhpParser\\JsonDecoder' => $vendorDir . '/nikic/php-parser/lib/PhpParser/JsonDecoder.php',
    'PhpParser\\Lexer' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer.php',
    'PhpParser\\Lexer\\Emulative' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php',
    'PhpParser\\Lexer\\TokenEmulator\\AttributeEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php',
    'PhpParser\\Lexer\\TokenEmulator\\CoaleseEqualTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php',
    'PhpParser\\Lexer\\TokenEmulator\\EnumTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php',
    'PhpParser\\Lexer\\TokenEmulator\\ExplicitOctalEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php',
    'PhpParser\\Lexer\\TokenEmulator\\FlexibleDocStringEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php',
    'PhpParser\\Lexer\\TokenEmulator\\FnTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php',
    'PhpParser\\Lexer\\TokenEmulator\\KeywordEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php',
    'PhpParser\\Lexer\\TokenEmulator\\MatchTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php',
    'PhpParser\\Lexer\\TokenEmulator\\NullsafeTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php',
    'PhpParser\\Lexer\\TokenEmulator\\NumericLiteralSeparatorEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php',
    'PhpParser\\Lexer\\TokenEmulator\\ReadonlyFunctionTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php',
    'PhpParser\\Lexer\\TokenEmulator\\ReadonlyTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php',
    'PhpParser\\Lexer\\TokenEmulator\\ReverseEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php',
    'PhpParser\\Lexer\\TokenEmulator\\TokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php',
    'PhpParser\\NameContext' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NameContext.php',
    'PhpParser\\Node' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node.php',
    'PhpParser\\NodeAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeAbstract.php',
    'PhpParser\\NodeDumper' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeDumper.php',
    'PhpParser\\NodeFinder' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeFinder.php',
    'PhpParser\\NodeTraverser' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeTraverser.php',
    'PhpParser\\NodeTraverserInterface' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php',
    'PhpParser\\NodeVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor.php',
    'PhpParser\\NodeVisitorAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php',
    'PhpParser\\NodeVisitor\\CloningVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php',
    'PhpParser\\NodeVisitor\\FindingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php',
    'PhpParser\\NodeVisitor\\FirstFindingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php',
    'PhpParser\\NodeVisitor\\NameResolver' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php',
    'PhpParser\\NodeVisitor\\NodeConnectingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php',
    'PhpParser\\NodeVisitor\\ParentConnectingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php',
    'PhpParser\\Node\\Arg' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Arg.php',
    'PhpParser\\Node\\Attribute' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Attribute.php',
    'PhpParser\\Node\\AttributeGroup' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php',
    'PhpParser\\Node\\ComplexType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/ComplexType.php',
    'PhpParser\\Node\\Const_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Const_.php',
    'PhpParser\\Node\\Expr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr.php',
    'PhpParser\\Node\\Expr\\ArrayDimFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php',
    'PhpParser\\Node\\Expr\\ArrayItem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php',
    'PhpParser\\Node\\Expr\\Array_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php',
    'PhpParser\\Node\\Expr\\ArrowFunction' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php',
    'PhpParser\\Node\\Expr\\Assign' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php',
    'PhpParser\\Node\\Expr\\AssignOp' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php',
    'PhpParser\\Node\\Expr\\AssignOp\\BitwiseAnd' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php',
    'PhpParser\\Node\\Expr\\AssignOp\\BitwiseOr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php',
    'PhpParser\\Node\\Expr\\AssignOp\\BitwiseXor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php',
    'PhpParser\\Node\\Expr\\AssignOp\\Coalesce' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php',
    'PhpParser\\Node\\Expr\\AssignOp\\Concat' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php',
    'PhpParser\\Node\\Expr\\AssignOp\\Div' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php',
    'PhpParser\\Node\\Expr\\AssignOp\\Minus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php',
    'PhpParser\\Node\\Expr\\AssignOp\\Mod' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php',
    'PhpParser\\Node\\Expr\\AssignOp\\Mul' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php',
    'PhpParser\\Node\\Expr\\AssignOp\\Plus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php',
    'PhpParser\\Node\\Expr\\AssignOp\\Pow' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php',
    'PhpParser\\Node\\Expr\\AssignOp\\ShiftLeft' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php',
    'PhpParser\\Node\\Expr\\AssignOp\\ShiftRight' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php',
    'PhpParser\\Node\\Expr\\AssignRef' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php',
    'PhpParser\\Node\\Expr\\BinaryOp' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php',
    'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseAnd' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php',
    'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseOr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php',
    'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseXor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php',
    'PhpParser\\Node\\Expr\\BinaryOp\\BooleanAnd' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php',
    'PhpParser\\Node\\Expr\\BinaryOp\\BooleanOr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php',
    'PhpParser\\Node\\Expr\\BinaryOp\\Coalesce' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php',
    'PhpParser\\Node\\Expr\\BinaryOp\\Concat' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php',
    'PhpParser\\Node\\Expr\\BinaryOp\\Div' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php',
    'PhpParser\\Node\\Expr\\BinaryOp\\Equal' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php',
    'PhpParser\\Node\\Expr\\BinaryOp\\Greater' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php',
    'PhpParser\\Node\\Expr\\BinaryOp\\GreaterOrEqual' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php',
    'PhpParser\\Node\\Expr\\BinaryOp\\Identical' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php',
    'PhpParser\\Node\\Expr\\BinaryOp\\LogicalAnd' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php',
    'PhpParser\\Node\\Expr\\BinaryOp\\LogicalOr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php',
    'PhpParser\\Node\\Expr\\BinaryOp\\LogicalXor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php',
    'PhpParser\\Node\\Expr\\BinaryOp\\Minus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php',
    'PhpParser\\Node\\Expr\\BinaryOp\\Mod' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php',
    'PhpParser\\Node\\Expr\\BinaryOp\\Mul' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php',
    'PhpParser\\Node\\Expr\\BinaryOp\\NotEqual' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php',
    'PhpParser\\Node\\Expr\\BinaryOp\\NotIdentical' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php',
    'PhpParser\\Node\\Expr\\BinaryOp\\Plus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php',
    'PhpParser\\Node\\Expr\\BinaryOp\\Pow' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php',
    'PhpParser\\Node\\Expr\\BinaryOp\\ShiftLeft' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php',
    'PhpParser\\Node\\Expr\\BinaryOp\\ShiftRight' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php',
    'PhpParser\\Node\\Expr\\BinaryOp\\Smaller' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php',
    'PhpParser\\Node\\Expr\\BinaryOp\\SmallerOrEqual' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php',
    'PhpParser\\Node\\Expr\\BinaryOp\\Spaceship' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php',
    'PhpParser\\Node\\Expr\\BitwiseNot' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php',
    'PhpParser\\Node\\Expr\\BooleanNot' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php',
    'PhpParser\\Node\\Expr\\CallLike' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php',
    'PhpParser\\Node\\Expr\\Cast' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php',
    'PhpParser\\Node\\Expr\\Cast\\Array_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php',
    'PhpParser\\Node\\Expr\\Cast\\Bool_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php',
    'PhpParser\\Node\\Expr\\Cast\\Double' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php',
    'PhpParser\\Node\\Expr\\Cast\\Int_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php',
    'PhpParser\\Node\\Expr\\Cast\\Object_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php',
    'PhpParser\\Node\\Expr\\Cast\\String_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php',
    'PhpParser\\Node\\Expr\\Cast\\Unset_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php',
    'PhpParser\\Node\\Expr\\ClassConstFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php',
    'PhpParser\\Node\\Expr\\Clone_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php',
    'PhpParser\\Node\\Expr\\Closure' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php',
    'PhpParser\\Node\\Expr\\ClosureUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php',
    'PhpParser\\Node\\Expr\\ConstFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php',
    'PhpParser\\Node\\Expr\\Empty_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php',
    'PhpParser\\Node\\Expr\\Error' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php',
    'PhpParser\\Node\\Expr\\ErrorSuppress' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php',
    'PhpParser\\Node\\Expr\\Eval_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php',
    'PhpParser\\Node\\Expr\\Exit_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php',
    'PhpParser\\Node\\Expr\\FuncCall' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php',
    'PhpParser\\Node\\Expr\\Include_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php',
    'PhpParser\\Node\\Expr\\Instanceof_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php',
    'PhpParser\\Node\\Expr\\Isset_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php',
    'PhpParser\\Node\\Expr\\List_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php',
    'PhpParser\\Node\\Expr\\Match_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php',
    'PhpParser\\Node\\Expr\\MethodCall' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php',
    'PhpParser\\Node\\Expr\\New_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php',
    'PhpParser\\Node\\Expr\\NullsafeMethodCall' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php',
    'PhpParser\\Node\\Expr\\NullsafePropertyFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php',
    'PhpParser\\Node\\Expr\\PostDec' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php',
    'PhpParser\\Node\\Expr\\PostInc' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php',
    'PhpParser\\Node\\Expr\\PreDec' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php',
    'PhpParser\\Node\\Expr\\PreInc' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php',
    'PhpParser\\Node\\Expr\\Print_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php',
    'PhpParser\\Node\\Expr\\PropertyFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php',
    'PhpParser\\Node\\Expr\\ShellExec' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php',
    'PhpParser\\Node\\Expr\\StaticCall' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php',
    'PhpParser\\Node\\Expr\\StaticPropertyFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php',
    'PhpParser\\Node\\Expr\\Ternary' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php',
    'PhpParser\\Node\\Expr\\Throw_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php',
    'PhpParser\\Node\\Expr\\UnaryMinus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php',
    'PhpParser\\Node\\Expr\\UnaryPlus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php',
    'PhpParser\\Node\\Expr\\Variable' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php',
    'PhpParser\\Node\\Expr\\YieldFrom' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php',
    'PhpParser\\Node\\Expr\\Yield_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php',
    'PhpParser\\Node\\FunctionLike' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php',
    'PhpParser\\Node\\Identifier' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Identifier.php',
    'PhpParser\\Node\\IntersectionType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php',
    'PhpParser\\Node\\MatchArm' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/MatchArm.php',
    'PhpParser\\Node\\Name' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Name.php',
    'PhpParser\\Node\\Name\\FullyQualified' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php',
    'PhpParser\\Node\\Name\\Relative' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php',
    'PhpParser\\Node\\NullableType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/NullableType.php',
    'PhpParser\\Node\\Param' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Param.php',
    'PhpParser\\Node\\Scalar' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar.php',
    'PhpParser\\Node\\Scalar\\DNumber' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php',
    'PhpParser\\Node\\Scalar\\Encapsed' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php',
    'PhpParser\\Node\\Scalar\\EncapsedStringPart' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php',
    'PhpParser\\Node\\Scalar\\LNumber' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php',
    'PhpParser\\Node\\Scalar\\MagicConst' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php',
    'PhpParser\\Node\\Scalar\\MagicConst\\Class_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php',
    'PhpParser\\Node\\Scalar\\MagicConst\\Dir' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php',
    'PhpParser\\Node\\Scalar\\MagicConst\\File' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php',
    'PhpParser\\Node\\Scalar\\MagicConst\\Function_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php',
    'PhpParser\\Node\\Scalar\\MagicConst\\Line' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php',
    'PhpParser\\Node\\Scalar\\MagicConst\\Method' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php',
    'PhpParser\\Node\\Scalar\\MagicConst\\Namespace_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php',
    'PhpParser\\Node\\Scalar\\MagicConst\\Trait_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php',
    'PhpParser\\Node\\Scalar\\String_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php',
    'PhpParser\\Node\\Stmt' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt.php',
    'PhpParser\\Node\\Stmt\\Break_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php',
    'PhpParser\\Node\\Stmt\\Case_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php',
    'PhpParser\\Node\\Stmt\\Catch_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php',
    'PhpParser\\Node\\Stmt\\ClassConst' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php',
    'PhpParser\\Node\\Stmt\\ClassLike' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php',
    'PhpParser\\Node\\Stmt\\ClassMethod' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php',
    'PhpParser\\Node\\Stmt\\Class_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php',
    'PhpParser\\Node\\Stmt\\Const_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php',
    'PhpParser\\Node\\Stmt\\Continue_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php',
    'PhpParser\\Node\\Stmt\\DeclareDeclare' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php',
    'PhpParser\\Node\\Stmt\\Declare_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php',
    'PhpParser\\Node\\Stmt\\Do_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php',
    'PhpParser\\Node\\Stmt\\Echo_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php',
    'PhpParser\\Node\\Stmt\\ElseIf_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php',
    'PhpParser\\Node\\Stmt\\Else_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php',
    'PhpParser\\Node\\Stmt\\EnumCase' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php',
    'PhpParser\\Node\\Stmt\\Enum_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php',
    'PhpParser\\Node\\Stmt\\Expression' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php',
    'PhpParser\\Node\\Stmt\\Finally_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php',
    'PhpParser\\Node\\Stmt\\For_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php',
    'PhpParser\\Node\\Stmt\\Foreach_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php',
    'PhpParser\\Node\\Stmt\\Function_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php',
    'PhpParser\\Node\\Stmt\\Global_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php',
    'PhpParser\\Node\\Stmt\\Goto_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php',
    'PhpParser\\Node\\Stmt\\GroupUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php',
    'PhpParser\\Node\\Stmt\\HaltCompiler' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php',
    'PhpParser\\Node\\Stmt\\If_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php',
    'PhpParser\\Node\\Stmt\\InlineHTML' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php',
    'PhpParser\\Node\\Stmt\\Interface_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php',
    'PhpParser\\Node\\Stmt\\Label' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php',
    'PhpParser\\Node\\Stmt\\Namespace_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php',
    'PhpParser\\Node\\Stmt\\Nop' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php',
    'PhpParser\\Node\\Stmt\\Property' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php',
    'PhpParser\\Node\\Stmt\\PropertyProperty' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php',
    'PhpParser\\Node\\Stmt\\Return_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php',
    'PhpParser\\Node\\Stmt\\StaticVar' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php',
    'PhpParser\\Node\\Stmt\\Static_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php',
    'PhpParser\\Node\\Stmt\\Switch_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php',
    'PhpParser\\Node\\Stmt\\Throw_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php',
    'PhpParser\\Node\\Stmt\\TraitUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php',
    'PhpParser\\Node\\Stmt\\TraitUseAdaptation' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php',
    'PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Alias' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php',
    'PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Precedence' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php',
    'PhpParser\\Node\\Stmt\\Trait_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php',
    'PhpParser\\Node\\Stmt\\TryCatch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php',
    'PhpParser\\Node\\Stmt\\Unset_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php',
    'PhpParser\\Node\\Stmt\\UseUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php',
    'PhpParser\\Node\\Stmt\\Use_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php',
    'PhpParser\\Node\\Stmt\\While_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php',
    'PhpParser\\Node\\UnionType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/UnionType.php',
    'PhpParser\\Node\\VarLikeIdentifier' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php',
    'PhpParser\\Node\\VariadicPlaceholder' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php',
    'PhpParser\\Parser' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser.php',
    'PhpParser\\ParserAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ParserAbstract.php',
    'PhpParser\\ParserFactory' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ParserFactory.php',
    'PhpParser\\Parser\\Multiple' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser/Multiple.php',
    'PhpParser\\Parser\\Php5' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser/Php5.php',
    'PhpParser\\Parser\\Php7' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser/Php7.php',
    'PhpParser\\Parser\\Tokens' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser/Tokens.php',
    'PhpParser\\PrettyPrinterAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php',
    'PhpParser\\PrettyPrinter\\Standard' => $vendorDir . '/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php',
    'PhpToken' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php',
    'Stringable' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
    'Symfony\\Polyfill\\Intl\\Grapheme\\Grapheme' => $vendorDir . '/symfony/polyfill-intl-grapheme/Grapheme.php',
    'Symfony\\Polyfill\\Intl\\Normalizer\\Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Normalizer.php',
    'Symfony\\Polyfill\\Mbstring\\Mbstring' => $vendorDir . '/symfony/polyfill-mbstring/Mbstring.php',
    'Symfony\\Polyfill\\Php73\\Php73' => $vendorDir . '/symfony/polyfill-php73/Php73.php',
    'Symfony\\Polyfill\\Php74\\Php74' => $vendorDir . '/symfony/polyfill-php74/Php74.php',
    'Symfony\\Polyfill\\Php80\\Php80' => $vendorDir . '/symfony/polyfill-php80/Php80.php',
    'Symfony\\Polyfill\\Php80\\PhpToken' => $vendorDir . '/symfony/polyfill-php80/PhpToken.php',
    'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
    'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
    '_PHPStan_dcc7b7cff\\Clue\\React\\NDJson\\Decoder' => $vendorDir . '/clue/ndjson-react/src/Decoder.php',
    '_PHPStan_dcc7b7cff\\Clue\\React\\NDJson\\Encoder' => $vendorDir . '/clue/ndjson-react/src/Encoder.php',
    '_PHPStan_dcc7b7cff\\Composer\\CaBundle\\CaBundle' => $vendorDir . '/composer/ca-bundle/src/CaBundle.php',
    '_PHPStan_dcc7b7cff\\Composer\\Pcre\\MatchAllResult' => $vendorDir . '/composer/pcre/src/MatchAllResult.php',
    '_PHPStan_dcc7b7cff\\Composer\\Pcre\\MatchAllStrictGroupsResult' => $vendorDir . '/composer/pcre/src/MatchAllStrictGroupsResult.php',
    '_PHPStan_dcc7b7cff\\Composer\\Pcre\\MatchAllWithOffsetsResult' => $vendorDir . '/composer/pcre/src/MatchAllWithOffsetsResult.php',
    '_PHPStan_dcc7b7cff\\Composer\\Pcre\\MatchResult' => $vendorDir . '/composer/pcre/src/MatchResult.php',
    '_PHPStan_dcc7b7cff\\Composer\\Pcre\\MatchStrictGroupsResult' => $vendorDir . '/composer/pcre/src/MatchStrictGroupsResult.php',
    '_PHPStan_dcc7b7cff\\Composer\\Pcre\\MatchWithOffsetsResult' => $vendorDir . '/composer/pcre/src/MatchWithOffsetsResult.php',
    '_PHPStan_dcc7b7cff\\Composer\\Pcre\\PcreException' => $vendorDir . '/composer/pcre/src/PcreException.php',
    '_PHPStan_dcc7b7cff\\Composer\\Pcre\\Preg' => $vendorDir . '/composer/pcre/src/Preg.php',
    '_PHPStan_dcc7b7cff\\Composer\\Pcre\\Regex' => $vendorDir . '/composer/pcre/src/Regex.php',
    '_PHPStan_dcc7b7cff\\Composer\\Pcre\\ReplaceResult' => $vendorDir . '/composer/pcre/src/ReplaceResult.php',
    '_PHPStan_dcc7b7cff\\Composer\\Pcre\\UnexpectedNullMatchException' => $vendorDir . '/composer/pcre/src/UnexpectedNullMatchException.php',
    '_PHPStan_dcc7b7cff\\Composer\\XdebugHandler\\PhpConfig' => $vendorDir . '/composer/xdebug-handler/src/PhpConfig.php',
    '_PHPStan_dcc7b7cff\\Composer\\XdebugHandler\\Process' => $vendorDir . '/composer/xdebug-handler/src/Process.php',
    '_PHPStan_dcc7b7cff\\Composer\\XdebugHandler\\Status' => $vendorDir . '/composer/xdebug-handler/src/Status.php',
    '_PHPStan_dcc7b7cff\\Composer\\XdebugHandler\\XdebugHandler' => $vendorDir . '/composer/xdebug-handler/src/XdebugHandler.php',
    '_PHPStan_dcc7b7cff\\Evenement\\EventEmitter' => $vendorDir . '/evenement/evenement/src/Evenement/EventEmitter.php',
    '_PHPStan_dcc7b7cff\\Evenement\\EventEmitterInterface' => $vendorDir . '/evenement/evenement/src/Evenement/EventEmitterInterface.php',
    '_PHPStan_dcc7b7cff\\Evenement\\EventEmitterTrait' => $vendorDir . '/evenement/evenement/src/Evenement/EventEmitterTrait.php',
    '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\CpuCoreCounter' => $vendorDir . '/fidry/cpu-core-counter/src/CpuCoreCounter.php',
    '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Diagnoser' => $vendorDir . '/fidry/cpu-core-counter/src/Diagnoser.php',
    '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Executor\\ProcOpenExecutor' => $vendorDir . '/fidry/cpu-core-counter/src/Executor/ProcOpenExecutor.php',
    '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Executor\\ProcessExecutor' => $vendorDir . '/fidry/cpu-core-counter/src/Executor/ProcessExecutor.php',
    '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\CpuCoreFinder' => $vendorDir . '/fidry/cpu-core-counter/src/Finder/CpuCoreFinder.php',
    '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\CpuInfoFinder' => $vendorDir . '/fidry/cpu-core-counter/src/Finder/CpuInfoFinder.php',
    '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\DummyCpuCoreFinder' => $vendorDir . '/fidry/cpu-core-counter/src/Finder/DummyCpuCoreFinder.php',
    '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\FinderRegistry' => $vendorDir . '/fidry/cpu-core-counter/src/Finder/FinderRegistry.php',
    '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\HwLogicalFinder' => $vendorDir . '/fidry/cpu-core-counter/src/Finder/HwLogicalFinder.php',
    '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\HwPhysicalFinder' => $vendorDir . '/fidry/cpu-core-counter/src/Finder/HwPhysicalFinder.php',
    '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\LscpuLogicalFinder' => $vendorDir . '/fidry/cpu-core-counter/src/Finder/LscpuLogicalFinder.php',
    '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\LscpuPhysicalFinder' => $vendorDir . '/fidry/cpu-core-counter/src/Finder/LscpuPhysicalFinder.php',
    '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\NProcFinder' => $vendorDir . '/fidry/cpu-core-counter/src/Finder/NProcFinder.php',
    '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\NProcessorFinder' => $vendorDir . '/fidry/cpu-core-counter/src/Finder/NProcessorFinder.php',
    '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\NullCpuCoreFinder' => $vendorDir . '/fidry/cpu-core-counter/src/Finder/NullCpuCoreFinder.php',
    '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\OnlyOnOSFamilyFinder' => $vendorDir . '/fidry/cpu-core-counter/src/Finder/OnlyOnOSFamilyFinder.php',
    '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\ProcOpenBasedFinder' => $vendorDir . '/fidry/cpu-core-counter/src/Finder/ProcOpenBasedFinder.php',
    '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\SkipOnOSFamilyFinder' => $vendorDir . '/fidry/cpu-core-counter/src/Finder/SkipOnOSFamilyFinder.php',
    '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\WmicLogicalFinder' => $vendorDir . '/fidry/cpu-core-counter/src/Finder/WmicLogicalFinder.php',
    '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\WmicPhysicalFinder' => $vendorDir . '/fidry/cpu-core-counter/src/Finder/WmicPhysicalFinder.php',
    '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\_NProcessorFinder' => $vendorDir . '/fidry/cpu-core-counter/src/Finder/_NProcessorFinder.php',
    '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\NumberOfCpuCoreNotFound' => $vendorDir . '/fidry/cpu-core-counter/src/NumberOfCpuCoreNotFound.php',
    '_PHPStan_dcc7b7cff\\Fig\\Http\\Message\\RequestMethodInterface' => $vendorDir . '/fig/http-message-util/src/RequestMethodInterface.php',
    '_PHPStan_dcc7b7cff\\Fig\\Http\\Message\\StatusCodeInterface' => $vendorDir . '/fig/http-message-util/src/StatusCodeInterface.php',
    '_PHPStan_dcc7b7cff\\Nette\\ArgumentOutOfRangeException' => $vendorDir . '/nette/utils/src/exceptions.php',
    '_PHPStan_dcc7b7cff\\Nette\\Bootstrap\\Configurator' => $vendorDir . '/nette/bootstrap/src/Bootstrap/Configurator.php',
    '_PHPStan_dcc7b7cff\\Nette\\Bootstrap\\Extensions\\ConstantsExtension' => $vendorDir . '/nette/bootstrap/src/Bootstrap/Extensions/ConstantsExtension.php',
    '_PHPStan_dcc7b7cff\\Nette\\Bootstrap\\Extensions\\PhpExtension' => $vendorDir . '/nette/bootstrap/src/Bootstrap/Extensions/PhpExtension.php',
    '_PHPStan_dcc7b7cff\\Nette\\Bridges\\DITracy\\ContainerPanel' => $vendorDir . '/nette/di/src/Bridges/DITracy/ContainerPanel.php',
    '_PHPStan_dcc7b7cff\\Nette\\Configurator' => $vendorDir . '/nette/bootstrap/src/Configurator.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Attributes\\Inject' => $vendorDir . '/nette/di/src/DI/Attributes/Inject.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Autowiring' => $vendorDir . '/nette/di/src/DI/Autowiring.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Compiler' => $vendorDir . '/nette/di/src/DI/Compiler.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\CompilerExtension' => $vendorDir . '/nette/di/src/DI/CompilerExtension.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Config\\Adapter' => $vendorDir . '/nette/di/src/DI/Config/Adapter.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Config\\Adapters\\NeonAdapter' => $vendorDir . '/nette/di/src/DI/Config/Adapters/NeonAdapter.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Config\\Adapters\\PhpAdapter' => $vendorDir . '/nette/di/src/DI/Config/Adapters/PhpAdapter.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Config\\DefinitionSchema' => $vendorDir . '/nette/di/src/DI/Config/DefinitionSchema.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Config\\Helpers' => $vendorDir . '/nette/di/src/DI/Config/Helpers.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Config\\IAdapter' => $vendorDir . '/nette/di/src/compatibility.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Config\\Loader' => $vendorDir . '/nette/di/src/DI/Config/Loader.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Container' => $vendorDir . '/nette/di/src/DI/Container.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\ContainerBuilder' => $vendorDir . '/nette/di/src/DI/ContainerBuilder.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\ContainerLoader' => $vendorDir . '/nette/di/src/DI/ContainerLoader.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Definitions\\AccessorDefinition' => $vendorDir . '/nette/di/src/DI/Definitions/AccessorDefinition.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Definitions\\Definition' => $vendorDir . '/nette/di/src/DI/Definitions/Definition.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Definitions\\FactoryDefinition' => $vendorDir . '/nette/di/src/DI/Definitions/FactoryDefinition.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Definitions\\ImportedDefinition' => $vendorDir . '/nette/di/src/DI/Definitions/ImportedDefinition.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Definitions\\LocatorDefinition' => $vendorDir . '/nette/di/src/DI/Definitions/LocatorDefinition.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Definitions\\Reference' => $vendorDir . '/nette/di/src/DI/Definitions/Reference.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Definitions\\ServiceDefinition' => $vendorDir . '/nette/di/src/DI/Definitions/ServiceDefinition.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Definitions\\Statement' => $vendorDir . '/nette/di/src/DI/Definitions/Statement.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\DependencyChecker' => $vendorDir . '/nette/di/src/DI/DependencyChecker.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\DynamicParameter' => $vendorDir . '/nette/di/src/DI/DynamicParameter.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Extensions\\ConstantsExtension' => $vendorDir . '/nette/di/src/DI/Extensions/ConstantsExtension.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Extensions\\DIExtension' => $vendorDir . '/nette/di/src/DI/Extensions/DIExtension.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Extensions\\DecoratorExtension' => $vendorDir . '/nette/di/src/DI/Extensions/DecoratorExtension.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Extensions\\ExtensionsExtension' => $vendorDir . '/nette/di/src/DI/Extensions/ExtensionsExtension.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Extensions\\InjectExtension' => $vendorDir . '/nette/di/src/DI/Extensions/InjectExtension.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Extensions\\ParametersExtension' => $vendorDir . '/nette/di/src/DI/Extensions/ParametersExtension.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Extensions\\PhpExtension' => $vendorDir . '/nette/di/src/DI/Extensions/PhpExtension.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Extensions\\SearchExtension' => $vendorDir . '/nette/di/src/DI/Extensions/SearchExtension.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Extensions\\ServicesExtension' => $vendorDir . '/nette/di/src/DI/Extensions/ServicesExtension.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Helpers' => $vendorDir . '/nette/di/src/DI/Helpers.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\InvalidConfigurationException' => $vendorDir . '/nette/di/src/DI/exceptions.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\MissingServiceException' => $vendorDir . '/nette/di/src/DI/exceptions.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\NotAllowedDuringResolvingException' => $vendorDir . '/nette/di/src/DI/exceptions.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\PhpGenerator' => $vendorDir . '/nette/di/src/DI/PhpGenerator.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Resolver' => $vendorDir . '/nette/di/src/DI/Resolver.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\ServiceCreationException' => $vendorDir . '/nette/di/src/DI/exceptions.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\ServiceDefinition' => $vendorDir . '/nette/di/src/compatibility.php',
    '_PHPStan_dcc7b7cff\\Nette\\DI\\Statement' => $vendorDir . '/nette/di/src/compatibility.php',
    '_PHPStan_dcc7b7cff\\Nette\\DeprecatedException' => $vendorDir . '/nette/utils/src/exceptions.php',
    '_PHPStan_dcc7b7cff\\Nette\\DirectoryNotFoundException' => $vendorDir . '/nette/utils/src/exceptions.php',
    '_PHPStan_dcc7b7cff\\Nette\\FileNotFoundException' => $vendorDir . '/nette/utils/src/exceptions.php',
    '_PHPStan_dcc7b7cff\\Nette\\HtmlStringable' => $vendorDir . '/nette/utils/src/HtmlStringable.php',
    '_PHPStan_dcc7b7cff\\Nette\\IOException' => $vendorDir . '/nette/utils/src/exceptions.php',
    '_PHPStan_dcc7b7cff\\Nette\\InvalidArgumentException' => $vendorDir . '/nette/utils/src/exceptions.php',
    '_PHPStan_dcc7b7cff\\Nette\\InvalidStateException' => $vendorDir . '/nette/utils/src/exceptions.php',
    '_PHPStan_dcc7b7cff\\Nette\\Iterators\\CachingIterator' => $vendorDir . '/nette/utils/src/Iterators/CachingIterator.php',
    '_PHPStan_dcc7b7cff\\Nette\\Iterators\\Mapper' => $vendorDir . '/nette/utils/src/Iterators/Mapper.php',
    '_PHPStan_dcc7b7cff\\Nette\\Loaders\\RobotLoader' => $vendorDir . '/nette/robot-loader/src/RobotLoader/RobotLoader.php',
    '_PHPStan_dcc7b7cff\\Nette\\Localization\\ITranslator' => $vendorDir . '/nette/utils/src/compatibility.php',
    '_PHPStan_dcc7b7cff\\Nette\\Localization\\Translator' => $vendorDir . '/nette/utils/src/Translator.php',
    '_PHPStan_dcc7b7cff\\Nette\\MemberAccessException' => $vendorDir . '/nette/utils/src/exceptions.php',
    '_PHPStan_dcc7b7cff\\Nette\\Neon\\Decoder' => $vendorDir . '/nette/neon/src/Neon/Decoder.php',
    '_PHPStan_dcc7b7cff\\Nette\\Neon\\Encoder' => $vendorDir . '/nette/neon/src/Neon/Encoder.php',
    '_PHPStan_dcc7b7cff\\Nette\\Neon\\Entity' => $vendorDir . '/nette/neon/src/Neon/Entity.php',
    '_PHPStan_dcc7b7cff\\Nette\\Neon\\Exception' => $vendorDir . '/nette/neon/src/Neon/Exception.php',
    '_PHPStan_dcc7b7cff\\Nette\\Neon\\Lexer' => $vendorDir . '/nette/neon/src/Neon/Lexer.php',
    '_PHPStan_dcc7b7cff\\Nette\\Neon\\Neon' => $vendorDir . '/nette/neon/src/Neon/Neon.php',
    '_PHPStan_dcc7b7cff\\Nette\\Neon\\Node' => $vendorDir . '/nette/neon/src/Neon/Node.php',
    '_PHPStan_dcc7b7cff\\Nette\\Neon\\Node\\ArrayItemNode' => $vendorDir . '/nette/neon/src/Neon/Node/ArrayItemNode.php',
    '_PHPStan_dcc7b7cff\\Nette\\Neon\\Node\\ArrayNode' => $vendorDir . '/nette/neon/src/Neon/Node/ArrayNode.php',
    '_PHPStan_dcc7b7cff\\Nette\\Neon\\Node\\BlockArrayNode' => $vendorDir . '/nette/neon/src/Neon/Node/BlockArrayNode.php',
    '_PHPStan_dcc7b7cff\\Nette\\Neon\\Node\\EntityChainNode' => $vendorDir . '/nette/neon/src/Neon/Node/EntityChainNode.php',
    '_PHPStan_dcc7b7cff\\Nette\\Neon\\Node\\EntityNode' => $vendorDir . '/nette/neon/src/Neon/Node/EntityNode.php',
    '_PHPStan_dcc7b7cff\\Nette\\Neon\\Node\\InlineArrayNode' => $vendorDir . '/nette/neon/src/Neon/Node/InlineArrayNode.php',
    '_PHPStan_dcc7b7cff\\Nette\\Neon\\Node\\LiteralNode' => $vendorDir . '/nette/neon/src/Neon/Node/LiteralNode.php',
    '_PHPStan_dcc7b7cff\\Nette\\Neon\\Node\\StringNode' => $vendorDir . '/nette/neon/src/Neon/Node/StringNode.php',
    '_PHPStan_dcc7b7cff\\Nette\\Neon\\Parser' => $vendorDir . '/nette/neon/src/Neon/Parser.php',
    '_PHPStan_dcc7b7cff\\Nette\\Neon\\Token' => $vendorDir . '/nette/neon/src/Neon/Token.php',
    '_PHPStan_dcc7b7cff\\Nette\\Neon\\TokenStream' => $vendorDir . '/nette/neon/src/Neon/TokenStream.php',
    '_PHPStan_dcc7b7cff\\Nette\\Neon\\Traverser' => $vendorDir . '/nette/neon/src/Neon/Traverser.php',
    '_PHPStan_dcc7b7cff\\Nette\\NotImplementedException' => $vendorDir . '/nette/utils/src/exceptions.php',
    '_PHPStan_dcc7b7cff\\Nette\\NotSupportedException' => $vendorDir . '/nette/utils/src/exceptions.php',
    '_PHPStan_dcc7b7cff\\Nette\\OutOfRangeException' => $vendorDir . '/nette/utils/src/exceptions.php',
    '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Attribute' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Attribute.php',
    '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\ClassType' => $vendorDir . '/nette/php-generator/src/PhpGenerator/ClassType.php',
    '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Closure' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Closure.php',
    '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Constant' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Constant.php',
    '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Dumper' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Dumper.php',
    '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\EnumCase' => $vendorDir . '/nette/php-generator/src/PhpGenerator/EnumCase.php',
    '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Extractor' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Extractor.php',
    '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Factory' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Factory.php',
    '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\GlobalFunction' => $vendorDir . '/nette/php-generator/src/PhpGenerator/GlobalFunction.php',
    '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Helpers' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Helpers.php',
    '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Literal' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Literal.php',
    '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Method' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Method.php',
    '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Parameter' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Parameter.php',
    '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\PhpFile' => $vendorDir . '/nette/php-generator/src/PhpGenerator/PhpFile.php',
    '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\PhpLiteral' => $vendorDir . '/nette/php-generator/src/PhpGenerator/PhpLiteral.php',
    '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\PhpNamespace' => $vendorDir . '/nette/php-generator/src/PhpGenerator/PhpNamespace.php',
    '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Printer' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Printer.php',
    '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\PromotedParameter' => $vendorDir . '/nette/php-generator/src/PhpGenerator/PromotedParameter.php',
    '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Property' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Property.php',
    '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\PsrPrinter' => $vendorDir . '/nette/php-generator/src/PhpGenerator/PsrPrinter.php',
    '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\TraitUse' => $vendorDir . '/nette/php-generator/src/PhpGenerator/TraitUse.php',
    '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Traits\\AttributeAware' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Traits/AttributeAware.php',
    '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Traits\\CommentAware' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Traits/CommentAware.php',
    '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Traits\\FunctionLike' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Traits/FunctionLike.php',
    '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Traits\\NameAware' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Traits/NameAware.php',
    '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Traits\\VisibilityAware' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Traits/VisibilityAware.php',
    '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Type' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Type.php',
    '_PHPStan_dcc7b7cff\\Nette\\Schema\\Context' => $vendorDir . '/nette/schema/src/Schema/Context.php',
    '_PHPStan_dcc7b7cff\\Nette\\Schema\\DynamicParameter' => $vendorDir . '/nette/schema/src/Schema/DynamicParameter.php',
    '_PHPStan_dcc7b7cff\\Nette\\Schema\\Elements\\AnyOf' => $vendorDir . '/nette/schema/src/Schema/Elements/AnyOf.php',
    '_PHPStan_dcc7b7cff\\Nette\\Schema\\Elements\\Base' => $vendorDir . '/nette/schema/src/Schema/Elements/Base.php',
    '_PHPStan_dcc7b7cff\\Nette\\Schema\\Elements\\Structure' => $vendorDir . '/nette/schema/src/Schema/Elements/Structure.php',
    '_PHPStan_dcc7b7cff\\Nette\\Schema\\Elements\\Type' => $vendorDir . '/nette/schema/src/Schema/Elements/Type.php',
    '_PHPStan_dcc7b7cff\\Nette\\Schema\\Expect' => $vendorDir . '/nette/schema/src/Schema/Expect.php',
    '_PHPStan_dcc7b7cff\\Nette\\Schema\\Helpers' => $vendorDir . '/nette/schema/src/Schema/Helpers.php',
    '_PHPStan_dcc7b7cff\\Nette\\Schema\\Message' => $vendorDir . '/nette/schema/src/Schema/Message.php',
    '_PHPStan_dcc7b7cff\\Nette\\Schema\\Processor' => $vendorDir . '/nette/schema/src/Schema/Processor.php',
    '_PHPStan_dcc7b7cff\\Nette\\Schema\\Schema' => $vendorDir . '/nette/schema/src/Schema/Schema.php',
    '_PHPStan_dcc7b7cff\\Nette\\Schema\\ValidationException' => $vendorDir . '/nette/schema/src/Schema/ValidationException.php',
    '_PHPStan_dcc7b7cff\\Nette\\SmartObject' => $vendorDir . '/nette/utils/src/SmartObject.php',
    '_PHPStan_dcc7b7cff\\Nette\\StaticClass' => $vendorDir . '/nette/utils/src/StaticClass.php',
    '_PHPStan_dcc7b7cff\\Nette\\UnexpectedValueException' => $vendorDir . '/nette/utils/src/exceptions.php',
    '_PHPStan_dcc7b7cff\\Nette\\Utils\\ArrayHash' => $vendorDir . '/nette/utils/src/Utils/ArrayHash.php',
    '_PHPStan_dcc7b7cff\\Nette\\Utils\\ArrayList' => $vendorDir . '/nette/utils/src/Utils/ArrayList.php',
    '_PHPStan_dcc7b7cff\\Nette\\Utils\\Arrays' => $vendorDir . '/nette/utils/src/Utils/Arrays.php',
    '_PHPStan_dcc7b7cff\\Nette\\Utils\\AssertionException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php',
    '_PHPStan_dcc7b7cff\\Nette\\Utils\\Callback' => $vendorDir . '/nette/utils/src/Utils/Callback.php',
    '_PHPStan_dcc7b7cff\\Nette\\Utils\\DateTime' => $vendorDir . '/nette/utils/src/Utils/DateTime.php',
    '_PHPStan_dcc7b7cff\\Nette\\Utils\\FileSystem' => $vendorDir . '/nette/utils/src/Utils/FileSystem.php',
    '_PHPStan_dcc7b7cff\\Nette\\Utils\\Finder' => $vendorDir . '/nette/finder/src/Utils/Finder.php',
    '_PHPStan_dcc7b7cff\\Nette\\Utils\\Floats' => $vendorDir . '/nette/utils/src/Utils/Floats.php',
    '_PHPStan_dcc7b7cff\\Nette\\Utils\\Helpers' => $vendorDir . '/nette/utils/src/Utils/Helpers.php',
    '_PHPStan_dcc7b7cff\\Nette\\Utils\\Html' => $vendorDir . '/nette/utils/src/Utils/Html.php',
    '_PHPStan_dcc7b7cff\\Nette\\Utils\\IHtmlString' => $vendorDir . '/nette/utils/src/compatibility.php',
    '_PHPStan_dcc7b7cff\\Nette\\Utils\\Image' => $vendorDir . '/nette/utils/src/Utils/Image.php',
    '_PHPStan_dcc7b7cff\\Nette\\Utils\\ImageException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php',
    '_PHPStan_dcc7b7cff\\Nette\\Utils\\Json' => $vendorDir . '/nette/utils/src/Utils/Json.php',
    '_PHPStan_dcc7b7cff\\Nette\\Utils\\JsonException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php',
    '_PHPStan_dcc7b7cff\\Nette\\Utils\\ObjectHelpers' => $vendorDir . '/nette/utils/src/Utils/ObjectHelpers.php',
    '_PHPStan_dcc7b7cff\\Nette\\Utils\\ObjectMixin' => $vendorDir . '/nette/utils/src/Utils/ObjectMixin.php',
    '_PHPStan_dcc7b7cff\\Nette\\Utils\\Paginator' => $vendorDir . '/nette/utils/src/Utils/Paginator.php',
    '_PHPStan_dcc7b7cff\\Nette\\Utils\\Random' => $vendorDir . '/nette/utils/src/Utils/Random.php',
    '_PHPStan_dcc7b7cff\\Nette\\Utils\\Reflection' => $vendorDir . '/nette/utils/src/Utils/Reflection.php',
    '_PHPStan_dcc7b7cff\\Nette\\Utils\\RegexpException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php',
    '_PHPStan_dcc7b7cff\\Nette\\Utils\\Strings' => $vendorDir . '/nette/utils/src/Utils/Strings.php',
    '_PHPStan_dcc7b7cff\\Nette\\Utils\\Type' => $vendorDir . '/nette/utils/src/Utils/Type.php',
    '_PHPStan_dcc7b7cff\\Nette\\Utils\\UnknownImageFileException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php',
    '_PHPStan_dcc7b7cff\\Nette\\Utils\\Validators' => $vendorDir . '/nette/utils/src/Utils/Validators.php',
    '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\CiDetector' => $vendorDir . '/ondram/ci-detector/src/CiDetector.php',
    '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\AbstractCi' => $vendorDir . '/ondram/ci-detector/src/Ci/AbstractCi.php',
    '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\AppVeyor' => $vendorDir . '/ondram/ci-detector/src/Ci/AppVeyor.php',
    '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\AwsCodeBuild' => $vendorDir . '/ondram/ci-detector/src/Ci/AwsCodeBuild.php',
    '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\Bamboo' => $vendorDir . '/ondram/ci-detector/src/Ci/Bamboo.php',
    '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\BitbucketPipelines' => $vendorDir . '/ondram/ci-detector/src/Ci/BitbucketPipelines.php',
    '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\Buddy' => $vendorDir . '/ondram/ci-detector/src/Ci/Buddy.php',
    '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\CiInterface' => $vendorDir . '/ondram/ci-detector/src/Ci/CiInterface.php',
    '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\Circle' => $vendorDir . '/ondram/ci-detector/src/Ci/Circle.php',
    '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\Codeship' => $vendorDir . '/ondram/ci-detector/src/Ci/Codeship.php',
    '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\Continuousphp' => $vendorDir . '/ondram/ci-detector/src/Ci/Continuousphp.php',
    '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\Drone' => $vendorDir . '/ondram/ci-detector/src/Ci/Drone.php',
    '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\GitHubActions' => $vendorDir . '/ondram/ci-detector/src/Ci/GitHubActions.php',
    '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\GitLab' => $vendorDir . '/ondram/ci-detector/src/Ci/GitLab.php',
    '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\Jenkins' => $vendorDir . '/ondram/ci-detector/src/Ci/Jenkins.php',
    '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\TeamCity' => $vendorDir . '/ondram/ci-detector/src/Ci/TeamCity.php',
    '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\Travis' => $vendorDir . '/ondram/ci-detector/src/Ci/Travis.php',
    '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\Wercker' => $vendorDir . '/ondram/ci-detector/src/Ci/Wercker.php',
    '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Env' => $vendorDir . '/ondram/ci-detector/src/Env.php',
    '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Exception\\CiNotDetectedException' => $vendorDir . '/ondram/ci-detector/src/Exception/CiNotDetectedException.php',
    '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\TrinaryLogic' => $vendorDir . '/ondram/ci-detector/src/TrinaryLogic.php',
    '_PHPStan_dcc7b7cff\\Psr\\Container\\ContainerExceptionInterface' => $vendorDir . '/psr/container/src/ContainerExceptionInterface.php',
    '_PHPStan_dcc7b7cff\\Psr\\Container\\ContainerInterface' => $vendorDir . '/psr/container/src/ContainerInterface.php',
    '_PHPStan_dcc7b7cff\\Psr\\Container\\NotFoundExceptionInterface' => $vendorDir . '/psr/container/src/NotFoundExceptionInterface.php',
    '_PHPStan_dcc7b7cff\\Psr\\Http\\Message\\MessageInterface' => $vendorDir . '/psr/http-message/src/MessageInterface.php',
    '_PHPStan_dcc7b7cff\\Psr\\Http\\Message\\RequestInterface' => $vendorDir . '/psr/http-message/src/RequestInterface.php',
    '_PHPStan_dcc7b7cff\\Psr\\Http\\Message\\ResponseInterface' => $vendorDir . '/psr/http-message/src/ResponseInterface.php',
    '_PHPStan_dcc7b7cff\\Psr\\Http\\Message\\ServerRequestInterface' => $vendorDir . '/psr/http-message/src/ServerRequestInterface.php',
    '_PHPStan_dcc7b7cff\\Psr\\Http\\Message\\StreamInterface' => $vendorDir . '/psr/http-message/src/StreamInterface.php',
    '_PHPStan_dcc7b7cff\\Psr\\Http\\Message\\UploadedFileInterface' => $vendorDir . '/psr/http-message/src/UploadedFileInterface.php',
    '_PHPStan_dcc7b7cff\\Psr\\Http\\Message\\UriInterface' => $vendorDir . '/psr/http-message/src/UriInterface.php',
    '_PHPStan_dcc7b7cff\\Psr\\Log\\AbstractLogger' => $vendorDir . '/psr/log/Psr/Log/AbstractLogger.php',
    '_PHPStan_dcc7b7cff\\Psr\\Log\\InvalidArgumentException' => $vendorDir . '/psr/log/Psr/Log/InvalidArgumentException.php',
    '_PHPStan_dcc7b7cff\\Psr\\Log\\LogLevel' => $vendorDir . '/psr/log/Psr/Log/LogLevel.php',
    '_PHPStan_dcc7b7cff\\Psr\\Log\\LoggerAwareInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerAwareInterface.php',
    '_PHPStan_dcc7b7cff\\Psr\\Log\\LoggerAwareTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerAwareTrait.php',
    '_PHPStan_dcc7b7cff\\Psr\\Log\\LoggerInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerInterface.php',
    '_PHPStan_dcc7b7cff\\Psr\\Log\\LoggerTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerTrait.php',
    '_PHPStan_dcc7b7cff\\Psr\\Log\\NullLogger' => $vendorDir . '/psr/log/Psr/Log/NullLogger.php',
    '_PHPStan_dcc7b7cff\\React\\Cache\\ArrayCache' => $vendorDir . '/react/cache/src/ArrayCache.php',
    '_PHPStan_dcc7b7cff\\React\\Cache\\CacheInterface' => $vendorDir . '/react/cache/src/CacheInterface.php',
    '_PHPStan_dcc7b7cff\\React\\ChildProcess\\Process' => $vendorDir . '/react/child-process/src/Process.php',
    '_PHPStan_dcc7b7cff\\React\\Dns\\BadServerException' => $vendorDir . '/react/dns/src/BadServerException.php',
    '_PHPStan_dcc7b7cff\\React\\Dns\\Config\\Config' => $vendorDir . '/react/dns/src/Config/Config.php',
    '_PHPStan_dcc7b7cff\\React\\Dns\\Config\\HostsFile' => $vendorDir . '/react/dns/src/Config/HostsFile.php',
    '_PHPStan_dcc7b7cff\\React\\Dns\\Model\\Message' => $vendorDir . '/react/dns/src/Model/Message.php',
    '_PHPStan_dcc7b7cff\\React\\Dns\\Model\\Record' => $vendorDir . '/react/dns/src/Model/Record.php',
    '_PHPStan_dcc7b7cff\\React\\Dns\\Protocol\\BinaryDumper' => $vendorDir . '/react/dns/src/Protocol/BinaryDumper.php',
    '_PHPStan_dcc7b7cff\\React\\Dns\\Protocol\\Parser' => $vendorDir . '/react/dns/src/Protocol/Parser.php',
    '_PHPStan_dcc7b7cff\\React\\Dns\\Query\\CachingExecutor' => $vendorDir . '/react/dns/src/Query/CachingExecutor.php',
    '_PHPStan_dcc7b7cff\\React\\Dns\\Query\\CancellationException' => $vendorDir . '/react/dns/src/Query/CancellationException.php',
    '_PHPStan_dcc7b7cff\\React\\Dns\\Query\\CoopExecutor' => $vendorDir . '/react/dns/src/Query/CoopExecutor.php',
    '_PHPStan_dcc7b7cff\\React\\Dns\\Query\\ExecutorInterface' => $vendorDir . '/react/dns/src/Query/ExecutorInterface.php',
    '_PHPStan_dcc7b7cff\\React\\Dns\\Query\\FallbackExecutor' => $vendorDir . '/react/dns/src/Query/FallbackExecutor.php',
    '_PHPStan_dcc7b7cff\\React\\Dns\\Query\\HostsFileExecutor' => $vendorDir . '/react/dns/src/Query/HostsFileExecutor.php',
    '_PHPStan_dcc7b7cff\\React\\Dns\\Query\\Query' => $vendorDir . '/react/dns/src/Query/Query.php',
    '_PHPStan_dcc7b7cff\\React\\Dns\\Query\\RetryExecutor' => $vendorDir . '/react/dns/src/Query/RetryExecutor.php',
    '_PHPStan_dcc7b7cff\\React\\Dns\\Query\\SelectiveTransportExecutor' => $vendorDir . '/react/dns/src/Query/SelectiveTransportExecutor.php',
    '_PHPStan_dcc7b7cff\\React\\Dns\\Query\\TcpTransportExecutor' => $vendorDir . '/react/dns/src/Query/TcpTransportExecutor.php',
    '_PHPStan_dcc7b7cff\\React\\Dns\\Query\\TimeoutException' => $vendorDir . '/react/dns/src/Query/TimeoutException.php',
    '_PHPStan_dcc7b7cff\\React\\Dns\\Query\\TimeoutExecutor' => $vendorDir . '/react/dns/src/Query/TimeoutExecutor.php',
    '_PHPStan_dcc7b7cff\\React\\Dns\\Query\\UdpTransportExecutor' => $vendorDir . '/react/dns/src/Query/UdpTransportExecutor.php',
    '_PHPStan_dcc7b7cff\\React\\Dns\\RecordNotFoundException' => $vendorDir . '/react/dns/src/RecordNotFoundException.php',
    '_PHPStan_dcc7b7cff\\React\\Dns\\Resolver\\Factory' => $vendorDir . '/react/dns/src/Resolver/Factory.php',
    '_PHPStan_dcc7b7cff\\React\\Dns\\Resolver\\Resolver' => $vendorDir . '/react/dns/src/Resolver/Resolver.php',
    '_PHPStan_dcc7b7cff\\React\\Dns\\Resolver\\ResolverInterface' => $vendorDir . '/react/dns/src/Resolver/ResolverInterface.php',
    '_PHPStan_dcc7b7cff\\React\\EventLoop\\ExtEvLoop' => $vendorDir . '/react/event-loop/src/ExtEvLoop.php',
    '_PHPStan_dcc7b7cff\\React\\EventLoop\\ExtEventLoop' => $vendorDir . '/react/event-loop/src/ExtEventLoop.php',
    '_PHPStan_dcc7b7cff\\React\\EventLoop\\ExtLibevLoop' => $vendorDir . '/react/event-loop/src/ExtLibevLoop.php',
    '_PHPStan_dcc7b7cff\\React\\EventLoop\\ExtLibeventLoop' => $vendorDir . '/react/event-loop/src/ExtLibeventLoop.php',
    '_PHPStan_dcc7b7cff\\React\\EventLoop\\ExtUvLoop' => $vendorDir . '/react/event-loop/src/ExtUvLoop.php',
    '_PHPStan_dcc7b7cff\\React\\EventLoop\\Factory' => $vendorDir . '/react/event-loop/src/Factory.php',
    '_PHPStan_dcc7b7cff\\React\\EventLoop\\Loop' => $vendorDir . '/react/event-loop/src/Loop.php',
    '_PHPStan_dcc7b7cff\\React\\EventLoop\\LoopInterface' => $vendorDir . '/react/event-loop/src/LoopInterface.php',
    '_PHPStan_dcc7b7cff\\React\\EventLoop\\SignalsHandler' => $vendorDir . '/react/event-loop/src/SignalsHandler.php',
    '_PHPStan_dcc7b7cff\\React\\EventLoop\\StreamSelectLoop' => $vendorDir . '/react/event-loop/src/StreamSelectLoop.php',
    '_PHPStan_dcc7b7cff\\React\\EventLoop\\Tick\\FutureTickQueue' => $vendorDir . '/react/event-loop/src/Tick/FutureTickQueue.php',
    '_PHPStan_dcc7b7cff\\React\\EventLoop\\TimerInterface' => $vendorDir . '/react/event-loop/src/TimerInterface.php',
    '_PHPStan_dcc7b7cff\\React\\EventLoop\\Timer\\Timer' => $vendorDir . '/react/event-loop/src/Timer/Timer.php',
    '_PHPStan_dcc7b7cff\\React\\EventLoop\\Timer\\Timers' => $vendorDir . '/react/event-loop/src/Timer/Timers.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Browser' => $vendorDir . '/react/http/src/Browser.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Client\\Client' => $vendorDir . '/react/http/src/Client/Client.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\HttpServer' => $vendorDir . '/react/http/src/HttpServer.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Io\\BufferedBody' => $vendorDir . '/react/http/src/Io/BufferedBody.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Io\\ChunkedDecoder' => $vendorDir . '/react/http/src/Io/ChunkedDecoder.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Io\\ChunkedEncoder' => $vendorDir . '/react/http/src/Io/ChunkedEncoder.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Io\\ClientConnectionManager' => $vendorDir . '/react/http/src/Io/ClientConnectionManager.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Io\\ClientRequestState' => $vendorDir . '/react/http/src/Io/ClientRequestState.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Io\\ClientRequestStream' => $vendorDir . '/react/http/src/Io/ClientRequestStream.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Io\\Clock' => $vendorDir . '/react/http/src/Io/Clock.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Io\\CloseProtectionStream' => $vendorDir . '/react/http/src/Io/CloseProtectionStream.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Io\\EmptyBodyStream' => $vendorDir . '/react/http/src/Io/EmptyBodyStream.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Io\\HttpBodyStream' => $vendorDir . '/react/http/src/Io/HttpBodyStream.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Io\\IniUtil' => $vendorDir . '/react/http/src/Io/IniUtil.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Io\\LengthLimitedStream' => $vendorDir . '/react/http/src/Io/LengthLimitedStream.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Io\\MiddlewareRunner' => $vendorDir . '/react/http/src/Io/MiddlewareRunner.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Io\\MultipartParser' => $vendorDir . '/react/http/src/Io/MultipartParser.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Io\\PauseBufferStream' => $vendorDir . '/react/http/src/Io/PauseBufferStream.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Io\\ReadableBodyStream' => $vendorDir . '/react/http/src/Io/ReadableBodyStream.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Io\\RequestHeaderParser' => $vendorDir . '/react/http/src/Io/RequestHeaderParser.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Io\\Sender' => $vendorDir . '/react/http/src/Io/Sender.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Io\\StreamingServer' => $vendorDir . '/react/http/src/Io/StreamingServer.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Io\\Transaction' => $vendorDir . '/react/http/src/Io/Transaction.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Io\\UploadedFile' => $vendorDir . '/react/http/src/Io/UploadedFile.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Message\\Request' => $vendorDir . '/react/http/src/Message/Request.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Message\\Response' => $vendorDir . '/react/http/src/Message/Response.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Message\\ResponseException' => $vendorDir . '/react/http/src/Message/ResponseException.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Message\\ServerRequest' => $vendorDir . '/react/http/src/Message/ServerRequest.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Middleware\\LimitConcurrentRequestsMiddleware' => $vendorDir . '/react/http/src/Middleware/LimitConcurrentRequestsMiddleware.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Middleware\\RequestBodyBufferMiddleware' => $vendorDir . '/react/http/src/Middleware/RequestBodyBufferMiddleware.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Middleware\\RequestBodyParserMiddleware' => $vendorDir . '/react/http/src/Middleware/RequestBodyParserMiddleware.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Middleware\\StreamingRequestMiddleware' => $vendorDir . '/react/http/src/Middleware/StreamingRequestMiddleware.php',
    '_PHPStan_dcc7b7cff\\React\\Http\\Server' => $vendorDir . '/react/http/src/Server.php',
    '_PHPStan_dcc7b7cff\\React\\Promise\\CancellablePromiseInterface' => $vendorDir . '/react/promise/src/CancellablePromiseInterface.php',
    '_PHPStan_dcc7b7cff\\React\\Promise\\CancellationQueue' => $vendorDir . '/react/promise/src/CancellationQueue.php',
    '_PHPStan_dcc7b7cff\\React\\Promise\\Deferred' => $vendorDir . '/react/promise/src/Deferred.php',
    '_PHPStan_dcc7b7cff\\React\\Promise\\Exception\\LengthException' => $vendorDir . '/react/promise/src/Exception/LengthException.php',
    '_PHPStan_dcc7b7cff\\React\\Promise\\ExtendedPromiseInterface' => $vendorDir . '/react/promise/src/ExtendedPromiseInterface.php',
    '_PHPStan_dcc7b7cff\\React\\Promise\\FulfilledPromise' => $vendorDir . '/react/promise/src/FulfilledPromise.php',
    '_PHPStan_dcc7b7cff\\React\\Promise\\LazyPromise' => $vendorDir . '/react/promise/src/LazyPromise.php',
    '_PHPStan_dcc7b7cff\\React\\Promise\\Promise' => $vendorDir . '/react/promise/src/Promise.php',
    '_PHPStan_dcc7b7cff\\React\\Promise\\PromiseInterface' => $vendorDir . '/react/promise/src/PromiseInterface.php',
    '_PHPStan_dcc7b7cff\\React\\Promise\\PromisorInterface' => $vendorDir . '/react/promise/src/PromisorInterface.php',
    '_PHPStan_dcc7b7cff\\React\\Promise\\RejectedPromise' => $vendorDir . '/react/promise/src/RejectedPromise.php',
    '_PHPStan_dcc7b7cff\\React\\Promise\\Timer\\TimeoutException' => $vendorDir . '/react/promise-timer/src/TimeoutException.php',
    '_PHPStan_dcc7b7cff\\React\\Promise\\UnhandledRejectionException' => $vendorDir . '/react/promise/src/UnhandledRejectionException.php',
    '_PHPStan_dcc7b7cff\\React\\Socket\\Connection' => $vendorDir . '/react/socket/src/Connection.php',
    '_PHPStan_dcc7b7cff\\React\\Socket\\ConnectionInterface' => $vendorDir . '/react/socket/src/ConnectionInterface.php',
    '_PHPStan_dcc7b7cff\\React\\Socket\\Connector' => $vendorDir . '/react/socket/src/Connector.php',
    '_PHPStan_dcc7b7cff\\React\\Socket\\ConnectorInterface' => $vendorDir . '/react/socket/src/ConnectorInterface.php',
    '_PHPStan_dcc7b7cff\\React\\Socket\\DnsConnector' => $vendorDir . '/react/socket/src/DnsConnector.php',
    '_PHPStan_dcc7b7cff\\React\\Socket\\FdServer' => $vendorDir . '/react/socket/src/FdServer.php',
    '_PHPStan_dcc7b7cff\\React\\Socket\\FixedUriConnector' => $vendorDir . '/react/socket/src/FixedUriConnector.php',
    '_PHPStan_dcc7b7cff\\React\\Socket\\HappyEyeBallsConnectionBuilder' => $vendorDir . '/react/socket/src/HappyEyeBallsConnectionBuilder.php',
    '_PHPStan_dcc7b7cff\\React\\Socket\\HappyEyeBallsConnector' => $vendorDir . '/react/socket/src/HappyEyeBallsConnector.php',
    '_PHPStan_dcc7b7cff\\React\\Socket\\LimitingServer' => $vendorDir . '/react/socket/src/LimitingServer.php',
    '_PHPStan_dcc7b7cff\\React\\Socket\\SecureConnector' => $vendorDir . '/react/socket/src/SecureConnector.php',
    '_PHPStan_dcc7b7cff\\React\\Socket\\SecureServer' => $vendorDir . '/react/socket/src/SecureServer.php',
    '_PHPStan_dcc7b7cff\\React\\Socket\\Server' => $vendorDir . '/react/socket/src/Server.php',
    '_PHPStan_dcc7b7cff\\React\\Socket\\ServerInterface' => $vendorDir . '/react/socket/src/ServerInterface.php',
    '_PHPStan_dcc7b7cff\\React\\Socket\\SocketServer' => $vendorDir . '/react/socket/src/SocketServer.php',
    '_PHPStan_dcc7b7cff\\React\\Socket\\StreamEncryption' => $vendorDir . '/react/socket/src/StreamEncryption.php',
    '_PHPStan_dcc7b7cff\\React\\Socket\\TcpConnector' => $vendorDir . '/react/socket/src/TcpConnector.php',
    '_PHPStan_dcc7b7cff\\React\\Socket\\TcpServer' => $vendorDir . '/react/socket/src/TcpServer.php',
    '_PHPStan_dcc7b7cff\\React\\Socket\\TimeoutConnector' => $vendorDir . '/react/socket/src/TimeoutConnector.php',
    '_PHPStan_dcc7b7cff\\React\\Socket\\UnixConnector' => $vendorDir . '/react/socket/src/UnixConnector.php',
    '_PHPStan_dcc7b7cff\\React\\Socket\\UnixServer' => $vendorDir . '/react/socket/src/UnixServer.php',
    '_PHPStan_dcc7b7cff\\React\\Stream\\CompositeStream' => $vendorDir . '/react/stream/src/CompositeStream.php',
    '_PHPStan_dcc7b7cff\\React\\Stream\\DuplexResourceStream' => $vendorDir . '/react/stream/src/DuplexResourceStream.php',
    '_PHPStan_dcc7b7cff\\React\\Stream\\DuplexStreamInterface' => $vendorDir . '/react/stream/src/DuplexStreamInterface.php',
    '_PHPStan_dcc7b7cff\\React\\Stream\\ReadableResourceStream' => $vendorDir . '/react/stream/src/ReadableResourceStream.php',
    '_PHPStan_dcc7b7cff\\React\\Stream\\ReadableStreamInterface' => $vendorDir . '/react/stream/src/ReadableStreamInterface.php',
    '_PHPStan_dcc7b7cff\\React\\Stream\\ThroughStream' => $vendorDir . '/react/stream/src/ThroughStream.php',
    '_PHPStan_dcc7b7cff\\React\\Stream\\Util' => $vendorDir . '/react/stream/src/Util.php',
    '_PHPStan_dcc7b7cff\\React\\Stream\\WritableResourceStream' => $vendorDir . '/react/stream/src/WritableResourceStream.php',
    '_PHPStan_dcc7b7cff\\React\\Stream\\WritableStreamInterface' => $vendorDir . '/react/stream/src/WritableStreamInterface.php',
    '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\AppendStream' => $vendorDir . '/ringcentral/psr7/src/AppendStream.php',
    '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\BufferStream' => $vendorDir . '/ringcentral/psr7/src/BufferStream.php',
    '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\CachingStream' => $vendorDir . '/ringcentral/psr7/src/CachingStream.php',
    '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\DroppingStream' => $vendorDir . '/ringcentral/psr7/src/DroppingStream.php',
    '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\FnStream' => $vendorDir . '/ringcentral/psr7/src/FnStream.php',
    '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\InflateStream' => $vendorDir . '/ringcentral/psr7/src/InflateStream.php',
    '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\LazyOpenStream' => $vendorDir . '/ringcentral/psr7/src/LazyOpenStream.php',
    '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\LimitStream' => $vendorDir . '/ringcentral/psr7/src/LimitStream.php',
    '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\MessageTrait' => $vendorDir . '/ringcentral/psr7/src/MessageTrait.php',
    '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\MultipartStream' => $vendorDir . '/ringcentral/psr7/src/MultipartStream.php',
    '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\NoSeekStream' => $vendorDir . '/ringcentral/psr7/src/NoSeekStream.php',
    '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\PumpStream' => $vendorDir . '/ringcentral/psr7/src/PumpStream.php',
    '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\Request' => $vendorDir . '/ringcentral/psr7/src/Request.php',
    '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\Response' => $vendorDir . '/ringcentral/psr7/src/Response.php',
    '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\ServerRequest' => $vendorDir . '/ringcentral/psr7/src/ServerRequest.php',
    '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\Stream' => $vendorDir . '/ringcentral/psr7/src/Stream.php',
    '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\StreamDecoratorTrait' => $vendorDir . '/ringcentral/psr7/src/StreamDecoratorTrait.php',
    '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\StreamWrapper' => $vendorDir . '/ringcentral/psr7/src/StreamWrapper.php',
    '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\Uri' => $vendorDir . '/ringcentral/psr7/src/Uri.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Application' => $vendorDir . '/symfony/console/Application.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Attribute\\AsCommand' => $vendorDir . '/symfony/console/Attribute/AsCommand.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\CI\\GithubActionReporter' => $vendorDir . '/symfony/console/CI/GithubActionReporter.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Color' => $vendorDir . '/symfony/console/Color.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\CommandLoader\\CommandLoaderInterface' => $vendorDir . '/symfony/console/CommandLoader/CommandLoaderInterface.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\CommandLoader\\ContainerCommandLoader' => $vendorDir . '/symfony/console/CommandLoader/ContainerCommandLoader.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\CommandLoader\\FactoryCommandLoader' => $vendorDir . '/symfony/console/CommandLoader/FactoryCommandLoader.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Command\\Command' => $vendorDir . '/symfony/console/Command/Command.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Command\\CompleteCommand' => $vendorDir . '/symfony/console/Command/CompleteCommand.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Command\\DumpCompletionCommand' => $vendorDir . '/symfony/console/Command/DumpCompletionCommand.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Command\\HelpCommand' => $vendorDir . '/symfony/console/Command/HelpCommand.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Command\\LazyCommand' => $vendorDir . '/symfony/console/Command/LazyCommand.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Command\\ListCommand' => $vendorDir . '/symfony/console/Command/ListCommand.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Command\\LockableTrait' => $vendorDir . '/symfony/console/Command/LockableTrait.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Command\\SignalableCommandInterface' => $vendorDir . '/symfony/console/Command/SignalableCommandInterface.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Completion\\CompletionInput' => $vendorDir . '/symfony/console/Completion/CompletionInput.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Completion\\CompletionSuggestions' => $vendorDir . '/symfony/console/Completion/CompletionSuggestions.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Completion\\Output\\BashCompletionOutput' => $vendorDir . '/symfony/console/Completion/Output/BashCompletionOutput.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Completion\\Output\\CompletionOutputInterface' => $vendorDir . '/symfony/console/Completion/Output/CompletionOutputInterface.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Completion\\Suggestion' => $vendorDir . '/symfony/console/Completion/Suggestion.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\ConsoleEvents' => $vendorDir . '/symfony/console/ConsoleEvents.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Cursor' => $vendorDir . '/symfony/console/Cursor.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\DependencyInjection\\AddConsoleCommandPass' => $vendorDir . '/symfony/console/DependencyInjection/AddConsoleCommandPass.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Descriptor\\ApplicationDescription' => $vendorDir . '/symfony/console/Descriptor/ApplicationDescription.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Descriptor\\Descriptor' => $vendorDir . '/symfony/console/Descriptor/Descriptor.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Descriptor\\DescriptorInterface' => $vendorDir . '/symfony/console/Descriptor/DescriptorInterface.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Descriptor\\JsonDescriptor' => $vendorDir . '/symfony/console/Descriptor/JsonDescriptor.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Descriptor\\MarkdownDescriptor' => $vendorDir . '/symfony/console/Descriptor/MarkdownDescriptor.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Descriptor\\TextDescriptor' => $vendorDir . '/symfony/console/Descriptor/TextDescriptor.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Descriptor\\XmlDescriptor' => $vendorDir . '/symfony/console/Descriptor/XmlDescriptor.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\EventListener\\ErrorListener' => $vendorDir . '/symfony/console/EventListener/ErrorListener.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Event\\ConsoleCommandEvent' => $vendorDir . '/symfony/console/Event/ConsoleCommandEvent.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Event\\ConsoleErrorEvent' => $vendorDir . '/symfony/console/Event/ConsoleErrorEvent.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Event\\ConsoleEvent' => $vendorDir . '/symfony/console/Event/ConsoleEvent.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Event\\ConsoleSignalEvent' => $vendorDir . '/symfony/console/Event/ConsoleSignalEvent.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Event\\ConsoleTerminateEvent' => $vendorDir . '/symfony/console/Event/ConsoleTerminateEvent.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Exception\\CommandNotFoundException' => $vendorDir . '/symfony/console/Exception/CommandNotFoundException.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/console/Exception/ExceptionInterface.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/console/Exception/InvalidArgumentException.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Exception\\InvalidOptionException' => $vendorDir . '/symfony/console/Exception/InvalidOptionException.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Exception\\LogicException' => $vendorDir . '/symfony/console/Exception/LogicException.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Exception\\MissingInputException' => $vendorDir . '/symfony/console/Exception/MissingInputException.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Exception\\NamespaceNotFoundException' => $vendorDir . '/symfony/console/Exception/NamespaceNotFoundException.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Exception\\RuntimeException' => $vendorDir . '/symfony/console/Exception/RuntimeException.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Formatter\\NullOutputFormatter' => $vendorDir . '/symfony/console/Formatter/NullOutputFormatter.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Formatter\\NullOutputFormatterStyle' => $vendorDir . '/symfony/console/Formatter/NullOutputFormatterStyle.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Formatter\\OutputFormatter' => $vendorDir . '/symfony/console/Formatter/OutputFormatter.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Formatter\\OutputFormatterInterface' => $vendorDir . '/symfony/console/Formatter/OutputFormatterInterface.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Formatter\\OutputFormatterStyle' => $vendorDir . '/symfony/console/Formatter/OutputFormatterStyle.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Formatter\\OutputFormatterStyleInterface' => $vendorDir . '/symfony/console/Formatter/OutputFormatterStyleInterface.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Formatter\\OutputFormatterStyleStack' => $vendorDir . '/symfony/console/Formatter/OutputFormatterStyleStack.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Formatter\\WrappableOutputFormatterInterface' => $vendorDir . '/symfony/console/Formatter/WrappableOutputFormatterInterface.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\DebugFormatterHelper' => $vendorDir . '/symfony/console/Helper/DebugFormatterHelper.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\DescriptorHelper' => $vendorDir . '/symfony/console/Helper/DescriptorHelper.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\Dumper' => $vendorDir . '/symfony/console/Helper/Dumper.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\FormatterHelper' => $vendorDir . '/symfony/console/Helper/FormatterHelper.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\Helper' => $vendorDir . '/symfony/console/Helper/Helper.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\HelperInterface' => $vendorDir . '/symfony/console/Helper/HelperInterface.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\HelperSet' => $vendorDir . '/symfony/console/Helper/HelperSet.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\InputAwareHelper' => $vendorDir . '/symfony/console/Helper/InputAwareHelper.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\ProcessHelper' => $vendorDir . '/symfony/console/Helper/ProcessHelper.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\ProgressBar' => $vendorDir . '/symfony/console/Helper/ProgressBar.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\ProgressIndicator' => $vendorDir . '/symfony/console/Helper/ProgressIndicator.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\QuestionHelper' => $vendorDir . '/symfony/console/Helper/QuestionHelper.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\SymfonyQuestionHelper' => $vendorDir . '/symfony/console/Helper/SymfonyQuestionHelper.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\Table' => $vendorDir . '/symfony/console/Helper/Table.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\TableCell' => $vendorDir . '/symfony/console/Helper/TableCell.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\TableCellStyle' => $vendorDir . '/symfony/console/Helper/TableCellStyle.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\TableRows' => $vendorDir . '/symfony/console/Helper/TableRows.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\TableSeparator' => $vendorDir . '/symfony/console/Helper/TableSeparator.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\TableStyle' => $vendorDir . '/symfony/console/Helper/TableStyle.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Input\\ArgvInput' => $vendorDir . '/symfony/console/Input/ArgvInput.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Input\\ArrayInput' => $vendorDir . '/symfony/console/Input/ArrayInput.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Input\\Input' => $vendorDir . '/symfony/console/Input/Input.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Input\\InputArgument' => $vendorDir . '/symfony/console/Input/InputArgument.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Input\\InputAwareInterface' => $vendorDir . '/symfony/console/Input/InputAwareInterface.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Input\\InputDefinition' => $vendorDir . '/symfony/console/Input/InputDefinition.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Input\\InputInterface' => $vendorDir . '/symfony/console/Input/InputInterface.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Input\\InputOption' => $vendorDir . '/symfony/console/Input/InputOption.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Input\\StreamableInputInterface' => $vendorDir . '/symfony/console/Input/StreamableInputInterface.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Input\\StringInput' => $vendorDir . '/symfony/console/Input/StringInput.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Logger\\ConsoleLogger' => $vendorDir . '/symfony/console/Logger/ConsoleLogger.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Output\\BufferedOutput' => $vendorDir . '/symfony/console/Output/BufferedOutput.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Output\\ConsoleOutput' => $vendorDir . '/symfony/console/Output/ConsoleOutput.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Output\\ConsoleOutputInterface' => $vendorDir . '/symfony/console/Output/ConsoleOutputInterface.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Output\\ConsoleSectionOutput' => $vendorDir . '/symfony/console/Output/ConsoleSectionOutput.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Output\\NullOutput' => $vendorDir . '/symfony/console/Output/NullOutput.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Output\\Output' => $vendorDir . '/symfony/console/Output/Output.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Output\\OutputInterface' => $vendorDir . '/symfony/console/Output/OutputInterface.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Output\\StreamOutput' => $vendorDir . '/symfony/console/Output/StreamOutput.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Output\\TrimmedBufferOutput' => $vendorDir . '/symfony/console/Output/TrimmedBufferOutput.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Question\\ChoiceQuestion' => $vendorDir . '/symfony/console/Question/ChoiceQuestion.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Question\\ConfirmationQuestion' => $vendorDir . '/symfony/console/Question/ConfirmationQuestion.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Question\\Question' => $vendorDir . '/symfony/console/Question/Question.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\SignalRegistry\\SignalRegistry' => $vendorDir . '/symfony/console/SignalRegistry/SignalRegistry.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\SingleCommandApplication' => $vendorDir . '/symfony/console/SingleCommandApplication.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Style\\OutputStyle' => $vendorDir . '/symfony/console/Style/OutputStyle.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Style\\StyleInterface' => $vendorDir . '/symfony/console/Style/StyleInterface.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Style\\SymfonyStyle' => $vendorDir . '/symfony/console/Style/SymfonyStyle.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Terminal' => $vendorDir . '/symfony/console/Terminal.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Tester\\ApplicationTester' => $vendorDir . '/symfony/console/Tester/ApplicationTester.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Tester\\CommandCompletionTester' => $vendorDir . '/symfony/console/Tester/CommandCompletionTester.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Tester\\CommandTester' => $vendorDir . '/symfony/console/Tester/CommandTester.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Tester\\Constraint\\CommandIsSuccessful' => $vendorDir . '/symfony/console/Tester/Constraint/CommandIsSuccessful.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Tester\\TesterTrait' => $vendorDir . '/symfony/console/Tester/TesterTrait.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Comparator\\Comparator' => $vendorDir . '/symfony/finder/Comparator/Comparator.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Comparator\\DateComparator' => $vendorDir . '/symfony/finder/Comparator/DateComparator.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Comparator\\NumberComparator' => $vendorDir . '/symfony/finder/Comparator/NumberComparator.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Exception\\AccessDeniedException' => $vendorDir . '/symfony/finder/Exception/AccessDeniedException.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Exception\\DirectoryNotFoundException' => $vendorDir . '/symfony/finder/Exception/DirectoryNotFoundException.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Finder' => $vendorDir . '/symfony/finder/Finder.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Gitignore' => $vendorDir . '/symfony/finder/Gitignore.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Glob' => $vendorDir . '/symfony/finder/Glob.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\CustomFilterIterator' => $vendorDir . '/symfony/finder/Iterator/CustomFilterIterator.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\DateRangeFilterIterator' => $vendorDir . '/symfony/finder/Iterator/DateRangeFilterIterator.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\DepthRangeFilterIterator' => $vendorDir . '/symfony/finder/Iterator/DepthRangeFilterIterator.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\ExcludeDirectoryFilterIterator' => $vendorDir . '/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\FileTypeFilterIterator' => $vendorDir . '/symfony/finder/Iterator/FileTypeFilterIterator.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\FilecontentFilterIterator' => $vendorDir . '/symfony/finder/Iterator/FilecontentFilterIterator.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\FilenameFilterIterator' => $vendorDir . '/symfony/finder/Iterator/FilenameFilterIterator.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\LazyIterator' => $vendorDir . '/symfony/finder/Iterator/LazyIterator.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\MultiplePcreFilterIterator' => $vendorDir . '/symfony/finder/Iterator/MultiplePcreFilterIterator.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\PathFilterIterator' => $vendorDir . '/symfony/finder/Iterator/PathFilterIterator.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\RecursiveDirectoryIterator' => $vendorDir . '/symfony/finder/Iterator/RecursiveDirectoryIterator.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\SizeRangeFilterIterator' => $vendorDir . '/symfony/finder/Iterator/SizeRangeFilterIterator.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\SortableIterator' => $vendorDir . '/symfony/finder/Iterator/SortableIterator.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\VcsIgnoredFilterIterator' => $vendorDir . '/symfony/finder/Iterator/VcsIgnoredFilterIterator.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\SplFileInfo' => $vendorDir . '/symfony/finder/SplFileInfo.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/process/Exception/ExceptionInterface.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/process/Exception/InvalidArgumentException.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\Exception\\LogicException' => $vendorDir . '/symfony/process/Exception/LogicException.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\Exception\\ProcessFailedException' => $vendorDir . '/symfony/process/Exception/ProcessFailedException.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\Exception\\ProcessSignaledException' => $vendorDir . '/symfony/process/Exception/ProcessSignaledException.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\Exception\\ProcessTimedOutException' => $vendorDir . '/symfony/process/Exception/ProcessTimedOutException.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\Exception\\RuntimeException' => $vendorDir . '/symfony/process/Exception/RuntimeException.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\ExecutableFinder' => $vendorDir . '/symfony/process/ExecutableFinder.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\InputStream' => $vendorDir . '/symfony/process/InputStream.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\PhpExecutableFinder' => $vendorDir . '/symfony/process/PhpExecutableFinder.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\PhpProcess' => $vendorDir . '/symfony/process/PhpProcess.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\Pipes\\AbstractPipes' => $vendorDir . '/symfony/process/Pipes/AbstractPipes.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\Pipes\\PipesInterface' => $vendorDir . '/symfony/process/Pipes/PipesInterface.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\Pipes\\UnixPipes' => $vendorDir . '/symfony/process/Pipes/UnixPipes.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\Pipes\\WindowsPipes' => $vendorDir . '/symfony/process/Pipes/WindowsPipes.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\Process' => $vendorDir . '/symfony/process/Process.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\ProcessUtils' => $vendorDir . '/symfony/process/ProcessUtils.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\AbstractString' => $vendorDir . '/symfony/string/AbstractString.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\AbstractUnicodeString' => $vendorDir . '/symfony/string/AbstractUnicodeString.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\ByteString' => $vendorDir . '/symfony/string/ByteString.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\CodePointString' => $vendorDir . '/symfony/string/CodePointString.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/string/Exception/ExceptionInterface.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/string/Exception/InvalidArgumentException.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\Exception\\RuntimeException' => $vendorDir . '/symfony/string/Exception/RuntimeException.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\Inflector\\EnglishInflector' => $vendorDir . '/symfony/string/Inflector/EnglishInflector.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\Inflector\\FrenchInflector' => $vendorDir . '/symfony/string/Inflector/FrenchInflector.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\Inflector\\InflectorInterface' => $vendorDir . '/symfony/string/Inflector/InflectorInterface.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\LazyString' => $vendorDir . '/symfony/string/LazyString.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\Slugger\\AsciiSlugger' => $vendorDir . '/symfony/string/Slugger/AsciiSlugger.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\Slugger\\SluggerInterface' => $vendorDir . '/symfony/string/Slugger/SluggerInterface.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\UnicodeString' => $vendorDir . '/symfony/string/UnicodeString.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Contracts\\Service\\Attribute\\Required' => $vendorDir . '/symfony/service-contracts/Attribute/Required.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Contracts\\Service\\Attribute\\SubscribedService' => $vendorDir . '/symfony/service-contracts/Attribute/SubscribedService.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Contracts\\Service\\ResetInterface' => $vendorDir . '/symfony/service-contracts/ResetInterface.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Contracts\\Service\\ServiceLocatorTrait' => $vendorDir . '/symfony/service-contracts/ServiceLocatorTrait.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Contracts\\Service\\ServiceProviderInterface' => $vendorDir . '/symfony/service-contracts/ServiceProviderInterface.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => $vendorDir . '/symfony/service-contracts/ServiceSubscriberInterface.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => $vendorDir . '/symfony/service-contracts/ServiceSubscriberTrait.php',
    '_PHPStan_dcc7b7cff\\Symfony\\Polyfill\\Ctype\\Ctype' => $vendorDir . '/symfony/polyfill-ctype/Ctype.php',
);
<?php

/*
 * This file is part of Composer.
 *
 * (c) Nils Adermann <naderman@naderman.de>
 *     Jordi Boggiano <j.boggiano@seld.be>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Composer\Autoload;

/**
 * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
 *
 *     $loader = new \Composer\Autoload\ClassLoader();
 *
 *     // register classes with namespaces
 *     $loader->add('Symfony\Component', __DIR__.'/component');
 *     $loader->add('Symfony',           __DIR__.'/framework');
 *
 *     // activate the autoloader
 *     $loader->register();
 *
 *     // to enable searching the include path (eg. for PEAR packages)
 *     $loader->setUseIncludePath(true);
 *
 * In this example, if you try to use a class in the Symfony\Component
 * namespace or one of its children (Symfony\Component\Console for instance),
 * the autoloader will first look for the class under the component/
 * directory, and it will then fallback to the framework/ directory if not
 * found before giving up.
 *
 * This class is loosely based on the Symfony UniversalClassLoader.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 * @author Jordi Boggiano <j.boggiano@seld.be>
 * @see    https://www.php-fig.org/psr/psr-0/
 * @see    https://www.php-fig.org/psr/psr-4/
 */
class ClassLoader
{
    /** @var \Closure(string):void */
    private static $includeFile;

    /** @var ?string */
    private $vendorDir;

    // PSR-4
    /**
     * @var array[]
     * @psalm-var array<string, array<string, int>>
     */
    private $prefixLengthsPsr4 = array();
    /**
     * @var array[]
     * @psalm-var array<string, array<int, string>>
     */
    private $prefixDirsPsr4 = array();
    /**
     * @var array[]
     * @psalm-var array<string, string>
     */
    private $fallbackDirsPsr4 = array();

    // PSR-0
    /**
     * @var array[]
     * @psalm-var array<string, array<string, string[]>>
     */
    private $prefixesPsr0 = array();
    /**
     * @var array[]
     * @psalm-var array<string, string>
     */
    private $fallbackDirsPsr0 = array();

    /** @var bool */
    private $useIncludePath = false;

    /**
     * @var string[]
     * @psalm-var array<string, string>
     */
    private $classMap = array();

    /** @var bool */
    private $classMapAuthoritative = false;

    /**
     * @var bool[]
     * @psalm-var array<string, bool>
     */
    private $missingClasses = array();

    /** @var ?string */
    private $apcuPrefix;

    /**
     * @var self[]
     */
    private static $registeredLoaders = array();

    /**
     * @param ?string $vendorDir
     */
    public function __construct($vendorDir = null)
    {
        $this->vendorDir = $vendorDir;
        self::initializeIncludeClosure();
    }

    /**
     * @return string[]
     */
    public function getPrefixes()
    {
        if (!empty($this->prefixesPsr0)) {
            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
        }

        return array();
    }

    /**
     * @return array[]
     * @psalm-return array<string, array<int, string>>
     */
    public function getPrefixesPsr4()
    {
        return $this->prefixDirsPsr4;
    }

    /**
     * @return array[]
     * @psalm-return array<string, string>
     */
    public function getFallbackDirs()
    {
        return $this->fallbackDirsPsr0;
    }

    /**
     * @return array[]
     * @psalm-return array<string, string>
     */
    public function getFallbackDirsPsr4()
    {
        return $this->fallbackDirsPsr4;
    }

    /**
     * @return string[] Array of classname => path
     * @psalm-return array<string, string>
     */
    public function getClassMap()
    {
        return $this->classMap;
    }

    /**
     * @param string[] $classMap Class to filename map
     * @psalm-param array<string, string> $classMap
     *
     * @return void
     */
    public function addClassMap(array $classMap)
    {
        if ($this->classMap) {
            $this->classMap = array_merge($this->classMap, $classMap);
        } else {
            $this->classMap = $classMap;
        }
    }

    /**
     * Registers a set of PSR-0 directories for a given prefix, either
     * appending or prepending to the ones previously set for this prefix.
     *
     * @param string          $prefix  The prefix
     * @param string[]|string $paths   The PSR-0 root directories
     * @param bool            $prepend Whether to prepend the directories
     *
     * @return void
     */
    public function add($prefix, $paths, $prepend = false)
    {
        if (!$prefix) {
            if ($prepend) {
                $this->fallbackDirsPsr0 = array_merge(
                    (array) $paths,
                    $this->fallbackDirsPsr0
                );
            } else {
                $this->fallbackDirsPsr0 = array_merge(
                    $this->fallbackDirsPsr0,
                    (array) $paths
                );
            }

            return;
        }

        $first = $prefix[0];
        if (!isset($this->prefixesPsr0[$first][$prefix])) {
            $this->prefixesPsr0[$first][$prefix] = (array) $paths;

            return;
        }
        if ($prepend) {
            $this->prefixesPsr0[$first][$prefix] = array_merge(
                (array) $paths,
                $this->prefixesPsr0[$first][$prefix]
            );
        } else {
            $this->prefixesPsr0[$first][$prefix] = array_merge(
                $this->prefixesPsr0[$first][$prefix],
                (array) $paths
            );
        }
    }

    /**
     * Registers a set of PSR-4 directories for a given namespace, either
     * appending or prepending to the ones previously set for this namespace.
     *
     * @param string          $prefix  The prefix/namespace, with trailing '\\'
     * @param string[]|string $paths   The PSR-4 base directories
     * @param bool            $prepend Whether to prepend the directories
     *
     * @throws \InvalidArgumentException
     *
     * @return void
     */
    public function addPsr4($prefix, $paths, $prepend = false)
    {
        if (!$prefix) {
            // Register directories for the root namespace.
            if ($prepend) {
                $this->fallbackDirsPsr4 = array_merge(
                    (array) $paths,
                    $this->fallbackDirsPsr4
                );
            } else {
                $this->fallbackDirsPsr4 = array_merge(
                    $this->fallbackDirsPsr4,
                    (array) $paths
                );
            }
        } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
            // Register directories for a new namespace.
            $length = strlen($prefix);
            if ('\\' !== $prefix[$length - 1]) {
                throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
            }
            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
            $this->prefixDirsPsr4[$prefix] = (array) $paths;
        } elseif ($prepend) {
            // Prepend directories for an already registered namespace.
            $this->prefixDirsPsr4[$prefix] = array_merge(
                (array) $paths,
                $this->prefixDirsPsr4[$prefix]
            );
        } else {
            // Append directories for an already registered namespace.
            $this->prefixDirsPsr4[$prefix] = array_merge(
                $this->prefixDirsPsr4[$prefix],
                (array) $paths
            );
        }
    }

    /**
     * Registers a set of PSR-0 directories for a given prefix,
     * replacing any others previously set for this prefix.
     *
     * @param string          $prefix The prefix
     * @param string[]|string $paths  The PSR-0 base directories
     *
     * @return void
     */
    public function set($prefix, $paths)
    {
        if (!$prefix) {
            $this->fallbackDirsPsr0 = (array) $paths;
        } else {
            $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
        }
    }

    /**
     * Registers a set of PSR-4 directories for a given namespace,
     * replacing any others previously set for this namespace.
     *
     * @param string          $prefix The prefix/namespace, with trailing '\\'
     * @param string[]|string $paths  The PSR-4 base directories
     *
     * @throws \InvalidArgumentException
     *
     * @return void
     */
    public function setPsr4($prefix, $paths)
    {
        if (!$prefix) {
            $this->fallbackDirsPsr4 = (array) $paths;
        } else {
            $length = strlen($prefix);
            if ('\\' !== $prefix[$length - 1]) {
                throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
            }
            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
            $this->prefixDirsPsr4[$prefix] = (array) $paths;
        }
    }

    /**
     * Turns on searching the include path for class files.
     *
     * @param bool $useIncludePath
     *
     * @return void
     */
    public function setUseIncludePath($useIncludePath)
    {
        $this->useIncludePath = $useIncludePath;
    }

    /**
     * Can be used to check if the autoloader uses the include path to check
     * for classes.
     *
     * @return bool
     */
    public function getUseIncludePath()
    {
        return $this->useIncludePath;
    }

    /**
     * Turns off searching the prefix and fallback directories for classes
     * that have not been registered with the class map.
     *
     * @param bool $classMapAuthoritative
     *
     * @return void
     */
    public function setClassMapAuthoritative($classMapAuthoritative)
    {
        $this->classMapAuthoritative = $classMapAuthoritative;
    }

    /**
     * Should class lookup fail if not found in the current class map?
     *
     * @return bool
     */
    public function isClassMapAuthoritative()
    {
        return $this->classMapAuthoritative;
    }

    /**
     * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
     *
     * @param string|null $apcuPrefix
     *
     * @return void
     */
    public function setApcuPrefix($apcuPrefix)
    {
        $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
    }

    /**
     * The APCu prefix in use, or null if APCu caching is not enabled.
     *
     * @return string|null
     */
    public function getApcuPrefix()
    {
        return $this->apcuPrefix;
    }

    /**
     * Registers this instance as an autoloader.
     *
     * @param bool $prepend Whether to prepend the autoloader or not
     *
     * @return void
     */
    public function register($prepend = false)
    {
        spl_autoload_register(array($this, 'loadClass'), true, $prepend);

        if (null === $this->vendorDir) {
            return;
        }

        if ($prepend) {
            self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
        } else {
            unset(self::$registeredLoaders[$this->vendorDir]);
            self::$registeredLoaders[$this->vendorDir] = $this;
        }
    }

    /**
     * Unregisters this instance as an autoloader.
     *
     * @return void
     */
    public function unregister()
    {
        spl_autoload_unregister(array($this, 'loadClass'));

        if (null !== $this->vendorDir) {
            unset(self::$registeredLoaders[$this->vendorDir]);
        }
    }

    /**
     * Loads the given class or interface.
     *
     * @param  string    $class The name of the class
     * @return true|null True if loaded, null otherwise
     */
    public function loadClass($class)
    {
        if ($file = $this->findFile($class)) {
            $includeFile = self::$includeFile;
            $includeFile($file);

            return true;
        }

        return null;
    }

    /**
     * Finds the path to the file where the class is defined.
     *
     * @param string $class The name of the class
     *
     * @return string|false The path if found, false otherwise
     */
    public function findFile($class)
    {
        // class map lookup
        if (isset($this->classMap[$class])) {
            return $this->classMap[$class];
        }
        if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
            return false;
        }
        if (null !== $this->apcuPrefix) {
            $file = apcu_fetch($this->apcuPrefix.$class, $hit);
            if ($hit) {
                return $file;
            }
        }

        $file = $this->findFileWithExtension($class, '.php');

        // Search for Hack files if we are running on HHVM
        if (false === $file && defined('HHVM_VERSION')) {
            $file = $this->findFileWithExtension($class, '.hh');
        }

        if (null !== $this->apcuPrefix) {
            apcu_add($this->apcuPrefix.$class, $file);
        }

        if (false === $file) {
            // Remember that this class does not exist.
            $this->missingClasses[$class] = true;
        }

        return $file;
    }

    /**
     * Returns the currently registered loaders indexed by their corresponding vendor directories.
     *
     * @return self[]
     */
    public static function getRegisteredLoaders()
    {
        return self::$registeredLoaders;
    }

    /**
     * @param  string       $class
     * @param  string       $ext
     * @return string|false
     */
    private function findFileWithExtension($class, $ext)
    {
        // PSR-4 lookup
        $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;

        $first = $class[0];
        if (isset($this->prefixLengthsPsr4[$first])) {
            $subPath = $class;
            while (false !== $lastPos = strrpos($subPath, '\\')) {
                $subPath = substr($subPath, 0, $lastPos);
                $search = $subPath . '\\';
                if (isset($this->prefixDirsPsr4[$search])) {
                    $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
                    foreach ($this->prefixDirsPsr4[$search] as $dir) {
                        if (file_exists($file = $dir . $pathEnd)) {
                            return $file;
                        }
                    }
                }
            }
        }

        // PSR-4 fallback dirs
        foreach ($this->fallbackDirsPsr4 as $dir) {
            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
                return $file;
            }
        }

        // PSR-0 lookup
        if (false !== $pos = strrpos($class, '\\')) {
            // namespaced class name
            $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
                . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
        } else {
            // PEAR-like class name
            $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
        }

        if (isset($this->prefixesPsr0[$first])) {
            foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
                if (0 === strpos($class, $prefix)) {
                    foreach ($dirs as $dir) {
                        if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
                            return $file;
                        }
                    }
                }
            }
        }

        // PSR-0 fallback dirs
        foreach ($this->fallbackDirsPsr0 as $dir) {
            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
                return $file;
            }
        }

        // PSR-0 include paths.
        if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
            return $file;
        }

        return false;
    }

    /**
     * @return void
     */
    private static function initializeIncludeClosure()
    {
        if (self::$includeFile !== null) {
            return;
        }

        /**
         * Scope isolated include.
         *
         * Prevents access to $this/self from included files.
         *
         * @param  string $file
         * @return void
         */
        self::$includeFile = \Closure::bind(static function($file) {
            include $file;
        }, null, null);
    }
}
<?php

// autoload_static.php @generated by Composer

namespace Composer\Autoload;

class ComposerStaticInit0fc888f20645a0056333807f0fcc1038
{
    public static $files = array (
        'e88992873b7765f9b5710cab95ba5dd7' => __DIR__ . '/..' . '/hoa/consistency/Prelude.php',
        '3e76f7f02b41af8cea96018933f6b7e3' => __DIR__ . '/..' . '/hoa/protocol/Wrapper.php',
        'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
        '972fda704d680a3a53c68e34e193cb22' => __DIR__ . '/..' . '/react/promise-timer/src/functions_include.php',
        'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
        '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
        '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
        '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
        '8825ede83f2f289127722d4e842cf7e8' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/bootstrap.php',
        'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
        'fe1d4898277c26748a003292f432cd3b' => __DIR__ . '/..' . '/jetbrains/phpstorm-stubs/PhpStormStubsMap.php',
        'ebf8799635f67b5d7248946fe2154f4a' => __DIR__ . '/..' . '/ringcentral/psr7/src/functions_include.php',
        '0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php',
        'b6b991a57620e2fb6b2f66f03fe9ddc2' => __DIR__ . '/..' . '/symfony/string/Resources/functions.php',
        'c4e03ecd470d2a87804979c0a8152284' => __DIR__ . '/..' . '/react/async/src/functions_include.php',
        'b686b8e46447868025a15ce5d0cb2634' => __DIR__ . '/..' . '/symfony/polyfill-php74/bootstrap.php',
        '8b3b25e11e82753923d43e298a70dcd0' => __DIR__ . '/../..' . '/src/dumpType.php',
        '9662279e3e75f737d93030252673bf2d' => __DIR__ . '/../..' . '/src/autoloadFunctions.php',
        '1a2eab53065eff9692bac238d15cc8cb' => __DIR__ . '/../..' . '/src/Testing/functions.php',
    );

    public static $prefixLengthsPsr4 = array (
        '_' => 
        array (
            '_PHPStan_dcc7b7cff\\Symfony\\Polyfill\\Ctype\\' => 42,
            '_PHPStan_dcc7b7cff\\Symfony\\Contracts\\Service\\' => 45,
            '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\' => 44,
            '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\' => 45,
            '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\' => 44,
            '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\' => 45,
            '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\' => 36,
            '_PHPStan_dcc7b7cff\\React\\Stream\\' => 32,
            '_PHPStan_dcc7b7cff\\React\\Socket\\' => 32,
            '_PHPStan_dcc7b7cff\\React\\Promise\\Timer\\' => 39,
            '_PHPStan_dcc7b7cff\\React\\Promise\\' => 33,
            '_PHPStan_dcc7b7cff\\React\\Http\\' => 30,
            '_PHPStan_dcc7b7cff\\React\\EventLoop\\' => 35,
            '_PHPStan_dcc7b7cff\\React\\Dns\\' => 29,
            '_PHPStan_dcc7b7cff\\React\\ChildProcess\\' => 38,
            '_PHPStan_dcc7b7cff\\React\\Cache\\' => 31,
            '_PHPStan_dcc7b7cff\\Psr\\Log\\' => 27,
            '_PHPStan_dcc7b7cff\\Psr\\Http\\Message\\' => 36,
            '_PHPStan_dcc7b7cff\\Psr\\Container\\' => 33,
            '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\' => 37,
            '_PHPStan_dcc7b7cff\\Fig\\Http\\Message\\' => 36,
            '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\' => 40,
            '_PHPStan_dcc7b7cff\\Evenement\\' => 29,
            '_PHPStan_dcc7b7cff\\Composer\\XdebugHandler\\' => 42,
            '_PHPStan_dcc7b7cff\\Composer\\Pcre\\' => 33,
            '_PHPStan_dcc7b7cff\\Composer\\CaBundle\\' => 37,
            '_PHPStan_dcc7b7cff\\Clue\\React\\NDJson\\' => 37,
        ),
        'S' => 
        array (
            'Symfony\\Polyfill\\Php80\\' => 23,
            'Symfony\\Polyfill\\Php74\\' => 23,
            'Symfony\\Polyfill\\Php73\\' => 23,
            'Symfony\\Polyfill\\Mbstring\\' => 26,
            'Symfony\\Polyfill\\Intl\\Normalizer\\' => 33,
            'Symfony\\Polyfill\\Intl\\Grapheme\\' => 31,
        ),
        'P' => 
        array (
            'PhpParser\\' => 10,
            'PHPStan\\PhpDocParser\\' => 21,
            'PHPStan\\BetterReflection\\' => 25,
            'PHPStan\\' => 8,
        ),
        'H' => 
        array (
            'Hoa\\Zformat\\' => 12,
            'Hoa\\Visitor\\' => 12,
            'Hoa\\Ustring\\' => 12,
            'Hoa\\Stream\\' => 11,
            'Hoa\\Regex\\' => 10,
            'Hoa\\Protocol\\' => 13,
            'Hoa\\Math\\' => 9,
            'Hoa\\Iterator\\' => 13,
            'Hoa\\File\\' => 9,
            'Hoa\\Exception\\' => 14,
            'Hoa\\Event\\' => 10,
            'Hoa\\Consistency\\' => 16,
            'Hoa\\Compiler\\' => 13,
        ),
    );

    public static $prefixDirsPsr4 = array (
        '_PHPStan_dcc7b7cff\\Symfony\\Polyfill\\Ctype\\' => 
        array (
            0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
        ),
        '_PHPStan_dcc7b7cff\\Symfony\\Contracts\\Service\\' => 
        array (
            0 => __DIR__ . '/..' . '/symfony/service-contracts',
        ),
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\' => 
        array (
            0 => __DIR__ . '/..' . '/symfony/string',
        ),
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\' => 
        array (
            0 => __DIR__ . '/..' . '/symfony/process',
        ),
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\' => 
        array (
            0 => __DIR__ . '/..' . '/symfony/finder',
        ),
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\' => 
        array (
            0 => __DIR__ . '/..' . '/symfony/console',
        ),
        '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\' => 
        array (
            0 => __DIR__ . '/..' . '/ringcentral/psr7/src',
        ),
        '_PHPStan_dcc7b7cff\\React\\Stream\\' => 
        array (
            0 => __DIR__ . '/..' . '/react/stream/src',
        ),
        '_PHPStan_dcc7b7cff\\React\\Socket\\' => 
        array (
            0 => __DIR__ . '/..' . '/react/socket/src',
        ),
        '_PHPStan_dcc7b7cff\\React\\Promise\\Timer\\' => 
        array (
            0 => __DIR__ . '/..' . '/react/promise-timer/src',
        ),
        '_PHPStan_dcc7b7cff\\React\\Promise\\' => 
        array (
            0 => __DIR__ . '/..' . '/react/promise/src',
        ),
        '_PHPStan_dcc7b7cff\\React\\Http\\' => 
        array (
            0 => __DIR__ . '/..' . '/react/http/src',
        ),
        '_PHPStan_dcc7b7cff\\React\\EventLoop\\' => 
        array (
            0 => __DIR__ . '/..' . '/react/event-loop/src',
        ),
        '_PHPStan_dcc7b7cff\\React\\Dns\\' => 
        array (
            0 => __DIR__ . '/..' . '/react/dns/src',
        ),
        '_PHPStan_dcc7b7cff\\React\\ChildProcess\\' => 
        array (
            0 => __DIR__ . '/..' . '/react/child-process/src',
        ),
        '_PHPStan_dcc7b7cff\\React\\Cache\\' => 
        array (
            0 => __DIR__ . '/..' . '/react/cache/src',
        ),
        '_PHPStan_dcc7b7cff\\Psr\\Log\\' => 
        array (
            0 => __DIR__ . '/..' . '/psr/log/Psr/Log',
        ),
        '_PHPStan_dcc7b7cff\\Psr\\Http\\Message\\' => 
        array (
            0 => __DIR__ . '/..' . '/psr/http-message/src',
        ),
        '_PHPStan_dcc7b7cff\\Psr\\Container\\' => 
        array (
            0 => __DIR__ . '/..' . '/psr/container/src',
        ),
        '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\' => 
        array (
            0 => __DIR__ . '/..' . '/ondram/ci-detector/src',
        ),
        '_PHPStan_dcc7b7cff\\Fig\\Http\\Message\\' => 
        array (
            0 => __DIR__ . '/..' . '/fig/http-message-util/src',
        ),
        '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\' => 
        array (
            0 => __DIR__ . '/..' . '/fidry/cpu-core-counter/src',
        ),
        '_PHPStan_dcc7b7cff\\Evenement\\' => 
        array (
            0 => __DIR__ . '/..' . '/evenement/evenement/src/Evenement',
        ),
        '_PHPStan_dcc7b7cff\\Composer\\XdebugHandler\\' => 
        array (
            0 => __DIR__ . '/..' . '/composer/xdebug-handler/src',
        ),
        '_PHPStan_dcc7b7cff\\Composer\\Pcre\\' => 
        array (
            0 => __DIR__ . '/..' . '/composer/pcre/src',
        ),
        '_PHPStan_dcc7b7cff\\Composer\\CaBundle\\' => 
        array (
            0 => __DIR__ . '/..' . '/composer/ca-bundle/src',
        ),
        '_PHPStan_dcc7b7cff\\Clue\\React\\NDJson\\' => 
        array (
            0 => __DIR__ . '/..' . '/clue/ndjson-react/src',
        ),
        'Symfony\\Polyfill\\Php80\\' => 
        array (
            0 => __DIR__ . '/..' . '/symfony/polyfill-php80',
        ),
        'Symfony\\Polyfill\\Php74\\' => 
        array (
            0 => __DIR__ . '/..' . '/symfony/polyfill-php74',
        ),
        'Symfony\\Polyfill\\Php73\\' => 
        array (
            0 => __DIR__ . '/..' . '/symfony/polyfill-php73',
        ),
        'Symfony\\Polyfill\\Mbstring\\' => 
        array (
            0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
        ),
        'Symfony\\Polyfill\\Intl\\Normalizer\\' => 
        array (
            0 => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer',
        ),
        'Symfony\\Polyfill\\Intl\\Grapheme\\' => 
        array (
            0 => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme',
        ),
        'PhpParser\\' => 
        array (
            0 => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser',
        ),
        'PHPStan\\PhpDocParser\\' => 
        array (
            0 => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src',
        ),
        'PHPStan\\BetterReflection\\' => 
        array (
            0 => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src',
        ),
        'PHPStan\\' => 
        array (
            0 => __DIR__ . '/../..' . '/src',
        ),
        'Hoa\\Zformat\\' => 
        array (
            0 => __DIR__ . '/..' . '/hoa/zformat',
        ),
        'Hoa\\Visitor\\' => 
        array (
            0 => __DIR__ . '/..' . '/hoa/visitor',
        ),
        'Hoa\\Ustring\\' => 
        array (
            0 => __DIR__ . '/..' . '/hoa/ustring',
        ),
        'Hoa\\Stream\\' => 
        array (
            0 => __DIR__ . '/..' . '/hoa/stream',
        ),
        'Hoa\\Regex\\' => 
        array (
            0 => __DIR__ . '/..' . '/hoa/regex',
        ),
        'Hoa\\Protocol\\' => 
        array (
            0 => __DIR__ . '/..' . '/hoa/protocol',
        ),
        'Hoa\\Math\\' => 
        array (
            0 => __DIR__ . '/..' . '/hoa/math',
        ),
        'Hoa\\Iterator\\' => 
        array (
            0 => __DIR__ . '/..' . '/hoa/iterator',
        ),
        'Hoa\\File\\' => 
        array (
            0 => __DIR__ . '/..' . '/hoa/file',
        ),
        'Hoa\\Exception\\' => 
        array (
            0 => __DIR__ . '/..' . '/hoa/exception',
        ),
        'Hoa\\Event\\' => 
        array (
            0 => __DIR__ . '/..' . '/hoa/event',
        ),
        'Hoa\\Consistency\\' => 
        array (
            0 => __DIR__ . '/..' . '/hoa/consistency',
        ),
        'Hoa\\Compiler\\' => 
        array (
            0 => __DIR__ . '/..' . '/hoa/compiler',
        ),
    );

    public static $classMap = array (
        'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
        'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
        'Hoa\\Compiler\\Bin\\Pp' => __DIR__ . '/..' . '/hoa/compiler/Bin/Pp.php',
        'Hoa\\Compiler\\Exception\\Exception' => __DIR__ . '/..' . '/hoa/compiler/Exception/Exception.php',
        'Hoa\\Compiler\\Exception\\FinalStateHasNotBeenReached' => __DIR__ . '/..' . '/hoa/compiler/Exception/FinalStateHasNotBeenReached.php',
        'Hoa\\Compiler\\Exception\\IllegalToken' => __DIR__ . '/..' . '/hoa/compiler/Exception/IllegalToken.php',
        'Hoa\\Compiler\\Exception\\Lexer' => __DIR__ . '/..' . '/hoa/compiler/Exception/Lexer.php',
        'Hoa\\Compiler\\Exception\\Rule' => __DIR__ . '/..' . '/hoa/compiler/Exception/Rule.php',
        'Hoa\\Compiler\\Exception\\UnexpectedToken' => __DIR__ . '/..' . '/hoa/compiler/Exception/UnexpectedToken.php',
        'Hoa\\Compiler\\Exception\\UnrecognizedToken' => __DIR__ . '/..' . '/hoa/compiler/Exception/UnrecognizedToken.php',
        'Hoa\\Compiler\\Ll1' => __DIR__ . '/..' . '/hoa/compiler/Ll1.php',
        'Hoa\\Compiler\\Llk\\Lexer' => __DIR__ . '/..' . '/hoa/compiler/Llk/Lexer.php',
        'Hoa\\Compiler\\Llk\\Llk' => __DIR__ . '/..' . '/hoa/compiler/Llk/Llk.php',
        'Hoa\\Compiler\\Llk\\Parser' => __DIR__ . '/..' . '/hoa/compiler/Llk/Parser.php',
        'Hoa\\Compiler\\Llk\\Rule\\Analyzer' => __DIR__ . '/..' . '/hoa/compiler/Llk/Rule/Analyzer.php',
        'Hoa\\Compiler\\Llk\\Rule\\Choice' => __DIR__ . '/..' . '/hoa/compiler/Llk/Rule/Choice.php',
        'Hoa\\Compiler\\Llk\\Rule\\Concatenation' => __DIR__ . '/..' . '/hoa/compiler/Llk/Rule/Concatenation.php',
        'Hoa\\Compiler\\Llk\\Rule\\Ekzit' => __DIR__ . '/..' . '/hoa/compiler/Llk/Rule/Ekzit.php',
        'Hoa\\Compiler\\Llk\\Rule\\Entry' => __DIR__ . '/..' . '/hoa/compiler/Llk/Rule/Entry.php',
        'Hoa\\Compiler\\Llk\\Rule\\Invocation' => __DIR__ . '/..' . '/hoa/compiler/Llk/Rule/Invocation.php',
        'Hoa\\Compiler\\Llk\\Rule\\Repetition' => __DIR__ . '/..' . '/hoa/compiler/Llk/Rule/Repetition.php',
        'Hoa\\Compiler\\Llk\\Rule\\Rule' => __DIR__ . '/..' . '/hoa/compiler/Llk/Rule/Rule.php',
        'Hoa\\Compiler\\Llk\\Rule\\Token' => __DIR__ . '/..' . '/hoa/compiler/Llk/Rule/Token.php',
        'Hoa\\Compiler\\Llk\\Sampler\\BoundedExhaustive' => __DIR__ . '/..' . '/hoa/compiler/Llk/Sampler/BoundedExhaustive.php',
        'Hoa\\Compiler\\Llk\\Sampler\\Coverage' => __DIR__ . '/..' . '/hoa/compiler/Llk/Sampler/Coverage.php',
        'Hoa\\Compiler\\Llk\\Sampler\\Exception' => __DIR__ . '/..' . '/hoa/compiler/Llk/Sampler/Exception.php',
        'Hoa\\Compiler\\Llk\\Sampler\\Sampler' => __DIR__ . '/..' . '/hoa/compiler/Llk/Sampler/Sampler.php',
        'Hoa\\Compiler\\Llk\\Sampler\\Uniform' => __DIR__ . '/..' . '/hoa/compiler/Llk/Sampler/Uniform.php',
        'Hoa\\Compiler\\Llk\\TreeNode' => __DIR__ . '/..' . '/hoa/compiler/Llk/TreeNode.php',
        'Hoa\\Compiler\\Visitor\\Dump' => __DIR__ . '/..' . '/hoa/compiler/Visitor/Dump.php',
        'Hoa\\Consistency\\Autoloader' => __DIR__ . '/..' . '/hoa/consistency/Autoloader.php',
        'Hoa\\Consistency\\Consistency' => __DIR__ . '/..' . '/hoa/consistency/Consistency.php',
        'Hoa\\Consistency\\Exception' => __DIR__ . '/..' . '/hoa/consistency/Exception.php',
        'Hoa\\Consistency\\Xcallable' => __DIR__ . '/..' . '/hoa/consistency/Xcallable.php',
        'Hoa\\Event\\Bucket' => __DIR__ . '/..' . '/hoa/event/Bucket.php',
        'Hoa\\Event\\Event' => __DIR__ . '/..' . '/hoa/event/Event.php',
        'Hoa\\Event\\Exception' => __DIR__ . '/..' . '/hoa/event/Exception.php',
        'Hoa\\Event\\Listenable' => __DIR__ . '/..' . '/hoa/event/Listenable.php',
        'Hoa\\Event\\Listener' => __DIR__ . '/..' . '/hoa/event/Listener.php',
        'Hoa\\Event\\Listens' => __DIR__ . '/..' . '/hoa/event/Listens.php',
        'Hoa\\Event\\Source' => __DIR__ . '/..' . '/hoa/event/Source.php',
        'Hoa\\Exception\\Error' => __DIR__ . '/..' . '/hoa/exception/Error.php',
        'Hoa\\Exception\\Exception' => __DIR__ . '/..' . '/hoa/exception/Exception.php',
        'Hoa\\Exception\\Group' => __DIR__ . '/..' . '/hoa/exception/Group.php',
        'Hoa\\Exception\\Idle' => __DIR__ . '/..' . '/hoa/exception/Idle.php',
        'Hoa\\File\\Directory' => __DIR__ . '/..' . '/hoa/file/Directory.php',
        'Hoa\\File\\Exception\\Exception' => __DIR__ . '/..' . '/hoa/file/Exception/Exception.php',
        'Hoa\\File\\Exception\\FileDoesNotExist' => __DIR__ . '/..' . '/hoa/file/Exception/FileDoesNotExist.php',
        'Hoa\\File\\File' => __DIR__ . '/..' . '/hoa/file/File.php',
        'Hoa\\File\\Finder' => __DIR__ . '/..' . '/hoa/file/Finder.php',
        'Hoa\\File\\Generic' => __DIR__ . '/..' . '/hoa/file/Generic.php',
        'Hoa\\File\\Link\\Link' => __DIR__ . '/..' . '/hoa/file/Link/Link.php',
        'Hoa\\File\\Link\\Read' => __DIR__ . '/..' . '/hoa/file/Link/Read.php',
        'Hoa\\File\\Link\\ReadWrite' => __DIR__ . '/..' . '/hoa/file/Link/ReadWrite.php',
        'Hoa\\File\\Link\\Write' => __DIR__ . '/..' . '/hoa/file/Link/Write.php',
        'Hoa\\File\\Read' => __DIR__ . '/..' . '/hoa/file/Read.php',
        'Hoa\\File\\ReadWrite' => __DIR__ . '/..' . '/hoa/file/ReadWrite.php',
        'Hoa\\File\\SplFileInfo' => __DIR__ . '/..' . '/hoa/file/SplFileInfo.php',
        'Hoa\\File\\Temporary\\Read' => __DIR__ . '/..' . '/hoa/file/Temporary/Read.php',
        'Hoa\\File\\Temporary\\ReadWrite' => __DIR__ . '/..' . '/hoa/file/Temporary/ReadWrite.php',
        'Hoa\\File\\Temporary\\Temporary' => __DIR__ . '/..' . '/hoa/file/Temporary/Temporary.php',
        'Hoa\\File\\Temporary\\Write' => __DIR__ . '/..' . '/hoa/file/Temporary/Write.php',
        'Hoa\\File\\Watcher' => __DIR__ . '/..' . '/hoa/file/Watcher.php',
        'Hoa\\File\\Write' => __DIR__ . '/..' . '/hoa/file/Write.php',
        'Hoa\\Iterator\\Aggregate' => __DIR__ . '/..' . '/hoa/iterator/Aggregate.php',
        'Hoa\\Iterator\\Append' => __DIR__ . '/..' . '/hoa/iterator/Append.php',
        'Hoa\\Iterator\\Buffer' => __DIR__ . '/..' . '/hoa/iterator/Buffer.php',
        'Hoa\\Iterator\\CallbackFilter' => __DIR__ . '/..' . '/hoa/iterator/CallbackFilter.php',
        'Hoa\\Iterator\\CallbackGenerator' => __DIR__ . '/..' . '/hoa/iterator/CallbackGenerator.php',
        'Hoa\\Iterator\\Counter' => __DIR__ . '/..' . '/hoa/iterator/Counter.php',
        'Hoa\\Iterator\\Demultiplexer' => __DIR__ . '/..' . '/hoa/iterator/Demultiplexer.php',
        'Hoa\\Iterator\\Directory' => __DIR__ . '/..' . '/hoa/iterator/Directory.php',
        'Hoa\\Iterator\\Exception' => __DIR__ . '/..' . '/hoa/iterator/Exception.php',
        'Hoa\\Iterator\\FileSystem' => __DIR__ . '/..' . '/hoa/iterator/FileSystem.php',
        'Hoa\\Iterator\\Filter' => __DIR__ . '/..' . '/hoa/iterator/Filter.php',
        'Hoa\\Iterator\\Glob' => __DIR__ . '/..' . '/hoa/iterator/Glob.php',
        'Hoa\\Iterator\\Infinite' => __DIR__ . '/..' . '/hoa/iterator/Infinite.php',
        'Hoa\\Iterator\\Iterator' => __DIR__ . '/..' . '/hoa/iterator/Iterator.php',
        'Hoa\\Iterator\\IteratorIterator' => __DIR__ . '/..' . '/hoa/iterator/IteratorIterator.php',
        'Hoa\\Iterator\\Limit' => __DIR__ . '/..' . '/hoa/iterator/Limit.php',
        'Hoa\\Iterator\\Lookahead' => __DIR__ . '/..' . '/hoa/iterator/Lookahead.php',
        'Hoa\\Iterator\\Lookbehind' => __DIR__ . '/..' . '/hoa/iterator/Lookbehind.php',
        'Hoa\\Iterator\\Map' => __DIR__ . '/..' . '/hoa/iterator/Map.php',
        'Hoa\\Iterator\\Mock' => __DIR__ . '/..' . '/hoa/iterator/Mock.php',
        'Hoa\\Iterator\\Multiple' => __DIR__ . '/..' . '/hoa/iterator/Multiple.php',
        'Hoa\\Iterator\\NoRewind' => __DIR__ . '/..' . '/hoa/iterator/NoRewind.php',
        'Hoa\\Iterator\\Outer' => __DIR__ . '/..' . '/hoa/iterator/Outer.php',
        'Hoa\\Iterator\\Recursive\\CallbackFilter' => __DIR__ . '/..' . '/hoa/iterator/Recursive/CallbackFilter.php',
        'Hoa\\Iterator\\Recursive\\Directory' => __DIR__ . '/..' . '/hoa/iterator/Recursive/Directory.php',
        'Hoa\\Iterator\\Recursive\\Filter' => __DIR__ . '/..' . '/hoa/iterator/Recursive/Filter.php',
        'Hoa\\Iterator\\Recursive\\Iterator' => __DIR__ . '/..' . '/hoa/iterator/Recursive/Iterator.php',
        'Hoa\\Iterator\\Recursive\\Map' => __DIR__ . '/..' . '/hoa/iterator/Recursive/Map.php',
        'Hoa\\Iterator\\Recursive\\Mock' => __DIR__ . '/..' . '/hoa/iterator/Recursive/Mock.php',
        'Hoa\\Iterator\\Recursive\\Recursive' => __DIR__ . '/..' . '/hoa/iterator/Recursive/Recursive.php',
        'Hoa\\Iterator\\Recursive\\RegularExpression' => __DIR__ . '/..' . '/hoa/iterator/Recursive/RegularExpression.php',
        'Hoa\\Iterator\\RegularExpression' => __DIR__ . '/..' . '/hoa/iterator/RegularExpression.php',
        'Hoa\\Iterator\\Repeater' => __DIR__ . '/..' . '/hoa/iterator/Repeater.php',
        'Hoa\\Iterator\\Seekable' => __DIR__ . '/..' . '/hoa/iterator/Seekable.php',
        'Hoa\\Iterator\\SplFileInfo' => __DIR__ . '/..' . '/hoa/iterator/SplFileInfo.php',
        'Hoa\\Math\\Bin\\Calc' => __DIR__ . '/..' . '/hoa/math/Bin/Calc.php',
        'Hoa\\Math\\Combinatorics\\Combination\\CartesianProduct' => __DIR__ . '/..' . '/hoa/math/Combinatorics/Combination/CartesianProduct.php',
        'Hoa\\Math\\Combinatorics\\Combination\\Combination' => __DIR__ . '/..' . '/hoa/math/Combinatorics/Combination/Combination.php',
        'Hoa\\Math\\Combinatorics\\Combination\\Gamma' => __DIR__ . '/..' . '/hoa/math/Combinatorics/Combination/Gamma.php',
        'Hoa\\Math\\Context' => __DIR__ . '/..' . '/hoa/math/Context.php',
        'Hoa\\Math\\Exception\\AlreadyDefinedConstant' => __DIR__ . '/..' . '/hoa/math/Exception/AlreadyDefinedConstant.php',
        'Hoa\\Math\\Exception\\Exception' => __DIR__ . '/..' . '/hoa/math/Exception/Exception.php',
        'Hoa\\Math\\Exception\\UnknownConstant' => __DIR__ . '/..' . '/hoa/math/Exception/UnknownConstant.php',
        'Hoa\\Math\\Exception\\UnknownFunction' => __DIR__ . '/..' . '/hoa/math/Exception/UnknownFunction.php',
        'Hoa\\Math\\Exception\\UnknownVariable' => __DIR__ . '/..' . '/hoa/math/Exception/UnknownVariable.php',
        'Hoa\\Math\\Sampler\\Random' => __DIR__ . '/..' . '/hoa/math/Sampler/Random.php',
        'Hoa\\Math\\Sampler\\Sampler' => __DIR__ . '/..' . '/hoa/math/Sampler/Sampler.php',
        'Hoa\\Math\\Util' => __DIR__ . '/..' . '/hoa/math/Util.php',
        'Hoa\\Math\\Visitor\\Arithmetic' => __DIR__ . '/..' . '/hoa/math/Visitor/Arithmetic.php',
        'Hoa\\Protocol\\Bin\\Resolve' => __DIR__ . '/..' . '/hoa/protocol/Bin/Resolve.php',
        'Hoa\\Protocol\\Exception' => __DIR__ . '/..' . '/hoa/protocol/Exception.php',
        'Hoa\\Protocol\\Node\\Library' => __DIR__ . '/..' . '/hoa/protocol/Node/Library.php',
        'Hoa\\Protocol\\Node\\Node' => __DIR__ . '/..' . '/hoa/protocol/Node/Node.php',
        'Hoa\\Protocol\\Protocol' => __DIR__ . '/..' . '/hoa/protocol/Protocol.php',
        'Hoa\\Protocol\\Wrapper' => __DIR__ . '/..' . '/hoa/protocol/Wrapper.php',
        'Hoa\\Regex\\Exception' => __DIR__ . '/..' . '/hoa/regex/Exception.php',
        'Hoa\\Regex\\Visitor\\Isotropic' => __DIR__ . '/..' . '/hoa/regex/Visitor/Isotropic.php',
        'Hoa\\Stream\\Bucket' => __DIR__ . '/..' . '/hoa/stream/Bucket.php',
        'Hoa\\Stream\\Composite' => __DIR__ . '/..' . '/hoa/stream/Composite.php',
        'Hoa\\Stream\\Context' => __DIR__ . '/..' . '/hoa/stream/Context.php',
        'Hoa\\Stream\\Exception' => __DIR__ . '/..' . '/hoa/stream/Exception.php',
        'Hoa\\Stream\\Filter\\Basic' => __DIR__ . '/..' . '/hoa/stream/Filter/Basic.php',
        'Hoa\\Stream\\Filter\\Exception' => __DIR__ . '/..' . '/hoa/stream/Filter/Exception.php',
        'Hoa\\Stream\\Filter\\Filter' => __DIR__ . '/..' . '/hoa/stream/Filter/Filter.php',
        'Hoa\\Stream\\Filter\\LateComputed' => __DIR__ . '/..' . '/hoa/stream/Filter/LateComputed.php',
        'Hoa\\Stream\\IStream\\Bufferable' => __DIR__ . '/..' . '/hoa/stream/IStream/Bufferable.php',
        'Hoa\\Stream\\IStream\\In' => __DIR__ . '/..' . '/hoa/stream/IStream/In.php',
        'Hoa\\Stream\\IStream\\Lockable' => __DIR__ . '/..' . '/hoa/stream/IStream/Lockable.php',
        'Hoa\\Stream\\IStream\\Out' => __DIR__ . '/..' . '/hoa/stream/IStream/Out.php',
        'Hoa\\Stream\\IStream\\Pathable' => __DIR__ . '/..' . '/hoa/stream/IStream/Pathable.php',
        'Hoa\\Stream\\IStream\\Pointable' => __DIR__ . '/..' . '/hoa/stream/IStream/Pointable.php',
        'Hoa\\Stream\\IStream\\Statable' => __DIR__ . '/..' . '/hoa/stream/IStream/Statable.php',
        'Hoa\\Stream\\IStream\\Stream' => __DIR__ . '/..' . '/hoa/stream/IStream/Stream.php',
        'Hoa\\Stream\\IStream\\Structural' => __DIR__ . '/..' . '/hoa/stream/IStream/Structural.php',
        'Hoa\\Stream\\IStream\\Touchable' => __DIR__ . '/..' . '/hoa/stream/IStream/Touchable.php',
        'Hoa\\Stream\\Stream' => __DIR__ . '/..' . '/hoa/stream/Stream.php',
        'Hoa\\Stream\\Wrapper\\Exception' => __DIR__ . '/..' . '/hoa/stream/Wrapper/Exception.php',
        'Hoa\\Stream\\Wrapper\\IWrapper\\File' => __DIR__ . '/..' . '/hoa/stream/Wrapper/IWrapper/File.php',
        'Hoa\\Stream\\Wrapper\\IWrapper\\IWrapper' => __DIR__ . '/..' . '/hoa/stream/Wrapper/IWrapper/IWrapper.php',
        'Hoa\\Stream\\Wrapper\\IWrapper\\Stream' => __DIR__ . '/..' . '/hoa/stream/Wrapper/IWrapper/Stream.php',
        'Hoa\\Stream\\Wrapper\\Wrapper' => __DIR__ . '/..' . '/hoa/stream/Wrapper/Wrapper.php',
        'Hoa\\Ustring\\Bin\\Fromcode' => __DIR__ . '/..' . '/hoa/ustring/Bin/Fromcode.php',
        'Hoa\\Ustring\\Bin\\Tocode' => __DIR__ . '/..' . '/hoa/ustring/Bin/Tocode.php',
        'Hoa\\Ustring\\Exception' => __DIR__ . '/..' . '/hoa/ustring/Exception.php',
        'Hoa\\Ustring\\Search' => __DIR__ . '/..' . '/hoa/ustring/Search.php',
        'Hoa\\Ustring\\Ustring' => __DIR__ . '/..' . '/hoa/ustring/Ustring.php',
        'Hoa\\Visitor\\Element' => __DIR__ . '/..' . '/hoa/visitor/Element.php',
        'Hoa\\Visitor\\Visit' => __DIR__ . '/..' . '/hoa/visitor/Visit.php',
        'Hoa\\Zformat\\Exception' => __DIR__ . '/..' . '/hoa/zformat/Exception.php',
        'Hoa\\Zformat\\Parameter' => __DIR__ . '/..' . '/hoa/zformat/Parameter.php',
        'Hoa\\Zformat\\Parameterizable' => __DIR__ . '/..' . '/hoa/zformat/Parameterizable.php',
        'JsonException' => __DIR__ . '/..' . '/symfony/polyfill-php73/Resources/stubs/JsonException.php',
        'Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
        'PHPStan\\AnalysedCodeException' => __DIR__ . '/../..' . '/src/AnalysedCodeException.php',
        'PHPStan\\Analyser\\Analyser' => __DIR__ . '/../..' . '/src/Analyser/Analyser.php',
        'PHPStan\\Analyser\\AnalyserResult' => __DIR__ . '/../..' . '/src/Analyser/AnalyserResult.php',
        'PHPStan\\Analyser\\ArgumentsNormalizer' => __DIR__ . '/../..' . '/src/Analyser/ArgumentsNormalizer.php',
        'PHPStan\\Analyser\\ConditionalExpressionHolder' => __DIR__ . '/../..' . '/src/Analyser/ConditionalExpressionHolder.php',
        'PHPStan\\Analyser\\ConstantResolver' => __DIR__ . '/../..' . '/src/Analyser/ConstantResolver.php',
        'PHPStan\\Analyser\\ConstantResolverFactory' => __DIR__ . '/../..' . '/src/Analyser/ConstantResolverFactory.php',
        'PHPStan\\Analyser\\DirectInternalScopeFactory' => __DIR__ . '/../..' . '/src/Analyser/DirectInternalScopeFactory.php',
        'PHPStan\\Analyser\\EnsuredNonNullabilityResult' => __DIR__ . '/../..' . '/src/Analyser/EnsuredNonNullabilityResult.php',
        'PHPStan\\Analyser\\EnsuredNonNullabilityResultExpression' => __DIR__ . '/../..' . '/src/Analyser/EnsuredNonNullabilityResultExpression.php',
        'PHPStan\\Analyser\\Error' => __DIR__ . '/../..' . '/src/Analyser/Error.php',
        'PHPStan\\Analyser\\ExpressionContext' => __DIR__ . '/../..' . '/src/Analyser/ExpressionContext.php',
        'PHPStan\\Analyser\\ExpressionResult' => __DIR__ . '/../..' . '/src/Analyser/ExpressionResult.php',
        'PHPStan\\Analyser\\ExpressionTypeHolder' => __DIR__ . '/../..' . '/src/Analyser/ExpressionTypeHolder.php',
        'PHPStan\\Analyser\\FileAnalyser' => __DIR__ . '/../..' . '/src/Analyser/FileAnalyser.php',
        'PHPStan\\Analyser\\FileAnalyserResult' => __DIR__ . '/../..' . '/src/Analyser/FileAnalyserResult.php',
        'PHPStan\\Analyser\\IgnoredError' => __DIR__ . '/../..' . '/src/Analyser/IgnoredError.php',
        'PHPStan\\Analyser\\IgnoredErrorHelper' => __DIR__ . '/../..' . '/src/Analyser/IgnoredErrorHelper.php',
        'PHPStan\\Analyser\\IgnoredErrorHelperResult' => __DIR__ . '/../..' . '/src/Analyser/IgnoredErrorHelperResult.php',
        'PHPStan\\Analyser\\InternalScopeFactory' => __DIR__ . '/../..' . '/src/Analyser/InternalScopeFactory.php',
        'PHPStan\\Analyser\\LazyInternalScopeFactory' => __DIR__ . '/../..' . '/src/Analyser/LazyInternalScopeFactory.php',
        'PHPStan\\Analyser\\MutatingScope' => __DIR__ . '/../..' . '/src/Analyser/MutatingScope.php',
        'PHPStan\\Analyser\\NameScope' => __DIR__ . '/../..' . '/src/Analyser/NameScope.php',
        'PHPStan\\Analyser\\NodeScopeResolver' => __DIR__ . '/../..' . '/src/Analyser/NodeScopeResolver.php',
        'PHPStan\\Analyser\\NullsafeOperatorHelper' => __DIR__ . '/../..' . '/src/Analyser/NullsafeOperatorHelper.php',
        'PHPStan\\Analyser\\OutOfClassScope' => __DIR__ . '/../..' . '/src/Analyser/OutOfClassScope.php',
        'PHPStan\\Analyser\\ResultCache\\ResultCache' => __DIR__ . '/../..' . '/src/Analyser/ResultCache/ResultCache.php',
        'PHPStan\\Analyser\\ResultCache\\ResultCacheClearer' => __DIR__ . '/../..' . '/src/Analyser/ResultCache/ResultCacheClearer.php',
        'PHPStan\\Analyser\\ResultCache\\ResultCacheManager' => __DIR__ . '/../..' . '/src/Analyser/ResultCache/ResultCacheManager.php',
        'PHPStan\\Analyser\\ResultCache\\ResultCacheManagerFactory' => __DIR__ . '/../..' . '/src/Analyser/ResultCache/ResultCacheManagerFactory.php',
        'PHPStan\\Analyser\\ResultCache\\ResultCacheProcessResult' => __DIR__ . '/../..' . '/src/Analyser/ResultCache/ResultCacheProcessResult.php',
        'PHPStan\\Analyser\\RuleErrorTransformer' => __DIR__ . '/../..' . '/src/Analyser/RuleErrorTransformer.php',
        'PHPStan\\Analyser\\Scope' => __DIR__ . '/../..' . '/src/Analyser/Scope.php',
        'PHPStan\\Analyser\\ScopeContext' => __DIR__ . '/../..' . '/src/Analyser/ScopeContext.php',
        'PHPStan\\Analyser\\ScopeFactory' => __DIR__ . '/../..' . '/src/Analyser/ScopeFactory.php',
        'PHPStan\\Analyser\\SpecifiedTypes' => __DIR__ . '/../..' . '/src/Analyser/SpecifiedTypes.php',
        'PHPStan\\Analyser\\StatementContext' => __DIR__ . '/../..' . '/src/Analyser/StatementContext.php',
        'PHPStan\\Analyser\\StatementExitPoint' => __DIR__ . '/../..' . '/src/Analyser/StatementExitPoint.php',
        'PHPStan\\Analyser\\StatementResult' => __DIR__ . '/../..' . '/src/Analyser/StatementResult.php',
        'PHPStan\\Analyser\\ThrowPoint' => __DIR__ . '/../..' . '/src/Analyser/ThrowPoint.php',
        'PHPStan\\Analyser\\TypeSpecifier' => __DIR__ . '/../..' . '/src/Analyser/TypeSpecifier.php',
        'PHPStan\\Analyser\\TypeSpecifierAwareExtension' => __DIR__ . '/../..' . '/src/Analyser/TypeSpecifierAwareExtension.php',
        'PHPStan\\Analyser\\TypeSpecifierContext' => __DIR__ . '/../..' . '/src/Analyser/TypeSpecifierContext.php',
        'PHPStan\\Analyser\\TypeSpecifierFactory' => __DIR__ . '/../..' . '/src/Analyser/TypeSpecifierFactory.php',
        'PHPStan\\Analyser\\UndefinedVariableException' => __DIR__ . '/../..' . '/src/Analyser/UndefinedVariableException.php',
        'PHPStan\\BetterReflection\\BetterReflection' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/BetterReflection.php',
        'PHPStan\\BetterReflection\\Identifier\\Exception\\InvalidIdentifierName' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Identifier/Exception/InvalidIdentifierName.php',
        'PHPStan\\BetterReflection\\Identifier\\Identifier' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Identifier/Identifier.php',
        'PHPStan\\BetterReflection\\Identifier\\IdentifierType' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Identifier/IdentifierType.php',
        'PHPStan\\BetterReflection\\NodeCompiler\\CompileNodeToValue' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/NodeCompiler/CompileNodeToValue.php',
        'PHPStan\\BetterReflection\\NodeCompiler\\CompiledValue' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/NodeCompiler/CompiledValue.php',
        'PHPStan\\BetterReflection\\NodeCompiler\\CompilerContext' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/NodeCompiler/CompilerContext.php',
        'PHPStan\\BetterReflection\\NodeCompiler\\Exception\\UnableToCompileNode' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/NodeCompiler/Exception/UnableToCompileNode.php',
        'PHPStan\\BetterReflection\\Reflection\\Adapter\\Exception\\NotImplemented' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/Exception/NotImplemented.php',
        'PHPStan\\BetterReflection\\Reflection\\Adapter\\FakeReflectionAttribute' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/FakeReflectionAttribute.php',
        'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionAttribute' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionAttribute.php',
        'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionAttributeFactory' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionAttributeFactory.php',
        'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionClass' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionClass.php',
        'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionClassConstant' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionClassConstant.php',
        'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionEnum' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionEnum.php',
        'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionEnumBackedCase' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionEnumBackedCase.php',
        'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionEnumUnitCase' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionEnumUnitCase.php',
        'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionFunction' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionFunction.php',
        'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionIntersectionType' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionIntersectionType.php',
        'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionMethod' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionMethod.php',
        'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionNamedType' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionNamedType.php',
        'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionObject' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionObject.php',
        'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionParameter' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionParameter.php',
        'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionProperty' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionProperty.php',
        'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionType' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionType.php',
        'PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionUnionType' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionUnionType.php',
        'PHPStan\\BetterReflection\\Reflection\\Annotation\\AnnotationHelper' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Annotation/AnnotationHelper.php',
        'PHPStan\\BetterReflection\\Reflection\\Attribute\\ReflectionAttributeHelper' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Attribute/ReflectionAttributeHelper.php',
        'PHPStan\\BetterReflection\\Reflection\\Exception\\CircularReference' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Exception/CircularReference.php',
        'PHPStan\\BetterReflection\\Reflection\\Exception\\ClassDoesNotExist' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Exception/ClassDoesNotExist.php',
        'PHPStan\\BetterReflection\\Reflection\\Exception\\CodeLocationMissing' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Exception/CodeLocationMissing.php',
        'PHPStan\\BetterReflection\\Reflection\\Exception\\FunctionDoesNotExist' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Exception/FunctionDoesNotExist.php',
        'PHPStan\\BetterReflection\\Reflection\\Exception\\InvalidArrowFunctionBodyNode' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Exception/InvalidArrowFunctionBodyNode.php',
        'PHPStan\\BetterReflection\\Reflection\\Exception\\InvalidConstantNode' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Exception/InvalidConstantNode.php',
        'PHPStan\\BetterReflection\\Reflection\\Exception\\InvalidDefaultValueType' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Exception/InvalidDefaultValueType.php',
        'PHPStan\\BetterReflection\\Reflection\\Exception\\MethodPrototypeNotFound' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Exception/MethodPrototypeNotFound.php',
        'PHPStan\\BetterReflection\\Reflection\\Exception\\NoObjectProvided' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Exception/NoObjectProvided.php',
        'PHPStan\\BetterReflection\\Reflection\\Exception\\NoParent' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Exception/NoParent.php',
        'PHPStan\\BetterReflection\\Reflection\\Exception\\NotAClassReflection' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Exception/NotAClassReflection.php',
        'PHPStan\\BetterReflection\\Reflection\\Exception\\NotAnInterfaceReflection' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Exception/NotAnInterfaceReflection.php',
        'PHPStan\\BetterReflection\\Reflection\\Exception\\NotAnObject' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Exception/NotAnObject.php',
        'PHPStan\\BetterReflection\\Reflection\\Exception\\ObjectNotInstanceOfClass' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Exception/ObjectNotInstanceOfClass.php',
        'PHPStan\\BetterReflection\\Reflection\\Exception\\PropertyDoesNotExist' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Exception/PropertyDoesNotExist.php',
        'PHPStan\\BetterReflection\\Reflection\\Exception\\PropertyIsNotStatic' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Exception/PropertyIsNotStatic.php',
        'PHPStan\\BetterReflection\\Reflection\\Reflection' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Reflection.php',
        'PHPStan\\BetterReflection\\Reflection\\ReflectionAttribute' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionAttribute.php',
        'PHPStan\\BetterReflection\\Reflection\\ReflectionClass' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionClass.php',
        'PHPStan\\BetterReflection\\Reflection\\ReflectionClassConstant' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionClassConstant.php',
        'PHPStan\\BetterReflection\\Reflection\\ReflectionConstant' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionConstant.php',
        'PHPStan\\BetterReflection\\Reflection\\ReflectionEnum' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionEnum.php',
        'PHPStan\\BetterReflection\\Reflection\\ReflectionEnumCase' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionEnumCase.php',
        'PHPStan\\BetterReflection\\Reflection\\ReflectionFunction' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionFunction.php',
        'PHPStan\\BetterReflection\\Reflection\\ReflectionFunctionAbstract' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionFunctionAbstract.php',
        'PHPStan\\BetterReflection\\Reflection\\ReflectionIntersectionType' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionIntersectionType.php',
        'PHPStan\\BetterReflection\\Reflection\\ReflectionMethod' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionMethod.php',
        'PHPStan\\BetterReflection\\Reflection\\ReflectionNamedType' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionNamedType.php',
        'PHPStan\\BetterReflection\\Reflection\\ReflectionObject' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionObject.php',
        'PHPStan\\BetterReflection\\Reflection\\ReflectionParameter' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionParameter.php',
        'PHPStan\\BetterReflection\\Reflection\\ReflectionProperty' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionProperty.php',
        'PHPStan\\BetterReflection\\Reflection\\ReflectionType' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionType.php',
        'PHPStan\\BetterReflection\\Reflection\\ReflectionUnionType' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/ReflectionUnionType.php',
        'PHPStan\\BetterReflection\\Reflection\\StringCast\\ReflectionAttributeStringCast' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionAttributeStringCast.php',
        'PHPStan\\BetterReflection\\Reflection\\StringCast\\ReflectionClassConstantStringCast' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionClassConstantStringCast.php',
        'PHPStan\\BetterReflection\\Reflection\\StringCast\\ReflectionClassStringCast' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionClassStringCast.php',
        'PHPStan\\BetterReflection\\Reflection\\StringCast\\ReflectionConstantStringCast' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionConstantStringCast.php',
        'PHPStan\\BetterReflection\\Reflection\\StringCast\\ReflectionEnumCaseStringCast' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionEnumCaseStringCast.php',
        'PHPStan\\BetterReflection\\Reflection\\StringCast\\ReflectionFunctionStringCast' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionFunctionStringCast.php',
        'PHPStan\\BetterReflection\\Reflection\\StringCast\\ReflectionMethodStringCast' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionMethodStringCast.php',
        'PHPStan\\BetterReflection\\Reflection\\StringCast\\ReflectionParameterStringCast' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionParameterStringCast.php',
        'PHPStan\\BetterReflection\\Reflection\\StringCast\\ReflectionPropertyStringCast' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionPropertyStringCast.php',
        'PHPStan\\BetterReflection\\Reflection\\StringCast\\ReflectionTypeStringCast' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/StringCast/ReflectionTypeStringCast.php',
        'PHPStan\\BetterReflection\\Reflection\\Support\\AlreadyVisitedClasses' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflection/Support/AlreadyVisitedClasses.php',
        'PHPStan\\BetterReflection\\Reflector\\ClassReflector' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflector/ClassReflector.php',
        'PHPStan\\BetterReflection\\Reflector\\ConstantReflector' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflector/ConstantReflector.php',
        'PHPStan\\BetterReflection\\Reflector\\DefaultReflector' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflector/DefaultReflector.php',
        'PHPStan\\BetterReflection\\Reflector\\Exception\\IdentifierNotFound' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflector/Exception/IdentifierNotFound.php',
        'PHPStan\\BetterReflection\\Reflector\\FunctionReflector' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflector/FunctionReflector.php',
        'PHPStan\\BetterReflection\\Reflector\\Reflector' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Reflector/Reflector.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Ast\\Exception\\ParseToAstFailure' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Ast/Exception/ParseToAstFailure.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Ast\\FindReflectionsInTree' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Ast/FindReflectionsInTree.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Ast\\Locator' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Ast/Locator.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Ast\\Parser\\MemoizingParser' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Ast/Parser/MemoizingParser.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Ast\\Strategy\\AstConversionStrategy' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Ast/Strategy/AstConversionStrategy.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Ast\\Strategy\\NodeToReflection' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Ast/Strategy/NodeToReflection.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Exception\\EvaledAnonymousClassCannotBeLocated' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Exception/EvaledAnonymousClassCannotBeLocated.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Exception\\EvaledClosureCannotBeLocated' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Exception/EvaledClosureCannotBeLocated.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Exception\\FunctionUndefined' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Exception/FunctionUndefined.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Exception\\InvalidDirectory' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Exception/InvalidDirectory.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Exception\\InvalidFileInfo' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Exception/InvalidFileInfo.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Exception\\InvalidFileLocation' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Exception/InvalidFileLocation.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Exception\\NoAnonymousClassOnLine' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Exception/NoAnonymousClassOnLine.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Exception\\NoClosureOnLine' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Exception/NoClosureOnLine.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Exception\\NotInternalClass' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Exception/NotInternalClass.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Exception\\TwoAnonymousClassesOnSameLine' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Exception/TwoAnonymousClassesOnSameLine.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Exception\\TwoClosuresOnSameLine' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Exception/TwoClosuresOnSameLine.php',
        'PHPStan\\BetterReflection\\SourceLocator\\FileChecker' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/FileChecker.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Located\\AliasLocatedSource' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Located/AliasLocatedSource.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Located\\AnonymousLocatedSource' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Located/AnonymousLocatedSource.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Located\\EvaledLocatedSource' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Located/EvaledLocatedSource.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Located\\InternalLocatedSource' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Located/InternalLocatedSource.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Located\\LocatedSource' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Located/LocatedSource.php',
        'PHPStan\\BetterReflection\\SourceLocator\\SourceStubber\\AggregateSourceStubber' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/SourceStubber/AggregateSourceStubber.php',
        'PHPStan\\BetterReflection\\SourceLocator\\SourceStubber\\Exception\\CouldNotFindPhpStormStubs' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/SourceStubber/Exception/CouldNotFindPhpStormStubs.php',
        'PHPStan\\BetterReflection\\SourceLocator\\SourceStubber\\PhpStormStubsSourceStubber' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/SourceStubber/PhpStormStubsSourceStubber.php',
        'PHPStan\\BetterReflection\\SourceLocator\\SourceStubber\\PhpStormStubs\\CachingVisitor' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/SourceStubber/PhpStormStubs/CachingVisitor.php',
        'PHPStan\\BetterReflection\\SourceLocator\\SourceStubber\\ReflectionSourceStubber' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/SourceStubber/ReflectionSourceStubber.php',
        'PHPStan\\BetterReflection\\SourceLocator\\SourceStubber\\SourceStubber' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/SourceStubber/SourceStubber.php',
        'PHPStan\\BetterReflection\\SourceLocator\\SourceStubber\\StubData' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/SourceStubber/StubData.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\AbstractSourceLocator' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/AbstractSourceLocator.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\AggregateSourceLocator' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/AggregateSourceLocator.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\AnonymousClassObjectSourceLocator' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/AnonymousClassObjectSourceLocator.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\AutoloadSourceLocator' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/AutoloadSourceLocator.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\AutoloadSourceLocator\\FileReadTrapStreamWrapper' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/AutoloadSourceLocator/FileReadTrapStreamWrapper.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\ClosureSourceLocator' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/ClosureSourceLocator.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\ComposerSourceLocator' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/ComposerSourceLocator.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\Factory\\Exception\\Exception' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Factory/Exception/Exception.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\Factory\\Exception\\FailedToParseJson' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Factory/Exception/FailedToParseJson.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\Factory\\Exception\\InvalidProjectDirectory' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Factory/Exception/InvalidProjectDirectory.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\Factory\\Exception\\MissingComposerJson' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Factory/Exception/MissingComposerJson.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\Factory\\Exception\\MissingInstalledJson' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Factory/Exception/MissingInstalledJson.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\Factory\\MakeLocatorForComposerJson' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJson.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\Factory\\MakeLocatorForComposerJsonAndInstalledJson' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJsonAndInstalledJson.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\Factory\\MakeLocatorForInstalledJson' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Factory/MakeLocatorForInstalledJson.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\PsrAutoloaderLocator' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/PsrAutoloaderLocator.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\Psr\\Exception\\Exception' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Psr/Exception/Exception.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\Psr\\Exception\\InvalidPrefixMapping' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Psr/Exception/InvalidPrefixMapping.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\Psr\\Psr0Mapping' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Psr/Psr0Mapping.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\Psr\\Psr4Mapping' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Psr/Psr4Mapping.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\Composer\\Psr\\PsrAutoloaderMapping' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/Composer/Psr/PsrAutoloaderMapping.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\DirectoriesSourceLocator' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/DirectoriesSourceLocator.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\EvaledCodeSourceLocator' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/EvaledCodeSourceLocator.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\FileIteratorSourceLocator' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/FileIteratorSourceLocator.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\MemoizingSourceLocator' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/MemoizingSourceLocator.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\PhpInternalSourceLocator' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/PhpInternalSourceLocator.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\SingleFileSourceLocator' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/SingleFileSourceLocator.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\SourceLocator' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/SourceLocator.php',
        'PHPStan\\BetterReflection\\SourceLocator\\Type\\StringSourceLocator' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/SourceLocator/Type/StringSourceLocator.php',
        'PHPStan\\BetterReflection\\Util\\CalculateReflectionColumn' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Util/CalculateReflectionColumn.php',
        'PHPStan\\BetterReflection\\Util\\ClassExistenceChecker' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Util/ClassExistenceChecker.php',
        'PHPStan\\BetterReflection\\Util\\ConstantNodeChecker' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Util/ConstantNodeChecker.php',
        'PHPStan\\BetterReflection\\Util\\Exception\\InvalidNodePosition' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Util/Exception/InvalidNodePosition.php',
        'PHPStan\\BetterReflection\\Util\\Exception\\NoNodePosition' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Util/Exception/NoNodePosition.php',
        'PHPStan\\BetterReflection\\Util\\FileHelper' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Util/FileHelper.php',
        'PHPStan\\BetterReflection\\Util\\FindReflectionOnLine' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Util/FindReflectionOnLine.php',
        'PHPStan\\BetterReflection\\Util\\GetLastDocComment' => __DIR__ . '/..' . '/ondrejmirtes/better-reflection/src/Util/GetLastDocComment.php',
        'PHPStan\\Broker\\AnonymousClassNameHelper' => __DIR__ . '/../..' . '/src/Broker/AnonymousClassNameHelper.php',
        'PHPStan\\Broker\\Broker' => __DIR__ . '/../..' . '/src/Broker/Broker.php',
        'PHPStan\\Broker\\BrokerFactory' => __DIR__ . '/../..' . '/src/Broker/BrokerFactory.php',
        'PHPStan\\Broker\\ClassAutoloadingException' => __DIR__ . '/../..' . '/src/Broker/ClassAutoloadingException.php',
        'PHPStan\\Broker\\ClassNotFoundException' => __DIR__ . '/../..' . '/src/Broker/ClassNotFoundException.php',
        'PHPStan\\Broker\\ConstantNotFoundException' => __DIR__ . '/../..' . '/src/Broker/ConstantNotFoundException.php',
        'PHPStan\\Broker\\FunctionNotFoundException' => __DIR__ . '/../..' . '/src/Broker/FunctionNotFoundException.php',
        'PHPStan\\Cache\\Cache' => __DIR__ . '/../..' . '/src/Cache/Cache.php',
        'PHPStan\\Cache\\CacheItem' => __DIR__ . '/../..' . '/src/Cache/CacheItem.php',
        'PHPStan\\Cache\\CacheStorage' => __DIR__ . '/../..' . '/src/Cache/CacheStorage.php',
        'PHPStan\\Cache\\FileCacheStorage' => __DIR__ . '/../..' . '/src/Cache/FileCacheStorage.php',
        'PHPStan\\Cache\\MemoryCacheStorage' => __DIR__ . '/../..' . '/src/Cache/MemoryCacheStorage.php',
        'PHPStan\\Collectors\\CollectedData' => __DIR__ . '/../..' . '/src/Collectors/CollectedData.php',
        'PHPStan\\Collectors\\Collector' => __DIR__ . '/../..' . '/src/Collectors/Collector.php',
        'PHPStan\\Collectors\\Registry' => __DIR__ . '/../..' . '/src/Collectors/Registry.php',
        'PHPStan\\Collectors\\RegistryFactory' => __DIR__ . '/../..' . '/src/Collectors/RegistryFactory.php',
        'PHPStan\\Command\\AnalyseApplication' => __DIR__ . '/../..' . '/src/Command/AnalyseApplication.php',
        'PHPStan\\Command\\AnalyseCommand' => __DIR__ . '/../..' . '/src/Command/AnalyseCommand.php',
        'PHPStan\\Command\\AnalyserRunner' => __DIR__ . '/../..' . '/src/Command/AnalyserRunner.php',
        'PHPStan\\Command\\AnalysisResult' => __DIR__ . '/../..' . '/src/Command/AnalysisResult.php',
        'PHPStan\\Command\\ClearResultCacheCommand' => __DIR__ . '/../..' . '/src/Command/ClearResultCacheCommand.php',
        'PHPStan\\Command\\CommandHelper' => __DIR__ . '/../..' . '/src/Command/CommandHelper.php',
        'PHPStan\\Command\\DumpParametersCommand' => __DIR__ . '/../..' . '/src/Command/DumpParametersCommand.php',
        'PHPStan\\Command\\ErrorFormatter\\BaselineNeonErrorFormatter' => __DIR__ . '/../..' . '/src/Command/ErrorFormatter/BaselineNeonErrorFormatter.php',
        'PHPStan\\Command\\ErrorFormatter\\BaselinePhpErrorFormatter' => __DIR__ . '/../..' . '/src/Command/ErrorFormatter/BaselinePhpErrorFormatter.php',
        'PHPStan\\Command\\ErrorFormatter\\CheckstyleErrorFormatter' => __DIR__ . '/../..' . '/src/Command/ErrorFormatter/CheckstyleErrorFormatter.php',
        'PHPStan\\Command\\ErrorFormatter\\CiDetectedErrorFormatter' => __DIR__ . '/../..' . '/src/Command/ErrorFormatter/CiDetectedErrorFormatter.php',
        'PHPStan\\Command\\ErrorFormatter\\ErrorFormatter' => __DIR__ . '/../..' . '/src/Command/ErrorFormatter/ErrorFormatter.php',
        'PHPStan\\Command\\ErrorFormatter\\GithubErrorFormatter' => __DIR__ . '/../..' . '/src/Command/ErrorFormatter/GithubErrorFormatter.php',
        'PHPStan\\Command\\ErrorFormatter\\GitlabErrorFormatter' => __DIR__ . '/../..' . '/src/Command/ErrorFormatter/GitlabErrorFormatter.php',
        'PHPStan\\Command\\ErrorFormatter\\JsonErrorFormatter' => __DIR__ . '/../..' . '/src/Command/ErrorFormatter/JsonErrorFormatter.php',
        'PHPStan\\Command\\ErrorFormatter\\JunitErrorFormatter' => __DIR__ . '/../..' . '/src/Command/ErrorFormatter/JunitErrorFormatter.php',
        'PHPStan\\Command\\ErrorFormatter\\RawErrorFormatter' => __DIR__ . '/../..' . '/src/Command/ErrorFormatter/RawErrorFormatter.php',
        'PHPStan\\Command\\ErrorFormatter\\TableErrorFormatter' => __DIR__ . '/../..' . '/src/Command/ErrorFormatter/TableErrorFormatter.php',
        'PHPStan\\Command\\ErrorFormatter\\TeamcityErrorFormatter' => __DIR__ . '/../..' . '/src/Command/ErrorFormatter/TeamcityErrorFormatter.php',
        'PHPStan\\Command\\ErrorsConsoleStyle' => __DIR__ . '/../..' . '/src/Command/ErrorsConsoleStyle.php',
        'PHPStan\\Command\\FixerApplication' => __DIR__ . '/../..' . '/src/Command/FixerApplication.php',
        'PHPStan\\Command\\FixerProcessException' => __DIR__ . '/../..' . '/src/Command/FixerProcessException.php',
        'PHPStan\\Command\\FixerWorkerCommand' => __DIR__ . '/../..' . '/src/Command/FixerWorkerCommand.php',
        'PHPStan\\Command\\IgnoredRegexValidator' => __DIR__ . '/../..' . '/src/Command/IgnoredRegexValidator.php',
        'PHPStan\\Command\\IgnoredRegexValidatorResult' => __DIR__ . '/../..' . '/src/Command/IgnoredRegexValidatorResult.php',
        'PHPStan\\Command\\InceptionNotSuccessfulException' => __DIR__ . '/../..' . '/src/Command/InceptionNotSuccessfulException.php',
        'PHPStan\\Command\\InceptionResult' => __DIR__ . '/../..' . '/src/Command/InceptionResult.php',
        'PHPStan\\Command\\Output' => __DIR__ . '/../..' . '/src/Command/Output.php',
        'PHPStan\\Command\\OutputStyle' => __DIR__ . '/../..' . '/src/Command/OutputStyle.php',
        'PHPStan\\Command\\Symfony\\SymfonyOutput' => __DIR__ . '/../..' . '/src/Command/Symfony/SymfonyOutput.php',
        'PHPStan\\Command\\Symfony\\SymfonyStyle' => __DIR__ . '/../..' . '/src/Command/Symfony/SymfonyStyle.php',
        'PHPStan\\Command\\WorkerCommand' => __DIR__ . '/../..' . '/src/Command/WorkerCommand.php',
        'PHPStan\\DependencyInjection\\BleedingEdgeToggle' => __DIR__ . '/../..' . '/src/DependencyInjection/BleedingEdgeToggle.php',
        'PHPStan\\DependencyInjection\\ConditionalTagsExtension' => __DIR__ . '/../..' . '/src/DependencyInjection/ConditionalTagsExtension.php',
        'PHPStan\\DependencyInjection\\Configurator' => __DIR__ . '/../..' . '/src/DependencyInjection/Configurator.php',
        'PHPStan\\DependencyInjection\\Container' => __DIR__ . '/../..' . '/src/DependencyInjection/Container.php',
        'PHPStan\\DependencyInjection\\ContainerFactory' => __DIR__ . '/../..' . '/src/DependencyInjection/ContainerFactory.php',
        'PHPStan\\DependencyInjection\\DerivativeContainerFactory' => __DIR__ . '/../..' . '/src/DependencyInjection/DerivativeContainerFactory.php',
        'PHPStan\\DependencyInjection\\DuplicateIncludedFilesException' => __DIR__ . '/../..' . '/src/DependencyInjection/DuplicateIncludedFilesException.php',
        'PHPStan\\DependencyInjection\\InvalidIgnoredErrorPatternsException' => __DIR__ . '/../..' . '/src/DependencyInjection/InvalidIgnoredErrorPatternsException.php',
        'PHPStan\\DependencyInjection\\LoaderFactory' => __DIR__ . '/../..' . '/src/DependencyInjection/LoaderFactory.php',
        'PHPStan\\DependencyInjection\\MemoizingContainer' => __DIR__ . '/../..' . '/src/DependencyInjection/MemoizingContainer.php',
        'PHPStan\\DependencyInjection\\NeonAdapter' => __DIR__ . '/../..' . '/src/DependencyInjection/NeonAdapter.php',
        'PHPStan\\DependencyInjection\\NeonLoader' => __DIR__ . '/../..' . '/src/DependencyInjection/NeonLoader.php',
        'PHPStan\\DependencyInjection\\Nette\\NetteContainer' => __DIR__ . '/../..' . '/src/DependencyInjection/Nette/NetteContainer.php',
        'PHPStan\\DependencyInjection\\ParameterNotFoundException' => __DIR__ . '/../..' . '/src/DependencyInjection/ParameterNotFoundException.php',
        'PHPStan\\DependencyInjection\\ParametersSchemaExtension' => __DIR__ . '/../..' . '/src/DependencyInjection/ParametersSchemaExtension.php',
        'PHPStan\\DependencyInjection\\Reflection\\ClassReflectionExtensionRegistryProvider' => __DIR__ . '/../..' . '/src/DependencyInjection/Reflection/ClassReflectionExtensionRegistryProvider.php',
        'PHPStan\\DependencyInjection\\Reflection\\DirectClassReflectionExtensionRegistryProvider' => __DIR__ . '/../..' . '/src/DependencyInjection/Reflection/DirectClassReflectionExtensionRegistryProvider.php',
        'PHPStan\\DependencyInjection\\Reflection\\LazyClassReflectionExtensionRegistryProvider' => __DIR__ . '/../..' . '/src/DependencyInjection/Reflection/LazyClassReflectionExtensionRegistryProvider.php',
        'PHPStan\\DependencyInjection\\RulesExtension' => __DIR__ . '/../..' . '/src/DependencyInjection/RulesExtension.php',
        'PHPStan\\DependencyInjection\\Type\\DynamicReturnTypeExtensionRegistryProvider' => __DIR__ . '/../..' . '/src/DependencyInjection/Type/DynamicReturnTypeExtensionRegistryProvider.php',
        'PHPStan\\DependencyInjection\\Type\\DynamicThrowTypeExtensionProvider' => __DIR__ . '/../..' . '/src/DependencyInjection/Type/DynamicThrowTypeExtensionProvider.php',
        'PHPStan\\DependencyInjection\\Type\\LazyDynamicReturnTypeExtensionRegistryProvider' => __DIR__ . '/../..' . '/src/DependencyInjection/Type/LazyDynamicReturnTypeExtensionRegistryProvider.php',
        'PHPStan\\DependencyInjection\\Type\\LazyDynamicThrowTypeExtensionProvider' => __DIR__ . '/../..' . '/src/DependencyInjection/Type/LazyDynamicThrowTypeExtensionProvider.php',
        'PHPStan\\DependencyInjection\\Type\\LazyOperatorTypeSpecifyingExtensionRegistryProvider' => __DIR__ . '/../..' . '/src/DependencyInjection/Type/LazyOperatorTypeSpecifyingExtensionRegistryProvider.php',
        'PHPStan\\DependencyInjection\\Type\\OperatorTypeSpecifyingExtensionRegistryProvider' => __DIR__ . '/../..' . '/src/DependencyInjection/Type/OperatorTypeSpecifyingExtensionRegistryProvider.php',
        'PHPStan\\DependencyInjection\\ValidateIgnoredErrorsExtension' => __DIR__ . '/../..' . '/src/DependencyInjection/ValidateIgnoredErrorsExtension.php',
        'PHPStan\\Dependency\\DependencyResolver' => __DIR__ . '/../..' . '/src/Dependency/DependencyResolver.php',
        'PHPStan\\Dependency\\ExportedNode' => __DIR__ . '/../..' . '/src/Dependency/ExportedNode.php',
        'PHPStan\\Dependency\\ExportedNodeFetcher' => __DIR__ . '/../..' . '/src/Dependency/ExportedNodeFetcher.php',
        'PHPStan\\Dependency\\ExportedNodeResolver' => __DIR__ . '/../..' . '/src/Dependency/ExportedNodeResolver.php',
        'PHPStan\\Dependency\\ExportedNodeVisitor' => __DIR__ . '/../..' . '/src/Dependency/ExportedNodeVisitor.php',
        'PHPStan\\Dependency\\ExportedNode\\ExportedAttributeNode' => __DIR__ . '/../..' . '/src/Dependency/ExportedNode/ExportedAttributeNode.php',
        'PHPStan\\Dependency\\ExportedNode\\ExportedClassConstantNode' => __DIR__ . '/../..' . '/src/Dependency/ExportedNode/ExportedClassConstantNode.php',
        'PHPStan\\Dependency\\ExportedNode\\ExportedClassConstantsNode' => __DIR__ . '/../..' . '/src/Dependency/ExportedNode/ExportedClassConstantsNode.php',
        'PHPStan\\Dependency\\ExportedNode\\ExportedClassNode' => __DIR__ . '/../..' . '/src/Dependency/ExportedNode/ExportedClassNode.php',
        'PHPStan\\Dependency\\ExportedNode\\ExportedEnumCaseNode' => __DIR__ . '/../..' . '/src/Dependency/ExportedNode/ExportedEnumCaseNode.php',
        'PHPStan\\Dependency\\ExportedNode\\ExportedEnumNode' => __DIR__ . '/../..' . '/src/Dependency/ExportedNode/ExportedEnumNode.php',
        'PHPStan\\Dependency\\ExportedNode\\ExportedFunctionNode' => __DIR__ . '/../..' . '/src/Dependency/ExportedNode/ExportedFunctionNode.php',
        'PHPStan\\Dependency\\ExportedNode\\ExportedInterfaceNode' => __DIR__ . '/../..' . '/src/Dependency/ExportedNode/ExportedInterfaceNode.php',
        'PHPStan\\Dependency\\ExportedNode\\ExportedMethodNode' => __DIR__ . '/../..' . '/src/Dependency/ExportedNode/ExportedMethodNode.php',
        'PHPStan\\Dependency\\ExportedNode\\ExportedParameterNode' => __DIR__ . '/../..' . '/src/Dependency/ExportedNode/ExportedParameterNode.php',
        'PHPStan\\Dependency\\ExportedNode\\ExportedPhpDocNode' => __DIR__ . '/../..' . '/src/Dependency/ExportedNode/ExportedPhpDocNode.php',
        'PHPStan\\Dependency\\ExportedNode\\ExportedPropertiesNode' => __DIR__ . '/../..' . '/src/Dependency/ExportedNode/ExportedPropertiesNode.php',
        'PHPStan\\Dependency\\ExportedNode\\ExportedTraitNode' => __DIR__ . '/../..' . '/src/Dependency/ExportedNode/ExportedTraitNode.php',
        'PHPStan\\Dependency\\ExportedNode\\ExportedTraitUseAdaptation' => __DIR__ . '/../..' . '/src/Dependency/ExportedNode/ExportedTraitUseAdaptation.php',
        'PHPStan\\Dependency\\NodeDependencies' => __DIR__ . '/../..' . '/src/Dependency/NodeDependencies.php',
        'PHPStan\\Dependency\\RootExportedNode' => __DIR__ . '/../..' . '/src/Dependency/RootExportedNode.php',
        'PHPStan\\File\\CouldNotReadFileException' => __DIR__ . '/../..' . '/src/File/CouldNotReadFileException.php',
        'PHPStan\\File\\CouldNotWriteFileException' => __DIR__ . '/../..' . '/src/File/CouldNotWriteFileException.php',
        'PHPStan\\File\\FileExcluder' => __DIR__ . '/../..' . '/src/File/FileExcluder.php',
        'PHPStan\\File\\FileExcluderFactory' => __DIR__ . '/../..' . '/src/File/FileExcluderFactory.php',
        'PHPStan\\File\\FileExcluderRawFactory' => __DIR__ . '/../..' . '/src/File/FileExcluderRawFactory.php',
        'PHPStan\\File\\FileFinder' => __DIR__ . '/../..' . '/src/File/FileFinder.php',
        'PHPStan\\File\\FileFinderResult' => __DIR__ . '/../..' . '/src/File/FileFinderResult.php',
        'PHPStan\\File\\FileHelper' => __DIR__ . '/../..' . '/src/File/FileHelper.php',
        'PHPStan\\File\\FileMonitor' => __DIR__ . '/../..' . '/src/File/FileMonitor.php',
        'PHPStan\\File\\FileMonitorResult' => __DIR__ . '/../..' . '/src/File/FileMonitorResult.php',
        'PHPStan\\File\\FileReader' => __DIR__ . '/../..' . '/src/File/FileReader.php',
        'PHPStan\\File\\FileWriter' => __DIR__ . '/../..' . '/src/File/FileWriter.php',
        'PHPStan\\File\\FuzzyRelativePathHelper' => __DIR__ . '/../..' . '/src/File/FuzzyRelativePathHelper.php',
        'PHPStan\\File\\NullRelativePathHelper' => __DIR__ . '/../..' . '/src/File/NullRelativePathHelper.php',
        'PHPStan\\File\\ParentDirectoryRelativePathHelper' => __DIR__ . '/../..' . '/src/File/ParentDirectoryRelativePathHelper.php',
        'PHPStan\\File\\PathNotFoundException' => __DIR__ . '/../..' . '/src/File/PathNotFoundException.php',
        'PHPStan\\File\\RelativePathHelper' => __DIR__ . '/../..' . '/src/File/RelativePathHelper.php',
        'PHPStan\\File\\SimpleRelativePathHelper' => __DIR__ . '/../..' . '/src/File/SimpleRelativePathHelper.php',
        'PHPStan\\Internal\\BytesHelper' => __DIR__ . '/../..' . '/src/Internal/BytesHelper.php',
        'PHPStan\\Internal\\ComposerHelper' => __DIR__ . '/../..' . '/src/Internal/ComposerHelper.php',
        'PHPStan\\Internal\\ContainerDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Internal/ContainerDynamicReturnTypeExtension.php',
        'PHPStan\\Internal\\SprintfHelper' => __DIR__ . '/../..' . '/src/Internal/SprintfHelper.php',
        'PHPStan\\NodeVisitor\\StatementOrderVisitor' => __DIR__ . '/../..' . '/src/NodeVisitor/StatementOrderVisitor.php',
        'PHPStan\\Node\\BooleanAndNode' => __DIR__ . '/../..' . '/src/Node/BooleanAndNode.php',
        'PHPStan\\Node\\BooleanOrNode' => __DIR__ . '/../..' . '/src/Node/BooleanOrNode.php',
        'PHPStan\\Node\\BreaklessWhileLoopNode' => __DIR__ . '/../..' . '/src/Node/BreaklessWhileLoopNode.php',
        'PHPStan\\Node\\CatchWithUnthrownExceptionNode' => __DIR__ . '/../..' . '/src/Node/CatchWithUnthrownExceptionNode.php',
        'PHPStan\\Node\\ClassConstantsNode' => __DIR__ . '/../..' . '/src/Node/ClassConstantsNode.php',
        'PHPStan\\Node\\ClassMethod' => __DIR__ . '/../..' . '/src/Node/ClassMethod.php',
        'PHPStan\\Node\\ClassMethodsNode' => __DIR__ . '/../..' . '/src/Node/ClassMethodsNode.php',
        'PHPStan\\Node\\ClassPropertiesNode' => __DIR__ . '/../..' . '/src/Node/ClassPropertiesNode.php',
        'PHPStan\\Node\\ClassPropertyNode' => __DIR__ . '/../..' . '/src/Node/ClassPropertyNode.php',
        'PHPStan\\Node\\ClassStatementsGatherer' => __DIR__ . '/../..' . '/src/Node/ClassStatementsGatherer.php',
        'PHPStan\\Node\\ClosureReturnStatementsNode' => __DIR__ . '/../..' . '/src/Node/ClosureReturnStatementsNode.php',
        'PHPStan\\Node\\CollectedDataNode' => __DIR__ . '/../..' . '/src/Node/CollectedDataNode.php',
        'PHPStan\\Node\\Constant\\ClassConstantFetch' => __DIR__ . '/../..' . '/src/Node/Constant/ClassConstantFetch.php',
        'PHPStan\\Node\\DoWhileLoopConditionNode' => __DIR__ . '/../..' . '/src/Node/DoWhileLoopConditionNode.php',
        'PHPStan\\Node\\ExecutionEndNode' => __DIR__ . '/../..' . '/src/Node/ExecutionEndNode.php',
        'PHPStan\\Node\\Expr\\GetIterableKeyTypeExpr' => __DIR__ . '/../..' . '/src/Node/Expr/GetIterableKeyTypeExpr.php',
        'PHPStan\\Node\\Expr\\GetIterableValueTypeExpr' => __DIR__ . '/../..' . '/src/Node/Expr/GetIterableValueTypeExpr.php',
        'PHPStan\\Node\\Expr\\GetOffsetValueTypeExpr' => __DIR__ . '/../..' . '/src/Node/Expr/GetOffsetValueTypeExpr.php',
        'PHPStan\\Node\\Expr\\OriginalPropertyTypeExpr' => __DIR__ . '/../..' . '/src/Node/Expr/OriginalPropertyTypeExpr.php',
        'PHPStan\\Node\\Expr\\SetOffsetValueTypeExpr' => __DIR__ . '/../..' . '/src/Node/Expr/SetOffsetValueTypeExpr.php',
        'PHPStan\\Node\\Expr\\TypeExpr' => __DIR__ . '/../..' . '/src/Node/Expr/TypeExpr.php',
        'PHPStan\\Node\\FileNode' => __DIR__ . '/../..' . '/src/Node/FileNode.php',
        'PHPStan\\Node\\FinallyExitPointsNode' => __DIR__ . '/../..' . '/src/Node/FinallyExitPointsNode.php',
        'PHPStan\\Node\\FunctionCallableNode' => __DIR__ . '/../..' . '/src/Node/FunctionCallableNode.php',
        'PHPStan\\Node\\FunctionReturnStatementsNode' => __DIR__ . '/../..' . '/src/Node/FunctionReturnStatementsNode.php',
        'PHPStan\\Node\\InArrowFunctionNode' => __DIR__ . '/../..' . '/src/Node/InArrowFunctionNode.php',
        'PHPStan\\Node\\InClassMethodNode' => __DIR__ . '/../..' . '/src/Node/InClassMethodNode.php',
        'PHPStan\\Node\\InClassNode' => __DIR__ . '/../..' . '/src/Node/InClassNode.php',
        'PHPStan\\Node\\InClosureNode' => __DIR__ . '/../..' . '/src/Node/InClosureNode.php',
        'PHPStan\\Node\\InForeachNode' => __DIR__ . '/../..' . '/src/Node/InForeachNode.php',
        'PHPStan\\Node\\InFunctionNode' => __DIR__ . '/../..' . '/src/Node/InFunctionNode.php',
        'PHPStan\\Node\\InstantiationCallableNode' => __DIR__ . '/../..' . '/src/Node/InstantiationCallableNode.php',
        'PHPStan\\Node\\LiteralArrayItem' => __DIR__ . '/../..' . '/src/Node/LiteralArrayItem.php',
        'PHPStan\\Node\\LiteralArrayNode' => __DIR__ . '/../..' . '/src/Node/LiteralArrayNode.php',
        'PHPStan\\Node\\MatchExpressionArm' => __DIR__ . '/../..' . '/src/Node/MatchExpressionArm.php',
        'PHPStan\\Node\\MatchExpressionArmBody' => __DIR__ . '/../..' . '/src/Node/MatchExpressionArmBody.php',
        'PHPStan\\Node\\MatchExpressionArmCondition' => __DIR__ . '/../..' . '/src/Node/MatchExpressionArmCondition.php',
        'PHPStan\\Node\\MatchExpressionNode' => __DIR__ . '/../..' . '/src/Node/MatchExpressionNode.php',
        'PHPStan\\Node\\MethodCallableNode' => __DIR__ . '/../..' . '/src/Node/MethodCallableNode.php',
        'PHPStan\\Node\\MethodReturnStatementsNode' => __DIR__ . '/../..' . '/src/Node/MethodReturnStatementsNode.php',
        'PHPStan\\Node\\Method\\MethodCall' => __DIR__ . '/../..' . '/src/Node/Method/MethodCall.php',
        'PHPStan\\Node\\Printer\\ExprPrinter' => __DIR__ . '/../..' . '/src/Node/Printer/ExprPrinter.php',
        'PHPStan\\Node\\Printer\\Printer' => __DIR__ . '/../..' . '/src/Node/Printer/Printer.php',
        'PHPStan\\Node\\PropertyAssignNode' => __DIR__ . '/../..' . '/src/Node/PropertyAssignNode.php',
        'PHPStan\\Node\\Property\\PropertyRead' => __DIR__ . '/../..' . '/src/Node/Property/PropertyRead.php',
        'PHPStan\\Node\\Property\\PropertyWrite' => __DIR__ . '/../..' . '/src/Node/Property/PropertyWrite.php',
        'PHPStan\\Node\\ReturnStatement' => __DIR__ . '/../..' . '/src/Node/ReturnStatement.php',
        'PHPStan\\Node\\ReturnStatementsNode' => __DIR__ . '/../..' . '/src/Node/ReturnStatementsNode.php',
        'PHPStan\\Node\\StaticMethodCallableNode' => __DIR__ . '/../..' . '/src/Node/StaticMethodCallableNode.php',
        'PHPStan\\Node\\UnreachableStatementNode' => __DIR__ . '/../..' . '/src/Node/UnreachableStatementNode.php',
        'PHPStan\\Node\\VarTagChangedExpressionTypeNode' => __DIR__ . '/../..' . '/src/Node/VarTagChangedExpressionTypeNode.php',
        'PHPStan\\Node\\VirtualNode' => __DIR__ . '/../..' . '/src/Node/VirtualNode.php',
        'PHPStan\\Parallel\\ParallelAnalyser' => __DIR__ . '/../..' . '/src/Parallel/ParallelAnalyser.php',
        'PHPStan\\Parallel\\Process' => __DIR__ . '/../..' . '/src/Parallel/Process.php',
        'PHPStan\\Parallel\\ProcessPool' => __DIR__ . '/../..' . '/src/Parallel/ProcessPool.php',
        'PHPStan\\Parallel\\Schedule' => __DIR__ . '/../..' . '/src/Parallel/Schedule.php',
        'PHPStan\\Parallel\\Scheduler' => __DIR__ . '/../..' . '/src/Parallel/Scheduler.php',
        'PHPStan\\Parser\\ArrayFilterArgVisitor' => __DIR__ . '/../..' . '/src/Parser/ArrayFilterArgVisitor.php',
        'PHPStan\\Parser\\ArrayMapArgVisitor' => __DIR__ . '/../..' . '/src/Parser/ArrayMapArgVisitor.php',
        'PHPStan\\Parser\\ArrayWalkArgVisitor' => __DIR__ . '/../..' . '/src/Parser/ArrayWalkArgVisitor.php',
        'PHPStan\\Parser\\ArrowFunctionArgVisitor' => __DIR__ . '/../..' . '/src/Parser/ArrowFunctionArgVisitor.php',
        'PHPStan\\Parser\\CachedParser' => __DIR__ . '/../..' . '/src/Parser/CachedParser.php',
        'PHPStan\\Parser\\CleaningParser' => __DIR__ . '/../..' . '/src/Parser/CleaningParser.php',
        'PHPStan\\Parser\\CleaningVisitor' => __DIR__ . '/../..' . '/src/Parser/CleaningVisitor.php',
        'PHPStan\\Parser\\ClosureArgVisitor' => __DIR__ . '/../..' . '/src/Parser/ClosureArgVisitor.php',
        'PHPStan\\Parser\\CurlSetOptArgVisitor' => __DIR__ . '/../..' . '/src/Parser/CurlSetOptArgVisitor.php',
        'PHPStan\\Parser\\FunctionCallStatementFinder' => __DIR__ . '/../..' . '/src/Parser/FunctionCallStatementFinder.php',
        'PHPStan\\Parser\\LastConditionVisitor' => __DIR__ . '/../..' . '/src/Parser/LastConditionVisitor.php',
        'PHPStan\\Parser\\LexerFactory' => __DIR__ . '/../..' . '/src/Parser/LexerFactory.php',
        'PHPStan\\Parser\\NewAssignedToPropertyVisitor' => __DIR__ . '/../..' . '/src/Parser/NewAssignedToPropertyVisitor.php',
        'PHPStan\\Parser\\ParentStmtTypesVisitor' => __DIR__ . '/../..' . '/src/Parser/ParentStmtTypesVisitor.php',
        'PHPStan\\Parser\\Parser' => __DIR__ . '/../..' . '/src/Parser/Parser.php',
        'PHPStan\\Parser\\ParserErrorsException' => __DIR__ . '/../..' . '/src/Parser/ParserErrorsException.php',
        'PHPStan\\Parser\\PathRoutingParser' => __DIR__ . '/../..' . '/src/Parser/PathRoutingParser.php',
        'PHPStan\\Parser\\PhpParserDecorator' => __DIR__ . '/../..' . '/src/Parser/PhpParserDecorator.php',
        'PHPStan\\Parser\\RemoveUnusedCodeByPhpVersionIdVisitor' => __DIR__ . '/../..' . '/src/Parser/RemoveUnusedCodeByPhpVersionIdVisitor.php',
        'PHPStan\\Parser\\RichParser' => __DIR__ . '/../..' . '/src/Parser/RichParser.php',
        'PHPStan\\Parser\\SimpleParser' => __DIR__ . '/../..' . '/src/Parser/SimpleParser.php',
        'PHPStan\\Parser\\TryCatchTypeVisitor' => __DIR__ . '/../..' . '/src/Parser/TryCatchTypeVisitor.php',
        'PHPStan\\Parser\\TypeTraverserInstanceofVisitor' => __DIR__ . '/../..' . '/src/Parser/TypeTraverserInstanceofVisitor.php',
        'PHPStan\\Php8StubsMap' => __DIR__ . '/..' . '/phpstan/php-8-stubs/Php8StubsMap.php',
        'PHPStan\\PhpDocParser\\Ast\\AbstractNodeVisitor' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/AbstractNodeVisitor.php',
        'PHPStan\\PhpDocParser\\Ast\\Attribute' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Attribute.php',
        'PHPStan\\PhpDocParser\\Ast\\ConstExpr\\ConstExprArrayItemNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprArrayItemNode.php',
        'PHPStan\\PhpDocParser\\Ast\\ConstExpr\\ConstExprArrayNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprArrayNode.php',
        'PHPStan\\PhpDocParser\\Ast\\ConstExpr\\ConstExprFalseNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprFalseNode.php',
        'PHPStan\\PhpDocParser\\Ast\\ConstExpr\\ConstExprFloatNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprFloatNode.php',
        'PHPStan\\PhpDocParser\\Ast\\ConstExpr\\ConstExprIntegerNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprIntegerNode.php',
        'PHPStan\\PhpDocParser\\Ast\\ConstExpr\\ConstExprNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprNode.php',
        'PHPStan\\PhpDocParser\\Ast\\ConstExpr\\ConstExprNullNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprNullNode.php',
        'PHPStan\\PhpDocParser\\Ast\\ConstExpr\\ConstExprStringNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprStringNode.php',
        'PHPStan\\PhpDocParser\\Ast\\ConstExpr\\ConstExprTrueNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprTrueNode.php',
        'PHPStan\\PhpDocParser\\Ast\\ConstExpr\\ConstFetchNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstFetchNode.php',
        'PHPStan\\PhpDocParser\\Ast\\ConstExpr\\QuoteAwareConstExprStringNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/ConstExpr/QuoteAwareConstExprStringNode.php',
        'PHPStan\\PhpDocParser\\Ast\\Node' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Node.php',
        'PHPStan\\PhpDocParser\\Ast\\NodeAttributes' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/NodeAttributes.php',
        'PHPStan\\PhpDocParser\\Ast\\NodeTraverser' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/NodeTraverser.php',
        'PHPStan\\PhpDocParser\\Ast\\NodeVisitor' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/NodeVisitor.php',
        'PHPStan\\PhpDocParser\\Ast\\NodeVisitor\\CloningVisitor' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/NodeVisitor/CloningVisitor.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\AssertTagMethodValueNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/AssertTagMethodValueNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\AssertTagPropertyValueNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/AssertTagPropertyValueNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\AssertTagValueNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/AssertTagValueNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\DeprecatedTagValueNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/DeprecatedTagValueNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\Doctrine\\DoctrineAnnotation' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/Doctrine/DoctrineAnnotation.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\Doctrine\\DoctrineArgument' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/Doctrine/DoctrineArgument.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\Doctrine\\DoctrineArray' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/Doctrine/DoctrineArray.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\Doctrine\\DoctrineArrayItem' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/Doctrine/DoctrineArrayItem.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\Doctrine\\DoctrineTagValueNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/Doctrine/DoctrineTagValueNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\ExtendsTagValueNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/ExtendsTagValueNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\GenericTagValueNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/GenericTagValueNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\ImplementsTagValueNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/ImplementsTagValueNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\InvalidTagValueNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/InvalidTagValueNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\MethodTagValueNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/MethodTagValueNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\MethodTagValueParameterNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/MethodTagValueParameterNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\MixinTagValueNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/MixinTagValueNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\ParamOutTagValueNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/ParamOutTagValueNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\ParamTagValueNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/ParamTagValueNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\PhpDocChildNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocChildNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\PhpDocNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\PhpDocTagNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocTagNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\PhpDocTagValueNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocTagValueNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\PhpDocTextNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocTextNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\PropertyTagValueNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/PropertyTagValueNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\ReturnTagValueNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/ReturnTagValueNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\SelfOutTagValueNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/SelfOutTagValueNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\TemplateTagValueNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/TemplateTagValueNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\ThrowsTagValueNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/ThrowsTagValueNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\TypeAliasImportTagValueNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/TypeAliasImportTagValueNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\TypeAliasTagValueNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/TypeAliasTagValueNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\TypelessParamTagValueNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/TypelessParamTagValueNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\UsesTagValueNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/UsesTagValueNode.php',
        'PHPStan\\PhpDocParser\\Ast\\PhpDoc\\VarTagValueNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/PhpDoc/VarTagValueNode.php',
        'PHPStan\\PhpDocParser\\Ast\\Type\\ArrayShapeItemNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Type/ArrayShapeItemNode.php',
        'PHPStan\\PhpDocParser\\Ast\\Type\\ArrayShapeNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Type/ArrayShapeNode.php',
        'PHPStan\\PhpDocParser\\Ast\\Type\\ArrayTypeNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Type/ArrayTypeNode.php',
        'PHPStan\\PhpDocParser\\Ast\\Type\\CallableTypeNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Type/CallableTypeNode.php',
        'PHPStan\\PhpDocParser\\Ast\\Type\\CallableTypeParameterNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Type/CallableTypeParameterNode.php',
        'PHPStan\\PhpDocParser\\Ast\\Type\\ConditionalTypeForParameterNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Type/ConditionalTypeForParameterNode.php',
        'PHPStan\\PhpDocParser\\Ast\\Type\\ConditionalTypeNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Type/ConditionalTypeNode.php',
        'PHPStan\\PhpDocParser\\Ast\\Type\\ConstTypeNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Type/ConstTypeNode.php',
        'PHPStan\\PhpDocParser\\Ast\\Type\\GenericTypeNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Type/GenericTypeNode.php',
        'PHPStan\\PhpDocParser\\Ast\\Type\\IdentifierTypeNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Type/IdentifierTypeNode.php',
        'PHPStan\\PhpDocParser\\Ast\\Type\\IntersectionTypeNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Type/IntersectionTypeNode.php',
        'PHPStan\\PhpDocParser\\Ast\\Type\\InvalidTypeNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Type/InvalidTypeNode.php',
        'PHPStan\\PhpDocParser\\Ast\\Type\\NullableTypeNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Type/NullableTypeNode.php',
        'PHPStan\\PhpDocParser\\Ast\\Type\\ObjectShapeItemNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Type/ObjectShapeItemNode.php',
        'PHPStan\\PhpDocParser\\Ast\\Type\\ObjectShapeNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Type/ObjectShapeNode.php',
        'PHPStan\\PhpDocParser\\Ast\\Type\\OffsetAccessTypeNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Type/OffsetAccessTypeNode.php',
        'PHPStan\\PhpDocParser\\Ast\\Type\\ThisTypeNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Type/ThisTypeNode.php',
        'PHPStan\\PhpDocParser\\Ast\\Type\\TypeNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Type/TypeNode.php',
        'PHPStan\\PhpDocParser\\Ast\\Type\\UnionTypeNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Type/UnionTypeNode.php',
        'PHPStan\\PhpDocParser\\Lexer\\Lexer' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Lexer/Lexer.php',
        'PHPStan\\PhpDocParser\\Parser\\ConstExprParser' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Parser/ConstExprParser.php',
        'PHPStan\\PhpDocParser\\Parser\\ParserException' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Parser/ParserException.php',
        'PHPStan\\PhpDocParser\\Parser\\PhpDocParser' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Parser/PhpDocParser.php',
        'PHPStan\\PhpDocParser\\Parser\\StringUnescaper' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Parser/StringUnescaper.php',
        'PHPStan\\PhpDocParser\\Parser\\TokenIterator' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Parser/TokenIterator.php',
        'PHPStan\\PhpDocParser\\Parser\\TypeParser' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Parser/TypeParser.php',
        'PHPStan\\PhpDocParser\\Printer\\DiffElem' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Printer/DiffElem.php',
        'PHPStan\\PhpDocParser\\Printer\\Differ' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Printer/Differ.php',
        'PHPStan\\PhpDocParser\\Printer\\Printer' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Printer/Printer.php',
        'PHPStan\\PhpDoc\\ConstExprNodeResolver' => __DIR__ . '/../..' . '/src/PhpDoc/ConstExprNodeResolver.php',
        'PHPStan\\PhpDoc\\ConstExprParserFactory' => __DIR__ . '/../..' . '/src/PhpDoc/ConstExprParserFactory.php',
        'PHPStan\\PhpDoc\\CountableStubFilesExtension' => __DIR__ . '/../..' . '/src/PhpDoc/CountableStubFilesExtension.php',
        'PHPStan\\PhpDoc\\DefaultStubFilesProvider' => __DIR__ . '/../..' . '/src/PhpDoc/DefaultStubFilesProvider.php',
        'PHPStan\\PhpDoc\\DirectTypeNodeResolverExtensionRegistryProvider' => __DIR__ . '/../..' . '/src/PhpDoc/DirectTypeNodeResolverExtensionRegistryProvider.php',
        'PHPStan\\PhpDoc\\LazyTypeNodeResolverExtensionRegistryProvider' => __DIR__ . '/../..' . '/src/PhpDoc/LazyTypeNodeResolverExtensionRegistryProvider.php',
        'PHPStan\\PhpDoc\\PhpDocBlock' => __DIR__ . '/../..' . '/src/PhpDoc/PhpDocBlock.php',
        'PHPStan\\PhpDoc\\PhpDocInheritanceResolver' => __DIR__ . '/../..' . '/src/PhpDoc/PhpDocInheritanceResolver.php',
        'PHPStan\\PhpDoc\\PhpDocNodeResolver' => __DIR__ . '/../..' . '/src/PhpDoc/PhpDocNodeResolver.php',
        'PHPStan\\PhpDoc\\PhpDocStringResolver' => __DIR__ . '/../..' . '/src/PhpDoc/PhpDocStringResolver.php',
        'PHPStan\\PhpDoc\\ResolvedPhpDocBlock' => __DIR__ . '/../..' . '/src/PhpDoc/ResolvedPhpDocBlock.php',
        'PHPStan\\PhpDoc\\StubFilesExtension' => __DIR__ . '/../..' . '/src/PhpDoc/StubFilesExtension.php',
        'PHPStan\\PhpDoc\\StubFilesProvider' => __DIR__ . '/../..' . '/src/PhpDoc/StubFilesProvider.php',
        'PHPStan\\PhpDoc\\StubPhpDocProvider' => __DIR__ . '/../..' . '/src/PhpDoc/StubPhpDocProvider.php',
        'PHPStan\\PhpDoc\\StubSourceLocatorFactory' => __DIR__ . '/../..' . '/src/PhpDoc/StubSourceLocatorFactory.php',
        'PHPStan\\PhpDoc\\StubValidator' => __DIR__ . '/../..' . '/src/PhpDoc/StubValidator.php',
        'PHPStan\\PhpDoc\\Tag\\AssertTag' => __DIR__ . '/../..' . '/src/PhpDoc/Tag/AssertTag.php',
        'PHPStan\\PhpDoc\\Tag\\AssertTagParameter' => __DIR__ . '/../..' . '/src/PhpDoc/Tag/AssertTagParameter.php',
        'PHPStan\\PhpDoc\\Tag\\DeprecatedTag' => __DIR__ . '/../..' . '/src/PhpDoc/Tag/DeprecatedTag.php',
        'PHPStan\\PhpDoc\\Tag\\ExtendsTag' => __DIR__ . '/../..' . '/src/PhpDoc/Tag/ExtendsTag.php',
        'PHPStan\\PhpDoc\\Tag\\ImplementsTag' => __DIR__ . '/../..' . '/src/PhpDoc/Tag/ImplementsTag.php',
        'PHPStan\\PhpDoc\\Tag\\MethodTag' => __DIR__ . '/../..' . '/src/PhpDoc/Tag/MethodTag.php',
        'PHPStan\\PhpDoc\\Tag\\MethodTagParameter' => __DIR__ . '/../..' . '/src/PhpDoc/Tag/MethodTagParameter.php',
        'PHPStan\\PhpDoc\\Tag\\MixinTag' => __DIR__ . '/../..' . '/src/PhpDoc/Tag/MixinTag.php',
        'PHPStan\\PhpDoc\\Tag\\ParamOutTag' => __DIR__ . '/../..' . '/src/PhpDoc/Tag/ParamOutTag.php',
        'PHPStan\\PhpDoc\\Tag\\ParamTag' => __DIR__ . '/../..' . '/src/PhpDoc/Tag/ParamTag.php',
        'PHPStan\\PhpDoc\\Tag\\PropertyTag' => __DIR__ . '/../..' . '/src/PhpDoc/Tag/PropertyTag.php',
        'PHPStan\\PhpDoc\\Tag\\ReturnTag' => __DIR__ . '/../..' . '/src/PhpDoc/Tag/ReturnTag.php',
        'PHPStan\\PhpDoc\\Tag\\SelfOutTypeTag' => __DIR__ . '/../..' . '/src/PhpDoc/Tag/SelfOutTypeTag.php',
        'PHPStan\\PhpDoc\\Tag\\TemplateTag' => __DIR__ . '/../..' . '/src/PhpDoc/Tag/TemplateTag.php',
        'PHPStan\\PhpDoc\\Tag\\ThrowsTag' => __DIR__ . '/../..' . '/src/PhpDoc/Tag/ThrowsTag.php',
        'PHPStan\\PhpDoc\\Tag\\TypeAliasImportTag' => __DIR__ . '/../..' . '/src/PhpDoc/Tag/TypeAliasImportTag.php',
        'PHPStan\\PhpDoc\\Tag\\TypeAliasTag' => __DIR__ . '/../..' . '/src/PhpDoc/Tag/TypeAliasTag.php',
        'PHPStan\\PhpDoc\\Tag\\TypedTag' => __DIR__ . '/../..' . '/src/PhpDoc/Tag/TypedTag.php',
        'PHPStan\\PhpDoc\\Tag\\UsesTag' => __DIR__ . '/../..' . '/src/PhpDoc/Tag/UsesTag.php',
        'PHPStan\\PhpDoc\\Tag\\VarTag' => __DIR__ . '/../..' . '/src/PhpDoc/Tag/VarTag.php',
        'PHPStan\\PhpDoc\\TypeNodeResolver' => __DIR__ . '/../..' . '/src/PhpDoc/TypeNodeResolver.php',
        'PHPStan\\PhpDoc\\TypeNodeResolverAwareExtension' => __DIR__ . '/../..' . '/src/PhpDoc/TypeNodeResolverAwareExtension.php',
        'PHPStan\\PhpDoc\\TypeNodeResolverExtension' => __DIR__ . '/../..' . '/src/PhpDoc/TypeNodeResolverExtension.php',
        'PHPStan\\PhpDoc\\TypeNodeResolverExtensionAwareRegistry' => __DIR__ . '/../..' . '/src/PhpDoc/TypeNodeResolverExtensionAwareRegistry.php',
        'PHPStan\\PhpDoc\\TypeNodeResolverExtensionRegistry' => __DIR__ . '/../..' . '/src/PhpDoc/TypeNodeResolverExtensionRegistry.php',
        'PHPStan\\PhpDoc\\TypeNodeResolverExtensionRegistryProvider' => __DIR__ . '/../..' . '/src/PhpDoc/TypeNodeResolverExtensionRegistryProvider.php',
        'PHPStan\\PhpDoc\\TypeStringResolver' => __DIR__ . '/../..' . '/src/PhpDoc/TypeStringResolver.php',
        'PHPStan\\Php\\PhpVersion' => __DIR__ . '/../..' . '/src/Php/PhpVersion.php',
        'PHPStan\\Php\\PhpVersionFactory' => __DIR__ . '/../..' . '/src/Php/PhpVersionFactory.php',
        'PHPStan\\Php\\PhpVersionFactoryFactory' => __DIR__ . '/../..' . '/src/Php/PhpVersionFactoryFactory.php',
        'PHPStan\\Process\\CpuCoreCounter' => __DIR__ . '/../..' . '/src/Process/CpuCoreCounter.php',
        'PHPStan\\Process\\ProcessCanceledException' => __DIR__ . '/../..' . '/src/Process/ProcessCanceledException.php',
        'PHPStan\\Process\\ProcessCrashedException' => __DIR__ . '/../..' . '/src/Process/ProcessCrashedException.php',
        'PHPStan\\Process\\ProcessHelper' => __DIR__ . '/../..' . '/src/Process/ProcessHelper.php',
        'PHPStan\\Process\\ProcessPromise' => __DIR__ . '/../..' . '/src/Process/ProcessPromise.php',
        'PHPStan\\Reflection\\AdditionalConstructorsExtension' => __DIR__ . '/../..' . '/src/Reflection/AdditionalConstructorsExtension.php',
        'PHPStan\\Reflection\\AllowedSubTypesClassReflectionExtension' => __DIR__ . '/../..' . '/src/Reflection/AllowedSubTypesClassReflectionExtension.php',
        'PHPStan\\Reflection\\Annotations\\AnnotationMethodReflection' => __DIR__ . '/../..' . '/src/Reflection/Annotations/AnnotationMethodReflection.php',
        'PHPStan\\Reflection\\Annotations\\AnnotationPropertyReflection' => __DIR__ . '/../..' . '/src/Reflection/Annotations/AnnotationPropertyReflection.php',
        'PHPStan\\Reflection\\Annotations\\AnnotationsMethodParameterReflection' => __DIR__ . '/../..' . '/src/Reflection/Annotations/AnnotationsMethodParameterReflection.php',
        'PHPStan\\Reflection\\Annotations\\AnnotationsMethodsClassReflectionExtension' => __DIR__ . '/../..' . '/src/Reflection/Annotations/AnnotationsMethodsClassReflectionExtension.php',
        'PHPStan\\Reflection\\Annotations\\AnnotationsPropertiesClassReflectionExtension' => __DIR__ . '/../..' . '/src/Reflection/Annotations/AnnotationsPropertiesClassReflectionExtension.php',
        'PHPStan\\Reflection\\Assertions' => __DIR__ . '/../..' . '/src/Reflection/Assertions.php',
        'PHPStan\\Reflection\\BetterReflection\\BetterReflectionProvider' => __DIR__ . '/../..' . '/src/Reflection/BetterReflection/BetterReflectionProvider.php',
        'PHPStan\\Reflection\\BetterReflection\\BetterReflectionProviderFactory' => __DIR__ . '/../..' . '/src/Reflection/BetterReflection/BetterReflectionProviderFactory.php',
        'PHPStan\\Reflection\\BetterReflection\\BetterReflectionSourceLocatorFactory' => __DIR__ . '/../..' . '/src/Reflection/BetterReflection/BetterReflectionSourceLocatorFactory.php',
        'PHPStan\\Reflection\\BetterReflection\\Reflector\\MemoizingReflector' => __DIR__ . '/../..' . '/src/Reflection/BetterReflection/Reflector/MemoizingReflector.php',
        'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\AutoloadFunctionsSourceLocator' => __DIR__ . '/../..' . '/src/Reflection/BetterReflection/SourceLocator/AutoloadFunctionsSourceLocator.php',
        'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\AutoloadSourceLocator' => __DIR__ . '/../..' . '/src/Reflection/BetterReflection/SourceLocator/AutoloadSourceLocator.php',
        'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\CachingVisitor' => __DIR__ . '/../..' . '/src/Reflection/BetterReflection/SourceLocator/CachingVisitor.php',
        'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\ComposerJsonAndInstalledJsonSourceLocatorMaker' => __DIR__ . '/../..' . '/src/Reflection/BetterReflection/SourceLocator/ComposerJsonAndInstalledJsonSourceLocatorMaker.php',
        'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\FetchedNode' => __DIR__ . '/../..' . '/src/Reflection/BetterReflection/SourceLocator/FetchedNode.php',
        'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\FetchedNodesResult' => __DIR__ . '/../..' . '/src/Reflection/BetterReflection/SourceLocator/FetchedNodesResult.php',
        'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\FileNodesFetcher' => __DIR__ . '/../..' . '/src/Reflection/BetterReflection/SourceLocator/FileNodesFetcher.php',
        'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\FileReadTrapStreamWrapper' => __DIR__ . '/../..' . '/src/Reflection/BetterReflection/SourceLocator/FileReadTrapStreamWrapper.php',
        'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\OptimizedDirectorySourceLocator' => __DIR__ . '/../..' . '/src/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocator.php',
        'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\OptimizedDirectorySourceLocatorFactory' => __DIR__ . '/../..' . '/src/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocatorFactory.php',
        'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\OptimizedDirectorySourceLocatorRepository' => __DIR__ . '/../..' . '/src/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocatorRepository.php',
        'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\OptimizedPsrAutoloaderLocator' => __DIR__ . '/../..' . '/src/Reflection/BetterReflection/SourceLocator/OptimizedPsrAutoloaderLocator.php',
        'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\OptimizedPsrAutoloaderLocatorFactory' => __DIR__ . '/../..' . '/src/Reflection/BetterReflection/SourceLocator/OptimizedPsrAutoloaderLocatorFactory.php',
        'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\OptimizedSingleFileSourceLocator' => __DIR__ . '/../..' . '/src/Reflection/BetterReflection/SourceLocator/OptimizedSingleFileSourceLocator.php',
        'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\OptimizedSingleFileSourceLocatorFactory' => __DIR__ . '/../..' . '/src/Reflection/BetterReflection/SourceLocator/OptimizedSingleFileSourceLocatorFactory.php',
        'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\OptimizedSingleFileSourceLocatorRepository' => __DIR__ . '/../..' . '/src/Reflection/BetterReflection/SourceLocator/OptimizedSingleFileSourceLocatorRepository.php',
        'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\PhpFileCleaner' => __DIR__ . '/../..' . '/src/Reflection/BetterReflection/SourceLocator/PhpFileCleaner.php',
        'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\PhpVersionBlacklistSourceLocator' => __DIR__ . '/../..' . '/src/Reflection/BetterReflection/SourceLocator/PhpVersionBlacklistSourceLocator.php',
        'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\ReflectionClassSourceLocator' => __DIR__ . '/../..' . '/src/Reflection/BetterReflection/SourceLocator/ReflectionClassSourceLocator.php',
        'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\RewriteClassAliasSourceLocator' => __DIR__ . '/../..' . '/src/Reflection/BetterReflection/SourceLocator/RewriteClassAliasSourceLocator.php',
        'PHPStan\\Reflection\\BetterReflection\\SourceLocator\\SkipClassAliasSourceLocator' => __DIR__ . '/../..' . '/src/Reflection/BetterReflection/SourceLocator/SkipClassAliasSourceLocator.php',
        'PHPStan\\Reflection\\BetterReflection\\SourceStubber\\PhpStormStubsSourceStubberFactory' => __DIR__ . '/../..' . '/src/Reflection/BetterReflection/SourceStubber/PhpStormStubsSourceStubberFactory.php',
        'PHPStan\\Reflection\\BrokerAwareExtension' => __DIR__ . '/../..' . '/src/Reflection/BrokerAwareExtension.php',
        'PHPStan\\Reflection\\ClassConstantReflection' => __DIR__ . '/../..' . '/src/Reflection/ClassConstantReflection.php',
        'PHPStan\\Reflection\\ClassMemberAccessAnswerer' => __DIR__ . '/../..' . '/src/Reflection/ClassMemberAccessAnswerer.php',
        'PHPStan\\Reflection\\ClassMemberReflection' => __DIR__ . '/../..' . '/src/Reflection/ClassMemberReflection.php',
        'PHPStan\\Reflection\\ClassNameHelper' => __DIR__ . '/../..' . '/src/Reflection/ClassNameHelper.php',
        'PHPStan\\Reflection\\ClassReflection' => __DIR__ . '/../..' . '/src/Reflection/ClassReflection.php',
        'PHPStan\\Reflection\\ClassReflectionExtensionRegistry' => __DIR__ . '/../..' . '/src/Reflection/ClassReflectionExtensionRegistry.php',
        'PHPStan\\Reflection\\ConstantNameHelper' => __DIR__ . '/../..' . '/src/Reflection/ConstantNameHelper.php',
        'PHPStan\\Reflection\\ConstantReflection' => __DIR__ . '/../..' . '/src/Reflection/ConstantReflection.php',
        'PHPStan\\Reflection\\Constant\\RuntimeConstantReflection' => __DIR__ . '/../..' . '/src/Reflection/Constant/RuntimeConstantReflection.php',
        'PHPStan\\Reflection\\ConstructorsHelper' => __DIR__ . '/../..' . '/src/Reflection/ConstructorsHelper.php',
        'PHPStan\\Reflection\\Dummy\\ChangedTypeMethodReflection' => __DIR__ . '/../..' . '/src/Reflection/Dummy/ChangedTypeMethodReflection.php',
        'PHPStan\\Reflection\\Dummy\\ChangedTypePropertyReflection' => __DIR__ . '/../..' . '/src/Reflection/Dummy/ChangedTypePropertyReflection.php',
        'PHPStan\\Reflection\\Dummy\\DummyConstantReflection' => __DIR__ . '/../..' . '/src/Reflection/Dummy/DummyConstantReflection.php',
        'PHPStan\\Reflection\\Dummy\\DummyConstructorReflection' => __DIR__ . '/../..' . '/src/Reflection/Dummy/DummyConstructorReflection.php',
        'PHPStan\\Reflection\\Dummy\\DummyMethodReflection' => __DIR__ . '/../..' . '/src/Reflection/Dummy/DummyMethodReflection.php',
        'PHPStan\\Reflection\\Dummy\\DummyPropertyReflection' => __DIR__ . '/../..' . '/src/Reflection/Dummy/DummyPropertyReflection.php',
        'PHPStan\\Reflection\\EnumCaseReflection' => __DIR__ . '/../..' . '/src/Reflection/EnumCaseReflection.php',
        'PHPStan\\Reflection\\ExtendedMethodReflection' => __DIR__ . '/../..' . '/src/Reflection/ExtendedMethodReflection.php',
        'PHPStan\\Reflection\\FunctionReflection' => __DIR__ . '/../..' . '/src/Reflection/FunctionReflection.php',
        'PHPStan\\Reflection\\FunctionReflectionFactory' => __DIR__ . '/../..' . '/src/Reflection/FunctionReflectionFactory.php',
        'PHPStan\\Reflection\\FunctionVariant' => __DIR__ . '/../..' . '/src/Reflection/FunctionVariant.php',
        'PHPStan\\Reflection\\FunctionVariantWithPhpDocs' => __DIR__ . '/../..' . '/src/Reflection/FunctionVariantWithPhpDocs.php',
        'PHPStan\\Reflection\\GenericParametersAcceptorResolver' => __DIR__ . '/../..' . '/src/Reflection/GenericParametersAcceptorResolver.php',
        'PHPStan\\Reflection\\GlobalConstantReflection' => __DIR__ . '/../..' . '/src/Reflection/GlobalConstantReflection.php',
        'PHPStan\\Reflection\\InaccessibleMethod' => __DIR__ . '/../..' . '/src/Reflection/InaccessibleMethod.php',
        'PHPStan\\Reflection\\InitializerExprContext' => __DIR__ . '/../..' . '/src/Reflection/InitializerExprContext.php',
        'PHPStan\\Reflection\\InitializerExprTypeResolver' => __DIR__ . '/../..' . '/src/Reflection/InitializerExprTypeResolver.php',
        'PHPStan\\Reflection\\MethodPrototypeReflection' => __DIR__ . '/../..' . '/src/Reflection/MethodPrototypeReflection.php',
        'PHPStan\\Reflection\\MethodReflection' => __DIR__ . '/../..' . '/src/Reflection/MethodReflection.php',
        'PHPStan\\Reflection\\MethodsClassReflectionExtension' => __DIR__ . '/../..' . '/src/Reflection/MethodsClassReflectionExtension.php',
        'PHPStan\\Reflection\\MissingConstantFromReflectionException' => __DIR__ . '/../..' . '/src/Reflection/MissingConstantFromReflectionException.php',
        'PHPStan\\Reflection\\MissingMethodFromReflectionException' => __DIR__ . '/../..' . '/src/Reflection/MissingMethodFromReflectionException.php',
        'PHPStan\\Reflection\\MissingPropertyFromReflectionException' => __DIR__ . '/../..' . '/src/Reflection/MissingPropertyFromReflectionException.php',
        'PHPStan\\Reflection\\Mixin\\MixinMethodReflection' => __DIR__ . '/../..' . '/src/Reflection/Mixin/MixinMethodReflection.php',
        'PHPStan\\Reflection\\Mixin\\MixinMethodsClassReflectionExtension' => __DIR__ . '/../..' . '/src/Reflection/Mixin/MixinMethodsClassReflectionExtension.php',
        'PHPStan\\Reflection\\Mixin\\MixinPropertiesClassReflectionExtension' => __DIR__ . '/../..' . '/src/Reflection/Mixin/MixinPropertiesClassReflectionExtension.php',
        'PHPStan\\Reflection\\NamespaceAnswerer' => __DIR__ . '/../..' . '/src/Reflection/NamespaceAnswerer.php',
        'PHPStan\\Reflection\\Native\\NativeFunctionReflection' => __DIR__ . '/../..' . '/src/Reflection/Native/NativeFunctionReflection.php',
        'PHPStan\\Reflection\\Native\\NativeMethodReflection' => __DIR__ . '/../..' . '/src/Reflection/Native/NativeMethodReflection.php',
        'PHPStan\\Reflection\\Native\\NativeParameterReflection' => __DIR__ . '/../..' . '/src/Reflection/Native/NativeParameterReflection.php',
        'PHPStan\\Reflection\\Native\\NativeParameterWithPhpDocsReflection' => __DIR__ . '/../..' . '/src/Reflection/Native/NativeParameterWithPhpDocsReflection.php',
        'PHPStan\\Reflection\\ParameterReflection' => __DIR__ . '/../..' . '/src/Reflection/ParameterReflection.php',
        'PHPStan\\Reflection\\ParameterReflectionWithPhpDocs' => __DIR__ . '/../..' . '/src/Reflection/ParameterReflectionWithPhpDocs.php',
        'PHPStan\\Reflection\\ParametersAcceptor' => __DIR__ . '/../..' . '/src/Reflection/ParametersAcceptor.php',
        'PHPStan\\Reflection\\ParametersAcceptorSelector' => __DIR__ . '/../..' . '/src/Reflection/ParametersAcceptorSelector.php',
        'PHPStan\\Reflection\\ParametersAcceptorWithPhpDocs' => __DIR__ . '/../..' . '/src/Reflection/ParametersAcceptorWithPhpDocs.php',
        'PHPStan\\Reflection\\PassedByReference' => __DIR__ . '/../..' . '/src/Reflection/PassedByReference.php',
        'PHPStan\\Reflection\\Php\\BuiltinMethodReflection' => __DIR__ . '/../..' . '/src/Reflection/Php/BuiltinMethodReflection.php',
        'PHPStan\\Reflection\\Php\\ClosureCallMethodReflection' => __DIR__ . '/../..' . '/src/Reflection/Php/ClosureCallMethodReflection.php',
        'PHPStan\\Reflection\\Php\\ClosureCallUnresolvedMethodPrototypeReflection' => __DIR__ . '/../..' . '/src/Reflection/Php/ClosureCallUnresolvedMethodPrototypeReflection.php',
        'PHPStan\\Reflection\\Php\\DummyParameter' => __DIR__ . '/../..' . '/src/Reflection/Php/DummyParameter.php',
        'PHPStan\\Reflection\\Php\\DummyParameterWithPhpDocs' => __DIR__ . '/../..' . '/src/Reflection/Php/DummyParameterWithPhpDocs.php',
        'PHPStan\\Reflection\\Php\\EnumAllowedSubTypesClassReflectionExtension' => __DIR__ . '/../..' . '/src/Reflection/Php/EnumAllowedSubTypesClassReflectionExtension.php',
        'PHPStan\\Reflection\\Php\\EnumCasesMethodReflection' => __DIR__ . '/../..' . '/src/Reflection/Php/EnumCasesMethodReflection.php',
        'PHPStan\\Reflection\\Php\\EnumPropertyReflection' => __DIR__ . '/../..' . '/src/Reflection/Php/EnumPropertyReflection.php',
        'PHPStan\\Reflection\\Php\\EnumUnresolvedPropertyPrototypeReflection' => __DIR__ . '/../..' . '/src/Reflection/Php/EnumUnresolvedPropertyPrototypeReflection.php',
        'PHPStan\\Reflection\\Php\\FakeBuiltinMethodReflection' => __DIR__ . '/../..' . '/src/Reflection/Php/FakeBuiltinMethodReflection.php',
        'PHPStan\\Reflection\\Php\\NativeBuiltinMethodReflection' => __DIR__ . '/../..' . '/src/Reflection/Php/NativeBuiltinMethodReflection.php',
        'PHPStan\\Reflection\\Php\\PhpClassReflectionExtension' => __DIR__ . '/../..' . '/src/Reflection/Php/PhpClassReflectionExtension.php',
        'PHPStan\\Reflection\\Php\\PhpFunctionFromParserNodeReflection' => __DIR__ . '/../..' . '/src/Reflection/Php/PhpFunctionFromParserNodeReflection.php',
        'PHPStan\\Reflection\\Php\\PhpFunctionReflection' => __DIR__ . '/../..' . '/src/Reflection/Php/PhpFunctionReflection.php',
        'PHPStan\\Reflection\\Php\\PhpMethodFromParserNodeReflection' => __DIR__ . '/../..' . '/src/Reflection/Php/PhpMethodFromParserNodeReflection.php',
        'PHPStan\\Reflection\\Php\\PhpMethodReflection' => __DIR__ . '/../..' . '/src/Reflection/Php/PhpMethodReflection.php',
        'PHPStan\\Reflection\\Php\\PhpMethodReflectionFactory' => __DIR__ . '/../..' . '/src/Reflection/Php/PhpMethodReflectionFactory.php',
        'PHPStan\\Reflection\\Php\\PhpParameterFromParserNodeReflection' => __DIR__ . '/../..' . '/src/Reflection/Php/PhpParameterFromParserNodeReflection.php',
        'PHPStan\\Reflection\\Php\\PhpParameterReflection' => __DIR__ . '/../..' . '/src/Reflection/Php/PhpParameterReflection.php',
        'PHPStan\\Reflection\\Php\\PhpPropertyReflection' => __DIR__ . '/../..' . '/src/Reflection/Php/PhpPropertyReflection.php',
        'PHPStan\\Reflection\\Php\\SimpleXMLElementProperty' => __DIR__ . '/../..' . '/src/Reflection/Php/SimpleXMLElementProperty.php',
        'PHPStan\\Reflection\\Php\\Soap\\SoapClientMethodReflection' => __DIR__ . '/../..' . '/src/Reflection/Php/Soap/SoapClientMethodReflection.php',
        'PHPStan\\Reflection\\Php\\Soap\\SoapClientMethodsClassReflectionExtension' => __DIR__ . '/../..' . '/src/Reflection/Php/Soap/SoapClientMethodsClassReflectionExtension.php',
        'PHPStan\\Reflection\\Php\\UniversalObjectCrateProperty' => __DIR__ . '/../..' . '/src/Reflection/Php/UniversalObjectCrateProperty.php',
        'PHPStan\\Reflection\\Php\\UniversalObjectCratesClassReflectionExtension' => __DIR__ . '/../..' . '/src/Reflection/Php/UniversalObjectCratesClassReflectionExtension.php',
        'PHPStan\\Reflection\\PropertiesClassReflectionExtension' => __DIR__ . '/../..' . '/src/Reflection/PropertiesClassReflectionExtension.php',
        'PHPStan\\Reflection\\PropertyReflection' => __DIR__ . '/../..' . '/src/Reflection/PropertyReflection.php',
        'PHPStan\\Reflection\\ReflectionProvider' => __DIR__ . '/../..' . '/src/Reflection/ReflectionProvider.php',
        'PHPStan\\Reflection\\ReflectionProviderStaticAccessor' => __DIR__ . '/../..' . '/src/Reflection/ReflectionProviderStaticAccessor.php',
        'PHPStan\\Reflection\\ReflectionProvider\\DirectReflectionProviderProvider' => __DIR__ . '/../..' . '/src/Reflection/ReflectionProvider/DirectReflectionProviderProvider.php',
        'PHPStan\\Reflection\\ReflectionProvider\\DummyReflectionProvider' => __DIR__ . '/../..' . '/src/Reflection/ReflectionProvider/DummyReflectionProvider.php',
        'PHPStan\\Reflection\\ReflectionProvider\\LazyReflectionProviderProvider' => __DIR__ . '/../..' . '/src/Reflection/ReflectionProvider/LazyReflectionProviderProvider.php',
        'PHPStan\\Reflection\\ReflectionProvider\\MemoizingReflectionProvider' => __DIR__ . '/../..' . '/src/Reflection/ReflectionProvider/MemoizingReflectionProvider.php',
        'PHPStan\\Reflection\\ReflectionProvider\\ReflectionProviderFactory' => __DIR__ . '/../..' . '/src/Reflection/ReflectionProvider/ReflectionProviderFactory.php',
        'PHPStan\\Reflection\\ReflectionProvider\\ReflectionProviderProvider' => __DIR__ . '/../..' . '/src/Reflection/ReflectionProvider/ReflectionProviderProvider.php',
        'PHPStan\\Reflection\\ReflectionProvider\\SetterReflectionProviderProvider' => __DIR__ . '/../..' . '/src/Reflection/ReflectionProvider/SetterReflectionProviderProvider.php',
        'PHPStan\\Reflection\\ResolvedFunctionVariant' => __DIR__ . '/../..' . '/src/Reflection/ResolvedFunctionVariant.php',
        'PHPStan\\Reflection\\ResolvedMethodReflection' => __DIR__ . '/../..' . '/src/Reflection/ResolvedMethodReflection.php',
        'PHPStan\\Reflection\\ResolvedPropertyReflection' => __DIR__ . '/../..' . '/src/Reflection/ResolvedPropertyReflection.php',
        'PHPStan\\Reflection\\SignatureMap\\FunctionSignature' => __DIR__ . '/../..' . '/src/Reflection/SignatureMap/FunctionSignature.php',
        'PHPStan\\Reflection\\SignatureMap\\FunctionSignatureMapProvider' => __DIR__ . '/../..' . '/src/Reflection/SignatureMap/FunctionSignatureMapProvider.php',
        'PHPStan\\Reflection\\SignatureMap\\NativeFunctionReflectionProvider' => __DIR__ . '/../..' . '/src/Reflection/SignatureMap/NativeFunctionReflectionProvider.php',
        'PHPStan\\Reflection\\SignatureMap\\ParameterSignature' => __DIR__ . '/../..' . '/src/Reflection/SignatureMap/ParameterSignature.php',
        'PHPStan\\Reflection\\SignatureMap\\Php8SignatureMapProvider' => __DIR__ . '/../..' . '/src/Reflection/SignatureMap/Php8SignatureMapProvider.php',
        'PHPStan\\Reflection\\SignatureMap\\SignatureMapParser' => __DIR__ . '/../..' . '/src/Reflection/SignatureMap/SignatureMapParser.php',
        'PHPStan\\Reflection\\SignatureMap\\SignatureMapProvider' => __DIR__ . '/../..' . '/src/Reflection/SignatureMap/SignatureMapProvider.php',
        'PHPStan\\Reflection\\SignatureMap\\SignatureMapProviderFactory' => __DIR__ . '/../..' . '/src/Reflection/SignatureMap/SignatureMapProviderFactory.php',
        'PHPStan\\Reflection\\TrivialParametersAcceptor' => __DIR__ . '/../..' . '/src/Reflection/TrivialParametersAcceptor.php',
        'PHPStan\\Reflection\\Type\\CallbackUnresolvedMethodPrototypeReflection' => __DIR__ . '/../..' . '/src/Reflection/Type/CallbackUnresolvedMethodPrototypeReflection.php',
        'PHPStan\\Reflection\\Type\\CallbackUnresolvedPropertyPrototypeReflection' => __DIR__ . '/../..' . '/src/Reflection/Type/CallbackUnresolvedPropertyPrototypeReflection.php',
        'PHPStan\\Reflection\\Type\\CalledOnTypeUnresolvedMethodPrototypeReflection' => __DIR__ . '/../..' . '/src/Reflection/Type/CalledOnTypeUnresolvedMethodPrototypeReflection.php',
        'PHPStan\\Reflection\\Type\\CalledOnTypeUnresolvedPropertyPrototypeReflection' => __DIR__ . '/../..' . '/src/Reflection/Type/CalledOnTypeUnresolvedPropertyPrototypeReflection.php',
        'PHPStan\\Reflection\\Type\\IntersectionTypeMethodReflection' => __DIR__ . '/../..' . '/src/Reflection/Type/IntersectionTypeMethodReflection.php',
        'PHPStan\\Reflection\\Type\\IntersectionTypePropertyReflection' => __DIR__ . '/../..' . '/src/Reflection/Type/IntersectionTypePropertyReflection.php',
        'PHPStan\\Reflection\\Type\\IntersectionTypeUnresolvedMethodPrototypeReflection' => __DIR__ . '/../..' . '/src/Reflection/Type/IntersectionTypeUnresolvedMethodPrototypeReflection.php',
        'PHPStan\\Reflection\\Type\\IntersectionTypeUnresolvedPropertyPrototypeReflection' => __DIR__ . '/../..' . '/src/Reflection/Type/IntersectionTypeUnresolvedPropertyPrototypeReflection.php',
        'PHPStan\\Reflection\\Type\\UnionTypeMethodReflection' => __DIR__ . '/../..' . '/src/Reflection/Type/UnionTypeMethodReflection.php',
        'PHPStan\\Reflection\\Type\\UnionTypePropertyReflection' => __DIR__ . '/../..' . '/src/Reflection/Type/UnionTypePropertyReflection.php',
        'PHPStan\\Reflection\\Type\\UnionTypeUnresolvedMethodPrototypeReflection' => __DIR__ . '/../..' . '/src/Reflection/Type/UnionTypeUnresolvedMethodPrototypeReflection.php',
        'PHPStan\\Reflection\\Type\\UnionTypeUnresolvedPropertyPrototypeReflection' => __DIR__ . '/../..' . '/src/Reflection/Type/UnionTypeUnresolvedPropertyPrototypeReflection.php',
        'PHPStan\\Reflection\\Type\\UnresolvedMethodPrototypeReflection' => __DIR__ . '/../..' . '/src/Reflection/Type/UnresolvedMethodPrototypeReflection.php',
        'PHPStan\\Reflection\\Type\\UnresolvedPropertyPrototypeReflection' => __DIR__ . '/../..' . '/src/Reflection/Type/UnresolvedPropertyPrototypeReflection.php',
        'PHPStan\\Reflection\\WrappedExtendedMethodReflection' => __DIR__ . '/../..' . '/src/Reflection/WrappedExtendedMethodReflection.php',
        'PHPStan\\Reflection\\WrapperPropertyReflection' => __DIR__ . '/../..' . '/src/Reflection/WrapperPropertyReflection.php',
        'PHPStan\\Rules\\Api\\ApiClassConstFetchRule' => __DIR__ . '/../..' . '/src/Rules/Api/ApiClassConstFetchRule.php',
        'PHPStan\\Rules\\Api\\ApiClassExtendsRule' => __DIR__ . '/../..' . '/src/Rules/Api/ApiClassExtendsRule.php',
        'PHPStan\\Rules\\Api\\ApiClassImplementsRule' => __DIR__ . '/../..' . '/src/Rules/Api/ApiClassImplementsRule.php',
        'PHPStan\\Rules\\Api\\ApiInstanceofRule' => __DIR__ . '/../..' . '/src/Rules/Api/ApiInstanceofRule.php',
        'PHPStan\\Rules\\Api\\ApiInstanceofTypeRule' => __DIR__ . '/../..' . '/src/Rules/Api/ApiInstanceofTypeRule.php',
        'PHPStan\\Rules\\Api\\ApiInstantiationRule' => __DIR__ . '/../..' . '/src/Rules/Api/ApiInstantiationRule.php',
        'PHPStan\\Rules\\Api\\ApiInterfaceExtendsRule' => __DIR__ . '/../..' . '/src/Rules/Api/ApiInterfaceExtendsRule.php',
        'PHPStan\\Rules\\Api\\ApiMethodCallRule' => __DIR__ . '/../..' . '/src/Rules/Api/ApiMethodCallRule.php',
        'PHPStan\\Rules\\Api\\ApiRuleHelper' => __DIR__ . '/../..' . '/src/Rules/Api/ApiRuleHelper.php',
        'PHPStan\\Rules\\Api\\ApiStaticCallRule' => __DIR__ . '/../..' . '/src/Rules/Api/ApiStaticCallRule.php',
        'PHPStan\\Rules\\Api\\ApiTraitUseRule' => __DIR__ . '/../..' . '/src/Rules/Api/ApiTraitUseRule.php',
        'PHPStan\\Rules\\Api\\BcUncoveredInterface' => __DIR__ . '/../..' . '/src/Rules/Api/BcUncoveredInterface.php',
        'PHPStan\\Rules\\Api\\GetTemplateTypeRule' => __DIR__ . '/../..' . '/src/Rules/Api/GetTemplateTypeRule.php',
        'PHPStan\\Rules\\Api\\NodeConnectingVisitorAttributesRule' => __DIR__ . '/../..' . '/src/Rules/Api/NodeConnectingVisitorAttributesRule.php',
        'PHPStan\\Rules\\Api\\PhpStanNamespaceIn3rdPartyPackageRule' => __DIR__ . '/../..' . '/src/Rules/Api/PhpStanNamespaceIn3rdPartyPackageRule.php',
        'PHPStan\\Rules\\Api\\RuntimeReflectionFunctionRule' => __DIR__ . '/../..' . '/src/Rules/Api/RuntimeReflectionFunctionRule.php',
        'PHPStan\\Rules\\Api\\RuntimeReflectionInstantiationRule' => __DIR__ . '/../..' . '/src/Rules/Api/RuntimeReflectionInstantiationRule.php',
        'PHPStan\\Rules\\Arrays\\AllowedArrayKeysTypes' => __DIR__ . '/../..' . '/src/Rules/Arrays/AllowedArrayKeysTypes.php',
        'PHPStan\\Rules\\Arrays\\AppendedArrayItemTypeRule' => __DIR__ . '/../..' . '/src/Rules/Arrays/AppendedArrayItemTypeRule.php',
        'PHPStan\\Rules\\Arrays\\AppendedArrayKeyTypeRule' => __DIR__ . '/../..' . '/src/Rules/Arrays/AppendedArrayKeyTypeRule.php',
        'PHPStan\\Rules\\Arrays\\ArrayDestructuringRule' => __DIR__ . '/../..' . '/src/Rules/Arrays/ArrayDestructuringRule.php',
        'PHPStan\\Rules\\Arrays\\ArrayUnpackingRule' => __DIR__ . '/../..' . '/src/Rules/Arrays/ArrayUnpackingRule.php',
        'PHPStan\\Rules\\Arrays\\DeadForeachRule' => __DIR__ . '/../..' . '/src/Rules/Arrays/DeadForeachRule.php',
        'PHPStan\\Rules\\Arrays\\DuplicateKeysInLiteralArraysRule' => __DIR__ . '/../..' . '/src/Rules/Arrays/DuplicateKeysInLiteralArraysRule.php',
        'PHPStan\\Rules\\Arrays\\EmptyArrayItemRule' => __DIR__ . '/../..' . '/src/Rules/Arrays/EmptyArrayItemRule.php',
        'PHPStan\\Rules\\Arrays\\InvalidKeyInArrayDimFetchRule' => __DIR__ . '/../..' . '/src/Rules/Arrays/InvalidKeyInArrayDimFetchRule.php',
        'PHPStan\\Rules\\Arrays\\InvalidKeyInArrayItemRule' => __DIR__ . '/../..' . '/src/Rules/Arrays/InvalidKeyInArrayItemRule.php',
        'PHPStan\\Rules\\Arrays\\IterableInForeachRule' => __DIR__ . '/../..' . '/src/Rules/Arrays/IterableInForeachRule.php',
        'PHPStan\\Rules\\Arrays\\NonexistentOffsetInArrayDimFetchCheck' => __DIR__ . '/../..' . '/src/Rules/Arrays/NonexistentOffsetInArrayDimFetchCheck.php',
        'PHPStan\\Rules\\Arrays\\NonexistentOffsetInArrayDimFetchRule' => __DIR__ . '/../..' . '/src/Rules/Arrays/NonexistentOffsetInArrayDimFetchRule.php',
        'PHPStan\\Rules\\Arrays\\OffsetAccessAssignOpRule' => __DIR__ . '/../..' . '/src/Rules/Arrays/OffsetAccessAssignOpRule.php',
        'PHPStan\\Rules\\Arrays\\OffsetAccessAssignmentRule' => __DIR__ . '/../..' . '/src/Rules/Arrays/OffsetAccessAssignmentRule.php',
        'PHPStan\\Rules\\Arrays\\OffsetAccessValueAssignmentRule' => __DIR__ . '/../..' . '/src/Rules/Arrays/OffsetAccessValueAssignmentRule.php',
        'PHPStan\\Rules\\Arrays\\OffsetAccessWithoutDimForReadingRule' => __DIR__ . '/../..' . '/src/Rules/Arrays/OffsetAccessWithoutDimForReadingRule.php',
        'PHPStan\\Rules\\Arrays\\UnpackIterableInArrayRule' => __DIR__ . '/../..' . '/src/Rules/Arrays/UnpackIterableInArrayRule.php',
        'PHPStan\\Rules\\AttributesCheck' => __DIR__ . '/../..' . '/src/Rules/AttributesCheck.php',
        'PHPStan\\Rules\\Cast\\EchoRule' => __DIR__ . '/../..' . '/src/Rules/Cast/EchoRule.php',
        'PHPStan\\Rules\\Cast\\InvalidCastRule' => __DIR__ . '/../..' . '/src/Rules/Cast/InvalidCastRule.php',
        'PHPStan\\Rules\\Cast\\InvalidPartOfEncapsedStringRule' => __DIR__ . '/../..' . '/src/Rules/Cast/InvalidPartOfEncapsedStringRule.php',
        'PHPStan\\Rules\\Cast\\PrintRule' => __DIR__ . '/../..' . '/src/Rules/Cast/PrintRule.php',
        'PHPStan\\Rules\\Cast\\UnsetCastRule' => __DIR__ . '/../..' . '/src/Rules/Cast/UnsetCastRule.php',
        'PHPStan\\Rules\\ClassCaseSensitivityCheck' => __DIR__ . '/../..' . '/src/Rules/ClassCaseSensitivityCheck.php',
        'PHPStan\\Rules\\ClassNameNodePair' => __DIR__ . '/../..' . '/src/Rules/ClassNameNodePair.php',
        'PHPStan\\Rules\\Classes\\AccessPrivateConstantThroughStaticRule' => __DIR__ . '/../..' . '/src/Rules/Classes/AccessPrivateConstantThroughStaticRule.php',
        'PHPStan\\Rules\\Classes\\AllowedSubTypesRule' => __DIR__ . '/../..' . '/src/Rules/Classes/AllowedSubTypesRule.php',
        'PHPStan\\Rules\\Classes\\ClassAttributesRule' => __DIR__ . '/../..' . '/src/Rules/Classes/ClassAttributesRule.php',
        'PHPStan\\Rules\\Classes\\ClassConstantAttributesRule' => __DIR__ . '/../..' . '/src/Rules/Classes/ClassConstantAttributesRule.php',
        'PHPStan\\Rules\\Classes\\ClassConstantRule' => __DIR__ . '/../..' . '/src/Rules/Classes/ClassConstantRule.php',
        'PHPStan\\Rules\\Classes\\DuplicateClassDeclarationRule' => __DIR__ . '/../..' . '/src/Rules/Classes/DuplicateClassDeclarationRule.php',
        'PHPStan\\Rules\\Classes\\DuplicateDeclarationRule' => __DIR__ . '/../..' . '/src/Rules/Classes/DuplicateDeclarationRule.php',
        'PHPStan\\Rules\\Classes\\EnumSanityRule' => __DIR__ . '/../..' . '/src/Rules/Classes/EnumSanityRule.php',
        'PHPStan\\Rules\\Classes\\ExistingClassInClassExtendsRule' => __DIR__ . '/../..' . '/src/Rules/Classes/ExistingClassInClassExtendsRule.php',
        'PHPStan\\Rules\\Classes\\ExistingClassInInstanceOfRule' => __DIR__ . '/../..' . '/src/Rules/Classes/ExistingClassInInstanceOfRule.php',
        'PHPStan\\Rules\\Classes\\ExistingClassInTraitUseRule' => __DIR__ . '/../..' . '/src/Rules/Classes/ExistingClassInTraitUseRule.php',
        'PHPStan\\Rules\\Classes\\ExistingClassesInClassImplementsRule' => __DIR__ . '/../..' . '/src/Rules/Classes/ExistingClassesInClassImplementsRule.php',
        'PHPStan\\Rules\\Classes\\ExistingClassesInEnumImplementsRule' => __DIR__ . '/../..' . '/src/Rules/Classes/ExistingClassesInEnumImplementsRule.php',
        'PHPStan\\Rules\\Classes\\ExistingClassesInInterfaceExtendsRule' => __DIR__ . '/../..' . '/src/Rules/Classes/ExistingClassesInInterfaceExtendsRule.php',
        'PHPStan\\Rules\\Classes\\ImpossibleInstanceOfRule' => __DIR__ . '/../..' . '/src/Rules/Classes/ImpossibleInstanceOfRule.php',
        'PHPStan\\Rules\\Classes\\InstantiationCallableRule' => __DIR__ . '/../..' . '/src/Rules/Classes/InstantiationCallableRule.php',
        'PHPStan\\Rules\\Classes\\InstantiationRule' => __DIR__ . '/../..' . '/src/Rules/Classes/InstantiationRule.php',
        'PHPStan\\Rules\\Classes\\InvalidPromotedPropertiesRule' => __DIR__ . '/../..' . '/src/Rules/Classes/InvalidPromotedPropertiesRule.php',
        'PHPStan\\Rules\\Classes\\LocalTypeAliasesCheck' => __DIR__ . '/../..' . '/src/Rules/Classes/LocalTypeAliasesCheck.php',
        'PHPStan\\Rules\\Classes\\LocalTypeAliasesRule' => __DIR__ . '/../..' . '/src/Rules/Classes/LocalTypeAliasesRule.php',
        'PHPStan\\Rules\\Classes\\LocalTypeTraitAliasesRule' => __DIR__ . '/../..' . '/src/Rules/Classes/LocalTypeTraitAliasesRule.php',
        'PHPStan\\Rules\\Classes\\MixinRule' => __DIR__ . '/../..' . '/src/Rules/Classes/MixinRule.php',
        'PHPStan\\Rules\\Classes\\NewStaticRule' => __DIR__ . '/../..' . '/src/Rules/Classes/NewStaticRule.php',
        'PHPStan\\Rules\\Classes\\NonClassAttributeClassRule' => __DIR__ . '/../..' . '/src/Rules/Classes/NonClassAttributeClassRule.php',
        'PHPStan\\Rules\\Classes\\TraitAttributeClassRule' => __DIR__ . '/../..' . '/src/Rules/Classes/TraitAttributeClassRule.php',
        'PHPStan\\Rules\\Classes\\UnusedConstructorParametersRule' => __DIR__ . '/../..' . '/src/Rules/Classes/UnusedConstructorParametersRule.php',
        'PHPStan\\Rules\\Comparison\\BooleanAndConstantConditionRule' => __DIR__ . '/../..' . '/src/Rules/Comparison/BooleanAndConstantConditionRule.php',
        'PHPStan\\Rules\\Comparison\\BooleanNotConstantConditionRule' => __DIR__ . '/../..' . '/src/Rules/Comparison/BooleanNotConstantConditionRule.php',
        'PHPStan\\Rules\\Comparison\\BooleanOrConstantConditionRule' => __DIR__ . '/../..' . '/src/Rules/Comparison/BooleanOrConstantConditionRule.php',
        'PHPStan\\Rules\\Comparison\\ConstantConditionRuleHelper' => __DIR__ . '/../..' . '/src/Rules/Comparison/ConstantConditionRuleHelper.php',
        'PHPStan\\Rules\\Comparison\\ConstantLooseComparisonRule' => __DIR__ . '/../..' . '/src/Rules/Comparison/ConstantLooseComparisonRule.php',
        'PHPStan\\Rules\\Comparison\\DoWhileLoopConstantConditionRule' => __DIR__ . '/../..' . '/src/Rules/Comparison/DoWhileLoopConstantConditionRule.php',
        'PHPStan\\Rules\\Comparison\\ElseIfConstantConditionRule' => __DIR__ . '/../..' . '/src/Rules/Comparison/ElseIfConstantConditionRule.php',
        'PHPStan\\Rules\\Comparison\\IfConstantConditionRule' => __DIR__ . '/../..' . '/src/Rules/Comparison/IfConstantConditionRule.php',
        'PHPStan\\Rules\\Comparison\\ImpossibleCheckTypeFunctionCallRule' => __DIR__ . '/../..' . '/src/Rules/Comparison/ImpossibleCheckTypeFunctionCallRule.php',
        'PHPStan\\Rules\\Comparison\\ImpossibleCheckTypeHelper' => __DIR__ . '/../..' . '/src/Rules/Comparison/ImpossibleCheckTypeHelper.php',
        'PHPStan\\Rules\\Comparison\\ImpossibleCheckTypeMethodCallRule' => __DIR__ . '/../..' . '/src/Rules/Comparison/ImpossibleCheckTypeMethodCallRule.php',
        'PHPStan\\Rules\\Comparison\\ImpossibleCheckTypeStaticMethodCallRule' => __DIR__ . '/../..' . '/src/Rules/Comparison/ImpossibleCheckTypeStaticMethodCallRule.php',
        'PHPStan\\Rules\\Comparison\\MatchExpressionRule' => __DIR__ . '/../..' . '/src/Rules/Comparison/MatchExpressionRule.php',
        'PHPStan\\Rules\\Comparison\\NumberComparisonOperatorsConstantConditionRule' => __DIR__ . '/../..' . '/src/Rules/Comparison/NumberComparisonOperatorsConstantConditionRule.php',
        'PHPStan\\Rules\\Comparison\\StrictComparisonOfDifferentTypesRule' => __DIR__ . '/../..' . '/src/Rules/Comparison/StrictComparisonOfDifferentTypesRule.php',
        'PHPStan\\Rules\\Comparison\\TernaryOperatorConstantConditionRule' => __DIR__ . '/../..' . '/src/Rules/Comparison/TernaryOperatorConstantConditionRule.php',
        'PHPStan\\Rules\\Comparison\\UnreachableIfBranchesRule' => __DIR__ . '/../..' . '/src/Rules/Comparison/UnreachableIfBranchesRule.php',
        'PHPStan\\Rules\\Comparison\\UnreachableTernaryElseBranchRule' => __DIR__ . '/../..' . '/src/Rules/Comparison/UnreachableTernaryElseBranchRule.php',
        'PHPStan\\Rules\\Comparison\\UsageOfVoidMatchExpressionRule' => __DIR__ . '/../..' . '/src/Rules/Comparison/UsageOfVoidMatchExpressionRule.php',
        'PHPStan\\Rules\\Comparison\\WhileLoopAlwaysFalseConditionRule' => __DIR__ . '/../..' . '/src/Rules/Comparison/WhileLoopAlwaysFalseConditionRule.php',
        'PHPStan\\Rules\\Comparison\\WhileLoopAlwaysTrueConditionRule' => __DIR__ . '/../..' . '/src/Rules/Comparison/WhileLoopAlwaysTrueConditionRule.php',
        'PHPStan\\Rules\\Constants\\AlwaysUsedClassConstantsExtension' => __DIR__ . '/../..' . '/src/Rules/Constants/AlwaysUsedClassConstantsExtension.php',
        'PHPStan\\Rules\\Constants\\AlwaysUsedClassConstantsExtensionProvider' => __DIR__ . '/../..' . '/src/Rules/Constants/AlwaysUsedClassConstantsExtensionProvider.php',
        'PHPStan\\Rules\\Constants\\ConstantRule' => __DIR__ . '/../..' . '/src/Rules/Constants/ConstantRule.php',
        'PHPStan\\Rules\\Constants\\FinalConstantRule' => __DIR__ . '/../..' . '/src/Rules/Constants/FinalConstantRule.php',
        'PHPStan\\Rules\\Constants\\LazyAlwaysUsedClassConstantsExtensionProvider' => __DIR__ . '/../..' . '/src/Rules/Constants/LazyAlwaysUsedClassConstantsExtensionProvider.php',
        'PHPStan\\Rules\\Constants\\MissingClassConstantTypehintRule' => __DIR__ . '/../..' . '/src/Rules/Constants/MissingClassConstantTypehintRule.php',
        'PHPStan\\Rules\\Constants\\OverridingConstantRule' => __DIR__ . '/../..' . '/src/Rules/Constants/OverridingConstantRule.php',
        'PHPStan\\Rules\\DateTimeInstantiationRule' => __DIR__ . '/../..' . '/src/Rules/DateTimeInstantiationRule.php',
        'PHPStan\\Rules\\DeadCode\\NoopRule' => __DIR__ . '/../..' . '/src/Rules/DeadCode/NoopRule.php',
        'PHPStan\\Rules\\DeadCode\\UnreachableStatementRule' => __DIR__ . '/../..' . '/src/Rules/DeadCode/UnreachableStatementRule.php',
        'PHPStan\\Rules\\DeadCode\\UnusedPrivateConstantRule' => __DIR__ . '/../..' . '/src/Rules/DeadCode/UnusedPrivateConstantRule.php',
        'PHPStan\\Rules\\DeadCode\\UnusedPrivateMethodRule' => __DIR__ . '/../..' . '/src/Rules/DeadCode/UnusedPrivateMethodRule.php',
        'PHPStan\\Rules\\DeadCode\\UnusedPrivatePropertyRule' => __DIR__ . '/../..' . '/src/Rules/DeadCode/UnusedPrivatePropertyRule.php',
        'PHPStan\\Rules\\Debug\\DumpTypeRule' => __DIR__ . '/../..' . '/src/Rules/Debug/DumpTypeRule.php',
        'PHPStan\\Rules\\Debug\\FileAssertRule' => __DIR__ . '/../..' . '/src/Rules/Debug/FileAssertRule.php',
        'PHPStan\\Rules\\DirectRegistry' => __DIR__ . '/../..' . '/src/Rules/DirectRegistry.php',
        'PHPStan\\Rules\\EnumCases\\EnumCaseAttributesRule' => __DIR__ . '/../..' . '/src/Rules/EnumCases/EnumCaseAttributesRule.php',
        'PHPStan\\Rules\\Exceptions\\CatchWithUnthrownExceptionRule' => __DIR__ . '/../..' . '/src/Rules/Exceptions/CatchWithUnthrownExceptionRule.php',
        'PHPStan\\Rules\\Exceptions\\CaughtExceptionExistenceRule' => __DIR__ . '/../..' . '/src/Rules/Exceptions/CaughtExceptionExistenceRule.php',
        'PHPStan\\Rules\\Exceptions\\DefaultExceptionTypeResolver' => __DIR__ . '/../..' . '/src/Rules/Exceptions/DefaultExceptionTypeResolver.php',
        'PHPStan\\Rules\\Exceptions\\ExceptionTypeResolver' => __DIR__ . '/../..' . '/src/Rules/Exceptions/ExceptionTypeResolver.php',
        'PHPStan\\Rules\\Exceptions\\MissingCheckedExceptionInFunctionThrowsRule' => __DIR__ . '/../..' . '/src/Rules/Exceptions/MissingCheckedExceptionInFunctionThrowsRule.php',
        'PHPStan\\Rules\\Exceptions\\MissingCheckedExceptionInMethodThrowsRule' => __DIR__ . '/../..' . '/src/Rules/Exceptions/MissingCheckedExceptionInMethodThrowsRule.php',
        'PHPStan\\Rules\\Exceptions\\MissingCheckedExceptionInThrowsCheck' => __DIR__ . '/../..' . '/src/Rules/Exceptions/MissingCheckedExceptionInThrowsCheck.php',
        'PHPStan\\Rules\\Exceptions\\OverwrittenExitPointByFinallyRule' => __DIR__ . '/../..' . '/src/Rules/Exceptions/OverwrittenExitPointByFinallyRule.php',
        'PHPStan\\Rules\\Exceptions\\ThrowExpressionRule' => __DIR__ . '/../..' . '/src/Rules/Exceptions/ThrowExpressionRule.php',
        'PHPStan\\Rules\\Exceptions\\ThrowsVoidFunctionWithExplicitThrowPointRule' => __DIR__ . '/../..' . '/src/Rules/Exceptions/ThrowsVoidFunctionWithExplicitThrowPointRule.php',
        'PHPStan\\Rules\\Exceptions\\ThrowsVoidMethodWithExplicitThrowPointRule' => __DIR__ . '/../..' . '/src/Rules/Exceptions/ThrowsVoidMethodWithExplicitThrowPointRule.php',
        'PHPStan\\Rules\\Exceptions\\TooWideFunctionThrowTypeRule' => __DIR__ . '/../..' . '/src/Rules/Exceptions/TooWideFunctionThrowTypeRule.php',
        'PHPStan\\Rules\\Exceptions\\TooWideMethodThrowTypeRule' => __DIR__ . '/../..' . '/src/Rules/Exceptions/TooWideMethodThrowTypeRule.php',
        'PHPStan\\Rules\\Exceptions\\TooWideThrowTypeCheck' => __DIR__ . '/../..' . '/src/Rules/Exceptions/TooWideThrowTypeCheck.php',
        'PHPStan\\Rules\\FileRuleError' => __DIR__ . '/../..' . '/src/Rules/FileRuleError.php',
        'PHPStan\\Rules\\FoundTypeResult' => __DIR__ . '/../..' . '/src/Rules/FoundTypeResult.php',
        'PHPStan\\Rules\\FunctionCallParametersCheck' => __DIR__ . '/../..' . '/src/Rules/FunctionCallParametersCheck.php',
        'PHPStan\\Rules\\FunctionDefinitionCheck' => __DIR__ . '/../..' . '/src/Rules/FunctionDefinitionCheck.php',
        'PHPStan\\Rules\\FunctionReturnTypeCheck' => __DIR__ . '/../..' . '/src/Rules/FunctionReturnTypeCheck.php',
        'PHPStan\\Rules\\Functions\\ArrayFilterRule' => __DIR__ . '/../..' . '/src/Rules/Functions/ArrayFilterRule.php',
        'PHPStan\\Rules\\Functions\\ArrowFunctionAttributesRule' => __DIR__ . '/../..' . '/src/Rules/Functions/ArrowFunctionAttributesRule.php',
        'PHPStan\\Rules\\Functions\\ArrowFunctionReturnNullsafeByRefRule' => __DIR__ . '/../..' . '/src/Rules/Functions/ArrowFunctionReturnNullsafeByRefRule.php',
        'PHPStan\\Rules\\Functions\\ArrowFunctionReturnTypeRule' => __DIR__ . '/../..' . '/src/Rules/Functions/ArrowFunctionReturnTypeRule.php',
        'PHPStan\\Rules\\Functions\\CallCallablesRule' => __DIR__ . '/../..' . '/src/Rules/Functions/CallCallablesRule.php',
        'PHPStan\\Rules\\Functions\\CallToFunctionParametersRule' => __DIR__ . '/../..' . '/src/Rules/Functions/CallToFunctionParametersRule.php',
        'PHPStan\\Rules\\Functions\\CallToFunctionStatementWithoutSideEffectsRule' => __DIR__ . '/../..' . '/src/Rules/Functions/CallToFunctionStatementWithoutSideEffectsRule.php',
        'PHPStan\\Rules\\Functions\\CallToNonExistentFunctionRule' => __DIR__ . '/../..' . '/src/Rules/Functions/CallToNonExistentFunctionRule.php',
        'PHPStan\\Rules\\Functions\\ClosureAttributesRule' => __DIR__ . '/../..' . '/src/Rules/Functions/ClosureAttributesRule.php',
        'PHPStan\\Rules\\Functions\\ClosureReturnTypeRule' => __DIR__ . '/../..' . '/src/Rules/Functions/ClosureReturnTypeRule.php',
        'PHPStan\\Rules\\Functions\\DefineParametersRule' => __DIR__ . '/../..' . '/src/Rules/Functions/DefineParametersRule.php',
        'PHPStan\\Rules\\Functions\\DuplicateFunctionDeclarationRule' => __DIR__ . '/../..' . '/src/Rules/Functions/DuplicateFunctionDeclarationRule.php',
        'PHPStan\\Rules\\Functions\\ExistingClassesInArrowFunctionTypehintsRule' => __DIR__ . '/../..' . '/src/Rules/Functions/ExistingClassesInArrowFunctionTypehintsRule.php',
        'PHPStan\\Rules\\Functions\\ExistingClassesInClosureTypehintsRule' => __DIR__ . '/../..' . '/src/Rules/Functions/ExistingClassesInClosureTypehintsRule.php',
        'PHPStan\\Rules\\Functions\\ExistingClassesInTypehintsRule' => __DIR__ . '/../..' . '/src/Rules/Functions/ExistingClassesInTypehintsRule.php',
        'PHPStan\\Rules\\Functions\\FunctionAttributesRule' => __DIR__ . '/../..' . '/src/Rules/Functions/FunctionAttributesRule.php',
        'PHPStan\\Rules\\Functions\\FunctionCallableRule' => __DIR__ . '/../..' . '/src/Rules/Functions/FunctionCallableRule.php',
        'PHPStan\\Rules\\Functions\\ImplodeFunctionRule' => __DIR__ . '/../..' . '/src/Rules/Functions/ImplodeFunctionRule.php',
        'PHPStan\\Rules\\Functions\\IncompatibleArrowFunctionDefaultParameterTypeRule' => __DIR__ . '/../..' . '/src/Rules/Functions/IncompatibleArrowFunctionDefaultParameterTypeRule.php',
        'PHPStan\\Rules\\Functions\\IncompatibleClosureDefaultParameterTypeRule' => __DIR__ . '/../..' . '/src/Rules/Functions/IncompatibleClosureDefaultParameterTypeRule.php',
        'PHPStan\\Rules\\Functions\\IncompatibleDefaultParameterTypeRule' => __DIR__ . '/../..' . '/src/Rules/Functions/IncompatibleDefaultParameterTypeRule.php',
        'PHPStan\\Rules\\Functions\\InnerFunctionRule' => __DIR__ . '/../..' . '/src/Rules/Functions/InnerFunctionRule.php',
        'PHPStan\\Rules\\Functions\\MissingFunctionParameterTypehintRule' => __DIR__ . '/../..' . '/src/Rules/Functions/MissingFunctionParameterTypehintRule.php',
        'PHPStan\\Rules\\Functions\\MissingFunctionReturnTypehintRule' => __DIR__ . '/../..' . '/src/Rules/Functions/MissingFunctionReturnTypehintRule.php',
        'PHPStan\\Rules\\Functions\\ParamAttributesRule' => __DIR__ . '/../..' . '/src/Rules/Functions/ParamAttributesRule.php',
        'PHPStan\\Rules\\Functions\\PrintfParametersRule' => __DIR__ . '/../..' . '/src/Rules/Functions/PrintfParametersRule.php',
        'PHPStan\\Rules\\Functions\\RandomIntParametersRule' => __DIR__ . '/../..' . '/src/Rules/Functions/RandomIntParametersRule.php',
        'PHPStan\\Rules\\Functions\\ReturnNullsafeByRefRule' => __DIR__ . '/../..' . '/src/Rules/Functions/ReturnNullsafeByRefRule.php',
        'PHPStan\\Rules\\Functions\\ReturnTypeRule' => __DIR__ . '/../..' . '/src/Rules/Functions/ReturnTypeRule.php',
        'PHPStan\\Rules\\Functions\\UnusedClosureUsesRule' => __DIR__ . '/../..' . '/src/Rules/Functions/UnusedClosureUsesRule.php',
        'PHPStan\\Rules\\Generators\\YieldFromTypeRule' => __DIR__ . '/../..' . '/src/Rules/Generators/YieldFromTypeRule.php',
        'PHPStan\\Rules\\Generators\\YieldInGeneratorRule' => __DIR__ . '/../..' . '/src/Rules/Generators/YieldInGeneratorRule.php',
        'PHPStan\\Rules\\Generators\\YieldTypeRule' => __DIR__ . '/../..' . '/src/Rules/Generators/YieldTypeRule.php',
        'PHPStan\\Rules\\Generics\\ClassAncestorsRule' => __DIR__ . '/../..' . '/src/Rules/Generics/ClassAncestorsRule.php',
        'PHPStan\\Rules\\Generics\\ClassTemplateTypeRule' => __DIR__ . '/../..' . '/src/Rules/Generics/ClassTemplateTypeRule.php',
        'PHPStan\\Rules\\Generics\\CrossCheckInterfacesHelper' => __DIR__ . '/../..' . '/src/Rules/Generics/CrossCheckInterfacesHelper.php',
        'PHPStan\\Rules\\Generics\\EnumAncestorsRule' => __DIR__ . '/../..' . '/src/Rules/Generics/EnumAncestorsRule.php',
        'PHPStan\\Rules\\Generics\\EnumTemplateTypeRule' => __DIR__ . '/../..' . '/src/Rules/Generics/EnumTemplateTypeRule.php',
        'PHPStan\\Rules\\Generics\\FunctionSignatureVarianceRule' => __DIR__ . '/../..' . '/src/Rules/Generics/FunctionSignatureVarianceRule.php',
        'PHPStan\\Rules\\Generics\\FunctionTemplateTypeRule' => __DIR__ . '/../..' . '/src/Rules/Generics/FunctionTemplateTypeRule.php',
        'PHPStan\\Rules\\Generics\\GenericAncestorsCheck' => __DIR__ . '/../..' . '/src/Rules/Generics/GenericAncestorsCheck.php',
        'PHPStan\\Rules\\Generics\\GenericObjectTypeCheck' => __DIR__ . '/../..' . '/src/Rules/Generics/GenericObjectTypeCheck.php',
        'PHPStan\\Rules\\Generics\\InterfaceAncestorsRule' => __DIR__ . '/../..' . '/src/Rules/Generics/InterfaceAncestorsRule.php',
        'PHPStan\\Rules\\Generics\\InterfaceTemplateTypeRule' => __DIR__ . '/../..' . '/src/Rules/Generics/InterfaceTemplateTypeRule.php',
        'PHPStan\\Rules\\Generics\\MethodSignatureVarianceRule' => __DIR__ . '/../..' . '/src/Rules/Generics/MethodSignatureVarianceRule.php',
        'PHPStan\\Rules\\Generics\\MethodTemplateTypeRule' => __DIR__ . '/../..' . '/src/Rules/Generics/MethodTemplateTypeRule.php',
        'PHPStan\\Rules\\Generics\\PropertyVarianceRule' => __DIR__ . '/../..' . '/src/Rules/Generics/PropertyVarianceRule.php',
        'PHPStan\\Rules\\Generics\\TemplateTypeCheck' => __DIR__ . '/../..' . '/src/Rules/Generics/TemplateTypeCheck.php',
        'PHPStan\\Rules\\Generics\\TraitTemplateTypeRule' => __DIR__ . '/../..' . '/src/Rules/Generics/TraitTemplateTypeRule.php',
        'PHPStan\\Rules\\Generics\\UsedTraitsRule' => __DIR__ . '/../..' . '/src/Rules/Generics/UsedTraitsRule.php',
        'PHPStan\\Rules\\Generics\\VarianceCheck' => __DIR__ . '/../..' . '/src/Rules/Generics/VarianceCheck.php',
        'PHPStan\\Rules\\IdentifierRuleError' => __DIR__ . '/../..' . '/src/Rules/IdentifierRuleError.php',
        'PHPStan\\Rules\\IssetCheck' => __DIR__ . '/../..' . '/src/Rules/IssetCheck.php',
        'PHPStan\\Rules\\Keywords\\ContinueBreakInLoopRule' => __DIR__ . '/../..' . '/src/Rules/Keywords/ContinueBreakInLoopRule.php',
        'PHPStan\\Rules\\LazyRegistry' => __DIR__ . '/../..' . '/src/Rules/LazyRegistry.php',
        'PHPStan\\Rules\\LineRuleError' => __DIR__ . '/../..' . '/src/Rules/LineRuleError.php',
        'PHPStan\\Rules\\MetadataRuleError' => __DIR__ . '/../..' . '/src/Rules/MetadataRuleError.php',
        'PHPStan\\Rules\\Methods\\AbstractMethodInNonAbstractClassRule' => __DIR__ . '/../..' . '/src/Rules/Methods/AbstractMethodInNonAbstractClassRule.php',
        'PHPStan\\Rules\\Methods\\CallMethodsRule' => __DIR__ . '/../..' . '/src/Rules/Methods/CallMethodsRule.php',
        'PHPStan\\Rules\\Methods\\CallPrivateMethodThroughStaticRule' => __DIR__ . '/../..' . '/src/Rules/Methods/CallPrivateMethodThroughStaticRule.php',
        'PHPStan\\Rules\\Methods\\CallStaticMethodsRule' => __DIR__ . '/../..' . '/src/Rules/Methods/CallStaticMethodsRule.php',
        'PHPStan\\Rules\\Methods\\CallToConstructorStatementWithoutSideEffectsRule' => __DIR__ . '/../..' . '/src/Rules/Methods/CallToConstructorStatementWithoutSideEffectsRule.php',
        'PHPStan\\Rules\\Methods\\CallToMethodStatementWithoutSideEffectsRule' => __DIR__ . '/../..' . '/src/Rules/Methods/CallToMethodStatementWithoutSideEffectsRule.php',
        'PHPStan\\Rules\\Methods\\CallToStaticMethodStatementWithoutSideEffectsRule' => __DIR__ . '/../..' . '/src/Rules/Methods/CallToStaticMethodStatementWithoutSideEffectsRule.php',
        'PHPStan\\Rules\\Methods\\ConsistentConstructorRule' => __DIR__ . '/../..' . '/src/Rules/Methods/ConsistentConstructorRule.php',
        'PHPStan\\Rules\\Methods\\ExistingClassesInTypehintsRule' => __DIR__ . '/../..' . '/src/Rules/Methods/ExistingClassesInTypehintsRule.php',
        'PHPStan\\Rules\\Methods\\FinalPrivateMethodRule' => __DIR__ . '/../..' . '/src/Rules/Methods/FinalPrivateMethodRule.php',
        'PHPStan\\Rules\\Methods\\IllegalConstructorMethodCallRule' => __DIR__ . '/../..' . '/src/Rules/Methods/IllegalConstructorMethodCallRule.php',
        'PHPStan\\Rules\\Methods\\IllegalConstructorStaticCallRule' => __DIR__ . '/../..' . '/src/Rules/Methods/IllegalConstructorStaticCallRule.php',
        'PHPStan\\Rules\\Methods\\IncompatibleDefaultParameterTypeRule' => __DIR__ . '/../..' . '/src/Rules/Methods/IncompatibleDefaultParameterTypeRule.php',
        'PHPStan\\Rules\\Methods\\MethodAttributesRule' => __DIR__ . '/../..' . '/src/Rules/Methods/MethodAttributesRule.php',
        'PHPStan\\Rules\\Methods\\MethodCallCheck' => __DIR__ . '/../..' . '/src/Rules/Methods/MethodCallCheck.php',
        'PHPStan\\Rules\\Methods\\MethodCallableRule' => __DIR__ . '/../..' . '/src/Rules/Methods/MethodCallableRule.php',
        'PHPStan\\Rules\\Methods\\MethodParameterComparisonHelper' => __DIR__ . '/../..' . '/src/Rules/Methods/MethodParameterComparisonHelper.php',
        'PHPStan\\Rules\\Methods\\MethodSignatureRule' => __DIR__ . '/../..' . '/src/Rules/Methods/MethodSignatureRule.php',
        'PHPStan\\Rules\\Methods\\MissingMagicSerializationMethodsRule' => __DIR__ . '/../..' . '/src/Rules/Methods/MissingMagicSerializationMethodsRule.php',
        'PHPStan\\Rules\\Methods\\MissingMethodImplementationRule' => __DIR__ . '/../..' . '/src/Rules/Methods/MissingMethodImplementationRule.php',
        'PHPStan\\Rules\\Methods\\MissingMethodParameterTypehintRule' => __DIR__ . '/../..' . '/src/Rules/Methods/MissingMethodParameterTypehintRule.php',
        'PHPStan\\Rules\\Methods\\MissingMethodReturnTypehintRule' => __DIR__ . '/../..' . '/src/Rules/Methods/MissingMethodReturnTypehintRule.php',
        'PHPStan\\Rules\\Methods\\NullsafeMethodCallRule' => __DIR__ . '/../..' . '/src/Rules/Methods/NullsafeMethodCallRule.php',
        'PHPStan\\Rules\\Methods\\OverridingMethodRule' => __DIR__ . '/../..' . '/src/Rules/Methods/OverridingMethodRule.php',
        'PHPStan\\Rules\\Methods\\ReturnTypeRule' => __DIR__ . '/../..' . '/src/Rules/Methods/ReturnTypeRule.php',
        'PHPStan\\Rules\\Methods\\StaticMethodCallCheck' => __DIR__ . '/../..' . '/src/Rules/Methods/StaticMethodCallCheck.php',
        'PHPStan\\Rules\\Methods\\StaticMethodCallableRule' => __DIR__ . '/../..' . '/src/Rules/Methods/StaticMethodCallableRule.php',
        'PHPStan\\Rules\\MissingTypehintCheck' => __DIR__ . '/../..' . '/src/Rules/MissingTypehintCheck.php',
        'PHPStan\\Rules\\Missing\\MissingReturnRule' => __DIR__ . '/../..' . '/src/Rules/Missing/MissingReturnRule.php',
        'PHPStan\\Rules\\Namespaces\\ExistingNamesInGroupUseRule' => __DIR__ . '/../..' . '/src/Rules/Namespaces/ExistingNamesInGroupUseRule.php',
        'PHPStan\\Rules\\Namespaces\\ExistingNamesInUseRule' => __DIR__ . '/../..' . '/src/Rules/Namespaces/ExistingNamesInUseRule.php',
        'PHPStan\\Rules\\NonIgnorableRuleError' => __DIR__ . '/../..' . '/src/Rules/NonIgnorableRuleError.php',
        'PHPStan\\Rules\\NullsafeCheck' => __DIR__ . '/../..' . '/src/Rules/NullsafeCheck.php',
        'PHPStan\\Rules\\Operators\\InvalidAssignVarRule' => __DIR__ . '/../..' . '/src/Rules/Operators/InvalidAssignVarRule.php',
        'PHPStan\\Rules\\Operators\\InvalidBinaryOperationRule' => __DIR__ . '/../..' . '/src/Rules/Operators/InvalidBinaryOperationRule.php',
        'PHPStan\\Rules\\Operators\\InvalidComparisonOperationRule' => __DIR__ . '/../..' . '/src/Rules/Operators/InvalidComparisonOperationRule.php',
        'PHPStan\\Rules\\Operators\\InvalidIncDecOperationRule' => __DIR__ . '/../..' . '/src/Rules/Operators/InvalidIncDecOperationRule.php',
        'PHPStan\\Rules\\Operators\\InvalidUnaryOperationRule' => __DIR__ . '/../..' . '/src/Rules/Operators/InvalidUnaryOperationRule.php',
        'PHPStan\\Rules\\PhpDoc\\AssertRuleHelper' => __DIR__ . '/../..' . '/src/Rules/PhpDoc/AssertRuleHelper.php',
        'PHPStan\\Rules\\PhpDoc\\ConditionalReturnTypeRuleHelper' => __DIR__ . '/../..' . '/src/Rules/PhpDoc/ConditionalReturnTypeRuleHelper.php',
        'PHPStan\\Rules\\PhpDoc\\FunctionAssertRule' => __DIR__ . '/../..' . '/src/Rules/PhpDoc/FunctionAssertRule.php',
        'PHPStan\\Rules\\PhpDoc\\FunctionConditionalReturnTypeRule' => __DIR__ . '/../..' . '/src/Rules/PhpDoc/FunctionConditionalReturnTypeRule.php',
        'PHPStan\\Rules\\PhpDoc\\IncompatibleClassConstantPhpDocTypeRule' => __DIR__ . '/../..' . '/src/Rules/PhpDoc/IncompatibleClassConstantPhpDocTypeRule.php',
        'PHPStan\\Rules\\PhpDoc\\IncompatiblePhpDocTypeRule' => __DIR__ . '/../..' . '/src/Rules/PhpDoc/IncompatiblePhpDocTypeRule.php',
        'PHPStan\\Rules\\PhpDoc\\IncompatiblePropertyPhpDocTypeRule' => __DIR__ . '/../..' . '/src/Rules/PhpDoc/IncompatiblePropertyPhpDocTypeRule.php',
        'PHPStan\\Rules\\PhpDoc\\IncompatibleSelfOutTypeRule' => __DIR__ . '/../..' . '/src/Rules/PhpDoc/IncompatibleSelfOutTypeRule.php',
        'PHPStan\\Rules\\PhpDoc\\InvalidPHPStanDocTagRule' => __DIR__ . '/../..' . '/src/Rules/PhpDoc/InvalidPHPStanDocTagRule.php',
        'PHPStan\\Rules\\PhpDoc\\InvalidPhpDocTagValueRule' => __DIR__ . '/../..' . '/src/Rules/PhpDoc/InvalidPhpDocTagValueRule.php',
        'PHPStan\\Rules\\PhpDoc\\InvalidPhpDocVarTagTypeRule' => __DIR__ . '/../..' . '/src/Rules/PhpDoc/InvalidPhpDocVarTagTypeRule.php',
        'PHPStan\\Rules\\PhpDoc\\InvalidThrowsPhpDocValueRule' => __DIR__ . '/../..' . '/src/Rules/PhpDoc/InvalidThrowsPhpDocValueRule.php',
        'PHPStan\\Rules\\PhpDoc\\MethodAssertRule' => __DIR__ . '/../..' . '/src/Rules/PhpDoc/MethodAssertRule.php',
        'PHPStan\\Rules\\PhpDoc\\MethodConditionalReturnTypeRule' => __DIR__ . '/../..' . '/src/Rules/PhpDoc/MethodConditionalReturnTypeRule.php',
        'PHPStan\\Rules\\PhpDoc\\UnresolvableTypeHelper' => __DIR__ . '/../..' . '/src/Rules/PhpDoc/UnresolvableTypeHelper.php',
        'PHPStan\\Rules\\PhpDoc\\VarTagChangedExpressionTypeRule' => __DIR__ . '/../..' . '/src/Rules/PhpDoc/VarTagChangedExpressionTypeRule.php',
        'PHPStan\\Rules\\PhpDoc\\VarTagTypeRuleHelper' => __DIR__ . '/../..' . '/src/Rules/PhpDoc/VarTagTypeRuleHelper.php',
        'PHPStan\\Rules\\PhpDoc\\WrongVariableNameInVarTagRule' => __DIR__ . '/../..' . '/src/Rules/PhpDoc/WrongVariableNameInVarTagRule.php',
        'PHPStan\\Rules\\Playground\\FunctionNeverRule' => __DIR__ . '/../..' . '/src/Rules/Playground/FunctionNeverRule.php',
        'PHPStan\\Rules\\Playground\\MethodNeverRule' => __DIR__ . '/../..' . '/src/Rules/Playground/MethodNeverRule.php',
        'PHPStan\\Rules\\Playground\\NeverRuleHelper' => __DIR__ . '/../..' . '/src/Rules/Playground/NeverRuleHelper.php',
        'PHPStan\\Rules\\Properties\\AccessPrivatePropertyThroughStaticRule' => __DIR__ . '/../..' . '/src/Rules/Properties/AccessPrivatePropertyThroughStaticRule.php',
        'PHPStan\\Rules\\Properties\\AccessPropertiesInAssignRule' => __DIR__ . '/../..' . '/src/Rules/Properties/AccessPropertiesInAssignRule.php',
        'PHPStan\\Rules\\Properties\\AccessPropertiesRule' => __DIR__ . '/../..' . '/src/Rules/Properties/AccessPropertiesRule.php',
        'PHPStan\\Rules\\Properties\\AccessStaticPropertiesInAssignRule' => __DIR__ . '/../..' . '/src/Rules/Properties/AccessStaticPropertiesInAssignRule.php',
        'PHPStan\\Rules\\Properties\\AccessStaticPropertiesRule' => __DIR__ . '/../..' . '/src/Rules/Properties/AccessStaticPropertiesRule.php',
        'PHPStan\\Rules\\Properties\\DefaultValueTypesAssignedToPropertiesRule' => __DIR__ . '/../..' . '/src/Rules/Properties/DefaultValueTypesAssignedToPropertiesRule.php',
        'PHPStan\\Rules\\Properties\\DirectReadWritePropertiesExtensionProvider' => __DIR__ . '/../..' . '/src/Rules/Properties/DirectReadWritePropertiesExtensionProvider.php',
        'PHPStan\\Rules\\Properties\\ExistingClassesInPropertiesRule' => __DIR__ . '/../..' . '/src/Rules/Properties/ExistingClassesInPropertiesRule.php',
        'PHPStan\\Rules\\Properties\\FoundPropertyReflection' => __DIR__ . '/../..' . '/src/Rules/Properties/FoundPropertyReflection.php',
        'PHPStan\\Rules\\Properties\\LazyReadWritePropertiesExtensionProvider' => __DIR__ . '/../..' . '/src/Rules/Properties/LazyReadWritePropertiesExtensionProvider.php',
        'PHPStan\\Rules\\Properties\\MissingPropertyTypehintRule' => __DIR__ . '/../..' . '/src/Rules/Properties/MissingPropertyTypehintRule.php',
        'PHPStan\\Rules\\Properties\\MissingReadOnlyByPhpDocPropertyAssignRule' => __DIR__ . '/../..' . '/src/Rules/Properties/MissingReadOnlyByPhpDocPropertyAssignRule.php',
        'PHPStan\\Rules\\Properties\\MissingReadOnlyPropertyAssignRule' => __DIR__ . '/../..' . '/src/Rules/Properties/MissingReadOnlyPropertyAssignRule.php',
        'PHPStan\\Rules\\Properties\\NullsafePropertyFetchRule' => __DIR__ . '/../..' . '/src/Rules/Properties/NullsafePropertyFetchRule.php',
        'PHPStan\\Rules\\Properties\\OverridingPropertyRule' => __DIR__ . '/../..' . '/src/Rules/Properties/OverridingPropertyRule.php',
        'PHPStan\\Rules\\Properties\\PropertyAttributesRule' => __DIR__ . '/../..' . '/src/Rules/Properties/PropertyAttributesRule.php',
        'PHPStan\\Rules\\Properties\\PropertyDescriptor' => __DIR__ . '/../..' . '/src/Rules/Properties/PropertyDescriptor.php',
        'PHPStan\\Rules\\Properties\\PropertyReflectionFinder' => __DIR__ . '/../..' . '/src/Rules/Properties/PropertyReflectionFinder.php',
        'PHPStan\\Rules\\Properties\\ReadOnlyByPhpDocPropertyAssignRefRule' => __DIR__ . '/../..' . '/src/Rules/Properties/ReadOnlyByPhpDocPropertyAssignRefRule.php',
        'PHPStan\\Rules\\Properties\\ReadOnlyByPhpDocPropertyAssignRule' => __DIR__ . '/../..' . '/src/Rules/Properties/ReadOnlyByPhpDocPropertyAssignRule.php',
        'PHPStan\\Rules\\Properties\\ReadOnlyByPhpDocPropertyRule' => __DIR__ . '/../..' . '/src/Rules/Properties/ReadOnlyByPhpDocPropertyRule.php',
        'PHPStan\\Rules\\Properties\\ReadOnlyPropertyAssignRefRule' => __DIR__ . '/../..' . '/src/Rules/Properties/ReadOnlyPropertyAssignRefRule.php',
        'PHPStan\\Rules\\Properties\\ReadOnlyPropertyAssignRule' => __DIR__ . '/../..' . '/src/Rules/Properties/ReadOnlyPropertyAssignRule.php',
        'PHPStan\\Rules\\Properties\\ReadOnlyPropertyRule' => __DIR__ . '/../..' . '/src/Rules/Properties/ReadOnlyPropertyRule.php',
        'PHPStan\\Rules\\Properties\\ReadWritePropertiesExtension' => __DIR__ . '/../..' . '/src/Rules/Properties/ReadWritePropertiesExtension.php',
        'PHPStan\\Rules\\Properties\\ReadWritePropertiesExtensionProvider' => __DIR__ . '/../..' . '/src/Rules/Properties/ReadWritePropertiesExtensionProvider.php',
        'PHPStan\\Rules\\Properties\\ReadingWriteOnlyPropertiesRule' => __DIR__ . '/../..' . '/src/Rules/Properties/ReadingWriteOnlyPropertiesRule.php',
        'PHPStan\\Rules\\Properties\\TypesAssignedToPropertiesRule' => __DIR__ . '/../..' . '/src/Rules/Properties/TypesAssignedToPropertiesRule.php',
        'PHPStan\\Rules\\Properties\\UninitializedPropertyRule' => __DIR__ . '/../..' . '/src/Rules/Properties/UninitializedPropertyRule.php',
        'PHPStan\\Rules\\Properties\\WritingToReadOnlyPropertiesRule' => __DIR__ . '/../..' . '/src/Rules/Properties/WritingToReadOnlyPropertiesRule.php',
        'PHPStan\\Rules\\Regexp\\RegularExpressionPatternRule' => __DIR__ . '/../..' . '/src/Rules/Regexp/RegularExpressionPatternRule.php',
        'PHPStan\\Rules\\Registry' => __DIR__ . '/../..' . '/src/Rules/Registry.php',
        'PHPStan\\Rules\\Rule' => __DIR__ . '/../..' . '/src/Rules/Rule.php',
        'PHPStan\\Rules\\RuleError' => __DIR__ . '/../..' . '/src/Rules/RuleError.php',
        'PHPStan\\Rules\\RuleErrorBuilder' => __DIR__ . '/../..' . '/src/Rules/RuleErrorBuilder.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError1' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError1.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError101' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError101.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError103' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError103.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError105' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError105.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError107' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError107.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError109' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError109.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError11' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError11.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError111' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError111.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError113' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError113.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError115' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError115.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError117' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError117.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError119' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError119.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError121' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError121.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError123' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError123.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError125' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError125.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError127' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError127.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError13' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError13.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError15' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError15.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError17' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError17.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError19' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError19.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError21' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError21.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError23' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError23.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError25' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError25.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError27' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError27.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError29' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError29.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError3' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError3.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError31' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError31.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError33' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError33.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError35' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError35.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError37' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError37.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError39' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError39.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError41' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError41.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError43' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError43.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError45' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError45.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError47' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError47.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError49' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError49.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError5' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError5.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError51' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError51.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError53' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError53.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError55' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError55.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError57' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError57.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError59' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError59.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError61' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError61.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError63' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError63.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError65' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError65.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError67' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError67.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError69' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError69.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError7' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError7.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError71' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError71.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError73' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError73.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError75' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError75.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError77' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError77.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError79' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError79.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError81' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError81.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError83' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError83.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError85' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError85.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError87' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError87.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError89' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError89.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError9' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError9.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError91' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError91.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError93' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError93.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError95' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError95.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError97' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError97.php',
        'PHPStan\\Rules\\RuleErrors\\RuleError99' => __DIR__ . '/../..' . '/src/Rules/RuleErrors/RuleError99.php',
        'PHPStan\\Rules\\RuleLevelHelper' => __DIR__ . '/../..' . '/src/Rules/RuleLevelHelper.php',
        'PHPStan\\Rules\\RuleLevelHelperAcceptsResult' => __DIR__ . '/../..' . '/src/Rules/RuleLevelHelperAcceptsResult.php',
        'PHPStan\\Rules\\TipRuleError' => __DIR__ . '/../..' . '/src/Rules/TipRuleError.php',
        'PHPStan\\Rules\\TooWideTypehints\\TooWideArrowFunctionReturnTypehintRule' => __DIR__ . '/../..' . '/src/Rules/TooWideTypehints/TooWideArrowFunctionReturnTypehintRule.php',
        'PHPStan\\Rules\\TooWideTypehints\\TooWideClosureReturnTypehintRule' => __DIR__ . '/../..' . '/src/Rules/TooWideTypehints/TooWideClosureReturnTypehintRule.php',
        'PHPStan\\Rules\\TooWideTypehints\\TooWideFunctionReturnTypehintRule' => __DIR__ . '/../..' . '/src/Rules/TooWideTypehints/TooWideFunctionReturnTypehintRule.php',
        'PHPStan\\Rules\\TooWideTypehints\\TooWideMethodReturnTypehintRule' => __DIR__ . '/../..' . '/src/Rules/TooWideTypehints/TooWideMethodReturnTypehintRule.php',
        'PHPStan\\Rules\\Traits\\NotAnalysedTraitRule' => __DIR__ . '/../..' . '/src/Rules/Traits/NotAnalysedTraitRule.php',
        'PHPStan\\Rules\\Traits\\TraitDeclarationCollector' => __DIR__ . '/../..' . '/src/Rules/Traits/TraitDeclarationCollector.php',
        'PHPStan\\Rules\\Traits\\TraitUseCollector' => __DIR__ . '/../..' . '/src/Rules/Traits/TraitUseCollector.php',
        'PHPStan\\Rules\\UnusedFunctionParametersCheck' => __DIR__ . '/../..' . '/src/Rules/UnusedFunctionParametersCheck.php',
        'PHPStan\\Rules\\Variables\\CompactVariablesRule' => __DIR__ . '/../..' . '/src/Rules/Variables/CompactVariablesRule.php',
        'PHPStan\\Rules\\Variables\\DefinedVariableRule' => __DIR__ . '/../..' . '/src/Rules/Variables/DefinedVariableRule.php',
        'PHPStan\\Rules\\Variables\\EmptyRule' => __DIR__ . '/../..' . '/src/Rules/Variables/EmptyRule.php',
        'PHPStan\\Rules\\Variables\\IssetRule' => __DIR__ . '/../..' . '/src/Rules/Variables/IssetRule.php',
        'PHPStan\\Rules\\Variables\\NullCoalesceRule' => __DIR__ . '/../..' . '/src/Rules/Variables/NullCoalesceRule.php',
        'PHPStan\\Rules\\Variables\\ThrowTypeRule' => __DIR__ . '/../..' . '/src/Rules/Variables/ThrowTypeRule.php',
        'PHPStan\\Rules\\Variables\\UnsetRule' => __DIR__ . '/../..' . '/src/Rules/Variables/UnsetRule.php',
        'PHPStan\\Rules\\Variables\\VariableCloningRule' => __DIR__ . '/../..' . '/src/Rules/Variables/VariableCloningRule.php',
        'PHPStan\\Rules\\Whitespace\\FileWhitespaceRule' => __DIR__ . '/../..' . '/src/Rules/Whitespace/FileWhitespaceRule.php',
        'PHPStan\\ShouldNotHappenException' => __DIR__ . '/../..' . '/src/ShouldNotHappenException.php',
        'PHPStan\\Testing\\ErrorFormatterTestCase' => __DIR__ . '/../..' . '/src/Testing/ErrorFormatterTestCase.php',
        'PHPStan\\Testing\\LevelsTestCase' => __DIR__ . '/../..' . '/src/Testing/LevelsTestCase.php',
        'PHPStan\\Testing\\PHPStanTestCase' => __DIR__ . '/../..' . '/src/Testing/PHPStanTestCase.php',
        'PHPStan\\Testing\\RuleTestCase' => __DIR__ . '/../..' . '/src/Testing/RuleTestCase.php',
        'PHPStan\\Testing\\TestCaseSourceLocatorFactory' => __DIR__ . '/../..' . '/src/Testing/TestCaseSourceLocatorFactory.php',
        'PHPStan\\Testing\\TypeInferenceTestCase' => __DIR__ . '/../..' . '/src/Testing/TypeInferenceTestCase.php',
        'PHPStan\\TrinaryLogic' => __DIR__ . '/../..' . '/src/TrinaryLogic.php',
        'PHPStan\\Type\\AcceptsResult' => __DIR__ . '/../..' . '/src/Type/AcceptsResult.php',
        'PHPStan\\Type\\Accessory\\AccessoryArrayListType' => __DIR__ . '/../..' . '/src/Type/Accessory/AccessoryArrayListType.php',
        'PHPStan\\Type\\Accessory\\AccessoryLiteralStringType' => __DIR__ . '/../..' . '/src/Type/Accessory/AccessoryLiteralStringType.php',
        'PHPStan\\Type\\Accessory\\AccessoryNonEmptyStringType' => __DIR__ . '/../..' . '/src/Type/Accessory/AccessoryNonEmptyStringType.php',
        'PHPStan\\Type\\Accessory\\AccessoryNonFalsyStringType' => __DIR__ . '/../..' . '/src/Type/Accessory/AccessoryNonFalsyStringType.php',
        'PHPStan\\Type\\Accessory\\AccessoryNumericStringType' => __DIR__ . '/../..' . '/src/Type/Accessory/AccessoryNumericStringType.php',
        'PHPStan\\Type\\Accessory\\AccessoryType' => __DIR__ . '/../..' . '/src/Type/Accessory/AccessoryType.php',
        'PHPStan\\Type\\Accessory\\HasMethodType' => __DIR__ . '/../..' . '/src/Type/Accessory/HasMethodType.php',
        'PHPStan\\Type\\Accessory\\HasOffsetType' => __DIR__ . '/../..' . '/src/Type/Accessory/HasOffsetType.php',
        'PHPStan\\Type\\Accessory\\HasOffsetValueType' => __DIR__ . '/../..' . '/src/Type/Accessory/HasOffsetValueType.php',
        'PHPStan\\Type\\Accessory\\HasPropertyType' => __DIR__ . '/../..' . '/src/Type/Accessory/HasPropertyType.php',
        'PHPStan\\Type\\Accessory\\NonEmptyArrayType' => __DIR__ . '/../..' . '/src/Type/Accessory/NonEmptyArrayType.php',
        'PHPStan\\Type\\Accessory\\OversizedArrayType' => __DIR__ . '/../..' . '/src/Type/Accessory/OversizedArrayType.php',
        'PHPStan\\Type\\ArrayType' => __DIR__ . '/../..' . '/src/Type/ArrayType.php',
        'PHPStan\\Type\\BenevolentUnionType' => __DIR__ . '/../..' . '/src/Type/BenevolentUnionType.php',
        'PHPStan\\Type\\BitwiseFlagHelper' => __DIR__ . '/../..' . '/src/Type/BitwiseFlagHelper.php',
        'PHPStan\\Type\\BooleanType' => __DIR__ . '/../..' . '/src/Type/BooleanType.php',
        'PHPStan\\Type\\CallableType' => __DIR__ . '/../..' . '/src/Type/CallableType.php',
        'PHPStan\\Type\\CallableTypeHelper' => __DIR__ . '/../..' . '/src/Type/CallableTypeHelper.php',
        'PHPStan\\Type\\CircularTypeAliasDefinitionException' => __DIR__ . '/../..' . '/src/Type/CircularTypeAliasDefinitionException.php',
        'PHPStan\\Type\\CircularTypeAliasErrorType' => __DIR__ . '/../..' . '/src/Type/CircularTypeAliasErrorType.php',
        'PHPStan\\Type\\ClassStringType' => __DIR__ . '/../..' . '/src/Type/ClassStringType.php',
        'PHPStan\\Type\\ClosureType' => __DIR__ . '/../..' . '/src/Type/ClosureType.php',
        'PHPStan\\Type\\ClosureTypeFactory' => __DIR__ . '/../..' . '/src/Type/ClosureTypeFactory.php',
        'PHPStan\\Type\\CompoundType' => __DIR__ . '/../..' . '/src/Type/CompoundType.php',
        'PHPStan\\Type\\ConditionalType' => __DIR__ . '/../..' . '/src/Type/ConditionalType.php',
        'PHPStan\\Type\\ConditionalTypeForParameter' => __DIR__ . '/../..' . '/src/Type/ConditionalTypeForParameter.php',
        'PHPStan\\Type\\ConstantScalarType' => __DIR__ . '/../..' . '/src/Type/ConstantScalarType.php',
        'PHPStan\\Type\\ConstantType' => __DIR__ . '/../..' . '/src/Type/ConstantType.php',
        'PHPStan\\Type\\ConstantTypeHelper' => __DIR__ . '/../..' . '/src/Type/ConstantTypeHelper.php',
        'PHPStan\\Type\\Constant\\ConstantArrayType' => __DIR__ . '/../..' . '/src/Type/Constant/ConstantArrayType.php',
        'PHPStan\\Type\\Constant\\ConstantArrayTypeAndMethod' => __DIR__ . '/../..' . '/src/Type/Constant/ConstantArrayTypeAndMethod.php',
        'PHPStan\\Type\\Constant\\ConstantArrayTypeBuilder' => __DIR__ . '/../..' . '/src/Type/Constant/ConstantArrayTypeBuilder.php',
        'PHPStan\\Type\\Constant\\ConstantBooleanType' => __DIR__ . '/../..' . '/src/Type/Constant/ConstantBooleanType.php',
        'PHPStan\\Type\\Constant\\ConstantFloatType' => __DIR__ . '/../..' . '/src/Type/Constant/ConstantFloatType.php',
        'PHPStan\\Type\\Constant\\ConstantIntegerType' => __DIR__ . '/../..' . '/src/Type/Constant/ConstantIntegerType.php',
        'PHPStan\\Type\\Constant\\ConstantScalarToBooleanTrait' => __DIR__ . '/../..' . '/src/Type/Constant/ConstantScalarToBooleanTrait.php',
        'PHPStan\\Type\\Constant\\ConstantStringType' => __DIR__ . '/../..' . '/src/Type/Constant/ConstantStringType.php',
        'PHPStan\\Type\\Constant\\OversizedArrayBuilder' => __DIR__ . '/../..' . '/src/Type/Constant/OversizedArrayBuilder.php',
        'PHPStan\\Type\\DirectTypeAliasResolverProvider' => __DIR__ . '/../..' . '/src/Type/DirectTypeAliasResolverProvider.php',
        'PHPStan\\Type\\DynamicFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/DynamicFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\DynamicFunctionThrowTypeExtension' => __DIR__ . '/../..' . '/src/Type/DynamicFunctionThrowTypeExtension.php',
        'PHPStan\\Type\\DynamicMethodReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/DynamicMethodReturnTypeExtension.php',
        'PHPStan\\Type\\DynamicMethodThrowTypeExtension' => __DIR__ . '/../..' . '/src/Type/DynamicMethodThrowTypeExtension.php',
        'PHPStan\\Type\\DynamicReturnTypeExtensionRegistry' => __DIR__ . '/../..' . '/src/Type/DynamicReturnTypeExtensionRegistry.php',
        'PHPStan\\Type\\DynamicStaticMethodReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/DynamicStaticMethodReturnTypeExtension.php',
        'PHPStan\\Type\\DynamicStaticMethodThrowTypeExtension' => __DIR__ . '/../..' . '/src/Type/DynamicStaticMethodThrowTypeExtension.php',
        'PHPStan\\Type\\Enum\\EnumCaseObjectType' => __DIR__ . '/../..' . '/src/Type/Enum/EnumCaseObjectType.php',
        'PHPStan\\Type\\ErrorType' => __DIR__ . '/../..' . '/src/Type/ErrorType.php',
        'PHPStan\\Type\\ExponentiateHelper' => __DIR__ . '/../..' . '/src/Type/ExponentiateHelper.php',
        'PHPStan\\Type\\FileTypeMapper' => __DIR__ . '/../..' . '/src/Type/FileTypeMapper.php',
        'PHPStan\\Type\\FloatType' => __DIR__ . '/../..' . '/src/Type/FloatType.php',
        'PHPStan\\Type\\FunctionTypeSpecifyingExtension' => __DIR__ . '/../..' . '/src/Type/FunctionTypeSpecifyingExtension.php',
        'PHPStan\\Type\\GeneralizePrecision' => __DIR__ . '/../..' . '/src/Type/GeneralizePrecision.php',
        'PHPStan\\Type\\GenericTypeVariableResolver' => __DIR__ . '/../..' . '/src/Type/GenericTypeVariableResolver.php',
        'PHPStan\\Type\\Generic\\GenericClassStringType' => __DIR__ . '/../..' . '/src/Type/Generic/GenericClassStringType.php',
        'PHPStan\\Type\\Generic\\GenericObjectType' => __DIR__ . '/../..' . '/src/Type/Generic/GenericObjectType.php',
        'PHPStan\\Type\\Generic\\TemplateArrayType' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateArrayType.php',
        'PHPStan\\Type\\Generic\\TemplateBenevolentUnionType' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateBenevolentUnionType.php',
        'PHPStan\\Type\\Generic\\TemplateBooleanType' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateBooleanType.php',
        'PHPStan\\Type\\Generic\\TemplateConstantArrayType' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateConstantArrayType.php',
        'PHPStan\\Type\\Generic\\TemplateConstantIntegerType' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateConstantIntegerType.php',
        'PHPStan\\Type\\Generic\\TemplateConstantStringType' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateConstantStringType.php',
        'PHPStan\\Type\\Generic\\TemplateFloatType' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateFloatType.php',
        'PHPStan\\Type\\Generic\\TemplateGenericObjectType' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateGenericObjectType.php',
        'PHPStan\\Type\\Generic\\TemplateIntegerType' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateIntegerType.php',
        'PHPStan\\Type\\Generic\\TemplateIntersectionType' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateIntersectionType.php',
        'PHPStan\\Type\\Generic\\TemplateKeyOfType' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateKeyOfType.php',
        'PHPStan\\Type\\Generic\\TemplateMixedType' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateMixedType.php',
        'PHPStan\\Type\\Generic\\TemplateObjectShapeType' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateObjectShapeType.php',
        'PHPStan\\Type\\Generic\\TemplateObjectType' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateObjectType.php',
        'PHPStan\\Type\\Generic\\TemplateObjectWithoutClassType' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateObjectWithoutClassType.php',
        'PHPStan\\Type\\Generic\\TemplateStrictMixedType' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateStrictMixedType.php',
        'PHPStan\\Type\\Generic\\TemplateStringType' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateStringType.php',
        'PHPStan\\Type\\Generic\\TemplateType' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateType.php',
        'PHPStan\\Type\\Generic\\TemplateTypeArgumentStrategy' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateTypeArgumentStrategy.php',
        'PHPStan\\Type\\Generic\\TemplateTypeFactory' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateTypeFactory.php',
        'PHPStan\\Type\\Generic\\TemplateTypeHelper' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateTypeHelper.php',
        'PHPStan\\Type\\Generic\\TemplateTypeMap' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateTypeMap.php',
        'PHPStan\\Type\\Generic\\TemplateTypeParameterStrategy' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateTypeParameterStrategy.php',
        'PHPStan\\Type\\Generic\\TemplateTypeReference' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateTypeReference.php',
        'PHPStan\\Type\\Generic\\TemplateTypeScope' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateTypeScope.php',
        'PHPStan\\Type\\Generic\\TemplateTypeStrategy' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateTypeStrategy.php',
        'PHPStan\\Type\\Generic\\TemplateTypeTrait' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateTypeTrait.php',
        'PHPStan\\Type\\Generic\\TemplateTypeVariance' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateTypeVariance.php',
        'PHPStan\\Type\\Generic\\TemplateUnionType' => __DIR__ . '/../..' . '/src/Type/Generic/TemplateUnionType.php',
        'PHPStan\\Type\\Helper\\GetTemplateTypeType' => __DIR__ . '/../..' . '/src/Type/Helper/GetTemplateTypeType.php',
        'PHPStan\\Type\\IntegerRangeType' => __DIR__ . '/../..' . '/src/Type/IntegerRangeType.php',
        'PHPStan\\Type\\IntegerType' => __DIR__ . '/../..' . '/src/Type/IntegerType.php',
        'PHPStan\\Type\\IntersectionType' => __DIR__ . '/../..' . '/src/Type/IntersectionType.php',
        'PHPStan\\Type\\IterableType' => __DIR__ . '/../..' . '/src/Type/IterableType.php',
        'PHPStan\\Type\\JustNullableTypeTrait' => __DIR__ . '/../..' . '/src/Type/JustNullableTypeTrait.php',
        'PHPStan\\Type\\KeyOfType' => __DIR__ . '/../..' . '/src/Type/KeyOfType.php',
        'PHPStan\\Type\\LateResolvableType' => __DIR__ . '/../..' . '/src/Type/LateResolvableType.php',
        'PHPStan\\Type\\LazyTypeAliasResolverProvider' => __DIR__ . '/../..' . '/src/Type/LazyTypeAliasResolverProvider.php',
        'PHPStan\\Type\\LooseComparisonHelper' => __DIR__ . '/../..' . '/src/Type/LooseComparisonHelper.php',
        'PHPStan\\Type\\MethodTypeSpecifyingExtension' => __DIR__ . '/../..' . '/src/Type/MethodTypeSpecifyingExtension.php',
        'PHPStan\\Type\\MixedType' => __DIR__ . '/../..' . '/src/Type/MixedType.php',
        'PHPStan\\Type\\NeverType' => __DIR__ . '/../..' . '/src/Type/NeverType.php',
        'PHPStan\\Type\\NonexistentParentClassType' => __DIR__ . '/../..' . '/src/Type/NonexistentParentClassType.php',
        'PHPStan\\Type\\NullType' => __DIR__ . '/../..' . '/src/Type/NullType.php',
        'PHPStan\\Type\\ObjectShapePropertyReflection' => __DIR__ . '/../..' . '/src/Type/ObjectShapePropertyReflection.php',
        'PHPStan\\Type\\ObjectShapeType' => __DIR__ . '/../..' . '/src/Type/ObjectShapeType.php',
        'PHPStan\\Type\\ObjectType' => __DIR__ . '/../..' . '/src/Type/ObjectType.php',
        'PHPStan\\Type\\ObjectWithoutClassType' => __DIR__ . '/../..' . '/src/Type/ObjectWithoutClassType.php',
        'PHPStan\\Type\\OffsetAccessType' => __DIR__ . '/../..' . '/src/Type/OffsetAccessType.php',
        'PHPStan\\Type\\OperatorTypeSpecifyingExtension' => __DIR__ . '/../..' . '/src/Type/OperatorTypeSpecifyingExtension.php',
        'PHPStan\\Type\\OperatorTypeSpecifyingExtensionRegistry' => __DIR__ . '/../..' . '/src/Type/OperatorTypeSpecifyingExtensionRegistry.php',
        'PHPStan\\Type\\ParserNodeTypeToPHPStanType' => __DIR__ . '/../..' . '/src/Type/ParserNodeTypeToPHPStanType.php',
        'PHPStan\\Type\\Php\\ArgumentBasedFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArgumentBasedFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArrayChunkFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArrayChunkFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArrayColumnFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArrayColumnFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArrayCombineFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArrayCombineFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArrayCurrentDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArrayCurrentDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArrayFillFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArrayFillFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArrayFillKeysFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArrayFillKeysFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArrayFilterFunctionReturnTypeReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArrayFilterFunctionReturnTypeReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArrayFlipFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArrayFlipFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArrayIntersectKeyFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArrayIntersectKeyFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArrayKeyDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArrayKeyDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArrayKeyExistsFunctionTypeSpecifyingExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArrayKeyExistsFunctionTypeSpecifyingExtension.php',
        'PHPStan\\Type\\Php\\ArrayKeyFirstDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArrayKeyFirstDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArrayKeyLastDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArrayKeyLastDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArrayKeysFunctionDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArrayKeysFunctionDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArrayMapFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArrayMapFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArrayMergeFunctionDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArrayMergeFunctionDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArrayNextDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArrayNextDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArrayPointerFunctionsDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArrayPointerFunctionsDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArrayPopFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArrayPopFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArrayRandFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArrayRandFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArrayReduceFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArrayReduceFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArrayReplaceFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArrayReplaceFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArrayReverseFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArrayReverseFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArraySearchFunctionDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArraySearchFunctionDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArraySearchFunctionTypeSpecifyingExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArraySearchFunctionTypeSpecifyingExtension.php',
        'PHPStan\\Type\\Php\\ArrayShiftFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArrayShiftFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArraySliceFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArraySliceFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArraySpliceFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArraySpliceFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArraySumFunctionDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArraySumFunctionDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ArrayValuesFunctionDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ArrayValuesFunctionDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\AssertFunctionTypeSpecifyingExtension' => __DIR__ . '/../..' . '/src/Type/Php/AssertFunctionTypeSpecifyingExtension.php',
        'PHPStan\\Type\\Php\\BackedEnumFromMethodDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/BackedEnumFromMethodDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\Base64DecodeDynamicFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/Base64DecodeDynamicFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\BcMathStringOrNullReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/BcMathStringOrNullReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ClassExistsFunctionTypeSpecifyingExtension' => __DIR__ . '/../..' . '/src/Type/Php/ClassExistsFunctionTypeSpecifyingExtension.php',
        'PHPStan\\Type\\Php\\ClassImplementsFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ClassImplementsFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ClosureBindDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ClosureBindDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ClosureBindToDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ClosureBindToDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ClosureFromCallableDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ClosureFromCallableDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\CompactFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/CompactFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\CountFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/CountFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\CountFunctionTypeSpecifyingExtension' => __DIR__ . '/../..' . '/src/Type/Php/CountFunctionTypeSpecifyingExtension.php',
        'PHPStan\\Type\\Php\\CtypeDigitFunctionTypeSpecifyingExtension' => __DIR__ . '/../..' . '/src/Type/Php/CtypeDigitFunctionTypeSpecifyingExtension.php',
        'PHPStan\\Type\\Php\\CurlGetinfoFunctionDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/CurlGetinfoFunctionDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\CurlInitReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/CurlInitReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\DateFormatFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/DateFormatFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\DateFormatMethodReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/DateFormatMethodReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\DateFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/DateFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\DateIntervalConstructorThrowTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/DateIntervalConstructorThrowTypeExtension.php',
        'PHPStan\\Type\\Php\\DateIntervalDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/DateIntervalDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\DatePeriodConstructorReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/DatePeriodConstructorReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\DateTimeConstructorThrowTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/DateTimeConstructorThrowTypeExtension.php',
        'PHPStan\\Type\\Php\\DateTimeCreateDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/DateTimeCreateDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\DateTimeDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/DateTimeDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\DateTimeModifyReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/DateTimeModifyReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\DateTimeZoneConstructorThrowTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/DateTimeZoneConstructorThrowTypeExtension.php',
        'PHPStan\\Type\\Php\\DefineConstantTypeSpecifyingExtension' => __DIR__ . '/../..' . '/src/Type/Php/DefineConstantTypeSpecifyingExtension.php',
        'PHPStan\\Type\\Php\\DefinedConstantTypeSpecifyingExtension' => __DIR__ . '/../..' . '/src/Type/Php/DefinedConstantTypeSpecifyingExtension.php',
        'PHPStan\\Type\\Php\\DioStatDynamicFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/DioStatDynamicFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\DsMapDynamicMethodThrowTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/DsMapDynamicMethodThrowTypeExtension.php',
        'PHPStan\\Type\\Php\\DsMapDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/DsMapDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ExplodeFunctionDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ExplodeFunctionDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\FilterFunctionReturnTypeHelper' => __DIR__ . '/../..' . '/src/Type/Php/FilterFunctionReturnTypeHelper.php',
        'PHPStan\\Type\\Php\\FilterInputDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/FilterInputDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\FilterVarArrayDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/FilterVarArrayDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\FilterVarDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/FilterVarDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\FunctionExistsFunctionTypeSpecifyingExtension' => __DIR__ . '/../..' . '/src/Type/Php/FunctionExistsFunctionTypeSpecifyingExtension.php',
        'PHPStan\\Type\\Php\\GetCalledClassDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/GetCalledClassDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\GetClassDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/GetClassDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\GetParentClassDynamicFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/GetParentClassDynamicFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\GettimeofdayDynamicFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/GettimeofdayDynamicFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\HashFunctionsReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/HashFunctionsReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\HrtimeFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/HrtimeFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ImplodeFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ImplodeFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\InArrayFunctionTypeSpecifyingExtension' => __DIR__ . '/../..' . '/src/Type/Php/InArrayFunctionTypeSpecifyingExtension.php',
        'PHPStan\\Type\\Php\\IniGetReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/IniGetReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\IntdivThrowTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/IntdivThrowTypeExtension.php',
        'PHPStan\\Type\\Php\\IsAFunctionTypeSpecifyingExtension' => __DIR__ . '/../..' . '/src/Type/Php/IsAFunctionTypeSpecifyingExtension.php',
        'PHPStan\\Type\\Php\\IsAFunctionTypeSpecifyingHelper' => __DIR__ . '/../..' . '/src/Type/Php/IsAFunctionTypeSpecifyingHelper.php',
        'PHPStan\\Type\\Php\\IsArrayFunctionTypeSpecifyingExtension' => __DIR__ . '/../..' . '/src/Type/Php/IsArrayFunctionTypeSpecifyingExtension.php',
        'PHPStan\\Type\\Php\\IsCallableFunctionTypeSpecifyingExtension' => __DIR__ . '/../..' . '/src/Type/Php/IsCallableFunctionTypeSpecifyingExtension.php',
        'PHPStan\\Type\\Php\\IsIterableFunctionTypeSpecifyingExtension' => __DIR__ . '/../..' . '/src/Type/Php/IsIterableFunctionTypeSpecifyingExtension.php',
        'PHPStan\\Type\\Php\\IsSubclassOfFunctionTypeSpecifyingExtension' => __DIR__ . '/../..' . '/src/Type/Php/IsSubclassOfFunctionTypeSpecifyingExtension.php',
        'PHPStan\\Type\\Php\\IteratorToArrayFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/IteratorToArrayFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\JsonThrowOnErrorDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/JsonThrowOnErrorDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\JsonThrowTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/JsonThrowTypeExtension.php',
        'PHPStan\\Type\\Php\\LtrimFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/LtrimFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\MbConvertEncodingFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/MbConvertEncodingFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\MbFunctionsReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/MbFunctionsReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\MbFunctionsReturnTypeExtensionTrait' => __DIR__ . '/../..' . '/src/Type/Php/MbFunctionsReturnTypeExtensionTrait.php',
        'PHPStan\\Type\\Php\\MbStrlenFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/MbStrlenFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\MbSubstituteCharacterDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/MbSubstituteCharacterDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\MethodExistsTypeSpecifyingExtension' => __DIR__ . '/../..' . '/src/Type/Php/MethodExistsTypeSpecifyingExtension.php',
        'PHPStan\\Type\\Php\\MicrotimeFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/MicrotimeFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\MinMaxFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/MinMaxFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\NonEmptyStringFunctionsReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/NonEmptyStringFunctionsReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\NumberFormatFunctionDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/NumberFormatFunctionDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ParseUrlFunctionDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ParseUrlFunctionDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\PathinfoFunctionDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/PathinfoFunctionDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\PowFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/PowFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\PregFilterFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/PregFilterFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\PregSplitDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/PregSplitDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\PropertyExistsTypeSpecifyingExtension' => __DIR__ . '/../..' . '/src/Type/Php/PropertyExistsTypeSpecifyingExtension.php',
        'PHPStan\\Type\\Php\\RandomIntFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/RandomIntFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\RangeFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/RangeFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ReflectionClassConstructorThrowTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ReflectionClassConstructorThrowTypeExtension.php',
        'PHPStan\\Type\\Php\\ReflectionClassIsSubclassOfTypeSpecifyingExtension' => __DIR__ . '/../..' . '/src/Type/Php/ReflectionClassIsSubclassOfTypeSpecifyingExtension.php',
        'PHPStan\\Type\\Php\\ReflectionFunctionConstructorThrowTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ReflectionFunctionConstructorThrowTypeExtension.php',
        'PHPStan\\Type\\Php\\ReflectionGetAttributesMethodReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ReflectionGetAttributesMethodReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ReflectionMethodConstructorThrowTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ReflectionMethodConstructorThrowTypeExtension.php',
        'PHPStan\\Type\\Php\\ReflectionPropertyConstructorThrowTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ReflectionPropertyConstructorThrowTypeExtension.php',
        'PHPStan\\Type\\Php\\ReplaceFunctionsDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ReplaceFunctionsDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\RoundFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/RoundFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\SimpleXMLElementAsXMLMethodReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/SimpleXMLElementAsXMLMethodReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\SimpleXMLElementClassPropertyReflectionExtension' => __DIR__ . '/../..' . '/src/Type/Php/SimpleXMLElementClassPropertyReflectionExtension.php',
        'PHPStan\\Type\\Php\\SimpleXMLElementConstructorThrowTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/SimpleXMLElementConstructorThrowTypeExtension.php',
        'PHPStan\\Type\\Php\\SimpleXMLElementXpathMethodReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/SimpleXMLElementXpathMethodReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\SprintfFunctionDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/SprintfFunctionDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\SscanfFunctionDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/SscanfFunctionDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\StatDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/StatDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\StrCaseFunctionsReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/StrCaseFunctionsReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\StrContainingTypeSpecifyingExtension' => __DIR__ . '/../..' . '/src/Type/Php/StrContainingTypeSpecifyingExtension.php',
        'PHPStan\\Type\\Php\\StrPadFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/StrPadFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\StrRepeatFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/StrRepeatFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\StrSplitFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/StrSplitFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\StrTokFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/StrTokFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\StrWordCountFunctionDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/StrWordCountFunctionDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\StrlenFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/StrlenFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\StrtotimeFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/StrtotimeFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\StrvalFamilyFunctionReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/StrvalFamilyFunctionReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\SubstrDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/SubstrDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\ThrowableReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/ThrowableReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\TriggerErrorDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/TriggerErrorDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\TypeSpecifyingFunctionsDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/TypeSpecifyingFunctionsDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\VersionCompareFunctionDynamicReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/VersionCompareFunctionDynamicReturnTypeExtension.php',
        'PHPStan\\Type\\Php\\XMLReaderOpenReturnTypeExtension' => __DIR__ . '/../..' . '/src/Type/Php/XMLReaderOpenReturnTypeExtension.php',
        'PHPStan\\Type\\RecursionGuard' => __DIR__ . '/../..' . '/src/Type/RecursionGuard.php',
        'PHPStan\\Type\\ResourceType' => __DIR__ . '/../..' . '/src/Type/ResourceType.php',
        'PHPStan\\Type\\SimultaneousTypeTraverser' => __DIR__ . '/../..' . '/src/Type/SimultaneousTypeTraverser.php',
        'PHPStan\\Type\\StaticMethodTypeSpecifyingExtension' => __DIR__ . '/../..' . '/src/Type/StaticMethodTypeSpecifyingExtension.php',
        'PHPStan\\Type\\StaticType' => __DIR__ . '/../..' . '/src/Type/StaticType.php',
        'PHPStan\\Type\\StaticTypeFactory' => __DIR__ . '/../..' . '/src/Type/StaticTypeFactory.php',
        'PHPStan\\Type\\StrictMixedType' => __DIR__ . '/../..' . '/src/Type/StrictMixedType.php',
        'PHPStan\\Type\\StringAlwaysAcceptingObjectWithToStringType' => __DIR__ . '/../..' . '/src/Type/StringAlwaysAcceptingObjectWithToStringType.php',
        'PHPStan\\Type\\StringType' => __DIR__ . '/../..' . '/src/Type/StringType.php',
        'PHPStan\\Type\\SubtractableType' => __DIR__ . '/../..' . '/src/Type/SubtractableType.php',
        'PHPStan\\Type\\ThisType' => __DIR__ . '/../..' . '/src/Type/ThisType.php',
        'PHPStan\\Type\\Traits\\ConstantNumericComparisonTypeTrait' => __DIR__ . '/../..' . '/src/Type/Traits/ConstantNumericComparisonTypeTrait.php',
        'PHPStan\\Type\\Traits\\ConstantScalarTypeTrait' => __DIR__ . '/../..' . '/src/Type/Traits/ConstantScalarTypeTrait.php',
        'PHPStan\\Type\\Traits\\FalseyBooleanTypeTrait' => __DIR__ . '/../..' . '/src/Type/Traits/FalseyBooleanTypeTrait.php',
        'PHPStan\\Type\\Traits\\LateResolvableTypeTrait' => __DIR__ . '/../..' . '/src/Type/Traits/LateResolvableTypeTrait.php',
        'PHPStan\\Type\\Traits\\MaybeArrayTypeTrait' => __DIR__ . '/../..' . '/src/Type/Traits/MaybeArrayTypeTrait.php',
        'PHPStan\\Type\\Traits\\MaybeCallableTypeTrait' => __DIR__ . '/../..' . '/src/Type/Traits/MaybeCallableTypeTrait.php',
        'PHPStan\\Type\\Traits\\MaybeIterableTypeTrait' => __DIR__ . '/../..' . '/src/Type/Traits/MaybeIterableTypeTrait.php',
        'PHPStan\\Type\\Traits\\MaybeObjectTypeTrait' => __DIR__ . '/../..' . '/src/Type/Traits/MaybeObjectTypeTrait.php',
        'PHPStan\\Type\\Traits\\MaybeOffsetAccessibleTypeTrait' => __DIR__ . '/../..' . '/src/Type/Traits/MaybeOffsetAccessibleTypeTrait.php',
        'PHPStan\\Type\\Traits\\NonArrayTypeTrait' => __DIR__ . '/../..' . '/src/Type/Traits/NonArrayTypeTrait.php',
        'PHPStan\\Type\\Traits\\NonCallableTypeTrait' => __DIR__ . '/../..' . '/src/Type/Traits/NonCallableTypeTrait.php',
        'PHPStan\\Type\\Traits\\NonGeneralizableTypeTrait' => __DIR__ . '/../..' . '/src/Type/Traits/NonGeneralizableTypeTrait.php',
        'PHPStan\\Type\\Traits\\NonGenericTypeTrait' => __DIR__ . '/../..' . '/src/Type/Traits/NonGenericTypeTrait.php',
        'PHPStan\\Type\\Traits\\NonIterableTypeTrait' => __DIR__ . '/../..' . '/src/Type/Traits/NonIterableTypeTrait.php',
        'PHPStan\\Type\\Traits\\NonObjectTypeTrait' => __DIR__ . '/../..' . '/src/Type/Traits/NonObjectTypeTrait.php',
        'PHPStan\\Type\\Traits\\NonOffsetAccessibleTypeTrait' => __DIR__ . '/../..' . '/src/Type/Traits/NonOffsetAccessibleTypeTrait.php',
        'PHPStan\\Type\\Traits\\NonRemoveableTypeTrait' => __DIR__ . '/../..' . '/src/Type/Traits/NonRemoveableTypeTrait.php',
        'PHPStan\\Type\\Traits\\ObjectTypeTrait' => __DIR__ . '/../..' . '/src/Type/Traits/ObjectTypeTrait.php',
        'PHPStan\\Type\\Traits\\TruthyBooleanTypeTrait' => __DIR__ . '/../..' . '/src/Type/Traits/TruthyBooleanTypeTrait.php',
        'PHPStan\\Type\\Traits\\UndecidedBooleanTypeTrait' => __DIR__ . '/../..' . '/src/Type/Traits/UndecidedBooleanTypeTrait.php',
        'PHPStan\\Type\\Traits\\UndecidedComparisonCompoundTypeTrait' => __DIR__ . '/../..' . '/src/Type/Traits/UndecidedComparisonCompoundTypeTrait.php',
        'PHPStan\\Type\\Traits\\UndecidedComparisonTypeTrait' => __DIR__ . '/../..' . '/src/Type/Traits/UndecidedComparisonTypeTrait.php',
        'PHPStan\\Type\\Type' => __DIR__ . '/../..' . '/src/Type/Type.php',
        'PHPStan\\Type\\TypeAlias' => __DIR__ . '/../..' . '/src/Type/TypeAlias.php',
        'PHPStan\\Type\\TypeAliasResolver' => __DIR__ . '/../..' . '/src/Type/TypeAliasResolver.php',
        'PHPStan\\Type\\TypeAliasResolverProvider' => __DIR__ . '/../..' . '/src/Type/TypeAliasResolverProvider.php',
        'PHPStan\\Type\\TypeCombinator' => __DIR__ . '/../..' . '/src/Type/TypeCombinator.php',
        'PHPStan\\Type\\TypeTraverser' => __DIR__ . '/../..' . '/src/Type/TypeTraverser.php',
        'PHPStan\\Type\\TypeUtils' => __DIR__ . '/../..' . '/src/Type/TypeUtils.php',
        'PHPStan\\Type\\TypeWithClassName' => __DIR__ . '/../..' . '/src/Type/TypeWithClassName.php',
        'PHPStan\\Type\\TypehintHelper' => __DIR__ . '/../..' . '/src/Type/TypehintHelper.php',
        'PHPStan\\Type\\UnionType' => __DIR__ . '/../..' . '/src/Type/UnionType.php',
        'PHPStan\\Type\\UnionTypeHelper' => __DIR__ . '/../..' . '/src/Type/UnionTypeHelper.php',
        'PHPStan\\Type\\UsefulTypeAliasResolver' => __DIR__ . '/../..' . '/src/Type/UsefulTypeAliasResolver.php',
        'PHPStan\\Type\\ValueOfType' => __DIR__ . '/../..' . '/src/Type/ValueOfType.php',
        'PHPStan\\Type\\VerbosityLevel' => __DIR__ . '/../..' . '/src/Type/VerbosityLevel.php',
        'PHPStan\\Type\\VoidType' => __DIR__ . '/../..' . '/src/Type/VoidType.php',
        'PhpParser\\Builder' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder.php',
        'PhpParser\\BuilderFactory' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/BuilderFactory.php',
        'PhpParser\\BuilderHelpers' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/BuilderHelpers.php',
        'PhpParser\\Builder\\ClassConst' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php',
        'PhpParser\\Builder\\Class_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Class_.php',
        'PhpParser\\Builder\\Declaration' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Declaration.php',
        'PhpParser\\Builder\\EnumCase' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php',
        'PhpParser\\Builder\\Enum_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Enum_.php',
        'PhpParser\\Builder\\FunctionLike' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php',
        'PhpParser\\Builder\\Function_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Function_.php',
        'PhpParser\\Builder\\Interface_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Interface_.php',
        'PhpParser\\Builder\\Method' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Method.php',
        'PhpParser\\Builder\\Namespace_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php',
        'PhpParser\\Builder\\Param' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Param.php',
        'PhpParser\\Builder\\Property' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Property.php',
        'PhpParser\\Builder\\TraitUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php',
        'PhpParser\\Builder\\TraitUseAdaptation' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php',
        'PhpParser\\Builder\\Trait_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Trait_.php',
        'PhpParser\\Builder\\Use_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Use_.php',
        'PhpParser\\Comment' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Comment.php',
        'PhpParser\\Comment\\Doc' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Comment/Doc.php',
        'PhpParser\\ConstExprEvaluationException' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php',
        'PhpParser\\ConstExprEvaluator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php',
        'PhpParser\\Error' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Error.php',
        'PhpParser\\ErrorHandler' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ErrorHandler.php',
        'PhpParser\\ErrorHandler\\Collecting' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php',
        'PhpParser\\ErrorHandler\\Throwing' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php',
        'PhpParser\\Internal\\DiffElem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php',
        'PhpParser\\Internal\\Differ' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/Differ.php',
        'PhpParser\\Internal\\PrintableNewAnonClassNode' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php',
        'PhpParser\\Internal\\TokenStream' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php',
        'PhpParser\\JsonDecoder' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/JsonDecoder.php',
        'PhpParser\\Lexer' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer.php',
        'PhpParser\\Lexer\\Emulative' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php',
        'PhpParser\\Lexer\\TokenEmulator\\AttributeEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php',
        'PhpParser\\Lexer\\TokenEmulator\\CoaleseEqualTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php',
        'PhpParser\\Lexer\\TokenEmulator\\EnumTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php',
        'PhpParser\\Lexer\\TokenEmulator\\ExplicitOctalEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php',
        'PhpParser\\Lexer\\TokenEmulator\\FlexibleDocStringEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php',
        'PhpParser\\Lexer\\TokenEmulator\\FnTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php',
        'PhpParser\\Lexer\\TokenEmulator\\KeywordEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php',
        'PhpParser\\Lexer\\TokenEmulator\\MatchTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php',
        'PhpParser\\Lexer\\TokenEmulator\\NullsafeTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php',
        'PhpParser\\Lexer\\TokenEmulator\\NumericLiteralSeparatorEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php',
        'PhpParser\\Lexer\\TokenEmulator\\ReadonlyFunctionTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php',
        'PhpParser\\Lexer\\TokenEmulator\\ReadonlyTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php',
        'PhpParser\\Lexer\\TokenEmulator\\ReverseEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php',
        'PhpParser\\Lexer\\TokenEmulator\\TokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php',
        'PhpParser\\NameContext' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NameContext.php',
        'PhpParser\\Node' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node.php',
        'PhpParser\\NodeAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeAbstract.php',
        'PhpParser\\NodeDumper' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeDumper.php',
        'PhpParser\\NodeFinder' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeFinder.php',
        'PhpParser\\NodeTraverser' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeTraverser.php',
        'PhpParser\\NodeTraverserInterface' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php',
        'PhpParser\\NodeVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor.php',
        'PhpParser\\NodeVisitorAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php',
        'PhpParser\\NodeVisitor\\CloningVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php',
        'PhpParser\\NodeVisitor\\FindingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php',
        'PhpParser\\NodeVisitor\\FirstFindingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php',
        'PhpParser\\NodeVisitor\\NameResolver' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php',
        'PhpParser\\NodeVisitor\\NodeConnectingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php',
        'PhpParser\\NodeVisitor\\ParentConnectingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php',
        'PhpParser\\Node\\Arg' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Arg.php',
        'PhpParser\\Node\\Attribute' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Attribute.php',
        'PhpParser\\Node\\AttributeGroup' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php',
        'PhpParser\\Node\\ComplexType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/ComplexType.php',
        'PhpParser\\Node\\Const_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Const_.php',
        'PhpParser\\Node\\Expr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr.php',
        'PhpParser\\Node\\Expr\\ArrayDimFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php',
        'PhpParser\\Node\\Expr\\ArrayItem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php',
        'PhpParser\\Node\\Expr\\Array_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php',
        'PhpParser\\Node\\Expr\\ArrowFunction' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php',
        'PhpParser\\Node\\Expr\\Assign' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php',
        'PhpParser\\Node\\Expr\\AssignOp' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php',
        'PhpParser\\Node\\Expr\\AssignOp\\BitwiseAnd' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php',
        'PhpParser\\Node\\Expr\\AssignOp\\BitwiseOr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php',
        'PhpParser\\Node\\Expr\\AssignOp\\BitwiseXor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php',
        'PhpParser\\Node\\Expr\\AssignOp\\Coalesce' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php',
        'PhpParser\\Node\\Expr\\AssignOp\\Concat' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php',
        'PhpParser\\Node\\Expr\\AssignOp\\Div' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php',
        'PhpParser\\Node\\Expr\\AssignOp\\Minus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php',
        'PhpParser\\Node\\Expr\\AssignOp\\Mod' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php',
        'PhpParser\\Node\\Expr\\AssignOp\\Mul' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php',
        'PhpParser\\Node\\Expr\\AssignOp\\Plus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php',
        'PhpParser\\Node\\Expr\\AssignOp\\Pow' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php',
        'PhpParser\\Node\\Expr\\AssignOp\\ShiftLeft' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php',
        'PhpParser\\Node\\Expr\\AssignOp\\ShiftRight' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php',
        'PhpParser\\Node\\Expr\\AssignRef' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php',
        'PhpParser\\Node\\Expr\\BinaryOp' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php',
        'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseAnd' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php',
        'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseOr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php',
        'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseXor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php',
        'PhpParser\\Node\\Expr\\BinaryOp\\BooleanAnd' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php',
        'PhpParser\\Node\\Expr\\BinaryOp\\BooleanOr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php',
        'PhpParser\\Node\\Expr\\BinaryOp\\Coalesce' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php',
        'PhpParser\\Node\\Expr\\BinaryOp\\Concat' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php',
        'PhpParser\\Node\\Expr\\BinaryOp\\Div' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php',
        'PhpParser\\Node\\Expr\\BinaryOp\\Equal' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php',
        'PhpParser\\Node\\Expr\\BinaryOp\\Greater' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php',
        'PhpParser\\Node\\Expr\\BinaryOp\\GreaterOrEqual' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php',
        'PhpParser\\Node\\Expr\\BinaryOp\\Identical' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php',
        'PhpParser\\Node\\Expr\\BinaryOp\\LogicalAnd' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php',
        'PhpParser\\Node\\Expr\\BinaryOp\\LogicalOr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php',
        'PhpParser\\Node\\Expr\\BinaryOp\\LogicalXor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php',
        'PhpParser\\Node\\Expr\\BinaryOp\\Minus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php',
        'PhpParser\\Node\\Expr\\BinaryOp\\Mod' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php',
        'PhpParser\\Node\\Expr\\BinaryOp\\Mul' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php',
        'PhpParser\\Node\\Expr\\BinaryOp\\NotEqual' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php',
        'PhpParser\\Node\\Expr\\BinaryOp\\NotIdentical' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php',
        'PhpParser\\Node\\Expr\\BinaryOp\\Plus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php',
        'PhpParser\\Node\\Expr\\BinaryOp\\Pow' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php',
        'PhpParser\\Node\\Expr\\BinaryOp\\ShiftLeft' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php',
        'PhpParser\\Node\\Expr\\BinaryOp\\ShiftRight' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php',
        'PhpParser\\Node\\Expr\\BinaryOp\\Smaller' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php',
        'PhpParser\\Node\\Expr\\BinaryOp\\SmallerOrEqual' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php',
        'PhpParser\\Node\\Expr\\BinaryOp\\Spaceship' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php',
        'PhpParser\\Node\\Expr\\BitwiseNot' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php',
        'PhpParser\\Node\\Expr\\BooleanNot' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php',
        'PhpParser\\Node\\Expr\\CallLike' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php',
        'PhpParser\\Node\\Expr\\Cast' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php',
        'PhpParser\\Node\\Expr\\Cast\\Array_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php',
        'PhpParser\\Node\\Expr\\Cast\\Bool_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php',
        'PhpParser\\Node\\Expr\\Cast\\Double' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php',
        'PhpParser\\Node\\Expr\\Cast\\Int_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php',
        'PhpParser\\Node\\Expr\\Cast\\Object_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php',
        'PhpParser\\Node\\Expr\\Cast\\String_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php',
        'PhpParser\\Node\\Expr\\Cast\\Unset_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php',
        'PhpParser\\Node\\Expr\\ClassConstFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php',
        'PhpParser\\Node\\Expr\\Clone_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php',
        'PhpParser\\Node\\Expr\\Closure' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php',
        'PhpParser\\Node\\Expr\\ClosureUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php',
        'PhpParser\\Node\\Expr\\ConstFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php',
        'PhpParser\\Node\\Expr\\Empty_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php',
        'PhpParser\\Node\\Expr\\Error' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php',
        'PhpParser\\Node\\Expr\\ErrorSuppress' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php',
        'PhpParser\\Node\\Expr\\Eval_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php',
        'PhpParser\\Node\\Expr\\Exit_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php',
        'PhpParser\\Node\\Expr\\FuncCall' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php',
        'PhpParser\\Node\\Expr\\Include_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php',
        'PhpParser\\Node\\Expr\\Instanceof_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php',
        'PhpParser\\Node\\Expr\\Isset_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php',
        'PhpParser\\Node\\Expr\\List_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php',
        'PhpParser\\Node\\Expr\\Match_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php',
        'PhpParser\\Node\\Expr\\MethodCall' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php',
        'PhpParser\\Node\\Expr\\New_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php',
        'PhpParser\\Node\\Expr\\NullsafeMethodCall' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php',
        'PhpParser\\Node\\Expr\\NullsafePropertyFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php',
        'PhpParser\\Node\\Expr\\PostDec' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php',
        'PhpParser\\Node\\Expr\\PostInc' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php',
        'PhpParser\\Node\\Expr\\PreDec' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php',
        'PhpParser\\Node\\Expr\\PreInc' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php',
        'PhpParser\\Node\\Expr\\Print_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php',
        'PhpParser\\Node\\Expr\\PropertyFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php',
        'PhpParser\\Node\\Expr\\ShellExec' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php',
        'PhpParser\\Node\\Expr\\StaticCall' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php',
        'PhpParser\\Node\\Expr\\StaticPropertyFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php',
        'PhpParser\\Node\\Expr\\Ternary' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php',
        'PhpParser\\Node\\Expr\\Throw_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php',
        'PhpParser\\Node\\Expr\\UnaryMinus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php',
        'PhpParser\\Node\\Expr\\UnaryPlus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php',
        'PhpParser\\Node\\Expr\\Variable' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php',
        'PhpParser\\Node\\Expr\\YieldFrom' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php',
        'PhpParser\\Node\\Expr\\Yield_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php',
        'PhpParser\\Node\\FunctionLike' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php',
        'PhpParser\\Node\\Identifier' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Identifier.php',
        'PhpParser\\Node\\IntersectionType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php',
        'PhpParser\\Node\\MatchArm' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/MatchArm.php',
        'PhpParser\\Node\\Name' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Name.php',
        'PhpParser\\Node\\Name\\FullyQualified' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php',
        'PhpParser\\Node\\Name\\Relative' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php',
        'PhpParser\\Node\\NullableType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/NullableType.php',
        'PhpParser\\Node\\Param' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Param.php',
        'PhpParser\\Node\\Scalar' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar.php',
        'PhpParser\\Node\\Scalar\\DNumber' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php',
        'PhpParser\\Node\\Scalar\\Encapsed' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php',
        'PhpParser\\Node\\Scalar\\EncapsedStringPart' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php',
        'PhpParser\\Node\\Scalar\\LNumber' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php',
        'PhpParser\\Node\\Scalar\\MagicConst' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php',
        'PhpParser\\Node\\Scalar\\MagicConst\\Class_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php',
        'PhpParser\\Node\\Scalar\\MagicConst\\Dir' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php',
        'PhpParser\\Node\\Scalar\\MagicConst\\File' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php',
        'PhpParser\\Node\\Scalar\\MagicConst\\Function_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php',
        'PhpParser\\Node\\Scalar\\MagicConst\\Line' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php',
        'PhpParser\\Node\\Scalar\\MagicConst\\Method' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php',
        'PhpParser\\Node\\Scalar\\MagicConst\\Namespace_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php',
        'PhpParser\\Node\\Scalar\\MagicConst\\Trait_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php',
        'PhpParser\\Node\\Scalar\\String_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php',
        'PhpParser\\Node\\Stmt' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt.php',
        'PhpParser\\Node\\Stmt\\Break_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php',
        'PhpParser\\Node\\Stmt\\Case_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php',
        'PhpParser\\Node\\Stmt\\Catch_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php',
        'PhpParser\\Node\\Stmt\\ClassConst' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php',
        'PhpParser\\Node\\Stmt\\ClassLike' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php',
        'PhpParser\\Node\\Stmt\\ClassMethod' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php',
        'PhpParser\\Node\\Stmt\\Class_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php',
        'PhpParser\\Node\\Stmt\\Const_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php',
        'PhpParser\\Node\\Stmt\\Continue_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php',
        'PhpParser\\Node\\Stmt\\DeclareDeclare' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php',
        'PhpParser\\Node\\Stmt\\Declare_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php',
        'PhpParser\\Node\\Stmt\\Do_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php',
        'PhpParser\\Node\\Stmt\\Echo_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php',
        'PhpParser\\Node\\Stmt\\ElseIf_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php',
        'PhpParser\\Node\\Stmt\\Else_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php',
        'PhpParser\\Node\\Stmt\\EnumCase' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php',
        'PhpParser\\Node\\Stmt\\Enum_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php',
        'PhpParser\\Node\\Stmt\\Expression' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php',
        'PhpParser\\Node\\Stmt\\Finally_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php',
        'PhpParser\\Node\\Stmt\\For_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php',
        'PhpParser\\Node\\Stmt\\Foreach_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php',
        'PhpParser\\Node\\Stmt\\Function_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php',
        'PhpParser\\Node\\Stmt\\Global_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php',
        'PhpParser\\Node\\Stmt\\Goto_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php',
        'PhpParser\\Node\\Stmt\\GroupUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php',
        'PhpParser\\Node\\Stmt\\HaltCompiler' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php',
        'PhpParser\\Node\\Stmt\\If_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php',
        'PhpParser\\Node\\Stmt\\InlineHTML' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php',
        'PhpParser\\Node\\Stmt\\Interface_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php',
        'PhpParser\\Node\\Stmt\\Label' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php',
        'PhpParser\\Node\\Stmt\\Namespace_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php',
        'PhpParser\\Node\\Stmt\\Nop' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php',
        'PhpParser\\Node\\Stmt\\Property' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php',
        'PhpParser\\Node\\Stmt\\PropertyProperty' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php',
        'PhpParser\\Node\\Stmt\\Return_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php',
        'PhpParser\\Node\\Stmt\\StaticVar' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php',
        'PhpParser\\Node\\Stmt\\Static_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php',
        'PhpParser\\Node\\Stmt\\Switch_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php',
        'PhpParser\\Node\\Stmt\\Throw_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php',
        'PhpParser\\Node\\Stmt\\TraitUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php',
        'PhpParser\\Node\\Stmt\\TraitUseAdaptation' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php',
        'PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Alias' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php',
        'PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Precedence' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php',
        'PhpParser\\Node\\Stmt\\Trait_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php',
        'PhpParser\\Node\\Stmt\\TryCatch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php',
        'PhpParser\\Node\\Stmt\\Unset_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php',
        'PhpParser\\Node\\Stmt\\UseUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php',
        'PhpParser\\Node\\Stmt\\Use_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php',
        'PhpParser\\Node\\Stmt\\While_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php',
        'PhpParser\\Node\\UnionType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/UnionType.php',
        'PhpParser\\Node\\VarLikeIdentifier' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php',
        'PhpParser\\Node\\VariadicPlaceholder' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php',
        'PhpParser\\Parser' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser.php',
        'PhpParser\\ParserAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ParserAbstract.php',
        'PhpParser\\ParserFactory' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ParserFactory.php',
        'PhpParser\\Parser\\Multiple' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser/Multiple.php',
        'PhpParser\\Parser\\Php5' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser/Php5.php',
        'PhpParser\\Parser\\Php7' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser/Php7.php',
        'PhpParser\\Parser\\Tokens' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser/Tokens.php',
        'PhpParser\\PrettyPrinterAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php',
        'PhpParser\\PrettyPrinter\\Standard' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php',
        'PhpToken' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php',
        'Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
        'Symfony\\Polyfill\\Intl\\Grapheme\\Grapheme' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/Grapheme.php',
        'Symfony\\Polyfill\\Intl\\Normalizer\\Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Normalizer.php',
        'Symfony\\Polyfill\\Mbstring\\Mbstring' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/Mbstring.php',
        'Symfony\\Polyfill\\Php73\\Php73' => __DIR__ . '/..' . '/symfony/polyfill-php73/Php73.php',
        'Symfony\\Polyfill\\Php74\\Php74' => __DIR__ . '/..' . '/symfony/polyfill-php74/Php74.php',
        'Symfony\\Polyfill\\Php80\\Php80' => __DIR__ . '/..' . '/symfony/polyfill-php80/Php80.php',
        'Symfony\\Polyfill\\Php80\\PhpToken' => __DIR__ . '/..' . '/symfony/polyfill-php80/PhpToken.php',
        'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
        'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
        '_PHPStan_dcc7b7cff\\Clue\\React\\NDJson\\Decoder' => __DIR__ . '/..' . '/clue/ndjson-react/src/Decoder.php',
        '_PHPStan_dcc7b7cff\\Clue\\React\\NDJson\\Encoder' => __DIR__ . '/..' . '/clue/ndjson-react/src/Encoder.php',
        '_PHPStan_dcc7b7cff\\Composer\\CaBundle\\CaBundle' => __DIR__ . '/..' . '/composer/ca-bundle/src/CaBundle.php',
        '_PHPStan_dcc7b7cff\\Composer\\Pcre\\MatchAllResult' => __DIR__ . '/..' . '/composer/pcre/src/MatchAllResult.php',
        '_PHPStan_dcc7b7cff\\Composer\\Pcre\\MatchAllStrictGroupsResult' => __DIR__ . '/..' . '/composer/pcre/src/MatchAllStrictGroupsResult.php',
        '_PHPStan_dcc7b7cff\\Composer\\Pcre\\MatchAllWithOffsetsResult' => __DIR__ . '/..' . '/composer/pcre/src/MatchAllWithOffsetsResult.php',
        '_PHPStan_dcc7b7cff\\Composer\\Pcre\\MatchResult' => __DIR__ . '/..' . '/composer/pcre/src/MatchResult.php',
        '_PHPStan_dcc7b7cff\\Composer\\Pcre\\MatchStrictGroupsResult' => __DIR__ . '/..' . '/composer/pcre/src/MatchStrictGroupsResult.php',
        '_PHPStan_dcc7b7cff\\Composer\\Pcre\\MatchWithOffsetsResult' => __DIR__ . '/..' . '/composer/pcre/src/MatchWithOffsetsResult.php',
        '_PHPStan_dcc7b7cff\\Composer\\Pcre\\PcreException' => __DIR__ . '/..' . '/composer/pcre/src/PcreException.php',
        '_PHPStan_dcc7b7cff\\Composer\\Pcre\\Preg' => __DIR__ . '/..' . '/composer/pcre/src/Preg.php',
        '_PHPStan_dcc7b7cff\\Composer\\Pcre\\Regex' => __DIR__ . '/..' . '/composer/pcre/src/Regex.php',
        '_PHPStan_dcc7b7cff\\Composer\\Pcre\\ReplaceResult' => __DIR__ . '/..' . '/composer/pcre/src/ReplaceResult.php',
        '_PHPStan_dcc7b7cff\\Composer\\Pcre\\UnexpectedNullMatchException' => __DIR__ . '/..' . '/composer/pcre/src/UnexpectedNullMatchException.php',
        '_PHPStan_dcc7b7cff\\Composer\\XdebugHandler\\PhpConfig' => __DIR__ . '/..' . '/composer/xdebug-handler/src/PhpConfig.php',
        '_PHPStan_dcc7b7cff\\Composer\\XdebugHandler\\Process' => __DIR__ . '/..' . '/composer/xdebug-handler/src/Process.php',
        '_PHPStan_dcc7b7cff\\Composer\\XdebugHandler\\Status' => __DIR__ . '/..' . '/composer/xdebug-handler/src/Status.php',
        '_PHPStan_dcc7b7cff\\Composer\\XdebugHandler\\XdebugHandler' => __DIR__ . '/..' . '/composer/xdebug-handler/src/XdebugHandler.php',
        '_PHPStan_dcc7b7cff\\Evenement\\EventEmitter' => __DIR__ . '/..' . '/evenement/evenement/src/Evenement/EventEmitter.php',
        '_PHPStan_dcc7b7cff\\Evenement\\EventEmitterInterface' => __DIR__ . '/..' . '/evenement/evenement/src/Evenement/EventEmitterInterface.php',
        '_PHPStan_dcc7b7cff\\Evenement\\EventEmitterTrait' => __DIR__ . '/..' . '/evenement/evenement/src/Evenement/EventEmitterTrait.php',
        '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\CpuCoreCounter' => __DIR__ . '/..' . '/fidry/cpu-core-counter/src/CpuCoreCounter.php',
        '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Diagnoser' => __DIR__ . '/..' . '/fidry/cpu-core-counter/src/Diagnoser.php',
        '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Executor\\ProcOpenExecutor' => __DIR__ . '/..' . '/fidry/cpu-core-counter/src/Executor/ProcOpenExecutor.php',
        '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Executor\\ProcessExecutor' => __DIR__ . '/..' . '/fidry/cpu-core-counter/src/Executor/ProcessExecutor.php',
        '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\CpuCoreFinder' => __DIR__ . '/..' . '/fidry/cpu-core-counter/src/Finder/CpuCoreFinder.php',
        '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\CpuInfoFinder' => __DIR__ . '/..' . '/fidry/cpu-core-counter/src/Finder/CpuInfoFinder.php',
        '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\DummyCpuCoreFinder' => __DIR__ . '/..' . '/fidry/cpu-core-counter/src/Finder/DummyCpuCoreFinder.php',
        '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\FinderRegistry' => __DIR__ . '/..' . '/fidry/cpu-core-counter/src/Finder/FinderRegistry.php',
        '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\HwLogicalFinder' => __DIR__ . '/..' . '/fidry/cpu-core-counter/src/Finder/HwLogicalFinder.php',
        '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\HwPhysicalFinder' => __DIR__ . '/..' . '/fidry/cpu-core-counter/src/Finder/HwPhysicalFinder.php',
        '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\LscpuLogicalFinder' => __DIR__ . '/..' . '/fidry/cpu-core-counter/src/Finder/LscpuLogicalFinder.php',
        '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\LscpuPhysicalFinder' => __DIR__ . '/..' . '/fidry/cpu-core-counter/src/Finder/LscpuPhysicalFinder.php',
        '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\NProcFinder' => __DIR__ . '/..' . '/fidry/cpu-core-counter/src/Finder/NProcFinder.php',
        '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\NProcessorFinder' => __DIR__ . '/..' . '/fidry/cpu-core-counter/src/Finder/NProcessorFinder.php',
        '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\NullCpuCoreFinder' => __DIR__ . '/..' . '/fidry/cpu-core-counter/src/Finder/NullCpuCoreFinder.php',
        '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\OnlyOnOSFamilyFinder' => __DIR__ . '/..' . '/fidry/cpu-core-counter/src/Finder/OnlyOnOSFamilyFinder.php',
        '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\ProcOpenBasedFinder' => __DIR__ . '/..' . '/fidry/cpu-core-counter/src/Finder/ProcOpenBasedFinder.php',
        '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\SkipOnOSFamilyFinder' => __DIR__ . '/..' . '/fidry/cpu-core-counter/src/Finder/SkipOnOSFamilyFinder.php',
        '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\WmicLogicalFinder' => __DIR__ . '/..' . '/fidry/cpu-core-counter/src/Finder/WmicLogicalFinder.php',
        '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\WmicPhysicalFinder' => __DIR__ . '/..' . '/fidry/cpu-core-counter/src/Finder/WmicPhysicalFinder.php',
        '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\Finder\\_NProcessorFinder' => __DIR__ . '/..' . '/fidry/cpu-core-counter/src/Finder/_NProcessorFinder.php',
        '_PHPStan_dcc7b7cff\\Fidry\\CpuCoreCounter\\NumberOfCpuCoreNotFound' => __DIR__ . '/..' . '/fidry/cpu-core-counter/src/NumberOfCpuCoreNotFound.php',
        '_PHPStan_dcc7b7cff\\Fig\\Http\\Message\\RequestMethodInterface' => __DIR__ . '/..' . '/fig/http-message-util/src/RequestMethodInterface.php',
        '_PHPStan_dcc7b7cff\\Fig\\Http\\Message\\StatusCodeInterface' => __DIR__ . '/..' . '/fig/http-message-util/src/StatusCodeInterface.php',
        '_PHPStan_dcc7b7cff\\Nette\\ArgumentOutOfRangeException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
        '_PHPStan_dcc7b7cff\\Nette\\Bootstrap\\Configurator' => __DIR__ . '/..' . '/nette/bootstrap/src/Bootstrap/Configurator.php',
        '_PHPStan_dcc7b7cff\\Nette\\Bootstrap\\Extensions\\ConstantsExtension' => __DIR__ . '/..' . '/nette/bootstrap/src/Bootstrap/Extensions/ConstantsExtension.php',
        '_PHPStan_dcc7b7cff\\Nette\\Bootstrap\\Extensions\\PhpExtension' => __DIR__ . '/..' . '/nette/bootstrap/src/Bootstrap/Extensions/PhpExtension.php',
        '_PHPStan_dcc7b7cff\\Nette\\Bridges\\DITracy\\ContainerPanel' => __DIR__ . '/..' . '/nette/di/src/Bridges/DITracy/ContainerPanel.php',
        '_PHPStan_dcc7b7cff\\Nette\\Configurator' => __DIR__ . '/..' . '/nette/bootstrap/src/Configurator.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Attributes\\Inject' => __DIR__ . '/..' . '/nette/di/src/DI/Attributes/Inject.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Autowiring' => __DIR__ . '/..' . '/nette/di/src/DI/Autowiring.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Compiler' => __DIR__ . '/..' . '/nette/di/src/DI/Compiler.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\CompilerExtension' => __DIR__ . '/..' . '/nette/di/src/DI/CompilerExtension.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Config\\Adapter' => __DIR__ . '/..' . '/nette/di/src/DI/Config/Adapter.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Config\\Adapters\\NeonAdapter' => __DIR__ . '/..' . '/nette/di/src/DI/Config/Adapters/NeonAdapter.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Config\\Adapters\\PhpAdapter' => __DIR__ . '/..' . '/nette/di/src/DI/Config/Adapters/PhpAdapter.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Config\\DefinitionSchema' => __DIR__ . '/..' . '/nette/di/src/DI/Config/DefinitionSchema.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Config\\Helpers' => __DIR__ . '/..' . '/nette/di/src/DI/Config/Helpers.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Config\\IAdapter' => __DIR__ . '/..' . '/nette/di/src/compatibility.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Config\\Loader' => __DIR__ . '/..' . '/nette/di/src/DI/Config/Loader.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Container' => __DIR__ . '/..' . '/nette/di/src/DI/Container.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\ContainerBuilder' => __DIR__ . '/..' . '/nette/di/src/DI/ContainerBuilder.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\ContainerLoader' => __DIR__ . '/..' . '/nette/di/src/DI/ContainerLoader.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Definitions\\AccessorDefinition' => __DIR__ . '/..' . '/nette/di/src/DI/Definitions/AccessorDefinition.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Definitions\\Definition' => __DIR__ . '/..' . '/nette/di/src/DI/Definitions/Definition.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Definitions\\FactoryDefinition' => __DIR__ . '/..' . '/nette/di/src/DI/Definitions/FactoryDefinition.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Definitions\\ImportedDefinition' => __DIR__ . '/..' . '/nette/di/src/DI/Definitions/ImportedDefinition.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Definitions\\LocatorDefinition' => __DIR__ . '/..' . '/nette/di/src/DI/Definitions/LocatorDefinition.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Definitions\\Reference' => __DIR__ . '/..' . '/nette/di/src/DI/Definitions/Reference.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Definitions\\ServiceDefinition' => __DIR__ . '/..' . '/nette/di/src/DI/Definitions/ServiceDefinition.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Definitions\\Statement' => __DIR__ . '/..' . '/nette/di/src/DI/Definitions/Statement.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\DependencyChecker' => __DIR__ . '/..' . '/nette/di/src/DI/DependencyChecker.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\DynamicParameter' => __DIR__ . '/..' . '/nette/di/src/DI/DynamicParameter.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Extensions\\ConstantsExtension' => __DIR__ . '/..' . '/nette/di/src/DI/Extensions/ConstantsExtension.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Extensions\\DIExtension' => __DIR__ . '/..' . '/nette/di/src/DI/Extensions/DIExtension.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Extensions\\DecoratorExtension' => __DIR__ . '/..' . '/nette/di/src/DI/Extensions/DecoratorExtension.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Extensions\\ExtensionsExtension' => __DIR__ . '/..' . '/nette/di/src/DI/Extensions/ExtensionsExtension.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Extensions\\InjectExtension' => __DIR__ . '/..' . '/nette/di/src/DI/Extensions/InjectExtension.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Extensions\\ParametersExtension' => __DIR__ . '/..' . '/nette/di/src/DI/Extensions/ParametersExtension.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Extensions\\PhpExtension' => __DIR__ . '/..' . '/nette/di/src/DI/Extensions/PhpExtension.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Extensions\\SearchExtension' => __DIR__ . '/..' . '/nette/di/src/DI/Extensions/SearchExtension.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Extensions\\ServicesExtension' => __DIR__ . '/..' . '/nette/di/src/DI/Extensions/ServicesExtension.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Helpers' => __DIR__ . '/..' . '/nette/di/src/DI/Helpers.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\InvalidConfigurationException' => __DIR__ . '/..' . '/nette/di/src/DI/exceptions.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\MissingServiceException' => __DIR__ . '/..' . '/nette/di/src/DI/exceptions.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\NotAllowedDuringResolvingException' => __DIR__ . '/..' . '/nette/di/src/DI/exceptions.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\PhpGenerator' => __DIR__ . '/..' . '/nette/di/src/DI/PhpGenerator.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Resolver' => __DIR__ . '/..' . '/nette/di/src/DI/Resolver.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\ServiceCreationException' => __DIR__ . '/..' . '/nette/di/src/DI/exceptions.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\ServiceDefinition' => __DIR__ . '/..' . '/nette/di/src/compatibility.php',
        '_PHPStan_dcc7b7cff\\Nette\\DI\\Statement' => __DIR__ . '/..' . '/nette/di/src/compatibility.php',
        '_PHPStan_dcc7b7cff\\Nette\\DeprecatedException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
        '_PHPStan_dcc7b7cff\\Nette\\DirectoryNotFoundException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
        '_PHPStan_dcc7b7cff\\Nette\\FileNotFoundException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
        '_PHPStan_dcc7b7cff\\Nette\\HtmlStringable' => __DIR__ . '/..' . '/nette/utils/src/HtmlStringable.php',
        '_PHPStan_dcc7b7cff\\Nette\\IOException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
        '_PHPStan_dcc7b7cff\\Nette\\InvalidArgumentException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
        '_PHPStan_dcc7b7cff\\Nette\\InvalidStateException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
        '_PHPStan_dcc7b7cff\\Nette\\Iterators\\CachingIterator' => __DIR__ . '/..' . '/nette/utils/src/Iterators/CachingIterator.php',
        '_PHPStan_dcc7b7cff\\Nette\\Iterators\\Mapper' => __DIR__ . '/..' . '/nette/utils/src/Iterators/Mapper.php',
        '_PHPStan_dcc7b7cff\\Nette\\Loaders\\RobotLoader' => __DIR__ . '/..' . '/nette/robot-loader/src/RobotLoader/RobotLoader.php',
        '_PHPStan_dcc7b7cff\\Nette\\Localization\\ITranslator' => __DIR__ . '/..' . '/nette/utils/src/compatibility.php',
        '_PHPStan_dcc7b7cff\\Nette\\Localization\\Translator' => __DIR__ . '/..' . '/nette/utils/src/Translator.php',
        '_PHPStan_dcc7b7cff\\Nette\\MemberAccessException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
        '_PHPStan_dcc7b7cff\\Nette\\Neon\\Decoder' => __DIR__ . '/..' . '/nette/neon/src/Neon/Decoder.php',
        '_PHPStan_dcc7b7cff\\Nette\\Neon\\Encoder' => __DIR__ . '/..' . '/nette/neon/src/Neon/Encoder.php',
        '_PHPStan_dcc7b7cff\\Nette\\Neon\\Entity' => __DIR__ . '/..' . '/nette/neon/src/Neon/Entity.php',
        '_PHPStan_dcc7b7cff\\Nette\\Neon\\Exception' => __DIR__ . '/..' . '/nette/neon/src/Neon/Exception.php',
        '_PHPStan_dcc7b7cff\\Nette\\Neon\\Lexer' => __DIR__ . '/..' . '/nette/neon/src/Neon/Lexer.php',
        '_PHPStan_dcc7b7cff\\Nette\\Neon\\Neon' => __DIR__ . '/..' . '/nette/neon/src/Neon/Neon.php',
        '_PHPStan_dcc7b7cff\\Nette\\Neon\\Node' => __DIR__ . '/..' . '/nette/neon/src/Neon/Node.php',
        '_PHPStan_dcc7b7cff\\Nette\\Neon\\Node\\ArrayItemNode' => __DIR__ . '/..' . '/nette/neon/src/Neon/Node/ArrayItemNode.php',
        '_PHPStan_dcc7b7cff\\Nette\\Neon\\Node\\ArrayNode' => __DIR__ . '/..' . '/nette/neon/src/Neon/Node/ArrayNode.php',
        '_PHPStan_dcc7b7cff\\Nette\\Neon\\Node\\BlockArrayNode' => __DIR__ . '/..' . '/nette/neon/src/Neon/Node/BlockArrayNode.php',
        '_PHPStan_dcc7b7cff\\Nette\\Neon\\Node\\EntityChainNode' => __DIR__ . '/..' . '/nette/neon/src/Neon/Node/EntityChainNode.php',
        '_PHPStan_dcc7b7cff\\Nette\\Neon\\Node\\EntityNode' => __DIR__ . '/..' . '/nette/neon/src/Neon/Node/EntityNode.php',
        '_PHPStan_dcc7b7cff\\Nette\\Neon\\Node\\InlineArrayNode' => __DIR__ . '/..' . '/nette/neon/src/Neon/Node/InlineArrayNode.php',
        '_PHPStan_dcc7b7cff\\Nette\\Neon\\Node\\LiteralNode' => __DIR__ . '/..' . '/nette/neon/src/Neon/Node/LiteralNode.php',
        '_PHPStan_dcc7b7cff\\Nette\\Neon\\Node\\StringNode' => __DIR__ . '/..' . '/nette/neon/src/Neon/Node/StringNode.php',
        '_PHPStan_dcc7b7cff\\Nette\\Neon\\Parser' => __DIR__ . '/..' . '/nette/neon/src/Neon/Parser.php',
        '_PHPStan_dcc7b7cff\\Nette\\Neon\\Token' => __DIR__ . '/..' . '/nette/neon/src/Neon/Token.php',
        '_PHPStan_dcc7b7cff\\Nette\\Neon\\TokenStream' => __DIR__ . '/..' . '/nette/neon/src/Neon/TokenStream.php',
        '_PHPStan_dcc7b7cff\\Nette\\Neon\\Traverser' => __DIR__ . '/..' . '/nette/neon/src/Neon/Traverser.php',
        '_PHPStan_dcc7b7cff\\Nette\\NotImplementedException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
        '_PHPStan_dcc7b7cff\\Nette\\NotSupportedException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
        '_PHPStan_dcc7b7cff\\Nette\\OutOfRangeException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
        '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Attribute' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Attribute.php',
        '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\ClassType' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/ClassType.php',
        '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Closure' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Closure.php',
        '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Constant' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Constant.php',
        '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Dumper' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Dumper.php',
        '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\EnumCase' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/EnumCase.php',
        '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Extractor' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Extractor.php',
        '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Factory' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Factory.php',
        '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\GlobalFunction' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/GlobalFunction.php',
        '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Helpers' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Helpers.php',
        '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Literal' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Literal.php',
        '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Method' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Method.php',
        '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Parameter' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Parameter.php',
        '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\PhpFile' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/PhpFile.php',
        '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\PhpLiteral' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/PhpLiteral.php',
        '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\PhpNamespace' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/PhpNamespace.php',
        '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Printer' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Printer.php',
        '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\PromotedParameter' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/PromotedParameter.php',
        '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Property' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Property.php',
        '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\PsrPrinter' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/PsrPrinter.php',
        '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\TraitUse' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/TraitUse.php',
        '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Traits\\AttributeAware' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Traits/AttributeAware.php',
        '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Traits\\CommentAware' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Traits/CommentAware.php',
        '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Traits\\FunctionLike' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Traits/FunctionLike.php',
        '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Traits\\NameAware' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Traits/NameAware.php',
        '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Traits\\VisibilityAware' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Traits/VisibilityAware.php',
        '_PHPStan_dcc7b7cff\\Nette\\PhpGenerator\\Type' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Type.php',
        '_PHPStan_dcc7b7cff\\Nette\\Schema\\Context' => __DIR__ . '/..' . '/nette/schema/src/Schema/Context.php',
        '_PHPStan_dcc7b7cff\\Nette\\Schema\\DynamicParameter' => __DIR__ . '/..' . '/nette/schema/src/Schema/DynamicParameter.php',
        '_PHPStan_dcc7b7cff\\Nette\\Schema\\Elements\\AnyOf' => __DIR__ . '/..' . '/nette/schema/src/Schema/Elements/AnyOf.php',
        '_PHPStan_dcc7b7cff\\Nette\\Schema\\Elements\\Base' => __DIR__ . '/..' . '/nette/schema/src/Schema/Elements/Base.php',
        '_PHPStan_dcc7b7cff\\Nette\\Schema\\Elements\\Structure' => __DIR__ . '/..' . '/nette/schema/src/Schema/Elements/Structure.php',
        '_PHPStan_dcc7b7cff\\Nette\\Schema\\Elements\\Type' => __DIR__ . '/..' . '/nette/schema/src/Schema/Elements/Type.php',
        '_PHPStan_dcc7b7cff\\Nette\\Schema\\Expect' => __DIR__ . '/..' . '/nette/schema/src/Schema/Expect.php',
        '_PHPStan_dcc7b7cff\\Nette\\Schema\\Helpers' => __DIR__ . '/..' . '/nette/schema/src/Schema/Helpers.php',
        '_PHPStan_dcc7b7cff\\Nette\\Schema\\Message' => __DIR__ . '/..' . '/nette/schema/src/Schema/Message.php',
        '_PHPStan_dcc7b7cff\\Nette\\Schema\\Processor' => __DIR__ . '/..' . '/nette/schema/src/Schema/Processor.php',
        '_PHPStan_dcc7b7cff\\Nette\\Schema\\Schema' => __DIR__ . '/..' . '/nette/schema/src/Schema/Schema.php',
        '_PHPStan_dcc7b7cff\\Nette\\Schema\\ValidationException' => __DIR__ . '/..' . '/nette/schema/src/Schema/ValidationException.php',
        '_PHPStan_dcc7b7cff\\Nette\\SmartObject' => __DIR__ . '/..' . '/nette/utils/src/SmartObject.php',
        '_PHPStan_dcc7b7cff\\Nette\\StaticClass' => __DIR__ . '/..' . '/nette/utils/src/StaticClass.php',
        '_PHPStan_dcc7b7cff\\Nette\\UnexpectedValueException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
        '_PHPStan_dcc7b7cff\\Nette\\Utils\\ArrayHash' => __DIR__ . '/..' . '/nette/utils/src/Utils/ArrayHash.php',
        '_PHPStan_dcc7b7cff\\Nette\\Utils\\ArrayList' => __DIR__ . '/..' . '/nette/utils/src/Utils/ArrayList.php',
        '_PHPStan_dcc7b7cff\\Nette\\Utils\\Arrays' => __DIR__ . '/..' . '/nette/utils/src/Utils/Arrays.php',
        '_PHPStan_dcc7b7cff\\Nette\\Utils\\AssertionException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php',
        '_PHPStan_dcc7b7cff\\Nette\\Utils\\Callback' => __DIR__ . '/..' . '/nette/utils/src/Utils/Callback.php',
        '_PHPStan_dcc7b7cff\\Nette\\Utils\\DateTime' => __DIR__ . '/..' . '/nette/utils/src/Utils/DateTime.php',
        '_PHPStan_dcc7b7cff\\Nette\\Utils\\FileSystem' => __DIR__ . '/..' . '/nette/utils/src/Utils/FileSystem.php',
        '_PHPStan_dcc7b7cff\\Nette\\Utils\\Finder' => __DIR__ . '/..' . '/nette/finder/src/Utils/Finder.php',
        '_PHPStan_dcc7b7cff\\Nette\\Utils\\Floats' => __DIR__ . '/..' . '/nette/utils/src/Utils/Floats.php',
        '_PHPStan_dcc7b7cff\\Nette\\Utils\\Helpers' => __DIR__ . '/..' . '/nette/utils/src/Utils/Helpers.php',
        '_PHPStan_dcc7b7cff\\Nette\\Utils\\Html' => __DIR__ . '/..' . '/nette/utils/src/Utils/Html.php',
        '_PHPStan_dcc7b7cff\\Nette\\Utils\\IHtmlString' => __DIR__ . '/..' . '/nette/utils/src/compatibility.php',
        '_PHPStan_dcc7b7cff\\Nette\\Utils\\Image' => __DIR__ . '/..' . '/nette/utils/src/Utils/Image.php',
        '_PHPStan_dcc7b7cff\\Nette\\Utils\\ImageException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php',
        '_PHPStan_dcc7b7cff\\Nette\\Utils\\Json' => __DIR__ . '/..' . '/nette/utils/src/Utils/Json.php',
        '_PHPStan_dcc7b7cff\\Nette\\Utils\\JsonException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php',
        '_PHPStan_dcc7b7cff\\Nette\\Utils\\ObjectHelpers' => __DIR__ . '/..' . '/nette/utils/src/Utils/ObjectHelpers.php',
        '_PHPStan_dcc7b7cff\\Nette\\Utils\\ObjectMixin' => __DIR__ . '/..' . '/nette/utils/src/Utils/ObjectMixin.php',
        '_PHPStan_dcc7b7cff\\Nette\\Utils\\Paginator' => __DIR__ . '/..' . '/nette/utils/src/Utils/Paginator.php',
        '_PHPStan_dcc7b7cff\\Nette\\Utils\\Random' => __DIR__ . '/..' . '/nette/utils/src/Utils/Random.php',
        '_PHPStan_dcc7b7cff\\Nette\\Utils\\Reflection' => __DIR__ . '/..' . '/nette/utils/src/Utils/Reflection.php',
        '_PHPStan_dcc7b7cff\\Nette\\Utils\\RegexpException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php',
        '_PHPStan_dcc7b7cff\\Nette\\Utils\\Strings' => __DIR__ . '/..' . '/nette/utils/src/Utils/Strings.php',
        '_PHPStan_dcc7b7cff\\Nette\\Utils\\Type' => __DIR__ . '/..' . '/nette/utils/src/Utils/Type.php',
        '_PHPStan_dcc7b7cff\\Nette\\Utils\\UnknownImageFileException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php',
        '_PHPStan_dcc7b7cff\\Nette\\Utils\\Validators' => __DIR__ . '/..' . '/nette/utils/src/Utils/Validators.php',
        '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\CiDetector' => __DIR__ . '/..' . '/ondram/ci-detector/src/CiDetector.php',
        '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\AbstractCi' => __DIR__ . '/..' . '/ondram/ci-detector/src/Ci/AbstractCi.php',
        '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\AppVeyor' => __DIR__ . '/..' . '/ondram/ci-detector/src/Ci/AppVeyor.php',
        '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\AwsCodeBuild' => __DIR__ . '/..' . '/ondram/ci-detector/src/Ci/AwsCodeBuild.php',
        '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\Bamboo' => __DIR__ . '/..' . '/ondram/ci-detector/src/Ci/Bamboo.php',
        '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\BitbucketPipelines' => __DIR__ . '/..' . '/ondram/ci-detector/src/Ci/BitbucketPipelines.php',
        '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\Buddy' => __DIR__ . '/..' . '/ondram/ci-detector/src/Ci/Buddy.php',
        '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\CiInterface' => __DIR__ . '/..' . '/ondram/ci-detector/src/Ci/CiInterface.php',
        '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\Circle' => __DIR__ . '/..' . '/ondram/ci-detector/src/Ci/Circle.php',
        '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\Codeship' => __DIR__ . '/..' . '/ondram/ci-detector/src/Ci/Codeship.php',
        '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\Continuousphp' => __DIR__ . '/..' . '/ondram/ci-detector/src/Ci/Continuousphp.php',
        '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\Drone' => __DIR__ . '/..' . '/ondram/ci-detector/src/Ci/Drone.php',
        '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\GitHubActions' => __DIR__ . '/..' . '/ondram/ci-detector/src/Ci/GitHubActions.php',
        '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\GitLab' => __DIR__ . '/..' . '/ondram/ci-detector/src/Ci/GitLab.php',
        '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\Jenkins' => __DIR__ . '/..' . '/ondram/ci-detector/src/Ci/Jenkins.php',
        '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\TeamCity' => __DIR__ . '/..' . '/ondram/ci-detector/src/Ci/TeamCity.php',
        '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\Travis' => __DIR__ . '/..' . '/ondram/ci-detector/src/Ci/Travis.php',
        '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Ci\\Wercker' => __DIR__ . '/..' . '/ondram/ci-detector/src/Ci/Wercker.php',
        '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Env' => __DIR__ . '/..' . '/ondram/ci-detector/src/Env.php',
        '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\Exception\\CiNotDetectedException' => __DIR__ . '/..' . '/ondram/ci-detector/src/Exception/CiNotDetectedException.php',
        '_PHPStan_dcc7b7cff\\OndraM\\CiDetector\\TrinaryLogic' => __DIR__ . '/..' . '/ondram/ci-detector/src/TrinaryLogic.php',
        '_PHPStan_dcc7b7cff\\Psr\\Container\\ContainerExceptionInterface' => __DIR__ . '/..' . '/psr/container/src/ContainerExceptionInterface.php',
        '_PHPStan_dcc7b7cff\\Psr\\Container\\ContainerInterface' => __DIR__ . '/..' . '/psr/container/src/ContainerInterface.php',
        '_PHPStan_dcc7b7cff\\Psr\\Container\\NotFoundExceptionInterface' => __DIR__ . '/..' . '/psr/container/src/NotFoundExceptionInterface.php',
        '_PHPStan_dcc7b7cff\\Psr\\Http\\Message\\MessageInterface' => __DIR__ . '/..' . '/psr/http-message/src/MessageInterface.php',
        '_PHPStan_dcc7b7cff\\Psr\\Http\\Message\\RequestInterface' => __DIR__ . '/..' . '/psr/http-message/src/RequestInterface.php',
        '_PHPStan_dcc7b7cff\\Psr\\Http\\Message\\ResponseInterface' => __DIR__ . '/..' . '/psr/http-message/src/ResponseInterface.php',
        '_PHPStan_dcc7b7cff\\Psr\\Http\\Message\\ServerRequestInterface' => __DIR__ . '/..' . '/psr/http-message/src/ServerRequestInterface.php',
        '_PHPStan_dcc7b7cff\\Psr\\Http\\Message\\StreamInterface' => __DIR__ . '/..' . '/psr/http-message/src/StreamInterface.php',
        '_PHPStan_dcc7b7cff\\Psr\\Http\\Message\\UploadedFileInterface' => __DIR__ . '/..' . '/psr/http-message/src/UploadedFileInterface.php',
        '_PHPStan_dcc7b7cff\\Psr\\Http\\Message\\UriInterface' => __DIR__ . '/..' . '/psr/http-message/src/UriInterface.php',
        '_PHPStan_dcc7b7cff\\Psr\\Log\\AbstractLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/AbstractLogger.php',
        '_PHPStan_dcc7b7cff\\Psr\\Log\\InvalidArgumentException' => __DIR__ . '/..' . '/psr/log/Psr/Log/InvalidArgumentException.php',
        '_PHPStan_dcc7b7cff\\Psr\\Log\\LogLevel' => __DIR__ . '/..' . '/psr/log/Psr/Log/LogLevel.php',
        '_PHPStan_dcc7b7cff\\Psr\\Log\\LoggerAwareInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerAwareInterface.php',
        '_PHPStan_dcc7b7cff\\Psr\\Log\\LoggerAwareTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerAwareTrait.php',
        '_PHPStan_dcc7b7cff\\Psr\\Log\\LoggerInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerInterface.php',
        '_PHPStan_dcc7b7cff\\Psr\\Log\\LoggerTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerTrait.php',
        '_PHPStan_dcc7b7cff\\Psr\\Log\\NullLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/NullLogger.php',
        '_PHPStan_dcc7b7cff\\React\\Cache\\ArrayCache' => __DIR__ . '/..' . '/react/cache/src/ArrayCache.php',
        '_PHPStan_dcc7b7cff\\React\\Cache\\CacheInterface' => __DIR__ . '/..' . '/react/cache/src/CacheInterface.php',
        '_PHPStan_dcc7b7cff\\React\\ChildProcess\\Process' => __DIR__ . '/..' . '/react/child-process/src/Process.php',
        '_PHPStan_dcc7b7cff\\React\\Dns\\BadServerException' => __DIR__ . '/..' . '/react/dns/src/BadServerException.php',
        '_PHPStan_dcc7b7cff\\React\\Dns\\Config\\Config' => __DIR__ . '/..' . '/react/dns/src/Config/Config.php',
        '_PHPStan_dcc7b7cff\\React\\Dns\\Config\\HostsFile' => __DIR__ . '/..' . '/react/dns/src/Config/HostsFile.php',
        '_PHPStan_dcc7b7cff\\React\\Dns\\Model\\Message' => __DIR__ . '/..' . '/react/dns/src/Model/Message.php',
        '_PHPStan_dcc7b7cff\\React\\Dns\\Model\\Record' => __DIR__ . '/..' . '/react/dns/src/Model/Record.php',
        '_PHPStan_dcc7b7cff\\React\\Dns\\Protocol\\BinaryDumper' => __DIR__ . '/..' . '/react/dns/src/Protocol/BinaryDumper.php',
        '_PHPStan_dcc7b7cff\\React\\Dns\\Protocol\\Parser' => __DIR__ . '/..' . '/react/dns/src/Protocol/Parser.php',
        '_PHPStan_dcc7b7cff\\React\\Dns\\Query\\CachingExecutor' => __DIR__ . '/..' . '/react/dns/src/Query/CachingExecutor.php',
        '_PHPStan_dcc7b7cff\\React\\Dns\\Query\\CancellationException' => __DIR__ . '/..' . '/react/dns/src/Query/CancellationException.php',
        '_PHPStan_dcc7b7cff\\React\\Dns\\Query\\CoopExecutor' => __DIR__ . '/..' . '/react/dns/src/Query/CoopExecutor.php',
        '_PHPStan_dcc7b7cff\\React\\Dns\\Query\\ExecutorInterface' => __DIR__ . '/..' . '/react/dns/src/Query/ExecutorInterface.php',
        '_PHPStan_dcc7b7cff\\React\\Dns\\Query\\FallbackExecutor' => __DIR__ . '/..' . '/react/dns/src/Query/FallbackExecutor.php',
        '_PHPStan_dcc7b7cff\\React\\Dns\\Query\\HostsFileExecutor' => __DIR__ . '/..' . '/react/dns/src/Query/HostsFileExecutor.php',
        '_PHPStan_dcc7b7cff\\React\\Dns\\Query\\Query' => __DIR__ . '/..' . '/react/dns/src/Query/Query.php',
        '_PHPStan_dcc7b7cff\\React\\Dns\\Query\\RetryExecutor' => __DIR__ . '/..' . '/react/dns/src/Query/RetryExecutor.php',
        '_PHPStan_dcc7b7cff\\React\\Dns\\Query\\SelectiveTransportExecutor' => __DIR__ . '/..' . '/react/dns/src/Query/SelectiveTransportExecutor.php',
        '_PHPStan_dcc7b7cff\\React\\Dns\\Query\\TcpTransportExecutor' => __DIR__ . '/..' . '/react/dns/src/Query/TcpTransportExecutor.php',
        '_PHPStan_dcc7b7cff\\React\\Dns\\Query\\TimeoutException' => __DIR__ . '/..' . '/react/dns/src/Query/TimeoutException.php',
        '_PHPStan_dcc7b7cff\\React\\Dns\\Query\\TimeoutExecutor' => __DIR__ . '/..' . '/react/dns/src/Query/TimeoutExecutor.php',
        '_PHPStan_dcc7b7cff\\React\\Dns\\Query\\UdpTransportExecutor' => __DIR__ . '/..' . '/react/dns/src/Query/UdpTransportExecutor.php',
        '_PHPStan_dcc7b7cff\\React\\Dns\\RecordNotFoundException' => __DIR__ . '/..' . '/react/dns/src/RecordNotFoundException.php',
        '_PHPStan_dcc7b7cff\\React\\Dns\\Resolver\\Factory' => __DIR__ . '/..' . '/react/dns/src/Resolver/Factory.php',
        '_PHPStan_dcc7b7cff\\React\\Dns\\Resolver\\Resolver' => __DIR__ . '/..' . '/react/dns/src/Resolver/Resolver.php',
        '_PHPStan_dcc7b7cff\\React\\Dns\\Resolver\\ResolverInterface' => __DIR__ . '/..' . '/react/dns/src/Resolver/ResolverInterface.php',
        '_PHPStan_dcc7b7cff\\React\\EventLoop\\ExtEvLoop' => __DIR__ . '/..' . '/react/event-loop/src/ExtEvLoop.php',
        '_PHPStan_dcc7b7cff\\React\\EventLoop\\ExtEventLoop' => __DIR__ . '/..' . '/react/event-loop/src/ExtEventLoop.php',
        '_PHPStan_dcc7b7cff\\React\\EventLoop\\ExtLibevLoop' => __DIR__ . '/..' . '/react/event-loop/src/ExtLibevLoop.php',
        '_PHPStan_dcc7b7cff\\React\\EventLoop\\ExtLibeventLoop' => __DIR__ . '/..' . '/react/event-loop/src/ExtLibeventLoop.php',
        '_PHPStan_dcc7b7cff\\React\\EventLoop\\ExtUvLoop' => __DIR__ . '/..' . '/react/event-loop/src/ExtUvLoop.php',
        '_PHPStan_dcc7b7cff\\React\\EventLoop\\Factory' => __DIR__ . '/..' . '/react/event-loop/src/Factory.php',
        '_PHPStan_dcc7b7cff\\React\\EventLoop\\Loop' => __DIR__ . '/..' . '/react/event-loop/src/Loop.php',
        '_PHPStan_dcc7b7cff\\React\\EventLoop\\LoopInterface' => __DIR__ . '/..' . '/react/event-loop/src/LoopInterface.php',
        '_PHPStan_dcc7b7cff\\React\\EventLoop\\SignalsHandler' => __DIR__ . '/..' . '/react/event-loop/src/SignalsHandler.php',
        '_PHPStan_dcc7b7cff\\React\\EventLoop\\StreamSelectLoop' => __DIR__ . '/..' . '/react/event-loop/src/StreamSelectLoop.php',
        '_PHPStan_dcc7b7cff\\React\\EventLoop\\Tick\\FutureTickQueue' => __DIR__ . '/..' . '/react/event-loop/src/Tick/FutureTickQueue.php',
        '_PHPStan_dcc7b7cff\\React\\EventLoop\\TimerInterface' => __DIR__ . '/..' . '/react/event-loop/src/TimerInterface.php',
        '_PHPStan_dcc7b7cff\\React\\EventLoop\\Timer\\Timer' => __DIR__ . '/..' . '/react/event-loop/src/Timer/Timer.php',
        '_PHPStan_dcc7b7cff\\React\\EventLoop\\Timer\\Timers' => __DIR__ . '/..' . '/react/event-loop/src/Timer/Timers.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Browser' => __DIR__ . '/..' . '/react/http/src/Browser.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Client\\Client' => __DIR__ . '/..' . '/react/http/src/Client/Client.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\HttpServer' => __DIR__ . '/..' . '/react/http/src/HttpServer.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Io\\BufferedBody' => __DIR__ . '/..' . '/react/http/src/Io/BufferedBody.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Io\\ChunkedDecoder' => __DIR__ . '/..' . '/react/http/src/Io/ChunkedDecoder.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Io\\ChunkedEncoder' => __DIR__ . '/..' . '/react/http/src/Io/ChunkedEncoder.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Io\\ClientConnectionManager' => __DIR__ . '/..' . '/react/http/src/Io/ClientConnectionManager.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Io\\ClientRequestState' => __DIR__ . '/..' . '/react/http/src/Io/ClientRequestState.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Io\\ClientRequestStream' => __DIR__ . '/..' . '/react/http/src/Io/ClientRequestStream.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Io\\Clock' => __DIR__ . '/..' . '/react/http/src/Io/Clock.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Io\\CloseProtectionStream' => __DIR__ . '/..' . '/react/http/src/Io/CloseProtectionStream.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Io\\EmptyBodyStream' => __DIR__ . '/..' . '/react/http/src/Io/EmptyBodyStream.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Io\\HttpBodyStream' => __DIR__ . '/..' . '/react/http/src/Io/HttpBodyStream.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Io\\IniUtil' => __DIR__ . '/..' . '/react/http/src/Io/IniUtil.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Io\\LengthLimitedStream' => __DIR__ . '/..' . '/react/http/src/Io/LengthLimitedStream.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Io\\MiddlewareRunner' => __DIR__ . '/..' . '/react/http/src/Io/MiddlewareRunner.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Io\\MultipartParser' => __DIR__ . '/..' . '/react/http/src/Io/MultipartParser.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Io\\PauseBufferStream' => __DIR__ . '/..' . '/react/http/src/Io/PauseBufferStream.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Io\\ReadableBodyStream' => __DIR__ . '/..' . '/react/http/src/Io/ReadableBodyStream.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Io\\RequestHeaderParser' => __DIR__ . '/..' . '/react/http/src/Io/RequestHeaderParser.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Io\\Sender' => __DIR__ . '/..' . '/react/http/src/Io/Sender.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Io\\StreamingServer' => __DIR__ . '/..' . '/react/http/src/Io/StreamingServer.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Io\\Transaction' => __DIR__ . '/..' . '/react/http/src/Io/Transaction.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Io\\UploadedFile' => __DIR__ . '/..' . '/react/http/src/Io/UploadedFile.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Message\\Request' => __DIR__ . '/..' . '/react/http/src/Message/Request.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Message\\Response' => __DIR__ . '/..' . '/react/http/src/Message/Response.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Message\\ResponseException' => __DIR__ . '/..' . '/react/http/src/Message/ResponseException.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Message\\ServerRequest' => __DIR__ . '/..' . '/react/http/src/Message/ServerRequest.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Middleware\\LimitConcurrentRequestsMiddleware' => __DIR__ . '/..' . '/react/http/src/Middleware/LimitConcurrentRequestsMiddleware.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Middleware\\RequestBodyBufferMiddleware' => __DIR__ . '/..' . '/react/http/src/Middleware/RequestBodyBufferMiddleware.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Middleware\\RequestBodyParserMiddleware' => __DIR__ . '/..' . '/react/http/src/Middleware/RequestBodyParserMiddleware.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Middleware\\StreamingRequestMiddleware' => __DIR__ . '/..' . '/react/http/src/Middleware/StreamingRequestMiddleware.php',
        '_PHPStan_dcc7b7cff\\React\\Http\\Server' => __DIR__ . '/..' . '/react/http/src/Server.php',
        '_PHPStan_dcc7b7cff\\React\\Promise\\CancellablePromiseInterface' => __DIR__ . '/..' . '/react/promise/src/CancellablePromiseInterface.php',
        '_PHPStan_dcc7b7cff\\React\\Promise\\CancellationQueue' => __DIR__ . '/..' . '/react/promise/src/CancellationQueue.php',
        '_PHPStan_dcc7b7cff\\React\\Promise\\Deferred' => __DIR__ . '/..' . '/react/promise/src/Deferred.php',
        '_PHPStan_dcc7b7cff\\React\\Promise\\Exception\\LengthException' => __DIR__ . '/..' . '/react/promise/src/Exception/LengthException.php',
        '_PHPStan_dcc7b7cff\\React\\Promise\\ExtendedPromiseInterface' => __DIR__ . '/..' . '/react/promise/src/ExtendedPromiseInterface.php',
        '_PHPStan_dcc7b7cff\\React\\Promise\\FulfilledPromise' => __DIR__ . '/..' . '/react/promise/src/FulfilledPromise.php',
        '_PHPStan_dcc7b7cff\\React\\Promise\\LazyPromise' => __DIR__ . '/..' . '/react/promise/src/LazyPromise.php',
        '_PHPStan_dcc7b7cff\\React\\Promise\\Promise' => __DIR__ . '/..' . '/react/promise/src/Promise.php',
        '_PHPStan_dcc7b7cff\\React\\Promise\\PromiseInterface' => __DIR__ . '/..' . '/react/promise/src/PromiseInterface.php',
        '_PHPStan_dcc7b7cff\\React\\Promise\\PromisorInterface' => __DIR__ . '/..' . '/react/promise/src/PromisorInterface.php',
        '_PHPStan_dcc7b7cff\\React\\Promise\\RejectedPromise' => __DIR__ . '/..' . '/react/promise/src/RejectedPromise.php',
        '_PHPStan_dcc7b7cff\\React\\Promise\\Timer\\TimeoutException' => __DIR__ . '/..' . '/react/promise-timer/src/TimeoutException.php',
        '_PHPStan_dcc7b7cff\\React\\Promise\\UnhandledRejectionException' => __DIR__ . '/..' . '/react/promise/src/UnhandledRejectionException.php',
        '_PHPStan_dcc7b7cff\\React\\Socket\\Connection' => __DIR__ . '/..' . '/react/socket/src/Connection.php',
        '_PHPStan_dcc7b7cff\\React\\Socket\\ConnectionInterface' => __DIR__ . '/..' . '/react/socket/src/ConnectionInterface.php',
        '_PHPStan_dcc7b7cff\\React\\Socket\\Connector' => __DIR__ . '/..' . '/react/socket/src/Connector.php',
        '_PHPStan_dcc7b7cff\\React\\Socket\\ConnectorInterface' => __DIR__ . '/..' . '/react/socket/src/ConnectorInterface.php',
        '_PHPStan_dcc7b7cff\\React\\Socket\\DnsConnector' => __DIR__ . '/..' . '/react/socket/src/DnsConnector.php',
        '_PHPStan_dcc7b7cff\\React\\Socket\\FdServer' => __DIR__ . '/..' . '/react/socket/src/FdServer.php',
        '_PHPStan_dcc7b7cff\\React\\Socket\\FixedUriConnector' => __DIR__ . '/..' . '/react/socket/src/FixedUriConnector.php',
        '_PHPStan_dcc7b7cff\\React\\Socket\\HappyEyeBallsConnectionBuilder' => __DIR__ . '/..' . '/react/socket/src/HappyEyeBallsConnectionBuilder.php',
        '_PHPStan_dcc7b7cff\\React\\Socket\\HappyEyeBallsConnector' => __DIR__ . '/..' . '/react/socket/src/HappyEyeBallsConnector.php',
        '_PHPStan_dcc7b7cff\\React\\Socket\\LimitingServer' => __DIR__ . '/..' . '/react/socket/src/LimitingServer.php',
        '_PHPStan_dcc7b7cff\\React\\Socket\\SecureConnector' => __DIR__ . '/..' . '/react/socket/src/SecureConnector.php',
        '_PHPStan_dcc7b7cff\\React\\Socket\\SecureServer' => __DIR__ . '/..' . '/react/socket/src/SecureServer.php',
        '_PHPStan_dcc7b7cff\\React\\Socket\\Server' => __DIR__ . '/..' . '/react/socket/src/Server.php',
        '_PHPStan_dcc7b7cff\\React\\Socket\\ServerInterface' => __DIR__ . '/..' . '/react/socket/src/ServerInterface.php',
        '_PHPStan_dcc7b7cff\\React\\Socket\\SocketServer' => __DIR__ . '/..' . '/react/socket/src/SocketServer.php',
        '_PHPStan_dcc7b7cff\\React\\Socket\\StreamEncryption' => __DIR__ . '/..' . '/react/socket/src/StreamEncryption.php',
        '_PHPStan_dcc7b7cff\\React\\Socket\\TcpConnector' => __DIR__ . '/..' . '/react/socket/src/TcpConnector.php',
        '_PHPStan_dcc7b7cff\\React\\Socket\\TcpServer' => __DIR__ . '/..' . '/react/socket/src/TcpServer.php',
        '_PHPStan_dcc7b7cff\\React\\Socket\\TimeoutConnector' => __DIR__ . '/..' . '/react/socket/src/TimeoutConnector.php',
        '_PHPStan_dcc7b7cff\\React\\Socket\\UnixConnector' => __DIR__ . '/..' . '/react/socket/src/UnixConnector.php',
        '_PHPStan_dcc7b7cff\\React\\Socket\\UnixServer' => __DIR__ . '/..' . '/react/socket/src/UnixServer.php',
        '_PHPStan_dcc7b7cff\\React\\Stream\\CompositeStream' => __DIR__ . '/..' . '/react/stream/src/CompositeStream.php',
        '_PHPStan_dcc7b7cff\\React\\Stream\\DuplexResourceStream' => __DIR__ . '/..' . '/react/stream/src/DuplexResourceStream.php',
        '_PHPStan_dcc7b7cff\\React\\Stream\\DuplexStreamInterface' => __DIR__ . '/..' . '/react/stream/src/DuplexStreamInterface.php',
        '_PHPStan_dcc7b7cff\\React\\Stream\\ReadableResourceStream' => __DIR__ . '/..' . '/react/stream/src/ReadableResourceStream.php',
        '_PHPStan_dcc7b7cff\\React\\Stream\\ReadableStreamInterface' => __DIR__ . '/..' . '/react/stream/src/ReadableStreamInterface.php',
        '_PHPStan_dcc7b7cff\\React\\Stream\\ThroughStream' => __DIR__ . '/..' . '/react/stream/src/ThroughStream.php',
        '_PHPStan_dcc7b7cff\\React\\Stream\\Util' => __DIR__ . '/..' . '/react/stream/src/Util.php',
        '_PHPStan_dcc7b7cff\\React\\Stream\\WritableResourceStream' => __DIR__ . '/..' . '/react/stream/src/WritableResourceStream.php',
        '_PHPStan_dcc7b7cff\\React\\Stream\\WritableStreamInterface' => __DIR__ . '/..' . '/react/stream/src/WritableStreamInterface.php',
        '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\AppendStream' => __DIR__ . '/..' . '/ringcentral/psr7/src/AppendStream.php',
        '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\BufferStream' => __DIR__ . '/..' . '/ringcentral/psr7/src/BufferStream.php',
        '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\CachingStream' => __DIR__ . '/..' . '/ringcentral/psr7/src/CachingStream.php',
        '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\DroppingStream' => __DIR__ . '/..' . '/ringcentral/psr7/src/DroppingStream.php',
        '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\FnStream' => __DIR__ . '/..' . '/ringcentral/psr7/src/FnStream.php',
        '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\InflateStream' => __DIR__ . '/..' . '/ringcentral/psr7/src/InflateStream.php',
        '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\LazyOpenStream' => __DIR__ . '/..' . '/ringcentral/psr7/src/LazyOpenStream.php',
        '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\LimitStream' => __DIR__ . '/..' . '/ringcentral/psr7/src/LimitStream.php',
        '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\MessageTrait' => __DIR__ . '/..' . '/ringcentral/psr7/src/MessageTrait.php',
        '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\MultipartStream' => __DIR__ . '/..' . '/ringcentral/psr7/src/MultipartStream.php',
        '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\NoSeekStream' => __DIR__ . '/..' . '/ringcentral/psr7/src/NoSeekStream.php',
        '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\PumpStream' => __DIR__ . '/..' . '/ringcentral/psr7/src/PumpStream.php',
        '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\Request' => __DIR__ . '/..' . '/ringcentral/psr7/src/Request.php',
        '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\Response' => __DIR__ . '/..' . '/ringcentral/psr7/src/Response.php',
        '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\ServerRequest' => __DIR__ . '/..' . '/ringcentral/psr7/src/ServerRequest.php',
        '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\Stream' => __DIR__ . '/..' . '/ringcentral/psr7/src/Stream.php',
        '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\StreamDecoratorTrait' => __DIR__ . '/..' . '/ringcentral/psr7/src/StreamDecoratorTrait.php',
        '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\StreamWrapper' => __DIR__ . '/..' . '/ringcentral/psr7/src/StreamWrapper.php',
        '_PHPStan_dcc7b7cff\\RingCentral\\Psr7\\Uri' => __DIR__ . '/..' . '/ringcentral/psr7/src/Uri.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Application' => __DIR__ . '/..' . '/symfony/console/Application.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Attribute\\AsCommand' => __DIR__ . '/..' . '/symfony/console/Attribute/AsCommand.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\CI\\GithubActionReporter' => __DIR__ . '/..' . '/symfony/console/CI/GithubActionReporter.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Color' => __DIR__ . '/..' . '/symfony/console/Color.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\CommandLoader\\CommandLoaderInterface' => __DIR__ . '/..' . '/symfony/console/CommandLoader/CommandLoaderInterface.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\CommandLoader\\ContainerCommandLoader' => __DIR__ . '/..' . '/symfony/console/CommandLoader/ContainerCommandLoader.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\CommandLoader\\FactoryCommandLoader' => __DIR__ . '/..' . '/symfony/console/CommandLoader/FactoryCommandLoader.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Command\\Command' => __DIR__ . '/..' . '/symfony/console/Command/Command.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Command\\CompleteCommand' => __DIR__ . '/..' . '/symfony/console/Command/CompleteCommand.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Command\\DumpCompletionCommand' => __DIR__ . '/..' . '/symfony/console/Command/DumpCompletionCommand.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Command\\HelpCommand' => __DIR__ . '/..' . '/symfony/console/Command/HelpCommand.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Command\\LazyCommand' => __DIR__ . '/..' . '/symfony/console/Command/LazyCommand.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Command\\ListCommand' => __DIR__ . '/..' . '/symfony/console/Command/ListCommand.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Command\\LockableTrait' => __DIR__ . '/..' . '/symfony/console/Command/LockableTrait.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Command\\SignalableCommandInterface' => __DIR__ . '/..' . '/symfony/console/Command/SignalableCommandInterface.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Completion\\CompletionInput' => __DIR__ . '/..' . '/symfony/console/Completion/CompletionInput.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Completion\\CompletionSuggestions' => __DIR__ . '/..' . '/symfony/console/Completion/CompletionSuggestions.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Completion\\Output\\BashCompletionOutput' => __DIR__ . '/..' . '/symfony/console/Completion/Output/BashCompletionOutput.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Completion\\Output\\CompletionOutputInterface' => __DIR__ . '/..' . '/symfony/console/Completion/Output/CompletionOutputInterface.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Completion\\Suggestion' => __DIR__ . '/..' . '/symfony/console/Completion/Suggestion.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\ConsoleEvents' => __DIR__ . '/..' . '/symfony/console/ConsoleEvents.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Cursor' => __DIR__ . '/..' . '/symfony/console/Cursor.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\DependencyInjection\\AddConsoleCommandPass' => __DIR__ . '/..' . '/symfony/console/DependencyInjection/AddConsoleCommandPass.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Descriptor\\ApplicationDescription' => __DIR__ . '/..' . '/symfony/console/Descriptor/ApplicationDescription.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Descriptor\\Descriptor' => __DIR__ . '/..' . '/symfony/console/Descriptor/Descriptor.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Descriptor\\DescriptorInterface' => __DIR__ . '/..' . '/symfony/console/Descriptor/DescriptorInterface.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Descriptor\\JsonDescriptor' => __DIR__ . '/..' . '/symfony/console/Descriptor/JsonDescriptor.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Descriptor\\MarkdownDescriptor' => __DIR__ . '/..' . '/symfony/console/Descriptor/MarkdownDescriptor.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Descriptor\\TextDescriptor' => __DIR__ . '/..' . '/symfony/console/Descriptor/TextDescriptor.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Descriptor\\XmlDescriptor' => __DIR__ . '/..' . '/symfony/console/Descriptor/XmlDescriptor.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\EventListener\\ErrorListener' => __DIR__ . '/..' . '/symfony/console/EventListener/ErrorListener.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Event\\ConsoleCommandEvent' => __DIR__ . '/..' . '/symfony/console/Event/ConsoleCommandEvent.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Event\\ConsoleErrorEvent' => __DIR__ . '/..' . '/symfony/console/Event/ConsoleErrorEvent.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Event\\ConsoleEvent' => __DIR__ . '/..' . '/symfony/console/Event/ConsoleEvent.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Event\\ConsoleSignalEvent' => __DIR__ . '/..' . '/symfony/console/Event/ConsoleSignalEvent.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Event\\ConsoleTerminateEvent' => __DIR__ . '/..' . '/symfony/console/Event/ConsoleTerminateEvent.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Exception\\CommandNotFoundException' => __DIR__ . '/..' . '/symfony/console/Exception/CommandNotFoundException.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/console/Exception/ExceptionInterface.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/console/Exception/InvalidArgumentException.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Exception\\InvalidOptionException' => __DIR__ . '/..' . '/symfony/console/Exception/InvalidOptionException.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/console/Exception/LogicException.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Exception\\MissingInputException' => __DIR__ . '/..' . '/symfony/console/Exception/MissingInputException.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Exception\\NamespaceNotFoundException' => __DIR__ . '/..' . '/symfony/console/Exception/NamespaceNotFoundException.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/console/Exception/RuntimeException.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Formatter\\NullOutputFormatter' => __DIR__ . '/..' . '/symfony/console/Formatter/NullOutputFormatter.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Formatter\\NullOutputFormatterStyle' => __DIR__ . '/..' . '/symfony/console/Formatter/NullOutputFormatterStyle.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Formatter\\OutputFormatter' => __DIR__ . '/..' . '/symfony/console/Formatter/OutputFormatter.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Formatter\\OutputFormatterInterface' => __DIR__ . '/..' . '/symfony/console/Formatter/OutputFormatterInterface.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Formatter\\OutputFormatterStyle' => __DIR__ . '/..' . '/symfony/console/Formatter/OutputFormatterStyle.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Formatter\\OutputFormatterStyleInterface' => __DIR__ . '/..' . '/symfony/console/Formatter/OutputFormatterStyleInterface.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Formatter\\OutputFormatterStyleStack' => __DIR__ . '/..' . '/symfony/console/Formatter/OutputFormatterStyleStack.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Formatter\\WrappableOutputFormatterInterface' => __DIR__ . '/..' . '/symfony/console/Formatter/WrappableOutputFormatterInterface.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\DebugFormatterHelper' => __DIR__ . '/..' . '/symfony/console/Helper/DebugFormatterHelper.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\DescriptorHelper' => __DIR__ . '/..' . '/symfony/console/Helper/DescriptorHelper.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\Dumper' => __DIR__ . '/..' . '/symfony/console/Helper/Dumper.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\FormatterHelper' => __DIR__ . '/..' . '/symfony/console/Helper/FormatterHelper.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\Helper' => __DIR__ . '/..' . '/symfony/console/Helper/Helper.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\HelperInterface' => __DIR__ . '/..' . '/symfony/console/Helper/HelperInterface.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\HelperSet' => __DIR__ . '/..' . '/symfony/console/Helper/HelperSet.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\InputAwareHelper' => __DIR__ . '/..' . '/symfony/console/Helper/InputAwareHelper.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\ProcessHelper' => __DIR__ . '/..' . '/symfony/console/Helper/ProcessHelper.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\ProgressBar' => __DIR__ . '/..' . '/symfony/console/Helper/ProgressBar.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\ProgressIndicator' => __DIR__ . '/..' . '/symfony/console/Helper/ProgressIndicator.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\QuestionHelper' => __DIR__ . '/..' . '/symfony/console/Helper/QuestionHelper.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\SymfonyQuestionHelper' => __DIR__ . '/..' . '/symfony/console/Helper/SymfonyQuestionHelper.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\Table' => __DIR__ . '/..' . '/symfony/console/Helper/Table.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\TableCell' => __DIR__ . '/..' . '/symfony/console/Helper/TableCell.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\TableCellStyle' => __DIR__ . '/..' . '/symfony/console/Helper/TableCellStyle.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\TableRows' => __DIR__ . '/..' . '/symfony/console/Helper/TableRows.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\TableSeparator' => __DIR__ . '/..' . '/symfony/console/Helper/TableSeparator.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Helper\\TableStyle' => __DIR__ . '/..' . '/symfony/console/Helper/TableStyle.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Input\\ArgvInput' => __DIR__ . '/..' . '/symfony/console/Input/ArgvInput.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Input\\ArrayInput' => __DIR__ . '/..' . '/symfony/console/Input/ArrayInput.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Input\\Input' => __DIR__ . '/..' . '/symfony/console/Input/Input.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Input\\InputArgument' => __DIR__ . '/..' . '/symfony/console/Input/InputArgument.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Input\\InputAwareInterface' => __DIR__ . '/..' . '/symfony/console/Input/InputAwareInterface.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Input\\InputDefinition' => __DIR__ . '/..' . '/symfony/console/Input/InputDefinition.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Input\\InputInterface' => __DIR__ . '/..' . '/symfony/console/Input/InputInterface.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Input\\InputOption' => __DIR__ . '/..' . '/symfony/console/Input/InputOption.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Input\\StreamableInputInterface' => __DIR__ . '/..' . '/symfony/console/Input/StreamableInputInterface.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Input\\StringInput' => __DIR__ . '/..' . '/symfony/console/Input/StringInput.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Logger\\ConsoleLogger' => __DIR__ . '/..' . '/symfony/console/Logger/ConsoleLogger.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Output\\BufferedOutput' => __DIR__ . '/..' . '/symfony/console/Output/BufferedOutput.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Output\\ConsoleOutput' => __DIR__ . '/..' . '/symfony/console/Output/ConsoleOutput.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Output\\ConsoleOutputInterface' => __DIR__ . '/..' . '/symfony/console/Output/ConsoleOutputInterface.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Output\\ConsoleSectionOutput' => __DIR__ . '/..' . '/symfony/console/Output/ConsoleSectionOutput.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Output\\NullOutput' => __DIR__ . '/..' . '/symfony/console/Output/NullOutput.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Output\\Output' => __DIR__ . '/..' . '/symfony/console/Output/Output.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Output\\OutputInterface' => __DIR__ . '/..' . '/symfony/console/Output/OutputInterface.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Output\\StreamOutput' => __DIR__ . '/..' . '/symfony/console/Output/StreamOutput.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Output\\TrimmedBufferOutput' => __DIR__ . '/..' . '/symfony/console/Output/TrimmedBufferOutput.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Question\\ChoiceQuestion' => __DIR__ . '/..' . '/symfony/console/Question/ChoiceQuestion.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Question\\ConfirmationQuestion' => __DIR__ . '/..' . '/symfony/console/Question/ConfirmationQuestion.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Question\\Question' => __DIR__ . '/..' . '/symfony/console/Question/Question.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\SignalRegistry\\SignalRegistry' => __DIR__ . '/..' . '/symfony/console/SignalRegistry/SignalRegistry.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\SingleCommandApplication' => __DIR__ . '/..' . '/symfony/console/SingleCommandApplication.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Style\\OutputStyle' => __DIR__ . '/..' . '/symfony/console/Style/OutputStyle.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Style\\StyleInterface' => __DIR__ . '/..' . '/symfony/console/Style/StyleInterface.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Style\\SymfonyStyle' => __DIR__ . '/..' . '/symfony/console/Style/SymfonyStyle.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Terminal' => __DIR__ . '/..' . '/symfony/console/Terminal.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Tester\\ApplicationTester' => __DIR__ . '/..' . '/symfony/console/Tester/ApplicationTester.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Tester\\CommandCompletionTester' => __DIR__ . '/..' . '/symfony/console/Tester/CommandCompletionTester.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Tester\\CommandTester' => __DIR__ . '/..' . '/symfony/console/Tester/CommandTester.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Tester\\Constraint\\CommandIsSuccessful' => __DIR__ . '/..' . '/symfony/console/Tester/Constraint/CommandIsSuccessful.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Console\\Tester\\TesterTrait' => __DIR__ . '/..' . '/symfony/console/Tester/TesterTrait.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Comparator\\Comparator' => __DIR__ . '/..' . '/symfony/finder/Comparator/Comparator.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Comparator\\DateComparator' => __DIR__ . '/..' . '/symfony/finder/Comparator/DateComparator.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Comparator\\NumberComparator' => __DIR__ . '/..' . '/symfony/finder/Comparator/NumberComparator.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Exception\\AccessDeniedException' => __DIR__ . '/..' . '/symfony/finder/Exception/AccessDeniedException.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Exception\\DirectoryNotFoundException' => __DIR__ . '/..' . '/symfony/finder/Exception/DirectoryNotFoundException.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Finder' => __DIR__ . '/..' . '/symfony/finder/Finder.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Gitignore' => __DIR__ . '/..' . '/symfony/finder/Gitignore.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Glob' => __DIR__ . '/..' . '/symfony/finder/Glob.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\CustomFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/CustomFilterIterator.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\DateRangeFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/DateRangeFilterIterator.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\DepthRangeFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/DepthRangeFilterIterator.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\ExcludeDirectoryFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\FileTypeFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/FileTypeFilterIterator.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\FilecontentFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/FilecontentFilterIterator.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\FilenameFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/FilenameFilterIterator.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\LazyIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/LazyIterator.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\MultiplePcreFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/MultiplePcreFilterIterator.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\PathFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/PathFilterIterator.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\RecursiveDirectoryIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/RecursiveDirectoryIterator.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\SizeRangeFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/SizeRangeFilterIterator.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\SortableIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/SortableIterator.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\Iterator\\VcsIgnoredFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/VcsIgnoredFilterIterator.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Finder\\SplFileInfo' => __DIR__ . '/..' . '/symfony/finder/SplFileInfo.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/process/Exception/ExceptionInterface.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/process/Exception/InvalidArgumentException.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/process/Exception/LogicException.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\Exception\\ProcessFailedException' => __DIR__ . '/..' . '/symfony/process/Exception/ProcessFailedException.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\Exception\\ProcessSignaledException' => __DIR__ . '/..' . '/symfony/process/Exception/ProcessSignaledException.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\Exception\\ProcessTimedOutException' => __DIR__ . '/..' . '/symfony/process/Exception/ProcessTimedOutException.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/process/Exception/RuntimeException.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\ExecutableFinder' => __DIR__ . '/..' . '/symfony/process/ExecutableFinder.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\InputStream' => __DIR__ . '/..' . '/symfony/process/InputStream.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\PhpExecutableFinder' => __DIR__ . '/..' . '/symfony/process/PhpExecutableFinder.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\PhpProcess' => __DIR__ . '/..' . '/symfony/process/PhpProcess.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\Pipes\\AbstractPipes' => __DIR__ . '/..' . '/symfony/process/Pipes/AbstractPipes.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\Pipes\\PipesInterface' => __DIR__ . '/..' . '/symfony/process/Pipes/PipesInterface.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\Pipes\\UnixPipes' => __DIR__ . '/..' . '/symfony/process/Pipes/UnixPipes.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\Pipes\\WindowsPipes' => __DIR__ . '/..' . '/symfony/process/Pipes/WindowsPipes.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\Process' => __DIR__ . '/..' . '/symfony/process/Process.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\Process\\ProcessUtils' => __DIR__ . '/..' . '/symfony/process/ProcessUtils.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\AbstractString' => __DIR__ . '/..' . '/symfony/string/AbstractString.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\AbstractUnicodeString' => __DIR__ . '/..' . '/symfony/string/AbstractUnicodeString.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\ByteString' => __DIR__ . '/..' . '/symfony/string/ByteString.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\CodePointString' => __DIR__ . '/..' . '/symfony/string/CodePointString.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/string/Exception/ExceptionInterface.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/string/Exception/InvalidArgumentException.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/string/Exception/RuntimeException.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\Inflector\\EnglishInflector' => __DIR__ . '/..' . '/symfony/string/Inflector/EnglishInflector.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\Inflector\\FrenchInflector' => __DIR__ . '/..' . '/symfony/string/Inflector/FrenchInflector.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\Inflector\\InflectorInterface' => __DIR__ . '/..' . '/symfony/string/Inflector/InflectorInterface.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\LazyString' => __DIR__ . '/..' . '/symfony/string/LazyString.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\Slugger\\AsciiSlugger' => __DIR__ . '/..' . '/symfony/string/Slugger/AsciiSlugger.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\Slugger\\SluggerInterface' => __DIR__ . '/..' . '/symfony/string/Slugger/SluggerInterface.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Component\\String\\UnicodeString' => __DIR__ . '/..' . '/symfony/string/UnicodeString.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Contracts\\Service\\Attribute\\Required' => __DIR__ . '/..' . '/symfony/service-contracts/Attribute/Required.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Contracts\\Service\\Attribute\\SubscribedService' => __DIR__ . '/..' . '/symfony/service-contracts/Attribute/SubscribedService.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Contracts\\Service\\ResetInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ResetInterface.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Contracts\\Service\\ServiceLocatorTrait' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceLocatorTrait.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Contracts\\Service\\ServiceProviderInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceProviderInterface.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceSubscriberInterface.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceSubscriberTrait.php',
        '_PHPStan_dcc7b7cff\\Symfony\\Polyfill\\Ctype\\Ctype' => __DIR__ . '/..' . '/symfony/polyfill-ctype/Ctype.php',
    );

    public static function getInitializer(ClassLoader $loader)
    {
        return \Closure::bind(function () use ($loader) {
            $loader->prefixLengthsPsr4 = ComposerStaticInit0fc888f20645a0056333807f0fcc1038::$prefixLengthsPsr4;
            $loader->prefixDirsPsr4 = ComposerStaticInit0fc888f20645a0056333807f0fcc1038::$prefixDirsPsr4;
            $loader->classMap = ComposerStaticInit0fc888f20645a0056333807f0fcc1038::$classMap;

        }, null, ClassLoader::class);
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Event;

/**
 * Trait \Hoa\Event\Listens.
 *
 * Implementation of a listener.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
trait Listens
{
    /**
     * Listener instance.
     *
     * @var \Hoa\Event\Listener
     */
    protected $_listener = null;
    /**
     * Attach a callable to a listenable component.
     *
     * @param   string  $listenerId    Listener ID.
     * @param   mixed   $callable      Callable.
     * @return  \Hoa\Event\Listenable
     */
    public function on($listenerId, $callable)
    {
        $listener = $this->getListener();
        if (null === $listener) {
            throw new \Hoa\Event\Exception('Cannot attach a callable to the listener %s because ' . 'it has not been initialized yet.', 0, \get_class($this));
        }
        $listener->attach($listenerId, $callable);
        return $this;
    }
    /**
     * Set listener.
     *
     * @param  \Hoa\Event\Listener  $listener    Listener.
     * @return \Hoa\Event\Listener
     */
    protected function setListener(\Hoa\Event\Listener $listener)
    {
        $old = $this->_listener;
        $this->_listener = $listener;
        return $old;
    }
    /**
     * Get listener.
     *
     * @return \Hoa\Event\Listener
     */
    protected function getListener()
    {
        return $this->_listener;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Event;

/**
 * Class \Hoa\Event\Listener.
 *
 * A contrario of events, listeners are synchronous, identified at use and
 * useful for close interactions between one or some components.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Listener
{
    /**
     * Source of listener (for Bucket).
     *
     * @var \Hoa\Event\Listenable
     */
    protected $_source = null;
    /**
     * All listener IDs and associated listeners.
     *
     * @var array
     */
    protected $_callables = [];
    /**
     * Build a listener.
     *
     * @param   \Hoa\Event\Listenable  $source    Source (for Bucket).
     * @param   array                  $ids       Accepted ID.
     */
    public function __construct(\Hoa\Event\Listenable $source, array $ids)
    {
        $this->_source = $source;
        $this->addIds($ids);
        return;
    }
    /**
     * Add acceptable ID (or reset).
     *
     * @param   array  $ids    Accepted ID.
     * @return  void
     */
    public function addIds(array $ids)
    {
        foreach ($ids as $id) {
            $this->_callables[$id] = [];
        }
        return;
    }
    /**
     * Attach a callable to a listenable component.
     *
     * @param   string  $listenerId    Listener ID.
     * @param   mixed   $callable      Callable.
     * @return  \Hoa\Event\Listener
     * @throws  \Hoa\Event\Exception
     */
    public function attach($listenerId, $callable)
    {
        if (\false === $this->listenerExists($listenerId)) {
            throw new \Hoa\Event\Exception('Cannot listen %s because it is not defined.', 0, $listenerId);
        }
        $callable = xcallable($callable);
        $this->_callables[$listenerId][$callable->getHash()] = $callable;
        return $this;
    }
    /**
     * Detach a callable from a listenable component.
     *
     * @param   string  $listenerId    Listener ID.
     * @param   mixed   $callable      Callable.
     * @return  \Hoa\Event\Listener
     */
    public function detach($listenerId, $callable)
    {
        unset($this->_callables[$listenerId][xcallable($callable)->getHash()]);
        return $this;
    }
    /**
     * Detach all callables from a listenable component.
     *
     * @param  string  $listenerId    Listener ID.
     * @return \Hoa\Event\Listener
     */
    public function detachAll($listenerId)
    {
        unset($this->_callables[$listenerId]);
        return $this;
    }
    /**
     * Check if a listener exists.
     *
     * @param   string  $listenerId    Listener ID.
     * @return  bool
     */
    public function listenerExists($listenerId)
    {
        return \array_key_exists($listenerId, $this->_callables);
    }
    /**
     * Send/fire a bucket to a listener.
     *
     * @param   string             $listenerId    Listener ID.
     * @param   \Hoa\Event\Bucket  $data          Data.
     * @return  array
     * @throws  \Hoa\Event\Exception
     */
    public function fire($listenerId, \Hoa\Event\Bucket $data)
    {
        if (\false === $this->listenerExists($listenerId)) {
            throw new \Hoa\Event\Exception('Cannot fire on %s because it is not defined.', 1, $listenerId);
        }
        $data->setSource($this->_source);
        $out = [];
        foreach ($this->_callables[$listenerId] as $callable) {
            $out[] = $callable($data);
        }
        return $out;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Event;

/**
 * Class \Hoa\Event\Bucket.
 *
 * This class is the object which is transmit through event channels.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Bucket
{
    /**
     * Source object.
     *
     * @var \Hoa\Event\Source
     */
    protected $_source = null;
    /**
     * Data.
     *
     * @var mixed
     */
    protected $_data = null;
    /**
     * Set data.
     *
     * @param   mixed   $data    Data.
     */
    public function __construct($data = null)
    {
        $this->setData($data);
        return;
    }
    /**
     * Send this object on the event channel.
     *
     * @param   string             $eventId    Event ID.
     * @param   \Hoa\Event\Source  $source     Source.
     * @return  void
     */
    public function send($eventId, \Hoa\Event\Source $source)
    {
        return \Hoa\Event\Event::notify($eventId, $source, $this);
    }
    /**
     * Set source.
     *
     * @param   \Hoa\Event\Source  $source    Source.
     * @return  \Hoa\Event\Source
     */
    public function setSource(\Hoa\Event\Source $source)
    {
        $old = $this->_source;
        $this->_source = $source;
        return $old;
    }
    /**
     * Get source.
     *
     * @return  \Hoa\Event\Source
     */
    public function getSource()
    {
        return $this->_source;
    }
    /**
     * Set data.
     *
     * @param   mixed   $data    Data.
     * @return  mixed
     */
    public function setData($data)
    {
        $old = $this->_data;
        $this->_data = $data;
        return $old;
    }
    /**
     * Get data.
     *
     * @return  mixed
     */
    public function getData()
    {
        return $this->_data;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Event;

/**
 * Interface \Hoa\Event\Source.
 *
 * Each object which is listenable must implement this interface.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
interface Source
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Event;

use Hoa\Consistency;
/**
 * Class \Hoa\Event\Event.
 *
 * Events are asynchronous at registration, anonymous at use (until we
 * receive a bucket) and useful to largely spread data through components
 * without any known connection between them.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Event
{
    /**
     * Event ID key.
     *
     * @const int
     */
    const KEY_EVENT = 0;
    /**
     * Source object key.
     *
     * @const int
     */
    const KEY_SOURCE = 1;
    /**
     * Static register of all observable objects, i.e. \Hoa\Event\Source
     * object, i.e. object that can send event.
     *
     * @var array
     */
    private static $_register = [];
    /**
     * Callables, i.e. observer objects.
     *
     * @var array
     */
    protected $_callable = [];
    /**
     * Privatize the constructor.
     *
     */
    private function __construct()
    {
        return;
    }
    /**
     * Manage multiton of events, with the principle of asynchronous
     * attachments.
     *
     * @param   string  $eventId    Event ID.
     * @return  \Hoa\Event\Event
     */
    public static function getEvent($eventId)
    {
        if (!isset(self::$_register[$eventId][self::KEY_EVENT])) {
            self::$_register[$eventId] = [self::KEY_EVENT => new self(), self::KEY_SOURCE => null];
        }
        return self::$_register[$eventId][self::KEY_EVENT];
    }
    /**
     * Declare a new object in the observable collection.
     * Note: Hoa's libraries use hoa://Event/AnID for their observable objects;
     *
     * @param   string                    $eventId    Event ID.
     * @param   \Hoa\Event\Source|string  $source     Observable object or class.
     * @return  void
     * @throws  \Hoa\Event\Exception
     */
    public static function register($eventId, $source)
    {
        if (\true === self::eventExists($eventId)) {
            throw new \Hoa\Event\Exception('Cannot redeclare an event with the same ID, i.e. the event ' . 'ID %s already exists.', 0, $eventId);
        }
        if (\is_object($source) && !$source instanceof \Hoa\Event\Source) {
            throw new \Hoa\Event\Exception('The source must implement \\Hoa\\Event\\Source ' . 'interface; given %s.', 1, \get_class($source));
        } else {
            $reflection = new \ReflectionClass($source);
            if (\false === $reflection->implementsInterface('\\Hoa\\Event\\Source')) {
                throw new \Hoa\Event\Exception('The source must implement \\Hoa\\Event\\Source ' . 'interface; given %s.', 2, $source);
            }
        }
        if (!isset(self::$_register[$eventId][self::KEY_EVENT])) {
            self::$_register[$eventId][self::KEY_EVENT] = new self();
        }
        self::$_register[$eventId][self::KEY_SOURCE] = $source;
        return;
    }
    /**
     * Undeclare an object in the observable collection.
     *
     * @param   string  $eventId    Event ID.
     * @param   bool    $hard       If false, just delete the source, else,
     *                              delete source and attached callables.
     * @return  void
     */
    public static function unregister($eventId, $hard = \false)
    {
        if (\false !== $hard) {
            unset(self::$_register[$eventId]);
        } else {
            self::$_register[$eventId][self::KEY_SOURCE] = null;
        }
        return;
    }
    /**
     * Attach an object to an event.
     * It can be a callable or an accepted callable form (please, see the
     * \Hoa\Consistency\Xcallable class).
     *
     * @param   mixed   $callable    Callable.
     * @return  \Hoa\Event\Event
     */
    public function attach($callable)
    {
        $callable = xcallable($callable);
        $this->_callable[$callable->getHash()] = $callable;
        return $this;
    }
    /**
     * Detach an object to an event.
     * Please see $this->attach() method.
     *
     * @param   mixed   $callable    Callable.
     * @return  \Hoa\Event\Event
     */
    public function detach($callable)
    {
        unset($this->_callable[xcallable($callable)->getHash()]);
        return $this;
    }
    /**
     * Check if at least one callable is attached to an event.
     *
     * @return  bool
     */
    public function isListened()
    {
        return !empty($this->_callable);
    }
    /**
     * Notify, i.e. send data to observers.
     *
     * @param   string             $eventId    Event ID.
     * @param   \Hoa\Event\Source  $source     Source.
     * @param   \Hoa\Event\Bucket  $data       Data.
     * @return  void
     * @throws  \Hoa\Event\Exception
     */
    public static function notify($eventId, \Hoa\Event\Source $source, \Hoa\Event\Bucket $data)
    {
        if (\false === self::eventExists($eventId)) {
            throw new \Hoa\Event\Exception('Event ID %s does not exist, cannot send notification.', 3, $eventId);
        }
        $data->setSource($source);
        $event = self::getEvent($eventId);
        foreach ($event->_callable as $callable) {
            $callable($data);
        }
        return;
    }
    /**
     * Check whether an event exists.
     *
     * @param   string  $eventId    Event ID.
     * @return  bool
     */
    public static function eventExists($eventId)
    {
        return \array_key_exists($eventId, self::$_register) && self::$_register[$eventId][self::KEY_SOURCE] !== null;
    }
}
/**
 * Flex entity.
 */
Consistency::flexEntity('Hoa\\Event\\Event');
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Event;

/**
 * Interface \Hoa\Event\Listenable.
 *
 * Each object which is listenable must implement this interface.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
interface Listenable extends \Hoa\Event\Source
{
    /**
     * Attach a callable to a listenable component.
     *
     * @param   string  $listenerId    Listener ID.
     * @param   mixed   $callable      Callable.
     * @return  \Hoa\Event\Listenable
     */
    public function on($listenerId, $callable);
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Event;

use Hoa\Exception as HoaException;
/**
 * Class \Hoa\Event\Exception.
 *
 * Extending the \Hoa\Exception\Exception class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Exception extends HoaException
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\File;

use Hoa\Iterator;
/**
 * Class \Hoa\File\Finder.
 *
 * This class allows to find files easily by using filters and flags.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Finder implements Iterator\Aggregate
{
    /**
     * SplFileInfo classname.
     *
     * @var string
     */
    protected $_splFileInfo = 'Hoa\\File\\SplFileInfo';
    /**
     * Paths where to look for.
     *
     * @var array
     */
    protected $_paths = [];
    /**
     * Max depth in recursion.
     *
     * @var int
     */
    protected $_maxDepth = -1;
    /**
     * Filters.
     *
     * @var array
     */
    protected $_filters = [];
    /**
     * Flags.
     *
     * @var int
     */
    protected $_flags = -1;
    /**
     * Types of files to handle.
     *
     * @var array
     */
    protected $_types = [];
    /**
     * What comes first: parent or child?
     *
     * @var int
     */
    protected $_first = -1;
    /**
     * Sorts.
     *
     * @var array
     */
    protected $_sorts = [];
    /**
     * Initialize.
     *
     */
    public function __construct()
    {
        $this->_flags = Iterator\FileSystem::KEY_AS_PATHNAME | Iterator\FileSystem::CURRENT_AS_FILEINFO | Iterator\FileSystem::SKIP_DOTS;
        $this->_first = Iterator\Recursive\Iterator::SELF_FIRST;
        return;
    }
    /**
     * Select a directory to scan.
     *
     * @param   string|array  $paths    One or more paths.
     * @return  \Hoa\File\Finder
     */
    public function in($paths)
    {
        if (!\is_array($paths)) {
            $paths = [$paths];
        }
        foreach ($paths as $path) {
            if (1 === \preg_match('/[\\*\\?\\[\\]]/', $path)) {
                $iterator = new Iterator\CallbackFilter(new Iterator\Glob(\rtrim($path, DS)), function ($current) {
                    return $current->isDir();
                });
                foreach ($iterator as $fileInfo) {
                    $this->_paths[] = $fileInfo->getPathname();
                }
            } else {
                $this->_paths[] = $path;
            }
        }
        return $this;
    }
    /**
     * Set max depth for recursion.
     *
     * @param   int  $depth    Depth.
     * @return  \Hoa\File\Finder
     */
    public function maxDepth($depth)
    {
        $this->_maxDepth = $depth;
        return $this;
    }
    /**
     * Include files in the result.
     *
     * @return  \Hoa\File\Finder
     */
    public function files()
    {
        $this->_types[] = 'file';
        return $this;
    }
    /**
     * Include directories in the result.
     *
     * @return  \Hoa\File\Finder
     */
    public function directories()
    {
        $this->_types[] = 'dir';
        return $this;
    }
    /**
     * Include links in the result.
     *
     * @return  \Hoa\File\Finder
     */
    public function links()
    {
        $this->_types[] = 'link';
        return $this;
    }
    /**
     * Follow symbolink links.
     *
     * @param   bool  $flag    Whether we follow or not.
     * @return  \Hoa\File\Finder
     */
    public function followSymlinks($flag = \true)
    {
        if (\true === $flag) {
            $this->_flags ^= Iterator\FileSystem::FOLLOW_SYMLINKS;
        } else {
            $this->_flags |= Iterator\FileSystem::FOLLOW_SYMLINKS;
        }
        return $this;
    }
    /**
     * Include files that match a regex.
     * Example:
     *     $this->name('#\.php$#');
     *
     * @param   string  $regex    Regex.
     * @return  \Hoa\File\Finder
     */
    public function name($regex)
    {
        $this->_filters[] = function (\SplFileInfo $current) use($regex) {
            return 0 !== \preg_match($regex, $current->getBasename());
        };
        return $this;
    }
    /**
     * Exclude directories that match a regex.
     * Example:
     *      $this->notIn('#^\.(git|hg)$#');
     *
     * @param   string  $regex    Regex.
     * @return  \Hoa\File\Finder
     */
    public function notIn($regex)
    {
        $this->_filters[] = function (\SplFileInfo $current) use($regex) {
            foreach (\explode(DS, $current->getPathname()) as $part) {
                if (0 !== \preg_match($regex, $part)) {
                    return \false;
                }
            }
            return \true;
        };
        return $this;
    }
    /**
     * Include files that respect a certain size.
     * The size is a string of the form:
     *     operator number unit
     * where
     *     • operator could be: <, <=, >, >= or =;
     *     • number is a positive integer;
     *     • unit could be: b (default), Kb, Mb, Gb, Tb, Pb, Eb, Zb, Yb.
     * Example:
     *     $this->size('>= 12Kb');
     *
     * @param   string  $size    Size.
     * @return  \Hoa\File\Finder
     */
    public function size($size)
    {
        if (0 === \preg_match('#^(<|<=|>|>=|=)\\s*(\\d+)\\s*((?:[KMGTPEZY])b)?$#', $size, $matches)) {
            return $this;
        }
        $number = \floatval($matches[2]);
        $unit = isset($matches[3]) ? $matches[3] : 'b';
        $operator = $matches[1];
        switch ($unit) {
            case 'b':
                break;
            // kilo
            case 'Kb':
                $number <<= 10;
                break;
            // mega.
            case 'Mb':
                $number <<= 20;
                break;
            // giga.
            case 'Gb':
                $number <<= 30;
                break;
            // tera.
            case 'Tb':
                $number *= 1099511627776;
                break;
            // peta.
            case 'Pb':
                $number *= \pow(1024, 5);
                break;
            // exa.
            case 'Eb':
                $number *= \pow(1024, 6);
                break;
            // zetta.
            case 'Zb':
                $number *= \pow(1024, 7);
                break;
            // yota.
            case 'Yb':
                $number *= \pow(1024, 8);
                break;
        }
        $filter = null;
        switch ($operator) {
            case '<':
                $filter = function (\SplFileInfo $current) use($number) {
                    return $current->getSize() < $number;
                };
                break;
            case '<=':
                $filter = function (\SplFileInfo $current) use($number) {
                    return $current->getSize() <= $number;
                };
                break;
            case '>':
                $filter = function (\SplFileInfo $current) use($number) {
                    return $current->getSize() > $number;
                };
                break;
            case '>=':
                $filter = function (\SplFileInfo $current) use($number) {
                    return $current->getSize() >= $number;
                };
                break;
            case '=':
                $filter = function (\SplFileInfo $current) use($number) {
                    return $current->getSize() === $number;
                };
                break;
        }
        $this->_filters[] = $filter;
        return $this;
    }
    /**
     * Whether we should include dots or not (respectively . and ..).
     *
     * @param   bool  $flag    Include or not.
     * @return  \Hoa\File\Finder
     */
    public function dots($flag = \true)
    {
        if (\true === $flag) {
            $this->_flags ^= Iterator\FileSystem::SKIP_DOTS;
        } else {
            $this->_flags |= Iterator\FileSystem::SKIP_DOTS;
        }
        return $this;
    }
    /**
     * Include files that are owned by a certain owner.
     *
     * @param   int  $owner    Owner.
     * @return  \Hoa\File\Finder
     */
    public function owner($owner)
    {
        $this->_filters[] = function (\SplFileInfo $current) use($owner) {
            return $current->getOwner() === $owner;
        };
        return $this;
    }
    /**
     * Format date.
     * Date can have the following syntax:
     *     date
     *     since date
     *     until date
     * If the date does not have the “ago” keyword, it will be added.
     * Example: “42 hours” is equivalent to “since 42 hours” which is equivalent
     * to “since 42 hours ago”.
     *
     * @param   string  $date         Date.
     * @param   int     &$operator    Operator (-1 for since, 1 for until).
     * @return  int
     */
    protected function formatDate($date, &$operator)
    {
        $operator = -1;
        if (0 === \preg_match('#\\bago\\b#', $date)) {
            $date .= ' ago';
        }
        if (0 !== \preg_match('#^(since|until)\\b(.+)$#', $date, $matches)) {
            $time = \strtotime($matches[2]);
            if ('until' === $matches[1]) {
                $operator = 1;
            }
        } else {
            $time = \strtotime($date);
        }
        return $time;
    }
    /**
     * Include files that have been changed from a certain date.
     * Example:
     *     $this->changed('since 13 days');
     *
     * @param   string  $date    Date.
     * @return  \Hoa\File\Finder
     */
    public function changed($date)
    {
        $time = $this->formatDate($date, $operator);
        if (-1 === $operator) {
            $this->_filters[] = function (\SplFileInfo $current) use($time) {
                return $current->getCTime() >= $time;
            };
        } else {
            $this->_filters[] = function (\SplFileInfo $current) use($time) {
                return $current->getCTime() < $time;
            };
        }
        return $this;
    }
    /**
     * Include files that have been modified from a certain date.
     * Example:
     *     $this->modified('since 13 days');
     *
     * @param   string  $date    Date.
     * @return  \Hoa\File\Finder
     */
    public function modified($date)
    {
        $time = $this->formatDate($date, $operator);
        if (-1 === $operator) {
            $this->_filters[] = function (\SplFileInfo $current) use($time) {
                return $current->getMTime() >= $time;
            };
        } else {
            $this->_filters[] = function (\SplFileInfo $current) use($time) {
                return $current->getMTime() < $time;
            };
        }
        return $this;
    }
    /**
     * Add your own filter.
     * The callback will receive 3 arguments: $current, $key and $iterator. It
     * must return a boolean: true to include the file, false to exclude it.
     * Example:
     *     // Include files that are readable
     *     $this->filter(function ($current) {
     *         return $current->isReadable();
     *     });
     *
     * @param   callable  $callback    Callback
     * @return  \Hoa\File\Finder
     */
    public function filter($callback)
    {
        $this->_filters[] = $callback;
        return $this;
    }
    /**
     * Sort result by name.
     * If \Collator exists (from ext/intl), the $locale argument will be used
     * for its constructor. Else, strcmp() will be used.
     * Example:
     *     $this->sortByName('fr_FR');
     *
     * @param   string  $locale   Locale.
     * @return  \Hoa\File\Finder
     */
    public function sortByName($locale = 'root')
    {
        if (\true === \class_exists('Collator', \false)) {
            $collator = new \Collator($locale);
            $this->_sorts[] = function (\SplFileInfo $a, \SplFileInfo $b) use($collator) {
                return $collator->compare($a->getPathname(), $b->getPathname());
            };
        } else {
            $this->_sorts[] = function (\SplFileInfo $a, \SplFileInfo $b) {
                return \strcmp($a->getPathname(), $b->getPathname());
            };
        }
        return $this;
    }
    /**
     * Sort result by size.
     * Example:
     *     $this->sortBySize();
     *
     * @return  \Hoa\File\Finder
     */
    public function sortBySize()
    {
        $this->_sorts[] = function (\SplFileInfo $a, \SplFileInfo $b) {
            return $a->getSize() < $b->getSize();
        };
        return $this;
    }
    /**
     * Add your own sort.
     * The callback will receive 2 arguments: $a and $b. Please see the uasort()
     * function.
     * Example:
     *     // Sort files by their modified time.
     *     $this->sort(function ($a, $b) {
     *         return $a->getMTime() < $b->getMTime();
     *     });
     *
     * @param   callable  $callable    Callback.
     * @return  \Hoa\File\Finder
     */
    public function sort($callable)
    {
        $this->_sorts[] = $callable;
        return $this;
    }
    /**
     * Child comes first when iterating.
     *
     * @return  \Hoa\File\Finder
     */
    public function childFirst()
    {
        $this->_first = Iterator\Recursive\Iterator::CHILD_FIRST;
        return $this;
    }
    /**
     * Get the iterator.
     *
     * @return  \Traversable
     */
    public function getIterator()
    {
        $_iterator = new Iterator\Append();
        $types = $this->getTypes();
        if (!empty($types)) {
            $this->_filters[] = function (\SplFileInfo $current) use($types) {
                return \in_array($current->getType(), $types);
            };
        }
        $maxDepth = $this->getMaxDepth();
        $splFileInfo = $this->getSplFileInfo();
        foreach ($this->getPaths() as $path) {
            if (1 == $maxDepth) {
                $iterator = new Iterator\IteratorIterator(new Iterator\Recursive\Directory($path, $this->getFlags(), $splFileInfo), $this->getFirst());
            } else {
                $iterator = new Iterator\Recursive\Iterator(new Iterator\Recursive\Directory($path, $this->getFlags(), $splFileInfo), $this->getFirst());
                if (1 < $maxDepth) {
                    $iterator->setMaxDepth($maxDepth - 1);
                }
            }
            $_iterator->append($iterator);
        }
        foreach ($this->getFilters() as $filter) {
            $_iterator = new Iterator\CallbackFilter($_iterator, $filter);
        }
        $sorts = $this->getSorts();
        if (empty($sorts)) {
            return $_iterator;
        }
        $array = \iterator_to_array($_iterator);
        foreach ($sorts as $sort) {
            \uasort($array, $sort);
        }
        return new Iterator\Map($array);
    }
    /**
     * Set SplFileInfo classname.
     *
     * @param   string  $splFileInfo    SplFileInfo classname.
     * @return  string
     */
    public function setSplFileInfo($splFileInfo)
    {
        $old = $this->_splFileInfo;
        $this->_splFileInfo = $splFileInfo;
        return $old;
    }
    /**
     * Get SplFileInfo classname.
     *
     * @return  string
     */
    public function getSplFileInfo()
    {
        return $this->_splFileInfo;
    }
    /**
     * Get all paths.
     *
     * @return  array
     */
    protected function getPaths()
    {
        return $this->_paths;
    }
    /**
     * Get max depth.
     *
     * @return  int
     */
    public function getMaxDepth()
    {
        return $this->_maxDepth;
    }
    /**
     * Get types.
     *
     * @return  array
     */
    public function getTypes()
    {
        return $this->_types;
    }
    /**
     * Get filters.
     *
     * @return  array
     */
    protected function getFilters()
    {
        return $this->_filters;
    }
    /**
     * Get sorts.
     *
     * @return  array
     */
    protected function getSorts()
    {
        return $this->_sorts;
    }
    /**
     * Get flags.
     *
     * @return  int
     */
    public function getFlags()
    {
        return $this->_flags;
    }
    /**
     * Get first.
     *
     * @return  int
     */
    public function getFirst()
    {
        return $this->_first;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\File;

use Hoa\Stream;
/**
 * Class \Hoa\File\ReadWrite.
 *
 * File handler.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class ReadWrite extends \Hoa\File\File implements Stream\IStream\In, Stream\IStream\Out
{
    /**
     * Open a file.
     *
     * @param   string  $streamName    Stream name.
     * @param   string  $mode          Open mode, see the self::MODE_* constants.
     * @param   string  $context       Context ID (please, see the
     *                                 \Hoa\Stream\Context class).
     * @param   bool    $wait          Differ opening or not.
     */
    public function __construct($streamName, $mode = parent::MODE_APPEND_READ_WRITE, $context = null, $wait = \false)
    {
        parent::__construct($streamName, $mode, $context, $wait);
        return;
    }
    /**
     * Open the stream and return the associated resource.
     *
     * @param   string               $streamName    Stream name (e.g. path or URL).
     * @param   \Hoa\Stream\Context  $context       Context.
     * @return  resource
     * @throws  \Hoa\File\Exception\FileDoesNotExist
     * @throws  \Hoa\File\Exception
     */
    protected function &_open($streamName, Stream\Context $context = null)
    {
        static $createModes = [parent::MODE_READ_WRITE, parent::MODE_TRUNCATE_READ_WRITE, parent::MODE_APPEND_READ_WRITE, parent::MODE_CREATE_READ_WRITE];
        if (!\in_array($this->getMode(), $createModes)) {
            throw new \Hoa\File\Exception('Open mode are not supported; given %d. Only %s are supported.', 0, [$this->getMode(), \implode(', ', $createModes)]);
        }
        \preg_match('#^(\\w+)://#', $streamName, $match);
        if ((isset($match[1]) && $match[1] == 'file' || !isset($match[1])) && !\file_exists($streamName) && parent::MODE_READ_WRITE == $this->getMode()) {
            throw new \Hoa\File\Exception\FileDoesNotExist('File %s does not exist.', 1, $streamName);
        }
        $out = parent::_open($streamName, $context);
        return $out;
    }
    /**
     * Test for end-of-file.
     *
     * @return  bool
     */
    public function eof()
    {
        return \feof($this->getStream());
    }
    /**
     * Read n characters.
     *
     * @param   int     $length    Length.
     * @return  string
     * @throws  \Hoa\File\Exception
     */
    public function read($length)
    {
        if (0 > $length) {
            throw new \Hoa\File\Exception('Length must be greater than 0, given %d.', 2, $length);
        }
        return \fread($this->getStream(), $length);
    }
    /**
     * Alias of $this->read().
     *
     * @param   int     $length    Length.
     * @return  string
     */
    public function readString($length)
    {
        return $this->read($length);
    }
    /**
     * Read a character.
     *
     * @return  string
     */
    public function readCharacter()
    {
        return \fgetc($this->getStream());
    }
    /**
     * Read a boolean.
     *
     * @return  bool
     */
    public function readBoolean()
    {
        return (bool) $this->read(1);
    }
    /**
     * Read an integer.
     *
     * @param   int     $length    Length.
     * @return  int
     */
    public function readInteger($length = 1)
    {
        return (int) $this->read($length);
    }
    /**
     * Read a float.
     *
     * @param   int     $length    Length.
     * @return  float
     */
    public function readFloat($length = 1)
    {
        return (float) $this->read($length);
    }
    /**
     * Read an array.
     * Alias of the $this->scanf() method.
     *
     * @param   string  $format    Format (see printf's formats).
     * @return  array
     */
    public function readArray($format = null)
    {
        return $this->scanf($format);
    }
    /**
     * Read a line.
     *
     * @return  string
     */
    public function readLine()
    {
        return \fgets($this->getStream());
    }
    /**
     * Read all, i.e. read as much as possible.
     *
     * @param   int  $offset    Offset.
     * @return  string
     */
    public function readAll($offset = 0)
    {
        return \stream_get_contents($this->getStream(), -1, $offset);
    }
    /**
     * Parse input from a stream according to a format.
     *
     * @param   string  $format    Format (see printf's formats).
     * @return  array
     */
    public function scanf($format)
    {
        return \fscanf($this->getStream(), $format);
    }
    /**
     * Write n characters.
     *
     * @param   string  $string    String.
     * @param   int     $length    Length.
     * @return  mixed
     * @throws  \Hoa\File\Exception
     */
    public function write($string, $length)
    {
        if (0 > $length) {
            throw new \Hoa\File\Exception('Length must be greater than 0, given %d.', 3, $length);
        }
        return \fwrite($this->getStream(), $string, $length);
    }
    /**
     * Write a string.
     *
     * @param   string  $string    String.
     * @return  mixed
     */
    public function writeString($string)
    {
        $string = (string) $string;
        return $this->write($string, \strlen($string));
    }
    /**
     * Write a character.
     *
     * @param   string  $char    Character.
     * @return  mixed
     */
    public function writeCharacter($char)
    {
        return $this->write((string) $char[0], 1);
    }
    /**
     * Write a boolean.
     *
     * @param   bool    $boolean    Boolean.
     * @return  mixed
     */
    public function writeBoolean($boolean)
    {
        return $this->write((string) (bool) $boolean, 1);
    }
    /**
     * Write an integer.
     *
     * @param   int     $integer    Integer.
     * @return  mixed
     */
    public function writeInteger($integer)
    {
        $integer = (string) (int) $integer;
        return $this->write($integer, \strlen($integer));
    }
    /**
     * Write a float.
     *
     * @param   float   $float    Float.
     * @return  mixed
     */
    public function writeFloat($float)
    {
        $float = (string) (float) $float;
        return $this->write($float, \strlen($float));
    }
    /**
     * Write an array.
     *
     * @param   array   $array    Array.
     * @return  mixed
     */
    public function writeArray(array $array)
    {
        $array = \var_export($array, \true);
        return $this->write($array, \strlen($array));
    }
    /**
     * Write a line.
     *
     * @param   string  $line    Line.
     * @return  mixed
     */
    public function writeLine($line)
    {
        if (\false === ($n = \strpos($line, "\n"))) {
            return $this->write($line . "\n", \strlen($line) + 1);
        }
        ++$n;
        return $this->write(\substr($line, 0, $n), $n);
    }
    /**
     * Write all, i.e. as much as possible.
     *
     * @param   string  $string    String.
     * @return  mixed
     */
    public function writeAll($string)
    {
        return $this->write($string, \strlen($string));
    }
    /**
     * Truncate a file to a given length.
     *
     * @param   int     $size    Size.
     * @return  bool
     */
    public function truncate($size)
    {
        return \ftruncate($this->getStream(), $size);
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\File;

use Hoa\Stream;
/**
 * Class \Hoa\File\Generic.
 *
 * Describe a super-file.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
abstract class Generic extends Stream implements Stream\IStream\Pathable, Stream\IStream\Statable, Stream\IStream\Touchable
{
    /**
     * Mode.
     *
     * @var string
     */
    protected $_mode = null;
    /**
     * Get filename component of path.
     *
     * @return  string
     */
    public function getBasename()
    {
        return \basename($this->getStreamName());
    }
    /**
     * Get directory name component of path.
     *
     * @return  string
     */
    public function getDirname()
    {
        return \dirname($this->getStreamName());
    }
    /**
     * Get size.
     *
     * @return  int
     */
    public function getSize()
    {
        if (\false === $this->getStatistic()) {
            return \false;
        }
        return \filesize($this->getStreamName());
    }
    /**
     * Get informations about a file.
     *
     * @return  array
     */
    public function getStatistic()
    {
        return \fstat($this->getStream());
    }
    /**
     * Get last access time of file.
     *
     * @return  int
     */
    public function getATime()
    {
        return \fileatime($this->getStreamName());
    }
    /**
     * Get inode change time of file.
     *
     * @return  int
     */
    public function getCTime()
    {
        return \filectime($this->getStreamName());
    }
    /**
     * Get file modification time.
     *
     * @return  int
     */
    public function getMTime()
    {
        return \filemtime($this->getStreamName());
    }
    /**
     * Get file group.
     *
     * @return  int
     */
    public function getGroup()
    {
        return \filegroup($this->getStreamName());
    }
    /**
     * Get file owner.
     *
     * @return  int
     */
    public function getOwner()
    {
        return \fileowner($this->getStreamName());
    }
    /**
     * Get file permissions.
     *
     * @return  int
     */
    public function getPermissions()
    {
        return \fileperms($this->getStreamName());
    }
    /**
     * Get file permissions as a string.
     * Result sould be interpreted like this:
     *     * s: socket;
     *     * l: symbolic link;
     *     * -: regular;
     *     * b: block special;
     *     * d: directory;
     *     * c: character special;
     *     * p: FIFO pipe;
     *     * u: unknown.
     *
     * @return  string
     */
    public function getReadablePermissions()
    {
        $p = $this->getPermissions();
        if (($p & 0xc000) == 0xc000) {
            $out = 's';
        } elseif (($p & 0xa000) == 0xa000) {
            $out = 'l';
        } elseif (($p & 0x8000) == 0x8000) {
            $out = '-';
        } elseif (($p & 0x6000) == 0x6000) {
            $out = 'b';
        } elseif (($p & 0x4000) == 0x4000) {
            $out = 'd';
        } elseif (($p & 0x2000) == 0x2000) {
            $out = 'c';
        } elseif (($p & 0x1000) == 0x1000) {
            $out = 'p';
        } else {
            $out = 'u';
        }
        $out .= ($p & 0x100 ? 'r' : '-') . ($p & 0x80 ? 'w' : '-') . ($p & 0x40 ? $p & 0x800 ? 's' : 'x' : ($p & 0x800 ? 'S' : '-')) . ($p & 0x20 ? 'r' : '-') . ($p & 0x10 ? 'w' : '-') . ($p & 0x8 ? $p & 0x400 ? 's' : 'x' : ($p & 0x400 ? 'S' : '-')) . ($p & 0x4 ? 'r' : '-') . ($p & 0x2 ? 'w' : '-') . ($p & 0x1 ? $p & 0x200 ? 't' : 'x' : ($p & 0x200 ? 'T' : '-'));
        return $out;
    }
    /**
     * Check if the file is readable.
     *
     * @return  bool
     */
    public function isReadable()
    {
        return \is_readable($this->getStreamName());
    }
    /**
     * Check if the file is writable.
     *
     * @return  bool
     */
    public function isWritable()
    {
        return \is_writable($this->getStreamName());
    }
    /**
     * Check if the file is executable.
     *
     * @return  bool
     */
    public function isExecutable()
    {
        return \is_executable($this->getStreamName());
    }
    /**
     * Clear file status cache.
     *
     * @return  void
     */
    public function clearStatisticCache()
    {
        \clearstatcache(\true, $this->getStreamName());
        return;
    }
    /**
     * Clear all files status cache.
     *
     * @return  void
     */
    public static function clearAllStatisticCaches()
    {
        \clearstatcache();
        return;
    }
    /**
     * Set access and modification time of file.
     *
     * @param   int     $time     Time. If equals to -1, time() should be used.
     * @param   int     $atime    Access time. If equals to -1, $time should be
     *                            used.
     * @return  bool
     */
    public function touch($time = -1, $atime = -1)
    {
        if ($time == -1) {
            $time = \time();
        }
        if ($atime == -1) {
            $atime = $time;
        }
        return \touch($this->getStreamName(), $time, $atime);
    }
    /**
     * Copy file.
     * Return the destination file path if succeed, false otherwise.
     *
     * @param   string  $to       Destination path.
     * @param   bool    $force    Force to copy if the file $to already exists.
     *                            Use the \Hoa\Stream\IStream\Touchable::*OVERWRITE
     *                            constants.
     * @return  bool
     */
    public function copy($to, $force = Stream\IStream\Touchable::DO_NOT_OVERWRITE)
    {
        $from = $this->getStreamName();
        if ($force === Stream\IStream\Touchable::DO_NOT_OVERWRITE && \true === \file_exists($to)) {
            return \true;
        }
        if (null === $this->getStreamContext()) {
            return @\copy($from, $to);
        }
        return @\copy($from, $to, $this->getStreamContext()->getContext());
    }
    /**
     * Move a file.
     *
     * @param   string  $name     New name.
     * @param   bool    $force    Force to move if the file $name already
     *                            exists.
     *                            Use the \Hoa\Stream\IStream\Touchable::*OVERWRITE
     *                            constants.
     * @param   bool    $mkdir    Force to make directory if does not exist.
     *                            Use the \Hoa\Stream\IStream\Touchable::*DIRECTORY
     *                            constants.
     * @return  bool
     */
    public function move($name, $force = Stream\IStream\Touchable::DO_NOT_OVERWRITE, $mkdir = Stream\IStream\Touchable::DO_NOT_MAKE_DIRECTORY)
    {
        $from = $this->getStreamName();
        if ($force === Stream\IStream\Touchable::DO_NOT_OVERWRITE && \true === \file_exists($name)) {
            return \false;
        }
        if (Stream\IStream\Touchable::MAKE_DIRECTORY === $mkdir) {
            \Hoa\File\Directory::create(\dirname($name), \Hoa\File\Directory::MODE_CREATE_RECURSIVE);
        }
        if (null === $this->getStreamContext()) {
            return @\rename($from, $name);
        }
        return @\rename($from, $name, $this->getStreamContext()->getContext());
    }
    /**
     * Delete a file.
     *
     * @return  bool
     */
    public function delete()
    {
        if (null === $this->getStreamContext()) {
            return @\unlink($this->getStreamName());
        }
        return @\unlink($this->getStreamName(), $this->getStreamContext()->getContext());
    }
    /**
     * Change file group.
     *
     * @param   mixed   $group    Group name or number.
     * @return  bool
     */
    public function changeGroup($group)
    {
        return \chgrp($this->getStreamName(), $group);
    }
    /**
     * Change file mode.
     *
     * @param   int     $mode    Mode (in octal!).
     * @return  bool
     */
    public function changeMode($mode)
    {
        return \chmod($this->getStreamName(), $mode);
    }
    /**
     * Change file owner.
     *
     * @param   mixed   $user    User.
     * @return  bool
     */
    public function changeOwner($user)
    {
        return \chown($this->getStreamName(), $user);
    }
    /**
     * Change the current umask.
     *
     * @param   int     $umask    Umask (in octal!). If null, given the current
     *                            umask value.
     * @return  int
     */
    public static function umask($umask = null)
    {
        if (null === $umask) {
            return \umask();
        }
        return \umask($umask);
    }
    /**
     * Check if it is a file.
     *
     * @return  bool
     */
    public function isFile()
    {
        return \is_file($this->getStreamName());
    }
    /**
     * Check if it is a link.
     *
     * @return  bool
     */
    public function isLink()
    {
        return \is_link($this->getStreamName());
    }
    /**
     * Check if it is a directory.
     *
     * @return  bool
     */
    public function isDirectory()
    {
        return \is_dir($this->getStreamName());
    }
    /**
     * Check if it is a socket.
     *
     * @return  bool
     */
    public function isSocket()
    {
        return \filetype($this->getStreamName()) == 'socket';
    }
    /**
     * Check if it is a FIFO pipe.
     *
     * @return  bool
     */
    public function isFIFOPipe()
    {
        return \filetype($this->getStreamName()) == 'fifo';
    }
    /**
     * Check if it is character special file.
     *
     * @return  bool
     */
    public function isCharacterSpecial()
    {
        return \filetype($this->getStreamName()) == 'char';
    }
    /**
     * Check if it is block special.
     *
     * @return  bool
     */
    public function isBlockSpecial()
    {
        return \filetype($this->getStreamName()) == 'block';
    }
    /**
     * Check if it is an unknown type.
     *
     * @return  bool
     */
    public function isUnknown()
    {
        return \filetype($this->getStreamName()) == 'unknown';
    }
    /**
     * Set the open mode.
     *
     * @param   string     $mode    Open mode. Please, see the child::MODE_*
     *                              constants.
     * @return  string
     */
    protected function setMode($mode)
    {
        $old = $this->_mode;
        $this->_mode = $mode;
        return $old;
    }
    /**
     * Get the open mode.
     *
     * @return  string
     */
    public function getMode()
    {
        return $this->_mode;
    }
    /**
     * Get inode.
     *
     * @return  int
     */
    public function getINode()
    {
        return \fileinode($this->getStreamName());
    }
    /**
     * Check if the system is case sensitive or not.
     *
     * @return  bool
     */
    public static function isCaseSensitive()
    {
        return !(\file_exists(\mb_strtolower(__FILE__)) && \file_exists(\mb_strtoupper(__FILE__)));
    }
    /**
     * Get a canonicalized absolute pathname.
     *
     * @return  string
     */
    public function getRealPath()
    {
        if (\false === ($out = \realpath($this->getStreamName()))) {
            return $this->getStreamName();
        }
        return $out;
    }
    /**
     * Get file extension (if exists).
     *
     * @return  string
     */
    public function getExtension()
    {
        return \pathinfo($this->getStreamName(), \PATHINFO_EXTENSION);
    }
    /**
     * Get filename without extension.
     *
     * @return  string
     */
    public function getFilename()
    {
        $file = \basename($this->getStreamName());
        if (\defined('PATHINFO_FILENAME')) {
            return \pathinfo($file, \PATHINFO_FILENAME);
        }
        if (\strstr($file, '.')) {
            return \substr($file, 0, \strrpos($file, '.'));
        }
        return $file;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\File;

use Hoa\Stream;
/**
 * Class \Hoa\File\Read.
 *
 * File handler.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Read extends \Hoa\File\File implements Stream\IStream\In
{
    /**
     * Open a file.
     *
     * @param   string  $streamName    Stream name.
     * @param   string  $mode          Open mode, see the self::MODE_* constants.
     * @param   string  $context       Context ID (please, see the
     *                                 \Hoa\Stream\Context class).
     * @param   bool    $wait          Differ opening or not.
     */
    public function __construct($streamName, $mode = parent::MODE_READ, $context = null, $wait = \false)
    {
        parent::__construct($streamName, $mode, $context, $wait);
        return;
    }
    /**
     * Open the stream and return the associated resource.
     *
     * @param   string               $streamName    Stream name (e.g. path or URL).
     * @param   \Hoa\Stream\Context  $context       Context.
     * @return  resource
     * @throws  \Hoa\File\Exception\FileDoesNotExist
     * @throws  \Hoa\File\Exception
     */
    protected function &_open($streamName, Stream\Context $context = null)
    {
        static $createModes = [parent::MODE_READ];
        if (!\in_array($this->getMode(), $createModes)) {
            throw new \Hoa\File\Exception('Open mode are not supported; given %d. Only %s are supported.', 0, [$this->getMode(), \implode(', ', $createModes)]);
        }
        \preg_match('#^(\\w+)://#', $streamName, $match);
        if ((isset($match[1]) && $match[1] == 'file' || !isset($match[1])) && !\file_exists($streamName)) {
            throw new \Hoa\File\Exception\FileDoesNotExist('File %s does not exist.', 1, $streamName);
        }
        $out = parent::_open($streamName, $context);
        return $out;
    }
    /**
     * Test for end-of-file.
     *
     * @return  bool
     */
    public function eof()
    {
        return \feof($this->getStream());
    }
    /**
     * Read n characters.
     *
     * @param   int     $length    Length.
     * @return  string
     * @throws  \Hoa\File\Exception
     */
    public function read($length)
    {
        if (0 > $length) {
            throw new \Hoa\File\Exception('Length must be greater than 0, given %d.', 2, $length);
        }
        return \fread($this->getStream(), $length);
    }
    /**
     * Alias of $this->read().
     *
     * @param   int     $length    Length.
     * @return  string
     */
    public function readString($length)
    {
        return $this->read($length);
    }
    /**
     * Read a character.
     *
     * @return  string
     */
    public function readCharacter()
    {
        return \fgetc($this->getStream());
    }
    /**
     * Read a boolean.
     *
     * @return  bool
     */
    public function readBoolean()
    {
        return (bool) $this->read(1);
    }
    /**
     * Read an integer.
     *
     * @param   int     $length    Length.
     * @return  int
     */
    public function readInteger($length = 1)
    {
        return (int) $this->read($length);
    }
    /**
     * Read a float.
     *
     * @param   int     $length    Length.
     * @return  float
     */
    public function readFloat($length = 1)
    {
        return (float) $this->read($length);
    }
    /**
     * Read an array.
     * Alias of the $this->scanf() method.
     *
     * @param   string  $format    Format (see printf's formats).
     * @return  array
     */
    public function readArray($format = null)
    {
        return $this->scanf($format);
    }
    /**
     * Read a line.
     *
     * @return  string
     */
    public function readLine()
    {
        return \fgets($this->getStream());
    }
    /**
     * Read all, i.e. read as much as possible.
     *
     * @param   int  $offset    Offset.
     * @return  string
     */
    public function readAll($offset = 0)
    {
        return \stream_get_contents($this->getStream(), -1, $offset);
    }
    /**
     * Parse input from a stream according to a format.
     *
     * @param   string  $format    Format (see printf's formats).
     * @return  array
     */
    public function scanf($format)
    {
        return \fscanf($this->getStream(), $format);
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\File\Link;

use Hoa\File;
use Hoa\Stream;
/**
 * Class \Hoa\File\Link\ReadWrite.
 *
 * File handler.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class ReadWrite extends \Hoa\File\Link\Link implements Stream\IStream\In, Stream\IStream\Out
{
    /**
     * Open a file.
     *
     * @param   string  $streamName    Stream name.
     * @param   string  $mode          Open mode, see the parent::MODE_* constants.
     * @param   string  $context       Context ID (please, see the
     *                                 \Hoa\Stream\Context class).
     * @param   bool    $wait          Differ opening or not.
     */
    public function __construct($streamName, $mode = parent::MODE_APPEND_READ_WRITE, $context = null, $wait = \false)
    {
        parent::__construct($streamName, $mode, $context, $wait);
        return;
    }
    /**
     * Open the stream and return the associated resource.
     *
     * @param   string               $streamName    Stream name (e.g. path or URL).
     * @param   \Hoa\Stream\Context  $context       Context.
     * @return  resource
     * @throws  \Hoa\File\Exception\FileDoesNotExist
     * @throws  \Hoa\File\Exception
     */
    protected function &_open($streamName, Stream\Context $context = null)
    {
        static $createModes = [parent::MODE_READ_WRITE, parent::MODE_TRUNCATE_READ_WRITE, parent::MODE_APPEND_READ_WRITE, parent::MODE_CREATE_READ_WRITE];
        if (!\in_array($this->getMode(), $createModes)) {
            throw new File\Exception('Open mode are not supported; given %d. Only %s are supported.', 0, [$this->getMode(), \implode(', ', $createModes)]);
        }
        \preg_match('#^(\\w+)://#', $streamName, $match);
        if ((isset($match[1]) && $match[1] == 'file' || !isset($match[1])) && !\file_exists($streamName) && parent::MODE_READ_WRITE == $this->getMode()) {
            throw new File\Exception\FileDoesNotExist('File %s does not exist.', 1, $streamName);
        }
        $out = parent::_open($streamName, $context);
        return $out;
    }
    /**
     * Test for end-of-file.
     *
     * @return  bool
     */
    public function eof()
    {
        return \feof($this->getStream());
    }
    /**
     * Read n characters.
     *
     * @param   int     $length    Length.
     * @return  string
     * @throws  \Hoa\File\Exception
     */
    public function read($length)
    {
        if (0 > $length) {
            throw new File\Exception('Length must be greater than 0, given %d.', 2, $length);
        }
        return \fread($this->getStream(), $length);
    }
    /**
     * Alias of $this->read().
     *
     * @param   int     $length    Length.
     * @return  string
     */
    public function readString($length)
    {
        return $this->read($length);
    }
    /**
     * Read a character.
     *
     * @return  string
     */
    public function readCharacter()
    {
        return \fgetc($this->getStream());
    }
    /**
     * Read a boolean.
     *
     * @return  bool
     */
    public function readBoolean()
    {
        return (bool) $this->read(1);
    }
    /**
     * Read an integer.
     *
     * @param   int     $length    Length.
     * @return  int
     */
    public function readInteger($length = 1)
    {
        return (int) $this->read($length);
    }
    /**
     * Read a float.
     *
     * @param   int     $length    Length.
     * @return  float
     */
    public function readFloat($length = 1)
    {
        return (float) $this->read($length);
    }
    /**
     * Read an array.
     * Alias of the $this->scanf() method.
     *
     * @param   string  $format    Format (see printf's formats).
     * @return  array
     */
    public function readArray($format = null)
    {
        return $this->scanf($format);
    }
    /**
     * Read a line.
     *
     * @return  string
     */
    public function readLine()
    {
        return \fgets($this->getStream());
    }
    /**
     * Read all, i.e. read as much as possible.
     *
     * @param   int  $offset    Offset.
     * @return  string
     */
    public function readAll($offset = 0)
    {
        return \stream_get_contents($this->getStream(), -1, $offset);
    }
    /**
     * Parse input from a stream according to a format.
     *
     * @param   string  $format    Format (see printf's formats).
     * @return  array
     */
    public function scanf($format)
    {
        return \fscanf($this->getStream(), $format);
    }
    /**
     * Write n characters.
     *
     * @param   string  $string    String.
     * @param   int     $length    Length.
     * @return  mixed
     * @throws  \Hoa\File\Exception
     */
    public function write($string, $length)
    {
        if (0 > $length) {
            throw new File\Exception('Length must be greater than 0, given %d.', 3, $length);
        }
        return \fwrite($this->getStream(), $string, $length);
    }
    /**
     * Write a string.
     *
     * @param   string  $string    String.
     * @return  mixed
     */
    public function writeString($string)
    {
        $string = (string) $string;
        return $this->write($string, \strlen($string));
    }
    /**
     * Write a character.
     *
     * @param   string  $char    Character.
     * @return  mixed
     */
    public function writeCharacter($char)
    {
        return $this->write((string) $char[0], 1);
    }
    /**
     * Write a boolean.
     *
     * @param   bool    $boolean    Boolean.
     * @return  mixed
     */
    public function writeBoolean($boolean)
    {
        return $this->write((string) (bool) $boolean, 1);
    }
    /**
     * Write an integer.
     *
     * @param   int     $integer    Integer.
     * @return  mixed
     */
    public function writeInteger($integer)
    {
        $integer = (string) (int) $integer;
        return $this->write($integer, \strlen($integer));
    }
    /**
     * Write a float.
     *
     * @param   float   $float    Float.
     * @return  mixed
     */
    public function writeFloat($float)
    {
        $float = (string) (float) $float;
        return $this->write($float, \strlen($float));
    }
    /**
     * Write an array.
     *
     * @param   array   $array    Array.
     * @return  mixed
     */
    public function writeArray(array $array)
    {
        $array = \var_export($array, \true);
        return $this->write($array, \strlen($array));
    }
    /**
     * Write a line.
     *
     * @param   string  $line    Line.
     * @return  mixed
     */
    public function writeLine($line)
    {
        if (\false === ($n = \strpos($line, "\n"))) {
            return $this->write($line . "\n", \strlen($line) + 1);
        }
        ++$n;
        return $this->write(\substr($line, 0, $n), $n);
    }
    /**
     * Write all, i.e. as much as possible.
     *
     * @param   string  $string    String.
     * @return  mixed
     */
    public function writeAll($string)
    {
        return $this->write($string, \strlen($string));
    }
    /**
     * Truncate a file to a given length.
     *
     * @param   int     $size    Size.
     * @return  bool
     */
    public function truncate($size)
    {
        return \ftruncate($this->getStream(), $size);
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\File\Link;

use Hoa\File;
use Hoa\Stream;
/**
 * Class \Hoa\File\Link\Read.
 *
 * File handler.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Read extends \Hoa\File\Link\Link implements Stream\IStream\In
{
    /**
     * Open a file.
     *
     * @param   string  $streamName    Stream name.
     * @param   string  $mode          Open mode, see the parent::MODE_* constants.
     * @param   string  $context       Context ID (please, see the
     *                                 \Hoa\Stream\Context class).
     * @param   bool    $wait          Differ opening or not.
     */
    public function __construct($streamName, $mode = parent::MODE_READ, $context = null, $wait = \false)
    {
        parent::__construct($streamName, $mode, $context, $wait);
        return;
    }
    /**
     * Open the stream and return the associated resource.
     *
     * @param   string               $streamName    Stream name (e.g. path or URL).
     * @param   \Hoa\Stream\Context  $context       Context.
     * @return  resource
     * @throws  \Hoa\File\Exception\FileDoesNotExist
     * @throws  \Hoa\File\Exception
     */
    protected function &_open($streamName, Stream\Context $context = null)
    {
        static $createModes = [parent::MODE_READ];
        if (!\in_array($this->getMode(), $createModes)) {
            throw new File\Exception('Open mode are not supported; given %d. Only %s are supported.', 0, [$this->getMode(), \implode(', ', $createModes)]);
        }
        \preg_match('#^(\\w+)://#', $streamName, $match);
        if ((isset($match[1]) && $match[1] == 'file' || !isset($match[1])) && !\file_exists($streamName)) {
            throw new File\Exception\FileDoesNotExist('File %s does not exist.', 1, $streamName);
        }
        $out = parent::_open($streamName, $context);
        return $out;
    }
    /**
     * Test for end-of-file.
     *
     * @return  bool
     */
    public function eof()
    {
        return \feof($this->getStream());
    }
    /**
     * Read n characters.
     *
     * @param   int     $length    Length.
     * @return  string
     * @throws  \Hoa\File\Exception
     */
    public function read($length)
    {
        if (0 > $length) {
            throw new File\Exception('Length must be greater than 0, given %d.', 2, $length);
        }
        return \fread($this->getStream(), $length);
    }
    /**
     * Alias of $this->read().
     *
     * @param   int     $length    Length.
     * @return  string
     */
    public function readString($length)
    {
        return $this->read($length);
    }
    /**
     * Read a character.
     *
     * @return  string
     */
    public function readCharacter()
    {
        return \fgetc($this->getStream());
    }
    /**
     * Read a boolean.
     *
     * @return  bool
     */
    public function readBoolean()
    {
        return (bool) $this->read(1);
    }
    /**
     * Read an integer.
     *
     * @param   int     $length    Length.
     * @return  int
     */
    public function readInteger($length = 1)
    {
        return (int) $this->read($length);
    }
    /**
     * Read a float.
     *
     * @param   int     $length    Length.
     * @return  float
     */
    public function readFloat($length = 1)
    {
        return (float) $this->read($length);
    }
    /**
     * Read an array.
     * Alias of the $this->scanf() method.
     *
     * @param   string  $format    Format (see printf's formats).
     * @return  array
     */
    public function readArray($format = null)
    {
        return $this->scanf($format);
    }
    /**
     * Read a line.
     *
     * @return  string
     */
    public function readLine()
    {
        return \fgets($this->getStream());
    }
    /**
     * Read all, i.e. read as much as possible.
     *
     * @param   int  $offset    Offset.
     * @return  string
     */
    public function readAll($offset = 0)
    {
        return \stream_get_contents($this->getStream(), -1, $offset);
    }
    /**
     * Parse input from a stream according to a format.
     *
     * @param   string  $format    Format (see printf's formats).
     * @return  array
     */
    public function scanf($format)
    {
        return \fscanf($this->getStream(), $format);
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\File\Link;

use Hoa\File;
use Hoa\Stream;
/**
 * Class \Hoa\File\Link\Write.
 *
 * File handler.
 *
 * @license    New BSD License
 */
class Write extends \Hoa\File\Link\Link implements Stream\IStream\Out
{
    /**
     * Open a file.
     *
     * @param   string  $streamName    Stream name.
     * @param   string  $mode          Open mode, see the parent::MODE_* constants.
     * @param   string  $context       Context ID (please, see the
     *                                 \Hoa\Stream\Context class).
     * @param   bool    $wait          Differ opening or not.
     */
    public function __construct($streamName, $mode = parent::MODE_APPEND_WRITE, $context = null, $wait = \false)
    {
        parent::__construct($streamName, $mode, $context, $wait);
        return;
    }
    /**
     * Open the stream and return the associated resource.
     *
     * @param   string               $streamName    Stream name (e.g. path or URL).
     * @param   \Hoa\Stream\Context  $context       Context.
     * @return  resource
     * @throws  \Hoa\File\Exception\FileDoesNotExist
     * @throws  \Hoa\File\Exception
     */
    protected function &_open($streamName, Stream\Context $context = null)
    {
        static $createModes = [parent::MODE_TRUNCATE_WRITE, parent::MODE_APPEND_WRITE, parent::MODE_CREATE_WRITE];
        if (!\in_array($this->getMode(), $createModes)) {
            throw new File\Exception('Open mode are not supported; given %d. Only %s are supported.', 0, [$this->getMode(), \implode(', ', $createModes)]);
        }
        \preg_match('#^(\\w+)://#', $streamName, $match);
        if ((isset($match[1]) && $match[1] == 'file' || !isset($match[1])) && !\file_exists($streamName)) {
            throw new File\Exception\FileDoesNotExist('File %s does not exist.', 1, $streamName);
        }
        $out = parent::_open($streamName, $context);
        return $out;
    }
    /**
     * Write n characters.
     *
     * @param   string  $string    String.
     * @param   int     $length    Length.
     * @return  mixed
     * @throws  \Hoa\File\Exception
     */
    public function write($string, $length)
    {
        if (0 > $length) {
            throw new File\Exception('Length must be greater than 0, given %d.', 2, $length);
        }
        return \fwrite($this->getStream(), $string, $length);
    }
    /**
     * Write a string.
     *
     * @param   string  $string    String.
     * @return  mixed
     */
    public function writeString($string)
    {
        $string = (string) $string;
        return $this->write($string, \strlen($string));
    }
    /**
     * Write a character.
     *
     * @param   string  $char    Character.
     * @return  mixed
     */
    public function writeCharacter($char)
    {
        return $this->write((string) $char[0], 1);
    }
    /**
     * Write a boolean.
     *
     * @param   bool    $boolean    Boolean.
     * @return  mixed
     */
    public function writeBoolean($boolean)
    {
        return $this->write((string) (bool) $boolean, 1);
    }
    /**
     * Write an integer.
     *
     * @param   int     $integer    Integer.
     * @return  mixed
     */
    public function writeInteger($integer)
    {
        $integer = (string) (int) $integer;
        return $this->write($integer, \strlen($integer));
    }
    /**
     * Write a float.
     *
     * @param   float   $float    Float.
     * @return  mixed
     */
    public function writeFloat($float)
    {
        $float = (string) (float) $float;
        return $this->write($float, \strlen($float));
    }
    /**
     * Write an array.
     *
     * @param   array   $array    Array.
     * @return  mixed
     */
    public function writeArray(array $array)
    {
        $array = \var_export($array, \true);
        return $this->write($array, \strlen($array));
    }
    /**
     * Write a line.
     *
     * @param   string  $line    Line.
     * @return  mixed
     */
    public function writeLine($line)
    {
        if (\false === ($n = \strpos($line, "\n"))) {
            return $this->write($line . "\n", \strlen($line) + 1);
        }
        ++$n;
        return $this->write(\substr($line, 0, $n), $n);
    }
    /**
     * Write all, i.e. as much as possible.
     *
     * @param   string  $string    String.
     * @return  mixed
     */
    public function writeAll($string)
    {
        return $this->write($string, \strlen($string));
    }
    /**
     * Truncate a file to a given length.
     *
     * @param   int     $size    Size.
     * @return  bool
     */
    public function truncate($size)
    {
        return \ftruncate($this->getStream(), $size);
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\File\Link;

use Hoa\Consistency;
use Hoa\File;
/**
 * Class \Hoa\File\Link.
 *
 * Link handler.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Link extends File
{
    /**
     * Open a link.
     *
     * @param   string  $streamName    Stream name.
     * @param   string  $mode          Open mode, see the parent::MODE_*
     *                                 constants.
     * @param   string  $context       Context ID (please, see the
     *                                 \Hoa\Stream\Context class).
     * @param   bool    $wait          Differ opening or not.
     * @throws  \Hoa\File\Exception
     */
    public function __construct($streamName, $mode, $context = null, $wait = \false)
    {
        if (!\is_link($streamName)) {
            throw new File\Exception('File %s is not a link.', 0, $streamName);
        }
        parent::__construct($streamName, $mode, $context, $wait);
        return;
    }
    /**
     * Get informations about a link.
     *
     * @return  array
     */
    public function getStatistic()
    {
        return \lstat($this->getStreamName());
    }
    /**
     * Change file group.
     *
     * @param   mixed   $group    Group name or number.
     * @return  bool
     */
    public function changeGroup($group)
    {
        return \lchgrp($this->getStreamName(), $group);
    }
    /**
     * Change file owner.
     *
     * @param   mixed   $user   User.
     * @return  bool
     */
    public function changeOwner($user)
    {
        return \lchown($this->getStreamName(), $user);
    }
    /**
     * Get file permissions.
     *
     * @return  int
     */
    public function getPermissions()
    {
        return 41453;
        // i.e. lrwxr-xr-x
    }
    /**
     * Get the target of a symbolic link.
     *
     * @return  \Hoa\File\Generic
     * @throws  \Hoa\File\Exception
     */
    public function getTarget()
    {
        $target = \dirname($this->getStreamName()) . DS . $this->getTargetName();
        $context = null !== $this->getStreamContext() ? $this->getStreamContext()->getCurrentId() : null;
        if (\true === \is_link($target)) {
            return new \Hoa\File\Link\ReadWrite($target, File::MODE_APPEND_READ_WRITE, $context);
        } elseif (\true === \is_file($target)) {
            return new File\ReadWrite($target, File::MODE_APPEND_READ_WRITE, $context);
        } elseif (\true === \is_dir($target)) {
            return new File\Directory($target, File::MODE_READ, $context);
        }
        throw new File\Exception('Cannot find an appropriated object that matches with ' . 'path %s when defining it.', 1, $target);
    }
    /**
     * Get the target name of a symbolic link.
     *
     * @return  string
     */
    public function getTargetName()
    {
        return \readlink($this->getStreamName());
    }
    /**
     * Create a link.
     *
     * @param   string  $name      Link name.
     * @param   string  $target    Target name.
     * @return  bool
     */
    public static function create($name, $target)
    {
        if (\false != \linkinfo($name)) {
            return \true;
        }
        return \symlink($target, $name);
    }
}
/**
 * Flex entity.
 */
Consistency::flexEntity('Hoa\\File\\Link\\Link');
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\File;

use Hoa\Iterator;
/**
 * Class \Hoa\File\SplFileInfo.
 *
 * Link between \Hoa\Iterator\SplFileInfo and \Hoa\File.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class SplFileInfo extends Iterator\SplFileInfo
{
    /**
     * Current stream.
     *
     * @var \Hoa\File\Generic
     */
    protected $_stream = null;
    /**
     * Open the SplFileInfo as a Hoa\File stream.
     *
     * @return  \Hoa\File\Generic
     * @throws  \Hoa\File\Exception
     */
    public function open()
    {
        if (\true === $this->isFile()) {
            return $this->_stream = new \Hoa\File\ReadWrite($this->getPathname());
        } elseif (\true === $this->isDir()) {
            return $this->_stream = new \Hoa\File\Directory($this->getPathname());
        } elseif (\true === $this->isLink()) {
            return $this->_stream = new \Hoa\File\Link\ReadWrite($this->getPathname());
        }
        throw new \Hoa\File\Exception('%s has an unknown type.', 0, $this->getPathname());
    }
    /**
     * Close the opened stream.
     *
     * @return  void
     */
    public function close()
    {
        if (null === $this->_stream) {
            return;
        }
        return $this->_stream->close();
    }
    /**
     * Destruct.
     *
     * @return  void
     */
    public function __destruct()
    {
        $this->close();
        return;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\File;

use Hoa\Consistency;
use Hoa\Stream;
/**
 * Class \Hoa\File.
 *
 * File handler.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
abstract class File extends \Hoa\File\Generic implements Stream\IStream\Bufferable, Stream\IStream\Lockable, Stream\IStream\Pointable
{
    /**
     * Open for reading only; place the file pointer at the beginning of the
     * file.
     *
     * @const string
     */
    const MODE_READ = 'rb';
    /**
     * Open for reading and writing; place the file pointer at the beginning of
     * the file.
     *
     * @const string
     */
    const MODE_READ_WRITE = 'r+b';
    /**
     * Open for writing only; place the file pointer at the beginning of the
     * file and truncate the file to zero length. If the file does not exist,
     * attempt to create it.
     *
     * @const string
     */
    const MODE_TRUNCATE_WRITE = 'wb';
    /**
     * Open for reading and writing; place the file pointer at the beginning of
     * the file and truncate the file to zero length. If the file does not
     * exist, attempt to create it.
     *
     * @const string
     */
    const MODE_TRUNCATE_READ_WRITE = 'w+b';
    /**
     * Open for writing only; place the file pointer at the end of the file. If
     * the file does not exist, attempt to create it.
     *
     * @const string
     */
    const MODE_APPEND_WRITE = 'ab';
    /**
     * Open for reading and writing; place the file pointer at the end of the
     * file. If the file does not exist, attempt to create it.
     *
     * @const string
     */
    const MODE_APPEND_READ_WRITE = 'a+b';
    /**
     * Create and open for writing only; place the file pointer at the beginning
     * of the file. If the file already exits, the fopen() call with fail by
     * returning false and generating an error of level E_WARNING. If the file
     * does not exist, attempt to create it. This is equivalent to specifying
     * O_EXCL | O_CREAT flags for the underlying open(2) system call.
     *
     * @const string
     */
    const MODE_CREATE_WRITE = 'xb';
    /**
     * Create and open for reading and writing; place the file pointer at the
     * beginning of the file. If the file already exists, the fopen() call with
     * fail by returning false and generating an error of level E_WARNING. If
     * the file does not exist, attempt to create it. This is equivalent to
     * specifying O_EXCL | O_CREAT flags for the underlying open(2) system call.
     *
     * @const string
     */
    const MODE_CREATE_READ_WRITE = 'x+b';
    /**
     * Open a file.
     *
     * @param   string  $streamName    Stream name (or file descriptor).
     * @param   string  $mode          Open mode, see the self::MODE_*
     *                                 constants.
     * @param   string  $context       Context ID (please, see the
     *                                 \Hoa\Stream\Context class).
     * @param   bool    $wait          Differ opening or not.
     * @throws  \Hoa\File\Exception
     */
    public function __construct($streamName, $mode, $context = null, $wait = \false)
    {
        $this->setMode($mode);
        switch ($streamName) {
            case '0':
                $streamName = 'php://stdin';
                break;
            case '1':
                $streamName = 'php://stdout';
                break;
            case '2':
                $streamName = 'php://stderr';
                break;
            default:
                if (\true === \ctype_digit($streamName)) {
                    if (\PHP_VERSION_ID >= 50306) {
                        $streamName = 'php://fd/' . $streamName;
                    } else {
                        throw new \Hoa\File\Exception('You need PHP5.3.6 to use a file descriptor ' . 'other than 0, 1 or 2 (tried %d with PHP%s).', 0, [$streamName, \PHP_VERSION]);
                    }
                }
        }
        parent::__construct($streamName, $context, $wait);
        return;
    }
    /**
     * Open the stream and return the associated resource.
     *
     * @param   string               $streamName    Stream name (e.g. path or URL).
     * @param   \Hoa\Stream\Context  $context       Context.
     * @return  resource
     * @throws  \Hoa\File\Exception\FileDoesNotExist
     * @throws  \Hoa\File\Exception
     */
    protected function &_open($streamName, Stream\Context $context = null)
    {
        if (\substr($streamName, 0, 4) == 'file' && \false === \is_dir(\dirname($streamName))) {
            throw new \Hoa\File\Exception('Directory %s does not exist. Could not open file %s.', 1, [\dirname($streamName), \basename($streamName)]);
        }
        if (null === $context) {
            if (\false === ($out = @\fopen($streamName, $this->getMode(), \true))) {
                throw new \Hoa\File\Exception('Failed to open stream %s.', 2, $streamName);
            }
            return $out;
        }
        $out = @\fopen($streamName, $this->getMode(), \true, $context->getContext());
        if (\false === $out) {
            throw new \Hoa\File\Exception('Failed to open stream %s.', 3, $streamName);
        }
        return $out;
    }
    /**
     * Close the current stream.
     *
     * @return  bool
     */
    protected function _close()
    {
        return @\fclose($this->getStream());
    }
    /**
     * Start a new buffer.
     * The callable acts like a light filter.
     *
     * @param   mixed   $callable    Callable.
     * @param   int     $size        Size.
     * @return  int
     */
    public function newBuffer($callable = null, $size = null)
    {
        $this->setStreamBuffer($size);
        //@TODO manage $callable as a filter?
        return 1;
    }
    /**
     * Flush the output to a stream.
     *
     * @return  bool
     */
    public function flush()
    {
        return \fflush($this->getStream());
    }
    /**
     * Delete buffer.
     *
     * @return  bool
     */
    public function deleteBuffer()
    {
        return $this->disableStreamBuffer();
    }
    /**
     * Get bufffer level.
     *
     * @return  int
     */
    public function getBufferLevel()
    {
        return 1;
    }
    /**
     * Get buffer size.
     *
     * @return  int
     */
    public function getBufferSize()
    {
        return $this->getStreamBufferSize();
    }
    /**
     * Portable advisory locking.
     *
     * @param   int     $operation    Operation, use the
     *                                \Hoa\Stream\IStream\Lockable::LOCK_* constants.
     * @return  bool
     */
    public function lock($operation)
    {
        return \flock($this->getStream(), $operation);
    }
    /**
     * Rewind the position of a stream pointer.
     *
     * @return  bool
     */
    public function rewind()
    {
        return \rewind($this->getStream());
    }
    /**
     * Seek on a stream pointer.
     *
     * @param   int     $offset    Offset (negative value should be supported).
     * @param   int     $whence    Whence, use the
     *                             \Hoa\Stream\IStream\Pointable::SEEK_* constants.
     * @return  int
     */
    public function seek($offset, $whence = Stream\IStream\Pointable::SEEK_SET)
    {
        return \fseek($this->getStream(), $offset, $whence);
    }
    /**
     * Get the current position of the stream pointer.
     *
     * @return  int
     */
    public function tell()
    {
        $stream = $this->getStream();
        if (null === $stream) {
            return 0;
        }
        return \ftell($stream);
    }
    /**
     * Create a file.
     *
     * @param   string  $name     File name.
     * @param   mixed   $dummy    To be compatible with childs.
     * @return  bool
     */
    public static function create($name, $dummy)
    {
        if (\file_exists($name)) {
            return \true;
        }
        return \touch($name);
    }
}
/**
 * Flex entity.
 */
Consistency::flexEntity('Hoa\\File\\File');
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\File;

use Hoa\Stream;
/**
 * Class \Hoa\File\Write.
 *
 * File handler.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Write extends \Hoa\File\File implements Stream\IStream\Out
{
    /**
     * Open a file.
     *
     * @param   string  $streamName    Stream name.
     * @param   string  $mode          Open mode, see the self::MODE_* constants.
     * @param   string  $context       Context ID (please, see the
     *                                 \Hoa\Stream\Context class).
     * @param   bool    $wait          Differ opening or not.
     */
    public function __construct($streamName, $mode = parent::MODE_APPEND_WRITE, $context = null, $wait = \false)
    {
        parent::__construct($streamName, $mode, $context, $wait);
        return;
    }
    /**
     * Open the stream and return the associated resource.
     *
     * @param   string               $streamName    Stream name (e.g. path or URL).
     * @param   \Hoa\Stream\Context  $context       Context.
     * @return  resource
     * @throws  \Hoa\File\Exception\FileDoesNotExist
     * @throws  \Hoa\File\Exception
     */
    protected function &_open($streamName, Stream\Context $context = null)
    {
        static $createModes = [parent::MODE_TRUNCATE_WRITE, parent::MODE_APPEND_WRITE, parent::MODE_CREATE_WRITE];
        if (!\in_array($this->getMode(), $createModes)) {
            throw new \Hoa\File\Exception('Open mode are not supported; given %d. Only %s are supported.', 0, [$this->getMode(), \implode(', ', $createModes)]);
        }
        \preg_match('#^(\\w+)://#', $streamName, $match);
        if ((isset($match[1]) && $match[1] == 'file' || !isset($match[1])) && !\file_exists($streamName) && parent::MODE_TRUNCATE_WRITE == $this->getMode()) {
            throw new \Hoa\File\Exception\FileDoesNotExist('File %s does not exist.', 1, $streamName);
        }
        $out = parent::_open($streamName, $context);
        return $out;
    }
    /**
     * Write n characters.
     *
     * @param   string  $string    String.
     * @param   int     $length    Length.
     * @return  mixed
     * @throws  \Hoa\File\Exception
     */
    public function write($string, $length)
    {
        if (0 > $length) {
            throw new \Hoa\File\Exception('Length must be greater than 0, given %d.', 2, $length);
        }
        return \fwrite($this->getStream(), $string, $length);
    }
    /**
     * Write a string.
     *
     * @param   string  $string    String.
     * @return  mixed
     */
    public function writeString($string)
    {
        $string = (string) $string;
        return $this->write($string, \strlen($string));
    }
    /**
     * Write a character.
     *
     * @param   string  $char    Character.
     * @return  mixed
     */
    public function writeCharacter($char)
    {
        return $this->write((string) $char[0], 1);
    }
    /**
     * Write a boolean.
     *
     * @param   bool    $boolean    Boolean.
     * @return  mixed
     */
    public function writeBoolean($boolean)
    {
        return $this->write((string) (bool) $boolean, 1);
    }
    /**
     * Write an integer.
     *
     * @param   int     $integer    Integer.
     * @return  mixed
     */
    public function writeInteger($integer)
    {
        $integer = (string) (int) $integer;
        return $this->write($integer, \strlen($integer));
    }
    /**
     * Write a float.
     *
     * @param   float   $float    Float.
     * @return  mixed
     */
    public function writeFloat($float)
    {
        $float = (string) (float) $float;
        return $this->write($float, \strlen($float));
    }
    /**
     * Write an array.
     *
     * @param   array   $array    Array.
     * @return  mixed
     */
    public function writeArray(array $array)
    {
        $array = \var_export($array, \true);
        return $this->write($array, \strlen($array));
    }
    /**
     * Write a line.
     *
     * @param   string  $line    Line.
     * @return  mixed
     */
    public function writeLine($line)
    {
        if (\false === ($n = \strpos($line, "\n"))) {
            return $this->write($line . "\n", \strlen($line) + 1);
        }
        ++$n;
        return $this->write(\substr($line, 0, $n), $n);
    }
    /**
     * Write all, i.e. as much as possible.
     *
     * @param   string  $string    String.
     * @return  mixed
     */
    public function writeAll($string)
    {
        return $this->write($string, \strlen($string));
    }
    /**
     * Truncate a file to a given length.
     *
     * @param   int     $size    Size.
     * @return  bool
     */
    public function truncate($size)
    {
        return \ftruncate($this->getStream(), $size);
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\File;

use Hoa\Event;
/**
 * Class \Hoa\File\Watcher.
 *
 * A naive file system watcher that fires three events: new, move and modify.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Watcher extends \Hoa\File\Finder implements Event\Listenable
{
    use Event\Listens;
    /**
     * Latency.
     *
     * @var int
     */
    protected $_latency = 1;
    /**
     * Constructor.
     *
     * @param   int  $latency    Latency (in seconds).
     */
    public function __construct($latency = null)
    {
        parent::__construct();
        $this->setListener(new Event\Listener($this, ['new', 'modify', 'move']));
        if (null !== $latency) {
            $this->setLatency($latency);
        }
        return;
    }
    /**
     * Run the watcher.
     *
     * Listenable events:
     *     • new, when a file is new, i.e. found by the finder;
     *     • modify, when a file has been modified;
     *     • move, when a file has moved, i.e. no longer found by the finder.
     *
     * @return  void
     */
    public function run()
    {
        $iterator = $this->getIterator();
        $previous = \iterator_to_array($iterator);
        $current = $previous;
        while (\true) {
            foreach ($current as $name => $c) {
                if (!isset($previous[$name])) {
                    $this->getListener()->fire('new', new Event\Bucket(['file' => $c]));
                    continue;
                }
                if (null === $c->getHash()) {
                    unset($current[$name]);
                    continue;
                }
                if ($previous[$name]->getHash() != $c->getHash()) {
                    $this->getListener()->fire('modify', new Event\Bucket(['file' => $c]));
                }
                unset($previous[$name]);
            }
            foreach ($previous as $p) {
                $this->getListener()->fire('move', new Event\Bucket(['file' => $p]));
            }
            \usleep($this->getLatency() * 1000000);
            $previous = $current;
            $current = \iterator_to_array($iterator);
        }
        return;
    }
    /**
     * Set latency.
     *
     * @param   int  $latency    Latency (in seconds).
     * @return  int
     */
    public function setLatency($latency)
    {
        $old = $this->_latency;
        $this->_latency = $latency;
        return $old;
    }
    /**
     * Get latency.
     *
     * @return  int
     */
    public function getLatency()
    {
        return $this->_latency;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\File;

use Hoa\Stream;
/**
 * Class \Hoa\File\Directory.
 *
 * Directory handler.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Directory extends \Hoa\File\Generic
{
    /**
     * Open for reading.
     *
     * @const string
     */
    const MODE_READ = 'rb';
    /**
     * Open for reading and writing. If the directory does not exist, attempt to
     * create it.
     *
     * @const string
     */
    const MODE_CREATE = 'xb';
    /**
     * Open for reading and writing. If the directory does not exist, attempt to
     * create it recursively.
     *
     * @const string
     */
    const MODE_CREATE_RECURSIVE = 'xrb';
    /**
     * Open a directory.
     *
     * @param   string  $streamName    Stream name.
     * @param   string  $mode          Open mode, see the self::MODE* constants.
     * @param   string  $context       Context ID (please, see the
     *                                 \Hoa\Stream\Context class).
     * @param   bool    $wait          Differ opening or not.
     */
    public function __construct($streamName, $mode = self::MODE_READ, $context = null, $wait = \false)
    {
        $this->setMode($mode);
        parent::__construct($streamName, $context, $wait);
        return;
    }
    /**
     * Open the stream and return the associated resource.
     *
     * @param   string               $streamName    Stream name (e.g. path or URL).
     * @param   \Hoa\Stream\Context  $context       Context.
     * @return  resource
     * @throws  \Hoa\File\Exception\FileDoesNotExist
     * @throws  \Hoa\File\Exception
     */
    protected function &_open($streamName, Stream\Context $context = null)
    {
        if (\false === \is_dir($streamName)) {
            if ($this->getMode() == self::MODE_READ) {
                throw new \Hoa\File\Exception\FileDoesNotExist('Directory %s does not exist.', 0, $streamName);
            } else {
                self::create($streamName, $this->getMode(), null !== $context ? $context->getContext() : null);
            }
        }
        $out = null;
        return $out;
    }
    /**
     * Close the current stream.
     *
     * @return  bool
     */
    protected function _close()
    {
        return \true;
    }
    /**
     * Recursive copy of a directory.
     *
     * @param   string  $to       Destination path.
     * @param   bool    $force    Force to copy if the file $to already exists.
     *                            Use the \Hoa\Stream\IStream\Touchable::*OVERWRITE
     *                            constants.
     * @return  bool
     * @throws  \Hoa\File\Exception
     */
    public function copy($to, $force = Stream\IStream\Touchable::DO_NOT_OVERWRITE)
    {
        if (empty($to)) {
            throw new \Hoa\File\Exception('The destination path (to copy) is empty.', 1);
        }
        $from = $this->getStreamName();
        $fromLength = \strlen($from) + 1;
        $finder = new \Hoa\File\Finder();
        $finder->in($from);
        self::create($to, self::MODE_CREATE_RECURSIVE);
        foreach ($finder as $file) {
            $relative = \substr($file->getPathname(), $fromLength);
            $_to = $to . DS . $relative;
            if (\true === $file->isDir()) {
                self::create($_to, self::MODE_CREATE);
                continue;
            }
            // This is not possible to do `$file->open()->copy();
            // $file->close();` because the file will be opened in read and
            // write mode. In a PHAR for instance, this operation is
            // forbidden. So a special care must be taken to open file in read
            // only mode.
            $handle = null;
            if (\true === $file->isFile()) {
                $handle = new \Hoa\File\Read($file->getPathname());
            } elseif (\true === $file->isDir()) {
                $handle = new \Hoa\File\Directory($file->getPathName());
            } elseif (\true === $file->isLink()) {
                $handle = new \Hoa\File\Link\Read($file->getPathName());
            }
            if (null !== $handle) {
                $handle->copy($_to, $force);
                $handle->close();
            }
        }
        return \true;
    }
    /**
     * Delete a directory.
     *
     * @return  bool
     */
    public function delete()
    {
        $from = $this->getStreamName();
        $finder = new \Hoa\File\Finder();
        $finder->in($from)->childFirst();
        foreach ($finder as $file) {
            $file->open()->delete();
            $file->close();
        }
        if (null === $this->getStreamContext()) {
            return @\rmdir($from);
        }
        return @\rmdir($from, $this->getStreamContext()->getContext());
    }
    /**
     * Create a directory.
     *
     * @param   string  $name       Directory name.
     * @param   string  $mode       Create mode. Please, see the self::MODE_CREATE*
     *                              constants.
     * @param   string  $context    Context ID (please, see the
     *                              \Hoa\Stream\Context class).
     * @return  bool
     * @throws  \Hoa\File\Exception
     */
    public static function create($name, $mode = self::MODE_CREATE_RECURSIVE, $context = null)
    {
        if (\true === \is_dir($name)) {
            return \true;
        }
        if (empty($name)) {
            return \false;
        }
        if (null !== $context) {
            if (\false === Stream\Context::contextExists($context)) {
                throw new \Hoa\File\Exception('Context %s was not previously declared, cannot retrieve ' . 'this context.', 2, $context);
            } else {
                $context = Stream\Context::getInstance($context);
            }
        }
        if (null === $context) {
            return @\mkdir($name, 0755, self::MODE_CREATE_RECURSIVE === $mode);
        }
        return @\mkdir($name, 0755, self::MODE_CREATE_RECURSIVE === $mode, $context->getContext());
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\File\Temporary;

use Hoa\File;
use Hoa\Stream;
/**
 * Class \Hoa\File\Temporary\ReadWrite.
 *
 * Read/write a temporary file.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class ReadWrite extends \Hoa\File\Temporary\Temporary implements Stream\IStream\In, Stream\IStream\Out
{
    /**
     * Open a file.
     *
     * @param   string  $streamName    Stream name.
     * @param   string  $mode          Open mode, see the parent::MODE_* constants.
     * @param   string  $context       Context ID (please, see the
     *                                 \Hoa\Stream\Context class).
     * @param   bool    $wait          Differ opening or not.
     */
    public function __construct($streamName, $mode = parent::MODE_APPEND_READ_WRITE, $context = null, $wait = \false)
    {
        parent::__construct($streamName, $mode, $context, $wait);
        return;
    }
    /**
     * Open the stream and return the associated resource.
     *
     * @param   string               $streamName    Stream name (e.g. path or URL).
     * @param   \Hoa\Stream\Context  $context       Context.
     * @return  resource
     * @throws  \Hoa\File\Exception\FileDoesNotExist
     * @throws  \Hoa\File\Exception
     */
    protected function &_open($streamName, Stream\Context $context = null)
    {
        static $createModes = [parent::MODE_READ_WRITE, parent::MODE_TRUNCATE_READ_WRITE, parent::MODE_APPEND_READ_WRITE, parent::MODE_CREATE_READ_WRITE];
        if (!\in_array($this->getMode(), $createModes)) {
            throw new File\Exception('Open mode are not supported; given %d. Only %s are supported.', 0, [$this->getMode(), \implode(', ', $createModes)]);
        }
        \preg_match('#^(\\w+)://#', $streamName, $match);
        if ((isset($match[1]) && $match[1] == 'file' || !isset($match[1])) && !\file_exists($streamName) && parent::MODE_READ_WRITE == $this->getMode()) {
            throw new File\Exception\FileDoesNotExist('File %s does not exist.', 1, $streamName);
        }
        $out = parent::_open($streamName, $context);
        return $out;
    }
    /**
     * Test for end-of-file.
     *
     * @return  bool
     */
    public function eof()
    {
        return \feof($this->getStream());
    }
    /**
     * Read n characters.
     *
     * @param   int     $length    Length.
     * @return  string
     * @throws  \Hoa\File\Exception
     */
    public function read($length)
    {
        if (0 > $length) {
            throw new File\Exception('Length must be greater than 0, given %d.', 2, $length);
        }
        return \fread($this->getStream(), $length);
    }
    /**
     * Alias of $this->read().
     *
     * @param   int     $length    Length.
     * @return  string
     */
    public function readString($length)
    {
        return $this->read($length);
    }
    /**
     * Read a character.
     *
     * @return  string
     */
    public function readCharacter()
    {
        return \fgetc($this->getStream());
    }
    /**
     * Read a boolean.
     *
     * @return  bool
     */
    public function readBoolean()
    {
        return (bool) $this->read(1);
    }
    /**
     * Read an integer.
     *
     * @param   int     $length    Length.
     * @return  int
     */
    public function readInteger($length = 1)
    {
        return (int) $this->read($length);
    }
    /**
     * Read a float.
     *
     * @param   int     $length    Length.
     * @return  float
     */
    public function readFloat($length = 1)
    {
        return (float) $this->read($length);
    }
    /**
     * Read an array.
     * Alias of the $this->scanf() method.
     *
     * @param   string  $format    Format (see printf's formats).
     * @return  array
     */
    public function readArray($format = null)
    {
        return $this->scanf($format);
    }
    /**
     * Read a line.
     *
     * @return  string
     */
    public function readLine()
    {
        return \fgets($this->getStream());
    }
    /**
     * Read all, i.e. read as much as possible.
     *
     * @param   int  $offset    Offset.
     * @return  string
     */
    public function readAll($offset = 0)
    {
        return \stream_get_contents($this->getStream(), -1, $offset);
    }
    /**
     * Parse input from a stream according to a format.
     *
     * @param   string  $format    Format (see printf's formats).
     * @return  array
     */
    public function scanf($format)
    {
        return \fscanf($this->getStream(), $format);
    }
    /**
     * Write n characters.
     *
     * @param   string  $string    String.
     * @param   int     $length    Length.
     * @return  mixed
     * @throws  \Hoa\File\Exception
     */
    public function write($string, $length)
    {
        if (0 > $length) {
            throw new File\Exception('Length must be greater than 0, given %d.', 3, $length);
        }
        return \fwrite($this->getStream(), $string, $length);
    }
    /**
     * Write a string.
     *
     * @param   string  $string    String.
     * @return  mixed
     */
    public function writeString($string)
    {
        $string = (string) $string;
        return $this->write($string, \strlen($string));
    }
    /**
     * Write a character.
     *
     * @param   string  $char    Character.
     * @return  mixed
     */
    public function writeCharacter($char)
    {
        return $this->write((string) $char[0], 1);
    }
    /**
     * Write a boolean.
     *
     * @param   bool    $boolean    Boolean.
     * @return  mixed
     */
    public function writeBoolean($boolean)
    {
        return $this->write((string) (bool) $boolean, 1);
    }
    /**
     * Write an integer.
     *
     * @param   int     $integer    Integer.
     * @return  mixed
     */
    public function writeInteger($integer)
    {
        $integer = (string) (int) $integer;
        return $this->write($integer, \strlen($integer));
    }
    /**
     * Write a float.
     *
     * @param   float   $float    Float.
     * @return  mixed
     */
    public function writeFloat($float)
    {
        $float = (string) (float) $float;
        return $this->write($float, \strlen($float));
    }
    /**
     * Write an array.
     *
     * @param   array   $array    Array.
     * @return  mixed
     */
    public function writeArray(array $array)
    {
        $array = \var_export($array, \true);
        return $this->write($array, \strlen($array));
    }
    /**
     * Write a line.
     *
     * @param   string  $line    Line.
     * @return  mixed
     */
    public function writeLine($line)
    {
        if (\false === ($n = \strpos($line, "\n"))) {
            return $this->write($line . "\n", \strlen($line) + 1);
        }
        ++$n;
        return $this->write(\substr($line, 0, $n), $n);
    }
    /**
     * Write all, i.e. as much as possible.
     *
     * @param   string  $string    String.
     * @return  mixed
     */
    public function writeAll($string)
    {
        return $this->write($string, \strlen($string));
    }
    /**
     * Truncate a file to a given length.
     *
     * @param   int     $size    Size.
     * @return  bool
     */
    public function truncate($size)
    {
        return \ftruncate($this->getStream(), $size);
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\File\Temporary;

use Hoa\File;
use Hoa\Stream;
/**
 * Class \Hoa\File\Temporary\Read.
 *
 * Read a temporary file.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Read extends \Hoa\File\Temporary\Temporary implements Stream\IStream\In
{
    /**
     * Open a file.
     *
     * @param   string  $streamName    Stream name.
     * @param   string  $mode          Open mode, see the parent::MODE_* constants.
     * @param   string  $context       Context ID (please, see the
     *                                 \Hoa\Stream\Context class).
     * @param   bool    $wait          Differ opening or not.
     */
    public function __construct($streamName, $mode = parent::MODE_READ, $context = null, $wait = \false)
    {
        parent::__construct($streamName, $mode, $context, $wait);
        return;
    }
    /**
     * Open the stream and return the associated resource.
     *
     * @param   string               $streamName    Stream name (e.g. path or URL).
     * @param   \Hoa\Stream\Context  $context       Context.
     * @return  resource
     * @throws  \Hoa\File\Exception\FileDoesNotExist
     * @throws  \Hoa\File\Exception
     */
    protected function &_open($streamName, Stream\Context $context = null)
    {
        static $createModes = [parent::MODE_READ];
        if (!\in_array($this->getMode(), $createModes)) {
            throw new File\Exception('Open mode are not supported; given %d. Only %s are supported.', 0, [$this->getMode(), \implode(', ', $createModes)]);
        }
        \preg_match('#^(\\w+)://#', $streamName, $match);
        if ((isset($match[1]) && $match[1] == 'file' || !isset($match[1])) && !\file_exists($streamName)) {
            throw new File\Exception\FileDoesNotExist('File %s does not exist.', 1, $streamName);
        }
        $out = parent::_open($streamName, $context);
        return $out;
    }
    /**
     * Test for end-of-file.
     *
     * @return  bool
     */
    public function eof()
    {
        return \feof($this->getStream());
    }
    /**
     * Read n characters.
     *
     * @param   int     $length    Length.
     * @return  string
     * @throws  \Hoa\File\Exception
     */
    public function read($length)
    {
        if (0 > $length) {
            throw new File\Exception('Length must be greater than 0, given %d.', 2, $length);
        }
        return \fread($this->getStream(), $length);
    }
    /**
     * Alias of $this->read().
     *
     * @param   int     $length    Length.
     * @return  string
     */
    public function readString($length)
    {
        return $this->read($length);
    }
    /**
     * Read a character.
     *
     * @return  string
     */
    public function readCharacter()
    {
        return \fgetc($this->getStream());
    }
    /**
     * Read a boolean.
     *
     * @return  bool
     */
    public function readBoolean()
    {
        return (bool) $this->read(1);
    }
    /**
     * Read an integer.
     *
     * @param   int     $length    Length.
     * @return  int
     */
    public function readInteger($length = 1)
    {
        return (int) $this->read($length);
    }
    /**
     * Read a float.
     *
     * @param   int     $length    Length.
     * @return  float
     */
    public function readFloat($length = 1)
    {
        return (float) $this->read($length);
    }
    /**
     * Read an array.
     * Alias of the $this->scanf() method.
     *
     * @param   string  $format    Format (see printf's formats).
     * @return  array
     */
    public function readArray($format = null)
    {
        return $this->scanf($format);
    }
    /**
     * Read a line.
     *
     * @return  string
     */
    public function readLine()
    {
        return \fgets($this->getStream());
    }
    /**
     * Read all, i.e. read as much as possible.
     *
     * @param   int  $offset    Offset.
     * @return  string
     */
    public function readAll($offset = 0)
    {
        return \stream_get_contents($this->getStream(), -1, $offset);
    }
    /**
     * Parse input from a stream according to a format.
     *
     * @param   string  $format    Format (see printf's formats).
     * @return  array
     */
    public function scanf($format)
    {
        return \fscanf($this->getStream(), $format);
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\File\Temporary;

use Hoa\Consistency;
use Hoa\File;
use Hoa\Stream;
/**
 * Class \Hoa\File\Temporary.
 *
 * Temporary file handler.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Temporary extends File
{
    /**
     * Temporary file index.
     *
     * @var int
     */
    private static $_i = 0;
    /**
     * Open a temporary file.
     *
     * @param   string  $streamName    Stream name (or file descriptor).
     * @param   string  $mode          Open mode, see the parent::MODE_*
     *                                 constants.
     * @param   string  $context       Context ID (please, see the
     *                                 \Hoa\Stream\Context class).
     * @param   bool    $wait          Differ opening or not.
     */
    public function __construct($streamName, $mode, $context = null, $wait = \false)
    {
        if (null === $streamName) {
            $streamName = 'hoa://Library/File/Temporary.php#' . self::$_i++;
        }
        parent::__construct($streamName, $mode, $context, $wait);
        return;
    }
    /**
     * Open the stream and return the associated resource.
     *
     * @param   string              $streamName    Stream name (here, it is
     *                                             null).
     * @param   \Hoa\Stream\Context  $context       Context.
     * @return  resource
     * @throws  \Hoa\File\Exception
     */
    protected function &_open($streamName, Stream\Context $context = null)
    {
        if (\false === ($out = @\tmpfile())) {
            throw new File\Exception('Failed to open a temporary stream.', 0);
        }
        return $out;
    }
    /**
     * Create a unique temporary file, i.e. a file with a unique filename. It is
     * different of calling $this->__construct() that will create a temporary
     * file that will be destroy when calling the $this->close() method.
     *
     * @param   string  $directory    Directory where the temporary filename
     *                                will be created. If the directory does not
     *                                exist, it may generate a file in the
     *                                system's temporary directory.
     * @param   string  $prefix       Prefix of the generated temporary
     *                                filename.
     * @return  string
     */
    public static function create($directory = null, $prefix = '__hoa_')
    {
        if (null === $directory || \false === \is_dir($directory)) {
            $directory = static::getTemporaryDirectory();
        }
        return \tempnam($directory, $prefix);
    }
    /**
     * Get the directory path used for temporary files.
     *
     * @return  string
     */
    public static function getTemporaryDirectory()
    {
        return \sys_get_temp_dir();
    }
}
/**
 * Flex entity.
 */
Consistency::flexEntity('Hoa\\File\\Temporary\\Temporary');
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\File\Temporary;

use Hoa\File;
use Hoa\Stream;
/**
 * Class \Hoa\File\Temporary\Write.
 *
 * Write into a temporary file.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Write extends \Hoa\File\Temporary\Temporary implements Stream\IStream\Out
{
    /**
     * Open a file.
     *
     * @param   string  $streamName    Stream name.
     * @param   string  $mode          Open mode, see the parent::MODE_* constants.
     * @param   string  $context       Context ID (please, see the
     *                                 \Hoa\Stream\Context class).
     * @param   bool    $wait          Differ opening or not.
     */
    public function __construct($streamName, $mode = parent::MODE_APPEND_WRITE, $context = null, $wait = \false)
    {
        parent::__construct($streamName, $mode, $context, $wait);
        return;
    }
    /**
     * Open the stream and return the associated resource.
     *
     * @param   string               $streamName    Stream name (e.g. path or URL).
     * @param   \Hoa\Stream\Context  $context       Context.
     * @return  resource
     * @throws  \Hoa\File\Exception\FileDoesNotExist
     * @throws  \Hoa\File\Exception
     */
    protected function &_open($streamName, Stream\Context $context = null)
    {
        static $createModes = [parent::MODE_TRUNCATE_WRITE, parent::MODE_APPEND_WRITE, parent::MODE_CREATE_WRITE];
        if (!\in_array($this->getMode(), $createModes)) {
            throw new File\Exception('Open mode are not supported; given %d. Only %s are supported.', 0, [$this->getMode(), \implode(', ', $createModes)]);
        }
        \preg_match('#^(\\w+)://#', $streamName, $match);
        if ((isset($match[1]) && $match[1] == 'file' || !isset($match[1])) && !\file_exists($streamName)) {
            throw new File\Exception\FileDoesNotExist('File %s does not exist.', 1, $streamName);
        }
        $out = parent::_open($streamName, $context);
        return $out;
    }
    /**
     * Write n characters.
     *
     * @param   string  $string    String.
     * @param   int     $length    Length.
     * @return  mixed
     * @throws  \Hoa\File\Exception
     */
    public function write($string, $length)
    {
        if (0 > $length) {
            throw new File\Exception('Length must be greater than 0, given %d.', 2, $length);
        }
        return \fwrite($this->getStream(), $string, $length);
    }
    /**
     * Write a string.
     *
     * @param   string  $string    String.
     * @return  mixed
     */
    public function writeString($string)
    {
        $string = (string) $string;
        return $this->write($string, \strlen($string));
    }
    /**
     * Write a character.
     *
     * @param   string  $char    Character.
     * @return  mixed
     */
    public function writeCharacter($char)
    {
        return $this->write((string) $char[0], 1);
    }
    /**
     * Write a boolean.
     *
     * @param   bool    $boolean    Boolean.
     * @return  mixed
     */
    public function writeBoolean($boolean)
    {
        return $this->write((string) (bool) $boolean, 1);
    }
    /**
     * Write an integer.
     *
     * @param   int     $integer    Integer.
     * @return  mixed
     */
    public function writeInteger($integer)
    {
        $integer = (string) (int) $integer;
        return $this->write($integer, \strlen($integer));
    }
    /**
     * Write a float.
     *
     * @param   float   $float    Float.
     * @return  mixed
     */
    public function writeFloat($float)
    {
        $float = (string) (float) $float;
        return $this->write($float, \strlen($float));
    }
    /**
     * Write an array.
     *
     * @param   array   $array    Array.
     * @return  mixed
     */
    public function writeArray(array $array)
    {
        $array = \var_export($array, \true);
        return $this->write($array, \strlen($array));
    }
    /**
     * Write a line.
     *
     * @param   string  $line    Line.
     * @return  mixed
     */
    public function writeLine($line)
    {
        if (\false === ($n = \strpos($line, "\n"))) {
            return $this->write($line . "\n", \strlen($line) + 1);
        }
        ++$n;
        return $this->write(\substr($line, 0, $n), $n);
    }
    /**
     * Write all, i.e. as much as possible.
     *
     * @param   string  $string    String.
     * @return  mixed
     */
    public function writeAll($string)
    {
        return $this->write($string, \strlen($string));
    }
    /**
     * Truncate a file to a given length.
     *
     * @param   int     $size    Size.
     * @return  bool
     */
    public function truncate($size)
    {
        return \ftruncate($this->getStream(), $size);
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\File\Exception;

/**
 * Class \Hoa\File\Exception\FileDoesNotExist.
 *
 * Extending the \Hoa\File\Exception class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class FileDoesNotExist extends \Hoa\File\Exception\Exception
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\File\Exception;

use Hoa\Consistency;
use Hoa\Exception as HoaException;
/**
 * Class \Hoa\File\Exception.
 *
 * Extending the \Hoa\Exception\Exception class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Exception extends HoaException
{
}
/**
 * Flex entity.
 */
Consistency::flexEntity('Hoa\\File\\Exception\\Exception');
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator;

/**
 * Class \Hoa\Iterator\Append.
 *
 * Extending the SPL AppendIterator class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Append extends \AppendIterator
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator;

/**
 * Class \Hoa\Iterator\Limit.
 *
 * Extending the SPL LimitIterator class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Limit extends \LimitIterator
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator;

/**
 * Class \Hoa\Iterator\Demultiplexer.
 *
 * Demux result from another iterator.
 * This iterator is somehow the opposite of the Hoa\Iterator\Multiple iterator.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Demultiplexer implements \Hoa\Iterator\Iterator
{
    /**
     * Current iterator.
     *
     * @var \Traversable
     */
    protected $_iterator = null;
    /**
     * Current computed value.
     *
     * @var mixed
     */
    protected $_current = null;
    /**
     * Demuxer (callable to execute each time).
     *
     * @var callable
     */
    protected $_demuxer = null;
    /**
     * Constructor.
     *
     * @param   \Traversable  $iterator    Iterator.
     * @param   callable      $demuxer     Demuxer.
     * @throws  \Hoa\Iterator\Exception
     */
    public function __construct(\Traversable $iterator, $demuxer)
    {
        if ($iterator instanceof \IteratorAggregate) {
            $iterator = $iterator->getIterator();
        }
        $this->_iterator = $iterator;
        $this->_demuxer = $demuxer;
        return;
    }
    /**
     * Return the current element.
     *
     * @return  mixed
     */
    public function current()
    {
        if (null !== $this->_current) {
            return $this->_current;
        }
        $demuxer = $this->_demuxer;
        return $this->_current = $demuxer($this->_iterator->current());
    }
    /**
     * Return the key of the current element.
     *
     * @return  mixed
     */
    public function key()
    {
        return $this->_iterator->key();
    }
    /**
     * Move forward to next element.
     *
     * @return  void
     */
    public function next()
    {
        $this->_current = null;
        return $this->_iterator->next();
    }
    /**
     * Rewind the iterator to the first element.
     *
     * @return  void
     */
    public function rewind()
    {
        return $this->_iterator->rewind();
    }
    /**
     * Check if current position is valid.
     *
     * @return  bool
     */
    public function valid()
    {
        return $this->_iterator->valid();
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator;

/**
 * Class \Hoa\Iterator\Filter.
 *
 * Extending the SPL FilterIterator class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
abstract class Filter extends \FilterIterator
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator;

/**
 * Class \Hoa\Iterator\FileSystem.
 *
 * Extending the SPL FileSystemIterator class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class FileSystem extends \FilesystemIterator
{
    /**
     * SplFileInfo classname.
     *
     * @var string
     */
    protected $_splFileInfoClass = null;
    /**
     * Constructor.
     * Please, see \FileSystemIterator::__construct() method.
     * We add the $splFileInfoClass parameter.
     *
     * @param   string  $path                Path.
     * @param   int     $flags               Flags.
     * @param   string  $splFileInfoClass    SplFileInfo classname.
     */
    public function __construct($path, $flags = null, $splFileInfoClass = null)
    {
        $this->_splFileInfoClass = $splFileInfoClass;
        if (null === $flags) {
            parent::__construct($path);
        } else {
            parent::__construct($path, $flags);
        }
        return;
    }
    /**
     * Current.
     * Please, see \FileSystemIterator::current() method.
     *
     * @return  mixed
     */
    public function current()
    {
        $out = parent::current();
        if (null !== $this->_splFileInfoClass && $out instanceof \SplFileInfo) {
            $out->setInfoClass($this->_splFileInfoClass);
            $out = $out->getFileInfo();
        }
        return $out;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator;

/**
 * Class \Hoa\Iterator\CallbackGenerator.
 *
 * Yield a value based on a callback.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class CallbackGenerator implements \Hoa\Iterator\Iterator
{
    /**
     * Callback.
     *
     * @var callable
     */
    protected $_callback = null;
    /**
     * Current key.
     *
     * @var mixed
     */
    protected $_key = 0;
    /**
     * Current computed value.
     *
     * @var mixed
     */
    protected $_current = null;
    /**
     * Constructor.
     *
     * @param   callable  $callback    Callback.
     */
    public function __construct(callable $callback)
    {
        $this->_callback = $callback;
        return;
    }
    /**
     * Return the current element.
     *
     * @return  mixed
     */
    public function current()
    {
        $handle = $this->_callback;
        return $this->_current = $handle($this->_key);
    }
    /**
     * Return the key of the current element.
     *
     * @return  mixed
     */
    public function key()
    {
        return $this->_key;
    }
    /**
     * Move forward to next element.
     *
     * @return  void
     */
    public function next()
    {
        ++$this->_key;
        return;
    }
    /**
     * Rewind the iterator to the first element.
     *
     * @return  void
     */
    public function rewind()
    {
        $this->_key = 0;
        $this->_current = null;
        return;
    }
    /**
     * Check if current position is valid.
     *
     * @return  bool
     */
    public function valid()
    {
        return \true;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator;

/**
 * Class \Hoa\Iterator\Lookahead.
 *
 * Look ahead iterator.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Lookahead extends \Hoa\Iterator\IteratorIterator implements \Hoa\Iterator\Outer
{
    /**
     * Current iterator.
     *
     * @var \Iterator
     */
    protected $_iterator = null;
    /**
     * Current key.
     *
     * @var mixed
     */
    protected $_key = 0;
    /**
     * Current value.
     *
     * @var mixed
     */
    protected $_current = null;
    /**
     * Whether the current element is valid or not.
     *
     * @var bool
     */
    protected $_valid = \false;
    /**
     * Construct.
     *
     * @param   \Iterator  $iterator    Iterator.
     */
    public function __construct(\Iterator $iterator)
    {
        $this->_iterator = $iterator;
        return;
    }
    /**
     * Get inner iterator.
     *
     * @return  \Iterator
     */
    public function getInnerIterator() : ?\Iterator
    {
        return $this->_iterator;
    }
    /**
     * Return the current element.
     *
     * @return  mixed
     */
    #[\ReturnTypeWillChange]
    public function current()
    {
        return $this->_current;
    }
    /**
     * Return the key of the current element.
     *
     * @return  mixed
     */
    #[\ReturnTypeWillChange]
    public function key()
    {
        return $this->_key;
    }
    /**
     * Move forward to next element.
     *
     * @return  void
     */
    #[\ReturnTypeWillChange]
    public function next()
    {
        $innerIterator = $this->getInnerIterator();
        $this->_valid = $innerIterator->valid();
        if (\false === $this->_valid) {
            return;
        }
        $this->_key = $innerIterator->key();
        $this->_current = $innerIterator->current();
        return $innerIterator->next();
    }
    /**
     * Rewind the iterator to the first element.
     *
     * @return  void
     */
    #[\ReturnTypeWillChange]
    public function rewind()
    {
        $out = $this->getInnerIterator()->rewind();
        $this->next();
        return $out;
    }
    /**
     * Check if current position is valid.
     *
     * @return  bool
     */
    public function valid() : bool
    {
        return $this->_valid;
    }
    /**
     * Check whether there is a next element.
     *
     * @return  bool
     */
    public function hasNext()
    {
        return $this->getInnerIterator()->valid();
    }
    /**
     * Get next value.
     *
     * @return  mixed
     */
    public function getNext()
    {
        return $this->getInnerIterator()->current();
    }
    /**
     * Get next key.
     *
     * @return  mixed
     */
    public function getNextKey()
    {
        return $this->getInnerIterator()->key();
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator;

/**
 * Class \Hoa\Iterator\Counter.
 *
 * A counter.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Counter implements \Hoa\Iterator\Iterator
{
    /**
     * From (lower bound).
     *
     * @var int
     */
    protected $_from = 0;
    /**
     * Current key.
     *
     * @var int
     */
    protected $_key = 0;
    /**
     * Current index.
     *
     * @var int
     */
    protected $_i = 0;
    /**
     * To (upper bound).
     *
     * @var int
     */
    protected $_to = 0;
    /**
     * Step.
     *
     * @var int
     */
    protected $_step = 0;
    /**
     * Constructor.
     * Equivalent to:
     *     for($i = $from; $i < $to; $i += $step)
     *
     * @param   int  $from    Start value.
     * @param   int  $to      Maximum value.
     * @param   int  $step    Step.
     * @throws  \Hoa\Iterator\Exception
     */
    public function __construct($from, $to, $step)
    {
        if ($step <= 0) {
            throw new \Hoa\Iterator\Exception('The step must be non-negative; given %d.', 0, $step);
        }
        $this->_from = $from;
        $this->_to = $to;
        $this->_step = $step;
        return;
    }
    /**
     * Return the current element.
     *
     * @return  int
     */
    public function current()
    {
        return $this->_i;
    }
    /**
     * Return the key of the current element.
     *
     * @return  int
     */
    public function key()
    {
        return $this->_key;
    }
    /**
     * Move forward to next element.
     *
     * @return  void
     */
    public function next()
    {
        ++$this->_key;
        $this->_i += $this->_step;
        return;
    }
    /**
     * Rewind the iterator to the first element.
     *
     * @return  void
     */
    public function rewind()
    {
        $this->_key = 0;
        $this->_i = $this->_from;
        return;
    }
    /**
     * Check if current position is valid.
     *
     * @return  bool
     */
    public function valid()
    {
        return $this->_i < $this->_to;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator;

/**
 * Class \Hoa\Iterator\SplFileInfo.
 *
 * Enhance SplFileInfo implementation.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class SplFileInfo extends \SplFileInfo
{
    /**
     * Hash.
     *
     * @var string
     */
    protected $_hash = null;
    /**
     * Relative path.
     *
     * @var string
     */
    protected $_relativePath = null;
    /**
     * Construct.
     *
     * @param   string  $filename        Filename.
     * @param   string  $relativePath    Relative path.
     */
    public function __construct($filename, $relativePath = null)
    {
        parent::__construct($filename);
        if (-1 !== ($mtime = $this->getMTime())) {
            $this->_hash = \md5($this->getPathname() . $mtime);
        }
        $this->_relativePath = $relativePath;
        return;
    }
    /**
     * Get the hash.
     *
     * @return  string
     */
    public function getHash()
    {
        return $this->_hash;
    }
    /**
     * Get the MTime.
     *
     * @return  int
     */
    public function getMTime()
    {
        try {
            return parent::getMTime();
        } catch (\RuntimeException $e) {
            return -1;
        }
    }
    /**
     * Set relative path.
     *
     * @param   string  $relativePath    Relative path.
     * @return  string
     */
    public function setRelativePath($relativePath)
    {
        $old = $this->_relativePath;
        $this->_relativePath = $relativePath;
        return $old;
    }
    /**
     * Get relative path (if given).
     *
     * @return  string
     */
    public function getRelativePath()
    {
        return $this->_relativePath;
    }
    /**
     * Get relative pathname (if possible).
     *
     * @return  string
     */
    public function getRelativePathname()
    {
        if (null === ($relative = $this->getRelativePath())) {
            return $this->getPathname();
        }
        return \substr($this->getPathname(), \strlen($relative));
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator;

/**
 * Class \Hoa\Iterator\Map.
 *
 * Extending the SPL ArrayIterator class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Map extends \ArrayIterator
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator;

/**
 * Class \Hoa\Iterator\Glob.
 *
 * Extending the SPL GlobIterator class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Glob extends \GlobIterator
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator;

/**
 * Interface \Hoa\Iterator\Outer.
 *
 * Extending the SPL OuterIterator interface.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
interface Outer extends \OuterIterator
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator;

/**
 * Class \Hoa\Iterator\Infinite.
 *
 * Extending the SPL InfiniteIterator class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Infinite extends \InfiniteIterator
{
}
This file was automatically generated by Composer Patches (https://github.com/cweagans/composer-patches)
Patches applied to this directory:

0
Source: patches/Buffer.patch


1
Source: patches/Lookahead.patch


<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator;

/**
 * Interface \Hoa\IteratorSeekable.
 *
 * Extending the SPL SeekableIterator interface.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
interface Seekable extends \SeekableIterator
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator;

/**
 * Class \Hoa\Iterator\Directory.
 *
 * Extending the SPL DirectoryIterator class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Directory extends \DirectoryIterator
{
    /**
     * SplFileInfo classname.
     *
     * @var string
     */
    protected $_splFileInfoClass = null;
    /**
     * Relative path.
     *
     * @var string
     */
    protected $_relativePath = null;
    /**
     * Constructor.
     * Please, see \DirectoryIterator::__construct() method.
     * We add the $splFileInfoClass parameter.
     *
     * @param   string  $path                Path.
     * @param   string  $splFileInfoClass    SplFileInfo classname.
     */
    public function __construct($path, $splFileInfoClass = null)
    {
        $this->_splFileInfoClass = $splFileInfoClass;
        parent::__construct($path);
        $this->setRelativePath($path);
        return;
    }
    /**
     * Current.
     * Please, see \DirectoryIterator::current() method.
     *
     * @return  mixed
     */
    public function current()
    {
        $out = parent::current();
        if (null !== $this->_splFileInfoClass && $out instanceof \SplFileInfo) {
            $out->setInfoClass($this->_splFileInfoClass);
            $out = $out->getFileInfo();
            if ($out instanceof \Hoa\Iterator\SplFileInfo) {
                $out->setRelativePath($this->getRelativePath());
            }
        }
        return $out;
    }
    /**
     * Set relative path.
     *
     * @param   string  $relativePath    Relative path.
     * @return  string
     */
    protected function setRelativePath($path)
    {
        $old = $this->_relativePath;
        $this->_relativePath = $path;
        return $old;
    }
    /**
     * Get relative path (if given).
     *
     * @return  string
     */
    public function getRelativePath()
    {
        return $this->_relativePath;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator;

/**
 * Class \Hoa\Iterator\Mock.
 *
 * Extending the SPL EmptyIterator class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Mock extends \EmptyIterator
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator;

use Hoa\Consistency;
/**
 * Interface \Hoa\Iterator.
 *
 * Extending the SPL Iterator interface.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
interface Iterator extends \Iterator
{
}
/**
 * Flex entity.
 */
Consistency::flexEntity('Hoa\\Iterator\\Iterator');
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator;

/**
 * Class \Hoa\Iterator\NoRewind.
 *
 * Extending the SPL NoRewindIterator class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class NoRewind extends \NoRewindIterator
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator;

/**
 * Class \Hoa\Iterator\RegularExpression.
 *
 * Re-implement the SPL RegexIterator class.
 * There are too many bugs in php-src and HHVM, so we re-implement it from
 * scratch without extending the existing class.
 *
 * Inspired by hhvm://hphp/system/php/spl/iterators/RegexIterator.php
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class RegularExpression extends \Hoa\Iterator\Filter
{
    /**
     * Flag: match the entry key instead of the entry value.
     *
     * @const int
     */
    const USE_KEY = 1;
    /**
     * Flag: invert match.
     *
     * @const int
     */
    const INVERT_MATCH = 2;
    /**
     * Mode and preg flag: only execute match (filter) for the current entry.
     *
     * @const int
     */
    const MATCH = 0;
    /**
     * Mode and preg flag: first match for the current entry.
     *
     * @const int
     */
    const GET_MATCH = 1;
    /**
     * Mode and preg flag: all matches for the current entry.
     *
     * @const int
     */
    const ALL_MATCHES = 2;
    /**
     * Mode and preg flag: split values for the current entry.
     *
     * @const int
     */
    const SPLIT = 3;
    /**
     * Mode and preg flag: replace the current entry.
     *
     * @const int
     */
    const REPLACE = 4;
    /**
     * The regular expression to match.
     *
     * @var string
     */
    protected $_regex = null;
    /**
     * Operation mode, see the \RegexIterator::setMode method for a list of
     * modes.
     *
     * @var int
     */
    protected $_mode = 0;
    /**
     * Special flags, see the \RegexIterator::setFlag method for a list of
     * available flags.
     *
     * @var int
     */
    protected $_flags = 0;
    /**
     * The regular expression flags. See constants.
     *
     * @var int
     */
    protected $_pregFlags = 0;
    /**
     * Current key.
     *
     * @var int
     */
    protected $_key = 0;
    /**
     * Current value.
     *
     * @var string
     */
    protected $_current = null;
    /**
     * Replacement.
     *
     * @var string
     */
    public $replacement = null;
    /**
     * Constructor.
     *
     * @param   \RecursiveIterator  $iterator     The recursive iterator to
     *                                            apply this regex filter to.
     * @param   string              $regex        The regular expression to
     *                                            match.
     * @param   int                 $mode         Operation mode, please see the
     *                                            \RegexIterator::setMode method.
     * @param   int                 $flags        Special flags, please see the
     *                                            \RegexIterator::setFlags method.
     * @param   int                 $pregFlags    Regular expression flags,
     *                                            please see
     *                                            \RegexIterator constants.
     */
    public function __construct(\Iterator $iterator, $regex, $mode = self::MATCH, $flags = 0, $pregFlags = 0)
    {
        parent::__construct($iterator);
        $this->_regex = $regex;
        $this->setMode($mode);
        $this->setFlags($flags);
        $this->setPregFlags($pregFlags);
        $this->replacement = null;
        return;
    }
    /**
     * Get accept status.
     *
     * @return  bool
     */
    public function accept()
    {
        if (\is_array(parent::current())) {
            return \false;
        }
        $this->_key = parent::key();
        $this->_current = parent::current();
        $matches = [];
        $useKey = $this->_flags & self::USE_KEY;
        $subject = $useKey ? $this->_key : $this->_current;
        $out = \false;
        switch ($this->_mode) {
            case self::MATCH:
                $out = 0 !== \preg_match($this->_regex, $subject, $matches, $this->_pregFlags);
                break;
            case self::GET_MATCH:
                $this->_current = [];
                $out = 0 !== \preg_match($this->_regex, $subject, $this->_current, $this->_pregFlags);
                break;
            case self::ALL_MATCHES:
                $this->_current = [];
                $out = 0 < \preg_match_all($this->_regex, $subject, $this->_current, $this->_pregFlags);
                break;
            case self::SPLIT:
                $this->_current = \preg_split($this->_regex, $subject, null, $this->_pregFlags);
                $out = \is_array($this->_current) && 1 < \count($this->_current);
                break;
            case self::REPLACE:
                $numberOfReplacement = 0;
                $result = \preg_replace($this->_regex, $this->replacement, $subject, -1, $numberOfReplacement);
                if (null === $result || 0 === $numberOfReplacement) {
                    $out = \false;
                    break;
                }
                if (0 !== $useKey) {
                    $this->_key = $result;
                    $out = \true;
                    break;
                }
                $this->_current = $result;
                $out = \true;
                break;
            default:
                $out = \false;
                break;
        }
        if (0 !== ($this->_flags & self::INVERT_MATCH)) {
            return \false === $out;
        }
        return $out;
    }
    /**
     * Get current key.
     *
     * @return  int
     */
    public function key()
    {
        return $this->_key;
    }
    /**
     * Get current value.
     *
     * @return  string
     */
    public function current()
    {
        return $this->_current;
    }
    /**
     * Set mode.
     *
     * @param   int  $mode   Mode.
     * @return  void
     */
    public function setMode($mode)
    {
        if ($mode < self::MATCH || $mode > self::REPLACE) {
            throw new \InvalidArgumentException('Illegal mode ' . $mode . '.');
        }
        $this->_mode = $mode;
        return;
    }
    /**
     * Set flags.
     *
     * @param   int  $flags    Flags.
     * @return  void
     */
    public function setFlags($flags)
    {
        $this->_flags = $flags;
        return;
    }
    /**
     * Set preg flags.
     *
     * @param   int  $pregFlags    Preg flags.
     * @return  void
     */
    public function setPregFlags($pregFlags)
    {
        $this->_pregFlags = $pregFlags;
        return;
    }
    /**
     * Get regular expression.
     *
     * @return  string
     */
    public function getRegex()
    {
        return $this->_regex;
    }
    /**
     * Get mode.
     *
     * @return  int
     */
    public function getMode()
    {
        return $this->_mode;
    }
    /**
     * Get flags.
     *
     * @return  int
     */
    public function getFlags()
    {
        return $this->_flags;
    }
    /**
     * Get preg flags.
     *
     * @return  int
     */
    public function getPregFlags()
    {
        return $this->_pregFlags;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator;

/**
 * Class \Hoa\Iterator\CallbackFilter.
 *
 * Extending the SPL CallbackFilterIterator class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class CallbackFilter extends \CallbackFilterIterator
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator;

/**
 * Class \Hoa\Iterator\Multiple.
 *
 * Extending the SPL MultipleIterator class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Multiple extends \MultipleIterator
{
    /**
     * Default value for each $infos.
     *
     * @var array
     */
    protected $_infos = [];
    /**
     * Attach iterator informations.
     * Add the $default argument that will be use when the iterator has reached
     * its end.
     *
     * @param   \Iterator  $iterator    Iterator.
     * @param   string     $infos       Informations to attach.
     * @param   mixed      $default     Default value.
     * @return  void
     */
    public function attachIterator(\Iterator $iterator, $infos = null, $default = null)
    {
        $out = parent::attachIterator($iterator, $infos);
        if (null === $infos) {
            $this->_infos[] = $default;
        } else {
            $this->_infos[$infos] = $default;
        }
        return $out;
    }
    /**
     * Get the registered iterator instances.
     *
     * @return  array
     */
    public function current()
    {
        $out = parent::current();
        foreach ($out as $key => &$value) {
            if (null === $value) {
                $value = $this->_infos[$key];
            }
        }
        return $out;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator\Recursive;

/**
 * Class \Hoa\Iterator\Recursive\Filter.
 *
 * Extending the SPL RecursiveFilterIterator class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
abstract class Filter extends \RecursiveFilterIterator
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator\Recursive;

/**
 * Class \Hoa\Iterator\Recursive\Map.
 *
 * Extending the SPL RecursiveArrayIterator class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Map extends \RecursiveArrayIterator
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator\Recursive;

/**
 * Class \Hoa\Iterator\Recursive\Directory.
 *
 * Extending the SPL RecursiveDirectoryIterator class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Directory extends \RecursiveDirectoryIterator
{
    /**
     * SplFileInfo classname.
     *
     * @var string
     */
    protected $_splFileInfoClass = null;
    /**
     * Relative path.
     *
     * @var string
     */
    protected $_relativePath = 0;
    /**
     * Workaround for the bug #65136.
     *
     * @var string
     */
    private static $_handlePath = null;
    /**
     * Constructor.
     * Please, see \RecursiveDirectoryIterator::__construct() method.
     * We add the $splFileInfoClass parameter.
     *
     * @param   string  $path                Path.
     * @param   int     $flags               Flags.
     * @param   string  $splFileInfoClass    SplFileInfo classname.
     */
    public function __construct($path, $flags = null, $splFileInfoClass = null)
    {
        if (null === $flags) {
            parent::__construct($path);
        } else {
            parent::__construct($path, $flags);
        }
        if (null !== self::$_handlePath) {
            $this->_relativePath = self::$_handlePath;
            self::$_handlePath = null;
        } else {
            $this->_relativePath = $path;
        }
        $this->setSplFileInfoClass($splFileInfoClass);
        return;
    }
    /**
     * Current.
     * Please, see \RecursiveDirectoryIterator::current() method.
     *
     * @return  mixed
     */
    public function current()
    {
        $out = parent::current();
        if (null !== $this->_splFileInfoClass && $out instanceof \SplFileInfo) {
            $out->setInfoClass($this->_splFileInfoClass);
            $out = $out->getFileInfo();
            if ($out instanceof \Hoa\Iterator\SplFileInfo) {
                $out->setRelativePath($this->getRelativePath());
            }
        }
        return $out;
    }
    /**
     * Get children.
     * Please, see \RecursiveDirectoryIterator::getChildren() method.
     *
     * @return  mixed
     */
    public function getChildren()
    {
        self::$_handlePath = $this->getRelativePath();
        $out = parent::getChildren();
        if ($out instanceof \RecursiveDirectoryIterator) {
            $out->setSplFileInfoClass($this->_splFileInfoClass);
        }
        return $out;
    }
    /**
     * Set SplFileInfo classname.
     *
     * @param   string  $splFileInfoClass    SplFileInfo classname.
     * @return  void
     */
    public function setSplFileInfoClass($splFileInfoClass)
    {
        $this->_splFileInfoClass = $splFileInfoClass;
        return;
    }
    /**
     * Get relative path (if given).
     *
     * @return  string
     */
    public function getRelativePath()
    {
        return $this->_relativePath;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator\Recursive;

/**
 * Class \Hoa\Iterator\Recursive\Mock.
 *
 * Mock a recursive iterator with no children.
 * It allows to use regular iterators with a recursive iterator iterator.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Mock implements \Hoa\Iterator\Recursive\Recursive
{
    /**
     * Current iterator.
     *
     * @var \Traversable
     */
    protected $_iterator = null;
    /**
     * Constructor.
     *
     * @param   \Traversable  $iterator    Iterator.
     */
    public function __construct(\Traversable $iterator)
    {
        if ($iterator instanceof \IteratorAggregate) {
            $iterator = $iterator->getIterator();
        }
        $this->_iterator = $iterator;
        return;
    }
    /**
     * Return the current element.
     *
     * @return  mixed
     */
    public function current()
    {
        return $this->_iterator->current();
    }
    /**
     * Return the key of the current element.
     *
     * @return  mixed
     */
    public function key()
    {
        return $this->_iterator->key();
    }
    /**
     * Move forward to next element.
     *
     * @return  void
     */
    public function next()
    {
        return $this->_iterator->next();
    }
    /**
     * Rewind the iterator to the first element.
     *
     * @return  void
     */
    public function rewind()
    {
        return $this->_iterator->rewind();
    }
    /**
     * Check if current position is valid.
     *
     * @return  bool
     */
    public function valid()
    {
        return $this->_iterator->valid();
    }
    /**
     * Return an iterator for the current entry.
     * It's a fake, we return null.
     *
     * @return  void
     */
    public function getChildren()
    {
        return null;
    }
    /**
     * Return if an iterator can be created for the current entry.
     * It's a fake, we return false.
     *
     * @return  bool
     */
    public function hasChildren()
    {
        return \false;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator\Recursive;

use Hoa\Consistency;
/**
 * Class \Hoa\Iterator\Recursive.
 *
 * Extending the SPL RecursiveIterator interface.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
interface Recursive extends \RecursiveIterator
{
}
/**
 * Flex entity.
 */
Consistency::flexEntity('Hoa\\Iterator\\Recursive\\Recursive');
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator\Recursive;

/**
 * Class \Hoa\Iterator\Recursive\Iterator.
 *
 * Extending the SPL RecursiveIteratorIterator class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Iterator extends \RecursiveIteratorIterator
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator\Recursive;

use Hoa\Iterator;
/**
 * Class \Hoa\Iterator\Recursive\RegularExpression.
 *
 * Re-implement the SPL RecursiveRegexIterator class.
 * There are too many bugs in php-src and HHVM, so we re-implement it from
 * scratch without extending the existing class.
 *
 * Inspired by hhvm://hphp/system/php/spl/iterators/RecursiveRegexIterator.php
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class RegularExpression extends Iterator\RegularExpression implements \Hoa\Iterator\Recursive\Recursive
{
    /**
     * Constructor.
     *
     * @param   \RecursiveIterator  $iterator     The recursive iterator to
     *                                            apply this regex filter to.
     * @param   string              $regex        The regular expression to
     *                                            match.
     * @param   int                 $mode         Operation mode, please see the
     *                                            \RegexIterator::setMode method.
     * @param   int                 $flags        Special flags, please see the
     *                                            \RegexIterator::setFlags method.
     * @param   int                 $pregFlags    Regular expression flags,
     *                                            please see
     *                                            \RegexIterator constants.
     */
    public function __construct(\RecursiveIterator $iterator, $regex, $mode = self::MATCH, $flags = 0, $pregFlags = 0)
    {
        parent::__construct($iterator, $regex, $mode, $flags, $pregFlags);
        return;
    }
    /**
     * Get accept status.
     *
     * @return  bool
     */
    public function accept()
    {
        return \true === $this->hasChildren() || \true === parent::accept();
    }
    /**
     * Get an iterator for the current entry.
     *
     * @return  \Hoa\Iterator\Recursive\RegularExpression
     */
    public function getChildren()
    {
        return new static(\true === $this->hasChildren() ? $this->getInnerIterator()->getChildren() : null, $this->getRegex(), $this->getMode(), $this->getFlags(), $this->getPregFlags());
    }
    /**
     * Check whether an iterator can be obtained for the current entry.
     *
     * @return  bool
     */
    public function hasChildren()
    {
        return $this->getInnerIterator()->hasChildren();
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator\Recursive;

/**
 * Class \Hoa\Iterator\Recursive\CallbackFilter.
 *
 * Extending the SPL RecursiveCallbackFilterIterator class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class CallbackFilter extends \RecursiveCallbackFilterIterator
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator;

/**
 * Class \Hoa\Iterator\Lookbehind.
 *
 * Look behind iterator.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Lookbehind extends \Hoa\Iterator\IteratorIterator implements \Hoa\Iterator\Outer
{
    /**
     * Current iterator.
     *
     * @var \Iterator
     */
    protected $_iterator = null;
    /**
     * Previous key.
     *
     * @var mixed
     */
    protected $_previousKey = -1;
    /**
     * Previous value.
     *
     * @var mixed
     */
    protected $_previousCurrent = null;
    /**
     * Construct.
     *
     * @param   \Iterator  $iterator    Iterator.
     */
    public function __construct(\Iterator $iterator)
    {
        $this->_iterator = $iterator;
        return;
    }
    /**
     * Get inner iterator.
     *
     * @return  \Iterator
     */
    public function getInnerIterator()
    {
        return $this->_iterator;
    }
    /**
     * Return the current element.
     *
     * @return  mixed
     */
    public function current()
    {
        return $this->getInnerIterator()->current();
    }
    /**
     * Return the key of the current element.
     *
     * @return  mixed
     */
    public function key()
    {
        return $this->getInnerIterator()->key();
    }
    /**
     * Move forward to next element.
     *
     * @return  void
     */
    public function next()
    {
        $this->_previousKey = $this->key();
        $this->_previousCurrent = $this->current();
        return $this->getInnerIterator()->next();
    }
    /**
     * Rewind the iterator to the first element.
     *
     * @return  void
     */
    public function rewind()
    {
        $this->_previousKey = -1;
        $this->_previousCurrent = null;
        return $this->getInnerIterator()->rewind();
    }
    /**
     * Check if current position is valid.
     *
     * @return  bool
     */
    public function valid()
    {
        return $this->getInnerIterator()->valid();
    }
    /**
     * Check whether there is a previous element.
     *
     * @return  bool
     */
    public function hasPrevious()
    {
        return -1 !== $this->_previousKey;
    }
    /**
     * Get previous value.
     *
     * @return  mixed
     */
    public function getPrevious()
    {
        return $this->_previousCurrent;
    }
    /**
     * Get previous key.
     *
     * @return  mixed
     */
    public function getPreviousKey()
    {
        return $this->_previousKey;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator;

/**
 * Class \Hoa\Iterator\IteratorIterator.
 *
 * Extending the SPL IteratorIterator class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class IteratorIterator extends \IteratorIterator
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator;

use Hoa\Exception as HoaException;
/**
 * Class \Hoa\Iterator\Exception.
 *
 * Extending the \Hoa\Exception\Exception class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Exception extends HoaException
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator;

/**
 * Class \Hoa\Iterator\Buffer.
 *
 * Buffer iterator: Can go backward up to a certain limit, and forward.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Buffer extends \Hoa\Iterator\IteratorIterator implements \Hoa\Iterator\Outer
{
    /**
     * Buffer key index.
     *
     * @const int
     */
    const BUFFER_KEY = 0;
    /**
     * Buffer value index.
     *
     * @const int
     */
    const BUFFER_VALUE = 1;
    /**
     * Current iterator.
     *
     * @var \Iterator
     */
    protected $_iterator = null;
    /**
     * Buffer.
     *
     * @var \SplDoublyLinkedList
     */
    protected $_buffer = null;
    /**
     * Maximum buffer size.
     *
     * @var int
     */
    protected $_bufferSize = 1;
    /**
     * Construct.
     *
     * @param   \Iterator  $iterator      Iterator.
     * @param   int        $bufferSize    Buffer size.
     */
    public function __construct(\Iterator $iterator, $bufferSize)
    {
        $this->_iterator = $iterator;
        $this->_bufferSize = \max($bufferSize, 1);
        $this->_buffer = new \SplDoublyLinkedList();
        return;
    }
    /**
     * Get inner iterator.
     *
     * @return  \Iterator
     */
    public function getInnerIterator() : ?\Iterator
    {
        return $this->_iterator;
    }
    /**
     * Get buffer.
     *
     * @return  \SplDoublyLinkedList
     */
    protected function getBuffer()
    {
        return $this->_buffer;
    }
    /**
     * Get buffer size.
     *
     * @return  int
     */
    public function getBufferSize()
    {
        return $this->_bufferSize;
    }
    /**
     * Return the current element.
     *
     * @return  mixed
     */
    #[\ReturnTypeWillChange]
    public function current()
    {
        return $this->getBuffer()->current()[self::BUFFER_VALUE];
    }
    /**
     * Return the key of the current element.
     *
     * @return  mixed
     */
    #[\ReturnTypeWillChange]
    public function key()
    {
        return $this->getBuffer()->current()[self::BUFFER_KEY];
    }
    /**
     * Move forward to next element.
     *
     * @return  void
     */
    public function next() : void
    {
        $innerIterator = $this->getInnerIterator();
        $buffer = $this->getBuffer();
        $buffer->next();
        // End of the buffer, need a new value.
        if (\false === $buffer->valid()) {
            for ($bufferSize = \count($buffer), $maximumBufferSize = $this->getBufferSize(); $bufferSize >= $maximumBufferSize; --$bufferSize) {
                $buffer->shift();
            }
            $innerIterator->next();
            $buffer->push([self::BUFFER_KEY => $innerIterator->key(), self::BUFFER_VALUE => $innerIterator->current()]);
            // Seek to the end of the buffer.
            $buffer->setIteratorMode($buffer::IT_MODE_LIFO | $buffer::IT_MODE_KEEP);
            $buffer->rewind();
            $buffer->setIteratorMode($buffer::IT_MODE_FIFO | $buffer::IT_MODE_KEEP);
        }
        return;
    }
    /**
     * Move backward to previous element.
     *
     * @return  void
     */
    public function previous()
    {
        $this->getBuffer()->prev();
        return;
    }
    /**
     * Rewind the iterator to the first element.
     *
     * @return  void
     */
    public function rewind() : void
    {
        $innerIterator = $this->getInnerIterator();
        $buffer = $this->getBuffer();
        $innerIterator->rewind();
        if (\true === $buffer->isEmpty()) {
            $buffer->push([self::BUFFER_KEY => $innerIterator->key(), self::BUFFER_VALUE => $innerIterator->current()]);
        }
        $buffer->rewind();
        return;
    }
    /**
     * Check if current position is valid.
     *
     * @return  bool
     */
    public function valid() : bool
    {
        return $this->getBuffer()->valid() && $this->getInnerIterator()->valid();
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator;

/**
 * Class \Hoa\Iterator\Repeater.
 *
 * Repeat an iterator n-times.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Repeater implements \Hoa\Iterator\Iterator
{
    /**
     * Current iterator.
     *
     * @var \Traversable
     */
    protected $_iterator = null;
    /**
     * Maximum repetition.
     *
     * @var int
     */
    protected $_n = 1;
    /**
     * Current repetition.
     *
     * @var int
     */
    protected $_i = 1;
    /**
     * Body (callable to execute each time).
     *
     * @var callable
     */
    protected $_body = null;
    /**
     * Constructor.
     *
     * @param   \Traversable  $iterator    Iterator.
     * @param   int           $n           Repeat $n-times.
     * @param   callable      $body        Body.
     * @throws  \Hoa\Iterator\Exception
     */
    public function __construct(\Traversable $iterator, $n, $body = null)
    {
        if (0 >= $n) {
            throw new \Hoa\Iterator\Exception('n must be greater than 0, given %d.', 0, $n);
        }
        if ($iterator instanceof \IteratorAggregate) {
            $iterator = $iterator->getIterator();
        }
        $this->_iterator = $iterator;
        $this->_n = $n;
        $this->_body = $body;
        return;
    }
    /**
     * Return the current element.
     *
     * @return  mixed
     */
    public function current()
    {
        return $this->_iterator->current();
    }
    /**
     * Return the key of the current element.
     *
     * @return  mixed
     */
    public function key()
    {
        return $this->_iterator->key();
    }
    /**
     * Move forward to next element.
     *
     * @return  void
     */
    public function next()
    {
        return $this->_iterator->next();
    }
    /**
     * Rewind the iterator to the first element.
     *
     * @return  void
     */
    public function rewind()
    {
        return $this->_iterator->rewind();
    }
    /**
     * Check if current position is valid.
     *
     * @return  bool
     */
    public function valid()
    {
        $valid = $this->_iterator->valid();
        if (\true === $valid) {
            return \true;
        }
        if (null !== $this->_body) {
            $handle =& $this->_body;
            $handle($this->_i);
        }
        $this->rewind();
        if ($this->_n <= $this->_i++) {
            $this->_i = 1;
            return \false;
        }
        return \true;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Iterator;

/**
 * Interface \Hoa\Iterator\Aggregate.
 *
 * Extending the SPL IteratorAggregate interface.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
interface Aggregate extends \IteratorAggregate
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Stream\Wrapper\IWrapper;

/**
 * Interface \Hoa\Stream\Wrapper\IWrapper\File.
 *
 * Interface for “file stream wrapper” class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
interface File
{
    /**
     * Close directory handle.
     * This method is called in to closedir().
     * Any resources which were locked, or allocated, during opening and use of
     * the directory stream should be released.
     *
     * @return  bool
     */
    public function dir_closedir();
    /**
     * Open directory handle.
     * This method is called in response to opendir().
     *
     * @param   string  $path       Specifies the URL that was passed to opendir().
     * @param   int     $options    Whether or not to enforce safe_mode (0x04).
     * @return  bool
     */
    public function dir_opendir($path, $options);
    /**
     * Read entry from directory handle.
     * This method is called in response to readdir().
     *
     * @return  mixed
     */
    public function dir_readdir();
    /**
     * Rewind directory handle.
     * This method is called in response to rewinddir().
     * Should reset the output generated by self::dir_readdir, i.e. the next
     * call to self::dir_readdir should return the first entry in the location
     * returned by self::dir_opendir.
     *
     * @return  bool
     */
    public function dir_rewinddir();
    /**
     * Create a directory.
     * This method is called in response to mkdir().
     *
     * @param   string  $path       Directory which should be created.
     * @param   int     $mode       The value passed to mkdir().
     * @param   int     $options    A bitwise mask of values.
     * @return  bool
     */
    public function mkdir($path, $mode, $options);
    /**
     * Rename a file or directory.
     * This method is called in response to rename().
     * Should attempt to rename $from to $to.
     *
     * @param   string  $from    The URL to current file.
     * @param   string  $to      The URL which $from should be renamed to.
     * @return  bool
     */
    public function rename($from, $to);
    /**
     * Remove a directory.
     * This method is called in response to rmdir().
     *
     * @param   string  $path       The directory URL which should be removed.
     * @param   int     $options    A bitwise mask of values.
     * @return  bool
     */
    public function rmdir($path, $options);
    /**
     * Delete a file.
     * This method is called in response to unlink().
     *
     * @param   string  $path    The file URL which should be deleted.
     * @return  bool
     */
    public function unlink($path);
    /**
     * Retrieve information about a file.
     * This method is called in response to all stat() related functions.
     *
     * @param   string  $path     The file URL which should be retrieve
     *                            information about.
     * @param   int     $flags    Holds additional flags set by the streams API.
     *                            It can hold one or more of the following
     *                            values OR'd together.
     *                            STREAM_URL_STAT_LINK: for resource with the
     *                            ability to link to other resource (such as an
     *                            HTTP location: forward, or a filesystem
     *                            symlink). This flag specified that only
     *                            information about the link itself should be
     *                            returned, not the resource pointed to by the
     *                            link. This flag is set in response to calls to
     *                            lstat(), is_link(), or filetype().
     *                            STREAM_URL_STAT_QUIET: if this flag is set,
     *                            our wrapper should not raise any errors. If
     *                            this flag is not set, we are responsible for
     *                            reporting errors using the trigger_error()
     *                            function during stating of the path.
     * @return  array
     */
    public function url_stat($path, $flags);
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Stream\Wrapper\IWrapper;

use Hoa\Consistency;
/**
 * Interface \Hoa\Stream\Wrapper\IWrapper.
 *
 * Interface for stream wrapper class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
interface IWrapper extends \Hoa\Stream\Wrapper\IWrapper\File, \Hoa\Stream\Wrapper\IWrapper\Stream
{
    /**
     * Constructs a new stream wrapper.
     * Called when opening the stream wrapper, right before self::stream_open().
     *
     */
    public function __construct();
}
/**
 * Flex entity.
 */
Consistency::flexEntity('Hoa\\Stream\\Wrapper\\IWrapper\\IWrapper');
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Stream\Wrapper\IWrapper;

/**
 * Interface \Hoa\Stream\Wrapper\IWrapper\Stream.
 *
 * Interface for “stream stream wrapper” class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license     New BSD License
 */
interface Stream
{
    /**
     * Retrieve the underlaying resource.
     *
     * @param   int     $castAs    Can be STREAM_CAST_FOR_SELECT when
     *                             stream_select() is calling stream_cast() or
     *                             STREAM_CAST_AS_STREAM when stream_cast() is
     *                             called for other uses.
     * @return  resource
     */
    public function stream_cast($castAs);
    /**
     * Close a resource.
     * This method is called in response to fclose().
     * All resources that were locked, or allocated, by the wrapper should be
     * released.
     *
     * @return  void
     */
    public function stream_close();
    /**
     * Tests for end-of-file on a file pointer.
     * This method is called in response to feof().
     *
     * @return  bool
     */
    public function stream_eof();
    /**
     * Flush the output.
     * This method is called in response to fflush().
     * If we have cached data in our stream but not yet stored it into the
     * underlying storage, we should do so now.
     *
     * @return  bool
     */
    public function stream_flush();
    /**
     * Advisory file locking.
     * This method is called in response to flock(), when file_put_contents()
     * (when flags contains LOCK_EX), stream_set_blocking() and when closing the
     * stream (LOCK_UN).
     *
     * @param   int     $operation    Operation is one the following:
     *                                  * LOCK_SH to acquire a shared lock (reader) ;
     *                                  * LOCK_EX to acquire an exclusive lock (writer) ;
     *                                  * LOCK_UN to release a lock (shared or exclusive) ;
     *                                  * LOCK_NB if we don't want flock() to
     *                                    block while locking (not supported on
     *                                    Windows).
     * @return  bool
     */
    public function stream_lock($operation);
    /**
     * Change stream options.
     * This method is called to set metadata on the stream. It is called when
     * one of the following functions is called one a stream URL: touch, chmod,
     * chown or chgrp.
     *
     * @param   string  $path      The file path or URL to set metadata.
     * @param   int     $option    One of the following:
     *                               * STREAM_META_TOUCH,
     *                               * STREAM_META_OWNER_NAME,
     *                               * STREAM_META_OWNER,
     *                               * STREAM_META_GROUP_NAME,
     *                               * STREAM_META_GROUP,
     *                               * STREAM_META_ACCESS.
     * @param   mixed   $value     An array or a scalar depending of the option.
     * @return  bool
     */
    public function stream_metadata($path, $option, $value);
    /**
     * Open file or URL.
     * This method is called immediately after the wrapper is initialized (f.e.
     * by fopen() and file_get_contents()).
     *
     * @param   string  $path           Specifies the URL that was passed to the
     *                                  original function.
     * @param   string  $mode           The mode used to open the file, as
     *                                  detailed for fopen().
     * @param   int     $options        Holds additional flags set by the
     *                                  streams API. It can hold one or more of
     *                                  the following values OR'd together:
     *                                    * STREAM_USE_PATH, if path is relative,
     *                                      search for the resource using the
     *                                      include_path;
     *                                    * STREAM_REPORT_ERRORS, if this is
     *                                    set, you are responsible for raising
     *                                    errors using trigger_error during
     *                                    opening the stream. If this is not
     *                                    set, you should not raise any errors.
     * @param   string  &$openedPath    If the $path is opened successfully, and
     *                                  STREAM_USE_PATH is set in $options,
     *                                  $openedPath should be set to the full
     *                                  path of the file/resource that was
     *                                  actually opened.
     * @return  bool
     */
    public function stream_open($path, $mode, $options, &$openedPath);
    /**
     * Read from stream.
     * This method is called in response to fread() and fgets().
     *
     * @param   int     $count    How many bytes of data from the current
     *                            position should be returned.
     * @return  string
     */
    public function stream_read($count);
    /**
     * Seek to specific location in a stream.
     * This method is called in response to fseek().
     * The read/write position of the stream should be updated according to the
     * $offset and $whence.
     *
     * @param   int     $offset    The stream offset to seek to.
     * @param   int     $whence    Possible values:
     *                               * SEEK_SET to set position equal to $offset
     *                                 bytes ;
     *                               * SEEK_CUR to set position to current
     *                                 location plus $offsete ;
     *                               * SEEK_END to set position to end-of-file
     *                                 plus $offset.
     * @return  bool
     */
    public function stream_seek($offset, $whence = \SEEK_SET);
    /**
     * Change stream options.
     * This method is called to set options on the stream.
     *
     * @param   int     $option    One of:
     *                               * STREAM_OPTION_BLOCKING, the method was
     *                                 called in response to
     *                                 stream_set_blocking() ;
     *                               * STREAM_OPTION_READ_TIMEOUT, the method
     *                                 was called in response to
     *                                 stream_set_timeout() ;
     *                               * STREAM_OPTION_WRITE_BUFFER, the method
     *                                 was called in response to
     *                                 stream_set_write_buffer().
     * @param   int     $arg1      If $option is:
     *                               * STREAM_OPTION_BLOCKING: requested blocking
     *                                 mode (1 meaning block, 0 not blocking) ;
     *                               * STREAM_OPTION_READ_TIMEOUT: the timeout
     *                                 in seconds ;
     *                               * STREAM_OPTION_WRITE_BUFFER: buffer mode
     *                                 (STREAM_BUFFER_NONE or
     *                                 STREAM_BUFFER_FULL).
     * @param   int     $arg2      If $option is:
     *                               * STREAM_OPTION_BLOCKING: this option is
     *                                 not set ;
     *                               * STREAM_OPTION_READ_TIMEOUT: the timeout
     *                                 in microseconds ;
     *                               * STREAM_OPTION_WRITE_BUFFER: the requested
     *                                 buffer size.
     * @return  bool
     */
    public function stream_set_option($option, $arg1, $arg2);
    /**
     * Retrieve information about a file resource.
     * This method is called in response to fstat().
     *
     * @return  array
     */
    public function stream_stat();
    /**
     * Retrieve the current position of a stream.
     * This method is called in response to ftell().
     *
     * @return  int
     */
    public function stream_tell();
    /**
     * Truncate a stream to a given length.
     *
     * @param   int     $size    Size.
     * @return  bool
     */
    public function stream_truncate($size);
    /**
     * Write to stream.
     * This method is called in response to fwrite().
     *
     * @param   string  $data    Should be stored into the underlying stream.
     * @return  int
     */
    public function stream_write($data);
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Stream\Wrapper;

use Hoa\Consistency;
/**
 * Class \Hoa\Stream\Wrapper.
 *
 * Manipulate wrappers.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Wrapper
{
    /**
     * Register a wrapper.
     *
     * @param   string  $protocol     The wrapper name to be registered.
     * @param   string  $className    Class name which implements the protocol.
     * @param   int     $flags        Should be set to `STREAM_IS_URL` if
     *                                `$protocol` is a URL protocol. Default is 0,
     *                                local stream.
     * @return  bool
     * @throws  \Hoa\Stream\Wrapper\Exception
     */
    public static function register($protocol, $className, $flags = 0)
    {
        if (\true === self::isRegistered($protocol)) {
            throw new \Hoa\Stream\Wrapper\Exception('The protocol %s is already registered.', 0, $protocol);
        }
        if (\false === \class_exists($className)) {
            throw new \Hoa\Stream\Wrapper\Exception('Cannot use the %s class for the implementation of ' . 'the %s protocol because it is not found.', 1, [$className, $protocol]);
        }
        return \stream_wrapper_register($protocol, $className, $flags);
    }
    /**
     * Unregister a wrapper.
     *
     * @param   string  $protocol    The wrapper name to be unregistered.
     * @return  bool
     */
    public static function unregister($protocol)
    {
        // Silent errors if `$protocol` does not exist. This function already
        // returns `false` in this case, which is the strict expected
        // behaviour.
        return @\stream_wrapper_unregister($protocol);
    }
    /**
     * Restore a previously unregistered build-in wrapper.
     *
     * @param   string  $protocol    The wrapper name to be restored.
     * @return  bool
     */
    public static function restore($protocol)
    {
        // Silent errors if `$protocol` does not exist. This function already
        // returns `false` in this case, which is the strict expected
        // behaviour.
        return @\stream_wrapper_restore($protocol);
    }
    /**
     * Check if a protocol is registered or not.
     *
     * @param   string  $protocol    Protocol name.
     * @return  bool
     */
    public static function isRegistered($protocol)
    {
        return \in_array($protocol, self::getRegistered());
    }
    /**
     * Get all registered wrapper.
     *
     * @return  array
     */
    public static function getRegistered()
    {
        return \stream_get_wrappers();
    }
}
/**
 * Flex entity.
 */
Consistency::flexEntity('Hoa\\Stream\\Wrapper\\Wrapper');
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Stream\Wrapper;

use Hoa\Stream;
/**
 * Class \Hoa\Stream\Wrapper\Exception.
 *
 * Extending the \Hoa\Stream\Exception class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Exception extends Stream\Exception
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Stream\IStream;

/**
 * Interface \Hoa\Stream\IStream\Bufferable.
 *
 * Interface for bufferable streams. It's complementary to native buffer support
 * of Hoa\Stream (please, see *StreamBuffer*() methods). Classes implementing
 * this interface are able to create nested buffers, flush them etc.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
interface Bufferable extends \Hoa\Stream\IStream\Stream
{
    /**
     * Start a new buffer.
     * The callable acts like a light filter.
     *
     * @param   mixed   $callable    Callable.
     * @param   int     $size        Size.
     * @return  int
     */
    public function newBuffer($callable = null, $size = null);
    /**
     * Flush the buffer.
     *
     * @return  void
     */
    public function flush();
    /**
     * Delete buffer.
     *
     * @return  bool
     */
    public function deleteBuffer();
    /**
     * Get bufffer level.
     *
     * @return  int
     */
    public function getBufferLevel();
    /**
     * Get buffer size.
     *
     * @return  int
     */
    public function getBufferSize();
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Stream\IStream;

/**
 * Interface \Hoa\Stream\IStream\Statable.
 *
 * Interface for statable input/output.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
interface Statable extends \Hoa\Stream\IStream\Stream
{
    /**
     * Size is undefined.
     *
     * @const int
     */
    const SIZE_UNDEFINED = -1;
    /**
     * Get size.
     *
     * @return  int
     */
    public function getSize();
    /**
     * Get informations about a file.
     *
     * @return  array
     */
    public function getStatistic();
    /**
     * Get last access time of file.
     *
     * @return  int
     */
    public function getATime();
    /**
     * Get inode change time of file.
     *
     * @return  int
     */
    public function getCTime();
    /**
     * Get file modification time.
     *
     * @return  int
     */
    public function getMTime();
    /**
     * Get file group.
     *
     * @return  int
     */
    public function getGroup();
    /**
     * Get file owner.
     *
     * @return  int
     */
    public function getOwner();
    /**
     * Get file permissions.
     *
     * @return  int
     */
    public function getPermissions();
    /**
     * Check if the file is readable.
     *
     * @return  bool
     */
    public function isReadable();
    /**
     * Check if the file is writable.
     *
     * @return  bool
     */
    public function isWritable();
    /**
     * Check if the file is executable.
     *
     * @return  bool
     */
    public function isExecutable();
    /**
     * Clear file status cache.
     *
     * @return  void
     */
    public function clearStatisticCache();
    /**
     * Clear all files status cache.
     *
     * @return  void
     */
    public static function clearAllStatisticCaches();
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Stream\IStream;

/**
 * Interface \Hoa\Stream\IStream\Touchable.
 *
 * Interface for touchable input/output.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
interface Touchable extends \Hoa\Stream\IStream\Stream
{
    /**
     * Overwrite file if already exists.
     *
     * @const bool
     */
    const OVERWRITE = \true;
    /**
     * Do not overwrite file if already exists.
     *
     * @const bool
     */
    const DO_NOT_OVERWRITE = \false;
    /**
     * Make directory if does not exist.
     *
     * @const bool
     */
    const MAKE_DIRECTORY = \true;
    /**
     * Do not make directory if does not exist.
     *
     * @const bool
     */
    const DO_NOT_MAKE_DIRECTORY = \false;
    /**
     * Set access and modification time of file.
     *
     * @param   int     $time     Time. If equals to -1, time() should be used.
     * @param   int     $atime    Access time. If equals to -1, $time should be
     *                            used.
     * @return  bool
     */
    public function touch($time = -1, $atime = -1);
    /**
     * Copy file.
     * Return the destination file path if succeed, false otherwise.
     *
     * @param   string  $to       Destination path.
     * @param   bool    $force    Force to copy if the file $to already exists.
     *                            Use the self::*OVERWRITE constants.
     * @return  bool
     */
    public function copy($to, $force = self::DO_NOT_OVERWRITE);
    /**
     * Move a file.
     *
     * @param   string  $name     New name.
     * @param   bool    $force    Force to move if the file $name already
     *                            exists.
     *                            Use the self::*OVERWRITE constants.
     * @param   bool    $mkdir    Force to make directory if does not exist.
     *                            Use the self::*DIRECTORY constants.
     * @return  bool
     */
    public function move($name, $force = self::DO_NOT_OVERWRITE, $mkdir = self::DO_NOT_MAKE_DIRECTORY);
    /**
     * Delete a file.
     *
     * @return  bool
     */
    public function delete();
    /**
     * Change file group.
     *
     * @param   mixed   $group    Group name or number.
     * @return  bool
     */
    public function changeGroup($group);
    /**
     * Change file mode.
     *
     * @param   int     $mode    Mode (in octal!).
     * @return  bool
     */
    public function changeMode($mode);
    /**
     * Change file owner.
     *
     * @param   mixed   $user    User.
     * @return  bool
     */
    public function changeOwner($user);
    /**
     * Change the current umask.
     *
     * @param   int     $umask    Umask (in octal!). If null, given the current
     *                            umask value.
     * @return  int
     */
    public static function umask($umask = null);
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Stream\IStream;

/**
 * Interface \Hoa\Stream\IStream\Stream.
 *
 * Interface for all streams.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
interface Stream
{
    /**
     * Get the current stream.
     *
     * @return  resource
     */
    public function getStream();
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Stream\IStream;

/**
 * Interface \Hoa\Stream\IStream\Pathable.
 *
 * Interface for pathable input/output.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
interface Pathable extends \Hoa\Stream\IStream\Stream
{
    /**
     * Get filename component of path.
     *
     * @return  string
     */
    public function getBasename();
    /**
     * Get directory name component of path.
     *
     * @return  string
     */
    public function getDirname();
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Stream\IStream;

/**
 * Interface \Hoa\Stream\IStream\Pointable.
 *
 * Interface for pointable input/output.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
interface Pointable extends \Hoa\Stream\IStream\Stream
{
    /**
     * Set position equal to $offset bytes.
     *
     * @const int
     */
    const SEEK_SET = \SEEK_SET;
    /**
     * Set position to current location plus $offset.
     *
     * @const int
     */
    const SEEK_CURRENT = \SEEK_CUR;
    /**
     * Set position to end-of-file plus $offset.
     *
     * @const int
     */
    const SEEK_END = \SEEK_END;
    /**
     * Rewind the position of a stream pointer.
     *
     * @return  bool
     */
    public function rewind();
    /**
     * Seek on a stream pointer.
     *
     * @param   int     $offset    Offset (negative value should be supported).
     * @param   int     $whence    Whence, use the self::SEEK_* constants.
     * @return  int
     */
    public function seek($offset, $whence = self::SEEK_SET);
    /**
     * Get the current position of the stream pointer.
     *
     * @return  int
     */
    public function tell();
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Stream\IStream;

/**
 * Interface \Hoa\Stream\IStream\Out.
 *
 * Interface for output.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
interface Out extends \Hoa\Stream\IStream\Stream
{
    /**
     * Write n characters.
     *
     * @param   string  $string    String.
     * @param   int     $length    Length.
     * @return  mixed
     */
    public function write($string, $length);
    /**
     * Write a string.
     *
     * @param   string  $string    String.
     * @return  mixed
     */
    public function writeString($string);
    /**
     * Write a character.
     *
     * @param   string  $character    Character.
     * @return  mixed
     */
    public function writeCharacter($character);
    /**
     * Write a boolean.
     *
     * @param   bool    $boolean    Boolean.
     * @return  mixed
     */
    public function writeBoolean($boolean);
    /**
     * Write an integer.
     *
     * @param   int     $integer    Integer.
     * @return  mixed
     */
    public function writeInteger($integer);
    /**
     * Write a float.
     *
     * @param   float   $float    Float.
     * @return  mixed
     */
    public function writeFloat($float);
    /**
     * Write an array.
     *
     * @param   array   $array    Array.
     * @return  mixed
     */
    public function writeArray(array $array);
    /**
     * Write a line.
     *
     * @param   string  $line    Line.
     * @return  mixed
     */
    public function writeLine($line);
    /**
     * Write all, i.e. as much as possible.
     *
     * @param   string  $string    String.
     * @return  mixed
     */
    public function writeAll($string);
    /**
     * Truncate a stream to a given length.
     *
     * @param   int     $size    Size.
     * @return  bool
     */
    public function truncate($size);
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Stream\IStream;

/**
 * Interface \Hoa\Stream\IStream\In.
 *
 * Interface for input.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
interface In extends \Hoa\Stream\IStream\Stream
{
    /**
     * Test for end-of-stream.
     *
     * @return  bool
     */
    public function eof();
    /**
     * Read n characters.
     *
     * @param   int     $length    Length.
     * @return  string
     */
    public function read($length);
    /**
     * Alias of $this->read().
     *
     * @param   int     $length    Length.
     * @return  string
     */
    public function readString($length);
    /**
     * Read a character.
     * It could be equivalent to $this->read(1).
     *
     * @return  string
     */
    public function readCharacter();
    /**
     * Read a boolean.
     *
     * @return  bool
     */
    public function readBoolean();
    /**
     * Read an integer.
     *
     * @param   int     $length    Length.
     * @return  int
     */
    public function readInteger($length = 1);
    /**
     * Read a float.
     *
     * @param   int     $length    Length.
     * @return  float
     */
    public function readFloat($length = 1);
    /**
     * Read an array.
     * In most cases, it could be an alias to the $this->scanf() method.
     *
     * @param   mixed   $argument    Argument (because the behavior is very
     *                               different according to the implementation).
     * @return  array
     */
    public function readArray($argument = null);
    /**
     * Read a line.
     *
     * @return  string
     */
    public function readLine();
    /**
     * Read all, i.e. read as much as possible.
     *
     * @param   int  $offset    Offset.
     * @return  string
     */
    public function readAll($offset = 0);
    /**
     * Parse input from a stream according to a format.
     *
     * @param   string  $format    Format (see printf's formats).
     * @return  array
     */
    public function scanf($format);
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Stream\IStream;

/**
 * Interface \Hoa\Stream\IStream\Structural.
 *
 * Interface for structural input/output.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
interface Structural extends \Hoa\Stream\IStream\Stream
{
    /**
     * Select root of the document: :root.
     *
     * @return  \Hoa\Stream\IStream\Structural
     */
    public function selectRoot();
    /**
     * Select any elements: *.
     *
     * @return  array
     */
    public function selectAnyElements();
    /**
     * Select elements of type E: E.
     *
     * @param   string  $E    Element E.
     * @return  array
     */
    public function selectElements($E = null);
    /**
     * Select F elements descendant of an E element: E F.
     *
     * @param   string  $F    Element F.
     * @return  array
     */
    public function selectDescendantElements($F = null);
    /**
     * Select F elements children of an E element: E > F.
     *
     * @param   string  $F    Element F.
     * @return  array
     */
    public function selectChildElements($F = null);
    /**
     * Select an F element immediately preceded by an E element: E + F.
     *
     * @param   string  $F    Element F.
     * @return  \Hoa\Stream\IStream\Structural
     */
    public function selectAdjacentSiblingElement($F);
    /**
     * Select F elements preceded by an E element: E ~ F.
     *
     * @param   string  $F    Element F.
     * @return  array
     */
    public function selectSiblingElements($F = null);
    /**
     * Execute a query selector and return the first result.
     *
     * @param   string  $query    Query.
     * @return  \Hoa\Stream\IStream\Structural
     */
    public function querySelector($query);
    /**
     * Execute a query selector and return one or many results.
     *
     * @param   string  $query    Query.
     * @return  array
     */
    public function querySelectorAll($query);
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Stream\IStream;

/**
 * Interface \Hoa\Stream\IStream\Lockable.
 *
 * Interface for lockable input/output.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
interface Lockable extends \Hoa\Stream\IStream\Stream
{
    /**
     * Acquire a shared lock (reader).
     *
     * @const int
     */
    const LOCK_SHARED = \LOCK_SH;
    /**
     * Acquire an exclusive lock (writer).
     *
     * @const int
     */
    const LOCK_EXCLUSIVE = \LOCK_EX;
    /**
     * Release a lock (shared or exclusive).
     *
     * @const int
     */
    const LOCK_RELEASE = \LOCK_UN;
    /**
     * If we do not want $this->lock() to block while locking.
     *
     * @const int
     */
    const LOCK_NO_BLOCK = \LOCK_NB;
    /**
     * Portable advisory locking.
     * Should take a look at stream_supports_lock().
     *
     * @param   int     $operation    Operation, use the self::LOCK_* constants.
     * @return  bool
     */
    public function lock($operation);
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Stream;

/**
 * Class \Hoa\Stream\Bucket.
 *
 * Manipulate stream buckets through brigades.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Bucket
{
    /**
     * Whether the stream is already a brigade.
     *
     * @const bool
     */
    const IS_A_BRIGADE = \true;
    /**
     * Whether the stream is not a brigade.
     *
     * @const bool
     */
    const IS_A_STREAM = \false;
    /**
     * Type of the bucket.
     *
     * @var bool
     */
    protected $_type = null;
    /**
     * Brigade.
     *
     * @var resource
     */
    protected $_brigade = null;
    /**
     * Bucket.
     *
     * @var resource
     */
    protected $_bucket = null;
    /**
     * Set a brigade.
     * If a stream is given (with the constant `self::IS_A_STREAM`), it will
     * create a brigade automatically.
     *
     * @param   resource  &$brigade    A stream or a brigade.
     * @param   bool      $is          Specify if `$brigade` is a stream or a
     *                                 brigade, given by `self::IS_A_*` constant.
     * @param   string    $buffer      Stream buffer.
     */
    public function __construct(&$brigade, $is = self::IS_A_BRIGADE, $buffer = '')
    {
        $this->setType($is);
        if (self::IS_A_BRIGADE === $this->getType()) {
            $this->setBrigade($brigade);
        } else {
            $this->setBucket(\stream_bucket_new($brigade, $buffer));
            $bucket = $this->getBucket();
            $this->setBrigade($bucket);
        }
        return;
    }
    /**
     * Test the end-of-bucket.
     * When testing, set the new bucket object.
     *
     * @return  bool
     */
    public function eob()
    {
        $this->_bucket = null;
        return \false == $this->getBucket();
    }
    /**
     * Append bucket to the brigade.
     *
     * @param   \Hoa\Stream\Bucket  $bucket    Bucket to add.
     * @return  void
     */
    public function append(\Hoa\Stream\Bucket $bucket)
    {
        \stream_bucket_append($this->getBrigade(), $bucket->getBucket());
        return;
    }
    /**
     * Prepend bucket to the brigade.
     *
     * @param   \Hoa\Stream\Bucket  $bucket    Bucket to add.
     * @return  void
     */
    public function prepend(\Hoa\Stream\Bucket $bucket)
    {
        \stream_bucket_prepend($this->getBrigade(), $bucket->getBucket());
        return;
    }
    /**
     * Set type.
     *
     * @param   bool  $type    Type. Please, see self::IS_A_* constants.
     * @return  bool
     */
    protected function setType($type)
    {
        $old = $this->_type;
        $this->_type = $type;
        return $old;
    }
    /**
     * Get type.
     *
     * @return  bool
     */
    public function getType()
    {
        return $this->_type;
    }
    /**
     * Set bucket data.
     *
     * @param   string  $data    Data to set.
     * @return  string
     */
    public function setData($data)
    {
        $old = $this->getBucket()->data;
        $this->getBucket()->data = $data;
        $this->getBucket()->datalen = \strlen($this->getBucket()->data);
        return $old;
    }
    /**
     * Get bucket data.
     *
     * @return  string
     */
    public function getData()
    {
        if (null === $this->getBucket()) {
            return null;
        }
        return $this->getBucket()->data;
    }
    /**
     * Get bucket length.
     *
     * @return  int
     */
    public function getLength()
    {
        if (null === $this->getBucket()) {
            return 0;
        }
        return $this->getBucket()->datalen;
    }
    /**
     * Set the brigade.
     *
     * @param   resource   &$brigade    Brigade to add.
     * @return  resource
     */
    protected function setBrigade(&$brigade)
    {
        $old = $this->_brigade;
        $this->_brigade = $brigade;
        return $old;
    }
    /**
     * Get the brigade.
     *
     * @return  resource
     */
    public function getBrigade()
    {
        return $this->_brigade;
    }
    /**
     * Set bucket.
     *
     * @param   resource  $bucket    Bucket.
     * @return  resource
     */
    protected function setBucket($bucket)
    {
        $old = $this->_bucket;
        $this->_bucket = $bucket;
        return $old;
    }
    /**
     * Get the current bucket.
     *
     * @return  mixed
     */
    protected function getBucket()
    {
        if (null === $this->_bucket && self::IS_A_BRIGADE === $this->getType()) {
            $this->_bucket = \stream_bucket_make_writeable($this->getBrigade());
        }
        return $this->_bucket;
    }
}
This file was automatically generated by Composer Patches (https://github.com/cweagans/composer-patches)
Patches applied to this directory:

0
Source: patches/Stream.patch


<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Stream;

use Hoa\Consistency;
use Hoa\Event;
use Hoa\Protocol;
/**
 * Class \Hoa\Stream.
 *
 * Static register for all streams (files, sockets etc.).
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
abstract class Stream implements \Hoa\Stream\IStream\Stream, Event\Listenable
{
    use Event\Listens;
    /**
     * Name index in the stream bucket.
     *
     * @const int
     */
    const NAME = 0;
    /**
     * Handler index in the stream bucket.
     *
     * @const int
     */
    const HANDLER = 1;
    /**
     * Resource index in the stream bucket.
     *
     * @const int
     */
    const RESOURCE = 2;
    /**
     * Context index in the stream bucket.
     *
     * @const int
     */
    const CONTEXT = 3;
    /**
     * Default buffer size.
     *
     * @const int
     */
    const DEFAULT_BUFFER_SIZE = 8192;
    /**
     * Current stream bucket.
     *
     * @var array
     */
    protected $_bucket = [];
    /**
     * Static stream register.
     *
     * @var array
     */
    private static $_register = [];
    /**
     * Buffer size (default is 8Ko).
     *
     * @var bool
     */
    protected $_bufferSize = self::DEFAULT_BUFFER_SIZE;
    /**
     * Original stream name, given to the stream constructor.
     *
     * @var string
     */
    protected $_streamName = null;
    /**
     * Context name.
     *
     * @var string
     */
    protected $_context = null;
    /**
     * Whether the opening has been deferred.
     *
     * @var bool
     */
    protected $_hasBeenDeferred = \false;
    /**
     * Whether this stream is already opened by another handler.
     *
     * @var bool
     */
    protected $_borrowing = \false;
    /**
     * Set the current stream.
     * If not exists in the register, try to call the
     * `$this->_open()` method. Please, see the `self::_getStream()` method.
     *
     * @param   string  $streamName    Stream name (e.g. path or URL).
     * @param   string  $context       Context ID (please, see the
     *                                 `Hoa\Stream\Context` class).
     * @param   bool    $wait          Differ opening or not.
     */
    public function __construct($streamName, $context = null, $wait = \false)
    {
        $this->_streamName = $streamName;
        $this->_context = $context;
        $this->_hasBeenDeferred = $wait;
        $this->setListener(new Event\Listener($this, ['authrequire', 'authresult', 'complete', 'connect', 'failure', 'mimetype', 'progress', 'redirect', 'resolve', 'size']));
        if (\true === $wait) {
            return;
        }
        $this->open();
        return;
    }
    /**
     * Get a stream in the register.
     * If the stream does not exist, try to open it by calling the
     * $handler->_open() method.
     *
     * @param   string       $streamName    Stream name.
     * @param   \Hoa\Stream  $handler       Stream handler.
     * @param   string       $context       Context ID (please, see the
     *                                      \Hoa\Stream\Context class).
     * @return  array
     * @throws  \Hoa\Stream\Exception
     */
    private static function &_getStream($streamName, \Hoa\Stream\Stream $handler, $context = null)
    {
        $name = \md5($streamName);
        if (null !== $context) {
            if (\false === \Hoa\Stream\Context::contextExists($context)) {
                throw new \Hoa\Stream\Exception('Context %s was not previously declared, cannot retrieve ' . 'this context.', 0, $context);
            }
            $context = \Hoa\Stream\Context::getInstance($context);
        }
        if (!isset(self::$_register[$name])) {
            self::$_register[$name] = [self::NAME => $streamName, self::HANDLER => $handler, self::RESOURCE => $handler->_open($streamName, $context), self::CONTEXT => $context];
            Event::register('hoa://Event/Stream/' . $streamName, $handler);
            // Add :open-ready?
            Event::register('hoa://Event/Stream/' . $streamName . ':close-before', $handler);
        } else {
            $handler->_borrowing = \true;
        }
        if (null === self::$_register[$name][self::RESOURCE]) {
            self::$_register[$name][self::RESOURCE] = $handler->_open($streamName, $context);
        }
        return self::$_register[$name];
    }
    /**
     * Open the stream and return the associated resource.
     * Note: This method is protected, but do not forget that it could be
     * overloaded into a public context.
     *
     * @param   string               $streamName    Stream name (e.g. path or URL).
     * @param   \Hoa\Stream\Context  $context       Context.
     * @return  resource
     * @throws  \Hoa\Exception\Exception
     */
    protected abstract function &_open($streamName, \Hoa\Stream\Context $context = null);
    /**
     * Close the current stream.
     * Note: this method is protected, but do not forget that it could be
     * overloaded into a public context.
     *
     * @return  bool
     */
    protected abstract function _close();
    /**
     * Open the stream.
     *
     * @return  \Hoa\Stream
     * @throws  \Hoa\Stream\Exception
     */
    public final function open()
    {
        $context = $this->_context;
        if (\true === $this->hasBeenDeferred()) {
            if (null === $context) {
                $handle = \Hoa\Stream\Context::getInstance(\uniqid());
                $handle->setParameters(['notification' => [$this, '_notify']]);
                $context = $handle->getId();
            } elseif (\true === \Hoa\Stream\Context::contextExists($context)) {
                $handle = \Hoa\Stream\Context::getInstance($context);
                $parameters = $handle->getParameters();
                if (!isset($parameters['notification'])) {
                    $handle->setParameters(['notification' => [$this, '_notify']]);
                }
            }
        }
        $this->_bufferSize = self::DEFAULT_BUFFER_SIZE;
        $this->_bucket = self::_getStream($this->_streamName, $this, $context);
        return $this;
    }
    /**
     * Close the current stream.
     *
     * @return  void
     */
    public final function close()
    {
        $streamName = $this->getStreamName();
        $name = \md5($streamName);
        if (!isset(self::$_register[$name])) {
            return;
        }
        Event::notify('hoa://Event/Stream/' . $streamName . ':close-before', $this, new Event\Bucket());
        if (\false === $this->_close()) {
            return;
        }
        unset(self::$_register[$name]);
        $this->_bucket[self::HANDLER] = null;
        Event::unregister('hoa://Event/Stream/' . $streamName);
        Event::unregister('hoa://Event/Stream/' . $streamName . ':close-before');
        return;
    }
    /**
     * Get the current stream name.
     *
     * @return  string
     */
    public function getStreamName()
    {
        if (empty($this->_bucket)) {
            return null;
        }
        return $this->_bucket[self::NAME];
    }
    /**
     * Get the current stream.
     *
     * @return  resource
     */
    public function getStream()
    {
        if (empty($this->_bucket)) {
            return null;
        }
        return $this->_bucket[self::RESOURCE];
    }
    /**
     * Get the current stream context.
     *
     * @return  \Hoa\Stream\Context
     */
    public function getStreamContext()
    {
        if (empty($this->_bucket)) {
            return null;
        }
        return $this->_bucket[self::CONTEXT];
    }
    /**
     * Get stream handler according to its name.
     *
     * @param   string  $streamName    Stream name.
     * @return  \Hoa\Stream
     */
    public static function getStreamHandler($streamName)
    {
        $name = \md5($streamName);
        if (!isset(self::$_register[$name])) {
            return null;
        }
        return self::$_register[$name][self::HANDLER];
    }
    /**
     * Set the current stream. Useful to manage a stack of streams (e.g. socket
     * and select). Notice that it could be unsafe to use this method without
     * taking time to think about it two minutes. Resource of type “Unknown” is
     * considered as valid.
     *
     * @return  resource
     * @throws  \Hoa\Stream\Exception
     */
    public function _setStream($stream)
    {
        if (\false === \is_resource($stream) && ('resource' !== \gettype($stream) || 'Unknown' !== \get_resource_type($stream))) {
            throw new \Hoa\Stream\Exception('Try to change the stream resource with an invalid one; ' . 'given %s.', 1, \gettype($stream));
        }
        $old = $this->_bucket[self::RESOURCE];
        $this->_bucket[self::RESOURCE] = $stream;
        return $old;
    }
    /**
     * Check if the stream is opened.
     *
     * @return  bool
     */
    public function isOpened()
    {
        return \is_resource($this->getStream());
    }
    /**
     * Set the timeout period.
     *
     * @param   int     $seconds         Timeout period in seconds.
     * @param   int     $microseconds    Timeout period in microseconds.
     * @return  bool
     */
    public function setStreamTimeout($seconds, $microseconds = 0)
    {
        return \stream_set_timeout($this->getStream(), $seconds, $microseconds);
    }
    /**
     * Whether the opening of the stream has been deferred
     */
    protected function hasBeenDeferred()
    {
        return $this->_hasBeenDeferred;
    }
    /**
     * Check whether the connection has timed out or not.
     * This is basically a shortcut of `getStreamMetaData` + the `timed_out`
     * index, but the resulting code is more readable.
     *
     * @return bool
     */
    public function hasTimedOut()
    {
        $metaData = $this->getStreamMetaData();
        return \true === $metaData['timed_out'];
    }
    /**
     * Set blocking/non-blocking mode.
     *
     * @param   bool    $mode    Blocking mode.
     * @return  bool
     */
    public function setStreamBlocking($mode)
    {
        return \stream_set_blocking($this->getStream(), (int) $mode);
    }
    /**
     * Set stream buffer.
     * Output using fwrite() (or similar function) is normally buffered at 8 Ko.
     * This means that if there are two processes wanting to write to the same
     * output stream, each is paused after 8 Ko of data to allow the other to
     * write.
     *
     * @param   int     $buffer    Number of bytes to buffer. If zero, write
     *                             operations are unbuffered. This ensures that
     *                             all writes are completed before other
     *                             processes are allowed to write to that output
     *                             stream.
     * @return  bool
     */
    public function setStreamBuffer($buffer)
    {
        // Zero means success.
        $out = 0 === \stream_set_write_buffer($this->getStream(), $buffer);
        if (\true === $out) {
            $this->_bufferSize = $buffer;
        }
        return $out;
    }
    /**
     * Disable stream buffering.
     * Alias of $this->setBuffer(0).
     *
     * @return  bool
     */
    public function disableStreamBuffer()
    {
        return $this->setStreamBuffer(0);
    }
    /**
     * Get stream buffer size.
     *
     * @return  int
     */
    public function getStreamBufferSize()
    {
        return $this->_bufferSize;
    }
    /**
     * Get stream wrapper name.
     *
     * @return  string
     */
    public function getStreamWrapperName()
    {
        if (\false === ($pos = \strpos($this->getStreamName(), '://'))) {
            return 'file';
        }
        return \substr($this->getStreamName(), 0, $pos);
    }
    /**
     * Get stream meta data.
     *
     * @return  array
     */
    public function getStreamMetaData()
    {
        return \stream_get_meta_data($this->getStream());
    }
    /**
     * Whether this stream is already opened by another handler.
     *
     * @return  bool
     */
    public function isBorrowing()
    {
        return $this->_borrowing;
    }
    /**
     * Notification callback.
     *
     * @param   int     $ncode          Notification code. Please, see
     *                                  STREAM_NOTIFY_* constants.
     * @param   int     $severity       Severity. Please, see
     *                                  STREAM_NOTIFY_SEVERITY_* constants.
     * @param   string  $message        Message.
     * @param   int     $code           Message code.
     * @param   int     $transferred    If applicable, the number of transferred
     *                                  bytes.
     * @param   int     $max            If applicable, the number of max bytes.
     * @return  void
     */
    public function _notify($ncode, $severity, $message, $code, $transferred, $max)
    {
        static $_map = [\STREAM_NOTIFY_AUTH_REQUIRED => 'authrequire', \STREAM_NOTIFY_AUTH_RESULT => 'authresult', \STREAM_NOTIFY_COMPLETED => 'complete', \STREAM_NOTIFY_CONNECT => 'connect', \STREAM_NOTIFY_FAILURE => 'failure', \STREAM_NOTIFY_MIME_TYPE_IS => 'mimetype', \STREAM_NOTIFY_PROGRESS => 'progress', \STREAM_NOTIFY_REDIRECTED => 'redirect', \STREAM_NOTIFY_RESOLVE => 'resolve', \STREAM_NOTIFY_FILE_SIZE_IS => 'size'];
        $this->getListener()->fire($_map[$ncode], new Event\Bucket(['code' => $code, 'severity' => $severity, 'message' => $message, 'transferred' => $transferred, 'max' => $max]));
        return;
    }
    /**
     * Call the $handler->close() method on each stream in the static stream
     * register.
     * This method does not check the return value of $handler->close(). Thus,
     * if a stream is persistent, the $handler->close() should do anything. It
     * is a very generic method.
     *
     * @return  void
     */
    public static final function _Hoa_Stream()
    {
        foreach (self::$_register as $entry) {
            $entry[self::HANDLER]->close();
        }
        return;
    }
    /**
     * Transform object to string.
     *
     * @return  string
     */
    public function __toString()
    {
        return $this->getStreamName();
    }
    /**
     * Close the stream when destructing.
     *
     * @return  void
     */
    public function __destruct()
    {
        if (\false === $this->isOpened()) {
            return;
        }
        $this->close();
        return;
    }
}
/**
 * Class \Hoa\Stream\_Protocol.
 *
 * The `hoa://Library/Stream` node.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class _Protocol extends Protocol\Node
{
    /**
     * Component's name.
     *
     * @var string
     */
    protected $_name = 'Stream';
    /**
     * ID of the component.
     *
     * @param   string  $id    ID of the component.
     * @return  mixed
     */
    public function reachId($id)
    {
        return \Hoa\Stream\Stream::getStreamHandler($id);
    }
}
/**
 * Flex entity.
 */
Consistency::flexEntity('Hoa\\Stream\\Stream');
/**
 * Add the `hoa://Library/Stream` node. Should be use to reach/get an entry
 * in the stream register.
 */
$protocol = Protocol::getInstance();
$protocol['Library'][] = new \Hoa\Stream\_Protocol();
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Stream;

/**
 * Class \Hoa\Stream\Composite.
 *
 * Declare a composite stream, i.e. a stream that uses a stream.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
abstract class Composite
{
    /**
     * Current stream.
     *
     * @var mixed
     */
    protected $_stream = null;
    /**
     * Inner stream.
     *
     * @var \Hoa\Stream
     */
    protected $_innerStream = null;
    /**
     * Set current stream.
     *
     * @param   object  $stream    Current stream.
     * @return  object
     */
    protected function setStream($stream)
    {
        $old = $this->_stream;
        $this->_stream = $stream;
        return $old;
    }
    /**
     * Get current stream.
     *
     * @return  object
     */
    public function getStream()
    {
        return $this->_stream;
    }
    /**
     * Set inner stream.
     *
     * @param   \Hoa\Stream  $innerStream    Inner stream.
     * @return  \Hoa\Stream
     */
    protected function setInnerStream(\Hoa\Stream\Stream $innerStream)
    {
        $old = $this->_innerStream;
        $this->_innerStream = $innerStream;
        return $old;
    }
    /**
     * Get inner stream.
     *
     * @return  \Hoa\Stream
     */
    public function getInnerStream()
    {
        return $this->_innerStream;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Stream\Filter;

use Hoa\Stream;
/**
 * Class \Hoa\Stream\Filter\LateComputed.
 *
 * A late computed filter computes the data when closing the filtering.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
abstract class LateComputed extends \Hoa\Stream\Filter\Basic
{
    /**
     * Buffer.
     *
     * @var string
     */
    protected $_buffer = null;
    /**
     * Filter data.
     * This method is called whenever data is read from or written to the attach
     * stream.
     *
     * @param   resource  $in           A resource pointing to a bucket brigade
     *                                  which contains one or more bucket
     *                                  objects containing data to be filtered.
     * @param   resource  $out          A resource pointing to a second bucket
     *                                  brigade into which your modified buckets
     *                                  should be replaced.
     * @param   int       &$consumed    Which must always be declared by
     *                                  reference, should be incremented by the
     *                                  length of the data which your filter
     *                                  reads in and alters.
     * @param   bool      $closing      If the stream is in the process of
     *                                  closing (and therefore this is the last
     *                                  pass through the filterchain), the
     *                                  closing parameter will be set to true.
     * @return  int
     */
    public function filter($in, $out, &$consumed, $closing)
    {
        $return = self::FEED_ME;
        $iBucket = new Stream\Bucket($in);
        while (\false === $iBucket->eob()) {
            $this->_buffer .= $iBucket->getData();
            $consumed += $iBucket->getLength();
        }
        if (null !== $consumed) {
            $return = self::PASS_ON;
        }
        if (\true === $closing) {
            $stream = $this->getStream();
            $this->compute();
            $bucket = new Stream\Bucket($stream, Stream\Bucket::IS_A_STREAM, $this->_buffer);
            $oBucket = new Stream\Bucket($out);
            $oBucket->append($bucket);
            $return = self::PASS_ON;
            $this->_buffer = null;
        }
        return $return;
    }
    /**
     * Compute the whole data (stored in $this->_buffer).
     *
     * @return  string
     */
    protected abstract function compute();
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Stream\Filter;

use Hoa\Consistency;
use Hoa\Stream;
/**
 * Class \Hoa\Stream\Filter.
 *
 * Proposes some methods to handle filter.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
abstract class Filter extends Stream
{
    /**
     * Overwrite filter if already exists.
     *
     * @const bool
     */
    const OVERWRITE = \true;
    /**
     * Do not overwrite filter if already exists.
     *
     * @const bool
     */
    const DO_NOT_OVERWRITE = \false;
    /**
     * Filter should only be applied when reading.
     *
     * @const int
     */
    const READ = \STREAM_FILTER_READ;
    /**
     * Filter should only be applied when writing.
     *
     * @const int
     */
    const WRITE = \STREAM_FILTER_WRITE;
    /**
     * Filter should be applied when reading and writing.
     *
     * @const int
     */
    const READ_AND_WRITE = \STREAM_FILTER_ALL;
    /**
     * All resources with at least one filter registered.
     *
     * @var array
     */
    protected static $_resources = [];
    /**
     * Register a stream filter.
     *
     * @param   string  $name         Filter name.
     * @param   mixed   $class        Class name or instance.
     * @param   bool    $overwrite    Overwrite filter if already exists or
     *                                not. Given by self::*OVERWRITE constants.
     * @return  bool
     * @throws  \Hoa\Stream\Filter\Exception
     */
    public static function register($name, $class, $overwrite = self::DO_NOT_OVERWRITE)
    {
        if ($overwrite === self::DO_NOT_OVERWRITE && \true === self::isRegistered($name)) {
            throw new \Hoa\Stream\Filter\Exception('Filter %s is already registered.', 0, $name);
        }
        if (\is_object($class)) {
            $class = \get_class($class);
        }
        if (empty($name)) {
            throw new \Hoa\Stream\Filter\Exception('Filter name cannot be empty (implementation class is %s).', 1, $class);
        }
        if (\false === \class_exists($class, \false)) {
            throw new \Hoa\Stream\Filter\Exception('Cannot register the %s class for the filter %s ' . 'because it does not exist.', 2, [$class, $name]);
        }
        return \stream_filter_register($name, $class);
    }
    /**
     * Append a filter to the list of filters.
     *
     * @param   mixed       $stream        Stream which received the filter.
     *                                     Should be resource or an object
     *                                     of kind `Hoa\Stream`.
     * @param   string      $name          Filter name.
     * @param   int         $mode          `self::READ`, `self::WRITE` or
     *                                     `self::READ_AND_WRITE`.
     * @param   mixed       $parameters    Parameters.
     * @return  resource
     */
    public static function append($stream, $name, $mode = self::READ, $parameters = null)
    {
        if ($stream instanceof Stream) {
            $stream = $stream->getStream();
        }
        if (null === $parameters) {
            return self::$_resources[$name] = \stream_filter_append($stream, $name, $mode);
        }
        return self::$_resources[$name] = \stream_filter_append($stream, $name, $mode, $parameters);
    }
    /**
     * Prepend a filter to the list of filters.
     *
     * @param   mixed       $stream        Stream which received the filter.
     *                                     Should be resource or an object
     *                                     \Hoa\Stream.
     * @param   string      $name          Filter name.
     * @param   int         $mode          self::READ, self::WRITE or
     *                                     self::READ_AND_WRITE.
     * @param   mixed       $parameters    Parameters.
     * @return  resource
     */
    public static function prepend($stream, $name, $mode = self::READ, $parameters = null)
    {
        if ($stream instanceof Stream) {
            $stream = $stream->getStream();
        }
        if (null === $parameters) {
            return self::$_resources[$name] = \stream_filter_prepend($stream, $name, $mode);
        }
        return self::$_resources[$name] = \stream_filter_prepend($stream, $name, $mode, $parameters);
    }
    /**
     * Delete a filter.
     *
     * @param   mixed   $streamFilter    Stream filter resource or name.
     * @return  bool
     * @throws  \Hoa\Stream\Filter\Exception
     */
    public static function remove($streamFilter)
    {
        if (!\is_resource($streamFilter)) {
            if (isset(self::$_resources[$streamFilter])) {
                $streamFilter = self::$_resources[$streamFilter];
            } else {
                throw new \Hoa\Stream\Filter\Exception('Cannot remove the stream filter %s because no resource was ' . 'found with this name.', 3, $streamFilter);
            }
        }
        return \stream_filter_remove($streamFilter);
    }
    /**
     * Check if a filter is already registered or not.
     *
     * @param   string  $name    Filter name.
     * @return  bool
     */
    public static function isRegistered($name)
    {
        return \in_array($name, self::getRegistered());
    }
    /**
     * Get all registered filer names.
     *
     * @return  array
     */
    public static function getRegistered()
    {
        return \stream_get_filters();
    }
}
/**
 * Flex entity.
 */
Consistency::flexEntity('Hoa\\Stream\\Filter\\Filter');
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Stream\Filter;

use Hoa\Stream;
/**
 * Class \Hoa\Stream\Filter\Basic.
 *
 * Basic filter. Force to implement some methods.
 * Actually, it extends the php_user_filter class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
abstract class Basic extends \php_user_filter implements Stream\IStream\Stream
{
    /**
     * Filter processed successfully with data available in the out bucket
     * brigade.
     *
     * @const int
     */
    const PASS_ON = \PSFS_PASS_ON;
    /**
     * Filter processed successfully, however no data was available to return.
     * More data is required from the stream or prior filter.
     *
     * @const int
     */
    const FEED_ME = \PSFS_FEED_ME;
    /**
     * The filter experienced and unrecoverable error and cannot continue.
     *
     * @const int
     */
    const FATAL_ERROR = \PSFS_ERR_FATAL;
    /**
     * Regular read/write.
     *
     * @const int
     */
    const FLAG_NORMAL = \PSFS_FLAG_NORMAL;
    /**
     * An incremental flush.
     *
     * @const int
     */
    const FLAG_FLUSH_INC = \PSFS_FLAG_FLUSH_INC;
    /**
     * Final flush prior to closing.
     *
     * @const int
     */
    const FLAG_FLUSH_CLOSE = \PSFS_FLAG_FLUSH_CLOSE;
    /**
     * Filter data.
     * This method is called whenever data is read from or written to the attach
     * stream.
     *
     * @param   resource  $in           A resource pointing to a bucket brigade
     *                                  which contains one or more bucket
     *                                  objects containing data to be filtered.
     * @param   resource  $out          A resource pointing to a second bucket
     *                                  brigade into which your modified buckets
     *                                  should be replaced.
     * @param   int       &$consumed    Which must always be declared by
     *                                  reference, should be incremented by the
     *                                  length of the data which your filter
     *                                  reads in and alters.
     * @param   bool      $closing      If the stream is in the process of
     *                                  closing (and therefore this is the last
     *                                  pass through the filterchain), the
     *                                  closing parameter will be set to true.
     * @return  int
     */
    public function filter($in, $out, &$consumed, $closing)
    {
        $iBucket = new Stream\Bucket($in);
        $oBucket = new Stream\Bucket($out);
        while (\false === $iBucket->eob()) {
            $consumed += $iBucket->getLength();
            $oBucket->append($iBucket);
        }
        unset($iBucket);
        unset($oBucket);
        return self::PASS_ON;
    }
    /**
     * Called during instanciation of the filter class object.
     *
     * @return  bool
     */
    public function onCreate()
    {
        return \true;
    }
    /**
     * Called upon filter shutdown (typically, this is also during stream
     * shutdown), and is executed after the flush method is called.
     *
     * @return  void
     */
    public function onClose()
    {
        return;
    }
    /**
     * Set the filter name.
     *
     * @param   string  $name    Filter name.
     * @return  string
     */
    public function setName($name)
    {
        $old = $this->filtername;
        $this->filtername = $name;
        return $old;
    }
    /**
     * Set the filter parameters.
     *
     * @param   mixed   $parameters    Filter parameters.
     * @return  mixed
     */
    public function setParameters($parameters)
    {
        $old = $this->params;
        $this->params = $parameters;
        return $old;
    }
    /**
     * Get the filter name.
     *
     * @return  string
     */
    public function getName()
    {
        return $this->filtername;
    }
    /**
     * Get the filter parameters.
     *
     * @return  mixed
     */
    public function getParameters()
    {
        return $this->params;
    }
    /**
     * Get the stream resource being filtered.
     * Maybe available only during **filter** calls when the closing parameter
     * is set to false.
     *
     * @return  resource
     */
    public function getStream()
    {
        return isset($this->stream) ? $this->stream : null;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Stream\Filter;

use Hoa\Stream;
/**
 * Class \Hoa\Stream\Filter\Exception.
 *
 * Extending the \Hoa\Stream\Exception class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Exception extends Stream\Exception
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Stream;

/**
 * Class \Hoa\Stream\Context.
 *
 * Make a multiton of stream contexts.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Context
{
    /**
     * Context ID.
     *
     * @var string
     */
    protected $_id = null;
    /**
     * Multiton.
     *
     * @var array
     */
    protected static $_instances = [];
    /**
     * Construct a context.
     *
     */
    protected function __construct($id)
    {
        $this->_id = $id;
        $this->_context = \stream_context_create();
        return;
    }
    /**
     * Multiton.
     *
     * @param   string  $id    ID.
     * @return  \Hoa\Stream\Context
     * @throws  \Hoa\Stream\Exception
     */
    public static function getInstance($id)
    {
        if (empty($id)) {
            throw new \Hoa\Stream\Exception('Context ID must not be null.', 0);
        }
        if (\false === static::contextExists($id)) {
            static::$_instances[$id] = new static($id);
        }
        return static::$_instances[$id];
    }
    /**
     * Get context ID.
     *
     * @return  string
     */
    public function getId()
    {
        return $this->_id;
    }
    /**
     * Check if a context exists.
     *
     * @param   string  $id    ID.
     * @return  bool
     */
    public static function contextExists($id)
    {
        return \array_key_exists($id, static::$_instances);
    }
    /**
     * Set options.
     * Please, see http://php.net/context.
     *
     * @param   array   $options    Options.
     * @return  bool
     */
    public function setOptions(array $options)
    {
        return \stream_context_set_option($this->getContext(), $options);
    }
    /**
     * Set parameters.
     * Please, see http://php.net/context.params.
     *
     * @param   array   $parameters    Parameters.
     * @return  bool
     */
    public function setParameters(array $parameters)
    {
        return \stream_context_set_params($this->getContext(), $parameters);
    }
    /**
     * Get options.
     *
     * @return  array
     */
    public function getOptions()
    {
        return \stream_context_get_options($this->getContext());
    }
    /**
     * Get parameters.
     * .
     * @return  array
     */
    public function getParameters()
    {
        return \stream_context_get_params($this->getContext());
    }
    /**
     * Get context as a resource.
     *
     * @return  resource
     */
    public function getContext()
    {
        return $this->_context;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Stream;

use Hoa\Exception as HoaException;
/**
 * Class \Hoa\Stream\Exception.
 *
 * Extending the \Hoa\Exception\Exception class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Exception extends HoaException
{
}
//
// Hoa
//
//
// @license
//
// New BSD License
//
// Copyright © 2007-2016, Hoa community. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//     * Redistributions of source code must retain the above copyright
//       notice, this list of conditions and the following disclaimer.
//     * Redistributions in binary form must reproduce the above copyright
//       notice, this list of conditions and the following disclaimer in the
//       documentation and/or other materials provided with the distribution.
//     * Neither the name of the Hoa nor the names of its contributors may be
//       used to endorse or promote products derived from this software without
//       specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// Grammar \Hoa\Math\Arithmetic.
//
// Provide a grammar for arithmetic expressions.
//
// @copyright  Copyright © 2007-2016 Hoa community.
// @license    New BSD License
//


%skip   space     [\x20\x09]+
%token  bracket_  \(
%token _bracket   \)
%token  comma     ,
%token  number    (0|[1-9]\d*)(\.\d+)?([eE][\+\-]?\d+)?
%token  plus      \+
%token  minus     \-|−
%token  times     \*|×
%token  div       /|÷
%token  constant  [A-Z_]+[A-Z0-9_]*
%token  id        \w+

expression:
    primary() ( ::plus:: #addition expression() )?

primary:
    secondary() ( ::minus:: #substraction expression() )?

secondary:
    ternary() ( ::times:: #multiplication expression() )?

ternary:
    term() ( ::div:: #division expression() )?

term:
    ( ::bracket_:: expression() ::_bracket:: #group )
  | number()
  | constant()
  | variable()
  | ( ::minus:: #negative | ::plus:: ) term()
  | function()

number:
    <number>

constant:
    <constant>

#variable:
    <id>

#function:
    <id> ::bracket_::
    ( expression() ( ::comma:: expression() )* )?
    ::_bracket::
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Math;

/**
 * Class \Hoa\Math\Util.
 *
 * Some Math functions.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Util
{
    /**
     * @description 'Kronecker delta: δ_i^j = 1 if i = j, 0 if i ≠ j';
     * @requires    i: integer() and
     *              j: integer();
     * @ensures     \pred('\\result === (int) ($i === $j)');
     */
    public static function δ($i, $j)
    {
        return (int) ($i === $j);
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Math\Sampler;

/**
 * Class \Hoa\Math\Sampler\Random.
 *
 * Random sampler.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Random extends \Hoa\Math\Sampler\Sampler
{
    /**
     * Construct.
     *
     * @return  void
     */
    public function construct()
    {
        if (null === $this->_parameters->getParameter('integer.min')) {
            $this->_parameters->setParameter('integer.min', \max(-\mt_getrandmax(), $this->_parameters->getParameter('integer.min')));
        }
        if (null === $this->_parameters->getParameter('integer.max')) {
            $this->_parameters->setParameter('integer.max', \min(\mt_getrandmax(), $this->_parameters->getParameter('integer.max')));
        }
        return;
    }
    /**
     * Generate a discrete uniform distribution.
     *
     * @param   int  $lower    Lower bound value.
     * @param   int  $upper    Upper bound value.
     * @return  int
     */
    protected function _getInteger($lower, $upper)
    {
        return \mt_rand($lower, $upper);
    }
    /**
     * Generate a continuous uniform distribution.
     *
     * @param   float      $lower    Lower bound value.
     * @param   float      $upper    Upper bound value.
     * @return  float
     */
    protected function _getFloat($lower, $upper)
    {
        return $lower + \lcg_value() * \abs($upper - $lower);
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Math\Sampler;

use Hoa\Consistency;
use Hoa\Math;
use Hoa\Zformat;
/**
 * Class \Hoa\Math\Sampler.
 *
 * Generic sampler.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
abstract class Sampler implements Zformat\Parameterizable
{
    /**
     * Parameters.
     *
     * @var \Hoa\Zformat\Parameter
     */
    protected $_parameters = null;
    /**
     * Construct an abstract sampler.
     *
     * @param   array  $parameters    Parameters.
     */
    public function __construct(array $parameters = [])
    {
        $this->_parameters = new Zformat\Parameter(__CLASS__, [], ['integer.min' => -16, 'integer.max' => 15, 'float.min' => -128.0, 'float.max' => 127.0]);
        $this->_parameters->setParameters($parameters);
        if (null === $this->_parameters->getParameter('integer.min')) {
            $this->_parameters->setParameter('integer.min', \PHP_INT_MIN);
        }
        if (null === $this->_parameters->getParameter('integer.max')) {
            $this->_parameters->setParameter('integer.max', \PHP_INT_MAX);
        }
        if (null === $this->_parameters->getParameter('float.min')) {
            $this->_parameters->setParameter('float.min', \PHP_INT_MIN);
        }
        if (null === $this->_parameters->getParameter('float.max')) {
            $this->_parameters->setParameter('float.max', \PHP_INT_MAX);
        }
        $this->construct();
        return;
    }
    /**
     * Construct.
     *
     * @return  void
     */
    public function construct()
    {
        return;
    }
    /**
     * Get parameters.
     *
     * @return  \Hoa\Zformat\Parameter
     */
    public function getParameters()
    {
        return $this->_parameters;
    }
    /**
     * Generate a discrete uniform distribution.
     *
     * @param   int    $lower       Lower bound value.
     * @param   int    $upper       Upper bound value.
     * @param   array  &$exclude    Excluded values.
     * @return  int
     */
    public function getInteger($lower = null, $upper = null, array &$exclude = null)
    {
        if (null === $lower) {
            $lower = $this->_parameters->getParameter('integer.min');
        }
        if (null === $upper) {
            $upper = $this->_parameters->getParameter('integer.max');
        }
        if (null === $exclude) {
            if ($lower > $upper) {
                throw new Math\Exception('Unexpected values, integer %d should be lower than %d', 0, [$lower, $upper]);
            }
            return $this->_getInteger($lower, $upper);
        }
        \sort($exclude);
        $upper -= \count($exclude);
        if ($lower > $upper) {
            throw new Math\Exception('Unexpected values, integer %d should be lower than %d', 1, [$lower, $upper]);
        }
        $sampled = $this->_getInteger($lower, $upper);
        foreach ($exclude as $e) {
            if ($sampled >= $e) {
                ++$sampled;
            } else {
                break;
            }
        }
        return $sampled;
    }
    /**
     * Generate a discrete uniform distribution.
     *
     * @param   int  $lower    Lower bound value.
     * @param   int  $upper    Upper bound value.
     * @return  int
     */
    protected abstract function _getInteger($lower, $upper);
    /**
     * Generate a continuous uniform distribution.
     *
     * @param   float   $lower    Lower bound value.
     * @param   float   $upper    Upper bound value.
     * @return  float
     */
    public function getFloat($lower = null, $upper = null)
    {
        if (null === $lower) {
            $lower = $this->_parameters->getParameter('float.min');
        }
        /*
        $lower = true === S_32\BITS
                     ? -3.4028235e38 + 1
                     : -1.7976931348623157e308 + 1;
        */
        if (null === $upper) {
            $upper = $this->_parameters->getParameter('float.max');
        }
        /*
        $upper = true === S_32\BITS
                     ? 3.4028235e38 - 1
                     : 1.7976931348623157e308 - 1;
        */
        if ($lower > $upper) {
            throw new Math\Exception('Unexpected values, float %f should be lower than %f', 2, [$lower, $upper]);
        }
        return $this->_getFloat($lower, $upper);
    }
    /**
     * Generate a continuous uniform distribution.
     *
     * @param   float      $lower    Lower bound value.
     * @param   float      $upper    Upper bound value.
     * @return  float
     */
    protected abstract function _getFloat($lower, $upper);
    /**
     * Get an exclude set.
     *
     * @return  array
     */
    public function getExcludeSet()
    {
        return [];
    }
}
/**
 * Flex entity.
 */
Consistency::flexEntity('Hoa\\Math\\Sampler\\Sampler');
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Math\Exception;

/**
 * Class \Hoa\Math\Exception\UnknownConstant.
 *
 * Extending the \Hoa\Math\Exception class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class AlreadyDefinedConstant extends \Hoa\Math\Exception\Exception
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Math\Exception;

/**
 * Class \Hoa\Math\Exception\UnknownConstant.
 *
 * Extending the \Hoa\Math\Exception class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class UnknownConstant extends \Hoa\Math\Exception\Exception
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Math\Exception;

/**
 * Class \Hoa\Math\Exception\UnknownFunction.
 *
 * Extending the \Hoa\Math\Exception class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class UnknownFunction extends \Hoa\Math\Exception\Exception
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Math\Exception;

/**
 * Class \Hoa\Math\Exception\UnknownVariable.
 *
 * Extending the \Hoa\Math\Exception class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class UnknownVariable extends \Hoa\Math\Exception\Exception
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Math\Exception;

use Hoa\Consistency;
use Hoa\Exception as HoaException;
/**
 * Class \Hoa\Math\Exception.
 *
 * Extending the \Hoa\Exception\Exception class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Exception extends HoaException
{
}
/**
 * Flex entity.
 */
Consistency::flexEntity('Hoa\\Math\\Exception\\Exception');
<?php


<?php


<?php


<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Math\Combinatorics\Combination;

use Hoa\Iterator;
/**
 * Class \Hoa\Math\Combinatorics\Combination\CartesianProduct.
 *
 * Cartesian n-ary product iterator:
 *     X = {1, 2}
 *     Y = {a, b}
 *     Z = {A, B, C}
 *     X × Y × Z = { (1, a, A), (2, a, A), (1, b, A), (2, b, A)
 *                   (1, a, B), (2, a, B), (1, b, B), (2, b, B)
 *                   (1, a, C), (2, a, C), (1, b, C), (2, b, C) }
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class CartesianProduct implements Iterator
{
    /**
     * All sets.
     *
     * @var array
     */
    protected $_sets = [];
    /**
     * Number of sets.
     *
     * @var int
     */
    protected $_max = 0;
    /**
     * Key.
     *
     * @var int
     */
    protected $_key = 0;
    /**
     * Current (contains the current t-uple).
     *
     * @var array
     */
    protected $_current = null;
    /**
     * Whether the iterator has reached the end or not.
     *
     * @var bool
     */
    protected $_break = \true;
    /**
     * Constructor.
     *
     * @param   \Traversable  $set    Set.
     * @param   …             …       …
     */
    public function __construct($set)
    {
        foreach (\func_get_args() as $s) {
            if (\is_array($s)) {
                $s = new Iterator\Map($s);
            } else {
                $s = new Iterator\IteratorIterator($s);
            }
            $this->_sets[] = $s;
        }
        $this->_max = \count($this->_sets) - 1;
        $this->_break = empty($this->_sets);
        return;
    }
    /**
     * Get the current value.
     *
     * @return  array
     */
    public function current()
    {
        return $this->_current;
    }
    /**
     * Prepare the current value.
     *
     * @return  void
     */
    protected function _current()
    {
        $this->_current = [];
        foreach ($this->_sets as $set) {
            $this->_current[] = $set->current();
        }
        return;
    }
    /**
     * Get the current key.
     *
     * @return  int
     */
    public function key()
    {
        return $this->_key;
    }
    /**
     * Advance the internal collection pointer, and return the current value.
     *
     * @return  array
     */
    public function next()
    {
        for ($i = 0; $i <= $this->_max; ++$i) {
            $this->_sets[$i]->next();
            if (\false !== $this->_sets[$i]->valid()) {
                break;
            }
            $this->_sets[$i]->rewind();
            if ($i === $this->_max) {
                $this->_break = \true;
                break;
            }
        }
        ++$this->_key;
        $this->_current();
        return $this->current();
    }
    /**
     * Rewind the internal collection pointer, and return the first collection.
     *
     * @return  array
     */
    public function rewind()
    {
        $this->_break = empty($this->_sets);
        $this->_key = 0;
        foreach ($this->_sets as $set) {
            $set->rewind();
        }
        $this->_current();
        return $this->current();
    }
    /**
     * Check if there is a current element after calls to the rewind() or the
     * next() methods.
     *
     * @return  bool
     */
    public function valid()
    {
        return \false === $this->_break;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Math\Combinatorics\Combination;

use Hoa\Iterator;
/**
 * Class \Hoa\Math\Combinatorics\Combination\Gamma.
 *
 * Gamma^n_k denotes the set of k-uples whose sum of elements is n. For example:
 * Gamma^2_3 = {(2, 0, 0), (1, 1, 0), (1, 0, 1), (0, 2, 0), (0, 1, 1), (0, 0, 2)}.
 * For any k-uple γ and any α in {1, …, k}, γ_α denotes the α-th element of γ.
 * This class is identical to \Hoa\Math\Combinatorics\Combination::Gamma with a
 * “yield” keyword.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Gamma implements Iterator
{
    /**
     * n.
     *
     * @var int
     */
    protected $_n = 0;
    /**
     * k.
     *
     * @var int
     */
    protected $_k = 0;
    /**
     * For iterator.
     *
     * @var int
     */
    protected $_current = null;
    /**
     * For iterator.
     *
     * @var int
     */
    protected $_key = -1;
    /**
     * For iterator.
     *
     * @var array
     */
    protected $_tmp = null;
    /**
     * For iterator.
     *
     * @var int
     */
    protected $_i = 0;
    /**
     * For iterator.
     *
     * @var int
     */
    protected $_o = 0;
    /**
     * For iterator.
     *
     *
     * @var bool
     */
    protected $_last = \false;
    /**
     * Constructor.
     *
     * @param   int  $n    n.
     * @param   int  $k    k.
     */
    public function __construct($n, $k)
    {
        $this->_n = $n;
        $this->_k = $k;
        return;
    }
    /**
     * Get current γ.
     *
     * @return  array
     */
    public function current()
    {
        return $this->_current;
    }
    /**
     * Get current α.
     *
     * @return  int
     */
    public function key()
    {
        return $this->_key;
    }
    /**
     * Compute γ_{α + 1}.
     *
     * @return  void
     */
    public function next()
    {
        return;
    }
    /**
     * Rewind iterator.
     *
     * @return  void
     */
    public function rewind()
    {
        $this->_current = [];
        $this->_tmp = null;
        $this->_i = 0;
        $this->_o = 0 === $this->_n ? [0] : \array_fill(0, $this->_n, 0);
        $this->_o[0] = $this->_k;
        $this->_last = \false;
        return;
    }
    /**
     * Compute γ_α.
     *
     * @return  bool
     */
    public function valid()
    {
        if (\true === $this->_last) {
            return \false;
        }
        if (0 === $this->_n) {
            return \false;
        }
        if ($this->_k == $this->_o[$this->_i = $this->_n - 1]) {
            $this->_last = \true;
            $this->_current = $this->_o;
            ++$this->_key;
            return \true;
        }
        $this->_current = $this->_o;
        ++$this->_key;
        $this->_tmp = $this->_o[$this->_i];
        $this->_o[$this->_i] = 0;
        while ($this->_o[$this->_i] == 0) {
            --$this->_i;
        }
        --$this->_o[$this->_i];
        $this->_o[$this->_i + 1] = $this->_tmp + 1;
        return \true;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Math\Combinatorics\Combination;

use Hoa\Consistency;
/**
 * Class \Hoa\Math\Combinatorics\Combination.
 *
 * Some functions related to combinatorics.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Combination
{
    /**
     * Γ^n_k denotes the set of k-uples whose sum of elements is n. For example:
     * Γ^3_2 = {(2, 0, 0), (1, 1, 0), (1, 0, 1), (0, 2, 0), (0, 1, 1), (0, 0,
     * 2)}. For any k-uple γ and any α in {1, …, k}, γ_α denotes the α-th
     * element of γ.
     *
     * @param   int   $n              n.
     * @param   int   $k              k.
     * @param   bool  $withoutZero    Do not produce solutions with a zero
     *                                inside.
     * @return  array
     */
    public static function Γ($n, $k, $withoutZero = \false)
    {
        if (0 === $n) {
            return [];
        }
        $out = [];
        $tmp = null;
        $i = 0;
        $o = \array_fill(0, $n, 0);
        $o[0] = $k;
        while ($k != $o[$i = $n - 1]) {
            if (\false === $withoutZero || !\in_array(0, $o)) {
                $out[] = $o;
            }
            $tmp = $o[$i];
            $o[$i] = 0;
            while ($o[$i] == 0) {
                --$i;
            }
            --$o[$i];
            $o[$i + 1] = $tmp + 1;
        }
        if (\false === $withoutZero || !\in_array(0, $o)) {
            $out[] = $o;
        }
        return $out;
    }
}
/**
 * Flex entity.
 */
Consistency::flexEntity('Hoa\\Math\\Combinatorics\\Combination\\Combination');
<?php


<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Math\Bin;

use Hoa\Compiler;
use Hoa\Console;
use Hoa\File;
use Hoa\Math;
/**
 * Class \Hoa\Math\Bin\Calc.
 *
 * A simple calculator.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Calc extends Console\Dispatcher\Kit
{
    /**
     * Options description.
     *
     * @var array
     */
    protected $options = [['help', Console\GetOption::NO_ARGUMENT, 'h'], ['help', Console\GetOption::NO_ARGUMENT, '?']];
    /**
     * The entry method.
     *
     * @return  int
     */
    public function main()
    {
        while (\false !== ($c = $this->getOption($v))) {
            switch ($c) {
                case 'h':
                case '?':
                    return $this->usage();
                case '__ambiguous':
                    $this->resolveOptionAmbiguity($v);
                    break;
            }
        }
        $this->parser->listInputs($expression);
        $compiler = Compiler\Llk::load(new File\Read('hoa://Library/Math/Arithmetic.pp'));
        $visitor = new Math\Visitor\Arithmetic();
        $dump = new Compiler\Visitor\Dump();
        if (null !== $expression) {
            $ast = $compiler->parse($expression);
            echo $expression . ' = ' . $visitor->visit($ast), "\n";
            return;
        }
        $readline = new Console\Readline();
        $readline->setAutocompleter(new Console\Readline\Autocompleter\Word(\array_merge(\array_keys($visitor->getConstants()->getArrayCopy()), \array_keys($visitor->getFunctions()->getArrayCopy()))));
        $handle = null;
        $expression = 'h';
        do {
            switch ($expression) {
                case 'h':
                case 'help':
                    echo 'Usage:', "\n", '    h[elp]       to print this help;', "\n", '    c[onstants]  to print available constants;', "\n", '    f[unctions]  to print available functions;', "\n", '    e[xpression] to print the current expression;', "\n", '    d[ump]       to dump the tree of the expression;', "\n", '    q[uit]       to quit.', "\n";
                    break;
                case 'c':
                case 'constants':
                    echo \implode(', ', \array_keys($visitor->getConstants()->getArrayCopy())), "\n";
                    break;
                case 'f':
                case 'functions':
                    echo \implode(', ', \array_keys($visitor->getFunctions()->getArrayCopy())), "\n";
                    break;
                case 'e':
                case 'expression':
                    echo $handle, "\n";
                    break;
                case 'd':
                case 'dump':
                    if (null === $handle) {
                        echo 'Type a valid expression before (“> 39 + 3”).', "\n";
                    } else {
                        echo $dump->visit($compiler->parse($handle)), "\n";
                    }
                    break;
                case 'q':
                case 'quit':
                    break 2;
                default:
                    if (null === $expression) {
                        break;
                    }
                    try {
                        echo $visitor->visit($compiler->parse($expression)), "\n";
                    } catch (Compiler\Exception $e) {
                        echo $e->getMessage(), "\n";
                        break;
                    }
                    $handle = $expression;
                    break;
            }
        } while (\false !== ($expression = $readline->readLine('> ')));
        return;
    }
    /**
     * The command usage.
     *
     * @return  int
     */
    public function usage()
    {
        echo 'Usage   : math:calc <options> [expression]', "\n", 'Options :', "\n", $this->makeUsageOptionsList(['help' => 'This help.']), "\n";
        return;
    }
}
__halt_compiler();
A simple calculator.

<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Math\Visitor;

use Hoa\Math;
use Hoa\Visitor;
/**
 * Class \Hoa\Math\Visitor\Arithmetic.
 *
 * Evaluate arithmetical expressions.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 *             Ivan Enderlin, Cédric Dugat.
 * @license    New BSD License
 */
class Arithmetic implements Visitor\Visit
{
    /**
     * Visitor context containing the list of supported functions, constants and variables
     *
     * @var \Hoa\Math\Context
     */
    protected $_context = null;
    /**
     * Initializes context.
     *
     */
    public function __construct()
    {
        $this->initializeContext();
        return;
    }
    /**
     * Set visitor's context
     *
     * @param   \Hoa\Math\Context $context
     * @return  \Hoa\Math\Context
     */
    public function setContext(Math\Context $context)
    {
        $old = $this->_context;
        $this->_context = $context;
        return $old;
    }
    /**
     * Get visitor's context
     *
     * @return  \Hoa\Math\Context
     */
    public function getContext()
    {
        return $this->_context;
    }
    /**
     * Visit an element.
     *
     * @param   \Hoa\Visitor\Element  $element    Element to visit.
     * @param   mixed                 &$handle    Handle (reference).
     * @param   mixed                 $eldnah     Handle (not reference).
     * @return  float
     */
    public function visit(Visitor\Element $element, &$handle = null, $eldnah = null)
    {
        $type = $element->getId();
        $children = $element->getChildren();
        if (null === $handle) {
            $handle = function ($x) {
                return $x;
            };
        }
        $acc =& $handle;
        switch ($type) {
            case '#function':
                $name = \array_shift($children)->accept($this, $_, $eldnah);
                $function = $this->getFunction($name);
                $arguments = [];
                foreach ($children as $child) {
                    $child->accept($this, $_, $eldnah);
                    $arguments[] = $_();
                    unset($_);
                }
                $acc = function () use($function, $arguments, $acc) {
                    return $acc($function->distributeArguments($arguments));
                };
                break;
            case '#negative':
                $children[0]->accept($this, $a, $eldnah);
                $acc = function () use($a, $acc) {
                    return $acc(-$a());
                };
                break;
            case '#addition':
                $children[0]->accept($this, $a, $eldnah);
                $acc = function ($b) use($a, $acc) {
                    return $acc($a() + $b);
                };
                $children[1]->accept($this, $acc, $eldnah);
                break;
            case '#substraction':
                $children[0]->accept($this, $a, $eldnah);
                $acc = function ($b) use($a, $acc) {
                    return $acc($a()) - $b;
                };
                $children[1]->accept($this, $acc, $eldnah);
                break;
            case '#multiplication':
                $children[0]->accept($this, $a, $eldnah);
                $acc = function ($b) use($a, $acc) {
                    return $acc($a() * $b);
                };
                $children[1]->accept($this, $acc, $eldnah);
                break;
            case '#division':
                $children[0]->accept($this, $a, $eldnah);
                $parent = $element->getParent();
                if (null === $parent || $type === $parent->getId()) {
                    $acc = function ($b) use($a, $acc) {
                        if (0.0 === $b) {
                            throw new \RuntimeException('Division by zero is not possible.');
                        }
                        return $acc($a()) / $b;
                    };
                } else {
                    if ('#fakegroup' !== $parent->getId()) {
                        $classname = \get_class($element);
                        $group = new $classname('#fakegroup', null, [$element], $parent);
                        $element->setParent($group);
                        $this->visit($group, $acc, $eldnah);
                        break;
                    } else {
                        $acc = function ($b) use($a, $acc) {
                            if (0.0 === $b) {
                                throw new \RuntimeException('Division by zero is not possible.');
                            }
                            return $acc($a() / $b);
                        };
                    }
                }
                $children[1]->accept($this, $acc, $eldnah);
                break;
            case '#fakegroup':
            case '#group':
                $children[0]->accept($this, $a, $eldnah);
                $acc = function () use($a, $acc) {
                    return $acc($a());
                };
                break;
            case '#variable':
                $out = $this->getVariable($children[0]->getValueValue());
                $acc = function () use($out, $acc) {
                    return $acc($out);
                };
                break;
            case 'token':
                $value = $element->getValueValue();
                $out = null;
                if ('constant' === $element->getValueToken()) {
                    if (\defined($value)) {
                        $out = \constant($value);
                    } else {
                        $out = $this->getConstant($value);
                    }
                } elseif ('id' === $element->getValueToken()) {
                    return $value;
                } else {
                    $out = (float) $value;
                }
                $acc = function () use($out, $acc) {
                    return $acc($out);
                };
                break;
        }
        if (null === $element->getParent()) {
            return $acc();
        }
    }
    /**
     * Get functions.
     *
     * @return  \ArrayObject
     */
    public function getFunctions()
    {
        return $this->_context->getFunctions();
    }
    /**
     * Get a function.
     *
     * @param   string  $name    Function name.
     * @return  \Hoa\Consistency\Xcallable
     * @throws  \Hoa\Math\Exception\UnknownFunction
     */
    public function getFunction($name)
    {
        return $this->_context->getFunction($name);
    }
    /**
     * Get constants.
     *
     * @return  \ArrayObject
     */
    public function getConstants()
    {
        return $this->_context->getConstants();
    }
    /**
     * Get a constant.
     *
     * @param   string  $name    Constant name.
     * @return  mixed
     * @throws  \Hoa\Math\Exception\UnknownFunction
     */
    public function getConstant($name)
    {
        return $this->_context->getConstant($name);
    }
    /**
     * Get variables.
     *
     * @return \ArrayObject
     */
    public function getVariables()
    {
        return $this->_context->getVariables();
    }
    /**
     * Get a variable.
     *
     * @param   string  $name    Variable name.
     * @return  callable
     * @throws  \Hoa\Math\Exception\UnknownVariable
     */
    public function getVariable($name)
    {
        return $this->_context->getVariable($name);
    }
    protected function initializeContext()
    {
        if (null === $this->_context) {
            $this->_context = new Math\Context();
        }
        return;
    }
    /**
     * Add a function.
     *
     * @param   string  $name        Function name.
     * @param   mixed   $callable    Callable.
     * @return  void
     */
    public function addFunction($name, $callable = null)
    {
        return $this->_context->addFunction($name, $callable);
    }
    /**
     * Add a constant.
     *
     * @param   string  $name     Constant name.
     * @param   mixed   $value    Value.
     * @return  void
     */
    public function addConstant($name, $value)
    {
        return $this->_context->addConstant($name, $value);
    }
    /**
     * Add a variable.
     *
     * @param   string    $name        Variable name.
     * @param   callable  $callable    Callable.
     * @return  void
     */
    public function addVariable($name, callable $callable)
    {
        return $this->_context->addVariable($name, $callable);
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Math;

/**
 * Class \Hoa\Math\Context.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Context
{
    /**
     * List of supported functions: identifier => values as callable.
     *
     * @var \ArrayObject
     */
    protected $_functions = null;
    /**
     * List of supported constants: identifier => values.
     *
     * @var \ArrayObject
     */
    protected $_constants = null;
    /**
     * List of supported variables: identifier => values as callable.
     *
     * @var \ArrayObject
     */
    protected $_variables = null;
    /**
     * Initialize constants and functions.
     *
     */
    public function __construct()
    {
        $this->initializeConstants();
        $this->initializeFunctions();
        $this->initializeVariables();
        return;
    }
    /**
     * Add a constant.
     *
     * @param   string  $name     Constant name.
     * @param   mixed   $value    Value.
     * @return  void
     * @throws  \Hoa\Math\Exception\AlreadyDefinedConstant
     */
    public function addConstant($name, $value)
    {
        if (\true === $this->_constants->offsetExists($name)) {
            throw new \Hoa\Math\Exception\AlreadyDefinedConstant('Constant %s is already defined.', 0, $name);
        }
        $this->_constants[$name] = $value;
        return;
    }
    /**
     * Get a constant.
     *
     * @param   string  $name    Constant name.
     * @return  mixed
     * @throws  \Hoa\Math\Exception\UnknownConstant
     */
    public function getConstant($name)
    {
        if (\false === $this->_constants->offsetExists($name)) {
            throw new \Hoa\Math\Exception\UnknownConstant('Constant %s does not exist.', 1, $name);
        }
        return $this->_constants[$name];
    }
    /**
     * Get constants.
     *
     * @return  \ArrayObject
     */
    public function getConstants()
    {
        return $this->_constants;
    }
    /**
     * Add a function.
     *
     * @param   string  $name        Function name.
     * @param   mixed   $callable    Callable.
     * @return  void
     * @throws  \Hoa\Math\Exception\UnknownFunction
     */
    public function addFunction($name, $callable = null)
    {
        if (null === $callable) {
            if (\false === \function_exists($name)) {
                throw new \Hoa\Math\Exception\UnknownFunction('Function %s does not exist, cannot add it.', 2, $name);
            }
            $callable = $name;
        }
        $this->_functions[$name] = xcallable($callable);
        return;
    }
    /**
     * Get a function.
     *
     * @param   string  $name    Function name.
     * @return  \Hoa\Consistency\Xcallable
     * @throws  \Hoa\Math\Exception\UnknownFunction
     */
    public function getFunction($name)
    {
        if (\false === $this->_functions->offsetExists($name)) {
            throw new \Hoa\Math\Exception\UnknownFunction('Function %s does not exist.', 3, $name);
        }
        return $this->_functions[$name];
    }
    /**
     * Get functions.
     *
     * @return  \ArrayObject
     */
    public function getFunctions()
    {
        return $this->_functions;
    }
    /**
     * Add a variable.
     *
     * @param   string    $name        Variable name.
     * @param   callable  $callable    Callable.
     * @return  void
     */
    public function addVariable($name, callable $callable)
    {
        $this->_variables[$name] = xcallable($callable);
        return;
    }
    /**
     * Get a variable.
     *
     * @param   string   $name    Variable name.
     * @return  callable
     * @throws  \Hoa\Math\Exception\UnknownVariable
     */
    public function getVariable($name)
    {
        if (\false === $this->_variables->offsetExists($name)) {
            throw new \Hoa\Math\Exception\UnknownVariable('Variable %s does not exist.', 4, $name);
        }
        return $this->_variables[$name]($this);
    }
    /**
     * Get variables.
     *
     * @return \ArrayObject
     */
    public function getVariables()
    {
        return $this->_variables;
    }
    /**
     * Initialize constants mapping.
     *
     * @return void
     */
    protected function initializeConstants()
    {
        static $_constants = null;
        if (null === $_constants) {
            $_constants = new \ArrayObject(['PI' => \M_PI, 'PI_2' => \M_PI_2, 'PI_4' => \M_PI_4, 'E' => \M_E, 'SQRT_PI' => \M_SQRTPI, 'SQRT_2' => \M_SQRT2, 'SQRT_3' => \M_SQRT3, 'LN_PI' => \M_LNPI, 'LOG_2E' => \M_LOG2E, 'LOG_10E' => \M_LOG10E, 'LN_2' => \M_LN2, 'LN_10' => \M_LN10, 'ONE_OVER_PI' => \M_1_PI, 'TWO_OVER_PI' => \M_2_PI, 'TWO_OVER_SQRT_PI' => \M_2_SQRTPI, 'ONE_OVER_SQRT_2' => \M_SQRT1_2, 'EULER' => \M_EULER, 'INFINITE' => \INF]);
        }
        $this->_constants = $_constants;
        return;
    }
    /**
     * Initialize functions mapping.
     *
     * @return void
     */
    protected function initializeFunctions()
    {
        static $_functions = null;
        if (null === $_functions) {
            $average = function () {
                $arguments = \func_get_args();
                return \array_sum($arguments) / \count($arguments);
            };
            $_functions = new \ArrayObject(['abs' => xcallable('abs'), 'acos' => xcallable('acos'), 'asin' => xcallable('asin'), 'atan' => xcallable('atan'), 'average' => xcallable($average), 'avg' => xcallable($average), 'ceil' => xcallable('ceil'), 'cos' => xcallable('cos'), 'count' => xcallable(function () {
                return \count(\func_get_args());
            }), 'deg2rad' => xcallable('deg2rad'), 'exp' => xcallable('exp'), 'floor' => xcallable('floor'), 'ln' => xcallable('log'), 'log' => xcallable(function ($value, $base = 10) {
                return \log($value, $base);
            }), 'max' => xcallable('max'), 'min' => xcallable('min'), 'pow' => xcallable('pow'), 'rad2deg' => xcallable('rad2deg'), 'round' => xcallable(function ($value, $precision = 0) {
                return \round($value, $precision);
            }), 'sin' => xcallable('sin'), 'sqrt' => xcallable('sqrt'), 'sum' => xcallable(function () {
                return \array_sum(\func_get_args());
            }), 'tan' => xcallable('tan')]);
        }
        $this->_functions = $_functions;
        return;
    }
    /**
     * Initialize variables mapping.
     *
     * @return void
     */
    protected function initializeVariables()
    {
        if (null === $this->_variables) {
            $this->_variables = new \ArrayObject();
        }
        return;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler;

/**
 * Define the __ constant, so useful in compiler :-).
 */
!\defined('_PHPStan_dcc7b7cff\\GO') and \define('_PHPStan_dcc7b7cff\\GO', 'GO');
!\defined('_PHPStan_dcc7b7cff\\__') and \define('_PHPStan_dcc7b7cff\\__', '__');
/**
 * Class \Hoa\Compiler\Ll1.
 *
 * Provide an abstract LL(1) compiler, based on sub-automata and stacks.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
abstract class Ll1
{
    /**
     * Initial line.
     * If we try to compile a code inside another code, the initial line would
     * not probably be 0.
     *
     * @var int
     */
    protected $_initialLine = 0;
    /**
     * Tokens to skip (will be totally skip, no way to get it).
     * Tokens' rules could be apply here (i.e. normal and special tokens are
     * understood).
     * Example:
     *     [
     *         '#\s+',           // white spaces
     *         '#//.*',          // inline comment
     *         '#/\*(.|\n)*\*\/' // block comment
     *     ]
     *
     * @var array
     */
    protected $_skip = [];
    /**
     * Tokens.
     * A token should be:
     *     * simple, it means just a single char, e.g. ':';
     *     * special, strings and/or a regular expressions, and must begin with
     *       a sharp (#), e.g. '#foobar', '#[a-zA-Z]' or '#foo?bar'.
     * Note: if we want the token #, we should write '##'.
     * PCRE expressions are fully-supported.
     * We got an array of arrays because of sub-automata, one sub-array per
     * sub-automaton.
     * Example:
     *     [
     *         [
     *             '{'  // open brack
     *         ],
     *         [
     *             '"',            // quote
     *             ':',            // semi-colon
     *             ',',            // comma
     *             '{',            // open bracket
     *             '}'             // close bracket
     *         ],
     *         [
     *             '#[a-z_\ \n]+", // id/string
     *             '"'             // quote
     *         ]
     *     ]
     *
     * @var array
     */
    protected $_tokens = [];
    /**
     * States.
     * We got an array of arrays because of sub-automata, one sub-array per
     * sub-automaton.
     * Example:
     *     [
     *         [
     *              __ , // error
     *             'GO', // start
     *             'OK'  // terminal
     *         ],
     *         [
     *              __ , // error
     *             'GO', // start
     *             'KE', // key
     *             'CO', // colon
     *             'VA', // value
     *             'BL', // block
     *             'OK'  // terminal
     *         ],
     *         [
     *              __ , // error
     *             'GO', // start
     *             'ST', // string
     *             'OK'  // terminal
     *         ]
     *     ]
     *
     * Note: the constant GO or the string 'GO' must be used to represent the
     *       initial state.
     * Note: the constant __ or the string '__' must be used to represent the
     *       null/unrecognized/error state.
     *
     * @var array
     */
    protected $_states = [];
    /**
     * Terminal states (defined in the states set).
     * We got an array of arrays because of sub-automata, one sub-array per
     * sub-automaton.
     * Example:
     *     [
     *         ['OK'],
     *         ['OK'],
     *         ['OK']
     *     ]
     *
     * @var array
     */
    protected $_terminal = [];
    /**
     * Transitions table.
     * It's actually a matrix, such as: TT(TOKENS × STATES).
     * We got an array of arrays because of sub-automata, one sub-array per
     * sub-automaton.
     * Example:
     *     [
     *        [
     *                   {
     *             __  [ __ ],
     *             GO  ['OK'],
     *             OK  [ __ ],
     *         ),
     *         [
     *                   "     :     ,     {     }
     *             __  [ __ ,  __ ,  __ ,  __ ,  __ ],
     *             GO  ['KE',  __ ,  __ ,  __ , 'OK'],
     *             KE  [ __ , 'CO',  __ ,  __ ,  __ ],
     *             CO  ['VA',  __ ,  __ , 'BL',  __ ],
     *             VA  [ __ ,  __ , 'GO',  __ , 'OK'],
     *             BL  [ __ ,  __ , 'GO',  __ , 'OK'],
     *             OK  [ __ ,  __ ,  __ ,  __ ,  __ ]
     *         ],
     *         [
     *                   id    "
     *             __  [ __ ,  __ ],
     *             GO  ['ST', 'OK'],
     *             ST  [ __ , 'OK'],
     *             OK  [ __ ,  __ ]
     *         ]
     *     )
     *
     * Note: tokens and states should be declared in the strict same order as
     *       defined previously.
     *
     * @var array
     */
    protected $_transitions = [];
    /**
    * Actions table.
    * It's actually a matrix, such as: AT(TOKENS × STATES).
    * We got an array of arrays because of sub-automata, one sub-array per
    * sub-automaton.
    * Example:
    *     [
    *         [
    *                   {
    *             __  [ 0 ],
    *             GO  [ 0 ],
    *             OK  [ 2 ],
    *         ],
    *         [
    *                   "   :    ,    {    }
    *             __  [ 0,  0 ,  0 ,  0 ,  0 ],
    *             GO  [ 0,  0 ,  0 ,  0 , 'd'],
    *             KE  [ 3, 'k',  0 ,  0 ,  0 ],
    *             CO  [ 0,  0 ,  0 , 'u',  0 ],
    *             VA  [ 3,  0 , 'v',  0 , 'x'],
    *             BL  [ 0,  0 ,  0 ,  2 , 'd'],
    *             OK  [ 0,  0 ,  0 ,  0 ,  0 ]
    *         ],
    *         [
    *                   id  "
    *             __  [ 0, 0 ],
    *             GO  [-1, 0 ],
    *             ST  [ 0, 0 ],
    *             OK  [ 0, 0 ]
    *         ]
    *     ]
    *
    * AT is filled with integer or char n.
    * If n is a char, it means an action.
    * If n < 0, it means a special action.
    * If n = 0, it means not action.
    * If n > 0, it means a link to a sub-automata (sub-automata index + 1).
    *
    * When we write our consume() method, it's just a simple switch receiving
    * an action. It receives only character. It's like a “goto” in our
    * compiler, and allows us to execute code when skiming through the graph.
    *
    * Negative/special actions are used to auto-fill or empty buffers.
    * E.g: -1 will fill the buffer 0, -2 will empty the buffer 0,
    *      -3 will fill the buffer 1, -4 will empty the buffer 1,
    *      -5 will fill the buffer 2, -6 will empty the buffer 2 etc.
    * A formula appears:
    *      y = |x|
    *      fill  buffer (x - 2) / 2 if x & 1 = 1
    *      empty buffer (x - 1) / 2 if x & 1 = 0
    *
    * Positive/link actions are used to make an epsilon-transition (or a link)
    * between two sub-automata.
    * Sub-automata are indexed from 0, but our links must be index + 1. Example
    * given: the sub-automata 0 in our example has a link to the sub-automata 1
    * through OK[{] = 2. Take attention to this :-).
    * And another thing which must be carefully studying is the place of the
    * link. For example, with our sub-automata 1 (the big one), we have an
    * epsilon-transition to the sub-automata 2 through VA["] = 3. It means:
    * when we arrived in the state VA from the token ", we go in the
    * sub-automata 3 (the 2nd one actually). And when the linked sub-automata
    * has finished, we are back in our state and continue our parsing. Take
    * care of this :-).
    *
    * Finally, it is possible to combine positive and char action, separated by
    a comma. Thus: 7,f is equivalent to make an epsilon-transition to the
    * automata 7, then consume the action f.
    *
    * @var array
    */
    protected $_actions = [];
    /**
     * Names of automata.
     */
    protected $_names = [];
    /**
     * Recursive stack.
     *
     * @var array
     */
    private $_stack = [];
    /**
     * Buffers.
     *
     * @var array
     */
    protected $buffers = [];
    /**
     * Current token's line.
     *
     * @var int
     */
    protected $line = 0;
    /**
     * Current token's column.
     *
     * @var int
     */
    protected $column = 0;
    /**
     * Cache compiling result.
     *
     * @var array
     */
    protected static $_cache = [];
    /**
     * Whether cache is enabled or not.
     *
     * @var bool
     */
    protected static $_cacheEnabled = \true;
    /**
     * Singleton, and set parameters.
     *
     * @param   array   $skip           Skip.
     * @param   array   $tokens         Tokens.
     * @param   array   $states         States.
     * @param   array   $terminal       Terminal states.
     * @param   array   $transitions    Transitions table.
     * @param   array   $actions        Actions table.
     * @param   array   $names          Names of automata.
     */
    public function __construct(array $skip, array $tokens, array $states, array $terminal, array $transitions, array $actions, array $names = [])
    {
        $this->setSkip($skip);
        $this->setTokens($tokens);
        $this->setStates($states);
        $this->setTerminal($terminal);
        $this->setTransitions($transitions);
        $this->setActions($actions);
        $this->setNames($names);
        return;
    }
    /**
     * Compile a source code.
     *
     * @param   string  $in    Source code.
     * @return  void
     * @throws  \Hoa\Compiler\Exception\FinalStateHasNotBeenReached
     * @throws  \Hoa\Compiler\Exception\IllegalToken
     */
    public function compile($in)
    {
        $cacheId = \md5($in);
        if (\true === self::$_cacheEnabled && \true === \array_key_exists($cacheId, self::$_cache)) {
            return self::$_cache[$cacheId];
        }
        $d = 0;
        $c = 0;
        // current automata.
        $_skip = \array_flip($this->_skip);
        $_tokens = \array_flip($this->_tokens[$c]);
        $_states = \array_flip($this->_states[$c]);
        $_actions = [$c => 0];
        $nextChar = null;
        $nextToken = 0;
        $nextState = $_states['GO'];
        $nextAction = $_states['GO'];
        $this->line = $this->getInitialLine();
        $this->column = 0;
        $this->buffers = [];
        $line = $this->line;
        $column = $this->column;
        $this->pre($in);
        for ($i = 0, $max = \strlen($in); $i <= $max; $i++) {
            //echo "\n---\n\n";
            // End of parsing (not automata).
            if ($i == $max) {
                while ($c > 0 && \in_array($this->_states[$c][$nextState], $this->_terminal[$c])) {
                    list($c, $nextState, ) = \array_pop($this->_stack);
                }
                if (\in_array($this->_states[$c][$nextState], $this->_terminal[$c]) && 0 === $c && \true === $this->end()) {
                    //echo '*********** END REACHED **********' . "\n";
                    if (\true === self::$_cacheEnabled) {
                        self::$_cache[$cacheId] = $this->getResult();
                    }
                    return \true;
                }
                throw new \Hoa\Compiler\Exception\FinalStateHasNotBeenReached('End of code has been reached but not correctly; ' . 'maybe your program is not complete?', 0);
            }
            $nextChar = $in[$i];
            // Skip.
            if (isset($_skip[$nextChar])) {
                if ("\n" === $nextChar) {
                    $line++;
                    $column = 0;
                } else {
                    $column++;
                }
                continue;
            } else {
                $continue = \false;
                $handle = \substr($in, $i);
                foreach ($_skip as $sk => $e) {
                    if ($sk[0] != '#') {
                        continue;
                    }
                    $sk = \str_replace('#', '\\#', \substr($sk, 1));
                    if (0 != \preg_match('#^(' . $sk . ')#u', $handle, $match)) {
                        $strlen = \strlen($match[1]);
                        if ($strlen > 0) {
                            if (\false !== ($offset = \strrpos($match[1], "\n"))) {
                                $column = $strlen - $offset - 1;
                            } else {
                                $column += $strlen;
                            }
                            $line += \substr_count($match[1], "\n");
                            $i += $strlen - 1;
                            $continue = \true;
                            break;
                        }
                    }
                }
                if (\true === $continue) {
                    continue;
                }
            }
            // Epsilon-transition.
            $epsilon = \false;
            while (\array_key_exists($nextToken, $this->_actions[$c][$nextState]) && (\is_array($this->_actions[$c][$nextState][$nextToken]) && 0 < ($foo = $this->_actions[$c][$nextState][$nextToken][0]) || \is_int($this->_actions[$c][$nextState][$nextToken]) && 0 < ($foo = $this->_actions[$c][$nextState][$nextToken]))) {
                $epsilon = \true;
                if ($_actions[$c] == 0) {
                    //echo '*** Change automata (up to ' . ($foo - 1) . ')' . "\n";
                    $this->_stack[$d] = [$c, $nextState, $nextToken];
                    \end($this->_stack);
                    $c = $foo - 1;
                    $_tokens = \array_flip($this->_tokens[$c]);
                    $_states = \array_flip($this->_states[$c]);
                    $nextState = $_states['GO'];
                    $nextAction = $_states['GO'];
                    $nextToken = 0;
                    $_actions[$c] = 0;
                    $d++;
                } elseif ($_actions[$c] == 2) {
                    $_actions[$c] = 0;
                    break;
                }
            }
            if (\true === $epsilon) {
                $epsilon = \false;
                $nextToken = \false;
            }
            // Token.
            if (isset($_tokens[$nextChar])) {
                $token = $nextChar;
                $nextToken = $_tokens[$token];
                if ("\n" === $nextChar) {
                    $line++;
                    $column = 0;
                } else {
                    $column++;
                }
            } else {
                $nextToken = \false;
                $handle = \substr($in, $i);
                foreach ($_tokens as $token => $e) {
                    if ('#' !== $token[0]) {
                        continue;
                    }
                    $ntoken = \str_replace('#', '\\#', \substr($token, 1));
                    if (0 != \preg_match('#^(' . $ntoken . ')#u', $handle, $match)) {
                        $strlen = \strlen($match[1]);
                        if ($strlen > 0) {
                            if (\false !== ($offset = \strrpos($match[1], "\n"))) {
                                $column = $strlen - $offset - 1;
                            } else {
                                $column += $strlen;
                            }
                            $nextChar = $match[1];
                            $nextToken = $e;
                            $i += $strlen - 1;
                            $line += \substr_count($match[1], "\n");
                            break;
                        }
                    }
                }
            }
            /*
            echo '>>> Automata   ' . $c . "\n" .
                 '>>> Next state ' . $nextState . "\n" .
                 '>>> Token      ' . $token . "\n" .
                 '>>> Next char  ' . $nextChar . "\n";
            */
            // Got it!
            if (\false !== $nextToken) {
                if (\is_array($this->_actions[$c][$nextState][$nextToken])) {
                    $nextAction = $this->_actions[$c][$nextState][$nextToken][1];
                } else {
                    $nextAction = $this->_actions[$c][$nextState][$nextToken];
                }
                $nextState = $_states[$this->_transitions[$c][$nextState][$nextToken]];
            }
            // Oh :-(.
            if (\false === $nextToken || $nextState === $_states['__']) {
                $pop = \array_pop($this->_stack);
                $d--;
                // Go back to a parent automata.
                if (\in_array($this->_states[$c][$nextState], $this->_terminal[$c]) && null !== $pop || $nextState === $_states['__'] && null !== $pop) {
                    //echo '!!! Change automata (down)' . "\n";
                    list($c, $nextState, $nextToken) = $pop;
                    $_actions[$c] = 2;
                    $i -= \strlen($nextChar);
                    $_tokens = \array_flip($this->_tokens[$c]);
                    $_states = \array_flip($this->_states[$c]);
                    /*
                    echo '!!! Automata   ' . $c . "\n" .
                         '!!! Next state ' . $nextState . "\n";
                    */
                    continue;
                }
                $error = \explode("\n", $in);
                $error = $error[$this->line];
                throw new \Hoa\Compiler\Exception\IllegalToken('Illegal token at line ' . ($this->line + 1) . ' and column ' . ($this->column + 1) . "\n" . $error . "\n" . \str_repeat(' ', $this->column) . '↑', 1, [], $this->line + 1, $this->column + 1);
            }
            $this->line = $line;
            $this->column = $column;
            //echo '<<< Next state ' . $nextState . "\n";
            $this->buffers[-1] = $nextChar;
            // Special actions.
            if ($nextAction < 0) {
                $buffer = \abs($nextAction);
                if (($buffer & 1) == 0) {
                    $this->buffers[($buffer - 2) / 2] = null;
                } else {
                    $buffer = ($buffer - 1) / 2;
                    if (!isset($this->buffers[$buffer])) {
                        $this->buffers[$buffer] = null;
                    }
                    $this->buffers[$buffer] .= $nextChar;
                }
                continue;
            }
            if (0 !== $nextAction) {
                $this->consume($nextAction);
            }
        }
        return;
    }
    /**
     * Consume actions.
     * Please, see the actions table definition to learn more.
     *
     * @param   int  $action    Action.
     * @return  void
     */
    protected abstract function consume($action);
    /**
     * Compute source code before compiling it.
     *
     * @param   string  &$in    Source code.
     * @return  void
     */
    protected function pre(&$in)
    {
        return;
    }
    /**
     * Verify compiler state when ending the source code.
     *
     * @return  bool
     */
    protected function end()
    {
        return \true;
    }
    /**
     * Get the result of the compiling.
     *
     * @return  mixed
     */
    public abstract function getResult();
    /**
     * Set initial line.
     *
     * @param   int     $line    Initial line.
     * @return  int
     */
    public function setInitialLine($line)
    {
        $old = $this->_initialLine;
        $this->_initialLine = $line;
        return $old;
    }
    /**
     * Set tokens to skip.
     *
     * @param   array   $skip    Skip.
     * @return  array
     */
    public function setSkip(array $skip)
    {
        $old = $this->_skip;
        $this->_skip = $skip;
        return $old;
    }
    /**
     * Set tokens.
     *
     * @param   array   $tokens    Tokens.
     * @return  array
     */
    public function setTokens(array $tokens)
    {
        $old = $this->_tokens;
        $this->_tokens = $tokens;
        return $old;
    }
    /**
     * Set states.
     *
     * @param   array   $states    States.
     * @return  array
     */
    public function setStates(array $states)
    {
        $old = $this->_states;
        $this->_states = $states;
        return $old;
    }
    /**
     * Set terminal states.
     *
     * @param   array   $terminal    Terminal states.
     * @return  array
     */
    public function setTerminal(array $terminal)
    {
        $old = $this->_terminal;
        $this->_terminal = $terminal;
        return $old;
    }
    /**
     * Set transitions table.
     *
     * @param   array   $transitions    Transitions table.
     * @return  array
     */
    public function setTransitions(array $transitions)
    {
        $old = $this->_transitions;
        $this->_transitions = $transitions;
        return $old;
    }
    /**
     * Set actions table.
     *
     * @param   array   $actions    Actions table.
     * @return  array
     */
    public function setActions(array $actions)
    {
        foreach ($actions as $e => $automata) {
            foreach ($automata as $i => $state) {
                foreach ($state as $j => $token) {
                    if (0 != \preg_match('#^(\\d+),(.*)$#', $token, $matches)) {
                        $actions[$e][$i][$j] = [(int) $matches[1], $matches[2]];
                    }
                }
            }
        }
        $old = $this->_actions;
        $this->_actions = $actions;
        return $old;
    }
    /**
     * Set names of automata.
     *
     * @param   array   $names    Names of automata.
     * @return  array
     */
    public function setNames(array $names)
    {
        $old = $this->_names;
        $this->_names = $names;
        return $old;
    }
    /**
     * Get initial line.
     *
     * @return  int
     */
    public function getInitialLine()
    {
        return $this->_initialLine;
    }
    /**
     * Get skip tokens.
     *
     * @return  array
     */
    public function getSkip()
    {
        return $this->_skip;
    }
    /**
     * Get tokens.
     *
     * @return  array
     */
    public function getTokens()
    {
        return $this->_tokens;
    }
    /**
     * Get states.
     *
     * @return  array
     */
    public function getStates()
    {
        return $this->_states;
    }
    /**
     * Get terminal states.
     *
     * @return  array
     */
    public function getTerminal()
    {
        return $this->_terminal;
    }
    /**
     * Get transitions table.
     *
     * @return  array
     */
    public function getTransitions()
    {
        return $this->_transitions;
    }
    /**
     * Get actions table.
     *
     * @return  array
     */
    public function getActions()
    {
        return $this->_actions;
    }
    /**
     * Get names of automata.
     *
     * @return  array
     */
    public function getNames()
    {
        return $this->_names;
    }
    /**
     * Enable cache
     *
     * @return  bool
     */
    public static function enableCache()
    {
        $old = self::$_cacheEnabled;
        self::$_cacheEnabled = \true;
        return $old;
    }
    /**
     * Disable cache
     *
     * @return  bool
     */
    public static function disableCache()
    {
        $old = self::$_cacheEnabled;
        self::$_cacheEnabled = \false;
        return $old;
    }
    /**
     * Transform automatas into DOT language.
     *
     * @return  void
     */
    public function __toString()
    {
        $out = 'digraph ' . \str_replace('\\', '', \get_class($this)) . ' {' . "\n" . '    rankdir=LR;' . "\n" . '    label="Automata of ' . \str_replace('\\', '\\\\', \get_class($this)) . '";';
        $transitions = \array_reverse($this->_transitions, \true);
        foreach ($transitions as $e => $automata) {
            $out .= "\n\n" . '    subgraph cluster_' . $e . ' {' . "\n" . '        label="Automata #' . $e . (isset($this->_names[$e]) ? ' (' . \str_replace('"', '\\"', $this->_names[$e]) . ')' : '') . '";' . "\n";
            if (!empty($this->_terminal[$e])) {
                $out .= '        node[shape=doublecircle] "' . $e . '_' . \implode('" "' . $e . '_', $this->_terminal[$e]) . '";' . "\n";
            }
            $out .= '        node[shape=circle];' . "\n";
            foreach ($this->_states[$e] as $i => $state) {
                $name = [];
                $label = $state;
                if (__ != $state) {
                    foreach ($this->_transitions[$e][$i] as $j => $foo) {
                        $ep = $this->_actions[$e][$i][$j];
                        if (\is_array($ep)) {
                            $ep = $ep[0];
                        }
                        if (\is_int($ep)) {
                            $ep--;
                            if (0 < $ep && !isset($name[$ep])) {
                                $name[$ep] = $ep;
                            }
                        }
                    }
                    if (!empty($name)) {
                        $label .= ' (' . \implode(', ', $name) . ')';
                    }
                    $out .= '        "' . $e . '_' . $state . '" ' . '[label="' . $label . '"];' . "\n";
                }
            }
            foreach ($automata as $i => $transition) {
                $transition = \array_reverse($transition, \true);
                foreach ($transition as $j => $state) {
                    if (__ != $this->_states[$e][$i] && __ != $state) {
                        $label = \str_replace('\\', '\\\\', $this->_tokens[$e][$j]);
                        $label = \str_replace('"', '\\"', $label);
                        if ('#' === $label[0]) {
                            $label = \substr($label, 1);
                        }
                        $out .= '        "' . $e . '_' . $this->_states[$e][$i] . '" -> "' . $e . '_' . $state . '"' . ' [label="' . $label . '"];' . "\n";
                    }
                }
            }
            $out .= '        node[shape=point,label=""] "' . $e . '_";' . "\n" . '        "' . $e . '_" -> "' . $e . '_GO";' . "\n" . '    }';
        }
        $out .= "\n" . '}' . "\n";
        return $out;
    }
}
//
// Hoa
//
//
// @license
//
// New BSD License
//
// Copyright © 2007-2017, Hoa community. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//     * Redistributions of source code must retain the above copyright
//       notice, this list of conditions and the following disclaimer.
//     * Redistributions in binary form must reproduce the above copyright
//       notice, this list of conditions and the following disclaimer in the
//       documentation and/or other materials provided with the distribution.
//     * Neither the name of the Hoa nor the names of its contributors may be
//       used to endorse or promote products derived from this software without
//       specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// Grammar \Hoa\Compiler\Llk.
//
// Provide grammar for the LL(k) parser.
//
// @copyright  Copyright © 2007-2017, Hoa community.
// @license    New BSD License
//


%skip   space          \s

%token  or             \|
%token  zero_or_one    \?
%token  one_or_more    \+
%token  zero_or_more   \*
%token  n_to_m         \{[0-9]+,[0-9]+\}
%token  zero_to_m      \{,[0-9]+\}
%token  n_or_more      \{[0-9]+,\}
%token  exactly_n      \{[0-9]+\}

%token  token          [a-zA-Z_][a-zA-Z0-9_]*

%token  skipped        ::
%token  kept_          <
%token _kept           >
%token  named          \(\)
%token  node           #[a-zA-Z_][a-zA-Z0-9_]*(:[mM])?

%token  capturing_     \(
%token _capturing      \)
%token  unification_   \[
%token  unification    [0-9]+
%token _unification    \]

#rule:
    choice()

choice:
    concatenation() ( ::or:: concatenation() #choice )*

concatenation:
    repetition() ( repetition() #concatenation )*

repetition:
    simple() ( quantifier() #repetition )? <node>?

simple:
    ::capturing_:: choice() ::_capturing::
  | ::skipped:: <token> ( ::unification_:: <unification> ::_unification:: )?
    ::skipped:: #skipped
  | ::kept_:: <token> ( ::unification_:: <unification> ::_unification:: )?
    ::_kept:: #kept
  | <token> ::named::

quantifier:
    <zero_or_one>
  | <one_or_more>
  | <zero_or_more>
  | <n_to_m>
  | <n_or_more>
  | <exactly_n>
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler\Llk;

use Hoa\Visitor;
/**
 * Class \Hoa\Compiler\Llk\TreeNode.
 *
 * Provide a generic node for the AST produced by LL(k) parser.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class TreeNode implements Visitor\Element
{
    /**
     * ID (should be something like #ruleName or token).
     *
     * @var string
     */
    protected $_id = null;
    /**
     * Value of the node (non-null for token nodes).
     *
     * @var array
     */
    protected $_value = null;
    /**
     * Children.
     *
     * @var array
     */
    protected $_children = null;
    /**
     * Parent.
     *
     * @var \Hoa\Compiler\Llk\TreeNode
     */
    protected $_parent = null;
    /**
     * Attached data.
     *
     * @var array
     */
    protected $_data = [];
    /**
     * Constructor.
     *
     * @param   string                      $id          ID.
     * @param   array                       $value       Value.
     * @param   array                       $children    Children.
     * @param   \Hoa\Compiler\Llk\TreeNode  $parent    Parent.
     */
    public function __construct($id, array $value = null, array $children = [], self $parent = null)
    {
        $this->setId($id);
        if (!empty($value)) {
            $this->setValue($value);
        }
        $this->setChildren($children);
        if (null !== $parent) {
            $this->setParent($parent);
        }
        return;
    }
    /**
     * Set ID.
     *
     * @param   string  $id    ID.
     * @return  string
     */
    public function setId($id)
    {
        $old = $this->_id;
        $this->_id = $id;
        return $old;
    }
    /**
     * Get ID.
     *
     * @return  string
     */
    public function getId()
    {
        return $this->_id;
    }
    /**
     * Set value.
     *
     * @param   array  $value    Value (token & value).
     * @return  array
     */
    public function setValue(array $value)
    {
        $old = $this->_value;
        $this->_value = $value;
        return $old;
    }
    /**
     * Get value.
     *
     * @return  array
     */
    public function getValue()
    {
        return $this->_value;
    }
    /**
     * Get value token.
     *
     * @return  string
     */
    public function getValueToken()
    {
        return isset($this->_value['token']) ? $this->_value['token'] : null;
    }
    /**
     * Get value value.
     *
     * @return  string
     */
    public function getValueValue()
    {
        return isset($this->_value['value']) ? $this->_value['value'] : null;
    }
    /**
     * Check if the node represents a token or not.
     *
     * @return  bool
     */
    public function isToken()
    {
        return !empty($this->_value);
    }
    /**
     * Prepend a child.
     *
     * @param   \Hoa\Compiler\Llk\TreeNode  $child    Child.
     * @return  \Hoa\Compiler\Llk\TreeNode
     */
    public function prependChild(\Hoa\Compiler\Llk\TreeNode $child)
    {
        \array_unshift($this->_children, $child);
        return $this;
    }
    /**
     * Append a child.
     *
     * @param   \Hoa\Compiler\Llk\TreeNode  $child    Child.
     * @return  \Hoa\Compiler\Llk\TreeNode
     */
    public function appendChild(\Hoa\Compiler\Llk\TreeNode $child)
    {
        $this->_children[] = $child;
        return $this;
    }
    /**
     * Set children.
     *
     * @param   array  $children    Children.
     * @return  array
     */
    public function setChildren(array $children)
    {
        $old = $this->_children;
        $this->_children = $children;
        return $old;
    }
    /**
     * Get child.
     *
     * @param   int  $i    Index.
     * @return  \Hoa\Compiler\Llk\TreeNode
     */
    public function getChild($i)
    {
        return \true === $this->childExists($i) ? $this->_children[$i] : null;
    }
    /**
     * Get children.
     *
     * @return  array
     */
    public function getChildren()
    {
        return $this->_children;
    }
    /**
     * Get number of children.
     *
     * @return  int
     */
    public function getChildrenNumber()
    {
        return \count($this->_children);
    }
    /**
     * Check if a child exists.
     *
     * @param   int  $i    Index.
     * @return  bool
     */
    public function childExists($i)
    {
        return \array_key_exists($i, $this->_children);
    }
    /**
     * Set parent.
     *
     * @param   \Hoa\Compiler\Llk\TreeNode  $parent    Parent.
     * @return  \Hoa\Compiler\Llk\TreeNode
     */
    public function setParent(\Hoa\Compiler\Llk\TreeNode $parent)
    {
        $old = $this->_parent;
        $this->_parent = $parent;
        return $old;
    }
    /**
     * Get parent.
     *
     * @return  \Hoa\Compiler\Llk\TreeNode
     */
    public function getParent()
    {
        return $this->_parent;
    }
    /**
     * Get data.
     *
     * @return  array
     */
    public function &getData()
    {
        return $this->_data;
    }
    /**
     * Accept a visitor.
     *
     * @param   \Hoa\Visitor\Visit  $visitor    Visitor.
     * @param   mixed               &$handle    Handle (reference).
     * @param   mixed               $eldnah     Handle (no reference).
     * @return  mixed
     */
    public function accept(Visitor\Visit $visitor, &$handle = null, $eldnah = null)
    {
        return $visitor->visit($this, $handle, $eldnah);
    }
    /**
     * Remove circular reference to the parent (help the garbage collector).
     *
     * @return  void
     */
    public function __destruct()
    {
        unset($this->_parent);
        return;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler\Llk\Sampler;

use Hoa\Compiler;
use Hoa\Iterator;
/**
 * Class \Hoa\Compiler\Llk\Sampler\Coverage.
 *
 * This generator aims at producing data that activate all the branches of the
 * grammar rules.
 * A rule is said to be covered if and only if its sub-rules have all been
 * covered. A token is said to be covered if it has been successfully used in a
 * data generation.
 * To ensure diversity, a random choice is made amongst the remaining sub-rules
 * of a choice-point to cover.
 * Finally, we use boundary test generation heuristics to avoid combinatorial
 * explosion and guarantee the termination, i.e. we bound repetition operators
 * as follow:
 *      • * is bounded to 0, 1 or 2;
 *      • + is unfolded 1 or 2 times;
 *      • {x,y} is unfolded x, x + 1, y - 1 and y times.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Coverage extends \Hoa\Compiler\Llk\Sampler\Sampler implements Iterator
{
    /**
     * Stack of rules to explore.
     *
     * @var array
     */
    protected $_todo = null;
    /**
     * Stack of rules that have already been covered.
     *
     * @var array
     */
    protected $_trace = null;
    /**
     * Produced test cases.
     *
     * @var array
     */
    protected $_tests = null;
    /**
     * Covered rules: ruleName to structure that contains the choice point and
     * 0 for uncovered, 1 for covered, -1 for failed and .5 for in progress.
     *
     * @var array
     */
    protected $_coveredRules = null;
    /**
     * Current iterator key.
     *
     * @var int
     */
    protected $_key = -1;
    /**
     * Current iterator value.
     *
     * @var string
     */
    protected $_current = null;
    /**
     * Get the current iterator value.
     *
     * @return  string
     */
    public function current()
    {
        return $this->_current;
    }
    /**
     * Get the current iterator key.
     *
     * @return  int
     */
    public function key()
    {
        return $this->_key;
    }
    /**
     * Useless here.
     *
     * @return  void
     */
    public function next()
    {
        return;
    }
    /**
     * Rewind the internal iterator pointer.
     *
     * @return  void
     */
    public function rewind()
    {
        $this->_key = -1;
        $this->_current = null;
        $this->_tests = [];
        $this->_coveredRules = [];
        foreach ($this->_rules as $name => $rule) {
            $this->_coveredRules[$name] = [];
            if ($rule instanceof Compiler\Llk\Rule\Repetition) {
                $min = $rule->getMin();
                $min1 = $min + 1;
                $max = -1 == $rule->getMax() ? 2 : $rule->getMax();
                $max1 = $max - 1;
                if ($min == $max) {
                    $this->_coveredRules[$name][$min] = 0;
                } else {
                    $this->_coveredRules[$name][$min] = 0;
                    $this->_coveredRules[$name][$min1] = 0;
                    $this->_coveredRules[$name][$max1] = 0;
                    $this->_coveredRules[$name][$max] = 0;
                }
            } elseif ($rule instanceof Compiler\Llk\Rule\Choice) {
                for ($i = 0, $max = \count($rule->getChildren()); $i < $max; ++$i) {
                    $this->_coveredRules[$name][$i] = 0;
                }
            } else {
                $this->_coveredRules[$name][0] = 0;
            }
        }
        return;
    }
    /**
     * Compute the current iterator value, i.e. generate a new solution.
     *
     * @return  bool
     */
    public function valid()
    {
        $ruleName = $this->_rootRuleName;
        if (\true !== \in_array(0, $this->_coveredRules[$ruleName]) && \true !== \in_array(0.5, $this->_coveredRules[$ruleName])) {
            return \false;
        }
        $this->_trace = [];
        $this->_todo = [new Compiler\Llk\Rule\Entry($ruleName, $this->_coveredRules)];
        $result = $this->unfold();
        if (\true !== $result) {
            return \false;
        }
        $handle = null;
        foreach ($this->_trace as $trace) {
            if ($trace instanceof Compiler\Llk\Rule\Token) {
                $handle .= $this->generateToken($trace);
            }
        }
        ++$this->_key;
        $this->_current = $handle;
        $this->_tests[] = $this->_trace;
        foreach ($this->_coveredRules as $key => $value) {
            foreach ($value as $k => $v) {
                if (-1 == $v) {
                    $this->_coveredRules[$key][$k] = 0;
                }
            }
        }
        return \true;
    }
    /**
     * Unfold rules from the todo stack.
     *
     * @return  bool
     */
    protected function unfold()
    {
        while (0 < \count($this->_todo)) {
            $pop = \array_pop($this->_todo);
            if ($pop instanceof Compiler\Llk\Rule\Ekzit) {
                $this->_trace[] = $pop;
                $this->updateCoverage($pop);
            } else {
                $out = $this->coverage($this->_rules[$pop->getRule()]);
                if (\true !== $out && \true !== $this->backtrack()) {
                    return \false;
                }
            }
        }
        return \true;
    }
    /**
     * The coverage algorithm.
     *
     * @param   \Hoa\Compiler\Llk\Rule  $rule    Rule to cover.
     * @return  bool
     */
    protected function coverage(Compiler\Llk\Rule $rule)
    {
        $children = $rule->getChildren();
        if ($rule instanceof Compiler\Llk\Rule\Repetition) {
            $uncovered = [];
            $inprogress = [];
            $already = [];
            foreach ($this->_coveredRules[$rule->getName()] as $child => $value) {
                if (0 == $value || 0.5 == $value) {
                    $uncovered[] = $child;
                } elseif (-1 == $value) {
                    $inprogress[] = $child;
                } else {
                    $already[] = $child;
                }
            }
            if (empty($uncovered)) {
                if (empty($already)) {
                    $rand = $inprogress[\rand(0, \count($inprogress) - 1)];
                } else {
                    $rand = $already[\rand(0, \count($already) - 1)];
                }
                $this->_trace[] = new Compiler\Llk\Rule\Entry($rule->getName(), $this->_coveredRules, $this->_todo);
                $this->_todo[] = new Compiler\Llk\Rule\Ekzit($rule->getName(), $rand);
                if ($this->_rules[$children] instanceof Compiler\Llk\Rule\Token) {
                    for ($i = 0; $i < $rand; ++$i) {
                        $this->_todo[] = new Compiler\Llk\Rule\Entry($children, $this->_coveredRules, $this->_todo);
                    }
                } else {
                    $sequence = $this->extract([$children]);
                    if (null === $sequence) {
                        return null;
                    }
                    for ($i = 0; $i < $rand; ++$i) {
                        foreach ($sequence as $seq) {
                            $this->_trace[] = $seq;
                            if ($seq instanceof Compiler\Llk\Rule\Ekzit) {
                                $this->updateCoverage($seq);
                            }
                        }
                    }
                }
            } else {
                $rand = $uncovered[\rand(0, \count($uncovered) - 1)];
                $this->_coveredRules[$rule->getName()][$rand] = -1;
                $this->_trace[] = new Compiler\Llk\Rule\Entry($rule->getName(), $this->_coveredRules, $this->_todo);
                $this->_todo[] = new Compiler\Llk\Rule\Ekzit($rule->getName(), $rand);
                for ($i = 0; $i < $rand; ++$i) {
                    $this->_todo[] = new Compiler\Llk\Rule\Entry($children, $this->_coveredRules, $this->_todo);
                }
            }
            return \true;
        } elseif ($rule instanceof Compiler\Llk\Rule\Choice) {
            $uncovered = [];
            $inprogress = [];
            $already = [];
            foreach ($this->_coveredRules[$rule->getName()] as $child => $value) {
                if (0 == $value || 0.5 == $value) {
                    $uncovered[] = $child;
                } elseif (-1 == $value) {
                    $inprogress[] = $child;
                } else {
                    $already[] = $child;
                }
            }
            if (empty($uncovered)) {
                $this->_trace[] = new Compiler\Llk\Rule\Entry($rule->getName(), $this->_coveredRules, $this->_todo);
                $sequence = $this->extract($children);
                if (null === $sequence) {
                    return null;
                }
                foreach ($sequence as $seq) {
                    $this->_trace[] = $seq;
                    if ($seq instanceof Compiler\Llk\Rule\Ekzit) {
                        $this->updateCoverage($seq);
                    }
                }
                if (empty($already)) {
                    $rand = $inprogress[\rand(0, \count($inprogress) - 1)];
                } else {
                    $rand = $already[\rand(0, \count($already) - 1)];
                }
                $this->_todo[] = new Compiler\Llk\Rule\Ekzit($rule->getName(), $rand);
            } else {
                $rand = $uncovered[\rand(0, \count($uncovered) - 1)];
                $this->_trace[] = new Compiler\Llk\Rule\Entry($rule->getName(), $this->_coveredRules, $this->_todo);
                $this->_coveredRules[$rule->getName()][$rand] = -1;
                $this->_todo[] = new Compiler\Llk\Rule\Ekzit($rule->getName(), $rand);
                $this->_todo[] = new Compiler\Llk\Rule\Entry($children[$rand], $this->_coveredRules, $this->_todo);
            }
            return \true;
        } elseif ($rule instanceof Compiler\Llk\Rule\Concatenation) {
            $this->_coveredRules[$rule->getName()][0] = -1;
            $this->_trace[] = new Compiler\Llk\Rule\Entry($rule->getName(), \false);
            $this->_todo[] = new Compiler\Llk\Rule\Ekzit($rule->getName(), \false);
            for ($i = \count($children) - 1; $i >= 0; --$i) {
                $this->_todo[] = new Compiler\Llk\Rule\Entry($children[$i], \false, $this->_todo);
            }
            return \true;
        } elseif ($rule instanceof Compiler\Llk\Rule\Token) {
            $this->_trace[] = new Compiler\Llk\Rule\Entry($rule->getName(), \false);
            $this->_trace[] = $rule;
            $this->_todo[] = new Compiler\Llk\Rule\Ekzit($rule->getName(), \false);
            return \true;
        }
        return \false;
    }
    /**
     * Extract a given sequence from existing traces.
     *
     * @param   array  $rules    Rules to consider.
     * @return  array
     */
    protected function extract(array $rules)
    {
        $out = [];
        foreach ($rules as $rule) {
            foreach ($this->_tests as $test) {
                $opened = 0;
                foreach ($test as $t) {
                    if ($t instanceof Compiler\Llk\Rule\Entry && $t->getRule() == $rule) {
                        ++$opened;
                    }
                    if (0 < $opened) {
                        $out[] = $t;
                        if ($t instanceof Compiler\Llk\Rule\Ekzit && $t->getRule() == $rule) {
                            --$opened;
                            if (0 === $opened) {
                                return $out;
                            }
                        }
                    }
                }
            }
        }
        foreach ($rules as $rule) {
            $out = [];
            $closed = 0;
            foreach ($this->_trace as $t) {
                if ($t instanceof Compiler\Llk\Rule\Ekzit && $t->getRule() == $rule) {
                    ++$closed;
                }
                if (0 < $closed) {
                    $out[] = $t;
                    if ($t instanceof Compiler\Llk\Rule\Ekzit && $t->getRule() == $rule) {
                        --$closed;
                        if (0 === $closed) {
                            return \array_reverse($out);
                        }
                    }
                }
            }
        }
        return null;
    }
    /**
     * Backtrack to the previous choice-point.
     *
     * @return  bool
     */
    protected function backtrack()
    {
        $found = \false;
        do {
            $pop = \array_pop($this->_trace);
            if ($pop instanceof Compiler\Llk\Rule\Entry) {
                $rule = $this->_rules[$pop->getRule()];
                $found = $rule instanceof Compiler\Llk\Rule\Choice || $rule instanceof Compiler\Llk\Rule\Repetition;
            }
        } while (0 < \count($this->_trace) && \false === $found);
        if (\false === $found) {
            return \false;
        }
        $ruleName = $pop->getRule();
        $this->_covered = $pop->getData();
        $this->_todo = $pop->getTodo();
        $this->_todo[] = new Compiler\Llk\Rule\Entry($ruleName, $this->_covered, $this->_todo);
        return \true;
    }
    /**
     * Update coverage of a rule.
     *
     * @param   \Hoa\Compiler\Llk\Rule\Ekzit  $rule    Rule to consider.
     * @return  void
     */
    protected function updateCoverage(Compiler\Llk\Rule\Ekzit $Rule)
    {
        $ruleName = $Rule->getRule();
        $child = $Rule->getData();
        $rule = $this->_rules[$ruleName];
        $children = $rule->getChildren();
        if ($rule instanceof Compiler\Llk\Rule\Repetition) {
            if (0 === $child) {
                $this->_coveredRules[$ruleName][$child] = 1;
            } else {
                if (\true === $this->allCovered($children) || \true === $this->checkRuleRoot($children)) {
                    $this->_coveredRules[$ruleName][$child] = 1;
                    foreach ($this->_coveredRules[$ruleName] as $child => $value) {
                        if (0.5 == $value) {
                            $this->_coveredRules[$ruleName][$child] = 1;
                        }
                    }
                } else {
                    $this->_coveredRules[$ruleName][$child] = 0.5;
                }
            }
        } elseif ($rule instanceof Compiler\Llk\Rule\Choice) {
            if (\true === $this->allCovered($children[$child]) || \true === $this->checkRuleRoot($children[$child])) {
                $this->_coveredRules[$ruleName][$child] = 1;
            } else {
                $this->_coveredRules[$ruleName][$child] = 0.5;
            }
        } elseif ($rule instanceof Compiler\Llk\Rule\Concatenation) {
            $isCovered = \true;
            for ($i = \count($children) - 1; $i >= 0 && \true === $isCovered; --$i) {
                if (\false === $this->allCovered($children[$i]) && \false === $this->checkRuleRoot($children[$i])) {
                    $isCovered = \false;
                }
            }
            $this->_coveredRules[$ruleName][0] = \true === $isCovered ? 1 : 0.5;
        } elseif ($rule instanceof Compiler\Llk\Rule\Token) {
            $this->_coveredRules[$ruleName][0] = 1;
        }
        return;
    }
    /**
     * Check if all rules have been entirely covered.
     *
     * @param   string  $ruleName    Rule name.
     * @return  bool
     */
    protected function allCovered($ruleName)
    {
        foreach ($this->_coveredRules[$ruleName] as $value) {
            if (1 !== $value) {
                return \false;
            }
        }
        return \true;
    }
    /**
     * Check if a rule is a root rule that is currently being processed.
     *
     * @param   string  $ruleName    Rule name.
     * @return  bool
     */
    protected function checkRuleRoot($ruleName)
    {
        if (\true === $this->_rules[$ruleName]->isTransitional()) {
            return \false;
        }
        $i = \count($this->_trace) - 1;
        $nb = 0;
        while ($i >= 0) {
            $lastRule = $this->_trace[$i];
            if ($lastRule instanceof Compiler\Llk\Rule\Entry) {
                if ($lastRule->getRule() == $ruleName) {
                    ++$nb;
                }
            } elseif ($lastRule instanceof Compiler\Llk\Rule\Ekzit) {
                if ($lastRule->getRule() == $ruleName) {
                    --$nb;
                }
            }
            --$i;
        }
        return 0 < $nb;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler\Llk\Sampler;

use Hoa\Compiler;
use Hoa\Iterator;
use Hoa\Visitor;
/**
 * Class \Hoa\Compiler\Llk\Sampler\BoundedExhaustive.
 *
 * This generator aims at producing all possible data (exhaustive) up to a given
 * size n (bounded).
 * This algorithm is based on multiset (set with repetition).
 * Repetition unfolding: upper bound of + and * is set to n.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class BoundedExhaustive extends \Hoa\Compiler\Llk\Sampler\Sampler implements Iterator
{
    /**
     * Stack of rules to explore.
     *
     * @var array
     */
    protected $_todo = null;
    /**
     * Stack of rules that have already been covered.
     *
     * @var array
     */
    protected $_trace = null;
    /**
     * Current iterator key.
     *
     * @var int
     */
    protected $_key = -1;
    /**
     * Current iterator value.
     *
     * @var string
     */
    protected $_current = null;
    /**
     * Bound.
     *
     * @var int
     */
    protected $_length = 5;
    /**
     * Construct a generator.
     *
     * @param   \Hoa\Compiler\Llk\Parser  $compiler        Compiler/parser.
     * @param   \Hoa\Visitor\Visit        $tokenSampler    Token sampler.
     * @param   int                       $length          Max data length.
     */
    public function __construct(Compiler\Llk\Parser $compiler, Visitor\Visit $tokenSampler, $length = 5)
    {
        parent::__construct($compiler, $tokenSampler);
        $this->setLength($length);
        return;
    }
    /**
     * Get the current iterator value.
     *
     * @return  string
     */
    public function current()
    {
        return $this->_current;
    }
    /**
     * Get the current iterator key.
     *
     * @return  int
     */
    public function key()
    {
        return $this->_key;
    }
    /**
     * Useless here.
     *
     * @return  void
     */
    public function next()
    {
        return;
    }
    /**
     * Rewind the internal iterator pointer.
     *
     * @return  void
     */
    public function rewind()
    {
        $ruleName = $this->_rootRuleName;
        $this->_current = null;
        $this->_key = -1;
        $this->_trace = [];
        $handle = new Compiler\Llk\Rule\Ekzit($ruleName, 0);
        $this->_todo = [$handle, new Compiler\Llk\Rule\Entry($ruleName, 0, [$handle])];
        return;
    }
    /**
     * Compute the current iterator value, i.e. generate a new solution.
     *
     * @return  bool
     */
    public function valid()
    {
        if (\false === $this->unfold()) {
            return \false;
        }
        $handle = null;
        foreach ($this->_trace as $trace) {
            if ($trace instanceof Compiler\Llk\Rule\Token) {
                $handle .= $this->generateToken($trace);
            }
        }
        ++$this->_key;
        $this->_current = $handle;
        return $this->backtrack();
    }
    /**
     * Unfold rules from the todo stack.
     *
     * @return  bool
     */
    protected function unfold()
    {
        while (0 < \count($this->_todo)) {
            $pop = \array_pop($this->_todo);
            if ($pop instanceof Compiler\Llk\Rule\Ekzit) {
                $this->_trace[] = $pop;
            } else {
                $ruleName = $pop->getRule();
                $next = $pop->getData();
                $rule = $this->_rules[$ruleName];
                $out = $this->boundedExhaustive($rule, $next);
                if (\true !== $out && \true !== $this->backtrack()) {
                    return \false;
                }
            }
        }
        return \true;
    }
    /**
     * The bounded-exhaustive algorithm.
     *
     * @param   \Hoa\Compiler\Llk\Rule  $rule    Rule to cover.
     * @param   int                     $next    Next rule.
     * @return  bool
     */
    protected function boundedExhaustive(Compiler\Llk\Rule $rule, $next)
    {
        $children = $rule->getChildren();
        if ($rule instanceof Compiler\Llk\Rule\Repetition) {
            if (0 === $next) {
                $this->_trace[] = new Compiler\Llk\Rule\Entry($rule->getName(), $rule->getMin());
                \array_pop($this->_todo);
                $this->_todo[] = new Compiler\Llk\Rule\Ekzit($rule->getName(), $rule->getMin(), $this->_todo);
                for ($i = 0, $min = $rule->getMin(); $i < $min; ++$i) {
                    $this->_todo[] = new Compiler\Llk\Rule\Ekzit($children, 0);
                    $this->_todo[] = new Compiler\Llk\Rule\Entry($children, 0);
                }
            } else {
                $nbToken = 0;
                foreach ($this->_trace as $trace) {
                    if ($trace instanceof Compiler\Llk\Rule\Token) {
                        ++$nbToken;
                    }
                }
                $max = $rule->getMax();
                if (-1 != $max && $next > $max) {
                    return \false;
                }
                $this->_todo[] = new Compiler\Llk\Rule\Ekzit($rule->getName(), $next, $this->_todo);
                $this->_todo[] = new Compiler\Llk\Rule\Ekzit($children, 0);
                $this->_todo[] = new Compiler\Llk\Rule\Entry($children, 0);
            }
            return \true;
        } elseif ($rule instanceof Compiler\Llk\Rule\Choice) {
            if (\count($children) <= $next) {
                return \false;
            }
            $this->_trace[] = new Compiler\Llk\Rule\Entry($rule->getName(), $next, $this->_todo);
            $nextRule = $children[$next];
            $this->_todo[] = new Compiler\Llk\Rule\Ekzit($nextRule, 0);
            $this->_todo[] = new Compiler\Llk\Rule\Entry($nextRule, 0);
            return \true;
        } elseif ($rule instanceof Compiler\Llk\Rule\Concatenation) {
            $this->_trace[] = new Compiler\Llk\Rule\Entry($rule->getName(), $next);
            for ($i = \count($children) - 1; $i >= 0; --$i) {
                $nextRule = $children[$i];
                $this->_todo[] = new Compiler\Llk\Rule\Ekzit($nextRule, 0);
                $this->_todo[] = new Compiler\Llk\Rule\Entry($nextRule, 0);
            }
            return \true;
        } elseif ($rule instanceof Compiler\Llk\Rule\Token) {
            $nbToken = 0;
            foreach ($this->_trace as $trace) {
                if ($trace instanceof Compiler\Llk\Rule\Token) {
                    ++$nbToken;
                }
            }
            if ($nbToken >= $this->getLength()) {
                return \false;
            }
            $this->_trace[] = $rule;
            \array_pop($this->_todo);
            return \true;
        }
        return \false;
    }
    /**
     * Backtrack to the previous choice-point.
     *
     * @return  bool
     */
    protected function backtrack()
    {
        $found = \false;
        do {
            $last = \array_pop($this->_trace);
            if ($last instanceof Compiler\Llk\Rule\Entry) {
                $rule = $this->_rules[$last->getRule()];
                $found = $rule instanceof Compiler\Llk\Rule\Choice;
            } elseif ($last instanceof Compiler\Llk\Rule\Ekzit) {
                $rule = $this->_rules[$last->getRule()];
                $found = $rule instanceof Compiler\Llk\Rule\Repetition;
            }
        } while (0 < \count($this->_trace) && \false === $found);
        if (\false === $found) {
            return \false;
        }
        $rule = $last->getRule();
        $next = $last->getData() + 1;
        $this->_todo = $last->getTodo();
        $this->_todo[] = new Compiler\Llk\Rule\Entry($rule, $next, $this->_todo);
        return \true;
    }
    /**
     * Set upper-bound, the maximum data length.
     *
     * @param   int  $length    Length.
     * @return  int
     * @throws  \Hoa\Compiler\Exception
     */
    public function setLength($length)
    {
        if (0 >= $length) {
            throw new \Hoa\Compiler\Llk\Sampler\Exception('Length must be greater than 0, given %d.', 0, $length);
        }
        $old = $this->_length;
        $this->_length = $length;
        return $old;
    }
    /**
     * Get upper-bound.
     *
     * @return  int
     */
    public function getLength()
    {
        return $this->_length;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler\Llk\Sampler;

use Hoa\Compiler;
use Hoa\Consistency;
use Hoa\Visitor;
/**
 * Class \Hoa\Compiler\Llk\Sampler.
 *
 * Sampler parent.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
abstract class Sampler
{
    /**
     * Compiler.
     *
     * @var \Hoa\Compiler\Llk\Parser
     */
    protected $_compiler = null;
    /**
     * Tokens.
     *
     * @var array
     */
    protected $_tokens = null;
    /**
     * All rules (from the compiler).
     *
     * @var array
     */
    protected $_rules = null;
    /**
     * Token sampler.
     *
     * @var \Hoa\Visitor\Visit
     */
    protected $_tokenSampler = null;
    /**
     * Root rule name.
     *
     * @var string
     */
    protected $_rootRuleName = null;
    /**
     * Current token namespace.
     *
     * @var string
     */
    protected $_currentNamespace = 'default';
    /**
     * Skip tokens AST.
     *
     * @var array
     */
    protected $_skipTokenAST = [];
    /**
     * Construct a generator.
     *
     * @param   \Hoa\Compiler\Llk\Parser  $compiler        Compiler/parser.
     * @param   \Hoa\Visitor\Visit        $tokenSampler    Token sampler.
     */
    public function __construct(Compiler\Llk\Parser $compiler, Visitor\Visit $tokenSampler)
    {
        $this->_compiler = $compiler;
        $this->_tokens = $compiler->getTokens();
        $this->_rules = $compiler->getRules();
        $this->_tokenSampler = $tokenSampler;
        $this->_rootRuleName = $compiler->getRootRule();
        return;
    }
    /**
     * Get compiler.
     *
     * @return  \Hoa\Compiler\Llk\Parser
     */
    public function getCompiler()
    {
        return $this->_compiler;
    }
    /**
     * Get the AST of the current namespace skip token.
     *
     * @return  \Hoa\Compiler\Llk\TreeNode
     */
    protected function getSkipTokenAST()
    {
        if (!isset($this->_skipTokenAST[$this->_currentNamespace])) {
            $token = new Compiler\Llk\Rule\Token(-1, 'skip', null, -1);
            $token->setRepresentation($this->_tokens[$this->_currentNamespace]['skip']);
            $this->_skipTokenAST[$this->_currentNamespace] = $token->getAST();
        }
        return $this->_skipTokenAST[$this->_currentNamespace];
    }
    /**
     * Complete a token (namespace and representation).
     * It returns the next namespace.
     *
     * @param   \Hoa\Compiler\Llk\Rule\Token  $token    Token.
     * @return  string
     */
    protected function completeToken(Compiler\Llk\Rule\Token $token)
    {
        if (null !== $token->getRepresentation()) {
            return $this->_currentNamespace;
        }
        $name = $token->getTokenName();
        $token->setNamespace($this->_currentNamespace);
        $toNamespace = $this->_currentNamespace;
        if (isset($this->_tokens[$this->_currentNamespace][$name])) {
            $token->setRepresentation($this->_tokens[$this->_currentNamespace][$name]);
        } else {
            foreach ($this->_tokens[$this->_currentNamespace] as $_name => $regex) {
                if (\false === \strpos($_name, ':')) {
                    continue;
                }
                list($_name, $toNamespace) = \explode(':', $_name, 2);
                if ($_name === $name) {
                    break;
                }
            }
            $token->setRepresentation($regex);
        }
        return $toNamespace;
    }
    /**
     * Set current token namespace.
     *
     * @param   string  $namespace    Token namespace.
     * @return  string
     */
    protected function setCurrentNamespace($namespace)
    {
        $old = $this->_currentNamespace;
        $this->_currentNamespace = $namespace;
        return $old;
    }
    /**
     * Generate a token value.
     * Complete and set next token namespace.
     *
     * @param   \Hoa\Compiler\Llk\Rule\Token  $token    Token.
     * @return  string
     */
    protected function generateToken(Compiler\Llk\Rule\Token $token)
    {
        $toNamespace = $this->completeToken($token);
        $this->setCurrentNamespace($toNamespace);
        $out = $this->_tokenSampler->visit($token->getAST());
        if (isset($this->_tokens[$this->_currentNamespace]['skip'])) {
            $out .= $this->_tokenSampler->visit($this->getSkipTokenAST());
        }
        return $out;
    }
}
/**
 * Flex entity.
 */
Consistency::flexEntity('Hoa\\Compiler\\Llk\\Sampler\\Sampler');
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler\Llk\Sampler;

use Hoa\Compiler;
use Hoa\Math;
use Hoa\Visitor;
/**
 * Class \Hoa\Compiler\Llk\Sampler\Uniform.
 *
 * This generator aims at producing random and uniform a sequence of a fixed
 * size. We use the recursive method to count all possible sub-structures of
 * size n. The counting helps to compute cumulative distribution functions,
 * which guide the exploration.
 * Repetition unfolding: upper bound of + and * is set to n.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Uniform extends \Hoa\Compiler\Llk\Sampler\Sampler
{
    /**
     * Data (pre-computing).
     *
     * @var array
     */
    protected $_data = [];
    /**
     * Bound.
     *
     * @var int
     */
    protected $_length = 5;
    /**
     * Construct a generator.
     *
     * @param   \Hoa\Compiler\Llk\Parser  $compiler        Compiler/parser.
     * @param   \Hoa\Visitor\Visit        $tokenSampler    Token sampler.
     */
    public function __construct(Compiler\Llk\Parser $compiler, Visitor\Visit $tokenSampler, $length = 5)
    {
        parent::__construct($compiler, $tokenSampler);
        foreach ($this->_rules as $name => $_) {
            $this->_data[$name] = [];
        }
        $this->setLength($length);
        $this->_sampler = new Math\Sampler\Random();
        return;
    }
    /**
     * The random and uniform algorithm.
     *
     * @param   \Hoa\Compiler\Llk\Rule  $rule    Rule to start.
     * @param   int                     $n       Size.
     * @return  string
     */
    public function uniform(Compiler\Llk\Rule $rule = null, $n = -1)
    {
        if (null === $rule && -1 === $n) {
            $rule = $this->_rules[$this->_rootRuleName];
            $n = $this->getLength();
        }
        $data =& $this->_data[$rule->getName()][$n];
        $computed = $data['n'];
        if (0 === $n || 0 === $computed) {
            return null;
        }
        if ($rule instanceof Compiler\Llk\Rule\Choice) {
            $children = $rule->getChildren();
            $stat = [];
            foreach ($children as $c => $child) {
                $stat[$c] = $this->_data[$child][$n]['n'];
            }
            $i = $this->_sampler->getInteger(1, $computed);
            for ($e = 0, $b = $stat[$e], $max = \count($stat) - 1; $e < $max && $i > $b; $b += $stat[++$e]) {
            }
            return $this->uniform($this->_rules[$children[$e]], $n);
        } elseif ($rule instanceof Compiler\Llk\Rule\Concatenation) {
            $children = $rule->getChildren();
            $out = null;
            $Γ = $data['Γ'];
            $γ = $Γ[$this->_sampler->getInteger(0, \count($Γ) - 1)];
            foreach ($children as $i => $child) {
                $out .= $this->uniform($this->_rules[$child], $γ[$i]);
            }
            return $out;
        } elseif ($rule instanceof Compiler\Llk\Rule\Repetition) {
            $out = null;
            $stat =& $data['xy'];
            $child = $this->_rules[$rule->getChildren()];
            $b = 0;
            $i = $this->_sampler->getInteger(1, $computed);
            foreach ($stat as $α => $st) {
                if ($i <= ($b += $st['n'])) {
                    break;
                }
            }
            $Γ =& $st['Γ'];
            $γ =& $Γ[$this->_sampler->getInteger(0, \count($Γ) - 1)];
            for ($j = 0; $j < $α; ++$j) {
                $out .= $this->uniform($child, $γ[$j]);
            }
            return $out;
        } elseif ($rule instanceof Compiler\Llk\Rule\Token) {
            return $this->generateToken($rule);
        }
        return null;
    }
    /**
     * Recursive method applied to our problematic.
     *
     * @param   \Hoa\Compiler\Llk\Rule  $rule    Rule to start.
     * @param   int                     $n       Size.
     * @return  int
     */
    public function count(Compiler\Llk\Rule $rule = null, $n = -1)
    {
        if (null === $rule || -1 === $n) {
            return 0;
        }
        $ruleName = $rule->getName();
        if (isset($this->_data[$ruleName][$n])) {
            return $this->_data[$ruleName][$n]['n'];
        }
        $this->_data[$ruleName][$n] = ['n' => 0];
        $out =& $this->_data[$ruleName][$n]['n'];
        $rule = $this->_rules[$ruleName];
        if ($rule instanceof Compiler\Llk\Rule\Choice) {
            foreach ($rule->getChildren() as $child) {
                $out += $this->count($this->_rules[$child], $n);
            }
        } elseif ($rule instanceof Compiler\Llk\Rule\Concatenation) {
            $children = $rule->getChildren();
            $Γ = new Math\Combinatorics\Combination\Gamma(\count($children), $n);
            $this->_data[$ruleName][$n]['Γ'] = [];
            $handle =& $this->_data[$ruleName][$n]['Γ'];
            foreach ($Γ as $γ) {
                $oout = 1;
                foreach ($γ as $α => $_γ) {
                    $oout *= $this->count($this->_rules[$children[$α]], $_γ);
                }
                if (0 !== $oout) {
                    $handle[] = $γ;
                }
                $out += $oout;
            }
        } elseif ($rule instanceof Compiler\Llk\Rule\Repetition) {
            $this->_data[$ruleName][$n]['xy'] = [];
            $handle =& $this->_data[$ruleName][$n]['xy'];
            $child = $this->_rules[$rule->getChildren()];
            $x = $rule->getMin();
            $y = $rule->getMax();
            if (-1 === $y) {
                $y = $n;
            } else {
                $y = \min($n, $y);
            }
            if (0 === $x && $x === $y) {
                $out = 1;
            } else {
                for ($α = $x; $α <= $y; ++$α) {
                    $ut = 0;
                    $handle[$α] = ['n' => 0, 'Γ' => []];
                    $Γ = new Math\Combinatorics\Combination\Gamma($α, $n);
                    foreach ($Γ as $γ) {
                        $oout = 1;
                        foreach ($γ as $β => $_γ) {
                            $oout *= $this->count($child, $_γ);
                        }
                        if (0 !== $oout) {
                            $handle[$α]['Γ'][] = $γ;
                        }
                        $ut += $oout;
                    }
                    $handle[$α]['n'] = $ut;
                    $out += $ut;
                }
            }
        } elseif ($rule instanceof Compiler\Llk\Rule\Token) {
            $out = Math\Util::δ($n, 1);
        }
        return $out;
    }
    /**
     * Set upper-bound, the maximum data length.
     *
     * @param   int  $length    Length.
     * @return  int
     * @throws  \Hoa\Compiler\Exception
     */
    public function setLength($length)
    {
        if (0 >= $length) {
            throw new \Hoa\Compiler\Llk\Sampler\Exception('Length must be greater than 0, given %d.', 0, $length);
        }
        $old = $this->_length;
        $this->_length = $length;
        $this->count($this->_compiler->getRule($this->_rootRuleName), $length);
        return $old;
    }
    /**
     * Get upper-bound.
     *
     * @return  int
     */
    public function getLength()
    {
        return $this->_length;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler\Llk\Sampler;

use Hoa\Compiler;
/**
 * Class \Hoa\Compiler\Llk\Sampler\Exception.
 *
 * Extending the \Hoa\Compiler\Exception class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Exception extends Compiler\Exception
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler\Llk;

use Hoa\Compiler;
use Hoa\Consistency;
use Hoa\Stream;
/**
 * Class \Hoa\Compiler\Llk.
 *
 * This class provides a set of static helpers to manipulate (load and save) a
 * compiler more easily.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
abstract class Llk
{
    /**
     * Load in-memory parser from a grammar description file.
     * The grammar description language is PP. See
     * `hoa://Library/Compiler/Llk/Llk.pp` for an example, or the documentation.
     *
     * @param   \Hoa\Stream\IStream\In  $stream    Stream to read to grammar.
     * @return  \Hoa\Compiler\Llk\Parser
     * @throws  \Hoa\Compiler\Exception
     */
    public static function load(Stream\IStream\In $stream)
    {
        $pp = $stream->readAll();
        if (empty($pp)) {
            $message = 'The grammar is empty';
            if ($stream instanceof Stream\IStream\Pointable) {
                if (0 < $stream->tell()) {
                    $message .= ': The stream ' . $stream->getStreamName() . ' is pointable and not rewinded, maybe it ' . 'could be the reason';
                } else {
                    $message .= ': Nothing to read on the stream ' . $stream->getStreamName();
                }
            }
            throw new Compiler\Exception($message . '.', 0);
        }
        static::parsePP($pp, $tokens, $rawRules, $pragmas, $stream->getStreamName());
        $ruleAnalyzer = new \Hoa\Compiler\Llk\Rule\Analyzer($tokens);
        $rules = $ruleAnalyzer->analyzeRules($rawRules);
        return new \Hoa\Compiler\Llk\Parser($tokens, $rules, $pragmas);
    }
    /**
     * Save in-memory parser to PHP code.
     * The generated PHP code will load the same in-memory parser. The state
     * will be reset. The parser will be saved as a class, named after
     * `$className`. To retrieve the parser, one must instanciate this class.
     *
     * @param   \Hoa\Compiler\Llk\Parser  $parser       Parser to save.
     * @param   string                    $className    Parser classname.
     * @return  string
     */
    public static function save(\Hoa\Compiler\Llk\Parser $parser, $className)
    {
        $out = null;
        $outTokens = null;
        $outRules = null;
        $outPragmas = null;
        $outExtra = null;
        $escapeRuleName = function ($ruleName) use($parser) {
            if (\true == $parser->getRule($ruleName)->isTransitional()) {
                return $ruleName;
            }
            return '\'' . $ruleName . '\'';
        };
        foreach ($parser->getTokens() as $namespace => $tokens) {
            $outTokens .= '                \'' . $namespace . '\' => [' . "\n";
            foreach ($tokens as $tokenName => $tokenValue) {
                $outTokens .= '                    \'' . $tokenName . '\' => \'' . \str_replace(['\'', '\\\\'], ['\\\'', '\\\\\\'], $tokenValue) . '\',' . "\n";
            }
            $outTokens .= '                ],' . "\n";
        }
        foreach ($parser->getRules() as $rule) {
            $arguments = [];
            // Name.
            $arguments['name'] = $escapeRuleName($rule->getName());
            if ($rule instanceof \Hoa\Compiler\Llk\Rule\Token) {
                // Token name.
                $arguments['tokenName'] = '\'' . $rule->getTokenName() . '\'';
            } else {
                if ($rule instanceof \Hoa\Compiler\Llk\Rule\Repetition) {
                    // Minimum.
                    $arguments['min'] = $rule->getMin();
                    // Maximum.
                    $arguments['max'] = $rule->getMax();
                }
                // Children.
                $ruleChildren = $rule->getChildren();
                if (null === $ruleChildren) {
                    $arguments['children'] = 'null';
                } elseif (\false === \is_array($ruleChildren)) {
                    $arguments['children'] = $escapeRuleName($ruleChildren);
                } else {
                    $arguments['children'] = '[' . \implode(', ', \array_map($escapeRuleName, $ruleChildren)) . ']';
                }
            }
            // Node ID.
            $nodeId = $rule->getNodeId();
            if (null === $nodeId) {
                $arguments['nodeId'] = 'null';
            } else {
                $arguments['nodeId'] = '\'' . $nodeId . '\'';
            }
            if ($rule instanceof \Hoa\Compiler\Llk\Rule\Token) {
                // Unification.
                $arguments['unification'] = $rule->getUnificationIndex();
                // Kept.
                $arguments['kept'] = $rule->isKept() ? 'true' : 'false';
            }
            // Default node ID.
            if (null !== ($defaultNodeId = $rule->getDefaultId())) {
                $defaultNodeOptions = $rule->getDefaultOptions();
                if (!empty($defaultNodeOptions)) {
                    $defaultNodeId .= ':' . \implode('', $defaultNodeOptions);
                }
                $outExtra .= "\n" . '        $this->getRule(' . $arguments['name'] . ')->setDefaultId(' . '\'' . $defaultNodeId . '\'' . ');';
            }
            // PP representation.
            if (null !== ($ppRepresentation = $rule->getPPRepresentation())) {
                $outExtra .= "\n" . '        $this->getRule(' . $arguments['name'] . ')->setPPRepresentation(' . '\'' . \str_replace('\'', '\\\'', $ppRepresentation) . '\'' . ');';
            }
            $outRules .= "\n" . '                ' . $arguments['name'] . ' => new \\' . \get_class($rule) . '(' . \implode(', ', $arguments) . '),';
        }
        foreach ($parser->getPragmas() as $pragmaName => $pragmaValue) {
            $outPragmas .= "\n" . '                \'' . $pragmaName . '\' => ' . (\is_bool($pragmaValue) ? \true === $pragmaValue ? 'true' : 'false' : (\is_int($pragmaValue) ? $pragmaValue : '\'' . $pragmaValue . '\'')) . ',';
        }
        $out .= 'class ' . $className . ' extends \\Hoa\\Compiler\\Llk\\Parser' . "\n" . '{' . "\n" . '    public function __construct()' . "\n" . '    {' . "\n" . '        parent::__construct(' . "\n" . '            [' . "\n" . $outTokens . '            ],' . "\n" . '            [' . $outRules . "\n" . '            ],' . "\n" . '            [' . $outPragmas . "\n" . '            ]' . "\n" . '        );' . "\n" . $outExtra . "\n" . '    }' . "\n" . '}' . "\n";
        return $out;
    }
    /**
     * Parse the grammar description language.
     *
     * @param   string  $pp            Grammar description.
     * @param   array   $tokens        Extracted tokens.
     * @param   array   $rules         Extracted raw rules.
     * @param   array   $pragmas       Extracted raw pragmas.
     * @param   string  $streamName    The name of the stream containing the grammar.
     * @return  void
     * @throws  \Hoa\Compiler\Exception
     */
    public static function parsePP($pp, &$tokens, &$rules, &$pragmas, $streamName)
    {
        $lines = \explode("\n", $pp);
        $pragmas = [];
        $tokens = ['default' => []];
        $rules = [];
        for ($i = 0, $m = \count($lines); $i < $m; ++$i) {
            $line = \rtrim($lines[$i]);
            if (0 === \strlen($line) || '//' == \substr($line, 0, 2)) {
                continue;
            }
            if ('%' == $line[0]) {
                if (0 !== \preg_match('#^%pragma\\h+([^\\h]+)\\h+(.*)$#u', $line, $matches)) {
                    switch ($matches[2]) {
                        case 'true':
                            $pragmaValue = \true;
                            break;
                        case 'false':
                            $pragmaValue = \false;
                            break;
                        default:
                            if (\true === \ctype_digit($matches[2])) {
                                $pragmaValue = \intval($matches[2]);
                            } else {
                                $pragmaValue = $matches[2];
                            }
                    }
                    $pragmas[$matches[1]] = $pragmaValue;
                } elseif (0 !== \preg_match('#^%skip\\h+(?:([^:]+):)?([^\\h]+)\\h+(.*)$#u', $line, $matches)) {
                    if (empty($matches[1])) {
                        $matches[1] = 'default';
                    }
                    if (!isset($tokens[$matches[1]])) {
                        $tokens[$matches[1]] = [];
                    }
                    if (!isset($tokens[$matches[1]]['skip'])) {
                        $tokens[$matches[1]]['skip'] = $matches[3];
                    } else {
                        $tokens[$matches[1]]['skip'] = '(?:' . $tokens[$matches[1]]['skip'] . '|' . $matches[3] . ')';
                    }
                } elseif (0 !== \preg_match('#^%token\\h+(?:([^:]+):)?([^\\h]+)\\h+(.*?)(?:\\h+->\\h+(.*))?$#u', $line, $matches)) {
                    if (empty($matches[1])) {
                        $matches[1] = 'default';
                    }
                    if (isset($matches[4]) && !empty($matches[4])) {
                        $matches[2] = $matches[2] . ':' . $matches[4];
                    }
                    if (!isset($tokens[$matches[1]])) {
                        $tokens[$matches[1]] = [];
                    }
                    $tokens[$matches[1]][$matches[2]] = $matches[3];
                } else {
                    throw new Compiler\Exception('Unrecognized instructions:' . "\n" . '    %s' . "\n" . 'in file %s at line %d.', 1, [$line, $streamName, $i + 1]);
                }
                continue;
            }
            $ruleName = \substr($line, 0, -1);
            $rule = null;
            ++$i;
            while ($i < $m && isset($lines[$i][0]) && (' ' === $lines[$i][0] || "\t" === $lines[$i][0] || '//' === \substr($lines[$i], 0, 2))) {
                if ('//' === \substr($lines[$i], 0, 2)) {
                    ++$i;
                    continue;
                }
                $rule .= ' ' . \trim($lines[$i++]);
            }
            if (isset($lines[$i][0])) {
                --$i;
            }
            $rules[$ruleName] = $rule;
        }
        return;
    }
}
/**
 * Flex entity.
 */
Consistency::flexEntity('Hoa\\Compiler\\Llk\\Llk');
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler\Llk\Rule;

/**
 * Class \Hoa\Compiler\Llk\Rule\Invocation.
 *
 * Parent of entry and ekzit rules.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
abstract class Invocation
{
    /**
     * Rule.
     *
     * @var string
     */
    protected $_rule = null;
    /**
     * Data.
     *
     * @var mixed
     */
    protected $_data = null;
    /**
     * Piece of todo sequence.
     *
     * @var array
     */
    protected $_todo = null;
    /**
     * Depth in the trace.
     *
     * @var int
     */
    protected $_depth = -1;
    /**
     * Whether the rule is transitional or not (i.e. not declared in the grammar
     * but created by the analyzer).
     *
     * @var bool
     */
    protected $_transitional = \false;
    /**
     * Constructor.
     *
     * @param   string  $rule     Rule name.
     * @param   mixed   $data     Data.
     * @param   array   $todo     Todo.
     * @param   int     $depth    Depth.
     */
    public function __construct($rule, $data, array $todo = null, $depth = -1)
    {
        $this->_rule = $rule;
        $this->_data = $data;
        $this->_todo = $todo;
        $this->_depth = $depth;
        $this->_transitional = \is_int($rule);
        return;
    }
    /**
     * Get rule name.
     *
     * @return  string
     */
    public function getRule()
    {
        return $this->_rule;
    }
    /**
     * Get data.
     *
     * @return  mixed
     */
    public function getData()
    {
        return $this->_data;
    }
    /**
     * Get todo sequence.
     *
     * @return  array
     */
    public function getTodo()
    {
        return $this->_todo;
    }
    /**
     * Set depth in trace.
     *
     * @param   int  $depth    Depth.
     * @return  int
     */
    public function setDepth($depth)
    {
        $old = $this->_depth;
        $this->_depth = $depth;
        return $old;
    }
    /**
     * Get depth in trace.
     *
     * @return  int
     */
    public function getDepth()
    {
        return $this->_depth;
    }
    /**
     * Check whether the rule is transitional or not.
     *
     * @return  bool
     */
    public function isTransitional()
    {
        return $this->_transitional;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler\Llk\Rule;

use Hoa\Compiler;
/**
 * Class \Hoa\Compiler\Llk\Rule\Repetition.
 *
 * The repetition rule.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Repetition extends \Hoa\Compiler\Llk\Rule\Rule
{
    /**
     * Minimum bound.
     *
     * @var int
     */
    protected $_min = 0;
    /**
     * Maximum bound.
     *
     * @var int
     */
    protected $_max = 0;
    /**
     * Constructor.
     *
     * @param   string  $name        Name.
     * @param   int     $min         Minimum bound.
     * @param   int     $max         Maximum bound.
     * @param   mixed   $children    Children.
     * @param   string  $nodeId      Node ID.
     */
    public function __construct($name, $min, $max, $children, $nodeId)
    {
        parent::__construct($name, $children, $nodeId);
        $min = \max(0, (int) $min);
        $max = \max(-1, (int) $max);
        if (-1 !== $max && $min > $max) {
            throw new Compiler\Exception\Rule('Cannot repeat with a min (%d) greater than max (%d).', 0, [$min, $max]);
        }
        $this->_min = $min;
        $this->_max = $max;
        return;
    }
    /**
     * Get minimum bound.
     *
     * @return  int
     */
    public function getMin()
    {
        return $this->_min;
    }
    /**
     * Get maximum bound.
     *
     * @return  int
     */
    public function getMax()
    {
        return $this->_max;
    }
    /**
     * Check whether the maximum repetition is unbounded.
     *
     * @return   bool
     */
    public function isInfinite()
    {
        return -1 === $this->getMax();
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler\Llk\Rule;

/**
 * Class \Hoa\Compiler\Llk\Rule\Choice.
 *
 * The choice rule.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Choice extends \Hoa\Compiler\Llk\Rule\Rule
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler\Llk\Rule;

/**
 * Class \Hoa\Compiler\Llk\Rule\Concatenation.
 *
 * The concatenation rule.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Concatenation extends \Hoa\Compiler\Llk\Rule\Rule
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler\Llk\Rule;

use Hoa\Compiler;
use Hoa\Iterator;
/**
 * Class \Hoa\Compiler\Llk\Rule\Analyzer.
 *
 * Analyze rules and transform them into atomic rules operations.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Analyzer
{
    /**
     * PP lexemes.
     */
    protected static $_ppLexemes = ['default' => ['skip' => '\\s', 'or' => '\\|', 'zero_or_one' => '\\?', 'one_or_more' => '\\+', 'zero_or_more' => '\\*', 'n_to_m' => '\\{[0-9]+,[0-9]+\\}', 'zero_to_m' => '\\{,[0-9]+\\}', 'n_or_more' => '\\{[0-9]+,\\}', 'exactly_n' => '\\{[0-9]+\\}', 'skipped' => '::[a-zA-Z_][a-zA-Z0-9_]*(\\[\\d+\\])?::', 'kept' => '<[a-zA-Z_][a-zA-Z0-9_]*(\\[\\d+\\])?>', 'named' => '[a-zA-Z_][a-zA-Z0-9_]*\\(\\)', 'node' => '#[a-zA-Z_][a-zA-Z0-9_]*(:[mM])?', 'capturing_' => '\\(', '_capturing' => '\\)']];
    /**
     * Lexer iterator.
     *
     * @var \Hoa\Iterator\Lookahead
     */
    protected $_lexer = null;
    /**
     * Tokens representing rules.
     *
     * @var array
     */
    protected $_tokens = null;
    /**
     * Rules.
     *
     * @var array
     */
    protected $_rules = null;
    /**
     * Rule name being analyzed.
     *
     * @var string
     */
    private $_ruleName = null;
    /**
     * Parsed rules.
     *
     * @var array
     */
    protected $_parsedRules = null;
    /**
     * Counter to auto-name transitional rules.
     *
     * @var int
     */
    protected $_transitionalRuleCounter = 0;
    /**
     * Constructor.
     *
     * @param   array  $tokens    Tokens.
     */
    public function __construct(array $tokens)
    {
        $this->_tokens = $tokens;
        return;
    }
    /**
     * Build the analyzer of the rules (does not analyze the rules).
     *
     * @param   array  $rules    Rule to be analyzed.
     * @return  void
     * @throws  \Hoa\Compiler\Exception
     */
    public function analyzeRules(array $rules)
    {
        if (empty($rules)) {
            throw new Compiler\Exception\Rule('No rules specified!', 0);
        }
        $this->_parsedRules = [];
        $this->_rules = $rules;
        $lexer = new Compiler\Llk\Lexer();
        foreach ($rules as $key => $value) {
            $this->_lexer = new Iterator\Lookahead($lexer->lexMe($value, static::$_ppLexemes));
            $this->_lexer->rewind();
            $this->_ruleName = $key;
            $nodeId = null;
            if ('#' === $key[0]) {
                $nodeId = $key;
                $key = \substr($key, 1);
            }
            $pNodeId = $nodeId;
            $rule = $this->rule($pNodeId);
            if (null === $rule) {
                throw new Compiler\Exception('Error while parsing rule %s.', 1, $key);
            }
            $zeRule = $this->_parsedRules[$rule];
            $zeRule->setName($key);
            $zeRule->setPPRepresentation($value);
            if (null !== $nodeId) {
                $zeRule->setDefaultId($nodeId);
            }
            unset($this->_parsedRules[$rule]);
            $this->_parsedRules[$key] = $zeRule;
        }
        return $this->_parsedRules;
    }
    /**
     * Implementation of “rule”.
     *
     * @return  mixed
     */
    protected function rule(&$pNodeId)
    {
        return $this->choice($pNodeId);
    }
    /**
     * Implementation of “choice”.
     *
     * @return  mixed
     */
    protected function choice(&$pNodeId)
    {
        $children = [];
        // concatenation() …
        $nNodeId = $pNodeId;
        $rule = $this->concatenation($nNodeId);
        if (null === $rule) {
            return null;
        }
        if (null !== $nNodeId) {
            $this->_parsedRules[$rule]->setNodeId($nNodeId);
        }
        $children[] = $rule;
        $others = \false;
        // … ( ::or:: concatenation() )*
        while ('or' === $this->_lexer->current()['token']) {
            $this->_lexer->next();
            $others = \true;
            $nNodeId = $pNodeId;
            $rule = $this->concatenation($nNodeId);
            if (null === $rule) {
                return null;
            }
            if (null !== $nNodeId) {
                $this->_parsedRules[$rule]->setNodeId($nNodeId);
            }
            $children[] = $rule;
        }
        $pNodeId = null;
        if (\false === $others) {
            return $rule;
        }
        $name = $this->_transitionalRuleCounter++;
        $this->_parsedRules[$name] = new \Hoa\Compiler\Llk\Rule\Choice($name, $children);
        return $name;
    }
    /**
     * Implementation of “concatenation”.
     *
     * @return  mixed
     */
    protected function concatenation(&$pNodeId)
    {
        $children = [];
        // repetition() …
        $rule = $this->repetition($pNodeId);
        if (null === $rule) {
            return null;
        }
        $children[] = $rule;
        $others = \false;
        // … repetition()*
        while (null !== ($r1 = $this->repetition($pNodeId))) {
            $children[] = $r1;
            $others = \true;
        }
        if (\false === $others && null === $pNodeId) {
            return $rule;
        }
        $name = $this->_transitionalRuleCounter++;
        $this->_parsedRules[$name] = new \Hoa\Compiler\Llk\Rule\Concatenation($name, $children, null);
        return $name;
    }
    /**
     * Implementation of “repetition”.
     *
     * @return  mixed
     * @throws  \Hoa\Compiler\Exception
     */
    protected function repetition(&$pNodeId)
    {
        // simple() …
        $children = $this->simple($pNodeId);
        if (null === $children) {
            return null;
        }
        // … quantifier()?
        switch ($this->_lexer->current()['token']) {
            case 'zero_or_one':
                $min = 0;
                $max = 1;
                $this->_lexer->next();
                break;
            case 'one_or_more':
                $min = 1;
                $max = -1;
                $this->_lexer->next();
                break;
            case 'zero_or_more':
                $min = 0;
                $max = -1;
                $this->_lexer->next();
                break;
            case 'n_to_m':
                $handle = \trim($this->_lexer->current()['value'], '{}');
                $nm = \explode(',', $handle);
                $min = (int) \trim($nm[0]);
                $max = (int) \trim($nm[1]);
                $this->_lexer->next();
                break;
            case 'zero_to_m':
                $min = 0;
                $max = (int) \trim($this->_lexer->current()['value'], '{,}');
                $this->_lexer->next();
                break;
            case 'n_or_more':
                $min = (int) \trim($this->_lexer->current()['value'], '{,}');
                $max = -1;
                $this->_lexer->next();
                break;
            case 'exactly_n':
                $handle = \trim($this->_lexer->current()['value'], '{}');
                $min = (int) $handle;
                $max = $min;
                $this->_lexer->next();
                break;
        }
        // … <node>?
        if ('node' === $this->_lexer->current()['token']) {
            $pNodeId = $this->_lexer->current()['value'];
            $this->_lexer->next();
        }
        if (!isset($min)) {
            return $children;
        }
        if (-1 != $max && $max < $min) {
            throw new Compiler\Exception('Upper bound %d must be greater or ' . 'equal to lower bound %d in rule %s.', 2, [$max, $min, $this->_ruleName]);
        }
        $name = $this->_transitionalRuleCounter++;
        $this->_parsedRules[$name] = new \Hoa\Compiler\Llk\Rule\Repetition($name, $min, $max, $children, null);
        return $name;
    }
    /**
     * Implementation of “simple”.
     *
     * @return  mixed
     * @throws  \Hoa\Compiler\Exception
     * @throws  \Hoa\Compiler\Exception\Rule
     */
    protected function simple(&$pNodeId)
    {
        if ('capturing_' === $this->_lexer->current()['token']) {
            $this->_lexer->next();
            $rule = $this->choice($pNodeId);
            if (null === $rule) {
                return null;
            }
            if ('_capturing' != $this->_lexer->current()['token']) {
                return null;
            }
            $this->_lexer->next();
            return $rule;
        }
        if ('skipped' === $this->_lexer->current()['token']) {
            $tokenName = \trim($this->_lexer->current()['value'], ':');
            if (']' === \substr($tokenName, -1)) {
                $uId = (int) \substr($tokenName, \strpos($tokenName, '[') + 1, -1);
                $tokenName = \substr($tokenName, 0, \strpos($tokenName, '['));
            } else {
                $uId = -1;
            }
            $exists = \false;
            foreach ($this->_tokens as $namespace => $tokens) {
                foreach ($tokens as $token => $value) {
                    if ($token === $tokenName || \substr($token, 0, \strpos($token, ':')) === $tokenName) {
                        $exists = \true;
                        break 2;
                    }
                }
            }
            if (\false == $exists) {
                throw new Compiler\Exception('Token ::%s:: does not exist in rule %s.', 3, [$tokenName, $this->_ruleName]);
            }
            $name = $this->_transitionalRuleCounter++;
            $this->_parsedRules[$name] = new \Hoa\Compiler\Llk\Rule\Token($name, $tokenName, null, $uId);
            $this->_lexer->next();
            return $name;
        }
        if ('kept' === $this->_lexer->current()['token']) {
            $tokenName = \trim($this->_lexer->current()['value'], '<>');
            if (']' === \substr($tokenName, -1)) {
                $uId = (int) \substr($tokenName, \strpos($tokenName, '[') + 1, -1);
                $tokenName = \substr($tokenName, 0, \strpos($tokenName, '['));
            } else {
                $uId = -1;
            }
            $exists = \false;
            foreach ($this->_tokens as $namespace => $tokens) {
                foreach ($tokens as $token => $value) {
                    if ($token === $tokenName || \substr($token, 0, \strpos($token, ':')) === $tokenName) {
                        $exists = \true;
                        break 2;
                    }
                }
            }
            if (\false == $exists) {
                throw new Compiler\Exception('Token <%s> does not exist in rule %s.', 4, [$tokenName, $this->_ruleName]);
            }
            $name = $this->_transitionalRuleCounter++;
            $token = new \Hoa\Compiler\Llk\Rule\Token($name, $tokenName, null, $uId, \true);
            $this->_parsedRules[$name] = $token;
            $this->_lexer->next();
            return $name;
        }
        if ('named' === $this->_lexer->current()['token']) {
            $tokenName = \rtrim($this->_lexer->current()['value'], '()');
            if (\false === \array_key_exists($tokenName, $this->_rules) && \false === \array_key_exists('#' . $tokenName, $this->_rules)) {
                throw new Compiler\Exception\Rule('Cannot call rule %s() in rule %s because it does not exist.', 5, [$tokenName, $this->_ruleName]);
            }
            if (0 === $this->_lexer->key() && 'EOF' === $this->_lexer->getNext()['token']) {
                $name = $this->_transitionalRuleCounter++;
                $this->_parsedRules[$name] = new \Hoa\Compiler\Llk\Rule\Concatenation($name, [$tokenName], null);
            } else {
                $name = $tokenName;
            }
            $this->_lexer->next();
            return $name;
        }
        return null;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler\Llk\Rule;

use Hoa\Consistency;
/**
 * Class \Hoa\Compiler\Llk\Rule.
 *
 * Rule parent.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
abstract class Rule
{
    /**
     * Rule name.
     *
     * @var string
     */
    protected $_name = null;
    /**
     * Rule's children. Can be an array of names or a single name.
     *
     * @var mixed
     */
    protected $_children = null;
    /**
     * Node ID.
     *
     * @var string
     */
    protected $_nodeId = null;
    /**
     * Node options.
     *
     * @var array
     */
    protected $_nodeOptions = [];
    /**
     * Default ID.
     *
     * @var string
     */
    protected $_defaultId = null;
    /**
     * Default options.
     *
     * @var array
     */
    protected $_defaultOptions = [];
    /**
     * For non-transitional rule: PP representation.
     *
     * @var string
     */
    protected $_pp = null;
    /**
     * Whether the rule is transitional or not (i.e. not declared in the grammar
     * but created by the analyzer).
     *
     * @var bool
     */
    protected $_transitional = \true;
    /**
     * Constructor.
     *
     * @param   string  $name        Rule name.
     * @param   mixed   $children    Children.
     * @param   string  $nodeId      Node ID.
     */
    public function __construct($name, $children, $nodeId = null)
    {
        $this->setName($name);
        $this->setChildren($children);
        if ($nodeId !== null) {
            $this->setNodeId($nodeId);
        }
        return;
    }
    /**
     * Set rule name.
     *
     * @param   string  $name    Rule name.
     * @return  string
     */
    public function setName($name)
    {
        $old = $this->_name;
        $this->_name = $name;
        return $old;
    }
    /**
     * Get rule name.
     *
     * @return  string
     */
    public function getName()
    {
        return $this->_name;
    }
    /**
     * Set rule's children.
     *
     * @param   mixed  $children    Children.
     * @return  mixed
     */
    protected function setChildren($children)
    {
        $old = $this->_children;
        $this->_children = $children;
        return $old;
    }
    /**
     * Get rule's children.
     *
     * @return  mixed
     */
    public function getChildren()
    {
        return $this->_children;
    }
    /**
     * Set node ID.
     *
     * @param   string  $nodeId    Node ID.
     * @return  string
     */
    public function setNodeId($nodeId)
    {
        $old = $this->_nodeId;
        if (\false !== ($pos = \strpos($nodeId, ':'))) {
            $this->_nodeId = \substr($nodeId, 0, $pos);
            $this->_nodeOptions = \str_split(\substr($nodeId, $pos + 1));
        } else {
            $this->_nodeId = $nodeId;
            $this->_nodeOptions = [];
        }
        return $old;
    }
    /**
     * Get node ID.
     *
     * @return  string
     */
    public function getNodeId()
    {
        return $this->_nodeId;
    }
    /**
     * Get node options.
     *
     * @retrun  array
     */
    public function getNodeOptions()
    {
        return $this->_nodeOptions;
    }
    /**
     * Set default ID.
     *
     * @param   string  $defaultId    Default ID.
     * @return  string
     */
    public function setDefaultId($defaultId)
    {
        $old = $this->_defaultId;
        if (\false !== ($pos = \strpos($defaultId, ':'))) {
            $this->_defaultId = \substr($defaultId, 0, $pos);
            $this->_defaultOptions = \str_split(\substr($defaultId, $pos + 1));
        } else {
            $this->_defaultId = $defaultId;
            $this->_defaultOptions = [];
        }
        return $old;
    }
    /**
     * Get default ID.
     *
     * @return  string
     */
    public function getDefaultId()
    {
        return $this->_defaultId;
    }
    /**
     * Get default options.
     *
     * @return  array
     */
    public function getDefaultOptions()
    {
        return $this->_defaultOptions;
    }
    /**
     * Set PP representation of the rule.
     *
     * @param   string  $pp    PP representation.
     * @return  string
     */
    public function setPPRepresentation($pp)
    {
        $old = $this->_pp;
        $this->_pp = $pp;
        $this->_transitional = \false;
        return $old;
    }
    /**
     * Get PP representation of the rule.
     *
     * @return  string
     */
    public function getPPRepresentation()
    {
        return $this->_pp;
    }
    /**
     * Check whether the rule is transitional or not.
     *
     * @return  bool
     */
    public function isTransitional()
    {
        return $this->_transitional;
    }
}
/**
 * Flex entity.
 */
Consistency::flexEntity('Hoa\\Compiler\\Llk\\Rule\\Rule');
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler\Llk\Rule;

use Hoa\Compiler;
use Hoa\File;
/**
 * Class \Hoa\Compiler\Llk\Rule\Token.
 *
 * The token rule.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Token extends \Hoa\Compiler\Llk\Rule\Rule
{
    /**
     * LL(k) compiler of hoa://Library/Regex/Grammar.pp.
     *
     * @var \Hoa\Compiler\Llk\Parser
     */
    protected static $_regexCompiler = null;
    /**
     * Token name.
     *
     * @var string
     */
    protected $_tokenName = null;
    /**
     * Namespace.
     *
     * @var string
     */
    protected $_namespace = null;
    /**
     * Token representation.
     *
     * @var string
     */
    protected $_regex = null;
    /**
     * AST of the regex.
     *
     * @var \Hoa\Compiler\Llk\TreeNode
     */
    protected $_ast = null;
    /**
     * Token value.
     *
     * @var string
     */
    protected $_value = null;
    /**
     * Whether the token is kept or not in the AST.
     *
     * @var bool
     */
    protected $_kept = \false;
    /**
     * Unification index.
     *
     * @var int
     */
    protected $_unification = -1;
    /**
     * Constructor.
     *
     * @param   string  $name           Name.
     * @param   string  $tokenName      Token name.
     * @param   string  $nodeId         Node ID.
     * @param   int     $unification    Unification index.
     * @param   bool    $kept           Whether the token is kept or not in the AST.
     */
    public function __construct($name, $tokenName, $nodeId, $unification, $kept = \false)
    {
        parent::__construct($name, null, $nodeId);
        $this->_tokenName = $tokenName;
        $this->_unification = $unification;
        $this->setKept($kept);
        return;
    }
    /**
     * Get token name.
     *
     * @return  string
     */
    public function getTokenName()
    {
        return $this->_tokenName;
    }
    /**
     * Set token namespace.
     *
     * @param   string  $namespace    Namespace.
     * @return  string
     */
    public function setNamespace($namespace)
    {
        $old = $this->_namespace;
        $this->_namespace = $namespace;
        return $old;
    }
    /**
     * Get token namespace.
     *
     * @return  string
     */
    public function getNamespace()
    {
        return $this->_namespace;
    }
    /**
     * Set representation.
     *
     * @param   string  $regex    Representation.
     * @return  string
     */
    public function setRepresentation($regex)
    {
        $old = $this->_regex;
        $this->_regex = $regex;
        return $old;
    }
    /**
     * Get token representation.
     *
     * @return  string
     */
    public function getRepresentation()
    {
        return $this->_regex;
    }
    /**
     * Get AST of the token representation.
     *
     * @return  \Hoa\Compiler\Llk\TreeNode
     */
    public function getAST()
    {
        if (null === static::$_regexCompiler) {
            $stream = new File\Read('hoa://Library/Regex/Grammar.pp');
            $stream->rewind();
            static::$_regexCompiler = Compiler\Llk::load($stream);
        }
        if (null === $this->_ast) {
            $this->_ast = static::$_regexCompiler->parse($this->getRepresentation());
        }
        return $this->_ast;
    }
    /**
     * Set token value.
     *
     * @param   string  $value    Value.
     * @return  string
     */
    public function setValue($value)
    {
        $old = $this->_value;
        $this->_value = $value;
        return $old;
    }
    /**
     * Get token value.
     *
     * @return  string
     */
    public function getValue()
    {
        return $this->_value;
    }
    /**
     * Set whether the token is kept or not in the AST.
     *
     * @param   bool  $kept    Kept.
     * @return  bool
     */
    public function setKept($kept)
    {
        $old = $this->_kept;
        $this->_kept = $kept;
        return $old;
    }
    /**
     * Check whether the token is kept in the AST or not.
     *
     * @return  bool
     */
    public function isKept()
    {
        return $this->_kept;
    }
    /**
     * Get unification index.
     *
     * @return  int
     */
    public function getUnificationIndex()
    {
        return $this->_unification;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler\Llk\Rule;

/**
 * Class \Hoa\Compiler\Llk\Rule\Ekzit.
 *
 * The ekzit (exit) rule.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Ekzit extends \Hoa\Compiler\Llk\Rule\Invocation
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler\Llk\Rule;

/**
 * Class \Hoa\Compiler\Llk\Rule\Entry.
 *
 * The entry rule.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Entry extends \Hoa\Compiler\Llk\Rule\Invocation
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler\Llk;

use Hoa\Compiler;
/**
 * Class \Hoa\Compiler\Llk\Lexer.
 *
 * Lexical analyser, i.e. split a string into a set of lexeme, i.e. tokens.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Lexer
{
    /**
     * Lexer state.
     *
     * @var array
     */
    protected $_lexerState = null;
    /**
     * Text.
     *
     * @var string
     */
    protected $_text = null;
    /**
     * Tokens.
     *
     * @var array
     */
    protected $_tokens = [];
    /**
     * Namespace stacks.
     *
     * @var \SplStack
     */
    protected $_nsStack = null;
    /**
     * PCRE options.
     *
     * @var string
     */
    protected $_pcreOptions = null;
    /**
     * Constructor.
     *
     * @param   array  $pragmas    Pragmas.
     */
    public function __construct(array $pragmas = [])
    {
        if (!isset($pragmas['lexer.unicode']) || \true === $pragmas['lexer.unicode']) {
            $this->_pcreOptions .= 'u';
        }
        return;
    }
    /**
     * Text tokenizer: splits the text in parameter in an ordered array of
     * tokens.
     *
     * @param   string  $text      Text to tokenize.
     * @param   array   $tokens    Tokens to be returned.
     * @return  \Generator
     * @throws  \Hoa\Compiler\Exception\UnrecognizedToken
     */
    public function lexMe($text, array $tokens)
    {
        $this->_text = $text;
        $this->_tokens = $tokens;
        $this->_nsStack = null;
        $offset = 0;
        $maxOffset = \strlen($this->_text);
        $this->_lexerState = 'default';
        $stack = \false;
        foreach ($this->_tokens as &$tokens) {
            $_tokens = [];
            foreach ($tokens as $fullLexeme => $regex) {
                if (\false === \strpos($fullLexeme, ':')) {
                    $_tokens[$fullLexeme] = [$regex, null];
                    continue;
                }
                list($lexeme, $namespace) = \explode(':', $fullLexeme, 2);
                $stack |= '__shift__' === \substr($namespace, 0, 9);
                unset($tokens[$fullLexeme]);
                $_tokens[$lexeme] = [$regex, $namespace];
            }
            $tokens = $_tokens;
        }
        if (\true == $stack) {
            $this->_nsStack = new \SplStack();
        }
        while ($offset < $maxOffset) {
            $nextToken = $this->nextToken($offset);
            if (null === $nextToken) {
                throw new Compiler\Exception\UnrecognizedToken('Unrecognized token "%s" at line 1 and column %d:' . "\n" . '%s' . "\n" . \str_repeat(' ', \mb_strlen(\substr($text, 0, $offset))) . '↑', 0, [\mb_substr(\substr($text, $offset), 0, 1), $offset + 1, $text], 1, $offset);
            }
            if (\true === $nextToken['keep']) {
                $nextToken['offset'] = $offset;
                (yield $nextToken);
            }
            $offset += \strlen($nextToken['value']);
        }
        (yield ['token' => 'EOF', 'value' => 'EOF', 'length' => 0, 'namespace' => 'default', 'keep' => \true, 'offset' => $offset]);
    }
    /**
     * Compute the next token recognized at the beginning of the string.
     *
     * @param   int  $offset    Offset.
     * @return  array
     * @throws  \Hoa\Compiler\Exception\Lexer
     */
    protected function nextToken($offset)
    {
        $tokenArray =& $this->_tokens[$this->_lexerState];
        foreach ($tokenArray as $lexeme => $bucket) {
            list($regex, $nextState) = $bucket;
            if (null === $nextState) {
                $nextState = $this->_lexerState;
            }
            $out = $this->matchLexeme($lexeme, $regex, $offset);
            if (null !== $out) {
                $out['namespace'] = $this->_lexerState;
                $out['keep'] = 'skip' !== $lexeme;
                if ($nextState !== $this->_lexerState) {
                    $shift = \false;
                    if (null !== $this->_nsStack && 0 !== \preg_match('#^__shift__(?:\\s*\\*\\s*(\\d+))?$#', $nextState, $matches)) {
                        $i = isset($matches[1]) ? \intval($matches[1]) : 1;
                        if ($i > ($c = \count($this->_nsStack))) {
                            throw new Compiler\Exception\Lexer('Cannot shift namespace %d-times, from token ' . '%s in namespace %s, because the stack ' . 'contains only %d namespaces.', 1, [$i, $lexeme, $this->_lexerState, $c]);
                        }
                        while (1 <= $i--) {
                            $previousNamespace = $this->_nsStack->pop();
                        }
                        $nextState = $previousNamespace;
                        $shift = \true;
                    }
                    if (!isset($this->_tokens[$nextState])) {
                        throw new Compiler\Exception\Lexer('Namespace %s does not exist, called by token %s ' . 'in namespace %s.', 2, [$nextState, $lexeme, $this->_lexerState]);
                    }
                    if (null !== $this->_nsStack && \false === $shift) {
                        $this->_nsStack[] = $this->_lexerState;
                    }
                    $this->_lexerState = $nextState;
                }
                return $out;
            }
        }
        return null;
    }
    /**
     * Check if a given lexeme is matched at the beginning of the text.
     *
     * @param   string  $lexeme    Name of the lexeme.
     * @param   string  $regex     Regular expression describing the lexeme.
     * @param   int     $offset    Offset.
     * @return  array
     * @throws  \Hoa\Compiler\Exception\Lexer
     */
    protected function matchLexeme($lexeme, $regex, $offset)
    {
        $_regex = \str_replace('#', '\\#', $regex);
        $preg = \preg_match('#\\G(?|' . $_regex . ')#' . $this->_pcreOptions, $this->_text, $matches, 0, $offset);
        if (0 === $preg) {
            return null;
        }
        if ('' === $matches[0]) {
            throw new Compiler\Exception\Lexer('A lexeme must not match an empty value, which is the ' . 'case of "%s" (%s).', 3, [$lexeme, $regex]);
        }
        return ['token' => $lexeme, 'value' => $matches[0], 'length' => \mb_strlen($matches[0])];
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler\Llk;

use Hoa\Compiler;
use Hoa\Iterator;
/**
 * Class \Hoa\Compiler\Llk\Parser.
 *
 * LL(k) parser.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Parser
{
    /**
     * List of pragmas.
     *
     * @var array
     */
    protected $_pragmas = null;
    /**
     * List of skipped tokens.
     *
     * @var array
     */
    protected $_skip = null;
    /**
     * Associative array (token name => token regex), to be defined in
     * precedence order.
     *
     * @var array
     */
    protected $_tokens = null;
    /**
     * Rules, to be defined as associative array, name => Rule object.
     *
     * @var array
     */
    protected $_rules = null;
    /**
     * Lexer iterator.
     *
     * @var \Hoa\Iterator\Lookahead
     */
    protected $_tokenSequence = null;
    /**
     * Possible token causing an error.
     *
     * @var array
     */
    protected $_errorToken = null;
    /**
     * Trace of activated rules.
     *
     * @var array
     */
    protected $_trace = [];
    /**
     * Stack of todo list.
     *
     * @var array
     */
    protected $_todo = null;
    /**
     * AST.
     *
     * @var \Hoa\Compiler\Llk\TreeNode
     */
    protected $_tree = null;
    /**
     * Current depth while building the trace.
     *
     * @var int
     */
    protected $_depth = -1;
    /**
     * Construct the parser.
     *
     * @param   array  $tokens     Tokens.
     * @param   array  $rules      Rules.
     * @param   array  $pragmas    Pragmas.
     */
    public function __construct(array $tokens = [], array $rules = [], array $pragmas = [])
    {
        $this->_tokens = $tokens;
        $this->_rules = $rules;
        $this->_pragmas = $pragmas;
        return;
    }
    /**
     * Parse :-).
     *
     * @param   string  $text    Text to parse.
     * @param   string  $rule    The axiom, i.e. root rule.
     * @param   bool    $tree    Whether build tree or not.
     * @return  mixed
     * @throws  \Hoa\Compiler\Exception\UnexpectedToken
     */
    public function parse($text, $rule = null, $tree = \true)
    {
        $k = 1024;
        if (isset($this->_pragmas['parser.lookahead'])) {
            $k = \max(0, \intval($this->_pragmas['parser.lookahead']));
        }
        $lexer = new \Hoa\Compiler\Llk\Lexer($this->_pragmas);
        $this->_tokenSequence = new Iterator\Buffer($lexer->lexMe($text, $this->_tokens), $k);
        $this->_tokenSequence->rewind();
        $this->_errorToken = null;
        $this->_trace = [];
        $this->_todo = [];
        if (\false === \array_key_exists($rule, $this->_rules)) {
            $rule = $this->getRootRule();
        }
        $closeRule = new \Hoa\Compiler\Llk\Rule\Ekzit($rule, 0);
        $openRule = new \Hoa\Compiler\Llk\Rule\Entry($rule, 0, [$closeRule]);
        $this->_todo = [$closeRule, $openRule];
        do {
            $out = $this->unfold();
            if (null !== $out && 'EOF' === $this->_tokenSequence->current()['token']) {
                break;
            }
            if (\false === $this->backtrack()) {
                $token = $this->_errorToken;
                if (null === $this->_errorToken) {
                    $token = $this->_tokenSequence->current();
                }
                $offset = $token['offset'];
                $line = 1;
                $column = 1;
                if (!empty($text)) {
                    if (0 === $offset) {
                        $leftnl = 0;
                    } else {
                        $leftnl = \strrpos($text, "\n", -(\strlen($text) - $offset) - 1) ?: 0;
                    }
                    $rightnl = \strpos($text, "\n", $offset);
                    $line = \substr_count($text, "\n", 0, $leftnl + 1) + 1;
                    $column = $offset - $leftnl + (0 === $leftnl);
                    if (\false !== $rightnl) {
                        $text = \trim(\substr($text, $leftnl, $rightnl - $leftnl), "\n");
                    }
                }
                throw new Compiler\Exception\UnexpectedToken('Unexpected token "%s" (%s) at line %d and column %d:' . "\n" . '%s' . "\n" . \str_repeat(' ', $column - 1) . '↑', 0, [$token['value'], $token['token'], $line, $column, $text], $line, $column);
            }
        } while (\true);
        if (\false === $tree) {
            return \true;
        }
        $tree = $this->_buildTree();
        if (!$tree instanceof \Hoa\Compiler\Llk\TreeNode) {
            throw new Compiler\Exception('Parsing error: cannot build AST, the trace is corrupted.', 1);
        }
        return $this->_tree = $tree;
    }
    /**
     * Unfold trace.
     *
     * @return  mixed
     */
    protected function unfold()
    {
        while (0 < \count($this->_todo)) {
            $rule = \array_pop($this->_todo);
            if ($rule instanceof \Hoa\Compiler\Llk\Rule\Ekzit) {
                $rule->setDepth($this->_depth);
                $this->_trace[] = $rule;
                if (\false === $rule->isTransitional()) {
                    --$this->_depth;
                }
            } else {
                $ruleName = $rule->getRule();
                $next = $rule->getData();
                $zeRule = $this->_rules[$ruleName];
                $out = $this->_parse($zeRule, $next);
                if (\false === $out && \false === $this->backtrack()) {
                    return null;
                }
            }
        }
        return \true;
    }
    /**
     * Parse current rule.
     *
     * @param   \Hoa\Compiler\Llk\Rule  $zeRule    Current rule.
     * @param   int                     $next      Next rule index.
     * @return  bool
     */
    protected function _parse(\Hoa\Compiler\Llk\Rule $zeRule, $next)
    {
        if ($zeRule instanceof \Hoa\Compiler\Llk\Rule\Token) {
            $name = $this->_tokenSequence->current()['token'];
            if ($zeRule->getTokenName() !== $name) {
                return \false;
            }
            $value = $this->_tokenSequence->current()['value'];
            if (0 <= ($unification = $zeRule->getUnificationIndex())) {
                for ($skip = 0, $i = \count($this->_trace) - 1; $i >= 0; --$i) {
                    $trace = $this->_trace[$i];
                    if ($trace instanceof \Hoa\Compiler\Llk\Rule\Entry) {
                        if (\false === $trace->isTransitional()) {
                            if ($trace->getDepth() <= $this->_depth) {
                                break;
                            }
                            --$skip;
                        }
                    } elseif ($trace instanceof \Hoa\Compiler\Llk\Rule\Ekzit && \false === $trace->isTransitional()) {
                        $skip += $trace->getDepth() > $this->_depth;
                    }
                    if (0 < $skip) {
                        continue;
                    }
                    if ($trace instanceof \Hoa\Compiler\Llk\Rule\Token && $unification === $trace->getUnificationIndex() && $value !== $trace->getValue()) {
                        return \false;
                    }
                }
            }
            $namespace = $this->_tokenSequence->current()['namespace'];
            $zzeRule = clone $zeRule;
            $zzeRule->setValue($value);
            $zzeRule->setNamespace($namespace);
            if (isset($this->_tokens[$namespace][$name])) {
                $zzeRule->setRepresentation($this->_tokens[$namespace][$name]);
            } else {
                foreach ($this->_tokens[$namespace] as $_name => $regex) {
                    if (\false === ($pos = \strpos($_name, ':'))) {
                        continue;
                    }
                    $_name = \substr($_name, 0, $pos);
                    if ($_name === $name) {
                        break;
                    }
                }
                $zzeRule->setRepresentation($regex);
            }
            \array_pop($this->_todo);
            $this->_trace[] = $zzeRule;
            $this->_tokenSequence->next();
            $this->_errorToken = $this->_tokenSequence->current();
            return \true;
        } elseif ($zeRule instanceof \Hoa\Compiler\Llk\Rule\Concatenation) {
            if (\false === $zeRule->isTransitional()) {
                ++$this->_depth;
            }
            $this->_trace[] = new \Hoa\Compiler\Llk\Rule\Entry($zeRule->getName(), 0, null, $this->_depth);
            $children = $zeRule->getChildren();
            for ($i = \count($children) - 1; $i >= 0; --$i) {
                $nextRule = $children[$i];
                $this->_todo[] = new \Hoa\Compiler\Llk\Rule\Ekzit($nextRule, 0);
                $this->_todo[] = new \Hoa\Compiler\Llk\Rule\Entry($nextRule, 0);
            }
            return \true;
        } elseif ($zeRule instanceof \Hoa\Compiler\Llk\Rule\Choice) {
            $children = $zeRule->getChildren();
            if ($next >= \count($children)) {
                return \false;
            }
            if (\false === $zeRule->isTransitional()) {
                ++$this->_depth;
            }
            $this->_trace[] = new \Hoa\Compiler\Llk\Rule\Entry($zeRule->getName(), $next, $this->_todo, $this->_depth);
            $nextRule = $children[$next];
            $this->_todo[] = new \Hoa\Compiler\Llk\Rule\Ekzit($nextRule, 0);
            $this->_todo[] = new \Hoa\Compiler\Llk\Rule\Entry($nextRule, 0);
            return \true;
        } elseif ($zeRule instanceof \Hoa\Compiler\Llk\Rule\Repetition) {
            $nextRule = $zeRule->getChildren();
            if (0 === $next) {
                $name = $zeRule->getName();
                $min = $zeRule->getMin();
                if (\false === $zeRule->isTransitional()) {
                    ++$this->_depth;
                }
                $this->_trace[] = new \Hoa\Compiler\Llk\Rule\Entry($name, $min, null, $this->_depth);
                \array_pop($this->_todo);
                $this->_todo[] = new \Hoa\Compiler\Llk\Rule\Ekzit($name, $min, $this->_todo);
                for ($i = 0; $i < $min; ++$i) {
                    $this->_todo[] = new \Hoa\Compiler\Llk\Rule\Ekzit($nextRule, 0);
                    $this->_todo[] = new \Hoa\Compiler\Llk\Rule\Entry($nextRule, 0);
                }
                return \true;
            } else {
                $max = $zeRule->getMax();
                if (-1 != $max && $next > $max) {
                    return \false;
                }
                $this->_todo[] = new \Hoa\Compiler\Llk\Rule\Ekzit($zeRule->getName(), $next, $this->_todo);
                $this->_todo[] = new \Hoa\Compiler\Llk\Rule\Ekzit($nextRule, 0);
                $this->_todo[] = new \Hoa\Compiler\Llk\Rule\Entry($nextRule, 0);
                return \true;
            }
        }
        return \false;
    }
    /**
     * Backtrack the trace.
     *
     * @return  bool
     */
    protected function backtrack()
    {
        $found = \false;
        do {
            $last = \array_pop($this->_trace);
            if ($last instanceof \Hoa\Compiler\Llk\Rule\Entry) {
                $zeRule = $this->_rules[$last->getRule()];
                $found = $zeRule instanceof \Hoa\Compiler\Llk\Rule\Choice;
            } elseif ($last instanceof \Hoa\Compiler\Llk\Rule\Ekzit) {
                $zeRule = $this->_rules[$last->getRule()];
                $found = $zeRule instanceof \Hoa\Compiler\Llk\Rule\Repetition;
            } elseif ($last instanceof \Hoa\Compiler\Llk\Rule\Token) {
                $this->_tokenSequence->previous();
                if (\false === $this->_tokenSequence->valid()) {
                    return \false;
                }
            }
        } while (0 < \count($this->_trace) && \false === $found);
        if (\false === $found) {
            return \false;
        }
        $rule = $last->getRule();
        $next = $last->getData() + 1;
        $this->_depth = $last->getDepth();
        $this->_todo = $last->getTodo();
        $this->_todo[] = new \Hoa\Compiler\Llk\Rule\Entry($rule, $next);
        return \true;
    }
    /**
     * Build AST from trace.
     * Walk through the trace iteratively and recursively.
     *
     * @param   int      $i            Current trace index.
     * @param   array    &$children    Collected children.
     * @return  \Hoa\Compiler\Llk\TreeNode
     */
    protected function _buildTree($i = 0, &$children = [])
    {
        $max = \count($this->_trace);
        while ($i < $max) {
            $trace = $this->_trace[$i];
            if ($trace instanceof \Hoa\Compiler\Llk\Rule\Entry) {
                $ruleName = $trace->getRule();
                $rule = $this->_rules[$ruleName];
                $isRule = \false === $trace->isTransitional();
                $nextTrace = $this->_trace[$i + 1];
                $id = $rule->getNodeId();
                // Optimization: Skip empty trace sequence.
                if ($nextTrace instanceof \Hoa\Compiler\Llk\Rule\Ekzit && $ruleName == $nextTrace->getRule()) {
                    $i += 2;
                    continue;
                }
                if (\true === $isRule) {
                    $children[] = $ruleName;
                }
                if (null !== $id) {
                    $children[] = ['id' => $id, 'options' => $rule->getNodeOptions()];
                }
                $i = $this->_buildTree($i + 1, $children);
                if (\false === $isRule) {
                    continue;
                }
                $handle = [];
                $cId = null;
                $cOptions = [];
                do {
                    $pop = \array_pop($children);
                    if (\true === \is_object($pop)) {
                        $handle[] = $pop;
                    } elseif (\true === \is_array($pop) && null === $cId) {
                        $cId = $pop['id'];
                        $cOptions = $pop['options'];
                    } elseif ($ruleName == $pop) {
                        break;
                    }
                } while (null !== $pop);
                if (null === $cId) {
                    $cId = $rule->getDefaultId();
                    $cOptions = $rule->getDefaultOptions();
                }
                if (null === $cId) {
                    for ($j = \count($handle) - 1; $j >= 0; --$j) {
                        $children[] = $handle[$j];
                    }
                    continue;
                }
                if (\true === \in_array('M', $cOptions) && \true === $this->mergeTree($children, $handle, $cId)) {
                    continue;
                }
                if (\true === \in_array('m', $cOptions) && \true === $this->mergeTree($children, $handle, $cId, \true)) {
                    continue;
                }
                $cTree = new \Hoa\Compiler\Llk\TreeNode($id ?: $cId);
                foreach ($handle as $child) {
                    $child->setParent($cTree);
                    $cTree->prependChild($child);
                }
                $children[] = $cTree;
            } elseif ($trace instanceof \Hoa\Compiler\Llk\Rule\Ekzit) {
                return $i + 1;
            } else {
                if (\false === $trace->isKept()) {
                    ++$i;
                    continue;
                }
                $child = new \Hoa\Compiler\Llk\TreeNode('token', ['token' => $trace->getTokenName(), 'value' => $trace->getValue(), 'namespace' => $trace->getNamespace()]);
                $children[] = $child;
                ++$i;
            }
        }
        return $children[0];
    }
    /**
     * Try to merge directly children into an existing node.
     *
     * @param   array   &$children    Current children being gathering.
     * @param   array   &$handle      Children of the new node.
     * @param   string  $cId          Node ID.
     * @param   bool    $recursive    Whether we should merge recursively or
     *                                not.
     * @return  bool
     */
    protected function mergeTree(&$children, &$handle, $cId, $recursive = \false)
    {
        \end($children);
        $last = \current($children);
        if (!\is_object($last)) {
            return \false;
        }
        if ($cId !== $last->getId()) {
            return \false;
        }
        if (\true === $recursive) {
            foreach ($handle as $child) {
                $this->mergeTreeRecursive($last, $child);
            }
            return \true;
        }
        foreach ($handle as $child) {
            $last->appendChild($child);
            $child->setParent($last);
        }
        return \true;
    }
    /**
     * Merge recursively.
     * Please, see self::mergeTree() to know the context.
     *
     * @param   \Hoa\Compiler\Llk\TreeNode  $node       Node that receives.
     * @param   \Hoa\Compiler\Llk\TreeNode  $newNode    Node to merge.
     * @return  void
     */
    protected function mergeTreeRecursive(\Hoa\Compiler\Llk\TreeNode $node, \Hoa\Compiler\Llk\TreeNode $newNode)
    {
        $nNId = $newNode->getId();
        if ('token' === $nNId) {
            $node->appendChild($newNode);
            $newNode->setParent($node);
            return;
        }
        $children = $node->getChildren();
        \end($children);
        $last = \current($children);
        if ($last->getId() !== $nNId) {
            $node->appendChild($newNode);
            $newNode->setParent($node);
            return;
        }
        foreach ($newNode->getChildren() as $child) {
            $this->mergeTreeRecursive($last, $child);
        }
        return;
    }
    /**
     * Get AST.
     *
     * @return  \Hoa\Compiler\Llk\TreeNode
     */
    public function getTree()
    {
        return $this->_tree;
    }
    /**
     * Get trace.
     *
     * @return  array
     */
    public function getTrace()
    {
        return $this->_trace;
    }
    /**
     * Get pragmas.
     *
     * @return  array
     */
    public function getPragmas()
    {
        return $this->_pragmas;
    }
    /**
     * Get tokens.
     *
     * @return  array
     */
    public function getTokens()
    {
        return $this->_tokens;
    }
    /**
     * Get the lexer iterator.
     *
     * @return  \Hoa\Iterator\Buffer
     */
    public function getTokenSequence()
    {
        return $this->_tokenSequence;
    }
    /**
     * Get rule by name.
     *
     * @param   string  $name    Rule name.
     * @return  \Hoa\Compiler\Llk\Rule
     */
    public function getRule($name)
    {
        if (!isset($this->_rules[$name])) {
            return null;
        }
        return $this->_rules[$name];
    }
    /**
     * Get rules.
     *
     * @return  array
     */
    public function getRules()
    {
        return $this->_rules;
    }
    /**
     * Get root rule.
     *
     * @return  string
     */
    public function getRootRule()
    {
        foreach ($this->_rules as $rule => $_) {
            if (!\is_int($rule)) {
                break;
            }
        }
        return $rule;
    }
}
This file was automatically generated by Composer Patches (https://github.com/cweagans/composer-patches)
Patches applied to this directory:

0
Source: patches/Rule.patch


<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler\Exception;

/**
 * Class \Hoa\Compiler\Exception\UnrecognizedToken.
 *
 * Extending the \Hoa\Compiler\Exception class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class UnrecognizedToken extends \Hoa\Compiler\Exception\Exception
{
    /**
     * Column.
     *
     * @var int
     */
    protected $column = 0;
    /**
     * Override line and add column support.
     *
     * @param   string  $message    Formatted message.
     * @param   int     $code       Code (the ID).
     * @param   array   $arg        RaiseError string arguments.
     * @param   int     $line       Line.
     * @param   int     $column     Column.
     */
    public function __construct($message, $code, $arg, $line, $column)
    {
        parent::__construct($message, $code, $arg);
        $this->line = $line;
        $this->column = $column;
        return;
    }
    /**
     * Get column.
     *
     * @return  int
     */
    public function getColumn()
    {
        return $this->column;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler\Exception;

/**
 * Class \Hoa\Compiler\Exception\FinalStateHasNotBeenReached.
 *
 * Extending the \Hoa\Compiler\Exception class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Rule extends \Hoa\Compiler\Exception\Exception
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler\Exception;

/**
 * Class \Hoa\Compiler\Exception\FinalStateHasNotBeenReached.
 *
 * Extending the \Hoa\Compiler\Exception class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class FinalStateHasNotBeenReached extends \Hoa\Compiler\Exception\Exception
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler\Exception;

/**
 * Class \Hoa\Compiler\Exception\Lexer.
 *
 * Extending the \Hoa\Compiler\Exception class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Lexer extends \Hoa\Compiler\Exception\Exception
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler\Exception;

use Hoa\Consistency;
use Hoa\Exception as HoaException;
/**
 * Class \Hoa\Compiler\Exception.
 *
 * Extending the \Hoa\Exception\Exception class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Exception extends HoaException
{
}
/**
 * Flex entity.
 */
Consistency::flexEntity('Hoa\\Compiler\\Exception\\Exception');
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler\Exception;

/**
 * Class \Hoa\Compiler\Exception\IllegalToken.
 *
 * Extending the \Hoa\Compiler\Exception class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class IllegalToken extends \Hoa\Compiler\Exception\Exception
{
    /**
     * Column.
     *
     * @var int
     */
    protected $column = 0;
    /**
     * Override line and add column support.
     *
     * @param   string  $message    Formatted message.
     * @param   int     $code       Code (the ID).
     * @param   array   $arg        RaiseError string arguments.
     * @param   int     $line       Line.
     * @param   int     $column     Column.
     */
    public function __construct($message, $code, $arg, $line, $column)
    {
        parent::__construct($message, $code, $arg);
        $this->line = $line;
        $this->column = $column;
        return;
    }
    /**
     * Get column.
     *
     * @return  int
     */
    public function getColumn()
    {
        return $this->column;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler\Exception;

/**
 * Class \Hoa\Compiler\Exception\UnexpectedToken.
 *
 * Extending the \Hoa\Compiler\Exception\UnrecognizedToken class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class UnexpectedToken extends \Hoa\Compiler\Exception\UnrecognizedToken
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler\Bin;

use Hoa\Compiler;
use Hoa\Consistency;
use Hoa\Console;
use Hoa\File;
/**
 * Class Hoa\Compiler\Bin\Pp.
 *
 * Play with PP.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Pp extends Console\Dispatcher\Kit
{
    /**
     * Options description.
     *
     * @var array
     */
    protected $options = [['visitor', Console\GetOption::REQUIRED_ARGUMENT, 'v'], ['visitor-class', Console\GetOption::REQUIRED_ARGUMENT, 'c'], ['token-sequence', Console\GetOption::NO_ARGUMENT, 's'], ['trace', Console\GetOption::NO_ARGUMENT, 't'], ['help', Console\GetOption::NO_ARGUMENT, 'h'], ['help', Console\GetOption::NO_ARGUMENT, '?']];
    /**
     * The entry method.
     *
     * @return  int
     */
    public function main()
    {
        $visitor = null;
        $tokenSequence = \false;
        $trace = \false;
        while (\false !== ($c = $this->getOption($v))) {
            switch ($c) {
                case 'v':
                    switch (\strtolower($v)) {
                        case 'dump':
                            $visitor = 'Hoa\\Compiler\\Visitor\\Dump';
                            break;
                        default:
                            return $this->usage();
                    }
                    break;
                case 'c':
                    $visitor = \str_replace('.', '\\', $v);
                    break;
                case 's':
                    $tokenSequence = \true;
                    break;
                case 't':
                    $trace = \true;
                    break;
                case '__ambiguous':
                    $this->resolveOptionAmbiguity($v);
                    break;
                case 'h':
                case '?':
                default:
                    return $this->usage();
            }
        }
        $this->parser->listInputs($grammar, $language);
        if (empty($grammar) || empty($language) && '0' !== $language) {
            return $this->usage();
        }
        $compiler = Compiler\Llk::load(new File\Read($grammar));
        $stream = new File\Read($language);
        $data = $stream->readAll();
        try {
            $ast = $compiler->parse($data);
        } catch (Compiler\Exception $e) {
            if (\true === $tokenSequence) {
                $this->printTokenSequence($compiler, $data);
                echo "\n\n";
            }
            throw $e;
            return 1;
        }
        if (\true === $tokenSequence) {
            $this->printTokenSequence($compiler, $data);
            echo "\n\n";
        }
        if (\true === $trace) {
            $this->printTrace($compiler);
            echo "\n\n";
        }
        if (null !== $visitor) {
            $visitor = Consistency\Autoloader::dnew($visitor);
            echo $visitor->visit($ast);
        }
        return;
    }
    /**
     * Print trace.
     *
     * @param   \Hoa\Compiler\Llk\Parser  $compiler    Compiler.
     * @return  void
     */
    protected function printTrace(Compiler\Llk\Parser $compiler)
    {
        $i = 0;
        foreach ($compiler->getTrace() as $element) {
            if ($element instanceof Compiler\Llk\Rule\Entry) {
                $ruleName = $element->getRule();
                $rule = $compiler->getRule($ruleName);
                echo \str_repeat('>  ', ++$i), 'enter ', $ruleName;
                if (null !== ($id = $rule->getNodeId())) {
                    echo ' (', $id, ')';
                }
                echo "\n";
            } elseif ($element instanceof Compiler\Llk\Rule\Token) {
                echo \str_repeat('   ', $i + 1), 'token ', $element->getTokenName(), ', consumed ', $element->getValue(), "\n";
            } else {
                echo \str_repeat('<  ', $i--), 'ekzit ', $element->getRule(), "\n";
            }
        }
        return;
    }
    /**
     * Print token sequence.
     *
     * @param   \Hoa\Compiler\Llk\Parser  $compiler    Compiler.
     * @param   string                    $data        Data to lex.
     * @return  void
     */
    protected function printTokenSequence(Compiler\Llk\Parser $compiler, $data)
    {
        $lexer = new Compiler\Llk\Lexer();
        $sequence = $lexer->lexMe($data, $compiler->getTokens());
        $format = '%' . (\strlen((string) \count($sequence)) + 1) . 's  ' . '%-13s %-20s  %s  %6s' . "\n";
        $header = \sprintf($format, '#', 'namespace', 'token name', 'token value                   ', 'offset');
        echo $header, \str_repeat('-', \strlen($header)), "\n";
        foreach ($sequence as $i => $token) {
            \printf($format, $i, $token['namespace'], $token['token'], (30 < $token['length'] ? \mb_substr($token['value'], 0, 29) . '…' : 'EOF' === $token['token']) ? \str_repeat(' ', 30) : $token['value'] . \str_repeat(' ', 30 - $token['length']), $token['offset']);
        }
        return;
    }
    /**
     * The command usage.
     *
     * @return  int
     */
    public function usage()
    {
        echo 'Usage   : compiler:pp <options> [grammar.pp] [language]', "\n", 'Options :', "\n", $this->makeUsageOptionsList(['v' => 'Visitor name (only “dump” is supported).', 'c' => 'Visitor classname (using . instead of \\ works).', 's' => 'Print token sequence.', 't' => 'Print trace.', 'help' => 'This help.']), "\n";
        return;
    }
}
__halt_compiler();
Compile and visit languages with grammars.

<?xml version="1.0" encoding="utf-8"?>

<overlay xmlns="http://hoa-project.net/xyl/xylophone">
<yield id="chapter">

  <p><strong>Compilers</strong> allow to <strong>analyze</strong> and
  <strong>manipulate textual</strong> data. There is numerous usages.
  <code>Hoa\Compiler</code> offers to manipulate several compilers based on
  needs.</p>

  <h2 id="Table_of_contents">Table of contents</h2>

  <tableofcontents id="main-toc" />

  <h2 id="Introduction" for="main-toc">Introduction</h2>

  <blockquote cite="https://en.wikipedia.org/wiki/Nicolas_Boileau-Despr%C3%A9aux">What
  is conceived well is expressed clearly, and the right words come
  easily.</blockquote>
  <p>A <strong>language</strong> is a way to express or to
  <strong>formulate</strong> a <strong>solution</strong> to a
  <strong>problem</strong>. And there exists a lot of problems. We read and
  write in several languages daily, and some of these languages are
  <strong>understood</strong> by <strong>machines</strong>. This operation is
  possible thanks to <strong>compilers</strong>.</p>
  <p><a href="https://en.wikipedia.org/wiki/Formal_language">Formal
  languages</a> is a theory that includes the <strong>automatic
  analysis</strong> of those languages through tools like
  <strong>automata</strong> or <strong>grammars</strong>. It is necessary to
  have a detailed explanation to understand well all these concepts. However, we
  are going to popularise as much as needed to allow a correct usage of
  <code>Hoa\Compiler</code>.</p>

  <h3 id="Language_and_grammar" for="main-toc">Language and grammar</h3>

  <p>A <strong>language</strong> is a set of <strong>words</strong>. Each word
  is a <strong>sequence</strong> of <strong>symbols</strong> belonging to an
  <strong>alphabet</strong>. A symbol represents the smallest <strong>lexical
  unit</strong> of a language, it is atomic and we will call it a
  <strong>lexeme</strong> (also often mentionned as a token). These sequences of
  lexemes representing words are built with <strong>rules</strong>. From a word
  and a root rule, we will try to <strong>derive</strong> its sub-rules. If a
  derivation exists, then the word is considered as <strong>valid</strong>, else
  it is considered as <strong>invalid</strong>. We also speak about words
  <strong>matching</strong>. For example, if we consider the following
  rules:</p>
  <pre><code>    exp ::= exp + exp
          | number
 number ::= digit number
          | digit
digit   ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9</code></pre>
  <p>The word that we are going to match is <code>7 + 35</code>. The root rule
  is <code><em>exp</em></code>. If we derive (from the left to the right and
  from the top to the bottom), we can have
  <code><em>exp</em> + <em>exp</em></code> or <code><em>number</em></code> (the
  <strong>disjunction</strong>, i.e. the “or”, is represented by the
  “<code>|</code>” symbol):</p>
  <pre><code>exp + exp | number
→ exp + exp
→ ( exp + exp | number ) + exp
→ number + exp
→ ( digit number | digit ) + exp</code></pre>
  <p>We continue to derive until we <strong>eliminate</strong> every rules in
  order to have only <strong>lexemes</strong>:</p>
  <pre><code>…
→ ( digit number | digit ) + exp
→ digit + exp
→ ( 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 ) + exp
→ 7 + exp
→ 7 + ( exp + exp | number )
→ 7 + number
→ 7 + ( digit number | digit )
→ 7 + digit number
→ 7 + ( 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 ) number
→ 7 + 3 number
→ 7 + 3 ( digit number | digit )
→ 7 + 3 digit
→ 7 + 3 ( 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 )
→ 7 + 3 5</code></pre>
  <p>A derivation exists to match the word <code>7 + 35</code>, thus it is a
  valid word for those rules.</p>
  <p>A set of rules is called a <strong>grammar</strong>. And so, a grammar
  represents a <strong>language</strong>!</p>
  <p>However, these are different kinds of grammars. In 1956, the
  <a href="https://en.wikipedia.org/wiki/Chomsky_hierarchy">Chomsky
  hierarchy</a> has been formulated, classifying grammars in four
  <strong>levels</strong>:</p>
  <ol>
    <li><strong>unrestricted</strong> grammars, matching langages known as
    Turing languages, rules have no restriction,</li>
    <li><strong>context-sensitive</strong> grammars, matching contextual
    languages,</li>
    <li><strong>context-free</strong> grammars, matching algebraic languages,
    based on stacked automata,</li>
    <li><strong>regular</strong> grammars, matching regular languages.</li>
  </ol>
  <p>Each level includes the next level. <code>Hoa\Compiler</code> only treats
  languages defined by grammars of level 3 and 4. To give a quick idea, regular
  grammars can be connected to
  <a href="https://en.wikipedia.org/wiki/Regular_expression">regular
  expressions</a> (like <a href="http://pcre.org/">PCRE</a>), well-known by
  developers. But regular grammars are not able to match a <strong>pair of
  symbols</strong> (like parentheses, braces or quotes), while algebraic
  languages allow that (thanks to the concept of stack of lexemes).</p>

  <h3 id="Matching_words" for="main-toc">Matching words</h3>

  <div id="parsers" class="schema"></div>
  <script>
  Hoa.Document.onReady(function ( ) {

      var paper    = Hoa.Graph(Hoa.$('#parsers'), 800, 180);
      var grid     = paper.grid(0, 0, 800, 180, 5, 2);
      var word     = grid.push(paper.rect(0, 0, 140, 80, 3, 'word'), 0, 0);
      var sequence = grid.push(paper.rect(0, 0, 140, 80, 3, 'sequence'), 2, 0);
      var trace    = grid.push(paper.rect(0, 0, 140, 80, 3, 'result'), 4, 0);
      grid.push(paper.rect(0, 0, 140, 50, 3, 'abcdef'), 0, 1);
      grid.push(paper.rect(0, 0, 380, 50, 3, '[[a ⟼ …], [bc ⟼ …], [d ⟼ …], [ef ⟼ …]]'), 2, 1);
      grid.push(paper.rect(0, 0, 140, 50, 3, 'valid/invalid'), 4, 1);

      paper.link.between(word, sequence, 'lexical analyzer');
      paper.link.between(sequence, trace, 'syntactic analyzer');
  });
  </script>
  <p>In general, the compilation process begins with two
  <strong>analyzes</strong>: <strong>lexical</strong> and
  <strong>syntactic</strong>. A lexical analysis <strong>splits</strong> a word
  in a <strong>sequence of lexemes</strong>. This sequence will thereafter be
  used by the syntactic analyzer in order to verify that the word
  <strong>belongs</strong> to the language.</p>
  <p>According to the grammar, the matching will not be done in the same way,
  but the principle stays the same: using lexemes one after the other in the
  sequence and verify that they allow <strong>going forward</strong> in the
  <strong>derivation</strong> of grammar's rules.</p>
  <p>Syntactic analyzes are also classified into categories: LL, LR, LALR etc.
  <code>Hoa\Compiler</code> only offers LL syntactic analyzers, stands for
  Left-to-right Leftmost derivation, i.e. from the topest rule to the deepest,
  and rules are derived from the left to the right. Here, again, there is
  sub-categories, whose two supported by <code>Hoa\Compiler</code>: LL(1) and
  LL(*). Globally, we speak about LL(<em>k</em>) syntactic analyzer: if a lexeme
  does not allow to derive a rule as expected, then the analyzer is allowed to
  <strong>go back</strong> to <em>k</em> step backward; we also speak about
  backtrack. Put another way, rules can be <strong>ambiguous</strong>: each time
  we derive a rule of the grammar, we have several possible choices and the
  analyzer can be wrong, this is why it needs to backtrack sometimes. The
  <em>k</em> variable defines the ambiguity <strong>level</strong>. If a grammar
  can be analyzed by a LL(1) syntactic analyzer, it is known as
  <strong>unambiguous</strong>: each time a lexeme is used to derive our rules,
  there is only one choice. And if we have a LL(*) syntactic analyzer, it means
  that the <em>k</em> variable is <strong>undefined</strong>. The following
  example illustrates an unambiguous grammar:</p>
  <pre><code>rule ::= a b c | d e f</code></pre>
  <p>And this example illustrates an ambiguous grammar:</p>
  <pre><code>rule1 ::= a rule2
rule2 ::= b rule3 | b rule4
rule3 ::= c d
rule4 ::= e f</code></pre>
  <p>Let's see what happens when trying to find a derivation for the word
  <code>abef</code> from the root rule <code>rule1</code>:</p>
  <pre><code>rule1
→ a rule2                   <em>   a  bef ✔</em>
  → a (b rule3 | b rule4)   <em>   a  bef</em>
    → a b rule3             <em>  ab  ef  ✔</em>
      → a b c d             <em> abe  f   ✖</em>
    ← a b rule3             <em>  ab  ef  ✖</em>
  ← a (b rule3 | b rule4)   <em>   a  bef</em>
    → a b rule4             <em>  ab  ef  ✔</em>
      → a b e f             <em>abef      ✔</em></code></pre>
  <p>The <code>rule2</code> rule is ambiguous, which can lead to a bad
  derivation and consequently a backtrack.</p>

  <h2 id="LLk_compiler-compiler" for="main-toc">LL(<em>k</em>)
  compiler-compiler</h2>

  <p>Writing compilers is a <strong>laborious</strong> task. It is not always
  difficult but most of the time, it is repetitive and it takes time. This is
  why there exists <strong>compilers of compilers</strong>, or in other words,
  compilers generators. Most of the time, these compiler-compilers use an
  <strong>intermediary</strong> language to write a grammar. The
  <code>Hoa\Compiler</code> library provides the
  <code>Hoa\Compiler\Llk\Llk</code> class that allows the writing of
  compiler-compilers through a <strong>dedicated</strong> language.</p>

  <h3 id="PP_language" for="main-toc">PP language</h3>

  <p>The PP language, standing for <em>PHP Parser</em>, allows to express
  <strong>algebraic grammars</strong>. It is written in files having the
  <code>.pp</code> extension (please, see the
  <a href="@central_resource:path=Library/Compiler/.Mime"><code>hoa://Library/Compiler/.Mime</code></a>
  file).</p>
  <p>A grammar is composed of <strong>lexemes</strong> and
  <strong>rules</strong>. The declaration of a lexeme has the following syntax:
  <code>%token <em>namespace_in</em>:<em>name</em> <em>value</em> ->
  <em>namespace_out</em></code>, where <code><em>name</em></code> represents the
  <strong>name</strong> of the lexeme, <code><em>value</em></code> represents
  its <strong>value</strong>, expressed with the
  <a href="http://pcre.org/">PCRE</a> format (take care to not match an empty
  value, in which case an exception will be thrown), and
  <code><em>namespace_in</em></code> and <code><em>namespace_out</em></code>
  represent the names of <strong>namespaces</strong> and are optional (the
  default name is <code>default</code>). For example <code>number</code>
  describing a number composed of digits from <code>0</code> to
  <code>9</code>:</p>
  <pre><code class="language-pp">%token number \d+</code></pre>
  <p>Namespaces represent disjointed <strong>subsets</strong> of lexemes, used
  to <strong>ease</strong> analyzes. A <code>%skip</code> declaration is similar
  to <code>%token</code> excepts that it represents a lexeme to
  <strong>skip</strong>, it means to not consider. A common example of
  <code>%skip</code> lexemes are spaces:</p>
  <pre><code class="language-pp">%skip space \s</code></pre>
  <p>To explain rules, we will use the <code>Json.pp</code> grammar as an
  example, which is a softly <strong>simplified</strong> version of the
  <a href="http://json.org/">JSON language</a> (please, see the
  <a href="https://tools.ietf.org/html/rfc4627">RFC4627</a>). The
  <strong>complete</strong> grammar is located in the
  <a href="@central_resource:path=Library/Json/Grammar.pp"><code>hoa://Library/Json/Grammar.pp</code></a>
  file. Thus:</p>
  <pre><code class="language-pp">%skip   space          \s
// Scalars.
%token  true           true
%token  false          false
%token  null           null
// Strings.
%token  quote_         "        -> string
%token  string:string  [^"]+
%token  string:_quote  "        -> default
// Objects.
%token  brace_         {
%token _brace          }
// Arrays.
%token  bracket_       \[
%token _bracket        \]
// Rest.
%token  colon          :
%token  comma          ,
%token  number         \d+

value:
    &amp;lt;true> | &amp;lt;false> | &amp;lt;null> | string() | object() | array() | number()

string:
    ::quote_:: &amp;lt;string> ::_quote::

number:
    &amp;lt;number>

#object:
    ::brace_:: pair() ( ::comma:: pair() )* ::_brace::

#pair:
    string() ::colon:: value()

#array:
    ::bracket_:: value() ( ::comma:: value() )* ::_bracket::</code></pre>
  <p>Notice that we have two namespaces of lexemes: <code>default</code> and
  <code>string</code> (it allows to avoid <strong>confusion</strong> with the
  <code>quote_</code> and <code>string::_quote</code> lexemes that have the same
  representation). We also notice the <code>value</code> rule, which is a
  <strong>disjunction</strong> of several lexemes and rules. The
  <strong>constructions</strong> of the PP language are the following:</p>
  <ul>
    <li><code><em>rule</em>()</code> to <strong>call</strong> a rule,</li>
    <li><code>&amp;lt;<em>token</em>></code> and <code>::<em>token</em>::</code>
    to <strong>declare</strong> a lexeme (namespaces do not appear here),</li>
    <li><code>|</code> for a <strong>disjunction</strong> (a choice),</li>
    <li><code>(<em>…</em>)</code> for a group,</li>
    <li><code><em>e</em>?</code> to say that <code><em>e</em></code> is
    <strong>optional</strong>,</li>
    <li><code><em>e</em>+</code> to say that <code><em>e</em></code> can be
    present <strong>1 or more</strong> times,</li>
    <li><code><em>e</em>*</code> to say that <code><em>e</em></code> can be
    present <strong>0 or more</strong> times,</li>
    <li><code><em>e</em>{<em>x</em>,<em>y</em>}</code> to say that
    <code><em>e</em></code> can be present between <code><em>x</em></code> and
    <code><em>y</em></code> times,</li>
    <li><code>#<em>node</em></code> to create a <strong>node</strong>
    <code>node</code> in the resulting tree,</li>
    <li><code><em>token</em>[<em>i</em>]</code> to <strong>unify</strong>
    lexemes between each others.</li>
  </ul>
  <p>Few constructions but largely enough.</p>
  <p>Finally, the grammar of the PP language is written… with the PP language!
  You can find it in the
  <a href="@central_resource:path=Library/Compiler/Llk/Llk.pp"><code>hoa://Library/Compiler/Llk/Llk.pp</code></a>
  file.</p>

  <h3 id="Compilation_process" for="main-toc">Compilation process</h3>

  <div id="overview" class="schema"></div>
  <script>
  Hoa.Document.onReady(function ( ) {

      var paper = Hoa.Graph(Hoa.$('#overview'), 800, 360);
      var flow  = paper.grid(0, 0, 800, 360, 1, 4);
      flow.push(paper.rect(0, 0, 200, 70, 3, 'lexical analyzer'));
      flow.push(paper.rect(0, 0, 200, 70, 3, 'syntactic analyzer'));
      flow.push(paper.rect(0, 0, 200, 70, 3, 'trace'));
      flow.push(paper.rect(0, 0, 200, 70, 3, 'AST'));

      var annot = paper.grid(180, 0, 80, 360, 1, 4);
      annot.push(paper.rect(0, 0, 45, 45, 22.5, '1'));
      annot.push(paper.rect(0, 0, 45, 45, 22.5, '2'));
      annot.push(paper.rect(0, 0, 45, 45, 22.5, '3'));
      annot.push(paper.rect(0, 0, 45, 45, 22.5, '4'));
  });
  </script>
  <p>The compilation process used by <code>Hoa\Compiler\Llk\Llk</code> is
  classical: it starts by <strong>lexically</strong> analyzing the textual data,
  the word, i.e. to transform our data in a sequence of lexemes. The declaration
  <strong>order</strong> of the lexemes is primordial because the lexical
  analyzer will use them one after the other. Next, the
  <strong>syntactic</strong> analyzer comes into play in order to
  <strong>match</strong> our data.</p>
  <p>If the syntactic analysis is successful, we obtain a
  <strong>trace</strong>.  This trace can be transformed into an AST, stands for
  Abstract Syntax Tree.  This tree represents our textual data after the
  analysis. One advantage is that it can visited (we will detail this part
  later), which allows us to add new <strong>constraints</strong> which can be
  not be expressed in the grammar, such as type verification.</p>
  <p>Let's manipulate <code>Hoa\Compiler\Llk\Llk</code> a little bit. This class
  is a <strong>helper</strong> to easily read a grammar expressed with the PP
  format. This class takes only one argument, which is an input stream that
  points to the grammar and returns a <code>Hoa\Compiler\Llk\Parser</code>
  compiler ready to use. On this compiler, we will call the
  <code>Hoa\Compiler\Llk\Parser::parse</code> to analyze a JSON data. If the
  data is correct, we will get an AST, otherwise an exception will be thrown.
  Finally, we will use the <code>Hoa\Compiler\Visitor\Dump</code> visitor to
  print our AST:</p>
  <pre><code class="language-php">// 1. Load grammar.
$compiler = Hoa\Compiler\Llk\Llk::load(new Hoa\File\Read('Json.pp'));

// 2. Parse a data.
$ast      = $compiler->parse('{"foo": true, "bar": [null, 42]}');

// 3. Dump the AST.
$dump     = new Hoa\Compiler\Visitor\Dump();
echo $dump->visit($ast);

/**
 * Will output:
 *     >  #object
 *     >  >  #pair
 *     >  >  >  token(string:string, foo)
 *     >  >  >  token(true, true)
 *     >  >  #pair
 *     >  >  >  token(string:string, bar)
 *     >  >  >  #array
 *     >  >  >  >  token(null, null)
 *     >  >  >  >  token(number, 42)
 */</code></pre>
  <p>When we write and test a grammar, we will repeat these three tasks very
  <strong>often</strong>. This is why the <code>hoa</code> script provides the
  <code>compiler:pp</code> command. This command proposes to analyze a data
  based on a grammar and to apply a visitor if needed on the resulting AST.
  Notice that the grammar can be read through a
  <a href="https://en.wikipedia.org/wiki/Pipeline_(Unix)">pipe</a>:</p>
  <pre><code class="language-shell">$ echo '[1, [1, [2, 3], 5], 8]' | hoa compiler:pp Json.pp 0 --visitor dump
>  #array
>  >  token(number, 1)
>  >  #array
>  >  >  token(number, 1)
>  >  >  #array
>  >  >  >  token(number, 2)
>  >  >  >  token(number, 3)
>  >  >  token(number, 5)
>  >  token(number, 8)</code></pre>
  <p>This is a useful way to <strong>quickly</strong> test a data against a
  grammar. Do not hesitate to read the help of the <code>compiler:pp</code>
  command to get more details!</p>
  <p>The analyzes start with the <strong>root</strong> rule but we can use
  <strong>another rule</strong> thanks to the second argument of the
  <code>Hoa\Compiler\Llk\Parser::parse</code> method:</p>
  <pre><code class="language-php">$compiler->parse('{"foo": true, "bar": [null, 42]}', 'object');</code></pre>
  <p>To use the root rule, we have to use <code>null</code>.</p>
  <p>And finally, to not generate the AST but only know if a data is valid or
  not, we can use the last argument of this method by using
  <code>false</code>:</p>
  <pre><code class="language-php">$valid = $compiler->parse('{"foo": true, "bar": [null, 42]}', null, false);
var_dump($valid);

/**
 * Will output:
 *     bool(true)
 */</code></pre>

  <h4 id="Errors" for="main-toc">Errors</h4>

  <p>The compilation errors are represented by exceptions, thus:</p>
  <pre><code class="language-shell">$ echo '{"foo" true}' | hoa compiler:pp Json.pp 0 --visitor dump
Uncaught exception (Hoa\Compiler\Exception\UnexpectedToken):
Hoa\Compiler\Llk\Parser::parse(): (0) Unexpected token "true" (true) at line 1
and column 8:
{"foo" true}
       ↑
in hoa://Library/Compiler/Llk/Parser.php at line 1</code></pre>
  <p>Several exceptions can be thrown according to the context:</p>
  <ul>
    <li>during the <strong>lexical</strong> analysis,
    <code>Hoa\Compiler\Exception\UnrecognizedToken</code> when a lexeme is not
    recognized, i.e. when the textual data can not be split into a sequence of
    lexemes, and <code>Hoa\Compiler\Exception\Lexer</code> when other more
    general errors happen, for example if a lexeme matches an empty value,</li>
    <li>during the <strong>syntactic</strong> analysis,
    <code>Hoa\Compiler\Exception\UnexpectedToken</code> when a lexeme is not
    expected, i.e. it is not able to derive the rules of the grammar.</li>
  </ul>
  <p>The parent exception is <code>Hoa\Compiler\Exception\Exception</code>.</p>

  <h4 id="Nodes" for="main-toc">Nodes</h4>

  <p>The compilation process very often succeeds by the
  <strong>production</strong> of an AST. It is important to control its
  <strong>form</strong>, its <strong>size</strong>, the data it
  <strong>holds</strong> etc. This is why it is necessary to understand the
  <code>#<em>node</em></code> notation because it allows to create
  <strong>nodes</strong> in the AST. First, lexemes declared with the
  <code>&amp;lt;<em>token</em>></code> syntax will appear in the tree, while the
  other lexemes, declared with the <code>::<em>token</em>::</code> syntax, will
  not appear. Indeed, in our last example, the <code>quote_</code>,
  <code>brace_</code>, <code>colon</code>, <code>comma</code> etc. lexemes do
  not appear. Next, it is important to notice that the declaration of nodes can
  be <strong>overwritten</strong> inside a <strong>same rule</strong>. Finally,
  a rule name can be preceeded by <code>#</code>, just like the
  <code>#array</code> rule, that allows to define a <strong>default</strong>
  node, but it can be overwritten. For example, if we replace the
  <code>array</code> rule by:</p>
  <pre><code class="language-pp">#array:
    ::bracket_:: value() ( ::comma:: value() #bigarray )* ::_bracket::</code></pre>
  <p>If the array contains only one value, the node will be named
  <code>#array</code>, else it will be named <code>#bigarray</code>. Let's
  see:</p>
  <pre><code class="language-shell">$ echo '[42]' | hoa compiler:pp Json.pp 0 --visitor dump
>  #array
>  >  token(number, 42)
$ echo '[4, 2]' | hoa compiler:pp Json.pp 0 --visitor dump
>  #bigarray
>  >  token(number, 4)
>  >  token(number, 2)</code></pre>
  <p>Of course, a node can be created or not based on the
  <strong>derivation</strong> of a rule. The mecanism is normally pretty much
  <strong>intuitive</strong>.</p>

  <h4 id="Namespaces" for="main-toc">Namespaces</h4>

  <p>Let's detail a little bit the behavior of the lexical analyzer regarding
  the <strong>namespaces</strong>.</p>
  <p><strong>Lexemes</strong> are put in namespaces, it means that only the
  lexemes of the <strong>current</strong> namespace are used by the lexical
  analyzer. The default namespace is <code>default</code>. To declare the
  namespace of a lexeme, we have to use the <code>:</code> operator. When a
  lexeme is consumed, it is able to <strong>change</strong> the current
  namespace for the rest of the lexical analysis, thanks to the <code>-></code>
  operator. Thus, we will declare five lexemes: <code>foo</code> and
  <code>bar</code> in the <code>default</code> namespace, <code>baz</code> in
  <code>ns1</code> and <code>qux</code> and <code>foo</code> in
  <code>ns2</code>. The fact that <code>foo</code> is declared two times is not
  embarrassing because it is put in <strong>different</strong> namespaces:</p>
  <pre><code class="language-pp">%token      foo   fo+     -> ns1
%token      bar   ba?r+   -> ns2
%token  ns1:baz   ba?z+   -> default
%token  ns2:qux   qux+
%token  ns2:foo   FOO     -> ns1</code></pre>
  <p>Writing <code>default:bar</code> is strictly equivalent to
  <code>bar</code>. The <code>foo</code> lexeme leads into <code>ns1</code>,
  <code>bar</code> into <code>ns2</code>, <code>ns1:baz</code> into
  <code>default</code>, <code>ns2:qux</code> stays in <code>ns2</code> and
  <code>ns2:foo</code> leads into <code>ns1</code>. Let's observe the sequence
  of lexemes produced by the lexical analyzer with the following data
  <code>fooooobzzbarrrquxFOObaz</code>:</p>
  <pre><code class="language-php">$pp = '%token      foo   fo+     -> ns1'     . "\n" .
      '%token      bar   ba?r+   -> ns2'     . "\n" .
      '%token  ns1:baz   ba?z+   -> default' . "\n" .
      '%token  ns2:qux   qux+'               . "\n" .
      '%token  ns2:foo   FOO     -> ns1';

// 1. Parse PP.
Hoa\Compiler\Llk\Llk::parsePP($pp, $tokens, $rawRules);

// 2. Run the lexical analyzer.
$lexer    = new Hoa\Compiler\Llk\Lexer();
$sequence = $lexer->lexMe('fooooobzzbarrrquxFOObaz', $tokens);

// 3. Pretty-print the result.
$format   = '%' . (strlen((string) count($sequence)) + 1) . 's  ' .
            '%-13s %-20s  %-20s  %6s' . "\n";
$header   = sprintf($format, '#', 'namespace', 'token name', 'token value', 'offset');

echo $header, str_repeat('-', strlen($header)), "\n";

foreach ($sequence as $i => $token) {
    printf(
        $format,
        $i,
        $token['namespace'],
        $token['token'],
        $token['value'],
        $token['offset']
    );
}

/**
 * Will output:
 *      #  namespace     token name            token value           offset
 *     ---------------------------------------------------------------------
 *      0  default       foo                   fooooo                     0
 *      1  ns1           baz                   bzz                        6
 *      2  default       bar                   barrr                      9
 *      3  ns2           qux                   qux                       14
 *      4  ns2           foo                   FOO                       17
 *      5  ns1           baz                   baz                       20
 *      6  default       EOF                   EOF                       23
 */</code></pre>
  <p>We read the lexemes, their namespace and their default value in the table.
  The data has been successfully <strong>splitted</strong>, and we have jumped
  from one namespace to the other. If this time we try with the
  <code>foqux</code> data, we will have an error: <code>fo</code> is matched by
  the <code>foo</code> lexeme in the <code>default</code> namespace, we then
  jump to the <code>ns1</code> namespace, and here, no lexeme in this namespace
  is able to recognize at least <code>q</code>. An error is thrown.</p>
  <p>So far, we have seen how to jump from one namespace to another with the
  <code>-></code> operator. No <strong>history</strong> about the used
  namespaces is stored. However, in some rare cases, it is able for a lexeme to
  be accessible through <strong>several</strong> namespaces and we would like
  that a lexeme jumps back to the <strong>previous</strong> namespace. Put
  another way, we would like a history of the used namespaces and being able to
  navigate (backward only) in it. This is the role of the
  <code>__shift__ * <em>n</em></code> keyword, in conjunction with the
  <code>-></code> operator as usual. <code>__shift__</code> is equivalent to
  say: jump back to the previous namespace. <code>__shift__</code> is equivalent
  to <code>__shift__ * 1</code>, and <code>__shift__ * <em>n</em></code> to say:
  jump back <code><em>n</em></code> times to the previous namespace.</p>
  <p>When the <code>__shift__</code> keyword appears in the grammar, namespaces
  are managed like a <strong>stack</strong>, hence the <em>shift</em>
  vocabulary. We have to take care to shift namespaces regularly in order to
  avoid a huge stack.</p>
  <p>Let's take the example of the following grammar:</p>
  <pre><code class="language-pp">%token       foo1  a    -> ns1
%token       foo2  x    -> ns2
%token       end   e

%token   ns1:bar   b
%token   ns1:baz   c    -> ns3
%token   ns1:tada  t    -> __shift__

%token   ns2:bar   y
%token   ns2:baz   z    -> ns3
%token   ns2:tada  T    -> __shift__

%token   ns3:qux   =   -> __shift__

#test:
    ( &amp;lt;foo1> | &amp;lt;foo2> ) &amp;lt;bar> &amp;lt;baz> &amp;lt;qux> &amp;lt;tada> &amp;lt;end></code></pre>
  <p>This grammar recognizes two data: <code>abc=te</code> and
  <code>xyz=Te</code>. If the first lexeme <code>foo1</code> is matched, the
  syntactic analyzer will jump to the <code>ns1</code> namespace. When it will
  match the <code>ns1:baz</code> namespace, it will jump into <code>ns3</code>.
  Then, when it will match <code>ns3:qux</code>, it will jump back to the
  previous namespace, being <code>ns1</code>. And so on. Now, if it does not
  match <code>foo1</code> but <code>foo2</code>, it will jump to the
  <code>ns2</code> namespace, and then in <code>ns3</code> and then in
  <code>ns2</code> again. The <code>__shift__</code> keywords in
  <code>ns1:tada</code> and <code>ns2:tada</code> are only used to shift
  namespaces but no ambiguity exists: these namespaces are accessible by only
  one namespace, namely <code>default</code>.</p>
  <p>Now, let's save this grammar in the <code>NamespaceStack.pp</code> file and
  use the <code>-s/--token-sequence</code> option of the <code>hoa
  compiler:pp</code> command:</p>
  <pre><code class="language-shell">$ echo -n 'abc=te' | hoa compiler:pp NamespaceStack.pp 0 --token-sequence
 #  namespace     token name            token value                     offset
-------------------------------------------------------------------------------
 0  default       foo1                  a                                    0
 1  ns1           bar                   b                                    1
 2  ns1           baz                   c                                    2
 3  ns3           qux                   =                                    3
 4  ns1           tada                  t                                    4
 5  default       end                   e                                    5
 6  default       EOF                   EOF                                  6

$ echo -n 'xyz=Te' | hoa compiler:pp NamespaceStack.pp 0 --token-sequence
 #  namespace     token name            token value                     offset
-------------------------------------------------------------------------------
 0  default       foo2                  x                                    0
 1  ns2           bar                   y                                    1
 2  ns2           baz                   z                                    2
 3  ns3           qux                   =                                    3
 4  ns2           tada                  T                                    4
 5  default       end                   e                                    5
 6  default       EOF                   EOF                                  6</code></pre>
  <p>We see that the lexical analyzer has successfully jumped between all
  namespaces, as expected. We had two ways to access to the <code>ns3</code>
  namespace: either from <code>ns1</code> or from <code>ns2</code>. The analyzer
  has succeeded to create a history of namespaces and navigate in it.</p>

  <h4 id="Unification" for="main-toc">Unification</h4>

  <p>A new feature brought by the PP language regarding other grammar languages
  is the capability to express a <strong>unification</strong> of lexemes. Let's
  imagine the following grammar:</p>
  <pre><code class="language-pp">%token  quote   '|"
%token  string  \w+

rule:
    ::quote:: &amp;lt;string> ::quote::</code></pre>
  <p>The quotes surrounding the string can be of two kinds: simple, with the
  “<code>'</code>” symbol, or double, with the “<code>"</code>” symbol. Thus,
  the <code>"foo"</code> and <code>'foo'</code> data are valid, but
  <strong>also</strong> <code>"foo'</code> and <code>'foo"</code>!</p>
  <p>The unification of lexemes allows to add an additionnal
  <strong>constraint</strong> on the <strong>value</strong> of lexemes at
  runtime. The syntax is the following: <code><em>token</em>[<em>i</em>]</code>.
  The value of <code><em>i</em></code> indicates what lexemes will have the same
  value. And finally, the unification is <strong>locale</strong> to an instance
  of a rule, it means that there is no unification between lexemes of different
  rules and the unification is only applied on the <strong>current</strong>
  rule. Thus, the example becomes:</p>
  <pre><code class="language-pp">rule:
    ::quote[0]:: &amp;lt;string> ::quote[0]::</code></pre>
  <p>Which invalidates the <code>"foo'</code> and <code>'foo"</code> data.</p>
  <p>Unification finds numerous applications, such as the name of opening and
  closing tags in the <a href="http://w3.org/TR/xml11/">XML language</a>.</p>

  <h3 id="Abstract_Syntax_Tree" for="main-toc">Abstract Syntax Tree</h3>

  <div id="overview_ast" class="schema"></div>
  <script>
  Hoa.Document.onReady(function ( ) {

      var paper = Hoa.Graph(Hoa.$('#overview_ast'), 800, 360);
      var flow  = paper.grid(0, 0, 800, 360, 1, 4);
      flow.push(paper.rect(0, 0, 200, 70, 3, 'lexical analyzer').attr({opacity: .3}));
      flow.push(paper.rect(0, 0, 200, 70, 3, 'syntactic analyzer').attr({opacity: .3}));
      flow.push(paper.rect(0, 0, 200, 70, 3, 'trace').attr({opacity: .3}));
      flow.push(paper.rect(0, 0, 200, 70, 3, 'AST'));

      var annot = paper.grid(180, 0, 80, 360, 1, 4);
      annot.push(paper.rect(0, 0, 45, 45, 22.5, '1').attr({opacity: .3}));
      annot.push(paper.rect(0, 0, 45, 45, 22.5, '2').attr({opacity: .3}));
      annot.push(paper.rect(0, 0, 45, 45, 22.5, '3').attr({opacity: .3}));
      annot.push(paper.rect(0, 0, 45, 45, 22.5, '4'));
  });
  </script>
  <p>An <strong>abstract syntax</strong> tree represents a textual data in a
  <strong>structural</strong> form. Each <strong>node</strong> of this tree is
  represented by the <code>Hoa\Compiler\Llk\TreeNode</code> class. Among the
  most useful methods, we find:</p>
  <ul>
    <li><code>getId</code> to get the identifier of the node,</li>
    <li><code>getValueToken</code> to get the name of the lexeme,</li>
    <li><code>getValueValue</code> to get the value of the lexeme,</li>
    <li><code>isToken</code> if the token represents a lexeme,</li>
    <li><code>getChild(<em>$i</em>)</code> to get the
    <code><em>$i</em></code>-th child of the node,</li>
    <li><code>getChildren</code> to get all the children,</li>
    <li><code>getChildrenNumber</code> to count the number of children,</li>
    <li><code>getParent</code> to get the parent node,</li>
    <li><code>getData</code> to get a reference to a data array,</li>
    <li><code>accept</code> to apply the visitor.</li>
  </ul>
  <p>Visitors are the most simple way to <strong>cross</strong> an AST. As an
  example, let's write the <code>PrettyPrinter</code> visitor which will rewrite
  a JSON data with our own conventions (spacing, line breaking etc.). A visitor
  must implement the <code>Hoa\Visitor\Visit</code> interface and will have only
  one method to implement: <code>visit</code> with three arguments:
  the element and two optional arguments (by reference and by copy). Let's
  see:</p>
  <pre><code class="language-php">class PrettyPrinter implements Hoa\Visitor\Visit
{
    public function visit (
        Hoa\Visitor\Element $element,
        &amp;amp;$handle = null,
        $eldnah = null
    ) {
        static $i      = 0;
        static $indent = '    ';

        // One behaviour per node in the AST.
        switch ($element->getId()) {
            // Object: { … }.
            case '#object':
                echo '{', "\n";
                ++$i;

                foreach ($element->getChildren() as $e => $child) {
                    if (0 &amp;lt; $e) {
                        echo ',', "\n";
                    }

                    echo str_repeat($indent, $i);
                    $child->accept($this, $handle, $eldnah);
                }

                echo "\n", str_repeat($indent, --$i), '}';

                break;

            // Array: [ … ].
            case '#array':
                echo '[', "\n";
                ++$i;

                foreach ($element->getChildren() as $e => $child) {
                    if (0 &amp;lt; $e) {
                        echo ',', "\n";
                    }

                    echo str_repeat($indent, $i);
                    $child->accept($this, $handle, $eldnah);
                }

                echo "\n", str_repeat($indent, --$i), ']';

                break;

            // Pair: "…": ….
            case '#pair':
                echo
                    $element->getChild(0)->accept($this, $handle, $eldnah),
                    ': ',
                    $element->getChild(1)->accept($this, $handle, $eldnah);

                break;

            // Many tokens.
            case 'token':
                switch ($element->getValueToken()) {
                    // String: "…".
                    case 'string':
                        echo '"', $element->getValueValue(), '"';

                        break;

                    // Booleans.
                    case 'true':
                    case 'false':

                    // Null.
                    case 'null':

                    // Number.
                    case 'number':
                        echo $element->getValueValue();

                        break;
                }

                break;
        }
    }
}</code></pre>
  <p>We are going to see an example:</p>
  <pre><code class="language-php">$compiler    = Hoa\Compiler\Llk\Llk::load(new Hoa\File\Read('Json.pp'));
$ast         = $compiler->parse('{"foo": true, "bar": [null, 42]}');
$prettyPrint = new PrettyPrinter();
echo $prettyPrint->visit($ast);

/**
 * Will output:
 *     {
 *         "foo": true,
 *         "bar": [
 *             null,
 *             42
 *         ]
 *     }
 */</code></pre>
  <p>The <code>getData</code> method is very useful to <strong>store</strong>
  data that are likely to be <strong>reused</strong>, for example from one
  visitor to another. This method returns a <strong>reference</strong> to an
  array; thus:</p>
  <pre><code class="language-php">$data = $element->getData();

if (!isset($data['previousComputing'])) {
    throw new Exception('Need a previous computing.', 0);
}

$previous = $data['previousComputing'];</code></pre>
  <p>It is common to use one visitor per <strong>constraint</strong>:
  verification of symbols, verification of types etc. Some of them can set data
  for the next ones. The <code>getData</code> method does not require any
  data structure, it only provides an access to an array. Feel free to do what
  you want with it.</p>
  <p>Using the <code>Hoa\Compiler\Llk\TreeNode</code> is very
  <strong>trivial</strong> and we will use it most of the time with a
  visitor.</p>

  <h3 id="Traces" for="main-toc">Traces</h3>

  <div id="overview_trace" class="schema"></div>
  <script>
  Hoa.Document.onReady(function ( ) {

      var paper = Hoa.Graph(Hoa.$('#overview_trace'), 800, 360);
      var flow  = paper.grid(0, 0, 800, 360, 1, 4);
      flow.push(paper.rect(0, 0, 200, 70, 3, 'lexical analyzer').attr({opacity: .3}));
      flow.push(paper.rect(0, 0, 200, 70, 3, 'syntactic analyzer').attr({opacity: .3}));
      flow.push(paper.rect(0, 0, 200, 70, 3, 'trace'));
      flow.push(paper.rect(0, 0, 200, 70, 3, 'AST').attr({opacity: .3}));

      var annot = paper.grid(180, 0, 80, 360, 1, 4);
      annot.push(paper.rect(0, 0, 45, 45, 22.5, '1').attr({opacity: .3}));
      annot.push(paper.rect(0, 0, 45, 45, 22.5, '2').attr({opacity: .3}));
      annot.push(paper.rect(0, 0, 45, 45, 22.5, '3'));
      annot.push(paper.rect(0, 0, 45, 45, 22.5, '4').attr({opacity: .3}));
  });
  </script>
  <p>The LL(<em>k</em>) compiler provided by Hoa is clearly composed of
  <strong>layers</strong>. Each layer can be used with a maximal modularity and
  extensibility. When the grammar is translated into “machine rules” and that
  the lexical and syntactic analyzers have validated a data, a
  <strong>trace</strong> is computed. This trace is a flat array containing only
  three kind of classes:</p>
  <ul>
    <li><code>Hoa\Compiler\Llk\Rule\Entry</code> when the syntactic analyzer has
    opened a rule,</li>
    <li><code>Hoa\Compiler\Llk\Rule\Ekzit</code> when the syntactic analyzer has
    closed a rule,</li>
    <li><code>Hoa\Compiler\Llk\Rule\Token</code> when the syntactic analyzer has
    encountered a lexeme.</li>
  </ul>
  <p>We can get the trace with the
  <code>Hoa\Compiler\Llk\Parser::getTrace</code> method. To understand this
  trace, we will start with an example:</p>
  <pre><code class="language-php">$compiler = Hoa\Compiler\Llk\Llk::load(new Hoa\File\Read('Json.pp'));
$ast      = $compiler->parse('{"foo": true, "bar": [null, 42]}');
$i        = 0;

foreach ($compiler->getTrace() as $element) {
    if ($element instanceof Hoa\Compiler\Llk\Rule\Entry) {
        echo str_repeat('>   ', ++$i), 'enter ', $element->getRule(), "\n";
    } elseif ($element instanceof Hoa\Compiler\Llk\Rule\Token) {
        echo
            str_repeat('    ', $i + 1), 'token ', $element->getTokenName(),
            ', consumed ', $element->getValue(), "\n";
    } else {
        echo str_repeat('&amp;lt;   ', $i--), 'ekzit ', $element->getRule(), "\n";
    }
}

/**
 * Will output:
 *     >   enter value
 *     >   >   enter object
 *                 token brace_, consumed {
 *     >   >   >   enter pair
 *     >   >   >   >   enter string
 *                         token quote_, consumed "
 *                         token string, consumed foo
 *                         token _quote, consumed "
 *     &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   ekzit string
 *                     token colon, consumed :
 *     >   >   >   >   enter value
 *                         token true, consumed true
 *     &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   ekzit value
 *     &amp;lt;   &amp;lt;   &amp;lt;   ekzit pair
 *     >   >   >   enter 13
 *     >   >   >   >   enter 12
 *                         token comma, consumed ,
 *     >   >   >   >   >   enter pair
 *     >   >   >   >   >   >   enter string
 *                                 token quote_, consumed "
 *                                 token string, consumed bar
 *                                 token _quote, consumed "
 *     &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   ekzit string
 *                             token colon, consumed :
 *     >   >   >   >   >   >   enter value
 *     >   >   >   >   >   >   >   enter array
 *                                     token bracket_, consumed [
 *     >   >   >   >   >   >   >   >   enter value
 *                                         token null, consumed null
 *     &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   ekzit value
 *     >   >   >   >   >   >   >   >   enter 21
 *     >   >   >   >   >   >   >   >   >   enter 20
 *                                             token comma, consumed ,
 *     >   >   >   >   >   >   >   >   >   >   enter value
 *                                                 token number, consumed 42
 *     &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   ekzit value
 *     &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   ekzit 20
 *     &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   ekzit 21
 *                                     token _bracket, consumed ]
 *     &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   ekzit array
 *     &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   ekzit value
 *     &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   ekzit pair
 *     &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   ekzit 12
 *     &amp;lt;   &amp;lt;   &amp;lt;   ekzit 13
 *                 token _brace, consumed }
 *     &amp;lt;   &amp;lt;   ekzit object
 *     &amp;lt;   ekzit value
 */</code></pre>
  <p>This example reveals several things. First, the informations given by the
  trace can be useful: if we are on a rule, we have its <strong>name</strong>
  (with the <code>getRule</code> method), and if we are on a lexeme, we have its
  <strong>name</strong> (with the <code>getTokenName</code> method), its
  <strong>representation</strong> (expressed in the PCRE format, with the
  <code>getRepresentation</code> method), its <strong>value</strong> (with the
  <code>getValue</code> method), if it is a node to <strong>keep</strong> in the
  AST (with the <code>isKept</code> method) and its <strong>unification</strong>
  index if it exists (with the <code>getUnificationIndex</code> method). Of
  course, all these informations can be edited, which can influence the
  construction of the AST which is the (optional) next step.</p>
  <p>Next, we notice that sometimes we enter in a rule that exists in the
  grammar, like <code>object</code>, <code>pair</code>, <code>value</code> etc.,
  and sometimes we enter in a <strong>numerical</strong> rule, like
  <code>13</code>, <code>12</code>, <code>21</code>, <code>20</code> etc. When
  the grammar is interpreted in order to be translated into “machine rules”,
  each one of these rules is <strong>linearized</strong> regarding the PP
  operators:</p>
  <ul>
    <li><code>Hoa\Compiler\Llk\Rule\Choice</code> for a disjunction</li>
    <li><code>Hoa\Compiler\Llk\Rule\Concatenation</code> for a
    concatenation,</li>
    <li><code>Hoa\Compiler\Llk\Rule\Repetition</code> for a repetition,</li>
    <li><code>Hoa\Compiler\Llk\Rule\Token</code> for a token (like seen
    above).</li>
  </ul>
  <p>All these rules in this format are accessible through the
  <code>Hoa\Compiler\Llk\Parser::getRules</code> methods, represented by an
  array. We will print all the <strong>accessible</strong> rules from the root
  for a better understanding:</p>
  <pre><code class="language-php">$compiler = Hoa\Compiler\Llk\Llk::load(new Hoa\File\Read('Json.pp'));

// 1. Get all rules.
$rules    = $compiler->getRules();

// 2. Start with the root rule.
$stack    = [$compiler->getRootRule() => true];

while (false !== current($stack)) {
    $rule = key($stack);
    next($stack);
    echo
        "\n", '"', $rule, '" is a ',
        strtolower(substr(get_class($rules[$rule]), 22));

    $subrules = $rules[$rule]->getContent();

    // 3a. Token.
    if (null === $subrules) {
        continue;
    }

    echo ' of rules: ';

    // 3b. Other rules.
    foreach ((array) $rules[$rule]->getContent() as $subrule) {
        if (!array_key_exists($subrule, $stack)) {
            // 4. Unshift new rules to print.
            $stack[$subrule] = true;
        }

        echo $subrule, ' ';
    }
}

/**
 * Will output:
 *     "value" is a choice of rules: 1 2 3 string object array number
 *     "1" is a token
 *     "2" is a token
 *     "3" is a token
 *     "string" is a concatenation of rules: 5 6 7
 *     "object" is a concatenation of rules: 10 pair 13 14
 *     "array" is a concatenation of rules: 18 value 21 22
 *     "number" is a token
 *     "5" is a token
 *     "6" is a token
 *     "7" is a token
 *     "10" is a token
 *     "pair" is a concatenation of rules: string 16 value
 *     "13" is a repetition of rules: 12
 *     "14" is a token
 *     "18" is a token
 *     "21" is a repetition of rules: 20
 *     "22" is a token
 *     "16" is a token
 *     "12" is a concatenation of rules: 11 pair
 *     "20" is a concatenation of rules: 19 value
 *     "11" is a token
 *     "19" is a token
 */</code></pre>
  <p>If we read the <code>object</code> rule, we know that it is a concatenation
  of the <code>10</code>, <code>pair</code>, <code>13</code> and <code>14</code>
  rules. <code>10</code> is a lexeme, <code>pair</code> is a concatenation of
  the <code>string</code>, <code>16</code> and <code>value</code> rules, and so
  on. The initial grammar is translated in order to be in its
  <strong>tiniest</strong> form. It allows to <strong>reason</strong> on rules
  in an <strong>easier</strong> and <strong>faster</strong> way. Indeed,
  computations on the grammar are not restricted to AST. In the previous step,
  with the trace, we are already able to apply computations.</p>

  <h3 id="Generation" for="main-toc">Generation</h3>

  <p>A grammar can be used to satisfy two goals: to <strong>validate</strong> a
  data (if we see it as an automata) or to <strong>generate</strong> a data. So
  far, we have seen how to validate a data through several steps:
  <strong>initialization</strong> of our compiler, running of the lexical and
  syntactic <strong>analyzers</strong>, producing a <strong>trace</strong>,
  transformation of this trace into an <strong>AST</strong> in order to
  <strong>visit</strong> that tree. But we can stop at the first step, the
  initialization of our compiler, to exploit the rules in order to generate a
  data which will be valid regarding our grammar.</p>
  <p><code>Hoa\Compiler\Llk\Sampler</code> provides three data
  <strong>generation</strong> algorithms:</p>
  <ul>
    <li>random uniform generation,</li>
    <li>bounded exhaustive generation,</li>
    <li>grammar coverage-based generation.</li>
  </ul>
  <p>Why providing three algorithms? Because it is illusory to think that one
  algorithm can satisfy <strong>numerous</strong> context of usages. Each one
  fits different needs, we will explain them later.</p>
  <p>Generating a data based on a grammar requires <strong>two
  steps</strong>:</p>
  <ol>
    <li>generating values for all <strong>lexemes</strong> in order to get raw
    data,</li>
    <li>generating a <strong>path</strong> in the rules of the grammar.</li>
  </ol>
  <p>A path is equivalent to a derivation, the vocabulary is different according
  to our goal: validation or generation.</p>

  <h4 id="Isotropic_generation_of_lexemes" for="main-toc">Isotropic generation
  of lexemes</h4>

  <p>In order to generate values for lexemes, no matter what algorithm is used,
  it has to be <strong>fast</strong>. We are going to use a process called
  <strong>isotropic</strong>. We start with a rule and we go forward only by
  using <strong>random</strong> and <strong>locally uniform</strong> (only for
  this choice) choices. For instance, if we have a disjunction between three
  sub-rules, we will randomly and uniformly choose between 1 and 3. If we have a
  concatenation, we will just concatenate each parts. And finally, a repetition
  is nothing more than a disjunction of concatenation: indeed,
  <code><em>e</em>{1,3}</code> is strictly equivalent to <code><em>e</em> |
  <em>ee</em> | <em>eee</em></code>. Let's see:</p>
  <pre><code>([ae]+|[x-z]!){1,3}              <em>repeat <em>[ae]+|[x-z]!</em> 2 times</em>
→ ([ae]+|[x-z]!)([ae]+|[x-z]!)  <em>choose between <em>[ae]+</em> and <em>[x-z]!</em></em>
→ ([ae]+)([ae]+|[x-z]!)         <em>repeat <code>ae</code> 2 times</em>
→ [ae][ae]([ae]+|[x-z]!)        <em>choose between <em>a</em> and <em>e</em></em>
→ e[ae]([ae]+|[x-z]!)           <em>again</em>
→ ea([ae]+|[x-z]!)              <em>choose between <em>[ae]+</em> and <em>[x-z]!</em></em>
→ ea([x-z]!)                    <em>choose between <em>x</em>, <em>y</em> and <em>z</em></em>
→ eay!</code></pre>
  <p>This generation is naive but this is not important. What is important is
  the path generation in rules, or put another way, the generation of
  <strong>sequences of lexemes</strong>.</p>

  <h4 id="Uniform_random_generation" for="main-toc">Random uniform
  generation</h4>

  <p>The first algorithm is the <strong>random</strong> and
  <strong>uniform</strong> generation. This algorithm is useful if we would like
  to generate sequences of lexemes of a <strong>given size <em>n</em></strong>
  with a <strong>uniformity</strong>, not local (like in the isotropic
  generation), but on the <strong>set</strong> of all the possible sequences.
  Succinctly, the algorithm works in two steps: <strong>pre-computation</strong>
  (once per size) followed by a <strong>generation</strong>. The pre-computation
  is an <strong>automatic</strong> step and computes the <strong>number</strong>
  of all the possible sequences and sub-sequences of size <em>n</em>. This step
  helps to compute <strong>cumulative distribution functions</strong> in order
  to <strong>guide</strong> the final sequences of lexemes.</p>
  <p>We will generate 10 random data of size 7, it means composed of 7 lexemes.
  That's why we will use the <code>Hoa\Compiler\Llk\Sampler\Uniform</code> class
  that takes our grammar in first argument, the lexeme value generator in second
  argument (here <code>Hoa\Regex\Visitor\Isotropic</code>) and finally a
  size:</p>
  <pre><code class="language-php">$sampler = new Hoa\Compiler\Llk\Sampler\Uniform(
    // Grammar.
    Hoa\Compiler\Llk\Llk::load(new Hoa\File\Read('Json.pp')),
    // Token sampler.
    new Hoa\Regex\Visitor\Isotropic(new Hoa\Math\Sampler\Random()),
    // Length.
    7
);

for ($i = 0; $i &amp;lt; 10; ++$i) {
    echo $i, ' => ', $sampler->uniform(), "\n";
}

/**
 * Will output:
 *     0 => [ false , null , null ]
 *     1 => [ " l " , null ]
 *     2 => [ [ true ] , true ]
 *     3 => [ [ [ 4435 ] ] ]
 *     4 => [ [ [ 9366 ] ] ]
 *     5 => [ true , false , null ]
 *     6 => { " |h&amp;lt;# " : false }
 *     7 => [ [ [ false ] ] ]
 *     8 => [ false , true , 7 ]
 *     9 => [ false , 5 , 79 ]
 */</code></pre>
  <p>We can redefine the size with the
  <code>Hoa\Compiler\Llk\Sampler\Uniform::setLength</code> method. We have
  noticed that some repetition operators have no upper bound, like
  <code>+</code> or <code>*</code>; in this case, we set it to <em>n</em>.</p>

  <h4 id="Bounded_exhaustive_generation" for="main-toc">Bounded exhaustive
  generation</h4>

  <p>The second algorithm is the <strong>bounded exhaustive</strong> generation.
  This algorithm generates <strong>all</strong> sequences of lexemes (for the
  exhaustive side) from size 1 <strong>to</strong> <em>n</em> (for the
  bounded side). An interesting aspect of this algorithm is that the
  exhaustivity is kind of a <strong>proof</strong>! The algorithm behaves like
  an iterator and is very simple to use:</p>
  <pre><code class="language-php">$sampler = new Hoa\Compiler\Llk\Sampler\BoundedExhaustive(
    // Grammar.
    Hoa\Compiler\Llk\Llk::load(new Hoa\File\Read('Json.pp')),
    // Token sampler.
    new Hoa\Regex\Visitor\Isotropic(new Hoa\Math\Sampler\Random()),
    // Length.
    7
);

foreach ($sampler as $i => $data) {
    echo $i, ' => ', $data, "\n";
}

/**
 * Will output:
 *     0 => true
 *     1 => false
 *     2 => null
 *     3 => " 8u2 "
 *     4 => { " ,M@aj{ " : true }
 *     5 => { " x`|V " : false }
 *     6 => { " NttB " : null }
 *     7 => { " eJWwA " : 0 }
 *     8 => [ true ]
 *     9 => [ true , true ]
 *     10 => [ true , true , true ]
 *     11 => [ true , true , false ]
 *     12 => [ true , true , null ]
 *     13 => [ true , true , 32 ]
 *     14 => [ true , false ]
 *     15 => [ true , false , true ]
 *     16 => [ true , false , false ]
 *     17 => [ true , false , null ]
 *     18 => [ true , false , 729 ]
 *     19 => [ true , null ]
 *     20 => [ true , null , true ]
 *     21 => [ true , null , false ]
 *     …
 *     157 => [ 780 , 01559 , 32 ]
 *     158 => 344
 */</code></pre>
  <p>Like the previous algorithm, we can redefine the upper bound with the
  <code>Hoa\Compiler\Llk\Sampler\BoundedExhaustive::setLength</code> method. And
  the repetition operators with no upper bounds are bounded to <em>n</em>.</p>

  <h4 id="Grammar_coverage-based_generation" for="main-toc">Grammar
  coverage-based generation</h4>

  <p>The last algorithm is the <strong>grammar coverage-based</strong>
  generation. This algorithm reduces the <strong>combinatory explosion</strong>
  encountered with the previous algorithm but the goal is different: it will
  generate sequences of lexemes that will “<strong>activate</strong>” all the
  rules <strong>branches</strong> of the grammar. A rule is said covered if and
  only if all its sub-rules are covered, and a lexeme is said covered if it has
  been used in a sequence. To ensure a <strong>diversity</strong> in the
  produced sequences, choice points between uncovered sub-rules are resolved
  <strong>randomly</strong>. The algorithm also behaves like an iterator:</p>
  <pre><code class="language-php">$sampler = new Hoa\Compiler\Llk\Sampler\Coverage(
    // Grammar.
    Hoa\Compiler\Llk\Llk::load(new Hoa\File\Read('Json.pp')),
    // Token sampler.
    new Hoa\Regex\Visitor\Isotropic(new Hoa\Math\Sampler\Random())
);

foreach ($sampler as $i => $data) {
    echo $i, ' => ', $data, "\n";
}

/**
 * Will output:
 *     0 => true
 *     1 => { " )o?bz " : null , " %3W) " : [ false , 130 , " 6 " ] }
 *     2 => [ { " ny  " : true } ]
 *     3 => { " Ne;[3 " : [ true , true ] , " th: " : true , " C[8} " : true }
 */</code></pre>
  <p>To avoid the combinatory explosion and to ensure the
  <strong>termination</strong> of the algorithm, we will use the following
  <strong>heuristic</strong> on the <strong>repetition</strong> operators:
  <code>*</code> will repeat <code>0</code>, <code>1</code> and
  <code>2</code> times, <code>+</code> will repeat <code>1</code> and
  <code>2</code> times, and finally <code>{<em>x</em>,<em>y</em>}</code> will
  repeat <code><em>x</em></code>, <code><em>x</em> + 1</code>,
  <code><em>y</em> - 1</code> and <code><em>y</em></code> times. This heuristic
  finds its origin in the <strong>limit</strong> testing.</p>
  <p>We notice in our example that 4 data are generated and are enough to
  <strong>cover</strong> entirely our grammar!</p>

  <h4 id="Comparison_between_algorithms" for="main-toc">Comparison between
  algorithms</h4>

  <p>Here are some <strong>clues</strong> to know when to use one algorithm
  instead of another.</p>
  <dl>
    <dt>Random uniform generation:</dt>
    <dd><ul>
      <li data-item="+">fast for small data, high data diversity and fixed
      size,</li>
      <li data-item="-">the pre-computation step is exponential and therefore
      long while, next, the generation is very fast.</li>
    </ul></dd>
    <dt>Bounded exhaustive generation:</dt>
    <dd><ul>
      <li data-item="+">fast for small data and exhaustivity is efficient,</li>
      <li data-item="-">exponential number of data.</li>
    </ul></dd>
    <dt>Grammar coverage-based generation:</dt>
    <dd><ul>
      <li data-item="+">fast for average or big data, and diversity of
      data,</li>
      <li data-item="-">do not consider size.</li>
    </ul></dd>
  </dl>

  <h2 id="LL1_compiler-compiler" for="main-toc">LL(1) compiler-compiler</h2>

  <p>The documentation of the LL(1) compiler, through the
  <code>Hoa\Compiler\Ll1</code> class, is not written yet. The goal is different
  regarding <code>Hoa\Compiler\Llk</code>: there is no grammar description
  language, automata are hard-coded with arrays and this type of compiler is
  high performance oriented. That's why its behavior is
  <strong>monolitic</strong>.</p>

  <h2 id="Conclusion" for="main-toc">Conclusion</h2>

  <p><code>Hoa\Compiler</code> provides two <strong>compiler-compilers</strong>:
  <code>Hoa\Compiler\Llk</code> and <code>Hoa\Compiler\Ll1</code>, in order to
  <strong>validate</strong> data. The <strong>PP language</strong> allows to
  write <strong>algebraic grammars</strong> in a <strong>simple</strong> and
  <strong>natural</strong> way. The LL(<em>k</em>) compiler-compiler is split
  in <strong>distinct processus</strong>, which encourages hackability. Finally,
  several algorithms allows to <strong>generate</strong> data based on a grammar
  according to specific usages.</p>

</yield>
</overlay>
<?xml version="1.0" encoding="utf-8"?>

<overlay xmlns="http://hoa-project.net/xyl/xylophone">
<yield id="chapter">

  <p>Les <strong>compilateurs</strong> permettent d'<strong>analyser</strong> et
  <strong>manipuler</strong> des données <strong>textuelles</strong>. Leurs
  applications sont très nombreuses. <code>Hoa\Compiler</code> propose de
  manipuler plusieurs compilateurs selon les besoins.</p>

  <h2 id="Table_of_contents">Table des matières</h2>

  <tableofcontents id="main-toc" />

  <h2 id="Introduction" for="main-toc">Introduction</h2>

  <blockquote cite="https://fr.wikipedia.org/wiki/Nicolas_Boileau">Ce qui se
  conçoit bien s'énonce clairement, et les mots pour le dire viennent
  aisément.</blockquote>
  <p>Un <strong>langage</strong> est une façon d'exprimer ou de
  <strong>formuler</strong> une <strong>solution</strong> à un
  <strong>problème</strong>. Et des problèmes, il en existe beaucoup. Nous
  lisons et écrivons dans plusieurs langages au quotidien, et certains de ces
  langages sont <strong>compris</strong> par des <strong>machines</strong>.
  Cette opération est possible grâce aux <strong>compilateurs</strong>.</p>
  <p>La <a href="https://fr.wikipedia.org/wiki/Théorie_des_langages">théorie des
  langages</a> étudie entre autres l'<strong>analyse automatique</strong> de ces
  langages à travers des outils comme des <strong>automates</strong> ou des
  <strong>grammaires</strong>. Il est nécessaire d'avoir un cours détaillé pour
  bien comprendre tous ces concepts. Toutefois, nous allons essayer de
  vulgariser un minimum pour permettre une utilisation correcte de
  <code>Hoa\Compiler</code>.</p>

  <h3 id="Language_and_grammar" for="main-toc">Langage et grammaire</h3>

  <p>Un <strong>langage</strong> est un ensemble de <strong>mots</strong>.
  Chaque mot est une <strong>séquence</strong> de <strong>symboles</strong>
  appartenant à un <strong>alphabet</strong>. Un symbole représente la plus
  petite <strong>unité lexicale</strong> d'un langage, il est atomique et nous
  l'appellons <strong>lexème</strong> (ou <em lang="en">token</em> en anglais).
  Les séquences de lexèmes représentant les mots sont construites avec des
  <strong>règles</strong>. À partir d'un mot et d'une règle racine, nous allons
  essayer de <strong>dériver</strong> ses sous-règles. Si une dérivation existe,
  alors le mot est considéré comme <strong>valide</strong>, sinon il est
  considéré comme <strong>invalide</strong>. Nous parlons aussi de
  <strong>reconnaissance</strong> de mots. Par exemple, si nous considérons les
  règles suivantes :</p>
  <pre><code>    exp ::= exp + exp
          | nombre
 nombre ::= chiffre nombre
          | chiffre
chiffre ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9</code></pre>
  <p>Le mot que nous voulons reconnaître est <code>7 + 35</code>. La règle
  racine est <code><em>exp</em></code>. Si nous la dérivons (de gauche à droite
  et de haut en bas, ou <em lang="en">left-to-right</em> et
  <em lang="en">top-to-bottom</em> en anglais), nous pouvons avoir
  <code><em>exp</em> + <em>exp</em></code> ou <code><em>nombre</em></code> (la
  <strong>disjonction</strong>, <em>i.e.</em> le « ou », est représentée par le
  symbole « <code>|</code> ») :</p>
  <pre><code>exp + exp | nombre
→ exp + exp
→ ( exp + exp | nombre ) + exp
→ nombre + exp
→ ( chiffre nombre | chiffre ) + exp</code></pre>
  <p>Nous continuons à dériver jusqu'à <strong>éliminer</strong> toutes les
  règles et n'avoir que des <strong>lexèmes</strong> :</p>
  <pre><code>…
→ ( chiffre nombre | chiffre ) + exp
→ chiffre + exp
→ ( 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 ) + exp
→ 7 + exp
→ 7 + ( exp + exp | nombre )
→ 7 + nombre
→ 7 + ( chiffre nombre | chiffre )
→ 7 + chiffre nombre
→ 7 + ( 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 ) nombre
→ 7 + 3 nombre
→ 7 + 3 ( chiffre nombre | chiffre )
→ 7 + 3 chiffre
→ 7 + 3 ( 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 )
→ 7 + 3 5</code></pre>
  <p>Une dériviation existe bel et bien pour reconnaître le mot <code>7 +
  35</code>, c'est donc un mot valide pour ces règles.</p>
  <p>Un ensemble de règles est appelé une <strong>grammaire</strong>. Et donc,
  une grammaire représente un <strong>langage</strong> !</p>
  <p>Toutefois, il existe plusieurs catégories de grammaires. C'est en 1956 qu'a
  été formulée la
  <a href="https://fr.wikipedia.org/wiki/Hi%C3%A9rarchie_de_Chomsky">hiérarchie
  de Chomsky</a>, classant les grammaires en quatre
  <strong>niveaux</strong> :</p>
  <ol>
    <li>grammaires <strong>générales</strong>, ou <em lang="en">unrestricted
    grammars</em>, reconnaissant les langages dits de Turing, aucune
    restriction n'est imposée aux règles ;</li>
    <li>grammaires <strong>contextuelles</strong>, ou
    <em lang="en">context-sensitive grammars</em>, reconnaissant les langages
    contextuels ;</li>
    <li>grammaires <strong>algébriques</strong>, ou <em lang="en">context-free
    grammars</em>, reconnaissant les langages algébriques, basés sur les
    automates à pile ;</li>
    <li>grammaires <strong>régulières</strong>, ou <em lang="en">regular
    grammars</em>, reconnaissant les langages réguliers.</li>
  </ol>
  <p>Chaque niveau reconnait le niveau suivant. <code>Hoa\Compiler</code> ne
  traite que les langages définis par les grammaires de niveau 3 et 4. Pour
  donner rapidement une idée, les grammaires régulières peuvent s'apparenter aux
  <a href="https://fr.wikipedia.org/wiki/Expression_régulière">expressions
  régulières</a> (comme les <a href="http://pcre.org/">PCRE</a>), bien connues
  des développeurs. Mais les grammaires régulières ne permettent pas par exemple
  de reconnaître des <strong>couples de symboles</strong> (comme des
  parenthèses, des accolades ou des guillemets), alors que les grammaires
  algébriques le permettent (grâce à la notion de piles de lexèmes).</p>

  <h3 id="Matching_words" for="main-toc">Reconnaissance de mots</h3>

  <div id="parsers" class="schema"></div>
  <script>
  Hoa.Document.onReady(function ( ) {

      var paper    = Hoa.Graph(Hoa.$('#parsers'), 800, 180);
      var grid     = paper.grid(0, 0, 800, 180, 5, 2);
      var word     = grid.push(paper.rect(0, 0, 140, 80, 3, 'mot'), 0, 0);
      var sequence = grid.push(paper.rect(0, 0, 140, 80, 3, 'séquence'), 2, 0);
      var trace    = grid.push(paper.rect(0, 0, 140, 80, 3, 'résultat'), 4, 0);
      grid.push(paper.rect(0, 0, 140, 50, 3, 'abcdef'), 0, 1);
      grid.push(paper.rect(0, 0, 380, 50, 3, '[[a ⟼ …], [bc ⟼ …], [d ⟼ …], [ef ⟼ …]]'), 2, 1);
      grid.push(paper.rect(0, 0, 140, 50, 3, 'valide/invalide'), 4, 1);

      paper.link.between(word, sequence, 'analyseur lexical');
      paper.link.between(sequence, trace, 'analyseur syntaxique');
  });
  </script>
  <p>En général, le processus de compilation débute par deux
  <strong>analyses</strong> : <strong>lexicale</strong> et
  <strong>syntaxique</strong>. Une analyse lexicale consiste à
  <strong>découper</strong> un mot en une <strong>séquence de lexèmes</strong>.
  Cette séquence sera ensuite utilisée par l'analyseur syntaxique afin de
  vérifier que le mot <strong>appartient</strong> au langage.</p>
  <p>Selon la grammaire, la reconnaissance ne se fera pas de la même manière,
  mais le principe reste identique : prendre les lexèmes les uns après les
  autres dans la séquence et vérifier qu'ils permettent
  d'<strong>avancer</strong> dans la <strong>dérivation</strong> des règles de
  notre grammaire.</p>
  <p>Les analyses syntaxiques sont aussi classées en
  <strong>catégories</strong> : LL, LR, LALR etc. <code>Hoa\Compiler</code> ne
  propose que des analyseurs syntaxiques LL, pour <em lang="en">Left-to-right
  Leftmost derivation</em>, <em>i.e.</em> de la plus haute règle vers la plus
  profonde, et les règles sont dérivées de la gauche vers la droite. Là encore,
  il existe des sous-catégories, dont deux que traite
  <code>Hoa\Compiler</code> : LL(1) et LL(*). D'une manière générale, nous
  parlons d'analyseurs syntaxiques LL(<em>k</em>) : si un lexème ne permet pas
  de dériver une règle comme il faut, alors l'analyseur peut
  <strong>revenir</strong> jusqu'à <em>k</em> étapes en arrière ; nous parlons
  aussi de <em lang="en">backtrack</em>.  Autrement dit, les règles peuvent être
  <strong>ambiguës</strong> : à chaque fois que nous dérivons une règle de la
  grammaire, nous avons plusieurs choix possibles et l'analyseur peut se
  tromper, c'est pourquoi il doit parfois revenir en arrière. La variable
  <em>k</em> permet de définir le <strong>niveau</strong> d'ambiguïté. Si une
  grammaire peut être analysée par un analyseur syntaxique LL(1), elle est dite
  <strong>non-ambiguë</strong> : à chaque lexème utilisé pour dériver nos
  règles, il n'y a qu'un seul choix possible. Et si nous avons un analyseur
  syntaxique LL(*), cela signifie que la variable <em>k</em> est
  <strong>indéfinie</strong>. L'exemple suivant illustre une grammaire
  non-ambiguë :</p>
  <pre><code>rule ::= a b c | d e f</code></pre>
  <p>Et cet exemple illustre une grammaire ambiguë :</p>
  <pre><code>rule1 ::= a rule2
rule2 ::= b rule3 | b rule4
rule3 ::= c d
rule4 ::= e f</code></pre>
  <p>Voyons quand nous essayons de trouver une dérivation pour le mot
  <code>abef</code> à partir de la règle racine <code>rule1</code> :</p>
  <pre><code>rule1
→ a rule2                   <em>   a  bef ✔</em>
  → a (b rule3 | b rule4)   <em>   a  bef</em>
    → a b rule3             <em>  ab  ef  ✔</em>
      → a b c d             <em> abe  f   ✖</em>
    ← a b rule3             <em>  ab  ef  ✖</em>
  ← a (b rule3 | b rule4)   <em>   a  bef</em>
    → a b rule4             <em>  ab  ef  ✔</em>
      → a b e f             <em>abef      ✔</em></code></pre>
  <p>La règle <code>rule2</code> est ambiguë, ce qui peut entraîner une mauvaise
  dérivation et donc un retour en arrière, un
  <em lang="en">backtracking</em>.</p>

  <h2 id="LLk_compiler-compiler" for="main-toc">Compilateur de compilateurs
  LL(<em>k</em>)</h2>

  <p>Écrire des compilateurs est une tâche <strong>laborieuse</strong>. Ce n'est
  pas forcément toujours difficile mais souvent répétitif et long. C'est
  pourquoi il existe des <strong>compilateurs de compilateurs</strong>, ou
  autrement dit, des générateurs de compilateurs. La plupart du temps, ces
  compilateurs de compilateurs utilisent un langage
  <strong>intermédiaire</strong> pour écrire une grammaire. La bibliothèque
  <code>Hoa\Compiler</code> propose la classe <code>Hoa\Compiler\Llk\Llk</code>
  qui permet l'écriture de compilateurs de compilateurs à travers un langage
  <strong>dédié</strong>.</p>

  <h3 id="PP_language" for="main-toc">Langage PP</h3>

  <p>Le langage PP, pour <em lang="en">PHP Parser</em>, permet d'exprimer des
  <strong>grammaires algébriques</strong>. Il s'écrit dans des fichiers portant
  l'extension <code>.pp</code> (voir le fichier
  <a href="@central_resource:path=Library/Compiler/.Mime"><code>hoa://Library/Compiler/.Mime</code></a>).</p>
  <p>Une grammaire est constituée de <strong>lexèmes</strong> et de
  <strong>règles</strong>. La déclaration d'un lexème se fait de la manière
  suivante : <code>%token <em>namespace_in</em>:<em>name</em> <em>value</em> ->
  <em>namespace_out</em></code>, où <code><em>name</em></code> représente le
  <strong>nom</strong> du lexème, <code><em>value</em></code> représente sa
  <strong>valeur</strong>, au format <a href="http://pcre.org/">PCRE</a>
  (attention à ne pas reconnaître de valeur vide, auquel cas une exception sera
  levée), et <code><em>namespace_in</em></code> et
  <code><em>namespace_out</em></code> représentent les noms des <strong>espaces
  de noms</strong> et sont optionels (vaut <code>default</code> par défaut). Par
  exemple <code>number</code> qui représente un nombre composé de chiffres de
  <code>0</code> à <code>9</code> :</p>
  <pre><code class="language-pp">%token number \d+</code></pre>
  <p>Les espaces de noms représentent des <strong>sous-ensembles</strong>
  disjoints de lexèmes, utilisés pour <strong>faciliter</strong> les analyses.
  Une déclaration <code>%skip</code> est similaire à <code>%token</code>
  excepté qu'elle représente un lexème à <strong>sauter</strong>, c'est à dire
  à ne pas considérer. Un exemple courant de lexèmes <code>%skip</code> est les
  espaces :</p>
  <pre><code class="language-pp">%skip space \s</code></pre>
  <p>Pour expliquer les règles, nous allons utiliser comme exemple la grammaire
  <code>Json.pp</code>, grammaire légèrement <strong>simplifiée</strong> du
  <a href="http://json.org/">langage JSON</a> (voir la
  <a href="https://tools.ietf.org/html/rfc4627">RFC4627</a>). La grammaire
  <strong>complète</strong> se situe dans le fichier
  <a href="@central_resource:path=Library/Json/Grammar.pp"><code>hoa://Library/Json/Grammar.pp</code></a>.
  Ainsi :</p>
  <pre><code class="language-pp">%skip   space          \s
// Scalars.
%token  true           true
%token  false          false
%token  null           null
// Strings.
%token  quote_         "        -> string
%token  string:string  [^"]+
%token  string:_quote  "        -> default
// Objects.
%token  brace_         {
%token _brace          }
// Arrays.
%token  bracket_       \[
%token _bracket        \]
// Rest.
%token  colon          :
%token  comma          ,
%token  number         \d+

value:
    &amp;lt;true> | &amp;lt;false> | &amp;lt;null> | string() | object() | array() | number()

string:
    ::quote_:: &amp;lt;string> ::_quote::

number:
    &amp;lt;number>

#object:
    ::brace_:: pair() ( ::comma:: pair() )* ::_brace::

#pair:
    string() ::colon:: value()

#array:
    ::bracket_:: value() ( ::comma:: value() )* ::_bracket::</code></pre>
  <p>Nous remarquons que nous avons deux espaces de noms pour les lexèmes :
  <code>default</code> et <code>string</code> (cela permet de ne pas
  <strong>confondre</strong> les lexèmes <code>quote_</code> et
  <code>string:_quote</code> qui ont la même représentation). Nous remarquons
  ensuite la règle <code>value</code> qui est une <strong>disjonction</strong>
  de plusieurs lexèmes et règles. Les <strong>constructions</strong> du langage
  PP sont les suivantes :</p>
  <ul>
    <li><code><em>rule</em>()</code> pour <strong>appeler</strong> une
    règle ;</li>
    <li><code>&amp;lt;<em>token</em>></code> et <code>::<em>token</em>::</code>
    pour <strong>déclarer</strong> un lexème (les espaces de noms n'apparaissent
    pas ici) ;</li>
    <li><code>|</code> pour une <strong>disjonction</strong> (un choix) ;</li>
    <li><code>(<em>…</em>)</code> pour grouper ;</li>
    <li><code><em>e</em>?</code> pour dire que <code><em>e</em></code> est
    <strong>optionel</strong> ;</li>
    <li><code><em>e</em>+</code> pour dire que <code><em>e</em></code> peut
    apparaître <strong>1 ou plusieurs</strong> fois ;</li>
    <li><code><em>e</em>*</code> pour dire que <code><em>e</em></code> peut
    apparaître <strong>0 ou plusieurs</strong> fois ;</li>
    <li><code><em>e</em>{<em>x</em>,<em>y</em>}</code> pour dire que
    <code><em>e</em></code> peut apparaître entre <code><em>x</em></code> et
    <code><em>y</em></code> fois ;</li>
    <li><code>#<em>node</em></code> pour créer un <strong>nœud</strong>
    <code><em>node</em></code> dans l'arbre ;</li>
    <li><code><em>token</em>[<em>i</em>]</code> pour <strong>unifier</strong>
    des lexèmes entre eux.</li>
  </ul>
  <p>Peu de constructions mais amplement suffisantes.</p>
  <p>Enfin, la grammaire du langage PP est écrite… dans le langage PP ! Vous
  pourrez la trouver dans le fichier
  <a href="@central_resource:path=Library/Compiler/Llk/Llk.pp"><code>hoa://Library/Compiler/Llk/Llk.pp</code></a>.</p>

  <h3 id="Compilation_process" for="main-toc">Processus de compilation</h3>

  <div id="overview" class="schema"></div>
  <script>
  Hoa.Document.onReady(function ( ) {

      var paper = Hoa.Graph(Hoa.$('#overview'), 800, 360);
      var flow  = paper.grid(0, 0, 800, 360, 1, 4);
      flow.push(paper.rect(0, 0, 200, 70, 3, 'analyseur lexical'));
      flow.push(paper.rect(0, 0, 200, 70, 3, 'analyseur syntaxique'));
      flow.push(paper.rect(0, 0, 200, 70, 3, 'trace'));
      flow.push(paper.rect(0, 0, 200, 70, 3, 'AST'));

      var annot = paper.grid(180, 0, 80, 360, 1, 4);
      annot.push(paper.rect(0, 0, 45, 45, 22.5, '1'));
      annot.push(paper.rect(0, 0, 45, 45, 22.5, '2'));
      annot.push(paper.rect(0, 0, 45, 45, 22.5, '3'));
      annot.push(paper.rect(0, 0, 45, 45, 22.5, '4'));
  });
  </script>
  <p>Le processus de compilation qu'utilise <code>Hoa\Compiler\Llk\Llk</code>
  est classique. Il commence par analyser <strong>lexicalement</strong> la
  donnée textuelle, le mot, <em>i.e.</em> à transformer notre donnée en une
  séquence de lexèmes. L'<strong>ordre</strong> de déclaration des lexèmes est
  primordial car l'analyseur lexical va les prendre les uns après les autres.
  Ensuite, c'est l'analyseur <strong>syntaxique</strong> qui entre en jeu afin
  de <strong>reconnaître</strong> notre donnée.</p>
  <p>Si l'analyse syntaxique est un succès, nous obtenons une
  <strong>trace</strong>. Cette trace peut être transformée en AST, pour
  <em lang="en">Abstract Syntax Tree</em>. Cet arbre représente notre donnée
  textuelle après analyse. Il a l'avantage de pouvoir être visité (nous
  détaillerons plus loin), ce qui permet par exemple d'ajouter de nouvelles
  <strong>contraintes</strong> qui ne peuvent pas être exprimées dans la
  grammaire, comme une vérification de type.</p>
  <p>Manipulons un peu <code>Hoa\Compiler\Llk\Llk</code>. Cette classe est un
  <strong>assistant</strong> pour lire une grammaire au format PP facilement.
  Elle prend en seul argument un flux en lecture vers la grammaire et retourne
  un compilateur <code>Hoa\Compiler\Llk\Parser</code> prêt à l'emploi. Sur ce
  compilateur, nous allons appeler la méthode
  <code>Hoa\Compiler\Llk\Parser::parse</code> pour analyser une donnée JSON. Si
  la donnée est correcte, nous aurons en retour un AST, sinon une exception sera
  levée. Enfin, nous allons utiliser le visiteur
  <code>Hoa\Compiler\Visitor\Dump</code> pour afficher notre AST :</p>
  <pre><code class="language-php">// 1. Load grammar.
$compiler = Hoa\Compiler\Llk\Llk::load(new Hoa\File\Read('Json.pp'));

// 2. Parse a data.
$ast      = $compiler->parse('{"foo": true, "bar": [null, 42]}');

// 3. Dump the AST.
$dump     = new Hoa\Compiler\Visitor\Dump();
echo $dump->visit($ast);

/**
 * Will output:
 *     >  #object
 *     >  >  #pair
 *     >  >  >  token(string:string, foo)
 *     >  >  >  token(true, true)
 *     >  >  #pair
 *     >  >  >  token(string:string, bar)
 *     >  >  >  #array
 *     >  >  >  >  token(null, null)
 *     >  >  >  >  token(number, 42)
 */</code></pre>
  <p>Quand nous écrivons et testons une grammaire, nous allons répéter ces trois
  tâches très <strong>régulièrement</strong>. C'est pourquoi, le script
  <code>hoa</code> propose la commande <code>compiler:pp</code>. Cette commande
  propose d'analyser une donnée par rapport à une grammaire et d'appliquer un
  visiteur si besoin sur l'AST résultant. Notons que la lecture de la donnée
  peut se faire à travers un
  <a href="https://en.wikipedia.org/wiki/Pipeline_(Unix)"><em lang="en">pipe</em></a> :</p>
  <pre><code class="language-shell">$ echo '[1, [1, [2, 3], 5], 8]' | hoa compiler:pp Json.pp 0 --visitor dump
>  #array
>  >  token(number, 1)
>  >  #array
>  >  >  token(number, 1)
>  >  >  #array
>  >  >  >  token(number, 2)
>  >  >  >  token(number, 3)
>  >  >  token(number, 5)
>  >  token(number, 8)</code></pre>
  <p>C'est un moyen pratique pour tester <strong>rapidement</strong> des données
  par rapport à notre grammaire. Il ne faut pas hésiter à regarder l'aide de la
  commande <code>compiler:pp</code> pour plus de détails !</p>
  <p>Les analyses s'effectuent sur la règle <strong>racine</strong> mais nous
  pouvons préciser une <strong>autre règle</strong> à l'aide du deuxième
  argument de la méthode <code>Hoa\Compiler\Llk\Parser::parse</code> :</p>
  <pre><code class="language-php">$compiler->parse('{"foo": true, "bar": [null, 42]}', 'object');</code></pre>
  <p>Pour utiliser la règle racine, il suffit de passer <code>null</code>.</p>
  <p>Et enfin, pour ne pas générer l'AST mais uniquement savoir si la donnée est
  valide ou pas, nous pouvons utiliser le dernier argument de notre méthode en
  lui passant <code>false</code> :</p>
  <pre><code class="language-php">$valid = $compiler->parse('{"foo": true, "bar": [null, 42]}', null, false);
var_dump($valid);

/**
 * Will output:
 *     bool(true)
 */</code></pre>

  <h4 id="Errors" for="main-toc">Erreurs</h4>

  <p>Les erreurs de compilation sont remontées à travers des exceptions,
  ainsi :</p>
  <pre><code class="language-shell">$ echo '{"foo" true}' | hoa compiler:pp Json.pp 0 --visitor dump
Uncaught exception (Hoa\Compiler\Exception\UnexpectedToken):
Hoa\Compiler\Llk\Parser::parse(): (0) Unexpected token "true" (true) at line 1
and column 8:
{"foo" true}
       ↑
in hoa://Library/Compiler/Llk/Parser.php at line 1</code></pre>
  <p>Plusieurs exceptions peuvent remonter selon le contexte :</p>
  <ul>
    <li>durant l'analyse <strong>lexicale</strong>,
    <code>Hoa\Compiler\Exception\UnrecognizedToken</code> quand un lexème n'est
    pas reconnu, <em>i.e.</em> quand la donnée textuelle ne peut plus être
    découpée en une séquence de lexèmes, et
    <code>Hoa\Compiler\Exception\Lexer</code> quand d'autres erreurs plus
    générales arrivent, par exemple si un lexème reconnaît une valeur
    vide ;</li>
    <li>durant l'analyse <strong>syntaxique</strong>,
    <code>Hoa\Compiler\Exception\UnexpectedToken</code> quand un lexème n'est
    pas attendu, <em>i.e.</em> qu'il ne permet plus de dériver les règles de la
    grammaire.</li>
  </ul>
  <p>L'exception parente est <code>Hoa\Compiler\Exception\Exception</code>.</p>

  <h4 id="Nodes" for="main-toc">Nœuds</h4>

  <p>Le processus de compilation aboutit très souvent à la
  <strong>production</strong> d'un AST. Il est important de contrôler sa
  <strong>forme</strong>, sa <strong>taille</strong>, les données qu'il
  <strong>contient</strong> etc. C'est pourquoi il est nécessaire de comprendre
  la notation <code>#<em>node</em></code> car elle permet de créer des
  <strong>nœuds</strong> dans l'AST. Une précision tout d'abord, les lexèmes
  déclarés avec la syntaxe <code>&amp;lt;<em>token</em>></code> apparaîtront
  dans l'arbre, alors que les autres lexèmes, déclarés avec la syntaxe
  <code>::<em>token</em>::</code>, n'y apparaîtront pas. En effet, dans notre
  dernier exemple, les lexèmes <code>quote_</code>, <code>brace_</code>,
  <code>colon</code>, <code>comma</code> etc. n'apparaissent pas. Ensuite, il
  est important de noter que les déclarations de nœuds se
  <strong>surchargent</strong> les unes par rapport aux autres au sein d'une
  <strong>même règle</strong>. Enfin, un nom de règle peut être précédé par
  <code>#</code>, comme pour la règle <code>#array</code>, qui permet de définir
  un nœud par <strong>défaut</strong>, mais il peut être surchargé. Par exemple,
  si nous remplaçons la règle <code>array</code> par :</p>
  <pre><code class="language-pp">#array:
    ::bracket_:: value() ( ::comma:: value() #bigarray )* ::_bracket::</code></pre>
  <p>Si le tableau ne contient qu'une seule valeur, le nœud s'appelera
  <code>#array</code>, sinon il s'appelera <code>#bigarray</code> ; voyons
  plutôt :</p>
  <pre><code class="language-shell">$ echo '[42]' | hoa compiler:pp Json.pp 0 --visitor dump
>  #array
>  >  token(number, 42)
$ echo '[4, 2]' | hoa compiler:pp Json.pp 0 --visitor dump
>  #bigarray
>  >  token(number, 4)
>  >  token(number, 2)</code></pre>
  <p>Bien sûr, il peut arriver qu'un nœud soit créé ou pas selon le dérivation
  <strong>empruntée</strong> dans la règle. Le mécanisme est normalement assez
  <strong>intuitif</strong>.</p>

  <h4 id="Namespaces" for="main-toc">Espace de noms</h4>

  <p>Détaillons un peu le fonctionnement de l'analyseur lexical vis à vis des
  <strong>espaces de noms</strong>.</p>
  <p>Les <strong>lexèmes</strong> sont placés dans des espaces de noms,
  c'est à dire que seuls les lexèmes de l'espace de noms
  <strong>courant</strong> seront utilisés par l'analyseur lexical. L'espace de
  noms par défaut est <code>default</code>. Pour déclarer l'espace de noms d'un
  lexème, il faut utiliser l'opérateur <code>:</code>.  Quand un lexème est
  consommé, il peut <strong>changer</strong> l'espace courant pour la suite de
  l'analyse lexicale, grâce à l'opérateur <code>-></code>.  Ainsi, nous allons
  déclarer cinq lexèmes : <code>foo</code> et <code>bar</code> dans l'espace
  <code>default</code>, <code>baz</code> dans <code>ns1</code> et
  <code>qux</code> et <code>foo</code> dans <code>ns2</code>. Le fait de
  déclarer deux fois <code>foo</code> n'est pas gênant car ils sont dans des
  espaces de noms <strong>différent</strong> :</p>
  <pre><code class="language-pp">%token      foo   fo+     -> ns1
%token      bar   ba?r+   -> ns2
%token  ns1:baz   ba?z+   -> default
%token  ns2:qux   qux+
%token  ns2:foo   FOO     -> ns1</code></pre>
  <p>Écrire <code>default:bar</code> est strictement équivalent à
  <code>bar</code>. Le lexème <code>foo</code> emmène dans <code>ns1</code>,
  <code>bar</code> dans <code>ns2</code>, <code>ns1:baz</code> dans
  <code>default</code>, <code>ns2:qux</code> reste dans <code>ns2</code> et
  <code>ns2:foo</code> emmène dans <code>ns1</code>. Observons la séquence de
  lexèmes produite par l'analyseur lexical avec la donnée
  <code>fooooobzzbarrrquxFOObaz</code> :</p>
  <pre><code class="language-php">$pp = '%token      foo   fo+     -> ns1'     . "\n" .
      '%token      bar   ba?r+   -> ns2'     . "\n" .
      '%token  ns1:baz   ba?z+   -> default' . "\n" .
      '%token  ns2:qux   qux+'               . "\n" .
      '%token  ns2:foo   FOO     -> ns1';

// 1. Parse PP.
Hoa\Compiler\Llk\Llk::parsePP($pp, $tokens, $rawRules);

// 2. Run the lexical analyzer.
$lexer    = new Hoa\Compiler\Llk\Lexer();
$sequence = $lexer->lexMe('fooooobzzbarrrquxFOObaz', $tokens);

// 3. Pretty-print the result.
$format   = '%' . (strlen((string) count($sequence)) + 1) . 's  ' .
            '%-13s %-20s  %-20s  %6s' . "\n";
$header   = sprintf($format, '#', 'namespace', 'token name', 'token value', 'offset');

echo $header, str_repeat('-', strlen($header)), "\n";

foreach ($sequence as $i => $token) {
    printf(
        $format,
        $i,
        $token['namespace'],
        $token['token'],
        $token['value'],
        $token['offset']
    );
}

/**
 * Will output:
 *      #  namespace     token name            token value           offset
 *     ---------------------------------------------------------------------
 *      0  default       foo                   fooooo                     0
 *      1  ns1           baz                   bzz                        6
 *      2  default       bar                   barrr                      9
 *      3  ns2           qux                   qux                       14
 *      4  ns2           foo                   FOO                       17
 *      5  ns1           baz                   baz                       20
 *      6  default       EOF                   EOF                       23
 */</code></pre>
  <p>Nous lisons les lexèmes, leur espace et leur valeur dans le tableau. La
  donnée a pu être <strong>découpée</strong>, et nous sommes passés d'un espace
  à un autre. Si cette fois nous essayons avec la donnée <code>foqux</code>,
  nous aurons une erreur : <code>fo</code> correspond au lexème <code>foo</code>
  dans l'espace <code>default</code>, nous changeons alors d'espace pour
  <code>ns1</code>, et là, aucun lexème dans cet espace ne peut reconnaître au
  moins <code>q</code>.  Une erreur sera levée.</p>
  <p>Jusqu'à maintenant, nous avons vu comment passer d'un espace à l'autre avec
  l'opérateur <code>-></code>. Aucun <strong>historique</strong> sur les espaces
  traversés n'est conservé. Toutefois, dans certains cas rares, il peut arriver
  qu'un espace de lexèmes soit accessible via <strong>plusieurs</strong> autres
  et que nous aimerions qu'un lexème déclenche le retour vers l'espace de noms
  <strong>précédent</strong>. Autrement dit, nous aimerions un historique des
  espaces traversés et pouvoir y naviguer (en arrière uniquement). C'est le rôle
  du mot-clé <code>__shift__ * <em>n</em></code>, à utiliser après l'opérateur
  <code>-></code> et à la place du nom d'un espace. <code>__shift__</code> est
  équivalent à dire : revient à l'espace précédent. <code>__shift__</code> est
  équivalent à <code>__shift__ * 1</code>, et
  <code>__shift__ * <em>n</em></code> à : revient <code><em>n</em></code> fois à
  l'espace précédent.</p>
  <p>Lorsque le mot-clé <code>__shift__</code> apparaît dans la grammaire, les
  espaces sont gérés comme une <strong>pile</strong>, d'où le vocabulaire
  <em lang="en">shift</em>. Il faut faire attention à bien dépiler les espaces
  pour ne pas avoir une pile trop conséquente.</p>
  <p>Prenons en exemple la grammaire suivante :</p>
  <pre><code class="language-pp">%token       foo1  a    -> ns1
%token       foo2  x    -> ns2
%token       end   e

%token   ns1:bar   b
%token   ns1:baz   c    -> ns3
%token   ns1:tada  t    -> __shift__

%token   ns2:bar   y
%token   ns2:baz   z    -> ns3
%token   ns2:tada  T    -> __shift__

%token   ns3:qux   =   -> __shift__

#test:
    ( &amp;lt;foo1> | &amp;lt;foo2> ) &amp;lt;bar> &amp;lt;baz> &amp;lt;qux> &amp;lt;tada> &amp;lt;end></code></pre>
  <p>Cette grammaire reconnaît deux données : <code>abc=te</code> et
  <code>xyz=Te</code>. Si le premier lexème <code>foo1</code> est rencontré,
  l'analyseur syntaxique changera d'espace pour <code>ns1</code>. Quand il
  rencontrera le lexème <code>ns1:baz</code>, il passera dans <code>ns3</code>.
  Ensuite, quand il rencontrera <code>ns3:qux</code>, il reviendra à l'espace
  précédent, soit <code>ns1</code>. Et ainsi de suite. Maintenant, s'il ne
  rencontre pas <code>foo1</code> mais <code>foo2</code>, il ira dans l'espace
  <code>ns2</code>, puis dans <code>ns3</code> puis à nouveau <code>ns2</code>.
  Les mots-clés <code>__shift__</code> pour <code>ns1:tada</code> et
  <code>ns2:tada</code> n'ont pas d'autres buts que de dépiler les espaces, mais
  aucune ambiguïté n'existe : ces espaces ne sont accessibles que par un seul
  espace, à savoir <code>default</code>.</p>
  <p>Maintenant, enregistrons cette grammaire dans un fichier
  <code>NamespaceStack.pp</code> et utilisons l'option
  <code>-s/--token-sequence</code> de la commande <code>hoa
  compiler:pp</code> :</p>
  <pre><code class="language-shell">$ echo -n 'abc=te' | hoa compiler:pp NamespaceStack.pp 0 --token-sequence
 #  namespace     token name            token value                     offset
-------------------------------------------------------------------------------
 0  default       foo1                  a                                    0
 1  ns1           bar                   b                                    1
 2  ns1           baz                   c                                    2
 3  ns3           qux                   =                                    3
 4  ns1           tada                  t                                    4
 5  default       end                   e                                    5
 6  default       EOF                   EOF                                  6

$ echo -n 'xyz=Te' | hoa compiler:pp NamespaceStack.pp 0 --token-sequence
 #  namespace     token name            token value                     offset
-------------------------------------------------------------------------------
 0  default       foo2                  x                                    0
 1  ns2           bar                   y                                    1
 2  ns2           baz                   z                                    2
 3  ns3           qux                   =                                    3
 4  ns2           tada                  T                                    4
 5  default       end                   e                                    5
 6  default       EOF                   EOF                                  6</code></pre>
  <p>Nous voyons que l'analyse lexicale a réussi à jongler avec les espaces de
  noms, comme attendu. Nous avions deux façons d'accéder à l'espace
  <code>ns3</code> : soit depuis <code>ns1</code>, soit depuis <code>ns2</code>.
  L'analyseur a réussi à créer un historique des espaces et à y naviguer.</p>

  <h4 id="Unification" for="main-toc">Unification</h4>

  <p>Une caractéristique qu'apporte le langage PP par rapport à d'autres
  langages de grammaires connus est la capacité d'exprimer une
  <strong>unification</strong> de lexèmes. Imaginons la grammaire
  suivante :</p>
  <pre><code class="language-pp">%token  quote   '|"
%token  string  \w+

rule:
    ::quote:: &amp;lt;string> ::quote::</code></pre>
  <p>Les guillemets qui entourent la chaîne de caractère peuvent être de deux
  sortes : simple, avec le symbole « <code>'</code> », ou double, avec le
  symbole « <code>"</code> ». Ainsi, les données <code>"foo"</code> et
  <code>'foo'</code> sont valides, mais <strong>également</strong>
  <code>"foo'</code> et <code>'foo"</code> !</p>
  <p>L'unification des lexèmes permet d'ajouter une <strong>contrainte</strong>
  supplémentaire sur la <strong>valeur</strong> des lexèmes à l'exécution. La
  syntaxe est la suivante : <code><em>token</em>[<em>i</em>]</code>. La valeur
  de <code><em>i</em></code> indique quels lexèmes vont devoir porter la même
  valeur. Et enfin, l'unification est <strong>locale</strong> à une instance
  d'une règle, c'est à dire qu'il n'y a pas d'unification entre les lexèmes de
  plusieurs règles et que cela s'applique sur la règle <strong>appelée</strong>
  uniquement. Ainsi, l'exemple devient :</p>
  <pre><code class="language-pp">rule:
    ::quote[0]:: &amp;lt;string> ::quote[0]::</code></pre>
  <p>Ce qui invalide les données <code>"foo'</code> et <code>'foo"</code>.</p>
  <p>L'unification trouve de nombreuses applications, comme par exemple unifier
  les noms des balises ouvrantes et fermantes du
  <a href="http://w3.org/TR/xml11/">langage XML</a>.</p>

  <h3 id="Abstract_Syntax_Tree" for="main-toc"><em lang="en">Abstract Syntax
  Tree</em></h3>

  <div id="overview_ast" class="schema"></div>
  <script>
  Hoa.Document.onReady(function ( ) {

      var paper = Hoa.Graph(Hoa.$('#overview_ast'), 800, 360);
      var flow  = paper.grid(0, 0, 800, 360, 1, 4);
      flow.push(paper.rect(0, 0, 200, 70, 3, 'analyseur lexical').attr({opacity: .3}));
      flow.push(paper.rect(0, 0, 200, 70, 3, 'analyseur syntaxique').attr({opacity: .3}));
      flow.push(paper.rect(0, 0, 200, 70, 3, 'trace').attr({opacity: .3}));
      flow.push(paper.rect(0, 0, 200, 70, 3, 'AST'));

      var annot = paper.grid(180, 0, 80, 360, 1, 4);
      annot.push(paper.rect(0, 0, 45, 45, 22.5, '1').attr({opacity: .3}));
      annot.push(paper.rect(0, 0, 45, 45, 22.5, '2').attr({opacity: .3}));
      annot.push(paper.rect(0, 0, 45, 45, 22.5, '3').attr({opacity: .3}));
      annot.push(paper.rect(0, 0, 45, 45, 22.5, '4'));
  });
  </script>
  <p>Un arbre <strong>syntaxique abstrait</strong> représente une donnée
  textuelle sous forme <strong>structurelle</strong>. Chaque
  <strong>nœud</strong> de cet arbre est représenté par la classe
  <code>Hoa\Compiler\Llk\TreeNode</code>. Parmis les méthodes utiles, nous
  trouvons :</p>
  <ul>
    <li><code>getId</code> pour obtenir l'identifiant du nœud ;</li>
    <li><code>getValueToken</code> pour obtenir le nom du lexème ;</li>
    <li><code>getValueValue</code> pour obtenir la valeur du lexème ;</li>
    <li><code>isToken</code> si le nœud représente un lexème ;</li>
    <li><code>getChild(<em>$i</em>)</code> pour obtenir le
    <code><em>$i</em></code>-ème enfant d'un nœud ;</li>
    <li><code>getChildren</code> pour obtenir tous les nœuds ;</li>
    <li><code>getChildrenNumber</code> pour connaître le nombre d'enfants ;</li>
    <li><code>getParent</code> pour obtenir le nœud parent ;</li>
    <li><code>getData</code> pour obtenir une référence vers un tableau de
    données ;</li>
    <li><code>accept</code> pour appliquer un visiteur.</li>
  </ul>
  <p>Les visiteurs sont le moyen le plus pratique pour
  <strong>parcourir</strong> un AST. En guise d'exemple, nous allons écrire le
  visiteur <code>PrettyPrinter</code> qui va réécrire une donnée JSON avec notre
  propre convention (espacements, retours à la ligne etc.). Un visiteur doit
  implémenter l'interface <code>Hoa\Visitor\Visit</code> et n'aura qu'une seule
  méthode à écrire : <code>visit</code> qui prend trois arguments :
  l'élément et deux arguments accessoires (en référence et en copie). Voyons
  plutôt :</p>
  <pre><code class="language-php">class PrettyPrinter implements Hoa\Visitor\Visit
{
    public function visit (
        Hoa\Visitor\Element $element,
        &amp;amp;$handle = null,
        $eldnah = null
    ) {
        static $i      = 0;
        static $indent = '    ';

        // One behaviour per node in the AST.
        switch ($element->getId()) {
            // Object: { … }.
            case '#object':
                echo '{', "\n";
                ++$i;

                foreach ($element->getChildren() as $e => $child) {
                    if (0 &amp;lt; $e) {
                        echo ',', "\n";
                    }

                    echo str_repeat($indent, $i);
                    $child->accept($this, $handle, $eldnah);
                }

                echo "\n", str_repeat($indent, --$i), '}';

                break;

            // Array: [ … ].
            case '#array':
                echo '[', "\n";
                ++$i;

                foreach ($element->getChildren() as $e => $child) {
                    if (0 &amp;lt; $e) {
                        echo ',', "\n";
                    }

                    echo str_repeat($indent, $i);
                    $child->accept($this, $handle, $eldnah);
                }

                echo "\n", str_repeat($indent, --$i), ']';

                break;

            // Pair: "…": ….
            case '#pair':
                echo
                    $element->getChild(0)->accept($this, $handle, $eldnah),
                    ': ',
                    $element->getChild(1)->accept($this, $handle, $eldnah);

                break;

            // Many tokens.
            case 'token':
                switch ($element->getValueToken()) {
                    // String: "…".
                    case 'string':
                        echo '"', $element->getValueValue(), '"';

                        break;

                    // Booleans.
                    case 'true':
                    case 'false':

                    // Null.
                    case 'null':

                    // Number.
                    case 'number':
                        echo $element->getValueValue();

                        break;
                }

                break;
        }
    }
}</code></pre>
  <p>Nous allons voir tout de suite un exemple d'utilisation :</p>
  <pre><code class="language-php">$compiler    = Hoa\Compiler\Llk\Llk::load(new Hoa\File\Read('Json.pp'));
$ast         = $compiler->parse('{"foo": true, "bar": [null, 42]}');
$prettyPrint = new PrettyPrinter();
echo $prettyPrint->visit($ast);

/**
 * Will output:
 *     {
 *         "foo": true,
 *         "bar": [
 *             null,
 *             42
 *         ]
 *     }
 */</code></pre>
  <p>La méthode <code>getData</code> est très pratique pour
  <strong>stocker</strong> des données susceptibles d'être
  <strong>réutilisées</strong>, par exemple d'un visiteur à l'autre. Cette
  méthode retourne une <strong>référence</strong> sur un tableau ; ainsi :</p>
  <pre><code class="language-php">$data = $element->getData();

if (!isset($data['previousComputing'])) {
    throw new Exception('Need a previous computing.', 0);
}

$previous = $data['previousComputing'];</code></pre>
  <p>Il est courant d'utiliser un visiteur par <strong>contrainte</strong> :
  vérifiation des symboles, vérification de types etc. Certains peuvent laisser
  des données nécessaires pour le suivant. La méthode <code>getData</code>
  n'impose aucune structuration des données, elle propose uniquement un accès à
  un tableau. Ce sera à vous de faire le reste.</p>
  <p>Utiliser la classe <code>Hoa\Compiler\Llk\TreeNode</code> est vraiment
  <strong>trivial</strong> et nous l'utiliserons la plupart du temps avec un
  visiteur.</p>

  <h3 id="Traces" for="main-toc">Traces</h3>

  <div id="overview_trace" class="schema"></div>
  <script>
  Hoa.Document.onReady(function ( ) {

      var paper = Hoa.Graph(Hoa.$('#overview_trace'), 800, 360);
      var flow  = paper.grid(0, 0, 800, 360, 1, 4);
      flow.push(paper.rect(0, 0, 200, 70, 3, 'analyseur lexical').attr({opacity: .3}));
      flow.push(paper.rect(0, 0, 200, 70, 3, 'analyseur syntaxique').attr({opacity: .3}));
      flow.push(paper.rect(0, 0, 200, 70, 3, 'trace'));
      flow.push(paper.rect(0, 0, 200, 70, 3, 'AST').attr({opacity: .3}));

      var annot = paper.grid(180, 0, 80, 360, 1, 4);
      annot.push(paper.rect(0, 0, 45, 45, 22.5, '1').attr({opacity: .3}));
      annot.push(paper.rect(0, 0, 45, 45, 22.5, '2').attr({opacity: .3}));
      annot.push(paper.rect(0, 0, 45, 45, 22.5, '3'));
      annot.push(paper.rect(0, 0, 45, 45, 22.5, '4').attr({opacity: .3}));
  });
  </script>
  <p>Le compilateur LL(<em>k</em>) que propose Hoa est clairement découpé en
  plusieurs <strong>couches</strong>. Chaque couche est exploitable pour
  permettre une modularité maximum. Quand la grammaire est traduite en « règles
  machines » et que les analyseurs lexical et syntaxique ont validé une donnée,
  il en résulte une <strong>trace</strong>. Cette trace est un tableau composé
  de trois classes seulement :</p>
  <ul>
    <li><code>Hoa\Compiler\Llk\Rule\Entry</code> quand l'analyseur syntaxique
    est rentré dans une règle ;</li>
    <li><code>Hoa\Compiler\Llk\Rule\Ekzit</code> quand l'analyseur syntaxique
    est sorti d'une règle ;</li>
    <li><code>Hoa\Compiler\Llk\Rule\Token</code> quand l'analyseur syntaxique a
    rencontré un lexème.</li>
  </ul>
  <p>Nous pouvons l'obtenir grâce à la méthode
  <code>Hoa\Compiler\Llk\Parser::getTrace</code>. Pour bien comprendre cette
  trace, nous allons commencer par un exemple :</p>
  <pre><code class="language-php">$compiler = Hoa\Compiler\Llk\Llk::load(new Hoa\File\Read('Json.pp'));
$ast      = $compiler->parse('{"foo": true, "bar": [null, 42]}');
$i        = 0;

foreach ($compiler->getTrace() as $element) {
    if ($element instanceof Hoa\Compiler\Llk\Rule\Entry) {
        echo str_repeat('>   ', ++$i), 'enter ', $element->getRule(), "\n";
    } elseif ($element instanceof Hoa\Compiler\Llk\Rule\Token) {
        echo
            str_repeat('    ', $i + 1), 'token ', $element->getTokenName(),
            ', consumed ', $element->getValue(), "\n";
    } else {
        echo str_repeat('&amp;lt;   ', $i--), 'ekzit ', $element->getRule(), "\n";
    }
}

/**
 * Will output:
 *     >   enter value
 *     >   >   enter object
 *                 token brace_, consumed {
 *     >   >   >   enter pair
 *     >   >   >   >   enter string
 *                         token quote_, consumed "
 *                         token string, consumed foo
 *                         token _quote, consumed "
 *     &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   ekzit string
 *                     token colon, consumed :
 *     >   >   >   >   enter value
 *                         token true, consumed true
 *     &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   ekzit value
 *     &amp;lt;   &amp;lt;   &amp;lt;   ekzit pair
 *     >   >   >   enter 13
 *     >   >   >   >   enter 12
 *                         token comma, consumed ,
 *     >   >   >   >   >   enter pair
 *     >   >   >   >   >   >   enter string
 *                                 token quote_, consumed "
 *                                 token string, consumed bar
 *                                 token _quote, consumed "
 *     &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   ekzit string
 *                             token colon, consumed :
 *     >   >   >   >   >   >   enter value
 *     >   >   >   >   >   >   >   enter array
 *                                     token bracket_, consumed [
 *     >   >   >   >   >   >   >   >   enter value
 *                                         token null, consumed null
 *     &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   ekzit value
 *     >   >   >   >   >   >   >   >   enter 21
 *     >   >   >   >   >   >   >   >   >   enter 20
 *                                             token comma, consumed ,
 *     >   >   >   >   >   >   >   >   >   >   enter value
 *                                                 token number, consumed 42
 *     &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   ekzit value
 *     &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   ekzit 20
 *     &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   ekzit 21
 *                                     token _bracket, consumed ]
 *     &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   ekzit array
 *     &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   ekzit value
 *     &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   ekzit pair
 *     &amp;lt;   &amp;lt;   &amp;lt;   &amp;lt;   ekzit 12
 *     &amp;lt;   &amp;lt;   &amp;lt;   ekzit 13
 *                 token _brace, consumed }
 *     &amp;lt;   &amp;lt;   ekzit object
 *     &amp;lt;   ekzit value
 */</code></pre>
  <p>Cet exemple nous révèle plusieurs choses. Tout d'abord, les informations
  que nous donne la trace peuvent être utiles : si nous sommes sur une règle,
  nous avons son <strong>nom</strong> (avec la méthode <code>getRule</code>), et
  si nous sommes sur un lexème, nous avons son <strong>nom</strong> (avec la
  méthode <code>getTokenName</code>), sa <strong>représentation</strong> (sous
  la forme d'une PCRE, avec la méthode <code>getRepresentation</code>), sa
  <strong>valeur</strong> (avec la méthode <code>getValue</code>), si c'est un
  nœud à <strong>conserver</strong> dans l'AST (avec la méthode
  <code>isKept</code>) et son index d'<strong>unification</strong> s'il existe
  (avec la méthode <code>getUnificationIndex</code>). Bien sûr, tout ceci est
  modifiable, ce qui peut influencer la construction de l'AST qui est le
  processus (optionnel) suivant.</p>
  <p>Ensuite, nous remarquons que parfois nous entrons dans une règle qui existe
  dans la grammaire, comme <code>object</code>, <code>pair</code>,
  <code>value</code> etc., et parfois nous entrons dans une règle
  <strong>numérique</strong>, comme <code>13</code>, <code>12</code>,
  <code>21</code>, <code>20</code> etc. Quand la grammaire est interprétée pour
  être transformée en « règles machines », chacune de ses règles est
  <strong>linéarisée</strong> selon les opérateurs du langage PP :</p>
  <ul>
    <li><code>Hoa\Compiler\Llk\Rule\Choice</code> pour une disjonction ;</li>
    <li><code>Hoa\Compiler\Llk\Rule\Concatenation</code> pour une
    concaténation ;</li>
    <li><code>Hoa\Compiler\Llk\Rule\Repetition</code> pour une répétition ;</li>
    <li><code>Hoa\Compiler\Llk\Rule\Token</code> pour un lexème (déjà vu
    précédemment).</li>
  </ul>
  <p>Toutes les règles sous ce format sont accessibles à travers la méthode
  <code>Hoa\Compiler\Llk\Parser::getRules</code> sous la forme d'un tableau.
  Nous allons afficher toutes les règles <strong>accessibles</strong> depuis la
  règle racine pour mieux comprendre :</p>
  <pre><code class="language-php">$compiler = Hoa\Compiler\Llk\Llk::load(new Hoa\File\Read('Json.pp'));

// 1. Get all rules.
$rules    = $compiler->getRules();

// 2. Start with the root rule.
$stack    = [$compiler->getRootRule() => true];

while (false !== current($stack)) {
    $rule = key($stack);
    next($stack);
    echo
        "\n", '"', $rule, '" is a ',
        strtolower(substr(get_class($rules[$rule]), 22));

    $subrules = $rules[$rule]->getContent();

    // 3a. Token.
    if (null === $subrules) {
        continue;
    }

    echo ' of rules: ';

    // 3b. Other rules.
    foreach ((array) $rules[$rule]->getContent() as $subrule) {
        if (!array_key_exists($subrule, $stack)) {
            // 4. Unshift new rules to print.
            $stack[$subrule] = true;
        }

        echo $subrule, ' ';
    }
}

/**
 * Will output:
 *     "value" is a choice of rules: 1 2 3 string object array number
 *     "1" is a token
 *     "2" is a token
 *     "3" is a token
 *     "string" is a concatenation of rules: 5 6 7
 *     "object" is a concatenation of rules: 10 pair 13 14
 *     "array" is a concatenation of rules: 18 value 21 22
 *     "number" is a token
 *     "5" is a token
 *     "6" is a token
 *     "7" is a token
 *     "10" is a token
 *     "pair" is a concatenation of rules: string 16 value
 *     "13" is a repetition of rules: 12
 *     "14" is a token
 *     "18" is a token
 *     "21" is a repetition of rules: 20
 *     "22" is a token
 *     "16" is a token
 *     "12" is a concatenation of rules: 11 pair
 *     "20" is a concatenation of rules: 19 value
 *     "11" is a token
 *     "19" is a token
 */</code></pre>
  <p>Si nous lisons la règle <code>object</code>, nous savons que c'est la
  concaténation des règles <code>10</code>, <code>pair</code>, <code>13</code>
  et <code>14</code>. <code>10</code> est un lexème, <code>pair</code> est la
  concaténation des règles <code>string</code>, <code>16</code> et
  <code>value</code>, et ainsi de suite. La grammaire initiale est transformée
  pour être sous sa forme la plus <strong>réduite</strong> possible. Ceci permet
  de <strong>raisonner</strong> beaucoup plus <strong>facilement</strong> et
  <strong>rapidement</strong> sur les règles. En effet, les traitements sur la
  grammaire ne sont pas réservés aux AST. À l'étape précédente, avec la trace,
  nous pouvons déjà effectuer des traitements.</p>

  <h3 id="Generation" for="main-toc">Génération</h3>

  <p>Une grammaire peut être utile pour deux objectifs :
  <strong>valider</strong> une donnée (si nous la voyons comme un automate) ou
  <strong>générer</strong> des données. Jusqu'à présent, nous avons vu comment
  valider une donnée à travers plusieurs processus :
  <strong>préparation</strong> de notre compilateur, exécution des
  <strong>analyseurs</strong> lexical et syntaxique résultant sur une
  <strong>trace</strong>, transformation de la trace vers un
  <strong>AST</strong> pour enfin <strong>visiter</strong> cet arbre. Mais nous
  pouvons nous arrêter à la première étape, la préparation de notre compilateur,
  pour exploiter les règles afin de générer une donnée qui sera valide par
  rapport à notre grammaire.</p>
  <p><code>Hoa\Compiler\Llk\Sampler</code> propose trois algorithmes de
  <strong>générations</strong> de données :</p>
  <ul>
    <li>génération aléatoire et uniforme ;</li>
    <li>génération exhaustive bornée ;</li>
    <li>génération basée sur la couverture.</li>
  </ul>
  <p>Pourquoi proposer trois algorithmes ? Parce qu'il est illusoire de penser
  qu'un seul algorithme peut suffir aux <strong>nombreux</strong> contextes
  d'utilisations. Chacun répond à des besoins différents, nous l'expliquerons
  plus loin.</p>
  <p>Générer une donnée à partir d'une grammaire se fait en <strong>deux
  étapes</strong> :</p>
  <ol>
    <li>générer des valeurs pour les <strong>lexèmes</strong> afin d'avoir des données
    brutes ;</li>
    <li>générer un <strong>chemin</strong> dans les règles de la grammaire.</li>
  </ol>
  <p>Un chemin est équivalent à une dérivation, le vocabulaire est différent
  selon notre objectif : validation ou génération.</p>

  <h4 id="Isotropic_generation_of_lexemes" for="main-toc">Génération
  isotropique de lexèmes</h4>

  <p>Pour générer les valeurs des lexèmes, peu importe l'algorithme utilisé, il
  doit être <strong>rapide</strong>. Nous allons utiliser un parcours dit
  <strong>isotrope</strong>. Nous partons d'une règle et nous avançons
  uniquement à partir de choix <strong>aléatoires</strong> et <strong>uniformes
  localement</strong> (uniquement pour ce choix). Par exemple si nous avons une
  disjonction entre trois sous-règles, nous allons tirer aléatoirement et
  uniformément entre 1 et 3. Si nous avons une concaténation, nous allons juste
  concaténer chaque partie. Et enfin, une répétition n'est rien d'autre qu'une
  disjonction de concaténation : en effet, <code><em>e</em>{1,3}</code> est
  strictement équivalent à <code><em>e</em> | <em>ee</em> | <em>eee</em></code>.
  Illustrons plutôt :</p>
  <pre><code>([ae]+|[x-z]!){1,3}              <em>repeat <em>[ae]+|[x-z]!</em> 2 times</em>
→ ([ae]+|[x-z]!)([ae]+|[x-z]!)  <em>choose between <em>[ae]+</em> and <em>[x-z]!</em></em>
→ ([ae]+)([ae]+|[x-z]!)         <em>repeat <code>ae</code> 2 times</em>
→ [ae][ae]([ae]+|[x-z]!)        <em>choose between <em>a</em> and <em>e</em></em>
→ e[ae]([ae]+|[x-z]!)           <em>again</em>
→ ea([ae]+|[x-z]!)              <em>choose between <em>[ae]+</em> and <em>[x-z]!</em></em>
→ ea([x-z]!)                    <em>choose between <em>x</em>, <em>y</em> and <em>z</em></em>
→ eay!</code></pre>
  <p>Cette génération est <strong>naïve</strong> mais ce n'est pas important. Ce
  qui est vraiment important est la génération des chemins dans les règles, ou
  autrement dit, la génération des <strong>séquences de lexèmes</strong>.</p>

  <h4 id="Uniform_random_generation" for="main-toc">Génération aléatoire
  et uniforme</h4>

  <p>Le premier algorithme est celui de la génération <strong>aléatoire</strong>
  et <strong>uniforme</strong>. Cet algorithme est utile si nous voulons générer
  des séquences de lexèmes de <strong>taille <em>n</em> fixe</strong> et avec
  une <strong>uniformité</strong> non pas locale (comme avec un parcours
  isotrope) mais sur l'<strong>ensemble</strong> de toutes les séquences
  possibles. Succinctement, l'algorithme travaille en deux étapes :
  <strong>pré-calcul</strong> (une seule fois par taille) puis
  <strong>génération</strong>. Le pré-calcul est une étape
  <strong>automatique</strong> et calcule le <strong>nombre</strong> de
  séquences et sous-séquences possibles de taille <em>n</em>. Cette étape aide
  au calcul de <strong>fonctions de répartions</strong> pour
  <strong>guider</strong> la génération des séquences de lexèmes finales.</p>
  <p>Nous allons générer 10 données aléatoires de taille 7, c'est à dire
  composées de 7 lexèmes. Pour cela, nous allons utiliser la classe
  <code>Hoa\Compiler\Llk\Sampler\Uniform</code> qui prend en premier argument
  notre grammaire, en deuxième le générateur de valeurs de lexèmes (ici
  <code>Hoa\Regex\Visitor\Isototropic</code>) et enfin la taille :</p>
  <pre><code class="language-php">$sampler = new Hoa\Compiler\Llk\Sampler\Uniform(
    // Grammar.
    Hoa\Compiler\Llk\Llk::load(new Hoa\File\Read('Json.pp')),
    // Token sampler.
    new Hoa\Regex\Visitor\Isotropic(new Hoa\Math\Sampler\Random()),
    // Length.
    7
);

for ($i = 0; $i &amp;lt; 10; ++$i) {
    echo $i, ' => ', $sampler->uniform(), "\n";
}

/**
 * Will output:
 *     0 => [ false , null , null ]
 *     1 => [ " l " , null ]
 *     2 => [ [ true ] , true ]
 *     3 => [ [ [ 4435 ] ] ]
 *     4 => [ [ [ 9366 ] ] ]
 *     5 => [ true , false , null ]
 *     6 => { " |h&amp;lt;# " : false }
 *     7 => [ [ [ false ] ] ]
 *     8 => [ false , true , 7 ]
 *     9 => [ false , 5 , 79 ]
 */</code></pre>
  <p>Nous pouvons redéfinir la taille avec la méthode
  <code>Hoa\Compiler\Llk\Sampler\Uniform::setLength</code>. Nous aurons
  peut-être remarqué que certains opérateurs de répétition n'ont pas de bornes
  supérieures, comme <code>+</code> ou <code>*</code> ; dans ce cas, nous la
  définissons à <em>n</em>.</p>

  <h4 id="Bounded_exhaustive_generation" for="main-toc">Génération exhaustive
  bornée</h4>

  <p>Le deuxième algorithme est celui de la génération <strong>exhaustive
  bornée</strong>. Cet algorithme génère <strong>toutes</strong> les séquences
  (c'est le côté exhaustif) de lexèmes de taille 1 <strong>jusqu'à</strong>
  <em>n</em> (c'est le caractère borné). Un aspect très intéressant de cet
  algorithme est que l'exhaustivité est une forme de <strong>preuve</strong> !
  L'algorithme fonctionne comme un itérateur et est très simple à utiliser :</p>
  <pre><code class="language-php">$sampler = new Hoa\Compiler\Llk\Sampler\BoundedExhaustive(
    // Grammar.
    Hoa\Compiler\Llk\Llk::load(new Hoa\File\Read('Json.pp')),
    // Token sampler.
    new Hoa\Regex\Visitor\Isotropic(new Hoa\Math\Sampler\Random()),
    // Length.
    7
);

foreach ($sampler as $i => $data) {
    echo $i, ' => ', $data, "\n";
}

/**
 * Will output:
 *     0 => true
 *     1 => false
 *     2 => null
 *     3 => " 8u2 "
 *     4 => { " ,M@aj{ " : true }
 *     5 => { " x`|V " : false }
 *     6 => { " NttB " : null }
 *     7 => { " eJWwA " : 0 }
 *     8 => [ true ]
 *     9 => [ true , true ]
 *     10 => [ true , true , true ]
 *     11 => [ true , true , false ]
 *     12 => [ true , true , null ]
 *     13 => [ true , true , 32 ]
 *     14 => [ true , false ]
 *     15 => [ true , false , true ]
 *     16 => [ true , false , false ]
 *     17 => [ true , false , null ]
 *     18 => [ true , false , 729 ]
 *     19 => [ true , null ]
 *     20 => [ true , null , true ]
 *     21 => [ true , null , false ]
 *     …
 *     157 => [ 780 , 01559 , 32 ]
 *     158 => 344
 */</code></pre>
  <p><em>A l'instar</em> de l'algorithme précédent, nous pouvons redéfinir la
  borne maximum avec la méthode
  <code>Hoa\Compiler\Llk\Sampler\BoundedExhaustive::setLength</code>. Et les
  opérateurs de répétition sans borne supérieure utilisent <em>n</em>.</p>

  <h4 id="Grammar_coverage-based_generation" for="main-toc">Génération basée
  sur la couverture</h4>

  <p>Le dernier algorithme est celui de la génération <strong>basée sur la
  couverture</strong>. Cet algorithme réduit l'<strong>explosion
  combinatoire</strong> rencontrée avec l'algorithme précédent mais l'objectif
  est tout autre : il va générer des séquences de lexèmes qui vont
  « <strong>activer</strong> » toutes les <strong>branches</strong> des règles
  de la grammaire. Une règle est dite couverte si et seulement si ses
  sous-règles sont toutes couvertes, et un lexème est dit couvert s'il a été
  utilisé dans une séquence. Pour assurer une <strong>diversité</strong> dans
  les séquences produites, les points de choix entre des sous-règles non
  couvertes sont résolus par tirages <strong>aléatoires</strong>. L'algorithme
  fonctionne également comme un itérateur :</p>
  <pre><code class="language-php">$sampler = new Hoa\Compiler\Llk\Sampler\Coverage(
    // Grammar.
    Hoa\Compiler\Llk\Llk::load(new Hoa\File\Read('Json.pp')),
    // Token sampler.
    new Hoa\Regex\Visitor\Isotropic(new Hoa\Math\Sampler\Random())
);

foreach ($sampler as $i => $data) {
    echo $i, ' => ', $data, "\n";
}

/**
 * Will output:
 *     0 => true
 *     1 => { " )o?bz " : null , " %3W) " : [ false , 130 , " 6 " ] }
 *     2 => [ { " ny  " : true } ]
 *     3 => { " Ne;[3 " : [ true , true ] , " th: " : true , " C[8} " : true }
 */</code></pre>
  <p>Pour éviter l'explosion combinatoire et assurer la
  <strong>termination</strong> de l'algorithme, nous utilisons
  l'<strong>heuristique</strong> suivante sur les opérateurs de
  <strong>répétition</strong> : <code>*</code> répétera <code>0</code>,
  <code>1</code> et <code>2</code> fois, <code>+</code> répétera <code>1</code>
  et <code>2</code> fois, et enfin <code>{<em>x</em>,<em>y</em>}</code>
  répétera <code><em>x</em></code>, <code><em>x</em> + 1</code>,
  <code><em>y</em> - 1</code> et <code><em>y</em></code> fois. Cette heuristique
  trouve ses origines dans le test aux <strong>limites</strong>.</p>
  <p>Nous remarquons dans notre exemple que 4 données sont générées et suffisent
  à <strong>couvrir</strong> l'ensemble de notre grammaire !</p>

  <h4 id="Comparison_between_algorithms" for="main-toc">Comparaison entre
  les algorithmes</h4>

  <p>Voici quelques <strong>indices</strong> pour savoir quand utiliser tel ou
  tel autre algorithme.</p>
  <dl>
    <dt>Génération aléatoire et uniforme :</dt>
    <dd><ul>
      <li data-item="+">rapide pour des petites données, grande diversité dans
      les données et taille fixe ;</li>
      <li data-item="-">la phase de pré-calcul est exponentielle et donc
      longue bien que, ensuite, la génération soit très rapide.</li>
    </ul></dd>
    <dt>Génération exhaustive bornée :</dt>
    <dd><ul>
      <li data-item="+">rapide pour des petites données et l'exhaustivité est
      efficace ;</li>
      <li data-item="-">nombre exponentiel de données.</li>
    </ul></dd>
    <dt>Génération basée sur la couverture :</dt>
    <dd><ul>
      <li data-item="+">rapide pour des données de taille moyenne ou grande,
      et diversité des données ;</li>
      <li data-item="-">ne considère pas de taille.</li>
    </ul></dd>
  </dl>

  <h2 id="LL1_compiler-compiler" for="main-toc">Compilateur de compilateurs
  LL(1)</h2>

  <p>La documentation pour le compilateur LL(1), à travers la classe
  <code>Hoa\Compiler\Ll1</code>, n'est pas encore écrite. L'objectif est
  différent de <code>Hoa\Compiler\Llk</code> : il n'existe pas de langage
  intermédiaire, les automates sont codés en dur avec des tableaux et ce type de
  compilateurs est orienté haute performance. C'est pourquoi son comportement
  est <strong>monolithique</strong>.</p>

  <h2 id="Conclusion" for="main-toc">Conclusion</h2>

  <p><code>Hoa\Compiler</code> propose deux <strong>compilateurs de
  compilateurs</strong> : <code>Hoa\Compiler\Llk</code> et
  <code>Hoa\Compiler\Ll1</code>, afin de <strong>valider</strong> des données.
  Le <strong>langage PP</strong> permet d'écrire des <strong>grammaires
  algébriques</strong> de manière <strong>simple</strong> et
  <strong>naturelle</strong>. Le compilateur de compilateurs LL(<em>k</em>) est
  découpé en <strong>processus distincts</strong> ce qui le rend très
  <em lang="en">hackable</em>. Enfin, différents algorithmes permettent de
  <strong>générer</strong> des données à partir d'une grammaire selon le
  contexte d'utilisation.</p>

</yield>
</overlay>
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Compiler\Visitor;

use Hoa\Visitor;
/**
 * Class \Hoa\Compiler\Visitor\Dump.
 *
 * Dump AST produced by LL(k) compiler.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Dump implements Visitor\Visit
{
    /**
     * Indentation depth.
     *
     * @var int
     */
    protected static $_i = 0;
    /**
     * Visit an element.
     *
     * @param   \Hoa\Visitor\Element  $element    Element to visit.
     * @param   mixed                 &$handle    Handle (reference).
     * @param   mixed                 $eldnah     Handle (not reference).
     * @return  mixed
     */
    public function visit(Visitor\Element $element, &$handle = null, $eldnah = null)
    {
        ++self::$_i;
        $out = \str_repeat('>  ', self::$_i) . $element->getId();
        if (null !== ($value = $element->getValue())) {
            $out .= '(' . ('default' !== $value['namespace'] ? $value['namespace'] . ':' : '') . $value['token'] . ', ' . $value['value'] . ')';
        }
        $data = $element->getData();
        if (!empty($data)) {
            $out .= ' ' . $this->dumpData($data);
        }
        $out .= "\n";
        foreach ($element->getChildren() as $child) {
            $out .= $child->accept($this, $handle, $eldnah);
        }
        --self::$_i;
        return $out;
    }
    /**
     * Dump data.
     *
     * @param   mixed  $data    Data.
     * @return  string
     */
    protected function dumpData($data)
    {
        $out = null;
        if (!\is_array($data)) {
            return $data;
        }
        foreach ($data as $key => $value) {
            $out .= '[' . $key . ' => ' . $this->dumpData($value) . ']';
        }
        return $out;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Protocol;

use Hoa\Consistency;
/**
 * Class \Hoa\Protocol\Protocol.
 *
 * Root of the `hoa://` protocol.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Protocol extends \Hoa\Protocol\Node
{
    /**
     * No resolution value.
     *
     * @const string
     */
    const NO_RESOLUTION = '/hoa/flatland';
    /**
     * Singleton.
     *
     * @var \Hoa\Protocol\Protocol
     */
    private static $_instance = null;
    /**
     * Cache of resolver.
     *
     * @var array
     */
    private static $_cache = [];
    /**
     * Initialize the protocol.
     *
     */
    public function __construct()
    {
        $this->initialize();
        return;
    }
    /**
     * Singleton.
     * To use the `hoa://` protocol shared by everyone.
     *
     * @return  \Hoa\Protocol\Protocol
     */
    public static function getInstance()
    {
        if (null === static::$_instance) {
            static::$_instance = new static();
        }
        return static::$_instance;
    }
    /**
     * Initialize the protocol.
     *
     * @return  void
     */
    protected function initialize()
    {
        $root = \dirname(\dirname(__DIR__));
        $cwd = 'cli' === \PHP_SAPI ? \dirname(\realpath($_SERVER['argv'][0])) : \getcwd();
        $this[] = new \Hoa\Protocol\Node('Application', $cwd . DS, [new \Hoa\Protocol\Node('Public', 'Public' . DS)]);
        $this[] = new \Hoa\Protocol\Node('Data', \dirname($cwd) . DS, [new \Hoa\Protocol\Node('Etc', 'Etc' . DS, [new \Hoa\Protocol\Node('Configuration', 'Configuration' . DS), new \Hoa\Protocol\Node('Locale', 'Locale' . DS)]), new \Hoa\Protocol\Node('Lost+found', 'Lost+found' . DS), new \Hoa\Protocol\Node('Temporary', 'Temporary' . DS), new \Hoa\Protocol\Node('Variable', 'Variable' . DS, [new \Hoa\Protocol\Node('Cache', 'Cache' . DS), new \Hoa\Protocol\Node('Database', 'Database' . DS), new \Hoa\Protocol\Node('Log', 'Log' . DS), new \Hoa\Protocol\Node('Private', 'Private' . DS), new \Hoa\Protocol\Node('Run', 'Run' . DS), new \Hoa\Protocol\Node('Test', 'Test' . DS)])]);
        $this[] = new \Hoa\Protocol\Node\Library('Library', $root . DS . 'Hoathis' . DS . RS . $root . DS . 'Hoa' . DS);
        return;
    }
    /**
     * Resolve (unfold) an `hoa://` path to its real resource.
     *
     * @param   string  $path      Path to resolve.
     * @param   bool    $exists    If `true`, try to find the first that exists,
     *                             else return the first solution.
     * @param   bool    $unfold    Return all solutions instead of one.
     * @return  mixed
     */
    public function resolve($path, $exists = \true, $unfold = \false)
    {
        if (\substr($path, 0, 6) !== 'hoa://') {
            if (\true === \is_dir($path)) {
                $path = \rtrim($path, '/\\');
                if (0 === \strlen($path)) {
                    $path = '/';
                }
            }
            return $path;
        }
        if (isset(self::$_cache[$path])) {
            $handle = self::$_cache[$path];
        } else {
            $out = $this->_resolve($path, $handle);
            // Not a path but a resource.
            if (!\is_array($handle)) {
                return $out;
            }
            $handle = \array_values(\array_unique($handle, \SORT_REGULAR));
            foreach ($handle as &$entry) {
                if (\true === \is_dir($entry)) {
                    $entry = \rtrim($entry, '/\\');
                    if (0 === \strlen($entry)) {
                        $entry = '/';
                    }
                }
            }
            self::$_cache[$path] = $handle;
        }
        if (\true === $unfold) {
            if (\true !== $exists) {
                return $handle;
            }
            $out = [];
            foreach ($handle as $solution) {
                if (\file_exists($solution)) {
                    $out[] = $solution;
                }
            }
            return $out;
        }
        if (\true !== $exists) {
            return $handle[0];
        }
        foreach ($handle as $solution) {
            if (\file_exists($solution)) {
                return $solution;
            }
        }
        return static::NO_RESOLUTION;
    }
    /**
     * Clear the cache.
     *
     * @return  void
     */
    public static function clearCache()
    {
        self::$_cache = [];
        return;
    }
}
/**
 * Flex entity.
 */
Consistency::flexEntity('Hoa\\Protocol\\Protocol');
This file was automatically generated by Composer Patches (https://github.com/cweagans/composer-patches)
Patches applied to this directory:

0
Source: patches/Node.patch


1
Source: patches/Wrapper.patch


<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Protocol\Bin;

use Hoa\Console;
use Hoa\Protocol;
/**
 * Class \Hoa\Protocol\Bin\Resolve.
 *
 * This command resolves some `hoa://` paths.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Resolve extends Console\Dispatcher\Kit
{
    /**
     * Options description.
     *
     * @var array
     */
    protected $options = [['exists', Console\GetOption::NO_ARGUMENT, 'E'], ['unfold', Console\GetOption::NO_ARGUMENT, 'u'], ['tree', Console\GetOption::NO_ARGUMENT, 't'], ['no-verbose', Console\GetOption::NO_ARGUMENT, 'V'], ['help', Console\GetOption::NO_ARGUMENT, 'h'], ['help', Console\GetOption::NO_ARGUMENT, '?']];
    /**
     * The entry method.
     *
     * @return  int
     */
    public function main()
    {
        $exists = \true;
        $unfold = \false;
        $tree = \false;
        $verbose = Console::isDirect(\STDOUT);
        while (\false !== ($c = $this->getOption($v))) {
            switch ($c) {
                case 'E':
                    $exists = \false;
                    break;
                case 'u':
                    $unfold = \true;
                    break;
                case 't':
                    $tree = \true;
                    break;
                case 'V':
                    $verbose = \false;
                    break;
                case 'h':
                case '?':
                    return $this->usage();
                case '__ambiguous':
                    $this->resolveOptionAmbiguity($v);
                    break;
            }
        }
        $this->parser->listInputs($path);
        if (null === $path) {
            return $this->usage();
        }
        if (\true === $tree) {
            $protocol = Protocol::getInstance();
            $foo = \substr($path, 0, 6);
            if ('hoa://' !== $foo) {
                return;
            }
            $path = \substr($path, 6);
            $current = $protocol;
            foreach (\explode('/', $path) as $component) {
                if (!isset($current[$component])) {
                    break;
                }
                $current = $current[$component];
            }
            echo $current;
            return;
        }
        if (\true === $verbose) {
            echo Console\Cursor::colorize('foreground(yellow)'), $path, Console\Cursor::colorize('normal'), ' is equivalent to:', "\n";
        }
        $resolved = resolve($path, $exists, $unfold);
        foreach ((array) $resolved as $r) {
            echo $r, "\n";
        }
        return;
    }
    /**
     * The command usage.
     *
     * @return  int
     */
    public function usage()
    {
        echo 'Usage   : protocol:resolve <options> path', "\n", 'Options :', "\n", $this->makeUsageOptionsList(['E' => 'Do not check if the resolution result exists.', 'u' => 'Unfold all possible results.', 't' => 'Print the tree from the path.', 'V' => 'No-verbose, i.e. be as quiet as possible, just print ' . 'essential information.', 'help' => 'This help.']), "\n";
        return;
    }
}
__halt_compiler();
Resolve `hoa://` paths.

<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Protocol\Node;

/**
 * Class \Hoa\Protocol\Node\Library.
 *
 * `hoa://Library/` node.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Library extends \Hoa\Protocol\Node\Node
{
    /**
     * Queue of the component.
     *
     * @param   string  $queue    Queue of the component (generally, a filename,
     *                            with probably a query).
     * @return  mixed
     */
    public function reach($queue = null)
    {
        if (!WITH_COMPOSER) {
            return parent::reach($queue);
        }
        if (!empty($queue)) {
            $head = $queue;
            if (\false !== ($pos = \strpos($queue, '/'))) {
                $head = \substr($head, 0, $pos);
                $queue = \DIRECTORY_SEPARATOR . \substr($queue, $pos + 1);
            } else {
                $queue = null;
            }
            $out = [];
            foreach (\explode(RS, $this->_reach) as $part) {
                $out[] = "\r" . $part . \strtolower($head) . $queue;
            }
            $out[] = "\r" . \dirname(\dirname(\dirname(\dirname(__DIR__)))) . $queue;
            return \implode(RS, $out);
        }
        $out = [];
        foreach (\explode(RS, $this->_reach) as $part) {
            $pos = \strrpos(\rtrim($part, \DIRECTORY_SEPARATOR), \DIRECTORY_SEPARATOR) + 1;
            $head = \substr($part, 0, $pos);
            $tail = \substr($part, $pos);
            $out[] = $head . \strtolower($tail);
        }
        $this->_reach = \implode(RS, $out);
        return parent::reach($queue);
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Protocol\Node;

use Hoa\Consistency;
use Hoa\Protocol;
/**
 * Class \Hoa\Protocol\Node\Node.
 *
 * Abstract class for all `hoa://`'s nodes.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Node implements \ArrayAccess, \IteratorAggregate
{
    /**
     * Node's name.
     *
     * @var string
     */
    protected $_name = null;
    /**
     * Path for the `reach` method.
     *
     * @var string
     */
    protected $_reach = null;
    /**
     * Children of the node.
     *
     * @var array
     */
    private $_children = [];
    /**
     * Construct a protocol's node.
     * If it is not a data object (i.e. if it does not extend this class to
     * overload the `$_name` attribute), we can set the `$_name` attribute
     * dynamically. This is useful to create a node on-the-fly.
     *
     * @param   string  $name        Node's name.
     * @param   string  $reach       Path for the `reach` method.
     * @param   array   $children    Node's children.
     */
    public function __construct($name = null, $reach = null, array $children = [])
    {
        if (null !== $name) {
            $this->_name = $name;
        }
        if (null !== $reach) {
            $this->_reach = $reach;
        }
        foreach ($children as $child) {
            $this[] = $child;
        }
        return;
    }
    /**
     * Add a node.
     *
     * @param   string                  $name    Node's name. If null, will be
     *                                           set to name of `$node`.
     * @param   \Hoa\Protocol\Protocol  $node    Node to add.
     * @return  \Hoa\Protocol\Protocol
     * @throws  \Hoa\Protocol\Exception
     */
    public function offsetSet($name, $node) : void
    {
        if (!$node instanceof self) {
            throw new Protocol\Exception('Protocol node must extend %s.', 0, __CLASS__);
        }
        if (empty($name)) {
            $name = $node->getName();
        }
        if (empty($name)) {
            throw new Protocol\Exception('Cannot add a node to the `hoa://` protocol without a name.', 1);
        }
        $this->_children[$name] = $node;
        return;
    }
    /**
     * Get a specific node.
     *
     * @param   string  $name    Node's name.
     * @return  \Hoa\Protocol\Protocol
     * @throws  \Hoa\Protocol\Exception
     */
    #[\ReturnTypeWillChange]
    public function offsetGet($name)
    {
        if (!isset($this[$name])) {
            throw new Protocol\Exception('Node %s does not exist.', 2, $name);
        }
        return $this->_children[$name];
    }
    /**
     * Check if a node exists.
     *
     * @param   string  $name    Node's name.
     * @return  bool
     */
    public function offsetExists($name) : bool
    {
        return \true === \array_key_exists($name, $this->_children);
    }
    /**
     * Remove a node.
     *
     * @param   string  $name    Node's name to remove.
     * @return  void
     */
    public function offsetUnset($name) : void
    {
        unset($this->_children[$name]);
        return;
    }
    /**
     * Resolve a path, i.e. iterate the nodes tree and reach the queue of
     * the path.
     *
     * @param   string  $path            Path to resolve.
     * @param   array   &$accumulator    Combination of all possibles paths.
     * @param   string  $id              ID.
     * @return  mixed
     */
    protected function _resolve($path, &$accumulator, $id = null)
    {
        if (\substr($path, 0, 6) == 'hoa://') {
            $path = \substr($path, 6);
        }
        if (empty($path)) {
            return null;
        }
        if (null === $accumulator) {
            $accumulator = [];
            $posId = \strpos($path, '#');
            if (\false !== $posId) {
                $id = \substr($path, $posId + 1);
                $path = \substr($path, 0, $posId);
            } else {
                $id = null;
            }
        }
        $path = \trim($path, '/');
        $pos = \strpos($path, '/');
        if (\false !== $pos) {
            $next = \substr($path, 0, $pos);
        } else {
            $next = $path;
        }
        if (isset($this[$next])) {
            if (\false === $pos) {
                if (null === $id) {
                    $this->_resolveChoice($this[$next]->reach(), $accumulator);
                    return \true;
                }
                $accumulator = null;
                return $this[$next]->reachId($id);
            }
            $tnext = $this[$next];
            $this->_resolveChoice($tnext->reach(), $accumulator);
            return $tnext->_resolve(\substr($path, $pos + 1), $accumulator, $id);
        }
        $this->_resolveChoice($this->reach($path), $accumulator);
        return \true;
    }
    /**
     * Resolve choices, i.e. a reach value has a “;”.
     *
     * @param   string  $reach           Reach value.
     * @param   array   &$accumulator    Combination of all possibles paths.
     * @return  void
     */
    protected function _resolveChoice($reach, array &$accumulator)
    {
        if (empty($accumulator)) {
            $accumulator = \explode(RS, $reach);
            return;
        }
        if (\false === \strpos($reach, RS)) {
            if (\false !== ($pos = \strrpos($reach, "\r"))) {
                $reach = \substr($reach, $pos + 1);
                foreach ($accumulator as &$entry) {
                    $entry = null;
                }
            }
            foreach ($accumulator as &$entry) {
                $entry .= $reach;
            }
            return;
        }
        $choices = \explode(RS, $reach);
        $ref = $accumulator;
        $accumulator = [];
        foreach ($choices as $choice) {
            if (\false !== ($pos = \strrpos($choice, "\r"))) {
                $choice = \substr($choice, $pos + 1);
                foreach ($ref as $entry) {
                    $accumulator[] = $choice;
                }
            } else {
                foreach ($ref as $entry) {
                    $accumulator[] = $entry . $choice;
                }
            }
        }
        unset($ref);
        return;
    }
    /**
     * Queue of the node.
     * Generic one. Must be overrided in children classes.
     *
     * @param   string  $queue    Queue of the node (generally a filename,
     *                            with probably a query).
     * @return  mixed
     */
    public function reach($queue = null)
    {
        return empty($queue) ? $this->_reach : $queue;
    }
    /**
     * ID of the component.
     * Generic one. Should be overrided in children classes.
     *
     * @param   string  $id    ID of the component.
     * @return  mixed
     * @throws  \Hoa\Protocol\Exception
     */
    public function reachId($id)
    {
        throw new Protocol\Exception('The node %s has no ID support (tried to reach #%s).', 4, [$this->getName(), $id]);
    }
    /**
     * Set a new reach value.
     *
     * @param   string  $reach    Reach value.
     * @return  string
     */
    public function setReach($reach)
    {
        $old = $this->_reach;
        $this->_reach = $reach;
        return $old;
    }
    /**
     * Get node's name.
     *
     * @return  string
     */
    public function getName()
    {
        return $this->_name;
    }
    /**
     * Get reach's root.
     *
     * @return  string
     */
    protected function getReach()
    {
        return $this->_reach;
    }
    /**
     * Get an iterator.
     *
     * @return  \ArrayIterator
     */
    public function getIterator() : \Traversable
    {
        return new \ArrayIterator($this->_children);
    }
    /**
     * Get root the protocol.
     *
     * @return  \Hoa\Protocol\Protocol
     */
    public static function getRoot()
    {
        return Protocol::getInstance();
    }
    /**
     * Print a tree of component.
     *
     * @return  string
     */
    public function __toString()
    {
        static $i = 0;
        $out = \str_repeat('  ', $i) . $this->getName() . "\n";
        foreach ($this as $node) {
            ++$i;
            $out .= $node;
            --$i;
        }
        return $out;
    }
}
/**
 * Flex entity.
 */
Consistency::flexEntity('Hoa\\Protocol\\Node\\Node');
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Protocol;

/**
 * Class \Hoa\Protocol\Wrapper.
 *
 * Stream wrapper for the `hoa://` protocol.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Wrapper
{
    /**
     * Opened stream.
     *
     * @var resource
     */
    private $_stream = null;
    /**
     * Stream name (filename).
     *
     * @var string
     */
    private $_streamName = null;
    /**
     * Stream context (given by the streamWrapper class).
     *
     * @var resource
     */
    public $context = null;
    /**
     * Get the real path of the given URL.
     * Could return false if the path cannot be reached.
     *
     * @param   string  $path      Path (or URL).
     * @param   bool    $exists    If true, try to find the first that exists,
     * @return  mixed
     */
    public static function realPath($path, $exists = \true)
    {
        return \Hoa\Protocol\Node::getRoot()->resolve($path, $exists);
    }
    /**
     * Retrieve the underlying resource.
     *
     * @param   int     $castAs    Can be STREAM_CAST_FOR_SELECT when
     *                             stream_select() is calling stream_cast() or
     *                             STREAM_CAST_AS_STREAM when stream_cast() is
     *                             called for other uses.
     * @return  resource
     */
    public function stream_cast($castAs)
    {
        return \false;
    }
    /**
     * Close a resource.
     * This method is called in response to fclose().
     * All resources that were locked, or allocated, by the wrapper should be
     * released.
     *
     * @return  void
     */
    public function stream_close()
    {
        if (\true === @\fclose($this->getStream())) {
            $this->_stream = null;
            $this->_streamName = null;
        }
        return;
    }
    /**
     * Tests for end-of-file on a file pointer.
     * This method is called in response to feof().
     *
     * access   public
     * @return  bool
     */
    public function stream_eof()
    {
        return \feof($this->getStream());
    }
    /**
     * Flush the output.
     * This method is called in respond to fflush().
     * If we have cached data in our stream but not yet stored it into the
     * underlying storage, we should do so now.
     *
     * @return  bool
     */
    public function stream_flush()
    {
        return \fflush($this->getStream());
    }
    /**
     * Advisory file locking.
     * This method is called in response to flock(), when file_put_contents()
     * (when flags contains LOCK_EX), stream_set_blocking() and when closing the
     * stream (LOCK_UN).
     *
     * @param   int     $operation    Operation is one the following:
     *                                  * LOCK_SH to acquire a shared lock (reader) ;
     *                                  * LOCK_EX to acquire an exclusive lock (writer) ;
     *                                  * LOCK_UN to release a lock (shared or exclusive) ;
     *                                  * LOCK_NB if we don't want flock() to
     *                                    block while locking (not supported on
     *                                    Windows).
     * @return  bool
     */
    public function stream_lock($operation)
    {
        return \flock($this->getStream(), $operation);
    }
    /**
     * Change stream options.
     * This method is called to set metadata on the stream. It is called when
     * one of the following functions is called on a stream URL: touch, chmod,
     * chown or chgrp.
     *
     * @param   string    $path      The file path or URL to set metadata.
     * @param   int       $option    One of the following constant:
     *                                 * STREAM_META_TOUCH,
     *                                 * STREAM_META_OWNER_NAME,
     *                                 * STREAM_META_OWNER,
     *                                 * STREAM_META_GROUP_NAME,
     *                                 * STREAM_META_GROUP,
     *                                 * STREAM_META_ACCESS.
     * @param   mixed     $values    Arguments of touch, chmod, chown and chgrp.
     * @return  bool
     */
    public function stream_metadata($path, $option, $values)
    {
        $path = static::realPath($path, \false);
        switch ($option) {
            case \STREAM_META_TOUCH:
                $arity = \count($values);
                if (0 === $arity) {
                    $out = \touch($path);
                } elseif (1 === $arity) {
                    $out = \touch($path, $values[0]);
                } else {
                    $out = \touch($path, $values[0], $values[1]);
                }
                break;
            case \STREAM_META_OWNER_NAME:
            case \STREAM_META_OWNER:
                $out = \chown($path, $values);
                break;
            case \STREAM_META_GROUP_NAME:
            case \STREAM_META_GROUP:
                $out = \chgrp($path, $values);
                break;
            case \STREAM_META_ACCESS:
                $out = \chmod($path, $values);
                break;
            default:
                $out = \false;
        }
        return $out;
    }
    /**
     * Open file or URL.
     * This method is called immediately after the wrapper is initialized (f.e.
     * by fopen() and file_get_contents()).
     *
     * @param   string  $path           Specifies the URL that was passed to the
     *                                  original function.
     * @param   string  $mode           The mode used to open the file, as
     *                                  detailed for fopen().
     * @param   int     $options        Holds additional flags set by the
     *                                  streams API. It can hold one or more of
     *                                  the following values OR'd together:
     *                                    * STREAM_USE_PATH, if path is relative,
     *                                      search for the resource using the
     *                                      include_path;
     *                                    * STREAM_REPORT_ERRORS, if this is
     *                                    set, you are responsible for raising
     *                                    errors using trigger_error during
     *                                    opening the stream. If this is not
     *                                    set, you should not raise any errors.
     * @param   string  &$openedPath    If the $path is opened successfully, and
     *                                  STREAM_USE_PATH is set in $options,
     *                                  $openedPath should be set to the full
     *                                  path of the file/resource that was
     *                                  actually opened.
     * @return  bool
     */
    public function stream_open($path, $mode, $options, &$openedPath)
    {
        $path = static::realPath($path, 'r' === $mode[0]);
        if (\Hoa\Protocol\Protocol::NO_RESOLUTION === $path) {
            return \false;
        }
        if (null === $this->context) {
            $openedPath = \fopen($path, $mode, $options & \STREAM_USE_PATH);
        } else {
            $openedPath = \fopen($path, $mode, $options & \STREAM_USE_PATH, $this->context);
        }
        if (\false === \is_resource($openedPath)) {
            return \false;
        }
        $this->_stream = $openedPath;
        $this->_streamName = $path;
        return \true;
    }
    /**
     * Read from stream.
     * This method is called in response to fread() and fgets().
     *
     * @param   int     $count    How many bytes of data from the current
     *                            position should be returned.
     * @return  string
     */
    public function stream_read($count)
    {
        return \fread($this->getStream(), $count);
    }
    /**
     * Seek to specific location in a stream.
     * This method is called in response to fseek().
     * The read/write position of the stream should be updated according to the
     * $offset and $whence.
     *
     * @param   int     $offset    The stream offset to seek to.
     * @param   int     $whence    Possible values:
     *                               * SEEK_SET to set position equal to $offset
     *                                 bytes ;
     *                               * SEEK_CUR to set position to current
     *                                 location plus $offsete ;
     *                               * SEEK_END to set position to end-of-file
     *                                 plus $offset.
     * @return  bool
     */
    public function stream_seek($offset, $whence = \SEEK_SET)
    {
        return 0 === \fseek($this->getStream(), $offset, $whence);
    }
    /**
     * Retrieve information about a file resource.
     * This method is called in response to fstat().
     *
     * @return  array
     */
    public function stream_stat()
    {
        return \fstat($this->getStream());
    }
    /**
     * Retrieve the current position of a stream.
     * This method is called in response to ftell().
     *
     * @return  int
     */
    public function stream_tell()
    {
        return \ftell($this->getStream());
    }
    /**
     * Truncate a stream to a given length.
     *
     * @param   int     $size    Size.
     * @return  bool
     */
    public function stream_truncate($size)
    {
        return \ftruncate($this->getStream(), $size);
    }
    /**
     * Write to stream.
     * This method is called in response to fwrite().
     *
     * @param   string  $data    Should be stored into the underlying stream.
     * @return  int
     */
    public function stream_write($data)
    {
        return \fwrite($this->getStream(), $data);
    }
    /**
     * Close directory handle.
     * This method is called in to closedir().
     * Any resources which were locked, or allocated, during opening and use of
     * the directory stream should be released.
     *
     * @return  void
     */
    public function dir_closedir()
    {
        \closedir($this->getStream());
        $this->_stream = null;
        $this->_streamName = null;
        return;
    }
    /**
     * Open directory handle.
     * This method is called in response to opendir().
     *
     * @param   string  $path       Specifies the URL that was passed to opendir().
     * @param   int     $options    Whether or not to enforce safe_mode (0x04).
     *                              It is not used here.
     * @return  bool
     */
    public function dir_opendir($path, $options)
    {
        $path = static::realPath($path);
        $handle = null;
        if (null === $this->context) {
            $handle = @\opendir($path);
        } else {
            $handle = @\opendir($path, $this->context);
        }
        if (\false === $handle) {
            return \false;
        }
        $this->_stream = $handle;
        $this->_streamName = $path;
        return \true;
    }
    /**
     * Read entry from directory handle.
     * This method is called in response to readdir().
     *
     * @return  mixed
     */
    public function dir_readdir()
    {
        return \readdir($this->getStream());
    }
    /**
     * Rewind directory handle.
     * This method is called in response to rewinddir().
     * Should reset the output generated by self::dir_readdir, i.e. the next
     * call to self::dir_readdir should return the first entry in the location
     * returned by self::dir_opendir.
     *
     * @return  void
     */
    public function dir_rewinddir()
    {
        return \rewinddir($this->getStream());
    }
    /**
     * Create a directory.
     * This method is called in response to mkdir().
     *
     * @param   string  $path       Directory which should be created.
     * @param   int     $mode       The value passed to mkdir().
     * @param   int     $options    A bitwise mask of values.
     * @return  bool
     */
    public function mkdir($path, $mode, $options)
    {
        if (null === $this->context) {
            return \mkdir(static::realPath($path, \false), $mode, $options | \STREAM_MKDIR_RECURSIVE);
        }
        return \mkdir(static::realPath($path, \false), $mode, $options | \STREAM_MKDIR_RECURSIVE, $this->context);
    }
    /**
     * Rename a file or directory.
     * This method is called in response to rename().
     * Should attempt to rename $from to $to.
     *
     * @param   string  $from    The URL to current file.
     * @param   string  $to      The URL which $from should be renamed to.
     * @return  bool
     */
    public function rename($from, $to)
    {
        if (null === $this->context) {
            return \rename(static::realPath($from), static::realPath($to, \false));
        }
        return \rename(static::realPath($from), static::realPath($to, \false), $this->context);
    }
    /**
     * Remove a directory.
     * This method is called in response to rmdir().
     *
     * @param   string  $path       The directory URL which should be removed.
     * @param   int     $options    A bitwise mask of values. It is not used
     *                              here.
     * @return  bool
     */
    public function rmdir($path, $options)
    {
        if (null === $this->context) {
            return \rmdir(static::realPath($path));
        }
        return \rmdir(static::realPath($path), $this->context);
    }
    /**
     * Delete a file.
     * This method is called in response to unlink().
     *
     * @param   string  $path    The file URL which should be deleted.
     * @return  bool
     */
    public function unlink($path)
    {
        if (null === $this->context) {
            return \unlink(static::realPath($path));
        }
        return \unlink(static::realPath($path), $this->context);
    }
    /**
     * Retrieve information about a file.
     * This method is called in response to all stat() related functions.
     *
     * @param   string  $path     The file URL which should be retrieve
     *                            information about.
     * @param   int     $flags    Holds additional flags set by the streams API.
     *                            It can hold one or more of the following
     *                            values OR'd together.
     *                            STREAM_URL_STAT_LINK: for resource with the
     *                            ability to link to other resource (such as an
     *                            HTTP location: forward, or a filesystem
     *                            symlink). This flag specified that only
     *                            information about the link itself should be
     *                            returned, not the resource pointed to by the
     *                            link. This flag is set in response to calls to
     *                            lstat(), is_link(), or filetype().
     *                            STREAM_URL_STAT_QUIET: if this flag is set,
     *                            our wrapper should not raise any errors. If
     *                            this flag is not set, we are responsible for
     *                            reporting errors using the trigger_error()
     *                            function during stating of the path.
     * @return  array
     */
    public function url_stat($path, $flags)
    {
        $path = static::realPath($path);
        if (\Hoa\Protocol\Protocol::NO_RESOLUTION === $path) {
            if ($flags & \STREAM_URL_STAT_QUIET) {
                return 0;
            } else {
                return \trigger_error('Path ' . $path . ' cannot be resolved.', \E_WARNING);
            }
        }
        if ($flags & \STREAM_URL_STAT_LINK) {
            return @\lstat($path);
        }
        return @\stat($path);
    }
    /**
     * Get stream resource.
     *
     * @return  resource
     */
    public function getStream()
    {
        return $this->_stream;
    }
    /**
     * Get stream name.
     *
     * @return  resource
     */
    public function getStreamName()
    {
        return $this->_streamName;
    }
}
/**
 * Register the `hoa://` protocol.
 */
\stream_wrapper_register('hoa', \Hoa\Protocol\Wrapper::class);
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Protocol;

use Hoa\Exception as HoaException;
/**
 * Class \Hoa\Protocol\Exception.
 *
 * Extending the \Hoa\Exception\Exception class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Exception extends HoaException
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Exception;

/**
 * Class \Hoa\Exception\Idle.
 *
 * `\Hoa\Exception\Idle` is the mother exception class of libraries. The only
 * difference between `\Hoa\Exception\Idle` and its directly child
 * `\Hoa\Exception` is that the latter fires events after beeing constructed.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Idle extends \Exception
{
    /**
     * Delay processing on arguments.
     *
     * @var array
     */
    protected $_tmpArguments = null;
    /**
     * Arguments to format message.
     *
     * @var array
     */
    protected $_arguments = null;
    /**
     * Backtrace.
     *
     * @var array
     */
    protected $_trace = null;
    /**
     * Previous.
     *
     * @var \Exception
     */
    protected $_previous = null;
    /**
     * Original message.
     *
     * @var string
     */
    protected $_rawMessage = null;
    /**
     * Create an exception.
     * An exception is built with a formatted message, a code (an ID) and an
     * array that contains the list of formatted strings for the message. If
     * chaining, we can add a previous exception.
     *
     * @param   string      $message      Formatted message.
     * @param   int         $code         Code (the ID).
     * @param   array       $arguments    Arguments to format message.
     * @param   \Exception  $previous     Previous exception in chaining.
     */
    public function __construct($message, $code = 0, $arguments = [], \Exception $previous = null)
    {
        $this->_tmpArguments = $arguments;
        parent::__construct($message, $code, $previous);
        $this->_rawMessage = $message;
        $this->message = @\vsprintf($message, $this->getArguments());
        return;
    }
    /**
     * Get the backtrace.
     * Do not use \Exception::getTrace() any more.
     *
     * @return  array
     */
    public function getBacktrace()
    {
        if (null === $this->_trace) {
            $this->_trace = $this->getTrace();
        }
        return $this->_trace;
    }
    /**
     * Get previous.
     * Do not use \Exception::getPrevious() any more.
     *
     * @return  \Exception
     */
    public function getPreviousThrow()
    {
        if (null === $this->_previous) {
            $this->_previous = $this->getPrevious();
        }
        return $this->_previous;
    }
    /**
     * Get arguments for the message.
     *
     * @return  array
     */
    public function getArguments()
    {
        if (null === $this->_arguments) {
            $arguments = $this->_tmpArguments;
            if (!\is_array($arguments)) {
                $arguments = [$arguments];
            }
            foreach ($arguments as &$value) {
                if (null === $value) {
                    $value = '(null)';
                }
            }
            $this->_arguments = $arguments;
            unset($this->_tmpArguments);
        }
        return $this->_arguments;
    }
    /**
     * Get the raw message.
     *
     * @return  string
     */
    public function getRawMessage()
    {
        return $this->_rawMessage;
    }
    /**
     * Get the message already formatted.
     *
     * @return  string
     */
    public function getFormattedMessage()
    {
        return $this->getMessage();
    }
    /**
     * Get the source of the exception (class, method, function, main etc.).
     *
     * @return  string
     */
    public function getFrom()
    {
        $trace = $this->getBacktrace();
        $from = '{main}';
        if (!empty($trace)) {
            $t = $trace[0];
            $from = '';
            if (isset($t['class'])) {
                $from .= $t['class'] . '::';
            }
            if (isset($t['function'])) {
                $from .= $t['function'] . '()';
            }
        }
        return $from;
    }
    /**
     * Raise an exception as a string.
     *
     * @param   bool    $previous    Whether raise previous exception if exists.
     * @return  string
     */
    public function raise($previous = \false)
    {
        $message = $this->getFormattedMessage();
        $trace = $this->getBacktrace();
        $file = '/dev/null';
        $line = -1;
        $pre = $this->getFrom();
        if (!empty($trace)) {
            $file = isset($trace['file']) ? $trace['file'] : null;
            $line = isset($trace['line']) ? $trace['line'] : null;
        }
        $pre .= ': ';
        try {
            $out = $pre . '(' . $this->getCode() . ') ' . $message . "\n" . 'in ' . $this->getFile() . ' at line ' . $this->getLine() . '.';
        } catch (\Exception $e) {
            $out = $pre . '(' . $this->getCode() . ') ' . $message . "\n" . 'in ' . $file . ' around line ' . $line . '.';
        }
        if (\true === $previous && null !== ($previous = $this->getPreviousThrow())) {
            $out .= "\n\n" . '    ⬇' . "\n\n" . 'Nested exception (' . \get_class($previous) . '):' . "\n" . ($previous instanceof self ? $previous->raise(\true) : $previous->getMessage());
        }
        return $out;
    }
    /**
     * Catch uncaught exception (only \Hoa\Exception\Idle and children).
     *
     * @param   \Throwable  $exception    The exception.
     * @return  void
     * @throws  \Throwable
     */
    public static function uncaught($exception)
    {
        if (!$exception instanceof self) {
            throw $exception;
        }
        while (0 < \ob_get_level()) {
            \ob_end_flush();
        }
        echo 'Uncaught exception (' . \get_class($exception) . '):' . "\n" . $exception->raise(\true);
        return;
    }
    /**
     * String representation of object.
     *
     * @return  string
     */
    public function __toString()
    {
        return $this->raise();
    }
    /**
     * Enable uncaught exception handler.
     * This is restricted to Hoa's exceptions only.
     *
     * @param   bool  $enable    Enable.
     * @return  mixed
     */
    public static function enableUncaughtHandler($enable = \true)
    {
        if (\false === $enable) {
            return \restore_exception_handler();
        }
        return \set_exception_handler(function ($exception) {
            return self::uncaught($exception);
        });
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Exception;

/**
 * Class \Hoa\Exception\Group.
 *
 * This is an exception that contains a group of exceptions.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Group extends \Hoa\Exception\Exception implements \ArrayAccess, \IteratorAggregate, \Countable
{
    /**
     * All exceptions (stored in a stack for transactions).
     *
     * @var \SplStack
     */
    protected $_group = null;
    /**
     * Create an exception.
     *
     * @param   string      $message      Formatted message.
     * @param   int         $code         Code (the ID).
     * @param   array       $arguments    Arguments to format message.
     * @param   \Exception  $previous     Previous exception in chaining.
     */
    public function __construct($message, $code = 0, $arguments = [], \Exception $previous = null)
    {
        parent::__construct($message, $code, $arguments, $previous);
        $this->_group = new \SplStack();
        $this->beginTransaction();
        return;
    }
    /**
     * Raise an exception as a string.
     *
     * @param   bool    $previous    Whether raise previous exception if exists.
     * @return  string
     */
    public function raise($previous = \false)
    {
        $out = parent::raise($previous);
        if (0 >= \count($this)) {
            return $out;
        }
        $out .= "\n\n" . 'Contains the following exceptions:';
        foreach ($this as $exception) {
            $out .= "\n\n" . '  • ' . \str_replace("\n", "\n" . '    ', $exception->raise($previous));
        }
        return $out;
    }
    /**
     * Begin a transaction.
     *
     * @return  \Hoa\Exception\Group
     */
    public function beginTransaction()
    {
        $this->_group->push(new \ArrayObject());
        return $this;
    }
    /**
     * Rollback a transaction.
     *
     * @return  \Hoa\Exception\Group
     */
    public function rollbackTransaction()
    {
        if (1 >= \count($this->_group)) {
            return $this;
        }
        $this->_group->pop();
        return $this;
    }
    /**
     * Commit a transaction.
     *
     * @return  \Hoa\Exception\Group
     */
    public function commitTransaction()
    {
        if (\false === $this->hasUncommittedExceptions()) {
            $this->_group->pop();
            return $this;
        }
        foreach ($this->_group->pop() as $index => $exception) {
            $this[$index] = $exception;
        }
        return $this;
    }
    /**
     * Check if there is uncommitted exceptions.
     *
     * @return  bool
     */
    public function hasUncommittedExceptions()
    {
        return 1 < \count($this->_group) && 0 < \count($this->_group->top());
    }
    /**
     * Check if an index in the group exists.
     *
     * @param   mixed  $index    Index.
     * @return  bool
     */
    public function offsetExists($index)
    {
        foreach ($this->_group as $group) {
            if (isset($group[$index])) {
                return \true;
            }
        }
        return \false;
    }
    /**
     * Get an exception from the group.
     *
     * @param   mixed  $index    Index.
     * @return  Exception
     */
    public function offsetGet($index)
    {
        foreach ($this->_group as $group) {
            if (isset($group[$index])) {
                return $group[$index];
            }
        }
        return null;
    }
    /**
     * Set an exception in the group.
     *
     * @param   mixed       $index        Index.
     * @param   Exception  $exception    Exception.
     * @return  void
     */
    public function offsetSet($index, $exception)
    {
        if (!$exception instanceof \Exception) {
            return null;
        }
        $group = $this->_group->top();
        if (null === $index || \true === \is_int($index)) {
            $group[] = $exception;
        } else {
            $group[$index] = $exception;
        }
        return;
    }
    /**
     * Remove an exception in the group.
     *
     * @param   mixed  $index    Index.
     * @return  void
     */
    public function offsetUnset($index)
    {
        foreach ($this->_group as $group) {
            if (isset($group[$index])) {
                unset($group[$index]);
            }
        }
        return;
    }
    /**
     * Get committed exceptions in the group.
     *
     * @return  \ArrayObject
     */
    public function getExceptions()
    {
        return $this->_group->bottom();
    }
    /**
     * Get an iterator over all exceptions (committed or not).
     *
     * @return  \ArrayIterator
     */
    public function getIterator()
    {
        return $this->getExceptions()->getIterator();
    }
    /**
     * Count the number of committed exceptions.
     *
     * @return  int
     */
    public function count()
    {
        return \count($this->getExceptions());
    }
    /**
     * Count the stack size, i.e. the number of opened transactions.
     *
     * @return  int
     */
    public function getStackSize()
    {
        return \count($this->_group);
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Exception;

/**
 * Class \Hoa\Exception\Error.
 *
 * This exception is the equivalent representation of PHP errors.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Error extends \Hoa\Exception\Exception
{
    /**
     * Constructor.
     *
     * @param   string  $message    Message.
     * @param   int     $code       Code (the ID).
     * @param   string  $file       File.
     * @param   int     $line       Line.
     * @param   array   $trace      Trace.
     */
    public function __construct($message, $code, $file, $line, array $trace = [])
    {
        $this->file = $file;
        $this->line = $line;
        $this->_trace = $trace;
        parent::__construct($message, $code);
        return;
    }
    /**
     * Enable error handler: Transform PHP error into `\Hoa\Exception\Error`.
     *
     * @param   bool  $enable    Enable.
     * @return  mixed
     */
    public static function enableErrorHandler($enable = \true)
    {
        if (\false === $enable) {
            return \restore_error_handler();
        }
        return \set_error_handler(function ($no, $str, $file = null, $line = null, $ctx = null) {
            if (0 === ($no & \error_reporting())) {
                return;
            }
            $trace = \debug_backtrace();
            \array_shift($trace);
            \array_shift($trace);
            throw new \Hoa\Exception\Error($str, $no, $file, $line, $trace);
        });
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Exception;

use Hoa\Consistency;
use Hoa\Event;
/**
 * Class \Hoa\Exception\Exception.
 *
 * Each exception must extend \Hoa\Exception\Exception.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Exception extends \Hoa\Exception\Idle implements Event\Source
{
    /**
     * Create an exception.
     * An exception is built with a formatted message, a code (an ID), and an
     * array that contains the list of formatted string for the message. If
     * chaining, we can add a previous exception.
     *
     * @param   string      $message      Formatted message.
     * @param   int         $code         Code (the ID).
     * @param   array       $arguments    Arguments to format message.
     * @param   \Throwable  $previous     Previous exception in chaining.
     */
    public function __construct($message, $code = 0, $arguments = [], $previous = null)
    {
        parent::__construct($message, $code, $arguments, $previous);
        if (\false === Event::eventExists('hoa://Event/Exception')) {
            Event::register('hoa://Event/Exception', __CLASS__);
        }
        $this->send();
        return;
    }
    /**
     * Send the exception on hoa://Event/Exception.
     *
     * @return  void
     */
    public function send()
    {
        Event::notify('hoa://Event/Exception', $this, new Event\Bucket($this));
        return;
    }
}
/**
 * Flex entity.
 */
Consistency::flexEntity('Hoa\\Exception\\Exception');
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Consistency;

/**
 * Class Hoa\Consistency\Consistency.
 *
 * This class is a collection of tools to ensure foreward and backward
 * compatibility.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Consistency
{
    /**
     * Check if an entity exists (class, interface, trait…).
     *
     * @param   string  $entityName    Entity name.
     * @param   bool    $autoloader    Run autoloader if necessary.
     * @return  bool
     */
    public static function entityExists($entityName, $autoloader = \false)
    {
        return \class_exists($entityName, $autoloader) || \interface_exists($entityName, \false) || \trait_exists($entityName, \false);
    }
    /**
     * Get the shortest name for an entity.
     *
     * @param   string  $entityName    Entity name.
     * @return  string
     */
    public static function getEntityShortestName($entityName)
    {
        $parts = \explode('\\', $entityName);
        $count = \count($parts);
        if (1 >= $count) {
            return $entityName;
        }
        if ($parts[$count - 2] === $parts[$count - 1]) {
            return \implode('\\', \array_slice($parts, 0, -1));
        }
        return $entityName;
    }
    /**
     * Declare a flex entity (for nested library).
     *
     * @param   string  $entityName    Entity name.
     * @return  bool
     */
    public static function flexEntity($entityName)
    {
        return \class_alias($entityName, static::getEntityShortestName($entityName), \false);
    }
    /**
     * Whether a word is reserved or not.
     *
     * @param   string  $word    Word.
     * @return  bool
     */
    public static function isKeyword($word)
    {
        static $_list = [
            // PHP keywords.
            '__halt_compiler',
            'abstract',
            'and',
            'array',
            'as',
            'bool',
            'break',
            'callable',
            'case',
            'catch',
            'class',
            'clone',
            'const',
            'continue',
            'declare',
            'default',
            'die',
            'do',
            'echo',
            'else',
            'elseif',
            'empty',
            'enddeclare',
            'endfor',
            'endforeach',
            'endif',
            'endswitch',
            'endwhile',
            'eval',
            'exit',
            'extends',
            'false',
            'final',
            'float',
            'for',
            'foreach',
            'function',
            'global',
            'goto',
            'if',
            'implements',
            'include',
            'include_once',
            'instanceof',
            'insteadof',
            'int',
            'interface',
            'isset',
            'list',
            'mixed',
            'namespace',
            'new',
            'null',
            'numeric',
            'object',
            'or',
            'print',
            'private',
            'protected',
            'public',
            'require',
            'require_once',
            'resource',
            'return',
            'static',
            'string',
            'switch',
            'throw',
            'trait',
            'true',
            'try',
            'unset',
            'use',
            'var',
            'void',
            'while',
            'xor',
            'yield',
            // Compile-time constants.
            '__class__',
            '__dir__',
            '__file__',
            '__function__',
            '__line__',
            '__method__',
            '__namespace__',
            '__trait__',
        ];
        return \in_array(\strtolower($word), $_list);
    }
    /**
     * Whether an ID is a valid PHP identifier.
     *
     * @param   string  $id    ID.
     * @return  bool
     */
    public static function isIdentifier($id)
    {
        return 0 !== \preg_match('#^[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x80-\\xff]*$#', $id);
    }
    /**
     * Register a register shutdown function.
     * It may be analogous to a super static destructor.
     *
     * @param   callable  $callable    Callable.
     * @return  bool
     */
    public static function registerShutdownFunction($callable)
    {
        return \register_shutdown_function($callable);
    }
    /**
     * Get PHP executable.
     *
     * @return  string
     */
    public static function getPHPBinary()
    {
        if (\defined('PHP_BINARY')) {
            return \PHP_BINARY;
        }
        if (isset($_SERVER['_'])) {
            return $_SERVER['_'];
        }
        foreach (['', '.exe'] as $extension) {
            if (\file_exists($_ = \PHP_BINDIR . DS . 'php' . $extension)) {
                return \realpath($_);
            }
        }
        return null;
    }
    /**
     * Generate an Universal Unique Identifier (UUID).
     *
     * @return  string
     */
    public static function uuid()
    {
        return \sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', \mt_rand(0, 0xffff), \mt_rand(0, 0xffff), \mt_rand(0, 0xffff), \mt_rand(0, 0xfff) | 0x4000, \mt_rand(0, 0x3fff) | 0x8000, \mt_rand(0, 0xffff), \mt_rand(0, 0xffff), \mt_rand(0, 0xffff));
    }
}
namespace _PHPStan_dcc7b7cff;

if (70000 > \PHP_VERSION_ID && \false === \interface_exists('Throwable', \false)) {
    /**
     * Implement a fake Throwable class, introduced in PHP7.0.
     */
    interface Throwable
    {
        public function getMessage();
        public function getCode();
        public function getFile();
        public function getLine();
        public function getTrace();
        public function getPrevious();
        public function getTraceAsString();
        public function __toString();
    }
}
/**
 * Define TLSv* constants, introduced in PHP 5.5.
 */
if (50600 > \PHP_VERSION_ID) {
    $define = function ($constantName, $constantValue, $case = \false) {
        if (!\defined($constantName)) {
            return \define($constantName, $constantValue, $case);
        }
        return \false;
    };
    $define('STREAM_CRYPTO_METHOD_TLSv1_0_SERVER', 8);
    $define('STREAM_CRYPTO_METHOD_TLSv1_1_SERVER', 16);
    $define('STREAM_CRYPTO_METHOD_TLSv1_2_SERVER', 32);
    $define('STREAM_CRYPTO_METHOD_ANY_SERVER', 62);
    $define('STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT', 9);
    $define('STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT', 17);
    $define('STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT', 33);
    $define('STREAM_CRYPTO_METHOD_ANY_CLIENT', 63);
}
/**
 * Flex entity.
 */
\Hoa\Consistency\Consistency::flexEntity('Hoa\\Consistency\\Consistency');
This file was automatically generated by Composer Patches (https://github.com/cweagans/composer-patches)
Patches applied to this directory:

0
Source: patches/Consistency.patch


<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Consistency;

/**
 * Class Hoa\Consistency\Autoloader.
 *
 * This class is a PSR-4 compliant autoloader.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Autoloader
{
    /**
     * Namespace prefixes to base directories.
     *
     * @var array
     */
    protected $_namespacePrefixesToBaseDirectories = [];
    /**
     * Add a base directory for a namespace prefix.
     *
     * @param   string  $prefix           Namespace prefix.
     * @param   string  $baseDirectory    Base directory for this prefix.
     * @param   bool    $prepend          Whether the prefix is prepended or
     *                                    appended to the prefix' stack.
     * @return  void
     */
    public function addNamespace($prefix, $baseDirectory, $prepend = \false)
    {
        $prefix = \trim($prefix, '\\') . '\\';
        $baseDirectory = \rtrim($baseDirectory, \DIRECTORY_SEPARATOR) . \DIRECTORY_SEPARATOR;
        if (\false === isset($this->_namespacePrefixesToBaseDirectories[$prefix])) {
            $this->_namespacePrefixesToBaseDirectories[$prefix] = [];
        }
        if (\true === $prepend) {
            \array_unshift($this->_namespacePrefixesToBaseDirectories[$prefix], $baseDirectory);
        } else {
            \array_push($this->_namespacePrefixesToBaseDirectories[$prefix], $baseDirectory);
        }
        return;
    }
    /**
     * Try to load the entity file for a given entity name.
     *
     * @param   string  $entity    Entity name to load.
     * @return  bool
     */
    public function load($entity)
    {
        $entityPrefix = $entity;
        $hasBaseDirectory = \false;
        while (\false !== ($pos = \strrpos($entityPrefix, '\\'))) {
            $currentEntityPrefix = \substr($entity, 0, $pos + 1);
            $entityPrefix = \rtrim($currentEntityPrefix, '\\');
            $entitySuffix = \substr($entity, $pos + 1);
            $entitySuffixAsPath = \str_replace('\\', '/', $entitySuffix);
            if (\false === $this->hasBaseDirectory($currentEntityPrefix)) {
                continue;
            }
            $hasBaseDirectory = \true;
            foreach ($this->getBaseDirectories($currentEntityPrefix) as $baseDirectory) {
                $file = $baseDirectory . $entitySuffixAsPath . '.php';
                if (\false !== $this->requireFile($file)) {
                    return $file;
                }
            }
        }
        if (\true === $hasBaseDirectory && $entity === \Hoa\Consistency\Consistency::getEntityShortestName($entity) && \false !== ($pos = \strrpos($entity, '\\'))) {
            return $this->runAutoloaderStack($entity . '\\' . \substr($entity, $pos + 1));
        }
        return null;
    }
    /**
     * Require a file if exists.
     *
     * @param   string  $filename    File name.
     * @return  bool
     */
    public function requireFile($filename)
    {
        if (\false === \file_exists($filename)) {
            return \false;
        }
        require $filename;
        return \true;
    }
    /**
     * Check whether at least one base directory exists for a namespace prefix.
     *
     * @param   string  $namespacePrefix    Namespace prefix.
     * @return  bool
     */
    public function hasBaseDirectory($namespacePrefix)
    {
        return isset($this->_namespacePrefixesToBaseDirectories[$namespacePrefix]);
    }
    /**
     * Get declared base directories for a namespace prefix.
     *
     * @param   string  $namespacePrefix    Namespace prefix.
     * @return  array
     */
    public function getBaseDirectories($namespacePrefix)
    {
        if (\false === $this->hasBaseDirectory($namespacePrefix)) {
            return [];
        }
        return $this->_namespacePrefixesToBaseDirectories[$namespacePrefix];
    }
    /**
     * Get loaded classes.
     *
     * @return  array
     */
    public static function getLoadedClasses()
    {
        return \get_declared_classes();
    }
    /**
     * Run the entire autoloader stack with a specific entity.
     *
     * @param   string  $entity    Entity name to load.
     * @return  void
     */
    public function runAutoloaderStack($entity)
    {
        return \spl_autoload_call($entity);
    }
    /**
     * Register the autoloader.
     *
     * @param   bool  $prepend    Prepend this autoloader to the stack or not.
     * @return  bool
     */
    public function register($prepend = \false)
    {
        return \spl_autoload_register([$this, 'load'], \true, $prepend);
    }
    /**
     * Unregister the autoloader.
     *
     * @return  bool
     */
    public function unregister()
    {
        return \spl_autoload_unregister([$this, 'load']);
    }
    /**
     * Get all registered autoloaders (not only from this library).
     *
     * @return  array
     */
    public function getRegisteredAutoloaders()
    {
        return \spl_autoload_functions();
    }
    /**
     * Dynamic new, a simple factory.
     * It loads and constructs a class, with provided arguments.
     *
     * @param   bool     $classname    Classname.
     * @param   array    $arguments    Arguments for the constructor.
     * @return  object
     */
    public static function dnew($classname, array $arguments = [])
    {
        $classname = \ltrim($classname, '\\');
        if (\false === \Hoa\Consistency\Consistency::entityExists($classname, \false)) {
            \spl_autoload_call($classname);
        }
        $class = new \ReflectionClass($classname);
        if (empty($arguments) || \false === $class->hasMethod('__construct')) {
            return $class->newInstance();
        }
        return $class->newInstanceArgs($arguments);
    }
}
/**
 * Autoloader.
 */
$autoloader = new \Hoa\Consistency\Autoloader();
$autoloader->addNamespace('Hoa', \dirname(__DIR__));
$autoloader->register();
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

if (false === defined('HOA')) {
    define('HOA', true);
}

if (false === defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50400) {
    throw new Exception(
        'Hoa needs at least PHP5.4 to work; you have ' . phpversion() . '.'
    );
}

require_once __DIR__ . DIRECTORY_SEPARATOR . 'Autoloader.php';
require_once __DIR__ . DIRECTORY_SEPARATOR . 'Consistency.php';

$define = function ($constantName, $constantValue, $case = false) {
    if (!defined($constantName)) {
        return define($constantName, $constantValue, $case);
    }

    return false;
};

$define('SUCCEED',        true);
$define('FAILED',         false);
$define('…',              '__hoa_core_fill');
$define('DS',             DIRECTORY_SEPARATOR);
$define('PS',             PATH_SEPARATOR);
$define('ROOT_SEPARATOR', ';');
$define('RS',             ROOT_SEPARATOR);
$define('CRLF',           "\r\n");
$define('OS_WIN',         defined('PHP_WINDOWS_VERSION_PLATFORM'));
$define('S_64_BITS',      PHP_INT_SIZE == 8);
$define('S_32_BITS',      !S_64_BITS);
$define('PHP_INT_MIN',    ~PHP_INT_MAX);
$define('PHP_FLOAT_MIN',  (float) PHP_INT_MIN);
$define('PHP_FLOAT_MAX',  (float) PHP_INT_MAX);
$define('π',              M_PI);
$define('nil',            null);
$define('_public',        1);
$define('_protected',     2);
$define('_private',       4);
$define('_static',        8);
$define('_abstract',      16);
$define('_pure',          32);
$define('_final',         64);
$define('_dynamic',       ~_static);
$define('_concrete',      ~_abstract);
$define('_overridable',   ~_final);
$define('WITH_COMPOSER',  class_exists('Composer\Autoload\ClassLoader', false) ||
                          ('cli' === PHP_SAPI &&
                          file_exists(__DIR__ . DS . '..' . DS . '..' . DS . 'autoload.php')));

/**
 * Alias of \Hoa\Consistency\Xcallable.
 *
 * @param   mixed   $call    First callable part.
 * @param   mixed   $able    Second callable part (if needed).
 * @return  mixed
 */
if (!function_exists('xcallable')) {
    function xcallable($call, $able = '')
    {
        if ($call instanceof Hoa\Consistency\Xcallable) {
            return $call;
        }

        return new Hoa\Consistency\Xcallable($call, $able);
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Consistency;

use Hoa\Event;
use Hoa\Stream;
/**
 * Class Hoa\Consistency\Xcallable.
 *
 * Build a callable object, i.e. function, class::method, object->method or
 * closure, they all have the same behaviour. This callable is an extension of
 * native PHP callable (aka callback) to integrate Hoa's structures.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Xcallable
{
    /**
     * Callback, with the PHP format.
     *
     * @var mixed
     */
    protected $_callback = null;
    /**
     * Callable hash.
     *
     * @var string
     */
    protected $_hash = null;
    /**
     * Build a callback.
     * Accepted forms:
     *     * `'function'`,
     *     * `'class::method'`,
     *     * `'class', 'method'`,
     *     * `$object, 'method'`,
     *     * `$object, ''`,
     *     * `function (…) { … }`,
     *     * `['class', 'method']`,
     *     * `[$object, 'method']`.
     *
     * @param   mixed   $call    First callable part.
     * @param   mixed   $able    Second callable part (if needed).
     */
    public function __construct($call, $able = '')
    {
        if ($call instanceof \Closure) {
            $this->_callback = $call;
            return;
        }
        if (!\is_string($able)) {
            throw new \Hoa\Consistency\Exception('Bad callback form; the able part must be a string.', 0);
        }
        if ('' === $able) {
            if (\is_string($call)) {
                if (\false === \strpos($call, '::')) {
                    if (!\function_exists($call)) {
                        throw new \Hoa\Consistency\Exception('Bad callback form; function %s does not exist.', 1, $call);
                    }
                    $this->_callback = $call;
                    return;
                }
                list($call, $able) = \explode('::', $call);
            } elseif (\is_object($call)) {
                if ($call instanceof Stream\IStream\Out) {
                    $able = null;
                } elseif (\method_exists($call, '__invoke')) {
                    $able = '__invoke';
                } else {
                    throw new \Hoa\Consistency\Exception('Bad callback form; an object but without a known ' . 'method.', 2);
                }
            } elseif (\is_array($call) && isset($call[0])) {
                if (!isset($call[1])) {
                    return $this->__construct($call[0]);
                }
                return $this->__construct($call[0], $call[1]);
            } else {
                throw new \Hoa\Consistency\Exception('Bad callback form.', 3);
            }
        }
        $this->_callback = [$call, $able];
        return;
    }
    /**
     * Call the callable.
     *
     * @param   ...
     * @return  mixed
     */
    public function __invoke()
    {
        $arguments = \func_get_args();
        $valid = $this->getValidCallback($arguments);
        return \call_user_func_array($valid, $arguments);
    }
    /**
     * Distribute arguments according to an array.
     *
     * @param   array  $arguments    Arguments.
     * @return  mixed
     */
    public function distributeArguments(array $arguments)
    {
        return \call_user_func_array([$this, '__invoke'], $arguments);
    }
    /**
     * Get a valid callback in the PHP meaning.
     *
     * @param   array   &$arguments    Arguments (could determine method on an
     *                                 object if not precised).
     * @return  mixed
     */
    public function getValidCallback(array &$arguments = [])
    {
        $callback = $this->_callback;
        $head = null;
        if (isset($arguments[0])) {
            $head =& $arguments[0];
        }
        // If method is undetermined, we find it (we understand event bucket and
        // stream).
        if (null !== $head && \is_array($callback) && null === $callback[1]) {
            if ($head instanceof Event\Bucket) {
                $head = $head->getData();
            }
            switch ($type = \gettype($head)) {
                case 'string':
                    if (1 === \strlen($head)) {
                        $method = 'writeCharacter';
                    } else {
                        $method = 'writeString';
                    }
                    break;
                case 'boolean':
                case 'integer':
                case 'array':
                    $method = 'write' . \ucfirst($type);
                    break;
                case 'double':
                    $method = 'writeFloat';
                    break;
                default:
                    $method = 'writeAll';
                    $head = $head . "\n";
            }
            $callback[1] = $method;
        }
        return $callback;
    }
    /**
     * Get hash.
     * Will produce:
     *     * function#…;
     *     * class#…::…;
     *     * object(…)#…::…;
     *     * closure(…).
     *
     * @return  string
     */
    public function getHash()
    {
        if (null !== $this->_hash) {
            return $this->_hash;
        }
        $_ =& $this->_callback;
        if (\is_string($_)) {
            return $this->_hash = 'function#' . $_;
        }
        if (\is_array($_)) {
            return $this->_hash = (\is_object($_[0]) ? 'object(' . \spl_object_hash($_[0]) . ')' . '#' . \get_class($_[0]) : 'class#' . $_[0]) . '::' . (null !== $_[1] ? $_[1] : '???');
        }
        return $this->_hash = 'closure(' . \spl_object_hash($_) . ')';
    }
    /**
     * Get appropriated reflection instance.
     *
     * @param   ...
     * @return  \Reflector
     */
    public function getReflection()
    {
        $arguments = \func_get_args();
        $valid = $this->getValidCallback($arguments);
        if (\is_string($valid)) {
            return new \ReflectionFunction($valid);
        }
        if ($valid instanceof \Closure) {
            return new \ReflectionFunction($valid);
        }
        if (\is_array($valid)) {
            if (\is_string($valid[0])) {
                if (\false === \method_exists($valid[0], $valid[1])) {
                    return new \ReflectionClass($valid[0]);
                }
                return new \ReflectionMethod($valid[0], $valid[1]);
            }
            $object = new \ReflectionObject($valid[0]);
            if (null === $valid[1]) {
                return $object;
            }
            return $object->getMethod($valid[1]);
        }
    }
    /**
     * Return the hash.
     *
     * @return  string
     */
    public function __toString()
    {
        return $this->getHash();
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Consistency;

use Hoa\Exception as HoaException;
/**
 * Class \Hoa\Consistency\Exception.
 *
 * Extending the \Hoa\Exception\Exception class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Exception extends HoaException
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Visitor;

/**
 * Interface \Hoa\Visitor\Visit.
 *
 * Visitor interface.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
interface Visit
{
    /**
     * Visit an element.
     *
     * @param   \Hoa\Visitor\Element  $element    Element to visit.
     * @param   mixed                 &$handle    Handle (reference).
     * @param   mixed                 $eldnah     Handle (not reference).
     * @return  mixed
     */
    public function visit(\Hoa\Visitor\Element $element, &$handle = null, $eldnah = null);
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Visitor;

/**
 * Interface \Hoa\Visitor\Element.
 *
 * Interface to visit an element.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
interface Element
{
    /**
     * Accept a visitor.
     *
     * @param   \Hoa\Visitor\Visit  $visitor    Visitor.
     * @param   mixed               &$handle    Handle (refence).
     * @param   mixed               $eldnah     Handle (no reference).
     * @return  mixed
     */
    public function accept(\Hoa\Visitor\Visit $visitor, &$handle = null, $eldnah = null);
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Ustring;

/**
 * Class \Hoa\Ustring\Search.
 *
 * Some algorithms about search in strings.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Search
{
    /**
     * Search by approximated patterns, with k differences based upon the
     * principle diagonal monotony.
     *
     * @param   string  $y    Haystack.
     * @param   string  $x    Needle.
     * @param   int     $k    Number of differences.
     * @return  array
     */
    public static function approximated($y, $x, $k)
    {
        $x = (string) $x;
        $y = (string) $y;
        $m = \strlen($x);
        $n = \strlen($y);
        $offset = [];
        $L = [-1 => \array_fill(-1, $n - $m + $k + 3, -2)];
        for ($q = 0, $max = $k - 1; $q <= $max; ++$q) {
            $L[$q][-$q - 1] = $L[$q][-$q - 2] = $q - 1;
        }
        for ($q = 0; $q <= $k; ++$q) {
            for ($d = -$q, $max = $n - $m + $k - $q; $d <= $max; ++$d) {
                $l = \min(\max($L[$q - 1][$d - 1], $L[$q - 1][$d] + 1, $L[$q - 1][$d + 1] + 1), $m - 1);
                $a = \substr($x, $l + 1, $m - $l);
                $b = \substr($y, $l + 1 + $d, $n - $l - $d);
                $L[$q][$d] = $l + static::lcp($a, $b);
                if ($L[$q][$d] == $m - 1 || $d + $L[$q][$d] == $n - 1) {
                    $j = $m + $d;
                    $i = \max(0, $j - $m);
                    $offset[$q][] = ['i' => $i, 'j' => $j, 'l' => $j - $i];
                }
            }
        }
        return empty($offset) ? $offset : $offset[$k];
    }
    /**
     * Length of the longest common prefixes.
     *
     * @param   string  $x    Word.
     * @param   string  $y    Word.
     * @return  int
     */
    public static function lcp($x, $y)
    {
        $max = \min(\strlen($x), \strlen($y));
        $i = 0;
        while ($i < $max && $x[$i] == $y[$i]) {
            ++$i;
        }
        return $i;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Ustring;

use Hoa\Consistency;
/**
 * Class \Hoa\Ustring.
 *
 * This class represents a UTF-8 string.
 * Please, see:
 *     • http://www.ietf.org/rfc/rfc3454.txt;
 *     • http://unicode.org/reports/tr9/;
 *     • http://www.unicode.org/Public/6.0.0/ucd/UnicodeData.txt.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Ustring implements \ArrayAccess, \Countable, \IteratorAggregate
{
    /**
     * Left-To-Right.
     *
     * @const int
     */
    const LTR = 0;
    /**
     * Right-To-Left.
     *
     * @const int
     */
    const RTL = 1;
    /**
     * ZERO WIDTH NON-BREAKING SPACE (ZWNPBSP, aka byte-order mark, BOM).
     *
     * @const int
     */
    const BOM = 0xfeff;
    /**
     * LEFT-TO-RIGHT MARK.
     *
     * @const int
     */
    const LRM = 0x200e;
    /**
     * RIGHT-TO-LEFT MARK.
     *
     * @const int
     */
    const RLM = 0x200f;
    /**
     * LEFT-TO-RIGHT EMBEDDING.
     *
     * @const int
     */
    const LRE = 0x202a;
    /**
     * RIGHT-TO-LEFT EMBEDDING.
     *
     * @const int
     */
    const RLE = 0x202b;
    /**
     * POP DIRECTIONAL FORMATTING.
     *
     * @const int
     */
    const PDF = 0x202c;
    /**
     * LEFT-TO-RIGHT OVERRIDE.
     *
     * @const int
     */
    const LRO = 0x202d;
    /**
     * RIGHT-TO-LEFT OVERRIDE.
     *
     * @const int
     */
    const RLO = 0x202e;
    /**
     * Represent the beginning of the string.
     *
     * @const int
     */
    const BEGINNING = 1;
    /**
     * Represent the end of the string.
     *
     * @const int
     */
    const END = 2;
    /**
     * Split: non-empty pieces is returned.
     *
     * @const int
     */
    const WITHOUT_EMPTY = \PREG_SPLIT_NO_EMPTY;
    /**
     * Split: parenthesized expression in the delimiter pattern will be captured
     * and returned.
     *
     * @const int
     */
    const WITH_DELIMITERS = \PREG_SPLIT_DELIM_CAPTURE;
    /**
     * Split: offsets of captures will be returned.
     *
     * @const int
     */
    const WITH_OFFSET = 260;
    //   PREG_OFFSET_CAPTURE
    // | PREG_SPLIT_OFFSET_CAPTURE
    /**
     * Group results by patterns.
     *
     * @const int
     */
    const GROUP_BY_PATTERN = \PREG_PATTERN_ORDER;
    /**
     * Group results by tuple (set of patterns).
     *
     * @const int
     */
    const GROUP_BY_TUPLE = \PREG_SET_ORDER;
    /**
     * Current string.
     *
     * @var string
     */
    protected $_string = null;
    /**
     * Direction. Please see self::LTR and self::RTL constants.
     *
     * @var int
     */
    protected $_direction = null;
    /**
     * Collator.
     *
     * @var \Collator
     */
    protected static $_collator = null;
    /**
     * Construct a UTF-8 string.
     *
     * @param   string  $string    String.
     */
    public function __construct($string = null)
    {
        if (null !== $string) {
            $this->append($string);
        }
        return;
    }
    /**
     * Check if ext/mbstring is available.
     *
     * @return  bool
     */
    public static function checkMbString()
    {
        return \function_exists('mb_substr');
    }
    /**
     * Check if ext/iconv is available.
     *
     * @return  bool
     */
    public static function checkIconv()
    {
        return \function_exists('iconv');
    }
    /**
     * Append a substring to the current string, i.e. add to the end.
     *
     * @param   string  $substring    Substring to append.
     * @return  \Hoa\Ustring
     */
    public function append($substring)
    {
        $this->_string .= $substring;
        return $this;
    }
    /**
     * Prepend a substring to the current string, i.e. add to the start.
     *
     * @param   string  $substring    Substring to append.
     * @return  \Hoa\Ustring
     */
    public function prepend($substring)
    {
        $this->_string = $substring . $this->_string;
        return $this;
    }
    /**
     * Pad the current string to a certain length with another piece, aka piece.
     *
     * @param   int     $length    Length.
     * @param   string  $piece     Piece.
     * @param   int     $side      Whether we append at the end or the beginning
     *                             of the current string.
     * @return  \Hoa\Ustring
     */
    public function pad($length, $piece, $side = self::END)
    {
        $difference = $length - $this->count();
        if (0 >= $difference) {
            return $this;
        }
        $handle = null;
        for ($i = $difference / \mb_strlen($piece) - 1; $i >= 0; --$i) {
            $handle .= $piece;
        }
        $handle .= \mb_substr($piece, 0, $difference - \mb_strlen($handle));
        return static::END === $side ? $this->append($handle) : $this->prepend($handle);
    }
    /**
     * Make a comparison with a string.
     * Return < 0 if current string is less than $string, > 0 if greater and 0
     * if equal.
     *
     * @param   mixed  $string    String.
     * @return  int
     */
    public function compare($string)
    {
        if (null === ($collator = static::getCollator())) {
            return \strcmp($this->_string, (string) $string);
        }
        return $collator->compare($this->_string, $string);
    }
    /**
     * Get collator.
     *
     * @return  \Collator
     */
    public static function getCollator()
    {
        if (\false === \class_exists('Collator')) {
            return null;
        }
        if (null === static::$_collator) {
            static::$_collator = new \Collator(\setlocale(\LC_COLLATE, null));
        }
        return static::$_collator;
    }
    /**
     * Ensure that the pattern is safe for Unicode: add the “u” option.
     *
     * @param   string  $pattern    Pattern.
     * @return  string
     */
    public static function safePattern($pattern)
    {
        $delimiter = \mb_substr($pattern, 0, 1);
        $options = \mb_substr(\mb_strrchr($pattern, $delimiter, \false), \mb_strlen($delimiter));
        if (\false === \strpos($options, 'u')) {
            $pattern .= 'u';
        }
        return $pattern;
    }
    /**
     * Perform a regular expression (PCRE) match.
     *
     * @param   string  $pattern    Pattern.
     * @param   array   $matches    Matches.
     * @param   int     $flags      Please, see constants self::WITH_OFFSET,
     *                              self::GROUP_BY_PATTERN and
     *                              self::GROUP_BY_TUPLE.
     * @param   int     $offset     Alternate place from which to start the
     *                              search.
     * @param   bool    $global     Whether the match is global or not.
     * @return  int
     */
    public function match($pattern, &$matches = null, $flags = 0, $offset = 0, $global = \false)
    {
        $pattern = static::safePattern($pattern);
        if (0 === $flags) {
            if (\true === $global) {
                $flags = static::GROUP_BY_PATTERN;
            }
        } else {
            $flags &= ~\PREG_SPLIT_OFFSET_CAPTURE;
        }
        $offset = \strlen(\mb_substr($this->_string, 0, $offset));
        if (\true === $global) {
            return \preg_match_all($pattern, $this->_string, $matches, $flags, $offset);
        }
        return \preg_match($pattern, $this->_string, $matches, $flags, $offset);
    }
    /**
     * Perform a regular expression (PCRE) search and replace.
     *
     * @param   mixed   $pattern        Pattern(s).
     * @param   mixed   $replacement    Replacement(s) (please, see
     *                                  preg_replace() documentation).
     * @param   int     $limit          Maximum of replacements. -1 for unbound.
     * @return  \Hoa\Ustring
     */
    public function replace($pattern, $replacement, $limit = -1)
    {
        $pattern = static::safePattern($pattern);
        if (\false === \is_callable($replacement)) {
            $this->_string = \preg_replace($pattern, $replacement, $this->_string, $limit);
        } else {
            $this->_string = \preg_replace_callback($pattern, $replacement, $this->_string, $limit);
        }
        return $this;
    }
    /**
     * Split the current string according to a given pattern (PCRE).
     *
     * @param   string  $pattern    Pattern (as a regular expression).
     * @param   int     $limit      Maximum of split. -1 for unbound.
     * @param   int     $flags      Please, see constants self::WITHOUT_EMPTY,
     *                              self::WITH_DELIMITERS, self::WITH_OFFSET.
     * @return  array
     */
    public function split($pattern, $limit = -1, $flags = self::WITHOUT_EMPTY)
    {
        return \preg_split(static::safePattern($pattern), $this->_string, $limit, $flags);
    }
    /**
     * Iterator over chars.
     *
     * @return  \ArrayIterator
     */
    public function getIterator()
    {
        return new \ArrayIterator(\preg_split('#(?<!^)(?!$)#u', $this->_string));
    }
    /**
     * Perform a lowercase folding on the current string.
     *
     * @return  \Hoa\Ustring
     */
    public function toLowerCase()
    {
        $this->_string = \mb_strtolower($this->_string);
        return $this;
    }
    /**
     * Perform an uppercase folding on the current string.
     *
     * @return  \Hoa\Ustring
     */
    public function toUpperCase()
    {
        $this->_string = \mb_strtoupper($this->_string);
        return $this;
    }
    /**
     * Transform a UTF-8 string into an ASCII one.
     * First, try with a transliterator. If not available, will fallback to a
     * normalizer. If not available, will try something homemade.
     *
     * @param   bool  $try    Try something if \Normalizer is not present.
     * @return  \Hoa\Ustring
     * @throws  \Hoa\Ustring\Exception
     */
    public function toAscii($try = \false)
    {
        if (0 === \preg_match('#[\\x80-\\xff]#', $this->_string)) {
            return $this;
        }
        $string = $this->_string;
        $transId = 'Any-Latin; ' . '[\\p{S}] Name; ' . 'Latin-ASCII';
        if (null !== ($transliterator = static::getTransliterator($transId))) {
            $this->_string = \preg_replace_callback('#\\\\N\\{([A-Z ]+)\\}#u', function (array $matches) {
                return '(' . \strtolower($matches[1]) . ')';
            }, $transliterator->transliterate($string));
            return $this;
        }
        if (\false === \class_exists('Normalizer')) {
            if (\false === $try) {
                throw new \Hoa\Ustring\Exception('%s needs the class Normalizer to work properly, ' . 'or you can force a try by using %1$s(true).', 0, __METHOD__);
            }
            $string = static::transcode($string, 'UTF-8', 'ASCII//IGNORE//TRANSLIT');
            $this->_string = \preg_replace('#(?:[\'"`^](\\w))#u', '\\1', $string);
            return $this;
        }
        $string = \Normalizer::normalize($string, \Normalizer::NFKD);
        $string = \preg_replace('#\\p{Mn}+#u', '', $string);
        $this->_string = static::transcode($string, 'UTF-8', 'ASCII//IGNORE//TRANSLIT');
        return $this;
    }
    /**
     * Transliterate the string into another.
     * See self::getTransliterator for more information.
     *
     * @param   string  $identifier    Identifier.
     * @param   int     $start         Start.
     * @param   int     $end           End.
     * @return  \Hoa\Ustring
     * @throws  \Hoa\Ustring\Exception
     */
    public function transliterate($identifier, $start = 0, $end = null)
    {
        if (null === ($transliterator = static::getTransliterator($identifier))) {
            throw new \Hoa\Ustring\Exception('%s needs the class Transliterator to work properly.', 1, __METHOD__);
        }
        $this->_string = $transliterator->transliterate($this->_string, $start, $end);
        return $this;
    }
    /**
     * Get transliterator.
     * See http://userguide.icu-project.org/transforms/general for $identifier.
     *
     * @param   string  $identifier    Identifier.
     * @return  \Transliterator
     */
    public static function getTransliterator($identifier)
    {
        if (\false === \class_exists('Transliterator')) {
            return null;
        }
        return \Transliterator::create($identifier);
    }
    /**
     * Strip characters (default \s) of the current string.
     *
     * @param   string  $regex    Characters to remove.
     * @param   int     $side     Whether we trim the beginning, the end or both
     *                            sides, of the current string.
     * @return  \Hoa\Ustring
     */
    public function trim($regex = '\\s', $side = 3)
    {
        $regex = '(?:' . $regex . ')+';
        $handle = null;
        if (0 !== ($side & static::BEGINNING)) {
            $handle .= '(^' . $regex . ')';
        }
        if (0 !== ($side & static::END)) {
            if (null !== $handle) {
                $handle .= '|';
            }
            $handle .= '(' . $regex . '$)';
        }
        $this->_string = \preg_replace('#' . $handle . '#u', '', $this->_string);
        $this->_direction = null;
        return $this;
    }
    /**
     * Compute offset (negative, unbound etc.).
     *
     * @param   int        $offset    Offset.
     * @return  int
     */
    protected function computeOffset($offset)
    {
        $length = \mb_strlen($this->_string);
        if (0 > $offset) {
            $offset = -$offset % $length;
            if (0 !== $offset) {
                $offset = $length - $offset;
            }
        } elseif ($offset >= $length) {
            $offset %= $length;
        }
        return $offset;
    }
    /**
     * Get a specific chars of the current string.
     *
     * @param   int     $offset    Offset (can be negative and unbound).
     * @return  string
     */
    public function offsetGet($offset)
    {
        return \mb_substr($this->_string, $this->computeOffset($offset), 1);
    }
    /**
     * Set a specific character of the current string.
     *
     * @param   int     $offset    Offset (can be negative and unbound).
     * @param   string  $value     Value.
     * @return  \Hoa\Ustring
     */
    public function offsetSet($offset, $value)
    {
        $head = null;
        $offset = $this->computeOffset($offset);
        if (0 < $offset) {
            $head = \mb_substr($this->_string, 0, $offset);
        }
        $tail = \mb_substr($this->_string, $offset + 1);
        $this->_string = $head . $value . $tail;
        $this->_direction = null;
        return $this;
    }
    /**
     * Delete a specific character of the current string.
     *
     * @param   int     $offset    Offset (can be negative and unbound).
     * @return  string
     */
    public function offsetUnset($offset)
    {
        return $this->offsetSet($offset, null);
    }
    /**
     * Check if a specific offset exists.
     *
     * @return  bool
     */
    public function offsetExists($offset)
    {
        return \true;
    }
    /**
     * Reduce the strings.
     *
     * @param   int  $start     Position of first character.
     * @param   int  $length    Maximum number of characters.
     * @return  \Hoa\Ustring
     */
    public function reduce($start, $length = null)
    {
        $this->_string = \mb_substr($this->_string, $start, $length);
        return $this;
    }
    /**
     * Count number of characters of the current string.
     *
     * @return  int
     */
    public function count()
    {
        return \mb_strlen($this->_string);
    }
    /**
     * Get byte (not character) at a specific offset.
     *
     * @param   int     $offset    Offset (can be negative and unbound).
     * @return  string
     */
    public function getByteAt($offset)
    {
        $length = \strlen($this->_string);
        if (0 > $offset) {
            $offset = -$offset % $length;
            if (0 !== $offset) {
                $offset = $length - $offset;
            }
        } elseif ($offset >= $length) {
            $offset %= $length;
        }
        return $this->_string[$offset];
    }
    /**
     * Count number of bytes (not characters) of the current string.
     *
     * @return  int
     */
    public function getBytesLength()
    {
        return \strlen($this->_string);
    }
    /**
     * Get the width of the current string.
     * Useful when printing the string in monotype (some character need more
     * than one column to be printed).
     *
     * @return  int
     */
    public function getWidth()
    {
        return \mb_strwidth($this->_string);
    }
    /**
     * Get direction of the current string.
     * Please, see the self::LTR and self::RTL constants.
     * It does not yet support embedding directions.
     *
     * @return  int
     */
    public function getDirection()
    {
        if (null === $this->_direction) {
            if (null === $this->_string) {
                $this->_direction = static::LTR;
            } else {
                $this->_direction = static::getCharDirection(\mb_substr($this->_string, 0, 1));
            }
        }
        return $this->_direction;
    }
    /**
     * Get character of a specific character.
     * Please, see the self::LTR and self::RTL constants.
     *
     * @param   string  $char    Character.
     * @return  int
     */
    public static function getCharDirection($char)
    {
        $c = static::toCode($char);
        if (!(0x5be <= $c && 0x10b7f >= $c)) {
            return static::LTR;
        }
        if (0x85e >= $c) {
            if (0x5be === $c || 0x5c0 === $c || 0x5c3 === $c || 0x5c6 === $c || 0x5d0 <= $c && 0x5ea >= $c || 0x5f0 <= $c && 0x5f4 >= $c || 0x608 === $c || 0x60b === $c || 0x60d === $c || 0x61b === $c || 0x61e <= $c && 0x64a >= $c || 0x66d <= $c && 0x66f >= $c || 0x671 <= $c && 0x6d5 >= $c || 0x6e5 <= $c && 0x6e6 >= $c || 0x6ee <= $c && 0x6ef >= $c || 0x6fa <= $c && 0x70d >= $c || 0x710 === $c || 0x712 <= $c && 0x72f >= $c || 0x74d <= $c && 0x7a5 >= $c || 0x7b1 === $c || 0x7c0 <= $c && 0x7ea >= $c || 0x7f4 <= $c && 0x7f5 >= $c || 0x7fa === $c || 0x800 <= $c && 0x815 >= $c || 0x81a === $c || 0x824 === $c || 0x828 === $c || 0x830 <= $c && 0x83e >= $c || 0x840 <= $c && 0x858 >= $c || 0x85e === $c) {
                return static::RTL;
            }
        } elseif (0x200f === $c) {
            return static::RTL;
        } elseif (0xfb1d <= $c) {
            if (0xfb1d === $c || 0xfb1f <= $c && 0xfb28 >= $c || 0xfb2a <= $c && 0xfb36 >= $c || 0xfb38 <= $c && 0xfb3c >= $c || 0xfb3e === $c || 0xfb40 <= $c && 0xfb41 >= $c || 0xfb43 <= $c && 0xfb44 >= $c || 0xfb46 <= $c && 0xfbc1 >= $c || 0xfbd3 <= $c && 0xfd3d >= $c || 0xfd50 <= $c && 0xfd8f >= $c || 0xfd92 <= $c && 0xfdc7 >= $c || 0xfdf0 <= $c && 0xfdfc >= $c || 0xfe70 <= $c && 0xfe74 >= $c || 0xfe76 <= $c && 0xfefc >= $c || 0x10800 <= $c && 0x10805 >= $c || 0x10808 === $c || 0x1080a <= $c && 0x10835 >= $c || 0x10837 <= $c && 0x10838 >= $c || 0x1083c === $c || 0x1083f <= $c && 0x10855 >= $c || 0x10857 <= $c && 0x1085f >= $c || 0x10900 <= $c && 0x1091b >= $c || 0x10920 <= $c && 0x10939 >= $c || 0x1093f === $c || 0x10a00 === $c || 0x10a10 <= $c && 0x10a13 >= $c || 0x10a15 <= $c && 0x10a17 >= $c || 0x10a19 <= $c && 0x10a33 >= $c || 0x10a40 <= $c && 0x10a47 >= $c || 0x10a50 <= $c && 0x10a58 >= $c || 0x10a60 <= $c && 0x10a7f >= $c || 0x10b00 <= $c && 0x10b35 >= $c || 0x10b40 <= $c && 0x10b55 >= $c || 0x10b58 <= $c && 0x10b72 >= $c || 0x10b78 <= $c && 0x10b7f >= $c) {
                return static::RTL;
            }
        }
        return static::LTR;
    }
    /**
     * Get the number of column positions of a wide-character.
     *
     * This is a PHP implementation of wcwidth() and wcswidth() (defined in IEEE
     * Std 1002.1-2001) for Unicode, by Markus Kuhn. Please, see
     * http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c.
     *
     * The wcwidth(wc) function shall either return 0 (if wc is a null
     * wide-character code), or return the number of column positions to be
     * occupied by the wide-character code wc, or return -1 (if wc does not
     * correspond to a printable wide-character code).
     *
     * @param   string  $char    Character.
     * @return  int
     */
    public static function getCharWidth($char)
    {
        $char = (string) $char;
        $c = static::toCode($char);
        // Test for 8-bit control characters.
        if (0x0 === $c) {
            return 0;
        }
        if (0x20 > $c || 0x7f <= $c && $c < 0xa0) {
            return -1;
        }
        // Non-spacing characters.
        if (0xad !== $c && 0 !== \preg_match('#^[\\p{Mn}\\p{Me}\\p{Cf}\\x{1160}-\\x{11ff}\\x{200b}]#u', $char)) {
            return 0;
        }
        // If we arrive here, $c is not a combining C0/C1 control character.
        return 1 + (0x1100 <= $c && (0x115f >= $c || 0x2329 === $c || 0x232a === $c || 0x2e80 <= $c && 0xa4cf >= $c && 0x303f !== $c || 0xac00 <= $c && 0xd7a3 >= $c || 0xf900 <= $c && 0xfaff >= $c || 0xfe10 <= $c && 0xfe19 >= $c || 0xfe30 <= $c && 0xfe6f >= $c || 0xff00 <= $c && 0xff60 >= $c || 0xffe0 <= $c && 0xffe6 >= $c || 0x20000 <= $c && 0x2fffd >= $c || 0x30000 <= $c && 0x3fffd >= $c));
    }
    /**
     * Check whether the character is printable or not.
     *
     * @param   string  $char    Character.
     * @return  bool
     */
    public static function isCharPrintable($char)
    {
        return 1 <= static::getCharWidth($char);
    }
    /**
     * Get a UTF-8 character from its decimal code representation.
     *
     * @param   int  $code    Code.
     * @return  string
     */
    public static function fromCode($code)
    {
        return \mb_convert_encoding('&#x' . \dechex($code) . ';', 'UTF-8', 'HTML-ENTITIES');
    }
    /**
     * Get a decimal code representation of a specific character.
     *
     * @param   string  $char    Character.
     * @return  int
     */
    public static function toCode($char)
    {
        $char = (string) $char;
        $code = \ord($char[0]);
        $bytes = 1;
        if (!($code & 0x80)) {
            // 0xxxxxxx
            return $code;
        }
        if (($code & 0xe0) === 0xc0) {
            // 110xxxxx
            $bytes = 2;
            $code = $code & ~0xc0;
        } elseif (($code & 0xf0) == 0xe0) {
            // 1110xxxx
            $bytes = 3;
            $code = $code & ~0xe0;
        } elseif (($code & 0xf8) === 0xf0) {
            // 11110xxx
            $bytes = 4;
            $code = $code & ~0xf0;
        }
        for ($i = 2; $i <= $bytes; $i++) {
            // 10xxxxxx
            $code = ($code << 6) + (\ord($char[$i - 1]) & ~0x80);
        }
        return $code;
    }
    /**
     * Get a binary representation of a specific character.
     *
     * @param   string  $char    Character.
     * @return  string
     */
    public static function toBinaryCode($char)
    {
        $char = (string) $char;
        $out = null;
        for ($i = 0, $max = \strlen($char); $i < $max; ++$i) {
            $out .= \vsprintf('%08b', \ord($char[$i]));
        }
        return $out;
    }
    /**
     * Transcode.
     *
     * @param   string  $string    String.
     * @param   string  $from      Original encoding.
     * @param   string  $to        Final encoding.
     * @return  string
     * @throws  \Hoa\Ustring\Exception
     */
    public static function transcode($string, $from, $to = 'UTF-8')
    {
        if (\false === static::checkIconv()) {
            throw new \Hoa\Ustring\Exception('%s needs the iconv extension.', 2, __CLASS__);
        }
        return \iconv($from, $to, $string);
    }
    /**
     * Check if a string is encoded in UTF-8.
     *
     * @param   string  $string    String.
     * @return  bool
     */
    public static function isUtf8($string)
    {
        return (bool) \preg_match('##u', $string);
    }
    /**
     * Copy current object string
     *
     * @return \Hoa\Ustring
     */
    public function copy()
    {
        return clone $this;
    }
    /**
     * Transform the object as a string.
     *
     * @return  string
     */
    public function __toString()
    {
        return $this->_string;
    }
}
/**
 * Flex entity.
 */
Consistency::flexEntity('Hoa\\Ustring\\Ustring');
if (\false === \Hoa\Ustring\Ustring::checkMbString()) {
    throw new \Hoa\Ustring\Exception('%s needs the mbstring extension.', 0, __NAMESPACE__ . '\\Ustring');
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Ustring\Bin;

use Hoa\Console;
use Hoa\Ustring;
/**
 * Class Hoa\Ustring\Bin\Fromcode.
 *
 * Get a character from its code. Please, see Hoa\Ustring\Ustring::fromCode.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Fromcode extends Console\Dispatcher\Kit
{
    /**
     * Options description.
     *
     * @var array
     */
    protected $options = [['base', Console\GetOption::REQUIRED_ARGUMENT, 'b'], ['help', Console\GetOption::NO_ARGUMENT, 'h'], ['help', Console\GetOption::NO_ARGUMENT, '?']];
    /**
     * The entry method.
     *
     * @return  int
     */
    public function main()
    {
        $base = 16;
        while (\false !== ($c = $this->getOption($v))) {
            switch ($c) {
                case 'b':
                    $base = \intval($v);
                    break;
                case '__ambiguous':
                    $this->resolveOptionAmbiguity($v);
                    break;
                case 'h':
                case '?':
                default:
                    return $this->usage();
            }
        }
        $this->parser->listInputs($code);
        $char = Ustring::fromCode(\base_convert($code, $base, 10));
        echo $char;
        return;
    }
    /**
     * The command usage.
     *
     * @return  int
     */
    public function usage()
    {
        echo 'Usage   : ustring:fromcode <char>', "\n", 'Options :', "\n", $this->makeUsageOptionsList(['b' => 'Specify the base of the code (16 by default).', 'help' => 'This help.']), "\n";
        return;
    }
}
__halt_compiler();
Get a character from its code.

<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Ustring\Bin;

use Hoa\Console;
use Hoa\Ustring;
/**
 * Class Hoa\Ustring\Bin\Tocode.
 *
 * Transform a character into its code. Please, see Hoa\Ustring\Ustring::toCode.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Tocode extends Console\Dispatcher\Kit
{
    /**
     * Options description.
     *
     * @var array
     */
    protected $options = [['base', Console\GetOption::REQUIRED_ARGUMENT, 'b'], ['help', Console\GetOption::NO_ARGUMENT, 'h'], ['help', Console\GetOption::NO_ARGUMENT, '?']];
    /**
     * The entry method.
     *
     * @return  int
     */
    public function main()
    {
        $base = 16;
        while (\false !== ($c = $this->getOption($v))) {
            switch ($c) {
                case 'b':
                    $base = \intval($v);
                    break;
                case '__ambiguous':
                    $this->resolveOptionAmbiguity($v);
                    break;
                case 'h':
                case '?':
                default:
                    return $this->usage();
            }
        }
        $this->parser->listInputs($char);
        $code = \base_convert((string) Ustring::toCode($char), 10, $base);
        echo $code, "\n";
        return;
    }
    /**
     * The command usage.
     *
     * @return  int
     */
    public function usage()
    {
        echo 'Usage   : ustring:tocode <char>', "\n", 'Options :', "\n", $this->makeUsageOptionsList(['b' => 'Get the code in a specific base (16 by default).', 'help' => 'This help.']), "\n";
        return;
    }
}
__halt_compiler();
Transform a character into its code.

<?xml version="1.0" encoding="utf-8"?>

<overlay xmlns="http://hoa-project.net/xyl/xylophone">
<yield id="chapter">

  <p>Strings can sometimes be <strong>complex</strong>, especially when they use
  the <code>Unicode</code> encoding format. The <code>Hoa\Ustring</code> library
  provides several operations on UTF-8 strings.</p>

  <h2 id="Table_of_contents">Table of contents</h2>

  <tableofcontents id="main-toc" />

  <h2 id="Introduction" for="main-toc">Introduction</h2>

  <p>When we manipulate strings, the <a href="http://unicode.org/">Unicode</a>
  format establishes itself because of its <strong>compatibility</strong> with
  historical formats (like ASCII) and its capacity to understand a
  <strong>large</strong> range of characters and symbols for all cultures and
  all regions in the world. PHP provides several tools to manipulate such
  strings, like the following extensions:
  <a href="http://php.net/mbstring"><code>mbstring</code></a>,
  <a href="http://php.net/iconv"><code>iconv</code></a> or also the excellent
  <a href="http://php.net/intl"><code>intl</code></a>  which is based on
  <a href="http://icu-project.org/">ICU</a>, the reference implementation of
  Unicode. Unfortunately, sometimes we have to mix these extensions to achieve
  our aims and at the cost of a certain <strong>complexity</strong> along with
  a regrettable <strong>verbosity</strong>.</p>
  <p>The <code>Hoa\Ustring</code> library answers to these issues by providing a
  <strong>simple</strong> way to manipulate strings with
  <strong>performance</strong> and <strong>efficiency</strong> in minds. It
  also provides some evoluated algorithms to perform <strong>search</strong>
  operations on strings.</p>

  <h2 id="Unicode_strings" for="main-toc">Unicode strings</h2>

  <p>The <code>Hoa\Ustring\Ustring</code> class represents a
  <strong>UTF-8</strong> Unicode strings and allows to manipulate it easily.
  This class implements the
  <a href="http://php.net/arrayaccess"><code>ArrayAccess</code></a>,
  <a href="http://php.net/countable"><code>Countable</code></a> and
  <a href="http://php.net/iteratoraggregate"><code>IteratorAggregate</code></a>
  interfaces. We are going to use three examples in three different languages:
  French, Arab and Japanese. Thus:</p>
  <pre><code class="language-php">$french   = new Hoa\Ustring\Ustring('Je t\'aime');
$arabic   = new Hoa\Ustring\Ustring('أحبك');
$japanese = new Hoa\Ustring\Ustring('私はあなたを愛して');</code></pre>
  <p>Now, let's see what we can do on these three strings.</p>

  <h3 id="String_manipulation" for="main-toc">String manipulation</h3>

  <p>Let's start with <strong>elementary</strong> operations. If we would like
  to <strong>count</strong> the number of characters (not bytes), we will use
  the <a href="http://php.net/count"><code>count</code> function</a>. Thus:</p>
  <pre><code class="language-php">var_dump(
    count($french),
    count($arabic),
    count($japanese)
);

/**
 * Will output:
 *     int(9)
 *     int(4)
 *     int(9)
 */</code></pre>
  <p>When we speak about text position, it is not suitable to speak about the
  right or the left, but rather about a <strong>beginning</strong> or an
  <strong>end</strong>, and based on the <strong>direction</strong> of writing.
  We can know this direction thanks to the
  <code>Hoa\Ustring\Ustring::getDirection</code> method. It returns the value of
  one of the following constants:</p>
  <ul>
    <li><code>Hoa\Ustring\Ustring::LTR</code>, for left-to-right, if the text is
    written from the left to the right,</li>
    <li><code>Hoa\Ustring\Ustring::RTL</code>, for right-to-left, if the text is
    written from the right to the left.</li>
  </ul>
  <p>Let's observe the result with our examples:</p>
  <pre><code class="language-php">var_dump(
    $french->getDirection()   === Hoa\Ustring\Ustring::LTR, // is left-to-right?
    $arabic->getDirection()   === Hoa\Ustring\Ustring::RTL, // is right-to-left?
    $japanese->getDirection() === Hoa\Ustring\Ustring::LTR  // is left-to-right?
);

/**
 * Will output:
 *     bool(true)
 *     bool(true)
 *     bool(true)
 */</code></pre>
  <p>The result of this method is computed thanks to the
  <code>Hoa\Ustring\Ustring::getCharDirection</code> static method which computes
  the direction of only one character.</p>
  <p>If we would like to <strong>concatenate</strong> another string to the end
  or to the beginning, we will respectively use the
  <code>Hoa\Ustring\Ustring::append</code> and
  <code>Hoa\Ustring\Ustring::prepend</code> methods. These methods, like most of
  the ones which modifies the string, return the object itself, in order to
  chain the calls. For instance:</p>
  <pre><code class="language-php">echo $french->append('… et toi, m\'aimes-tu ?')->prepend('Mam\'zelle ! ');

/**
 * Will output:
 *     Mam'zelle ! Je t'aime… et toi, m'aimes-tu ?
 */</code></pre>
  <p>We also have the <code>Hoa\Ustring\Ustring::toLowerCase</code> and
  <code>Hoa\Ustring\Ustring::toUpperCase</code> methods to, respectively, set
  the case of the string to lower or upper. For instance:</p>
  <pre><code class="language-php">echo $french->toUpperCase();

/**
 * Will output:
 *     MAM'ZELLE ! JE T'AIME… ET TOI, M'AIMES-TU ?
 */</code></pre>
  <p>We can also add characters to the beginning or to the end of the string to
  reach a <strong>minimum</strong> length. This operation is frequently called
  the <em>padding</em> (for historical reasons dating back to typewriters).
  That's why we have the <code>Hoa\Ustring\Ustring::pad</code> method which
  takes three arguments: the minimum length, characters to add and a constant
  indicating whether we have to add at the end or at the beginning of the string
  (respectively <code>Hoa\Ustring\Ustring::END</code>, by default, and
  <code>Hoa\Ustring\Ustring::BEGINNING</code>).</p>
  <pre><code class="language-php">echo $arabic->pad(20, ' ');

/**
 * Will output:
 *                     أحبك
 */</code></pre>
  <p>A similar operation allows to remove, by default, <strong>spaces</strong>
  at the beginning and at the end of the string thanks to the
  <code>Hoa\Ustring\Ustring::trim</code> method. For example, to retreive our
  original Arabic string:</p>
  <pre><code class="language-php">echo $arabic->trim();

/**
 * Will output:
 *     أحبك
 */</code></pre>
  <p>If we would like to remove other characters, we can use its first argument
  which must be a regular expression. Finally, its second argument allows to
  specify from what side we would like to remove character: at the beginning, at
  the end or both, still by using the
  <code>Hoa\Ustring\Ustring::BEGINNING</code> and
  <code>Hoa\Ustring\Ustring::END</code> constants.</p>
  <p>If we would like to remove other characters, we can use its first argument
  which must be a regular expression. Finally, its second argument allows to
  specify the side where to remove characters: at the beginning, at the end or
  both, still by using the <code>Hoa\Ustring\Ustring::BEGINNING</code> and
  <code>Hoa\Ustring\Ustring::END</code> constants. We can combine these
  constants to express “both sides”, which is the default value:
  <code class="language-php">Hoa\Ustring\Ustring::BEGINNING |
  Hoa\Ustring\Ustring::END</code>. For example, to remove all the numbers and
  the spaces only at the end, we will write:</p>
  <pre><code class="language-php">$arabic->trim('\s|\d', Hoa\Ustring\Ustring::END);</code></pre>
  <p>We can also <strong>reduce</strong> the string to a
  <strong>sub-string</strong> by specifying the position of the first character
  followed by the length of the sub-string to the
  <code>Hoa\Ustring\Ustring::reduce</code> method:</p>
  <pre><code class="language-php">echo $french->reduce(3, 6)->reduce(2, 4);

/**
 * Will output:
 *     aime
 */</code></pre>
  <p>If we would like to get a specific character, we can rely on the
  <code>ArrayAccess</code> interface. For instance, to get the first character
  of each of our examples (from their original definitions):</p>
  <pre><code class="language-php">var_dump(
    $french[0],
    $arabic[0],
    $japanese[0]
);

/**
 * Will output:
 *     string(1) "J"
 *     string(2) "أ"
 *     string(3) "私"
 */</code></pre>
  <p>If we would like the last character, we will use the -1 index. The index is
  not bounded to the length of the string. If the index exceeds this length,
  then a <em>modulo</em> will be applied.</p>
  <p>We can also modify or remove a specific character with this method. For
  example:</p>
  <pre><code class="language-php">$french->append(' ?');
$french[-1] = '!';
echo $french;

/**
 * Will output:
 *     Je t'aime !
 */</code></pre>
  <p>Another very useful method is the <strong>ASCII</strong> transformation.
  Be careful, this is not always possible, according to your settings. For
  example:</p>
  <pre><code class="language-php">$title = new Hoa\Ustring\Ustring('Un été brûlant sur la côte');
echo $title->toAscii();

/**
 * Will output:
 *     Un ete brulant sur la cote
 */</code></pre>
  <p>We can also transform from Arabic or Japanese to ASCII. Symbols, like
  Mathemeticals symbols or emojis, are also transformed:</p>
  <pre><code class="language-php">$emoji = new Hoa\Ustring\Ustring('I ❤ Unicode');
$maths = new Hoa\Ustring\Ustring('∀ i ∈ ℕ');

echo
    $arabic->toAscii(), "\n",
    $japanese->toAscii(), "\n",
    $emoji->toAscii(), "\n",
    $maths->toAscii(), "\n";

/**
 * Will output:
 *     ahbk
 *     sihaanatawo aishite
 *     I (heavy black heart)️ Unicode
 *     (for all) i (element of) N
 */</code></pre>
  <p>In order this method to work correctly, the
  <a href="http://php.net/intl"><code>intl</code></a> extension needs to be
  present, so that the
  <a href="http://php.net/transliterator"><code>Transliterator</code></a> class
  is present. If it does not exist, the
  <a href="http://php.net/normalizer"><code>Normalizer</code></a> class must
  exist. If this class does not exist neither, the
  <code>Hoa\Ustring\Ustring::toAscii</code> method can still try a
  transformation, but it is less efficient. To activate this last solution,
  <code>true</code> must be passed as a single argument. This <em lang="fr">tour
  de force</em> is not recommended in most cases.</p>
  <p>We also find the <code>getTransliterator</code> method which returns a
  <code>Transliterator</code> object, or <code>null</code> if this class does
  not exist. This method takes a transliteration identifier as argument. We
  suggest to <a href="http://userguide.icu-project.org/transforms/general">read
  the documentation about the transliterator of ICU</a> to understand this
  identifier. The <code>transliterate</code> method allows to transliterate the
  current string based on an identifier and a beginning index and an end
  one. This method works the same way than the
  <a href="http://php.net/transliterator.transliterate"><code>Transliterator::transliterate</code></a>
  method.</p>
  <p>More generally, to change the <strong>encoding</strong> format, we can use
  the <code>Hoa\Ustring\Ustring::transcode</code> static method, with a string
  as first argument, the original encoding format as second argument and the
  expected encoding format as third argument (UTF-8 by default). The get the
  list of encoding formats, we have to refer to the
  <a href="http://php.net/iconv"><code>iconv</code></a> extension or to use the
  following command line in a terminal:</p>
  <pre><code class="language-php">$ iconv --list</code></pre>
  <p>To know if a string is encoded in UTF-8, we can use the
  <code>Hoa\Ustring\Ustring::isUtf8</code> static method; for instance:</p>
  <pre><code class="language-php">var_dump(
    Hoa\Ustring\Ustring::isUtf8('a'),
    Hoa\Ustring\Ustring::isUtf8(Hoa\Ustring\Ustring::transcode('a', 'UTF-8', 'UTF-16'))
);

/**
 * Will output:
 *     bool(true)
 *     bool(false)
 */</code></pre>
  <p>We can <strong>split</strong> the string into several sub-strings by using
  the <code>Hoa\Ustring\Ustring::split</code> method. As first argument, we have
  a regular expression (of kind <a href="http://pcre.org/">PCRE</a>), then an
  integer representing the maximum number of elements to return and finally a
  combination of constants. These constants are the same as the ones of
  <a href="http://php.net/preg_split"><code>preg_split</code></a>.</p>
  <p>By default, the second argument is set to -1, which means infinity, and the
  last argument is set to <code>PREG_SPLIT_NO_EMPTY</code>. Thus, if we would
  like to get all the words of a string, we will write:</p>
  <pre><code class="language-php">print_r($title->split('#\b|\s#'));

/**
 * Will output:
 *     Array
 *     (
 *         [0] => Un
 *         [1] => ete
 *         [2] => brulant
 *         [3] => sur
 *         [4] => la
 *         [5] => cote
 *     )
 */</code></pre>
  <p>If we would like to <strong>iterate</strong> over all the
  <strong>characters</strong>, it is recommended to use the
  <code>IteratorAggregate</code> method, being the
  <code>Hoa\Ustring\Ustring::getIterator</code> method. Let's see on the Arabic
  example:</p>
  <pre><code class="language-php">foreach ($arabic as $letter) {
    echo $letter, "\n";
}

/**
 * Will output:
 *     أ
 *     ح
 *     ب
 *     ك
 */</code></pre>
  <p>We notice that the iteration is based on the text direction, it means that
  the first element of the iteration is the first letter of the string starting
  from the beginning.</p>
  <p>Of course, if we would like to get an array of characters, we can use the
  <a href="http://php.net/iterator_to_array"><code>iterator_to_array</code></a>
  PHP function:</p>
  <pre><code class="language-php">print_r(iterator_to_array($arabic));

/**
 * Will output:
 *     Array
 *     (
 *         [0] => أ
 *         [1] => ح
 *         [2] => ب
 *         [3] => ك
 *     )
 */</code></pre>

  <h3 id="Comparison_and_search" for="main-toc">Comparison and search</h3>

  <p>Strings can also be <strong>compared</strong> thanks to the
  <code>Hoa\Ustring\Ustring::compare</code> method:</p>
  <pre><code class="language-php">$string = new Hoa\Ustring\Ustring('abc');
var_dump(
    $string->compare('wxyz')
);

/**
 * Will output:
 *     string(-1)
 */</code></pre>
  <p>This methods returns -1 if the initial string comes before (in the
  alphabetical order), 0 if it is identical and 1 if it comes after. If we
  would like to use all the power of the underlying mechanism, we can call the
  <code>Hoa\Ustring\Ustring::getCollator</code> static method (if the
  <a href="http://php.net/Collator"><code>Collator</code></a> class exists, else
  <code>Hoa\Ustring\Ustring::compare</code> will use a simple byte to bytes
  comparison without taking care of the other parameters). Thus, if we would
  like to sort an array of strings, we will write:</p>
  <pre><code class="language-php">$strings = array('c', 'Σ', 'd', 'x', 'α', 'a');
Hoa\Ustring\Ustring::getCollator()->sort($strings);
print_r($strings);

/**
 * Could output:
 *     Array
 *     (
 *         [0] => a
 *         [1] => c
 *         [2] => d
 *         [3] => x
 *         [4] => α
 *         [5] => Σ
 *     )
 */</code></pre>
  <p>Comparison between two strings depends on the <strong>locale</strong>, it
  means of the localization of the system, like the language, the country, the
  region etc. We can use the
  <a href="@hack:chapter=Locale"><code>Hoa\Locale</code> library</a> to modify
  these data, but it's not a dependence of <code>Hoa\Ustring</code>.</p>
  <p>We can also know if a string <strong>matches</strong> a certain pattern,
  still expressed with a regular expression. To achieve that, we will use the
  <code>Hoa\Ustring\Ustring::match</code> method. This method relies on the
  <a href="http://php.net/preg_match"><code>preg_match</code></a> and
  <a href="http://php.net/preg_match_all"><code>preg_match_all</code></a> PHP
  functions, but by modifying the pattern's options to ensure the Unicode
  support. We have the following parameters: the pattern, a variable passed by
  reference to collect the matches, flags, an offset and finally a boolean
  indicating whether the search is global or not (respectively if we have to use
  <code>preg_match_all</code> or <code>preg_match</code>). By default, the
  search is not global.</p>
  <p>Thus, we will check that our French example contains <code>aime</code> with
  a direct object complement:</p>
  <pre><code class="language-php">$french->match('#(?:(?&amp;lt;direct_object>\w)[\'\b])aime#', $matches);
var_dump($matches['direct_object']);

/**
 * Will output:
 *     string(1) "t"
 */</code></pre>
  <p>This method returns <code>false</code> if an error is raised (for example
  if the pattern is not correct), 0 if no match has been found, the number of
  matches else.</p>
  <p>Similarly, we can <strong>search</strong> and <strong>replace</strong>
  sub-strings by other sub-strings based on a pattern, still expressed with a
  regular expression. To achieve that, we will use the
  <code>Hoa\Ustring\Ustring::replace</code> method. This method uses the
  <a href="http://php.net/preg_replace"><code>preg_replace</code></a> and
  <a href="http://php.net/preg_replace_callback"><code>preg_replace_callback</code></a>
  PHP functions, but still by modifying the pattern's options to ensure the
  Unicode support. As first argument, we find one or more patterns, as second
  argument, one or more replacements and as last argument the limit of
  replacements to apply. If the replacement is a callable, then the
  <code>preg_replace_callback</code> function will be used.</p>
  <p>Thus, we will modify our French example to be more polite:</p>
  <pre><code class="language-php">$french->replace('#(?:\w[\'\b])(?&amp;lt;verb>aime)#', function ($matches) {
    return 'vous ' . $matches['verb'];
});

echo $french;

/**
 * Will output:
 *     Je vous aime
 */</code></pre>
  <p>The <code>Hoa\Ustring\Ustring</code> class provides constants which are
  aliases of existing PHP constants and ensure a better readability of the
  code:</p>
  <ul>
    <li><code>Hoa\Ustring\Ustring::WITHOUT_EMPTY</code>, alias of
    <code>PREG_SPLIT_NO_EMPTY</code>,</li>
    <li><code>Hoa\Ustring\Ustring::WITH_DELIMITERS</code>, alias of
    <code>PREG_SPLIT_DELIM_CAPTURE</code>,</li>
    <li><code>Hoa\Ustring\Ustring::WITH_OFFSET</code>, alias of
    <code>PREG_OFFSET_CAPTURE</code> and
    <code>PREG_SPLIT_OFFSET_CAPTURE</code>,</li>
    <li><code>Hoa\Ustring\Ustring::GROUP_BY_PATTERN</code>, alias of
    <code>PREG_PATTERN_ORDER</code>,</li>
    <li><code>Hoa\Ustring\Ustring::GROUP_BY_TUPLE</code>, alias of
    <code>PREG_SET_ORDER</code>.</li>
  </ul>
  <p>Because they are strict aliases, we can write:</p>
  <pre><code class="language-php">$string = new Hoa\Ustring\Ustring('abc1 defg2 hikl3 xyz4');
$string->match(
    '#(\w+)(\d)#',
    $matches,
    Hoa\Ustring\Ustring::WITH_OFFSET
  | Hoa\Ustring\Ustring::GROUP_BY_TUPLE,
    0,
    true
);</code></pre>

  <h3 id="Characters" for="main-toc">Characters</h3>

  <p>The <code>Hoa\Ustring\Ustring</code> class offers static methods working on
  a single Unicode character. We have already mentionned the
  <code>getCharDirection</code> method which allows to know the
  <strong>direction</strong> of a character. We also have the
  <code>getCharWidth</code> which counts the <strong>number of columns</strong>
  necessary to print a single character. Thus:</p>
  <pre><code class="language-php">var_dump(
    Hoa\Ustring\Ustring::getCharWidth(Hoa\Ustring\Ustring::fromCode(0x7f)),
    Hoa\Ustring\Ustring::getCharWidth('a'),
    Hoa\Ustring\Ustring::getCharWidth('㽠')
);

/**
 * Will output:
 *     int(-1)
 *     int(1)
 *     int(2)
 */</code></pre>
  <p>This method returns -1 or 0 if the character is not
  <strong>printable</strong> (for instance, if this is a control character, like
  <code>0x7f</code> which corresponds to <code>DELETE</code>), 1 or more if this
  is a character that can be printed. In our example, <code>㽠</code> requires
  2 columns to be printed.</p>
  <p>To get more semantics, we have the
  <code>Hoa\Ustring\Ustring::isCharPrintable</code> method which allows to know
  whether a character is printable or not.</p>
  <p>If we would like to count the number of columns necessary for a whole
  string, we have to use the <code>Hoa\Ustring\Ustring::getWidth</code> method.
  Thus:</p>
  <pre><code class="language-php">var_dump(
    $french->getWidth(),
    $arabic->getWidth(),
    $japanese->getWidth()
);

/**
 * Will output:
 *     int(9)
 *     int(4)
 *     int(18)
 */</code></pre>
  <p>Try this in your terminal with a <strong>monospaced</strong> font. You will
  observe that Japanese requires 18 columns to be printed. This measure is very
  useful if we would like to know the length of a string to position it
  efficiently.</p>
  <p>The <code>getCharWidth</code> method is different of <code>getWidth</code>
  because it includes control characters. This method is intended to be used,
  for example, with terminals (please, see the
  <a href="@hack:chapter=Console"><code>Hoa\Console</code> library</a>).</p>
  <p>Finally, if this time we are not interested by Unicode characters but
  rather by <strong>machine</strong> characters <code>char</code> (being
  1 byte), we have an extra operation. The
  <code>Hoa\Ustring\Ustring::getBytesLength</code> method will count the
  <strong>length</strong> of the string in bytes:</p>
  <pre><code class="language-php">var_dump(
    $arabic->getBytesLength(),
    $japanese->getBytesLength()
);

/**
 * Will output:
 *     int(8)
 *     int(27)
 */</code></pre>
  <p>If we compare these results with the ones of the
  <code>Hoa\Ustring\Ustring::count</code> method, we understand that the Arabic
  characters are encoded with 2 bytes whereas Japanese characteres are encoded
  with 3 bytes. We can also get a specific byte thanks to the
  <code>Hoa\Ustring\Ustring::getByteAt</code> method. Once again, the index is
  not bounded.</p>

  <h3 id="Code-point" for="main-toc">Code-point</h3>

  <p>Each character is represented by an integer, called a
  <strong>code-point</strong>. To get the code-point of a character, we can
  use the <code>Hoa\Ustring\Ustring::toCode</code> static method, and to get a
  character based on its code-point, we can use the
  <code>Hoa\Ustring\Ustring::fromCode</code> static method. We also have the
  <code>Hoa\Ustring\Ustring::toBinaryCode</code> method which returns the binary
  representation of a character. Let's take an example:</p>
  <pre><code class="language-php">var_dump(
    Hoa\Ustring\Ustring::toCode('Σ'),
    Hoa\Ustring\Ustring::toBinaryCode('Σ'),
    Hoa\Ustring\Ustring::fromCode(0x1a9)
);

/**
 * Will output:
 *     int(931)
 *     string(32) "1100111010100011"
 *     string(2) "Σ"
 */</code></pre>

  <h2 id="Search_algorithms" for="main-toc">Search algorithms</h2>

  <p>The <code>Hoa\Ustring</code> library provides sophisticated
  <strong>search</strong> algorithms on strings through the
  <code>Hoa\Ustring\Search</code> class.</p>
  <p>We will study the <code>Hoa\Ustring\Search::approximated</code> algorithm
  which searches a sub-string in a string up to <strong><em>k</em>
  differences</strong> (a difference is an addition, a deletion or a
  modification). Let's take the classical example of a DNA representation: We
  will search all the sub-strings approximating <code>GATAA</code> with
  1 difference (maximum) in <code>CAGATAAGAGAA</code>. So, we will write:</p>
  <pre><code class="language-php">$x      = 'GATAA';
$y      = 'CAGATAAGAGAA';
$k      = 1;
$search = Hoa\Ustring\Search::approximated($y, $x, $k);
$n      = count($search);

echo 'Try to match ', $x, ' in ', $y, ' with at most ', $k, ' difference(s):', "\n";
echo $n, ' match(es) found:', "\n";

foreach ($search as $position) {
    echo '    • ', substr($y, $position['i'], $position['l'), "\n";
}

/**
 * Will output:
 *     Try to match GATAA in CAGATAAGAGAA with at most 1 difference(s):
 *     4 match(es) found:
 *         • AGATA
 *         • GATAA
 *         • ATAAG
 *         • GAGAA
 */</code></pre>
  <p>This methods returns an array of arrays. Each sub-array represents a result
  and contains three indexes: <code>i</code> for the position of the first
  character (byte) of the result, <code>j</code> for the position of the last
  character and <code>l</code> for the length of the result (simply
  <code>j</code> - <code>i</code>). Thus, we can compute the results by using
  our initial string (here <code class="language-php">$y</code>) and its
  indexes.</p>
  <p>With our example, we have four results. The first is <code>AGATA</code>,
  being <code>GATA<em>A</em></code> with one moved character, and
  <code>AGATA</code> exists in <code>C<em>AGATA</em>AGAGAA</code>.  The second
  result is <code>GATAA</code>, our sub-string, which well and truly exists in
  <code>CA<em>GATAA</em>GAGAA</code>. The third result is <code>ATAAG</code>,
  being <code><em>G</em>ATAA</code> with one moved character, and
  <code>ATAAG</code> exists in <code>CAG<em>ATAAG</em>AGAA</code>. Finally, the
  last result is <code>GAGAA</code>, being <code>GA<em>T</em>AA</code> with one
  modified character, and <code>GAGAA</code> exists in
  <code>CAGATAA<em>GAGAA</em></code>.</p>
  <p>Another example, more concrete this time. We will consider the
  <code>--testIt --foobar --testThat --testAt</code> string (which represents
  possible options of a command line), and we will search <code>--testot</code>,
  an option that should have been given by the user. This option does not exist
  as it is. We will then use our search algorithm with at most 1 difference.
  Let's see:</p>
  <pre><code class="language-php">$x      = 'testot';
$y      = '--testIt --foobar --testThat --testAt';
$k      = 1;
$search = Hoa\Ustring\Search::approximated($y, $x, $k);
$n      = count($search);

// …

/**
 * Will output:
 *     Try to match testot in --testIt --foobar --testThat --testAt with at most 1 difference(s)
 *     2 match(es) found:
 *         • testIt
 *         • testAt
 */</code></pre>
  <p>The <code>testIt</code> and <code>testAt</code> results are true options,
  so we can suggest them to the user. This is a mechanism user by
  <code>Hoa\Console</code> to suggest corrections to the user in case of a
  mistyping.</p>

  <h2 id="Conclusion" for="main-toc">Conclusion</h2>

  <p>The <code>Hoa\Ustring</code> library provides facilities to manipulate
  strings encoded with the Unicode format, but also to make sophisticated search
  on strings.</p>

</yield>
</overlay>
<?xml version="1.0" encoding="utf-8"?>

<overlay xmlns="http://hoa-project.net/xyl/xylophone">
<yield id="chapter">

  <p>Les chaînes de caractères peuvent parfois être <strong>complexes</strong>,
  particulièrement lorsqu'elles utilisent l'encodage <strong>Unicode</strong>.
  La bibliothèque <code>Hoa\Ustring</code> propose plusieurs opérations sur des
  chaînes de caractères UTF-8.</p>

  <h2 id="Table_of_contents">Table des matières</h2>

  <tableofcontents id="main-toc" />

  <h2 id="Introduction" for="main-toc">Introduction</h2>

  <p>Lorsque nous manipulons des chaînes de caractères, le format
  <a href="http://unicode.org/">Unicode</a> s'impose par sa
  <strong>compatibilité</strong> avec les formats de base historiques (comme
  ASCII) et par sa grande capacité à comprendre une très <strong>large</strong>
  plage de caractères et de symboles, pour toutes les cultures et toutes les
  régions de notre monde. PHP propose plusieurs outils pour manipuler de telles
  chaînes, comme les extensions
  <a href="http://php.net/mbstring"><code>mbstring</code></a>,
  <a href="http://php.net/iconv"><code>iconv</code></a> ou encore l'excellente
  <a href="http://php.net/intl"><code>intl</code></a> qui se base sur
  <a href="http://icu-project.org/">ICU</a>, l'implémentation de référence
  d'Unicode. Malheureusement, il faut parfois mélanger ces extensions pour
  arriver à nos fins et au prix d'une certaine <strong>complexité</strong> et
  d'une <strong>verbosité</strong> regrettable.</p>
  <p>La bibliothèque <code>Hoa\Ustring</code> répond à ces problématiques en
  proposant une façon <strong>simple</strong> de manipuler des chaînes de
  caractères, de manière <strong>performante</strong> et
  <strong>efficace</strong>. Elle propose également des algorithmes évolués pour
  des opérations de <strong>recherche</strong> sur des chaînes de
  caractères.</p>

  <h2 id="Unicode_strings" for="main-toc">Chaîne de caractères Unicode</h2>

  <p>La classe <code>Hoa\Ustring\Ustring</code> représente une chaîne de
  caractères Unicode <strong>UTF-8</strong> et permet de la manipuler
  facilement. Elle implémente les interfaces
  <a href="http://php.net/arrayaccess"><code>ArrayAccess</code></a>,
  <a href="http://php.net/countable"><code>Countable</code></a> et
  <a href="http://php.net/iteratoraggregate"><code>IteratorAggregate</code></a>.
  Nous allons utiliser trois exemples dans trois langues différentes : français,
  arabe et japonais. Ainsi :</p>
  <pre><code class="language-php">$french   = new Hoa\Ustring\Ustring('Je t\'aime');
$arabic   = new Hoa\Ustring\Ustring('أحبك');
$japanese = new Hoa\Ustring\Ustring('私はあなたを愛して');</code></pre>
  <p>Maintenant, voyons les opérations possibles sur ces trois chaînes.</p>

  <h3 id="String_manipulation" for="main-toc">Manipulation de la chaîne</h3>

  <p>Commençons par les opérations <strong>élémentaires</strong>. Si nous
  voulons <strong>compter</strong> le nombre de caractères (et non pas
  d'octets), nous allons utiliser <a href="http://php.net/count">la fonction
  <code>count</code></a> de PHP. Ainsi :</p>
  <pre><code class="language-php">var_dump(
    count($french),
    count($arabic),
    count($japanese)
);

/**
 * Will output:
 *     int(9)
 *     int(4)
 *     int(9)
 */</code></pre>
  <p>Quand nous parlons de position sur un texte, il n'est pas adéquat de parler
  de droite ou de gauche, mais plutôt de <strong>début</strong> ou de
  <strong>fin</strong>, et cela à partir de la <strong>direction</strong> (sens
  d'écriture) du texte. Nous pouvons connaître cette direction grâce à la
  méthode <code>Hoa\Ustring\Ustring::getDirection</code>. Elle retourne la
  valeur d'une des constantes suivantes :</p>
  <ul>
    <li><code>Hoa\Ustring\Ustring::LTR</code>, pour
    <em lang="en">left-to-right</em>, si le texte s'écrit de gauche à
    droite ;</li>
    <li><code>Hoa\Ustring\Ustring::RTL</code>, pour
    <em lang="en">right-to-left</em>, si le texte s'écrit de droite à
    gauche.</li>
  </ul>
  <p>Observons le résultat sur nos exemples :</p>
  <pre><code class="language-php">var_dump(
    $french->getDirection()   === Hoa\Ustring\Ustring::LTR, // is left-to-right?
    $arabic->getDirection()   === Hoa\Ustring\Ustring::RTL, // is right-to-left?
    $japanese->getDirection() === Hoa\Ustring\Ustring::LTR  // is left-to-right?
);

/**
 * Will output:
 *     bool(true)
 *     bool(true)
 *     bool(true)
 */</code></pre>
  <p>Le résultat de cette méthode est calculé grâce à la méthode statique
  <code>Hoa\Ustring\Ustring::getCharDirection</code> qui calcule la direction
  d'un seul caractère.</p>
  <p>Si nous voulons <strong>concaténer</strong> une autre chaîne à la fin ou au
  début, nous utiliserons respectivement les méthodes
  <code>Hoa\Ustring\Ustring::append</code> et
  <code>Hoa\Ustring\Ustring::prepend</code>. Ces méthodes, comme la plupart de
  celles qui modifient la chaîne, retournent l'objet lui-même, ce afin de
  chaîner les appels. Par exemple :</p>
  <pre><code class="language-php">echo $french->append('… et toi, m\'aimes-tu ?')->prepend('Mam\'zelle ! ');

/**
 * Will output:
 *     Mam'zelle ! Je t'aime… et toi, m'aimes-tu ?
 */</code></pre>
  <p>Nous avons également les méthodes
  <code>Hoa\Ustring\Ustring::toLowerCase</code> et
  <code>Hoa\Ustring\Ustring::toUpperCase</code> pour, respectivement, mettre la
  chaîne en <strong>minuscules</strong> ou en <strong>majuscules</strong>. Par
  exemple :</p>
  <pre><code class="language-php">echo $french->toUpperCase();

/**
 * Will output:
 *     MAM'ZELLE ! JE T'AIME… ET TOI, M'AIMES-TU ?
 */</code></pre>
  <p>Nous pouvons aussi ajouter des caractères en début ou en fin de chaîne pour
  atteindre une taille <strong>minimum</strong>. Cette opération est plus
  couramment appelée le <em lang="en">padding</em> (pour des raisons historiques
  remontant aux machines à écrire). C'est pourquoi nous trouvons la méthode
  <code>Hoa\Ustring\Ustring::pad</code> qui prend trois arguments : la taille
  minimum, les caractères à ajouter et une constante indiquant si nous devons
  ajouter en fin ou en début de chaîne (respectivement
  <code>Hoa\Ustring\Ustring::END</code>, par défaut, et
  <code>Hoa\Ustring\Ustring::BEGINNING</code>).</p>
  <pre><code class="language-php">echo $arabic->pad(20, ' ');

/**
 * Will output:
 *                     أحبك
 */</code></pre>
  <p>Une opération similairement inverse permet de supprimer, par défaut, les
  <strong>espaces</strong> en début et en fin de chaîne grâce à la méthode
  <code>Hoa\Ustring\Ustring::trim</code>. Par exemple, pour revenir à notre
  chaîne arabe originale :</p>
  <pre><code class="language-php">echo $arabic->trim();

/**
 * Will output:
 *     أحبك
 */</code></pre>
  <p>Si nous voulons supprimer d'autres caractères, nous pouvons utiliser son
  premier argument qui doit être une expression régulière. Enfin, son second
  argument permet de préciser de quel côté nous voulons supprimer les
  caractères : en début, en fin ou les deux, toujours en utilisant les
  constantes <code>Hoa\Ustring\Ustring::BEGINNING</code> et
  <code>Hoa\Ustring\Ustring::END</code>.  Nous pouvons combiner ces constantes
  pour exprimer « les deux côtés », ce qui est la valeur par défaut :
  <code class="language-php">Hoa\Ustring\Ustring::BEGINNING |
  Hoa\Ustring\Ustring::END</code>. Par exemple, pour supprimer tous les nombres
  et les espaces uniquement à la fin, nous écrirons :</p>
  <pre><code class="language-php">$arabic->trim('\s|\d', Hoa\Ustring\Ustring::END);</code></pre>
  <p>Nous pouvons également <strong>réduire</strong> la chaîne à une
  <strong>sous-chaîne</strong> en précisant la position du premier caractère
  puis la taille de la sous-chaîne à la méthode
  <code>Hoa\Ustring\Ustring::reduce</code> :</p>
  <pre><code class="language-php">echo $french->reduce(3, 6)->reduce(2, 4);

/**
 * Will output:
 *     aime
 */</code></pre>
  <p>Si nous voulons obtenir un caractère en particulier, nous pouvons exploiter
  l'interface <code>ArrayAccess</code>. Par exemple, pour obtenir le premier
  caractère de chacun de nos exemples (en les reprenant depuis le début) :</p>
  <pre><code class="language-php">var_dump(
    $french[0],
    $arabic[0],
    $japanese[0]
);

/**
 * Will output:
 *     string(1) "J"
 *     string(2) "أ"
 *     string(3) "私"
 */</code></pre>
  <p>Si nous voulons le dernier caractère, nous utiliserons l'index -1. L'index
  n'est pas borné à la taille de la chaîne. Si jamais l'index dépasse cette
  taille, alors un <em>modulo</em> sera appliqué.</p>
  <p>Nous pouvons aussi modifier ou supprimer un caractère précis avec cette
  méthode. Par exemple :</p>
  <pre><code class="language-php">$french->append(' ?');
$french[-1] = '!';
echo $french;

/**
 * Will output:
 *     Je t'aime !
 */</code></pre>
  <p>Une autre méthode fort utile est la transformation en
  <strong>ASCII</strong>. Attention, ce n'est pas toujours possible, selon votre
  installation. Par exemple :</p>
  <pre><code class="language-php">$title = new Hoa\Ustring\Ustring('Un été brûlant sur la côte');
echo $title->toAscii();

/**
 * Will output:
 *     Un ete brulant sur la cote
 */</code></pre>
  <p>Nous pouvons aussi transformer de l'arabe ou du japonais vers de l'ASCII.
  Les symboles, comme les symboles Mathématiques ou les emojis, sont aussi
  transformés :</p>
  <pre><code class="language-php">$emoji = new Hoa\Ustring\Ustring('I ❤ Unicode');
$maths = new Hoa\Ustring\Ustring('∀ i ∈ ℕ');

echo
    $arabic->toAscii(), "\n",
    $japanese->toAscii(), "\n",
    $emoji->toAscii(), "\n",
    $maths->toAscii(), "\n";

/**
 * Will output:
 *     ahbk
 *     sihaanatawo aishite
 *     I (heavy black heart)️ Unicode
 *     (for all) i (element of) N
 */</code></pre>
  <p>Pour que cette méthode fonctionne correctement, il faut que l'extension
  <a href="http://php.net/intl"><code>intl</code></a> soit présente, pour que la
  classe <a href="http://php.net/transliterator"><code>Transliterator</code></a>
  existe. Si elle n'existe pas, la classe
  <a href="http://php.net/normalizer"><code>Normalizer</code></a> doit exister.
  Si cette classe n'existe pas non plus, la méthode
  <code>Hoa\Ustring\Ustring::toAscii</code> peut quand même essayer une
  transformation mais moins efficace. Pour cela, il faut passer
  <code>true</code> en seul argument. Ce tour de force est déconseillé dans la
  plupart des cas.</p>
  <p>Nous trouvons également la méthode <code>getTransliterator</code> qui
  retourne un objet <code>Transliterator</code>, ou <code>null</code> si cette
  classe n'existe pas. Cette méthode prend en argument un identifiant de
  translitération. Nous conseillons de
  <a href="http://userguide.icu-project.org/transforms/general">lire la
  documentation sur le translitérateur d'ICU</a> pour comprendre cet
  identifiant. La méthode <code>transliterate</code> permet de translitérer la
  chaîne courante à partir d'un identifiant et d'un index de début et de
  fin. Elle fonctionne de la même façon que la méthode
  <a href="http://php.net/transliterator.transliterate"><code>Transliterator::transliterate</code></a>.</p>

  <p>Plus généralement, pour des changements d'<strong>encodage</strong> brut,
  nous pouvons utiliser la méthode statique
  <code>Hoa\Ustring\Ustring::transcode</code>, avec en premier argument une chaîne
  de caractères, en deuxième argument l'encodage d'origine et en dernier
  argument l'encodage final souhaité (par défaut UTF-8). Pour la liste des
  encodages, il faut se reporter à l'extension
  <a href="http://php.net/iconv"><code>iconv</code></a> ou entrer la commande
  suivante dans un terminal :</p>
  <pre><code class="language-php">$ iconv --list</code></pre>
  <p>Pour savoir si une chaîne est encodée en UTF-8, nous pouvons utiliser la
  méthode statique <code>Hoa\Ustring\Ustring::isUtf8</code> ; par exemple :</p>
  <pre><code class="language-php">var_dump(
    Hoa\Ustring\Ustring::isUtf8('a'),
    Hoa\Ustring\Ustring::isUtf8(Hoa\Ustring\Ustring::transcode('a', 'UTF-8', 'UTF-16'))
);

/**
 * Will output:
 *     bool(true)
 *     bool(false)
 */</code></pre>
  <p>Nous pouvons <strong>éclater</strong> la chaîne en plusieurs sous-chaînes
  en utilisant la méthode <code>Hoa\Ustring\Ustring::split</code>. En premier
  argument, nous avons une expression régulière (type
  <a href="http://pcre.org/">PCRE</a>), puis un entier représentant le nombre
  maximum d'éléments à retourner et enfin une combinaison de constantes. Ces
  constantes sont les mêmes que celles de
  <a href="http://php.net/preg_split"><code>preg_split</code></a>.</p>
  <p>Par défaut, le deuxième argument vaut -1, qui symbolise l'infini, et le
  dernier argument vaut <code>PREG_SPLIT_NO_EMPTY</code>. Ainsi, si nous
  voulons obtenir tous les mots d'une chaîne, nous écrirons :</p>
  <pre><code class="language-php">print_r($title->split('#\b|\s#'));

/**
 * Will output:
 *     Array
 *     (
 *         [0] => Un
 *         [1] => ete
 *         [2] => brulant
 *         [3] => sur
 *         [4] => la
 *         [5] => cote
 *     )
 */</code></pre>
  <p>Si nous voulons <strong>itérer</strong> sur tous les
  <strong>caractères</strong>, il est préférable d'exploiter l'interface
  <code>IteratorAggregate</code>, soit la méthode
  <code>Hoa\Ustring\Ustring::getIterator</code>. Voyons plutôt sur l'exemple en
  arabe :</p>
  <pre><code class="language-php">foreach ($arabic as $letter) {
    echo $letter, "\n";
}

/**
 * Will output:
 *     أ
 *     ح
 *     ب
 *     ك
 */</code></pre>
  <p>Nous remarquons que l'itération se fait suivant la direction du texte,
  c'est à dire que le premier élément de l'itération est la première lettre de
  la chaîne en partant du début.</p>
  <p>Bien sûr, si nous voulons obtenir un tableau des caractères, nous pouvons
  utiliser la fonction
  <a href="http://php.net/iterator_to_array"><code>iterator_to_array</code></a>
  de PHP :</p>
  <pre><code class="language-php">print_r(iterator_to_array($arabic));

/**
 * Will output:
 *     Array
 *     (
 *         [0] => أ
 *         [1] => ح
 *         [2] => ب
 *         [3] => ك
 *     )
 */</code></pre>

  <h3 id="Comparison_and_search" for="main-toc">Comparaison et recherche</h3>

  <p>Les chaînes peuvent également être <strong>comparées</strong> entre elles
  grâce à la méthode <code>Hoa\Ustring\Ustring::compare</code> :</p>
  <pre><code class="language-php">$string = new Hoa\Ustring\Ustring('abc');
var_dump(
    $string->compare('wxyz')
);

/**
 * Will output:
 *     string(-1)
 */</code></pre>
  <p>Cette méthode retourne -1 si la chaîne initiale vient avant (par ordre
  alphabétique), 0 si elle est identique et 1 si elle vient après. Si nous
  voulons utiliser la pleine
  puissance du mécanisme sous-jacent, nous pouvons appeler la méthode statique
  <code>Hoa\Ustring\Ustring::getCollator</code> (si la classe
  <a href="http://php.net/Collator"><code>Collator</code></a> existe, sinon
  <code>Hoa\Ustring\Ustring::compare</code> utilisera une comparaison simple
  octet par octets sans tenir compte d'autres paramètres). Ainsi, si nous
  voulons trier un tableau de chaînes, nous écrirons plutôt :</p>
  <pre><code class="language-php">$strings = array('c', 'Σ', 'd', 'x', 'α', 'a');
Hoa\Ustring\Ustring::getCollator()->sort($strings);
print_r($strings);

/**
 * Could output:
 *     Array
 *     (
 *         [0] => a
 *         [1] => c
 *         [2] => d
 *         [3] => x
 *         [4] => α
 *         [5] => Σ
 *     )
 */</code></pre>
  <p>La comparaison entre deux chaînes dépend de la <strong>locale</strong>,
  c'est à dire de la régionalisation du système, comme la langue, le pays, la
  région etc. Nous pouvons utiliser <a href="@hack:chapter=Locale">la
  bibliothèque <code>Hoa\Locale</code></a> pour modifier ces données, mais ce
  n'est pas une dépendance de <code>Hoa\Ustring</code> pour autant.</p>
  <p>Nous pouvons également savoir si une chaîne <strong>correspond</strong> à
  un certain motif, toujours exprimé avec une expression régulière. Pour cela,
  nous allons utiliser la méthode <code>Hoa\Ustring\Ustring::match</code>. Cette
  méthode repose sur les fonctions
  <a href="http://php.net/preg_match"><code>preg_match</code></a> et
  <a href="http://php.net/preg_match_all"><code>preg_match_all</code></a> de
  PHP, mais en modifiant les options du motif afin qu'il supporte Unicode. Nous
  avons les paramètres suivants : le motif, une variable par référence pour
  récupérer les captures, les <em lang="en">flags</em>, la position de début de
  recherche (<em lang="en">offset</em>) et enfin un booléen indiquant si la
  recherche est globale ou non (respectivement si nous devons utiliser
  <code>preg_match_all</code> ou <code>preg_match</code>). Par défaut, la
  recherche n'est pas globale.</p>
  <p>Ainsi, nous allons vérifier que notre exemple en français contient bien
  <code>aime</code> avec son complément d'objet direct :</p>
  <pre><code class="language-php">$french->match('#(?:(?&amp;lt;direct_object>\w)[\'\b])aime#', $matches);
var_dump($matches['direct_object']);

/**
 * Will output:
 *     string(1) "t"
 */</code></pre>
  <p>Cette méthode retourne <code>false</code> si une erreur est survenue (par
  exemple si le motif n'est pas correct), 0 si aucune correspondance n'a été
  trouvée, le nombre de correspondances trouvées sinon.</p>
  <p>Similairement, nous pouvons <strong>chercher</strong> et
  <strong>remplacer</strong> des sous-chaînes par d'autres sous-chaînes suivant
  un motif, toujours exprimé avec une expression régulière. Pour cela, nous
  allons utiliser la méthode <code>Hoa\Ustring\Ustring::replace</code>. Cette
  méthode repose sur les fonctions
  <a href="http://php.net/preg_replace"><code>preg_replace</code></a> et
  <a href="http://php.net/preg_replace_callback"><code>preg_replace_callback</code></a>
  de PHP, mais toujours en modifiant les options du motif afin qu'il supporte
  Unicode. En premier argument, nous trouvons le ou les motifs, en deuxième
  argument, le ou les remplacements et en dernier argument la limite de
  remplacements à faire. Si le remplacement est un <em lang="en">callable</em>,
  alors la fonction <code>preg_replace_callback</code> sera utilisée.</p>
  <p>Ainsi, nous allons modifier notre exemple français pour qu'il soit plus
  poli :</p>
  <pre><code class="language-php">$french->replace('#(?:\w[\'\b])(?&amp;lt;verb>aime)#', function ($matches) {
    return 'vous ' . $matches['verb'];
});

echo $french;

/**
 * Will output:
 *     Je vous aime
 */</code></pre>
  <p>La classe <code>Hoa\Ustring\Ustring</code> propose des constantes qui sont
  des aliases de constantes PHP et qui permettent une meilleure lecture du
  code:</p>
  <ul>
    <li><code>Hoa\Ustring\Ustring::WITHOUT_EMPTY</code>, alias de
    <code>PREG_SPLIT_NO_EMPTY</code> ;</li>
    <li><code>Hoa\Ustring\Ustring::WITH_DELIMITERS</code>, alias de
    <code>PREG_SPLIT_DELIM_CAPTURE</code> ;</li>
    <li><code>Hoa\Ustring\Ustring::WITH_OFFSET</code>, alias de
    <code>PREG_OFFSET_CAPTURE</code> et
    <code>PREG_SPLIT_OFFSET_CAPTURE</code> ;</li>
    <li><code>Hoa\Ustring\Ustring::GROUP_BY_PATTERN</code>, alias de
    <code>PREG_PATTERN_ORDER</code> ;</li>
    <li><code>Hoa\Ustring\Ustring::GROUP_BY_TUPLE</code>, alias de
    <code>PREG_SET_ORDER</code>.</li>
  </ul>
  <p>Comme ce sont des aliases stricts, nous pouvons écrire :</p>
  <pre><code class="language-php">$string = new Hoa\Ustring\Ustring('abc1 defg2 hikl3 xyz4');
$string->match(
    '#(\w+)(\d)#',
    $matches,
    Hoa\Ustring\Ustring::WITH_OFFSET
  | Hoa\Ustring\Ustring::GROUP_BY_TUPLE,
    0,
    true
);</code></pre>

  <h3 id="Characters" for="main-toc">Caractères</h3>

  <p>La classe <code>Hoa\Ustring\Ustring</code> offre des méthodes statiques
  travaillant sur un seul caractère Unicode. Nous avons déjà évoqué la méthode
  <code>getCharDirection</code> qui permet de connaître la
  <strong>direction</strong> d'un caractère. Nous trouvons aussi
  <code>getCharWidth</code> qui calcule le <strong>nombre de colonnes</strong>
  nécessaires pour l'affichage d'un seul caractère. Ainsi :</p>
  <pre><code class="language-php">var_dump(
    Hoa\Ustring\Ustring::getCharWidth(Hoa\Ustring\Ustring::fromCode(0x7f)),
    Hoa\Ustring\Ustring::getCharWidth('a'),
    Hoa\Ustring\Ustring::getCharWidth('㽠')
);

/**
 * Will output:
 *     int(-1)
 *     int(1)
 *     int(2)
 */</code></pre>
  <p>Cette méthode retourne -1 ou 0 si le caractère n'est pas
  <strong>imprimable</strong> (par exemple si c'est un caractère de contrôle,
  comme <code>0x7f</code> qui correspond à <code>DELETE</code>), 1 ou plus si
  c'est un caractère qui peut être imprimé. Dans notre exemple, <code>㽠</code>
  s'imprime sur 2 colonnes.</p>
  <p>Pour plus de sémantique, nous avons accès à la méthode
  <code>Hoa\Ustring\Ustring::isCharPrintable</code> qui permet de savoir si un
  caractère est imprimable ou pas.</p>
  <p>Si nous voulons calculer le nombre de colonnes pour tout une chaîne, il
  faut utiliser la méthode <code>Hoa\Ustring\Ustring::getWidth</code>.
  Ainsi :</p>
  <pre><code class="language-php">var_dump(
    $french->getWidth(),
    $arabic->getWidth(),
    $japanese->getWidth()
);

/**
 * Will output:
 *     int(9)
 *     int(4)
 *     int(18)
 */</code></pre>
  <p>Essayez dans un terminal avec une police <strong>mono-espacée</strong>.
  Vous verrez que le japonais demande 18 colonnes pour s'afficher. Cette mesure
  est très utile si nous voulons connaître la largeur d'une chaîne pour la
  positionner correctement.</p>
  <p>La méthode <code>getCharWidth</code> est différente de
  <code>getWidth</code> car elle prend en compte des caractères de contrôles.
  Elle est destinée à être utilisée, par exemple, avec des terminaux (voir
  <a href="@hack:chapter=Console">la bibliothèque
  <code>Hoa\Console</code></a>).</p>
  <p>Enfin, si cette fois nous ne nous intéressons pas aux caractères Unicode
  mais aux caractères <strong>machines</strong> <code>char</code> (soit 1
  octet), nous avons une opération supplémentaire. La méthode
  <code>Hoa\Ustring\Ustring::getBytesLength</code> va compter la
  <strong>taille</strong> de la chaîne en octets :</p>
  <pre><code class="language-php">var_dump(
    $arabic->getBytesLength(),
    $japanese->getBytesLength()
);

/**
 * Will output:
 *     int(8)
 *     int(27)
 */</code></pre>
  <p>Si nous comparons ces résultats avec ceux de la méthode
  <code>Hoa\Ustring\Ustring::count</code>, nous comprenons que les caractères
  arabes sont encodés sur 2 octets alors que les caractères japonais sont
  encodés sur 3 octets. Nous pouvons également obtenir un octet précis à l'aide
  de la méthode <code>Hoa\Ustring\Ustring::getByteAt</code>. Encore une fois,
  l'index n'est pas borné.</p>

  <h3 id="Code-point" for="main-toc">Code-point</h3>

  <p>Chaque caractère est représenté en machine par un entier, appelé
  <strong>code-point</strong>. Pour obtenir le code-point d'un caractère, nous
  pouvons utiliser la méthode statique <code>Hoa\Ustring\Ustring::toCode</code>,
  et pour obtenir un caractère à partir d'un code, nous pouvons utiliser la
  méthode statique <code>Hoa\Ustring\Ustring::fromCode</code>. Nous avons aussi
  la méthode statique <code>Hoa\Ustring\Ustring::toBinaryCode</code> qui
  retourne la représentation sous forme binaire d'un caractère. Prenons un
  exemple :</p>
  <pre><code class="language-php">var_dump(
    Hoa\Ustring\Ustring::toCode('Σ'),
    Hoa\Ustring\Ustring::toBinaryCode('Σ'),
    Hoa\Ustring\Ustring::fromCode(0x1a9)
);

/**
 * Will output:
 *     int(931)
 *     string(32) "1100111010100011"
 *     string(2) "Σ"
 */</code></pre>

  <h2 id="Search_algorithms" for="main-toc">Algorithmes de recherche</h2>

  <p>La bibliothèque <code>Hoa\Ustring</code> propose des algorithmes de
  <strong>recherches</strong> sophistiquées sur les chaînes de caractères à
  travers la classe <code>Hoa\Ustring\Search</code>.</p>
  <p>Nous allons étudier l'algorithme
  <code>Hoa\Ustring\Search::approximated</code> qui fait une recherche d'une
  sous-chaîne dans une chaîne avec au maximum <strong><em>k</em>
  différences</strong> (une différence étant une insertion, une délétion ou une
  modification). Prenons un exemple classique avec une représentation
  ADN : nous allons chercher toutes les sous-chaînes s'approchant de
  <code>GATAA</code> à 1 différence près (au maximum) dans
  <code>CAGATAAGAGAA</code>. Pour cela, nous allons donc écrire :</p>
  <pre><code class="language-php">$x      = 'GATAA';
$y      = 'CAGATAAGAGAA';
$k      = 1;
$search = Hoa\Ustring\Search::approximated($y, $x, $k);
$n      = count($search);

echo 'Try to match ', $x, ' in ', $y, ' with at most ', $k, ' difference(s):', "\n";
echo $n, ' match(es) found:', "\n";

foreach ($search as $position) {
    echo '    • ', substr($y, $position['i'], $position['l'), "\n";
}

/**
 * Will output:
 *     Try to match GATAA in CAGATAAGAGAA with at most 1 difference(s):
 *     4 match(es) found:
 *         • AGATA
 *         • GATAA
 *         • ATAAG
 *         • GAGAA
 */</code></pre>
  <p>Cette méthode retourne un tableau de tableaux. Chaque sous-tableau
  représente un résultat et contient trois indexes : <code>i</code> pour la
  position du premier caractère (octet) du résultat, <code>j</code> pour la
  position du dernier caractère et <code>l</code> pour la taille du résultat
  (tout simplement <code>j</code> - <code>i</code>).
  Ainsi, nous pouvons calculer les résultats en utilisant notre chaîne initiale
  (ici <code class="language-php">$y</code>) et ces indexes.</p>
  <p>Avec notre exemple, nous avons quatre résultats. Le premier est
  <code>AGATA</code>, soit <code>GATA<em>A</em></code> avec un caractère
  déplacé, et <code>AGATA</code> existe bien dans
  <code>C<em>AGATA</em>AGAGAA</code>. Le deuxième résultat est
  <code>GATAA</code>, notre sous-chaîne, qui existe bel et bien dans
  <code>CA<em>GATAA</em>GAGAA</code>. Le troisième résultat est
  <code>ATAAG</code>, soit <code><em>G</em>ATAA</code> avec un caractère
  déplacé, et <code>ATAAG</code> existe bien dans
  <code>CAG<em>ATAAG</em>AGAA</code>. Enfin, le dernier résultat est
  <code>GAGAA</code>, soit <code>GA<em>T</em>AA</code> avec un caractère
  modifié, et <code>GAGAA</code> existe bien dans
  <code>CAGATAA<em>GAGAA</em></code>.</p>
  <p>Prenons un autre exemple, plus concret cette fois-ci. Nous allons
  considérer la chaîne <code>--testIt --foobar --testThat --testAt</code> (qui
  représente les options possibles d'une ligne de commande), et nous allons
  chercher <code>--testot</code>, une option qu'aurait pu donner
  l'utilisateur. Cette option n'existe pas telle quelle. Nous allons donc
  utiliser notre algorithme de recherche avec 1 différence au maximum. Voyons
  plutôt :</p>
  <pre><code class="language-php">$x      = 'testot';
$y      = '--testIt --foobar --testThat --testAt';
$k      = 1;
$search = Hoa\Ustring\Search::approximated($y, $x, $k);
$n      = count($search);

// …

/**
 * Will output:
 *     Try to match testot in --testIt --foobar --testThat --testAt with at most 1 difference(s)
 *     2 match(es) found:
 *         • testIt
 *         • testAt
 */</code></pre>
  <p>Les résultats <code>testIt</code> et <code>testAt</code> sont des vraies
  options, donc nous pouvons les proposer à l'utilisateur. C'est un mécanisme
  utilisé par <code>Hoa\Console</code> pour proposer des corrections à
  l'utilisateur s'il se trompe.</p>

  <h2 id="Conclusion" for="main-toc">Conclusion</h2>

  <p>La bibliothèque <code>Hoa\Ustring</code> propose des facilités pour
  manipuler des chaînes encodées au format Unicode, mais aussi pour effectuer
  des recherches sophistiquées sur des chaînes.</p>

</yield>
</overlay>
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Ustring;

use Hoa\Exception as HoaException;
/**
 * Class \Hoa\Ustring\Exception.
 *
 * Extending the \Hoa\Exception\Exception class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Exception extends HoaException
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Zformat;

/**
 * Interface \Hoa\Zformat\Parameterizable.
 *
 * Interface representing a class with zFormat parameters.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
interface Parameterizable
{
    /**
     * Get parameters.
     *
     * @return  \Hoa\Zformat\Parameter
     */
    public function getParameters();
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Zformat;

/**
 * Class \Hoa\Zformat\Parameter.
 *
 * Provide a class parameters support.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Parameter
{
    /**
     * Owner.
     *
     * @var string
     */
    protected $_owner = null;
    /**
     * Parameters.
     *
     * @var array
     */
    protected $_parameters = [];
    /**
     * Keywords.
     *
     * @var array
     */
    protected $_keywords = [];
    /**
     * Constants values for zFormat.
     *
     * @var array
     */
    protected static $_constants = null;
    /**
     * Cache for zFormat.
     *
     * @var array
     */
    protected $_cache = [];
    /**
     * Construct a new set of parameters.
     *
     * @param   mixed  $owner         Owner name or instance.
     * @param   array  $keywords      Keywords.
     * @param   array  $parameters    Parameters.
     * @throws  \Hoa\Zformat\Exception
     */
    public function __construct($owner, array $keywords = [], array $parameters = [])
    {
        if (\is_object($owner)) {
            if (!$owner instanceof \Hoa\Zformat\Parameterizable) {
                throw new \Hoa\Zformat\Exception('Only parameterizable object can have parameter; ' . '%s does implement \\Hoa\\Zformat\\Parameterizable.', 0, \get_class($owner));
            }
            $owner = \get_class($owner);
        } else {
            $reflection = new \ReflectionClass($owner);
            if (\false === $reflection->implementsInterface('\\Hoa\\Zformat\\Parameterizable')) {
                throw new \Hoa\Zformat\Exception('Only parameterizable object can have parameter; ' . '%s does implement \\Hoa\\Zformat\\Parameterizable.', 1, $owner);
            }
        }
        $this->_owner = $owner;
        $this->setKeywords($keywords);
        $this->setDefault($parameters);
        return;
    }
    /**
     * Initialize constants.
     *
     * @return  void
     */
    public static function initializeConstants()
    {
        $c = \explode('…', \date('d…j…N…w…z…W…m…n…Y…y…g…G…h…H…i…s…u…O…T…U'));
        self::$_constants = ['d' => $c[0], 'j' => $c[1], 'N' => $c[2], 'w' => $c[3], 'z' => $c[4], 'W' => $c[5], 'm' => $c[6], 'n' => $c[7], 'Y' => $c[8], 'y' => $c[9], 'g' => $c[10], 'G' => $c[11], 'h' => $c[12], 'H' => $c[13], 'i' => $c[14], 's' => $c[15], 'u' => $c[16], 'O' => $c[17], 'T' => $c[18], 'U' => $c[19]];
        return;
    }
    /**
     * Get constants.
     *
     * @return  array
     */
    public static function getConstants()
    {
        return self::$_constants;
    }
    /**
     * Set default parameters to a class.
     *
     * @param   array  $parameters    Parameters to set.
     * @return  void
     * @throws  \Hoa\Zformat\Exception
     */
    private function setDefault(array $parameters)
    {
        $this->_parameters = $parameters;
        return;
    }
    /**
     * Set parameters.
     *
     * @param   array   $parameters    Parameters.
     * @return  void
     */
    public function setParameters(array $parameters)
    {
        $this->resetCache();
        foreach ($parameters as $key => $value) {
            $this->setParameter($key, $value);
        }
        return;
    }
    /**
     * Get parameters.
     *
     * @return  array
     */
    public function getParameters()
    {
        return $this->_parameters;
    }
    /**
     * Set a parameter.
     *
     * @param   string  $key      Key.
     * @param   mixed   $value    Value.
     * @return  mixed
     */
    public function setParameter($key, $value)
    {
        $this->resetCache();
        $old = null;
        if (\true === \array_key_exists($key, $this->_parameters)) {
            $old = $this->_parameters[$key];
        }
        $this->_parameters[$key] = $value;
        return $old;
    }
    /**
     * Get a parameter.
     *
     * @param   string  $parameter    Parameter.
     * @return  mixed
     */
    public function getParameter($parameter)
    {
        if (\array_key_exists($parameter, $this->_parameters)) {
            return $this->_parameters[$parameter];
        }
        return null;
    }
    /**
     * Get a formatted parameter (i.e. zFormatted).
     *
     * @param   string  $parameter    Parameter.
     * @return  mixed
     */
    public function getFormattedParameter($parameter)
    {
        if (null === ($value = $this->getParameter($parameter))) {
            return null;
        }
        return $this->zFormat($value);
    }
    /**
     * Check a branch exists.
     *
     * @param   string  $branch    Branch.
     * @return  bool
     */
    public function branchExists($branch)
    {
        $qBranch = \preg_quote($branch);
        foreach ($this->getParameters() as $key => $value) {
            if (0 !== \preg_match('#^' . $qBranch . '(.*)?#', $key)) {
                return \true;
            }
        }
        return \false;
    }
    /**
     * Unlinearize a branch to an array.
     *
     * @param   string  $branch    Branch.
     * @return  array
     */
    public function unlinearizeBranch($branch)
    {
        $parameters = $this->getParameters();
        $out = [];
        $lBranch = \strlen($branch);
        foreach ($parameters as $key => $value) {
            if ($branch !== \substr($key, 0, $lBranch)) {
                continue;
            }
            $handle = [];
            $explode = \preg_split('#((?<!\\\\)\\.)#', \substr($key, $lBranch + 1), -1, \PREG_SPLIT_NO_EMPTY);
            $end = \count($explode) - 1;
            $i = $end;
            while ($i >= 0) {
                $explode[$i] = \str_replace('\\.', '.', $explode[$i]);
                if ($i != $end) {
                    $handle = [$explode[$i] => $handle];
                } else {
                    $handle = [$explode[$i] => $this->zFormat($value)];
                }
                --$i;
            }
            $out = \array_merge_recursive($out, $handle);
        }
        return $out;
    }
    /**
     * Set keywords.
     *
     * @param   array   $keywords    Keywords.
     * @return  void
     * @throws  \Hoa\Zformat\Exception
     */
    public function setKeywords($keywords)
    {
        $this->resetCache();
        foreach ($keywords as $key => $value) {
            $this->setKeyword($key, $value);
        }
        return;
    }
    /**
     * Get keywords.
     *
     * @return  array
     */
    public function getKeywords()
    {
        return $this->_keywords;
    }
    /**
     * Set a keyword.
     *
     * @param   string  $key      Key.
     * @param   mixed   $value    Value.
     * @return  mixed
     */
    public function setKeyword($key, $value)
    {
        $this->resetCache();
        $old = null;
        if (\true === \array_key_exists($key, $this->_keywords)) {
            $old = $this->_keywords[$key];
        }
        $this->_keywords[$key] = $value;
        return $old;
    }
    /**
     * Get a keyword.
     *
     * @param   string  $keyword    Keyword.
     * @return  mixed
     */
    public function getKeyword($keyword)
    {
        if (\true === \array_key_exists($keyword, $this->_keywords)) {
            return $this->_keywords[$keyword];
        }
        return null;
    }
    /**
     * zFormat a string.
     * zFormat is inspired from the famous Zsh (please, take a look at
     * http://zsh.org), and specifically from ZStyle.
     *
     * ZFormat has the following pattern:
     *     (:subject[:format]:)
     *
     * where subject could be a:
     *   • keyword, i.e. a simple string: foo;
     *   • reference to an existing parameter, i.e. a simple string prefixed by
     *     a %: %bar;
     *   • constant, i.e. a combination of chars, first is prefixed by a _: _Ymd
     *     will given the current year, followed by the current month and
     *     finally the current day.
     *
     * and where the format is a combination of chars, that apply functions on
     * the subject:
     *   • h: to get the head of a path (equivalent to dirname);
     *   • t: to get the tail of a path (equivalent to basename);
     *   • r: to get the path without extension;
     *   • e: to get the extension;
     *   • l: to get the result in lowercase;
     *   • u: to get the result in uppercase;
     *   • U: to get the result with the first letter in uppercase (understand
     *        classname);
     *   • s/<foo>/<bar>/: to replace all matches <foo> by <bar> (the last / is
     *     optional, only if more options are given after);
     *   • s%<foo>%<bar>%: to replace the prefix <foo> by <bar> (the last % is
     *     also optional);
     *   • s#<foo>#<bar>#: to replace the suffix <foo> by <bar> (the last # is
     *     also optional).
     *
     * Known constants are:
     *   • d: day of the month, 2 digits with leading zeros;
     *   • j: day of the month without leading zeros;
     *   • N: ISO-8601 numeric representation of the day of the week;
     *   • w: numeric representation of the day of the week;
     *   • z: the day of the year (starting from 0);
     *   • W: ISO-8601 week number of year, weeks starting on Monday;
     *   • m: numeric representation of a month, with leading zeros;
     *   • n: numeric representation of a month, without leading zeros;
     *   • Y: a full numeric representation of a year, 4 digits;
     *   • y: a two digit representation of a year;
     *   • g: 12-hour format of an hour without leading zeros;
     *   • G: 24-hour format of an hour without leading zeros;
     *   • h: 12-hour format of an hour with leading zeros;
     *   • H: 24-hour format of an hour with leading zeros;
     *   • i: minutes with leading zeros;
     *   • s: seconds with leading zeros;
     *   • u: microseconds;
     *   • O: difference to Greenwich time (GMT) in hours;
     *   • T: timezone abbreviation;
     *   • U: seconds since the Unix Epoch (a timestamp).
     * They are very useful for dynamic cache paths for example.
     *
     * Examples:
     *   Let keywords $k and parameters $p:
     *     $k = [
     *         'foo'      => 'bar',
     *         'car'      => 'DeLoReAN',
     *         'power'    => 2.21,
     *         'answerTo' => 'life_universe_everything_else',
     *         'answerIs' => 42,
     *         'hello'    => 'wor.l.d'
     *     ];
     *     $p = [
     *         'plpl'        => '(:foo:U:)',
     *         'foo'         => 'ar(:%plpl:)',
     *         'favoriteCar' => 'A (:car:l:)!',
     *         'truth'       => 'To (:answerTo:ls/_/ /U:) is (:answerIs:).',
     *         'file'        => '/a/file/(:_Ymd:)/(:hello:trr:).(:power:e:)',
     *         'recursion'   => 'oof(:%foo:s#ar#az:)'
     *     ];
     *   Then, after applying the zFormat, we get:
     *     • plpl:        'Bar', put the first letter in uppercase;
     *     • foo:         'arBar', call the parameter plpl;
     *     • favoriteCar: 'A delorean!', all is in lowercase;
     *     • truth:       'To Life universe everything else is 42', all is in
     *                    lowercase, then replace underscores by spaces, and
     *                    finally put the first letter in uppercase; and no
     *                    transformation for 42;
     *     • file:        '/a/file/20090505/wor.21', get date constants, then
     *                    get the tail of the path and remove extension twice,
     *                    and add the extension of power;
     *     • recursion:   'oofarBaz', get 'arbar' first, and then, replace the
     *                    suffix 'ar' by 'az'.
     *
     * @param   string  $value    Parameter value.
     * @return  string
     * @throws  \Hoa\Zformat\Exception
     */
    public function zFormat($value)
    {
        if (!\is_string($value)) {
            return $value;
        }
        if (isset($this->_cache[$value])) {
            return $this->_cache[$value];
        }
        if (null === self::$_constants) {
            self::initializeConstants();
        }
        $self = $this;
        $keywords = $this->getKeywords();
        $parameters = $this->getParameters();
        return $this->_cache[$value] = \preg_replace_callback('#\\(:(.*?):\\)#', function ($match) use($self, $value, &$keywords, &$parameters) {
            \preg_match('#([^:]+)(?::(.*))?#', $match[1], $submatch);
            if (!isset($submatch[1])) {
                return '';
            }
            $out = null;
            $key = $submatch[1];
            $word = \substr($key, 1);
            // Call a parameter.
            if ('%' == $key[0]) {
                if (\false === \array_key_exists($word, $parameters)) {
                    throw new \Hoa\Zformat\Exception('Parameter %s is not found in parameters.', 0, $word);
                }
                $handle = $parameters[$word];
                $out = $self->zFormat($handle);
            } elseif ('_' == $key[0]) {
                $constants = \Hoa\Zformat\Parameter::getConstants();
                foreach (\str_split($word) as $k => $v) {
                    if (!isset($constants[$v])) {
                        throw new \Hoa\Zformat\Exception('Constant char %s is not supported in the ' . 'rule %s.', 1, [$v, $value]);
                    }
                    $out .= $constants[$v];
                }
            } else {
                if (\false === \array_key_exists($key, $keywords)) {
                    throw new \Hoa\Zformat\Exception('Keyword %s is not found in the rule %s.', 2, [$key, $value]);
                }
                $out = $keywords[$key];
            }
            if (!isset($submatch[2])) {
                return $out;
            }
            \preg_match_all('#(h|t|r|e|l|u|U|s(/|%|\\#)(.*?)(?<!\\\\)\\2(.*?)(?:(?<!\\\\)\\2|$))#', $submatch[2], $flags);
            if (empty($flags) || empty($flags[1])) {
                throw new \Hoa\Zformat\Exception('Unrecognized format pattern %s in the rule %s.', 3, [$match[0], $value]);
            }
            foreach ($flags[1] as $i => $flag) {
                switch ($flag) {
                    case 'h':
                        $out = \dirname($out);
                        break;
                    case 't':
                        $out = \basename($out);
                        break;
                    case 'r':
                        if (\false !== ($position = \strrpos($out, '.', 1))) {
                            $out = \substr($out, 0, $position);
                        }
                        break;
                    case 'e':
                        if (\false !== ($position = \strrpos($out, '.', 1))) {
                            $out = \substr($out, $position + 1);
                        }
                        break;
                    case 'l':
                        $out = \strtolower($out);
                        break;
                    case 'u':
                        $out = \strtoupper($out);
                        break;
                    case 'U':
                        $handle = null;
                        foreach (\explode('\\', $out) as $part) {
                            if (null === $handle) {
                                $handle = \ucfirst($part);
                            } else {
                                $handle .= '\\' . \ucfirst($part);
                            }
                        }
                        $out = $handle;
                        break;
                    default:
                        if (!isset($flags[3]) && !isset($flags[4])) {
                            throw new \Hoa\Zformat\Exception('Unrecognized format pattern in the rule %s.', 4, $value);
                        }
                        $l = \preg_quote($flags[3][$i], '#');
                        $r = $flags[4][$i];
                        switch ($flags[2][$i]) {
                            case '%':
                                $l = '^' . $l;
                                break;
                            case '#':
                                $l .= '$';
                                break;
                        }
                        $out = \preg_replace('#' . $l . '#', $r, $out);
                }
            }
            return $out;
        }, $value);
    }
    /**
     * Reset zFormat cache.
     *
     * @return  void
     */
    private function resetCache()
    {
        unset($this->_cache);
        $this->_cache = [];
        return;
    }
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Zformat;

use Hoa\Exception as HoaException;
/**
 * Class \Hoa\Zformat\Exception.
 *
 * Extending the \Hoa\Exception\Exception class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Exception extends HoaException
{
}
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Regex\Visitor;

use Hoa\Math;
use Hoa\Regex;
use Hoa\Ustring;
use Hoa\Visitor;
/**
 * Class \Hoa\Regex\Visitor\Isotropic.
 *
 * Isotropic walk on the AST to generate a data.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Isotropic implements Visitor\Visit
{
    /**
     * Numeric-sampler.
     *
     * @var \Hoa\Math\Sampler
     */
    protected $_sampler = null;
    /**
     * Initialize numeric-sampler.
     *
     * @param   \Hoa\Math\Sampler  $sampler    Numeric-sampler.
     */
    public function __construct(Math\Sampler $sampler)
    {
        $this->_sampler = $sampler;
        return;
    }
    /**
     * Visit an element.
     *
     * @param   \Hoa\Visitor\Element  $element    Element to visit.
     * @param   mixed                 &$handle    Handle (reference).
     * @param   mixed                 $eldnah     Handle (not reference).
     * @return  mixed
     * @throws  \Hoa\Regex\Exception
     */
    public function visit(Visitor\Element $element, &$handle = null, $eldnah = null)
    {
        switch ($element->getId()) {
            case '#expression':
            case '#capturing':
            case '#noncapturing':
            case '#namedcapturing':
                return $element->getChild(0)->accept($this, $handle, $eldnah);
            case '#alternation':
            case '#class':
                return $element->getChild($this->_sampler->getInteger(0, $element->getChildrenNumber() - 1))->accept($this, $handle, $eldnah);
            case '#concatenation':
                $out = null;
                foreach ($element->getChildren() as $child) {
                    $out .= $child->accept($this, $handle, $eldnah);
                }
                return $out;
            case '#quantification':
                $out = null;
                $xy = $element->getChild(1)->getValueValue();
                $x = 0;
                $y = 0;
                switch ($element->getChild(1)->getValueToken()) {
                    case 'zero_or_one':
                        $y = 1;
                        break;
                    case 'zero_or_more':
                        $y = \mt_rand(5, 8);
                        // why not?
                        break;
                    case 'one_or_more':
                        $x = 1;
                        $y = \mt_rand(5, 8);
                        // why not?
                        break;
                    case 'exactly_n':
                        $x = $y = (int) \substr($xy, 1, -1);
                        break;
                    case 'n_to_m':
                        $xy = \explode(',', \substr($xy, 1, -1));
                        $x = (int) \trim($xy[0]);
                        $y = (int) \trim($xy[1]);
                        break;
                    case 'n_or_more':
                        $xy = \explode(',', \substr($xy, 1, -1));
                        $x = (int) \trim($xy[0]);
                        $y = \mt_rand($x + 5, $x + 8);
                        // why not?
                        break;
                }
                for ($i = 0, $max = $this->_sampler->getInteger($x, $y); $i < $max; ++$i) {
                    $out .= $element->getChild(0)->accept($this, $handle, $eldnah);
                }
                return $out;
            case '#negativeclass':
                $c = [];
                foreach ($element->getChildren() as $child) {
                    $c[Ustring::toCode($child->accept($this, $handle, $eldnah))] = \true;
                }
                do {
                    // all printable ASCII.
                    $i = $this->_sampler->getInteger(32, 126);
                } while (isset($c[$i]));
                return Ustring::fromCode($i);
            case '#range':
                $out = null;
                $left = $element->getChild(0)->accept($this, $handle, $eldnah);
                $right = $element->getChild(1)->accept($this, $handle, $eldnah);
                return Ustring::fromCode($this->_sampler->getInteger(Ustring::toCode($left), Ustring::toCode($right)));
            case 'token':
                $value = $element->getValueValue();
                switch ($element->getValueToken()) {
                    case 'character':
                        $value = \ltrim($value, '\\');
                        switch ($value) {
                            case 'a':
                                return "\\a";
                            case 'e':
                                return "\x1b";
                            case 'f':
                                return "\f";
                            case 'n':
                                return "\n";
                            case 'r':
                                return "\r";
                            case 't':
                                return "\t";
                            default:
                                return Ustring::fromCode(\intval(\substr($value, 1)));
                        }
                        break;
                    case 'dynamic_character':
                        $value = \ltrim($value, '\\');
                        switch ($value[0]) {
                            case 'x':
                                $value = \trim($value, 'x{}');
                                return Ustring::fromCode(\hexdec($value));
                            default:
                                return Ustring::fromCode(\octdec($value));
                        }
                        break;
                    case 'character_type':
                        $value = \ltrim($value, '\\');
                        if ('s' === $value) {
                            $value = $this->_sampler->getInteger(0, 1) ? 'h' : 'v';
                        }
                        switch ($value) {
                            case 'C':
                                return $this->_sampler->getInteger(0, 127);
                            case 'd':
                                return $this->_sampler->getInteger(0, 9);
                            case 'h':
                                $h = [Ustring::fromCode(0x9), Ustring::fromCode(0x20), Ustring::fromCode(0xa0)];
                                return $h[$this->_sampler->getInteger(0, \count($h) - 1)];
                            case 'v':
                                $v = [Ustring::fromCode(0xa), Ustring::fromCode(0xb), Ustring::fromCode(0xc), Ustring::fromCode(0xd)];
                                return $v[$this->_sampler->getInteger(0, \count($v) - 1)];
                            case 'w':
                                $w = \array_merge(\range(0x41, 0x5a), \range(0x61, 0x7a), [0x5f]);
                                return Ustring::fromCode($w[$this->_sampler->getInteger(0, \count($w) - 1)]);
                            default:
                                return '?';
                        }
                        break;
                    case 'literal':
                        if ('.' === $value) {
                            $w = \array_merge(\range(0x41, 0x5a), \range(0x61, 0x7a), [0x5f]);
                            return Ustring::fromCode($w[$this->_sampler->getInteger(0, \count($w) - 1)]);
                        }
                        return \str_replace('\\\\', '\\', \preg_replace('#\\\\(?!\\\\)#', '', $value));
                }
                break;
            case '#internal_options':
                break;
            default:
                throw new Regex\Exception('Unsupported node: %s.', 0, $element->getId());
        }
        return;
    }
}
//
// Hoa
//
//
// @license
//
// New BSD License
//
// Copyright © 2007-2017, Hoa community. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//     * Redistributions of source code must retain the above copyright
//       notice, this list of conditions and the following disclaimer.
//     * Redistributions in binary form must reproduce the above copyright
//       notice, this list of conditions and the following disclaimer in the
//       documentation and/or other materials provided with the distribution.
//     * Neither the name of the Hoa nor the names of its contributors may be
//       used to endorse or promote products derived from this software without
//       specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// Grammar \Hoa\Regex\Grammar.
//
// Provide grammar of PCRE (Perl Compatible Regular Expression)for the LL(k)
// parser. More informations at http://pcre.org/pcre.txt, sections pcrepattern &
// pcresyntax.
//
// @copyright  Copyright © 2007-2017 Hoa community.
// @license    New BSD License
//


// Skip.
%skip   nl                       \n

// Character classes.
%token  negative_class_          \[\^
%token  class_                   \[
%token _class                    \]
%token  range                    \-

// Internal options.
%token  internal_option          \(\?[\-+]?[imsx]\)

// Lookahead and lookbehind assertions.
%token  lookahead_               \(\?=
%token  negative_lookahead_      \(\?!
%token  lookbehind_              \(\?<=
%token  negative_lookbehind_     \(\?<!

// Conditions.
%token  named_reference_         \(\?\(<            -> nc
%token  absolute_reference_      \(\?\((?=\d)       -> c
%token  relative_reference_      \(\?\((?=[\+\-])   -> c
%token  c:index                  [\+\-]?\d+         -> default
%token  assertion_reference_     \(\?\(

// Comments.
%token  comment_                 \(\?#              -> co
%token  co:_comment              \)                 -> default
%token  co:comment               .*?(?=(?<!\\)\))

// Capturing group.
%token  named_capturing_         \(\?<              -> nc
%token  nc:_named_capturing      >                  -> default
%token  nc:capturing_name        .+?(?=(?<!\\)>)
%token  non_capturing_           \(\?:
%token  non_capturing_reset_     \(\?\|
%token  atomic_group_            \(\?>
%token  capturing_               \(
%token _capturing                \)

// Quantifiers (by default, greedy).
%token  zero_or_one_possessive   \?\+
%token  zero_or_one_lazy         \?\?
%token  zero_or_one              \?
%token  zero_or_more_possessive  \*\+
%token  zero_or_more_lazy        \*\?
%token  zero_or_more             \*
%token  one_or_more_possessive   \+\+
%token  one_or_more_lazy         \+\?
%token  one_or_more              \+
%token  exactly_n                \{[0-9]+\}
%token  n_to_m_possessive        \{[0-9]+,[0-9]+\}\+
%token  n_to_m_lazy              \{[0-9]+,[0-9]+\}\?
%token  n_to_m                   \{[0-9]+,[0-9]+\}
%token  n_or_more_possessive     \{[0-9]+,\}\+
%token  n_or_more_lazy           \{[0-9]+,\}\?
%token  n_or_more                \{[0-9]+,\}

// Alternation.
%token alternation               \|

// Literal.
%token character                 \\([aefnrt]|c[\x00-\x7f])
%token dynamic_character         \\([0-7]{3}|x[0-9a-zA-Z]{2}|x{[0-9a-zA-Z]+})
// Please, see PCRESYNTAX(3), General Category properties, PCRE special category
// properties and script names for \p{} and \P{}.
%token character_type            \\([CdDhHNRsSvVwWX]|[pP]{[^}]+})
%token anchor                    \\(bBAZzG)|\^|\$
%token match_point_reset         \\K
%token literal                   \\.|.


// Rules.

#expression:
    alternation()

alternation:
    concatenation() ( ::alternation:: concatenation() #alternation )*

concatenation:
    (   internal_options() | assertion() | quantification() | condition() )
    ( ( internal_options() | assertion() | quantification() | condition() ) #concatenation )*

#internal_options:
    <internal_option>

#condition:
    (
        ::named_reference_:: <capturing_name> ::_named_capturing:: #namedcondition
      | (
            ::relative_reference_:: #relativecondition
          | ::absolute_reference_:: #absolutecondition
        )
        <index>
      | ::assertion_reference_:: alternation() #assertioncondition
    )
    ::_capturing:: concatenation()?
    ( ::alternation:: concatenation()? )?
    ::_capturing::

assertion:
    (
        ::lookahead_::           #lookahead
      | ::negative_lookahead_::  #negativelookahead
      | ::lookbehind_::          #lookbehind
      | ::negative_lookbehind_:: #negativelookbehind
    )
    alternation() ::_capturing::

quantification:
    ( class() | simple() ) ( quantifier() #quantification )?

quantifier:
    <zero_or_one_possessive>  | <zero_or_one_lazy>  | <zero_or_one>
  | <zero_or_more_possessive> | <zero_or_more_lazy> | <zero_or_more>
  | <one_or_more_possessive>  | <one_or_more_lazy>  | <one_or_more>
  | <exactly_n>
  | <n_to_m_possessive>       | <n_to_m_lazy>       | <n_to_m>
  | <n_or_more_possessive>    | <n_or_more_lazy>    | <n_or_more>

#class:
    (
        ::negative_class_:: #negativeclass
      | ::class_::
    )
    ( range() | literal() )+
    ::_class::

#range:
    literal() ::range:: literal()

simple:
    capturing()
  | literal()

capturing:
    ::comment_:: <comment>? ::_comment:: #comment
  | (
        ::named_capturing_:: <capturing_name> ::_named_capturing:: #namedcapturing
      | ::non_capturing_:: #noncapturing
      | ::non_capturing_reset_:: #noncapturingreset
      | ::atomic_group_:: #atomicgroup
      | ::capturing_::
    )
    alternation() ::_capturing::

literal:
    <character>
  | <dynamic_character>
  | <character_type>
  | <anchor>
  | <match_point_reset>
  | <literal>
<?php

/**
 * Hoa
 *
 *
 * @license
 *
 * New BSD License
 *
 * Copyright © 2007-2017, Hoa community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
namespace Hoa\Regex;

use Hoa\Exception as HoaException;
/**
 * Class \Hoa\Regex\Exception.
 *
 * Extending the \Hoa\Exception\Exception class.
 *
 * @copyright  Copyright © 2007-2017 Hoa community
 * @license    New BSD License
 */
class Exception extends HoaException
{
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast;

use function array_key_exists;
trait NodeAttributes
{
    /** @var array<string, mixed> */
    private $attributes = [];
    /**
     * @param mixed $value
     */
    public function setAttribute(string $key, $value) : void
    {
        $this->attributes[$key] = $value;
    }
    public function hasAttribute(string $key) : bool
    {
        return array_key_exists($key, $this->attributes);
    }
    /**
     * @return mixed
     */
    public function getAttribute(string $key)
    {
        if ($this->hasAttribute($key)) {
            return $this->attributes[$key];
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast;

use LogicException;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocChildNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use function array_keys;
use function array_pop;
use function array_splice;
use function count;
use function get_class;
use function get_object_vars;
use function gettype;
use function is_array;
use function sprintf;
/**
 * Inspired by https://github.com/nikic/PHP-Parser/tree/36a6dcd04e7b0285e8f0868f44bd4927802f7df1
 *
 * Copyright (c) 2011, Nikita Popov
 * All rights reserved.
 */
final class NodeTraverser
{
    /**
     * If NodeVisitor::enterNode() returns DONT_TRAVERSE_CHILDREN, child nodes
     * of the current node will not be traversed for any visitors.
     *
     * For subsequent visitors enterNode() will still be called on the current
     * node and leaveNode() will also be invoked for the current node.
     */
    public const DONT_TRAVERSE_CHILDREN = 1;
    /**
     * If NodeVisitor::enterNode() or NodeVisitor::leaveNode() returns
     * STOP_TRAVERSAL, traversal is aborted.
     *
     * The afterTraverse() method will still be invoked.
     */
    public const STOP_TRAVERSAL = 2;
    /**
     * If NodeVisitor::leaveNode() returns REMOVE_NODE for a node that occurs
     * in an array, it will be removed from the array.
     *
     * For subsequent visitors leaveNode() will still be invoked for the
     * removed node.
     */
    public const REMOVE_NODE = 3;
    /**
     * If NodeVisitor::enterNode() returns DONT_TRAVERSE_CURRENT_AND_CHILDREN, child nodes
     * of the current node will not be traversed for any visitors.
     *
     * For subsequent visitors enterNode() will not be called as well.
     * leaveNode() will be invoked for visitors that has enterNode() method invoked.
     */
    public const DONT_TRAVERSE_CURRENT_AND_CHILDREN = 4;
    /** @var list<NodeVisitor> Visitors */
    private $visitors = [];
    /** @var bool Whether traversal should be stopped */
    private $stopTraversal;
    /**
     * @param list<NodeVisitor> $visitors
     */
    public function __construct(array $visitors)
    {
        $this->visitors = $visitors;
    }
    /**
     * Traverses an array of nodes using the registered visitors.
     *
     * @param Node[] $nodes Array of nodes
     *
     * @return Node[] Traversed array of nodes
     */
    public function traverse(array $nodes) : array
    {
        $this->stopTraversal = \false;
        foreach ($this->visitors as $visitor) {
            $return = $visitor->beforeTraverse($nodes);
            if ($return === null) {
                continue;
            }
            $nodes = $return;
        }
        $nodes = $this->traverseArray($nodes);
        foreach ($this->visitors as $visitor) {
            $return = $visitor->afterTraverse($nodes);
            if ($return === null) {
                continue;
            }
            $nodes = $return;
        }
        return $nodes;
    }
    /**
     * Recursively traverse a node.
     *
     * @param Node $node Node to traverse.
     *
     * @return Node Result of traversal (may be original node or new one)
     */
    private function traverseNode(\PHPStan\PhpDocParser\Ast\Node $node) : \PHPStan\PhpDocParser\Ast\Node
    {
        $subNodeNames = array_keys(get_object_vars($node));
        foreach ($subNodeNames as $name) {
            $subNode =& $node->{$name};
            if (is_array($subNode)) {
                $subNode = $this->traverseArray($subNode);
                if ($this->stopTraversal) {
                    break;
                }
            } elseif ($subNode instanceof \PHPStan\PhpDocParser\Ast\Node) {
                $traverseChildren = \true;
                $breakVisitorIndex = null;
                foreach ($this->visitors as $visitorIndex => $visitor) {
                    $return = $visitor->enterNode($subNode);
                    if ($return === null) {
                        continue;
                    }
                    if ($return instanceof \PHPStan\PhpDocParser\Ast\Node) {
                        $this->ensureReplacementReasonable($subNode, $return);
                        $subNode = $return;
                    } elseif ($return === self::DONT_TRAVERSE_CHILDREN) {
                        $traverseChildren = \false;
                    } elseif ($return === self::DONT_TRAVERSE_CURRENT_AND_CHILDREN) {
                        $traverseChildren = \false;
                        $breakVisitorIndex = $visitorIndex;
                        break;
                    } elseif ($return === self::STOP_TRAVERSAL) {
                        $this->stopTraversal = \true;
                        break 2;
                    } else {
                        throw new LogicException('enterNode() returned invalid value of type ' . gettype($return));
                    }
                }
                if ($traverseChildren) {
                    $subNode = $this->traverseNode($subNode);
                    if ($this->stopTraversal) {
                        break;
                    }
                }
                foreach ($this->visitors as $visitorIndex => $visitor) {
                    $return = $visitor->leaveNode($subNode);
                    if ($return !== null) {
                        if ($return instanceof \PHPStan\PhpDocParser\Ast\Node) {
                            $this->ensureReplacementReasonable($subNode, $return);
                            $subNode = $return;
                        } elseif ($return === self::STOP_TRAVERSAL) {
                            $this->stopTraversal = \true;
                            break 2;
                        } elseif (is_array($return)) {
                            throw new LogicException('leaveNode() may only return an array ' . 'if the parent structure is an array');
                        } else {
                            throw new LogicException('leaveNode() returned invalid value of type ' . gettype($return));
                        }
                    }
                    if ($breakVisitorIndex === $visitorIndex) {
                        break;
                    }
                }
            }
        }
        return $node;
    }
    /**
     * Recursively traverse array (usually of nodes).
     *
     * @param mixed[] $nodes Array to traverse
     *
     * @return mixed[] Result of traversal (may be original array or changed one)
     */
    private function traverseArray(array $nodes) : array
    {
        $doNodes = [];
        foreach ($nodes as $i => &$node) {
            if ($node instanceof \PHPStan\PhpDocParser\Ast\Node) {
                $traverseChildren = \true;
                $breakVisitorIndex = null;
                foreach ($this->visitors as $visitorIndex => $visitor) {
                    $return = $visitor->enterNode($node);
                    if ($return === null) {
                        continue;
                    }
                    if ($return instanceof \PHPStan\PhpDocParser\Ast\Node) {
                        $this->ensureReplacementReasonable($node, $return);
                        $node = $return;
                    } elseif (is_array($return)) {
                        $doNodes[] = [$i, $return];
                        continue 2;
                    } elseif ($return === self::REMOVE_NODE) {
                        $doNodes[] = [$i, []];
                        continue 2;
                    } elseif ($return === self::DONT_TRAVERSE_CHILDREN) {
                        $traverseChildren = \false;
                    } elseif ($return === self::DONT_TRAVERSE_CURRENT_AND_CHILDREN) {
                        $traverseChildren = \false;
                        $breakVisitorIndex = $visitorIndex;
                        break;
                    } elseif ($return === self::STOP_TRAVERSAL) {
                        $this->stopTraversal = \true;
                        break 2;
                    } else {
                        throw new LogicException('enterNode() returned invalid value of type ' . gettype($return));
                    }
                }
                if ($traverseChildren) {
                    $node = $this->traverseNode($node);
                    if ($this->stopTraversal) {
                        break;
                    }
                }
                foreach ($this->visitors as $visitorIndex => $visitor) {
                    $return = $visitor->leaveNode($node);
                    if ($return !== null) {
                        if ($return instanceof \PHPStan\PhpDocParser\Ast\Node) {
                            $this->ensureReplacementReasonable($node, $return);
                            $node = $return;
                        } elseif (is_array($return)) {
                            $doNodes[] = [$i, $return];
                            break;
                        } elseif ($return === self::REMOVE_NODE) {
                            $doNodes[] = [$i, []];
                            break;
                        } elseif ($return === self::STOP_TRAVERSAL) {
                            $this->stopTraversal = \true;
                            break 2;
                        } else {
                            throw new LogicException('leaveNode() returned invalid value of type ' . gettype($return));
                        }
                    }
                    if ($breakVisitorIndex === $visitorIndex) {
                        break;
                    }
                }
            } elseif (is_array($node)) {
                throw new LogicException('Invalid node structure: Contains nested arrays');
            }
        }
        if (count($doNodes) > 0) {
            while ([$i, $replace] = array_pop($doNodes)) {
                array_splice($nodes, $i, 1, $replace);
            }
        }
        return $nodes;
    }
    private function ensureReplacementReasonable(\PHPStan\PhpDocParser\Ast\Node $old, \PHPStan\PhpDocParser\Ast\Node $new) : void
    {
        if ($old instanceof TypeNode && !$new instanceof TypeNode) {
            throw new LogicException(sprintf('Trying to replace TypeNode with %s', get_class($new)));
        }
        if ($old instanceof ConstExprNode && !$new instanceof ConstExprNode) {
            throw new LogicException(sprintf('Trying to replace ConstExprNode with %s', get_class($new)));
        }
        if ($old instanceof PhpDocChildNode && !$new instanceof PhpDocChildNode) {
            throw new LogicException(sprintf('Trying to replace PhpDocChildNode with %s', get_class($new)));
        }
        if ($old instanceof PhpDocTagValueNode && !$new instanceof PhpDocTagValueNode) {
            throw new LogicException(sprintf('Trying to replace PhpDocTagValueNode with %s', get_class($new)));
        }
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\Type;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
class OffsetAccessTypeNode implements \PHPStan\PhpDocParser\Ast\Type\TypeNode
{
    use NodeAttributes;
    /** @var TypeNode */
    public $type;
    /** @var TypeNode */
    public $offset;
    public function __construct(\PHPStan\PhpDocParser\Ast\Type\TypeNode $type, \PHPStan\PhpDocParser\Ast\Type\TypeNode $offset)
    {
        $this->type = $type;
        $this->offset = $offset;
    }
    public function __toString() : string
    {
        if ($this->type instanceof \PHPStan\PhpDocParser\Ast\Type\CallableTypeNode || $this->type instanceof \PHPStan\PhpDocParser\Ast\Type\ConstTypeNode || $this->type instanceof \PHPStan\PhpDocParser\Ast\Type\NullableTypeNode) {
            return '(' . $this->type . ')[' . $this->offset . ']';
        }
        return $this->type . '[' . $this->offset . ']';
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\Type;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use function array_map;
use function implode;
class IntersectionTypeNode implements \PHPStan\PhpDocParser\Ast\Type\TypeNode
{
    use NodeAttributes;
    /** @var TypeNode[] */
    public $types;
    /**
     * @param TypeNode[] $types
     */
    public function __construct(array $types)
    {
        $this->types = $types;
    }
    public function __toString() : string
    {
        return '(' . implode(' & ', array_map(static function (\PHPStan\PhpDocParser\Ast\Type\TypeNode $type) : string {
            if ($type instanceof \PHPStan\PhpDocParser\Ast\Type\NullableTypeNode) {
                return '(' . $type . ')';
            }
            return (string) $type;
        }, $this->types)) . ')';
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\Type;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
class IdentifierTypeNode implements \PHPStan\PhpDocParser\Ast\Type\TypeNode
{
    use NodeAttributes;
    /** @var string */
    public $name;
    public function __construct(string $name)
    {
        $this->name = $name;
    }
    public function __toString() : string
    {
        return $this->name;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\Type;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
class NullableTypeNode implements \PHPStan\PhpDocParser\Ast\Type\TypeNode
{
    use NodeAttributes;
    /** @var TypeNode */
    public $type;
    public function __construct(\PHPStan\PhpDocParser\Ast\Type\TypeNode $type)
    {
        $this->type = $type;
    }
    public function __toString() : string
    {
        return '?' . $this->type;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\Type;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use function implode;
use function sprintf;
class GenericTypeNode implements \PHPStan\PhpDocParser\Ast\Type\TypeNode
{
    public const VARIANCE_INVARIANT = 'invariant';
    public const VARIANCE_COVARIANT = 'covariant';
    public const VARIANCE_CONTRAVARIANT = 'contravariant';
    public const VARIANCE_BIVARIANT = 'bivariant';
    use NodeAttributes;
    /** @var IdentifierTypeNode */
    public $type;
    /** @var TypeNode[] */
    public $genericTypes;
    /** @var (self::VARIANCE_*)[] */
    public $variances;
    /**
     * @param TypeNode[] $genericTypes
     * @param (self::VARIANCE_*)[] $variances
     */
    public function __construct(\PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode $type, array $genericTypes, array $variances = [])
    {
        $this->type = $type;
        $this->genericTypes = $genericTypes;
        $this->variances = $variances;
    }
    public function __toString() : string
    {
        $genericTypes = [];
        foreach ($this->genericTypes as $index => $type) {
            $variance = $this->variances[$index] ?? self::VARIANCE_INVARIANT;
            if ($variance === self::VARIANCE_INVARIANT) {
                $genericTypes[] = (string) $type;
            } elseif ($variance === self::VARIANCE_BIVARIANT) {
                $genericTypes[] = '*';
            } else {
                $genericTypes[] = sprintf('%s %s', $variance, $type);
            }
        }
        return $this->type . '<' . implode(', ', $genericTypes) . '>';
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\Type;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use function array_map;
use function implode;
class UnionTypeNode implements \PHPStan\PhpDocParser\Ast\Type\TypeNode
{
    use NodeAttributes;
    /** @var TypeNode[] */
    public $types;
    /**
     * @param TypeNode[] $types
     */
    public function __construct(array $types)
    {
        $this->types = $types;
    }
    public function __toString() : string
    {
        return '(' . implode(' | ', array_map(static function (\PHPStan\PhpDocParser\Ast\Type\TypeNode $type) : string {
            if ($type instanceof \PHPStan\PhpDocParser\Ast\Type\NullableTypeNode) {
                return '(' . $type . ')';
            }
            return (string) $type;
        }, $this->types)) . ')';
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\Type;

use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNode;
use PHPStan\PhpDocParser\Ast\NodeAttributes;
class ConstTypeNode implements \PHPStan\PhpDocParser\Ast\Type\TypeNode
{
    use NodeAttributes;
    /** @var ConstExprNode */
    public $constExpr;
    public function __construct(ConstExprNode $constExpr)
    {
        $this->constExpr = $constExpr;
    }
    public function __toString() : string
    {
        return $this->constExpr->__toString();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\Type;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
class ArrayTypeNode implements \PHPStan\PhpDocParser\Ast\Type\TypeNode
{
    use NodeAttributes;
    /** @var TypeNode */
    public $type;
    public function __construct(\PHPStan\PhpDocParser\Ast\Type\TypeNode $type)
    {
        $this->type = $type;
    }
    public function __toString() : string
    {
        if ($this->type instanceof \PHPStan\PhpDocParser\Ast\Type\CallableTypeNode || $this->type instanceof \PHPStan\PhpDocParser\Ast\Type\ConstTypeNode || $this->type instanceof \PHPStan\PhpDocParser\Ast\Type\NullableTypeNode) {
            return '(' . $this->type . ')[]';
        }
        return $this->type . '[]';
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\Type;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Parser\ParserException;
class InvalidTypeNode implements \PHPStan\PhpDocParser\Ast\Type\TypeNode
{
    use NodeAttributes;
    /** @var mixed[] */
    private $exceptionArgs;
    public function __construct(ParserException $exception)
    {
        $this->exceptionArgs = [$exception->getCurrentTokenValue(), $exception->getCurrentTokenType(), $exception->getCurrentOffset(), $exception->getExpectedTokenType(), $exception->getExpectedTokenValue(), $exception->getCurrentTokenLine()];
    }
    public function getException() : ParserException
    {
        return new ParserException(...$this->exceptionArgs);
    }
    public function __toString() : string
    {
        return '*Invalid type*';
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\Type;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use function implode;
class ObjectShapeNode implements \PHPStan\PhpDocParser\Ast\Type\TypeNode
{
    use NodeAttributes;
    /** @var ObjectShapeItemNode[] */
    public $items;
    /**
     * @param ObjectShapeItemNode[] $items
     */
    public function __construct(array $items)
    {
        $this->items = $items;
    }
    public function __toString() : string
    {
        $items = $this->items;
        return 'object{' . implode(', ', $items) . '}';
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\Type;

use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprStringNode;
use PHPStan\PhpDocParser\Ast\NodeAttributes;
use function sprintf;
class ObjectShapeItemNode implements \PHPStan\PhpDocParser\Ast\Type\TypeNode
{
    use NodeAttributes;
    /** @var ConstExprStringNode|IdentifierTypeNode */
    public $keyName;
    /** @var bool */
    public $optional;
    /** @var TypeNode */
    public $valueType;
    /**
     * @param ConstExprStringNode|IdentifierTypeNode $keyName
     */
    public function __construct($keyName, bool $optional, \PHPStan\PhpDocParser\Ast\Type\TypeNode $valueType)
    {
        $this->keyName = $keyName;
        $this->optional = $optional;
        $this->valueType = $valueType;
    }
    public function __toString() : string
    {
        if ($this->keyName !== null) {
            return sprintf('%s%s: %s', (string) $this->keyName, $this->optional ? '?' : '', (string) $this->valueType);
        }
        return (string) $this->valueType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\Type;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use function implode;
class CallableTypeNode implements \PHPStan\PhpDocParser\Ast\Type\TypeNode
{
    use NodeAttributes;
    /** @var IdentifierTypeNode */
    public $identifier;
    /** @var CallableTypeParameterNode[] */
    public $parameters;
    /** @var TypeNode */
    public $returnType;
    /**
     * @param CallableTypeParameterNode[] $parameters
     */
    public function __construct(\PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode $identifier, array $parameters, \PHPStan\PhpDocParser\Ast\Type\TypeNode $returnType)
    {
        $this->identifier = $identifier;
        $this->parameters = $parameters;
        $this->returnType = $returnType;
    }
    public function __toString() : string
    {
        $returnType = $this->returnType;
        if ($returnType instanceof self) {
            $returnType = "({$returnType})";
        }
        $parameters = implode(', ', $this->parameters);
        return "{$this->identifier}({$parameters}): {$returnType}";
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\Type;

use PHPStan\PhpDocParser\Ast\Node;
use PHPStan\PhpDocParser\Ast\NodeAttributes;
use function trim;
class CallableTypeParameterNode implements Node
{
    use NodeAttributes;
    /** @var TypeNode */
    public $type;
    /** @var bool */
    public $isReference;
    /** @var bool */
    public $isVariadic;
    /** @var string (may be empty) */
    public $parameterName;
    /** @var bool */
    public $isOptional;
    public function __construct(\PHPStan\PhpDocParser\Ast\Type\TypeNode $type, bool $isReference, bool $isVariadic, string $parameterName, bool $isOptional)
    {
        $this->type = $type;
        $this->isReference = $isReference;
        $this->isVariadic = $isVariadic;
        $this->parameterName = $parameterName;
        $this->isOptional = $isOptional;
    }
    public function __toString() : string
    {
        $type = "{$this->type} ";
        $isReference = $this->isReference ? '&' : '';
        $isVariadic = $this->isVariadic ? '...' : '';
        $isOptional = $this->isOptional ? '=' : '';
        return trim("{$type}{$isReference}{$isVariadic}{$this->parameterName}") . $isOptional;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\Type;

use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprIntegerNode;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprStringNode;
use PHPStan\PhpDocParser\Ast\NodeAttributes;
use function sprintf;
class ArrayShapeItemNode implements \PHPStan\PhpDocParser\Ast\Type\TypeNode
{
    use NodeAttributes;
    /** @var ConstExprIntegerNode|ConstExprStringNode|IdentifierTypeNode|null */
    public $keyName;
    /** @var bool */
    public $optional;
    /** @var TypeNode */
    public $valueType;
    /**
     * @param ConstExprIntegerNode|ConstExprStringNode|IdentifierTypeNode|null $keyName
     */
    public function __construct($keyName, bool $optional, \PHPStan\PhpDocParser\Ast\Type\TypeNode $valueType)
    {
        $this->keyName = $keyName;
        $this->optional = $optional;
        $this->valueType = $valueType;
    }
    public function __toString() : string
    {
        if ($this->keyName !== null) {
            return sprintf('%s%s: %s', (string) $this->keyName, $this->optional ? '?' : '', (string) $this->valueType);
        }
        return (string) $this->valueType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\Type;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use function implode;
class ArrayShapeNode implements \PHPStan\PhpDocParser\Ast\Type\TypeNode
{
    public const KIND_ARRAY = 'array';
    public const KIND_LIST = 'list';
    use NodeAttributes;
    /** @var ArrayShapeItemNode[] */
    public $items;
    /** @var bool */
    public $sealed;
    /** @var self::KIND_* */
    public $kind;
    /**
     * @param ArrayShapeItemNode[] $items
     * @param self::KIND_* $kind
     */
    public function __construct(array $items, bool $sealed = \true, string $kind = self::KIND_ARRAY)
    {
        $this->items = $items;
        $this->sealed = $sealed;
        $this->kind = $kind;
    }
    public function __toString() : string
    {
        $items = $this->items;
        if (!$this->sealed) {
            $items[] = '...';
        }
        return $this->kind . '{' . implode(', ', $items) . '}';
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\Type;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
class ThisTypeNode implements \PHPStan\PhpDocParser\Ast\Type\TypeNode
{
    use NodeAttributes;
    public function __toString() : string
    {
        return '$this';
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\Type;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use function sprintf;
class ConditionalTypeForParameterNode implements \PHPStan\PhpDocParser\Ast\Type\TypeNode
{
    use NodeAttributes;
    /** @var string */
    public $parameterName;
    /** @var TypeNode */
    public $targetType;
    /** @var TypeNode */
    public $if;
    /** @var TypeNode */
    public $else;
    /** @var bool */
    public $negated;
    public function __construct(string $parameterName, \PHPStan\PhpDocParser\Ast\Type\TypeNode $targetType, \PHPStan\PhpDocParser\Ast\Type\TypeNode $if, \PHPStan\PhpDocParser\Ast\Type\TypeNode $else, bool $negated)
    {
        $this->parameterName = $parameterName;
        $this->targetType = $targetType;
        $this->if = $if;
        $this->else = $else;
        $this->negated = $negated;
    }
    public function __toString() : string
    {
        return sprintf('(%s %s %s ? %s : %s)', $this->parameterName, $this->negated ? 'is not' : 'is', $this->targetType, $this->if, $this->else);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\Type;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use function sprintf;
class ConditionalTypeNode implements \PHPStan\PhpDocParser\Ast\Type\TypeNode
{
    use NodeAttributes;
    /** @var TypeNode */
    public $subjectType;
    /** @var TypeNode */
    public $targetType;
    /** @var TypeNode */
    public $if;
    /** @var TypeNode */
    public $else;
    /** @var bool */
    public $negated;
    public function __construct(\PHPStan\PhpDocParser\Ast\Type\TypeNode $subjectType, \PHPStan\PhpDocParser\Ast\Type\TypeNode $targetType, \PHPStan\PhpDocParser\Ast\Type\TypeNode $if, \PHPStan\PhpDocParser\Ast\Type\TypeNode $else, bool $negated)
    {
        $this->subjectType = $subjectType;
        $this->targetType = $targetType;
        $this->if = $if;
        $this->else = $else;
        $this->negated = $negated;
    }
    public function __toString() : string
    {
        return sprintf('(%s %s %s ? %s : %s)', $this->subjectType, $this->negated ? 'is not' : 'is', $this->targetType, $this->if, $this->else);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\Type;

use PHPStan\PhpDocParser\Ast\Node;
interface TypeNode extends Node
{
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\ConstExpr;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use function addcslashes;
use function assert;
use function dechex;
use function ord;
use function preg_replace_callback;
use function sprintf;
use function str_pad;
use function strlen;
use const STR_PAD_LEFT;
class QuoteAwareConstExprStringNode extends \PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprStringNode implements \PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNode
{
    public const SINGLE_QUOTED = 1;
    public const DOUBLE_QUOTED = 2;
    use NodeAttributes;
    /** @var self::SINGLE_QUOTED|self::DOUBLE_QUOTED */
    public $quoteType;
    /**
     * @param self::SINGLE_QUOTED|self::DOUBLE_QUOTED $quoteType
     */
    public function __construct(string $value, int $quoteType)
    {
        parent::__construct($value);
        $this->quoteType = $quoteType;
    }
    public function __toString() : string
    {
        if ($this->quoteType === self::SINGLE_QUOTED) {
            // from https://github.com/nikic/PHP-Parser/blob/0ffddce52d816f72d0efc4d9b02e276d3309ef01/lib/PhpParser/PrettyPrinter/Standard.php#L1007
            return sprintf("'%s'", addcslashes($this->value, '\'\\'));
        }
        // from https://github.com/nikic/PHP-Parser/blob/0ffddce52d816f72d0efc4d9b02e276d3309ef01/lib/PhpParser/PrettyPrinter/Standard.php#L1010-L1040
        return sprintf('"%s"', $this->escapeDoubleQuotedString());
    }
    private function escapeDoubleQuotedString() : string
    {
        $quote = '"';
        $escaped = addcslashes($this->value, "\n\r\t\f\v\$" . $quote . '\\');
        // Escape control characters and non-UTF-8 characters.
        // Regex based on https://stackoverflow.com/a/11709412/385378.
        $regex = '/(
              [\\x00-\\x08\\x0E-\\x1F] # Control characters
            | [\\xC0-\\xC1] # Invalid UTF-8 Bytes
            | [\\xF5-\\xFF] # Invalid UTF-8 Bytes
            | \\xE0(?=[\\x80-\\x9F]) # Overlong encoding of prior code point
            | \\xF0(?=[\\x80-\\x8F]) # Overlong encoding of prior code point
            | [\\xC2-\\xDF](?![\\x80-\\xBF]) # Invalid UTF-8 Sequence Start
            | [\\xE0-\\xEF](?![\\x80-\\xBF]{2}) # Invalid UTF-8 Sequence Start
            | [\\xF0-\\xF4](?![\\x80-\\xBF]{3}) # Invalid UTF-8 Sequence Start
            | (?<=[\\x00-\\x7F\\xF5-\\xFF])[\\x80-\\xBF] # Invalid UTF-8 Sequence Middle
            | (?<![\\xC2-\\xDF]|[\\xE0-\\xEF]|[\\xE0-\\xEF][\\x80-\\xBF]|[\\xF0-\\xF4]|[\\xF0-\\xF4][\\x80-\\xBF]|[\\xF0-\\xF4][\\x80-\\xBF]{2})[\\x80-\\xBF] # Overlong Sequence
            | (?<=[\\xE0-\\xEF])[\\x80-\\xBF](?![\\x80-\\xBF]) # Short 3 byte sequence
            | (?<=[\\xF0-\\xF4])[\\x80-\\xBF](?![\\x80-\\xBF]{2}) # Short 4 byte sequence
            | (?<=[\\xF0-\\xF4][\\x80-\\xBF])[\\x80-\\xBF](?![\\x80-\\xBF]) # Short 4 byte sequence (2)
        )/x';
        return preg_replace_callback($regex, static function ($matches) {
            assert(strlen($matches[0]) === 1);
            $hex = dechex(ord($matches[0]));
            return '\\x' . str_pad($hex, 2, '0', STR_PAD_LEFT);
        }, $escaped);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\ConstExpr;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
class ConstExprStringNode implements \PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNode
{
    use NodeAttributes;
    /** @var string */
    public $value;
    public function __construct(string $value)
    {
        $this->value = $value;
    }
    public function __toString() : string
    {
        return $this->value;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\ConstExpr;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
class ConstExprFloatNode implements \PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNode
{
    use NodeAttributes;
    /** @var string */
    public $value;
    public function __construct(string $value)
    {
        $this->value = $value;
    }
    public function __toString() : string
    {
        return $this->value;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\ConstExpr;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
class ConstExprTrueNode implements \PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNode
{
    use NodeAttributes;
    public function __toString() : string
    {
        return 'true';
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\ConstExpr;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use function sprintf;
class ConstExprArrayItemNode implements \PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNode
{
    use NodeAttributes;
    /** @var ConstExprNode|null */
    public $key;
    /** @var ConstExprNode */
    public $value;
    public function __construct(?\PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNode $key, \PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNode $value)
    {
        $this->key = $key;
        $this->value = $value;
    }
    public function __toString() : string
    {
        if ($this->key !== null) {
            return sprintf('%s => %s', $this->key, $this->value);
        }
        return (string) $this->value;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\ConstExpr;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
class ConstFetchNode implements \PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNode
{
    use NodeAttributes;
    /** @var string class name for class constants or empty string for non-class constants */
    public $className;
    /** @var string */
    public $name;
    public function __construct(string $className, string $name)
    {
        $this->className = $className;
        $this->name = $name;
    }
    public function __toString() : string
    {
        if ($this->className === '') {
            return $this->name;
        }
        return "{$this->className}::{$this->name}";
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\ConstExpr;

use PHPStan\PhpDocParser\Ast\Node;
interface ConstExprNode extends Node
{
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\ConstExpr;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
class ConstExprFalseNode implements \PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNode
{
    use NodeAttributes;
    public function __toString() : string
    {
        return 'false';
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\ConstExpr;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
class ConstExprIntegerNode implements \PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNode
{
    use NodeAttributes;
    /** @var string */
    public $value;
    public function __construct(string $value)
    {
        $this->value = $value;
    }
    public function __toString() : string
    {
        return $this->value;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\ConstExpr;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use function implode;
class ConstExprArrayNode implements \PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNode
{
    use NodeAttributes;
    /** @var ConstExprArrayItemNode[] */
    public $items;
    /**
     * @param ConstExprArrayItemNode[] $items
     */
    public function __construct(array $items)
    {
        $this->items = $items;
    }
    public function __toString() : string
    {
        return '[' . implode(', ', $this->items) . ']';
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\ConstExpr;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
class ConstExprNullNode implements \PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNode
{
    use NodeAttributes;
    public function __toString() : string
    {
        return 'null';
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\NodeVisitor;

use PHPStan\PhpDocParser\Ast\AbstractNodeVisitor;
use PHPStan\PhpDocParser\Ast\Attribute;
use PHPStan\PhpDocParser\Ast\Node;
final class CloningVisitor extends AbstractNodeVisitor
{
    public function enterNode(Node $originalNode)
    {
        $node = clone $originalNode;
        $node->setAttribute(Attribute::ORIGINAL_NODE, $originalNode);
        return $node;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast;

final class Attribute
{
    public const START_LINE = 'startLine';
    public const END_LINE = 'endLine';
    public const START_INDEX = 'startIndex';
    public const END_INDEX = 'endIndex';
    public const ORIGINAL_NODE = 'originalNode';
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\Node;
interface PhpDocChildNode extends Node
{
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use function trim;
class TypelessParamTagValueNode implements \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode
{
    use NodeAttributes;
    /** @var bool */
    public $isReference;
    /** @var bool */
    public $isVariadic;
    /** @var string */
    public $parameterName;
    /** @var string (may be empty) */
    public $description;
    public function __construct(bool $isVariadic, string $parameterName, string $description, bool $isReference = \false)
    {
        $this->isReference = $isReference;
        $this->isVariadic = $isVariadic;
        $this->parameterName = $parameterName;
        $this->description = $description;
    }
    public function __toString() : string
    {
        $reference = $this->isReference ? '&' : '';
        $variadic = $this->isVariadic ? '...' : '';
        return trim("{$reference}{$variadic}{$this->parameterName} {$this->description}");
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use function trim;
class AssertTagPropertyValueNode implements \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode
{
    use NodeAttributes;
    /** @var TypeNode */
    public $type;
    /** @var string */
    public $parameter;
    /** @var string */
    public $property;
    /** @var bool */
    public $isNegated;
    /** @var bool */
    public $isEquality;
    /** @var string (may be empty) */
    public $description;
    public function __construct(TypeNode $type, string $parameter, string $property, bool $isNegated, string $description, bool $isEquality = \false)
    {
        $this->type = $type;
        $this->parameter = $parameter;
        $this->property = $property;
        $this->isNegated = $isNegated;
        $this->isEquality = $isEquality;
        $this->description = $description;
    }
    public function __toString() : string
    {
        $isNegated = $this->isNegated ? '!' : '';
        $isEquality = $this->isEquality ? '=' : '';
        return trim("{$isNegated}{$isEquality}{$this->type} {$this->parameter}->{$this->property} {$this->description}");
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use function trim;
class TemplateTagValueNode implements \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode
{
    use NodeAttributes;
    /** @var string */
    public $name;
    /** @var TypeNode|null */
    public $bound;
    /** @var TypeNode|null */
    public $default;
    /** @var string (may be empty) */
    public $description;
    public function __construct(string $name, ?TypeNode $bound, string $description, ?TypeNode $default = null)
    {
        $this->name = $name;
        $this->bound = $bound;
        $this->default = $default;
        $this->description = $description;
    }
    public function __toString() : string
    {
        $bound = $this->bound !== null ? " of {$this->bound}" : '';
        $default = $this->default !== null ? " = {$this->default}" : '';
        return trim("{$this->name}{$bound}{$default} {$this->description}");
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use function trim;
class SelfOutTagValueNode implements \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode
{
    use NodeAttributes;
    /** @var TypeNode */
    public $type;
    /** @var string (may be empty) */
    public $description;
    public function __construct(TypeNode $type, string $description)
    {
        $this->type = $type;
        $this->description = $description;
    }
    public function __toString() : string
    {
        return trim($this->type . ' ' . $this->description);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\Type\GenericTypeNode;
use function trim;
class UsesTagValueNode implements \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode
{
    use NodeAttributes;
    /** @var GenericTypeNode */
    public $type;
    /** @var string (may be empty) */
    public $description;
    public function __construct(GenericTypeNode $type, string $description)
    {
        $this->type = $type;
        $this->description = $description;
    }
    public function __toString() : string
    {
        return trim("{$this->type} {$this->description}");
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNode;
use PHPStan\PhpDocParser\Ast\Node;
use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
class MethodTagValueParameterNode implements Node
{
    use NodeAttributes;
    /** @var TypeNode|null */
    public $type;
    /** @var bool */
    public $isReference;
    /** @var bool */
    public $isVariadic;
    /** @var string */
    public $parameterName;
    /** @var ConstExprNode|null */
    public $defaultValue;
    public function __construct(?TypeNode $type, bool $isReference, bool $isVariadic, string $parameterName, ?ConstExprNode $defaultValue)
    {
        $this->type = $type;
        $this->isReference = $isReference;
        $this->isVariadic = $isVariadic;
        $this->parameterName = $parameterName;
        $this->defaultValue = $defaultValue;
    }
    public function __toString() : string
    {
        $type = $this->type !== null ? "{$this->type} " : '';
        $isReference = $this->isReference ? '&' : '';
        $isVariadic = $this->isVariadic ? '...' : '';
        $default = $this->defaultValue !== null ? " = {$this->defaultValue}" : '';
        return "{$type}{$isReference}{$isVariadic}{$this->parameterName}{$default}";
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use function trim;
class ThrowsTagValueNode implements \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode
{
    use NodeAttributes;
    /** @var TypeNode */
    public $type;
    /** @var string (may be empty) */
    public $description;
    public function __construct(TypeNode $type, string $description)
    {
        $this->type = $type;
        $this->description = $description;
    }
    public function __toString() : string
    {
        return trim("{$this->type} {$this->description}");
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\Node;
interface PhpDocTagValueNode extends Node
{
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use function trim;
class VarTagValueNode implements \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode
{
    use NodeAttributes;
    /** @var TypeNode */
    public $type;
    /** @var string (may be empty) */
    public $variableName;
    /** @var string (may be empty) */
    public $description;
    public function __construct(TypeNode $type, string $variableName, string $description)
    {
        $this->type = $type;
        $this->variableName = $variableName;
        $this->description = $description;
    }
    public function __toString() : string
    {
        return trim("{$this->type} " . trim("{$this->variableName} {$this->description}"));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use function trim;
class TypeAliasImportTagValueNode implements \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode
{
    use NodeAttributes;
    /** @var string */
    public $importedAlias;
    /** @var IdentifierTypeNode */
    public $importedFrom;
    /** @var string|null */
    public $importedAs;
    public function __construct(string $importedAlias, IdentifierTypeNode $importedFrom, ?string $importedAs)
    {
        $this->importedAlias = $importedAlias;
        $this->importedFrom = $importedFrom;
        $this->importedAs = $importedAs;
    }
    public function __toString() : string
    {
        return trim("{$this->importedAlias} from {$this->importedFrom}" . ($this->importedAs !== null ? " as {$this->importedAs}" : ''));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use function trim;
class ParamOutTagValueNode implements \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode
{
    use NodeAttributes;
    /** @var TypeNode */
    public $type;
    /** @var string */
    public $parameterName;
    /** @var string (may be empty) */
    public $description;
    public function __construct(TypeNode $type, string $parameterName, string $description)
    {
        $this->type = $type;
        $this->parameterName = $parameterName;
        $this->description = $description;
    }
    public function __toString() : string
    {
        return trim("{$this->type} {$this->parameterName} {$this->description}");
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
class PhpDocTextNode implements \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocChildNode
{
    use NodeAttributes;
    /** @var string */
    public $text;
    public function __construct(string $text)
    {
        $this->text = $text;
    }
    public function __toString() : string
    {
        return $this->text;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc\Doctrine;

use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprIntegerNode;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprStringNode;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstFetchNode;
use PHPStan\PhpDocParser\Ast\Node;
use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
/**
 * @phpstan-import-type ValueType from DoctrineArgument
 * @phpstan-type KeyType = ConstExprIntegerNode|ConstExprStringNode|IdentifierTypeNode|ConstFetchNode|null
 */
class DoctrineArrayItem implements Node
{
    use NodeAttributes;
    /** @var KeyType */
    public $key;
    /** @var ValueType */
    public $value;
    /**
     * @param KeyType $key
     * @param ValueType $value
     */
    public function __construct($key, $value)
    {
        $this->key = $key;
        $this->value = $value;
    }
    public function __toString() : string
    {
        if ($this->key === null) {
            return (string) $this->value;
        }
        return $this->key . '=' . $this->value;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc\Doctrine;

use PHPStan\PhpDocParser\Ast\Node;
use PHPStan\PhpDocParser\Ast\NodeAttributes;
use function implode;
class DoctrineAnnotation implements Node
{
    use NodeAttributes;
    /** @var string */
    public $name;
    /** @var list<DoctrineArgument> */
    public $arguments;
    /**
     * @param list<DoctrineArgument> $arguments
     */
    public function __construct(string $name, array $arguments)
    {
        $this->name = $name;
        $this->arguments = $arguments;
    }
    public function __toString() : string
    {
        $arguments = implode(', ', $this->arguments);
        return $this->name . '(' . $arguments . ')';
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc\Doctrine;

use PHPStan\PhpDocParser\Ast\Node;
use PHPStan\PhpDocParser\Ast\NodeAttributes;
use function implode;
class DoctrineArray implements Node
{
    use NodeAttributes;
    /** @var list<DoctrineArrayItem> */
    public $items;
    /**
     * @param list<DoctrineArrayItem> $items
     */
    public function __construct(array $items)
    {
        $this->items = $items;
    }
    public function __toString() : string
    {
        $items = implode(', ', $this->items);
        return '{' . $items . '}';
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc\Doctrine;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode;
use function trim;
class DoctrineTagValueNode implements PhpDocTagValueNode
{
    use NodeAttributes;
    /** @var DoctrineAnnotation */
    public $annotation;
    /** @var string (may be empty) */
    public $description;
    public function __construct(\PHPStan\PhpDocParser\Ast\PhpDoc\Doctrine\DoctrineAnnotation $annotation, string $description)
    {
        $this->annotation = $annotation;
        $this->description = $description;
    }
    public function __toString() : string
    {
        return trim("{$this->annotation} {$this->description}");
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc\Doctrine;

use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNode;
use PHPStan\PhpDocParser\Ast\Node;
use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
/**
 * @phpstan-type ValueType = DoctrineAnnotation|IdentifierTypeNode|DoctrineArray|ConstExprNode
 */
class DoctrineArgument implements Node
{
    use NodeAttributes;
    /** @var IdentifierTypeNode|null */
    public $key;
    /** @var ValueType */
    public $value;
    /**
     * @param ValueType $value
     */
    public function __construct(?IdentifierTypeNode $key, $value)
    {
        $this->key = $key;
        $this->value = $value;
    }
    public function __toString() : string
    {
        if ($this->key === null) {
            return (string) $this->value;
        }
        return $this->key . '=' . $this->value;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use function trim;
class DeprecatedTagValueNode implements \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode
{
    use NodeAttributes;
    /** @var string (may be empty) */
    public $description;
    public function __construct(string $description)
    {
        $this->description = $description;
    }
    public function __toString() : string
    {
        return trim($this->description);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use function trim;
class TypeAliasTagValueNode implements \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode
{
    use NodeAttributes;
    /** @var string */
    public $alias;
    /** @var TypeNode */
    public $type;
    public function __construct(string $alias, TypeNode $type)
    {
        $this->alias = $alias;
        $this->type = $type;
    }
    public function __toString() : string
    {
        return trim("{$this->alias} {$this->type}");
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\Type\GenericTypeNode;
use function trim;
class ImplementsTagValueNode implements \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode
{
    use NodeAttributes;
    /** @var GenericTypeNode */
    public $type;
    /** @var string (may be empty) */
    public $description;
    public function __construct(GenericTypeNode $type, string $description)
    {
        $this->type = $type;
        $this->description = $description;
    }
    public function __toString() : string
    {
        return trim("{$this->type} {$this->description}");
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use function trim;
class ReturnTagValueNode implements \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode
{
    use NodeAttributes;
    /** @var TypeNode */
    public $type;
    /** @var string (may be empty) */
    public $description;
    public function __construct(TypeNode $type, string $description)
    {
        $this->type = $type;
        $this->description = $description;
    }
    public function __toString() : string
    {
        return trim("{$this->type} {$this->description}");
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\Type\GenericTypeNode;
use function trim;
class ExtendsTagValueNode implements \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode
{
    use NodeAttributes;
    /** @var GenericTypeNode */
    public $type;
    /** @var string (may be empty) */
    public $description;
    public function __construct(GenericTypeNode $type, string $description)
    {
        $this->type = $type;
        $this->description = $description;
    }
    public function __toString() : string
    {
        return trim("{$this->type} {$this->description}");
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use function trim;
class PropertyTagValueNode implements \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode
{
    use NodeAttributes;
    /** @var TypeNode */
    public $type;
    /** @var string */
    public $propertyName;
    /** @var string (may be empty) */
    public $description;
    public function __construct(TypeNode $type, string $propertyName, string $description)
    {
        $this->type = $type;
        $this->propertyName = $propertyName;
        $this->description = $description;
    }
    public function __toString() : string
    {
        return trim("{$this->type} {$this->propertyName} {$this->description}");
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
class GenericTagValueNode implements \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode
{
    use NodeAttributes;
    /** @var string (may be empty) */
    public $value;
    public function __construct(string $value)
    {
        $this->value = $value;
    }
    public function __toString() : string
    {
        return $this->value;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Parser\ParserException;
use function sprintf;
use function trigger_error;
use const E_USER_WARNING;
/**
 * @property ParserException $exception
 */
class InvalidTagValueNode implements \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode
{
    use NodeAttributes;
    /** @var string (may be empty) */
    public $value;
    /** @var mixed[] */
    private $exceptionArgs;
    public function __construct(string $value, ParserException $exception)
    {
        $this->value = $value;
        $this->exceptionArgs = [$exception->getCurrentTokenValue(), $exception->getCurrentTokenType(), $exception->getCurrentOffset(), $exception->getExpectedTokenType(), $exception->getExpectedTokenValue(), $exception->getCurrentTokenLine()];
    }
    public function __get(string $name) : ?ParserException
    {
        if ($name !== 'exception') {
            trigger_error(sprintf('Undefined property: %s::$%s', self::class, $name), E_USER_WARNING);
            return null;
        }
        return new ParserException(...$this->exceptionArgs);
    }
    public function __toString() : string
    {
        return $this->value;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use function trim;
class MixinTagValueNode implements \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode
{
    use NodeAttributes;
    /** @var TypeNode */
    public $type;
    /** @var string (may be empty) */
    public $description;
    public function __construct(TypeNode $type, string $description)
    {
        $this->type = $type;
        $this->description = $description;
    }
    public function __toString() : string
    {
        return trim("{$this->type} {$this->description}");
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use function trim;
class AssertTagMethodValueNode implements \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode
{
    use NodeAttributes;
    /** @var TypeNode */
    public $type;
    /** @var string */
    public $parameter;
    /** @var string */
    public $method;
    /** @var bool */
    public $isNegated;
    /** @var bool */
    public $isEquality;
    /** @var string (may be empty) */
    public $description;
    public function __construct(TypeNode $type, string $parameter, string $method, bool $isNegated, string $description, bool $isEquality = \false)
    {
        $this->type = $type;
        $this->parameter = $parameter;
        $this->method = $method;
        $this->isNegated = $isNegated;
        $this->isEquality = $isEquality;
        $this->description = $description;
    }
    public function __toString() : string
    {
        $isNegated = $this->isNegated ? '!' : '';
        $isEquality = $this->isEquality ? '=' : '';
        return trim("{$isNegated}{$isEquality}{$this->type} {$this->parameter}->{$this->method}() {$this->description}");
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use function trim;
class AssertTagValueNode implements \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode
{
    use NodeAttributes;
    /** @var TypeNode */
    public $type;
    /** @var string */
    public $parameter;
    /** @var bool */
    public $isNegated;
    /** @var bool */
    public $isEquality;
    /** @var string (may be empty) */
    public $description;
    public function __construct(TypeNode $type, string $parameter, bool $isNegated, string $description, bool $isEquality = \false)
    {
        $this->type = $type;
        $this->parameter = $parameter;
        $this->isNegated = $isNegated;
        $this->isEquality = $isEquality;
        $this->description = $description;
    }
    public function __toString() : string
    {
        $isNegated = $this->isNegated ? '!' : '';
        $isEquality = $this->isEquality ? '=' : '';
        return trim("{$isNegated}{$isEquality}{$this->type} {$this->parameter} {$this->description}");
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\Node;
use PHPStan\PhpDocParser\Ast\NodeAttributes;
use function array_column;
use function array_filter;
use function array_map;
use function implode;
class PhpDocNode implements Node
{
    use NodeAttributes;
    /** @var PhpDocChildNode[] */
    public $children;
    /**
     * @param PhpDocChildNode[] $children
     */
    public function __construct(array $children)
    {
        $this->children = $children;
    }
    /**
     * @return PhpDocTagNode[]
     */
    public function getTags() : array
    {
        return array_filter($this->children, static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocChildNode $child) : bool {
            return $child instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode;
        });
    }
    /**
     * @return PhpDocTagNode[]
     */
    public function getTagsByName(string $tagName) : array
    {
        return array_filter($this->getTags(), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode $tag) use($tagName) : bool {
            return $tag->name === $tagName;
        });
    }
    /**
     * @return VarTagValueNode[]
     */
    public function getVarTagValues(string $tagName = '@var') : array
    {
        return array_filter(array_column($this->getTagsByName($tagName), 'value'), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode $value) : bool {
            return $value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\VarTagValueNode;
        });
    }
    /**
     * @return ParamTagValueNode[]
     */
    public function getParamTagValues(string $tagName = '@param') : array
    {
        return array_filter(array_column($this->getTagsByName($tagName), 'value'), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode $value) : bool {
            return $value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode;
        });
    }
    /**
     * @return TypelessParamTagValueNode[]
     */
    public function getTypelessParamTagValues(string $tagName = '@param') : array
    {
        return array_filter(array_column($this->getTagsByName($tagName), 'value'), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode $value) : bool {
            return $value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\TypelessParamTagValueNode;
        });
    }
    /**
     * @return TemplateTagValueNode[]
     */
    public function getTemplateTagValues(string $tagName = '@template') : array
    {
        return array_filter(array_column($this->getTagsByName($tagName), 'value'), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode $value) : bool {
            return $value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\TemplateTagValueNode;
        });
    }
    /**
     * @return ExtendsTagValueNode[]
     */
    public function getExtendsTagValues(string $tagName = '@extends') : array
    {
        return array_filter(array_column($this->getTagsByName($tagName), 'value'), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode $value) : bool {
            return $value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\ExtendsTagValueNode;
        });
    }
    /**
     * @return ImplementsTagValueNode[]
     */
    public function getImplementsTagValues(string $tagName = '@implements') : array
    {
        return array_filter(array_column($this->getTagsByName($tagName), 'value'), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode $value) : bool {
            return $value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\ImplementsTagValueNode;
        });
    }
    /**
     * @return UsesTagValueNode[]
     */
    public function getUsesTagValues(string $tagName = '@use') : array
    {
        return array_filter(array_column($this->getTagsByName($tagName), 'value'), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode $value) : bool {
            return $value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\UsesTagValueNode;
        });
    }
    /**
     * @return ReturnTagValueNode[]
     */
    public function getReturnTagValues(string $tagName = '@return') : array
    {
        return array_filter(array_column($this->getTagsByName($tagName), 'value'), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode $value) : bool {
            return $value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\ReturnTagValueNode;
        });
    }
    /**
     * @return ThrowsTagValueNode[]
     */
    public function getThrowsTagValues(string $tagName = '@throws') : array
    {
        return array_filter(array_column($this->getTagsByName($tagName), 'value'), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode $value) : bool {
            return $value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\ThrowsTagValueNode;
        });
    }
    /**
     * @return MixinTagValueNode[]
     */
    public function getMixinTagValues(string $tagName = '@mixin') : array
    {
        return array_filter(array_column($this->getTagsByName($tagName), 'value'), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode $value) : bool {
            return $value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\MixinTagValueNode;
        });
    }
    /**
     * @return DeprecatedTagValueNode[]
     */
    public function getDeprecatedTagValues() : array
    {
        return array_filter(array_column($this->getTagsByName('@deprecated'), 'value'), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode $value) : bool {
            return $value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\DeprecatedTagValueNode;
        });
    }
    /**
     * @return PropertyTagValueNode[]
     */
    public function getPropertyTagValues(string $tagName = '@property') : array
    {
        return array_filter(array_column($this->getTagsByName($tagName), 'value'), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode $value) : bool {
            return $value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\PropertyTagValueNode;
        });
    }
    /**
     * @return PropertyTagValueNode[]
     */
    public function getPropertyReadTagValues(string $tagName = '@property-read') : array
    {
        return array_filter(array_column($this->getTagsByName($tagName), 'value'), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode $value) : bool {
            return $value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\PropertyTagValueNode;
        });
    }
    /**
     * @return PropertyTagValueNode[]
     */
    public function getPropertyWriteTagValues(string $tagName = '@property-write') : array
    {
        return array_filter(array_column($this->getTagsByName($tagName), 'value'), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode $value) : bool {
            return $value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\PropertyTagValueNode;
        });
    }
    /**
     * @return MethodTagValueNode[]
     */
    public function getMethodTagValues(string $tagName = '@method') : array
    {
        return array_filter(array_column($this->getTagsByName($tagName), 'value'), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode $value) : bool {
            return $value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\MethodTagValueNode;
        });
    }
    /**
     * @return TypeAliasTagValueNode[]
     */
    public function getTypeAliasTagValues(string $tagName = '@phpstan-type') : array
    {
        return array_filter(array_column($this->getTagsByName($tagName), 'value'), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode $value) : bool {
            return $value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\TypeAliasTagValueNode;
        });
    }
    /**
     * @return TypeAliasImportTagValueNode[]
     */
    public function getTypeAliasImportTagValues(string $tagName = '@phpstan-import-type') : array
    {
        return array_filter(array_column($this->getTagsByName($tagName), 'value'), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode $value) : bool {
            return $value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\TypeAliasImportTagValueNode;
        });
    }
    /**
     * @return AssertTagValueNode[]
     */
    public function getAssertTagValues(string $tagName = '@phpstan-assert') : array
    {
        return array_filter(array_column($this->getTagsByName($tagName), 'value'), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode $value) : bool {
            return $value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\AssertTagValueNode;
        });
    }
    /**
     * @return AssertTagPropertyValueNode[]
     */
    public function getAssertPropertyTagValues(string $tagName = '@phpstan-assert') : array
    {
        return array_filter(array_column($this->getTagsByName($tagName), 'value'), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode $value) : bool {
            return $value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\AssertTagPropertyValueNode;
        });
    }
    /**
     * @return AssertTagMethodValueNode[]
     */
    public function getAssertMethodTagValues(string $tagName = '@phpstan-assert') : array
    {
        return array_filter(array_column($this->getTagsByName($tagName), 'value'), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode $value) : bool {
            return $value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\AssertTagMethodValueNode;
        });
    }
    /**
     * @return SelfOutTagValueNode[]
     */
    public function getSelfOutTypeTagValues(string $tagName = '@phpstan-this-out') : array
    {
        return array_filter(array_column($this->getTagsByName($tagName), 'value'), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode $value) : bool {
            return $value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\SelfOutTagValueNode;
        });
    }
    /**
     * @return ParamOutTagValueNode[]
     */
    public function getParamOutTypeTagValues(string $tagName = '@param-out') : array
    {
        return array_filter(array_column($this->getTagsByName($tagName), 'value'), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode $value) : bool {
            return $value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\ParamOutTagValueNode;
        });
    }
    public function __toString() : string
    {
        $children = array_map(static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocChildNode $child) : string {
            $s = (string) $child;
            return $s === '' ? '' : ' ' . $s;
        }, $this->children);
        return "/**\n *" . implode("\n *", $children) . "\n */";
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use function count;
use function implode;
class MethodTagValueNode implements \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode
{
    use NodeAttributes;
    /** @var bool */
    public $isStatic;
    /** @var TypeNode|null */
    public $returnType;
    /** @var string */
    public $methodName;
    /** @var TemplateTagValueNode[] */
    public $templateTypes;
    /** @var MethodTagValueParameterNode[] */
    public $parameters;
    /** @var string (may be empty) */
    public $description;
    /**
     * @param MethodTagValueParameterNode[] $parameters
     * @param TemplateTagValueNode[] $templateTypes
     */
    public function __construct(bool $isStatic, ?TypeNode $returnType, string $methodName, array $parameters, string $description, array $templateTypes = [])
    {
        $this->isStatic = $isStatic;
        $this->returnType = $returnType;
        $this->methodName = $methodName;
        $this->parameters = $parameters;
        $this->description = $description;
        $this->templateTypes = $templateTypes;
    }
    public function __toString() : string
    {
        $static = $this->isStatic ? 'static ' : '';
        $returnType = $this->returnType !== null ? "{$this->returnType} " : '';
        $parameters = implode(', ', $this->parameters);
        $description = $this->description !== '' ? " {$this->description}" : '';
        $templateTypes = count($this->templateTypes) > 0 ? '<' . implode(', ', $this->templateTypes) . '>' : '';
        return "{$static}{$returnType}{$this->methodName}{$templateTypes}({$parameters}){$description}";
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use function trim;
class ParamTagValueNode implements \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode
{
    use NodeAttributes;
    /** @var TypeNode */
    public $type;
    /** @var bool */
    public $isReference;
    /** @var bool */
    public $isVariadic;
    /** @var string */
    public $parameterName;
    /** @var string (may be empty) */
    public $description;
    public function __construct(TypeNode $type, bool $isVariadic, string $parameterName, string $description, bool $isReference = \false)
    {
        $this->type = $type;
        $this->isReference = $isReference;
        $this->isVariadic = $isVariadic;
        $this->parameterName = $parameterName;
        $this->description = $description;
    }
    public function __toString() : string
    {
        $reference = $this->isReference ? '&' : '';
        $variadic = $this->isVariadic ? '...' : '';
        return trim("{$this->type} {$reference}{$variadic}{$this->parameterName} {$this->description}");
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;

use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\PhpDoc\Doctrine\DoctrineTagValueNode;
use function trim;
class PhpDocTagNode implements \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocChildNode
{
    use NodeAttributes;
    /** @var string */
    public $name;
    /** @var PhpDocTagValueNode */
    public $value;
    public function __construct(string $name, \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode $value)
    {
        $this->name = $name;
        $this->value = $value;
    }
    public function __toString() : string
    {
        if ($this->value instanceof DoctrineTagValueNode) {
            return (string) $this->value;
        }
        return trim("{$this->name} {$this->value}");
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast;

/**
 * Inspired by https://github.com/nikic/PHP-Parser/tree/36a6dcd04e7b0285e8f0868f44bd4927802f7df1
 *
 * Copyright (c) 2011, Nikita Popov
 * All rights reserved.
 */
abstract class AbstractNodeVisitor implements \PHPStan\PhpDocParser\Ast\NodeVisitor
{
    public function beforeTraverse(array $nodes) : ?array
    {
        return null;
    }
    public function enterNode(\PHPStan\PhpDocParser\Ast\Node $node)
    {
        return null;
    }
    public function leaveNode(\PHPStan\PhpDocParser\Ast\Node $node)
    {
        return null;
    }
    public function afterTraverse(array $nodes) : ?array
    {
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast;

interface Node
{
    public function __toString() : string;
    /**
     * @param mixed $value
     */
    public function setAttribute(string $key, $value) : void;
    public function hasAttribute(string $key) : bool;
    /**
     * @return mixed
     */
    public function getAttribute(string $key);
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Ast;

/**
 * Inspired by https://github.com/nikic/PHP-Parser/tree/36a6dcd04e7b0285e8f0868f44bd4927802f7df1
 *
 * Copyright (c) 2011, Nikita Popov
 * All rights reserved.
 */
interface NodeVisitor
{
    /**
     * Called once before traversal.
     *
     * Return value semantics:
     *  * null:      $nodes stays as-is
     *  * otherwise: $nodes is set to the return value
     *
     * @param Node[] $nodes Array of nodes
     *
     * @return Node[]|null Array of nodes
     */
    public function beforeTraverse(array $nodes) : ?array;
    /**
     * Called when entering a node.
     *
     * Return value semantics:
     *  * null
     *        => $node stays as-is
     *  * array (of Nodes)
     *        => The return value is merged into the parent array (at the position of the $node)
     *  * NodeTraverser::REMOVE_NODE
     *        => $node is removed from the parent array
     *  * NodeTraverser::DONT_TRAVERSE_CHILDREN
     *        => Children of $node are not traversed. $node stays as-is
     *  * NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN
     *        => Further visitors for the current node are skipped, and its children are not
     *           traversed. $node stays as-is.
     *  * NodeTraverser::STOP_TRAVERSAL
     *        => Traversal is aborted. $node stays as-is
     *  * otherwise
     *        => $node is set to the return value
     *
     * @param Node $node Node
     *
     * @return Node|Node[]|NodeTraverser::*|null Replacement node (or special return value)
     */
    public function enterNode(\PHPStan\PhpDocParser\Ast\Node $node);
    /**
     * Called when leaving a node.
     *
     * Return value semantics:
     *  * null
     *        => $node stays as-is
     *  * NodeTraverser::REMOVE_NODE
     *        => $node is removed from the parent array
     *  * NodeTraverser::STOP_TRAVERSAL
     *        => Traversal is aborted. $node stays as-is
     *  * array (of Nodes)
     *        => The return value is merged into the parent array (at the position of the $node)
     *  * otherwise
     *        => $node is set to the return value
     *
     * @param Node $node Node
     *
     * @return Node|Node[]|NodeTraverser::REMOVE_NODE|NodeTraverser::STOP_TRAVERSAL|null Replacement node (or special return value)
     */
    public function leaveNode(\PHPStan\PhpDocParser\Ast\Node $node);
    /**
     * Called once after traversal.
     *
     * Return value semantics:
     *  * null:      $nodes stays as-is
     *  * otherwise: $nodes is set to the return value
     *
     * @param Node[] $nodes Array of nodes
     *
     * @return Node[]|null Array of nodes
     */
    public function afterTraverse(array $nodes) : ?array;
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Printer;

use LogicException;
use PHPStan\PhpDocParser\Ast\Attribute;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprArrayNode;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNode;
use PHPStan\PhpDocParser\Ast\Node;
use PHPStan\PhpDocParser\Ast\PhpDoc\AssertTagMethodValueNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\AssertTagPropertyValueNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\AssertTagValueNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\Doctrine\DoctrineAnnotation;
use PHPStan\PhpDocParser\Ast\PhpDoc\Doctrine\DoctrineArgument;
use PHPStan\PhpDocParser\Ast\PhpDoc\Doctrine\DoctrineArray;
use PHPStan\PhpDocParser\Ast\PhpDoc\Doctrine\DoctrineArrayItem;
use PHPStan\PhpDocParser\Ast\PhpDoc\Doctrine\DoctrineTagValueNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\ExtendsTagValueNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\ImplementsTagValueNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\MethodTagValueNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\MethodTagValueParameterNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\MixinTagValueNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\ParamOutTagValueNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocChildNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTextNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\PropertyTagValueNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\ReturnTagValueNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\SelfOutTagValueNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\TemplateTagValueNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\ThrowsTagValueNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\TypeAliasImportTagValueNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\TypeAliasTagValueNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\UsesTagValueNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\VarTagValueNode;
use PHPStan\PhpDocParser\Ast\Type\ArrayShapeItemNode;
use PHPStan\PhpDocParser\Ast\Type\ArrayShapeNode;
use PHPStan\PhpDocParser\Ast\Type\ArrayTypeNode;
use PHPStan\PhpDocParser\Ast\Type\CallableTypeNode;
use PHPStan\PhpDocParser\Ast\Type\CallableTypeParameterNode;
use PHPStan\PhpDocParser\Ast\Type\ConditionalTypeForParameterNode;
use PHPStan\PhpDocParser\Ast\Type\ConditionalTypeNode;
use PHPStan\PhpDocParser\Ast\Type\ConstTypeNode;
use PHPStan\PhpDocParser\Ast\Type\GenericTypeNode;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\IntersectionTypeNode;
use PHPStan\PhpDocParser\Ast\Type\InvalidTypeNode;
use PHPStan\PhpDocParser\Ast\Type\NullableTypeNode;
use PHPStan\PhpDocParser\Ast\Type\ObjectShapeItemNode;
use PHPStan\PhpDocParser\Ast\Type\ObjectShapeNode;
use PHPStan\PhpDocParser\Ast\Type\OffsetAccessTypeNode;
use PHPStan\PhpDocParser\Ast\Type\ThisTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\PhpDocParser\Ast\Type\UnionTypeNode;
use PHPStan\PhpDocParser\Lexer\Lexer;
use PHPStan\PhpDocParser\Parser\TokenIterator;
use function array_keys;
use function array_map;
use function count;
use function get_class;
use function get_object_vars;
use function implode;
use function in_array;
use function is_array;
use function preg_match_all;
use function sprintf;
use function strlen;
use function strpos;
use function trim;
use const PREG_SET_ORDER;
/**
 * Inspired by https://github.com/nikic/PHP-Parser/tree/36a6dcd04e7b0285e8f0868f44bd4927802f7df1
 *
 * Copyright (c) 2011, Nikita Popov
 * All rights reserved.
 */
final class Printer
{
    /** @var Differ<Node> */
    private $differ;
    /**
     * Map From "{$class}->{$subNode}" to string that should be inserted
     * between elements of this list subnode
     *
     * @var array<string, string>
     */
    private $listInsertionMap = [PhpDocNode::class . '->children' => "\n * ", UnionTypeNode::class . '->types' => '|', IntersectionTypeNode::class . '->types' => '&', ArrayShapeNode::class . '->items' => ', ', ObjectShapeNode::class . '->items' => ', ', CallableTypeNode::class . '->parameters' => ', ', GenericTypeNode::class . '->genericTypes' => ', ', ConstExprArrayNode::class . '->items' => ', ', MethodTagValueNode::class . '->parameters' => ', ', DoctrineArray::class . '->items' => ', ', DoctrineAnnotation::class . '->arguments' => ', '];
    /**
     * [$find, $extraLeft, $extraRight]
     *
     * @var array<string, array{string|null, string, string}>
     */
    private $emptyListInsertionMap = [CallableTypeNode::class . '->parameters' => ['(', '', ''], ArrayShapeNode::class . '->items' => ['{', '', ''], ObjectShapeNode::class . '->items' => ['{', '', ''], DoctrineArray::class . '->items' => ['{', '', ''], DoctrineAnnotation::class . '->arguments' => ['(', '', '']];
    /** @var array<string, list<class-string<TypeNode>>> */
    private $parenthesesMap = [CallableTypeNode::class . '->returnType' => [CallableTypeNode::class, UnionTypeNode::class, IntersectionTypeNode::class], ArrayTypeNode::class . '->type' => [CallableTypeNode::class, UnionTypeNode::class, IntersectionTypeNode::class, ConstTypeNode::class, NullableTypeNode::class], OffsetAccessTypeNode::class . '->type' => [CallableTypeNode::class, UnionTypeNode::class, IntersectionTypeNode::class, ConstTypeNode::class, NullableTypeNode::class]];
    /** @var array<string, list<class-string<TypeNode>>> */
    private $parenthesesListMap = [IntersectionTypeNode::class . '->types' => [IntersectionTypeNode::class, UnionTypeNode::class, NullableTypeNode::class], UnionTypeNode::class . '->types' => [IntersectionTypeNode::class, UnionTypeNode::class, NullableTypeNode::class]];
    public function printFormatPreserving(PhpDocNode $node, PhpDocNode $originalNode, TokenIterator $originalTokens) : string
    {
        $this->differ = new \PHPStan\PhpDocParser\Printer\Differ(static function ($a, $b) {
            if ($a instanceof Node && $b instanceof Node) {
                return $a === $b->getAttribute(Attribute::ORIGINAL_NODE);
            }
            return \false;
        });
        $tokenIndex = 0;
        $result = $this->printArrayFormatPreserving($node->children, $originalNode->children, $originalTokens, $tokenIndex, PhpDocNode::class, 'children');
        if ($result !== null) {
            return $result . $originalTokens->getContentBetween($tokenIndex, $originalTokens->getTokenCount());
        }
        return $this->print($node);
    }
    public function print(Node $node) : string
    {
        if ($node instanceof PhpDocNode) {
            return "/**\n *" . implode("\n *", array_map(function (PhpDocChildNode $child) : string {
                $s = $this->print($child);
                return $s === '' ? '' : ' ' . $s;
            }, $node->children)) . "\n */";
        }
        if ($node instanceof PhpDocTextNode) {
            return $node->text;
        }
        if ($node instanceof PhpDocTagNode) {
            if ($node->value instanceof DoctrineTagValueNode) {
                return $this->print($node->value);
            }
            return trim(sprintf('%s %s', $node->name, $this->print($node->value)));
        }
        if ($node instanceof PhpDocTagValueNode) {
            return $this->printTagValue($node);
        }
        if ($node instanceof TypeNode) {
            return $this->printType($node);
        }
        if ($node instanceof ConstExprNode) {
            return $this->printConstExpr($node);
        }
        if ($node instanceof MethodTagValueParameterNode) {
            $type = $node->type !== null ? $this->print($node->type) . ' ' : '';
            $isReference = $node->isReference ? '&' : '';
            $isVariadic = $node->isVariadic ? '...' : '';
            $default = $node->defaultValue !== null ? ' = ' . $this->print($node->defaultValue) : '';
            return "{$type}{$isReference}{$isVariadic}{$node->parameterName}{$default}";
        }
        if ($node instanceof CallableTypeParameterNode) {
            $type = $this->print($node->type) . ' ';
            $isReference = $node->isReference ? '&' : '';
            $isVariadic = $node->isVariadic ? '...' : '';
            $isOptional = $node->isOptional ? '=' : '';
            return trim("{$type}{$isReference}{$isVariadic}{$node->parameterName}") . $isOptional;
        }
        if ($node instanceof DoctrineAnnotation) {
            return (string) $node;
        }
        if ($node instanceof DoctrineArgument) {
            return (string) $node;
        }
        if ($node instanceof DoctrineArray) {
            return (string) $node;
        }
        if ($node instanceof DoctrineArrayItem) {
            return (string) $node;
        }
        throw new LogicException(sprintf('Unknown node type %s', get_class($node)));
    }
    private function printTagValue(PhpDocTagValueNode $node) : string
    {
        // only nodes that contain another node are handled here
        // the rest falls back on (string) $node
        if ($node instanceof AssertTagMethodValueNode) {
            $isNegated = $node->isNegated ? '!' : '';
            $isEquality = $node->isEquality ? '=' : '';
            $type = $this->printType($node->type);
            return trim("{$isNegated}{$isEquality}{$type} {$node->parameter}->{$node->method}() {$node->description}");
        }
        if ($node instanceof AssertTagPropertyValueNode) {
            $isNegated = $node->isNegated ? '!' : '';
            $isEquality = $node->isEquality ? '=' : '';
            $type = $this->printType($node->type);
            return trim("{$isNegated}{$isEquality}{$type} {$node->parameter}->{$node->property} {$node->description}");
        }
        if ($node instanceof AssertTagValueNode) {
            $isNegated = $node->isNegated ? '!' : '';
            $isEquality = $node->isEquality ? '=' : '';
            $type = $this->printType($node->type);
            return trim("{$isNegated}{$isEquality}{$type} {$node->parameter} {$node->description}");
        }
        if ($node instanceof ExtendsTagValueNode || $node instanceof ImplementsTagValueNode) {
            $type = $this->printType($node->type);
            return trim("{$type} {$node->description}");
        }
        if ($node instanceof MethodTagValueNode) {
            $static = $node->isStatic ? 'static ' : '';
            $returnType = $node->returnType !== null ? $this->printType($node->returnType) . ' ' : '';
            $parameters = implode(', ', array_map(function (MethodTagValueParameterNode $parameter) : string {
                return $this->print($parameter);
            }, $node->parameters));
            $description = $node->description !== '' ? " {$node->description}" : '';
            $templateTypes = count($node->templateTypes) > 0 ? '<' . implode(', ', array_map(function (TemplateTagValueNode $templateTag) : string {
                return $this->print($templateTag);
            }, $node->templateTypes)) . '>' : '';
            return "{$static}{$returnType}{$node->methodName}{$templateTypes}({$parameters}){$description}";
        }
        if ($node instanceof MixinTagValueNode) {
            $type = $this->printType($node->type);
            return trim("{$type} {$node->description}");
        }
        if ($node instanceof ParamOutTagValueNode) {
            $type = $this->printType($node->type);
            return trim("{$type} {$node->parameterName} {$node->description}");
        }
        if ($node instanceof ParamTagValueNode) {
            $reference = $node->isReference ? '&' : '';
            $variadic = $node->isVariadic ? '...' : '';
            $type = $this->printType($node->type);
            return trim("{$type} {$reference}{$variadic}{$node->parameterName} {$node->description}");
        }
        if ($node instanceof PropertyTagValueNode) {
            $type = $this->printType($node->type);
            return trim("{$type} {$node->propertyName} {$node->description}");
        }
        if ($node instanceof ReturnTagValueNode) {
            $type = $this->printType($node->type);
            return trim("{$type} {$node->description}");
        }
        if ($node instanceof SelfOutTagValueNode) {
            $type = $this->printType($node->type);
            return trim($type . ' ' . $node->description);
        }
        if ($node instanceof TemplateTagValueNode) {
            $bound = $node->bound !== null ? ' of ' . $this->printType($node->bound) : '';
            $default = $node->default !== null ? ' = ' . $this->printType($node->default) : '';
            return trim("{$node->name}{$bound}{$default} {$node->description}");
        }
        if ($node instanceof ThrowsTagValueNode) {
            $type = $this->printType($node->type);
            return trim("{$type} {$node->description}");
        }
        if ($node instanceof TypeAliasImportTagValueNode) {
            return trim("{$node->importedAlias} from " . $this->printType($node->importedFrom) . ($node->importedAs !== null ? " as {$node->importedAs}" : ''));
        }
        if ($node instanceof TypeAliasTagValueNode) {
            $type = $this->printType($node->type);
            return trim("{$node->alias} {$type}");
        }
        if ($node instanceof UsesTagValueNode) {
            $type = $this->printType($node->type);
            return trim("{$type} {$node->description}");
        }
        if ($node instanceof VarTagValueNode) {
            $type = $this->printType($node->type);
            return trim("{$type} " . trim("{$node->variableName} {$node->description}"));
        }
        return (string) $node;
    }
    private function printType(TypeNode $node) : string
    {
        if ($node instanceof ArrayShapeNode) {
            $items = array_map(function (ArrayShapeItemNode $item) : string {
                return $this->printType($item);
            }, $node->items);
            if (!$node->sealed) {
                $items[] = '...';
            }
            return $node->kind . '{' . implode(', ', $items) . '}';
        }
        if ($node instanceof ArrayShapeItemNode) {
            if ($node->keyName !== null) {
                return sprintf('%s%s: %s', $this->print($node->keyName), $node->optional ? '?' : '', $this->printType($node->valueType));
            }
            return $this->printType($node->valueType);
        }
        if ($node instanceof ArrayTypeNode) {
            return $this->printOffsetAccessType($node->type) . '[]';
        }
        if ($node instanceof CallableTypeNode) {
            if ($node->returnType instanceof CallableTypeNode || $node->returnType instanceof UnionTypeNode || $node->returnType instanceof IntersectionTypeNode) {
                $returnType = $this->wrapInParentheses($node->returnType);
            } else {
                $returnType = $this->printType($node->returnType);
            }
            $parameters = implode(', ', array_map(function (CallableTypeParameterNode $parameterNode) : string {
                return $this->print($parameterNode);
            }, $node->parameters));
            return "{$node->identifier}({$parameters}): {$returnType}";
        }
        if ($node instanceof ConditionalTypeForParameterNode) {
            return sprintf('(%s %s %s ? %s : %s)', $node->parameterName, $node->negated ? 'is not' : 'is', $this->printType($node->targetType), $this->printType($node->if), $this->printType($node->else));
        }
        if ($node instanceof ConditionalTypeNode) {
            return sprintf('(%s %s %s ? %s : %s)', $this->printType($node->subjectType), $node->negated ? 'is not' : 'is', $this->printType($node->targetType), $this->printType($node->if), $this->printType($node->else));
        }
        if ($node instanceof ConstTypeNode) {
            return $this->printConstExpr($node->constExpr);
        }
        if ($node instanceof GenericTypeNode) {
            $genericTypes = [];
            foreach ($node->genericTypes as $index => $type) {
                $variance = $node->variances[$index] ?? GenericTypeNode::VARIANCE_INVARIANT;
                if ($variance === GenericTypeNode::VARIANCE_INVARIANT) {
                    $genericTypes[] = $this->printType($type);
                } elseif ($variance === GenericTypeNode::VARIANCE_BIVARIANT) {
                    $genericTypes[] = '*';
                } else {
                    $genericTypes[] = sprintf('%s %s', $variance, $this->print($type));
                }
            }
            return $node->type . '<' . implode(', ', $genericTypes) . '>';
        }
        if ($node instanceof IdentifierTypeNode) {
            return $node->name;
        }
        if ($node instanceof IntersectionTypeNode || $node instanceof UnionTypeNode) {
            $items = [];
            foreach ($node->types as $type) {
                if ($type instanceof IntersectionTypeNode || $type instanceof UnionTypeNode || $type instanceof NullableTypeNode) {
                    $items[] = $this->wrapInParentheses($type);
                    continue;
                }
                $items[] = $this->printType($type);
            }
            return implode($node instanceof IntersectionTypeNode ? '&' : '|', $items);
        }
        if ($node instanceof InvalidTypeNode) {
            return (string) $node;
        }
        if ($node instanceof NullableTypeNode) {
            if ($node->type instanceof IntersectionTypeNode || $node->type instanceof UnionTypeNode) {
                return '?(' . $this->printType($node->type) . ')';
            }
            return '?' . $this->printType($node->type);
        }
        if ($node instanceof ObjectShapeNode) {
            $items = array_map(function (ObjectShapeItemNode $item) : string {
                return $this->printType($item);
            }, $node->items);
            return 'object{' . implode(', ', $items) . '}';
        }
        if ($node instanceof ObjectShapeItemNode) {
            if ($node->keyName !== null) {
                return sprintf('%s%s: %s', $this->print($node->keyName), $node->optional ? '?' : '', $this->printType($node->valueType));
            }
            return $this->printType($node->valueType);
        }
        if ($node instanceof OffsetAccessTypeNode) {
            return $this->printOffsetAccessType($node->type) . '[' . $this->printType($node->offset) . ']';
        }
        if ($node instanceof ThisTypeNode) {
            return (string) $node;
        }
        throw new LogicException(sprintf('Unknown node type %s', get_class($node)));
    }
    private function wrapInParentheses(TypeNode $node) : string
    {
        return '(' . $this->printType($node) . ')';
    }
    private function printOffsetAccessType(TypeNode $type) : string
    {
        if ($type instanceof CallableTypeNode || $type instanceof UnionTypeNode || $type instanceof IntersectionTypeNode || $type instanceof ConstTypeNode || $type instanceof NullableTypeNode) {
            return $this->wrapInParentheses($type);
        }
        return $this->printType($type);
    }
    private function printConstExpr(ConstExprNode $node) : string
    {
        // this is fine - ConstExprNode classes do not contain nodes that need smart printer logic
        return (string) $node;
    }
    /**
     * @param Node[] $nodes
     * @param Node[] $originalNodes
     */
    private function printArrayFormatPreserving(array $nodes, array $originalNodes, TokenIterator $originalTokens, int &$tokenIndex, string $parentNodeClass, string $subNodeName) : ?string
    {
        $diff = $this->differ->diffWithReplacements($originalNodes, $nodes);
        $mapKey = $parentNodeClass . '->' . $subNodeName;
        $insertStr = $this->listInsertionMap[$mapKey] ?? null;
        $result = '';
        $beforeFirstKeepOrReplace = \true;
        $delayedAdd = [];
        $insertNewline = \false;
        [$isMultiline, $beforeAsteriskIndent, $afterAsteriskIndent] = $this->isMultiline($tokenIndex, $originalNodes, $originalTokens);
        if ($insertStr === "\n * ") {
            $insertStr = sprintf("\n%s*%s", $beforeAsteriskIndent, $afterAsteriskIndent);
        }
        foreach ($diff as $i => $diffElem) {
            $diffType = $diffElem->type;
            $newNode = $diffElem->new;
            $originalNode = $diffElem->old;
            if ($diffType === \PHPStan\PhpDocParser\Printer\DiffElem::TYPE_KEEP || $diffType === \PHPStan\PhpDocParser\Printer\DiffElem::TYPE_REPLACE) {
                $beforeFirstKeepOrReplace = \false;
                if (!$newNode instanceof Node || !$originalNode instanceof Node) {
                    return null;
                }
                $itemStartPos = $originalNode->getAttribute(Attribute::START_INDEX);
                $itemEndPos = $originalNode->getAttribute(Attribute::END_INDEX);
                if ($itemStartPos < 0 || $itemEndPos < 0 || $itemStartPos < $tokenIndex) {
                    throw new LogicException();
                }
                $result .= $originalTokens->getContentBetween($tokenIndex, $itemStartPos);
                if (count($delayedAdd) > 0) {
                    foreach ($delayedAdd as $delayedAddNode) {
                        $parenthesesNeeded = isset($this->parenthesesListMap[$mapKey]) && in_array(get_class($delayedAddNode), $this->parenthesesListMap[$mapKey], \true);
                        if ($parenthesesNeeded) {
                            $result .= '(';
                        }
                        $result .= $this->printNodeFormatPreserving($delayedAddNode, $originalTokens);
                        if ($parenthesesNeeded) {
                            $result .= ')';
                        }
                        if ($insertNewline) {
                            $result .= $insertStr . sprintf("\n%s*%s", $beforeAsteriskIndent, $afterAsteriskIndent);
                        } else {
                            $result .= $insertStr;
                        }
                    }
                    $delayedAdd = [];
                }
                $parenthesesNeeded = isset($this->parenthesesListMap[$mapKey]) && in_array(get_class($newNode), $this->parenthesesListMap[$mapKey], \true) && !in_array(get_class($originalNode), $this->parenthesesListMap[$mapKey], \true);
                $addParentheses = $parenthesesNeeded && !$originalTokens->hasParentheses($itemStartPos, $itemEndPos);
                if ($addParentheses) {
                    $result .= '(';
                }
                $result .= $this->printNodeFormatPreserving($newNode, $originalTokens);
                if ($addParentheses) {
                    $result .= ')';
                }
                $tokenIndex = $itemEndPos + 1;
            } elseif ($diffType === \PHPStan\PhpDocParser\Printer\DiffElem::TYPE_ADD) {
                if ($insertStr === null) {
                    return null;
                }
                if (!$newNode instanceof Node) {
                    return null;
                }
                if ($insertStr === ', ' && $isMultiline) {
                    $insertStr = ',';
                    $insertNewline = \true;
                }
                if ($beforeFirstKeepOrReplace) {
                    // Will be inserted at the next "replace" or "keep" element
                    $delayedAdd[] = $newNode;
                    continue;
                }
                $itemEndPos = $tokenIndex - 1;
                if ($insertNewline) {
                    $result .= $insertStr . sprintf("\n%s*%s", $beforeAsteriskIndent, $afterAsteriskIndent);
                } else {
                    $result .= $insertStr;
                }
                $parenthesesNeeded = isset($this->parenthesesListMap[$mapKey]) && in_array(get_class($newNode), $this->parenthesesListMap[$mapKey], \true);
                if ($parenthesesNeeded) {
                    $result .= '(';
                }
                $result .= $this->printNodeFormatPreserving($newNode, $originalTokens);
                if ($parenthesesNeeded) {
                    $result .= ')';
                }
                $tokenIndex = $itemEndPos + 1;
            } elseif ($diffType === \PHPStan\PhpDocParser\Printer\DiffElem::TYPE_REMOVE) {
                if (!$originalNode instanceof Node) {
                    return null;
                }
                $itemStartPos = $originalNode->getAttribute(Attribute::START_INDEX);
                $itemEndPos = $originalNode->getAttribute(Attribute::END_INDEX);
                if ($itemStartPos < 0 || $itemEndPos < 0) {
                    throw new LogicException();
                }
                if ($i === 0) {
                    // If we're removing from the start, keep the tokens before the node and drop those after it,
                    // instead of the other way around.
                    $originalTokensArray = $originalTokens->getTokens();
                    for ($j = $tokenIndex; $j < $itemStartPos; $j++) {
                        if ($originalTokensArray[$j][Lexer::TYPE_OFFSET] === Lexer::TOKEN_PHPDOC_EOL) {
                            break;
                        }
                        $result .= $originalTokensArray[$j][Lexer::VALUE_OFFSET];
                    }
                }
                $tokenIndex = $itemEndPos + 1;
            }
        }
        if (count($delayedAdd) > 0) {
            if (!isset($this->emptyListInsertionMap[$mapKey])) {
                return null;
            }
            [$findToken, $extraLeft, $extraRight] = $this->emptyListInsertionMap[$mapKey];
            if ($findToken !== null) {
                $originalTokensArray = $originalTokens->getTokens();
                for (; $tokenIndex < count($originalTokensArray); $tokenIndex++) {
                    $result .= $originalTokensArray[$tokenIndex][Lexer::VALUE_OFFSET];
                    if ($originalTokensArray[$tokenIndex][Lexer::VALUE_OFFSET] !== $findToken) {
                        continue;
                    }
                    $tokenIndex++;
                    break;
                }
            }
            $first = \true;
            $result .= $extraLeft;
            foreach ($delayedAdd as $delayedAddNode) {
                if (!$first) {
                    $result .= $insertStr;
                    if ($insertNewline) {
                        $result .= sprintf("\n%s*%s", $beforeAsteriskIndent, $afterAsteriskIndent);
                    }
                }
                $result .= $this->printNodeFormatPreserving($delayedAddNode, $originalTokens);
                $first = \false;
            }
            $result .= $extraRight;
        }
        return $result;
    }
    /**
     * @param Node[] $nodes
     * @return array{bool, string, string}
     */
    private function isMultiline(int $initialIndex, array $nodes, TokenIterator $originalTokens) : array
    {
        $isMultiline = count($nodes) > 1;
        $pos = $initialIndex;
        $allText = '';
        /** @var Node|null $node */
        foreach ($nodes as $node) {
            if (!$node instanceof Node) {
                continue;
            }
            $endPos = $node->getAttribute(Attribute::END_INDEX) + 1;
            $text = $originalTokens->getContentBetween($pos, $endPos);
            $allText .= $text;
            if (strpos($text, "\n") === \false) {
                // We require that a newline is present between *every* item. If the formatting
                // is inconsistent, with only some items having newlines, we don't consider it
                // as multiline
                $isMultiline = \false;
            }
            $pos = $endPos;
        }
        $c = preg_match_all('~\\n(?<before>[\\x09\\x20]*)\\*(?<after>\\x20*)~', $allText, $matches, PREG_SET_ORDER);
        if ($c === 0) {
            return [$isMultiline, '', ''];
        }
        $before = '';
        $after = '';
        foreach ($matches as $match) {
            if (strlen($match['before']) > strlen($before)) {
                $before = $match['before'];
            }
            if (strlen($match['after']) <= strlen($after)) {
                continue;
            }
            $after = $match['after'];
        }
        return [$isMultiline, $before, $after];
    }
    private function printNodeFormatPreserving(Node $node, TokenIterator $originalTokens) : string
    {
        /** @var Node|null $originalNode */
        $originalNode = $node->getAttribute(Attribute::ORIGINAL_NODE);
        if ($originalNode === null) {
            return $this->print($node);
        }
        $class = get_class($node);
        if ($class !== get_class($originalNode)) {
            throw new LogicException();
        }
        $startPos = $originalNode->getAttribute(Attribute::START_INDEX);
        $endPos = $originalNode->getAttribute(Attribute::END_INDEX);
        if ($startPos < 0 || $endPos < 0) {
            throw new LogicException();
        }
        $result = '';
        $pos = $startPos;
        $subNodeNames = array_keys(get_object_vars($node));
        foreach ($subNodeNames as $subNodeName) {
            $subNode = $node->{$subNodeName};
            $origSubNode = $originalNode->{$subNodeName};
            if (!$subNode instanceof Node && $subNode !== null || !$origSubNode instanceof Node && $origSubNode !== null) {
                if ($subNode === $origSubNode) {
                    // Unchanged, can reuse old code
                    continue;
                }
                if (is_array($subNode) && is_array($origSubNode)) {
                    // Array subnode changed, we might be able to reconstruct it
                    $listResult = $this->printArrayFormatPreserving($subNode, $origSubNode, $originalTokens, $pos, $class, $subNodeName);
                    if ($listResult === null) {
                        return $this->print($node);
                    }
                    $result .= $listResult;
                    continue;
                }
                return $this->print($node);
            }
            if ($origSubNode === null) {
                if ($subNode === null) {
                    // Both null, nothing to do
                    continue;
                }
                return $this->print($node);
            }
            $subStartPos = $origSubNode->getAttribute(Attribute::START_INDEX);
            $subEndPos = $origSubNode->getAttribute(Attribute::END_INDEX);
            if ($subStartPos < 0 || $subEndPos < 0) {
                throw new LogicException();
            }
            if ($subNode === null) {
                return $this->print($node);
            }
            $result .= $originalTokens->getContentBetween($pos, $subStartPos);
            $mapKey = get_class($node) . '->' . $subNodeName;
            $parenthesesNeeded = isset($this->parenthesesMap[$mapKey]) && in_array(get_class($subNode), $this->parenthesesMap[$mapKey], \true);
            if ($subNode->getAttribute(Attribute::ORIGINAL_NODE) !== null) {
                $parenthesesNeeded = $parenthesesNeeded && !in_array(get_class($subNode->getAttribute(Attribute::ORIGINAL_NODE)), $this->parenthesesMap[$mapKey], \true);
            }
            $addParentheses = $parenthesesNeeded && !$originalTokens->hasParentheses($subStartPos, $subEndPos);
            if ($addParentheses) {
                $result .= '(';
            }
            $result .= $this->printNodeFormatPreserving($subNode, $originalTokens);
            if ($addParentheses) {
                $result .= ')';
            }
            $pos = $subEndPos + 1;
        }
        return $result . $originalTokens->getContentBetween($pos, $endPos + 1);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Printer;

use Exception;
use function array_reverse;
use function count;
/**
 * Inspired by https://github.com/nikic/PHP-Parser/tree/36a6dcd04e7b0285e8f0868f44bd4927802f7df1
 *
 * Copyright (c) 2011, Nikita Popov
 * All rights reserved.
 *
 * Implements the Myers diff algorithm.
 *
 * Myers, Eugene W. "An O (ND) difference algorithm and its variations."
 * Algorithmica 1.1 (1986): 251-266.
 *
 * @template T
 * @internal
 */
class Differ
{
    /** @var callable(T, T): bool */
    private $isEqual;
    /**
     * Create differ over the given equality relation.
     *
     * @param callable(T, T): bool $isEqual Equality relation
     */
    public function __construct(callable $isEqual)
    {
        $this->isEqual = $isEqual;
    }
    /**
     * Calculate diff (edit script) from $old to $new.
     *
     * @param T[] $old Original array
     * @param T[] $new New array
     *
     * @return DiffElem[] Diff (edit script)
     */
    public function diff(array $old, array $new) : array
    {
        [$trace, $x, $y] = $this->calculateTrace($old, $new);
        return $this->extractDiff($trace, $x, $y, $old, $new);
    }
    /**
     * Calculate diff, including "replace" operations.
     *
     * If a sequence of remove operations is followed by the same number of add operations, these
     * will be coalesced into replace operations.
     *
     * @param T[] $old Original array
     * @param T[] $new New array
     *
     * @return DiffElem[] Diff (edit script), including replace operations
     */
    public function diffWithReplacements(array $old, array $new) : array
    {
        return $this->coalesceReplacements($this->diff($old, $new));
    }
    /**
     * @param T[] $old
     * @param T[] $new
     * @return array{array<int, array<int, int>>, int, int}
     */
    private function calculateTrace(array $old, array $new) : array
    {
        $n = count($old);
        $m = count($new);
        $max = $n + $m;
        $v = [1 => 0];
        $trace = [];
        for ($d = 0; $d <= $max; $d++) {
            $trace[] = $v;
            for ($k = -$d; $k <= $d; $k += 2) {
                if ($k === -$d || $k !== $d && $v[$k - 1] < $v[$k + 1]) {
                    $x = $v[$k + 1];
                } else {
                    $x = $v[$k - 1] + 1;
                }
                $y = $x - $k;
                while ($x < $n && $y < $m && ($this->isEqual)($old[$x], $new[$y])) {
                    $x++;
                    $y++;
                }
                $v[$k] = $x;
                if ($x >= $n && $y >= $m) {
                    return [$trace, $x, $y];
                }
            }
        }
        throw new Exception('Should not happen');
    }
    /**
     * @param array<int, array<int, int>> $trace
     * @param T[] $old
     * @param T[] $new
     * @return DiffElem[]
     */
    private function extractDiff(array $trace, int $x, int $y, array $old, array $new) : array
    {
        $result = [];
        for ($d = count($trace) - 1; $d >= 0; $d--) {
            $v = $trace[$d];
            $k = $x - $y;
            if ($k === -$d || $k !== $d && $v[$k - 1] < $v[$k + 1]) {
                $prevK = $k + 1;
            } else {
                $prevK = $k - 1;
            }
            $prevX = $v[$prevK];
            $prevY = $prevX - $prevK;
            while ($x > $prevX && $y > $prevY) {
                $result[] = new \PHPStan\PhpDocParser\Printer\DiffElem(\PHPStan\PhpDocParser\Printer\DiffElem::TYPE_KEEP, $old[$x - 1], $new[$y - 1]);
                $x--;
                $y--;
            }
            if ($d === 0) {
                break;
            }
            while ($x > $prevX) {
                $result[] = new \PHPStan\PhpDocParser\Printer\DiffElem(\PHPStan\PhpDocParser\Printer\DiffElem::TYPE_REMOVE, $old[$x - 1], null);
                $x--;
            }
            while ($y > $prevY) {
                $result[] = new \PHPStan\PhpDocParser\Printer\DiffElem(\PHPStan\PhpDocParser\Printer\DiffElem::TYPE_ADD, null, $new[$y - 1]);
                $y--;
            }
        }
        return array_reverse($result);
    }
    /**
     * Coalesce equal-length sequences of remove+add into a replace operation.
     *
     * @param DiffElem[] $diff
     * @return DiffElem[]
     */
    private function coalesceReplacements(array $diff) : array
    {
        $newDiff = [];
        $c = count($diff);
        for ($i = 0; $i < $c; $i++) {
            $diffType = $diff[$i]->type;
            if ($diffType !== \PHPStan\PhpDocParser\Printer\DiffElem::TYPE_REMOVE) {
                $newDiff[] = $diff[$i];
                continue;
            }
            $j = $i;
            while ($j < $c && $diff[$j]->type === \PHPStan\PhpDocParser\Printer\DiffElem::TYPE_REMOVE) {
                $j++;
            }
            $k = $j;
            while ($k < $c && $diff[$k]->type === \PHPStan\PhpDocParser\Printer\DiffElem::TYPE_ADD) {
                $k++;
            }
            if ($j - $i === $k - $j) {
                $len = $j - $i;
                for ($n = 0; $n < $len; $n++) {
                    $newDiff[] = new \PHPStan\PhpDocParser\Printer\DiffElem(\PHPStan\PhpDocParser\Printer\DiffElem::TYPE_REPLACE, $diff[$i + $n]->old, $diff[$j + $n]->new);
                }
            } else {
                for (; $i < $k; $i++) {
                    $newDiff[] = $diff[$i];
                }
            }
            $i = $k - 1;
        }
        return $newDiff;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Printer;

/**
 * Inspired by https://github.com/nikic/PHP-Parser/tree/36a6dcd04e7b0285e8f0868f44bd4927802f7df1
 *
 * Copyright (c) 2011, Nikita Popov
 * All rights reserved.
 *
 * Implements the Myers diff algorithm.
 *
 * @internal
 */
class DiffElem
{
    public const TYPE_KEEP = 0;
    public const TYPE_REMOVE = 1;
    public const TYPE_ADD = 2;
    public const TYPE_REPLACE = 3;
    /** @var self::TYPE_* */
    public $type;
    /** @var mixed Is null for add operations */
    public $old;
    /** @var mixed Is null for remove operations */
    public $new;
    /**
     * @param self::TYPE_* $type
     * @param mixed $old Is null for add operations
     * @param mixed $new Is null for remove operations
     */
    public function __construct(int $type, $old, $new)
    {
        $this->type = $type;
        $this->old = $old;
        $this->new = $new;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Lexer;

use function implode;
use function preg_match_all;
use const PREG_SET_ORDER;
/**
 * Implementation based on Nette Tokenizer (New BSD License; https://github.com/nette/tokenizer)
 */
class Lexer
{
    public const TOKEN_REFERENCE = 0;
    public const TOKEN_UNION = 1;
    public const TOKEN_INTERSECTION = 2;
    public const TOKEN_NULLABLE = 3;
    public const TOKEN_OPEN_PARENTHESES = 4;
    public const TOKEN_CLOSE_PARENTHESES = 5;
    public const TOKEN_OPEN_ANGLE_BRACKET = 6;
    public const TOKEN_CLOSE_ANGLE_BRACKET = 7;
    public const TOKEN_OPEN_SQUARE_BRACKET = 8;
    public const TOKEN_CLOSE_SQUARE_BRACKET = 9;
    public const TOKEN_COMMA = 10;
    public const TOKEN_VARIADIC = 11;
    public const TOKEN_DOUBLE_COLON = 12;
    public const TOKEN_DOUBLE_ARROW = 13;
    public const TOKEN_EQUAL = 14;
    public const TOKEN_OPEN_PHPDOC = 15;
    public const TOKEN_CLOSE_PHPDOC = 16;
    public const TOKEN_PHPDOC_TAG = 17;
    public const TOKEN_DOCTRINE_TAG = 18;
    public const TOKEN_FLOAT = 19;
    public const TOKEN_INTEGER = 20;
    public const TOKEN_SINGLE_QUOTED_STRING = 21;
    public const TOKEN_DOUBLE_QUOTED_STRING = 22;
    public const TOKEN_IDENTIFIER = 23;
    public const TOKEN_THIS_VARIABLE = 24;
    public const TOKEN_VARIABLE = 25;
    public const TOKEN_HORIZONTAL_WS = 26;
    public const TOKEN_PHPDOC_EOL = 27;
    public const TOKEN_OTHER = 28;
    public const TOKEN_END = 29;
    public const TOKEN_COLON = 30;
    public const TOKEN_WILDCARD = 31;
    public const TOKEN_OPEN_CURLY_BRACKET = 32;
    public const TOKEN_CLOSE_CURLY_BRACKET = 33;
    public const TOKEN_NEGATED = 34;
    public const TOKEN_ARROW = 35;
    public const TOKEN_LABELS = [self::TOKEN_REFERENCE => '\'&\'', self::TOKEN_UNION => '\'|\'', self::TOKEN_INTERSECTION => '\'&\'', self::TOKEN_NULLABLE => '\'?\'', self::TOKEN_NEGATED => '\'!\'', self::TOKEN_OPEN_PARENTHESES => '\'(\'', self::TOKEN_CLOSE_PARENTHESES => '\')\'', self::TOKEN_OPEN_ANGLE_BRACKET => '\'<\'', self::TOKEN_CLOSE_ANGLE_BRACKET => '\'>\'', self::TOKEN_OPEN_SQUARE_BRACKET => '\'[\'', self::TOKEN_CLOSE_SQUARE_BRACKET => '\']\'', self::TOKEN_OPEN_CURLY_BRACKET => '\'{\'', self::TOKEN_CLOSE_CURLY_BRACKET => '\'}\'', self::TOKEN_COMMA => '\',\'', self::TOKEN_COLON => '\':\'', self::TOKEN_VARIADIC => '\'...\'', self::TOKEN_DOUBLE_COLON => '\'::\'', self::TOKEN_DOUBLE_ARROW => '\'=>\'', self::TOKEN_ARROW => '\'->\'', self::TOKEN_EQUAL => '\'=\'', self::TOKEN_OPEN_PHPDOC => '\'/**\'', self::TOKEN_CLOSE_PHPDOC => '\'*/\'', self::TOKEN_PHPDOC_TAG => 'TOKEN_PHPDOC_TAG', self::TOKEN_DOCTRINE_TAG => 'TOKEN_DOCTRINE_TAG', self::TOKEN_PHPDOC_EOL => 'TOKEN_PHPDOC_EOL', self::TOKEN_FLOAT => 'TOKEN_FLOAT', self::TOKEN_INTEGER => 'TOKEN_INTEGER', self::TOKEN_SINGLE_QUOTED_STRING => 'TOKEN_SINGLE_QUOTED_STRING', self::TOKEN_DOUBLE_QUOTED_STRING => 'TOKEN_DOUBLE_QUOTED_STRING', self::TOKEN_IDENTIFIER => 'type', self::TOKEN_THIS_VARIABLE => '\'$this\'', self::TOKEN_VARIABLE => 'variable', self::TOKEN_HORIZONTAL_WS => 'TOKEN_HORIZONTAL_WS', self::TOKEN_OTHER => 'TOKEN_OTHER', self::TOKEN_END => 'TOKEN_END', self::TOKEN_WILDCARD => '*'];
    public const VALUE_OFFSET = 0;
    public const TYPE_OFFSET = 1;
    public const LINE_OFFSET = 2;
    /** @var bool */
    private $parseDoctrineAnnotations;
    /** @var string|null */
    private $regexp;
    public function __construct(bool $parseDoctrineAnnotations = \false)
    {
        $this->parseDoctrineAnnotations = $parseDoctrineAnnotations;
    }
    /**
     * @return list<array{string, int, int}>
     */
    public function tokenize(string $s) : array
    {
        if ($this->regexp === null) {
            $this->regexp = $this->generateRegexp();
        }
        preg_match_all($this->regexp, $s, $matches, PREG_SET_ORDER);
        $tokens = [];
        $line = 1;
        foreach ($matches as $match) {
            $type = (int) $match['MARK'];
            $tokens[] = [$match[0], $type, $line];
            if ($type !== self::TOKEN_PHPDOC_EOL) {
                continue;
            }
            $line++;
        }
        $tokens[] = ['', self::TOKEN_END, $line];
        return $tokens;
    }
    private function generateRegexp() : string
    {
        $patterns = [
            self::TOKEN_HORIZONTAL_WS => '[\\x09\\x20]++',
            self::TOKEN_IDENTIFIER => '(?:[\\\\]?+[a-z_\\x80-\\xFF][0-9a-z_\\x80-\\xFF-]*+)++',
            self::TOKEN_THIS_VARIABLE => '\\$this(?![0-9a-z_\\x80-\\xFF])',
            self::TOKEN_VARIABLE => '\\$[a-z_\\x80-\\xFF][0-9a-z_\\x80-\\xFF]*+',
            // '&' followed by TOKEN_VARIADIC, TOKEN_VARIABLE, TOKEN_EQUAL, TOKEN_EQUAL or TOKEN_CLOSE_PARENTHESES
            self::TOKEN_REFERENCE => '&(?=\\s*+(?:[.,=)]|(?:\\$(?!this(?![0-9a-z_\\x80-\\xFF])))))',
            self::TOKEN_UNION => '\\|',
            self::TOKEN_INTERSECTION => '&',
            self::TOKEN_NULLABLE => '\\?',
            self::TOKEN_NEGATED => '!',
            self::TOKEN_OPEN_PARENTHESES => '\\(',
            self::TOKEN_CLOSE_PARENTHESES => '\\)',
            self::TOKEN_OPEN_ANGLE_BRACKET => '<',
            self::TOKEN_CLOSE_ANGLE_BRACKET => '>',
            self::TOKEN_OPEN_SQUARE_BRACKET => '\\[',
            self::TOKEN_CLOSE_SQUARE_BRACKET => '\\]',
            self::TOKEN_OPEN_CURLY_BRACKET => '\\{',
            self::TOKEN_CLOSE_CURLY_BRACKET => '\\}',
            self::TOKEN_COMMA => ',',
            self::TOKEN_VARIADIC => '\\.\\.\\.',
            self::TOKEN_DOUBLE_COLON => '::',
            self::TOKEN_DOUBLE_ARROW => '=>',
            self::TOKEN_ARROW => '->',
            self::TOKEN_EQUAL => '=',
            self::TOKEN_COLON => ':',
            self::TOKEN_OPEN_PHPDOC => '/\\*\\*(?=\\s)\\x20?+',
            self::TOKEN_CLOSE_PHPDOC => '\\*/',
            self::TOKEN_PHPDOC_TAG => '@(?:[a-z][a-z0-9-\\\\]+:)?[a-z][a-z0-9-\\\\]*+',
            self::TOKEN_PHPDOC_EOL => '\\r?+\\n[\\x09\\x20]*+(?:\\*(?!/)\\x20?+)?',
            self::TOKEN_FLOAT => '[+\\-]?(?:(?:[0-9]++(_[0-9]++)*\\.[0-9]*+(_[0-9]++)*(?:e[+\\-]?[0-9]++(_[0-9]++)*)?)|(?:[0-9]*+(_[0-9]++)*\\.[0-9]++(_[0-9]++)*(?:e[+\\-]?[0-9]++(_[0-9]++)*)?)|(?:[0-9]++(_[0-9]++)*e[+\\-]?[0-9]++(_[0-9]++)*))',
            self::TOKEN_INTEGER => '[+\\-]?(?:(?:0b[0-1]++(_[0-1]++)*)|(?:0o[0-7]++(_[0-7]++)*)|(?:0x[0-9a-f]++(_[0-9a-f]++)*)|(?:[0-9]++(_[0-9]++)*))',
            self::TOKEN_SINGLE_QUOTED_STRING => '\'(?:\\\\[^\\r\\n]|[^\'\\r\\n\\\\])*+\'',
            self::TOKEN_DOUBLE_QUOTED_STRING => '"(?:\\\\[^\\r\\n]|[^"\\r\\n\\\\])*+"',
            self::TOKEN_WILDCARD => '\\*',
        ];
        if ($this->parseDoctrineAnnotations) {
            $patterns[self::TOKEN_DOCTRINE_TAG] = '@[a-z_\\\\][a-z0-9_\\:\\\\]*[a-z_][a-z0-9_]*';
        }
        // anything but TOKEN_CLOSE_PHPDOC or TOKEN_HORIZONTAL_WS or TOKEN_EOL
        $patterns[self::TOKEN_OTHER] = '(?:(?!\\*/)[^\\s])++';
        foreach ($patterns as $type => &$pattern) {
            $pattern = '(?:' . $pattern . ')(*MARK:' . $type . ')';
        }
        return '~' . implode('|', $patterns) . '~Asi';
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Parser;

use LogicException;
use PHPStan\PhpDocParser\Ast;
use PHPStan\PhpDocParser\Lexer\Lexer;
use function in_array;
use function str_replace;
use function strpos;
use function trim;
class TypeParser
{
    /** @var ConstExprParser|null */
    private $constExprParser;
    /** @var bool */
    private $quoteAwareConstExprString;
    /** @var bool */
    private $useLinesAttributes;
    /** @var bool */
    private $useIndexAttributes;
    /**
     * @param array{lines?: bool, indexes?: bool} $usedAttributes
     */
    public function __construct(?\PHPStan\PhpDocParser\Parser\ConstExprParser $constExprParser = null, bool $quoteAwareConstExprString = \false, array $usedAttributes = [])
    {
        $this->constExprParser = $constExprParser;
        $this->quoteAwareConstExprString = $quoteAwareConstExprString;
        $this->useLinesAttributes = $usedAttributes['lines'] ?? \false;
        $this->useIndexAttributes = $usedAttributes['indexes'] ?? \false;
    }
    /** @phpstan-impure */
    public function parse(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\Type\TypeNode
    {
        $startLine = $tokens->currentTokenLine();
        $startIndex = $tokens->currentTokenIndex();
        if ($tokens->isCurrentTokenType(Lexer::TOKEN_NULLABLE)) {
            $type = $this->parseNullable($tokens);
        } else {
            $type = $this->parseAtomic($tokens);
            if ($tokens->isCurrentTokenType(Lexer::TOKEN_UNION)) {
                $type = $this->parseUnion($tokens, $type);
            } elseif ($tokens->isCurrentTokenType(Lexer::TOKEN_INTERSECTION)) {
                $type = $this->parseIntersection($tokens, $type);
            }
        }
        return $this->enrichWithAttributes($tokens, $type, $startLine, $startIndex);
    }
    /**
     * @internal
     * @template T of Ast\Node
     * @param T $type
     * @return T
     */
    public function enrichWithAttributes(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens, Ast\Node $type, int $startLine, int $startIndex) : Ast\Node
    {
        if ($this->useLinesAttributes) {
            $type->setAttribute(Ast\Attribute::START_LINE, $startLine);
            $type->setAttribute(Ast\Attribute::END_LINE, $tokens->currentTokenLine());
        }
        if ($this->useIndexAttributes) {
            $type->setAttribute(Ast\Attribute::START_INDEX, $startIndex);
            $type->setAttribute(Ast\Attribute::END_INDEX, $tokens->endIndexOfLastRelevantToken());
        }
        return $type;
    }
    /** @phpstan-impure */
    private function subParse(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\Type\TypeNode
    {
        $startLine = $tokens->currentTokenLine();
        $startIndex = $tokens->currentTokenIndex();
        if ($tokens->isCurrentTokenType(Lexer::TOKEN_NULLABLE)) {
            $type = $this->parseNullable($tokens);
        } elseif ($tokens->isCurrentTokenType(Lexer::TOKEN_VARIABLE)) {
            $type = $this->parseConditionalForParameter($tokens, $tokens->currentTokenValue());
        } else {
            $type = $this->parseAtomic($tokens);
            if ($tokens->isCurrentTokenValue('is')) {
                $type = $this->parseConditional($tokens, $type);
            } else {
                $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
                if ($tokens->isCurrentTokenType(Lexer::TOKEN_UNION)) {
                    $type = $this->subParseUnion($tokens, $type);
                } elseif ($tokens->isCurrentTokenType(Lexer::TOKEN_INTERSECTION)) {
                    $type = $this->subParseIntersection($tokens, $type);
                }
            }
        }
        return $this->enrichWithAttributes($tokens, $type, $startLine, $startIndex);
    }
    /** @phpstan-impure */
    private function parseAtomic(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\Type\TypeNode
    {
        $startLine = $tokens->currentTokenLine();
        $startIndex = $tokens->currentTokenIndex();
        if ($tokens->tryConsumeTokenType(Lexer::TOKEN_OPEN_PARENTHESES)) {
            $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
            $type = $this->subParse($tokens);
            $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
            $tokens->consumeTokenType(Lexer::TOKEN_CLOSE_PARENTHESES);
            if ($tokens->isCurrentTokenType(Lexer::TOKEN_OPEN_SQUARE_BRACKET)) {
                $type = $this->tryParseArrayOrOffsetAccess($tokens, $type);
            }
            return $this->enrichWithAttributes($tokens, $type, $startLine, $startIndex);
        }
        if ($tokens->tryConsumeTokenType(Lexer::TOKEN_THIS_VARIABLE)) {
            $type = $this->enrichWithAttributes($tokens, new Ast\Type\ThisTypeNode(), $startLine, $startIndex);
            if ($tokens->isCurrentTokenType(Lexer::TOKEN_OPEN_SQUARE_BRACKET)) {
                $type = $this->tryParseArrayOrOffsetAccess($tokens, $type);
            }
            return $this->enrichWithAttributes($tokens, $type, $startLine, $startIndex);
        }
        $currentTokenValue = $tokens->currentTokenValue();
        $tokens->pushSavePoint();
        // because of ConstFetchNode
        if ($tokens->tryConsumeTokenType(Lexer::TOKEN_IDENTIFIER)) {
            $type = $this->enrichWithAttributes($tokens, new Ast\Type\IdentifierTypeNode($currentTokenValue), $startLine, $startIndex);
            if (!$tokens->isCurrentTokenType(Lexer::TOKEN_DOUBLE_COLON)) {
                $tokens->dropSavePoint();
                // because of ConstFetchNode
                if ($tokens->isCurrentTokenType(Lexer::TOKEN_OPEN_ANGLE_BRACKET)) {
                    $tokens->pushSavePoint();
                    $isHtml = $this->isHtml($tokens);
                    $tokens->rollback();
                    if ($isHtml) {
                        return $type;
                    }
                    $type = $this->parseGeneric($tokens, $type);
                    if ($tokens->isCurrentTokenType(Lexer::TOKEN_OPEN_SQUARE_BRACKET)) {
                        $type = $this->tryParseArrayOrOffsetAccess($tokens, $type);
                    }
                } elseif ($tokens->isCurrentTokenType(Lexer::TOKEN_OPEN_PARENTHESES)) {
                    $type = $this->tryParseCallable($tokens, $type);
                } elseif ($tokens->isCurrentTokenType(Lexer::TOKEN_OPEN_SQUARE_BRACKET)) {
                    $type = $this->tryParseArrayOrOffsetAccess($tokens, $type);
                } elseif (in_array($type->name, ['array', 'list', 'object'], \true) && $tokens->isCurrentTokenType(Lexer::TOKEN_OPEN_CURLY_BRACKET) && !$tokens->isPrecededByHorizontalWhitespace()) {
                    if ($type->name === 'object') {
                        $type = $this->parseObjectShape($tokens);
                    } else {
                        $type = $this->parseArrayShape($tokens, $type, $type->name);
                    }
                    if ($tokens->isCurrentTokenType(Lexer::TOKEN_OPEN_SQUARE_BRACKET)) {
                        $type = $this->tryParseArrayOrOffsetAccess($tokens, $this->enrichWithAttributes($tokens, $type, $startLine, $startIndex));
                    }
                }
                return $this->enrichWithAttributes($tokens, $type, $startLine, $startIndex);
            } else {
                $tokens->rollback();
                // because of ConstFetchNode
            }
        } else {
            $tokens->dropSavePoint();
            // because of ConstFetchNode
        }
        $exception = new \PHPStan\PhpDocParser\Parser\ParserException($tokens->currentTokenValue(), $tokens->currentTokenType(), $tokens->currentTokenOffset(), Lexer::TOKEN_IDENTIFIER, null, $tokens->currentTokenLine());
        if ($this->constExprParser === null) {
            throw $exception;
        }
        try {
            $constExpr = $this->constExprParser->parse($tokens, \true);
            if ($constExpr instanceof Ast\ConstExpr\ConstExprArrayNode) {
                throw $exception;
            }
            return $this->enrichWithAttributes($tokens, new Ast\Type\ConstTypeNode($constExpr), $startLine, $startIndex);
        } catch (LogicException $e) {
            throw $exception;
        }
    }
    /** @phpstan-impure */
    private function parseUnion(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens, Ast\Type\TypeNode $type) : Ast\Type\TypeNode
    {
        $types = [$type];
        while ($tokens->tryConsumeTokenType(Lexer::TOKEN_UNION)) {
            $types[] = $this->parseAtomic($tokens);
        }
        return new Ast\Type\UnionTypeNode($types);
    }
    /** @phpstan-impure */
    private function subParseUnion(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens, Ast\Type\TypeNode $type) : Ast\Type\TypeNode
    {
        $types = [$type];
        while ($tokens->tryConsumeTokenType(Lexer::TOKEN_UNION)) {
            $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
            $types[] = $this->parseAtomic($tokens);
            $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
        }
        return new Ast\Type\UnionTypeNode($types);
    }
    /** @phpstan-impure */
    private function parseIntersection(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens, Ast\Type\TypeNode $type) : Ast\Type\TypeNode
    {
        $types = [$type];
        while ($tokens->tryConsumeTokenType(Lexer::TOKEN_INTERSECTION)) {
            $types[] = $this->parseAtomic($tokens);
        }
        return new Ast\Type\IntersectionTypeNode($types);
    }
    /** @phpstan-impure */
    private function subParseIntersection(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens, Ast\Type\TypeNode $type) : Ast\Type\TypeNode
    {
        $types = [$type];
        while ($tokens->tryConsumeTokenType(Lexer::TOKEN_INTERSECTION)) {
            $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
            $types[] = $this->parseAtomic($tokens);
            $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
        }
        return new Ast\Type\IntersectionTypeNode($types);
    }
    /** @phpstan-impure */
    private function parseConditional(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens, Ast\Type\TypeNode $subjectType) : Ast\Type\TypeNode
    {
        $tokens->consumeTokenType(Lexer::TOKEN_IDENTIFIER);
        $negated = \false;
        if ($tokens->isCurrentTokenValue('not')) {
            $negated = \true;
            $tokens->consumeTokenType(Lexer::TOKEN_IDENTIFIER);
        }
        $targetType = $this->parse($tokens);
        $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
        $tokens->consumeTokenType(Lexer::TOKEN_NULLABLE);
        $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
        $ifType = $this->parse($tokens);
        $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
        $tokens->consumeTokenType(Lexer::TOKEN_COLON);
        $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
        $elseType = $this->subParse($tokens);
        return new Ast\Type\ConditionalTypeNode($subjectType, $targetType, $ifType, $elseType, $negated);
    }
    /** @phpstan-impure */
    private function parseConditionalForParameter(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens, string $parameterName) : Ast\Type\TypeNode
    {
        $tokens->consumeTokenType(Lexer::TOKEN_VARIABLE);
        $tokens->consumeTokenValue(Lexer::TOKEN_IDENTIFIER, 'is');
        $negated = \false;
        if ($tokens->isCurrentTokenValue('not')) {
            $negated = \true;
            $tokens->consumeTokenType(Lexer::TOKEN_IDENTIFIER);
        }
        $targetType = $this->parse($tokens);
        $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
        $tokens->consumeTokenType(Lexer::TOKEN_NULLABLE);
        $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
        $ifType = $this->parse($tokens);
        $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
        $tokens->consumeTokenType(Lexer::TOKEN_COLON);
        $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
        $elseType = $this->subParse($tokens);
        return new Ast\Type\ConditionalTypeForParameterNode($parameterName, $targetType, $ifType, $elseType, $negated);
    }
    /** @phpstan-impure */
    private function parseNullable(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\Type\TypeNode
    {
        $tokens->consumeTokenType(Lexer::TOKEN_NULLABLE);
        $type = $this->parseAtomic($tokens);
        return new Ast\Type\NullableTypeNode($type);
    }
    /** @phpstan-impure */
    public function isHtml(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : bool
    {
        $tokens->consumeTokenType(Lexer::TOKEN_OPEN_ANGLE_BRACKET);
        if (!$tokens->isCurrentTokenType(Lexer::TOKEN_IDENTIFIER)) {
            return \false;
        }
        $htmlTagName = $tokens->currentTokenValue();
        $tokens->next();
        if (!$tokens->tryConsumeTokenType(Lexer::TOKEN_CLOSE_ANGLE_BRACKET)) {
            return \false;
        }
        while (!$tokens->isCurrentTokenType(Lexer::TOKEN_END)) {
            if ($tokens->tryConsumeTokenType(Lexer::TOKEN_OPEN_ANGLE_BRACKET) && strpos($tokens->currentTokenValue(), '/' . $htmlTagName . '>') !== \false) {
                return \true;
            }
            $tokens->next();
        }
        return \false;
    }
    /** @phpstan-impure */
    public function parseGeneric(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens, Ast\Type\IdentifierTypeNode $baseType) : Ast\Type\GenericTypeNode
    {
        $tokens->consumeTokenType(Lexer::TOKEN_OPEN_ANGLE_BRACKET);
        $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
        $genericTypes = [];
        $variances = [];
        [$genericTypes[], $variances[]] = $this->parseGenericTypeArgument($tokens);
        $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
        while ($tokens->tryConsumeTokenType(Lexer::TOKEN_COMMA)) {
            $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
            if ($tokens->tryConsumeTokenType(Lexer::TOKEN_CLOSE_ANGLE_BRACKET)) {
                // trailing comma case
                $type = new Ast\Type\GenericTypeNode($baseType, $genericTypes, $variances);
                $startLine = $baseType->getAttribute(Ast\Attribute::START_LINE);
                $startIndex = $baseType->getAttribute(Ast\Attribute::START_INDEX);
                if ($startLine !== null && $startIndex !== null) {
                    $type = $this->enrichWithAttributes($tokens, $type, $startLine, $startIndex);
                }
                return $type;
            }
            [$genericTypes[], $variances[]] = $this->parseGenericTypeArgument($tokens);
            $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
        }
        $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
        $tokens->consumeTokenType(Lexer::TOKEN_CLOSE_ANGLE_BRACKET);
        $type = new Ast\Type\GenericTypeNode($baseType, $genericTypes, $variances);
        $startLine = $baseType->getAttribute(Ast\Attribute::START_LINE);
        $startIndex = $baseType->getAttribute(Ast\Attribute::START_INDEX);
        if ($startLine !== null && $startIndex !== null) {
            $type = $this->enrichWithAttributes($tokens, $type, $startLine, $startIndex);
        }
        return $type;
    }
    /**
     * @phpstan-impure
     * @return array{Ast\Type\TypeNode, Ast\Type\GenericTypeNode::VARIANCE_*}
     */
    public function parseGenericTypeArgument(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : array
    {
        $startLine = $tokens->currentTokenLine();
        $startIndex = $tokens->currentTokenIndex();
        if ($tokens->tryConsumeTokenType(Lexer::TOKEN_WILDCARD)) {
            return [$this->enrichWithAttributes($tokens, new Ast\Type\IdentifierTypeNode('mixed'), $startLine, $startIndex), Ast\Type\GenericTypeNode::VARIANCE_BIVARIANT];
        }
        if ($tokens->tryConsumeTokenValue('contravariant')) {
            $variance = Ast\Type\GenericTypeNode::VARIANCE_CONTRAVARIANT;
        } elseif ($tokens->tryConsumeTokenValue('covariant')) {
            $variance = Ast\Type\GenericTypeNode::VARIANCE_COVARIANT;
        } else {
            $variance = Ast\Type\GenericTypeNode::VARIANCE_INVARIANT;
        }
        $type = $this->parse($tokens);
        return [$type, $variance];
    }
    /** @phpstan-impure */
    private function parseCallable(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens, Ast\Type\IdentifierTypeNode $identifier) : Ast\Type\TypeNode
    {
        $tokens->consumeTokenType(Lexer::TOKEN_OPEN_PARENTHESES);
        $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
        $parameters = [];
        if (!$tokens->isCurrentTokenType(Lexer::TOKEN_CLOSE_PARENTHESES)) {
            $parameters[] = $this->parseCallableParameter($tokens);
            $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
            while ($tokens->tryConsumeTokenType(Lexer::TOKEN_COMMA)) {
                $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
                if ($tokens->isCurrentTokenType(Lexer::TOKEN_CLOSE_PARENTHESES)) {
                    break;
                }
                $parameters[] = $this->parseCallableParameter($tokens);
                $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
            }
        }
        $tokens->consumeTokenType(Lexer::TOKEN_CLOSE_PARENTHESES);
        $tokens->consumeTokenType(Lexer::TOKEN_COLON);
        $startLine = $tokens->currentTokenLine();
        $startIndex = $tokens->currentTokenIndex();
        $returnType = $this->enrichWithAttributes($tokens, $this->parseCallableReturnType($tokens), $startLine, $startIndex);
        return new Ast\Type\CallableTypeNode($identifier, $parameters, $returnType);
    }
    /** @phpstan-impure */
    private function parseCallableParameter(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\Type\CallableTypeParameterNode
    {
        $startLine = $tokens->currentTokenLine();
        $startIndex = $tokens->currentTokenIndex();
        $type = $this->parse($tokens);
        $isReference = $tokens->tryConsumeTokenType(Lexer::TOKEN_REFERENCE);
        $isVariadic = $tokens->tryConsumeTokenType(Lexer::TOKEN_VARIADIC);
        if ($tokens->isCurrentTokenType(Lexer::TOKEN_VARIABLE)) {
            $parameterName = $tokens->currentTokenValue();
            $tokens->consumeTokenType(Lexer::TOKEN_VARIABLE);
        } else {
            $parameterName = '';
        }
        $isOptional = $tokens->tryConsumeTokenType(Lexer::TOKEN_EQUAL);
        return $this->enrichWithAttributes($tokens, new Ast\Type\CallableTypeParameterNode($type, $isReference, $isVariadic, $parameterName, $isOptional), $startLine, $startIndex);
    }
    /** @phpstan-impure */
    private function parseCallableReturnType(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\Type\TypeNode
    {
        $startLine = $tokens->currentTokenLine();
        $startIndex = $tokens->currentTokenIndex();
        if ($tokens->isCurrentTokenType(Lexer::TOKEN_NULLABLE)) {
            return $this->parseNullable($tokens);
        } elseif ($tokens->tryConsumeTokenType(Lexer::TOKEN_OPEN_PARENTHESES)) {
            $type = $this->parse($tokens);
            $tokens->consumeTokenType(Lexer::TOKEN_CLOSE_PARENTHESES);
            if ($tokens->isCurrentTokenType(Lexer::TOKEN_OPEN_SQUARE_BRACKET)) {
                $type = $this->tryParseArrayOrOffsetAccess($tokens, $type);
            }
            return $type;
        } elseif ($tokens->tryConsumeTokenType(Lexer::TOKEN_THIS_VARIABLE)) {
            $type = new Ast\Type\ThisTypeNode();
            if ($tokens->isCurrentTokenType(Lexer::TOKEN_OPEN_SQUARE_BRACKET)) {
                $type = $this->tryParseArrayOrOffsetAccess($tokens, $this->enrichWithAttributes($tokens, $type, $startLine, $startIndex));
            }
            return $type;
        } else {
            $currentTokenValue = $tokens->currentTokenValue();
            $tokens->pushSavePoint();
            // because of ConstFetchNode
            if ($tokens->tryConsumeTokenType(Lexer::TOKEN_IDENTIFIER)) {
                $type = new Ast\Type\IdentifierTypeNode($currentTokenValue);
                if (!$tokens->isCurrentTokenType(Lexer::TOKEN_DOUBLE_COLON)) {
                    if ($tokens->isCurrentTokenType(Lexer::TOKEN_OPEN_ANGLE_BRACKET)) {
                        $type = $this->parseGeneric($tokens, $this->enrichWithAttributes($tokens, $type, $startLine, $startIndex));
                        if ($tokens->isCurrentTokenType(Lexer::TOKEN_OPEN_SQUARE_BRACKET)) {
                            $type = $this->tryParseArrayOrOffsetAccess($tokens, $this->enrichWithAttributes($tokens, $type, $startLine, $startIndex));
                        }
                    } elseif ($tokens->isCurrentTokenType(Lexer::TOKEN_OPEN_SQUARE_BRACKET)) {
                        $type = $this->tryParseArrayOrOffsetAccess($tokens, $this->enrichWithAttributes($tokens, $type, $startLine, $startIndex));
                    } elseif (in_array($type->name, ['array', 'list', 'object'], \true) && $tokens->isCurrentTokenType(Lexer::TOKEN_OPEN_CURLY_BRACKET) && !$tokens->isPrecededByHorizontalWhitespace()) {
                        if ($type->name === 'object') {
                            $type = $this->parseObjectShape($tokens);
                        } else {
                            $type = $this->parseArrayShape($tokens, $this->enrichWithAttributes($tokens, $type, $startLine, $startIndex), $type->name);
                        }
                        if ($tokens->isCurrentTokenType(Lexer::TOKEN_OPEN_SQUARE_BRACKET)) {
                            $type = $this->tryParseArrayOrOffsetAccess($tokens, $this->enrichWithAttributes($tokens, $type, $startLine, $startIndex));
                        }
                    }
                    return $type;
                } else {
                    $tokens->rollback();
                    // because of ConstFetchNode
                }
            } else {
                $tokens->dropSavePoint();
                // because of ConstFetchNode
            }
        }
        $exception = new \PHPStan\PhpDocParser\Parser\ParserException($tokens->currentTokenValue(), $tokens->currentTokenType(), $tokens->currentTokenOffset(), Lexer::TOKEN_IDENTIFIER, null, $tokens->currentTokenLine());
        if ($this->constExprParser === null) {
            throw $exception;
        }
        try {
            $constExpr = $this->constExprParser->parse($tokens, \true);
            if ($constExpr instanceof Ast\ConstExpr\ConstExprArrayNode) {
                throw $exception;
            }
            $type = new Ast\Type\ConstTypeNode($constExpr);
            if ($tokens->isCurrentTokenType(Lexer::TOKEN_OPEN_SQUARE_BRACKET)) {
                $type = $this->tryParseArrayOrOffsetAccess($tokens, $this->enrichWithAttributes($tokens, $type, $startLine, $startIndex));
            }
            return $type;
        } catch (LogicException $e) {
            throw $exception;
        }
    }
    /** @phpstan-impure */
    private function tryParseCallable(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens, Ast\Type\IdentifierTypeNode $identifier) : Ast\Type\TypeNode
    {
        try {
            $tokens->pushSavePoint();
            $type = $this->parseCallable($tokens, $identifier);
            $tokens->dropSavePoint();
        } catch (\PHPStan\PhpDocParser\Parser\ParserException $e) {
            $tokens->rollback();
            $type = $identifier;
        }
        return $type;
    }
    /** @phpstan-impure */
    private function tryParseArrayOrOffsetAccess(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens, Ast\Type\TypeNode $type) : Ast\Type\TypeNode
    {
        $startLine = $type->getAttribute(Ast\Attribute::START_LINE);
        $startIndex = $type->getAttribute(Ast\Attribute::START_INDEX);
        try {
            while ($tokens->isCurrentTokenType(Lexer::TOKEN_OPEN_SQUARE_BRACKET)) {
                $tokens->pushSavePoint();
                $canBeOffsetAccessType = !$tokens->isPrecededByHorizontalWhitespace();
                $tokens->consumeTokenType(Lexer::TOKEN_OPEN_SQUARE_BRACKET);
                if ($canBeOffsetAccessType && !$tokens->isCurrentTokenType(Lexer::TOKEN_CLOSE_SQUARE_BRACKET)) {
                    $offset = $this->parse($tokens);
                    $tokens->consumeTokenType(Lexer::TOKEN_CLOSE_SQUARE_BRACKET);
                    $tokens->dropSavePoint();
                    $type = new Ast\Type\OffsetAccessTypeNode($type, $offset);
                    if ($startLine !== null && $startIndex !== null) {
                        $type = $this->enrichWithAttributes($tokens, $type, $startLine, $startIndex);
                    }
                } else {
                    $tokens->consumeTokenType(Lexer::TOKEN_CLOSE_SQUARE_BRACKET);
                    $tokens->dropSavePoint();
                    $type = new Ast\Type\ArrayTypeNode($type);
                    if ($startLine !== null && $startIndex !== null) {
                        $type = $this->enrichWithAttributes($tokens, $type, $startLine, $startIndex);
                    }
                }
            }
        } catch (\PHPStan\PhpDocParser\Parser\ParserException $e) {
            $tokens->rollback();
        }
        return $type;
    }
    /**
     * @phpstan-impure
     * @param Ast\Type\ArrayShapeNode::KIND_* $kind
     */
    private function parseArrayShape(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens, Ast\Type\TypeNode $type, string $kind) : Ast\Type\ArrayShapeNode
    {
        $tokens->consumeTokenType(Lexer::TOKEN_OPEN_CURLY_BRACKET);
        $items = [];
        $sealed = \true;
        do {
            $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
            if ($tokens->tryConsumeTokenType(Lexer::TOKEN_CLOSE_CURLY_BRACKET)) {
                return new Ast\Type\ArrayShapeNode($items, \true, $kind);
            }
            if ($tokens->tryConsumeTokenType(Lexer::TOKEN_VARIADIC)) {
                $sealed = \false;
                $tokens->tryConsumeTokenType(Lexer::TOKEN_COMMA);
                break;
            }
            $items[] = $this->parseArrayShapeItem($tokens);
            $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
        } while ($tokens->tryConsumeTokenType(Lexer::TOKEN_COMMA));
        $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
        $tokens->consumeTokenType(Lexer::TOKEN_CLOSE_CURLY_BRACKET);
        return new Ast\Type\ArrayShapeNode($items, $sealed, $kind);
    }
    /** @phpstan-impure */
    private function parseArrayShapeItem(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\Type\ArrayShapeItemNode
    {
        $startLine = $tokens->currentTokenLine();
        $startIndex = $tokens->currentTokenIndex();
        try {
            $tokens->pushSavePoint();
            $key = $this->parseArrayShapeKey($tokens);
            $optional = $tokens->tryConsumeTokenType(Lexer::TOKEN_NULLABLE);
            $tokens->consumeTokenType(Lexer::TOKEN_COLON);
            $value = $this->parse($tokens);
            $tokens->dropSavePoint();
            return $this->enrichWithAttributes($tokens, new Ast\Type\ArrayShapeItemNode($key, $optional, $value), $startLine, $startIndex);
        } catch (\PHPStan\PhpDocParser\Parser\ParserException $e) {
            $tokens->rollback();
            $value = $this->parse($tokens);
            return $this->enrichWithAttributes($tokens, new Ast\Type\ArrayShapeItemNode(null, \false, $value), $startLine, $startIndex);
        }
    }
    /**
     * @phpstan-impure
     * @return Ast\ConstExpr\ConstExprIntegerNode|Ast\ConstExpr\ConstExprStringNode|Ast\Type\IdentifierTypeNode
     */
    private function parseArrayShapeKey(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens)
    {
        $startIndex = $tokens->currentTokenIndex();
        $startLine = $tokens->currentTokenLine();
        if ($tokens->isCurrentTokenType(Lexer::TOKEN_INTEGER)) {
            $key = new Ast\ConstExpr\ConstExprIntegerNode(str_replace('_', '', $tokens->currentTokenValue()));
            $tokens->next();
        } elseif ($tokens->isCurrentTokenType(Lexer::TOKEN_SINGLE_QUOTED_STRING)) {
            if ($this->quoteAwareConstExprString) {
                $key = new Ast\ConstExpr\QuoteAwareConstExprStringNode(\PHPStan\PhpDocParser\Parser\StringUnescaper::unescapeString($tokens->currentTokenValue()), Ast\ConstExpr\QuoteAwareConstExprStringNode::SINGLE_QUOTED);
            } else {
                $key = new Ast\ConstExpr\ConstExprStringNode(trim($tokens->currentTokenValue(), "'"));
            }
            $tokens->next();
        } elseif ($tokens->isCurrentTokenType(Lexer::TOKEN_DOUBLE_QUOTED_STRING)) {
            if ($this->quoteAwareConstExprString) {
                $key = new Ast\ConstExpr\QuoteAwareConstExprStringNode(\PHPStan\PhpDocParser\Parser\StringUnescaper::unescapeString($tokens->currentTokenValue()), Ast\ConstExpr\QuoteAwareConstExprStringNode::DOUBLE_QUOTED);
            } else {
                $key = new Ast\ConstExpr\ConstExprStringNode(trim($tokens->currentTokenValue(), '"'));
            }
            $tokens->next();
        } else {
            $key = new Ast\Type\IdentifierTypeNode($tokens->currentTokenValue());
            $tokens->consumeTokenType(Lexer::TOKEN_IDENTIFIER);
        }
        return $this->enrichWithAttributes($tokens, $key, $startLine, $startIndex);
    }
    /**
     * @phpstan-impure
     */
    private function parseObjectShape(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\Type\ObjectShapeNode
    {
        $tokens->consumeTokenType(Lexer::TOKEN_OPEN_CURLY_BRACKET);
        $items = [];
        do {
            $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
            if ($tokens->tryConsumeTokenType(Lexer::TOKEN_CLOSE_CURLY_BRACKET)) {
                return new Ast\Type\ObjectShapeNode($items);
            }
            $items[] = $this->parseObjectShapeItem($tokens);
            $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
        } while ($tokens->tryConsumeTokenType(Lexer::TOKEN_COMMA));
        $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
        $tokens->consumeTokenType(Lexer::TOKEN_CLOSE_CURLY_BRACKET);
        return new Ast\Type\ObjectShapeNode($items);
    }
    /** @phpstan-impure */
    private function parseObjectShapeItem(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\Type\ObjectShapeItemNode
    {
        $startLine = $tokens->currentTokenLine();
        $startIndex = $tokens->currentTokenIndex();
        $key = $this->parseObjectShapeKey($tokens);
        $optional = $tokens->tryConsumeTokenType(Lexer::TOKEN_NULLABLE);
        $tokens->consumeTokenType(Lexer::TOKEN_COLON);
        $value = $this->parse($tokens);
        return $this->enrichWithAttributes($tokens, new Ast\Type\ObjectShapeItemNode($key, $optional, $value), $startLine, $startIndex);
    }
    /**
     * @phpstan-impure
     * @return Ast\ConstExpr\ConstExprStringNode|Ast\Type\IdentifierTypeNode
     */
    private function parseObjectShapeKey(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens)
    {
        $startLine = $tokens->currentTokenLine();
        $startIndex = $tokens->currentTokenIndex();
        if ($tokens->isCurrentTokenType(Lexer::TOKEN_SINGLE_QUOTED_STRING)) {
            if ($this->quoteAwareConstExprString) {
                $key = new Ast\ConstExpr\QuoteAwareConstExprStringNode(\PHPStan\PhpDocParser\Parser\StringUnescaper::unescapeString($tokens->currentTokenValue()), Ast\ConstExpr\QuoteAwareConstExprStringNode::SINGLE_QUOTED);
            } else {
                $key = new Ast\ConstExpr\ConstExprStringNode(trim($tokens->currentTokenValue(), "'"));
            }
            $tokens->next();
        } elseif ($tokens->isCurrentTokenType(Lexer::TOKEN_DOUBLE_QUOTED_STRING)) {
            if ($this->quoteAwareConstExprString) {
                $key = new Ast\ConstExpr\QuoteAwareConstExprStringNode(\PHPStan\PhpDocParser\Parser\StringUnescaper::unescapeString($tokens->currentTokenValue()), Ast\ConstExpr\QuoteAwareConstExprStringNode::DOUBLE_QUOTED);
            } else {
                $key = new Ast\ConstExpr\ConstExprStringNode(trim($tokens->currentTokenValue(), '"'));
            }
            $tokens->next();
        } else {
            $key = new Ast\Type\IdentifierTypeNode($tokens->currentTokenValue());
            $tokens->consumeTokenType(Lexer::TOKEN_IDENTIFIER);
        }
        return $this->enrichWithAttributes($tokens, $key, $startLine, $startIndex);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Parser;

use LogicException;
use PHPStan\PhpDocParser\Lexer\Lexer;
use function array_pop;
use function assert;
use function count;
use function in_array;
use function strlen;
class TokenIterator
{
    /** @var list<array{string, int, int}> */
    private $tokens;
    /** @var int */
    private $index;
    /** @var int[] */
    private $savePoints = [];
    /** @var list<int> */
    private $skippedTokenTypes = [Lexer::TOKEN_HORIZONTAL_WS];
    /**
     * @param list<array{string, int, int}> $tokens
     */
    public function __construct(array $tokens, int $index = 0)
    {
        $this->tokens = $tokens;
        $this->index = $index;
        $this->skipIrrelevantTokens();
    }
    /**
     * @return list<array{string, int, int}>
     */
    public function getTokens() : array
    {
        return $this->tokens;
    }
    public function getContentBetween(int $startPos, int $endPos) : string
    {
        if ($startPos < 0 || $endPos > count($this->tokens)) {
            throw new LogicException();
        }
        $content = '';
        for ($i = $startPos; $i < $endPos; $i++) {
            $content .= $this->tokens[$i][Lexer::VALUE_OFFSET];
        }
        return $content;
    }
    public function getTokenCount() : int
    {
        return count($this->tokens);
    }
    public function currentTokenValue() : string
    {
        return $this->tokens[$this->index][Lexer::VALUE_OFFSET];
    }
    public function currentTokenType() : int
    {
        return $this->tokens[$this->index][Lexer::TYPE_OFFSET];
    }
    public function currentTokenOffset() : int
    {
        $offset = 0;
        for ($i = 0; $i < $this->index; $i++) {
            $offset += strlen($this->tokens[$i][Lexer::VALUE_OFFSET]);
        }
        return $offset;
    }
    public function currentTokenLine() : int
    {
        return $this->tokens[$this->index][Lexer::LINE_OFFSET];
    }
    public function currentTokenIndex() : int
    {
        return $this->index;
    }
    public function endIndexOfLastRelevantToken() : int
    {
        $endIndex = $this->currentTokenIndex();
        $endIndex--;
        while (in_array($this->tokens[$endIndex][Lexer::TYPE_OFFSET], $this->skippedTokenTypes, \true)) {
            if (!isset($this->tokens[$endIndex - 1])) {
                break;
            }
            $endIndex--;
        }
        return $endIndex;
    }
    public function isCurrentTokenValue(string $tokenValue) : bool
    {
        return $this->tokens[$this->index][Lexer::VALUE_OFFSET] === $tokenValue;
    }
    public function isCurrentTokenType(int ...$tokenType) : bool
    {
        return in_array($this->tokens[$this->index][Lexer::TYPE_OFFSET], $tokenType, \true);
    }
    public function isPrecededByHorizontalWhitespace() : bool
    {
        return ($this->tokens[$this->index - 1][Lexer::TYPE_OFFSET] ?? -1) === Lexer::TOKEN_HORIZONTAL_WS;
    }
    /**
     * @throws ParserException
     */
    public function consumeTokenType(int $tokenType) : void
    {
        if ($this->tokens[$this->index][Lexer::TYPE_OFFSET] !== $tokenType) {
            $this->throwError($tokenType);
        }
        $this->index++;
        $this->skipIrrelevantTokens();
    }
    /**
     * @throws ParserException
     */
    public function consumeTokenValue(int $tokenType, string $tokenValue) : void
    {
        if ($this->tokens[$this->index][Lexer::TYPE_OFFSET] !== $tokenType || $this->tokens[$this->index][Lexer::VALUE_OFFSET] !== $tokenValue) {
            $this->throwError($tokenType, $tokenValue);
        }
        $this->index++;
        $this->skipIrrelevantTokens();
    }
    /** @phpstan-impure */
    public function tryConsumeTokenValue(string $tokenValue) : bool
    {
        if ($this->tokens[$this->index][Lexer::VALUE_OFFSET] !== $tokenValue) {
            return \false;
        }
        $this->index++;
        $this->skipIrrelevantTokens();
        return \true;
    }
    /** @phpstan-impure */
    public function tryConsumeTokenType(int $tokenType) : bool
    {
        if ($this->tokens[$this->index][Lexer::TYPE_OFFSET] !== $tokenType) {
            return \false;
        }
        $this->index++;
        $this->skipIrrelevantTokens();
        return \true;
    }
    public function getSkippedHorizontalWhiteSpaceIfAny() : string
    {
        if ($this->index > 0 && $this->tokens[$this->index - 1][Lexer::TYPE_OFFSET] === Lexer::TOKEN_HORIZONTAL_WS) {
            return $this->tokens[$this->index - 1][Lexer::VALUE_OFFSET];
        }
        return '';
    }
    /** @phpstan-impure */
    public function joinUntil(int ...$tokenType) : string
    {
        $s = '';
        while (!in_array($this->tokens[$this->index][Lexer::TYPE_OFFSET], $tokenType, \true)) {
            $s .= $this->tokens[$this->index++][Lexer::VALUE_OFFSET];
        }
        return $s;
    }
    public function next() : void
    {
        $this->index++;
        $this->skipIrrelevantTokens();
    }
    private function skipIrrelevantTokens() : void
    {
        if (!isset($this->tokens[$this->index])) {
            return;
        }
        while (in_array($this->tokens[$this->index][Lexer::TYPE_OFFSET], $this->skippedTokenTypes, \true)) {
            if (!isset($this->tokens[$this->index + 1])) {
                break;
            }
            $this->index++;
        }
    }
    public function addEndOfLineToSkippedTokens() : void
    {
        $this->skippedTokenTypes = [Lexer::TOKEN_HORIZONTAL_WS, Lexer::TOKEN_PHPDOC_EOL];
    }
    public function removeEndOfLineFromSkippedTokens() : void
    {
        $this->skippedTokenTypes = [Lexer::TOKEN_HORIZONTAL_WS];
    }
    /** @phpstan-impure */
    public function forwardToTheEnd() : void
    {
        $lastToken = count($this->tokens) - 1;
        $this->index = $lastToken;
    }
    public function pushSavePoint() : void
    {
        $this->savePoints[] = $this->index;
    }
    public function dropSavePoint() : void
    {
        array_pop($this->savePoints);
    }
    public function rollback() : void
    {
        $index = array_pop($this->savePoints);
        assert($index !== null);
        $this->index = $index;
    }
    /**
     * @throws ParserException
     */
    private function throwError(int $expectedTokenType, ?string $expectedTokenValue = null) : void
    {
        throw new \PHPStan\PhpDocParser\Parser\ParserException($this->currentTokenValue(), $this->currentTokenType(), $this->currentTokenOffset(), $expectedTokenType, $expectedTokenValue, $this->currentTokenLine());
    }
    /**
     * Check whether the position is directly preceded by a certain token type.
     *
     * During this check TOKEN_HORIZONTAL_WS and TOKEN_PHPDOC_EOL are skipped
     */
    public function hasTokenImmediatelyBefore(int $pos, int $expectedTokenType) : bool
    {
        $tokens = $this->tokens;
        $pos--;
        for (; $pos >= 0; $pos--) {
            $token = $tokens[$pos];
            $type = $token[Lexer::TYPE_OFFSET];
            if ($type === $expectedTokenType) {
                return \true;
            }
            if (!in_array($type, [Lexer::TOKEN_HORIZONTAL_WS, Lexer::TOKEN_PHPDOC_EOL], \true)) {
                break;
            }
        }
        return \false;
    }
    /**
     * Check whether the position is directly followed by a certain token type.
     *
     * During this check TOKEN_HORIZONTAL_WS and TOKEN_PHPDOC_EOL are skipped
     */
    public function hasTokenImmediatelyAfter(int $pos, int $expectedTokenType) : bool
    {
        $tokens = $this->tokens;
        $pos++;
        for ($c = count($tokens); $pos < $c; $pos++) {
            $token = $tokens[$pos];
            $type = $token[Lexer::TYPE_OFFSET];
            if ($type === $expectedTokenType) {
                return \true;
            }
            if (!in_array($type, [Lexer::TOKEN_HORIZONTAL_WS, Lexer::TOKEN_PHPDOC_EOL], \true)) {
                break;
            }
        }
        return \false;
    }
    /**
     * Whether the given position is immediately surrounded by parenthesis.
     */
    public function hasParentheses(int $startPos, int $endPos) : bool
    {
        return $this->hasTokenImmediatelyBefore($startPos, Lexer::TOKEN_OPEN_PARENTHESES) && $this->hasTokenImmediatelyAfter($endPos, Lexer::TOKEN_CLOSE_PARENTHESES);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Parser;

use LogicException;
use PHPStan\PhpDocParser\Ast;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprIntegerNode;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprStringNode;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstFetchNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\Doctrine;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Lexer\Lexer;
use PHPStan\ShouldNotHappenException;
use function array_key_exists;
use function array_values;
use function count;
use function str_replace;
use function trim;
/**
 * @phpstan-import-type ValueType from Doctrine\DoctrineArgument as DoctrineValueType
 */
class PhpDocParser
{
    private const DISALLOWED_DESCRIPTION_START_TOKENS = [Lexer::TOKEN_UNION, Lexer::TOKEN_INTERSECTION];
    /** @var TypeParser */
    private $typeParser;
    /** @var ConstExprParser */
    private $constantExprParser;
    /** @var bool */
    private $requireWhitespaceBeforeDescription;
    /** @var bool */
    private $preserveTypeAliasesWithInvalidTypes;
    /** @var bool */
    private $parseDoctrineAnnotations;
    /** @var bool */
    private $useLinesAttributes;
    /** @var bool */
    private $useIndexAttributes;
    /**
     * @param array{lines?: bool, indexes?: bool} $usedAttributes
     */
    public function __construct(\PHPStan\PhpDocParser\Parser\TypeParser $typeParser, \PHPStan\PhpDocParser\Parser\ConstExprParser $constantExprParser, bool $requireWhitespaceBeforeDescription = \false, bool $preserveTypeAliasesWithInvalidTypes = \false, array $usedAttributes = [], bool $parseDoctrineAnnotations = \false)
    {
        $this->typeParser = $typeParser;
        $this->constantExprParser = $constantExprParser;
        $this->requireWhitespaceBeforeDescription = $requireWhitespaceBeforeDescription;
        $this->preserveTypeAliasesWithInvalidTypes = $preserveTypeAliasesWithInvalidTypes;
        $this->parseDoctrineAnnotations = $parseDoctrineAnnotations;
        $this->useLinesAttributes = $usedAttributes['lines'] ?? \false;
        $this->useIndexAttributes = $usedAttributes['indexes'] ?? \false;
    }
    public function parse(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\PhpDoc\PhpDocNode
    {
        $tokens->consumeTokenType(Lexer::TOKEN_OPEN_PHPDOC);
        $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
        $children = [];
        if ($this->parseDoctrineAnnotations) {
            if (!$tokens->isCurrentTokenType(Lexer::TOKEN_CLOSE_PHPDOC)) {
                $lastChild = $this->parseChild($tokens);
                $children[] = $lastChild;
                while (!$tokens->isCurrentTokenType(Lexer::TOKEN_CLOSE_PHPDOC)) {
                    if ($lastChild instanceof Ast\PhpDoc\PhpDocTagNode && ($lastChild->value instanceof Doctrine\DoctrineTagValueNode || $lastChild->value instanceof Ast\PhpDoc\GenericTagValueNode)) {
                        $tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
                        if ($tokens->isCurrentTokenType(Lexer::TOKEN_CLOSE_PHPDOC)) {
                            break;
                        }
                        $lastChild = $this->parseChild($tokens);
                        $children[] = $lastChild;
                        continue;
                    }
                    if (!$tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL)) {
                        break;
                    }
                    if ($tokens->isCurrentTokenType(Lexer::TOKEN_CLOSE_PHPDOC)) {
                        break;
                    }
                    $lastChild = $this->parseChild($tokens);
                    $children[] = $lastChild;
                }
            }
        } else {
            if (!$tokens->isCurrentTokenType(Lexer::TOKEN_CLOSE_PHPDOC)) {
                $children[] = $this->parseChild($tokens);
                while ($tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL) && !$tokens->isCurrentTokenType(Lexer::TOKEN_CLOSE_PHPDOC)) {
                    $children[] = $this->parseChild($tokens);
                }
            }
        }
        try {
            $tokens->consumeTokenType(Lexer::TOKEN_CLOSE_PHPDOC);
        } catch (\PHPStan\PhpDocParser\Parser\ParserException $e) {
            $name = '';
            $startLine = $tokens->currentTokenLine();
            $startIndex = $tokens->currentTokenIndex();
            if (count($children) > 0) {
                $lastChild = $children[count($children) - 1];
                if ($lastChild instanceof Ast\PhpDoc\PhpDocTagNode) {
                    $name = $lastChild->name;
                    $startLine = $tokens->currentTokenLine();
                    $startIndex = $tokens->currentTokenIndex();
                }
            }
            $tag = new Ast\PhpDoc\PhpDocTagNode($name, $this->enrichWithAttributes($tokens, new Ast\PhpDoc\InvalidTagValueNode($e->getMessage(), $e), $startLine, $startIndex));
            $tokens->forwardToTheEnd();
            return $this->enrichWithAttributes($tokens, new Ast\PhpDoc\PhpDocNode([$this->enrichWithAttributes($tokens, $tag, $startLine, $startIndex)]), 1, 0);
        }
        return $this->enrichWithAttributes($tokens, new Ast\PhpDoc\PhpDocNode(array_values($children)), 1, 0);
    }
    /** @phpstan-impure */
    private function parseChild(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\PhpDoc\PhpDocChildNode
    {
        if ($tokens->isCurrentTokenType(Lexer::TOKEN_PHPDOC_TAG)) {
            $startLine = $tokens->currentTokenLine();
            $startIndex = $tokens->currentTokenIndex();
            return $this->enrichWithAttributes($tokens, $this->parseTag($tokens), $startLine, $startIndex);
        }
        if ($tokens->isCurrentTokenType(Lexer::TOKEN_DOCTRINE_TAG)) {
            $startLine = $tokens->currentTokenLine();
            $startIndex = $tokens->currentTokenIndex();
            $tag = $tokens->currentTokenValue();
            $tokens->next();
            $tagStartLine = $tokens->currentTokenLine();
            $tagStartIndex = $tokens->currentTokenIndex();
            return $this->enrichWithAttributes($tokens, new Ast\PhpDoc\PhpDocTagNode($tag, $this->enrichWithAttributes($tokens, $this->parseDoctrineTagValue($tokens, $tag), $tagStartLine, $tagStartIndex)), $startLine, $startIndex);
        }
        $startLine = $tokens->currentTokenLine();
        $startIndex = $tokens->currentTokenIndex();
        $text = $this->parseText($tokens);
        return $this->enrichWithAttributes($tokens, $text, $startLine, $startIndex);
    }
    /**
     * @template T of Ast\Node
     * @param T $tag
     * @return T
     */
    private function enrichWithAttributes(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens, Ast\Node $tag, int $startLine, int $startIndex) : Ast\Node
    {
        if ($this->useLinesAttributes) {
            $tag->setAttribute(Ast\Attribute::START_LINE, $startLine);
            $tag->setAttribute(Ast\Attribute::END_LINE, $tokens->currentTokenLine());
        }
        if ($this->useIndexAttributes) {
            $tag->setAttribute(Ast\Attribute::START_INDEX, $startIndex);
            $tag->setAttribute(Ast\Attribute::END_INDEX, $tokens->endIndexOfLastRelevantToken());
        }
        return $tag;
    }
    private function parseText(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\PhpDoc\PhpDocTextNode
    {
        $text = '';
        while (!$tokens->isCurrentTokenType(Lexer::TOKEN_PHPDOC_EOL)) {
            $text .= $tokens->getSkippedHorizontalWhiteSpaceIfAny() . $tokens->joinUntil(Lexer::TOKEN_PHPDOC_EOL, Lexer::TOKEN_CLOSE_PHPDOC, Lexer::TOKEN_END);
            if (!$tokens->isCurrentTokenType(Lexer::TOKEN_PHPDOC_EOL)) {
                break;
            }
            $tokens->pushSavePoint();
            $tokens->next();
            if ($tokens->isCurrentTokenType(Lexer::TOKEN_PHPDOC_TAG, Lexer::TOKEN_DOCTRINE_TAG, Lexer::TOKEN_PHPDOC_EOL, Lexer::TOKEN_CLOSE_PHPDOC, Lexer::TOKEN_END)) {
                $tokens->rollback();
                break;
            }
            $tokens->dropSavePoint();
            $text .= "\n";
        }
        return new Ast\PhpDoc\PhpDocTextNode(trim($text, " \t"));
    }
    private function parseOptionalDescriptionAfterDoctrineTag(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : string
    {
        $text = '';
        while (!$tokens->isCurrentTokenType(Lexer::TOKEN_PHPDOC_EOL)) {
            $text .= $tokens->getSkippedHorizontalWhiteSpaceIfAny() . $tokens->joinUntil(Lexer::TOKEN_PHPDOC_TAG, Lexer::TOKEN_DOCTRINE_TAG, Lexer::TOKEN_PHPDOC_EOL, Lexer::TOKEN_CLOSE_PHPDOC, Lexer::TOKEN_END);
            if (!$tokens->isCurrentTokenType(Lexer::TOKEN_PHPDOC_EOL)) {
                if (!$tokens->isPrecededByHorizontalWhitespace()) {
                    return trim($text . $this->parseText($tokens)->text, " \t");
                }
                if ($tokens->isCurrentTokenType(Lexer::TOKEN_PHPDOC_TAG)) {
                    $tokens->pushSavePoint();
                    $child = $this->parseChild($tokens);
                    if ($child instanceof Ast\PhpDoc\PhpDocTagNode) {
                        if ($child->value instanceof Ast\PhpDoc\GenericTagValueNode || $child->value instanceof Doctrine\DoctrineTagValueNode) {
                            $tokens->rollback();
                            break;
                        }
                        if ($child->value instanceof Ast\PhpDoc\InvalidTagValueNode) {
                            $tokens->rollback();
                            $tokens->pushSavePoint();
                            $tokens->next();
                            if ($tokens->isCurrentTokenType(Lexer::TOKEN_OPEN_PARENTHESES)) {
                                $tokens->rollback();
                                break;
                            }
                            $tokens->rollback();
                            return trim($text . $this->parseText($tokens)->text, " \t");
                        }
                    }
                    $tokens->rollback();
                    return trim($text . $this->parseText($tokens)->text, " \t");
                }
                break;
            }
            $tokens->pushSavePoint();
            $tokens->next();
            if ($tokens->isCurrentTokenType(Lexer::TOKEN_PHPDOC_TAG, Lexer::TOKEN_DOCTRINE_TAG, Lexer::TOKEN_PHPDOC_EOL, Lexer::TOKEN_CLOSE_PHPDOC, Lexer::TOKEN_END)) {
                $tokens->rollback();
                break;
            }
            $tokens->dropSavePoint();
            $text .= "\n";
        }
        return trim($text, " \t");
    }
    public function parseTag(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\PhpDoc\PhpDocTagNode
    {
        $tag = $tokens->currentTokenValue();
        $tokens->next();
        $value = $this->parseTagValue($tokens, $tag);
        return new Ast\PhpDoc\PhpDocTagNode($tag, $value);
    }
    public function parseTagValue(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens, string $tag) : Ast\PhpDoc\PhpDocTagValueNode
    {
        $startLine = $tokens->currentTokenLine();
        $startIndex = $tokens->currentTokenIndex();
        try {
            $tokens->pushSavePoint();
            switch ($tag) {
                case '@param':
                case '@phpstan-param':
                case '@psalm-param':
                    $tagValue = $this->parseParamTagValue($tokens);
                    break;
                case '@var':
                case '@phpstan-var':
                case '@psalm-var':
                    $tagValue = $this->parseVarTagValue($tokens);
                    break;
                case '@return':
                case '@phpstan-return':
                case '@psalm-return':
                    $tagValue = $this->parseReturnTagValue($tokens);
                    break;
                case '@throws':
                case '@phpstan-throws':
                    $tagValue = $this->parseThrowsTagValue($tokens);
                    break;
                case '@mixin':
                    $tagValue = $this->parseMixinTagValue($tokens);
                    break;
                case '@deprecated':
                    $tagValue = $this->parseDeprecatedTagValue($tokens);
                    break;
                case '@property':
                case '@property-read':
                case '@property-write':
                case '@phpstan-property':
                case '@phpstan-property-read':
                case '@phpstan-property-write':
                case '@psalm-property':
                case '@psalm-property-read':
                case '@psalm-property-write':
                    $tagValue = $this->parsePropertyTagValue($tokens);
                    break;
                case '@method':
                case '@phpstan-method':
                case '@psalm-method':
                    $tagValue = $this->parseMethodTagValue($tokens);
                    break;
                case '@template':
                case '@phpstan-template':
                case '@psalm-template':
                case '@template-covariant':
                case '@phpstan-template-covariant':
                case '@psalm-template-covariant':
                case '@template-contravariant':
                case '@phpstan-template-contravariant':
                case '@psalm-template-contravariant':
                    $tagValue = $this->parseTemplateTagValue($tokens, \true);
                    break;
                case '@extends':
                case '@phpstan-extends':
                case '@template-extends':
                    $tagValue = $this->parseExtendsTagValue('@extends', $tokens);
                    break;
                case '@implements':
                case '@phpstan-implements':
                case '@template-implements':
                    $tagValue = $this->parseExtendsTagValue('@implements', $tokens);
                    break;
                case '@use':
                case '@phpstan-use':
                case '@template-use':
                    $tagValue = $this->parseExtendsTagValue('@use', $tokens);
                    break;
                case '@phpstan-type':
                case '@psalm-type':
                    $tagValue = $this->parseTypeAliasTagValue($tokens);
                    break;
                case '@phpstan-import-type':
                case '@psalm-import-type':
                    $tagValue = $this->parseTypeAliasImportTagValue($tokens);
                    break;
                case '@phpstan-assert':
                case '@phpstan-assert-if-true':
                case '@phpstan-assert-if-false':
                case '@psalm-assert':
                case '@psalm-assert-if-true':
                case '@psalm-assert-if-false':
                    $tagValue = $this->parseAssertTagValue($tokens);
                    break;
                case '@phpstan-this-out':
                case '@phpstan-self-out':
                case '@psalm-this-out':
                case '@psalm-self-out':
                    $tagValue = $this->parseSelfOutTagValue($tokens);
                    break;
                case '@param-out':
                case '@phpstan-param-out':
                case '@psalm-param-out':
                    $tagValue = $this->parseParamOutTagValue($tokens);
                    break;
                default:
                    if ($this->parseDoctrineAnnotations) {
                        if ($tokens->isCurrentTokenType(Lexer::TOKEN_OPEN_PARENTHESES)) {
                            $tagValue = $this->parseDoctrineTagValue($tokens, $tag);
                        } else {
                            $tagValue = new Ast\PhpDoc\GenericTagValueNode($this->parseOptionalDescriptionAfterDoctrineTag($tokens));
                        }
                        break;
                    }
                    $tagValue = new Ast\PhpDoc\GenericTagValueNode($this->parseOptionalDescription($tokens));
                    break;
            }
            $tokens->dropSavePoint();
        } catch (\PHPStan\PhpDocParser\Parser\ParserException $e) {
            $tokens->rollback();
            $tagValue = new Ast\PhpDoc\InvalidTagValueNode($this->parseOptionalDescription($tokens), $e);
        }
        return $this->enrichWithAttributes($tokens, $tagValue, $startLine, $startIndex);
    }
    private function parseDoctrineTagValue(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens, string $tag) : Ast\PhpDoc\PhpDocTagValueNode
    {
        $startLine = $tokens->currentTokenLine();
        $startIndex = $tokens->currentTokenIndex();
        return new Doctrine\DoctrineTagValueNode($this->enrichWithAttributes($tokens, new Doctrine\DoctrineAnnotation($tag, $this->parseDoctrineArguments($tokens, \false)), $startLine, $startIndex), $this->parseOptionalDescriptionAfterDoctrineTag($tokens));
    }
    /**
     * @return list<Doctrine\DoctrineArgument>
     */
    private function parseDoctrineArguments(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens, bool $deep) : array
    {
        if (!$tokens->isCurrentTokenType(Lexer::TOKEN_OPEN_PARENTHESES)) {
            return [];
        }
        if (!$deep) {
            $tokens->addEndOfLineToSkippedTokens();
        }
        $arguments = [];
        try {
            $tokens->consumeTokenType(Lexer::TOKEN_OPEN_PARENTHESES);
            do {
                if ($tokens->isCurrentTokenType(Lexer::TOKEN_CLOSE_PARENTHESES)) {
                    break;
                }
                $arguments[] = $this->parseDoctrineArgument($tokens);
            } while ($tokens->tryConsumeTokenType(Lexer::TOKEN_COMMA));
        } finally {
            if (!$deep) {
                $tokens->removeEndOfLineFromSkippedTokens();
            }
        }
        $tokens->consumeTokenType(Lexer::TOKEN_CLOSE_PARENTHESES);
        return $arguments;
    }
    private function parseDoctrineArgument(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Doctrine\DoctrineArgument
    {
        if (!$tokens->isCurrentTokenType(Lexer::TOKEN_IDENTIFIER)) {
            $startLine = $tokens->currentTokenLine();
            $startIndex = $tokens->currentTokenIndex();
            return $this->enrichWithAttributes($tokens, new Doctrine\DoctrineArgument(null, $this->parseDoctrineArgumentValue($tokens)), $startLine, $startIndex);
        }
        $startLine = $tokens->currentTokenLine();
        $startIndex = $tokens->currentTokenIndex();
        try {
            $tokens->pushSavePoint();
            $currentValue = $tokens->currentTokenValue();
            $tokens->consumeTokenType(Lexer::TOKEN_IDENTIFIER);
            $key = $this->enrichWithAttributes($tokens, new IdentifierTypeNode($currentValue), $startLine, $startIndex);
            $tokens->consumeTokenType(Lexer::TOKEN_EQUAL);
            $value = $this->parseDoctrineArgumentValue($tokens);
            $tokens->dropSavePoint();
            return $this->enrichWithAttributes($tokens, new Doctrine\DoctrineArgument($key, $value), $startLine, $startIndex);
        } catch (\PHPStan\PhpDocParser\Parser\ParserException $e) {
            $tokens->rollback();
            return $this->enrichWithAttributes($tokens, new Doctrine\DoctrineArgument(null, $this->parseDoctrineArgumentValue($tokens)), $startLine, $startIndex);
        }
    }
    /**
     * @return DoctrineValueType
     */
    private function parseDoctrineArgumentValue(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens)
    {
        $startLine = $tokens->currentTokenLine();
        $startIndex = $tokens->currentTokenIndex();
        if ($tokens->isCurrentTokenType(Lexer::TOKEN_PHPDOC_TAG, Lexer::TOKEN_DOCTRINE_TAG)) {
            $name = $tokens->currentTokenValue();
            $tokens->next();
            return $this->enrichWithAttributes($tokens, new Doctrine\DoctrineAnnotation($name, $this->parseDoctrineArguments($tokens, \true)), $startLine, $startIndex);
        }
        if ($tokens->tryConsumeTokenType(Lexer::TOKEN_OPEN_CURLY_BRACKET)) {
            $items = [];
            do {
                if ($tokens->isCurrentTokenType(Lexer::TOKEN_CLOSE_CURLY_BRACKET)) {
                    break;
                }
                $items[] = $this->parseDoctrineArrayItem($tokens);
            } while ($tokens->tryConsumeTokenType(Lexer::TOKEN_COMMA));
            $tokens->consumeTokenType(Lexer::TOKEN_CLOSE_CURLY_BRACKET);
            return $this->enrichWithAttributes($tokens, new Doctrine\DoctrineArray($items), $startLine, $startIndex);
        }
        $currentTokenValue = $tokens->currentTokenValue();
        $tokens->pushSavePoint();
        // because of ConstFetchNode
        if ($tokens->tryConsumeTokenType(Lexer::TOKEN_IDENTIFIER)) {
            $identifier = $this->enrichWithAttributes($tokens, new Ast\Type\IdentifierTypeNode($currentTokenValue), $startLine, $startIndex);
            if (!$tokens->isCurrentTokenType(Lexer::TOKEN_DOUBLE_COLON)) {
                $tokens->dropSavePoint();
                return $identifier;
            }
            $tokens->rollback();
            // because of ConstFetchNode
        } else {
            $tokens->dropSavePoint();
            // because of ConstFetchNode
        }
        $exception = new \PHPStan\PhpDocParser\Parser\ParserException($tokens->currentTokenValue(), $tokens->currentTokenType(), $tokens->currentTokenOffset(), Lexer::TOKEN_IDENTIFIER, null, $tokens->currentTokenLine());
        try {
            $constExpr = $this->constantExprParser->parse($tokens, \true);
            if ($constExpr instanceof Ast\ConstExpr\ConstExprArrayNode) {
                throw $exception;
            }
            return $constExpr;
        } catch (LogicException $e) {
            throw $exception;
        }
    }
    private function parseDoctrineArrayItem(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Doctrine\DoctrineArrayItem
    {
        $startLine = $tokens->currentTokenLine();
        $startIndex = $tokens->currentTokenIndex();
        try {
            $tokens->pushSavePoint();
            $key = $this->parseDoctrineArrayKey($tokens);
            if (!$tokens->tryConsumeTokenType(Lexer::TOKEN_EQUAL)) {
                if (!$tokens->tryConsumeTokenType(Lexer::TOKEN_COLON)) {
                    $tokens->consumeTokenType(Lexer::TOKEN_EQUAL);
                    // will throw exception
                }
            }
            $value = $this->parseDoctrineArgumentValue($tokens);
            $tokens->dropSavePoint();
            return $this->enrichWithAttributes($tokens, new Doctrine\DoctrineArrayItem($key, $value), $startLine, $startIndex);
        } catch (\PHPStan\PhpDocParser\Parser\ParserException $e) {
            $tokens->rollback();
            return $this->enrichWithAttributes($tokens, new Doctrine\DoctrineArrayItem(null, $this->parseDoctrineArgumentValue($tokens)), $startLine, $startIndex);
        }
    }
    /**
     * @return ConstExprIntegerNode|ConstExprStringNode|IdentifierTypeNode|ConstFetchNode
     */
    private function parseDoctrineArrayKey(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens)
    {
        $startLine = $tokens->currentTokenLine();
        $startIndex = $tokens->currentTokenIndex();
        if ($tokens->isCurrentTokenType(Lexer::TOKEN_INTEGER)) {
            $key = new Ast\ConstExpr\ConstExprIntegerNode(str_replace('_', '', $tokens->currentTokenValue()));
            $tokens->next();
        } elseif ($tokens->isCurrentTokenType(Lexer::TOKEN_SINGLE_QUOTED_STRING)) {
            $key = new Ast\ConstExpr\QuoteAwareConstExprStringNode(\PHPStan\PhpDocParser\Parser\StringUnescaper::unescapeString($tokens->currentTokenValue()), Ast\ConstExpr\QuoteAwareConstExprStringNode::SINGLE_QUOTED);
            $tokens->next();
        } elseif ($tokens->isCurrentTokenType(Lexer::TOKEN_DOUBLE_QUOTED_STRING)) {
            $key = new Ast\ConstExpr\QuoteAwareConstExprStringNode(\PHPStan\PhpDocParser\Parser\StringUnescaper::unescapeString($tokens->currentTokenValue()), Ast\ConstExpr\QuoteAwareConstExprStringNode::DOUBLE_QUOTED);
            $tokens->next();
        } else {
            $currentTokenValue = $tokens->currentTokenValue();
            $tokens->pushSavePoint();
            // because of ConstFetchNode
            if (!$tokens->tryConsumeTokenType(Lexer::TOKEN_IDENTIFIER)) {
                $tokens->dropSavePoint();
                throw new \PHPStan\PhpDocParser\Parser\ParserException($tokens->currentTokenValue(), $tokens->currentTokenType(), $tokens->currentTokenOffset(), Lexer::TOKEN_IDENTIFIER, null, $tokens->currentTokenLine());
            }
            if (!$tokens->isCurrentTokenType(Lexer::TOKEN_DOUBLE_COLON)) {
                $tokens->dropSavePoint();
                return $this->enrichWithAttributes($tokens, new IdentifierTypeNode($currentTokenValue), $startLine, $startIndex);
            }
            $tokens->rollback();
            $constExpr = $this->constantExprParser->parse($tokens, \true);
            if (!$constExpr instanceof Ast\ConstExpr\ConstFetchNode) {
                throw new \PHPStan\PhpDocParser\Parser\ParserException($tokens->currentTokenValue(), $tokens->currentTokenType(), $tokens->currentTokenOffset(), Lexer::TOKEN_IDENTIFIER, null, $tokens->currentTokenLine());
            }
            return $constExpr;
        }
        return $this->enrichWithAttributes($tokens, $key, $startLine, $startIndex);
    }
    /**
     * @return Ast\PhpDoc\ParamTagValueNode|Ast\PhpDoc\TypelessParamTagValueNode
     */
    private function parseParamTagValue(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\PhpDoc\PhpDocTagValueNode
    {
        if ($tokens->isCurrentTokenType(Lexer::TOKEN_REFERENCE, Lexer::TOKEN_VARIADIC, Lexer::TOKEN_VARIABLE)) {
            $type = null;
        } else {
            $type = $this->typeParser->parse($tokens);
        }
        $isReference = $tokens->tryConsumeTokenType(Lexer::TOKEN_REFERENCE);
        $isVariadic = $tokens->tryConsumeTokenType(Lexer::TOKEN_VARIADIC);
        $parameterName = $this->parseRequiredVariableName($tokens);
        $description = $this->parseOptionalDescription($tokens);
        if ($type !== null) {
            return new Ast\PhpDoc\ParamTagValueNode($type, $isVariadic, $parameterName, $description, $isReference);
        }
        return new Ast\PhpDoc\TypelessParamTagValueNode($isVariadic, $parameterName, $description, $isReference);
    }
    private function parseVarTagValue(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\PhpDoc\VarTagValueNode
    {
        $type = $this->typeParser->parse($tokens);
        $variableName = $this->parseOptionalVariableName($tokens);
        $description = $this->parseOptionalDescription($tokens, $variableName === '');
        return new Ast\PhpDoc\VarTagValueNode($type, $variableName, $description);
    }
    private function parseReturnTagValue(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\PhpDoc\ReturnTagValueNode
    {
        $type = $this->typeParser->parse($tokens);
        $description = $this->parseOptionalDescription($tokens, \true);
        return new Ast\PhpDoc\ReturnTagValueNode($type, $description);
    }
    private function parseThrowsTagValue(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\PhpDoc\ThrowsTagValueNode
    {
        $type = $this->typeParser->parse($tokens);
        $description = $this->parseOptionalDescription($tokens, \true);
        return new Ast\PhpDoc\ThrowsTagValueNode($type, $description);
    }
    private function parseMixinTagValue(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\PhpDoc\MixinTagValueNode
    {
        $type = $this->typeParser->parse($tokens);
        $description = $this->parseOptionalDescription($tokens, \true);
        return new Ast\PhpDoc\MixinTagValueNode($type, $description);
    }
    private function parseDeprecatedTagValue(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\PhpDoc\DeprecatedTagValueNode
    {
        $description = $this->parseOptionalDescription($tokens);
        return new Ast\PhpDoc\DeprecatedTagValueNode($description);
    }
    private function parsePropertyTagValue(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\PhpDoc\PropertyTagValueNode
    {
        $type = $this->typeParser->parse($tokens);
        $parameterName = $this->parseRequiredVariableName($tokens);
        $description = $this->parseOptionalDescription($tokens);
        return new Ast\PhpDoc\PropertyTagValueNode($type, $parameterName, $description);
    }
    private function parseMethodTagValue(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\PhpDoc\MethodTagValueNode
    {
        $isStatic = $tokens->tryConsumeTokenValue('static');
        $startLine = $tokens->currentTokenLine();
        $startIndex = $tokens->currentTokenIndex();
        $returnTypeOrMethodName = $this->typeParser->parse($tokens);
        if ($tokens->isCurrentTokenType(Lexer::TOKEN_IDENTIFIER)) {
            $returnType = $returnTypeOrMethodName;
            $methodName = $tokens->currentTokenValue();
            $tokens->next();
        } elseif ($returnTypeOrMethodName instanceof Ast\Type\IdentifierTypeNode) {
            $returnType = $isStatic ? $this->typeParser->enrichWithAttributes($tokens, new Ast\Type\IdentifierTypeNode('static'), $startLine, $startIndex) : null;
            $methodName = $returnTypeOrMethodName->name;
            $isStatic = \false;
        } else {
            $tokens->consumeTokenType(Lexer::TOKEN_IDENTIFIER);
            // will throw exception
            exit;
        }
        $templateTypes = [];
        if ($tokens->tryConsumeTokenType(Lexer::TOKEN_OPEN_ANGLE_BRACKET)) {
            do {
                $startLine = $tokens->currentTokenLine();
                $startIndex = $tokens->currentTokenIndex();
                $templateTypes[] = $this->enrichWithAttributes($tokens, $this->parseTemplateTagValue($tokens, \false), $startLine, $startIndex);
            } while ($tokens->tryConsumeTokenType(Lexer::TOKEN_COMMA));
            $tokens->consumeTokenType(Lexer::TOKEN_CLOSE_ANGLE_BRACKET);
        }
        $parameters = [];
        $tokens->consumeTokenType(Lexer::TOKEN_OPEN_PARENTHESES);
        if (!$tokens->isCurrentTokenType(Lexer::TOKEN_CLOSE_PARENTHESES)) {
            $parameters[] = $this->parseMethodTagValueParameter($tokens);
            while ($tokens->tryConsumeTokenType(Lexer::TOKEN_COMMA)) {
                $parameters[] = $this->parseMethodTagValueParameter($tokens);
            }
        }
        $tokens->consumeTokenType(Lexer::TOKEN_CLOSE_PARENTHESES);
        $description = $this->parseOptionalDescription($tokens);
        return new Ast\PhpDoc\MethodTagValueNode($isStatic, $returnType, $methodName, $parameters, $description, $templateTypes);
    }
    private function parseMethodTagValueParameter(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\PhpDoc\MethodTagValueParameterNode
    {
        $startLine = $tokens->currentTokenLine();
        $startIndex = $tokens->currentTokenIndex();
        switch ($tokens->currentTokenType()) {
            case Lexer::TOKEN_IDENTIFIER:
            case Lexer::TOKEN_OPEN_PARENTHESES:
            case Lexer::TOKEN_NULLABLE:
                $parameterType = $this->typeParser->parse($tokens);
                break;
            default:
                $parameterType = null;
        }
        $isReference = $tokens->tryConsumeTokenType(Lexer::TOKEN_REFERENCE);
        $isVariadic = $tokens->tryConsumeTokenType(Lexer::TOKEN_VARIADIC);
        $parameterName = $tokens->currentTokenValue();
        $tokens->consumeTokenType(Lexer::TOKEN_VARIABLE);
        if ($tokens->tryConsumeTokenType(Lexer::TOKEN_EQUAL)) {
            $defaultValue = $this->constantExprParser->parse($tokens);
        } else {
            $defaultValue = null;
        }
        return $this->enrichWithAttributes($tokens, new Ast\PhpDoc\MethodTagValueParameterNode($parameterType, $isReference, $isVariadic, $parameterName, $defaultValue), $startLine, $startIndex);
    }
    private function parseTemplateTagValue(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens, bool $parseDescription) : Ast\PhpDoc\TemplateTagValueNode
    {
        $name = $tokens->currentTokenValue();
        $tokens->consumeTokenType(Lexer::TOKEN_IDENTIFIER);
        if ($tokens->tryConsumeTokenValue('of') || $tokens->tryConsumeTokenValue('as')) {
            $bound = $this->typeParser->parse($tokens);
        } else {
            $bound = null;
        }
        if ($tokens->tryConsumeTokenValue('=')) {
            $default = $this->typeParser->parse($tokens);
        } else {
            $default = null;
        }
        if ($parseDescription) {
            $description = $this->parseOptionalDescription($tokens);
        } else {
            $description = '';
        }
        return new Ast\PhpDoc\TemplateTagValueNode($name, $bound, $description, $default);
    }
    private function parseExtendsTagValue(string $tagName, \PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\PhpDoc\PhpDocTagValueNode
    {
        $startLine = $tokens->currentTokenLine();
        $startIndex = $tokens->currentTokenIndex();
        $baseType = new IdentifierTypeNode($tokens->currentTokenValue());
        $tokens->consumeTokenType(Lexer::TOKEN_IDENTIFIER);
        $type = $this->typeParser->parseGeneric($tokens, $this->typeParser->enrichWithAttributes($tokens, $baseType, $startLine, $startIndex));
        $description = $this->parseOptionalDescription($tokens);
        switch ($tagName) {
            case '@extends':
                return new Ast\PhpDoc\ExtendsTagValueNode($type, $description);
            case '@implements':
                return new Ast\PhpDoc\ImplementsTagValueNode($type, $description);
            case '@use':
                return new Ast\PhpDoc\UsesTagValueNode($type, $description);
        }
        throw new ShouldNotHappenException();
    }
    private function parseTypeAliasTagValue(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\PhpDoc\TypeAliasTagValueNode
    {
        $alias = $tokens->currentTokenValue();
        $tokens->consumeTokenType(Lexer::TOKEN_IDENTIFIER);
        // support psalm-type syntax
        $tokens->tryConsumeTokenType(Lexer::TOKEN_EQUAL);
        if ($this->preserveTypeAliasesWithInvalidTypes) {
            $startLine = $tokens->currentTokenLine();
            $startIndex = $tokens->currentTokenIndex();
            try {
                $type = $this->typeParser->parse($tokens);
                if (!$tokens->isCurrentTokenType(Lexer::TOKEN_CLOSE_PHPDOC)) {
                    if (!$tokens->isCurrentTokenType(Lexer::TOKEN_PHPDOC_EOL)) {
                        throw new \PHPStan\PhpDocParser\Parser\ParserException($tokens->currentTokenValue(), $tokens->currentTokenType(), $tokens->currentTokenOffset(), Lexer::TOKEN_PHPDOC_EOL, null, $tokens->currentTokenLine());
                    }
                }
                return new Ast\PhpDoc\TypeAliasTagValueNode($alias, $type);
            } catch (\PHPStan\PhpDocParser\Parser\ParserException $e) {
                $this->parseOptionalDescription($tokens);
                return new Ast\PhpDoc\TypeAliasTagValueNode($alias, $this->enrichWithAttributes($tokens, new Ast\Type\InvalidTypeNode($e), $startLine, $startIndex));
            }
        }
        $type = $this->typeParser->parse($tokens);
        return new Ast\PhpDoc\TypeAliasTagValueNode($alias, $type);
    }
    private function parseTypeAliasImportTagValue(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\PhpDoc\TypeAliasImportTagValueNode
    {
        $importedAlias = $tokens->currentTokenValue();
        $tokens->consumeTokenType(Lexer::TOKEN_IDENTIFIER);
        $tokens->consumeTokenValue(Lexer::TOKEN_IDENTIFIER, 'from');
        $identifierStartLine = $tokens->currentTokenLine();
        $identifierStartIndex = $tokens->currentTokenIndex();
        $importedFrom = $tokens->currentTokenValue();
        $tokens->consumeTokenType(Lexer::TOKEN_IDENTIFIER);
        $importedFromType = $this->enrichWithAttributes($tokens, new IdentifierTypeNode($importedFrom), $identifierStartLine, $identifierStartIndex);
        $importedAs = null;
        if ($tokens->tryConsumeTokenValue('as')) {
            $importedAs = $tokens->currentTokenValue();
            $tokens->consumeTokenType(Lexer::TOKEN_IDENTIFIER);
        }
        return new Ast\PhpDoc\TypeAliasImportTagValueNode($importedAlias, $importedFromType, $importedAs);
    }
    /**
     * @return Ast\PhpDoc\AssertTagValueNode|Ast\PhpDoc\AssertTagPropertyValueNode|Ast\PhpDoc\AssertTagMethodValueNode
     */
    private function parseAssertTagValue(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\PhpDoc\PhpDocTagValueNode
    {
        $isNegated = $tokens->tryConsumeTokenType(Lexer::TOKEN_NEGATED);
        $isEquality = $tokens->tryConsumeTokenType(Lexer::TOKEN_EQUAL);
        $type = $this->typeParser->parse($tokens);
        $parameter = $this->parseAssertParameter($tokens);
        $description = $this->parseOptionalDescription($tokens);
        if (array_key_exists('method', $parameter)) {
            return new Ast\PhpDoc\AssertTagMethodValueNode($type, $parameter['parameter'], $parameter['method'], $isNegated, $description, $isEquality);
        } elseif (array_key_exists('property', $parameter)) {
            return new Ast\PhpDoc\AssertTagPropertyValueNode($type, $parameter['parameter'], $parameter['property'], $isNegated, $description, $isEquality);
        }
        return new Ast\PhpDoc\AssertTagValueNode($type, $parameter['parameter'], $isNegated, $description, $isEquality);
    }
    /**
     * @return array{parameter: string}|array{parameter: string, property: string}|array{parameter: string, method: string}
     */
    private function parseAssertParameter(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : array
    {
        if ($tokens->isCurrentTokenType(Lexer::TOKEN_THIS_VARIABLE)) {
            $parameter = '$this';
            $requirePropertyOrMethod = \true;
            $tokens->next();
        } else {
            $parameter = $tokens->currentTokenValue();
            $requirePropertyOrMethod = \false;
            $tokens->consumeTokenType(Lexer::TOKEN_VARIABLE);
        }
        if ($requirePropertyOrMethod || $tokens->isCurrentTokenType(Lexer::TOKEN_ARROW)) {
            $tokens->consumeTokenType(Lexer::TOKEN_ARROW);
            $propertyOrMethod = $tokens->currentTokenValue();
            $tokens->consumeTokenType(Lexer::TOKEN_IDENTIFIER);
            if ($tokens->tryConsumeTokenType(Lexer::TOKEN_OPEN_PARENTHESES)) {
                $tokens->consumeTokenType(Lexer::TOKEN_CLOSE_PARENTHESES);
                return ['parameter' => $parameter, 'method' => $propertyOrMethod];
            }
            return ['parameter' => $parameter, 'property' => $propertyOrMethod];
        }
        return ['parameter' => $parameter];
    }
    private function parseSelfOutTagValue(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\PhpDoc\SelfOutTagValueNode
    {
        $type = $this->typeParser->parse($tokens);
        $description = $this->parseOptionalDescription($tokens);
        return new Ast\PhpDoc\SelfOutTagValueNode($type, $description);
    }
    private function parseParamOutTagValue(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\PhpDoc\ParamOutTagValueNode
    {
        $type = $this->typeParser->parse($tokens);
        $parameterName = $this->parseRequiredVariableName($tokens);
        $description = $this->parseOptionalDescription($tokens);
        return new Ast\PhpDoc\ParamOutTagValueNode($type, $parameterName, $description);
    }
    private function parseOptionalVariableName(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : string
    {
        if ($tokens->isCurrentTokenType(Lexer::TOKEN_VARIABLE)) {
            $parameterName = $tokens->currentTokenValue();
            $tokens->next();
        } elseif ($tokens->isCurrentTokenType(Lexer::TOKEN_THIS_VARIABLE)) {
            $parameterName = '$this';
            $tokens->next();
        } else {
            $parameterName = '';
        }
        return $parameterName;
    }
    private function parseRequiredVariableName(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : string
    {
        $parameterName = $tokens->currentTokenValue();
        $tokens->consumeTokenType(Lexer::TOKEN_VARIABLE);
        return $parameterName;
    }
    private function parseOptionalDescription(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens, bool $limitStartToken = \false) : string
    {
        if ($limitStartToken) {
            foreach (self::DISALLOWED_DESCRIPTION_START_TOKENS as $disallowedStartToken) {
                if (!$tokens->isCurrentTokenType($disallowedStartToken)) {
                    continue;
                }
                $tokens->consumeTokenType(Lexer::TOKEN_OTHER);
                // will throw exception
            }
            if ($this->requireWhitespaceBeforeDescription && !$tokens->isCurrentTokenType(Lexer::TOKEN_PHPDOC_EOL, Lexer::TOKEN_CLOSE_PHPDOC, Lexer::TOKEN_END) && !$tokens->isPrecededByHorizontalWhitespace()) {
                $tokens->consumeTokenType(Lexer::TOKEN_HORIZONTAL_WS);
                // will throw exception
            }
        }
        return $this->parseText($tokens)->text;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Parser;

use Exception;
use PHPStan\PhpDocParser\Lexer\Lexer;
use function assert;
use function json_encode;
use function sprintf;
use const JSON_INVALID_UTF8_SUBSTITUTE;
use const JSON_UNESCAPED_SLASHES;
use const JSON_UNESCAPED_UNICODE;
class ParserException extends Exception
{
    /** @var string */
    private $currentTokenValue;
    /** @var int */
    private $currentTokenType;
    /** @var int */
    private $currentOffset;
    /** @var int */
    private $expectedTokenType;
    /** @var string|null */
    private $expectedTokenValue;
    /** @var int|null */
    private $currentTokenLine;
    public function __construct(string $currentTokenValue, int $currentTokenType, int $currentOffset, int $expectedTokenType, ?string $expectedTokenValue = null, ?int $currentTokenLine = null)
    {
        $this->currentTokenValue = $currentTokenValue;
        $this->currentTokenType = $currentTokenType;
        $this->currentOffset = $currentOffset;
        $this->expectedTokenType = $expectedTokenType;
        $this->expectedTokenValue = $expectedTokenValue;
        $this->currentTokenLine = $currentTokenLine;
        parent::__construct(sprintf('Unexpected token %s, expected %s%s at offset %d%s', $this->formatValue($currentTokenValue), Lexer::TOKEN_LABELS[$expectedTokenType], $expectedTokenValue !== null ? sprintf(' (%s)', $this->formatValue($expectedTokenValue)) : '', $currentOffset, $currentTokenLine === null ? '' : sprintf(' on line %d', $currentTokenLine)));
    }
    public function getCurrentTokenValue() : string
    {
        return $this->currentTokenValue;
    }
    public function getCurrentTokenType() : int
    {
        return $this->currentTokenType;
    }
    public function getCurrentOffset() : int
    {
        return $this->currentOffset;
    }
    public function getExpectedTokenType() : int
    {
        return $this->expectedTokenType;
    }
    public function getExpectedTokenValue() : ?string
    {
        return $this->expectedTokenValue;
    }
    public function getCurrentTokenLine() : ?int
    {
        return $this->currentTokenLine;
    }
    private function formatValue(string $value) : string
    {
        $json = json_encode($value, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_INVALID_UTF8_SUBSTITUTE);
        assert($json !== \false);
        return $json;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Parser;

use PHPStan\PhpDocParser\Ast;
use PHPStan\PhpDocParser\Lexer\Lexer;
use function str_replace;
use function strtolower;
use function substr;
class ConstExprParser
{
    /** @var bool */
    private $unescapeStrings;
    /** @var bool */
    private $quoteAwareConstExprString;
    /** @var bool */
    private $useLinesAttributes;
    /** @var bool */
    private $useIndexAttributes;
    /**
     * @param array{lines?: bool, indexes?: bool} $usedAttributes
     */
    public function __construct(bool $unescapeStrings = \false, bool $quoteAwareConstExprString = \false, array $usedAttributes = [])
    {
        $this->unescapeStrings = $unescapeStrings;
        $this->quoteAwareConstExprString = $quoteAwareConstExprString;
        $this->useLinesAttributes = $usedAttributes['lines'] ?? \false;
        $this->useIndexAttributes = $usedAttributes['indexes'] ?? \false;
    }
    public function parse(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens, bool $trimStrings = \false) : Ast\ConstExpr\ConstExprNode
    {
        $startLine = $tokens->currentTokenLine();
        $startIndex = $tokens->currentTokenIndex();
        if ($tokens->isCurrentTokenType(Lexer::TOKEN_FLOAT)) {
            $value = $tokens->currentTokenValue();
            $tokens->next();
            return $this->enrichWithAttributes($tokens, new Ast\ConstExpr\ConstExprFloatNode(str_replace('_', '', $value)), $startLine, $startIndex);
        }
        if ($tokens->isCurrentTokenType(Lexer::TOKEN_INTEGER)) {
            $value = $tokens->currentTokenValue();
            $tokens->next();
            return $this->enrichWithAttributes($tokens, new Ast\ConstExpr\ConstExprIntegerNode(str_replace('_', '', $value)), $startLine, $startIndex);
        }
        if ($tokens->isCurrentTokenType(Lexer::TOKEN_SINGLE_QUOTED_STRING, Lexer::TOKEN_DOUBLE_QUOTED_STRING)) {
            $value = $tokens->currentTokenValue();
            $type = $tokens->currentTokenType();
            if ($trimStrings) {
                if ($this->unescapeStrings) {
                    $value = \PHPStan\PhpDocParser\Parser\StringUnescaper::unescapeString($value);
                } else {
                    $value = substr($value, 1, -1);
                }
            }
            $tokens->next();
            if ($this->quoteAwareConstExprString) {
                return $this->enrichWithAttributes($tokens, new Ast\ConstExpr\QuoteAwareConstExprStringNode($value, $type === Lexer::TOKEN_SINGLE_QUOTED_STRING ? Ast\ConstExpr\QuoteAwareConstExprStringNode::SINGLE_QUOTED : Ast\ConstExpr\QuoteAwareConstExprStringNode::DOUBLE_QUOTED), $startLine, $startIndex);
            }
            return $this->enrichWithAttributes($tokens, new Ast\ConstExpr\ConstExprStringNode($value), $startLine, $startIndex);
        } elseif ($tokens->isCurrentTokenType(Lexer::TOKEN_IDENTIFIER)) {
            $identifier = $tokens->currentTokenValue();
            $tokens->next();
            switch (strtolower($identifier)) {
                case 'true':
                    return $this->enrichWithAttributes($tokens, new Ast\ConstExpr\ConstExprTrueNode(), $startLine, $startIndex);
                case 'false':
                    return $this->enrichWithAttributes($tokens, new Ast\ConstExpr\ConstExprFalseNode(), $startLine, $startIndex);
                case 'null':
                    return $this->enrichWithAttributes($tokens, new Ast\ConstExpr\ConstExprNullNode(), $startLine, $startIndex);
                case 'array':
                    $tokens->consumeTokenType(Lexer::TOKEN_OPEN_PARENTHESES);
                    return $this->parseArray($tokens, Lexer::TOKEN_CLOSE_PARENTHESES, $startIndex);
            }
            if ($tokens->tryConsumeTokenType(Lexer::TOKEN_DOUBLE_COLON)) {
                $classConstantName = '';
                $lastType = null;
                while (\true) {
                    if ($lastType !== Lexer::TOKEN_IDENTIFIER && $tokens->currentTokenType() === Lexer::TOKEN_IDENTIFIER) {
                        $classConstantName .= $tokens->currentTokenValue();
                        $tokens->consumeTokenType(Lexer::TOKEN_IDENTIFIER);
                        $lastType = Lexer::TOKEN_IDENTIFIER;
                        continue;
                    }
                    if ($lastType !== Lexer::TOKEN_WILDCARD && $tokens->tryConsumeTokenType(Lexer::TOKEN_WILDCARD)) {
                        $classConstantName .= '*';
                        $lastType = Lexer::TOKEN_WILDCARD;
                        if ($tokens->getSkippedHorizontalWhiteSpaceIfAny() !== '') {
                            break;
                        }
                        continue;
                    }
                    if ($lastType === null) {
                        // trigger parse error if nothing valid was consumed
                        $tokens->consumeTokenType(Lexer::TOKEN_WILDCARD);
                    }
                    break;
                }
                return $this->enrichWithAttributes($tokens, new Ast\ConstExpr\ConstFetchNode($identifier, $classConstantName), $startLine, $startIndex);
            }
            return $this->enrichWithAttributes($tokens, new Ast\ConstExpr\ConstFetchNode('', $identifier), $startLine, $startIndex);
        } elseif ($tokens->tryConsumeTokenType(Lexer::TOKEN_OPEN_SQUARE_BRACKET)) {
            return $this->parseArray($tokens, Lexer::TOKEN_CLOSE_SQUARE_BRACKET, $startIndex);
        }
        throw new \PHPStan\PhpDocParser\Parser\ParserException($tokens->currentTokenValue(), $tokens->currentTokenType(), $tokens->currentTokenOffset(), Lexer::TOKEN_IDENTIFIER, null, $tokens->currentTokenLine());
    }
    private function parseArray(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens, int $endToken, int $startIndex) : Ast\ConstExpr\ConstExprArrayNode
    {
        $items = [];
        $startLine = $tokens->currentTokenLine();
        if (!$tokens->tryConsumeTokenType($endToken)) {
            do {
                $items[] = $this->parseArrayItem($tokens);
            } while ($tokens->tryConsumeTokenType(Lexer::TOKEN_COMMA) && !$tokens->isCurrentTokenType($endToken));
            $tokens->consumeTokenType($endToken);
        }
        return $this->enrichWithAttributes($tokens, new Ast\ConstExpr\ConstExprArrayNode($items), $startLine, $startIndex);
    }
    private function parseArrayItem(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\ConstExpr\ConstExprArrayItemNode
    {
        $startLine = $tokens->currentTokenLine();
        $startIndex = $tokens->currentTokenIndex();
        $expr = $this->parse($tokens);
        if ($tokens->tryConsumeTokenType(Lexer::TOKEN_DOUBLE_ARROW)) {
            $key = $expr;
            $value = $this->parse($tokens);
        } else {
            $key = null;
            $value = $expr;
        }
        return $this->enrichWithAttributes($tokens, new Ast\ConstExpr\ConstExprArrayItemNode($key, $value), $startLine, $startIndex);
    }
    /**
     * @template T of Ast\ConstExpr\ConstExprNode
     * @param T $node
     * @return T
     */
    private function enrichWithAttributes(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens, Ast\ConstExpr\ConstExprNode $node, int $startLine, int $startIndex) : Ast\ConstExpr\ConstExprNode
    {
        if ($this->useLinesAttributes) {
            $node->setAttribute(Ast\Attribute::START_LINE, $startLine);
            $node->setAttribute(Ast\Attribute::END_LINE, $tokens->currentTokenLine());
        }
        if ($this->useIndexAttributes) {
            $node->setAttribute(Ast\Attribute::START_INDEX, $startIndex);
            $node->setAttribute(Ast\Attribute::END_INDEX, $tokens->endIndexOfLastRelevantToken());
        }
        return $node;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDocParser\Parser;

use function chr;
use function hexdec;
use function octdec;
use function preg_replace_callback;
use function str_replace;
use function substr;
class StringUnescaper
{
    private const REPLACEMENTS = ['\\' => '\\', 'n' => "\n", 'r' => "\r", 't' => "\t", 'f' => "\f", 'v' => "\v", 'e' => "\x1b"];
    public static function unescapeString(string $string) : string
    {
        $quote = $string[0];
        if ($quote === '\'') {
            return str_replace(['\\\\', '\\\''], ['\\', '\''], substr($string, 1, -1));
        }
        return self::parseEscapeSequences(substr($string, 1, -1), '"');
    }
    /**
     * Implementation based on https://github.com/nikic/PHP-Parser/blob/b0edd4c41111042d43bb45c6c657b2e0db367d9e/lib/PhpParser/Node/Scalar/String_.php#L90-L130
     */
    private static function parseEscapeSequences(string $str, string $quote) : string
    {
        $str = str_replace('\\' . $quote, $quote, $str);
        return preg_replace_callback('~\\\\([\\\\nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3}|u\\{([0-9a-fA-F]+)\\})~', static function ($matches) {
            $str = $matches[1];
            if (isset(self::REPLACEMENTS[$str])) {
                return self::REPLACEMENTS[$str];
            }
            if ($str[0] === 'x' || $str[0] === 'X') {
                return chr((int) hexdec(substr($str, 1)));
            }
            if ($str[0] === 'u') {
                return self::codePointToUtf8((int) hexdec($matches[2]));
            }
            return chr((int) octdec($str));
        }, $str);
    }
    /**
     * Implementation based on https://github.com/nikic/PHP-Parser/blob/b0edd4c41111042d43bb45c6c657b2e0db367d9e/lib/PhpParser/Node/Scalar/String_.php#L132-L154
     */
    private static function codePointToUtf8(int $num) : string
    {
        if ($num <= 0x7f) {
            return chr($num);
        }
        if ($num <= 0x7ff) {
            return chr(($num >> 6) + 0xc0) . chr(($num & 0x3f) + 0x80);
        }
        if ($num <= 0xffff) {
            return chr(($num >> 12) + 0xe0) . chr(($num >> 6 & 0x3f) + 0x80) . chr(($num & 0x3f) + 0x80);
        }
        if ($num <= 0x1fffff) {
            return chr(($num >> 18) + 0xf0) . chr(($num >> 12 & 0x3f) + 0x80) . chr(($num >> 6 & 0x3f) + 0x80) . chr(($num & 0x3f) + 0x80);
        }
        // Invalid UTF-8 codepoint escape sequence: Codepoint too large
        return "�";
    }
}
MIT License

Copyright (c) 2016 Ondřej Mirtes

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.<?php

declare (strict_types=1);
namespace PHPStan;

class Php8StubsMap
{
    /** @var array<string, string> */
    public $classes;
    /** @var array<string, string> */
    public $functions;
    public function __construct(int $phpVersionId)
    {
        $classes = array('addressinfo' => 'stubs/ext/sockets/AddressInfo.stub', 'appenditerator' => 'stubs/ext/spl/AppendIterator.stub', 'argumentcounterror' => 'stubs/Zend/ArgumentCountError.stub', 'arithmeticerror' => 'stubs/Zend/ArithmeticError.stub', 'arrayaccess' => 'stubs/Zend/ArrayAccess.stub', 'arrayiterator' => 'stubs/ext/spl/ArrayIterator.stub', 'arrayobject' => 'stubs/ext/spl/ArrayObject.stub', 'attribute' => 'stubs/Zend/Attribute.stub', 'cachingiterator' => 'stubs/ext/spl/CachingIterator.stub', 'callbackfilteriterator' => 'stubs/ext/spl/CallbackFilterIterator.stub', 'closedgeneratorexception' => 'stubs/Zend/ClosedGeneratorException.stub', 'closure' => 'stubs/Zend/Closure.stub', 'collator' => 'stubs/ext/intl/collator/Collator.stub', 'com' => 'stubs/ext/com_dotnet/com.stub', 'com_exception' => 'stubs/ext/com_dotnet/com_exception.stub', 'compersisthelper' => 'stubs/ext/com_dotnet/COMPersistHelper.stub', 'compileerror' => 'stubs/Zend/CompileError.stub', 'countable' => 'stubs/Zend/Countable.stub', 'curlfile' => 'stubs/ext/curl/CURLFile.stub', 'curlhandle' => 'stubs/ext/curl/CurlHandle.stub', 'curlmultihandle' => 'stubs/ext/curl/CurlMultiHandle.stub', 'curlsharehandle' => 'stubs/ext/curl/CurlShareHandle.stub', 'dateinterval' => 'stubs/ext/date/DateInterval.stub', 'dateperiod' => 'stubs/ext/date/DatePeriod.stub', 'datetime' => 'stubs/ext/date/DateTime.stub', 'datetimeimmutable' => 'stubs/ext/date/DateTimeImmutable.stub', 'datetimeinterface' => 'stubs/ext/date/DateTimeInterface.stub', 'datetimezone' => 'stubs/ext/date/DateTimeZone.stub', 'deflatecontext' => 'stubs/ext/zlib/DeflateContext.stub', 'directory' => 'stubs/ext/standard/Directory.stub', 'directoryiterator' => 'stubs/ext/spl/DirectoryIterator.stub', 'divisionbyzeroerror' => 'stubs/Zend/DivisionByZeroError.stub', 'domattr' => 'stubs/ext/dom/DOMAttr.stub', 'domcdatasection' => 'stubs/ext/dom/DOMCdataSection.stub', 'domcharacterdata' => 'stubs/ext/dom/DOMCharacterData.stub', 'domchildnode' => 'stubs/ext/dom/DOMChildNode.stub', 'domcomment' => 'stubs/ext/dom/DOMComment.stub', 'domdocument' => 'stubs/ext/dom/DOMDocument.stub', 'domdocumentfragment' => 'stubs/ext/dom/DOMDocumentFragment.stub', 'domdocumenttype' => 'stubs/ext/dom/DOMDocumentType.stub', 'domelement' => 'stubs/ext/dom/DOMElement.stub', 'domentity' => 'stubs/ext/dom/DOMEntity.stub', 'domentityreference' => 'stubs/ext/dom/DOMEntityReference.stub', 'domexception' => 'stubs/ext/dom/DOMException.stub', 'domimplementation' => 'stubs/ext/dom/DOMImplementation.stub', 'domnamednodemap' => 'stubs/ext/dom/DOMNamedNodeMap.stub', 'domnamespacenode' => 'stubs/ext/dom/DOMNameSpaceNode.stub', 'domnode' => 'stubs/ext/dom/DOMNode.stub', 'domnodelist' => 'stubs/ext/dom/DOMNodeList.stub', 'domnotation' => 'stubs/ext/dom/DOMNotation.stub', 'domparentnode' => 'stubs/ext/dom/DOMParentNode.stub', 'domprocessinginstruction' => 'stubs/ext/dom/DOMProcessingInstruction.stub', 'domtext' => 'stubs/ext/dom/DOMText.stub', 'domxpath' => 'stubs/ext/dom/DOMXPath.stub', 'dotnet' => 'stubs/ext/com_dotnet/dotnet.stub', 'emptyiterator' => 'stubs/ext/spl/EmptyIterator.stub', 'enchantbroker' => 'stubs/ext/enchant/EnchantBroker.stub', 'enchantdictionary' => 'stubs/ext/enchant/EnchantDictionary.stub', 'error' => 'stubs/Zend/Error.stub', 'errorexception' => 'stubs/Zend/ErrorException.stub', 'exception' => 'stubs/Zend/Exception.stub', 'ffi' => 'stubs/ext/ffi/FFI.stub', 'ffi\\cdata' => 'stubs/ext/ffi/FFI/CData.stub', 'ffi\\ctype' => 'stubs/ext/ffi/FFI/CType.stub', 'ffi\\exception' => 'stubs/ext/ffi/FFI/Exception.stub', 'ffi\\parserexception' => 'stubs/ext/ffi/FFI/ParserException.stub', 'filesystemiterator' => 'stubs/ext/spl/FilesystemIterator.stub', 'filteriterator' => 'stubs/ext/spl/FilterIterator.stub', 'finfo' => 'stubs/ext/fileinfo/finfo.stub', 'gdimage' => 'stubs/ext/gd/GdImage.stub', 'generator' => 'stubs/Zend/Generator.stub', 'globiterator' => 'stubs/ext/spl/GlobIterator.stub', 'gmp' => 'stubs/ext/gmp/GMP.stub', 'hashcontext' => 'stubs/ext/hash/HashContext.stub', 'infiniteiterator' => 'stubs/ext/spl/InfiniteIterator.stub', 'inflatecontext' => 'stubs/ext/zlib/InflateContext.stub', 'internaliterator' => 'stubs/Zend/InternalIterator.stub', 'intlbreakiterator' => 'stubs/ext/intl/breakiterator/IntlBreakIterator.stub', 'intlcalendar' => 'stubs/ext/intl/calendar/IntlCalendar.stub', 'intlchar' => 'stubs/ext/intl/uchar/IntlChar.stub', 'intlcodepointbreakiterator' => 'stubs/ext/intl/breakiterator/IntlCodePointBreakIterator.stub', 'intldateformatter' => 'stubs/ext/intl/dateformat/IntlDateFormatter.stub', 'intlexception' => 'stubs/ext/intl/IntlException.stub', 'intlgregoriancalendar' => 'stubs/ext/intl/calendar/IntlGregorianCalendar.stub', 'intliterator' => 'stubs/ext/intl/common/IntlIterator.stub', 'intlpartsiterator' => 'stubs/ext/intl/breakiterator/IntlPartsIterator.stub', 'intlrulebasedbreakiterator' => 'stubs/ext/intl/breakiterator/IntlRuleBasedBreakIterator.stub', 'intltimezone' => 'stubs/ext/intl/timezone/IntlTimeZone.stub', 'iterator' => 'stubs/Zend/Iterator.stub', 'iteratoraggregate' => 'stubs/Zend/IteratorAggregate.stub', 'iteratoriterator' => 'stubs/ext/spl/IteratorIterator.stub', 'jsonexception' => 'stubs/ext/json/JsonException.stub', 'jsonserializable' => 'stubs/ext/json/JsonSerializable.stub', 'libxmlerror' => 'stubs/ext/libxml/LibXMLError.stub', 'limititerator' => 'stubs/ext/spl/LimitIterator.stub', 'locale' => 'stubs/ext/intl/locale/Locale.stub', 'messageformatter' => 'stubs/ext/intl/msgformat/MessageFormatter.stub', 'multipleiterator' => 'stubs/ext/spl/MultipleIterator.stub', 'mysqli' => 'stubs/ext/mysqli/mysqli.stub', 'mysqli_driver' => 'stubs/ext/mysqli/mysqli_driver.stub', 'mysqli_result' => 'stubs/ext/mysqli/mysqli_result.stub', 'mysqli_sql_exception' => 'stubs/ext/mysqli/mysqli_sql_exception.stub', 'mysqli_stmt' => 'stubs/ext/mysqli/mysqli_stmt.stub', 'mysqli_warning' => 'stubs/ext/mysqli/mysqli_warning.stub', 'norewinditerator' => 'stubs/ext/spl/NoRewindIterator.stub', 'normalizer' => 'stubs/ext/intl/normalizer/Normalizer.stub', 'numberformatter' => 'stubs/ext/intl/formatter/NumberFormatter.stub', 'ocicollection' => 'stubs/ext/oci8/OCICollection.stub', 'ocilob' => 'stubs/ext/oci8/OCILob.stub', 'opensslasymmetrickey' => 'stubs/ext/openssl/OpenSSLAsymmetricKey.stub', 'opensslcertificate' => 'stubs/ext/openssl/OpenSSLCertificate.stub', 'opensslcertificatesigningrequest' => 'stubs/ext/openssl/OpenSSLCertificateSigningRequest.stub', 'outeriterator' => 'stubs/ext/spl/OuterIterator.stub', 'parentiterator' => 'stubs/ext/spl/ParentIterator.stub', 'parseerror' => 'stubs/Zend/ParseError.stub', 'pdo' => 'stubs/ext/pdo/PDO.stub', 'pdo_pgsql_ext' => 'stubs/ext/pdo_pgsql/PDO_PGSql_Ext.stub', 'pdo_sqlite_ext' => 'stubs/ext/pdo_sqlite/PDO_SQLite_Ext.stub', 'pdoexception' => 'stubs/ext/pdo/PDOException.stub', 'pdorow' => 'stubs/ext/pdo/PDORow.stub', 'pdostatement' => 'stubs/ext/pdo/PDOStatement.stub', 'phar' => 'stubs/ext/phar/Phar.stub', 'phardata' => 'stubs/ext/phar/PharData.stub', 'pharexception' => 'stubs/ext/phar/PharException.stub', 'pharfileinfo' => 'stubs/ext/phar/PharFileInfo.stub', 'php_user_filter' => 'stubs/ext/standard/php_user_filter.stub', 'phptoken' => 'stubs/ext/tokenizer/PhpToken.stub', 'recursivearrayiterator' => 'stubs/ext/spl/RecursiveArrayIterator.stub', 'recursivecachingiterator' => 'stubs/ext/spl/RecursiveCachingIterator.stub', 'recursivecallbackfilteriterator' => 'stubs/ext/spl/RecursiveCallbackFilterIterator.stub', 'recursivedirectoryiterator' => 'stubs/ext/spl/RecursiveDirectoryIterator.stub', 'recursivefilteriterator' => 'stubs/ext/spl/RecursiveFilterIterator.stub', 'recursiveiterator' => 'stubs/ext/spl/RecursiveIterator.stub', 'recursiveiteratoriterator' => 'stubs/ext/spl/RecursiveIteratorIterator.stub', 'recursiveregexiterator' => 'stubs/ext/spl/RecursiveRegexIterator.stub', 'recursivetreeiterator' => 'stubs/ext/spl/RecursiveTreeIterator.stub', 'reflection' => 'stubs/ext/reflection/Reflection.stub', 'reflectionattribute' => 'stubs/ext/reflection/ReflectionAttribute.stub', 'reflectionclass' => 'stubs/ext/reflection/ReflectionClass.stub', 'reflectionclassconstant' => 'stubs/ext/reflection/ReflectionClassConstant.stub', 'reflectionexception' => 'stubs/ext/reflection/ReflectionException.stub', 'reflectionextension' => 'stubs/ext/reflection/ReflectionExtension.stub', 'reflectionfunction' => 'stubs/ext/reflection/ReflectionFunction.stub', 'reflectionfunctionabstract' => 'stubs/ext/reflection/ReflectionFunctionAbstract.stub', 'reflectiongenerator' => 'stubs/ext/reflection/ReflectionGenerator.stub', 'reflectionmethod' => 'stubs/ext/reflection/ReflectionMethod.stub', 'reflectionnamedtype' => 'stubs/ext/reflection/ReflectionNamedType.stub', 'reflectionobject' => 'stubs/ext/reflection/ReflectionObject.stub', 'reflectionparameter' => 'stubs/ext/reflection/ReflectionParameter.stub', 'reflectionproperty' => 'stubs/ext/reflection/ReflectionProperty.stub', 'reflectionreference' => 'stubs/ext/reflection/ReflectionReference.stub', 'reflectiontype' => 'stubs/ext/reflection/ReflectionType.stub', 'reflectionuniontype' => 'stubs/ext/reflection/ReflectionUnionType.stub', 'reflectionzendextension' => 'stubs/ext/reflection/ReflectionZendExtension.stub', 'reflector' => 'stubs/ext/reflection/Reflector.stub', 'regexiterator' => 'stubs/ext/spl/RegexIterator.stub', 'resourcebundle' => 'stubs/ext/intl/resourcebundle/ResourceBundle.stub', 'seekableiterator' => 'stubs/ext/spl/SeekableIterator.stub', 'serializable' => 'stubs/Zend/Serializable.stub', 'sessionhandler' => 'stubs/ext/session/SessionHandler.stub', 'sessionhandlerinterface' => 'stubs/ext/session/SessionHandlerInterface.stub', 'sessionidinterface' => 'stubs/ext/session/SessionIdInterface.stub', 'sessionupdatetimestamphandlerinterface' => 'stubs/ext/session/SessionUpdateTimestampHandlerInterface.stub', 'shmop' => 'stubs/ext/shmop/Shmop.stub', 'simplexmlelement' => 'stubs/ext/simplexml/SimpleXMLElement.stub', 'simplexmliterator' => 'stubs/ext/simplexml/SimpleXMLIterator.stub', 'snmp' => 'stubs/ext/snmp/SNMP.stub', 'snmpexception' => 'stubs/ext/snmp/SNMPException.stub', 'soapclient' => 'stubs/ext/soap/SoapClient.stub', 'soapfault' => 'stubs/ext/soap/SoapFault.stub', 'soapheader' => 'stubs/ext/soap/SoapHeader.stub', 'soapparam' => 'stubs/ext/soap/SoapParam.stub', 'soapserver' => 'stubs/ext/soap/SoapServer.stub', 'soapvar' => 'stubs/ext/soap/SoapVar.stub', 'socket' => 'stubs/ext/sockets/Socket.stub', 'sodiumexception' => 'stubs/ext/sodium/SodiumException.stub', 'spldoublylinkedlist' => 'stubs/ext/spl/SplDoublyLinkedList.stub', 'splfileinfo' => 'stubs/ext/spl/SplFileInfo.stub', 'splfileobject' => 'stubs/ext/spl/SplFileObject.stub', 'splfixedarray' => 'stubs/ext/spl/SplFixedArray.stub', 'splheap' => 'stubs/ext/spl/SplHeap.stub', 'splmaxheap' => 'stubs/ext/spl/SplMaxHeap.stub', 'splminheap' => 'stubs/ext/spl/SplMinHeap.stub', 'splobjectstorage' => 'stubs/ext/spl/SplObjectStorage.stub', 'splobserver' => 'stubs/ext/spl/SplObserver.stub', 'splpriorityqueue' => 'stubs/ext/spl/SplPriorityQueue.stub', 'splqueue' => 'stubs/ext/spl/SplQueue.stub', 'splstack' => 'stubs/ext/spl/SplStack.stub', 'splsubject' => 'stubs/ext/spl/SplSubject.stub', 'spltempfileobject' => 'stubs/ext/spl/SplTempFileObject.stub', 'spoofchecker' => 'stubs/ext/intl/spoofchecker/Spoofchecker.stub', 'sqlite3' => 'stubs/ext/sqlite3/SQLite3.stub', 'sqlite3result' => 'stubs/ext/sqlite3/SQLite3Result.stub', 'sqlite3stmt' => 'stubs/ext/sqlite3/SQLite3Stmt.stub', 'stringable' => 'stubs/Zend/Stringable.stub', 'sysvmessagequeue' => 'stubs/ext/sysvmsg/SysvMessageQueue.stub', 'sysvsemaphore' => 'stubs/ext/sysvsem/SysvSemaphore.stub', 'sysvsharedmemory' => 'stubs/ext/sysvshm/SysvSharedMemory.stub', 'throwable' => 'stubs/Zend/Throwable.stub', 'tidy' => 'stubs/ext/tidy/tidy.stub', 'tidynode' => 'stubs/ext/tidy/tidyNode.stub', 'transliterator' => 'stubs/ext/intl/transliterator/Transliterator.stub', 'traversable' => 'stubs/Zend/Traversable.stub', 'typeerror' => 'stubs/Zend/TypeError.stub', 'uconverter' => 'stubs/ext/intl/converter/UConverter.stub', 'unhandledmatcherror' => 'stubs/Zend/UnhandledMatchError.stub', 'valueerror' => 'stubs/Zend/ValueError.stub', 'variant' => 'stubs/ext/com_dotnet/variant.stub', 'weakmap' => 'stubs/Zend/WeakMap.stub', 'weakreference' => 'stubs/Zend/WeakReference.stub', 'xmlparser' => 'stubs/ext/xml/XMLParser.stub', 'xmlreader' => 'stubs/ext/xmlreader/XMLReader.stub', 'xmlwriter' => 'stubs/ext/xmlwriter/XMLWriter.stub', 'xsltprocessor' => 'stubs/ext/xsl/XSLTProcessor.stub', 'ziparchive' => 'stubs/ext/zip/ZipArchive.stub');
        $functions = array('_' => 'stubs/ext/gettext/_.stub', 'abs' => 'stubs/ext/standard/abs.stub', 'acos' => 'stubs/ext/standard/acos.stub', 'acosh' => 'stubs/ext/standard/acosh.stub', 'addcslashes' => 'stubs/ext/standard/addcslashes.stub', 'addslashes' => 'stubs/ext/standard/addslashes.stub', 'apache_child_terminate' => 'stubs/sapi/cgi/apache_child_terminate.stub', 'apache_get_modules' => 'stubs/sapi/apache2handler/apache_get_modules.stub', 'apache_get_version' => 'stubs/sapi/apache2handler/apache_get_version.stub', 'apache_getenv' => 'stubs/sapi/apache2handler/apache_getenv.stub', 'apache_lookup_uri' => 'stubs/sapi/apache2handler/apache_lookup_uri.stub', 'apache_note' => 'stubs/sapi/apache2handler/apache_note.stub', 'apache_request_headers' => 'stubs/sapi/apache2handler/apache_request_headers.stub', 'apache_response_headers' => 'stubs/sapi/apache2handler/apache_response_headers.stub', 'apache_setenv' => 'stubs/sapi/apache2handler/apache_setenv.stub', 'array_change_key_case' => 'stubs/ext/standard/array_change_key_case.stub', 'array_chunk' => 'stubs/ext/standard/array_chunk.stub', 'array_column' => 'stubs/ext/standard/array_column.stub', 'array_combine' => 'stubs/ext/standard/array_combine.stub', 'array_count_values' => 'stubs/ext/standard/array_count_values.stub', 'array_diff' => 'stubs/ext/standard/array_diff.stub', 'array_diff_assoc' => 'stubs/ext/standard/array_diff_assoc.stub', 'array_diff_key' => 'stubs/ext/standard/array_diff_key.stub', 'array_diff_uassoc' => 'stubs/ext/standard/array_diff_uassoc.stub', 'array_diff_ukey' => 'stubs/ext/standard/array_diff_ukey.stub', 'array_fill' => 'stubs/ext/standard/array_fill.stub', 'array_fill_keys' => 'stubs/ext/standard/array_fill_keys.stub', 'array_filter' => 'stubs/ext/standard/array_filter.stub', 'array_flip' => 'stubs/ext/standard/array_flip.stub', 'array_intersect' => 'stubs/ext/standard/array_intersect.stub', 'array_intersect_assoc' => 'stubs/ext/standard/array_intersect_assoc.stub', 'array_intersect_key' => 'stubs/ext/standard/array_intersect_key.stub', 'array_intersect_uassoc' => 'stubs/ext/standard/array_intersect_uassoc.stub', 'array_intersect_ukey' => 'stubs/ext/standard/array_intersect_ukey.stub', 'array_key_exists' => 'stubs/ext/standard/array_key_exists.stub', 'array_key_first' => 'stubs/ext/standard/array_key_first.stub', 'array_key_last' => 'stubs/ext/standard/array_key_last.stub', 'array_keys' => 'stubs/ext/standard/array_keys.stub', 'array_map' => 'stubs/ext/standard/array_map.stub', 'array_merge' => 'stubs/ext/standard/array_merge.stub', 'array_merge_recursive' => 'stubs/ext/standard/array_merge_recursive.stub', 'array_multisort' => 'stubs/ext/standard/array_multisort.stub', 'array_pad' => 'stubs/ext/standard/array_pad.stub', 'array_pop' => 'stubs/ext/standard/array_pop.stub', 'array_product' => 'stubs/ext/standard/array_product.stub', 'array_push' => 'stubs/ext/standard/array_push.stub', 'array_rand' => 'stubs/ext/standard/array_rand.stub', 'array_reduce' => 'stubs/ext/standard/array_reduce.stub', 'array_replace' => 'stubs/ext/standard/array_replace.stub', 'array_replace_recursive' => 'stubs/ext/standard/array_replace_recursive.stub', 'array_reverse' => 'stubs/ext/standard/array_reverse.stub', 'array_search' => 'stubs/ext/standard/array_search.stub', 'array_shift' => 'stubs/ext/standard/array_shift.stub', 'array_slice' => 'stubs/ext/standard/array_slice.stub', 'array_splice' => 'stubs/ext/standard/array_splice.stub', 'array_sum' => 'stubs/ext/standard/array_sum.stub', 'array_udiff' => 'stubs/ext/standard/array_udiff.stub', 'array_udiff_assoc' => 'stubs/ext/standard/array_udiff_assoc.stub', 'array_udiff_uassoc' => 'stubs/ext/standard/array_udiff_uassoc.stub', 'array_uintersect' => 'stubs/ext/standard/array_uintersect.stub', 'array_uintersect_assoc' => 'stubs/ext/standard/array_uintersect_assoc.stub', 'array_uintersect_uassoc' => 'stubs/ext/standard/array_uintersect_uassoc.stub', 'array_unique' => 'stubs/ext/standard/array_unique.stub', 'array_unshift' => 'stubs/ext/standard/array_unshift.stub', 'array_values' => 'stubs/ext/standard/array_values.stub', 'array_walk' => 'stubs/ext/standard/array_walk.stub', 'array_walk_recursive' => 'stubs/ext/standard/array_walk_recursive.stub', 'arsort' => 'stubs/ext/standard/arsort.stub', 'asin' => 'stubs/ext/standard/asin.stub', 'asinh' => 'stubs/ext/standard/asinh.stub', 'asort' => 'stubs/ext/standard/asort.stub', 'assert' => 'stubs/ext/standard/assert.stub', 'assert_options' => 'stubs/ext/standard/assert_options.stub', 'atan' => 'stubs/ext/standard/atan.stub', 'atan2' => 'stubs/ext/standard/atan2.stub', 'atanh' => 'stubs/ext/standard/atanh.stub', 'base64_decode' => 'stubs/ext/standard/base64_decode.stub', 'base64_encode' => 'stubs/ext/standard/base64_encode.stub', 'base_convert' => 'stubs/ext/standard/base_convert.stub', 'basename' => 'stubs/ext/standard/basename.stub', 'bcadd' => 'stubs/ext/bcmath/bcadd.stub', 'bccomp' => 'stubs/ext/bcmath/bccomp.stub', 'bcdiv' => 'stubs/ext/bcmath/bcdiv.stub', 'bcmod' => 'stubs/ext/bcmath/bcmod.stub', 'bcmul' => 'stubs/ext/bcmath/bcmul.stub', 'bcpow' => 'stubs/ext/bcmath/bcpow.stub', 'bcpowmod' => 'stubs/ext/bcmath/bcpowmod.stub', 'bcscale' => 'stubs/ext/bcmath/bcscale.stub', 'bcsqrt' => 'stubs/ext/bcmath/bcsqrt.stub', 'bcsub' => 'stubs/ext/bcmath/bcsub.stub', 'bin2hex' => 'stubs/ext/standard/bin2hex.stub', 'bind_textdomain_codeset' => 'stubs/ext/gettext/bind_textdomain_codeset.stub', 'bindec' => 'stubs/ext/standard/bindec.stub', 'bindtextdomain' => 'stubs/ext/gettext/bindtextdomain.stub', 'boolval' => 'stubs/ext/standard/boolval.stub', 'bzclose' => 'stubs/ext/bz2/bzclose.stub', 'bzcompress' => 'stubs/ext/bz2/bzcompress.stub', 'bzdecompress' => 'stubs/ext/bz2/bzdecompress.stub', 'bzerrno' => 'stubs/ext/bz2/bzerrno.stub', 'bzerror' => 'stubs/ext/bz2/bzerror.stub', 'bzerrstr' => 'stubs/ext/bz2/bzerrstr.stub', 'bzflush' => 'stubs/ext/bz2/bzflush.stub', 'bzopen' => 'stubs/ext/bz2/bzopen.stub', 'bzread' => 'stubs/ext/bz2/bzread.stub', 'bzwrite' => 'stubs/ext/bz2/bzwrite.stub', 'cal_days_in_month' => 'stubs/ext/calendar/cal_days_in_month.stub', 'cal_from_jd' => 'stubs/ext/calendar/cal_from_jd.stub', 'cal_info' => 'stubs/ext/calendar/cal_info.stub', 'cal_to_jd' => 'stubs/ext/calendar/cal_to_jd.stub', 'call_user_func' => 'stubs/ext/standard/call_user_func.stub', 'call_user_func_array' => 'stubs/ext/standard/call_user_func_array.stub', 'ceil' => 'stubs/ext/standard/ceil.stub', 'chdir' => 'stubs/ext/standard/chdir.stub', 'checkdate' => 'stubs/ext/date/checkdate.stub', 'checkdnsrr' => 'stubs/ext/standard/checkdnsrr.stub', 'chgrp' => 'stubs/ext/standard/chgrp.stub', 'chmod' => 'stubs/ext/standard/chmod.stub', 'chop' => 'stubs/ext/standard/chop.stub', 'chown' => 'stubs/ext/standard/chown.stub', 'chr' => 'stubs/ext/standard/chr.stub', 'chroot' => 'stubs/ext/standard/chroot.stub', 'chunk_split' => 'stubs/ext/standard/chunk_split.stub', 'class_alias' => 'stubs/Zend/class_alias.stub', 'class_exists' => 'stubs/Zend/class_exists.stub', 'class_implements' => 'stubs/ext/spl/class_implements.stub', 'class_parents' => 'stubs/ext/spl/class_parents.stub', 'class_uses' => 'stubs/ext/spl/class_uses.stub', 'clearstatcache' => 'stubs/ext/standard/clearstatcache.stub', 'cli_get_process_title' => 'stubs/sapi/cli/cli_get_process_title.stub', 'cli_set_process_title' => 'stubs/sapi/cli/cli_set_process_title.stub', 'closedir' => 'stubs/ext/standard/closedir.stub', 'closelog' => 'stubs/ext/standard/closelog.stub', 'collator_asort' => 'stubs/ext/intl/collator_asort.stub', 'collator_compare' => 'stubs/ext/intl/collator_compare.stub', 'collator_create' => 'stubs/ext/intl/collator_create.stub', 'collator_get_attribute' => 'stubs/ext/intl/collator_get_attribute.stub', 'collator_get_error_code' => 'stubs/ext/intl/collator_get_error_code.stub', 'collator_get_error_message' => 'stubs/ext/intl/collator_get_error_message.stub', 'collator_get_locale' => 'stubs/ext/intl/collator_get_locale.stub', 'collator_get_sort_key' => 'stubs/ext/intl/collator_get_sort_key.stub', 'collator_get_strength' => 'stubs/ext/intl/collator_get_strength.stub', 'collator_set_attribute' => 'stubs/ext/intl/collator_set_attribute.stub', 'collator_set_strength' => 'stubs/ext/intl/collator_set_strength.stub', 'collator_sort' => 'stubs/ext/intl/collator_sort.stub', 'collator_sort_with_sort_keys' => 'stubs/ext/intl/collator_sort_with_sort_keys.stub', 'com_create_guid' => 'stubs/ext/com_dotnet/com_create_guid.stub', 'com_event_sink' => 'stubs/ext/com_dotnet/com_event_sink.stub', 'com_get_active_object' => 'stubs/ext/com_dotnet/com_get_active_object.stub', 'com_load_typelib' => 'stubs/ext/com_dotnet/com_load_typelib.stub', 'com_message_pump' => 'stubs/ext/com_dotnet/com_message_pump.stub', 'com_print_typeinfo' => 'stubs/ext/com_dotnet/com_print_typeinfo.stub', 'compact' => 'stubs/ext/standard/compact.stub', 'config_get_hash' => 'stubs/ext/standard/config_get_hash.stub', 'connection_aborted' => 'stubs/ext/standard/connection_aborted.stub', 'connection_status' => 'stubs/ext/standard/connection_status.stub', 'constant' => 'stubs/ext/standard/constant.stub', 'convert_uudecode' => 'stubs/ext/standard/convert_uudecode.stub', 'convert_uuencode' => 'stubs/ext/standard/convert_uuencode.stub', 'copy' => 'stubs/ext/standard/copy.stub', 'cos' => 'stubs/ext/standard/cos.stub', 'cosh' => 'stubs/ext/standard/cosh.stub', 'count' => 'stubs/ext/standard/count.stub', 'count_chars' => 'stubs/ext/standard/count_chars.stub', 'crc32' => 'stubs/ext/standard/crc32.stub', 'crypt' => 'stubs/ext/standard/crypt.stub', 'ctype_alnum' => 'stubs/ext/ctype/ctype_alnum.stub', 'ctype_alpha' => 'stubs/ext/ctype/ctype_alpha.stub', 'ctype_cntrl' => 'stubs/ext/ctype/ctype_cntrl.stub', 'ctype_digit' => 'stubs/ext/ctype/ctype_digit.stub', 'ctype_graph' => 'stubs/ext/ctype/ctype_graph.stub', 'ctype_lower' => 'stubs/ext/ctype/ctype_lower.stub', 'ctype_print' => 'stubs/ext/ctype/ctype_print.stub', 'ctype_punct' => 'stubs/ext/ctype/ctype_punct.stub', 'ctype_space' => 'stubs/ext/ctype/ctype_space.stub', 'ctype_upper' => 'stubs/ext/ctype/ctype_upper.stub', 'ctype_xdigit' => 'stubs/ext/ctype/ctype_xdigit.stub', 'curl_close' => 'stubs/ext/curl/curl_close.stub', 'curl_copy_handle' => 'stubs/ext/curl/curl_copy_handle.stub', 'curl_errno' => 'stubs/ext/curl/curl_errno.stub', 'curl_error' => 'stubs/ext/curl/curl_error.stub', 'curl_escape' => 'stubs/ext/curl/curl_escape.stub', 'curl_exec' => 'stubs/ext/curl/curl_exec.stub', 'curl_file_create' => 'stubs/ext/curl/curl_file_create.stub', 'curl_getinfo' => 'stubs/ext/curl/curl_getinfo.stub', 'curl_init' => 'stubs/ext/curl/curl_init.stub', 'curl_multi_add_handle' => 'stubs/ext/curl/curl_multi_add_handle.stub', 'curl_multi_close' => 'stubs/ext/curl/curl_multi_close.stub', 'curl_multi_errno' => 'stubs/ext/curl/curl_multi_errno.stub', 'curl_multi_exec' => 'stubs/ext/curl/curl_multi_exec.stub', 'curl_multi_getcontent' => 'stubs/ext/curl/curl_multi_getcontent.stub', 'curl_multi_info_read' => 'stubs/ext/curl/curl_multi_info_read.stub', 'curl_multi_init' => 'stubs/ext/curl/curl_multi_init.stub', 'curl_multi_remove_handle' => 'stubs/ext/curl/curl_multi_remove_handle.stub', 'curl_multi_select' => 'stubs/ext/curl/curl_multi_select.stub', 'curl_multi_setopt' => 'stubs/ext/curl/curl_multi_setopt.stub', 'curl_multi_strerror' => 'stubs/ext/curl/curl_multi_strerror.stub', 'curl_pause' => 'stubs/ext/curl/curl_pause.stub', 'curl_reset' => 'stubs/ext/curl/curl_reset.stub', 'curl_setopt' => 'stubs/ext/curl/curl_setopt.stub', 'curl_setopt_array' => 'stubs/ext/curl/curl_setopt_array.stub', 'curl_share_close' => 'stubs/ext/curl/curl_share_close.stub', 'curl_share_errno' => 'stubs/ext/curl/curl_share_errno.stub', 'curl_share_init' => 'stubs/ext/curl/curl_share_init.stub', 'curl_share_setopt' => 'stubs/ext/curl/curl_share_setopt.stub', 'curl_share_strerror' => 'stubs/ext/curl/curl_share_strerror.stub', 'curl_strerror' => 'stubs/ext/curl/curl_strerror.stub', 'curl_unescape' => 'stubs/ext/curl/curl_unescape.stub', 'curl_version' => 'stubs/ext/curl/curl_version.stub', 'current' => 'stubs/ext/standard/current.stub', 'date' => 'stubs/ext/date/date.stub', 'date_add' => 'stubs/ext/date/date_add.stub', 'date_create' => 'stubs/ext/date/date_create.stub', 'date_create_from_format' => 'stubs/ext/date/date_create_from_format.stub', 'date_create_immutable' => 'stubs/ext/date/date_create_immutable.stub', 'date_create_immutable_from_format' => 'stubs/ext/date/date_create_immutable_from_format.stub', 'date_date_set' => 'stubs/ext/date/date_date_set.stub', 'date_default_timezone_get' => 'stubs/ext/date/date_default_timezone_get.stub', 'date_default_timezone_set' => 'stubs/ext/date/date_default_timezone_set.stub', 'date_diff' => 'stubs/ext/date/date_diff.stub', 'date_format' => 'stubs/ext/date/date_format.stub', 'date_get_last_errors' => 'stubs/ext/date/date_get_last_errors.stub', 'date_interval_create_from_date_string' => 'stubs/ext/date/date_interval_create_from_date_string.stub', 'date_interval_format' => 'stubs/ext/date/date_interval_format.stub', 'date_isodate_set' => 'stubs/ext/date/date_isodate_set.stub', 'date_modify' => 'stubs/ext/date/date_modify.stub', 'date_offset_get' => 'stubs/ext/date/date_offset_get.stub', 'date_parse' => 'stubs/ext/date/date_parse.stub', 'date_parse_from_format' => 'stubs/ext/date/date_parse_from_format.stub', 'date_sub' => 'stubs/ext/date/date_sub.stub', 'date_sun_info' => 'stubs/ext/date/date_sun_info.stub', 'date_sunrise' => 'stubs/ext/date/date_sunrise.stub', 'date_sunset' => 'stubs/ext/date/date_sunset.stub', 'date_time_set' => 'stubs/ext/date/date_time_set.stub', 'date_timestamp_get' => 'stubs/ext/date/date_timestamp_get.stub', 'date_timestamp_set' => 'stubs/ext/date/date_timestamp_set.stub', 'date_timezone_get' => 'stubs/ext/date/date_timezone_get.stub', 'date_timezone_set' => 'stubs/ext/date/date_timezone_set.stub', 'datefmt_create' => 'stubs/ext/intl/datefmt_create.stub', 'datefmt_format' => 'stubs/ext/intl/datefmt_format.stub', 'datefmt_format_object' => 'stubs/ext/intl/datefmt_format_object.stub', 'datefmt_get_calendar' => 'stubs/ext/intl/datefmt_get_calendar.stub', 'datefmt_get_calendar_object' => 'stubs/ext/intl/datefmt_get_calendar_object.stub', 'datefmt_get_datetype' => 'stubs/ext/intl/datefmt_get_datetype.stub', 'datefmt_get_error_code' => 'stubs/ext/intl/datefmt_get_error_code.stub', 'datefmt_get_error_message' => 'stubs/ext/intl/datefmt_get_error_message.stub', 'datefmt_get_locale' => 'stubs/ext/intl/datefmt_get_locale.stub', 'datefmt_get_pattern' => 'stubs/ext/intl/datefmt_get_pattern.stub', 'datefmt_get_timetype' => 'stubs/ext/intl/datefmt_get_timetype.stub', 'datefmt_get_timezone' => 'stubs/ext/intl/datefmt_get_timezone.stub', 'datefmt_get_timezone_id' => 'stubs/ext/intl/datefmt_get_timezone_id.stub', 'datefmt_is_lenient' => 'stubs/ext/intl/datefmt_is_lenient.stub', 'datefmt_localtime' => 'stubs/ext/intl/datefmt_localtime.stub', 'datefmt_parse' => 'stubs/ext/intl/datefmt_parse.stub', 'datefmt_set_calendar' => 'stubs/ext/intl/datefmt_set_calendar.stub', 'datefmt_set_lenient' => 'stubs/ext/intl/datefmt_set_lenient.stub', 'datefmt_set_pattern' => 'stubs/ext/intl/datefmt_set_pattern.stub', 'datefmt_set_timezone' => 'stubs/ext/intl/datefmt_set_timezone.stub', 'dba_close' => 'stubs/ext/dba/dba_close.stub', 'dba_delete' => 'stubs/ext/dba/dba_delete.stub', 'dba_exists' => 'stubs/ext/dba/dba_exists.stub', 'dba_fetch' => 'stubs/ext/dba/dba_fetch.stub', 'dba_firstkey' => 'stubs/ext/dba/dba_firstkey.stub', 'dba_handlers' => 'stubs/ext/dba/dba_handlers.stub', 'dba_insert' => 'stubs/ext/dba/dba_insert.stub', 'dba_key_split' => 'stubs/ext/dba/dba_key_split.stub', 'dba_list' => 'stubs/ext/dba/dba_list.stub', 'dba_nextkey' => 'stubs/ext/dba/dba_nextkey.stub', 'dba_open' => 'stubs/ext/dba/dba_open.stub', 'dba_optimize' => 'stubs/ext/dba/dba_optimize.stub', 'dba_popen' => 'stubs/ext/dba/dba_popen.stub', 'dba_replace' => 'stubs/ext/dba/dba_replace.stub', 'dba_sync' => 'stubs/ext/dba/dba_sync.stub', 'dcgettext' => 'stubs/ext/gettext/dcgettext.stub', 'dcngettext' => 'stubs/ext/gettext/dcngettext.stub', 'debug_backtrace' => 'stubs/Zend/debug_backtrace.stub', 'debug_print_backtrace' => 'stubs/Zend/debug_print_backtrace.stub', 'debug_zval_dump' => 'stubs/ext/standard/debug_zval_dump.stub', 'decbin' => 'stubs/ext/standard/decbin.stub', 'dechex' => 'stubs/ext/standard/dechex.stub', 'decoct' => 'stubs/ext/standard/decoct.stub', 'define' => 'stubs/Zend/define.stub', 'defined' => 'stubs/Zend/defined.stub', 'deflate_add' => 'stubs/ext/zlib/deflate_add.stub', 'deflate_init' => 'stubs/ext/zlib/deflate_init.stub', 'deg2rad' => 'stubs/ext/standard/deg2rad.stub', 'dgettext' => 'stubs/ext/gettext/dgettext.stub', 'dir' => 'stubs/ext/standard/dir.stub', 'dirname' => 'stubs/ext/standard/dirname.stub', 'disk_free_space' => 'stubs/ext/standard/disk_free_space.stub', 'disk_total_space' => 'stubs/ext/standard/disk_total_space.stub', 'diskfreespace' => 'stubs/ext/standard/diskfreespace.stub', 'dl' => 'stubs/ext/standard/dl.stub', 'dngettext' => 'stubs/ext/gettext/dngettext.stub', 'dns_check_record' => 'stubs/ext/standard/dns_check_record.stub', 'dns_get_mx' => 'stubs/ext/standard/dns_get_mx.stub', 'dns_get_record' => 'stubs/ext/standard/dns_get_record.stub', 'dom_import_simplexml' => 'stubs/ext/dom/dom_import_simplexml.stub', 'doubleval' => 'stubs/ext/standard/doubleval.stub', 'easter_date' => 'stubs/ext/calendar/easter_date.stub', 'easter_days' => 'stubs/ext/calendar/easter_days.stub', 'enchant_broker_describe' => 'stubs/ext/enchant/enchant_broker_describe.stub', 'enchant_broker_dict_exists' => 'stubs/ext/enchant/enchant_broker_dict_exists.stub', 'enchant_broker_free' => 'stubs/ext/enchant/enchant_broker_free.stub', 'enchant_broker_free_dict' => 'stubs/ext/enchant/enchant_broker_free_dict.stub', 'enchant_broker_get_dict_path' => 'stubs/ext/enchant/enchant_broker_get_dict_path.stub', 'enchant_broker_get_error' => 'stubs/ext/enchant/enchant_broker_get_error.stub', 'enchant_broker_init' => 'stubs/ext/enchant/enchant_broker_init.stub', 'enchant_broker_list_dicts' => 'stubs/ext/enchant/enchant_broker_list_dicts.stub', 'enchant_broker_request_dict' => 'stubs/ext/enchant/enchant_broker_request_dict.stub', 'enchant_broker_request_pwl_dict' => 'stubs/ext/enchant/enchant_broker_request_pwl_dict.stub', 'enchant_broker_set_dict_path' => 'stubs/ext/enchant/enchant_broker_set_dict_path.stub', 'enchant_broker_set_ordering' => 'stubs/ext/enchant/enchant_broker_set_ordering.stub', 'enchant_dict_add' => 'stubs/ext/enchant/enchant_dict_add.stub', 'enchant_dict_add_to_personal' => 'stubs/ext/enchant/enchant_dict_add_to_personal.stub', 'enchant_dict_add_to_session' => 'stubs/ext/enchant/enchant_dict_add_to_session.stub', 'enchant_dict_check' => 'stubs/ext/enchant/enchant_dict_check.stub', 'enchant_dict_describe' => 'stubs/ext/enchant/enchant_dict_describe.stub', 'enchant_dict_get_error' => 'stubs/ext/enchant/enchant_dict_get_error.stub', 'enchant_dict_is_added' => 'stubs/ext/enchant/enchant_dict_is_added.stub', 'enchant_dict_is_in_session' => 'stubs/ext/enchant/enchant_dict_is_in_session.stub', 'enchant_dict_quick_check' => 'stubs/ext/enchant/enchant_dict_quick_check.stub', 'enchant_dict_store_replacement' => 'stubs/ext/enchant/enchant_dict_store_replacement.stub', 'enchant_dict_suggest' => 'stubs/ext/enchant/enchant_dict_suggest.stub', 'end' => 'stubs/ext/standard/end.stub', 'error_clear_last' => 'stubs/ext/standard/error_clear_last.stub', 'error_get_last' => 'stubs/ext/standard/error_get_last.stub', 'error_log' => 'stubs/ext/standard/error_log.stub', 'error_reporting' => 'stubs/Zend/error_reporting.stub', 'escapeshellarg' => 'stubs/ext/standard/escapeshellarg.stub', 'escapeshellcmd' => 'stubs/ext/standard/escapeshellcmd.stub', 'exec' => 'stubs/ext/standard/exec.stub', 'exif_imagetype' => 'stubs/ext/exif/exif_imagetype.stub', 'exif_read_data' => 'stubs/ext/exif/exif_read_data.stub', 'exif_tagname' => 'stubs/ext/exif/exif_tagname.stub', 'exif_thumbnail' => 'stubs/ext/exif/exif_thumbnail.stub', 'exp' => 'stubs/ext/standard/exp.stub', 'explode' => 'stubs/ext/standard/explode.stub', 'expm1' => 'stubs/ext/standard/expm1.stub', 'extension_loaded' => 'stubs/Zend/extension_loaded.stub', 'extract' => 'stubs/ext/standard/extract.stub', 'fastcgi_finish_request' => 'stubs/sapi/fpm/fpm/fastcgi_finish_request.stub', 'fclose' => 'stubs/ext/standard/fclose.stub', 'fdiv' => 'stubs/ext/standard/fdiv.stub', 'feof' => 'stubs/ext/standard/feof.stub', 'fflush' => 'stubs/ext/standard/fflush.stub', 'fgetc' => 'stubs/ext/standard/fgetc.stub', 'fgetcsv' => 'stubs/ext/standard/fgetcsv.stub', 'fgets' => 'stubs/ext/standard/fgets.stub', 'file' => 'stubs/ext/standard/file.stub', 'file_exists' => 'stubs/ext/standard/file_exists.stub', 'file_get_contents' => 'stubs/ext/standard/file_get_contents.stub', 'file_put_contents' => 'stubs/ext/standard/file_put_contents.stub', 'fileatime' => 'stubs/ext/standard/fileatime.stub', 'filectime' => 'stubs/ext/standard/filectime.stub', 'filegroup' => 'stubs/ext/standard/filegroup.stub', 'fileinode' => 'stubs/ext/standard/fileinode.stub', 'filemtime' => 'stubs/ext/standard/filemtime.stub', 'fileowner' => 'stubs/ext/standard/fileowner.stub', 'fileperms' => 'stubs/ext/standard/fileperms.stub', 'filesize' => 'stubs/ext/standard/filesize.stub', 'filetype' => 'stubs/ext/standard/filetype.stub', 'filter_has_var' => 'stubs/ext/filter/filter_has_var.stub', 'filter_id' => 'stubs/ext/filter/filter_id.stub', 'filter_input' => 'stubs/ext/filter/filter_input.stub', 'filter_input_array' => 'stubs/ext/filter/filter_input_array.stub', 'filter_list' => 'stubs/ext/filter/filter_list.stub', 'filter_var' => 'stubs/ext/filter/filter_var.stub', 'filter_var_array' => 'stubs/ext/filter/filter_var_array.stub', 'finfo_buffer' => 'stubs/ext/fileinfo/finfo_buffer.stub', 'finfo_close' => 'stubs/ext/fileinfo/finfo_close.stub', 'finfo_file' => 'stubs/ext/fileinfo/finfo_file.stub', 'finfo_open' => 'stubs/ext/fileinfo/finfo_open.stub', 'finfo_set_flags' => 'stubs/ext/fileinfo/finfo_set_flags.stub', 'floatval' => 'stubs/ext/standard/floatval.stub', 'flock' => 'stubs/ext/standard/flock.stub', 'floor' => 'stubs/ext/standard/floor.stub', 'flush' => 'stubs/ext/standard/flush.stub', 'fmod' => 'stubs/ext/standard/fmod.stub', 'fnmatch' => 'stubs/ext/standard/fnmatch.stub', 'fopen' => 'stubs/ext/standard/fopen.stub', 'forward_static_call' => 'stubs/ext/standard/forward_static_call.stub', 'forward_static_call_array' => 'stubs/ext/standard/forward_static_call_array.stub', 'fpassthru' => 'stubs/ext/standard/fpassthru.stub', 'fpm_get_status' => 'stubs/sapi/fpm/fpm/fpm_get_status.stub', 'fprintf' => 'stubs/ext/standard/fprintf.stub', 'fputcsv' => 'stubs/ext/standard/fputcsv.stub', 'fputs' => 'stubs/ext/standard/fputs.stub', 'fread' => 'stubs/ext/standard/fread.stub', 'frenchtojd' => 'stubs/ext/calendar/frenchtojd.stub', 'fscanf' => 'stubs/ext/standard/fscanf.stub', 'fseek' => 'stubs/ext/standard/fseek.stub', 'fsockopen' => 'stubs/ext/standard/fsockopen.stub', 'fstat' => 'stubs/ext/standard/fstat.stub', 'ftell' => 'stubs/ext/standard/ftell.stub', 'ftok' => 'stubs/ext/standard/ftok.stub', 'ftp_alloc' => 'stubs/ext/ftp/ftp_alloc.stub', 'ftp_append' => 'stubs/ext/ftp/ftp_append.stub', 'ftp_cdup' => 'stubs/ext/ftp/ftp_cdup.stub', 'ftp_chdir' => 'stubs/ext/ftp/ftp_chdir.stub', 'ftp_chmod' => 'stubs/ext/ftp/ftp_chmod.stub', 'ftp_close' => 'stubs/ext/ftp/ftp_close.stub', 'ftp_connect' => 'stubs/ext/ftp/ftp_connect.stub', 'ftp_delete' => 'stubs/ext/ftp/ftp_delete.stub', 'ftp_exec' => 'stubs/ext/ftp/ftp_exec.stub', 'ftp_fget' => 'stubs/ext/ftp/ftp_fget.stub', 'ftp_fput' => 'stubs/ext/ftp/ftp_fput.stub', 'ftp_get' => 'stubs/ext/ftp/ftp_get.stub', 'ftp_get_option' => 'stubs/ext/ftp/ftp_get_option.stub', 'ftp_login' => 'stubs/ext/ftp/ftp_login.stub', 'ftp_mdtm' => 'stubs/ext/ftp/ftp_mdtm.stub', 'ftp_mkdir' => 'stubs/ext/ftp/ftp_mkdir.stub', 'ftp_mlsd' => 'stubs/ext/ftp/ftp_mlsd.stub', 'ftp_nb_continue' => 'stubs/ext/ftp/ftp_nb_continue.stub', 'ftp_nb_fget' => 'stubs/ext/ftp/ftp_nb_fget.stub', 'ftp_nb_fput' => 'stubs/ext/ftp/ftp_nb_fput.stub', 'ftp_nb_get' => 'stubs/ext/ftp/ftp_nb_get.stub', 'ftp_nb_put' => 'stubs/ext/ftp/ftp_nb_put.stub', 'ftp_nlist' => 'stubs/ext/ftp/ftp_nlist.stub', 'ftp_pasv' => 'stubs/ext/ftp/ftp_pasv.stub', 'ftp_put' => 'stubs/ext/ftp/ftp_put.stub', 'ftp_pwd' => 'stubs/ext/ftp/ftp_pwd.stub', 'ftp_quit' => 'stubs/ext/ftp/ftp_quit.stub', 'ftp_raw' => 'stubs/ext/ftp/ftp_raw.stub', 'ftp_rawlist' => 'stubs/ext/ftp/ftp_rawlist.stub', 'ftp_rename' => 'stubs/ext/ftp/ftp_rename.stub', 'ftp_rmdir' => 'stubs/ext/ftp/ftp_rmdir.stub', 'ftp_set_option' => 'stubs/ext/ftp/ftp_set_option.stub', 'ftp_site' => 'stubs/ext/ftp/ftp_site.stub', 'ftp_size' => 'stubs/ext/ftp/ftp_size.stub', 'ftp_ssl_connect' => 'stubs/ext/ftp/ftp_ssl_connect.stub', 'ftp_systype' => 'stubs/ext/ftp/ftp_systype.stub', 'ftruncate' => 'stubs/ext/standard/ftruncate.stub', 'func_get_arg' => 'stubs/Zend/func_get_arg.stub', 'func_get_args' => 'stubs/Zend/func_get_args.stub', 'func_num_args' => 'stubs/Zend/func_num_args.stub', 'function_exists' => 'stubs/Zend/function_exists.stub', 'fwrite' => 'stubs/ext/standard/fwrite.stub', 'gc_collect_cycles' => 'stubs/Zend/gc_collect_cycles.stub', 'gc_disable' => 'stubs/Zend/gc_disable.stub', 'gc_enable' => 'stubs/Zend/gc_enable.stub', 'gc_enabled' => 'stubs/Zend/gc_enabled.stub', 'gc_mem_caches' => 'stubs/Zend/gc_mem_caches.stub', 'gc_status' => 'stubs/Zend/gc_status.stub', 'gd_info' => 'stubs/ext/gd/gd_info.stub', 'get_browser' => 'stubs/ext/standard/get_browser.stub', 'get_called_class' => 'stubs/Zend/get_called_class.stub', 'get_cfg_var' => 'stubs/ext/standard/get_cfg_var.stub', 'get_class' => 'stubs/Zend/get_class.stub', 'get_class_methods' => 'stubs/Zend/get_class_methods.stub', 'get_class_vars' => 'stubs/Zend/get_class_vars.stub', 'get_current_user' => 'stubs/ext/standard/get_current_user.stub', 'get_debug_type' => 'stubs/ext/standard/get_debug_type.stub', 'get_declared_classes' => 'stubs/Zend/get_declared_classes.stub', 'get_declared_interfaces' => 'stubs/Zend/get_declared_interfaces.stub', 'get_declared_traits' => 'stubs/Zend/get_declared_traits.stub', 'get_defined_constants' => 'stubs/Zend/get_defined_constants.stub', 'get_defined_functions' => 'stubs/Zend/get_defined_functions.stub', 'get_defined_vars' => 'stubs/Zend/get_defined_vars.stub', 'get_extension_funcs' => 'stubs/Zend/get_extension_funcs.stub', 'get_headers' => 'stubs/ext/standard/get_headers.stub', 'get_html_translation_table' => 'stubs/ext/standard/get_html_translation_table.stub', 'get_include_path' => 'stubs/ext/standard/get_include_path.stub', 'get_included_files' => 'stubs/Zend/get_included_files.stub', 'get_loaded_extensions' => 'stubs/Zend/get_loaded_extensions.stub', 'get_mangled_object_vars' => 'stubs/Zend/get_mangled_object_vars.stub', 'get_meta_tags' => 'stubs/ext/standard/get_meta_tags.stub', 'get_object_vars' => 'stubs/Zend/get_object_vars.stub', 'get_parent_class' => 'stubs/Zend/get_parent_class.stub', 'get_required_files' => 'stubs/Zend/get_required_files.stub', 'get_resource_id' => 'stubs/Zend/get_resource_id.stub', 'get_resource_type' => 'stubs/Zend/get_resource_type.stub', 'get_resources' => 'stubs/Zend/get_resources.stub', 'getallheaders' => 'stubs/sapi/apache2handler/getallheaders.stub', 'getcwd' => 'stubs/ext/standard/getcwd.stub', 'getdate' => 'stubs/ext/date/getdate.stub', 'getenv' => 'stubs/ext/standard/getenv.stub', 'gethostbyaddr' => 'stubs/ext/standard/gethostbyaddr.stub', 'gethostbyname' => 'stubs/ext/standard/gethostbyname.stub', 'gethostbynamel' => 'stubs/ext/standard/gethostbynamel.stub', 'gethostname' => 'stubs/ext/standard/gethostname.stub', 'getimagesize' => 'stubs/ext/standard/getimagesize.stub', 'getimagesizefromstring' => 'stubs/ext/standard/getimagesizefromstring.stub', 'getlastmod' => 'stubs/ext/standard/getlastmod.stub', 'getmxrr' => 'stubs/ext/standard/getmxrr.stub', 'getmygid' => 'stubs/ext/standard/getmygid.stub', 'getmyinode' => 'stubs/ext/standard/getmyinode.stub', 'getmypid' => 'stubs/ext/standard/getmypid.stub', 'getmyuid' => 'stubs/ext/standard/getmyuid.stub', 'getopt' => 'stubs/ext/standard/getopt.stub', 'getprotobyname' => 'stubs/ext/standard/getprotobyname.stub', 'getprotobynumber' => 'stubs/ext/standard/getprotobynumber.stub', 'getrandmax' => 'stubs/ext/standard/getrandmax.stub', 'getrusage' => 'stubs/ext/standard/getrusage.stub', 'getservbyname' => 'stubs/ext/standard/getservbyname.stub', 'getservbyport' => 'stubs/ext/standard/getservbyport.stub', 'gettext' => 'stubs/ext/gettext/gettext.stub', 'gettimeofday' => 'stubs/ext/standard/gettimeofday.stub', 'gettype' => 'stubs/ext/standard/gettype.stub', 'glob' => 'stubs/ext/standard/glob.stub', 'gmdate' => 'stubs/ext/date/gmdate.stub', 'gmmktime' => 'stubs/ext/date/gmmktime.stub', 'gmp_abs' => 'stubs/ext/gmp/gmp_abs.stub', 'gmp_add' => 'stubs/ext/gmp/gmp_add.stub', 'gmp_and' => 'stubs/ext/gmp/gmp_and.stub', 'gmp_binomial' => 'stubs/ext/gmp/gmp_binomial.stub', 'gmp_clrbit' => 'stubs/ext/gmp/gmp_clrbit.stub', 'gmp_cmp' => 'stubs/ext/gmp/gmp_cmp.stub', 'gmp_com' => 'stubs/ext/gmp/gmp_com.stub', 'gmp_div' => 'stubs/ext/gmp/gmp_div.stub', 'gmp_div_q' => 'stubs/ext/gmp/gmp_div_q.stub', 'gmp_div_qr' => 'stubs/ext/gmp/gmp_div_qr.stub', 'gmp_div_r' => 'stubs/ext/gmp/gmp_div_r.stub', 'gmp_divexact' => 'stubs/ext/gmp/gmp_divexact.stub', 'gmp_export' => 'stubs/ext/gmp/gmp_export.stub', 'gmp_fact' => 'stubs/ext/gmp/gmp_fact.stub', 'gmp_gcd' => 'stubs/ext/gmp/gmp_gcd.stub', 'gmp_gcdext' => 'stubs/ext/gmp/gmp_gcdext.stub', 'gmp_hamdist' => 'stubs/ext/gmp/gmp_hamdist.stub', 'gmp_import' => 'stubs/ext/gmp/gmp_import.stub', 'gmp_init' => 'stubs/ext/gmp/gmp_init.stub', 'gmp_intval' => 'stubs/ext/gmp/gmp_intval.stub', 'gmp_invert' => 'stubs/ext/gmp/gmp_invert.stub', 'gmp_jacobi' => 'stubs/ext/gmp/gmp_jacobi.stub', 'gmp_kronecker' => 'stubs/ext/gmp/gmp_kronecker.stub', 'gmp_lcm' => 'stubs/ext/gmp/gmp_lcm.stub', 'gmp_legendre' => 'stubs/ext/gmp/gmp_legendre.stub', 'gmp_mod' => 'stubs/ext/gmp/gmp_mod.stub', 'gmp_mul' => 'stubs/ext/gmp/gmp_mul.stub', 'gmp_neg' => 'stubs/ext/gmp/gmp_neg.stub', 'gmp_nextprime' => 'stubs/ext/gmp/gmp_nextprime.stub', 'gmp_or' => 'stubs/ext/gmp/gmp_or.stub', 'gmp_perfect_power' => 'stubs/ext/gmp/gmp_perfect_power.stub', 'gmp_perfect_square' => 'stubs/ext/gmp/gmp_perfect_square.stub', 'gmp_popcount' => 'stubs/ext/gmp/gmp_popcount.stub', 'gmp_pow' => 'stubs/ext/gmp/gmp_pow.stub', 'gmp_powm' => 'stubs/ext/gmp/gmp_powm.stub', 'gmp_prob_prime' => 'stubs/ext/gmp/gmp_prob_prime.stub', 'gmp_random_bits' => 'stubs/ext/gmp/gmp_random_bits.stub', 'gmp_random_range' => 'stubs/ext/gmp/gmp_random_range.stub', 'gmp_random_seed' => 'stubs/ext/gmp/gmp_random_seed.stub', 'gmp_root' => 'stubs/ext/gmp/gmp_root.stub', 'gmp_rootrem' => 'stubs/ext/gmp/gmp_rootrem.stub', 'gmp_scan0' => 'stubs/ext/gmp/gmp_scan0.stub', 'gmp_scan1' => 'stubs/ext/gmp/gmp_scan1.stub', 'gmp_setbit' => 'stubs/ext/gmp/gmp_setbit.stub', 'gmp_sign' => 'stubs/ext/gmp/gmp_sign.stub', 'gmp_sqrt' => 'stubs/ext/gmp/gmp_sqrt.stub', 'gmp_sqrtrem' => 'stubs/ext/gmp/gmp_sqrtrem.stub', 'gmp_strval' => 'stubs/ext/gmp/gmp_strval.stub', 'gmp_sub' => 'stubs/ext/gmp/gmp_sub.stub', 'gmp_testbit' => 'stubs/ext/gmp/gmp_testbit.stub', 'gmp_xor' => 'stubs/ext/gmp/gmp_xor.stub', 'gmstrftime' => 'stubs/ext/date/gmstrftime.stub', 'grapheme_extract' => 'stubs/ext/intl/grapheme_extract.stub', 'grapheme_stripos' => 'stubs/ext/intl/grapheme_stripos.stub', 'grapheme_stristr' => 'stubs/ext/intl/grapheme_stristr.stub', 'grapheme_strlen' => 'stubs/ext/intl/grapheme_strlen.stub', 'grapheme_strpos' => 'stubs/ext/intl/grapheme_strpos.stub', 'grapheme_strripos' => 'stubs/ext/intl/grapheme_strripos.stub', 'grapheme_strrpos' => 'stubs/ext/intl/grapheme_strrpos.stub', 'grapheme_strstr' => 'stubs/ext/intl/grapheme_strstr.stub', 'grapheme_substr' => 'stubs/ext/intl/grapheme_substr.stub', 'gregoriantojd' => 'stubs/ext/calendar/gregoriantojd.stub', 'gzclose' => 'stubs/ext/zlib/gzclose.stub', 'gzcompress' => 'stubs/ext/zlib/gzcompress.stub', 'gzdecode' => 'stubs/ext/zlib/gzdecode.stub', 'gzdeflate' => 'stubs/ext/zlib/gzdeflate.stub', 'gzencode' => 'stubs/ext/zlib/gzencode.stub', 'gzeof' => 'stubs/ext/zlib/gzeof.stub', 'gzfile' => 'stubs/ext/zlib/gzfile.stub', 'gzgetc' => 'stubs/ext/zlib/gzgetc.stub', 'gzgets' => 'stubs/ext/zlib/gzgets.stub', 'gzinflate' => 'stubs/ext/zlib/gzinflate.stub', 'gzopen' => 'stubs/ext/zlib/gzopen.stub', 'gzpassthru' => 'stubs/ext/zlib/gzpassthru.stub', 'gzputs' => 'stubs/ext/zlib/gzputs.stub', 'gzread' => 'stubs/ext/zlib/gzread.stub', 'gzrewind' => 'stubs/ext/zlib/gzrewind.stub', 'gzseek' => 'stubs/ext/zlib/gzseek.stub', 'gztell' => 'stubs/ext/zlib/gztell.stub', 'gzuncompress' => 'stubs/ext/zlib/gzuncompress.stub', 'gzwrite' => 'stubs/ext/zlib/gzwrite.stub', 'hash' => 'stubs/ext/hash/hash.stub', 'hash_algos' => 'stubs/ext/hash/hash_algos.stub', 'hash_copy' => 'stubs/ext/hash/hash_copy.stub', 'hash_equals' => 'stubs/ext/hash/hash_equals.stub', 'hash_file' => 'stubs/ext/hash/hash_file.stub', 'hash_final' => 'stubs/ext/hash/hash_final.stub', 'hash_hkdf' => 'stubs/ext/hash/hash_hkdf.stub', 'hash_hmac' => 'stubs/ext/hash/hash_hmac.stub', 'hash_hmac_algos' => 'stubs/ext/hash/hash_hmac_algos.stub', 'hash_hmac_file' => 'stubs/ext/hash/hash_hmac_file.stub', 'hash_init' => 'stubs/ext/hash/hash_init.stub', 'hash_pbkdf2' => 'stubs/ext/hash/hash_pbkdf2.stub', 'hash_update' => 'stubs/ext/hash/hash_update.stub', 'hash_update_file' => 'stubs/ext/hash/hash_update_file.stub', 'hash_update_stream' => 'stubs/ext/hash/hash_update_stream.stub', 'header' => 'stubs/ext/standard/header.stub', 'header_register_callback' => 'stubs/ext/standard/header_register_callback.stub', 'header_remove' => 'stubs/ext/standard/header_remove.stub', 'headers_list' => 'stubs/ext/standard/headers_list.stub', 'headers_sent' => 'stubs/ext/standard/headers_sent.stub', 'hebrev' => 'stubs/ext/standard/hebrev.stub', 'hex2bin' => 'stubs/ext/standard/hex2bin.stub', 'hexdec' => 'stubs/ext/standard/hexdec.stub', 'highlight_file' => 'stubs/ext/standard/highlight_file.stub', 'highlight_string' => 'stubs/ext/standard/highlight_string.stub', 'hrtime' => 'stubs/ext/standard/hrtime.stub', 'html_entity_decode' => 'stubs/ext/standard/html_entity_decode.stub', 'htmlentities' => 'stubs/ext/standard/htmlentities.stub', 'htmlspecialchars' => 'stubs/ext/standard/htmlspecialchars.stub', 'htmlspecialchars_decode' => 'stubs/ext/standard/htmlspecialchars_decode.stub', 'http_build_query' => 'stubs/ext/standard/http_build_query.stub', 'http_response_code' => 'stubs/ext/standard/http_response_code.stub', 'hypot' => 'stubs/ext/standard/hypot.stub', 'iconv' => 'stubs/ext/iconv/iconv.stub', 'iconv_get_encoding' => 'stubs/ext/iconv/iconv_get_encoding.stub', 'iconv_mime_decode' => 'stubs/ext/iconv/iconv_mime_decode.stub', 'iconv_mime_decode_headers' => 'stubs/ext/iconv/iconv_mime_decode_headers.stub', 'iconv_mime_encode' => 'stubs/ext/iconv/iconv_mime_encode.stub', 'iconv_set_encoding' => 'stubs/ext/iconv/iconv_set_encoding.stub', 'iconv_strlen' => 'stubs/ext/iconv/iconv_strlen.stub', 'iconv_strpos' => 'stubs/ext/iconv/iconv_strpos.stub', 'iconv_strrpos' => 'stubs/ext/iconv/iconv_strrpos.stub', 'iconv_substr' => 'stubs/ext/iconv/iconv_substr.stub', 'idate' => 'stubs/ext/date/idate.stub', 'idn_to_ascii' => 'stubs/ext/intl/idn_to_ascii.stub', 'idn_to_utf8' => 'stubs/ext/intl/idn_to_utf8.stub', 'ignore_user_abort' => 'stubs/ext/standard/ignore_user_abort.stub', 'image_type_to_extension' => 'stubs/ext/standard/image_type_to_extension.stub', 'image_type_to_mime_type' => 'stubs/ext/standard/image_type_to_mime_type.stub', 'imageaffine' => 'stubs/ext/gd/imageaffine.stub', 'imageaffinematrixconcat' => 'stubs/ext/gd/imageaffinematrixconcat.stub', 'imageaffinematrixget' => 'stubs/ext/gd/imageaffinematrixget.stub', 'imagealphablending' => 'stubs/ext/gd/imagealphablending.stub', 'imageantialias' => 'stubs/ext/gd/imageantialias.stub', 'imagearc' => 'stubs/ext/gd/imagearc.stub', 'imagebmp' => 'stubs/ext/gd/imagebmp.stub', 'imagechar' => 'stubs/ext/gd/imagechar.stub', 'imagecharup' => 'stubs/ext/gd/imagecharup.stub', 'imagecolorallocate' => 'stubs/ext/gd/imagecolorallocate.stub', 'imagecolorallocatealpha' => 'stubs/ext/gd/imagecolorallocatealpha.stub', 'imagecolorat' => 'stubs/ext/gd/imagecolorat.stub', 'imagecolorclosest' => 'stubs/ext/gd/imagecolorclosest.stub', 'imagecolorclosestalpha' => 'stubs/ext/gd/imagecolorclosestalpha.stub', 'imagecolorclosesthwb' => 'stubs/ext/gd/imagecolorclosesthwb.stub', 'imagecolordeallocate' => 'stubs/ext/gd/imagecolordeallocate.stub', 'imagecolorexact' => 'stubs/ext/gd/imagecolorexact.stub', 'imagecolorexactalpha' => 'stubs/ext/gd/imagecolorexactalpha.stub', 'imagecolormatch' => 'stubs/ext/gd/imagecolormatch.stub', 'imagecolorresolve' => 'stubs/ext/gd/imagecolorresolve.stub', 'imagecolorresolvealpha' => 'stubs/ext/gd/imagecolorresolvealpha.stub', 'imagecolorset' => 'stubs/ext/gd/imagecolorset.stub', 'imagecolorsforindex' => 'stubs/ext/gd/imagecolorsforindex.stub', 'imagecolorstotal' => 'stubs/ext/gd/imagecolorstotal.stub', 'imagecolortransparent' => 'stubs/ext/gd/imagecolortransparent.stub', 'imageconvolution' => 'stubs/ext/gd/imageconvolution.stub', 'imagecopy' => 'stubs/ext/gd/imagecopy.stub', 'imagecopymerge' => 'stubs/ext/gd/imagecopymerge.stub', 'imagecopymergegray' => 'stubs/ext/gd/imagecopymergegray.stub', 'imagecopyresampled' => 'stubs/ext/gd/imagecopyresampled.stub', 'imagecopyresized' => 'stubs/ext/gd/imagecopyresized.stub', 'imagecreate' => 'stubs/ext/gd/imagecreate.stub', 'imagecreatefrombmp' => 'stubs/ext/gd/imagecreatefrombmp.stub', 'imagecreatefromgd' => 'stubs/ext/gd/imagecreatefromgd.stub', 'imagecreatefromgd2' => 'stubs/ext/gd/imagecreatefromgd2.stub', 'imagecreatefromgd2part' => 'stubs/ext/gd/imagecreatefromgd2part.stub', 'imagecreatefromgif' => 'stubs/ext/gd/imagecreatefromgif.stub', 'imagecreatefromjpeg' => 'stubs/ext/gd/imagecreatefromjpeg.stub', 'imagecreatefrompng' => 'stubs/ext/gd/imagecreatefrompng.stub', 'imagecreatefromstring' => 'stubs/ext/gd/imagecreatefromstring.stub', 'imagecreatefromtga' => 'stubs/ext/gd/imagecreatefromtga.stub', 'imagecreatefromwbmp' => 'stubs/ext/gd/imagecreatefromwbmp.stub', 'imagecreatefromwebp' => 'stubs/ext/gd/imagecreatefromwebp.stub', 'imagecreatefromxbm' => 'stubs/ext/gd/imagecreatefromxbm.stub', 'imagecreatefromxpm' => 'stubs/ext/gd/imagecreatefromxpm.stub', 'imagecreatetruecolor' => 'stubs/ext/gd/imagecreatetruecolor.stub', 'imagecrop' => 'stubs/ext/gd/imagecrop.stub', 'imagecropauto' => 'stubs/ext/gd/imagecropauto.stub', 'imagedashedline' => 'stubs/ext/gd/imagedashedline.stub', 'imagedestroy' => 'stubs/ext/gd/imagedestroy.stub', 'imageellipse' => 'stubs/ext/gd/imageellipse.stub', 'imagefill' => 'stubs/ext/gd/imagefill.stub', 'imagefilledarc' => 'stubs/ext/gd/imagefilledarc.stub', 'imagefilledellipse' => 'stubs/ext/gd/imagefilledellipse.stub', 'imagefilledpolygon' => 'stubs/ext/gd/imagefilledpolygon.stub', 'imagefilledrectangle' => 'stubs/ext/gd/imagefilledrectangle.stub', 'imagefilltoborder' => 'stubs/ext/gd/imagefilltoborder.stub', 'imagefilter' => 'stubs/ext/gd/imagefilter.stub', 'imageflip' => 'stubs/ext/gd/imageflip.stub', 'imagefontheight' => 'stubs/ext/gd/imagefontheight.stub', 'imagefontwidth' => 'stubs/ext/gd/imagefontwidth.stub', 'imageftbbox' => 'stubs/ext/gd/imageftbbox.stub', 'imagefttext' => 'stubs/ext/gd/imagefttext.stub', 'imagegammacorrect' => 'stubs/ext/gd/imagegammacorrect.stub', 'imagegd' => 'stubs/ext/gd/imagegd.stub', 'imagegd2' => 'stubs/ext/gd/imagegd2.stub', 'imagegetclip' => 'stubs/ext/gd/imagegetclip.stub', 'imagegetinterpolation' => 'stubs/ext/gd/imagegetinterpolation.stub', 'imagegif' => 'stubs/ext/gd/imagegif.stub', 'imagegrabscreen' => 'stubs/ext/gd/imagegrabscreen.stub', 'imagegrabwindow' => 'stubs/ext/gd/imagegrabwindow.stub', 'imageinterlace' => 'stubs/ext/gd/imageinterlace.stub', 'imageistruecolor' => 'stubs/ext/gd/imageistruecolor.stub', 'imagejpeg' => 'stubs/ext/gd/imagejpeg.stub', 'imagelayereffect' => 'stubs/ext/gd/imagelayereffect.stub', 'imageline' => 'stubs/ext/gd/imageline.stub', 'imageloadfont' => 'stubs/ext/gd/imageloadfont.stub', 'imageopenpolygon' => 'stubs/ext/gd/imageopenpolygon.stub', 'imagepalettecopy' => 'stubs/ext/gd/imagepalettecopy.stub', 'imagepalettetotruecolor' => 'stubs/ext/gd/imagepalettetotruecolor.stub', 'imagepng' => 'stubs/ext/gd/imagepng.stub', 'imagepolygon' => 'stubs/ext/gd/imagepolygon.stub', 'imagerectangle' => 'stubs/ext/gd/imagerectangle.stub', 'imageresolution' => 'stubs/ext/gd/imageresolution.stub', 'imagerotate' => 'stubs/ext/gd/imagerotate.stub', 'imagesavealpha' => 'stubs/ext/gd/imagesavealpha.stub', 'imagescale' => 'stubs/ext/gd/imagescale.stub', 'imagesetbrush' => 'stubs/ext/gd/imagesetbrush.stub', 'imagesetclip' => 'stubs/ext/gd/imagesetclip.stub', 'imagesetinterpolation' => 'stubs/ext/gd/imagesetinterpolation.stub', 'imagesetpixel' => 'stubs/ext/gd/imagesetpixel.stub', 'imagesetstyle' => 'stubs/ext/gd/imagesetstyle.stub', 'imagesetthickness' => 'stubs/ext/gd/imagesetthickness.stub', 'imagesettile' => 'stubs/ext/gd/imagesettile.stub', 'imagestring' => 'stubs/ext/gd/imagestring.stub', 'imagestringup' => 'stubs/ext/gd/imagestringup.stub', 'imagesx' => 'stubs/ext/gd/imagesx.stub', 'imagesy' => 'stubs/ext/gd/imagesy.stub', 'imagetruecolortopalette' => 'stubs/ext/gd/imagetruecolortopalette.stub', 'imagettfbbox' => 'stubs/ext/gd/imagettfbbox.stub', 'imagettftext' => 'stubs/ext/gd/imagettftext.stub', 'imagetypes' => 'stubs/ext/gd/imagetypes.stub', 'imagewbmp' => 'stubs/ext/gd/imagewbmp.stub', 'imagewebp' => 'stubs/ext/gd/imagewebp.stub', 'imagexbm' => 'stubs/ext/gd/imagexbm.stub', 'imap_8bit' => 'stubs/ext/imap/imap_8bit.stub', 'imap_alerts' => 'stubs/ext/imap/imap_alerts.stub', 'imap_append' => 'stubs/ext/imap/imap_append.stub', 'imap_base64' => 'stubs/ext/imap/imap_base64.stub', 'imap_binary' => 'stubs/ext/imap/imap_binary.stub', 'imap_body' => 'stubs/ext/imap/imap_body.stub', 'imap_bodystruct' => 'stubs/ext/imap/imap_bodystruct.stub', 'imap_check' => 'stubs/ext/imap/imap_check.stub', 'imap_clearflag_full' => 'stubs/ext/imap/imap_clearflag_full.stub', 'imap_close' => 'stubs/ext/imap/imap_close.stub', 'imap_create' => 'stubs/ext/imap/imap_create.stub', 'imap_createmailbox' => 'stubs/ext/imap/imap_createmailbox.stub', 'imap_delete' => 'stubs/ext/imap/imap_delete.stub', 'imap_deletemailbox' => 'stubs/ext/imap/imap_deletemailbox.stub', 'imap_errors' => 'stubs/ext/imap/imap_errors.stub', 'imap_expunge' => 'stubs/ext/imap/imap_expunge.stub', 'imap_fetch_overview' => 'stubs/ext/imap/imap_fetch_overview.stub', 'imap_fetchbody' => 'stubs/ext/imap/imap_fetchbody.stub', 'imap_fetchheader' => 'stubs/ext/imap/imap_fetchheader.stub', 'imap_fetchmime' => 'stubs/ext/imap/imap_fetchmime.stub', 'imap_fetchstructure' => 'stubs/ext/imap/imap_fetchstructure.stub', 'imap_fetchtext' => 'stubs/ext/imap/imap_fetchtext.stub', 'imap_gc' => 'stubs/ext/imap/imap_gc.stub', 'imap_get_quota' => 'stubs/ext/imap/imap_get_quota.stub', 'imap_get_quotaroot' => 'stubs/ext/imap/imap_get_quotaroot.stub', 'imap_getacl' => 'stubs/ext/imap/imap_getacl.stub', 'imap_getmailboxes' => 'stubs/ext/imap/imap_getmailboxes.stub', 'imap_getsubscribed' => 'stubs/ext/imap/imap_getsubscribed.stub', 'imap_headerinfo' => 'stubs/ext/imap/imap_headerinfo.stub', 'imap_headers' => 'stubs/ext/imap/imap_headers.stub', 'imap_last_error' => 'stubs/ext/imap/imap_last_error.stub', 'imap_list' => 'stubs/ext/imap/imap_list.stub', 'imap_listmailbox' => 'stubs/ext/imap/imap_listmailbox.stub', 'imap_listscan' => 'stubs/ext/imap/imap_listscan.stub', 'imap_listsubscribed' => 'stubs/ext/imap/imap_listsubscribed.stub', 'imap_lsub' => 'stubs/ext/imap/imap_lsub.stub', 'imap_mail' => 'stubs/ext/imap/imap_mail.stub', 'imap_mail_compose' => 'stubs/ext/imap/imap_mail_compose.stub', 'imap_mail_copy' => 'stubs/ext/imap/imap_mail_copy.stub', 'imap_mail_move' => 'stubs/ext/imap/imap_mail_move.stub', 'imap_mailboxmsginfo' => 'stubs/ext/imap/imap_mailboxmsginfo.stub', 'imap_mime_header_decode' => 'stubs/ext/imap/imap_mime_header_decode.stub', 'imap_msgno' => 'stubs/ext/imap/imap_msgno.stub', 'imap_mutf7_to_utf8' => 'stubs/ext/imap/imap_mutf7_to_utf8.stub', 'imap_num_msg' => 'stubs/ext/imap/imap_num_msg.stub', 'imap_num_recent' => 'stubs/ext/imap/imap_num_recent.stub', 'imap_open' => 'stubs/ext/imap/imap_open.stub', 'imap_ping' => 'stubs/ext/imap/imap_ping.stub', 'imap_qprint' => 'stubs/ext/imap/imap_qprint.stub', 'imap_rename' => 'stubs/ext/imap/imap_rename.stub', 'imap_renamemailbox' => 'stubs/ext/imap/imap_renamemailbox.stub', 'imap_reopen' => 'stubs/ext/imap/imap_reopen.stub', 'imap_rfc822_parse_adrlist' => 'stubs/ext/imap/imap_rfc822_parse_adrlist.stub', 'imap_rfc822_parse_headers' => 'stubs/ext/imap/imap_rfc822_parse_headers.stub', 'imap_rfc822_write_address' => 'stubs/ext/imap/imap_rfc822_write_address.stub', 'imap_savebody' => 'stubs/ext/imap/imap_savebody.stub', 'imap_scan' => 'stubs/ext/imap/imap_scan.stub', 'imap_scanmailbox' => 'stubs/ext/imap/imap_scanmailbox.stub', 'imap_search' => 'stubs/ext/imap/imap_search.stub', 'imap_set_quota' => 'stubs/ext/imap/imap_set_quota.stub', 'imap_setacl' => 'stubs/ext/imap/imap_setacl.stub', 'imap_setflag_full' => 'stubs/ext/imap/imap_setflag_full.stub', 'imap_sort' => 'stubs/ext/imap/imap_sort.stub', 'imap_status' => 'stubs/ext/imap/imap_status.stub', 'imap_subscribe' => 'stubs/ext/imap/imap_subscribe.stub', 'imap_thread' => 'stubs/ext/imap/imap_thread.stub', 'imap_timeout' => 'stubs/ext/imap/imap_timeout.stub', 'imap_uid' => 'stubs/ext/imap/imap_uid.stub', 'imap_undelete' => 'stubs/ext/imap/imap_undelete.stub', 'imap_unsubscribe' => 'stubs/ext/imap/imap_unsubscribe.stub', 'imap_utf7_decode' => 'stubs/ext/imap/imap_utf7_decode.stub', 'imap_utf7_encode' => 'stubs/ext/imap/imap_utf7_encode.stub', 'imap_utf8' => 'stubs/ext/imap/imap_utf8.stub', 'imap_utf8_to_mutf7' => 'stubs/ext/imap/imap_utf8_to_mutf7.stub', 'implode' => 'stubs/ext/standard/implode.stub', 'in_array' => 'stubs/ext/standard/in_array.stub', 'inet_ntop' => 'stubs/ext/standard/inet_ntop.stub', 'inet_pton' => 'stubs/ext/standard/inet_pton.stub', 'inflate_add' => 'stubs/ext/zlib/inflate_add.stub', 'inflate_get_read_len' => 'stubs/ext/zlib/inflate_get_read_len.stub', 'inflate_get_status' => 'stubs/ext/zlib/inflate_get_status.stub', 'inflate_init' => 'stubs/ext/zlib/inflate_init.stub', 'ini_alter' => 'stubs/ext/standard/ini_alter.stub', 'ini_get' => 'stubs/ext/standard/ini_get.stub', 'ini_get_all' => 'stubs/ext/standard/ini_get_all.stub', 'ini_restore' => 'stubs/ext/standard/ini_restore.stub', 'ini_set' => 'stubs/ext/standard/ini_set.stub', 'intdiv' => 'stubs/ext/standard/intdiv.stub', 'interface_exists' => 'stubs/Zend/interface_exists.stub', 'intl_error_name' => 'stubs/ext/intl/intl_error_name.stub', 'intl_get_error_code' => 'stubs/ext/intl/intl_get_error_code.stub', 'intl_get_error_message' => 'stubs/ext/intl/intl_get_error_message.stub', 'intl_is_failure' => 'stubs/ext/intl/intl_is_failure.stub', 'intlcal_add' => 'stubs/ext/intl/intlcal_add.stub', 'intlcal_after' => 'stubs/ext/intl/intlcal_after.stub', 'intlcal_before' => 'stubs/ext/intl/intlcal_before.stub', 'intlcal_clear' => 'stubs/ext/intl/intlcal_clear.stub', 'intlcal_create_instance' => 'stubs/ext/intl/intlcal_create_instance.stub', 'intlcal_equals' => 'stubs/ext/intl/intlcal_equals.stub', 'intlcal_field_difference' => 'stubs/ext/intl/intlcal_field_difference.stub', 'intlcal_from_date_time' => 'stubs/ext/intl/intlcal_from_date_time.stub', 'intlcal_get' => 'stubs/ext/intl/intlcal_get.stub', 'intlcal_get_actual_maximum' => 'stubs/ext/intl/intlcal_get_actual_maximum.stub', 'intlcal_get_actual_minimum' => 'stubs/ext/intl/intlcal_get_actual_minimum.stub', 'intlcal_get_available_locales' => 'stubs/ext/intl/intlcal_get_available_locales.stub', 'intlcal_get_day_of_week_type' => 'stubs/ext/intl/intlcal_get_day_of_week_type.stub', 'intlcal_get_error_code' => 'stubs/ext/intl/intlcal_get_error_code.stub', 'intlcal_get_error_message' => 'stubs/ext/intl/intlcal_get_error_message.stub', 'intlcal_get_first_day_of_week' => 'stubs/ext/intl/intlcal_get_first_day_of_week.stub', 'intlcal_get_greatest_minimum' => 'stubs/ext/intl/intlcal_get_greatest_minimum.stub', 'intlcal_get_keyword_values_for_locale' => 'stubs/ext/intl/intlcal_get_keyword_values_for_locale.stub', 'intlcal_get_least_maximum' => 'stubs/ext/intl/intlcal_get_least_maximum.stub', 'intlcal_get_locale' => 'stubs/ext/intl/intlcal_get_locale.stub', 'intlcal_get_maximum' => 'stubs/ext/intl/intlcal_get_maximum.stub', 'intlcal_get_minimal_days_in_first_week' => 'stubs/ext/intl/intlcal_get_minimal_days_in_first_week.stub', 'intlcal_get_minimum' => 'stubs/ext/intl/intlcal_get_minimum.stub', 'intlcal_get_now' => 'stubs/ext/intl/intlcal_get_now.stub', 'intlcal_get_repeated_wall_time_option' => 'stubs/ext/intl/intlcal_get_repeated_wall_time_option.stub', 'intlcal_get_skipped_wall_time_option' => 'stubs/ext/intl/intlcal_get_skipped_wall_time_option.stub', 'intlcal_get_time' => 'stubs/ext/intl/intlcal_get_time.stub', 'intlcal_get_time_zone' => 'stubs/ext/intl/intlcal_get_time_zone.stub', 'intlcal_get_type' => 'stubs/ext/intl/intlcal_get_type.stub', 'intlcal_get_weekend_transition' => 'stubs/ext/intl/intlcal_get_weekend_transition.stub', 'intlcal_in_daylight_time' => 'stubs/ext/intl/intlcal_in_daylight_time.stub', 'intlcal_is_equivalent_to' => 'stubs/ext/intl/intlcal_is_equivalent_to.stub', 'intlcal_is_lenient' => 'stubs/ext/intl/intlcal_is_lenient.stub', 'intlcal_is_set' => 'stubs/ext/intl/intlcal_is_set.stub', 'intlcal_is_weekend' => 'stubs/ext/intl/intlcal_is_weekend.stub', 'intlcal_roll' => 'stubs/ext/intl/intlcal_roll.stub', 'intlcal_set' => 'stubs/ext/intl/intlcal_set.stub', 'intlcal_set_first_day_of_week' => 'stubs/ext/intl/intlcal_set_first_day_of_week.stub', 'intlcal_set_lenient' => 'stubs/ext/intl/intlcal_set_lenient.stub', 'intlcal_set_minimal_days_in_first_week' => 'stubs/ext/intl/intlcal_set_minimal_days_in_first_week.stub', 'intlcal_set_repeated_wall_time_option' => 'stubs/ext/intl/intlcal_set_repeated_wall_time_option.stub', 'intlcal_set_skipped_wall_time_option' => 'stubs/ext/intl/intlcal_set_skipped_wall_time_option.stub', 'intlcal_set_time' => 'stubs/ext/intl/intlcal_set_time.stub', 'intlcal_set_time_zone' => 'stubs/ext/intl/intlcal_set_time_zone.stub', 'intlcal_to_date_time' => 'stubs/ext/intl/intlcal_to_date_time.stub', 'intlgregcal_create_instance' => 'stubs/ext/intl/intlgregcal_create_instance.stub', 'intlgregcal_get_gregorian_change' => 'stubs/ext/intl/intlgregcal_get_gregorian_change.stub', 'intlgregcal_is_leap_year' => 'stubs/ext/intl/intlgregcal_is_leap_year.stub', 'intlgregcal_set_gregorian_change' => 'stubs/ext/intl/intlgregcal_set_gregorian_change.stub', 'intltz_count_equivalent_ids' => 'stubs/ext/intl/intltz_count_equivalent_ids.stub', 'intltz_create_default' => 'stubs/ext/intl/intltz_create_default.stub', 'intltz_create_enumeration' => 'stubs/ext/intl/intltz_create_enumeration.stub', 'intltz_create_time_zone' => 'stubs/ext/intl/intltz_create_time_zone.stub', 'intltz_create_time_zone_id_enumeration' => 'stubs/ext/intl/intltz_create_time_zone_id_enumeration.stub', 'intltz_from_date_time_zone' => 'stubs/ext/intl/intltz_from_date_time_zone.stub', 'intltz_get_canonical_id' => 'stubs/ext/intl/intltz_get_canonical_id.stub', 'intltz_get_display_name' => 'stubs/ext/intl/intltz_get_display_name.stub', 'intltz_get_dst_savings' => 'stubs/ext/intl/intltz_get_dst_savings.stub', 'intltz_get_equivalent_id' => 'stubs/ext/intl/intltz_get_equivalent_id.stub', 'intltz_get_error_code' => 'stubs/ext/intl/intltz_get_error_code.stub', 'intltz_get_error_message' => 'stubs/ext/intl/intltz_get_error_message.stub', 'intltz_get_gmt' => 'stubs/ext/intl/intltz_get_gmt.stub', 'intltz_get_id' => 'stubs/ext/intl/intltz_get_id.stub', 'intltz_get_id_for_windows_id' => 'stubs/ext/intl/intltz_get_id_for_windows_id.stub', 'intltz_get_offset' => 'stubs/ext/intl/intltz_get_offset.stub', 'intltz_get_raw_offset' => 'stubs/ext/intl/intltz_get_raw_offset.stub', 'intltz_get_region' => 'stubs/ext/intl/intltz_get_region.stub', 'intltz_get_tz_data_version' => 'stubs/ext/intl/intltz_get_tz_data_version.stub', 'intltz_get_unknown' => 'stubs/ext/intl/intltz_get_unknown.stub', 'intltz_get_windows_id' => 'stubs/ext/intl/intltz_get_windows_id.stub', 'intltz_has_same_rules' => 'stubs/ext/intl/intltz_has_same_rules.stub', 'intltz_to_date_time_zone' => 'stubs/ext/intl/intltz_to_date_time_zone.stub', 'intltz_use_daylight_time' => 'stubs/ext/intl/intltz_use_daylight_time.stub', 'intval' => 'stubs/ext/standard/intval.stub', 'ip2long' => 'stubs/ext/standard/ip2long.stub', 'iptcembed' => 'stubs/ext/standard/iptcembed.stub', 'iptcparse' => 'stubs/ext/standard/iptcparse.stub', 'is_a' => 'stubs/Zend/is_a.stub', 'is_array' => 'stubs/ext/standard/is_array.stub', 'is_bool' => 'stubs/ext/standard/is_bool.stub', 'is_callable' => 'stubs/ext/standard/is_callable.stub', 'is_countable' => 'stubs/ext/standard/is_countable.stub', 'is_dir' => 'stubs/ext/standard/is_dir.stub', 'is_double' => 'stubs/ext/standard/is_double.stub', 'is_executable' => 'stubs/ext/standard/is_executable.stub', 'is_file' => 'stubs/ext/standard/is_file.stub', 'is_finite' => 'stubs/ext/standard/is_finite.stub', 'is_float' => 'stubs/ext/standard/is_float.stub', 'is_infinite' => 'stubs/ext/standard/is_infinite.stub', 'is_int' => 'stubs/ext/standard/is_int.stub', 'is_integer' => 'stubs/ext/standard/is_integer.stub', 'is_iterable' => 'stubs/ext/standard/is_iterable.stub', 'is_link' => 'stubs/ext/standard/is_link.stub', 'is_long' => 'stubs/ext/standard/is_long.stub', 'is_nan' => 'stubs/ext/standard/is_nan.stub', 'is_null' => 'stubs/ext/standard/is_null.stub', 'is_numeric' => 'stubs/ext/standard/is_numeric.stub', 'is_object' => 'stubs/ext/standard/is_object.stub', 'is_readable' => 'stubs/ext/standard/is_readable.stub', 'is_resource' => 'stubs/ext/standard/is_resource.stub', 'is_scalar' => 'stubs/ext/standard/is_scalar.stub', 'is_soap_fault' => 'stubs/ext/soap/is_soap_fault.stub', 'is_string' => 'stubs/ext/standard/is_string.stub', 'is_subclass_of' => 'stubs/Zend/is_subclass_of.stub', 'is_uploaded_file' => 'stubs/ext/standard/is_uploaded_file.stub', 'is_writable' => 'stubs/ext/standard/is_writable.stub', 'is_writeable' => 'stubs/ext/standard/is_writeable.stub', 'iterator_apply' => 'stubs/ext/spl/iterator_apply.stub', 'iterator_count' => 'stubs/ext/spl/iterator_count.stub', 'iterator_to_array' => 'stubs/ext/spl/iterator_to_array.stub', 'jddayofweek' => 'stubs/ext/calendar/jddayofweek.stub', 'jdmonthname' => 'stubs/ext/calendar/jdmonthname.stub', 'jdtofrench' => 'stubs/ext/calendar/jdtofrench.stub', 'jdtogregorian' => 'stubs/ext/calendar/jdtogregorian.stub', 'jdtojewish' => 'stubs/ext/calendar/jdtojewish.stub', 'jdtojulian' => 'stubs/ext/calendar/jdtojulian.stub', 'jdtounix' => 'stubs/ext/calendar/jdtounix.stub', 'jewishtojd' => 'stubs/ext/calendar/jewishtojd.stub', 'join' => 'stubs/ext/standard/join.stub', 'json_decode' => 'stubs/ext/json/json_decode.stub', 'json_encode' => 'stubs/ext/json/json_encode.stub', 'json_last_error' => 'stubs/ext/json/json_last_error.stub', 'json_last_error_msg' => 'stubs/ext/json/json_last_error_msg.stub', 'juliantojd' => 'stubs/ext/calendar/juliantojd.stub', 'key' => 'stubs/ext/standard/key.stub', 'key_exists' => 'stubs/ext/standard/key_exists.stub', 'krsort' => 'stubs/ext/standard/krsort.stub', 'ksort' => 'stubs/ext/standard/ksort.stub', 'lcfirst' => 'stubs/ext/standard/lcfirst.stub', 'lcg_value' => 'stubs/ext/standard/lcg_value.stub', 'lchgrp' => 'stubs/ext/standard/lchgrp.stub', 'lchown' => 'stubs/ext/standard/lchown.stub', 'ldap_8859_to_t61' => 'stubs/ext/ldap/ldap_8859_to_t61.stub', 'ldap_add' => 'stubs/ext/ldap/ldap_add.stub', 'ldap_add_ext' => 'stubs/ext/ldap/ldap_add_ext.stub', 'ldap_bind' => 'stubs/ext/ldap/ldap_bind.stub', 'ldap_bind_ext' => 'stubs/ext/ldap/ldap_bind_ext.stub', 'ldap_close' => 'stubs/ext/ldap/ldap_close.stub', 'ldap_compare' => 'stubs/ext/ldap/ldap_compare.stub', 'ldap_connect' => 'stubs/ext/ldap/ldap_connect.stub', 'ldap_count_entries' => 'stubs/ext/ldap/ldap_count_entries.stub', 'ldap_count_references' => 'stubs/ext/ldap/ldap_count_references.stub', 'ldap_delete' => 'stubs/ext/ldap/ldap_delete.stub', 'ldap_delete_ext' => 'stubs/ext/ldap/ldap_delete_ext.stub', 'ldap_dn2ufn' => 'stubs/ext/ldap/ldap_dn2ufn.stub', 'ldap_err2str' => 'stubs/ext/ldap/ldap_err2str.stub', 'ldap_errno' => 'stubs/ext/ldap/ldap_errno.stub', 'ldap_error' => 'stubs/ext/ldap/ldap_error.stub', 'ldap_escape' => 'stubs/ext/ldap/ldap_escape.stub', 'ldap_exop' => 'stubs/ext/ldap/ldap_exop.stub', 'ldap_exop_passwd' => 'stubs/ext/ldap/ldap_exop_passwd.stub', 'ldap_exop_refresh' => 'stubs/ext/ldap/ldap_exop_refresh.stub', 'ldap_exop_whoami' => 'stubs/ext/ldap/ldap_exop_whoami.stub', 'ldap_explode_dn' => 'stubs/ext/ldap/ldap_explode_dn.stub', 'ldap_first_attribute' => 'stubs/ext/ldap/ldap_first_attribute.stub', 'ldap_first_entry' => 'stubs/ext/ldap/ldap_first_entry.stub', 'ldap_first_reference' => 'stubs/ext/ldap/ldap_first_reference.stub', 'ldap_free_result' => 'stubs/ext/ldap/ldap_free_result.stub', 'ldap_get_attributes' => 'stubs/ext/ldap/ldap_get_attributes.stub', 'ldap_get_dn' => 'stubs/ext/ldap/ldap_get_dn.stub', 'ldap_get_entries' => 'stubs/ext/ldap/ldap_get_entries.stub', 'ldap_get_option' => 'stubs/ext/ldap/ldap_get_option.stub', 'ldap_get_values' => 'stubs/ext/ldap/ldap_get_values.stub', 'ldap_get_values_len' => 'stubs/ext/ldap/ldap_get_values_len.stub', 'ldap_list' => 'stubs/ext/ldap/ldap_list.stub', 'ldap_mod_add' => 'stubs/ext/ldap/ldap_mod_add.stub', 'ldap_mod_add_ext' => 'stubs/ext/ldap/ldap_mod_add_ext.stub', 'ldap_mod_del' => 'stubs/ext/ldap/ldap_mod_del.stub', 'ldap_mod_del_ext' => 'stubs/ext/ldap/ldap_mod_del_ext.stub', 'ldap_mod_replace' => 'stubs/ext/ldap/ldap_mod_replace.stub', 'ldap_mod_replace_ext' => 'stubs/ext/ldap/ldap_mod_replace_ext.stub', 'ldap_modify' => 'stubs/ext/ldap/ldap_modify.stub', 'ldap_modify_batch' => 'stubs/ext/ldap/ldap_modify_batch.stub', 'ldap_next_attribute' => 'stubs/ext/ldap/ldap_next_attribute.stub', 'ldap_next_entry' => 'stubs/ext/ldap/ldap_next_entry.stub', 'ldap_next_reference' => 'stubs/ext/ldap/ldap_next_reference.stub', 'ldap_parse_exop' => 'stubs/ext/ldap/ldap_parse_exop.stub', 'ldap_parse_reference' => 'stubs/ext/ldap/ldap_parse_reference.stub', 'ldap_parse_result' => 'stubs/ext/ldap/ldap_parse_result.stub', 'ldap_read' => 'stubs/ext/ldap/ldap_read.stub', 'ldap_rename' => 'stubs/ext/ldap/ldap_rename.stub', 'ldap_rename_ext' => 'stubs/ext/ldap/ldap_rename_ext.stub', 'ldap_sasl_bind' => 'stubs/ext/ldap/ldap_sasl_bind.stub', 'ldap_search' => 'stubs/ext/ldap/ldap_search.stub', 'ldap_set_option' => 'stubs/ext/ldap/ldap_set_option.stub', 'ldap_set_rebind_proc' => 'stubs/ext/ldap/ldap_set_rebind_proc.stub', 'ldap_start_tls' => 'stubs/ext/ldap/ldap_start_tls.stub', 'ldap_t61_to_8859' => 'stubs/ext/ldap/ldap_t61_to_8859.stub', 'ldap_unbind' => 'stubs/ext/ldap/ldap_unbind.stub', 'levenshtein' => 'stubs/ext/standard/levenshtein.stub', 'libxml_clear_errors' => 'stubs/ext/libxml/libxml_clear_errors.stub', 'libxml_disable_entity_loader' => 'stubs/ext/libxml/libxml_disable_entity_loader.stub', 'libxml_get_errors' => 'stubs/ext/libxml/libxml_get_errors.stub', 'libxml_get_last_error' => 'stubs/ext/libxml/libxml_get_last_error.stub', 'libxml_set_external_entity_loader' => 'stubs/ext/libxml/libxml_set_external_entity_loader.stub', 'libxml_set_streams_context' => 'stubs/ext/libxml/libxml_set_streams_context.stub', 'libxml_use_internal_errors' => 'stubs/ext/libxml/libxml_use_internal_errors.stub', 'link' => 'stubs/ext/standard/link.stub', 'linkinfo' => 'stubs/ext/standard/linkinfo.stub', 'litespeed_finish_request' => 'stubs/sapi/litespeed/litespeed_finish_request.stub', 'litespeed_request_headers' => 'stubs/sapi/litespeed/litespeed_request_headers.stub', 'litespeed_response_headers' => 'stubs/sapi/litespeed/litespeed_response_headers.stub', 'locale_accept_from_http' => 'stubs/ext/intl/locale_accept_from_http.stub', 'locale_canonicalize' => 'stubs/ext/intl/locale_canonicalize.stub', 'locale_compose' => 'stubs/ext/intl/locale_compose.stub', 'locale_filter_matches' => 'stubs/ext/intl/locale_filter_matches.stub', 'locale_get_all_variants' => 'stubs/ext/intl/locale_get_all_variants.stub', 'locale_get_default' => 'stubs/ext/intl/locale_get_default.stub', 'locale_get_display_language' => 'stubs/ext/intl/locale_get_display_language.stub', 'locale_get_display_name' => 'stubs/ext/intl/locale_get_display_name.stub', 'locale_get_display_region' => 'stubs/ext/intl/locale_get_display_region.stub', 'locale_get_display_script' => 'stubs/ext/intl/locale_get_display_script.stub', 'locale_get_display_variant' => 'stubs/ext/intl/locale_get_display_variant.stub', 'locale_get_keywords' => 'stubs/ext/intl/locale_get_keywords.stub', 'locale_get_primary_language' => 'stubs/ext/intl/locale_get_primary_language.stub', 'locale_get_region' => 'stubs/ext/intl/locale_get_region.stub', 'locale_get_script' => 'stubs/ext/intl/locale_get_script.stub', 'locale_lookup' => 'stubs/ext/intl/locale_lookup.stub', 'locale_parse' => 'stubs/ext/intl/locale_parse.stub', 'locale_set_default' => 'stubs/ext/intl/locale_set_default.stub', 'localeconv' => 'stubs/ext/standard/localeconv.stub', 'localtime' => 'stubs/ext/date/localtime.stub', 'log' => 'stubs/ext/standard/log.stub', 'log10' => 'stubs/ext/standard/log10.stub', 'log1p' => 'stubs/ext/standard/log1p.stub', 'long2ip' => 'stubs/ext/standard/long2ip.stub', 'lstat' => 'stubs/ext/standard/lstat.stub', 'ltrim' => 'stubs/ext/standard/ltrim.stub', 'mail' => 'stubs/ext/standard/mail.stub', 'max' => 'stubs/ext/standard/max.stub', 'mb_check_encoding' => 'stubs/ext/mbstring/mb_check_encoding.stub', 'mb_chr' => 'stubs/ext/mbstring/mb_chr.stub', 'mb_convert_case' => 'stubs/ext/mbstring/mb_convert_case.stub', 'mb_convert_encoding' => 'stubs/ext/mbstring/mb_convert_encoding.stub', 'mb_convert_kana' => 'stubs/ext/mbstring/mb_convert_kana.stub', 'mb_convert_variables' => 'stubs/ext/mbstring/mb_convert_variables.stub', 'mb_decode_mimeheader' => 'stubs/ext/mbstring/mb_decode_mimeheader.stub', 'mb_decode_numericentity' => 'stubs/ext/mbstring/mb_decode_numericentity.stub', 'mb_detect_encoding' => 'stubs/ext/mbstring/mb_detect_encoding.stub', 'mb_detect_order' => 'stubs/ext/mbstring/mb_detect_order.stub', 'mb_encode_mimeheader' => 'stubs/ext/mbstring/mb_encode_mimeheader.stub', 'mb_encode_numericentity' => 'stubs/ext/mbstring/mb_encode_numericentity.stub', 'mb_encoding_aliases' => 'stubs/ext/mbstring/mb_encoding_aliases.stub', 'mb_ereg' => 'stubs/ext/mbstring/mb_ereg.stub', 'mb_ereg_match' => 'stubs/ext/mbstring/mb_ereg_match.stub', 'mb_ereg_replace' => 'stubs/ext/mbstring/mb_ereg_replace.stub', 'mb_ereg_replace_callback' => 'stubs/ext/mbstring/mb_ereg_replace_callback.stub', 'mb_ereg_search' => 'stubs/ext/mbstring/mb_ereg_search.stub', 'mb_ereg_search_getpos' => 'stubs/ext/mbstring/mb_ereg_search_getpos.stub', 'mb_ereg_search_getregs' => 'stubs/ext/mbstring/mb_ereg_search_getregs.stub', 'mb_ereg_search_init' => 'stubs/ext/mbstring/mb_ereg_search_init.stub', 'mb_ereg_search_pos' => 'stubs/ext/mbstring/mb_ereg_search_pos.stub', 'mb_ereg_search_regs' => 'stubs/ext/mbstring/mb_ereg_search_regs.stub', 'mb_ereg_search_setpos' => 'stubs/ext/mbstring/mb_ereg_search_setpos.stub', 'mb_eregi' => 'stubs/ext/mbstring/mb_eregi.stub', 'mb_eregi_replace' => 'stubs/ext/mbstring/mb_eregi_replace.stub', 'mb_get_info' => 'stubs/ext/mbstring/mb_get_info.stub', 'mb_http_input' => 'stubs/ext/mbstring/mb_http_input.stub', 'mb_http_output' => 'stubs/ext/mbstring/mb_http_output.stub', 'mb_internal_encoding' => 'stubs/ext/mbstring/mb_internal_encoding.stub', 'mb_language' => 'stubs/ext/mbstring/mb_language.stub', 'mb_list_encodings' => 'stubs/ext/mbstring/mb_list_encodings.stub', 'mb_ord' => 'stubs/ext/mbstring/mb_ord.stub', 'mb_output_handler' => 'stubs/ext/mbstring/mb_output_handler.stub', 'mb_parse_str' => 'stubs/ext/mbstring/mb_parse_str.stub', 'mb_preferred_mime_name' => 'stubs/ext/mbstring/mb_preferred_mime_name.stub', 'mb_regex_encoding' => 'stubs/ext/mbstring/mb_regex_encoding.stub', 'mb_regex_set_options' => 'stubs/ext/mbstring/mb_regex_set_options.stub', 'mb_scrub' => 'stubs/ext/mbstring/mb_scrub.stub', 'mb_send_mail' => 'stubs/ext/mbstring/mb_send_mail.stub', 'mb_split' => 'stubs/ext/mbstring/mb_split.stub', 'mb_str_split' => 'stubs/ext/mbstring/mb_str_split.stub', 'mb_strcut' => 'stubs/ext/mbstring/mb_strcut.stub', 'mb_strimwidth' => 'stubs/ext/mbstring/mb_strimwidth.stub', 'mb_stripos' => 'stubs/ext/mbstring/mb_stripos.stub', 'mb_stristr' => 'stubs/ext/mbstring/mb_stristr.stub', 'mb_strlen' => 'stubs/ext/mbstring/mb_strlen.stub', 'mb_strpos' => 'stubs/ext/mbstring/mb_strpos.stub', 'mb_strrchr' => 'stubs/ext/mbstring/mb_strrchr.stub', 'mb_strrichr' => 'stubs/ext/mbstring/mb_strrichr.stub', 'mb_strripos' => 'stubs/ext/mbstring/mb_strripos.stub', 'mb_strrpos' => 'stubs/ext/mbstring/mb_strrpos.stub', 'mb_strstr' => 'stubs/ext/mbstring/mb_strstr.stub', 'mb_strtolower' => 'stubs/ext/mbstring/mb_strtolower.stub', 'mb_strtoupper' => 'stubs/ext/mbstring/mb_strtoupper.stub', 'mb_strwidth' => 'stubs/ext/mbstring/mb_strwidth.stub', 'mb_substitute_character' => 'stubs/ext/mbstring/mb_substitute_character.stub', 'mb_substr' => 'stubs/ext/mbstring/mb_substr.stub', 'mb_substr_count' => 'stubs/ext/mbstring/mb_substr_count.stub', 'md5' => 'stubs/ext/standard/md5.stub', 'md5_file' => 'stubs/ext/standard/md5_file.stub', 'memory_get_peak_usage' => 'stubs/ext/standard/memory_get_peak_usage.stub', 'memory_get_usage' => 'stubs/ext/standard/memory_get_usage.stub', 'metaphone' => 'stubs/ext/standard/metaphone.stub', 'method_exists' => 'stubs/Zend/method_exists.stub', 'mhash' => 'stubs/ext/hash/mhash.stub', 'mhash_count' => 'stubs/ext/hash/mhash_count.stub', 'mhash_get_block_size' => 'stubs/ext/hash/mhash_get_block_size.stub', 'mhash_get_hash_name' => 'stubs/ext/hash/mhash_get_hash_name.stub', 'mhash_keygen_s2k' => 'stubs/ext/hash/mhash_keygen_s2k.stub', 'microtime' => 'stubs/ext/standard/microtime.stub', 'mime_content_type' => 'stubs/ext/fileinfo/mime_content_type.stub', 'min' => 'stubs/ext/standard/min.stub', 'mkdir' => 'stubs/ext/standard/mkdir.stub', 'mktime' => 'stubs/ext/date/mktime.stub', 'move_uploaded_file' => 'stubs/ext/standard/move_uploaded_file.stub', 'msg_get_queue' => 'stubs/ext/sysvmsg/msg_get_queue.stub', 'msg_queue_exists' => 'stubs/ext/sysvmsg/msg_queue_exists.stub', 'msg_receive' => 'stubs/ext/sysvmsg/msg_receive.stub', 'msg_remove_queue' => 'stubs/ext/sysvmsg/msg_remove_queue.stub', 'msg_send' => 'stubs/ext/sysvmsg/msg_send.stub', 'msg_set_queue' => 'stubs/ext/sysvmsg/msg_set_queue.stub', 'msg_stat_queue' => 'stubs/ext/sysvmsg/msg_stat_queue.stub', 'msgfmt_create' => 'stubs/ext/intl/msgfmt_create.stub', 'msgfmt_format' => 'stubs/ext/intl/msgfmt_format.stub', 'msgfmt_format_message' => 'stubs/ext/intl/msgfmt_format_message.stub', 'msgfmt_get_error_code' => 'stubs/ext/intl/msgfmt_get_error_code.stub', 'msgfmt_get_error_message' => 'stubs/ext/intl/msgfmt_get_error_message.stub', 'msgfmt_get_locale' => 'stubs/ext/intl/msgfmt_get_locale.stub', 'msgfmt_get_pattern' => 'stubs/ext/intl/msgfmt_get_pattern.stub', 'msgfmt_parse' => 'stubs/ext/intl/msgfmt_parse.stub', 'msgfmt_parse_message' => 'stubs/ext/intl/msgfmt_parse_message.stub', 'msgfmt_set_pattern' => 'stubs/ext/intl/msgfmt_set_pattern.stub', 'mt_getrandmax' => 'stubs/ext/standard/mt_getrandmax.stub', 'mt_rand' => 'stubs/ext/standard/mt_rand.stub', 'mt_srand' => 'stubs/ext/standard/mt_srand.stub', 'mysqli_affected_rows' => 'stubs/ext/mysqli/mysqli_affected_rows.stub', 'mysqli_autocommit' => 'stubs/ext/mysqli/mysqli_autocommit.stub', 'mysqli_begin_transaction' => 'stubs/ext/mysqli/mysqli_begin_transaction.stub', 'mysqli_change_user' => 'stubs/ext/mysqli/mysqli_change_user.stub', 'mysqli_character_set_name' => 'stubs/ext/mysqli/mysqli_character_set_name.stub', 'mysqli_close' => 'stubs/ext/mysqli/mysqli_close.stub', 'mysqli_commit' => 'stubs/ext/mysqli/mysqli_commit.stub', 'mysqli_connect' => 'stubs/ext/mysqli/mysqli_connect.stub', 'mysqli_connect_errno' => 'stubs/ext/mysqli/mysqli_connect_errno.stub', 'mysqli_connect_error' => 'stubs/ext/mysqli/mysqli_connect_error.stub', 'mysqli_data_seek' => 'stubs/ext/mysqli/mysqli_data_seek.stub', 'mysqli_debug' => 'stubs/ext/mysqli/mysqli_debug.stub', 'mysqli_dump_debug_info' => 'stubs/ext/mysqli/mysqli_dump_debug_info.stub', 'mysqli_errno' => 'stubs/ext/mysqli/mysqli_errno.stub', 'mysqli_error' => 'stubs/ext/mysqli/mysqli_error.stub', 'mysqli_error_list' => 'stubs/ext/mysqli/mysqli_error_list.stub', 'mysqli_escape_string' => 'stubs/ext/mysqli/mysqli_escape_string.stub', 'mysqli_execute' => 'stubs/ext/mysqli/mysqli_execute.stub', 'mysqli_fetch_all' => 'stubs/ext/mysqli/mysqli_fetch_all.stub', 'mysqli_fetch_array' => 'stubs/ext/mysqli/mysqli_fetch_array.stub', 'mysqli_fetch_assoc' => 'stubs/ext/mysqli/mysqli_fetch_assoc.stub', 'mysqli_fetch_field' => 'stubs/ext/mysqli/mysqli_fetch_field.stub', 'mysqli_fetch_field_direct' => 'stubs/ext/mysqli/mysqli_fetch_field_direct.stub', 'mysqli_fetch_fields' => 'stubs/ext/mysqli/mysqli_fetch_fields.stub', 'mysqli_fetch_lengths' => 'stubs/ext/mysqli/mysqli_fetch_lengths.stub', 'mysqli_fetch_object' => 'stubs/ext/mysqli/mysqli_fetch_object.stub', 'mysqli_fetch_row' => 'stubs/ext/mysqli/mysqli_fetch_row.stub', 'mysqli_field_count' => 'stubs/ext/mysqli/mysqli_field_count.stub', 'mysqli_field_seek' => 'stubs/ext/mysqli/mysqli_field_seek.stub', 'mysqli_field_tell' => 'stubs/ext/mysqli/mysqli_field_tell.stub', 'mysqli_free_result' => 'stubs/ext/mysqli/mysqli_free_result.stub', 'mysqli_get_charset' => 'stubs/ext/mysqli/mysqli_get_charset.stub', 'mysqli_get_client_info' => 'stubs/ext/mysqli/mysqli_get_client_info.stub', 'mysqli_get_client_stats' => 'stubs/ext/mysqli/mysqli_get_client_stats.stub', 'mysqli_get_client_version' => 'stubs/ext/mysqli/mysqli_get_client_version.stub', 'mysqli_get_connection_stats' => 'stubs/ext/mysqli/mysqli_get_connection_stats.stub', 'mysqli_get_host_info' => 'stubs/ext/mysqli/mysqli_get_host_info.stub', 'mysqli_get_links_stats' => 'stubs/ext/mysqli/mysqli_get_links_stats.stub', 'mysqli_get_proto_info' => 'stubs/ext/mysqli/mysqli_get_proto_info.stub', 'mysqli_get_server_info' => 'stubs/ext/mysqli/mysqli_get_server_info.stub', 'mysqli_get_server_version' => 'stubs/ext/mysqli/mysqli_get_server_version.stub', 'mysqli_get_warnings' => 'stubs/ext/mysqli/mysqli_get_warnings.stub', 'mysqli_info' => 'stubs/ext/mysqli/mysqli_info.stub', 'mysqli_init' => 'stubs/ext/mysqli/mysqli_init.stub', 'mysqli_insert_id' => 'stubs/ext/mysqli/mysqli_insert_id.stub', 'mysqli_kill' => 'stubs/ext/mysqli/mysqli_kill.stub', 'mysqli_more_results' => 'stubs/ext/mysqli/mysqli_more_results.stub', 'mysqli_multi_query' => 'stubs/ext/mysqli/mysqli_multi_query.stub', 'mysqli_next_result' => 'stubs/ext/mysqli/mysqli_next_result.stub', 'mysqli_num_fields' => 'stubs/ext/mysqli/mysqli_num_fields.stub', 'mysqli_num_rows' => 'stubs/ext/mysqli/mysqli_num_rows.stub', 'mysqli_options' => 'stubs/ext/mysqli/mysqli_options.stub', 'mysqli_ping' => 'stubs/ext/mysqli/mysqli_ping.stub', 'mysqli_poll' => 'stubs/ext/mysqli/mysqli_poll.stub', 'mysqli_prepare' => 'stubs/ext/mysqli/mysqli_prepare.stub', 'mysqli_query' => 'stubs/ext/mysqli/mysqli_query.stub', 'mysqli_real_connect' => 'stubs/ext/mysqli/mysqli_real_connect.stub', 'mysqli_real_escape_string' => 'stubs/ext/mysqli/mysqli_real_escape_string.stub', 'mysqli_real_query' => 'stubs/ext/mysqli/mysqli_real_query.stub', 'mysqli_reap_async_query' => 'stubs/ext/mysqli/mysqli_reap_async_query.stub', 'mysqli_refresh' => 'stubs/ext/mysqli/mysqli_refresh.stub', 'mysqli_release_savepoint' => 'stubs/ext/mysqli/mysqli_release_savepoint.stub', 'mysqli_report' => 'stubs/ext/mysqli/mysqli_report.stub', 'mysqli_rollback' => 'stubs/ext/mysqli/mysqli_rollback.stub', 'mysqli_savepoint' => 'stubs/ext/mysqli/mysqli_savepoint.stub', 'mysqli_select_db' => 'stubs/ext/mysqli/mysqli_select_db.stub', 'mysqli_set_charset' => 'stubs/ext/mysqli/mysqli_set_charset.stub', 'mysqli_set_opt' => 'stubs/ext/mysqli/mysqli_set_opt.stub', 'mysqli_sqlstate' => 'stubs/ext/mysqli/mysqli_sqlstate.stub', 'mysqli_ssl_set' => 'stubs/ext/mysqli/mysqli_ssl_set.stub', 'mysqli_stat' => 'stubs/ext/mysqli/mysqli_stat.stub', 'mysqli_stmt_affected_rows' => 'stubs/ext/mysqli/mysqli_stmt_affected_rows.stub', 'mysqli_stmt_attr_get' => 'stubs/ext/mysqli/mysqli_stmt_attr_get.stub', 'mysqli_stmt_attr_set' => 'stubs/ext/mysqli/mysqli_stmt_attr_set.stub', 'mysqli_stmt_bind_param' => 'stubs/ext/mysqli/mysqli_stmt_bind_param.stub', 'mysqli_stmt_bind_result' => 'stubs/ext/mysqli/mysqli_stmt_bind_result.stub', 'mysqli_stmt_close' => 'stubs/ext/mysqli/mysqli_stmt_close.stub', 'mysqli_stmt_data_seek' => 'stubs/ext/mysqli/mysqli_stmt_data_seek.stub', 'mysqli_stmt_errno' => 'stubs/ext/mysqli/mysqli_stmt_errno.stub', 'mysqli_stmt_error' => 'stubs/ext/mysqli/mysqli_stmt_error.stub', 'mysqli_stmt_error_list' => 'stubs/ext/mysqli/mysqli_stmt_error_list.stub', 'mysqli_stmt_execute' => 'stubs/ext/mysqli/mysqli_stmt_execute.stub', 'mysqli_stmt_fetch' => 'stubs/ext/mysqli/mysqli_stmt_fetch.stub', 'mysqli_stmt_field_count' => 'stubs/ext/mysqli/mysqli_stmt_field_count.stub', 'mysqli_stmt_free_result' => 'stubs/ext/mysqli/mysqli_stmt_free_result.stub', 'mysqli_stmt_get_result' => 'stubs/ext/mysqli/mysqli_stmt_get_result.stub', 'mysqli_stmt_get_warnings' => 'stubs/ext/mysqli/mysqli_stmt_get_warnings.stub', 'mysqli_stmt_init' => 'stubs/ext/mysqli/mysqli_stmt_init.stub', 'mysqli_stmt_insert_id' => 'stubs/ext/mysqli/mysqli_stmt_insert_id.stub', 'mysqli_stmt_more_results' => 'stubs/ext/mysqli/mysqli_stmt_more_results.stub', 'mysqli_stmt_next_result' => 'stubs/ext/mysqli/mysqli_stmt_next_result.stub', 'mysqli_stmt_num_rows' => 'stubs/ext/mysqli/mysqli_stmt_num_rows.stub', 'mysqli_stmt_param_count' => 'stubs/ext/mysqli/mysqli_stmt_param_count.stub', 'mysqli_stmt_prepare' => 'stubs/ext/mysqli/mysqli_stmt_prepare.stub', 'mysqli_stmt_reset' => 'stubs/ext/mysqli/mysqli_stmt_reset.stub', 'mysqli_stmt_result_metadata' => 'stubs/ext/mysqli/mysqli_stmt_result_metadata.stub', 'mysqli_stmt_send_long_data' => 'stubs/ext/mysqli/mysqli_stmt_send_long_data.stub', 'mysqli_stmt_sqlstate' => 'stubs/ext/mysqli/mysqli_stmt_sqlstate.stub', 'mysqli_stmt_store_result' => 'stubs/ext/mysqli/mysqli_stmt_store_result.stub', 'mysqli_store_result' => 'stubs/ext/mysqli/mysqli_store_result.stub', 'mysqli_thread_id' => 'stubs/ext/mysqli/mysqli_thread_id.stub', 'mysqli_thread_safe' => 'stubs/ext/mysqli/mysqli_thread_safe.stub', 'mysqli_use_result' => 'stubs/ext/mysqli/mysqli_use_result.stub', 'mysqli_warning_count' => 'stubs/ext/mysqli/mysqli_warning_count.stub', 'natcasesort' => 'stubs/ext/standard/natcasesort.stub', 'natsort' => 'stubs/ext/standard/natsort.stub', 'net_get_interfaces' => 'stubs/ext/standard/net_get_interfaces.stub', 'next' => 'stubs/ext/standard/next.stub', 'ngettext' => 'stubs/ext/gettext/ngettext.stub', 'nl2br' => 'stubs/ext/standard/nl2br.stub', 'nl_langinfo' => 'stubs/ext/standard/nl_langinfo.stub', 'normalizer_get_raw_decomposition' => 'stubs/ext/intl/normalizer_get_raw_decomposition.stub', 'normalizer_is_normalized' => 'stubs/ext/intl/normalizer_is_normalized.stub', 'normalizer_normalize' => 'stubs/ext/intl/normalizer_normalize.stub', 'number_format' => 'stubs/ext/standard/number_format.stub', 'numfmt_create' => 'stubs/ext/intl/numfmt_create.stub', 'numfmt_format' => 'stubs/ext/intl/numfmt_format.stub', 'numfmt_format_currency' => 'stubs/ext/intl/numfmt_format_currency.stub', 'numfmt_get_attribute' => 'stubs/ext/intl/numfmt_get_attribute.stub', 'numfmt_get_error_code' => 'stubs/ext/intl/numfmt_get_error_code.stub', 'numfmt_get_error_message' => 'stubs/ext/intl/numfmt_get_error_message.stub', 'numfmt_get_locale' => 'stubs/ext/intl/numfmt_get_locale.stub', 'numfmt_get_pattern' => 'stubs/ext/intl/numfmt_get_pattern.stub', 'numfmt_get_symbol' => 'stubs/ext/intl/numfmt_get_symbol.stub', 'numfmt_get_text_attribute' => 'stubs/ext/intl/numfmt_get_text_attribute.stub', 'numfmt_parse' => 'stubs/ext/intl/numfmt_parse.stub', 'numfmt_parse_currency' => 'stubs/ext/intl/numfmt_parse_currency.stub', 'numfmt_set_attribute' => 'stubs/ext/intl/numfmt_set_attribute.stub', 'numfmt_set_pattern' => 'stubs/ext/intl/numfmt_set_pattern.stub', 'numfmt_set_symbol' => 'stubs/ext/intl/numfmt_set_symbol.stub', 'numfmt_set_text_attribute' => 'stubs/ext/intl/numfmt_set_text_attribute.stub', 'ob_clean' => 'stubs/ext/standard/ob_clean.stub', 'ob_end_clean' => 'stubs/ext/standard/ob_end_clean.stub', 'ob_end_flush' => 'stubs/ext/standard/ob_end_flush.stub', 'ob_flush' => 'stubs/ext/standard/ob_flush.stub', 'ob_get_clean' => 'stubs/ext/standard/ob_get_clean.stub', 'ob_get_contents' => 'stubs/ext/standard/ob_get_contents.stub', 'ob_get_flush' => 'stubs/ext/standard/ob_get_flush.stub', 'ob_get_length' => 'stubs/ext/standard/ob_get_length.stub', 'ob_get_level' => 'stubs/ext/standard/ob_get_level.stub', 'ob_get_status' => 'stubs/ext/standard/ob_get_status.stub', 'ob_gzhandler' => 'stubs/ext/zlib/ob_gzhandler.stub', 'ob_implicit_flush' => 'stubs/ext/standard/ob_implicit_flush.stub', 'ob_list_handlers' => 'stubs/ext/standard/ob_list_handlers.stub', 'ob_start' => 'stubs/ext/standard/ob_start.stub', 'oci_bind_array_by_name' => 'stubs/ext/oci8/oci_bind_array_by_name.stub', 'oci_bind_by_name' => 'stubs/ext/oci8/oci_bind_by_name.stub', 'oci_cancel' => 'stubs/ext/oci8/oci_cancel.stub', 'oci_client_version' => 'stubs/ext/oci8/oci_client_version.stub', 'oci_close' => 'stubs/ext/oci8/oci_close.stub', 'oci_collection_append' => 'stubs/ext/oci8/oci_collection_append.stub', 'oci_collection_assign' => 'stubs/ext/oci8/oci_collection_assign.stub', 'oci_collection_element_assign' => 'stubs/ext/oci8/oci_collection_element_assign.stub', 'oci_collection_element_get' => 'stubs/ext/oci8/oci_collection_element_get.stub', 'oci_collection_max' => 'stubs/ext/oci8/oci_collection_max.stub', 'oci_collection_size' => 'stubs/ext/oci8/oci_collection_size.stub', 'oci_collection_trim' => 'stubs/ext/oci8/oci_collection_trim.stub', 'oci_commit' => 'stubs/ext/oci8/oci_commit.stub', 'oci_connect' => 'stubs/ext/oci8/oci_connect.stub', 'oci_define_by_name' => 'stubs/ext/oci8/oci_define_by_name.stub', 'oci_error' => 'stubs/ext/oci8/oci_error.stub', 'oci_execute' => 'stubs/ext/oci8/oci_execute.stub', 'oci_fetch' => 'stubs/ext/oci8/oci_fetch.stub', 'oci_fetch_all' => 'stubs/ext/oci8/oci_fetch_all.stub', 'oci_fetch_array' => 'stubs/ext/oci8/oci_fetch_array.stub', 'oci_fetch_assoc' => 'stubs/ext/oci8/oci_fetch_assoc.stub', 'oci_fetch_object' => 'stubs/ext/oci8/oci_fetch_object.stub', 'oci_fetch_row' => 'stubs/ext/oci8/oci_fetch_row.stub', 'oci_field_is_null' => 'stubs/ext/oci8/oci_field_is_null.stub', 'oci_field_name' => 'stubs/ext/oci8/oci_field_name.stub', 'oci_field_precision' => 'stubs/ext/oci8/oci_field_precision.stub', 'oci_field_scale' => 'stubs/ext/oci8/oci_field_scale.stub', 'oci_field_size' => 'stubs/ext/oci8/oci_field_size.stub', 'oci_field_type' => 'stubs/ext/oci8/oci_field_type.stub', 'oci_field_type_raw' => 'stubs/ext/oci8/oci_field_type_raw.stub', 'oci_free_collection' => 'stubs/ext/oci8/oci_free_collection.stub', 'oci_free_cursor' => 'stubs/ext/oci8/oci_free_cursor.stub', 'oci_free_descriptor' => 'stubs/ext/oci8/oci_free_descriptor.stub', 'oci_free_statement' => 'stubs/ext/oci8/oci_free_statement.stub', 'oci_get_implicit_resultset' => 'stubs/ext/oci8/oci_get_implicit_resultset.stub', 'oci_lob_append' => 'stubs/ext/oci8/oci_lob_append.stub', 'oci_lob_copy' => 'stubs/ext/oci8/oci_lob_copy.stub', 'oci_lob_eof' => 'stubs/ext/oci8/oci_lob_eof.stub', 'oci_lob_erase' => 'stubs/ext/oci8/oci_lob_erase.stub', 'oci_lob_export' => 'stubs/ext/oci8/oci_lob_export.stub', 'oci_lob_flush' => 'stubs/ext/oci8/oci_lob_flush.stub', 'oci_lob_import' => 'stubs/ext/oci8/oci_lob_import.stub', 'oci_lob_is_equal' => 'stubs/ext/oci8/oci_lob_is_equal.stub', 'oci_lob_load' => 'stubs/ext/oci8/oci_lob_load.stub', 'oci_lob_read' => 'stubs/ext/oci8/oci_lob_read.stub', 'oci_lob_rewind' => 'stubs/ext/oci8/oci_lob_rewind.stub', 'oci_lob_save' => 'stubs/ext/oci8/oci_lob_save.stub', 'oci_lob_seek' => 'stubs/ext/oci8/oci_lob_seek.stub', 'oci_lob_size' => 'stubs/ext/oci8/oci_lob_size.stub', 'oci_lob_tell' => 'stubs/ext/oci8/oci_lob_tell.stub', 'oci_lob_truncate' => 'stubs/ext/oci8/oci_lob_truncate.stub', 'oci_lob_write' => 'stubs/ext/oci8/oci_lob_write.stub', 'oci_new_collection' => 'stubs/ext/oci8/oci_new_collection.stub', 'oci_new_connect' => 'stubs/ext/oci8/oci_new_connect.stub', 'oci_new_cursor' => 'stubs/ext/oci8/oci_new_cursor.stub', 'oci_new_descriptor' => 'stubs/ext/oci8/oci_new_descriptor.stub', 'oci_num_fields' => 'stubs/ext/oci8/oci_num_fields.stub', 'oci_num_rows' => 'stubs/ext/oci8/oci_num_rows.stub', 'oci_parse' => 'stubs/ext/oci8/oci_parse.stub', 'oci_password_change' => 'stubs/ext/oci8/oci_password_change.stub', 'oci_pconnect' => 'stubs/ext/oci8/oci_pconnect.stub', 'oci_register_taf_callback' => 'stubs/ext/oci8/oci_register_taf_callback.stub', 'oci_result' => 'stubs/ext/oci8/oci_result.stub', 'oci_rollback' => 'stubs/ext/oci8/oci_rollback.stub', 'oci_server_version' => 'stubs/ext/oci8/oci_server_version.stub', 'oci_set_action' => 'stubs/ext/oci8/oci_set_action.stub', 'oci_set_call_timeout' => 'stubs/ext/oci8/oci_set_call_timeout.stub', 'oci_set_client_identifier' => 'stubs/ext/oci8/oci_set_client_identifier.stub', 'oci_set_client_info' => 'stubs/ext/oci8/oci_set_client_info.stub', 'oci_set_db_operation' => 'stubs/ext/oci8/oci_set_db_operation.stub', 'oci_set_edition' => 'stubs/ext/oci8/oci_set_edition.stub', 'oci_set_module_name' => 'stubs/ext/oci8/oci_set_module_name.stub', 'oci_set_prefetch' => 'stubs/ext/oci8/oci_set_prefetch.stub', 'oci_statement_type' => 'stubs/ext/oci8/oci_statement_type.stub', 'oci_unregister_taf_callback' => 'stubs/ext/oci8/oci_unregister_taf_callback.stub', 'ocibindbyname' => 'stubs/ext/oci8/ocibindbyname.stub', 'ocicancel' => 'stubs/ext/oci8/ocicancel.stub', 'ocicollappend' => 'stubs/ext/oci8/ocicollappend.stub', 'ocicollassignelem' => 'stubs/ext/oci8/ocicollassignelem.stub', 'ocicollgetelem' => 'stubs/ext/oci8/ocicollgetelem.stub', 'ocicollmax' => 'stubs/ext/oci8/ocicollmax.stub', 'ocicollsize' => 'stubs/ext/oci8/ocicollsize.stub', 'ocicolltrim' => 'stubs/ext/oci8/ocicolltrim.stub', 'ocicolumnisnull' => 'stubs/ext/oci8/ocicolumnisnull.stub', 'ocicolumnname' => 'stubs/ext/oci8/ocicolumnname.stub', 'ocicolumnprecision' => 'stubs/ext/oci8/ocicolumnprecision.stub', 'ocicolumnscale' => 'stubs/ext/oci8/ocicolumnscale.stub', 'ocicolumnsize' => 'stubs/ext/oci8/ocicolumnsize.stub', 'ocicolumntype' => 'stubs/ext/oci8/ocicolumntype.stub', 'ocicolumntyperaw' => 'stubs/ext/oci8/ocicolumntyperaw.stub', 'ocicommit' => 'stubs/ext/oci8/ocicommit.stub', 'ocidefinebyname' => 'stubs/ext/oci8/ocidefinebyname.stub', 'ocierror' => 'stubs/ext/oci8/ocierror.stub', 'ociexecute' => 'stubs/ext/oci8/ociexecute.stub', 'ocifetch' => 'stubs/ext/oci8/ocifetch.stub', 'ocifetchinto' => 'stubs/ext/oci8/ocifetchinto.stub', 'ocifetchstatement' => 'stubs/ext/oci8/ocifetchstatement.stub', 'ocifreecollection' => 'stubs/ext/oci8/ocifreecollection.stub', 'ocifreecursor' => 'stubs/ext/oci8/ocifreecursor.stub', 'ocifreedesc' => 'stubs/ext/oci8/ocifreedesc.stub', 'ocifreestatement' => 'stubs/ext/oci8/ocifreestatement.stub', 'ocigetbufferinglob' => 'stubs/ext/oci8/ocigetbufferinglob.stub', 'ociloadlob' => 'stubs/ext/oci8/ociloadlob.stub', 'ocilogoff' => 'stubs/ext/oci8/ocilogoff.stub', 'ocilogon' => 'stubs/ext/oci8/ocilogon.stub', 'ocinewcollection' => 'stubs/ext/oci8/ocinewcollection.stub', 'ocinewcursor' => 'stubs/ext/oci8/ocinewcursor.stub', 'ocinewdescriptor' => 'stubs/ext/oci8/ocinewdescriptor.stub', 'ocinlogon' => 'stubs/ext/oci8/ocinlogon.stub', 'ocinumcols' => 'stubs/ext/oci8/ocinumcols.stub', 'ociparse' => 'stubs/ext/oci8/ociparse.stub', 'ocipasswordchange' => 'stubs/ext/oci8/ocipasswordchange.stub', 'ociplogon' => 'stubs/ext/oci8/ociplogon.stub', 'ociresult' => 'stubs/ext/oci8/ociresult.stub', 'ocirollback' => 'stubs/ext/oci8/ocirollback.stub', 'ocirowcount' => 'stubs/ext/oci8/ocirowcount.stub', 'ocisavelob' => 'stubs/ext/oci8/ocisavelob.stub', 'ocisavelobfile' => 'stubs/ext/oci8/ocisavelobfile.stub', 'ociserverversion' => 'stubs/ext/oci8/ociserverversion.stub', 'ocisetbufferinglob' => 'stubs/ext/oci8/ocisetbufferinglob.stub', 'ocisetprefetch' => 'stubs/ext/oci8/ocisetprefetch.stub', 'ocistatementtype' => 'stubs/ext/oci8/ocistatementtype.stub', 'ociwritelobtofile' => 'stubs/ext/oci8/ociwritelobtofile.stub', 'octdec' => 'stubs/ext/standard/octdec.stub', 'odbc_autocommit' => 'stubs/ext/odbc/odbc_autocommit.stub', 'odbc_binmode' => 'stubs/ext/odbc/odbc_binmode.stub', 'odbc_close' => 'stubs/ext/odbc/odbc_close.stub', 'odbc_close_all' => 'stubs/ext/odbc/odbc_close_all.stub', 'odbc_columnprivileges' => 'stubs/ext/odbc/odbc_columnprivileges.stub', 'odbc_columns' => 'stubs/ext/odbc/odbc_columns.stub', 'odbc_commit' => 'stubs/ext/odbc/odbc_commit.stub', 'odbc_connect' => 'stubs/ext/odbc/odbc_connect.stub', 'odbc_cursor' => 'stubs/ext/odbc/odbc_cursor.stub', 'odbc_data_source' => 'stubs/ext/odbc/odbc_data_source.stub', 'odbc_do' => 'stubs/ext/odbc/odbc_do.stub', 'odbc_error' => 'stubs/ext/odbc/odbc_error.stub', 'odbc_errormsg' => 'stubs/ext/odbc/odbc_errormsg.stub', 'odbc_exec' => 'stubs/ext/odbc/odbc_exec.stub', 'odbc_execute' => 'stubs/ext/odbc/odbc_execute.stub', 'odbc_fetch_array' => 'stubs/ext/odbc/odbc_fetch_array.stub', 'odbc_fetch_into' => 'stubs/ext/odbc/odbc_fetch_into.stub', 'odbc_fetch_object' => 'stubs/ext/odbc/odbc_fetch_object.stub', 'odbc_fetch_row' => 'stubs/ext/odbc/odbc_fetch_row.stub', 'odbc_field_len' => 'stubs/ext/odbc/odbc_field_len.stub', 'odbc_field_name' => 'stubs/ext/odbc/odbc_field_name.stub', 'odbc_field_num' => 'stubs/ext/odbc/odbc_field_num.stub', 'odbc_field_precision' => 'stubs/ext/odbc/odbc_field_precision.stub', 'odbc_field_scale' => 'stubs/ext/odbc/odbc_field_scale.stub', 'odbc_field_type' => 'stubs/ext/odbc/odbc_field_type.stub', 'odbc_foreignkeys' => 'stubs/ext/odbc/odbc_foreignkeys.stub', 'odbc_free_result' => 'stubs/ext/odbc/odbc_free_result.stub', 'odbc_gettypeinfo' => 'stubs/ext/odbc/odbc_gettypeinfo.stub', 'odbc_longreadlen' => 'stubs/ext/odbc/odbc_longreadlen.stub', 'odbc_next_result' => 'stubs/ext/odbc/odbc_next_result.stub', 'odbc_num_fields' => 'stubs/ext/odbc/odbc_num_fields.stub', 'odbc_num_rows' => 'stubs/ext/odbc/odbc_num_rows.stub', 'odbc_pconnect' => 'stubs/ext/odbc/odbc_pconnect.stub', 'odbc_prepare' => 'stubs/ext/odbc/odbc_prepare.stub', 'odbc_primarykeys' => 'stubs/ext/odbc/odbc_primarykeys.stub', 'odbc_procedurecolumns' => 'stubs/ext/odbc/odbc_procedurecolumns.stub', 'odbc_procedures' => 'stubs/ext/odbc/odbc_procedures.stub', 'odbc_result' => 'stubs/ext/odbc/odbc_result.stub', 'odbc_result_all' => 'stubs/ext/odbc/odbc_result_all.stub', 'odbc_rollback' => 'stubs/ext/odbc/odbc_rollback.stub', 'odbc_setoption' => 'stubs/ext/odbc/odbc_setoption.stub', 'odbc_specialcolumns' => 'stubs/ext/odbc/odbc_specialcolumns.stub', 'odbc_statistics' => 'stubs/ext/odbc/odbc_statistics.stub', 'odbc_tableprivileges' => 'stubs/ext/odbc/odbc_tableprivileges.stub', 'odbc_tables' => 'stubs/ext/odbc/odbc_tables.stub', 'opcache_compile_file' => 'stubs/ext/opcache/opcache_compile_file.stub', 'opcache_get_configuration' => 'stubs/ext/opcache/opcache_get_configuration.stub', 'opcache_get_status' => 'stubs/ext/opcache/opcache_get_status.stub', 'opcache_invalidate' => 'stubs/ext/opcache/opcache_invalidate.stub', 'opcache_is_script_cached' => 'stubs/ext/opcache/opcache_is_script_cached.stub', 'opcache_reset' => 'stubs/ext/opcache/opcache_reset.stub', 'opendir' => 'stubs/ext/standard/opendir.stub', 'openlog' => 'stubs/ext/standard/openlog.stub', 'openssl_cipher_iv_length' => 'stubs/ext/openssl/openssl_cipher_iv_length.stub', 'openssl_cms_decrypt' => 'stubs/ext/openssl/openssl_cms_decrypt.stub', 'openssl_cms_encrypt' => 'stubs/ext/openssl/openssl_cms_encrypt.stub', 'openssl_cms_read' => 'stubs/ext/openssl/openssl_cms_read.stub', 'openssl_cms_sign' => 'stubs/ext/openssl/openssl_cms_sign.stub', 'openssl_cms_verify' => 'stubs/ext/openssl/openssl_cms_verify.stub', 'openssl_csr_export' => 'stubs/ext/openssl/openssl_csr_export.stub', 'openssl_csr_export_to_file' => 'stubs/ext/openssl/openssl_csr_export_to_file.stub', 'openssl_csr_get_public_key' => 'stubs/ext/openssl/openssl_csr_get_public_key.stub', 'openssl_csr_get_subject' => 'stubs/ext/openssl/openssl_csr_get_subject.stub', 'openssl_csr_new' => 'stubs/ext/openssl/openssl_csr_new.stub', 'openssl_csr_sign' => 'stubs/ext/openssl/openssl_csr_sign.stub', 'openssl_decrypt' => 'stubs/ext/openssl/openssl_decrypt.stub', 'openssl_dh_compute_key' => 'stubs/ext/openssl/openssl_dh_compute_key.stub', 'openssl_digest' => 'stubs/ext/openssl/openssl_digest.stub', 'openssl_encrypt' => 'stubs/ext/openssl/openssl_encrypt.stub', 'openssl_error_string' => 'stubs/ext/openssl/openssl_error_string.stub', 'openssl_free_key' => 'stubs/ext/openssl/openssl_free_key.stub', 'openssl_get_cert_locations' => 'stubs/ext/openssl/openssl_get_cert_locations.stub', 'openssl_get_cipher_methods' => 'stubs/ext/openssl/openssl_get_cipher_methods.stub', 'openssl_get_curve_names' => 'stubs/ext/openssl/openssl_get_curve_names.stub', 'openssl_get_md_methods' => 'stubs/ext/openssl/openssl_get_md_methods.stub', 'openssl_get_privatekey' => 'stubs/ext/openssl/openssl_get_privatekey.stub', 'openssl_get_publickey' => 'stubs/ext/openssl/openssl_get_publickey.stub', 'openssl_open' => 'stubs/ext/openssl/openssl_open.stub', 'openssl_pbkdf2' => 'stubs/ext/openssl/openssl_pbkdf2.stub', 'openssl_pkcs12_export' => 'stubs/ext/openssl/openssl_pkcs12_export.stub', 'openssl_pkcs12_export_to_file' => 'stubs/ext/openssl/openssl_pkcs12_export_to_file.stub', 'openssl_pkcs12_read' => 'stubs/ext/openssl/openssl_pkcs12_read.stub', 'openssl_pkcs7_decrypt' => 'stubs/ext/openssl/openssl_pkcs7_decrypt.stub', 'openssl_pkcs7_encrypt' => 'stubs/ext/openssl/openssl_pkcs7_encrypt.stub', 'openssl_pkcs7_read' => 'stubs/ext/openssl/openssl_pkcs7_read.stub', 'openssl_pkcs7_sign' => 'stubs/ext/openssl/openssl_pkcs7_sign.stub', 'openssl_pkcs7_verify' => 'stubs/ext/openssl/openssl_pkcs7_verify.stub', 'openssl_pkey_derive' => 'stubs/ext/openssl/openssl_pkey_derive.stub', 'openssl_pkey_export' => 'stubs/ext/openssl/openssl_pkey_export.stub', 'openssl_pkey_export_to_file' => 'stubs/ext/openssl/openssl_pkey_export_to_file.stub', 'openssl_pkey_free' => 'stubs/ext/openssl/openssl_pkey_free.stub', 'openssl_pkey_get_details' => 'stubs/ext/openssl/openssl_pkey_get_details.stub', 'openssl_pkey_get_private' => 'stubs/ext/openssl/openssl_pkey_get_private.stub', 'openssl_pkey_get_public' => 'stubs/ext/openssl/openssl_pkey_get_public.stub', 'openssl_pkey_new' => 'stubs/ext/openssl/openssl_pkey_new.stub', 'openssl_private_decrypt' => 'stubs/ext/openssl/openssl_private_decrypt.stub', 'openssl_private_encrypt' => 'stubs/ext/openssl/openssl_private_encrypt.stub', 'openssl_public_decrypt' => 'stubs/ext/openssl/openssl_public_decrypt.stub', 'openssl_public_encrypt' => 'stubs/ext/openssl/openssl_public_encrypt.stub', 'openssl_random_pseudo_bytes' => 'stubs/ext/openssl/openssl_random_pseudo_bytes.stub', 'openssl_seal' => 'stubs/ext/openssl/openssl_seal.stub', 'openssl_sign' => 'stubs/ext/openssl/openssl_sign.stub', 'openssl_spki_export' => 'stubs/ext/openssl/openssl_spki_export.stub', 'openssl_spki_export_challenge' => 'stubs/ext/openssl/openssl_spki_export_challenge.stub', 'openssl_spki_new' => 'stubs/ext/openssl/openssl_spki_new.stub', 'openssl_spki_verify' => 'stubs/ext/openssl/openssl_spki_verify.stub', 'openssl_verify' => 'stubs/ext/openssl/openssl_verify.stub', 'openssl_x509_check_private_key' => 'stubs/ext/openssl/openssl_x509_check_private_key.stub', 'openssl_x509_checkpurpose' => 'stubs/ext/openssl/openssl_x509_checkpurpose.stub', 'openssl_x509_export' => 'stubs/ext/openssl/openssl_x509_export.stub', 'openssl_x509_export_to_file' => 'stubs/ext/openssl/openssl_x509_export_to_file.stub', 'openssl_x509_fingerprint' => 'stubs/ext/openssl/openssl_x509_fingerprint.stub', 'openssl_x509_free' => 'stubs/ext/openssl/openssl_x509_free.stub', 'openssl_x509_parse' => 'stubs/ext/openssl/openssl_x509_parse.stub', 'openssl_x509_read' => 'stubs/ext/openssl/openssl_x509_read.stub', 'openssl_x509_verify' => 'stubs/ext/openssl/openssl_x509_verify.stub', 'ord' => 'stubs/ext/standard/ord.stub', 'output_add_rewrite_var' => 'stubs/ext/standard/output_add_rewrite_var.stub', 'output_reset_rewrite_vars' => 'stubs/ext/standard/output_reset_rewrite_vars.stub', 'pack' => 'stubs/ext/standard/pack.stub', 'parse_ini_file' => 'stubs/ext/standard/parse_ini_file.stub', 'parse_ini_string' => 'stubs/ext/standard/parse_ini_string.stub', 'parse_str' => 'stubs/ext/standard/parse_str.stub', 'parse_url' => 'stubs/ext/standard/parse_url.stub', 'passthru' => 'stubs/ext/standard/passthru.stub', 'password_algos' => 'stubs/ext/standard/password_algos.stub', 'password_get_info' => 'stubs/ext/standard/password_get_info.stub', 'password_hash' => 'stubs/ext/standard/password_hash.stub', 'password_needs_rehash' => 'stubs/ext/standard/password_needs_rehash.stub', 'password_verify' => 'stubs/ext/standard/password_verify.stub', 'pathinfo' => 'stubs/ext/standard/pathinfo.stub', 'pclose' => 'stubs/ext/standard/pclose.stub', 'pcntl_alarm' => 'stubs/ext/pcntl/pcntl_alarm.stub', 'pcntl_async_signals' => 'stubs/ext/pcntl/pcntl_async_signals.stub', 'pcntl_errno' => 'stubs/ext/pcntl/pcntl_errno.stub', 'pcntl_exec' => 'stubs/ext/pcntl/pcntl_exec.stub', 'pcntl_fork' => 'stubs/ext/pcntl/pcntl_fork.stub', 'pcntl_get_last_error' => 'stubs/ext/pcntl/pcntl_get_last_error.stub', 'pcntl_getpriority' => 'stubs/ext/pcntl/pcntl_getpriority.stub', 'pcntl_setpriority' => 'stubs/ext/pcntl/pcntl_setpriority.stub', 'pcntl_signal' => 'stubs/ext/pcntl/pcntl_signal.stub', 'pcntl_signal_dispatch' => 'stubs/ext/pcntl/pcntl_signal_dispatch.stub', 'pcntl_signal_get_handler' => 'stubs/ext/pcntl/pcntl_signal_get_handler.stub', 'pcntl_sigprocmask' => 'stubs/ext/pcntl/pcntl_sigprocmask.stub', 'pcntl_sigtimedwait' => 'stubs/ext/pcntl/pcntl_sigtimedwait.stub', 'pcntl_sigwaitinfo' => 'stubs/ext/pcntl/pcntl_sigwaitinfo.stub', 'pcntl_strerror' => 'stubs/ext/pcntl/pcntl_strerror.stub', 'pcntl_unshare' => 'stubs/ext/pcntl/pcntl_unshare.stub', 'pcntl_wait' => 'stubs/ext/pcntl/pcntl_wait.stub', 'pcntl_waitpid' => 'stubs/ext/pcntl/pcntl_waitpid.stub', 'pcntl_wexitstatus' => 'stubs/ext/pcntl/pcntl_wexitstatus.stub', 'pcntl_wifcontinued' => 'stubs/ext/pcntl/pcntl_wifcontinued.stub', 'pcntl_wifexited' => 'stubs/ext/pcntl/pcntl_wifexited.stub', 'pcntl_wifsignaled' => 'stubs/ext/pcntl/pcntl_wifsignaled.stub', 'pcntl_wifstopped' => 'stubs/ext/pcntl/pcntl_wifstopped.stub', 'pcntl_wstopsig' => 'stubs/ext/pcntl/pcntl_wstopsig.stub', 'pcntl_wtermsig' => 'stubs/ext/pcntl/pcntl_wtermsig.stub', 'pdo_drivers' => 'stubs/ext/pdo/pdo_drivers.stub', 'pfsockopen' => 'stubs/ext/standard/pfsockopen.stub', 'pg_affected_rows' => 'stubs/ext/pgsql/pg_affected_rows.stub', 'pg_cancel_query' => 'stubs/ext/pgsql/pg_cancel_query.stub', 'pg_client_encoding' => 'stubs/ext/pgsql/pg_client_encoding.stub', 'pg_clientencoding' => 'stubs/ext/pgsql/pg_clientencoding.stub', 'pg_close' => 'stubs/ext/pgsql/pg_close.stub', 'pg_cmdtuples' => 'stubs/ext/pgsql/pg_cmdtuples.stub', 'pg_connect' => 'stubs/ext/pgsql/pg_connect.stub', 'pg_connect_poll' => 'stubs/ext/pgsql/pg_connect_poll.stub', 'pg_connection_busy' => 'stubs/ext/pgsql/pg_connection_busy.stub', 'pg_connection_reset' => 'stubs/ext/pgsql/pg_connection_reset.stub', 'pg_connection_status' => 'stubs/ext/pgsql/pg_connection_status.stub', 'pg_consume_input' => 'stubs/ext/pgsql/pg_consume_input.stub', 'pg_convert' => 'stubs/ext/pgsql/pg_convert.stub', 'pg_copy_from' => 'stubs/ext/pgsql/pg_copy_from.stub', 'pg_copy_to' => 'stubs/ext/pgsql/pg_copy_to.stub', 'pg_dbname' => 'stubs/ext/pgsql/pg_dbname.stub', 'pg_delete' => 'stubs/ext/pgsql/pg_delete.stub', 'pg_end_copy' => 'stubs/ext/pgsql/pg_end_copy.stub', 'pg_errormessage' => 'stubs/ext/pgsql/pg_errormessage.stub', 'pg_escape_bytea' => 'stubs/ext/pgsql/pg_escape_bytea.stub', 'pg_escape_identifier' => 'stubs/ext/pgsql/pg_escape_identifier.stub', 'pg_escape_literal' => 'stubs/ext/pgsql/pg_escape_literal.stub', 'pg_escape_string' => 'stubs/ext/pgsql/pg_escape_string.stub', 'pg_exec' => 'stubs/ext/pgsql/pg_exec.stub', 'pg_execute' => 'stubs/ext/pgsql/pg_execute.stub', 'pg_fetch_all' => 'stubs/ext/pgsql/pg_fetch_all.stub', 'pg_fetch_all_columns' => 'stubs/ext/pgsql/pg_fetch_all_columns.stub', 'pg_fetch_array' => 'stubs/ext/pgsql/pg_fetch_array.stub', 'pg_fetch_assoc' => 'stubs/ext/pgsql/pg_fetch_assoc.stub', 'pg_fetch_object' => 'stubs/ext/pgsql/pg_fetch_object.stub', 'pg_fetch_result' => 'stubs/ext/pgsql/pg_fetch_result.stub', 'pg_fetch_row' => 'stubs/ext/pgsql/pg_fetch_row.stub', 'pg_field_is_null' => 'stubs/ext/pgsql/pg_field_is_null.stub', 'pg_field_name' => 'stubs/ext/pgsql/pg_field_name.stub', 'pg_field_num' => 'stubs/ext/pgsql/pg_field_num.stub', 'pg_field_prtlen' => 'stubs/ext/pgsql/pg_field_prtlen.stub', 'pg_field_size' => 'stubs/ext/pgsql/pg_field_size.stub', 'pg_field_table' => 'stubs/ext/pgsql/pg_field_table.stub', 'pg_field_type' => 'stubs/ext/pgsql/pg_field_type.stub', 'pg_field_type_oid' => 'stubs/ext/pgsql/pg_field_type_oid.stub', 'pg_fieldisnull' => 'stubs/ext/pgsql/pg_fieldisnull.stub', 'pg_fieldname' => 'stubs/ext/pgsql/pg_fieldname.stub', 'pg_fieldnum' => 'stubs/ext/pgsql/pg_fieldnum.stub', 'pg_fieldprtlen' => 'stubs/ext/pgsql/pg_fieldprtlen.stub', 'pg_fieldsize' => 'stubs/ext/pgsql/pg_fieldsize.stub', 'pg_fieldtype' => 'stubs/ext/pgsql/pg_fieldtype.stub', 'pg_flush' => 'stubs/ext/pgsql/pg_flush.stub', 'pg_free_result' => 'stubs/ext/pgsql/pg_free_result.stub', 'pg_freeresult' => 'stubs/ext/pgsql/pg_freeresult.stub', 'pg_get_notify' => 'stubs/ext/pgsql/pg_get_notify.stub', 'pg_get_pid' => 'stubs/ext/pgsql/pg_get_pid.stub', 'pg_get_result' => 'stubs/ext/pgsql/pg_get_result.stub', 'pg_getlastoid' => 'stubs/ext/pgsql/pg_getlastoid.stub', 'pg_host' => 'stubs/ext/pgsql/pg_host.stub', 'pg_insert' => 'stubs/ext/pgsql/pg_insert.stub', 'pg_last_error' => 'stubs/ext/pgsql/pg_last_error.stub', 'pg_last_notice' => 'stubs/ext/pgsql/pg_last_notice.stub', 'pg_last_oid' => 'stubs/ext/pgsql/pg_last_oid.stub', 'pg_lo_close' => 'stubs/ext/pgsql/pg_lo_close.stub', 'pg_lo_create' => 'stubs/ext/pgsql/pg_lo_create.stub', 'pg_lo_export' => 'stubs/ext/pgsql/pg_lo_export.stub', 'pg_lo_import' => 'stubs/ext/pgsql/pg_lo_import.stub', 'pg_lo_open' => 'stubs/ext/pgsql/pg_lo_open.stub', 'pg_lo_read' => 'stubs/ext/pgsql/pg_lo_read.stub', 'pg_lo_read_all' => 'stubs/ext/pgsql/pg_lo_read_all.stub', 'pg_lo_seek' => 'stubs/ext/pgsql/pg_lo_seek.stub', 'pg_lo_tell' => 'stubs/ext/pgsql/pg_lo_tell.stub', 'pg_lo_truncate' => 'stubs/ext/pgsql/pg_lo_truncate.stub', 'pg_lo_unlink' => 'stubs/ext/pgsql/pg_lo_unlink.stub', 'pg_lo_write' => 'stubs/ext/pgsql/pg_lo_write.stub', 'pg_loclose' => 'stubs/ext/pgsql/pg_loclose.stub', 'pg_locreate' => 'stubs/ext/pgsql/pg_locreate.stub', 'pg_loexport' => 'stubs/ext/pgsql/pg_loexport.stub', 'pg_loimport' => 'stubs/ext/pgsql/pg_loimport.stub', 'pg_loopen' => 'stubs/ext/pgsql/pg_loopen.stub', 'pg_loread' => 'stubs/ext/pgsql/pg_loread.stub', 'pg_loreadall' => 'stubs/ext/pgsql/pg_loreadall.stub', 'pg_lounlink' => 'stubs/ext/pgsql/pg_lounlink.stub', 'pg_lowrite' => 'stubs/ext/pgsql/pg_lowrite.stub', 'pg_meta_data' => 'stubs/ext/pgsql/pg_meta_data.stub', 'pg_num_fields' => 'stubs/ext/pgsql/pg_num_fields.stub', 'pg_num_rows' => 'stubs/ext/pgsql/pg_num_rows.stub', 'pg_numfields' => 'stubs/ext/pgsql/pg_numfields.stub', 'pg_numrows' => 'stubs/ext/pgsql/pg_numrows.stub', 'pg_options' => 'stubs/ext/pgsql/pg_options.stub', 'pg_parameter_status' => 'stubs/ext/pgsql/pg_parameter_status.stub', 'pg_pconnect' => 'stubs/ext/pgsql/pg_pconnect.stub', 'pg_ping' => 'stubs/ext/pgsql/pg_ping.stub', 'pg_port' => 'stubs/ext/pgsql/pg_port.stub', 'pg_prepare' => 'stubs/ext/pgsql/pg_prepare.stub', 'pg_put_line' => 'stubs/ext/pgsql/pg_put_line.stub', 'pg_query' => 'stubs/ext/pgsql/pg_query.stub', 'pg_query_params' => 'stubs/ext/pgsql/pg_query_params.stub', 'pg_result' => 'stubs/ext/pgsql/pg_result.stub', 'pg_result_error' => 'stubs/ext/pgsql/pg_result_error.stub', 'pg_result_error_field' => 'stubs/ext/pgsql/pg_result_error_field.stub', 'pg_result_seek' => 'stubs/ext/pgsql/pg_result_seek.stub', 'pg_result_status' => 'stubs/ext/pgsql/pg_result_status.stub', 'pg_select' => 'stubs/ext/pgsql/pg_select.stub', 'pg_send_execute' => 'stubs/ext/pgsql/pg_send_execute.stub', 'pg_send_prepare' => 'stubs/ext/pgsql/pg_send_prepare.stub', 'pg_send_query' => 'stubs/ext/pgsql/pg_send_query.stub', 'pg_send_query_params' => 'stubs/ext/pgsql/pg_send_query_params.stub', 'pg_set_client_encoding' => 'stubs/ext/pgsql/pg_set_client_encoding.stub', 'pg_set_error_verbosity' => 'stubs/ext/pgsql/pg_set_error_verbosity.stub', 'pg_setclientencoding' => 'stubs/ext/pgsql/pg_setclientencoding.stub', 'pg_socket' => 'stubs/ext/pgsql/pg_socket.stub', 'pg_trace' => 'stubs/ext/pgsql/pg_trace.stub', 'pg_transaction_status' => 'stubs/ext/pgsql/pg_transaction_status.stub', 'pg_tty' => 'stubs/ext/pgsql/pg_tty.stub', 'pg_unescape_bytea' => 'stubs/ext/pgsql/pg_unescape_bytea.stub', 'pg_untrace' => 'stubs/ext/pgsql/pg_untrace.stub', 'pg_update' => 'stubs/ext/pgsql/pg_update.stub', 'pg_version' => 'stubs/ext/pgsql/pg_version.stub', 'php_ini_loaded_file' => 'stubs/ext/standard/php_ini_loaded_file.stub', 'php_ini_scanned_files' => 'stubs/ext/standard/php_ini_scanned_files.stub', 'php_sapi_name' => 'stubs/ext/standard/php_sapi_name.stub', 'php_strip_whitespace' => 'stubs/ext/standard/php_strip_whitespace.stub', 'php_uname' => 'stubs/ext/standard/php_uname.stub', 'phpcredits' => 'stubs/ext/standard/phpcredits.stub', 'phpdbg_break_file' => 'stubs/sapi/phpdbg/phpdbg_break_file.stub', 'phpdbg_break_function' => 'stubs/sapi/phpdbg/phpdbg_break_function.stub', 'phpdbg_break_method' => 'stubs/sapi/phpdbg/phpdbg_break_method.stub', 'phpdbg_break_next' => 'stubs/sapi/phpdbg/phpdbg_break_next.stub', 'phpdbg_clear' => 'stubs/sapi/phpdbg/phpdbg_clear.stub', 'phpdbg_color' => 'stubs/sapi/phpdbg/phpdbg_color.stub', 'phpdbg_end_oplog' => 'stubs/sapi/phpdbg/phpdbg_end_oplog.stub', 'phpdbg_exec' => 'stubs/sapi/phpdbg/phpdbg_exec.stub', 'phpdbg_get_executable' => 'stubs/sapi/phpdbg/phpdbg_get_executable.stub', 'phpdbg_prompt' => 'stubs/sapi/phpdbg/phpdbg_prompt.stub', 'phpdbg_start_oplog' => 'stubs/sapi/phpdbg/phpdbg_start_oplog.stub', 'phpinfo' => 'stubs/ext/standard/phpinfo.stub', 'phpversion' => 'stubs/ext/standard/phpversion.stub', 'pi' => 'stubs/ext/standard/pi.stub', 'popen' => 'stubs/ext/standard/popen.stub', 'pos' => 'stubs/ext/standard/pos.stub', 'posix_access' => 'stubs/ext/posix/posix_access.stub', 'posix_ctermid' => 'stubs/ext/posix/posix_ctermid.stub', 'posix_errno' => 'stubs/ext/posix/posix_errno.stub', 'posix_get_last_error' => 'stubs/ext/posix/posix_get_last_error.stub', 'posix_getcwd' => 'stubs/ext/posix/posix_getcwd.stub', 'posix_getegid' => 'stubs/ext/posix/posix_getegid.stub', 'posix_geteuid' => 'stubs/ext/posix/posix_geteuid.stub', 'posix_getgid' => 'stubs/ext/posix/posix_getgid.stub', 'posix_getgrgid' => 'stubs/ext/posix/posix_getgrgid.stub', 'posix_getgrnam' => 'stubs/ext/posix/posix_getgrnam.stub', 'posix_getgroups' => 'stubs/ext/posix/posix_getgroups.stub', 'posix_getlogin' => 'stubs/ext/posix/posix_getlogin.stub', 'posix_getpgid' => 'stubs/ext/posix/posix_getpgid.stub', 'posix_getpgrp' => 'stubs/ext/posix/posix_getpgrp.stub', 'posix_getpid' => 'stubs/ext/posix/posix_getpid.stub', 'posix_getppid' => 'stubs/ext/posix/posix_getppid.stub', 'posix_getpwnam' => 'stubs/ext/posix/posix_getpwnam.stub', 'posix_getpwuid' => 'stubs/ext/posix/posix_getpwuid.stub', 'posix_getrlimit' => 'stubs/ext/posix/posix_getrlimit.stub', 'posix_getsid' => 'stubs/ext/posix/posix_getsid.stub', 'posix_getuid' => 'stubs/ext/posix/posix_getuid.stub', 'posix_initgroups' => 'stubs/ext/posix/posix_initgroups.stub', 'posix_isatty' => 'stubs/ext/posix/posix_isatty.stub', 'posix_kill' => 'stubs/ext/posix/posix_kill.stub', 'posix_mkfifo' => 'stubs/ext/posix/posix_mkfifo.stub', 'posix_mknod' => 'stubs/ext/posix/posix_mknod.stub', 'posix_setegid' => 'stubs/ext/posix/posix_setegid.stub', 'posix_seteuid' => 'stubs/ext/posix/posix_seteuid.stub', 'posix_setgid' => 'stubs/ext/posix/posix_setgid.stub', 'posix_setpgid' => 'stubs/ext/posix/posix_setpgid.stub', 'posix_setrlimit' => 'stubs/ext/posix/posix_setrlimit.stub', 'posix_setsid' => 'stubs/ext/posix/posix_setsid.stub', 'posix_setuid' => 'stubs/ext/posix/posix_setuid.stub', 'posix_strerror' => 'stubs/ext/posix/posix_strerror.stub', 'posix_times' => 'stubs/ext/posix/posix_times.stub', 'posix_ttyname' => 'stubs/ext/posix/posix_ttyname.stub', 'posix_uname' => 'stubs/ext/posix/posix_uname.stub', 'pow' => 'stubs/ext/standard/pow.stub', 'preg_filter' => 'stubs/ext/pcre/preg_filter.stub', 'preg_grep' => 'stubs/ext/pcre/preg_grep.stub', 'preg_last_error' => 'stubs/ext/pcre/preg_last_error.stub', 'preg_last_error_msg' => 'stubs/ext/pcre/preg_last_error_msg.stub', 'preg_match' => 'stubs/ext/pcre/preg_match.stub', 'preg_match_all' => 'stubs/ext/pcre/preg_match_all.stub', 'preg_quote' => 'stubs/ext/pcre/preg_quote.stub', 'preg_replace' => 'stubs/ext/pcre/preg_replace.stub', 'preg_replace_callback' => 'stubs/ext/pcre/preg_replace_callback.stub', 'preg_replace_callback_array' => 'stubs/ext/pcre/preg_replace_callback_array.stub', 'preg_split' => 'stubs/ext/pcre/preg_split.stub', 'prev' => 'stubs/ext/standard/prev.stub', 'print_r' => 'stubs/ext/standard/print_r.stub', 'printf' => 'stubs/ext/standard/printf.stub', 'proc_close' => 'stubs/ext/standard/proc_close.stub', 'proc_get_status' => 'stubs/ext/standard/proc_get_status.stub', 'proc_nice' => 'stubs/ext/standard/proc_nice.stub', 'proc_open' => 'stubs/ext/standard/proc_open.stub', 'proc_terminate' => 'stubs/ext/standard/proc_terminate.stub', 'property_exists' => 'stubs/Zend/property_exists.stub', 'pspell_add_to_personal' => 'stubs/ext/pspell/pspell_add_to_personal.stub', 'pspell_add_to_session' => 'stubs/ext/pspell/pspell_add_to_session.stub', 'pspell_check' => 'stubs/ext/pspell/pspell_check.stub', 'pspell_clear_session' => 'stubs/ext/pspell/pspell_clear_session.stub', 'pspell_config_create' => 'stubs/ext/pspell/pspell_config_create.stub', 'pspell_config_data_dir' => 'stubs/ext/pspell/pspell_config_data_dir.stub', 'pspell_config_dict_dir' => 'stubs/ext/pspell/pspell_config_dict_dir.stub', 'pspell_config_ignore' => 'stubs/ext/pspell/pspell_config_ignore.stub', 'pspell_config_mode' => 'stubs/ext/pspell/pspell_config_mode.stub', 'pspell_config_personal' => 'stubs/ext/pspell/pspell_config_personal.stub', 'pspell_config_repl' => 'stubs/ext/pspell/pspell_config_repl.stub', 'pspell_config_runtogether' => 'stubs/ext/pspell/pspell_config_runtogether.stub', 'pspell_config_save_repl' => 'stubs/ext/pspell/pspell_config_save_repl.stub', 'pspell_new' => 'stubs/ext/pspell/pspell_new.stub', 'pspell_new_config' => 'stubs/ext/pspell/pspell_new_config.stub', 'pspell_new_personal' => 'stubs/ext/pspell/pspell_new_personal.stub', 'pspell_save_wordlist' => 'stubs/ext/pspell/pspell_save_wordlist.stub', 'pspell_store_replacement' => 'stubs/ext/pspell/pspell_store_replacement.stub', 'pspell_suggest' => 'stubs/ext/pspell/pspell_suggest.stub', 'putenv' => 'stubs/ext/standard/putenv.stub', 'quoted_printable_decode' => 'stubs/ext/standard/quoted_printable_decode.stub', 'quoted_printable_encode' => 'stubs/ext/standard/quoted_printable_encode.stub', 'quotemeta' => 'stubs/ext/standard/quotemeta.stub', 'rad2deg' => 'stubs/ext/standard/rad2deg.stub', 'rand' => 'stubs/ext/standard/rand.stub', 'random_bytes' => 'stubs/ext/standard/random_bytes.stub', 'random_int' => 'stubs/ext/standard/random_int.stub', 'range' => 'stubs/ext/standard/range.stub', 'rawurldecode' => 'stubs/ext/standard/rawurldecode.stub', 'rawurlencode' => 'stubs/ext/standard/rawurlencode.stub', 'readdir' => 'stubs/ext/standard/readdir.stub', 'readfile' => 'stubs/ext/standard/readfile.stub', 'readgzfile' => 'stubs/ext/zlib/readgzfile.stub', 'readline' => 'stubs/ext/readline/readline.stub', 'readline_add_history' => 'stubs/ext/readline/readline_add_history.stub', 'readline_callback_handler_install' => 'stubs/ext/readline/readline_callback_handler_install.stub', 'readline_callback_handler_remove' => 'stubs/ext/readline/readline_callback_handler_remove.stub', 'readline_callback_read_char' => 'stubs/ext/readline/readline_callback_read_char.stub', 'readline_clear_history' => 'stubs/ext/readline/readline_clear_history.stub', 'readline_completion_function' => 'stubs/ext/readline/readline_completion_function.stub', 'readline_info' => 'stubs/ext/readline/readline_info.stub', 'readline_list_history' => 'stubs/ext/readline/readline_list_history.stub', 'readline_on_new_line' => 'stubs/ext/readline/readline_on_new_line.stub', 'readline_read_history' => 'stubs/ext/readline/readline_read_history.stub', 'readline_redisplay' => 'stubs/ext/readline/readline_redisplay.stub', 'readline_write_history' => 'stubs/ext/readline/readline_write_history.stub', 'readlink' => 'stubs/ext/standard/readlink.stub', 'realpath' => 'stubs/ext/standard/realpath.stub', 'realpath_cache_get' => 'stubs/ext/standard/realpath_cache_get.stub', 'realpath_cache_size' => 'stubs/ext/standard/realpath_cache_size.stub', 'register_shutdown_function' => 'stubs/ext/standard/register_shutdown_function.stub', 'register_tick_function' => 'stubs/ext/standard/register_tick_function.stub', 'rename' => 'stubs/ext/standard/rename.stub', 'reset' => 'stubs/ext/standard/reset.stub', 'resourcebundle_count' => 'stubs/ext/intl/resourcebundle_count.stub', 'resourcebundle_create' => 'stubs/ext/intl/resourcebundle_create.stub', 'resourcebundle_get' => 'stubs/ext/intl/resourcebundle_get.stub', 'resourcebundle_get_error_code' => 'stubs/ext/intl/resourcebundle_get_error_code.stub', 'resourcebundle_get_error_message' => 'stubs/ext/intl/resourcebundle_get_error_message.stub', 'resourcebundle_locales' => 'stubs/ext/intl/resourcebundle_locales.stub', 'restore_error_handler' => 'stubs/Zend/restore_error_handler.stub', 'restore_exception_handler' => 'stubs/Zend/restore_exception_handler.stub', 'rewind' => 'stubs/ext/standard/rewind.stub', 'rewinddir' => 'stubs/ext/standard/rewinddir.stub', 'rmdir' => 'stubs/ext/standard/rmdir.stub', 'round' => 'stubs/ext/standard/round.stub', 'rsort' => 'stubs/ext/standard/rsort.stub', 'rtrim' => 'stubs/ext/standard/rtrim.stub', 'sapi_windows_cp_conv' => 'stubs/ext/standard/sapi_windows_cp_conv.stub', 'sapi_windows_cp_get' => 'stubs/ext/standard/sapi_windows_cp_get.stub', 'sapi_windows_cp_is_utf8' => 'stubs/ext/standard/sapi_windows_cp_is_utf8.stub', 'sapi_windows_cp_set' => 'stubs/ext/standard/sapi_windows_cp_set.stub', 'sapi_windows_generate_ctrl_event' => 'stubs/ext/standard/sapi_windows_generate_ctrl_event.stub', 'sapi_windows_set_ctrl_handler' => 'stubs/ext/standard/sapi_windows_set_ctrl_handler.stub', 'sapi_windows_vt100_support' => 'stubs/ext/standard/sapi_windows_vt100_support.stub', 'scandir' => 'stubs/ext/standard/scandir.stub', 'sem_acquire' => 'stubs/ext/sysvsem/sem_acquire.stub', 'sem_get' => 'stubs/ext/sysvsem/sem_get.stub', 'sem_release' => 'stubs/ext/sysvsem/sem_release.stub', 'sem_remove' => 'stubs/ext/sysvsem/sem_remove.stub', 'serialize' => 'stubs/ext/standard/serialize.stub', 'session_abort' => 'stubs/ext/session/session_abort.stub', 'session_cache_expire' => 'stubs/ext/session/session_cache_expire.stub', 'session_cache_limiter' => 'stubs/ext/session/session_cache_limiter.stub', 'session_commit' => 'stubs/ext/session/session_commit.stub', 'session_create_id' => 'stubs/ext/session/session_create_id.stub', 'session_decode' => 'stubs/ext/session/session_decode.stub', 'session_destroy' => 'stubs/ext/session/session_destroy.stub', 'session_encode' => 'stubs/ext/session/session_encode.stub', 'session_gc' => 'stubs/ext/session/session_gc.stub', 'session_get_cookie_params' => 'stubs/ext/session/session_get_cookie_params.stub', 'session_id' => 'stubs/ext/session/session_id.stub', 'session_module_name' => 'stubs/ext/session/session_module_name.stub', 'session_name' => 'stubs/ext/session/session_name.stub', 'session_regenerate_id' => 'stubs/ext/session/session_regenerate_id.stub', 'session_register_shutdown' => 'stubs/ext/session/session_register_shutdown.stub', 'session_reset' => 'stubs/ext/session/session_reset.stub', 'session_save_path' => 'stubs/ext/session/session_save_path.stub', 'session_set_cookie_params' => 'stubs/ext/session/session_set_cookie_params.stub', 'session_set_save_handler' => 'stubs/ext/session/session_set_save_handler.stub', 'session_start' => 'stubs/ext/session/session_start.stub', 'session_status' => 'stubs/ext/session/session_status.stub', 'session_unset' => 'stubs/ext/session/session_unset.stub', 'session_write_close' => 'stubs/ext/session/session_write_close.stub', 'set_error_handler' => 'stubs/Zend/set_error_handler.stub', 'set_exception_handler' => 'stubs/Zend/set_exception_handler.stub', 'set_file_buffer' => 'stubs/ext/standard/set_file_buffer.stub', 'set_include_path' => 'stubs/ext/standard/set_include_path.stub', 'set_time_limit' => 'stubs/ext/standard/set_time_limit.stub', 'setcookie' => 'stubs/ext/standard/setcookie.stub', 'setlocale' => 'stubs/ext/standard/setlocale.stub', 'setrawcookie' => 'stubs/ext/standard/setrawcookie.stub', 'settype' => 'stubs/ext/standard/settype.stub', 'sha1' => 'stubs/ext/standard/sha1.stub', 'sha1_file' => 'stubs/ext/standard/sha1_file.stub', 'shell_exec' => 'stubs/ext/standard/shell_exec.stub', 'shm_attach' => 'stubs/ext/sysvshm/shm_attach.stub', 'shm_detach' => 'stubs/ext/sysvshm/shm_detach.stub', 'shm_get_var' => 'stubs/ext/sysvshm/shm_get_var.stub', 'shm_has_var' => 'stubs/ext/sysvshm/shm_has_var.stub', 'shm_put_var' => 'stubs/ext/sysvshm/shm_put_var.stub', 'shm_remove' => 'stubs/ext/sysvshm/shm_remove.stub', 'shm_remove_var' => 'stubs/ext/sysvshm/shm_remove_var.stub', 'shmop_close' => 'stubs/ext/shmop/shmop_close.stub', 'shmop_delete' => 'stubs/ext/shmop/shmop_delete.stub', 'shmop_open' => 'stubs/ext/shmop/shmop_open.stub', 'shmop_read' => 'stubs/ext/shmop/shmop_read.stub', 'shmop_size' => 'stubs/ext/shmop/shmop_size.stub', 'shmop_write' => 'stubs/ext/shmop/shmop_write.stub', 'show_source' => 'stubs/ext/standard/show_source.stub', 'shuffle' => 'stubs/ext/standard/shuffle.stub', 'similar_text' => 'stubs/ext/standard/similar_text.stub', 'simplexml_import_dom' => 'stubs/ext/simplexml/simplexml_import_dom.stub', 'simplexml_load_file' => 'stubs/ext/simplexml/simplexml_load_file.stub', 'simplexml_load_string' => 'stubs/ext/simplexml/simplexml_load_string.stub', 'sin' => 'stubs/ext/standard/sin.stub', 'sinh' => 'stubs/ext/standard/sinh.stub', 'sizeof' => 'stubs/ext/standard/sizeof.stub', 'sleep' => 'stubs/ext/standard/sleep.stub', 'snmp2_get' => 'stubs/ext/snmp/snmp2_get.stub', 'snmp2_getnext' => 'stubs/ext/snmp/snmp2_getnext.stub', 'snmp2_real_walk' => 'stubs/ext/snmp/snmp2_real_walk.stub', 'snmp2_set' => 'stubs/ext/snmp/snmp2_set.stub', 'snmp2_walk' => 'stubs/ext/snmp/snmp2_walk.stub', 'snmp3_get' => 'stubs/ext/snmp/snmp3_get.stub', 'snmp3_getnext' => 'stubs/ext/snmp/snmp3_getnext.stub', 'snmp3_real_walk' => 'stubs/ext/snmp/snmp3_real_walk.stub', 'snmp3_set' => 'stubs/ext/snmp/snmp3_set.stub', 'snmp3_walk' => 'stubs/ext/snmp/snmp3_walk.stub', 'snmp_get_quick_print' => 'stubs/ext/snmp/snmp_get_quick_print.stub', 'snmp_get_valueretrieval' => 'stubs/ext/snmp/snmp_get_valueretrieval.stub', 'snmp_read_mib' => 'stubs/ext/snmp/snmp_read_mib.stub', 'snmp_set_enum_print' => 'stubs/ext/snmp/snmp_set_enum_print.stub', 'snmp_set_oid_numeric_print' => 'stubs/ext/snmp/snmp_set_oid_numeric_print.stub', 'snmp_set_oid_output_format' => 'stubs/ext/snmp/snmp_set_oid_output_format.stub', 'snmp_set_quick_print' => 'stubs/ext/snmp/snmp_set_quick_print.stub', 'snmp_set_valueretrieval' => 'stubs/ext/snmp/snmp_set_valueretrieval.stub', 'snmpget' => 'stubs/ext/snmp/snmpget.stub', 'snmpgetnext' => 'stubs/ext/snmp/snmpgetnext.stub', 'snmprealwalk' => 'stubs/ext/snmp/snmprealwalk.stub', 'snmpset' => 'stubs/ext/snmp/snmpset.stub', 'snmpwalk' => 'stubs/ext/snmp/snmpwalk.stub', 'snmpwalkoid' => 'stubs/ext/snmp/snmpwalkoid.stub', 'socket_accept' => 'stubs/ext/sockets/socket_accept.stub', 'socket_addrinfo_bind' => 'stubs/ext/sockets/socket_addrinfo_bind.stub', 'socket_addrinfo_connect' => 'stubs/ext/sockets/socket_addrinfo_connect.stub', 'socket_addrinfo_explain' => 'stubs/ext/sockets/socket_addrinfo_explain.stub', 'socket_addrinfo_lookup' => 'stubs/ext/sockets/socket_addrinfo_lookup.stub', 'socket_bind' => 'stubs/ext/sockets/socket_bind.stub', 'socket_clear_error' => 'stubs/ext/sockets/socket_clear_error.stub', 'socket_close' => 'stubs/ext/sockets/socket_close.stub', 'socket_cmsg_space' => 'stubs/ext/sockets/socket_cmsg_space.stub', 'socket_connect' => 'stubs/ext/sockets/socket_connect.stub', 'socket_create' => 'stubs/ext/sockets/socket_create.stub', 'socket_create_listen' => 'stubs/ext/sockets/socket_create_listen.stub', 'socket_create_pair' => 'stubs/ext/sockets/socket_create_pair.stub', 'socket_export_stream' => 'stubs/ext/sockets/socket_export_stream.stub', 'socket_get_option' => 'stubs/ext/sockets/socket_get_option.stub', 'socket_get_status' => 'stubs/ext/standard/socket_get_status.stub', 'socket_getopt' => 'stubs/ext/sockets/socket_getopt.stub', 'socket_getpeername' => 'stubs/ext/sockets/socket_getpeername.stub', 'socket_getsockname' => 'stubs/ext/sockets/socket_getsockname.stub', 'socket_import_stream' => 'stubs/ext/sockets/socket_import_stream.stub', 'socket_last_error' => 'stubs/ext/sockets/socket_last_error.stub', 'socket_listen' => 'stubs/ext/sockets/socket_listen.stub', 'socket_read' => 'stubs/ext/sockets/socket_read.stub', 'socket_recv' => 'stubs/ext/sockets/socket_recv.stub', 'socket_recvfrom' => 'stubs/ext/sockets/socket_recvfrom.stub', 'socket_recvmsg' => 'stubs/ext/sockets/socket_recvmsg.stub', 'socket_select' => 'stubs/ext/sockets/socket_select.stub', 'socket_send' => 'stubs/ext/sockets/socket_send.stub', 'socket_sendmsg' => 'stubs/ext/sockets/socket_sendmsg.stub', 'socket_sendto' => 'stubs/ext/sockets/socket_sendto.stub', 'socket_set_block' => 'stubs/ext/sockets/socket_set_block.stub', 'socket_set_blocking' => 'stubs/ext/standard/socket_set_blocking.stub', 'socket_set_nonblock' => 'stubs/ext/sockets/socket_set_nonblock.stub', 'socket_set_option' => 'stubs/ext/sockets/socket_set_option.stub', 'socket_set_timeout' => 'stubs/ext/standard/socket_set_timeout.stub', 'socket_setopt' => 'stubs/ext/sockets/socket_setopt.stub', 'socket_shutdown' => 'stubs/ext/sockets/socket_shutdown.stub', 'socket_strerror' => 'stubs/ext/sockets/socket_strerror.stub', 'socket_write' => 'stubs/ext/sockets/socket_write.stub', 'socket_wsaprotocol_info_export' => 'stubs/ext/sockets/socket_wsaprotocol_info_export.stub', 'socket_wsaprotocol_info_import' => 'stubs/ext/sockets/socket_wsaprotocol_info_import.stub', 'socket_wsaprotocol_info_release' => 'stubs/ext/sockets/socket_wsaprotocol_info_release.stub', 'sodium_add' => 'stubs/ext/sodium/sodium_add.stub', 'sodium_base642bin' => 'stubs/ext/sodium/sodium_base642bin.stub', 'sodium_bin2base64' => 'stubs/ext/sodium/sodium_bin2base64.stub', 'sodium_bin2hex' => 'stubs/ext/sodium/sodium_bin2hex.stub', 'sodium_compare' => 'stubs/ext/sodium/sodium_compare.stub', 'sodium_crypto_aead_aes256gcm_decrypt' => 'stubs/ext/sodium/sodium_crypto_aead_aes256gcm_decrypt.stub', 'sodium_crypto_aead_aes256gcm_encrypt' => 'stubs/ext/sodium/sodium_crypto_aead_aes256gcm_encrypt.stub', 'sodium_crypto_aead_aes256gcm_is_available' => 'stubs/ext/sodium/sodium_crypto_aead_aes256gcm_is_available.stub', 'sodium_crypto_aead_aes256gcm_keygen' => 'stubs/ext/sodium/sodium_crypto_aead_aes256gcm_keygen.stub', 'sodium_crypto_aead_chacha20poly1305_decrypt' => 'stubs/ext/sodium/sodium_crypto_aead_chacha20poly1305_decrypt.stub', 'sodium_crypto_aead_chacha20poly1305_encrypt' => 'stubs/ext/sodium/sodium_crypto_aead_chacha20poly1305_encrypt.stub', 'sodium_crypto_aead_chacha20poly1305_ietf_decrypt' => 'stubs/ext/sodium/sodium_crypto_aead_chacha20poly1305_ietf_decrypt.stub', 'sodium_crypto_aead_chacha20poly1305_ietf_encrypt' => 'stubs/ext/sodium/sodium_crypto_aead_chacha20poly1305_ietf_encrypt.stub', 'sodium_crypto_aead_chacha20poly1305_ietf_keygen' => 'stubs/ext/sodium/sodium_crypto_aead_chacha20poly1305_ietf_keygen.stub', 'sodium_crypto_aead_chacha20poly1305_keygen' => 'stubs/ext/sodium/sodium_crypto_aead_chacha20poly1305_keygen.stub', 'sodium_crypto_aead_xchacha20poly1305_ietf_decrypt' => 'stubs/ext/sodium/sodium_crypto_aead_xchacha20poly1305_ietf_decrypt.stub', 'sodium_crypto_aead_xchacha20poly1305_ietf_encrypt' => 'stubs/ext/sodium/sodium_crypto_aead_xchacha20poly1305_ietf_encrypt.stub', 'sodium_crypto_aead_xchacha20poly1305_ietf_keygen' => 'stubs/ext/sodium/sodium_crypto_aead_xchacha20poly1305_ietf_keygen.stub', 'sodium_crypto_auth' => 'stubs/ext/sodium/sodium_crypto_auth.stub', 'sodium_crypto_auth_keygen' => 'stubs/ext/sodium/sodium_crypto_auth_keygen.stub', 'sodium_crypto_auth_verify' => 'stubs/ext/sodium/sodium_crypto_auth_verify.stub', 'sodium_crypto_box' => 'stubs/ext/sodium/sodium_crypto_box.stub', 'sodium_crypto_box_keypair' => 'stubs/ext/sodium/sodium_crypto_box_keypair.stub', 'sodium_crypto_box_keypair_from_secretkey_and_publickey' => 'stubs/ext/sodium/sodium_crypto_box_keypair_from_secretkey_and_publickey.stub', 'sodium_crypto_box_open' => 'stubs/ext/sodium/sodium_crypto_box_open.stub', 'sodium_crypto_box_publickey' => 'stubs/ext/sodium/sodium_crypto_box_publickey.stub', 'sodium_crypto_box_publickey_from_secretkey' => 'stubs/ext/sodium/sodium_crypto_box_publickey_from_secretkey.stub', 'sodium_crypto_box_seal' => 'stubs/ext/sodium/sodium_crypto_box_seal.stub', 'sodium_crypto_box_seal_open' => 'stubs/ext/sodium/sodium_crypto_box_seal_open.stub', 'sodium_crypto_box_secretkey' => 'stubs/ext/sodium/sodium_crypto_box_secretkey.stub', 'sodium_crypto_box_seed_keypair' => 'stubs/ext/sodium/sodium_crypto_box_seed_keypair.stub', 'sodium_crypto_generichash' => 'stubs/ext/sodium/sodium_crypto_generichash.stub', 'sodium_crypto_generichash_final' => 'stubs/ext/sodium/sodium_crypto_generichash_final.stub', 'sodium_crypto_generichash_init' => 'stubs/ext/sodium/sodium_crypto_generichash_init.stub', 'sodium_crypto_generichash_keygen' => 'stubs/ext/sodium/sodium_crypto_generichash_keygen.stub', 'sodium_crypto_generichash_update' => 'stubs/ext/sodium/sodium_crypto_generichash_update.stub', 'sodium_crypto_kdf_derive_from_key' => 'stubs/ext/sodium/sodium_crypto_kdf_derive_from_key.stub', 'sodium_crypto_kdf_keygen' => 'stubs/ext/sodium/sodium_crypto_kdf_keygen.stub', 'sodium_crypto_kx_client_session_keys' => 'stubs/ext/sodium/sodium_crypto_kx_client_session_keys.stub', 'sodium_crypto_kx_keypair' => 'stubs/ext/sodium/sodium_crypto_kx_keypair.stub', 'sodium_crypto_kx_publickey' => 'stubs/ext/sodium/sodium_crypto_kx_publickey.stub', 'sodium_crypto_kx_secretkey' => 'stubs/ext/sodium/sodium_crypto_kx_secretkey.stub', 'sodium_crypto_kx_seed_keypair' => 'stubs/ext/sodium/sodium_crypto_kx_seed_keypair.stub', 'sodium_crypto_kx_server_session_keys' => 'stubs/ext/sodium/sodium_crypto_kx_server_session_keys.stub', 'sodium_crypto_pwhash' => 'stubs/ext/sodium/sodium_crypto_pwhash.stub', 'sodium_crypto_pwhash_scryptsalsa208sha256' => 'stubs/ext/sodium/sodium_crypto_pwhash_scryptsalsa208sha256.stub', 'sodium_crypto_pwhash_scryptsalsa208sha256_str' => 'stubs/ext/sodium/sodium_crypto_pwhash_scryptsalsa208sha256_str.stub', 'sodium_crypto_pwhash_scryptsalsa208sha256_str_verify' => 'stubs/ext/sodium/sodium_crypto_pwhash_scryptsalsa208sha256_str_verify.stub', 'sodium_crypto_pwhash_str' => 'stubs/ext/sodium/sodium_crypto_pwhash_str.stub', 'sodium_crypto_pwhash_str_needs_rehash' => 'stubs/ext/sodium/sodium_crypto_pwhash_str_needs_rehash.stub', 'sodium_crypto_pwhash_str_verify' => 'stubs/ext/sodium/sodium_crypto_pwhash_str_verify.stub', 'sodium_crypto_scalarmult' => 'stubs/ext/sodium/sodium_crypto_scalarmult.stub', 'sodium_crypto_scalarmult_base' => 'stubs/ext/sodium/sodium_crypto_scalarmult_base.stub', 'sodium_crypto_secretbox' => 'stubs/ext/sodium/sodium_crypto_secretbox.stub', 'sodium_crypto_secretbox_keygen' => 'stubs/ext/sodium/sodium_crypto_secretbox_keygen.stub', 'sodium_crypto_secretbox_open' => 'stubs/ext/sodium/sodium_crypto_secretbox_open.stub', 'sodium_crypto_secretstream_xchacha20poly1305_init_pull' => 'stubs/ext/sodium/sodium_crypto_secretstream_xchacha20poly1305_init_pull.stub', 'sodium_crypto_secretstream_xchacha20poly1305_init_push' => 'stubs/ext/sodium/sodium_crypto_secretstream_xchacha20poly1305_init_push.stub', 'sodium_crypto_secretstream_xchacha20poly1305_keygen' => 'stubs/ext/sodium/sodium_crypto_secretstream_xchacha20poly1305_keygen.stub', 'sodium_crypto_secretstream_xchacha20poly1305_pull' => 'stubs/ext/sodium/sodium_crypto_secretstream_xchacha20poly1305_pull.stub', 'sodium_crypto_secretstream_xchacha20poly1305_push' => 'stubs/ext/sodium/sodium_crypto_secretstream_xchacha20poly1305_push.stub', 'sodium_crypto_secretstream_xchacha20poly1305_rekey' => 'stubs/ext/sodium/sodium_crypto_secretstream_xchacha20poly1305_rekey.stub', 'sodium_crypto_shorthash' => 'stubs/ext/sodium/sodium_crypto_shorthash.stub', 'sodium_crypto_shorthash_keygen' => 'stubs/ext/sodium/sodium_crypto_shorthash_keygen.stub', 'sodium_crypto_sign' => 'stubs/ext/sodium/sodium_crypto_sign.stub', 'sodium_crypto_sign_detached' => 'stubs/ext/sodium/sodium_crypto_sign_detached.stub', 'sodium_crypto_sign_ed25519_pk_to_curve25519' => 'stubs/ext/sodium/sodium_crypto_sign_ed25519_pk_to_curve25519.stub', 'sodium_crypto_sign_ed25519_sk_to_curve25519' => 'stubs/ext/sodium/sodium_crypto_sign_ed25519_sk_to_curve25519.stub', 'sodium_crypto_sign_keypair' => 'stubs/ext/sodium/sodium_crypto_sign_keypair.stub', 'sodium_crypto_sign_keypair_from_secretkey_and_publickey' => 'stubs/ext/sodium/sodium_crypto_sign_keypair_from_secretkey_and_publickey.stub', 'sodium_crypto_sign_open' => 'stubs/ext/sodium/sodium_crypto_sign_open.stub', 'sodium_crypto_sign_publickey' => 'stubs/ext/sodium/sodium_crypto_sign_publickey.stub', 'sodium_crypto_sign_publickey_from_secretkey' => 'stubs/ext/sodium/sodium_crypto_sign_publickey_from_secretkey.stub', 'sodium_crypto_sign_secretkey' => 'stubs/ext/sodium/sodium_crypto_sign_secretkey.stub', 'sodium_crypto_sign_seed_keypair' => 'stubs/ext/sodium/sodium_crypto_sign_seed_keypair.stub', 'sodium_crypto_sign_verify_detached' => 'stubs/ext/sodium/sodium_crypto_sign_verify_detached.stub', 'sodium_crypto_stream' => 'stubs/ext/sodium/sodium_crypto_stream.stub', 'sodium_crypto_stream_keygen' => 'stubs/ext/sodium/sodium_crypto_stream_keygen.stub', 'sodium_crypto_stream_xor' => 'stubs/ext/sodium/sodium_crypto_stream_xor.stub', 'sodium_hex2bin' => 'stubs/ext/sodium/sodium_hex2bin.stub', 'sodium_increment' => 'stubs/ext/sodium/sodium_increment.stub', 'sodium_memcmp' => 'stubs/ext/sodium/sodium_memcmp.stub', 'sodium_memzero' => 'stubs/ext/sodium/sodium_memzero.stub', 'sodium_pad' => 'stubs/ext/sodium/sodium_pad.stub', 'sodium_unpad' => 'stubs/ext/sodium/sodium_unpad.stub', 'sort' => 'stubs/ext/standard/sort.stub', 'soundex' => 'stubs/ext/standard/soundex.stub', 'spl_autoload' => 'stubs/ext/spl/spl_autoload.stub', 'spl_autoload_call' => 'stubs/ext/spl/spl_autoload_call.stub', 'spl_autoload_extensions' => 'stubs/ext/spl/spl_autoload_extensions.stub', 'spl_autoload_functions' => 'stubs/ext/spl/spl_autoload_functions.stub', 'spl_autoload_register' => 'stubs/ext/spl/spl_autoload_register.stub', 'spl_autoload_unregister' => 'stubs/ext/spl/spl_autoload_unregister.stub', 'spl_classes' => 'stubs/ext/spl/spl_classes.stub', 'spl_object_hash' => 'stubs/ext/spl/spl_object_hash.stub', 'spl_object_id' => 'stubs/ext/spl/spl_object_id.stub', 'sprintf' => 'stubs/ext/standard/sprintf.stub', 'sqrt' => 'stubs/ext/standard/sqrt.stub', 'srand' => 'stubs/ext/standard/srand.stub', 'sscanf' => 'stubs/ext/standard/sscanf.stub', 'stat' => 'stubs/ext/standard/stat.stub', 'str_contains' => 'stubs/ext/standard/str_contains.stub', 'str_ends_with' => 'stubs/ext/standard/str_ends_with.stub', 'str_getcsv' => 'stubs/ext/standard/str_getcsv.stub', 'str_ireplace' => 'stubs/ext/standard/str_ireplace.stub', 'str_pad' => 'stubs/ext/standard/str_pad.stub', 'str_repeat' => 'stubs/ext/standard/str_repeat.stub', 'str_replace' => 'stubs/ext/standard/str_replace.stub', 'str_rot13' => 'stubs/ext/standard/str_rot13.stub', 'str_shuffle' => 'stubs/ext/standard/str_shuffle.stub', 'str_split' => 'stubs/ext/standard/str_split.stub', 'str_starts_with' => 'stubs/ext/standard/str_starts_with.stub', 'str_word_count' => 'stubs/ext/standard/str_word_count.stub', 'strcasecmp' => 'stubs/Zend/strcasecmp.stub', 'strchr' => 'stubs/ext/standard/strchr.stub', 'strcmp' => 'stubs/Zend/strcmp.stub', 'strcoll' => 'stubs/ext/standard/strcoll.stub', 'strcspn' => 'stubs/ext/standard/strcspn.stub', 'stream_bucket_append' => 'stubs/ext/standard/stream_bucket_append.stub', 'stream_bucket_make_writeable' => 'stubs/ext/standard/stream_bucket_make_writeable.stub', 'stream_bucket_new' => 'stubs/ext/standard/stream_bucket_new.stub', 'stream_bucket_prepend' => 'stubs/ext/standard/stream_bucket_prepend.stub', 'stream_context_create' => 'stubs/ext/standard/stream_context_create.stub', 'stream_context_get_default' => 'stubs/ext/standard/stream_context_get_default.stub', 'stream_context_get_options' => 'stubs/ext/standard/stream_context_get_options.stub', 'stream_context_get_params' => 'stubs/ext/standard/stream_context_get_params.stub', 'stream_context_set_default' => 'stubs/ext/standard/stream_context_set_default.stub', 'stream_context_set_option' => 'stubs/ext/standard/stream_context_set_option.stub', 'stream_context_set_params' => 'stubs/ext/standard/stream_context_set_params.stub', 'stream_copy_to_stream' => 'stubs/ext/standard/stream_copy_to_stream.stub', 'stream_filter_append' => 'stubs/ext/standard/stream_filter_append.stub', 'stream_filter_prepend' => 'stubs/ext/standard/stream_filter_prepend.stub', 'stream_filter_register' => 'stubs/ext/standard/stream_filter_register.stub', 'stream_filter_remove' => 'stubs/ext/standard/stream_filter_remove.stub', 'stream_get_contents' => 'stubs/ext/standard/stream_get_contents.stub', 'stream_get_filters' => 'stubs/ext/standard/stream_get_filters.stub', 'stream_get_line' => 'stubs/ext/standard/stream_get_line.stub', 'stream_get_meta_data' => 'stubs/ext/standard/stream_get_meta_data.stub', 'stream_get_transports' => 'stubs/ext/standard/stream_get_transports.stub', 'stream_get_wrappers' => 'stubs/ext/standard/stream_get_wrappers.stub', 'stream_is_local' => 'stubs/ext/standard/stream_is_local.stub', 'stream_isatty' => 'stubs/ext/standard/stream_isatty.stub', 'stream_register_wrapper' => 'stubs/ext/standard/stream_register_wrapper.stub', 'stream_resolve_include_path' => 'stubs/ext/standard/stream_resolve_include_path.stub', 'stream_select' => 'stubs/ext/standard/stream_select.stub', 'stream_set_blocking' => 'stubs/ext/standard/stream_set_blocking.stub', 'stream_set_chunk_size' => 'stubs/ext/standard/stream_set_chunk_size.stub', 'stream_set_read_buffer' => 'stubs/ext/standard/stream_set_read_buffer.stub', 'stream_set_timeout' => 'stubs/ext/standard/stream_set_timeout.stub', 'stream_set_write_buffer' => 'stubs/ext/standard/stream_set_write_buffer.stub', 'stream_socket_accept' => 'stubs/ext/standard/stream_socket_accept.stub', 'stream_socket_client' => 'stubs/ext/standard/stream_socket_client.stub', 'stream_socket_enable_crypto' => 'stubs/ext/standard/stream_socket_enable_crypto.stub', 'stream_socket_get_name' => 'stubs/ext/standard/stream_socket_get_name.stub', 'stream_socket_pair' => 'stubs/ext/standard/stream_socket_pair.stub', 'stream_socket_recvfrom' => 'stubs/ext/standard/stream_socket_recvfrom.stub', 'stream_socket_sendto' => 'stubs/ext/standard/stream_socket_sendto.stub', 'stream_socket_server' => 'stubs/ext/standard/stream_socket_server.stub', 'stream_socket_shutdown' => 'stubs/ext/standard/stream_socket_shutdown.stub', 'stream_supports_lock' => 'stubs/ext/standard/stream_supports_lock.stub', 'stream_wrapper_register' => 'stubs/ext/standard/stream_wrapper_register.stub', 'stream_wrapper_restore' => 'stubs/ext/standard/stream_wrapper_restore.stub', 'stream_wrapper_unregister' => 'stubs/ext/standard/stream_wrapper_unregister.stub', 'strftime' => 'stubs/ext/date/strftime.stub', 'strip_tags' => 'stubs/ext/standard/strip_tags.stub', 'stripcslashes' => 'stubs/ext/standard/stripcslashes.stub', 'stripos' => 'stubs/ext/standard/stripos.stub', 'stripslashes' => 'stubs/ext/standard/stripslashes.stub', 'stristr' => 'stubs/ext/standard/stristr.stub', 'strlen' => 'stubs/Zend/strlen.stub', 'strnatcasecmp' => 'stubs/ext/standard/strnatcasecmp.stub', 'strnatcmp' => 'stubs/ext/standard/strnatcmp.stub', 'strncasecmp' => 'stubs/Zend/strncasecmp.stub', 'strncmp' => 'stubs/Zend/strncmp.stub', 'strpbrk' => 'stubs/ext/standard/strpbrk.stub', 'strpos' => 'stubs/ext/standard/strpos.stub', 'strptime' => 'stubs/ext/standard/strptime.stub', 'strrchr' => 'stubs/ext/standard/strrchr.stub', 'strrev' => 'stubs/ext/standard/strrev.stub', 'strripos' => 'stubs/ext/standard/strripos.stub', 'strrpos' => 'stubs/ext/standard/strrpos.stub', 'strspn' => 'stubs/ext/standard/strspn.stub', 'strstr' => 'stubs/ext/standard/strstr.stub', 'strtok' => 'stubs/ext/standard/strtok.stub', 'strtolower' => 'stubs/ext/standard/strtolower.stub', 'strtotime' => 'stubs/ext/date/strtotime.stub', 'strtoupper' => 'stubs/ext/standard/strtoupper.stub', 'strtr' => 'stubs/ext/standard/strtr.stub', 'strval' => 'stubs/ext/standard/strval.stub', 'substr' => 'stubs/ext/standard/substr.stub', 'substr_compare' => 'stubs/ext/standard/substr_compare.stub', 'substr_count' => 'stubs/ext/standard/substr_count.stub', 'substr_replace' => 'stubs/ext/standard/substr_replace.stub', 'symlink' => 'stubs/ext/standard/symlink.stub', 'sys_get_temp_dir' => 'stubs/ext/standard/sys_get_temp_dir.stub', 'sys_getloadavg' => 'stubs/ext/standard/sys_getloadavg.stub', 'syslog' => 'stubs/ext/standard/syslog.stub', 'system' => 'stubs/ext/standard/system.stub', 'tan' => 'stubs/ext/standard/tan.stub', 'tanh' => 'stubs/ext/standard/tanh.stub', 'tempnam' => 'stubs/ext/standard/tempnam.stub', 'textdomain' => 'stubs/ext/gettext/textdomain.stub', 'tidy_access_count' => 'stubs/ext/tidy/tidy_access_count.stub', 'tidy_clean_repair' => 'stubs/ext/tidy/tidy_clean_repair.stub', 'tidy_config_count' => 'stubs/ext/tidy/tidy_config_count.stub', 'tidy_diagnose' => 'stubs/ext/tidy/tidy_diagnose.stub', 'tidy_error_count' => 'stubs/ext/tidy/tidy_error_count.stub', 'tidy_get_body' => 'stubs/ext/tidy/tidy_get_body.stub', 'tidy_get_config' => 'stubs/ext/tidy/tidy_get_config.stub', 'tidy_get_error_buffer' => 'stubs/ext/tidy/tidy_get_error_buffer.stub', 'tidy_get_head' => 'stubs/ext/tidy/tidy_get_head.stub', 'tidy_get_html' => 'stubs/ext/tidy/tidy_get_html.stub', 'tidy_get_html_ver' => 'stubs/ext/tidy/tidy_get_html_ver.stub', 'tidy_get_opt_doc' => 'stubs/ext/tidy/tidy_get_opt_doc.stub', 'tidy_get_output' => 'stubs/ext/tidy/tidy_get_output.stub', 'tidy_get_release' => 'stubs/ext/tidy/tidy_get_release.stub', 'tidy_get_root' => 'stubs/ext/tidy/tidy_get_root.stub', 'tidy_get_status' => 'stubs/ext/tidy/tidy_get_status.stub', 'tidy_getopt' => 'stubs/ext/tidy/tidy_getopt.stub', 'tidy_is_xhtml' => 'stubs/ext/tidy/tidy_is_xhtml.stub', 'tidy_is_xml' => 'stubs/ext/tidy/tidy_is_xml.stub', 'tidy_parse_file' => 'stubs/ext/tidy/tidy_parse_file.stub', 'tidy_parse_string' => 'stubs/ext/tidy/tidy_parse_string.stub', 'tidy_repair_file' => 'stubs/ext/tidy/tidy_repair_file.stub', 'tidy_repair_string' => 'stubs/ext/tidy/tidy_repair_string.stub', 'tidy_warning_count' => 'stubs/ext/tidy/tidy_warning_count.stub', 'time' => 'stubs/ext/date/time.stub', 'time_nanosleep' => 'stubs/ext/standard/time_nanosleep.stub', 'time_sleep_until' => 'stubs/ext/standard/time_sleep_until.stub', 'timezone_abbreviations_list' => 'stubs/ext/date/timezone_abbreviations_list.stub', 'timezone_identifiers_list' => 'stubs/ext/date/timezone_identifiers_list.stub', 'timezone_location_get' => 'stubs/ext/date/timezone_location_get.stub', 'timezone_name_from_abbr' => 'stubs/ext/date/timezone_name_from_abbr.stub', 'timezone_name_get' => 'stubs/ext/date/timezone_name_get.stub', 'timezone_offset_get' => 'stubs/ext/date/timezone_offset_get.stub', 'timezone_open' => 'stubs/ext/date/timezone_open.stub', 'timezone_transitions_get' => 'stubs/ext/date/timezone_transitions_get.stub', 'timezone_version_get' => 'stubs/ext/date/timezone_version_get.stub', 'tmpfile' => 'stubs/ext/standard/tmpfile.stub', 'token_get_all' => 'stubs/ext/tokenizer/token_get_all.stub', 'token_name' => 'stubs/ext/tokenizer/token_name.stub', 'touch' => 'stubs/ext/standard/touch.stub', 'trait_exists' => 'stubs/Zend/trait_exists.stub', 'transliterator_create' => 'stubs/ext/intl/transliterator_create.stub', 'transliterator_create_from_rules' => 'stubs/ext/intl/transliterator_create_from_rules.stub', 'transliterator_create_inverse' => 'stubs/ext/intl/transliterator_create_inverse.stub', 'transliterator_get_error_code' => 'stubs/ext/intl/transliterator_get_error_code.stub', 'transliterator_get_error_message' => 'stubs/ext/intl/transliterator_get_error_message.stub', 'transliterator_list_ids' => 'stubs/ext/intl/transliterator_list_ids.stub', 'transliterator_transliterate' => 'stubs/ext/intl/transliterator_transliterate.stub', 'trigger_error' => 'stubs/Zend/trigger_error.stub', 'trim' => 'stubs/ext/standard/trim.stub', 'uasort' => 'stubs/ext/standard/uasort.stub', 'ucfirst' => 'stubs/ext/standard/ucfirst.stub', 'ucwords' => 'stubs/ext/standard/ucwords.stub', 'uksort' => 'stubs/ext/standard/uksort.stub', 'umask' => 'stubs/ext/standard/umask.stub', 'uniqid' => 'stubs/ext/standard/uniqid.stub', 'unixtojd' => 'stubs/ext/calendar/unixtojd.stub', 'unlink' => 'stubs/ext/standard/unlink.stub', 'unpack' => 'stubs/ext/standard/unpack.stub', 'unregister_tick_function' => 'stubs/ext/standard/unregister_tick_function.stub', 'unserialize' => 'stubs/ext/standard/unserialize.stub', 'urldecode' => 'stubs/ext/standard/urldecode.stub', 'urlencode' => 'stubs/ext/standard/urlencode.stub', 'use_soap_error_handler' => 'stubs/ext/soap/use_soap_error_handler.stub', 'user_error' => 'stubs/Zend/user_error.stub', 'usleep' => 'stubs/ext/standard/usleep.stub', 'usort' => 'stubs/ext/standard/usort.stub', 'utf8_decode' => 'stubs/ext/standard/utf8_decode.stub', 'utf8_encode' => 'stubs/ext/standard/utf8_encode.stub', 'var_dump' => 'stubs/ext/standard/var_dump.stub', 'var_export' => 'stubs/ext/standard/var_export.stub', 'variant_abs' => 'stubs/ext/com_dotnet/variant_abs.stub', 'variant_add' => 'stubs/ext/com_dotnet/variant_add.stub', 'variant_and' => 'stubs/ext/com_dotnet/variant_and.stub', 'variant_cast' => 'stubs/ext/com_dotnet/variant_cast.stub', 'variant_cat' => 'stubs/ext/com_dotnet/variant_cat.stub', 'variant_cmp' => 'stubs/ext/com_dotnet/variant_cmp.stub', 'variant_date_from_timestamp' => 'stubs/ext/com_dotnet/variant_date_from_timestamp.stub', 'variant_date_to_timestamp' => 'stubs/ext/com_dotnet/variant_date_to_timestamp.stub', 'variant_div' => 'stubs/ext/com_dotnet/variant_div.stub', 'variant_eqv' => 'stubs/ext/com_dotnet/variant_eqv.stub', 'variant_fix' => 'stubs/ext/com_dotnet/variant_fix.stub', 'variant_get_type' => 'stubs/ext/com_dotnet/variant_get_type.stub', 'variant_idiv' => 'stubs/ext/com_dotnet/variant_idiv.stub', 'variant_imp' => 'stubs/ext/com_dotnet/variant_imp.stub', 'variant_int' => 'stubs/ext/com_dotnet/variant_int.stub', 'variant_mod' => 'stubs/ext/com_dotnet/variant_mod.stub', 'variant_mul' => 'stubs/ext/com_dotnet/variant_mul.stub', 'variant_neg' => 'stubs/ext/com_dotnet/variant_neg.stub', 'variant_not' => 'stubs/ext/com_dotnet/variant_not.stub', 'variant_or' => 'stubs/ext/com_dotnet/variant_or.stub', 'variant_pow' => 'stubs/ext/com_dotnet/variant_pow.stub', 'variant_round' => 'stubs/ext/com_dotnet/variant_round.stub', 'variant_set' => 'stubs/ext/com_dotnet/variant_set.stub', 'variant_set_type' => 'stubs/ext/com_dotnet/variant_set_type.stub', 'variant_sub' => 'stubs/ext/com_dotnet/variant_sub.stub', 'variant_xor' => 'stubs/ext/com_dotnet/variant_xor.stub', 'version_compare' => 'stubs/ext/standard/version_compare.stub', 'vfprintf' => 'stubs/ext/standard/vfprintf.stub', 'virtual' => 'stubs/sapi/apache2handler/virtual.stub', 'vprintf' => 'stubs/ext/standard/vprintf.stub', 'vsprintf' => 'stubs/ext/standard/vsprintf.stub', 'wordwrap' => 'stubs/ext/standard/wordwrap.stub', 'xml_error_string' => 'stubs/ext/xml/xml_error_string.stub', 'xml_get_current_byte_index' => 'stubs/ext/xml/xml_get_current_byte_index.stub', 'xml_get_current_column_number' => 'stubs/ext/xml/xml_get_current_column_number.stub', 'xml_get_current_line_number' => 'stubs/ext/xml/xml_get_current_line_number.stub', 'xml_get_error_code' => 'stubs/ext/xml/xml_get_error_code.stub', 'xml_parse' => 'stubs/ext/xml/xml_parse.stub', 'xml_parse_into_struct' => 'stubs/ext/xml/xml_parse_into_struct.stub', 'xml_parser_create' => 'stubs/ext/xml/xml_parser_create.stub', 'xml_parser_create_ns' => 'stubs/ext/xml/xml_parser_create_ns.stub', 'xml_parser_free' => 'stubs/ext/xml/xml_parser_free.stub', 'xml_parser_get_option' => 'stubs/ext/xml/xml_parser_get_option.stub', 'xml_parser_set_option' => 'stubs/ext/xml/xml_parser_set_option.stub', 'xml_set_character_data_handler' => 'stubs/ext/xml/xml_set_character_data_handler.stub', 'xml_set_default_handler' => 'stubs/ext/xml/xml_set_default_handler.stub', 'xml_set_element_handler' => 'stubs/ext/xml/xml_set_element_handler.stub', 'xml_set_end_namespace_decl_handler' => 'stubs/ext/xml/xml_set_end_namespace_decl_handler.stub', 'xml_set_external_entity_ref_handler' => 'stubs/ext/xml/xml_set_external_entity_ref_handler.stub', 'xml_set_notation_decl_handler' => 'stubs/ext/xml/xml_set_notation_decl_handler.stub', 'xml_set_object' => 'stubs/ext/xml/xml_set_object.stub', 'xml_set_processing_instruction_handler' => 'stubs/ext/xml/xml_set_processing_instruction_handler.stub', 'xml_set_start_namespace_decl_handler' => 'stubs/ext/xml/xml_set_start_namespace_decl_handler.stub', 'xml_set_unparsed_entity_decl_handler' => 'stubs/ext/xml/xml_set_unparsed_entity_decl_handler.stub', 'xmlwriter_end_attribute' => 'stubs/ext/xmlwriter/xmlwriter_end_attribute.stub', 'xmlwriter_end_cdata' => 'stubs/ext/xmlwriter/xmlwriter_end_cdata.stub', 'xmlwriter_end_comment' => 'stubs/ext/xmlwriter/xmlwriter_end_comment.stub', 'xmlwriter_end_document' => 'stubs/ext/xmlwriter/xmlwriter_end_document.stub', 'xmlwriter_end_dtd' => 'stubs/ext/xmlwriter/xmlwriter_end_dtd.stub', 'xmlwriter_end_dtd_attlist' => 'stubs/ext/xmlwriter/xmlwriter_end_dtd_attlist.stub', 'xmlwriter_end_dtd_element' => 'stubs/ext/xmlwriter/xmlwriter_end_dtd_element.stub', 'xmlwriter_end_dtd_entity' => 'stubs/ext/xmlwriter/xmlwriter_end_dtd_entity.stub', 'xmlwriter_end_element' => 'stubs/ext/xmlwriter/xmlwriter_end_element.stub', 'xmlwriter_end_pi' => 'stubs/ext/xmlwriter/xmlwriter_end_pi.stub', 'xmlwriter_flush' => 'stubs/ext/xmlwriter/xmlwriter_flush.stub', 'xmlwriter_full_end_element' => 'stubs/ext/xmlwriter/xmlwriter_full_end_element.stub', 'xmlwriter_open_memory' => 'stubs/ext/xmlwriter/xmlwriter_open_memory.stub', 'xmlwriter_open_uri' => 'stubs/ext/xmlwriter/xmlwriter_open_uri.stub', 'xmlwriter_output_memory' => 'stubs/ext/xmlwriter/xmlwriter_output_memory.stub', 'xmlwriter_set_indent' => 'stubs/ext/xmlwriter/xmlwriter_set_indent.stub', 'xmlwriter_set_indent_string' => 'stubs/ext/xmlwriter/xmlwriter_set_indent_string.stub', 'xmlwriter_start_attribute' => 'stubs/ext/xmlwriter/xmlwriter_start_attribute.stub', 'xmlwriter_start_attribute_ns' => 'stubs/ext/xmlwriter/xmlwriter_start_attribute_ns.stub', 'xmlwriter_start_cdata' => 'stubs/ext/xmlwriter/xmlwriter_start_cdata.stub', 'xmlwriter_start_comment' => 'stubs/ext/xmlwriter/xmlwriter_start_comment.stub', 'xmlwriter_start_document' => 'stubs/ext/xmlwriter/xmlwriter_start_document.stub', 'xmlwriter_start_dtd' => 'stubs/ext/xmlwriter/xmlwriter_start_dtd.stub', 'xmlwriter_start_dtd_attlist' => 'stubs/ext/xmlwriter/xmlwriter_start_dtd_attlist.stub', 'xmlwriter_start_dtd_element' => 'stubs/ext/xmlwriter/xmlwriter_start_dtd_element.stub', 'xmlwriter_start_dtd_entity' => 'stubs/ext/xmlwriter/xmlwriter_start_dtd_entity.stub', 'xmlwriter_start_element' => 'stubs/ext/xmlwriter/xmlwriter_start_element.stub', 'xmlwriter_start_element_ns' => 'stubs/ext/xmlwriter/xmlwriter_start_element_ns.stub', 'xmlwriter_start_pi' => 'stubs/ext/xmlwriter/xmlwriter_start_pi.stub', 'xmlwriter_text' => 'stubs/ext/xmlwriter/xmlwriter_text.stub', 'xmlwriter_write_attribute' => 'stubs/ext/xmlwriter/xmlwriter_write_attribute.stub', 'xmlwriter_write_attribute_ns' => 'stubs/ext/xmlwriter/xmlwriter_write_attribute_ns.stub', 'xmlwriter_write_cdata' => 'stubs/ext/xmlwriter/xmlwriter_write_cdata.stub', 'xmlwriter_write_comment' => 'stubs/ext/xmlwriter/xmlwriter_write_comment.stub', 'xmlwriter_write_dtd' => 'stubs/ext/xmlwriter/xmlwriter_write_dtd.stub', 'xmlwriter_write_dtd_attlist' => 'stubs/ext/xmlwriter/xmlwriter_write_dtd_attlist.stub', 'xmlwriter_write_dtd_element' => 'stubs/ext/xmlwriter/xmlwriter_write_dtd_element.stub', 'xmlwriter_write_dtd_entity' => 'stubs/ext/xmlwriter/xmlwriter_write_dtd_entity.stub', 'xmlwriter_write_element' => 'stubs/ext/xmlwriter/xmlwriter_write_element.stub', 'xmlwriter_write_element_ns' => 'stubs/ext/xmlwriter/xmlwriter_write_element_ns.stub', 'xmlwriter_write_pi' => 'stubs/ext/xmlwriter/xmlwriter_write_pi.stub', 'xmlwriter_write_raw' => 'stubs/ext/xmlwriter/xmlwriter_write_raw.stub', 'zend_thread_id' => 'stubs/Zend/zend_thread_id.stub', 'zend_version' => 'stubs/Zend/zend_version.stub', 'zip_close' => 'stubs/ext/zip/zip_close.stub', 'zip_entry_close' => 'stubs/ext/zip/zip_entry_close.stub', 'zip_entry_compressedsize' => 'stubs/ext/zip/zip_entry_compressedsize.stub', 'zip_entry_compressionmethod' => 'stubs/ext/zip/zip_entry_compressionmethod.stub', 'zip_entry_filesize' => 'stubs/ext/zip/zip_entry_filesize.stub', 'zip_entry_name' => 'stubs/ext/zip/zip_entry_name.stub', 'zip_entry_open' => 'stubs/ext/zip/zip_entry_open.stub', 'zip_entry_read' => 'stubs/ext/zip/zip_entry_read.stub', 'zip_open' => 'stubs/ext/zip/zip_open.stub', 'zip_read' => 'stubs/ext/zip/zip_read.stub', 'zlib_decode' => 'stubs/ext/zlib/zlib_decode.stub', 'zlib_encode' => 'stubs/ext/zlib/zlib_encode.stub', 'zlib_get_coding_type' => 'stubs/ext/zlib/zlib_get_coding_type.stub');
        if ($phpVersionId >= 80100) {
            $classes = \array_merge($classes, array('__php_incomplete_class' => 'stubs/ext/standard/__PHP_Incomplete_Class.stub', 'assertionerror' => 'stubs/ext/standard/AssertionError.stub', 'backedenum' => 'stubs/Zend/BackedEnum.stub', 'badfunctioncallexception' => 'stubs/ext/spl/BadFunctionCallException.stub', 'badmethodcallexception' => 'stubs/ext/spl/BadMethodCallException.stub', 'com_safearray_proxy' => 'stubs/ext/com_dotnet/com_safearray_proxy.stub', 'curlstringfile' => 'stubs/ext/curl/CURLStringFile.stub', 'domainexception' => 'stubs/ext/spl/DomainException.stub', 'fiber' => 'stubs/Zend/Fiber.stub', 'fibererror' => 'stubs/Zend/FiberError.stub', 'ftp\\connection' => 'stubs/ext/ftp/FTP/Connection.stub', 'gdfont' => 'stubs/ext/gd/GdFont.stub', 'imap\\connection' => 'stubs/ext/imap/IMAP/Connection.stub', 'intldatepatterngenerator' => 'stubs/ext/intl/dateformat/IntlDatePatternGenerator.stub', 'invalidargumentexception' => 'stubs/ext/spl/InvalidArgumentException.stub', 'ldap\\connection' => 'stubs/ext/ldap/LDAP/Connection.stub', 'ldap\\result' => 'stubs/ext/ldap/LDAP/Result.stub', 'ldap\\resultentry' => 'stubs/ext/ldap/LDAP/ResultEntry.stub', 'lengthexception' => 'stubs/ext/spl/LengthException.stub', 'logicexception' => 'stubs/ext/spl/LogicException.stub', 'outofboundsexception' => 'stubs/ext/spl/OutOfBoundsException.stub', 'outofrangeexception' => 'stubs/ext/spl/OutOfRangeException.stub', 'overflowexception' => 'stubs/ext/spl/OverflowException.stub', 'pgsql\\connection' => 'stubs/ext/pgsql/PgSql/Connection.stub', 'pgsql\\lob' => 'stubs/ext/pgsql/PgSql/Lob.stub', 'pgsql\\result' => 'stubs/ext/pgsql/PgSql/Result.stub', 'pspell\\config' => 'stubs/ext/pspell/PSpell/Config.stub', 'pspell\\dictionary' => 'stubs/ext/pspell/PSpell/Dictionary.stub', 'rangeexception' => 'stubs/ext/spl/RangeException.stub', 'reflectionenum' => 'stubs/ext/reflection/ReflectionEnum.stub', 'reflectionenumbackedcase' => 'stubs/ext/reflection/ReflectionEnumBackedCase.stub', 'reflectionenumunitcase' => 'stubs/ext/reflection/ReflectionEnumUnitCase.stub', 'reflectionfiber' => 'stubs/ext/reflection/ReflectionFiber.stub', 'reflectionintersectiontype' => 'stubs/ext/reflection/ReflectionIntersectionType.stub', 'returntypewillchange' => 'stubs/Zend/ReturnTypeWillChange.stub', 'runtimeexception' => 'stubs/ext/spl/RuntimeException.stub', 'stdclass' => 'stubs/Zend/stdClass.stub', 'underflowexception' => 'stubs/ext/spl/UnderflowException.stub', 'unexpectedvalueexception' => 'stubs/ext/spl/UnexpectedValueException.stub', 'unitenum' => 'stubs/Zend/UnitEnum.stub'));
            $functions = \array_merge($functions, array('array_is_list' => 'stubs/ext/standard/array_is_list.stub', 'enum_exists' => 'stubs/Zend/enum_exists.stub', 'fdatasync' => 'stubs/ext/standard/fdatasync.stub', 'fsync' => 'stubs/ext/standard/fsync.stub', 'imageavif' => 'stubs/ext/gd/imageavif.stub', 'imagecreatefromavif' => 'stubs/ext/gd/imagecreatefromavif.stub', 'mysqli_fetch_column' => 'stubs/ext/mysqli/mysqli_fetch_column.stub', 'pcntl_rfork' => 'stubs/ext/pcntl/pcntl_rfork.stub', 'sodium_crypto_core_ristretto255_add' => 'stubs/ext/sodium/sodium_crypto_core_ristretto255_add.stub', 'sodium_crypto_core_ristretto255_from_hash' => 'stubs/ext/sodium/sodium_crypto_core_ristretto255_from_hash.stub', 'sodium_crypto_core_ristretto255_is_valid_point' => 'stubs/ext/sodium/sodium_crypto_core_ristretto255_is_valid_point.stub', 'sodium_crypto_core_ristretto255_random' => 'stubs/ext/sodium/sodium_crypto_core_ristretto255_random.stub', 'sodium_crypto_core_ristretto255_scalar_add' => 'stubs/ext/sodium/sodium_crypto_core_ristretto255_scalar_add.stub', 'sodium_crypto_core_ristretto255_scalar_complement' => 'stubs/ext/sodium/sodium_crypto_core_ristretto255_scalar_complement.stub', 'sodium_crypto_core_ristretto255_scalar_invert' => 'stubs/ext/sodium/sodium_crypto_core_ristretto255_scalar_invert.stub', 'sodium_crypto_core_ristretto255_scalar_mul' => 'stubs/ext/sodium/sodium_crypto_core_ristretto255_scalar_mul.stub', 'sodium_crypto_core_ristretto255_scalar_negate' => 'stubs/ext/sodium/sodium_crypto_core_ristretto255_scalar_negate.stub', 'sodium_crypto_core_ristretto255_scalar_random' => 'stubs/ext/sodium/sodium_crypto_core_ristretto255_scalar_random.stub', 'sodium_crypto_core_ristretto255_scalar_reduce' => 'stubs/ext/sodium/sodium_crypto_core_ristretto255_scalar_reduce.stub', 'sodium_crypto_core_ristretto255_scalar_sub' => 'stubs/ext/sodium/sodium_crypto_core_ristretto255_scalar_sub.stub', 'sodium_crypto_core_ristretto255_sub' => 'stubs/ext/sodium/sodium_crypto_core_ristretto255_sub.stub', 'sodium_crypto_scalarmult_ristretto255' => 'stubs/ext/sodium/sodium_crypto_scalarmult_ristretto255.stub', 'sodium_crypto_scalarmult_ristretto255_base' => 'stubs/ext/sodium/sodium_crypto_scalarmult_ristretto255_base.stub', 'sodium_crypto_stream_xchacha20' => 'stubs/ext/sodium/sodium_crypto_stream_xchacha20.stub', 'sodium_crypto_stream_xchacha20_keygen' => 'stubs/ext/sodium/sodium_crypto_stream_xchacha20_keygen.stub', 'sodium_crypto_stream_xchacha20_xor' => 'stubs/ext/sodium/sodium_crypto_stream_xchacha20_xor.stub'));
        }
        if ($phpVersionId >= 80200) {
            $classes = \array_merge($classes, array('allowdynamicproperties' => 'stubs/Zend/AllowDynamicProperties.stub', 'random\\brokenrandomengineerror' => 'stubs/ext/random/Random/BrokenRandomEngineError.stub', 'random\\cryptosafeengine' => 'stubs/ext/random/Random/CryptoSafeEngine.stub', 'random\\engine' => 'stubs/ext/random/Random/Engine.stub', 'random\\engine\\mt19937' => 'stubs/ext/random/Random/Engine/Mt19937.stub', 'random\\engine\\pcgoneseq128xslrr64' => 'stubs/ext/random/Random/Engine/PcgOneseq128XslRr64.stub', 'random\\engine\\secure' => 'stubs/ext/random/Random/Engine/Secure.stub', 'random\\engine\\xoshiro256starstar' => 'stubs/ext/random/Random/Engine/Xoshiro256StarStar.stub', 'random\\randomerror' => 'stubs/ext/random/Random/RandomError.stub', 'random\\randomexception' => 'stubs/ext/random/Random/RandomException.stub', 'random\\randomizer' => 'stubs/ext/random/Random/Randomizer.stub', 'sensitiveparameter' => 'stubs/Zend/SensitiveParameter.stub', 'sensitiveparametervalue' => 'stubs/Zend/SensitiveParameterValue.stub'));
            $functions = \array_merge($functions, array('curl_upkeep' => 'stubs/ext/curl/curl_upkeep.stub', 'getrandmax' => 'stubs/ext/random/getrandmax.stub', 'imap_is_open' => 'stubs/ext/imap/imap_is_open.stub', 'ini_parse_quantity' => 'stubs/ext/standard/ini_parse_quantity.stub', 'lcg_value' => 'stubs/ext/random/lcg_value.stub', 'libxml_get_external_entity_loader' => 'stubs/ext/libxml/libxml_get_external_entity_loader.stub', 'memory_reset_peak_usage' => 'stubs/ext/standard/memory_reset_peak_usage.stub', 'mt_getrandmax' => 'stubs/ext/random/mt_getrandmax.stub', 'mt_rand' => 'stubs/ext/random/mt_rand.stub', 'mt_srand' => 'stubs/ext/random/mt_srand.stub', 'mysqli_execute_query' => 'stubs/ext/mysqli/mysqli_execute_query.stub', 'oci_set_prefetch_lob' => 'stubs/ext/oci8/oci_set_prefetch_lob.stub', 'odbc_connection_string_is_quoted' => 'stubs/ext/odbc/odbc_connection_string_is_quoted.stub', 'odbc_connection_string_quote' => 'stubs/ext/odbc/odbc_connection_string_quote.stub', 'odbc_connection_string_should_quote' => 'stubs/ext/odbc/odbc_connection_string_should_quote.stub', 'openssl_cipher_key_length' => 'stubs/ext/openssl/openssl_cipher_key_length.stub', 'pcntl_forkx' => 'stubs/ext/pcntl/pcntl_forkx.stub', 'rand' => 'stubs/ext/random/rand.stub', 'random_bytes' => 'stubs/ext/random/random_bytes.stub', 'random_int' => 'stubs/ext/random/random_int.stub', 'sodium_crypto_stream_xchacha20_xor_ic' => 'stubs/ext/sodium/sodium_crypto_stream_xchacha20_xor_ic.stub', 'srand' => 'stubs/ext/random/srand.stub'));
        }
        // UPDATE BELONGS HERE
        $this->classes = $classes;
        $this->functions = $functions;
    }
}
<?php 

function phpdbg_prompt(string $string) : void
{
}<?php 

function phpdbg_end_oplog(array $options = []) : ?array
{
}<?php 

function phpdbg_break_method(string $class, string $method) : void
{
}<?php 

function phpdbg_start_oplog() : void
{
}<?php 

function phpdbg_break_function(string $function) : void
{
}<?php 

function phpdbg_get_executable(array $options = []) : array
{
}<?php 

function phpdbg_color(int $element, string $color) : void
{
}<?php 

/** @generate-function-entries */
function phpdbg_break_next() : void
{
}<?php 

function phpdbg_break_file(string $file, int $line) : void
{
}<?php 

function phpdbg_clear() : void
{
}<?php 

function phpdbg_exec(string $context) : string|bool
{
}<?php 

function cli_set_process_title(string $title) : bool
{
}<?php 

function apache_response_headers() : array
{
}<?php 

function cli_get_process_title() : ?string
{
}<?php 

function getallheaders() : array
{
}<?php 

function apache_request_headers() : array
{
}<?php 

function apache_getenv(string $variable, bool $walk_to_top = false) : string|false
{
}<?php 

/** @generate-function-entries */
function apache_lookup_uri(string $filename) : object|false
{
}<?php 

function apache_response_headers() : array
{
}<?php 

function virtual(string $uri) : bool
{
}<?php 

function apache_setenv(string $variable, string $value, bool $walk_to_top = false) : bool
{
}<?php 

function apache_get_version() : string|false
{
}<?php 

function apache_get_modules() : array
{
}<?php 

/** @alias apache_request_headers */
function getallheaders() : array
{
}<?php 

function apache_request_headers() : array
{
}<?php 

function apache_note(string $note_name, ?string $note_value = null) : string|false
{
}<?php 

/** @generate-function-entries */
function apache_child_terminate() : void
{
}<?php 

function apache_response_headers() : array
{
}<?php 

/** @alias apache_request_headers */
function getallheaders() : array
{
}<?php 

function apache_request_headers() : array
{
}<?php 

/** @generate-function-entries */
function fastcgi_finish_request() : bool
{
}<?php 

/** @alias apache_request_headers */
function getallheaders() : array
{
}<?php 

function apache_request_headers() : array
{
}<?php 

function fpm_get_status() : array|false
{
}<?php 

/** @generate-function-entries */
function litespeed_request_headers() : array
{
}<?php 

function litespeed_finish_request() : bool
{
}<?php 

/** @alias litespeed_response_headers */
function apache_response_headers() : array|false
{
}<?php 

function apache_get_modules() : array
{
}<?php 

/** @alias litespeed_request_headers */
function getallheaders() : array
{
}<?php 

/** @alias litespeed_request_headers */
function apache_request_headers() : array
{
}<?php 

function litespeed_response_headers() : array|false
{
}<?php 

/**
 * @refcount 1
 */
function get_defined_vars() : array
{
}<?php 

#[\Since('8.1')]
final class ReturnTypeWillChange
{
    public function __construct()
    {
    }
}<?php 

function func_get_args() : array
{
}<?php 

/**
 * @refcount 1
 */
function get_extension_funcs(string $extension) : array|false
{
}<?php 

function class_alias(string $class, string $alias, bool $autoload = true) : bool
{
}<?php 

/** @param resource $resource */
function get_resource_id($resource) : int
{
}<?php 

/**
 * @refcount 1
 */
function gc_status() : array
{
}<?php 

interface Iterator extends \Traversable
{
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function current();
    /**
     * @tentative-return-type
     * @return void
     */
    public function next();
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function key();
    /**
     * @tentative-return-type
     * @return bool
     */
    public function valid();
    /**
     * @tentative-return-type
     * @return void
     */
    public function rewind();
}<?php 

class UnhandledMatchError extends \Error
{
}<?php 

/** @generate-function-entries */
final class WeakReference
{
    public function __construct()
    {
    }
    public static function create(object $object) : WeakReference
    {
    }
    public function get() : ?object
    {
    }
}<?php 

/**
 * @refcount 1
 */
function get_class_methods(object|string $object_or_class) : array
{
}<?php 

interface IteratorAggregate extends \Traversable
{
    /**
     * @tentative-return-type
     * @return Traversable
     */
    public function getIterator();
}<?php 

/** @generate-class-entries */
/**
 * @strict-properties
 * @not-serializable
 */
#[\Since('8.1')]
final class Fiber
{
    public function __construct(callable $callback)
    {
    }
    public function start(mixed ...$args) : mixed
    {
    }
    public function resume(mixed $value = null) : mixed
    {
    }
    public function throw(Throwable $exception) : mixed
    {
    }
    public function isStarted() : bool
    {
    }
    public function isSuspended() : bool
    {
    }
    public function isRunning() : bool
    {
    }
    public function isTerminated() : bool
    {
    }
    public function getReturn() : mixed
    {
    }
    public static function getCurrent() : ?Fiber
    {
    }
    public static function suspend(mixed $value = null) : mixed
    {
    }
}<?php 

function trait_exists(string $trait, bool $autoload = true) : bool
{
}<?php 

#[\Since('8.1')]
function enum_exists(string $enum, bool $autoload = true) : bool
{
}<?php 

#[\Attribute(Attribute::TARGET_CLASS)]
#[\Since('8.2')]
final class AllowDynamicProperties
{
    public function __construct()
    {
    }
}<?php 

function strcasecmp(string $string1, string $string2) : int
{
}<?php 

/**
 * @refcount 1
 */
function get_declared_traits() : array
{
}<?php 

interface Serializable
{
    /** @return string|null */
    public function serialize();
    /** @return void */
    public function unserialize(string $data);
}<?php 

/** @return string|array|object|null */
function set_error_handler(?callable $callback, int $error_levels = E_ALL)
{
}<?php 

/** @param object|string $object_or_class */
function is_subclass_of(mixed $object_or_class, string $class, bool $allow_string = true) : bool
{
}<?php 

function get_mangled_object_vars(object $object) : array
{
}<?php 

/**
 * @alias get_included_files
 */
function get_required_files() : array
{
}<?php 

#[\Since('8.1')]
final class FiberError extends \Error
{
    public function __construct()
    {
    }
}<?php 

function gc_collect_cycles() : int
{
}<?php 

function error_reporting(?int $error_level = null) : int
{
}<?php 

/** @param object|string $object_or_class */
function is_a(mixed $object_or_class, string $class, bool $allow_string = false) : bool
{
}<?php 

function func_num_args() : int
{
}<?php 

/** @param object|string $object_or_class */
function method_exists($object_or_class, string $method) : bool
{
}<?php 

/** @generate-function-entries */
final class Generator implements \Iterator
{
    public function rewind() : void
    {
    }
    public function valid() : bool
    {
    }
    public function current() : mixed
    {
    }
    public function key() : mixed
    {
    }
    public function next() : void
    {
    }
    public function send(mixed $value) : mixed
    {
    }
    public function throw(Throwable $exception) : mixed
    {
    }
    public function getReturn() : mixed
    {
    }
}<?php 

#[\Until('8.2')]
function restore_error_handler() : bool
{
}
#[\Since('8.2')]
function restore_error_handler() : true
{
}<?php 

function get_object_vars(object $object) : array
{
}<?php 

/**
 * @refcount 1
 */
function get_included_files() : array
{
}<?php 

function extension_loaded(string $extension) : bool
{
}<?php 

function gc_disable() : void
{
}<?php 

/**
 * @refcount 1
 */
function get_defined_constants(bool $categorize = false) : array
{
}<?php 

/** @generate-class-entries */
#[\Since('8.1')]
interface UnitEnum
{
    public static function cases() : array;
}<?php 

function defined(string $constant_name) : bool
{
}<?php 

/**
 * @refcount 1
 */
function get_defined_functions(bool $exclude_disabled = true) : array
{
}<?php 

function get_called_class() : string
{
}<?php 

/** @param resource $resource */
function get_resource_type($resource) : string
{
}<?php 

#[\Since('8.1')]
interface BackedEnum extends \UnitEnum
{
    public static function from(int|string $value) : static;
    public static function tryFrom(int|string $value) : ?static;
}<?php 

class CompileError extends \Error
{
}<?php 

class ArithmeticError extends \Error
{
}<?php 

function get_parent_class(object|string $object_or_class = UNKNOWN) : string|false
{
}<?php 

/** @alias trigger_error */
function user_error(string $message, int $error_level = E_USER_NOTICE) : bool
{
}<?php 

/** @param object|string $object_or_class */
function property_exists($object_or_class, string $property) : bool
{
}<?php 

final class WeakMap implements \ArrayAccess, \Countable, \IteratorAggregate
{
    /**
     * @param object $object
     */
    public function offsetGet($object) : mixed
    {
    }
    /** @param object $object */
    public function offsetSet($object, mixed $value) : void
    {
    }
    /** @param object $object */
    public function offsetExists($object) : bool
    {
    }
    /** @param object $object */
    public function offsetUnset($object) : void
    {
    }
    public function count() : int
    {
    }
    public function getIterator() : Iterator
    {
    }
}<?php 

/** @return string|array|object|null */
function set_exception_handler(?callable $callback)
{
}<?php 

function get_class(object $object = UNKNOWN) : string
{
}<?php 

class Error implements \Throwable
{
    /** @implementation-alias Exception::__clone */
    #[\Until('8.1')]
    private final function __clone() : void
    {
    }
    /** @implementation-alias Exception::__clone */
    #[\Since('8.1')]
    private function __clone() : void
    {
    }
    /** @implementation-alias Exception::__construct */
    public function __construct(string $message = "", int $code = 0, ?Throwable $previous = null)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Exception::__wakeup
     * @return void
     */
    public function __wakeup()
    {
    }
    /** @implementation-alias Exception::getMessage */
    public final function getMessage() : string
    {
    }
    /**
     * @return int
     * @implementation-alias Exception::getCode
     */
    public final function getCode()
    {
    }
    /** @implementation-alias Exception::getFile */
    public final function getFile() : string
    {
    }
    /** @implementation-alias Exception::getLine */
    public final function getLine() : int
    {
    }
    /** @implementation-alias Exception::getTrace */
    public final function getTrace() : array
    {
    }
    /** @implementation-alias Exception::getPrevious */
    public final function getPrevious() : ?Throwable
    {
    }
    /** @implementation-alias Exception::getTraceAsString */
    public final function getTraceAsString() : string
    {
    }
    /** @implementation-alias Exception::__toString */
    public function __toString() : string
    {
    }
}<?php 

function strncmp(string $string1, string $string2, int $length) : int
{
}<?php 

#if ZEND_DEBUG && defined(ZTS)
function zend_thread_id() : int
{
}<?php 

function strncasecmp(string $string1, string $string2, int $length) : int
{
}<?php 

/**
 * @refcount 1
 */
function get_class_vars(string $class) : array
{
}<?php 

class TypeError extends \Error
{
}<?php 

/**
 * @refcount 1
 */
function get_loaded_extensions(bool $zend_extensions = false) : array
{
}<?php 

class Exception implements \Throwable
{
    #[\Until('8.1')]
    private final function __clone() : void
    {
    }
    #[\Since('8.1')]
    private function __clone() : void
    {
    }
    public function __construct(string $message = "", int $code = 0, ?Throwable $previous = null)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function __wakeup()
    {
    }
    public final function getMessage() : string
    {
    }
    public final function getCode()
    {
    }
    public final function getFile() : string
    {
    }
    public final function getLine() : int
    {
    }
    public final function getTrace() : array
    {
    }
    public final function getPrevious() : ?Throwable
    {
    }
    public final function getTraceAsString() : string
    {
    }
    public function __toString() : string
    {
    }
}<?php 

class ParseError extends \CompileError
{
}<?php 

interface Stringable
{
    public function __toString() : string;
}<?php 

#[\Until('8.2')]
function restore_exception_handler() : bool
{
}
#[\Since('8.2')]
function restore_exception_handler() : true
{
}<?php 

function func_get_arg(int $position) : mixed
{
}<?php 

final class InternalIterator implements \Iterator
{
    /** @return mixed */
    #[\Until('8.1')]
    public function current();
    /** @return mixed */
    #[\Until('8.1')]
    public function key();
    private function __construct();
    #[\Since('8.1')]
    public function current() : mixed
    {
    }
    #[\Since('8.1')]
    public function key() : mixed
    {
    }
    public function next() : void;
    public function valid() : bool;
    public function rewind() : void;
}<?php 

/**
 * @refcount 1
 */
function get_declared_interfaces() : array
{
}<?php 

#endif
function gc_mem_caches() : int
{
}<?php 

/** @generate-function-entries */
final class Attribute
{
    public function __construct(int $flags = Attribute::TARGET_ALL)
    {
    }
}<?php 

class ArgumentCountError extends \TypeError
{
}<?php 

/**
 * @refcount 1
 */
function get_declared_classes() : array
{
}<?php 

/**
 * @refcount 1
 */
function debug_backtrace(int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT, int $limit = 0) : array
{
}<?php 

function gc_enabled() : bool
{
}<?php 

function strlen(string $string) : int
{
}<?php 

function gc_enable() : void
{
}<?php 

/** @generate-function-entries */
final class Closure
{
    private function __construct()
    {
    }
    public static function bind(Closure $closure, ?object $newThis, object|string|null $newScope = "static") : ?Closure
    {
    }
    public function bindTo(?object $newThis, object|string|null $newScope = "static") : ?Closure
    {
    }
    public function call(object $newThis, mixed ...$args) : mixed
    {
    }
    public static function fromCallable(callable $callback) : Closure
    {
    }
}<?php 

function get_resources(?string $type = null) : array
{
}<?php 

/** @generate-function-entries */
interface Traversable
{
}<?php 

function class_exists(string $class, bool $autoload = true) : bool
{
}<?php 

function function_exists(string $function) : bool
{
}<?php 

/** @param mixed $value */
#[\Until('8.1')]
function define(string $constant_name, $value, bool $case_insensitive = false) : bool
{
}
#[\Since('8.1')]
function define(string $constant_name, mixed $value, bool $case_insensitive = false) : bool
{
}<?php 

/** @generate-function-entries */
function zend_version() : string
{
}<?php 

function strcmp(string $string1, string $string2) : int
{
}<?php 

interface Countable
{
    /**
     * @tentative-return-type
     * @return int
     */
    public function count();
}<?php 

function debug_print_backtrace(int $options = 0, int $limit = 0) : void
{
}<?php 

/** @generate-class-entries */
#[\Since('8.1')]
class stdClass
{
}<?php 

function interface_exists(string $interface, bool $autoload = true) : bool
{
}<?php 

class ErrorException extends \Exception
{
    public function __construct(string $message = "", int $code = 0, int $severity = E_ERROR, ?string $filename = null, ?int $line = null, ?Throwable $previous = null)
    {
    }
    public final function getSeverity() : int
    {
    }
}<?php 

class ValueError extends \Error
{
}<?php 

interface ArrayAccess
{
    /**
     * @tentative-return-type
     * @return bool
     */
    public function offsetExists(mixed $offset);
    /**
     * Actually this should be return by ref but atm cannot be.
     * @tentative-return-type
     * @return mixed
     */
    public function offsetGet(mixed $offset);
    /**
     * @tentative-return-type
     * @return void
     */
    public function offsetSet(mixed $offset, mixed $value);
    /**
     * @tentative-return-type
     * @return void
     */
    public function offsetUnset(mixed $offset);
}<?php 

/**
 * @strict-properties
 * @not-serializable
 */
#[\Since('8.2')]
final class SensitiveParameterValue
{
    private readonly mixed $value;
    public function __construct(mixed $value)
    {
    }
    public function getValue() : mixed
    {
    }
    public function __debugInfo() : array
    {
    }
}<?php 

class ClosedGeneratorException extends \Exception
{
}<?php 

/**
 * @strict-properties
 */
#[\Attribute(Attribute::TARGET_PARAMETER)]
#[\Since('8.2')]
final class SensitiveParameter
{
    public function __construct()
    {
    }
}<?php 

class DivisionByZeroError extends \ArithmeticError
{
}<?php 

function trigger_error(string $message, int $error_level = E_USER_NOTICE) : bool
{
}<?php 

/** @generate-function-entries */
interface Throwable extends \Stringable
{
    public function getMessage() : string;
    public function getCode();
    public function getFile() : string;
    public function getLine() : int;
    public function getTrace() : array;
    public function getPrevious() : ?Throwable;
    public function getTraceAsString() : string;
}--------------------------------------------------------------------
                  The PHP License, version 3.01
Copyright (c) 1999 - 2019 The PHP Group. All rights reserved.
--------------------------------------------------------------------

Redistribution and use in source and binary forms, with or without
modification, is permitted provided that the following conditions
are met:

  1. Redistributions of source code must retain the above copyright
     notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright
     notice, this list of conditions and the following disclaimer in
     the documentation and/or other materials provided with the
     distribution.

  3. The name "PHP" must not be used to endorse or promote products
     derived from this software without prior written permission. For
     written permission, please contact group@php.net.

  4. Products derived from this software may not be called "PHP", nor
     may "PHP" appear in their name, without prior written permission
     from group@php.net.  You may indicate that your software works in
     conjunction with PHP by saying "Foo for PHP" instead of calling
     it "PHP Foo" or "phpfoo"

  5. The PHP Group may publish revised and/or new versions of the
     license from time to time. Each version will be given a
     distinguishing version number.
     Once covered code has been published under a particular version
     of the license, you may always continue to use it under the terms
     of that version. You may also choose to use such covered code
     under the terms of any subsequent version of the license
     published by the PHP Group. No one other than the PHP Group has
     the right to modify the terms applicable to covered code created
     under this License.

  6. Redistributions of any form whatsoever must retain the following
     acknowledgment:
     "This product includes PHP software, freely available from
     <http://www.php.net/software/>".

THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE PHP
DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------

This software consists of voluntary contributions made by many
individuals on behalf of the PHP Group.

The PHP Group can be contacted via Email at group@php.net.

For more information on the PHP Group and the PHP project,
please see <http://www.php.net>.

PHP includes the Zend Engine, freely available at
<http://www.zend.com>.
<?php 

namespace FFI;

final class CData
{
}<?php 

namespace FFI;

class Exception extends \Error
{
}<?php 

namespace FFI;

final class CType
{
    public function getName() : string
    {
    }
    #[\Since('8.1')]
    public function getKind() : int
    {
    }
    #[\Since('8.1')]
    public function getSize() : int
    {
    }
    #[\Since('8.1')]
    public function getAlignment() : int
    {
    }
    #[\Since('8.1')]
    public function getAttributes() : int
    {
    }
    #[\Since('8.1')]
    public function getEnumKind() : int
    {
    }
    #[\Since('8.1')]
    public function getArrayElementType() : CType
    {
    }
    #[\Since('8.1')]
    public function getArrayLength() : int
    {
    }
    #[\Since('8.1')]
    public function getPointerType() : CType
    {
    }
    #[\Since('8.1')]
    public function getStructFieldNames() : array
    {
    }
    #[\Since('8.1')]
    public function getStructFieldOffset(string $name) : int
    {
    }
    #[\Since('8.1')]
    public function getStructFieldType(string $name) : CType
    {
    }
    #[\Since('8.1')]
    public function getFuncABI() : int
    {
    }
    #[\Since('8.1')]
    public function getFuncReturnType() : CType
    {
    }
    #[\Since('8.1')]
    public function getFuncParameterCount() : int
    {
    }
    #[\Since('8.1')]
    public function getFuncParameterType(int $index) : CType
    {
    }
}<?php 

namespace FFI;

final class ParserException extends \FFI\Exception
{
}<?php 

final class FFI
{
    public static function cdef(string $code = "", ?string $lib = null) : FFI
    {
    }
    public static function load(string $filename) : ?FFI
    {
    }
    public static function scope(string $name) : FFI
    {
    }
    public static function new(FFI\CType|string $type, bool $owned = true, bool $persistent = false) : ?FFI\CData
    {
    }
    /** @prefer-ref $ptr */
    public static function free(FFI\CData $ptr) : void
    {
    }
    /**
     * @param FFI\CData|int|float|bool|null $ptr
     * @prefer-ref $ptr
     */
    public static function cast(FFI\CType|string $type, $ptr) : ?FFI\CData
    {
    }
    public static function type(string $type) : ?FFI\CType
    {
    }
    /** @prefer-ref $ptr */
    public static function typeof(FFI\CData $ptr) : FFI\CType
    {
    }
    public static function arrayType(FFI\CType $type, array $dimensions) : FFI\CType
    {
    }
    /** @prefer-ref $ptr */
    public static function addr(FFI\CData $ptr) : FFI\CData
    {
    }
    /** @prefer-ref $ptr */
    public static function sizeof(FFI\CData|FFI\CType $ptr) : int
    {
    }
    /** @prefer-ref $ptr */
    public static function alignof(FFI\CData|FFI\CType $ptr) : int
    {
    }
    /**
     * @param FFI\CData|string $from
     * @prefer-ref $to
     * @prefer-ref $from
     */
    public static function memcpy(FFI\CData $to, $from, int $size) : void
    {
    }
    /**
     * @prefer-ref $ptr1
     * @param string|FFI\CData $ptr1
     * @prefer-ref $ptr2
     * @param string|FFI\CData $ptr2
     */
    public static function memcmp($ptr1, $ptr2, int $size) : int
    {
    }
    /** @prefer-ref $ptr */
    public static function memset(FFI\CData $ptr, int $value, int $size) : void
    {
    }
    /** @prefer-ref $ptr */
    public static function string(FFI\CData $ptr, ?int $size = null) : string
    {
    }
    /** @prefer-ref $ptr */
    public static function isNull(FFI\CData $ptr) : bool
    {
    }
}<?php 

class ZipArchive
{
    /**
     * @tentative-return-type
     * @return (bool | int)
     */
    public function open(string $filename, int $flags = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function setPassword(string $password)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function close()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function count()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getStatusString()
    {
    }
    #[\Since('8.2')]
    public function clearError() : void
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function addEmptyDir(string $dirname, int $flags = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function addFromString(string $name, string $content, int $flags = ZipArchive::FL_OVERWRITE)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function addFile(string $filepath, string $entryname = "", int $start = 0, int $length = 0, int $flags = ZipArchive::FL_OVERWRITE)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function replaceFile(string $filepath, int $index, int $start = 0, int $length = 0, int $flags = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return (array | false)
     */
    public function addGlob(string $pattern, int $flags = 0, array $options = [])
    {
    }
    /**
     * @tentative-return-type
     * @return (array | false)
     */
    public function addPattern(string $pattern, string $path = ".", array $options = [])
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function renameIndex(int $index, string $new_name)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function renameName(string $name, string $new_name)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function setArchiveComment(string $comment)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function getArchiveComment(int $flags = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function setCommentIndex(int $index, string $comment)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function setCommentName(string $name, string $comment)
    {
    }
    #ifdef HAVE_SET_MTIME
    /**
     * @tentative-return-type
     * @return bool
     */
    public function setMtimeIndex(int $index, int $timestamp, int $flags = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function setMtimeName(string $name, int $timestamp, int $flags = 0)
    {
    }
    #endif
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function getCommentIndex(int $index, int $flags = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function getCommentName(string $name, int $flags = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function deleteIndex(int $index)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function deleteName(string $name)
    {
    }
    /**
     * @tentative-return-type
     * @return (array | false)
     */
    public function statName(string $name, int $flags = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return (array | false)
     */
    public function statIndex(int $index, int $flags = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function locateName(string $name, int $flags = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function getNameIndex(int $index, int $flags = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function unchangeArchive()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function unchangeAll()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function unchangeIndex(int $index)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function unchangeName(string $name)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function extractTo(string $pathto, array|string|null $files = null)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function getFromName(string $name, int $len = 0, int $flags = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function getFromIndex(int $index, int $len = 0, int $flags = 0)
    {
    }
    /** @return resource|false */
    #[\Since('8.2')]
    public function getStreamIndex(int $index, int $flags = 0)
    {
    }
    /** @return resource|false */
    #[\Since('8.2')]
    public function getStreamName(string $name, int $flags = 0)
    {
    }
    /** @return resource|false */
    public function getStream(string $name)
    {
    }
    #ifdef ZIP_OPSYS_DEFAULT
    /**
     * @tentative-return-type
     * @return bool
     */
    public function setExternalAttributesName(string $name, int $opsys, int $attr, int $flags = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function setExternalAttributesIndex(int $index, int $opsys, int $attr, int $flags = 0)
    {
    }
    /**
     * @param int $opsys
     * @param int $attr
     * @tentative-return-type
     * @return bool
     */
    public function getExternalAttributesName(string $name, &$opsys, &$attr, int $flags = 0)
    {
    }
    /**
     * @param int $opsys
     * @param int $attr
     * @tentative-return-type
     * @return bool
     */
    public function getExternalAttributesIndex(int $index, &$opsys, &$attr, int $flags = 0)
    {
    }
    #endif
    /**
     * @tentative-return-type
     * @return bool
     */
    public function setCompressionName(string $name, int $method, int $compflags = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function setCompressionIndex(int $index, int $method, int $compflags = 0)
    {
    }
    #ifdef HAVE_ENCRYPTION
    /**
     * @tentative-return-type
     * @return bool
     */
    public function setEncryptionName(string $name, int $method, ?string $password = null)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function setEncryptionIndex(int $index, int $method, ?string $password = null)
    {
    }
    #endif
    #ifdef HAVE_PROGRESS_CALLBACK
    /**
     * @tentative-return-type
     * @return bool
     */
    public function registerProgressCallback(float $rate, callable $callback)
    {
    }
    #endif
    #ifdef HAVE_CANCEL_CALLBACK
    /**
     * @tentative-return-type
     * @return bool
     */
    public function registerCancelCallback(callable $callback)
    {
    }
    #endif
    #ifdef HAVE_METHOD_SUPPORTED
    /** @return bool */
    public static function isCompressionMethodSupported(int $method, bool $enc = true) : bool
    {
    }
    /** @return bool */
    public static function isEncryptionMethodSupported(int $method, bool $enc = true) : bool
    {
    }
}<?php 

/**
 * @param resource $zip_entry
 * @deprecated
 */
function zip_entry_compressedsize($zip_entry) : int|false
{
}<?php 

/**
 * @param resource $zip_entry
 * @deprecated
 */
function zip_entry_name($zip_entry) : string|false
{
}<?php 

/**
 * @param resource $zip_entry
 * @deprecated
 */
function zip_entry_filesize($zip_entry) : int|false
{
}<?php 

/**
 * @param resource $zip_entry
 * @deprecated
 */
function zip_entry_compressionmethod($zip_entry) : string|false
{
}<?php 

/**
 * @param resource $zip_entry
 * @deprecated
 */
function zip_entry_close($zip_entry) : bool
{
}<?php 

/**
 * @param resource $zip
 * @deprecated
 */
function zip_close($zip) : void
{
}<?php 

/**
 * @param resource $zip_dp
 * @param resource $zip_entry
 * @deprecated
 */
function zip_entry_open($zip_dp, $zip_entry, string $mode = "rb") : bool
{
}<?php 

/**
 * @param resource $zip
 * @return resource|false
 * @deprecated
 */
function zip_read($zip)
{
}<?php 

/** @generate-function-entries */
/**
 * @return resource|int|false
 * @deprecated
 */
function zip_open(string $filename)
{
}<?php 

/**
 * @param resource $zip_entry
 * @deprecated
 */
function zip_entry_read($zip_entry, int $len = 1024) : string|false
{
}<?php 

class DOMCharacterData extends \DOMNode implements \DOMChildNode
{
    /**
     * @tentative-return-type
     * @return bool
     */
    public function appendData(string $data)
    {
    }
    /** @return string|false */
    public function substringData(int $offset, int $count)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function insertData(int $offset, string $data)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function deleteData(int $offset, int $count)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function replaceData(int $offset, int $count, string $data)
    {
    }
    /** @param DOMNode|string $nodes */
    public function replaceWith(...$nodes) : void
    {
    }
    public function remove() : void
    {
    }
    /** @param DOMNode|string $nodes */
    public function before(...$nodes) : void
    {
    }
    /** @param DOMNode|string $nodes */
    public function after(...$nodes) : void
    {
    }
}<?php 

class DOMNamedNodeMap implements \IteratorAggregate, \Countable
{
    /**
     * @tentative-return-type
     * @return (DOMNode | null)
     */
    public function getNamedItem(string $qualifiedName)
    {
    }
    /**
     * @tentative-return-type
     * @return (DOMNode | null)
     */
    public function getNamedItemNS(?string $namespace, string $localName)
    {
    }
    /**
     * @tentative-return-type
     * @return (DOMNode | null)
     */
    public function item(int $index)
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function count()
    {
    }
    public function getIterator() : Iterator
    {
    }
}<?php 

class DOMNodeList implements \IteratorAggregate, \Countable
{
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function count()
    {
    }
    public function getIterator() : Iterator
    {
    }
    /** @return DOMNode|null */
    public function item(int $index)
    {
    }
}<?php 

class DOMAttr extends \DOMNode
{
    public function __construct(string $name, string $value = "")
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isId()
    {
    }
}<?php 

class DOMElement extends \DOMNode implements \DOMParentNode, \DOMChildNode
{
    public function __construct(string $qualifiedName, ?string $value = null, string $namespace = "")
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getAttribute(string $qualifiedName)
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getAttributeNS(?string $namespace, string $localName)
    {
    }
    /** @return DOMAttr|DOMNameSpaceNode|false */
    public function getAttributeNode(string $qualifiedName)
    {
    }
    /** @return DOMAttr|DOMNameSpaceNode|null */
    public function getAttributeNodeNS(?string $namespace, string $localName)
    {
    }
    /**
     * @tentative-return-type
     * @return DOMNodeList
     */
    public function getElementsByTagName(string $qualifiedName)
    {
    }
    /**
     * @tentative-return-type
     * @return DOMNodeList
     */
    public function getElementsByTagNameNS(?string $namespace, string $localName)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function hasAttribute(string $qualifiedName)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function hasAttributeNS(?string $namespace, string $localName)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function removeAttribute(string $qualifiedName)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function removeAttributeNS(?string $namespace, string $localName)
    {
    }
    /** @return DOMAttr|false */
    public function removeAttributeNode(DOMAttr $attr)
    {
    }
    /** @return DOMAttr|bool */
    public function setAttribute(string $qualifiedName, string $value)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setAttributeNS(?string $namespace, string $qualifiedName, string $value)
    {
    }
    /** @return DOMAttr|null|false */
    public function setAttributeNode(DOMAttr $attr)
    {
    }
    /** @return DOMAttr|null|false */
    public function setAttributeNodeNS(DOMAttr $attr)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setIdAttribute(string $qualifiedName, bool $isId)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setIdAttributeNS(string $namespace, string $qualifiedName, bool $isId)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setIdAttributeNode(DOMAttr $attr, bool $isId)
    {
    }
    public function remove() : void
    {
    }
    /** @param DOMNode|string $nodes */
    public function before(...$nodes) : void
    {
    }
    /** @param DOMNode|string $nodes */
    public function after(...$nodes) : void
    {
    }
    /** @param DOMNode|string $nodes */
    public function replaceWith(...$nodes) : void
    {
    }
    /** @param DOMNode|string $nodes */
    public function append(...$nodes) : void
    {
    }
    /** @param DOMNode|string $nodes */
    public function prepend(...$nodes) : void
    {
    }
}<?php 

interface DOMParentNode
{
    /** @param DOMNode|string $nodes */
    public function append(...$nodes) : void;
    /** @param DOMNode|string $nodes */
    public function prepend(...$nodes) : void;
}<?php 

class DOMEntityReference extends \DOMNode
{
    public function __construct(string $name)
    {
    }
}<?php 

class DOMImplementation
{
    /**
     * @tentative-return-type
     * @return void
     */
    public function getFeature(string $feature, string $version)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function hasFeature(string $feature, string $version)
    {
    }
    /** @return DOMDocumentType|false */
    public function createDocumentType(string $qualifiedName, string $publicId = "", string $systemId = "")
    {
    }
    /** @return DOMDocument|false */
    public function createDocument(?string $namespace = null, string $qualifiedName = "", ?DOMDocumentType $doctype = null)
    {
    }
}<?php 

class DOMNameSpaceNode
{
}<?php 

#ifdef LIBXML_XPATH_ENABLED
class DOMXPath
{
    public function __construct(DOMDocument $document, bool $registerNodeNS = true)
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function evaluate(string $expression, ?DOMNode $contextNode = null, bool $registerNodeNS = true)
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function query(string $expression, ?DOMNode $contextNode = null, bool $registerNodeNS = true)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function registerNamespace(string $prefix, string $namespace)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function registerPhpFunctions(string|array|null $restrict = null)
    {
    }
}<?php 

/** @generate-function-entries */
class DOMDocumentType extends \DOMNode
{
}<?php 

class DOMDocumentFragment extends \DOMNode implements \DOMParentNode
{
    public function __construct()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function appendXML(string $data)
    {
    }
    /** @param DOMNode|string $nodes */
    public function append(...$nodes) : void
    {
    }
    /** @param DOMNode|string $nodes */
    public function prepend(...$nodes) : void
    {
    }
}<?php 

class DOMProcessingInstruction extends \DOMNode
{
    public function __construct(string $name, string $value = "")
    {
    }
}<?php 

class DOMNotation extends \DOMNode
{
}<?php 

#endif
function dom_import_simplexml(object $node) : \DOMElement
{
}<?php 

interface DOMChildNode
{
    public function remove() : void;
    /** @param DOMNode|string $nodes */
    public function before(...$nodes) : void;
    /** @param DOMNode|string $nodes */
    public function after(...$nodes) : void;
    /** @param DOMNode|string $nodes */
    public function replaceWith(...$nodes) : void;
}<?php 

class DOMNode
{
    /** @return DOMNode|false */
    public function appendChild(DOMNode $node)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function C14N(bool $exclusive = false, bool $withComments = false, ?array $xpath = null, ?array $nsPrefixes = null)
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function C14NFile(string $uri, bool $exclusive = false, bool $withComments = false, ?array $xpath = null, ?array $nsPrefixes = null)
    {
    }
    /** @return DOMNode|false */
    public function cloneNode(bool $deep = false)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getLineNo()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | null)
     */
    public function getNodePath()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function hasAttributes()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function hasChildNodes()
    {
    }
    /** @return DOMNode|false */
    public function insertBefore(DOMNode $node, ?DOMNode $child = null)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isDefaultNamespace(string $namespace)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isSameNode(DOMNode $otherNode)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isSupported(string $feature, string $version)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | null)
     */
    public function lookupNamespaceURI(?string $prefix)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | null)
     */
    public function lookupPrefix(string $namespace)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function normalize()
    {
    }
    /** @return DOMNode|false */
    public function removeChild(DOMNode $child)
    {
    }
    /** @return DOMNode|false */
    public function replaceChild(DOMNode $node, DOMNode $child)
    {
    }
}<?php 

class DOMEntity extends \DOMNode
{
}<?php 

class DOMComment extends \DOMCharacterData
{
    public function __construct(string $data = "")
    {
    }
}<?php 

class DOMCdataSection extends \DOMText
{
    public function __construct(string $data)
    {
    }
}<?php 

class DOMDocument extends \DOMNode implements \DOMParentNode
{
    public function __construct(string $version = "1.0", string $encoding = "")
    {
    }
    /** @return DOMAttr|false */
    public function createAttribute(string $localName)
    {
    }
    /** @return DOMAttr|false */
    public function createAttributeNS(?string $namespace, string $qualifiedName)
    {
    }
    /** @return DOMCdataSection|false */
    public function createCDATASection(string $data)
    {
    }
    /**
     * @tentative-return-type
     * @return (DOMComment | false)
     */
    public function createComment(string $data)
    {
    }
    /**
     * @tentative-return-type
     * @return (DOMDocumentFragment | false)
     */
    public function createDocumentFragment()
    {
    }
    /** @return DOMElement|false */
    public function createElement(string $localName, string $value = "")
    {
    }
    /** @return DOMElement|false */
    public function createElementNS(?string $namespace, string $qualifiedName, string $value = "")
    {
    }
    /** @return DOMEntityReference|false */
    public function createEntityReference(string $name)
    {
    }
    /** @return DOMProcessingInstruction|false */
    public function createProcessingInstruction(string $target, string $data = "")
    {
    }
    /**
     * @tentative-return-type
     * @return (DOMText | false)
     */
    public function createTextNode(string $data)
    {
    }
    /**
     * @tentative-return-type
     * @return (DOMElement | null)
     */
    public function getElementById(string $elementId)
    {
    }
    /**
     * @tentative-return-type
     * @return DOMNodeList
     */
    public function getElementsByTagName(string $qualifiedName)
    {
    }
    /**
     * @tentative-return-type
     * @return DOMNodeList
     */
    public function getElementsByTagNameNS(?string $namespace, string $localName)
    {
    }
    /** @return DOMNode|false */
    public function importNode(DOMNode $node, bool $deep = false)
    {
    }
    /** @return DOMDocument|bool */
    public function load(string $filename, int $options = 0)
    {
    }
    /** @return DOMDocument|bool */
    public function loadXML(string $source, int $options = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function normalizeDocument()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function registerNodeClass(string $baseClass, ?string $extendedClass)
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function save(string $filename, int $options = 0)
    {
    }
    #ifdef LIBXML_HTML_ENABLED
    /** @return DOMDocument|bool */
    public function loadHTML(string $source, int $options = 0)
    {
    }
    /** @return DOMDocument|bool */
    public function loadHTMLFile(string $filename, int $options = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function saveHTML(?DOMNode $node = null)
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function saveHTMLFile(string $filename)
    {
    }
    #endif
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function saveXML(?DOMNode $node = null, int $options = 0)
    {
    }
    #ifdef LIBXML_SCHEMAS_ENABLED
    /**
     * @tentative-return-type
     * @return bool
     */
    public function schemaValidate(string $filename, int $flags = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function schemaValidateSource(string $source, int $flags = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function relaxNGValidate(string $filename)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function relaxNGValidateSource(string $source)
    {
    }
    #endif
    /**
     * @tentative-return-type
     * @return bool
     */
    public function validate()
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function xinclude(int $options = 0)
    {
    }
    /** @return DOMNode|false */
    public function adoptNode(DOMNode $node)
    {
    }
    /** @param DOMNode|string $nodes */
    public function append(...$nodes) : void
    {
    }
    /** @param DOMNode|string $nodes */
    public function prepend(...$nodes) : void
    {
    }
}<?php 

final class DOMException extends \Exception
{
}<?php 

class DOMText extends \DOMCharacterData
{
    public function __construct(string $data = "")
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isWhitespaceInElementContent()
    {
    }
    /**
     * @tentative-return-type
     * @alias DOMText::isWhitespaceInElementContent
     * @return bool
     */
    public function isElementContentWhitespace()
    {
    }
    /** @return DOMText|false */
    public function splitText(int $offset)
    {
    }
}<?php 

/** @generate-function-entries */
class XMLReader
{
    /** @return bool */
    public function close()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | null)
     */
    public function getAttribute(string $name)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | null)
     */
    public function getAttributeNo(int $index)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | null)
     */
    public function getAttributeNs(string $name, string $namespace)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function getParserProperty(int $property)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isValid()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | null)
     */
    public function lookupNamespace(string $prefix)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function moveToAttribute(string $name)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function moveToAttributeNo(int $index)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function moveToAttributeNs(string $name, string $namespace)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function moveToElement()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function moveToFirstAttribute()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function moveToNextAttribute()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function read()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function next(?string $name = null)
    {
    }
    /** @return bool|XMLReader */
    public static function open(string $uri, ?string $encoding = null, int $flags = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function readInnerXml()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function readOuterXml()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function readString()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function setSchema(?string $filename)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function setParserProperty(int $property, bool $value)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function setRelaxNGSchema(?string $filename)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function setRelaxNGSchemaSource(?string $source)
    {
    }
    /** @return bool|XMLReader */
    public static function XML(string $source, ?string $encoding = null, int $flags = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return (DOMNode | false)
     */
    public function expand(?DOMNode $baseNode = null)
    {
    }
}<?php 

/**
 * @param resource|string $filename
 */
function mime_content_type($filename) : string|false
{
}<?php 

/**
 * @param resource $finfo
 * @param resource|null $context
 */
#[\Until('8.1')]
function finfo_file($finfo, string $filename, int $flags = FILEINFO_NONE, $context = null) : string|false
{
}
// TODO make return type void
/**
 * @param resource|null $context
 * @refcount 1
 */
#[\Since('8.1')]
function finfo_file(\finfo $finfo, string $filename, int $flags = FILEINFO_NONE, $context = null) : string|false
{
}<?php 

/**
 * @param resource $finfo
 */
#[\Until('8.1')]
function finfo_set_flags($finfo, int $flags) : bool
{
}
#[\Since('8.1')]
function finfo_set_flags(\finfo $finfo, int $flags) : bool
{
}<?php 

/** @return resource|false */
#[\Until('8.1')]
function finfo_open(int $flags = FILEINFO_NONE, ?string $magic_database = null)
{
}
/** @refcount 1 */
#[\Since('8.1')]
function finfo_open(int $flags = FILEINFO_NONE, ?string $magic_database = null) : \finfo|false
{
}<?php 

/**
 * @param resource $finfo
 * @param resource|null $context
 */
#[\Until('8.1')]
function finfo_buffer($finfo, string $string, int $flags = FILEINFO_NONE, $context = null) : string|false
{
}
/**
 * @param resource|null $context
 * @refcount 1
 */
#[\Since('8.1')]
function finfo_buffer(\finfo $finfo, string $string, int $flags = FILEINFO_NONE, $context = null) : string|false
{
}<?php 

/**
 * @param resource $finfo
 */
#[\Until('8.1')]
function finfo_close($finfo) : bool
{
}
#[\Since('8.1')]
function finfo_close(\finfo $finfo) : bool
{
}<?php 

/** @generate-function-entries */
class finfo
{
    /** @alias finfo_open */
    public function __construct(int $flags = FILEINFO_NONE, ?string $magic_database = null)
    {
    }
    /**
     * @param (resource | null) $context
     * @tentative-return-type
     * @alias finfo_file
     * @return (string | false)
     */
    public function file(string $filename, int $flags = FILEINFO_NONE, $context = null)
    {
    }
    /**
     * @param (resource | null) $context
     * @tentative-return-type
     * @alias finfo_buffer
     * @return (string | false)
     */
    public function buffer(string $string, int $flags = FILEINFO_NONE, $context = null)
    {
    }
    /**
     * @return bool
     * @alias finfo_set_flags
     */
    public function set_flags(int $flags)
    {
    }
}<?php 

function enchant_dict_add(\EnchantDictionary $dictionary, string $word) : void
{
}<?php 

/**
 * @refcount 1
 */
function enchant_broker_list_dicts(\EnchantBroker $broker) : array
{
}<?php 

function enchant_broker_request_dict(\EnchantBroker $broker, string $tag) : \EnchantDictionary|false
{
}<?php 

/** @param array $suggestions */
function enchant_dict_quick_check(\EnchantDictionary $dictionary, string $word, &$suggestions = null) : bool
{
}<?php 

/**
* @alias enchant_dict_add
* @deprecated
*/
function enchant_dict_add_to_personal(\EnchantDictionary $dictionary, string $word) : void
{
}<?php 

/** @deprecated */
function enchant_broker_get_dict_path(\EnchantBroker $broker, int $type) : string|false
{
}<?php 

/**
 * @refcount 1
 */
function enchant_broker_describe(\EnchantBroker $broker) : array
{
}<?php 

function enchant_dict_is_added(\EnchantDictionary $dictionary, string $word) : bool
{
}<?php 

/** @deprecated */
function enchant_broker_free(\EnchantBroker $broker) : bool
{
}<?php 

/**
 * @refcount 1
 */
function enchant_dict_describe(\EnchantDictionary $dictionary) : array
{
}<?php 

function enchant_dict_add_to_session(\EnchantDictionary $dictionary, string $word) : void
{
}<?php 

function enchant_dict_check(\EnchantDictionary $dictionary, string $word) : bool
{
}<?php 

/** @deprecated */
function enchant_broker_free_dict(\EnchantDictionary $dictionary) : bool
{
}<?php 

/**
* @alias enchant_dict_is_added
* @deprecated
*/
function enchant_dict_is_in_session(\EnchantDictionary $dictionary, string $word) : bool
{
}<?php 

/**
 * @refcount 1
 */
function enchant_dict_suggest(\EnchantDictionary $dictionary, string $word) : array
{
}<?php 

function enchant_dict_get_error(\EnchantDictionary $dictionary) : string|false
{
}<?php 

final class EnchantDictionary
{
}<?php 

function enchant_broker_init() : \EnchantBroker|false
{
}<?php 

function enchant_broker_request_pwl_dict(\EnchantBroker $broker, string $filename) : \EnchantDictionary|false
{
}<?php 

function enchant_broker_set_ordering(\EnchantBroker $broker, string $tag, string $ordering) : bool
{
}<?php 

function enchant_dict_store_replacement(\EnchantDictionary $dictionary, string $misspelled, string $correct) : void
{
}<?php 

/** @deprecated */
function enchant_broker_set_dict_path(\EnchantBroker $broker, int $type, string $path) : bool
{
}<?php 

function enchant_broker_get_error(\EnchantBroker $broker) : string|false
{
}<?php 

function enchant_broker_dict_exists(\EnchantBroker $broker, string $tag) : bool
{
}<?php 

/** @generate-function-entries */
final class EnchantBroker
{
}<?php 

function bzdecompress(string $data, bool $use_less_memory = false) : string|int|false
{
}<?php 

/** @param resource $bz */
#[\Until('8.1')]
function bzerrstr($bz) : string|false
{
}
/** @param resource $bz */
#[\Since('8.1')]
function bzerrstr($bz) : string
{
}<?php 

/**
 * @param resource $bz
 * @implementation-alias fwrite
 */
function bzwrite($bz, string $data, ?int $length = null) : int|false
{
}<?php 

/** @param resource $bz */
#[\Until('8.1')]
function bzerrno($bz) : int|false
{
}
/** @param resource $bz */
#[\Since('8.1')]
function bzerrno($bz) : int
{
}<?php 

/** @param resource $bz */
#[\Until('8.1')]
function bzerror($bz) : array|false
{
}
/**
 * @param resource $bz
 * @return array<string, int|string>
 * @refcount 1
 */
#[\Since('8.1')]
function bzerror($bz) : array
{
}<?php 

function bzcompress(string $data, int $block_size = 4, int $work_factor = 0) : string|int
{
}<?php 

/**
 * @param resource $bz
 * @implementation-alias fflush
 */
function bzflush($bz) : bool
{
}<?php 

/** @generate-function-entries */
/**
 * @param string|resource $file
 * @return resource|false
 */
function bzopen($file, string $mode)
{
}<?php 

/**
 * @param resource $bz
 * @implementation-alias fclose
 */
function bzclose($bz) : bool
{
}<?php 

/** @param resource $bz */
function bzread($bz, int $length = 1024) : string|false
{
}<?php 

function shm_detach(\SysvSharedMemory $shm) : bool
{
}<?php 

function shm_remove(\SysvSharedMemory $shm) : bool
{
}<?php 

function shm_put_var(\SysvSharedMemory $shm, int $key, mixed $value) : bool
{
}<?php 

function shm_remove_var(\SysvSharedMemory $shm, int $key) : bool
{
}<?php 

function shm_get_var(\SysvSharedMemory $shm, int $key) : mixed
{
}<?php 

/** @generate-function-entries */
final class SysvSharedMemory
{
}<?php 

function shm_has_var(\SysvSharedMemory $shm, int $key) : bool
{
}<?php 

function shm_attach(int $key, ?int $size = null, int $permissions = 0666) : \SysvSharedMemory|false
{
}<?php 

function bcdiv(string $num1, string $num2, ?int $scale = null) : string
{
}<?php 

function bcsqrt(string $num, ?int $scale = null) : string
{
}<?php 

function bccomp(string $num1, string $num2, ?int $scale = null) : int
{
}<?php 

function bcpowmod(string $num, string $exponent, string $modulus, ?int $scale = null) : string
{
}<?php 

function bcscale(?int $scale = null) : int
{
}<?php 

function bcsub(string $num1, string $num2, ?int $scale = null) : string
{
}<?php 

function bcmul(string $num1, string $num2, ?int $scale = null) : string
{
}<?php 

/** @generate-function-entries */
function bcadd(string $num1, string $num2, ?int $scale = null) : string
{
}<?php 

function bcpow(string $num, string $exponent, ?int $scale = null) : string
{
}<?php 

function bcmod(string $num1, string $num2, ?int $scale = null) : string
{
}<?php 

/**
 * @param resource $result
 * @alias pg_field_size
 * @deprecated
 */
#[\Until('8.1')]
function pg_fieldsize($result, int $field) : int
{
}
/**
 * @alias pg_field_size
 * @deprecated
 */
#[\Since('8.1')]
function pg_fieldsize(\PgSql\Result $result, int $field) : int
{
}<?php 

function pg_unescape_bytea(string $string) : string
{
}<?php 

/**
 * @param resource $result
 * @alias pg_affected_rows
 * @deprecated
 */
#[\Until('8.1')]
function pg_cmdtuples($result) : int
{
}
/**
 * @alias pg_affected_rows
 * @deprecated
 */
#[\Since('8.1')]
function pg_cmdtuples(\PgSql\Result $result) : int
{
}<?php 

/** @param resource|int $connection */
#[\Until('8.1')]
function pg_set_error_verbosity($connection, int $verbosity = UNKNOWN) : int|false
{
}
/** @param PgSql\Connection|int $connection */
#[\Since('8.1')]
function pg_set_error_verbosity($connection, int $verbosity = UNKNOWN) : int|false
{
}<?php 

/**
 * @param resource $lob
 * @alias pg_lo_close
 * @deprecated
 */
#[\Until('8.1')]
function pg_loclose($lob) : bool
{
}
/**
 * @alias pg_lo_close
 * @deprecated
 */
#[\Since('8.1')]
function pg_loclose(\PgSql\Lob $lob) : bool
{
}<?php 

/** @param resource $result */
#[\Until('8.1')]
function pg_affected_rows($result) : int
{
}
#[\Since('8.1')]
function pg_affected_rows(\PgSql\Result $result) : int
{
}<?php 

/** @param resource $connection */
#[\Until('8.1')]
function pg_convert($connection, string $table_name, array $values, int $flags = 0) : array|false
{
}
/**
 * @return array<string, mixed>|false
 * @refcount 1
 */
#[\Since('8.1')]
function pg_convert(\PgSql\Connection $connection, string $table_name, array $values, int $flags = 0) : array|false
{
}<?php 

/**
 * @param resource $connection
 * @param string|int $oid
 * @alias pg_lo_create
 * @deprecated
 */
#[\Until('8.1')]
function pg_locreate($connection = UNKNOWN, $oid = UNKNOWN) : string|int|false
{
}
/**
 * @param PgSql\Connection $connection
 * @param string|int $oid
 * @alias pg_lo_create
 * @deprecated
 */
#[\Since('8.1')]
function pg_locreate($connection = UNKNOWN, $oid = UNKNOWN) : string|int|false
{
}<?php 

/** @param resource $connection */
#[\Until('8.1')]
function pg_send_query($connection, string $query) : int|bool
{
}
#[\Since('8.1')]
function pg_send_query(\PgSql\Connection $connection, string $query) : int|bool
{
}<?php 

/**
 * @param resource $result
 * @alias pg_field_type
 * @deprecated
 */
#[\Until('8.1')]
function pg_fieldtype($result, int $field) : string
{
}
/**
 * @alias pg_field_type
 * @deprecated
 */
#[\Since('8.1')]
function pg_fieldtype(\PgSql\Result $result, int $field) : string
{
}<?php 

/** @param resource $connection */
#[\Until('8.1')]
function pg_send_query_params($connection, string $query, array $params) : int|bool
{
}
#[\Since('8.1')]
function pg_send_query_params(\PgSql\Connection $connection, string $query, array $params) : int|bool
{
}<?php 

/**
 * @param resource $result
 */
#[\Until('8.1')]
function pg_fetch_row($result, ?int $row = null, int $mode = PGSQL_NUM) : array|false
{
}
/**
 * @return array<int|string, string|null>|false
 * @refcount 1
 */
#[\Since('8.1')]
function pg_fetch_row(\PgSql\Result $result, ?int $row = null, int $mode = PGSQL_NUM) : array|false
{
}<?php 

/**
 * @param resource|string $connection
 * @return resource|false
 */
#[\Until('8.1')]
function pg_query($connection, string $query = UNKNOWN)
{
}
/**
 * @param PgSql\Connection|string $connection
 * @refcount 1
 */
#[\Since('8.1')]
function pg_query($connection, string $query = UNKNOWN) : \PgSql\Result|false
{
}<?php 

/** @param resource $result */
#[\Until('8.1')]
function pg_result_status($result, int $mode = PGSQL_STATUS_LONG) : string|int
{
}
/** @refcount 1 */
#[\Since('8.1')]
function pg_result_status(\PgSql\Result $result, int $mode = PGSQL_STATUS_LONG) : string|int
{
}<?php 

/** @param resource $result */
#[\Until('8.1')]
function pg_fetch_all($result, int $mode = PGSQL_ASSOC) : array
{
}
/**
 * @return array<int, array>
 * @refcount 1
 */
#[\Since('8.1')]
function pg_fetch_all(\PgSql\Result $result, int $mode = PGSQL_ASSOC) : array
{
}<?php 

/** @param resource $result */
#[\Until('8.1')]
function pg_field_num($result, string $field) : int
{
}
#[\Since('8.1')]
function pg_field_num(\PgSql\Result $result, string $field) : int
{
}<?php 

/**
 * @param resource $result
 * @param string|int $row
 */
#[\Until('8.1')]
function pg_field_is_null($result, $row, string|int $field = UNKNOWN) : int|false
{
}
/** @param string|int $row */
#[\Since('8.1')]
function pg_field_is_null(\PgSql\Result $result, $row, string|int $field = UNKNOWN) : int|false
{
}<?php 

/** @param resource $result */
#[\Until('8.1')]
function pg_fetch_object($result, ?int $row = null, string $class = "stdClass", array $constructor_args = []) : object|false
{
}
/** @refcount 1 */
#[\Since('8.1')]
function pg_fetch_object(\PgSql\Result $result, ?int $row = null, string $class = "stdClass", array $constructor_args = []) : object|false
{
}<?php 

/** @param resource|null $connection */
#[\Until('8.1')]
function pg_port($connection = null) : string
{
}
/** @refcount 1 */
#[\Since('8.1')]
function pg_port(?\PgSql\Connection $connection = null) : string
{
}<?php 

/** @return resource|false */
#[\Until('8.1')]
function pg_pconnect(string $connection_string, int $flags = 0)
{
}
#[\Since('8.1')]
function pg_pconnect(string $connection_string, int $flags = 0) : \PgSql\Connection|false
{
}<?php 

/** @param resource $connection */
#[\Until('8.1')]
function pg_get_pid($connection) : int
{
}
#[\Since('8.1')]
function pg_get_pid(\PgSql\Connection $connection) : int
{
}<?php 

namespace PgSql;

/**
 * @strict-properties
 * @not-serializable
 */
#[\Since('8.1')]
final class Result
{
}<?php 

namespace PgSql;

/**
 * @strict-properties
 * @not-serializable
 */
#[\Since('8.1')]
final class Connection
{
}<?php 

namespace PgSql;

/**
 * @strict-properties
 * @not-serializable
 */
#[\Since('8.1')]
final class Lob
{
}<?php 

/** @param resource $result */
#[\Until('8.1')]
function pg_result_error($result) : string|false
{
}
/** @refcount 1 */
#[\Since('8.1')]
function pg_result_error(\PgSql\Result $result) : string|false
{
}<?php 

/** @param resource $lob */
#[\Until('8.1')]
function pg_lo_close($lob) : bool
{
}
#[\Since('8.1')]
function pg_lo_close(\PgSql\Lob $lob) : bool
{
}<?php 

/** @param resource $connection */
#[\Until('8.1')]
function pg_cancel_query($connection) : bool
{
}
#[\Since('8.1')]
function pg_cancel_query(\PgSql\Connection $connection) : bool
{
}<?php 

/** @param resource $connection */
#[\Until('8.1')]
function pg_get_notify($connection, int $mode = PGSQL_ASSOC) : array|false
{
}
/**
 * @return array<int|string, int|string>
 * @refcount 1
 */
#[\Since('8.1')]
function pg_get_notify(\PgSql\Connection $connection, int $mode = PGSQL_ASSOC) : array|false
{
}<?php 

/**
 * @param resource|string $connection
 * @param string|int $filename
 * @param string|int $oid
 * @return resource|false
 * @alias pg_lo_import
 * @deprecated
 */
#[\Until('8.1')]
function pg_loimport($connection, $filename = UNKNOWN, $oid = UNKNOWN) : string|int|false
{
}
/**
 * @param PgSql\Connection|string $connection
 * @param string|int $filename
 * @param string|int $oid
 * @alias pg_lo_import
 * @deprecated
 */
#[\Since('8.1')]
function pg_loimport($connection, $filename = UNKNOWN, $oid = UNKNOWN) : string|int|false
{
}<?php 

/**
 * @param resource|null $connection
 * @alias pg_client_encoding
 * @deprecated
 */
#[\Until('8.1')]
function pg_clientencoding($connection = null) : string
{
}
/**
 * @alias pg_client_encoding
 * @deprecated
 */
#[\Since('8.1')]
function pg_clientencoding(?\PgSql\Connection $connection = null) : string
{
}<?php 

/** @param resource $result */
#[\Until('8.1')]
function pg_fetch_all_columns($result, int $field = 0) : array
{
}
/**
 * @return array<int, string|null>
 * @refcount 1
 */
#[\Since('8.1')]
function pg_fetch_all_columns(\PgSql\Result $result, int $field = 0) : array
{
}<?php 

/** @param resource $connection */
#[\Until('8.1')]
function pg_delete($connection, string $table_name, array $conditions, int $flags = PGSQL_DML_EXEC) : string|bool
{
}
/** @refcount 1 */
#[\Since('8.1')]
function pg_delete(\PgSql\Connection $connection, string $table_name, array $conditions, int $flags = PGSQL_DML_EXEC) : string|bool
{
}<?php 

/**
 * @param resource $lob
 * @alias pg_lo_read
 * @deprecated
 */
#[\Until('8.1')]
function pg_loread($lob, int $length = 8192) : string|false
{
}
/**
 * @alias pg_lo_read
 * @deprecated
 */
#[\Since('8.1')]
function pg_loread(\PgSql\Lob $lob, int $length = 8192) : string|false
{
}<?php 

/**
 * @param resource $lob
 * @alias pg_lo_read_all
 * @deprecated
 */
#[\Until('8.1')]
function pg_loreadall($lob) : int
{
}
/**
 * @alias pg_lo_read_all
 * @deprecated
 */
#[\Since('8.1')]
function pg_loreadall(\PgSql\Lob $lob) : int
{
}<?php 

/** @param resource $connection */
#[\Until('8.1')]
function pg_flush($connection) : int|bool
{
}
#[\Since('8.1')]
function pg_flush(\PgSql\Connection $connection) : int|bool
{
}<?php 

/** @param resource|null $connection */
#[\Until('8.1')]
function pg_end_copy($connection = null) : bool
{
}
#[\Since('8.1')]
function pg_end_copy(?\PgSql\Connection $connection = null) : bool
{
}<?php 

/** @param resource $connection */
#[\Until('8.1')]
function pg_transaction_status($connection) : int
{
}
#[\Since('8.1')]
function pg_transaction_status(\PgSql\Connection $connection) : int
{
}<?php 

/** @param resource|string $connection */
#[\Until('8.1')]
function pg_set_client_encoding($connection, string $encoding = UNKNOWN) : int
{
}
/** @param PgSql\Connection|string $connection */
#[\Since('8.1')]
function pg_set_client_encoding($connection, string $encoding = UNKNOWN) : int
{
}<?php 

/** @param resource $connection */
#[\Until('8.1')]
function pg_connect_poll($connection) : int
{
}
#[\Since('8.1')]
function pg_connect_poll(\PgSql\Connection $connection) : int
{
}<?php 

/**
 * @param resource $connection
 * @return resource|string|bool
 */
#[\Until('8.1')]
function pg_insert($connection, string $table_name, array $values, int $flags = PGSQL_DML_EXEC)
{
}
/** @refcount 1 */
#[\Since('8.1')]
function pg_insert(\PgSql\Connection $connection, string $table_name, array $values, int $flags = PGSQL_DML_EXEC) : \PgSql\Result|string|bool
{
}<?php 

/** @param resource|string $connection */
#[\Until('8.1')]
function pg_put_line($connection, string $query = UNKNOWN) : bool
{
}
/** @param PgSql\Connection|string $connection */
#[\Since('8.1')]
function pg_put_line($connection, string $query = UNKNOWN) : bool
{
}<?php 

/**
 * @param resource|string $connection
 * @alias pg_set_client_encoding
 * @deprecated
 */
#[\Until('8.1')]
function pg_setclientencoding($connection, string $encoding = UNKNOWN) : int
{
}
/**
 * @param PgSql\Connection|string $connection
 * @alias pg_set_client_encoding
 * @deprecated
 */
#[\Since('8.1')]
function pg_setclientencoding($connection, string $encoding = UNKNOWN) : int
{
}<?php 

/** @param resource|null $connection */
#[\Until('8.1')]
function pg_options($connection = null) : string
{
}
/** @refcount 1 */
#[\Since('8.1')]
function pg_options(?\PgSql\Connection $connection = null) : string
{
}<?php 

/** @param resource|null $connection */
#[\Until('8.1')]
function pg_version($connection = null) : array
{
}
/**
 * @return array<string, int|string|null>
 * @refcount 1
 */
#[\Since('8.1')]
function pg_version(?\PgSql\Connection $connection = null) : array
{
}<?php 

/** @param resource|string $connection */
#[\Until('8.1')]
function pg_escape_string($connection, string $string = UNKNOWN) : string
{
}
/**
 * @param PgSql\Connection|string $connection
 * @refcount 1
 */
#[\Since('8.1')]
function pg_escape_string($connection, string $string = UNKNOWN) : string
{
}<?php 

/**
 * @param resource|string $connection
 * @return resource|false
 * @alias pg_query
 */
#[\Until('8.1')]
function pg_exec($connection, string $query = UNKNOWN)
{
}
/**
 * @param PgSql\Connection|string $connection
 * @alias pg_query
 */
#[\Since('8.1')]
function pg_exec($connection, string $query = UNKNOWN) : \PgSql\Result|false
{
}<?php 

/** @param resource|null $connection */
#[\Until('8.1')]
function pg_client_encoding($connection = null) : string
{
}
#[\Since('8.1')]
function pg_client_encoding(?\PgSql\Connection $connection = null) : string
{
}<?php 

/** @param resource|string $connection */
#[\Until('8.1')]
function pg_parameter_status($connection, string $name = UNKNOWN) : string|false
{
}
/**
 * @param PgSql\Connection|string $connection
 * @refcount 1
 */
#[\Since('8.1')]
function pg_parameter_status($connection, string $name = UNKNOWN) : string|false
{
}<?php 

/** @param resource $result */
#[\Until('8.1')]
function pg_field_name($result, int $field) : string
{
}
/** @refcount 1 */
#[\Since('8.1')]
function pg_field_name(\PgSql\Result $result, int $field) : string
{
}<?php 

/** @param resource $connection */
#[\Until('8.1')]
function pg_copy_to($connection, string $table_name, string $separator = "\t", string $null_as = "\\\\N") : array|false
{
}
/**
 * @return array<int, string>|false
 * @refcount 1
 */
#[\Since('8.1')]
function pg_copy_to(\PgSql\Connection $connection, string $table_name, string $separator = "\t", string $null_as = "\\\\N") : array|false
{
}<?php 

/**
 * @param resource $result
 * @param string|int $row
 * @alias pg_field_prtlen
 * @deprecated
 */
#[\Until('8.1')]
function pg_fieldprtlen($result, $row, string|int $field = UNKNOWN) : int|false
{
}
/**
 * @param string|int $row
 * @alias pg_field_prtlen
 * @deprecated
 */
#[\Since('8.1')]
function pg_fieldprtlen(\PgSql\Result $result, $row, string|int $field = UNKNOWN) : int|false
{
}<?php 

/**
 * @param resource $connection
 * @param string|int $oid
 * @return resource|false
 */
#[\Until('8.1')]
function pg_lo_open($connection, $oid = UNKNOWN, string $mode = UNKNOWN)
{
}
/**
 * @param PgSql\Connection $connection
 * @param string|int $oid
 * @refcount 1
 */
#[\Since('8.1')]
function pg_lo_open($connection, $oid = UNKNOWN, string $mode = UNKNOWN) : \PgSql\Lob|false
{
}<?php 

/**
 * @param resource $result
 * @alias pg_field_name
 * @deprecated
 */
#[\Until('8.1')]
function pg_fieldname($result, int $field) : string
{
}
/**
 * @alias pg_field_name
 * @deprecated
 */
#[\Since('8.1')]
function pg_fieldname(\PgSql\Result $result, int $field) : string
{
}<?php 

/** @param resource|null $connection */
#[\Until('8.1')]
function pg_untrace($connection = null) : bool
{
}
#[\Since('8.1')]
function pg_untrace(?\PgSql\Connection $connection = null) : bool
{
}<?php 

/**
 * @param resource|null $connection
 * @alias pg_last_error
 * @deprecated
 */
#[\Until('8.1')]
function pg_errormessage($connection = null) : string
{
}
/**
 * @alias pg_last_error
 * @deprecated
 */
#[\Since('8.1')]
function pg_errormessage(?\PgSql\Connection $connection = null) : string
{
}<?php 

/**
 * @param resource $result
 * @alias pg_num_fields
 * @deprecated
 */
#[\Until('8.1')]
function pg_numfields($result) : int
{
}
/**
 * @alias pg_num_fields
 * @deprecated
 */
#[\Since('8.1')]
function pg_numfields(\PgSql\Result $result) : int
{
}<?php 

/**
 * @param resource $result
 */
#[\Until('8.1')]
function pg_fetch_assoc($result, ?int $row = null) : array|false
{
}
/**
 * @return array<int|string, string|null>|false
 * @refcount 1
 */
#[\Since('8.1')]
function pg_fetch_assoc(\PgSql\Result $result, ?int $row = null) : array|false
{
}<?php 

/** @param resource $result */
#[\Until('8.1')]
function pg_free_result($result) : bool
{
}
#[\Since('8.1')]
function pg_free_result(\PgSql\Result $result) : bool
{
}<?php 

/**
 * @param resource|string $connection
 * @return resource|false
 */
#[\Until('8.1')]
function pg_prepare($connection, string $statement_name, string $query = UNKNOWN)
{
}
/**
 * @param PgSql\Connection|string $connection
 * @refcount 1
 */
#[\Since('8.1')]
function pg_prepare($connection, string $statement_name, string $query = UNKNOWN) : \PgSql\Result|false
{
}<?php 

/**
 * @param resource $connection
 * @return resource|false
 */
#[\Until('8.1')]
function pg_socket($connection)
{
}
/**
 * @return resource|false
 * @refcount 1
 */
#[\Since('8.1')]
function pg_socket(\PgSql\Connection $connection)
{
}<?php 

/** @param resource $connection */
#[\Until('8.1')]
function pg_copy_from($connection, string $table_name, array $rows, string $separator = "\t", string $null_as = "\\\\N") : bool
{
}
#[\Since('8.1')]
function pg_copy_from(\PgSql\Connection $connection, string $table_name, array $rows, string $separator = "\t", string $null_as = "\\\\N") : bool
{
}<?php 

/** @param resource $connection */
#[\Until('8.1')]
function pg_connection_busy($connection) : bool
{
}
#[\Since('8.1')]
function pg_connection_busy(\PgSql\Connection $connection) : bool
{
}<?php 

/**
 * @param resource $result
 * @param string|int $row
 * @alias pg_field_is_null
 * @deprecated
 */
#[\Until('8.1')]
function pg_fieldisnull($result, $row, string|int $field = UNKNOWN) : int|false
{
}
/**
 * @param string|int $row
 * @alias pg_field_is_null
 * @deprecated
 */
#[\Since('8.1')]
function pg_fieldisnull(\PgSql\Result $result, $row, string|int $field = UNKNOWN) : int|false
{
}<?php 

/** @param resource|null $connection */
#[\Until('8.1')]
function pg_ping($connection = null) : bool
{
}
#[\Since('8.1')]
function pg_ping(?\PgSql\Connection $connection = null) : bool
{
}<?php 

/** @param resource $connection */
#[\Until('8.1')]
function pg_consume_input($connection) : bool
{
}
#[\Since('8.1')]
function pg_consume_input(\PgSql\Connection $connection) : bool
{
}<?php 

/**
 * @param resource $result
 * @alias pg_free_result
 * @deprecated
 */
#[\Until('8.1')]
function pg_freeresult($result) : bool
{
}
/**
 * @alias pg_free_result
 * @deprecated
 */
#[\Since('8.1')]
function pg_freeresult(\PgSql\Result $result) : bool
{
}<?php 

/** @param resource $connection */
#[\Until('8.1')]
function pg_update($connection, string $table_name, array $values, array $conditions, int $flags = PGSQL_DML_EXEC) : string|bool
{
}
/** @refcount 1 */
#[\Since('8.1')]
function pg_update(\PgSql\Connection $connection, string $table_name, array $values, array $conditions, int $flags = PGSQL_DML_EXEC) : string|bool
{
}<?php 

/** @param resource|null $connection */
#[\Until('8.1')]
function pg_trace(string $filename, string $mode = "w", $connection = null) : bool
{
}
#[\Since('8.1')]
function pg_trace(string $filename, string $mode = "w", ?\PgSql\Connection $connection = null) : bool
{
}<?php 

/**
 * @param resource $result
 * @param string|int $row
 * @alias pg_fetch_result
 * @deprecated
 */
#[\Until('8.1')]
function pg_result($result, $row, string|int $field = UNKNOWN) : string|false|null
{
}
/**
 * @param string|int $row
 * @alias pg_fetch_result
 * @deprecated
 */
#[\Since('8.1')]
function pg_result(\PgSql\Result $result, $row, string|int $field = UNKNOWN) : string|false|null
{
}<?php 

/** @param resource|null $connection */
#[\Until('8.1')]
function pg_tty($connection = null) : string
{
}
/** @refcount 1 */
#[\Since('8.1')]
function pg_tty(?\PgSql\Connection $connection = null) : string
{
}<?php 

/** @param resource $result */
#[\Until('8.1')]
function pg_field_type($result, int $field) : string
{
}
#[\Since('8.1')]
function pg_field_type(\PgSql\Result $result, int $field) : string
{
}<?php 

/** @param resource|null $connection */
#[\Until('8.1')]
function pg_dbname($connection = null) : string
{
}
/** @refcount 1 */
#[\Since('8.1')]
function pg_dbname(?\PgSql\Connection $connection = null) : string
{
}<?php 

/**
 * @param resource $result
 * @alias pg_field_num
 * @deprecated
 */
#[\Until('8.1')]
function pg_fieldnum($result, string $field) : int
{
}
/**
 * @alias pg_field_num
 * @deprecated
 */
#[\Since('8.1')]
function pg_fieldnum(\PgSql\Result $result, string $field) : int
{
}<?php 

/** @param resource $lob */
#[\Until('8.1')]
function pg_lo_read($lob, int $length = 8192) : string|false
{
}
/** @refcount 1 */
#[\Since('8.1')]
function pg_lo_read(\PgSql\Lob $lob, int $length = 8192) : string|false
{
}<?php 

/** @generate-function-entries */
/** @return resource|false */
#[\Until('8.1')]
function pg_connect(string $connection_string, int $flags = 0)
{
}
#[\Since('8.1')]
function pg_connect(string $connection_string, int $flags = 0) : \PgSql\Connection|false
{
}<?php 

/**
 * @param resource $connection
 * @param string|int $oid
 */
#[\Until('8.1')]
function pg_lo_unlink($connection, $oid = UNKNOWN) : bool
{
}
/**
 * @param PgSql\Connection $connection
 * @param string|int $oid
 */
#[\Since('8.1')]
function pg_lo_unlink($connection, $oid = UNKNOWN) : bool
{
}<?php 

/**
 * @param resource|string $connection
 * @param string|array $statement_name
 * @return resource|false
 */
#[\Until('8.1')]
function pg_execute($connection, $statement_name, array $params = UNKNOWN)
{
}
/**
 * @param PgSql\Connection|string $connection
 * @param string|array $statement_name
 * @refcount 1
 */
#[\Since('8.1')]
function pg_execute($connection, $statement_name, array $params = UNKNOWN) : \PgSql\Result|false
{
}<?php 

/** @param resource $connection */
#[\Until('8.1')]
function pg_send_execute($connection, string $statement_name, array $params) : int|bool
{
}
#[\Since('8.1')]
function pg_send_execute(\PgSql\Connection $connection, string $statement_name, array $params) : int|bool
{
}<?php 

/** @param resource|null $connection */
#[\Until('8.1')]
function pg_last_error($connection = null) : string
{
}
#[\Since('8.1')]
function pg_last_error(?\PgSql\Connection $connection = null) : string
{
}<?php 

/** @param resource $connection */
#[\Until('8.1')]
function pg_connection_reset($connection) : bool
{
}
#[\Since('8.1')]
function pg_connection_reset(\PgSql\Connection $connection) : bool
{
}<?php 

/** @param resource $connection */
#[\Until('8.1')]
function pg_meta_data($connection, string $table_name, bool $extended = false) : array|false
{
}
/**
 * @return array<string, array>|false
 * @refcount 1
 */
#[\Since('8.1')]
function pg_meta_data(\PgSql\Connection $connection, string $table_name, bool $extended = false) : array|false
{
}<?php 

/** @param resource $connection */
#[\Until('8.1')]
function pg_send_prepare($connection, string $statement_name, string $query) : int|bool
{
}
#[\Since('8.1')]
function pg_send_prepare(\PgSql\Connection $connection, string $statement_name, string $query) : int|bool
{
}<?php 

/**
 * @param resource $result
 * @param string|int $row
 */
#[\Until('8.1')]
function pg_fetch_result($result, $row, string|int $field = UNKNOWN) : string|false|null
{
}
/**
 * @param string|int $row
 * @refcount 1
 */
#[\Since('8.1')]
function pg_fetch_result(\PgSql\Result $result, $row, string|int $field = UNKNOWN) : string|false|null
{
}<?php 

/** @param resource $lob */
#[\Until('8.1')]
function pg_lo_tell($lob) : int
{
}
#[\Since('8.1')]
function pg_lo_tell(\PgSql\Lob $lob) : int
{
}<?php 

/** @param resource $lob */
#[\Until('8.1')]
function pg_lo_truncate($lob, int $size) : bool
{
}
#[\Since('8.1')]
function pg_lo_truncate(\PgSql\Lob $lob, int $size) : bool
{
}<?php 

/**
 * @param resource $connection
 * @return resource|false
 */
#[\Until('8.1')]
function pg_get_result($connection)
{
}
/** @refcount 1 */
#[\Since('8.1')]
function pg_get_result(\PgSql\Connection $connection) : \PgSql\Result|false
{
}<?php 

/** @param resource $connection */
#[\Until('8.1')]
function pg_select($connection, string $table_name, array $conditions, int $flags = PGSQL_DML_EXEC, int $mode = PGSQL_ASSOC) : array|string|false
{
}
/**
 * @return array<int, array>|string|false
 * @refcount 1
 */
#[\Since('8.1')]
function pg_select(\PgSql\Connection $connection, string $table_name, array $conditions, int $flags = PGSQL_DML_EXEC, int $mode = PGSQL_ASSOC) : array|string|false
{
}<?php 

/** @param resource $lob */
#[\Until('8.1')]
function pg_lo_read_all($lob) : int
{
}
#[\Since('8.1')]
function pg_lo_read_all(\PgSql\Lob $lob) : int
{
}<?php 

/**
 * @param resource $result
 * @param string|int $row
 */
#[\Until('8.1')]
function pg_field_prtlen($result, $row, string|int $field = UNKNOWN) : int|false
{
}
/** @param string|int $row */
#[\Since('8.1')]
function pg_field_prtlen(\PgSql\Result $result, $row, string|int $field = UNKNOWN) : int|false
{
}<?php 

/** @param resource $result */
#[\Until('8.1')]
function pg_num_fields($result) : int
{
}
#[\Since('8.1')]
function pg_num_fields(\PgSql\Result $result) : int
{
}<?php 

/** @param resource $result */
#[\Until('8.1')]
function pg_last_oid($result) : string|int|false
{
}
/** @refcount 1 */
#[\Since('8.1')]
function pg_last_oid(\PgSql\Result $result) : string|int|false
{
}<?php 

/** @param resource|null $connection */
#[\Until('8.1')]
function pg_close($connection = null) : bool
{
}
#[\Since('8.1')]
function pg_close(?\PgSql\Connection $connection = null) : bool
{
}<?php 

/**
 * @param resource $result
 * @alias pg_last_oid
 * @deprecated
 */
#[\Until('8.1')]
function pg_getlastoid($result) : string|int|false
{
}
/**
 * @alias pg_last_oid
 * @deprecated
 */
#[\Since('8.1')]
function pg_getlastoid(\PgSql\Result $result) : string|int|false
{
}<?php 

/** @param resource|string $connection */
#[\Until('8.1')]
function pg_escape_identifier($connection, string $string = UNKNOWN) : string|false
{
}
/**
 * @param PgSql\Connection|string $connection
 * @refcount 1
 */
#[\Since('8.1')]
function pg_escape_identifier($connection, string $string = UNKNOWN) : string|false
{
}<?php 

/** @param resource $lob */
#[\Until('8.1')]
function pg_lo_seek($lob, int $offset, int $whence = SEEK_CUR) : bool
{
}
#[\Since('8.1')]
function pg_lo_seek(\PgSql\Lob $lob, int $offset, int $whence = SEEK_CUR) : bool
{
}<?php 

/**
 * @param resource $result
 * @alias pg_num_rows
 * @deprecated
 */
#[\Until('8.1')]
function pg_numrows($result) : int
{
}
/**
 * @alias pg_num_rows
 * @deprecated
 */
#[\Since('8.1')]
function pg_numrows(\PgSql\Result $result) : int
{
}<?php 

/**
 * @param resource $connection
 * @param string|int $oid
 * @return resource|false
 * @alias pg_lo_open
 * @deprecated
 */
#[\Until('8.1')]
function pg_loopen($connection, $oid = UNKNOWN, string $mode = UNKNOWN)
{
}
/**
 * @param PgSql\Connection $connection
 * @param string|int $oid
 * @alias pg_lo_open
 * @deprecated
 */
#[\Since('8.1')]
function pg_loopen($connection, $oid = UNKNOWN, string $mode = UNKNOWN) : \PgSql\Lob|false
{
}<?php 

/** @param resource|string $connection */
#[\Until('8.1')]
function pg_escape_literal($connection, string $string = UNKNOWN) : string|false
{
}
/**
 * @param PgSql\Connection|string $connection
 * @refcount 1
 */
#[\Since('8.1')]
function pg_escape_literal($connection, string $string = UNKNOWN) : string|false
{
}<?php 

/**
 * @param resource|string $connection
 * @param string|array $query
 * @return resource|false
 */
#[\Until('8.1')]
function pg_query_params($connection, $query, array $params = UNKNOWN)
{
}
/**
 * @param PgSql\Connection|string $connection
 * @param string|array $query
 * @refcount 1
 */
#[\Since('8.1')]
function pg_query_params($connection, $query, array $params = UNKNOWN) : \PgSql\Result|false
{
}<?php 

/**
 * @param resource $connection
 * @param string|int $oid
 * @alias pg_lo_unlink
 * @deprecated
 */
#[\Until('8.1')]
function pg_lounlink($connection, $oid = UNKNOWN) : bool
{
}
/**
 * @param PgSql\Connection $connection
 * @param string|int $oid
 * @alias pg_lo_unlink
 * @deprecated
 */
#[\Since('8.1')]
function pg_lounlink($connection, $oid = UNKNOWN) : bool
{
}<?php 

/**
 * @param resource|string $connection
 * @param string|int $filename
 * @param string|int $oid
 * @return resource|false
 */
#[\Until('8.1')]
function pg_lo_import($connection, $filename = UNKNOWN, $oid = UNKNOWN) : string|int|false
{
}
/**
 * @param PgSql\Connection|string $connection
 * @param string|int $filename
 * @param string|int $oid
 * @refcount 1
 */
#[\Since('8.1')]
function pg_lo_import($connection, $filename = UNKNOWN, $oid = UNKNOWN) : string|int|false
{
}<?php 

/**
 * @param resource $connection
 * @param string|int $oid
 */
#[\Until('8.1')]
function pg_lo_create($connection = UNKNOWN, $oid = UNKNOWN) : string|int|false
{
}
/**
 * @param PgSql\Connection $connection
 * @param string|int $oid
 * @refcount 1
 */
#[\Since('8.1')]
function pg_lo_create($connection = UNKNOWN, $oid = UNKNOWN) : string|int|false
{
}<?php 

/** @param resource $result */
#[\Until('8.1')]
function pg_field_type_oid($result, int $field) : string|int
{
}
/** @refcount 1 */
#[\Since('8.1')]
function pg_field_type_oid(\PgSql\Result $result, int $field) : string|int
{
}<?php 

/** @param resource $result */
#[\Until('8.1')]
function pg_result_seek($result, int $row) : bool
{
}
#[\Since('8.1')]
function pg_result_seek(\PgSql\Result $result, int $row) : bool
{
}<?php 

/** @param resource $result */
#[\Until('8.1')]
function pg_result_error_field($result, int $field_code) : string|false|null
{
}
/** @refcount 1 */
#[\Since('8.1')]
function pg_result_error_field(\PgSql\Result $result, int $field_code) : string|false|null
{
}<?php 

/**
 * @param resource|string|int $connection
 * @param string|int $oid
 * @param string|int $filename
 * @return resource|false
 */
#[\Until('8.1')]
function pg_lo_export($connection, $oid = UNKNOWN, $filename = UNKNOWN) : bool
{
}
/**
 * @param PgSql\Connection|string|int $connection
 * @param string|int $oid
 * @param string|int $filename
 */
#[\Since('8.1')]
function pg_lo_export($connection, $oid = UNKNOWN, $filename = UNKNOWN) : bool
{
}<?php 

/**
 * @param resource|string|int $connection
 * @param string|int $oid
 * @param string|int $filename
 * @return resource|false
 * @alias pg_lo_export
 * @deprecated
 */
#[\Until('8.1')]
function pg_loexport($connection, $oid = UNKNOWN, $filename = UNKNOWN) : bool
{
}
/**
 * @param PgSql\Connection|string|int $connection
 * @param string|int $oid
 * @param string|int $filename
 * @alias pg_lo_export
 * @deprecated
 */
#[\Since('8.1')]
function pg_loexport($connection, $oid = UNKNOWN, $filename = UNKNOWN) : bool
{
}<?php 

/** @param resource $result */
#[\Until('8.1')]
function pg_field_size($result, int $field) : int
{
}
#[\Since('8.1')]
function pg_field_size(\PgSql\Result $result, int $field) : int
{
}<?php 

/**
 * @param resource $result
 */
#[\Until('8.1')]
function pg_fetch_array($result, ?int $row = null, int $mode = PGSQL_BOTH) : array|false
{
}
/**
 * @return array<int|string, string|null>|false
 * @refcount 1
 */
#[\Since('8.1')]
function pg_fetch_array(\PgSql\Result $result, ?int $row = null, int $mode = PGSQL_BOTH) : array|false
{
}<?php 

/** @param resource $result */
#[\Until('8.1')]
function pg_num_rows($result) : int
{
}
#[\Since('8.1')]
function pg_num_rows(\PgSql\Result $result) : int
{
}<?php 

/** @param resource $connection */
#[\Until('8.1')]
function pg_connection_status($connection) : int
{
}
#[\Since('8.1')]
function pg_connection_status(\PgSql\Connection $connection) : int
{
}<?php 

/** @param resource $connection */
#[\Until('8.1')]
function pg_last_notice($connection, int $mode = PGSQL_NOTICE_LAST) : array|string|bool
{
}
#[\Since('8.1')]
function pg_last_notice(\PgSql\Connection $connection, int $mode = PGSQL_NOTICE_LAST) : array|string|bool
{
}<?php 

/** @param resource|string $connection */
#[\Until('8.1')]
function pg_escape_bytea($connection, string $string = UNKNOWN) : string
{
}
/**
 * @param PgSql\Connection|string $connection
 * @refcount 1
 */
#[\Since('8.1')]
function pg_escape_bytea($connection, string $string = UNKNOWN) : string
{
}<?php 

/** @param resource|null $connection */
#[\Until('8.1')]
function pg_host($connection = null) : string
{
}
/** @refcount 1 */
#[\Since('8.1')]
function pg_host(?\PgSql\Connection $connection = null) : string
{
}<?php 

/**
 * @param resource $lob
 * @alias pg_lo_write
 * @deprecated
 */
#[\Until('8.1')]
function pg_lowrite($lob, string $data, ?int $length = null) : int|false
{
}
/**
 * @alias pg_lo_write
 * @deprecated
 */
#[\Since('8.1')]
function pg_lowrite(\PgSql\Lob $lob, string $data, ?int $length = null) : int|false
{
}<?php 

/** @param resource $result */
#[\Until('8.1')]
function pg_field_table($result, int $field, bool $oid_only = false) : string|int|false
{
}
#[\Since('8.1')]
function pg_field_table(\PgSql\Result $result, int $field, bool $oid_only = false) : string|int|false
{
}<?php 

/** @param resource $lob */
#[\Until('8.1')]
function pg_lo_write($lob, string $data, ?int $length = null) : int|false
{
}
#[\Since('8.1')]
function pg_lo_write(\PgSql\Lob $lob, string $data, ?int $length = null) : int|false
{
}<?php 

/** @param resource $ftp */
#[\Until('8.1')]
function ftp_mlsd($ftp, string $directory) : array|false
{
}
/**
 * @return array<int, array>|false
 * @refcount 1
 */
#[\Since('8.1')]
function ftp_mlsd(\FTP\Connection $ftp, string $directory) : array|false
{
}<?php 

#endif
/** @param resource $ftp */
#[\Until('8.1')]
function ftp_login($ftp, string $username, string $password) : bool
{
}
#endif
#[\Since('8.1')]
function ftp_login(\FTP\Connection $ftp, string $username, string $password) : bool
{
}<?php 

/** @param resource $ftp */
#[\Until('8.1')]
function ftp_rename($ftp, string $from, string $to) : bool
{
}
#[\Since('8.1')]
function ftp_rename(\FTP\Connection $ftp, string $from, string $to) : bool
{
}<?php 

/** @param resource $ftp */
#[\Until('8.1')]
function ftp_rawlist($ftp, string $directory, bool $recursive = false) : array|false
{
}
/**
 * @return array<int, string>|false
 * @refcount 1
 */
#[\Since('8.1')]
function ftp_rawlist(\FTP\Connection $ftp, string $directory, bool $recursive = false) : array|false
{
}<?php 

/** @param resource $ftp */
#[\Until('8.1')]
function ftp_site($ftp, string $command) : bool
{
}
#[\Since('8.1')]
function ftp_site(\FTP\Connection $ftp, string $command) : bool
{
}<?php 

/** @param resource $ftp */
#[\Until('8.1')]
function ftp_chmod($ftp, int $permissions, string $filename) : int|false
{
}
#[\Since('8.1')]
function ftp_chmod(\FTP\Connection $ftp, int $permissions, string $filename) : int|false
{
}<?php 

/** @param resource $ftp */
#[\Until('8.1')]
function ftp_append($ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY) : bool
{
}
#[\Since('8.1')]
function ftp_append(\FTP\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY) : bool
{
}<?php 

/** @param resource $ftp */
#[\Until('8.1')]
function ftp_get_option($ftp, int $option) : int|bool
{
}
#[\Since('8.1')]
function ftp_get_option(\FTP\Connection $ftp, int $option) : int|bool
{
}<?php 

/** @param resource $ftp */
#[\Until('8.1')]
function ftp_rmdir($ftp, string $directory) : bool
{
}
#[\Since('8.1')]
function ftp_rmdir(\FTP\Connection $ftp, string $directory) : bool
{
}<?php 

namespace FTP;

/**
 * @strict-properties
 * @not-serializable
 */
#[\Since('8.1')]
final class Connection
{
}<?php 

/** @param resource $ftp */
#[\Until('8.1')]
function ftp_raw($ftp, string $command) : ?array
{
}
/**
 * @return array<int, string>|null
 * @refcount 1
 */
#[\Since('8.1')]
function ftp_raw(\FTP\Connection $ftp, string $command) : ?array
{
}<?php 

/**
 * @param resource $ftp
 * @alias ftp_close
 */
#[\Until('8.1')]
function ftp_quit($ftp) : bool
{
}
/** @alias ftp_close */
#[\Since('8.1')]
function ftp_quit(\FTP\Connection $ftp) : bool
{
}<?php 

#ifdef HAVE_FTP_SSL
/** @return resource|false */
#[\Until('8.1')]
function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90)
{
}
#ifdef HAVE_FTP_SSL
#[\Since('8.1')]
function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90) : \FTP\Connection|false
{
}<?php 

/**
 * @param resource $ftp
 * @param resource $stream
 */
#[\Until('8.1')]
function ftp_fput($ftp, string $remote_filename, $stream, int $mode = FTP_BINARY, int $offset = 0) : bool
{
}
/** @param resource $stream */
#[\Since('8.1')]
function ftp_fput(\FTP\Connection $ftp, string $remote_filename, $stream, int $mode = FTP_BINARY, int $offset = 0) : bool
{
}<?php 

/**
 * @param resource $ftp
 * @param resource $stream
 */
#[\Until('8.1')]
function ftp_nb_fput($ftp, string $remote_filename, $stream, int $mode = FTP_BINARY, int $offset = 0) : int
{
}
/** @param resource $stream */
#[\Since('8.1')]
function ftp_nb_fput(\FTP\Connection $ftp, string $remote_filename, $stream, int $mode = FTP_BINARY, int $offset = 0) : int
{
}<?php 

/**
 * @param resource $ftp
 * @param string $response
 */
#[\Until('8.1')]
function ftp_alloc($ftp, int $size, &$response = null) : bool
{
}
/** @param string $response */
#[\Since('8.1')]
function ftp_alloc(\FTP\Connection $ftp, int $size, &$response = null) : bool
{
}<?php 

/**
 * @param resource $ftp
 * @param int|bool $value
 */
#[\Until('8.1')]
function ftp_set_option($ftp, int $option, $value) : bool
{
}
/** @param int|bool $value */
#[\Since('8.1')]
function ftp_set_option(\FTP\Connection $ftp, int $option, $value) : bool
{
}<?php 

/** @param resource $ftp */
#[\Until('8.1')]
function ftp_chdir($ftp, string $directory) : bool
{
}
#[\Since('8.1')]
function ftp_chdir(\FTP\Connection $ftp, string $directory) : bool
{
}<?php 

/** @param resource $ftp */
#[\Until('8.1')]
function ftp_size($ftp, string $filename) : int
{
}
#[\Since('8.1')]
function ftp_size(\FTP\Connection $ftp, string $filename) : int
{
}<?php 

/**
 * @param resource $ftp
 * @param resource $stream
 */
#[\Until('8.1')]
function ftp_nb_fget($ftp, $stream, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0) : int
{
}
/** @param resource $stream */
#[\Since('8.1')]
function ftp_nb_fget(\FTP\Connection $ftp, $stream, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0) : int
{
}<?php 

/** @param resource $ftp */
#[\Until('8.1')]
function ftp_pasv($ftp, bool $enable) : bool
{
}
#[\Since('8.1')]
function ftp_pasv(\FTP\Connection $ftp, bool $enable) : bool
{
}<?php 

/** @param resource $ftp */
#[\Until('8.1')]
function ftp_nb_continue($ftp) : int
{
}
#[\Since('8.1')]
function ftp_nb_continue(\FTP\Connection $ftp) : int
{
}<?php 

/** @param resource $ftp */
#[\Until('8.1')]
function ftp_mkdir($ftp, string $directory) : string|false
{
}
#[\Since('8.1')]
function ftp_mkdir(\FTP\Connection $ftp, string $directory) : string|false
{
}<?php 

/** @generate-function-entries */
/** @return resource|false */
#[\Until('8.1')]
function ftp_connect(string $hostname, int $port = 21, int $timeout = 90)
{
}
#[\Since('8.1')]
function ftp_connect(string $hostname, int $port = 21, int $timeout = 90) : \FTP\Connection|false
{
}<?php 

/** @param resource $ftp */
#[\Until('8.1')]
function ftp_cdup($ftp) : bool
{
}
#[\Since('8.1')]
function ftp_cdup(\FTP\Connection $ftp) : bool
{
}<?php 

/** @param resource $ftp */
#[\Until('8.1')]
function ftp_systype($ftp) : string|false
{
}
#[\Since('8.1')]
function ftp_systype(\FTP\Connection $ftp) : string|false
{
}<?php 

/** @param resource $ftp */
#[\Until('8.1')]
function ftp_pwd($ftp) : string|false
{
}
#[\Since('8.1')]
function ftp_pwd(\FTP\Connection $ftp) : string|false
{
}<?php 

/** @param resource $ftp */
#[\Until('8.1')]
function ftp_close($ftp) : bool
{
}
#[\Since('8.1')]
function ftp_close(\FTP\Connection $ftp) : bool
{
}<?php 

/** @param resource $ftp */
#[\Until('8.1')]
function ftp_nlist($ftp, string $directory) : array|false
{
}
/**
 * @return array<int, string>|false
 * @refcount 1
 */
#[\Since('8.1')]
function ftp_nlist(\FTP\Connection $ftp, string $directory) : array|false
{
}<?php 

/** @param resource $ftp */
#[\Until('8.1')]
function ftp_get($ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0) : bool
{
}
#[\Since('8.1')]
function ftp_get(\FTP\Connection $ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0) : bool
{
}<?php 

/** @param resource $ftp */
#[\Until('8.1')]
function ftp_nb_put($ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0) : int|false
{
}
#[\Since('8.1')]
function ftp_nb_put(\FTP\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0) : int|false
{
}<?php 

/** @param resource $ftp */
#[\Until('8.1')]
function ftp_exec($ftp, string $command) : bool
{
}
#[\Since('8.1')]
function ftp_exec(\FTP\Connection $ftp, string $command) : bool
{
}<?php 

/** @param resource $ftp */
#[\Until('8.1')]
function ftp_put($ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0) : bool
{
}
#[\Since('8.1')]
function ftp_put(\FTP\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0) : bool
{
}<?php 

/**
 * @param resource $ftp
 * @param resource $stream
 */
#[\Until('8.1')]
function ftp_fget($ftp, $stream, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0) : bool
{
}
/** @param resource $stream */
#[\Since('8.1')]
function ftp_fget(\FTP\Connection $ftp, $stream, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0) : bool
{
}<?php 

/** @param resource $ftp */
#[\Until('8.1')]
function ftp_mdtm($ftp, string $filename) : int
{
}
#[\Since('8.1')]
function ftp_mdtm(\FTP\Connection $ftp, string $filename) : int
{
}<?php 

/** @param resource $ftp */
#[\Until('8.1')]
function ftp_nb_get($ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0) : int
{
}
#[\Since('8.1')]
function ftp_nb_get(\FTP\Connection $ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0) : int|false
{
}<?php 

/** @param resource $ftp */
#[\Until('8.1')]
function ftp_delete($ftp, string $filename) : bool
{
}
#[\Since('8.1')]
function ftp_delete(\FTP\Connection $ftp, string $filename) : bool
{
}<?php 

function filter_var(mixed $value, int $filter = FILTER_DEFAULT, array|int $options = 0) : mixed
{
}<?php 

/** @generate-function-entries */
function filter_has_var(int $input_type, string $var_name) : bool
{
}<?php 

function filter_input_array(int $type, array|int $options = FILTER_DEFAULT, bool $add_empty = true) : array|false|null
{
}<?php 

function filter_input(int $type, string $var_name, int $filter = FILTER_DEFAULT, array|int $options = 0) : mixed
{
}<?php 

function filter_id(string $name) : int|false
{
}<?php 

function filter_var_array(array $array, array|int $options = FILTER_DEFAULT, bool $add_empty = true) : array|false|null
{
}<?php 

/**
 * @refcount 1
 */
function filter_list() : array
{
}<?php 

abstract class ReflectionFunctionAbstract implements \Reflector
{
    /** @implementation-alias ReflectionClass::__clone */
    #[\Until('8.1')]
    private final function __clone() : void
    {
    }
    /** @implementation-alias ReflectionClass::__clone */
    #[\Since('8.1')]
    private function __clone() : void
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function inNamespace()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isClosure()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isDeprecated()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isInternal()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isUserDefined()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isGenerator()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isVariadic()
    {
    }
    /** @tentative-return-type */
    #[\Since('8.1')]
    public function isStatic() : bool
    {
    }
    /**
     * @tentative-return-type
     * @return (object | null)
     */
    public function getClosureThis()
    {
    }
    /**
     * @tentative-return-type
     * @return (ReflectionClass | null)
     */
    public function getClosureScopeClass()
    {
    }
    /**
     * @tentative-return-type
     * @return (ReflectionClass | null)
     */
    public function getClosureCalledClass()
    {
    }
    #[\Since('8.1')]
    public function getClosureUsedVariables() : array
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function getDocComment()
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function getEndLine()
    {
    }
    /**
     * @tentative-return-type
     * @return (ReflectionExtension | null)
     */
    public function getExtension()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function getExtensionName()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function getFileName()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getName()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getNamespaceName()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getNumberOfParameters()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getNumberOfRequiredParameters()
    {
    }
    /**
     * @tentative-return-type
     * @return ReflectionParameter[]
     */
    public function getParameters()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getShortName()
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function getStartLine()
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function getStaticVariables()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function returnsReference()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function hasReturnType()
    {
    }
    /**
     * @tentative-return-type
     * @return (ReflectionType | null)
     */
    public function getReturnType()
    {
    }
    #[\Since('8.1')]
    public function hasTentativeReturnType() : bool
    {
    }
    #[\Since('8.1')]
    public function getTentativeReturnType() : ?ReflectionType
    {
    }
    /** @return ReflectionAttribute[] */
    public function getAttributes(?string $name = null, int $flags = 0) : array
    {
    }
}<?php 

class ReflectionZendExtension implements \Reflector
{
    /** @implementation-alias ReflectionClass::__clone */
    #[\Until('8.1')]
    private final function __clone() : void
    {
    }
    /** @implementation-alias ReflectionClass::__clone */
    #[\Since('8.1')]
    private function __clone() : void
    {
    }
    public function __construct(string $name)
    {
    }
    public function __toString() : string
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getName()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getVersion()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getAuthor()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getURL()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getCopyright()
    {
    }
}<?php 

class ReflectionMethod extends \ReflectionFunctionAbstract
{
    public function __construct(object|string $objectOrMethod, ?string $method = null)
    {
    }
    public function __toString() : string
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isPublic()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isPrivate()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isProtected()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isAbstract()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isFinal()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isConstructor()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isDestructor()
    {
    }
    /**
     * @tentative-return-type
     * @return Closure
     */
    public function getClosure(?object $object = null)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getModifiers()
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function invoke(?object $object, mixed ...$args)
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function invokeArgs(?object $object, array $args)
    {
    }
    /**
     * @tentative-return-type
     * @return ReflectionClass
     */
    public function getDeclaringClass()
    {
    }
    /**
     * @tentative-return-type
     * @return ReflectionMethod
     */
    public function getPrototype()
    {
    }
    #[\Since('8.2')]
    public function hasPrototype() : bool
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setAccessible(bool $accessible)
    {
    }
}<?php 

#[\Since('8.1')]
class ReflectionEnumBackedCase extends \ReflectionEnumUnitCase
{
    public function __construct(object|string $class, string $constant)
    {
    }
    public function getBackingValue() : int|string
    {
    }
}<?php 

/** @generate-function-entries */
class ReflectionException extends \Exception
{
}<?php 

class Reflection
{
    /**
     * @tentative-return-type
     * @return string[]
     */
    public static function getModifierNames(int $modifiers)
    {
    }
}<?php 

class ReflectionFunction extends \ReflectionFunctionAbstract
{
    public function __construct(Closure|string $function)
    {
    }
    public function __toString() : string
    {
    }
    #[\Since('8.2')]
    public function isAnonymous() : bool
    {
    }
    /**
     * @tentative-return-type
     * @deprecated ReflectionFunction can no longer be constructed for disabled functions
     * @return bool
     */
    public function isDisabled()
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function invoke(mixed ...$args)
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function invokeArgs(array $args)
    {
    }
    /**
     * @tentative-return-type
     * @return Closure
     */
    public function getClosure()
    {
    }
}<?php 

class ReflectionProperty implements \Reflector
{
    /** @implementation-alias ReflectionClass::__clone */
    #[\Until('8.1')]
    private final function __clone() : void
    {
    }
    /** @implementation-alias ReflectionClass::__clone */
    #[\Since('8.1')]
    private function __clone() : void
    {
    }
    public function __construct(object|string $class, string $property)
    {
    }
    public function __toString() : string
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getName()
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function getValue(?object $object = null)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setValue(mixed $objectOrValue, mixed $value = UNKNOWN)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isInitialized(?object $object = null)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isPublic()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isPrivate()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isProtected()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isStatic()
    {
    }
    #[\Since('8.1')]
    public function isReadOnly() : bool
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isDefault()
    {
    }
    public function isPromoted() : bool
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getModifiers()
    {
    }
    /**
     * @tentative-return-type
     * @return ReflectionClass
     */
    public function getDeclaringClass()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function getDocComment()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setAccessible(bool $accessible)
    {
    }
    /**
     * @tentative-return-type
     * @return (ReflectionType | null)
     */
    public function getType()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function hasType()
    {
    }
    public function hasDefaultValue() : bool
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function getDefaultValue()
    {
    }
    /** @return ReflectionAttribute[] */
    public function getAttributes(?string $name = null, int $flags = 0) : array
    {
    }
}<?php 

class ReflectionClass implements \Reflector
{
    #[\Until('8.1')]
    private final function __clone() : void
    {
    }
    #[\Since('8.1')]
    private function __clone() : void
    {
    }
    public function __construct(object|string $objectOrClass)
    {
    }
    public function __toString() : string
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getName()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isInternal()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isUserDefined()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isAnonymous()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isInstantiable()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isCloneable()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function getFileName()
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function getStartLine()
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function getEndLine()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function getDocComment()
    {
    }
    /**
     * @tentative-return-type
     * @return (ReflectionMethod | null)
     */
    public function getConstructor()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function hasMethod(string $name)
    {
    }
    /**
     * @tentative-return-type
     * @return ReflectionMethod
     */
    public function getMethod(string $name)
    {
    }
    /**
     * @tentative-return-type
     * @return ReflectionMethod[]
     */
    public function getMethods(?int $filter = null)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function hasProperty(string $name)
    {
    }
    /**
     * @tentative-return-type
     * @return ReflectionProperty
     */
    public function getProperty(string $name)
    {
    }
    /**
     * @tentative-return-type
     * @return ReflectionProperty[]
     */
    public function getProperties(?int $filter = null)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function hasConstant(string $name)
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function getConstants(?int $filter = null)
    {
    }
    /**
     * @tentative-return-type
     * @return ReflectionClassConstant[]
     */
    public function getReflectionConstants(?int $filter = null)
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function getConstant(string $name)
    {
    }
    /**
     * @tentative-return-type
     * @return (ReflectionClassConstant | false)
     */
    public function getReflectionConstant(string $name)
    {
    }
    /**
     * @tentative-return-type
     * @return ReflectionClass[]
     */
    public function getInterfaces()
    {
    }
    /**
     * @tentative-return-type
     * @return string[]
     */
    public function getInterfaceNames()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isInterface()
    {
    }
    /**
     * @tentative-return-type
     * @return ReflectionClass[]
     */
    public function getTraits()
    {
    }
    /**
     * @tentative-return-type
     * @return string[]
     */
    public function getTraitNames()
    {
    }
    /**
     * @tentative-return-type
     * @return string[]
     */
    public function getTraitAliases()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isTrait()
    {
    }
    #[\Since('8.1')]
    public function isEnum() : bool
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isAbstract()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isFinal()
    {
    }
    #[\Since('8.2')]
    public function isReadOnly() : bool
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getModifiers()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isInstance(object $object)
    {
    }
    /**
     * @tentative-return-type
     * @return object
     */
    public function newInstance(mixed ...$args)
    {
    }
    /**
     * @tentative-return-type
     * @return object
     */
    public function newInstanceWithoutConstructor()
    {
    }
    /**
     * @tentative-return-type
     * @return object
     */
    public function newInstanceArgs(array $args = [])
    {
    }
    /**
     * @tentative-return-type
     * @return (ReflectionClass | false)
     */
    public function getParentClass()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isSubclassOf(ReflectionClass|string $class)
    {
    }
    /**
     * @tentative-return-type
     * @return (array | null)
     */
    public function getStaticProperties()
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function getStaticPropertyValue(string $name, mixed $default = UNKNOWN)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setStaticPropertyValue(string $name, mixed $value)
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function getDefaultProperties()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isIterable()
    {
    }
    /**
     * @tentative-return-type
     * @alias ReflectionClass::isIterable
     * @return bool
     */
    public function isIterateable()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function implementsInterface(ReflectionClass|string $interface)
    {
    }
    /**
     * @tentative-return-type
     * @return (ReflectionExtension | null)
     */
    public function getExtension()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function getExtensionName()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function inNamespace()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getNamespaceName()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getShortName()
    {
    }
    /** @return ReflectionAttribute[] */
    public function getAttributes(?string $name = null, int $flags = 0) : array
    {
    }
}<?php 

class ReflectionClassConstant implements \Reflector
{
    /** @implementation-alias ReflectionClass::__clone */
    #[\Until('8.1')]
    private final function __clone() : void
    {
    }
    /** @implementation-alias ReflectionClass::__clone */
    #[\Since('8.1')]
    private function __clone() : void
    {
    }
    public function __construct(object|string $class, string $constant)
    {
    }
    public function __toString() : string
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function getName()
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function getValue()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isPublic()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isPrivate()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isProtected()
    {
    }
    #[\Since('8.1')]
    public function isFinal() : bool
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getModifiers()
    {
    }
    /**
     * @tentative-return-type
     * @return ReflectionClass
     */
    public function getDeclaringClass()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function getDocComment()
    {
    }
    /** @return ReflectionAttribute[] */
    public function getAttributes(?string $name = null, int $flags = 0) : array
    {
    }
    #[\Since('8.1')]
    public function isEnumCase() : bool
    {
    }
}<?php 

final class ReflectionReference
{
    public static function fromArrayElement(array $array, int|string $key) : ?ReflectionReference
    {
    }
    public function getId() : string
    {
    }
    /** @implementation-alias ReflectionClass::__clone */
    private function __clone() : void
    {
    }
    private function __construct()
    {
    }
}<?php 

class ReflectionAttribute
{
    public function getName() : string
    {
    }
    public function getTarget() : int
    {
    }
    public function isRepeated() : bool
    {
    }
    public function getArguments() : array
    {
    }
    public function newInstance() : object
    {
    }
    #[\Since('8.1')]
    public function __toString() : string
    {
    }
    private function __clone() : void
    {
    }
    private function __construct()
    {
    }
}<?php 

class ReflectionParameter implements \Reflector
{
    /** @implementation-alias ReflectionClass::__clone */
    #[\Until('8.1')]
    private final function __clone() : void
    {
    }
    /** @implementation-alias ReflectionClass::__clone */
    #[\Since('8.1')]
    private function __clone() : void
    {
    }
    /** @param string|array|object $function */
    public function __construct($function, int|string $param)
    {
    }
    public function __toString() : string
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getName()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isPassedByReference()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function canBePassedByValue()
    {
    }
    /**
     * @tentative-return-type
     * @return ReflectionFunctionAbstract
     */
    public function getDeclaringFunction()
    {
    }
    /**
     * @tentative-return-type
     * @return (ReflectionClass | null)
     */
    public function getDeclaringClass()
    {
    }
    /**
     * @tentative-return-type
     * @deprecated Use ReflectionParameter::getType() instead
     * @return (ReflectionClass | null)
     */
    public function getClass()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function hasType()
    {
    }
    /**
     * @tentative-return-type
     * @return (ReflectionType | null)
     */
    public function getType()
    {
    }
    /**
     * @tentative-return-type
     * @deprecated Use ReflectionParameter::getType() instead
     * @return bool
     */
    public function isArray()
    {
    }
    /**
     * @tentative-return-type
     * @deprecated Use ReflectionParameter::getType() instead
     * @return bool
     */
    public function isCallable()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function allowsNull()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getPosition()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isOptional()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isDefaultValueAvailable()
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function getDefaultValue()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isDefaultValueConstant()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | null)
     */
    public function getDefaultValueConstantName()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isVariadic()
    {
    }
    public function isPromoted() : bool
    {
    }
    /** @return ReflectionAttribute[] */
    public function getAttributes(?string $name = null, int $flags = 0) : array
    {
    }
}<?php 

#[\Since('8.1')]
class ReflectionEnumUnitCase extends \ReflectionClassConstant
{
    public function __construct(object|string $class, string $constant)
    {
    }
    public function getEnum() : ReflectionEnum
    {
    }
    /**
     * @implementation-alias ReflectionClassConstant::getValue
     * @no-verify
     */
    public function getValue() : UnitEnum
    {
    }
}<?php 

#[\Since('8.1')]
class ReflectionEnum extends \ReflectionClass
{
    public function __construct(object|string $objectOrClass)
    {
    }
    public function hasCase(string $name) : bool
    {
    }
    public function getCase(string $name) : ReflectionEnumUnitCase
    {
    }
    public function getCases() : array
    {
    }
    public function isBacked() : bool
    {
    }
    #[\Until('8.2')]
    public function getBackingType() : ?ReflectionType
    {
    }
    #[\Since('8.2')]
    public function getBackingType() : ?ReflectionNamedType
    {
    }
}<?php 

abstract class ReflectionType implements \Stringable
{
    /** @implementation-alias ReflectionClass::__clone */
    #[\Until('8.1')]
    private final function __clone() : void
    {
    }
    /** @implementation-alias ReflectionClass::__clone */
    #[\Since('8.1')]
    private function __clone() : void
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function allowsNull()
    {
    }
    public function __toString() : string
    {
    }
}<?php 

class ReflectionUnionType extends \ReflectionType
{
    public function getTypes() : array
    {
    }
}<?php 

class ReflectionExtension implements \Reflector
{
    /** @implementation-alias ReflectionClass::__clone */
    #[\Until('8.1')]
    private final function __clone() : void
    {
    }
    /** @implementation-alias ReflectionClass::__clone */
    #[\Since('8.1')]
    private function __clone() : void
    {
    }
    public function __construct(string $name)
    {
    }
    public function __toString() : string
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getName()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | null)
     */
    public function getVersion()
    {
    }
    /**
     * @tentative-return-type
     * @return ReflectionFunction[]
     */
    public function getFunctions()
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function getConstants()
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function getINIEntries()
    {
    }
    /**
     * @tentative-return-type
     * @return ReflectionClass[]
     */
    public function getClasses()
    {
    }
    /**
     * @tentative-return-type
     * @return string[]
     */
    public function getClassNames()
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function getDependencies()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function info()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isPersistent()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isTemporary()
    {
    }
}<?php 

#[\Since('8.1')]
class ReflectionIntersectionType extends \ReflectionType
{
    public function getTypes() : array
    {
    }
}<?php 

class ReflectionNamedType extends \ReflectionType
{
    /**
     * @tentative-return-type
     * @return string
     */
    public function getName()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isBuiltin()
    {
    }
}<?php 

class ReflectionObject extends \ReflectionClass
{
    public function __construct(object $object)
    {
    }
}<?php 

/** @not-serializable */
#[\Since('8.1')]
final class ReflectionFiber
{
    public function __construct(Fiber $fiber)
    {
    }
    public function getFiber() : Fiber
    {
    }
    public function getExecutingFile() : ?string
    {
    }
    public function getExecutingLine() : ?int
    {
    }
    public function getCallable() : callable
    {
    }
    public function getTrace(int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT) : array
    {
    }
}<?php 

interface Reflector extends \Stringable
{
}<?php 

final class ReflectionGenerator
{
    public function __construct(Generator $generator)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getExecutingLine()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getExecutingFile()
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function getTrace(int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT)
    {
    }
    /**
     * @tentative-return-type
     * @return ReflectionFunctionAbstract
     */
    public function getFunction()
    {
    }
    /**
     * @tentative-return-type
     * @return (object | null)
     */
    public function getThis()
    {
    }
    /**
     * @tentative-return-type
     * @return Generator
     */
    public function getExecutingGenerator()
    {
    }
}<?php 

/** @generate-function-entries */
function exif_tagname(int $index) : string|false
{
}<?php 

function exif_imagetype(string $filename) : int|false
{
}<?php 

/**
 * @param resource|string $file
 * @param int $width
 * @param int $height
 * @param int $image_type
 */
function exif_thumbnail($file, &$width = null, &$height = null, &$image_type = null) : string|false
{
}<?php 

/**
 * @param (resource | string) $file
 * @refcount 1
 */
function exif_read_data($file, ?string $required_sections = null, bool $as_arrays = false, bool $read_thumbnail = false) : array|false
{
}<?php 

/** @generate-function-entries */
class XSLTProcessor
{
    /**
     * @param (DOMDocument | SimpleXMLElement) $stylesheet
     * @tentative-return-type
     * @return bool
     */
    public function importStylesheet(object $stylesheet)
    {
    }
    /**
     * @param (DOMDocument | SimpleXMLElement) $document
     * @tentative-return-type
     * @return (DOMDocument | false)
     */
    public function transformToDoc(object $document, ?string $returnClass = null)
    {
    }
    /**
     * @param (DOMDocument | SimpleXMLElement) $document
     * @tentative-return-type
     * @return int
     */
    public function transformToUri(object $document, string $uri)
    {
    }
    /**
     * @param (DOMDocument | SimpleXMLElement) $document
     * @tentative-return-type
     * @return (string | false | null)
     */
    public function transformToXml(object $document)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function setParameter(string $namespace, array|string $name, ?string $value = null)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function getParameter(string $namespace, string $name)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function removeParameter(string $namespace, string $name)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function hasExsltSupport()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function registerPHPFunctions(array|string|null $functions = null)
    {
    }
    /** @return bool */
    public function setProfiling(?string $filename)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function setSecurityPrefs(int $preferences)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getSecurityPrefs()
    {
    }
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_set_quota($imap, string $quota_root, int $mailbox_size) : bool
{
}
#[\Since('8.1')]
function imap_set_quota(\IMAP\Connection $imap, string $quota_root, int $mailbox_size) : bool
{
}<?php 

function imap_rfc822_parse_headers(string $headers, string $default_hostname = "UNKNOWN") : \stdClass
{
}<?php 

#[\Since('8.2')]
function imap_is_open(\IMAP\Connection $imap) : bool
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_getmailboxes($imap, string $reference, string $pattern) : array|false
{
}
#[\Since('8.1')]
function imap_getmailboxes(\IMAP\Connection $imap, string $reference, string $pattern) : array|false
{
}<?php 

function imap_errors() : array|false
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_setflag_full($imap, string $sequence, string $flag, int $options = 0) : bool
{
}
#[\Since('8.1')]
function imap_setflag_full(\IMAP\Connection $imap, string $sequence, string $flag, int $options = 0) : bool
{
}<?php 

/**
 * @param resource $imap
 * @alias imap_createmailbox
 */
#[\Until('8.1')]
function imap_create($imap, string $mailbox) : bool
{
}
/** @alias imap_createmailbox */
#[\Since('8.1')]
function imap_create(\IMAP\Connection $imap, string $mailbox) : bool
{
}<?php 

#endif
function imap_mail(string $to, string $subject, string $message, ?string $additional_headers = null, ?string $cc = null, ?string $bcc = null, ?string $return_path = null) : bool
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_uid($imap, int $message_num) : int|false
{
}
#[\Since('8.1')]
function imap_uid(\IMAP\Connection $imap, int $message_num) : int|false
{
}<?php 

/**
 * @param resource $imap
 * @alias imap_body
 */
#[\Until('8.1')]
function imap_fetchtext($imap, int $message_num, int $flags = 0) : string|false
{
}
/** @alias imap_body */
#[\Since('8.1')]
function imap_fetchtext(\IMAP\Connection $imap, int $message_num, int $flags = 0) : string|false
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_mailboxmsginfo($imap) : \stdClass
{
}
#[\Since('8.1')]
function imap_mailboxmsginfo(\IMAP\Connection $imap) : \stdClass
{
}<?php 

function imap_alerts() : array|false
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_lsub($imap, string $reference, string $pattern) : array|false
{
}
#[\Since('8.1')]
function imap_lsub(\IMAP\Connection $imap, string $reference, string $pattern) : array|false
{
}<?php 

#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
/** @param resource $imap */
#[\Until('8.1')]
function imap_get_quota($imap, string $quota_root) : array|false
{
}
#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
#[\Since('8.1')]
function imap_get_quota(\IMAP\Connection $imap, string $quota_root) : array|false
{
}<?php 

/**
 * @param resource $imap
 * @alias imap_list
 */
#[\Until('8.1')]
function imap_listmailbox($imap, string $reference, string $pattern) : array|false
{
}
/** @alias imap_list */
#[\Since('8.1')]
function imap_listmailbox(\IMAP\Connection $imap, string $reference, string $pattern) : array|false
{
}<?php 

namespace IMAP;

/**
 * @strict-properties
 * @not-serializable
 */
#[\Since('8.1')]
final class Connection
{
}<?php 

/**
 * @param resource $imap
 * @alias imap_listscan
 */
#[\Until('8.1')]
function imap_scanmailbox($imap, string $reference, string $pattern, string $content) : array|false
{
}
/** @alias imap_listscan */
#[\Since('8.1')]
function imap_scanmailbox(\IMAP\Connection $imap, string $reference, string $pattern, string $content) : array|false
{
}<?php 

/**
 * @param resource $imap
 * @param resource|string|int $file
 */
#[\Until('8.1')]
function imap_savebody($imap, $file, int $message_num, string $section = "", int $flags = 0) : bool
{
}
/** @param resource|string|int $file */
#[\Since('8.1')]
function imap_savebody(\IMAP\Connection $imap, $file, int $message_num, string $section = "", int $flags = 0) : bool
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_fetchbody($imap, int $message_num, string $section, int $flags = 0) : string|false
{
}
#[\Since('8.1')]
function imap_fetchbody(\IMAP\Connection $imap, int $message_num, string $section, int $flags = 0) : string|false
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_check($imap) : \stdClass|false
{
}
#[\Since('8.1')]
function imap_check(\IMAP\Connection $imap) : \stdClass|false
{
}<?php 

/**
 * @param resource $imap
 */
#[\Until('8.1')]
function imap_gc($imap, int $flags) : bool
{
}
#[\Since('8.1')]
function imap_gc(\IMAP\Connection $imap, int $flags) : bool
{
}<?php 

/**
 * @param resource $imap
 */
#[\Until('8.1')]
function imap_expunge($imap) : bool
{
}
#[\Since('8.1')]
function imap_expunge(\IMAP\Connection $imap) : bool
{
}<?php 

function imap_rfc822_parse_adrlist(string $string, string $default_hostname) : array
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_unsubscribe($imap, string $mailbox) : bool
{
}
#[\Since('8.1')]
function imap_unsubscribe(\IMAP\Connection $imap, string $mailbox) : bool
{
}<?php 

function imap_utf7_encode(string $string) : string
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_headerinfo($imap, int $message_num, int $from_length = 0, int $subject_length = 0) : \stdClass|false
{
}
#[\Since('8.1')]
function imap_headerinfo(\IMAP\Connection $imap, int $message_num, int $from_length = 0, int $subject_length = 0) : \stdClass|false
{
}<?php 

function imap_utf8(string $mime_encoded_text) : string
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_sort($imap, int $criteria, bool $reverse, int $flags = 0, ?string $search_criteria = null, ?string $charset = null) : array|false
{
}
#[\Since('8.1')]
function imap_sort(\IMAP\Connection $imap, int $criteria, bool $reverse, int $flags = 0, ?string $search_criteria = null, ?string $charset = null) : array|false
{
}<?php 

function imap_binary(string $string) : string|false
{
}<?php 

function imap_last_error() : string|false
{
}<?php 

/**
 * @param resource $imap
 * @return stdClass|false
 */
#[\Until('8.1')]
function imap_status($imap, string $mailbox, int $flags)
{
}
#[\Since('8.1')]
function imap_status(\IMAP\Connection $imap, string $mailbox, int $flags) : \stdClass|false
{
}<?php 

function imap_base64(string $string) : string|false
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_headers($imap) : array|false
{
}
#[\Since('8.1')]
function imap_headers(\IMAP\Connection $imap) : array|false
{
}<?php 

function imap_utf7_decode(string $string) : string|false
{
}<?php 

function imap_timeout(int $timeout_type, int $timeout = -1) : int|bool
{
}<?php 

/** @generate-function-entries */
/**
 * @return resource|false
 */
#[\Until('8.1')]
function imap_open(string $mailbox, string $user, string $password, int $flags = 0, int $retries = 0, array $options = [])
{
}
#[\Since('8.1')]
function imap_open(string $mailbox, string $user, string $password, int $flags = 0, int $retries = 0, array $options = []) : \IMAP\Connection|false
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_mail_move($imap, string $message_nums, string $mailbox, int $flags = 0) : bool
{
}
#[\Since('8.1')]
function imap_mail_move(\IMAP\Connection $imap, string $message_nums, string $mailbox, int $flags = 0) : bool
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_num_recent($imap) : int
{
}
#[\Since('8.1')]
function imap_num_recent(\IMAP\Connection $imap) : int
{
}<?php 

/**
 * @param resource $imap
 */
#[\Until('8.1')]
function imap_delete($imap, string $message_nums, int $flags = 0) : bool
{
}
#[\Since('8.1')]
function imap_delete(\IMAP\Connection $imap, string $message_nums, int $flags = 0) : bool
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_msgno($imap, int $message_uid) : int
{
}
#[\Since('8.1')]
function imap_msgno(\IMAP\Connection $imap, int $message_uid) : int
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_body($imap, int $message_num, int $flags = 0) : string|false
{
}
#[\Since('8.1')]
function imap_body(\IMAP\Connection $imap, int $message_num, int $flags = 0) : string|false
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_renamemailbox($imap, string $from, string $to) : bool
{
}
#[\Since('8.1')]
function imap_renamemailbox(\IMAP\Connection $imap, string $from, string $to) : bool
{
}<?php 

function imap_mutf7_to_utf8(string $string) : string|false
{
}<?php 

function imap_qprint(string $string) : string|false
{
}<?php 

/**
 * @param resource $imap
 * @alias imap_renamemailbox
 */
#[\Until('8.1')]
function imap_rename($imap, string $from, string $to) : bool
{
}
/** @alias imap_renamemailbox */
#[\Since('8.1')]
function imap_rename(\IMAP\Connection $imap, string $from, string $to) : bool
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_getacl($imap, string $mailbox) : array|false
{
}
#[\Since('8.1')]
function imap_getacl(\IMAP\Connection $imap, string $mailbox) : array|false
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_listscan($imap, string $reference, string $pattern, string $content) : array|false
{
}
#[\Since('8.1')]
function imap_listscan(\IMAP\Connection $imap, string $reference, string $pattern, string $content) : array|false
{
}<?php 

/**
 * @param resource $imap
 */
#[\Until('8.1')]
function imap_close($imap, int $flags = 0) : bool
{
}
#[\Since('8.1')]
function imap_close(\IMAP\Connection $imap, int $flags = 0) : bool
{
}<?php 

function imap_rfc822_write_address(string $mailbox, string $hostname, string $personal) : string|false
{
}<?php 

/**
 * @param resource $imap
 * @return stdClass|false
 */
#[\Until('8.1')]
function imap_bodystruct($imap, int $message_num, string $section)
{
}
#[\Since('8.1')]
function imap_bodystruct(\IMAP\Connection $imap, int $message_num, string $section) : \stdClass|false
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_fetchmime($imap, int $message_num, string $section, int $flags = 0) : string|false
{
}
#[\Since('8.1')]
function imap_fetchmime(\IMAP\Connection $imap, int $message_num, string $section, int $flags = 0) : string|false
{
}<?php 

/**
 * @param resource $imap
 * @alias imap_lsub
 */
#[\Until('8.1')]
function imap_listsubscribed($imap, string $reference, string $pattern) : array|false
{
}
/** @alias imap_lsub */
#[\Since('8.1')]
function imap_listsubscribed(\IMAP\Connection $imap, string $reference, string $pattern) : array|false
{
}<?php 

/**
 * @param resource $imap
 */
#[\Until('8.1')]
function imap_undelete($imap, string $message_nums, int $flags = 0) : bool
{
}
#[\Since('8.1')]
function imap_undelete(\IMAP\Connection $imap, string $message_nums, int $flags = 0) : bool
{
}<?php 

function imap_8bit(string $string) : string|false
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_mail_copy($imap, string $message_nums, string $mailbox, int $flags = 0) : bool
{
}
#[\Since('8.1')]
function imap_mail_copy(\IMAP\Connection $imap, string $message_nums, string $mailbox, int $flags = 0) : bool
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_append($imap, string $folder, string $message, ?string $options = null, ?string $internal_date = null) : bool
{
}
#[\Since('8.1')]
function imap_append(\IMAP\Connection $imap, string $folder, string $message, ?string $options = null, ?string $internal_date = null) : bool
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_getsubscribed($imap, string $reference, string $pattern) : array|false
{
}
#[\Since('8.1')]
function imap_getsubscribed(\IMAP\Connection $imap, string $reference, string $pattern) : array|false
{
}<?php 

/**
 * @param resource $imap
 */
#[\Until('8.1')]
function imap_reopen($imap, string $mailbox, int $flags = 0, int $retries = 0) : bool
{
}
#[\Since('8.1')]
function imap_reopen(\IMAP\Connection $imap, string $mailbox, int $flags = 0, int $retries = 0) : bool
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_deletemailbox($imap, string $mailbox) : bool
{
}
#[\Since('8.1')]
function imap_deletemailbox(\IMAP\Connection $imap, string $mailbox) : bool
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_fetchstructure($imap, int $message_num, int $flags = 0) : \stdClass|false
{
}
#[\Since('8.1')]
function imap_fetchstructure(\IMAP\Connection $imap, int $message_num, int $flags = 0) : \stdClass|false
{
}<?php 

function imap_mail_compose(array $envelope, array $bodies) : string|false
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_ping($imap) : bool
{
}
#[\Since('8.1')]
function imap_ping(\IMAP\Connection $imap) : bool
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_createmailbox($imap, string $mailbox) : bool
{
}
#[\Since('8.1')]
function imap_createmailbox(\IMAP\Connection $imap, string $mailbox) : bool
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_subscribe($imap, string $mailbox) : bool
{
}
#[\Since('8.1')]
function imap_subscribe(\IMAP\Connection $imap, string $mailbox) : bool
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_clearflag_full($imap, string $sequence, string $flag, int $options = 0) : bool
{
}
#[\Since('8.1')]
function imap_clearflag_full(\IMAP\Connection $imap, string $sequence, string $flag, int $options = 0) : bool
{
}<?php 

#ifdef HAVE_IMAP_MUTF7
function imap_utf8_to_mutf7(string $string) : string|false
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_get_quotaroot($imap, string $mailbox) : array|false
{
}
#[\Since('8.1')]
function imap_get_quotaroot(\IMAP\Connection $imap, string $mailbox) : array|false
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_fetchheader($imap, int $message_num, int $flags = 0) : string|false
{
}
#[\Since('8.1')]
function imap_fetchheader(\IMAP\Connection $imap, int $message_num, int $flags = 0) : string|false
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_list($imap, string $reference, string $pattern) : array|false
{
}
#[\Since('8.1')]
function imap_list(\IMAP\Connection $imap, string $reference, string $pattern) : array|false
{
}<?php 

#endif
function imap_mime_header_decode(string $string) : array|false
{
}<?php 

/**
 * @param resource $imap
 * @alias imap_listscan
 */
#[\Until('8.1')]
function imap_scan($imap, string $reference, string $pattern, string $content) : array|false
{
}
/** @alias imap_listscan */
#[\Since('8.1')]
function imap_scan(\IMAP\Connection $imap, string $reference, string $pattern, string $content) : array|false
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_fetch_overview($imap, string $sequence, int $flags = 0) : array|false
{
}
#[\Since('8.1')]
function imap_fetch_overview(\IMAP\Connection $imap, string $sequence, int $flags = 0) : array|false
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_search($imap, string $criteria, int $flags = SE_FREE, string $charset = "") : array|false
{
}
#[\Since('8.1')]
function imap_search(\IMAP\Connection $imap, string $criteria, int $flags = SE_FREE, string $charset = "") : array|false
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_num_msg($imap) : int|false
{
}
#[\Since('8.1')]
function imap_num_msg(\IMAP\Connection $imap) : int|false
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_thread($imap, int $flags = SE_FREE) : array|false
{
}
#[\Since('8.1')]
function imap_thread(\IMAP\Connection $imap, int $flags = SE_FREE) : array|false
{
}<?php 

/** @param resource $imap */
#[\Until('8.1')]
function imap_setacl($imap, string $mailbox, string $user_id, string $rights) : bool
{
}
#[\Since('8.1')]
function imap_setacl(\IMAP\Connection $imap, string $mailbox, string $user_id, string $rights) : bool
{
}<?php 

function gmp_kronecker(\GMP|int|string $num1, \GMP|int|string $num2) : int
{
}<?php 

/**
 * @refcount 1
 */
function gmp_div_qr(\GMP|int|string $num1, \GMP|int|string $num2, int $rounding_mode = GMP_ROUND_ZERO) : array
{
}<?php 

function gmp_sign(\GMP|int|string $num) : int
{
}<?php 

function gmp_nextprime(\GMP|int|string $num) : \GMP
{
}<?php 

function gmp_clrbit(\GMP $num, int $index) : void
{
}<?php 

function gmp_root(\GMP|int|string $num, int $nth) : \GMP
{
}<?php 

function gmp_abs(\GMP|int|string $num) : \GMP
{
}<?php 

function gmp_intval(\GMP|int|string $num) : int
{
}<?php 

function gmp_prob_prime(\GMP|int|string $num, int $repetitions = 10) : int
{
}<?php 

function gmp_jacobi(\GMP|int|string $num1, \GMP|int|string $num2) : int
{
}<?php 

function gmp_perfect_power(\GMP|int|string $num) : bool
{
}<?php 

function gmp_perfect_square(\GMP|int|string $num) : bool
{
}<?php 

/** @generate-function-entries */
class GMP
{
    #[\Since('8.2')]
    public function __construct(int|string $num = 0, int $base = 0)
    {
    }
    #[\Since('8.1')]
    public function __serialize() : array
    {
    }
    #[\Since('8.1')]
    public function __unserialize(array $data) : void
    {
    }
}<?php 

function gmp_invert(\GMP|int|string $num1, \GMP|int|string $num2) : \GMP|false
{
}<?php 

function gmp_gcd(\GMP|int|string $num1, \GMP|int|string $num2) : \GMP
{
}<?php 

function gmp_binomial(\GMP|int|string $n, int $k) : \GMP
{
}<?php 

/** @alias gmp_div_q */
function gmp_div(\GMP|int|string $num1, \GMP|int|string $num2, int $rounding_mode = GMP_ROUND_ZERO) : \GMP
{
}<?php 

function gmp_scan0(\GMP|int|string $num1, int $start) : int
{
}<?php 

function gmp_random_seed(\GMP|int|string $seed) : void
{
}<?php 

function gmp_com(\GMP|int|string $num) : \GMP
{
}<?php 

function gmp_div_r(\GMP|int|string $num1, \GMP|int|string $num2, int $rounding_mode = GMP_ROUND_ZERO) : \GMP
{
}<?php 

function gmp_xor(\GMP|int|string $num1, \GMP|int|string $num2) : \GMP
{
}<?php 

/**
 * @refcount 1
 */
function gmp_sqrtrem(\GMP|int|string $num) : array
{
}<?php 

function gmp_pow(\GMP|int|string $num, int $exponent) : \GMP
{
}<?php 

function gmp_random_bits(int $bits) : \GMP
{
}<?php 

function gmp_scan1(\GMP|int|string $num1, int $start) : int
{
}<?php 

function gmp_random_range(\GMP|int|string $min, \GMP|int|string $max) : \GMP
{
}<?php 

function gmp_add(\GMP|int|string $num1, \GMP|int|string $num2) : \GMP
{
}<?php 

/**
 * @refcount 1
 */
function gmp_gcdext(\GMP|int|string $num1, \GMP|int|string $num2) : array
{
}<?php 

function gmp_or(\GMP|int|string $num1, \GMP|int|string $num2) : \GMP
{
}<?php 

function gmp_neg(\GMP|int|string $num) : \GMP
{
}<?php 

function gmp_init(int|string $num, int $base = 0) : \GMP
{
}<?php 

function gmp_legendre(\GMP|int|string $num1, \GMP|int|string $num2) : int
{
}<?php 

function gmp_mul(\GMP|int|string $num1, \GMP|int|string $num2) : \GMP
{
}<?php 

function gmp_strval(\GMP|int|string $num, int $base = 10) : string
{
}<?php 

function gmp_fact(\GMP|int|string $num) : \GMP
{
}<?php 

function gmp_sqrt(\GMP|int|string $num) : \GMP
{
}<?php 

function gmp_setbit(\GMP $num, int $index, bool $value = true) : void
{
}<?php 

function gmp_and(\GMP|int|string $num1, \GMP|int|string $num2) : \GMP
{
}<?php 

function gmp_lcm(\GMP|int|string $num1, \GMP|int|string $num2) : \GMP
{
}<?php 

function gmp_div_q(\GMP|int|string $num1, \GMP|int|string $num2, int $rounding_mode = GMP_ROUND_ZERO) : \GMP
{
}<?php 

function gmp_mod(\GMP|int|string $num1, \GMP|int|string $num2) : \GMP
{
}<?php 

/**
 * @refcount 1
 */
function gmp_rootrem(\GMP|int|string $num, int $nth) : array
{
}<?php 

function gmp_cmp(\GMP|int|string $num1, \GMP|int|string $num2) : int
{
}<?php 

function gmp_popcount(\GMP|int|string $num) : int
{
}<?php 

function gmp_divexact(\GMP|int|string $num1, \GMP|int|string $num2) : \GMP
{
}<?php 

function gmp_sub(\GMP|int|string $num1, \GMP|int|string $num2) : \GMP
{
}<?php 

function gmp_import(string $data, int $word_size = 1, int $flags = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN) : \GMP
{
}<?php 

function gmp_testbit(\GMP|int|string $num, int $index) : bool
{
}<?php 

function gmp_powm(\GMP|int|string $num, \GMP|int|string $exponent, \GMP|int|string $modulus) : \GMP
{
}<?php 

function gmp_hamdist(\GMP|int|string $num1, \GMP|int|string $num2) : int
{
}<?php 

function gmp_export(\GMP|int|string $num, int $word_size = 1, int $flags = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN) : string
{
}<?php 

function preg_quote(string $str, ?string $delimiter = null) : string
{
}<?php 

/**
 * @param int $count
 */
function preg_filter(string|array $pattern, string|array $replacement, string|array $subject, int $limit = -1, &$count = null) : string|array|null
{
}<?php 

function preg_grep(string $pattern, array $array, int $flags = 0) : array|false
{
}<?php 

/**
 * @param int $count
 */
function preg_replace(string|array $pattern, string|array $replacement, string|array $subject, int $limit = -1, &$count = null) : string|array|null
{
}<?php 

/**
 * @refcount 1
 */
function preg_split(string $pattern, string $subject, int $limit = -1, int $flags = 0) : array|false
{
}<?php 

/** @param array $matches */
function preg_match_all(string $pattern, string $subject, &$matches = null, int $flags = 0, int $offset = 0) : int|false
{
}<?php 

function preg_last_error_msg() : string
{
}<?php 

/** @param int $count */
function preg_replace_callback_array(array $pattern, string|array $subject, int $limit = -1, &$count = null, int $flags = 0) : string|array|null
{
}<?php 

/**
 * @param int $count
 */
function preg_replace_callback(string|array $pattern, callable $callback, string|array $subject, int $limit = -1, &$count = null, int $flags = 0) : string|array|null
{
}<?php 

/** @generate-function-entries */
/** @param array $matches */
function preg_match(string $pattern, string $subject, &$matches = null, int $flags = 0, int $offset = 0) : int|false
{
}<?php 

function preg_last_error() : int
{
}<?php 

#[\Until('8.1')]
function pspell_config_personal(int $config, string $filename) : bool
{
}
#[\Since('8.1')]
function pspell_config_personal(\PSpell\Config $config, string $filename) : bool
{
}<?php 

#[\Until('8.1')]
function pspell_check(int $dictionary, string $word) : bool
{
}
#[\Since('8.1')]
function pspell_check(\PSpell\Dictionary $dictionary, string $word) : bool
{
}<?php 

#[\Until('8.1')]
function pspell_add_to_personal(int $dictionary, string $word) : bool
{
}
#[\Since('8.1')]
function pspell_add_to_personal(\PSpell\Dictionary $dictionary, string $word) : bool
{
}<?php 

#[\Until('8.1')]
function pspell_clear_session(int $dictionary) : bool
{
}
#[\Since('8.1')]
function pspell_clear_session(\PSpell\Dictionary $dictionary) : bool
{
}<?php 

#[\Until('8.1')]
function pspell_save_wordlist(int $dictionary) : bool
{
}
#[\Since('8.1')]
function pspell_save_wordlist(\PSpell\Dictionary $dictionary) : bool
{
}<?php 

#[\Until('8.1')]
function pspell_store_replacement(int $dictionary, string $misspelled, string $correct) : bool
{
}
#[\Since('8.1')]
function pspell_store_replacement(\PSpell\Dictionary $dictionary, string $misspelled, string $correct) : bool
{
}<?php 

#[\Until('8.1')]
function pspell_suggest(int $dictionary, string $word) : array|false
{
}
/**
 * @return array<int, string>|false
 * @refcount 1
 */
#[\Since('8.1')]
function pspell_suggest(\PSpell\Dictionary $dictionary, string $word) : array|false
{
}<?php 

#[\Until('8.1')]
function pspell_new_personal(string $filename, string $language, string $spelling = "", string $jargon = "", string $encoding = "", int $mode = 0) : int|false
{
}
#[\Since('8.1')]
function pspell_new_personal(string $filename, string $language, string $spelling = "", string $jargon = "", string $encoding = "", int $mode = 0) : \PSpell\Dictionary|false
{
}<?php 

#[\Until('8.1')]
function pspell_config_repl(int $config, string $filename) : bool
{
}
#[\Since('8.1')]
function pspell_config_repl(\PSpell\Config $config, string $filename) : bool
{
}<?php 

/** @generate-function-entries */
#[\Until('8.1')]
function pspell_new(string $language, string $spelling = "", string $jargon = "", string $encoding = "", int $mode = 0) : int|false
{
}
#[\Since('8.1')]
function pspell_new(string $language, string $spelling = "", string $jargon = "", string $encoding = "", int $mode = 0) : \PSpell\Dictionary|false
{
}<?php 

#[\Until('8.1')]
function pspell_new_config(int $config) : int|false
{
}
#[\Since('8.1')]
function pspell_new_config(\PSpell\Config $config) : \PSpell\Dictionary|false
{
}<?php 

#[\Until('8.1')]
function pspell_config_mode(int $config, int $mode) : bool
{
}
#[\Since('8.1')]
function pspell_config_mode(\PSpell\Config $config, int $mode) : bool
{
}<?php 

#[\Until('8.1')]
function pspell_config_data_dir(int $config, string $directory) : bool
{
}
#[\Since('8.1')]
function pspell_config_data_dir(\PSpell\Config $config, string $directory) : bool
{
}<?php 

#[\Until('8.1')]
function pspell_config_save_repl(int $config, bool $save) : bool
{
}
#[\Since('8.1')]
function pspell_config_save_repl(\PSpell\Config $config, bool $save) : bool
{
}<?php 

#[\Until('8.1')]
function pspell_config_ignore(int $config, int $min_length) : bool
{
}
#[\Since('8.1')]
function pspell_config_ignore(\PSpell\Config $config, int $min_length) : bool
{
}<?php 

#[\Until('8.1')]
function pspell_add_to_session(int $dictionary, string $word) : bool
{
}
#[\Since('8.1')]
function pspell_add_to_session(\PSpell\Dictionary $dictionary, string $word) : bool
{
}<?php 

#[\Until('8.1')]
function pspell_config_dict_dir(int $config, string $directory) : bool
{
}
#[\Since('8.1')]
function pspell_config_dict_dir(\PSpell\Config $config, string $directory) : bool
{
}<?php 

namespace PSpell;

/**
 * @strict-properties
 * @not-serializable
 */
#[\Since('8.1')]
final class Dictionary
{
}<?php 

namespace PSpell;

/**
 * @strict-properties
 * @not-serializable
 */
#[\Since('8.1')]
final class Config
{
}<?php 

#[\Until('8.1')]
function pspell_config_runtogether(int $config, bool $allow) : bool
{
}
#[\Since('8.1')]
function pspell_config_runtogether(\PSpell\Config $config, bool $allow) : bool
{
}<?php 

#[\Until('8.1')]
function pspell_config_create(string $language, string $spelling = "", string $jargon = "", string $encoding = "") : int
{
}
#[\Since('8.1')]
function pspell_config_create(string $language, string $spelling = "", string $jargon = "", string $encoding = "") : \PSpell\Config
{
}<?php 

function json_decode(string $json, ?bool $associative = null, int $depth = 512, int $flags = 0) : mixed
{
}<?php 

/** @generate-function-entries */
function json_encode(mixed $value, int $flags = 0, int $depth = 512) : string|false
{
}<?php 

interface JsonSerializable
{
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function jsonSerialize();
}<?php 

class JsonException extends \Exception
{
}<?php 

function json_last_error_msg() : string
{
}<?php 

function json_last_error() : int
{
}<?php 

class PharData extends \RecursiveDirectoryIterator implements \Countable, \ArrayAccess
{
    /** @implementation-alias Phar::__construct */
    public function __construct(string $filename, int $flags = FilesystemIterator::SKIP_DOTS | FilesystemIterator::UNIX_PATHS, ?string $alias = null, int $format = 0)
    {
    }
    /** @implementation-alias Phar::__destruct */
    public function __destruct()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::addEmptyDir
     * @return void
     */
    public function addEmptyDir(string $directory)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::addFile
     * @return void
     */
    public function addFile(string $filename, ?string $localName = null)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::addFromString
     * @return void
     */
    public function addFromString(string $localName, string $contents)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::buildFromDirectory
     * @return (array | false)
     */
    public function buildFromDirectory(string $directory, string $pattern = "")
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::buildFromIterator
     * @return (array | false)
     */
    public function buildFromIterator(Traversable $iterator, ?string $baseDirectory = null)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::compressFiles
     * @return void
     */
    public function compressFiles(int $compression)
    {
    }
    /**
     * @return bool
     * @implementation-alias Phar::decompressFiles
     */
    public function decompressFiles()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::compress
     * @no-verify
     * @return (PharData | null)
     */
    public function compress(int $compression, ?string $extension = null)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::decompress
     * @no-verify
     * @return (PharData | null)
     */
    public function decompress(?string $extension = null)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::convertToExecutable
     * @return (Phar | null)
     */
    public function convertToExecutable(?int $format = null, ?int $compression = null, ?string $extension = null)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::convertToData
     * @return (PharData | null)
     */
    public function convertToData(?int $format = null, ?int $compression = null, ?string $extension = null)
    {
    }
    /**
     * @return bool
     * @implementation-alias Phar::copy
     */
    public function copy(string $from, string $to)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::count
     * @return int
     */
    public function count(int $mode = COUNT_NORMAL)
    {
    }
    /**
     * @return bool
     * @implementation-alias Phar::delete
     */
    public function delete(string $localName)
    {
    }
    /**
     * @return bool
     * @implementation-alias Phar::delMetadata
     */
    public function delMetadata()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::extractTo
     * @return bool
     */
    public function extractTo(string $directory, array|string|null $files = null, bool $overwrite = false)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::getAlias
     * @return (string | null)
     */
    public function getAlias()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::getPath
     * @return string
     */
    public function getPath()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::getMetadata
     * @return mixed
     */
    public function getMetadata(array $unserializeOptions = [])
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::getModified
     * @return bool
     */
    public function getModified()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::getSignature
     * @return (array | false)
     */
    public function getSignature()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::getStub
     * @return string
     */
    public function getStub()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::getVersion
     * @return string
     */
    public function getVersion()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::hasMetadata
     * @return bool
     */
    public function hasMetadata()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::isBuffering
     * @return bool
     */
    public function isBuffering()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::isCompressed
     * @return (int | false)
     */
    public function isCompressed()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::isFileFormat
     * @return bool
     */
    public function isFileFormat(int $format)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::isWritable
     * @return bool
     */
    public function isWritable()
    {
    }
    /**
     * @param string $localName
     * @tentative-return-type
     * @implementation-alias Phar::offsetExists
     * @return bool
     */
    public function offsetExists($localName)
    {
    }
    /**
     * @param string $localName
     * @tentative-return-type
     * @implementation-alias Phar::offsetGet
     * @return PharFileInfo
     */
    public function offsetGet($localName)
    {
    }
    /**
     * @param string $localName
     * @param (resource | string) $value
     * @tentative-return-type
     * @implementation-alias Phar::offsetSet
     * @return void
     */
    public function offsetSet($localName, $value)
    {
    }
    /**
     * @param string $localName
     * @tentative-return-type
     * @implementation-alias Phar::offsetUnset
     * @return bool
     */
    public function offsetUnset($localName)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::setAlias
     * @return bool
     */
    public function setAlias(string $alias)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::setDefaultStub
     * @return bool
     */
    public function setDefaultStub(?string $index = null, ?string $webIndex = null)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::setMetadata
     * @return void
     */
    public function setMetadata(mixed $metadata)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::setSignatureAlgorithm
     * @return void
     */
    public function setSignatureAlgorithm(int $algo, ?string $privateKey = null)
    {
    }
    /**
     * @param resource|string $stub
     * @return bool
     * @implementation-alias Phar::setStub
     */
    public function setStub($stub, int $length = UNKNOWN)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::startBuffering
     * @return void
     */
    public function startBuffering()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias Phar::stopBuffering
     * @return void
     */
    public function stopBuffering()
    {
    }
    /** @implementation-alias Phar::apiVersion */
    public static final function apiVersion() : string
    {
    }
    /** @implementation-alias Phar::canCompress */
    public static final function canCompress(int $compression = 0) : bool
    {
    }
    /** @implementation-alias Phar::canWrite */
    public static final function canWrite() : bool
    {
    }
    /** @implementation-alias Phar::createDefaultStub */
    public static final function createDefaultStub(?string $index = null, ?string $webIndex = null) : string
    {
    }
    /** @implementation-alias Phar::getSupportedCompression */
    public static final function getSupportedCompression() : array
    {
    }
    /** @implementation-alias Phar::getSupportedSignatures */
    public static final function getSupportedSignatures() : array
    {
    }
    /** @implementation-alias Phar::interceptFileFuncs */
    public static final function interceptFileFuncs() : void
    {
    }
    /** @implementation-alias Phar::isValidPharFilename */
    public static final function isValidPharFilename(string $filename, bool $executable = true) : bool
    {
    }
    /** @implementation-alias Phar::loadPhar */
    public static final function loadPhar(string $filename, ?string $alias = null) : bool
    {
    }
    /** @implementation-alias Phar::mapPhar */
    public static final function mapPhar(?string $alias = null, int $offset = 0) : bool
    {
    }
    /** @implementation-alias Phar::running */
    public static final function running(bool $returnPhar = true) : string
    {
    }
    /** @implementation-alias Phar::mount */
    public static final function mount(string $pharPath, string $externalPath) : void
    {
    }
    /** @implementation-alias Phar::mungServer */
    public static final function mungServer(array $variables) : void
    {
    }
    /** @implementation-alias Phar::unlinkArchive */
    public static final function unlinkArchive(string $filename) : bool
    {
    }
    /** @implementation-alias Phar::webPhar */
    public static final function webPhar(?string $alias = null, ?string $index = null, ?string $fileNotFoundScript = null, array $mimeTypes = [], ?callable $rewrite = null) : void
    {
    }
}<?php 

class Phar extends \RecursiveDirectoryIterator implements \Countable, \ArrayAccess
{
    public function __construct(string $filename, int $flags = FilesystemIterator::SKIP_DOTS | FilesystemIterator::UNIX_PATHS, ?string $alias = null)
    {
    }
    public function __destruct()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function addEmptyDir(string $directory)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function addFile(string $filename, ?string $localName = null)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function addFromString(string $localName, string $contents)
    {
    }
    /**
     * @tentative-return-type
     * @return (array | false)
     */
    public function buildFromDirectory(string $directory, string $pattern = "")
    {
    }
    /**
     * @tentative-return-type
     * @return (array | false)
     */
    public function buildFromIterator(Traversable $iterator, ?string $baseDirectory = null)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function compressFiles(int $compression)
    {
    }
    /** @return bool */
    public function decompressFiles()
    {
    }
    /**
     * @tentative-return-type
     * @return (Phar | null)
     */
    public function compress(int $compression, ?string $extension = null)
    {
    }
    /**
     * @tentative-return-type
     * @return (Phar | null)
     */
    public function decompress(?string $extension = null)
    {
    }
    /**
     * @tentative-return-type
     * @return (Phar | null)
     */
    public function convertToExecutable(?int $format = null, ?int $compression = null, ?string $extension = null)
    {
    }
    /**
     * @tentative-return-type
     * @return (PharData | null)
     */
    public function convertToData(?int $format = null, ?int $compression = null, ?string $extension = null)
    {
    }
    /** @return bool */
    public function copy(string $from, string $to)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function count(int $mode = COUNT_NORMAL)
    {
    }
    /** @return bool */
    public function delete(string $localName)
    {
    }
    /** @return bool */
    public function delMetadata()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function extractTo(string $directory, array|string|null $files = null, bool $overwrite = false)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | null)
     */
    public function getAlias()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getPath()
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function getMetadata(array $unserializeOptions = [])
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function getModified()
    {
    }
    /**
     * @tentative-return-type
     * @return (array | false)
     */
    public function getSignature()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getStub()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getVersion()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function hasMetadata()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isBuffering()
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function isCompressed()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isFileFormat(int $format)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isWritable()
    {
    }
    /**
     * @param string $localName
     * @tentative-return-type
     * @return bool
     */
    public function offsetExists($localName)
    {
    }
    /**
     * @param string $localName
     * @tentative-return-type
     * @return PharFileInfo
     */
    public function offsetGet($localName)
    {
    }
    /**
     * @param string $localName
     * @param (resource | string) $value
     * @tentative-return-type
     * @return void
     */
    public function offsetSet($localName, $value)
    {
    }
    /**
     * @param string $localName
     * @tentative-return-type
     * @return bool
     */
    public function offsetUnset($localName)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function setAlias(string $alias)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function setDefaultStub(?string $index = null, ?string $webIndex = null)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setMetadata(mixed $metadata)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setSignatureAlgorithm(int $algo, ?string $privateKey = null)
    {
    }
    /**
     * @param resource|string $stub
     * @return bool
     */
    public function setStub($stub, int $length = UNKNOWN)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function startBuffering()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function stopBuffering()
    {
    }
    public static final function apiVersion() : string
    {
    }
    public static final function canCompress(int $compression = 0) : bool
    {
    }
    public static final function canWrite() : bool
    {
    }
    public static final function createDefaultStub(?string $index = null, ?string $webIndex = null) : string
    {
    }
    public static final function getSupportedCompression() : array
    {
    }
    public static final function getSupportedSignatures() : array
    {
    }
    public static final function interceptFileFuncs() : void
    {
    }
    public static final function isValidPharFilename(string $filename, bool $executable = true) : bool
    {
    }
    public static final function loadPhar(string $filename, ?string $alias = null) : bool
    {
    }
    public static final function mapPhar(?string $alias = null, int $offset = 0) : bool
    {
    }
    public static final function running(bool $returnPhar = true) : string
    {
    }
    public static final function mount(string $pharPath, string $externalPath) : void
    {
    }
    public static final function mungServer(array $variables) : void
    {
    }
    public static final function unlinkArchive(string $filename) : bool
    {
    }
    public static final function webPhar(?string $alias = null, ?string $index = null, ?string $fileNotFoundScript = null, array $mimeTypes = [], ?callable $rewrite = null) : void
    {
    }
}<?php 

/** @generate-function-entries */
class PharException extends \Exception
{
}<?php 

class PharFileInfo extends \SplFileInfo
{
    public function __construct(string $filename)
    {
    }
    public function __destruct()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function chmod(int $perms)
    {
    }
    /** @return bool */
    public function compress(int $compression)
    {
    }
    /** @return bool */
    public function decompress()
    {
    }
    /** @return bool */
    public function delMetadata()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getCompressedSize()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getCRC32()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getContent()
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function getMetadata(array $unserializeOptions = [])
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getPharFlags()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function hasMetadata()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isCompressed(?int $compression = null)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isCRCChecked()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setMetadata(mixed $metadata)
    {
    }
}<?php 

/** @param resource $statement */
function odbc_cursor($statement) : string|false
{
}<?php 

/**
 * @param resource $odbc
 * @return resource|false
 */
function odbc_columns($odbc, ?string $catalog = null, ?string $schema = null, ?string $table = null, ?string $column = null)
{
}<?php 

/** @param resource $statement */
function odbc_result($statement, string|int $field) : string|bool|null
{
}<?php 

/** @param resource $odbc */
function odbc_setoption($odbc, int $which, int $option, int $value) : bool
{
}<?php 

/** @param resource $statement */
function odbc_execute($statement, array $params = []) : bool
{
}<?php 

/** @return resource|false */
function odbc_pconnect(string $dsn, string $user, string $password, int $cursor_option = SQL_CUR_USE_DRIVER)
{
}<?php 

/** @param resource $odbc */
function odbc_autocommit($odbc, bool $enable = false) : int|bool
{
}<?php 

/**
 * @param resource $odbc
 * @return resource|false
 */
function odbc_columnprivileges($odbc, ?string $catalog, string $schema, string $table, string $column)
{
}<?php 

/** @param resource $statement */
function odbc_fetch_array($statement, int $row = -1) : array|false
{
}<?php 

/**
 * @param resource $odbc
 * @return resource|false
 */
function odbc_statistics($odbc, ?string $catalog, string $schema, string $table, int $unique, int $accuracy)
{
}<?php 

/** @param resource $statement */
function odbc_longreadlen($statement, int $length) : bool
{
}<?php 

/**
 * @param resource $odbc
 * @return resource|false
 */
function odbc_tables($odbc, ?string $catalog = null, ?string $schema = null, ?string $table = null, ?string $types = null)
{
}<?php 

#endif
/** @param resource $statement */
function odbc_num_fields($statement) : int
{
}<?php 

/**
 * @param resource $odbc
 * @return resource|false
 */
function odbc_foreignkeys($odbc, ?string $pk_catalog, string $pk_schema, string $pk_table, string $fk_catalog, string $fk_schema, string $fk_table)
{
}<?php 

#endif
/**
 * @param resource $odbc
 * @return resource|false
 */
function odbc_specialcolumns($odbc, int $type, ?string $catalog, string $schema, string $table, int $scope, int $nullable)
{
}<?php 

#ifdef HAVE_SQLDATASOURCES
/** @param resource $odbc */
function odbc_data_source($odbc, int $fetch_type) : array|false
{
}<?php 

/** @param resource $statement */
function odbc_field_name($statement, int $field) : string|false
{
}<?php 

/** @param resource $statement */
function odbc_free_result($statement) : bool
{
}<?php 

/**
 * @param resource $odbc
 * @return resource|false
 * @alias odbc_exec
 */
function odbc_do($odbc, string $query)
{
}<?php 

/** @return resource|false */
function odbc_connect(string $dsn, string $user, string $password, int $cursor_option = SQL_CUR_USE_DRIVER)
{
}<?php 

#[\Since('8.2')]
function odbc_connection_string_should_quote(string $str) : bool
{
}<?php 

/** @param resource $statement */
function odbc_field_len($statement, int $field) : int|false
{
}<?php 

/** @param resource $odbc */
function odbc_close($odbc) : void
{
}<?php 

/** @param resource $statement */
function odbc_field_num($statement, string $field) : int|false
{
}<?php 

#[\Since('8.2')]
function odbc_connection_string_quote(string $str) : string
{
}<?php 

/** @param resource $statement */
function odbc_num_rows($statement) : int
{
}<?php 

#endif
/* odbc_utils.c */
#[\Since('8.2')]
function odbc_connection_string_is_quoted(string $str) : bool
{
}<?php 

/** @param resource $statement */
function odbc_fetch_row($statement, ?int $row = null) : bool
{
}<?php 

#ifdef PHP_ODBC_HAVE_FETCH_HASH
/** @param resource $statement */
function odbc_fetch_object($statement, int $row = -1) : \stdClass|false
{
}<?php 

#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30)
/** @param resource $statement */
function odbc_next_result($statement) : bool
{
}<?php 

/** @param resource|null $odbc */
function odbc_error($odbc = null) : string
{
}<?php 

#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35)
/**
 * @param resource $odbc
 * @return resource|false
 */
function odbc_procedurecolumns($odbc, ?string $catalog = null, ?string $schema = null, ?string $procedure = null, ?string $column = null)
{
}<?php 

/** @param resource|null $odbc */
function odbc_errormsg($odbc = null) : string
{
}<?php 

/**
 * @param resource $odbc
 * @return resource|false
 */
function odbc_gettypeinfo($odbc, int $data_type = 0)
{
}<?php 

/** @param resource $odbc */
function odbc_rollback($odbc) : bool
{
}<?php 

#endif
/**
 * @param resource $statement
 * @param array $array
 */
function odbc_fetch_into($statement, &$array, int $row = 0) : int|false
{
}<?php 

/**
 * @param resource $odbc
 * @return resource|false
 */
function odbc_prepare($odbc, string $query)
{
}<?php 

#endif
/**
 * @param resource $odbc
 * @return resource|false
 */
function odbc_exec($odbc, string $query)
{
}<?php 

/** @param resource $statement */
function odbc_field_type($statement, int $field) : string|false
{
}<?php 

/** @param resource $odbc */
function odbc_commit($odbc) : bool
{
}<?php 

/** @param resource $statement */
function odbc_result_all($statement, string $format = "") : int|false
{
}<?php 

/** @param resource $statement */
function odbc_field_scale($statement, int $field) : int|false
{
}<?php 

/**
 * @param resource $odbc
 * @return resource|false
 */
function odbc_primarykeys($odbc, ?string $catalog, string $schema, string $table)
{
}<?php 

#if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) &&!defined(HAVE_SOLID_35)
/**
 * @param resource $odbc
 * @return resource|false
 */
function odbc_tableprivileges($odbc, ?string $catalog, string $schema, string $table)
{
}<?php 

/**
 * @param resource $odbc
 * @return resource|false
 */
function odbc_procedures($odbc, ?string $catalog = null, ?string $schema = null, ?string $procedure = null)
{
}<?php 

/**
 * @param resource $statement
 * @alias odbc_field_len
 */
function odbc_field_precision($statement, int $field) : int|false
{
}<?php 

/** @generate-function-entries */
function odbc_close_all() : void
{
}<?php 

/** @param resource $statement */
function odbc_binmode($statement, int $mode) : bool
{
}<?php 

function xmlwriter_write_pi(\XMLWriter $writer, string $target, string $content) : bool
{
}<?php 

function xmlwriter_start_attribute_ns(\XMLWriter $writer, ?string $prefix, string $name, ?string $namespace) : bool
{
}<?php 

function xmlwriter_start_pi(\XMLWriter $writer, string $target) : bool
{
}<?php 

function xmlwriter_end_dtd_entity(\XMLWriter $writer) : bool
{
}<?php 

function xmlwriter_end_dtd(\XMLWriter $writer) : bool
{
}<?php 

function xmlwriter_start_dtd(\XMLWriter $writer, string $qualifiedName, ?string $publicId = null, ?string $systemId = null) : bool
{
}<?php 

function xmlwriter_write_raw(\XMLWriter $writer, string $content) : bool
{
}<?php 

function xmlwriter_end_dtd_element(\XMLWriter $writer) : bool
{
}<?php 

function xmlwriter_text(\XMLWriter $writer, string $content) : bool
{
}<?php 

function xmlwriter_write_dtd_attlist(\XMLWriter $writer, string $name, string $content) : bool
{
}<?php 

function xmlwriter_end_element(\XMLWriter $writer) : bool
{
}<?php 

function xmlwriter_output_memory(\XMLWriter $writer, bool $flush = true) : string
{
}<?php 

function xmlwriter_write_attribute(\XMLWriter $writer, string $name, string $value) : bool
{
}<?php 

/** @generate-function-entries */
function xmlwriter_open_uri(string $uri) : \XMLWriter|false
{
}<?php 

class XMLWriter
{
    /**
     * @tentative-return-type
     * @alias xmlwriter_open_uri
     * @no-verify Behaviour differs from the aliased function
     * @return bool
     */
    public function openUri(string $uri)
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_open_memory
     * @no-verify Behaviour differs from the aliased function
     * @return bool
     */
    public function openMemory()
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_set_indent
     * @return bool
     */
    public function setIndent(bool $enable)
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_set_indent_string
     * @return bool
     */
    public function setIndentString(string $indentation)
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_start_comment
     * @return bool
     */
    public function startComment()
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_end_comment
     * @return bool
     */
    public function endComment()
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_start_attribute
     * @return bool
     */
    public function startAttribute(string $name)
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_end_attribute
     * @return bool
     */
    public function endAttribute()
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_write_attribute
     * @return bool
     */
    public function writeAttribute(string $name, string $value)
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_start_attribute_ns
     * @return bool
     */
    public function startAttributeNs(?string $prefix, string $name, ?string $namespace)
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_write_attribute_ns
     * @return bool
     */
    public function writeAttributeNs(?string $prefix, string $name, ?string $namespace, string $value)
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_start_element
     * @return bool
     */
    public function startElement(string $name)
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_end_element
     * @return bool
     */
    public function endElement()
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_full_end_element
     * @return bool
     */
    public function fullEndElement()
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_start_element_ns
     * @return bool
     */
    public function startElementNs(?string $prefix, string $name, ?string $namespace)
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_write_element
     * @return bool
     */
    public function writeElement(string $name, ?string $content = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_write_element_ns
     * @return bool
     */
    public function writeElementNs(?string $prefix, string $name, ?string $namespace, ?string $content = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_start_pi
     * @return bool
     */
    public function startPi(string $target)
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_end_pi
     * @return bool
     */
    public function endPi()
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_write_pi
     * @return bool
     */
    public function writePi(string $target, string $content)
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_start_cdata
     * @return bool
     */
    public function startCdata()
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_end_cdata
     * @return bool
     */
    public function endCdata()
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_write_cdata
     * @return bool
     */
    public function writeCdata(string $content)
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_text
     * @return bool
     */
    public function text(string $content)
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_write_raw
     * @return bool
     */
    public function writeRaw(string $content)
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_start_document
     * @return bool
     */
    public function startDocument(?string $version = "1.0", ?string $encoding = null, ?string $standalone = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_end_document
     * @return bool
     */
    public function endDocument()
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_write_comment
     * @return bool
     */
    public function writeComment(string $content)
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_start_dtd
     * @return bool
     */
    public function startDtd(string $qualifiedName, ?string $publicId = null, ?string $systemId = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_end_dtd
     * @return bool
     */
    public function endDtd()
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_write_dtd
     * @return bool
     */
    public function writeDtd(string $name, ?string $publicId = null, ?string $systemId = null, ?string $content = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_start_dtd_element
     * @return bool
     */
    public function startDtdElement(string $qualifiedName)
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_end_dtd_element
     * @return bool
     */
    public function endDtdElement()
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_write_dtd_element
     * @return bool
     */
    public function writeDtdElement(string $name, string $content)
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_start_dtd_attlist
     * @return bool
     */
    public function startDtdAttlist(string $name)
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_end_dtd_attlist
     * @return bool
     */
    public function endDtdAttlist()
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_write_dtd_attlist
     * @return bool
     */
    public function writeDtdAttlist(string $name, string $content)
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_start_dtd_entity
     * @return bool
     */
    public function startDtdEntity(string $name, bool $isParam)
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_end_dtd_entity
     * @return bool
     */
    public function endDtdEntity()
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_write_dtd_entity
     * @return bool
     */
    public function writeDtdEntity(string $name, string $content, bool $isParam = false, ?string $publicId = null, ?string $systemId = null, ?string $notationData = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_output_memory
     * @return string
     */
    public function outputMemory(bool $flush = true)
    {
    }
    /**
     * @tentative-return-type
     * @alias xmlwriter_flush
     * @return (string | int)
     */
    public function flush(bool $empty = true)
    {
    }
}<?php 

function xmlwriter_open_memory() : \XMLWriter|false
{
}<?php 

function xmlwriter_write_cdata(\XMLWriter $writer, string $content) : bool
{
}<?php 

function xmlwriter_end_comment(\XMLWriter $writer) : bool
{
}<?php 

function xmlwriter_start_dtd_attlist(\XMLWriter $writer, string $name) : bool
{
}<?php 

function xmlwriter_start_comment(\XMLWriter $writer) : bool
{
}<?php 

function xmlwriter_end_pi(\XMLWriter $writer) : bool
{
}<?php 

function xmlwriter_end_attribute(\XMLWriter $writer) : bool
{
}<?php 

function xmlwriter_end_dtd_attlist(\XMLWriter $writer) : bool
{
}<?php 

function xmlwriter_write_dtd_element(\XMLWriter $writer, string $name, string $content) : bool
{
}<?php 

function xmlwriter_start_attribute(\XMLWriter $writer, string $name) : bool
{
}<?php 

function xmlwriter_end_document(\XMLWriter $writer) : bool
{
}<?php 

function xmlwriter_write_comment(\XMLWriter $writer, string $content) : bool
{
}<?php 

function xmlwriter_set_indent_string(\XMLWriter $writer, string $indentation) : bool
{
}<?php 

function xmlwriter_write_attribute_ns(\XMLWriter $writer, ?string $prefix, string $name, ?string $namespace, string $value) : bool
{
}<?php 

function xmlwriter_start_element(\XMLWriter $writer, string $name) : bool
{
}<?php 

function xmlwriter_write_dtd(\XMLWriter $writer, string $name, ?string $publicId = null, ?string $systemId = null, ?string $content = null) : bool
{
}<?php 

function xmlwriter_full_end_element(\XMLWriter $writer) : bool
{
}<?php 

function xmlwriter_start_element_ns(\XMLWriter $writer, ?string $prefix, string $name, ?string $namespace) : bool
{
}<?php 

function xmlwriter_start_cdata(\XMLWriter $writer) : bool
{
}<?php 

function xmlwriter_start_document(\XMLWriter $writer, ?string $version = "1.0", ?string $encoding = null, ?string $standalone = null) : bool
{
}<?php 

function xmlwriter_set_indent(\XMLWriter $writer, bool $enable) : bool
{
}<?php 

function xmlwriter_write_element(\XMLWriter $writer, string $name, ?string $content = null) : bool
{
}<?php 

function xmlwriter_write_dtd_entity(\XMLWriter $writer, string $name, string $content, bool $isParam = false, ?string $publicId = null, ?string $systemId = null, ?string $notationData = null) : bool
{
}<?php 

function xmlwriter_flush(\XMLWriter $writer, bool $empty = true) : string|int
{
}<?php 

function xmlwriter_write_element_ns(\XMLWriter $writer, ?string $prefix, string $name, ?string $namespace, ?string $content = null) : bool
{
}<?php 

function xmlwriter_end_cdata(\XMLWriter $writer) : bool
{
}<?php 

function xmlwriter_start_dtd_element(\XMLWriter $writer, string $qualifiedName) : bool
{
}<?php 

function xmlwriter_start_dtd_entity(\XMLWriter $writer, string $name, bool $isParam) : bool
{
}<?php 

function ctype_lower(mixed $text) : bool
{
}<?php 

function ctype_digit(mixed $text) : bool
{
}<?php 

function ctype_upper(mixed $text) : bool
{
}<?php 

function ctype_alpha(mixed $text) : bool
{
}<?php 

function ctype_print(mixed $text) : bool
{
}<?php 

/** @generate-function-entries */
function ctype_alnum(mixed $text) : bool
{
}<?php 

function ctype_xdigit(mixed $text) : bool
{
}<?php 

function ctype_punct(mixed $text) : bool
{
}<?php 

function ctype_graph(mixed $text) : bool
{
}<?php 

function ctype_space(mixed $text) : bool
{
}<?php 

function ctype_cntrl(mixed $text) : bool
{
}<?php 

function date_create_immutable_from_format(string $format, string $datetime, ?\DateTimeZone $timezone = null) : \DateTimeImmutable|false
{
}<?php 

function date_create_from_format(string $format, string $datetime, ?\DateTimeZone $timezone = null) : \DateTime|false
{
}<?php 

/**
 * @refcount 1
 */
function localtime(?int $timestamp = null, bool $associative = false) : array
{
}<?php 

function date_create_immutable(string $datetime = "now", ?\DateTimeZone $timezone = null) : \DateTimeImmutable|false
{
}<?php 

class DateTimeZone
{
    public function __construct(string $timezone)
    {
    }
    /**
     * @tentative-return-type
     * @alias timezone_name_get
     * @return string
     */
    public function getName()
    {
    }
    /**
     * @tentative-return-type
     * @alias timezone_offset_get
     * @return int
     */
    public function getOffset(DateTimeInterface $datetime)
    {
    }
    /**
     * @return array|false
     * @alias timezone_transitions_get
     */
    public function getTransitions(int $timestampBegin = PHP_INT_MIN, int $timestampEnd = PHP_INT_MAX)
    {
    }
    /**
     * @return array|false
     * @alias timezone_location_get
     */
    public function getLocation()
    {
    }
    /**
     * @return array
     * @alias timezone_abbreviations_list
     */
    public static function listAbbreviations()
    {
    }
    /**
     * @return array
     * @alias timezone_identifiers_list
     */
    public static function listIdentifiers(int $timezoneGroup = DateTimeZone::ALL, ?string $countryCode = null)
    {
    }
    #[\Since('8.2')]
    public function __serialize() : array
    {
    }
    #[\Since('8.2')]
    public function __unserialize(array $data) : void
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function __wakeup()
    {
    }
    /**
     * @tentative-return-type
     * @return DateTimeZone
     */
    public static function __set_state(array $array)
    {
    }
}<?php 

function strftime(string $format, ?int $timestamp = null) : string|false
{
}<?php 

function date_timezone_get(\DateTimeInterface $object) : \DateTimeZone|false
{
}<?php 

class DateTimeImmutable implements \DateTimeInterface
{
    public function __construct(string $datetime = "now", ?DateTimeZone $timezone = null)
    {
    }
    #[\Since('8.2')]
    public function __serialize() : array
    {
    }
    #[\Since('8.2')]
    public function __unserialize(array $data) : void
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function __wakeup()
    {
    }
    /**
     * @tentative-return-type
     * @return DateTimeImmutable
     */
    public static function __set_state(array $array)
    {
    }
    /**
     * @tentative-return-type
     * @alias date_create_immutable_from_format
     * @return (DateTimeImmutable | false)
     */
    public static function createFromFormat(string $format, string $datetime, ?DateTimeZone $timezone = null)
    {
    }
    /**
     * @return array|false
     * @alias date_get_last_errors
     */
    public static function getLastErrors()
    {
    }
    /**
     * @tentative-return-type
     * @alias date_format
     * @return string
     */
    public function format(string $format)
    {
    }
    /**
     * @tentative-return-type
     * @alias date_timezone_get
     * @return (DateTimeZone | false)
     */
    public function getTimezone()
    {
    }
    /**
     * @tentative-return-type
     * @alias date_offset_get
     * @return int
     */
    public function getOffset()
    {
    }
    /**
     * @tentative-return-type
     * @alias date_timestamp_get
     * @return int
     */
    public function getTimestamp()
    {
    }
    /**
     * @tentative-return-type
     * @alias date_diff
     * @return DateInterval
     */
    public function diff(DateTimeInterface $targetObject, bool $absolute = false)
    {
    }
    /**
     * @tentative-return-type
     * @return (DateTimeImmutable | false)
     */
    public function modify(string $modifier)
    {
    }
    /**
     * @tentative-return-type
     * @return DateTimeImmutable
     */
    public function add(DateInterval $interval)
    {
    }
    /**
     * @tentative-return-type
     * @return DateTimeImmutable
     */
    public function sub(DateInterval $interval)
    {
    }
    /**
     * @tentative-return-type
     * @return DateTimeImmutable
     */
    public function setTimezone(DateTimeZone $timezone)
    {
    }
    /**
     * @tentative-return-type
     * @return DateTimeImmutable
     */
    public function setTime(int $hour, int $minute, int $second = 0, int $microsecond = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return DateTimeImmutable
     */
    public function setDate(int $year, int $month, int $day)
    {
    }
    /**
     * @tentative-return-type
     * @return DateTimeImmutable
     */
    public function setISODate(int $year, int $week, int $dayOfWeek = 1)
    {
    }
    /**
     * @tentative-return-type
     * @return DateTimeImmutable
     */
    public function setTimestamp(int $timestamp)
    {
    }
    /**
     * @tentative-return-type
     * @return DateTimeImmutable
     */
    public static function createFromMutable(DateTime $object)
    {
    }
    public static function createFromInterface(DateTimeInterface $object) : DateTimeImmutable
    {
    }
}<?php 

/**
 * @refcount 1
 */
function timezone_abbreviations_list() : array
{
}<?php 

function checkdate(int $month, int $day, int $year) : bool
{
}<?php 

function gmdate(string $format, ?int $timestamp = null) : string
{
}<?php 

function date_sunset(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, ?float $latitude = null, ?float $longitude = null, ?float $zenith = null, ?float $utcOffset = null) : string|int|float|false
{
}<?php 

function date_create(string $datetime = "now", ?\DateTimeZone $timezone = null) : \DateTime|false
{
}<?php 

function time() : int
{
}<?php 

/**
 * @refcount 1
 */
function timezone_transitions_get(\DateTimeZone $object, int $timestampBegin = PHP_INT_MIN, int $timestampEnd = PHP_INT_MAX) : array|false
{
}<?php 

function gmstrftime(string $format, ?int $timestamp = null) : string|false
{
}<?php 

function timezone_open(string $timezone) : \DateTimeZone|false
{
}<?php 

class DatePeriod implements \IteratorAggregate
{
    /**
     * @param DateTimeInterface|string $start
     * @param DateInterval|int $interval
     * @param DateTimeInterface|int $end
     * @param int $options
     */
    public function __construct($start, $interval = UNKNOWN, $end = UNKNOWN, $options = UNKNOWN)
    {
    }
    /**
     * @tentative-return-type
     * @return DateTimeInterface
     */
    public function getStartDate()
    {
    }
    /**
     * @tentative-return-type
     * @return (DateTimeInterface | null)
     */
    public function getEndDate()
    {
    }
    /**
     * @tentative-return-type
     * @return DateInterval
     */
    public function getDateInterval()
    {
    }
    /**
     * @tentative-return-type
     * @return (int | null)
     */
    public function getRecurrences()
    {
    }
    #[\Since('8.2')]
    public function __serialize() : array;
    #[\Since('8.2')]
    public function __unserialize(array $data) : void;
    /**
     * @tentative-return-type
     * @return void
     */
    public function __wakeup()
    {
    }
    /**
     * @tentative-return-type
     * @return DatePeriod
     */
    public static function __set_state(array $array)
    {
    }
    public function getIterator() : Iterator
    {
    }
}<?php 

// NB: Adding return types to methods is a BC break!
// For now only using @return annotations here.
interface DateTimeInterface
{
    /**
     * @tentative-return-type
     * @return string
     */
    public function format(string $format);
    /**
     * @tentative-return-type
     * @return (DateTimeZone | false)
     */
    public function getTimezone();
    /**
     * @tentative-return-type
     * @return int
     */
    public function getOffset();
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function getTimestamp();
    /**
     * @tentative-return-type
     * @return (DateInterval | false)
     */
    public function diff(DateTimeInterface $targetObject, bool $absolute = false);
    /**
     * @tentative-return-type
     * @return void
     */
    public function __wakeup();
    #[\Since('8.2')]
    public function __serialize() : array;
    #[\Since('8.2')]
    public function __unserialize(array $data) : void;
}<?php 

class DateInterval
{
    public function __construct(string $duration)
    {
    }
    /**
     * @tentative-return-type
     * @alias date_interval_create_from_date_string
     * @return (DateInterval | false)
     */
    public static function createFromDateString(string $datetime)
    {
    }
    /**
     * @tentative-return-type
     * @alias date_interval_format
     * @return string
     */
    public function format(string $format)
    {
    }
    #[\Since('8.2')]
    public function __serialize() : array;
    #[\Since('8.2')]
    public function __unserialize(array $data) : void;
    /**
     * @tentative-return-type
     * @return void
     */
    public function __wakeup()
    {
    }
    /**
     * @tentative-return-type
     * @return DateInterval
     */
    public static function __set_state(array $array)
    {
    }
}<?php 

function date_sub(\DateTime $object, \DateInterval $interval) : \DateTime
{
}<?php 

function mktime(int $hour, ?int $minute = null, ?int $second = null, ?int $month = null, ?int $day = null, ?int $year = null) : int|false
{
}<?php 

function idate(string $format, ?int $timestamp = null) : int|false
{
}<?php 

/**
 * @refcount 1
 */
function date_parse_from_format(string $format, string $datetime) : array
{
}<?php 

/**
 * @refcount 1
 */
function date_parse(string $datetime) : array
{
}<?php 

function date_default_timezone_set(string $timezoneId) : bool
{
}<?php 

function date_date_set(\DateTime $object, int $year, int $month, int $day) : \DateTime
{
}<?php 

function date_sunrise(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, ?float $latitude = null, ?float $longitude = null, ?float $zenith = null, ?float $utcOffset = null) : string|int|float|false
{
}<?php 

function date_interval_format(\DateInterval $object, string $format) : string
{
}<?php 

/**
 * @refcount 1
 */
function date_sun_info(int $timestamp, float $latitude, float $longitude) : array
{
}<?php 

function date_add(\DateTime $object, \DateInterval $interval) : \DateTime
{
}<?php 

function date_diff(\DateTimeInterface $baseObject, \DateTimeInterface $targetObject, bool $absolute = false) : \DateInterval
{
}<?php 

function date_isodate_set(\DateTime $object, int $year, int $week, int $dayOfWeek = 1) : \DateTime
{
}<?php 

function date_interval_create_from_date_string(string $datetime) : \DateInterval|false
{
}<?php 

/**
 * @refcount 1
 */
function date_get_last_errors() : array|false
{
}<?php 

function timezone_name_from_abbr(string $abbr, int $utcOffset = -1, int $isDST = -1) : string|false
{
}<?php 

function date(string $format, ?int $timestamp = null) : string
{
}<?php 

/**
 * @refcount 1
 */
function getdate(?int $timestamp = null) : array
{
}<?php 

function date_offset_get(\DateTimeInterface $object) : int
{
}<?php 

/**
 * @refcount 1
 */
function timezone_location_get(\DateTimeZone $object) : array|false
{
}<?php 

function timezone_name_get(\DateTimeZone $object) : string
{
}<?php 

/** @generate-function-entries */
function strtotime(string $datetime, ?int $baseTimestamp = null) : int|false
{
}<?php 

function date_modify(\DateTime $object, string $modifier) : \DateTime|false
{
}<?php 

function date_format(\DateTimeInterface $object, string $format) : string
{
}<?php 

function date_time_set(\DateTime $object, int $hour, int $minute, int $second = 0, int $microsecond = 0) : \DateTime
{
}<?php 

function timezone_version_get() : string
{
}<?php 

function date_timestamp_get(\DateTimeInterface $object) : int
{
}<?php 

class DateTime implements \DateTimeInterface
{
    public function __construct(string $datetime = "now", ?DateTimeZone $timezone = null)
    {
    }
    #[\Since('8.2')]
    public function __serialize() : array
    {
    }
    #[\Since('8.2')]
    public function __unserialize(array $data) : void
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function __wakeup()
    {
    }
    /**
     * @tentative-return-type
     * @return DateTime
     */
    public static function __set_state(array $array)
    {
    }
    /**
     * @tentative-return-type
     * @return DateTime
     */
    public static function createFromImmutable(DateTimeImmutable $object)
    {
    }
    public static function createFromInterface(DateTimeInterface $object) : DateTime
    {
    }
    /**
     * @tentative-return-type
     * @alias date_create_from_format
     * @return (DateTime | false)
     */
    public static function createFromFormat(string $format, string $datetime, ?DateTimeZone $timezone = null)
    {
    }
    /**
     * @return array|false
     * @alias date_get_last_errors
     */
    public static function getLastErrors()
    {
    }
    /**
     * @tentative-return-type
     * @alias date_format
     * @return string
     */
    public function format(string $format)
    {
    }
    /**
     * @tentative-return-type
     * @alias date_modify
     * @return (DateTime | false)
     */
    public function modify(string $modifier)
    {
    }
    /**
     * @tentative-return-type
     * @alias date_add
     * @return DateTime
     */
    public function add(DateInterval $interval)
    {
    }
    /**
     * @tentative-return-type
     * @alias date_sub
     * @return DateTime
     */
    public function sub(DateInterval $interval)
    {
    }
    /**
     * @tentative-return-type
     * @alias date_timezone_get
     * @return (DateTimeZone | false)
     */
    public function getTimezone()
    {
    }
    /**
     * @tentative-return-type
     * @alias date_timezone_set
     * @return DateTime
     */
    public function setTimezone(DateTimeZone $timezone)
    {
    }
    /**
     * @tentative-return-type
     * @alias date_offset_get
     * @return int
     */
    public function getOffset()
    {
    }
    /**
     * @tentative-return-type
     * @alias date_time_set
     * @return DateTime
     */
    public function setTime(int $hour, int $minute, int $second = 0, int $microsecond = 0)
    {
    }
    /**
     * @tentative-return-type
     * @alias date_date_set
     * @return DateTime
     */
    public function setDate(int $year, int $month, int $day)
    {
    }
    /**
     * @tentative-return-type
     * @alias date_isodate_set
     * @return DateTime
     */
    public function setISODate(int $year, int $week, int $dayOfWeek = 1)
    {
    }
    /**
     * @tentative-return-type
     * @alias date_timestamp_set
     * @return DateTime
     */
    public function setTimestamp(int $timestamp)
    {
    }
    /**
     * @tentative-return-type
     * @alias date_timestamp_get
     * @return int
     */
    public function getTimestamp()
    {
    }
    /**
     * @tentative-return-type
     * @alias date_diff
     * @return DateInterval
     */
    public function diff(DateTimeInterface $targetObject, bool $absolute = false)
    {
    }
}<?php 

function timezone_offset_get(\DateTimeZone $object, \DateTimeInterface $datetime) : int
{
}<?php 

function gmmktime(int $hour, ?int $minute = null, ?int $second = null, ?int $month = null, ?int $day = null, ?int $year = null) : int|false
{
}<?php 

function date_default_timezone_get() : string
{
}<?php 

function date_timestamp_set(\DateTime $object, int $timestamp) : \DateTime
{
}<?php 

/**
 * @refcount 1
 */
function timezone_identifiers_list(int $timezoneGroup = DateTimeZone::ALL, ?string $countryCode = null) : array
{
}<?php 

function date_timezone_set(\DateTime $object, \DateTimeZone $timezone) : \DateTime
{
}<?php 

#[\Since('8.2')]
function libxml_get_external_entity_loader() : ?callable
{
}<?php 

function libxml_get_last_error() : \LibXMLError|false
{
}<?php 

function libxml_clear_errors() : void
{
}<?php 

/** @param resource $context */
function libxml_set_streams_context($context) : void
{
}<?php 

function libxml_use_internal_errors(?bool $use_errors = null) : bool
{
}<?php 

/** @generate-function-entries */
class LibXMLError
{
}<?php 

/** @deprecated */
function libxml_disable_entity_loader(bool $disable = true) : bool
{
}<?php 

function libxml_set_external_entity_loader(?callable $resolver_function) : bool
{
}<?php 

function libxml_get_errors() : array
{
}<?php 

/**
 * @refcount 1
 */
function mb_ereg_search_pos(?string $pattern = null, ?string $options = null) : array|false
{
}<?php 

/**
 * @refcount 1
 */
function mb_ereg_search_getregs() : array|false
{
}<?php 

/** @param array $matches */
function mb_ereg(string $pattern, string $string, &$matches = null) : bool
{
}<?php 

/**
 * @refcount 1
 */
function mb_list_encodings() : array
{
}<?php 

/**
 * @refcount 1
 */
function mb_convert_encoding(array|string $string, string $to_encoding, array|string|null $from_encoding = null) : array|string|false
{
}<?php 

function mb_ereg_search_init(string $string, ?string $pattern = null, ?string $options = null) : bool
{
}<?php 

function mb_ereg_search_setpos(int $offset) : bool
{
}<?php 

function mb_strcut(string $string, int $start, ?int $length = null, ?string $encoding = null) : string
{
}<?php 

function mb_convert_variables(string $to_encoding, array|string $from_encoding, mixed &$var, mixed &...$vars) : string|false
{
}<?php 

function mb_convert_kana(string $string, string $mode = "KV", ?string $encoding = null) : string
{
}<?php 

/** @generate-function-entries */
function mb_language(?string $language = null) : string|bool
{
}<?php 

/** @param array $matches */
function mb_eregi(string $pattern, string $string, &$matches = null) : bool
{
}<?php 

function mb_send_mail(string $to, string $subject, string $message, array|string $additional_headers = [], ?string $additional_params = null) : bool
{
}<?php 

function mb_strstr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding = null) : string|false
{
}<?php 

#ifdef HAVE_MBREGEX
function mb_regex_encoding(?string $encoding = null) : string|bool
{
}<?php 

function mb_ereg_replace(string $pattern, string $replacement, string $string, ?string $options = null) : string|false|null
{
}<?php 

function mb_strimwidth(string $string, int $start, int $width, string $trim_marker = "", ?string $encoding = null) : string
{
}<?php 

/**
 * @refcount 1
 */
function mb_split(string $pattern, string $string, int $limit = -1) : array|false
{
}<?php 

function mb_strwidth(string $string, ?string $encoding = null) : int
{
}<?php 

function mb_strpos(string $haystack, string $needle, int $offset = 0, ?string $encoding = null) : int|false
{
}<?php 

function mb_decode_mimeheader(string $string) : string
{
}<?php 

function mb_http_output(?string $encoding = null) : string|bool
{
}<?php 

function mb_ereg_search(?string $pattern = null, ?string $options = null) : bool
{
}<?php 

function mb_eregi_replace(string $pattern, string $replacement, string $string, ?string $options = null) : string|false|null
{
}<?php 

function mb_encode_mimeheader(string $string, ?string $charset = null, ?string $transfer_encoding = null, string $newline = "\r\n", int $indent = 0) : string
{
}<?php 

/**
 * @refcount 1
 */
function mb_detect_order(array|string|null $encoding = null) : array|bool
{
}<?php 

function mb_strtoupper(string $string, ?string $encoding = null) : string
{
}<?php 

function mb_regex_set_options(?string $options = null) : string
{
}<?php 

/** @param array $result */
function mb_parse_str(string $string, &$result) : bool
{
}<?php 

function mb_ord(string $string, ?string $encoding = null) : int|false
{
}<?php 

function mb_check_encoding(array|string|null $value = null, ?string $encoding = null) : bool
{
}<?php 

function mb_ereg_replace_callback(string $pattern, callable $callback, string $string, ?string $options = null) : string|false|null
{
}<?php 

function mb_preferred_mime_name(string $encoding) : string|false
{
}<?php 

function mb_decode_numericentity(string $string, array $map, ?string $encoding = null) : string
{
}<?php 

function mb_strrpos(string $haystack, string $needle, int $offset = 0, ?string $encoding = null) : int|false
{
}<?php 

function mb_output_handler(string $string, int $status) : string
{
}<?php 

function mb_scrub(string $string, ?string $encoding = null) : string
{
}<?php 

function mb_strlen(string $string, ?string $encoding = null) : int
{
}<?php 

function mb_ereg_search_getpos() : int
{
}<?php 

function mb_substr_count(string $haystack, string $needle, ?string $encoding = null) : int
{
}<?php 

function mb_str_split(string $string, int $length = 1, ?string $encoding = null) : array
{
}<?php 

function mb_internal_encoding(?string $encoding = null) : string|bool
{
}<?php 

/**
 * @refcount 1
 */
function mb_get_info(string $type = "all") : array|string|int|false
{
}<?php 

/**
 * @refcount 1
 */
function mb_ereg_search_regs(?string $pattern = null, ?string $options = null) : array|false
{
}<?php 

function mb_chr(int $codepoint, ?string $encoding = null) : string|false
{
}<?php 

function mb_encode_numericentity(string $string, array $map, ?string $encoding = null, bool $hex = false) : string
{
}<?php 

function mb_strrchr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding = null) : string|false
{
}<?php 

function mb_ereg_match(string $pattern, string $string, ?string $options = null) : bool
{
}<?php 

function mb_stripos(string $haystack, string $needle, int $offset = 0, ?string $encoding = null) : int|false
{
}<?php 

function mb_stristr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding = null) : string|false
{
}<?php 

function mb_substr(string $string, int $start, ?int $length = null, ?string $encoding = null) : string
{
}<?php 

function mb_strrichr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding = null) : string|false
{
}<?php 

function mb_substitute_character(string|int|null $substitute_character = null) : string|int|bool
{
}<?php 

function mb_convert_case(string $string, int $mode, ?string $encoding = null) : string
{
}<?php 

function mb_strtolower(string $string, ?string $encoding = null) : string
{
}<?php 

function mb_strripos(string $haystack, string $needle, int $offset = 0, ?string $encoding = null) : int|false
{
}<?php 

function mb_detect_encoding(string $string, array|string|null $encodings = null, bool $strict = false) : string|false
{
}<?php 

/**
 * @refcount 1
 */
function mb_encoding_aliases(string $encoding) : array
{
}<?php 

/**
 * @refcount 1
 */
function mb_http_input(?string $type = null) : array|string|false
{
}<?php 

function simplexml_load_string(string $data, ?string $class_name = SimpleXMLElement::class, int $options = 0, string $namespace_or_prefix = "", bool $is_prefix = false) : \SimpleXMLElement|false
{
}<?php 

class SimpleXMLElement implements \Stringable, \Countable, \RecursiveIterator
{
    #[\Until('8.1')]
    public function current()
    {
    }
    /**
     * @tentative-return-type
     * @return (array | null | false)
     */
    public function xpath(string $expression)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function registerXPathNamespace(string $prefix, string $namespace)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | bool)
     */
    public function asXML(?string $filename = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias SimpleXMLElement::asXML
     * @return (string | bool)
     */
    public function saveXML(?string $filename = null)
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function getNamespaces(bool $recursive = false)
    {
    }
    /**
     * @tentative-return-type
     * @return (array | false)
     */
    public function getDocNamespaces(bool $recursive = false, bool $fromRoot = true)
    {
    }
    /**
     * @tentative-return-type
     * @return (SimpleXMLElement | null)
     */
    public function children(?string $namespaceOrPrefix = null, bool $isPrefix = false)
    {
    }
    /**
     * @tentative-return-type
     * @return (SimpleXMLElement | null)
     */
    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)
    {
    }
    /**
     * @tentative-return-type
     * @return (SimpleXMLElement | null)
     */
    public function addChild(string $qualifiedName, ?string $value = null, ?string $namespace = null)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function addAttribute(string $qualifiedName, string $value, ?string $namespace = null)
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getName()
    {
    }
    public function __toString() : string
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function count()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function rewind()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function valid()
    {
    }
    #[\Since('8.1')]
    public function current() : SimpleXMLElement
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function key()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function next()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function hasChildren()
    {
    }
    /**
     * @tentative-return-type
     * @return (SimpleXMLElement | null)
     */
    public function getChildren()
    {
    }
}<?php 

class SimpleXMLIterator extends \SimpleXMLElement
{
}<?php 

function simplexml_import_dom(\SimpleXMLElement|\DOMNode $node, ?string $class_name = SimpleXMLElement::class) : ?\SimpleXMLElement
{
}<?php 

/** @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
{
}<?php 

function assert_options(int $option, mixed $value = UNKNOWN) : mixed
{
}<?php 

function sapi_windows_set_ctrl_handler(?callable $handler, bool $add = true) : bool
{
}<?php 

function is_countable(mixed $value) : bool
{
}<?php 

function strnatcasecmp(string $string1, string $string2) : int
{
}<?php 

/** @param resource|null $dir_handle */
function rewinddir($dir_handle = null) : void
{
}<?php 

function ini_get(string $option) : string|false
{
}<?php 

#endif
/* ftok.c */
#if HAVE_FTOK
function ftok(string $filename, string $project_id) : int
{
}<?php 

function max(mixed $value, mixed ...$values) : mixed
{
}<?php 

function time_sleep_until(float $timestamp) : bool
{
}<?php 

function urldecode(string $string) : string
{
}<?php 

function array_diff_assoc(array $array, array ...$arrays) : array
{
}<?php 

function ob_get_flush() : string|false
{
}<?php 

function end(array|object &$array) : mixed
{
}<?php 

#endif
#if HAVE_GETPROTOBYNAME
function getprotobyname(string $protocol) : int|false
{
}<?php 

/**
 * @refcount 1
 */
function pathinfo(string $path, int $flags = PATHINFO_ALL) : array|string
{
}<?php 

/**
 * @param string|int|float $start
 * @param string|int|float $end
 */
function range($start, $end, int|float $step = 1) : array
{
}<?php 

/** @param resource $process */
function proc_terminate($process, int $signal = 15) : bool
{
}<?php 

function next(array|object &$array) : mixed
{
}<?php 

#[\Until('8.2')]
function register_shutdown_function(callable $callback, mixed ...$args) : ?bool
{
}
#[\Since('8.2')]
function register_shutdown_function(callable $callback, mixed ...$args) : void
{
}<?php 

#[\Since('8.2')]
function memory_reset_peak_usage() : void
{
}<?php 

#[\Until('8.2')]
function sort(array &$array, int $flags = SORT_REGULAR) : bool
{
}
#[\Since('8.2')]
function sort(array &$array, int $flags = SORT_REGULAR) : true
{
}<?php 

/** @param float $percent */
function similar_text(string $string1, string $string2, &$percent = null) : int
{
}<?php 

function str_rot13(string $string) : string
{
}<?php 

function memory_get_usage(bool $real_usage = false) : int
{
}<?php 

function array_unshift(array &$array, mixed ...$values) : int
{
}<?php 

function long2ip(int $ip) : string|false
{
}<?php 

function hypot(float $x, float $y) : float
{
}<?php 

/** @param resource|null $context */
function file_get_contents(string $filename, bool $use_include_path = false, $context = null, int $offset = 0, ?int $length = null) : string|false
{
}<?php 

function is_finite(float $num) : bool
{
}<?php 

function php_ini_loaded_file() : string|false
{
}<?php 

/* random.c */
function random_bytes(int $length) : string
{
}<?php 

function escapeshellcmd(string $command) : string
{
}<?php 

#if HAVE_NL_LANGINFO
function nl_langinfo(int $item) : string|false
{
}<?php 

function utf8_encode(string $string) : string
{
}<?php 

/**
 * @refcount 1
 */
function sscanf(string $string, string $format, mixed &...$vars) : array|int|null
{
}<?php 

/**
 * @refcount 1
 */
function gettimeofday(bool $as_float = false) : array|float
{
}<?php 

#endif
#ifdef HAVE_INET_PTON
function inet_pton(string $ip) : string|false
{
}<?php 

#endif
function register_tick_function(callable $callback, mixed ...$args) : bool
{
}<?php 

/** @param resource $stream */
function fwrite($stream, string $data, ?int $length = null) : int|false
{
}<?php 

/** @param resource $context */
function stream_context_set_params($context, array $params) : bool
{
}<?php 

function sleep(int $seconds) : int
{
}<?php 

/** @param resource $stream */
#[\Until('8.1')]
function fputcsv($stream, array $fields, string $separator = ",", string $enclosure = "\"", string $escape = "\\") : int|false
{
}
/** @param resource $stream */
#[\Since('8.1')]
function fputcsv($stream, array $fields, string $separator = ",", string $enclosure = "\"", string $escape = "\\", string $eol = "\n") : int|false
{
}<?php 

function intdiv(int $num1, int $num2) : int
{
}<?php 

function settype(mixed &$var, string $type) : bool
{
}<?php 

function strnatcmp(string $string1, string $string2) : int
{
}<?php 

function bindec(string $binary_string) : int|float
{
}<?php 

function strrev(string $string) : string
{
}<?php 

function decoct(int $num) : string
{
}<?php 

function file_exists(string $filename) : bool
{
}<?php 

#endif
#ifdef HAVE_INET_NTOP
function inet_ntop(string $ip) : string|false
{
}<?php 

/** @return resource */
function stream_context_set_default(array $options)
{
}<?php 

function call_user_func_array(callable $callback, array $args) : mixed
{
}<?php 

/** @param resource $stream */
function vfprintf($stream, string $format, array $values) : int
{
}<?php 

function setrawcookie(string $name, string $value = "", array|int $expires_or_options = 0, string $path = "", string $domain = "", bool $secure = false, bool $httponly = false) : bool
{
}<?php 

function gethostbyname(string $hostname) : string
{
}<?php 

function is_file(string $filename) : bool
{
}<?php 

function getmygid() : int|false
{
}<?php 

function get_cfg_var(string $option) : string|array|false
{
}<?php 

#ifdef PHP_WIN32
/** @param resource $stream */
function sapi_windows_vt100_support($stream, ?bool $enable = null) : bool
{
}<?php 

/**
 * @param int $count
 * @compile-time-eval
 */
function str_replace(array|string $search, array|string $replace, string|array $subject, &$count = null) : string|array
{
}<?php 

function is_array(mixed $value) : bool
{
}<?php 

#endif
#if HAVE_GETSERVBYPORT
function getservbyport(int $port, string $protocol) : string|false
{
}<?php 

#[\Until('8.2')]
function array_walk_recursive(array|object &$array, callable $callback, mixed $arg = UNKNOWN) : bool
{
}
#[\Since('8.2')]
function array_walk_recursive(array|object &$array, callable $callback, mixed $arg = UNKNOWN) : true
{
}<?php 

/** @param string|int $key */
function array_key_exists($key, array $array) : bool
{
}<?php 

function octdec(string $octal_string) : int|float
{
}<?php 

function urlencode(string $string) : string
{
}<?php 

function var_export(mixed $value, bool $return = false) : ?string
{
}<?php 

function rsort(array &$array, int $flags = SORT_REGULAR) : bool
{
}<?php 

/** @param array|callable $rest */
function array_diff_uassoc(array $array, ...$rest) : array
{
}<?php 

function password_verify(string $password, string $hash) : bool
{
}<?php 

function is_null(mixed $value) : bool
{
}<?php 

/**
 * @refcount 1
 */
function ini_get_all(?string $extension = null, bool $details = true) : array|false
{
}<?php 

function boolval(mixed $value) : bool
{
}<?php 

function highlight_string(string $string, bool $return = false) : string|bool
{
}<?php 

function acos(float $num) : float
{
}<?php 

/* }}} */
/* assert.c */
function assert(mixed $assertion, \Throwable|string|null $description = null) : bool
{
}<?php 

function filegroup(string $filename) : int|false
{
}<?php 

#[\Until('8.1')]
function get_html_translation_table(int $table = HTML_SPECIALCHARS, int $flags = ENT_COMPAT, string $encoding = "UTF-8") : array
{
}
/**
 * @return array<string, string>
 * @refcount 1
 */
#[\Since('8.1')]
function get_html_translation_table(int $table = HTML_SPECIALCHARS, int $flags = ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401, string $encoding = "UTF-8") : array
{
}<?php 

/**
 * @param int $error_code
 * @param string $error_message
 * @param resource|null $context
 * @return resource|false
 */
function stream_socket_server(string $address, &$error_code = null, &$error_message = null, int $flags = STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $context = null)
{
}<?php 

/* link.c */
#if defined(HAVE_SYMLINK) || defined(PHP_WIN32)
function readlink(string $path) : string|false
{
}<?php 

#if HAVE_UTIME
function touch(string $filename, ?int $mtime = null, ?int $atime = null) : bool
{
}<?php 

function addcslashes(string $string, string $characters) : string
{
}<?php 

/** @param resource|null $context */
function unlink(string $filename, $context = null) : bool
{
}<?php 

/* crc32.c */
function crc32(string $string) : int
{
}<?php 

#[\Until('8.1')]
function ini_set(string $option, string $value) : string|false
{
}
#[\Since('8.1')]
function ini_set(string $option, string|int|float|bool|null $value) : string|false
{
}<?php 

function natsort(array &$array) : bool
{
}<?php 

#endif
/**
 * @param resource $from
 * @param resource $to
 */
function stream_copy_to_stream($from, $to, ?int $length = null, int $offset = 0) : int|false
{
}<?php 

function md5_file(string $filename, bool $binary = false) : string|false
{
}<?php 

function ucwords(string $string, string $separators = " \t\r\n\f\v") : string
{
}<?php 

function ignore_user_abort(?bool $enable = null) : int
{
}<?php 

/** @param resource $stream */
function stream_bucket_new($stream, string $buffer) : object
{
}<?php 

function realpath_cache_size() : int
{
}<?php 

function ucfirst(string $string) : string
{
}<?php 

/* microtime.c */
#ifdef HAVE_GETTIMEOFDAY
function microtime(bool $as_float = false) : string|float
{
}<?php 

function array_merge(array ...$arrays) : array
{
}<?php 

function disk_free_space(string $directory) : float|false
{
}<?php 

function header_remove(?string $name = null) : void
{
}<?php 

function array_combine(array $keys, array $values) : array
{
}<?php 

function password_algos() : array
{
}<?php 

function rtrim(string $string, string $characters = " \n\r\t\v\x00") : string
{
}<?php 

#[\Until('8.1')]
function htmlspecialchars_decode(string $string, int $flags = ENT_COMPAT) : string
{
}
#[\Since('8.1')]
function htmlspecialchars_decode(string $string, int $flags = ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401) : string
{
}<?php 

function wordwrap(string $string, int $width = 75, string $break = "\n", bool $cut_long_words = false) : string
{
}<?php 

#[\Since('8.2')]
function ini_parse_quantity(string $shorthand) : int
{
}<?php 

#[\Until('8.2')]
function arsort(array &$array, int $flags = SORT_REGULAR) : bool
{
}
#[\Since('8.2')]
function arsort(array &$array, int $flags = SORT_REGULAR) : true
{
}<?php 

/**
 * @param resource $stream
 * @refcount 1
 */
function fgetcsv($stream, ?int $length = null, string $separator = ",", string $enclosure = "\"", string $escape = "\\") : array|false
{
}<?php 

function pow(mixed $num, mixed $exponent) : int|float|object
{
}<?php 

function array_sum(array $array) : int|float
{
}<?php 

function log1p(float $num) : float
{
}<?php 

#endif
/* url.c */
/**
 * @refcount 1
 */
function parse_url(string $url, int $component = -1) : int|string|array|null|false
{
}<?php 

#endif
function clearstatcache(bool $clear_realpath_cache = false, string $filename = "") : void
{
}<?php 

/** @alias mt_getrandmax */
function getrandmax() : int
{
}<?php 

/* crypt.c */
function crypt(string $string, string $salt) : string
{
}<?php 

function min(mixed $value, mixed ...$values) : mixed
{
}<?php 

#if defined(HAVE_CHROOT) && !defined(ZTS) && ENABLE_CHROOT_FUNC
function chroot(string $directory) : bool
{
}<?php 

/**
 * @refcount 1
 */
function localeconv() : array
{
}<?php 

/**
 * @param resource $stream
 * @alias stream_get_meta_data
 */
function socket_get_status($stream) : array
{
}<?php 

function array_intersect_key(array $array, array ...$arrays) : array
{
}<?php 

/** @alias current */
function pos(array|object $array) : mixed
{
}<?php 

function is_infinite(float $num) : bool
{
}<?php 

/**
 * @refcount 1
 */
function iptcparse(string $iptc_block) : array|false
{
}<?php 

/**
 * @param array $hosts
 * @param array $weights
 */
function dns_get_mx(string $hostname, &$hosts, &$weights = null) : bool
{
}<?php 

function output_add_rewrite_var(string $name, string $value) : bool
{
}<?php 

/**
 * @param resource $stream
 * @alias stream_set_blocking
 */
function socket_set_blocking($stream, bool $enable) : bool
{
}<?php 

/** @param resource|null $context */
function file_put_contents(string $filename, mixed $data, int $flags = 0, $context = null) : int|false
{
}<?php 

function ob_get_level() : int
{
}<?php 

function substr_compare(string $haystack, string $needle, int $offset, ?int $length = null, bool $case_insensitive = false) : int
{
}<?php 

function base64_decode(string $string, bool $strict = false) : string|false
{
}<?php 

/**
 * @refcount 1
 */
function stream_get_transports() : array
{
}<?php 

function is_iterable(mixed $value) : bool
{
}<?php 

function is_link(string $filename) : bool
{
}<?php 

/**
 * @compile-time-eval
 */
function array_keys(array $array, mixed $filter_value = UNKNOWN, bool $strict = false) : array
{
}<?php 

/**
 * @param resource $stream
 * @alias stream_set_write_buffer
 */
function set_file_buffer($stream, int $size) : int
{
}<?php 

function lcfirst(string $string) : string
{
}<?php 

function setcookie(string $name, string $value = "", array|int $expires_or_options = 0, string $path = "", string $domain = "", bool $secure = false, bool $httponly = false) : bool
{
}<?php 

/** @alias rtrim */
function chop(string $string, string $characters = " \n\r\t\v\x00") : string
{
}<?php 

function dl(string $extension_filename) : bool
{
}<?php 

/** @alias is_float */
function is_double(mixed $value) : bool
{
}<?php 

function array_replace(array $array, array ...$replacements) : array
{
}<?php 

function filectime(string $filename) : int|false
{
}<?php 

function sapi_windows_cp_get(string $kind = "") : int
{
}<?php 

/** @param resource $stream */
#[\Since('8.1')]
function fdatasync($stream) : bool
{
}<?php 

function vprintf(string $format, array $values) : int
{
}<?php 

function str_shuffle(string $string) : string
{
}<?php 

/** @param array|callable $rest */
function array_uintersect_uassoc(array $array, ...$rest) : array
{
}<?php 

/** @param array|callable $rest */
function array_udiff_assoc(array $array, ...$rest) : array
{
}<?php 

function array_pop(array &$array) : mixed
{
}<?php 

/** @param resource|string $stream */
function stream_is_local($stream) : bool
{
}<?php 

function sqrt(float $num) : float
{
}<?php 

function array_diff_key(array $array, array ...$arrays) : array
{
}<?php 

/** @generate-function-entries */
class php_user_filter
{
    /**
     * @param resource $in
     * @param resource $out
     * @param int $consumed
     * @tentative-return-type
     * @return int
     */
    public function filter($in, $out, &$consumed, bool $closing)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function onCreate()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function onClose()
    {
    }
}<?php 

function str_pad(string $string, int $length, string $pad_string = " ", int $pad_type = STR_PAD_RIGHT) : string
{
}<?php 

/**
 * @refcount 1
 */
function unpack(string $format, string $string, int $offset = 0) : array|false
{
}<?php 

/** @param array|callable $rest */
function array_intersect_ukey(array $array, ...$rest) : array
{
}<?php 

function current(array|object $array) : mixed
{
}<?php 

function dechex(int $num) : string
{
}<?php 

function asinh(float $num) : float
{
}<?php 

/**
 * @param resource $socket
 * @param string|null $address
 */
function stream_socket_recvfrom($socket, int $length, int $flags = 0, &$address = null) : string|false
{
}<?php 

/* string.c */
function bin2hex(string $string) : string
{
}<?php 

/** @alias implode */
function join(string|array $separator, ?array $array = null) : string
{
}<?php 

function linkinfo(string $path) : int|false
{
}<?php 

/* formatted_print.c */
function sprintf(string $format, mixed ...$values) : string
{
}<?php 

function connection_aborted() : int
{
}<?php 

/** @param resource $stream */
function fgetc($stream) : string|false
{
}<?php 

/** @param resource $stream */
function fprintf($stream, string $format, mixed ...$values) : int
{
}<?php 

/**
 * @param array $array
 * @param array|int $rest
 * @prefer-ref $array
 * @prefer-ref $rest
 */
function array_multisort(&$array, &...$rest) : bool
{
}<?php 

function getlastmod() : int|false
{
}<?php 

/** @return resource|false */
function tmpfile()
{
}<?php 

function round(int|float $num, int $precision = 0, int $mode = PHP_ROUND_HALF_UP) : float
{
}<?php 

#endif
/* mail.c */
function mail(string $to, string $subject, string $message, array|string $additional_headers = [], string $additional_params = "") : bool
{
}<?php 

/* main/output.c */
/** @param callable $callback */
function ob_start($callback = null, int $chunk_size = 0, int $flags = PHP_OUTPUT_HANDLER_STDFLAGS) : bool
{
}<?php 

function hexdec(string $hex_string) : int|float
{
}<?php 

function array_map(?callable $callback, array $array, array ...$arrays) : array
{
}<?php 

function strval(mixed $value) : string
{
}<?php 

function atan(float $num) : float
{
}<?php 

/** @param array|callable $rest */
function array_intersect_uassoc(array $array, ...$rest) : array
{
}<?php 

function stripos(string $haystack, string $needle, int $offset = 0) : int|false
{
}<?php 

/* array.c */
function array_push(array &$array, mixed ...$values) : int
{
}<?php 

/** @param resource $stream */
function fpassthru($stream) : int
{
}<?php 

function substr(string $string, int $offset, ?int $length = null) : string
{
}<?php 

function is_int(mixed $value) : bool
{
}<?php 

#if HAVE_GETSERVBYNAME
function getservbyname(string $service, string $protocol) : int|false
{
}<?php 

function filemtime(string $filename) : int|false
{
}<?php 

/**
 * @param string|int $key
 * @alias array_key_exists
 */
function key_exists($key, array $array) : bool
{
}<?php 

/** @param resource|null $context */
function mkdir(string $directory, int $permissions = 0777, bool $recursive = false, $context = null) : bool
{
}<?php 

#[\Until('8.2')]
function syslog(int $priority, string $message) : bool
{
}
#[\Since('8.2')]
function syslog(int $priority, string $message) : true
{
}<?php 

/**
 * @refcount 1
 */
function stream_get_wrappers() : array
{
}<?php 

/** @param resource $stream */
#[\Since('8.1')]
function fsync($stream) : bool
{
}<?php 

function chunk_split(string $string, int $length = 76, string $separator = "\r\n") : string
{
}<?php 

#[\Until('8.2')]
function uasort(array &$array, callable $callback) : bool
{
}
#[\Since('8.2')]
function uasort(array &$array, callable $callback) : true
{
}<?php 

function ini_restore(string $option) : void
{
}<?php 

/** @alias highlight_file */
function show_source(string $filename, bool $return = false) : string|bool
{
}<?php 

#if HAVE_SYS_TIME_H || defined(PHP_WIN32)
/** @param resource $stream */
function stream_set_timeout($stream, int $seconds, int $microseconds = 0) : bool
{
}<?php 

function implode(string|array $separator, ?array $array = null) : string
{
}<?php 

function is_numeric(mixed $value) : bool
{
}<?php 

function mt_rand(int $min = UNKNOWN, int $max = UNKNOWN) : int
{
}<?php 

function is_nan(float $num) : bool
{
}<?php 

function is_float(mixed $value) : bool
{
}<?php 

/**
 * @param resource $stream
 */
function stream_get_meta_data($stream) : array
{
}<?php 

/** @return resource */
function stream_context_get_default(?array $options = null)
{
}<?php 

function prev(array|object &$array) : mixed
{
}<?php 

/* syslog.c */
#ifdef HAVE_SYSLOG_H
#[\Until('8.2')]
function openlog(string $prefix, int $flags, int $facility) : bool
{
}
/* syslog.c */
#ifdef HAVE_SYSLOG_H
#[\Since('8.2')]
function openlog(string $prefix, int $flags, int $facility) : true
{
}<?php 

/** @param resource|null $context */
function rmdir(string $directory, $context = null) : bool
{
}<?php 

function array_change_key_case(array $array, int $case = CASE_LOWER) : array
{
}<?php 

function array_intersect_assoc(array $array, array ...$arrays) : array
{
}<?php 

function array_key_first(array $array) : int|string|null
{
}<?php 

function acosh(float $num) : float
{
}<?php 

function sinh(float $num) : float
{
}<?php 

/** @param resource $process */
function proc_close($process) : int
{
}<?php 

/** @param resource $stream */
function stream_supports_lock($stream) : bool
{
}<?php 

function stream_resolve_include_path(string $filename) : string|false
{
}<?php 

function stream_filter_register(string $filter_name, string $class) : bool
{
}<?php 

/* datetime.c */
#if HAVE_STRPTIME
/**
 * @deprecated
 * @refcount 1
 */
function strptime(string $timestamp, string $format) : array|false
{
}<?php 

function array_unique(array $array, int $flags = SORT_STRING) : array
{
}<?php 

/** @alias disk_free_space */
function diskfreespace(string $directory) : float|false
{
}<?php 

/**
 * @refcount 1
 */
function stat(string $filename) : array|false
{
}<?php 

/**
 * @refcount 1
 */
function realpath_cache_get() : array
{
}<?php 

/**
 * @param resource $stream_or_context
 */
function stream_context_get_options($stream_or_context) : array
{
}<?php 

function array_product(array $array) : int|float
{
}<?php 

/* versioning.c */
function version_compare(string $version1, string $version2, ?string $operator = null) : int|bool
{
}<?php 

function strtr(string $string, string|array $from, ?string $to = null) : string
{
}<?php 

function array_filter(array $array, ?callable $callback = null, int $mode = 0) : array
{
}<?php 

function ob_get_contents() : string|false
{
}<?php 

/** @param resource $stream */
function stream_set_blocking($stream, bool $enable) : bool
{
}<?php 

function ob_clean() : bool
{
}<?php 

function umask(?int $mask = null) : int
{
}<?php 

function debug_zval_dump(mixed $value, mixed ...$values) : void
{
}<?php 

/**
 * @param int $result_code
 */
#[\Until('8.2')]
function passthru(string $command, &$result_code = null) : ?bool
{
}
/** @param int $result_code */
#[\Since('8.2')]
function passthru(string $command, &$result_code = null) : false|null
{
}<?php 

function is_uploaded_file(string $filename) : bool
{
}<?php 

/** @param resource|null $context */
function dir(string $directory, $context = null) : \Directory|false
{
}<?php 

#endif
#ifdef HAVE_GETLOADAVG
/**
 * @refcount 1
 */
function sys_getloadavg() : array|false
{
}<?php 

/**
 * @param resource $stream
 * @refcount 1
 */
function fscanf($stream, string $format, mixed &...$vars) : array|int|false|null
{
}<?php 

function strstr(string $haystack, string $needle, bool $before_needle = false) : string|false
{
}<?php 

function connection_status() : int
{
}<?php 

/** @param resource $stream */
function stream_get_line($stream, int $length, string $ending = "") : string|false
{
}<?php 

function ob_implicit_flush(bool $enable = true) : void
{
}<?php 

function usleep(int $microseconds) : void
{
}<?php 

/** @alias strstr */
function strchr(string $haystack, string $needle, bool $before_needle = false) : string|false
{
}<?php 

#endif
#ifdef HAVE_GETRUSAGE
/**
 * @refcount 1
 */
function getrusage(int $mode = 0) : array|false
{
}<?php 

/** @alias is_int */
function is_integer(mixed $value) : bool
{
}<?php 

function array_fill_keys(array $keys, mixed $value) : array
{
}<?php 

#endif
function chmod(string $filename, int $permissions) : bool
{
}<?php 

function sapi_windows_cp_is_utf8() : bool
{
}<?php 

/** @param array|callable $rest */
function array_diff_ukey(array $array, ...$rest) : array
{
}<?php 

function get_include_path() : string|false
{
}<?php 

function forward_static_call_array(callable $callback, array $args) : mixed
{
}<?php 

function rawurldecode(string $string) : string
{
}<?php 

/** @alias ini_set */
#[\Until('8.1')]
function ini_alter(string $option, string $value) : string|false
{
}
/** @alias ini_set */
#[\Since('8.1')]
function ini_alter(string $option, string|int|float|bool|null $value) : string|false
{
}<?php 

function sha1_file(string $filename, bool $binary = false) : string|false
{
}<?php 

/* main/SAPI.c */
function header_register_callback(callable $callback) : bool
{
}<?php 

/** @param resource $brigade */
function stream_bucket_prepend($brigade, object $bucket) : void
{
}<?php 

/** @param resource $stream */
function fseek($stream, int $offset, int $whence = SEEK_SET) : int
{
}<?php 

function strripos(string $haystack, string $needle, int $offset = 0) : int|false
{
}<?php 

#if ZEND_DEBUG
/**
 * @refcount 1
 */
function config_get_hash() : array
{
}<?php 

/* soundex.c */
function soundex(string $string) : string
{
}<?php 

/**
 * @refcount 1
 */
function str_word_count(string $string, int $format = 0, ?string $characters = null) : array|int
{
}<?php 

function ob_end_flush() : bool
{
}<?php 

function http_response_code(int $response_code = 0) : int|bool
{
}<?php 

function strspn(string $string, string $characters, int $offset = 0, ?int $length = null) : int
{
}<?php 

function strtok(string $string, ?string $token = null) : string|false
{
}<?php 

/* dir.c */
/**
 * @param resource|null $context
 * @return resource|false
 */
function opendir(string $directory, $context = null)
{
}<?php 

function quoted_printable_encode(string $string) : string
{
}<?php 

function array_reverse(array $array, bool $preserve_keys = false) : array
{
}<?php 

#endif
/* exec.c */
/**
 * @param array $output
 * @param int $result_code
 */
function exec(string $command, &$output = null, &$result_code = null) : string|false
{
}<?php 

/**
 * @refcount 1
 */
function str_getcsv(string $string, string $separator = ",", string $enclosure = "\"", string $escape = "\\") : array
{
}<?php 

function str_starts_with(string $haystack, string $needle) : bool
{
}<?php 

function unserialize(string $data, array $options = []) : mixed
{
}<?php 

/* mt_rand.c */
#[\Until('8.1')]
function mt_srand(int $seed = 0, int $mode = MT_RAND_MT19937) : void
{
}
/* mt_rand.c */
#[\Since('8.1')]
function mt_srand(int $seed = UNKNOWN, int $mode = MT_RAND_MT19937) : void
{
}<?php 

/** @param int $result_code */
function system(string $command, &$result_code = null) : string|false
{
}<?php 

function symlink(string $target, string $link) : bool
{
}<?php 

function chgrp(string $filename, string|int $group) : bool
{
}<?php 

function array_slice(array $array, int $offset, ?int $length = null, bool $preserve_keys = false) : array
{
}<?php 

/* proc_open.c */
#ifdef PHP_CAN_SUPPORT_PROC_OPEN
/**
 * @param array $pipes
 * @return resource|false
 */
function proc_open(array|string $command, array $descriptor_spec, &$pipes, ?string $cwd = null, ?array $env_vars = null, ?array $options = null)
{
}<?php 

/**
 * @refcount 1
 */
function headers_list() : array
{
}<?php 

/* fsock.c */
/**
 * @param int $error_code
 * @param string $error_message
 * @return resource|false
 */
function fsockopen(string $hostname, int $port = -1, &$error_code = null, &$error_message = null, ?float $timeout = null)
{
}<?php 

#endif
#if HAVE_SOCKETPAIR
/**
 * @refcount 1
 */
function stream_socket_pair(int $domain, int $type, int $protocol) : array|false
{
}<?php 

function is_writable(string $filename) : bool
{
}<?php 

#endif
function sys_get_temp_dir() : string
{
}<?php 

function fmod(float $num1, float $num2) : float
{
}<?php 

function array_key_last(array $array) : int|string|null
{
}<?php 

#endif
/* type.c */
function gettype(mixed $value) : string
{
}<?php 

/**
 * @compile-time-eval
 */
function array_values(array $array) : array
{
}<?php 

function rad2deg(float $num) : float
{
}<?php 

function filesize(string $filename) : int|false
{
}<?php 

/** @param resource $stream */
function feof($stream) : bool
{
}<?php 

function ob_end_clean() : bool
{
}<?php 

function ob_get_length() : int|false
{
}<?php 

/** @alias stream_wrapper_register */
function stream_register_wrapper(string $protocol, string $class, int $flags = 0) : bool
{
}<?php 

/**
 * @param array $hosts
 * @param array $weights
 * @alias dns_get_mx
 */
function getmxrr(string $hostname, &$hosts, &$weights = null) : bool
{
}<?php 

#ifdef HAVE_PUTENV
function putenv(string $assignment) : bool
{
}<?php 

/** @param resource $stream */
function stream_get_contents($stream, ?int $length = null, int $offset = -1) : string|false
{
}<?php 

function stristr(string $haystack, string $needle, bool $before_needle = false) : string|false
{
}<?php 

#[\Until('8.2')]
function uksort(array &$array, callable $callback) : bool
{
}
#[\Since('8.2')]
function uksort(array &$array, callable $callback) : true
{
}<?php 

function mt_getrandmax() : int
{
}<?php 

/**
 * @refcount 1
 */
function lstat(string $filename) : array|false
{
}<?php 

function hebrev(string $string, int $max_chars_per_line = 0) : string
{
}<?php 

function php_strip_whitespace(string $filename) : string
{
}<?php 

function str_ends_with(string $haystack, string $needle) : bool
{
}<?php 

#[\Until('8.1')]
function html_entity_decode(string $string, int $flags = ENT_COMPAT, ?string $encoding = null) : string
{
}
#[\Since('8.1')]
function html_entity_decode(string $string, int $flags = ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401, ?string $encoding = null) : string
{
}<?php 

#[\Until('8.2')]
function usort(array &$array, callable $callback) : bool
{
}
#[\Since('8.2')]
function usort(array &$array, callable $callback) : true
{
}<?php 

function expm1(float $num) : float
{
}<?php 

/** @param resource $context */
function stream_context_set_option($context, array|string $wrapper_or_options, ?string $option_name = null, mixed $value = UNKNOWN) : bool
{
}<?php 

#endif
#if HAVE_GETPROTOBYNUMBER
function getprotobynumber(int $protocol) : string|false
{
}<?php 

/**
 * @refcount 1
 */
function error_get_last() : ?array
{
}<?php 

/**
 * @param resource $stream
 * @return resource|false
 */
function stream_filter_prepend($stream, string $filter_name, int $mode = 0, mixed $params = UNKNOWN)
{
}<?php 

#ifdef HAVE_NICE
function proc_nice(int $priority) : bool
{
}<?php 

#endif
function gethostbyaddr(string $ip) : string|false
{
}<?php 

#endif
/* net.c */
#if defined(PHP_WIN32) || HAVE_GETIFADDRS || defined(__PASE__)
function net_get_interfaces() : array|false
{
}<?php 

/** @param resource $stream */
function ftruncate($stream, int $size) : bool
{
}<?php 

function is_scalar(mixed $value) : bool
{
}<?php 

function print_r(mixed $value, bool $return = false) : string|bool
{
}<?php 

function cosh(float $num) : float
{
}<?php 

/**
 * @param int $count
 * @compile-time-eval
 */
function str_ireplace(array|string $search, array|string $replace, string|array $subject, &$count = null) : string|array
{
}<?php 

/* image.c */
function image_type_to_mime_type(int $image_type) : string
{
}<?php 

/** @param resource $stream */
function fgets($stream, ?int $length = null) : string|false
{
}<?php 

function str_repeat(string $string, int $times) : string
{
}<?php 

function array_column(array $array, int|string|null $column_key, int|string|null $index_key = null) : array
{
}<?php 

function array_intersect(array $array, array ...$arrays) : array
{
}<?php 

#endif
/* quot_print.c */
function quoted_printable_decode(string $string) : string
{
}<?php 

/** @param resource $stream */
function rewind($stream) : bool
{
}<?php 

#endif
/**
 * @param int $rest_index
 * @refcount 1
 */
function getopt(string $short_options, array $long_options = [], &$rest_index = null) : array|false
{
}<?php 

/** @param resource|null $dir_handle */
function closedir($dir_handle = null) : void
{
}<?php 

function chr(int $codepoint) : string
{
}<?php 

/* http.c */
function http_build_query(array|object $data, string $numeric_prefix = "", ?string $arg_separator = null, int $encoding_type = PHP_QUERY_RFC1738) : string
{
}<?php 

/**
 * @param resource $stream
 * @refcount 1
 */
function fstat($stream) : array|false
{
}<?php 

/** @return resource|false */
function popen(string $command, string $mode)
{
}<?php 

function set_include_path(string $include_path) : string|false
{
}<?php 

/**
 * @param string $filename
 * @param int $line
 */
function headers_sent(&$filename = null, &$line = null) : bool
{
}<?php 

function addslashes(string $string) : string
{
}<?php 

function key(array|object $array) : int|string|null
{
}<?php 

function array_rand(array $array, int $num = 1) : int|string|array
{
}<?php 

#endif
/* browscap.c */
/**
 * @refcount 1
 */
function get_browser(?string $user_agent = null, bool $return_array = false) : object|array|false
{
}<?php 

#endif
/* file.c */
/**
 * @param resource $stream
 * @param int $would_block
 */
function flock($stream, int $operation, &$would_block = null) : bool
{
}<?php 

function utf8_decode(string $string) : string
{
}<?php 

function deg2rad(float $num) : float
{
}<?php 

/**
 * @param int $error_code
 * @param string $error_message
 * @param resource|null $context
 * @return resource|false
 */
function stream_socket_client(string $address, &$error_code = null, &$error_message = null, ?float $timeout = null, int $flags = STREAM_CLIENT_CONNECT, $context = null)
{
}<?php 

/* levenshtein.c */
function levenshtein(string $string1, string $string2, int $insertion_cost = 1, int $replacement_cost = 1, int $deletion_cost = 1) : int
{
}<?php 

/** @param resource|null $context */
function readfile(string $filename, bool $use_include_path = false, $context = null) : int|false
{
}<?php 

/**
 * @param array $authoritative_name_servers
 * @param array $additional_records
 * @refcount 1
 */
function dns_get_record(string $hostname, int $type = DNS_ANY, &$authoritative_name_servers = null, &$additional_records = null, bool $raw = false) : array|false
{
}<?php 

function base_convert(string $num, int $from_base, int $to_base) : string
{
}<?php 

function stripcslashes(string $string) : string
{
}<?php 

/**
 * @param array|string $locales
 * @param string $rest
 */
function setlocale(int $category, $locales, ...$rest) : string|false
{
}<?php 

function is_executable(string $filename) : bool
{
}<?php 

/**
 * @param array $image_info
 * @refcount 1
 */
function getimagesizefromstring(string $string, &$image_info = null) : array|false
{
}<?php 

function rawurlencode(string $string) : string
{
}<?php 

/* basic_functions.c */
function constant(string $name) : mixed
{
}<?php 

function disk_total_space(string $directory) : float|false
{
}<?php 

function shell_exec(string $command) : string|false|null
{
}<?php 

/* md5.c */
function md5(string $string, bool $binary = false) : string
{
}<?php 

/** @alias is_int */
function is_long(mixed $value) : bool
{
}<?php 

function substr_replace(array|string $string, array|string $replace, array|int $offset, array|int|null $length = null) : string|array
{
}<?php 

function forward_static_call(callable $callback, mixed ...$args) : mixed
{
}<?php 

function error_log(string $message, int $message_type = 0, ?string $destination = null, ?string $additional_headers = null) : bool
{
}<?php 

/**
 * @param resource $stream
 * @param resource|null $session_stream
 */
function stream_socket_enable_crypto($stream, bool $enable, ?int $crypto_method = null, $session_stream = null) : int|bool
{
}<?php 

function dirname(string $path, int $levels = 1) : string
{
}<?php 

/**
 * @refcount 1
 */
function getenv(?string $name = null, bool $local_only = false) : string|array|false
{
}<?php 

#if defined(PHP_WIN32) || HAVE_DNS_SEARCH_FUNC
function dns_check_record(string $hostname, string $type = "MX") : bool
{
}<?php 

function php_ini_scanned_files() : string|false
{
}<?php 

function ltrim(string $string, string $characters = " \n\r\t\v\x00") : string
{
}<?php 

function error_clear_last() : void
{
}<?php 

function is_resource(mixed $value) : bool
{
}<?php 

function basename(string $path, string $suffix = "") : string
{
}<?php 

function fileinode(string $filename) : int|false
{
}<?php 

function number_format(float $num, int $decimals = 0, ?string $decimal_separator = ".", ?string $thousands_separator = ",") : string
{
}<?php 

function serialize(mixed $value) : string
{
}<?php 

function strrchr(string $haystack, string $needle) : string|false
{
}<?php 

/** @param resource|null $context */
function copy(string $from, string $to, $context = null) : bool
{
}<?php 

function strip_tags(string $string, array|string|null $allowed_tags = null) : string
{
}<?php 

function fileowner(string $filename) : int|false
{
}<?php 

#[\Until('8.2')]
function phpinfo(int $flags = INFO_ALL) : bool
{
}
/* info.c */
#[\Since('8.2')]
function phpinfo(int $flags = INFO_ALL) : true
{
}<?php 

#endif
function getcwd() : string|false
{
}<?php 

/* sha1.c */
function sha1(string $string, bool $binary = false) : string
{
}<?php 

function tempnam(string $directory, string $prefix) : string|false
{
}<?php 

function memory_get_peak_usage(bool $real_usage = false) : int
{
}<?php 

function password_needs_rehash(string $hash, string|int|null $algo, array $options = []) : bool
{
}<?php 

function array_chunk(array $array, int $length, bool $preserve_keys = false) : array
{
}<?php 

/**
 * @refcount 1
 */
function parse_ini_string(string $ini_string, bool $process_sections = false, int $scanner_mode = INI_SCANNER_NORMAL) : array|false
{
}<?php 

function flush() : void
{
}<?php 

function in_array(mixed $needle, array $haystack, bool $strict = false) : bool
{
}<?php 

/**
 * @param resource $context
 * @refcount 1
 */
function stream_context_get_params($context) : array
{
}<?php 

/** @alias mt_srand */
#[\Until('8.1')]
function srand(int $seed = 0, int $mode = MT_RAND_MT19937) : void
{
}
/** @alias mt_srand */
#[\Since('8.1')]
function srand(int $seed = UNKNOWN, int $mode = MT_RAND_MT19937) : void
{
}<?php 

/**
 * @refcount 1
 */
function ob_get_status(bool $full_status = false) : array
{
}<?php 

/**
 * @refcount 1
 */
function get_meta_tags(string $filename, bool $use_include_path = false) : array|false
{
}<?php 

function link(string $target, string $link) : bool
{
}<?php 

/** @param resource $handle */
function pclose($handle) : int
{
}<?php 

function strpos(string $haystack, string $needle, int $offset = 0) : int|false
{
}<?php 

function exp(float $num) : float
{
}<?php 

function ip2long(string $ip) : int|false
{
}<?php 

/** @param resource $socket */
function stream_socket_get_name($socket, bool $remote) : string|false
{
}<?php 

/**
 * @param resource $process
 * @refcount 1
 */
function proc_get_status($process) : array
{
}<?php 

/* win32/codepage.c */
#ifdef PHP_WIN32
function sapi_windows_cp_set(int $codepage) : bool
{
}<?php 

function lchgrp(string $filename, string|int $group) : bool
{
}<?php 

/**
 * @param resource $stream
 * @return resource|false
 */
function stream_filter_append($stream, string $filter_name, int $mode = 0, mixed $params = UNKNOWN)
{
}<?php 

#[\Since('8.1')]
class AssertionError extends \Error
{
}<?php 

function array_diff(array $array, array ...$arrays) : array
{
}<?php 

function strtoupper(string $string) : string
{
}<?php 

function ord(string $character) : int
{
}<?php 

#if HAVE_NANOSLEEP
/**
 * @refcount 1
 */
function time_nanosleep(int $seconds, int $nanoseconds) : array|bool
{
}<?php 

/** @param resource $stream */
function ftell($stream) : int|false
{
}<?php 

/* user_filters.c */
/** @param resource $brigade */
function stream_bucket_make_writeable($brigade) : ?object
{
}<?php 

/* lcg.c */
function lcg_value() : float
{
}<?php 

/** @param resource $stream */
function stream_isatty($stream) : bool
{
}<?php 

/**
 * @param resource $stream
 * @alias fwrite
 */
function fputs($stream, string $data, ?int $length = null) : int|false
{
}<?php 

function array_search(mixed $needle, array $haystack, bool $strict = false) : int|string|false
{
}<?php 

function decbin(int $num) : string
{
}<?php 

function sin(float $num) : float
{
}<?php 

#endif
/* pack.c */
function pack(string $format, mixed ...$values) : string
{
}<?php 

/** @param resource $stream */
function stream_set_write_buffer($stream, int $size) : int
{
}<?php 

function tan(float $num) : float
{
}<?php 

function natcasesort(array &$array) : bool
{
}<?php 

function log(float $num, float $base = M_E) : float
{
}<?php 

/** @param string $callable_name */
function is_callable(mixed $value, bool $syntax_only = false, &$callable_name = null) : bool
{
}<?php 

function sapi_windows_generate_ctrl_event(int $event, int $pid = 0) : bool
{
}<?php 

#[\Until('8.2')]
function asort(array &$array, int $flags = SORT_REGULAR) : bool
{
}
#[\Since('8.2')]
function asort(array &$array, int $flags = SORT_REGULAR) : true
{
}<?php 

function phpversion(?string $extension = null) : string|false
{
}<?php 

#ifdef HAVE_FNMATCH
function fnmatch(string $pattern, string $filename, int $flags = 0) : bool
{
}<?php 

function printf(string $format, mixed ...$values) : int
{
}<?php 

function stripslashes(string $string) : string
{
}<?php 

function chown(string $filename, string|int $user) : bool
{
}<?php 

#endif
/* hrtime.c */
function hrtime(bool $as_number = false) : array|int|float|false
{
}<?php 

function strpbrk(string $string, string $characters) : string|false
{
}<?php 

function vsprintf(string $format, array $values) : string
{
}<?php 

/** @param array|callable $rest */
function array_uintersect(array $array, ...$rest) : array
{
}<?php 

/**
 * @refcount 1
 */
function count_chars(string $string, int $mode = 0) : array|string
{
}<?php 

/**
 * @refcount 1
 * @compile-time-eval
 */
function explode(string $separator, string $string, int $limit = PHP_INT_MAX) : array
{
}<?php 

function pi() : float
{
}<?php 

/** @param array|callable $rest */
function array_udiff_uassoc(array $array, ...$rest) : array
{
}<?php 

/* streamsfuncs.c */
#[\Until('8.1')]
function stream_select(?array &$read, ?array &$write, ?array &$except, ?int $seconds, int $microseconds = 0) : int|false
{
}
/* streamsfuncs.c */
#[\Since('8.1')]
function stream_select(?array &$read, ?array &$write, ?array &$except, ?int $seconds, ?int $microseconds = null) : int|false
{
}<?php 

/**
 * @param (resource | null) $context
 * @refcount 1
 */
function file(string $filename, int $flags = 0, $context = null) : array|false
{
}<?php 

function substr_count(string $haystack, string $needle, int $offset = 0, ?int $length = null) : int
{
}<?php 

/* {{{ html.c */
#[\Until('8.1')]
function htmlspecialchars(string $string, int $flags = ENT_COMPAT, ?string $encoding = null, bool $double_encode = true) : string
{
}
/* {{{ html.c */
/** @refcount 1 */
#[\Since('8.1')]
function htmlspecialchars(string $string, int $flags = ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401, ?string $encoding = null, bool $double_encode = true) : string
{
}<?php 

/**
 * @param array $image_info
 * @refcount 1
 */
function getimagesize(string $filename, &$image_info = null) : array|false
{
}<?php 

/** @param array|callable $rest */
function array_udiff(array $array, ...$rest) : array
{
}<?php 

/**
 * @param (resource | null) $context
 * @refcount 1
 */
function get_headers(string $url, bool $associative = false, $context = null) : array|false
{
}<?php 

#if HAVE_LCHOWN
function lchown(string $filename, string|int $user) : bool
{
}<?php 

/* base64.c */
function base64_encode(string $string) : string
{
}<?php 

/* {{{ head.c */
function header(string $header, bool $replace = true, int $response_code = 0) : void
{
}<?php 

#endif
/* dns.c */
#ifdef HAVE_GETHOSTNAME
function gethostname() : string|false
{
}<?php 

/** @param resource $stream */
function fread($stream, int $length) : string|false
{
}<?php 

function stream_wrapper_restore(string $protocol) : bool
{
}<?php 

#[\Until('8.2')]
function shuffle(array &$array) : bool
{
}
#[\Since('8.2')]
function shuffle(array &$array) : true
{
}<?php 

/* math.c */
function abs(int|float $num) : int|float
{
}<?php 

/** @param resource $stream */
function fflush($stream) : bool
{
}<?php 

function unregister_tick_function(callable $callback) : void
{
}<?php 

#[\Until('8.1')]
function htmlentities(string $string, int $flags = ENT_COMPAT, ?string $encoding = null, bool $double_encode = true) : string
{
}
/** @refcount 1 */
#[\Since('8.1')]
function htmlentities(string $string, int $flags = ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401, ?string $encoding = null, bool $double_encode = true) : string
{
}<?php 

function fileperms(string $filename) : int|false
{
}<?php 

/** @param resource|null $context */
function rename(string $from, string $to, $context = null) : bool
{
}<?php 

function asin(float $num) : float
{
}<?php 

#endif
/** @param resource $stream */
function stream_set_chunk_size($stream, int $size) : int
{
}<?php 

function output_reset_rewrite_vars() : bool
{
}<?php 

function password_hash(string $password, string|int|null $algo, array $options = []) : string
{
}<?php 

/**
 * @refcount 1
 */
function stream_get_filters() : array
{
}<?php 

function reset(array|object &$array) : mixed
{
}<?php 

#[\Since('8.1')]
function array_is_list(array $array) : bool
{
}<?php 

function php_uname(string $mode = "a") : string
{
}<?php 

function get_debug_type(mixed $value) : string
{
}<?php 

/** @generate-function-entries */
class Directory
{
    /**
     * @tentative-return-type
     * @implementation-alias closedir
     * @return void
     */
    public function close()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias rewinddir
     * @return void
     */
    public function rewind()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias readdir
     * @return (string | false)
     */
    public function read()
    {
    }
}<?php 

function intval(mixed $value, int $base = 10) : int
{
}<?php 

function php_sapi_name() : string|false
{
}<?php 

/**
 * @refcount 1
 */
function array_count_values(array $array) : array
{
}<?php 

function log10(float $num) : float
{
}<?php 

/** @prefer-ref $array */
function extract(array &$array, int $flags = EXTR_OVERWRITE, string $prefix = "") : int
{
}<?php 

#endif
/* metaphone.c */
function metaphone(string $string, int $max_phonemes = 0) : string
{
}<?php 

/** @param resource $brigade */
function stream_bucket_append($brigade, object $bucket) : void
{
}<?php 

function array_pad(array $array, int $length, mixed $value) : array
{
}<?php 

/** @param resource $stream_filter */
function stream_filter_remove($stream_filter) : bool
{
}<?php 

function strtolower(string $string) : string
{
}<?php 

/* pageinfo.c */
function getmyuid() : int|false
{
}<?php 

/** @generate-class-entries */
#[\Since('8.1')]
final class __PHP_Incomplete_Class
{
}<?php 

function stream_wrapper_unregister(string $protocol) : bool
{
}<?php 

function filetype(string $filename) : string|false
{
}<?php 

/* filestat.c */
function fileatime(string $filename) : int|false
{
}<?php 

function chdir(string $directory) : bool
{
}<?php 

/** @return resource */
function stream_context_create(?array $options = null, ?array $params = null)
{
}<?php 

function array_reduce(array $array, callable $callback, mixed $initial = null) : mixed
{
}<?php 

/* var.c */
function var_dump(mixed $value, mixed ...$values) : void
{
}<?php 

#ifdef HAVE_SHUTDOWN
/** @param resource $stream */
function stream_socket_shutdown($stream, int $mode) : bool
{
}<?php 

function quotemeta(string $string) : string
{
}<?php 

function is_string(mixed $value) : bool
{
}<?php 

/* uniqid.c */
#ifdef HAVE_GETTIMEOFDAY
function uniqid(string $prefix = "", bool $more_entropy = false) : string
{
}<?php 

/** @generate-function-entries */
/* main/main.c */
function set_time_limit(int $seconds) : bool
{
}<?php 

function array_splice(array &$array, int $offset, ?int $length = null, mixed $replacement = []) : array
{
}<?php 

function getmypid() : int|false
{
}<?php 

/** @param array $result */
function parse_str(string $string, &$result) : void
{
}<?php 

function image_type_to_extension(int $image_type, bool $include_dot = true) : string|false
{
}<?php 

function highlight_file(string $filename, bool $return = false) : string|bool
{
}<?php 

function strrpos(string $haystack, string $needle, int $offset = 0) : int|false
{
}<?php 

function ob_flush() : bool
{
}<?php 

function getmyinode() : int|false
{
}<?php 

function cos(float $num) : float
{
}<?php 

/**
 * @refcount 1
 * @compile-time-eval
 */
function array_flip(array $array) : array
{
}<?php 

/**
 * @compile-time-eval
 */
function str_split(string $string, int $length = 1) : array
{
}<?php 

function count(\Countable|array $value, int $mode = COUNT_NORMAL) : int
{
}<?php 

function ob_get_clean() : string|false
{
}<?php 

/** @alias dns_check_record */
function checkdnsrr(string $hostname, string $type = "MX") : bool
{
}<?php 

/**
 * @param resource|null $context
 * @return resource|false
 */
function fopen(string $filename, string $mode, bool $use_include_path = false, $context = null)
{
}<?php 

/** @param resource|null $dir_handle */
function readdir($dir_handle = null) : string|false
{
}<?php 

/* iptc.c */
function iptcembed(string $iptc_data, string $filename, int $spool = 0) : string|bool
{
}<?php 

function array_merge_recursive(array ...$arrays) : array
{
}<?php 

function atanh(float $num) : float
{
}<?php 

/**
 * @param resource $stream
 * @alias stream_set_timeout
 */
function socket_set_timeout($stream, int $seconds, int $microseconds = 0) : bool
{
}<?php 

function random_int(int $min, int $max) : int
{
}<?php 

function array_shift(array &$array) : mixed
{
}<?php 

#endif
function strcoll(string $string1, string $string2) : int
{
}<?php 

/* password.c */
/**
 * @refcount 1
 */
function password_get_info(string $hash) : array
{
}<?php 

/**
 * @param int $error_code
 * @param string $error_message
 * @return resource|false
 */
function pfsockopen(string $hostname, int $port = -1, &$error_code = null, &$error_message = null, ?float $timeout = null)
{
}<?php 

#[\Until('8.2')]
function phpcredits(int $flags = CREDITS_ALL) : bool
{
}
#[\Since('8.2')]
function phpcredits(int $flags = CREDITS_ALL) : true
{
}<?php 

function escapeshellarg(string $arg) : string
{
}<?php 

function strcspn(string $string, string $characters, int $offset = 0, ?int $length = null) : int
{
}<?php 

#endif
function get_current_user() : string
{
}<?php 

function convert_uudecode(string $string) : string|false
{
}<?php 

/** @alias floatval */
function doubleval(mixed $value) : float
{
}<?php 

#[\Until('8.2')]
function closelog() : bool
{
}
#[\Since('8.2')]
function closelog() : true
{
}<?php 

function move_uploaded_file(string $from, string $to) : bool
{
}<?php 

function nl2br(string $string, bool $use_xhtml = true) : string
{
}<?php 

function is_object(mixed $value) : bool
{
}<?php 

function hex2bin(string $string) : string|false
{
}<?php 

function sapi_windows_cp_conv(int|string $in_codepage, int|string $out_codepage, string $subject) : ?string
{
}<?php 

/**
 * @param (resource | null) $context
 * @refcount 1
 */
function scandir(string $directory, int $sorting_order = SCANDIR_SORT_ASCENDING, $context = null) : array|false
{
}<?php 

#[\Until('8.2')]
function krsort(array &$array, int $flags = SORT_REGULAR) : bool
{
}
#[\Since('8.2')]
function krsort(array &$array, int $flags = SORT_REGULAR) : true
{
}<?php 

function floor(int|float $num) : float
{
}<?php 

/**
 * @refcount 1
 */
function ob_list_handlers() : array
{
}<?php 

function floatval(mixed $value) : float
{
}<?php 

function ceil(int|float $num) : float
{
}<?php 

function atan2(float $y, float $x) : float
{
}<?php 

#[\Until('8.2')]
function array_walk(array|object &$array, callable $callback, mixed $arg = UNKNOWN) : bool
{
}
#[\Since('8.2')]
function array_walk(array|object &$array, callable $callback, mixed $arg = UNKNOWN) : true
{
}<?php 

function array_fill(int $start_index, int $count, mixed $value) : array
{
}<?php 

#ifdef HAVE_GLOB
/**
 * @refcount 1
 */
function glob(string $pattern, int $flags = 0) : array|false
{
}<?php 

/* uuencode.c */
function convert_uuencode(string $string) : string
{
}<?php 

function realpath(string $path) : string|false
{
}<?php 

function trim(string $string, string $characters = " \n\r\t\v\x00") : string
{
}<?php 

function tanh(float $num) : float
{
}<?php 

/**
 * @param (array | string) $var_name
 * @param (array | string) $var_names
 * @refcount 1
 */
function compact($var_name, ...$var_names) : array
{
}<?php 

function str_contains(string $haystack, string $needle) : bool
{
}<?php 

#[\Until('8.2')]
function ksort(array &$array, int $flags = SORT_REGULAR) : bool
{
}
#[\Since('8.2')]
function ksort(array &$array, int $flags = SORT_REGULAR) : true
{
}<?php 

/** @param resource $socket */
function stream_socket_sendto($socket, string $data, int $flags = 0, string $address = "") : int|false
{
}<?php 

function is_bool(mixed $value) : bool
{
}<?php 

function call_user_func(callable $callback, mixed ...$args) : mixed
{
}<?php 

/** @alias count */
function sizeof(\Countable|array $value, int $mode = COUNT_NORMAL) : int
{
}<?php 

/** @param array|callable $rest */
function array_uintersect_assoc(array $array, ...$rest) : array
{
}<?php 

/** @param resource $stream */
function fclose($stream) : bool
{
}<?php 

/**
 * @refcount 1
 */
function gethostbynamel(string $hostname) : array|false
{
}<?php 

/**
 * @param resource $socket
 * @param float $timeout
 * @param string $peer_name
 * @return resource|false
 */
#[\Until('8.1')]
function stream_socket_accept($socket, ?float $timeout = null, &$peer_name = null)
{
}
/**
 * @param resource $socket
 * @param string $peer_name
 * @return resource|false
 * @refcount 1
 */
#[\Since('8.1')]
function stream_socket_accept($socket, ?float $timeout = null, &$peer_name = null)
{
}<?php 

function is_readable(string $filename) : bool
{
}<?php 

/* main/streams/userspace.c */
function stream_wrapper_register(string $protocol, string $class, int $flags = 0) : bool
{
}<?php 

function is_dir(string $filename) : bool
{
}<?php 

/** @param resource $stream */
function stream_set_read_buffer($stream, int $size) : int
{
}<?php 

function fdiv(float $num1, float $num2) : float
{
}<?php 

function array_replace_recursive(array $array, array ...$replacements) : array
{
}<?php 

/**
 * @refcount 1
 */
function parse_ini_file(string $filename, bool $process_sections = false, int $scanner_mode = INI_SCANNER_NORMAL) : array|false
{
}<?php 

function rand(int $min = UNKNOWN, int $max = UNKNOWN) : int
{
}<?php 

/** @alias is_writable */
function is_writeable(string $filename) : bool
{
}<?php 

/** @param resource $connection */
function oci_close($connection) : ?bool
{
}<?php 

/** @param resource $connection */
function oci_set_call_timeout($connection, int $timeout) : bool
{
}<?php 

/**
 * @alias oci_lob_export
 * @deprecated
 */
function ociwritelobtofile(\OCILob $lob, string $filename, ?int $offset = null, ?int $length = null) : bool
{
}<?php 

/** @param resource $statement */
function oci_set_prefetch($statement, int $rows) : bool
{
}<?php 

/**
 * @param resource $statement
 * @alias oci_free_statement
 * @deprecated
 */
function ocifreestatement($statement) : bool
{
}<?php 

function oci_collection_append(\OCICollection $collection, string $value) : bool
{
}<?php 

/**
 * @alias oci_collection_max
 * @deprecated
 */
function ocicollmax(\OCICollection $collection) : int|false
{
}<?php 

/** @param resource $connection */
function oci_set_action($connection, string $action) : bool
{
}<?php 

/** @param resource $statement */
function oci_field_type_raw($statement, string|int $column) : int|false
{
}<?php 

function oci_lob_size(\OCILob $lob) : int|false
{
}<?php 

/** @param resource $connection */
function oci_set_client_identifier($connection, string $client_id) : bool
{
}<?php 

/** @param resource $connection */
function oci_set_db_operation($connection, string $action) : bool
{
}<?php 

function oci_lob_append(\OCILob $to, \OCILob $from) : bool
{
}<?php 

function oci_collection_trim(\OCICollection $collection, int $num) : bool
{
}<?php 

/** @param resource $statement */
function oci_free_statement($statement) : bool
{
}<?php 

/**
 * @return resource|false
 * @alias oci_new_connect
 * @deprecated
 */
function ocinlogon(string $username, string $password, ?string $connection_string = null, string $encoding = "", int $session_mode = OCI_DEFAULT)
{
}<?php 

/**
 * @param resource $statement
 * @alias oci_field_precision
 * @deprecated
 */
function ocicolumnprecision($statement, string|int $column) : int|false
{
}<?php 

/** @generate-function-entries */
/** @param resource $statement */
function oci_define_by_name($statement, string $column, mixed &$var, int $type = 0) : bool
{
}<?php 

/**
 * @param resource $connection
 * @alias oci_new_descriptor
 * @deprecated
 */
function ocinewdescriptor($connection, int $type = OCI_DTYPE_LOB) : ?\OCILob
{
}<?php 

/**
 * @param resource $statement
 * @alias oci_field_scale
 * @deprecated
 */
function ocicolumnscale($statement, string|int $column) : int|false
{
}<?php 

/** @param resource $statement */
function oci_bind_by_name($statement, string $param, mixed &$var, int $max_length = -1, int $type = 0) : bool
{
}<?php 

/**
 * @param resource $statement
 * @alias oci_free_statement
 * @deprecated
 */
function ocifreecursor($statement) : bool
{
}<?php 

/** @param resource $statement */
function oci_execute($statement, int $mode = OCI_COMMIT_ON_SUCCESS) : bool
{
}<?php 

/** @param resource $statement */
function oci_field_type($statement, string|int $column) : string|int|false
{
}<?php 

function oci_lob_erase(\OCILob $lob, ?int $offset = null, ?int $length = null) : int|false
{
}<?php 

/** @param resource $connection */
function oci_new_descriptor($connection, int $type = OCI_DTYPE_LOB) : ?\OCILob
{
}<?php 

/** @return resource|false */
function oci_pconnect(string $username, string $password, ?string $connection_string = null, string $encoding = "", int $session_mode = OCI_DEFAULT)
{
}<?php 

/** @param resource $connection */
function oci_commit($connection) : bool
{
}<?php 

/**
 * @param resource $connection
 * @return resource|false
 */
function oci_new_cursor($connection)
{
}<?php 

function oci_lob_copy(\OCILob $to, \OCILob $from, ?int $length = null) : bool
{
}<?php 

/**
 * @param (resource | null) $connection_or_statement
 * @refcount 1
 */
function oci_error($connection_or_statement = null) : array|false
{
}<?php 

/**
 * @param resource $statement
 * @alias oci_free_statement
 */
function oci_free_cursor($statement) : bool
{
}<?php 

/**
 * @param resource $statement
 * @alias oci_field_name
 * @deprecated
 */
function ocicolumnname($statement, string|int $column) : string|false
{
}<?php 

/**
 * @param (resource | null) $connection_or_statement
 * @alias oci_error
 * @deprecated
 */
function ocierror($connection_or_statement = null) : array|false
{
}<?php 

/**
 * @param resource $connection
 * @alias oci_server_version
 * @deprecated
 */
function ociserverversion($connection) : string|false
{
}<?php 

function oci_lob_seek(\OCILob $lob, int $offset, int $whence = OCI_SEEK_SET) : bool
{
}<?php 

function oci_lob_truncate(\OCILob $lob, int $length = 0) : bool
{
}<?php 

/** @param resource $statement */
function oci_num_rows($statement) : int|false
{
}<?php 

function oci_free_descriptor(\OCILob $lob) : bool
{
}<?php 

function oci_lob_eof(\OCILob $lob) : bool
{
}<?php 

/** @param resource $statement */
function oci_fetch_array($statement, int $mode = OCI_BOTH | OCI_RETURN_NULLS) : array|false
{
}<?php 

/**
 * @param resource|string $connection
 * @return resource|bool
 */
function oci_password_change($connection, string $username, string $old_password, string $new_password)
{
}<?php 

function oci_collection_element_assign(\OCICollection $collection, int $index, string $value) : bool
{
}<?php 

/**
 * @alias oci_collection_element_get
 * @deprecated
 */
function ocicollgetelem(\OCICollection $collection, int $index) : string|float|null|false
{
}<?php 

/** @param resource $statement */
#[\Since('8.2')]
function oci_set_prefetch_lob($statement, int $prefetch_lob_size) : bool
{
}<?php 

/**
 * @alias oci_collection_trim
 * @deprecated
 */
function ocicolltrim(\OCICollection $collection, int $num) : bool
{
}<?php 

/** @param resource $statement */
function oci_cancel($statement) : bool
{
}<?php 

/**
 * @param resource $connection
 * @alias oci_new_collection
 * @deprecated
 */
function ocinewcollection($connection, string $type_name, ?string $schema = null) : \OCICollection|false
{
}<?php 

/**
 * @param resource $statement
 * @alias oci_num_rows
 * @deprecated
 */
function ocirowcount($statement) : int|false
{
}<?php 

/**
 * @return resource|false
 * @alias oci_connect
 * @deprecated
 */
function ocilogon(string $username, string $password, ?string $connection_string = null, string $encoding = "", int $session_mode = OCI_DEFAULT)
{
}<?php 

/**
 * @param resource $connection
 * @alias oci_close
 * @deprecated
 */
function ocilogoff($connection) : ?bool
{
}<?php 

function oci_collection_assign(\OCICollection $to, \OCICollection $from) : bool
{
}<?php 

class OCICollection
{
    /**
     * @alias oci_free_collection
     * @tentative-return-type
     * @return bool
     */
    public function free()
    {
    }
    /**
     * @alias oci_collection_append
     * @tentative-return-type
     * @return bool
     */
    public function append(string $value)
    {
    }
    /**
     * @alias oci_collection_element_get
     * @tentative-return-type
     * @return (string | float | null | false)
     */
    public function getElem(int $index)
    {
    }
    /**
     * @alias oci_collection_assign
     * @tentative-return-type
     * @return bool
     */
    public function assign(OCICollection $from)
    {
    }
    /**
     * @alias oci_collection_element_assign
     * @tentative-return-type
     * @return bool
     */
    public function assignElem(int $index, string $value)
    {
    }
    /**
     * @alias oci_collection_size
     * @tentative-return-type
     * @return (int | false)
     */
    public function size()
    {
    }
    /**
     * @alias oci_collection_max
     * @tentative-return-type
     * @return (int | false)
     */
    public function max()
    {
    }
    /**
     * @alias oci_collection_trim
     * @tentative-return-type
     * @return bool
     */
    public function trim(int $num)
    {
    }
}<?php 

/**
 * @alias oci_collection_element_assign
 * @deprecated
 */
function ocicollassignelem(\OCICollection $collection, int $index, string $value) : bool
{
}<?php 

function oci_collection_max(\OCICollection $collection) : int|false
{
}<?php 

/** @param resource $statement */
function oci_field_scale($statement, string|int $column) : int|false
{
}<?php 

/**
 * @param resource $statement
 * @alias oci_field_is_null
 * @deprecated
 */
function ocicolumnisnull($statement, string|int $column) : bool
{
}<?php 

/**
 * @param resource $statement
 * @alias oci_num_fields
 * @deprecated
 */
function ocinumcols($statement) : int
{
}<?php 

/** @param resource $statement */
function oci_fetch_assoc($statement) : array|false
{
}<?php 

/**
 * @param resource $connection
 * @alias oci_commit
 * @deprecated
 */
function ocicommit($connection) : bool
{
}<?php 

function oci_lob_flush(\OCILob $lob, int $flag = 0) : bool
{
}<?php 

/** @param resource $connection */
function oci_register_taf_callback($connection, ?callable $callback) : bool
{
}<?php 

/**
 * @alias oci_collection_size
 * @deprecated
 */
function ocicollsize(\OCICollection $collection) : int|false
{
}<?php 

function oci_lob_rewind(\OCILob $lob) : bool
{
}<?php 

/**
 * @param resource $statement
 * @alias oci_result
 * @deprecated
 */
function ociresult($statement, string|int $column) : mixed
{
}<?php 

/**
 * @alias oci_free_collection
 * @deprecated
 */
function ocifreecollection(\OCICollection $collection) : bool
{
}<?php 

/** @param resource $statement */
function oci_field_is_null($statement, string|int $column) : bool
{
}<?php 

function oci_lob_load(\OCILob $lob) : string|false
{
}<?php 

class OCILob
{
    /**
     * @alias oci_lob_save
     * @tentative-return-type
     * @return bool
     */
    public function save(string $data, int $offset = 0)
    {
    }
    /**
     * @alias oci_lob_import
     * @tentative-return-type
     * @return bool
     */
    public function import(string $filename)
    {
    }
    /**
     * @alias oci_lob_import
     * @tentative-return-type
     * @return bool
     */
    public function saveFile(string $filename)
    {
    }
    /**
     * @alias oci_lob_load
     * @tentative-return-type
     * @return (string | false)
     */
    public function load()
    {
    }
    /**
     * @alias oci_lob_read
     * @tentative-return-type
     * @return (string | false)
     */
    public function read(int $length)
    {
    }
    /**
     * @alias oci_lob_eof
     * @tentative-return-type
     * @return bool
     */
    public function eof()
    {
    }
    /**
     * @alias oci_lob_tell
     * @tentative-return-type
     * @return (int | false)
     */
    public function tell()
    {
    }
    /**
     * @alias oci_lob_rewind
     * @tentative-return-type
     * @return bool
     */
    public function rewind()
    {
    }
    /**
     * @alias oci_lob_seek
     * @tentative-return-type
     * @return bool
     */
    public function seek(int $offset, int $whence = OCI_SEEK_SET)
    {
    }
    /**
     * @alias oci_lob_size
     * @tentative-return-type
     * @return (int | false)
     */
    public function size()
    {
    }
    /**
     * @alias oci_lob_write
     * @tentative-return-type
     * @return (int | false)
     */
    public function write(string $data, ?int $length = null)
    {
    }
    /**
     * @alias oci_lob_append
     * @tentative-return-type
     * @return bool
     */
    public function append(OCILob $from)
    {
    }
    /**
     * @alias oci_lob_truncate
     * @tentative-return-type
     * @return bool
     */
    public function truncate(int $length = 0)
    {
    }
    /**
     * @alias oci_lob_erase
     * @tentative-return-type
     * @return (int | false)
     */
    public function erase(?int $offset = null, ?int $length = null)
    {
    }
    /**
     * @alias oci_lob_flush
     * @return bool
     */
    public function flush(int $flag = 0) : bool
    {
    }
    /**
     * @alias ocisetbufferinglob
     * @tentative-return-type
     * @return bool
     */
    public function setBuffering(bool $mode)
    {
    }
    /**
     * @alias ocigetbufferinglob
     * @tentative-return-type
     * @return bool
     */
    public function getBuffering()
    {
    }
    /**
     * @alias oci_lob_export
     * @tentative-return-type
     * @return bool
     */
    public function writeToFile(string $filename, ?int $offset = null, ?int $length = null)
    {
    }
    /**
     * @alias oci_lob_export
     * @tentative-return-type
     * @return bool
     */
    public function export(string $filename, ?int $offset = null, ?int $length = null)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function writeTemporary(string $data, int $type = OCI_TEMP_CLOB)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function close()
    {
    }
    /**
     * @alias oci_free_descriptor
     * @tentative-return-type
     * @return bool
     */
    public function free()
    {
    }
}<?php 

/**
 * @return resource|false
 */
function oci_connect(string $username, string $password, ?string $connection_string = null, string $encoding = "", int $session_mode = OCI_DEFAULT)
{
}<?php 

/**
 * @param resource $statement
 * @alias oci_field_size
 * @deprecated
 */
function ocicolumnsize($statement, string|int $column) : int|false
{
}<?php 

/** @param resource $statement */
function oci_statement_type($statement) : string|false
{
}<?php 

/**
 * @param resource $connection
 * @return resource|false
 * @alias oci_new_cursor
 * @deprecated
 */
function ocinewcursor($connection)
{
}<?php 

/** @param resource $connection */
function oci_unregister_taf_callback($connection) : bool
{
}<?php 

/**
 * @param resource $statement
 * @alias oci_field_type
 * @deprecated
 */
function ocicolumntype($statement, string|int $column) : string|int|false
{
}<?php 

/**
 * @param resource $statement
 * @param array $output
 */
function oci_fetch_all($statement, &$output, int $offset = 0, int $limit = -1, int $flags = OCI_FETCHSTATEMENT_BY_COLUMN | OCI_ASSOC) : int
{
}<?php 

/**
 * @param resource|string $connection
 * @return resource|bool
 * @alias oci_password_change
 * @deprecated
 */
function ocipasswordchange($connection, string $username, string $old_password, string $new_password)
{
}<?php 

/** @param resource $connection */
function oci_server_version($connection) : string|false
{
}<?php 

/** @param resource $statement */
function oci_fetch_object($statement, int $mode = OCI_ASSOC | OCI_RETURN_NULLS) : \stdClass|false
{
}<?php 

/** @param resource $statement */
function oci_fetch_row($statement) : array|false
{
}<?php 

/** @param resource $statement */
function oci_num_fields($statement) : int
{
}<?php 

/**
 * @param resource $connection
 * @return resource|false
 */
function oci_parse($connection, string $sql)
{
}<?php 

/**
 * @param resource $statement
 * @alias oci_fetch
 * @deprecated
 */
function ocifetch($statement) : bool
{
}<?php 

/**
 * @alias oci_free_descriptor
 * @deprecated
 */
function ocifreedesc(\OCILob $lob) : bool
{
}<?php 

/**
 * @param resource $statement
 * @alias oci_execute
 * @deprecated
 */
function ociexecute($statement, int $mode = OCI_COMMIT_ON_SUCCESS) : bool
{
}<?php 

/**
 * @param resource $statement
 * @param array $output
 * @alias oci_fetch_all
 * @deprecated
 */
function ocifetchstatement($statement, &$output, int $offset = 0, int $limit = -1, int $flags = OCI_FETCHSTATEMENT_BY_COLUMN | OCI_ASSOC) : int
{
}<?php 

/**
 * @alias oci_lob_load
 * @deprecated
 */
function ociloadlob(\OCILob $lob) : string|false
{
}<?php 

/**
 * @param resource $statement
 * @alias oci_bind_by_name
 * @deprecated
 */
function ocibindbyname($statement, string $param, mixed &$var, int $max_length = -1, int $type = 0) : bool
{
}<?php 

function oci_lob_write(\OCILob $lob, string $data, ?int $length = null) : int|false
{
}<?php 

/**
 * @param resource $statement
 * @alias oci_cancel
 * @deprecated
 */
function ocicancel($statement) : bool
{
}<?php 

/** @param resource $statement */
function oci_field_precision($statement, string|int $column) : int|false
{
}<?php 

function oci_lob_import(\OCILob $lob, string $filename) : bool
{
}<?php 

/**
 * @param resource $statement
 * @alias oci_define_by_name
 * @deprecated
 */
function ocidefinebyname($statement, string $column, mixed &$var, int $type = 0) : bool
{
}<?php 

/**
 * @alias oci_lob_import
 * @deprecated
 */
function ocisavelobfile(\OCILob $lob, string $filename) : bool
{
}<?php 

/** @param resource $statement */
function oci_field_size($statement, string|int $column) : int|false
{
}<?php 

/** @param resource $connection */
function oci_new_collection($connection, string $type_name, ?string $schema = null) : \OCICollection|false
{
}<?php 

function oci_client_version() : string
{
}<?php 

function oci_collection_size(\OCICollection $collection) : int|false
{
}<?php 

/**
 * @param resource $connection
 */
function oci_set_client_info($connection, string $client_info) : bool
{
}<?php 

/** @param resource $connection */
function oci_rollback($connection) : bool
{
}<?php 

function ocisetbufferinglob(\OCILob $lob, bool $mode) : bool
{
}<?php 

function oci_lob_tell(\OCILob $lob) : int|false
{
}<?php 

/** @param resource $connection */
function oci_set_module_name($connection, string $name) : bool
{
}<?php 

function oci_set_edition(string $edition) : bool
{
}<?php 

function oci_lob_export(\OCILob $lob, string $filename, ?int $offset = null, ?int $length = null) : bool
{
}<?php 

/**
 * @param resource $statement
 * @param array $result
 * @deprecated
 */
function ocifetchinto($statement, &$result, int $mode = OCI_NUM) : int|false
{
}<?php 

/**
 * @alias oci_collection_append
 * @deprecated
 */
function ocicollappend(\OCICollection $collection, string $value) : bool
{
}<?php 

/**
 * @return resource|false
 * @alias oci_pconnect
 * @deprecated
 */
function ociplogon(string $username, string $password, ?string $connection_string = null, string $encoding = "", int $session_mode = OCI_DEFAULT)
{
}<?php 

function oci_free_collection(\OCICollection $collection) : bool
{
}<?php 

/** @return resource|false */
function oci_new_connect(string $username, string $password, ?string $connection_string = null, string $encoding = "", int $session_mode = OCI_DEFAULT)
{
}<?php 

/** @param resource $statement */
function oci_fetch($statement) : bool
{
}<?php 

function ocigetbufferinglob(\OCILob $lob) : bool
{
}<?php 

/**
 * @param resource $statement
 * @alias oci_statement_type
 * @deprecated
 */
function ocistatementtype($statement) : string|false
{
}<?php 

function oci_lob_save(\OCILob $lob, string $data, int $offset = 0) : bool
{
}<?php 

/**
 * @param resource $statement
 * @param array $var
 */
function oci_bind_array_by_name($statement, string $param, &$var, int $max_array_length, int $max_item_length = -1, int $type = SQLT_AFC) : bool
{
}<?php 

function oci_collection_element_get(\OCICollection $collection, int $index) : string|float|null|false
{
}<?php 

/** @param resource $statement */
function oci_field_name($statement, string|int $column) : string|false
{
}<?php 

/**
 * @alias oci_lob_save
 * @deprecated
 */
function ocisavelob(\OCILob $lob, string $data, int $offset = 0) : bool
{
}<?php 

/**
 * @param resource $statement
 * @alias oci_set_prefetch
 * @deprecated
 */
function ocisetprefetch($statement, int $rows) : bool
{
}<?php 

/**
 * @param resource $connection
 * @alias oci_rollback
 * @deprecated
 */
function ocirollback($connection) : bool
{
}<?php 

/** @param resource $statement */
function oci_result($statement, string|int $column) : mixed
{
}<?php 

function oci_lob_read(\OCILob $lob, int $length) : string|false
{
}<?php 

/**
 * @param resource $statement
 * @alias oci_field_type_raw
 * @deprecated
 */
function ocicolumntyperaw($statement, string|int $column) : int|false
{
}<?php 

/**
 * @param resource $statement
 * @return resource|false
 */
function oci_get_implicit_resultset($statement)
{
}<?php 

function oci_lob_is_equal(\OCILob $lob1, \OCILob $lob2) : bool
{
}<?php 

/**
 * @param resource $connection
 * @return resource|false
 * @alias oci_parse
 * @deprecated
 */
function ociparse($connection, string $sql)
{
}<?php 

function imagesetstyle(\GdImage $image, array $style) : bool
{
}<?php 

function imageopenpolygon(\GdImage $image, array $points, int $num_points_or_color, ?int $color = null) : bool
{
}<?php 

function imagetruecolortopalette(\GdImage $image, bool $dither, int $num_colors) : bool
{
}<?php 

function imagecopy(\GdImage $dst_image, \GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height) : bool
{
}<?php 

function imagecropauto(\GdImage $image, int $mode = IMG_CROP_DEFAULT, float $threshold = 0.5, int $color = -1) : \GdImage|false
{
}<?php 

#[\Until('8.1')]
function imageloadfont(string $filename) : int|false
{
}
#[\Since('8.1')]
function imageloadfont(string $filename) : \GdFont|false
{
}<?php 

#ifdef HAVE_GD_AVIF
/** @refcount 1 */
#[\Since('8.1')]
function imagecreatefromavif(string $filename) : \GdImage|false
{
}<?php 

function imageconvolution(\GdImage $image, array $matrix, float $divisor, float $offset) : bool
{
}<?php 

function imagecreate(int $width, int $height) : \GdImage|false
{
}<?php 

function imagecolorresolvealpha(\GdImage $image, int $red, int $green, int $blue, int $alpha) : int
{
}<?php 

function imagecolormatch(\GdImage $image1, \GdImage $image2) : bool
{
}<?php 

function imagecolorexactalpha(\GdImage $image, int $red, int $green, int $blue, int $alpha) : int
{
}<?php 

function imagefilledarc(\GdImage $image, int $center_x, int $center_y, int $width, int $height, int $start_angle, int $end_angle, int $color, int $style) : bool
{
}<?php 

function imagesetpixel(\GdImage $image, int $x, int $y, int $color) : bool
{
}<?php 

function imagecopymergegray(\GdImage $dst_image, \GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height, int $pct) : bool
{
}<?php 

function imagecopymerge(\GdImage $dst_image, \GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height, int $pct) : bool
{
}<?php 

function imagedashedline(\GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color) : bool
{
}<?php 

function imagecolorallocatealpha(\GdImage $image, int $red, int $green, int $blue, int $alpha) : int|false
{
}<?php 

function imagefilledpolygon(\GdImage $image, array $points, int $num_points_or_color, ?int $color = null) : bool
{
}<?php 

function imagesetbrush(\GdImage $image, \GdImage $brush) : bool
{
}<?php 

/**
 * @alias imageftbbox
 */
function imagettfbbox(float $size, float $angle, string $font_filename, string $string, array $options = []) : array|false
{
}<?php 

function imagecopyresampled(\GdImage $dst_image, \GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_width, int $dst_height, int $src_width, int $src_height) : bool
{
}<?php 

function imagesetinterpolation(\GdImage $image, int $method = IMG_BILINEAR_FIXED) : bool
{
}<?php 

function imagecolorexact(\GdImage $image, int $red, int $green, int $blue) : int
{
}<?php 

#endif
function imagedestroy(\GdImage $image) : bool
{
}<?php 

#endif
#ifdef HAVE_GD_WEBP
/** @param resource|string|null $file */
function imagewebp(\GdImage $image, $file = null, int $quality = -1) : bool
{
}<?php 

function imagesy(\GdImage $image) : int
{
}<?php 

/**
 * @refcount 1
 */
function imagegetclip(\GdImage $image) : array
{
}<?php 

function imagecreatefromgd(string $filename) : \GdImage|false
{
}<?php 

#endif
#ifdef HAVE_GD_PNG
function imagecreatefrompng(string $filename) : \GdImage|false
{
}<?php 

function imagegd2(\GdImage $image, ?string $file = null, int $chunk_size = UNKNOWN, int $mode = UNKNOWN) : bool
{
}<?php 

function imagefill(\GdImage $image, int $x, int $y, int $color) : bool
{
}<?php 

#ifdef HAVE_GD_XPM
function imagecreatefromxpm(string $filename) : \GdImage|false
{
}<?php 

#[\Until('8.1')]
function imagestringup(\GdImage $image, int $font, int $x, int $y, string $string, int $color) : bool
{
}
#[\Since('8.1')]
function imagestringup(\GdImage $image, \GdFont|int $font, int $x, int $y, string $string, int $color) : bool
{
}<?php 

function imageflip(\GdImage $image, int $mode) : bool
{
}<?php 

#endif
function imagecreatefromxbm(string $filename) : \GdImage|false
{
}<?php 

#ifdef HAVE_GD_BMP
function imagecreatefrombmp(string $filename) : \GdImage|false
{
}<?php 

function imageinterlace(\GdImage $image, ?bool $enable = null) : bool
{
}<?php 

#[\Until('8.1')]
function imagefontwidth(int $font) : int
{
}
#[\Since('8.1')]
function imagefontwidth(\GdFont|int $font) : int
{
}<?php 

#endif
// TODO: $ignore_transparent is ignored???
function imagerotate(\GdImage $image, float $angle, int $background_color, bool $ignore_transparent = false) : \GdImage|false
{
}<?php 

function imagecolorallocate(\GdImage $image, int $red, int $green, int $blue) : int|false
{
}<?php 

/**
 * @strict-properties
 * @not-serializable
 */
#[\Since('8.1')]
final class GdFont
{
}<?php 

#[\Until('8.1')]
function imagestring(\GdImage $image, int $font, int $x, int $y, string $string, int $color) : bool
{
}
#[\Since('8.1')]
function imagestring(\GdImage $image, \GdFont|int $font, int $x, int $y, string $string, int $color) : bool
{
}<?php 

function imagesavealpha(\GdImage $image, bool $enable) : bool
{
}<?php 

function imageaffine(\GdImage $image, array $affine, ?array $clip = null) : \GdImage|false
{
}<?php 

function imagecreatetruecolor(int $width, int $height) : \GdImage|false
{
}<?php 

#ifdef PHP_WIN32
function imagegrabwindow(int $handle, bool $client_area = false) : \GdImage|false
{
}<?php 

function imagecreatefromstring(string $data) : \GdImage|false
{
}<?php 

/**
 * @refcount 1
 */
function imagefttext(\GdImage $image, float $size, float $angle, int $x, int $y, int $color, string $font_filename, string $text, array $options = []) : array|false
{
}<?php 

#[\Until('8.1')]
function imagefontheight(int $font) : int
{
}
#[\Since('8.1')]
function imagefontheight(\GdFont|int $font) : int
{
}<?php 

function imagegammacorrect(\GdImage $image, float $input_gamma, float $output_gamma) : bool
{
}<?php 

#endif
/** @param array|int|float|bool $args */
function imagefilter(\GdImage $image, int $filter, ...$args) : bool
{
}<?php 

#endif
function imagexbm(\GdImage $image, ?string $filename, ?int $foreground_color = null) : bool
{
}<?php 

/**
 * @refcount 1
 */
function gd_info() : array
{
}<?php 

function imagecopyresized(\GdImage $dst_image, \GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_width, int $dst_height, int $src_width, int $src_height) : bool
{
}<?php 

function imagecolordeallocate(\GdImage $image, int $color) : bool
{
}<?php 

function imageistruecolor(\GdImage $image) : bool
{
}<?php 

function imagesettile(\GdImage $image, \GdImage $tile) : bool
{
}<?php 

/** @generate-function-entries */
final class GdImage
{
}<?php 

function imagegd(\GdImage $image, ?string $file = null) : bool
{
}<?php 

function imagescale(\GdImage $image, int $width, int $height = -1, int $mode = IMG_BILINEAR_FIXED) : \GdImage|false
{
}<?php 

#endif
function imagecreatefromwbmp(string $filename) : \GdImage|false
{
}<?php 

function imagecolorat(\GdImage $image, int $x, int $y) : int|false
{
}<?php 

/**
 * @refcount 1
 */
function imageresolution(\GdImage $image, ?int $resolution_x = null, ?int $resolution_y = null) : array|bool
{
}<?php 

/** @param resource|string|null $file */
function imagegif(\GdImage $image, $file = null) : bool
{
}<?php 

function imagecolorclosesthwb(\GdImage $image, int $red, int $green, int $blue) : int
{
}<?php 

function imagepalettetotruecolor(\GdImage $image) : bool
{
}<?php 

function imagegetinterpolation(\GdImage $image) : int
{
}<?php 

#ifdef HAVE_GD_JPG
function imagecreatefromjpeg(string $filename) : \GdImage|false
{
}<?php 

function imagerectangle(\GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color) : bool
{
}<?php 

function imagegrabscreen() : \GdImage|false
{
}<?php 

#ifdef HAVE_GD_FREETYPE
/**
 * @refcount 1
 */
function imageftbbox(float $size, float $angle, string $font_filename, string $string, array $options = []) : array|false
{
}<?php 

#endif
#ifdef HAVE_GD_JPG
/** @param resource|string|null $file */
function imagejpeg(\GdImage $image, $file = null, int $quality = -1) : bool
{
}<?php 

function imagefilledellipse(\GdImage $image, int $center_x, int $center_y, int $width, int $height, int $color) : bool
{
}<?php 

/**
 * @alias imagefttext
 */
function imagettftext(\GdImage $image, float $size, float $angle, int $x, int $y, int $color, string $font_filename, string $text, array $options = []) : array|false
{
}<?php 

function imagesetthickness(\GdImage $image, int $thickness) : bool
{
}<?php 

#endif
#ifdef HAVE_GD_WEBP
function imagecreatefromwebp(string $filename) : \GdImage|false
{
}<?php 

function imagefilltoborder(\GdImage $image, int $x, int $y, int $border_color, int $color) : bool
{
}<?php 

function imageantialias(\GdImage $image, bool $enable) : bool
{
}<?php 

function imagefilledrectangle(\GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color) : bool
{
}<?php 

#ifdef HAVE_GD_PNG
/** @param resource|string|null $file */
function imagepng(\GdImage $image, $file = null, int $quality = -1, int $filters = -1) : bool
{
}<?php 

function imagecrop(\GdImage $image, array $rectangle) : \GdImage|false
{
}<?php 

function imageline(\GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color) : bool
{
}<?php 

function imagecolorresolve(\GdImage $image, int $red, int $green, int $blue) : int
{
}<?php 

#[\Until('8.1')]
function imagechar(\GdImage $image, int $font, int $x, int $y, string $char, int $color) : bool
{
}
#[\Since('8.1')]
function imagechar(\GdImage $image, \GdFont|int $font, int $x, int $y, string $char, int $color) : bool
{
}<?php 

function imagecreatefromgd2(string $filename) : \GdImage|false
{
}<?php 

function imagepolygon(\GdImage $image, array $points, int $num_points_or_color, ?int $color = null) : bool
{
}<?php 

#endif
#ifdef HAVE_GD_TGA
function imagecreatefromtga(string $filename) : \GdImage|false
{
}<?php 

#ifdef HAVE_GD_BMP
/** @param resource|string|null $file */
function imagebmp(\GdImage $image, $file = null, bool $compressed = true) : bool
{
}<?php 

function imagepalettecopy(\GdImage $dst, \GdImage $src) : void
{
}<?php 

function imagecolortransparent(\GdImage $image, ?int $color = null) : int
{
}<?php 

function imagecolorstotal(\GdImage $image) : int
{
}<?php 

function imagecreatefromgd2part(string $filename, int $x, int $y, int $width, int $height) : \GdImage|false
{
}<?php 

#[\Until('8.2')]
function imagecolorset(\GdImage $image, int $color, int $red, int $green, int $blue, int $alpha = 0) : ?bool
{
}
#[\Since('8.2')]
function imagecolorset(\GdImage $image, int $color, int $red, int $green, int $blue, int $alpha = 0) : false|null
{
}<?php 

function imagesetclip(\GdImage $image, int $x1, int $y1, int $x2, int $y2) : bool
{
}<?php 

function imagearc(\GdImage $image, int $center_x, int $center_y, int $width, int $height, int $start_angle, int $end_angle, int $color) : bool
{
}<?php 

/**
 * @refcount 1
 */
function imageaffinematrixconcat(array $matrix1, array $matrix2) : array|false
{
}<?php 

/**
 * @refcount 1
 */
function imagecolorsforindex(\GdImage $image, int $color) : array
{
}<?php 

function imagecreatefromgif(string $filename) : \GdImage|false
{
}<?php 

function imagelayereffect(\GdImage $image, int $effect) : bool
{
}<?php 

function imagecolorclosestalpha(\GdImage $image, int $red, int $green, int $blue, int $alpha) : int
{
}<?php 

#ifdef HAVE_GD_AVIF
/** @param resource|string|null $file */
#[\Since('8.1')]
function imageavif(\GdImage $image, $file = null, int $quality = -1, int $speed = -1) : bool
{
}<?php 

function imagecolorclosest(\GdImage $image, int $red, int $green, int $blue) : int
{
}<?php 

#endif
/** @param resource|string|null $file */
function imagewbmp(\GdImage $image, $file = null, ?int $foreground_color = null) : bool
{
}<?php 

/**
 * @param (array | float) $options
 * @refcount 1
 */
function imageaffinematrixget(int $type, $options) : array|false
{
}<?php 

#[\Until('8.1')]
function imagecharup(\GdImage $image, int $font, int $x, int $y, string $char, int $color) : bool
{
}
#[\Since('8.1')]
function imagecharup(\GdImage $image, \GdFont|int $font, int $x, int $y, string $char, int $color) : bool
{
}<?php 

function imagealphablending(\GdImage $image, bool $enable) : bool
{
}<?php 

function imagesx(\GdImage $image) : int
{
}<?php 

function imagetypes() : int
{
}<?php 

function imageellipse(\GdImage $image, int $center_x, int $center_y, int $width, int $height, int $color) : bool
{
}<?php 

function variant_imp(mixed $left, mixed $right) : \variant
{
}<?php 

#endif
final class com_exception extends \exception
{
}<?php 

function variant_int(mixed $value) : \variant
{
}<?php 

#endif
#[\Since('8.1')]
final class com_safearray_proxy
{
}<?php 

function com_message_pump(int $timeout_milliseconds = 0) : bool
{
}<?php 

function com_get_active_object(string $prog_id, ?int $codepage = null) : \variant
{
}<?php 

#if HAVE_MSCOREE_H
class dotnet
{
    public function __construct(string $assembly_name, string $datatype_name, int $codepage = CP_ACP)
    {
    }
}<?php 

function variant_sub(mixed $left, mixed $right) : \variant
{
}<?php 

function variant_idiv(mixed $left, mixed $right) : \variant
{
}<?php 

function variant_not(mixed $value) : \variant
{
}<?php 

function variant_cmp(mixed $left, mixed $right, int $locale_id = LOCALE_SYSTEM_DEFAULT, int $flags = 0) : int
{
}<?php 

function variant_and(mixed $left, mixed $right) : \variant
{
}<?php 

function variant_cast(\variant $variant, int $type) : \variant
{
}<?php 

function variant_add(mixed $left, mixed $right) : \variant
{
}<?php 

function variant_mul(mixed $left, mixed $right) : \variant
{
}<?php 

function variant_pow(mixed $left, mixed $right) : \variant
{
}<?php 

/** @generate-function-entries */
function variant_set(\variant $variant, mixed $value) : void
{
}<?php 

function variant_fix(mixed $value) : \variant
{
}<?php 

function variant_abs(mixed $value) : \variant
{
}<?php 

function variant_div(mixed $left, mixed $right) : \variant
{
}<?php 

class com
{
    public function __construct(string $module_name, array|string|null $server_name = null, int $codepage = CP_ACP, string $typelib = "")
    {
    }
}<?php 

function variant_get_type(\variant $variant) : int
{
}<?php 

/** @generate-function-entries */
final class COMPersistHelper
{
    public function __construct(?variant $variant = null)
    {
    }
    public function GetCurFileName() : string|false
    {
    }
    public function SaveToFile(?string $filename, bool $remember = true) : bool
    {
    }
    public function LoadFromFile(string $filename, int $flags = 0) : bool
    {
    }
    public function GetMaxStreamSize() : int
    {
    }
    public function InitNew() : bool
    {
    }
    /** @param resource $stream */
    public function LoadFromStream($stream) : bool
    {
    }
    /** @param resource $stream */
    public function SaveToStream($stream) : bool
    {
    }
}<?php 

function variant_set_type(\variant $variant, int $type) : void
{
}<?php 

function variant_date_to_timestamp(\variant $variant) : ?int
{
}<?php 

function variant_eqv(mixed $left, mixed $right) : \variant
{
}<?php 

function com_create_guid() : string|false
{
}<?php 

function variant_xor(mixed $left, mixed $right) : \variant
{
}<?php 

function variant_mod(mixed $left, mixed $right) : \variant
{
}<?php 

function com_print_typeinfo(\variant|string $variant, ?string $dispatch_interface = null, bool $display_sink = false) : bool
{
}<?php 

function variant_cat(mixed $left, mixed $right) : \variant
{
}<?php 

function variant_or(mixed $left, mixed $right) : \variant
{
}<?php 

function variant_date_from_timestamp(int $timestamp) : \variant
{
}<?php 

function variant_neg(mixed $value) : \variant
{
}<?php 

function com_load_typelib(string $typelib, bool $case_insensitive = true) : bool
{
}<?php 

function variant_round(mixed $value, int $decimals) : ?\variant
{
}<?php 

class variant
{
    public function __construct(mixed $value = null, int $type = VT_EMPTY, int $codepage = CP_ACP)
    {
    }
}<?php 

function com_event_sink(\variant $variant, object $sink_object, array|string|null $sink_interface = null) : bool
{
}<?php 

function mysqli_stmt_data_seek(\mysqli_stmt $statement, int $offset) : void
{
}<?php 

function mysqli_commit(\mysqli $mysql, int $flags = 0, ?string $name = null) : bool
{
}<?php 

function mysqli_stmt_sqlstate(\mysqli_stmt $statement) : string
{
}<?php 

function mysqli_sqlstate(\mysqli $mysql) : string
{
}<?php 

function mysqli_stmt_field_count(\mysqli_stmt $statement) : int
{
}<?php 

function mysqli_get_client_info(?\mysqli $mysql = null) : string
{
}<?php 

function mysqli_get_warnings(\mysqli $mysql) : \mysqli_warning|false
{
}<?php 

/**
 * @refcount 1
 */
function mysqli_fetch_lengths(\mysqli_result $result) : array|false
{
}<?php 

function mysqli_warning_count(\mysqli $mysql) : int
{
}<?php 

/**
 * @refcount 1
 */
function mysqli_fetch_assoc(\mysqli_result $result) : array|null|false
{
}<?php 

function mysqli_stmt_errno(\mysqli_stmt $statement) : int
{
}<?php 

function mysqli_rollback(\mysqli $mysql, int $flags = 0, ?string $name = null) : bool
{
}<?php 

function mysqli_error(\mysqli $mysql) : string
{
}<?php 

final class mysqli_sql_exception extends \RuntimeException
{
    #[\Since('8.1')]
    public function getSqlState() : string
    {
    }
}<?php 

function mysqli_ping(\mysqli $mysql) : bool
{
}<?php 

function mysqli_set_charset(\mysqli $mysql, string $charset) : bool
{
}<?php 

function mysqli_info(\mysqli $mysql) : ?string
{
}<?php 

/**
 * @refcount 1
 */
function mysqli_stmt_error_list(\mysqli_stmt $statement) : array
{
}<?php 

/**
 * @param string|int $value
 * @alias mysqli_options
 */
function mysqli_set_opt(\mysqli $mysql, int $option, $value) : bool
{
}<?php 

function mysqli_query(\mysqli $mysql, string $query, int $result_mode = MYSQLI_STORE_RESULT) : \mysqli_result|bool
{
}<?php 

function mysqli_stmt_next_result(\mysqli_stmt $statement) : bool
{
}<?php 

function mysqli_real_escape_string(\mysqli $mysql, string $string) : string
{
}<?php 

function mysqli_report(int $flags) : bool
{
}<?php 

function mysqli_use_result(\mysqli $mysql) : \mysqli_result|false
{
}<?php 

function mysqli_refresh(\mysqli $mysql, int $flags) : bool
{
}<?php 

function mysqli_stmt_init(\mysqli $mysql) : \mysqli_stmt|false
{
}<?php 

final class mysqli_warning
{
    private function __construct()
    {
    }
    public function next() : bool
    {
    }
}<?php 

function mysqli_errno(\mysqli $mysql) : int
{
}<?php 

#if defined(MYSQLI_USE_MYSQLND)
function mysqli_stmt_get_result(\mysqli_stmt $statement) : \mysqli_result|false
{
}<?php 

#[\Until('8.2')]
function mysqli_debug(string $options) : bool
{
}
#[\Since('8.2')]
function mysqli_debug(string $options) : true
{
}<?php 

#if defined(MYSQLI_USE_MYSQLND)
function mysqli_reap_async_query(\mysqli $mysql) : \mysqli_result|bool
{
}<?php 

function mysqli_get_server_version(\mysqli $mysql) : int
{
}<?php 

function mysqli_store_result(\mysqli $mysql, int $mode = 0) : \mysqli_result|false
{
}<?php 

/** @param string|int $value */
function mysqli_options(\mysqli $mysql, int $option, $value) : bool
{
}<?php 

function mysqli_stmt_reset(\mysqli_stmt $statement) : bool
{
}<?php 

function mysqli_connect_errno() : int
{
}<?php 

function mysqli_num_rows(\mysqli_result $result) : int|string
{
}<?php 

/**
 * @refcount 1
 */
function mysqli_fetch_fields(\mysqli_result $result) : array
{
}<?php 

#endif
function mysqli_get_charset(\mysqli $mysql) : ?object
{
}<?php 

/** @alias mysqli_real_escape_string */
function mysqli_escape_string(\mysqli $mysql, string $string) : string
{
}<?php 

function mysqli_real_query(\mysqli $mysql, string $query) : bool
{
}<?php 

function mysqli_init() : \mysqli|false
{
}<?php 

function mysqli_field_tell(\mysqli_result $result) : int
{
}<?php 

function mysqli_get_host_info(\mysqli $mysql) : string
{
}<?php 

function mysqli_affected_rows(\mysqli $mysql) : int|string
{
}<?php 

function mysqli_connect_error() : ?string
{
}<?php 

function mysqli_stmt_affected_rows(\mysqli_stmt $statement) : int|string
{
}<?php 

function mysqli_savepoint(\mysqli $mysql, string $name) : bool
{
}<?php 

function mysqli_select_db(\mysqli $mysql, string $database) : bool
{
}<?php 

#if defined(MYSQLI_USE_MYSQLND)
function mysqli_poll(?array &$read, ?array &$error, array &$reject, int $seconds, int $microseconds = 0) : int|false
{
}<?php 

function mysqli_stmt_send_long_data(\mysqli_stmt $statement, int $param_num, string $data) : bool
{
}<?php 

function mysqli_fetch_object(\mysqli_result $result, string $class = "stdClass", array $constructor_args = []) : object|null|false
{
}<?php 

function mysqli_stmt_result_metadata(\mysqli_stmt $statement) : \mysqli_result|false
{
}<?php 

function mysqli_get_proto_info(\mysqli $mysql) : int
{
}<?php 

#if defined(MYSQLI_USE_MYSQLND)
function mysqli_stmt_more_results(\mysqli_stmt $statement) : bool
{
}<?php 

#endif
function mysqli_release_savepoint(\mysqli $mysql, string $name) : bool
{
}<?php 

function mysqli_fetch_field_direct(\mysqli_result $result, int $index) : object|false
{
}<?php 

#[\Until('8.2')]
function mysqli_stmt_close(\mysqli_stmt $statement) : bool
{
}
#[\Since('8.2')]
function mysqli_stmt_close(\mysqli_stmt $statement) : true
{
}<?php 

function mysqli_insert_id(\mysqli $mysql) : int|string
{
}<?php 

function mysqli_stmt_prepare(\mysqli_stmt $statement, string $query) : bool
{
}<?php 

function mysqli_character_set_name(\mysqli $mysql) : string
{
}<?php 

function mysqli_stmt_attr_set(\mysqli_stmt $statement, int $attribute, int $value) : bool
{
}<?php 

function mysqli_stmt_attr_get(\mysqli_stmt $statement, int $attribute) : int
{
}<?php 

function mysqli_kill(\mysqli $mysql, int $process_id) : bool
{
}<?php 

#[\Until('8.2')]
function mysqli_close(\mysqli $mysql) : bool
{
}
#[\Since('8.2')]
function mysqli_close(\mysqli $mysql) : true
{
}<?php 

function mysqli_stmt_param_count(\mysqli_stmt $statement) : int
{
}<?php 

function mysqli_free_result(\mysqli_result $result) : void
{
}<?php 

#endif
function mysqli_prepare(\mysqli $mysql, string $query) : \mysqli_stmt|false
{
}<?php 

function mysqli_begin_transaction(\mysqli $mysql, int $flags = 0, ?string $name = null) : bool
{
}<?php 

#if defined(MYSQLI_USE_MYSQLND)
/**
 * @refcount 1
 */
function mysqli_get_connection_stats(\mysqli $mysql) : array
{
}<?php 

#[\Until('8.1')]
function mysqli_stmt_execute(\mysqli_stmt $statement) : bool
{
}
#[\Since('8.1')]
function mysqli_stmt_execute(\mysqli_stmt $statement, ?array $params = null) : bool
{
}<?php 

function mysqli_field_seek(\mysqli_result $result, int $index) : bool
{
}<?php 

function mysqli_fetch_field(\mysqli_result $result) : object|false
{
}<?php 

#if defined(MYSQLI_USE_MYSQLND)
/**
 * @refcount 1
 */
function mysqli_fetch_all(\mysqli_result $result, int $mode = MYSQLI_NUM) : array
{
}<?php 

function mysqli_field_count(\mysqli $mysql) : int
{
}<?php 

function mysqli_thread_id(\mysqli $mysql) : int
{
}<?php 

function mysqli_dump_debug_info(\mysqli $mysql) : bool
{
}<?php 

function mysqli_stat(\mysqli $mysql) : string|false
{
}<?php 

#endif
/**
 * @refcount 1
 */
function mysqli_fetch_array(\mysqli_result $result, int $mode = MYSQLI_BOTH) : array|null|false
{
}<?php 

function mysqli_stmt_bind_param(\mysqli_stmt $statement, string $types, mixed &...$vars) : bool
{
}<?php 

class mysqli_stmt
{
    /**
     * @tentative-return-type
     * @alias mysqli_stmt_execute
     * @return bool
     */
    #[\Until('8.1')]
    public function execute()
    {
    }
    public function __construct(mysqli $mysql, ?string $query = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_stmt_attr_get
     * @return int
     */
    public function attr_get(int $attribute)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_stmt_attr_set
     * @return bool
     */
    public function attr_set(int $attribute, int $value)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_stmt_bind_param
     * @return bool
     */
    public function bind_param(string $types, mixed &...$vars)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_stmt_bind_result
     * @return bool
     */
    public function bind_result(mixed &...$vars)
    {
    }
    /**
     * @return bool
     * @alias mysqli_stmt_close
     */
    public function close()
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_stmt_data_seek
     * @return void
     */
    public function data_seek(int $offset)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_stmt_execute
     */
    #[\Since('8.1')]
    public function execute(?array $params = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_stmt_fetch
     * @return (bool | null)
     */
    public function fetch()
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_stmt_get_warnings
     * @return (mysqli_warning | false)
     */
    public function get_warnings()
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_stmt_result_metadata
     * @return (mysqli_result | false)
     */
    public function result_metadata()
    {
    }
    #if defined(MYSQLI_USE_MYSQLND)
    /**
     * @tentative-return-type
     * @alias mysqli_stmt_more_results
     * @return bool
     */
    public function more_results()
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_stmt_next_result
     * @return bool
     */
    public function next_result()
    {
    }
    #endif
    /**
     * @tentative-return-type
     * @alias mysqli_stmt_num_rows
     * @return (int | string)
     */
    public function num_rows()
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_stmt_send_long_data
     * @return bool
     */
    public function send_long_data(int $param_num, string $data)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_stmt_free_result
     * @return void
     */
    public function free_result()
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_stmt_reset
     * @return bool
     */
    public function reset()
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_stmt_prepare
     * @return bool
     */
    public function prepare(string $query)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_stmt_store_result
     * @return bool
     */
    public function store_result()
    {
    }
    #if defined(MYSQLI_USE_MYSQLND)
    /**
     * @tentative-return-type
     * @alias mysqli_stmt_get_result
     * @return (mysqli_result | false)
     */
    public function get_result()
    {
    }
}<?php 

function mysqli_more_results(\mysqli $mysql) : bool
{
}<?php 

#[\Since('8.2')]
function mysqli_execute_query(\mysqli $mysql, string $query, ?array $params = null) : \mysqli_result|bool
{
}<?php 

function mysqli_stmt_free_result(\mysqli_stmt $statement) : void
{
}<?php 

function mysqli_stmt_fetch(\mysqli_stmt $statement) : ?bool
{
}<?php 

#endif
function mysqli_stmt_get_warnings(\mysqli_stmt $statement) : \mysqli_warning|false
{
}<?php 

function mysqli_stmt_bind_result(\mysqli_stmt $statement, mixed &...$vars) : bool
{
}<?php 

class mysqli_result implements \IteratorAggregate
{
    public function __construct(mysqli $mysql, int $result_mode = MYSQLI_STORE_RESULT)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_free_result
     * @return void
     */
    public function close()
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_free_result
     * @return void
     */
    public function free()
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_data_seek
     * @return bool
     */
    public function data_seek(int $offset)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_fetch_field
     * @return (object | false)
     */
    public function fetch_field()
    {
    }
    /**
     * @return array
     * @alias mysqli_fetch_fields
     */
    public function fetch_fields()
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_fetch_field_direct
     * @return (object | false)
     */
    public function fetch_field_direct(int $index)
    {
    }
    #if defined(MYSQLI_USE_MYSQLND)
    /**
     * @return array
     * @alias mysqli_fetch_all
     */
    public function fetch_all(int $mode = MYSQLI_NUM)
    {
    }
    #endif
    /**
     * @return array|null|false
     * @alias mysqli_fetch_array
     */
    public function fetch_array(int $mode = MYSQLI_BOTH)
    {
    }
    /**
     * @return array|null|false
     * @alias mysqli_fetch_assoc
     */
    public function fetch_assoc()
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_fetch_object
     * @return (object | null | false)
     */
    public function fetch_object(string $class = "stdClass", array $constructor_args = [])
    {
    }
    /**
     * @return array|null|false
     * @alias mysqli_fetch_row
     */
    public function fetch_row()
    {
    }
    /** @alias mysqli_fetch_column */
    #[\Since('8.1')]
    public function fetch_column(int $column = 0) : null|int|float|string|false
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_field_seek
     * @return bool
     */
    public function field_seek(int $index)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_free_result
     * @return void
     */
    public function free_result()
    {
    }
    public function getIterator() : Iterator;
}<?php 

class mysqli
{
    public function __construct(?string $hostname = null, ?string $username = null, ?string $password = null, ?string $database = null, ?int $port = null, ?string $socket = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_autocommit
     * @return bool
     */
    public function autocommit(bool $enable)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_begin_transaction
     * @return bool
     */
    public function begin_transaction(int $flags = 0, ?string $name = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_change_user
     * @return bool
     */
    public function change_user(string $username, string $password, ?string $database)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_character_set_name
     * @return string
     */
    public function character_set_name()
    {
    }
    /**
     * @return bool
     * @alias mysqli_close
     */
    public function close()
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_commit
     * @return bool
     */
    public function commit(int $flags = 0, ?string $name = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_connect
     * @no-verify
     * @return (bool | null)
     */
    public function connect(?string $hostname = null, ?string $username = null, ?string $password = null, ?string $database = null, ?int $port = null, ?string $socket = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_dump_debug_info
     * @return bool
     */
    public function dump_debug_info()
    {
    }
    /**
     * @return bool
     * @alias mysqli_debug
     * @no-verify Should really be a static method
     */
    public function debug(string $options)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_get_charset
     * @return (object | null)
     */
    public function get_charset()
    {
    }
    /**
     * @alias mysqli_execute_query
     */
    #[\Since('8.2')]
    public function execute_query(string $query, ?array $params = null) : mysqli_result|bool
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_get_client_info
     * @deprecated 8.1.0
     * @return string
     */
    public function get_client_info()
    {
    }
    #if defined(MYSQLI_USE_MYSQLND)
    /**
     * @return array
     * @alias mysqli_get_connection_stats
     */
    public function get_connection_stats()
    {
    }
    #endif
    /**
     * @tentative-return-type
     * @alias mysqli_get_server_info
     * @return string
     */
    public function get_server_info()
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_get_warnings
     * @return (mysqli_warning | false)
     */
    public function get_warnings()
    {
    }
    /**
     * @return null|false
     */
    public function init()
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_kill
     * @return bool
     */
    public function kill(int $process_id)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_multi_query
     * @return bool
     */
    public function multi_query(string $query)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_more_results
     * @return bool
     */
    public function more_results()
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_next_result
     * @return bool
     */
    public function next_result()
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_ping
     * @return bool
     */
    public function ping()
    {
    }
    #if defined(MYSQLI_USE_MYSQLND)
    /**
     * @tentative-return-type
     * @alias mysqli_poll
     * @return (int | false)
     */
    public static function poll(?array &$read, ?array &$error, array &$reject, int $seconds, int $microseconds = 0)
    {
    }
    #endif
    /**
     * @tentative-return-type
     * @alias mysqli_prepare
     * @return (mysqli_stmt | false)
     */
    public function prepare(string $query)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_query
     * @return (mysqli_result | bool)
     */
    public function query(string $query, int $result_mode = MYSQLI_STORE_RESULT)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_real_connect
     * @return bool
     */
    public function real_connect(?string $hostname = null, ?string $username = null, ?string $password = null, ?string $database = null, ?int $port = null, ?string $socket = null, int $flags = 0)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_real_escape_string
     * @return string
     */
    public function real_escape_string(string $string)
    {
    }
    #if defined(MYSQLI_USE_MYSQLND)
    /**
     * @tentative-return-type
     * @alias mysqli_reap_async_query
     * @return (mysqli_result | bool)
     */
    public function reap_async_query()
    {
    }
    #endif
    /**
     * @tentative-return-type
     * @alias mysqli_real_escape_string
     * @return string
     */
    public function escape_string(string $string)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_real_query
     * @return bool
     */
    public function real_query(string $query)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_release_savepoint
     * @return bool
     */
    public function release_savepoint(string $name)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_rollback
     * @return bool
     */
    public function rollback(int $flags = 0, ?string $name = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_savepoint
     * @return bool
     */
    public function savepoint(string $name)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_select_db
     * @return bool
     */
    public function select_db(string $database)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_set_charset
     * @return bool
     */
    public function set_charset(string $charset)
    {
    }
    /**
     * @param (string | int) $value
     * @tentative-return-type
     * @alias mysqli_options
     * @return bool
     */
    public function options(int $option, $value)
    {
    }
    /**
     * @param (string | int) $value
     * @tentative-return-type
     * @alias mysqli_options
     * @return bool
     */
    public function set_opt(int $option, $value)
    {
    }
    /**
     * @return bool
     * @alias mysqli_ssl_set
     */
    public function ssl_set(?string $key, ?string $certificate, ?string $ca_certificate, ?string $ca_path, ?string $cipher_algos)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_stat
     * @return (string | false)
     */
    public function stat()
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_stmt_init
     * @return (mysqli_stmt | false)
     */
    public function stmt_init()
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_store_result
     * @return (mysqli_result | false)
     */
    public function store_result(int $mode = 0)
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_thread_safe
     * @return bool
     */
    public function thread_safe()
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_use_result
     * @return (mysqli_result | false)
     */
    public function use_result()
    {
    }
    /**
     * @tentative-return-type
     * @alias mysqli_refresh
     * @return bool
     */
    public function refresh(int $flags)
    {
    }
}<?php 

function mysqli_stmt_store_result(\mysqli_stmt $statement) : bool
{
}<?php 

function mysqli_get_server_info(\mysqli $mysql) : string
{
}<?php 

function mysqli_change_user(\mysqli $mysql, string $username, string $password, ?string $database) : bool
{
}<?php 

function mysqli_stmt_error(\mysqli_stmt $statement) : string
{
}<?php 

#[\Since('8.1')]
function mysqli_fetch_column(\mysqli_result $result, int $column = 0) : null|int|float|string|false
{
}<?php 

function mysqli_thread_safe() : bool
{
}<?php 

/**
 * @refcount 1
 */
function mysqli_fetch_row(\mysqli_result $result) : array|null|false
{
}<?php 

function mysqli_autocommit(\mysqli $mysql, bool $enable) : bool
{
}<?php 

function mysqli_multi_query(\mysqli $mysql, string $query) : bool
{
}<?php 

#endif
function mysqli_stmt_num_rows(\mysqli_stmt $statement) : int|string
{
}<?php 

function mysqli_data_seek(\mysqli_result $result, int $offset) : bool
{
}<?php 

/** @generate-function-entries */
final class mysqli_driver
{
}<?php 

/**
 * @refcount 1
 */
function mysqli_get_client_stats() : array
{
}<?php 

/**
 * @refcount 1
 */
function mysqli_error_list(\mysqli $mysql) : array
{
}<?php 

/**
 * @refcount 1
 */
function mysqli_get_links_stats() : array
{
}<?php 

function mysqli_next_result(\mysqli $mysql) : bool
{
}<?php 

#[\Until('8.2')]
function mysqli_ssl_set(\mysqli $mysql, ?string $key, ?string $certificate, ?string $ca_certificate, ?string $ca_path, ?string $cipher_algos) : bool
{
}
#[\Since('8.2')]
function mysqli_ssl_set(\mysqli $mysql, ?string $key, ?string $certificate, ?string $ca_certificate, ?string $ca_path, ?string $cipher_algos) : true
{
}<?php 

function mysqli_get_client_version() : int
{
}<?php 

function mysqli_connect(?string $hostname = null, ?string $username = null, ?string $password = null, ?string $database = null, ?int $port = null, ?string $socket = null) : \mysqli|false
{
}<?php 

/** @alias mysqli_stmt_execute */
#[\Until('8.1')]
function mysqli_execute(\mysqli_stmt $statement) : bool
{
}
/** @alias mysqli_stmt_execute */
#[\Since('8.1')]
function mysqli_execute(\mysqli_stmt $statement, ?array $params = null) : bool
{
}<?php 

function mysqli_num_fields(\mysqli_result $result) : int
{
}<?php 

function mysqli_real_connect(\mysqli $mysql, ?string $hostname = null, ?string $username = null, ?string $password = null, ?string $database = null, ?int $port = null, ?string $socket = null, int $flags = 0) : bool
{
}<?php 

function mysqli_stmt_insert_id(\mysqli_stmt $statement) : int|string
{
}<?php 

function ob_gzhandler(string $data, int $flags) : string|false
{
}<?php 

function gzinflate(string $data, int $max_length = 0) : string|false
{
}<?php 

function deflate_init(int $encoding, array $options = []) : \DeflateContext|false
{
}<?php 

function inflate_add(\InflateContext $context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH) : string|false
{
}<?php 

function deflate_add(\DeflateContext $context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH) : string|false
{
}<?php 

/**
 * @param resource $stream
 * @alias ftell
 */
function gztell($stream) : int|false
{
}<?php 

function gzdecode(string $data, int $max_length = 0) : string|false
{
}<?php 

/** @generate-function-entries */
final class InflateContext
{
}<?php 

function zlib_get_coding_type() : string|false
{
}<?php 

function inflate_get_status(\InflateContext $context) : int
{
}<?php 

/**
 * @param resource $stream
 * @alias rewind
 */
function gzrewind($stream) : bool
{
}<?php 

/**
 * @param resource $stream
 * @alias fwrite
 */
function gzputs($stream, string $data, ?int $length = null) : int|false
{
}<?php 

function gzuncompress(string $data, int $max_length = 0) : string|false
{
}<?php 

function zlib_encode(string $data, int $encoding, int $level = -1) : string|false
{
}<?php 

function gzdeflate(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_RAW) : string|false
{
}<?php 

/**
 * @param resource $stream
 * @alias fgets
 */
function gzgets($stream, ?int $length = null) : string|false
{
}<?php 

function zlib_decode(string $data, int $max_length = 0) : string|false
{
}<?php 

/**
 * @param resource $stream
 * @alias fseek
 */
function gzseek($stream, int $offset, int $whence = SEEK_SET) : int
{
}<?php 

/** @return resource|false */
function gzopen(string $filename, string $mode, int $use_include_path = 0)
{
}<?php 

function gzencode(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_GZIP) : string|false
{
}<?php 

final class DeflateContext
{
}<?php 

/**
 * @param resource $stream
 * @alias fpassthru
 */
function gzpassthru($stream) : int
{
}<?php 

function inflate_get_read_len(\InflateContext $context) : int
{
}<?php 

/**
 * @param resource $stream
 * @alias fgetc
 */
function gzgetc($stream) : string|false
{
}<?php 

function readgzfile(string $filename, int $use_include_path = 0) : int|false
{
}<?php 

/**
 * @param resource $stream
 * @alias feof
 */
function gzeof($stream) : bool
{
}<?php 

function inflate_init(int $encoding, array $options = []) : \InflateContext|false
{
}<?php 

function gzcompress(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_DEFLATE) : string|false
{
}<?php 

/**
 * @param resource $stream
 * @alias fwrite
 */
function gzwrite($stream, string $data, ?int $length = null) : int|false
{
}<?php 

/**
 * @param resource $stream
 * @alias fclose
 */
function gzclose($stream) : bool
{
}<?php 

/**
 * @param resource $stream
 * @alias fread
 */
function gzread($stream, int $length) : string|false
{
}<?php 

/**
 * @refcount 1
 */
function gzfile(string $filename, int $use_include_path = 0) : array|false
{
}<?php 

function xml_error_string(int $error_code) : ?string
{
}<?php 

function xml_get_current_line_number(\XMLParser $parser) : int
{
}<?php 

/**
 * @param callable $start_handler
 * @param callable $end_handler
 */
#[\Until('8.2')]
function xml_set_element_handler(\XMLParser $parser, $start_handler, $end_handler) : bool
{
}
/**
 * @param callable $start_handler
 * @param callable $end_handler
 */
#[\Since('8.2')]
function xml_set_element_handler(\XMLParser $parser, $start_handler, $end_handler) : true
{
}<?php 

/** @param callable $handler */
#[\Until('8.2')]
function xml_set_notation_decl_handler(\XMLParser $parser, $handler) : bool
{
}
/** @param callable $handler */
#[\Since('8.2')]
function xml_set_notation_decl_handler(\XMLParser $parser, $handler) : true
{
}<?php 

/** @generate-function-entries */
function xml_parser_create(?string $encoding = null) : \XMLParser
{
}<?php 

/** @param callable $handler */
#[\Until('8.2')]
function xml_set_unparsed_entity_decl_handler(\XMLParser $parser, $handler) : bool
{
}
/** @param callable $handler */
#[\Since('8.2')]
function xml_set_unparsed_entity_decl_handler(\XMLParser $parser, $handler) : true
{
}<?php 

/** @param callable $handler */
#[\Until('8.2')]
function xml_set_start_namespace_decl_handler(\XMLParser $parser, $handler) : bool
{
}
/** @param callable $handler */
#[\Since('8.2')]
function xml_set_start_namespace_decl_handler(\XMLParser $parser, $handler) : true
{
}<?php 

/**
 * @param array $values
 * @param array $index
 */
function xml_parse_into_struct(\XMLParser $parser, string $data, &$values, &$index = null) : int
{
}<?php 

function xml_get_error_code(\XMLParser $parser) : int
{
}<?php 

function xml_parser_create_ns(?string $encoding = null, string $separator = ":") : \XMLParser
{
}<?php 

/** @param callable $handler */
#[\Until('8.2')]
function xml_set_end_namespace_decl_handler(\XMLParser $parser, $handler) : bool
{
}
/** @param callable $handler */
#[\Since('8.2')]
function xml_set_end_namespace_decl_handler(\XMLParser $parser, $handler) : true
{
}<?php 

function xml_parse(\XMLParser $parser, string $data, bool $is_final = false) : int
{
}<?php 

/** @param string|int $value */
function xml_parser_set_option(\XMLParser $parser, int $option, $value) : bool
{
}<?php 

final class XMLParser
{
}<?php 

/** @param callable $handler */
#[\Until('8.2')]
function xml_set_external_entity_ref_handler(\XMLParser $parser, $handler) : bool
{
}
/** @param callable $handler */
#[\Since('8.2')]
function xml_set_external_entity_ref_handler(\XMLParser $parser, $handler) : true
{
}<?php 

/** @param callable $handler */
#[\Until('8.2')]
function xml_set_processing_instruction_handler(\XMLParser $parser, $handler) : bool
{
}
/** @param callable $handler */
#[\Since('8.2')]
function xml_set_processing_instruction_handler(\XMLParser $parser, $handler) : true
{
}<?php 

function xml_parser_get_option(\XMLParser $parser, int $option) : string|int
{
}<?php 

#[\Until('8.2')]
function xml_set_object(\XMLParser $parser, object $object) : bool
{
}
#[\Since('8.2')]
function xml_set_object(\XMLParser $parser, object $object) : true
{
}<?php 

function xml_parser_free(\XMLParser $parser) : bool
{
}<?php 

function xml_get_current_column_number(\XMLParser $parser) : int
{
}<?php 

/** @param callable $handler */
#[\Until('8.2')]
function xml_set_default_handler(\XMLParser $parser, $handler) : bool
{
}
/** @param callable $handler */
#[\Since('8.2')]
function xml_set_default_handler(\XMLParser $parser, $handler) : true
{
}<?php 

/** @param callable $handler */
#[\Until('8.2')]
function xml_set_character_data_handler(\XMLParser $parser, $handler) : bool
{
}
/** @param callable $handler */
#[\Since('8.2')]
function xml_set_character_data_handler(\XMLParser $parser, $handler) : true
{
}<?php 

function xml_get_current_byte_index(\XMLParser $parser) : int
{
}<?php 

function sem_remove(\SysvSemaphore $semaphore) : bool
{
}<?php 

function sem_acquire(\SysvSemaphore $semaphore, bool $non_blocking = false) : bool
{
}<?php 

/** @generate-function-entries */
final class SysvSemaphore
{
}<?php 

function sem_release(\SysvSemaphore $semaphore) : bool
{
}<?php 

function sem_get(int $key, int $max_acquire = 1, int $permissions = 0666, bool $auto_release = true) : \SysvSemaphore|false
{
}<?php 

/** @generate-function-entries */
// These are extension methods for PDO. This is not a real class.
class PDO_SQLite_Ext
{
    /**
     * @tentative-return-type
     * @return bool
     */
    public function sqliteCreateFunction(string $name, callable $callback, int $numArgs = -1, int $flags = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function sqliteCreateAggregate(string $name, callable $step, callable $finalize, int $numArgs = -1)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function sqliteCreateCollation(string $name, callable $callback)
    {
    }
}<?php 

function iconv(string $from_encoding, string $to_encoding, string $string) : string|false
{
}<?php 

function iconv_mime_encode(string $field_name, string $field_value, array $options = []) : string|false
{
}<?php 

function iconv_substr(string $string, int $offset, ?int $length = null, ?string $encoding = null) : string|false
{
}<?php 

/**
 * @refcount 1
 */
function iconv_mime_decode_headers(string $headers, int $mode = 0, ?string $encoding = null) : array|false
{
}<?php 

function iconv_mime_decode(string $string, int $mode = 0, ?string $encoding = null) : string|false
{
}<?php 

function iconv_strrpos(string $haystack, string $needle, ?string $encoding = null) : int|false
{
}<?php 

function iconv_set_encoding(string $type, string $encoding) : bool
{
}<?php 

/**
 * @refcount 1
 */
function iconv_get_encoding(string $type = "all") : array|string|false
{
}<?php 

function iconv_strpos(string $haystack, string $needle, int $offset = 0, ?string $encoding = null) : int|false
{
}<?php 

/** @generate-function-entries */
function iconv_strlen(string $string, ?string $encoding = null) : int|false
{
}<?php 

function msg_queue_exists(int $key) : bool
{
}<?php 

function msg_set_queue(\SysvMessageQueue $queue, array $data) : bool
{
}<?php 

function msg_get_queue(int $key, int $permissions = 0666) : \SysvMessageQueue|false
{
}<?php 

function msg_stat_queue(\SysvMessageQueue $queue) : array|false
{
}<?php 

/** @generate-function-entries */
final class SysvMessageQueue
{
}<?php 

/**
 * @param string|int|float|bool $message
 * @param int $error_code
 */
function msg_send(\SysvMessageQueue $queue, int $message_type, $message, bool $serialize = true, bool $blocking = true, &$error_code = null) : bool
{
}<?php 

/**
 * @param int $received_message_type
 * @param int $error_code
 */
function msg_receive(\SysvMessageQueue $queue, int $desired_message_type, &$received_message_type, int $max_message_size, mixed &$message, bool $unserialize = true, int $flags = 0, &$error_code = null) : bool
{
}<?php 

function msg_remove_queue(\SysvMessageQueue $queue) : bool
{
}<?php 

function openssl_dh_compute_key(string $public_key, \OpenSSLAsymmetricKey $private_key) : string|false
{
}<?php 

/** @param string $output */
function openssl_x509_export(\OpenSSLCertificate|string $certificate, &$output, bool $no_text = true) : bool
{
}<?php 

/** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $public_key */
function openssl_x509_verify(\OpenSSLCertificate|string $certificate, $public_key) : int
{
}<?php 

function openssl_x509_fingerprint(\OpenSSLCertificate|string $certificate, string $digest_algo = "sha1", bool $binary = false) : string|false
{
}<?php 

/** @generate-function-entries */
final class OpenSSLCertificate
{
}<?php 

/**
 * @refcount 1
 */
function openssl_x509_parse(\OpenSSLCertificate|string $certificate, bool $short_names = true) : array|false
{
}<?php 

/**
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $public_key
 * @alias openssl_pkey_get_public
 */
function openssl_get_publickey($public_key) : \OpenSSLAsymmetricKey|false
{
}<?php 

function openssl_csr_get_public_key(\OpenSSLCertificateSigningRequest|string $csr, bool $short_names = true) : \OpenSSLAsymmetricKey|false
{
}<?php 

/** @param OpenSSLCertificate|array|string $certificate */
#[\Until('8.1')]
function openssl_pkcs7_encrypt(string $input_filename, string $output_filename, $certificate, ?array $headers, int $flags = 0, int $cipher_algo = OPENSSL_CIPHER_RC2_40) : bool
{
}
/** @param OpenSSLCertificate|array|string $certificate */
#[\Since('8.1')]
function openssl_pkcs7_encrypt(string $input_filename, string $output_filename, $certificate, ?array $headers, int $flags = 0, int $cipher_algo = OPENSSL_CIPHER_AES_128_CBC) : bool
{
}<?php 

/** @param bool $strong_result */
function openssl_random_pseudo_bytes(int $length, &$strong_result = null) : string
{
}<?php 

function openssl_error_string() : string|false
{
}<?php 

function openssl_spki_export_challenge(string $spki) : string|false
{
}<?php 

function openssl_cipher_iv_length(string $cipher_algo) : int|false
{
}<?php 

function openssl_x509_export_to_file(\OpenSSLCertificate|string $certificate, string $output_filename, bool $no_text = true) : bool
{
}<?php 

/**
 * @param OpenSSLCertificate|string $certificate
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string|null $private_key
 */
function openssl_cms_decrypt(string $input_filename, string $output_filename, $certificate, $private_key = null, int $encoding = OPENSSL_ENCODING_SMIME) : bool
{
}<?php 

/**
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $public_key
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key
 */
function openssl_pkey_derive($public_key, $private_key, int $key_length = 0) : string|false
{
}<?php 

#endif
function openssl_digest(string $data, string $digest_algo, bool $binary = false) : string|false
{
}<?php 

#[\Since('8.2')]
function openssl_cipher_key_length(string $cipher_algo) : int|false
{
}<?php 

/**
 * @refcount 1
 */
function openssl_get_cipher_methods(bool $aliases = false) : array
{
}<?php 

/** @param array $certificates */
function openssl_pkcs12_read(string $pkcs12, &$certificates, string $passphrase) : bool
{
}<?php 

function openssl_cms_verify(string $input_filename, int $flags = 0, ?string $certificates = null, array $ca_info = [], ?string $untrusted_certificates_filename = null, ?string $content = null, ?string $pk7 = null, ?string $sigfile = null, int $encoding = OPENSSL_ENCODING_SMIME) : bool
{
}<?php 

/**
 * @param string $output
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key
 */
function openssl_open(string $data, &$output, string $encrypted_key, $private_key, string $cipher_algo, ?string $iv = null) : bool
{
}<?php 

/** @param array $certificates */
function openssl_pkcs7_read(string $data, &$certificates) : bool
{
}<?php 

#[\Until('8.1')]
function openssl_decrypt(string $data, string $cipher_algo, string $passphrase, int $options = 0, string $iv = "", string $tag = "", string $aad = "") : string|false
{
}
#[\Since('8.1')]
function openssl_decrypt(string $data, string $cipher_algo, string $passphrase, int $options = 0, string $iv = "", ?string $tag = null, string $aad = "") : string|false
{
}<?php 

final class OpenSSLAsymmetricKey
{
}<?php 

/** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key */
function openssl_cms_sign(string $input_filename, string $output_filename, \OpenSSLCertificate|string $certificate, $private_key, ?array $headers, int $flags = 0, int $encoding = OPENSSL_ENCODING_SMIME, ?string $untrusted_certificates_filename = null) : bool
{
}<?php 

/**
 * @alias openssl_pkey_free
 * @deprecated
 */
function openssl_free_key(\OpenSSLAsymmetricKey $key) : void
{
}<?php 

/**
 * @refcount 1
 */
function openssl_get_cert_locations() : array
{
}<?php 

/**
 * @refcount 1
 */
function openssl_get_md_methods(bool $aliases = false) : array
{
}<?php 

/**
 * @param string $signature
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key
 */
function openssl_sign(string $data, &$signature, $private_key, string|int $algorithm = OPENSSL_ALGO_SHA1) : bool
{
}<?php 

function openssl_x509_checkpurpose(\OpenSSLCertificate|string $certificate, int $purpose, array $ca_info = [], ?string $untrusted_certificates_file = null) : bool|int
{
}<?php 

/** @deprecated */
function openssl_x509_free(\OpenSSLCertificate $certificate) : void
{
}<?php 

/**
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $key
 * @param string $output
 */
function openssl_pkey_export($key, &$output, ?string $passphrase = null, ?array $options = null) : bool
{
}<?php 

function openssl_x509_read(\OpenSSLCertificate|string $certificate) : \OpenSSLCertificate|false
{
}<?php 

/**
 * @param string $encrypted_data
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key
 */
function openssl_private_encrypt(string $data, &$encrypted_data, $private_key, int $padding = OPENSSL_PKCS1_PADDING) : bool
{
}<?php 

/** @param OpenSSLCertificate|array|string $certificate */
#[\Until('8.1')]
function openssl_cms_encrypt(string $input_filename, string $output_filename, $certificate, ?array $headers, int $flags = 0, int $encoding = OPENSSL_ENCODING_SMIME, int $cipher_algo = OPENSSL_CIPHER_RC2_40) : bool
{
}
/** @param OpenSSLCertificate|array|string $certificate */
#[\Since('8.1')]
function openssl_cms_encrypt(string $input_filename, string $output_filename, $certificate, ?array $headers, int $flags = 0, int $encoding = OPENSSL_ENCODING_SMIME, int $cipher_algo = OPENSSL_CIPHER_AES_128_CBC) : bool
{
}<?php 

function openssl_csr_export_to_file(\OpenSSLCertificateSigningRequest|string $csr, string $output_filename, bool $no_text = true) : bool
{
}<?php 

/**
 * @param string $decrypted_data
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $public_key
 */
function openssl_public_decrypt(string $data, &$decrypted_data, $public_key, int $padding = OPENSSL_PKCS1_PADDING) : bool
{
}<?php 

function openssl_pkcs7_verify(string $input_filename, int $flags, ?string $signers_certificates_filename = null, array $ca_info = [], ?string $untrusted_certificates_filename = null, ?string $content = null, ?string $output_filename = null) : bool|int
{
}<?php 

final class OpenSSLCertificateSigningRequest
{
}<?php 

/** @param string $output */
function openssl_csr_export(\OpenSSLCertificateSigningRequest|string $csr, &$output, bool $no_text = true) : bool
{
}<?php 

/** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key */
function openssl_pkcs7_sign(string $input_filename, string $output_filename, \OpenSSLCertificate|string $certificate, $private_key, ?array $headers, int $flags = PKCS7_DETACHED, ?string $untrusted_certificates_filename = null) : bool
{
}<?php 

/** @param OpenSSLAsymmetricKey $private_key */
function openssl_csr_new(array $distinguished_names, &$private_key, ?array $options = null, ?array $extra_attributes = null) : \OpenSSLCertificateSigningRequest|false
{
}<?php 

/**
 * @refcount 1
 */
function openssl_csr_get_subject(\OpenSSLCertificateSigningRequest|string $csr, bool $short_names = true) : array|false
{
}<?php 

/** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $public_key */
function openssl_verify(string $data, string $signature, $public_key, string|int $algorithm = OPENSSL_ALGO_SHA1) : int|false
{
}<?php 

function openssl_spki_verify(string $spki) : bool
{
}<?php 

function openssl_pbkdf2(string $password, string $salt, int $key_length, int $iterations, string $digest_algo = "sha1") : string|false
{
}<?php 

/**
 * @param string $output
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key
 */
function openssl_pkcs12_export(\OpenSSLCertificate|string $certificate, &$output, $private_key, string $passphrase, array $options = []) : bool
{
}<?php 

/** @param string $tag */
function openssl_encrypt(string $data, string $cipher_algo, string $passphrase, int $options = 0, string $iv = "", &$tag = null, string $aad = "", int $tag_length = 16) : string|false
{
}<?php 

/** @deprecated */
function openssl_pkey_free(\OpenSSLAsymmetricKey $key) : void
{
}<?php 

#ifdef HAVE_EVP_PKEY_EC
/**
 * @refcount 1
 */
function openssl_get_curve_names() : array|false
{
}<?php 

function openssl_pkey_new(?array $options = null) : \OpenSSLAsymmetricKey|false
{
}<?php 

/** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key */
function openssl_csr_sign(\OpenSSLCertificateSigningRequest|string $csr, \OpenSSLCertificate|string|null $ca_certificate, $private_key, int $days, ?array $options = null, int $serial = 0) : \OpenSSLCertificate|false
{
}<?php 

/** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key */
function openssl_pkcs12_export_to_file(\OpenSSLCertificate|string $certificate, string $output_filename, $private_key, string $passphrase, array $options = []) : bool
{
}<?php 

/**
 * @refcount 1
 */
function openssl_pkey_get_details(\OpenSSLAsymmetricKey $key) : array|false
{
}<?php 

/** @param array $certificates */
function openssl_cms_read(string $input_filename, &$certificates) : bool
{
}<?php 

/** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key */
function openssl_x509_check_private_key(\OpenSSLCertificate|string $certificate, $private_key) : bool
{
}<?php 

/** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $key */
function openssl_pkey_export_to_file($key, string $output_filename, ?string $passphrase = null, ?array $options = null) : bool
{
}<?php 

function openssl_spki_new(\OpenSSLAsymmetricKey $private_key, string $challenge, int $digest_algo = OPENSSL_ALGO_MD5) : string|false
{
}<?php 

function openssl_spki_export(string $spki) : string|false
{
}<?php 

/** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $public_key */
function openssl_pkey_get_public($public_key) : \OpenSSLAsymmetricKey|false
{
}<?php 

/**
 * @param string $decrypted_data
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key
 */
function openssl_private_decrypt(string $data, &$decrypted_data, $private_key, int $padding = OPENSSL_PKCS1_PADDING) : bool
{
}<?php 

/**
 * @param OpenSSLCertificate|string $certificate
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string|null $private_key
 */
function openssl_pkcs7_decrypt(string $input_filename, string $output_filename, $certificate, $private_key = null) : bool
{
}<?php 

/**
 * @param string $sealed_data
 * @param array $encrypted_keys
 * @param string $iv
 */
function openssl_seal(string $data, &$sealed_data, &$encrypted_keys, array $public_key, string $cipher_algo, &$iv = null) : int|false
{
}<?php 

/**
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key
 * @alias openssl_pkey_get_private
 */
function openssl_get_privatekey($private_key, ?string $passphrase = null) : \OpenSSLAsymmetricKey|false
{
}<?php 

/** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key */
function openssl_pkey_get_private($private_key, ?string $passphrase = null) : \OpenSSLAsymmetricKey|false
{
}<?php 

/**
 * @param string $encrypted_data
 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $public_key
 */
function openssl_public_encrypt(string $data, &$encrypted_data, $public_key, int $padding = OPENSSL_PKCS1_PADDING) : bool
{
}<?php 

#ifdef HAVE_SIGPROCMASK
/** @param array $old_signals */
function pcntl_sigprocmask(int $mode, array $signals, &$old_signals = null) : bool
{
}<?php 

#endif
function pcntl_strerror(int $error_code) : string
{
}<?php 

#endif
#ifdef HAVE_SETPRIORITY
function pcntl_setpriority(int $priority, ?int $process_id = null, int $mode = PRIO_PROCESS) : bool
{
}<?php 

function pcntl_alarm(int $seconds) : int
{
}<?php 

/** @param array $info */
function pcntl_sigtimedwait(array $signals, &$info = [], int $seconds = 0, int $nanoseconds = 0) : int|false
{
}<?php 

#endif
#endif
function pcntl_wifexited(int $status) : bool
{
}<?php 

function pcntl_wexitstatus(int $status) : int|false
{
}<?php 

/** @generate-function-entries */
function pcntl_fork() : int
{
}<?php 

#endif
#ifdef HAVE_STRUCT_SIGINFO_T
#if defined(HAVE_SIGWAITINFO) && defined(HAVE_SIGTIMEDWAIT)
/** @param array $info */
function pcntl_sigwaitinfo(array $signals, &$info = []) : int|false
{
}<?php 

function pcntl_wtermsig(int $status) : int|false
{
}<?php 

#ifdef HAVE_GETPRIORITY
function pcntl_getpriority(?int $process_id = null, int $mode = PRIO_PROCESS) : int|false
{
}<?php 

#endif
#ifdef HAVE_RFORK
#[\Since('8.1')]
function pcntl_rfork(int $flags, int $signal = 0) : int
{
}<?php 

#endif
function pcntl_wifsignaled(int $status) : bool
{
}<?php 

#endif
#ifdef HAVE_FORKX
#[\Since('8.2')]
function pcntl_forkx(int $flags) : int
{
}<?php 

function pcntl_signal_dispatch() : bool
{
}<?php 

#ifdef HAVE_WCONTINUED
function pcntl_wifcontinued(int $status) : bool
{
}<?php 

/**
 * @param int $status
 * @param array $resource_usage
 */
function pcntl_waitpid(int $process_id, &$status, int $flags = 0, &$resource_usage = []) : int
{
}<?php 

/** @return callable|int */
function pcntl_signal_get_handler(int $signal)
{
}<?php 

function pcntl_get_last_error() : int
{
}<?php 

function pcntl_exec(string $path, array $args = [], array $env_vars = []) : bool
{
}<?php 

/** @alias pcntl_get_last_error */
function pcntl_errno() : int
{
}<?php 

function pcntl_async_signals(?bool $enable = null) : bool
{
}<?php 

function pcntl_wstopsig(int $status) : int|false
{
}<?php 

/** @param callable|int $handler */
function pcntl_signal(int $signal, $handler, bool $restart_syscalls = true) : bool
{
}<?php 

function pcntl_wifstopped(int $status) : bool
{
}<?php 

#ifdef HAVE_UNSHARE
function pcntl_unshare(int $flags) : bool
{
}<?php 

/**
 * @param int $status
 * @param array $resource_usage
 */
function pcntl_wait(&$status, int $flags = 0, &$resource_usage = []) : int
{
}<?php 

function snmp_set_oid_output_format(int $format) : bool
{
}<?php 

function snmp_get_quick_print() : bool
{
}<?php 

function snmprealwalk(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1) : array|false
{
}<?php 

function snmp_get_valueretrieval() : int
{
}<?php 

/** @generate-function-entries */
function snmpget(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1) : mixed
{
}<?php 

function snmp3_walk(string $hostname, string $security_name, string $security_level, string $auth_protocol, string $auth_passphrase, string $privacy_protocol, string $privacy_passphrase, array|string $object_id, int $timeout = -1, int $retries = -1) : array|false
{
}<?php 

function snmp_set_enum_print(bool $enable) : bool
{
}<?php 

function snmpgetnext(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1) : mixed
{
}<?php 

function snmpset(string $hostname, string $community, array|string $object_id, array|string $type, array|string $value, int $timeout = -1, int $retries = -1) : bool
{
}<?php 

class SNMPException extends \RuntimeException
{
}<?php 

function snmp3_real_walk(string $hostname, string $security_name, string $security_level, string $auth_protocol, string $auth_passphrase, string $privacy_protocol, string $privacy_passphrase, array|string $object_id, int $timeout = -1, int $retries = -1) : array|false
{
}<?php 

/** @alias snmp_set_oid_output_format */
function snmp_set_oid_numeric_print(int $format) : bool
{
}<?php 

function snmp2_set(string $hostname, string $community, array|string $object_id, array|string $type, array|string $value, int $timeout = -1, int $retries = -1) : bool
{
}<?php 

function snmpwalk(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1) : array|false
{
}<?php 

function snmp2_getnext(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1) : mixed
{
}<?php 

function snmp_set_valueretrieval(int $method) : bool
{
}<?php 

function snmp_read_mib(string $filename) : bool
{
}<?php 

function snmp3_get(string $hostname, string $security_name, string $security_level, string $auth_protocol, string $auth_passphrase, string $privacy_protocol, string $privacy_passphrase, array|string $object_id, int $timeout = -1, int $retries = -1) : mixed
{
}<?php 

function snmp2_get(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1) : mixed
{
}<?php 

function snmp3_set(string $hostname, string $security_name, string $security_level, string $auth_protocol, string $auth_passphrase, string $privacy_protocol, string $privacy_passphrase, array|string $object_id, array|string $type, array|string $value, int $timeout = -1, int $retries = -1) : bool
{
}<?php 

function snmp_set_quick_print(bool $enable) : bool
{
}<?php 

function snmp2_walk(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1) : array|false
{
}<?php 

class SNMP
{
    public function __construct(int $version, string $hostname, string $community, int $timeout = -1, int $retries = -1)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function close()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function setSecurity(string $securityLevel, string $authProtocol = "", string $authPassphrase = "", string $privacyProtocol = "", string $privacyPassphrase = "", string $contextName = "", string $contextEngineId = "")
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function get(array|string $objectId, bool $preserveKeys = false)
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function getnext(array|string $objectId)
    {
    }
    /**
     * @tentative-return-type
     * @return (array | false)
     */
    public function walk(array|string $objectId, bool $suffixAsKey = false, int $maxRepetitions = -1, int $nonRepeaters = -1)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function set(array|string $objectId, array|string $type, array|string $value)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getErrno()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getError()
    {
    }
}<?php 

/** @alias snmprealwalk */
function snmpwalkoid(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1) : array|false
{
}<?php 

function snmp3_getnext(string $hostname, string $security_name, string $security_level, string $auth_protocol, string $auth_passphrase, string $privacy_protocol, string $privacy_passphrase, array|string $object_id, int $timeout = -1, int $retries = -1) : mixed
{
}<?php 

function snmp2_real_walk(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1) : array|false
{
}<?php 

/** @param int $next */
function grapheme_extract(string $haystack, int $size, int $type = GRAPHEME_EXTR_COUNT, int $offset = 0, &$next = null) : string|false
{
}<?php 

function datefmt_get_pattern(\IntlDateFormatter $formatter) : string|false
{
}<?php 

function intlcal_set_first_day_of_week(\IntlCalendar $calendar, int $dayOfWeek) : bool
{
}<?php 

function collator_get_error_message(\Collator $object) : string|false
{
}<?php 

function intl_error_name(int $errorCode) : string
{
}<?php 

function intlcal_clear(\IntlCalendar $calendar, ?int $field = null) : bool
{
}<?php 

function collator_get_locale(\Collator $object, int $type) : string|false
{
}<?php 

function intlcal_field_difference(\IntlCalendar $calendar, float $timestamp, int $field) : int|false
{
}<?php 

function msgfmt_set_pattern(\MessageFormatter $formatter, string $pattern) : bool
{
}<?php 

function intlcal_set_repeated_wall_time_option(\IntlCalendar $calendar, int $option) : bool
{
}<?php 

function datefmt_get_error_message(\IntlDateFormatter $formatter) : string
{
}<?php 

function collator_get_error_code(\Collator $object) : int|false
{
}<?php 

function intlcal_set_skipped_wall_time_option(\IntlCalendar $calendar, int $option) : bool
{
}<?php 

function datefmt_get_error_code(\IntlDateFormatter $formatter) : int
{
}<?php 

function intlcal_get_least_maximum(\IntlCalendar $calendar, int $field) : int|false
{
}<?php 

/** @param string|int $index */
function resourcebundle_get(\ResourceBundle $bundle, $index, bool $fallback = true) : mixed
{
}<?php 

function intlcal_get_first_day_of_week(\IntlCalendar $calendar) : int|false
{
}<?php 

/** @generate-function-entries */
class Transliterator
{
    private final function __construct()
    {
    }
    /**
     * @tentative-return-type
     * @alias transliterator_create
     * @return (Transliterator | null)
     */
    public static function create(string $id, int $direction = Transliterator::FORWARD)
    {
    }
    /**
     * @tentative-return-type
     * @alias transliterator_create_from_rules
     * @return (Transliterator | null)
     */
    public static function createFromRules(string $rules, int $direction = Transliterator::FORWARD)
    {
    }
    /**
     * @tentative-return-type
     * @alias transliterator_create_inverse
     * @return (Transliterator | null)
     */
    public function createInverse()
    {
    }
    /**
     * @return array|false
     * @alias transliterator_list_ids
     */
    public static function listIDs()
    {
    }
    /**
     * @tentative-return-type
     * @alias transliterator_transliterate
     * @return (string | false)
     */
    public function transliterate(string $string, int $start = 0, int $end = -1)
    {
    }
    /**
     * @tentative-return-type
     * @alias transliterator_get_error_code
     * @return (int | false)
     */
    public function getErrorCode()
    {
    }
    /**
     * @tentative-return-type
     * @alias transliterator_get_error_message
     * @return (string | false)
     */
    public function getErrorMessage()
    {
    }
}<?php 

/** @generate-function-entries */
class Normalizer
{
    /**
     * @tentative-return-type
     * @alias normalizer_normalize
     * @return (string | false)
     */
    public static function normalize(string $string, int $form = Normalizer::FORM_C)
    {
    }
    /**
     * @tentative-return-type
     * @alias normalizer_is_normalized
     * @return bool
     */
    public static function isNormalized(string $string, int $form = Normalizer::FORM_C)
    {
    }
    #if U_ICU_VERSION_MAJOR_NUM >= 56
    /**
     * @tentative-return-type
     * @alias normalizer_get_raw_decomposition
     * @return (string | null)
     */
    public static function getRawDecomposition(string $string, int $form = Normalizer::FORM_C)
    {
    }
}<?php 

function intlcal_get_type(\IntlCalendar $calendar) : string
{
}<?php 

/* idn */
/** @param array $idna_info */
function idn_to_ascii(string $domain, int $flags = IDNA_DEFAULT, int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null) : string|false
{
}<?php 

/**
 * @refcount 1
 */
function resourcebundle_locales(string $bundle) : array|false
{
}<?php 

function intltz_create_default() : \IntlTimeZone
{
}<?php 

function numfmt_set_pattern(\NumberFormatter $formatter, string $pattern) : bool
{
}<?php 

/** @param int $offset */
function datefmt_parse(\IntlDateFormatter $formatter, string $string, &$offset = null) : int|float|false
{
}<?php 

/* calendar */
/** @param IntlTimeZone|DateTimeZone|string|null $timezone */
function intlcal_create_instance($timezone = null, ?string $locale = null) : ?\IntlCalendar
{
}<?php 

/**
 * @param int $offset
 * @refcount 1
 */
function datefmt_localtime(\IntlDateFormatter $formatter, string $string, &$offset = null) : array|false
{
}<?php 

/* msgformat */
function msgfmt_create(string $locale, string $pattern) : ?\MessageFormatter
{
}<?php 

function collator_sort(\Collator $object, array &$array, int $flags = Collator::SORT_REGULAR) : bool
{
}<?php 

function intlcal_to_date_time(\IntlCalendar $calendar) : \DateTime|false
{
}<?php 

function intlcal_get(\IntlCalendar $calendar, int $field) : int|false
{
}<?php 

function collator_set_attribute(\Collator $object, int $attribute, int $value) : bool
{
}<?php 

function intlcal_get_now() : float
{
}<?php 

/* transliterator */
function transliterator_create(string $id, int $direction = Transliterator::FORWARD) : ?\Transliterator
{
}<?php 

function intlcal_set_minimal_days_in_first_week(\IntlCalendar $calendar, int $days) : bool
{
}<?php 

function intlcal_get_time_zone(\IntlCalendar $calendar) : \IntlTimeZone|false
{
}<?php 

function msgfmt_get_error_code(\MessageFormatter $formatter) : int
{
}<?php 

function intlcal_get_minimal_days_in_first_week(\IntlCalendar $calendar) : int|false
{
}<?php 

function transliterator_create_from_rules(string $rules, int $direction = Transliterator::FORWARD) : ?\Transliterator
{
}<?php 

function collator_get_attribute(\Collator $object, int $attribute) : int|false
{
}<?php 

function datefmt_is_lenient(\IntlDateFormatter $formatter) : bool
{
}<?php 

function locale_get_script(string $locale) : ?string
{
}<?php 

function intltz_get_tz_data_version() : string|false
{
}<?php 

function grapheme_substr(string $string, int $offset, ?int $length = null) : string|false
{
}<?php 

function numfmt_format_currency(\NumberFormatter $formatter, float $amount, string $currency) : string|false
{
}<?php 

function numfmt_get_attribute(\NumberFormatter $formatter, int $attribute) : int|float|false
{
}<?php 

function intltz_get_unknown() : \IntlTimeZone
{
}<?php 

function locale_get_display_variant(string $locale, ?string $displayLocale = null) : string|false
{
}<?php 

function grapheme_stristr(string $haystack, string $needle, bool $beforeNeedle = false) : string|false
{
}<?php 

function msgfmt_format(\MessageFormatter $formatter, array $values) : string|false
{
}<?php 

function intlcal_from_date_time(\DateTime|string $datetime, ?string $locale = null) : ?\IntlCalendar
{
}<?php 

/**
 * @param string $currency
 * @param int $offset
 */
function numfmt_parse_currency(\NumberFormatter $formatter, string $string, &$currency, &$offset = null) : float|false
{
}<?php 

/** @param int|bool $value */
function intlcal_roll(\IntlCalendar $calendar, int $field, $value) : bool
{
}<?php 

function numfmt_get_text_attribute(\NumberFormatter $formatter, int $attribute) : string|false
{
}<?php 

/** @generate-function-entries */
class Collator
{
    public function __construct(string $locale)
    {
    }
    /**
     * @tentative-return-type
     * @alias collator_create
     * @return (Collator | null)
     */
    public static function create(string $locale)
    {
    }
    /**
     * @tentative-return-type
     * @alias collator_compare
     * @return (int | false)
     */
    public function compare(string $string1, string $string2)
    {
    }
    /**
     * @tentative-return-type
     * @alias collator_sort
     * @return bool
     */
    public function sort(array &$array, int $flags = Collator::SORT_REGULAR)
    {
    }
    /**
     * @tentative-return-type
     * @alias collator_sort_with_sort_keys
     * @return bool
     */
    public function sortWithSortKeys(array &$array)
    {
    }
    /**
     * @tentative-return-type
     * @alias collator_asort
     * @return bool
     */
    public function asort(array &$array, int $flags = Collator::SORT_REGULAR)
    {
    }
    /**
     * @tentative-return-type
     * @alias collator_get_attribute
     * @return (int | false)
     */
    public function getAttribute(int $attribute)
    {
    }
    /**
     * @tentative-return-type
     * @alias collator_set_attribute
     * @return bool
     */
    public function setAttribute(int $attribute, int $value)
    {
    }
    /**
     * @tentative-return-type
     * @alias collator_get_strength
     * @return int
     */
    public function getStrength()
    {
    }
    /**
     * @return bool
     * @alias collator_set_strength
     */
    public function setStrength(int $strength)
    {
    }
    /**
     * @tentative-return-type
     * @alias collator_get_locale
     * @return (string | false)
     */
    public function getLocale(int $type)
    {
    }
    /**
     * @tentative-return-type
     * @alias collator_get_error_code
     * @return (int | false)
     */
    public function getErrorCode()
    {
    }
    /**
     * @tentative-return-type
     * @alias collator_get_error_message
     * @return (string | false)
     */
    public function getErrorMessage()
    {
    }
    /**
     * @tentative-return-type
     * @alias collator_get_sort_key
     * @return (string | false)
     */
    public function getSortKey(string $string)
    {
    }
}<?php 

function datefmt_get_timezone_id(\IntlDateFormatter $formatter) : string|false
{
}<?php 

function intlcal_get_locale(\IntlCalendar $calendar, int $type) : string|false
{
}<?php 

function intl_get_error_message() : string
{
}<?php 

function intltz_get_gmt() : \IntlTimeZone
{
}<?php 

function datefmt_get_timezone(\IntlDateFormatter $formatter) : \IntlTimeZone|false
{
}<?php 

function grapheme_strstr(string $haystack, string $needle, bool $beforeNeedle = false) : string|false
{
}<?php 

function datefmt_get_calendar(\IntlDateFormatter $formatter) : int|false
{
}<?php 

function intlcal_is_set(\IntlCalendar $calendar, int $field) : bool
{
}<?php 

function intlcal_get_maximum(\IntlCalendar $calendar, int $field) : int|false
{
}<?php 

/**
 * @param int $rawOffset
 * @param int $dstOffset
 */
function intltz_get_offset(\IntlTimeZone $timezone, float $timestamp, bool $local, &$rawOffset, &$dstOffset) : bool
{
}<?php 

/**
 * @refcount 1
 */
function locale_get_keywords(string $locale) : array|false|null
{
}<?php 

function intltz_get_dst_savings(\IntlTimeZone $timezone) : int
{
}<?php 

function msgfmt_get_error_message(\MessageFormatter $formatter) : string
{
}<?php 

function collator_compare(\Collator $object, string $string1, string $string2) : int|false
{
}<?php 

function intlcal_get_keyword_values_for_locale(string $keyword, string $locale, bool $onlyCommon) : \IntlIterator|false
{
}<?php 

function intlcal_after(\IntlCalendar $calendar, \IntlCalendar $other) : bool
{
}<?php 

#endif
function intltz_has_same_rules(\IntlTimeZone $timezone, \IntlTimeZone $other) : bool
{
}<?php 

function numfmt_get_symbol(\NumberFormatter $formatter, int $symbol) : string|false
{
}<?php 

function intlcal_get_error_code(\IntlCalendar $calendar) : int|false
{
}<?php 

/** @param array $idna_info */
function idn_to_utf8(string $domain, int $flags = IDNA_DEFAULT, int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null) : string|false
{
}<?php 

function locale_get_display_language(string $locale, ?string $displayLocale = null) : string|false
{
}<?php 

function intlcal_is_weekend(\IntlCalendar $calendar, ?float $timestamp = null) : bool
{
}<?php 

function intlcal_get_weekend_transition(\IntlCalendar $calendar, int $dayOfWeek) : int|false
{
}<?php 

function locale_get_primary_language(string $locale) : ?string
{
}<?php 

function resourcebundle_get_error_code(\ResourceBundle $bundle) : int
{
}<?php 

function locale_get_display_region(string $locale, ?string $displayLocale = null) : string|false
{
}<?php 

function locale_compose(array $subtags) : string|false
{
}<?php 

function intltz_from_date_time_zone(\DateTimeZone $timezone) : ?\IntlTimeZone
{
}<?php 

/** @param bool $isSystemId */
function intltz_get_canonical_id(string $timezoneId, &$isSystemId = null) : string|false
{
}<?php 

/** @generate-function-entries */
class IntlIterator implements \Iterator
{
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function current()
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function key()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function next()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function rewind()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function valid()
    {
    }
}<?php 

function intltz_get_equivalent_id(string $timezoneId, int $offset) : string|false
{
}<?php 

function collator_get_sort_key(\Collator $object, string $string) : string|false
{
}<?php 

function datefmt_get_calendar_object(\IntlDateFormatter $formatter) : \IntlCalendar|false|null
{
}<?php 

function grapheme_strripos(string $haystack, string $needle, int $offset = 0) : int|false
{
}<?php 

function locale_filter_matches(string $languageTag, string $locale, bool $canonicalize = false) : ?bool
{
}<?php 

function collator_asort(\Collator $object, array &$array, int $flags = Collator::SORT_REGULAR) : bool
{
}<?php 

/** @generate-function-entries */
class ResourceBundle implements \IteratorAggregate, \Countable
{
    public function __construct(?string $locale, ?string $bundle, bool $fallback = true)
    {
    }
    /**
     * @tentative-return-type
     * @alias resourcebundle_create
     * @return (ResourceBundle | null)
     */
    public static function create(?string $locale, ?string $bundle, bool $fallback = true)
    {
    }
    /**
     * @param (string | int) $index
     * @tentative-return-type
     * @alias resourcebundle_get
     * @return mixed
     */
    public function get($index, bool $fallback = true)
    {
    }
    /**
     * @tentative-return-type
     * @alias resourcebundle_count
     * @return int
     */
    public function count()
    {
    }
    /**
     * @return array|false
     * @alias resourcebundle_locales
     */
    public static function getLocales(string $bundle)
    {
    }
    /**
     * @tentative-return-type
     * @alias resourcebundle_get_error_code
     * @return int
     */
    public function getErrorCode()
    {
    }
    /**
     * @tentative-return-type
     * @alias resourcebundle_get_error_message
     * @return string
     */
    public function getErrorMessage()
    {
    }
    public function getIterator() : Iterator
    {
    }
}<?php 

function intltz_to_date_time_zone(\IntlTimeZone $timezone) : \DateTimeZone|false
{
}<?php 

function intlgregcal_set_gregorian_change(\IntlGregorianCalendar $calendar, float $timestamp) : bool
{
}<?php 

function intlgregcal_get_gregorian_change(\IntlGregorianCalendar $calendar) : float
{
}<?php 

function datefmt_get_locale(\IntlDateFormatter $formatter, int $type = ULOC_ACTUAL_LOCALE) : string|false
{
}<?php 

function msgfmt_format_message(string $locale, string $pattern, array $values) : string|false
{
}<?php 

/** @param IntlTimeZone|string|int|float|null $countryOrRawOffset */
function intltz_create_enumeration($countryOrRawOffset = null) : \IntlIterator|false
{
}<?php 

function locale_set_default(string $locale) : bool
{
}<?php 

function numfmt_set_symbol(\NumberFormatter $formatter, int $symbol, string $value) : bool
{
}<?php 

function intltz_use_daylight_time(\IntlTimeZone $timezone) : bool
{
}<?php 

function locale_accept_from_http(string $header) : string|false
{
}<?php 

function transliterator_create_inverse(\Transliterator $transliterator) : ?\Transliterator
{
}<?php 

/** @generate-function-entries */
class Locale
{
    /**
     * @tentative-return-type
     * @alias locale_get_default
     * @return string
     */
    public static function getDefault()
    {
    }
    /**
     * @return bool
     * @alias locale_set_default
     */
    public static function setDefault(string $locale)
    {
    }
    /**
     * @tentative-return-type
     * @alias locale_get_primary_language
     * @return (string | null)
     */
    public static function getPrimaryLanguage(string $locale)
    {
    }
    /**
     * @tentative-return-type
     * @alias locale_get_script
     * @return (string | null)
     */
    public static function getScript(string $locale)
    {
    }
    /**
     * @tentative-return-type
     * @alias locale_get_region
     * @return (string | null)
     */
    public static function getRegion(string $locale)
    {
    }
    /**
     * @return array|false|null
     * @alias locale_get_keywords
     */
    public static function getKeywords(string $locale)
    {
    }
    /**
     * @tentative-return-type
     * @alias locale_get_display_script
     * @return (string | false)
     */
    public static function getDisplayScript(string $locale, ?string $displayLocale = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias locale_get_display_region
     * @return (string | false)
     */
    public static function getDisplayRegion(string $locale, ?string $displayLocale = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias locale_get_display_name
     * @return (string | false)
     */
    public static function getDisplayName(string $locale, ?string $displayLocale = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias locale_get_display_language
     * @return (string | false)
     */
    public static function getDisplayLanguage(string $locale, ?string $displayLocale = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias locale_get_display_variant
     * @return (string | false)
     */
    public static function getDisplayVariant(string $locale, ?string $displayLocale = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias locale_compose
     * @return (string | false)
     */
    public static function composeLocale(array $subtags)
    {
    }
    /**
     * @tentative-return-type
     * @alias locale_parse
     * @return (array | null)
     */
    public static function parseLocale(string $locale)
    {
    }
    /**
     * @tentative-return-type
     * @alias locale_get_all_variants
     * @return (array | null)
     */
    public static function getAllVariants(string $locale)
    {
    }
    /**
     * @tentative-return-type
     * @alias locale_filter_matches
     * @return (bool | null)
     */
    public static function filterMatches(string $languageTag, string $locale, bool $canonicalize = false)
    {
    }
    /**
     * @tentative-return-type
     * @alias locale_lookup
     * @return (string | null)
     */
    public static function lookup(array $languageTag, string $locale, bool $canonicalize = false, ?string $defaultLocale = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias locale_canonicalize
     * @return (string | null)
     */
    public static function canonicalize(string $locale)
    {
    }
    /**
     * @tentative-return-type
     * @alias locale_accept_from_http
     * @return (string | false)
     */
    public static function acceptFromHttp(string $header)
    {
    }
}<?php 

function intltz_get_error_message(\IntlTimeZone $timezone) : string|false
{
}<?php 

function msgfmt_get_pattern(\MessageFormatter $formatter) : string|false
{
}<?php 

function numfmt_format(\NumberFormatter $formatter, int|float $num, int $type = NumberFormatter::TYPE_DEFAULT) : string|false
{
}<?php 

function intl_is_failure(int $errorCode) : bool
{
}<?php 

function intlcal_set_lenient(\IntlCalendar $calendar, bool $lenient) : bool
{
}<?php 

function datefmt_set_lenient(\IntlDateFormatter $formatter, bool $lenient) : void
{
}<?php 

/** @param IntlCalendar|DateTimeInterface|array|string|int|float $datetime */
function datefmt_format(\IntlDateFormatter $formatter, $datetime) : string|false
{
}<?php 

function intlcal_set(\IntlCalendar $calendar, int $year, int $month, int $dayOfMonth = UNKNOWN, int $hour = UNKNOWN, int $minute = UNKNOWN, int $second = UNKNOWN) : bool
{
}<?php 

function locale_parse(string $locale) : ?array
{
}<?php 

/** @generate-function-entries */
class IntlDateFormatter
{
    /**
     * @param IntlTimeZone|DateTimeZone|string|null $timezone
     * @param IntlCalendar|int|null $calendar
     */
    #[\Until('8.1')]
    public function __construct(?string $locale, int $dateType, int $timeType, $timezone = null, $calendar = null, ?string $pattern = null)
    {
    }
    /**
     * @param (IntlTimeZone | DateTimeZone | string | null) $timezone
     * @tentative-return-type
     * @alias datefmt_create
     * @return (IntlDateFormatter | null)
     */
    #[\Until('8.1')]
    public static function create(?string $locale, int $dateType, int $timeType, $timezone = null, IntlCalendar|int|null $calendar = null, ?string $pattern = null)
    {
    }
    /**
     * @param IntlTimeZone|DateTimeZone|string|null $timezone
     * @param IntlCalendar|int|null $calendar
     */
    #[\Since('8.1')]
    public function __construct(?string $locale, int $dateType = IntlDateFormatter::FULL, int $timeType = IntlDateFormatter::FULL, $timezone = null, $calendar = null, ?string $pattern = null)
    {
    }
    /**
     * @param IntlTimeZone|DateTimeZone|string|null $timezone
     * @tentative-return-type
     * @alias datefmt_create
     */
    #[\Since('8.1')]
    public static function create(?string $locale, int $dateType = IntlDateFormatter::FULL, int $timeType = IntlDateFormatter::FULL, $timezone = null, IntlCalendar|int|null $calendar = null, ?string $pattern = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias datefmt_get_datetype
     * @return (int | false)
     */
    public function getDateType()
    {
    }
    /**
     * @tentative-return-type
     * @alias datefmt_get_timetype
     * @return (int | false)
     */
    public function getTimeType()
    {
    }
    /**
     * @tentative-return-type
     * @alias datefmt_get_calendar
     * @return (int | false)
     */
    public function getCalendar()
    {
    }
    /**
     * @tentative-return-type
     * @alias datefmt_set_calendar
     * @return bool
     */
    public function setCalendar(IntlCalendar|int|null $calendar)
    {
    }
    /**
     * @tentative-return-type
     * @alias datefmt_get_timezone_id
     * @return (string | false)
     */
    public function getTimeZoneId()
    {
    }
    /**
     * @tentative-return-type
     * @alias datefmt_get_calendar_object
     * @return (IntlCalendar | false | null)
     */
    public function getCalendarObject()
    {
    }
    /**
     * @tentative-return-type
     * @alias datefmt_get_timezone
     * @return (IntlTimeZone | false)
     */
    public function getTimeZone()
    {
    }
    /**
     * @param (IntlTimeZone | DateTimeZone | string | null) $timezone
     * @tentative-return-type
     * @alias datefmt_set_timezone
     * @return (bool | null)
     */
    public function setTimeZone($timezone)
    {
    }
    /**
     * @tentative-return-type
     * @alias datefmt_set_pattern
     * @return bool
     */
    public function setPattern(string $pattern)
    {
    }
    /**
     * @tentative-return-type
     * @alias datefmt_get_pattern
     * @return (string | false)
     */
    public function getPattern()
    {
    }
    /**
     * @tentative-return-type
     * @alias datefmt_get_locale
     * @return (string | false)
     */
    public function getLocale(int $type = ULOC_ACTUAL_LOCALE)
    {
    }
    /**
     * @tentative-return-type
     * @alias datefmt_set_lenient
     * @return void
     */
    public function setLenient(bool $lenient)
    {
    }
    /**
     * @tentative-return-type
     * @alias datefmt_is_lenient
     * @return bool
     */
    public function isLenient()
    {
    }
    /**
     * @param (IntlCalendar | DateTimeInterface | array | string | int | float) $datetime
     * @tentative-return-type
     * @alias datefmt_format
     * @return (string | false)
     */
    public function format($datetime)
    {
    }
    /**
     * @param (IntlCalendar | DateTimeInterface) $datetime
     * @param (array | int | string | null) $format
     * @tentative-return-type
     * @alias datefmt_format_object
     * @return (string | false)
     */
    public static function formatObject($datetime, $format = null, ?string $locale = null)
    {
    }
    /**
     * @param int $offset
     * @tentative-return-type
     * @alias datefmt_parse
     * @return (int | float | false)
     */
    public function parse(string $string, &$offset = null)
    {
    }
    /**
     * @param int $offset
     * @return array|false
     * @alias datefmt_localtime
     */
    public function localtime(string $string, &$offset = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias datefmt_get_error_code
     * @return int
     */
    public function getErrorCode()
    {
    }
    /**
     * @tentative-return-type
     * @alias datefmt_get_error_message
     * @return string
     */
    public function getErrorMessage()
    {
    }
}<?php 

/** @generate-class-entries */
#[\Since('8.1')]
class IntlDatePatternGenerator
{
    public function __construct(?string $locale = null)
    {
    }
    public static function create(?string $locale = null) : ?IntlDatePatternGenerator
    {
    }
    public function getBestPattern(string $skeleton) : string|false
    {
    }
}<?php 

function locale_get_all_variants(string $locale) : ?array
{
}<?php 

/** @generate-function-entries */
class IntlException extends \Exception
{
}<?php 

function collator_set_strength(\Collator $object, int $strength) : bool
{
}<?php 

/**
 * @refcount 1
 */
function msgfmt_parse(\MessageFormatter $formatter, string $string) : array|false
{
}<?php 

function intltz_get_error_code(\IntlTimeZone $timezone) : int|false
{
}<?php 

function intlcal_equals(\IntlCalendar $calendar, \IntlCalendar $other) : bool
{
}<?php 

/** @param IntlTimeZone|DateTimeZone|string|null $timezone */
function intlcal_set_time_zone(\IntlCalendar $calendar, $timezone) : bool
{
}<?php 

/**
 * @refcount 1
 */
function intlcal_get_available_locales() : array
{
}<?php 

function intltz_create_time_zone(string $timezoneId) : ?\IntlTimeZone
{
}<?php 

function msgfmt_get_locale(\MessageFormatter $formatter) : string
{
}<?php 

#endif
/* resourceboundle */
function resourcebundle_create(?string $locale, ?string $bundle, bool $fallback = true) : ?\ResourceBundle
{
}<?php 

/**
 * @param IntlCalendar|DateTimeInterface $datetime
 * @param array|int|string|null $format
 */
function datefmt_format_object($datetime, $format = null, ?string $locale = null) : string|false
{
}<?php 

function intlcal_is_equivalent_to(\IntlCalendar $calendar, \IntlCalendar $other) : bool
{
}<?php 

function datefmt_set_pattern(\IntlDateFormatter $formatter, string $pattern) : bool
{
}<?php 

/* formatter */
function numfmt_create(string $locale, int $style, ?string $pattern = null) : ?\NumberFormatter
{
}<?php 

function intlcal_get_error_message(\IntlCalendar $calendar) : string|false
{
}<?php 

#if U_ICU_VERSION_MAJOR_NUM >= 56
function normalizer_get_raw_decomposition(string $string, int $form = Normalizer::FORM_C) : ?string
{
}<?php 

function grapheme_strrpos(string $haystack, string $needle, int $offset = 0) : int|false
{
}<?php 

function intlcal_get_minimum(\IntlCalendar $calendar, int $field) : int|false
{
}<?php 

function numfmt_set_attribute(\NumberFormatter $formatter, int $attribute, int|float $value) : bool
{
}<?php 

function transliterator_get_error_code(\Transliterator $transliterator) : int|false
{
}<?php 

function intlcal_get_actual_maximum(\IntlCalendar $calendar, int $field) : int|false
{
}<?php 

class IntlCodePointBreakIterator extends \IntlBreakIterator
{
    /**
     * @tentative-return-type
     * @return int
     */
    public function getLastCodePoint()
    {
    }
}<?php 

/** @generate-function-entries */
class IntlBreakIterator implements \IteratorAggregate
{
    /**
     * @tentative-return-type
     * @return (IntlBreakIterator | null)
     */
    public static function createCharacterInstance(?string $locale = null)
    {
    }
    /**
     * @tentative-return-type
     * @return IntlCodePointBreakIterator
     */
    public static function createCodePointInstance()
    {
    }
    /**
     * @tentative-return-type
     * @return (IntlBreakIterator | null)
     */
    public static function createLineInstance(?string $locale = null)
    {
    }
    /**
     * @tentative-return-type
     * @return (IntlBreakIterator | null)
     */
    public static function createSentenceInstance(?string $locale = null)
    {
    }
    /**
     * @tentative-return-type
     * @return (IntlBreakIterator | null)
     */
    public static function createTitleInstance(?string $locale = null)
    {
    }
    /**
     * @tentative-return-type
     * @return (IntlBreakIterator | null)
     */
    public static function createWordInstance(?string $locale = null)
    {
    }
    private function __construct()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function current()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function first()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function following(int $offset)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getErrorCode()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function getErrorMessage()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getLocale(int $type)
    {
    }
    /**
     * @tentative-return-type
     * @return IntlPartsIterator
     */
    public function getPartsIterator(string $type = IntlPartsIterator::KEY_SEQUENTIAL)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | null)
     */
    public function getText()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isBoundary(int $offset)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function last()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function next(?int $offset = null)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function preceding(int $offset)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function previous()
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public function setText(string $text)
    {
    }
    public function getIterator() : Iterator
    {
    }
}<?php 

class IntlPartsIterator extends \IntlIterator
{
    /**
     * @tentative-return-type
     * @return IntlBreakIterator
     */
    public function getBreakIterator()
    {
    }
    /** @tentative-return-type */
    #[\Since('8.1')]
    public function getRuleStatus() : int
    {
    }
}<?php 

class IntlRuleBasedBreakIterator extends \IntlBreakIterator
{
    public function __construct(string $rules, bool $compiled = false)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function getBinaryRules()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function getRules()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getRuleStatus()
    {
    }
    /**
     * @tentative-return-type
     * @return (array | false)
     */
    public function getRuleStatusVec()
    {
    }
}<?php 

function intlcal_get_time(\IntlCalendar $calendar) : float|false
{
}<?php 

function transliterator_get_error_message(\Transliterator $transliterator) : string|false
{
}<?php 

function intltz_get_region(string $timezoneId) : string|false
{
}<?php 

function intlcal_get_actual_minimum(\IntlCalendar $calendar, int $field) : int|false
{
}<?php 

function numfmt_get_error_code(\NumberFormatter $formatter) : int
{
}<?php 

#if U_ICU_VERSION_MAJOR_NUM >= 52
function intltz_get_windows_id(string $timezoneId) : string|false
{
}<?php 

function intlcal_get_day_of_week_type(\IntlCalendar $calendar, int $dayOfWeek) : int|false
{
}<?php 

function intltz_get_raw_offset(\IntlTimeZone $timezone) : int
{
}<?php 

/* locale */
function locale_get_default() : string
{
}<?php 

function intlcal_in_daylight_time(\IntlCalendar $calendar) : bool
{
}<?php 

function locale_get_display_script(string $locale, ?string $displayLocale = null) : string|false
{
}<?php 

function locale_canonicalize(string $locale) : ?string
{
}<?php 

/** @generate-function-entries */
class UConverter
{
    public function __construct(?string $destination_encoding = null, ?string $source_encoding = null)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function convert(string $str, bool $reverse = false)
    {
    }
    /**
     * @param int $error
     * @tentative-return-type
     * @return (string | int | array | null)
     */
    public function fromUCallback(int $reason, array $source, int $codePoint, &$error)
    {
    }
    /** @return array|false|null */
    public static function getAliases(string $name)
    {
    }
    /** @return array */
    public static function getAvailable()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false | null)
     */
    public function getDestinationEncoding()
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false | null)
     */
    public function getDestinationType()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getErrorCode()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | null)
     */
    public function getErrorMessage()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false | null)
     */
    public function getSourceEncoding()
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false | null)
     */
    public function getSourceType()
    {
    }
    /**
     * @tentative-return-type
     * @return (array | null)
     */
    public static function getStandards()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false | null)
     */
    public function getSubstChars()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public static function reasonText(int $reason)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function setDestinationEncoding(string $encoding)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function setSourceEncoding(string $encoding)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function setSubstChars(string $chars)
    {
    }
    /**
     * @param int $error
     * @tentative-return-type
     * @return (string | int | array | null)
     */
    public function toUCallback(int $reason, string $source, string $codeUnits, &$error)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public static function transcode(string $str, string $toEncoding, string $fromEncoding, ?array $options = null)
    {
    }
}<?php 

function transliterator_transliterate(\Transliterator|string $transliterator, string $string, int $start = 0, int $end = -1) : string|false
{
}<?php 

function intltz_get_id(\IntlTimeZone $timezone) : string|false
{
}<?php 

/** @generate-function-entries */
class IntlChar
{
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function hasBinaryProperty(int|string $codepoint, int $property)
    {
    }
    /**
     * @tentative-return-type
     * @return (array | null)
     */
    public static function charAge(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (int | null)
     */
    public static function charDigitValue(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (int | null)
     */
    public static function charDirection(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (int | null)
     */
    public static function charFromName(string $name, int $type = IntlChar::UNICODE_CHAR_NAME)
    {
    }
    /**
     * @tentative-return-type
     * @return (int | string | null)
     */
    public static function charMirror(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | null)
     */
    public static function charName(int|string $codepoint, int $type = IntlChar::UNICODE_CHAR_NAME)
    {
    }
    /**
     * @tentative-return-type
     * @return (int | null)
     */
    public static function charType(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | null)
     */
    public static function chr(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false | null)
     */
    public static function digit(int|string $codepoint, int $base = 10)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function enumCharNames(int|string $start, int|string $end, callable $callback, int $type = IntlChar::UNICODE_CHAR_NAME)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public static function enumCharTypes(callable $callback)
    {
    }
    /**
     * @tentative-return-type
     * @return (int | string | null)
     */
    public static function foldCase(int|string $codepoint, int $options = IntlChar::FOLD_CASE_DEFAULT)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public static function forDigit(int $digit, int $base = 10)
    {
    }
    #if U_ICU_VERSION_MAJOR_NUM >= 52
    /**
     * @tentative-return-type
     * @return (int | string | null)
     */
    public static function getBidiPairedBracket(int|string $codepoint)
    {
    }
    #endif
    /**
     * @tentative-return-type
     * @return (int | null)
     */
    public static function getBlockCode(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (int | null)
     */
    public static function getCombiningClass(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false | null)
     */
    public static function getFC_NFKC_Closure(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public static function getIntPropertyMaxValue(int $property)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public static function getIntPropertyMinValue(int $property)
    {
    }
    /**
     * @tentative-return-type
     * @return (int | null)
     */
    public static function getIntPropertyValue(int|string $codepoint, int $property)
    {
    }
    /**
     * @tentative-return-type
     * @return (float | null)
     */
    public static function getNumericValue(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public static function getPropertyEnum(string $alias)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public static function getPropertyName(int $property, int $type = IntlChar::LONG_PROPERTY_NAME)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public static function getPropertyValueEnum(int $property, string $name)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public static function getPropertyValueName(int $property, int $value, int $type = IntlChar::LONG_PROPERTY_NAME)
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public static function getUnicodeVersion()
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function isalnum(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function isalpha(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function isbase(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function isblank(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function iscntrl(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function isdefined(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function isdigit(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function isgraph(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function isIDIgnorable(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function isIDPart(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function isIDStart(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function isISOControl(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function isJavaIDPart(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function isJavaIDStart(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function isJavaSpaceChar(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function islower(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function isMirrored(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function isprint(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function ispunct(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function isspace(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function istitle(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function isUAlphabetic(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function isULowercase(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function isupper(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function isUUppercase(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function isUWhiteSpace(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function isWhitespace(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public static function isxdigit(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (int | null)
     */
    public static function ord(int|string $character)
    {
    }
    /**
     * @tentative-return-type
     * @return (int | string | null)
     */
    public static function tolower(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (int | string | null)
     */
    public static function totitle(int|string $codepoint)
    {
    }
    /**
     * @tentative-return-type
     * @return (int | string | null)
     */
    public static function toupper(int|string $codepoint)
    {
    }
}<?php 

function numfmt_get_pattern(\NumberFormatter $formatter) : string|false
{
}<?php 

function intltz_create_time_zone_id_enumeration(int $type, ?string $region = null, ?int $rawOffset = null) : \IntlIterator|false
{
}<?php 

function locale_lookup(array $languageTag, string $locale, bool $canonicalize = false, ?string $defaultLocale = null) : ?string
{
}<?php 

class IntlGregorianCalendar extends \IntlCalendar
{
    /**
     * @param DateTimeZone|IntlTimeZone|string|int|null $timezoneOrYear
     * @param string|int|null $localeOrMonth
     * @param int $day
     * @param int $hour
     * @param int $minute
     * @param int $second
     */
    public function __construct($timezoneOrYear = UNKNOWN, $localeOrMonth = UNKNOWN, $day = UNKNOWN, $hour = UNKNOWN, $minute = UNKNOWN, $second = UNKNOWN)
    {
    }
    /**
     * @tentative-return-type
     * @alias intlgregcal_set_gregorian_change
     * @return bool
     */
    public function setGregorianChange(float $timestamp)
    {
    }
    /**
     * @tentative-return-type
     * @alias intlgregcal_get_gregorian_change
     * @return float
     */
    public function getGregorianChange()
    {
    }
    /**
     * @tentative-return-type
     * @alias intlgregcal_is_leap_year
     * @return bool
     */
    public function isLeapYear(int $year)
    {
    }
}<?php 

/** @generate-function-entries */
class IntlCalendar
{
    private function __construct()
    {
    }
    /**
     * @param (IntlTimeZone | DateTimeZone | string | null) $timezone
     * @tentative-return-type
     * @alias intlcal_create_instance
     * @return (IntlCalendar | null)
     */
    public static function createInstance($timezone = null, ?string $locale = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_equals
     * @return bool
     */
    public function equals(IntlCalendar $other)
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_field_difference
     * @return (int | false)
     */
    public function fieldDifference(float $timestamp, int $field)
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_add
     * @return bool
     */
    public function add(int $field, int $value)
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_after
     * @return bool
     */
    public function after(IntlCalendar $other)
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_before
     * @return bool
     */
    public function before(IntlCalendar $other)
    {
    }
    /**
     * @return bool
     * @alias intlcal_clear
     */
    public function clear(?int $field = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_from_date_time
     * @return (IntlCalendar | null)
     */
    public static function fromDateTime(DateTime|string $datetime, ?string $locale = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_get
     * @return (int | false)
     */
    public function get(int $field)
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_get_actual_maximum
     * @return (int | false)
     */
    public function getActualMaximum(int $field)
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_get_actual_minimum
     * @return (int | false)
     */
    public function getActualMinimum(int $field)
    {
    }
    /**
     * @return array
     * @alias intlcal_get_available_locales
     */
    public static function getAvailableLocales()
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_get_day_of_week_type
     * @return (int | false)
     */
    public function getDayOfWeekType(int $dayOfWeek)
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_get_error_code
     * @return (int | false)
     */
    public function getErrorCode()
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_get_error_message
     * @return (string | false)
     */
    public function getErrorMessage()
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_get_first_day_of_week
     * @return (int | false)
     */
    public function getFirstDayOfWeek()
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_get_greatest_minimum
     * @return (int | false)
     */
    public function getGreatestMinimum(int $field)
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_get_keyword_values_for_locale
     * @return (IntlIterator | false)
     */
    public static function getKeywordValuesForLocale(string $keyword, string $locale, bool $onlyCommon)
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_get_least_maximum
     * @return (int | false)
     */
    public function getLeastMaximum(int $field)
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_get_locale
     * @return (string | false)
     */
    public function getLocale(int $type)
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_get_maximum
     * @return (int | false)
     */
    public function getMaximum(int $field)
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_get_minimal_days_in_first_week
     * @return (int | false)
     */
    public function getMinimalDaysInFirstWeek()
    {
    }
    /**
     * @return bool
     * @alias intlcal_set_minimal_days_in_first_week
     */
    public function setMinimalDaysInFirstWeek(int $days)
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_get_minimum
     * @return (int | false)
     */
    public function getMinimum(int $field)
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_get_now
     * @return float
     */
    public static function getNow()
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_get_repeated_wall_time_option
     * @return int
     */
    public function getRepeatedWallTimeOption()
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_get_skipped_wall_time_option
     * @return int
     */
    public function getSkippedWallTimeOption()
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_get_time
     * @return (float | false)
     */
    public function getTime()
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_get_time_zone
     * @return (IntlTimeZone | false)
     */
    public function getTimeZone()
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_get_type
     * @return string
     */
    public function getType()
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_get_weekend_transition
     * @return (int | false)
     */
    public function getWeekendTransition(int $dayOfWeek)
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_in_daylight_time
     * @return bool
     */
    public function inDaylightTime()
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_is_equivalent_to
     * @return bool
     */
    public function isEquivalentTo(IntlCalendar $other)
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_is_lenient
     * @return bool
     */
    public function isLenient()
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_is_weekend
     * @return bool
     */
    public function isWeekend(?float $timestamp = null)
    {
    }
    /**
     * @param (int | bool) $value
     * @alias intlcal_roll
     * @tentative-return-type
     * @return bool
     */
    public function roll(int $field, $value)
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_is_set
     * @return bool
     */
    public function isSet(int $field)
    {
    }
    /**
     * @return bool
     * @alias intlcal_set
     */
    public function set(int $year, int $month, int $dayOfMonth = UNKNOWN, int $hour = UNKNOWN, int $minute = UNKNOWN, int $second = UNKNOWN)
    {
    }
    /**
     * @return bool
     * @alias intlcal_set_first_day_of_week
     */
    public function setFirstDayOfWeek(int $dayOfWeek)
    {
    }
    /**
     * @return bool
     * @alias intlcal_set_lenient
     */
    public function setLenient(bool $lenient)
    {
    }
    /**
     * @return bool
     * @alias intlcal_set_repeated_wall_time_option
     */
    public function setRepeatedWallTimeOption(int $option)
    {
    }
    /**
     * @return bool
     * @alias intlcal_set_skipped_wall_time_option
     */
    public function setSkippedWallTimeOption(int $option)
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_set_time
     * @return bool
     */
    public function setTime(float $timestamp)
    {
    }
    /**
     * @param (IntlTimeZone | DateTimeZone | string | null) $timezone
     * @tentative-return-type
     * @alias intlcal_set_time_zone
     * @return bool
     */
    public function setTimeZone($timezone)
    {
    }
    /**
     * @tentative-return-type
     * @alias intlcal_to_date_time
     * @return (DateTime | false)
     */
    public function toDateTime()
    {
    }
}<?php 

function resourcebundle_count(\ResourceBundle $bundle) : int
{
}<?php 

function intlcal_set_time(\IntlCalendar $calendar, float $timestamp) : bool
{
}<?php 

function grapheme_stripos(string $haystack, string $needle, int $offset = 0) : int|false
{
}<?php 

function resourcebundle_get_error_message(\ResourceBundle $bundle) : string
{
}<?php 

function datefmt_get_datetype(\IntlDateFormatter $formatter) : int|false
{
}<?php 

/** @param int $offset */
function numfmt_parse(\NumberFormatter $formatter, string $string, int $type = NumberFormatter::TYPE_DOUBLE, &$offset = null) : int|float|false
{
}<?php 

/* normalizer */
function normalizer_normalize(string $string, int $form = Normalizer::FORM_C) : string|false
{
}<?php 

function numfmt_get_locale(\NumberFormatter $formatter, int $type = ULOC_ACTUAL_LOCALE) : string|false
{
}<?php 

function intlcal_is_lenient(\IntlCalendar $calendar) : bool
{
}<?php 

/** @param IntlTimeZone|DateTimeZone|string|null $timezone */
function datefmt_set_timezone(\IntlDateFormatter $formatter, $timezone) : ?bool
{
}<?php 

function normalizer_is_normalized(string $string, int $form = Normalizer::FORM_C) : bool
{
}<?php 

function numfmt_set_text_attribute(\NumberFormatter $formatter, int $attribute, string $value) : bool
{
}<?php 

function intlcal_before(\IntlCalendar $calendar, \IntlCalendar $other) : bool
{
}<?php 

function datefmt_set_calendar(\IntlDateFormatter $formatter, \IntlCalendar|int|null $calendar) : bool
{
}<?php 

/** @generate-function-entries */
class IntlTimeZone
{
    private function __construct()
    {
    }
    /**
     * @tentative-return-type
     * @alias intltz_count_equivalent_ids
     * @return (int | false)
     */
    public static function countEquivalentIDs(string $timezoneId)
    {
    }
    /**
     * @tentative-return-type
     * @alias intltz_create_default
     * @return IntlTimeZone
     */
    public static function createDefault()
    {
    }
    /**
     * @param (IntlTimeZone | string | int | float | null) $countryOrRawOffset
     * @tentative-return-type
     * @alias intltz_create_enumeration
     * @return (IntlIterator | false)
     */
    public static function createEnumeration($countryOrRawOffset = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias intltz_create_time_zone
     * @return (IntlTimeZone | null)
     */
    public static function createTimeZone(string $timezoneId)
    {
    }
    /**
     * @tentative-return-type
     * @alias intltz_create_time_zone_id_enumeration
     * @return (IntlIterator | false)
     */
    public static function createTimeZoneIDEnumeration(int $type, ?string $region = null, ?int $rawOffset = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias intltz_from_date_time_zone
     * @return (IntlTimeZone | null)
     */
    public static function fromDateTimeZone(DateTimeZone $timezone)
    {
    }
    /**
     * @param bool $isSystemId
     * @tentative-return-type
     * @alias intltz_get_canonical_id
     * @return (string | false)
     */
    public static function getCanonicalID(string $timezoneId, &$isSystemId = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias intltz_get_display_name
     * @return (string | false)
     */
    public function getDisplayName(bool $dst = false, int $style = IntlTimeZone::DISPLAY_LONG, ?string $locale = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias intltz_get_dst_savings
     * @return int
     */
    public function getDSTSavings()
    {
    }
    /**
     * @tentative-return-type
     * @alias intltz_get_equivalent_id
     * @return (string | false)
     */
    public static function getEquivalentID(string $timezoneId, int $offset)
    {
    }
    /**
     * @tentative-return-type
     * @alias intltz_get_error_code
     * @return (int | false)
     */
    public function getErrorCode()
    {
    }
    /**
     * @tentative-return-type
     * @alias intltz_get_error_message
     * @return (string | false)
     */
    public function getErrorMessage()
    {
    }
    /**
     * @tentative-return-type
     * @alias intltz_get_gmt
     * @return IntlTimeZone
     */
    public static function getGMT()
    {
    }
    /**
     * @tentative-return-type
     * @alias intltz_get_id
     * @return (string | false)
     */
    public function getID()
    {
    }
    /**
     * @param int $rawOffset
     * @param int $dstOffset
     * @tentative-return-type
     * @alias intltz_get_offset
     * @return bool
     */
    public function getOffset(float $timestamp, bool $local, &$rawOffset, &$dstOffset)
    {
    }
    /**
     * @tentative-return-type
     * @alias intltz_get_raw_offset
     * @return int
     */
    public function getRawOffset()
    {
    }
    /**
     * @tentative-return-type
     * @alias intltz_get_region
     * @return (string | false)
     */
    public static function getRegion(string $timezoneId)
    {
    }
    /**
     * @tentative-return-type
     * @alias intltz_get_tz_data_version
     * @return (string | false)
     */
    public static function getTZDataVersion()
    {
    }
    /**
     * @tentative-return-type
     * @alias intltz_get_unknown
     * @return IntlTimeZone
     */
    public static function getUnknown()
    {
    }
    #if U_ICU_VERSION_MAJOR_NUM >= 52
    /**
     * @tentative-return-type
     * @alias intltz_get_windows_id
     * @return (string | false)
     */
    public static function getWindowsID(string $timezoneId)
    {
    }
    /**
     * @tentative-return-type
     * @alias intltz_get_id_for_windows_id
     * @return (string | false)
     */
    public static function getIDForWindowsID(string $timezoneId, ?string $region = null)
    {
    }
    #endif
    /**
     * @tentative-return-type
     * @alias intltz_has_same_rules
     * @return bool
     */
    public function hasSameRules(IntlTimeZone $other)
    {
    }
    /**
     * @tentative-return-type
     * @alias intltz_to_date_time_zone
     * @return (DateTimeZone | false)
     */
    public function toDateTimeZone()
    {
    }
    /**
     * @tentative-return-type
     * @alias intltz_use_daylight_time
     * @return bool
     */
    public function useDaylightTime()
    {
    }
}<?php 

function intlgregcal_is_leap_year(\IntlGregorianCalendar $calendar, int $year) : bool
{
}<?php 

/* grapheme */
function grapheme_strlen(string $string) : int|false|null
{
}<?php 

function collator_sort_with_sort_keys(\Collator $object, array &$array) : bool
{
}<?php 

/**
 * @param DateTimeZone|IntlTimeZone|string|int|null $timezoneOrYear
 * @param string|int|null $localeOrMonth
 * @param int $day
 * @param int $hour
 * @param int $minute
 * @param int $second
 */
function intlgregcal_create_instance($timezoneOrYear = UNKNOWN, $localeOrMonth = UNKNOWN, $day = UNKNOWN, $hour = UNKNOWN, $minute = UNKNOWN, $second = UNKNOWN) : ?\IntlGregorianCalendar
{
}<?php 

/* common */
function intl_get_error_code() : int
{
}<?php 

function intlcal_get_repeated_wall_time_option(\IntlCalendar $calendar) : int
{
}<?php 

function intltz_get_id_for_windows_id(string $timezoneId, ?string $region = null) : string|false
{
}<?php 

/* timezone */
function intltz_count_equivalent_ids(string $timezoneId) : int|false
{
}<?php 

function intltz_get_display_name(\IntlTimeZone $timezone, bool $dst = false, int $style = IntlTimeZone::DISPLAY_LONG, ?string $locale = null) : string|false
{
}<?php 

/**
 * @refcount 1
 */
function msgfmt_parse_message(string $locale, string $pattern, string $message) : array|false
{
}<?php 

/**
 * @refcount 1
 */
function transliterator_list_ids() : array|false
{
}<?php 

function intlcal_get_skipped_wall_time_option(\IntlCalendar $calendar) : int
{
}<?php 

function locale_get_display_name(string $locale, ?string $displayLocale = null) : string|false
{
}<?php 

/* collator */
function collator_create(string $locale) : ?\Collator
{
}<?php 

function locale_get_region(string $locale) : ?string
{
}<?php 

/** @generate-function-entries */
class NumberFormatter
{
    public function __construct(string $locale, int $style, ?string $pattern = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias numfmt_create
     * @return (NumberFormatter | null)
     */
    public static function create(string $locale, int $style, ?string $pattern = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias numfmt_format
     * @return (string | false)
     */
    public function format(int|float $num, int $type = NumberFormatter::TYPE_DEFAULT)
    {
    }
    /**
     * @param int $offset
     * @tentative-return-type
     * @alias numfmt_parse
     * @return (int | float | false)
     */
    public function parse(string $string, int $type = NumberFormatter::TYPE_DOUBLE, &$offset = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias numfmt_format_currency
     * @return (string | false)
     */
    public function formatCurrency(float $amount, string $currency)
    {
    }
    /**
     * @param string $currency
     * @param int $offset
     * @tentative-return-type
     * @alias numfmt_parse_currency
     * @return (float | false)
     */
    public function parseCurrency(string $string, &$currency, &$offset = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias numfmt_set_attribute
     * @return bool
     */
    public function setAttribute(int $attribute, int|float $value)
    {
    }
    /**
     * @tentative-return-type
     * @alias numfmt_get_attribute
     * @return (int | float | false)
     */
    public function getAttribute(int $attribute)
    {
    }
    /**
     * @tentative-return-type
     * @alias numfmt_set_text_attribute
     * @return bool
     */
    public function setTextAttribute(int $attribute, string $value)
    {
    }
    /**
     * @tentative-return-type
     * @alias numfmt_get_text_attribute
     * @return (string | false)
     */
    public function getTextAttribute(int $attribute)
    {
    }
    /**
     * @tentative-return-type
     * @alias numfmt_set_symbol
     * @return bool
     */
    public function setSymbol(int $symbol, string $value)
    {
    }
    /**
     * @tentative-return-type
     * @alias numfmt_get_symbol
     * @return (string | false)
     */
    public function getSymbol(int $symbol)
    {
    }
    /**
     * @tentative-return-type
     * @alias numfmt_set_pattern
     * @return bool
     */
    public function setPattern(string $pattern)
    {
    }
    /**
     * @tentative-return-type
     * @alias numfmt_get_pattern
     * @return (string | false)
     */
    public function getPattern()
    {
    }
    /**
     * @tentative-return-type
     * @alias numfmt_get_locale
     * @return (string | false)
     */
    public function getLocale(int $type = ULOC_ACTUAL_LOCALE)
    {
    }
    /**
     * @tentative-return-type
     * @alias numfmt_get_error_code
     * @return int
     */
    public function getErrorCode()
    {
    }
    /**
     * @tentative-return-type
     * @alias numfmt_get_error_message
     * @return string
     */
    public function getErrorMessage()
    {
    }
}<?php 

function datefmt_get_timetype(\IntlDateFormatter $formatter) : int|false
{
}<?php 

/* dateformat */
/** @param IntlTimeZone|DateTimeZone|string|null $timezone */
#[\Until('8.1')]
function datefmt_create(?string $locale, int $dateType, int $timeType, $timezone = null, \IntlCalendar|int|null $calendar = null, ?string $pattern = null) : ?\IntlDateFormatter
{
}
/* dateformat */
/** @param IntlTimeZone|DateTimeZone|string|null $timezone */
#[\Since('8.1')]
function datefmt_create(?string $locale, int $dateType = IntlDateFormatter::FULL, int $timeType = IntlDateFormatter::FULL, $timezone = null, \IntlCalendar|int|null $calendar = null, ?string $pattern = null) : ?\IntlDateFormatter
{
}<?php 

/** @generate-function-entries */
class MessageFormatter
{
    public function __construct(string $locale, string $pattern)
    {
    }
    /**
     * @tentative-return-type
     * @alias msgfmt_create
     * @return (MessageFormatter | null)
     */
    public static function create(string $locale, string $pattern)
    {
    }
    /**
     * @tentative-return-type
     * @alias msgfmt_format
     * @return (string | false)
     */
    public function format(array $values)
    {
    }
    /**
     * @tentative-return-type
     * @alias msgfmt_format_message
     * @return (string | false)
     */
    public static function formatMessage(string $locale, string $pattern, array $values)
    {
    }
    /**
     * @return array|false
     * @alias msgfmt_parse
     */
    public function parse(string $string)
    {
    }
    /**
     * @return array|false
     * @alias msgfmt_parse_message
     */
    public static function parseMessage(string $locale, string $pattern, string $message)
    {
    }
    /**
     * @tentative-return-type
     * @alias msgfmt_set_pattern
     * @return bool
     */
    public function setPattern(string $pattern)
    {
    }
    /**
     * @tentative-return-type
     * @alias msgfmt_get_pattern
     * @return (string | false)
     */
    public function getPattern()
    {
    }
    /**
     * @tentative-return-type
     * @alias msgfmt_get_locale
     * @return string
     */
    public function getLocale()
    {
    }
    /**
     * @tentative-return-type
     * @alias msgfmt_get_error_code
     * @return int
     */
    public function getErrorCode()
    {
    }
    /**
     * @tentative-return-type
     * @alias msgfmt_get_error_message
     * @return string
     */
    public function getErrorMessage()
    {
    }
}<?php 

function intlcal_get_greatest_minimum(\IntlCalendar $calendar, int $field) : int|false
{
}<?php 

function grapheme_strpos(string $haystack, string $needle, int $offset = 0) : int|false
{
}<?php 

function intlcal_add(\IntlCalendar $calendar, int $field, int $value) : bool
{
}<?php 

function numfmt_get_error_message(\NumberFormatter $formatter) : string
{
}<?php 

/** @generate-function-entries */
class Spoofchecker
{
    public function __construct()
    {
    }
    /**
     * @param int $errorCode
     * @tentative-return-type
     * @return bool
     */
    public function isSuspicious(string $string, &$errorCode = null)
    {
    }
    /**
     * @param int $errorCode
     * @tentative-return-type
     * @return bool
     */
    public function areConfusable(string $string1, string $string2, &$errorCode = null)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setAllowedLocales(string $locales)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setChecks(int $checks)
    {
    }
    #if U_ICU_VERSION_MAJOR_NUM >= 58
    /**
     * @tentative-return-type
     * @return void
     */
    public function setRestrictionLevel(int $level)
    {
    }
}<?php 

function collator_get_strength(\Collator $object) : int
{
}<?php 

function tidy_getopt(\tidy $tidy, string $option) : string|int|bool
{
}<?php 

final class tidyNode
{
    private function __construct()
    {
    }
    public function hasChildren() : bool
    {
    }
    public function hasSiblings() : bool
    {
    }
    public function isComment() : bool
    {
    }
    public function isHtml() : bool
    {
    }
    public function isText() : bool
    {
    }
    public function isJste() : bool
    {
    }
    public function isAsp() : bool
    {
    }
    public function isPhp() : bool
    {
    }
    public function getParent() : ?tidyNode
    {
    }
}<?php 

/** @generate-function-entries */
function tidy_parse_string(string $string, array|string|null $config = null, ?string $encoding = null) : \tidy|false
{
}<?php 

function tidy_get_html_ver(\tidy $tidy) : int
{
}<?php 

function tidy_get_root(\tidy $tidy) : ?\tidyNode
{
}<?php 

function tidy_get_html(\tidy $tidy) : ?\tidyNode
{
}<?php 

function tidy_access_count(\tidy $tidy) : int
{
}<?php 

function tidy_parse_file(string $filename, array|string|null $config = null, ?string $encoding = null, bool $useIncludePath = false) : \tidy|false
{
}<?php 

function tidy_get_output(\tidy $tidy) : string
{
}<?php 

function tidy_error_count(\tidy $tidy) : int
{
}<?php 

function tidy_repair_file(string $filename, array|string|null $config = null, ?string $encoding = null, bool $useIncludePath = false) : string|false
{
}<?php 

function tidy_get_head(\tidy $tidy) : ?\tidyNode
{
}<?php 

function tidy_get_release() : string
{
}<?php 

function tidy_diagnose(\tidy $tidy) : bool
{
}<?php 

function tidy_warning_count(\tidy $tidy) : int
{
}<?php 

function tidy_get_status(\tidy $tidy) : int
{
}<?php 

function tidy_clean_repair(\tidy $tidy) : bool
{
}<?php 

function tidy_get_body(\tidy $tidy) : ?\tidyNode
{
}<?php 

function tidy_repair_string(string $string, array|string|null $config = null, ?string $encoding = null) : string|false
{
}<?php 

function tidy_is_xml(\tidy $tidy) : bool
{
}<?php 

function tidy_is_xhtml(\tidy $tidy) : bool
{
}<?php 

#endif
function tidy_get_config(\tidy $tidy) : array
{
}<?php 

function tidy_get_error_buffer(\tidy $tidy) : string|false
{
}<?php 

#ifdef HAVE_TIDYOPTGETDOC
function tidy_get_opt_doc(\tidy $tidy, string $option) : string|false
{
}<?php 

class tidy
{
    public function __construct(?string $filename = null, array|string|null $config = null, ?string $encoding = null, bool $useIncludePath = false)
    {
    }
    /**
     * @tentative-return-type
     * @alias tidy_getopt
     * @return (string | int | bool)
     */
    public function getOpt(string $option)
    {
    }
    /**
     * @tentative-return-type
     * @alias tidy_clean_repair
     * @return bool
     */
    public function cleanRepair()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function parseFile(string $filename, array|string|null $config = null, ?string $encoding = null, bool $useIncludePath = false)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function parseString(string $string, array|string|null $config = null, ?string $encoding = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias tidy_repair_string
     * @return (string | false)
     */
    public static function repairString(string $string, array|string|null $config = null, ?string $encoding = null)
    {
    }
    /**
     * @tentative-return-type
     * @alias tidy_repair_file
     * @return (string | false)
     */
    public static function repairFile(string $filename, array|string|null $config = null, ?string $encoding = null, bool $useIncludePath = false)
    {
    }
    /**
     * @tentative-return-type
     * @alias tidy_diagnose
     * @return bool
     */
    public function diagnose()
    {
    }
    /**
     * @tentative-return-type
     * @alias tidy_get_release
     * @return string
     */
    public function getRelease()
    {
    }
    /**
     * @tentative-return-type
     * @alias tidy_get_config
     * @return array
     */
    public function getConfig()
    {
    }
    /**
     * @tentative-return-type
     * @alias tidy_get_status
     * @return int
     */
    public function getStatus()
    {
    }
    /**
     * @tentative-return-type
     * @alias tidy_get_html_ver
     * @return int
     */
    public function getHtmlVer()
    {
    }
    #ifdef HAVE_TIDYOPTGETDOC
    /**
     * @tentative-return-type
     * @alias tidy_get_opt_doc
     * @return (string | false)
     */
    public function getOptDoc(string $option)
    {
    }
    #endif
    /**
     * @tentative-return-type
     * @alias tidy_is_xhtml
     * @return bool
     */
    public function isXhtml()
    {
    }
    /**
     * @tentative-return-type
     * @alias tidy_is_xml
     * @return bool
     */
    public function isXml()
    {
    }
    /**
     * @tentative-return-type
     * @alias tidy_get_root
     * @return (tidyNode | null)
     */
    public function root()
    {
    }
    /**
     * @tentative-return-type
     * @alias tidy_get_head
     * @return (tidyNode | null)
     */
    public function head()
    {
    }
    /**
     * @tentative-return-type
     * @alias tidy_get_html
     * @return (tidyNode | null)
     */
    public function html()
    {
    }
    /**
     * @tentative-return-type
     * @alias tidy_get_body
     * @return (tidyNode | null)
     */
    public function body()
    {
    }
}<?php 

function tidy_config_count(\tidy $tidy) : int
{
}<?php 

/** @generate-function-entries */
// These are extension methods for PDO. This is not a real class.
class PDO_PGSql_Ext
{
    /**
     * @tentative-return-type
     * @return bool
     */
    public function pgsqlCopyFromArray(string $tableName, array $rows, string $separator = "\t", string $nullAs = "\\\\N", ?string $fields = null)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function pgsqlCopyFromFile(string $tableName, string $filename, string $separator = "\t", string $nullAs = "\\\\N", ?string $fields = null)
    {
    }
    /**
     * @tentative-return-type
     * @return (array | false)
     */
    public function pgsqlCopyToArray(string $tableName, string $separator = "\t", string $nullAs = "\\\\N", ?string $fields = null)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function pgsqlCopyToFile(string $tableName, string $filename, string $separator = "\t", string $nullAs = "\\\\N", ?string $fields = null)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function pgsqlLOBCreate()
    {
    }
    /** @return resource|false */
    public function pgsqlLOBOpen(string $oid, string $mode = "rb")
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function pgsqlLOBUnlink(string $oid)
    {
    }
    /**
     * @tentative-return-type
     * @return (array | false)
     */
    public function pgsqlGetNotify(int $fetchMode = PDO::FETCH_USE_DEFAULT, int $timeoutMilliseconds = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function pgsqlGetPid()
    {
    }
}<?php 

function session_id(?string $id = null) : string|false
{
}<?php 

interface SessionUpdateTimestampHandlerInterface
{
    /**
     * @tentative-return-type
     * @return bool
     */
    public function validateId(string $id);
    /**
     * @tentative-return-type
     * @return bool
     */
    public function updateTimestamp(string $id, string $data);
}<?php 

function session_abort() : bool
{
}<?php 

function session_destroy() : bool
{
}<?php 

class SessionHandler implements \SessionHandlerInterface, \SessionIdInterface
{
    /**
     * @tentative-return-type
     * @return bool
     */
    public function open(string $path, string $name)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function close()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function read(string $id)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function write(string $id, string $data)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function destroy(string $id)
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function gc(int $max_lifetime)
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function create_sid()
    {
    }
}<?php 

/**
 * @param callable|object $open
 * @param callable|bool $close
 */
function session_set_save_handler($open, $close = UNKNOWN, callable $read = UNKNOWN, callable $write = UNKNOWN, callable $destroy = UNKNOWN, callable $gc = UNKNOWN, callable $create_sid = UNKNOWN, callable $validate_sid = UNKNOWN, callable $update_timestamp = UNKNOWN) : bool
{
}<?php 

/** @alias session_write_close */
function session_commit() : bool
{
}<?php 

function session_status() : int
{
}<?php 

/** @generate-function-entries */
function session_name(?string $name = null) : string|false
{
}<?php 

function session_unset() : bool
{
}<?php 

interface SessionIdInterface
{
    /**
     * @tentative-return-type
     * @return string
     */
    public function create_sid();
}<?php 

interface SessionHandlerInterface
{
    /**
     * @tentative-return-type
     * @return bool
     */
    public function open(string $path, string $name);
    /**
     * @tentative-return-type
     * @return bool
     */
    public function close();
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function read(string $id);
    /**
     * @tentative-return-type
     * @return bool
     */
    public function write(string $id, string $data);
    /**
     * @tentative-return-type
     * @return bool
     */
    public function destroy(string $id);
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function gc(int $max_lifetime);
}<?php 

function session_set_cookie_params(array|int $lifetime_or_options, ?string $path = null, ?string $domain = null, ?bool $secure = null, ?bool $httponly = null) : bool
{
}<?php 

function session_regenerate_id(bool $delete_old_session = false) : bool
{
}<?php 

function session_register_shutdown() : void
{
}<?php 

function session_write_close() : bool
{
}<?php 

function session_module_name(?string $module = null) : string|false
{
}<?php 

function session_cache_limiter(?string $value = null) : string|false
{
}<?php 

function session_save_path(?string $path = null) : string|false
{
}<?php 

function session_start(array $options = []) : bool
{
}<?php 

/**
 * @refcount 1
 */
function session_get_cookie_params() : array
{
}<?php 

function session_decode(string $data) : bool
{
}<?php 

function session_gc() : int|false
{
}<?php 

function session_create_id(string $prefix = "") : string|false
{
}<?php 

function session_encode() : string|false
{
}<?php 

function session_cache_expire(?int $value = null) : int|false
{
}<?php 

function session_reset() : bool
{
}<?php 

function posix_strerror(int $error_code) : string
{
}<?php 

#endif
#ifdef HAVE_SETRLIMIT
function posix_setrlimit(int $resource, int $soft_limit, int $hard_limit) : bool
{
}<?php 

#endif
function posix_getpgrp() : int
{
}<?php 

#endif
#ifdef HAVE_GETGROUPS
/**
 * @refcount 1
 */
function posix_getgroups() : array|false
{
}<?php 

function posix_getppid() : int
{
}<?php 

#ifdef HAVE_GETRLIMIT
/**
 * @refcount 1
 */
function posix_getrlimit() : array|false
{
}<?php 

#endif
#ifdef HAVE_GETLOGIN
function posix_getlogin() : string|false
{
}<?php 

#endif
function posix_setpgid(int $process_id, int $process_group_id) : bool
{
}<?php 

#ifdef HAVE_GETPGID
function posix_getpgid(int $process_id) : int|false
{
}<?php 

#endif
function posix_access(string $filename, int $flags = 0) : bool
{
}<?php 

function posix_getcwd() : string|false
{
}<?php 

/** @generate-function-entries */
function posix_kill(int $process_id, int $signal) : bool
{
}<?php 

function posix_setgid(int $group_id) : bool
{
}<?php 

#endif
/**
 * @refcount 1
 */
function posix_uname() : array|false
{
}<?php 

#ifdef HAVE_CTERMID
function posix_ctermid() : string|false
{
}<?php 

#endif
function posix_get_last_error() : int
{
}<?php 

#ifdef HAVE_SETSID
function posix_setsid() : int
{
}<?php 

/**
 * @refcount 1
 */
function posix_getgrnam(string $name) : array|false
{
}<?php 

#endif
#ifdef HAVE_GETSID
function posix_getsid(int $process_id) : int|false
{
}<?php 

/**
 * @refcount 1
 */
function posix_getpwuid(int $user_id) : array|false
{
}<?php 

/**
 * @refcount 1
 */
function posix_times() : array|false
{
}<?php 

function posix_getpid() : int
{
}<?php 

/** @param resource|int $file_descriptor */
function posix_isatty($file_descriptor) : bool
{
}<?php 

#endif
#ifdef HAVE_MKNOD
function posix_mknod(string $filename, int $flags, int $major = 0, int $minor = 0) : bool
{
}<?php 

#ifdef HAVE_MKFIFO
function posix_mkfifo(string $filename, int $permissions) : bool
{
}<?php 

function posix_setuid(int $user_id) : bool
{
}<?php 

#endif
/** @param resource|int $file_descriptor */
function posix_ttyname($file_descriptor) : string|false
{
}<?php 

/**
 * @refcount 1
 */
function posix_getgrgid(int $group_id) : array|false
{
}<?php 

function posix_getuid() : int
{
}<?php 

/** @alias posix_get_last_error */
function posix_errno() : int
{
}<?php 

#endif
function posix_getgid() : int
{
}<?php 

/**
 * @refcount 1
 */
function posix_getpwnam(string $username) : array|false
{
}<?php 

function posix_getegid() : int
{
}<?php 

function posix_geteuid() : int
{
}<?php 

#ifdef HAVE_SETEGID
function posix_setegid(int $group_id) : bool
{
}<?php 

#ifdef HAVE_INITGROUPS
function posix_initgroups(string $username, int $group_id) : bool
{
}<?php 

#ifdef HAVE_SETEUID
function posix_seteuid(int $user_id) : bool
{
}<?php 

function juliantojd(int $month, int $day, int $year) : int
{
}<?php 

function frenchtojd(int $month, int $day, int $year) : int
{
}<?php 

/** @generate-function-entries */
function cal_days_in_month(int $calendar, int $month, int $year) : int
{
}<?php 

/**
 * @refcount 1
 */
function cal_from_jd(int $julian_day, int $calendar) : array
{
}<?php 

function jdtounix(int $julian_day) : int
{
}<?php 

function jdtojewish(int $julian_day, bool $hebrew = false, int $flags = 0) : string
{
}<?php 

function jdtofrench(int $julian_day) : string
{
}<?php 

function easter_date(?int $year = null, int $mode = CAL_EASTER_DEFAULT) : int
{
}<?php 

function gregoriantojd(int $month, int $day, int $year) : int
{
}<?php 

function jdmonthname(int $julian_day, int $mode) : string
{
}<?php 

function jdtogregorian(int $julian_day) : string
{
}<?php 

function jdtojulian(int $julian_day) : string
{
}<?php 

function jddayofweek(int $julian_day, int $mode = CAL_DOW_DAYNO) : int|string
{
}<?php 

function cal_to_jd(int $calendar, int $month, int $day, int $year) : int
{
}<?php 

function unixtojd(?int $timestamp = null) : int|false
{
}<?php 

function jewishtojd(int $month, int $day, int $year) : int
{
}<?php 

function easter_days(?int $year = null, int $mode = CAL_EASTER_DEFAULT) : int
{
}<?php 

/**
 * @refcount 1
 */
function cal_info(int $calendar = -1) : array
{
}<?php 

/** @generate-function-entries */
final class Shmop
{
}<?php 

function shmop_write(\Shmop $shmop, string $data, int $offset) : int
{
}<?php 

function shmop_delete(\Shmop $shmop) : bool
{
}<?php 

function shmop_read(\Shmop $shmop, int $offset, int $size) : string
{
}<?php 

/** @deprecated */
function shmop_close(\Shmop $shmop) : void
{
}<?php 

function shmop_open(int $key, string $mode, int $permissions, int $size) : \Shmop|false
{
}<?php 

function shmop_size(\Shmop $shmop) : int
{
}<?php 

function dcgettext(string $domain, string $message, int $category) : string
{
}<?php 

#ifdef HAVE_NGETTEXT
function ngettext(string $singular, string $plural, int $count) : string
{
}<?php 

function bindtextdomain(string $domain, ?string $directory) : string|false
{
}<?php 

function dgettext(string $domain, string $message) : string
{
}<?php 

#endif
#ifdef HAVE_DCNGETTEXT
function dcngettext(string $domain, string $singular, string $plural, int $count, int $category) : string
{
}<?php 

#endif
#ifdef HAVE_BIND_TEXTDOMAIN_CODESET
function bind_textdomain_codeset(string $domain, ?string $codeset) : string|false
{
}<?php 

function gettext(string $message) : string
{
}<?php 

#endif
#ifdef HAVE_DNGETTEXT
function dngettext(string $domain, string $singular, string $plural, int $count) : string
{
}<?php 

/** @alias gettext */
function _(string $message) : string
{
}<?php 

/** @generate-function-entries */
function textdomain(?string $domain) : string
{
}<?php 

#[\Since('8.1')]
function sodium_crypto_scalarmult_ristretto255_base(string $n) : string
{
}<?php 

#[\Since('8.1')]
function sodium_crypto_core_ristretto255_scalar_sub(string $x, string $y) : string
{
}<?php 

function sodium_crypto_pwhash_scryptsalsa208sha256_str_verify(string $hash, string $password) : bool
{
}<?php 

function sodium_crypto_stream(int $length, string $nonce, string $key) : string
{
}<?php 

#[\Since('8.1')]
function sodium_crypto_core_ristretto255_scalar_complement(string $s) : string
{
}<?php 

function sodium_crypto_secretstream_xchacha20poly1305_init_push(string $key) : array
{
}<?php 

function sodium_crypto_kx_client_session_keys(string $client_key_pair, string $server_key) : array
{
}<?php 

function sodium_crypto_sign_secretkey(string $key_pair) : string
{
}<?php 

/** @generate-function-entries */
function sodium_crypto_aead_aes256gcm_is_available() : bool
{
}<?php 

function sodium_crypto_box_publickey_from_secretkey(string $secret_key) : string
{
}<?php 

#[\Since('8.1')]
function sodium_crypto_core_ristretto255_scalar_negate(string $s) : string
{
}<?php 

function sodium_crypto_pwhash_scryptsalsa208sha256_str(string $password, int $opslimit, int $memlimit) : string
{
}<?php 

function sodium_base642bin(string $string, int $id, string $ignore = "") : string
{
}<?php 

#ifdef crypto_core_ristretto255_HASHBYTES
#[\Since('8.1')]
function sodium_crypto_scalarmult_ristretto255(string $n, string $p) : string
{
}<?php 

class SodiumException extends \Exception
{
}<?php 

#endif
#if SODIUM_LIBRARY_VERSION_MAJOR > 9 || (SODIUM_LIBRARY_VERSION_MAJOR == 9 && SODIUM_LIBRARY_VERSION_MINOR >= 6)
function sodium_crypto_pwhash_str_needs_rehash(string $password, int $opslimit, int $memlimit) : bool
{
}<?php 

function sodium_crypto_secretstream_xchacha20poly1305_rekey(string &$state) : void
{
}<?php 

function sodium_pad(string $string, int $block_size) : string
{
}<?php 

function sodium_crypto_stream_keygen() : string
{
}<?php 

#if defined(crypto_stream_xchacha20_KEYBYTES)
#[\Since('8.1')]
function sodium_crypto_stream_xchacha20(int $length, string $nonce, string $key) : string
{
}<?php 

#endif
/** @alias sodium_crypto_box_publickey_from_secretkey */
function sodium_crypto_scalarmult_base(string $secret_key) : string
{
}<?php 

function sodium_crypto_sign_keypair() : string
{
}<?php 

#[\Since('8.1')]
function sodium_crypto_core_ristretto255_sub(string $p, string $q) : string
{
}<?php 

function sodium_crypto_generichash_init(string $key = "", int $length = SODIUM_CRYPTO_GENERICHASH_BYTES) : string
{
}<?php 

function sodium_crypto_box_publickey(string $key_pair) : string
{
}<?php 

#ifdef sodium_base64_VARIANT_ORIGINAL
function sodium_bin2base64(string $string, int $id) : string
{
}<?php 

function sodium_crypto_aead_chacha20poly1305_encrypt(string $message, string $additional_data, string $nonce, string $key) : string
{
}<?php 

function sodium_crypto_box_seal_open(string $ciphertext, string $key_pair) : string|false
{
}<?php 

function sodium_crypto_shorthash_keygen() : string
{
}<?php 

function sodium_crypto_box_seed_keypair(string $seed) : string
{
}<?php 

function sodium_crypto_secretstream_xchacha20poly1305_init_pull(string $header, string $key) : string
{
}<?php 

function sodium_crypto_box(string $message, string $nonce, string $key_pair) : string
{
}<?php 

function sodium_crypto_sign_open(string $signed_message, string $public_key) : string|false
{
}<?php 

function sodium_add(string &$string1, string $string2) : void
{
}<?php 

function sodium_crypto_secretbox_open(string $ciphertext, string $nonce, string $key) : string|false
{
}<?php 

function sodium_crypto_aead_chacha20poly1305_ietf_encrypt(string $message, string $additional_data, string $nonce, string $key) : string
{
}<?php 

function sodium_crypto_auth_verify(string $mac, string $message, string $key) : bool
{
}<?php 

function sodium_crypto_generichash_keygen() : string
{
}<?php 

function sodium_crypto_sign_seed_keypair(string $seed) : string
{
}<?php 

#ifdef crypto_pwhash_SALTBYTES
function sodium_crypto_pwhash(int $length, string $password, string $salt, int $opslimit, int $memlimit, int $algo = SODIUM_CRYPTO_PWHASH_ALG_DEFAULT) : string
{
}<?php 

function sodium_crypto_box_secretkey(string $key_pair) : string
{
}<?php 

function sodium_crypto_box_seal(string $message, string $public_key) : string
{
}<?php 

#[\Since('8.1')]
function sodium_crypto_core_ristretto255_scalar_reduce(string $s) : string
{
}<?php 

function sodium_crypto_kdf_derive_from_key(int $subkey_length, int $subkey_id, string $context, string $key) : string
{
}<?php 

function sodium_crypto_aead_chacha20poly1305_ietf_keygen() : string
{
}<?php 

function sodium_crypto_box_open(string $ciphertext, string $nonce, string $key_pair) : string|false
{
}<?php 

function sodium_crypto_aead_xchacha20poly1305_ietf_keygen() : string
{
}<?php 

function sodium_crypto_secretstream_xchacha20poly1305_pull(string &$state, string $ciphertext, string $additional_data = "") : array|false
{
}<?php 

#[\Since('8.1')]
function sodium_crypto_core_ristretto255_scalar_mul(string $x, string $y) : string
{
}<?php 

#endif
function sodium_crypto_aead_chacha20poly1305_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key) : string|false
{
}<?php 

#[\Since('8.1')]
function sodium_crypto_core_ristretto255_random() : string
{
}<?php 

#[\Since('8.2')]
function sodium_crypto_stream_xchacha20_xor_ic(#[\SensitiveParameter] string $message, string $nonce, int $counter, #[\SensitiveParameter] string $key) : string
{
}<?php 

function sodium_crypto_sign_keypair_from_secretkey_and_publickey(string $secret_key, string $public_key) : string
{
}<?php 

function sodium_crypto_pwhash_str(string $password, int $opslimit, int $memlimit) : string
{
}<?php 

#endif
function sodium_crypto_auth(string $message, string $key) : string
{
}<?php 

function sodium_crypto_sign_verify_detached(string $signature, string $message, string $public_key) : bool
{
}<?php 

#ifdef crypto_secretstream_xchacha20poly1305_ABYTES
function sodium_crypto_secretstream_xchacha20poly1305_keygen() : string
{
}<?php 

#[\Since('8.1')]
function sodium_crypto_stream_xchacha20_keygen() : string
{
}<?php 

function sodium_crypto_aead_chacha20poly1305_ietf_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key) : string|false
{
}<?php 

function sodium_crypto_sign_detached(string $message, string $secret_key) : string
{
}<?php 

function sodium_unpad(string $string, int $block_size) : string
{
}<?php 

function sodium_memcmp(string $string1, string $string2) : int
{
}<?php 

function sodium_crypto_pwhash_str_verify(string $hash, string $password) : bool
{
}<?php 

#[\Until('8.2')]
function sodium_crypto_generichash_update(string &$state, string $message) : bool
{
}
#[\Since('8.2')]
function sodium_crypto_generichash_update(string &$state, string $message) : true
{
}<?php 

function sodium_crypto_kx_publickey(string $key_pair) : string
{
}<?php 

function sodium_crypto_kx_seed_keypair(string $seed) : string
{
}<?php 

#[\Since('8.1')]
function sodium_crypto_core_ristretto255_scalar_add(string $x, string $y) : string
{
}<?php 

function sodium_compare(string $string1, string $string2) : int
{
}<?php 

function sodium_crypto_secretstream_xchacha20poly1305_push(string &$state, string $message, string $additional_data = "", int $tag = SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_MESSAGE) : string
{
}<?php 

function sodium_memzero(string &$string) : void
{
}<?php 

function sodium_crypto_aead_aes256gcm_keygen() : string
{
}<?php 

function sodium_crypto_aead_chacha20poly1305_keygen() : string
{
}<?php 

#endif
function sodium_crypto_scalarmult(string $n, string $p) : string
{
}<?php 

function sodium_crypto_auth_keygen() : string
{
}<?php 

function sodium_crypto_box_keypair_from_secretkey_and_publickey(string $secret_key, string $public_key) : string
{
}<?php 

function sodium_crypto_sign_ed25519_pk_to_curve25519(string $public_key) : string
{
}<?php 

function sodium_crypto_generichash(string $message, string $key = "", int $length = SODIUM_CRYPTO_GENERICHASH_BYTES) : string
{
}<?php 

function sodium_crypto_sign_ed25519_sk_to_curve25519(string $secret_key) : string
{
}<?php 

function sodium_crypto_secretbox(string $message, string $nonce, string $key) : string
{
}<?php 

function sodium_crypto_kx_keypair() : string
{
}<?php 

#[\Since('8.1')]
function sodium_crypto_core_ristretto255_scalar_random() : string
{
}<?php 

#[\Since('8.1')]
function sodium_crypto_core_ristretto255_scalar_invert(string $s) : string
{
}<?php 

function sodium_crypto_box_keypair() : string
{
}<?php 

#[\Since('8.1')]
function sodium_crypto_core_ristretto255_from_hash(string $s) : string
{
}<?php 

#ifdef HAVE_AESGCM
function sodium_crypto_aead_aes256gcm_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key) : string|false
{
}<?php 

function sodium_crypto_sign_publickey_from_secretkey(string $secret_key) : string
{
}<?php 

function sodium_crypto_generichash_final(string &$state, int $length = SODIUM_CRYPTO_GENERICHASH_BYTES) : string
{
}<?php 

#[\Since('8.1')]
function sodium_crypto_stream_xchacha20_xor(string $message, string $nonce, string $key) : string
{
}<?php 

#endif
#ifdef crypto_pwhash_scryptsalsa208sha256_SALTBYTES
function sodium_crypto_pwhash_scryptsalsa208sha256(int $length, string $password, string $salt, int $opslimit, int $memlimit) : string
{
}<?php 

function sodium_hex2bin(string $string, string $ignore = "") : string
{
}<?php 

function sodium_crypto_sign(string $message, string $secret_key) : string
{
}<?php 

function sodium_increment(string &$string) : void
{
}<?php 

#[\Since('8.1')]
function sodium_crypto_core_ristretto255_is_valid_point(string $s) : bool
{
}<?php 

/**
 *
 */
function sodium_crypto_kx_server_session_keys(string $server_key_pair, string $client_key) : array
{
}<?php 

#endif
function sodium_crypto_shorthash(string $message, string $key) : string
{
}<?php 

#ifdef crypto_core_ristretto255_HASHBYTES
#[\Since('8.1')]
function sodium_crypto_core_ristretto255_add(string $p, string $q) : string
{
}<?php 

function sodium_bin2hex(string $string) : string
{
}<?php 

function sodium_crypto_stream_xor(string $message, string $nonce, string $key) : string
{
}<?php 

function sodium_crypto_sign_publickey(string $key_pair) : string
{
}<?php 

function sodium_crypto_kx_secretkey(string $key_pair) : string
{
}<?php 

function sodium_crypto_aead_aes256gcm_encrypt(string $message, string $additional_data, string $nonce, string $key) : string
{
}<?php 

#ifdef crypto_aead_xchacha20poly1305_IETF_NPUBBYTES
function sodium_crypto_aead_xchacha20poly1305_ietf_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key) : string|false
{
}<?php 

function sodium_crypto_kdf_keygen() : string
{
}<?php 

function sodium_crypto_secretbox_keygen() : string
{
}<?php 

function sodium_crypto_aead_xchacha20poly1305_ietf_encrypt(string $message, string $additional_data, string $nonce, string $key) : string
{
}<?php 

/** @param resource $ldap */
#[\Until('8.1')]
function ldap_compare($ldap, string $dn, string $attribute, string $value, ?array $controls = null) : bool|int
{
}
#[\Since('8.1')]
function ldap_compare(\LDAP\Connection $ldap, string $dn, string $attribute, string $value, ?array $controls = null) : bool|int
{
}<?php 

/** @param resource $ldap */
#[\Until('8.1')]
function ldap_errno($ldap) : int
{
}
#[\Since('8.1')]
function ldap_errno(\LDAP\Connection $ldap) : int
{
}<?php 

#endif
#ifdef HAVE_LDAP_EXTENDED_OPERATION_S
/**
 * @param resource $ldap
 * @param string $response_data
 * @param string $response_oid
 * @return resource|bool
 */
#[\Until('8.1')]
function ldap_exop($ldap, string $request_oid, ?string $request_data = null, ?array $controls = NULL, &$response_data = UNKNOWN, &$response_oid = null)
{
}
#endif
#ifdef HAVE_LDAP_EXTENDED_OPERATION_S
/**
 * @param string $response_data
 * @param string $response_oid
 */
#[\Since('8.1')]
function ldap_exop(\LDAP\Connection $ldap, string $request_oid, ?string $request_data = null, ?array $controls = NULL, &$response_data = UNKNOWN, &$response_oid = null) : \LDAP\Result|bool
{
}<?php 

#endif
function ldap_escape(string $value, string $ignore = "", int $flags = 0) : string
{
}<?php 

#if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP)
/** @param resource $ldap */
#[\Until('8.1')]
function ldap_rename($ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, ?array $controls = null) : bool
{
}
#if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP)
#[\Since('8.1')]
function ldap_rename(\LDAP\Connection $ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, ?array $controls = null) : bool
{
}<?php 

function ldap_dn2ufn(string $dn) : string|false
{
}<?php 

#ifdef HAVE_LDAP_SASL
/** @param resource $ldap */
#[\Until('8.1')]
function ldap_sasl_bind($ldap, ?string $dn = null, ?string $password = null, ?string $mech = null, ?string $realm = null, ?string $authc_id = null, ?string $authz_id = null, ?string $props = null) : bool
{
}
#ifdef HAVE_LDAP_SASL
#[\Since('8.1')]
function ldap_sasl_bind(\LDAP\Connection $ldap, ?string $dn = null, ?string $password = null, ?string $mech = null, ?string $realm = null, ?string $authc_id = null, ?string $authz_id = null, ?string $props = null) : bool
{
}<?php 

/**
 * @param resource $ldap
 * @param resource $entry
 */
#[\Until('8.1')]
function ldap_first_attribute($ldap, $entry) : string|false
{
}
#[\Since('8.1')]
function ldap_first_attribute(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry) : string|false
{
}<?php 

#endif
#ifdef HAVE_LDAP_PARSE_RESULT
/**
 * @param resource $ldap
 * @param resource $result
 * @param int $error_code
 * @param string $matched_dn
 * @param string $error_message
 * @param array $referrals
 * @param array $controls
 */
#[\Until('8.1')]
function ldap_parse_result($ldap, $result, &$error_code, &$matched_dn = null, &$error_message = null, &$referrals = null, &$controls = null) : bool
{
}
#endif
#ifdef HAVE_LDAP_PARSE_RESULT
/**
 * @param int $error_code
 * @param string $matched_dn
 * @param string $error_message
 * @param array $referrals
 * @param array $controls
 */
#[\Since('8.1')]
function ldap_parse_result(\LDAP\Connection $ldap, \LDAP\Result $result, &$error_code, &$matched_dn = null, &$error_message = null, &$referrals = null, &$controls = null) : bool
{
}<?php 

/** @param resource $ldap */
#[\Until('8.1')]
function ldap_bind($ldap, ?string $dn = null, ?string $password = null) : bool
{
}
#[\Since('8.1')]
function ldap_bind(\LDAP\Connection $ldap, ?string $dn = null, ?string $password = null) : bool
{
}<?php 

#ifdef HAVE_LDAP_PARSE_REFERENCE
/**
 * @param resource $ldap
 * @param resource $entry
 * @param array $referrals
 */
#[\Until('8.1')]
function ldap_parse_reference($ldap, $entry, &$referrals) : bool
{
}
#ifdef HAVE_LDAP_PARSE_REFERENCE
/** @param array $referrals */
#[\Since('8.1')]
function ldap_parse_reference(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry, &$referrals) : bool
{
}<?php 

#endif
#endif
#if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC)
/** @param resource $ldap */
#[\Until('8.1')]
function ldap_set_rebind_proc($ldap, ?callable $callback) : bool
{
}
#endif
#endif
#if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC)
#[\Since('8.1')]
function ldap_set_rebind_proc(\LDAP\Connection $ldap, ?callable $callback) : bool
{
}<?php 

/**
 * @param resource $ldap
 * @param resource $entry
 */
#[\Until('8.1')]
function ldap_get_attributes($ldap, $entry) : array
{
}
/**
 * @return array<int|string, int|string|array>
 * @refcount 1
 */
#[\Since('8.1')]
function ldap_get_attributes(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry) : array
{
}<?php 

/**
 * @param resource $ldap
 * @param resource $entry
 * @return resource|false
 */
#[\Until('8.1')]
function ldap_next_entry($ldap, $entry)
{
}
#[\Since('8.1')]
function ldap_next_entry(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry) : \LDAP\ResultEntry|false
{
}<?php 

/**
 * @param resource $ldap
 * @param resource $entry
 * @alias ldap_get_values_len
 */
#[\Until('8.1')]
function ldap_get_values($ldap, $entry, string $attribute) : array|false
{
}
/**
 * @return array<int|string, int|string>|false
 * @refcount 1
 * @alias ldap_get_values_len
 */
#[\Since('8.1')]
function ldap_get_values(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry, string $attribute) : array|false
{
}<?php 

/**
 * @param resource $ldap
 * @return resource|false
 */
#[\Until('8.1')]
function ldap_bind_ext($ldap, ?string $dn = null, ?string $password = null, ?array $controls = null)
{
}
#[\Since('8.1')]
function ldap_bind_ext(\LDAP\Connection $ldap, ?string $dn = null, ?string $password = null, ?array $controls = null) : \LDAP\Result|false
{
}<?php 

/** @param resource $ldap */
#[\Until('8.1')]
function ldap_mod_del($ldap, string $dn, array $entry, ?array $controls = null) : bool
{
}
#[\Since('8.1')]
function ldap_mod_del(\LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null) : bool
{
}<?php 

/** @generate-function-entries */
#ifdef HAVE_ORALDAP
/** @return resource|false */
#[\Until('8.1')]
function ldap_connect(?string $uri = null, int $port = 389, string $wallet = UNKNOWN, string $password = UNKNOWN, int $auth_mode = GSLC_SSL_NO_AUTH)
{
}
#ifdef HAVE_ORALDAP
#[\Since('8.1')]
function ldap_connect(?string $uri = null, int $port = 389, string $wallet = UNKNOWN, string $password = UNKNOWN, int $auth_mode = GSLC_SSL_NO_AUTH) : \LDAP\Connection|false
{
}<?php 

/**
 * @param resource|array $ldap
 * @return resource|array|false
 */
#[\Until('8.1')]
function ldap_list($ldap, array|string $base, array|string $filter, array $attributes = [], int $attributes_only = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, ?array $controls = null)
{
}
/** @param LDAP\Connection|array $ldap */
#[\Since('8.1')]
function ldap_list($ldap, array|string $base, array|string $filter, array $attributes = [], int $attributes_only = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, ?array $controls = null) : \LDAP\Result|array|false
{
}<?php 

#endif
#ifdef HAVE_LDAP_START_TLS_S
/** @param resource $ldap */
#[\Until('8.1')]
function ldap_start_tls($ldap) : bool
{
}
#endif
#ifdef HAVE_LDAP_START_TLS_S
#[\Since('8.1')]
function ldap_start_tls(\LDAP\Connection $ldap) : bool
{
}<?php 

/**
 * @param resource $ldap
 * @return resource|false
 */
#[\Until('8.1')]
function ldap_add_ext($ldap, string $dn, array $entry, ?array $controls = null)
{
}
#[\Since('8.1')]
function ldap_add_ext(\LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null) : \LDAP\Result|false
{
}<?php 

/**
 * @param resource $ldap
 * @param resource $result
 */
#[\Until('8.1')]
function ldap_count_references($ldap, $result) : int
{
}
#[\Since('8.1')]
function ldap_count_references(\LDAP\Connection $ldap, \LDAP\Result $result) : int
{
}<?php 

/**
 * @param resource $ldap
 * @param resource $result
 */
#[\Until('8.1')]
function ldap_get_entries($ldap, $result) : array|false
{
}
/**
 * @return array<int|string, int|array>|false
 * @refcount 1
 */
#[\Since('8.1')]
function ldap_get_entries(\LDAP\Connection $ldap, \LDAP\Result $result) : array|false
{
}<?php 

/** @param resource $ldap */
#[\Until('8.1')]
function ldap_mod_add($ldap, string $dn, array $entry, ?array $controls = null) : bool
{
}
#[\Since('8.1')]
function ldap_mod_add(\LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null) : bool
{
}<?php 

/** @param resource $ldap */
#[\Until('8.1')]
function ldap_delete($ldap, string $dn, ?array $controls = null) : bool
{
}
#[\Since('8.1')]
function ldap_delete(\LDAP\Connection $ldap, string $dn, ?array $controls = null) : bool
{
}<?php 

function ldap_err2str(int $errno) : string
{
}<?php 

#endif
#ifdef HAVE_LDAP_REFRESH_S
/** @param resource $ldap */
#[\Until('8.1')]
function ldap_exop_refresh($ldap, string $dn, int $ttl) : int|false
{
}
#endif
#ifdef HAVE_LDAP_REFRESH_S
#[\Since('8.1')]
function ldap_exop_refresh(\LDAP\Connection $ldap, string $dn, int $ttl) : int|false
{
}<?php 

/** @param resource $ldap */
#[\Until('8.1')]
function ldap_mod_replace($ldap, string $dn, array $entry, ?array $controls = null) : bool
{
}
#[\Since('8.1')]
function ldap_mod_replace(\LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null) : bool
{
}<?php 

/**
 * @param resource $ldap
 * @return resource|false
 */
#[\Until('8.1')]
function ldap_rename_ext($ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, ?array $controls = null)
{
}
#[\Since('8.1')]
function ldap_rename_ext(\LDAP\Connection $ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, ?array $controls = null) : \LDAP\Result|false
{
}<?php 

/**
 * @param resource $ldap
 * @return resource|false
 */
#[\Until('8.1')]
function ldap_delete_ext($ldap, string $dn, ?array $controls = null)
{
}
#[\Since('8.1')]
function ldap_delete_ext(\LDAP\Connection $ldap, string $dn, ?array $controls = null) : \LDAP\Result|false
{
}<?php 

/** @param resource $ldap */
#[\Until('8.1')]
function ldap_error($ldap) : string
{
}
#[\Since('8.1')]
function ldap_error(\LDAP\Connection $ldap) : string
{
}<?php 

/**
 * @param resource $ldap
 * @alias ldap_mod_replace
 */
#[\Until('8.1')]
function ldap_modify($ldap, string $dn, array $entry, ?array $controls = null) : bool
{
}
/** @alias ldap_mod_replace */
#[\Since('8.1')]
function ldap_modify(\LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null) : bool
{
}<?php 

/**
 * @param resource $ldap
 * @return resource|false
 */
#[\Until('8.1')]
function ldap_mod_add_ext($ldap, string $dn, array $entry, ?array $controls = null)
{
}
#[\Since('8.1')]
function ldap_mod_add_ext(\LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null) : \LDAP\Result|false
{
}<?php 

/**
 * @param resource $ldap
 * @param resource $entry
 */
#[\Until('8.1')]
function ldap_next_attribute($ldap, $entry) : string|false
{
}
#[\Since('8.1')]
function ldap_next_attribute(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry) : string|false
{
}<?php 

/**
 * @param resource $ldap
 * @param resource $entry
 */
#[\Until('8.1')]
function ldap_get_values_len($ldap, $entry, string $attribute) : array|false
{
}
/**
 * @return array<int|string, int|string>|false
 * @refcount 1
 */
#[\Since('8.1')]
function ldap_get_values_len(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry, string $attribute) : array|false
{
}<?php 

/**
 * @param resource|array $ldap
 * @return resource|array|false
 */
#[\Until('8.1')]
function ldap_search($ldap, array|string $base, array|string $filter, array $attributes = [], int $attributes_only = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, ?array $controls = null)
{
}
/** @param LDAP\Connection|array $ldap */
#[\Since('8.1')]
function ldap_search($ldap, array|string $base, array|string $filter, array $attributes = [], int $attributes_only = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, ?array $controls = null) : \LDAP\Result|array|false
{
}<?php 

#endif
#ifdef HAVE_LDAP_WHOAMI_S
/** @param resource $ldap */
#[\Until('8.1')]
function ldap_exop_whoami($ldap) : string|false
{
}
#endif
#ifdef HAVE_LDAP_WHOAMI_S
#[\Since('8.1')]
function ldap_exop_whoami(\LDAP\Connection $ldap) : string|false
{
}<?php 

#endif
/** @param resource $ldap */
#[\Until('8.1')]
function ldap_unbind($ldap) : bool
{
}
#endif
#[\Since('8.1')]
function ldap_unbind(\LDAP\Connection $ldap) : bool
{
}<?php 

/**
 * @param resource $ldap
 * @param resource $entry
 */
#[\Until('8.1')]
function ldap_get_dn($ldap, $entry) : string|false
{
}
#[\Since('8.1')]
function ldap_get_dn(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry) : string|false
{
}<?php 

/**
 * @param resource $ldap
 * @param array|string|int $value
 */
#[\Until('8.1')]
function ldap_get_option($ldap, int $option, &$value = null) : bool
{
}
/** @param array|string|int $value */
#[\Since('8.1')]
function ldap_get_option(\LDAP\Connection $ldap, int $option, &$value = null) : bool
{
}<?php 

/**
 * @param resource $ldap
 * @alias ldap_unbind
 */
#[\Until('8.1')]
function ldap_close($ldap) : bool
{
}
/** @alias ldap_unbind */
#[\Since('8.1')]
function ldap_close(\LDAP\Connection $ldap) : bool
{
}<?php 

namespace LDAP;

/**
 * @strict-properties
 * @not-serializable
 */
#[\Since('8.1')]
final class Result
{
}<?php 

namespace LDAP;

/**
 * @strict-properties
 * @not-serializable
 */
#[\Since('8.1')]
final class Connection
{
}<?php 

namespace LDAP;

/**
 * @strict-properties
 * @not-serializable
 */
#[\Since('8.1')]
final class ResultEntry
{
}<?php 

/**
 * @param resource $ldap
 * @param resource $result
 * @return resource|false
 */
#[\Until('8.1')]
function ldap_first_reference($ldap, $result)
{
}
#[\Since('8.1')]
function ldap_first_reference(\LDAP\Connection $ldap, \LDAP\Result $result) : \LDAP\ResultEntry|false
{
}<?php 

/**
 * @param resource $ldap
 * @return resource|false
 */
#[\Until('8.1')]
function ldap_mod_replace_ext($ldap, string $dn, array $entry, ?array $controls = null)
{
}
#[\Since('8.1')]
function ldap_mod_replace_ext(\LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null) : \LDAP\Result|false
{
}<?php 

/**
 * @refcount 1
 */
function ldap_explode_dn(string $dn, int $with_attrib) : array|false
{
}<?php 

#ifdef STR_TRANSLATION
function ldap_t61_to_8859(string $value) : string|false
{
}<?php 

/** @param resource $ldap */
#[\Until('8.1')]
function ldap_add($ldap, string $dn, array $entry, ?array $controls = null) : bool
{
}
#[\Since('8.1')]
function ldap_add(\LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null) : bool
{
}<?php 

/**
 * @param resource $ldap
 * @param resource $result
 */
#[\Until('8.1')]
function ldap_count_entries($ldap, $result) : int
{
}
#[\Since('8.1')]
function ldap_count_entries(\LDAP\Connection $ldap, \LDAP\Result $result) : int
{
}<?php 

/**
 * @param resource|null $ldap
 * @param array|string|int|bool $value
 */
#[\Until('8.1')]
function ldap_set_option($ldap, int $option, $value) : bool
{
}
/** @param array|string|int|bool $value */
#[\Since('8.1')]
function ldap_set_option(?\LDAP\Connection $ldap, int $option, $value) : bool
{
}<?php 

/** @param resource $ldap */
#[\Until('8.1')]
function ldap_free_result($ldap) : bool
{
}
#[\Since('8.1')]
function ldap_free_result(\LDAP\Result $result) : bool
{
}<?php 

/** @param resource $ldap */
#[\Until('8.1')]
function ldap_modify_batch($ldap, string $dn, array $modifications_info, ?array $controls = null) : bool
{
}
#[\Since('8.1')]
function ldap_modify_batch(\LDAP\Connection $ldap, string $dn, array $modifications_info, ?array $controls = null) : bool
{
}<?php 

/**
 * @param resource $ldap
 * @return resource|false
 */
#[\Until('8.1')]
function ldap_mod_del_ext($ldap, string $dn, array $entry, ?array $controls = null)
{
}
#[\Since('8.1')]
function ldap_mod_del_ext(\LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null) : \LDAP\Result|false
{
}<?php 

/**
 * @param resource $ldap
 * @param resource $entry
 * @return resource|false
 */
#[\Until('8.1')]
function ldap_next_reference($ldap, $entry)
{
}
#[\Since('8.1')]
function ldap_next_reference(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry) : \LDAP\ResultEntry|false
{
}<?php 

function ldap_8859_to_t61(string $value) : string|false
{
}<?php 

#endif
#ifdef HAVE_LDAP_PASSWD
/**
 * @param resource $ldap
 * @param array $controls
 */
#[\Until('8.1')]
function ldap_exop_passwd($ldap, string $user = "", string $old_password = "", string $new_password = "", &$controls = null) : string|bool
{
}
#endif
#ifdef HAVE_LDAP_PASSWD
/**
 * @param array $controls
 */
#[\Since('8.1')]
function ldap_exop_passwd(\LDAP\Connection $ldap, string $user = "", string $old_password = "", string $new_password = "", &$controls = null) : string|bool
{
}<?php 

/**
 * @param resource $ldap
 * @param resource $result
 * @return resource|false
 */
#[\Until('8.1')]
function ldap_first_entry($ldap, $result)
{
}
#[\Since('8.1')]
function ldap_first_entry(\LDAP\Connection $ldap, \LDAP\Result $result) : \LDAP\ResultEntry|false
{
}<?php 

#endif
/**
 * @param resource|array $ldap
 * @return resource|array|false
 */
#[\Until('8.1')]
function ldap_read($ldap, array|string $base, array|string $filter, array $attributes = [], int $attributes_only = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, ?array $controls = null)
{
}
#endif
/** @param LDAP\Connection|array $ldap */
#[\Since('8.1')]
function ldap_read($ldap, array|string $base, array|string $filter, array $attributes = [], int $attributes_only = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, ?array $controls = null) : \LDAP\Result|array|false
{
}<?php 

#endif
#ifdef HAVE_LDAP_PARSE_EXTENDED_RESULT
/**
 * @param resource $ldap
 * @param resource $result
 * @param string $response_data
 * @param string $response_oid
 */
#[\Until('8.1')]
function ldap_parse_exop($ldap, $result, &$response_data = null, &$response_oid = null) : bool
{
}
#endif
#ifdef HAVE_LDAP_PARSE_EXTENDED_RESULT
/**
 * @param string $response_data
 * @param string $response_oid
 */
#[\Since('8.1')]
function ldap_parse_exop(\LDAP\Connection $ldap, \LDAP\Result $result, &$response_data = null, &$response_oid = null) : bool
{
}<?php 

/** @refcount 1 */
#[\Since('8.2')]
function random_bytes(int $length) : string
{
}<?php 

namespace Random;

/**
 * @strict-properties
 */
#[\Since('8.2')]
class RandomError extends \Error
{
}<?php 

namespace Random;

#[\Since('8.2')]
interface Engine
{
    public function generate() : string;
}<?php 

namespace Random;

/**
 * @strict-properties
 */
#[\Since('8.2')]
final class Randomizer
{
    public readonly Engine $engine;
    public function __construct(?Engine $engine = null)
    {
    }
    public function nextInt() : int
    {
    }
    public function getInt(int $min, int $max) : int
    {
    }
    public function getBytes(int $length) : string
    {
    }
    public function shuffleArray(array $array) : array
    {
    }
    public function shuffleBytes(string $bytes) : string
    {
    }
    public function pickArrayKeys(array $array, int $num) : array
    {
    }
    public function __serialize() : array
    {
    }
    public function __unserialize(array $data) : void
    {
    }
}<?php 

namespace Random;

#[\Since('8.2')]
interface CryptoSafeEngine extends \Random\Engine
{
}<?php 

namespace Random;

/**
 * @strict-properties
 */
#[\Since('8.2')]
class BrokenRandomEngineError extends \Random\RandomError
{
}<?php 

namespace Random\Engine;

/**
 * @strict-properties
 */
#[\Since('8.2')]
final class Xoshiro256StarStar implements \Random\Engine
{
    public function __construct(string|int|null $seed = null)
    {
    }
    /** @implementation-alias Random\Engine\Mt19937::generate */
    public function generate() : string
    {
    }
    public function jump() : void
    {
    }
    public function jumpLong() : void
    {
    }
    /** @implementation-alias Random\Engine\Mt19937::__serialize */
    public function __serialize() : array
    {
    }
    /** @implementation-alias Random\Engine\Mt19937::__unserialize */
    public function __unserialize(array $data) : void
    {
    }
    /** @implementation-alias Random\Engine\Mt19937::__debugInfo */
    public function __debugInfo() : array
    {
    }
}<?php 

namespace Random\Engine;

/**
 * @strict-properties
 */
#[\Since('8.2')]
final class PcgOneseq128XslRr64 implements \Random\Engine
{
    public function __construct(string|int|null $seed = null)
    {
    }
    /** @implementation-alias Random\Engine\Mt19937::generate */
    public function generate() : string
    {
    }
    public function jump(int $advance) : void
    {
    }
    /** @implementation-alias Random\Engine\Mt19937::__serialize */
    public function __serialize() : array
    {
    }
    /** @implementation-alias Random\Engine\Mt19937::__unserialize */
    public function __unserialize(array $data) : void
    {
    }
    /** @implementation-alias Random\Engine\Mt19937::__debugInfo */
    public function __debugInfo() : array
    {
    }
}<?php 

namespace Random\Engine;

/**
 * @strict-properties
 * @not-serializable
 */
#[\Since('8.2')]
final class Secure implements \Random\CryptoSafeEngine
{
    /** @implementation-alias Random\Engine\Mt19937::generate */
    public function generate() : string
    {
    }
}<?php 

namespace Random\Engine;

/**
 * @strict-properties
 */
#[\Since('8.2')]
final class Mt19937 implements \Random\Engine
{
    public function __construct(int|null $seed = null, int $mode = MT_RAND_MT19937)
    {
    }
    public function generate() : string
    {
    }
    public function __serialize() : array
    {
    }
    public function __unserialize(array $data) : void
    {
    }
    public function __debugInfo() : array
    {
    }
}<?php 

namespace Random;

/**
 * @strict-properties
 */
#[\Since('8.2')]
class RandomException extends \Exception
{
}<?php 

/** @alias mt_getrandmax */
#[\Since('8.2')]
function getrandmax() : int
{
}<?php 

#[\Since('8.2')]
function mt_rand(int $min = UNKNOWN, int $max = UNKNOWN) : int
{
}<?php 

#[\Since('8.2')]
function mt_srand(int $seed = UNKNOWN, int $mode = MT_RAND_MT19937) : void
{
}<?php 

#[\Since('8.2')]
function mt_getrandmax() : int
{
}<?php 

/** @alias mt_srand */
#[\Since('8.2')]
function srand(int $seed = UNKNOWN, int $mode = MT_RAND_MT19937) : void
{
}<?php 

#[\Since('8.2')]
function lcg_value() : float
{
}<?php 

#[\Since('8.2')]
function random_int(int $min, int $max) : int
{
}<?php 

#[\Since('8.2')]
function rand(int $min = UNKNOWN, int $max = UNKNOWN) : int
{
}<?php 

class PhpToken implements \Stringable
{
    /** @return static[] */
    public static function tokenize(string $code, int $flags = 0) : array
    {
    }
    public final function __construct(int $id, string $text, int $line = -1, int $pos = -1)
    {
    }
    /** @param int|string|array $kind */
    public function is($kind) : bool
    {
    }
    public function isIgnorable() : bool
    {
    }
    public function getTokenName() : ?string
    {
    }
    public function __toString() : string
    {
    }
}<?php 

function token_name(int $id) : string
{
}<?php 

/** @generate-function-entries */
function token_get_all(string $code, int $flags = 0) : array
{
}<?php 

function readline_completion_function(callable $callback) : bool
{
}<?php 

function readline_redisplay() : void
{
}<?php 

#if HAVE_RL_CALLBACK_READ_CHAR
function readline_callback_handler_install(string $prompt, callable $callback) : bool
{
}<?php 

#endif
function readline_read_history(?string $filename = null) : bool
{
}<?php 

#if HAVE_RL_ON_NEW_LINE
function readline_on_new_line() : void
{
}<?php 

function readline_write_history(?string $filename = null) : bool
{
}<?php 

function readline_add_history(string $prompt) : bool
{
}<?php 

#ifdef HAVE_HISTORY_LIST
/**
 * @refcount 1
 */
function readline_list_history() : array
{
}<?php 

/**
 * @param int|string|bool|null $value
 * @return array|int|string|bool|null
 */
function readline_info(?string $var_name = null, $value = null) : mixed
{
}<?php 

function readline_callback_handler_remove() : bool
{
}<?php 

function readline_callback_read_char() : void
{
}<?php 

function readline_clear_history() : bool
{
}<?php 

/** @generate-function-entries */
function readline(?string $prompt = null) : string|false
{
}<?php 

function hash_final(\HashContext $context, bool $binary = false) : string
{
}<?php 

function hash_pbkdf2(string $algo, string $password, string $salt, int $iterations, int $length = 0, bool $binary = false) : string
{
}<?php 

function hash_hkdf(string $algo, string $key, int $length = 0, string $info = "", string $salt = "") : string
{
}<?php 

function hash_update(\HashContext $context, string $data) : bool
{
}<?php 

#[\Until('8.1')]
function hash_file(string $algo, string $filename, bool $binary = false) : string|false
{
}
/** @refcount 1 */
#[\Since('8.1')]
function hash_file(string $algo, string $filename, bool $binary = false, array $options = []) : string|false
{
}<?php 

function hash_equals(string $known_string, string $user_string) : bool
{
}<?php 

function hash_hmac(string $algo, string $data, string $key, bool $binary = false) : string
{
}<?php 

/** @generate-function-entries */
#[\Until('8.1')]
function hash(string $algo, string $data, bool $binary = false) : string
{
}
/** @generate-class-entries */
/** @refcount 1 */
#[\Since('8.1')]
function hash(string $algo, string $data, bool $binary = false, array $options = []) : string
{
}<?php 

function mhash_keygen_s2k(int $algo, string $password, string $salt, int $length) : string|false
{
}<?php 

function hash_copy(\HashContext $context) : \HashContext
{
}<?php 

#ifdef PHP_MHASH_BC
function mhash_get_block_size(int $algo) : int|false
{
}<?php 

#[\Until('8.1')]
function hash_init(string $algo, int $flags = 0, string $key = "") : \HashContext
{
}
/** @refcount 1 */
#[\Since('8.1')]
function hash_init(string $algo, int $flags = 0, string $key = "", array $options = []) : \HashContext
{
}<?php 

function mhash_count() : int
{
}<?php 

/** @param resource|null $stream_context */
function hash_update_file(\HashContext $context, string $filename, $stream_context = null) : bool
{
}<?php 

/** @param resource $stream */
function hash_update_stream(\HashContext $context, $stream, int $length = -1) : int
{
}<?php 

/**
 * @refcount 1
 */
function hash_hmac_algos() : array
{
}<?php 

function mhash(int $algo, string $data, ?string $key = null) : string|false
{
}<?php 

function mhash_get_hash_name(int $algo) : string|false
{
}<?php 

#endif
final class HashContext
{
    private function __construct()
    {
    }
    public function __serialize() : array
    {
    }
    public function __unserialize(array $data) : void
    {
    }
}<?php 

function hash_hmac_file(string $algo, string $filename, string $key, bool $binary = false) : string|false
{
}<?php 

/**
 * @refcount 1
 */
function hash_algos() : array
{
}<?php 

/** @generate-function-entries */
class SQLite3
{
    /** @implementation-alias SQLite3::open */
    public function __construct(string $filename, int $flags = SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE, string $encryptionKey = "")
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function open(string $filename, int $flags = SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE, string $encryptionKey = "")
    {
    }
    /** @return bool */
    public function close()
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public static function version()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function lastInsertRowID()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function lastErrorCode()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function lastExtendedErrorCode()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function lastErrorMsg()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function changes()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function busyTimeout(int $milliseconds)
    {
    }
    #ifndef SQLITE_OMIT_LOAD_EXTENSION
    /**
     * @tentative-return-type
     * @return bool
     */
    public function loadExtension(string $name)
    {
    }
    #endif
    #if SQLITE_VERSION_NUMBER >= 3006011
    /**
     * @tentative-return-type
     * @return bool
     */
    public function backup(SQLite3 $destination, string $sourceDatabase = "main", string $destinationDatabase = "main")
    {
    }
    #endif
    /**
     * @tentative-return-type
     * @return string
     */
    public static function escapeString(string $string)
    {
    }
    /**
     * @tentative-return-type
     * @return (SQLite3Stmt | false)
     */
    public function prepare(string $query)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function exec(string $query)
    {
    }
    /**
     * @tentative-return-type
     * @return (SQLite3Result | false)
     */
    public function query(string $query)
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function querySingle(string $query, bool $entireRow = false)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function createFunction(string $name, callable $callback, int $argCount = -1, int $flags = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function createAggregate(string $name, callable $stepCallback, callable $finalCallback, int $argCount = -1)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function createCollation(string $name, callable $callback)
    {
    }
    /** @return resource|false */
    public function openBlob(string $table, string $column, int $rowid, string $database = "main", int $flags = SQLITE3_OPEN_READONLY)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function enableExceptions(bool $enable = false)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function enableExtendedResultCodes(bool $enable = true)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function setAuthorizer(?callable $callback)
    {
    }
}<?php 

class SQLite3Stmt
{
    private function __construct(SQLite3 $sqlite3, string $query)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function bindParam(string|int $param, mixed &$var, int $type = SQLITE3_TEXT)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function bindValue(string|int $param, mixed $value, int $type = SQLITE3_TEXT)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function clear()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function close()
    {
    }
    /**
     * @tentative-return-type
     * @return (SQLite3Result | false)
     */
    public function execute()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function getSQL(bool $expand = false)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function paramCount()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function readOnly()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function reset()
    {
    }
}<?php 

class SQLite3Result
{
    private function __construct()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function numColumns()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function columnName(int $column)
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function columnType(int $column)
    {
    }
    /**
     * @tentative-return-type
     * @return (array | false)
     */
    public function fetchArray(int $mode = SQLITE3_BOTH)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function reset()
    {
    }
    /** @return bool */
    public function finalize()
    {
    }
}<?php 

#[\Since('8.1')]
class InvalidArgumentException extends \LogicException
{
}<?php 

function spl_autoload_functions() : array
{
}<?php 

function spl_object_id(object $object) : int
{
}<?php 

class RecursiveTreeIterator extends \RecursiveIteratorIterator
{
    /** @param RecursiveIterator|IteratorAggregate $iterator */
    public function __construct($iterator, int $flags = RecursiveTreeIterator::BYPASS_KEY, int $cachingIteratorFlags = CachingIterator::CATCH_GET_CHILD, int $mode = RecursiveTreeIterator::SELF_FIRST)
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function key()
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function current()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getPrefix()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setPostfix(string $postfix)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setPrefixPart(int $part, string $value)
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getEntry()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getPostfix()
    {
    }
}<?php 

abstract class FilterIterator extends \IteratorIterator
{
    /**
     * @tentative-return-type
     * @return bool
     */
    public abstract function accept();
    public function __construct(Iterator $iterator)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function rewind()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function next()
    {
    }
}<?php 

class NoRewindIterator extends \IteratorIterator
{
    public function __construct(Iterator $iterator)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function rewind()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function valid()
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function key()
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function current()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function next()
    {
    }
}<?php 

#[\Since('8.1')]
class DomainException extends \LogicException
{
}<?php 

function spl_autoload_unregister(callable $callback) : bool
{
}<?php 

class RecursiveArrayIterator extends \ArrayIterator implements \RecursiveIterator
{
    /**
     * @tentative-return-type
     * @return bool
     */
    public function hasChildren()
    {
    }
    /**
     * @tentative-return-type
     * @return (RecursiveArrayIterator | null)
     */
    public function getChildren()
    {
    }
}<?php 

class LimitIterator extends \IteratorIterator
{
    public function __construct(Iterator $iterator, int $offset = 0, int $limit = -1)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function rewind()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function valid()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function next()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function seek(int $offset)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getPosition()
    {
    }
}<?php 

/** @generate-function-entries */
interface SplObserver
{
    /**
     * @tentative-return-type
     * @return void
     */
    public function update(SplSubject $subject);
}<?php 

/** @generate-function-entries */
class EmptyIterator implements \Iterator
{
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function current()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function next()
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function key()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function valid()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function rewind()
    {
    }
}<?php 

class RecursiveIteratorIterator implements \OuterIterator
{
    public function __construct(Traversable $iterator, int $mode = RecursiveIteratorIterator::LEAVES_ONLY, int $flags = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function rewind()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function valid()
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function key()
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function current()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function next()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getDepth()
    {
    }
    /**
     * @tentative-return-type
     * @return (RecursiveIterator | null)
     */
    public function getSubIterator(?int $level = null)
    {
    }
    /**
     * @tentative-return-type
     * @return RecursiveIterator
     */
    public function getInnerIterator()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function beginIteration()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function endIteration()
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public function callHasChildren()
    {
    }
    /**
     * @tentative-return-type
     * @return (RecursiveIterator | null)
     */
    public function callGetChildren()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function beginChildren()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function endChildren()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function nextElement()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setMaxDepth(int $maxDepth = -1)
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function getMaxDepth()
    {
    }
}<?php 

/** @generate-function-entries */
class SplFileInfo
{
    public function __construct(string $filename)
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getPath()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getFilename()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getExtension()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getBasename(string $suffix = "")
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getPathname()
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function getPerms()
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function getInode()
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function getSize()
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function getOwner()
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function getGroup()
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function getATime()
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function getMTime()
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function getCTime()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function getType()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isWritable()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isReadable()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isExecutable()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isFile()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isDir()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isLink()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function getLinkTarget()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function getRealPath()
    {
    }
    /**
     * @tentative-return-type
     * @return SplFileInfo
     */
    public function getFileInfo(?string $class = null)
    {
    }
    /**
     * @tentative-return-type
     * @return (SplFileInfo | null)
     */
    public function getPathInfo(?string $class = null)
    {
    }
    /**
     * @param (resource | null) $context
     * @tentative-return-type
     * @return SplFileObject
     */
    public function openFile(string $mode = "r", bool $useIncludePath = false, $context = null)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setFileClass(string $class = SplFileObject::class)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setInfoClass(string $class = SplFileInfo::class)
    {
    }
    /** @implementation-alias SplFileInfo::getPathname */
    public function __toString() : string
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function __debugInfo()
    {
    }
    /**
     * @deprecated
     * @tentative-return-type
     * @return void
     */
    public final function _bad_state_ex()
    {
    }
}<?php 

function spl_object_hash(object $object) : string
{
}<?php 

abstract class SplHeap implements \Iterator, \Countable
{
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function extract()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function insert(mixed $value)
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function top()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function count()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isEmpty()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function rewind()
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function current()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function key()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function next()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function valid()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function recoverFromCorruption()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    protected abstract function compare(mixed $value1, mixed $value2);
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isCorrupted()
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function __debugInfo()
    {
    }
}<?php 

#[\Since('8.1')]
class OutOfBoundsException extends \RuntimeException
{
}<?php 

#ifdef HAVE_GLOB
class GlobIterator extends \FilesystemIterator implements \Countable
{
    public function __construct(string $pattern, int $flags = FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function count()
    {
    }
}<?php 

class RecursiveCallbackFilterIterator extends \CallbackFilterIterator implements \RecursiveIterator
{
    public function __construct(RecursiveIterator $iterator, callable $callback)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias RecursiveFilterIterator::hasChildren
     * @return bool
     */
    public function hasChildren()
    {
    }
    /**
     * @tentative-return-type
     * @return RecursiveCallbackFilterIterator
     */
    public function getChildren()
    {
    }
}<?php 

class CachingIterator extends \IteratorIterator implements \ArrayAccess, \Countable
{
    public function __construct(Iterator $iterator, int $flags = CachingIterator::CALL_TOSTRING)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function rewind()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function valid()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function next()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function hasNext()
    {
    }
    public function __toString() : string
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getFlags()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setFlags(int $flags)
    {
    }
    /**
     * @param string $key
     * @tentative-return-type
     * @return mixed
     */
    public function offsetGet($key)
    {
    }
    /**
     * @param string $key
     * @tentative-return-type
     * @return void
     */
    public function offsetSet($key, mixed $value)
    {
    }
    /**
     * @param string $key
     * @tentative-return-type
     * @return void
     */
    public function offsetUnset($key)
    {
    }
    /**
     * @param string $key
     * @tentative-return-type
     * @return bool
     */
    public function offsetExists($key)
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function getCache()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function count()
    {
    }
}<?php 

abstract class RecursiveFilterIterator extends \FilterIterator implements \RecursiveIterator
{
    public function __construct(RecursiveIterator $iterator)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function hasChildren()
    {
    }
    /**
     * @tentative-return-type
     * @return (RecursiveFilterIterator | null)
     */
    public function getChildren()
    {
    }
}<?php 

class ArrayIterator implements \SeekableIterator, \ArrayAccess, \Serializable, \Countable
{
    public function __construct(array|object $array = [], int $flags = 0)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias ArrayObject::offsetExists
     * @return bool
     */
    public function offsetExists(mixed $key)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias ArrayObject::offsetGet
     * @return mixed
     */
    public function offsetGet(mixed $key)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias ArrayObject::offsetSet
     * @return void
     */
    public function offsetSet(mixed $key, mixed $value)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias ArrayObject::offsetUnset
     * @return void
     */
    public function offsetUnset(mixed $key)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias ArrayObject::append
     * @return void
     */
    public function append(mixed $value)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias ArrayObject::getArrayCopy
     * @return array
     */
    public function getArrayCopy()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias ArrayObject::count
     * @return int
     */
    public function count()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias ArrayObject::getFlags
     * @return int
     */
    public function getFlags()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias ArrayObject::setFlags
     * @return void
     */
    public function setFlags(int $flags)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias ArrayObject::asort
     * @return bool
     */
    public function asort(int $flags = SORT_REGULAR)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias ArrayObject::ksort
     * @return bool
     */
    public function ksort(int $flags = SORT_REGULAR)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias ArrayObject::uasort
     * @return bool
     */
    public function uasort(callable $callback)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias ArrayObject::uksort
     * @return bool
     */
    public function uksort(callable $callback)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias ArrayObject::natsort
     * @return bool
     */
    public function natsort()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias ArrayObject::natcasesort
     * @return bool
     */
    public function natcasesort()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias ArrayObject::unserialize
     * @return void
     */
    public function unserialize(string $data)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias ArrayObject::serialize
     * @return string
     */
    public function serialize()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias ArrayObject::__serialize
     * @return array
     */
    public function __serialize()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias ArrayObject::__unserialize
     * @return void
     */
    public function __unserialize(array $data)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function rewind()
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function current()
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function key()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function next()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function valid()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function seek(int $offset)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias ArrayObject::__debugInfo
     * @return array
     */
    public function __debugInfo()
    {
    }
}<?php 

/** @generate-function-entries */
/**
 * @param (object | string) $object_or_class
 * @refcount 1
 */
function class_implements($object_or_class, bool $autoload = true) : array|false
{
}<?php 

class SplMaxHeap extends \SplHeap
{
    /**
     * @tentative-return-type
     * @return int
     */
    protected function compare(mixed $value1, mixed $value2)
    {
    }
}<?php 

class SplTempFileObject extends \SplFileObject
{
    public function __construct(int $maxMemory = 2 * 1024 * 1024)
    {
    }
}<?php 

class RecursiveDirectoryIterator extends \FilesystemIterator implements \RecursiveIterator
{
    public function __construct(string $directory, int $flags = FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function hasChildren(bool $allowLinks = false)
    {
    }
    /**
     * @tentative-return-type
     * @return RecursiveDirectoryIterator
     */
    public function getChildren()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getSubPath()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getSubPathname()
    {
    }
}<?php 

#[\Since('8.1')]
class RuntimeException extends \Exception
{
}<?php 

function spl_autoload_register(?callable $callback = null, bool $throw = true, bool $prepend = false) : bool
{
}<?php 

/**
 * @refcount 1
 */
function spl_classes() : array
{
}<?php 

class SplStack extends \SplDoublyLinkedList
{
}<?php 

#[\Since('8.1')]
class BadFunctionCallException extends \LogicException
{
}<?php 

#[\Since('8.1')]
class BadMethodCallException extends \BadFunctionCallException
{
}<?php 

/**
 * @param (object | string) $object_or_class
 * @refcount 1
 */
function class_uses($object_or_class, bool $autoload = true) : array|false
{
}<?php 

class ParentIterator extends \RecursiveFilterIterator
{
    public function __construct(RecursiveIterator $iterator)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias RecursiveFilterIterator::hasChildren
     * @return bool
     */
    public function accept()
    {
    }
}<?php 

#[\Since('8.1')]
class OutOfRangeException extends \LogicException
{
}<?php 

class AppendIterator extends \IteratorIterator
{
    public function __construct()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function append(Iterator $iterator)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function rewind()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function valid()
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function current()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function next()
    {
    }
    /**
     * @tentative-return-type
     * @return (int | null)
     */
    public function getIteratorIndex()
    {
    }
    /**
     * @tentative-return-type
     * @return ArrayIterator
     */
    public function getArrayIterator()
    {
    }
}<?php 

class RecursiveRegexIterator extends \RegexIterator implements \RecursiveIterator
{
    public function __construct(RecursiveIterator $iterator, string $pattern, int $mode = RecursiveRegexIterator::MATCH, int $flags = 0, int $pregFlags = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function accept()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias RecursiveFilterIterator::hasChildren
     * @return bool
     */
    public function hasChildren()
    {
    }
    /**
     * @tentative-return-type
     * @return RecursiveRegexIterator
     */
    public function getChildren()
    {
    }
}<?php 

class SplObjectStorage implements \Countable, \Iterator, \Serializable, \ArrayAccess
{
    /**
     * @tentative-return-type
     * @return void
     */
    public function attach(object $object, mixed $info = null)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function detach(object $object)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function contains(object $object)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function addAll(SplObjectStorage $storage)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function removeAll(SplObjectStorage $storage)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function removeAllExcept(SplObjectStorage $storage)
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function getInfo()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setInfo(mixed $info)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function count(int $mode = COUNT_NORMAL)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function rewind()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function valid()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function key()
    {
    }
    /**
     * @tentative-return-type
     * @return (object | null)
     */
    public function current()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function next()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function unserialize(string $data)
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function serialize()
    {
    }
    /**
     * @param object $object
     * @tentative-return-type
     * @implementation-alias SplObjectStorage::contains
     * @no-verify Cannot specify arg type because ArrayAccess does not
     * @return bool
     */
    public function offsetExists($object)
    {
    }
    /**
     * @param object $object
     * @tentative-return-type
     * @return mixed
     */
    public function offsetGet($object)
    {
    }
    /**
     * @param object $object
     * @tentative-return-type
     * @implementation-alias SplObjectStorage::attach
     * @no-verify Cannot specify arg type because ArrayAccess does not
     * @return void
     */
    public function offsetSet($object, mixed $info = null)
    {
    }
    /**
     * @param object $object
     * @tentative-return-type
     * @implementation-alias SplObjectStorage::detach
     * @no-verify Cannot specify arg type because ArrayAccess does not
     * @return void
     */
    public function offsetUnset($object)
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getHash(object $object)
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function __serialize()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function __unserialize(array $data)
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function __debugInfo()
    {
    }
}<?php 

function spl_autoload(string $class, ?string $file_extensions = null) : void
{
}<?php 

#[\Since('8.1')]
class UnexpectedValueException extends \RuntimeException
{
}<?php 

class MultipleIterator implements \Iterator
{
    public function __construct(int $flags = MultipleIterator::MIT_NEED_ALL | MultipleIterator::MIT_KEYS_NUMERIC)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getFlags()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setFlags(int $flags)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function attachIterator(Iterator $iterator, string|int|null $info = null)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function detachIterator(Iterator $iterator)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function containsIterator(Iterator $iterator)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function countIterators()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function rewind()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function valid()
    {
    }
    /**
     * @tentative-return-type
     * @return (array | false)
     */
    public function key()
    {
    }
    /**
     * @tentative-return-type
     * @return (array | false)
     */
    public function current()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function next()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias SplObjectStorage::__debugInfo
     * @return array
     */
    public function __debugInfo()
    {
    }
}<?php 

#[\Since('8.1')]
class LengthException extends \LogicException
{
}<?php 

/** @generate-function-entries */
class SplFixedArray implements \IteratorAggregate, \ArrayAccess, \Countable
{
    public function __construct(int $size = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function __wakeup()
    {
    }
    #[\Since('8.2')]
    public function __serialize() : array
    {
    }
    #[\Since('8.2')]
    public function __unserialize(array $data) : void
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function count()
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function toArray()
    {
    }
    /**
     * @tentative-return-type
     * @return SplFixedArray
     */
    public static function fromArray(array $array, bool $preserveKeys = true)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getSize()
    {
    }
    /** @return bool */
    public function setSize(int $size)
    {
    }
    /**
     * @param int $index
     * @tentative-return-type
     * @return bool
     */
    public function offsetExists($index)
    {
    }
    /**
     * @param int $index
     * @tentative-return-type
     * @return mixed
     */
    public function offsetGet($index)
    {
    }
    /**
     * @param int $index
     * @tentative-return-type
     * @return void
     */
    public function offsetSet($index, mixed $value)
    {
    }
    /**
     * @param int $index
     * @tentative-return-type
     * @return void
     */
    public function offsetUnset($index)
    {
    }
    public function getIterator() : Iterator
    {
    }
    #[\Since('8.1')]
    public function jsonSerialize() : array
    {
    }
}<?php 

interface SeekableIterator extends \Iterator
{
    /**
     * @tentative-return-type
     * @return void
     */
    public function seek(int $offset);
}<?php 

/** @generate-function-entries */
class SplDoublyLinkedList implements \Iterator, \Countable, \ArrayAccess, \Serializable
{
    /**
     * @tentative-return-type
     * @return void
     */
    public function add(int $index, mixed $value)
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function pop()
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function shift()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function push(mixed $value)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function unshift(mixed $value)
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function top()
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function bottom()
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function __debugInfo()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function count()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isEmpty()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function setIteratorMode(int $mode)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getIteratorMode()
    {
    }
    /**
     * @param int $index
     * @tentative-return-type
     * @return bool
     */
    public function offsetExists($index)
    {
    }
    /**
     * @param int $index
     * @tentative-return-type
     * @return mixed
     */
    public function offsetGet($index)
    {
    }
    /**
     * @param (int | null) $index
     * @tentative-return-type
     * @return void
     */
    public function offsetSet($index, mixed $value)
    {
    }
    /**
     * @param int $index
     * @tentative-return-type
     * @return void
     */
    public function offsetUnset($index)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function rewind()
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function current()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function key()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function prev()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function next()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function valid()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function unserialize(string $data)
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function serialize()
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function __serialize()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function __unserialize(array $data)
    {
    }
}<?php 

#[\Until('8.2')]
function iterator_count(\Traversable $iterator) : int
{
}
#[\Since('8.2')]
function iterator_count(iterable $iterator) : int
{
}<?php 

function spl_autoload_call(string $class) : void
{
}<?php 

interface RecursiveIterator extends \Iterator
{
    /**
     * @tentative-return-type
     * @return bool
     */
    public function hasChildren();
    /**
     * @tentative-return-type
     * @return (RecursiveIterator | null)
     */
    public function getChildren();
}<?php 

class SplMinHeap extends \SplHeap
{
    /**
     * @tentative-return-type
     * @return int
     */
    protected function compare(mixed $value1, mixed $value2)
    {
    }
}<?php 

#[\Until('8.2')]
function iterator_to_array(\Traversable $iterator, bool $preserve_keys = true) : array
{
}
#[\Since('8.2')]
function iterator_to_array(iterable $iterator, bool $preserve_keys = true) : array
{
}<?php 

class CallbackFilterIterator extends \FilterIterator
{
    public function __construct(Iterator $iterator, callable $callback)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function accept()
    {
    }
}<?php 

class SplQueue extends \SplDoublyLinkedList
{
    /**
     * @tentative-return-type
     * @implementation-alias SplDoublyLinkedList::push
     * @return void
     */
    public function enqueue(mixed $value)
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias SplDoublyLinkedList::shift
     * @return mixed
     */
    public function dequeue()
    {
    }
}<?php 

interface OuterIterator extends \Iterator
{
    /**
     * @tentative-return-type
     * @return (Iterator | null)
     */
    public function getInnerIterator();
}<?php 

class DirectoryIterator extends \SplFileInfo implements \SeekableIterator
{
    public function __construct(string $directory)
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getFilename()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getExtension()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getBasename(string $suffix = "")
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function isDot()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function rewind()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function valid()
    {
    }
    /** @return int|false */
    public function key()
    {
    }
    /** @return DirectoryIterator */
    public function current()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function next()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function seek(int $offset)
    {
    }
    /** @implementation-alias DirectoryIterator::getFilename */
    public function __toString() : string
    {
    }
}<?php 

#[\Since('8.1')]
class RangeException extends \RuntimeException
{
}<?php 

/** @generate-function-entries */
class SplPriorityQueue implements \Iterator, \Countable
{
    /**
     * @tentative-return-type
     * @return int
     */
    public function compare(mixed $priority1, mixed $priority2)
    {
    }
    /** @return bool */
    public function insert(mixed $value, mixed $priority)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function setExtractFlags(int $flags)
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function top()
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function extract()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias SplHeap::count
     * @return int
     */
    public function count()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias SplHeap::isEmpty
     * @return bool
     */
    public function isEmpty()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias SplHeap::rewind
     * @return void
     */
    public function rewind()
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function current()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias SplHeap::key
     * @return int
     */
    public function key()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias SplHeap::next
     * @return void
     */
    public function next()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias SplHeap::valid
     * @return bool
     */
    public function valid()
    {
    }
    /**
     * @return bool
     * @implementation-alias SplHeap::recoverFromCorruption
     */
    public function recoverFromCorruption()
    {
    }
    /**
     * @tentative-return-type
     * @implementation-alias SplHeap::isCorrupted
     * @return bool
     */
    public function isCorrupted()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getExtractFlags()
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function __debugInfo()
    {
    }
}<?php 

#endif
class SplFileObject extends \SplFileInfo implements \RecursiveIterator, \SeekableIterator
{
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    #[\Until('8.1')]
    public function fputcsv(array $fields, string $separator = ",", string $enclosure = "\"", string $escape = "\\")
    {
    }
    /** @param resource|null $context */
    public function __construct(string $filename, string $mode = "r", bool $useIncludePath = false, $context = null)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function rewind()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function eof()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function valid()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function fgets()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function fread(int $length)
    {
    }
    /**
     * @tentative-return-type
     * @return (array | false)
     */
    public function fgetcsv(string $separator = ",", string $enclosure = "\"", string $escape = "\\")
    {
    }
    /** @tentative-return-type */
    #[\Since('8.1')]
    public function fputcsv(array $fields, string $separator = ",", string $enclosure = "\"", string $escape = "\\", string $eol = "\n")
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setCsvControl(string $separator = ",", string $enclosure = "\"", string $escape = "\\")
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function getCsvControl()
    {
    }
    /**
     * @param int $wouldBlock
     * @tentative-return-type
     * @return bool
     */
    public function flock(int $operation, &$wouldBlock = null)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function fflush()
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function ftell()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function fseek(int $offset, int $whence = SEEK_SET)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function fgetc()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function fpassthru()
    {
    }
    /**
     * @tentative-return-type
     * @return (array | int | null)
     */
    public function fscanf(string $format, mixed &...$vars)
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function fwrite(string $data, int $length = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function fstat()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function ftruncate(int $size)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | array | false)
     */
    public function current()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function key()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function next()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setFlags(int $flags)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getFlags()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setMaxLineLen(int $maxLength)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getMaxLineLen()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function hasChildren()
    {
    }
    /**
     * @tentative-return-type
     * @return (RecursiveIterator | null)
     */
    public function getChildren()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function seek(int $line)
    {
    }
    /**
     * @tentative-return-type
     * @alias SplFileObject::fgets
     * @return string
     */
    public function getCurrentLine()
    {
    }
    /** @implementation-alias SplFileObject::fgets */
    public function __toString() : string
    {
    }
}<?php 

/** @generate-function-entries */
class ArrayObject implements \IteratorAggregate, \ArrayAccess, \Serializable, \Countable
{
    public function __construct(array|object $array = [], int $flags = 0, string $iteratorClass = ArrayIterator::class)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function offsetExists(mixed $key)
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function offsetGet(mixed $key)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function offsetSet(mixed $key, mixed $value)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function offsetUnset(mixed $key)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function append(mixed $value)
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function getArrayCopy()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function count()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getFlags()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setFlags(int $flags)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function asort(int $flags = SORT_REGULAR)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function ksort(int $flags = SORT_REGULAR)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function uasort(callable $callback)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function uksort(callable $callback)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function natsort()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function natcasesort()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function unserialize(string $data)
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function serialize()
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function __serialize()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function __unserialize(array $data)
    {
    }
    /**
     * @tentative-return-type
     * @return Iterator
     */
    public function getIterator()
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function exchangeArray(array|object $array)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setIteratorClass(string $iteratorClass)
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getIteratorClass()
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function __debugInfo()
    {
    }
}<?php 

class InfiniteIterator extends \IteratorIterator
{
    public function __construct(Iterator $iterator)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function next()
    {
    }
}<?php 

/**
 * @param (object | string) $object_or_class
 * @refcount 1
 */
function class_parents($object_or_class, bool $autoload = true) : array|false
{
}<?php 

interface SplSubject
{
    /**
     * @tentative-return-type
     * @return void
     */
    public function attach(SplObserver $observer);
    /**
     * @tentative-return-type
     * @return void
     */
    public function detach(SplObserver $observer);
    /**
     * @tentative-return-type
     * @return void
     */
    public function notify();
}<?php 

#[\Since('8.1')]
class OverflowException extends \RuntimeException
{
}<?php 

function iterator_apply(\Traversable $iterator, callable $callback, ?array $args = null) : int
{
}<?php 

function spl_autoload_extensions(?string $file_extensions = null) : string
{
}<?php 

class RecursiveCachingIterator extends \CachingIterator implements \RecursiveIterator
{
    public function __construct(Iterator $iterator, int $flags = RecursiveCachingIterator::CALL_TOSTRING)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function hasChildren()
    {
    }
    /**
     * @tentative-return-type
     * @return (RecursiveCachingIterator | null)
     */
    public function getChildren()
    {
    }
}<?php 

class IteratorIterator implements \OuterIterator
{
    public function __construct(Traversable $iterator, ?string $class = null)
    {
    }
    /**
     * @tentative-return-type
     * @return (Iterator | null)
     */
    public function getInnerIterator()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function rewind()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function valid()
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function key()
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function current()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function next()
    {
    }
}<?php 

/** @generate-class-entries */
#[\Since('8.1')]
class LogicException extends \Exception
{
}<?php 

class RegexIterator extends \FilterIterator
{
    public function __construct(Iterator $iterator, string $pattern, int $mode = RegexIterator::MATCH, int $flags = 0, int $pregFlags = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function accept()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getMode()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setMode(int $mode)
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getFlags()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setFlags(int $flags)
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getRegex()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getPregFlags()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setPregFlags(int $pregFlags)
    {
    }
}<?php 

class FilesystemIterator extends \DirectoryIterator
{
    public function __construct(string $directory, int $flags = FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function rewind()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function key()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | SplFileInfo | FilesystemIterator)
     */
    public function current()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function getFlags()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setFlags(int $flags)
    {
    }
}<?php 

#[\Since('8.1')]
class UnderflowException extends \RuntimeException
{
}<?php 

/** @param resource $dba */
function dba_nextkey($dba) : string|false
{
}<?php 

/**
 * @refcount 1
 */
function dba_handlers(bool $full_info = false) : array
{
}<?php 

/**
 * @param string|array $key
 * @param resource $dba
 */
#[\Until('8.2')]
function dba_exists($key, $dba) : bool
{
}
/** @param resource $dba */
#[\Since('8.2')]
function dba_exists(string|array $key, $dba) : bool
{
}<?php 

/** @generate-function-entries */
/**
 * @param string $path
 * @param string $mode
 * @param string $handler
 * @param string $handler_params
 * @return resource|false
 */
#[\Until('8.2')]
function dba_popen($path, $mode, $handler = UNKNOWN, ...$handler_params)
{
}
#endif
/** @return resource|false */
#[\Since('8.2')]
function dba_popen(string $path, string $mode, ?string $handler = null, int $permission = 0644, int $map_size = 0, ?int $flags = null)
{
}<?php 

/** @param resource $dba */
function dba_sync($dba) : bool
{
}<?php 

/**
 * @param string|array $key
 * @param int|resource $skip actually this parameter is optional, not $dba
 * @param resource $dba
 */
#[\Until('8.2')]
function dba_fetch($key, $skip, $dba = UNKNOWN) : string|false
{
}
/**
 * @param resource|int $dba overloaded legacy signature has params flipped
 * @param resource|int $skip overloaded legacy signature has params flipped
 */
#[\Since('8.2')]
function dba_fetch(string|array $key, $dba, $skip = 0) : string|false
{
}<?php 

/** @param resource $dba */
function dba_close($dba) : void
{
}<?php 

/**
 * @param string $path
 * @param string $mode
 * @param string $handler
 * @param string $handler_params
 * @return resource|false
 */
#[\Until('8.2')]
function dba_open($path, $mode, $handler = UNKNOWN, ...$handler_params)
{
}
/** @return resource|false */
#[\Since('8.2')]
function dba_open(string $path, string $mode, ?string $handler = null, int $permission = 0644, int $map_size = 0, ?int $flags = null)
{
}<?php 

/** @param resource $dba */
function dba_firstkey($dba) : string|false
{
}<?php 

function dba_key_split(string|false|null $key) : array|false
{
}<?php 

function dba_list() : array
{
}<?php 

/** @param resource $dba */
function dba_optimize($dba) : bool
{
}<?php 

/**
 * @param string|array $key
 * @param resource $dba
 */
#[\Until('8.2')]
function dba_delete($key, $dba) : bool
{
}
/** @param resource $dba */
#[\Since('8.2')]
function dba_delete(string|array $key, $dba) : bool
{
}<?php 

/**
 * @param string|array $key
 * @param resource $dba
 */
#[\Until('8.2')]
function dba_replace($key, string $value, $dba) : bool
{
}
/** @param resource $dba */
#[\Since('8.2')]
function dba_replace(string|array $key, string $value, $dba) : bool
{
}<?php 

/**
 * @param string|array $key
 * @param resource $dba
 */
#[\Until('8.2')]
function dba_insert($key, string $value, $dba) : bool
{
}
/** @param resource $dba */
#[\Since('8.2')]
function dba_insert(string|array $key, string $value, $dba) : bool
{
}<?php 

class SoapClient
{
    public function __construct(?string $wsdl, array $options = [])
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function __call(string $name, array $args)
    {
    }
    /**
     * @param (SoapHeader | array | null) $inputHeaders
     * @param array $outputHeaders
     * @tentative-return-type
     * @return mixed
     */
    public function __soapCall(string $name, array $args, ?array $options = null, $inputHeaders = null, &$outputHeaders = null)
    {
    }
    /**
     * @tentative-return-type
     * @return (array | null)
     */
    public function __getFunctions()
    {
    }
    /**
     * @tentative-return-type
     * @return (array | null)
     */
    public function __getTypes()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | null)
     */
    public function __getLastRequest()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | null)
     */
    public function __getLastResponse()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | null)
     */
    public function __getLastRequestHeaders()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | null)
     */
    public function __getLastResponseHeaders()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | null)
     */
    public function __doRequest(string $request, string $location, string $action, int $version, bool $oneWay = false)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function __setCookie(string $name, ?string $value = null)
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function __getCookies()
    {
    }
    /**
     * @param (SoapHeader | array | null) $headers
     * @tentative-return-type
     * @return bool
     */
    public function __setSoapHeaders($headers = null)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | null)
     */
    public function __setLocation(?string $location = null)
    {
    }
}<?php 

class SoapParam
{
    public function __construct(mixed $data, string $name)
    {
    }
}<?php 

class SoapVar
{
    public function __construct(mixed $data, ?int $encoding, ?string $typeName = null, ?string $typeNamespace = null, ?string $nodeName = null, ?string $nodeNamespace = null)
    {
    }
}<?php 

class SoapHeader
{
    public function __construct(string $namespace, string $name, mixed $data = UNKNOWN, bool $mustUnderstand = false, string|int|null $actor = null)
    {
    }
}<?php 

class SoapFault extends \Exception
{
    public function __construct(array|string|null $code, string $string, ?string $actor = null, mixed $details = null, ?string $name = null, mixed $headerFault = null)
    {
    }
    public function __toString() : string
    {
    }
}<?php 

class SoapServer
{
    public function __construct(?string $wsdl, array $options = [])
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function fault(string $code, string $string, string $actor = "", mixed $details = null, string $name = "")
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function addSoapHeader(SoapHeader $header)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setPersistence(int $mode)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setClass(string $class, mixed ...$args)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setObject(object $object)
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function getFunctions()
    {
    }
    /**
     * @param (array | string | int) $functions
     * @tentative-return-type
     * @return void
     */
    public function addFunction($functions)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function handle(?string $request = null)
    {
    }
}<?php 

function is_soap_fault(mixed $object) : bool
{
}<?php 

/** @generate-function-entries */
function use_soap_error_handler(bool $enable = true) : bool
{
}<?php 

/** @generate-function-entries */
class PDOException extends \RuntimeException
{
}<?php 

/** @generate-function-entries */
class PDO
{
    #[\Until('8.1')]
    public function setAttribute(int $attribute, mixed $value)
    {
    }
    public function __construct(string $dsn, ?string $username = null, ?string $password = null, ?array $options = null)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function beginTransaction()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function commit()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | null)
     */
    public function errorCode()
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function errorInfo()
    {
    }
    /**
     * @tentative-return-type
     * @return (int | false)
     */
    public function exec(string $statement)
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | int | string | array | null)
     */
    public function getAttribute(int $attribute)
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public static function getAvailableDrivers()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function inTransaction()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function lastInsertId(?string $name = null)
    {
    }
    /**
     * @tentative-return-type
     * @return (PDOStatement | false)
     */
    public function prepare(string $query, array $options = [])
    {
    }
    /**
     * @tentative-return-type
     * @return (PDOStatement | false)
     */
    public function query(string $query, ?int $fetchMode = null, mixed ...$fetchModeArgs)
    {
    }
    /**
     * @tentative-return-type
     * @return (string | false)
     */
    public function quote(string $string, int $type = PDO::PARAM_STR)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function rollBack()
    {
    }
    #[\Since('8.1')]
    public function setAttribute(int $attribute, mixed $value) : bool
    {
    }
}<?php 

/** @generate-function-entries */
class PDOStatement implements \IteratorAggregate
{
    /**
     * @tentative-return-type
     * @return bool
     */
    public function bindColumn(string|int $column, mixed &$var, int $type = PDO::PARAM_STR, int $maxLength = 0, mixed $driverOptions = null)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function bindParam(string|int $param, mixed &$var, int $type = PDO::PARAM_STR, int $maxLength = 0, mixed $driverOptions = null)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function bindValue(string|int $param, mixed $value, int $type = PDO::PARAM_STR)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function closeCursor()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function columnCount()
    {
    }
    /**
     * @tentative-return-type
     * @return (bool | null)
     */
    public function debugDumpParams()
    {
    }
    /**
     * @tentative-return-type
     * @return (string | null)
     */
    public function errorCode()
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function errorInfo()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function execute(?array $params = null)
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function fetch(int $mode = PDO::FETCH_DEFAULT, int $cursorOrientation = PDO::FETCH_ORI_NEXT, int $cursorOffset = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return array
     */
    public function fetchAll(int $mode = PDO::FETCH_DEFAULT, mixed ...$args)
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function fetchColumn(int $column = 0)
    {
    }
    /**
     * @tentative-return-type
     * @return (object | false)
     */
    public function fetchObject(?string $class = "stdClass", array $constructorArgs = [])
    {
    }
    /**
     * @tentative-return-type
     * @return mixed
     */
    public function getAttribute(int $name)
    {
    }
    /**
     * @tentative-return-type
     * @return (array | false)
     */
    public function getColumnMeta(int $column)
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function nextRowset()
    {
    }
    /**
     * @tentative-return-type
     * @return int
     */
    public function rowCount()
    {
    }
    /**
     * @tentative-return-type
     * @return bool
     */
    public function setAttribute(int $attribute, mixed $value)
    {
    }
    /** @return bool */
    public function setFetchMode(int $mode, mixed ...$args)
    {
    }
    public function getIterator() : Iterator
    {
    }
}<?php 

/**
 * @refcount 1
 */
function pdo_drivers() : array
{
}<?php 

final class PDORow
{
}<?php 

function socket_sendto(\Socket $socket, string $data, int $length, int $flags, string $address, ?int $port = null) : int|false
{
}<?php 

function socket_strerror(int $error_code) : string
{
}<?php 

/** @param array|string|int $value */
function socket_set_option(\Socket $socket, int $level, int $option, $value) : bool
{
}<?php 

/**
 * @param array|string|int $value
 * @alias socket_set_option
 */
function socket_setopt(\Socket $socket, int $level, int $option, $value) : bool
{
}<?php 

function socket_bind(\Socket $socket, string $address, int $port = 0) : bool
{
}<?php 

function socket_read(\Socket $socket, int $length, int $mode = PHP_BINARY_READ) : string|false
{
}<?php 

/** @param string|null $data */
function socket_recv(\Socket $socket, &$data, int $length, int $flags) : int|false
{
}<?php 

function socket_close(\Socket $socket) : void
{
}<?php 

function socket_recvmsg(\Socket $socket, array &$message, int $flags = 0) : int|false
{
}<?php 

/**
 * @refcount 1
 */
function socket_get_option(\Socket $socket, int $level, int $option) : array|int|false
{
}<?php 

function socket_wsaprotocol_info_release(string $info_id) : bool
{
}<?php 

function socket_connect(\Socket $socket, string $address, ?int $port = null) : bool
{
}<?php 

function socket_addrinfo_connect(\AddressInfo $address) : \Socket|false
{
}<?php 

final class AddressInfo
{
}<?php 

/**
 * @param string $address
 * @param int $port
 */
function socket_getpeername(\Socket $socket, &$address, &$port = null) : bool
{
}<?php 

function socket_clear_error(?\Socket $socket = null) : void
{
}<?php 

function socket_cmsg_space(int $level, int $type, int $num = 0) : ?int
{
}<?php 

function socket_create_listen(int $port, int $backlog = 128) : \Socket|false
{
}<?php 

function socket_accept(\Socket $socket) : \Socket|false
{
}<?php 

function socket_addrinfo_bind(\AddressInfo $address) : \Socket|false
{
}<?php 

/** @return resource|false */
function socket_export_stream(\Socket $socket)
{
}<?php 

#endif
#ifdef HAVE_SHUTDOWN
function socket_shutdown(\Socket $socket, int $mode = 2) : bool
{
}<?php 

function socket_wsaprotocol_info_import(string $info_id) : \Socket|false
{
}<?php 

/**
 * @alias socket_get_option
 */
function socket_getopt(\Socket $socket, int $level, int $option) : array|int|false
{
}<?php 

#ifdef PHP_WIN32
function socket_wsaprotocol_info_export(\Socket $socket, int $process_id) : string|false
{
}<?php 

/**
 * @refcount 1
 */
function socket_addrinfo_explain(\AddressInfo $address) : array
{
}<?php 

function socket_write(\Socket $socket, string $data, ?int $length = null) : int|false
{
}<?php 

function socket_listen(\Socket $socket, int $backlog = 0) : bool
{
}<?php 

/** @generate-function-entries */
final class Socket
{
}<?php 

function socket_sendmsg(\Socket $socket, array $message, int $flags = 0) : int|false
{
}<?php 

function socket_select(?array &$read, ?array &$write, ?array &$except, ?int $seconds, int $microseconds = 0) : int|false
{
}<?php 

/**
 * @param string $data
 * @param string $address
 * @param int $port
 */
function socket_recvfrom(\Socket $socket, &$data, int $length, int $flags, &$address, &$port = null) : int|false
{
}<?php 

#endif
function socket_last_error(?\Socket $socket = null) : int
{
}<?php 

#ifdef HAVE_SOCKETPAIR
/** @param array $pair */
function socket_create_pair(int $domain, int $type, int $protocol, &$pair) : bool
{
}<?php 

function socket_create(int $domain, int $type, int $protocol) : \Socket|false
{
}<?php 

/** @param resource $stream */
function socket_import_stream($stream) : \Socket|false
{
}<?php 

function socket_set_nonblock(\Socket $socket) : bool
{
}<?php 

/**
 * @param string $address
 * @param int $port
 */
function socket_getsockname(\Socket $socket, &$address, &$port = null) : bool
{
}<?php 

function socket_set_block(\Socket $socket) : bool
{
}<?php 

/**
 * @refcount 1
 */
function socket_addrinfo_lookup(string $host, ?string $service = null, array $hints = []) : array|false
{
}<?php 

function socket_send(\Socket $socket, string $data, int $length, int $flags) : int|false
{
}<?php 

function curl_close(\CurlHandle $handle) : void
{
}<?php 

function curl_multi_init() : \CurlMultiHandle
{
}<?php 

/**
 * @param int $queued_messages
 * @refcount 1
 */
function curl_multi_info_read(\CurlMultiHandle $multi_handle, &$queued_messages = null) : array|false
{
}<?php 

function curl_multi_getcontent(\CurlHandle $handle) : ?string
{
}<?php 

#if LIBCURL_VERSION_NUM >= 0x071200 /* 7.18.0 */
function curl_pause(\CurlHandle $handle, int $flags) : int
{
}<?php 

function curl_unescape(\CurlHandle $handle, string $string) : string|false
{
}<?php 

function curl_strerror(int $error_code) : ?string
{
}<?php 

function curl_setopt_array(\CurlHandle $handle, array $options) : bool
{
}<?php 

function curl_file_create(string $filename, ?string $mime_type = null, ?string $posted_filename = null) : \CURLFile
{
}<?php 

final class CurlMultiHandle
{
}<?php 

function curl_share_strerror(int $error_code) : ?string
{
}<?php 

function curl_share_close(\CurlShareHandle $share_handle) : void
{
}<?php 

#[\Since('8.1')]
class CURLStringFile
{
    public function __construct(string $data, string $postname, string $mime = "application/octet-stream")
    {
    }
}<?php 

/** @param int $still_running */
function curl_multi_exec(\CurlMultiHandle $multi_handle, &$still_running) : int
{
}<?php 

function curl_copy_handle(\CurlHandle $handle) : \CurlHandle|false
{
}<?php 

/**
 * @refcount 1
 */
function curl_version() : array|false
{
}<?php 

#endif
function curl_exec(\CurlHandle $handle) : string|bool
{
}<?php 

#if LIBCURL_VERSION_NUM >= 0x070f04 /* 7.15.4 */
function curl_escape(\CurlHandle $handle, string $string) : string|false
{
}<?php 

function curl_multi_remove_handle(\CurlMultiHandle $multi_handle, \CurlHandle $handle) : int
{
}<?php 

function curl_init(?string $url = null) : \CurlHandle|false
{
}<?php 

#if LIBCURL_VERSION_NUM >= 0x073E00 /* Available since 7.62.0 */
#[\Since('8.2')]
function curl_upkeep(\CurlHandle $handle) : bool
{
}<?php 

function curl_error(\CurlHandle $handle) : string
{
}<?php 

/** @generate-function-entries */
class CURLFile
{
    public function __construct(string $filename, ?string $mime_type = null, ?string $posted_filename = null)
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getFilename()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getMimeType()
    {
    }
    /**
     * @tentative-return-type
     * @return string
     */
    public function getPostFilename()
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setMimeType(string $mime_type)
    {
    }
    /**
     * @tentative-return-type
     * @return void
     */
    public function setPostFilename(string $posted_filename)
    {
    }
}<?php 

#endif
function curl_reset(\CurlHandle $handle) : void
{
}<?php 

function curl_multi_close(\CurlMultiHandle $multi_handle) : void
{
}<?php 

function curl_getinfo(\CurlHandle $handle, ?int $option = null) : mixed
{
}<?php 

function curl_setopt(\CurlHandle $handle, int $option, mixed $value) : bool
{
}<?php 

function curl_share_setopt(\CurlShareHandle $share_handle, int $option, mixed $value) : bool
{
}<?php 

function curl_multi_select(\CurlMultiHandle $multi_handle, float $timeout = 1.0) : int
{
}<?php 

function curl_share_init() : \CurlShareHandle
{
}<?php 

function curl_errno(\CurlHandle $handle) : int
{
}<?php 

function curl_multi_add_handle(\CurlMultiHandle $multi_handle, \CurlHandle $handle) : int
{
}<?php 

function curl_multi_strerror(int $error_code) : ?string
{
}<?php 

/** @generate-function-entries */
final class CurlHandle
{
}<?php 

function curl_share_errno(\CurlShareHandle $share_handle) : int
{
}<?php 

function curl_multi_errno(\CurlMultiHandle $multi_handle) : int
{
}<?php 

final class CurlShareHandle
{
}<?php 

function curl_multi_setopt(\CurlMultiHandle $multi_handle, int $option, mixed $value) : bool
{
}<?php 

/**
 * @refcount 1
 */
function opcache_get_configuration() : array|false
{
}<?php 

function opcache_compile_file(string $filename) : bool
{
}<?php 

/** @generate-function-entries */
function opcache_reset() : bool
{
}<?php 

function opcache_is_script_cached(string $filename) : bool
{
}<?php 

/**
 * @refcount 1
 */
function opcache_get_status(bool $include_scripts = true) : array|false
{
}<?php 

function opcache_invalidate(string $filename, bool $force = false) : bool
{
}<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette;

/**
 * Static class.
 */
trait StaticClass
{
    /**
     * @return never
     * @throws \Error
     */
    public final function __construct()
    {
        throw new \Error('Class ' . static::class . ' is static and cannot be instantiated.');
    }
    /**
     * Call to undefined static method.
     * @return void
     * @throws MemberAccessException
     */
    public static function __callStatic(string $name, array $args)
    {
        Utils\ObjectHelpers::strictStaticCall(static::class, $name);
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Utils;

use _PHPStan_dcc7b7cff\Nette;
if (\false) {
    /** @deprecated use Nette\HtmlStringable */
    interface IHtmlString extends Nette\HtmlStringable
    {
    }
} elseif (!\interface_exists(IHtmlString::class)) {
    \class_alias(Nette\HtmlStringable::class, IHtmlString::class);
}
namespace _PHPStan_dcc7b7cff\Nette\Localization;

if (\false) {
    /** @deprecated use Nette\Localization\Translator */
    interface ITranslator extends Translator
    {
    }
} elseif (!\interface_exists(ITranslator::class)) {
    \class_alias(Translator::class, ITranslator::class);
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Localization;

/**
 * Translator adapter.
 */
interface Translator
{
    /**
     * Translates the given string.
     * @param  mixed  $message
     * @param  mixed  ...$parameters
     */
    function translate($message, ...$parameters) : string;
}
\interface_exists(ITranslator::class);
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette;

interface HtmlStringable
{
    /**
     * Returns string in HTML format
     */
    function __toString() : string;
}
\interface_exists(Utils\IHtmlString::class);
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Iterators;

/**
 * Applies the callback to the elements of the inner iterator.
 */
class Mapper extends \IteratorIterator
{
    /** @var callable */
    private $callback;
    public function __construct(\Traversable $iterator, callable $callback)
    {
        parent::__construct($iterator);
        $this->callback = $callback;
    }
    #[\ReturnTypeWillChange]
    public function current()
    {
        return ($this->callback)(parent::current(), parent::key());
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Iterators;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Smarter caching iterator.
 *
 * @property-read bool $first
 * @property-read bool $last
 * @property-read bool $empty
 * @property-read bool $odd
 * @property-read bool $even
 * @property-read int $counter
 * @property-read mixed $nextKey
 * @property-read mixed $nextValue
 */
class CachingIterator extends \CachingIterator implements \Countable
{
    use Nette\SmartObject;
    /** @var int */
    private $counter = 0;
    public function __construct($iterator)
    {
        if (\is_array($iterator) || $iterator instanceof \stdClass) {
            $iterator = new \ArrayIterator($iterator);
        } elseif ($iterator instanceof \IteratorAggregate) {
            do {
                $iterator = $iterator->getIterator();
            } while ($iterator instanceof \IteratorAggregate);
            \assert($iterator instanceof \Iterator);
        } elseif ($iterator instanceof \Iterator) {
        } elseif ($iterator instanceof \Traversable) {
            $iterator = new \IteratorIterator($iterator);
        } else {
            throw new Nette\InvalidArgumentException(\sprintf('Invalid argument passed to %s; array or Traversable expected, %s given.', self::class, \is_object($iterator) ? \get_class($iterator) : \gettype($iterator)));
        }
        parent::__construct($iterator, 0);
    }
    /**
     * Is the current element the first one?
     */
    public function isFirst(?int $gridWidth = null) : bool
    {
        return $this->counter === 1 || $gridWidth && $this->counter !== 0 && ($this->counter - 1) % $gridWidth === 0;
    }
    /**
     * Is the current element the last one?
     */
    public function isLast(?int $gridWidth = null) : bool
    {
        return !$this->hasNext() || $gridWidth && $this->counter % $gridWidth === 0;
    }
    /**
     * Is the iterator empty?
     */
    public function isEmpty() : bool
    {
        return $this->counter === 0;
    }
    /**
     * Is the counter odd?
     */
    public function isOdd() : bool
    {
        return $this->counter % 2 === 1;
    }
    /**
     * Is the counter even?
     */
    public function isEven() : bool
    {
        return $this->counter % 2 === 0;
    }
    /**
     * Returns the counter.
     */
    public function getCounter() : int
    {
        return $this->counter;
    }
    /**
     * Returns the count of elements.
     */
    public function count() : int
    {
        $inner = $this->getInnerIterator();
        if ($inner instanceof \Countable) {
            return $inner->count();
        } else {
            throw new Nette\NotSupportedException('Iterator is not countable.');
        }
    }
    /**
     * Forwards to the next element.
     */
    public function next() : void
    {
        parent::next();
        if (parent::valid()) {
            $this->counter++;
        }
    }
    /**
     * Rewinds the Iterator.
     */
    public function rewind() : void
    {
        parent::rewind();
        $this->counter = parent::valid() ? 1 : 0;
    }
    /**
     * Returns the next key.
     * @return mixed
     */
    public function getNextKey()
    {
        return $this->getInnerIterator()->key();
    }
    /**
     * Returns the next element.
     * @return mixed
     */
    public function getNextValue()
    {
        return $this->getInnerIterator()->current();
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette;

use _PHPStan_dcc7b7cff\Nette\Utils\ObjectHelpers;
/**
 * Strict class for better experience.
 * - 'did you mean' hints
 * - access to undeclared members throws exceptions
 * - support for @property annotations
 * - support for calling event handlers stored in $onEvent via onEvent()
 */
trait SmartObject
{
    /**
     * @throws MemberAccessException
     */
    public function __call(string $name, array $args)
    {
        $class = static::class;
        if (ObjectHelpers::hasProperty($class, $name) === 'event') {
            // calling event handlers
            $handlers = $this->{$name} ?? null;
            if (\is_iterable($handlers)) {
                foreach ($handlers as $handler) {
                    $handler(...$args);
                }
            } elseif ($handlers !== null) {
                throw new UnexpectedValueException("Property {$class}::\${$name} must be iterable or null, " . \gettype($handlers) . ' given.');
            }
        } else {
            ObjectHelpers::strictCall($class, $name);
        }
    }
    /**
     * @throws MemberAccessException
     */
    public static function __callStatic(string $name, array $args)
    {
        ObjectHelpers::strictStaticCall(static::class, $name);
    }
    /**
     * @return mixed
     * @throws MemberAccessException if the property is not defined.
     */
    public function &__get(string $name)
    {
        $class = static::class;
        if ($prop = ObjectHelpers::getMagicProperties($class)[$name] ?? null) {
            // property getter
            if (!($prop & 0b1)) {
                throw new MemberAccessException("Cannot read a write-only property {$class}::\${$name}.");
            }
            $m = ($prop & 0b10 ? 'get' : 'is') . \ucfirst($name);
            if ($prop & 0b10000) {
                $trace = \debug_backtrace(0, 1)[0];
                // suppose this method is called from __call()
                $loc = isset($trace['file'], $trace['line']) ? " in {$trace['file']} on line {$trace['line']}" : '';
                \trigger_error("Property {$class}::\${$name} is deprecated, use {$class}::{$m}() method{$loc}.", \E_USER_DEPRECATED);
            }
            if ($prop & 0b100) {
                // return by reference
                return $this->{$m}();
            } else {
                $val = $this->{$m}();
                return $val;
            }
        } else {
            ObjectHelpers::strictGet($class, $name);
        }
    }
    /**
     * @param  mixed  $value
     * @return void
     * @throws MemberAccessException if the property is not defined or is read-only
     */
    public function __set(string $name, $value)
    {
        $class = static::class;
        if (ObjectHelpers::hasProperty($class, $name)) {
            // unsetted property
            $this->{$name} = $value;
        } elseif ($prop = ObjectHelpers::getMagicProperties($class)[$name] ?? null) {
            // property setter
            if (!($prop & 0b1000)) {
                throw new MemberAccessException("Cannot write to a read-only property {$class}::\${$name}.");
            }
            $m = 'set' . \ucfirst($name);
            if ($prop & 0b10000) {
                $trace = \debug_backtrace(0, 1)[0];
                // suppose this method is called from __call()
                $loc = isset($trace['file'], $trace['line']) ? " in {$trace['file']} on line {$trace['line']}" : '';
                \trigger_error("Property {$class}::\${$name} is deprecated, use {$class}::{$m}() method{$loc}.", \E_USER_DEPRECATED);
            }
            $this->{$m}($value);
        } else {
            ObjectHelpers::strictSet($class, $name);
        }
    }
    /**
     * @return void
     * @throws MemberAccessException
     */
    public function __unset(string $name)
    {
        $class = static::class;
        if (!ObjectHelpers::hasProperty($class, $name)) {
            throw new MemberAccessException("Cannot unset the property {$class}::\${$name}.");
        }
    }
    public function __isset(string $name) : bool
    {
        return isset(ObjectHelpers::getMagicProperties(static::class)[$name]);
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette;

/**
 * The exception that is thrown when the value of an argument is
 * outside the allowable range of values as defined by the invoked method.
 */
class ArgumentOutOfRangeException extends \InvalidArgumentException
{
}
/**
 * The exception that is thrown when a method call is invalid for the object's
 * current state, method has been invoked at an illegal or inappropriate time.
 */
class InvalidStateException extends \RuntimeException
{
}
/**
 * The exception that is thrown when a requested method or operation is not implemented.
 */
class NotImplementedException extends \LogicException
{
}
/**
 * The exception that is thrown when an invoked method is not supported. For scenarios where
 * it is sometimes possible to perform the requested operation, see InvalidStateException.
 */
class NotSupportedException extends \LogicException
{
}
/**
 * The exception that is thrown when a requested method or operation is deprecated.
 */
class DeprecatedException extends NotSupportedException
{
}
/**
 * The exception that is thrown when accessing a class member (property or method) fails.
 */
class MemberAccessException extends \Error
{
}
/**
 * The exception that is thrown when an I/O error occurs.
 */
class IOException extends \RuntimeException
{
}
/**
 * The exception that is thrown when accessing a file that does not exist on disk.
 */
class FileNotFoundException extends IOException
{
}
/**
 * The exception that is thrown when part of a file or directory cannot be found.
 */
class DirectoryNotFoundException extends IOException
{
}
/**
 * The exception that is thrown when an argument does not match with the expected value.
 */
class InvalidArgumentException extends \InvalidArgumentException
{
}
/**
 * The exception that is thrown when an illegal index was requested.
 */
class OutOfRangeException extends \OutOfRangeException
{
}
/**
 * The exception that is thrown when a value (typically returned by function) does not match with the expected value.
 */
class UnexpectedValueException extends \UnexpectedValueException
{
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Utils;

use _PHPStan_dcc7b7cff\Nette;
use function is_array, is_object, strlen;
/**
 * String tools library.
 */
class Strings
{
    use Nette\StaticClass;
    public const TRIM_CHARACTERS = " \t\n\r\x00\v ";
    /**
     * Checks if the string is valid in UTF-8 encoding.
     */
    public static function checkEncoding(string $s) : bool
    {
        return $s === self::fixEncoding($s);
    }
    /**
     * Removes all invalid UTF-8 characters from a string.
     */
    public static function fixEncoding(string $s) : string
    {
        // removes xD800-xDFFF, x110000 and higher
        return \htmlspecialchars_decode(\htmlspecialchars($s, \ENT_NOQUOTES | \ENT_IGNORE, 'UTF-8'), \ENT_NOQUOTES);
    }
    /**
     * Returns a specific character in UTF-8 from code point (number in range 0x0000..D7FF or 0xE000..10FFFF).
     * @throws Nette\InvalidArgumentException if code point is not in valid range
     */
    public static function chr(int $code) : string
    {
        if ($code < 0 || $code >= 0xd800 && $code <= 0xdfff || $code > 0x10ffff) {
            throw new Nette\InvalidArgumentException('Code point must be in range 0x0 to 0xD7FF or 0xE000 to 0x10FFFF.');
        } elseif (!\extension_loaded('iconv')) {
            throw new Nette\NotSupportedException(__METHOD__ . '() requires ICONV extension that is not loaded.');
        }
        return \iconv('UTF-32BE', 'UTF-8//IGNORE', \pack('N', $code));
    }
    /**
     * Starts the $haystack string with the prefix $needle?
     */
    public static function startsWith(string $haystack, string $needle) : bool
    {
        return \strncmp($haystack, $needle, strlen($needle)) === 0;
    }
    /**
     * Ends the $haystack string with the suffix $needle?
     */
    public static function endsWith(string $haystack, string $needle) : bool
    {
        return $needle === '' || \substr($haystack, -strlen($needle)) === $needle;
    }
    /**
     * Does $haystack contain $needle?
     */
    public static function contains(string $haystack, string $needle) : bool
    {
        return \strpos($haystack, $needle) !== \false;
    }
    /**
     * Returns a part of UTF-8 string specified by starting position and length. If start is negative,
     * the returned string will start at the start'th character from the end of string.
     */
    public static function substring(string $s, int $start, ?int $length = null) : string
    {
        if (\function_exists('mb_substr')) {
            return \mb_substr($s, $start, $length, 'UTF-8');
            // MB is much faster
        } elseif (!\extension_loaded('iconv')) {
            throw new Nette\NotSupportedException(__METHOD__ . '() requires extension ICONV or MBSTRING, neither is loaded.');
        } elseif ($length === null) {
            $length = self::length($s);
        } elseif ($start < 0 && $length < 0) {
            $start += self::length($s);
            // unifies iconv_substr behavior with mb_substr
        }
        return \iconv_substr($s, $start, $length, 'UTF-8');
    }
    /**
     * Removes control characters, normalizes line breaks to `\n`, removes leading and trailing blank lines,
     * trims end spaces on lines, normalizes UTF-8 to the normal form of NFC.
     */
    public static function normalize(string $s) : string
    {
        // convert to compressed normal form (NFC)
        if (\class_exists('Normalizer', \false) && ($n = \Normalizer::normalize($s, \Normalizer::FORM_C)) !== \false) {
            $s = $n;
        }
        $s = self::normalizeNewLines($s);
        // remove control characters; leave \t + \n
        $s = self::pcre('preg_replace', ['#[\\x00-\\x08\\x0B-\\x1F\\x7F-\\x9F]+#u', '', $s]);
        // right trim
        $s = self::pcre('preg_replace', ['#[\\t ]+$#m', '', $s]);
        // leading and trailing blank lines
        $s = \trim($s, "\n");
        return $s;
    }
    /**
     * Standardize line endings to unix-like.
     */
    public static function normalizeNewLines(string $s) : string
    {
        return \str_replace(["\r\n", "\r"], "\n", $s);
    }
    /**
     * Converts UTF-8 string to ASCII, ie removes diacritics etc.
     */
    public static function toAscii(string $s) : string
    {
        $iconv = \defined('ICONV_IMPL') ? \trim(\ICONV_IMPL, '"\'') : null;
        static $transliterator = null;
        if ($transliterator === null) {
            if (\class_exists('Transliterator', \false)) {
                $transliterator = \Transliterator::create('Any-Latin; Latin-ASCII');
            } else {
                \trigger_error(__METHOD__ . "(): it is recommended to enable PHP extensions 'intl'.", \E_USER_NOTICE);
                $transliterator = \false;
            }
        }
        // remove control characters and check UTF-8 validity
        $s = self::pcre('preg_replace', ['#[^\\x09\\x0A\\x0D\\x20-\\x7E\\xA0-\\x{2FF}\\x{370}-\\x{10FFFF}]#u', '', $s]);
        // transliteration (by Transliterator and iconv) is not optimal, replace some characters directly
        $s = \strtr($s, ["„" => '"', "“" => '"', "”" => '"', "‚" => "'", "‘" => "'", "’" => "'", "°" => '^', "Я" => 'Ya', "я" => 'ya', "Ю" => 'Yu', "ю" => 'yu', "Ä" => 'Ae', "Ö" => 'Oe', "Ü" => 'Ue', "ẞ" => 'Ss', "ä" => 'ae', "ö" => 'oe', "ü" => 'ue', "ß" => 'ss']);
        // „ “ ” ‚ ‘ ’ ° Я я Ю ю Ä Ö Ü ẞ ä ö ü ß
        if ($iconv !== 'libiconv') {
            $s = \strtr($s, ["®" => '(R)', "©" => '(c)', "…" => '...', "«" => '<<', "»" => '>>', "£" => 'lb', "¥" => 'yen', "²" => '^2', "³" => '^3', "µ" => 'u', "¹" => '^1', "º" => 'o', "¿" => '?', "ˊ" => "'", "ˍ" => '_', "˝" => '"', "`" => '', "€" => 'EUR', "™" => 'TM', "℮" => 'e', "←" => '<-', "↑" => '^', "→" => '->', "↓" => 'V', "↔" => '<->']);
            // ® © … « » £ ¥ ² ³ µ ¹ º ¿ ˊ ˍ ˝ ` € ™ ℮ ← ↑ → ↓ ↔
        }
        if ($transliterator) {
            $s = $transliterator->transliterate($s);
            // use iconv because The transliterator leaves some characters out of ASCII, eg → ʾ
            if ($iconv === 'glibc') {
                $s = \strtr($s, '?', "\x01");
                // temporarily hide ? to distinguish them from the garbage that iconv creates
                $s = \iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $s);
                $s = \str_replace(['?', "\x01"], ['', '?'], $s);
                // remove garbage and restore ? characters
            } elseif ($iconv === 'libiconv') {
                $s = \iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $s);
            } else {
                // null or 'unknown' (#216)
                $s = self::pcre('preg_replace', ['#[^\\x00-\\x7F]++#', '', $s]);
                // remove non-ascii chars
            }
        } elseif ($iconv === 'glibc' || $iconv === 'libiconv') {
            // temporarily hide these characters to distinguish them from the garbage that iconv creates
            $s = \strtr($s, '`\'"^~?', "\x01\x02\x03\x04\x05\x06");
            if ($iconv === 'glibc') {
                // glibc implementation is very limited. transliterate into Windows-1250 and then into ASCII, so most Eastern European characters are preserved
                $s = \iconv('UTF-8', 'WINDOWS-1250//TRANSLIT//IGNORE', $s);
                $s = \strtr($s, "\xa5\xa3\xbc\x8c\xa7\x8a\xaa\x8d\x8f\x8e\xaf\xb9\xb3\xbe\x9c\x9a\xba\x9d\x9f\x9e\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xfe\x96\xa0\x8b\x97\x9b\xa6\xad\xb7", 'ALLSSSSTZZZallssstzzzRAAAALCCCEEEEIIDDNNOOOOxRUUUUYTsraaaalccceeeeiiddnnooooruuuuyt- <->|-.');
                $s = self::pcre('preg_replace', ['#[^\\x00-\\x7F]++#', '', $s]);
            } else {
                $s = \iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $s);
            }
            // remove garbage that iconv creates during transliteration (eg Ý -> Y')
            $s = \str_replace(['`', "'", '"', '^', '~', '?'], '', $s);
            // restore temporarily hidden characters
            $s = \strtr($s, "\x01\x02\x03\x04\x05\x06", '`\'"^~?');
        } else {
            $s = self::pcre('preg_replace', ['#[^\\x00-\\x7F]++#', '', $s]);
            // remove non-ascii chars
        }
        return $s;
    }
    /**
     * Modifies the UTF-8 string to the form used in the URL, ie removes diacritics and replaces all characters
     * except letters of the English alphabet and numbers with a hyphens.
     */
    public static function webalize(string $s, ?string $charlist = null, bool $lower = \true) : string
    {
        $s = self::toAscii($s);
        if ($lower) {
            $s = \strtolower($s);
        }
        $s = self::pcre('preg_replace', ['#[^a-z0-9' . ($charlist !== null ? \preg_quote($charlist, '#') : '') . ']+#i', '-', $s]);
        $s = \trim($s, '-');
        return $s;
    }
    /**
     * Truncates a UTF-8 string to given maximal length, while trying not to split whole words. Only if the string is truncated,
     * an ellipsis (or something else set with third argument) is appended to the string.
     */
    public static function truncate(string $s, int $maxLen, string $append = "…") : string
    {
        if (self::length($s) > $maxLen) {
            $maxLen -= self::length($append);
            if ($maxLen < 1) {
                return $append;
            } elseif ($matches = self::match($s, '#^.{1,' . $maxLen . '}(?=[\\s\\x00-/:-@\\[-`{-~])#us')) {
                return $matches[0] . $append;
            } else {
                return self::substring($s, 0, $maxLen) . $append;
            }
        }
        return $s;
    }
    /**
     * Indents a multiline text from the left. Second argument sets how many indentation chars should be used,
     * while the indent itself is the third argument (*tab* by default).
     */
    public static function indent(string $s, int $level = 1, string $chars = "\t") : string
    {
        if ($level > 0) {
            $s = self::replace($s, '#(?:^|[\\r\\n]+)(?=[^\\r\\n])#', '$0' . \str_repeat($chars, $level));
        }
        return $s;
    }
    /**
     * Converts all characters of UTF-8 string to lower case.
     */
    public static function lower(string $s) : string
    {
        return \mb_strtolower($s, 'UTF-8');
    }
    /**
     * Converts the first character of a UTF-8 string to lower case and leaves the other characters unchanged.
     */
    public static function firstLower(string $s) : string
    {
        return self::lower(self::substring($s, 0, 1)) . self::substring($s, 1);
    }
    /**
     * Converts all characters of a UTF-8 string to upper case.
     */
    public static function upper(string $s) : string
    {
        return \mb_strtoupper($s, 'UTF-8');
    }
    /**
     * Converts the first character of a UTF-8 string to upper case and leaves the other characters unchanged.
     */
    public static function firstUpper(string $s) : string
    {
        return self::upper(self::substring($s, 0, 1)) . self::substring($s, 1);
    }
    /**
     * Converts the first character of every word of a UTF-8 string to upper case and the others to lower case.
     */
    public static function capitalize(string $s) : string
    {
        return \mb_convert_case($s, \MB_CASE_TITLE, 'UTF-8');
    }
    /**
     * Compares two UTF-8 strings or their parts, without taking character case into account. If length is null, whole strings are compared,
     * if it is negative, the corresponding number of characters from the end of the strings is compared,
     * otherwise the appropriate number of characters from the beginning is compared.
     */
    public static function compare(string $left, string $right, ?int $length = null) : bool
    {
        if (\class_exists('Normalizer', \false)) {
            $left = \Normalizer::normalize($left, \Normalizer::FORM_D);
            // form NFD is faster
            $right = \Normalizer::normalize($right, \Normalizer::FORM_D);
            // form NFD is faster
        }
        if ($length < 0) {
            $left = self::substring($left, $length, -$length);
            $right = self::substring($right, $length, -$length);
        } elseif ($length !== null) {
            $left = self::substring($left, 0, $length);
            $right = self::substring($right, 0, $length);
        }
        return self::lower($left) === self::lower($right);
    }
    /**
     * Finds the common prefix of strings or returns empty string if the prefix was not found.
     * @param  string[]  $strings
     */
    public static function findPrefix(array $strings) : string
    {
        $first = \array_shift($strings);
        for ($i = 0; $i < strlen($first); $i++) {
            foreach ($strings as $s) {
                if (!isset($s[$i]) || $first[$i] !== $s[$i]) {
                    while ($i && $first[$i - 1] >= "\x80" && $first[$i] >= "\x80" && $first[$i] < "\xc0") {
                        $i--;
                    }
                    return \substr($first, 0, $i);
                }
            }
        }
        return $first;
    }
    /**
     * Returns number of characters (not bytes) in UTF-8 string.
     * That is the number of Unicode code points which may differ from the number of graphemes.
     */
    public static function length(string $s) : int
    {
        return \function_exists('mb_strlen') ? \mb_strlen($s, 'UTF-8') : strlen(\utf8_decode($s));
    }
    /**
     * Removes all left and right side spaces (or the characters passed as second argument) from a UTF-8 encoded string.
     */
    public static function trim(string $s, string $charlist = self::TRIM_CHARACTERS) : string
    {
        $charlist = \preg_quote($charlist, '#');
        return self::replace($s, '#^[' . $charlist . ']+|[' . $charlist . ']+$#Du', '');
    }
    /**
     * Pads a UTF-8 string to given length by prepending the $pad string to the beginning.
     */
    public static function padLeft(string $s, int $length, string $pad = ' ') : string
    {
        $length = \max(0, $length - self::length($s));
        $padLen = self::length($pad);
        return \str_repeat($pad, (int) ($length / $padLen)) . self::substring($pad, 0, $length % $padLen) . $s;
    }
    /**
     * Pads UTF-8 string to given length by appending the $pad string to the end.
     */
    public static function padRight(string $s, int $length, string $pad = ' ') : string
    {
        $length = \max(0, $length - self::length($s));
        $padLen = self::length($pad);
        return $s . \str_repeat($pad, (int) ($length / $padLen)) . self::substring($pad, 0, $length % $padLen);
    }
    /**
     * Reverses UTF-8 string.
     */
    public static function reverse(string $s) : string
    {
        if (!\extension_loaded('iconv')) {
            throw new Nette\NotSupportedException(__METHOD__ . '() requires ICONV extension that is not loaded.');
        }
        return \iconv('UTF-32LE', 'UTF-8', \strrev(\iconv('UTF-8', 'UTF-32BE', $s)));
    }
    /**
     * Returns part of $haystack before $nth occurence of $needle or returns null if the needle was not found.
     * Negative value means searching from the end.
     */
    public static function before(string $haystack, string $needle, int $nth = 1) : ?string
    {
        $pos = self::pos($haystack, $needle, $nth);
        return $pos === null ? null : \substr($haystack, 0, $pos);
    }
    /**
     * Returns part of $haystack after $nth occurence of $needle or returns null if the needle was not found.
     * Negative value means searching from the end.
     */
    public static function after(string $haystack, string $needle, int $nth = 1) : ?string
    {
        $pos = self::pos($haystack, $needle, $nth);
        return $pos === null ? null : \substr($haystack, $pos + strlen($needle));
    }
    /**
     * Returns position in characters of $nth occurence of $needle in $haystack or null if the $needle was not found.
     * Negative value of `$nth` means searching from the end.
     */
    public static function indexOf(string $haystack, string $needle, int $nth = 1) : ?int
    {
        $pos = self::pos($haystack, $needle, $nth);
        return $pos === null ? null : self::length(\substr($haystack, 0, $pos));
    }
    /**
     * Returns position in characters of $nth occurence of $needle in $haystack or null if the needle was not found.
     */
    private static function pos(string $haystack, string $needle, int $nth = 1) : ?int
    {
        if (!$nth) {
            return null;
        } elseif ($nth > 0) {
            if ($needle === '') {
                return 0;
            }
            $pos = 0;
            while (($pos = \strpos($haystack, $needle, $pos)) !== \false && --$nth) {
                $pos++;
            }
        } else {
            $len = strlen($haystack);
            if ($needle === '') {
                return $len;
            } elseif ($len === 0) {
                return null;
            }
            $pos = $len - 1;
            while (($pos = \strrpos($haystack, $needle, $pos - $len)) !== \false && ++$nth) {
                $pos--;
            }
        }
        return Helpers::falseToNull($pos);
    }
    /**
     * Splits a string into array by the regular expression. Parenthesized expression in the delimiter are captured.
     * Parameter $flags can be any combination of PREG_SPLIT_NO_EMPTY and PREG_OFFSET_CAPTURE flags.
     */
    public static function split(string $subject, string $pattern, int $flags = 0) : array
    {
        return self::pcre('preg_split', [$pattern, $subject, -1, $flags | \PREG_SPLIT_DELIM_CAPTURE]);
    }
    /**
     * Checks if given string matches a regular expression pattern and returns an array with first found match and each subpattern.
     * Parameter $flags can be any combination of PREG_OFFSET_CAPTURE and PREG_UNMATCHED_AS_NULL flags.
     */
    public static function match(string $subject, string $pattern, int $flags = 0, int $offset = 0) : ?array
    {
        if ($offset > strlen($subject)) {
            return null;
        }
        return self::pcre('preg_match', [$pattern, $subject, &$m, $flags, $offset]) ? $m : null;
    }
    /**
     * Finds all occurrences matching regular expression pattern and returns a two-dimensional array. Result is array of matches (ie uses by default PREG_SET_ORDER).
     * Parameter $flags can be any combination of PREG_OFFSET_CAPTURE, PREG_UNMATCHED_AS_NULL and PREG_PATTERN_ORDER flags.
     */
    public static function matchAll(string $subject, string $pattern, int $flags = 0, int $offset = 0) : array
    {
        if ($offset > strlen($subject)) {
            return [];
        }
        self::pcre('preg_match_all', [$pattern, $subject, &$m, $flags & \PREG_PATTERN_ORDER ? $flags : $flags | \PREG_SET_ORDER, $offset]);
        return $m;
    }
    /**
     * Replaces all occurrences matching regular expression $pattern which can be string or array in the form `pattern => replacement`.
     * @param  string|array  $pattern
     * @param  string|callable  $replacement
     */
    public static function replace(string $subject, $pattern, $replacement = '', int $limit = -1) : string
    {
        if (is_object($replacement) || is_array($replacement)) {
            if (!\is_callable($replacement, \false, $textual)) {
                throw new Nette\InvalidStateException("Callback '{$textual}' is not callable.");
            }
            return self::pcre('preg_replace_callback', [$pattern, $replacement, $subject, $limit]);
        } elseif (is_array($pattern) && \is_string(\key($pattern))) {
            $replacement = \array_values($pattern);
            $pattern = \array_keys($pattern);
        }
        return self::pcre('preg_replace', [$pattern, $replacement, $subject, $limit]);
    }
    /** @internal */
    public static function pcre(string $func, array $args)
    {
        $res = Callback::invokeSafe($func, $args, function (string $message) use($args) : void {
            // compile-time error, not detectable by preg_last_error
            throw new RegexpException($message . ' in pattern: ' . \implode(' or ', (array) $args[0]));
        });
        if (($code = \preg_last_error()) && ($res === null || !\in_array($func, ['preg_filter', 'preg_replace_callback', 'preg_replace'], \true))) {
            throw new RegexpException((RegexpException::MESSAGES[$code] ?? 'Unknown error') . ' (pattern: ' . \implode(' or ', (array) $args[0]) . ')', $code);
        }
        return $res;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Utils;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Provides objects to work as array.
 * @template T
 */
class ArrayHash extends \stdClass implements \ArrayAccess, \Countable, \IteratorAggregate
{
    /**
     * Transforms array to ArrayHash.
     * @param  array<T>  $array
     * @return static
     */
    public static function from(array $array, bool $recursive = \true)
    {
        $obj = new static();
        foreach ($array as $key => $value) {
            $obj->{$key} = $recursive && \is_array($value) ? static::from($value, \true) : $value;
        }
        return $obj;
    }
    /**
     * Returns an iterator over all items.
     * @return \RecursiveArrayIterator<array-key, T>
     */
    public function getIterator() : \RecursiveArrayIterator
    {
        return new \RecursiveArrayIterator((array) $this);
    }
    /**
     * Returns items count.
     */
    public function count() : int
    {
        return \count((array) $this);
    }
    /**
     * Replaces or appends a item.
     * @param  string|int  $key
     * @param  T  $value
     */
    public function offsetSet($key, $value) : void
    {
        if (!\is_scalar($key)) {
            // prevents null
            throw new Nette\InvalidArgumentException(\sprintf('Key must be either a string or an integer, %s given.', \gettype($key)));
        }
        $this->{$key} = $value;
    }
    /**
     * Returns a item.
     * @param  string|int  $key
     * @return T
     */
    #[\ReturnTypeWillChange]
    public function offsetGet($key)
    {
        return $this->{$key};
    }
    /**
     * Determines whether a item exists.
     * @param  string|int  $key
     */
    public function offsetExists($key) : bool
    {
        return isset($this->{$key});
    }
    /**
     * Removes the element from this list.
     * @param  string|int  $key
     */
    public function offsetUnset($key) : void
    {
        unset($this->{$key});
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Utils;

use _PHPStan_dcc7b7cff\Nette;
/**
 * JSON encoder and decoder.
 */
final class Json
{
    use Nette\StaticClass;
    public const FORCE_ARRAY = \JSON_OBJECT_AS_ARRAY;
    public const PRETTY = \JSON_PRETTY_PRINT;
    public const ESCAPE_UNICODE = 1 << 19;
    /**
     * Converts value to JSON format. The flag can be Json::PRETTY, which formats JSON for easier reading and clarity,
     * and Json::ESCAPE_UNICODE for ASCII output.
     * @param  mixed  $value
     * @throws JsonException
     */
    public static function encode($value, int $flags = 0) : string
    {
        $flags = ($flags & self::ESCAPE_UNICODE ? 0 : \JSON_UNESCAPED_UNICODE) | \JSON_UNESCAPED_SLASHES | $flags & ~self::ESCAPE_UNICODE | (\defined('JSON_PRESERVE_ZERO_FRACTION') ? \JSON_PRESERVE_ZERO_FRACTION : 0);
        // since PHP 5.6.6 & PECL JSON-C 1.3.7
        $json = \json_encode($value, $flags);
        if ($error = \json_last_error()) {
            throw new JsonException(\json_last_error_msg(), $error);
        }
        return $json;
    }
    /**
     * Parses JSON to PHP value. The flag can be Json::FORCE_ARRAY, which forces an array instead of an object as the return value.
     * @return mixed
     * @throws JsonException
     */
    public static function decode(string $json, int $flags = 0)
    {
        $value = \json_decode($json, null, 512, $flags | \JSON_BIGINT_AS_STRING);
        if ($error = \json_last_error()) {
            throw new JsonException(\json_last_error_msg(), $error);
        }
        return $value;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Utils;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Validation utilities.
 */
class Validators
{
    use Nette\StaticClass;
    /** @var array<string,?callable> */
    protected static $validators = [
        // PHP types
        'array' => 'is_array',
        'bool' => 'is_bool',
        'boolean' => 'is_bool',
        'float' => 'is_float',
        'int' => 'is_int',
        'integer' => 'is_int',
        'null' => 'is_null',
        'object' => 'is_object',
        'resource' => 'is_resource',
        'scalar' => 'is_scalar',
        'string' => 'is_string',
        // pseudo-types
        'callable' => [self::class, 'isCallable'],
        'iterable' => 'is_iterable',
        'list' => [Arrays::class, 'isList'],
        'mixed' => [self::class, 'isMixed'],
        'none' => [self::class, 'isNone'],
        'number' => [self::class, 'isNumber'],
        'numeric' => [self::class, 'isNumeric'],
        'numericint' => [self::class, 'isNumericInt'],
        // string patterns
        'alnum' => 'ctype_alnum',
        'alpha' => 'ctype_alpha',
        'digit' => 'ctype_digit',
        'lower' => 'ctype_lower',
        'pattern' => null,
        'space' => 'ctype_space',
        'unicode' => [self::class, 'isUnicode'],
        'upper' => 'ctype_upper',
        'xdigit' => 'ctype_xdigit',
        // syntax validation
        'email' => [self::class, 'isEmail'],
        'identifier' => [self::class, 'isPhpIdentifier'],
        'uri' => [self::class, 'isUri'],
        'url' => [self::class, 'isUrl'],
        // environment validation
        'class' => 'class_exists',
        'interface' => 'interface_exists',
        'directory' => 'is_dir',
        'file' => 'is_file',
        'type' => [self::class, 'isType'],
    ];
    /** @var array<string,callable> */
    protected static $counters = ['string' => 'strlen', 'unicode' => [Strings::class, 'length'], 'array' => 'count', 'list' => 'count', 'alnum' => 'strlen', 'alpha' => 'strlen', 'digit' => 'strlen', 'lower' => 'strlen', 'space' => 'strlen', 'upper' => 'strlen', 'xdigit' => 'strlen'];
    /**
     * Verifies that the value is of expected types separated by pipe.
     * @param  mixed  $value
     * @throws AssertionException
     */
    public static function assert($value, string $expected, string $label = 'variable') : void
    {
        if (!static::is($value, $expected)) {
            $expected = \str_replace(['|', ':'], [' or ', ' in range '], $expected);
            static $translate = ['boolean' => 'bool', 'integer' => 'int', 'double' => 'float', 'NULL' => 'null'];
            $type = $translate[\gettype($value)] ?? \gettype($value);
            if (\is_int($value) || \is_float($value) || \is_string($value) && \strlen($value) < 40) {
                $type .= ' ' . \var_export($value, \true);
            } elseif (\is_object($value)) {
                $type .= ' ' . \get_class($value);
            }
            throw new AssertionException("The {$label} expects to be {$expected}, {$type} given.");
        }
    }
    /**
     * Verifies that element $key in array is of expected types separated by pipe.
     * @param  mixed[]  $array
     * @param  int|string  $key
     * @throws AssertionException
     */
    public static function assertField(array $array, $key, ?string $expected = null, string $label = "item '%' in array") : void
    {
        if (!\array_key_exists($key, $array)) {
            throw new AssertionException('Missing ' . \str_replace('%', $key, $label) . '.');
        } elseif ($expected) {
            static::assert($array[$key], $expected, \str_replace('%', $key, $label));
        }
    }
    /**
     * Verifies that the value is of expected types separated by pipe.
     * @param  mixed  $value
     */
    public static function is($value, string $expected) : bool
    {
        foreach (\explode('|', $expected) as $item) {
            if (\substr($item, -2) === '[]') {
                if (\is_iterable($value) && self::everyIs($value, \substr($item, 0, -2))) {
                    return \true;
                }
                continue;
            } elseif (\substr($item, 0, 1) === '?') {
                $item = \substr($item, 1);
                if ($value === null) {
                    return \true;
                }
            }
            [$type] = $item = \explode(':', $item, 2);
            if (isset(static::$validators[$type])) {
                try {
                    if (!static::$validators[$type]($value)) {
                        continue;
                    }
                } catch (\TypeError $e) {
                    continue;
                }
            } elseif ($type === 'pattern') {
                if (Strings::match($value, '|^' . ($item[1] ?? '') . '$|D')) {
                    return \true;
                }
                continue;
            } elseif (!$value instanceof $type) {
                continue;
            }
            if (isset($item[1])) {
                $length = $value;
                if (isset(static::$counters[$type])) {
                    $length = static::$counters[$type]($value);
                }
                $range = \explode('..', $item[1]);
                if (!isset($range[1])) {
                    $range[1] = $range[0];
                }
                if ($range[0] !== '' && $length < $range[0] || $range[1] !== '' && $length > $range[1]) {
                    continue;
                }
            }
            return \true;
        }
        return \false;
    }
    /**
     * Finds whether all values are of expected types separated by pipe.
     * @param  mixed[]  $values
     */
    public static function everyIs(iterable $values, string $expected) : bool
    {
        foreach ($values as $value) {
            if (!static::is($value, $expected)) {
                return \false;
            }
        }
        return \true;
    }
    /**
     * Checks if the value is an integer or a float.
     * @param  mixed  $value
     */
    public static function isNumber($value) : bool
    {
        return \is_int($value) || \is_float($value);
    }
    /**
     * Checks if the value is an integer or a integer written in a string.
     * @param  mixed  $value
     */
    public static function isNumericInt($value) : bool
    {
        return \is_int($value) || \is_string($value) && \preg_match('#^[+-]?[0-9]+$#D', $value);
    }
    /**
     * Checks if the value is a number or a number written in a string.
     * @param  mixed  $value
     */
    public static function isNumeric($value) : bool
    {
        return \is_float($value) || \is_int($value) || \is_string($value) && \preg_match('#^[+-]?([0-9]++\\.?[0-9]*|\\.[0-9]+)$#D', $value);
    }
    /**
     * Checks if the value is a syntactically correct callback.
     * @param  mixed  $value
     */
    public static function isCallable($value) : bool
    {
        return $value && \is_callable($value, \true);
    }
    /**
     * Checks if the value is a valid UTF-8 string.
     * @param  mixed  $value
     */
    public static function isUnicode($value) : bool
    {
        return \is_string($value) && \preg_match('##u', $value);
    }
    /**
     * Checks if the value is 0, '', false or null.
     * @param  mixed  $value
     */
    public static function isNone($value) : bool
    {
        return $value == null;
        // intentionally ==
    }
    /** @internal */
    public static function isMixed() : bool
    {
        return \true;
    }
    /**
     * Checks if a variable is a zero-based integer indexed array.
     * @param  mixed  $value
     * @deprecated  use Nette\Utils\Arrays::isList
     */
    public static function isList($value) : bool
    {
        return Arrays::isList($value);
    }
    /**
     * Checks if the value is in the given range [min, max], where the upper or lower limit can be omitted (null).
     * Numbers, strings and DateTime objects can be compared.
     * @param  mixed  $value
     */
    public static function isInRange($value, array $range) : bool
    {
        if ($value === null || !(isset($range[0]) || isset($range[1]))) {
            return \false;
        }
        $limit = $range[0] ?? $range[1];
        if (\is_string($limit)) {
            $value = (string) $value;
        } elseif ($limit instanceof \DateTimeInterface) {
            if (!$value instanceof \DateTimeInterface) {
                return \false;
            }
        } elseif (\is_numeric($value)) {
            $value *= 1;
        } else {
            return \false;
        }
        return (!isset($range[0]) || $value >= $range[0]) && (!isset($range[1]) || $value <= $range[1]);
    }
    /**
     * Checks if the value is a valid email address. It does not verify that the domain actually exists, only the syntax is verified.
     */
    public static function isEmail(string $value) : bool
    {
        $atom = "[-a-z0-9!#\$%&'*+/=?^_`{|}~]";
        // RFC 5322 unquoted characters in local-part
        $alpha = "a-z\x80-\xff";
        // superset of IDN
        return (bool) \preg_match(<<<XX
\t\t(^
\t\t\t("([ !#-[\\]-~]*|\\\\[ -~])+"|{$atom}+(\\.{$atom}+)*)  # quoted or unquoted
\t\t\t@
\t\t\t([0-9{$alpha}]([-0-9{$alpha}]{0,61}[0-9{$alpha}])?\\.)+  # domain - RFC 1034
\t\t\t[{$alpha}]([-0-9{$alpha}]{0,17}[{$alpha}])?              # top domain
\t\t\$)Dix
XX
, $value);
    }
    /**
     * Checks if the value is a valid URL address.
     */
    public static function isUrl(string $value) : bool
    {
        $alpha = "a-z\x80-\xff";
        return (bool) \preg_match(<<<XX
\t\t(^
\t\t\thttps?://(
\t\t\t\t(([-_0-9{$alpha}]+\\.)*                       # subdomain
\t\t\t\t\t[0-9{$alpha}]([-0-9{$alpha}]{0,61}[0-9{$alpha}])?\\.)?  # domain
\t\t\t\t\t[{$alpha}]([-0-9{$alpha}]{0,17}[{$alpha}])?   # top domain
\t\t\t\t|\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}  # IPv4
\t\t\t\t|\\[[0-9a-f:]{3,39}\\]                      # IPv6
\t\t\t)(:\\d{1,5})?                                   # port
\t\t\t(/\\S*)?                                        # path
\t\t\t(\\?\\S*)?                                      # query
\t\t\t(\\#\\S*)?                                      # fragment
\t\t\$)Dix
XX
, $value);
    }
    /**
     * Checks if the value is a valid URI address, that is, actually a string beginning with a syntactically valid schema.
     */
    public static function isUri(string $value) : bool
    {
        return (bool) \preg_match('#^[a-z\\d+\\.-]+:\\S+$#Di', $value);
    }
    /**
     * Checks whether the input is a class, interface or trait.
     */
    public static function isType(string $type) : bool
    {
        return \class_exists($type) || \interface_exists($type) || \trait_exists($type);
    }
    /**
     * Checks whether the input is a valid PHP identifier.
     */
    public static function isPhpIdentifier(string $value) : bool
    {
        return \preg_match('#^[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*$#D', $value) === 1;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Utils;

use _PHPStan_dcc7b7cff\Nette;
/**
 * File system tool.
 */
final class FileSystem
{
    use Nette\StaticClass;
    /**
     * Creates a directory if it doesn't exist.
     * @throws Nette\IOException  on error occurred
     */
    public static function createDir(string $dir, int $mode = 0777) : void
    {
        if (!\is_dir($dir) && !@\mkdir($dir, $mode, \true) && !\is_dir($dir)) {
            // @ - dir may already exist
            throw new Nette\IOException(\sprintf("Unable to create directory '%s' with mode %s. %s", self::normalizePath($dir), \decoct($mode), Helpers::getLastError()));
        }
    }
    /**
     * Copies a file or a directory. Overwrites existing files and directories by default.
     * @throws Nette\IOException  on error occurred
     * @throws Nette\InvalidStateException  if $overwrite is set to false and destination already exists
     */
    public static function copy(string $origin, string $target, bool $overwrite = \true) : void
    {
        if (\stream_is_local($origin) && !\file_exists($origin)) {
            throw new Nette\IOException(\sprintf("File or directory '%s' not found.", self::normalizePath($origin)));
        } elseif (!$overwrite && \file_exists($target)) {
            throw new Nette\InvalidStateException(\sprintf("File or directory '%s' already exists.", self::normalizePath($target)));
        } elseif (\is_dir($origin)) {
            static::createDir($target);
            foreach (new \FilesystemIterator($target) as $item) {
                static::delete($item->getPathname());
            }
            foreach ($iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($origin, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::SELF_FIRST) as $item) {
                if ($item->isDir()) {
                    static::createDir($target . '/' . $iterator->getSubPathName());
                } else {
                    static::copy($item->getPathname(), $target . '/' . $iterator->getSubPathName());
                }
            }
        } else {
            static::createDir(\dirname($target));
            if (($s = @\fopen($origin, 'rb')) && ($d = @\fopen($target, 'wb')) && @\stream_copy_to_stream($s, $d) === \false) {
                // @ is escalated to exception
                throw new Nette\IOException(\sprintf("Unable to copy file '%s' to '%s'. %s", self::normalizePath($origin), self::normalizePath($target), Helpers::getLastError()));
            }
        }
    }
    /**
     * Deletes a file or directory if exists.
     * @throws Nette\IOException  on error occurred
     */
    public static function delete(string $path) : void
    {
        if (\is_file($path) || \is_link($path)) {
            $func = \DIRECTORY_SEPARATOR === '\\' && \is_dir($path) ? 'rmdir' : 'unlink';
            if (!@$func($path)) {
                // @ is escalated to exception
                throw new Nette\IOException(\sprintf("Unable to delete '%s'. %s", self::normalizePath($path), Helpers::getLastError()));
            }
        } elseif (\is_dir($path)) {
            foreach (new \FilesystemIterator($path) as $item) {
                static::delete($item->getPathname());
            }
            if (!@\rmdir($path)) {
                // @ is escalated to exception
                throw new Nette\IOException(\sprintf("Unable to delete directory '%s'. %s", self::normalizePath($path), Helpers::getLastError()));
            }
        }
    }
    /**
     * Renames or moves a file or a directory. Overwrites existing files and directories by default.
     * @throws Nette\IOException  on error occurred
     * @throws Nette\InvalidStateException  if $overwrite is set to false and destination already exists
     */
    public static function rename(string $origin, string $target, bool $overwrite = \true) : void
    {
        if (!$overwrite && \file_exists($target)) {
            throw new Nette\InvalidStateException(\sprintf("File or directory '%s' already exists.", self::normalizePath($target)));
        } elseif (!\file_exists($origin)) {
            throw new Nette\IOException(\sprintf("File or directory '%s' not found.", self::normalizePath($origin)));
        } else {
            static::createDir(\dirname($target));
            if (\realpath($origin) !== \realpath($target)) {
                static::delete($target);
            }
            if (!@\rename($origin, $target)) {
                // @ is escalated to exception
                throw new Nette\IOException(\sprintf("Unable to rename file or directory '%s' to '%s'. %s", self::normalizePath($origin), self::normalizePath($target), Helpers::getLastError()));
            }
        }
    }
    /**
     * Reads the content of a file.
     * @throws Nette\IOException  on error occurred
     */
    public static function read(string $file) : string
    {
        $content = @\file_get_contents($file);
        // @ is escalated to exception
        if ($content === \false) {
            throw new Nette\IOException(\sprintf("Unable to read file '%s'. %s", self::normalizePath($file), Helpers::getLastError()));
        }
        return $content;
    }
    /**
     * Writes the string to a file.
     * @throws Nette\IOException  on error occurred
     */
    public static function write(string $file, string $content, ?int $mode = 0666) : void
    {
        static::createDir(\dirname($file));
        if (@\file_put_contents($file, $content) === \false) {
            // @ is escalated to exception
            throw new Nette\IOException(\sprintf("Unable to write file '%s'. %s", self::normalizePath($file), Helpers::getLastError()));
        }
        if ($mode !== null && !@\chmod($file, $mode)) {
            // @ is escalated to exception
            throw new Nette\IOException(\sprintf("Unable to chmod file '%s' to mode %s. %s", self::normalizePath($file), \decoct($mode), Helpers::getLastError()));
        }
    }
    /**
     * Fixes permissions to a specific file or directory. Directories can be fixed recursively.
     * @throws Nette\IOException  on error occurred
     */
    public static function makeWritable(string $path, int $dirMode = 0777, int $fileMode = 0666) : void
    {
        if (\is_file($path)) {
            if (!@\chmod($path, $fileMode)) {
                // @ is escalated to exception
                throw new Nette\IOException(\sprintf("Unable to chmod file '%s' to mode %s. %s", self::normalizePath($path), \decoct($fileMode), Helpers::getLastError()));
            }
        } elseif (\is_dir($path)) {
            foreach (new \FilesystemIterator($path) as $item) {
                static::makeWritable($item->getPathname(), $dirMode, $fileMode);
            }
            if (!@\chmod($path, $dirMode)) {
                // @ is escalated to exception
                throw new Nette\IOException(\sprintf("Unable to chmod directory '%s' to mode %s. %s", self::normalizePath($path), \decoct($dirMode), Helpers::getLastError()));
            }
        } else {
            throw new Nette\IOException(\sprintf("File or directory '%s' not found.", self::normalizePath($path)));
        }
    }
    /**
     * Determines if the path is absolute.
     */
    public static function isAbsolute(string $path) : bool
    {
        return (bool) \preg_match('#([a-z]:)?[/\\\\]|[a-z][a-z0-9+.-]*://#Ai', $path);
    }
    /**
     * Normalizes `..` and `.` and directory separators in path.
     */
    public static function normalizePath(string $path) : string
    {
        $parts = $path === '' ? [] : \preg_split('~[/\\\\]+~', $path);
        $res = [];
        foreach ($parts as $part) {
            if ($part === '..' && $res && \end($res) !== '..' && \end($res) !== '') {
                \array_pop($res);
            } elseif ($part !== '.') {
                $res[] = $part;
            }
        }
        return $res === [''] ? \DIRECTORY_SEPARATOR : \implode(\DIRECTORY_SEPARATOR, $res);
    }
    /**
     * Joins all segments of the path and normalizes the result.
     */
    public static function joinPaths(string ...$paths) : string
    {
        return self::normalizePath(\implode('/', $paths));
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Utils;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Secure random string generator.
 */
final class Random
{
    use Nette\StaticClass;
    /**
     * Generates a random string of given length from characters specified in second argument.
     * Supports intervals, such as `0-9` or `A-Z`.
     */
    public static function generate(int $length = 10, string $charlist = '0-9a-z') : string
    {
        $charlist = \count_chars(\preg_replace_callback('#.-.#', function (array $m) : string {
            return \implode('', \range($m[0][0], $m[0][2]));
        }, $charlist), 3);
        $chLen = \strlen($charlist);
        if ($length < 1) {
            throw new Nette\InvalidArgumentException('Length must be greater than zero.');
        } elseif ($chLen < 2) {
            throw new Nette\InvalidArgumentException('Character list must contain at least two chars.');
        }
        $res = '';
        for ($i = 0; $i < $length; $i++) {
            $res .= $charlist[\random_int(0, $chLen - 1)];
        }
        return $res;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Utils;

use _PHPStan_dcc7b7cff\Nette;
class Helpers
{
    /**
     * Executes a callback and returns the captured output as a string.
     */
    public static function capture(callable $func) : string
    {
        \ob_start(function () {
        });
        try {
            $func();
            return \ob_get_clean();
        } catch (\Throwable $e) {
            \ob_end_clean();
            throw $e;
        }
    }
    /**
     * Returns the last occurred PHP error or an empty string if no error occurred. Unlike error_get_last(),
     * it is nit affected by the PHP directive html_errors and always returns text, not HTML.
     */
    public static function getLastError() : string
    {
        $message = \error_get_last()['message'] ?? '';
        $message = \ini_get('html_errors') ? Html::htmlToText($message) : $message;
        $message = \preg_replace('#^\\w+\\(.*?\\): #', '', $message);
        return $message;
    }
    /**
     * Converts false to null, does not change other values.
     * @param  mixed  $value
     * @return mixed
     */
    public static function falseToNull($value)
    {
        return $value === \false ? null : $value;
    }
    /**
     * Returns value clamped to the inclusive range of min and max.
     * @param  int|float  $value
     * @param  int|float  $min
     * @param  int|float  $max
     * @return int|float
     */
    public static function clamp($value, $min, $max)
    {
        if ($min > $max) {
            throw new Nette\InvalidArgumentException("Minimum ({$min}) is not less than maximum ({$max}).");
        }
        return \min(\max($value, $min), $max);
    }
    /**
     * Looks for a string from possibilities that is most similar to value, but not the same (for 8-bit encoding).
     * @param  string[]  $possibilities
     */
    public static function getSuggestion(array $possibilities, string $value) : ?string
    {
        $best = null;
        $min = (\strlen($value) / 4 + 1) * 10 + 0.1;
        foreach (\array_unique($possibilities) as $item) {
            if ($item !== $value && ($len = \levenshtein($item, $value, 10, 11, 10)) < $min) {
                $min = $len;
                $best = $item;
            }
        }
        return $best;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Utils;

use _PHPStan_dcc7b7cff\Nette;
/**
 * DateTime.
 */
class DateTime extends \DateTime implements \JsonSerializable
{
    use Nette\SmartObject;
    /** minute in seconds */
    public const MINUTE = 60;
    /** hour in seconds */
    public const HOUR = 60 * self::MINUTE;
    /** day in seconds */
    public const DAY = 24 * self::HOUR;
    /** week in seconds */
    public const WEEK = 7 * self::DAY;
    /** average month in seconds */
    public const MONTH = 2629800;
    /** average year in seconds */
    public const YEAR = 31557600;
    /**
     * Creates a DateTime object from a string, UNIX timestamp, or other DateTimeInterface object.
     * @param  string|int|\DateTimeInterface  $time
     * @return static
     * @throws \Exception if the date and time are not valid.
     */
    public static function from($time)
    {
        if ($time instanceof \DateTimeInterface) {
            return new static($time->format('Y-m-d H:i:s.u'), $time->getTimezone());
        } elseif (\is_numeric($time)) {
            if ($time <= self::YEAR) {
                $time += \time();
            }
            return (new static('@' . $time))->setTimezone(new \DateTimeZone(\date_default_timezone_get()));
        } else {
            // textual or null
            return new static((string) $time);
        }
    }
    /**
     * Creates DateTime object.
     * @return static
     * @throws Nette\InvalidArgumentException if the date and time are not valid.
     */
    public static function fromParts(int $year, int $month, int $day, int $hour = 0, int $minute = 0, float $second = 0.0)
    {
        $s = \sprintf('%04d-%02d-%02d %02d:%02d:%02.5F', $year, $month, $day, $hour, $minute, $second);
        if (!\checkdate($month, $day, $year) || $hour < 0 || $hour > 23 || $minute < 0 || $minute > 59 || $second < 0 || $second >= 60) {
            throw new Nette\InvalidArgumentException("Invalid date '{$s}'");
        }
        return new static($s);
    }
    /**
     * Returns new DateTime object formatted according to the specified format.
     * @param  string  $format  The format the $time parameter should be in
     * @param  string  $time
     * @param  string|\DateTimeZone  $timezone (default timezone is used if null is passed)
     * @return static|false
     */
    #[\ReturnTypeWillChange]
    public static function createFromFormat($format, $time, $timezone = null)
    {
        if ($timezone === null) {
            $timezone = new \DateTimeZone(\date_default_timezone_get());
        } elseif (\is_string($timezone)) {
            $timezone = new \DateTimeZone($timezone);
        } elseif (!$timezone instanceof \DateTimeZone) {
            throw new Nette\InvalidArgumentException('Invalid timezone given');
        }
        $date = parent::createFromFormat($format, $time, $timezone);
        return $date ? static::from($date) : \false;
    }
    /**
     * Returns JSON representation in ISO 8601 (used by JavaScript).
     */
    public function jsonSerialize() : string
    {
        return $this->format('c');
    }
    /**
     * Returns the date and time in the format 'Y-m-d H:i:s'.
     */
    public function __toString() : string
    {
        return $this->format('Y-m-d H:i:s');
    }
    /**
     * Creates a copy with a modified time.
     * @return static
     */
    public function modifyClone(string $modify = '')
    {
        $dolly = clone $this;
        return $modify ? $dolly->modify($modify) : $dolly;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Utils;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Basic manipulation with images. Supported types are JPEG, PNG, GIF, WEBP, AVIF and BMP.
 *
 * <code>
 * $image = Image::fromFile('nette.jpg');
 * $image->resize(150, 100);
 * $image->sharpen();
 * $image->send();
 * </code>
 *
 * @method Image affine(array $affine, array $clip = null)
 * @method array affineMatrixConcat(array $m1, array $m2)
 * @method array affineMatrixGet(int $type, mixed $options = null)
 * @method void alphaBlending(bool $on)
 * @method void antialias(bool $on)
 * @method void arc($x, $y, $w, $h, $start, $end, $color)
 * @method void char(int $font, $x, $y, string $char, $color)
 * @method void charUp(int $font, $x, $y, string $char, $color)
 * @method int colorAllocate($red, $green, $blue)
 * @method int colorAllocateAlpha($red, $green, $blue, $alpha)
 * @method int colorAt($x, $y)
 * @method int colorClosest($red, $green, $blue)
 * @method int colorClosestAlpha($red, $green, $blue, $alpha)
 * @method int colorClosestHWB($red, $green, $blue)
 * @method void colorDeallocate($color)
 * @method int colorExact($red, $green, $blue)
 * @method int colorExactAlpha($red, $green, $blue, $alpha)
 * @method void colorMatch(Image $image2)
 * @method int colorResolve($red, $green, $blue)
 * @method int colorResolveAlpha($red, $green, $blue, $alpha)
 * @method void colorSet($index, $red, $green, $blue)
 * @method array colorsForIndex($index)
 * @method int colorsTotal()
 * @method int colorTransparent($color = null)
 * @method void convolution(array $matrix, float $div, float $offset)
 * @method void copy(Image $src, $dstX, $dstY, $srcX, $srcY, $srcW, $srcH)
 * @method void copyMerge(Image $src, $dstX, $dstY, $srcX, $srcY, $srcW, $srcH, $opacity)
 * @method void copyMergeGray(Image $src, $dstX, $dstY, $srcX, $srcY, $srcW, $srcH, $opacity)
 * @method void copyResampled(Image $src, $dstX, $dstY, $srcX, $srcY, $dstW, $dstH, $srcW, $srcH)
 * @method void copyResized(Image $src, $dstX, $dstY, $srcX, $srcY, $dstW, $dstH, $srcW, $srcH)
 * @method Image cropAuto(int $mode = -1, float $threshold = .5, int $color = -1)
 * @method void ellipse($cx, $cy, $w, $h, $color)
 * @method void fill($x, $y, $color)
 * @method void filledArc($cx, $cy, $w, $h, $s, $e, $color, $style)
 * @method void filledEllipse($cx, $cy, $w, $h, $color)
 * @method void filledPolygon(array $points, $numPoints, $color)
 * @method void filledRectangle($x1, $y1, $x2, $y2, $color)
 * @method void fillToBorder($x, $y, $border, $color)
 * @method void filter($filtertype)
 * @method void flip(int $mode)
 * @method array ftText($size, $angle, $x, $y, $col, string $fontFile, string $text, array $extrainfo = null)
 * @method void gammaCorrect(float $inputgamma, float $outputgamma)
 * @method array getClip()
 * @method int interlace($interlace = null)
 * @method bool isTrueColor()
 * @method void layerEffect($effect)
 * @method void line($x1, $y1, $x2, $y2, $color)
 * @method void openPolygon(array $points, int $num_points, int $color)
 * @method void paletteCopy(Image $source)
 * @method void paletteToTrueColor()
 * @method void polygon(array $points, $numPoints, $color)
 * @method array psText(string $text, $font, $size, $color, $backgroundColor, $x, $y, $space = null, $tightness = null, float $angle = null, $antialiasSteps = null)
 * @method void rectangle($x1, $y1, $x2, $y2, $col)
 * @method mixed resolution(int $res_x = null, int $res_y = null)
 * @method Image rotate(float $angle, $backgroundColor)
 * @method void saveAlpha(bool $saveflag)
 * @method Image scale(int $newWidth, int $newHeight = -1, int $mode = IMG_BILINEAR_FIXED)
 * @method void setBrush(Image $brush)
 * @method void setClip(int $x1, int $y1, int $x2, int $y2)
 * @method void setInterpolation(int $method = IMG_BILINEAR_FIXED)
 * @method void setPixel($x, $y, $color)
 * @method void setStyle(array $style)
 * @method void setThickness($thickness)
 * @method void setTile(Image $tile)
 * @method void string($font, $x, $y, string $s, $col)
 * @method void stringUp($font, $x, $y, string $s, $col)
 * @method void trueColorToPalette(bool $dither, $ncolors)
 * @method array ttfText($size, $angle, $x, $y, $color, string $fontfile, string $text)
 * @property-read int $width
 * @property-read int $height
 * @property-read resource|\GdImage $imageResource
 */
class Image
{
    use Nette\SmartObject;
    /** {@link resize()} only shrinks images */
    public const SHRINK_ONLY = 0b1;
    /** {@link resize()} will ignore aspect ratio */
    public const STRETCH = 0b10;
    /** {@link resize()} fits in given area so its dimensions are less than or equal to the required dimensions */
    public const FIT = 0b0;
    /** {@link resize()} fills given area so its dimensions are greater than or equal to the required dimensions */
    public const FILL = 0b100;
    /** {@link resize()} fills given area exactly */
    public const EXACT = 0b1000;
    /** image types */
    public const JPEG = \IMAGETYPE_JPEG, PNG = \IMAGETYPE_PNG, GIF = \IMAGETYPE_GIF, WEBP = \IMAGETYPE_WEBP, AVIF = 19, BMP = \IMAGETYPE_BMP;
    public const EMPTY_GIF = "GIF89a\x01\x00\x01\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00!\xf9\x04\x01\x00\x00\x00\x00,\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02\x02D\x01\x00;";
    private const FORMATS = [self::JPEG => 'jpeg', self::PNG => 'png', self::GIF => 'gif', self::WEBP => 'webp', self::AVIF => 'avif', self::BMP => 'bmp'];
    /** @var resource|\GdImage */
    private $image;
    /**
     * Returns RGB color (0..255) and transparency (0..127).
     */
    public static function rgb(int $red, int $green, int $blue, int $transparency = 0) : array
    {
        return ['red' => \max(0, \min(255, $red)), 'green' => \max(0, \min(255, $green)), 'blue' => \max(0, \min(255, $blue)), 'alpha' => \max(0, \min(127, $transparency))];
    }
    /**
     * Reads an image from a file and returns its type in $type.
     * @throws Nette\NotSupportedException if gd extension is not loaded
     * @throws UnknownImageFileException if file not found or file type is not known
     * @return static
     */
    public static function fromFile(string $file, ?int &$type = null)
    {
        if (!\extension_loaded('gd')) {
            throw new Nette\NotSupportedException('PHP extension GD is not loaded.');
        }
        $type = self::detectTypeFromFile($file);
        if (!$type) {
            throw new UnknownImageFileException(\is_file($file) ? "Unknown type of file '{$file}'." : "File '{$file}' not found.");
        }
        return self::invokeSafe('imagecreatefrom' . self::FORMATS[$type], $file, "Unable to open file '{$file}'.", __METHOD__);
    }
    /**
     * Reads an image from a string and returns its type in $type.
     * @return static
     * @throws Nette\NotSupportedException if gd extension is not loaded
     * @throws ImageException
     */
    public static function fromString(string $s, ?int &$type = null)
    {
        if (!\extension_loaded('gd')) {
            throw new Nette\NotSupportedException('PHP extension GD is not loaded.');
        }
        $type = self::detectTypeFromString($s);
        if (!$type) {
            throw new UnknownImageFileException('Unknown type of image.');
        }
        return self::invokeSafe('imagecreatefromstring', $s, 'Unable to open image from string.', __METHOD__);
    }
    private static function invokeSafe(string $func, string $arg, string $message, string $callee) : self
    {
        $errors = [];
        $res = Callback::invokeSafe($func, [$arg], function (string $message) use(&$errors) : void {
            $errors[] = $message;
        });
        if (!$res) {
            throw new ImageException($message . ' Errors: ' . \implode(', ', $errors));
        } elseif ($errors) {
            \trigger_error($callee . '(): ' . \implode(', ', $errors), \E_USER_WARNING);
        }
        return new static($res);
    }
    /**
     * Creates a new true color image of the given dimensions. The default color is black.
     * @return static
     * @throws Nette\NotSupportedException if gd extension is not loaded
     */
    public static function fromBlank(int $width, int $height, ?array $color = null)
    {
        if (!\extension_loaded('gd')) {
            throw new Nette\NotSupportedException('PHP extension GD is not loaded.');
        }
        if ($width < 1 || $height < 1) {
            throw new Nette\InvalidArgumentException('Image width and height must be greater than zero.');
        }
        $image = \imagecreatetruecolor($width, $height);
        if ($color) {
            $color += ['alpha' => 0];
            $color = \imagecolorresolvealpha($image, $color['red'], $color['green'], $color['blue'], $color['alpha']);
            \imagealphablending($image, \false);
            \imagefilledrectangle($image, 0, 0, $width - 1, $height - 1, $color);
            \imagealphablending($image, \true);
        }
        return new static($image);
    }
    /**
     * Returns the type of image from file.
     */
    public static function detectTypeFromFile(string $file) : ?int
    {
        $type = @\getimagesize($file)[2];
        // @ - files smaller than 12 bytes causes read error
        return isset(self::FORMATS[$type]) ? $type : null;
    }
    /**
     * Returns the type of image from string.
     */
    public static function detectTypeFromString(string $s) : ?int
    {
        $type = @\getimagesizefromstring($s)[2];
        // @ - strings smaller than 12 bytes causes read error
        return isset(self::FORMATS[$type]) ? $type : null;
    }
    /**
     * Returns the file extension for the given `Image::XXX` constant.
     */
    public static function typeToExtension(int $type) : string
    {
        if (!isset(self::FORMATS[$type])) {
            throw new Nette\InvalidArgumentException("Unsupported image type '{$type}'.");
        }
        return self::FORMATS[$type];
    }
    /**
     * Returns the mime type for the given `Image::XXX` constant.
     */
    public static function typeToMimeType(int $type) : string
    {
        return 'image/' . self::typeToExtension($type);
    }
    /**
     * Wraps GD image.
     * @param  resource|\GdImage  $image
     */
    public function __construct($image)
    {
        $this->setImageResource($image);
        \imagesavealpha($image, \true);
    }
    /**
     * Returns image width.
     */
    public function getWidth() : int
    {
        return \imagesx($this->image);
    }
    /**
     * Returns image height.
     */
    public function getHeight() : int
    {
        return \imagesy($this->image);
    }
    /**
     * Sets image resource.
     * @param  resource|\GdImage  $image
     * @return static
     */
    protected function setImageResource($image)
    {
        if (!$image instanceof \GdImage && !(\is_resource($image) && \get_resource_type($image) === 'gd')) {
            throw new Nette\InvalidArgumentException('Image is not valid.');
        }
        $this->image = $image;
        return $this;
    }
    /**
     * Returns image GD resource.
     * @return resource|\GdImage
     */
    public function getImageResource()
    {
        return $this->image;
    }
    /**
     * Scales an image.
     * @param  int|string|null  $width in pixels or percent
     * @param  int|string|null  $height in pixels or percent
     * @return static
     */
    public function resize($width, $height, int $flags = self::FIT)
    {
        if ($flags & self::EXACT) {
            return $this->resize($width, $height, self::FILL)->crop('50%', '50%', $width, $height);
        }
        [$newWidth, $newHeight] = static::calculateSize($this->getWidth(), $this->getHeight(), $width, $height, $flags);
        if ($newWidth !== $this->getWidth() || $newHeight !== $this->getHeight()) {
            // resize
            $newImage = static::fromBlank($newWidth, $newHeight, self::rgb(0, 0, 0, 127))->getImageResource();
            \imagecopyresampled($newImage, $this->image, 0, 0, 0, 0, $newWidth, $newHeight, $this->getWidth(), $this->getHeight());
            $this->image = $newImage;
        }
        if ($width < 0 || $height < 0) {
            \imageflip($this->image, $width < 0 ? $height < 0 ? \IMG_FLIP_BOTH : \IMG_FLIP_HORIZONTAL : \IMG_FLIP_VERTICAL);
        }
        return $this;
    }
    /**
     * Calculates dimensions of resized image.
     * @param  int|string|null  $newWidth in pixels or percent
     * @param  int|string|null  $newHeight in pixels or percent
     */
    public static function calculateSize(int $srcWidth, int $srcHeight, $newWidth, $newHeight, int $flags = self::FIT) : array
    {
        if ($newWidth === null) {
        } elseif (self::isPercent($newWidth)) {
            $newWidth = (int) \round($srcWidth / 100 * \abs($newWidth));
            $percents = \true;
        } else {
            $newWidth = \abs($newWidth);
        }
        if ($newHeight === null) {
        } elseif (self::isPercent($newHeight)) {
            $newHeight = (int) \round($srcHeight / 100 * \abs($newHeight));
            $flags |= empty($percents) ? 0 : self::STRETCH;
        } else {
            $newHeight = \abs($newHeight);
        }
        if ($flags & self::STRETCH) {
            // non-proportional
            if (!$newWidth || !$newHeight) {
                throw new Nette\InvalidArgumentException('For stretching must be both width and height specified.');
            }
            if ($flags & self::SHRINK_ONLY) {
                $newWidth = (int) \round($srcWidth * \min(1, $newWidth / $srcWidth));
                $newHeight = (int) \round($srcHeight * \min(1, $newHeight / $srcHeight));
            }
        } else {
            // proportional
            if (!$newWidth && !$newHeight) {
                throw new Nette\InvalidArgumentException('At least width or height must be specified.');
            }
            $scale = [];
            if ($newWidth > 0) {
                // fit width
                $scale[] = $newWidth / $srcWidth;
            }
            if ($newHeight > 0) {
                // fit height
                $scale[] = $newHeight / $srcHeight;
            }
            if ($flags & self::FILL) {
                $scale = [\max($scale)];
            }
            if ($flags & self::SHRINK_ONLY) {
                $scale[] = 1;
            }
            $scale = \min($scale);
            $newWidth = (int) \round($srcWidth * $scale);
            $newHeight = (int) \round($srcHeight * $scale);
        }
        return [\max($newWidth, 1), \max($newHeight, 1)];
    }
    /**
     * Crops image.
     * @param  int|string  $left in pixels or percent
     * @param  int|string  $top in pixels or percent
     * @param  int|string  $width in pixels or percent
     * @param  int|string  $height in pixels or percent
     * @return static
     */
    public function crop($left, $top, $width, $height)
    {
        [$r['x'], $r['y'], $r['width'], $r['height']] = static::calculateCutout($this->getWidth(), $this->getHeight(), $left, $top, $width, $height);
        if (\gd_info()['GD Version'] === 'bundled (2.1.0 compatible)') {
            $this->image = \imagecrop($this->image, $r);
            \imagesavealpha($this->image, \true);
        } else {
            $newImage = static::fromBlank($r['width'], $r['height'], self::RGB(0, 0, 0, 127))->getImageResource();
            \imagecopy($newImage, $this->image, 0, 0, $r['x'], $r['y'], $r['width'], $r['height']);
            $this->image = $newImage;
        }
        return $this;
    }
    /**
     * Calculates dimensions of cutout in image.
     * @param  int|string  $left in pixels or percent
     * @param  int|string  $top in pixels or percent
     * @param  int|string  $newWidth in pixels or percent
     * @param  int|string  $newHeight in pixels or percent
     */
    public static function calculateCutout(int $srcWidth, int $srcHeight, $left, $top, $newWidth, $newHeight) : array
    {
        if (self::isPercent($newWidth)) {
            $newWidth = (int) \round($srcWidth / 100 * $newWidth);
        }
        if (self::isPercent($newHeight)) {
            $newHeight = (int) \round($srcHeight / 100 * $newHeight);
        }
        if (self::isPercent($left)) {
            $left = (int) \round(($srcWidth - $newWidth) / 100 * $left);
        }
        if (self::isPercent($top)) {
            $top = (int) \round(($srcHeight - $newHeight) / 100 * $top);
        }
        if ($left < 0) {
            $newWidth += $left;
            $left = 0;
        }
        if ($top < 0) {
            $newHeight += $top;
            $top = 0;
        }
        $newWidth = \min($newWidth, $srcWidth - $left);
        $newHeight = \min($newHeight, $srcHeight - $top);
        return [$left, $top, $newWidth, $newHeight];
    }
    /**
     * Sharpens image a little bit.
     * @return static
     */
    public function sharpen()
    {
        \imageconvolution($this->image, [
            // my magic numbers ;)
            [-1, -1, -1],
            [-1, 24, -1],
            [-1, -1, -1],
        ], 16, 0);
        return $this;
    }
    /**
     * Puts another image into this image.
     * @param  int|string  $left in pixels or percent
     * @param  int|string  $top in pixels or percent
     * @param  int  $opacity 0..100
     * @return static
     */
    public function place(self $image, $left = 0, $top = 0, int $opacity = 100)
    {
        $opacity = \max(0, \min(100, $opacity));
        if ($opacity === 0) {
            return $this;
        }
        $width = $image->getWidth();
        $height = $image->getHeight();
        if (self::isPercent($left)) {
            $left = (int) \round(($this->getWidth() - $width) / 100 * $left);
        }
        if (self::isPercent($top)) {
            $top = (int) \round(($this->getHeight() - $height) / 100 * $top);
        }
        $output = $input = $image->image;
        if ($opacity < 100) {
            $tbl = [];
            for ($i = 0; $i < 128; $i++) {
                $tbl[$i] = \round(127 - (127 - $i) * $opacity / 100);
            }
            $output = \imagecreatetruecolor($width, $height);
            \imagealphablending($output, \false);
            if (!$image->isTrueColor()) {
                $input = $output;
                \imagefilledrectangle($output, 0, 0, $width, $height, \imagecolorallocatealpha($output, 0, 0, 0, 127));
                \imagecopy($output, $image->image, 0, 0, 0, 0, $width, $height);
            }
            for ($x = 0; $x < $width; $x++) {
                for ($y = 0; $y < $height; $y++) {
                    $c = \imagecolorat($input, $x, $y);
                    $c = ($c & 0xffffff) + ($tbl[$c >> 24] << 24);
                    \imagesetpixel($output, $x, $y, $c);
                }
            }
            \imagealphablending($output, \true);
        }
        \imagecopy($this->image, $output, $left, $top, 0, 0, $width, $height);
        return $this;
    }
    /**
     * Saves image to the file. Quality is in the range 0..100 for JPEG (default 85), WEBP (default 80) and AVIF (default 30) and 0..9 for PNG (default 9).
     * @throws ImageException
     */
    public function save(string $file, ?int $quality = null, ?int $type = null) : void
    {
        if ($type === null) {
            $extensions = \array_flip(self::FORMATS) + ['jpg' => self::JPEG];
            $ext = \strtolower(\pathinfo($file, \PATHINFO_EXTENSION));
            if (!isset($extensions[$ext])) {
                throw new Nette\InvalidArgumentException("Unsupported file extension '{$ext}'.");
            }
            $type = $extensions[$ext];
        }
        $this->output($type, $quality, $file);
    }
    /**
     * Outputs image to string. Quality is in the range 0..100 for JPEG (default 85), WEBP (default 80) and AVIF (default 30) and 0..9 for PNG (default 9).
     */
    public function toString(int $type = self::JPEG, ?int $quality = null) : string
    {
        return Helpers::capture(function () use($type, $quality) {
            $this->output($type, $quality);
        });
    }
    /**
     * Outputs image to string.
     */
    public function __toString() : string
    {
        try {
            return $this->toString();
        } catch (\Throwable $e) {
            if (\func_num_args() || \PHP_VERSION_ID >= 70400) {
                throw $e;
            }
            \trigger_error('Exception in ' . __METHOD__ . "(): {$e->getMessage()} in {$e->getFile()}:{$e->getLine()}", \E_USER_ERROR);
            return '';
        }
    }
    /**
     * Outputs image to browser. Quality is in the range 0..100 for JPEG (default 85), WEBP (default 80) and AVIF (default 30) and 0..9 for PNG (default 9).
     * @throws ImageException
     */
    public function send(int $type = self::JPEG, ?int $quality = null) : void
    {
        \header('Content-Type: ' . self::typeToMimeType($type));
        $this->output($type, $quality);
    }
    /**
     * Outputs image to browser or file.
     * @throws ImageException
     */
    private function output(int $type, ?int $quality, ?string $file = null) : void
    {
        switch ($type) {
            case self::JPEG:
                $quality = $quality === null ? 85 : \max(0, \min(100, $quality));
                $success = @\imagejpeg($this->image, $file, $quality);
                // @ is escalated to exception
                break;
            case self::PNG:
                $quality = $quality === null ? 9 : \max(0, \min(9, $quality));
                $success = @\imagepng($this->image, $file, $quality);
                // @ is escalated to exception
                break;
            case self::GIF:
                $success = @\imagegif($this->image, $file);
                // @ is escalated to exception
                break;
            case self::WEBP:
                $quality = $quality === null ? 80 : \max(0, \min(100, $quality));
                $success = @\imagewebp($this->image, $file, $quality);
                // @ is escalated to exception
                break;
            case self::AVIF:
                $quality = $quality === null ? 30 : \max(0, \min(100, $quality));
                $success = @\imageavif($this->image, $file, $quality);
                // @ is escalated to exception
                break;
            case self::BMP:
                $success = @\imagebmp($this->image, $file);
                // @ is escalated to exception
                break;
            default:
                throw new Nette\InvalidArgumentException("Unsupported image type '{$type}'.");
        }
        if (!$success) {
            throw new ImageException(Helpers::getLastError() ?: 'Unknown error');
        }
    }
    /**
     * Call to undefined method.
     * @return mixed
     * @throws Nette\MemberAccessException
     */
    public function __call(string $name, array $args)
    {
        $function = 'image' . $name;
        if (!\function_exists($function)) {
            ObjectHelpers::strictCall(static::class, $name);
        }
        foreach ($args as $key => $value) {
            if ($value instanceof self) {
                $args[$key] = $value->getImageResource();
            } elseif (\is_array($value) && isset($value['red'])) {
                // rgb
                $args[$key] = \imagecolorallocatealpha($this->image, $value['red'], $value['green'], $value['blue'], $value['alpha']) ?: \imagecolorresolvealpha($this->image, $value['red'], $value['green'], $value['blue'], $value['alpha']);
            }
        }
        $res = $function($this->image, ...$args);
        return $res instanceof \GdImage || \is_resource($res) && \get_resource_type($res) === 'gd' ? $this->setImageResource($res) : $res;
    }
    public function __clone()
    {
        \ob_start(function () {
        });
        \imagegd2($this->image);
        $this->setImageResource(\imagecreatefromstring(\ob_get_clean()));
    }
    /**
     * @param  int|string  $num in pixels or percent
     */
    private static function isPercent(&$num) : bool
    {
        if (\is_string($num) && \substr($num, -1) === '%') {
            $num = (float) \substr($num, 0, -1);
            return \true;
        } elseif (\is_int($num) || $num === (string) (int) $num) {
            $num = (int) $num;
            return \false;
        }
        throw new Nette\InvalidArgumentException("Expected dimension in int|string, '{$num}' given.");
    }
    /**
     * Prevents serialization.
     */
    public function __sleep() : array
    {
        throw new Nette\NotSupportedException('You cannot serialize or unserialize ' . self::class . ' instances.');
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Utils;

use _PHPStan_dcc7b7cff\Nette;
use function is_array, is_object, is_string;
/**
 * PHP callable tools.
 */
final class Callback
{
    use Nette\StaticClass;
    /**
     * @param  string|object|callable  $callable  class, object, callable
     * @deprecated use Closure::fromCallable()
     */
    public static function closure($callable, ?string $method = null) : \Closure
    {
        \trigger_error(__METHOD__ . '() is deprecated, use Closure::fromCallable().', \E_USER_DEPRECATED);
        try {
            return \Closure::fromCallable($method === null ? $callable : [$callable, $method]);
        } catch (\TypeError $e) {
            throw new Nette\InvalidArgumentException($e->getMessage());
        }
    }
    /**
     * Invokes callback.
     * @return mixed
     * @deprecated
     */
    public static function invoke($callable, ...$args)
    {
        \trigger_error(__METHOD__ . '() is deprecated, use native invoking.', \E_USER_DEPRECATED);
        self::check($callable);
        return $callable(...$args);
    }
    /**
     * Invokes callback with an array of parameters.
     * @return mixed
     * @deprecated
     */
    public static function invokeArgs($callable, array $args = [])
    {
        \trigger_error(__METHOD__ . '() is deprecated, use native invoking.', \E_USER_DEPRECATED);
        self::check($callable);
        return $callable(...$args);
    }
    /**
     * Invokes internal PHP function with own error handler.
     * @return mixed
     */
    public static function invokeSafe(string $function, array $args, callable $onError)
    {
        $prev = \set_error_handler(function ($severity, $message, $file) use($onError, &$prev, $function) : ?bool {
            if ($file === __FILE__) {
                $msg = \ini_get('html_errors') ? Html::htmlToText($message) : $message;
                $msg = \preg_replace("#^{$function}\\(.*?\\): #", '', $msg);
                if ($onError($msg, $severity) !== \false) {
                    return null;
                }
            }
            return $prev ? $prev(...\func_get_args()) : \false;
        });
        try {
            return $function(...$args);
        } finally {
            \restore_error_handler();
        }
    }
    /**
     * Checks that $callable is valid PHP callback. Otherwise throws exception. If the $syntax is set to true, only verifies
     * that $callable has a valid structure to be used as a callback, but does not verify if the class or method actually exists.
     * @param  mixed  $callable
     * @return callable
     * @throws Nette\InvalidArgumentException
     */
    public static function check($callable, bool $syntax = \false)
    {
        if (!\is_callable($callable, $syntax)) {
            throw new Nette\InvalidArgumentException($syntax ? 'Given value is not a callable type.' : \sprintf("Callback '%s' is not callable.", self::toString($callable)));
        }
        return $callable;
    }
    /**
     * Converts PHP callback to textual form. Class or method may not exists.
     * @param  mixed  $callable
     */
    public static function toString($callable) : string
    {
        if ($callable instanceof \Closure) {
            $inner = self::unwrap($callable);
            return '{closure' . ($inner instanceof \Closure ? '}' : ' ' . self::toString($inner) . '}');
        } elseif (is_string($callable) && $callable[0] === "\x00") {
            return '{lambda}';
        } else {
            \is_callable(is_object($callable) ? [$callable, '__invoke'] : $callable, \true, $textual);
            return $textual;
        }
    }
    /**
     * Returns reflection for method or function used in PHP callback.
     * @param  callable  $callable  type check is escalated to ReflectionException
     * @return \ReflectionMethod|\ReflectionFunction
     * @throws \ReflectionException  if callback is not valid
     */
    public static function toReflection($callable) : \ReflectionFunctionAbstract
    {
        if ($callable instanceof \Closure) {
            $callable = self::unwrap($callable);
        }
        if (is_string($callable) && \strpos($callable, '::')) {
            return new \ReflectionMethod($callable);
        } elseif (is_array($callable)) {
            return new \ReflectionMethod($callable[0], $callable[1]);
        } elseif (is_object($callable) && !$callable instanceof \Closure) {
            return new \ReflectionMethod($callable, '__invoke');
        } else {
            return new \ReflectionFunction($callable);
        }
    }
    /**
     * Checks whether PHP callback is function or static method.
     */
    public static function isStatic(callable $callable) : bool
    {
        return is_array($callable) ? is_string($callable[0]) : is_string($callable);
    }
    /**
     * Unwraps closure created by Closure::fromCallable().
     * @return callable|array
     */
    public static function unwrap(\Closure $closure)
    {
        $r = new \ReflectionFunction($closure);
        if (\substr($r->name, -1) === '}') {
            return $closure;
        } elseif ($obj = $r->getClosureThis()) {
            return [$obj, $r->name];
        } elseif ($class = $r->getClosureScopeClass()) {
            return [$class->name, $r->name];
        } else {
            return $r->name;
        }
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Utils;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\HtmlStringable;
use function is_array, is_float, is_object, is_string;
/**
 * HTML helper.
 *
 * @property string|null $accept
 * @property string|null $accesskey
 * @property string|null $action
 * @property string|null $align
 * @property string|null $allow
 * @property string|null $alt
 * @property bool|null   $async
 * @property string|null $autocapitalize
 * @property string|null $autocomplete
 * @property bool|null   $autofocus
 * @property bool|null   $autoplay
 * @property string|null $charset
 * @property bool|null   $checked
 * @property string|null $cite
 * @property string|null $class
 * @property int|null    $cols
 * @property int|null    $colspan
 * @property string|null $content
 * @property bool|null   $contenteditable
 * @property bool|null   $controls
 * @property string|null $coords
 * @property string|null $crossorigin
 * @property string|null $data
 * @property string|null $datetime
 * @property string|null $decoding
 * @property bool|null   $default
 * @property bool|null   $defer
 * @property string|null $dir
 * @property string|null $dirname
 * @property bool|null   $disabled
 * @property bool|null   $download
 * @property string|null $draggable
 * @property string|null $dropzone
 * @property string|null $enctype
 * @property string|null $for
 * @property string|null $form
 * @property string|null $formaction
 * @property string|null $formenctype
 * @property string|null $formmethod
 * @property bool|null   $formnovalidate
 * @property string|null $formtarget
 * @property string|null $headers
 * @property int|null    $height
 * @property bool|null   $hidden
 * @property float|null  $high
 * @property string|null $href
 * @property string|null $hreflang
 * @property string|null $id
 * @property string|null $integrity
 * @property string|null $inputmode
 * @property bool|null   $ismap
 * @property string|null $itemprop
 * @property string|null $kind
 * @property string|null $label
 * @property string|null $lang
 * @property string|null $list
 * @property bool|null   $loop
 * @property float|null  $low
 * @property float|null  $max
 * @property int|null    $maxlength
 * @property int|null    $minlength
 * @property string|null $media
 * @property string|null $method
 * @property float|null  $min
 * @property bool|null   $multiple
 * @property bool|null   $muted
 * @property string|null $name
 * @property bool|null   $novalidate
 * @property bool|null   $open
 * @property float|null  $optimum
 * @property string|null $pattern
 * @property string|null $ping
 * @property string|null $placeholder
 * @property string|null $poster
 * @property string|null $preload
 * @property string|null $radiogroup
 * @property bool|null   $readonly
 * @property string|null $rel
 * @property bool|null   $required
 * @property bool|null   $reversed
 * @property int|null    $rows
 * @property int|null    $rowspan
 * @property string|null $sandbox
 * @property string|null $scope
 * @property bool|null   $selected
 * @property string|null $shape
 * @property int|null    $size
 * @property string|null $sizes
 * @property string|null $slot
 * @property int|null    $span
 * @property string|null $spellcheck
 * @property string|null $src
 * @property string|null $srcdoc
 * @property string|null $srclang
 * @property string|null $srcset
 * @property int|null    $start
 * @property float|null  $step
 * @property string|null $style
 * @property int|null    $tabindex
 * @property string|null $target
 * @property string|null $title
 * @property string|null $translate
 * @property string|null $type
 * @property string|null $usemap
 * @property string|null $value
 * @property int|null    $width
 * @property string|null $wrap
 *
 * @method self accept(?string $val)
 * @method self accesskey(?string $val, bool $state = null)
 * @method self action(?string $val)
 * @method self align(?string $val)
 * @method self allow(?string $val, bool $state = null)
 * @method self alt(?string $val)
 * @method self async(?bool $val)
 * @method self autocapitalize(?string $val)
 * @method self autocomplete(?string $val)
 * @method self autofocus(?bool $val)
 * @method self autoplay(?bool $val)
 * @method self charset(?string $val)
 * @method self checked(?bool $val)
 * @method self cite(?string $val)
 * @method self class(?string $val, bool $state = null)
 * @method self cols(?int $val)
 * @method self colspan(?int $val)
 * @method self content(?string $val)
 * @method self contenteditable(?bool $val)
 * @method self controls(?bool $val)
 * @method self coords(?string $val)
 * @method self crossorigin(?string $val)
 * @method self datetime(?string $val)
 * @method self decoding(?string $val)
 * @method self default(?bool $val)
 * @method self defer(?bool $val)
 * @method self dir(?string $val)
 * @method self dirname(?string $val)
 * @method self disabled(?bool $val)
 * @method self download(?bool $val)
 * @method self draggable(?string $val)
 * @method self dropzone(?string $val)
 * @method self enctype(?string $val)
 * @method self for(?string $val)
 * @method self form(?string $val)
 * @method self formaction(?string $val)
 * @method self formenctype(?string $val)
 * @method self formmethod(?string $val)
 * @method self formnovalidate(?bool $val)
 * @method self formtarget(?string $val)
 * @method self headers(?string $val, bool $state = null)
 * @method self height(?int $val)
 * @method self hidden(?bool $val)
 * @method self high(?float $val)
 * @method self hreflang(?string $val)
 * @method self id(?string $val)
 * @method self integrity(?string $val)
 * @method self inputmode(?string $val)
 * @method self ismap(?bool $val)
 * @method self itemprop(?string $val)
 * @method self kind(?string $val)
 * @method self label(?string $val)
 * @method self lang(?string $val)
 * @method self list(?string $val)
 * @method self loop(?bool $val)
 * @method self low(?float $val)
 * @method self max(?float $val)
 * @method self maxlength(?int $val)
 * @method self minlength(?int $val)
 * @method self media(?string $val)
 * @method self method(?string $val)
 * @method self min(?float $val)
 * @method self multiple(?bool $val)
 * @method self muted(?bool $val)
 * @method self name(?string $val)
 * @method self novalidate(?bool $val)
 * @method self open(?bool $val)
 * @method self optimum(?float $val)
 * @method self pattern(?string $val)
 * @method self ping(?string $val, bool $state = null)
 * @method self placeholder(?string $val)
 * @method self poster(?string $val)
 * @method self preload(?string $val)
 * @method self radiogroup(?string $val)
 * @method self readonly(?bool $val)
 * @method self rel(?string $val)
 * @method self required(?bool $val)
 * @method self reversed(?bool $val)
 * @method self rows(?int $val)
 * @method self rowspan(?int $val)
 * @method self sandbox(?string $val, bool $state = null)
 * @method self scope(?string $val)
 * @method self selected(?bool $val)
 * @method self shape(?string $val)
 * @method self size(?int $val)
 * @method self sizes(?string $val)
 * @method self slot(?string $val)
 * @method self span(?int $val)
 * @method self spellcheck(?string $val)
 * @method self src(?string $val)
 * @method self srcdoc(?string $val)
 * @method self srclang(?string $val)
 * @method self srcset(?string $val)
 * @method self start(?int $val)
 * @method self step(?float $val)
 * @method self style(?string $property, string $val = null)
 * @method self tabindex(?int $val)
 * @method self target(?string $val)
 * @method self title(?string $val)
 * @method self translate(?string $val)
 * @method self type(?string $val)
 * @method self usemap(?string $val)
 * @method self value(?string $val)
 * @method self width(?int $val)
 * @method self wrap(?string $val)
 */
class Html implements \ArrayAccess, \Countable, \IteratorAggregate, HtmlStringable
{
    use Nette\SmartObject;
    /** @var array<string, mixed>  element's attributes */
    public $attrs = [];
    /** @var bool  use XHTML syntax? */
    public static $xhtml = \false;
    /** @var array<string, int>  void elements */
    public static $emptyElements = ['img' => 1, 'hr' => 1, 'br' => 1, 'input' => 1, 'meta' => 1, 'area' => 1, 'embed' => 1, 'keygen' => 1, 'source' => 1, 'base' => 1, 'col' => 1, 'link' => 1, 'param' => 1, 'basefont' => 1, 'frame' => 1, 'isindex' => 1, 'wbr' => 1, 'command' => 1, 'track' => 1];
    /** @var array<int, HtmlStringable|string> nodes */
    protected $children = [];
    /** @var string  element's name */
    private $name;
    /** @var bool  is element empty? */
    private $isEmpty;
    /**
     * Constructs new HTML element.
     * @param  array|string $attrs element's attributes or plain text content
     * @return static
     */
    public static function el(?string $name = null, $attrs = null)
    {
        $el = new static();
        $parts = \explode(' ', (string) $name, 2);
        $el->setName($parts[0]);
        if (is_array($attrs)) {
            $el->attrs = $attrs;
        } elseif ($attrs !== null) {
            $el->setText($attrs);
        }
        if (isset($parts[1])) {
            foreach (Strings::matchAll($parts[1] . ' ', '#([a-z0-9:-]+)(?:=(["\'])?(.*?)(?(2)\\2|\\s))?#i') as $m) {
                $el->attrs[$m[1]] = $m[3] ?? \true;
            }
        }
        return $el;
    }
    /**
     * Returns an object representing HTML text.
     */
    public static function fromHtml(string $html) : self
    {
        return (new static())->setHtml($html);
    }
    /**
     * Returns an object representing plain text.
     */
    public static function fromText(string $text) : self
    {
        return (new static())->setText($text);
    }
    /**
     * Converts to HTML.
     */
    public final function toHtml() : string
    {
        return $this->render();
    }
    /**
     * Converts to plain text.
     */
    public final function toText() : string
    {
        return $this->getText();
    }
    /**
     * Converts given HTML code to plain text.
     */
    public static function htmlToText(string $html) : string
    {
        return \html_entity_decode(\strip_tags($html), \ENT_QUOTES | \ENT_HTML5, 'UTF-8');
    }
    /**
     * Changes element's name.
     * @return static
     */
    public final function setName(string $name, ?bool $isEmpty = null)
    {
        $this->name = $name;
        $this->isEmpty = $isEmpty ?? isset(static::$emptyElements[$name]);
        return $this;
    }
    /**
     * Returns element's name.
     */
    public final function getName() : string
    {
        return $this->name;
    }
    /**
     * Is element empty?
     */
    public final function isEmpty() : bool
    {
        return $this->isEmpty;
    }
    /**
     * Sets multiple attributes.
     * @return static
     */
    public function addAttributes(array $attrs)
    {
        $this->attrs = \array_merge($this->attrs, $attrs);
        return $this;
    }
    /**
     * Appends value to element's attribute.
     * @param  mixed  $value
     * @param  mixed  $option
     * @return static
     */
    public function appendAttribute(string $name, $value, $option = \true)
    {
        if (is_array($value)) {
            $prev = isset($this->attrs[$name]) ? (array) $this->attrs[$name] : [];
            $this->attrs[$name] = $value + $prev;
        } elseif ((string) $value === '') {
            $tmp =& $this->attrs[$name];
            // appending empty value? -> ignore, but ensure it exists
        } elseif (!isset($this->attrs[$name]) || is_array($this->attrs[$name])) {
            // needs array
            $this->attrs[$name][$value] = $option;
        } else {
            $this->attrs[$name] = [$this->attrs[$name] => \true, $value => $option];
        }
        return $this;
    }
    /**
     * Sets element's attribute.
     * @param  mixed  $value
     * @return static
     */
    public function setAttribute(string $name, $value)
    {
        $this->attrs[$name] = $value;
        return $this;
    }
    /**
     * Returns element's attribute.
     * @return mixed
     */
    public function getAttribute(string $name)
    {
        return $this->attrs[$name] ?? null;
    }
    /**
     * Unsets element's attribute.
     * @return static
     */
    public function removeAttribute(string $name)
    {
        unset($this->attrs[$name]);
        return $this;
    }
    /**
     * Unsets element's attributes.
     * @return static
     */
    public function removeAttributes(array $attributes)
    {
        foreach ($attributes as $name) {
            unset($this->attrs[$name]);
        }
        return $this;
    }
    /**
     * Overloaded setter for element's attribute.
     * @param  mixed  $value
     */
    public final function __set(string $name, $value) : void
    {
        $this->attrs[$name] = $value;
    }
    /**
     * Overloaded getter for element's attribute.
     * @return mixed
     */
    public final function &__get(string $name)
    {
        return $this->attrs[$name];
    }
    /**
     * Overloaded tester for element's attribute.
     */
    public final function __isset(string $name) : bool
    {
        return isset($this->attrs[$name]);
    }
    /**
     * Overloaded unsetter for element's attribute.
     */
    public final function __unset(string $name) : void
    {
        unset($this->attrs[$name]);
    }
    /**
     * Overloaded setter for element's attribute.
     * @return mixed
     */
    public final function __call(string $m, array $args)
    {
        $p = \substr($m, 0, 3);
        if ($p === 'get' || $p === 'set' || $p === 'add') {
            $m = \substr($m, 3);
            $m[0] = $m[0] | " ";
            if ($p === 'get') {
                return $this->attrs[$m] ?? null;
            } elseif ($p === 'add') {
                $args[] = \true;
            }
        }
        if (\count($args) === 0) {
            // invalid
        } elseif (\count($args) === 1) {
            // set
            $this->attrs[$m] = $args[0];
        } else {
            // add
            $this->appendAttribute($m, $args[0], $args[1]);
        }
        return $this;
    }
    /**
     * Special setter for element's attribute.
     * @return static
     */
    public final function href(string $path, ?array $query = null)
    {
        if ($query) {
            $query = \http_build_query($query, '', '&');
            if ($query !== '') {
                $path .= '?' . $query;
            }
        }
        $this->attrs['href'] = $path;
        return $this;
    }
    /**
     * Setter for data-* attributes. Booleans are converted to 'true' resp. 'false'.
     * @param  mixed  $value
     * @return static
     */
    public function data(string $name, $value = null)
    {
        if (\func_num_args() === 1) {
            $this->attrs['data'] = $name;
        } else {
            $this->attrs["data-{$name}"] = \is_bool($value) ? \json_encode($value) : $value;
        }
        return $this;
    }
    /**
     * Sets element's HTML content.
     * @param  HtmlStringable|string  $html
     * @return static
     */
    public final function setHtml($html)
    {
        $this->children = [(string) $html];
        return $this;
    }
    /**
     * Returns element's HTML content.
     */
    public final function getHtml() : string
    {
        return \implode('', $this->children);
    }
    /**
     * Sets element's textual content.
     * @param  HtmlStringable|string|int|float  $text
     * @return static
     */
    public final function setText($text)
    {
        if (!$text instanceof HtmlStringable) {
            $text = \htmlspecialchars((string) $text, \ENT_NOQUOTES, 'UTF-8');
        }
        $this->children = [(string) $text];
        return $this;
    }
    /**
     * Returns element's textual content.
     */
    public final function getText() : string
    {
        return self::htmlToText($this->getHtml());
    }
    /**
     * Adds new element's child.
     * @param  HtmlStringable|string  $child  Html node or raw HTML string
     * @return static
     */
    public final function addHtml($child)
    {
        return $this->insert(null, $child);
    }
    /**
     * Appends plain-text string to element content.
     * @param  HtmlStringable|string|int|float  $text
     * @return static
     */
    public function addText($text)
    {
        if (!$text instanceof HtmlStringable) {
            $text = \htmlspecialchars((string) $text, \ENT_NOQUOTES, 'UTF-8');
        }
        return $this->insert(null, $text);
    }
    /**
     * Creates and adds a new Html child.
     * @param  array|string $attrs  element's attributes or raw HTML string
     * @return static  created element
     */
    public final function create(string $name, $attrs = null)
    {
        $this->insert(null, $child = static::el($name, $attrs));
        return $child;
    }
    /**
     * Inserts child node.
     * @param  HtmlStringable|string $child Html node or raw HTML string
     * @return static
     */
    public function insert(?int $index, $child, bool $replace = \false)
    {
        $child = $child instanceof self ? $child : (string) $child;
        if ($index === null) {
            // append
            $this->children[] = $child;
        } else {
            // insert or replace
            \array_splice($this->children, $index, $replace ? 1 : 0, [$child]);
        }
        return $this;
    }
    /**
     * Inserts (replaces) child node (\ArrayAccess implementation).
     * @param  int|null  $index  position or null for appending
     * @param  Html|string  $child  Html node or raw HTML string
     */
    public final function offsetSet($index, $child) : void
    {
        $this->insert($index, $child, \true);
    }
    /**
     * Returns child node (\ArrayAccess implementation).
     * @param  int  $index
     * @return HtmlStringable|string
     */
    #[\ReturnTypeWillChange]
    public final function offsetGet($index)
    {
        return $this->children[$index];
    }
    /**
     * Exists child node? (\ArrayAccess implementation).
     * @param  int  $index
     */
    public final function offsetExists($index) : bool
    {
        return isset($this->children[$index]);
    }
    /**
     * Removes child node (\ArrayAccess implementation).
     * @param  int  $index
     */
    public function offsetUnset($index) : void
    {
        if (isset($this->children[$index])) {
            \array_splice($this->children, $index, 1);
        }
    }
    /**
     * Returns children count.
     */
    public final function count() : int
    {
        return \count($this->children);
    }
    /**
     * Removes all children.
     */
    public function removeChildren() : void
    {
        $this->children = [];
    }
    /**
     * Iterates over elements.
     * @return \ArrayIterator<int, HtmlStringable|string>
     */
    public final function getIterator() : \ArrayIterator
    {
        return new \ArrayIterator($this->children);
    }
    /**
     * Returns all children.
     */
    public final function getChildren() : array
    {
        return $this->children;
    }
    /**
     * Renders element's start tag, content and end tag.
     */
    public final function render(?int $indent = null) : string
    {
        $s = $this->startTag();
        if (!$this->isEmpty) {
            // add content
            if ($indent !== null) {
                $indent++;
            }
            foreach ($this->children as $child) {
                if ($child instanceof self) {
                    $s .= $child->render($indent);
                } else {
                    $s .= $child;
                }
            }
            // add end tag
            $s .= $this->endTag();
        }
        if ($indent !== null) {
            return "\n" . \str_repeat("\t", $indent - 1) . $s . "\n" . \str_repeat("\t", \max(0, $indent - 2));
        }
        return $s;
    }
    public final function __toString() : string
    {
        try {
            return $this->render();
        } catch (\Throwable $e) {
            if (\PHP_VERSION_ID >= 70400) {
                throw $e;
            }
            \trigger_error('Exception in ' . __METHOD__ . "(): {$e->getMessage()} in {$e->getFile()}:{$e->getLine()}", \E_USER_ERROR);
            return '';
        }
    }
    /**
     * Returns element's start tag.
     */
    public final function startTag() : string
    {
        return $this->name ? '<' . $this->name . $this->attributes() . (static::$xhtml && $this->isEmpty ? ' />' : '>') : '';
    }
    /**
     * Returns element's end tag.
     */
    public final function endTag() : string
    {
        return $this->name && !$this->isEmpty ? '</' . $this->name . '>' : '';
    }
    /**
     * Returns element's attributes.
     * @internal
     */
    public final function attributes() : string
    {
        if (!is_array($this->attrs)) {
            return '';
        }
        $s = '';
        $attrs = $this->attrs;
        foreach ($attrs as $key => $value) {
            if ($value === null || $value === \false) {
                continue;
            } elseif ($value === \true) {
                if (static::$xhtml) {
                    $s .= ' ' . $key . '="' . $key . '"';
                } else {
                    $s .= ' ' . $key;
                }
                continue;
            } elseif (is_array($value)) {
                if (\strncmp($key, 'data-', 5) === 0) {
                    $value = Json::encode($value);
                } else {
                    $tmp = null;
                    foreach ($value as $k => $v) {
                        if ($v != null) {
                            // intentionally ==, skip nulls & empty string
                            // composite 'style' vs. 'others'
                            $tmp[] = $v === \true ? $k : (is_string($k) ? $k . ':' . $v : $v);
                        }
                    }
                    if ($tmp === null) {
                        continue;
                    }
                    $value = \implode($key === 'style' || !\strncmp($key, 'on', 2) ? ';' : ' ', $tmp);
                }
            } elseif (is_float($value)) {
                $value = \rtrim(\rtrim(\number_format($value, 10, '.', ''), '0'), '.');
            } else {
                $value = (string) $value;
            }
            $q = \strpos($value, '"') === \false ? '"' : "'";
            $s .= ' ' . $key . '=' . $q . \str_replace(['&', $q, '<'], ['&amp;', $q === '"' ? '&quot;' : '&#39;', self::$xhtml ? '&lt;' : '<'], $value) . (\strpos($value, '`') !== \false && \strpbrk($value, ' <>"\'') === \false ? ' ' : '') . $q;
        }
        $s = \str_replace('@', '&#64;', $s);
        return $s;
    }
    /**
     * Clones all children too.
     */
    public function __clone()
    {
        foreach ($this->children as $key => $value) {
            if (is_object($value)) {
                $this->children[$key] = clone $value;
            }
        }
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Utils;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Paginating math.
 *
 * @property   int $page
 * @property-read int $firstPage
 * @property-read int|null $lastPage
 * @property-read int $firstItemOnPage
 * @property-read int $lastItemOnPage
 * @property   int $base
 * @property-read bool $first
 * @property-read bool $last
 * @property-read int|null $pageCount
 * @property   int $itemsPerPage
 * @property   int|null $itemCount
 * @property-read int $offset
 * @property-read int|null $countdownOffset
 * @property-read int $length
 */
class Paginator
{
    use Nette\SmartObject;
    /** @var int */
    private $base = 1;
    /** @var int */
    private $itemsPerPage = 1;
    /** @var int */
    private $page = 1;
    /** @var int|null */
    private $itemCount;
    /**
     * Sets current page number.
     * @return static
     */
    public function setPage(int $page)
    {
        $this->page = $page;
        return $this;
    }
    /**
     * Returns current page number.
     */
    public function getPage() : int
    {
        return $this->base + $this->getPageIndex();
    }
    /**
     * Returns first page number.
     */
    public function getFirstPage() : int
    {
        return $this->base;
    }
    /**
     * Returns last page number.
     */
    public function getLastPage() : ?int
    {
        return $this->itemCount === null ? null : $this->base + \max(0, $this->getPageCount() - 1);
    }
    /**
     * Returns the sequence number of the first element on the page
     */
    public function getFirstItemOnPage() : int
    {
        return $this->itemCount !== 0 ? $this->offset + 1 : 0;
    }
    /**
     * Returns the sequence number of the last element on the page
     */
    public function getLastItemOnPage() : int
    {
        return $this->offset + $this->length;
    }
    /**
     * Sets first page (base) number.
     * @return static
     */
    public function setBase(int $base)
    {
        $this->base = $base;
        return $this;
    }
    /**
     * Returns first page (base) number.
     */
    public function getBase() : int
    {
        return $this->base;
    }
    /**
     * Returns zero-based page number.
     */
    protected function getPageIndex() : int
    {
        $index = \max(0, $this->page - $this->base);
        return $this->itemCount === null ? $index : \min($index, \max(0, $this->getPageCount() - 1));
    }
    /**
     * Is the current page the first one?
     */
    public function isFirst() : bool
    {
        return $this->getPageIndex() === 0;
    }
    /**
     * Is the current page the last one?
     */
    public function isLast() : bool
    {
        return $this->itemCount === null ? \false : $this->getPageIndex() >= $this->getPageCount() - 1;
    }
    /**
     * Returns the total number of pages.
     */
    public function getPageCount() : ?int
    {
        return $this->itemCount === null ? null : (int) \ceil($this->itemCount / $this->itemsPerPage);
    }
    /**
     * Sets the number of items to display on a single page.
     * @return static
     */
    public function setItemsPerPage(int $itemsPerPage)
    {
        $this->itemsPerPage = \max(1, $itemsPerPage);
        return $this;
    }
    /**
     * Returns the number of items to display on a single page.
     */
    public function getItemsPerPage() : int
    {
        return $this->itemsPerPage;
    }
    /**
     * Sets the total number of items.
     * @return static
     */
    public function setItemCount(?int $itemCount = null)
    {
        $this->itemCount = $itemCount === null ? null : \max(0, $itemCount);
        return $this;
    }
    /**
     * Returns the total number of items.
     */
    public function getItemCount() : ?int
    {
        return $this->itemCount;
    }
    /**
     * Returns the absolute index of the first item on current page.
     */
    public function getOffset() : int
    {
        return $this->getPageIndex() * $this->itemsPerPage;
    }
    /**
     * Returns the absolute index of the first item on current page in countdown paging.
     */
    public function getCountdownOffset() : ?int
    {
        return $this->itemCount === null ? null : \max(0, $this->itemCount - ($this->getPageIndex() + 1) * $this->itemsPerPage);
    }
    /**
     * Returns the number of items on current page.
     */
    public function getLength() : int
    {
        return $this->itemCount === null ? $this->itemsPerPage : \min($this->itemsPerPage, $this->itemCount - $this->getPageIndex() * $this->itemsPerPage);
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Utils;

use _PHPStan_dcc7b7cff\Nette;
/**
 * PHP reflection helpers.
 */
final class Reflection
{
    use Nette\StaticClass;
    private const BUILTIN_TYPES = ['string' => 1, 'int' => 1, 'float' => 1, 'bool' => 1, 'array' => 1, 'object' => 1, 'callable' => 1, 'iterable' => 1, 'void' => 1, 'null' => 1, 'mixed' => 1, 'false' => 1, 'never' => 1];
    private const CLASS_KEYWORDS = ['self' => 1, 'parent' => 1, 'static' => 1];
    /**
     * Determines if type is PHP built-in type. Otherwise, it is the class name.
     */
    public static function isBuiltinType(string $type) : bool
    {
        return isset(self::BUILTIN_TYPES[\strtolower($type)]);
    }
    /**
     * Determines if type is special class name self/parent/static.
     */
    public static function isClassKeyword(string $name) : bool
    {
        return isset(self::CLASS_KEYWORDS[\strtolower($name)]);
    }
    /**
     * Returns the type of return value of given function or method and normalizes `self`, `static`, and `parent` to actual class names.
     * If the function does not have a return type, it returns null.
     * If the function has union or intersection type, it throws Nette\InvalidStateException.
     */
    public static function getReturnType(\ReflectionFunctionAbstract $func) : ?string
    {
        $type = $func->getReturnType() ?? (\PHP_VERSION_ID >= 80100 && $func instanceof \ReflectionMethod ? $func->getTentativeReturnType() : null);
        return self::getType($func, $type);
    }
    /**
     * @deprecated
     */
    public static function getReturnTypes(\ReflectionFunctionAbstract $func) : array
    {
        $type = Type::fromReflection($func);
        return $type ? $type->getNames() : [];
    }
    /**
     * Returns the type of given parameter and normalizes `self` and `parent` to the actual class names.
     * If the parameter does not have a type, it returns null.
     * If the parameter has union or intersection type, it throws Nette\InvalidStateException.
     */
    public static function getParameterType(\ReflectionParameter $param) : ?string
    {
        return self::getType($param, $param->getType());
    }
    /**
     * @deprecated
     */
    public static function getParameterTypes(\ReflectionParameter $param) : array
    {
        $type = Type::fromReflection($param);
        return $type ? $type->getNames() : [];
    }
    /**
     * Returns the type of given property and normalizes `self` and `parent` to the actual class names.
     * If the property does not have a type, it returns null.
     * If the property has union or intersection type, it throws Nette\InvalidStateException.
     */
    public static function getPropertyType(\ReflectionProperty $prop) : ?string
    {
        return self::getType($prop, \PHP_VERSION_ID >= 70400 ? $prop->getType() : null);
    }
    /**
     * @deprecated
     */
    public static function getPropertyTypes(\ReflectionProperty $prop) : array
    {
        $type = Type::fromReflection($prop);
        return $type ? $type->getNames() : [];
    }
    /**
     * @param  \ReflectionFunction|\ReflectionMethod|\ReflectionParameter|\ReflectionProperty  $reflection
     */
    private static function getType($reflection, ?\ReflectionType $type) : ?string
    {
        if ($type === null) {
            return null;
        } elseif ($type instanceof \ReflectionNamedType) {
            return Type::resolve($type->getName(), $reflection);
        } elseif ($type instanceof \ReflectionUnionType || $type instanceof \ReflectionIntersectionType) {
            throw new Nette\InvalidStateException('The ' . self::toString($reflection) . ' is not expected to have a union or intersection type.');
        } else {
            throw new Nette\InvalidStateException('Unexpected type of ' . self::toString($reflection));
        }
    }
    /**
     * Returns the default value of parameter. If it is a constant, it returns its value.
     * @return mixed
     * @throws \ReflectionException  If the parameter does not have a default value or the constant cannot be resolved
     */
    public static function getParameterDefaultValue(\ReflectionParameter $param)
    {
        if ($param->isDefaultValueConstant()) {
            $const = $orig = $param->getDefaultValueConstantName();
            $pair = \explode('::', $const);
            if (isset($pair[1])) {
                $pair[0] = Type::resolve($pair[0], $param);
                try {
                    $rcc = new \ReflectionClassConstant($pair[0], $pair[1]);
                } catch (\ReflectionException $e) {
                    $name = self::toString($param);
                    throw new \ReflectionException("Unable to resolve constant {$orig} used as default value of {$name}.", 0, $e);
                }
                return $rcc->getValue();
            } elseif (!\defined($const)) {
                $const = \substr((string) \strrchr($const, '\\'), 1);
                if (!\defined($const)) {
                    $name = self::toString($param);
                    throw new \ReflectionException("Unable to resolve constant {$orig} used as default value of {$name}.");
                }
            }
            return \constant($const);
        }
        return $param->getDefaultValue();
    }
    /**
     * Returns a reflection of a class or trait that contains a declaration of given property. Property can also be declared in the trait.
     */
    public static function getPropertyDeclaringClass(\ReflectionProperty $prop) : \ReflectionClass
    {
        foreach ($prop->getDeclaringClass()->getTraits() as $trait) {
            if ($trait->hasProperty($prop->name) && $trait->getProperty($prop->name)->getDocComment() === $prop->getDocComment()) {
                return self::getPropertyDeclaringClass($trait->getProperty($prop->name));
            }
        }
        return $prop->getDeclaringClass();
    }
    /**
     * Returns a reflection of a method that contains a declaration of $method.
     * Usually, each method is its own declaration, but the body of the method can also be in the trait and under a different name.
     */
    public static function getMethodDeclaringMethod(\ReflectionMethod $method) : \ReflectionMethod
    {
        // file & line guessing as workaround for insufficient PHP reflection
        $decl = $method->getDeclaringClass();
        if ($decl->getFileName() === $method->getFileName() && $decl->getStartLine() <= $method->getStartLine() && $decl->getEndLine() >= $method->getEndLine()) {
            return $method;
        }
        $hash = [$method->getFileName(), $method->getStartLine(), $method->getEndLine()];
        if (($alias = $decl->getTraitAliases()[$method->name] ?? null) && ($m = new \ReflectionMethod($alias)) && $hash === [$m->getFileName(), $m->getStartLine(), $m->getEndLine()]) {
            return self::getMethodDeclaringMethod($m);
        }
        foreach ($decl->getTraits() as $trait) {
            if ($trait->hasMethod($method->name) && ($m = $trait->getMethod($method->name)) && $hash === [$m->getFileName(), $m->getStartLine(), $m->getEndLine()]) {
                return self::getMethodDeclaringMethod($m);
            }
        }
        return $method;
    }
    /**
     * Finds out if reflection has access to PHPdoc comments. Comments may not be available due to the opcode cache.
     */
    public static function areCommentsAvailable() : bool
    {
        static $res;
        return $res ?? ($res = (bool) (new \ReflectionMethod(__METHOD__))->getDocComment());
    }
    public static function toString(\Reflector $ref) : string
    {
        if ($ref instanceof \ReflectionClass) {
            return $ref->name;
        } elseif ($ref instanceof \ReflectionMethod) {
            return $ref->getDeclaringClass()->name . '::' . $ref->name . '()';
        } elseif ($ref instanceof \ReflectionFunction) {
            return $ref->name . '()';
        } elseif ($ref instanceof \ReflectionProperty) {
            return self::getPropertyDeclaringClass($ref)->name . '::$' . $ref->name;
        } elseif ($ref instanceof \ReflectionParameter) {
            return '$' . $ref->name . ' in ' . self::toString($ref->getDeclaringFunction());
        } else {
            throw new Nette\InvalidArgumentException();
        }
    }
    /**
     * Expands the name of the class to full name in the given context of given class.
     * Thus, it returns how the PHP parser would understand $name if it were written in the body of the class $context.
     * @throws Nette\InvalidArgumentException
     */
    public static function expandClassName(string $name, \ReflectionClass $context) : string
    {
        $lower = \strtolower($name);
        if (empty($name)) {
            throw new Nette\InvalidArgumentException('Class name must not be empty.');
        } elseif (isset(self::BUILTIN_TYPES[$lower])) {
            return $lower;
        } elseif ($lower === 'self' || $lower === 'static') {
            return $context->name;
        } elseif ($lower === 'parent') {
            return $context->getParentClass() ? $context->getParentClass()->name : 'parent';
        } elseif ($name[0] === '\\') {
            // fully qualified name
            return \ltrim($name, '\\');
        }
        $uses = self::getUseStatements($context);
        $parts = \explode('\\', $name, 2);
        if (isset($uses[$parts[0]])) {
            $parts[0] = $uses[$parts[0]];
            return \implode('\\', $parts);
        } elseif ($context->inNamespace()) {
            return $context->getNamespaceName() . '\\' . $name;
        } else {
            return $name;
        }
    }
    /** @return array of [alias => class] */
    public static function getUseStatements(\ReflectionClass $class) : array
    {
        if ($class->isAnonymous()) {
            throw new Nette\NotImplementedException('Anonymous classes are not supported.');
        }
        static $cache = [];
        if (!isset($cache[$name = $class->name])) {
            if ($class->isInternal()) {
                $cache[$name] = [];
            } else {
                $code = \file_get_contents($class->getFileName());
                $cache = self::parseUseStatements($code, $name) + $cache;
            }
        }
        return $cache[$name];
    }
    /**
     * Parses PHP code to [class => [alias => class, ...]]
     */
    private static function parseUseStatements(string $code, ?string $forClass = null) : array
    {
        try {
            $tokens = \token_get_all($code, \TOKEN_PARSE);
        } catch (\ParseError $e) {
            \trigger_error($e->getMessage(), \E_USER_NOTICE);
            $tokens = [];
        }
        $namespace = $class = $classLevel = $level = null;
        $res = $uses = [];
        $nameTokens = \PHP_VERSION_ID < 80000 ? [\T_STRING, \T_NS_SEPARATOR] : [\T_STRING, \T_NS_SEPARATOR, \T_NAME_QUALIFIED, \T_NAME_FULLY_QUALIFIED];
        while ($token = \current($tokens)) {
            \next($tokens);
            switch (\is_array($token) ? $token[0] : $token) {
                case \T_NAMESPACE:
                    $namespace = \ltrim(self::fetch($tokens, $nameTokens) . '\\', '\\');
                    $uses = [];
                    break;
                case \T_CLASS:
                case \T_INTERFACE:
                case \T_TRAIT:
                case \PHP_VERSION_ID < 80100 ? \T_CLASS : \T_ENUM:
                    if ($name = self::fetch($tokens, \T_STRING)) {
                        $class = $namespace . $name;
                        $classLevel = $level + 1;
                        $res[$class] = $uses;
                        if ($class === $forClass) {
                            return $res;
                        }
                    }
                    break;
                case \T_USE:
                    while (!$class && ($name = self::fetch($tokens, $nameTokens))) {
                        $name = \ltrim($name, '\\');
                        if (self::fetch($tokens, '{')) {
                            while ($suffix = self::fetch($tokens, $nameTokens)) {
                                if (self::fetch($tokens, \T_AS)) {
                                    $uses[self::fetch($tokens, \T_STRING)] = $name . $suffix;
                                } else {
                                    $tmp = \explode('\\', $suffix);
                                    $uses[\end($tmp)] = $name . $suffix;
                                }
                                if (!self::fetch($tokens, ',')) {
                                    break;
                                }
                            }
                        } elseif (self::fetch($tokens, \T_AS)) {
                            $uses[self::fetch($tokens, \T_STRING)] = $name;
                        } else {
                            $tmp = \explode('\\', $name);
                            $uses[\end($tmp)] = $name;
                        }
                        if (!self::fetch($tokens, ',')) {
                            break;
                        }
                    }
                    break;
                case \T_CURLY_OPEN:
                case \T_DOLLAR_OPEN_CURLY_BRACES:
                case '{':
                    $level++;
                    break;
                case '}':
                    if ($level === $classLevel) {
                        $class = $classLevel = null;
                    }
                    $level--;
            }
        }
        return $res;
    }
    private static function fetch(array &$tokens, $take) : ?string
    {
        $res = null;
        while ($token = \current($tokens)) {
            [$token, $s] = \is_array($token) ? $token : [$token, $token];
            if (\in_array($token, (array) $take, \true)) {
                $res .= $s;
            } elseif (!\in_array($token, [\T_DOC_COMMENT, \T_WHITESPACE, \T_COMMENT], \true)) {
                break;
            }
            \next($tokens);
        }
        return $res;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Utils;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Floating-point numbers comparison.
 */
class Floats
{
    use Nette\StaticClass;
    private const EPSILON = 1.0E-10;
    public static function isZero(float $value) : bool
    {
        return \abs($value) < self::EPSILON;
    }
    public static function isInteger(float $value) : bool
    {
        return \abs(\round($value) - $value) < self::EPSILON;
    }
    /**
     * Compare two floats. If $a < $b it returns -1, if they are equal it returns 0 and if $a > $b it returns 1
     * @throws \LogicException if one of parameters is NAN
     */
    public static function compare(float $a, float $b) : int
    {
        if (\is_nan($a) || \is_nan($b)) {
            throw new \LogicException('Trying to compare NAN');
        } elseif (!\is_finite($a) && !\is_finite($b) && $a === $b) {
            return 0;
        }
        $diff = \abs($a - $b);
        if ($diff < self::EPSILON || $diff / \max(\abs($a), \abs($b)) < self::EPSILON) {
            return 0;
        }
        return $a < $b ? -1 : 1;
    }
    /**
     * Returns true if $a = $b
     * @throws \LogicException if one of parameters is NAN
     */
    public static function areEqual(float $a, float $b) : bool
    {
        return self::compare($a, $b) === 0;
    }
    /**
     * Returns true if $a < $b
     * @throws \LogicException if one of parameters is NAN
     */
    public static function isLessThan(float $a, float $b) : bool
    {
        return self::compare($a, $b) < 0;
    }
    /**
     * Returns true if $a <= $b
     * @throws \LogicException if one of parameters is NAN
     */
    public static function isLessThanOrEqualTo(float $a, float $b) : bool
    {
        return self::compare($a, $b) <= 0;
    }
    /**
     * Returns true if $a > $b
     * @throws \LogicException if one of parameters is NAN
     */
    public static function isGreaterThan(float $a, float $b) : bool
    {
        return self::compare($a, $b) > 0;
    }
    /**
     * Returns true if $a >= $b
     * @throws \LogicException if one of parameters is NAN
     */
    public static function isGreaterThanOrEqualTo(float $a, float $b) : bool
    {
        return self::compare($a, $b) >= 0;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Utils;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Nette\Object behaviour mixin.
 * @deprecated
 */
final class ObjectMixin
{
    use Nette\StaticClass;
    /** @deprecated  use ObjectHelpers::getSuggestion() */
    public static function getSuggestion(array $possibilities, string $value) : ?string
    {
        \trigger_error(__METHOD__ . '() has been renamed to Nette\\Utils\\ObjectHelpers::getSuggestion()', \E_USER_DEPRECATED);
        return ObjectHelpers::getSuggestion($possibilities, $value);
    }
    public static function setExtensionMethod() : void
    {
        \trigger_error('Class Nette\\Utils\\ObjectMixin is deprecated', \E_USER_DEPRECATED);
    }
    public static function getExtensionMethod() : void
    {
        \trigger_error('Class Nette\\Utils\\ObjectMixin is deprecated', \E_USER_DEPRECATED);
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Utils;

/**
 * The exception that is thrown when an image error occurs.
 */
class ImageException extends \Exception
{
}
/**
 * The exception that indicates invalid image file.
 */
class UnknownImageFileException extends ImageException
{
}
/**
 * The exception that indicates error of JSON encoding/decoding.
 */
class JsonException extends \Exception
{
}
/**
 * The exception that indicates error of the last Regexp execution.
 */
class RegexpException extends \Exception
{
    public const MESSAGES = [\PREG_INTERNAL_ERROR => 'Internal error', \PREG_BACKTRACK_LIMIT_ERROR => 'Backtrack limit was exhausted', \PREG_RECURSION_LIMIT_ERROR => 'Recursion limit was exhausted', \PREG_BAD_UTF8_ERROR => 'Malformed UTF-8 data', \PREG_BAD_UTF8_OFFSET_ERROR => 'Offset didn\'t correspond to the begin of a valid UTF-8 code point', 6 => 'Failed due to limited JIT stack space'];
}
/**
 * The exception that indicates assertion error.
 */
class AssertionException extends \Exception
{
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Utils;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\MemberAccessException;
/**
 * Nette\SmartObject helpers.
 */
final class ObjectHelpers
{
    use Nette\StaticClass;
    /**
     * @return never
     * @throws MemberAccessException
     */
    public static function strictGet(string $class, string $name) : void
    {
        $rc = new \ReflectionClass($class);
        $hint = self::getSuggestion(\array_merge(\array_filter($rc->getProperties(\ReflectionProperty::IS_PUBLIC), function ($p) {
            return !$p->isStatic();
        }), self::parseFullDoc($rc, '~^[ \\t*]*@property(?:-read)?[ \\t]+(?:\\S+[ \\t]+)??\\$(\\w+)~m')), $name);
        throw new MemberAccessException("Cannot read an undeclared property {$class}::\${$name}" . ($hint ? ", did you mean \${$hint}?" : '.'));
    }
    /**
     * @return never
     * @throws MemberAccessException
     */
    public static function strictSet(string $class, string $name) : void
    {
        $rc = new \ReflectionClass($class);
        $hint = self::getSuggestion(\array_merge(\array_filter($rc->getProperties(\ReflectionProperty::IS_PUBLIC), function ($p) {
            return !$p->isStatic();
        }), self::parseFullDoc($rc, '~^[ \\t*]*@property(?:-write)?[ \\t]+(?:\\S+[ \\t]+)??\\$(\\w+)~m')), $name);
        throw new MemberAccessException("Cannot write to an undeclared property {$class}::\${$name}" . ($hint ? ", did you mean \${$hint}?" : '.'));
    }
    /**
     * @return never
     * @throws MemberAccessException
     */
    public static function strictCall(string $class, string $method, array $additionalMethods = []) : void
    {
        $trace = \debug_backtrace(0, 3);
        // suppose this method is called from __call()
        $context = ($trace[1]['function'] ?? null) === '__call' ? $trace[2]['class'] ?? null : null;
        if ($context && \is_a($class, $context, \true) && \method_exists($context, $method)) {
            // called parent::$method()
            $class = \get_parent_class($context);
        }
        if (\method_exists($class, $method)) {
            // insufficient visibility
            $rm = new \ReflectionMethod($class, $method);
            $visibility = $rm->isPrivate() ? 'private ' : ($rm->isProtected() ? 'protected ' : '');
            throw new MemberAccessException("Call to {$visibility}method {$class}::{$method}() from " . ($context ? "scope {$context}." : 'global scope.'));
        } else {
            $hint = self::getSuggestion(\array_merge(\get_class_methods($class), self::parseFullDoc(new \ReflectionClass($class), '~^[ \\t*]*@method[ \\t]+(?:\\S+[ \\t]+)??(\\w+)\\(~m'), $additionalMethods), $method);
            throw new MemberAccessException("Call to undefined method {$class}::{$method}()" . ($hint ? ", did you mean {$hint}()?" : '.'));
        }
    }
    /**
     * @return never
     * @throws MemberAccessException
     */
    public static function strictStaticCall(string $class, string $method) : void
    {
        $trace = \debug_backtrace(0, 3);
        // suppose this method is called from __callStatic()
        $context = ($trace[1]['function'] ?? null) === '__callStatic' ? $trace[2]['class'] ?? null : null;
        if ($context && \is_a($class, $context, \true) && \method_exists($context, $method)) {
            // called parent::$method()
            $class = \get_parent_class($context);
        }
        if (\method_exists($class, $method)) {
            // insufficient visibility
            $rm = new \ReflectionMethod($class, $method);
            $visibility = $rm->isPrivate() ? 'private ' : ($rm->isProtected() ? 'protected ' : '');
            throw new MemberAccessException("Call to {$visibility}method {$class}::{$method}() from " . ($context ? "scope {$context}." : 'global scope.'));
        } else {
            $hint = self::getSuggestion(\array_filter((new \ReflectionClass($class))->getMethods(\ReflectionMethod::IS_PUBLIC), function ($m) {
                return $m->isStatic();
            }), $method);
            throw new MemberAccessException("Call to undefined static method {$class}::{$method}()" . ($hint ? ", did you mean {$hint}()?" : '.'));
        }
    }
    /**
     * Returns array of magic properties defined by annotation @property.
     * @return array of [name => bit mask]
     * @internal
     */
    public static function getMagicProperties(string $class) : array
    {
        static $cache;
        $props =& $cache[$class];
        if ($props !== null) {
            return $props;
        }
        $rc = new \ReflectionClass($class);
        \preg_match_all('~^  [ \\t*]*  @property(|-read|-write|-deprecated)  [ \\t]+  [^\\s$]+  [ \\t]+  \\$  (\\w+)  ()~mx', (string) $rc->getDocComment(), $matches, \PREG_SET_ORDER);
        $props = [];
        foreach ($matches as [, $type, $name]) {
            $uname = \ucfirst($name);
            $write = $type !== '-read' && $rc->hasMethod($nm = 'set' . $uname) && ($rm = $rc->getMethod($nm))->name === $nm && !$rm->isPrivate() && !$rm->isStatic();
            $read = $type !== '-write' && ($rc->hasMethod($nm = 'get' . $uname) || $rc->hasMethod($nm = 'is' . $uname)) && ($rm = $rc->getMethod($nm))->name === $nm && !$rm->isPrivate() && !$rm->isStatic();
            if ($read || $write) {
                $props[$name] = $read << 0 | ($nm[0] === 'g') << 1 | $rm->returnsReference() << 2 | $write << 3 | ($type === '-deprecated') << 4;
            }
        }
        foreach ($rc->getTraits() as $trait) {
            $props += self::getMagicProperties($trait->name);
        }
        if ($parent = \get_parent_class($class)) {
            $props += self::getMagicProperties($parent);
        }
        return $props;
    }
    /**
     * Finds the best suggestion (for 8-bit encoding).
     * @param  (\ReflectionFunctionAbstract|\ReflectionParameter|\ReflectionClass|\ReflectionProperty|string)[]  $possibilities
     * @internal
     */
    public static function getSuggestion(array $possibilities, string $value) : ?string
    {
        $norm = \preg_replace($re = '#^(get|set|has|is|add)(?=[A-Z])#', '+', $value);
        $best = null;
        $min = (\strlen($value) / 4 + 1) * 10 + 0.1;
        foreach (\array_unique($possibilities, \SORT_REGULAR) as $item) {
            $item = $item instanceof \Reflector ? $item->name : $item;
            if ($item !== $value && (($len = \levenshtein($item, $value, 10, 11, 10)) < $min || ($len = \levenshtein(\preg_replace($re, '*', $item), $norm, 10, 11, 10)) < $min)) {
                $min = $len;
                $best = $item;
            }
        }
        return $best;
    }
    private static function parseFullDoc(\ReflectionClass $rc, string $pattern) : array
    {
        do {
            $doc[] = $rc->getDocComment();
            $traits = $rc->getTraits();
            while ($trait = \array_pop($traits)) {
                $doc[] = $trait->getDocComment();
                $traits += $trait->getTraits();
            }
        } while ($rc = $rc->getParentClass());
        return \preg_match_all($pattern, \implode($doc), $m) ? $m[1] : [];
    }
    /**
     * Checks if the public non-static property exists.
     * @return bool|string returns 'event' if the property exists and has event like name
     * @internal
     */
    public static function hasProperty(string $class, string $name)
    {
        static $cache;
        $prop =& $cache[$class][$name];
        if ($prop === null) {
            $prop = \false;
            try {
                $rp = new \ReflectionProperty($class, $name);
                if ($rp->isPublic() && !$rp->isStatic()) {
                    $prop = $name >= 'onA' && $name < 'on_' ? 'event' : \true;
                }
            } catch (\ReflectionException $e) {
            }
        }
        return $prop;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Utils;

use _PHPStan_dcc7b7cff\Nette;
/**
 * PHP type reflection.
 */
final class Type
{
    /** @var array */
    private $types;
    /** @var bool */
    private $single;
    /** @var string  |, & */
    private $kind;
    /**
     * Creates a Type object based on reflection. Resolves self, static and parent to the actual class name.
     * If the subject has no type, it returns null.
     * @param  \ReflectionFunctionAbstract|\ReflectionParameter|\ReflectionProperty  $reflection
     */
    public static function fromReflection($reflection) : ?self
    {
        if ($reflection instanceof \ReflectionProperty && \PHP_VERSION_ID < 70400) {
            return null;
        } elseif ($reflection instanceof \ReflectionMethod) {
            $type = $reflection->getReturnType() ?? (\PHP_VERSION_ID >= 80100 ? $reflection->getTentativeReturnType() : null);
        } else {
            $type = $reflection instanceof \ReflectionFunctionAbstract ? $reflection->getReturnType() : $reflection->getType();
        }
        if ($type === null) {
            return null;
        } elseif ($type instanceof \ReflectionNamedType) {
            $name = self::resolve($type->getName(), $reflection);
            return new self($type->allowsNull() && $type->getName() !== 'mixed' ? [$name, 'null'] : [$name]);
        } elseif ($type instanceof \ReflectionUnionType || $type instanceof \ReflectionIntersectionType) {
            return new self(\array_map(function ($t) use($reflection) {
                return self::resolve($t->getName(), $reflection);
            }, $type->getTypes()), $type instanceof \ReflectionUnionType ? '|' : '&');
        } else {
            throw new Nette\InvalidStateException('Unexpected type of ' . Reflection::toString($reflection));
        }
    }
    /**
     * Creates the Type object according to the text notation.
     */
    public static function fromString(string $type) : self
    {
        if (!\preg_match('#(?:
			\\?([\\w\\\\]+)|
			[\\w\\\\]+ (?: (&[\\w\\\\]+)* | (\\|[\\w\\\\]+)* )
		)()$#xAD', $type, $m)) {
            throw new Nette\InvalidArgumentException("Invalid type '{$type}'.");
        }
        [, $nType, $iType] = $m;
        if ($nType) {
            return new self([$nType, 'null']);
        } elseif ($iType) {
            return new self(\explode('&', $type), '&');
        } else {
            return new self(\explode('|', $type));
        }
    }
    /**
     * Resolves 'self', 'static' and 'parent' to the actual class name.
     * @param  \ReflectionFunctionAbstract|\ReflectionParameter|\ReflectionProperty  $reflection
     */
    public static function resolve(string $type, $reflection) : string
    {
        $lower = \strtolower($type);
        if ($reflection instanceof \ReflectionFunction) {
            return $type;
        } elseif ($lower === 'self' || $lower === 'static') {
            return $reflection->getDeclaringClass()->name;
        } elseif ($lower === 'parent' && $reflection->getDeclaringClass()->getParentClass()) {
            return $reflection->getDeclaringClass()->getParentClass()->name;
        } else {
            return $type;
        }
    }
    private function __construct(array $types, string $kind = '|')
    {
        if ($types[0] === 'null') {
            // null as last
            \array_push($types, \array_shift($types));
        }
        $this->types = $types;
        $this->single = ($types[1] ?? 'null') === 'null';
        $this->kind = \count($types) > 1 ? $kind : '';
    }
    public function __toString() : string
    {
        return $this->single ? (\count($this->types) > 1 ? '?' : '') . $this->types[0] : \implode($this->kind, $this->types);
    }
    /**
     * Returns the array of subtypes that make up the compound type as strings.
     * @return string[]
     */
    public function getNames() : array
    {
        return $this->types;
    }
    /**
     * Returns the array of subtypes that make up the compound type as Type objects:
     * @return self[]
     */
    public function getTypes() : array
    {
        return \array_map(function ($name) {
            return self::fromString($name);
        }, $this->types);
    }
    /**
     * Returns the type name for single types, otherwise null.
     */
    public function getSingleName() : ?string
    {
        return $this->single ? $this->types[0] : null;
    }
    /**
     * Returns true whether it is a union type.
     */
    public function isUnion() : bool
    {
        return $this->kind === '|';
    }
    /**
     * Returns true whether it is an intersection type.
     */
    public function isIntersection() : bool
    {
        return $this->kind === '&';
    }
    /**
     * Returns true whether it is a single type. Simple nullable types are also considered to be single types.
     */
    public function isSingle() : bool
    {
        return $this->single;
    }
    /**
     * Returns true whether the type is both a single and a PHP built-in type.
     */
    public function isBuiltin() : bool
    {
        return $this->single && Reflection::isBuiltinType($this->types[0]);
    }
    /**
     * Returns true whether the type is both a single and a class name.
     */
    public function isClass() : bool
    {
        return $this->single && !Reflection::isBuiltinType($this->types[0]);
    }
    /**
     * Determines if type is special class name self/parent/static.
     */
    public function isClassKeyword() : bool
    {
        return $this->single && Reflection::isClassKeyword($this->types[0]);
    }
    /**
     * Verifies type compatibility. For example, it checks if a value of a certain type could be passed as a parameter.
     */
    public function allows(string $type) : bool
    {
        if ($this->types === ['mixed']) {
            return \true;
        }
        $type = self::fromString($type);
        if ($this->isIntersection()) {
            if (!$type->isIntersection()) {
                return \false;
            }
            return Arrays::every($this->types, function ($currentType) use($type) {
                $builtin = Reflection::isBuiltinType($currentType);
                return Arrays::some($type->types, function ($testedType) use($currentType, $builtin) {
                    return $builtin ? \strcasecmp($currentType, $testedType) === 0 : \is_a($testedType, $currentType, \true);
                });
            });
        }
        $method = $type->isIntersection() ? 'some' : 'every';
        return Arrays::$method($type->types, function ($testedType) {
            $builtin = Reflection::isBuiltinType($testedType);
            return Arrays::some($this->types, function ($currentType) use($testedType, $builtin) {
                return $builtin ? \strcasecmp($currentType, $testedType) === 0 : \is_a($testedType, $currentType, \true);
            });
        });
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Utils;

use _PHPStan_dcc7b7cff\Nette;
use function is_array, is_int, is_object, count;
/**
 * Array tools library.
 */
class Arrays
{
    use Nette\StaticClass;
    /**
     * Returns item from array. If it does not exist, it throws an exception, unless a default value is set.
     * @template T
     * @param  array<T>  $array
     * @param  array-key|array-key[]  $key
     * @param  ?T  $default
     * @return ?T
     * @throws Nette\InvalidArgumentException if item does not exist and default value is not provided
     */
    public static function get(array $array, $key, $default = null)
    {
        foreach (is_array($key) ? $key : [$key] as $k) {
            if (is_array($array) && \array_key_exists($k, $array)) {
                $array = $array[$k];
            } else {
                if (\func_num_args() < 3) {
                    throw new Nette\InvalidArgumentException("Missing item '{$k}'.");
                }
                return $default;
            }
        }
        return $array;
    }
    /**
     * Returns reference to array item. If the index does not exist, new one is created with value null.
     * @template T
     * @param  array<T>  $array
     * @param  array-key|array-key[]  $key
     * @return ?T
     * @throws Nette\InvalidArgumentException if traversed item is not an array
     */
    public static function &getRef(array &$array, $key)
    {
        foreach (is_array($key) ? $key : [$key] as $k) {
            if (is_array($array) || $array === null) {
                $array =& $array[$k];
            } else {
                throw new Nette\InvalidArgumentException('Traversed item is not an array.');
            }
        }
        return $array;
    }
    /**
     * Recursively merges two fields. It is useful, for example, for merging tree structures. It behaves as
     * the + operator for array, ie. it adds a key/value pair from the second array to the first one and retains
     * the value from the first array in the case of a key collision.
     * @template T1
     * @template T2
     * @param  array<T1>  $array1
     * @param  array<T2>  $array2
     * @return array<T1|T2>
     */
    public static function mergeTree(array $array1, array $array2) : array
    {
        $res = $array1 + $array2;
        foreach (\array_intersect_key($array1, $array2) as $k => $v) {
            if (is_array($v) && is_array($array2[$k])) {
                $res[$k] = self::mergeTree($v, $array2[$k]);
            }
        }
        return $res;
    }
    /**
     * Returns zero-indexed position of given array key. Returns null if key is not found.
     * @param  array-key  $key
     * @return int|null offset if it is found, null otherwise
     */
    public static function getKeyOffset(array $array, $key) : ?int
    {
        return Helpers::falseToNull(\array_search(self::toKey($key), \array_keys($array), \true));
    }
    /**
     * @deprecated  use  getKeyOffset()
     */
    public static function searchKey(array $array, $key) : ?int
    {
        return self::getKeyOffset($array, $key);
    }
    /**
     * Tests an array for the presence of value.
     * @param  mixed  $value
     */
    public static function contains(array $array, $value) : bool
    {
        return \in_array($value, $array, \true);
    }
    /**
     * Returns the first item from the array or null if array is empty.
     * @template T
     * @param  array<T>  $array
     * @return ?T
     */
    public static function first(array $array)
    {
        return count($array) ? \reset($array) : null;
    }
    /**
     * Returns the last item from the array or null if array is empty.
     * @template T
     * @param  array<T>  $array
     * @return ?T
     */
    public static function last(array $array)
    {
        return count($array) ? \end($array) : null;
    }
    /**
     * Inserts the contents of the $inserted array into the $array immediately after the $key.
     * If $key is null (or does not exist), it is inserted at the beginning.
     * @param  array-key|null  $key
     */
    public static function insertBefore(array &$array, $key, array $inserted) : void
    {
        $offset = $key === null ? 0 : (int) self::getKeyOffset($array, $key);
        $array = \array_slice($array, 0, $offset, \true) + $inserted + \array_slice($array, $offset, count($array), \true);
    }
    /**
     * Inserts the contents of the $inserted array into the $array before the $key.
     * If $key is null (or does not exist), it is inserted at the end.
     * @param  array-key|null  $key
     */
    public static function insertAfter(array &$array, $key, array $inserted) : void
    {
        if ($key === null || ($offset = self::getKeyOffset($array, $key)) === null) {
            $offset = count($array) - 1;
        }
        $array = \array_slice($array, 0, $offset + 1, \true) + $inserted + \array_slice($array, $offset + 1, count($array), \true);
    }
    /**
     * Renames key in array.
     * @param  array-key  $oldKey
     * @param  array-key  $newKey
     */
    public static function renameKey(array &$array, $oldKey, $newKey) : bool
    {
        $offset = self::getKeyOffset($array, $oldKey);
        if ($offset === null) {
            return \false;
        }
        $val =& $array[$oldKey];
        $keys = \array_keys($array);
        $keys[$offset] = $newKey;
        $array = \array_combine($keys, $array);
        $array[$newKey] =& $val;
        return \true;
    }
    /**
     * Returns only those array items, which matches a regular expression $pattern.
     * @param  string[]  $array
     * @return string[]
     */
    public static function grep(array $array, string $pattern, int $flags = 0) : array
    {
        return Strings::pcre('preg_grep', [$pattern, $array, $flags]);
    }
    /**
     * Transforms multidimensional array to flat array.
     */
    public static function flatten(array $array, bool $preserveKeys = \false) : array
    {
        $res = [];
        $cb = $preserveKeys ? function ($v, $k) use(&$res) : void {
            $res[$k] = $v;
        } : function ($v) use(&$res) : void {
            $res[] = $v;
        };
        \array_walk_recursive($array, $cb);
        return $res;
    }
    /**
     * Checks if the array is indexed in ascending order of numeric keys from zero, a.k.a list.
     * @param  mixed  $value
     */
    public static function isList($value) : bool
    {
        return is_array($value) && (\PHP_VERSION_ID < 80100 ? !$value || \array_keys($value) === \range(0, count($value) - 1) : \array_is_list($value));
    }
    /**
     * Reformats table to associative tree. Path looks like 'field|field[]field->field=field'.
     * @param  string|string[]  $path
     * @return array|\stdClass
     */
    public static function associate(array $array, $path)
    {
        $parts = is_array($path) ? $path : \preg_split('#(\\[\\]|->|=|\\|)#', $path, -1, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY);
        if (!$parts || $parts === ['->'] || $parts[0] === '=' || $parts[0] === '|') {
            throw new Nette\InvalidArgumentException("Invalid path '{$path}'.");
        }
        $res = $parts[0] === '->' ? new \stdClass() : [];
        foreach ($array as $rowOrig) {
            $row = (array) $rowOrig;
            $x =& $res;
            for ($i = 0; $i < count($parts); $i++) {
                $part = $parts[$i];
                if ($part === '[]') {
                    $x =& $x[];
                } elseif ($part === '=') {
                    if (isset($parts[++$i])) {
                        $x = $row[$parts[$i]];
                        $row = null;
                    }
                } elseif ($part === '->') {
                    if (isset($parts[++$i])) {
                        if ($x === null) {
                            $x = new \stdClass();
                        }
                        $x =& $x->{$row[$parts[$i]]};
                    } else {
                        $row = is_object($rowOrig) ? $rowOrig : (object) $row;
                    }
                } elseif ($part !== '|') {
                    $x =& $x[(string) $row[$part]];
                }
            }
            if ($x === null) {
                $x = $row;
            }
        }
        return $res;
    }
    /**
     * Normalizes array to associative array. Replace numeric keys with their values, the new value will be $filling.
     * @param  mixed  $filling
     */
    public static function normalize(array $array, $filling = null) : array
    {
        $res = [];
        foreach ($array as $k => $v) {
            $res[is_int($k) ? $v : $k] = is_int($k) ? $filling : $v;
        }
        return $res;
    }
    /**
     * Returns and removes the value of an item from an array. If it does not exist, it throws an exception,
     * or returns $default, if provided.
     * @template T
     * @param  array<T>  $array
     * @param  array-key  $key
     * @param  ?T  $default
     * @return ?T
     * @throws Nette\InvalidArgumentException if item does not exist and default value is not provided
     */
    public static function pick(array &$array, $key, $default = null)
    {
        if (\array_key_exists($key, $array)) {
            $value = $array[$key];
            unset($array[$key]);
            return $value;
        } elseif (\func_num_args() < 3) {
            throw new Nette\InvalidArgumentException("Missing item '{$key}'.");
        } else {
            return $default;
        }
    }
    /**
     * Tests whether at least one element in the array passes the test implemented by the
     * provided callback with signature `function ($value, $key, array $array): bool`.
     */
    public static function some(iterable $array, callable $callback) : bool
    {
        foreach ($array as $k => $v) {
            if ($callback($v, $k, $array)) {
                return \true;
            }
        }
        return \false;
    }
    /**
     * Tests whether all elements in the array pass the test implemented by the provided function,
     * which has the signature `function ($value, $key, array $array): bool`.
     */
    public static function every(iterable $array, callable $callback) : bool
    {
        foreach ($array as $k => $v) {
            if (!$callback($v, $k, $array)) {
                return \false;
            }
        }
        return \true;
    }
    /**
     * Calls $callback on all elements in the array and returns the array of return values.
     * The callback has the signature `function ($value, $key, array $array): bool`.
     */
    public static function map(iterable $array, callable $callback) : array
    {
        $res = [];
        foreach ($array as $k => $v) {
            $res[$k] = $callback($v, $k, $array);
        }
        return $res;
    }
    /**
     * Invokes all callbacks and returns array of results.
     * @param  callable[]  $callbacks
     */
    public static function invoke(iterable $callbacks, ...$args) : array
    {
        $res = [];
        foreach ($callbacks as $k => $cb) {
            $res[$k] = $cb(...$args);
        }
        return $res;
    }
    /**
     * Invokes method on every object in an array and returns array of results.
     * @param  object[]  $objects
     */
    public static function invokeMethod(iterable $objects, string $method, ...$args) : array
    {
        $res = [];
        foreach ($objects as $k => $obj) {
            $res[$k] = $obj->{$method}(...$args);
        }
        return $res;
    }
    /**
     * Copies the elements of the $array array to the $object object and then returns it.
     * @template T of object
     * @param  T  $object
     * @return T
     */
    public static function toObject(iterable $array, $object)
    {
        foreach ($array as $k => $v) {
            $object->{$k} = $v;
        }
        return $object;
    }
    /**
     * Converts value to array key.
     * @param  mixed  $value
     * @return array-key
     */
    public static function toKey($value)
    {
        return \key([$value => null]);
    }
    /**
     * Returns copy of the $array where every item is converted to string
     * and prefixed by $prefix and suffixed by $suffix.
     * @param  string[]  $array
     * @return string[]
     */
    public static function wrap(array $array, string $prefix = '', string $suffix = '') : array
    {
        $res = [];
        foreach ($array as $k => $v) {
            $res[$k] = $prefix . $v . $suffix;
        }
        return $res;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Utils;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Provides the base class for a generic list (items can be accessed by index).
 * @template T
 */
class ArrayList implements \ArrayAccess, \Countable, \IteratorAggregate
{
    use Nette\SmartObject;
    /** @var mixed[] */
    private $list = [];
    /**
     * Transforms array to ArrayList.
     * @param  array<T>  $array
     * @return static
     */
    public static function from(array $array)
    {
        if (!Arrays::isList($array)) {
            throw new Nette\InvalidArgumentException('Array is not valid list.');
        }
        $obj = new static();
        $obj->list = $array;
        return $obj;
    }
    /**
     * Returns an iterator over all items.
     * @return \ArrayIterator<int, T>
     */
    public function getIterator() : \ArrayIterator
    {
        return new \ArrayIterator($this->list);
    }
    /**
     * Returns items count.
     */
    public function count() : int
    {
        return \count($this->list);
    }
    /**
     * Replaces or appends a item.
     * @param  int|null  $index
     * @param  T  $value
     * @throws Nette\OutOfRangeException
     */
    public function offsetSet($index, $value) : void
    {
        if ($index === null) {
            $this->list[] = $value;
        } elseif (!\is_int($index) || $index < 0 || $index >= \count($this->list)) {
            throw new Nette\OutOfRangeException('Offset invalid or out of range');
        } else {
            $this->list[$index] = $value;
        }
    }
    /**
     * Returns a item.
     * @param  int  $index
     * @return T
     * @throws Nette\OutOfRangeException
     */
    #[\ReturnTypeWillChange]
    public function offsetGet($index)
    {
        if (!\is_int($index) || $index < 0 || $index >= \count($this->list)) {
            throw new Nette\OutOfRangeException('Offset invalid or out of range');
        }
        return $this->list[$index];
    }
    /**
     * Determines whether a item exists.
     * @param  int  $index
     */
    public function offsetExists($index) : bool
    {
        return \is_int($index) && $index >= 0 && $index < \count($this->list);
    }
    /**
     * Removes the element at the specified position in this list.
     * @param  int  $index
     * @throws Nette\OutOfRangeException
     */
    public function offsetUnset($index) : void
    {
        if (!\is_int($index) || $index < 0 || $index >= \count($this->list)) {
            throw new Nette\OutOfRangeException('Offset invalid or out of range');
        }
        \array_splice($this->list, $index, 1);
    }
    /**
     * Prepends a item.
     * @param  T  $value
     */
    public function prepend($value) : void
    {
        $first = \array_slice($this->list, 0, 1);
        $this->offsetSet(0, $value);
        \array_splice($this->list, 1, 0, $first);
    }
}
<?xml version="1.0"?>
<ruleset name="Custom" namespace="Nette">
	<rule ref="$presets/php72.xml"/>

	<!-- bug in SlevomatCodingStandard -->
	<rule ref="SlevomatCodingStandard.Operators.RequireCombinedAssignmentOperator">
		<severity>0</severity>
	</rule>

	<!-- bug in FunctionSpacingSniff -->
	<exclude-pattern>./tests/Utils/Reflection.getDeclaringMethod.alias.phpt</exclude-pattern>
	<exclude-pattern>./tests/Utils/Reflection.getDeclaringMethod.insteadof.phpt</exclude-pattern>
</ruleset>
<?php

/**
 * Rules for Nette Coding Standard
 * https://github.com/nette/coding-standard
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff;

return [
    // use function in Arrays.php, Callback.php, Html.php, Strings.php
    'single_import_per_statement' => \false,
    'ordered_imports' => \false,
];
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Neon;

/** @internal */
final class TokenStream
{
    /** @var Token[] */
    private $tokens;
    /** @var int */
    private $pos = 0;
    public function __construct(array $tokens)
    {
        $this->tokens = $tokens;
    }
    public function getPos() : int
    {
        return $this->pos;
    }
    /** @return Token[] */
    public function getTokens() : array
    {
        return $this->tokens;
    }
    public function isNext(...$types) : bool
    {
        while (\in_array($this->tokens[$this->pos]->type ?? null, [Token::COMMENT, Token::WHITESPACE], \true)) {
            $this->pos++;
        }
        return $types ? \in_array($this->tokens[$this->pos]->type ?? null, $types, \true) : isset($this->tokens[$this->pos]);
    }
    public function consume(...$types) : ?Token
    {
        return $this->isNext(...$types) ? $this->tokens[$this->pos++] : null;
    }
    public function getIndentation() : string
    {
        return \in_array($this->tokens[$this->pos - 2]->type ?? null, [Token::NEWLINE, null], \true) && ($this->tokens[$this->pos - 1]->type ?? null) === Token::WHITESPACE ? $this->tokens[$this->pos - 1]->value : '';
    }
    /** @return never */
    public function error(string $message = null, int $pos = null) : void
    {
        $pos = $pos ?? $this->pos;
        $input = '';
        foreach ($this->tokens as $i => $token) {
            if ($i >= $pos) {
                break;
            }
            $input .= $token->value;
        }
        $line = \substr_count($input, "\n") + 1;
        $col = \strlen($input) - \strrpos("\n" . $input, "\n") + 1;
        $token = $this->tokens[$pos] ?? null;
        $message = $message ?? 'Unexpected ' . ($token === null ? 'end' : "'" . \str_replace("\n", '<new line>', \substr($this->tokens[$pos]->value, 0, 40)) . "'");
        throw new Exception("{$message} on line {$line}, column {$col}.");
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Neon;

/**
 * Representation of NEON entity 'foo(bar=1)'
 */
final class Entity extends \stdClass
{
    /** @var mixed */
    public $value;
    /** @var array */
    public $attributes;
    public function __construct($value, array $attrs = [])
    {
        $this->value = $value;
        $this->attributes = $attrs;
    }
    public static function __set_state(array $properties)
    {
        return new self($properties['value'], $properties['attributes']);
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Neon;

/**
 * Parser for Nette Object Notation.
 * @internal
 */
final class Decoder
{
    /**
     * Decodes a NEON string.
     * @return mixed
     */
    public function decode(string $input)
    {
        $node = $this->parseToNode($input);
        return $node->toValue();
    }
    public function parseToNode(string $input) : Node
    {
        $lexer = new Lexer();
        $parser = new Parser();
        $tokens = $lexer->tokenize($input);
        return $parser->parse($tokens);
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Neon;

/**
 * Converts value to NEON format.
 * @internal
 */
final class Encoder
{
    /** @deprecated */
    public const BLOCK = \true;
    /** @var bool */
    public $blockMode = \false;
    /** @var string */
    public $indentation = "\t";
    /**
     * Returns the NEON representation of a value.
     */
    public function encode($val) : string
    {
        $node = $this->valueToNode($val, $this->blockMode);
        return $node->toString();
    }
    public function valueToNode($val, bool $blockMode = \false) : Node
    {
        if ($val instanceof \DateTimeInterface) {
            return new Node\LiteralNode($val);
        } elseif ($val instanceof Entity && $val->value === Neon::CHAIN) {
            $node = new Node\EntityChainNode();
            foreach ($val->attributes as $entity) {
                $node->chain[] = $this->valueToNode($entity);
            }
            return $node;
        } elseif ($val instanceof Entity) {
            return new Node\EntityNode($this->valueToNode($val->value), $this->arrayToNodes((array) $val->attributes));
        } elseif (\is_object($val) || \is_array($val)) {
            if ($blockMode) {
                $node = new Node\BlockArrayNode();
            } else {
                $isList = \is_array($val) && (!$val || \array_keys($val) === \range(0, \count($val) - 1));
                $node = new Node\InlineArrayNode($isList ? '[' : '{');
            }
            $node->items = $this->arrayToNodes($val, $blockMode);
            return $node;
        } elseif (\is_string($val) && Lexer::requiresDelimiters($val)) {
            return new Node\StringNode($val);
        } else {
            return new Node\LiteralNode($val);
        }
    }
    private function arrayToNodes($val, bool $blockMode = \false) : array
    {
        $res = [];
        $counter = 0;
        $hide = \true;
        foreach ($val as $k => $v) {
            $res[] = $item = new Node\ArrayItemNode();
            $item->key = $hide && $k === $counter ? null : self::valueToNode($k);
            $item->value = self::valueToNode($v, $blockMode);
            if ($item->value instanceof Node\BlockArrayNode) {
                $item->value->indentation = $this->indentation;
            }
            if ($hide && \is_int($k)) {
                $hide = $k === $counter;
                $counter = \max($k + 1, $counter);
            }
        }
        return $res;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Neon;

/**
 * Simple parser & generator for Nette Object Notation.
 * @see https://ne-on.org
 */
final class Neon
{
    public const BLOCK = Encoder::BLOCK;
    public const CHAIN = '!!chain';
    /**
     * Returns value converted to NEON.
     */
    public static function encode($value, bool $blockMode = \false, string $indentation = "\t") : string
    {
        $encoder = new Encoder();
        $encoder->blockMode = $blockMode;
        $encoder->indentation = $indentation;
        return $encoder->encode($value);
    }
    /**
     * Converts given NEON to PHP value.
     * @return mixed
     */
    public static function decode(string $input)
    {
        $decoder = new Decoder();
        return $decoder->decode($input);
    }
    /**
     * Converts given NEON file to PHP value.
     * @return mixed
     */
    public static function decodeFile(string $file)
    {
        if (!\is_file($file)) {
            throw new Exception("File '{$file}' does not exist.");
        }
        $input = \file_get_contents($file);
        if (\substr($input, 0, 3) === "") {
            // BOM
            $input = \substr($input, 3);
        }
        return self::decode($input);
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Neon;

/** @internal */
abstract class Node
{
    /** @var ?int */
    public $startPos;
    /** @var ?int */
    public $endPos;
    /** @return mixed */
    public abstract function toValue();
    public abstract function toString() : string;
    /** @return self[] */
    public function getSubNodes() : array
    {
        return [];
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Neon;

/** @internal */
final class Traverser
{
    /** @var callable(Node): ?Node */
    private $callback;
    /** @param  callable(Node): ?Node  $callback */
    public function traverse(Node $node, callable $callback) : Node
    {
        $this->callback = $callback;
        return $this->traverseNode($node);
    }
    private function traverseNode(Node $node) : Node
    {
        $node = ($this->callback)($node) ?? $node;
        foreach ($node->getSubNodes() as &$subnode) {
            $subnode = $this->traverseNode($subnode);
        }
        return $node;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Neon;

/** @internal */
final class Token
{
    public const STRING = 1;
    public const LITERAL = 2;
    public const CHAR = 0;
    public const COMMENT = 3;
    public const NEWLINE = 4;
    public const WHITESPACE = 5;
    /** @var string */
    public $value;
    /** @var int */
    public $offset;
    /** @var int|string */
    public $type;
    public function __construct(string $value, int $offset, $type)
    {
        $this->value = $value;
        $this->offset = $offset;
        $this->type = $type;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Neon\Node;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\Neon\Node;
/** @internal */
final class StringNode extends Node
{
    private const ESCAPE_SEQUENCES = ['t' => "\t", 'n' => "\n", 'r' => "\r", 'f' => "\f", 'b' => "\x08", '"' => '"', '\\' => '\\', '/' => '/', '_' => " "];
    /** @var string */
    public $value;
    public function __construct(string $value, int $pos = null)
    {
        $this->value = $value;
        $this->startPos = $this->endPos = $pos;
    }
    public function toValue() : string
    {
        return $this->value;
    }
    public static function parse(string $s) : string
    {
        if (\preg_match('#^...\\n++([\\t ]*+)#', $s, $m)) {
            // multiline
            $res = \substr($s, 3, -3);
            $res = \str_replace("\n" . $m[1], "\n", $res);
            $res = \preg_replace('#^\\n|\\n[\\t ]*+$#D', '', $res);
        } else {
            $res = \substr($s, 1, -1);
            if ($s[0] === "'") {
                $res = \str_replace("''", "'", $res);
            }
        }
        if ($s[0] === "'") {
            return $res;
        }
        return \preg_replace_callback('#\\\\(?:ud[89ab][0-9a-f]{2}\\\\ud[c-f][0-9a-f]{2}|u[0-9a-f]{4}|x[0-9a-f]{2}|.)#i', function (array $m) : string {
            $sq = $m[0];
            if (isset(self::ESCAPE_SEQUENCES[$sq[1]])) {
                return self::ESCAPE_SEQUENCES[$sq[1]];
            } elseif ($sq[1] === 'u' && \strlen($sq) >= 6) {
                if (($res = \json_decode('"' . $sq . '"')) !== null) {
                    return $res;
                }
                throw new Nette\Neon\Exception("Invalid UTF-8 sequence {$sq}");
            } elseif ($sq[1] === 'x' && \strlen($sq) === 4) {
                \trigger_error("Neon: '{$sq}' is deprecated, use '\\uXXXX' instead.", \E_USER_DEPRECATED);
                return \chr(\hexdec(\substr($sq, 2)));
            } else {
                throw new Nette\Neon\Exception("Invalid escaping sequence {$sq}");
            }
        }, $res);
    }
    public function toString() : string
    {
        $res = \json_encode($this->value, \JSON_UNESCAPED_UNICODE | \JSON_UNESCAPED_SLASHES);
        if ($res === \false) {
            throw new Nette\Neon\Exception('Invalid UTF-8 sequence: ' . $this->value);
        }
        if (\strpos($this->value, "\n") !== \false) {
            $res = \preg_replace_callback('#[^\\\\]|\\\\(.)#s', function ($m) {
                return ['n' => "\n\t", 't' => "\t", '"' => '"'][$m[1] ?? ''] ?? $m[0];
            }, $res);
            $res = '"""' . "\n\t" . \substr($res, 1, -1) . "\n" . '"""';
        }
        return $res;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Neon\Node;

use _PHPStan_dcc7b7cff\Nette\Neon\Entity;
use _PHPStan_dcc7b7cff\Nette\Neon\Node;
/** @internal */
final class EntityNode extends Node
{
    /** @var Node */
    public $value;
    /** @var ArrayItemNode[] */
    public $attributes = [];
    public function __construct(Node $value, array $attributes, int $startPos = null, int $endPos = null)
    {
        $this->value = $value;
        $this->attributes = $attributes;
        $this->startPos = $startPos;
        $this->endPos = $endPos ?? $startPos;
    }
    public function toValue() : Entity
    {
        return new Entity($this->value->toValue(), ArrayItemNode::itemsToArray($this->attributes));
    }
    public function toString() : string
    {
        return $this->value->toString() . '(' . ($this->attributes ? ArrayItemNode::itemsToInlineString($this->attributes) : '') . ')';
    }
    public function getSubNodes() : array
    {
        $res = [&$this->value];
        foreach ($this->attributes as &$item) {
            $res[] =& $item;
        }
        return $res;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Neon\Node;

use _PHPStan_dcc7b7cff\Nette\Neon\Node;
/** @internal */
final class ArrayItemNode extends Node
{
    /** @var ?Node */
    public $key;
    /** @var Node */
    public $value;
    public function __construct(int $pos = null)
    {
        $this->startPos = $this->endPos = $pos;
    }
    /** @param  self[]  $items */
    public static function itemsToArray(array $items) : array
    {
        $res = [];
        foreach ($items as $item) {
            if ($item->key === null) {
                $res[] = $item->value->toValue();
            } else {
                $res[(string) $item->key->toValue()] = $item->value->toValue();
            }
        }
        return $res;
    }
    /** @param  self[]  $items */
    public static function itemsToInlineString(array $items) : string
    {
        $res = '';
        foreach ($items as $item) {
            $res .= ($res === '' ? '' : ', ') . ($item->key ? $item->key->toString() . ': ' : '') . $item->value->toString();
        }
        return $res;
    }
    /** @param  self[]  $items */
    public static function itemsToBlockString(array $items) : string
    {
        $res = '';
        foreach ($items as $item) {
            $v = $item->value->toString();
            $res .= ($item->key ? $item->key->toString() . ':' : '-') . ($item->value instanceof BlockArrayNode && $item->value->items ? "\n" . $v . (\substr($v, -2, 1) === "\n" ? '' : "\n") : ' ' . $v . "\n");
        }
        return $res;
    }
    public function toValue()
    {
        throw new \LogicException();
    }
    public function toString() : string
    {
        throw new \LogicException();
    }
    public function getSubNodes() : array
    {
        return $this->key ? [&$this->key, &$this->value] : [&$this->value];
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Neon\Node;

use _PHPStan_dcc7b7cff\Nette\Neon;
use _PHPStan_dcc7b7cff\Nette\Neon\Node;
/** @internal */
final class EntityChainNode extends Node
{
    /** @var EntityNode[] */
    public $chain = [];
    public function __construct(array $chain = [], int $startPos = null, int $endPos = null)
    {
        $this->chain = $chain;
        $this->startPos = $startPos;
        $this->endPos = $endPos ?? $startPos;
    }
    public function toValue() : Neon\Entity
    {
        $entities = [];
        foreach ($this->chain as $item) {
            $entities[] = $item->toValue();
        }
        return new Neon\Entity(Neon\Neon::CHAIN, $entities);
    }
    public function toString() : string
    {
        return \implode('', \array_map(function ($entity) {
            return $entity->toString();
        }, $this->chain));
    }
    public function getSubNodes() : array
    {
        $res = [];
        foreach ($this->chain as &$item) {
            $res[] =& $item;
        }
        return $res;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Neon\Node;

/** @internal */
final class BlockArrayNode extends ArrayNode
{
    /** @var string */
    public $indentation;
    public function __construct(string $indentation = '', int $pos = null)
    {
        $this->indentation = $indentation;
        $this->startPos = $this->endPos = $pos;
    }
    public function toString() : string
    {
        if (\count($this->items) === 0) {
            return '[]';
        }
        $res = ArrayItemNode::itemsToBlockString($this->items);
        return \preg_replace('#^(?=.)#m', $this->indentation, $res);
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Neon\Node;

/** @internal */
final class InlineArrayNode extends ArrayNode
{
    /** @var string */
    public $bracket;
    public function __construct(string $bracket, int $pos = null)
    {
        $this->bracket = $bracket;
        $this->startPos = $this->endPos = $pos;
    }
    public function toString() : string
    {
        return $this->bracket . ArrayItemNode::itemsToInlineString($this->items) . ['[' => ']', '{' => '}', '(' => ')'][$this->bracket];
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Neon\Node;

use _PHPStan_dcc7b7cff\Nette\Neon\Node;
/** @internal */
abstract class ArrayNode extends Node
{
    /** @var ArrayItemNode[] */
    public $items = [];
    public function toValue() : array
    {
        return ArrayItemNode::itemsToArray($this->items);
    }
    public function getSubNodes() : array
    {
        $res = [];
        foreach ($this->items as &$item) {
            $res[] =& $item;
        }
        return $res;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Neon\Node;

use _PHPStan_dcc7b7cff\Nette\Neon\Node;
/** @internal */
final class LiteralNode extends Node
{
    private const SIMPLE_TYPES = ['true' => \true, 'True' => \true, 'TRUE' => \true, 'yes' => \true, 'Yes' => \true, 'YES' => \true, 'on' => \true, 'On' => \true, 'ON' => \true, 'false' => \false, 'False' => \false, 'FALSE' => \false, 'no' => \false, 'No' => \false, 'NO' => \false, 'off' => \false, 'Off' => \false, 'OFF' => \false, 'null' => null, 'Null' => null, 'NULL' => null];
    private const DEPRECATED_TYPES = ['on' => 1, 'On' => 1, 'ON' => 1, 'off' => 1, 'Off' => 1, 'OFF' => 1];
    private const PATTERN_DATETIME = '#\\d\\d\\d\\d-\\d\\d?-\\d\\d?(?:(?:[Tt]| ++)\\d\\d?:\\d\\d:\\d\\d(?:\\.\\d*+)? *+(?:Z|[-+]\\d\\d?(?::?\\d\\d)?)?)?$#DA';
    private const PATTERN_HEX = '#0x[0-9a-fA-F]++$#DA';
    private const PATTERN_OCTAL = '#0o[0-7]++$#DA';
    private const PATTERN_BINARY = '#0b[0-1]++$#DA';
    /** @var mixed */
    public $value;
    public function __construct($value, int $pos = null)
    {
        $this->value = $value;
        $this->startPos = $this->endPos = $pos;
    }
    public function toValue()
    {
        return $this->value;
    }
    /** @return mixed */
    public static function parse(string $value, bool $isKey = \false)
    {
        if (!$isKey && \array_key_exists($value, self::SIMPLE_TYPES)) {
            if (isset(self::DEPRECATED_TYPES[$value])) {
                \trigger_error("Neon: keyword '{$value}' is deprecated, use true/yes or false/no.", \E_USER_DEPRECATED);
            }
            return self::SIMPLE_TYPES[$value];
        } elseif (\is_numeric($value)) {
            return $value * 1;
        } elseif (\preg_match(self::PATTERN_HEX, $value)) {
            return \hexdec($value);
        } elseif (\preg_match(self::PATTERN_OCTAL, $value)) {
            return \octdec($value);
        } elseif (\preg_match(self::PATTERN_BINARY, $value)) {
            return \bindec($value);
        } elseif (!$isKey && \preg_match(self::PATTERN_DATETIME, $value)) {
            return new \DateTimeImmutable($value);
        } else {
            return $value;
        }
    }
    public function toString() : string
    {
        if ($this->value instanceof \DateTimeInterface) {
            return $this->value->format('Y-m-d H:i:s O');
        } elseif (\is_string($this->value)) {
            return $this->value;
        } elseif (\is_float($this->value)) {
            $res = \json_encode($this->value);
            return \strpos($res, '.') === \false ? $res . '.0' : $res;
        } elseif (\is_int($this->value) || \is_bool($this->value) || $this->value === null) {
            return \json_encode($this->value);
        } else {
            throw new \LogicException();
        }
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Neon;

/** @internal */
final class Lexer
{
    public const PATTERNS = [
        // strings
        Token::STRING => '
			\'\'\'\\n (?:(?: [^\\n] | \\n(?![\\t\\ ]*+\'\'\') )*+ \\n)?[\\t\\ ]*+\'\'\' |
			"""\\n (?:(?: [^\\n] | \\n(?![\\t\\ ]*+""") )*+ \\n)?[\\t\\ ]*+""" |
			\' (?: \'\' | [^\'\\n] )*+ \' |
			" (?: \\\\. | [^"\\\\\\n] )*+ "
		',
        // literal / boolean / integer / float
        Token::LITERAL => '
			(?: [^#"\',:=[\\]{}()\\n\\t\\ `-] | (?<!["\']) [:-] [^"\',=[\\]{}()\\n\\t\\ ] )
			(?:
				[^,:=\\]})(\\n\\t\\ ]++ |
				:(?! [\\n\\t\\ ,\\]})] | $ ) |
				[\\ \\t]++ [^#,:=\\]})(\\n\\t\\ ]
			)*+
		',
        // punctuation
        Token::CHAR => '[,:=[\\]{}()-]',
        // comment
        Token::COMMENT => '\\#.*+',
        // new line
        Token::NEWLINE => '\\n++',
        // whitespace
        Token::WHITESPACE => '[\\t\\ ]++',
    ];
    public function tokenize(string $input) : TokenStream
    {
        $input = \str_replace("\r", '', $input);
        $pattern = '~(' . \implode(')|(', self::PATTERNS) . ')~Amixu';
        $res = \preg_match_all($pattern, $input, $tokens, \PREG_SET_ORDER);
        if ($res === \false) {
            throw new Exception('Invalid UTF-8 sequence.');
        }
        $types = \array_keys(self::PATTERNS);
        $offset = 0;
        foreach ($tokens as &$token) {
            $type = null;
            for ($i = 1; $i <= \count($types); $i++) {
                if (!isset($token[$i])) {
                    break;
                } elseif ($token[$i] !== '') {
                    $type = $types[$i - 1];
                    if ($type === Token::CHAR) {
                        $type = $token[0];
                    }
                    break;
                }
            }
            $token = new Token($token[0], $offset, $type);
            $offset += \strlen($token->value);
        }
        $stream = new TokenStream($tokens);
        if ($offset !== \strlen($input)) {
            $s = \str_replace("\n", '\\n', \substr($input, $offset, 40));
            $stream->error("Unexpected '{$s}'", \count($tokens));
        }
        return $stream;
    }
    public static function requiresDelimiters(string $s) : bool
    {
        return \preg_match('~[\\x00-\\x1F]|^[+-.]?\\d|^(true|false|yes|no|on|off|null)$~Di', $s) || !\preg_match('~^' . self::PATTERNS[Token::LITERAL] . '$~Dx', $s);
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Neon;

/**
 * The exception that indicates error of NEON processing.
 */
class Exception extends \Exception
{
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Neon;

/** @internal */
final class Parser
{
    /** @var TokenStream */
    private $tokens;
    public function parse(TokenStream $tokens) : Node
    {
        $this->tokens = $tokens;
        while ($this->tokens->consume(Token::NEWLINE)) {
        }
        $node = $this->parseBlock($this->tokens->getIndentation());
        while ($this->tokens->consume(Token::NEWLINE)) {
        }
        if ($this->tokens->isNext()) {
            $this->tokens->error();
        }
        return $node;
    }
    private function parseBlock(string $indent, bool $onlyBullets = \false) : Node
    {
        $res = new Node\BlockArrayNode($indent, $this->tokens->getPos());
        $keyCheck = [];
        loop:
        $item = new Node\ArrayItemNode($this->tokens->getPos());
        if ($this->tokens->consume('-')) {
            // continue
        } elseif (!$this->tokens->isNext() || $onlyBullets) {
            return $res->items ? $res : new Node\LiteralNode(null, $this->tokens->getPos());
        } else {
            $value = $this->parseValue();
            if ($this->tokens->consume(':', '=')) {
                $this->checkArrayKey($value, $keyCheck);
                $item->key = $value;
            } else {
                if ($res->items) {
                    $this->tokens->error();
                }
                return $value;
            }
        }
        $res->items[] = $item;
        $item->value = new Node\LiteralNode(null, $this->tokens->getPos());
        if ($this->tokens->consume(Token::NEWLINE)) {
            while ($this->tokens->consume(Token::NEWLINE)) {
            }
            $nextIndent = $this->tokens->getIndentation();
            if (\strncmp($nextIndent, $indent, \min(\strlen($nextIndent), \strlen($indent)))) {
                $this->tokens->error('Invalid combination of tabs and spaces');
            } elseif (\strlen($nextIndent) > \strlen($indent)) {
                // open new block
                $item->value = $this->parseBlock($nextIndent);
            } elseif (\strlen($nextIndent) < \strlen($indent)) {
                // close block
                return $res;
            } elseif ($item->key !== null && $this->tokens->isNext('-')) {
                // special dash subblock
                $item->value = $this->parseBlock($indent, \true);
            }
        } elseif ($item->key === null) {
            $item->value = $this->parseBlock($indent . '  ');
            // open new block after dash
        } elseif ($this->tokens->isNext()) {
            $item->value = $this->parseValue();
            if ($this->tokens->isNext() && !$this->tokens->isNext(Token::NEWLINE)) {
                $this->tokens->error();
            }
        }
        if ($item->value instanceof Node\BlockArrayNode) {
            $item->value->indentation = \substr($item->value->indentation, \strlen($indent));
        }
        $res->endPos = $item->endPos = $item->value->endPos;
        while ($this->tokens->consume(Token::NEWLINE)) {
        }
        if (!$this->tokens->isNext()) {
            return $res;
        }
        $nextIndent = $this->tokens->getIndentation();
        if (\strncmp($nextIndent, $indent, \min(\strlen($nextIndent), \strlen($indent)))) {
            $this->tokens->error('Invalid combination of tabs and spaces');
        } elseif (\strlen($nextIndent) > \strlen($indent)) {
            $this->tokens->error('Bad indentation');
        } elseif (\strlen($nextIndent) < \strlen($indent)) {
            // close block
            return $res;
        }
        goto loop;
    }
    private function parseValue() : Node
    {
        if ($token = $this->tokens->consume(Token::STRING)) {
            try {
                $node = new Node\StringNode(Node\StringNode::parse($token->value), $this->tokens->getPos() - 1);
            } catch (Exception $e) {
                $this->tokens->error($e->getMessage(), $this->tokens->getPos() - 1);
            }
        } elseif ($token = $this->tokens->consume(Token::LITERAL)) {
            $pos = $this->tokens->getPos() - 1;
            $node = new Node\LiteralNode(Node\LiteralNode::parse($token->value, $this->tokens->isNext(':', '=')), $pos);
        } elseif ($this->tokens->isNext('[', '(', '{')) {
            $node = $this->parseBraces();
        } else {
            $this->tokens->error();
        }
        return $this->parseEntity($node);
    }
    private function parseEntity(Node $node) : Node
    {
        if (!$this->tokens->isNext('(')) {
            return $node;
        }
        $attributes = $this->parseBraces();
        $entities[] = new Node\EntityNode($node, $attributes->items, $node->startPos, $attributes->endPos);
        while ($token = $this->tokens->consume(Token::LITERAL)) {
            $valueNode = new Node\LiteralNode(Node\LiteralNode::parse($token->value), $this->tokens->getPos() - 1);
            if ($this->tokens->isNext('(')) {
                $attributes = $this->parseBraces();
                $entities[] = new Node\EntityNode($valueNode, $attributes->items, $valueNode->startPos, $attributes->endPos);
            } else {
                $entities[] = new Node\EntityNode($valueNode, [], $valueNode->startPos);
                break;
            }
        }
        return \count($entities) === 1 ? $entities[0] : new Node\EntityChainNode($entities, $node->startPos, \end($entities)->endPos);
    }
    private function parseBraces() : Node\InlineArrayNode
    {
        $token = $this->tokens->consume();
        $endBrace = ['[' => ']', '{' => '}', '(' => ')'][$token->value];
        $res = new Node\InlineArrayNode($token->value, $this->tokens->getPos() - 1);
        $keyCheck = [];
        loop:
        while ($this->tokens->consume(Token::NEWLINE)) {
        }
        if ($this->tokens->consume($endBrace)) {
            $res->endPos = $this->tokens->getPos() - 1;
            return $res;
        }
        $res->items[] = $item = new Node\ArrayItemNode($this->tokens->getPos());
        $value = $this->parseValue();
        if ($this->tokens->consume(':', '=')) {
            $this->checkArrayKey($value, $keyCheck);
            $item->key = $value;
            $item->value = $this->tokens->isNext(Token::NEWLINE, ',', $endBrace) ? new Node\LiteralNode(null, $this->tokens->getPos()) : $this->parseValue();
        } else {
            $item->value = $value;
        }
        $item->endPos = $item->value->endPos;
        if ($this->tokens->consume(',', Token::NEWLINE)) {
            goto loop;
        }
        while ($this->tokens->consume(Token::NEWLINE)) {
        }
        if (!$this->tokens->isNext($endBrace)) {
            $this->tokens->error();
        }
        goto loop;
    }
    private function checkArrayKey(Node $key, array &$arr) : void
    {
        if (!$key instanceof Node\StringNode && !$key instanceof Node\LiteralNode || !\is_scalar($key->value)) {
            $this->tokens->error('Unacceptable key', $key->startPos);
        }
        $k = (string) $key->value;
        if (\array_key_exists($k, $arr)) {
            $this->tokens->error("Duplicated key '{$k}'", $key->startPos);
        }
        $arr[$k] = \true;
    }
}
#!/usr/bin/env php
<?php 
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff;

if (!(\is_file($file = __DIR__ . '/../vendor/autoload.php') && (include $file)) && !(\is_file($file = __DIR__ . '/../../../autoload.php') && (include $file))) {
    \fwrite(\STDERR, "Install packages using Composer.\n");
    exit(1);
}
if (\function_exists('pcntl_signal')) {
    \pcntl_signal(\SIGINT, function () : void {
        \pcntl_signal(\SIGINT, \SIG_DFL);
        echo "Terminated\n";
        exit(1);
    });
} elseif (\function_exists('sapi_windows_set_ctrl_handler')) {
    \sapi_windows_set_ctrl_handler(function () {
        echo "Terminated\n";
        exit(1);
    });
}
\set_time_limit(0);
echo '
NEON linter
-----------
';
if ($argc < 2) {
    echo "Usage: neon-lint <path>\n";
    exit(1);
}
$ok = scanPath($argv[1]);
exit($ok ? 0 : 1);
function scanPath(string $path) : bool
{
    echo "Scanning {$path}\n";
    $it = new \RecursiveDirectoryIterator($path);
    $it = new \RecursiveIteratorIterator($it, \RecursiveIteratorIterator::LEAVES_ONLY);
    $it = new \RegexIterator($it, '~\\.neon$~');
    $counter = 0;
    $success = \true;
    foreach ($it as $file) {
        echo \str_pad(\str_repeat('.', $counter++ % 40), 40), "\r";
        $success = lintFile((string) $file) && $success;
    }
    echo \str_pad('', 40), "\r";
    echo "Done.\n";
    return $success;
}
function lintFile(string $file) : bool
{
    \set_error_handler(function (int $severity, string $message) use($file) {
        if ($severity === \E_USER_DEPRECATED) {
            \fwrite(\STDERR, "[DEPRECATED] {$file}    {$message}\n");
            return null;
        }
        return \false;
    });
    $s = \file_get_contents($file);
    if (\substr($s, 0, 3) === "") {
        \fwrite(\STDERR, "[WARNING]    {$file}    contains BOM\n");
        $contents = \substr($s, 3);
    }
    try {
        Nette\Neon\Neon::decode($s);
        return \true;
    } catch (Nette\Neon\Exception $e) {
        \fwrite(\STDERR, "[ERROR]      {$file}    {$e->getMessage()}\n");
    } finally {
        \restore_error_handler();
    }
    return \false;
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\PhpGenerator;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Global function.
 *
 * @property string $body
 */
final class GlobalFunction
{
    use Nette\SmartObject;
    use Traits\FunctionLike;
    use Traits\NameAware;
    use Traits\CommentAware;
    use Traits\AttributeAware;
    public static function from(string $function, bool $withBody = \false) : self
    {
        return (new Factory())->fromFunctionReflection(new \ReflectionFunction($function), $withBody);
    }
    public static function withBodyFrom(string $function) : self
    {
        return (new Factory())->fromFunctionReflection(new \ReflectionFunction($function), \true);
    }
    public function __toString() : string
    {
        try {
            return (new Printer())->printFunction($this);
        } catch (\Throwable $e) {
            if (\PHP_VERSION_ID >= 70400) {
                throw $e;
            }
            \trigger_error('Exception in ' . __METHOD__ . "(): {$e->getMessage()} in {$e->getFile()}:{$e->getLine()}", \E_USER_ERROR);
            return '';
        }
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\PhpGenerator;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\Utils\Reflection;
/**
 * Creates a representation based on reflection.
 */
final class Factory
{
    use Nette\SmartObject;
    private $bodyCache = [];
    private $extractorCache = [];
    public function fromClassReflection(\ReflectionClass $from, bool $withBodies = \false, bool $materializeTraits = \true) : ClassType
    {
        if ($withBodies && $from->isAnonymous()) {
            throw new Nette\NotSupportedException('The $withBodies parameter cannot be used for anonymous functions.');
        }
        $class = $from->isAnonymous() ? new ClassType() : new ClassType($from->getShortName(), new PhpNamespace($from->getNamespaceName()));
        if (\PHP_VERSION_ID >= 80100 && $from->isEnum()) {
            $class->setType($class::TYPE_ENUM);
            $from = new \ReflectionEnum($from->getName());
            $enumIface = $from->isBacked() ? \BackedEnum::class : \UnitEnum::class;
        } else {
            $class->setType($from->isInterface() ? $class::TYPE_INTERFACE : ($from->isTrait() ? $class::TYPE_TRAIT : $class::TYPE_CLASS));
            $class->setFinal($from->isFinal() && $class->isClass());
            $class->setAbstract($from->isAbstract() && $class->isClass());
            $enumIface = null;
        }
        $ifaces = $from->getInterfaceNames();
        foreach ($ifaces as $iface) {
            $ifaces = \array_filter($ifaces, function (string $item) use($iface) : bool {
                return !\is_subclass_of($iface, $item);
            });
        }
        if ($from->isInterface()) {
            $class->setExtends($ifaces);
        } else {
            $ifaces = \array_diff($ifaces, [$enumIface]);
            $class->setImplements($ifaces);
        }
        $class->setComment(Helpers::unformatDocComment((string) $from->getDocComment()));
        $class->setAttributes(self::getAttributes($from));
        if ($from->getParentClass()) {
            $class->setExtends($from->getParentClass()->name);
            $class->setImplements(\array_diff($class->getImplements(), $from->getParentClass()->getInterfaceNames()));
        }
        $props = [];
        foreach ($from->getProperties() as $prop) {
            $declaringClass = $materializeTraits ? $prop->getDeclaringClass() : Reflection::getPropertyDeclaringClass($prop);
            if ($prop->isDefault() && $declaringClass->name === $from->name && (\PHP_VERSION_ID < 80000 || !$prop->isPromoted()) && !$class->isEnum()) {
                $props[] = $this->fromPropertyReflection($prop);
            }
        }
        $class->setProperties($props);
        $methods = $resolutions = [];
        foreach ($from->getMethods() as $method) {
            $realMethod = Reflection::getMethodDeclaringMethod($method);
            $declaringClass = ($materializeTraits ? $method : $realMethod)->getDeclaringClass();
            if ($declaringClass->name === $from->name && (!$enumIface || !\method_exists($enumIface, $method->name))) {
                $methods[] = $m = $this->fromMethodReflection($method);
                if ($withBodies) {
                    $realMethodClass = $realMethod->getDeclaringClass();
                    $bodies =& $this->bodyCache[$realMethodClass->name];
                    $bodies = $bodies ?? $this->getExtractor($realMethodClass)->extractMethodBodies($realMethodClass->name);
                    if (isset($bodies[$realMethod->name])) {
                        $m->setBody($bodies[$realMethod->name]);
                    }
                }
            }
            $modifier = $realMethod->getModifiers() !== $method->getModifiers() ? ' ' . $this->getVisibility($method) : null;
            $alias = $realMethod->name !== $method->name ? ' ' . $method->name : '';
            if ($modifier || $alias) {
                $resolutions[] = $realMethod->name . ' as' . $modifier . $alias;
            }
        }
        $class->setMethods($methods);
        if (!$materializeTraits) {
            foreach ($from->getTraitNames() as $trait) {
                $class->addTrait($trait, $resolutions);
                $resolutions = [];
            }
        }
        $consts = $cases = [];
        foreach ($from->getReflectionConstants() as $const) {
            if ($class->isEnum() && $from->hasCase($const->name)) {
                $cases[] = $this->fromCaseReflection($const);
            } elseif ($const->getDeclaringClass()->name === $from->name) {
                $consts[] = $this->fromConstantReflection($const);
            }
        }
        $class->setConstants($consts);
        $class->setCases($cases);
        return $class;
    }
    public function fromMethodReflection(\ReflectionMethod $from) : Method
    {
        $method = new Method($from->name);
        $method->setParameters(\array_map([$this, 'fromParameterReflection'], $from->getParameters()));
        $method->setStatic($from->isStatic());
        $isInterface = $from->getDeclaringClass()->isInterface();
        $method->setVisibility($isInterface ? null : $this->getVisibility($from));
        $method->setFinal($from->isFinal());
        $method->setAbstract($from->isAbstract() && !$isInterface);
        $method->setBody($from->isAbstract() ? null : '');
        $method->setReturnReference($from->returnsReference());
        $method->setVariadic($from->isVariadic());
        $method->setComment(Helpers::unformatDocComment((string) $from->getDocComment()));
        $method->setAttributes(self::getAttributes($from));
        if ($from->getReturnType() instanceof \ReflectionNamedType) {
            $method->setReturnType($from->getReturnType()->getName());
            $method->setReturnNullable($from->getReturnType()->allowsNull());
        } elseif ($from->getReturnType() instanceof \ReflectionUnionType || $from->getReturnType() instanceof \ReflectionIntersectionType) {
            $method->setReturnType((string) $from->getReturnType());
        }
        return $method;
    }
    /** @return GlobalFunction|Closure */
    public function fromFunctionReflection(\ReflectionFunction $from, bool $withBody = \false)
    {
        $function = $from->isClosure() ? new Closure() : new GlobalFunction($from->name);
        $function->setParameters(\array_map([$this, 'fromParameterReflection'], $from->getParameters()));
        $function->setReturnReference($from->returnsReference());
        $function->setVariadic($from->isVariadic());
        if (!$from->isClosure()) {
            $function->setComment(Helpers::unformatDocComment((string) $from->getDocComment()));
        }
        $function->setAttributes(self::getAttributes($from));
        if ($from->getReturnType() instanceof \ReflectionNamedType) {
            $function->setReturnType($from->getReturnType()->getName());
            $function->setReturnNullable($from->getReturnType()->allowsNull());
        } elseif ($from->getReturnType() instanceof \ReflectionUnionType || $from->getReturnType() instanceof \ReflectionIntersectionType) {
            $function->setReturnType((string) $from->getReturnType());
        }
        if ($withBody) {
            if ($from->isClosure()) {
                throw new Nette\NotSupportedException('The $withBody parameter cannot be used for closures.');
            }
            $function->setBody($this->getExtractor($from)->extractFunctionBody($from->name));
        }
        return $function;
    }
    /** @return Method|GlobalFunction|Closure */
    public function fromCallable(callable $from)
    {
        $ref = Nette\Utils\Callback::toReflection($from);
        return $ref instanceof \ReflectionMethod ? self::fromMethodReflection($ref) : self::fromFunctionReflection($ref);
    }
    public function fromParameterReflection(\ReflectionParameter $from) : Parameter
    {
        $param = \PHP_VERSION_ID >= 80000 && $from->isPromoted() ? new PromotedParameter($from->name) : new Parameter($from->name);
        $param->setReference($from->isPassedByReference());
        if ($from->getType() instanceof \ReflectionNamedType) {
            $param->setType($from->getType()->getName());
            $param->setNullable($from->getType()->allowsNull());
        } elseif ($from->getType() instanceof \ReflectionUnionType || $from->getType() instanceof \ReflectionIntersectionType) {
            $param->setType((string) $from->getType());
        }
        if ($from->isDefaultValueAvailable()) {
            if ($from->isDefaultValueConstant()) {
                $parts = \explode('::', $from->getDefaultValueConstantName());
                if (\count($parts) > 1) {
                    $parts[0] = Helpers::tagName($parts[0]);
                }
                $param->setDefaultValue(new Literal(\implode('::', $parts)));
            } elseif (\is_object($from->getDefaultValue())) {
                $param->setDefaultValue($this->fromObject($from->getDefaultValue()));
            } else {
                $param->setDefaultValue($from->getDefaultValue());
            }
            $param->setNullable($param->isNullable() && $param->getDefaultValue() !== null);
        }
        $param->setAttributes(self::getAttributes($from));
        return $param;
    }
    public function fromConstantReflection(\ReflectionClassConstant $from) : Constant
    {
        $const = new Constant($from->name);
        $const->setValue($from->getValue());
        $const->setVisibility($this->getVisibility($from));
        $const->setFinal(\PHP_VERSION_ID >= 80100 ? $from->isFinal() : \false);
        $const->setComment(Helpers::unformatDocComment((string) $from->getDocComment()));
        $const->setAttributes(self::getAttributes($from));
        return $const;
    }
    public function fromCaseReflection(\ReflectionClassConstant $from) : EnumCase
    {
        $const = new EnumCase($from->name);
        $const->setValue($from->getValue()->value ?? null);
        $const->setComment(Helpers::unformatDocComment((string) $from->getDocComment()));
        $const->setAttributes(self::getAttributes($from));
        return $const;
    }
    public function fromPropertyReflection(\ReflectionProperty $from) : Property
    {
        $defaults = $from->getDeclaringClass()->getDefaultProperties();
        $prop = new Property($from->name);
        $prop->setValue($defaults[$prop->getName()] ?? null);
        $prop->setStatic($from->isStatic());
        $prop->setVisibility($this->getVisibility($from));
        if (\PHP_VERSION_ID >= 70400) {
            if ($from->getType() instanceof \ReflectionNamedType) {
                $prop->setType($from->getType()->getName());
                $prop->setNullable($from->getType()->allowsNull());
            } elseif ($from->getType() instanceof \ReflectionUnionType || $from->getType() instanceof \ReflectionIntersectionType) {
                $prop->setType((string) $from->getType());
            }
            $prop->setInitialized($from->hasType() && \array_key_exists($prop->getName(), $defaults));
            $prop->setReadOnly(\PHP_VERSION_ID >= 80100 ? $from->isReadOnly() : \false);
        } else {
            $prop->setInitialized(\false);
        }
        $prop->setComment(Helpers::unformatDocComment((string) $from->getDocComment()));
        $prop->setAttributes(self::getAttributes($from));
        return $prop;
    }
    public function fromObject(object $obj) : Literal
    {
        return new Literal('new ' . \get_class($obj) . '(/* unknown */)');
    }
    public function fromClassCode(string $code) : ClassType
    {
        $classes = $this->fromCode($code)->getClasses();
        if (!$classes) {
            throw new Nette\InvalidStateException('The code does not contain any class.');
        }
        return \reset($classes);
    }
    public function fromCode(string $code) : PhpFile
    {
        $reader = new Extractor($code);
        return $reader->extractAll();
    }
    private function getAttributes($from) : array
    {
        if (\PHP_VERSION_ID < 80000) {
            return [];
        }
        return \array_map(function ($attr) {
            $args = $attr->getArguments();
            foreach ($args as &$arg) {
                if (\is_object($arg)) {
                    $arg = $this->fromObject($arg);
                }
            }
            return new Attribute($attr->getName(), $args);
        }, $from->getAttributes());
    }
    private function getVisibility($from) : string
    {
        return $from->isPrivate() ? ClassType::VISIBILITY_PRIVATE : ($from->isProtected() ? ClassType::VISIBILITY_PROTECTED : ClassType::VISIBILITY_PUBLIC);
    }
    private function getExtractor($from) : Extractor
    {
        $file = $from->getFileName();
        $cache =& $this->extractorCache[$file];
        if ($cache !== null) {
            return $cache;
        } elseif (!$file) {
            throw new Nette\InvalidStateException("Source code of {$from->name} not found.");
        }
        return new Extractor(\file_get_contents($file));
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\PhpGenerator;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Instance of PHP file.
 *
 * Generates:
 * - opening tag (<?php)
 * - doc comments
 * - one or more namespaces
 */
final class PhpFile
{
    use Nette\SmartObject;
    use Traits\CommentAware;
    /** @var PhpNamespace[] */
    private $namespaces = [];
    /** @var bool */
    private $strictTypes = \false;
    public static function fromCode(string $code) : self
    {
        return (new Factory())->fromCode($code);
    }
    public function addClass(string $name) : ClassType
    {
        return $this->addNamespace(Helpers::extractNamespace($name))->addClass(Helpers::extractShortName($name));
    }
    public function addInterface(string $name) : ClassType
    {
        return $this->addNamespace(Helpers::extractNamespace($name))->addInterface(Helpers::extractShortName($name));
    }
    public function addTrait(string $name) : ClassType
    {
        return $this->addNamespace(Helpers::extractNamespace($name))->addTrait(Helpers::extractShortName($name));
    }
    public function addEnum(string $name) : ClassType
    {
        return $this->addNamespace(Helpers::extractNamespace($name))->addEnum(Helpers::extractShortName($name));
    }
    /** @param  string|PhpNamespace  $namespace */
    public function addNamespace($namespace) : PhpNamespace
    {
        if ($namespace instanceof PhpNamespace) {
            $res = $this->namespaces[$namespace->getName()] = $namespace;
        } elseif (\is_string($namespace)) {
            $res = $this->namespaces[$namespace] = $this->namespaces[$namespace] ?? new PhpNamespace($namespace);
        } else {
            throw new Nette\InvalidArgumentException('Argument must be string|PhpNamespace.');
        }
        foreach ($this->namespaces as $namespace) {
            $namespace->setBracketedSyntax(\count($this->namespaces) > 1 && isset($this->namespaces['']));
        }
        return $res;
    }
    public function addFunction(string $name) : GlobalFunction
    {
        return $this->addNamespace(Helpers::extractNamespace($name))->addFunction(Helpers::extractShortName($name));
    }
    /** @return PhpNamespace[] */
    public function getNamespaces() : array
    {
        return $this->namespaces;
    }
    /** @return ClassType[] */
    public function getClasses() : array
    {
        $classes = [];
        foreach ($this->namespaces as $n => $namespace) {
            $n .= $n ? '\\' : '';
            foreach ($namespace->getClasses() as $c => $class) {
                $classes[$n . $c] = $class;
            }
        }
        return $classes;
    }
    /** @return GlobalFunction[] */
    public function getFunctions() : array
    {
        $functions = [];
        foreach ($this->namespaces as $n => $namespace) {
            $n .= $n ? '\\' : '';
            foreach ($namespace->getFunctions() as $c => $class) {
                $functions[$n . $c] = $class;
            }
        }
        return $functions;
    }
    /** @return static */
    public function addUse(string $name, string $alias = null, string $of = PhpNamespace::NAME_NORMAL) : self
    {
        $this->addNamespace('')->addUse($name, $alias, $of);
        return $this;
    }
    /**
     * Adds declare(strict_types=1) to output.
     * @return static
     */
    public function setStrictTypes(bool $on = \true) : self
    {
        $this->strictTypes = $on;
        return $this;
    }
    public function hasStrictTypes() : bool
    {
        return $this->strictTypes;
    }
    /** @deprecated  use hasStrictTypes() */
    public function getStrictTypes() : bool
    {
        return $this->strictTypes;
    }
    public function __toString() : string
    {
        try {
            return (new Printer())->printFile($this);
        } catch (\Throwable $e) {
            if (\PHP_VERSION_ID >= 70400) {
                throw $e;
            }
            \trigger_error('Exception in ' . __METHOD__ . "(): {$e->getMessage()} in {$e->getFile()}:{$e->getLine()}", \E_USER_ERROR);
            return '';
        }
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\PhpGenerator;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Promoted parameter in constructor.
 */
final class PromotedParameter extends Parameter
{
    use Traits\VisibilityAware;
    use Traits\CommentAware;
    /** @var bool */
    private $readOnly = \false;
    /** @return static */
    public function setReadOnly(bool $state = \true) : self
    {
        $this->readOnly = $state;
        return $this;
    }
    public function isReadOnly() : bool
    {
        return $this->readOnly;
    }
    /** @throws Nette\InvalidStateException */
    public function validate() : void
    {
        if ($this->readOnly && !$this->getType()) {
            throw new Nette\InvalidStateException("Property \${$this->getName()}: Read-only properties are only supported on typed property.");
        }
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\PhpGenerator;

/**
 * Generates PHP code compatible with PSR-2 and PSR-12.
 */
final class PsrPrinter extends Printer
{
    /** @var string */
    protected $indentation = '    ';
    /** @var int */
    protected $linesBetweenMethods = 1;
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\PhpGenerator;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\InvalidStateException;
/**
 * Namespaced part of a PHP file.
 *
 * Generates:
 * - namespace statement
 * - variable amount of use statements
 * - one or more class declarations
 */
final class PhpNamespace
{
    use Nette\SmartObject;
    public const NAME_NORMAL = 'n', NAME_FUNCTION = 'f', NAME_CONSTANT = 'c';
    /** @var string */
    private $name;
    /** @var bool */
    private $bracketedSyntax = \false;
    /** @var string[][] */
    private $aliases = [self::NAME_NORMAL => [], self::NAME_FUNCTION => [], self::NAME_CONSTANT => []];
    /** @var ClassType[] */
    private $classes = [];
    /** @var GlobalFunction[] */
    private $functions = [];
    public function __construct(string $name)
    {
        if ($name !== '' && !Helpers::isNamespaceIdentifier($name)) {
            throw new Nette\InvalidArgumentException("Value '{$name}' is not valid name.");
        }
        $this->name = $name;
    }
    public function getName() : string
    {
        return $this->name;
    }
    /**
     * @return static
     * @internal
     */
    public function setBracketedSyntax(bool $state = \true) : self
    {
        $this->bracketedSyntax = $state;
        return $this;
    }
    public function hasBracketedSyntax() : bool
    {
        return $this->bracketedSyntax;
    }
    /** @deprecated  use hasBracketedSyntax() */
    public function getBracketedSyntax() : bool
    {
        return $this->bracketedSyntax;
    }
    /**
     * @throws InvalidStateException
     * @return static
     */
    public function addUse(string $name, string $alias = null, string $of = self::NAME_NORMAL) : self
    {
        if (!Helpers::isNamespaceIdentifier($name, \true) || Helpers::isIdentifier($name) && isset(Helpers::KEYWORDS[\strtolower($name)])) {
            throw new Nette\InvalidArgumentException("Value '{$name}' is not valid class/function/constant name.");
        } elseif ($alias && (!Helpers::isIdentifier($alias) || isset(Helpers::KEYWORDS[\strtolower($alias)]))) {
            throw new Nette\InvalidArgumentException("Value '{$alias}' is not valid alias.");
        }
        $name = \ltrim($name, '\\');
        $aliases = \array_change_key_case($this->aliases[$of]);
        $used = [self::NAME_NORMAL => $this->classes, self::NAME_FUNCTION => $this->functions, self::NAME_CONSTANT => []][$of];
        if ($alias === null) {
            $base = Helpers::extractShortName($name);
            $counter = null;
            do {
                $alias = $base . $counter;
                $lower = \strtolower($alias);
                $counter++;
            } while (isset($aliases[$lower]) && \strcasecmp($aliases[$lower], $name) !== 0 || isset($used[$lower]));
        } else {
            $lower = \strtolower($alias);
            if (isset($aliases[$lower]) && \strcasecmp($aliases[$lower], $name) !== 0) {
                throw new InvalidStateException("Alias '{$alias}' used already for '{$aliases[$lower]}', cannot use for '{$name}'.");
            } elseif (isset($used[$lower])) {
                throw new Nette\InvalidStateException("Name '{$alias}' used already for '{$this->name}\\{$used[$lower]->getName()}'.");
            }
        }
        $this->aliases[$of][$alias] = $name;
        return $this;
    }
    /** @return static */
    public function addUseFunction(string $name, string $alias = null) : self
    {
        return $this->addUse($name, $alias, self::NAME_FUNCTION);
    }
    /** @return static */
    public function addUseConstant(string $name, string $alias = null) : self
    {
        return $this->addUse($name, $alias, self::NAME_CONSTANT);
    }
    /** @return string[] */
    public function getUses(string $of = self::NAME_NORMAL) : array
    {
        \asort($this->aliases[$of]);
        return \array_filter($this->aliases[$of], function ($name, $alias) {
            return \strcasecmp(($this->name ? $this->name . '\\' : '') . $alias, $name);
        }, \ARRAY_FILTER_USE_BOTH);
    }
    /** @deprecated  use simplifyName() */
    public function unresolveName(string $name) : string
    {
        return $this->simplifyName($name);
    }
    public function resolveName(string $name, string $of = self::NAME_NORMAL) : string
    {
        if (isset(Helpers::KEYWORDS[\strtolower($name)]) || $name === '') {
            return $name;
        } elseif ($name[0] === '\\') {
            return \substr($name, 1);
        }
        $aliases = \array_change_key_case($this->aliases[$of]);
        if ($of !== self::NAME_NORMAL) {
            return $aliases[\strtolower($name)] ?? $this->resolveName(Helpers::extractNamespace($name) . '\\') . Helpers::extractShortName($name);
        }
        $parts = \explode('\\', $name, 2);
        return ($res = $aliases[\strtolower($parts[0])] ?? null) ? $res . (isset($parts[1]) ? '\\' . $parts[1] : '') : $this->name . ($this->name ? '\\' : '') . $name;
    }
    public function simplifyType(string $type, string $of = self::NAME_NORMAL) : string
    {
        return \preg_replace_callback('~[\\w\\x7f-\\xff\\\\]+~', function ($m) use($of) {
            return $this->simplifyName($m[0], $of);
        }, $type);
    }
    public function simplifyName(string $name, string $of = self::NAME_NORMAL) : string
    {
        if (isset(Helpers::KEYWORDS[\strtolower($name)]) || $name === '') {
            return $name;
        }
        $name = \ltrim($name, '\\');
        if ($of !== self::NAME_NORMAL) {
            foreach ($this->aliases[$of] as $alias => $original) {
                if (\strcasecmp($original, $name) === 0) {
                    return $alias;
                }
            }
            return $this->simplifyName(Helpers::extractNamespace($name) . '\\') . Helpers::extractShortName($name);
        }
        $shortest = null;
        $relative = self::startsWith($name, $this->name . '\\') ? \substr($name, \strlen($this->name) + 1) : null;
        foreach ($this->aliases[$of] as $alias => $original) {
            if ($relative && self::startsWith($relative . '\\', $alias . '\\')) {
                $relative = null;
            }
            if (self::startsWith($name . '\\', $original . '\\')) {
                $short = $alias . \substr($name, \strlen($original));
                if (!isset($shortest) || \strlen($shortest) > \strlen($short)) {
                    $shortest = $short;
                }
            }
        }
        if (isset($shortest, $relative) && \strlen($shortest) < \strlen($relative)) {
            return $shortest;
        }
        return $relative ?? $shortest ?? ($this->name ? '\\' : '') . $name;
    }
    /** @return static */
    public function add(ClassType $class) : self
    {
        $name = $class->getName();
        if ($name === null) {
            throw new Nette\InvalidArgumentException('Class does not have a name.');
        }
        $lower = \strtolower($name);
        if ($orig = \array_change_key_case($this->aliases[self::NAME_NORMAL])[$lower] ?? null) {
            throw new Nette\InvalidStateException("Name '{$name}' used already as alias for {$orig}.");
        }
        $this->classes[$lower] = $class;
        return $this;
    }
    public function addClass(string $name) : ClassType
    {
        $this->add($class = new ClassType($name, $this));
        return $class;
    }
    public function addInterface(string $name) : ClassType
    {
        return $this->addClass($name)->setType(ClassType::TYPE_INTERFACE);
    }
    public function addTrait(string $name) : ClassType
    {
        return $this->addClass($name)->setType(ClassType::TYPE_TRAIT);
    }
    public function addEnum(string $name) : ClassType
    {
        return $this->addClass($name)->setType(ClassType::TYPE_ENUM);
    }
    public function addFunction(string $name) : GlobalFunction
    {
        $lower = \strtolower($name);
        if ($orig = \array_change_key_case($this->aliases[self::NAME_FUNCTION])[$lower] ?? null) {
            throw new Nette\InvalidStateException("Name '{$name}' used already as alias for {$orig}.");
        }
        return $this->functions[$lower] = new GlobalFunction($name);
    }
    /** @return ClassType[] */
    public function getClasses() : array
    {
        $res = [];
        foreach ($this->classes as $class) {
            $res[$class->getName()] = $class;
        }
        return $res;
    }
    /** @return GlobalFunction[] */
    public function getFunctions() : array
    {
        $res = [];
        foreach ($this->functions as $fn) {
            $res[$fn->getName()] = $fn;
        }
        return $res;
    }
    private static function startsWith(string $a, string $b) : bool
    {
        return \strncasecmp($a, $b, \strlen($b)) === 0;
    }
    public function __toString() : string
    {
        try {
            return (new Printer())->printNamespace($this);
        } catch (\Throwable $e) {
            if (\PHP_VERSION_ID >= 70400) {
                throw $e;
            }
            \trigger_error('Exception in ' . __METHOD__ . "(): {$e->getMessage()} in {$e->getFile()}:{$e->getLine()}", \E_USER_ERROR);
            return '';
        }
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\PhpGenerator;

use _PHPStan_dcc7b7cff\Nette;
/**
 * @internal
 */
final class Helpers
{
    use Nette\StaticClass;
    public const PHP_IDENT = '[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*';
    public const KEYWORDS = [
        // built-in types
        'string' => 1,
        'int' => 1,
        'float' => 1,
        'bool' => 1,
        'array' => 1,
        'object' => 1,
        'callable' => 1,
        'iterable' => 1,
        'void' => 1,
        'null' => 1,
        'mixed' => 1,
        'false' => 1,
        'never' => 1,
        // class keywords
        'self' => 1,
        'parent' => 1,
        'static' => 1,
        // PHP keywords
        'include' => 1,
        'include_once' => 1,
        'eval' => 1,
        'require' => 1,
        'require_once' => 1,
        'or' => 1,
        'xor' => 1,
        'and' => 1,
        'instanceof' => 1,
        'new' => 1,
        'clone' => 1,
        'exit' => 1,
        'if' => 1,
        'elseif' => 1,
        'else' => 1,
        'endif' => 1,
        'echo' => 1,
        'do' => 1,
        'while' => 1,
        'endwhile' => 1,
        'for' => 1,
        'endfor' => 1,
        'foreach' => 1,
        'endforeach' => 1,
        'declare' => 1,
        'enddeclare' => 1,
        'as' => 1,
        'try' => 1,
        'catch' => 1,
        'finally' => 1,
        'throw' => 1,
        'use' => 1,
        'insteadof' => 1,
        'global' => 1,
        'var' => 1,
        'unset' => 1,
        'isset' => 1,
        'empty' => 1,
        'continue' => 1,
        'goto' => 1,
        'function' => 1,
        'const' => 1,
        'return' => 1,
        'print' => 1,
        'yield' => 1,
        'list' => 1,
        'switch' => 1,
        'endswitch' => 1,
        'case' => 1,
        'default' => 1,
        'break' => 1,
        'array' => 1,
        'callable' => 1,
        'extends' => 1,
        'implements' => 1,
        'namespace' => 1,
        'trait' => 1,
        'interface' => 1,
        'class' => 1,
        '__CLASS__' => 1,
        '__TRAIT__' => 1,
        '__FUNCTION__' => 1,
        '__METHOD__' => 1,
        '__LINE__' => 1,
        '__FILE__' => 1,
        '__DIR__' => 1,
        '__NAMESPACE__' => 1,
        'fn' => 1,
        'match' => 1,
        'enum' => 1,
        'static' => 1,
        'abstract' => 1,
        'final' => 1,
        'private' => 1,
        'protected' => 1,
        'public' => 1,
        'readonly' => 1,
        // additional reserved class names
        'true' => 1,
    ];
    /** @deprecated  use (new Nette\PhpGenerator\Dumper)->dump() */
    public static function dump($var) : string
    {
        return (new Dumper())->dump($var);
    }
    /** @deprecated  use (new Nette\PhpGenerator\Dumper)->format() */
    public static function format(string $statement, ...$args) : string
    {
        return (new Dumper())->format($statement, ...$args);
    }
    /** @deprecated  use (new Nette\PhpGenerator\Dumper)->format() */
    public static function formatArgs(string $statement, array $args) : string
    {
        return (new Dumper())->format($statement, ...$args);
    }
    public static function formatDocComment(string $content) : string
    {
        $s = \trim($content);
        $s = \str_replace('*/', '* /', $s);
        if ($s === '') {
            return '';
        } elseif (\strpos($content, "\n") === \false) {
            return "/** {$s} */\n";
        } else {
            return \str_replace("\n", "\n * ", "/**\n{$s}") . "\n */\n";
        }
    }
    public static function tagName(string $name, string $of = PhpNamespace::NAME_NORMAL) : string
    {
        return isset(self::KEYWORDS[\strtolower($name)]) ? $name : "/*({$of}*/{$name}";
    }
    public static function simplifyTaggedNames(string $code, ?PhpNamespace $namespace) : string
    {
        return \preg_replace_callback('~/\\*\\(([ncf])\\*/([\\w\\x7f-\\xff\\\\]++)~', function ($m) use($namespace) {
            [, $of, $name] = $m;
            return $namespace ? $namespace->simplifyType($name, $of) : $name;
        }, $code);
    }
    public static function unformatDocComment(string $comment) : string
    {
        return \preg_replace('#^\\s*\\* ?#m', '', \trim(\trim(\trim($comment), '/*')));
    }
    public static function unindent(string $s, int $level = 1) : string
    {
        return $level ? \preg_replace('#^(\\t| {4}){1,' . $level . '}#m', '', $s) : $s;
    }
    public static function isIdentifier($value) : bool
    {
        return \is_string($value) && \preg_match('#^' . self::PHP_IDENT . '$#D', $value);
    }
    public static function isNamespaceIdentifier($value, bool $allowLeadingSlash = \false) : bool
    {
        $re = '#^' . ($allowLeadingSlash ? '\\\\?' : '') . self::PHP_IDENT . '(\\\\' . self::PHP_IDENT . ')*$#D';
        return \is_string($value) && \preg_match($re, $value);
    }
    public static function extractNamespace(string $name) : string
    {
        return ($pos = \strrpos($name, '\\')) ? \substr($name, 0, $pos) : '';
    }
    public static function extractShortName(string $name) : string
    {
        return ($pos = \strrpos($name, '\\')) === \false ? $name : \substr($name, $pos + 1);
    }
    public static function tabsToSpaces(string $s, int $count = 4) : string
    {
        return \str_replace("\t", \str_repeat(' ', $count), $s);
    }
    /** @internal */
    public static function createObject(string $class, array $props) : object
    {
        return Dumper::createObject($class, $props);
    }
    public static function validateType(?string $type, bool &$nullable) : ?string
    {
        if ($type === '' || $type === null) {
            return null;
        }
        if (!\preg_match('#(?:
			\\?[\\w\\\\]+|
			[\\w\\\\]+ (?: (&[\\w\\\\]+)* | (\\|[\\w\\\\]+)* )
		)()$#xAD', $type)) {
            throw new Nette\InvalidArgumentException("Value '{$type}' is not valid type.");
        }
        if ($type[0] === '?') {
            $nullable = \true;
            return \substr($type, 1);
        }
        return $type;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\PhpGenerator;

use _PHPStan_dcc7b7cff\Nette;
/**
 * PHP Attribute.
 */
final class Attribute
{
    use Nette\SmartObject;
    /** @var string */
    private $name;
    /** @var array */
    private $args;
    public function __construct(string $name, array $args)
    {
        if (!Helpers::isNamespaceIdentifier($name)) {
            throw new Nette\InvalidArgumentException("Value '{$name}' is not valid attribute name.");
        }
        $this->name = $name;
        $this->args = $args;
    }
    public function getName() : string
    {
        return $this->name;
    }
    public function getArguments() : array
    {
        return $this->args;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\PhpGenerator;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Class/Interface/Trait/Enum description.
 *
 * @property Method[] $methods
 * @property Property[] $properties
 */
final class ClassType
{
    use Nette\SmartObject;
    use Traits\CommentAware;
    use Traits\AttributeAware;
    public const TYPE_CLASS = 'class', TYPE_INTERFACE = 'interface', TYPE_TRAIT = 'trait', TYPE_ENUM = 'enum';
    public const VISIBILITY_PUBLIC = 'public', VISIBILITY_PROTECTED = 'protected', VISIBILITY_PRIVATE = 'private';
    /** @var PhpNamespace|null */
    private $namespace;
    /** @var string|null */
    private $name;
    /** @var string  class|interface|trait */
    private $type = self::TYPE_CLASS;
    /** @var bool */
    private $final = \false;
    /** @var bool */
    private $abstract = \false;
    /** @var string|string[] */
    private $extends = [];
    /** @var string[] */
    private $implements = [];
    /** @var TraitUse[] */
    private $traits = [];
    /** @var Constant[] name => Constant */
    private $consts = [];
    /** @var Property[] name => Property */
    private $properties = [];
    /** @var Method[] name => Method */
    private $methods = [];
    /** @var EnumCase[] name => EnumCase */
    private $cases = [];
    public static function class(?string $name) : self
    {
        return new self($name);
    }
    public static function interface(string $name) : self
    {
        return (new self($name))->setType(self::TYPE_INTERFACE);
    }
    public static function trait(string $name) : self
    {
        return (new self($name))->setType(self::TYPE_TRAIT);
    }
    public static function enum(string $name) : self
    {
        return (new self($name))->setType(self::TYPE_ENUM);
    }
    /**
     * @param  string|object  $class
     */
    public static function from($class, bool $withBodies = \false, bool $materializeTraits = \true) : self
    {
        return (new Factory())->fromClassReflection(new \ReflectionClass($class), $withBodies, $materializeTraits);
    }
    /**
     * @param  string|object  $class
     */
    public static function withBodiesFrom($class) : self
    {
        return (new Factory())->fromClassReflection(new \ReflectionClass($class), \true);
    }
    public static function fromCode(string $code) : self
    {
        return (new Factory())->fromClassCode($code);
    }
    public function __construct(string $name = null, PhpNamespace $namespace = null)
    {
        $this->setName($name);
        $this->namespace = $namespace;
    }
    public function __toString() : string
    {
        try {
            return (new Printer())->printClass($this, $this->namespace);
        } catch (\Throwable $e) {
            if (\PHP_VERSION_ID >= 70400) {
                throw $e;
            }
            \trigger_error('Exception in ' . __METHOD__ . "(): {$e->getMessage()} in {$e->getFile()}:{$e->getLine()}", \E_USER_ERROR);
            return '';
        }
    }
    /** @deprecated  an object can be in multiple namespaces */
    public function getNamespace() : ?PhpNamespace
    {
        return $this->namespace;
    }
    /** @return static */
    public function setName(?string $name) : self
    {
        if ($name !== null && (!Helpers::isIdentifier($name) || isset(Helpers::KEYWORDS[\strtolower($name)]))) {
            throw new Nette\InvalidArgumentException("Value '{$name}' is not valid class name.");
        }
        $this->name = $name;
        return $this;
    }
    public function getName() : ?string
    {
        return $this->name;
    }
    /** @deprecated */
    public function setClass() : self
    {
        $this->type = self::TYPE_CLASS;
        return $this;
    }
    public function isClass() : bool
    {
        return $this->type === self::TYPE_CLASS;
    }
    /** @return static */
    public function setInterface() : self
    {
        $this->type = self::TYPE_INTERFACE;
        return $this;
    }
    public function isInterface() : bool
    {
        return $this->type === self::TYPE_INTERFACE;
    }
    /** @return static */
    public function setTrait() : self
    {
        $this->type = self::TYPE_TRAIT;
        return $this;
    }
    public function isTrait() : bool
    {
        return $this->type === self::TYPE_TRAIT;
    }
    public function isEnum() : bool
    {
        return $this->type === self::TYPE_ENUM;
    }
    /** @return static */
    public function setType(string $type) : self
    {
        if (!\in_array($type, [self::TYPE_CLASS, self::TYPE_INTERFACE, self::TYPE_TRAIT, self::TYPE_ENUM], \true)) {
            throw new Nette\InvalidArgumentException('Argument must be class|interface|trait|enum.');
        }
        $this->type = $type;
        return $this;
    }
    public function getType() : string
    {
        return $this->type;
    }
    /** @return static */
    public function setFinal(bool $state = \true) : self
    {
        $this->final = $state;
        return $this;
    }
    public function isFinal() : bool
    {
        return $this->final;
    }
    /** @return static */
    public function setAbstract(bool $state = \true) : self
    {
        $this->abstract = $state;
        return $this;
    }
    public function isAbstract() : bool
    {
        return $this->abstract;
    }
    /**
     * @param  string|string[]  $names
     * @return static
     */
    public function setExtends($names) : self
    {
        if (!\is_string($names) && !\is_array($names)) {
            throw new Nette\InvalidArgumentException('Argument must be string or string[].');
        }
        $this->validateNames((array) $names);
        $this->extends = $names;
        return $this;
    }
    /** @return string|string[] */
    public function getExtends()
    {
        return $this->extends;
    }
    /** @return static */
    public function addExtend(string $name) : self
    {
        $this->validateNames([$name]);
        $this->extends = (array) $this->extends;
        $this->extends[] = $name;
        return $this;
    }
    /**
     * @param  string[]  $names
     * @return static
     */
    public function setImplements(array $names) : self
    {
        $this->validateNames($names);
        $this->implements = $names;
        return $this;
    }
    /** @return string[] */
    public function getImplements() : array
    {
        return $this->implements;
    }
    /** @return static */
    public function addImplement(string $name) : self
    {
        $this->validateNames([$name]);
        $this->implements[] = $name;
        return $this;
    }
    /** @return static */
    public function removeImplement(string $name) : self
    {
        $this->implements = \array_diff($this->implements, [$name]);
        return $this;
    }
    /**
     * @param  string[]|TraitUse[]  $traits
     * @return static
     */
    public function setTraits(array $traits) : self
    {
        $this->traits = [];
        foreach ($traits as $trait) {
            if (!$trait instanceof TraitUse) {
                $trait = new TraitUse($trait);
            }
            $this->traits[$trait->getName()] = $trait;
        }
        return $this;
    }
    /** @return string[] */
    public function getTraits() : array
    {
        return \array_keys($this->traits);
    }
    /** @internal */
    public function getTraitResolutions() : array
    {
        return $this->traits;
    }
    /**
     * @param  array|bool  $resolutions
     * @return static|TraitUse
     */
    public function addTrait(string $name, $resolutions = [])
    {
        $this->traits[$name] = $trait = new TraitUse($name);
        if ($resolutions === \true) {
            return $trait;
        }
        \array_map(function ($item) use($trait) {
            $trait->addResolution($item);
        }, $resolutions);
        return $this;
    }
    /** @return static */
    public function removeTrait(string $name) : self
    {
        unset($this->traits[$name]);
        return $this;
    }
    /**
     * @param  Method|Property|Constant|EnumCase|TraitUse  $member
     * @return static
     */
    public function addMember($member) : self
    {
        if ($member instanceof Method) {
            if ($this->isInterface()) {
                $member->setBody(null);
            }
            $this->methods[\strtolower($member->getName())] = $member;
        } elseif ($member instanceof Property) {
            $this->properties[$member->getName()] = $member;
        } elseif ($member instanceof Constant) {
            $this->consts[$member->getName()] = $member;
        } elseif ($member instanceof EnumCase) {
            $this->cases[$member->getName()] = $member;
        } elseif ($member instanceof TraitUse) {
            $this->traits[$member->getName()] = $member;
        } else {
            throw new Nette\InvalidArgumentException('Argument must be Method|Property|Constant|EnumCase|TraitUse.');
        }
        return $this;
    }
    /**
     * @param  Constant[]|mixed[]  $consts
     * @return static
     */
    public function setConstants(array $consts) : self
    {
        $this->consts = [];
        foreach ($consts as $k => $const) {
            if (!$const instanceof Constant) {
                $const = (new Constant($k))->setValue($const)->setPublic();
            }
            $this->consts[$const->getName()] = $const;
        }
        return $this;
    }
    /** @return Constant[] */
    public function getConstants() : array
    {
        return $this->consts;
    }
    public function addConstant(string $name, $value) : Constant
    {
        return $this->consts[$name] = (new Constant($name))->setValue($value)->setPublic();
    }
    /** @return static */
    public function removeConstant(string $name) : self
    {
        unset($this->consts[$name]);
        return $this;
    }
    /**
     * Sets cases to enum
     * @param  EnumCase[]  $cases
     * @return static
     */
    public function setCases(array $cases) : self
    {
        (function (EnumCase ...$cases) {
        })(...\array_values($cases));
        $this->cases = [];
        foreach ($cases as $case) {
            $this->cases[$case->getName()] = $case;
        }
        return $this;
    }
    /** @return EnumCase[] */
    public function getCases() : array
    {
        return $this->cases;
    }
    /** Adds case to enum */
    public function addCase(string $name, $value = null) : EnumCase
    {
        return $this->cases[$name] = (new EnumCase($name))->setValue($value);
    }
    /** @return static */
    public function removeCase(string $name) : self
    {
        unset($this->cases[$name]);
        return $this;
    }
    /**
     * @param  Property[]  $props
     * @return static
     */
    public function setProperties(array $props) : self
    {
        (function (Property ...$props) {
        })(...\array_values($props));
        $this->properties = [];
        foreach ($props as $v) {
            $this->properties[$v->getName()] = $v;
        }
        return $this;
    }
    /** @return Property[] */
    public function getProperties() : array
    {
        return $this->properties;
    }
    public function getProperty(string $name) : Property
    {
        if (!isset($this->properties[$name])) {
            throw new Nette\InvalidArgumentException("Property '{$name}' not found.");
        }
        return $this->properties[$name];
    }
    /**
     * @param  string  $name  without $
     */
    public function addProperty(string $name, $value = null) : Property
    {
        return $this->properties[$name] = \func_num_args() > 1 ? (new Property($name))->setValue($value) : new Property($name);
    }
    /**
     * @param  string  $name without $
     * @return static
     */
    public function removeProperty(string $name) : self
    {
        unset($this->properties[$name]);
        return $this;
    }
    public function hasProperty(string $name) : bool
    {
        return isset($this->properties[$name]);
    }
    /**
     * @param  Method[]  $methods
     * @return static
     */
    public function setMethods(array $methods) : self
    {
        (function (Method ...$methods) {
        })(...\array_values($methods));
        $this->methods = [];
        foreach ($methods as $m) {
            $this->methods[\strtolower($m->getName())] = $m;
        }
        return $this;
    }
    /** @return Method[] */
    public function getMethods() : array
    {
        $res = [];
        foreach ($this->methods as $m) {
            $res[$m->getName()] = $m;
        }
        return $res;
    }
    public function getMethod(string $name) : Method
    {
        $m = $this->methods[\strtolower($name)] ?? null;
        if (!$m) {
            throw new Nette\InvalidArgumentException("Method '{$name}' not found.");
        }
        return $m;
    }
    public function addMethod(string $name) : Method
    {
        $method = new Method($name);
        if ($this->isInterface()) {
            $method->setBody(null);
        } else {
            $method->setPublic();
        }
        return $this->methods[\strtolower($name)] = $method;
    }
    /** @return static */
    public function removeMethod(string $name) : self
    {
        unset($this->methods[\strtolower($name)]);
        return $this;
    }
    public function hasMethod(string $name) : bool
    {
        return isset($this->methods[\strtolower($name)]);
    }
    /** @throws Nette\InvalidStateException */
    public function validate() : void
    {
        if ($this->isEnum() && ($this->abstract || $this->final || $this->extends || $this->properties)) {
            throw new Nette\InvalidStateException("Enum '{$this->name}' cannot be abstract or final or extends class or have properties.");
        } elseif (!$this->name && ($this->abstract || $this->final)) {
            throw new Nette\InvalidStateException('Anonymous class cannot be abstract or final.');
        } elseif ($this->abstract && $this->final) {
            throw new Nette\InvalidStateException("Class '{$this->name}' cannot be abstract and final at the same time.");
        }
    }
    private function validateNames(array $names) : void
    {
        foreach ($names as $name) {
            if (!Helpers::isNamespaceIdentifier($name, \true)) {
                throw new Nette\InvalidArgumentException("Value '{$name}' is not valid class name.");
            }
        }
    }
    public function __clone()
    {
        $clone = function ($item) {
            return clone $item;
        };
        $this->cases = \array_map($clone, $this->cases);
        $this->consts = \array_map($clone, $this->consts);
        $this->properties = \array_map($clone, $this->properties);
        $this->methods = \array_map($clone, $this->methods);
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\PhpGenerator\Traits;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\PhpGenerator\Dumper;
use _PHPStan_dcc7b7cff\Nette\PhpGenerator\Parameter;
use _PHPStan_dcc7b7cff\Nette\Utils\Type;
/**
 * @internal
 */
trait FunctionLike
{
    /** @var string */
    private $body = '';
    /** @var Parameter[] */
    private $parameters = [];
    /** @var bool */
    private $variadic = \false;
    /** @var string|null */
    private $returnType;
    /** @var bool */
    private $returnReference = \false;
    /** @var bool */
    private $returnNullable = \false;
    /** @return static */
    public function setBody(string $code, array $args = null) : self
    {
        $this->body = $args === null ? $code : (new Dumper())->format($code, ...$args);
        return $this;
    }
    public function getBody() : string
    {
        return $this->body;
    }
    /** @return static */
    public function addBody(string $code, array $args = null) : self
    {
        $this->body .= ($args === null ? $code : (new Dumper())->format($code, ...$args)) . "\n";
        return $this;
    }
    /**
     * @param  Parameter[]  $val
     * @return static
     */
    public function setParameters(array $val) : self
    {
        (function (Parameter ...$val) {
        })(...\array_values($val));
        $this->parameters = [];
        foreach ($val as $v) {
            $this->parameters[$v->getName()] = $v;
        }
        return $this;
    }
    /** @return Parameter[] */
    public function getParameters() : array
    {
        return $this->parameters;
    }
    /**
     * @param  string  $name without $
     */
    public function addParameter(string $name, $defaultValue = null) : Parameter
    {
        $param = new Parameter($name);
        if (\func_num_args() > 1) {
            $param->setDefaultValue($defaultValue);
        }
        return $this->parameters[$name] = $param;
    }
    /**
     * @param  string  $name without $
     * @return static
     */
    public function removeParameter(string $name) : self
    {
        unset($this->parameters[$name]);
        return $this;
    }
    /** @return static */
    public function setVariadic(bool $state = \true) : self
    {
        $this->variadic = $state;
        return $this;
    }
    public function isVariadic() : bool
    {
        return $this->variadic;
    }
    /** @return static */
    public function setReturnType(?string $type) : self
    {
        $this->returnType = Nette\PhpGenerator\Helpers::validateType($type, $this->returnNullable);
        return $this;
    }
    /**
     * @return Type|string|null
     */
    public function getReturnType(bool $asObject = \false)
    {
        return $asObject && $this->returnType ? Type::fromString($this->returnType) : $this->returnType;
    }
    /** @return static */
    public function setReturnReference(bool $state = \true) : self
    {
        $this->returnReference = $state;
        return $this;
    }
    public function getReturnReference() : bool
    {
        return $this->returnReference;
    }
    /** @return static */
    public function setReturnNullable(bool $state = \true) : self
    {
        $this->returnNullable = $state;
        return $this;
    }
    public function isReturnNullable() : bool
    {
        return $this->returnNullable;
    }
    /** @deprecated  use isReturnNullable() */
    public function getReturnNullable() : bool
    {
        return $this->returnNullable;
    }
    /** @deprecated */
    public function setNamespace(Nette\PhpGenerator\PhpNamespace $val = null) : self
    {
        \trigger_error(__METHOD__ . '() is deprecated', \E_USER_DEPRECATED);
        return $this;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\PhpGenerator\Traits;

/**
 * @internal
 */
trait CommentAware
{
    /** @var string|null */
    private $comment;
    /** @return static */
    public function setComment(?string $val) : self
    {
        $this->comment = $val;
        return $this;
    }
    public function getComment() : ?string
    {
        return $this->comment;
    }
    /** @return static */
    public function addComment(string $val) : self
    {
        $this->comment .= $this->comment ? "\n{$val}" : $val;
        return $this;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\PhpGenerator\Traits;

use _PHPStan_dcc7b7cff\Nette;
/**
 * @internal
 */
trait NameAware
{
    /** @var string */
    private $name;
    public function __construct(string $name)
    {
        if (!Nette\PhpGenerator\Helpers::isIdentifier($name)) {
            throw new Nette\InvalidArgumentException("Value '{$name}' is not valid name.");
        }
        $this->name = $name;
    }
    public function getName() : string
    {
        return $this->name;
    }
    /**
     * Returns clone with a different name.
     * @return static
     */
    public function cloneWithName(string $name) : self
    {
        $dolly = clone $this;
        $dolly->__construct($name);
        return $dolly;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\PhpGenerator\Traits;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\PhpGenerator\ClassType;
/**
 * @internal
 */
trait VisibilityAware
{
    /** @var string|null  public|protected|private */
    private $visibility;
    /**
     * @param  string|null  $val  public|protected|private
     * @return static
     */
    public function setVisibility(?string $val) : self
    {
        if (!\in_array($val, [ClassType::VISIBILITY_PUBLIC, ClassType::VISIBILITY_PROTECTED, ClassType::VISIBILITY_PRIVATE, null], \true)) {
            throw new Nette\InvalidArgumentException('Argument must be public|protected|private.');
        }
        $this->visibility = $val;
        return $this;
    }
    public function getVisibility() : ?string
    {
        return $this->visibility;
    }
    /** @return static */
    public function setPublic() : self
    {
        $this->visibility = ClassType::VISIBILITY_PUBLIC;
        return $this;
    }
    public function isPublic() : bool
    {
        return $this->visibility === ClassType::VISIBILITY_PUBLIC || $this->visibility === null;
    }
    /** @return static */
    public function setProtected() : self
    {
        $this->visibility = ClassType::VISIBILITY_PROTECTED;
        return $this;
    }
    public function isProtected() : bool
    {
        return $this->visibility === ClassType::VISIBILITY_PROTECTED;
    }
    /** @return static */
    public function setPrivate() : self
    {
        $this->visibility = ClassType::VISIBILITY_PRIVATE;
        return $this;
    }
    public function isPrivate() : bool
    {
        return $this->visibility === ClassType::VISIBILITY_PRIVATE;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\PhpGenerator\Traits;

use _PHPStan_dcc7b7cff\Nette\PhpGenerator\Attribute;
/**
 * @internal
 */
trait AttributeAware
{
    /** @var Attribute[] */
    private $attributes = [];
    /** @return static */
    public function addAttribute(string $name, array $args = []) : self
    {
        $this->attributes[] = new Attribute($name, $args);
        return $this;
    }
    /**
     * @param  Attribute[]  $attrs
     * @return static
     */
    public function setAttributes(array $attrs) : self
    {
        (function (Attribute ...$attrs) {
        })(...$attrs);
        $this->attributes = $attrs;
        return $this;
    }
    /** @return Attribute[] */
    public function getAttributes() : array
    {
        return $this->attributes;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\PhpGenerator;

/**
 * PHP literal value.
 */
class Literal
{
    /** @var string */
    private $value;
    /** @var ?array */
    private $args;
    public function __construct(string $value, array $args = null)
    {
        $this->value = $value;
        $this->args = $args;
    }
    public function __toString() : string
    {
        return $this->formatWith(new Dumper());
    }
    /** @internal */
    public function formatWith(Dumper $dumper) : string
    {
        return $this->args === null ? $this->value : $dumper->format($this->value, ...$this->args);
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\PhpGenerator;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Closure.
 *
 * @property string $body
 */
final class Closure
{
    use Nette\SmartObject;
    use Traits\FunctionLike;
    use Traits\AttributeAware;
    /** @var Parameter[] */
    private $uses = [];
    public static function from(\Closure $closure) : self
    {
        return (new Factory())->fromFunctionReflection(new \ReflectionFunction($closure));
    }
    public function __toString() : string
    {
        try {
            return (new Printer())->printClosure($this);
        } catch (\Throwable $e) {
            if (\PHP_VERSION_ID >= 70400) {
                throw $e;
            }
            \trigger_error('Exception in ' . __METHOD__ . "(): {$e->getMessage()} in {$e->getFile()}:{$e->getLine()}", \E_USER_ERROR);
            return '';
        }
    }
    /**
     * @param  Parameter[]  $uses
     * @return static
     */
    public function setUses(array $uses) : self
    {
        (function (Parameter ...$uses) {
        })(...$uses);
        $this->uses = $uses;
        return $this;
    }
    public function getUses() : array
    {
        return $this->uses;
    }
    public function addUse(string $name) : Parameter
    {
        return $this->uses[] = new Parameter($name);
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\PhpGenerator;

use _PHPStan_dcc7b7cff\Nette;
/**
 * use Trait
 */
final class TraitUse
{
    use Nette\SmartObject;
    use Traits\NameAware;
    use Traits\CommentAware;
    /** @var array */
    private $resolutions = [];
    public function __construct(string $name)
    {
        if (!Nette\PhpGenerator\Helpers::isNamespaceIdentifier($name, \true)) {
            throw new Nette\InvalidArgumentException("Value '{$name}' is not valid trait name.");
        }
        $this->name = $name;
    }
    public function addResolution(string $resolution) : self
    {
        $this->resolutions[] = $resolution;
        return $this;
    }
    public function getResolutions() : array
    {
        return $this->resolutions;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\PhpGenerator;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Enum case.
 */
final class EnumCase
{
    use Nette\SmartObject;
    use Traits\NameAware;
    use Traits\CommentAware;
    use Traits\AttributeAware;
    /** @var string|int|null */
    private $value;
    /** @return static */
    public function setValue($val) : self
    {
        $this->value = $val;
        return $this;
    }
    public function getValue()
    {
        return $this->value;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\PhpGenerator;

use _PHPStan_dcc7b7cff\Nette;
/**
 * PHP code generator utils.
 */
final class Dumper
{
    private const INDENT_LENGTH = 4;
    /** @var int */
    public $maxDepth = 50;
    /** @var int */
    public $wrapLength = 120;
    /** @var string */
    public $indentation = "\t";
    /**
     * Returns a PHP representation of a variable.
     */
    public function dump($var, int $column = 0) : string
    {
        return $this->dumpVar($var, [], 0, $column);
    }
    private function dumpVar(&$var, array $parents = [], int $level = 0, int $column = 0) : string
    {
        if ($var === null) {
            return 'null';
        } elseif (\is_string($var)) {
            return $this->dumpString($var);
        } elseif (\is_array($var)) {
            return $this->dumpArray($var, $parents, $level, $column);
        } elseif ($var instanceof Literal) {
            return $this->dumpLiteral($var, $level);
        } elseif (\is_object($var)) {
            return $this->dumpObject($var, $parents, $level);
        } elseif (\is_resource($var)) {
            throw new Nette\InvalidArgumentException('Cannot dump resource.');
        } else {
            return \var_export($var, \true);
        }
    }
    private function dumpString(string $s) : string
    {
        static $special = ["\r" => '\\r', "\n" => '\\n', "\t" => '\\t', "\x1b" => '\\e', '\\' => '\\\\'];
        $utf8 = \preg_match('##u', $s);
        $escaped = \preg_replace_callback($utf8 ? '#[\\p{C}\\\\]#u' : '#[\\x00-\\x1F\\x7F-\\xFF\\\\]#', function ($m) use($special) {
            return $special[$m[0]] ?? (\strlen($m[0]) === 1 ? '\\x' . \str_pad(\strtoupper(\dechex(\ord($m[0]))), 2, '0', \STR_PAD_LEFT) . '' : '\\u{' . \strtoupper(\ltrim(\dechex(self::utf8Ord($m[0])), '0')) . '}');
        }, $s);
        return $s === \str_replace('\\\\', '\\', $escaped) ? "'" . \preg_replace('#\'|\\\\(?=[\'\\\\]|$)#D', '\\\\$0', $s) . "'" : '"' . \addcslashes($escaped, '"$') . '"';
    }
    private static function utf8Ord(string $c) : int
    {
        $ord0 = \ord($c[0]);
        if ($ord0 < 0x80) {
            return $ord0;
        } elseif ($ord0 < 0xe0) {
            return ($ord0 << 6) + \ord($c[1]) - 0x3080;
        } elseif ($ord0 < 0xf0) {
            return ($ord0 << 12) + (\ord($c[1]) << 6) + \ord($c[2]) - 0xe2080;
        } else {
            return ($ord0 << 18) + (\ord($c[1]) << 12) + (\ord($c[2]) << 6) + \ord($c[3]) - 0x3c82080;
        }
    }
    private function dumpArray(array &$var, array $parents, int $level, int $column) : string
    {
        if (empty($var)) {
            return '[]';
        } elseif ($level > $this->maxDepth || \in_array($var, $parents ?? [], \true)) {
            throw new Nette\InvalidArgumentException('Nesting level too deep or recursive dependency.');
        }
        $space = \str_repeat($this->indentation, $level);
        $outInline = '';
        $outWrapped = "\n{$space}";
        $parents[] = $var;
        $counter = 0;
        $hideKeys = \is_int(($tmp = \array_keys($var))[0]) && $tmp === \range($tmp[0], $tmp[0] + \count($var) - 1);
        foreach ($var as $k => &$v) {
            $keyPart = $hideKeys && $k === $counter ? '' : $this->dumpVar($k) . ' => ';
            $counter = \is_int($k) ? \max($k + 1, $counter) : $counter;
            $outInline .= ($outInline === '' ? '' : ', ') . $keyPart;
            $outInline .= $this->dumpVar($v, $parents, 0, $column + \strlen($outInline));
            $outWrapped .= $this->indentation . $keyPart . $this->dumpVar($v, $parents, $level + 1, \strlen($keyPart)) . ",\n{$space}";
        }
        \array_pop($parents);
        $wrap = \strpos($outInline, "\n") !== \false || $level * self::INDENT_LENGTH + $column + \strlen($outInline) + 3 > $this->wrapLength;
        // 3 = [],
        return '[' . ($wrap ? $outWrapped : $outInline) . ']';
    }
    private function dumpObject($var, array $parents, int $level) : string
    {
        if ($var instanceof \Serializable) {
            return 'unserialize(' . $this->dumpString(\serialize($var)) . ')';
        } elseif ($var instanceof \UnitEnum) {
            return '\\' . \get_class($var) . '::' . $var->name;
        } elseif ($var instanceof \Closure) {
            $inner = Nette\Utils\Callback::unwrap($var);
            if (Nette\Utils\Callback::isStatic($inner)) {
                return \PHP_VERSION_ID < 80100 ? '\\Closure::fromCallable(' . $this->dump($inner) . ')' : \implode('::', (array) $inner) . '(...)';
            }
            throw new Nette\InvalidArgumentException('Cannot dump closure.');
        }
        $class = \get_class($var);
        if ((new \ReflectionObject($var))->isAnonymous()) {
            throw new Nette\InvalidArgumentException('Cannot dump anonymous class.');
        } elseif (\in_array($class, [\DateTime::class, \DateTimeImmutable::class], \true)) {
            return $this->format("new \\{$class}(?, new \\DateTimeZone(?))", $var->format('Y-m-d H:i:s.u'), $var->getTimeZone()->getName());
        }
        $arr = (array) $var;
        $space = \str_repeat($this->indentation, $level);
        if ($level > $this->maxDepth || \in_array($var, $parents ?? [], \true)) {
            throw new Nette\InvalidArgumentException('Nesting level too deep or recursive dependency.');
        }
        $out = "\n";
        $parents[] = $var;
        if (\method_exists($var, '__sleep')) {
            foreach ($var->__sleep() as $v) {
                $props[$v] = $props["\x00*\x00{$v}"] = $props["\x00{$class}\x00{$v}"] = \true;
            }
        }
        foreach ($arr as $k => &$v) {
            if (!isset($props) || isset($props[$k])) {
                $out .= $space . $this->indentation . ($keyPart = $this->dumpVar($k) . ' => ') . $this->dumpVar($v, $parents, $level + 1, \strlen($keyPart)) . ",\n";
            }
        }
        \array_pop($parents);
        $out .= $space;
        return $class === \stdClass::class ? "(object) [{$out}]" : '\\' . self::class . "::createObject('{$class}', [{$out}])";
    }
    private function dumpLiteral(Literal $var, int $level) : string
    {
        $s = $var->formatWith($this);
        $s = Nette\Utils\Strings::indent(\trim($s), $level, $this->indentation);
        return \ltrim($s, $this->indentation);
    }
    /**
     * Generates PHP statement. Supports placeholders: ?  \?  $?  ->?  ::?  ...?  ...?:  ?*
     */
    public function format(string $statement, ...$args) : string
    {
        $tokens = \preg_split('#(\\.\\.\\.\\?:?|\\$\\?|->\\?|::\\?|\\\\\\?|\\?\\*|\\?(?!\\w))#', $statement, -1, \PREG_SPLIT_DELIM_CAPTURE);
        $res = '';
        foreach ($tokens as $n => $token) {
            if ($n % 2 === 0) {
                $res .= $token;
            } elseif ($token === '\\?') {
                $res .= '?';
            } elseif (!$args) {
                throw new Nette\InvalidArgumentException('Insufficient number of arguments.');
            } elseif ($token === '?') {
                $res .= $this->dump(\array_shift($args), \strlen($res) - \strrpos($res, "\n"));
            } elseif ($token === '...?' || $token === '...?:' || $token === '?*') {
                $arg = \array_shift($args);
                if (!\is_array($arg)) {
                    throw new Nette\InvalidArgumentException('Argument must be an array.');
                }
                $res .= $this->dumpArguments($arg, \strlen($res) - \strrpos($res, "\n"), $token === '...?:');
            } else {
                // $  ->  ::
                $arg = \array_shift($args);
                if ($arg instanceof Literal || !Helpers::isIdentifier($arg)) {
                    $arg = '{' . $this->dumpVar($arg) . '}';
                }
                $res .= \substr($token, 0, -1) . $arg;
            }
        }
        if ($args) {
            throw new Nette\InvalidArgumentException('Insufficient number of placeholders.');
        }
        return $res;
    }
    private function dumpArguments(array &$var, int $column, bool $named) : string
    {
        $outInline = $outWrapped = '';
        foreach ($var as $k => &$v) {
            $k = !$named || \is_int($k) ? '' : $k . ': ';
            $outInline .= $outInline === '' ? '' : ', ';
            $outInline .= $k . $this->dumpVar($v, [$var], 0, $column + \strlen($outInline));
            $outWrapped .= ($outWrapped === '' ? '' : ',') . "\n" . $this->indentation . $k . $this->dumpVar($v, [$var], 1);
        }
        return \count($var) > 1 && (\strpos($outInline, "\n") !== \false || $column + \strlen($outInline) > $this->wrapLength) ? $outWrapped . "\n" : $outInline;
    }
    /**
     * @internal
     */
    public static function createObject(string $class, array $props) : object
    {
        return \unserialize('O' . \substr(\serialize($class), 1, -1) . \substr(\serialize($props), 1));
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\PhpGenerator;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\Utils\Type;
/**
 * Class property description.
 *
 * @property mixed $value
 */
final class Property
{
    use Nette\SmartObject;
    use Traits\NameAware;
    use Traits\VisibilityAware;
    use Traits\CommentAware;
    use Traits\AttributeAware;
    /** @var mixed */
    private $value;
    /** @var bool */
    private $static = \false;
    /** @var string|null */
    private $type;
    /** @var bool */
    private $nullable = \false;
    /** @var bool */
    private $initialized = \false;
    /** @var bool */
    private $readOnly = \false;
    /** @return static */
    public function setValue($val) : self
    {
        $this->value = $val;
        $this->initialized = \true;
        return $this;
    }
    public function &getValue()
    {
        return $this->value;
    }
    /** @return static */
    public function setStatic(bool $state = \true) : self
    {
        $this->static = $state;
        return $this;
    }
    public function isStatic() : bool
    {
        return $this->static;
    }
    /** @return static */
    public function setType(?string $type) : self
    {
        $this->type = Helpers::validateType($type, $this->nullable);
        return $this;
    }
    /**
     * @return Type|string|null
     */
    public function getType(bool $asObject = \false)
    {
        return $asObject && $this->type ? Type::fromString($this->type) : $this->type;
    }
    /** @return static */
    public function setNullable(bool $state = \true) : self
    {
        $this->nullable = $state;
        return $this;
    }
    public function isNullable() : bool
    {
        return $this->nullable;
    }
    /** @return static */
    public function setInitialized(bool $state = \true) : self
    {
        $this->initialized = $state;
        return $this;
    }
    public function isInitialized() : bool
    {
        return $this->initialized || $this->value !== null;
    }
    /** @return static */
    public function setReadOnly(bool $state = \true) : self
    {
        $this->readOnly = $state;
        return $this;
    }
    public function isReadOnly() : bool
    {
        return $this->readOnly;
    }
    /** @throws Nette\InvalidStateException */
    public function validate() : void
    {
        if ($this->readOnly && !$this->type) {
            throw new Nette\InvalidStateException("Property \${$this->name}: Read-only properties are only supported on typed property.");
        }
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\PhpGenerator;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\PhpParser;
use PhpParser\Node;
use PhpParser\NodeFinder;
use PhpParser\ParserFactory;
/**
 * Extracts information from PHP code.
 * @internal
 */
final class Extractor
{
    use Nette\SmartObject;
    private $code;
    private $statements;
    private $printer;
    public function __construct(string $code)
    {
        if (!\class_exists(ParserFactory::class)) {
            throw new Nette\NotSupportedException("PHP-Parser is required to load method bodies, install package 'nikic/php-parser' 4.7 or newer.");
        }
        $this->printer = new PhpParser\PrettyPrinter\Standard();
        $this->parseCode($code);
    }
    private function parseCode(string $code) : void
    {
        if (\substr($code, 0, 5) !== '<?php') {
            throw new Nette\InvalidStateException('The input string is not a PHP code.');
        }
        $this->code = \str_replace("\r\n", "\n", $code);
        $lexer = new PhpParser\Lexer\Emulative(['usedAttributes' => ['startFilePos', 'endFilePos', 'comments']]);
        $parser = (new ParserFactory())->create(ParserFactory::ONLY_PHP7, $lexer);
        $stmts = $parser->parse($this->code);
        $traverser = new PhpParser\NodeTraverser();
        $traverser->addVisitor(new PhpParser\NodeVisitor\ParentConnectingVisitor());
        $traverser->addVisitor(new PhpParser\NodeVisitor\NameResolver(null, ['preserveOriginalNames' => \true]));
        $this->statements = $traverser->traverse($stmts);
    }
    public function extractMethodBodies(string $className) : array
    {
        $nodeFinder = new NodeFinder();
        $classNode = $nodeFinder->findFirst($this->statements, function (Node $node) use($className) {
            return ($node instanceof Node\Stmt\Class_ || $node instanceof Node\Stmt\Trait_) && $node->namespacedName->toString() === $className;
        });
        $res = [];
        foreach ($nodeFinder->findInstanceOf($classNode, Node\Stmt\ClassMethod::class) as $methodNode) {
            /** @var Node\Stmt\ClassMethod $methodNode */
            if ($methodNode->stmts) {
                $res[$methodNode->name->toString()] = $this->getReformattedContents($methodNode->stmts, 2);
            }
        }
        return $res;
    }
    public function extractFunctionBody(string $name) : ?string
    {
        /** @var Node\Stmt\Function_ $functionNode */
        $functionNode = (new NodeFinder())->findFirst($this->statements, function (Node $node) use($name) {
            return $node instanceof Node\Stmt\Function_ && $node->namespacedName->toString() === $name;
        });
        return $this->getReformattedContents($functionNode->stmts, 1);
    }
    /** @param  Node[]  $statements */
    private function getReformattedContents(array $statements, int $level) : string
    {
        $body = $this->getNodeContents(...$statements);
        $body = $this->performReplacements($body, $this->prepareReplacements($statements));
        return Helpers::unindent($body, $level);
    }
    private function prepareReplacements(array $statements) : array
    {
        $start = $statements[0]->getStartFilePos();
        $replacements = [];
        (new NodeFinder())->find($statements, function (Node $node) use(&$replacements, $start) {
            if ($node instanceof Node\Name\FullyQualified) {
                if ($node->getAttribute('originalName') instanceof Node\Name) {
                    $of = $node->getAttribute('parent') instanceof Node\Expr\ConstFetch ? PhpNamespace::NAME_CONSTANT : ($node->getAttribute('parent') instanceof Node\Expr\FuncCall ? PhpNamespace::NAME_FUNCTION : PhpNamespace::NAME_NORMAL);
                    $replacements[] = [$node->getStartFilePos() - $start, $node->getEndFilePos() - $start, Helpers::tagName($node->toCodeString(), $of)];
                }
            } elseif ($node instanceof Node\Scalar\String_ || $node instanceof Node\Scalar\EncapsedStringPart) {
                // multi-line strings => singleline
                $token = $this->getNodeContents($node);
                if (\strpos($token, "\n") !== \false) {
                    $quote = $node instanceof Node\Scalar\String_ ? '"' : '';
                    $replacements[] = [$node->getStartFilePos() - $start, $node->getEndFilePos() - $start, $quote . \addcslashes($node->value, "\x00..\x1f") . $quote];
                }
            } elseif ($node instanceof Node\Scalar\Encapsed) {
                // HEREDOC => "string"
                if ($node->getAttribute('kind') === Node\Scalar\String_::KIND_HEREDOC) {
                    $replacements[] = [$node->getStartFilePos() - $start, $node->parts[0]->getStartFilePos() - $start - 1, '"'];
                    $replacements[] = [\end($node->parts)->getEndFilePos() - $start + 1, $node->getEndFilePos() - $start, '"'];
                }
            }
        });
        return $replacements;
    }
    private function performReplacements(string $s, array $replacements) : string
    {
        \usort($replacements, function ($a, $b) {
            // sort by position in file
            return $b[0] <=> $a[0];
        });
        foreach ($replacements as [$start, $end, $replacement]) {
            $s = \substr_replace($s, $replacement, $start, $end - $start + 1);
        }
        return $s;
    }
    public function extractAll() : PhpFile
    {
        $phpFile = new PhpFile();
        $namespace = '';
        $visitor = new class extends PhpParser\NodeVisitorAbstract
        {
            public function enterNode(Node $node)
            {
                return ($this->callback)($node);
            }
        };
        $visitor->callback = function (Node $node) use(&$class, &$namespace, $phpFile) {
            if ($node instanceof Node\Stmt\DeclareDeclare && $node->key->name === 'strict_types') {
                $phpFile->setStrictTypes((bool) $node->value->value);
            } elseif ($node instanceof Node\Stmt\Namespace_) {
                $namespace = $node->name ? $node->name->toString() : '';
            } elseif ($node instanceof Node\Stmt\Use_) {
                $this->addUseToNamespace($node, $phpFile->addNamespace($namespace));
            } elseif ($node instanceof Node\Stmt\Class_) {
                if (!$node->name) {
                    return PhpParser\NodeTraverser::DONT_TRAVERSE_CHILDREN;
                }
                $class = $this->addClassToFile($phpFile, $node);
            } elseif ($node instanceof Node\Stmt\Interface_) {
                $class = $this->addInterfaceToFile($phpFile, $node);
            } elseif ($node instanceof Node\Stmt\Trait_) {
                $class = $this->addTraitToFile($phpFile, $node);
            } elseif ($node instanceof Node\Stmt\Enum_) {
                $class = $this->addEnumToFile($phpFile, $node);
            } elseif ($node instanceof Node\Stmt\Function_) {
                $this->addFunctionToFile($phpFile, $node);
            } elseif ($node instanceof Node\Stmt\TraitUse) {
                $this->addTraitToClass($class, $node);
            } elseif ($node instanceof Node\Stmt\Property) {
                $this->addPropertyToClass($class, $node);
            } elseif ($node instanceof Node\Stmt\ClassMethod) {
                $this->addMethodToClass($class, $node);
            } elseif ($node instanceof Node\Stmt\ClassConst) {
                $this->addConstantToClass($class, $node);
            } elseif ($node instanceof Node\Stmt\EnumCase) {
                $this->addEnumCaseToClass($class, $node);
            }
            if ($node instanceof Node\FunctionLike) {
                return PhpParser\NodeTraverser::DONT_TRAVERSE_CHILDREN;
            }
        };
        $traverser = new PhpParser\NodeTraverser();
        $traverser->addVisitor($visitor);
        $traverser->traverse($this->statements);
        return $phpFile;
    }
    private function addUseToNamespace(Node\Stmt\Use_ $node, PhpNamespace $namespace) : void
    {
        $of = [$node::TYPE_NORMAL => PhpNamespace::NAME_NORMAL, $node::TYPE_FUNCTION => PhpNamespace::NAME_FUNCTION, $node::TYPE_CONSTANT => PhpNamespace::NAME_CONSTANT][$node->type];
        foreach ($node->uses as $use) {
            $namespace->addUse($use->name->toString(), $use->alias ? $use->alias->toString() : null, $of);
        }
    }
    private function addClassToFile(PhpFile $phpFile, Node\Stmt\Class_ $node) : ClassType
    {
        $class = $phpFile->addClass($node->namespacedName->toString());
        if ($node->extends) {
            $class->setExtends($node->extends->toString());
        }
        foreach ($node->implements as $item) {
            $class->addImplement($item->toString());
        }
        $class->setFinal($node->isFinal());
        $class->setAbstract($node->isAbstract());
        $this->addCommentAndAttributes($class, $node);
        return $class;
    }
    private function addInterfaceToFile(PhpFile $phpFile, Node\Stmt\Interface_ $node) : ClassType
    {
        $class = $phpFile->addInterface($node->namespacedName->toString());
        foreach ($node->extends as $item) {
            $class->addExtend($item->toString());
        }
        $this->addCommentAndAttributes($class, $node);
        return $class;
    }
    private function addTraitToFile(PhpFile $phpFile, Node\Stmt\Trait_ $node) : ClassType
    {
        $class = $phpFile->addTrait($node->namespacedName->toString());
        $this->addCommentAndAttributes($class, $node);
        return $class;
    }
    private function addEnumToFile(PhpFile $phpFile, Node\Stmt\Enum_ $node) : ClassType
    {
        $class = $phpFile->addEnum($node->namespacedName->toString());
        foreach ($node->implements as $item) {
            $class->addImplement($item->toString());
        }
        $this->addCommentAndAttributes($class, $node);
        return $class;
    }
    private function addFunctionToFile(PhpFile $phpFile, Node\Stmt\Function_ $node) : void
    {
        $function = $phpFile->addFunction($node->namespacedName->toString());
        $this->setupFunction($function, $node);
    }
    private function addTraitToClass(ClassType $class, Node\Stmt\TraitUse $node) : void
    {
        foreach ($node->traits as $item) {
            $trait = $class->addTrait($item->toString(), \true);
        }
        foreach ($node->adaptations as $item) {
            $trait->addResolution(\trim($this->toPhp($item), ';'));
        }
        $this->addCommentAndAttributes($trait, $node);
    }
    private function addPropertyToClass(ClassType $class, Node\Stmt\Property $node) : void
    {
        foreach ($node->props as $item) {
            $prop = $class->addProperty($item->name->toString());
            $prop->setStatic($node->isStatic());
            if ($node->isPrivate()) {
                $prop->setPrivate();
            } elseif ($node->isProtected()) {
                $prop->setProtected();
            }
            $prop->setType($node->type ? $this->toPhp($node->type) : null);
            if ($item->default) {
                $prop->setValue(new Literal($this->getReformattedContents([$item->default], 1)));
            }
            $prop->setReadOnly(\method_exists($node, 'isReadonly') && $node->isReadonly());
            $this->addCommentAndAttributes($prop, $node);
        }
    }
    private function addMethodToClass(ClassType $class, Node\Stmt\ClassMethod $node) : void
    {
        $method = $class->addMethod($node->name->toString());
        $method->setAbstract($node->isAbstract());
        $method->setFinal($node->isFinal());
        $method->setStatic($node->isStatic());
        if ($node->isPrivate()) {
            $method->setPrivate();
        } elseif ($node->isProtected()) {
            $method->setProtected();
        }
        $this->setupFunction($method, $node);
    }
    private function addConstantToClass(ClassType $class, Node\Stmt\ClassConst $node) : void
    {
        foreach ($node->consts as $item) {
            $value = $this->getReformattedContents([$item->value], 1);
            $const = $class->addConstant($item->name->toString(), new Literal($value));
            if ($node->isPrivate()) {
                $const->setPrivate();
            } elseif ($node->isProtected()) {
                $const->setProtected();
            }
            $const->setFinal(\method_exists($node, 'isFinal') && $node->isFinal());
            $this->addCommentAndAttributes($const, $node);
        }
    }
    private function addEnumCaseToClass(ClassType $class, Node\Stmt\EnumCase $node)
    {
        $case = $class->addCase($node->name->toString(), $node->expr ? $node->expr->value : null);
        $this->addCommentAndAttributes($case, $node);
    }
    private function addCommentAndAttributes($element, Node $node) : void
    {
        if ($node->getDocComment()) {
            $comment = $node->getDocComment()->getReformattedText();
            $comment = Helpers::unformatDocComment($comment);
            $element->setComment($comment);
        }
        foreach ($node->attrGroups ?? [] as $group) {
            foreach ($group->attrs as $attribute) {
                $args = [];
                foreach ($attribute->args as $arg) {
                    $value = new Literal($this->getReformattedContents([$arg->value], 0));
                    if ($arg->name) {
                        $args[$arg->name->toString()] = $value;
                    } else {
                        $args[] = $value;
                    }
                }
                $element->addAttribute($attribute->name->toString(), $args);
            }
        }
    }
    /**
     * @param  GlobalFunction|Method  $function
     */
    private function setupFunction($function, Node\FunctionLike $node) : void
    {
        $function->setReturnReference($node->returnsByRef());
        $function->setReturnType($node->getReturnType() ? $this->toPhp($node->getReturnType()) : null);
        foreach ($node->params as $item) {
            $param = $function->addParameter($item->var->name);
            $param->setType($item->type ? $this->toPhp($item->type) : null);
            $param->setReference($item->byRef);
            $function->setVariadic($item->variadic);
            if ($item->default) {
                $param->setDefaultValue(new Literal($this->getReformattedContents([$item->default], 2)));
            }
            $this->addCommentAndAttributes($param, $item);
        }
        $this->addCommentAndAttributes($function, $node);
        if ($node->stmts) {
            $function->setBody($this->getReformattedContents($node->stmts, 2));
        }
    }
    private function toPhp($value) : string
    {
        return $this->printer->prettyPrint([$value]);
    }
    private function getNodeContents(Node ...$nodes) : string
    {
        $start = $nodes[0]->getStartFilePos();
        return \substr($this->code, $start, \end($nodes)->getEndFilePos() - $start + 1);
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\PhpGenerator;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\Utils\Type;
/**
 * Function/Method parameter description.
 *
 * @property mixed $defaultValue
 */
class Parameter
{
    use Nette\SmartObject;
    use Traits\NameAware;
    use Traits\AttributeAware;
    /** @var bool */
    private $reference = \false;
    /** @var string|null */
    private $type;
    /** @var bool */
    private $nullable = \false;
    /** @var bool */
    private $hasDefaultValue = \false;
    /** @var mixed */
    private $defaultValue;
    /** @return static */
    public function setReference(bool $state = \true) : self
    {
        $this->reference = $state;
        return $this;
    }
    public function isReference() : bool
    {
        return $this->reference;
    }
    /** @return static */
    public function setType(?string $type) : self
    {
        $this->type = Helpers::validateType($type, $this->nullable);
        return $this;
    }
    /**
     * @return Type|string|null
     */
    public function getType(bool $asObject = \false)
    {
        return $asObject && $this->type ? Type::fromString($this->type) : $this->type;
    }
    /** @deprecated  use setType() */
    public function setTypeHint(?string $type) : self
    {
        return $this->setType($type);
    }
    /** @deprecated  use getType() */
    public function getTypeHint() : ?string
    {
        return $this->getType();
    }
    /**
     * @deprecated  just use setDefaultValue()
     * @return static
     */
    public function setOptional(bool $state = \true) : self
    {
        \trigger_error(__METHOD__ . '() is deprecated, use setDefaultValue()', \E_USER_DEPRECATED);
        $this->hasDefaultValue = $state;
        return $this;
    }
    /** @return static */
    public function setNullable(bool $state = \true) : self
    {
        $this->nullable = $state;
        return $this;
    }
    public function isNullable() : bool
    {
        return $this->nullable;
    }
    /** @return static */
    public function setDefaultValue($val) : self
    {
        $this->defaultValue = $val;
        $this->hasDefaultValue = \true;
        return $this;
    }
    public function getDefaultValue()
    {
        return $this->defaultValue;
    }
    public function hasDefaultValue() : bool
    {
        return $this->hasDefaultValue;
    }
    public function validate() : void
    {
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\PhpGenerator;

class PhpLiteral extends Literal
{
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\PhpGenerator;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Class method.
 *
 * @property string|null $body
 */
final class Method
{
    use Nette\SmartObject;
    use Traits\FunctionLike;
    use Traits\NameAware;
    use Traits\VisibilityAware;
    use Traits\CommentAware;
    use Traits\AttributeAware;
    /** @var string|null */
    private $body = '';
    /** @var bool */
    private $static = \false;
    /** @var bool */
    private $final = \false;
    /** @var bool */
    private $abstract = \false;
    /**
     * @param  string|array  $method
     */
    public static function from($method) : self
    {
        return (new Factory())->fromMethodReflection(Nette\Utils\Callback::toReflection($method));
    }
    public function __toString() : string
    {
        try {
            return (new Printer())->printMethod($this);
        } catch (\Throwable $e) {
            if (\PHP_VERSION_ID >= 70400) {
                throw $e;
            }
            \trigger_error('Exception in ' . __METHOD__ . "(): {$e->getMessage()} in {$e->getFile()}:{$e->getLine()}", \E_USER_ERROR);
            return '';
        }
    }
    /** @return static */
    public function setBody(?string $code, array $args = null) : self
    {
        $this->body = $args === null || $code === null ? $code : (new Dumper())->format($code, ...$args);
        return $this;
    }
    public function getBody() : ?string
    {
        return $this->body;
    }
    /** @return static */
    public function setStatic(bool $state = \true) : self
    {
        $this->static = $state;
        return $this;
    }
    public function isStatic() : bool
    {
        return $this->static;
    }
    /** @return static */
    public function setFinal(bool $state = \true) : self
    {
        $this->final = $state;
        return $this;
    }
    public function isFinal() : bool
    {
        return $this->final;
    }
    /** @return static */
    public function setAbstract(bool $state = \true) : self
    {
        $this->abstract = $state;
        return $this;
    }
    public function isAbstract() : bool
    {
        return $this->abstract;
    }
    /**
     * @param  string  $name without $
     */
    public function addPromotedParameter(string $name, $defaultValue = null) : PromotedParameter
    {
        $param = new PromotedParameter($name);
        if (\func_num_args() > 1) {
            $param->setDefaultValue($defaultValue);
        }
        return $this->parameters[$name] = $param;
    }
    /** @throws Nette\InvalidStateException */
    public function validate() : void
    {
        if ($this->abstract && ($this->final || $this->visibility === ClassType::VISIBILITY_PRIVATE)) {
            throw new Nette\InvalidStateException("Method {$this->name}() cannot be abstract and final or private at the same time.");
        }
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\PhpGenerator;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\Utils\Strings;
/**
 * Generates PHP code.
 */
class Printer
{
    use Nette\SmartObject;
    /** @var int */
    public $wrapLength = 120;
    /** @var string */
    protected $indentation = "\t";
    /** @var int */
    protected $linesBetweenProperties = 0;
    /** @var int */
    protected $linesBetweenMethods = 2;
    /** @var string */
    protected $returnTypeColon = ': ';
    /** @var ?PhpNamespace */
    protected $namespace;
    /** @var ?Dumper */
    protected $dumper;
    /** @var bool */
    private $resolveTypes = \true;
    public function __construct()
    {
        $this->dumper = new Dumper();
    }
    public function printFunction(GlobalFunction $function, PhpNamespace $namespace = null) : string
    {
        $this->namespace = $this->resolveTypes ? $namespace : null;
        $line = 'function ' . ($function->getReturnReference() ? '&' : '') . $function->getName();
        $returnType = $this->printReturnType($function);
        $body = Helpers::simplifyTaggedNames($function->getBody(), $this->namespace);
        return Helpers::formatDocComment($function->getComment() . "\n") . self::printAttributes($function->getAttributes()) . $line . $this->printParameters($function, \strlen($line) + \strlen($returnType) + 2) . $returnType . "\n{\n" . $this->indent(\ltrim(\rtrim($body) . "\n")) . "}\n";
    }
    public function printClosure(Closure $closure, PhpNamespace $namespace = null) : string
    {
        $this->namespace = $this->resolveTypes ? $namespace : null;
        $uses = [];
        foreach ($closure->getUses() as $param) {
            $uses[] = ($param->isReference() ? '&' : '') . '$' . $param->getName();
        }
        $useStr = \strlen($tmp = \implode(', ', $uses)) > $this->wrapLength && \count($uses) > 1 ? "\n" . $this->indentation . \implode(",\n" . $this->indentation, $uses) . "\n" : $tmp;
        $body = Helpers::simplifyTaggedNames($closure->getBody(), $this->namespace);
        return self::printAttributes($closure->getAttributes(), \true) . 'function ' . ($closure->getReturnReference() ? '&' : '') . $this->printParameters($closure) . ($uses ? " use ({$useStr})" : '') . $this->printReturnType($closure) . " {\n" . $this->indent(\ltrim(\rtrim($body) . "\n")) . '}';
    }
    public function printArrowFunction(Closure $closure, PhpNamespace $namespace = null) : string
    {
        $this->namespace = $this->resolveTypes ? $namespace : null;
        foreach ($closure->getUses() as $use) {
            if ($use->isReference()) {
                throw new Nette\InvalidArgumentException('Arrow function cannot bind variables by-reference.');
            }
        }
        $body = Helpers::simplifyTaggedNames($closure->getBody(), $this->namespace);
        return self::printAttributes($closure->getAttributes()) . 'fn' . ($closure->getReturnReference() ? '&' : '') . $this->printParameters($closure) . $this->printReturnType($closure) . ' => ' . \trim($body) . ';';
    }
    public function printMethod(Method $method, PhpNamespace $namespace = null) : string
    {
        $this->namespace = $this->resolveTypes ? $namespace : null;
        $method->validate();
        $line = ($method->isAbstract() ? 'abstract ' : '') . ($method->isFinal() ? 'final ' : '') . ($method->getVisibility() ? $method->getVisibility() . ' ' : '') . ($method->isStatic() ? 'static ' : '') . 'function ' . ($method->getReturnReference() ? '&' : '') . $method->getName();
        $returnType = $this->printReturnType($method);
        $params = $this->printParameters($method, \strlen($line) + \strlen($returnType) + \strlen($this->indentation) + 2);
        $body = Helpers::simplifyTaggedNames((string) $method->getBody(), $this->namespace);
        return Helpers::formatDocComment($method->getComment() . "\n") . self::printAttributes($method->getAttributes()) . $line . $params . $returnType . ($method->isAbstract() || $method->getBody() === null ? ";\n" : (\strpos($params, "\n") === \false ? "\n" : ' ') . "{\n" . $this->indent(\ltrim(\rtrim($body) . "\n")) . "}\n");
    }
    public function printClass(ClassType $class, PhpNamespace $namespace = null) : string
    {
        $this->namespace = $this->resolveTypes ? $namespace : null;
        $class->validate();
        $resolver = $this->namespace ? [$namespace, 'simplifyType'] : function ($s) {
            return $s;
        };
        $traits = [];
        foreach ($class->getTraitResolutions() as $trait) {
            $resolutions = $trait->getResolutions();
            $traits[] = Helpers::formatDocComment((string) $trait->getComment()) . 'use ' . $resolver($trait->getName()) . ($resolutions ? " {\n" . $this->indentation . \implode(";\n" . $this->indentation, $resolutions) . ";\n}\n" : ";\n");
        }
        $cases = [];
        foreach ($class->getCases() as $case) {
            $cases[] = Helpers::formatDocComment((string) $case->getComment()) . self::printAttributes($case->getAttributes()) . 'case ' . $case->getName() . ($case->getValue() === null ? '' : ' = ' . $this->dump($case->getValue())) . ";\n";
        }
        $enumType = isset($case) && $case->getValue() !== null ? $this->returnTypeColon . Type::getType($case->getValue()) : '';
        $consts = [];
        foreach ($class->getConstants() as $const) {
            $def = ($const->isFinal() ? 'final ' : '') . ($const->getVisibility() ? $const->getVisibility() . ' ' : '') . 'const ' . $const->getName() . ' = ';
            $consts[] = Helpers::formatDocComment((string) $const->getComment()) . self::printAttributes($const->getAttributes()) . $def . $this->dump($const->getValue(), \strlen($def)) . ";\n";
        }
        $properties = [];
        foreach ($class->getProperties() as $property) {
            $property->validate();
            $type = $property->getType();
            $def = ($property->getVisibility() ?: 'public') . ($property->isStatic() ? ' static' : '') . ($property->isReadOnly() && $type ? ' readonly' : '') . ' ' . \ltrim($this->printType($type, $property->isNullable()) . ' ') . '$' . $property->getName();
            $properties[] = Helpers::formatDocComment((string) $property->getComment()) . self::printAttributes($property->getAttributes()) . $def . ($property->getValue() === null && !$property->isInitialized() ? '' : ' = ' . $this->dump($property->getValue(), \strlen($def) + 3)) . ";\n";
        }
        $methods = [];
        foreach ($class->getMethods() as $method) {
            $methods[] = $this->printMethod($method, $namespace);
        }
        $members = \array_filter([\implode('', $traits), $this->joinProperties($cases), $this->joinProperties($consts), $this->joinProperties($properties), ($methods && $properties ? \str_repeat("\n", $this->linesBetweenMethods - 1) : '') . \implode(\str_repeat("\n", $this->linesBetweenMethods), $methods)]);
        return Strings::normalize(Helpers::formatDocComment($class->getComment() . "\n") . self::printAttributes($class->getAttributes()) . ($class->isAbstract() ? 'abstract ' : '') . ($class->isFinal() ? 'final ' : '') . ($class->getName() ? $class->getType() . ' ' . $class->getName() . $enumType . ' ' : '') . ($class->getExtends() ? 'extends ' . \implode(', ', \array_map($resolver, (array) $class->getExtends())) . ' ' : '') . ($class->getImplements() ? 'implements ' . \implode(', ', \array_map($resolver, $class->getImplements())) . ' ' : '') . ($class->getName() ? "\n" : '') . "{\n" . ($members ? $this->indent(\implode("\n", $members)) : '') . '}') . ($class->getName() ? "\n" : '');
    }
    public function printNamespace(PhpNamespace $namespace) : string
    {
        $this->namespace = $this->resolveTypes ? $namespace : null;
        $name = $namespace->getName();
        $uses = $this->printUses($namespace) . $this->printUses($namespace, PhpNamespace::NAME_FUNCTION) . $this->printUses($namespace, PhpNamespace::NAME_CONSTANT);
        $items = [];
        foreach ($namespace->getClasses() as $class) {
            $items[] = $this->printClass($class, $namespace);
        }
        foreach ($namespace->getFunctions() as $function) {
            $items[] = $this->printFunction($function, $namespace);
        }
        $body = ($uses ? $uses . "\n" : '') . \implode("\n", $items);
        if ($namespace->hasBracketedSyntax()) {
            return 'namespace' . ($name ? " {$name}" : '') . "\n{\n" . $this->indent($body) . "}\n";
        } else {
            return ($name ? "namespace {$name};\n\n" : '') . $body;
        }
    }
    public function printFile(PhpFile $file) : string
    {
        $namespaces = [];
        foreach ($file->getNamespaces() as $namespace) {
            $namespaces[] = $this->printNamespace($namespace);
        }
        return Strings::normalize("<?php\n" . ($file->getComment() ? "\n" . Helpers::formatDocComment($file->getComment() . "\n") : '') . "\n" . ($file->hasStrictTypes() ? "declare(strict_types=1);\n\n" : '') . \implode("\n\n", $namespaces)) . "\n";
    }
    protected function printUses(PhpNamespace $namespace, string $of = PhpNamespace::NAME_NORMAL) : string
    {
        $prefix = [PhpNamespace::NAME_NORMAL => '', PhpNamespace::NAME_FUNCTION => 'function ', PhpNamespace::NAME_CONSTANT => 'const '][$of];
        $name = $namespace->getName();
        $uses = [];
        foreach ($namespace->getUses($of) as $alias => $original) {
            $uses[] = Helpers::extractShortName($original) === $alias ? "use {$prefix}{$original};\n" : "use {$prefix}{$original} as {$alias};\n";
        }
        return \implode('', $uses);
    }
    /**
     * @param Closure|GlobalFunction|Method  $function
     */
    protected function printParameters($function, int $column = 0) : string
    {
        $params = [];
        $list = $function->getParameters();
        $special = \false;
        foreach ($list as $param) {
            $param->validate();
            $variadic = $function->isVariadic() && $param === \end($list);
            $type = $param->getType();
            $promoted = $param instanceof PromotedParameter ? $param : null;
            $params[] = ($promoted ? Helpers::formatDocComment((string) $promoted->getComment()) : '') . ($attrs = self::printAttributes($param->getAttributes(), \true)) . ($promoted ? ($promoted->getVisibility() ?: 'public') . ($promoted->isReadOnly() && $type ? ' readonly' : '') . ' ' : '') . \ltrim($this->printType($type, $param->isNullable()) . ' ') . ($param->isReference() ? '&' : '') . ($variadic ? '...' : '') . '$' . $param->getName() . ($param->hasDefaultValue() && !$variadic ? ' = ' . $this->dump($param->getDefaultValue()) : '');
            $special = $special || $promoted || $attrs;
        }
        $line = \implode(', ', $params);
        return \count($params) > 1 && ($special || \strlen($line) + $column > $this->wrapLength) ? "(\n" . $this->indent(\implode(",\n", $params)) . ($special ? ',' : '') . "\n)" : "({$line})";
    }
    protected function printType(?string $type, bool $nullable) : string
    {
        if ($type === null) {
            return '';
        }
        if ($this->namespace) {
            $type = $this->namespace->simplifyType($type);
        }
        if ($nullable && \strcasecmp($type, 'mixed')) {
            $type = \strpos($type, '|') === \false ? '?' . $type : $type . '|null';
        }
        return $type;
    }
    /**
     * @param Closure|GlobalFunction|Method  $function
     */
    private function printReturnType($function) : string
    {
        return ($tmp = $this->printType($function->getReturnType(), $function->isReturnNullable())) ? $this->returnTypeColon . $tmp : '';
    }
    private function printAttributes(array $attrs, bool $inline = \false) : string
    {
        if (!$attrs) {
            return '';
        }
        $this->dumper->indentation = $this->indentation;
        $items = [];
        foreach ($attrs as $attr) {
            $args = $this->dumper->format('...?:', $attr->getArguments());
            $args = Helpers::simplifyTaggedNames($args, $this->namespace);
            $items[] = $this->printType($attr->getName(), \false) . ($args ? "({$args})" : '');
        }
        return $inline ? '#[' . \implode(', ', $items) . '] ' : '#[' . \implode("]\n#[", $items) . "]\n";
    }
    /** @return static */
    public function setTypeResolving(bool $state = \true) : self
    {
        $this->resolveTypes = $state;
        return $this;
    }
    protected function indent(string $s) : string
    {
        $s = \str_replace("\t", $this->indentation, $s);
        return Strings::indent($s, 1, $this->indentation);
    }
    protected function dump($var, int $column = 0) : string
    {
        $this->dumper->indentation = $this->indentation;
        $this->dumper->wrapLength = $this->wrapLength;
        $s = $this->dumper->dump($var, $column);
        $s = Helpers::simplifyTaggedNames($s, $this->namespace);
        return $s;
    }
    private function joinProperties(array $props) : string
    {
        return $this->linesBetweenProperties ? \implode(\str_repeat("\n", $this->linesBetweenProperties), $props) : \preg_replace('#^(\\w.*\\n)\\n(?=\\w.*;)#m', '$1', \implode("\n", $props));
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\PhpGenerator;

/**
 * PHP return, property and parameter types.
 */
class Type
{
    public const STRING = 'string', INT = 'int', FLOAT = 'float', BOOL = 'bool', ARRAY = 'array', OBJECT = 'object', CALLABLE = 'callable', ITERABLE = 'iterable', VOID = 'void', NEVER = 'never', MIXED = 'mixed', FALSE = 'false', NULL = 'null', SELF = 'self', PARENT = 'parent', STATIC = 'static';
    public static function nullable(string $type, bool $state = \true) : string
    {
        return ($state ? '?' : '') . \ltrim($type, '?');
    }
    public static function union(string ...$types) : string
    {
        return \implode('|', $types);
    }
    public static function intersection(string ...$types) : string
    {
        return \implode('&', $types);
    }
    public static function getType($value) : ?string
    {
        if (\is_object($value)) {
            return \get_class($value);
        } elseif (\is_int($value)) {
            return self::INT;
        } elseif (\is_float($value)) {
            return self::FLOAT;
        } elseif (\is_string($value)) {
            return self::STRING;
        } elseif (\is_bool($value)) {
            return self::BOOL;
        } elseif (\is_array($value)) {
            return self::ARRAY;
        } else {
            return null;
        }
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\PhpGenerator;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Class constant.
 */
final class Constant
{
    use Nette\SmartObject;
    use Traits\NameAware;
    use Traits\VisibilityAware;
    use Traits\CommentAware;
    use Traits\AttributeAware;
    /** @var mixed */
    private $value;
    /** @var bool */
    private $final = \false;
    /** @return static */
    public function setValue($val) : self
    {
        $this->value = $val;
        return $this;
    }
    public function getValue()
    {
        return $this->value;
    }
    /** @return static */
    public function setFinal(bool $state = \true) : self
    {
        $this->final = $state;
        return $this;
    }
    public function isFinal() : bool
    {
        return $this->final;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Bootstrap\Extensions;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\Schema\Expect;
/**
 * PHP directives definition.
 */
final class PhpExtension extends Nette\DI\CompilerExtension
{
    public function getConfigSchema() : Nette\Schema\Schema
    {
        return Expect::arrayOf(Expect::scalar()->dynamic());
    }
    public function loadConfiguration()
    {
        foreach ($this->getConfig() as $name => $value) {
            if ($value === null) {
                continue;
            } elseif ($name === 'include_path') {
                $this->initialization->addBody('set_include_path(?);', [\str_replace(';', \PATH_SEPARATOR, $value)]);
            } elseif ($name === 'ignore_user_abort') {
                $this->initialization->addBody('ignore_user_abort(?);', [$value]);
            } elseif ($name === 'max_execution_time') {
                $this->initialization->addBody('set_time_limit(?);', [$value]);
            } elseif ($name === 'date.timezone') {
                $this->initialization->addBody('date_default_timezone_set(?);', [$value]);
            } elseif (\function_exists('ini_set')) {
                $this->initialization->addBody('ini_set(?, (string) (?));', [$name, $value]);
            } elseif (\ini_get($name) !== (string) $value) {
                throw new Nette\NotSupportedException('Required function ini_set() is disabled.');
            }
        }
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Bootstrap\Extensions;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Constant definitions.
 */
final class ConstantsExtension extends Nette\DI\CompilerExtension
{
    public function loadConfiguration()
    {
        foreach ($this->getConfig() as $name => $value) {
            $this->initialization->addBody('define(?, ?);', [$name, $value]);
        }
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Bootstrap;

use _PHPStan_dcc7b7cff\Composer\Autoload\ClassLoader;
use _PHPStan_dcc7b7cff\Latte;
use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\DI;
use _PHPStan_dcc7b7cff\Tracy;
/**
 * Initial system DI container generator.
 */
class Configurator
{
    use Nette\SmartObject;
    public const CookieSecret = 'nette-debug';
    /** @deprecated  use Configurator::CookieSecret */
    public const COOKIE_SECRET = self::CookieSecret;
    /** @var callable[]  function (Configurator $sender, DI\Compiler $compiler); Occurs after the compiler is created */
    public $onCompile = [];
    /** @var array */
    public $defaultExtensions = ['application' => [Nette\Bridges\ApplicationDI\ApplicationExtension::class, ['%debugMode%', ['%appDir%'], '%tempDir%/cache/nette.application']], 'cache' => [Nette\Bridges\CacheDI\CacheExtension::class, ['%tempDir%']], 'constants' => Extensions\ConstantsExtension::class, 'database' => [Nette\Bridges\DatabaseDI\DatabaseExtension::class, ['%debugMode%']], 'decorator' => Nette\DI\Extensions\DecoratorExtension::class, 'di' => [Nette\DI\Extensions\DIExtension::class, ['%debugMode%']], 'extensions' => Nette\DI\Extensions\ExtensionsExtension::class, 'forms' => Nette\Bridges\FormsDI\FormsExtension::class, 'http' => [Nette\Bridges\HttpDI\HttpExtension::class, ['%consoleMode%']], 'inject' => Nette\DI\Extensions\InjectExtension::class, 'latte' => [Nette\Bridges\ApplicationDI\LatteExtension::class, ['%tempDir%/cache/latte', '%debugMode%']], 'mail' => Nette\Bridges\MailDI\MailExtension::class, 'php' => Extensions\PhpExtension::class, 'routing' => [Nette\Bridges\ApplicationDI\RoutingExtension::class, ['%debugMode%']], 'search' => [Nette\DI\Extensions\SearchExtension::class, ['%tempDir%/cache/nette.search']], 'security' => [Nette\Bridges\SecurityDI\SecurityExtension::class, ['%debugMode%']], 'session' => [Nette\Bridges\HttpDI\SessionExtension::class, ['%debugMode%', '%consoleMode%']], 'tracy' => [Tracy\Bridges\Nette\TracyExtension::class, ['%debugMode%', '%consoleMode%']]];
    /** @var string[] of classes which shouldn't be autowired */
    public $autowireExcludedClasses = [\ArrayAccess::class, \Countable::class, \IteratorAggregate::class, \stdClass::class, \Traversable::class];
    /** @var array */
    protected $staticParameters;
    /** @var array */
    protected $dynamicParameters = [];
    /** @var array */
    protected $services = [];
    /** @var array of string|array */
    protected $configs = [];
    public function __construct()
    {
        $this->staticParameters = $this->getDefaultParameters();
    }
    /**
     * Set parameter %debugMode%.
     * @param  bool|string|array  $value
     * @return static
     */
    public function setDebugMode($value)
    {
        if (\is_string($value) || \is_array($value)) {
            $value = static::detectDebugMode($value);
        } elseif (!\is_bool($value)) {
            throw new Nette\InvalidArgumentException(\sprintf('Value must be either a string, array, or boolean, %s given.', \gettype($value)));
        }
        $this->staticParameters['debugMode'] = $value;
        $this->staticParameters['productionMode'] = !$this->staticParameters['debugMode'];
        // compatibility
        return $this;
    }
    public function isDebugMode() : bool
    {
        return $this->staticParameters['debugMode'];
    }
    /**
     * Sets path to temporary directory.
     * @return static
     */
    public function setTempDirectory(string $path)
    {
        $this->staticParameters['tempDir'] = $path;
        return $this;
    }
    /**
     * Sets the default timezone.
     * @return static
     */
    public function setTimeZone(string $timezone)
    {
        \date_default_timezone_set($timezone);
        @\ini_set('date.timezone', $timezone);
        // @ - function may be disabled
        return $this;
    }
    /**
     * Alias for addStaticParameters()
     * @return static
     */
    public function addParameters(array $params)
    {
        return $this->addStaticParameters($params);
    }
    /**
     * Adds new static parameters.
     * @return static
     */
    public function addStaticParameters(array $params)
    {
        $this->staticParameters = DI\Config\Helpers::merge($params, $this->staticParameters);
        return $this;
    }
    /**
     * Adds new dynamic parameters.
     * @return static
     */
    public function addDynamicParameters(array $params)
    {
        $this->dynamicParameters = $params + $this->dynamicParameters;
        return $this;
    }
    /**
     * Add instances of services.
     * @return static
     */
    public function addServices(array $services)
    {
        $this->services = $services + $this->services;
        return $this;
    }
    protected function getDefaultParameters() : array
    {
        $trace = \debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS);
        $last = \end($trace);
        $debugMode = static::detectDebugMode();
        $loaderRc = \class_exists(ClassLoader::class) ? new \ReflectionClass(ClassLoader::class) : null;
        return ['appDir' => isset($trace[1]['file']) ? \dirname($trace[1]['file']) : null, 'wwwDir' => isset($last['file']) ? \dirname($last['file']) : null, 'vendorDir' => $loaderRc ? \dirname($loaderRc->getFileName(), 2) : null, 'debugMode' => $debugMode, 'productionMode' => !$debugMode, 'consoleMode' => \PHP_SAPI === 'cli'];
    }
    public function enableTracy(?string $logDirectory = null, ?string $email = null) : void
    {
        if (!\class_exists(Tracy\Debugger::class)) {
            throw new Nette\NotSupportedException('Tracy not found, do you have `tracy/tracy` package installed?');
        }
        Tracy\Debugger::$strictMode = \true;
        Tracy\Debugger::enable(!$this->staticParameters['debugMode'], $logDirectory, $email);
        Tracy\Bridges\Nette\Bridge::initialize();
        if (\class_exists(Latte\Bridges\Tracy\BlueScreenPanel::class)) {
            Latte\Bridges\Tracy\BlueScreenPanel::initialize();
        }
    }
    /**
     * Alias for enableTracy()
     */
    public function enableDebugger(?string $logDirectory = null, ?string $email = null) : void
    {
        $this->enableTracy($logDirectory, $email);
    }
    /**
     * @throws Nette\NotSupportedException if RobotLoader is not available
     */
    public function createRobotLoader() : Nette\Loaders\RobotLoader
    {
        if (!\class_exists(Nette\Loaders\RobotLoader::class)) {
            throw new Nette\NotSupportedException('RobotLoader not found, do you have `nette/robot-loader` package installed?');
        }
        $loader = new Nette\Loaders\RobotLoader();
        $loader->setTempDirectory($this->getCacheDirectory() . '/nette.robotLoader');
        $loader->setAutoRefresh($this->staticParameters['debugMode']);
        if (isset($this->defaultExtensions['application'])) {
            $this->defaultExtensions['application'][1][1] = null;
            $this->defaultExtensions['application'][1][3] = $loader;
        }
        return $loader;
    }
    /**
     * Adds configuration file.
     * @param  string|array  $config
     * @return static
     */
    public function addConfig($config)
    {
        $this->configs[] = $config;
        return $this;
    }
    /**
     * Returns system DI container.
     */
    public function createContainer(bool $initialize = \true) : DI\Container
    {
        $class = $this->loadContainer();
        $container = new $class($this->dynamicParameters);
        foreach ($this->services as $name => $service) {
            $container->addService($name, $service);
        }
        if ($initialize) {
            $container->initialize();
        }
        return $container;
    }
    /**
     * Loads system DI container class and returns its name.
     */
    public function loadContainer() : string
    {
        $loader = new DI\ContainerLoader($this->getCacheDirectory() . '/nette.configurator', $this->staticParameters['debugMode']);
        return $loader->load([$this, 'generateContainer'], $this->generateContainerKey());
    }
    /**
     * @internal
     */
    public function generateContainer(DI\Compiler $compiler) : void
    {
        $loader = $this->createLoader();
        $loader->setParameters($this->staticParameters);
        foreach ($this->configs as $config) {
            if (\is_string($config)) {
                $compiler->loadConfig($config, $loader);
            } else {
                $compiler->addConfig($config);
            }
        }
        $compiler->addConfig(['parameters' => DI\Helpers::escape($this->staticParameters)]);
        $compiler->setDynamicParameterNames(\array_keys($this->dynamicParameters));
        $builder = $compiler->getContainerBuilder();
        $builder->addExcludedClasses($this->autowireExcludedClasses);
        foreach ($this->defaultExtensions as $name => $extension) {
            [$class, $args] = \is_string($extension) ? [$extension, []] : $extension;
            if (\class_exists($class)) {
                $args = DI\Helpers::expand($args, $this->staticParameters);
                $compiler->addExtension($name, (new \ReflectionClass($class))->newInstanceArgs($args));
            }
        }
        Nette\Utils\Arrays::invoke($this->onCompile, $this, $compiler);
    }
    protected function createLoader() : DI\Config\Loader
    {
        return new DI\Config\Loader();
    }
    protected function generateContainerKey() : array
    {
        return [
            $this->staticParameters,
            \array_keys($this->dynamicParameters),
            $this->configs,
            \PHP_VERSION_ID - \PHP_RELEASE_VERSION,
            // minor PHP version
            \class_exists(ClassLoader::class) ? \filemtime((new \ReflectionClass(ClassLoader::class))->getFilename()) : null,
        ];
    }
    protected function getCacheDirectory() : string
    {
        if (empty($this->staticParameters['tempDir'])) {
            throw new Nette\InvalidStateException('Set path to temporary directory using setTempDirectory().');
        }
        $dir = $this->staticParameters['tempDir'] . '/cache';
        Nette\Utils\FileSystem::createDir($dir);
        return $dir;
    }
    /********************* tools ****************d*g**/
    /**
     * Detects debug mode by IP addresses or computer names whitelist detection.
     * @param  string|array  $list
     */
    public static function detectDebugMode($list = null) : bool
    {
        $addr = $_SERVER['REMOTE_ADDR'] ?? \php_uname('n');
        $secret = \is_string($_COOKIE[self::CookieSecret] ?? null) ? $_COOKIE[self::CookieSecret] : null;
        $list = \is_string($list) ? \preg_split('#[,\\s]+#', $list) : (array) $list;
        if (!isset($_SERVER['HTTP_X_FORWARDED_FOR']) && !isset($_SERVER['HTTP_FORWARDED'])) {
            $list[] = '127.0.0.1';
            $list[] = '::1';
            $list[] = '[::1]';
            // workaround for PHP < 7.3.4
        }
        return \in_array($addr, $list, \true) || \in_array("{$secret}@{$addr}", $list, \true);
    }
}
\class_exists(Nette\Configurator::class);
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette;

if (\false) {
    /** alias for Nette\Bootstrap\Configurator */
    class Configurator extends Bootstrap\Configurator
    {
    }
} elseif (!\class_exists(Configurator::class)) {
    \class_alias(Bootstrap\Configurator::class, Configurator::class);
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Bridges\DITracy;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\DI\Container;
use _PHPStan_dcc7b7cff\Tracy;
/**
 * Dependency injection container panel for Debugger Bar.
 */
class ContainerPanel implements Tracy\IBarPanel
{
    use Nette\SmartObject;
    /** @var float|null */
    public static $compilationTime;
    /** @var Nette\DI\Container */
    private $container;
    /** @var float|null */
    private $elapsedTime;
    public function __construct(Container $container)
    {
        $this->container = $container;
        $this->elapsedTime = self::$compilationTime ? \microtime(\true) - self::$compilationTime : null;
    }
    /**
     * Renders tab.
     */
    public function getTab() : string
    {
        return Nette\Utils\Helpers::capture(function () {
            $elapsedTime = $this->elapsedTime;
            require __DIR__ . '/templates/ContainerPanel.tab.phtml';
        });
    }
    /**
     * Renders panel.
     */
    public function getPanel() : string
    {
        $rc = new \ReflectionClass($this->container);
        $tags = [];
        $types = [];
        foreach ($rc->getMethods() as $method) {
            if (\preg_match('#^createService(.+)#', $method->name, $m) && $method->getReturnType()) {
                $types[\lcfirst(\str_replace('__', '.', $m[1]))] = $method->getReturnType()->getName();
            }
        }
        $types = $this->getContainerProperty('types') + $types;
        \ksort($types, \SORT_NATURAL);
        foreach ($this->getContainerProperty('tags') as $tag => $tmp) {
            foreach ($tmp as $service => $val) {
                $tags[$service][$tag] = $val;
            }
        }
        return Nette\Utils\Helpers::capture(function () use($tags, $types, $rc) {
            $container = $this->container;
            $file = $rc->getFileName();
            $instances = $this->getContainerProperty('instances');
            $wiring = $this->getContainerProperty('wiring');
            require __DIR__ . '/templates/ContainerPanel.panel.phtml';
        });
    }
    private function getContainerProperty(string $name)
    {
        $prop = (new \ReflectionClass(Nette\DI\Container::class))->getProperty($name);
        $prop->setAccessible(\true);
        return $prop->getValue($this->container);
    }
}
<?php
declare(strict_types=1);

namespace Nette\Bridges\DITracy;

use Nette;
use Tracy\Dumper;
use Tracy\Helpers;

?>
<style class="tracy-debug">
	#tracy-debug .nette-ContainerPanel table {
		width: 100%;
		white-space: nowrap;
	}

	#tracy-debug .nette-ContainerPanel .created {
		font-weight: bold;
	}

	#tracy-debug .nette-ContainerPanel .yes {
		color: green;
		font-weight: bold;
	}

	#tracy-debug .nette-ContainerPanel table pre {
		display: inline;
		background: transparent;
	}
</style>

<h1><?= get_class($container) ?></h1>

<div class="tracy-inner nette-ContainerPanel">
<div class="tracy-inner-container">
	<h2>Services</h2>

	<table class="tracy-sortable">
		<thead>
		<tr>
			<th>Name</th>
			<th>Autowired</th>
			<th>Service</th>
			<th>Tags</th>
		</tr>
		</thead>
		<tbody>
		<?php foreach ($types as $name => $type): ?>
		<?php $name = (string) $name ?>
		<?php $autowired = in_array($name, array_merge($wiring[$type][0] ?? [], $wiring[$type][1] ?? []), true) ?>
		<tr>
			<td class="<?= isset($instances[$name]) ? 'created' : '' ?>"><?= is_numeric($name) ? "<small>$name</small>" : Helpers::escapeHtml($name) ?></td>
			<td class="<?= $autowired ? 'yes' : '' ?>"><?= $autowired ? 'yes' : (isset($wiring[$type]) ? 'no' : '?') ?></td>
			<td>
				<?php if (isset($instances[$name]) && !$instances[$name] instanceof Nette\DI\Container): ?>
					<?= Dumper::toHtml($instances[$name], [Dumper::COLLAPSE => true, Dumper::LIVE => true]); ?>
				<?php elseif (isset($instances[$name])): ?>
					<code><?= get_class($instances[$name]) ?></code>
				<?php elseif (is_string($type)): ?>
					<code><?= Helpers::escapeHtml($type) ?></code>
				<?php endif ?>
			</td>
			<td><?php if (isset($tags[$name])) {
				echo count($tags[$name]) === 1
					? Helpers::escapeHtml(key($tags[$name])) . ' = ' . Dumper::toHtml(current($tags[$name]), [Dumper::COLLAPSE => true])
					: Dumper::toHtml($tags[$name], [Dumper::COLLAPSE => true]);
			} ?></td>
		</tr>
		<?php endforeach ?>
		</tbody>
	</table>

	<h2>Parameters</h2>

	<div class="nette-ContainerPanel-parameters">
		<?= Dumper::toHtml($container->parameters); ?>
	</div>

	<p>Source: <?= Helpers::editorLink($file) ?></p>
</div>
</div>
<?php
declare(strict_types=1);

namespace Nette\Bridges\DITracy;


?>
<span title="Dependency Injection Container">
<svg viewBox="0 0 2048 2048"><path fill="#ae7c21" d="m1675 690.55v-125c0-36-4-60-13-71-9-12-26-18-52-18s-43 6-52 17c-8 11-12 36-12 72v910.62c0 37 4 61 12 72 9 11 26 17 52 17s44-6 52-17c9-12 13-36 13-72v-207h243v165c0 86-4 148-12 187-8 38-21 70-39 96-20 28-45 48-77 59-31 11-87 16-170 16-96 0-161-5-196-16-34-11-63-31-86-59-21-26-36-59-45-97-9-39-14-101-14-186v-826.62c0-85 4-147 13-185s25-71 46-97c23-29 54-49 92-60s102-17 189-17c75 0 130 6 164 17s61 30 81 59c19 26 33 59 41 99 8 39 12 101 12 185v84zm-524 1086.6h-254v-1514.6h254zm-1025 0v-1514.6h316c127 0 212 27 257 81 44 53 66 159 66 316v721.62c0 157-22 263-66 317-44 53-130 80-257 80zm388-314v-884.62c0-35-4-58-13-70-9-11-26-17-53-17h-66v1058.6h66c26 0 44-6 53-17 9-12 14-35 14-70z"/>
</svg><span class="tracy-label"><?= $elapsedTime ? sprintf('%0.1f ms', $elapsedTime * 1000) : '' ?></span>
</span>
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI;

use _PHPStan_dcc7b7cff\Nette;
/**
 * @internal
 */
final class DynamicParameter extends Nette\PhpGenerator\PhpLiteral implements Nette\Schema\DynamicParameter
{
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI\Config;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\Utils\Validators;
/**
 * Configuration file loader.
 */
class Loader
{
    use Nette\SmartObject;
    private const INCLUDES_KEY = 'includes';
    private $adapters = ['php' => Adapters\PhpAdapter::class, 'neon' => Adapters\NeonAdapter::class];
    private $dependencies = [];
    private $loadedFiles = [];
    private $parameters = [];
    /**
     * Reads configuration from file.
     */
    public function load(string $file, ?bool $merge = \true) : array
    {
        if (!\is_file($file) || !\is_readable($file)) {
            throw new Nette\FileNotFoundException(\sprintf("File '%s' is missing or is not readable.", $file));
        }
        if (isset($this->loadedFiles[$file])) {
            throw new Nette\InvalidStateException(\sprintf("Recursive included file '%s'", $file));
        }
        $this->loadedFiles[$file] = \true;
        $this->dependencies[] = $file;
        $data = $this->getAdapter($file)->load($file);
        $res = [];
        if (isset($data[self::INCLUDES_KEY])) {
            Validators::assert($data[self::INCLUDES_KEY], 'list', "section 'includes' in file '{$file}'");
            $includes = Nette\DI\Helpers::expand($data[self::INCLUDES_KEY], $this->parameters);
            foreach ($includes as $include) {
                $include = $this->expandIncludedFile($include, $file);
                $res = Nette\Schema\Helpers::merge($this->load($include, $merge), $res);
            }
        }
        unset($data[self::INCLUDES_KEY], $this->loadedFiles[$file]);
        if ($merge === \false) {
            $res[] = $data;
        } else {
            $res = Nette\Schema\Helpers::merge($data, $res);
        }
        return $res;
    }
    /**
     * Save configuration to file.
     */
    public function save(array $data, string $file) : void
    {
        if (\file_put_contents($file, $this->getAdapter($file)->dump($data)) === \false) {
            throw new Nette\IOException(\sprintf("Cannot write file '%s'.", $file));
        }
    }
    /**
     * Returns configuration files.
     */
    public function getDependencies() : array
    {
        return \array_unique($this->dependencies);
    }
    /**
     * Expands included file name.
     */
    public function expandIncludedFile(string $includedFile, string $mainFile) : string
    {
        return \preg_match('#([a-z]+:)?[/\\\\]#Ai', $includedFile) ? $includedFile : \dirname($mainFile) . '/' . $includedFile;
    }
    /**
     * Registers adapter for given file extension.
     * @param  string|Adapter  $adapter
     * @return static
     */
    public function addAdapter(string $extension, $adapter)
    {
        $this->adapters[\strtolower($extension)] = $adapter;
        return $this;
    }
    private function getAdapter(string $file) : Adapter
    {
        $extension = \strtolower(\pathinfo($file, \PATHINFO_EXTENSION));
        if (!isset($this->adapters[$extension])) {
            throw new Nette\InvalidArgumentException(\sprintf("Unknown file extension '%s'.", $file));
        }
        return \is_object($this->adapters[$extension]) ? $this->adapters[$extension] : new $this->adapters[$extension]();
    }
    /** @return static */
    public function setParameters(array $params)
    {
        $this->parameters = $params;
        return $this;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI\Config\Adapters;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Reading and generating PHP files.
 */
final class PhpAdapter implements Nette\DI\Config\Adapter
{
    use Nette\SmartObject;
    /**
     * Reads configuration from PHP file.
     */
    public function load(string $file) : array
    {
        return require $file;
    }
    /**
     * Generates configuration in PHP format.
     */
    public function dump(array $data) : string
    {
        return "<?php // generated by Nette \nreturn " . (new Nette\PhpGenerator\Dumper())->dump($data) . ';';
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI\Config\Adapters;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\DI\Config\Helpers;
use _PHPStan_dcc7b7cff\Nette\DI\Definitions\Reference;
use _PHPStan_dcc7b7cff\Nette\DI\Definitions\Statement;
use _PHPStan_dcc7b7cff\Nette\Neon;
/**
 * Reading and generating NEON files.
 */
final class NeonAdapter implements Nette\DI\Config\Adapter
{
    use Nette\SmartObject;
    private const PREVENT_MERGING_SUFFIX = '!';
    /**
     * Reads configuration from NEON file.
     */
    public function load(string $file) : array
    {
        $input = Nette\Utils\FileSystem::read($file);
        if (\substr($input, 0, 3) === "") {
            // BOM
            $input = \substr($input, 3);
        }
        $decoder = new Neon\Decoder();
        $node = $decoder->parseToNode($input);
        $traverser = new Neon\Traverser();
        $node = $traverser->traverse($node, [$this, 'removeUnderscoreVisitor']);
        return $this->process((array) $node->toValue());
    }
    /** @throws Nette\InvalidStateException */
    public function process(array $arr) : array
    {
        $res = [];
        foreach ($arr as $key => $val) {
            if (\is_string($key) && \substr($key, -1) === self::PREVENT_MERGING_SUFFIX) {
                if (!\is_array($val) && $val !== null) {
                    throw new Nette\DI\InvalidConfigurationException(\sprintf("Replacing operator is available only for arrays, item '%s' is not array.", $key));
                }
                $key = \substr($key, 0, -1);
                $val[Helpers::PREVENT_MERGING] = \true;
            }
            if (\is_array($val)) {
                $val = $this->process($val);
            } elseif ($val instanceof Neon\Entity) {
                if ($val->value === Neon\Neon::CHAIN) {
                    $tmp = null;
                    foreach ($this->process($val->attributes) as $st) {
                        $tmp = new Statement($tmp === null ? $st->getEntity() : [$tmp, \ltrim(\implode('::', (array) $st->getEntity()), ':')], $st->arguments);
                    }
                    $val = $tmp;
                } else {
                    $tmp = $this->process([$val->value]);
                    if (\is_string($tmp[0]) && \strpos($tmp[0], '?') !== \false) {
                        \trigger_error('Operator ? is deprecated in config files.', \E_USER_DEPRECATED);
                    }
                    $val = new Statement($tmp[0], $this->process($val->attributes));
                }
            }
            $res[$key] = $val;
        }
        return $res;
    }
    /**
     * Generates configuration in NEON format.
     */
    public function dump(array $data) : string
    {
        \array_walk_recursive($data, function (&$val) : void {
            if ($val instanceof Statement) {
                $val = self::statementToEntity($val);
            }
        });
        return "# generated by Nette\n\n" . Neon\Neon::encode($data, Neon\Neon::BLOCK);
    }
    private static function statementToEntity(Statement $val) : Neon\Entity
    {
        \array_walk_recursive($val->arguments, function (&$val) : void {
            if ($val instanceof Statement) {
                $val = self::statementToEntity($val);
            } elseif ($val instanceof Reference) {
                $val = '@' . $val->getValue();
            }
        });
        $entity = $val->getEntity();
        if ($entity instanceof Reference) {
            $entity = '@' . $entity->getValue();
        } elseif (\is_array($entity)) {
            if ($entity[0] instanceof Statement) {
                return new Neon\Entity(Neon\Neon::CHAIN, [self::statementToEntity($entity[0]), new Neon\Entity('::' . $entity[1], $val->arguments)]);
            } elseif ($entity[0] instanceof Reference) {
                $entity = '@' . $entity[0]->getValue() . '::' . $entity[1];
            } elseif (\is_string($entity[0])) {
                $entity = $entity[0] . '::' . $entity[1];
            }
        }
        return new Neon\Entity($entity, $val->arguments);
    }
    public function removeUnderscoreVisitor(Neon\Node $node)
    {
        if (!$node instanceof Neon\Node\EntityNode) {
            return;
        }
        $index = \false;
        foreach ($node->attributes as $i => $attr) {
            if ($index) {
                $attr->key = $attr->key ?? new Neon\Node\LiteralNode((string) $i);
            }
            if ($attr->value instanceof Neon\Node\LiteralNode && $attr->value->value === '_') {
                unset($node->attributes[$i]);
                $index = \true;
            }
        }
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI\Config;

/**
 * Adapter for reading and writing configuration files.
 */
interface Adapter
{
    /**
     * Reads configuration from file.
     */
    function load(string $file) : array;
    /**
     * Generates configuration string.
     */
    function dump(array $data) : string;
}
\class_exists(IAdapter::class);
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI\Config;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Configuration helpers.
 * @deprecated
 */
final class Helpers
{
    use Nette\StaticClass;
    public const PREVENT_MERGING = '_prevent_merging';
    /**
     * Merges configurations. Left has higher priority than right one.
     * @return array|string
     */
    public static function merge($left, $right)
    {
        return Nette\Schema\Helpers::merge($left, $right);
    }
    /**
     * Return true if array prevents merging and removes this information.
     */
    public static function takeParent(&$data) : bool
    {
        if (\is_array($data) && isset($data[self::PREVENT_MERGING])) {
            unset($data[self::PREVENT_MERGING]);
            return \true;
        }
        return \false;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI\Config;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\DI\Definitions;
use _PHPStan_dcc7b7cff\Nette\DI\Definitions\Statement;
use _PHPStan_dcc7b7cff\Nette\Schema\Context;
use _PHPStan_dcc7b7cff\Nette\Schema\Expect;
use _PHPStan_dcc7b7cff\Nette\Schema\Schema;
/**
 * Service configuration schema.
 */
class DefinitionSchema implements Schema
{
    use Nette\SmartObject;
    /** @var Nette\DI\ContainerBuilder */
    private $builder;
    public function __construct(Nette\DI\ContainerBuilder $builder)
    {
        $this->builder = $builder;
    }
    public function complete($def, Context $context)
    {
        if ($def === [\false]) {
            return (object) $def;
        }
        if (Helpers::takeParent($def)) {
            $def['reset']['all'] = \true;
        }
        foreach (['arguments', 'setup', 'tags'] as $k) {
            if (isset($def[$k]) && Helpers::takeParent($def[$k])) {
                $def['reset'][$k] = \true;
            }
        }
        $def = $this->expandParameters($def);
        $type = $this->sniffType(\end($context->path), $def);
        $def = $this->getSchema($type)->complete($def, $context);
        if ($def) {
            $def->defType = $type;
        }
        return $def;
    }
    public function merge($def, $base)
    {
        if (!empty($def['alteration'])) {
            unset($def['alteration']);
        }
        return Nette\Schema\Helpers::merge($def, $base);
    }
    /**
     * Normalizes configuration of service definitions.
     */
    public function normalize($def, Context $context)
    {
        if ($def === null || $def === \false) {
            return (array) $def;
        } elseif (\is_string($def) && \interface_exists($def)) {
            return ['implement' => $def];
        } elseif ($def instanceof Statement && \is_string($def->getEntity()) && \interface_exists($def->getEntity())) {
            $res = ['implement' => $def->getEntity()];
            if (\array_keys($def->arguments) === ['tagged']) {
                $res += $def->arguments;
            } elseif (\count($def->arguments) > 1) {
                $res['references'] = $def->arguments;
            } elseif ($factory = \array_shift($def->arguments)) {
                $res['factory'] = $factory;
            }
            return $res;
        } elseif (!\is_array($def) || isset($def[0], $def[1])) {
            return ['factory' => $def];
        } elseif (\is_array($def)) {
            if (isset($def['create']) && !isset($def['factory'])) {
                $def['factory'] = $def['create'];
                unset($def['create']);
            }
            if (isset($def['class']) && !isset($def['type'])) {
                if ($def['class'] instanceof Statement) {
                    $key = \end($context->path);
                    \trigger_error(\sprintf("Service '%s': option 'class' should be changed to 'factory'.", $key), \E_USER_DEPRECATED);
                    $def['factory'] = $def['class'];
                    unset($def['class']);
                } elseif (!isset($def['factory']) && !isset($def['dynamic']) && !isset($def['imported'])) {
                    $def['factory'] = $def['class'];
                    unset($def['class']);
                }
            }
            foreach (['class' => 'type', 'dynamic' => 'imported'] as $alias => $original) {
                if (\array_key_exists($alias, $def)) {
                    if (\array_key_exists($original, $def)) {
                        throw new Nette\DI\InvalidConfigurationException(\sprintf("Options '%s' and '%s' are aliases, use only '%s'.", $alias, $original, $original));
                    }
                    $def[$original] = $def[$alias];
                    unset($def[$alias]);
                }
            }
            return $def;
        } else {
            throw new Nette\DI\InvalidConfigurationException('Unexpected format of service definition');
        }
    }
    public function completeDefault(Context $context)
    {
    }
    private function sniffType($key, array $def) : string
    {
        if (\is_string($key)) {
            $name = \preg_match('#^@[\\w\\\\]+$#D', $key) ? $this->builder->getByType(\substr($key, 1), \false) : $key;
            if ($name && $this->builder->hasDefinition($name)) {
                return \get_class($this->builder->getDefinition($name));
            }
        }
        if (isset($def['implement'], $def['references']) || isset($def['implement'], $def['tagged'])) {
            return Definitions\LocatorDefinition::class;
        } elseif (isset($def['implement'])) {
            return \method_exists($def['implement'], 'create') ? Definitions\FactoryDefinition::class : Definitions\AccessorDefinition::class;
        } elseif (isset($def['imported'])) {
            return Definitions\ImportedDefinition::class;
        } elseif (!$def) {
            throw new Nette\DI\InvalidConfigurationException("Service '{$key}': Empty definition.");
        } else {
            return Definitions\ServiceDefinition::class;
        }
    }
    private function expandParameters(array $config) : array
    {
        $params = $this->builder->parameters;
        if (isset($config['parameters'])) {
            foreach ((array) $config['parameters'] as $k => $v) {
                $v = \explode(' ', \is_int($k) ? $v : $k);
                $params[\end($v)] = $this->builder::literal('$' . \end($v));
            }
        }
        return Nette\DI\Helpers::expand($config, $params);
    }
    private static function getSchema(string $type) : Schema
    {
        static $cache;
        $cache = $cache ?: [Definitions\ServiceDefinition::class => self::getServiceSchema(), Definitions\AccessorDefinition::class => self::getAccessorSchema(), Definitions\FactoryDefinition::class => self::getFactorySchema(), Definitions\LocatorDefinition::class => self::getLocatorSchema(), Definitions\ImportedDefinition::class => self::getImportedSchema()];
        return $cache[$type];
    }
    private static function getServiceSchema() : Schema
    {
        return Expect::structure(['type' => Expect::type('string'), 'factory' => Expect::type('callable|_PHPStan_dcc7b7cff\\Nette\\DI\\Definitions\\Statement'), 'arguments' => Expect::array(), 'setup' => Expect::listOf('callable|_PHPStan_dcc7b7cff\\Nette\\DI\\Definitions\\Statement|array:1'), 'inject' => Expect::bool(), 'autowired' => Expect::type('bool|string|array'), 'tags' => Expect::array(), 'reset' => Expect::array(), 'alteration' => Expect::bool()]);
    }
    private static function getAccessorSchema() : Schema
    {
        return Expect::structure(['type' => Expect::string(), 'implement' => Expect::string(), 'factory' => Expect::type('callable|_PHPStan_dcc7b7cff\\Nette\\DI\\Definitions\\Statement'), 'autowired' => Expect::type('bool|string|array'), 'tags' => Expect::array()]);
    }
    private static function getFactorySchema() : Schema
    {
        return Expect::structure(['type' => Expect::string(), 'factory' => Expect::type('callable|_PHPStan_dcc7b7cff\\Nette\\DI\\Definitions\\Statement'), 'implement' => Expect::string(), 'arguments' => Expect::array(), 'setup' => Expect::listOf('callable|_PHPStan_dcc7b7cff\\Nette\\DI\\Definitions\\Statement|array:1'), 'parameters' => Expect::array(), 'references' => Expect::array(), 'tagged' => Expect::string(), 'inject' => Expect::bool(), 'autowired' => Expect::type('bool|string|array'), 'tags' => Expect::array(), 'reset' => Expect::array()]);
    }
    private static function getLocatorSchema() : Schema
    {
        return Expect::structure(['implement' => Expect::string(), 'references' => Expect::array(), 'tagged' => Expect::string(), 'autowired' => Expect::type('bool|string|array'), 'tags' => Expect::array()]);
    }
    private static function getImportedSchema() : Schema
    {
        return Expect::structure(['type' => Expect::string(), 'imported' => Expect::bool(), 'autowired' => Expect::type('bool|string|array'), 'tags' => Expect::array()]);
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\DI\Definitions\Reference;
use _PHPStan_dcc7b7cff\Nette\DI\Definitions\Statement;
use _PHPStan_dcc7b7cff\Nette\Utils\Reflection;
use _PHPStan_dcc7b7cff\Nette\Utils\Type;
/**
 * The DI helpers.
 * @internal
 */
final class Helpers
{
    use Nette\StaticClass;
    /**
     * Expands %placeholders%.
     * @param  mixed  $var
     * @param  bool|array  $recursive
     * @return mixed
     * @throws Nette\InvalidArgumentException
     */
    public static function expand($var, array $params, $recursive = \false)
    {
        if (\is_array($var)) {
            $res = [];
            foreach ($var as $key => $val) {
                $res[self::expand($key, $params, $recursive)] = self::expand($val, $params, $recursive);
            }
            return $res;
        } elseif ($var instanceof Statement) {
            return new Statement(self::expand($var->getEntity(), $params, $recursive), self::expand($var->arguments, $params, $recursive));
        } elseif ($var === '%parameters%' && !\array_key_exists('parameters', $params)) {
            return $recursive ? self::expand($params, $params, \is_array($recursive) ? $recursive : []) : $params;
        } elseif (!\is_string($var)) {
            return $var;
        }
        $parts = \preg_split('#%([\\w.-]*)%#i', $var, -1, \PREG_SPLIT_DELIM_CAPTURE);
        $res = [];
        $php = \false;
        foreach ($parts as $n => $part) {
            if ($n % 2 === 0) {
                $res[] = $part;
            } elseif ($part === '') {
                $res[] = '%';
            } elseif (isset($recursive[$part])) {
                throw new Nette\InvalidArgumentException(\sprintf('Circular reference detected for variables: %s.', \implode(', ', \array_keys($recursive))));
            } else {
                $val = $params;
                foreach (\explode('.', $part) as $key) {
                    if (\is_array($val) && \array_key_exists($key, $val)) {
                        $val = $val[$key];
                    } elseif ($val instanceof DynamicParameter) {
                        $val = new DynamicParameter($val . '[' . \var_export($key, \true) . ']');
                    } else {
                        throw new Nette\InvalidArgumentException(\sprintf("Missing parameter '%s'.", $part));
                    }
                }
                if ($recursive) {
                    $val = self::expand($val, $params, (\is_array($recursive) ? $recursive : []) + [$part => 1]);
                }
                if (\strlen($part) + 2 === \strlen($var)) {
                    return $val;
                }
                if ($val instanceof DynamicParameter) {
                    $php = \true;
                } elseif (!\is_scalar($val)) {
                    throw new Nette\InvalidArgumentException(\sprintf("Unable to concatenate non-scalar parameter '%s' into '%s'.", $part, $var));
                }
                $res[] = $val;
            }
        }
        if ($php) {
            $res = \array_filter($res, function ($val) : bool {
                return $val !== '';
            });
            $res = \array_map(function ($val) : string {
                return $val instanceof DynamicParameter ? "({$val})" : \var_export((string) $val, \true);
            }, $res);
            return new DynamicParameter(\implode(' . ', $res));
        }
        return \implode('', $res);
    }
    /**
     * Escapes '%' and '@'
     * @param  mixed  $value
     * @return mixed
     */
    public static function escape($value)
    {
        if (\is_array($value)) {
            $res = [];
            foreach ($value as $key => $val) {
                $key = \is_string($key) ? \str_replace('%', '%%', $key) : $key;
                $res[$key] = self::escape($val);
            }
            return $res;
        } elseif (\is_string($value)) {
            return \preg_replace('#^@|%#', '$0$0', $value);
        }
        return $value;
    }
    /**
     * Removes ... and process constants recursively.
     */
    public static function filterArguments(array $args) : array
    {
        foreach ($args as $k => $v) {
            if ($v === '...') {
                unset($args[$k]);
            } elseif (\PHP_VERSION_ID >= 80100 && \is_string($v) && \preg_match('#^([\\w\\\\]+)::\\w+$#D', $v, $m) && \enum_exists($m[1])) {
                $args[$k] = new Nette\PhpGenerator\PhpLiteral($v);
            } elseif (\is_string($v) && \preg_match('#^[\\w\\\\]*::[A-Z][A-Z0-9_]*$#D', $v)) {
                $args[$k] = \constant(\ltrim($v, ':'));
            } elseif (\is_string($v) && \preg_match('#^@[\\w\\\\]+$#D', $v)) {
                $args[$k] = new Reference(\substr($v, 1));
            } elseif (\is_array($v)) {
                $args[$k] = self::filterArguments($v);
            } elseif ($v instanceof Statement) {
                [$tmp] = self::filterArguments([$v->getEntity()]);
                $args[$k] = new Statement($tmp, self::filterArguments($v->arguments));
            }
        }
        return $args;
    }
    /**
     * Replaces @extension with real extension name in service definition.
     * @param  mixed  $config
     * @return mixed
     */
    public static function prefixServiceName($config, string $namespace)
    {
        if (\is_string($config)) {
            if (\strncmp($config, '@extension.', 10) === 0) {
                $config = '@' . $namespace . '.' . \substr($config, 11);
            }
        } elseif ($config instanceof Reference) {
            if (\strncmp($config->getValue(), 'extension.', 9) === 0) {
                $config = new Reference($namespace . '.' . \substr($config->getValue(), 10));
            }
        } elseif ($config instanceof Statement) {
            return new Statement(self::prefixServiceName($config->getEntity(), $namespace), self::prefixServiceName($config->arguments, $namespace));
        } elseif (\is_array($config)) {
            foreach ($config as &$val) {
                $val = self::prefixServiceName($val, $namespace);
            }
        }
        return $config;
    }
    /**
     * Returns an annotation value.
     * @param  \ReflectionFunctionAbstract|\ReflectionProperty|\ReflectionClass  $ref
     */
    public static function parseAnnotation(\Reflector $ref, string $name) : ?string
    {
        if (!Reflection::areCommentsAvailable()) {
            throw new Nette\InvalidStateException('You have to enable phpDoc comments in opcode cache.');
        }
        $re = '#[\\s*]@' . \preg_quote($name, '#') . '(?=\\s|$)(?:[ \\t]+([^@\\s]\\S*))?#';
        if ($ref->getDocComment() && \preg_match($re, \trim($ref->getDocComment(), '/*'), $m)) {
            return $m[1] ?? '';
        }
        return null;
    }
    public static function getReturnTypeAnnotation(\ReflectionFunctionAbstract $func) : ?Type
    {
        $type = \preg_replace('#[|\\s].*#', '', (string) self::parseAnnotation($func, 'return'));
        if (!$type || $type === 'object' || $type === 'mixed') {
            return null;
        } elseif ($func instanceof \ReflectionMethod) {
            $type = $type === '$this' ? 'static' : $type;
            $type = Reflection::expandClassName($type, $func->getDeclaringClass());
        }
        return Type::fromString($type);
    }
    public static function ensureClassType(?Type $type, string $hint) : string
    {
        if (!$type) {
            throw new ServiceCreationException(\sprintf('%s is not declared.', \ucfirst($hint)));
        } elseif (!$type->isClass() || $type->isUnion()) {
            throw new ServiceCreationException(\sprintf("%s is not expected to be nullable/union/intersection/built-in, '%s' given.", \ucfirst($hint), $type));
        }
        $class = $type->getSingleName();
        if (!\class_exists($class) && !\interface_exists($class)) {
            throw new ServiceCreationException(\sprintf("Class '%s' not found.\nCheck the %s.", $class, $hint));
        }
        return $class;
    }
    public static function normalizeClass(string $type) : string
    {
        return \class_exists($type) || \interface_exists($type) ? (new \ReflectionClass($type))->name : $type;
    }
    /**
     * Non data-loss type conversion.
     * @param  mixed  $value
     * @return mixed
     * @throws Nette\InvalidStateException
     */
    public static function convertType($value, string $type)
    {
        if (\is_scalar($value)) {
            $norm = $value === \false ? '0' : (string) $value;
            if ($type === 'float') {
                $norm = \preg_replace('#\\.0*$#D', '', $norm);
            }
            $orig = $norm;
            \settype($norm, $type);
            if ($orig === ($norm === \false ? '0' : (string) $norm)) {
                return $norm;
            }
        }
        throw new Nette\InvalidStateException(\sprintf('Cannot convert %s to %s.', \is_scalar($value) ? "'{$value}'" : \gettype($value), $type));
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI\Extensions;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\DI;
use _PHPStan_dcc7b7cff\Nette\DI\Definitions;
use _PHPStan_dcc7b7cff\Nette\Utils\Reflection;
/**
 * Calls inject methods and fills @inject properties.
 */
final class InjectExtension extends DI\CompilerExtension
{
    public const TAG_INJECT = 'nette.inject';
    public function getConfigSchema() : Nette\Schema\Schema
    {
        return Nette\Schema\Expect::structure([]);
    }
    public function beforeCompile()
    {
        foreach ($this->getContainerBuilder()->getDefinitions() as $def) {
            if ($def->getTag(self::TAG_INJECT)) {
                $def = $def instanceof Definitions\FactoryDefinition ? $def->getResultDefinition() : $def;
                if ($def instanceof Definitions\ServiceDefinition) {
                    $this->updateDefinition($def);
                }
            }
        }
    }
    private function updateDefinition(Definitions\ServiceDefinition $def) : void
    {
        $resolvedType = (new DI\Resolver($this->getContainerBuilder()))->resolveEntityType($def->getFactory());
        $class = \is_subclass_of($resolvedType, $def->getType()) ? $resolvedType : $def->getType();
        $setups = $def->getSetup();
        foreach (self::getInjectProperties($class) as $property => $type) {
            $builder = $this->getContainerBuilder();
            $inject = new Definitions\Statement('$' . $property, [Definitions\Reference::fromType((string) $type)]);
            foreach ($setups as $key => $setup) {
                if ($setup->getEntity() === $inject->getEntity()) {
                    $inject = $setup;
                    $builder = null;
                    unset($setups[$key]);
                }
            }
            \array_unshift($setups, $inject);
        }
        foreach (\array_reverse(self::getInjectMethods($class)) as $method) {
            $inject = new Definitions\Statement($method);
            foreach ($setups as $key => $setup) {
                if ($setup->getEntity() === $inject->getEntity()) {
                    $inject = $setup;
                    unset($setups[$key]);
                }
            }
            \array_unshift($setups, $inject);
        }
        $def->setSetup($setups);
    }
    /**
     * Generates list of inject methods.
     * @internal
     */
    public static function getInjectMethods(string $class) : array
    {
        $classes = [];
        foreach (\get_class_methods($class) as $name) {
            if (\substr($name, 0, 6) === 'inject') {
                $classes[$name] = (new \ReflectionMethod($class, $name))->getDeclaringClass()->name;
            }
        }
        $methods = \array_keys($classes);
        \uksort($classes, function (string $a, string $b) use($classes, $methods) : int {
            return $classes[$a] === $classes[$b] ? \array_search($a, $methods, \true) <=> \array_search($b, $methods, \true) : (\is_a($classes[$a], $classes[$b], \true) ? 1 : -1);
        });
        return \array_keys($classes);
    }
    /**
     * Generates list of properties with annotation @inject.
     * @internal
     */
    public static function getInjectProperties(string $class) : array
    {
        $res = [];
        foreach ((new \ReflectionClass($class))->getProperties() as $rp) {
            $name = $rp->getName();
            $hasAttr = \PHP_VERSION_ID >= 80000 && $rp->getAttributes(DI\Attributes\Inject::class);
            if ($hasAttr || DI\Helpers::parseAnnotation($rp, 'inject') !== null) {
                if (!$rp->isPublic() || $rp->isStatic()) {
                    \trigger_error(\sprintf('Property %s for injection must be public and non-static.', Reflection::toString($rp)), \E_USER_WARNING);
                    continue;
                }
                if (\PHP_VERSION_ID >= 80100 && $rp->isReadOnly()) {
                    throw new Nette\InvalidStateException(\sprintf('Property %s for injection must not be readonly.', Reflection::toString($rp)));
                }
                $type = Nette\Utils\Type::fromReflection($rp);
                if (!$type && !$hasAttr && ($annotation = DI\Helpers::parseAnnotation($rp, 'var'))) {
                    $annotation = Reflection::expandClassName($annotation, Reflection::getPropertyDeclaringClass($rp));
                    $type = Nette\Utils\Type::fromString($annotation);
                }
                $res[$rp->getName()] = DI\Helpers::ensureClassType($type, 'type of property ' . Reflection::toString($rp));
            }
        }
        \ksort($res);
        return $res;
    }
    /**
     * Calls all methods starting with with "inject" using autowiring.
     * @param  object  $service
     */
    public static function callInjects(DI\Container $container, $service) : void
    {
        if (!\is_object($service)) {
            throw new Nette\InvalidArgumentException(\sprintf('Service must be object, %s given.', \gettype($service)));
        }
        foreach (self::getInjectMethods(\get_class($service)) as $method) {
            $container->callMethod([$service, $method]);
        }
        foreach (self::getInjectProperties(\get_class($service)) as $property => $type) {
            $service->{$property} = $container->getByType($type);
        }
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI\Extensions;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Enables registration of other extensions in $config file
 */
final class ExtensionsExtension extends Nette\DI\CompilerExtension
{
    public function getConfigSchema() : Nette\Schema\Schema
    {
        return Nette\Schema\Expect::arrayOf('string|_PHPStan_dcc7b7cff\\Nette\\DI\\Definitions\\Statement');
    }
    public function loadConfiguration()
    {
        foreach ($this->getConfig() as $name => $class) {
            if (\is_int($name)) {
                $name = null;
            }
            $args = [];
            if ($class instanceof Nette\DI\Definitions\Statement) {
                [$class, $args] = [$class->getEntity(), $class->arguments];
            }
            if (!\is_a($class, Nette\DI\CompilerExtension::class, \true)) {
                throw new Nette\DI\InvalidConfigurationException(\sprintf("Extension '%s' not found or is not Nette\\DI\\CompilerExtension descendant.", $class));
            }
            $this->compiler->addExtension($name, (new \ReflectionClass($class))->newInstanceArgs($args));
        }
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI\Extensions;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\Loaders\RobotLoader;
use _PHPStan_dcc7b7cff\Nette\Schema\Expect;
use _PHPStan_dcc7b7cff\Nette\Utils\Arrays;
/**
 * Services auto-discovery.
 */
final class SearchExtension extends Nette\DI\CompilerExtension
{
    /** @var array */
    private $classes = [];
    /** @var string */
    private $tempDir;
    public function __construct(string $tempDir)
    {
        $this->tempDir = $tempDir;
    }
    public function getConfigSchema() : Nette\Schema\Schema
    {
        return Expect::arrayOf(Expect::structure(['in' => Expect::string()->required(), 'files' => Expect::anyOf(Expect::listOf('string'), Expect::string()->castTo('array'))->default([]), 'classes' => Expect::anyOf(Expect::listOf('string'), Expect::string()->castTo('array'))->default([]), 'extends' => Expect::anyOf(Expect::listOf('string'), Expect::string()->castTo('array'))->default([]), 'implements' => Expect::anyOf(Expect::listOf('string'), Expect::string()->castTo('array'))->default([]), 'exclude' => Expect::structure(['classes' => Expect::anyOf(Expect::listOf('string'), Expect::string()->castTo('array'))->default([]), 'extends' => Expect::anyOf(Expect::listOf('string'), Expect::string()->castTo('array'))->default([]), 'implements' => Expect::anyOf(Expect::listOf('string'), Expect::string()->castTo('array'))->default([])]), 'tags' => Expect::array()]))->before(function ($val) {
            return \is_string($val['in'] ?? null) ? ['default' => $val] : $val;
        });
    }
    public function loadConfiguration()
    {
        foreach (\array_filter($this->config) as $name => $batch) {
            if (!\is_dir($batch->in)) {
                throw new Nette\DI\InvalidConfigurationException(\sprintf("Option '%s › %s › in' must be valid directory name, '%s' given.", $this->name, $name, $batch->in));
            }
            foreach ($this->findClasses($batch) as $class) {
                $this->classes[$class] = \array_merge($this->classes[$class] ?? [], $batch->tags);
            }
        }
    }
    public function findClasses(\stdClass $config) : array
    {
        $robot = new RobotLoader();
        $robot->setTempDirectory($this->tempDir);
        $robot->addDirectory($config->in);
        $robot->acceptFiles = $config->files ?: ['*.php'];
        $robot->reportParseErrors(\false);
        $robot->refresh();
        $classes = \array_unique(\array_keys($robot->getIndexedClasses()));
        $exclude = $config->exclude;
        $acceptRE = self::buildNameRegexp($config->classes);
        $rejectRE = self::buildNameRegexp($exclude->classes);
        $acceptParent = \array_merge($config->extends, $config->implements);
        $rejectParent = \array_merge($exclude->extends, $exclude->implements);
        $found = [];
        foreach ($classes as $class) {
            if (!\class_exists($class) && !\interface_exists($class) && !\trait_exists($class)) {
                throw new Nette\InvalidStateException(\sprintf('Class %s was found, but it cannot be loaded by autoloading.', $class));
            }
            $rc = new \ReflectionClass($class);
            if (($rc->isInstantiable() || $rc->isInterface() && \count($methods = $rc->getMethods()) === 1 && $methods[0]->name === 'create') && (!$acceptRE || \preg_match($acceptRE, $rc->name)) && (!$rejectRE || !\preg_match($rejectRE, $rc->name)) && (!$acceptParent || Arrays::some($acceptParent, function ($nm) use($rc) {
                return $rc->isSubclassOf($nm);
            })) && (!$rejectParent || Arrays::every($rejectParent, function ($nm) use($rc) {
                return !$rc->isSubclassOf($nm);
            }))) {
                $found[] = $rc->name;
            }
        }
        return $found;
    }
    public function beforeCompile()
    {
        $builder = $this->getContainerBuilder();
        foreach ($this->classes as $class => $foo) {
            if ($builder->findByType($class)) {
                unset($this->classes[$class]);
            }
        }
        foreach ($this->classes as $class => $tags) {
            $def = \class_exists($class) ? $builder->addDefinition(null)->setType($class) : $builder->addFactoryDefinition(null)->setImplement($class);
            $def->setTags(Arrays::normalize($tags, \true));
        }
    }
    private static function buildNameRegexp(array $masks) : ?string
    {
        $res = [];
        foreach ((array) $masks as $mask) {
            $mask = (\strpos($mask, '\\') === \false ? '**\\' : '') . $mask;
            $mask = \preg_quote($mask, '#');
            $mask = \str_replace('\\*\\*\\\\', '(.*\\\\)?', $mask);
            $mask = \str_replace('\\\\\\*\\*', '(\\\\.*)?', $mask);
            $mask = \str_replace('\\*', '\\w*', $mask);
            $res[] = $mask;
        }
        return $res ? '#^(' . \implode('|', $res) . ')$#i' : null;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI\Extensions;

use _PHPStan_dcc7b7cff\Nette;
/**
 * PHP directives definition.
 */
final class PhpExtension extends Nette\DI\CompilerExtension
{
    public function getConfigSchema() : Nette\Schema\Schema
    {
        return Nette\Schema\Expect::arrayOf('scalar');
    }
    public function loadConfiguration()
    {
        foreach ($this->getConfig() as $name => $value) {
            if ($value === null) {
                continue;
            } elseif ($name === 'include_path') {
                $this->initialization->addBody('set_include_path(?);', [\str_replace(';', \PATH_SEPARATOR, $value)]);
            } elseif ($name === 'ignore_user_abort') {
                $this->initialization->addBody('ignore_user_abort(?);', [$value]);
            } elseif ($name === 'max_execution_time') {
                $this->initialization->addBody('set_time_limit(?);', [$value]);
            } elseif ($name === 'date.timezone') {
                $this->initialization->addBody('date_default_timezone_set(?);', [$value]);
            } elseif (\function_exists('ini_set')) {
                $this->initialization->addBody('ini_set(?, ?);', [$name, $value === \false ? '0' : (string) $value]);
            } elseif (\ini_get($name) !== (string) $value) {
                throw new Nette\NotSupportedException('Required function ini_set() is disabled.');
            }
        }
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI\Extensions;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\DI\Definitions;
use _PHPStan_dcc7b7cff\Nette\DI\Definitions\Statement;
use _PHPStan_dcc7b7cff\Nette\DI\Helpers;
/**
 * Service definitions loader.
 */
final class ServicesExtension extends Nette\DI\CompilerExtension
{
    use Nette\SmartObject;
    public function getConfigSchema() : Nette\Schema\Schema
    {
        return Nette\Schema\Expect::arrayOf(new Nette\DI\Config\DefinitionSchema($this->getContainerBuilder()));
    }
    public function loadConfiguration()
    {
        $this->loadDefinitions($this->config);
    }
    /**
     * Loads list of service definitions.
     */
    public function loadDefinitions(array $config)
    {
        foreach ($config as $key => $defConfig) {
            $this->loadDefinition($this->convertKeyToName($key), $defConfig);
        }
    }
    /**
     * Loads service definition from normalized configuration.
     */
    private function loadDefinition(?string $name, \stdClass $config) : void
    {
        try {
            if ((array) $config === [\false]) {
                $this->getContainerBuilder()->removeDefinition($name);
                return;
            } elseif (!empty($config->alteration) && !$this->getContainerBuilder()->hasDefinition($name)) {
                throw new Nette\DI\InvalidConfigurationException('missing original definition for alteration.');
            }
            $def = $this->retrieveDefinition($name, $config);
            static $methods = [Definitions\ServiceDefinition::class => 'updateServiceDefinition', Definitions\AccessorDefinition::class => 'updateAccessorDefinition', Definitions\FactoryDefinition::class => 'updateFactoryDefinition', Definitions\LocatorDefinition::class => 'updateLocatorDefinition', Definitions\ImportedDefinition::class => 'updateImportedDefinition'];
            $this->{$methods[$config->defType]}($def, $config);
            $this->updateDefinition($def, $config);
        } catch (\Exception $e) {
            throw new Nette\DI\InvalidConfigurationException(($name ? "Service '{$name}': " : '') . $e->getMessage(), 0, $e);
        }
    }
    /**
     * Updates service definition according to normalized configuration.
     */
    private function updateServiceDefinition(Definitions\ServiceDefinition $definition, \stdClass $config) : void
    {
        if ($config->factory) {
            $definition->setFactory(Helpers::filterArguments([$config->factory])[0]);
            $definition->setType(null);
        }
        if ($config->type) {
            $definition->setType($config->type);
        }
        if ($config->arguments) {
            $arguments = Helpers::filterArguments($config->arguments);
            if (empty($config->reset['arguments']) && !Nette\Utils\Arrays::isList($arguments)) {
                $arguments += $definition->getFactory()->arguments;
            }
            $definition->setArguments($arguments);
        }
        if (isset($config->setup)) {
            if (!empty($config->reset['setup'])) {
                $definition->setSetup([]);
            }
            foreach (Helpers::filterArguments($config->setup) as $id => $setup) {
                if (\is_array($setup)) {
                    $setup = new Statement(\key($setup), \array_values($setup));
                }
                $definition->addSetup($setup);
            }
        }
        if (isset($config->inject)) {
            $definition->addTag(InjectExtension::TAG_INJECT, $config->inject);
        }
    }
    private function updateAccessorDefinition(Definitions\AccessorDefinition $definition, \stdClass $config) : void
    {
        if (isset($config->implement)) {
            $definition->setImplement($config->implement);
        }
        if ($ref = $config->factory ?? $config->type ?? null) {
            $definition->setReference($ref);
        }
    }
    private function updateFactoryDefinition(Definitions\FactoryDefinition $definition, \stdClass $config) : void
    {
        $resultDef = $definition->getResultDefinition();
        if (isset($config->implement)) {
            $definition->setImplement($config->implement);
            $definition->setAutowired(\true);
        }
        if ($config->factory) {
            $resultDef->setFactory(Helpers::filterArguments([$config->factory])[0]);
        }
        if ($config->type) {
            $resultDef->setFactory($config->type);
        }
        if ($config->arguments) {
            $arguments = Helpers::filterArguments($config->arguments);
            if (empty($config->reset['arguments']) && !Nette\Utils\Arrays::isList($arguments)) {
                $arguments += $resultDef->getFactory()->arguments;
            }
            $resultDef->setArguments($arguments);
        }
        if (isset($config->setup)) {
            if (!empty($config->reset['setup'])) {
                $resultDef->setSetup([]);
            }
            foreach (Helpers::filterArguments($config->setup) as $id => $setup) {
                if (\is_array($setup)) {
                    $setup = new Statement(\key($setup), \array_values($setup));
                }
                $resultDef->addSetup($setup);
            }
        }
        if (isset($config->parameters)) {
            $definition->setParameters($config->parameters);
        }
        if (isset($config->inject)) {
            $definition->addTag(InjectExtension::TAG_INJECT, $config->inject);
        }
    }
    private function updateLocatorDefinition(Definitions\LocatorDefinition $definition, \stdClass $config) : void
    {
        if (isset($config->implement)) {
            $definition->setImplement($config->implement);
        }
        if (isset($config->references)) {
            $definition->setReferences($config->references);
        }
        if (isset($config->tagged)) {
            $definition->setTagged($config->tagged);
        }
    }
    private function updateImportedDefinition(Definitions\ImportedDefinition $definition, \stdClass $config) : void
    {
        if ($config->type) {
            $definition->setType($config->type);
        }
    }
    private function updateDefinition(Definitions\Definition $definition, \stdClass $config) : void
    {
        if (isset($config->autowired)) {
            $definition->setAutowired($config->autowired);
        }
        if (isset($config->tags)) {
            if (!empty($config->reset['tags'])) {
                $definition->setTags([]);
            }
            foreach ($config->tags as $tag => $attrs) {
                if (\is_int($tag) && \is_string($attrs)) {
                    $definition->addTag($attrs);
                } else {
                    $definition->addTag($tag, $attrs);
                }
            }
        }
    }
    private function convertKeyToName($key) : ?string
    {
        if (\is_int($key)) {
            return null;
        } elseif (\preg_match('#^@[\\w\\\\]+$#D', $key)) {
            return $this->getContainerBuilder()->getByType(\substr($key, 1), \true);
        }
        return $key;
    }
    private function retrieveDefinition(?string $name, \stdClass $config) : Definitions\Definition
    {
        $builder = $this->getContainerBuilder();
        if (!empty($config->reset['all'])) {
            $builder->removeDefinition($name);
        }
        return $name && $builder->hasDefinition($name) ? $builder->getDefinition($name) : $builder->addDefinition($name, new $config->defType());
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI\Extensions;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\DI\DynamicParameter;
/**
 * Parameters.
 */
final class ParametersExtension extends Nette\DI\CompilerExtension
{
    /** @var string[] */
    public $dynamicParams = [];
    /** @var string[][] */
    public $dynamicValidators = [];
    /** @var array */
    private $compilerConfig;
    public function __construct(array &$compilerConfig)
    {
        $this->compilerConfig =& $compilerConfig;
    }
    public function loadConfiguration()
    {
        $builder = $this->getContainerBuilder();
        $params = $this->config;
        $resolver = new Nette\DI\Resolver($builder);
        $generator = new Nette\DI\PhpGenerator($builder);
        foreach ($this->dynamicParams as $key) {
            $params[$key] = \array_key_exists($key, $params) ? new DynamicParameter($generator->formatPhp('($this->parameters[?] \\?\\? ?)', $resolver->completeArguments(Nette\DI\Helpers::filterArguments([$key, $params[$key]])))) : new DynamicParameter((new Nette\PhpGenerator\Dumper())->format('$this->parameters[?]', $key));
        }
        $builder->parameters = Nette\DI\Helpers::expand($params, $params, \true);
        // expand all except 'services'
        $slice = \array_diff_key($this->compilerConfig, ['services' => 1]);
        $slice = Nette\DI\Helpers::expand($slice, $builder->parameters);
        $this->compilerConfig = $slice + $this->compilerConfig;
    }
    public function afterCompile(Nette\PhpGenerator\ClassType $class)
    {
        $parameters = $this->getContainerBuilder()->parameters;
        \array_walk_recursive($parameters, function (&$val) : void {
            if ($val instanceof Nette\DI\Definitions\Statement || $val instanceof DynamicParameter) {
                $val = null;
            }
        });
        $cnstr = $class->getMethod('__construct');
        $cnstr->addBody('$this->parameters += ?;', [$parameters]);
        foreach ($this->dynamicValidators as [$param, $expected]) {
            if ($param instanceof Nette\DI\Definitions\Statement) {
                continue;
            }
            $cnstr->addBody('Nette\\Utils\\Validators::assert(?, ?, ?);', [$param, $expected, 'dynamic parameter']);
        }
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI\Extensions;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Constant definitions.
 */
final class ConstantsExtension extends Nette\DI\CompilerExtension
{
    public function loadConfiguration()
    {
        foreach ($this->getConfig() as $name => $value) {
            $this->initialization->addBody('define(?, ?);', [$name, $value]);
        }
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI\Extensions;

use _PHPStan_dcc7b7cff\Nette;
/**
 * DI extension.
 */
final class DIExtension extends Nette\DI\CompilerExtension
{
    /** @var array */
    public $exportedTags = [];
    /** @var array */
    public $exportedTypes = [];
    /** @var bool */
    private $debugMode;
    /** @var float */
    private $time;
    public function __construct(bool $debugMode = \false)
    {
        $this->debugMode = $debugMode;
        $this->time = \microtime(\true);
        $this->config = new class
        {
            /** @var ?bool */
            public $debugger;
            /** @var string[] */
            public $excluded = [];
            /** @var ?string */
            public $parentClass;
            /** @var object */
            public $export;
        };
        $this->config->export = new class
        {
            /** @var bool */
            public $parameters = \true;
            /** @var string[]|bool|null */
            public $tags = \true;
            /** @var string[]|bool|null */
            public $types = \true;
        };
    }
    public function loadConfiguration()
    {
        $builder = $this->getContainerBuilder();
        $builder->addExcludedClasses($this->config->excluded);
    }
    public function beforeCompile()
    {
        if (!$this->config->export->parameters) {
            $this->getContainerBuilder()->parameters = [];
        }
    }
    public function afterCompile(Nette\PhpGenerator\ClassType $class)
    {
        if ($this->config->parentClass) {
            $class->setExtends($this->config->parentClass);
        }
        $this->restrictTags($class);
        $this->restrictTypes($class);
        if ($this->debugMode && ($this->config->debugger ?? $this->getContainerBuilder()->getByType(\_PHPStan_dcc7b7cff\Tracy\Bar::class))) {
            $this->enableTracyIntegration();
        }
        $this->initializeTaggedServices();
    }
    private function restrictTags(Nette\PhpGenerator\ClassType $class) : void
    {
        $option = $this->config->export->tags;
        if ($option === \true) {
        } elseif ($option === \false) {
            $class->removeProperty('tags');
        } elseif ($prop = $class->getProperties()['tags'] ?? null) {
            $prop->setValue(\array_intersect_key($prop->getValue(), $this->exportedTags + \array_flip((array) $option)));
        }
    }
    private function restrictTypes(Nette\PhpGenerator\ClassType $class) : void
    {
        $option = $this->config->export->types;
        if ($option === \true) {
            return;
        }
        $prop = $class->getProperty('wiring');
        $prop->setValue(\array_intersect_key($prop->getValue(), $this->exportedTypes + (\is_array($option) ? \array_flip($option) : [])));
    }
    private function initializeTaggedServices() : void
    {
        foreach (\array_filter($this->getContainerBuilder()->findByTag('run')) as $name => $on) {
            \trigger_error("Tag 'run' used in service '{$name}' definition is deprecated.", \E_USER_DEPRECATED);
            $this->initialization->addBody('$this->getService(?);', [$name]);
        }
    }
    private function enableTracyIntegration() : void
    {
        Nette\Bridges\DITracy\ContainerPanel::$compilationTime = $this->time;
        $this->initialization->addBody($this->getContainerBuilder()->formatPhp('?;', [new Nette\DI\Definitions\Statement('@Tracy\\Bar::addPanel', [new Nette\DI\Definitions\Statement(Nette\Bridges\DITracy\ContainerPanel::class)])]));
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI\Extensions;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\DI\Definitions;
use _PHPStan_dcc7b7cff\Nette\Schema\Expect;
/**
 * Decorators for services.
 */
final class DecoratorExtension extends Nette\DI\CompilerExtension
{
    public function getConfigSchema() : Nette\Schema\Schema
    {
        return Expect::arrayOf(Expect::structure(['setup' => Expect::list(), 'tags' => Expect::array(), 'inject' => Expect::bool()]));
    }
    public function beforeCompile()
    {
        $this->getContainerBuilder()->resolve();
        foreach ($this->config as $type => $info) {
            if (!\class_exists($type) && !\interface_exists($type)) {
                throw new Nette\DI\InvalidConfigurationException(\sprintf("Decorated class '%s' not found.", $type));
            }
            if ($info->inject !== null) {
                $info->tags[InjectExtension::TAG_INJECT] = $info->inject;
            }
            $this->addSetups($type, Nette\DI\Helpers::filterArguments($info->setup));
            $this->addTags($type, Nette\DI\Helpers::filterArguments($info->tags));
        }
    }
    public function addSetups(string $type, array $setups) : void
    {
        foreach ($this->findByType($type) as $def) {
            if ($def instanceof Definitions\FactoryDefinition) {
                $def = $def->getResultDefinition();
            }
            foreach ($setups as $setup) {
                if (\is_array($setup)) {
                    $setup = new Definitions\Statement(\key($setup), \array_values($setup));
                }
                $def->addSetup($setup);
            }
        }
    }
    public function addTags(string $type, array $tags) : void
    {
        $tags = Nette\Utils\Arrays::normalize($tags, \true);
        foreach ($this->findByType($type) as $def) {
            $def->setTags($def->getTags() + $tags);
        }
    }
    private function findByType(string $type) : array
    {
        return \array_filter($this->getContainerBuilder()->getDefinitions(), function (Definitions\Definition $def) use($type) : bool {
            return \is_a($def->getType(), $type, \true) || $def instanceof Definitions\FactoryDefinition && \is_a($def->getResultType(), $type, \true);
        });
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI;

use _PHPStan_dcc7b7cff\Nette;
/**
 * The dependency injection container default implementation.
 */
class Container
{
    use Nette\SmartObject;
    /** @var array  user parameters */
    public $parameters = [];
    /** @var string[]  services name => type (complete list of available services) */
    protected $types = [];
    /** @var string[]  alias => service name */
    protected $aliases = [];
    /** @var array[]  tag name => service name => tag value */
    protected $tags = [];
    /** @var array[]  type => level => services */
    protected $wiring = [];
    /** @var object[]  service name => instance */
    private $instances = [];
    /** @var array circular reference detector */
    private $creating;
    /** @var array */
    private $methods;
    public function __construct(array $params = [])
    {
        $this->parameters = $params;
        $this->methods = \array_flip(\array_filter(\get_class_methods($this), function ($s) {
            return \preg_match('#^createService.#', $s);
        }));
    }
    public function getParameters() : array
    {
        return $this->parameters;
    }
    /**
     * Adds the service to the container.
     * @param  object  $service  service or its factory
     * @return static
     */
    public function addService(string $name, $service)
    {
        $name = $this->aliases[$name] ?? $name;
        if (isset($this->instances[$name])) {
            throw new Nette\InvalidStateException(\sprintf("Service '%s' already exists.", $name));
        } elseif (!\is_object($service)) {
            throw new Nette\InvalidArgumentException(\sprintf("Service '%s' must be a object, %s given.", $name, \gettype($service)));
        }
        if ($service instanceof \Closure) {
            $rt = Nette\Utils\Type::fromReflection(new \ReflectionFunction($service));
            $type = $rt ? Helpers::ensureClassType($rt, 'return type of factory') : '';
        } else {
            $type = \get_class($service);
        }
        if (!isset($this->methods[self::getMethodName($name)])) {
            $this->types[$name] = $type;
        } elseif (($expectedType = $this->getServiceType($name)) && !\is_a($type, $expectedType, \true)) {
            throw new Nette\InvalidArgumentException(\sprintf("Service '%s' must be instance of %s, %s.", $name, $expectedType, $type ? "{$type} given" : 'add typehint to closure'));
        }
        if ($service instanceof \Closure) {
            $this->methods[self::getMethodName($name)] = $service;
            $this->types[$name] = $type;
        } else {
            $this->instances[$name] = $service;
        }
        return $this;
    }
    /**
     * Removes the service from the container.
     */
    public function removeService(string $name) : void
    {
        $name = $this->aliases[$name] ?? $name;
        unset($this->instances[$name]);
    }
    /**
     * Gets the service object by name.
     * @return object
     * @throws MissingServiceException
     */
    public function getService(string $name)
    {
        if (!isset($this->instances[$name])) {
            if (isset($this->aliases[$name])) {
                return $this->getService($this->aliases[$name]);
            }
            $this->instances[$name] = $this->createService($name);
        }
        return $this->instances[$name];
    }
    /**
     * Gets the service object by name.
     * @return object
     * @throws MissingServiceException
     */
    public function getByName(string $name)
    {
        return $this->getService($name);
    }
    /**
     * Gets the service type by name.
     * @throws MissingServiceException
     */
    public function getServiceType(string $name) : string
    {
        $method = self::getMethodName($name);
        if (isset($this->aliases[$name])) {
            return $this->getServiceType($this->aliases[$name]);
        } elseif (isset($this->types[$name])) {
            return $this->types[$name];
        } elseif (isset($this->methods[$method])) {
            $type = (new \ReflectionMethod($this, $method))->getReturnType();
            return $type ? $type->getName() : '';
        } else {
            throw new MissingServiceException(\sprintf("Service '%s' not found.", $name));
        }
    }
    /**
     * Does the service exist?
     */
    public function hasService(string $name) : bool
    {
        $name = $this->aliases[$name] ?? $name;
        return isset($this->methods[self::getMethodName($name)]) || isset($this->instances[$name]);
    }
    /**
     * Is the service created?
     */
    public function isCreated(string $name) : bool
    {
        if (!$this->hasService($name)) {
            throw new MissingServiceException(\sprintf("Service '%s' not found.", $name));
        }
        $name = $this->aliases[$name] ?? $name;
        return isset($this->instances[$name]);
    }
    /**
     * Creates new instance of the service.
     * @return object
     * @throws MissingServiceException
     */
    public function createService(string $name, array $args = [])
    {
        $name = $this->aliases[$name] ?? $name;
        $method = self::getMethodName($name);
        $cb = $this->methods[$method] ?? null;
        if (isset($this->creating[$name])) {
            throw new Nette\InvalidStateException(\sprintf('Circular reference detected for services: %s.', \implode(', ', \array_keys($this->creating))));
        } elseif ($cb === null) {
            throw new MissingServiceException(\sprintf("Service '%s' not found.", $name));
        }
        try {
            $this->creating[$name] = \true;
            $service = $cb instanceof \Closure ? $cb(...$args) : $this->{$method}(...$args);
        } finally {
            unset($this->creating[$name]);
        }
        if (!\is_object($service)) {
            throw new Nette\UnexpectedValueException(\sprintf("Unable to create service '{$name}', value returned by %s is not object.", $cb instanceof \Closure ? 'closure' : "method {$method}()"));
        }
        return $service;
    }
    /**
     * Resolves service by type.
     * @template T
     * @param  class-string<T>  $type
     * @return ?T
     * @throws MissingServiceException
     */
    public function getByType(string $type, bool $throw = \true)
    {
        $type = Helpers::normalizeClass($type);
        if (!empty($this->wiring[$type][0])) {
            if (\count($names = $this->wiring[$type][0]) === 1) {
                return $this->getService($names[0]);
            }
            \natsort($names);
            throw new MissingServiceException(\sprintf("Multiple services of type {$type} found: %s.", \implode(', ', $names)));
        } elseif ($throw) {
            if (!\class_exists($type) && !\interface_exists($type)) {
                throw new MissingServiceException(\sprintf("Service of type '%s' not found. Check the class name because it cannot be found.", $type));
            }
            foreach ($this->methods as $method => $foo) {
                $methodType = (new \ReflectionMethod(static::class, $method))->getReturnType()->getName();
                if (\is_a($methodType, $type, \true)) {
                    throw new MissingServiceException(\sprintf('Service of type %s is not autowired or is missing in di › export › types.', $type));
                }
            }
            throw new MissingServiceException(\sprintf('Service of type %s not found. Did you add it to configuration file?', $type));
        }
        return null;
    }
    /**
     * Gets the autowired service names of the specified type.
     * @return string[]
     * @internal
     */
    public function findAutowired(string $type) : array
    {
        $type = Helpers::normalizeClass($type);
        return \array_merge($this->wiring[$type][0] ?? [], $this->wiring[$type][1] ?? []);
    }
    /**
     * Gets the service names of the specified type.
     * @return string[]
     */
    public function findByType(string $type) : array
    {
        $type = Helpers::normalizeClass($type);
        return empty($this->wiring[$type]) ? [] : \array_merge(...\array_values($this->wiring[$type]));
    }
    /**
     * Gets the service names of the specified tag.
     * @return array of [service name => tag attributes]
     */
    public function findByTag(string $tag) : array
    {
        return $this->tags[$tag] ?? [];
    }
    /********************* autowiring ****************d*g**/
    /**
     * Creates new instance using autowiring.
     * @return object
     * @throws Nette\InvalidArgumentException
     */
    public function createInstance(string $class, array $args = [])
    {
        $rc = new \ReflectionClass($class);
        if (!$rc->isInstantiable()) {
            throw new ServiceCreationException(\sprintf('Class %s is not instantiable.', $class));
        } elseif ($constructor = $rc->getConstructor()) {
            return $rc->newInstanceArgs($this->autowireArguments($constructor, $args));
        } elseif ($args) {
            throw new ServiceCreationException(\sprintf('Unable to pass arguments, class %s has no constructor.', $class));
        }
        return new $class();
    }
    /**
     * Calls all methods starting with with "inject" using autowiring.
     * @param  object  $service
     */
    public function callInjects($service) : void
    {
        Extensions\InjectExtension::callInjects($this, $service);
    }
    /**
     * Calls method using autowiring.
     * @return mixed
     */
    public function callMethod(callable $function, array $args = [])
    {
        return $function(...$this->autowireArguments(Nette\Utils\Callback::toReflection($function), $args));
    }
    private function autowireArguments(\ReflectionFunctionAbstract $function, array $args = []) : array
    {
        return Resolver::autowireArguments($function, $args, function (string $type, bool $single) {
            return $single ? $this->getByType($type) : \array_map([$this, 'getService'], $this->findAutowired($type));
        });
    }
    public static function getMethodName(string $name) : string
    {
        if ($name === '') {
            throw new Nette\InvalidArgumentException('Service name must be a non-empty string.');
        }
        return 'createService' . \str_replace('.', '__', \ucfirst($name));
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Autowiring.
 */
class Autowiring
{
    use Nette\SmartObject;
    /** @var ContainerBuilder */
    private $builder;
    /** @var array[]  type => services, used by getByType() */
    private $highPriority = [];
    /** @var array[]  type => services, used by findByType() */
    private $lowPriority = [];
    /** @var string[] of classes excluded from autowiring */
    private $excludedClasses = [];
    public function __construct(ContainerBuilder $builder)
    {
        $this->builder = $builder;
    }
    /**
     * Resolves service name by type.
     * @param  bool  $throw exception if service not found?
     * @throws MissingServiceException when not found
     * @throws ServiceCreationException when multiple found
     */
    public function getByType(string $type, bool $throw = \false) : ?string
    {
        $type = Helpers::normalizeClass($type);
        $types = $this->highPriority;
        if (empty($types[$type])) {
            if ($throw) {
                if (!\class_exists($type) && !\interface_exists($type)) {
                    throw new MissingServiceException(\sprintf("Service of type '%s' not found. Check the class name because it cannot be found.", $type));
                }
                throw new MissingServiceException(\sprintf('Service of type %s not found. Did you add it to configuration file?', $type));
            }
            return null;
        } elseif (\count($types[$type]) === 1) {
            return $types[$type][0];
        } else {
            $list = $types[$type];
            \natsort($list);
            $hint = \count($list) === 2 && ($tmp = \strpos($list[0], '.') xor \strpos($list[1], '.')) ? '. If you want to overwrite service ' . $list[$tmp ? 0 : 1] . ', give it proper name.' : '';
            throw new ServiceCreationException(\sprintf("Multiple services of type {$type} found: %s%s", \implode(', ', $list), $hint));
        }
    }
    /**
     * Gets the service names and definitions of the specified type.
     * @return Definitions\Definition[]  service name is key
     */
    public function findByType(string $type) : array
    {
        $type = Helpers::normalizeClass($type);
        $definitions = $this->builder->getDefinitions();
        $names = \array_merge($this->highPriority[$type] ?? [], $this->lowPriority[$type] ?? []);
        $res = [];
        foreach ($names as $name) {
            $res[$name] = $definitions[$name];
        }
        return $res;
    }
    /**
     * @param  string[]  $types
     */
    public function addExcludedClasses(array $types) : void
    {
        foreach ($types as $type) {
            if (\class_exists($type) || \interface_exists($type)) {
                $type = Helpers::normalizeClass($type);
                $this->excludedClasses += \class_parents($type) + \class_implements($type) + [$type => $type];
            }
        }
    }
    public function getClassList() : array
    {
        return [$this->lowPriority, $this->highPriority];
    }
    public function rebuild() : void
    {
        $this->lowPriority = $this->highPriority = $preferred = [];
        foreach ($this->builder->getDefinitions() as $name => $def) {
            if (!($type = $def->getType())) {
                continue;
            }
            $autowired = $def->getAutowired();
            if (\is_array($autowired)) {
                foreach ($autowired as $k => $autowiredType) {
                    if ($autowiredType === ContainerBuilder::THIS_SERVICE) {
                        $autowired[$k] = $type;
                    } elseif (!\is_a($type, $autowiredType, \true)) {
                        throw new ServiceCreationException(\sprintf("Incompatible class %s in autowiring definition of service '%s'.", $autowiredType, $name));
                    }
                }
            }
            foreach (\class_parents($type) + \class_implements($type) + [$type] as $parent) {
                if (!$autowired || isset($this->excludedClasses[$parent])) {
                    continue;
                } elseif (\is_array($autowired)) {
                    $priority = \false;
                    foreach ($autowired as $autowiredType) {
                        if (\is_a($parent, $autowiredType, \true)) {
                            if (empty($preferred[$parent]) && isset($this->highPriority[$parent])) {
                                $this->lowPriority[$parent] = \array_merge($this->lowPriority[$parent] ?? [], $this->highPriority[$parent]);
                                $this->highPriority[$parent] = [];
                            }
                            $preferred[$parent] = $priority = \true;
                            break;
                        }
                    }
                } else {
                    $priority = empty($preferred[$parent]);
                }
                $list = $priority ? 'highPriority' : 'lowPriority';
                $this->{$list}[$parent][] = $name;
            }
        }
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\DI\Definitions\Definition;
use _PHPStan_dcc7b7cff\Nette\DI\Definitions\Reference;
use _PHPStan_dcc7b7cff\Nette\DI\Definitions\Statement;
use _PHPStan_dcc7b7cff\Nette\PhpGenerator\Helpers as PhpHelpers;
use _PHPStan_dcc7b7cff\Nette\Utils\Callback;
use _PHPStan_dcc7b7cff\Nette\Utils\Reflection;
use _PHPStan_dcc7b7cff\Nette\Utils\Strings;
use _PHPStan_dcc7b7cff\Nette\Utils\Validators;
use ReflectionClass;
/**
 * Services resolver
 * @internal
 */
class Resolver
{
    use Nette\SmartObject;
    /** @var ContainerBuilder */
    private $builder;
    /** @var Definition|null */
    private $currentService;
    /** @var string|null */
    private $currentServiceType;
    /** @var bool */
    private $currentServiceAllowed = \false;
    /** @var \SplObjectStorage  circular reference detector */
    private $recursive;
    public function __construct(ContainerBuilder $builder)
    {
        $this->builder = $builder;
        $this->recursive = new \SplObjectStorage();
    }
    public function getContainerBuilder() : ContainerBuilder
    {
        return $this->builder;
    }
    public function resolveDefinition(Definition $def) : void
    {
        if ($this->recursive->contains($def)) {
            $names = \array_map(function ($item) {
                return $item->getName();
            }, \iterator_to_array($this->recursive));
            throw new ServiceCreationException(\sprintf('Circular reference detected for services: %s.', \implode(', ', $names)));
        }
        try {
            $this->recursive->attach($def);
            $def->resolveType($this);
            if (!$def->getType()) {
                throw new ServiceCreationException('Type of service is unknown.');
            }
        } catch (\Exception $e) {
            throw $this->completeException($e, $def);
        } finally {
            $this->recursive->detach($def);
        }
    }
    public function resolveReferenceType(Reference $ref) : ?string
    {
        if ($ref->isSelf()) {
            return $this->currentServiceType;
        } elseif ($ref->isType()) {
            return \ltrim($ref->getValue(), '\\');
        }
        $def = $this->resolveReference($ref);
        if (!$def->getType()) {
            $this->resolveDefinition($def);
        }
        return $def->getType();
    }
    public function resolveEntityType(Statement $statement) : ?string
    {
        $entity = $this->normalizeEntity($statement);
        if (\is_array($entity)) {
            if ($entity[0] instanceof Reference || $entity[0] instanceof Statement) {
                $entity[0] = $this->resolveEntityType($entity[0] instanceof Statement ? $entity[0] : new Statement($entity[0]));
                if (!$entity[0]) {
                    return null;
                }
            }
            try {
                /** @var \ReflectionMethod|\ReflectionFunction $reflection */
                $reflection = Callback::toReflection($entity[0] === '' ? $entity[1] : $entity);
                $refClass = $reflection instanceof \ReflectionMethod ? $reflection->getDeclaringClass() : null;
            } catch (\ReflectionException $e) {
                $refClass = $reflection = null;
            }
            if (isset($e) || $refClass && (!$reflection->isPublic() || $refClass->isTrait() && !$reflection->isStatic())) {
                throw new ServiceCreationException(\sprintf('Method %s() is not callable.', Callback::toString($entity)), 0, $e ?? null);
            }
            $this->addDependency($reflection);
            $type = Nette\Utils\Type::fromReflection($reflection) ?? Helpers::getReturnTypeAnnotation($reflection);
            if ($type) {
                return Helpers::ensureClassType($type, \sprintf('return type of %s()', Callback::toString($entity)));
            }
            return null;
        } elseif ($entity instanceof Reference) {
            // alias or factory
            return $this->resolveReferenceType($entity);
        } elseif (\is_string($entity)) {
            // class
            if (!\class_exists($entity)) {
                throw new ServiceCreationException(\sprintf(\interface_exists($entity) ? "Interface %s can not be used as 'factory', did you mean 'implement'?" : "Class '%s' not found.", $entity));
            }
            return $entity;
        }
        return null;
    }
    public function completeDefinition(Definition $def) : void
    {
        $this->currentService = \in_array($def, $this->builder->getDefinitions(), \true) ? $def : null;
        $this->currentServiceType = $def->getType();
        $this->currentServiceAllowed = \false;
        try {
            $def->complete($this);
            $this->addDependency(new \ReflectionClass($def->getType()));
        } catch (\Exception $e) {
            throw $this->completeException($e, $def);
        } finally {
            $this->currentService = $this->currentServiceType = null;
        }
    }
    public function completeStatement(Statement $statement, bool $currentServiceAllowed = \false) : Statement
    {
        $this->currentServiceAllowed = $currentServiceAllowed;
        $entity = $this->normalizeEntity($statement);
        $arguments = $this->convertReferences($statement->arguments);
        $getter = function (string $type, bool $single) {
            return $single ? $this->getByType($type) : \array_values(\array_filter($this->builder->findAutowired($type), function ($obj) {
                return $obj !== $this->currentService;
            }));
        };
        switch (\true) {
            case \is_string($entity) && Strings::contains($entity, '?'):
                // PHP literal
                break;
            case $entity === 'not':
                if (\count($arguments) > 1) {
                    throw new ServiceCreationException(\sprintf('Function %s() expects at most 1 parameter, %s given.', $entity, \count($arguments)));
                }
                $entity = ['', '!'];
                break;
            case $entity === 'bool':
            case $entity === 'int':
            case $entity === 'float':
            case $entity === 'string':
                if (\count($arguments) > 1) {
                    throw new ServiceCreationException(\sprintf('Function %s() expects at most 1 parameter, %s given.', $entity, \count($arguments)));
                }
                $arguments = [$arguments[0], $entity];
                $entity = [Helpers::class, 'convertType'];
                break;
            case \is_string($entity):
                // create class
                if (!\class_exists($entity)) {
                    throw new ServiceCreationException(\sprintf("Class '%s' not found.", $entity));
                } elseif ((new ReflectionClass($entity))->isAbstract()) {
                    throw new ServiceCreationException(\sprintf('Class %s is abstract.', $entity));
                } elseif (($rm = (new ReflectionClass($entity))->getConstructor()) !== null && !$rm->isPublic()) {
                    throw new ServiceCreationException(\sprintf('Class %s has %s constructor.', $entity, $rm->isProtected() ? 'protected' : 'private'));
                } elseif ($constructor = (new ReflectionClass($entity))->getConstructor()) {
                    $arguments = self::autowireArguments($constructor, $arguments, $getter);
                    $this->addDependency($constructor);
                } elseif ($arguments) {
                    throw new ServiceCreationException(\sprintf('Unable to pass arguments, class %s has no constructor.', $entity));
                }
                break;
            case $entity instanceof Reference:
                $entity = [new Reference(ContainerBuilder::THIS_CONTAINER), Container::getMethodName($entity->getValue())];
                break;
            case \is_array($entity):
                if (!\preg_match('#^\\$?(\\\\?' . PhpHelpers::PHP_IDENT . ')+(\\[\\])?$#D', $entity[1])) {
                    throw new ServiceCreationException(\sprintf("Expected function, method or property name, '%s' given.", $entity[1]));
                }
                switch (\true) {
                    case $entity[0] === '':
                        // function call
                        if (!Nette\Utils\Arrays::isList($arguments)) {
                            throw new ServiceCreationException(\sprintf('Unable to pass specified arguments to %s.', $entity[0]));
                        } elseif (!\function_exists($entity[1])) {
                            throw new ServiceCreationException(\sprintf("Function %s doesn't exist.", $entity[1]));
                        }
                        $rf = new \ReflectionFunction($entity[1]);
                        $arguments = self::autowireArguments($rf, $arguments, $getter);
                        $this->addDependency($rf);
                        break;
                    case $entity[0] instanceof Statement:
                        $entity[0] = $this->completeStatement($entity[0], $this->currentServiceAllowed);
                    // break omitted
                    case \is_string($entity[0]):
                    // static method call
                    case $entity[0] instanceof Reference:
                        if ($entity[1][0] === '$') {
                            // property getter, setter or appender
                            Validators::assert($arguments, 'list:0..1', "setup arguments for '" . Callback::toString($entity) . "'");
                            if (!$arguments && \substr($entity[1], -2) === '[]') {
                                throw new ServiceCreationException(\sprintf('Missing argument for %s.', $entity[1]));
                            }
                        } elseif ($type = $entity[0] instanceof Reference ? $this->resolveReferenceType($entity[0]) : $this->resolveEntityType($entity[0] instanceof Statement ? $entity[0] : new Statement($entity[0]))) {
                            $rc = new ReflectionClass($type);
                            if ($rc->hasMethod($entity[1])) {
                                $rm = $rc->getMethod($entity[1]);
                                if (!$rm->isPublic()) {
                                    throw new ServiceCreationException(\sprintf('%s::%s() is not callable.', $type, $entity[1]));
                                }
                                $arguments = self::autowireArguments($rm, $arguments, $getter);
                                $this->addDependency($rm);
                            } elseif (!Nette\Utils\Arrays::isList($arguments)) {
                                throw new ServiceCreationException(\sprintf('Unable to pass specified arguments to %s::%s().', $type, $entity[1]));
                            }
                        }
                }
        }
        try {
            $arguments = $this->completeArguments($arguments);
        } catch (ServiceCreationException $e) {
            if (!\strpos($e->getMessage(), ' (used in')) {
                $e->setMessage($e->getMessage() . " (used in {$this->entityToString($entity)})");
            }
            throw $e;
        }
        return new Statement($entity, $arguments);
    }
    public function completeArguments(array $arguments) : array
    {
        \array_walk_recursive($arguments, function (&$val) : void {
            if ($val instanceof Statement) {
                $entity = $val->getEntity();
                if ($entity === 'typed' || $entity === 'tagged') {
                    $services = [];
                    $current = $this->currentService ? $this->currentService->getName() : null;
                    foreach ($val->arguments as $argument) {
                        foreach ($entity === 'tagged' ? $this->builder->findByTag($argument) : $this->builder->findAutowired($argument) as $name => $foo) {
                            if ($name !== $current) {
                                $services[] = new Reference($name);
                            }
                        }
                    }
                    $val = $this->completeArguments($services);
                } else {
                    $val = $this->completeStatement($val, $this->currentServiceAllowed);
                }
            } elseif ($val instanceof Definition || $val instanceof Reference) {
                $val = $this->normalizeEntity(new Statement($val));
            }
        });
        return $arguments;
    }
    /** @return string|array|Reference  literal, Class, Reference, [Class, member], [, globalFunc], [Reference, member], [Statement, member] */
    private function normalizeEntity(Statement $statement)
    {
        $entity = $statement->getEntity();
        if (\is_array($entity)) {
            $item =& $entity[0];
        } else {
            $item =& $entity;
        }
        if ($item instanceof Definition) {
            $name = \current(\array_keys($this->builder->getDefinitions(), $item, \true));
            if ($name === \false) {
                throw new ServiceCreationException(\sprintf("Service '%s' not found in definitions.", $item->getName()));
            }
            $item = new Reference($name);
        }
        if ($item instanceof Reference) {
            $item = $this->normalizeReference($item);
        }
        return $entity;
    }
    /**
     * Normalizes reference to 'self' or named reference (or leaves it typed if it is not possible during resolving) and checks existence of service.
     */
    public function normalizeReference(Reference $ref) : Reference
    {
        $service = $ref->getValue();
        if ($ref->isSelf()) {
            return $ref;
        } elseif ($ref->isName()) {
            if (!$this->builder->hasDefinition($service)) {
                throw new ServiceCreationException(\sprintf("Reference to missing service '%s'.", $service));
            }
            return $this->currentService && $service === $this->currentService->getName() ? new Reference(Reference::SELF) : $ref;
        }
        try {
            return $this->getByType($service);
        } catch (NotAllowedDuringResolvingException $e) {
            return new Reference($service);
        }
    }
    public function resolveReference(Reference $ref) : Definition
    {
        return $ref->isSelf() ? $this->currentService : $this->builder->getDefinition($ref->getValue());
    }
    /**
     * Returns named reference to service resolved by type (or 'self' reference for local-autowiring).
     * @throws ServiceCreationException when multiple found
     * @throws MissingServiceException when not found
     */
    public function getByType(string $type) : Reference
    {
        if ($this->currentService && $this->currentServiceAllowed && \is_a($this->currentServiceType, $type, \true)) {
            return new Reference(Reference::SELF);
        }
        $name = $this->builder->getByType($type, \true);
        if (!$this->currentServiceAllowed && $this->currentService === $this->builder->getDefinition($name)) {
            throw new MissingServiceException();
        }
        return new Reference($name);
    }
    /**
     * Adds item to the list of dependencies.
     * @param  \ReflectionClass|\ReflectionFunctionAbstract|string  $dep
     * @return static
     */
    public function addDependency($dep)
    {
        $this->builder->addDependency($dep);
        return $this;
    }
    private function completeException(\Exception $e, Definition $def) : ServiceCreationException
    {
        if ($e instanceof ServiceCreationException && Strings::startsWith($e->getMessage(), "Service '")) {
            return $e;
        }
        $name = $def->getName();
        $type = $def->getType();
        if ($name && !\ctype_digit($name)) {
            $message = "Service '{$name}'" . ($type ? " (type of {$type})" : '') . ': ';
        } elseif ($type) {
            $message = "Service of type {$type}: ";
        } elseif ($def instanceof Definitions\ServiceDefinition && $def->getEntity()) {
            $message = 'Service (' . $this->entityToString($def->getEntity()) . '): ';
        } else {
            $message = '';
        }
        $message .= $type ? \str_replace("{$type}::", \preg_replace('~.*\\\\~', '', $type) . '::', $e->getMessage()) : $e->getMessage();
        return $e instanceof ServiceCreationException ? $e->setMessage($message) : new ServiceCreationException($message, 0, $e);
    }
    private function entityToString($entity) : string
    {
        $referenceToText = function (Reference $ref) : string {
            return $ref->isSelf() && $this->currentService ? '@' . $this->currentService->getName() : '@' . $ref->getValue();
        };
        if (\is_string($entity)) {
            return $entity . '::__construct()';
        } elseif ($entity instanceof Reference) {
            $entity = $referenceToText($entity);
        } elseif (\is_array($entity)) {
            if (\strpos($entity[1], '$') === \false) {
                $entity[1] .= '()';
            }
            if ($entity[0] instanceof Reference) {
                $entity[0] = $referenceToText($entity[0]);
            } elseif (!\is_string($entity[0])) {
                return $entity[1];
            }
            return \implode('::', $entity);
        }
        return (string) $entity;
    }
    private function convertReferences(array $arguments) : array
    {
        \array_walk_recursive($arguments, function (&$val) : void {
            if (\is_string($val) && \strlen($val) > 1 && $val[0] === '@' && $val[1] !== '@') {
                $pair = \explode('::', \substr($val, 1), 2);
                if (!isset($pair[1])) {
                    // @service
                    $val = new Reference($pair[0]);
                } elseif (\preg_match('#^[A-Z][A-Z0-9_]*$#D', $pair[1], $m)) {
                    // @service::CONSTANT
                    $val = ContainerBuilder::literal($this->resolveReferenceType(new Reference($pair[0])) . '::' . $pair[1]);
                } else {
                    // @service::property
                    $val = new Statement([new Reference($pair[0]), '$' . $pair[1]]);
                }
            } elseif (\is_string($val) && \substr($val, 0, 2) === '@@') {
                // escaped text @@
                $val = \substr($val, 1);
            }
        });
        return $arguments;
    }
    /**
     * Add missing arguments using autowiring.
     * @param  (callable(string $type, bool $single): (object|object[]|null))  $getter
     * @throws ServiceCreationException
     */
    public static function autowireArguments(\ReflectionFunctionAbstract $method, array $arguments, callable $getter) : array
    {
        $optCount = 0;
        $num = -1;
        $res = [];
        foreach ($method->getParameters() as $num => $param) {
            $paramName = $param->name;
            if (!$param->isVariadic() && \array_key_exists($paramName, $arguments)) {
                $res[$num] = $arguments[$paramName];
                unset($arguments[$paramName], $arguments[$num]);
            } elseif (\array_key_exists($num, $arguments)) {
                $res[$num] = $arguments[$num];
                unset($arguments[$num]);
            } else {
                $res[$num] = self::autowireArgument($param, $getter);
            }
            $optCount = $param->isOptional() && $res[$num] === ($param->isDefaultValueAvailable() ? Reflection::getParameterDefaultValue($param) : null) ? $optCount + 1 : 0;
        }
        // extra parameters
        while (\array_key_exists(++$num, $arguments)) {
            $res[$num] = $arguments[$num];
            unset($arguments[$num]);
            $optCount = 0;
        }
        if ($arguments) {
            throw new ServiceCreationException(\sprintf('Unable to pass specified arguments to %s.', Reflection::toString($method)));
        } elseif ($optCount) {
            $res = \array_slice($res, 0, -$optCount);
        }
        return $res;
    }
    /**
     * Resolves missing argument using autowiring.
     * @param  (callable(string $type, bool $single): (object|object[]|null))  $getter
     * @throws ServiceCreationException
     * @return mixed
     */
    private static function autowireArgument(\ReflectionParameter $parameter, callable $getter)
    {
        $method = $parameter->getDeclaringFunction();
        $desc = Reflection::toString($parameter);
        $type = Nette\Utils\Type::fromReflection($parameter);
        if ($parameter->getType() instanceof \ReflectionIntersectionType) {
            throw new ServiceCreationException(\sprintf('Parameter %s has intersection type, so its value must be specified.', $desc));
        } elseif ($type && $type->isClass()) {
            $class = $type->getSingleName();
            try {
                $res = $getter($class, \true);
            } catch (MissingServiceException $e) {
                $res = null;
            } catch (ServiceCreationException $e) {
                throw new ServiceCreationException("{$e->getMessage()} (required by {$desc})", 0, $e);
            }
            if ($res !== null || $parameter->allowsNull()) {
                return $res;
            } elseif (\class_exists($class) || \interface_exists($class)) {
                throw new ServiceCreationException(\sprintf('Service of type %s required by %s not found. Did you add it to configuration file?', $class, $desc));
            } else {
                throw new ServiceCreationException(\sprintf("Class '%s' required by %s not found. Check the parameter type and 'use' statements.", $class, $desc));
            }
        } elseif ($method instanceof \ReflectionMethod && $type && $type->getSingleName() === 'array' && \preg_match('#@param[ \\t]+([\\w\\\\]+)\\[\\][ \\t]+\\$' . $parameter->name . '#', (string) $method->getDocComment(), $m) && ($itemType = Reflection::expandClassName($m[1], $method->getDeclaringClass())) && (\class_exists($itemType) || \interface_exists($itemType))) {
            return $getter($itemType, \false);
        } elseif ($type && $parameter->allowsNull() || $parameter->isOptional() || $parameter->isDefaultValueAvailable()) {
            // !optional + defaultAvailable = func($a = null, $b) since 5.4.7
            // optional + !defaultAvailable = i.e. Exception::__construct, mysqli::mysqli, ...
            return $parameter->isDefaultValueAvailable() ? Reflection::getParameterDefaultValue($parameter) : null;
        } else {
            throw new ServiceCreationException(\sprintf('Parameter %s has %s, so its value must be specified.', $desc, $type && $type->isUnion() ? 'union type and no default value' : 'no class type or default value'));
        }
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\Utils\Reflection;
use _PHPStan_dcc7b7cff\Nette\Utils\Type;
use ReflectionClass;
use ReflectionMethod;
/**
 * Cache dependencies checker.
 */
class DependencyChecker
{
    use Nette\SmartObject;
    public const VERSION = 1;
    /** @var array of ReflectionClass|\ReflectionFunctionAbstract|string */
    private $dependencies = [];
    /**
     * Adds dependencies to the list.
     * @return static
     */
    public function add(array $deps)
    {
        $this->dependencies = \array_merge($this->dependencies, $deps);
        return $this;
    }
    /**
     * Exports dependencies.
     */
    public function export() : array
    {
        $files = $phpFiles = $classes = $functions = [];
        foreach ($this->dependencies as $dep) {
            if (\is_string($dep)) {
                $files[] = $dep;
            } elseif ($dep instanceof ReflectionClass) {
                if (empty($classes[$name = $dep->name])) {
                    $all = [$name] + \class_parents($name) + \class_implements($name);
                    foreach ($all as &$item) {
                        $all += \class_uses($item);
                        $phpFiles[] = (new ReflectionClass($item))->getFileName();
                        $classes[$item] = \true;
                    }
                }
            } elseif ($dep instanceof \ReflectionFunctionAbstract) {
                $phpFiles[] = $dep->getFileName();
                $functions[] = \rtrim(Reflection::toString($dep), '()');
            } else {
                throw new Nette\InvalidStateException(\sprintf('Unexpected dependency %s', \gettype($dep)));
            }
        }
        $classes = \array_keys($classes);
        $functions = \array_unique($functions, \SORT_REGULAR);
        $hash = self::calculateHash($classes, $functions);
        $files = @\array_map('filemtime', \array_combine($files, $files));
        // @ - file may not exist
        $phpFiles = @\array_map('filemtime', \array_combine($phpFiles, $phpFiles));
        // @ - file may not exist
        return [self::VERSION, $files, $phpFiles, $classes, $functions, $hash];
    }
    /**
     * Are dependencies expired?
     */
    public static function isExpired(int $version, array $files, array &$phpFiles, array $classes, array $functions, string $hash) : bool
    {
        try {
            $currentFiles = @\array_map('filemtime', \array_combine($tmp = \array_keys($files), $tmp));
            // @ - files may not exist
            $origPhpFiles = $phpFiles;
            $phpFiles = @\array_map('filemtime', \array_combine($tmp = \array_keys($phpFiles), $tmp));
            // @ - files may not exist
            return $version !== self::VERSION || $files !== $currentFiles || $phpFiles !== $origPhpFiles && $hash !== self::calculateHash($classes, $functions);
        } catch (\ReflectionException $e) {
            return \true;
        }
    }
    private static function calculateHash(array $classes, array $functions) : string
    {
        $hash = [];
        foreach ($classes as $name) {
            $class = new ReflectionClass($name);
            $hash[] = [$name, Reflection::getUseStatements($class), $class->isAbstract(), \get_parent_class($name), \class_implements($name), \class_uses($name)];
            foreach ($class->getProperties(\ReflectionProperty::IS_PUBLIC) as $prop) {
                if ($prop->getDeclaringClass() == $class) {
                    // intentionally ==
                    $hash[] = [$name, $prop->name, $prop->getDocComment(), (string) Type::fromReflection($prop), \PHP_VERSION_ID >= 80000 ? \count($prop->getAttributes(Attributes\Inject::class)) : null];
                }
            }
            foreach ($class->getMethods(ReflectionMethod::IS_PUBLIC) as $method) {
                if ($method->getDeclaringClass() == $class) {
                    // intentionally ==
                    $hash[] = [$name, $method->name, $method->getDocComment(), self::hashParameters($method), (string) Type::fromReflection($method)];
                }
            }
        }
        $flip = \array_flip($classes);
        foreach ($functions as $name) {
            if (\strpos($name, '::')) {
                $method = new ReflectionMethod($name);
                $class = $method->getDeclaringClass();
                if (isset($flip[$class->name])) {
                    continue;
                }
                $uses = Reflection::getUseStatements($class);
            } else {
                $method = new \ReflectionFunction($name);
                $uses = null;
            }
            $hash[] = [$name, $uses, $method->getDocComment(), self::hashParameters($method), (string) Type::fromReflection($method)];
        }
        return \md5(\serialize($hash));
    }
    private static function hashParameters(\ReflectionFunctionAbstract $method) : array
    {
        $res = [];
        foreach ($method->getParameters() as $param) {
            $res[] = [$param->name, (string) Type::fromReflection($param), $param->isVariadic(), $param->isDefaultValueAvailable() ? [Reflection::getParameterDefaultValue($param)] : null];
        }
        return $res;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Configurator compiling extension.
 */
abstract class CompilerExtension
{
    use Nette\SmartObject;
    /** @var Compiler */
    protected $compiler;
    /** @var string */
    protected $name;
    /** @var array|object */
    protected $config = [];
    /** @var Nette\PhpGenerator\Closure */
    protected $initialization;
    /** @return static */
    public function setCompiler(Compiler $compiler, string $name)
    {
        $this->initialization = new Nette\PhpGenerator\Closure();
        $this->compiler = $compiler;
        $this->name = $name;
        return $this;
    }
    /**
     * @param  array|object  $config
     * @return static
     */
    public function setConfig($config)
    {
        if (!\is_array($config) && !\is_object($config)) {
            throw new Nette\InvalidArgumentException();
        }
        $this->config = $config;
        return $this;
    }
    /**
     * Returns extension configuration.
     * @return array|object
     */
    public function getConfig()
    {
        return $this->config;
    }
    /**
     * Returns configuration schema.
     */
    public function getConfigSchema() : Nette\Schema\Schema
    {
        return \is_object($this->config) ? Nette\Schema\Expect::from($this->config) : Nette\Schema\Expect::array();
    }
    /**
     * Checks whether $config contains only $expected items and returns combined array.
     * @throws Nette\InvalidStateException
     * @deprecated  use getConfigSchema()
     */
    public function validateConfig(array $expected, array $config = null, string $name = null) : array
    {
        if (\func_num_args() === 1) {
            return $this->config = $this->validateConfig($expected, $this->config);
        }
        if ($extra = \array_diff_key((array) $config, $expected)) {
            $name = $name ? \str_replace('.', ' › ', $name) : $this->name;
            $hint = Nette\Utils\Helpers::getSuggestion(\array_keys($expected), \key($extra));
            throw new Nette\DI\InvalidConfigurationException(\sprintf("Unknown configuration option '%s › %s'", $name, $hint ? \key($extra) : \implode("', '{$name} › ", \array_keys($extra))) . ($hint ? ", did you mean '{$name} › {$hint}'?" : '.'));
        }
        return Nette\Schema\Helpers::merge($config, $expected);
    }
    public function getContainerBuilder() : ContainerBuilder
    {
        return $this->compiler->getContainerBuilder();
    }
    /**
     * Reads configuration from file.
     */
    public function loadFromFile(string $file) : array
    {
        $loader = $this->createLoader();
        $res = $loader->load($file);
        $this->compiler->addDependencies($loader->getDependencies());
        return $res;
    }
    /**
     * Loads list of service definitions from configuration.
     * Prefixes its names and replaces @extension with name in definition.
     */
    public function loadDefinitionsFromConfig(array $configList) : void
    {
        $res = [];
        foreach ($configList as $key => $config) {
            $key = \is_string($key) ? $this->name . '.' . $key : $key;
            $res[$key] = Helpers::prefixServiceName($config, $this->name);
        }
        $this->compiler->loadDefinitionsFromConfig($res);
    }
    protected function createLoader() : Config\Loader
    {
        return new Config\Loader();
    }
    public function getInitialization() : Nette\PhpGenerator\Closure
    {
        return $this->initialization;
    }
    /**
     * Prepend extension name to identifier or service name.
     */
    public function prefix(string $id) : string
    {
        return \substr_replace($id, $this->name . '.', \substr($id, 0, 1) === '@' ? 1 : 0, 0);
    }
    /**
     * Processes configuration data. Intended to be overridden by descendant.
     * @return void
     */
    public function loadConfiguration()
    {
    }
    /**
     * Adjusts DI container before is compiled to PHP class. Intended to be overridden by descendant.
     * @return void
     */
    public function beforeCompile()
    {
    }
    /**
     * Adjusts DI container compiled to PHP class. Intended to be overridden by descendant.
     * @return void
     */
    public function afterCompile(Nette\PhpGenerator\ClassType $class)
    {
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI\Attributes;

use Attribute;
#[\Attribute(Attribute::TARGET_PROPERTY)]
class Inject
{
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI\Definitions;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\DI\ServiceCreationException;
/**
 * Definition of standard service.
 *
 * @property string|null $class
 * @property Statement $factory
 * @property Statement[] $setup
 */
final class ServiceDefinition extends Definition
{
    /** @var Statement */
    private $factory;
    /** @var Statement[] */
    private $setup = [];
    public function __construct()
    {
        $this->factory = new Statement(null);
    }
    /** @deprecated Use setType() */
    public function setClass(?string $type)
    {
        $this->setType($type);
        if (\func_num_args() > 1) {
            \trigger_error(\sprintf('Service %s: %s() second parameter $args is deprecated, use setFactory()', $this->getName(), __METHOD__), \E_USER_DEPRECATED);
            if ($args = \func_get_arg(1)) {
                $this->setFactory($type, $args);
            }
        }
        return $this;
    }
    /** @return static */
    public function setType(?string $type)
    {
        return parent::setType($type);
    }
    /**
     * @param  string|array|Definition|Reference|Statement  $factory
     * @return static
     */
    public function setFactory($factory, array $args = [])
    {
        $this->factory = $factory instanceof Statement ? $factory : new Statement($factory, $args);
        return $this;
    }
    public function getFactory() : Statement
    {
        return $this->factory;
    }
    /** @return string|array|Definition|Reference|null */
    public function getEntity()
    {
        return $this->factory->getEntity();
    }
    /** @return static */
    public function setArguments(array $args = [])
    {
        $this->factory->arguments = $args;
        return $this;
    }
    /** @return static */
    public function setArgument($key, $value)
    {
        $this->factory->arguments[$key] = $value;
        return $this;
    }
    /**
     * @param  Statement[]  $setup
     * @return static
     */
    public function setSetup(array $setup)
    {
        foreach ($setup as $v) {
            if (!$v instanceof Statement) {
                throw new Nette\InvalidArgumentException('Argument must be Nette\\DI\\Definitions\\Statement[].');
            }
        }
        $this->setup = $setup;
        return $this;
    }
    /** @return Statement[] */
    public function getSetup() : array
    {
        return $this->setup;
    }
    /**
     * @param  string|array|Definition|Reference|Statement  $entity
     * @return static
     */
    public function addSetup($entity, array $args = [])
    {
        $this->setup[] = $entity instanceof Statement ? $entity : new Statement($entity, $args);
        return $this;
    }
    /** @deprecated */
    public function setParameters(array $params)
    {
        throw new Nette\DeprecatedException(\sprintf('Service %s: %s() is deprecated.', $this->getName(), __METHOD__));
    }
    /** @deprecated */
    public function getParameters() : array
    {
        \trigger_error(\sprintf('Service %s: %s() is deprecated.', $this->getName(), __METHOD__), \E_USER_DEPRECATED);
        return [];
    }
    /** @deprecated use $builder->addImportedDefinition(...) */
    public function setDynamic() : void
    {
        throw new Nette\DeprecatedException(\sprintf('Service %s: %s() is deprecated, use $builder->addImportedDefinition(...)', $this->getName(), __METHOD__));
    }
    /** @deprecated use $builder->addFactoryDefinition(...) or addAccessorDefinition(...) */
    public function setImplement() : void
    {
        throw new Nette\DeprecatedException(\sprintf('Service %s: %s() is deprecated, use $builder->addFactoryDefinition(...)', $this->getName(), __METHOD__));
    }
    /** @deprecated use addTag('nette.inject') */
    public function setInject(bool $state = \true)
    {
        \trigger_error(\sprintf('Service %s: %s() is deprecated, use addTag(Nette\\DI\\Extensions\\InjectExtension::TAG_INJECT)', $this->getName(), __METHOD__), \E_USER_DEPRECATED);
        return $this->addTag(Nette\DI\Extensions\InjectExtension::TAG_INJECT, $state);
    }
    public function resolveType(Nette\DI\Resolver $resolver) : void
    {
        if (!$this->getEntity()) {
            if (!$this->getType()) {
                throw new ServiceCreationException('Factory and type are missing in definition of service.');
            }
            $this->setFactory($this->getType(), $this->factory->arguments ?? []);
        } elseif (!$this->getType()) {
            $type = $resolver->resolveEntityType($this->factory);
            if (!$type) {
                throw new ServiceCreationException('Unknown service type, specify it or declare return type of factory.');
            }
            $this->setType($type);
            $resolver->addDependency(new \ReflectionClass($type));
        }
        // auto-disable autowiring for aliases
        if ($this->getAutowired() === \true && $this->getEntity() instanceof Reference) {
            $this->setAutowired(\false);
        }
    }
    public function complete(Nette\DI\Resolver $resolver) : void
    {
        $entity = $this->factory->getEntity();
        if ($entity instanceof Reference && !$this->factory->arguments && !$this->setup) {
            $ref = $resolver->normalizeReference($entity);
            $this->setFactory([new Reference(Nette\DI\ContainerBuilder::THIS_CONTAINER), 'getService'], [$ref->getValue()]);
        }
        $this->factory = $resolver->completeStatement($this->factory);
        foreach ($this->setup as &$setup) {
            if (\is_string($setup->getEntity()) && \strpbrk($setup->getEntity(), ':@?\\') === \false) {
                // auto-prepend @self
                $setup = new Statement([new Reference(Reference::SELF), $setup->getEntity()], $setup->arguments);
            }
            $setup = $resolver->completeStatement($setup, \true);
        }
    }
    public function generateMethod(Nette\PhpGenerator\Method $method, Nette\DI\PhpGenerator $generator) : void
    {
        $entity = $this->factory->getEntity();
        $code = $generator->formatStatement($this->factory) . ";\n";
        if (!$this->setup) {
            $method->setBody('return ' . $code);
            return;
        }
        $code = '$service = ' . $code;
        foreach ($this->setup as $setup) {
            $code .= $generator->formatStatement($setup) . ";\n";
        }
        $code .= 'return $service;';
        $method->setBody($code);
    }
    public function __clone()
    {
        parent::__clone();
        $this->factory = \unserialize(\serialize($this->factory));
        $this->setup = \unserialize(\serialize($this->setup));
    }
}
\class_exists(Nette\DI\ServiceDefinition::class);
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI\Definitions;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\DI\Helpers;
use _PHPStan_dcc7b7cff\Nette\DI\ServiceCreationException;
use _PHPStan_dcc7b7cff\Nette\PhpGenerator as Php;
use _PHPStan_dcc7b7cff\Nette\Utils\Reflection;
use _PHPStan_dcc7b7cff\Nette\Utils\Type;
/**
 * Definition of standard service.
 */
final class FactoryDefinition extends Definition
{
    private const METHOD_CREATE = 'create';
    /** @var array */
    public $parameters = [];
    /** @var Definition */
    private $resultDefinition;
    public function __construct()
    {
        $this->resultDefinition = new ServiceDefinition();
    }
    /** @return static */
    public function setImplement(string $interface)
    {
        if (!\interface_exists($interface)) {
            throw new Nette\InvalidArgumentException(\sprintf("Service '%s': Interface '%s' not found.", $this->getName(), $interface));
        }
        $rc = new \ReflectionClass($interface);
        $method = $rc->getMethods()[0] ?? null;
        if (!$method || $method->isStatic() || $method->name !== self::METHOD_CREATE || \count($rc->getMethods()) > 1) {
            throw new Nette\InvalidArgumentException(\sprintf("Service '%s': Interface %s must have just one non-static method create().", $this->getName(), $interface));
        }
        return parent::setType($interface);
    }
    public function getImplement() : ?string
    {
        return $this->getType();
    }
    public final function getResultType() : ?string
    {
        return $this->resultDefinition->getType();
    }
    /** @return static */
    public function setResultDefinition(Definition $definition)
    {
        $this->resultDefinition = $definition;
        return $this;
    }
    /** @return ServiceDefinition */
    public function getResultDefinition() : Definition
    {
        return $this->resultDefinition;
    }
    /**
     * @deprecated use ->getResultDefinition()->setFactory()
     * @return static
     */
    public function setFactory($factory, array $args = [])
    {
        \trigger_error(\sprintf('Service %s: %s() is deprecated, use ->getResultDefinition()->setFactory()', $this->getName(), __METHOD__), \E_USER_DEPRECATED);
        $this->resultDefinition->setFactory($factory, $args);
        return $this;
    }
    /** @deprecated use ->getResultDefinition()->getFactory() */
    public function getFactory() : ?Statement
    {
        \trigger_error(\sprintf('Service %s: %s() is deprecated, use ->getResultDefinition()->getFactory()', $this->getName(), __METHOD__), \E_USER_DEPRECATED);
        return $this->resultDefinition->getFactory();
    }
    /**
     * @deprecated use ->getResultDefinition()->getEntity()
     * @return mixed
     */
    public function getEntity()
    {
        \trigger_error(\sprintf('Service %s: %s() is deprecated, use ->getResultDefinition()->getEntity()', $this->getName(), __METHOD__), \E_USER_DEPRECATED);
        return $this->resultDefinition->getEntity();
    }
    /**
     * @deprecated use ->getResultDefinition()->setArguments()
     * @return static
     */
    public function setArguments(array $args = [])
    {
        \trigger_error(\sprintf('Service %s: %s() is deprecated, use ->getResultDefinition()->setArguments()', $this->getName(), __METHOD__), \E_USER_DEPRECATED);
        $this->resultDefinition->setArguments($args);
        return $this;
    }
    /**
     * @deprecated use ->getResultDefinition()->setSetup()
     * @return static
     */
    public function setSetup(array $setup)
    {
        \trigger_error(\sprintf('Service %s: %s() is deprecated, use ->getResultDefinition()->setSetup()', $this->getName(), __METHOD__), \E_USER_DEPRECATED);
        $this->resultDefinition->setSetup($setup);
        return $this;
    }
    /** @deprecated use ->getResultDefinition()->getSetup() */
    public function getSetup() : array
    {
        \trigger_error(\sprintf('Service %s: %s() is deprecated, use ->getResultDefinition()->getSetup()', $this->getName(), __METHOD__), \E_USER_DEPRECATED);
        return $this->resultDefinition->getSetup();
    }
    /**
     * @deprecated use ->getResultDefinition()->addSetup()
     * @return static
     */
    public function addSetup($entity, array $args = [])
    {
        \trigger_error(\sprintf('Service %s: %s() is deprecated, use ->getResultDefinition()->addSetup()', $this->getName(), __METHOD__), \E_USER_DEPRECATED);
        $this->resultDefinition->addSetup($entity, $args);
        return $this;
    }
    /** @return static */
    public function setParameters(array $params)
    {
        $this->parameters = $params;
        return $this;
    }
    public function getParameters() : array
    {
        return $this->parameters;
    }
    public function resolveType(Nette\DI\Resolver $resolver) : void
    {
        $interface = $this->getType();
        if (!$interface) {
            throw new ServiceCreationException('Type is missing in definition of service.');
        }
        $method = new \ReflectionMethod($interface, self::METHOD_CREATE);
        $type = Type::fromReflection($method) ?? Helpers::getReturnTypeAnnotation($method);
        $resultDef = $this->resultDefinition;
        try {
            $resolver->resolveDefinition($resultDef);
        } catch (ServiceCreationException $e) {
            if ($resultDef->getType()) {
                throw $e;
            }
            $resultDef->setType(Helpers::ensureClassType($type, "return type of {$interface}::create()"));
            $resolver->resolveDefinition($resultDef);
        }
        if ($type && !$type->allows($resultDef->getType())) {
            throw new ServiceCreationException(\sprintf('Factory for %s cannot create incompatible %s type.', $type, $resultDef->getType()));
        }
    }
    public function complete(Nette\DI\Resolver $resolver) : void
    {
        $resultDef = $this->resultDefinition;
        if ($resultDef instanceof ServiceDefinition) {
            if (!$this->parameters) {
                $this->completeParameters($resolver);
            }
            $this->convertArguments($resultDef->getFactory()->arguments);
            foreach ($resultDef->getSetup() as $setup) {
                $this->convertArguments($setup->arguments);
            }
            if ($resultDef->getEntity() instanceof Reference && !$resultDef->getFactory()->arguments) {
                $resultDef->setFactory([
                    // render as $container->createMethod()
                    new Reference(Nette\DI\ContainerBuilder::THIS_CONTAINER),
                    Nette\DI\Container::getMethodName($resultDef->getEntity()->getValue()),
                ]);
            }
        }
        $resolver->completeDefinition($resultDef);
    }
    private function completeParameters(Nette\DI\Resolver $resolver) : void
    {
        $interface = $this->getType();
        $method = new \ReflectionMethod($interface, self::METHOD_CREATE);
        $ctorParams = [];
        if (($class = $resolver->resolveEntityType($this->resultDefinition->getFactory())) && ($ctor = (new \ReflectionClass($class))->getConstructor())) {
            foreach ($ctor->getParameters() as $param) {
                $ctorParams[$param->name] = $param;
            }
        }
        foreach ($method->getParameters() as $param) {
            $methodType = Type::fromReflection($param);
            if (isset($ctorParams[$param->name])) {
                $ctorParam = $ctorParams[$param->name];
                $ctorType = Type::fromReflection($ctorParam);
                if ($ctorType && !$ctorType->allows((string) $methodType)) {
                    throw new ServiceCreationException(\sprintf("Type of \$%s in %s::create() doesn't match type in %s constructor.", $param->name, $interface, $class));
                }
                $this->resultDefinition->getFactory()->arguments[$ctorParam->getPosition()] = new Php\Literal('$' . $ctorParam->name);
            } elseif (!$this->resultDefinition->getSetup()) {
                $hint = Nette\Utils\Helpers::getSuggestion(\array_keys($ctorParams), $param->name);
                throw new ServiceCreationException(\sprintf('Unused parameter $%s when implementing method %s::create()', $param->name, $interface) . ($hint ? ", did you mean \${$hint}?" : '.'));
            }
            $paramDef = $methodType . ' ' . $param->name;
            if ($param->isDefaultValueAvailable()) {
                $this->parameters[$paramDef] = Reflection::getParameterDefaultValue($param);
            } else {
                $this->parameters[] = $paramDef;
            }
        }
    }
    public function convertArguments(array &$args) : void
    {
        foreach ($args as &$v) {
            if (\is_string($v) && $v && $v[0] === '$') {
                $v = new Php\Literal($v);
            }
        }
    }
    public function generateMethod(Php\Method $method, Nette\DI\PhpGenerator $generator) : void
    {
        $class = (new Php\ClassType())->addImplement($this->getType());
        $class->addProperty('container')->setPrivate();
        $class->addMethod('__construct')->addBody('$this->container = $container;')->addParameter('container')->setType($generator->getClassName());
        $methodCreate = $class->addMethod(self::METHOD_CREATE);
        $this->resultDefinition->generateMethod($methodCreate, $generator);
        $body = $methodCreate->getBody();
        $body = \str_replace('$this', '$this->container', $body);
        $body = \str_replace('$this->container->container', '$this->container', $body);
        $rm = new \ReflectionMethod($this->getType(), self::METHOD_CREATE);
        $methodCreate->setParameters($generator->convertParameters($this->parameters))->setReturnType((string) (Type::fromReflection($rm) ?? $this->getResultType()))->setBody($body);
        $method->setBody('return new class ($this) ' . $class . ';');
    }
    public function __clone()
    {
        parent::__clone();
        $this->resultDefinition = \unserialize(\serialize($this->resultDefinition));
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI\Definitions;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Multi accessor/factory definition.
 */
final class LocatorDefinition extends Definition
{
    /** @var Reference[] */
    private $references = [];
    /** @var string|null */
    private $tagged;
    /** @return static */
    public function setImplement(string $interface)
    {
        if (!\interface_exists($interface)) {
            throw new Nette\InvalidArgumentException(\sprintf("Service '%s': Interface '%s' not found.", $this->getName(), $interface));
        }
        $methods = (new \ReflectionClass($interface))->getMethods();
        if (!$methods) {
            throw new Nette\InvalidArgumentException(\sprintf("Service '%s': Interface %s must have at least one method.", $this->getName(), $interface));
        }
        foreach ($methods as $method) {
            if ($method->isStatic() || !(\preg_match('#^(get|create)$#', $method->name) && $method->getNumberOfParameters() === 1 || \preg_match('#^(get|create)[A-Z]#', $method->name) && $method->getNumberOfParameters() === 0)) {
                throw new Nette\InvalidArgumentException(\sprintf("Service '%s': Method %s::%s() does not meet the requirements: is create(\$name), get(\$name), create*() or get*() and is non-static.", $this->getName(), $interface, $method->name));
            }
        }
        return parent::setType($interface);
    }
    public function getImplement() : ?string
    {
        return $this->getType();
    }
    /** @return static */
    public function setReferences(array $references)
    {
        $this->references = [];
        foreach ($references as $name => $ref) {
            $this->references[$name] = \substr($ref, 0, 1) === '@' ? new Reference(\substr($ref, 1)) : Reference::fromType($ref);
        }
        return $this;
    }
    /** @return Reference[] */
    public function getReferences() : array
    {
        return $this->references;
    }
    /** @return static */
    public function setTagged(?string $tagged)
    {
        $this->tagged = $tagged;
        return $this;
    }
    public function getTagged() : ?string
    {
        return $this->tagged;
    }
    public function resolveType(Nette\DI\Resolver $resolver) : void
    {
    }
    public function complete(Nette\DI\Resolver $resolver) : void
    {
        if ($this->tagged !== null) {
            $this->references = [];
            foreach ($resolver->getContainerBuilder()->findByTag($this->tagged) as $name => $tag) {
                if (isset($this->references[$tag])) {
                    \trigger_error(\sprintf("Service '%s': duplicated tag '%s' with value '%s'.", $this->getName(), $this->tagged, $tag), \E_USER_NOTICE);
                }
                $this->references[$tag] = new Reference($name);
            }
        }
        foreach ($this->references as $name => $ref) {
            $this->references[$name] = $resolver->normalizeReference($ref);
        }
    }
    public function generateMethod(Nette\PhpGenerator\Method $method, Nette\DI\PhpGenerator $generator) : void
    {
        $class = (new Nette\PhpGenerator\ClassType())->addImplement($this->getType());
        $class->addProperty('container')->setPrivate();
        $class->addMethod('__construct')->addBody('$this->container = $container;')->addParameter('container')->setType($generator->getClassName());
        foreach ((new \ReflectionClass($this->getType()))->getMethods() as $rm) {
            \preg_match('#^(get|create)(.*)#', $rm->name, $m);
            $name = \lcfirst($m[2]);
            $nullable = $rm->getReturnType()->allowsNull();
            $methodInner = $class->addMethod($rm->name)->setReturnType((string) Nette\Utils\Type::fromReflection($rm));
            if (!$name) {
                $class->addProperty('mapping', \array_map(function ($item) {
                    return $item->getValue();
                }, $this->references))->setPrivate();
                $methodInner->setBody('if (!isset($this->mapping[$name])) {
	' . ($nullable ? 'return null;' : 'throw new Nette\\DI\\MissingServiceException("Service \'$name\' is not defined.");') . '
}
return $this->container->' . $m[1] . 'Service($this->mapping[$name]);')->addParameter('name');
            } elseif (isset($this->references[$name])) {
                $ref = $this->references[$name]->getValue();
                if ($m[1] === 'get') {
                    $methodInner->setBody('return $this->container->getService(?);', [$ref]);
                } else {
                    $methodInner->setBody('return $this->container->?();', [Nette\DI\Container::getMethodName($ref)]);
                }
            } else {
                $methodInner->setBody($nullable ? 'return null;' : 'throw new Nette\\DI\\MissingServiceException("Service is not defined.");');
            }
        }
        $method->setBody('return new class ($this) ' . $class . ';');
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI\Definitions;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Reference to service. Either by name or by type or reference to the 'self' service.
 */
final class Reference
{
    use Nette\SmartObject;
    public const SELF = 'self';
    /** @var string */
    private $value;
    public static function fromType(string $value) : self
    {
        if (\strpos($value, '\\') === \false) {
            $value = '\\' . $value;
        }
        return new static($value);
    }
    public function __construct(string $value)
    {
        $this->value = $value;
    }
    public function getValue() : string
    {
        return $this->value;
    }
    public function isName() : bool
    {
        return \strpos($this->value, '\\') === \false && $this->value !== self::SELF;
    }
    public function isType() : bool
    {
        return \strpos($this->value, '\\') !== \false;
    }
    public function isSelf() : bool
    {
        return $this->value === self::SELF;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI\Definitions;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\DI\PhpGenerator;
/**
 * Imported service injected to the container.
 */
final class ImportedDefinition extends Definition
{
    /** @return static */
    public function setType(?string $type)
    {
        return parent::setType($type);
    }
    public function resolveType(Nette\DI\Resolver $resolver) : void
    {
    }
    public function complete(Nette\DI\Resolver $resolver) : void
    {
    }
    public function generateMethod(Nette\PhpGenerator\Method $method, PhpGenerator $generator) : void
    {
        $method->setReturnType('void')->setBody('throw new Nette\\DI\\ServiceCreationException(?);', ["Unable to create imported service '{$this->getName()}', it must be added using addService()"]);
    }
    /** @deprecated use '$def instanceof ImportedDefinition' */
    public function isDynamic() : bool
    {
        return \true;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI\Definitions;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\DI\Helpers;
use _PHPStan_dcc7b7cff\Nette\Utils\Type;
/**
 * Accessor definition.
 */
final class AccessorDefinition extends Definition
{
    private const METHOD_GET = 'get';
    /** @var Reference|null */
    private $reference;
    /** @return static */
    public function setImplement(string $interface)
    {
        if (!\interface_exists($interface)) {
            throw new Nette\InvalidArgumentException(\sprintf("Service '%s': Interface '%s' not found.", $this->getName(), $interface));
        }
        $rc = new \ReflectionClass($interface);
        $method = $rc->getMethods()[0] ?? null;
        if (!$method || $method->isStatic() || $method->getName() !== self::METHOD_GET || \count($rc->getMethods()) > 1) {
            throw new Nette\InvalidArgumentException(\sprintf("Service '%s': Interface %s must have just one non-static method get().", $this->getName(), $interface));
        } elseif ($method->getNumberOfParameters()) {
            throw new Nette\InvalidArgumentException(\sprintf("Service '%s': Method %s::get() must have no parameters.", $this->getName(), $interface));
        }
        return parent::setType($interface);
    }
    public function getImplement() : ?string
    {
        return $this->getType();
    }
    /**
     * @param  string|Reference  $reference
     * @return static
     */
    public function setReference($reference)
    {
        if ($reference instanceof Reference) {
            $this->reference = $reference;
        } else {
            $this->reference = \substr($reference, 0, 1) === '@' ? new Reference(\substr($reference, 1)) : Reference::fromType($reference);
        }
        return $this;
    }
    public function getReference() : ?Reference
    {
        return $this->reference;
    }
    public function resolveType(Nette\DI\Resolver $resolver) : void
    {
    }
    public function complete(Nette\DI\Resolver $resolver) : void
    {
        if (!$this->reference) {
            $interface = $this->getType();
            $method = new \ReflectionMethod($interface, self::METHOD_GET);
            $type = Type::fromReflection($method) ?? Helpers::getReturnTypeAnnotation($method);
            $this->setReference(Helpers::ensureClassType($type, "return type of {$interface}::get()"));
        }
        $this->reference = $resolver->normalizeReference($this->reference);
    }
    public function generateMethod(Nette\PhpGenerator\Method $method, Nette\DI\PhpGenerator $generator) : void
    {
        $class = (new Nette\PhpGenerator\ClassType())->addImplement($this->getType());
        $class->addProperty('container')->setPrivate();
        $class->addMethod('__construct')->addBody('$this->container = $container;')->addParameter('container')->setType($generator->getClassName());
        $rm = new \ReflectionMethod($this->getType(), self::METHOD_GET);
        $class->addMethod(self::METHOD_GET)->setBody('return $this->container->getService(?);', [$this->reference->getValue()])->setReturnType((string) Type::fromReflection($rm));
        $method->setBody('return new class ($this) ' . $class . ';');
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI\Definitions;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Definition used by ContainerBuilder.
 */
abstract class Definition
{
    use Nette\SmartObject;
    /** @var string|null */
    private $name;
    /** @var string|null  class or interface name */
    private $type;
    /** @var array */
    private $tags = [];
    /** @var bool|string[] */
    private $autowired = \true;
    /** @var callable|null */
    private $notifier;
    /**
     * @return static
     * @internal  This is managed by ContainerBuilder and should not be called by user
     */
    public final function setName(string $name)
    {
        if ($this->name) {
            throw new Nette\InvalidStateException('Name already has been set.');
        }
        $this->name = $name;
        return $this;
    }
    public final function getName() : ?string
    {
        return $this->name;
    }
    /** @return static */
    protected function setType(?string $type)
    {
        if ($this->autowired && $this->notifier && $this->type !== $type) {
            ($this->notifier)();
        }
        if ($type === null) {
            $this->type = null;
        } elseif (!\class_exists($type) && !\interface_exists($type)) {
            throw new Nette\InvalidArgumentException(\sprintf("Service '%s': Class or interface '%s' not found.", $this->name, $type));
        } else {
            $this->type = Nette\DI\Helpers::normalizeClass($type);
        }
        return $this;
    }
    public final function getType() : ?string
    {
        return $this->type;
    }
    /** @return static */
    public final function setTags(array $tags)
    {
        $this->tags = $tags;
        return $this;
    }
    public final function getTags() : array
    {
        return $this->tags;
    }
    /**
     * @param  mixed  $attr
     * @return static
     */
    public final function addTag(string $tag, $attr = \true)
    {
        $this->tags[$tag] = $attr;
        return $this;
    }
    /** @return mixed */
    public final function getTag(string $tag)
    {
        return $this->tags[$tag] ?? null;
    }
    /**
     * @param  bool|string|string[]  $state
     * @return static
     */
    public final function setAutowired($state = \true)
    {
        if ($this->notifier && $this->autowired !== $state) {
            ($this->notifier)();
        }
        $this->autowired = \is_string($state) || \is_array($state) ? (array) $state : (bool) $state;
        return $this;
    }
    /** @return bool|string[] */
    public final function getAutowired()
    {
        return $this->autowired;
    }
    /** @return static */
    public function setExported(bool $state = \true)
    {
        return $this->addTag('nette.exported', $state);
    }
    public function isExported() : bool
    {
        return (bool) $this->getTag('nette.exported');
    }
    public function __clone()
    {
        $this->notifier = $this->name = null;
    }
    /********************* life cycle ****************d*g**/
    public abstract function resolveType(Nette\DI\Resolver $resolver) : void;
    public abstract function complete(Nette\DI\Resolver $resolver) : void;
    public abstract function generateMethod(Nette\PhpGenerator\Method $method, Nette\DI\PhpGenerator $generator) : void;
    public final function setNotifier(?callable $notifier) : void
    {
        $this->notifier = $notifier;
    }
    /********************* deprecated stuff from former ServiceDefinition ****************d*g**/
    /** @deprecated Use setType() */
    public function setClass(?string $type)
    {
        return $this->setType($type);
    }
    /** @deprecated Use getType() */
    public function getClass() : ?string
    {
        return $this->getType();
    }
    /** @deprecated Use '$def instanceof Nette\DI\Definitions\ImportedDefinition' */
    public function isDynamic() : bool
    {
        return \false;
    }
    /** @deprecated Use Nette\DI\Definitions\FactoryDefinition or AccessorDefinition */
    public function getImplement() : ?string
    {
        return null;
    }
    /** @deprecated Use getAutowired() */
    public function isAutowired()
    {
        return $this->autowired;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI\Definitions;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\Utils\Strings;
/**
 * Assignment or calling statement.
 *
 * @property string|array|Definition|Reference|null $entity
 */
final class Statement implements Nette\Schema\DynamicParameter
{
    use Nette\SmartObject;
    /** @var array */
    public $arguments;
    /** @var string|array|Definition|Reference|null */
    private $entity;
    /**
     * @param  string|array|Definition|Reference|null  $entity
     */
    public function __construct($entity, array $arguments = [])
    {
        if ($entity !== null && !\is_string($entity) && !$entity instanceof Definition && !$entity instanceof Reference && !(\is_array($entity) && \array_keys($entity) === [0, 1] && (\is_string($entity[0]) || $entity[0] instanceof self || $entity[0] instanceof Reference || $entity[0] instanceof Definition))) {
            throw new Nette\InvalidArgumentException('Argument is not valid Statement entity.');
        }
        // normalize Class::method to [Class, method]
        if (\is_string($entity) && Strings::contains($entity, '::') && !Strings::contains($entity, '?')) {
            $entity = \explode('::', $entity, 2);
        }
        if (\is_string($entity) && \substr($entity, 0, 1) === '@') {
            // normalize @service to Reference
            $entity = new Reference(\substr($entity, 1));
        } elseif (\is_array($entity) && \is_string($entity[0]) && \substr($entity[0], 0, 1) === '@') {
            $entity[0] = new Reference(\substr($entity[0], 1));
        }
        $this->entity = $entity;
        $this->arguments = $arguments;
    }
    /** @return string|array|Definition|Reference|null */
    public function getEntity()
    {
        return $this->entity;
    }
}
\class_exists(Nette\DI\Statement::class);
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\Schema;
/**
 * DI container compiler.
 */
class Compiler
{
    use Nette\SmartObject;
    private const SERVICES = 'services', PARAMETERS = 'parameters', DI = 'di';
    /** @var CompilerExtension[] */
    private $extensions = [];
    /** @var ContainerBuilder */
    private $builder;
    /** @var array */
    private $config = [];
    /** @var array [section => array[]] */
    private $configs = [];
    /** @var string */
    private $sources = '';
    /** @var DependencyChecker */
    private $dependencies;
    /** @var string */
    private $className = 'Container';
    public function __construct(ContainerBuilder $builder = null)
    {
        $this->builder = $builder ?: new ContainerBuilder();
        $this->dependencies = new DependencyChecker();
        $this->addExtension(self::SERVICES, new Extensions\ServicesExtension());
        $this->addExtension(self::PARAMETERS, new Extensions\ParametersExtension($this->configs));
    }
    /**
     * Add custom configurator extension.
     * @return static
     */
    public function addExtension(?string $name, CompilerExtension $extension)
    {
        if ($name === null) {
            $name = '_' . \count($this->extensions);
        } elseif (isset($this->extensions[$name])) {
            throw new Nette\InvalidArgumentException(\sprintf("Name '%s' is already used or reserved.", $name));
        }
        $lname = \strtolower($name);
        foreach (\array_keys($this->extensions) as $nm) {
            if ($lname === \strtolower((string) $nm)) {
                throw new Nette\InvalidArgumentException(\sprintf("Name of extension '%s' has the same name as '%s' in a case-insensitive manner.", $name, $nm));
            }
        }
        $this->extensions[$name] = $extension->setCompiler($this, $name);
        return $this;
    }
    public function getExtensions(string $type = null) : array
    {
        return $type ? \array_filter($this->extensions, function ($item) use($type) : bool {
            return $item instanceof $type;
        }) : $this->extensions;
    }
    public function getContainerBuilder() : ContainerBuilder
    {
        return $this->builder;
    }
    /** @return static */
    public function setClassName(string $className)
    {
        $this->className = $className;
        return $this;
    }
    /**
     * Adds new configuration.
     * @return static
     */
    public function addConfig(array $config)
    {
        foreach ($config as $section => $data) {
            $this->configs[$section][] = $data;
        }
        $this->sources .= "// source: array\n";
        return $this;
    }
    /**
     * Adds new configuration from file.
     * @return static
     */
    public function loadConfig(string $file, Config\Loader $loader = null)
    {
        $sources = $this->sources . "// source: {$file}\n";
        $loader = $loader ?: new Config\Loader();
        foreach ($loader->load($file, \false) as $data) {
            $this->addConfig($data);
        }
        $this->dependencies->add($loader->getDependencies());
        $this->sources = $sources;
        return $this;
    }
    /**
     * Returns configuration.
     * @deprecated
     */
    public function getConfig() : array
    {
        return $this->config;
    }
    /**
     * Sets the names of dynamic parameters.
     * @return static
     */
    public function setDynamicParameterNames(array $names)
    {
        \assert($this->extensions[self::PARAMETERS] instanceof Extensions\ParametersExtension);
        $this->extensions[self::PARAMETERS]->dynamicParams = $names;
        return $this;
    }
    /**
     * Adds dependencies to the list.
     * @param  array  $deps  of ReflectionClass|\ReflectionFunctionAbstract|string
     * @return static
     */
    public function addDependencies(array $deps)
    {
        $this->dependencies->add(\array_filter($deps));
        return $this;
    }
    /**
     * Exports dependencies.
     */
    public function exportDependencies() : array
    {
        return $this->dependencies->export();
    }
    /** @return static */
    public function addExportedTag(string $tag)
    {
        if (isset($this->extensions[self::DI])) {
            \assert($this->extensions[self::DI] instanceof Extensions\DIExtension);
            $this->extensions[self::DI]->exportedTags[$tag] = \true;
        }
        return $this;
    }
    /** @return static */
    public function addExportedType(string $type)
    {
        if (isset($this->extensions[self::DI])) {
            \assert($this->extensions[self::DI] instanceof Extensions\DIExtension);
            $this->extensions[self::DI]->exportedTypes[$type] = \true;
        }
        return $this;
    }
    public function compile() : string
    {
        $this->processExtensions();
        $this->processBeforeCompile();
        return $this->generateCode();
    }
    /** @internal */
    public function processExtensions() : void
    {
        $first = $this->getExtensions(Extensions\ParametersExtension::class) + $this->getExtensions(Extensions\ExtensionsExtension::class);
        foreach ($first as $name => $extension) {
            $config = $this->processSchema($extension->getConfigSchema(), $this->configs[$name] ?? [], $name);
            $extension->setConfig($this->config[$name] = $config);
            $extension->loadConfiguration();
        }
        $last = $this->getExtensions(Extensions\InjectExtension::class);
        $this->extensions = \array_merge(\array_diff_key($this->extensions, $last), $last);
        if ($decorator = $this->getExtensions(Extensions\DecoratorExtension::class)) {
            Nette\Utils\Arrays::insertBefore($this->extensions, \key($decorator), $this->getExtensions(Extensions\SearchExtension::class));
        }
        $extensions = \array_diff_key($this->extensions, $first, [self::SERVICES => 1]);
        foreach ($extensions as $name => $extension) {
            $config = $this->processSchema($extension->getConfigSchema(), $this->configs[$name] ?? [], $name);
            $extension->setConfig($this->config[$name] = $config);
        }
        foreach ($extensions as $extension) {
            $extension->loadConfiguration();
        }
        foreach ($this->getExtensions(Extensions\ServicesExtension::class) as $name => $extension) {
            $config = $this->processSchema($extension->getConfigSchema(), $this->configs[$name] ?? [], $name);
            $extension->setConfig($this->config[$name] = $config);
            $extension->loadConfiguration();
        }
        if ($extra = \array_diff_key($this->extensions, $extensions, $first, [self::SERVICES => 1])) {
            throw new Nette\DeprecatedException(\sprintf("Extensions '%s' were added while container was being compiled.", \implode("', '", \array_keys($extra))));
        } elseif ($extra = \key(\array_diff_key($this->configs, $this->extensions))) {
            $hint = Nette\Utils\Helpers::getSuggestion(\array_keys($this->extensions), $extra);
            throw new InvalidConfigurationException(\sprintf("Found section '%s' in configuration, but corresponding extension is missing", $extra) . ($hint ? ", did you mean '{$hint}'?" : '.'));
        }
    }
    private function processBeforeCompile() : void
    {
        $this->builder->resolve();
        foreach ($this->extensions as $extension) {
            $extension->beforeCompile();
            $this->dependencies->add([(new \ReflectionClass($extension))->getFileName()]);
        }
        $this->builder->complete();
    }
    /**
     * Merges and validates configurations against scheme.
     * @return array|object
     */
    private function processSchema(Schema\Schema $schema, array $configs, $name = null)
    {
        $processor = new Schema\Processor();
        $processor->onNewContext[] = function (Schema\Context $context) use($name) {
            $context->path = $name ? [$name] : [];
            $context->dynamics =& $this->extensions[self::PARAMETERS]->dynamicValidators;
        };
        try {
            $res = $processor->processMultiple($schema, $configs);
        } catch (Schema\ValidationException $e) {
            throw new Nette\DI\InvalidConfigurationException($e->getMessage());
        }
        foreach ($processor->getWarnings() as $warning) {
            \trigger_error($warning, \E_USER_DEPRECATED);
        }
        return $res;
    }
    /** @internal */
    public function generateCode() : string
    {
        $generator = $this->createPhpGenerator();
        $class = $generator->generate($this->className);
        $this->dependencies->add($this->builder->getDependencies());
        foreach ($this->extensions as $extension) {
            $extension->afterCompile($class);
            $generator->addInitialization($class, $extension);
        }
        return $this->sources . "\n" . $generator->toString($class);
    }
    /**
     * Loads list of service definitions from configuration.
     */
    public function loadDefinitionsFromConfig(array $configList) : void
    {
        $extension = $this->extensions[self::SERVICES];
        \assert($extension instanceof Extensions\ServicesExtension);
        $extension->loadDefinitions($this->processSchema($extension->getConfigSchema(), [$configList]));
    }
    protected function createPhpGenerator() : PhpGenerator
    {
        return new PhpGenerator($this->builder);
    }
    /** @deprecated use non-static Compiler::loadDefinitionsFromConfig() */
    public static function loadDefinitions() : void
    {
        throw new Nette\DeprecatedException(__METHOD__ . '() is deprecated, use non-static Compiler::loadDefinitionsFromConfig(array $configList).');
    }
    /** @deprecated use non-static Compiler::loadDefinitionsFromConfig() */
    public static function loadDefinition() : void
    {
        throw new Nette\DeprecatedException(__METHOD__ . '() is deprecated, use non-static Compiler::loadDefinitionsFromConfig(array $configList).');
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\DI\Definitions\Definition;
/**
 * Container builder.
 */
class ContainerBuilder
{
    use Nette\SmartObject;
    public const THIS_SERVICE = 'self', THIS_CONTAINER = 'container';
    /** @var array */
    public $parameters = [];
    /** @var Definition[] */
    private $definitions = [];
    /** @var array of alias => service */
    private $aliases = [];
    /** @var Autowiring */
    private $autowiring;
    /** @var bool */
    private $needsResolve = \true;
    /** @var bool */
    private $resolving = \false;
    /** @var array */
    private $dependencies = [];
    public function __construct()
    {
        $this->autowiring = new Autowiring($this);
        $this->addImportedDefinition(self::THIS_CONTAINER)->setType(Container::class);
    }
    /**
     * Adds new service definition.
     * @return Definitions\ServiceDefinition
     */
    public function addDefinition(?string $name, Definition $definition = null) : Definition
    {
        $this->needsResolve = \true;
        if ($name === null) {
            for ($i = 1; isset($this->definitions['0' . $i]) || isset($this->aliases['0' . $i]); $i++) {
            }
            $name = '0' . $i;
            // prevents converting to integer in array key
        } elseif (\is_int(\key([$name => 1])) || !\preg_match('#^\\w+(\\.\\w+)*$#D', $name)) {
            throw new Nette\InvalidArgumentException(\sprintf('Service name must be a alpha-numeric string and not a number, %s given.', \gettype($name)));
        } else {
            $name = $this->aliases[$name] ?? $name;
            if (isset($this->definitions[$name])) {
                throw new Nette\InvalidStateException(\sprintf("Service '%s' has already been added.", $name));
            }
            $lname = \strtolower($name);
            foreach ($this->definitions as $nm => $foo) {
                if ($lname === \strtolower($nm)) {
                    throw new Nette\InvalidStateException(\sprintf("Service '%s' has the same name as '%s' in a case-insensitive manner.", $name, $nm));
                }
            }
        }
        $definition = $definition ?: new Definitions\ServiceDefinition();
        $definition->setName($name);
        $definition->setNotifier(function () : void {
            $this->needsResolve = \true;
        });
        return $this->definitions[$name] = $definition;
    }
    public function addAccessorDefinition(?string $name) : Definitions\AccessorDefinition
    {
        return $this->addDefinition($name, new Definitions\AccessorDefinition());
    }
    public function addFactoryDefinition(?string $name) : Definitions\FactoryDefinition
    {
        return $this->addDefinition($name, new Definitions\FactoryDefinition());
    }
    public function addLocatorDefinition(?string $name) : Definitions\LocatorDefinition
    {
        return $this->addDefinition($name, new Definitions\LocatorDefinition());
    }
    public function addImportedDefinition(?string $name) : Definitions\ImportedDefinition
    {
        return $this->addDefinition($name, new Definitions\ImportedDefinition());
    }
    /**
     * Removes the specified service definition.
     */
    public function removeDefinition(string $name) : void
    {
        $this->needsResolve = \true;
        $name = $this->aliases[$name] ?? $name;
        unset($this->definitions[$name]);
    }
    /**
     * Gets the service definition.
     */
    public function getDefinition(string $name) : Definition
    {
        $service = $this->aliases[$name] ?? $name;
        if (!isset($this->definitions[$service])) {
            throw new MissingServiceException(\sprintf("Service '%s' not found.", $name));
        }
        return $this->definitions[$service];
    }
    /**
     * Gets all service definitions.
     * @return Definition[]
     */
    public function getDefinitions() : array
    {
        return $this->definitions;
    }
    /**
     * Does the service definition or alias exist?
     */
    public function hasDefinition(string $name) : bool
    {
        $name = $this->aliases[$name] ?? $name;
        return isset($this->definitions[$name]);
    }
    public function addAlias(string $alias, string $service) : void
    {
        if (!$alias) {
            // builder is not ready for falsy names such as '0'
            throw new Nette\InvalidArgumentException(\sprintf('Alias name must be a non-empty string, %s given.', \gettype($alias)));
        } elseif (!$service) {
            // builder is not ready for falsy names such as '0'
            throw new Nette\InvalidArgumentException(\sprintf('Service name must be a non-empty string, %s given.', \gettype($service)));
        } elseif (isset($this->aliases[$alias])) {
            throw new Nette\InvalidStateException(\sprintf("Alias '%s' has already been added.", $alias));
        } elseif (isset($this->definitions[$alias])) {
            throw new Nette\InvalidStateException(\sprintf("Service '%s' has already been added.", $alias));
        }
        $this->aliases[$alias] = $service;
    }
    /**
     * Removes the specified alias.
     */
    public function removeAlias(string $alias) : void
    {
        unset($this->aliases[$alias]);
    }
    /**
     * Gets all service aliases.
     */
    public function getAliases() : array
    {
        return $this->aliases;
    }
    /**
     * @param  string[]  $types
     * @return static
     */
    public function addExcludedClasses(array $types)
    {
        $this->needsResolve = \true;
        $this->autowiring->addExcludedClasses($types);
        return $this;
    }
    /**
     * Resolves autowired service name by type.
     * @param  bool  $throw exception if service doesn't exist?
     * @throws MissingServiceException
     */
    public function getByType(string $type, bool $throw = \false) : ?string
    {
        $this->needResolved();
        return $this->autowiring->getByType($type, $throw);
    }
    /**
     * Gets autowired service definition of the specified type.
     * @throws MissingServiceException
     */
    public function getDefinitionByType(string $type) : Definition
    {
        return $this->getDefinition($this->getByType($type, \true));
    }
    /**
     * Gets the autowired service names and definitions of the specified type.
     * @return Definition[]  service name is key
     * @internal
     */
    public function findAutowired(string $type) : array
    {
        $this->needResolved();
        return $this->autowiring->findByType($type);
    }
    /**
     * Gets the service names and definitions of the specified type.
     * @return Definition[]  service name is key
     */
    public function findByType(string $type) : array
    {
        $this->needResolved();
        $found = [];
        foreach ($this->definitions as $name => $def) {
            if (\is_a($def->getType(), $type, \true)) {
                $found[$name] = $def;
            }
        }
        return $found;
    }
    /**
     * Gets the service names and tag values.
     * @return array of [service name => tag attributes]
     */
    public function findByTag(string $tag) : array
    {
        $found = [];
        foreach ($this->definitions as $name => $def) {
            if (($tmp = $def->getTag($tag)) !== null) {
                $found[$name] = $tmp;
            }
        }
        return $found;
    }
    /********************* building ****************d*g**/
    /**
     * Checks services, resolves types and rebuilts autowiring classlist.
     */
    public function resolve() : void
    {
        if ($this->resolving) {
            return;
        }
        $this->resolving = \true;
        $resolver = new Resolver($this);
        foreach ($this->definitions as $def) {
            $resolver->resolveDefinition($def);
        }
        $this->autowiring->rebuild();
        $this->resolving = $this->needsResolve = \false;
    }
    private function needResolved() : void
    {
        if ($this->resolving) {
            throw new NotAllowedDuringResolvingException();
        } elseif ($this->needsResolve) {
            $this->resolve();
        }
    }
    public function complete() : void
    {
        $this->resolve();
        foreach ($this->definitions as $def) {
            $def->setNotifier(null);
        }
        $resolver = new Resolver($this);
        foreach ($this->definitions as $def) {
            $resolver->completeDefinition($def);
        }
    }
    /**
     * Adds item to the list of dependencies.
     * @param  \ReflectionClass|\ReflectionFunctionAbstract|string  $dep
     * @return static
     * @internal
     */
    public function addDependency($dep)
    {
        $this->dependencies[] = $dep;
        return $this;
    }
    /**
     * Returns the list of dependencies.
     */
    public function getDependencies() : array
    {
        return $this->dependencies;
    }
    /** @internal */
    public function exportMeta() : array
    {
        $defs = $this->definitions;
        \ksort($defs);
        foreach ($defs as $name => $def) {
            if ($def instanceof Definitions\ImportedDefinition) {
                $meta['types'][$name] = $def->getType();
            }
            foreach ($def->getTags() as $tag => $value) {
                $meta['tags'][$tag][$name] = $value;
            }
        }
        $meta['aliases'] = $this->aliases;
        \ksort($meta['aliases']);
        $all = [];
        foreach ($this->definitions as $name => $def) {
            if ($type = $def->getType()) {
                foreach (\class_parents($type) + \class_implements($type) + [$type] as $class) {
                    $all[$class][] = $name;
                }
            }
        }
        [$low, $high] = $this->autowiring->getClassList();
        foreach ($all as $class => $names) {
            $meta['wiring'][$class] = \array_filter([$high[$class] ?? [], $low[$class] ?? [], \array_diff($names, $low[$class] ?? [], $high[$class] ?? [])]);
        }
        return $meta;
    }
    public static function literal(string $code, array $args = null) : Nette\PhpGenerator\PhpLiteral
    {
        return new Nette\PhpGenerator\PhpLiteral($args === null ? $code : (new Nette\PhpGenerator\Dumper())->format($code, ...$args));
    }
    /** @deprecated */
    public function formatPhp(string $statement, array $args) : string
    {
        \array_walk_recursive($args, function (&$val) : void {
            if ($val instanceof Statement) {
                $val = (new Resolver($this))->completeStatement($val);
            } elseif ($val instanceof Definition) {
                $val = new Definitions\Reference($val->getName());
            }
        });
        return (new PhpGenerator($this))->formatPhp($statement, $args);
    }
    /** @deprecated use resolve() */
    public function prepareClassList() : void
    {
        \trigger_error(__METHOD__ . '() is deprecated, use resolve()', \E_USER_DEPRECATED);
        $this->resolve();
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\DI\Definitions\Reference;
use _PHPStan_dcc7b7cff\Nette\DI\Definitions\Statement;
use _PHPStan_dcc7b7cff\Nette\PhpGenerator as Php;
use _PHPStan_dcc7b7cff\Nette\Utils\Strings;
/**
 * Container PHP code generator.
 */
class PhpGenerator
{
    use Nette\SmartObject;
    /** @var ContainerBuilder */
    private $builder;
    /** @var string */
    private $className;
    public function __construct(ContainerBuilder $builder)
    {
        $this->builder = $builder;
    }
    /**
     * Generates PHP classes. First class is the container.
     */
    public function generate(string $className) : Php\ClassType
    {
        $this->className = $className;
        $class = new Php\ClassType($this->className);
        $class->setExtends(Container::class);
        $class->addMethod('__construct')->addBody('parent::__construct($params);')->addParameter('params', [])->setType('array');
        foreach ($this->builder->exportMeta() as $key => $value) {
            $class->addProperty($key)->setProtected()->setValue($value);
        }
        $definitions = $this->builder->getDefinitions();
        \ksort($definitions);
        foreach ($definitions as $def) {
            $class->addMember($this->generateMethod($def));
        }
        $class->getMethod(Container::getMethodName(ContainerBuilder::THIS_CONTAINER))->setReturnType($className)->setBody('return $this;');
        $class->addMethod('initialize');
        return $class;
    }
    public function toString(Php\ClassType $class) : string
    {
        return '/** @noinspection PhpParamsInspection,PhpMethodMayBeStaticInspection */

declare(strict_types=1);

' . $class->__toString();
    }
    public function addInitialization(Php\ClassType $class, CompilerExtension $extension) : void
    {
        $closure = $extension->getInitialization();
        if ($closure->getBody()) {
            $class->getMethod('initialize')->addBody('// ' . $extension->prefix(''))->addBody("({$closure})();");
        }
    }
    public function generateMethod(Definitions\Definition $def) : Php\Method
    {
        $name = $def->getName();
        try {
            $method = new Php\Method(Container::getMethodName($name));
            $method->setPublic();
            $method->setReturnType($def->getType());
            $def->generateMethod($method, $this);
            return $method;
        } catch (\Exception $e) {
            throw new ServiceCreationException("Service '{$name}': " . $e->getMessage(), 0, $e);
        }
    }
    /**
     * Formats PHP code for class instantiating, function calling or property setting in PHP.
     */
    public function formatStatement(Statement $statement) : string
    {
        $entity = $statement->getEntity();
        $arguments = $statement->arguments;
        switch (\true) {
            case \is_string($entity) && Strings::contains($entity, '?'):
                // PHP literal
                return $this->formatPhp($entity, $arguments);
            case \is_string($entity):
                // create class
                return $this->formatPhp("new {$entity}" . ($arguments ? '(...?)' : ''), $arguments ? [$arguments] : []);
            case \is_array($entity):
                switch (\true) {
                    case $entity[1][0] === '$':
                        // property getter, setter or appender
                        $name = \substr($entity[1], 1);
                        if ($append = \substr($name, -2) === '[]') {
                            $name = \substr($name, 0, -2);
                        }
                        $prop = $entity[0] instanceof Reference ? $this->formatPhp('?->?', [$entity[0], $name]) : $this->formatPhp($entity[0] . '::$?', [$name]);
                        return $arguments ? $this->formatPhp($prop . ($append ? '[]' : '') . ' = ?', [$arguments[0]]) : $prop;
                    case $entity[0] instanceof Statement:
                        $inner = $this->formatPhp('?', [$entity[0]]);
                        if (\substr($inner, 0, 4) === 'new ') {
                            $inner = "({$inner})";
                        }
                        return $this->formatPhp("{$inner}->?(...?)", [$entity[1], $arguments]);
                    case $entity[0] instanceof Reference:
                        return $this->formatPhp('?->?(...?)', [$entity[0], $entity[1], $arguments]);
                    case $entity[0] === '':
                        // function call
                        return $this->formatPhp("{$entity[1]}(...?)", [$arguments]);
                    case \is_string($entity[0]):
                        // static method call
                        return $this->formatPhp("{$entity[0]}::{$entity[1]}(...?)", [$arguments]);
                }
        }
        throw new Nette\InvalidStateException();
    }
    /**
     * Formats PHP statement.
     * @internal
     */
    public function formatPhp(string $statement, array $args) : string
    {
        \array_walk_recursive($args, function (&$val) : void {
            if ($val instanceof Statement) {
                $val = new Php\Literal($this->formatStatement($val));
            } elseif ($val instanceof Reference) {
                $name = $val->getValue();
                if ($val->isSelf()) {
                    $val = new Php\Literal('$service');
                } elseif ($name === ContainerBuilder::THIS_CONTAINER) {
                    $val = new Php\Literal('$this');
                } else {
                    $val = ContainerBuilder::literal('$this->getService(?)', [$name]);
                }
            }
        });
        return (new Php\Dumper())->format($statement, ...$args);
    }
    /**
     * Converts parameters from Definition to PhpGenerator.
     * @return Php\Parameter[]
     */
    public function convertParameters(array $parameters) : array
    {
        $res = [];
        foreach ($parameters as $k => $v) {
            $tmp = \explode(' ', \is_int($k) ? $v : $k);
            $param = $res[] = new Php\Parameter(\end($tmp));
            if (!\is_int($k)) {
                $param->setDefaultValue($v);
            }
            if (isset($tmp[1])) {
                $param->setType($tmp[0]);
            }
        }
        return $res;
    }
    public function getClassName() : ?string
    {
        return $this->className;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Service not found exception.
 */
class MissingServiceException extends Nette\InvalidStateException
{
}
/**
 * Service creation exception.
 */
class ServiceCreationException extends Nette\InvalidStateException
{
    public function setMessage(string $message) : self
    {
        $this->message = $message;
        return $this;
    }
}
/**
 * Not allowed when container is resolving.
 */
class NotAllowedDuringResolvingException extends Nette\InvalidStateException
{
}
/**
 * Error in configuration.
 */
class InvalidConfigurationException extends Nette\InvalidStateException
{
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI;

use _PHPStan_dcc7b7cff\Nette;
/**
 * DI container loader.
 */
class ContainerLoader
{
    use Nette\SmartObject;
    /** @var bool */
    private $autoRebuild = \false;
    /** @var string */
    private $tempDirectory;
    public function __construct(string $tempDirectory, bool $autoRebuild = \false)
    {
        $this->tempDirectory = $tempDirectory;
        $this->autoRebuild = $autoRebuild;
    }
    /**
     * @param  callable  $generator  function (Nette\DI\Compiler $compiler): string|null
     * @param  mixed  $key
     */
    public function load(callable $generator, $key = null) : string
    {
        $class = $this->getClassName($key);
        if (!\class_exists($class, \false)) {
            $this->loadFile($class, $generator);
        }
        return $class;
    }
    /**
     * @param  mixed  $key
     */
    public function getClassName($key) : string
    {
        return 'Container_' . \substr(\md5(\serialize($key)), 0, 10);
    }
    private function loadFile(string $class, callable $generator) : void
    {
        $file = "{$this->tempDirectory}/{$class}.php";
        if (!$this->isExpired($file) && @(include $file) !== \false) {
            // @ file may not exist
            return;
        }
        Nette\Utils\FileSystem::createDir($this->tempDirectory);
        $handle = @\fopen("{$file}.lock", 'c+');
        // @ is escalated to exception
        if (!$handle) {
            throw new Nette\IOException(\sprintf("Unable to create file '%s.lock'. %s", $file, Nette\Utils\Helpers::getLastError()));
        } elseif (!@\flock($handle, \LOCK_EX)) {
            // @ is escalated to exception
            // the lock will automatically be freed when $handle goes out of scope
            throw new Nette\IOException(\sprintf("Unable to acquire exclusive lock on '%s.lock'. %s", $file, Nette\Utils\Helpers::getLastError()));
        }
        if (!\is_file($file) || $this->isExpired($file, $updatedMeta)) {
            if (isset($updatedMeta)) {
                $toWrite["{$file}.meta"] = $updatedMeta;
            } else {
                [$toWrite[$file], $toWrite["{$file}.meta"]] = $this->generate($class, $generator);
            }
            foreach ($toWrite as $name => $content) {
                if (\file_put_contents("{$name}.tmp", $content) !== \strlen($content) || !\rename("{$name}.tmp", $name)) {
                    @\unlink("{$name}.tmp");
                    // @ - file may not exist
                    throw new Nette\IOException(\sprintf("Unable to create file '%s'.", $name));
                } elseif (\function_exists('opcache_invalidate')) {
                    @\opcache_invalidate($name, \true);
                    // @ can be restricted
                }
            }
        }
        if (@(include $file) === \false) {
            // @ - error escalated to exception
            throw new Nette\IOException(\sprintf("Unable to include '%s'.", $file));
        }
    }
    private function isExpired(string $file, string &$updatedMeta = null) : bool
    {
        if ($this->autoRebuild) {
            $meta = @\unserialize((string) \file_get_contents("{$file}.meta"));
            // @ - file may not exist
            $orig = $meta[2] ?? null;
            return empty($meta[0]) || DependencyChecker::isExpired(...$meta) || $orig !== $meta[2] && ($updatedMeta = \serialize($meta));
        }
        return \false;
    }
    /** @return array of (code, file[]) */
    protected function generate(string $class, callable $generator) : array
    {
        $compiler = new Compiler();
        $compiler->setClassName($class);
        $code = $generator(...[&$compiler]) ?: $compiler->compile();
        return ["<?php\n{$code}", \serialize($compiler->exportDependencies())];
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\DI\Config;

if (\false) {
    /** @deprecated use Nette\DI\Config\Adapter */
    interface IAdapter
    {
    }
} elseif (!\interface_exists(IAdapter::class)) {
    \class_alias(Adapter::class, IAdapter::class);
}
namespace _PHPStan_dcc7b7cff\Nette\DI;

if (\false) {
    /** @deprecated use Nette\DI\Definitions\ServiceDefinition */
    class ServiceDefinition
    {
    }
} elseif (!\class_exists(ServiceDefinition::class)) {
    \class_alias(Definitions\ServiceDefinition::class, ServiceDefinition::class);
}
if (\false) {
    /** @deprecated use Nette\DI\Definitions\Statement */
    class Statement
    {
    }
} elseif (!\class_exists(Statement::class)) {
    \class_alias(Definitions\Statement::class, Statement::class);
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Schema\Elements;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\Schema\Context;
/**
 * @internal
 */
trait Base
{
    /** @var bool */
    private $required = \false;
    /** @var mixed */
    private $default;
    /** @var callable|null */
    private $before;
    /** @var array[] */
    private $asserts = [];
    /** @var string|null */
    private $castTo;
    /** @var string|null */
    private $deprecated;
    public function default($value) : self
    {
        $this->default = $value;
        return $this;
    }
    public function required(bool $state = \true) : self
    {
        $this->required = $state;
        return $this;
    }
    public function before(callable $handler) : self
    {
        $this->before = $handler;
        return $this;
    }
    public function castTo(string $type) : self
    {
        $this->castTo = $type;
        return $this;
    }
    public function assert(callable $handler, ?string $description = null) : self
    {
        $this->asserts[] = [$handler, $description];
        return $this;
    }
    /** Marks as deprecated */
    public function deprecated(string $message = 'The item %path% is deprecated.') : self
    {
        $this->deprecated = $message;
        return $this;
    }
    public function completeDefault(Context $context)
    {
        if ($this->required) {
            $context->addError('The mandatory item %path% is missing.', Nette\Schema\Message::MISSING_ITEM);
            return null;
        }
        return $this->default;
    }
    public function doNormalize($value, Context $context)
    {
        if ($this->before) {
            $value = ($this->before)($value);
        }
        return $value;
    }
    private function doDeprecation(Context $context) : void
    {
        if ($this->deprecated !== null) {
            $context->addWarning($this->deprecated, Nette\Schema\Message::DEPRECATED);
        }
    }
    private function doValidate($value, string $expected, Context $context) : bool
    {
        if (!Nette\Utils\Validators::is($value, $expected)) {
            $expected = \str_replace(['|', ':'], [' or ', ' in range '], $expected);
            $context->addError('The %label% %path% expects to be %expected%, %value% given.', Nette\Schema\Message::TYPE_MISMATCH, ['value' => $value, 'expected' => $expected]);
            return \false;
        }
        return \true;
    }
    private function doValidateRange($value, array $range, Context $context, string $types = '') : bool
    {
        if (\is_array($value) || \is_string($value)) {
            [$length, $label] = \is_array($value) ? [\count($value), 'items'] : (\in_array('unicode', \explode('|', $types), \true) ? [Nette\Utils\Strings::length($value), 'characters'] : [\strlen($value), 'bytes']);
            if (!self::isInRange($length, $range)) {
                $context->addError("The length of %label% %path% expects to be in range %expected%, %length% {$label} given.", Nette\Schema\Message::LENGTH_OUT_OF_RANGE, ['value' => $value, 'length' => $length, 'expected' => \implode('..', $range)]);
                return \false;
            }
        } elseif ((\is_int($value) || \is_float($value)) && !self::isInRange($value, $range)) {
            $context->addError('The %label% %path% expects to be in range %expected%, %value% given.', Nette\Schema\Message::VALUE_OUT_OF_RANGE, ['value' => $value, 'expected' => \implode('..', $range)]);
            return \false;
        }
        return \true;
    }
    private function isInRange($value, array $range) : bool
    {
        return ($range[0] === null || $value >= $range[0]) && ($range[1] === null || $value <= $range[1]);
    }
    private function doFinalize($value, Context $context)
    {
        if ($this->castTo) {
            if (Nette\Utils\Reflection::isBuiltinType($this->castTo)) {
                \settype($value, $this->castTo);
            } else {
                $object = new $this->castTo();
                foreach ($value as $k => $v) {
                    $object->{$k} = $v;
                }
                $value = $object;
            }
        }
        foreach ($this->asserts as $i => [$handler, $description]) {
            if (!$handler($value)) {
                $expected = $description ?: (\is_string($handler) ? "{$handler}()" : "#{$i}");
                $context->addError('Failed assertion ' . ($description ? "'%assertion%'" : '%assertion%') . ' for %label% %path% with value %value%.', Nette\Schema\Message::FAILED_ASSERTION, ['value' => $value, 'assertion' => $expected]);
                return;
            }
        }
        return $value;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Schema\Elements;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\Schema\Context;
use _PHPStan_dcc7b7cff\Nette\Schema\Helpers;
use _PHPStan_dcc7b7cff\Nette\Schema\Schema;
final class AnyOf implements Schema
{
    use Base;
    use Nette\SmartObject;
    /** @var array */
    private $set;
    /**
     * @param  mixed|Schema  ...$set
     */
    public function __construct(...$set)
    {
        if (!$set) {
            throw new Nette\InvalidStateException('The enumeration must not be empty.');
        }
        $this->set = $set;
    }
    public function firstIsDefault() : self
    {
        $this->default = $this->set[0];
        return $this;
    }
    public function nullable() : self
    {
        $this->set[] = null;
        return $this;
    }
    public function dynamic() : self
    {
        $this->set[] = new Type(Nette\Schema\DynamicParameter::class);
        return $this;
    }
    /********************* processing ****************d*g**/
    public function normalize($value, Context $context)
    {
        return $this->doNormalize($value, $context);
    }
    public function merge($value, $base)
    {
        if (\is_array($value) && isset($value[Helpers::PREVENT_MERGING])) {
            unset($value[Helpers::PREVENT_MERGING]);
            return $value;
        }
        return Helpers::merge($value, $base);
    }
    public function complete($value, Context $context)
    {
        $expecteds = $innerErrors = [];
        foreach ($this->set as $item) {
            if ($item instanceof Schema) {
                $dolly = new Context();
                $dolly->path = $context->path;
                $res = $item->complete($item->normalize($value, $dolly), $dolly);
                if (!$dolly->errors) {
                    $context->warnings = \array_merge($context->warnings, $dolly->warnings);
                    return $this->doFinalize($res, $context);
                }
                foreach ($dolly->errors as $error) {
                    if ($error->path !== $context->path || empty($error->variables['expected'])) {
                        $innerErrors[] = $error;
                    } else {
                        $expecteds[] = $error->variables['expected'];
                    }
                }
            } else {
                if ($item === $value) {
                    return $this->doFinalize($value, $context);
                }
                $expecteds[] = Nette\Schema\Helpers::formatValue($item);
            }
        }
        if ($innerErrors) {
            $context->errors = \array_merge($context->errors, $innerErrors);
        } else {
            $context->addError('The %label% %path% expects to be %expected%, %value% given.', Nette\Schema\Message::TYPE_MISMATCH, ['value' => $value, 'expected' => \implode('|', \array_unique($expecteds))]);
        }
    }
    public function completeDefault(Context $context)
    {
        if ($this->required) {
            $context->addError('The mandatory item %path% is missing.', Nette\Schema\Message::MISSING_ITEM);
            return null;
        }
        if ($this->default instanceof Schema) {
            return $this->default->completeDefault($context);
        }
        return $this->default;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Schema\Elements;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\Schema\Context;
use _PHPStan_dcc7b7cff\Nette\Schema\Helpers;
use _PHPStan_dcc7b7cff\Nette\Schema\Schema;
final class Structure implements Schema
{
    use Base;
    use Nette\SmartObject;
    /** @var Schema[] */
    private $items;
    /** @var Schema|null  for array|list */
    private $otherItems;
    /** @var array{?int, ?int} */
    private $range = [null, null];
    /** @var bool */
    private $skipDefaults = \false;
    /**
     * @param  Schema[]  $items
     */
    public function __construct(array $items)
    {
        (function (Schema ...$items) {
        })(...\array_values($items));
        $this->items = $items;
        $this->castTo = 'object';
        $this->required = \true;
    }
    public function default($value) : self
    {
        throw new Nette\InvalidStateException('Structure cannot have default value.');
    }
    public function min(?int $min) : self
    {
        $this->range[0] = $min;
        return $this;
    }
    public function max(?int $max) : self
    {
        $this->range[1] = $max;
        return $this;
    }
    /**
     * @param  string|Schema  $type
     */
    public function otherItems($type = 'mixed') : self
    {
        $this->otherItems = $type instanceof Schema ? $type : new Type($type);
        return $this;
    }
    public function skipDefaults(bool $state = \true) : self
    {
        $this->skipDefaults = $state;
        return $this;
    }
    /********************* processing ****************d*g**/
    public function normalize($value, Context $context)
    {
        if ($prevent = \is_array($value) && isset($value[Helpers::PREVENT_MERGING])) {
            unset($value[Helpers::PREVENT_MERGING]);
        }
        $value = $this->doNormalize($value, $context);
        if (\is_object($value)) {
            $value = (array) $value;
        }
        if (\is_array($value)) {
            foreach ($value as $key => $val) {
                $itemSchema = $this->items[$key] ?? $this->otherItems;
                if ($itemSchema) {
                    $context->path[] = $key;
                    $value[$key] = $itemSchema->normalize($val, $context);
                    \array_pop($context->path);
                }
            }
            if ($prevent) {
                $value[Helpers::PREVENT_MERGING] = \true;
            }
        }
        return $value;
    }
    public function merge($value, $base)
    {
        if (\is_array($value) && isset($value[Helpers::PREVENT_MERGING])) {
            unset($value[Helpers::PREVENT_MERGING]);
            $base = null;
        }
        if (\is_array($value) && \is_array($base)) {
            $index = 0;
            foreach ($value as $key => $val) {
                if ($key === $index) {
                    $base[] = $val;
                    $index++;
                } elseif (\array_key_exists($key, $base)) {
                    $itemSchema = $this->items[$key] ?? $this->otherItems;
                    $base[$key] = $itemSchema ? $itemSchema->merge($val, $base[$key]) : Helpers::merge($val, $base[$key]);
                } else {
                    $base[$key] = $val;
                }
            }
            return $base;
        }
        return Helpers::merge($value, $base);
    }
    public function complete($value, Context $context)
    {
        if ($value === null) {
            $value = [];
            // is unable to distinguish null from array in NEON
        }
        $this->doDeprecation($context);
        if (!$this->doValidate($value, 'array', $context) || !$this->doValidateRange($value, $this->range, $context)) {
            return;
        }
        $errCount = \count($context->errors);
        $items = $this->items;
        if ($extraKeys = \array_keys(\array_diff_key($value, $items))) {
            if ($this->otherItems) {
                $items += \array_fill_keys($extraKeys, $this->otherItems);
            } else {
                $keys = \array_map('strval', \array_keys($items));
                foreach ($extraKeys as $key) {
                    $hint = Nette\Utils\ObjectHelpers::getSuggestion($keys, (string) $key);
                    $context->addError('Unexpected item %path%' . ($hint ? ", did you mean '%hint%'?" : '.'), Nette\Schema\Message::UNEXPECTED_ITEM, ['hint' => $hint])->path[] = $key;
                }
            }
        }
        foreach ($items as $itemKey => $itemVal) {
            $context->path[] = $itemKey;
            if (\array_key_exists($itemKey, $value)) {
                $value[$itemKey] = $itemVal->complete($value[$itemKey], $context);
            } else {
                $default = $itemVal->completeDefault($context);
                // checks required item
                if (!$context->skipDefaults && !$this->skipDefaults) {
                    $value[$itemKey] = $default;
                }
            }
            \array_pop($context->path);
        }
        if (\count($context->errors) > $errCount) {
            return;
        }
        return $this->doFinalize($value, $context);
    }
    public function completeDefault(Context $context)
    {
        return $this->required ? $this->complete([], $context) : null;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Schema\Elements;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\Schema\Context;
use _PHPStan_dcc7b7cff\Nette\Schema\DynamicParameter;
use _PHPStan_dcc7b7cff\Nette\Schema\Helpers;
use _PHPStan_dcc7b7cff\Nette\Schema\Schema;
final class Type implements Schema
{
    use Base;
    use Nette\SmartObject;
    /** @var string */
    private $type;
    /** @var Schema|null for arrays */
    private $itemsValue;
    /** @var Schema|null for arrays */
    private $itemsKey;
    /** @var array{?float, ?float} */
    private $range = [null, null];
    /** @var string|null */
    private $pattern;
    /** @var bool */
    private $merge = \true;
    public function __construct(string $type)
    {
        $defaults = ['list' => [], 'array' => []];
        $this->type = $type;
        $this->default = \strpos($type, '[]') ? [] : $defaults[$type] ?? null;
    }
    public function nullable() : self
    {
        $this->type = 'null|' . $this->type;
        return $this;
    }
    public function mergeDefaults(bool $state = \true) : self
    {
        $this->merge = $state;
        return $this;
    }
    public function dynamic() : self
    {
        $this->type = DynamicParameter::class . '|' . $this->type;
        return $this;
    }
    public function min(?float $min) : self
    {
        $this->range[0] = $min;
        return $this;
    }
    public function max(?float $max) : self
    {
        $this->range[1] = $max;
        return $this;
    }
    /**
     * @param  string|Schema  $valueType
     * @param  string|Schema|null  $keyType
     * @internal  use arrayOf() or listOf()
     */
    public function items($valueType = 'mixed', $keyType = null) : self
    {
        $this->itemsValue = $valueType instanceof Schema ? $valueType : new self($valueType);
        $this->itemsKey = $keyType instanceof Schema || $keyType === null ? $keyType : new self($keyType);
        return $this;
    }
    public function pattern(?string $pattern) : self
    {
        $this->pattern = $pattern;
        return $this;
    }
    /********************* processing ****************d*g**/
    public function normalize($value, Context $context)
    {
        if ($prevent = \is_array($value) && isset($value[Helpers::PREVENT_MERGING])) {
            unset($value[Helpers::PREVENT_MERGING]);
        }
        $value = $this->doNormalize($value, $context);
        if (\is_array($value) && $this->itemsValue) {
            $res = [];
            foreach ($value as $key => $val) {
                $context->path[] = $key;
                $context->isKey = \true;
                $key = $this->itemsKey ? $this->itemsKey->normalize($key, $context) : $key;
                $context->isKey = \false;
                $res[$key] = $this->itemsValue->normalize($val, $context);
                \array_pop($context->path);
            }
            $value = $res;
        }
        if ($prevent && \is_array($value)) {
            $value[Helpers::PREVENT_MERGING] = \true;
        }
        return $value;
    }
    public function merge($value, $base)
    {
        if (\is_array($value) && isset($value[Helpers::PREVENT_MERGING])) {
            unset($value[Helpers::PREVENT_MERGING]);
            return $value;
        }
        if (\is_array($value) && \is_array($base) && $this->itemsValue) {
            $index = 0;
            foreach ($value as $key => $val) {
                if ($key === $index) {
                    $base[] = $val;
                    $index++;
                } else {
                    $base[$key] = \array_key_exists($key, $base) ? $this->itemsValue->merge($val, $base[$key]) : $val;
                }
            }
            return $base;
        }
        return Helpers::merge($value, $base);
    }
    public function complete($value, Context $context)
    {
        $merge = $this->merge;
        if (\is_array($value) && isset($value[Helpers::PREVENT_MERGING])) {
            unset($value[Helpers::PREVENT_MERGING]);
            $merge = \false;
        }
        if ($value === null && \is_array($this->default)) {
            $value = [];
            // is unable to distinguish null from array in NEON
        }
        $this->doDeprecation($context);
        if (!$this->doValidate($value, $this->type, $context) || !$this->doValidateRange($value, $this->range, $context, $this->type)) {
            return;
        }
        if ($value !== null && $this->pattern !== null && !\preg_match("\x01^(?:{$this->pattern})\$\x01Du", $value)) {
            $context->addError("The %label% %path% expects to match pattern '%pattern%', %value% given.", Nette\Schema\Message::PATTERN_MISMATCH, ['value' => $value, 'pattern' => $this->pattern]);
            return;
        }
        if ($value instanceof DynamicParameter) {
            $expected = $this->type . ($this->range === [null, null] ? '' : ':' . \implode('..', $this->range));
            $context->dynamics[] = [$value, \str_replace(DynamicParameter::class . '|', '', $expected)];
        }
        if ($this->itemsValue) {
            $errCount = \count($context->errors);
            $res = [];
            foreach ($value as $key => $val) {
                $context->path[] = $key;
                $context->isKey = \true;
                $key = $this->itemsKey ? $this->itemsKey->complete($key, $context) : $key;
                $context->isKey = \false;
                $res[$key] = $this->itemsValue->complete($val, $context);
                \array_pop($context->path);
            }
            if (\count($context->errors) > $errCount) {
                return null;
            }
            $value = $res;
        }
        if ($merge) {
            $value = Helpers::merge($value, $this->default);
        }
        return $this->doFinalize($value, $context);
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Schema;

interface DynamicParameter
{
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Schema;

use _PHPStan_dcc7b7cff\Nette;
final class Message
{
    use Nette\SmartObject;
    /** variables: {value: mixed, expected: string} */
    public const TYPE_MISMATCH = 'schema.typeMismatch';
    /** variables: {value: mixed, expected: string} */
    public const VALUE_OUT_OF_RANGE = 'schema.valueOutOfRange';
    /** variables: {value: mixed, length: int, expected: string} */
    public const LENGTH_OUT_OF_RANGE = 'schema.lengthOutOfRange';
    /** variables: {value: string, pattern: string} */
    public const PATTERN_MISMATCH = 'schema.patternMismatch';
    /** variables: {value: mixed, assertion: string} */
    public const FAILED_ASSERTION = 'schema.failedAssertion';
    /** no variables */
    public const MISSING_ITEM = 'schema.missingItem';
    /** variables: {hint: string} */
    public const UNEXPECTED_ITEM = 'schema.unexpectedItem';
    /** no variables */
    public const DEPRECATED = 'schema.deprecated';
    /** @var string */
    public $message;
    /** @var string */
    public $code;
    /** @var string[] */
    public $path;
    /** @var string[] */
    public $variables;
    public function __construct(string $message, string $code, array $path, array $variables = [])
    {
        $this->message = $message;
        $this->code = $code;
        $this->path = $path;
        $this->variables = $variables;
    }
    public function toString() : string
    {
        $vars = $this->variables;
        $vars['label'] = empty($vars['isKey']) ? 'item' : 'key of item';
        $vars['path'] = $this->path ? "'" . \implode(" › ", $this->path) . "'" : null;
        $vars['value'] = Helpers::formatValue($vars['value'] ?? null);
        return \preg_replace_callback('~( ?)%(\\w+)%~', function ($m) use($vars) {
            [, $space, $key] = $m;
            return $vars[$key] === null ? '' : $space . $vars[$key];
        }, $this->message);
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Schema;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\Utils\Reflection;
/**
 * @internal
 */
final class Helpers
{
    use Nette\StaticClass;
    public const PREVENT_MERGING = '_prevent_merging';
    /**
     * Merges dataset. Left has higher priority than right one.
     * @return array|string
     */
    public static function merge($value, $base)
    {
        if (\is_array($value) && isset($value[self::PREVENT_MERGING])) {
            unset($value[self::PREVENT_MERGING]);
            return $value;
        }
        if (\is_array($value) && \is_array($base)) {
            $index = 0;
            foreach ($value as $key => $val) {
                if ($key === $index) {
                    $base[] = $val;
                    $index++;
                } else {
                    $base[$key] = static::merge($val, $base[$key] ?? null);
                }
            }
            return $base;
        } elseif ($value === null && \is_array($base)) {
            return $base;
        } else {
            return $value;
        }
    }
    public static function getPropertyType(\ReflectionProperty $prop) : ?string
    {
        if (!\class_exists(Nette\Utils\Type::class)) {
            throw new Nette\NotSupportedException('Expect::from() requires nette/utils 3.x');
        } elseif ($type = Nette\Utils\Type::fromReflection($prop)) {
            return (string) $type;
        } elseif ($type = \preg_replace('#\\s.*#', '', (string) self::parseAnnotation($prop, 'var'))) {
            $class = Reflection::getPropertyDeclaringClass($prop);
            return \preg_replace_callback('#[\\w\\\\]+#', function ($m) use($class) {
                return Reflection::expandClassName($m[0], $class);
            }, $type);
        }
        return null;
    }
    /**
     * Returns an annotation value.
     * @param  \ReflectionProperty  $ref
     */
    public static function parseAnnotation(\Reflector $ref, string $name) : ?string
    {
        if (!Reflection::areCommentsAvailable()) {
            throw new Nette\InvalidStateException('You have to enable phpDoc comments in opcode cache.');
        }
        $re = '#[\\s*]@' . \preg_quote($name, '#') . '(?=\\s|$)(?:[ \\t]+([^@\\s]\\S*))?#';
        if ($ref->getDocComment() && \preg_match($re, \trim($ref->getDocComment(), '/*'), $m)) {
            return $m[1] ?? '';
        }
        return null;
    }
    /**
     * @param  mixed  $value
     */
    public static function formatValue($value) : string
    {
        if (\is_object($value)) {
            return 'object ' . \get_class($value);
        } elseif (\is_string($value)) {
            return "'" . Nette\Utils\Strings::truncate($value, 15, '...') . "'";
        } elseif (\is_scalar($value)) {
            return \var_export($value, \true);
        } else {
            return \strtolower(\gettype($value));
        }
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Schema;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\Schema\Elements\AnyOf;
use _PHPStan_dcc7b7cff\Nette\Schema\Elements\Structure;
use _PHPStan_dcc7b7cff\Nette\Schema\Elements\Type;
/**
 * Schema generator.
 *
 * @method static Type scalar($default = null)
 * @method static Type string($default = null)
 * @method static Type int($default = null)
 * @method static Type float($default = null)
 * @method static Type bool($default = null)
 * @method static Type null()
 * @method static Type array($default = [])
 * @method static Type list($default = [])
 * @method static Type mixed($default = null)
 * @method static Type email($default = null)
 * @method static Type unicode($default = null)
 */
final class Expect
{
    use Nette\SmartObject;
    public static function __callStatic(string $name, array $args) : Type
    {
        $type = new Type($name);
        if ($args) {
            $type->default($args[0]);
        }
        return $type;
    }
    public static function type(string $type) : Type
    {
        return new Type($type);
    }
    /**
     * @param  mixed|Schema  ...$set
     */
    public static function anyOf(...$set) : AnyOf
    {
        return new AnyOf(...$set);
    }
    /**
     * @param  Schema[]  $items
     */
    public static function structure(array $items) : Structure
    {
        return new Structure($items);
    }
    /**
     * @param  object  $object
     */
    public static function from($object, array $items = []) : Structure
    {
        $ro = new \ReflectionObject($object);
        foreach ($ro->getProperties() as $prop) {
            $type = Helpers::getPropertyType($prop) ?? 'mixed';
            $item =& $items[$prop->getName()];
            if (!$item) {
                $item = new Type($type);
                if (\PHP_VERSION_ID >= 70400 && !$prop->isInitialized($object)) {
                    $item->required();
                } else {
                    $def = $prop->getValue($object);
                    if (\is_object($def)) {
                        $item = static::from($def);
                    } elseif ($def === null && !Nette\Utils\Validators::is(null, $type)) {
                        $item->required();
                    } else {
                        $item->default($def);
                    }
                }
            }
        }
        return (new Structure($items))->castTo($ro->getName());
    }
    /**
     * @param  string|Schema  $valueType
     * @param  string|Schema|null  $keyType
     */
    public static function arrayOf($valueType, $keyType = null) : Type
    {
        return (new Type('array'))->items($valueType, $keyType);
    }
    /**
     * @param  string|Schema  $type
     */
    public static function listOf($type) : Type
    {
        return (new Type('list'))->items($type);
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Schema;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Validation error.
 */
class ValidationException extends Nette\InvalidStateException
{
    /** @var Message[] */
    private $messages;
    /**
     * @param  Message[]  $messages
     */
    public function __construct(?string $message, array $messages = [])
    {
        parent::__construct($message ?: $messages[0]->toString());
        $this->messages = $messages;
    }
    /**
     * @return string[]
     */
    public function getMessages() : array
    {
        $res = [];
        foreach ($this->messages as $message) {
            $res[] = $message->toString();
        }
        return $res;
    }
    /**
     * @return Message[]
     */
    public function getMessageObjects() : array
    {
        return $this->messages;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Schema;

use _PHPStan_dcc7b7cff\Nette;
/**
 * Schema validator.
 */
final class Processor
{
    use Nette\SmartObject;
    /** @var array */
    public $onNewContext = [];
    /** @var Context|null */
    private $context;
    /** @var bool */
    private $skipDefaults;
    public function skipDefaults(bool $value = \true)
    {
        $this->skipDefaults = $value;
    }
    /**
     * Normalizes and validates data. Result is a clean completed data.
     * @return mixed
     * @throws ValidationException
     */
    public function process(Schema $schema, $data)
    {
        $this->createContext();
        $data = $schema->normalize($data, $this->context);
        $this->throwsErrors();
        $data = $schema->complete($data, $this->context);
        $this->throwsErrors();
        return $data;
    }
    /**
     * Normalizes and validates and merges multiple data. Result is a clean completed data.
     * @return mixed
     * @throws ValidationException
     */
    public function processMultiple(Schema $schema, array $dataset)
    {
        $this->createContext();
        $flatten = null;
        $first = \true;
        foreach ($dataset as $data) {
            $data = $schema->normalize($data, $this->context);
            $this->throwsErrors();
            $flatten = $first ? $data : $schema->merge($data, $flatten);
            $first = \false;
        }
        $data = $schema->complete($flatten, $this->context);
        $this->throwsErrors();
        return $data;
    }
    /**
     * @return string[]
     */
    public function getWarnings() : array
    {
        $res = [];
        foreach ($this->context->warnings as $message) {
            $res[] = $message->toString();
        }
        return $res;
    }
    private function throwsErrors() : void
    {
        if ($this->context->errors) {
            throw new ValidationException(null, $this->context->errors);
        }
    }
    private function createContext()
    {
        $this->context = new Context();
        $this->context->skipDefaults = $this->skipDefaults;
        $this->onNewContext($this->context);
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Schema;

interface Schema
{
    /**
     * Normalization.
     * @return mixed
     */
    function normalize($value, Context $context);
    /**
     * Merging.
     * @return mixed
     */
    function merge($value, $base);
    /**
     * Validation and finalization.
     * @return mixed
     */
    function complete($value, Context $context);
    /**
     * @return mixed
     */
    function completeDefault(Context $context);
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Schema;

use _PHPStan_dcc7b7cff\Nette;
final class Context
{
    use Nette\SmartObject;
    /** @var bool */
    public $skipDefaults = \false;
    /** @var string[] */
    public $path = [];
    /** @var bool */
    public $isKey = \false;
    /** @var Message[] */
    public $errors = [];
    /** @var Message[] */
    public $warnings = [];
    /** @var array[] */
    public $dynamics = [];
    public function addError(string $message, string $code, array $variables = []) : Message
    {
        $variables['isKey'] = $this->isKey;
        return $this->errors[] = new Message($message, $code, $this->path, $variables);
    }
    public function addWarning(string $message, string $code, array $variables = []) : Message
    {
        return $this->warnings[] = new Message($message, $code, $this->path, $variables);
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Utils;

use _PHPStan_dcc7b7cff\Nette;
use RecursiveDirectoryIterator;
use RecursiveIteratorIterator;
/**
 * Finder allows searching through directory trees using iterator.
 *
 * <code>
 * Finder::findFiles('*.php')
 *     ->size('> 10kB')
 *     ->from('.')
 *     ->exclude('temp');
 * </code>
 *
 * @implements \IteratorAggregate<string, \SplFileInfo>
 */
class Finder implements \IteratorAggregate, \Countable
{
    use Nette\SmartObject;
    /** @var callable[]  extension methods */
    private static $extMethods = [];
    /** @var array */
    private $paths = [];
    /** @var array of filters */
    private $groups = [];
    /** @var array filter for recursive traversing */
    private $exclude = [];
    /** @var int */
    private $order = RecursiveIteratorIterator::SELF_FIRST;
    /** @var int */
    private $maxDepth = -1;
    /** @var array */
    private $cursor;
    /**
     * Begins search for files and directories matching mask.
     * @param  string  ...$masks
     * @return static
     */
    public static function find(...$masks) : self
    {
        $masks = \is_array($tmp = \reset($masks)) ? $tmp : $masks;
        return (new static())->select($masks, 'isDir')->select($masks, 'isFile');
    }
    /**
     * Begins search for files matching mask.
     * @param  string  ...$masks
     * @return static
     */
    public static function findFiles(...$masks) : self
    {
        $masks = \is_array($tmp = \reset($masks)) ? $tmp : $masks;
        return (new static())->select($masks, 'isFile');
    }
    /**
     * Begins search for directories matching mask.
     * @param  string  ...$masks
     * @return static
     */
    public static function findDirectories(...$masks) : self
    {
        $masks = \is_array($tmp = \reset($masks)) ? $tmp : $masks;
        return (new static())->select($masks, 'isDir');
    }
    /**
     * Creates filtering group by mask & type selector.
     * @return static
     */
    private function select(array $masks, string $type) : self
    {
        $this->cursor =& $this->groups[];
        $pattern = self::buildPattern($masks);
        $this->filter(function (RecursiveDirectoryIterator $file) use($type, $pattern) : bool {
            return !$file->isDot() && $file->{$type}() && (!$pattern || \preg_match($pattern, '/' . \strtr($file->getSubPathName(), '\\', '/')));
        });
        return $this;
    }
    /**
     * Searches in the given folder(s).
     * @param  string  ...$paths
     * @return static
     */
    public function in(...$paths) : self
    {
        $this->maxDepth = 0;
        return $this->from(...$paths);
    }
    /**
     * Searches recursively from the given folder(s).
     * @param  string  ...$paths
     * @return static
     */
    public function from(...$paths) : self
    {
        if ($this->paths) {
            throw new Nette\InvalidStateException('Directory to search has already been specified.');
        }
        $this->paths = \is_array($tmp = \reset($paths)) ? $tmp : $paths;
        $this->cursor =& $this->exclude;
        return $this;
    }
    /**
     * Shows folder content prior to the folder.
     * @return static
     */
    public function childFirst() : self
    {
        $this->order = RecursiveIteratorIterator::CHILD_FIRST;
        return $this;
    }
    /**
     * Converts Finder pattern to regular expression.
     */
    private static function buildPattern(array $masks) : ?string
    {
        $pattern = [];
        foreach ($masks as $mask) {
            $mask = \rtrim(\strtr($mask, '\\', '/'), '/');
            $prefix = '';
            if ($mask === '') {
                continue;
            } elseif ($mask === '*') {
                return null;
            } elseif ($mask[0] === '/') {
                // absolute fixing
                $mask = \ltrim($mask, '/');
                $prefix = '(?<=^/)';
            }
            $pattern[] = $prefix . \strtr(\preg_quote($mask, '#'), ['\\*\\*' => '.*', '\\*' => '[^/]*', '\\?' => '[^/]', '\\[\\!' => '[^', '\\[' => '[', '\\]' => ']', '\\-' => '-']);
        }
        return $pattern ? '#/(' . \implode('|', $pattern) . ')$#Di' : null;
    }
    /********************* iterator generator ****************d*g**/
    /** @deprecated */
    public function count() : int
    {
        \trigger_error('Nette\\Utils\\Finder::count is deprecated.', \E_USER_DEPRECATED);
        return \iterator_count($this->getIterator());
    }
    /**
     * Returns iterator.
     */
    public function getIterator() : \Iterator
    {
        if (!$this->paths) {
            throw new Nette\InvalidStateException('Call in() or from() to specify directory to search.');
        } elseif (\count($this->paths) === 1) {
            return $this->buildIterator((string) $this->paths[0]);
        }
        $iterator = new \AppendIterator();
        foreach ($this->paths as $path) {
            $iterator->append($this->buildIterator((string) $path));
        }
        return $iterator;
    }
    /**
     * Returns per-path iterator.
     */
    private function buildIterator(string $path) : \Iterator
    {
        $iterator = new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::FOLLOW_SYMLINKS);
        if ($this->exclude) {
            $iterator = new \RecursiveCallbackFilterIterator($iterator, function ($foo, $bar, RecursiveDirectoryIterator $file) : bool {
                if (!$file->isDot() && !$file->isFile()) {
                    foreach ($this->exclude as $filter) {
                        if (!$filter($file)) {
                            return \false;
                        }
                    }
                }
                return \true;
            });
        }
        if ($this->maxDepth !== 0) {
            $iterator = new RecursiveIteratorIterator($iterator, $this->order);
            $iterator->setMaxDepth($this->maxDepth);
        }
        $iterator = new \CallbackFilterIterator($iterator, function ($foo, $bar, \Iterator $file) : bool {
            while ($file instanceof \OuterIterator) {
                $file = $file->getInnerIterator();
            }
            foreach ($this->groups as $filters) {
                foreach ($filters as $filter) {
                    if (!$filter($file)) {
                        continue 2;
                    }
                }
                return \true;
            }
            return \false;
        });
        return $iterator;
    }
    /********************* filtering ****************d*g**/
    /**
     * Restricts the search using mask.
     * Excludes directories from recursive traversing.
     * @param  string  ...$masks
     * @return static
     */
    public function exclude(...$masks) : self
    {
        $masks = \is_array($tmp = \reset($masks)) ? $tmp : $masks;
        $pattern = self::buildPattern($masks);
        if ($pattern) {
            $this->filter(function (RecursiveDirectoryIterator $file) use($pattern) : bool {
                return !\preg_match($pattern, '/' . \strtr($file->getSubPathName(), '\\', '/'));
            });
        }
        return $this;
    }
    /**
     * Restricts the search using callback.
     * @param  callable(RecursiveDirectoryIterator): bool  $callback
     * @return static
     */
    public function filter(callable $callback) : self
    {
        $this->cursor[] = $callback;
        return $this;
    }
    /**
     * Limits recursion level.
     * @return static
     */
    public function limitDepth(int $depth) : self
    {
        $this->maxDepth = $depth;
        return $this;
    }
    /**
     * Restricts the search by size.
     * @param  string  $operator  "[operator] [size] [unit]" example: >=10kB
     * @return static
     */
    public function size(string $operator, ?int $size = null) : self
    {
        if (\func_num_args() === 1) {
            // in $operator is predicate
            if (!\preg_match('#^(?:([=<>!]=?|<>)\\s*)?((?:\\d*\\.)?\\d+)\\s*(K|M|G|)B?$#Di', $operator, $matches)) {
                throw new Nette\InvalidArgumentException('Invalid size predicate format.');
            }
            [, $operator, $size, $unit] = $matches;
            static $units = ['' => 1, 'k' => 1000.0, 'm' => 1000000.0, 'g' => 1000000000.0];
            $size *= $units[\strtolower($unit)];
            $operator = $operator ?: '=';
        }
        return $this->filter(function (RecursiveDirectoryIterator $file) use($operator, $size) : bool {
            return self::compare($file->getSize(), $operator, $size);
        });
    }
    /**
     * Restricts the search by modified time.
     * @param  string  $operator  "[operator] [date]" example: >1978-01-23
     * @param  string|int|\DateTimeInterface  $date
     * @return static
     */
    public function date(string $operator, $date = null) : self
    {
        if (\func_num_args() === 1) {
            // in $operator is predicate
            if (!\preg_match('#^(?:([=<>!]=?|<>)\\s*)?(.+)$#Di', $operator, $matches)) {
                throw new Nette\InvalidArgumentException('Invalid date predicate format.');
            }
            [, $operator, $date] = $matches;
            $operator = $operator ?: '=';
        }
        $date = DateTime::from($date)->format('U');
        return $this->filter(function (RecursiveDirectoryIterator $file) use($operator, $date) : bool {
            return self::compare($file->getMTime(), $operator, $date);
        });
    }
    /**
     * Compares two values.
     */
    public static function compare($l, string $operator, $r) : bool
    {
        switch ($operator) {
            case '>':
                return $l > $r;
            case '>=':
                return $l >= $r;
            case '<':
                return $l < $r;
            case '<=':
                return $l <= $r;
            case '=':
            case '==':
                return $l == $r;
            case '!':
            case '!=':
            case '<>':
                return $l != $r;
            default:
                throw new Nette\InvalidArgumentException("Unknown operator {$operator}.");
        }
    }
    /********************* extension methods ****************d*g**/
    /** @deprecated */
    public function __call(string $name, array $args)
    {
        return isset(self::$extMethods[$name]) ? self::$extMethods[$name]($this, ...$args) : Nette\Utils\ObjectHelpers::strictCall(static::class, $name, \array_keys(self::$extMethods));
    }
    /** @deprecated */
    public static function extensionMethod(string $name, callable $callback) : void
    {
        \trigger_error(__METHOD__ . '() is deprecated.', \E_USER_DEPRECATED);
        self::$extMethods[$name] = $callback;
    }
}
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Nette\Loaders;

use _PHPStan_dcc7b7cff\Nette;
use SplFileInfo;
/**
 * Nette auto loader is responsible for loading classes and interfaces.
 *
 * <code>
 * $loader = new Nette\Loaders\RobotLoader;
 * $loader->addDirectory('app');
 * $loader->excludeDirectory('app/exclude');
 * $loader->setTempDirectory('temp');
 * $loader->register();
 * </code>
 */
class RobotLoader
{
    use Nette\SmartObject;
    private const RETRY_LIMIT = 3;
    /** @var string[] */
    public $ignoreDirs = ['.*', '*.old', '*.bak', '*.tmp', 'temp'];
    /** @var string[] */
    public $acceptFiles = ['*.php'];
    /** @var bool */
    private $autoRebuild = \true;
    /** @var bool */
    private $reportParseErrors = \true;
    /** @var string[] */
    private $scanPaths = [];
    /** @var string[] */
    private $excludeDirs = [];
    /** @var array<string, array{string, int}>  class => [file, time] */
    private $classes = [];
    /** @var bool */
    private $cacheLoaded = \false;
    /** @var bool */
    private $refreshed = \false;
    /** @var array<string, int>  class => counter */
    private $missingClasses = [];
    /** @var array<string, int>  file => mtime */
    private $emptyFiles = [];
    /** @var string|null */
    private $tempDirectory;
    /** @var bool */
    private $needSave = \false;
    public function __construct()
    {
        if (!\extension_loaded('tokenizer')) {
            throw new Nette\NotSupportedException('PHP extension Tokenizer is not loaded.');
        }
    }
    public function __destruct()
    {
        if ($this->needSave) {
            $this->saveCache();
        }
    }
    /**
     * Register autoloader.
     */
    public function register(bool $prepend = \false) : self
    {
        \spl_autoload_register([$this, 'tryLoad'], \true, $prepend);
        return $this;
    }
    /**
     * Handles autoloading of classes, interfaces or traits.
     */
    public function tryLoad(string $type) : void
    {
        $this->loadCache();
        $missing = $this->missingClasses[$type] ?? null;
        if ($missing >= self::RETRY_LIMIT) {
            return;
        }
        [$file, $mtime] = $this->classes[$type] ?? null;
        if ($this->autoRebuild) {
            if (!$this->refreshed) {
                if (!$file || !\is_file($file)) {
                    $this->refreshClasses();
                    [$file] = $this->classes[$type] ?? null;
                    $this->needSave = \true;
                } elseif (\filemtime($file) !== $mtime) {
                    $this->updateFile($file);
                    [$file] = $this->classes[$type] ?? null;
                    $this->needSave = \true;
                }
            }
            if (!$file || !\is_file($file)) {
                $this->missingClasses[$type] = ++$missing;
                $this->needSave = $this->needSave || $file || $missing <= self::RETRY_LIMIT;
                unset($this->classes[$type]);
                $file = null;
            }
        }
        if ($file) {
            (static function ($file) {
                require $file;
            })($file);
        }
    }
    /**
     * Add path or paths to list.
     * @param  string  ...$paths  absolute path
     */
    public function addDirectory(...$paths) : self
    {
        if (\is_array($paths[0] ?? null)) {
            \trigger_error(__METHOD__ . '() use variadics ...$paths to add an array of paths.', \E_USER_WARNING);
            $paths = $paths[0];
        }
        $this->scanPaths = \array_merge($this->scanPaths, $paths);
        return $this;
    }
    public function reportParseErrors(bool $on = \true) : self
    {
        $this->reportParseErrors = $on;
        return $this;
    }
    /**
     * Excludes path or paths from list.
     * @param  string  ...$paths  absolute path
     */
    public function excludeDirectory(...$paths) : self
    {
        if (\is_array($paths[0] ?? null)) {
            \trigger_error(__METHOD__ . '() use variadics ...$paths to add an array of paths.', \E_USER_WARNING);
            $paths = $paths[0];
        }
        $this->excludeDirs = \array_merge($this->excludeDirs, $paths);
        return $this;
    }
    /**
     * @return array<string, string>  class => filename
     */
    public function getIndexedClasses() : array
    {
        $this->loadCache();
        $res = [];
        foreach ($this->classes as $class => [$file]) {
            $res[$class] = $file;
        }
        return $res;
    }
    /**
     * Rebuilds class list cache.
     */
    public function rebuild() : void
    {
        $this->cacheLoaded = \true;
        $this->classes = $this->missingClasses = $this->emptyFiles = [];
        $this->refreshClasses();
        if ($this->tempDirectory) {
            $this->saveCache();
        }
    }
    /**
     * Refreshes class list cache.
     */
    public function refresh() : void
    {
        $this->loadCache();
        if (!$this->refreshed) {
            $this->refreshClasses();
            $this->saveCache();
        }
    }
    /**
     * Refreshes $this->classes & $this->emptyFiles.
     */
    private function refreshClasses() : void
    {
        $this->refreshed = \true;
        // prevents calling refreshClasses() or updateFile() in tryLoad()
        $files = $this->emptyFiles;
        $classes = [];
        foreach ($this->classes as $class => [$file, $mtime]) {
            $files[$file] = $mtime;
            $classes[$file][] = $class;
        }
        $this->classes = $this->emptyFiles = [];
        foreach ($this->scanPaths as $path) {
            $iterator = \is_file($path) ? [new SplFileInfo($path)] : $this->createFileIterator($path);
            foreach ($iterator as $fileInfo) {
                $mtime = $fileInfo->getMTime();
                $file = $fileInfo->getPathname();
                $foundClasses = isset($files[$file]) && $files[$file] === $mtime ? $classes[$file] ?? [] : $this->scanPhp($file);
                if (!$foundClasses) {
                    $this->emptyFiles[$file] = $mtime;
                }
                $files[$file] = $mtime;
                $classes[$file] = [];
                // prevents the error when adding the same file twice
                foreach ($foundClasses as $class) {
                    if (isset($this->classes[$class])) {
                        throw new Nette\InvalidStateException("Ambiguous class {$class} resolution; defined in {$this->classes[$class][0]} and in {$file}.");
                    }
                    $this->classes[$class] = [$file, $mtime];
                    unset($this->missingClasses[$class]);
                }
            }
        }
    }
    /**
     * Creates an iterator scaning directory for PHP files, subdirectories and 'netterobots.txt' files.
     * @throws Nette\IOException if path is not found
     */
    private function createFileIterator(string $dir) : Nette\Utils\Finder
    {
        if (!\is_dir($dir)) {
            throw new Nette\IOException("File or directory '{$dir}' not found.");
        }
        $dir = \realpath($dir) ?: $dir;
        // realpath does not work in phar
        if (\is_string($ignoreDirs = $this->ignoreDirs)) {
            \trigger_error(self::class . ': $ignoreDirs must be an array.', \E_USER_WARNING);
            $ignoreDirs = \preg_split('#[,\\s]+#', $ignoreDirs);
        }
        $disallow = [];
        foreach (\array_merge($ignoreDirs, $this->excludeDirs) as $item) {
            if ($item = \realpath($item)) {
                $disallow[\str_replace('\\', '/', $item)] = \true;
            }
        }
        if (\is_string($acceptFiles = $this->acceptFiles)) {
            \trigger_error(self::class . ': $acceptFiles must be an array.', \E_USER_WARNING);
            $acceptFiles = \preg_split('#[,\\s]+#', $acceptFiles);
        }
        $iterator = Nette\Utils\Finder::findFiles($acceptFiles)->filter(function (SplFileInfo $file) use(&$disallow) {
            return $file->getRealPath() === \false ? \true : !isset($disallow[\str_replace('\\', '/', $file->getRealPath())]);
        })->from($dir)->exclude($ignoreDirs)->filter($filter = function (SplFileInfo $dir) use(&$disallow) {
            if ($dir->getRealPath() === \false) {
                return \true;
            }
            $path = \str_replace('\\', '/', $dir->getRealPath());
            if (\is_file("{$path}/netterobots.txt")) {
                foreach (\file("{$path}/netterobots.txt") as $s) {
                    if (\preg_match('#^(?:disallow\\s*:)?\\s*(\\S+)#i', $s, $matches)) {
                        $disallow[$path . \rtrim('/' . \ltrim($matches[1], '/'), '/')] = \true;
                    }
                }
            }
            return !isset($disallow[$path]);
        });
        $filter(new SplFileInfo($dir));
        return $iterator;
    }
    private function updateFile(string $file) : void
    {
        foreach ($this->classes as $class => [$prevFile]) {
            if ($file === $prevFile) {
                unset($this->classes[$class]);
            }
        }
        $foundClasses = \is_file($file) ? $this->scanPhp($file) : [];
        foreach ($foundClasses as $class) {
            [$prevFile, $prevMtime] = $this->classes[$class] ?? null;
            if (isset($prevFile) && @\filemtime($prevFile) !== $prevMtime) {
                // @ file may not exists
                $this->updateFile($prevFile);
                [$prevFile] = $this->classes[$class] ?? null;
            }
            if (isset($prevFile)) {
                throw new Nette\InvalidStateException("Ambiguous class {$class} resolution; defined in {$prevFile} and in {$file}.");
            }
            $this->classes[$class] = [$file, \filemtime($file)];
        }
    }
    /**
     * Searches classes, interfaces and traits in PHP file.
     * @return string[]
     */
    private function scanPhp(string $file) : array
    {
        $code = \file_get_contents($file);
        $expected = \false;
        $namespace = $name = '';
        $level = $minLevel = 0;
        $classes = [];
        try {
            $tokens = \token_get_all($code, \TOKEN_PARSE);
        } catch (\ParseError $e) {
            if ($this->reportParseErrors) {
                $rp = new \ReflectionProperty($e, 'file');
                $rp->setAccessible(\true);
                $rp->setValue($e, $file);
                throw $e;
            }
            $tokens = [];
        }
        foreach ($tokens as $token) {
            if (\is_array($token)) {
                switch ($token[0]) {
                    case \T_COMMENT:
                    case \T_DOC_COMMENT:
                    case \T_WHITESPACE:
                        continue 2;
                    case \T_STRING:
                    case \PHP_VERSION_ID < 80000 ? \T_NS_SEPARATOR : \T_NAME_QUALIFIED:
                        if ($expected) {
                            $name .= $token[1];
                        }
                        continue 2;
                    case \T_NAMESPACE:
                    case \T_CLASS:
                    case \T_INTERFACE:
                    case \T_TRAIT:
                    case \PHP_VERSION_ID < 80100 ? \T_CLASS : \T_ENUM:
                        $expected = $token[0];
                        $name = '';
                        continue 2;
                    case \T_CURLY_OPEN:
                    case \T_DOLLAR_OPEN_CURLY_BRACES:
                        $level++;
                }
            }
            if ($expected) {
                if ($expected === \T_NAMESPACE) {
                    $namespace = $name ? $name . '\\' : '';
                    $minLevel = $token === '{' ? 1 : 0;
                } elseif ($name && $level === $minLevel) {
                    $classes[] = $namespace . $name;
                }
                $expected = null;
            }
            if ($token === '{') {
                $level++;
            } elseif ($token === '}') {
                $level--;
            }
        }
        return $classes;
    }
    /********************* caching ****************d*g**/
    /**
     * Sets auto-refresh mode.
     */
    public function setAutoRefresh(bool $on = \true) : self
    {
        $this->autoRebuild = $on;
        return $this;
    }
    /**
     * Sets path to temporary directory.
     */
    public function setTempDirectory(string $dir) : self
    {
        Nette\Utils\FileSystem::createDir($dir);
        $this->tempDirectory = $dir;
        return $this;
    }
    /**
     * Loads class list from cache.
     */
    private function loadCache() : void
    {
        if ($this->cacheLoaded) {
            return;
        }
        $this->cacheLoaded = \true;
        $file = $this->getCacheFile();
        // Solving atomicity to work everywhere is really pain in the ass.
        // 1) We want to do as little as possible IO calls on production and also directory and file can be not writable (#19)
        // so on Linux we include the file directly without shared lock, therefore, the file must be created atomically by renaming.
        // 2) On Windows file cannot be renamed-to while is open (ie by include() #11), so we have to acquire a lock.
        $lock = \defined('PHP_WINDOWS_VERSION_BUILD') ? $this->acquireLock("{$file}.lock", \LOCK_SH) : null;
        $data = @(include $file);
        // @ file may not exist
        if (\is_array($data)) {
            [$this->classes, $this->missingClasses, $this->emptyFiles] = $data;
            return;
        }
        if ($lock) {
            \flock($lock, \LOCK_UN);
            // release shared lock so we can get exclusive
        }
        $lock = $this->acquireLock("{$file}.lock", \LOCK_EX);
        // while waiting for exclusive lock, someone might have already created the cache
        $data = @(include $file);
        // @ file may not exist
        if (\is_array($data)) {
            [$this->classes, $this->missingClasses, $this->emptyFiles] = $data;
            return;
        }
        $this->classes = $this->missingClasses = $this->emptyFiles = [];
        $this->refreshClasses();
        $this->saveCache($lock);
        // On Windows concurrent creation and deletion of a file can cause a 'permission denied' error,
        // therefore, we will not delete the lock file. Windows is a piece of shit.
    }
    /**
     * Writes class list to cache.
     * @param  resource  $lock
     */
    private function saveCache($lock = null) : void
    {
        // we have to acquire a lock to be able safely rename file
        // on Linux: that another thread does not rename the same named file earlier
        // on Windows: that the file is not read by another thread
        $file = $this->getCacheFile();
        $lock = $lock ?: $this->acquireLock("{$file}.lock", \LOCK_EX);
        $code = "<?php\nreturn " . \var_export([$this->classes, $this->missingClasses, $this->emptyFiles], \true) . ";\n";
        if (\file_put_contents("{$file}.tmp", $code) !== \strlen($code) || !\rename("{$file}.tmp", $file)) {
            @\unlink("{$file}.tmp");
            // @ file may not exist
            throw new \RuntimeException("Unable to create '{$file}'.");
        }
        if (\function_exists('opcache_invalidate')) {
            @\opcache_invalidate($file, \true);
            // @ can be restricted
        }
    }
    /** @return resource */
    private function acquireLock(string $file, int $mode)
    {
        $handle = @\fopen($file, 'w');
        // @ is escalated to exception
        if (!$handle) {
            throw new \RuntimeException("Unable to create file '{$file}'. " . \error_get_last()['message']);
        } elseif (!@\flock($handle, $mode)) {
            // @ is escalated to exception
            throw new \RuntimeException('Unable to acquire ' . ($mode & \LOCK_EX ? 'exclusive' : 'shared') . " lock on file '{$file}'. " . \error_get_last()['message']);
        }
        return $handle;
    }
    private function getCacheFile() : string
    {
        if (!$this->tempDirectory) {
            throw new \LogicException('Set path to temporary directory using setTempDirectory().');
        }
        return $this->tempDirectory . '/' . \md5(\serialize($this->getCacheKey())) . '.php';
    }
    protected function getCacheKey() : array
    {
        return [$this->ignoreDirs, $this->acceptFiles, $this->scanPaths, $this->excludeDirs, 'v2'];
    }
}
<?php

/*
 * This file is part of the Fidry CPUCounter Config package.
 *
 * (c) Théo FIDRY <theo.fidry@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter;

use _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Finder\CpuCoreFinder;
use function array_map;
use function explode;
use function implode;
use function max;
use function str_repeat;
use const PHP_EOL;
/**
 * Utility to debug.
 *
 * @private
 */
final class Diagnoser
{
    /**
     * Provides an aggregated diagnosis based on each finders diagnosis.
     *
     * @param list<CpuCoreFinder> $finders
     */
    public static function diagnose(array $finders) : string
    {
        $diagnoses = array_map(static function (CpuCoreFinder $finder) : string {
            return self::diagnoseFinder($finder);
        }, $finders);
        return implode(PHP_EOL, $diagnoses);
    }
    /**
     * Executes each finders.
     *
     * @param list<CpuCoreFinder> $finders
     */
    public static function execute(array $finders) : string
    {
        $diagnoses = array_map(static function (CpuCoreFinder $finder) : string {
            $coresCount = $finder->find();
            return implode('', [$finder->toString(), ': ', null === $coresCount ? 'NULL' : $coresCount]);
        }, $finders);
        return implode(PHP_EOL, $diagnoses);
    }
    private static function diagnoseFinder(CpuCoreFinder $finder) : string
    {
        $diagnosis = $finder->diagnose();
        $maxLineLength = max(array_map('strlen', explode(PHP_EOL, $diagnosis)));
        $separator = str_repeat('-', $maxLineLength);
        return implode('', [$finder->toString() . ':' . PHP_EOL, $separator . PHP_EOL, $diagnosis . PHP_EOL, $separator . PHP_EOL]);
    }
    private function __construct()
    {
    }
}
<?php

/*
 * This file is part of the Fidry CPUCounter Config package.
 *
 * (c) Théo FIDRY <theo.fidry@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Finder;

/**
 * Find the number of logical CPU cores for Linux and the likes.
 *
 * @see https://twitter.com/freebsdfrau/status/1052016199452700678?s=20&t=M2pHkRqmmna-UF68lfL2hw
 */
final class _NProcessorFinder extends ProcOpenBasedFinder
{
    protected function getCommand() : string
    {
        return 'getconf _NPROCESSORS_ONLN';
    }
    public function toString() : string
    {
        return '_NProcessorFinder';
    }
}
<?php

/*
 * This file is part of the Fidry CPUCounter Config package.
 *
 * (c) Théo FIDRY <theo.fidry@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Finder;

interface CpuCoreFinder
{
    /**
     * Provides an explanation which may offer some insight as to what the finder
     * will be able to find.
     *
     * This is practical to have an idea of what each finder will find collect
     * information for the unit tests, since integration tests are quite complicated
     * as dependent on complex infrastructures.
     */
    public function diagnose() : string;
    /**
     * Find the number of CPU cores. If it could not find it, returns null. The
     * means used to find the cores are at the implementation discretion.
     *
     * @return positive-int|null
     */
    public function find() : ?int;
    public function toString() : string;
}
<?php

/*
 * This file is part of the Fidry CPUCounter Config package.
 *
 * (c) Théo FIDRY <theo.fidry@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Finder;

use function preg_match;
/**
 * Find the number of logical CPU cores for Windows.
 *
 * @see https://github.com/paratestphp/paratest/blob/c163539818fd96308ca8dc60f46088461e366ed4/src/Runners/PHPUnit/Options.php#L912-L916
 */
final class WmicLogicalFinder extends ProcOpenBasedFinder
{
    private const CPU_CORE_COUNT_REGEX = '/NumberOfLogicalProcessors[\\s\\n]+(?<count>\\d+)/';
    protected function getCommand() : string
    {
        return 'wmic cpu get NumberOfLogicalProcessors';
    }
    public function toString() : string
    {
        return 'WmicLogicalFinder';
    }
    protected function countCpuCores(string $process) : ?int
    {
        if (0 === preg_match(self::CPU_CORE_COUNT_REGEX, $process, $matches)) {
            return parent::countCpuCores($process);
        }
        $count = $matches['count'];
        return parent::countCpuCores($count);
    }
}
<?php

/*
 * This file is part of the Fidry CPUCounter Config package.
 *
 * (c) Théo FIDRY <theo.fidry@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Finder;

final class FinderRegistry
{
    /**
     * @return list<CpuCoreFinder> List of all the known finders with all their variants.
     */
    public static function getAllVariants() : array
    {
        return [new CpuInfoFinder(), new DummyCpuCoreFinder(1), new HwLogicalFinder(), new HwPhysicalFinder(), new LscpuLogicalFinder(), new LscpuPhysicalFinder(), new _NProcessorFinder(), new NProcessorFinder(), new NProcFinder(\true), new NProcFinder(\false), new NullCpuCoreFinder(), SkipOnOSFamilyFinder::forWindows(new DummyCpuCoreFinder(1)), OnlyOnOSFamilyFinder::forWindows(new DummyCpuCoreFinder(1)), new WmicPhysicalFinder(), new WmicLogicalFinder()];
    }
    /**
     * @return list<CpuCoreFinder>
     */
    public static function getDefaultLogicalFinders() : array
    {
        return [OnlyOnOSFamilyFinder::forWindows(new WmicLogicalFinder()), new NProcFinder(), new HwLogicalFinder(), new _NProcessorFinder(), new NProcessorFinder(), new LscpuLogicalFinder(), new CpuInfoFinder()];
    }
    /**
     * @return list<CpuCoreFinder>
     */
    public static function getDefaultPhysicalFinders() : array
    {
        return [OnlyOnOSFamilyFinder::forWindows(new WmicPhysicalFinder()), new HwPhysicalFinder(), new LscpuPhysicalFinder()];
    }
    private function __construct()
    {
    }
}
<?php

/*
 * This file is part of the Fidry CPUCounter Config package.
 *
 * (c) Théo FIDRY <theo.fidry@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Finder;

use _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Executor\ProcessExecutor;
use _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Executor\ProcOpenExecutor;
use function filter_var;
use function function_exists;
use function is_int;
use function sprintf;
use function trim;
use const FILTER_VALIDATE_INT;
use const PHP_EOL;
abstract class ProcOpenBasedFinder implements CpuCoreFinder
{
    /**
     * @var ProcessExecutor
     */
    private $executor;
    public function __construct(?ProcessExecutor $executor = null)
    {
        $this->executor = $executor ?? new ProcOpenExecutor();
    }
    public function diagnose() : string
    {
        if (!function_exists('proc_open')) {
            return 'The function "proc_open" is not available.';
        }
        $command = $this->getCommand();
        $output = $this->executor->execute($command);
        if (null === $output) {
            return sprintf('Failed to execute the command "%s".', $command);
        }
        [$stdout, $stderr] = $output;
        $failed = '' !== trim($stderr);
        return $failed ? sprintf('Executed the command "%s" which wrote the following output to the STDERR:%s%s', $command, PHP_EOL, $stderr) : sprintf('Executed the command "%s" and got the following (STDOUT) output:%s%s', $command, PHP_EOL, $stdout);
    }
    /**
     * @return positive-int|null
     */
    public function find() : ?int
    {
        $output = $this->executor->execute($this->getCommand());
        if (null === $output) {
            return null;
        }
        [$stdout, $stderr] = $output;
        $failed = '' !== trim($stderr);
        return $failed ? null : $this->countCpuCores($stdout);
    }
    /**
     * @internal
     *
     * @return positive-int|null
     */
    protected function countCpuCores(string $process) : ?int
    {
        $cpuCount = filter_var($process, FILTER_VALIDATE_INT);
        return is_int($cpuCount) && $cpuCount > 0 ? $cpuCount : null;
    }
    protected abstract function getCommand() : string;
}
<?php

/*
 * This file is part of the Fidry CPUCounter Config package.
 *
 * (c) Théo FIDRY <theo.fidry@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Finder;

/**
 * Find the number of physical CPU cores for Linux, BSD and OSX.
 *
 * @see https://github.com/paratestphp/paratest/blob/c163539818fd96308ca8dc60f46088461e366ed4/src/Runners/PHPUnit/Options.php#L903-L909
 * @see https://opensource.apple.com/source/xnu/xnu-792.2.4/libkern/libkern/sysctl.h.auto.html
 */
final class HwPhysicalFinder extends ProcOpenBasedFinder
{
    protected function getCommand() : string
    {
        return 'sysctl -n hw.physicalcpu';
    }
    public function toString() : string
    {
        return 'HwPhysicalFinder';
    }
}
<?php

/*
 * This file is part of the Fidry CPUCounter Config package.
 *
 * (c) Théo FIDRY <theo.fidry@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Finder;

use function file_get_contents;
use function is_file;
use function sprintf;
use function substr_count;
use const PHP_EOL;
/**
 * Find the number of CPU cores looking up at the cpuinfo file which is available
 * on Linux systems and Windows systems with a Linux sub-system.
 *
 * @see https://github.com/paratestphp/paratest/blob/c163539818fd96308ca8dc60f46088461e366ed4/src/Runners/PHPUnit/Options.php#L903-L909
 * @see https://unix.stackexchange.com/questions/146051/number-of-processors-in-proc-cpuinfo
 */
final class CpuInfoFinder implements CpuCoreFinder
{
    private const CPU_INFO_PATH = '/proc/cpuinfo';
    public function diagnose() : string
    {
        if (!is_file(self::CPU_INFO_PATH)) {
            return sprintf('The file "%s" could not be found.', self::CPU_INFO_PATH);
        }
        $cpuInfo = file_get_contents(self::CPU_INFO_PATH);
        if (\false === $cpuInfo) {
            return sprintf('Could not get the content of the file "%s".', self::CPU_INFO_PATH);
        }
        return sprintf('Found the file "%s" with the content:%s%s', self::CPU_INFO_PATH, PHP_EOL, $cpuInfo);
    }
    /**
     * @return positive-int|null
     */
    public function find() : ?int
    {
        $cpuInfo = self::getCpuInfo();
        return null === $cpuInfo ? null : self::countCpuCores($cpuInfo);
    }
    public function toString() : string
    {
        return 'CpuInfoFinder';
    }
    private static function getCpuInfo() : ?string
    {
        if (!@is_file(self::CPU_INFO_PATH)) {
            return null;
        }
        $cpuInfo = @file_get_contents(self::CPU_INFO_PATH);
        return \false === $cpuInfo ? null : $cpuInfo;
    }
    /**
     * @internal
     *
     * @return positive-int|null
     */
    public static function countCpuCores(string $cpuInfo) : ?int
    {
        $processorCount = substr_count($cpuInfo, 'processor');
        return $processorCount > 0 ? $processorCount : null;
    }
}
<?php

/*
 * This file is part of the Fidry CPUCounter Config package.
 *
 * (c) Théo FIDRY <theo.fidry@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Finder;

use _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Executor\ProcessExecutor;
use function sprintf;
/**
 * The number of (logical) cores.
 *
 * @see https://github.com/infection/infection/blob/fbd8c44/src/Resource/Processor/CpuCoresCountProvider.php#L69-L82
 * @see https://unix.stackexchange.com/questions/146051/number-of-processors-in-proc-cpuinfo
 */
final class NProcFinder extends ProcOpenBasedFinder
{
    /**
     * @var bool
     */
    private $all;
    /**
     * @param bool $all If disabled will give the number of cores available for the current process only.
     */
    public function __construct(bool $all = \true, ?ProcessExecutor $executor = null)
    {
        parent::__construct($executor);
        $this->all = $all;
    }
    public function toString() : string
    {
        return sprintf('NProcFinder(all=%s)', $this->all ? 'true' : 'false');
    }
    protected function getCommand() : string
    {
        return 'nproc' . ($this->all ? ' --all' : '');
    }
}
<?php

/*
 * This file is part of the Fidry CPUCounter Config package.
 *
 * (c) Théo FIDRY <theo.fidry@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Finder;

use function count;
use function explode;
use function is_array;
use function preg_grep;
use function strtok;
use const PHP_EOL;
/**
 * The number of physical processors.
 *
 * @see https://stackoverflow.com/a/23378780/5846754
 */
final class LscpuPhysicalFinder extends ProcOpenBasedFinder
{
    public function toString() : string
    {
        return 'LscpuPhysicalFinder';
    }
    public function getCommand() : string
    {
        return 'lscpu -p';
    }
    protected function countCpuCores(string $process) : ?int
    {
        $lines = explode(PHP_EOL, $process);
        $actualLines = preg_grep('/^\\d+/', $lines);
        if (!is_array($actualLines)) {
            return null;
        }
        $cores = [];
        foreach ($actualLines as $line) {
            strtok($line, ',');
            $core = strtok(',');
            if (\false === $core) {
                continue;
            }
            $cores[$core] = \true;
        }
        unset($cores['-']);
        $count = count($cores);
        return 0 === $count ? null : $count;
    }
}
<?php

/*
 * This file is part of the Fidry CPUCounter Config package.
 *
 * (c) Théo FIDRY <theo.fidry@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Finder;

use function preg_match;
/**
 * Find the number of physical CPU cores for Windows.
 *
 * @see https://github.com/paratestphp/paratest/blob/c163539818fd96308ca8dc60f46088461e366ed4/src/Runners/PHPUnit/Options.php#L912-L916
 */
final class WmicPhysicalFinder extends ProcOpenBasedFinder
{
    private const CPU_CORE_COUNT_REGEX = '/NumberOfCores[\\s\\n]+(?<count>\\d+)/';
    protected function getCommand() : string
    {
        return 'wmic cpu get NumberOfCores';
    }
    public function toString() : string
    {
        return 'WmicPhysicalFinder';
    }
    protected function countCpuCores(string $process) : ?int
    {
        if (0 === preg_match(self::CPU_CORE_COUNT_REGEX, $process, $matches)) {
            return parent::countCpuCores($process);
        }
        $count = $matches['count'];
        return parent::countCpuCores($count);
    }
}
<?php

/*
 * This file is part of the Fidry CPUCounter Config package.
 *
 * (c) Théo FIDRY <theo.fidry@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Finder;

/**
 * Find the number of logical CPU cores for Linux, BSD and OSX.
 *
 * @see https://github.com/paratestphp/paratest/blob/c163539818fd96308ca8dc60f46088461e366ed4/src/Runners/PHPUnit/Options.php#L903-L909
 * @see https://opensource.apple.com/source/xnu/xnu-792.2.4/libkern/libkern/sysctl.h.auto.html
 */
final class HwLogicalFinder extends ProcOpenBasedFinder
{
    protected function getCommand() : string
    {
        return 'sysctl -n hw.logicalcpu';
    }
    public function toString() : string
    {
        return 'HwLogicalFinder';
    }
}
<?php

/*
 * This file is part of the Fidry CPUCounter Config package.
 *
 * (c) Théo FIDRY <theo.fidry@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Finder;

/**
 * Find the number of logical CPU cores for FreeSBD, Solaris and the likes.
 *
 * @see https://twitter.com/freebsdfrau/status/1052016199452700678?s=20&t=M2pHkRqmmna-UF68lfL2hw
 */
final class NProcessorFinder extends ProcOpenBasedFinder
{
    protected function getCommand() : string
    {
        return 'getconf NPROCESSORS_ONLN';
    }
    public function toString() : string
    {
        return 'NProcessorFinder';
    }
}
<?php

/*
 * This file is part of the Fidry CPUCounter Config package.
 *
 * (c) Théo FIDRY <theo.fidry@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Finder;

use function count;
use function explode;
use function is_array;
use function preg_grep;
use const PHP_EOL;
/**
 * The number of logical cores.
 *
 * @see https://stackoverflow.com/a/23378780/5846754
 */
final class LscpuLogicalFinder extends ProcOpenBasedFinder
{
    public function getCommand() : string
    {
        return 'lscpu -p';
    }
    protected function countCpuCores(string $process) : ?int
    {
        $lines = explode(PHP_EOL, $process);
        $actualLines = preg_grep('/^\\d+,/', $lines);
        if (!is_array($actualLines)) {
            return null;
        }
        $count = count($actualLines);
        return 0 === $count ? null : $count;
    }
    public function toString() : string
    {
        return 'LscpuLogicalFinder';
    }
}
<?php

/*
 * This file is part of the Fidry CPUCounter Config package.
 *
 * (c) Théo FIDRY <theo.fidry@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Finder;

/**
 * This finder returns whatever value you gave to it. This is useful for testing.
 */
final class NullCpuCoreFinder implements CpuCoreFinder
{
    public function diagnose() : string
    {
        return 'Will return "null".';
    }
    public function find() : ?int
    {
        return null;
    }
    public function toString() : string
    {
        return 'NullCpuCoreFinder';
    }
}
<?php

/*
 * This file is part of the Fidry CPUCounter Config package.
 *
 * (c) Théo FIDRY <theo.fidry@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Finder;

use function sprintf;
/**
 * This finder returns whatever value you gave to it. This is useful for testing
 * or as a fallback to avoid to catch the NumberOfCpuCoreNotFound exception.
 */
final class DummyCpuCoreFinder implements CpuCoreFinder
{
    /**
     * @var positive-int
     */
    private $count;
    public function diagnose() : string
    {
        return sprintf('Will return "%d".', $this->count);
    }
    /**
     * @param positive-int $count
     */
    public function __construct(int $count)
    {
        $this->count = $count;
    }
    public function find() : ?int
    {
        return $this->count;
    }
    public function toString() : string
    {
        return sprintf('DummyCpuCoreFinder(value=%d)', $this->count);
    }
}
<?php

/*
 * This file is part of the Fidry CPUCounter Config package.
 *
 * (c) Théo FIDRY <theo.fidry@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Finder;

use function implode;
use function sprintf;
use const PHP_OS_FAMILY;
final class OnlyOnOSFamilyFinder implements CpuCoreFinder
{
    /**
     * @var list<string>
     */
    private $skippedOSFamilies;
    /**
     * @var CpuCoreFinder
     */
    private $decoratedFinder;
    /**
     * @param string|list<string> $skippedOSFamilyOrFamilies
     */
    public function __construct($skippedOSFamilyOrFamilies, CpuCoreFinder $decoratedFinder)
    {
        $this->skippedOSFamilies = (array) $skippedOSFamilyOrFamilies;
        $this->decoratedFinder = $decoratedFinder;
    }
    public static function forWindows(CpuCoreFinder $decoratedFinder) : self
    {
        return new self('Windows', $decoratedFinder);
    }
    public static function forBSD(CpuCoreFinder $decoratedFinder) : self
    {
        return new self('BSD', $decoratedFinder);
    }
    public static function forDarwin(CpuCoreFinder $decoratedFinder) : self
    {
        return new self('Darwin', $decoratedFinder);
    }
    public static function forSolaris(CpuCoreFinder $decoratedFinder) : self
    {
        return new self('Solaris', $decoratedFinder);
    }
    public static function forLinux(CpuCoreFinder $decoratedFinder) : self
    {
        return new self('Linux', $decoratedFinder);
    }
    public function diagnose() : string
    {
        return $this->skip() ? sprintf('Skipped platform detected ("%s").', PHP_OS_FAMILY) : $this->decoratedFinder->diagnose();
    }
    public function find() : ?int
    {
        return $this->skip() ? null : $this->decoratedFinder->find();
    }
    public function toString() : string
    {
        return sprintf('OnlyOnOSFamilyFinder(only=(%s),%s)', implode(',', $this->skippedOSFamilies), $this->decoratedFinder->toString());
    }
    private function skip() : bool
    {
        return !\in_array(PHP_OS_FAMILY, $this->skippedOSFamilies, \true);
    }
}
<?php

/*
 * This file is part of the Fidry CPUCounter Config package.
 *
 * (c) Théo FIDRY <theo.fidry@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Finder;

use function implode;
use function in_array;
use function sprintf;
final class SkipOnOSFamilyFinder implements CpuCoreFinder
{
    /**
     * @var list<string>
     */
    private $skippedOSFamilies;
    /**
     * @var CpuCoreFinder
     */
    private $decoratedFinder;
    /**
     * @param string|list<string> $skippedOSFamilyOrFamilies
     */
    public function __construct($skippedOSFamilyOrFamilies, CpuCoreFinder $decoratedFinder)
    {
        $this->skippedOSFamilies = (array) $skippedOSFamilyOrFamilies;
        $this->decoratedFinder = $decoratedFinder;
    }
    public static function forWindows(CpuCoreFinder $decoratedFinder) : self
    {
        return new self('Windows', $decoratedFinder);
    }
    public static function forBSD(CpuCoreFinder $decoratedFinder) : self
    {
        return new self('BSD', $decoratedFinder);
    }
    public static function forDarwin(CpuCoreFinder $decoratedFinder) : self
    {
        return new self('Darwin', $decoratedFinder);
    }
    public static function forSolaris(CpuCoreFinder $decoratedFinder) : self
    {
        return new self('Solaris', $decoratedFinder);
    }
    public static function forLinux(CpuCoreFinder $decoratedFinder) : self
    {
        return new self('Linux', $decoratedFinder);
    }
    public function diagnose() : string
    {
        return $this->skip() ? sprintf('Skipped platform detected ("%s").', \PHP_OS_FAMILY) : $this->decoratedFinder->diagnose();
    }
    public function find() : ?int
    {
        return $this->skip() ? null : $this->decoratedFinder->find();
    }
    public function toString() : string
    {
        return sprintf('SkipOnOSFamilyFinder(skip=(%s),%s)', implode(',', $this->skippedOSFamilies), $this->decoratedFinder->toString());
    }
    private function skip() : bool
    {
        return in_array(\PHP_OS_FAMILY, $this->skippedOSFamilies, \true);
    }
}
<?php

/*
 * This file is part of the Fidry CPUCounter Config package.
 *
 * (c) Théo FIDRY <theo.fidry@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter;

use RuntimeException;
final class NumberOfCpuCoreNotFound extends RuntimeException
{
    public static function create() : self
    {
        return new self('Could not find the number of CPU cores available.');
    }
}
<?php

/*
 * This file is part of the Fidry CPUCounter Config package.
 *
 * (c) Théo FIDRY <theo.fidry@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter;

use _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Finder\CpuCoreFinder;
use _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Finder\FinderRegistry;
final class CpuCoreCounter
{
    /**
     * @var list<CpuCoreFinder>
     */
    private $finders;
    /**
     * @var positive-int|null
     */
    private $count;
    /**
     * @param list<CpuCoreFinder>|null $finders
     */
    public function __construct(?array $finders = null)
    {
        $this->finders = $finders ?? FinderRegistry::getDefaultLogicalFinders();
    }
    /**
     * @throws NumberOfCpuCoreNotFound
     *
     * @return positive-int
     */
    public function getCount() : int
    {
        // Memoize result
        if (null === $this->count) {
            $this->count = $this->findCount();
        }
        return $this->count;
    }
    /**
     * @throws NumberOfCpuCoreNotFound
     *
     * @return positive-int
     */
    private function findCount() : int
    {
        foreach ($this->finders as $finder) {
            $cores = $finder->find();
            if (null !== $cores) {
                return $cores;
            }
        }
        throw NumberOfCpuCoreNotFound::create();
    }
    /**
     * @throws NumberOfCpuCoreNotFound
     *
     * @return array{CpuCoreFinder, positive-int}
     */
    public function getFinderAndCores() : array
    {
        foreach ($this->finders as $finder) {
            $cores = $finder->find();
            if (null !== $cores) {
                return [$finder, $cores];
            }
        }
        throw NumberOfCpuCoreNotFound::create();
    }
}
<?php

/*
 * This file is part of the Fidry CPUCounter Config package.
 *
 * (c) Théo FIDRY <theo.fidry@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Executor;

use function fclose;
use function function_exists;
use function is_resource;
use function proc_close;
use function proc_open;
use function stream_get_contents;
final class ProcOpenExecutor implements ProcessExecutor
{
    public function execute(string $command) : ?array
    {
        if (!function_exists('proc_open')) {
            return null;
        }
        $pipes = [];
        $process = @proc_open($command, [
            ['pipe', 'rb'],
            ['pipe', 'wb'],
            // stdout
            ['pipe', 'wb'],
        ], $pipes);
        if (!is_resource($process)) {
            return null;
        }
        fclose($pipes[0]);
        $stdout = (string) stream_get_contents($pipes[1]);
        $stderr = (string) stream_get_contents($pipes[2]);
        proc_close($process);
        return [$stdout, $stderr];
    }
}
<?php

/*
 * This file is part of the Fidry CPUCounter Config package.
 *
 * (c) Théo FIDRY <theo.fidry@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Executor;

interface ProcessExecutor
{
    /**
     * @return array{string, string}|null STDOUT & STDERR tuple
     */
    public function execute(string $command) : ?array;
}
#!/usr/bin/env php
<?php 
/*
 * This file is part of the Fidry CPUCounter Config package.
 *
 * (c) Théo FIDRY <theo.fidry@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff;

use _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Diagnoser;
use _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Finder\FinderRegistry;
require_once __DIR__ . '/../vendor/autoload.php';
echo 'Running diagnosis...' . \PHP_EOL . \PHP_EOL;
echo Diagnoser::diagnose(FinderRegistry::getAllVariants()) . \PHP_EOL;
#!/usr/bin/env php
<?php 
/*
 * This file is part of the Fidry CPUCounter Config package.
 *
 * (c) Théo FIDRY <theo.fidry@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
declare (strict_types=1);
namespace _PHPStan_dcc7b7cff;

use _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Diagnoser;
use _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\Finder\FinderRegistry;
require_once __DIR__ . '/../vendor/autoload.php';
echo 'Executing finders...' . \PHP_EOL . \PHP_EOL;
echo Diagnoser::execute(FinderRegistry::getAllVariants()) . \PHP_EOL;
<?php

declare (strict_types=1);
namespace PHPStan\Collectors;

use JsonSerializable;
use PhpParser\Node;
use ReturnTypeWillChange;
/** @api */
class CollectedData implements JsonSerializable
{
    /**
     * @var mixed
     */
    private $data;
    /**
     * @var string
     */
    private $filePath;
    /**
     * @var class-string<Collector<Node, mixed>>
     */
    private $collectorType;
    /**
     * @param mixed $data
     * @param class-string<Collector<Node, mixed>> $collectorType
     */
    public function __construct($data, string $filePath, string $collectorType)
    {
        $this->data = $data;
        $this->filePath = $filePath;
        $this->collectorType = $collectorType;
    }
    /**
     * @return mixed
     */
    public function getData()
    {
        return $this->data;
    }
    public function getFilePath() : string
    {
        return $this->filePath;
    }
    public function changeFilePath(string $newFilePath) : self
    {
        return new self($this->data, $newFilePath, $this->collectorType);
    }
    /**
     * @return class-string<Collector<Node, mixed>>
     */
    public function getCollectorType() : string
    {
        return $this->collectorType;
    }
    /**
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize()
    {
        return ['data' => $this->data, 'filePath' => $this->filePath, 'collectorType' => $this->collectorType];
    }
    /**
     * @param mixed[] $json
     */
    public static function decode(array $json) : self
    {
        return new self($json['data'], $json['filePath'], $json['collectorType']);
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : self
    {
        return new self($properties['data'], $properties['filePath'], $properties['collectorType']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Collectors;

use PHPStan\DependencyInjection\Container;
class RegistryFactory
{
    public const COLLECTOR_TAG = 'phpstan.collector';
    /**
     * @var \PHPStan\DependencyInjection\Container
     */
    private $container;
    public function __construct(Container $container)
    {
        $this->container = $container;
    }
    public function create() : \PHPStan\Collectors\Registry
    {
        return new \PHPStan\Collectors\Registry($this->container->getServicesByTag(self::COLLECTOR_TAG));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Collectors;

use PhpParser\Node;
use function class_implements;
use function class_parents;
class Registry
{
    /** @var Collector[][] */
    private $collectors = [];
    /** @var Collector[][] */
    private $cache = [];
    /**
     * @param Collector[] $collectors
     */
    public function __construct(array $collectors)
    {
        foreach ($collectors as $collector) {
            $this->collectors[$collector->getNodeType()][] = $collector;
        }
    }
    /**
     * @template TNodeType of Node
     * @phpstan-param class-string<TNodeType> $nodeType
     * @param Node $nodeType
     * @phpstan-return array<Collector<TNodeType, mixed>>
     * @return Collector[]
     */
    public function getCollectors(string $nodeType) : array
    {
        if (!isset($this->cache[$nodeType])) {
            $parentNodeTypes = [$nodeType] + class_parents($nodeType) + class_implements($nodeType);
            $collectors = [];
            foreach ($parentNodeTypes as $parentNodeType) {
                foreach ($this->collectors[$parentNodeType] ?? [] as $collector) {
                    $collectors[] = $collector;
                }
            }
            $this->cache[$nodeType] = $collectors;
        }
        /**
         * @phpstan-var array<Collector<TNodeType, mixed>> $selectedCollectors
         * @var Collector[] $selectedCollectors
         */
        $selectedCollectors = $this->cache[$nodeType];
        return $selectedCollectors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Collectors;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
/**
 * This is the interface custom collectors implement. To register it in the configuration file
 * use the `phpstan.collector` service tag:
 *
 * ```
 * services:
 * 	-
 *		class: App\MyCollector
 *		tags:
 *			- phpstan.collector
 * ```
 *
 * Learn more: https://phpstan.org/developing-extensions/collectors
 *
 * @api
 * @phpstan-template-covariant TNodeType of Node
 * @phpstan-template-covariant TValue
 */
interface Collector
{
    /**
     * @phpstan-return class-string<TNodeType>
     */
    public function getNodeType() : string;
    /**
     * @phpstan-param TNodeType $node
     * @return TValue|null Collected data
     */
    public function processNode(Node $node, Scope $scope);
}
<?php

declare (strict_types=1);
namespace PHPStan\Internal;

use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPStan\DependencyInjection\Container;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicMethodReturnTypeExtension;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function count;
use function in_array;
class ContainerDynamicReturnTypeExtension implements DynamicMethodReturnTypeExtension
{
    public function getClass() : string
    {
        return Container::class;
    }
    public function isMethodSupported(MethodReflection $methodReflection) : bool
    {
        return in_array($methodReflection->getName(), ['getByType'], \true);
    }
    public function getTypeFromMethodCall(MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope) : Type
    {
        if (count($methodCall->getArgs()) === 0) {
            return ParametersAcceptorSelector::selectSingle($methodReflection->getVariants())->getReturnType();
        }
        $argType = $scope->getType($methodCall->getArgs()[0]->value);
        if (!$argType instanceof ConstantStringType) {
            return ParametersAcceptorSelector::selectSingle($methodReflection->getVariants())->getReturnType();
        }
        $type = new ObjectType($argType->getValue());
        if ($methodReflection->getName() === 'getByType' && count($methodCall->getArgs()) >= 2) {
            $argType = $scope->getType($methodCall->getArgs()[1]->value);
            if ($argType->isTrue()->yes()) {
                $type = TypeCombinator::addNull($type);
            }
        }
        return $type;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Internal;

use _PHPStan_dcc7b7cff\Nette\Utils\Json;
use _PHPStan_dcc7b7cff\Nette\Utils\JsonException;
use PHPStan\File\CouldNotReadFileException;
use PHPStan\File\FileReader;
use function basename;
use function getenv;
use function is_file;
use function is_string;
use function preg_match;
use function substr;
use function trim;
final class ComposerHelper
{
    /**
     * @var string|null
     */
    private static $phpstanVersion;
    /** @return array<string, mixed>|null */
    public static function getComposerConfig(string $root) : ?array
    {
        $composerJsonPath = self::getComposerJsonPath($root);
        if (!is_file($composerJsonPath)) {
            return null;
        }
        try {
            $composerJsonContents = FileReader::read($composerJsonPath);
            return Json::decode($composerJsonContents, Json::FORCE_ARRAY);
        } catch (CouldNotReadFileException|JsonException $exception) {
            return null;
        }
    }
    private static function getComposerJsonPath(string $root) : string
    {
        $envComposer = getenv('COMPOSER');
        $fileName = is_string($envComposer) ? $envComposer : 'composer.json';
        $fileName = basename(trim($fileName));
        return $root . '/' . $fileName;
    }
    /**
     * @param array<string, mixed> $composerConfig
     */
    public static function getVendorDirFromComposerConfig(string $root, array $composerConfig) : string
    {
        $vendorDirectory = $composerConfig['config']['vendor-dir'] ?? 'vendor';
        return $root . '/' . trim($vendorDirectory, '/');
    }
    /**
     * @param array<string, mixed> $composerConfig
     */
    public static function getBinDirFromComposerConfig(string $root, array $composerConfig) : string
    {
        $vendorDirectory = $composerConfig['config']['bin-dir'] ?? 'vendor/bin';
        return $root . '/' . trim($vendorDirectory, '/');
    }
    public static function getPhpStanVersion() : string
    {
        if (self::$phpstanVersion !== null) {
            return self::$phpstanVersion;
        }
        $installed = (require __DIR__ . '/../../vendor/composer/installed.php');
        $rootPackage = $installed['root'] ?? null;
        if ($rootPackage === null) {
            return self::$phpstanVersion = 'Unknown version';
        }
        if (preg_match('/[^v\\d.]/', $rootPackage['pretty_version']) === 0) {
            // Handles tagged versions, see https://github.com/Jean85/pretty-package-versions/blob/2.0.5/src/Version.php#L31
            return self::$phpstanVersion = $rootPackage['pretty_version'];
        }
        return self::$phpstanVersion = $rootPackage['pretty_version'] . '@' . substr((string) $rootPackage['reference'], 0, 7);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Internal;

use PHPStan\ShouldNotHappenException;
use function abs;
use function end;
use function round;
class BytesHelper
{
    public static function bytes(int $bytes) : string
    {
        $bytes = round($bytes);
        $units = ['B', 'kB', 'MB', 'GB', 'TB', 'PB'];
        foreach ($units as $unit) {
            if (abs($bytes) < 1024 || $unit === end($units)) {
                break;
            }
            $bytes /= 1024;
        }
        if (!isset($unit)) {
            throw new ShouldNotHappenException();
        }
        return round($bytes, 2) . ' ' . $unit;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Internal;

use function str_replace;
class SprintfHelper
{
    public static function escapeFormatString(string $format) : string
    {
        return str_replace('%', '%%', $format);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Process;

use PHPStan\Command\AnalyseCommand;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
use function array_merge;
use function escapeshellarg;
use function implode;
use function ini_get;
use function is_bool;
use function php_ini_loaded_file;
use function sprintf;
use const PHP_BINARY;
class ProcessHelper
{
    /**
     * @param string[] $additionalItems
     */
    public static function getWorkerCommand(string $mainScript, string $commandName, ?string $projectConfigFile, array $additionalItems, InputInterface $input) : string
    {
        $phpIni = php_ini_loaded_file();
        $phpCmd = $phpIni === \false ? escapeshellarg(PHP_BINARY) : sprintf('%s -c %s', escapeshellarg(PHP_BINARY), escapeshellarg($phpIni));
        $processCommandArray = [$phpCmd];
        if ($input->getOption('memory-limit') === null) {
            $processCommandArray[] = '-d';
            $processCommandArray[] = 'memory_limit=' . ini_get('memory_limit');
        }
        foreach ([$mainScript, $commandName] as $arg) {
            $processCommandArray[] = escapeshellarg($arg);
        }
        if ($projectConfigFile !== null) {
            $processCommandArray[] = '--configuration';
            $processCommandArray[] = escapeshellarg($projectConfigFile);
        }
        $options = [AnalyseCommand::OPTION_LEVEL, 'autoload-file', 'memory-limit', 'xdebug', 'verbose'];
        foreach ($options as $optionName) {
            /** @var bool|string|null $optionValue */
            $optionValue = $input->getOption($optionName);
            if (is_bool($optionValue)) {
                if ($optionValue === \true) {
                    $processCommandArray[] = sprintf('--%s', $optionName);
                }
                continue;
            }
            if ($optionValue === null) {
                continue;
            }
            $processCommandArray[] = sprintf('--%s=%s', $optionName, escapeshellarg($optionValue));
        }
        $processCommandArray = array_merge($processCommandArray, $additionalItems);
        $processCommandArray[] = '--';
        /** @var string[] $paths */
        $paths = $input->getArgument('paths');
        foreach ($paths as $path) {
            $processCommandArray[] = escapeshellarg($path);
        }
        return implode(' ', $processCommandArray);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Process;

use Exception;
class ProcessCrashedException extends Exception
{
}
<?php

declare (strict_types=1);
namespace PHPStan\Process;

use Exception;
class ProcessCanceledException extends Exception
{
}
<?php

declare (strict_types=1);
namespace PHPStan\Process;

use PHPStan\ShouldNotHappenException;
use _PHPStan_dcc7b7cff\React\ChildProcess\Process;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use _PHPStan_dcc7b7cff\React\Promise\CancellablePromiseInterface;
use _PHPStan_dcc7b7cff\React\Promise\Deferred;
use _PHPStan_dcc7b7cff\React\Promise\ExtendedPromiseInterface;
use function fclose;
use function rewind;
use function stream_get_contents;
use function tmpfile;
class ProcessPromise
{
    /**
     * @var \React\Promise\Deferred
     */
    private $deferred;
    /**
     * @var \React\ChildProcess\Process|null
     */
    private $process;
    /**
     * @var bool
     */
    private $canceled = \false;
    /**
     * @var \React\EventLoop\LoopInterface
     */
    private $loop;
    /**
     * @var string
     */
    private $name;
    /**
     * @var string
     */
    private $command;
    public function __construct(LoopInterface $loop, string $name, string $command)
    {
        $this->loop = $loop;
        $this->name = $name;
        $this->command = $command;
        $this->deferred = new Deferred();
    }
    public function getName() : string
    {
        return $this->name;
    }
    /**
     * @return ExtendedPromiseInterface&CancellablePromiseInterface
     */
    public function run() : CancellablePromiseInterface
    {
        $tmpStdOutResource = tmpfile();
        if ($tmpStdOutResource === \false) {
            throw new ShouldNotHappenException('Failed creating temp file for stdout.');
        }
        $tmpStdErrResource = tmpfile();
        if ($tmpStdErrResource === \false) {
            throw new ShouldNotHappenException('Failed creating temp file for stderr.');
        }
        $this->process = new Process($this->command, null, null, [1 => $tmpStdOutResource, 2 => $tmpStdErrResource]);
        $this->process->start($this->loop);
        $this->process->on('exit', function ($exitCode) use($tmpStdOutResource, $tmpStdErrResource) : void {
            if ($this->canceled) {
                fclose($tmpStdOutResource);
                fclose($tmpStdErrResource);
                return;
            }
            rewind($tmpStdOutResource);
            $stdOut = stream_get_contents($tmpStdOutResource);
            fclose($tmpStdOutResource);
            rewind($tmpStdErrResource);
            $stdErr = stream_get_contents($tmpStdErrResource);
            fclose($tmpStdErrResource);
            if ($exitCode === null) {
                $this->deferred->reject(new \PHPStan\Process\ProcessCrashedException($stdOut . $stdErr));
                return;
            }
            if ($exitCode === 0) {
                $this->deferred->resolve($stdOut);
                return;
            }
            $this->deferred->reject(new \PHPStan\Process\ProcessCrashedException($stdOut . $stdErr));
        });
        /** @var ExtendedPromiseInterface&CancellablePromiseInterface */
        return $this->deferred->promise();
    }
    public function cancel() : void
    {
        if ($this->process === null) {
            throw new ShouldNotHappenException('Cancelling process before running');
        }
        $this->canceled = \true;
        $this->process->terminate();
        $this->deferred->reject(new \PHPStan\Process\ProcessCanceledException());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Process;

use _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\CpuCoreCounter as FidryCpuCoreCounter;
use _PHPStan_dcc7b7cff\Fidry\CpuCoreCounter\NumberOfCpuCoreNotFound;
class CpuCoreCounter
{
    /**
     * @var int|null
     */
    private $count;
    public function getNumberOfCpuCores() : int
    {
        if ($this->count !== null) {
            return $this->count;
        }
        try {
            $this->count = (new FidryCpuCoreCounter())->getCount();
        } catch (NumberOfCpuCoreNotFound $exception) {
            $this->count = 1;
        }
        return $this->count;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Cache;

class Cache
{
    /**
     * @var \PHPStan\Cache\CacheStorage
     */
    private $storage;
    public function __construct(\PHPStan\Cache\CacheStorage $storage)
    {
        $this->storage = $storage;
    }
    /**
     * @return mixed|null
     */
    public function load(string $key, string $variableKey)
    {
        return $this->storage->load($key, $variableKey);
    }
    /**
     * @param mixed $data
     */
    public function save(string $key, string $variableKey, $data) : void
    {
        $this->storage->save($key, $variableKey, $data);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Cache;

use InvalidArgumentException;
use _PHPStan_dcc7b7cff\Nette\Utils\Random;
use PHPStan\File\FileWriter;
use PHPStan\ShouldNotHappenException;
use function clearstatcache;
use function error_get_last;
use function is_dir;
use function is_file;
use function mkdir;
use function rename;
use function sha1;
use function sprintf;
use function substr;
use function unlink;
use function var_export;
use const DIRECTORY_SEPARATOR;
class FileCacheStorage implements \PHPStan\Cache\CacheStorage
{
    /**
     * @var string
     */
    private $directory;
    public function __construct(string $directory)
    {
        $this->directory = $directory;
    }
    private function makeDir(string $directory) : void
    {
        if (is_dir($directory)) {
            return;
        }
        $result = @mkdir($directory, 0777);
        if ($result === \false) {
            clearstatcache();
            if (is_dir($directory)) {
                return;
            }
            $error = error_get_last();
            throw new InvalidArgumentException(sprintf('Failed to create directory "%s" (%s).', $this->directory, $error !== null ? $error['message'] : 'unknown cause'));
        }
    }
    /**
     * @return mixed|null
     */
    public function load(string $key, string $variableKey)
    {
        [, , $filePath] = $this->getFilePaths($key);
        return (static function () use($variableKey, $filePath) {
            $cacheItem = @(include $filePath);
            if (!$cacheItem instanceof \PHPStan\Cache\CacheItem) {
                return null;
            }
            if (!$cacheItem->isVariableKeyValid($variableKey)) {
                return null;
            }
            return $cacheItem->getData();
        })();
    }
    /**
     * @param mixed $data
     */
    public function save(string $key, string $variableKey, $data) : void
    {
        [$firstDirectory, $secondDirectory, $path] = $this->getFilePaths($key);
        $this->makeDir($this->directory);
        $this->makeDir($firstDirectory);
        $this->makeDir($secondDirectory);
        $tmpPath = sprintf('%s/%s.tmp', $this->directory, Random::generate());
        $errorBefore = error_get_last();
        $exported = @var_export(new \PHPStan\Cache\CacheItem($variableKey, $data), \true);
        $errorAfter = error_get_last();
        if ($errorAfter !== null && $errorBefore !== $errorAfter) {
            throw new ShouldNotHappenException(sprintf('Error occurred while saving item %s (%s) to cache: %s', $key, $variableKey, $errorAfter['message']));
        }
        FileWriter::write($tmpPath, sprintf("<?php declare(strict_types = 1);\n\nreturn %s;", $exported));
        $renameSuccess = @rename($tmpPath, $path);
        if ($renameSuccess) {
            return;
        }
        @unlink($tmpPath);
        if (DIRECTORY_SEPARATOR === '/' || !is_file($path)) {
            throw new InvalidArgumentException(sprintf('Could not write data to cache file %s.', $path));
        }
    }
    /**
     * @return array{string, string, string}
     */
    private function getFilePaths(string $key) : array
    {
        $keyHash = sha1($key);
        $firstDirectory = sprintf('%s/%s', $this->directory, substr($keyHash, 0, 2));
        $secondDirectory = sprintf('%s/%s', $firstDirectory, substr($keyHash, 2, 2));
        $filePath = sprintf('%s/%s.php', $secondDirectory, $keyHash);
        return [$firstDirectory, $secondDirectory, $filePath];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Cache;

interface CacheStorage
{
    /**
     * @return mixed|null
     */
    public function load(string $key, string $variableKey);
    /**
     * @param mixed $data
     */
    public function save(string $key, string $variableKey, $data) : void;
}
<?php

declare (strict_types=1);
namespace PHPStan\Cache;

use function var_export;
class MemoryCacheStorage implements \PHPStan\Cache\CacheStorage
{
    /** @var array<string, CacheItem> */
    private $storage = [];
    /**
     * @return mixed|null
     */
    public function load(string $key, string $variableKey)
    {
        if (!isset($this->storage[$key])) {
            return null;
        }
        $item = $this->storage[$key];
        if (!$item->isVariableKeyValid($variableKey)) {
            return null;
        }
        return $item->getData();
    }
    /**
     * @param mixed $data
     */
    public function save(string $key, string $variableKey, $data) : void
    {
        $item = new \PHPStan\Cache\CacheItem($variableKey, $data);
        @var_export($item, \true);
        $this->storage[$key] = $item;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Cache;

class CacheItem
{
    /**
     * @var string
     */
    private $variableKey;
    /**
     * @var mixed
     */
    private $data;
    /**
     * @param mixed $data
     */
    public function __construct(string $variableKey, $data)
    {
        $this->variableKey = $variableKey;
        $this->data = $data;
    }
    public function isVariableKeyValid(string $variableKey) : bool
    {
        return $this->variableKey === $variableKey;
    }
    /**
     * @return mixed
     */
    public function getData()
    {
        return $this->data;
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : self
    {
        return new self($properties['variableKey'], $properties['data']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

/** @api */
interface LateResolvableType
{
    public function resolve() : \PHPStan\Type\Type;
    public function isResolvable() : bool;
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PhpParser\Node\Expr\StaticCall;
use PHPStan\Analyser\Scope;
use PHPStan\Analyser\SpecifiedTypes;
use PHPStan\Analyser\TypeSpecifierContext;
use PHPStan\Reflection\MethodReflection;
/**
 * This is the interface type-specifying extensions implement for static methods.
 *
 * To register it in the configuration file use the `phpstan.typeSpecifier.staticMethodTypeSpecifyingExtension` service tag:
 *
 * ```
 * services:
 * 	-
 *		class: App\PHPStan\MyExtension
 *		tags:
 *			- phpstan.typeSpecifier.staticMethodTypeSpecifyingExtension
 * ```
 *
 * Learn more: https://phpstan.org/developing-extensions/type-specifying-extensions
 *
 * @api
 */
interface StaticMethodTypeSpecifyingExtension
{
    public function getClass() : string;
    public function isStaticMethodSupported(MethodReflection $staticMethodReflection, StaticCall $node, TypeSpecifierContext $context) : bool;
    public function specifyTypes(MethodReflection $staticMethodReflection, StaticCall $node, Scope $scope, TypeSpecifierContext $context) : SpecifiedTypes;
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Traits\FalseyBooleanTypeTrait;
use PHPStan\Type\Traits\NonArrayTypeTrait;
use PHPStan\Type\Traits\NonCallableTypeTrait;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use PHPStan\Type\Traits\NonGenericTypeTrait;
use PHPStan\Type\Traits\NonIterableTypeTrait;
use PHPStan\Type\Traits\NonObjectTypeTrait;
use PHPStan\Type\Traits\NonOffsetAccessibleTypeTrait;
use PHPStan\Type\Traits\NonRemoveableTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonTypeTrait;
/** @api */
class VoidType implements \PHPStan\Type\Type
{
    use NonArrayTypeTrait;
    use NonCallableTypeTrait;
    use NonIterableTypeTrait;
    use NonObjectTypeTrait;
    use NonOffsetAccessibleTypeTrait;
    use FalseyBooleanTypeTrait;
    use NonGenericTypeTrait;
    use UndecidedComparisonTypeTrait;
    use NonRemoveableTypeTrait;
    use NonGeneralizableTypeTrait;
    /** @api */
    public function __construct()
    {
    }
    /**
     * @return string[]
     */
    public function getReferencedClasses() : array
    {
        return [];
    }
    public function getObjectClassNames() : array
    {
        return [];
    }
    public function getObjectClassReflections() : array
    {
        return [];
    }
    public function accepts(\PHPStan\Type\Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(\PHPStan\Type\Type $type, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        return \PHPStan\Type\AcceptsResult::createFromBoolean($type instanceof self);
    }
    public function isSuperTypeOf(\PHPStan\Type\Type $type) : TrinaryLogic
    {
        if ($type instanceof self) {
            return TrinaryLogic::createYes();
        }
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return $type->isSubTypeOf($this);
        }
        return TrinaryLogic::createNo();
    }
    public function equals(\PHPStan\Type\Type $type) : bool
    {
        return $type instanceof self;
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        return 'void';
    }
    public function toNumber() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toString() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toInteger() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toFloat() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toArray() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toArrayKey() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function isNull() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantScalarValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getConstantScalarTypes() : array
    {
        return [];
    }
    public function getConstantScalarValues() : array
    {
        return [];
    }
    public function isTrue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFalse() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isBoolean() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFloat() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isInteger() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNumericString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isLiteralString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isClassStringType() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getClassStringObjectType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function getObjectTypeOrClassStringObjectType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function isVoid() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isScalar() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function looseCompare(\PHPStan\Type\Type $type, PhpVersion $phpVersion) : \PHPStan\Type\BooleanType
    {
        return new \PHPStan\Type\BooleanType();
    }
    public function traverse(callable $cb) : \PHPStan\Type\Type
    {
        return $this;
    }
    public function traverseSimultaneously(\PHPStan\Type\Type $right, callable $cb) : \PHPStan\Type\Type
    {
        return $this;
    }
    public function exponentiate(\PHPStan\Type\Type $exponent) : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode('void');
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
use PHPStan\Type\Accessory\AccessoryType;
use PHPStan\Type\Accessory\HasOffsetType;
use PHPStan\Type\Accessory\HasOffsetValueType;
use PHPStan\Type\Accessory\HasPropertyType;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\Accessory\OversizedArrayType;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantFloatType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\Generic\GenericClassStringType;
use PHPStan\Type\Generic\TemplateBenevolentUnionType;
use PHPStan\Type\Generic\TemplateType;
use PHPStan\Type\Generic\TemplateTypeFactory;
use PHPStan\Type\Generic\TemplateUnionType;
use function array_key_exists;
use function array_key_first;
use function array_map;
use function array_merge;
use function array_slice;
use function array_splice;
use function array_values;
use function count;
use function get_class;
use function is_int;
use function md5;
use function sprintf;
use function usort;
/** @api */
class TypeCombinator
{
    public static function addNull(\PHPStan\Type\Type $type) : \PHPStan\Type\Type
    {
        $nullType = new \PHPStan\Type\NullType();
        if ($nullType->isSuperTypeOf($type)->no()) {
            return self::union($type, $nullType);
        }
        return $type;
    }
    public static function remove(\PHPStan\Type\Type $fromType, \PHPStan\Type\Type $typeToRemove) : \PHPStan\Type\Type
    {
        if ($typeToRemove instanceof \PHPStan\Type\UnionType) {
            foreach ($typeToRemove->getTypes() as $unionTypeToRemove) {
                $fromType = self::remove($fromType, $unionTypeToRemove);
            }
            return $fromType;
        }
        $isSuperType = $typeToRemove->isSuperTypeOf($fromType);
        if ($isSuperType->yes()) {
            return new \PHPStan\Type\NeverType();
        }
        if ($isSuperType->no()) {
            return $fromType;
        }
        if ($typeToRemove instanceof \PHPStan\Type\MixedType) {
            $typeToRemoveSubtractedType = $typeToRemove->getSubtractedType();
            if ($typeToRemoveSubtractedType !== null) {
                return self::intersect($fromType, $typeToRemoveSubtractedType);
            }
        }
        return $fromType->tryRemove($typeToRemove) ?? $fromType;
    }
    public static function removeNull(\PHPStan\Type\Type $type) : \PHPStan\Type\Type
    {
        if (self::containsNull($type)) {
            return self::remove($type, new \PHPStan\Type\NullType());
        }
        return $type;
    }
    public static function containsNull(\PHPStan\Type\Type $type) : bool
    {
        if ($type instanceof \PHPStan\Type\UnionType) {
            foreach ($type->getTypes() as $innerType) {
                if ($innerType instanceof \PHPStan\Type\NullType) {
                    return \true;
                }
            }
            return \false;
        }
        return $type instanceof \PHPStan\Type\NullType;
    }
    public static function union(\PHPStan\Type\Type ...$types) : \PHPStan\Type\Type
    {
        $typesCount = count($types);
        if ($typesCount === 0) {
            return new \PHPStan\Type\NeverType();
        }
        $benevolentTypes = [];
        $benevolentUnionObject = null;
        // transform A | (B | C) to A | B | C
        for ($i = 0; $i < $typesCount; $i++) {
            if ($types[$i] instanceof \PHPStan\Type\BenevolentUnionType) {
                if ($types[$i] instanceof TemplateBenevolentUnionType && $benevolentUnionObject === null) {
                    $benevolentUnionObject = $types[$i];
                }
                $benevolentTypesCount = 0;
                $typesInner = $types[$i]->getTypes();
                foreach ($typesInner as $benevolentInnerType) {
                    $benevolentTypesCount++;
                    $benevolentTypes[$benevolentInnerType->describe(\PHPStan\Type\VerbosityLevel::value())] = $benevolentInnerType;
                }
                array_splice($types, $i, 1, $typesInner);
                $typesCount += $benevolentTypesCount - 1;
                continue;
            }
            if (!$types[$i] instanceof \PHPStan\Type\UnionType) {
                continue;
            }
            if ($types[$i] instanceof TemplateType) {
                continue;
            }
            $typesInner = $types[$i]->getTypes();
            array_splice($types, $i, 1, $typesInner);
            $typesCount += count($typesInner) - 1;
        }
        if ($typesCount === 1) {
            return $types[0];
        }
        $arrayTypes = [];
        $scalarTypes = [];
        $hasGenericScalarTypes = [];
        for ($i = 0; $i < $typesCount; $i++) {
            if ($types[$i] instanceof \PHPStan\Type\ConstantScalarType) {
                $type = $types[$i];
                $scalarTypes[get_class($type)][md5($type->describe(\PHPStan\Type\VerbosityLevel::cache()))] = $type;
                unset($types[$i]);
                continue;
            }
            if ($types[$i] instanceof \PHPStan\Type\BooleanType) {
                $hasGenericScalarTypes[ConstantBooleanType::class] = \true;
            }
            if ($types[$i] instanceof \PHPStan\Type\FloatType) {
                $hasGenericScalarTypes[ConstantFloatType::class] = \true;
            }
            if ($types[$i] instanceof \PHPStan\Type\IntegerType && !$types[$i] instanceof \PHPStan\Type\IntegerRangeType) {
                $hasGenericScalarTypes[ConstantIntegerType::class] = \true;
            }
            if ($types[$i] instanceof \PHPStan\Type\StringType && !$types[$i] instanceof \PHPStan\Type\ClassStringType) {
                $hasGenericScalarTypes[ConstantStringType::class] = \true;
            }
            if (!$types[$i]->isArray()->yes()) {
                continue;
            }
            $arrayTypes[] = $types[$i];
            unset($types[$i]);
        }
        foreach ($scalarTypes as $classType => $scalarTypeItems) {
            $scalarTypes[$classType] = array_values($scalarTypeItems);
        }
        $types = array_values(array_merge($types, self::processArrayTypes($arrayTypes)));
        $typesCount = count($types);
        foreach ($scalarTypes as $classType => $scalarTypeItems) {
            if (isset($hasGenericScalarTypes[$classType])) {
                unset($scalarTypes[$classType]);
                continue;
            }
            if ($classType === ConstantBooleanType::class && count($scalarTypeItems) === 2) {
                $types[] = new \PHPStan\Type\BooleanType();
                $typesCount++;
                unset($scalarTypes[$classType]);
                continue;
            }
            $scalarTypeItemsCount = count($scalarTypeItems);
            for ($i = 0; $i < $typesCount; $i++) {
                for ($j = 0; $j < $scalarTypeItemsCount; $j++) {
                    $compareResult = self::compareTypesInUnion($types[$i], $scalarTypeItems[$j]);
                    if ($compareResult === null) {
                        continue;
                    }
                    [$a, $b] = $compareResult;
                    if ($a !== null) {
                        $types[$i] = $a;
                        array_splice($scalarTypeItems, $j--, 1);
                        $scalarTypeItemsCount--;
                        continue 1;
                    }
                    if ($b !== null) {
                        $scalarTypeItems[$j] = $b;
                        array_splice($types, $i--, 1);
                        $typesCount--;
                        continue 2;
                    }
                }
            }
            $scalarTypes[$classType] = $scalarTypeItems;
        }
        if (count($types) > 16) {
            $newTypes = [];
            foreach ($types as $type) {
                $newTypes[$type->describe(\PHPStan\Type\VerbosityLevel::cache())] = $type;
            }
            $types = array_values($newTypes);
            $typesCount = count($types);
        }
        // transform A | A to A
        // transform A | never to A
        for ($i = 0; $i < $typesCount; $i++) {
            for ($j = $i + 1; $j < $typesCount; $j++) {
                $compareResult = self::compareTypesInUnion($types[$i], $types[$j]);
                if ($compareResult === null) {
                    continue;
                }
                [$a, $b] = $compareResult;
                if ($a !== null) {
                    $types[$i] = $a;
                    array_splice($types, $j--, 1);
                    $typesCount--;
                    continue 1;
                }
                if ($b !== null) {
                    $types[$j] = $b;
                    array_splice($types, $i--, 1);
                    $typesCount--;
                    continue 2;
                }
            }
        }
        foreach ($scalarTypes as $scalarTypeItems) {
            foreach ($scalarTypeItems as $scalarType) {
                $types[] = $scalarType;
                $typesCount++;
            }
        }
        if ($typesCount === 0) {
            return new \PHPStan\Type\NeverType();
        }
        if ($typesCount === 1) {
            return $types[0];
        }
        if ($benevolentTypes !== []) {
            $tempTypes = $types;
            foreach ($tempTypes as $i => $type) {
                if (!isset($benevolentTypes[$type->describe(\PHPStan\Type\VerbosityLevel::value())])) {
                    break;
                }
                unset($tempTypes[$i]);
            }
            if ($tempTypes === []) {
                if ($benevolentUnionObject instanceof TemplateBenevolentUnionType) {
                    return $benevolentUnionObject->withTypes($types);
                }
                return new \PHPStan\Type\BenevolentUnionType($types);
            }
        }
        return new \PHPStan\Type\UnionType($types, \true);
    }
    /**
     * @return array{Type, null}|array{null, Type}|null
     */
    private static function compareTypesInUnion(\PHPStan\Type\Type $a, \PHPStan\Type\Type $b) : ?array
    {
        if ($a instanceof \PHPStan\Type\IntegerRangeType) {
            $type = $a->tryUnion($b);
            if ($type !== null) {
                $a = $type;
                return [$a, null];
            }
        }
        if ($b instanceof \PHPStan\Type\IntegerRangeType) {
            $type = $b->tryUnion($a);
            if ($type !== null) {
                $b = $type;
                return [null, $b];
            }
        }
        if ($a instanceof \PHPStan\Type\IntegerRangeType && $b instanceof \PHPStan\Type\IntegerRangeType) {
            return null;
        }
        if ($a instanceof HasOffsetValueType && $b instanceof HasOffsetValueType) {
            if ($a->getOffsetType()->equals($b->getOffsetType())) {
                return [new HasOffsetValueType($a->getOffsetType(), self::union($a->getValueType(), $b->getValueType())), null];
            }
        }
        if ($a instanceof ConstantArrayType && $b instanceof ConstantArrayType) {
            return null;
        }
        // simplify string[] | int[] to (string|int)[]
        if ($a instanceof \PHPStan\Type\IterableType && $b instanceof \PHPStan\Type\IterableType) {
            return [new \PHPStan\Type\IterableType(self::union($a->getIterableKeyType(), $b->getIterableKeyType()), self::union($a->getIterableValueType(), $b->getIterableValueType())), null];
        }
        if ($a instanceof \PHPStan\Type\SubtractableType) {
            $typeWithoutSubtractedTypeA = $a->getTypeWithoutSubtractedType();
            if ($typeWithoutSubtractedTypeA instanceof \PHPStan\Type\MixedType && $b instanceof \PHPStan\Type\MixedType) {
                $isSuperType = $typeWithoutSubtractedTypeA->isSuperTypeOfMixed($b);
            } else {
                $isSuperType = $typeWithoutSubtractedTypeA->isSuperTypeOf($b);
            }
            if ($isSuperType->yes()) {
                $a = self::intersectWithSubtractedType($a, $b);
                return [$a, null];
            }
        }
        if ($b instanceof \PHPStan\Type\SubtractableType) {
            $typeWithoutSubtractedTypeB = $b->getTypeWithoutSubtractedType();
            if ($typeWithoutSubtractedTypeB instanceof \PHPStan\Type\MixedType && $a instanceof \PHPStan\Type\MixedType) {
                $isSuperType = $typeWithoutSubtractedTypeB->isSuperTypeOfMixed($a);
            } else {
                $isSuperType = $typeWithoutSubtractedTypeB->isSuperTypeOf($a);
            }
            if ($isSuperType->yes()) {
                $b = self::intersectWithSubtractedType($b, $a);
                return [null, $b];
            }
        }
        if ($b->isSuperTypeOf($a)->yes()) {
            return [null, $b];
        }
        if ($a->isSuperTypeOf($b)->yes()) {
            return [$a, null];
        }
        if ($a instanceof ConstantStringType && $a->getValue() === '' && ($b->describe(\PHPStan\Type\VerbosityLevel::value()) === 'non-empty-string' || $b->describe(\PHPStan\Type\VerbosityLevel::value()) === 'non-falsy-string')) {
            return [null, new \PHPStan\Type\StringType()];
        }
        if ($b instanceof ConstantStringType && $b->getValue() === '' && ($a->describe(\PHPStan\Type\VerbosityLevel::value()) === 'non-empty-string' || $a->describe(\PHPStan\Type\VerbosityLevel::value()) === 'non-falsy-string')) {
            return [new \PHPStan\Type\StringType(), null];
        }
        if ($a instanceof ConstantStringType && $a->getValue() === '0' && $b->describe(\PHPStan\Type\VerbosityLevel::value()) === 'non-falsy-string') {
            return [null, new \PHPStan\Type\IntersectionType([new \PHPStan\Type\StringType(), new AccessoryNonEmptyStringType()])];
        }
        if ($b instanceof ConstantStringType && $b->getValue() === '0' && $a->describe(\PHPStan\Type\VerbosityLevel::value()) === 'non-falsy-string') {
            return [new \PHPStan\Type\IntersectionType([new \PHPStan\Type\StringType(), new AccessoryNonEmptyStringType()]), null];
        }
        return null;
    }
    private static function unionWithSubtractedType(\PHPStan\Type\Type $type, ?\PHPStan\Type\Type $subtractedType) : \PHPStan\Type\Type
    {
        if ($subtractedType === null) {
            return $type;
        }
        if ($type instanceof \PHPStan\Type\SubtractableType) {
            $subtractedType = $type->getSubtractedType() === null ? $subtractedType : self::union($type->getSubtractedType(), $subtractedType);
            if ($subtractedType instanceof \PHPStan\Type\NeverType) {
                $subtractedType = null;
            }
            return $type->changeSubtractedType($subtractedType);
        }
        if ($subtractedType->isSuperTypeOf($type)->yes()) {
            return new \PHPStan\Type\NeverType();
        }
        return self::remove($type, $subtractedType);
    }
    private static function intersectWithSubtractedType(\PHPStan\Type\SubtractableType $a, \PHPStan\Type\Type $b) : \PHPStan\Type\Type
    {
        if ($a->getSubtractedType() === null) {
            return $a;
        }
        if ($b instanceof \PHPStan\Type\IntersectionType) {
            $subtractableTypes = [];
            foreach ($b->getTypes() as $innerType) {
                if (!$innerType instanceof \PHPStan\Type\SubtractableType) {
                    continue;
                }
                $subtractableTypes[] = $innerType;
            }
            if (count($subtractableTypes) === 0) {
                return $a->getTypeWithoutSubtractedType();
            }
            $subtractedTypes = [];
            foreach ($subtractableTypes as $subtractableType) {
                if ($subtractableType->getSubtractedType() === null) {
                    continue;
                }
                $subtractedTypes[] = $subtractableType->getSubtractedType();
            }
            if (count($subtractedTypes) === 0) {
                return $a->getTypeWithoutSubtractedType();
            }
            $subtractedType = self::union(...$subtractedTypes);
        } elseif ($b instanceof \PHPStan\Type\SubtractableType) {
            $subtractedType = $b->getSubtractedType();
            if ($subtractedType === null) {
                return $a->getTypeWithoutSubtractedType();
            }
        } else {
            $subtractedTypeTmp = self::intersect($a->getTypeWithoutSubtractedType(), $a->getSubtractedType());
            if ($b->isSuperTypeOf($subtractedTypeTmp)->yes()) {
                return $a->getTypeWithoutSubtractedType();
            }
            $subtractedType = new \PHPStan\Type\MixedType(\false, $b);
        }
        $subtractedType = self::intersect($a->getSubtractedType(), $subtractedType);
        if ($subtractedType instanceof \PHPStan\Type\NeverType) {
            $subtractedType = null;
        }
        return $a->changeSubtractedType($subtractedType);
    }
    /**
     * @param Type[] $arrayTypes
     * @return Type[]
     */
    private static function processArrayAccessoryTypes(array $arrayTypes) : array
    {
        $accessoryTypes = [];
        foreach ($arrayTypes as $i => $arrayType) {
            if ($arrayType instanceof \PHPStan\Type\IntersectionType) {
                foreach ($arrayType->getTypes() as $innerType) {
                    if ($innerType instanceof TemplateType) {
                        break;
                    }
                    if (!$innerType instanceof AccessoryType && !$innerType instanceof \PHPStan\Type\CallableType) {
                        continue;
                    }
                    if ($innerType instanceof HasOffsetValueType) {
                        $accessoryTypes[sprintf('hasOffsetValue(%s)', $innerType->getOffsetType()->describe(\PHPStan\Type\VerbosityLevel::cache()))][$i] = $innerType;
                        continue;
                    }
                    $accessoryTypes[$innerType->describe(\PHPStan\Type\VerbosityLevel::cache())][$i] = $innerType;
                }
            }
            if (!$arrayType->isConstantArray()->yes()) {
                continue;
            }
            $constantArrays = $arrayType->getConstantArrays();
            foreach ($constantArrays as $constantArray) {
                if ($constantArray->isList()->yes() && AccessoryArrayListType::isListTypeEnabled()) {
                    $list = new AccessoryArrayListType();
                    $accessoryTypes[$list->describe(\PHPStan\Type\VerbosityLevel::cache())][$i] = $list;
                }
                if (!$constantArray->isIterableAtLeastOnce()->yes()) {
                    continue;
                }
                $nonEmpty = new NonEmptyArrayType();
                $accessoryTypes[$nonEmpty->describe(\PHPStan\Type\VerbosityLevel::cache())][$i] = $nonEmpty;
            }
        }
        $commonAccessoryTypes = [];
        $arrayTypeCount = count($arrayTypes);
        foreach ($accessoryTypes as $accessoryType) {
            if (count($accessoryType) !== $arrayTypeCount) {
                $firstKey = array_key_first($accessoryType);
                if ($accessoryType[$firstKey] instanceof OversizedArrayType) {
                    $commonAccessoryTypes[] = $accessoryType[$firstKey];
                }
                continue;
            }
            if ($accessoryType[0] instanceof HasOffsetValueType) {
                $commonAccessoryTypes[] = self::union(...$accessoryType);
                continue;
            }
            $commonAccessoryTypes[] = $accessoryType[0];
        }
        return $commonAccessoryTypes;
    }
    /**
     * @param Type[] $arrayTypes
     * @return Type[]
     */
    private static function processArrayTypes(array $arrayTypes) : array
    {
        if ($arrayTypes === []) {
            return [];
        }
        $accessoryTypes = self::processArrayAccessoryTypes($arrayTypes);
        if (count($arrayTypes) === 1) {
            return [self::intersect(...$arrayTypes, ...$accessoryTypes)];
        }
        $keyTypesForGeneralArray = [];
        $valueTypesForGeneralArray = [];
        $generalArrayOccurred = \false;
        $constantKeyTypesNumbered = [];
        /** @var int|float $nextConstantKeyTypeIndex */
        $nextConstantKeyTypeIndex = 1;
        foreach ($arrayTypes as $arrayType) {
            if ($generalArrayOccurred || !$arrayType->isConstantArray()->yes()) {
                foreach ($arrayType->getArrays() as $type) {
                    $keyTypesForGeneralArray[] = $type->getKeyType();
                    $valueTypesForGeneralArray[] = $type->getItemType();
                    $generalArrayOccurred = \true;
                }
                continue;
            }
            $constantArrays = $arrayType->getConstantArrays();
            foreach ($constantArrays as $constantArray) {
                foreach ($constantArray->getKeyTypes() as $i => $keyType) {
                    $keyTypesForGeneralArray[] = $keyType;
                    $valueTypesForGeneralArray[] = $constantArray->getValueTypes()[$i];
                    $keyTypeValue = $keyType->getValue();
                    if (array_key_exists($keyTypeValue, $constantKeyTypesNumbered)) {
                        continue;
                    }
                    $constantKeyTypesNumbered[$keyTypeValue] = $nextConstantKeyTypeIndex;
                    $nextConstantKeyTypeIndex *= 2;
                    if (!is_int($nextConstantKeyTypeIndex)) {
                        $generalArrayOccurred = \true;
                        continue 2;
                    }
                }
            }
        }
        if ($generalArrayOccurred) {
            return [self::intersect(new \PHPStan\Type\ArrayType(self::union(...$keyTypesForGeneralArray), self::union(...self::optimizeConstantArrays($valueTypesForGeneralArray))), ...$accessoryTypes)];
        }
        $reducedArrayTypes = self::reduceArrays($arrayTypes);
        return array_map(static function (\PHPStan\Type\Type $arrayType) use($accessoryTypes) {
            return self::intersect($arrayType, ...$accessoryTypes);
        }, self::optimizeConstantArrays($reducedArrayTypes));
    }
    /**
     * @param Type[] $types
     * @return Type[]
     */
    private static function optimizeConstantArrays(array $types) : array
    {
        $constantArrayValuesCount = self::countConstantArrayValueTypes($types);
        if ($constantArrayValuesCount > ConstantArrayTypeBuilder::ARRAY_COUNT_LIMIT) {
            $results = [];
            foreach ($types as $type) {
                $results[] = \PHPStan\Type\TypeTraverser::map($type, static function (\PHPStan\Type\Type $type, callable $traverse) : \PHPStan\Type\Type {
                    if ($type instanceof ConstantArrayType) {
                        if ($type->isIterableAtLeastOnce()->no()) {
                            return $type;
                        }
                        $isList = \true;
                        $valueTypes = [];
                        $keyTypes = [];
                        $nextAutoIndex = 0;
                        foreach ($type->getKeyTypes() as $i => $innerKeyType) {
                            if (!$innerKeyType instanceof ConstantIntegerType) {
                                $isList = \false;
                            } elseif ($innerKeyType->getValue() !== $nextAutoIndex) {
                                $isList = \false;
                                $nextAutoIndex = $innerKeyType->getValue() + 1;
                            } else {
                                $nextAutoIndex++;
                            }
                            $generalizedKeyType = $innerKeyType->generalize(\PHPStan\Type\GeneralizePrecision::moreSpecific());
                            $keyTypes[$generalizedKeyType->describe(\PHPStan\Type\VerbosityLevel::precise())] = $generalizedKeyType;
                            $innerValueType = $type->getValueTypes()[$i];
                            $generalizedValueType = \PHPStan\Type\TypeTraverser::map($innerValueType, static function (\PHPStan\Type\Type $type, callable $innerTraverse) use($traverse) : \PHPStan\Type\Type {
                                if ($type instanceof \PHPStan\Type\ArrayType) {
                                    return \PHPStan\Type\TypeCombinator::intersect($type, new OversizedArrayType());
                                }
                                return $traverse($type);
                            });
                            $valueTypes[$generalizedValueType->describe(\PHPStan\Type\VerbosityLevel::precise())] = $generalizedValueType;
                        }
                        $keyType = \PHPStan\Type\TypeCombinator::union(...array_values($keyTypes));
                        $valueType = \PHPStan\Type\TypeCombinator::union(...array_values($valueTypes));
                        $arrayType = new \PHPStan\Type\ArrayType($keyType, $valueType);
                        if ($isList) {
                            $arrayType = AccessoryArrayListType::intersectWith($arrayType);
                        }
                        return \PHPStan\Type\TypeCombinator::intersect($arrayType, new NonEmptyArrayType(), new OversizedArrayType());
                    }
                    return $traverse($type);
                });
            }
            return $results;
        }
        return $types;
    }
    /**
     * @param Type[] $types
     */
    private static function countConstantArrayValueTypes(array $types) : int
    {
        $constantArrayValuesCount = 0;
        foreach ($types as $type) {
            \PHPStan\Type\TypeTraverser::map($type, static function (\PHPStan\Type\Type $type, callable $traverse) use(&$constantArrayValuesCount) : \PHPStan\Type\Type {
                if ($type instanceof ConstantArrayType) {
                    $constantArrayValuesCount += count($type->getValueTypes());
                }
                return $traverse($type);
            });
        }
        return $constantArrayValuesCount;
    }
    /**
     * @param Type[] $constantArrays
     * @return Type[]
     */
    private static function reduceArrays(array $constantArrays) : array
    {
        $newArrays = [];
        $arraysToProcess = [];
        $emptyArray = null;
        foreach ($constantArrays as $constantArray) {
            if (!$constantArray->isConstantArray()->yes()) {
                $newArrays[] = $constantArray;
                continue;
            }
            if ($constantArray->isIterableAtLeastOnce()->no()) {
                $emptyArray = $constantArray;
                continue;
            }
            $arraysToProcess = array_merge($arraysToProcess, $constantArray->getConstantArrays());
        }
        if ($emptyArray !== null) {
            $newArrays[] = $emptyArray;
        }
        $arraysToProcessPerKey = [];
        foreach ($arraysToProcess as $i => $arrayToProcess) {
            foreach ($arrayToProcess->getKeyTypes() as $keyType) {
                $arraysToProcessPerKey[$keyType->getValue()][] = $i;
            }
        }
        $eligibleCombinations = [];
        foreach ($arraysToProcessPerKey as $arrays) {
            for ($i = 0, $arraysCount = count($arrays); $i < $arraysCount - 1; $i++) {
                for ($j = $i + 1; $j < $arraysCount; $j++) {
                    $eligibleCombinations[$arrays[$i]][$arrays[$j]] = $eligibleCombinations[$arrays[$i]][$arrays[$j]] ?? 0;
                    $eligibleCombinations[$arrays[$i]][$arrays[$j]]++;
                }
            }
        }
        foreach ($eligibleCombinations as $i => $other) {
            if (!array_key_exists($i, $arraysToProcess)) {
                continue;
            }
            foreach ($other as $j => $overlappingKeysCount) {
                if (!array_key_exists($j, $arraysToProcess)) {
                    continue;
                }
                if ($overlappingKeysCount === count($arraysToProcess[$i]->getKeyTypes()) && $arraysToProcess[$j]->isKeysSupersetOf($arraysToProcess[$i])) {
                    $arraysToProcess[$j] = $arraysToProcess[$j]->mergeWith($arraysToProcess[$i]);
                    unset($arraysToProcess[$i]);
                    continue 2;
                }
                if ($overlappingKeysCount === count($arraysToProcess[$j]->getKeyTypes()) && $arraysToProcess[$i]->isKeysSupersetOf($arraysToProcess[$j])) {
                    $arraysToProcess[$i] = $arraysToProcess[$i]->mergeWith($arraysToProcess[$j]);
                    unset($arraysToProcess[$j]);
                    continue 1;
                }
            }
        }
        return array_merge($newArrays, $arraysToProcess);
    }
    public static function intersect(\PHPStan\Type\Type ...$types) : \PHPStan\Type\Type
    {
        $types = array_values($types);
        $typesCount = count($types);
        if ($typesCount === 0) {
            return new \PHPStan\Type\NeverType();
        }
        if ($typesCount === 1) {
            return $types[0];
        }
        $sortTypes = static function (\PHPStan\Type\Type $a, \PHPStan\Type\Type $b) : int {
            if (!$a instanceof \PHPStan\Type\UnionType || !$b instanceof \PHPStan\Type\UnionType) {
                return 0;
            }
            if ($a instanceof TemplateType) {
                return -1;
            }
            if ($b instanceof TemplateType) {
                return 1;
            }
            if ($a instanceof \PHPStan\Type\BenevolentUnionType) {
                return -1;
            }
            if ($b instanceof \PHPStan\Type\BenevolentUnionType) {
                return 1;
            }
            return 0;
        };
        usort($types, $sortTypes);
        // transform A & (B | C) to (A & B) | (A & C)
        foreach ($types as $i => $type) {
            if (!$type instanceof \PHPStan\Type\UnionType) {
                continue;
            }
            $topLevelUnionSubTypes = [];
            $innerTypes = $type->getTypes();
            usort($innerTypes, $sortTypes);
            $slice1 = array_slice($types, 0, $i);
            $slice2 = array_slice($types, $i + 1);
            foreach ($innerTypes as $innerUnionSubType) {
                $topLevelUnionSubTypes[] = self::intersect($innerUnionSubType, ...$slice1, ...$slice2);
            }
            $union = self::union(...$topLevelUnionSubTypes);
            if ($union instanceof \PHPStan\Type\NeverType) {
                return $union;
            }
            if ($type instanceof \PHPStan\Type\BenevolentUnionType) {
                $union = \PHPStan\Type\TypeUtils::toBenevolentUnion($union);
            }
            if ($type instanceof TemplateUnionType || $type instanceof TemplateBenevolentUnionType) {
                $union = TemplateTypeFactory::create($type->getScope(), $type->getName(), $union, $type->getVariance(), $type->getStrategy());
            }
            return $union;
        }
        $typesCount = count($types);
        // transform A & (B & C) to A & B & C
        for ($i = 0; $i < $typesCount; $i++) {
            $type = $types[$i];
            if (!$type instanceof \PHPStan\Type\IntersectionType) {
                continue;
            }
            array_splice($types, $i--, 1, $type->getTypes());
            $typesCount = count($types);
        }
        $hasOffsetValueTypeCount = 0;
        $newTypes = [];
        foreach ($types as $type) {
            if (!$type instanceof HasOffsetValueType) {
                $newTypes[] = $type;
                continue;
            }
            $hasOffsetValueTypeCount++;
        }
        if ($hasOffsetValueTypeCount > 32) {
            $newTypes[] = new OversizedArrayType();
            $types = array_values($newTypes);
            $typesCount = count($types);
        }
        usort($types, static function (\PHPStan\Type\Type $a, \PHPStan\Type\Type $b) : int {
            // move subtractables with subtracts before those without to avoid loosing them in the union logic
            if ($a instanceof \PHPStan\Type\SubtractableType && $a->getSubtractedType() !== null) {
                return -1;
            }
            if ($b instanceof \PHPStan\Type\SubtractableType && $b->getSubtractedType() !== null) {
                return 1;
            }
            if ($a instanceof ConstantArrayType && !$b instanceof ConstantArrayType) {
                return -1;
            }
            if ($b instanceof ConstantArrayType && !$a instanceof ConstantArrayType) {
                return 1;
            }
            return 0;
        });
        // transform IntegerType & ConstantIntegerType to ConstantIntegerType
        // transform Child & Parent to Child
        // transform Object & ~null to Object
        // transform A & A to A
        // transform int[] & string to never
        // transform callable & int to never
        // transform A & ~A to never
        // transform int & string to never
        for ($i = 0; $i < $typesCount; $i++) {
            for ($j = $i + 1; $j < $typesCount; $j++) {
                if ($types[$j] instanceof \PHPStan\Type\SubtractableType) {
                    $typeWithoutSubtractedTypeA = $types[$j]->getTypeWithoutSubtractedType();
                    if ($typeWithoutSubtractedTypeA instanceof \PHPStan\Type\MixedType && $types[$i] instanceof \PHPStan\Type\MixedType) {
                        $isSuperTypeSubtractableA = $typeWithoutSubtractedTypeA->isSuperTypeOfMixed($types[$i]);
                    } else {
                        $isSuperTypeSubtractableA = $typeWithoutSubtractedTypeA->isSuperTypeOf($types[$i]);
                    }
                    if ($isSuperTypeSubtractableA->yes()) {
                        $types[$i] = self::unionWithSubtractedType($types[$i], $types[$j]->getSubtractedType());
                        array_splice($types, $j--, 1);
                        $typesCount--;
                        continue 1;
                    }
                }
                if ($types[$i] instanceof \PHPStan\Type\SubtractableType) {
                    $typeWithoutSubtractedTypeB = $types[$i]->getTypeWithoutSubtractedType();
                    if ($typeWithoutSubtractedTypeB instanceof \PHPStan\Type\MixedType && $types[$j] instanceof \PHPStan\Type\MixedType) {
                        $isSuperTypeSubtractableB = $typeWithoutSubtractedTypeB->isSuperTypeOfMixed($types[$j]);
                    } else {
                        $isSuperTypeSubtractableB = $typeWithoutSubtractedTypeB->isSuperTypeOf($types[$j]);
                    }
                    if ($isSuperTypeSubtractableB->yes()) {
                        $types[$j] = self::unionWithSubtractedType($types[$j], $types[$i]->getSubtractedType());
                        array_splice($types, $i--, 1);
                        $typesCount--;
                        continue 2;
                    }
                }
                if ($types[$i] instanceof \PHPStan\Type\IntegerRangeType) {
                    $intersectionType = $types[$i]->tryIntersect($types[$j]);
                    if ($intersectionType !== null) {
                        $types[$j] = $intersectionType;
                        array_splice($types, $i--, 1);
                        $typesCount--;
                        continue 2;
                    }
                }
                if ($types[$j] instanceof \PHPStan\Type\IterableType) {
                    $isSuperTypeA = $types[$j]->isSuperTypeOfMixed($types[$i]);
                } else {
                    $isSuperTypeA = $types[$j]->isSuperTypeOf($types[$i]);
                }
                if ($isSuperTypeA->yes()) {
                    array_splice($types, $j--, 1);
                    $typesCount--;
                    continue;
                }
                if ($types[$i] instanceof \PHPStan\Type\IterableType) {
                    $isSuperTypeB = $types[$i]->isSuperTypeOfMixed($types[$j]);
                } else {
                    $isSuperTypeB = $types[$i]->isSuperTypeOf($types[$j]);
                }
                if ($isSuperTypeB->maybe()) {
                    if ($types[$i] instanceof ConstantArrayType && $types[$j] instanceof HasOffsetType) {
                        $types[$i] = $types[$i]->makeOffsetRequired($types[$j]->getOffsetType());
                        array_splice($types, $j--, 1);
                        $typesCount--;
                        continue;
                    }
                    if ($types[$j] instanceof ConstantArrayType && $types[$i] instanceof HasOffsetType) {
                        $types[$j] = $types[$j]->makeOffsetRequired($types[$i]->getOffsetType());
                        array_splice($types, $i--, 1);
                        $typesCount--;
                        continue 2;
                    }
                    if ($types[$i] instanceof ConstantArrayType && $types[$j] instanceof HasOffsetValueType) {
                        $offsetType = $types[$j]->getOffsetType();
                        $valueType = $types[$j]->getValueType();
                        $newValueType = self::intersect($types[$i]->getOffsetValueType($offsetType), $valueType);
                        if ($newValueType instanceof \PHPStan\Type\NeverType) {
                            return $newValueType;
                        }
                        $types[$i] = $types[$i]->setOffsetValueType($offsetType, $newValueType);
                        array_splice($types, $j--, 1);
                        $typesCount--;
                        continue;
                    }
                    if ($types[$j] instanceof ConstantArrayType && $types[$i] instanceof HasOffsetValueType) {
                        $offsetType = $types[$i]->getOffsetType();
                        $valueType = $types[$i]->getValueType();
                        $newValueType = self::intersect($types[$j]->getOffsetValueType($offsetType), $valueType);
                        if ($newValueType instanceof \PHPStan\Type\NeverType) {
                            return $newValueType;
                        }
                        $types[$j] = $types[$j]->setOffsetValueType($offsetType, $newValueType);
                        array_splice($types, $i--, 1);
                        $typesCount--;
                        continue 2;
                    }
                    if ($types[$i] instanceof OversizedArrayType && $types[$j] instanceof HasOffsetValueType) {
                        array_splice($types, $j--, 1);
                        $typesCount--;
                        continue;
                    }
                    if ($types[$j] instanceof OversizedArrayType && $types[$i] instanceof HasOffsetValueType) {
                        array_splice($types, $i--, 1);
                        $typesCount--;
                        continue 2;
                    }
                    if ($types[$i] instanceof \PHPStan\Type\ObjectShapeType && $types[$j] instanceof HasPropertyType) {
                        $types[$i] = $types[$i]->makePropertyRequired($types[$j]->getPropertyName());
                        array_splice($types, $j--, 1);
                        $typesCount--;
                        continue;
                    }
                    if ($types[$j] instanceof \PHPStan\Type\ObjectShapeType && $types[$i] instanceof HasPropertyType) {
                        $types[$j] = $types[$j]->makePropertyRequired($types[$i]->getPropertyName());
                        array_splice($types, $i--, 1);
                        $typesCount--;
                        continue 2;
                    }
                    if ($types[$i] instanceof ConstantArrayType && $types[$j] instanceof \PHPStan\Type\ArrayType) {
                        $newArray = ConstantArrayTypeBuilder::createEmpty();
                        $valueTypes = $types[$i]->getValueTypes();
                        foreach ($types[$i]->getKeyTypes() as $k => $keyType) {
                            $newArray->setOffsetValueType(self::intersect($keyType, $types[$j]->getIterableKeyType()), self::intersect($valueTypes[$k], $types[$j]->getIterableValueType()), $types[$i]->isOptionalKey($k) && !$types[$j]->hasOffsetValueType($keyType)->yes());
                        }
                        $types[$i] = $newArray->getArray();
                        array_splice($types, $j--, 1);
                        $typesCount--;
                        continue 2;
                    }
                    if ($types[$j] instanceof ConstantArrayType && $types[$i] instanceof \PHPStan\Type\ArrayType) {
                        $newArray = ConstantArrayTypeBuilder::createEmpty();
                        $valueTypes = $types[$j]->getValueTypes();
                        foreach ($types[$j]->getKeyTypes() as $k => $keyType) {
                            $newArray->setOffsetValueType(self::intersect($keyType, $types[$i]->getIterableKeyType()), self::intersect($valueTypes[$k], $types[$i]->getIterableValueType()), $types[$j]->isOptionalKey($k) && !$types[$i]->hasOffsetValueType($keyType)->yes());
                        }
                        $types[$j] = $newArray->getArray();
                        array_splice($types, $i--, 1);
                        $typesCount--;
                        continue 2;
                    }
                    if (($types[$i] instanceof \PHPStan\Type\ArrayType || $types[$i] instanceof \PHPStan\Type\IterableType) && ($types[$j] instanceof \PHPStan\Type\ArrayType || $types[$j] instanceof \PHPStan\Type\IterableType)) {
                        $keyType = self::intersect($types[$i]->getKeyType(), $types[$j]->getKeyType());
                        $itemType = self::intersect($types[$i]->getItemType(), $types[$j]->getItemType());
                        if ($types[$i] instanceof \PHPStan\Type\IterableType && $types[$j] instanceof \PHPStan\Type\IterableType) {
                            $types[$j] = new \PHPStan\Type\IterableType($keyType, $itemType);
                        } else {
                            $types[$j] = new \PHPStan\Type\ArrayType($keyType, $itemType);
                        }
                        array_splice($types, $i--, 1);
                        $typesCount--;
                        continue 2;
                    }
                    if ($types[$i] instanceof GenericClassStringType && $types[$j] instanceof GenericClassStringType) {
                        $genericType = self::intersect($types[$i]->getGenericType(), $types[$j]->getGenericType());
                        $types[$i] = new GenericClassStringType($genericType);
                        array_splice($types, $j--, 1);
                        $typesCount--;
                        continue;
                    }
                    if ($types[$i] instanceof \PHPStan\Type\ArrayType && get_class($types[$i]) === \PHPStan\Type\ArrayType::class && $types[$j] instanceof AccessoryArrayListType && !$types[$j]->getIterableKeyType()->isSuperTypeOf($types[$i]->getIterableKeyType())->yes()) {
                        $keyType = self::intersect($types[$i]->getIterableKeyType(), $types[$j]->getIterableKeyType());
                        if ($keyType instanceof \PHPStan\Type\NeverType) {
                            return $keyType;
                        }
                        $types[$i] = new \PHPStan\Type\ArrayType($keyType, $types[$i]->getItemType());
                        continue;
                    }
                    continue;
                }
                if ($isSuperTypeB->yes()) {
                    array_splice($types, $i--, 1);
                    $typesCount--;
                    continue 2;
                }
                if ($isSuperTypeA->no()) {
                    return new \PHPStan\Type\NeverType();
                }
            }
        }
        if ($typesCount === 1) {
            return $types[0];
        }
        return new \PHPStan\Type\IntersectionType($types);
    }
    public static function removeFalsey(\PHPStan\Type\Type $type) : \PHPStan\Type\Type
    {
        return self::remove($type, \PHPStan\Type\StaticTypeFactory::falsey());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\Accessory\AccessoryLiteralStringType;
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
use PHPStan\Type\Accessory\AccessoryNonFalsyStringType;
use PHPStan\Type\Accessory\AccessoryNumericStringType;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\Generic\GenericObjectType;
use PHPStan\Type\Generic\TemplateType;
class VerbosityLevel
{
    private const TYPE_ONLY = 1;
    private const VALUE = 2;
    private const PRECISE = 3;
    private const CACHE = 4;
    /** @var self[] */
    private static $registry;
    /**
     * @var self::*
     */
    private $value;
    /**
     * @param self::* $value
     */
    private function __construct(int $value)
    {
        $this->value = $value;
    }
    /**
     * @param self::* $value
     */
    private static function create(int $value) : self
    {
        self::$registry[$value] = self::$registry[$value] ?? new self($value);
        return self::$registry[$value];
    }
    /** @return self::* */
    public function getLevelValue() : int
    {
        return $this->value;
    }
    /** @api */
    public static function typeOnly() : self
    {
        return self::create(self::TYPE_ONLY);
    }
    /** @api */
    public static function value() : self
    {
        return self::create(self::VALUE);
    }
    /** @api */
    public static function precise() : self
    {
        return self::create(self::PRECISE);
    }
    /** @api */
    public static function cache() : self
    {
        return self::create(self::CACHE);
    }
    public function isTypeOnly() : bool
    {
        return $this->value === self::TYPE_ONLY;
    }
    public function isValue() : bool
    {
        return $this->value === self::VALUE;
    }
    /** @api */
    public static function getRecommendedLevelByType(\PHPStan\Type\Type $acceptingType, ?\PHPStan\Type\Type $acceptedType = null) : self
    {
        $moreVerboseCallback = static function (\PHPStan\Type\Type $type, callable $traverse) use(&$moreVerbose) : \PHPStan\Type\Type {
            if ($type->isCallable()->yes()) {
                $moreVerbose = \true;
                return $type;
            }
            if ($type->isConstantValue()->yes() && $type->isNull()->no()) {
                $moreVerbose = \true;
                return $type;
            }
            if ($type instanceof AccessoryNonEmptyStringType || $type instanceof AccessoryNonFalsyStringType || $type instanceof AccessoryLiteralStringType || $type instanceof AccessoryNumericStringType || $type instanceof NonEmptyArrayType || $type instanceof AccessoryArrayListType) {
                $moreVerbose = \true;
                return $type;
            }
            if ($type instanceof \PHPStan\Type\IntegerRangeType) {
                $moreVerbose = \true;
                return $type;
            }
            return $traverse($type);
        };
        /** @var bool $moreVerbose */
        $moreVerbose = \false;
        \PHPStan\Type\TypeTraverser::map($acceptingType, $moreVerboseCallback);
        if ($moreVerbose) {
            return self::value();
        }
        if ($acceptedType === null) {
            return self::typeOnly();
        }
        $containsInvariantTemplateType = \false;
        \PHPStan\Type\TypeTraverser::map($acceptingType, static function (\PHPStan\Type\Type $type, callable $traverse) use(&$containsInvariantTemplateType) : \PHPStan\Type\Type {
            if ($type instanceof GenericObjectType) {
                $reflection = $type->getClassReflection();
                if ($reflection !== null) {
                    $templateTypeMap = $reflection->getTemplateTypeMap();
                    foreach ($templateTypeMap->getTypes() as $templateType) {
                        if (!$templateType instanceof TemplateType) {
                            continue;
                        }
                        if (!$templateType->getVariance()->invariant()) {
                            continue;
                        }
                        $containsInvariantTemplateType = \true;
                        return $type;
                    }
                }
            }
            return $traverse($type);
        });
        if (!$containsInvariantTemplateType) {
            return self::typeOnly();
        }
        /** @var bool $moreVerbose */
        $moreVerbose = \false;
        \PHPStan\Type\TypeTraverser::map($acceptedType, $moreVerboseCallback);
        return $moreVerbose ? self::value() : self::typeOnly();
    }
    /**
     * @param callable(): string $typeOnlyCallback
     * @param callable(): string $valueCallback
     * @param callable(): string|null $preciseCallback
     * @param callable(): string|null $cacheCallback
     */
    public function handle(callable $typeOnlyCallback, callable $valueCallback, ?callable $preciseCallback = null, ?callable $cacheCallback = null) : string
    {
        if ($this->value === self::TYPE_ONLY) {
            return $typeOnlyCallback();
        }
        if ($this->value === self::VALUE) {
            return $valueCallback();
        }
        if ($this->value === self::PRECISE) {
            if ($preciseCallback !== null) {
                return $preciseCallback();
            }
            return $valueCallback();
        }
        if ($cacheCallback !== null) {
            return $cacheCallback();
        }
        if ($preciseCallback !== null) {
            return $preciseCallback();
        }
        return $valueCallback();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Broker\Broker;
use PHPStan\Reflection\BrokerAwareExtension;
use function array_filter;
use function array_values;
class OperatorTypeSpecifyingExtensionRegistry
{
    /**
     * @var OperatorTypeSpecifyingExtension[]
     */
    private $extensions;
    /**
     * @param OperatorTypeSpecifyingExtension[] $extensions
     */
    public function __construct(?Broker $broker, array $extensions)
    {
        $this->extensions = $extensions;
        if ($broker === null) {
            return;
        }
        foreach ($extensions as $extension) {
            if (!$extension instanceof BrokerAwareExtension) {
                continue;
            }
            $extension->setBroker($broker);
        }
    }
    /**
     * @return OperatorTypeSpecifyingExtension[]
     */
    public function getOperatorTypeSpecifyingExtensions(string $operator, \PHPStan\Type\Type $leftType, \PHPStan\Type\Type $rightType) : array
    {
        return array_values(array_filter($this->extensions, static function (\PHPStan\Type\OperatorTypeSpecifyingExtension $extension) use($operator, $leftType, $rightType) : bool {
            return $extension->isOperatorSupported($operator, $leftType, $rightType);
        }));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\GenericTypeNode;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Generic\GenericObjectType;
use PHPStan\Type\Generic\TemplateMixedType;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\Generic\TemplateTypeVariance;
use PHPStan\Type\Traits\MaybeArrayTypeTrait;
use PHPStan\Type\Traits\MaybeCallableTypeTrait;
use PHPStan\Type\Traits\MaybeObjectTypeTrait;
use PHPStan\Type\Traits\MaybeOffsetAccessibleTypeTrait;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use PHPStan\Type\Traits\UndecidedBooleanTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
use Traversable;
use function array_merge;
use function sprintf;
/** @api */
class IterableType implements \PHPStan\Type\CompoundType
{
    use MaybeArrayTypeTrait;
    use MaybeCallableTypeTrait;
    use MaybeObjectTypeTrait;
    use MaybeOffsetAccessibleTypeTrait;
    use UndecidedBooleanTypeTrait;
    use UndecidedComparisonCompoundTypeTrait;
    use NonGeneralizableTypeTrait;
    /**
     * @var \PHPStan\Type\Type
     */
    private $keyType;
    /**
     * @var \PHPStan\Type\Type
     */
    private $itemType;
    /** @api */
    public function __construct(\PHPStan\Type\Type $keyType, \PHPStan\Type\Type $itemType)
    {
        $this->keyType = $keyType;
        $this->itemType = $itemType;
    }
    public function getKeyType() : \PHPStan\Type\Type
    {
        return $this->keyType;
    }
    public function getItemType() : \PHPStan\Type\Type
    {
        return $this->itemType;
    }
    /**
     * @return string[]
     */
    public function getReferencedClasses() : array
    {
        return array_merge($this->keyType->getReferencedClasses(), $this->getItemType()->getReferencedClasses());
    }
    public function getObjectClassNames() : array
    {
        return [];
    }
    public function getObjectClassReflections() : array
    {
        return [];
    }
    public function getConstantStrings() : array
    {
        return [];
    }
    public function accepts(\PHPStan\Type\Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(\PHPStan\Type\Type $type, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        if ($type->isConstantArray()->yes() && $type->isIterableAtLeastOnce()->no()) {
            return \PHPStan\Type\AcceptsResult::createYes();
        }
        if ($type->isIterable()->yes()) {
            return $this->getIterableValueType()->acceptsWithReason($type->getIterableValueType(), $strictTypes)->and($this->getIterableKeyType()->acceptsWithReason($type->getIterableKeyType(), $strictTypes));
        }
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        return \PHPStan\Type\AcceptsResult::createNo();
    }
    public function isSuperTypeOf(\PHPStan\Type\Type $type) : TrinaryLogic
    {
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return $type->isSubTypeOf($this);
        }
        return $type->isIterable()->and($this->getIterableValueType()->isSuperTypeOf($type->getIterableValueType()))->and($this->getIterableKeyType()->isSuperTypeOf($type->getIterableKeyType()));
    }
    public function isSuperTypeOfMixed(\PHPStan\Type\Type $type) : TrinaryLogic
    {
        return $type->isIterable()->and($this->isNestedTypeSuperTypeOf($this->getIterableValueType(), $type->getIterableValueType()))->and($this->isNestedTypeSuperTypeOf($this->getIterableKeyType(), $type->getIterableKeyType()));
    }
    private function isNestedTypeSuperTypeOf(\PHPStan\Type\Type $a, \PHPStan\Type\Type $b) : TrinaryLogic
    {
        if (!$a instanceof \PHPStan\Type\MixedType || !$b instanceof \PHPStan\Type\MixedType) {
            return $a->isSuperTypeOf($b);
        }
        if ($a instanceof TemplateMixedType || $b instanceof TemplateMixedType) {
            return $a->isSuperTypeOf($b);
        }
        if ($a->isExplicitMixed()) {
            if ($b->isExplicitMixed()) {
                return TrinaryLogic::createYes();
            }
            return TrinaryLogic::createMaybe();
        }
        return TrinaryLogic::createYes();
    }
    public function isSubTypeOf(\PHPStan\Type\Type $otherType) : TrinaryLogic
    {
        if ($otherType instanceof \PHPStan\Type\IntersectionType || $otherType instanceof \PHPStan\Type\UnionType) {
            return $otherType->isSuperTypeOf(new \PHPStan\Type\UnionType([new \PHPStan\Type\ArrayType($this->keyType, $this->itemType), new \PHPStan\Type\IntersectionType([new \PHPStan\Type\ObjectType(Traversable::class), $this])]));
        }
        if ($otherType instanceof self) {
            $limit = TrinaryLogic::createYes();
        } else {
            $limit = TrinaryLogic::createMaybe();
        }
        if ($otherType->isConstantArray()->yes() && $otherType->isIterableAtLeastOnce()->no()) {
            return TrinaryLogic::createMaybe();
        }
        return $limit->and($otherType->isIterable(), $otherType->getIterableValueType()->isSuperTypeOf($this->itemType), $otherType->getIterableKeyType()->isSuperTypeOf($this->keyType));
    }
    public function isAcceptedBy(\PHPStan\Type\Type $acceptingType, bool $strictTypes) : TrinaryLogic
    {
        return $this->isAcceptedWithReasonBy($acceptingType, $strictTypes)->result;
    }
    public function isAcceptedWithReasonBy(\PHPStan\Type\Type $acceptingType, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        return new \PHPStan\Type\AcceptsResult($this->isSubTypeOf($acceptingType), []);
    }
    public function equals(\PHPStan\Type\Type $type) : bool
    {
        if (!$type instanceof self) {
            return \false;
        }
        return $this->keyType->equals($type->keyType) && $this->itemType->equals($type->itemType);
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        $isMixedKeyType = $this->keyType instanceof \PHPStan\Type\MixedType && $this->keyType->describe(\PHPStan\Type\VerbosityLevel::precise()) === 'mixed';
        $isMixedItemType = $this->itemType instanceof \PHPStan\Type\MixedType && $this->itemType->describe(\PHPStan\Type\VerbosityLevel::precise()) === 'mixed';
        if ($isMixedKeyType) {
            if ($isMixedItemType) {
                return 'iterable';
            }
            return sprintf('iterable<%s>', $this->itemType->describe($level));
        }
        return sprintf('iterable<%s, %s>', $this->keyType->describe($level), $this->itemType->describe($level));
    }
    public function hasOffsetValueType(\PHPStan\Type\Type $offsetType) : TrinaryLogic
    {
        if ($this->getIterableKeyType()->isSuperTypeOf($offsetType)->no()) {
            return TrinaryLogic::createNo();
        }
        return TrinaryLogic::createMaybe();
    }
    public function toNumber() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toString() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toInteger() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toFloat() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toArray() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ArrayType($this->keyType, $this->getItemType());
    }
    public function toArrayKey() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function isIterable() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isIterableAtLeastOnce() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getArraySize() : \PHPStan\Type\Type
    {
        return \PHPStan\Type\IntegerRangeType::fromInterval(0, null);
    }
    public function getIterableKeyType() : \PHPStan\Type\Type
    {
        return $this->keyType;
    }
    public function getFirstIterableKeyType() : \PHPStan\Type\Type
    {
        return $this->keyType;
    }
    public function getLastIterableKeyType() : \PHPStan\Type\Type
    {
        return $this->keyType;
    }
    public function getIterableValueType() : \PHPStan\Type\Type
    {
        return $this->getItemType();
    }
    public function getFirstIterableValueType() : \PHPStan\Type\Type
    {
        return $this->getItemType();
    }
    public function getLastIterableValueType() : \PHPStan\Type\Type
    {
        return $this->getItemType();
    }
    public function isNull() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantScalarValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getConstantScalarTypes() : array
    {
        return [];
    }
    public function getConstantScalarValues() : array
    {
        return [];
    }
    public function isTrue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFalse() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isBoolean() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFloat() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isInteger() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNumericString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isLiteralString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isClassStringType() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getClassStringObjectType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function getObjectTypeOrClassStringObjectType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ObjectWithoutClassType();
    }
    public function isVoid() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isScalar() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function looseCompare(\PHPStan\Type\Type $type, PhpVersion $phpVersion) : \PHPStan\Type\BooleanType
    {
        return new \PHPStan\Type\BooleanType();
    }
    public function getEnumCases() : array
    {
        return [];
    }
    public function inferTemplateTypes(\PHPStan\Type\Type $receivedType) : TemplateTypeMap
    {
        if ($receivedType instanceof \PHPStan\Type\UnionType || $receivedType instanceof \PHPStan\Type\IntersectionType) {
            return $receivedType->inferTemplateTypesOn($this);
        }
        if (!$receivedType->isIterable()->yes()) {
            return TemplateTypeMap::createEmpty();
        }
        $keyTypeMap = $this->getIterableKeyType()->inferTemplateTypes($receivedType->getIterableKeyType());
        $valueTypeMap = $this->getIterableValueType()->inferTemplateTypes($receivedType->getIterableValueType());
        return $keyTypeMap->union($valueTypeMap);
    }
    public function getReferencedTemplateTypes(TemplateTypeVariance $positionVariance) : array
    {
        $variance = $positionVariance->compose(TemplateTypeVariance::createCovariant());
        return array_merge($this->getIterableKeyType()->getReferencedTemplateTypes($variance), $this->getIterableValueType()->getReferencedTemplateTypes($variance));
    }
    public function traverse(callable $cb) : \PHPStan\Type\Type
    {
        $keyType = $cb($this->keyType);
        $itemType = $cb($this->itemType);
        if ($keyType !== $this->keyType || $itemType !== $this->itemType) {
            return new self($keyType, $itemType);
        }
        return $this;
    }
    public function traverseSimultaneously(\PHPStan\Type\Type $right, callable $cb) : \PHPStan\Type\Type
    {
        $keyType = $cb($this->keyType, $right->getIterableKeyType());
        $itemType = $cb($this->itemType, $right->getIterableValueType());
        if ($keyType !== $this->keyType || $itemType !== $this->itemType) {
            return new self($keyType, $itemType);
        }
        return $this;
    }
    public function tryRemove(\PHPStan\Type\Type $typeToRemove) : ?\PHPStan\Type\Type
    {
        $arrayType = new \PHPStan\Type\ArrayType(new \PHPStan\Type\MixedType(), new \PHPStan\Type\MixedType());
        if ($typeToRemove->isSuperTypeOf($arrayType)->yes()) {
            return new GenericObjectType(Traversable::class, [$this->getIterableKeyType(), $this->getIterableValueType()]);
        }
        $traversableType = new \PHPStan\Type\ObjectType(Traversable::class);
        if ($typeToRemove->isSuperTypeOf($traversableType)->yes()) {
            return new \PHPStan\Type\ArrayType($this->getIterableKeyType(), $this->getIterableValueType());
        }
        return null;
    }
    public function exponentiate(\PHPStan\Type\Type $exponent) : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toPhpDocNode() : TypeNode
    {
        $isMixedKeyType = $this->keyType instanceof \PHPStan\Type\MixedType && $this->keyType->describe(\PHPStan\Type\VerbosityLevel::precise()) === 'mixed';
        $isMixedItemType = $this->itemType instanceof \PHPStan\Type\MixedType && $this->itemType->describe(\PHPStan\Type\VerbosityLevel::precise()) === 'mixed';
        if ($isMixedKeyType) {
            if ($isMixedItemType) {
                return new IdentifierTypeNode('iterable');
            }
            return new GenericTypeNode(new IdentifierTypeNode('iterable'), [$this->itemType->toPhpDocNode()]);
        }
        return new GenericTypeNode(new IdentifierTypeNode('iterable'), [$this->keyType->toPhpDocNode(), $this->itemType->toPhpDocNode()]);
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self($properties['keyType'], $properties['itemType']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Analyser\OutOfClassScope;
use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\CallableTypeNode;
use PHPStan\PhpDocParser\Ast\Type\CallableTypeParameterNode;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\PhpDocParser\Printer\Printer;
use PHPStan\Reflection\ClassMemberAccessAnswerer;
use PHPStan\Reflection\Native\NativeParameterReflection;
use PHPStan\Reflection\ParameterReflection;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\Reflection\PassedByReference;
use PHPStan\Reflection\Php\DummyParameter;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Generic\TemplateType;
use PHPStan\Type\Generic\TemplateTypeHelper;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\Generic\TemplateTypeVariance;
use PHPStan\Type\Traits\MaybeArrayTypeTrait;
use PHPStan\Type\Traits\MaybeIterableTypeTrait;
use PHPStan\Type\Traits\MaybeObjectTypeTrait;
use PHPStan\Type\Traits\MaybeOffsetAccessibleTypeTrait;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use PHPStan\Type\Traits\NonRemoveableTypeTrait;
use PHPStan\Type\Traits\TruthyBooleanTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
use function array_map;
use function array_merge;
use function count;
/** @api */
class CallableType implements \PHPStan\Type\CompoundType, ParametersAcceptor
{
    use MaybeArrayTypeTrait;
    use MaybeIterableTypeTrait;
    use MaybeObjectTypeTrait;
    use MaybeOffsetAccessibleTypeTrait;
    use TruthyBooleanTypeTrait;
    use UndecidedComparisonCompoundTypeTrait;
    use NonRemoveableTypeTrait;
    use NonGeneralizableTypeTrait;
    /** @var array<int, ParameterReflection> */
    private $parameters;
    /**
     * @var \PHPStan\Type\Type
     */
    private $returnType;
    /**
     * @var bool
     */
    private $isCommonCallable;
    /**
     * @var bool
     */
    private $variadic = \true;
    /**
     * @api
     * @param array<int, ParameterReflection>|null $parameters
     */
    public function __construct(?array $parameters = null, ?\PHPStan\Type\Type $returnType = null, bool $variadic = \true)
    {
        $this->variadic = $variadic;
        $this->parameters = $parameters ?? [];
        $this->returnType = $returnType ?? new \PHPStan\Type\MixedType();
        $this->isCommonCallable = $parameters === null && $returnType === null;
    }
    /**
     * @return string[]
     */
    public function getReferencedClasses() : array
    {
        $classes = [];
        foreach ($this->parameters as $parameter) {
            $classes = array_merge($classes, $parameter->getType()->getReferencedClasses());
        }
        return array_merge($classes, $this->returnType->getReferencedClasses());
    }
    public function getObjectClassNames() : array
    {
        return [];
    }
    public function getObjectClassReflections() : array
    {
        return [];
    }
    public function getConstantStrings() : array
    {
        return [];
    }
    public function accepts(\PHPStan\Type\Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(\PHPStan\Type\Type $type, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        if ($type instanceof \PHPStan\Type\CompoundType && !$type instanceof self) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        return $this->isSuperTypeOfInternal($type, \true);
    }
    public function isSuperTypeOf(\PHPStan\Type\Type $type) : TrinaryLogic
    {
        if ($type instanceof \PHPStan\Type\CompoundType && !$type instanceof self) {
            return $type->isSubTypeOf($this);
        }
        return $this->isSuperTypeOfInternal($type, \false)->result;
    }
    private function isSuperTypeOfInternal(\PHPStan\Type\Type $type, bool $treatMixedAsAny) : \PHPStan\Type\AcceptsResult
    {
        $isCallable = new \PHPStan\Type\AcceptsResult($type->isCallable(), []);
        if ($isCallable->no() || $this->isCommonCallable) {
            return $isCallable;
        }
        static $scope;
        if ($scope === null) {
            $scope = new OutOfClassScope();
        }
        $variantsResult = null;
        foreach ($type->getCallableParametersAcceptors($scope) as $variant) {
            $isSuperType = \PHPStan\Type\CallableTypeHelper::isParametersAcceptorSuperTypeOf($this, $variant, $treatMixedAsAny);
            if ($variantsResult === null) {
                $variantsResult = $isSuperType;
            } else {
                $variantsResult = $variantsResult->or($isSuperType);
            }
        }
        if ($variantsResult === null) {
            throw new ShouldNotHappenException();
        }
        return $isCallable->and($variantsResult);
    }
    public function isSubTypeOf(\PHPStan\Type\Type $otherType) : TrinaryLogic
    {
        if ($otherType instanceof \PHPStan\Type\IntersectionType || $otherType instanceof \PHPStan\Type\UnionType) {
            return $otherType->isSuperTypeOf($this);
        }
        return $otherType->isCallable()->and($otherType instanceof self ? TrinaryLogic::createYes() : TrinaryLogic::createMaybe());
    }
    public function isAcceptedBy(\PHPStan\Type\Type $acceptingType, bool $strictTypes) : TrinaryLogic
    {
        return $this->isAcceptedWithReasonBy($acceptingType, $strictTypes)->result;
    }
    public function isAcceptedWithReasonBy(\PHPStan\Type\Type $acceptingType, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        return new \PHPStan\Type\AcceptsResult($this->isSubTypeOf($acceptingType), []);
    }
    public function equals(\PHPStan\Type\Type $type) : bool
    {
        return $type instanceof self;
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        return $level->handle(static function () : string {
            return 'callable';
        }, function () : string {
            $printer = new Printer();
            $selfWithoutParameterNames = new self(array_map(static function (ParameterReflection $p) : ParameterReflection {
                return new DummyParameter('', $p->getType(), $p->isOptional() && !$p->isVariadic(), PassedByReference::createNo(), $p->isVariadic(), $p->getDefaultValue());
            }, $this->parameters), $this->returnType, $this->variadic);
            return $printer->print($selfWithoutParameterNames->toPhpDocNode());
        });
    }
    public function isCallable() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    /**
     * @return ParametersAcceptor[]
     */
    public function getCallableParametersAcceptors(ClassMemberAccessAnswerer $scope) : array
    {
        return [$this];
    }
    public function toNumber() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toString() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toInteger() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toFloat() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toArray() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ArrayType(new \PHPStan\Type\MixedType(), new \PHPStan\Type\MixedType());
    }
    public function toArrayKey() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function getTemplateTypeMap() : TemplateTypeMap
    {
        return TemplateTypeMap::createEmpty();
    }
    public function getResolvedTemplateTypeMap() : TemplateTypeMap
    {
        return TemplateTypeMap::createEmpty();
    }
    /**
     * @return array<int, ParameterReflection>
     */
    public function getParameters() : array
    {
        return $this->parameters;
    }
    public function isVariadic() : bool
    {
        return $this->variadic;
    }
    public function getReturnType() : \PHPStan\Type\Type
    {
        return $this->returnType;
    }
    public function inferTemplateTypes(\PHPStan\Type\Type $receivedType) : TemplateTypeMap
    {
        if ($receivedType instanceof \PHPStan\Type\UnionType || $receivedType instanceof \PHPStan\Type\IntersectionType) {
            return $receivedType->inferTemplateTypesOn($this);
        }
        if (!$receivedType->isCallable()->yes()) {
            return TemplateTypeMap::createEmpty();
        }
        $parametersAcceptors = $receivedType->getCallableParametersAcceptors(new OutOfClassScope());
        $typeMap = TemplateTypeMap::createEmpty();
        foreach ($parametersAcceptors as $parametersAcceptor) {
            $typeMap = $typeMap->union($this->inferTemplateTypesOnParametersAcceptor($parametersAcceptor));
        }
        return $typeMap;
    }
    private function inferTemplateTypesOnParametersAcceptor(ParametersAcceptor $parametersAcceptor) : TemplateTypeMap
    {
        $typeMap = TemplateTypeMap::createEmpty();
        $args = $parametersAcceptor->getParameters();
        $returnType = $parametersAcceptor->getReturnType();
        foreach ($this->getParameters() as $i => $param) {
            $paramType = $param->getType();
            if (isset($args[$i])) {
                $argType = $args[$i]->getType();
            } elseif ($paramType instanceof TemplateType) {
                $argType = TemplateTypeHelper::resolveToBounds($paramType);
            } else {
                $argType = new \PHPStan\Type\NeverType();
            }
            $typeMap = $typeMap->union($paramType->inferTemplateTypes($argType)->convertToLowerBoundTypes());
        }
        return $typeMap->union($this->getReturnType()->inferTemplateTypes($returnType));
    }
    public function getReferencedTemplateTypes(TemplateTypeVariance $positionVariance) : array
    {
        $references = $this->getReturnType()->getReferencedTemplateTypes($positionVariance->compose(TemplateTypeVariance::createCovariant()));
        $paramVariance = $positionVariance->compose(TemplateTypeVariance::createContravariant());
        foreach ($this->getParameters() as $param) {
            foreach ($param->getType()->getReferencedTemplateTypes($paramVariance) as $reference) {
                $references[] = $reference;
            }
        }
        return $references;
    }
    public function traverse(callable $cb) : \PHPStan\Type\Type
    {
        if ($this->isCommonCallable) {
            return $this;
        }
        $parameters = array_map(static function (ParameterReflection $param) use($cb) : NativeParameterReflection {
            $defaultValue = $param->getDefaultValue();
            return new NativeParameterReflection($param->getName(), $param->isOptional(), $cb($param->getType()), $param->passedByReference(), $param->isVariadic(), $defaultValue !== null ? $cb($defaultValue) : null);
        }, $this->getParameters());
        return new self($parameters, $cb($this->getReturnType()), $this->isVariadic());
    }
    public function traverseSimultaneously(\PHPStan\Type\Type $right, callable $cb) : \PHPStan\Type\Type
    {
        if ($this->isCommonCallable) {
            return $this;
        }
        if (!$right->isCallable()->yes()) {
            return $this;
        }
        $rightAcceptors = $right->getCallableParametersAcceptors(new OutOfClassScope());
        if (count($rightAcceptors) !== 1) {
            return $this;
        }
        $rightParameters = $rightAcceptors[0]->getParameters();
        if (count($this->getParameters()) !== count($rightParameters)) {
            return $this;
        }
        $parameters = [];
        foreach ($this->getParameters() as $i => $leftParam) {
            $rightParam = $rightParameters[$i];
            $leftDefaultValue = $leftParam->getDefaultValue();
            $rightDefaultValue = $rightParam->getDefaultValue();
            $defaultValue = $leftDefaultValue;
            if ($leftDefaultValue !== null && $rightDefaultValue !== null) {
                $defaultValue = $cb($leftDefaultValue, $rightDefaultValue);
            }
            $parameters[] = new NativeParameterReflection($leftParam->getName(), $leftParam->isOptional(), $cb($leftParam->getType(), $rightParam->getType()), $leftParam->passedByReference(), $leftParam->isVariadic(), $defaultValue);
        }
        return new self($parameters, $cb($this->getReturnType(), $rightAcceptors[0]->getReturnType()), $this->isVariadic());
    }
    public function isOversizedArray() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNull() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantScalarValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getConstantScalarTypes() : array
    {
        return [];
    }
    public function getConstantScalarValues() : array
    {
        return [];
    }
    public function isTrue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFalse() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isBoolean() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFloat() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isInteger() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isNumericString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isLiteralString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isClassStringType() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getClassStringObjectType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ObjectWithoutClassType();
    }
    public function getObjectTypeOrClassStringObjectType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ObjectWithoutClassType();
    }
    public function isVoid() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isScalar() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function looseCompare(\PHPStan\Type\Type $type, PhpVersion $phpVersion) : \PHPStan\Type\BooleanType
    {
        return new \PHPStan\Type\BooleanType();
    }
    public function getEnumCases() : array
    {
        return [];
    }
    public function isCommonCallable() : bool
    {
        return $this->isCommonCallable;
    }
    public function exponentiate(\PHPStan\Type\Type $exponent) : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toPhpDocNode() : TypeNode
    {
        if ($this->isCommonCallable) {
            return new IdentifierTypeNode('callable');
        }
        $parameters = [];
        foreach ($this->parameters as $parameter) {
            $parameters[] = new CallableTypeParameterNode($parameter->getType()->toPhpDocNode(), !$parameter->passedByReference()->no(), $parameter->isVariadic(), $parameter->getName() === '' ? '' : '$' . $parameter->getName(), $parameter->isOptional());
        }
        return new CallableTypeNode(new IdentifierTypeNode('callable'), $parameters, $this->returnType->toPhpDocNode());
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self((bool) $properties['isCommonCallable'] ? null : $properties['parameters'], (bool) $properties['isCommonCallable'] ? null : $properties['returnType'], $properties['variadic']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

interface SubtractableType extends \PHPStan\Type\Type
{
    public function subtract(\PHPStan\Type\Type $type) : \PHPStan\Type\Type;
    public function getTypeWithoutSubtractedType() : \PHPStan\Type\Type;
    public function changeSubtractedType(?\PHPStan\Type\Type $subtractedType) : \PHPStan\Type\Type;
    public function getSubtractedType() : ?\PHPStan\Type\Type;
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use ArrayAccess;
use Closure;
use Countable;
use DateTime;
use DateTimeImmutable;
use DateTimeInterface;
use Error;
use Exception;
use Iterator;
use IteratorAggregate;
use PHPStan\Analyser\OutOfClassScope;
use PHPStan\Broker\Broker;
use PHPStan\Broker\ClassNotFoundException;
use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\Reflection\ClassMemberAccessAnswerer;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ConstantReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Reflection\Php\UniversalObjectCratesClassReflectionExtension;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Reflection\ReflectionProviderStaticAccessor;
use PHPStan\Reflection\TrivialParametersAcceptor;
use PHPStan\Reflection\Type\CalledOnTypeUnresolvedMethodPrototypeReflection;
use PHPStan\Reflection\Type\CalledOnTypeUnresolvedPropertyPrototypeReflection;
use PHPStan\Reflection\Type\UnionTypeUnresolvedPropertyPrototypeReflection;
use PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection;
use PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\Enum\EnumCaseObjectType;
use PHPStan\Type\Generic\GenericObjectType;
use PHPStan\Type\Generic\TemplateTypeHelper;
use PHPStan\Type\Traits\MaybeIterableTypeTrait;
use PHPStan\Type\Traits\NonArrayTypeTrait;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use PHPStan\Type\Traits\NonGenericTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonTypeTrait;
use Throwable;
use Traversable;
use function array_key_exists;
use function array_map;
use function array_values;
use function count;
use function implode;
use function in_array;
use function sprintf;
use function strtolower;
/** @api */
class ObjectType implements \PHPStan\Type\TypeWithClassName, \PHPStan\Type\SubtractableType
{
    use MaybeIterableTypeTrait;
    use NonArrayTypeTrait;
    use NonGenericTypeTrait;
    use UndecidedComparisonTypeTrait;
    use NonGeneralizableTypeTrait;
    private const EXTRA_OFFSET_CLASSES = ['SimpleXMLElement', 'DOMNodeList', 'Threaded'];
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $subtractedType;
    /** @var array<string, array<string, TrinaryLogic>> */
    private static $superTypes = [];
    /**
     * @var \PHPStan\Type\ObjectType|null
     */
    private $cachedParent;
    /** @var self[]|null */
    private $cachedInterfaces;
    /** @var array<string, array<string, array<string, UnresolvedMethodPrototypeReflection>>> */
    private static $methods = [];
    /** @var array<string, array<string, array<string, UnresolvedPropertyPrototypeReflection>>> */
    private static $properties = [];
    /** @var array<string, array<string, self|null>> */
    private static $ancestors = [];
    /** @var array<string, self|null> */
    private $currentAncestors = [];
    /**
     * @var string|null
     */
    private $cachedDescription;
    /**
     * @var string
     */
    private $className;
    /**
     * @var \PHPStan\Reflection\ClassReflection|null
     */
    private $classReflection;
    /** @api */
    public function __construct(string $className, ?\PHPStan\Type\Type $subtractedType = null, ?ClassReflection $classReflection = null)
    {
        $this->className = $className;
        $this->classReflection = $classReflection;
        if ($subtractedType instanceof \PHPStan\Type\NeverType) {
            $subtractedType = null;
        }
        $this->subtractedType = $subtractedType;
    }
    public static function resetCaches() : void
    {
        self::$superTypes = [];
        self::$methods = [];
        self::$properties = [];
        self::$ancestors = [];
    }
    private static function createFromReflection(ClassReflection $reflection) : self
    {
        if (!$reflection->isGeneric()) {
            return new \PHPStan\Type\ObjectType($reflection->getName());
        }
        return new GenericObjectType($reflection->getName(), $reflection->typeMapToList($reflection->getActiveTemplateTypeMap()));
    }
    public function getClassName() : string
    {
        return $this->className;
    }
    public function hasProperty(string $propertyName) : TrinaryLogic
    {
        $classReflection = $this->getClassReflection();
        if ($classReflection === null) {
            return TrinaryLogic::createMaybe();
        }
        if ($classReflection->hasProperty($propertyName)) {
            return TrinaryLogic::createYes();
        }
        if ($classReflection->allowsDynamicProperties()) {
            return TrinaryLogic::createMaybe();
        }
        if (!$classReflection->isFinal()) {
            return TrinaryLogic::createMaybe();
        }
        return TrinaryLogic::createNo();
    }
    public function getProperty(string $propertyName, ClassMemberAccessAnswerer $scope) : PropertyReflection
    {
        return $this->getUnresolvedPropertyPrototype($propertyName, $scope)->getTransformedProperty();
    }
    public function getUnresolvedPropertyPrototype(string $propertyName, ClassMemberAccessAnswerer $scope) : UnresolvedPropertyPrototypeReflection
    {
        if (!$scope->isInClass()) {
            $canAccessProperty = 'no';
        } else {
            $canAccessProperty = $scope->getClassReflection()->getName();
        }
        $description = $this->describeCache();
        if (isset(self::$properties[$description][$propertyName][$canAccessProperty])) {
            return self::$properties[$description][$propertyName][$canAccessProperty];
        }
        $nakedClassReflection = $this->getNakedClassReflection();
        if ($nakedClassReflection === null) {
            throw new ClassNotFoundException($this->className);
        }
        if ($nakedClassReflection->isEnum()) {
            if ($propertyName === 'name' || $propertyName === 'value' && $nakedClassReflection->isBackedEnum()) {
                $properties = [];
                foreach ($this->getEnumCases() as $enumCase) {
                    $properties[] = $enumCase->getUnresolvedPropertyPrototype($propertyName, $scope);
                }
                if (count($properties) > 0) {
                    if (count($properties) === 1) {
                        return $properties[0];
                    }
                    return new UnionTypeUnresolvedPropertyPrototypeReflection($propertyName, $properties);
                }
            }
        }
        if (!$nakedClassReflection->hasNativeProperty($propertyName)) {
            $nakedClassReflection = $this->getClassReflection();
        }
        if ($nakedClassReflection === null) {
            throw new ClassNotFoundException($this->className);
        }
        $property = $nakedClassReflection->getProperty($propertyName, $scope);
        $ancestor = $this->getAncestorWithClassName($property->getDeclaringClass()->getName());
        $resolvedClassReflection = null;
        if ($ancestor !== null && $ancestor->hasProperty($propertyName)->yes()) {
            $resolvedClassReflection = $ancestor->getClassReflection();
            if ($ancestor !== $this) {
                $property = $ancestor->getUnresolvedPropertyPrototype($propertyName, $scope)->getNakedProperty();
            }
        }
        if ($resolvedClassReflection === null) {
            $resolvedClassReflection = $property->getDeclaringClass();
        }
        return self::$properties[$description][$propertyName][$canAccessProperty] = new CalledOnTypeUnresolvedPropertyPrototypeReflection($property, $resolvedClassReflection, \true, $this);
    }
    public function getPropertyWithoutTransformingStatic(string $propertyName, ClassMemberAccessAnswerer $scope) : PropertyReflection
    {
        $classReflection = $this->getNakedClassReflection();
        if ($classReflection === null) {
            throw new ClassNotFoundException($this->className);
        }
        if (!$classReflection->hasProperty($propertyName)) {
            $classReflection = $this->getClassReflection();
        }
        if ($classReflection === null) {
            throw new ClassNotFoundException($this->className);
        }
        return $classReflection->getProperty($propertyName, $scope);
    }
    /**
     * @return string[]
     */
    public function getReferencedClasses() : array
    {
        return [$this->className];
    }
    public function getObjectClassNames() : array
    {
        return [$this->className];
    }
    public function getObjectClassReflections() : array
    {
        $classReflection = $this->getClassReflection();
        if ($classReflection === null) {
            return [];
        }
        return [$classReflection];
    }
    public function accepts(\PHPStan\Type\Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(\PHPStan\Type\Type $type, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        if ($type instanceof \PHPStan\Type\StaticType) {
            return $this->checkSubclassAcceptability($type->getClassName());
        }
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        if ($type instanceof \PHPStan\Type\ClosureType) {
            return new \PHPStan\Type\AcceptsResult($this->isInstanceOf(Closure::class), []);
        }
        if ($type instanceof \PHPStan\Type\ObjectWithoutClassType) {
            return \PHPStan\Type\AcceptsResult::createMaybe();
        }
        $thatClassNames = $type->getObjectClassNames();
        if (count($thatClassNames) > 1) {
            throw new ShouldNotHappenException();
        }
        if ($thatClassNames === []) {
            return \PHPStan\Type\AcceptsResult::createNo();
        }
        return $this->checkSubclassAcceptability($thatClassNames[0]);
    }
    public function isSuperTypeOf(\PHPStan\Type\Type $type) : TrinaryLogic
    {
        $thatClassNames = $type->getObjectClassNames();
        if (!$type instanceof \PHPStan\Type\CompoundType && $thatClassNames === [] && !$type instanceof \PHPStan\Type\ObjectWithoutClassType) {
            return TrinaryLogic::createNo();
        }
        $thisDescription = $this->describeCache();
        if ($type instanceof self) {
            $description = $type->describeCache();
        } else {
            $description = $type->describe(\PHPStan\Type\VerbosityLevel::cache());
        }
        if (isset(self::$superTypes[$thisDescription][$description])) {
            return self::$superTypes[$thisDescription][$description];
        }
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return self::$superTypes[$thisDescription][$description] = $type->isSubTypeOf($this);
        }
        if ($type instanceof \PHPStan\Type\ClosureType) {
            return self::$superTypes[$thisDescription][$description] = $this->isInstanceOf(Closure::class);
        }
        if ($type instanceof \PHPStan\Type\ObjectWithoutClassType) {
            if ($type->getSubtractedType() !== null) {
                $isSuperType = $type->getSubtractedType()->isSuperTypeOf($this);
                if ($isSuperType->yes()) {
                    return self::$superTypes[$thisDescription][$description] = TrinaryLogic::createNo();
                }
            }
            return self::$superTypes[$thisDescription][$description] = TrinaryLogic::createMaybe();
        }
        $transformResult = static function (TrinaryLogic $result) {
            return $result;
        };
        if ($this->subtractedType !== null) {
            $isSuperType = $this->subtractedType->isSuperTypeOf($type);
            if ($isSuperType->yes()) {
                return self::$superTypes[$thisDescription][$description] = TrinaryLogic::createNo();
            }
            if ($isSuperType->maybe()) {
                $transformResult = static function (TrinaryLogic $result) {
                    return $result->and(TrinaryLogic::createMaybe());
                };
            }
        }
        if ($type instanceof \PHPStan\Type\SubtractableType && $type->getSubtractedType() !== null) {
            $isSuperType = $type->getSubtractedType()->isSuperTypeOf($this);
            if ($isSuperType->yes()) {
                return self::$superTypes[$thisDescription][$description] = TrinaryLogic::createNo();
            }
        }
        $thisClassName = $this->className;
        if (count($thatClassNames) > 1) {
            throw new ShouldNotHappenException();
        }
        if ($thatClassNames[0] === $thisClassName) {
            return $transformResult(TrinaryLogic::createYes());
        }
        $reflectionProvider = ReflectionProviderStaticAccessor::getInstance();
        if ($this->getClassReflection() === null || !$reflectionProvider->hasClass($thatClassNames[0])) {
            return self::$superTypes[$thisDescription][$description] = TrinaryLogic::createMaybe();
        }
        $thisClassReflection = $this->getClassReflection();
        $thatClassReflection = $reflectionProvider->getClass($thatClassNames[0]);
        if ($thisClassReflection->isTrait() || $thatClassReflection->isTrait()) {
            return TrinaryLogic::createNo();
        }
        if ($thisClassReflection->getName() === $thatClassReflection->getName()) {
            return self::$superTypes[$thisDescription][$description] = $transformResult(TrinaryLogic::createYes());
        }
        if ($thatClassReflection->isSubclassOf($thisClassName)) {
            return self::$superTypes[$thisDescription][$description] = $transformResult(TrinaryLogic::createYes());
        }
        if ($thisClassReflection->isSubclassOf($thatClassNames[0])) {
            return self::$superTypes[$thisDescription][$description] = TrinaryLogic::createMaybe();
        }
        if ($thisClassReflection->isInterface() && !$thatClassReflection->getNativeReflection()->isFinal()) {
            return self::$superTypes[$thisDescription][$description] = TrinaryLogic::createMaybe();
        }
        if ($thatClassReflection->isInterface() && !$thisClassReflection->getNativeReflection()->isFinal()) {
            return self::$superTypes[$thisDescription][$description] = TrinaryLogic::createMaybe();
        }
        return self::$superTypes[$thisDescription][$description] = TrinaryLogic::createNo();
    }
    public function equals(\PHPStan\Type\Type $type) : bool
    {
        if (!$type instanceof self) {
            return \false;
        }
        if ($type instanceof EnumCaseObjectType) {
            return \false;
        }
        if ($this->className !== $type->className) {
            return \false;
        }
        if ($this->subtractedType === null) {
            if ($type->subtractedType === null) {
                return \true;
            }
            return \false;
        }
        if ($type->subtractedType === null) {
            return \false;
        }
        return $this->subtractedType->equals($type->subtractedType);
    }
    private function checkSubclassAcceptability(string $thatClass) : \PHPStan\Type\AcceptsResult
    {
        if ($this->className === $thatClass) {
            return \PHPStan\Type\AcceptsResult::createYes();
        }
        $reflectionProvider = ReflectionProviderStaticAccessor::getInstance();
        if ($this->getClassReflection() === null || !$reflectionProvider->hasClass($thatClass)) {
            return \PHPStan\Type\AcceptsResult::createNo();
        }
        $thisReflection = $this->getClassReflection();
        $thatReflection = $reflectionProvider->getClass($thatClass);
        if ($thisReflection->getName() === $thatReflection->getName()) {
            // class alias
            return \PHPStan\Type\AcceptsResult::createYes();
        }
        if ($thisReflection->isInterface() && $thatReflection->isInterface()) {
            return \PHPStan\Type\AcceptsResult::createFromBoolean($thatReflection->implementsInterface($this->className));
        }
        return \PHPStan\Type\AcceptsResult::createFromBoolean($thatReflection->isSubclassOf($this->className));
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        $preciseNameCallback = function () : string {
            $reflectionProvider = ReflectionProviderStaticAccessor::getInstance();
            if (!$reflectionProvider->hasClass($this->className)) {
                return $this->className;
            }
            return $reflectionProvider->getClassName($this->className);
        };
        $preciseWithSubtracted = function () use($level) : string {
            $description = $this->className;
            if ($this->subtractedType !== null) {
                $description .= sprintf('~%s', $this->subtractedType->describe($level));
            }
            return $description;
        };
        return $level->handle($preciseNameCallback, $preciseNameCallback, $preciseWithSubtracted, function () use($preciseWithSubtracted) : string {
            $reflection = $this->classReflection;
            $line = '';
            if ($reflection !== null) {
                $line .= '-';
                $line .= (string) $reflection->getNativeReflection()->getStartLine();
                $line .= '-';
            }
            return $preciseWithSubtracted() . '-' . static::class . '-' . $line . $this->describeAdditionalCacheKey();
        });
    }
    protected function describeAdditionalCacheKey() : string
    {
        return '';
    }
    private function describeCache() : string
    {
        if ($this->cachedDescription !== null) {
            return $this->cachedDescription;
        }
        if (static::class !== self::class) {
            return $this->cachedDescription = $this->describe(\PHPStan\Type\VerbosityLevel::cache());
        }
        $description = $this->className;
        if ($this instanceof GenericObjectType) {
            $description .= '<';
            $typeDescriptions = [];
            foreach ($this->getTypes() as $type) {
                $typeDescriptions[] = $type->describe(\PHPStan\Type\VerbosityLevel::cache());
            }
            $description .= '<' . implode(', ', $typeDescriptions) . '>';
        }
        if ($this->subtractedType !== null) {
            $description .= sprintf('~%s', $this->subtractedType->describe(\PHPStan\Type\VerbosityLevel::cache()));
        }
        $reflection = $this->classReflection;
        if ($reflection !== null) {
            $description .= '-';
            $description .= (string) $reflection->getNativeReflection()->getStartLine();
            $description .= '-';
        }
        return $this->cachedDescription = $description;
    }
    public function toNumber() : \PHPStan\Type\Type
    {
        if ($this->isInstanceOf('SimpleXMLElement')->yes()) {
            return new \PHPStan\Type\UnionType([new \PHPStan\Type\FloatType(), new \PHPStan\Type\IntegerType()]);
        }
        return new \PHPStan\Type\ErrorType();
    }
    public function toInteger() : \PHPStan\Type\Type
    {
        if ($this->isInstanceOf('SimpleXMLElement')->yes()) {
            return new \PHPStan\Type\IntegerType();
        }
        if (in_array($this->getClassName(), ['CurlHandle', 'CurlMultiHandle'], \true)) {
            return new \PHPStan\Type\IntegerType();
        }
        return new \PHPStan\Type\ErrorType();
    }
    public function toFloat() : \PHPStan\Type\Type
    {
        if ($this->isInstanceOf('SimpleXMLElement')->yes()) {
            return new \PHPStan\Type\FloatType();
        }
        return new \PHPStan\Type\ErrorType();
    }
    public function toString() : \PHPStan\Type\Type
    {
        $classReflection = $this->getClassReflection();
        if ($classReflection === null) {
            return new \PHPStan\Type\ErrorType();
        }
        if ($classReflection->hasNativeMethod('__toString')) {
            return ParametersAcceptorSelector::selectSingle($this->getMethod('__toString', new OutOfClassScope())->getVariants())->getReturnType();
        }
        return new \PHPStan\Type\ErrorType();
    }
    public function toArray() : \PHPStan\Type\Type
    {
        $classReflection = $this->getClassReflection();
        if ($classReflection === null) {
            return new \PHPStan\Type\ArrayType(new \PHPStan\Type\MixedType(), new \PHPStan\Type\MixedType());
        }
        $reflectionProvider = ReflectionProviderStaticAccessor::getInstance();
        if (!$classReflection->getNativeReflection()->isUserDefined() || UniversalObjectCratesClassReflectionExtension::isUniversalObjectCrate($reflectionProvider, Broker::getInstance()->getUniversalObjectCratesClasses(), $classReflection)) {
            return new \PHPStan\Type\ArrayType(new \PHPStan\Type\MixedType(), new \PHPStan\Type\MixedType());
        }
        $arrayKeys = [];
        $arrayValues = [];
        $isFinal = $classReflection->isFinal();
        do {
            foreach ($classReflection->getNativeReflection()->getProperties() as $nativeProperty) {
                if ($nativeProperty->isStatic()) {
                    continue;
                }
                $declaringClass = $reflectionProvider->getClass($nativeProperty->getDeclaringClass()->getName());
                $property = $declaringClass->getNativeProperty($nativeProperty->getName());
                $keyName = $nativeProperty->getName();
                if ($nativeProperty->isPrivate()) {
                    $keyName = sprintf("\x00%s\x00%s", $declaringClass->getName(), $keyName);
                } elseif ($nativeProperty->isProtected()) {
                    $keyName = sprintf("\x00*\x00%s", $keyName);
                }
                $arrayKeys[] = new ConstantStringType($keyName);
                $arrayValues[] = $property->getReadableType();
            }
            $classReflection = $classReflection->getParentClass();
        } while ($classReflection !== null);
        if (!$isFinal && count($arrayKeys) === 0) {
            return new \PHPStan\Type\ArrayType(new \PHPStan\Type\MixedType(), new \PHPStan\Type\MixedType());
        }
        return new ConstantArrayType($arrayKeys, $arrayValues);
    }
    public function toArrayKey() : \PHPStan\Type\Type
    {
        return $this->toString();
    }
    public function toBoolean() : \PHPStan\Type\BooleanType
    {
        if ($this->isInstanceOf('SimpleXMLElement')->yes()) {
            return new \PHPStan\Type\BooleanType();
        }
        return new ConstantBooleanType(\true);
    }
    public function isObject() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isEnum() : TrinaryLogic
    {
        $classReflection = $this->getClassReflection();
        if ($classReflection === null) {
            return TrinaryLogic::createMaybe();
        }
        return TrinaryLogic::createFromBoolean($classReflection->isEnum());
    }
    public function canAccessProperties() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function canCallMethods() : TrinaryLogic
    {
        if (strtolower($this->className) === 'stdclass') {
            return TrinaryLogic::createNo();
        }
        return TrinaryLogic::createYes();
    }
    public function hasMethod(string $methodName) : TrinaryLogic
    {
        $classReflection = $this->getClassReflection();
        if ($classReflection === null) {
            return TrinaryLogic::createMaybe();
        }
        if ($classReflection->hasMethod($methodName)) {
            return TrinaryLogic::createYes();
        }
        if ($classReflection->isFinal()) {
            return TrinaryLogic::createNo();
        }
        return TrinaryLogic::createMaybe();
    }
    public function getMethod(string $methodName, ClassMemberAccessAnswerer $scope) : ExtendedMethodReflection
    {
        return $this->getUnresolvedMethodPrototype($methodName, $scope)->getTransformedMethod();
    }
    public function getUnresolvedMethodPrototype(string $methodName, ClassMemberAccessAnswerer $scope) : UnresolvedMethodPrototypeReflection
    {
        if (!$scope->isInClass()) {
            $canCallMethod = 'no';
        } else {
            $canCallMethod = $scope->getClassReflection()->getName();
        }
        $description = $this->describeCache();
        if (isset(self::$methods[$description][$methodName][$canCallMethod])) {
            return self::$methods[$description][$methodName][$canCallMethod];
        }
        $nakedClassReflection = $this->getNakedClassReflection();
        if ($nakedClassReflection === null) {
            throw new ClassNotFoundException($this->className);
        }
        if (!$nakedClassReflection->hasNativeMethod($methodName)) {
            $nakedClassReflection = $this->getClassReflection();
        }
        if ($nakedClassReflection === null) {
            throw new ClassNotFoundException($this->className);
        }
        $method = $nakedClassReflection->getMethod($methodName, $scope);
        $ancestor = $this->getAncestorWithClassName($method->getDeclaringClass()->getName());
        $resolvedClassReflection = null;
        if ($ancestor !== null) {
            $resolvedClassReflection = $ancestor->getClassReflection();
            if ($ancestor !== $this) {
                $method = $ancestor->getUnresolvedMethodPrototype($methodName, $scope)->getNakedMethod();
            }
        }
        if ($resolvedClassReflection === null) {
            $resolvedClassReflection = $method->getDeclaringClass();
        }
        return self::$methods[$description][$methodName][$canCallMethod] = new CalledOnTypeUnresolvedMethodPrototypeReflection($method, $resolvedClassReflection, \true, $this);
    }
    public function canAccessConstants() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function hasConstant(string $constantName) : TrinaryLogic
    {
        $class = $this->getClassReflection();
        if ($class === null) {
            return TrinaryLogic::createNo();
        }
        return TrinaryLogic::createFromBoolean($class->hasConstant($constantName));
    }
    public function getConstant(string $constantName) : ConstantReflection
    {
        $class = $this->getClassReflection();
        if ($class === null) {
            throw new ClassNotFoundException($this->className);
        }
        return $class->getConstant($constantName);
    }
    public function getTemplateType(string $ancestorClassName, string $templateTypeName) : \PHPStan\Type\Type
    {
        $classReflection = $this->getClassReflection();
        if ($classReflection === null) {
            return new \PHPStan\Type\ErrorType();
        }
        $ancestorClassReflection = $classReflection->getAncestorWithClassName($ancestorClassName);
        if ($ancestorClassReflection === null) {
            return new \PHPStan\Type\ErrorType();
        }
        $activeTemplateTypeMap = $ancestorClassReflection->getPossiblyIncompleteActiveTemplateTypeMap();
        $type = $activeTemplateTypeMap->getType($templateTypeName);
        if ($type === null) {
            return new \PHPStan\Type\ErrorType();
        }
        if ($type instanceof \PHPStan\Type\ErrorType) {
            $templateTypeMap = $ancestorClassReflection->getTemplateTypeMap();
            $templateType = $templateTypeMap->getType($templateTypeName);
            if ($templateType === null) {
                return $type;
            }
            $bound = TemplateTypeHelper::resolveToBounds($templateType);
            if ($bound instanceof \PHPStan\Type\MixedType && $bound->isExplicitMixed()) {
                return new \PHPStan\Type\MixedType(\false);
            }
            return $bound;
        }
        return $type;
    }
    public function getConstantStrings() : array
    {
        return [];
    }
    public function isIterable() : TrinaryLogic
    {
        return $this->isInstanceOf(Traversable::class);
    }
    public function isIterableAtLeastOnce() : TrinaryLogic
    {
        return $this->isInstanceOf(Traversable::class)->and(TrinaryLogic::createMaybe());
    }
    public function getArraySize() : \PHPStan\Type\Type
    {
        if ($this->isInstanceOf(Countable::class)->no()) {
            return new \PHPStan\Type\ErrorType();
        }
        return \PHPStan\Type\IntegerRangeType::fromInterval(0, null);
    }
    public function getIterableKeyType() : \PHPStan\Type\Type
    {
        $isTraversable = \false;
        if ($this->isInstanceOf(IteratorAggregate::class)->yes()) {
            $keyType = \PHPStan\Type\RecursionGuard::run($this, function () : \PHPStan\Type\Type {
                return ParametersAcceptorSelector::selectSingle($this->getMethod('getIterator', new OutOfClassScope())->getVariants())->getReturnType()->getIterableKeyType();
            });
            $isTraversable = \true;
            if (!$keyType instanceof \PHPStan\Type\MixedType || $keyType->isExplicitMixed()) {
                return $keyType;
            }
        }
        $extraOffsetAccessible = $this->isExtraOffsetAccessibleClass()->yes();
        if ($this->isInstanceOf(Traversable::class)->yes() && !$extraOffsetAccessible) {
            $isTraversable = \true;
            $tKey = $this->getTemplateType(Traversable::class, 'TKey');
            if (!$tKey instanceof \PHPStan\Type\ErrorType) {
                if (!$tKey instanceof \PHPStan\Type\MixedType || $tKey->isExplicitMixed()) {
                    return $tKey;
                }
            }
        }
        if ($this->isInstanceOf(Iterator::class)->yes()) {
            return \PHPStan\Type\RecursionGuard::run($this, function () : \PHPStan\Type\Type {
                return ParametersAcceptorSelector::selectSingle($this->getMethod('key', new OutOfClassScope())->getVariants())->getReturnType();
            });
        }
        if ($extraOffsetAccessible) {
            return new \PHPStan\Type\MixedType(\true);
        }
        if ($isTraversable) {
            return new \PHPStan\Type\MixedType();
        }
        return new \PHPStan\Type\ErrorType();
    }
    public function getFirstIterableKeyType() : \PHPStan\Type\Type
    {
        return $this->getIterableKeyType();
    }
    public function getLastIterableKeyType() : \PHPStan\Type\Type
    {
        return $this->getIterableKeyType();
    }
    public function getIterableValueType() : \PHPStan\Type\Type
    {
        $isTraversable = \false;
        if ($this->isInstanceOf(IteratorAggregate::class)->yes()) {
            $valueType = \PHPStan\Type\RecursionGuard::run($this, function () : \PHPStan\Type\Type {
                return ParametersAcceptorSelector::selectSingle($this->getMethod('getIterator', new OutOfClassScope())->getVariants())->getReturnType()->getIterableValueType();
            });
            $isTraversable = \true;
            if (!$valueType instanceof \PHPStan\Type\MixedType || $valueType->isExplicitMixed()) {
                return $valueType;
            }
        }
        $extraOffsetAccessible = $this->isExtraOffsetAccessibleClass()->yes();
        if ($this->isInstanceOf(Traversable::class)->yes() && !$extraOffsetAccessible) {
            $isTraversable = \true;
            $tValue = $this->getTemplateType(Traversable::class, 'TValue');
            if (!$tValue instanceof \PHPStan\Type\ErrorType) {
                if (!$tValue instanceof \PHPStan\Type\MixedType || $tValue->isExplicitMixed()) {
                    return $tValue;
                }
            }
        }
        if ($this->isInstanceOf(Iterator::class)->yes()) {
            return \PHPStan\Type\RecursionGuard::run($this, function () : \PHPStan\Type\Type {
                return ParametersAcceptorSelector::selectSingle($this->getMethod('current', new OutOfClassScope())->getVariants())->getReturnType();
            });
        }
        if ($extraOffsetAccessible) {
            return new \PHPStan\Type\MixedType(\true);
        }
        if ($isTraversable) {
            return new \PHPStan\Type\MixedType();
        }
        return new \PHPStan\Type\ErrorType();
    }
    public function getFirstIterableValueType() : \PHPStan\Type\Type
    {
        return $this->getIterableValueType();
    }
    public function getLastIterableValueType() : \PHPStan\Type\Type
    {
        return $this->getIterableValueType();
    }
    public function isNull() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantScalarValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getConstantScalarTypes() : array
    {
        return [];
    }
    public function getConstantScalarValues() : array
    {
        return [];
    }
    public function isTrue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFalse() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isBoolean() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFloat() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isInteger() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNumericString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isLiteralString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isClassStringType() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getClassStringObjectType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function getObjectTypeOrClassStringObjectType() : \PHPStan\Type\Type
    {
        return $this;
    }
    public function isVoid() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isScalar() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function looseCompare(\PHPStan\Type\Type $type, PhpVersion $phpVersion) : \PHPStan\Type\BooleanType
    {
        if ($type->isTrue()->yes()) {
            return new ConstantBooleanType(\true);
        }
        return $type->isFalse()->yes() ? new ConstantBooleanType(\false) : new \PHPStan\Type\BooleanType();
    }
    private function isExtraOffsetAccessibleClass() : TrinaryLogic
    {
        $classReflection = $this->getClassReflection();
        if ($classReflection === null) {
            return TrinaryLogic::createMaybe();
        }
        foreach (self::EXTRA_OFFSET_CLASSES as $extraOffsetClass) {
            if ($classReflection->getName() === $extraOffsetClass) {
                return TrinaryLogic::createYes();
            }
            if ($classReflection->isSubclassOf($extraOffsetClass)) {
                return TrinaryLogic::createYes();
            }
        }
        if ($classReflection->isInterface()) {
            return TrinaryLogic::createMaybe();
        }
        if ($classReflection->isFinal()) {
            return TrinaryLogic::createNo();
        }
        return TrinaryLogic::createMaybe();
    }
    public function isOffsetAccessible() : TrinaryLogic
    {
        return $this->isInstanceOf(ArrayAccess::class)->or($this->isExtraOffsetAccessibleClass());
    }
    public function hasOffsetValueType(\PHPStan\Type\Type $offsetType) : TrinaryLogic
    {
        if ($this->isInstanceOf(ArrayAccess::class)->yes()) {
            $acceptedOffsetType = \PHPStan\Type\RecursionGuard::run($this, function () : \PHPStan\Type\Type {
                $parameters = ParametersAcceptorSelector::selectSingle($this->getMethod('offsetSet', new OutOfClassScope())->getVariants())->getParameters();
                if (count($parameters) < 2) {
                    throw new ShouldNotHappenException(sprintf('Method %s::%s() has less than 2 parameters.', $this->className, 'offsetSet'));
                }
                $offsetParameter = $parameters[0];
                return $offsetParameter->getType();
            });
            if ($acceptedOffsetType->isSuperTypeOf($offsetType)->no()) {
                return TrinaryLogic::createNo();
            }
            return TrinaryLogic::createMaybe();
        }
        return $this->isExtraOffsetAccessibleClass()->and(TrinaryLogic::createMaybe());
    }
    public function getOffsetValueType(\PHPStan\Type\Type $offsetType) : \PHPStan\Type\Type
    {
        if (!$this->isExtraOffsetAccessibleClass()->no()) {
            return new \PHPStan\Type\MixedType();
        }
        if ($this->isInstanceOf(ArrayAccess::class)->yes()) {
            return \PHPStan\Type\RecursionGuard::run($this, function () : \PHPStan\Type\Type {
                return ParametersAcceptorSelector::selectSingle($this->getMethod('offsetGet', new OutOfClassScope())->getVariants())->getReturnType();
            });
        }
        return new \PHPStan\Type\ErrorType();
    }
    public function setOffsetValueType(?\PHPStan\Type\Type $offsetType, \PHPStan\Type\Type $valueType, bool $unionValues = \true) : \PHPStan\Type\Type
    {
        if ($this->isOffsetAccessible()->no()) {
            return new \PHPStan\Type\ErrorType();
        }
        if ($this->isInstanceOf(ArrayAccess::class)->yes()) {
            $acceptedValueType = new \PHPStan\Type\NeverType();
            $acceptedOffsetType = \PHPStan\Type\RecursionGuard::run($this, function () use(&$acceptedValueType) : \PHPStan\Type\Type {
                $parameters = ParametersAcceptorSelector::selectSingle($this->getMethod('offsetSet', new OutOfClassScope())->getVariants())->getParameters();
                if (count($parameters) < 2) {
                    throw new ShouldNotHappenException(sprintf('Method %s::%s() has less than 2 parameters.', $this->className, 'offsetSet'));
                }
                $offsetParameter = $parameters[0];
                $acceptedValueType = $parameters[1]->getType();
                return $offsetParameter->getType();
            });
            if ($offsetType === null) {
                $offsetType = new \PHPStan\Type\NullType();
            }
            if (!$offsetType instanceof \PHPStan\Type\MixedType && !$acceptedOffsetType->isSuperTypeOf($offsetType)->yes() || !$valueType instanceof \PHPStan\Type\MixedType && !$acceptedValueType->isSuperTypeOf($valueType)->yes()) {
                return new \PHPStan\Type\ErrorType();
            }
        }
        // in the future we may return intersection of $this and OffsetAccessibleType()
        return $this;
    }
    public function unsetOffset(\PHPStan\Type\Type $offsetType) : \PHPStan\Type\Type
    {
        if ($this->isOffsetAccessible()->no()) {
            return new \PHPStan\Type\ErrorType();
        }
        return $this;
    }
    public function getEnumCases() : array
    {
        $classReflection = $this->getClassReflection();
        if ($classReflection === null) {
            return [];
        }
        if (!$classReflection->isEnum()) {
            return [];
        }
        $subtracted = [];
        if ($this->subtractedType !== null) {
            foreach ($this->subtractedType->getEnumCases() as $enumCase) {
                $subtracted[$enumCase->getEnumCaseName()] = \true;
            }
        }
        $cases = [];
        foreach ($classReflection->getEnumCases() as $enumCase) {
            if (array_key_exists($enumCase->getName(), $subtracted)) {
                continue;
            }
            $cases[] = new EnumCaseObjectType($classReflection->getName(), $enumCase->getName(), $classReflection);
        }
        return $cases;
    }
    public function isCallable() : TrinaryLogic
    {
        $parametersAcceptors = $this->findCallableParametersAcceptors();
        if ($parametersAcceptors === null) {
            return TrinaryLogic::createNo();
        }
        if (count($parametersAcceptors) === 1 && $parametersAcceptors[0] instanceof TrivialParametersAcceptor) {
            return TrinaryLogic::createMaybe();
        }
        return TrinaryLogic::createYes();
    }
    /**
     * @return ParametersAcceptor[]
     */
    public function getCallableParametersAcceptors(ClassMemberAccessAnswerer $scope) : array
    {
        if ($this->className === Closure::class) {
            return [new TrivialParametersAcceptor()];
        }
        $parametersAcceptors = $this->findCallableParametersAcceptors();
        if ($parametersAcceptors === null) {
            throw new ShouldNotHappenException();
        }
        return $parametersAcceptors;
    }
    /**
     * @return ParametersAcceptor[]|null
     */
    private function findCallableParametersAcceptors() : ?array
    {
        $classReflection = $this->getClassReflection();
        if ($classReflection === null) {
            return [new TrivialParametersAcceptor()];
        }
        if ($classReflection->hasNativeMethod('__invoke')) {
            return $this->getMethod('__invoke', new OutOfClassScope())->getVariants();
        }
        if (!$classReflection->getNativeReflection()->isFinal()) {
            return [new TrivialParametersAcceptor()];
        }
        return null;
    }
    public function isCloneable() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self($properties['className'], $properties['subtractedType'] ?? null);
    }
    public function isInstanceOf(string $className) : TrinaryLogic
    {
        $classReflection = $this->getClassReflection();
        if ($classReflection === null) {
            return TrinaryLogic::createMaybe();
        }
        if ($classReflection->isSubclassOf($className) || $classReflection->getName() === $className) {
            return TrinaryLogic::createYes();
        }
        $reflectionProvider = ReflectionProviderStaticAccessor::getInstance();
        if ($reflectionProvider->hasClass($className)) {
            $thatClassReflection = $reflectionProvider->getClass($className);
            if ($thatClassReflection->isFinal()) {
                return TrinaryLogic::createNo();
            }
        }
        if ($classReflection->isInterface()) {
            return TrinaryLogic::createMaybe();
        }
        return TrinaryLogic::createNo();
    }
    public function subtract(\PHPStan\Type\Type $type) : \PHPStan\Type\Type
    {
        if ($this->subtractedType !== null) {
            $type = \PHPStan\Type\TypeCombinator::union($this->subtractedType, $type);
        }
        return $this->changeSubtractedType($type);
    }
    public function getTypeWithoutSubtractedType() : \PHPStan\Type\Type
    {
        return $this->changeSubtractedType(null);
    }
    public function changeSubtractedType(?\PHPStan\Type\Type $subtractedType) : \PHPStan\Type\Type
    {
        if ($subtractedType !== null) {
            $classReflection = $this->getClassReflection();
            $allowedSubTypesList = $classReflection !== null ? $classReflection->getAllowedSubTypes() : null;
            if ($allowedSubTypesList !== null) {
                $allowedSubTypes = [];
                foreach ($allowedSubTypesList as $allowedSubType) {
                    $allowedSubTypes[$allowedSubType->describe(\PHPStan\Type\VerbosityLevel::precise())] = $allowedSubType;
                }
                $originalAllowedSubTypes = $allowedSubTypes;
                $subtractedSubTypes = [];
                $subtractedTypesList = \PHPStan\Type\TypeUtils::flattenTypes($subtractedType);
                $subtractedTypes = [];
                foreach ($subtractedTypesList as $type) {
                    $subtractedTypes[$type->describe(\PHPStan\Type\VerbosityLevel::precise())] = $type;
                }
                foreach ($subtractedTypes as $subType) {
                    foreach ($allowedSubTypes as $description => $allowedSubType) {
                        if ($subType->equals($allowedSubType)) {
                            $subtractedSubTypes[$description] = $subType;
                            unset($allowedSubTypes[$description]);
                            continue 2;
                        }
                    }
                    return new self($this->className, $subtractedType);
                }
                if (count($allowedSubTypes) === 1) {
                    return array_values($allowedSubTypes)[0];
                }
                $subtractedSubTypes = array_values($subtractedSubTypes);
                $subtractedSubTypesCount = count($subtractedSubTypes);
                if ($subtractedSubTypesCount === count($originalAllowedSubTypes)) {
                    return new \PHPStan\Type\NeverType();
                }
                if ($subtractedSubTypesCount === 0) {
                    return new self($this->className);
                }
                if ($subtractedSubTypesCount === 1) {
                    return new self($this->className, $subtractedSubTypes[0]);
                }
                return new self($this->className, new \PHPStan\Type\UnionType($subtractedSubTypes));
            }
        }
        if ($this->subtractedType === null && $subtractedType === null) {
            return $this;
        }
        return new self($this->className, $subtractedType);
    }
    public function getSubtractedType() : ?\PHPStan\Type\Type
    {
        return $this->subtractedType;
    }
    public function traverse(callable $cb) : \PHPStan\Type\Type
    {
        $subtractedType = $this->subtractedType !== null ? $cb($this->subtractedType) : null;
        if ($subtractedType !== $this->subtractedType) {
            return new self($this->className, $subtractedType);
        }
        return $this;
    }
    public function traverseSimultaneously(\PHPStan\Type\Type $right, callable $cb) : \PHPStan\Type\Type
    {
        if ($this->subtractedType === null) {
            return $this;
        }
        return new self($this->className);
    }
    public function getNakedClassReflection() : ?ClassReflection
    {
        if ($this->classReflection !== null) {
            return $this->classReflection;
        }
        $reflectionProvider = ReflectionProviderStaticAccessor::getInstance();
        if (!$reflectionProvider->hasClass($this->className)) {
            return null;
        }
        return $reflectionProvider->getClass($this->className);
    }
    public function getClassReflection() : ?ClassReflection
    {
        if ($this->classReflection !== null) {
            return $this->classReflection;
        }
        $reflectionProvider = ReflectionProviderStaticAccessor::getInstance();
        if (!$reflectionProvider->hasClass($this->className)) {
            return null;
        }
        $classReflection = $reflectionProvider->getClass($this->className);
        if ($classReflection->isGeneric()) {
            return $classReflection->withTypes(array_values($classReflection->getTemplateTypeMap()->map(static function () : \PHPStan\Type\Type {
                return new \PHPStan\Type\ErrorType();
            })->getTypes()));
        }
        return $classReflection;
    }
    /**
     * @return self|null
     */
    public function getAncestorWithClassName(string $className) : ?\PHPStan\Type\TypeWithClassName
    {
        if ($this->className === $className) {
            return $this;
        }
        if ($this->classReflection !== null && $className === $this->classReflection->getName()) {
            return $this;
        }
        if (array_key_exists($className, $this->currentAncestors)) {
            return $this->currentAncestors[$className];
        }
        $description = $this->describeCache();
        if (array_key_exists($description, self::$ancestors) && array_key_exists($className, self::$ancestors[$description])) {
            return self::$ancestors[$description][$className];
        }
        $reflectionProvider = ReflectionProviderStaticAccessor::getInstance();
        if (!$reflectionProvider->hasClass($className)) {
            return self::$ancestors[$description][$className] = $this->currentAncestors[$className] = null;
        }
        $theirReflection = $reflectionProvider->getClass($className);
        $thisReflection = $this->getClassReflection();
        if ($thisReflection === null) {
            return self::$ancestors[$description][$className] = $this->currentAncestors[$className] = null;
        }
        if ($theirReflection->getName() === $thisReflection->getName()) {
            return self::$ancestors[$description][$className] = $this->currentAncestors[$className] = $this;
        }
        foreach ($this->getInterfaces() as $interface) {
            $ancestor = $interface->getAncestorWithClassName($className);
            if ($ancestor !== null) {
                return self::$ancestors[$description][$className] = $this->currentAncestors[$className] = $ancestor;
            }
        }
        $parent = $this->getParent();
        if ($parent !== null) {
            $ancestor = $parent->getAncestorWithClassName($className);
            if ($ancestor !== null) {
                return self::$ancestors[$description][$className] = $this->currentAncestors[$className] = $ancestor;
            }
        }
        return self::$ancestors[$description][$className] = $this->currentAncestors[$className] = null;
    }
    private function getParent() : ?\PHPStan\Type\ObjectType
    {
        if ($this->cachedParent !== null) {
            return $this->cachedParent;
        }
        $thisReflection = $this->getClassReflection();
        if ($thisReflection === null) {
            return null;
        }
        $parentReflection = $thisReflection->getParentClass();
        if ($parentReflection === null) {
            return null;
        }
        return $this->cachedParent = self::createFromReflection($parentReflection);
    }
    /** @return ObjectType[] */
    private function getInterfaces() : array
    {
        if ($this->cachedInterfaces !== null) {
            return $this->cachedInterfaces;
        }
        $thisReflection = $this->getClassReflection();
        if ($thisReflection === null) {
            return $this->cachedInterfaces = [];
        }
        return $this->cachedInterfaces = array_map(static function (ClassReflection $interfaceReflection) : self {
            return self::createFromReflection($interfaceReflection);
        }, $thisReflection->getInterfaces());
    }
    public function tryRemove(\PHPStan\Type\Type $typeToRemove) : ?\PHPStan\Type\Type
    {
        if ($this->getClassName() === DateTimeInterface::class) {
            if ($typeToRemove instanceof \PHPStan\Type\ObjectType && $typeToRemove->getClassName() === DateTimeImmutable::class) {
                return new \PHPStan\Type\ObjectType(DateTime::class);
            }
            if ($typeToRemove instanceof \PHPStan\Type\ObjectType && $typeToRemove->getClassName() === DateTime::class) {
                return new \PHPStan\Type\ObjectType(DateTimeImmutable::class);
            }
        }
        if ($this->getClassName() === Throwable::class) {
            if ($typeToRemove instanceof \PHPStan\Type\ObjectType && $typeToRemove->getClassName() === Error::class) {
                return new \PHPStan\Type\ObjectType(Exception::class);
                // phpcs:ignore SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly.ReferencedGeneralException
            }
            if ($typeToRemove instanceof \PHPStan\Type\ObjectType && $typeToRemove->getClassName() === Exception::class) {
                // phpcs:ignore SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly.ReferencedGeneralException
                return new \PHPStan\Type\ObjectType(Error::class);
            }
        }
        if ($this->isSuperTypeOf($typeToRemove)->yes()) {
            return $this->subtract($typeToRemove);
        }
        return null;
    }
    public function exponentiate(\PHPStan\Type\Type $exponent) : \PHPStan\Type\Type
    {
        $object = new \PHPStan\Type\ObjectWithoutClassType();
        if (!$exponent instanceof \PHPStan\Type\NeverType && !$object->isSuperTypeOf($this)->no() && !$object->isSuperTypeOf($exponent)->no()) {
            return \PHPStan\Type\TypeCombinator::union($this, $exponent);
        }
        return new \PHPStan\Type\ErrorType();
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode($this->getClassName());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
/**
 * This is the interface dynamic return type extensions implement for non-static methods.
 *
 * To register it in the configuration file use the `phpstan.broker.dynamicMethodReturnTypeExtension` service tag:
 *
 * ```
 * services:
 * 	-
 *		class: App\PHPStan\MyExtension
 *		tags:
 *			- phpstan.broker.dynamicMethodReturnTypeExtension
 * ```
 *
 * Learn more: https://phpstan.org/developing-extensions/dynamic-return-type-extensions
 *
 * @api
 */
interface DynamicMethodReturnTypeExtension
{
    public function getClass() : string;
    public function isMethodSupported(MethodReflection $methodReflection) : bool;
    public function getTypeFromMethodCall(MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope) : ?\PHPStan\Type\Type;
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

class SimultaneousTypeTraverser
{
    /** @var callable(Type $left, Type $right, callable(Type, Type): Type $traverse): Type */
    private $cb;
    /**
     * @param callable(Type $left, Type $right, callable(Type, Type): Type $traverse): Type $cb
     */
    public static function map(\PHPStan\Type\Type $left, \PHPStan\Type\Type $right, callable $cb) : \PHPStan\Type\Type
    {
        $self = new self($cb);
        return $self->mapInternal($left, $right);
    }
    /** @param callable(Type $left, Type $right, callable(Type, Type): Type $traverse): Type $cb */
    private function __construct(callable $cb)
    {
        $this->cb = $cb;
    }
    /** @internal */
    public function mapInternal(\PHPStan\Type\Type $left, \PHPStan\Type\Type $right) : \PHPStan\Type\Type
    {
        return ($this->cb)($left, $right, [$this, 'traverseInternal']);
    }
    /** @internal */
    public function traverseInternal(\PHPStan\Type\Type $left, \PHPStan\Type\Type $right) : \PHPStan\Type\Type
    {
        return $left->traverseSimultaneously($right, [$this, 'mapInternal']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\TrinaryLogic;
use function array_merge;
use function sprintf;
class CallableTypeHelper
{
    public static function isParametersAcceptorSuperTypeOf(ParametersAcceptor $ours, ParametersAcceptor $theirs, bool $treatMixedAsAny) : \PHPStan\Type\AcceptsResult
    {
        $theirParameters = $theirs->getParameters();
        $ourParameters = $ours->getParameters();
        $result = null;
        foreach ($theirParameters as $i => $theirParameter) {
            $parameterDescription = $theirParameter->getName() === '' ? sprintf('#%d', $i + 1) : sprintf('#%d $%s', $i + 1, $theirParameter->getName());
            if (!isset($ourParameters[$i])) {
                if ($theirParameter->isOptional()) {
                    continue;
                }
                $accepts = new \PHPStan\Type\AcceptsResult(TrinaryLogic::createNo(), [sprintf('Parameter %s of passed callable is required but accepting callable does not have that parameter. It will be called without it.', $parameterDescription)]);
                if ($result === null) {
                    $result = $accepts;
                } else {
                    $result = $result->and($accepts);
                }
                continue;
            }
            $ourParameter = $ourParameters[$i];
            $ourParameterType = $ourParameter->getType();
            if ($ourParameter->isOptional() && !$theirParameter->isOptional()) {
                $accepts = new \PHPStan\Type\AcceptsResult(TrinaryLogic::createNo(), [sprintf('Parameter %s of passed callable is required but the parameter of accepting callable is optional. It might be called without it.', $parameterDescription)]);
                if ($result === null) {
                    $result = $accepts;
                } else {
                    $result = $result->and($accepts);
                }
            }
            if ($treatMixedAsAny) {
                $isSuperType = $theirParameter->getType()->acceptsWithReason($ourParameterType, \true);
            } else {
                $isSuperType = new \PHPStan\Type\AcceptsResult($theirParameter->getType()->isSuperTypeOf($ourParameterType), []);
            }
            if ($isSuperType->maybe()) {
                $verbosity = \PHPStan\Type\VerbosityLevel::getRecommendedLevelByType($theirParameter->getType(), $ourParameterType);
                $isSuperType = new \PHPStan\Type\AcceptsResult($isSuperType->result, array_merge($isSuperType->reasons, [sprintf('Type %s of parameter %s of passed callable needs to be same or wider than parameter type %s of accepting callable.', $theirParameter->getType()->describe($verbosity), $parameterDescription, $ourParameterType->describe($verbosity))]));
            }
            if ($result === null) {
                $result = $isSuperType;
            } else {
                $result = $result->and($isSuperType);
            }
        }
        $theirReturnType = $theirs->getReturnType();
        if ($treatMixedAsAny) {
            $isReturnTypeSuperType = $ours->getReturnType()->acceptsWithReason($theirReturnType, \true);
        } else {
            $isReturnTypeSuperType = new \PHPStan\Type\AcceptsResult($ours->getReturnType()->isSuperTypeOf($theirReturnType), []);
        }
        if ($result === null) {
            $result = $isReturnTypeSuperType;
        } else {
            $result = $result->and($isReturnTypeSuperType);
        }
        return $result;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantFloatType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\Enum\EnumCaseObjectType;
use UnitEnum;
use function count;
use function function_exists;
use function get_class;
use function is_array;
use function is_bool;
use function is_float;
use function is_int;
use function is_nan;
use function is_object;
use function is_string;
/** @api */
class ConstantTypeHelper
{
    /**
     * @deprecated Use PHPStan\Reflection\InitializerExprTypeResolver
     * @param mixed $value
     */
    public static function getTypeFromValue($value) : \PHPStan\Type\Type
    {
        if (is_int($value)) {
            return new ConstantIntegerType($value);
        } elseif (is_float($value)) {
            if (is_nan($value)) {
                return new \PHPStan\Type\MixedType();
            }
            return new ConstantFloatType($value);
        } elseif (is_bool($value)) {
            return new ConstantBooleanType($value);
        } elseif ($value === null) {
            return new \PHPStan\Type\NullType();
        } elseif (is_string($value)) {
            return new ConstantStringType($value);
        } elseif (is_array($value)) {
            $arrayBuilder = ConstantArrayTypeBuilder::createEmpty();
            if (count($value) > ConstantArrayTypeBuilder::ARRAY_COUNT_LIMIT) {
                $arrayBuilder->degradeToGeneralArray(\true);
            }
            foreach ($value as $k => $v) {
                $arrayBuilder->setOffsetValueType(self::getTypeFromValue($k), self::getTypeFromValue($v));
            }
            return $arrayBuilder->getArray();
        } elseif (is_object($value)) {
            $class = get_class($value);
            /** phpcs:disable SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFullyQualifiedName */
            if (function_exists('enum_exists') && \enum_exists($class)) {
                /** @var UnitEnum $value */
                return new EnumCaseObjectType($class, $value->name);
            }
            /** phpcs:enable */
            return new \PHPStan\Type\ObjectType(get_class($value));
        }
        return new \PHPStan\Type\MixedType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Constant;

use _PHPStan_dcc7b7cff\Nette\Utils\RegexpException;
use _PHPStan_dcc7b7cff\Nette\Utils\Strings;
use PhpParser\Node\Name;
use PHPStan\PhpDocParser\Ast\ConstExpr\QuoteAwareConstExprStringNode;
use PHPStan\PhpDocParser\Ast\Type\ConstTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\Reflection\ClassMemberAccessAnswerer;
use PHPStan\Reflection\ConstantReflection;
use PHPStan\Reflection\InaccessibleMethod;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\Reflection\ReflectionProviderStaticAccessor;
use PHPStan\Reflection\TrivialParametersAcceptor;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Accessory\AccessoryLiteralStringType;
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
use PHPStan\Type\Accessory\AccessoryNonFalsyStringType;
use PHPStan\Type\ClassStringType;
use PHPStan\Type\CompoundType;
use PHPStan\Type\ConstantScalarType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\GeneralizePrecision;
use PHPStan\Type\Generic\GenericClassStringType;
use PHPStan\Type\Generic\TemplateType;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\MixedType;
use PHPStan\Type\NullType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\StaticType;
use PHPStan\Type\StringType;
use PHPStan\Type\Traits\ConstantScalarTypeTrait;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\VerbosityLevel;
use function addcslashes;
use function is_float;
use function is_int;
use function is_numeric;
use function key;
use function strlen;
use function substr;
use function substr_count;
/** @api */
class ConstantStringType extends StringType implements ConstantScalarType
{
    private const DESCRIBE_LIMIT = 20;
    use ConstantScalarTypeTrait;
    use \PHPStan\Type\Constant\ConstantScalarToBooleanTrait;
    /**
     * @var \PHPStan\Type\ObjectType|null
     */
    private $objectType;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $arrayKeyType;
    /**
     * @var string
     */
    private $value;
    /**
     * @var bool
     */
    private $isClassString = \false;
    /** @api */
    public function __construct(string $value, bool $isClassString = \false)
    {
        $this->value = $value;
        $this->isClassString = $isClassString;
        parent::__construct();
    }
    public function getValue() : string
    {
        return $this->value;
    }
    public function getConstantStrings() : array
    {
        return [$this];
    }
    public function isClassStringType() : TrinaryLogic
    {
        if ($this->isClassString) {
            return TrinaryLogic::createYes();
        }
        $reflectionProvider = ReflectionProviderStaticAccessor::getInstance();
        return TrinaryLogic::createFromBoolean($reflectionProvider->hasClass($this->value));
    }
    public function getClassStringObjectType() : Type
    {
        if ($this->isClassStringType()->yes()) {
            return new ObjectType($this->value);
        }
        return new ErrorType();
    }
    public function getObjectTypeOrClassStringObjectType() : Type
    {
        return $this->getClassStringObjectType();
    }
    /**
     * @deprecated use isClassStringType() instead
     */
    public function isClassString() : bool
    {
        return $this->isClassStringType()->yes();
    }
    public function describe(VerbosityLevel $level) : string
    {
        return $level->handle(static function () : string {
            return 'string';
        }, function () : string {
            $value = $this->value;
            if (!$this->isClassString) {
                try {
                    $value = Strings::truncate($value, self::DESCRIBE_LIMIT);
                } catch (RegexpException $exception) {
                    $value = substr($value, 0, self::DESCRIBE_LIMIT) . "…";
                }
            }
            return self::export($value);
        }, function () : string {
            return self::export($this->value);
        });
    }
    private function export(string $value) : string
    {
        if (Strings::match($value, '([\\000-\\037])') !== null) {
            return '"' . addcslashes($value, "\x00..\x1f\\\"") . '"';
        }
        return "'" . addcslashes($value, '\\\'') . "'";
    }
    public function isSuperTypeOf(Type $type) : TrinaryLogic
    {
        if ($type instanceof GenericClassStringType) {
            $genericType = $type->getGenericType();
            if ($genericType instanceof MixedType) {
                return TrinaryLogic::createMaybe();
            }
            if ($genericType instanceof StaticType) {
                $genericType = $genericType->getStaticObjectType();
            }
            // We are transforming constant class-string to ObjectType. But we need to filter out
            // an uncertainty originating in possible ObjectType's class subtypes.
            $objectType = $this->getObjectType();
            // Do not use TemplateType's isSuperTypeOf handling directly because it takes ObjectType
            // uncertainty into account.
            if ($genericType instanceof TemplateType) {
                $isSuperType = $genericType->getBound()->isSuperTypeOf($objectType);
            } else {
                $isSuperType = $genericType->isSuperTypeOf($objectType);
            }
            // Explicitly handle the uncertainty for Yes & Maybe.
            if ($isSuperType->yes()) {
                return TrinaryLogic::createMaybe();
            }
            return TrinaryLogic::createNo();
        }
        if ($type instanceof ClassStringType) {
            return $this->isClassStringType()->yes() ? TrinaryLogic::createMaybe() : TrinaryLogic::createNo();
        }
        if ($type instanceof self) {
            return $this->value === $type->value ? TrinaryLogic::createYes() : TrinaryLogic::createNo();
        }
        if ($type instanceof parent) {
            return TrinaryLogic::createMaybe();
        }
        if ($type instanceof CompoundType) {
            return $type->isSubTypeOf($this);
        }
        return TrinaryLogic::createNo();
    }
    public function isCallable() : TrinaryLogic
    {
        if ($this->value === '') {
            return TrinaryLogic::createNo();
        }
        $reflectionProvider = ReflectionProviderStaticAccessor::getInstance();
        // 'my_function'
        if ($reflectionProvider->hasFunction(new Name($this->value), null)) {
            return TrinaryLogic::createYes();
        }
        // 'MyClass::myStaticFunction'
        $matches = Strings::match($this->value, '#^([a-zA-Z_\\x7f-\\xff\\\\][a-zA-Z0-9_\\x7f-\\xff\\\\]*)::([a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)\\z#');
        if ($matches !== null) {
            if (!$reflectionProvider->hasClass($matches[1])) {
                return TrinaryLogic::createMaybe();
            }
            $classRef = $reflectionProvider->getClass($matches[1]);
            if ($classRef->hasMethod($matches[2])) {
                return TrinaryLogic::createYes();
            }
            if (!$classRef->getNativeReflection()->isFinal()) {
                return TrinaryLogic::createMaybe();
            }
            return TrinaryLogic::createNo();
        }
        return TrinaryLogic::createNo();
    }
    /**
     * @return ParametersAcceptor[]
     */
    public function getCallableParametersAcceptors(ClassMemberAccessAnswerer $scope) : array
    {
        $reflectionProvider = ReflectionProviderStaticAccessor::getInstance();
        // 'my_function'
        $functionName = new Name($this->value);
        if ($reflectionProvider->hasFunction($functionName, null)) {
            return $reflectionProvider->getFunction($functionName, null)->getVariants();
        }
        // 'MyClass::myStaticFunction'
        $matches = Strings::match($this->value, '#^([a-zA-Z_\\x7f-\\xff\\\\][a-zA-Z0-9_\\x7f-\\xff\\\\]*)::([a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)\\z#');
        if ($matches !== null) {
            if (!$reflectionProvider->hasClass($matches[1])) {
                return [new TrivialParametersAcceptor()];
            }
            $classReflection = $reflectionProvider->getClass($matches[1]);
            if ($classReflection->hasMethod($matches[2])) {
                $method = $classReflection->getMethod($matches[2], $scope);
                if (!$scope->canCallMethod($method)) {
                    return [new InaccessibleMethod($method)];
                }
                return $method->getVariants();
            }
            if (!$classReflection->getNativeReflection()->isFinal()) {
                return [new TrivialParametersAcceptor()];
            }
        }
        throw new ShouldNotHappenException();
    }
    public function toNumber() : Type
    {
        if (is_numeric($this->value)) {
            $value = $this->value;
            $value = +$value;
            if (is_float($value)) {
                return new \PHPStan\Type\Constant\ConstantFloatType($value);
            }
            return new \PHPStan\Type\Constant\ConstantIntegerType($value);
        }
        return new ErrorType();
    }
    public function toInteger() : Type
    {
        return new \PHPStan\Type\Constant\ConstantIntegerType((int) $this->value);
    }
    public function toFloat() : Type
    {
        return new \PHPStan\Type\Constant\ConstantFloatType((float) $this->value);
    }
    public function toArrayKey() : Type
    {
        if ($this->arrayKeyType !== null) {
            return $this->arrayKeyType;
        }
        /** @var int|string $offsetValue */
        $offsetValue = key([$this->value => null]);
        return $this->arrayKeyType = is_int($offsetValue) ? new \PHPStan\Type\Constant\ConstantIntegerType($offsetValue) : new \PHPStan\Type\Constant\ConstantStringType($offsetValue);
    }
    public function isString() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isNumericString() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean(is_numeric($this->getValue()));
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->getValue() !== '');
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->getValue() !== '' && $this->getValue() !== '0');
    }
    public function isLiteralString() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function hasOffsetValueType(Type $offsetType) : TrinaryLogic
    {
        if ($offsetType instanceof \PHPStan\Type\Constant\ConstantIntegerType) {
            return TrinaryLogic::createFromBoolean($offsetType->getValue() < strlen($this->value));
        }
        return parent::hasOffsetValueType($offsetType);
    }
    public function getOffsetValueType(Type $offsetType) : Type
    {
        if ($offsetType instanceof \PHPStan\Type\Constant\ConstantIntegerType) {
            if ($offsetType->getValue() < strlen($this->value)) {
                return new self($this->value[$offsetType->getValue()]);
            }
            return new ErrorType();
        }
        return parent::getOffsetValueType($offsetType);
    }
    public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $unionValues = \true) : Type
    {
        $valueStringType = $valueType->toString();
        if ($valueStringType instanceof ErrorType) {
            return new ErrorType();
        }
        if ($offsetType instanceof \PHPStan\Type\Constant\ConstantIntegerType && $valueStringType instanceof \PHPStan\Type\Constant\ConstantStringType) {
            $value = $this->value;
            $offsetValue = $offsetType->getValue();
            if ($offsetValue < 0) {
                return new ErrorType();
            }
            $stringValue = $valueStringType->getValue();
            if (strlen($stringValue) !== 1) {
                return new ErrorType();
            }
            $value[$offsetValue] = $stringValue;
            return new self($value);
        }
        return parent::setOffsetValueType($offsetType, $valueType);
    }
    public function append(self $otherString) : self
    {
        return new self($this->getValue() . $otherString->getValue());
    }
    public function generalize(GeneralizePrecision $precision) : Type
    {
        if ($this->isClassString) {
            if ($precision->isMoreSpecific()) {
                return new ClassStringType();
            }
            return new StringType();
        }
        if ($this->getValue() !== '' && $precision->isMoreSpecific()) {
            if ($this->getValue() !== '0') {
                return new IntersectionType([new StringType(), new AccessoryNonFalsyStringType(), new AccessoryLiteralStringType()]);
            }
            return new IntersectionType([new StringType(), new AccessoryNonEmptyStringType(), new AccessoryLiteralStringType()]);
        }
        if ($precision->isMoreSpecific()) {
            return new IntersectionType([new StringType(), new AccessoryLiteralStringType()]);
        }
        return new StringType();
    }
    public function getSmallerType() : Type
    {
        $subtractedTypes = [new \PHPStan\Type\Constant\ConstantBooleanType(\true), IntegerRangeType::createAllGreaterThanOrEqualTo((float) $this->value)];
        if ($this->value === '') {
            $subtractedTypes[] = new NullType();
            $subtractedTypes[] = new StringType();
        }
        if (!(bool) $this->value) {
            $subtractedTypes[] = new \PHPStan\Type\Constant\ConstantBooleanType(\false);
        }
        return TypeCombinator::remove(new MixedType(), TypeCombinator::union(...$subtractedTypes));
    }
    public function getSmallerOrEqualType() : Type
    {
        $subtractedTypes = [IntegerRangeType::createAllGreaterThan((float) $this->value)];
        if (!(bool) $this->value) {
            $subtractedTypes[] = new \PHPStan\Type\Constant\ConstantBooleanType(\true);
        }
        return TypeCombinator::remove(new MixedType(), TypeCombinator::union(...$subtractedTypes));
    }
    public function getGreaterType() : Type
    {
        $subtractedTypes = [new \PHPStan\Type\Constant\ConstantBooleanType(\false), IntegerRangeType::createAllSmallerThanOrEqualTo((float) $this->value)];
        if ((bool) $this->value) {
            $subtractedTypes[] = new \PHPStan\Type\Constant\ConstantBooleanType(\true);
        }
        return TypeCombinator::remove(new MixedType(), TypeCombinator::union(...$subtractedTypes));
    }
    public function getGreaterOrEqualType() : Type
    {
        $subtractedTypes = [IntegerRangeType::createAllSmallerThan((float) $this->value)];
        if ((bool) $this->value) {
            $subtractedTypes[] = new \PHPStan\Type\Constant\ConstantBooleanType(\false);
        }
        return TypeCombinator::remove(new MixedType(), TypeCombinator::union(...$subtractedTypes));
    }
    public function canAccessConstants() : TrinaryLogic
    {
        return $this->isClassStringType();
    }
    public function hasConstant(string $constantName) : TrinaryLogic
    {
        return $this->getObjectType()->hasConstant($constantName);
    }
    public function getConstant(string $constantName) : ConstantReflection
    {
        return $this->getObjectType()->getConstant($constantName);
    }
    private function getObjectType() : ObjectType
    {
        return $this->objectType = $this->objectType ?? new ObjectType($this->value);
    }
    public function toPhpDocNode() : TypeNode
    {
        if (substr_count($this->value, "\n") > 0) {
            return $this->generalize(GeneralizePrecision::moreSpecific())->toPhpDocNode();
        }
        return new ConstTypeNode(new QuoteAwareConstExprStringNode($this->value, QuoteAwareConstExprStringNode::SINGLE_QUOTED));
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : Type
    {
        return new self($properties['value'], $properties['isClassString'] ?? \false);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Constant;

use PHPStan\Type\BooleanType;
trait ConstantScalarToBooleanTrait
{
    public function toBoolean() : BooleanType
    {
        return new \PHPStan\Type\Constant\ConstantBooleanType((bool) $this->value);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Constant;

use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Type;
/** @api */
class ConstantArrayTypeAndMethod
{
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $type;
    /**
     * @var string|null
     */
    private $method;
    /**
     * @var \PHPStan\TrinaryLogic
     */
    private $certainty;
    private function __construct(?Type $type, ?string $method, TrinaryLogic $certainty)
    {
        $this->type = $type;
        $this->method = $method;
        $this->certainty = $certainty;
    }
    public static function createConcrete(Type $type, string $method, TrinaryLogic $certainty) : self
    {
        if ($certainty->no()) {
            throw new ShouldNotHappenException();
        }
        return new self($type, $method, $certainty);
    }
    public static function createUnknown() : self
    {
        return new self(null, null, TrinaryLogic::createMaybe());
    }
    public function isUnknown() : bool
    {
        return $this->type === null;
    }
    public function getType() : Type
    {
        if ($this->type === null) {
            throw new ShouldNotHappenException();
        }
        return $this->type;
    }
    public function getMethod() : string
    {
        if ($this->method === null) {
            throw new ShouldNotHappenException();
        }
        return $this->method;
    }
    public function getCertainty() : TrinaryLogic
    {
        return $this->certainty;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Constant;

use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\TrinaryLogic;
use PHPStan\Type\BooleanType;
use PHPStan\Type\ConstantScalarType;
use PHPStan\Type\GeneralizePrecision;
use PHPStan\Type\MixedType;
use PHPStan\Type\NeverType;
use PHPStan\Type\StaticTypeFactory;
use PHPStan\Type\Traits\ConstantScalarTypeTrait;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
/** @api */
class ConstantBooleanType extends BooleanType implements ConstantScalarType
{
    use ConstantScalarTypeTrait {
        looseCompare as private scalarLooseCompare;
    }
    /**
     * @var bool
     */
    private $value;
    /** @api */
    public function __construct(bool $value)
    {
        $this->value = $value;
        parent::__construct();
    }
    public function getValue() : bool
    {
        return $this->value;
    }
    public function describe(VerbosityLevel $level) : string
    {
        return $this->value ? 'true' : 'false';
    }
    public function getSmallerType() : Type
    {
        if ($this->value) {
            return StaticTypeFactory::falsey();
        }
        return new NeverType();
    }
    public function getSmallerOrEqualType() : Type
    {
        if ($this->value) {
            return new MixedType();
        }
        return StaticTypeFactory::falsey();
    }
    public function getGreaterType() : Type
    {
        if ($this->value) {
            return new NeverType();
        }
        return StaticTypeFactory::truthy();
    }
    public function getGreaterOrEqualType() : Type
    {
        if ($this->value) {
            return StaticTypeFactory::truthy();
        }
        return new MixedType();
    }
    public function toBoolean() : BooleanType
    {
        return $this;
    }
    public function toNumber() : Type
    {
        return new \PHPStan\Type\Constant\ConstantIntegerType((int) $this->value);
    }
    public function toString() : Type
    {
        return new \PHPStan\Type\Constant\ConstantStringType((string) $this->value);
    }
    public function toInteger() : Type
    {
        return new \PHPStan\Type\Constant\ConstantIntegerType((int) $this->value);
    }
    public function toFloat() : Type
    {
        return new \PHPStan\Type\Constant\ConstantFloatType((float) $this->value);
    }
    public function toArrayKey() : Type
    {
        return new \PHPStan\Type\Constant\ConstantIntegerType((int) $this->value);
    }
    public function isTrue() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->value === \true);
    }
    public function isFalse() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->value === \false);
    }
    public function generalize(GeneralizePrecision $precision) : Type
    {
        return new BooleanType();
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode($this->value ? 'true' : 'false');
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : Type
    {
        return new self($properties['value']);
    }
    public function looseCompare(Type $type, PhpVersion $phpVersion) : BooleanType
    {
        if ($type->isObject()->yes()) {
            return $this;
        }
        return $this->scalarLooseCompare($type, $phpVersion);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Constant;

use _PHPStan_dcc7b7cff\Nette\Utils\Strings;
use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprIntegerNode;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprStringNode;
use PHPStan\PhpDocParser\Ast\Type\ArrayShapeItemNode;
use PHPStan\PhpDocParser\Ast\Type\ArrayShapeNode;
use PHPStan\PhpDocParser\Ast\Type\ConstTypeNode;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\Reflection\ClassMemberAccessAnswerer;
use PHPStan\Reflection\InaccessibleMethod;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\Reflection\TrivialParametersAcceptor;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\AcceptsResult;
use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\Accessory\HasOffsetValueType;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\BooleanType;
use PHPStan\Type\CompoundType;
use PHPStan\Type\ConstantScalarType;
use PHPStan\Type\ConstantType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\GeneralizePrecision;
use PHPStan\Type\Generic\TemplateMixedType;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\Generic\TemplateTypeVariance;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\MixedType;
use PHPStan\Type\NeverType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
use function array_keys;
use function array_map;
use function array_merge;
use function array_pop;
use function array_push;
use function array_reverse;
use function array_slice;
use function array_unique;
use function array_values;
use function assert;
use function count;
use function implode;
use function in_array;
use function is_int;
use function is_string;
use function min;
use function pow;
use function sort;
use function sprintf;
use function strpos;
/**
 * @api
 */
class ConstantArrayType extends ArrayType implements ConstantType
{
    private const DESCRIBE_LIMIT = 8;
    /** @var self[]|null */
    private $allArrays;
    /** @var non-empty-list<int> */
    private $nextAutoIndexes;
    /**
     * @var array<int, (ConstantIntegerType | ConstantStringType)>
     */
    private $keyTypes;
    /**
     * @var array<int, Type>
     */
    private $valueTypes;
    /**
     * @var int[]
     */
    private $optionalKeys = [];
    /**
     * @var bool
     */
    private $isList = \false;
    /**
     * @api
     * @param array<int, ConstantIntegerType|ConstantStringType> $keyTypes
     * @param array<int, Type> $valueTypes
     * @param non-empty-list<int>|int $nextAutoIndexes
     * @param int[] $optionalKeys
     */
    public function __construct(array $keyTypes, array $valueTypes, $nextAutoIndexes = [0], array $optionalKeys = [], bool $isList = \false)
    {
        $this->keyTypes = $keyTypes;
        $this->valueTypes = $valueTypes;
        $this->optionalKeys = $optionalKeys;
        $this->isList = $isList;
        assert(count($keyTypes) === count($valueTypes));
        if (is_int($nextAutoIndexes)) {
            $nextAutoIndexes = [$nextAutoIndexes];
        }
        $this->nextAutoIndexes = $nextAutoIndexes;
        $keyTypesCount = count($this->keyTypes);
        if ($keyTypesCount === 0) {
            $keyType = new NeverType(\true);
            $this->isList = \true;
        } elseif ($keyTypesCount === 1) {
            $keyType = $this->keyTypes[0];
        } else {
            $keyType = new UnionType($this->keyTypes);
        }
        parent::__construct($keyType, count($valueTypes) > 0 ? TypeCombinator::union(...$valueTypes) : new NeverType(\true));
    }
    public function getConstantArrays() : array
    {
        return [$this];
    }
    public function isConstantValue() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    /** @deprecated Use isIterableAtLeastOnce()->no() instead */
    public function isEmpty() : bool
    {
        return count($this->keyTypes) === 0;
    }
    /**
     * @return non-empty-list<int>
     */
    public function getNextAutoIndexes() : array
    {
        return $this->nextAutoIndexes;
    }
    /**
     * @deprecated
     */
    public function getNextAutoIndex() : int
    {
        return $this->nextAutoIndexes[count($this->nextAutoIndexes) - 1];
    }
    /**
     * @return int[]
     */
    public function getOptionalKeys() : array
    {
        return $this->optionalKeys;
    }
    /**
     * @return self[]
     */
    public function getAllArrays() : array
    {
        if ($this->allArrays !== null) {
            return $this->allArrays;
        }
        if (count($this->optionalKeys) <= 10) {
            $optionalKeysCombinations = $this->powerSet($this->optionalKeys);
        } else {
            $optionalKeysCombinations = [[], $this->optionalKeys];
        }
        $requiredKeys = [];
        foreach (array_keys($this->keyTypes) as $i) {
            if (in_array($i, $this->optionalKeys, \true)) {
                continue;
            }
            $requiredKeys[] = $i;
        }
        $arrays = [];
        foreach ($optionalKeysCombinations as $combination) {
            $keys = array_merge($requiredKeys, $combination);
            sort($keys);
            if ($this->isList && array_keys($keys) !== array_values($keys)) {
                continue;
            }
            $builder = \PHPStan\Type\Constant\ConstantArrayTypeBuilder::createEmpty();
            foreach ($keys as $i) {
                $builder->setOffsetValueType($this->keyTypes[$i], $this->valueTypes[$i]);
            }
            $array = $builder->getArray();
            if (!$array instanceof \PHPStan\Type\Constant\ConstantArrayType) {
                throw new ShouldNotHappenException();
            }
            $arrays[] = $array;
        }
        return $this->allArrays = $arrays;
    }
    /**
     * @template T
     * @param T[] $in
     * @return T[][]
     */
    private function powerSet(array $in) : array
    {
        $count = count($in);
        $members = pow(2, $count);
        $return = [];
        for ($i = 0; $i < $members; $i++) {
            $b = sprintf('%0' . $count . 'b', $i);
            $out = [];
            for ($j = 0; $j < $count; $j++) {
                if ($b[$j] !== '1') {
                    continue;
                }
                $out[] = $in[$j];
            }
            $return[] = $out;
        }
        return $return;
    }
    /**
     * @return array<int, ConstantIntegerType|ConstantStringType>
     */
    public function getKeyTypes() : array
    {
        return $this->keyTypes;
    }
    /** @deprecated Use getFirstIterableKeyType() instead */
    public function getFirstKeyType() : Type
    {
        return $this->getFirstIterableKeyType();
    }
    /** @deprecated Use getLastIterableKeyType() instead */
    public function getLastKeyType() : Type
    {
        return $this->getLastIterableKeyType();
    }
    /**
     * @return array<int, Type>
     */
    public function getValueTypes() : array
    {
        return $this->valueTypes;
    }
    /** @deprecated Use getFirstIterableValueType() instead */
    public function getFirstValueType() : Type
    {
        return $this->getFirstIterableValueType();
    }
    /** @deprecated Use getLastIterableValueType() instead */
    public function getLastValueType() : Type
    {
        return $this->getLastIterableValueType();
    }
    public function isOptionalKey(int $i) : bool
    {
        return in_array($i, $this->optionalKeys, \true);
    }
    public function accepts(Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(Type $type, bool $strictTypes) : AcceptsResult
    {
        if ($type instanceof MixedType && !$type instanceof TemplateMixedType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        if ($type instanceof self && count($this->keyTypes) === 0) {
            return AcceptsResult::createFromBoolean(count($type->keyTypes) === 0);
        }
        $result = AcceptsResult::createYes();
        foreach ($this->keyTypes as $i => $keyType) {
            $valueType = $this->valueTypes[$i];
            $hasOffsetValueType = $type->hasOffsetValueType($keyType);
            $hasOffset = new AcceptsResult($hasOffsetValueType, $hasOffsetValueType->yes() || !$type->isConstantArray()->yes() ? [] : [sprintf('Array %s have offset %s.', $hasOffsetValueType->no() ? 'does not' : 'might not', $keyType->describe(VerbosityLevel::value()))]);
            if ($hasOffset->no()) {
                if ($this->isOptionalKey($i)) {
                    continue;
                }
                return $hasOffset;
            }
            if ($hasOffset->maybe() && $this->isOptionalKey($i)) {
                $hasOffset = AcceptsResult::createYes();
            }
            $result = $result->and($hasOffset);
            $otherValueType = $type->getOffsetValueType($keyType);
            $verbosity = VerbosityLevel::getRecommendedLevelByType($valueType, $otherValueType);
            $acceptsValue = $valueType->acceptsWithReason($otherValueType, $strictTypes)->decorateReasons(static function (string $reason) use($keyType, $valueType, $verbosity, $otherValueType) {
                return sprintf('Offset %s (%s) does not accept type %s: %s', $keyType->describe(VerbosityLevel::value()), $valueType->describe($verbosity), $otherValueType->describe($verbosity), $reason);
            });
            if (!$acceptsValue->yes() && count($acceptsValue->reasons) === 0 && $type->isConstantArray()->yes()) {
                $acceptsValue = new AcceptsResult($acceptsValue->result, [sprintf('Offset %s (%s) does not accept type %s.', $keyType->describe(VerbosityLevel::value()), $valueType->describe($verbosity), $otherValueType->describe($verbosity))]);
            }
            if ($acceptsValue->no()) {
                return $acceptsValue;
            }
            $result = $result->and($acceptsValue);
        }
        $result = $result->and(new AcceptsResult($type->isArray(), []));
        if ($type->isOversizedArray()->yes()) {
            if (!$result->no()) {
                return AcceptsResult::createYes();
            }
        }
        return $result;
    }
    public function isSuperTypeOf(Type $type) : TrinaryLogic
    {
        if ($type instanceof self) {
            if (count($this->keyTypes) === 0) {
                if (count($type->keyTypes) > 0) {
                    if (count($type->optionalKeys) > 0) {
                        return TrinaryLogic::createMaybe();
                    }
                    return TrinaryLogic::createNo();
                }
                return TrinaryLogic::createYes();
            }
            $results = [];
            foreach ($this->keyTypes as $i => $keyType) {
                $hasOffset = $type->hasOffsetValueType($keyType);
                if ($hasOffset->no()) {
                    if (!$this->isOptionalKey($i)) {
                        return TrinaryLogic::createNo();
                    }
                    $results[] = TrinaryLogic::createMaybe();
                    continue;
                } elseif ($hasOffset->maybe() && !$this->isOptionalKey($i)) {
                    $results[] = TrinaryLogic::createMaybe();
                }
                $isValueSuperType = $this->valueTypes[$i]->isSuperTypeOf($type->getOffsetValueType($keyType));
                if ($isValueSuperType->no()) {
                    return TrinaryLogic::createNo();
                }
                $results[] = $isValueSuperType;
            }
            return TrinaryLogic::createYes()->and(...$results);
        }
        if ($type instanceof ArrayType) {
            $result = TrinaryLogic::createMaybe();
            if (count($this->keyTypes) === 0) {
                return $result;
            }
            return $result->and($this->getKeyType()->isSuperTypeOf($type->getKeyType()), $this->getItemType()->isSuperTypeOf($type->getItemType()));
        }
        if ($type instanceof CompoundType) {
            return $type->isSubTypeOf($this);
        }
        return TrinaryLogic::createNo();
    }
    public function looseCompare(Type $type, PhpVersion $phpVersion) : BooleanType
    {
        if ($this->isIterableAtLeastOnce()->no() && count($type->getConstantScalarValues()) === 1) {
            // @phpstan-ignore-next-line
            return new \PHPStan\Type\Constant\ConstantBooleanType($type->getConstantScalarValues()[0] == []);
            // phpcs:ignore
        }
        return new BooleanType();
    }
    public function equals(Type $type) : bool
    {
        if (!$type instanceof self) {
            return \false;
        }
        if (count($this->keyTypes) !== count($type->keyTypes)) {
            return \false;
        }
        foreach ($this->keyTypes as $i => $keyType) {
            $valueType = $this->valueTypes[$i];
            if (!$valueType->equals($type->valueTypes[$i])) {
                return \false;
            }
            if (!$keyType->equals($type->keyTypes[$i])) {
                return \false;
            }
        }
        if ($this->optionalKeys !== $type->optionalKeys) {
            return \false;
        }
        return \true;
    }
    public function isCallable() : TrinaryLogic
    {
        $typeAndMethods = $this->findTypeAndMethodNames();
        if ($typeAndMethods === []) {
            return TrinaryLogic::createNo();
        }
        $results = array_map(static function (\PHPStan\Type\Constant\ConstantArrayTypeAndMethod $typeAndMethod) : TrinaryLogic {
            return $typeAndMethod->getCertainty();
        }, $typeAndMethods);
        return TrinaryLogic::createYes()->and(...$results);
    }
    /**
     * @return ParametersAcceptor[]
     */
    public function getCallableParametersAcceptors(ClassMemberAccessAnswerer $scope) : array
    {
        $typeAndMethodNames = $this->findTypeAndMethodNames();
        if ($typeAndMethodNames === []) {
            throw new ShouldNotHappenException();
        }
        $acceptors = [];
        foreach ($typeAndMethodNames as $typeAndMethodName) {
            if ($typeAndMethodName->isUnknown() || !$typeAndMethodName->getCertainty()->yes()) {
                $acceptors[] = new TrivialParametersAcceptor();
                continue;
            }
            $method = $typeAndMethodName->getType()->getMethod($typeAndMethodName->getMethod(), $scope);
            if (!$scope->canCallMethod($method)) {
                $acceptors[] = new InaccessibleMethod($method);
                continue;
            }
            array_push($acceptors, ...$method->getVariants());
        }
        return $acceptors;
    }
    /** @deprecated Use findTypeAndMethodNames() instead  */
    public function findTypeAndMethodName() : ?\PHPStan\Type\Constant\ConstantArrayTypeAndMethod
    {
        if (count($this->keyTypes) !== 2) {
            return null;
        }
        if ($this->keyTypes[0]->isSuperTypeOf(new \PHPStan\Type\Constant\ConstantIntegerType(0))->no()) {
            return null;
        }
        if ($this->keyTypes[1]->isSuperTypeOf(new \PHPStan\Type\Constant\ConstantIntegerType(1))->no()) {
            return null;
        }
        [$classOrObject, $method] = $this->valueTypes;
        if (!$method instanceof \PHPStan\Type\Constant\ConstantStringType) {
            return \PHPStan\Type\Constant\ConstantArrayTypeAndMethod::createUnknown();
        }
        $type = $classOrObject->getObjectTypeOrClassStringObjectType();
        if (!$type->isObject()->yes()) {
            return \PHPStan\Type\Constant\ConstantArrayTypeAndMethod::createUnknown();
        }
        $has = $type->hasMethod($method->getValue());
        if (!$has->no()) {
            if ($this->isOptionalKey(0) || $this->isOptionalKey(1)) {
                $has = $has->and(TrinaryLogic::createMaybe());
            }
            return \PHPStan\Type\Constant\ConstantArrayTypeAndMethod::createConcrete($type, $method->getValue(), $has);
        }
        return null;
    }
    /** @return ConstantArrayTypeAndMethod[] */
    public function findTypeAndMethodNames() : array
    {
        if (count($this->keyTypes) !== 2) {
            return [];
        }
        if ($this->keyTypes[0]->isSuperTypeOf(new \PHPStan\Type\Constant\ConstantIntegerType(0))->no()) {
            return [];
        }
        if ($this->keyTypes[1]->isSuperTypeOf(new \PHPStan\Type\Constant\ConstantIntegerType(1))->no()) {
            return [];
        }
        [$classOrObject, $methods] = $this->valueTypes;
        if (count($methods->getConstantStrings()) === 0) {
            return [\PHPStan\Type\Constant\ConstantArrayTypeAndMethod::createUnknown()];
        }
        $type = $classOrObject->getObjectTypeOrClassStringObjectType();
        if (!$type->isObject()->yes()) {
            return [\PHPStan\Type\Constant\ConstantArrayTypeAndMethod::createUnknown()];
        }
        $typeAndMethods = [];
        foreach ($methods->getConstantStrings() as $method) {
            $has = $type->hasMethod($method->getValue());
            if ($has->no()) {
                continue;
            }
            if ($this->isOptionalKey(0) || $this->isOptionalKey(1)) {
                $has = $has->and(TrinaryLogic::createMaybe());
            }
            $typeAndMethods[] = \PHPStan\Type\Constant\ConstantArrayTypeAndMethod::createConcrete($type, $method->getValue(), $has);
        }
        return $typeAndMethods;
    }
    public function hasOffsetValueType(Type $offsetType) : TrinaryLogic
    {
        $offsetType = $offsetType->toArrayKey();
        $result = TrinaryLogic::createNo();
        foreach ($this->keyTypes as $i => $keyType) {
            if ($keyType instanceof \PHPStan\Type\Constant\ConstantIntegerType && $offsetType instanceof StringType && !$offsetType instanceof \PHPStan\Type\Constant\ConstantStringType) {
                return TrinaryLogic::createMaybe();
            }
            $has = $keyType->isSuperTypeOf($offsetType);
            if ($has->yes()) {
                if ($this->isOptionalKey($i)) {
                    return TrinaryLogic::createMaybe();
                }
                return TrinaryLogic::createYes();
            }
            if (!$has->maybe()) {
                continue;
            }
            $result = TrinaryLogic::createMaybe();
        }
        return $result;
    }
    public function getOffsetValueType(Type $offsetType) : Type
    {
        $offsetType = $offsetType->toArrayKey();
        $matchingValueTypes = [];
        $all = \true;
        foreach ($this->keyTypes as $i => $keyType) {
            if ($keyType->isSuperTypeOf($offsetType)->no()) {
                $all = \false;
                continue;
            }
            $matchingValueTypes[] = $this->valueTypes[$i];
        }
        if ($all) {
            if (count($this->keyTypes) === 0) {
                return new ErrorType();
            }
            return $this->getIterableValueType();
        }
        if (count($matchingValueTypes) > 0) {
            $type = TypeCombinator::union(...$matchingValueTypes);
            if ($type instanceof ErrorType) {
                return new MixedType();
            }
            return $type;
        }
        return new ErrorType();
        // undefined offset
    }
    public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $unionValues = \true) : Type
    {
        $builder = \PHPStan\Type\Constant\ConstantArrayTypeBuilder::createFromConstantArray($this);
        $builder->setOffsetValueType($offsetType, $valueType);
        return $builder->getArray();
    }
    public function unsetOffset(Type $offsetType) : Type
    {
        $offsetType = $offsetType->toArrayKey();
        if ($offsetType instanceof \PHPStan\Type\Constant\ConstantIntegerType || $offsetType instanceof \PHPStan\Type\Constant\ConstantStringType) {
            foreach ($this->keyTypes as $i => $keyType) {
                if ($keyType->getValue() !== $offsetType->getValue()) {
                    continue;
                }
                $keyTypes = $this->keyTypes;
                unset($keyTypes[$i]);
                $valueTypes = $this->valueTypes;
                unset($valueTypes[$i]);
                $newKeyTypes = [];
                $newValueTypes = [];
                $newOptionalKeys = [];
                $k = 0;
                foreach ($keyTypes as $j => $newKeyType) {
                    $newKeyTypes[] = $newKeyType;
                    $newValueTypes[] = $valueTypes[$j];
                    if (in_array($j, $this->optionalKeys, \true)) {
                        $newOptionalKeys[] = $k;
                    }
                    $k++;
                }
                return new self($newKeyTypes, $newValueTypes, $this->nextAutoIndexes, $newOptionalKeys, \false);
            }
            return $this;
        }
        $constantScalars = $offsetType->getConstantScalarTypes();
        if (count($constantScalars) > 0) {
            $optionalKeys = $this->optionalKeys;
            foreach ($constantScalars as $constantScalar) {
                $constantScalar = $constantScalar->toArrayKey();
                if (!$constantScalar instanceof \PHPStan\Type\Constant\ConstantIntegerType && !$constantScalar instanceof \PHPStan\Type\Constant\ConstantStringType) {
                    continue;
                }
                foreach ($this->keyTypes as $i => $keyType) {
                    if ($keyType->getValue() !== $constantScalar->getValue()) {
                        continue;
                    }
                    if (in_array($i, $optionalKeys, \true)) {
                        continue 2;
                    }
                    $optionalKeys[] = $i;
                }
            }
            return new self($this->keyTypes, $this->valueTypes, $this->nextAutoIndexes, $optionalKeys, \false);
        }
        $optionalKeys = $this->optionalKeys;
        $isList = $this->isList;
        foreach ($this->keyTypes as $i => $keyType) {
            if (!$offsetType->isSuperTypeOf($keyType)->yes()) {
                continue;
            }
            $optionalKeys[] = $i;
            $isList = \false;
        }
        $optionalKeys = array_values(array_unique($optionalKeys));
        return new self($this->keyTypes, $this->valueTypes, $this->nextAutoIndexes, $optionalKeys, $isList);
    }
    public function fillKeysArray(Type $valueType) : Type
    {
        $builder = \PHPStan\Type\Constant\ConstantArrayTypeBuilder::createEmpty();
        foreach ($this->valueTypes as $i => $keyType) {
            if ((new IntegerType())->isSuperTypeOf($keyType)->no()) {
                $stringKeyType = $keyType->toString();
                if ($stringKeyType instanceof ErrorType) {
                    return $stringKeyType;
                }
                $builder->setOffsetValueType($stringKeyType, $valueType, $this->isOptionalKey($i));
            } else {
                $builder->setOffsetValueType($keyType, $valueType, $this->isOptionalKey($i));
            }
        }
        return $builder->getArray();
    }
    public function flipArray() : Type
    {
        $builder = \PHPStan\Type\Constant\ConstantArrayTypeBuilder::createEmpty();
        foreach ($this->keyTypes as $i => $keyType) {
            $valueType = $this->valueTypes[$i];
            $builder->setOffsetValueType($valueType->toArrayKey(), $keyType, $this->isOptionalKey($i));
        }
        return $builder->getArray();
    }
    public function intersectKeyArray(Type $otherArraysType) : Type
    {
        $builder = \PHPStan\Type\Constant\ConstantArrayTypeBuilder::createEmpty();
        foreach ($this->keyTypes as $i => $keyType) {
            $valueType = $this->valueTypes[$i];
            $has = $otherArraysType->hasOffsetValueType($keyType);
            if ($has->no()) {
                continue;
            }
            $builder->setOffsetValueType($keyType, $valueType, $this->isOptionalKey($i) || !$has->yes());
        }
        return $builder->getArray();
    }
    public function popArray() : Type
    {
        return $this->removeLastElements(1);
    }
    public function searchArray(Type $needleType) : Type
    {
        $matches = [];
        $hasIdenticalValue = \false;
        foreach ($this->valueTypes as $index => $valueType) {
            $isNeedleSuperType = $valueType->isSuperTypeOf($needleType);
            if ($isNeedleSuperType->no()) {
                continue;
            }
            if ($needleType instanceof ConstantScalarType && $valueType instanceof ConstantScalarType && $needleType->getValue() === $valueType->getValue() && !$this->isOptionalKey($index)) {
                $hasIdenticalValue = \true;
            }
            $matches[] = $this->keyTypes[$index];
        }
        if (count($matches) > 0) {
            if ($hasIdenticalValue) {
                return TypeCombinator::union(...$matches);
            }
            return TypeCombinator::union(new \PHPStan\Type\Constant\ConstantBooleanType(\false), ...$matches);
        }
        return new \PHPStan\Type\Constant\ConstantBooleanType(\false);
    }
    public function shiftArray() : Type
    {
        return $this->removeFirstElements(1);
    }
    public function shuffleArray() : Type
    {
        $valuesArray = $this->getValuesArray();
        $isIterableAtLeastOnce = $valuesArray->isIterableAtLeastOnce();
        if ($isIterableAtLeastOnce->no()) {
            return $valuesArray;
        }
        $generalizedArray = new ArrayType($valuesArray->getKeyType(), $valuesArray->getItemType());
        if ($isIterableAtLeastOnce->yes()) {
            $generalizedArray = TypeCombinator::intersect($generalizedArray, new NonEmptyArrayType());
        }
        if ($valuesArray->isList) {
            $generalizedArray = AccessoryArrayListType::intersectWith($generalizedArray);
        }
        return $generalizedArray;
    }
    public function isIterableAtLeastOnce() : TrinaryLogic
    {
        $keysCount = count($this->keyTypes);
        if ($keysCount === 0) {
            return TrinaryLogic::createNo();
        }
        $optionalKeysCount = count($this->optionalKeys);
        if ($optionalKeysCount < $keysCount) {
            return TrinaryLogic::createYes();
        }
        return TrinaryLogic::createMaybe();
    }
    public function getArraySize() : Type
    {
        $optionalKeysCount = count($this->optionalKeys);
        $totalKeysCount = count($this->getKeyTypes());
        if ($optionalKeysCount === 0) {
            return new \PHPStan\Type\Constant\ConstantIntegerType($totalKeysCount);
        }
        return IntegerRangeType::fromInterval($totalKeysCount - $optionalKeysCount, $totalKeysCount);
    }
    public function getFirstIterableKeyType() : Type
    {
        $keyTypes = [];
        foreach ($this->keyTypes as $i => $keyType) {
            $keyTypes[] = $keyType;
            if (!$this->isOptionalKey($i)) {
                break;
            }
        }
        return TypeCombinator::union(...$keyTypes);
    }
    public function getLastIterableKeyType() : Type
    {
        $keyTypes = [];
        for ($i = count($this->keyTypes) - 1; $i >= 0; $i--) {
            $keyTypes[] = $this->keyTypes[$i];
            if (!$this->isOptionalKey($i)) {
                break;
            }
        }
        return TypeCombinator::union(...$keyTypes);
    }
    public function getFirstIterableValueType() : Type
    {
        $valueTypes = [];
        foreach ($this->valueTypes as $i => $valueType) {
            $valueTypes[] = $valueType;
            if (!$this->isOptionalKey($i)) {
                break;
            }
        }
        return TypeCombinator::union(...$valueTypes);
    }
    public function getLastIterableValueType() : Type
    {
        $valueTypes = [];
        for ($i = count($this->keyTypes) - 1; $i >= 0; $i--) {
            $valueTypes[] = $this->valueTypes[$i];
            if (!$this->isOptionalKey($i)) {
                break;
            }
        }
        return TypeCombinator::union(...$valueTypes);
    }
    public function isConstantArray() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isList() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->isList);
    }
    /** @deprecated Use popArray() instead */
    public function removeLast() : self
    {
        return $this->removeLastElements(1);
    }
    /** @param positive-int $length */
    private function removeLastElements(int $length) : self
    {
        $keyTypesCount = count($this->keyTypes);
        if ($keyTypesCount === 0) {
            return $this;
        }
        $keyTypes = $this->keyTypes;
        $valueTypes = $this->valueTypes;
        $optionalKeys = $this->optionalKeys;
        $nextAutoindex = $this->nextAutoIndexes;
        $optionalKeysRemoved = 0;
        $newLength = $keyTypesCount - $length;
        for ($i = $keyTypesCount - 1; $i >= 0; $i--) {
            $isOptional = $this->isOptionalKey($i);
            if ($i >= $newLength) {
                if ($isOptional) {
                    $optionalKeysRemoved++;
                    foreach ($optionalKeys as $key => $value) {
                        if ($value === $i) {
                            unset($optionalKeys[$key]);
                            break;
                        }
                    }
                }
                $removedKeyType = array_pop($keyTypes);
                array_pop($valueTypes);
                $nextAutoindex = $removedKeyType instanceof \PHPStan\Type\Constant\ConstantIntegerType ? $removedKeyType->getValue() : $this->getNextAutoIndex();
                // @phpstan-ignore-line
                continue;
            }
            if ($isOptional || $optionalKeysRemoved <= 0) {
                continue;
            }
            $optionalKeys[] = $i;
            $optionalKeysRemoved--;
        }
        return new self($keyTypes, $valueTypes, $nextAutoindex, array_values($optionalKeys), $this->isList);
    }
    /** @deprecated Use shiftArray() instead */
    public function removeFirst() : self
    {
        return $this->removeFirstElements(1);
    }
    /** @param positive-int $length */
    private function removeFirstElements(int $length, bool $reindex = \true) : self
    {
        $builder = \PHPStan\Type\Constant\ConstantArrayTypeBuilder::createEmpty();
        $optionalKeysIgnored = 0;
        foreach ($this->keyTypes as $i => $keyType) {
            $isOptional = $this->isOptionalKey($i);
            if ($i <= $length - 1) {
                if ($isOptional) {
                    $optionalKeysIgnored++;
                }
                continue;
            }
            if (!$isOptional && $optionalKeysIgnored > 0) {
                $isOptional = \true;
                $optionalKeysIgnored--;
            }
            $valueType = $this->valueTypes[$i];
            if ($reindex && $keyType instanceof \PHPStan\Type\Constant\ConstantIntegerType) {
                $keyType = null;
            }
            $builder->setOffsetValueType($keyType, $valueType, $isOptional);
        }
        $array = $builder->getArray();
        if (!$array instanceof self) {
            throw new ShouldNotHappenException();
        }
        return $array;
    }
    public function slice(int $offset, ?int $limit, bool $preserveKeys = \false) : self
    {
        $keyTypesCount = count($this->keyTypes);
        if ($keyTypesCount === 0) {
            return $this;
        }
        $limit = $limit ?? $keyTypesCount;
        if ($limit < 0) {
            // Negative limits prevent access to the most right n elements
            return $this->removeLastElements($limit * -1)->slice($offset, null, $preserveKeys);
        }
        if ($keyTypesCount + $offset <= 0) {
            // A negative offset cannot reach left outside the array
            $offset = 0;
        }
        if ($offset < 0) {
            /*
             * Transforms the problem with the negative offset in one with a positive offset using array reversion.
             * The reason is belows handling of optional keys which works only from left to right.
             *
             * e.g.
             * array{a: 0, b: 1, c: 2, d: 3, e: 4}
             * with offset -4 and limit 2 (which would be sliced to array{b: 1, c: 2})
             *
             * is transformed via reversion to
             *
             * array{e: 4, d: 3, c: 2, b: 1, a: 0}
             * with offset 2 and limit 2 (which will be sliced to array{c: 2, b: 1} and then reversed again)
             */
            $offset *= -1;
            $reversedLimit = min($limit, $offset);
            $reversedOffset = $offset - $reversedLimit;
            return $this->reverse(\true)->slice($reversedOffset, $reversedLimit, $preserveKeys)->reverse(\true);
        }
        if ($offset > 0) {
            return $this->removeFirstElements($offset, \false)->slice(0, $limit, $preserveKeys);
        }
        $builder = \PHPStan\Type\Constant\ConstantArrayTypeBuilder::createEmpty();
        $nonOptionalElementsCount = 0;
        $hasOptional = \false;
        for ($i = 0; $nonOptionalElementsCount < $limit && $i < $keyTypesCount; $i++) {
            $isOptional = $this->isOptionalKey($i);
            if (!$isOptional) {
                $nonOptionalElementsCount++;
            } else {
                $hasOptional = \true;
            }
            $isLastElement = $nonOptionalElementsCount >= $limit || $i + 1 >= $keyTypesCount;
            if ($isLastElement && $limit < $keyTypesCount && $hasOptional) {
                // If the slice is not full yet, but has at least one optional key
                // the last non-optional element is going to be optional.
                // Otherwise, it would not fit into the slice if previous non-optional keys are there.
                $isOptional = \true;
            }
            $builder->setOffsetValueType($this->keyTypes[$i], $this->valueTypes[$i], $isOptional);
        }
        $slice = $builder->getArray();
        if (!$slice instanceof self) {
            throw new ShouldNotHappenException();
        }
        return $preserveKeys ? $slice : $slice->reindex();
    }
    public function reverse(bool $preserveKeys = \false) : self
    {
        $keyTypesReversed = array_reverse($this->keyTypes, \true);
        $keyTypes = array_values($keyTypesReversed);
        $keyTypesReversedKeys = array_keys($keyTypesReversed);
        $optionalKeys = array_map(static function (int $optionalKey) use($keyTypesReversedKeys) : int {
            return $keyTypesReversedKeys[$optionalKey];
        }, $this->optionalKeys);
        $reversed = new self($keyTypes, array_reverse($this->valueTypes), $this->nextAutoIndexes, $optionalKeys, \false);
        return $preserveKeys ? $reversed : $reversed->reindex();
    }
    /** @param positive-int $length */
    public function chunk(int $length, bool $preserveKeys = \false) : self
    {
        $builder = \PHPStan\Type\Constant\ConstantArrayTypeBuilder::createEmpty();
        $keyTypesCount = count($this->keyTypes);
        for ($i = 0; $i < $keyTypesCount; $i += $length) {
            $chunk = $this->slice($i, $length, \true);
            $builder->setOffsetValueType(null, $preserveKeys ? $chunk : $chunk->getValuesArray());
        }
        $chunks = $builder->getArray();
        if (!$chunks instanceof self) {
            throw new ShouldNotHappenException();
        }
        return $chunks;
    }
    private function reindex() : self
    {
        $keyTypes = [];
        $autoIndex = 0;
        foreach ($this->keyTypes as $keyType) {
            if (!$keyType instanceof \PHPStan\Type\Constant\ConstantIntegerType) {
                $keyTypes[] = $keyType;
                continue;
            }
            $keyTypes[] = new \PHPStan\Type\Constant\ConstantIntegerType($autoIndex);
            $autoIndex++;
        }
        return new self($keyTypes, $this->valueTypes, [$autoIndex], $this->optionalKeys, \true);
    }
    public function toBoolean() : BooleanType
    {
        return $this->getArraySize()->toBoolean();
    }
    public function toInteger() : Type
    {
        return $this->toBoolean()->toInteger();
    }
    public function toFloat() : Type
    {
        return $this->toBoolean()->toFloat();
    }
    public function generalize(GeneralizePrecision $precision) : Type
    {
        if (count($this->keyTypes) === 0) {
            return $this;
        }
        if ($precision->isTemplateArgument()) {
            return $this->traverse(static function (Type $type) use($precision) {
                return $type->generalize($precision);
            });
        }
        $arrayType = new ArrayType($this->getKeyType()->generalize($precision), $this->getItemType()->generalize($precision));
        $keyTypesCount = count($this->keyTypes);
        $optionalKeysCount = count($this->optionalKeys);
        $accessoryTypes = [];
        if ($precision->isMoreSpecific() && $keyTypesCount - $optionalKeysCount < 32) {
            foreach ($this->keyTypes as $i => $keyType) {
                if ($this->isOptionalKey($i)) {
                    continue;
                }
                $accessoryTypes[] = new HasOffsetValueType($keyType, $this->valueTypes[$i]->generalize($precision));
            }
        } elseif ($keyTypesCount > $optionalKeysCount) {
            $accessoryTypes[] = new NonEmptyArrayType();
        }
        if ($this->isList()->yes()) {
            $arrayType = AccessoryArrayListType::intersectWith($arrayType);
        }
        if (count($accessoryTypes) > 0) {
            return TypeCombinator::intersect($arrayType, ...$accessoryTypes);
        }
        return $arrayType;
    }
    /**
     * @return self
     */
    public function generalizeValues() : ArrayType
    {
        $valueTypes = [];
        foreach ($this->valueTypes as $valueType) {
            $valueTypes[] = $valueType->generalize(GeneralizePrecision::lessSpecific());
        }
        return new self($this->keyTypes, $valueTypes, $this->nextAutoIndexes, $this->optionalKeys, $this->isList);
    }
    /** @deprecated */
    public function generalizeToArray() : Type
    {
        $isIterableAtLeastOnce = $this->isIterableAtLeastOnce();
        if ($isIterableAtLeastOnce->no()) {
            return $this;
        }
        $arrayType = new ArrayType($this->getKeyType(), $this->getItemType());
        if ($isIterableAtLeastOnce->yes()) {
            $arrayType = TypeCombinator::intersect($arrayType, new NonEmptyArrayType());
        }
        if ($this->isList) {
            $arrayType = AccessoryArrayListType::intersectWith($arrayType);
        }
        return $arrayType;
    }
    /**
     * @return self
     */
    public function getKeysArray() : Type
    {
        $keyTypes = [];
        $valueTypes = [];
        $optionalKeys = [];
        $autoIndex = 0;
        foreach ($this->keyTypes as $i => $keyType) {
            $keyTypes[] = new \PHPStan\Type\Constant\ConstantIntegerType($i);
            $valueTypes[] = $keyType;
            $autoIndex++;
            if (!$this->isOptionalKey($i)) {
                continue;
            }
            $optionalKeys[] = $i;
        }
        return new self($keyTypes, $valueTypes, $autoIndex, $optionalKeys, \true);
    }
    /**
     * @return self
     */
    public function getValuesArray() : Type
    {
        $keyTypes = [];
        $valueTypes = [];
        $optionalKeys = [];
        $autoIndex = 0;
        foreach ($this->valueTypes as $i => $valueType) {
            $keyTypes[] = new \PHPStan\Type\Constant\ConstantIntegerType($i);
            $valueTypes[] = $valueType;
            $autoIndex++;
            if (!$this->isOptionalKey($i)) {
                continue;
            }
            $optionalKeys[] = $i;
        }
        return new self($keyTypes, $valueTypes, $autoIndex, $optionalKeys, \true);
    }
    /** @deprecated Use getArraySize() instead */
    public function count() : Type
    {
        return $this->getArraySize();
    }
    public function describe(VerbosityLevel $level) : string
    {
        $describeValue = function (bool $truncate) use($level) : string {
            $items = [];
            $values = [];
            $exportValuesOnly = \true;
            foreach ($this->keyTypes as $i => $keyType) {
                $valueType = $this->valueTypes[$i];
                if ($keyType->getValue() !== $i) {
                    $exportValuesOnly = \false;
                }
                $isOptional = $this->isOptionalKey($i);
                if ($isOptional) {
                    $exportValuesOnly = \false;
                }
                $keyDescription = $keyType->getValue();
                if (is_string($keyDescription)) {
                    if (strpos($keyDescription, '"') !== \false) {
                        $keyDescription = sprintf('\'%s\'', $keyDescription);
                    } elseif (strpos($keyDescription, '\'') !== \false) {
                        $keyDescription = sprintf('"%s"', $keyDescription);
                    }
                }
                $valueTypeDescription = $valueType->describe($level);
                $items[] = sprintf('%s%s: %s', $keyDescription, $isOptional ? '?' : '', $valueTypeDescription);
                $values[] = $valueTypeDescription;
            }
            $append = '';
            if ($truncate && count($items) > self::DESCRIBE_LIMIT) {
                $items = array_slice($items, 0, self::DESCRIBE_LIMIT);
                $values = array_slice($values, 0, self::DESCRIBE_LIMIT);
                $append = ', ...';
            }
            return sprintf('array{%s%s}', implode(', ', $exportValuesOnly ? $values : $items), $append);
        };
        return $level->handle(function () use($level) : string {
            return parent::describe($level);
        }, static function () use($describeValue) : string {
            return $describeValue(\true);
        }, static function () use($describeValue) : string {
            return $describeValue(\false);
        });
    }
    public function inferTemplateTypes(Type $receivedType) : TemplateTypeMap
    {
        if ($receivedType instanceof UnionType || $receivedType instanceof IntersectionType) {
            return $receivedType->inferTemplateTypesOn($this);
        }
        if ($receivedType instanceof self) {
            $typeMap = TemplateTypeMap::createEmpty();
            foreach ($this->keyTypes as $i => $keyType) {
                $valueType = $this->valueTypes[$i];
                if ($receivedType->hasOffsetValueType($keyType)->no()) {
                    continue;
                }
                $receivedValueType = $receivedType->getOffsetValueType($keyType);
                $typeMap = $typeMap->union($valueType->inferTemplateTypes($receivedValueType));
            }
            return $typeMap;
        }
        return parent::inferTemplateTypes($receivedType);
    }
    public function getReferencedTemplateTypes(TemplateTypeVariance $positionVariance) : array
    {
        $variance = $positionVariance->compose(TemplateTypeVariance::createInvariant());
        $references = [];
        foreach ($this->keyTypes as $type) {
            foreach ($type->getReferencedTemplateTypes($variance) as $reference) {
                $references[] = $reference;
            }
        }
        foreach ($this->valueTypes as $type) {
            foreach ($type->getReferencedTemplateTypes($variance) as $reference) {
                $references[] = $reference;
            }
        }
        return $references;
    }
    public function traverse(callable $cb) : Type
    {
        $valueTypes = [];
        $stillOriginal = \true;
        foreach ($this->valueTypes as $valueType) {
            $transformedValueType = $cb($valueType);
            if ($transformedValueType !== $valueType) {
                $stillOriginal = \false;
            }
            $valueTypes[] = $transformedValueType;
        }
        if ($stillOriginal) {
            return $this;
        }
        return new self($this->keyTypes, $valueTypes, $this->nextAutoIndexes, $this->optionalKeys, $this->isList);
    }
    public function traverseSimultaneously(Type $right, callable $cb) : Type
    {
        if (!$right->isArray()->yes()) {
            return $this;
        }
        $valueTypes = [];
        $stillOriginal = \true;
        foreach ($this->valueTypes as $i => $valueType) {
            $keyType = $this->keyTypes[$i];
            $transformedValueType = $cb($valueType, $right->getOffsetValueType($keyType));
            if ($transformedValueType !== $valueType) {
                $stillOriginal = \false;
            }
            $valueTypes[] = $transformedValueType;
        }
        if ($stillOriginal) {
            return $this;
        }
        return new self($this->keyTypes, $valueTypes, $this->nextAutoIndexes, $this->optionalKeys, $this->isList);
    }
    public function isKeysSupersetOf(self $otherArray) : bool
    {
        $keyTypesCount = count($this->keyTypes);
        $otherKeyTypesCount = count($otherArray->keyTypes);
        if ($keyTypesCount < $otherKeyTypesCount) {
            return \false;
        }
        if ($otherKeyTypesCount === 0) {
            return $keyTypesCount === 0;
        }
        $failOnDifferentValueType = $keyTypesCount !== $otherKeyTypesCount || $keyTypesCount < 2;
        $keyTypes = $this->keyTypes;
        foreach ($otherArray->keyTypes as $j => $keyType) {
            $i = self::findKeyIndex($keyType, $keyTypes);
            if ($i === null) {
                return \false;
            }
            unset($keyTypes[$i]);
            $valueType = $this->valueTypes[$i];
            $otherValueType = $otherArray->valueTypes[$j];
            if (!$otherValueType->isSuperTypeOf($valueType)->no()) {
                continue;
            }
            if ($failOnDifferentValueType) {
                return \false;
            }
            $failOnDifferentValueType = \true;
        }
        $requiredKeyCount = 0;
        foreach (array_keys($keyTypes) as $i) {
            if ($this->isOptionalKey($i)) {
                continue;
            }
            $requiredKeyCount++;
            if ($requiredKeyCount > 1) {
                return \false;
            }
        }
        return \true;
    }
    public function mergeWith(self $otherArray) : self
    {
        // only call this after verifying isKeysSupersetOf
        $valueTypes = $this->valueTypes;
        $optionalKeys = $this->optionalKeys;
        foreach ($this->keyTypes as $i => $keyType) {
            $otherIndex = $otherArray->getKeyIndex($keyType);
            if ($otherIndex === null) {
                $optionalKeys[] = $i;
                continue;
            }
            if ($otherArray->isOptionalKey($otherIndex)) {
                $optionalKeys[] = $i;
            }
            $otherValueType = $otherArray->valueTypes[$otherIndex];
            $valueTypes[$i] = TypeCombinator::union($valueTypes[$i], $otherValueType);
        }
        $optionalKeys = array_values(array_unique($optionalKeys));
        $nextAutoIndexes = array_values(array_unique(array_merge($this->nextAutoIndexes, $otherArray->nextAutoIndexes)));
        sort($nextAutoIndexes);
        return new self($this->keyTypes, $valueTypes, $nextAutoIndexes, $optionalKeys, $this->isList && $otherArray->isList);
    }
    /**
     * @param ConstantIntegerType|ConstantStringType $otherKeyType
     */
    private function getKeyIndex($otherKeyType) : ?int
    {
        return self::findKeyIndex($otherKeyType, $this->keyTypes);
    }
    /**
     * @param ConstantIntegerType|ConstantStringType $otherKeyType
     * @param array<int, ConstantIntegerType|ConstantStringType> $keyTypes
     */
    private static function findKeyIndex($otherKeyType, array $keyTypes) : ?int
    {
        foreach ($keyTypes as $i => $keyType) {
            if ($keyType->equals($otherKeyType)) {
                return $i;
            }
        }
        return null;
    }
    public function makeOffsetRequired(Type $offsetType) : self
    {
        $offsetType = $offsetType->toArrayKey();
        $optionalKeys = $this->optionalKeys;
        foreach ($this->keyTypes as $i => $keyType) {
            if (!$keyType->equals($offsetType)) {
                continue;
            }
            foreach ($optionalKeys as $j => $key) {
                if ($i === $key) {
                    unset($optionalKeys[$j]);
                    return new self($this->keyTypes, $this->valueTypes, $this->nextAutoIndexes, array_values($optionalKeys), $this->isList);
                }
            }
            break;
        }
        return $this;
    }
    public function toPhpDocNode() : TypeNode
    {
        $items = [];
        $values = [];
        $exportValuesOnly = \true;
        foreach ($this->keyTypes as $i => $keyType) {
            if ($keyType->getValue() !== $i) {
                $exportValuesOnly = \false;
            }
            $keyPhpDocNode = $keyType->toPhpDocNode();
            if (!$keyPhpDocNode instanceof ConstTypeNode) {
                continue;
            }
            $valueType = $this->valueTypes[$i];
            /** @var ConstExprStringNode|ConstExprIntegerNode $keyNode */
            $keyNode = $keyPhpDocNode->constExpr;
            if ($keyNode instanceof ConstExprStringNode) {
                $value = $keyNode->value;
                if (self::isValidIdentifier($value)) {
                    $keyNode = new IdentifierTypeNode($value);
                }
            }
            $isOptional = $this->isOptionalKey($i);
            if ($isOptional) {
                $exportValuesOnly = \false;
            }
            $items[] = new ArrayShapeItemNode($keyNode, $isOptional, $valueType->toPhpDocNode());
            $values[] = new ArrayShapeItemNode(null, $isOptional, $valueType->toPhpDocNode());
        }
        return new ArrayShapeNode($exportValuesOnly ? $values : $items);
    }
    public static function isValidIdentifier(string $value) : bool
    {
        $result = Strings::match($value, '~^(?:[\\\\]?+[a-z_\\x80-\\xFF][0-9a-z_\\x80-\\xFF-]*+)++$~si');
        return $result !== null;
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : Type
    {
        return new self($properties['keyTypes'], $properties['valueTypes'], $properties['nextAutoIndexes'] ?? $properties['nextAutoIndex'], $properties['optionalKeys'] ?? []);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Constant;

use PhpParser\Node\Expr;
use PhpParser\Node\Expr\Array_;
use PHPStan\Node\Expr\TypeExpr;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\Accessory\OversizedArrayType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\GeneralizePrecision;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\VerbosityLevel;
use function array_splice;
use function array_values;
use function count;
class OversizedArrayBuilder
{
    /**
     * @param callable(Expr): Type $getTypeCallback
     */
    public function build(Array_ $expr, callable $getTypeCallback) : Type
    {
        $isList = \true;
        $valueTypes = [];
        $keyTypes = [];
        $nextAutoIndex = 0;
        $items = $expr->items;
        for ($i = 0; $i < count($items); $i++) {
            $item = $items[$i];
            if ($item === null) {
                continue;
            }
            if (!$item->unpack) {
                continue;
            }
            $valueType = $getTypeCallback($item->value);
            if ($valueType instanceof \PHPStan\Type\Constant\ConstantArrayType) {
                array_splice($items, $i, 1);
                foreach ($valueType->getKeyTypes() as $j => $innerKeyType) {
                    $innerValueType = $valueType->getValueTypes()[$j];
                    if ($innerKeyType->isString()->no()) {
                        $keyExpr = null;
                    } else {
                        $keyExpr = new TypeExpr($innerKeyType);
                    }
                    array_splice($items, $i++, 0, [new Expr\ArrayItem(new TypeExpr($innerValueType), $keyExpr)]);
                }
            } else {
                array_splice($items, $i, 1, [new Expr\ArrayItem(new TypeExpr($valueType->getIterableValueType()), new TypeExpr($valueType->getIterableKeyType()))]);
            }
        }
        foreach ($items as $item) {
            if ($item === null) {
                continue;
            }
            if ($item->unpack) {
                throw new ShouldNotHappenException();
            }
            if ($item->key !== null) {
                $itemKeyType = $getTypeCallback($item->key);
                if (!$itemKeyType instanceof \PHPStan\Type\Constant\ConstantIntegerType) {
                    $isList = \false;
                } elseif ($itemKeyType->getValue() !== $nextAutoIndex) {
                    $isList = \false;
                    $nextAutoIndex = $itemKeyType->getValue() + 1;
                } else {
                    $nextAutoIndex++;
                }
            } else {
                $itemKeyType = new \PHPStan\Type\Constant\ConstantIntegerType($nextAutoIndex);
                $nextAutoIndex++;
            }
            $generalizedKeyType = $itemKeyType->generalize(GeneralizePrecision::moreSpecific());
            $keyTypes[$generalizedKeyType->describe(VerbosityLevel::precise())] = $generalizedKeyType;
            $itemValueType = $getTypeCallback($item->value);
            $generalizedValueType = $itemValueType->generalize(GeneralizePrecision::moreSpecific());
            $valueTypes[$generalizedValueType->describe(VerbosityLevel::precise())] = $generalizedValueType;
        }
        $keyType = TypeCombinator::union(...array_values($keyTypes));
        $valueType = TypeCombinator::union(...array_values($valueTypes));
        $arrayType = new ArrayType($keyType, $valueType);
        if ($isList) {
            $arrayType = AccessoryArrayListType::intersectWith($arrayType);
        }
        return TypeCombinator::intersect($arrayType, new NonEmptyArrayType(), new OversizedArrayType());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Constant;

use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprIntegerNode;
use PHPStan\PhpDocParser\Ast\Type\ConstTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\TrinaryLogic;
use PHPStan\Type\CompoundType;
use PHPStan\Type\ConstantScalarType;
use PHPStan\Type\GeneralizePrecision;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\Traits\ConstantNumericComparisonTypeTrait;
use PHPStan\Type\Traits\ConstantScalarTypeTrait;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/** @api */
class ConstantIntegerType extends IntegerType implements ConstantScalarType
{
    use ConstantScalarTypeTrait;
    use \PHPStan\Type\Constant\ConstantScalarToBooleanTrait;
    use ConstantNumericComparisonTypeTrait;
    /**
     * @var int
     */
    private $value;
    /** @api */
    public function __construct(int $value)
    {
        $this->value = $value;
        parent::__construct();
    }
    public function getValue() : int
    {
        return $this->value;
    }
    public function isSuperTypeOf(Type $type) : TrinaryLogic
    {
        if ($type instanceof self) {
            return $this->value === $type->value ? TrinaryLogic::createYes() : TrinaryLogic::createNo();
        }
        if ($type instanceof IntegerRangeType) {
            $min = $type->getMin();
            $max = $type->getMax();
            if (($min === null || $min <= $this->value) && ($max === null || $this->value <= $max)) {
                return TrinaryLogic::createMaybe();
            }
            return TrinaryLogic::createNo();
        }
        if ($type instanceof parent) {
            return TrinaryLogic::createMaybe();
        }
        if ($type instanceof CompoundType) {
            return $type->isSubTypeOf($this);
        }
        return TrinaryLogic::createNo();
    }
    public function describe(VerbosityLevel $level) : string
    {
        return $level->handle(static function () : string {
            return 'int';
        }, function () : string {
            return sprintf('%s', $this->value);
        });
    }
    public function toFloat() : Type
    {
        return new \PHPStan\Type\Constant\ConstantFloatType($this->value);
    }
    public function toString() : Type
    {
        return new \PHPStan\Type\Constant\ConstantStringType((string) $this->value);
    }
    public function toArrayKey() : Type
    {
        return $this;
    }
    public function generalize(GeneralizePrecision $precision) : Type
    {
        return new IntegerType();
    }
    /**
     * @return ConstTypeNode
     */
    public function toPhpDocNode() : TypeNode
    {
        return new ConstTypeNode(new ConstExprIntegerNode((string) $this->value));
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : Type
    {
        return new self($properties['value']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Constant;

use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\Accessory\OversizedArrayType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypeUtils;
use function array_filter;
use function array_map;
use function array_unique;
use function array_values;
use function count;
use function in_array;
use function is_float;
use function max;
use function range;
/** @api */
class ConstantArrayTypeBuilder
{
    public const ARRAY_COUNT_LIMIT = 256;
    /**
     * @var bool
     */
    private $degradeToGeneralArray = \false;
    /**
     * @var bool
     */
    private $oversized = \false;
    /**
     * @var array<int, Type>
     */
    private $keyTypes;
    /**
     * @var array<int, Type>
     */
    private $valueTypes;
    /**
     * @var non-empty-list<int>
     */
    private $nextAutoIndexes;
    /**
     * @var array<int>
     */
    private $optionalKeys;
    /**
     * @var bool
     */
    private $isList;
    /**
     * @param array<int, Type> $keyTypes
     * @param array<int, Type> $valueTypes
     * @param non-empty-list<int> $nextAutoIndexes
     * @param array<int> $optionalKeys
     */
    private function __construct(array $keyTypes, array $valueTypes, array $nextAutoIndexes, array $optionalKeys, bool $isList)
    {
        $this->keyTypes = $keyTypes;
        $this->valueTypes = $valueTypes;
        $this->nextAutoIndexes = $nextAutoIndexes;
        $this->optionalKeys = $optionalKeys;
        $this->isList = $isList;
    }
    public static function createEmpty() : self
    {
        return new self([], [], [0], [], \true);
    }
    public static function createFromConstantArray(\PHPStan\Type\Constant\ConstantArrayType $startArrayType) : self
    {
        $builder = new self($startArrayType->getKeyTypes(), $startArrayType->getValueTypes(), $startArrayType->getNextAutoIndexes(), $startArrayType->getOptionalKeys(), $startArrayType->isList()->yes());
        if (count($startArrayType->getKeyTypes()) > self::ARRAY_COUNT_LIMIT) {
            $builder->degradeToGeneralArray(\true);
        }
        return $builder;
    }
    public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $optional = \false) : void
    {
        if ($offsetType !== null) {
            $offsetType = $offsetType->toArrayKey();
        }
        if (!$this->degradeToGeneralArray) {
            if ($offsetType === null) {
                $newAutoIndexes = $optional ? $this->nextAutoIndexes : [];
                $hasOptional = \false;
                foreach ($this->keyTypes as $i => $keyType) {
                    if (!$keyType instanceof \PHPStan\Type\Constant\ConstantIntegerType) {
                        continue;
                    }
                    if (!in_array($keyType->getValue(), $this->nextAutoIndexes, \true)) {
                        continue;
                    }
                    $this->valueTypes[$i] = TypeCombinator::union($this->valueTypes[$i], $valueType);
                    if (!$hasOptional && !$optional) {
                        $this->optionalKeys = array_values(array_filter($this->optionalKeys, static function (int $index) use($i) : bool {
                            return $index !== $i;
                        }));
                    }
                    /** @var int|float $newAutoIndex */
                    $newAutoIndex = $keyType->getValue() + 1;
                    if (is_float($newAutoIndex)) {
                        $newAutoIndex = $keyType->getValue();
                    }
                    $newAutoIndexes[] = $newAutoIndex;
                    $hasOptional = \true;
                }
                $max = max($this->nextAutoIndexes);
                $this->keyTypes[] = new \PHPStan\Type\Constant\ConstantIntegerType($max);
                $this->valueTypes[] = $valueType;
                /** @var int|float $newAutoIndex */
                $newAutoIndex = $max + 1;
                if (is_float($newAutoIndex)) {
                    $newAutoIndex = $max;
                }
                $newAutoIndexes[] = $newAutoIndex;
                $this->nextAutoIndexes = array_values(array_unique($newAutoIndexes));
                if ($optional || $hasOptional) {
                    $this->optionalKeys[] = count($this->keyTypes) - 1;
                }
                if (count($this->keyTypes) > self::ARRAY_COUNT_LIMIT) {
                    $this->degradeToGeneralArray = \true;
                }
                return;
            }
            if ($offsetType instanceof \PHPStan\Type\Constant\ConstantIntegerType || $offsetType instanceof \PHPStan\Type\Constant\ConstantStringType) {
                /** @var ConstantIntegerType|ConstantStringType $keyType */
                foreach ($this->keyTypes as $i => $keyType) {
                    if ($keyType->getValue() !== $offsetType->getValue()) {
                        continue;
                    }
                    if ($optional) {
                        $valueType = TypeCombinator::union($valueType, $this->valueTypes[$i]);
                    }
                    $this->valueTypes[$i] = $valueType;
                    if (!$optional) {
                        $this->optionalKeys = array_values(array_filter($this->optionalKeys, static function (int $index) use($i) : bool {
                            return $index !== $i;
                        }));
                        if ($keyType instanceof \PHPStan\Type\Constant\ConstantIntegerType) {
                            $nextAutoIndexes = array_values(array_filter($this->nextAutoIndexes, static function (int $index) use($keyType) {
                                return $index > $keyType->getValue();
                            }));
                            if (count($nextAutoIndexes) === 0) {
                                throw new ShouldNotHappenException();
                            }
                            $this->nextAutoIndexes = $nextAutoIndexes;
                        }
                    }
                    return;
                }
                $this->keyTypes[] = $offsetType;
                $this->valueTypes[] = $valueType;
                if ($offsetType instanceof \PHPStan\Type\Constant\ConstantIntegerType) {
                    $max = max($this->nextAutoIndexes);
                    if ($offsetType->getValue() !== $max) {
                        $this->isList = \false;
                    }
                    if ($offsetType->getValue() >= $max) {
                        /** @var int|float $newAutoIndex */
                        $newAutoIndex = $offsetType->getValue() + 1;
                        if (is_float($newAutoIndex)) {
                            $newAutoIndex = $max;
                        }
                        if (!$optional) {
                            $this->nextAutoIndexes = [$newAutoIndex];
                        } else {
                            $this->nextAutoIndexes[] = $newAutoIndex;
                        }
                    }
                } else {
                    $this->isList = \false;
                }
                if ($optional) {
                    $this->optionalKeys[] = count($this->keyTypes) - 1;
                }
                if (count($this->keyTypes) > self::ARRAY_COUNT_LIMIT) {
                    $this->degradeToGeneralArray = \true;
                }
                return;
            }
            $this->isList = \false;
            $scalarTypes = $offsetType->getConstantScalarTypes();
            if (count($scalarTypes) === 0) {
                $integerRanges = TypeUtils::getIntegerRanges($offsetType);
                if (count($integerRanges) > 0) {
                    foreach ($integerRanges as $integerRange) {
                        if ($integerRange->getMin() === null) {
                            break;
                        }
                        if ($integerRange->getMax() === null) {
                            break;
                        }
                        $rangeLength = $integerRange->getMax() - $integerRange->getMin();
                        if ($rangeLength >= self::ARRAY_COUNT_LIMIT) {
                            $scalarTypes = [];
                            break;
                        }
                        foreach (range($integerRange->getMin(), $integerRange->getMax()) as $rangeValue) {
                            $scalarTypes[] = new \PHPStan\Type\Constant\ConstantIntegerType($rangeValue);
                        }
                    }
                }
            }
            if (count($scalarTypes) > 0 && count($scalarTypes) < self::ARRAY_COUNT_LIMIT) {
                $match = \true;
                $valueTypes = $this->valueTypes;
                foreach ($scalarTypes as $scalarType) {
                    $scalarOffsetType = $scalarType->toArrayKey();
                    if (!$scalarOffsetType instanceof \PHPStan\Type\Constant\ConstantIntegerType && !$scalarOffsetType instanceof \PHPStan\Type\Constant\ConstantStringType) {
                        throw new ShouldNotHappenException();
                    }
                    $offsetMatch = \false;
                    /** @var ConstantIntegerType|ConstantStringType $keyType */
                    foreach ($this->keyTypes as $i => $keyType) {
                        if ($keyType->getValue() !== $scalarOffsetType->getValue()) {
                            continue;
                        }
                        $valueTypes[$i] = TypeCombinator::union($valueTypes[$i], $valueType);
                        $offsetMatch = \true;
                    }
                    if ($offsetMatch) {
                        continue;
                    }
                    $match = \false;
                }
                if ($match) {
                    $this->valueTypes = $valueTypes;
                    return;
                }
            }
        }
        if ($offsetType === null) {
            $offsetType = TypeCombinator::union(...array_map(static function (int $index) {
                return new \PHPStan\Type\Constant\ConstantIntegerType($index);
            }, $this->nextAutoIndexes));
        } else {
            $this->isList = \false;
        }
        $this->keyTypes[] = $offsetType;
        $this->valueTypes[] = $valueType;
        if ($optional) {
            $this->optionalKeys[] = count($this->keyTypes) - 1;
        }
        $this->degradeToGeneralArray = \true;
    }
    public function degradeToGeneralArray(bool $oversized = \false) : void
    {
        $this->degradeToGeneralArray = \true;
        $this->oversized = $this->oversized || $oversized;
    }
    public function getArray() : Type
    {
        $keyTypesCount = count($this->keyTypes);
        if ($keyTypesCount === 0) {
            return new \PHPStan\Type\Constant\ConstantArrayType([], []);
        }
        if (!$this->degradeToGeneralArray) {
            /** @var array<int, ConstantIntegerType|ConstantStringType> $keyTypes */
            $keyTypes = $this->keyTypes;
            return new \PHPStan\Type\Constant\ConstantArrayType($keyTypes, $this->valueTypes, $this->nextAutoIndexes, $this->optionalKeys, $this->isList);
        }
        $array = new ArrayType(TypeCombinator::union(...$this->keyTypes), TypeCombinator::union(...$this->valueTypes));
        if (count($this->optionalKeys) < $keyTypesCount) {
            $array = TypeCombinator::intersect($array, new NonEmptyArrayType());
        }
        if ($this->oversized) {
            $array = TypeCombinator::intersect($array, new OversizedArrayType());
        }
        if ($this->isList) {
            $array = AccessoryArrayListType::intersectWith($array);
        }
        return $array;
    }
    public function isList() : bool
    {
        return $this->isList;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Constant;

use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprFloatNode;
use PHPStan\PhpDocParser\Ast\Type\ConstTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\TrinaryLogic;
use PHPStan\Type\CompoundType;
use PHPStan\Type\ConstantScalarType;
use PHPStan\Type\FloatType;
use PHPStan\Type\GeneralizePrecision;
use PHPStan\Type\Traits\ConstantNumericComparisonTypeTrait;
use PHPStan\Type\Traits\ConstantScalarTypeTrait;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use function abs;
use function is_finite;
use function rtrim;
use function sprintf;
use function strpos;
use const PHP_FLOAT_EPSILON;
/** @api */
class ConstantFloatType extends FloatType implements ConstantScalarType
{
    use ConstantScalarTypeTrait;
    use \PHPStan\Type\Constant\ConstantScalarToBooleanTrait;
    use ConstantNumericComparisonTypeTrait;
    /**
     * @var float
     */
    private $value;
    /** @api */
    public function __construct(float $value)
    {
        $this->value = $value;
        parent::__construct();
    }
    public function getValue() : float
    {
        return $this->value;
    }
    public function equals(Type $type) : bool
    {
        return $type instanceof self && abs($this->value - $type->value) < PHP_FLOAT_EPSILON;
    }
    public function describe(VerbosityLevel $level) : string
    {
        return $level->handle(static function () : string {
            return 'float';
        }, function () : string {
            $formatted = (string) $this->value;
            if (is_finite($this->value) && strpos($formatted, '.') === \false) {
                $formatted .= '.0';
            }
            return $formatted;
        });
    }
    public function isSuperTypeOf(Type $type) : TrinaryLogic
    {
        if ($type instanceof self) {
            if (!$this->equals($type)) {
                if (abs($this->value - $type->value) < PHP_FLOAT_EPSILON) {
                    return TrinaryLogic::createMaybe();
                }
                return TrinaryLogic::createNo();
            }
            return TrinaryLogic::createYes();
        }
        if ($type instanceof parent) {
            return TrinaryLogic::createMaybe();
        }
        if ($type instanceof CompoundType) {
            return $type->isSubTypeOf($this);
        }
        return TrinaryLogic::createNo();
    }
    public function toString() : Type
    {
        return new \PHPStan\Type\Constant\ConstantStringType((string) $this->value);
    }
    public function toInteger() : Type
    {
        return new \PHPStan\Type\Constant\ConstantIntegerType((int) $this->value);
    }
    public function toArrayKey() : Type
    {
        return new \PHPStan\Type\Constant\ConstantIntegerType((int) $this->value);
    }
    public function generalize(GeneralizePrecision $precision) : Type
    {
        return new FloatType();
    }
    /**
     * @return ConstTypeNode
     */
    public function toPhpDocNode() : TypeNode
    {
        return new ConstTypeNode(new ConstExprFloatNode(rtrim(rtrim(sprintf('%.20f', $this->value), '0'), '.')));
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : Type
    {
        return new self($properties['value']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use ArrayAccess;
use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\Reflection\ClassMemberAccessAnswerer;
use PHPStan\Reflection\ConstantReflection;
use PHPStan\Reflection\Dummy\DummyConstantReflection;
use PHPStan\Reflection\Dummy\DummyMethodReflection;
use PHPStan\Reflection\Dummy\DummyPropertyReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Reflection\TrivialParametersAcceptor;
use PHPStan\Reflection\Type\CallbackUnresolvedMethodPrototypeReflection;
use PHPStan\Reflection\Type\CallbackUnresolvedPropertyPrototypeReflection;
use PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection;
use PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\Accessory\AccessoryLiteralStringType;
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
use PHPStan\Type\Accessory\AccessoryNonFalsyStringType;
use PHPStan\Type\Accessory\AccessoryNumericStringType;
use PHPStan\Type\Accessory\OversizedArrayType;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Generic\TemplateMixedType;
use PHPStan\Type\Generic\TemplateType;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use PHPStan\Type\Traits\NonGenericTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
use function sprintf;
/** @api */
class MixedType implements \PHPStan\Type\CompoundType, \PHPStan\Type\SubtractableType
{
    use NonGenericTypeTrait;
    use UndecidedComparisonCompoundTypeTrait;
    use NonGeneralizableTypeTrait;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $subtractedType;
    /**
     * @var bool
     */
    private $isExplicitMixed = \false;
    /** @api */
    public function __construct(bool $isExplicitMixed = \false, ?\PHPStan\Type\Type $subtractedType = null)
    {
        $this->isExplicitMixed = $isExplicitMixed;
        if ($subtractedType instanceof \PHPStan\Type\NeverType) {
            $subtractedType = null;
        }
        $this->subtractedType = $subtractedType;
    }
    /**
     * @return string[]
     */
    public function getReferencedClasses() : array
    {
        return [];
    }
    public function getObjectClassNames() : array
    {
        return [];
    }
    public function getObjectClassReflections() : array
    {
        return [];
    }
    public function getArrays() : array
    {
        return [];
    }
    public function getConstantArrays() : array
    {
        return [];
    }
    public function getConstantStrings() : array
    {
        return [];
    }
    public function accepts(\PHPStan\Type\Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(\PHPStan\Type\Type $type, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        return \PHPStan\Type\AcceptsResult::createYes();
    }
    public function isSuperTypeOfMixed(\PHPStan\Type\MixedType $type) : TrinaryLogic
    {
        if ($this->subtractedType === null) {
            if ($this->isExplicitMixed) {
                if ($type->isExplicitMixed) {
                    return TrinaryLogic::createYes();
                }
                return TrinaryLogic::createMaybe();
            }
            return TrinaryLogic::createYes();
        }
        if ($type->subtractedType === null) {
            return TrinaryLogic::createMaybe();
        }
        $isSuperType = $type->subtractedType->isSuperTypeOf($this->subtractedType);
        if ($isSuperType->yes()) {
            if ($this->isExplicitMixed) {
                if ($type->isExplicitMixed) {
                    return TrinaryLogic::createYes();
                }
                return TrinaryLogic::createMaybe();
            }
            return TrinaryLogic::createYes();
        }
        return TrinaryLogic::createMaybe();
    }
    public function isSuperTypeOf(\PHPStan\Type\Type $type) : TrinaryLogic
    {
        if ($this->subtractedType === null || $type instanceof \PHPStan\Type\NeverType) {
            return TrinaryLogic::createYes();
        }
        if ($type instanceof self) {
            if ($type->subtractedType === null) {
                return TrinaryLogic::createMaybe();
            }
            $isSuperType = $type->subtractedType->isSuperTypeOf($this->subtractedType);
            if ($isSuperType->yes()) {
                return TrinaryLogic::createYes();
            }
            return TrinaryLogic::createMaybe();
        }
        return $this->subtractedType->isSuperTypeOf($type)->negate();
    }
    public function setOffsetValueType(?\PHPStan\Type\Type $offsetType, \PHPStan\Type\Type $valueType, bool $unionValues = \true) : \PHPStan\Type\Type
    {
        return new self($this->isExplicitMixed);
    }
    public function unsetOffset(\PHPStan\Type\Type $offsetType) : \PHPStan\Type\Type
    {
        if ($this->subtractedType !== null) {
            return new self($this->isExplicitMixed, \PHPStan\Type\TypeCombinator::remove($this->subtractedType, new ConstantArrayType([], [])));
        }
        return $this;
    }
    public function getKeysArray() : \PHPStan\Type\Type
    {
        if ($this->isArray()->no()) {
            return new \PHPStan\Type\ErrorType();
        }
        return AccessoryArrayListType::intersectWith(new \PHPStan\Type\ArrayType(new \PHPStan\Type\IntegerType(), new \PHPStan\Type\UnionType([new \PHPStan\Type\IntegerType(), new \PHPStan\Type\StringType()])));
    }
    public function getValuesArray() : \PHPStan\Type\Type
    {
        if ($this->isArray()->no()) {
            return new \PHPStan\Type\ErrorType();
        }
        return AccessoryArrayListType::intersectWith(new \PHPStan\Type\ArrayType(new \PHPStan\Type\IntegerType(), new \PHPStan\Type\MixedType($this->isExplicitMixed)));
    }
    public function fillKeysArray(\PHPStan\Type\Type $valueType) : \PHPStan\Type\Type
    {
        if ($this->isArray()->no()) {
            return new \PHPStan\Type\ErrorType();
        }
        return new \PHPStan\Type\ArrayType($this->getIterableValueType(), $valueType);
    }
    public function flipArray() : \PHPStan\Type\Type
    {
        if ($this->isArray()->no()) {
            return new \PHPStan\Type\ErrorType();
        }
        return new \PHPStan\Type\ArrayType(new \PHPStan\Type\MixedType($this->isExplicitMixed), new \PHPStan\Type\MixedType($this->isExplicitMixed));
    }
    public function intersectKeyArray(\PHPStan\Type\Type $otherArraysType) : \PHPStan\Type\Type
    {
        if ($this->isArray()->no()) {
            return new \PHPStan\Type\ErrorType();
        }
        return new \PHPStan\Type\ArrayType(new \PHPStan\Type\MixedType($this->isExplicitMixed), new \PHPStan\Type\MixedType($this->isExplicitMixed));
    }
    public function popArray() : \PHPStan\Type\Type
    {
        if ($this->isArray()->no()) {
            return new \PHPStan\Type\ErrorType();
        }
        return new \PHPStan\Type\ArrayType(new \PHPStan\Type\MixedType($this->isExplicitMixed), new \PHPStan\Type\MixedType($this->isExplicitMixed));
    }
    public function searchArray(\PHPStan\Type\Type $needleType) : \PHPStan\Type\Type
    {
        if ($this->isArray()->no()) {
            return new \PHPStan\Type\ErrorType();
        }
        return \PHPStan\Type\TypeCombinator::union(new \PHPStan\Type\IntegerType(), new \PHPStan\Type\StringType(), new ConstantBooleanType(\false));
    }
    public function shiftArray() : \PHPStan\Type\Type
    {
        if ($this->isArray()->no()) {
            return new \PHPStan\Type\ErrorType();
        }
        return new \PHPStan\Type\ArrayType(new \PHPStan\Type\MixedType($this->isExplicitMixed), new \PHPStan\Type\MixedType($this->isExplicitMixed));
    }
    public function shuffleArray() : \PHPStan\Type\Type
    {
        if ($this->isArray()->no()) {
            return new \PHPStan\Type\ErrorType();
        }
        return AccessoryArrayListType::intersectWith(new \PHPStan\Type\ArrayType(new \PHPStan\Type\IntegerType(), new \PHPStan\Type\MixedType($this->isExplicitMixed)));
    }
    public function isCallable() : TrinaryLogic
    {
        if ($this->subtractedType !== null) {
            if ($this->subtractedType->isSuperTypeOf(new \PHPStan\Type\CallableType())->yes()) {
                return TrinaryLogic::createNo();
            }
        }
        return TrinaryLogic::createMaybe();
    }
    public function getEnumCases() : array
    {
        return [];
    }
    /**
     * @return ParametersAcceptor[]
     */
    public function getCallableParametersAcceptors(ClassMemberAccessAnswerer $scope) : array
    {
        return [new TrivialParametersAcceptor()];
    }
    public function equals(\PHPStan\Type\Type $type) : bool
    {
        if (!$type instanceof self) {
            return \false;
        }
        if ($this->subtractedType === null) {
            if ($type->subtractedType === null) {
                return \true;
            }
            return \false;
        }
        if ($type->subtractedType === null) {
            return \false;
        }
        return $this->subtractedType->equals($type->subtractedType);
    }
    public function isSubTypeOf(\PHPStan\Type\Type $otherType) : TrinaryLogic
    {
        if ($otherType instanceof self && !$otherType instanceof TemplateMixedType) {
            return TrinaryLogic::createYes();
        }
        if ($this->subtractedType !== null) {
            $isSuperType = $this->subtractedType->isSuperTypeOf($otherType);
            if ($isSuperType->yes()) {
                return TrinaryLogic::createNo();
            }
        }
        return TrinaryLogic::createMaybe();
    }
    public function isAcceptedBy(\PHPStan\Type\Type $acceptingType, bool $strictTypes) : TrinaryLogic
    {
        return $this->isAcceptedWithReasonBy($acceptingType, $strictTypes)->result;
    }
    public function isAcceptedWithReasonBy(\PHPStan\Type\Type $acceptingType, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        $isSuperType = new \PHPStan\Type\AcceptsResult($this->isSuperTypeOf($acceptingType), []);
        if ($isSuperType->no()) {
            return $isSuperType;
        }
        return \PHPStan\Type\AcceptsResult::createYes();
    }
    public function getTemplateType(string $ancestorClassName, string $templateTypeName) : \PHPStan\Type\Type
    {
        return new self();
    }
    public function isObject() : TrinaryLogic
    {
        if ($this->subtractedType !== null) {
            if ($this->subtractedType->isSuperTypeOf(new \PHPStan\Type\ObjectWithoutClassType())->yes()) {
                return TrinaryLogic::createNo();
            }
        }
        return TrinaryLogic::createMaybe();
    }
    public function isEnum() : TrinaryLogic
    {
        if ($this->subtractedType !== null) {
            if ($this->subtractedType->isSuperTypeOf(new \PHPStan\Type\ObjectWithoutClassType())->yes()) {
                return TrinaryLogic::createNo();
            }
        }
        return TrinaryLogic::createMaybe();
    }
    public function canAccessProperties() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function hasProperty(string $propertyName) : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function getProperty(string $propertyName, ClassMemberAccessAnswerer $scope) : PropertyReflection
    {
        return $this->getUnresolvedPropertyPrototype($propertyName, $scope)->getTransformedProperty();
    }
    public function getUnresolvedPropertyPrototype(string $propertyName, ClassMemberAccessAnswerer $scope) : UnresolvedPropertyPrototypeReflection
    {
        $property = new DummyPropertyReflection();
        return new CallbackUnresolvedPropertyPrototypeReflection($property, $property->getDeclaringClass(), \false, static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type;
        });
    }
    public function canCallMethods() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function hasMethod(string $methodName) : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function getMethod(string $methodName, ClassMemberAccessAnswerer $scope) : ExtendedMethodReflection
    {
        return $this->getUnresolvedMethodPrototype($methodName, $scope)->getTransformedMethod();
    }
    public function getUnresolvedMethodPrototype(string $methodName, ClassMemberAccessAnswerer $scope) : UnresolvedMethodPrototypeReflection
    {
        $method = new DummyMethodReflection($methodName);
        return new CallbackUnresolvedMethodPrototypeReflection($method, $method->getDeclaringClass(), \false, static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type;
        });
    }
    public function canAccessConstants() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function hasConstant(string $constantName) : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function getConstant(string $constantName) : ConstantReflection
    {
        return new DummyConstantReflection($constantName);
    }
    public function isCloneable() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        return $level->handle(static function () : string {
            return 'mixed';
        }, static function () : string {
            return 'mixed';
        }, function () use($level) : string {
            $description = 'mixed';
            if ($this->subtractedType !== null) {
                $description .= sprintf('~%s', $this->subtractedType->describe($level));
            }
            return $description;
        }, function () use($level) : string {
            $description = 'mixed';
            if ($this->subtractedType !== null) {
                $description .= sprintf('~%s', $this->subtractedType->describe($level));
            }
            if ($this->isExplicitMixed) {
                $description .= '=explicit';
            } else {
                $description .= '=implicit';
            }
            return $description;
        });
    }
    public function toBoolean() : \PHPStan\Type\BooleanType
    {
        if ($this->subtractedType !== null && \PHPStan\Type\StaticTypeFactory::falsey()->equals($this->subtractedType)) {
            return new ConstantBooleanType(\true);
        }
        return new \PHPStan\Type\BooleanType();
    }
    public function toNumber() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\UnionType([$this->toInteger(), $this->toFloat()]);
    }
    public function toInteger() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\IntegerType();
    }
    public function toFloat() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\FloatType();
    }
    public function toString() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\StringType();
    }
    public function toArray() : \PHPStan\Type\Type
    {
        $mixed = new self($this->isExplicitMixed);
        return new \PHPStan\Type\ArrayType($mixed, $mixed);
    }
    public function toArrayKey() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\UnionType([new \PHPStan\Type\IntegerType(), new \PHPStan\Type\StringType()]);
    }
    public function isIterable() : TrinaryLogic
    {
        if ($this->subtractedType !== null) {
            if ($this->subtractedType->isSuperTypeOf(new \PHPStan\Type\IterableType(new \PHPStan\Type\MixedType(), new \PHPStan\Type\MixedType()))->yes()) {
                return TrinaryLogic::createNo();
            }
        }
        return TrinaryLogic::createMaybe();
    }
    public function isIterableAtLeastOnce() : TrinaryLogic
    {
        return $this->isIterable();
    }
    public function getArraySize() : \PHPStan\Type\Type
    {
        if ($this->isIterable()->no()) {
            return new \PHPStan\Type\ErrorType();
        }
        return \PHPStan\Type\IntegerRangeType::fromInterval(0, null);
    }
    public function getIterableKeyType() : \PHPStan\Type\Type
    {
        return new self($this->isExplicitMixed);
    }
    public function getFirstIterableKeyType() : \PHPStan\Type\Type
    {
        return new self($this->isExplicitMixed);
    }
    public function getLastIterableKeyType() : \PHPStan\Type\Type
    {
        return new self($this->isExplicitMixed);
    }
    public function getIterableValueType() : \PHPStan\Type\Type
    {
        return new self($this->isExplicitMixed);
    }
    public function getFirstIterableValueType() : \PHPStan\Type\Type
    {
        return new self($this->isExplicitMixed);
    }
    public function getLastIterableValueType() : \PHPStan\Type\Type
    {
        return new self($this->isExplicitMixed);
    }
    public function isOffsetAccessible() : TrinaryLogic
    {
        if ($this->subtractedType !== null) {
            $offsetAccessibles = new \PHPStan\Type\UnionType([new \PHPStan\Type\StringType(), new \PHPStan\Type\ArrayType(new \PHPStan\Type\MixedType(), new \PHPStan\Type\MixedType()), new \PHPStan\Type\ObjectType(ArrayAccess::class)]);
            if ($this->subtractedType->isSuperTypeOf($offsetAccessibles)->yes()) {
                return TrinaryLogic::createNo();
            }
        }
        return TrinaryLogic::createMaybe();
    }
    public function hasOffsetValueType(\PHPStan\Type\Type $offsetType) : TrinaryLogic
    {
        if ($this->isOffsetAccessible()->no()) {
            return TrinaryLogic::createNo();
        }
        return TrinaryLogic::createMaybe();
    }
    public function getOffsetValueType(\PHPStan\Type\Type $offsetType) : \PHPStan\Type\Type
    {
        return new self($this->isExplicitMixed);
    }
    public function isExplicitMixed() : bool
    {
        return $this->isExplicitMixed;
    }
    public function subtract(\PHPStan\Type\Type $type) : \PHPStan\Type\Type
    {
        if ($type instanceof self && !$type instanceof TemplateType) {
            return new \PHPStan\Type\NeverType();
        }
        if ($this->subtractedType !== null) {
            $type = \PHPStan\Type\TypeCombinator::union($this->subtractedType, $type);
        }
        return new self($this->isExplicitMixed, $type);
    }
    public function getTypeWithoutSubtractedType() : \PHPStan\Type\Type
    {
        return new self($this->isExplicitMixed);
    }
    public function changeSubtractedType(?\PHPStan\Type\Type $subtractedType) : \PHPStan\Type\Type
    {
        return new self($this->isExplicitMixed, $subtractedType);
    }
    public function getSubtractedType() : ?\PHPStan\Type\Type
    {
        return $this->subtractedType;
    }
    public function traverse(callable $cb) : \PHPStan\Type\Type
    {
        return $this;
    }
    public function traverseSimultaneously(\PHPStan\Type\Type $right, callable $cb) : \PHPStan\Type\Type
    {
        return $this;
    }
    public function isArray() : TrinaryLogic
    {
        if ($this->subtractedType !== null) {
            if ($this->subtractedType->isSuperTypeOf(new \PHPStan\Type\ArrayType(new \PHPStan\Type\MixedType(), new \PHPStan\Type\MixedType()))->yes()) {
                return TrinaryLogic::createNo();
            }
        }
        return TrinaryLogic::createMaybe();
    }
    public function isConstantArray() : TrinaryLogic
    {
        return $this->isArray();
    }
    public function isOversizedArray() : TrinaryLogic
    {
        if ($this->subtractedType !== null) {
            $oversizedArray = \PHPStan\Type\TypeCombinator::intersect(new \PHPStan\Type\ArrayType(new \PHPStan\Type\MixedType(), new \PHPStan\Type\MixedType()), new OversizedArrayType());
            if ($this->subtractedType->isSuperTypeOf($oversizedArray)->yes()) {
                return TrinaryLogic::createNo();
            }
        }
        return TrinaryLogic::createMaybe();
    }
    public function isList() : TrinaryLogic
    {
        if ($this->subtractedType !== null) {
            $list = \PHPStan\Type\TypeCombinator::intersect(new \PHPStan\Type\ArrayType(new \PHPStan\Type\IntegerType(), new \PHPStan\Type\MixedType()), new AccessoryArrayListType());
            if ($this->subtractedType->isSuperTypeOf($list)->yes()) {
                return TrinaryLogic::createNo();
            }
        }
        return TrinaryLogic::createMaybe();
    }
    public function isNull() : TrinaryLogic
    {
        if ($this->subtractedType !== null) {
            if ($this->subtractedType->isSuperTypeOf(new \PHPStan\Type\NullType())->yes()) {
                return TrinaryLogic::createNo();
            }
        }
        return TrinaryLogic::createMaybe();
    }
    public function isConstantValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantScalarValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getConstantScalarTypes() : array
    {
        return [];
    }
    public function getConstantScalarValues() : array
    {
        return [];
    }
    public function isTrue() : TrinaryLogic
    {
        if ($this->subtractedType !== null) {
            if ($this->subtractedType->isSuperTypeOf(new ConstantBooleanType(\true))->yes()) {
                return TrinaryLogic::createNo();
            }
        }
        return TrinaryLogic::createMaybe();
    }
    public function isFalse() : TrinaryLogic
    {
        if ($this->subtractedType !== null) {
            if ($this->subtractedType->isSuperTypeOf(new ConstantBooleanType(\false))->yes()) {
                return TrinaryLogic::createNo();
            }
        }
        return TrinaryLogic::createMaybe();
    }
    public function isBoolean() : TrinaryLogic
    {
        if ($this->subtractedType !== null) {
            if ($this->subtractedType->isSuperTypeOf(new \PHPStan\Type\BooleanType())->yes()) {
                return TrinaryLogic::createNo();
            }
        }
        return TrinaryLogic::createMaybe();
    }
    public function isFloat() : TrinaryLogic
    {
        if ($this->subtractedType !== null) {
            if ($this->subtractedType->isSuperTypeOf(new \PHPStan\Type\FloatType())->yes()) {
                return TrinaryLogic::createNo();
            }
        }
        return TrinaryLogic::createMaybe();
    }
    public function isInteger() : TrinaryLogic
    {
        if ($this->subtractedType !== null) {
            if ($this->subtractedType->isSuperTypeOf(new \PHPStan\Type\IntegerType())->yes()) {
                return TrinaryLogic::createNo();
            }
        }
        return TrinaryLogic::createMaybe();
    }
    public function isString() : TrinaryLogic
    {
        if ($this->subtractedType !== null) {
            if ($this->subtractedType->isSuperTypeOf(new \PHPStan\Type\StringType())->yes()) {
                return TrinaryLogic::createNo();
            }
        }
        return TrinaryLogic::createMaybe();
    }
    public function isNumericString() : TrinaryLogic
    {
        if ($this->subtractedType !== null) {
            $numericString = \PHPStan\Type\TypeCombinator::intersect(new \PHPStan\Type\StringType(), new AccessoryNumericStringType());
            if ($this->subtractedType->isSuperTypeOf($numericString)->yes()) {
                return TrinaryLogic::createNo();
            }
        }
        return TrinaryLogic::createMaybe();
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        if ($this->subtractedType !== null) {
            $nonEmptyString = \PHPStan\Type\TypeCombinator::intersect(new \PHPStan\Type\StringType(), new AccessoryNonEmptyStringType());
            if ($this->subtractedType->isSuperTypeOf($nonEmptyString)->yes()) {
                return TrinaryLogic::createNo();
            }
        }
        return TrinaryLogic::createMaybe();
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        if ($this->subtractedType !== null) {
            $nonFalsyString = \PHPStan\Type\TypeCombinator::intersect(new \PHPStan\Type\StringType(), new AccessoryNonFalsyStringType());
            if ($this->subtractedType->isSuperTypeOf($nonFalsyString)->yes()) {
                return TrinaryLogic::createNo();
            }
        }
        return TrinaryLogic::createMaybe();
    }
    public function isLiteralString() : TrinaryLogic
    {
        if ($this->subtractedType !== null) {
            $literalString = \PHPStan\Type\TypeCombinator::intersect(new \PHPStan\Type\StringType(), new AccessoryLiteralStringType());
            if ($this->subtractedType->isSuperTypeOf($literalString)->yes()) {
                return TrinaryLogic::createNo();
            }
        }
        return TrinaryLogic::createMaybe();
    }
    public function isClassStringType() : TrinaryLogic
    {
        if ($this->subtractedType !== null) {
            if ($this->subtractedType->isSuperTypeOf(new \PHPStan\Type\StringType())->yes()) {
                return TrinaryLogic::createNo();
            }
            if ($this->subtractedType->isSuperTypeOf(new \PHPStan\Type\ClassStringType())->yes()) {
                return TrinaryLogic::createNo();
            }
        }
        return TrinaryLogic::createMaybe();
    }
    public function getClassStringObjectType() : \PHPStan\Type\Type
    {
        if (!$this->isClassStringType()->no()) {
            return new \PHPStan\Type\ObjectWithoutClassType();
        }
        return new \PHPStan\Type\ErrorType();
    }
    public function getObjectTypeOrClassStringObjectType() : \PHPStan\Type\Type
    {
        $objectOrClass = new \PHPStan\Type\UnionType([new \PHPStan\Type\ObjectWithoutClassType(), new \PHPStan\Type\ClassStringType()]);
        if (!$this->isSuperTypeOf($objectOrClass)->no()) {
            return new \PHPStan\Type\ObjectWithoutClassType();
        }
        return new \PHPStan\Type\ErrorType();
    }
    public function isVoid() : TrinaryLogic
    {
        if ($this->subtractedType !== null) {
            if ($this->subtractedType->isSuperTypeOf(new \PHPStan\Type\VoidType())->yes()) {
                return TrinaryLogic::createNo();
            }
        }
        return TrinaryLogic::createMaybe();
    }
    public function isScalar() : TrinaryLogic
    {
        if ($this->subtractedType !== null) {
            if ($this->subtractedType->isSuperTypeOf(new \PHPStan\Type\UnionType([new \PHPStan\Type\BooleanType(), new \PHPStan\Type\FloatType(), new \PHPStan\Type\IntegerType(), new \PHPStan\Type\StringType()]))->yes()) {
                return TrinaryLogic::createNo();
            }
        }
        return TrinaryLogic::createMaybe();
    }
    public function looseCompare(\PHPStan\Type\Type $type, PhpVersion $phpVersion) : \PHPStan\Type\BooleanType
    {
        return new \PHPStan\Type\BooleanType();
    }
    public function tryRemove(\PHPStan\Type\Type $typeToRemove) : ?\PHPStan\Type\Type
    {
        if ($this->isSuperTypeOf($typeToRemove)->yes()) {
            return $this->subtract($typeToRemove);
        }
        return null;
    }
    public function exponentiate(\PHPStan\Type\Type $exponent) : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\BenevolentUnionType([new \PHPStan\Type\FloatType(), new \PHPStan\Type\IntegerType()]);
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode('mixed');
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self($properties['isExplicitMixed'], $properties['subtractedType'] ?? null);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

class TypeTraverser
{
    /** @var callable(Type $type, callable(Type): Type $traverse): Type */
    private $cb;
    /**
     * Map a Type recursively
     *
     * For every Type instance, the callback can return a new Type, and/or
     * decide to traverse inner types or to ignore them.
     *
     * The following example converts constant strings to objects, while
     * preserving unions and intersections:
     *
     * TypeTraverser::map($type, function (Type $type, callable $traverse): Type {
     *     if ($type instanceof UnionType || $type instanceof IntersectionType) {
     *         // Traverse inner types
     *         return $traverse($type);
     *     }
     *     if ($type instanceof ConstantStringType) {
     *         // Replaces the current type, and don't traverse
     *         return new ObjectType($type->getValue());
     *     }
     *     // Replaces the current type, and don't traverse
     *     return new MixedType();
     * });
     *
     * @api
     * @param callable(Type $type, callable(Type): Type $traverse): Type $cb
     */
    public static function map(\PHPStan\Type\Type $type, callable $cb) : \PHPStan\Type\Type
    {
        $self = new self($cb);
        return $self->mapInternal($type);
    }
    /** @param callable(Type $type, callable(Type): Type $traverse): Type $cb */
    private function __construct(callable $cb)
    {
        $this->cb = $cb;
    }
    /** @internal */
    public function mapInternal(\PHPStan\Type\Type $type) : \PHPStan\Type\Type
    {
        return ($this->cb)($type, [$this, 'traverseInternal']);
    }
    /** @internal */
    public function traverseInternal(\PHPStan\Type\Type $type) : \PHPStan\Type\Type
    {
        return $type->traverse([$this, 'mapInternal']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\DependencyInjection\Container;
class LazyTypeAliasResolverProvider implements \PHPStan\Type\TypeAliasResolverProvider
{
    /**
     * @var \PHPStan\DependencyInjection\Container
     */
    private $container;
    public function __construct(Container $container)
    {
        $this->container = $container;
    }
    public function getTypeAliasResolver() : \PHPStan\Type\TypeAliasResolver
    {
        return $this->container->getByType(\PHPStan\Type\TypeAliasResolver::class);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

/**
 * This is the extension interface to implement if you want to describe
 * how arithmetic operators like +, -, *, ^, / should infer types
 * for PHP extensions that overload the behaviour, like GMP.
 *
 * To register it in the configuration file use the `phpstan.broker.operatorTypeSpecifyingExtension` service tag:
 *
 * ```
 * services:
 * 	-
 *		class: App\PHPStan\MyExtension
 *		tags:
 *			- phpstan.broker.operatorTypeSpecifyingExtension
 * ```
 *
 * Learn more: https://github.com/phpstan/phpstan/pull/2114
 *
 * @api
 */
interface OperatorTypeSpecifyingExtension
{
    public function isOperatorSupported(string $operatorSigil, \PHPStan\Type\Type $leftSide, \PHPStan\Type\Type $rightSide) : bool;
    public function specifyType(string $operatorSigil, \PHPStan\Type\Type $leftSide, \PHPStan\Type\Type $rightSide) : \PHPStan\Type\Type;
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use Closure;
use PhpParser\Parser;
use PHPStan\BetterReflection\Identifier\IdentifierType;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionParameter;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionType;
use PHPStan\BetterReflection\Reflection\ReflectionParameter as BetterReflectionParameter;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Ast\FindReflectionsInTree;
use PHPStan\BetterReflection\SourceLocator\Ast\Strategy\NodeToReflection;
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
use PHPStan\BetterReflection\SourceLocator\SourceStubber\ReflectionSourceStubber;
use PHPStan\Reflection\InitializerExprContext;
use PHPStan\Reflection\InitializerExprTypeResolver;
use PHPStan\Reflection\ParameterReflection;
use PHPStan\Reflection\PassedByReference;
use PHPStan\ShouldNotHappenException;
use ReflectionFunction;
use function array_map;
use function count;
use function str_replace;
/** @api */
class ClosureTypeFactory
{
    /**
     * @var \PHPStan\Reflection\InitializerExprTypeResolver
     */
    private $initializerExprTypeResolver;
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\SourceStubber\ReflectionSourceStubber
     */
    private $reflectionSourceStubber;
    /**
     * @var \PHPStan\BetterReflection\Reflector\Reflector
     */
    private $reflector;
    /**
     * @var \PhpParser\Parser
     */
    private $parser;
    public function __construct(InitializerExprTypeResolver $initializerExprTypeResolver, ReflectionSourceStubber $reflectionSourceStubber, Reflector $reflector, Parser $parser)
    {
        $this->initializerExprTypeResolver = $initializerExprTypeResolver;
        $this->reflectionSourceStubber = $reflectionSourceStubber;
        $this->reflector = $reflector;
        $this->parser = $parser;
    }
    /**
     * @param Closure(): mixed $closure
     */
    public function fromClosureObject(Closure $closure) : \PHPStan\Type\ClosureType
    {
        $stubData = $this->reflectionSourceStubber->generateFunctionStubFromReflection(new ReflectionFunction($closure));
        if ($stubData === null) {
            throw new ShouldNotHappenException('Closure reflection not found.');
        }
        $source = $stubData->getStub();
        $source = str_replace('{closure}', 'foo', $source);
        $locatedSource = new LocatedSource($source, '{closure}', $stubData->getFileName());
        $find = new FindReflectionsInTree(new NodeToReflection());
        $ast = $this->parser->parse($locatedSource->getSource());
        if ($ast === null) {
            throw new ShouldNotHappenException('Closure reflection not found.');
        }
        /** @var list<\PHPStan\BetterReflection\Reflection\ReflectionFunction> $reflections */
        $reflections = $find($this->reflector, $ast, new IdentifierType(IdentifierType::IDENTIFIER_FUNCTION), $locatedSource);
        if (count($reflections) !== 1) {
            throw new ShouldNotHappenException('Closure reflection not found.');
        }
        $betterReflectionFunction = $reflections[0];
        $parameters = array_map(function (BetterReflectionParameter $parameter) {
            return new class($parameter, $this->initializerExprTypeResolver) implements ParameterReflection
            {
                /**
                 * @var BetterReflectionParameter
                 */
                private $reflection;
                /**
                 * @var \PHPStan\Reflection\InitializerExprTypeResolver
                 */
                private $initializerExprTypeResolver;
                public function __construct(BetterReflectionParameter $reflection, InitializerExprTypeResolver $initializerExprTypeResolver)
                {
                    $this->reflection = $reflection;
                    $this->initializerExprTypeResolver = $initializerExprTypeResolver;
                }
                public function getName() : string
                {
                    return $this->reflection->getName();
                }
                public function isOptional() : bool
                {
                    return $this->reflection->isOptional();
                }
                public function getType() : \PHPStan\Type\Type
                {
                    return \PHPStan\Type\TypehintHelper::decideTypeFromReflection(ReflectionType::fromTypeOrNull($this->reflection->getType()), null, null, $this->reflection->isVariadic());
                }
                public function passedByReference() : PassedByReference
                {
                    return $this->reflection->isPassedByReference() ? PassedByReference::createCreatesNewVariable() : PassedByReference::createNo();
                }
                public function isVariadic() : bool
                {
                    return $this->reflection->isVariadic();
                }
                public function getDefaultValue() : ?\PHPStan\Type\Type
                {
                    if (!$this->reflection->isDefaultValueAvailable()) {
                        return null;
                    }
                    $defaultExpr = $this->reflection->getDefaultValueExpression();
                    if ($defaultExpr === null) {
                        return null;
                    }
                    return $this->initializerExprTypeResolver->getType($defaultExpr, InitializerExprContext::fromReflectionParameter(new ReflectionParameter($this->reflection)));
                }
            };
        }, $betterReflectionFunction->getParameters());
        return new \PHPStan\Type\ClosureType($parameters, \PHPStan\Type\TypehintHelper::decideTypeFromReflection(ReflectionType::fromTypeOrNull($betterReflectionFunction->getReturnType())), $betterReflectionFunction->isVariadic());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantFloatType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\Traits\NonArrayTypeTrait;
use PHPStan\Type\Traits\NonCallableTypeTrait;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use PHPStan\Type\Traits\NonGenericTypeTrait;
use PHPStan\Type\Traits\NonIterableTypeTrait;
use PHPStan\Type\Traits\NonObjectTypeTrait;
use PHPStan\Type\Traits\NonOffsetAccessibleTypeTrait;
use PHPStan\Type\Traits\UndecidedBooleanTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonTypeTrait;
/** @api */
class BooleanType implements \PHPStan\Type\Type
{
    use \PHPStan\Type\JustNullableTypeTrait;
    use NonArrayTypeTrait;
    use NonCallableTypeTrait;
    use NonIterableTypeTrait;
    use NonObjectTypeTrait;
    use UndecidedBooleanTypeTrait;
    use UndecidedComparisonTypeTrait;
    use NonGenericTypeTrait;
    use NonOffsetAccessibleTypeTrait;
    use NonGeneralizableTypeTrait;
    /** @api */
    public function __construct()
    {
    }
    public function getConstantStrings() : array
    {
        return [];
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        return 'bool';
    }
    public function toNumber() : \PHPStan\Type\Type
    {
        return $this->toInteger();
    }
    public function toString() : \PHPStan\Type\Type
    {
        return \PHPStan\Type\TypeCombinator::union(new ConstantStringType(''), new ConstantStringType('1'));
    }
    public function toInteger() : \PHPStan\Type\Type
    {
        return \PHPStan\Type\TypeCombinator::union(new ConstantIntegerType(0), new ConstantIntegerType(1));
    }
    public function toFloat() : \PHPStan\Type\Type
    {
        return \PHPStan\Type\TypeCombinator::union(new ConstantFloatType(0.0), new ConstantFloatType(1.0));
    }
    public function toArray() : \PHPStan\Type\Type
    {
        return new ConstantArrayType([new ConstantIntegerType(0)], [$this], [1], [], \true);
    }
    public function toArrayKey() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\UnionType([new ConstantIntegerType(0), new ConstantIntegerType(1)]);
    }
    public function isNull() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isTrue() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isFalse() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isBoolean() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isScalar() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function looseCompare(\PHPStan\Type\Type $type, PhpVersion $phpVersion) : \PHPStan\Type\BooleanType
    {
        return new \PHPStan\Type\BooleanType();
    }
    public function tryRemove(\PHPStan\Type\Type $typeToRemove) : ?\PHPStan\Type\Type
    {
        if ($typeToRemove instanceof ConstantBooleanType) {
            return new ConstantBooleanType(!$typeToRemove->getValue());
        }
        return null;
    }
    public function exponentiate(\PHPStan\Type\Type $exponent) : \PHPStan\Type\Type
    {
        return \PHPStan\Type\ExponentiateHelper::exponentiate($this, $exponent);
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode('bool');
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PhpParser\Node;
use PhpParser\Node\Identifier;
use PhpParser\Node\Name;
use PhpParser\Node\NullableType;
use PHPStan\Reflection\ClassReflection;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Constant\ConstantBooleanType;
use function get_class;
use function in_array;
use function strtolower;
class ParserNodeTypeToPHPStanType
{
    /**
     * @param Node\Name|Node\Identifier|Node\ComplexType|null $type
     */
    public static function resolve($type, ?ClassReflection $classReflection) : \PHPStan\Type\Type
    {
        if ($type === null) {
            return new \PHPStan\Type\MixedType();
        } elseif ($type instanceof Name) {
            $typeClassName = (string) $type;
            $lowercasedClassName = strtolower($typeClassName);
            if ($classReflection !== null && in_array($lowercasedClassName, ['self', 'static'], \true)) {
                if ($lowercasedClassName === 'static') {
                    return new \PHPStan\Type\StaticType($classReflection);
                }
                $typeClassName = $classReflection->getName();
            } elseif ($lowercasedClassName === 'parent' && $classReflection !== null && $classReflection->getParentClass() !== null) {
                $typeClassName = $classReflection->getParentClass()->getName();
            }
            return new \PHPStan\Type\ObjectType($typeClassName);
        } elseif ($type instanceof NullableType) {
            return \PHPStan\Type\TypeCombinator::addNull(self::resolve($type->type, $classReflection));
        } elseif ($type instanceof Node\UnionType) {
            $types = [];
            foreach ($type->types as $unionTypeType) {
                $types[] = self::resolve($unionTypeType, $classReflection);
            }
            return \PHPStan\Type\TypeCombinator::union(...$types);
        } elseif ($type instanceof Node\IntersectionType) {
            $types = [];
            foreach ($type->types as $intersectionTypeType) {
                $innerType = self::resolve($intersectionTypeType, $classReflection);
                if (!$innerType->isObject()->yes()) {
                    return new \PHPStan\Type\NeverType();
                }
                $types[] = $innerType;
            }
            return \PHPStan\Type\TypeCombinator::intersect(...$types);
        } elseif (!$type instanceof Identifier) {
            throw new ShouldNotHappenException(get_class($type));
        }
        $type = $type->name;
        if ($type === 'string') {
            return new \PHPStan\Type\StringType();
        } elseif ($type === 'int') {
            return new \PHPStan\Type\IntegerType();
        } elseif ($type === 'bool') {
            return new \PHPStan\Type\BooleanType();
        } elseif ($type === 'float') {
            return new \PHPStan\Type\FloatType();
        } elseif ($type === 'callable') {
            return new \PHPStan\Type\CallableType();
        } elseif ($type === 'array') {
            return new \PHPStan\Type\ArrayType(new \PHPStan\Type\MixedType(), new \PHPStan\Type\MixedType());
        } elseif ($type === 'iterable') {
            return new \PHPStan\Type\IterableType(new \PHPStan\Type\MixedType(), new \PHPStan\Type\MixedType());
        } elseif ($type === 'void') {
            return new \PHPStan\Type\VoidType();
        } elseif ($type === 'object') {
            return new \PHPStan\Type\ObjectWithoutClassType();
        } elseif ($type === 'true') {
            return new ConstantBooleanType(\true);
        } elseif ($type === 'false') {
            return new ConstantBooleanType(\false);
        } elseif ($type === 'null') {
            return new \PHPStan\Type\NullType();
        } elseif ($type === 'mixed') {
            return new \PHPStan\Type\MixedType(\true);
        } elseif ($type === 'never') {
            return new \PHPStan\Type\NeverType(\true);
        }
        return new \PHPStan\Type\MixedType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

/** @api */
class ErrorType extends \PHPStan\Type\MixedType
{
    /** @api */
    public function __construct()
    {
        parent::__construct();
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        return $level->handle(function () use($level) : string {
            return parent::describe($level);
        }, function () use($level) : string {
            return parent::describe($level);
        }, static function () : string {
            return '*ERROR*';
        });
    }
    public function getIterableKeyType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function getIterableValueType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function subtract(\PHPStan\Type\Type $type) : \PHPStan\Type\Type
    {
        return new self();
    }
    public function equals(\PHPStan\Type\Type $type) : bool
    {
        return $type instanceof self;
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Traits;

use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\MixedType;
use PHPStan\Type\NullType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
trait ConstantNumericComparisonTypeTrait
{
    public function getSmallerType() : Type
    {
        $subtractedTypes = [new ConstantBooleanType(\true), IntegerRangeType::createAllGreaterThanOrEqualTo($this->value)];
        if (!(bool) $this->value) {
            $subtractedTypes[] = new NullType();
            $subtractedTypes[] = new ConstantBooleanType(\false);
        }
        return TypeCombinator::remove(new MixedType(), TypeCombinator::union(...$subtractedTypes));
    }
    public function getSmallerOrEqualType() : Type
    {
        $subtractedTypes = [IntegerRangeType::createAllGreaterThan($this->value)];
        if (!(bool) $this->value) {
            $subtractedTypes[] = new ConstantBooleanType(\true);
        }
        return TypeCombinator::remove(new MixedType(), TypeCombinator::union(...$subtractedTypes));
    }
    public function getGreaterType() : Type
    {
        $subtractedTypes = [new NullType(), new ConstantBooleanType(\false), IntegerRangeType::createAllSmallerThanOrEqualTo($this->value)];
        if ((bool) $this->value) {
            $subtractedTypes[] = new ConstantBooleanType(\true);
        }
        return TypeCombinator::remove(new MixedType(), TypeCombinator::union(...$subtractedTypes));
    }
    public function getGreaterOrEqualType() : Type
    {
        $subtractedTypes = [IntegerRangeType::createAllSmallerThan($this->value)];
        if ((bool) $this->value) {
            $subtractedTypes[] = new NullType();
            $subtractedTypes[] = new ConstantBooleanType(\false);
        }
        return TypeCombinator::remove(new MixedType(), TypeCombinator::union(...$subtractedTypes));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Traits;

use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\ClassMemberAccessAnswerer;
use PHPStan\Reflection\ConstantReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection;
use PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection;
use PHPStan\TrinaryLogic;
use PHPStan\Type\AcceptsResult;
use PHPStan\Type\BooleanType;
use PHPStan\Type\CompoundType;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\LateResolvableType;
use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
trait LateResolvableTypeTrait
{
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $result;
    public function getObjectClassNames() : array
    {
        return $this->resolve()->getObjectClassNames();
    }
    public function getObjectClassReflections() : array
    {
        return $this->resolve()->getObjectClassReflections();
    }
    public function getArrays() : array
    {
        return $this->resolve()->getArrays();
    }
    public function getConstantArrays() : array
    {
        return $this->resolve()->getConstantArrays();
    }
    public function getConstantStrings() : array
    {
        return $this->resolve()->getConstantStrings();
    }
    public function accepts(Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->resolve()->accepts($type, $strictTypes);
    }
    public function acceptsWithReason(Type $type, bool $strictTypes) : AcceptsResult
    {
        return $this->resolve()->acceptsWithReason($type, $strictTypes);
    }
    public function isSuperTypeOf(Type $type) : TrinaryLogic
    {
        return $this->isSuperTypeOfDefault($type);
    }
    private function isSuperTypeOfDefault(Type $type) : TrinaryLogic
    {
        if ($type instanceof NeverType) {
            return TrinaryLogic::createYes();
        }
        if ($type instanceof LateResolvableType) {
            $type = $type->resolve();
        }
        $isSuperType = $this->resolve()->isSuperTypeOf($type);
        if (!$this->isResolvable()) {
            $isSuperType = $isSuperType->and(TrinaryLogic::createMaybe());
        }
        return $isSuperType;
    }
    public function getTemplateType(string $ancestorClassName, string $templateTypeName) : Type
    {
        return $this->resolve()->getTemplateType($ancestorClassName, $templateTypeName);
    }
    public function isObject() : TrinaryLogic
    {
        return $this->resolve()->isObject();
    }
    public function isEnum() : TrinaryLogic
    {
        return $this->resolve()->isEnum();
    }
    public function canAccessProperties() : TrinaryLogic
    {
        return $this->resolve()->canAccessProperties();
    }
    public function hasProperty(string $propertyName) : TrinaryLogic
    {
        return $this->resolve()->hasProperty($propertyName);
    }
    public function getProperty(string $propertyName, ClassMemberAccessAnswerer $scope) : PropertyReflection
    {
        return $this->resolve()->getProperty($propertyName, $scope);
    }
    public function getUnresolvedPropertyPrototype(string $propertyName, ClassMemberAccessAnswerer $scope) : UnresolvedPropertyPrototypeReflection
    {
        return $this->resolve()->getUnresolvedPropertyPrototype($propertyName, $scope);
    }
    public function canCallMethods() : TrinaryLogic
    {
        return $this->resolve()->canCallMethods();
    }
    public function hasMethod(string $methodName) : TrinaryLogic
    {
        return $this->resolve()->hasMethod($methodName);
    }
    public function getMethod(string $methodName, ClassMemberAccessAnswerer $scope) : ExtendedMethodReflection
    {
        return $this->resolve()->getMethod($methodName, $scope);
    }
    public function getUnresolvedMethodPrototype(string $methodName, ClassMemberAccessAnswerer $scope) : UnresolvedMethodPrototypeReflection
    {
        return $this->resolve()->getUnresolvedMethodPrototype($methodName, $scope);
    }
    public function canAccessConstants() : TrinaryLogic
    {
        return $this->resolve()->canAccessConstants();
    }
    public function hasConstant(string $constantName) : TrinaryLogic
    {
        return $this->resolve()->hasConstant($constantName);
    }
    public function getConstant(string $constantName) : ConstantReflection
    {
        return $this->resolve()->getConstant($constantName);
    }
    public function isIterable() : TrinaryLogic
    {
        return $this->resolve()->isIterable();
    }
    public function isIterableAtLeastOnce() : TrinaryLogic
    {
        return $this->resolve()->isIterableAtLeastOnce();
    }
    public function getArraySize() : Type
    {
        return $this->resolve()->getArraySize();
    }
    public function getIterableKeyType() : Type
    {
        return $this->resolve()->getIterableKeyType();
    }
    public function getFirstIterableKeyType() : Type
    {
        return $this->resolve()->getFirstIterableKeyType();
    }
    public function getLastIterableKeyType() : Type
    {
        return $this->resolve()->getLastIterableKeyType();
    }
    public function getIterableValueType() : Type
    {
        return $this->resolve()->getIterableValueType();
    }
    public function getFirstIterableValueType() : Type
    {
        return $this->resolve()->getFirstIterableValueType();
    }
    public function getLastIterableValueType() : Type
    {
        return $this->resolve()->getLastIterableValueType();
    }
    public function isArray() : TrinaryLogic
    {
        return $this->resolve()->isArray();
    }
    public function isConstantArray() : TrinaryLogic
    {
        return $this->resolve()->isConstantArray();
    }
    public function isOversizedArray() : TrinaryLogic
    {
        return $this->resolve()->isOversizedArray();
    }
    public function isList() : TrinaryLogic
    {
        return $this->resolve()->isList();
    }
    public function isOffsetAccessible() : TrinaryLogic
    {
        return $this->resolve()->isOffsetAccessible();
    }
    public function hasOffsetValueType(Type $offsetType) : TrinaryLogic
    {
        return $this->resolve()->hasOffsetValueType($offsetType);
    }
    public function getOffsetValueType(Type $offsetType) : Type
    {
        return $this->resolve()->getOffsetValueType($offsetType);
    }
    public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $unionValues = \true) : Type
    {
        return $this->resolve()->setOffsetValueType($offsetType, $valueType, $unionValues);
    }
    public function unsetOffset(Type $offsetType) : Type
    {
        return $this->resolve()->unsetOffset($offsetType);
    }
    public function getKeysArray() : Type
    {
        return $this->resolve()->getKeysArray();
    }
    public function getValuesArray() : Type
    {
        return $this->resolve()->getValuesArray();
    }
    public function fillKeysArray(Type $valueType) : Type
    {
        return $this->resolve()->fillKeysArray($valueType);
    }
    public function flipArray() : Type
    {
        return $this->resolve()->flipArray();
    }
    public function intersectKeyArray(Type $otherArraysType) : Type
    {
        return $this->resolve()->intersectKeyArray($otherArraysType);
    }
    public function popArray() : Type
    {
        return $this->resolve()->popArray();
    }
    public function searchArray(Type $needleType) : Type
    {
        return $this->resolve()->searchArray($needleType);
    }
    public function shiftArray() : Type
    {
        return $this->resolve()->shiftArray();
    }
    public function shuffleArray() : Type
    {
        return $this->resolve()->shuffleArray();
    }
    public function isCallable() : TrinaryLogic
    {
        return $this->resolve()->isCallable();
    }
    public function getEnumCases() : array
    {
        return $this->resolve()->getEnumCases();
    }
    public function getCallableParametersAcceptors(ClassMemberAccessAnswerer $scope) : array
    {
        return $this->resolve()->getCallableParametersAcceptors($scope);
    }
    public function isCloneable() : TrinaryLogic
    {
        return $this->resolve()->isCloneable();
    }
    public function toBoolean() : BooleanType
    {
        return $this->resolve()->toBoolean();
    }
    public function toNumber() : Type
    {
        return $this->resolve()->toNumber();
    }
    public function toInteger() : Type
    {
        return $this->resolve()->toInteger();
    }
    public function toFloat() : Type
    {
        return $this->resolve()->toFloat();
    }
    public function toString() : Type
    {
        return $this->resolve()->toString();
    }
    public function toArray() : Type
    {
        return $this->resolve()->toArray();
    }
    public function toArrayKey() : Type
    {
        return $this->resolve()->toArrayKey();
    }
    public function isSmallerThan(Type $otherType) : TrinaryLogic
    {
        return $this->resolve()->isSmallerThan($otherType);
    }
    public function isSmallerThanOrEqual(Type $otherType) : TrinaryLogic
    {
        return $this->resolve()->isSmallerThanOrEqual($otherType);
    }
    public function isNull() : TrinaryLogic
    {
        return $this->resolve()->isNull();
    }
    public function isConstantValue() : TrinaryLogic
    {
        return $this->resolve()->isConstantValue();
    }
    public function isConstantScalarValue() : TrinaryLogic
    {
        return $this->resolve()->isConstantScalarValue();
    }
    public function getConstantScalarTypes() : array
    {
        return $this->resolve()->getConstantScalarTypes();
    }
    public function getConstantScalarValues() : array
    {
        return $this->resolve()->getConstantScalarValues();
    }
    public function isTrue() : TrinaryLogic
    {
        return $this->resolve()->isTrue();
    }
    public function isFalse() : TrinaryLogic
    {
        return $this->resolve()->isFalse();
    }
    public function isBoolean() : TrinaryLogic
    {
        return $this->resolve()->isBoolean();
    }
    public function isFloat() : TrinaryLogic
    {
        return $this->resolve()->isFloat();
    }
    public function isInteger() : TrinaryLogic
    {
        return $this->resolve()->isInteger();
    }
    public function isString() : TrinaryLogic
    {
        return $this->resolve()->isString();
    }
    public function isNumericString() : TrinaryLogic
    {
        return $this->resolve()->isNumericString();
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return $this->resolve()->isNonEmptyString();
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return $this->resolve()->isNonFalsyString();
    }
    public function isLiteralString() : TrinaryLogic
    {
        return $this->resolve()->isLiteralString();
    }
    public function isClassStringType() : TrinaryLogic
    {
        return $this->resolve()->isClassStringType();
    }
    public function getClassStringObjectType() : Type
    {
        return $this->resolve()->getClassStringObjectType();
    }
    public function getObjectTypeOrClassStringObjectType() : Type
    {
        return $this->resolve()->getObjectTypeOrClassStringObjectType();
    }
    public function isVoid() : TrinaryLogic
    {
        return $this->resolve()->isVoid();
    }
    public function isScalar() : TrinaryLogic
    {
        return $this->resolve()->isScalar();
    }
    public function looseCompare(Type $type, PhpVersion $phpVersion) : BooleanType
    {
        return new BooleanType();
    }
    public function getSmallerType() : Type
    {
        return $this->resolve()->getSmallerType();
    }
    public function getSmallerOrEqualType() : Type
    {
        return $this->resolve()->getSmallerOrEqualType();
    }
    public function getGreaterType() : Type
    {
        return $this->resolve()->getGreaterType();
    }
    public function getGreaterOrEqualType() : Type
    {
        return $this->resolve()->getGreaterOrEqualType();
    }
    public function inferTemplateTypes(Type $receivedType) : TemplateTypeMap
    {
        return $this->resolve()->inferTemplateTypes($receivedType);
    }
    public function tryRemove(Type $typeToRemove) : ?Type
    {
        return $this->resolve()->tryRemove($typeToRemove);
    }
    public function isSubTypeOf(Type $otherType) : TrinaryLogic
    {
        $result = $this->resolve();
        if ($result instanceof CompoundType) {
            return $result->isSubTypeOf($otherType);
        }
        return $otherType->isSuperTypeOf($result);
    }
    public function isAcceptedBy(Type $acceptingType, bool $strictTypes) : TrinaryLogic
    {
        return $this->isAcceptedWithReasonBy($acceptingType, $strictTypes)->result;
    }
    public function isAcceptedWithReasonBy(Type $acceptingType, bool $strictTypes) : AcceptsResult
    {
        $result = $this->resolve();
        if ($result instanceof CompoundType) {
            return $result->isAcceptedWithReasonBy($acceptingType, $strictTypes);
        }
        return $acceptingType->acceptsWithReason($result, $strictTypes);
    }
    public function isGreaterThan(Type $otherType) : TrinaryLogic
    {
        $result = $this->resolve();
        if ($result instanceof CompoundType) {
            return $result->isGreaterThan($otherType);
        }
        return $otherType->isSmallerThan($result);
    }
    public function isGreaterThanOrEqual(Type $otherType) : TrinaryLogic
    {
        $result = $this->resolve();
        if ($result instanceof CompoundType) {
            return $result->isGreaterThanOrEqual($otherType);
        }
        return $otherType->isSmallerThanOrEqual($result);
    }
    public function exponentiate(Type $exponent) : Type
    {
        return $this->resolve()->exponentiate($exponent);
    }
    public function resolve() : Type
    {
        if ($this->result === null) {
            return $this->result = $this->getResult();
        }
        return $this->result;
    }
    protected abstract function getResult() : Type;
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Traits;

use PHPStan\TrinaryLogic;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
trait MaybeOffsetAccessibleTypeTrait
{
    public function isOffsetAccessible() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function hasOffsetValueType(Type $offsetType) : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getOffsetValueType(Type $offsetType) : Type
    {
        return new MixedType();
    }
    public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $unionValues = \true) : Type
    {
        return $this;
    }
    public function unsetOffset(Type $offsetType) : Type
    {
        return $this;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Traits;

use PHPStan\Reflection\ClassMemberAccessAnswerer;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\Reflection\TrivialParametersAcceptor;
use PHPStan\TrinaryLogic;
trait MaybeCallableTypeTrait
{
    public function isCallable() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    /**
     * @return ParametersAcceptor[]
     */
    public function getCallableParametersAcceptors(ClassMemberAccessAnswerer $scope) : array
    {
        return [new TrivialParametersAcceptor()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Traits;

use PHPStan\Reflection\ClassMemberAccessAnswerer;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
trait NonCallableTypeTrait
{
    public function isCallable() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getCallableParametersAcceptors(ClassMemberAccessAnswerer $scope) : array
    {
        throw new ShouldNotHappenException();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Traits;

use PHPStan\Type\GeneralizePrecision;
use PHPStan\Type\Type;
trait NonGeneralizableTypeTrait
{
    public function generalize(GeneralizePrecision $precision) : Type
    {
        return $this->traverse(static function (Type $type) use($precision) {
            return $type->generalize($precision);
        });
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Traits;

use PHPStan\Php\PhpVersion;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\AcceptsResult;
use PHPStan\Type\BooleanType;
use PHPStan\Type\CompoundType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\ConstantScalarType;
use PHPStan\Type\LooseComparisonHelper;
use PHPStan\Type\Type;
trait ConstantScalarTypeTrait
{
    public function accepts(Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(Type $type, bool $strictTypes) : AcceptsResult
    {
        if ($type instanceof self) {
            return AcceptsResult::createFromBoolean($this->value === $type->value);
        }
        if ($type instanceof CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        return parent::acceptsWithReason($type, $strictTypes)->and(AcceptsResult::createMaybe());
    }
    public function isSuperTypeOf(Type $type) : TrinaryLogic
    {
        if ($type instanceof self) {
            return $this->value === $type->value ? TrinaryLogic::createYes() : TrinaryLogic::createNo();
        }
        if ($type instanceof parent) {
            return TrinaryLogic::createMaybe();
        }
        if ($type instanceof CompoundType) {
            return $type->isSubTypeOf($this);
        }
        return TrinaryLogic::createNo();
    }
    public function looseCompare(Type $type, PhpVersion $phpVersion) : BooleanType
    {
        if (!$this instanceof ConstantScalarType) {
            throw new ShouldNotHappenException();
        }
        if ($type instanceof ConstantScalarType) {
            return LooseComparisonHelper::compareConstantScalars($this, $type, $phpVersion);
        }
        if ($type->isConstantArray()->yes() && $type->isIterableAtLeastOnce()->no()) {
            // @phpstan-ignore-next-line
            return new ConstantBooleanType($this->getValue() == []);
            // phpcs:ignore
        }
        return parent::looseCompare($type, $phpVersion);
    }
    public function equals(Type $type) : bool
    {
        return $type instanceof self && $this->value === $type->value;
    }
    public function isSmallerThan(Type $otherType) : TrinaryLogic
    {
        if ($otherType instanceof ConstantScalarType) {
            return TrinaryLogic::createFromBoolean($this->value < $otherType->getValue());
        }
        if ($otherType instanceof CompoundType) {
            return $otherType->isGreaterThan($this);
        }
        return TrinaryLogic::createMaybe();
    }
    public function isSmallerThanOrEqual(Type $otherType) : TrinaryLogic
    {
        if ($otherType instanceof ConstantScalarType) {
            return TrinaryLogic::createFromBoolean($this->value <= $otherType->getValue());
        }
        if ($otherType instanceof CompoundType) {
            return $otherType->isGreaterThanOrEqual($this);
        }
        return TrinaryLogic::createMaybe();
    }
    public function isConstantValue() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isConstantScalarValue() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function getConstantScalarTypes() : array
    {
        return [$this];
    }
    public function getConstantScalarValues() : array
    {
        return [$this->getValue()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Traits;

use PHPStan\Type\BooleanType;
trait UndecidedBooleanTypeTrait
{
    public function toBoolean() : BooleanType
    {
        return new BooleanType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Traits;

use PHPStan\Type\BooleanType;
use PHPStan\Type\Constant\ConstantBooleanType;
trait FalseyBooleanTypeTrait
{
    public function toBoolean() : BooleanType
    {
        return new ConstantBooleanType(\false);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Traits;

use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\ClassMemberAccessAnswerer;
use PHPStan\Reflection\ConstantReflection;
use PHPStan\Reflection\Dummy\DummyConstantReflection;
use PHPStan\Reflection\Dummy\DummyMethodReflection;
use PHPStan\Reflection\Dummy\DummyPropertyReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Reflection\Type\CallbackUnresolvedMethodPrototypeReflection;
use PHPStan\Reflection\Type\CallbackUnresolvedPropertyPrototypeReflection;
use PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection;
use PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection;
use PHPStan\TrinaryLogic;
use PHPStan\Type\ArrayType;
use PHPStan\Type\BooleanType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\MixedType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
trait ObjectTypeTrait
{
    use \PHPStan\Type\Traits\MaybeCallableTypeTrait;
    use \PHPStan\Type\Traits\MaybeIterableTypeTrait;
    use \PHPStan\Type\Traits\MaybeOffsetAccessibleTypeTrait;
    use \PHPStan\Type\Traits\NonArrayTypeTrait;
    use \PHPStan\Type\Traits\TruthyBooleanTypeTrait;
    public function getTemplateType(string $ancestorClassName, string $templateTypeName) : Type
    {
        return new MixedType();
    }
    public function isObject() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isEnum() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function canAccessProperties() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function hasProperty(string $propertyName) : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getProperty(string $propertyName, ClassMemberAccessAnswerer $scope) : PropertyReflection
    {
        return $this->getUnresolvedPropertyPrototype($propertyName, $scope)->getTransformedProperty();
    }
    public function getUnresolvedPropertyPrototype(string $propertyName, ClassMemberAccessAnswerer $scope) : UnresolvedPropertyPrototypeReflection
    {
        $property = new DummyPropertyReflection();
        return new CallbackUnresolvedPropertyPrototypeReflection($property, $property->getDeclaringClass(), \false, static function (Type $type) : Type {
            return $type;
        });
    }
    public function canCallMethods() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function hasMethod(string $methodName) : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getMethod(string $methodName, ClassMemberAccessAnswerer $scope) : ExtendedMethodReflection
    {
        return $this->getUnresolvedMethodPrototype($methodName, $scope)->getTransformedMethod();
    }
    public function getUnresolvedMethodPrototype(string $methodName, ClassMemberAccessAnswerer $scope) : UnresolvedMethodPrototypeReflection
    {
        $method = new DummyMethodReflection($methodName);
        return new CallbackUnresolvedMethodPrototypeReflection($method, $method->getDeclaringClass(), \false, static function (Type $type) : Type {
            return $type;
        });
    }
    public function canAccessConstants() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function hasConstant(string $constantName) : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getConstant(string $constantName) : ConstantReflection
    {
        return new DummyConstantReflection($constantName);
    }
    public function getConstantStrings() : array
    {
        return [];
    }
    public function isCloneable() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isNull() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantScalarValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getConstantScalarTypes() : array
    {
        return [];
    }
    public function getConstantScalarValues() : array
    {
        return [];
    }
    public function isTrue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFalse() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isBoolean() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFloat() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isInteger() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNumericString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isLiteralString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isClassStringType() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getClassStringObjectType() : Type
    {
        return new ErrorType();
    }
    public function getObjectTypeOrClassStringObjectType() : Type
    {
        return $this;
    }
    public function isVoid() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isScalar() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function looseCompare(Type $type, PhpVersion $phpVersion) : BooleanType
    {
        return new BooleanType();
    }
    public function toNumber() : Type
    {
        return new ErrorType();
    }
    public function toString() : Type
    {
        return new ErrorType();
    }
    public function toInteger() : Type
    {
        return new ErrorType();
    }
    public function toFloat() : Type
    {
        return new ErrorType();
    }
    public function toArray() : Type
    {
        return new ArrayType(new MixedType(), new MixedType());
    }
    public function toArrayKey() : Type
    {
        return new StringType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Traits;

use PHPStan\Reflection\ClassMemberAccessAnswerer;
use PHPStan\Reflection\ConstantReflection;
use PHPStan\Reflection\Dummy\DummyConstantReflection;
use PHPStan\Reflection\Dummy\DummyMethodReflection;
use PHPStan\Reflection\Dummy\DummyPropertyReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Reflection\Type\CallbackUnresolvedMethodPrototypeReflection;
use PHPStan\Reflection\Type\CallbackUnresolvedPropertyPrototypeReflection;
use PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection;
use PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection;
use PHPStan\TrinaryLogic;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
trait MaybeObjectTypeTrait
{
    public function getTemplateType(string $ancestorClassName, string $templateTypeName) : Type
    {
        return new MixedType();
    }
    public function isObject() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isEnum() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function canAccessProperties() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function hasProperty(string $propertyName) : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getProperty(string $propertyName, ClassMemberAccessAnswerer $scope) : PropertyReflection
    {
        return $this->getUnresolvedPropertyPrototype($propertyName, $scope)->getTransformedProperty();
    }
    public function getUnresolvedPropertyPrototype(string $propertyName, ClassMemberAccessAnswerer $scope) : UnresolvedPropertyPrototypeReflection
    {
        $property = new DummyPropertyReflection();
        return new CallbackUnresolvedPropertyPrototypeReflection($property, $property->getDeclaringClass(), \false, static function (Type $type) : Type {
            return $type;
        });
    }
    public function canCallMethods() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function hasMethod(string $methodName) : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getMethod(string $methodName, ClassMemberAccessAnswerer $scope) : ExtendedMethodReflection
    {
        return $this->getUnresolvedMethodPrototype($methodName, $scope)->getTransformedMethod();
    }
    public function getUnresolvedMethodPrototype(string $methodName, ClassMemberAccessAnswerer $scope) : UnresolvedMethodPrototypeReflection
    {
        $method = new DummyMethodReflection($methodName);
        return new CallbackUnresolvedMethodPrototypeReflection($method, $method->getDeclaringClass(), \false, static function (Type $type) : Type {
            return $type;
        });
    }
    public function canAccessConstants() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function hasConstant(string $constantName) : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getConstant(string $constantName) : ConstantReflection
    {
        return new DummyConstantReflection($constantName);
    }
    public function isCloneable() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Traits;

use PHPStan\Type\Type;
trait NonRemoveableTypeTrait
{
    public function tryRemove(Type $typeToRemove) : ?Type
    {
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Traits;

use PHPStan\TrinaryLogic;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
trait UndecidedComparisonTypeTrait
{
    public function isSmallerThan(Type $otherType) : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isSmallerThanOrEqual(Type $otherType) : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getSmallerType() : Type
    {
        return new MixedType();
    }
    public function getSmallerOrEqualType() : Type
    {
        return new MixedType();
    }
    public function getGreaterType() : Type
    {
        return new MixedType();
    }
    public function getGreaterOrEqualType() : Type
    {
        return new MixedType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Traits;

use PHPStan\Reflection\ClassMemberAccessAnswerer;
use PHPStan\Reflection\ConstantReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection;
use PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Type;
trait NonObjectTypeTrait
{
    public function isObject() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isEnum() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function canAccessProperties() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function hasProperty(string $propertyName) : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getProperty(string $propertyName, ClassMemberAccessAnswerer $scope) : PropertyReflection
    {
        throw new ShouldNotHappenException();
    }
    public function getUnresolvedPropertyPrototype(string $propertyName, ClassMemberAccessAnswerer $scope) : UnresolvedPropertyPrototypeReflection
    {
        throw new ShouldNotHappenException();
    }
    public function canCallMethods() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function hasMethod(string $methodName) : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getMethod(string $methodName, ClassMemberAccessAnswerer $scope) : ExtendedMethodReflection
    {
        throw new ShouldNotHappenException();
    }
    public function getUnresolvedMethodPrototype(string $methodName, ClassMemberAccessAnswerer $scope) : UnresolvedMethodPrototypeReflection
    {
        throw new ShouldNotHappenException();
    }
    public function canAccessConstants() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function hasConstant(string $constantName) : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getConstant(string $constantName) : ConstantReflection
    {
        throw new ShouldNotHappenException();
    }
    public function getConstantStrings() : array
    {
        return [];
    }
    public function isCloneable() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getEnumCases() : array
    {
        return [];
    }
    public function getTemplateType(string $ancestorClassName, string $templateTypeName) : Type
    {
        return new ErrorType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Traits;

use PHPStan\TrinaryLogic;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Type;
trait NonIterableTypeTrait
{
    public function isIterable() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isIterableAtLeastOnce() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getArraySize() : Type
    {
        return new ErrorType();
    }
    public function getIterableKeyType() : Type
    {
        return new ErrorType();
    }
    public function getFirstIterableKeyType() : Type
    {
        return new ErrorType();
    }
    public function getLastIterableKeyType() : Type
    {
        return new ErrorType();
    }
    public function getIterableValueType() : Type
    {
        return new ErrorType();
    }
    public function getFirstIterableValueType() : Type
    {
        return new ErrorType();
    }
    public function getLastIterableValueType() : Type
    {
        return new ErrorType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Traits;

use PHPStan\TrinaryLogic;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Type;
trait NonOffsetAccessibleTypeTrait
{
    public function isOffsetAccessible() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function hasOffsetValueType(Type $offsetType) : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getOffsetValueType(Type $offsetType) : Type
    {
        return new ErrorType();
    }
    public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $unionValues = \true) : Type
    {
        return new ErrorType();
    }
    public function unsetOffset(Type $offsetType) : Type
    {
        return new ErrorType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Traits;

use PHPStan\TrinaryLogic;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Type;
trait NonArrayTypeTrait
{
    public function getArrays() : array
    {
        return [];
    }
    public function getConstantArrays() : array
    {
        return [];
    }
    public function isArray() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantArray() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isOversizedArray() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isList() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getKeysArray() : Type
    {
        return new ErrorType();
    }
    public function getValuesArray() : Type
    {
        return new ErrorType();
    }
    public function fillKeysArray(Type $valueType) : Type
    {
        return new ErrorType();
    }
    public function flipArray() : Type
    {
        return new ErrorType();
    }
    public function intersectKeyArray(Type $otherArraysType) : Type
    {
        return new ErrorType();
    }
    public function popArray() : Type
    {
        return new ErrorType();
    }
    public function searchArray(Type $needleType) : Type
    {
        return new ErrorType();
    }
    public function shiftArray() : Type
    {
        return new ErrorType();
    }
    public function shuffleArray() : Type
    {
        return new ErrorType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Traits;

use PHPStan\TrinaryLogic;
use PHPStan\Type\Type;
trait UndecidedComparisonCompoundTypeTrait
{
    use \PHPStan\Type\Traits\UndecidedComparisonTypeTrait;
    public function isGreaterThan(Type $otherType) : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isGreaterThanOrEqual(Type $otherType) : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Traits;

use PHPStan\TrinaryLogic;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Type;
trait MaybeArrayTypeTrait
{
    public function getArrays() : array
    {
        return [];
    }
    public function getConstantArrays() : array
    {
        return [];
    }
    public function isArray() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isConstantArray() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isOversizedArray() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isList() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getKeysArray() : Type
    {
        return new ErrorType();
    }
    public function getValuesArray() : Type
    {
        return new ErrorType();
    }
    public function fillKeysArray(Type $valueType) : Type
    {
        return new ErrorType();
    }
    public function flipArray() : Type
    {
        return new ErrorType();
    }
    public function intersectKeyArray(Type $otherArraysType) : Type
    {
        return new ErrorType();
    }
    public function popArray() : Type
    {
        return new ErrorType();
    }
    public function searchArray(Type $needleType) : Type
    {
        return new ErrorType();
    }
    public function shiftArray() : Type
    {
        return new ErrorType();
    }
    public function shuffleArray() : Type
    {
        return new ErrorType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Traits;

use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\Generic\TemplateTypeVariance;
use PHPStan\Type\Type;
trait NonGenericTypeTrait
{
    public function inferTemplateTypes(Type $receivedType) : TemplateTypeMap
    {
        return TemplateTypeMap::createEmpty();
    }
    public function getReferencedTemplateTypes(TemplateTypeVariance $positionVariance) : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Traits;

use PHPStan\TrinaryLogic;
use PHPStan\Type\ErrorType;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
trait MaybeIterableTypeTrait
{
    public function isIterable() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isIterableAtLeastOnce() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getArraySize() : Type
    {
        if ($this->isIterable()->no()) {
            return new ErrorType();
        }
        if ($this->isIterableAtLeastOnce()->yes()) {
            return IntegerRangeType::fromInterval(1, null);
        }
        return IntegerRangeType::fromInterval(0, null);
    }
    public function getIterableKeyType() : Type
    {
        return new MixedType();
    }
    public function getFirstIterableKeyType() : Type
    {
        return new MixedType();
    }
    public function getLastIterableKeyType() : Type
    {
        return new MixedType();
    }
    public function getIterableValueType() : Type
    {
        return new MixedType();
    }
    public function getFirstIterableValueType() : Type
    {
        return new MixedType();
    }
    public function getLastIterableValueType() : Type
    {
        return new MixedType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Traits;

use PHPStan\Type\BooleanType;
use PHPStan\Type\Constant\ConstantBooleanType;
trait TruthyBooleanTypeTrait
{
    public function toBoolean() : BooleanType
    {
        return new ConstantBooleanType(\true);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PhpParser\Node\Expr;
use PhpParser\Node\Expr\BinaryOp\BitwiseOr;
use PhpParser\Node\Expr\ConstFetch;
use PhpParser\Node\Name\FullyQualified;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Constant\ConstantIntegerType;
final class BitwiseFlagHelper
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(ReflectionProvider $reflectionProvider)
    {
        $this->reflectionProvider = $reflectionProvider;
    }
    public function bitwiseOrContainsConstant(Expr $expr, Scope $scope, string $constName) : TrinaryLogic
    {
        if ($expr instanceof ConstFetch) {
            if ((string) $expr->name === $constName) {
                return TrinaryLogic::createYes();
            }
            $resolveConstantName = $this->reflectionProvider->resolveConstantName($expr->name, $scope);
            if ($resolveConstantName !== null) {
                if ($resolveConstantName === $constName) {
                    return TrinaryLogic::createYes();
                }
                return TrinaryLogic::createNo();
            }
        }
        if ($expr instanceof BitwiseOr) {
            return TrinaryLogic::createFromBoolean($this->bitwiseOrContainsConstant($expr->left, $scope, $constName)->yes() || $this->bitwiseOrContainsConstant($expr->right, $scope, $constName)->yes());
        }
        $fqcn = new FullyQualified($constName);
        if ($this->reflectionProvider->hasConstant($fqcn, $scope)) {
            $constant = $this->reflectionProvider->getConstant($fqcn, $scope);
            $valueType = $constant->getValueType();
            if ($valueType instanceof ConstantIntegerType) {
                return $this->exprContainsIntFlag($expr, $scope, $valueType->getValue());
            }
        }
        return TrinaryLogic::createNo();
    }
    private function exprContainsIntFlag(Expr $expr, Scope $scope, int $flag) : TrinaryLogic
    {
        $exprType = $scope->getType($expr);
        if ($exprType instanceof \PHPStan\Type\UnionType) {
            $allTypesContainFlag = \true;
            $someTypesContainFlag = \false;
            foreach ($exprType->getTypes() as $type) {
                $containsFlag = $this->typeContainsIntFlag($type, $flag);
                if (!$containsFlag->yes()) {
                    $allTypesContainFlag = \false;
                }
                if (!$containsFlag->yes() && !$containsFlag->maybe()) {
                    continue;
                }
                $someTypesContainFlag = \true;
            }
            if ($allTypesContainFlag) {
                return TrinaryLogic::createYes();
            }
            if ($someTypesContainFlag) {
                return TrinaryLogic::createMaybe();
            }
            return TrinaryLogic::createNo();
        }
        return $this->typeContainsIntFlag($exprType, $flag);
    }
    private function typeContainsIntFlag(\PHPStan\Type\Type $type, int $flag) : TrinaryLogic
    {
        if ($type instanceof ConstantIntegerType) {
            if (($type->getValue() & $flag) === $flag) {
                return TrinaryLogic::createYes();
            }
            return TrinaryLogic::createNo();
        }
        $integerType = new \PHPStan\Type\IntegerType();
        if ($integerType->isSuperTypeOf($type)->yes() || $type instanceof \PHPStan\Type\MixedType) {
            return TrinaryLogic::createMaybe();
        }
        return TrinaryLogic::createNo();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
/**
 * This is the interface dynamic throw type extensions implement for functions.
 *
 * To register it in the configuration file use the `phpstan.dynamicFunctionThrowTypeExtension` service tag:
 *
 * ```
 * services:
 * 	-
 *		class: App\PHPStan\MyExtension
 *		tags:
 *			- phpstan.dynamicFunctionThrowTypeExtension
 * ```
 *
 * Learn more: https://phpstan.org/developing-extensions/dynamic-throw-type-extensions
 *
 * @api
 */
interface DynamicFunctionThrowTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool;
    public function getThrowTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $funcCall, Scope $scope) : ?\PHPStan\Type\Type;
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Analyser\NameScope;
interface TypeAliasResolver
{
    public function hasTypeAlias(string $aliasName, ?string $classNameScope) : bool;
    public function resolveTypeAlias(string $aliasName, NameScope $nameScope) : ?\PHPStan\Type\Type;
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\PhpDocParser\Ast\Type\GenericTypeNode;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\Type\Generic\TemplateTypeVariance;
use PHPStan\Type\Traits\LateResolvableTypeTrait;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use function sprintf;
/** @api */
class KeyOfType implements \PHPStan\Type\CompoundType, \PHPStan\Type\LateResolvableType
{
    use LateResolvableTypeTrait;
    use NonGeneralizableTypeTrait;
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    public function __construct(\PHPStan\Type\Type $type)
    {
        $this->type = $type;
    }
    public function getType() : \PHPStan\Type\Type
    {
        return $this->type;
    }
    public function getReferencedClasses() : array
    {
        return $this->type->getReferencedClasses();
    }
    public function getReferencedTemplateTypes(TemplateTypeVariance $positionVariance) : array
    {
        return $this->type->getReferencedTemplateTypes($positionVariance);
    }
    public function equals(\PHPStan\Type\Type $type) : bool
    {
        return $type instanceof self && $this->type->equals($type->type);
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        return sprintf('key-of<%s>', $this->type->describe($level));
    }
    public function isResolvable() : bool
    {
        return !\PHPStan\Type\TypeUtils::containsTemplateType($this->type);
    }
    protected function getResult() : \PHPStan\Type\Type
    {
        return $this->type->getIterableKeyType();
    }
    /**
     * @param callable(Type): Type $cb
     */
    public function traverse(callable $cb) : \PHPStan\Type\Type
    {
        $type = $cb($this->type);
        if ($this->type === $type) {
            return $this;
        }
        return new self($type);
    }
    public function traverseSimultaneously(\PHPStan\Type\Type $right, callable $cb) : \PHPStan\Type\Type
    {
        if (!$right instanceof self) {
            return $this;
        }
        $type = $cb($this->type, $right->type);
        if ($this->type === $type) {
            return $this;
        }
        return new self($type);
    }
    public function toPhpDocNode() : TypeNode
    {
        return new GenericTypeNode(new IdentifierTypeNode('key-of'), [$this->type->toPhpDocNode()]);
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self($properties['type']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\Reflection\ClassMemberAccessAnswerer;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ConstantReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Reflection\ReflectionProviderStaticAccessor;
use PHPStan\Reflection\Type\CallbackUnresolvedMethodPrototypeReflection;
use PHPStan\Reflection\Type\CallbackUnresolvedPropertyPrototypeReflection;
use PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection;
use PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Generic\GenericObjectType;
use PHPStan\Type\Generic\TemplateTypeHelper;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use PHPStan\Type\Traits\NonGenericTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonTypeTrait;
use function get_class;
use function sprintf;
/** @api */
class StaticType implements \PHPStan\Type\TypeWithClassName, \PHPStan\Type\SubtractableType
{
    use NonGenericTypeTrait;
    use UndecidedComparisonTypeTrait;
    use NonGeneralizableTypeTrait;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $subtractedType;
    /**
     * @var \PHPStan\Type\ObjectType|null
     */
    private $staticObjectType;
    /**
     * @var string
     */
    private $baseClass;
    /**
     * @var \PHPStan\Reflection\ClassReflection
     */
    private $classReflection;
    /**
     * @api
     */
    public function __construct(ClassReflection $classReflection, ?\PHPStan\Type\Type $subtractedType = null)
    {
        $this->classReflection = $classReflection;
        if ($subtractedType instanceof \PHPStan\Type\NeverType) {
            $subtractedType = null;
        }
        $this->subtractedType = $subtractedType;
        $this->baseClass = $classReflection->getName();
    }
    public function getClassName() : string
    {
        return $this->baseClass;
    }
    public function getClassReflection() : ClassReflection
    {
        return $this->classReflection;
    }
    public function getAncestorWithClassName(string $className) : ?\PHPStan\Type\TypeWithClassName
    {
        $ancestor = $this->getStaticObjectType()->getAncestorWithClassName($className);
        if ($ancestor === null) {
            return null;
        }
        $classReflection = $ancestor->getClassReflection();
        if ($classReflection !== null) {
            return $this->changeBaseClass($classReflection);
        }
        return null;
    }
    public function getStaticObjectType() : \PHPStan\Type\ObjectType
    {
        if ($this->staticObjectType === null) {
            if ($this->classReflection->isGeneric()) {
                $typeMap = $this->classReflection->getActiveTemplateTypeMap()->map(static function (string $name, \PHPStan\Type\Type $type) : \PHPStan\Type\Type {
                    return TemplateTypeHelper::toArgument($type);
                });
                return $this->staticObjectType = new GenericObjectType($this->classReflection->getName(), $this->classReflection->typeMapToList($typeMap), $this->subtractedType);
            }
            return $this->staticObjectType = new \PHPStan\Type\ObjectType($this->classReflection->getName(), $this->subtractedType, $this->classReflection);
        }
        return $this->staticObjectType;
    }
    /**
     * @return string[]
     */
    public function getReferencedClasses() : array
    {
        return $this->getStaticObjectType()->getReferencedClasses();
    }
    public function getObjectClassNames() : array
    {
        return $this->getStaticObjectType()->getObjectClassNames();
    }
    public function getObjectClassReflections() : array
    {
        return $this->getStaticObjectType()->getObjectClassReflections();
    }
    public function getArrays() : array
    {
        return $this->getStaticObjectType()->getArrays();
    }
    public function getConstantArrays() : array
    {
        return $this->getStaticObjectType()->getConstantArrays();
    }
    public function getConstantStrings() : array
    {
        return $this->getStaticObjectType()->getConstantStrings();
    }
    public function accepts(\PHPStan\Type\Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(\PHPStan\Type\Type $type, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        if (!$type instanceof static) {
            return \PHPStan\Type\AcceptsResult::createNo();
        }
        return $this->getStaticObjectType()->acceptsWithReason($type->getStaticObjectType(), $strictTypes);
    }
    public function isSuperTypeOf(\PHPStan\Type\Type $type) : TrinaryLogic
    {
        if ($type instanceof self) {
            return $this->getStaticObjectType()->isSuperTypeOf($type);
        }
        if ($type instanceof \PHPStan\Type\ObjectWithoutClassType) {
            return TrinaryLogic::createMaybe();
        }
        if ($type instanceof \PHPStan\Type\ObjectType) {
            $result = $this->getStaticObjectType()->isSuperTypeOf($type);
            if ($result->yes()) {
                $classReflection = $type->getClassReflection();
                if ($classReflection !== null && $classReflection->isFinal()) {
                    return $result;
                }
            }
            return $result->and(TrinaryLogic::createMaybe());
        }
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return $type->isSubTypeOf($this);
        }
        return TrinaryLogic::createNo();
    }
    public function equals(\PHPStan\Type\Type $type) : bool
    {
        if (get_class($type) !== static::class) {
            return \false;
        }
        /** @var StaticType $type */
        $type = $type;
        return $this->getStaticObjectType()->equals($type->getStaticObjectType());
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        return sprintf('static(%s)', $this->getStaticObjectType()->describe($level));
    }
    public function getTemplateType(string $ancestorClassName, string $templateTypeName) : \PHPStan\Type\Type
    {
        return $this->getStaticObjectType()->getTemplateType($ancestorClassName, $templateTypeName);
    }
    public function isObject() : TrinaryLogic
    {
        return $this->getStaticObjectType()->isObject();
    }
    public function isEnum() : TrinaryLogic
    {
        return $this->getStaticObjectType()->isEnum();
    }
    public function canAccessProperties() : TrinaryLogic
    {
        return $this->getStaticObjectType()->canAccessProperties();
    }
    public function hasProperty(string $propertyName) : TrinaryLogic
    {
        return $this->getStaticObjectType()->hasProperty($propertyName);
    }
    public function getProperty(string $propertyName, ClassMemberAccessAnswerer $scope) : PropertyReflection
    {
        return $this->getUnresolvedPropertyPrototype($propertyName, $scope)->getTransformedProperty();
    }
    public function getUnresolvedPropertyPrototype(string $propertyName, ClassMemberAccessAnswerer $scope) : UnresolvedPropertyPrototypeReflection
    {
        $staticObject = $this->getStaticObjectType();
        $nakedProperty = $staticObject->getUnresolvedPropertyPrototype($propertyName, $scope)->getNakedProperty();
        $ancestor = $this->getAncestorWithClassName($nakedProperty->getDeclaringClass()->getName());
        $classReflection = null;
        if ($ancestor !== null) {
            $classReflection = $ancestor->getClassReflection();
        }
        if ($classReflection === null) {
            $classReflection = $nakedProperty->getDeclaringClass();
        }
        return new CallbackUnresolvedPropertyPrototypeReflection($nakedProperty, $classReflection, \false, function (\PHPStan\Type\Type $type) use($scope) : \PHPStan\Type\Type {
            return $this->transformStaticType($type, $scope);
        });
    }
    public function canCallMethods() : TrinaryLogic
    {
        return $this->getStaticObjectType()->canCallMethods();
    }
    public function hasMethod(string $methodName) : TrinaryLogic
    {
        return $this->getStaticObjectType()->hasMethod($methodName);
    }
    public function getMethod(string $methodName, ClassMemberAccessAnswerer $scope) : ExtendedMethodReflection
    {
        return $this->getUnresolvedMethodPrototype($methodName, $scope)->getTransformedMethod();
    }
    public function getUnresolvedMethodPrototype(string $methodName, ClassMemberAccessAnswerer $scope) : UnresolvedMethodPrototypeReflection
    {
        $staticObject = $this->getStaticObjectType();
        $nakedMethod = $staticObject->getUnresolvedMethodPrototype($methodName, $scope)->getNakedMethod();
        $ancestor = $this->getAncestorWithClassName($nakedMethod->getDeclaringClass()->getName());
        $classReflection = null;
        if ($ancestor !== null) {
            $classReflection = $ancestor->getClassReflection();
        }
        if ($classReflection === null) {
            $classReflection = $nakedMethod->getDeclaringClass();
        }
        return new CallbackUnresolvedMethodPrototypeReflection($nakedMethod, $classReflection, \false, function (\PHPStan\Type\Type $type) use($scope) : \PHPStan\Type\Type {
            return $this->transformStaticType($type, $scope);
        });
    }
    private function transformStaticType(\PHPStan\Type\Type $type, ClassMemberAccessAnswerer $scope) : \PHPStan\Type\Type
    {
        return \PHPStan\Type\TypeTraverser::map($type, function (\PHPStan\Type\Type $type, callable $traverse) use($scope) : \PHPStan\Type\Type {
            if ($type instanceof \PHPStan\Type\StaticType) {
                $classReflection = $this->classReflection;
                $isFinal = \false;
                if ($scope->isInClass()) {
                    $classReflection = $scope->getClassReflection();
                    $isFinal = $classReflection->isFinal();
                }
                $type = $type->changeBaseClass($classReflection);
                if (!$isFinal) {
                    return $type;
                }
                return $type->getStaticObjectType();
            }
            return $traverse($type);
        });
    }
    public function canAccessConstants() : TrinaryLogic
    {
        return $this->getStaticObjectType()->canAccessConstants();
    }
    public function hasConstant(string $constantName) : TrinaryLogic
    {
        return $this->getStaticObjectType()->hasConstant($constantName);
    }
    public function getConstant(string $constantName) : ConstantReflection
    {
        return $this->getStaticObjectType()->getConstant($constantName);
    }
    public function changeBaseClass(ClassReflection $classReflection) : self
    {
        return new self($classReflection, $this->subtractedType);
    }
    public function isIterable() : TrinaryLogic
    {
        return $this->getStaticObjectType()->isIterable();
    }
    public function isIterableAtLeastOnce() : TrinaryLogic
    {
        return $this->getStaticObjectType()->isIterableAtLeastOnce();
    }
    public function getArraySize() : \PHPStan\Type\Type
    {
        return $this->getStaticObjectType()->getArraySize();
    }
    public function getIterableKeyType() : \PHPStan\Type\Type
    {
        return $this->getStaticObjectType()->getIterableKeyType();
    }
    public function getFirstIterableKeyType() : \PHPStan\Type\Type
    {
        return $this->getStaticObjectType()->getFirstIterableKeyType();
    }
    public function getLastIterableKeyType() : \PHPStan\Type\Type
    {
        return $this->getStaticObjectType()->getLastIterableKeyType();
    }
    public function getIterableValueType() : \PHPStan\Type\Type
    {
        return $this->getStaticObjectType()->getIterableValueType();
    }
    public function getFirstIterableValueType() : \PHPStan\Type\Type
    {
        return $this->getStaticObjectType()->getFirstIterableValueType();
    }
    public function getLastIterableValueType() : \PHPStan\Type\Type
    {
        return $this->getStaticObjectType()->getLastIterableValueType();
    }
    public function isOffsetAccessible() : TrinaryLogic
    {
        return $this->getStaticObjectType()->isOffsetAccessible();
    }
    public function hasOffsetValueType(\PHPStan\Type\Type $offsetType) : TrinaryLogic
    {
        return $this->getStaticObjectType()->hasOffsetValueType($offsetType);
    }
    public function getOffsetValueType(\PHPStan\Type\Type $offsetType) : \PHPStan\Type\Type
    {
        return $this->getStaticObjectType()->getOffsetValueType($offsetType);
    }
    public function setOffsetValueType(?\PHPStan\Type\Type $offsetType, \PHPStan\Type\Type $valueType, bool $unionValues = \true) : \PHPStan\Type\Type
    {
        return $this->getStaticObjectType()->setOffsetValueType($offsetType, $valueType, $unionValues);
    }
    public function unsetOffset(\PHPStan\Type\Type $offsetType) : \PHPStan\Type\Type
    {
        return $this->getStaticObjectType()->unsetOffset($offsetType);
    }
    public function getKeysArray() : \PHPStan\Type\Type
    {
        return $this->getStaticObjectType()->getKeysArray();
    }
    public function getValuesArray() : \PHPStan\Type\Type
    {
        return $this->getStaticObjectType()->getValuesArray();
    }
    public function fillKeysArray(\PHPStan\Type\Type $valueType) : \PHPStan\Type\Type
    {
        return $this->getStaticObjectType()->fillKeysArray($valueType);
    }
    public function flipArray() : \PHPStan\Type\Type
    {
        return $this->getStaticObjectType()->flipArray();
    }
    public function intersectKeyArray(\PHPStan\Type\Type $otherArraysType) : \PHPStan\Type\Type
    {
        return $this->getStaticObjectType()->intersectKeyArray($otherArraysType);
    }
    public function popArray() : \PHPStan\Type\Type
    {
        return $this->getStaticObjectType()->popArray();
    }
    public function searchArray(\PHPStan\Type\Type $needleType) : \PHPStan\Type\Type
    {
        return $this->getStaticObjectType()->searchArray($needleType);
    }
    public function shiftArray() : \PHPStan\Type\Type
    {
        return $this->getStaticObjectType()->shiftArray();
    }
    public function shuffleArray() : \PHPStan\Type\Type
    {
        return $this->getStaticObjectType()->shuffleArray();
    }
    public function isCallable() : TrinaryLogic
    {
        return $this->getStaticObjectType()->isCallable();
    }
    public function getEnumCases() : array
    {
        return $this->getStaticObjectType()->getEnumCases();
    }
    public function isArray() : TrinaryLogic
    {
        return $this->getStaticObjectType()->isArray();
    }
    public function isConstantArray() : TrinaryLogic
    {
        return $this->getStaticObjectType()->isConstantArray();
    }
    public function isOversizedArray() : TrinaryLogic
    {
        return $this->getStaticObjectType()->isOversizedArray();
    }
    public function isList() : TrinaryLogic
    {
        return $this->getStaticObjectType()->isList();
    }
    public function isNull() : TrinaryLogic
    {
        return $this->getStaticObjectType()->isNull();
    }
    public function isConstantValue() : TrinaryLogic
    {
        return $this->getStaticObjectType()->isConstantValue();
    }
    public function isConstantScalarValue() : TrinaryLogic
    {
        return $this->getStaticObjectType()->isConstantScalarValue();
    }
    public function getConstantScalarTypes() : array
    {
        return $this->getStaticObjectType()->getConstantScalarTypes();
    }
    public function getConstantScalarValues() : array
    {
        return $this->getStaticObjectType()->getConstantScalarValues();
    }
    public function isTrue() : TrinaryLogic
    {
        return $this->getStaticObjectType()->isTrue();
    }
    public function isFalse() : TrinaryLogic
    {
        return $this->getStaticObjectType()->isFalse();
    }
    public function isBoolean() : TrinaryLogic
    {
        return $this->getStaticObjectType()->isBoolean();
    }
    public function isFloat() : TrinaryLogic
    {
        return $this->getStaticObjectType()->isFloat();
    }
    public function isInteger() : TrinaryLogic
    {
        return $this->getStaticObjectType()->isInteger();
    }
    public function isString() : TrinaryLogic
    {
        return $this->getStaticObjectType()->isString();
    }
    public function isNumericString() : TrinaryLogic
    {
        return $this->getStaticObjectType()->isNumericString();
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return $this->getStaticObjectType()->isNonEmptyString();
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return $this->getStaticObjectType()->isNonFalsyString();
    }
    public function isLiteralString() : TrinaryLogic
    {
        return $this->getStaticObjectType()->isLiteralString();
    }
    public function isClassStringType() : TrinaryLogic
    {
        return $this->getStaticObjectType()->isClassStringType();
    }
    public function getClassStringObjectType() : \PHPStan\Type\Type
    {
        return $this->getStaticObjectType()->getClassStringObjectType();
    }
    public function getObjectTypeOrClassStringObjectType() : \PHPStan\Type\Type
    {
        return $this;
    }
    public function isVoid() : TrinaryLogic
    {
        return $this->getStaticObjectType()->isVoid();
    }
    public function isScalar() : TrinaryLogic
    {
        return $this->getStaticObjectType()->isScalar();
    }
    public function looseCompare(\PHPStan\Type\Type $type, PhpVersion $phpVersion) : \PHPStan\Type\BooleanType
    {
        return new \PHPStan\Type\BooleanType();
    }
    /**
     * @return ParametersAcceptor[]
     */
    public function getCallableParametersAcceptors(ClassMemberAccessAnswerer $scope) : array
    {
        return $this->getStaticObjectType()->getCallableParametersAcceptors($scope);
    }
    public function isCloneable() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function toNumber() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toString() : \PHPStan\Type\Type
    {
        return $this->getStaticObjectType()->toString();
    }
    public function toInteger() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toFloat() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toArray() : \PHPStan\Type\Type
    {
        return $this->getStaticObjectType()->toArray();
    }
    public function toArrayKey() : \PHPStan\Type\Type
    {
        return $this->getStaticObjectType()->toArrayKey();
    }
    public function toBoolean() : \PHPStan\Type\BooleanType
    {
        return $this->getStaticObjectType()->toBoolean();
    }
    public function traverse(callable $cb) : \PHPStan\Type\Type
    {
        $subtractedType = $this->subtractedType !== null ? $cb($this->subtractedType) : null;
        if ($subtractedType !== $this->subtractedType) {
            return new self($this->classReflection, $subtractedType);
        }
        return $this;
    }
    public function traverseSimultaneously(\PHPStan\Type\Type $right, callable $cb) : \PHPStan\Type\Type
    {
        if ($this->subtractedType === null) {
            return $this;
        }
        return new self($this->classReflection);
    }
    public function subtract(\PHPStan\Type\Type $type) : \PHPStan\Type\Type
    {
        if ($this->subtractedType !== null) {
            $type = \PHPStan\Type\TypeCombinator::union($this->subtractedType, $type);
        }
        return $this->changeSubtractedType($type);
    }
    public function getTypeWithoutSubtractedType() : \PHPStan\Type\Type
    {
        return $this->changeSubtractedType(null);
    }
    public function changeSubtractedType(?\PHPStan\Type\Type $subtractedType) : \PHPStan\Type\Type
    {
        if ($subtractedType !== null) {
            $classReflection = $this->getClassReflection();
            if ($classReflection->getAllowedSubTypes() !== null) {
                $objectType = $this->getStaticObjectType()->changeSubtractedType($subtractedType);
                if ($objectType instanceof \PHPStan\Type\NeverType) {
                    return $objectType;
                }
                if ($objectType instanceof \PHPStan\Type\ObjectType && $objectType->getSubtractedType() !== null) {
                    return new self($classReflection, $objectType->getSubtractedType());
                }
                return \PHPStan\Type\TypeCombinator::intersect($this, $objectType);
            }
        }
        return new self($this->classReflection, $subtractedType);
    }
    public function getSubtractedType() : ?\PHPStan\Type\Type
    {
        return $this->subtractedType;
    }
    public function tryRemove(\PHPStan\Type\Type $typeToRemove) : ?\PHPStan\Type\Type
    {
        if ($this->getStaticObjectType()->isSuperTypeOf($typeToRemove)->yes()) {
            return $this->subtract($typeToRemove);
        }
        return null;
    }
    public function exponentiate(\PHPStan\Type\Type $exponent) : \PHPStan\Type\Type
    {
        return $this->getStaticObjectType()->exponentiate($exponent);
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode('static');
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        $reflectionProvider = ReflectionProviderStaticAccessor::getInstance();
        if ($reflectionProvider->hasClass($properties['baseClass'])) {
            return new self($reflectionProvider->getClass($properties['baseClass']), $properties['subtractedType'] ?? null);
        }
        return new \PHPStan\Type\ErrorType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
/** @api */
final class TemplateConstantArrayType extends ConstantArrayType implements \PHPStan\Type\Generic\TemplateType
{
    /** @use TemplateTypeTrait<ConstantArrayType> */
    use \PHPStan\Type\Generic\TemplateTypeTrait;
    use UndecidedComparisonCompoundTypeTrait;
    public function __construct(\PHPStan\Type\Generic\TemplateTypeScope $scope, \PHPStan\Type\Generic\TemplateTypeStrategy $templateTypeStrategy, \PHPStan\Type\Generic\TemplateTypeVariance $templateTypeVariance, string $name, ConstantArrayType $bound)
    {
        parent::__construct($bound->getKeyTypes(), $bound->getValueTypes(), $bound->getNextAutoIndexes(), $bound->getOptionalKeys(), $bound->isList()->yes());
        $this->scope = $scope;
        $this->strategy = $templateTypeStrategy;
        $this->variance = $templateTypeVariance;
        $this->name = $name;
        $this->bound = $bound;
    }
    protected function shouldGeneralizeInferredType() : bool
    {
        return \false;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

class TemplateTypeReference
{
    /**
     * @var \PHPStan\Type\Generic\TemplateType
     */
    private $type;
    /**
     * @var \PHPStan\Type\Generic\TemplateTypeVariance
     */
    private $positionVariance;
    public function __construct(\PHPStan\Type\Generic\TemplateType $type, \PHPStan\Type\Generic\TemplateTypeVariance $positionVariance)
    {
        $this->type = $type;
        $this->positionVariance = $positionVariance;
    }
    public function getType() : \PHPStan\Type\Generic\TemplateType
    {
        return $this->type;
    }
    public function getPositionVariance() : \PHPStan\Type\Generic\TemplateTypeVariance
    {
        return $this->positionVariance;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\Type\AcceptsResult;
use PHPStan\Type\CompoundType;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use function array_merge;
use function sprintf;
/**
 * Template type strategy suitable for return type acceptance contexts
 */
class TemplateTypeArgumentStrategy implements \PHPStan\Type\Generic\TemplateTypeStrategy
{
    public function accepts(\PHPStan\Type\Generic\TemplateType $left, Type $right, bool $strictTypes) : AcceptsResult
    {
        if ($right instanceof CompoundType) {
            $accepts = $right->isAcceptedWithReasonBy($left, $strictTypes);
        } else {
            $accepts = $left->getBound()->acceptsWithReason($right, $strictTypes)->and(AcceptsResult::createMaybe());
            if ($accepts->maybe()) {
                $verbosity = VerbosityLevel::getRecommendedLevelByType($left, $right);
                return new AcceptsResult($accepts->result, array_merge($accepts->reasons, [sprintf('Type %s is not always the same as %s. It breaks the contract for some argument types, typically subtypes.', $right->describe($verbosity), $left->getName())]));
            }
        }
        return $accepts;
    }
    public function isArgument() : bool
    {
        return \true;
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : self
    {
        return new self();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\Type\ObjectWithoutClassType;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
/** @api */
class TemplateObjectWithoutClassType extends ObjectWithoutClassType implements \PHPStan\Type\Generic\TemplateType
{
    use UndecidedComparisonCompoundTypeTrait;
    /** @use TemplateTypeTrait<ObjectWithoutClassType> */
    use \PHPStan\Type\Generic\TemplateTypeTrait;
    public function __construct(\PHPStan\Type\Generic\TemplateTypeScope $scope, \PHPStan\Type\Generic\TemplateTypeStrategy $templateTypeStrategy, \PHPStan\Type\Generic\TemplateTypeVariance $templateTypeVariance, string $name, ObjectWithoutClassType $bound)
    {
        parent::__construct();
        $this->scope = $scope;
        $this->strategy = $templateTypeStrategy;
        $this->variance = $templateTypeVariance;
        $this->name = $name;
        $this->bound = $bound;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\Type\BooleanType;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
/** @api */
final class TemplateBooleanType extends BooleanType implements \PHPStan\Type\Generic\TemplateType
{
    /** @use TemplateTypeTrait<BooleanType> */
    use \PHPStan\Type\Generic\TemplateTypeTrait;
    use UndecidedComparisonCompoundTypeTrait;
    public function __construct(\PHPStan\Type\Generic\TemplateTypeScope $scope, \PHPStan\Type\Generic\TemplateTypeStrategy $templateTypeStrategy, \PHPStan\Type\Generic\TemplateTypeVariance $templateTypeVariance, string $name, BooleanType $bound)
    {
        parent::__construct();
        $this->scope = $scope;
        $this->strategy = $templateTypeStrategy;
        $this->variance = $templateTypeVariance;
        $this->name = $name;
        $this->bound = $bound;
    }
    protected function shouldGeneralizeInferredType() : bool
    {
        return \false;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\Type\StringType;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
/** @api */
final class TemplateStringType extends StringType implements \PHPStan\Type\Generic\TemplateType
{
    /** @use TemplateTypeTrait<StringType> */
    use \PHPStan\Type\Generic\TemplateTypeTrait;
    use UndecidedComparisonCompoundTypeTrait;
    public function __construct(\PHPStan\Type\Generic\TemplateTypeScope $scope, \PHPStan\Type\Generic\TemplateTypeStrategy $templateTypeStrategy, \PHPStan\Type\Generic\TemplateTypeVariance $templateTypeVariance, string $name, StringType $bound)
    {
        parent::__construct();
        $this->scope = $scope;
        $this->strategy = $templateTypeStrategy;
        $this->variance = $templateTypeVariance;
        $this->name = $name;
        $this->bound = $bound;
    }
    protected function shouldGeneralizeInferredType() : bool
    {
        return \false;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
use PHPStan\Type\Type;
/** @api */
final class TemplateGenericObjectType extends \PHPStan\Type\Generic\GenericObjectType implements \PHPStan\Type\Generic\TemplateType
{
    use UndecidedComparisonCompoundTypeTrait;
    /** @use TemplateTypeTrait<GenericObjectType> */
    use \PHPStan\Type\Generic\TemplateTypeTrait;
    public function __construct(\PHPStan\Type\Generic\TemplateTypeScope $scope, \PHPStan\Type\Generic\TemplateTypeStrategy $templateTypeStrategy, \PHPStan\Type\Generic\TemplateTypeVariance $templateTypeVariance, string $name, \PHPStan\Type\Generic\GenericObjectType $bound)
    {
        parent::__construct($bound->getClassName(), $bound->getTypes());
        $this->scope = $scope;
        $this->strategy = $templateTypeStrategy;
        $this->variance = $templateTypeVariance;
        $this->name = $name;
        $this->bound = $bound;
    }
    protected function recreate(string $className, array $types, ?Type $subtractedType) : \PHPStan\Type\Generic\GenericObjectType
    {
        return new self($this->scope, $this->strategy, $this->variance, $this->name, $this->getBound());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\Type\FloatType;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
/** @api */
final class TemplateFloatType extends FloatType implements \PHPStan\Type\Generic\TemplateType
{
    /** @use TemplateTypeTrait<FloatType> */
    use \PHPStan\Type\Generic\TemplateTypeTrait;
    use UndecidedComparisonCompoundTypeTrait;
    public function __construct(\PHPStan\Type\Generic\TemplateTypeScope $scope, \PHPStan\Type\Generic\TemplateTypeStrategy $templateTypeStrategy, \PHPStan\Type\Generic\TemplateTypeVariance $templateTypeVariance, string $name, FloatType $bound)
    {
        parent::__construct();
        $this->scope = $scope;
        $this->strategy = $templateTypeStrategy;
        $this->variance = $templateTypeVariance;
        $this->name = $name;
        $this->bound = $bound;
    }
    protected function shouldGeneralizeInferredType() : bool
    {
        return \false;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\PhpDoc\Tag\TemplateTag;
use PHPStan\Type\ArrayType;
use PHPStan\Type\BenevolentUnionType;
use PHPStan\Type\BooleanType;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\FloatType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\KeyOfType;
use PHPStan\Type\MixedType;
use PHPStan\Type\ObjectShapeType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\ObjectWithoutClassType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\UnionType;
use function get_class;
final class TemplateTypeFactory
{
    public static function create(\PHPStan\Type\Generic\TemplateTypeScope $scope, string $name, ?Type $bound, \PHPStan\Type\Generic\TemplateTypeVariance $variance, ?\PHPStan\Type\Generic\TemplateTypeStrategy $strategy = null) : \PHPStan\Type\Generic\TemplateType
    {
        $strategy = $strategy ?? new \PHPStan\Type\Generic\TemplateTypeParameterStrategy();
        if ($bound === null) {
            return new \PHPStan\Type\Generic\TemplateMixedType($scope, $strategy, $variance, $name, new MixedType(\true));
        }
        $boundClass = get_class($bound);
        if ($bound instanceof ObjectType && ($boundClass === ObjectType::class || $bound instanceof \PHPStan\Type\Generic\TemplateType)) {
            return new \PHPStan\Type\Generic\TemplateObjectType($scope, $strategy, $variance, $name, $bound);
        }
        if ($bound instanceof \PHPStan\Type\Generic\GenericObjectType && ($boundClass === \PHPStan\Type\Generic\GenericObjectType::class || $bound instanceof \PHPStan\Type\Generic\TemplateType)) {
            return new \PHPStan\Type\Generic\TemplateGenericObjectType($scope, $strategy, $variance, $name, $bound);
        }
        if ($bound instanceof ObjectWithoutClassType && ($boundClass === ObjectWithoutClassType::class || $bound instanceof \PHPStan\Type\Generic\TemplateType)) {
            return new \PHPStan\Type\Generic\TemplateObjectWithoutClassType($scope, $strategy, $variance, $name, $bound);
        }
        if ($bound instanceof ArrayType && ($boundClass === ArrayType::class || $bound instanceof \PHPStan\Type\Generic\TemplateType)) {
            return new \PHPStan\Type\Generic\TemplateArrayType($scope, $strategy, $variance, $name, $bound);
        }
        if ($bound instanceof ConstantArrayType && ($boundClass === ConstantArrayType::class || $bound instanceof \PHPStan\Type\Generic\TemplateType)) {
            return new \PHPStan\Type\Generic\TemplateConstantArrayType($scope, $strategy, $variance, $name, $bound);
        }
        if ($bound instanceof ObjectShapeType && ($boundClass === ObjectShapeType::class || $bound instanceof \PHPStan\Type\Generic\TemplateType)) {
            return new \PHPStan\Type\Generic\TemplateObjectShapeType($scope, $strategy, $variance, $name, $bound);
        }
        if ($bound instanceof StringType && ($boundClass === StringType::class || $bound instanceof \PHPStan\Type\Generic\TemplateType)) {
            return new \PHPStan\Type\Generic\TemplateStringType($scope, $strategy, $variance, $name, $bound);
        }
        if ($bound instanceof ConstantStringType && ($boundClass === ConstantStringType::class || $bound instanceof \PHPStan\Type\Generic\TemplateType)) {
            return new \PHPStan\Type\Generic\TemplateConstantStringType($scope, $strategy, $variance, $name, $bound);
        }
        if ($bound instanceof IntegerType && ($boundClass === IntegerType::class || $bound instanceof \PHPStan\Type\Generic\TemplateType)) {
            return new \PHPStan\Type\Generic\TemplateIntegerType($scope, $strategy, $variance, $name, $bound);
        }
        if ($bound instanceof ConstantIntegerType && ($boundClass === ConstantIntegerType::class || $bound instanceof \PHPStan\Type\Generic\TemplateType)) {
            return new \PHPStan\Type\Generic\TemplateConstantIntegerType($scope, $strategy, $variance, $name, $bound);
        }
        if ($bound instanceof FloatType && ($boundClass === FloatType::class || $bound instanceof \PHPStan\Type\Generic\TemplateType)) {
            return new \PHPStan\Type\Generic\TemplateFloatType($scope, $strategy, $variance, $name, $bound);
        }
        if ($bound instanceof BooleanType && ($boundClass === BooleanType::class || $bound instanceof \PHPStan\Type\Generic\TemplateType)) {
            return new \PHPStan\Type\Generic\TemplateBooleanType($scope, $strategy, $variance, $name, $bound);
        }
        if ($bound instanceof MixedType && ($boundClass === MixedType::class || $bound instanceof \PHPStan\Type\Generic\TemplateType)) {
            return new \PHPStan\Type\Generic\TemplateMixedType($scope, $strategy, $variance, $name, $bound);
        }
        if ($bound instanceof UnionType) {
            if ($boundClass === UnionType::class || $bound instanceof \PHPStan\Type\Generic\TemplateUnionType) {
                return new \PHPStan\Type\Generic\TemplateUnionType($scope, $strategy, $variance, $name, $bound);
            }
            if ($bound instanceof BenevolentUnionType) {
                return new \PHPStan\Type\Generic\TemplateBenevolentUnionType($scope, $strategy, $variance, $name, $bound);
            }
        }
        if ($bound instanceof IntersectionType) {
            return new \PHPStan\Type\Generic\TemplateIntersectionType($scope, $strategy, $variance, $name, $bound);
        }
        if ($bound instanceof KeyOfType && ($boundClass === KeyOfType::class || $bound instanceof \PHPStan\Type\Generic\TemplateType)) {
            return new \PHPStan\Type\Generic\TemplateKeyOfType($scope, $strategy, $variance, $name, $bound);
        }
        return new \PHPStan\Type\Generic\TemplateMixedType($scope, $strategy, $variance, $name, new MixedType(\true));
    }
    public static function fromTemplateTag(\PHPStan\Type\Generic\TemplateTypeScope $scope, TemplateTag $tag) : \PHPStan\Type\Generic\TemplateType
    {
        return self::create($scope, $tag->getName(), $tag->getBound(), $tag->getVariance());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\PhpDocParser\Ast\Type\GenericTypeNode;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\Reflection\ReflectionProviderStaticAccessor;
use PHPStan\TrinaryLogic;
use PHPStan\Type\AcceptsResult;
use PHPStan\Type\ClassStringType;
use PHPStan\Type\CompoundType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\MixedType;
use PHPStan\Type\NeverType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\ObjectWithoutClassType;
use PHPStan\Type\StaticType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
use function count;
use function sprintf;
/** @api */
class GenericClassStringType extends ClassStringType
{
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    /** @api */
    public function __construct(Type $type)
    {
        $this->type = $type;
        parent::__construct();
    }
    public function getReferencedClasses() : array
    {
        return $this->type->getReferencedClasses();
    }
    public function getGenericType() : Type
    {
        return $this->type;
    }
    public function getClassStringObjectType() : Type
    {
        return $this->getGenericType();
    }
    public function getObjectTypeOrClassStringObjectType() : Type
    {
        return $this->getClassStringObjectType();
    }
    public function describe(VerbosityLevel $level) : string
    {
        return sprintf('%s<%s>', parent::describe($level), $this->type->describe($level));
    }
    public function acceptsWithReason(Type $type, bool $strictTypes) : AcceptsResult
    {
        if ($type instanceof CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        if ($type instanceof ConstantStringType) {
            if (!$type->isClassStringType()->yes()) {
                return AcceptsResult::createNo();
            }
            $objectType = new ObjectType($type->getValue());
        } elseif ($type instanceof self) {
            $objectType = $type->type;
        } elseif ($type instanceof ClassStringType) {
            $objectType = new ObjectWithoutClassType();
        } elseif ($type instanceof StringType) {
            return AcceptsResult::createMaybe();
        } else {
            return AcceptsResult::createNo();
        }
        return $this->type->acceptsWithReason($objectType, $strictTypes);
    }
    public function isSuperTypeOf(Type $type) : TrinaryLogic
    {
        if ($type instanceof CompoundType) {
            return $type->isSubTypeOf($this);
        }
        if ($type instanceof ConstantStringType) {
            $genericType = $this->type;
            if ($genericType instanceof MixedType) {
                return TrinaryLogic::createYes();
            }
            if ($genericType instanceof StaticType) {
                $genericType = $genericType->getStaticObjectType();
            }
            // We are transforming constant class-string to ObjectType. But we need to filter out
            // an uncertainty originating in possible ObjectType's class subtypes.
            $objectType = new ObjectType($type->getValue());
            // Do not use TemplateType's isSuperTypeOf handling directly because it takes ObjectType
            // uncertainty into account.
            if ($genericType instanceof \PHPStan\Type\Generic\TemplateType) {
                $isSuperType = $genericType->getBound()->isSuperTypeOf($objectType);
            } else {
                $isSuperType = $genericType->isSuperTypeOf($objectType);
            }
            if (!$type->isClassStringType()->yes()) {
                $isSuperType = $isSuperType->and(TrinaryLogic::createMaybe());
            }
            return $isSuperType;
        } elseif ($type instanceof self) {
            return $this->type->isSuperTypeOf($type->type);
        } elseif ($type instanceof StringType) {
            return TrinaryLogic::createMaybe();
        }
        return TrinaryLogic::createNo();
    }
    public function traverse(callable $cb) : Type
    {
        $newType = $cb($this->type);
        if ($newType === $this->type) {
            return $this;
        }
        return new self($newType);
    }
    public function traverseSimultaneously(Type $right, callable $cb) : Type
    {
        $newType = $cb($this->type, $right->getClassStringObjectType());
        if ($newType === $this->type) {
            return $this;
        }
        return new self($newType);
    }
    public function inferTemplateTypes(Type $receivedType) : \PHPStan\Type\Generic\TemplateTypeMap
    {
        if ($receivedType instanceof UnionType || $receivedType instanceof IntersectionType) {
            return $receivedType->inferTemplateTypesOn($this);
        }
        if ($receivedType instanceof ConstantStringType) {
            $typeToInfer = new ObjectType($receivedType->getValue());
        } elseif ($receivedType instanceof self) {
            $typeToInfer = $receivedType->type;
        } elseif ($receivedType->isClassStringType()->yes()) {
            $typeToInfer = $this->type;
            if ($typeToInfer instanceof \PHPStan\Type\Generic\TemplateType) {
                $typeToInfer = $typeToInfer->getBound();
            }
            $typeToInfer = TypeCombinator::intersect($typeToInfer, new ObjectWithoutClassType());
        } else {
            return \PHPStan\Type\Generic\TemplateTypeMap::createEmpty();
        }
        return $this->type->inferTemplateTypes($typeToInfer);
    }
    public function getReferencedTemplateTypes(\PHPStan\Type\Generic\TemplateTypeVariance $positionVariance) : array
    {
        $variance = $positionVariance->compose(\PHPStan\Type\Generic\TemplateTypeVariance::createCovariant());
        return $this->type->getReferencedTemplateTypes($variance);
    }
    public function equals(Type $type) : bool
    {
        if (!$type instanceof self) {
            return \false;
        }
        if (!parent::equals($type)) {
            return \false;
        }
        if (!$this->type->equals($type->type)) {
            return \false;
        }
        return \true;
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : Type
    {
        return new self($properties['type']);
    }
    public function toPhpDocNode() : TypeNode
    {
        return new GenericTypeNode(new IdentifierTypeNode('class-string'), [$this->type->toPhpDocNode()]);
    }
    public function tryRemove(Type $typeToRemove) : ?Type
    {
        if ($typeToRemove instanceof ConstantStringType && $typeToRemove->isClassStringType()->yes()) {
            $generic = $this->getGenericType();
            $genericObjectClassNames = $generic->getObjectClassNames();
            if (count($genericObjectClassNames) === 1) {
                $classReflection = ReflectionProviderStaticAccessor::getInstance()->getClass($genericObjectClassNames[0]);
                if ($classReflection->isFinal() && $genericObjectClassNames[0] === $typeToRemove->getValue()) {
                    return new NeverType();
                }
            }
        }
        return parent::tryRemove($typeToRemove);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\Type\BenevolentUnionType;
use PHPStan\Type\Type;
/** @api */
final class TemplateBenevolentUnionType extends BenevolentUnionType implements \PHPStan\Type\Generic\TemplateType
{
    /** @use TemplateTypeTrait<BenevolentUnionType> */
    use \PHPStan\Type\Generic\TemplateTypeTrait;
    public function __construct(\PHPStan\Type\Generic\TemplateTypeScope $scope, \PHPStan\Type\Generic\TemplateTypeStrategy $templateTypeStrategy, \PHPStan\Type\Generic\TemplateTypeVariance $templateTypeVariance, string $name, BenevolentUnionType $bound)
    {
        parent::__construct($bound->getTypes());
        $this->scope = $scope;
        $this->strategy = $templateTypeStrategy;
        $this->variance = $templateTypeVariance;
        $this->name = $name;
        $this->bound = $bound;
    }
    /** @param Type[] $types */
    public function withTypes(array $types) : self
    {
        return new self($this->scope, $this->strategy, $this->variance, $this->name, new BenevolentUnionType($types));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use function sprintf;
class TemplateTypeScope
{
    /**
     * @var string|null
     */
    private $className;
    /**
     * @var string|null
     */
    private $functionName;
    public static function createWithFunction(string $functionName) : self
    {
        return new self(null, $functionName);
    }
    public static function createWithMethod(string $className, string $functionName) : self
    {
        return new self($className, $functionName);
    }
    public static function createWithClass(string $className) : self
    {
        return new self($className, null);
    }
    private function __construct(?string $className, ?string $functionName)
    {
        $this->className = $className;
        $this->functionName = $functionName;
    }
    /** @api */
    public function getClassName() : ?string
    {
        return $this->className;
    }
    /** @api */
    public function getFunctionName() : ?string
    {
        return $this->functionName;
    }
    /** @api */
    public function equals(self $other) : bool
    {
        return $this->className === $other->className && $this->functionName === $other->functionName;
    }
    /** @api */
    public function describe() : string
    {
        if ($this->className === null) {
            return sprintf('function %s()', $this->functionName);
        }
        if ($this->functionName === null) {
            return sprintf('class %s', $this->className);
        }
        return sprintf('method %s::%s()', $this->className, $this->functionName);
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : self
    {
        return new self($properties['className'], $properties['functionName']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
/** @api */
final class TemplateConstantStringType extends ConstantStringType implements \PHPStan\Type\Generic\TemplateType
{
    /** @use TemplateTypeTrait<ConstantStringType> */
    use \PHPStan\Type\Generic\TemplateTypeTrait;
    use UndecidedComparisonCompoundTypeTrait;
    public function __construct(\PHPStan\Type\Generic\TemplateTypeScope $scope, \PHPStan\Type\Generic\TemplateTypeStrategy $templateTypeStrategy, \PHPStan\Type\Generic\TemplateTypeVariance $templateTypeVariance, string $name, ConstantStringType $bound)
    {
        parent::__construct($bound->getValue());
        $this->scope = $scope;
        $this->strategy = $templateTypeStrategy;
        $this->variance = $templateTypeVariance;
        $this->name = $name;
        $this->bound = $bound;
    }
    protected function shouldGeneralizeInferredType() : bool
    {
        return \false;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\Type\AcceptsResult;
use PHPStan\Type\Type;
interface TemplateTypeStrategy
{
    public function accepts(\PHPStan\Type\Generic\TemplateType $left, Type $right, bool $strictTypes) : AcceptsResult;
    public function isArgument() : bool;
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\Type\ArrayType;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
/** @api */
final class TemplateArrayType extends ArrayType implements \PHPStan\Type\Generic\TemplateType
{
    /** @use TemplateTypeTrait<ArrayType> */
    use \PHPStan\Type\Generic\TemplateTypeTrait;
    use UndecidedComparisonCompoundTypeTrait;
    public function __construct(\PHPStan\Type\Generic\TemplateTypeScope $scope, \PHPStan\Type\Generic\TemplateTypeStrategy $templateTypeStrategy, \PHPStan\Type\Generic\TemplateTypeVariance $templateTypeVariance, string $name, ArrayType $bound)
    {
        parent::__construct($bound->getKeyType(), $bound->getItemType());
        $this->scope = $scope;
        $this->strategy = $templateTypeStrategy;
        $this->variance = $templateTypeVariance;
        $this->name = $name;
        $this->bound = $bound;
    }
    protected function shouldGeneralizeInferredType() : bool
    {
        return \false;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\Type\UnionType;
/** @api */
final class TemplateUnionType extends UnionType implements \PHPStan\Type\Generic\TemplateType
{
    /** @use TemplateTypeTrait<UnionType> */
    use \PHPStan\Type\Generic\TemplateTypeTrait;
    public function __construct(\PHPStan\Type\Generic\TemplateTypeScope $scope, \PHPStan\Type\Generic\TemplateTypeStrategy $templateTypeStrategy, \PHPStan\Type\Generic\TemplateTypeVariance $templateTypeVariance, string $name, UnionType $bound)
    {
        parent::__construct($bound->getTypes());
        $this->scope = $scope;
        $this->strategy = $templateTypeStrategy;
        $this->variance = $templateTypeVariance;
        $this->name = $name;
        $this->bound = $bound;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\Type\IntegerType;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
/** @api */
final class TemplateIntegerType extends IntegerType implements \PHPStan\Type\Generic\TemplateType
{
    /** @use TemplateTypeTrait<IntegerType> */
    use \PHPStan\Type\Generic\TemplateTypeTrait;
    use UndecidedComparisonCompoundTypeTrait;
    public function __construct(\PHPStan\Type\Generic\TemplateTypeScope $scope, \PHPStan\Type\Generic\TemplateTypeStrategy $templateTypeStrategy, \PHPStan\Type\Generic\TemplateTypeVariance $templateTypeVariance, string $name, IntegerType $bound)
    {
        parent::__construct();
        $this->scope = $scope;
        $this->strategy = $templateTypeStrategy;
        $this->variance = $templateTypeVariance;
        $this->name = $name;
        $this->bound = $bound;
    }
    protected function shouldGeneralizeInferredType() : bool
    {
        return \false;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\AcceptsResult;
use PHPStan\Type\BenevolentUnionType;
use PHPStan\Type\MixedType;
use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
use function sprintf;
/** @api */
class TemplateTypeVariance
{
    private const INVARIANT = 1;
    private const COVARIANT = 2;
    private const CONTRAVARIANT = 3;
    private const STATIC = 4;
    /** @var self[] */
    private static $registry;
    /**
     * @var bool
     */
    private static $invarianceCompositionEnabled = \false;
    /**
     * @var int
     */
    private $value;
    private function __construct(int $value)
    {
        $this->value = $value;
    }
    private static function create(int $value) : self
    {
        self::$registry[$value] = self::$registry[$value] ?? new self($value);
        return self::$registry[$value];
    }
    public static function createInvariant() : self
    {
        return self::create(self::INVARIANT);
    }
    public static function createCovariant() : self
    {
        return self::create(self::COVARIANT);
    }
    public static function createContravariant() : self
    {
        return self::create(self::CONTRAVARIANT);
    }
    public static function createStatic() : self
    {
        return self::create(self::STATIC);
    }
    public function invariant() : bool
    {
        return $this->value === self::INVARIANT;
    }
    public function covariant() : bool
    {
        return $this->value === self::COVARIANT;
    }
    public function contravariant() : bool
    {
        return $this->value === self::CONTRAVARIANT;
    }
    public function static() : bool
    {
        return $this->value === self::STATIC;
    }
    public function compose(self $other) : self
    {
        if ($this->contravariant()) {
            if ($other->contravariant()) {
                return self::createCovariant();
            }
            if ($other->covariant()) {
                return self::createContravariant();
            }
            return self::createInvariant();
        }
        if ($this->covariant()) {
            if ($other->contravariant()) {
                return self::createContravariant();
            }
            if ($other->covariant()) {
                return self::createCovariant();
            }
            return self::createInvariant();
        }
        if (self::$invarianceCompositionEnabled && $this->invariant()) {
            return self::createInvariant();
        }
        return $other;
    }
    public function isValidVariance(Type $a, Type $b) : TrinaryLogic
    {
        return $this->isValidVarianceWithReason(null, $a, $b)->result;
    }
    public function isValidVarianceWithReason(?\PHPStan\Type\Generic\TemplateType $templateType, Type $a, Type $b) : AcceptsResult
    {
        if ($b instanceof NeverType) {
            return AcceptsResult::createYes();
        }
        if ($a instanceof MixedType && !$a instanceof \PHPStan\Type\Generic\TemplateType) {
            return AcceptsResult::createYes();
        }
        if ($a instanceof BenevolentUnionType) {
            if (!$a->isSuperTypeOf($b)->no()) {
                return AcceptsResult::createYes();
            }
        }
        if ($b instanceof BenevolentUnionType) {
            if (!$b->isSuperTypeOf($a)->no()) {
                return AcceptsResult::createYes();
            }
        }
        if ($b instanceof MixedType && !$b instanceof \PHPStan\Type\Generic\TemplateType) {
            return AcceptsResult::createYes();
        }
        if ($this->invariant()) {
            $result = $a->equals($b);
            $reasons = [];
            if (!$result) {
                if ($templateType !== null && $templateType->getScope()->getClassName() !== null && $a->isSuperTypeOf($b)->yes()) {
                    $reasons[] = sprintf('Template type %s on class %s is not covariant. Learn more: <fg=cyan>https://phpstan.org/blog/whats-up-with-template-covariant</>', $templateType->getName(), $templateType->getScope()->getClassName());
                }
            }
            return new AcceptsResult(TrinaryLogic::createFromBoolean($result), $reasons);
        }
        if ($this->covariant()) {
            return new AcceptsResult($a->isSuperTypeOf($b), []);
        }
        if ($this->contravariant()) {
            return new AcceptsResult($b->isSuperTypeOf($a), []);
        }
        throw new ShouldNotHappenException();
    }
    public function equals(self $other) : bool
    {
        return $other->value === $this->value;
    }
    public function validPosition(self $other) : bool
    {
        return $other->value === $this->value || $other->invariant() || $this->static();
    }
    public function describe() : string
    {
        switch ($this->value) {
            case self::INVARIANT:
                return 'invariant';
            case self::COVARIANT:
                return 'covariant';
            case self::CONTRAVARIANT:
                return 'contravariant';
            case self::STATIC:
                return 'static';
        }
        throw new ShouldNotHappenException();
    }
    /**
     * @param array{value: int} $properties
     */
    public static function __set_state(array $properties) : self
    {
        return new self($properties['value']);
    }
    public static function setInvarianceCompositionEnabled(bool $enabled) : void
    {
        self::$invarianceCompositionEnabled = $enabled;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\Type\ObjectShapeType;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
/** @api */
final class TemplateObjectShapeType extends ObjectShapeType implements \PHPStan\Type\Generic\TemplateType
{
    /** @use TemplateTypeTrait<ObjectShapeType> */
    use \PHPStan\Type\Generic\TemplateTypeTrait;
    use UndecidedComparisonCompoundTypeTrait;
    public function __construct(\PHPStan\Type\Generic\TemplateTypeScope $scope, \PHPStan\Type\Generic\TemplateTypeStrategy $templateTypeStrategy, \PHPStan\Type\Generic\TemplateTypeVariance $templateTypeVariance, string $name, ObjectShapeType $bound)
    {
        parent::__construct($bound->getProperties(), $bound->getOptionalProperties());
        $this->scope = $scope;
        $this->strategy = $templateTypeStrategy;
        $this->variance = $templateTypeVariance;
        $this->name = $name;
        $this->bound = $bound;
    }
    protected function shouldGeneralizeInferredType() : bool
    {
        return \false;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
/** @api */
final class TemplateConstantIntegerType extends ConstantIntegerType implements \PHPStan\Type\Generic\TemplateType
{
    /** @use TemplateTypeTrait<ConstantIntegerType> */
    use \PHPStan\Type\Generic\TemplateTypeTrait;
    use UndecidedComparisonCompoundTypeTrait;
    public function __construct(\PHPStan\Type\Generic\TemplateTypeScope $scope, \PHPStan\Type\Generic\TemplateTypeStrategy $templateTypeStrategy, \PHPStan\Type\Generic\TemplateTypeVariance $templateTypeVariance, string $name, ConstantIntegerType $bound)
    {
        parent::__construct($bound->getValue());
        $this->scope = $scope;
        $this->strategy = $templateTypeStrategy;
        $this->variance = $templateTypeVariance;
        $this->name = $name;
        $this->bound = $bound;
    }
    protected function shouldGeneralizeInferredType() : bool
    {
        return \false;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypeUtils;
use function array_key_exists;
use function count;
/** @api */
class TemplateTypeMap
{
    /**
     * @var \PHPStan\Type\Generic\TemplateTypeMap|null
     */
    private static $empty;
    /**
     * @var \PHPStan\Type\Generic\TemplateTypeMap|null
     */
    private $resolvedToBounds;
    /**
     * @var array<string, Type>
     */
    private $types;
    /**
     * @var array<string, Type>
     */
    private $lowerBoundTypes = [];
    /**
     * @api
     * @param array<string, Type> $types
     * @param array<string, Type> $lowerBoundTypes
     */
    public function __construct(array $types, array $lowerBoundTypes = [])
    {
        $this->types = $types;
        $this->lowerBoundTypes = $lowerBoundTypes;
    }
    public function convertToLowerBoundTypes() : self
    {
        $lowerBoundTypes = $this->types;
        foreach ($this->lowerBoundTypes as $name => $type) {
            if (isset($lowerBoundTypes[$name])) {
                $intersection = TypeCombinator::intersect($lowerBoundTypes[$name], $type);
                if ($intersection instanceof NeverType) {
                    continue;
                }
                $lowerBoundTypes[$name] = $intersection;
            } else {
                $lowerBoundTypes[$name] = $type;
            }
        }
        return new self([], $lowerBoundTypes);
    }
    public static function createEmpty() : self
    {
        $empty = self::$empty;
        if ($empty !== null) {
            return $empty;
        }
        $empty = new self([], []);
        self::$empty = $empty;
        return $empty;
    }
    public function isEmpty() : bool
    {
        return $this->count() === 0;
    }
    public function count() : int
    {
        return count($this->types + $this->lowerBoundTypes);
    }
    /** @return array<string, Type> */
    public function getTypes() : array
    {
        $types = $this->types;
        foreach ($this->lowerBoundTypes as $name => $type) {
            if (array_key_exists($name, $types)) {
                continue;
            }
            $types[$name] = $type;
        }
        return $types;
    }
    public function hasType(string $name) : bool
    {
        return array_key_exists($name, $this->getTypes());
    }
    public function getType(string $name) : ?Type
    {
        return $this->getTypes()[$name] ?? null;
    }
    public function unsetType(string $name) : self
    {
        if (!$this->hasType($name)) {
            return $this;
        }
        $types = $this->types;
        $lowerBoundTypes = $this->lowerBoundTypes;
        unset($types[$name]);
        unset($lowerBoundTypes[$name]);
        if (count($types) === 0 && count($lowerBoundTypes) === 0) {
            return self::createEmpty();
        }
        return new self($types, $lowerBoundTypes);
    }
    public function union(self $other) : self
    {
        $result = $this->types;
        foreach ($other->types as $name => $type) {
            if (isset($result[$name])) {
                $result[$name] = TypeCombinator::union($result[$name], $type);
            } else {
                $result[$name] = $type;
            }
        }
        $resultLowerBoundTypes = $this->lowerBoundTypes;
        foreach ($other->lowerBoundTypes as $name => $type) {
            if (isset($resultLowerBoundTypes[$name])) {
                $intersection = TypeCombinator::intersect($resultLowerBoundTypes[$name], $type);
                if ($intersection instanceof NeverType) {
                    continue;
                }
                $resultLowerBoundTypes[$name] = $intersection;
            } else {
                $resultLowerBoundTypes[$name] = $type;
            }
        }
        return new self($result, $resultLowerBoundTypes);
    }
    public function benevolentUnion(self $other) : self
    {
        $result = $this->types;
        foreach ($other->types as $name => $type) {
            if (isset($result[$name])) {
                $result[$name] = TypeUtils::toBenevolentUnion(TypeCombinator::union($result[$name], $type));
            } else {
                $result[$name] = $type;
            }
        }
        $resultLowerBoundTypes = $this->lowerBoundTypes;
        foreach ($other->lowerBoundTypes as $name => $type) {
            if (isset($resultLowerBoundTypes[$name])) {
                $intersection = TypeCombinator::intersect($resultLowerBoundTypes[$name], $type);
                if ($intersection instanceof NeverType) {
                    continue;
                }
                $resultLowerBoundTypes[$name] = $intersection;
            } else {
                $resultLowerBoundTypes[$name] = $type;
            }
        }
        return new self($result, $resultLowerBoundTypes);
    }
    public function intersect(self $other) : self
    {
        $result = $this->types;
        foreach ($other->types as $name => $type) {
            if (isset($result[$name])) {
                $result[$name] = TypeCombinator::intersect($result[$name], $type);
            } else {
                $result[$name] = $type;
            }
        }
        $resultLowerBoundTypes = $this->lowerBoundTypes;
        foreach ($other->lowerBoundTypes as $name => $type) {
            if (isset($resultLowerBoundTypes[$name])) {
                $resultLowerBoundTypes[$name] = TypeCombinator::union($resultLowerBoundTypes[$name], $type);
            } else {
                $resultLowerBoundTypes[$name] = $type;
            }
        }
        return new self($result, $resultLowerBoundTypes);
    }
    /** @param callable(string,Type):Type $cb */
    public function map(callable $cb) : self
    {
        $types = [];
        foreach ($this->getTypes() as $name => $type) {
            $types[$name] = $cb($name, $type);
        }
        return new self($types);
    }
    public function resolveToBounds() : self
    {
        if ($this->resolvedToBounds !== null) {
            return $this->resolvedToBounds;
        }
        return $this->resolvedToBounds = $this->map(static function (string $name, Type $type) : Type {
            return \PHPStan\Type\Generic\TemplateTypeHelper::resolveToBounds($type);
        });
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : self
    {
        return new self($properties['types'], $properties['lowerBoundTypes'] ?? []);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\TrinaryLogic;
use PHPStan\Type\AcceptsResult;
use PHPStan\Type\GeneralizePrecision;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\MixedType;
use PHPStan\Type\NeverType;
use PHPStan\Type\SubtractableType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypeUtils;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @template TBound of Type
 */
trait TemplateTypeTrait
{
    /**
     * @var string
     */
    private $name;
    /**
     * @var \PHPStan\Type\Generic\TemplateTypeScope
     */
    private $scope;
    /**
     * @var \PHPStan\Type\Generic\TemplateTypeStrategy
     */
    private $strategy;
    /**
     * @var \PHPStan\Type\Generic\TemplateTypeVariance
     */
    private $variance;
    /** @var TBound */
    private $bound;
    public function getName() : string
    {
        return $this->name;
    }
    public function getScope() : \PHPStan\Type\Generic\TemplateTypeScope
    {
        return $this->scope;
    }
    /** @return TBound */
    public function getBound() : Type
    {
        return $this->bound;
    }
    public function describe(VerbosityLevel $level) : string
    {
        $basicDescription = function () use($level) : string {
            // @phpstan-ignore-next-line
            if ($this->bound instanceof MixedType && $this->bound->getSubtractedType() === null && !$this->bound instanceof \PHPStan\Type\Generic\TemplateMixedType) {
                $boundDescription = '';
            } else {
                // @phpstan-ignore-line
                $boundDescription = sprintf(' of %s', $this->bound->describe($level));
            }
            return sprintf('%s%s', $this->name, $boundDescription);
        };
        return $level->handle($basicDescription, $basicDescription, function () use($basicDescription) : string {
            return sprintf('%s (%s, %s)', $basicDescription(), $this->scope->describe(), $this->isArgument() ? 'argument' : 'parameter');
        });
    }
    public function isArgument() : bool
    {
        return $this->strategy->isArgument();
    }
    public function toArgument() : \PHPStan\Type\Generic\TemplateType
    {
        return new self($this->scope, new \PHPStan\Type\Generic\TemplateTypeArgumentStrategy(), $this->variance, $this->name, \PHPStan\Type\Generic\TemplateTypeHelper::toArgument($this->getBound()));
    }
    public function isValidVariance(Type $a, Type $b) : TrinaryLogic
    {
        return $this->isValidVarianceWithReason($a, $b)->result;
    }
    public function isValidVarianceWithReason(Type $a, Type $b) : AcceptsResult
    {
        return $this->variance->isValidVarianceWithReason($this, $a, $b);
    }
    public function subtract(Type $typeToRemove) : Type
    {
        $removedBound = TypeCombinator::remove($this->getBound(), $typeToRemove);
        return \PHPStan\Type\Generic\TemplateTypeFactory::create($this->getScope(), $this->getName(), $removedBound, $this->getVariance(), $this->getStrategy());
    }
    public function getTypeWithoutSubtractedType() : Type
    {
        $bound = $this->getBound();
        if (!$bound instanceof SubtractableType) {
            // @phpstan-ignore-line
            return $this;
        }
        return \PHPStan\Type\Generic\TemplateTypeFactory::create($this->getScope(), $this->getName(), $bound->getTypeWithoutSubtractedType(), $this->getVariance(), $this->getStrategy());
    }
    public function changeSubtractedType(?Type $subtractedType) : Type
    {
        $bound = $this->getBound();
        if (!$bound instanceof SubtractableType) {
            // @phpstan-ignore-line
            return $this;
        }
        return \PHPStan\Type\Generic\TemplateTypeFactory::create($this->getScope(), $this->getName(), $bound->changeSubtractedType($subtractedType), $this->getVariance(), $this->getStrategy());
    }
    public function getSubtractedType() : ?Type
    {
        $bound = $this->getBound();
        if (!$bound instanceof SubtractableType) {
            // @phpstan-ignore-line
            return null;
        }
        return $bound->getSubtractedType();
    }
    public function equals(Type $type) : bool
    {
        return $type instanceof self && $type->scope->equals($this->scope) && $type->name === $this->name && $this->bound->equals($type->bound);
    }
    public function isAcceptedBy(Type $acceptingType, bool $strictTypes) : TrinaryLogic
    {
        return $this->isAcceptedWithReasonBy($acceptingType, $strictTypes)->result;
    }
    public function isAcceptedWithReasonBy(Type $acceptingType, bool $strictTypes) : AcceptsResult
    {
        /** @var TBound $bound */
        $bound = $this->getBound();
        if (!$acceptingType instanceof $bound && !$this instanceof $acceptingType && !$acceptingType instanceof \PHPStan\Type\Generic\TemplateType && ($acceptingType instanceof UnionType || $acceptingType instanceof IntersectionType)) {
            return $acceptingType->acceptsWithReason($this, $strictTypes);
        }
        if (!$acceptingType instanceof \PHPStan\Type\Generic\TemplateType) {
            return $acceptingType->acceptsWithReason($this->getBound(), $strictTypes);
        }
        if ($this->getScope()->equals($acceptingType->getScope()) && $this->getName() === $acceptingType->getName()) {
            return $acceptingType->getBound()->acceptsWithReason($this->getBound(), $strictTypes);
        }
        return $acceptingType->getBound()->acceptsWithReason($this->getBound(), $strictTypes)->and(new AcceptsResult(TrinaryLogic::createMaybe(), []));
    }
    public function accepts(Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(Type $type, bool $strictTypes) : AcceptsResult
    {
        return $this->strategy->accepts($this, $type, $strictTypes);
    }
    public function isSuperTypeOf(Type $type) : TrinaryLogic
    {
        if ($type instanceof \PHPStan\Type\Generic\TemplateType || $type instanceof IntersectionType) {
            return $type->isSubTypeOf($this);
        }
        if ($type instanceof NeverType) {
            return TrinaryLogic::createYes();
        }
        return $this->getBound()->isSuperTypeOf($type)->and(TrinaryLogic::createMaybe());
    }
    public function isSubTypeOf(Type $type) : TrinaryLogic
    {
        /** @var TBound $bound */
        $bound = $this->getBound();
        if (!$type instanceof $bound && !$this instanceof $type && !$type instanceof \PHPStan\Type\Generic\TemplateType && ($type instanceof UnionType || $type instanceof IntersectionType)) {
            return $type->isSuperTypeOf($this);
        }
        if (!$type instanceof \PHPStan\Type\Generic\TemplateType) {
            return $type->isSuperTypeOf($this->getBound());
        }
        if ($this->getScope()->equals($type->getScope()) && $this->getName() === $type->getName()) {
            return $type->getBound()->isSuperTypeOf($this->getBound());
        }
        return $type->getBound()->isSuperTypeOf($this->getBound())->and(TrinaryLogic::createMaybe());
    }
    public function toArrayKey() : Type
    {
        return $this;
    }
    public function inferTemplateTypes(Type $receivedType) : \PHPStan\Type\Generic\TemplateTypeMap
    {
        if ($receivedType instanceof \PHPStan\Type\Generic\TemplateType && $this->getBound()->isSuperTypeOf($receivedType->getBound())->yes()) {
            return new \PHPStan\Type\Generic\TemplateTypeMap([$this->name => $receivedType]);
        }
        $map = $this->getBound()->inferTemplateTypes($receivedType);
        $resolvedBound = TypeUtils::resolveLateResolvableTypes(\PHPStan\Type\Generic\TemplateTypeHelper::resolveTemplateTypes($this->getBound(), $map));
        if ($resolvedBound->isSuperTypeOf($receivedType)->yes()) {
            if ($this->shouldGeneralizeInferredType()) {
                $generalizedType = $receivedType->generalize(GeneralizePrecision::templateArgument());
                if ($resolvedBound->isSuperTypeOf($generalizedType)->yes()) {
                    $receivedType = $generalizedType;
                }
            }
            return (new \PHPStan\Type\Generic\TemplateTypeMap([$this->name => $receivedType]))->union($map);
        }
        return $map;
    }
    public function getReferencedTemplateTypes(\PHPStan\Type\Generic\TemplateTypeVariance $positionVariance) : array
    {
        return [new \PHPStan\Type\Generic\TemplateTypeReference($this, $positionVariance)];
    }
    public function getVariance() : \PHPStan\Type\Generic\TemplateTypeVariance
    {
        return $this->variance;
    }
    public function getStrategy() : \PHPStan\Type\Generic\TemplateTypeStrategy
    {
        return $this->strategy;
    }
    protected function shouldGeneralizeInferredType() : bool
    {
        return \true;
    }
    public function traverse(callable $cb) : Type
    {
        $bound = $cb($this->getBound());
        if ($this->getBound() === $bound) {
            return $this;
        }
        return \PHPStan\Type\Generic\TemplateTypeFactory::create($this->getScope(), $this->getName(), $bound, $this->getVariance(), $this->getStrategy());
    }
    public function traverseSimultaneously(Type $right, callable $cb) : Type
    {
        if (!$right instanceof \PHPStan\Type\Generic\TemplateType) {
            return $this;
        }
        $bound = $cb($this->getBound(), $right->getBound());
        if ($this->getBound() === $bound) {
            return $this;
        }
        return \PHPStan\Type\Generic\TemplateTypeFactory::create($this->getScope(), $this->getName(), $bound, $this->getVariance(), $this->getStrategy());
    }
    public function tryRemove(Type $typeToRemove) : ?Type
    {
        if ($this->getBound()->isSuperTypeOf($typeToRemove)->yes()) {
            return $this->subtract($typeToRemove);
        }
        return null;
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode($this->name);
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : Type
    {
        return new self($properties['scope'], $properties['strategy'], $properties['variance'], $properties['name'], $properties['bound']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\Type\ErrorType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeTraverser;
class TemplateTypeHelper
{
    /**
     * Replaces template types with standin types
     */
    public static function resolveTemplateTypes(Type $type, \PHPStan\Type\Generic\TemplateTypeMap $standins, bool $keepErrorTypes = \false) : Type
    {
        return TypeTraverser::map($type, static function (Type $type, callable $traverse) use($standins, $keepErrorTypes) : Type {
            if ($type instanceof \PHPStan\Type\Generic\TemplateType && !$type->isArgument()) {
                $newType = $standins->getType($type->getName());
                if ($newType === null) {
                    return $traverse($type);
                }
                if ($newType instanceof ErrorType && !$keepErrorTypes) {
                    return $traverse($type->getBound());
                }
                return $newType;
            }
            return $traverse($type);
        });
    }
    public static function resolveToBounds(Type $type) : Type
    {
        return TypeTraverser::map($type, static function (Type $type, callable $traverse) : Type {
            if ($type instanceof \PHPStan\Type\Generic\TemplateType) {
                return $traverse($type->getBound());
            }
            return $traverse($type);
        });
    }
    /**
     * @template T of Type
     * @param T $type
     * @return T
     */
    public static function toArgument(Type $type) : Type
    {
        /** @var T */
        return TypeTraverser::map($type, static function (Type $type, callable $traverse) : Type {
            if ($type instanceof \PHPStan\Type\Generic\TemplateType) {
                return $traverse($type->toArgument());
            }
            return $traverse($type);
        });
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\TrinaryLogic;
use PHPStan\Type\AcceptsResult;
use PHPStan\Type\MixedType;
use PHPStan\Type\StrictMixedType;
use PHPStan\Type\Type;
/** @api */
final class TemplateStrictMixedType extends StrictMixedType implements \PHPStan\Type\Generic\TemplateType
{
    /** @use TemplateTypeTrait<StrictMixedType> */
    use \PHPStan\Type\Generic\TemplateTypeTrait;
    public function __construct(\PHPStan\Type\Generic\TemplateTypeScope $scope, \PHPStan\Type\Generic\TemplateTypeStrategy $templateTypeStrategy, \PHPStan\Type\Generic\TemplateTypeVariance $templateTypeVariance, string $name, StrictMixedType $bound)
    {
        $this->scope = $scope;
        $this->strategy = $templateTypeStrategy;
        $this->variance = $templateTypeVariance;
        $this->name = $name;
        $this->bound = $bound;
    }
    public function isSuperTypeOfMixed(MixedType $type) : TrinaryLogic
    {
        return $this->isSuperTypeOf($type);
    }
    public function isAcceptedBy(Type $acceptingType, bool $strictTypes) : TrinaryLogic
    {
        return $this->isAcceptedWithReasonBy($acceptingType, $strictTypes)->result;
    }
    public function isAcceptedWithReasonBy(Type $acceptingType, bool $strictTypes) : AcceptsResult
    {
        return new AcceptsResult($this->isSubTypeOf($acceptingType), []);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\Type\IntersectionType;
/** @api */
final class TemplateIntersectionType extends IntersectionType implements \PHPStan\Type\Generic\TemplateType
{
    /** @use TemplateTypeTrait<IntersectionType> */
    use \PHPStan\Type\Generic\TemplateTypeTrait;
    public function __construct(\PHPStan\Type\Generic\TemplateTypeScope $scope, \PHPStan\Type\Generic\TemplateTypeStrategy $templateTypeStrategy, \PHPStan\Type\Generic\TemplateTypeVariance $templateTypeVariance, string $name, IntersectionType $bound)
    {
        parent::__construct($bound->getTypes());
        $this->scope = $scope;
        $this->strategy = $templateTypeStrategy;
        $this->variance = $templateTypeVariance;
        $this->name = $name;
        $this->bound = $bound;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\TrinaryLogic;
use PHPStan\Type\AcceptsResult;
use PHPStan\Type\CompoundType;
use PHPStan\Type\Type;
/** @api */
interface TemplateType extends CompoundType
{
    public function getName() : string;
    public function getScope() : \PHPStan\Type\Generic\TemplateTypeScope;
    public function getBound() : Type;
    public function toArgument() : \PHPStan\Type\Generic\TemplateType;
    public function isArgument() : bool;
    public function isValidVariance(Type $a, Type $b) : TrinaryLogic;
    public function isValidVarianceWithReason(Type $a, Type $b) : AcceptsResult;
    public function getVariance() : \PHPStan\Type\Generic\TemplateTypeVariance;
    public function getStrategy() : \PHPStan\Type\Generic\TemplateTypeStrategy;
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\Type\ObjectType;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
/** @api */
final class TemplateObjectType extends ObjectType implements \PHPStan\Type\Generic\TemplateType
{
    use UndecidedComparisonCompoundTypeTrait;
    /** @use TemplateTypeTrait<ObjectType> */
    use \PHPStan\Type\Generic\TemplateTypeTrait;
    public function __construct(\PHPStan\Type\Generic\TemplateTypeScope $scope, \PHPStan\Type\Generic\TemplateTypeStrategy $templateTypeStrategy, \PHPStan\Type\Generic\TemplateTypeVariance $templateTypeVariance, string $name, ObjectType $bound)
    {
        parent::__construct($bound->getClassName());
        $this->scope = $scope;
        $this->strategy = $templateTypeStrategy;
        $this->variance = $templateTypeVariance;
        $this->name = $name;
        $this->bound = $bound;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\PhpDocParser\Ast\Type\GenericTypeNode;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\Reflection\ClassMemberAccessAnswerer;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Reflection\ReflectionProviderStaticAccessor;
use PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection;
use PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\AcceptsResult;
use PHPStan\Type\CompoundType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeWithClassName;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
use function array_map;
use function count;
use function implode;
use function sprintf;
/** @api */
class GenericObjectType extends ObjectType
{
    /**
     * @var array<int, Type>
     */
    private $types;
    /**
     * @var \PHPStan\Reflection\ClassReflection|null
     */
    private $classReflection;
    /**
     * @api
     * @param array<int, Type> $types
     */
    public function __construct(string $mainType, array $types, ?Type $subtractedType = null, ?ClassReflection $classReflection = null)
    {
        $this->types = $types;
        $this->classReflection = $classReflection;
        parent::__construct($mainType, $subtractedType, $classReflection);
    }
    public function describe(VerbosityLevel $level) : string
    {
        return sprintf('%s<%s>', parent::describe($level), implode(', ', array_map(static function (Type $type) use($level) : string {
            return $type->describe($level);
        }, $this->types)));
    }
    public function equals(Type $type) : bool
    {
        if (!$type instanceof self) {
            return \false;
        }
        if (!parent::equals($type)) {
            return \false;
        }
        if (count($this->types) !== count($type->types)) {
            return \false;
        }
        foreach ($this->types as $i => $genericType) {
            $otherGenericType = $type->types[$i];
            if (!$genericType->equals($otherGenericType)) {
                return \false;
            }
        }
        return \true;
    }
    /**
     * @return string[]
     */
    public function getReferencedClasses() : array
    {
        $classes = parent::getReferencedClasses();
        foreach ($this->types as $type) {
            foreach ($type->getReferencedClasses() as $referencedClass) {
                $classes[] = $referencedClass;
            }
        }
        return $classes;
    }
    /** @return array<int, Type> */
    public function getTypes() : array
    {
        return $this->types;
    }
    public function accepts(Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(Type $type, bool $strictTypes) : AcceptsResult
    {
        if ($type instanceof CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        return $this->isSuperTypeOfInternal($type, \true);
    }
    public function isSuperTypeOf(Type $type) : TrinaryLogic
    {
        if ($type instanceof CompoundType) {
            return $type->isSubTypeOf($this);
        }
        return $this->isSuperTypeOfInternal($type, \false)->result;
    }
    private function isSuperTypeOfInternal(Type $type, bool $acceptsContext) : AcceptsResult
    {
        $nakedSuperTypeOf = new AcceptsResult(parent::isSuperTypeOf($type), []);
        if ($nakedSuperTypeOf->no()) {
            return $nakedSuperTypeOf;
        }
        if (!$type instanceof ObjectType) {
            return $nakedSuperTypeOf;
        }
        $ancestor = $type->getAncestorWithClassName($this->getClassName());
        if ($ancestor === null) {
            return $nakedSuperTypeOf;
        }
        if (!$ancestor instanceof self) {
            if ($acceptsContext) {
                return $nakedSuperTypeOf;
            }
            return $nakedSuperTypeOf->and(AcceptsResult::createMaybe());
        }
        if (count($this->types) !== count($ancestor->types)) {
            return AcceptsResult::createNo();
        }
        $classReflection = $this->getClassReflection();
        if ($classReflection === null) {
            return $nakedSuperTypeOf;
        }
        $typeList = $classReflection->typeMapToList($classReflection->getTemplateTypeMap());
        $results = [];
        foreach ($typeList as $i => $templateType) {
            if (!isset($ancestor->types[$i])) {
                continue;
            }
            if (!isset($this->types[$i])) {
                continue;
            }
            if ($templateType instanceof ErrorType) {
                continue;
            }
            if (!$templateType instanceof \PHPStan\Type\Generic\TemplateType) {
                throw new ShouldNotHappenException();
            }
            $results[] = $templateType->isValidVarianceWithReason($this->types[$i], $ancestor->types[$i]);
        }
        if (count($results) === 0) {
            return $nakedSuperTypeOf;
        }
        $result = AcceptsResult::createYes();
        foreach ($results as $innerResult) {
            $result = $result->and($innerResult);
        }
        return $result;
    }
    public function getClassReflection() : ?ClassReflection
    {
        if ($this->classReflection !== null) {
            return $this->classReflection;
        }
        $reflectionProvider = ReflectionProviderStaticAccessor::getInstance();
        if (!$reflectionProvider->hasClass($this->getClassName())) {
            return null;
        }
        return $this->classReflection = $reflectionProvider->getClass($this->getClassName())->withTypes($this->types);
    }
    public function getProperty(string $propertyName, ClassMemberAccessAnswerer $scope) : PropertyReflection
    {
        return $this->getUnresolvedPropertyPrototype($propertyName, $scope)->getTransformedProperty();
    }
    public function getUnresolvedPropertyPrototype(string $propertyName, ClassMemberAccessAnswerer $scope) : UnresolvedPropertyPrototypeReflection
    {
        $prototype = parent::getUnresolvedPropertyPrototype($propertyName, $scope);
        return $prototype->doNotResolveTemplateTypeMapToBounds();
    }
    public function getMethod(string $methodName, ClassMemberAccessAnswerer $scope) : ExtendedMethodReflection
    {
        return $this->getUnresolvedMethodPrototype($methodName, $scope)->getTransformedMethod();
    }
    public function getUnresolvedMethodPrototype(string $methodName, ClassMemberAccessAnswerer $scope) : UnresolvedMethodPrototypeReflection
    {
        $prototype = parent::getUnresolvedMethodPrototype($methodName, $scope);
        return $prototype->doNotResolveTemplateTypeMapToBounds();
    }
    public function inferTemplateTypes(Type $receivedType) : \PHPStan\Type\Generic\TemplateTypeMap
    {
        if ($receivedType instanceof UnionType || $receivedType instanceof IntersectionType) {
            return $receivedType->inferTemplateTypesOn($this);
        }
        if (!$receivedType instanceof TypeWithClassName) {
            return \PHPStan\Type\Generic\TemplateTypeMap::createEmpty();
        }
        $ancestor = $receivedType->getAncestorWithClassName($this->getClassName());
        if ($ancestor === null) {
            return \PHPStan\Type\Generic\TemplateTypeMap::createEmpty();
        }
        $ancestorClassReflection = $ancestor->getClassReflection();
        if ($ancestorClassReflection === null) {
            return \PHPStan\Type\Generic\TemplateTypeMap::createEmpty();
        }
        $otherTypes = $ancestorClassReflection->typeMapToList($ancestorClassReflection->getActiveTemplateTypeMap());
        $typeMap = \PHPStan\Type\Generic\TemplateTypeMap::createEmpty();
        foreach ($this->getTypes() as $i => $type) {
            $other = $otherTypes[$i] ?? new ErrorType();
            $typeMap = $typeMap->union($type->inferTemplateTypes($other));
        }
        return $typeMap;
    }
    public function getReferencedTemplateTypes(\PHPStan\Type\Generic\TemplateTypeVariance $positionVariance) : array
    {
        $classReflection = $this->getClassReflection();
        if ($classReflection !== null) {
            $typeList = $classReflection->typeMapToList($classReflection->getTemplateTypeMap());
        } else {
            $typeList = [];
        }
        $references = [];
        foreach ($this->types as $i => $type) {
            $variance = $positionVariance->compose(isset($typeList[$i]) && $typeList[$i] instanceof \PHPStan\Type\Generic\TemplateType ? $typeList[$i]->getVariance() : \PHPStan\Type\Generic\TemplateTypeVariance::createInvariant());
            foreach ($type->getReferencedTemplateTypes($variance) as $reference) {
                $references[] = $reference;
            }
        }
        return $references;
    }
    public function traverse(callable $cb) : Type
    {
        $subtractedType = $this->getSubtractedType() !== null ? $cb($this->getSubtractedType()) : null;
        $typesChanged = \false;
        $types = [];
        foreach ($this->types as $type) {
            $newType = $cb($type);
            $types[] = $newType;
            if ($newType === $type) {
                continue;
            }
            $typesChanged = \true;
        }
        if ($subtractedType !== $this->getSubtractedType() || $typesChanged) {
            return $this->recreate($this->getClassName(), $types, $subtractedType);
        }
        return $this;
    }
    public function traverseSimultaneously(Type $right, callable $cb) : Type
    {
        if (!$right instanceof TypeWithClassName) {
            return $this;
        }
        $ancestor = $right->getAncestorWithClassName($this->getClassName());
        if (!$ancestor instanceof self) {
            return $this;
        }
        if (count($this->types) !== count($ancestor->types)) {
            return $this;
        }
        $typesChanged = \false;
        $types = [];
        foreach ($this->types as $i => $leftType) {
            $rightType = $ancestor->types[$i];
            $newType = $cb($leftType, $rightType);
            $types[] = $newType;
            if ($newType === $leftType) {
                continue;
            }
            $typesChanged = \true;
        }
        if ($typesChanged) {
            return $this->recreate($this->getClassName(), $types, null);
        }
        return $this;
    }
    /**
     * @param Type[] $types
     */
    protected function recreate(string $className, array $types, ?Type $subtractedType) : self
    {
        return new self($className, $types, $subtractedType);
    }
    public function changeSubtractedType(?Type $subtractedType) : Type
    {
        return new self($this->getClassName(), $this->types, $subtractedType);
    }
    public function toPhpDocNode() : TypeNode
    {
        /** @var IdentifierTypeNode $parent */
        $parent = parent::toPhpDocNode();
        return new GenericTypeNode($parent, array_map(static function (Type $type) {
            return $type->toPhpDocNode();
        }, $this->types));
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : Type
    {
        return new self($properties['className'], $properties['types'], $properties['subtractedType'] ?? null);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\Type\AcceptsResult;
use PHPStan\Type\CompoundType;
use PHPStan\Type\Type;
/**
 * Template type strategy suitable for parameter type acceptance contexts
 */
class TemplateTypeParameterStrategy implements \PHPStan\Type\Generic\TemplateTypeStrategy
{
    public function accepts(\PHPStan\Type\Generic\TemplateType $left, Type $right, bool $strictTypes) : AcceptsResult
    {
        if ($right instanceof CompoundType) {
            return $right->isAcceptedWithReasonBy($left, $strictTypes);
        }
        return $left->getBound()->acceptsWithReason($right, $strictTypes);
    }
    public function isArgument() : bool
    {
        return \false;
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : self
    {
        return new self();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\TrinaryLogic;
use PHPStan\Type\AcceptsResult;
use PHPStan\Type\MixedType;
use PHPStan\Type\StrictMixedType;
use PHPStan\Type\Type;
/** @api */
final class TemplateMixedType extends MixedType implements \PHPStan\Type\Generic\TemplateType
{
    /** @use TemplateTypeTrait<MixedType> */
    use \PHPStan\Type\Generic\TemplateTypeTrait;
    public function __construct(\PHPStan\Type\Generic\TemplateTypeScope $scope, \PHPStan\Type\Generic\TemplateTypeStrategy $templateTypeStrategy, \PHPStan\Type\Generic\TemplateTypeVariance $templateTypeVariance, string $name, MixedType $bound)
    {
        parent::__construct(\true);
        $this->scope = $scope;
        $this->strategy = $templateTypeStrategy;
        $this->variance = $templateTypeVariance;
        $this->name = $name;
        $this->bound = $bound;
    }
    public function isSuperTypeOfMixed(MixedType $type) : TrinaryLogic
    {
        return $this->isSuperTypeOf($type);
    }
    public function isAcceptedBy(Type $acceptingType, bool $strictTypes) : TrinaryLogic
    {
        return $this->isAcceptedWithReasonBy($acceptingType, $strictTypes)->result;
    }
    public function isAcceptedWithReasonBy(Type $acceptingType, bool $strictTypes) : AcceptsResult
    {
        $isSuperType = new AcceptsResult($this->isSuperTypeOf($acceptingType), []);
        if ($isSuperType->no()) {
            return $isSuperType;
        }
        return AcceptsResult::createYes();
    }
    public function toStrictMixedType() : \PHPStan\Type\Generic\TemplateStrictMixedType
    {
        return new \PHPStan\Type\Generic\TemplateStrictMixedType($this->scope, $this->strategy, $this->variance, $this->name, new StrictMixedType());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Generic;

use PHPStan\Type\KeyOfType;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
use PHPStan\Type\Type;
/** @api */
final class TemplateKeyOfType extends KeyOfType implements \PHPStan\Type\Generic\TemplateType
{
    /** @use TemplateTypeTrait<KeyOfType> */
    use \PHPStan\Type\Generic\TemplateTypeTrait;
    use UndecidedComparisonCompoundTypeTrait;
    public function __construct(\PHPStan\Type\Generic\TemplateTypeScope $scope, \PHPStan\Type\Generic\TemplateTypeStrategy $templateTypeStrategy, \PHPStan\Type\Generic\TemplateTypeVariance $templateTypeVariance, string $name, KeyOfType $bound)
    {
        parent::__construct($bound->getType());
        $this->scope = $scope;
        $this->strategy = $templateTypeStrategy;
        $this->variance = $templateTypeVariance;
        $this->name = $name;
        $this->bound = $bound;
    }
    protected function getResult() : Type
    {
        $result = $this->getBound()->getResult();
        return \PHPStan\Type\Generic\TemplateTypeFactory::create($this->getScope(), $this->getName(), $result, $this->getVariance(), $this->getStrategy());
    }
    protected function shouldGeneralizeInferredType() : bool
    {
        return \false;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\PhpDocParser\Ast\Type\ConditionalTypeForParameterNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Generic\TemplateTypeVariance;
use PHPStan\Type\Traits\LateResolvableTypeTrait;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use function array_merge;
use function sprintf;
/** @api */
final class ConditionalTypeForParameter implements \PHPStan\Type\CompoundType, \PHPStan\Type\LateResolvableType
{
    use LateResolvableTypeTrait;
    use NonGeneralizableTypeTrait;
    /**
     * @var string
     */
    private $parameterName;
    /**
     * @var \PHPStan\Type\Type
     */
    private $target;
    /**
     * @var \PHPStan\Type\Type
     */
    private $if;
    /**
     * @var \PHPStan\Type\Type
     */
    private $else;
    /**
     * @var bool
     */
    private $negated;
    public function __construct(string $parameterName, \PHPStan\Type\Type $target, \PHPStan\Type\Type $if, \PHPStan\Type\Type $else, bool $negated)
    {
        $this->parameterName = $parameterName;
        $this->target = $target;
        $this->if = $if;
        $this->else = $else;
        $this->negated = $negated;
    }
    public function getParameterName() : string
    {
        return $this->parameterName;
    }
    public function getTarget() : \PHPStan\Type\Type
    {
        return $this->target;
    }
    public function getIf() : \PHPStan\Type\Type
    {
        return $this->if;
    }
    public function getElse() : \PHPStan\Type\Type
    {
        return $this->else;
    }
    public function isNegated() : bool
    {
        return $this->negated;
    }
    public function changeParameterName(string $parameterName) : self
    {
        return new self($parameterName, $this->target, $this->if, $this->else, $this->negated);
    }
    public function toConditional(\PHPStan\Type\Type $subject) : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ConditionalType($subject, $this->target, $this->if, $this->else, $this->negated);
    }
    public function isSuperTypeOf(\PHPStan\Type\Type $type) : TrinaryLogic
    {
        if ($type instanceof self) {
            return $this->if->isSuperTypeOf($type->if)->and($this->else->isSuperTypeOf($type->else));
        }
        return $this->isSuperTypeOfDefault($type);
    }
    public function getReferencedClasses() : array
    {
        return array_merge($this->target->getReferencedClasses(), $this->if->getReferencedClasses(), $this->else->getReferencedClasses());
    }
    public function getReferencedTemplateTypes(TemplateTypeVariance $positionVariance) : array
    {
        return array_merge($this->target->getReferencedTemplateTypes($positionVariance), $this->if->getReferencedTemplateTypes($positionVariance), $this->else->getReferencedTemplateTypes($positionVariance));
    }
    public function equals(\PHPStan\Type\Type $type) : bool
    {
        return $type instanceof self && $this->parameterName === $type->parameterName && $this->target->equals($type->target) && $this->if->equals($type->if) && $this->else->equals($type->else);
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        return sprintf('(%s %s %s ? %s : %s)', $this->parameterName, $this->negated ? 'is not' : 'is', $this->target->describe($level), $this->if->describe($level), $this->else->describe($level));
    }
    public function isResolvable() : bool
    {
        return \false;
    }
    protected function getResult() : \PHPStan\Type\Type
    {
        return \PHPStan\Type\TypeCombinator::union($this->if, $this->else);
    }
    public function traverse(callable $cb) : \PHPStan\Type\Type
    {
        $target = $cb($this->target);
        $if = $cb($this->if);
        $else = $cb($this->else);
        if ($this->target === $target && $this->if === $if && $this->else === $else) {
            return $this;
        }
        return new self($this->parameterName, $target, $if, $else, $this->negated);
    }
    public function traverseSimultaneously(\PHPStan\Type\Type $right, callable $cb) : \PHPStan\Type\Type
    {
        if (!$right instanceof self) {
            return $this;
        }
        $target = $cb($this->target, $right->target);
        $if = $cb($this->if, $right->if);
        $else = $cb($this->else, $right->else);
        if ($this->target === $target && $this->if === $if && $this->else === $else) {
            return $this;
        }
        return new self($this->parameterName, $target, $if, $else, $this->negated);
    }
    public function toPhpDocNode() : TypeNode
    {
        return new ConditionalTypeForParameterNode($this->parameterName, $this->target->toPhpDocNode(), $this->if->toPhpDocNode(), $this->else->toPhpDocNode(), $this->negated);
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self($properties['parameterName'], $properties['target'], $properties['if'], $properties['else'], $properties['negated']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Accessory;

use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\TrinaryLogic;
use PHPStan\Type\AcceptsResult;
use PHPStan\Type\BooleanType;
use PHPStan\Type\CompoundType;
use PHPStan\Type\Constant\ConstantFloatType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\MixedType;
use PHPStan\Type\Traits\MaybeCallableTypeTrait;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use PHPStan\Type\Traits\NonGenericTypeTrait;
use PHPStan\Type\Traits\NonObjectTypeTrait;
use PHPStan\Type\Traits\NonRemoveableTypeTrait;
use PHPStan\Type\Traits\UndecidedBooleanTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/** @api */
class AccessoryArrayListType implements CompoundType, \PHPStan\Type\Accessory\AccessoryType
{
    use MaybeCallableTypeTrait;
    use NonObjectTypeTrait;
    use NonGenericTypeTrait;
    use UndecidedBooleanTypeTrait;
    use UndecidedComparisonCompoundTypeTrait;
    use NonRemoveableTypeTrait;
    use NonGeneralizableTypeTrait;
    /**
     * @var bool
     */
    private static $enabled = \false;
    public function __construct()
    {
    }
    public function getReferencedClasses() : array
    {
        return [];
    }
    public function getObjectClassNames() : array
    {
        return [];
    }
    public function getObjectClassReflections() : array
    {
        return [];
    }
    public function getArrays() : array
    {
        return [];
    }
    public function getConstantArrays() : array
    {
        return [];
    }
    public function getConstantStrings() : array
    {
        return [];
    }
    public function accepts(Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(Type $type, bool $strictTypes) : AcceptsResult
    {
        if ($type instanceof CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        $isArray = $type->isArray();
        $isList = $type->isList();
        $reasons = [];
        if ($isArray->yes() && !$isList->yes()) {
            $verbosity = VerbosityLevel::getRecommendedLevelByType($this, $type);
            $reasons[] = sprintf('%s %s a list.', $type->describe($verbosity), $isList->no() ? 'is not' : 'might not be');
        }
        return new AcceptsResult($isArray->and($isList), $reasons);
    }
    public function isSuperTypeOf(Type $type) : TrinaryLogic
    {
        if ($this->equals($type)) {
            return TrinaryLogic::createYes();
        }
        if ($type instanceof CompoundType) {
            return $type->isSubTypeOf($this);
        }
        return $type->isArray()->and($type->isList());
    }
    public function isSubTypeOf(Type $otherType) : TrinaryLogic
    {
        if ($otherType instanceof UnionType || $otherType instanceof IntersectionType) {
            return $otherType->isSuperTypeOf($this);
        }
        return $otherType->isArray()->and($otherType->isList())->and($otherType instanceof self ? TrinaryLogic::createYes() : TrinaryLogic::createMaybe());
    }
    public function isAcceptedBy(Type $acceptingType, bool $strictTypes) : TrinaryLogic
    {
        return $this->isAcceptedWithReasonBy($acceptingType, $strictTypes)->result;
    }
    public function isAcceptedWithReasonBy(Type $acceptingType, bool $strictTypes) : AcceptsResult
    {
        return new AcceptsResult($this->isSubTypeOf($acceptingType), []);
    }
    public function equals(Type $type) : bool
    {
        return $type instanceof self;
    }
    public function describe(VerbosityLevel $level) : string
    {
        return 'list';
    }
    public function isOffsetAccessible() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function hasOffsetValueType(Type $offsetType) : TrinaryLogic
    {
        return $this->getIterableKeyType()->isSuperTypeOf($offsetType)->and(TrinaryLogic::createMaybe());
    }
    public function getOffsetValueType(Type $offsetType) : Type
    {
        return new MixedType();
    }
    public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $unionValues = \true) : Type
    {
        if ($offsetType === null || (new ConstantIntegerType(0))->isSuperTypeOf($offsetType)->yes()) {
            return $this;
        }
        return new ErrorType();
    }
    public function unsetOffset(Type $offsetType) : Type
    {
        if ($this->hasOffsetValueType($offsetType)->no()) {
            return $this;
        }
        return new ErrorType();
    }
    public function getKeysArray() : Type
    {
        return $this;
    }
    public function getValuesArray() : Type
    {
        return $this;
    }
    public function fillKeysArray(Type $valueType) : Type
    {
        return new MixedType();
    }
    public function flipArray() : Type
    {
        return new MixedType();
    }
    public function intersectKeyArray(Type $otherArraysType) : Type
    {
        if ($otherArraysType->isList()->yes()) {
            return $this;
        }
        return new MixedType();
    }
    public function popArray() : Type
    {
        return $this;
    }
    public function searchArray(Type $needleType) : Type
    {
        return new MixedType();
    }
    public function shiftArray() : Type
    {
        return $this;
    }
    public function shuffleArray() : Type
    {
        return $this;
    }
    public function isIterable() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isIterableAtLeastOnce() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getArraySize() : Type
    {
        return IntegerRangeType::fromInterval(0, null);
    }
    public function getIterableKeyType() : Type
    {
        return IntegerRangeType::fromInterval(0, null);
    }
    public function getFirstIterableKeyType() : Type
    {
        return new ConstantIntegerType(0);
    }
    public function getLastIterableKeyType() : Type
    {
        return $this->getIterableKeyType();
    }
    public function getIterableValueType() : Type
    {
        return new MixedType();
    }
    public function getFirstIterableValueType() : Type
    {
        return new MixedType();
    }
    public function getLastIterableValueType() : Type
    {
        return new MixedType();
    }
    public function isArray() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isConstantArray() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isOversizedArray() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isList() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isNull() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantValue() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isConstantScalarValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getConstantScalarTypes() : array
    {
        return [];
    }
    public function getConstantScalarValues() : array
    {
        return [];
    }
    public function isTrue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFalse() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isBoolean() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFloat() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isInteger() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNumericString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isLiteralString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isClassStringType() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getClassStringObjectType() : Type
    {
        return new ErrorType();
    }
    public function getObjectTypeOrClassStringObjectType() : Type
    {
        return new ErrorType();
    }
    public function isVoid() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isScalar() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function looseCompare(Type $type, PhpVersion $phpVersion) : BooleanType
    {
        return new BooleanType();
    }
    public function toNumber() : Type
    {
        return new ErrorType();
    }
    public function toInteger() : Type
    {
        return TypeCombinator::union(new ConstantIntegerType(0), new ConstantIntegerType(1));
    }
    public function toFloat() : Type
    {
        return TypeCombinator::union(new ConstantFloatType(0.0), new ConstantFloatType(1.0));
    }
    public function toString() : Type
    {
        return new ErrorType();
    }
    public function toArray() : Type
    {
        return $this;
    }
    public function toArrayKey() : Type
    {
        return new ErrorType();
    }
    public function traverse(callable $cb) : Type
    {
        return $this;
    }
    public function traverseSimultaneously(Type $right, callable $cb) : Type
    {
        return $this;
    }
    public static function __set_state(array $properties) : Type
    {
        return new self();
    }
    public static function setListTypeEnabled(bool $enabled) : void
    {
        self::$enabled = $enabled;
    }
    public static function isListTypeEnabled() : bool
    {
        return self::$enabled;
    }
    public static function intersectWith(Type $type) : Type
    {
        if (self::$enabled) {
            return TypeCombinator::intersect($type, new self());
        }
        return $type;
    }
    public function exponentiate(Type $exponent) : Type
    {
        return new ErrorType();
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode('list');
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Accessory;

use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\TrinaryLogic;
use PHPStan\Type\AcceptsResult;
use PHPStan\Type\BenevolentUnionType;
use PHPStan\Type\BooleanType;
use PHPStan\Type\CompoundType;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\FloatType;
use PHPStan\Type\GeneralizePrecision;
use PHPStan\Type\IntegerType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\MixedType;
use PHPStan\Type\ObjectWithoutClassType;
use PHPStan\Type\StringType;
use PHPStan\Type\Traits\MaybeCallableTypeTrait;
use PHPStan\Type\Traits\NonArrayTypeTrait;
use PHPStan\Type\Traits\NonGenericTypeTrait;
use PHPStan\Type\Traits\NonIterableTypeTrait;
use PHPStan\Type\Traits\NonObjectTypeTrait;
use PHPStan\Type\Traits\NonRemoveableTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
use PHPStan\Type\Type;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
class AccessoryLiteralStringType implements CompoundType, \PHPStan\Type\Accessory\AccessoryType
{
    use MaybeCallableTypeTrait;
    use NonArrayTypeTrait;
    use NonObjectTypeTrait;
    use NonIterableTypeTrait;
    use UndecidedComparisonCompoundTypeTrait;
    use NonGenericTypeTrait;
    use NonRemoveableTypeTrait;
    /** @api */
    public function __construct()
    {
    }
    public function getReferencedClasses() : array
    {
        return [];
    }
    public function getObjectClassNames() : array
    {
        return [];
    }
    public function getObjectClassReflections() : array
    {
        return [];
    }
    public function getConstantStrings() : array
    {
        return [];
    }
    public function accepts(Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(Type $type, bool $strictTypes) : AcceptsResult
    {
        if ($type instanceof MixedType) {
            return AcceptsResult::createNo();
        }
        if ($type instanceof CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        return new AcceptsResult($type->isLiteralString(), []);
    }
    public function isSuperTypeOf(Type $type) : TrinaryLogic
    {
        if ($type instanceof CompoundType) {
            return $type->isSubTypeOf($this);
        }
        if ($this->equals($type)) {
            return TrinaryLogic::createYes();
        }
        return $type->isLiteralString();
    }
    public function isSubTypeOf(Type $otherType) : TrinaryLogic
    {
        if ($otherType instanceof UnionType || $otherType instanceof IntersectionType) {
            return $otherType->isSuperTypeOf($this);
        }
        return $otherType->isLiteralString()->and($otherType instanceof self ? TrinaryLogic::createYes() : TrinaryLogic::createMaybe());
    }
    public function isAcceptedBy(Type $acceptingType, bool $strictTypes) : TrinaryLogic
    {
        return $this->isAcceptedWithReasonBy($acceptingType, $strictTypes)->result;
    }
    public function isAcceptedWithReasonBy(Type $acceptingType, bool $strictTypes) : AcceptsResult
    {
        return new AcceptsResult($this->isSubTypeOf($acceptingType), []);
    }
    public function equals(Type $type) : bool
    {
        return $type instanceof self;
    }
    public function describe(VerbosityLevel $level) : string
    {
        return 'literal-string';
    }
    public function isOffsetAccessible() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function hasOffsetValueType(Type $offsetType) : TrinaryLogic
    {
        return (new IntegerType())->isSuperTypeOf($offsetType)->and(TrinaryLogic::createMaybe());
    }
    public function getOffsetValueType(Type $offsetType) : Type
    {
        if ($this->hasOffsetValueType($offsetType)->no()) {
            return new ErrorType();
        }
        return new StringType();
    }
    public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $unionValues = \true) : Type
    {
        return $this;
    }
    public function unsetOffset(Type $offsetType) : Type
    {
        return new ErrorType();
    }
    public function toNumber() : Type
    {
        return new ErrorType();
    }
    public function toInteger() : Type
    {
        return new IntegerType();
    }
    public function toFloat() : Type
    {
        return new FloatType();
    }
    public function toString() : Type
    {
        return $this;
    }
    public function toBoolean() : BooleanType
    {
        return new BooleanType();
    }
    public function toArray() : Type
    {
        return new ConstantArrayType([new ConstantIntegerType(0)], [$this], [1], [], \true);
    }
    public function toArrayKey() : Type
    {
        return $this;
    }
    public function isNull() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantValue() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isConstantScalarValue() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getConstantScalarTypes() : array
    {
        return [];
    }
    public function getConstantScalarValues() : array
    {
        return [];
    }
    public function isTrue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFalse() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isBoolean() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFloat() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isInteger() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isString() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isNumericString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isLiteralString() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isClassStringType() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getClassStringObjectType() : Type
    {
        return new ObjectWithoutClassType();
    }
    public function getObjectTypeOrClassStringObjectType() : Type
    {
        return new ObjectWithoutClassType();
    }
    public function hasMethod(string $methodName) : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isVoid() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isScalar() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function looseCompare(Type $type, PhpVersion $phpVersion) : BooleanType
    {
        return new BooleanType();
    }
    public function traverse(callable $cb) : Type
    {
        return $this;
    }
    public function traverseSimultaneously(Type $right, callable $cb) : Type
    {
        return $this;
    }
    public function generalize(GeneralizePrecision $precision) : Type
    {
        return new StringType();
    }
    public static function __set_state(array $properties) : Type
    {
        return new self();
    }
    public function exponentiate(Type $exponent) : Type
    {
        return new BenevolentUnionType([new FloatType(), new IntegerType()]);
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode('literal-string');
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Accessory;

use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\TrinaryLogic;
use PHPStan\Type\AcceptsResult;
use PHPStan\Type\BenevolentUnionType;
use PHPStan\Type\BooleanType;
use PHPStan\Type\CompoundType;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\FloatType;
use PHPStan\Type\GeneralizePrecision;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\ObjectWithoutClassType;
use PHPStan\Type\StringType;
use PHPStan\Type\Traits\MaybeCallableTypeTrait;
use PHPStan\Type\Traits\NonArrayTypeTrait;
use PHPStan\Type\Traits\NonGenericTypeTrait;
use PHPStan\Type\Traits\NonIterableTypeTrait;
use PHPStan\Type\Traits\NonObjectTypeTrait;
use PHPStan\Type\Traits\NonRemoveableTypeTrait;
use PHPStan\Type\Traits\TruthyBooleanTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
use PHPStan\Type\Type;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
class AccessoryNonFalsyStringType implements CompoundType, \PHPStan\Type\Accessory\AccessoryType
{
    use MaybeCallableTypeTrait;
    use NonArrayTypeTrait;
    use NonObjectTypeTrait;
    use NonIterableTypeTrait;
    use TruthyBooleanTypeTrait;
    use UndecidedComparisonCompoundTypeTrait;
    use NonGenericTypeTrait;
    use NonRemoveableTypeTrait;
    /** @api */
    public function __construct()
    {
    }
    public function getReferencedClasses() : array
    {
        return [];
    }
    public function getObjectClassNames() : array
    {
        return [];
    }
    public function getObjectClassReflections() : array
    {
        return [];
    }
    public function getConstantStrings() : array
    {
        return [];
    }
    public function accepts(Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(Type $type, bool $strictTypes) : AcceptsResult
    {
        if ($type instanceof CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        return new AcceptsResult($type->isNonFalsyString(), []);
    }
    public function isSuperTypeOf(Type $type) : TrinaryLogic
    {
        if ($type instanceof CompoundType) {
            return $type->isSubTypeOf($this);
        }
        if ($this->equals($type)) {
            return TrinaryLogic::createYes();
        }
        return $type->isNonFalsyString();
    }
    public function isSubTypeOf(Type $otherType) : TrinaryLogic
    {
        if ($otherType instanceof UnionType || $otherType instanceof IntersectionType) {
            return $otherType->isSuperTypeOf($this);
        }
        if ($otherType instanceof \PHPStan\Type\Accessory\AccessoryNonEmptyStringType) {
            return TrinaryLogic::createYes();
        }
        return $otherType->isNonFalsyString()->and($otherType instanceof self ? TrinaryLogic::createYes() : TrinaryLogic::createMaybe());
    }
    public function isAcceptedBy(Type $acceptingType, bool $strictTypes) : TrinaryLogic
    {
        return $this->isAcceptedWithReasonBy($acceptingType, $strictTypes)->result;
    }
    public function isAcceptedWithReasonBy(Type $acceptingType, bool $strictTypes) : AcceptsResult
    {
        return new AcceptsResult($this->isSubTypeOf($acceptingType), []);
    }
    public function equals(Type $type) : bool
    {
        return $type instanceof self;
    }
    public function describe(VerbosityLevel $level) : string
    {
        return 'non-falsy-string';
    }
    public function isOffsetAccessible() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function hasOffsetValueType(Type $offsetType) : TrinaryLogic
    {
        return (new IntegerType())->isSuperTypeOf($offsetType)->and(TrinaryLogic::createMaybe());
    }
    public function getOffsetValueType(Type $offsetType) : Type
    {
        if ($this->hasOffsetValueType($offsetType)->no()) {
            return new ErrorType();
        }
        return new StringType();
    }
    public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $unionValues = \true) : Type
    {
        return $this;
    }
    public function unsetOffset(Type $offsetType) : Type
    {
        return new ErrorType();
    }
    public function toNumber() : Type
    {
        return new ErrorType();
    }
    public function toInteger() : Type
    {
        return new UnionType([IntegerRangeType::fromInterval(null, -1), IntegerRangeType::fromInterval(1, null)]);
    }
    public function toFloat() : Type
    {
        return new FloatType();
    }
    public function toString() : Type
    {
        return $this;
    }
    public function toArray() : Type
    {
        return new ConstantArrayType([new ConstantIntegerType(0)], [$this], [1], [], \true);
    }
    public function toArrayKey() : Type
    {
        return $this;
    }
    public function isNull() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantValue() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isConstantScalarValue() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getConstantScalarTypes() : array
    {
        return [];
    }
    public function getConstantScalarValues() : array
    {
        return [];
    }
    public function isTrue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFalse() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isBoolean() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFloat() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isInteger() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isString() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isNumericString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isLiteralString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isClassStringType() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getClassStringObjectType() : Type
    {
        return new ObjectWithoutClassType();
    }
    public function getObjectTypeOrClassStringObjectType() : Type
    {
        return new ObjectWithoutClassType();
    }
    public function isVoid() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isScalar() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function looseCompare(Type $type, PhpVersion $phpVersion) : BooleanType
    {
        return new BooleanType();
    }
    public function traverse(callable $cb) : Type
    {
        return $this;
    }
    public function traverseSimultaneously(Type $right, callable $cb) : Type
    {
        return $this;
    }
    public function generalize(GeneralizePrecision $precision) : Type
    {
        return new StringType();
    }
    public static function __set_state(array $properties) : Type
    {
        return new self();
    }
    public function exponentiate(Type $exponent) : Type
    {
        return new BenevolentUnionType([new FloatType(), new IntegerType()]);
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode('non-falsy-string');
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Accessory;

use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\Reflection\ClassMemberAccessAnswerer;
use PHPStan\Reflection\Dummy\DummyMethodReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\TrivialParametersAcceptor;
use PHPStan\Reflection\Type\CallbackUnresolvedMethodPrototypeReflection;
use PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection;
use PHPStan\TrinaryLogic;
use PHPStan\Type\AcceptsResult;
use PHPStan\Type\CompoundType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\StringType;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use PHPStan\Type\Traits\NonGenericTypeTrait;
use PHPStan\Type\Traits\NonRemoveableTypeTrait;
use PHPStan\Type\Traits\ObjectTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
use PHPStan\Type\Type;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
use function strtolower;
class HasMethodType implements \PHPStan\Type\Accessory\AccessoryType, CompoundType
{
    use ObjectTypeTrait;
    use NonGenericTypeTrait;
    use UndecidedComparisonCompoundTypeTrait;
    use NonRemoveableTypeTrait;
    use NonGeneralizableTypeTrait;
    /**
     * @var string
     */
    private $methodName;
    /** @api */
    public function __construct(string $methodName)
    {
        $this->methodName = $methodName;
    }
    public function getReferencedClasses() : array
    {
        return [];
    }
    public function getObjectClassNames() : array
    {
        return [];
    }
    public function getObjectClassReflections() : array
    {
        return [];
    }
    private function getCanonicalMethodName() : string
    {
        return strtolower($this->methodName);
    }
    public function accepts(Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(Type $type, bool $strictTypes) : AcceptsResult
    {
        if ($type instanceof CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        return AcceptsResult::createFromBoolean($this->equals($type));
    }
    public function isSuperTypeOf(Type $type) : TrinaryLogic
    {
        return $type->hasMethod($this->methodName);
    }
    public function isSubTypeOf(Type $otherType) : TrinaryLogic
    {
        if ($otherType instanceof UnionType || $otherType instanceof IntersectionType) {
            return $otherType->isSuperTypeOf($this);
        }
        if ($this->isCallable()->yes() && $otherType->isCallable()->yes()) {
            return TrinaryLogic::createYes();
        }
        if ($otherType instanceof self) {
            $limit = TrinaryLogic::createYes();
        } else {
            $limit = TrinaryLogic::createMaybe();
        }
        return $limit->and($otherType->hasMethod($this->methodName));
    }
    public function isAcceptedBy(Type $acceptingType, bool $strictTypes) : TrinaryLogic
    {
        return $this->isAcceptedWithReasonBy($acceptingType, $strictTypes)->result;
    }
    public function isAcceptedWithReasonBy(Type $acceptingType, bool $strictTypes) : AcceptsResult
    {
        return new AcceptsResult($this->isSubTypeOf($acceptingType), []);
    }
    public function equals(Type $type) : bool
    {
        return $type instanceof self && $this->getCanonicalMethodName() === $type->getCanonicalMethodName();
    }
    public function describe(VerbosityLevel $level) : string
    {
        return sprintf('hasMethod(%s)', $this->methodName);
    }
    public function hasMethod(string $methodName) : TrinaryLogic
    {
        if ($this->getCanonicalMethodName() === strtolower($methodName)) {
            return TrinaryLogic::createYes();
        }
        return TrinaryLogic::createMaybe();
    }
    public function getMethod(string $methodName, ClassMemberAccessAnswerer $scope) : ExtendedMethodReflection
    {
        return $this->getUnresolvedMethodPrototype($methodName, $scope)->getTransformedMethod();
    }
    public function getUnresolvedMethodPrototype(string $methodName, ClassMemberAccessAnswerer $scope) : UnresolvedMethodPrototypeReflection
    {
        $method = new DummyMethodReflection($this->methodName);
        return new CallbackUnresolvedMethodPrototypeReflection($method, $method->getDeclaringClass(), \false, static function (Type $type) : Type {
            return $type;
        });
    }
    public function isCallable() : TrinaryLogic
    {
        if ($this->getCanonicalMethodName() === '__invoke') {
            return TrinaryLogic::createYes();
        }
        return TrinaryLogic::createMaybe();
    }
    public function toString() : Type
    {
        if ($this->getCanonicalMethodName() === '__tostring') {
            return new StringType();
        }
        return new ErrorType();
    }
    public function getCallableParametersAcceptors(ClassMemberAccessAnswerer $scope) : array
    {
        return [new TrivialParametersAcceptor()];
    }
    public function getEnumCases() : array
    {
        return [];
    }
    public function traverse(callable $cb) : Type
    {
        return $this;
    }
    public function traverseSimultaneously(Type $right, callable $cb) : Type
    {
        return $this;
    }
    public function exponentiate(Type $exponent) : Type
    {
        return new ErrorType();
    }
    public static function __set_state(array $properties) : Type
    {
        return new self($properties['methodName']);
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode('');
        // no PHPDoc representation
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Accessory;

use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\TrinaryLogic;
use PHPStan\Type\AcceptsResult;
use PHPStan\Type\BooleanType;
use PHPStan\Type\CompoundType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\MixedType;
use PHPStan\Type\ObjectWithoutClassType;
use PHPStan\Type\Traits\MaybeArrayTypeTrait;
use PHPStan\Type\Traits\MaybeCallableTypeTrait;
use PHPStan\Type\Traits\MaybeIterableTypeTrait;
use PHPStan\Type\Traits\MaybeObjectTypeTrait;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use PHPStan\Type\Traits\NonGenericTypeTrait;
use PHPStan\Type\Traits\NonRemoveableTypeTrait;
use PHPStan\Type\Traits\TruthyBooleanTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
use PHPStan\Type\Type;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
class HasOffsetType implements CompoundType, \PHPStan\Type\Accessory\AccessoryType
{
    use MaybeArrayTypeTrait;
    use MaybeCallableTypeTrait;
    use MaybeIterableTypeTrait;
    use MaybeObjectTypeTrait;
    use TruthyBooleanTypeTrait;
    use NonGenericTypeTrait;
    use UndecidedComparisonCompoundTypeTrait;
    use NonRemoveableTypeTrait;
    use NonGeneralizableTypeTrait;
    /**
     * @var ConstantStringType|ConstantIntegerType
     */
    private $offsetType;
    /**
     * @api
     * @param ConstantStringType|ConstantIntegerType $offsetType
     */
    public function __construct(Type $offsetType)
    {
        $this->offsetType = $offsetType;
    }
    /**
     * @return ConstantStringType|ConstantIntegerType
     */
    public function getOffsetType() : Type
    {
        return $this->offsetType;
    }
    public function getReferencedClasses() : array
    {
        return [];
    }
    public function getObjectClassNames() : array
    {
        return [];
    }
    public function getObjectClassReflections() : array
    {
        return [];
    }
    public function getConstantStrings() : array
    {
        return [];
    }
    public function accepts(Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(Type $type, bool $strictTypes) : AcceptsResult
    {
        if ($type instanceof CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        return new AcceptsResult($type->isOffsetAccessible()->and($type->hasOffsetValueType($this->offsetType)), []);
    }
    public function isSuperTypeOf(Type $type) : TrinaryLogic
    {
        if ($this->equals($type)) {
            return TrinaryLogic::createYes();
        }
        return $type->isOffsetAccessible()->and($type->hasOffsetValueType($this->offsetType));
    }
    public function isSubTypeOf(Type $otherType) : TrinaryLogic
    {
        if ($otherType instanceof UnionType || $otherType instanceof IntersectionType) {
            return $otherType->isSuperTypeOf($this);
        }
        return $otherType->isOffsetAccessible()->and($otherType->hasOffsetValueType($this->offsetType))->and($otherType instanceof self ? TrinaryLogic::createYes() : TrinaryLogic::createMaybe());
    }
    public function isAcceptedBy(Type $acceptingType, bool $strictTypes) : TrinaryLogic
    {
        return $this->isAcceptedWithReasonBy($acceptingType, $strictTypes)->result;
    }
    public function isAcceptedWithReasonBy(Type $acceptingType, bool $strictTypes) : AcceptsResult
    {
        return new AcceptsResult($this->isSubTypeOf($acceptingType), []);
    }
    public function equals(Type $type) : bool
    {
        return $type instanceof self && $this->offsetType->equals($type->offsetType);
    }
    public function describe(VerbosityLevel $level) : string
    {
        return sprintf('hasOffset(%s)', $this->offsetType->describe($level));
    }
    public function isOffsetAccessible() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function hasOffsetValueType(Type $offsetType) : TrinaryLogic
    {
        if ($offsetType->isConstantScalarValue()->yes() && $offsetType->equals($this->offsetType)) {
            return TrinaryLogic::createYes();
        }
        return TrinaryLogic::createMaybe();
    }
    public function getOffsetValueType(Type $offsetType) : Type
    {
        return new MixedType();
    }
    public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $unionValues = \true) : Type
    {
        return $this;
    }
    public function unsetOffset(Type $offsetType) : Type
    {
        if ($this->offsetType->isSuperTypeOf($offsetType)->yes()) {
            return new ErrorType();
        }
        return $this;
    }
    public function fillKeysArray(Type $valueType) : Type
    {
        return new \PHPStan\Type\Accessory\NonEmptyArrayType();
    }
    public function intersectKeyArray(Type $otherArraysType) : Type
    {
        if ($otherArraysType->hasOffsetValueType($this->offsetType)->yes()) {
            return $this;
        }
        return new MixedType();
    }
    public function shuffleArray() : Type
    {
        return new \PHPStan\Type\Accessory\NonEmptyArrayType();
    }
    public function isIterableAtLeastOnce() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isList() : TrinaryLogic
    {
        if ($this->offsetType->isString()->yes()) {
            return TrinaryLogic::createNo();
        }
        return TrinaryLogic::createMaybe();
    }
    public function isNull() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantScalarValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getConstantScalarTypes() : array
    {
        return [];
    }
    public function getConstantScalarValues() : array
    {
        return [];
    }
    public function isTrue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFalse() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isBoolean() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFloat() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isInteger() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isNumericString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isLiteralString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isClassStringType() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getClassStringObjectType() : Type
    {
        return new ObjectWithoutClassType();
    }
    public function getObjectTypeOrClassStringObjectType() : Type
    {
        return new ObjectWithoutClassType();
    }
    public function isVoid() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isScalar() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function looseCompare(Type $type, PhpVersion $phpVersion) : BooleanType
    {
        return new BooleanType();
    }
    public function getKeysArray() : Type
    {
        return new \PHPStan\Type\Accessory\NonEmptyArrayType();
    }
    public function getValuesArray() : Type
    {
        return new \PHPStan\Type\Accessory\NonEmptyArrayType();
    }
    public function toNumber() : Type
    {
        return new ErrorType();
    }
    public function toInteger() : Type
    {
        return new ErrorType();
    }
    public function toFloat() : Type
    {
        return new ErrorType();
    }
    public function toString() : Type
    {
        return new ErrorType();
    }
    public function toArray() : Type
    {
        return new MixedType();
    }
    public function toArrayKey() : Type
    {
        return new ErrorType();
    }
    public function getEnumCases() : array
    {
        return [];
    }
    public function traverse(callable $cb) : Type
    {
        return $this;
    }
    public function traverseSimultaneously(Type $right, callable $cb) : Type
    {
        return $this;
    }
    public function exponentiate(Type $exponent) : Type
    {
        return new ErrorType();
    }
    public static function __set_state(array $properties) : Type
    {
        return new self($properties['offsetType']);
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode('');
        // no PHPDoc representation
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Accessory;

use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\TrinaryLogic;
use PHPStan\Type\AcceptsResult;
use PHPStan\Type\BooleanType;
use PHPStan\Type\CompoundType;
use PHPStan\Type\Constant\ConstantFloatType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\MixedType;
use PHPStan\Type\Traits\MaybeCallableTypeTrait;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use PHPStan\Type\Traits\NonGenericTypeTrait;
use PHPStan\Type\Traits\NonObjectTypeTrait;
use PHPStan\Type\Traits\NonRemoveableTypeTrait;
use PHPStan\Type\Traits\TruthyBooleanTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
use PHPStan\Type\Type;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
class NonEmptyArrayType implements CompoundType, \PHPStan\Type\Accessory\AccessoryType
{
    use MaybeCallableTypeTrait;
    use NonObjectTypeTrait;
    use TruthyBooleanTypeTrait;
    use NonGenericTypeTrait;
    use UndecidedComparisonCompoundTypeTrait;
    use NonRemoveableTypeTrait;
    use NonGeneralizableTypeTrait;
    /** @api */
    public function __construct()
    {
    }
    public function getReferencedClasses() : array
    {
        return [];
    }
    public function getObjectClassNames() : array
    {
        return [];
    }
    public function getObjectClassReflections() : array
    {
        return [];
    }
    public function getArrays() : array
    {
        return [];
    }
    public function getConstantArrays() : array
    {
        return [];
    }
    public function getConstantStrings() : array
    {
        return [];
    }
    public function accepts(Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(Type $type, bool $strictTypes) : AcceptsResult
    {
        if ($type instanceof CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        $isArray = $type->isArray();
        $isIterableAtLeastOnce = $type->isIterableAtLeastOnce();
        $reasons = [];
        if ($isArray->yes() && !$isIterableAtLeastOnce->yes()) {
            $verbosity = VerbosityLevel::getRecommendedLevelByType($this, $type);
            $reasons[] = sprintf('%s %s empty.', $type->describe($verbosity), $isIterableAtLeastOnce->no() ? 'is' : 'might be');
        }
        return new AcceptsResult($isArray->and($isIterableAtLeastOnce), $reasons);
    }
    public function isSuperTypeOf(Type $type) : TrinaryLogic
    {
        if ($this->equals($type)) {
            return TrinaryLogic::createYes();
        }
        if ($type instanceof CompoundType) {
            return $type->isSubTypeOf($this);
        }
        return $type->isArray()->and($type->isIterableAtLeastOnce());
    }
    public function isSubTypeOf(Type $otherType) : TrinaryLogic
    {
        if ($otherType instanceof UnionType || $otherType instanceof IntersectionType) {
            return $otherType->isSuperTypeOf($this);
        }
        return $otherType->isArray()->and($otherType->isIterableAtLeastOnce())->and($otherType instanceof self ? TrinaryLogic::createYes() : TrinaryLogic::createMaybe());
    }
    public function isAcceptedBy(Type $acceptingType, bool $strictTypes) : TrinaryLogic
    {
        return $this->isAcceptedWithReasonBy($acceptingType, $strictTypes)->result;
    }
    public function isAcceptedWithReasonBy(Type $acceptingType, bool $strictTypes) : AcceptsResult
    {
        return new AcceptsResult($this->isSubTypeOf($acceptingType), []);
    }
    public function equals(Type $type) : bool
    {
        return $type instanceof self;
    }
    public function describe(VerbosityLevel $level) : string
    {
        return 'non-empty-array';
    }
    public function isOffsetAccessible() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function hasOffsetValueType(Type $offsetType) : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getOffsetValueType(Type $offsetType) : Type
    {
        return new MixedType();
    }
    public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $unionValues = \true) : Type
    {
        return $this;
    }
    public function unsetOffset(Type $offsetType) : Type
    {
        return new ErrorType();
    }
    public function getKeysArray() : Type
    {
        return $this;
    }
    public function getValuesArray() : Type
    {
        return $this;
    }
    public function fillKeysArray(Type $valueType) : Type
    {
        return $this;
    }
    public function flipArray() : Type
    {
        return $this;
    }
    public function intersectKeyArray(Type $otherArraysType) : Type
    {
        return new MixedType();
    }
    public function popArray() : Type
    {
        return new MixedType();
    }
    public function searchArray(Type $needleType) : Type
    {
        return new MixedType();
    }
    public function shiftArray() : Type
    {
        return new MixedType();
    }
    public function shuffleArray() : Type
    {
        return $this;
    }
    public function isIterable() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isIterableAtLeastOnce() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function getArraySize() : Type
    {
        return IntegerRangeType::fromInterval(1, null);
    }
    public function getIterableKeyType() : Type
    {
        return new MixedType();
    }
    public function getFirstIterableKeyType() : Type
    {
        return new MixedType();
    }
    public function getLastIterableKeyType() : Type
    {
        return new MixedType();
    }
    public function getIterableValueType() : Type
    {
        return new MixedType();
    }
    public function getFirstIterableValueType() : Type
    {
        return new MixedType();
    }
    public function getLastIterableValueType() : Type
    {
        return new MixedType();
    }
    public function isArray() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isConstantArray() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isOversizedArray() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isList() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isNull() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantValue() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isConstantScalarValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getConstantScalarTypes() : array
    {
        return [];
    }
    public function getConstantScalarValues() : array
    {
        return [];
    }
    public function isTrue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFalse() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isBoolean() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFloat() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isInteger() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNumericString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isLiteralString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isClassStringType() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getClassStringObjectType() : Type
    {
        return new ErrorType();
    }
    public function getObjectTypeOrClassStringObjectType() : Type
    {
        return new ErrorType();
    }
    public function isVoid() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isScalar() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function looseCompare(Type $type, PhpVersion $phpVersion) : BooleanType
    {
        return new BooleanType();
    }
    public function toNumber() : Type
    {
        return new ErrorType();
    }
    public function toInteger() : Type
    {
        return new ConstantIntegerType(1);
    }
    public function toFloat() : Type
    {
        return new ConstantFloatType(1.0);
    }
    public function toString() : Type
    {
        return new ErrorType();
    }
    public function toArray() : Type
    {
        return new MixedType();
    }
    public function toArrayKey() : Type
    {
        return new ErrorType();
    }
    public function traverse(callable $cb) : Type
    {
        return $this;
    }
    public function traverseSimultaneously(Type $right, callable $cb) : Type
    {
        return $this;
    }
    public function exponentiate(Type $exponent) : Type
    {
        return new ErrorType();
    }
    public static function __set_state(array $properties) : Type
    {
        return new self();
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode('non-empty-array');
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Accessory;

use PHPStan\Type\Type;
interface AccessoryType extends Type
{
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Accessory;

use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\TrinaryLogic;
use PHPStan\Type\AcceptsResult;
use PHPStan\Type\BooleanType;
use PHPStan\Type\CompoundType;
use PHPStan\Type\Constant\ConstantFloatType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\MixedType;
use PHPStan\Type\Traits\MaybeCallableTypeTrait;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use PHPStan\Type\Traits\NonGenericTypeTrait;
use PHPStan\Type\Traits\NonObjectTypeTrait;
use PHPStan\Type\Traits\NonRemoveableTypeTrait;
use PHPStan\Type\Traits\TruthyBooleanTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
use PHPStan\Type\Type;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
class OversizedArrayType implements CompoundType, \PHPStan\Type\Accessory\AccessoryType
{
    use MaybeCallableTypeTrait;
    use NonObjectTypeTrait;
    use TruthyBooleanTypeTrait;
    use NonGenericTypeTrait;
    use UndecidedComparisonCompoundTypeTrait;
    use NonRemoveableTypeTrait;
    use NonGeneralizableTypeTrait;
    public function __construct()
    {
    }
    public function getReferencedClasses() : array
    {
        return [];
    }
    public function getObjectClassNames() : array
    {
        return [];
    }
    public function getObjectClassReflections() : array
    {
        return [];
    }
    public function getArrays() : array
    {
        return [];
    }
    public function getConstantArrays() : array
    {
        return [];
    }
    public function getConstantStrings() : array
    {
        return [];
    }
    public function accepts(Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(Type $type, bool $strictTypes) : AcceptsResult
    {
        if ($type instanceof CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        return new AcceptsResult($type->isArray()->and($type->isIterableAtLeastOnce()), []);
    }
    public function isSuperTypeOf(Type $type) : TrinaryLogic
    {
        if ($this->equals($type)) {
            return TrinaryLogic::createYes();
        }
        if ($type instanceof CompoundType) {
            return $type->isSubTypeOf($this);
        }
        return $type->isArray()->and($type->isOversizedArray());
    }
    public function isSubTypeOf(Type $otherType) : TrinaryLogic
    {
        if ($otherType instanceof UnionType || $otherType instanceof IntersectionType) {
            return $otherType->isSuperTypeOf($this);
        }
        return $otherType->isArray()->and($otherType->isOversizedArray())->and($otherType instanceof self ? TrinaryLogic::createYes() : TrinaryLogic::createMaybe());
    }
    public function isAcceptedBy(Type $acceptingType, bool $strictTypes) : TrinaryLogic
    {
        return $this->isAcceptedWithReasonBy($acceptingType, $strictTypes)->result;
    }
    public function isAcceptedWithReasonBy(Type $acceptingType, bool $strictTypes) : AcceptsResult
    {
        return new AcceptsResult($this->isSubTypeOf($acceptingType), []);
    }
    public function equals(Type $type) : bool
    {
        return $type instanceof self;
    }
    public function describe(VerbosityLevel $level) : string
    {
        return 'oversized-array';
    }
    public function isOffsetAccessible() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function hasOffsetValueType(Type $offsetType) : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getOffsetValueType(Type $offsetType) : Type
    {
        return new MixedType();
    }
    public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $unionValues = \true) : Type
    {
        return $this;
    }
    public function unsetOffset(Type $offsetType) : Type
    {
        return new ErrorType();
    }
    public function getKeysArray() : Type
    {
        return $this;
    }
    public function getValuesArray() : Type
    {
        return $this;
    }
    public function fillKeysArray(Type $valueType) : Type
    {
        return $this;
    }
    public function flipArray() : Type
    {
        return $this;
    }
    public function intersectKeyArray(Type $otherArraysType) : Type
    {
        return $this;
    }
    public function popArray() : Type
    {
        return $this;
    }
    public function searchArray(Type $needleType) : Type
    {
        return new MixedType();
    }
    public function shiftArray() : Type
    {
        return $this;
    }
    public function shuffleArray() : Type
    {
        return $this;
    }
    public function isIterable() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isIterableAtLeastOnce() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function getArraySize() : Type
    {
        return IntegerRangeType::fromInterval(1, null);
    }
    public function getIterableKeyType() : Type
    {
        return new MixedType();
    }
    public function getFirstIterableKeyType() : Type
    {
        return new MixedType();
    }
    public function getLastIterableKeyType() : Type
    {
        return new MixedType();
    }
    public function getIterableValueType() : Type
    {
        return new MixedType();
    }
    public function getFirstIterableValueType() : Type
    {
        return new MixedType();
    }
    public function getLastIterableValueType() : Type
    {
        return new MixedType();
    }
    public function isArray() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isConstantArray() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isOversizedArray() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isList() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isNull() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantValue() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isConstantScalarValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getConstantScalarTypes() : array
    {
        return [];
    }
    public function getConstantScalarValues() : array
    {
        return [];
    }
    public function isTrue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFalse() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isBoolean() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFloat() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isInteger() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNumericString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isLiteralString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isClassStringType() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getClassStringObjectType() : Type
    {
        return new ErrorType();
    }
    public function getObjectTypeOrClassStringObjectType() : Type
    {
        return new ErrorType();
    }
    public function isVoid() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isScalar() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function looseCompare(Type $type, PhpVersion $phpVersion) : BooleanType
    {
        return new BooleanType();
    }
    public function toNumber() : Type
    {
        return new ErrorType();
    }
    public function toInteger() : Type
    {
        return new ConstantIntegerType(1);
    }
    public function toFloat() : Type
    {
        return new ConstantFloatType(1.0);
    }
    public function toString() : Type
    {
        return new ErrorType();
    }
    public function toArray() : Type
    {
        return new MixedType();
    }
    public function toArrayKey() : Type
    {
        return new ErrorType();
    }
    public function traverse(callable $cb) : Type
    {
        return $this;
    }
    public function traverseSimultaneously(Type $right, callable $cb) : Type
    {
        return $this;
    }
    public function exponentiate(Type $exponent) : Type
    {
        return new ErrorType();
    }
    public static function __set_state(array $properties) : Type
    {
        return new self();
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode('');
        // no PHPDoc representation
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Accessory;

use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\Reflection\ClassMemberAccessAnswerer;
use PHPStan\Reflection\TrivialParametersAcceptor;
use PHPStan\TrinaryLogic;
use PHPStan\Type\AcceptsResult;
use PHPStan\Type\CompoundType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use PHPStan\Type\Traits\NonGenericTypeTrait;
use PHPStan\Type\Traits\NonRemoveableTypeTrait;
use PHPStan\Type\Traits\ObjectTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
use PHPStan\Type\Type;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
class HasPropertyType implements \PHPStan\Type\Accessory\AccessoryType, CompoundType
{
    use ObjectTypeTrait;
    use NonGenericTypeTrait;
    use UndecidedComparisonCompoundTypeTrait;
    use NonRemoveableTypeTrait;
    use NonGeneralizableTypeTrait;
    /**
     * @var string
     */
    private $propertyName;
    /** @api */
    public function __construct(string $propertyName)
    {
        $this->propertyName = $propertyName;
    }
    /**
     * @return string[]
     */
    public function getReferencedClasses() : array
    {
        return [];
    }
    public function getObjectClassNames() : array
    {
        return [];
    }
    public function getObjectClassReflections() : array
    {
        return [];
    }
    public function getConstantStrings() : array
    {
        return [];
    }
    public function getPropertyName() : string
    {
        return $this->propertyName;
    }
    public function accepts(Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(Type $type, bool $strictTypes) : AcceptsResult
    {
        if ($type instanceof CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        return AcceptsResult::createFromBoolean($this->equals($type));
    }
    public function isSuperTypeOf(Type $type) : TrinaryLogic
    {
        return $type->hasProperty($this->propertyName);
    }
    public function isSubTypeOf(Type $otherType) : TrinaryLogic
    {
        if ($otherType instanceof UnionType || $otherType instanceof IntersectionType) {
            return $otherType->isSuperTypeOf($this);
        }
        if ($otherType instanceof self) {
            $limit = TrinaryLogic::createYes();
        } else {
            $limit = TrinaryLogic::createMaybe();
        }
        return $limit->and($otherType->hasProperty($this->propertyName));
    }
    public function isAcceptedBy(Type $acceptingType, bool $strictTypes) : TrinaryLogic
    {
        return $this->isAcceptedWithReasonBy($acceptingType, $strictTypes)->result;
    }
    public function isAcceptedWithReasonBy(Type $acceptingType, bool $strictTypes) : AcceptsResult
    {
        return new AcceptsResult($this->isSubTypeOf($acceptingType), []);
    }
    public function equals(Type $type) : bool
    {
        return $type instanceof self && $this->propertyName === $type->propertyName;
    }
    public function describe(VerbosityLevel $level) : string
    {
        return sprintf('hasProperty(%s)', $this->propertyName);
    }
    public function hasProperty(string $propertyName) : TrinaryLogic
    {
        if ($this->propertyName === $propertyName) {
            return TrinaryLogic::createYes();
        }
        return TrinaryLogic::createMaybe();
    }
    public function getCallableParametersAcceptors(ClassMemberAccessAnswerer $scope) : array
    {
        return [new TrivialParametersAcceptor()];
    }
    public function getEnumCases() : array
    {
        return [];
    }
    public function traverse(callable $cb) : Type
    {
        return $this;
    }
    public function traverseSimultaneously(Type $right, callable $cb) : Type
    {
        return $this;
    }
    public function exponentiate(Type $exponent) : Type
    {
        return new ErrorType();
    }
    public static function __set_state(array $properties) : Type
    {
        return new self($properties['propertyName']);
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode('');
        // no PHPDoc representation
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Accessory;

use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\AcceptsResult;
use PHPStan\Type\BooleanType;
use PHPStan\Type\CompoundType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\ConstantScalarType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\MixedType;
use PHPStan\Type\ObjectWithoutClassType;
use PHPStan\Type\Traits\MaybeArrayTypeTrait;
use PHPStan\Type\Traits\MaybeCallableTypeTrait;
use PHPStan\Type\Traits\MaybeIterableTypeTrait;
use PHPStan\Type\Traits\MaybeObjectTypeTrait;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use PHPStan\Type\Traits\NonGenericTypeTrait;
use PHPStan\Type\Traits\NonRemoveableTypeTrait;
use PHPStan\Type\Traits\TruthyBooleanTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
use PHPStan\Type\Type;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
class HasOffsetValueType implements CompoundType, \PHPStan\Type\Accessory\AccessoryType
{
    use MaybeArrayTypeTrait;
    use MaybeCallableTypeTrait;
    use MaybeIterableTypeTrait;
    use MaybeObjectTypeTrait;
    use TruthyBooleanTypeTrait;
    use NonGenericTypeTrait;
    use UndecidedComparisonCompoundTypeTrait;
    use NonRemoveableTypeTrait;
    use NonGeneralizableTypeTrait;
    /**
     * @var \PHPStan\Type\Constant\ConstantStringType|\PHPStan\Type\Constant\ConstantIntegerType
     */
    private $offsetType;
    /**
     * @var \PHPStan\Type\Type
     */
    private $valueType;
    /**
     * @param \PHPStan\Type\Constant\ConstantStringType|\PHPStan\Type\Constant\ConstantIntegerType $offsetType
     */
    public function __construct($offsetType, Type $valueType)
    {
        $this->offsetType = $offsetType;
        $this->valueType = $valueType;
    }
    /**
     * @return \PHPStan\Type\Constant\ConstantStringType|\PHPStan\Type\Constant\ConstantIntegerType
     */
    public function getOffsetType()
    {
        return $this->offsetType;
    }
    public function getValueType() : Type
    {
        return $this->valueType;
    }
    public function getReferencedClasses() : array
    {
        return [];
    }
    public function getObjectClassNames() : array
    {
        return [];
    }
    public function getObjectClassReflections() : array
    {
        return [];
    }
    public function getConstantStrings() : array
    {
        return [];
    }
    public function accepts(Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(Type $type, bool $strictTypes) : AcceptsResult
    {
        if ($type instanceof CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        return new AcceptsResult($type->isOffsetAccessible()->and($type->hasOffsetValueType($this->offsetType))->and($this->valueType->accepts($type->getOffsetValueType($this->offsetType), $strictTypes)), []);
    }
    public function isSuperTypeOf(Type $type) : TrinaryLogic
    {
        if ($this->equals($type)) {
            return TrinaryLogic::createYes();
        }
        return $type->isOffsetAccessible()->and($type->hasOffsetValueType($this->offsetType))->and($this->valueType->isSuperTypeOf($type->getOffsetValueType($this->offsetType)));
    }
    public function isSubTypeOf(Type $otherType) : TrinaryLogic
    {
        if ($otherType instanceof UnionType || $otherType instanceof IntersectionType) {
            return $otherType->isSuperTypeOf($this);
        }
        return $otherType->isOffsetAccessible()->and($otherType->hasOffsetValueType($this->offsetType))->and($otherType->getOffsetValueType($this->offsetType)->isSuperTypeOf($this->valueType))->and($otherType instanceof self ? TrinaryLogic::createYes() : TrinaryLogic::createMaybe());
    }
    public function isAcceptedBy(Type $acceptingType, bool $strictTypes) : TrinaryLogic
    {
        return $this->isAcceptedWithReasonBy($acceptingType, $strictTypes)->result;
    }
    public function isAcceptedWithReasonBy(Type $acceptingType, bool $strictTypes) : AcceptsResult
    {
        return new AcceptsResult($this->isSubTypeOf($acceptingType), []);
    }
    public function equals(Type $type) : bool
    {
        return $type instanceof self && $this->offsetType->equals($type->offsetType) && $this->valueType->equals($type->valueType);
    }
    public function describe(VerbosityLevel $level) : string
    {
        return sprintf('hasOffsetValue(%s, %s)', $this->offsetType->describe($level), $this->valueType->describe($level));
    }
    public function isOffsetAccessible() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function hasOffsetValueType(Type $offsetType) : TrinaryLogic
    {
        if ($offsetType->isConstantScalarValue()->yes() && $offsetType->equals($this->offsetType)) {
            return TrinaryLogic::createYes();
        }
        return TrinaryLogic::createMaybe();
    }
    public function getOffsetValueType(Type $offsetType) : Type
    {
        if ($offsetType->isConstantScalarValue()->yes() && $offsetType->equals($this->offsetType)) {
            return $this->valueType;
        }
        return new MixedType();
    }
    public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $unionValues = \true) : Type
    {
        if ($offsetType === null) {
            return $this;
        }
        if (!$offsetType->equals($this->offsetType)) {
            return $this;
        }
        if (!$offsetType instanceof ConstantIntegerType && !$offsetType instanceof ConstantStringType) {
            throw new ShouldNotHappenException();
        }
        return new self($offsetType, $valueType);
    }
    public function unsetOffset(Type $offsetType) : Type
    {
        if ($this->offsetType->isSuperTypeOf($offsetType)->yes()) {
            return new ErrorType();
        }
        return $this;
    }
    public function getKeysArray() : Type
    {
        return new \PHPStan\Type\Accessory\NonEmptyArrayType();
    }
    public function getValuesArray() : Type
    {
        return new \PHPStan\Type\Accessory\NonEmptyArrayType();
    }
    public function fillKeysArray(Type $valueType) : Type
    {
        return new \PHPStan\Type\Accessory\NonEmptyArrayType();
    }
    public function flipArray() : Type
    {
        $valueType = $this->valueType->toArrayKey();
        if ($valueType instanceof ConstantIntegerType || $valueType instanceof ConstantStringType) {
            return new self($valueType, $this->offsetType);
        }
        return new MixedType();
    }
    public function intersectKeyArray(Type $otherArraysType) : Type
    {
        if ($otherArraysType->hasOffsetValueType($this->offsetType)->yes()) {
            return $this;
        }
        return new MixedType();
    }
    public function searchArray(Type $needleType) : Type
    {
        if ($needleType instanceof ConstantScalarType && $this->valueType instanceof ConstantScalarType && $needleType->getValue() === $this->valueType->getValue()) {
            return $this->offsetType;
        }
        return new MixedType();
    }
    public function shuffleArray() : Type
    {
        return new \PHPStan\Type\Accessory\NonEmptyArrayType();
    }
    public function isIterableAtLeastOnce() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isList() : TrinaryLogic
    {
        if ($this->offsetType->isString()->yes()) {
            return TrinaryLogic::createNo();
        }
        return TrinaryLogic::createMaybe();
    }
    public function isNull() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantScalarValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getConstantScalarTypes() : array
    {
        return [];
    }
    public function getConstantScalarValues() : array
    {
        return [];
    }
    public function isTrue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFalse() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isBoolean() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFloat() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isInteger() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isNumericString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isLiteralString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isClassStringType() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getClassStringObjectType() : Type
    {
        return new ObjectWithoutClassType();
    }
    public function getObjectTypeOrClassStringObjectType() : Type
    {
        return new ObjectWithoutClassType();
    }
    public function isVoid() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isScalar() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function looseCompare(Type $type, PhpVersion $phpVersion) : BooleanType
    {
        return new BooleanType();
    }
    public function toNumber() : Type
    {
        return new ErrorType();
    }
    public function toInteger() : Type
    {
        return new ErrorType();
    }
    public function toFloat() : Type
    {
        return new ErrorType();
    }
    public function toString() : Type
    {
        return new ErrorType();
    }
    public function toArray() : Type
    {
        return new MixedType();
    }
    public function toArrayKey() : Type
    {
        return new ErrorType();
    }
    public function getEnumCases() : array
    {
        return [];
    }
    public function traverse(callable $cb) : Type
    {
        $newValueType = $cb($this->valueType);
        if ($newValueType === $this->valueType) {
            return $this;
        }
        return new self($this->offsetType, $newValueType);
    }
    public function traverseSimultaneously(Type $right, callable $cb) : Type
    {
        $newValueType = $cb($this->valueType, $right->getOffsetValueType($this->offsetType));
        if ($newValueType === $this->valueType) {
            return $this;
        }
        return new self($this->offsetType, $newValueType);
    }
    public function exponentiate(Type $exponent) : Type
    {
        return new ErrorType();
    }
    public static function __set_state(array $properties) : Type
    {
        return new self($properties['offsetType'], $properties['valueType']);
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode('');
        // no PHPDoc representation
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Accessory;

use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\TrinaryLogic;
use PHPStan\Type\AcceptsResult;
use PHPStan\Type\BenevolentUnionType;
use PHPStan\Type\BooleanType;
use PHPStan\Type\CompoundType;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\FloatType;
use PHPStan\Type\GeneralizePrecision;
use PHPStan\Type\IntegerType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\ObjectWithoutClassType;
use PHPStan\Type\StringType;
use PHPStan\Type\Traits\MaybeCallableTypeTrait;
use PHPStan\Type\Traits\NonArrayTypeTrait;
use PHPStan\Type\Traits\NonGenericTypeTrait;
use PHPStan\Type\Traits\NonIterableTypeTrait;
use PHPStan\Type\Traits\NonObjectTypeTrait;
use PHPStan\Type\Traits\UndecidedBooleanTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
class AccessoryNonEmptyStringType implements CompoundType, \PHPStan\Type\Accessory\AccessoryType
{
    use MaybeCallableTypeTrait;
    use NonArrayTypeTrait;
    use NonObjectTypeTrait;
    use NonIterableTypeTrait;
    use UndecidedComparisonCompoundTypeTrait;
    use NonGenericTypeTrait;
    use UndecidedBooleanTypeTrait;
    /** @api */
    public function __construct()
    {
    }
    public function getReferencedClasses() : array
    {
        return [];
    }
    public function getObjectClassNames() : array
    {
        return [];
    }
    public function getObjectClassReflections() : array
    {
        return [];
    }
    public function getConstantStrings() : array
    {
        return [];
    }
    public function accepts(Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(Type $type, bool $strictTypes) : AcceptsResult
    {
        if ($type instanceof CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        return new AcceptsResult($type->isNonEmptyString(), []);
    }
    public function isSuperTypeOf(Type $type) : TrinaryLogic
    {
        if ($type instanceof CompoundType) {
            return $type->isSubTypeOf($this);
        }
        if ($this->equals($type)) {
            return TrinaryLogic::createYes();
        }
        if ($type->isNonFalsyString()->yes()) {
            return TrinaryLogic::createYes();
        }
        return $type->isNonEmptyString();
    }
    public function isSubTypeOf(Type $otherType) : TrinaryLogic
    {
        if ($otherType instanceof UnionType || $otherType instanceof IntersectionType) {
            return $otherType->isSuperTypeOf($this);
        }
        return $otherType->isNonEmptyString()->and($otherType instanceof self ? TrinaryLogic::createYes() : TrinaryLogic::createMaybe());
    }
    public function isAcceptedBy(Type $acceptingType, bool $strictTypes) : TrinaryLogic
    {
        return $this->isAcceptedWithReasonBy($acceptingType, $strictTypes)->result;
    }
    public function isAcceptedWithReasonBy(Type $acceptingType, bool $strictTypes) : AcceptsResult
    {
        return new AcceptsResult($this->isSubTypeOf($acceptingType), []);
    }
    public function equals(Type $type) : bool
    {
        return $type instanceof self;
    }
    public function describe(VerbosityLevel $level) : string
    {
        return 'non-empty-string';
    }
    public function isOffsetAccessible() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function hasOffsetValueType(Type $offsetType) : TrinaryLogic
    {
        return (new IntegerType())->isSuperTypeOf($offsetType)->and(TrinaryLogic::createMaybe());
    }
    public function getOffsetValueType(Type $offsetType) : Type
    {
        if ($this->hasOffsetValueType($offsetType)->no()) {
            return new ErrorType();
        }
        if ((new ConstantIntegerType(0))->isSuperTypeOf($offsetType)->yes()) {
            return new IntersectionType([new StringType(), new \PHPStan\Type\Accessory\AccessoryNonEmptyStringType()]);
        }
        return new StringType();
    }
    public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $unionValues = \true) : Type
    {
        return $this;
    }
    public function unsetOffset(Type $offsetType) : Type
    {
        return new ErrorType();
    }
    public function toNumber() : Type
    {
        return new ErrorType();
    }
    public function toInteger() : Type
    {
        return new IntegerType();
    }
    public function toFloat() : Type
    {
        return new FloatType();
    }
    public function toString() : Type
    {
        return $this;
    }
    public function toArray() : Type
    {
        return new ConstantArrayType([new ConstantIntegerType(0)], [$this], [1], [], \true);
    }
    public function toArrayKey() : Type
    {
        return $this;
    }
    public function isNull() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantValue() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isConstantScalarValue() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getConstantScalarTypes() : array
    {
        return [];
    }
    public function getConstantScalarValues() : array
    {
        return [];
    }
    public function isTrue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFalse() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isBoolean() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFloat() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isInteger() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isString() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isNumericString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isLiteralString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isClassStringType() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getClassStringObjectType() : Type
    {
        return new ObjectWithoutClassType();
    }
    public function getObjectTypeOrClassStringObjectType() : Type
    {
        return new ObjectWithoutClassType();
    }
    public function isVoid() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isScalar() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function looseCompare(Type $type, PhpVersion $phpVersion) : BooleanType
    {
        return new BooleanType();
    }
    public function traverse(callable $cb) : Type
    {
        return $this;
    }
    public function traverseSimultaneously(Type $right, callable $cb) : Type
    {
        return $this;
    }
    public function generalize(GeneralizePrecision $precision) : Type
    {
        return new StringType();
    }
    public static function __set_state(array $properties) : Type
    {
        return new self();
    }
    public function tryRemove(Type $typeToRemove) : ?Type
    {
        if ($typeToRemove instanceof ConstantStringType && $typeToRemove->getValue() === '0') {
            return TypeCombinator::intersect($this, new \PHPStan\Type\Accessory\AccessoryNonFalsyStringType());
        }
        return null;
    }
    public function exponentiate(Type $exponent) : Type
    {
        return new BenevolentUnionType([new FloatType(), new IntegerType()]);
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode('non-empty-string');
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Accessory;

use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\TrinaryLogic;
use PHPStan\Type\AcceptsResult;
use PHPStan\Type\BenevolentUnionType;
use PHPStan\Type\BooleanType;
use PHPStan\Type\CompoundType;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\FloatType;
use PHPStan\Type\GeneralizePrecision;
use PHPStan\Type\IntegerType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\StringType;
use PHPStan\Type\Traits\NonArrayTypeTrait;
use PHPStan\Type\Traits\NonCallableTypeTrait;
use PHPStan\Type\Traits\NonGenericTypeTrait;
use PHPStan\Type\Traits\NonIterableTypeTrait;
use PHPStan\Type\Traits\NonObjectTypeTrait;
use PHPStan\Type\Traits\UndecidedBooleanTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
class AccessoryNumericStringType implements CompoundType, \PHPStan\Type\Accessory\AccessoryType
{
    use NonArrayTypeTrait;
    use NonCallableTypeTrait;
    use NonObjectTypeTrait;
    use NonIterableTypeTrait;
    use UndecidedBooleanTypeTrait;
    use UndecidedComparisonCompoundTypeTrait;
    use NonGenericTypeTrait;
    /** @api */
    public function __construct()
    {
    }
    public function getReferencedClasses() : array
    {
        return [];
    }
    public function getObjectClassNames() : array
    {
        return [];
    }
    public function getObjectClassReflections() : array
    {
        return [];
    }
    public function getConstantStrings() : array
    {
        return [];
    }
    public function accepts(Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(Type $type, bool $strictTypes) : AcceptsResult
    {
        if ($type instanceof CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        return new AcceptsResult($type->isNumericString(), []);
    }
    public function isSuperTypeOf(Type $type) : TrinaryLogic
    {
        if ($type instanceof CompoundType) {
            return $type->isSubTypeOf($this);
        }
        if ($this->equals($type)) {
            return TrinaryLogic::createYes();
        }
        return $type->isNumericString();
    }
    public function isSubTypeOf(Type $otherType) : TrinaryLogic
    {
        if ($otherType instanceof UnionType || $otherType instanceof IntersectionType) {
            return $otherType->isSuperTypeOf($this);
        }
        return $otherType->isNumericString()->and($otherType instanceof self ? TrinaryLogic::createYes() : TrinaryLogic::createMaybe());
    }
    public function isAcceptedBy(Type $acceptingType, bool $strictTypes) : TrinaryLogic
    {
        return $this->isAcceptedWithReasonBy($acceptingType, $strictTypes)->result;
    }
    public function isAcceptedWithReasonBy(Type $acceptingType, bool $strictTypes) : AcceptsResult
    {
        if ($acceptingType->isNonFalsyString()->yes()) {
            return AcceptsResult::createMaybe();
        }
        if ($acceptingType->isNonEmptyString()->yes()) {
            return AcceptsResult::createYes();
        }
        return new AcceptsResult($this->isSubTypeOf($acceptingType), []);
    }
    public function equals(Type $type) : bool
    {
        return $type instanceof self;
    }
    public function describe(VerbosityLevel $level) : string
    {
        return 'numeric-string';
    }
    public function isOffsetAccessible() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function hasOffsetValueType(Type $offsetType) : TrinaryLogic
    {
        return (new IntegerType())->isSuperTypeOf($offsetType)->and(TrinaryLogic::createMaybe());
    }
    public function getOffsetValueType(Type $offsetType) : Type
    {
        if ($this->hasOffsetValueType($offsetType)->no()) {
            return new ErrorType();
        }
        return new StringType();
    }
    public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $unionValues = \true) : Type
    {
        return $this;
    }
    public function unsetOffset(Type $offsetType) : Type
    {
        return new ErrorType();
    }
    public function toNumber() : Type
    {
        return new UnionType([$this->toInteger(), $this->toFloat()]);
    }
    public function toInteger() : Type
    {
        return new IntegerType();
    }
    public function toFloat() : Type
    {
        return new FloatType();
    }
    public function toString() : Type
    {
        return $this;
    }
    public function toArray() : Type
    {
        return new ConstantArrayType([new ConstantIntegerType(0)], [$this], [1], [], \true);
    }
    public function toArrayKey() : Type
    {
        return new IntegerType();
    }
    public function isNull() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantValue() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isConstantScalarValue() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getConstantScalarTypes() : array
    {
        return [];
    }
    public function getConstantScalarValues() : array
    {
        return [];
    }
    public function isTrue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFalse() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isBoolean() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFloat() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isInteger() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isString() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isNumericString() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isLiteralString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isClassStringType() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getClassStringObjectType() : Type
    {
        return new ErrorType();
    }
    public function getObjectTypeOrClassStringObjectType() : Type
    {
        return new ErrorType();
    }
    public function isVoid() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isScalar() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function looseCompare(Type $type, PhpVersion $phpVersion) : BooleanType
    {
        return new BooleanType();
    }
    public function traverse(callable $cb) : Type
    {
        return $this;
    }
    public function traverseSimultaneously(Type $right, callable $cb) : Type
    {
        return $this;
    }
    public function generalize(GeneralizePrecision $precision) : Type
    {
        return new StringType();
    }
    public static function __set_state(array $properties) : Type
    {
        return new self();
    }
    public function tryRemove(Type $typeToRemove) : ?Type
    {
        if ($typeToRemove instanceof ConstantStringType && $typeToRemove->getValue() === '0') {
            return TypeCombinator::intersect($this, new \PHPStan\Type\Accessory\AccessoryNonFalsyStringType());
        }
        return null;
    }
    public function exponentiate(Type $exponent) : Type
    {
        return new BenevolentUnionType([new FloatType(), new IntegerType()]);
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode('numeric-string');
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantFloatType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\Traits\FalseyBooleanTypeTrait;
use PHPStan\Type\Traits\NonArrayTypeTrait;
use PHPStan\Type\Traits\NonCallableTypeTrait;
use PHPStan\Type\Traits\NonGenericTypeTrait;
use PHPStan\Type\Traits\NonIterableTypeTrait;
use PHPStan\Type\Traits\NonObjectTypeTrait;
use PHPStan\Type\Traits\NonRemoveableTypeTrait;
/** @api */
class NullType implements \PHPStan\Type\ConstantScalarType
{
    use NonArrayTypeTrait;
    use NonCallableTypeTrait;
    use NonIterableTypeTrait;
    use NonObjectTypeTrait;
    use FalseyBooleanTypeTrait;
    use NonGenericTypeTrait;
    use NonRemoveableTypeTrait;
    /** @api */
    public function __construct()
    {
    }
    /**
     * @return string[]
     */
    public function getReferencedClasses() : array
    {
        return [];
    }
    public function getObjectClassNames() : array
    {
        return [];
    }
    public function getObjectClassReflections() : array
    {
        return [];
    }
    public function getConstantStrings() : array
    {
        return [];
    }
    /**
     * @return null
     */
    public function getValue()
    {
        return null;
    }
    public function generalize(\PHPStan\Type\GeneralizePrecision $precision) : \PHPStan\Type\Type
    {
        return $this;
    }
    public function accepts(\PHPStan\Type\Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(\PHPStan\Type\Type $type, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        if ($type instanceof self) {
            return \PHPStan\Type\AcceptsResult::createYes();
        }
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        return \PHPStan\Type\AcceptsResult::createNo();
    }
    public function isSuperTypeOf(\PHPStan\Type\Type $type) : TrinaryLogic
    {
        if ($type instanceof self) {
            return TrinaryLogic::createYes();
        }
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return $type->isSubTypeOf($this);
        }
        return TrinaryLogic::createNo();
    }
    public function equals(\PHPStan\Type\Type $type) : bool
    {
        return $type instanceof self;
    }
    public function isSmallerThan(\PHPStan\Type\Type $otherType) : TrinaryLogic
    {
        if ($otherType instanceof \PHPStan\Type\ConstantScalarType) {
            return TrinaryLogic::createFromBoolean(null < $otherType->getValue());
        }
        if ($otherType instanceof \PHPStan\Type\CompoundType) {
            return $otherType->isGreaterThan($this);
        }
        return TrinaryLogic::createMaybe();
    }
    public function isSmallerThanOrEqual(\PHPStan\Type\Type $otherType) : TrinaryLogic
    {
        if ($otherType instanceof \PHPStan\Type\ConstantScalarType) {
            return TrinaryLogic::createFromBoolean(null <= $otherType->getValue());
        }
        if ($otherType instanceof \PHPStan\Type\CompoundType) {
            return $otherType->isGreaterThanOrEqual($this);
        }
        return TrinaryLogic::createMaybe();
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        return 'null';
    }
    public function toNumber() : \PHPStan\Type\Type
    {
        return new ConstantIntegerType(0);
    }
    public function toString() : \PHPStan\Type\Type
    {
        return new ConstantStringType('');
    }
    public function toInteger() : \PHPStan\Type\Type
    {
        return $this->toNumber();
    }
    public function toFloat() : \PHPStan\Type\Type
    {
        return $this->toNumber()->toFloat();
    }
    public function toArray() : \PHPStan\Type\Type
    {
        return new ConstantArrayType([], []);
    }
    public function toArrayKey() : \PHPStan\Type\Type
    {
        return new ConstantStringType('');
    }
    public function isOffsetAccessible() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function hasOffsetValueType(\PHPStan\Type\Type $offsetType) : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getOffsetValueType(\PHPStan\Type\Type $offsetType) : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function setOffsetValueType(?\PHPStan\Type\Type $offsetType, \PHPStan\Type\Type $valueType, bool $unionValues = \true) : \PHPStan\Type\Type
    {
        $array = new ConstantArrayType([], []);
        return $array->setOffsetValueType($offsetType, $valueType, $unionValues);
    }
    public function unsetOffset(\PHPStan\Type\Type $offsetType) : \PHPStan\Type\Type
    {
        return $this;
    }
    public function traverse(callable $cb) : \PHPStan\Type\Type
    {
        return $this;
    }
    public function traverseSimultaneously(\PHPStan\Type\Type $right, callable $cb) : \PHPStan\Type\Type
    {
        return $this;
    }
    public function isNull() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isConstantValue() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isConstantScalarValue() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function getConstantScalarTypes() : array
    {
        return [$this];
    }
    public function getConstantScalarValues() : array
    {
        return [$this->getValue()];
    }
    public function isTrue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFalse() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isBoolean() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFloat() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isInteger() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNumericString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isLiteralString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isClassStringType() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getClassStringObjectType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function getObjectTypeOrClassStringObjectType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function isVoid() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isScalar() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function looseCompare(\PHPStan\Type\Type $type, PhpVersion $phpVersion) : \PHPStan\Type\BooleanType
    {
        if ($type instanceof \PHPStan\Type\ConstantScalarType) {
            return \PHPStan\Type\LooseComparisonHelper::compareConstantScalars($this, $type, $phpVersion);
        }
        if ($type->isConstantArray()->yes() && $type->isIterableAtLeastOnce()->no()) {
            // @phpstan-ignore-next-line
            return new ConstantBooleanType($this->getValue() == []);
            // phpcs:ignore
        }
        return new \PHPStan\Type\BooleanType();
    }
    public function getSmallerType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\NeverType();
    }
    public function getSmallerOrEqualType() : \PHPStan\Type\Type
    {
        // All falsey types except '0'
        return new \PHPStan\Type\UnionType([new \PHPStan\Type\NullType(), new ConstantBooleanType(\false), new ConstantIntegerType(0), new ConstantFloatType(0.0), new ConstantStringType(''), new ConstantArrayType([], [])]);
    }
    public function getGreaterType() : \PHPStan\Type\Type
    {
        // All truthy types, but also '0'
        return new \PHPStan\Type\MixedType(\false, new \PHPStan\Type\UnionType([new \PHPStan\Type\NullType(), new ConstantBooleanType(\false), new ConstantIntegerType(0), new ConstantFloatType(0.0), new ConstantStringType(''), new ConstantArrayType([], [])]));
    }
    public function getGreaterOrEqualType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\MixedType();
    }
    public function exponentiate(\PHPStan\Type\Type $exponent) : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\UnionType([new ConstantIntegerType(0), new ConstantIntegerType(1)]);
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode('null');
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\PhpDocParser\Ast\Type\OffsetAccessTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\PhpDocParser\Printer\Printer;
use PHPStan\Type\Generic\TemplateTypeVariance;
use PHPStan\Type\Traits\LateResolvableTypeTrait;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use function array_merge;
/** @api */
final class OffsetAccessType implements \PHPStan\Type\CompoundType, \PHPStan\Type\LateResolvableType
{
    use LateResolvableTypeTrait;
    use NonGeneralizableTypeTrait;
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    /**
     * @var \PHPStan\Type\Type
     */
    private $offset;
    public function __construct(\PHPStan\Type\Type $type, \PHPStan\Type\Type $offset)
    {
        $this->type = $type;
        $this->offset = $offset;
    }
    public function getReferencedClasses() : array
    {
        return array_merge($this->type->getReferencedClasses(), $this->offset->getReferencedClasses());
    }
    public function getObjectClassNames() : array
    {
        return [];
    }
    public function getObjectClassReflections() : array
    {
        return [];
    }
    public function getReferencedTemplateTypes(TemplateTypeVariance $positionVariance) : array
    {
        return array_merge($this->type->getReferencedTemplateTypes($positionVariance), $this->offset->getReferencedTemplateTypes($positionVariance));
    }
    public function equals(\PHPStan\Type\Type $type) : bool
    {
        return $type instanceof self && $this->type->equals($type->type) && $this->offset->equals($type->offset);
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        $printer = new Printer();
        return $printer->print($this->toPhpDocNode());
    }
    public function isResolvable() : bool
    {
        return !\PHPStan\Type\TypeUtils::containsTemplateType($this->type) && !\PHPStan\Type\TypeUtils::containsTemplateType($this->offset);
    }
    protected function getResult() : \PHPStan\Type\Type
    {
        return $this->type->getOffsetValueType($this->offset);
    }
    /**
     * @param callable(Type): Type $cb
     */
    public function traverse(callable $cb) : \PHPStan\Type\Type
    {
        $type = $cb($this->type);
        $offset = $cb($this->offset);
        if ($this->type === $type && $this->offset === $offset) {
            return $this;
        }
        return new self($type, $offset);
    }
    public function traverseSimultaneously(\PHPStan\Type\Type $right, callable $cb) : \PHPStan\Type\Type
    {
        if (!$right instanceof self) {
            return $this;
        }
        $type = $cb($this->type, $right->type);
        $offset = $cb($this->offset, $right->offset);
        if ($this->type === $type && $this->offset === $offset) {
            return $this;
        }
        return new self($type, $offset);
    }
    public function toPhpDocNode() : TypeNode
    {
        return new OffsetAccessTypeNode($this->type->toPhpDocNode(), $this->offset->toPhpDocNode());
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self($properties['type'], $properties['offset']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

/** @api */
class CircularTypeAliasErrorType extends \PHPStan\Type\ErrorType
{
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\TrinaryLogic;
use function get_class;
trait JustNullableTypeTrait
{
    /**
     * @return string[]
     */
    public function getReferencedClasses() : array
    {
        return [];
    }
    public function getObjectClassNames() : array
    {
        return [];
    }
    public function getObjectClassReflections() : array
    {
        return [];
    }
    public function accepts(\PHPStan\Type\Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(\PHPStan\Type\Type $type, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        if ($type instanceof static) {
            return \PHPStan\Type\AcceptsResult::createYes();
        }
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        return \PHPStan\Type\AcceptsResult::createNo();
    }
    public function isSuperTypeOf(\PHPStan\Type\Type $type) : TrinaryLogic
    {
        if ($type instanceof self) {
            return TrinaryLogic::createYes();
        }
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return $type->isSubTypeOf($this);
        }
        return TrinaryLogic::createNo();
    }
    public function equals(\PHPStan\Type\Type $type) : bool
    {
        return get_class($type) === static::class;
    }
    public function traverse(callable $cb) : \PHPStan\Type\Type
    {
        return $this;
    }
    public function traverseSimultaneously(\PHPStan\Type\Type $right, callable $cb) : \PHPStan\Type\Type
    {
        return $this;
    }
    public function isNull() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantScalarValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getConstantScalarTypes() : array
    {
        return [];
    }
    public function getConstantScalarValues() : array
    {
        return [];
    }
    public function isTrue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFalse() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isBoolean() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFloat() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isInteger() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNumericString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isLiteralString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isClassStringType() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getClassStringObjectType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function getObjectTypeOrClassStringObjectType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function isVoid() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

/** @api */
interface ConstantScalarType extends \PHPStan\Type\ConstantType
{
    /**
     * @return int|float|string|bool|null
     */
    public function getValue();
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\TrinaryLogic;
/** @api */
interface CompoundType extends \PHPStan\Type\Type
{
    public function isSubTypeOf(\PHPStan\Type\Type $otherType) : TrinaryLogic;
    public function isAcceptedBy(\PHPStan\Type\Type $acceptingType, bool $strictTypes) : TrinaryLogic;
    public function isAcceptedWithReasonBy(\PHPStan\Type\Type $acceptingType, bool $strictTypes) : \PHPStan\Type\AcceptsResult;
    public function isGreaterThan(\PHPStan\Type\Type $otherType) : TrinaryLogic;
    public function isGreaterThanOrEqual(\PHPStan\Type\Type $otherType) : TrinaryLogic;
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Reflection\ReflectionProviderStaticAccessor;
class StringAlwaysAcceptingObjectWithToStringType extends \PHPStan\Type\StringType
{
    public function acceptsWithReason(\PHPStan\Type\Type $type, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        $thatClassNames = $type->getObjectClassNames();
        if ($thatClassNames === []) {
            return parent::acceptsWithReason($type, $strictTypes);
        }
        $result = \PHPStan\Type\AcceptsResult::createNo();
        $reflectionProvider = ReflectionProviderStaticAccessor::getInstance();
        foreach ($thatClassNames as $thatClassName) {
            if (!$reflectionProvider->hasClass($thatClassName)) {
                return \PHPStan\Type\AcceptsResult::createNo();
            }
            $typeClass = $reflectionProvider->getClass($thatClassName);
            $result = $result->or(\PHPStan\Type\AcceptsResult::createFromBoolean($typeClass->hasNativeMethod('__toString')));
        }
        return $result;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Enum;

use PHPStan\PhpDocParser\Ast\ConstExpr\ConstFetchNode;
use PHPStan\PhpDocParser\Ast\Type\ConstTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\Reflection\ClassMemberAccessAnswerer;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\Php\EnumPropertyReflection;
use PHPStan\Reflection\Php\EnumUnresolvedPropertyPrototypeReflection;
use PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\AcceptsResult;
use PHPStan\Type\CompoundType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\GeneralizePrecision;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/** @api */
class EnumCaseObjectType extends ObjectType
{
    /**
     * @var string
     */
    private $enumCaseName;
    /** @api */
    public function __construct(string $className, string $enumCaseName, ?ClassReflection $classReflection = null)
    {
        $this->enumCaseName = $enumCaseName;
        parent::__construct($className, null, $classReflection);
    }
    public function getEnumCaseName() : string
    {
        return $this->enumCaseName;
    }
    public function describe(VerbosityLevel $level) : string
    {
        $parent = parent::describe($level);
        return sprintf('%s::%s', $parent, $this->enumCaseName);
    }
    public function equals(Type $type) : bool
    {
        if (!$type instanceof self) {
            return \false;
        }
        return $this->getClassName() === $type->getClassName() && $this->enumCaseName === $type->enumCaseName;
    }
    public function accepts(Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(Type $type, bool $strictTypes) : AcceptsResult
    {
        return new AcceptsResult($this->isSuperTypeOf($type), []);
    }
    public function isSuperTypeOf(Type $type) : TrinaryLogic
    {
        if ($type instanceof self) {
            return TrinaryLogic::createFromBoolean($this->getClassName() === $type->getClassName() && $this->enumCaseName === $type->enumCaseName);
        }
        if ($type instanceof CompoundType) {
            return $type->isSubTypeOf($this);
        }
        $parent = new parent($this->getClassName(), $this->getSubtractedType(), $this->getClassReflection());
        return $parent->isSuperTypeOf($type)->and(TrinaryLogic::createMaybe());
    }
    public function subtract(Type $type) : Type
    {
        return $this;
    }
    public function getTypeWithoutSubtractedType() : Type
    {
        return $this;
    }
    public function changeSubtractedType(?Type $subtractedType) : Type
    {
        return $this;
    }
    public function getSubtractedType() : ?Type
    {
        return null;
    }
    public function tryRemove(Type $typeToRemove) : ?Type
    {
        if ($this->isSuperTypeOf($typeToRemove)->yes()) {
            return $this->subtract($typeToRemove);
        }
        return null;
    }
    public function getUnresolvedPropertyPrototype(string $propertyName, ClassMemberAccessAnswerer $scope) : UnresolvedPropertyPrototypeReflection
    {
        $classReflection = $this->getClassReflection();
        if ($classReflection === null) {
            return parent::getUnresolvedPropertyPrototype($propertyName, $scope);
        }
        if ($propertyName === 'name') {
            return new EnumUnresolvedPropertyPrototypeReflection(new EnumPropertyReflection($classReflection, new ConstantStringType($this->enumCaseName)));
        }
        if ($classReflection->isBackedEnum() && $propertyName === 'value') {
            if ($classReflection->hasEnumCase($this->enumCaseName)) {
                $enumCase = $classReflection->getEnumCase($this->enumCaseName);
                $valueType = $enumCase->getBackingValueType();
                if ($valueType === null) {
                    throw new ShouldNotHappenException();
                }
                return new EnumUnresolvedPropertyPrototypeReflection(new EnumPropertyReflection($classReflection, $valueType));
            }
        }
        return parent::getUnresolvedPropertyPrototype($propertyName, $scope);
    }
    public function getBackingValueType() : ?Type
    {
        $classReflection = $this->getClassReflection();
        if ($classReflection === null) {
            return null;
        }
        if (!$classReflection->isBackedEnum()) {
            return null;
        }
        if ($classReflection->hasEnumCase($this->enumCaseName)) {
            $enumCase = $classReflection->getEnumCase($this->enumCaseName);
            return $enumCase->getBackingValueType();
        }
        return null;
    }
    public function generalize(GeneralizePrecision $precision) : Type
    {
        return new parent($this->getClassName(), null, $this->getClassReflection());
    }
    public function isSmallerThan(Type $otherType) : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isSmallerThanOrEqual(Type $otherType) : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getEnumCases() : array
    {
        return [$this];
    }
    public function toPhpDocNode() : TypeNode
    {
        return new ConstTypeNode(new ConstFetchNode($this->getClassName(), $this->getEnumCaseName()));
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : Type
    {
        return new self($properties['className'], $properties['enumCaseName'], null);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\Reflection\ReflectionProviderStaticAccessor;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\Traits\MaybeCallableTypeTrait;
use PHPStan\Type\Traits\NonArrayTypeTrait;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use PHPStan\Type\Traits\NonGenericTypeTrait;
use PHPStan\Type\Traits\NonIterableTypeTrait;
use PHPStan\Type\Traits\NonObjectTypeTrait;
use PHPStan\Type\Traits\UndecidedBooleanTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonTypeTrait;
use function count;
/** @api */
class StringType implements \PHPStan\Type\Type
{
    use \PHPStan\Type\JustNullableTypeTrait;
    use MaybeCallableTypeTrait;
    use NonArrayTypeTrait;
    use NonIterableTypeTrait;
    use NonObjectTypeTrait;
    use UndecidedBooleanTypeTrait;
    use UndecidedComparisonTypeTrait;
    use NonGenericTypeTrait;
    use NonGeneralizableTypeTrait;
    /** @api */
    public function __construct()
    {
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        return 'string';
    }
    public function getConstantStrings() : array
    {
        return [];
    }
    public function isOffsetAccessible() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function hasOffsetValueType(\PHPStan\Type\Type $offsetType) : TrinaryLogic
    {
        return (new \PHPStan\Type\IntegerType())->isSuperTypeOf($offsetType)->and(TrinaryLogic::createMaybe());
    }
    public function getOffsetValueType(\PHPStan\Type\Type $offsetType) : \PHPStan\Type\Type
    {
        if ($this->hasOffsetValueType($offsetType)->no()) {
            return new \PHPStan\Type\ErrorType();
        }
        return new \PHPStan\Type\StringType();
    }
    public function setOffsetValueType(?\PHPStan\Type\Type $offsetType, \PHPStan\Type\Type $valueType, bool $unionValues = \true) : \PHPStan\Type\Type
    {
        if ($offsetType === null) {
            return new \PHPStan\Type\ErrorType();
        }
        $valueStringType = $valueType->toString();
        if ($valueStringType instanceof \PHPStan\Type\ErrorType) {
            return new \PHPStan\Type\ErrorType();
        }
        if ((new \PHPStan\Type\IntegerType())->isSuperTypeOf($offsetType)->yes() || $offsetType instanceof \PHPStan\Type\MixedType) {
            return new \PHPStan\Type\StringType();
        }
        return new \PHPStan\Type\ErrorType();
    }
    public function unsetOffset(\PHPStan\Type\Type $offsetType) : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function accepts(\PHPStan\Type\Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(\PHPStan\Type\Type $type, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        if ($type instanceof self) {
            return \PHPStan\Type\AcceptsResult::createYes();
        }
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        $thatClassNames = $type->getObjectClassNames();
        if (count($thatClassNames) > 1) {
            throw new ShouldNotHappenException();
        }
        if ($thatClassNames === [] || $strictTypes) {
            return \PHPStan\Type\AcceptsResult::createNo();
        }
        $reflectionProvider = ReflectionProviderStaticAccessor::getInstance();
        if (!$reflectionProvider->hasClass($thatClassNames[0])) {
            return \PHPStan\Type\AcceptsResult::createNo();
        }
        $typeClass = $reflectionProvider->getClass($thatClassNames[0]);
        return \PHPStan\Type\AcceptsResult::createFromBoolean($typeClass->hasNativeMethod('__toString'));
    }
    public function toNumber() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toInteger() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\IntegerType();
    }
    public function toFloat() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\FloatType();
    }
    public function toString() : \PHPStan\Type\Type
    {
        return $this;
    }
    public function toArray() : \PHPStan\Type\Type
    {
        return new ConstantArrayType([new ConstantIntegerType(0)], [$this], [1], [], \true);
    }
    public function toArrayKey() : \PHPStan\Type\Type
    {
        return $this;
    }
    public function isNull() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isTrue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFalse() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isBoolean() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFloat() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isInteger() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isString() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isNumericString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isLiteralString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isClassStringType() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getClassStringObjectType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ObjectWithoutClassType();
    }
    public function getObjectTypeOrClassStringObjectType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ObjectWithoutClassType();
    }
    public function isScalar() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function looseCompare(\PHPStan\Type\Type $type, PhpVersion $phpVersion) : \PHPStan\Type\BooleanType
    {
        return new \PHPStan\Type\BooleanType();
    }
    public function hasMethod(string $methodName) : TrinaryLogic
    {
        if ($this->isClassStringType()->yes()) {
            return TrinaryLogic::createMaybe();
        }
        return TrinaryLogic::createNo();
    }
    public function tryRemove(\PHPStan\Type\Type $typeToRemove) : ?\PHPStan\Type\Type
    {
        if ($typeToRemove instanceof ConstantStringType && $typeToRemove->getValue() === '') {
            return \PHPStan\Type\TypeCombinator::intersect($this, new AccessoryNonEmptyStringType());
        }
        if ($typeToRemove instanceof AccessoryNonEmptyStringType) {
            return new ConstantStringType('');
        }
        return null;
    }
    public function exponentiate(\PHPStan\Type\Type $exponent) : \PHPStan\Type\Type
    {
        return \PHPStan\Type\ExponentiateHelper::exponentiate($this, $exponent);
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode('string');
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
/**
 * This is the interface dynamic throw type extensions implement for non-static methods.
 *
 * To register it in the configuration file use the `phpstan.dynamicMethodThrowTypeExtension` service tag:
 *
 * ```
 * services:
 * 	-
 *		class: App\PHPStan\MyExtension
 *		tags:
 *			- phpstan.dynamicMethodThrowTypeExtension
 * ```
 *
 * Learn more: https://phpstan.org/developing-extensions/dynamic-throw-type-extensions
 *
 * @api
 */
interface DynamicMethodThrowTypeExtension
{
    public function isMethodSupported(MethodReflection $methodReflection) : bool;
    public function getThrowTypeFromMethodCall(MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope) : ?\PHPStan\Type\Type;
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ReflectionProviderStaticAccessor;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Generic\TemplateTypeHelper;
use ReflectionIntersectionType;
use ReflectionNamedType;
use ReflectionType;
use ReflectionUnionType;
use function array_map;
use function count;
use function get_class;
use function is_string;
use function sprintf;
use function str_ends_with;
use function strtolower;
class TypehintHelper
{
    /**
     * @param \PHPStan\Reflection\ClassReflection|string|null $selfClass
     */
    private static function getTypeObjectFromTypehint(string $typeString, $selfClass) : \PHPStan\Type\Type
    {
        switch (strtolower($typeString)) {
            case 'int':
                return new \PHPStan\Type\IntegerType();
            case 'bool':
                return new \PHPStan\Type\BooleanType();
            case 'false':
                return new ConstantBooleanType(\false);
            case 'true':
                return new ConstantBooleanType(\true);
            case 'string':
                return new \PHPStan\Type\StringType();
            case 'float':
                return new \PHPStan\Type\FloatType();
            case 'array':
                return new \PHPStan\Type\ArrayType(new \PHPStan\Type\MixedType(), new \PHPStan\Type\MixedType());
            case 'iterable':
                return new \PHPStan\Type\IterableType(new \PHPStan\Type\MixedType(), new \PHPStan\Type\MixedType());
            case 'callable':
                return new \PHPStan\Type\CallableType();
            case 'void':
                return new \PHPStan\Type\VoidType();
            case 'object':
                return new \PHPStan\Type\ObjectWithoutClassType();
            case 'mixed':
                return new \PHPStan\Type\MixedType(\true);
            case 'self':
                if ($selfClass instanceof ClassReflection) {
                    $selfClass = $selfClass->getName();
                }
                return $selfClass !== null ? new \PHPStan\Type\ObjectType($selfClass) : new \PHPStan\Type\ErrorType();
            case 'parent':
                $reflectionProvider = ReflectionProviderStaticAccessor::getInstance();
                if (is_string($selfClass)) {
                    if ($reflectionProvider->hasClass($selfClass)) {
                        $selfClass = $reflectionProvider->getClass($selfClass);
                    } else {
                        $selfClass = null;
                    }
                }
                if ($selfClass !== null) {
                    if ($selfClass->getParentClass() !== null) {
                        return new \PHPStan\Type\ObjectType($selfClass->getParentClass()->getName());
                    }
                }
                return new \PHPStan\Type\NonexistentParentClassType();
            case 'static':
                $reflectionProvider = ReflectionProviderStaticAccessor::getInstance();
                if (is_string($selfClass)) {
                    if ($reflectionProvider->hasClass($selfClass)) {
                        $selfClass = $reflectionProvider->getClass($selfClass);
                    } else {
                        $selfClass = null;
                    }
                }
                if ($selfClass !== null) {
                    return new \PHPStan\Type\StaticType($selfClass);
                }
                return new \PHPStan\Type\ErrorType();
            case 'null':
                return new \PHPStan\Type\NullType();
            case 'never':
                return new \PHPStan\Type\NeverType(\true);
            default:
                return new \PHPStan\Type\ObjectType($typeString);
        }
    }
    /** @api
     * @param \PHPStan\Reflection\ClassReflection|string|null $selfClass */
    public static function decideTypeFromReflection(?ReflectionType $reflectionType, ?\PHPStan\Type\Type $phpDocType = null, $selfClass = null, bool $isVariadic = \false) : \PHPStan\Type\Type
    {
        if ($reflectionType === null) {
            if ($isVariadic && $phpDocType instanceof \PHPStan\Type\ArrayType) {
                $phpDocType = $phpDocType->getItemType();
            }
            return $phpDocType ?? new \PHPStan\Type\MixedType();
        }
        if ($reflectionType instanceof ReflectionUnionType) {
            $type = \PHPStan\Type\TypeCombinator::union(...array_map(static function (ReflectionType $type) use($selfClass) : \PHPStan\Type\Type {
                return self::decideTypeFromReflection($type, null, $selfClass, \false);
            }, $reflectionType->getTypes()));
            return self::decideType($type, $phpDocType);
        }
        if ($reflectionType instanceof ReflectionIntersectionType) {
            $types = [];
            foreach ($reflectionType->getTypes() as $innerReflectionType) {
                $innerType = self::decideTypeFromReflection($innerReflectionType, null, $selfClass, \false);
                if (!$innerType->isObject()->yes()) {
                    return new \PHPStan\Type\NeverType();
                }
                $types[] = $innerType;
            }
            return self::decideType(\PHPStan\Type\TypeCombinator::intersect(...$types), $phpDocType);
        }
        if (!$reflectionType instanceof ReflectionNamedType) {
            throw new ShouldNotHappenException(sprintf('Unexpected type: %s', get_class($reflectionType)));
        }
        $reflectionTypeString = $reflectionType->getName();
        $loweredReflectionTypeString = strtolower($reflectionTypeString);
        if (str_ends_with($loweredReflectionTypeString, '\\object')) {
            $reflectionTypeString = 'object';
        } elseif (str_ends_with($loweredReflectionTypeString, '\\mixed')) {
            $reflectionTypeString = 'mixed';
        } elseif (str_ends_with($loweredReflectionTypeString, '\\true')) {
            $reflectionTypeString = 'true';
        } elseif (str_ends_with($loweredReflectionTypeString, '\\false')) {
            $reflectionTypeString = 'false';
        } elseif (str_ends_with($loweredReflectionTypeString, '\\null')) {
            $reflectionTypeString = 'null';
        } elseif (str_ends_with($loweredReflectionTypeString, '\\never')) {
            $reflectionTypeString = 'never';
        }
        $type = self::getTypeObjectFromTypehint($reflectionTypeString, $selfClass);
        if ($reflectionType->allowsNull()) {
            $type = \PHPStan\Type\TypeCombinator::addNull($type);
        } elseif ($phpDocType !== null) {
            $phpDocType = \PHPStan\Type\TypeCombinator::removeNull($phpDocType);
        }
        return self::decideType($type, $phpDocType);
    }
    public static function decideType(\PHPStan\Type\Type $type, ?\PHPStan\Type\Type $phpDocType = null) : \PHPStan\Type\Type
    {
        if ($phpDocType !== null && !$phpDocType instanceof \PHPStan\Type\ErrorType) {
            if ($phpDocType instanceof \PHPStan\Type\NeverType && $phpDocType->isExplicit()) {
                return $phpDocType;
            }
            if ($type instanceof \PHPStan\Type\MixedType && !$type->isExplicitMixed() && $phpDocType->isVoid()->yes()) {
                return $phpDocType;
            }
            if (\PHPStan\Type\TypeCombinator::removeNull($type) instanceof \PHPStan\Type\IterableType) {
                if ($phpDocType instanceof \PHPStan\Type\UnionType) {
                    $innerTypes = [];
                    foreach ($phpDocType->getTypes() as $innerType) {
                        if ($innerType instanceof \PHPStan\Type\ArrayType) {
                            $innerTypes[] = new \PHPStan\Type\IterableType($innerType->getKeyType(), $innerType->getItemType());
                        } else {
                            $innerTypes[] = $innerType;
                        }
                    }
                    $phpDocType = new \PHPStan\Type\UnionType($innerTypes);
                } elseif ($phpDocType instanceof \PHPStan\Type\ArrayType) {
                    $phpDocType = new \PHPStan\Type\IterableType($phpDocType->getKeyType(), $phpDocType->getItemType());
                }
            }
            if ((!$phpDocType instanceof \PHPStan\Type\NeverType || $type instanceof \PHPStan\Type\MixedType && !$type->isExplicitMixed()) && $type->isSuperTypeOf(TemplateTypeHelper::resolveToBounds($phpDocType))->yes()) {
                $resultType = $phpDocType;
            } else {
                $resultType = $type;
            }
            if ($type instanceof \PHPStan\Type\UnionType) {
                $addToUnionTypes = [];
                foreach ($type->getTypes() as $innerType) {
                    if (!$innerType->isSuperTypeOf($resultType)->no()) {
                        continue;
                    }
                    $addToUnionTypes[] = $innerType;
                }
                if (count($addToUnionTypes) > 0) {
                    $type = \PHPStan\Type\TypeCombinator::union($resultType, ...$addToUnionTypes);
                } else {
                    $type = $resultType;
                }
            } elseif (\PHPStan\Type\TypeCombinator::containsNull($type)) {
                $type = \PHPStan\Type\TypeCombinator::addNull($resultType);
            } else {
                $type = $resultType;
            }
        }
        return $type;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

class DirectTypeAliasResolverProvider implements \PHPStan\Type\TypeAliasResolverProvider
{
    /**
     * @var \PHPStan\Type\TypeAliasResolver
     */
    private $typeAliasResolver;
    public function __construct(\PHPStan\Type\TypeAliasResolver $typeAliasResolver)
    {
        $this->typeAliasResolver = $typeAliasResolver;
    }
    public function getTypeAliasResolver() : \PHPStan\Type\TypeAliasResolver
    {
        return $this->typeAliasResolver;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

class RecursionGuard
{
    /** @var true[] */
    private static $context = [];
    /**
     * @param callable(): Type $callback
     *
     */
    public static function run(\PHPStan\Type\Type $type, callable $callback) : \PHPStan\Type\Type
    {
        $key = $type->describe(\PHPStan\Type\VerbosityLevel::value());
        if (isset(self::$context[$key])) {
            return new \PHPStan\Type\ErrorType();
        }
        try {
            self::$context[$key] = \true;
            return $callback();
        } finally {
            unset(self::$context[$key]);
        }
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Accessory\AccessoryNumericStringType;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Traits\NonArrayTypeTrait;
use PHPStan\Type\Traits\NonCallableTypeTrait;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use PHPStan\Type\Traits\NonGenericTypeTrait;
use PHPStan\Type\Traits\NonIterableTypeTrait;
use PHPStan\Type\Traits\NonObjectTypeTrait;
use PHPStan\Type\Traits\NonOffsetAccessibleTypeTrait;
use PHPStan\Type\Traits\UndecidedBooleanTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonTypeTrait;
/** @api */
class IntegerType implements \PHPStan\Type\Type
{
    use \PHPStan\Type\JustNullableTypeTrait;
    use NonArrayTypeTrait;
    use NonCallableTypeTrait;
    use NonIterableTypeTrait;
    use NonObjectTypeTrait;
    use UndecidedBooleanTypeTrait;
    use UndecidedComparisonTypeTrait;
    use NonGenericTypeTrait;
    use NonOffsetAccessibleTypeTrait;
    use NonGeneralizableTypeTrait;
    /** @api */
    public function __construct()
    {
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        return 'int';
    }
    public function getConstantStrings() : array
    {
        return [];
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self();
    }
    public function toNumber() : \PHPStan\Type\Type
    {
        return $this;
    }
    public function toFloat() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\FloatType();
    }
    public function toInteger() : \PHPStan\Type\Type
    {
        return $this;
    }
    public function toString() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\IntersectionType([new \PHPStan\Type\StringType(), new AccessoryNumericStringType()]);
    }
    public function toArray() : \PHPStan\Type\Type
    {
        return new ConstantArrayType([new ConstantIntegerType(0)], [$this], [1], [], \true);
    }
    public function toArrayKey() : \PHPStan\Type\Type
    {
        return $this;
    }
    public function isNull() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isTrue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFalse() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isBoolean() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFloat() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isInteger() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isScalar() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function looseCompare(\PHPStan\Type\Type $type, PhpVersion $phpVersion) : \PHPStan\Type\BooleanType
    {
        return new \PHPStan\Type\BooleanType();
    }
    public function tryRemove(\PHPStan\Type\Type $typeToRemove) : ?\PHPStan\Type\Type
    {
        if ($typeToRemove instanceof \PHPStan\Type\IntegerRangeType || $typeToRemove instanceof ConstantIntegerType) {
            if ($typeToRemove instanceof \PHPStan\Type\IntegerRangeType) {
                $removeValueMin = $typeToRemove->getMin();
                $removeValueMax = $typeToRemove->getMax();
            } else {
                $removeValueMin = $typeToRemove->getValue();
                $removeValueMax = $typeToRemove->getValue();
            }
            $lowerPart = $removeValueMin !== null ? \PHPStan\Type\IntegerRangeType::fromInterval(null, $removeValueMin, -1) : null;
            $upperPart = $removeValueMax !== null ? \PHPStan\Type\IntegerRangeType::fromInterval($removeValueMax, null, +1) : null;
            if ($lowerPart !== null && $upperPart !== null) {
                return new \PHPStan\Type\UnionType([$lowerPart, $upperPart]);
            }
            return $lowerPart ?? $upperPart ?? new \PHPStan\Type\NeverType();
        }
        return null;
    }
    public function exponentiate(\PHPStan\Type\Type $exponent) : \PHPStan\Type\Type
    {
        return \PHPStan\Type\ExponentiateHelper::exponentiate($this, $exponent);
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode('int');
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use Exception;
class CircularTypeAliasDefinitionException extends Exception
{
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Helper;

use PHPStan\PhpDocParser\Ast\ConstExpr\QuoteAwareConstExprStringNode;
use PHPStan\PhpDocParser\Ast\Type\ConstTypeNode;
use PHPStan\PhpDocParser\Ast\Type\GenericTypeNode;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\Type\CompoundType;
use PHPStan\Type\Generic\TemplateTypeVariance;
use PHPStan\Type\LateResolvableType;
use PHPStan\Type\Traits\LateResolvableTypeTrait;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use PHPStan\Type\Type;
use PHPStan\Type\TypeUtils;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/** @api */
final class GetTemplateTypeType implements CompoundType, LateResolvableType
{
    use LateResolvableTypeTrait;
    use NonGeneralizableTypeTrait;
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    /**
     * @var class-string
     */
    private $ancestorClassName;
    /**
     * @var string
     */
    private $templateTypeName;
    /**
     * @param class-string $ancestorClassName
     */
    public function __construct(Type $type, string $ancestorClassName, string $templateTypeName)
    {
        $this->type = $type;
        $this->ancestorClassName = $ancestorClassName;
        $this->templateTypeName = $templateTypeName;
    }
    public function getReferencedClasses() : array
    {
        return $this->type->getReferencedClasses();
    }
    public function getReferencedTemplateTypes(TemplateTypeVariance $positionVariance) : array
    {
        return $this->type->getReferencedTemplateTypes($positionVariance);
    }
    public function equals(Type $type) : bool
    {
        return $type instanceof self && $this->type->equals($type->type);
    }
    public function describe(VerbosityLevel $level) : string
    {
        return sprintf('template-type<%s, %s, %s>', $this->type->describe($level), $this->ancestorClassName, $this->templateTypeName);
    }
    public function isResolvable() : bool
    {
        return !TypeUtils::containsTemplateType($this->type);
    }
    protected function getResult() : Type
    {
        return $this->type->getTemplateType($this->ancestorClassName, $this->templateTypeName);
    }
    /**
     * @param callable(Type): Type $cb
     */
    public function traverse(callable $cb) : Type
    {
        $type = $cb($this->type);
        if ($this->type === $type) {
            return $this;
        }
        return new self($type, $this->ancestorClassName, $this->templateTypeName);
    }
    public function traverseSimultaneously(Type $right, callable $cb) : Type
    {
        if (!$right instanceof self) {
            return $this;
        }
        $type = $cb($this->type, $right->type);
        if ($this->type === $type) {
            return $this;
        }
        return new self($type, $this->ancestorClassName, $this->templateTypeName);
    }
    public function toPhpDocNode() : TypeNode
    {
        return new GenericTypeNode(new IdentifierTypeNode('template-type'), [$this->type->toPhpDocNode(), new IdentifierTypeNode($this->ancestorClassName), new ConstTypeNode(new QuoteAwareConstExprStringNode($this->templateTypeName, QuoteAwareConstExprStringNode::SINGLE_QUOTED))]);
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : Type
    {
        return new self($properties['type'], $properties['ancestorClassName'], $properties['templateTypeName']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
/**
 * This is the interface dynamic return type extensions implement for functions.
 *
 * To register it in the configuration file use the `phpstan.broker.dynamicFunctionReturnTypeExtension` service tag:
 *
 * ```
 * services:
 * 	-
 *		class: App\PHPStan\MyExtension
 *		tags:
 *			- phpstan.broker.dynamicFunctionReturnTypeExtension
 * ```
 *
 * Learn more: https://phpstan.org/developing-extensions/dynamic-return-type-extensions
 *
 * @api
 */
interface DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool;
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?\PHPStan\Type\Type;
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PhpParser\Node\Expr\StaticCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
/**
 * This is the interface dynamic return type extensions implement for static methods.
 *
 * To register it in the configuration file use the `phpstan.broker.dynamicStaticMethodReturnTypeExtension` service tag:
 *
 * ```
 * services:
 * 	-
 *		class: App\PHPStan\MyExtension
 *		tags:
 *			- phpstan.broker.dynamicStaticMethodReturnTypeExtension
 * ```
 *
 * Learn more: https://phpstan.org/developing-extensions/dynamic-return-type-extensions
 *
 * @api
 */
interface DynamicStaticMethodReturnTypeExtension
{
    public function getClass() : string;
    public function isStaticMethodSupported(MethodReflection $methodReflection) : bool;
    public function getTypeFromStaticMethodCall(MethodReflection $methodReflection, StaticCall $methodCall, Scope $scope) : ?\PHPStan\Type\Type;
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Analyser\NameScope;
use PHPStan\PhpDoc\TypeNodeResolver;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
class TypeAlias
{
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $resolvedType;
    /**
     * @var \PHPStan\PhpDocParser\Ast\Type\TypeNode
     */
    private $typeNode;
    /**
     * @var \PHPStan\Analyser\NameScope
     */
    private $nameScope;
    public function __construct(TypeNode $typeNode, NameScope $nameScope)
    {
        $this->typeNode = $typeNode;
        $this->nameScope = $nameScope;
    }
    public static function invalid() : self
    {
        $self = new self(new IdentifierTypeNode('*ERROR*'), new NameScope(null, []));
        $self->resolvedType = new \PHPStan\Type\CircularTypeAliasErrorType();
        return $self;
    }
    public function resolve(TypeNodeResolver $typeNodeResolver) : \PHPStan\Type\Type
    {
        if ($this->resolvedType === null) {
            $this->resolvedType = $typeNodeResolver->resolve($this->typeNode, $this->nameScope);
        }
        return $this->resolvedType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprIntegerNode;
use PHPStan\PhpDocParser\Ast\Type\ConstTypeNode;
use PHPStan\PhpDocParser\Ast\Type\GenericTypeNode;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantIntegerType;
use function array_filter;
use function assert;
use function ceil;
use function count;
use function floor;
use function get_class;
use function is_float;
use function is_int;
use function max;
use function min;
use function sprintf;
use const PHP_INT_MAX;
use const PHP_INT_MIN;
/** @api */
class IntegerRangeType extends \PHPStan\Type\IntegerType implements \PHPStan\Type\CompoundType
{
    /**
     * @var int|null
     */
    private $min;
    /**
     * @var int|null
     */
    private $max;
    private function __construct(?int $min, ?int $max)
    {
        $this->min = $min;
        $this->max = $max;
        parent::__construct();
        assert($min === null || $max === null || $min <= $max);
        assert($min !== null || $max !== null);
    }
    public static function fromInterval(?int $min, ?int $max, int $shift = 0) : \PHPStan\Type\Type
    {
        if ($min !== null && $max !== null) {
            if ($min > $max) {
                return new \PHPStan\Type\NeverType();
            }
            if ($min === $max) {
                return new ConstantIntegerType($min + $shift);
            }
        }
        if ($min === null && $max === null) {
            return new \PHPStan\Type\IntegerType();
        }
        return (new self($min, $max))->shift($shift);
    }
    protected static function isDisjoint(?int $minA, ?int $maxA, ?int $minB, ?int $maxB, bool $touchingIsDisjoint = \true) : bool
    {
        $offset = $touchingIsDisjoint ? 0 : 1;
        return $minA !== null && $maxB !== null && $minA > $maxB + $offset || $maxA !== null && $minB !== null && $maxA + $offset < $minB;
    }
    /**
     * Return the range of integers smaller than the given value
     *
     * @param int|float $value
     */
    public static function createAllSmallerThan($value) : \PHPStan\Type\Type
    {
        if (is_int($value)) {
            return self::fromInterval(null, $value, -1);
        }
        if ($value > PHP_INT_MAX) {
            return new \PHPStan\Type\IntegerType();
        }
        if ($value <= PHP_INT_MIN) {
            return new \PHPStan\Type\NeverType();
        }
        return self::fromInterval(null, (int) ceil($value), -1);
    }
    /**
     * Return the range of integers smaller than or equal to the given value
     *
     * @param int|float $value
     */
    public static function createAllSmallerThanOrEqualTo($value) : \PHPStan\Type\Type
    {
        if (is_int($value)) {
            return self::fromInterval(null, $value);
        }
        if ($value >= PHP_INT_MAX) {
            return new \PHPStan\Type\IntegerType();
        }
        if ($value < PHP_INT_MIN) {
            return new \PHPStan\Type\NeverType();
        }
        return self::fromInterval(null, (int) floor($value));
    }
    /**
     * Return the range of integers greater than the given value
     *
     * @param int|float $value
     */
    public static function createAllGreaterThan($value) : \PHPStan\Type\Type
    {
        if (is_int($value)) {
            return self::fromInterval($value, null, 1);
        }
        if ($value < PHP_INT_MIN) {
            return new \PHPStan\Type\IntegerType();
        }
        if ($value >= PHP_INT_MAX) {
            return new \PHPStan\Type\NeverType();
        }
        return self::fromInterval((int) floor($value), null, 1);
    }
    /**
     * Return the range of integers greater than or equal to the given value
     *
     * @param int|float $value
     */
    public static function createAllGreaterThanOrEqualTo($value) : \PHPStan\Type\Type
    {
        if (is_int($value)) {
            return self::fromInterval($value, null);
        }
        if ($value <= PHP_INT_MIN) {
            return new \PHPStan\Type\IntegerType();
        }
        if ($value > PHP_INT_MAX) {
            return new \PHPStan\Type\NeverType();
        }
        return self::fromInterval((int) ceil($value), null);
    }
    public function getMin() : ?int
    {
        return $this->min;
    }
    public function getMax() : ?int
    {
        return $this->max;
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        return sprintf('int<%s, %s>', $this->min ?? 'min', $this->max ?? 'max');
    }
    public function shift(int $amount) : \PHPStan\Type\Type
    {
        if ($amount === 0) {
            return $this;
        }
        $min = $this->min;
        $max = $this->max;
        if ($amount < 0) {
            if ($max !== null) {
                if ($max < PHP_INT_MIN - $amount) {
                    return new \PHPStan\Type\NeverType();
                }
                $max += $amount;
            }
            if ($min !== null) {
                $min = $min < PHP_INT_MIN - $amount ? null : $min + $amount;
            }
        } else {
            if ($min !== null) {
                if ($min > PHP_INT_MAX - $amount) {
                    return new \PHPStan\Type\NeverType();
                }
                $min += $amount;
            }
            if ($max !== null) {
                $max = $max > PHP_INT_MAX - $amount ? null : $max + $amount;
            }
        }
        return self::fromInterval($min, $max);
    }
    public function accepts(\PHPStan\Type\Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(\PHPStan\Type\Type $type, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        if ($type instanceof parent) {
            return new \PHPStan\Type\AcceptsResult($this->isSuperTypeOf($type), []);
        }
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        return \PHPStan\Type\AcceptsResult::createNo();
    }
    public function isSuperTypeOf(\PHPStan\Type\Type $type) : TrinaryLogic
    {
        if ($type instanceof self || $type instanceof ConstantIntegerType) {
            if ($type instanceof self) {
                $typeMin = $type->min;
                $typeMax = $type->max;
            } else {
                $typeMin = $type->getValue();
                $typeMax = $type->getValue();
            }
            if (self::isDisjoint($this->min, $this->max, $typeMin, $typeMax)) {
                return TrinaryLogic::createNo();
            }
            if (($this->min === null || $typeMin !== null && $this->min <= $typeMin) && ($this->max === null || $typeMax !== null && $this->max >= $typeMax)) {
                return TrinaryLogic::createYes();
            }
            return TrinaryLogic::createMaybe();
        }
        if ($type instanceof parent) {
            return TrinaryLogic::createMaybe();
        }
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return $type->isSubTypeOf($this);
        }
        return TrinaryLogic::createNo();
    }
    public function isSubTypeOf(\PHPStan\Type\Type $otherType) : TrinaryLogic
    {
        if ($otherType instanceof parent) {
            return $otherType->isSuperTypeOf($this);
        }
        if ($otherType instanceof \PHPStan\Type\UnionType) {
            return $this->isSubTypeOfUnion($otherType);
        }
        if ($otherType instanceof \PHPStan\Type\IntersectionType) {
            return $otherType->isSuperTypeOf($this);
        }
        return TrinaryLogic::createNo();
    }
    private function isSubTypeOfUnion(\PHPStan\Type\UnionType $otherType) : TrinaryLogic
    {
        if ($this->min !== null && $this->max !== null) {
            $matchingConstantIntegers = array_filter($otherType->getTypes(), function (\PHPStan\Type\Type $type) : bool {
                return $type instanceof ConstantIntegerType && $type->getValue() >= $this->min && $type->getValue() <= $this->max;
            });
            if (count($matchingConstantIntegers) === $this->max - $this->min + 1) {
                return TrinaryLogic::createYes();
            }
        }
        return TrinaryLogic::createNo()->lazyOr($otherType->getTypes(), function (\PHPStan\Type\Type $innerType) {
            return $this->isSubTypeOf($innerType);
        });
    }
    public function isAcceptedBy(\PHPStan\Type\Type $acceptingType, bool $strictTypes) : TrinaryLogic
    {
        return $this->isAcceptedWithReasonBy($acceptingType, $strictTypes)->result;
    }
    public function isAcceptedWithReasonBy(\PHPStan\Type\Type $acceptingType, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        return new \PHPStan\Type\AcceptsResult($this->isSubTypeOf($acceptingType), []);
    }
    public function equals(\PHPStan\Type\Type $type) : bool
    {
        return $type instanceof self && $this->min === $type->min && $this->max === $type->max;
    }
    public function generalize(\PHPStan\Type\GeneralizePrecision $precision) : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\IntegerType();
    }
    public function isSmallerThan(\PHPStan\Type\Type $otherType) : TrinaryLogic
    {
        if ($this->min === null) {
            $minIsSmaller = TrinaryLogic::createYes();
        } else {
            $minIsSmaller = (new ConstantIntegerType($this->min))->isSmallerThan($otherType);
        }
        if ($this->max === null) {
            $maxIsSmaller = TrinaryLogic::createNo();
        } else {
            $maxIsSmaller = (new ConstantIntegerType($this->max))->isSmallerThan($otherType);
        }
        return TrinaryLogic::extremeIdentity($minIsSmaller, $maxIsSmaller);
    }
    public function isSmallerThanOrEqual(\PHPStan\Type\Type $otherType) : TrinaryLogic
    {
        if ($this->min === null) {
            $minIsSmaller = TrinaryLogic::createYes();
        } else {
            $minIsSmaller = (new ConstantIntegerType($this->min))->isSmallerThanOrEqual($otherType);
        }
        if ($this->max === null) {
            $maxIsSmaller = TrinaryLogic::createNo();
        } else {
            $maxIsSmaller = (new ConstantIntegerType($this->max))->isSmallerThanOrEqual($otherType);
        }
        return TrinaryLogic::extremeIdentity($minIsSmaller, $maxIsSmaller);
    }
    public function isGreaterThan(\PHPStan\Type\Type $otherType) : TrinaryLogic
    {
        if ($this->min === null) {
            $minIsSmaller = TrinaryLogic::createNo();
        } else {
            $minIsSmaller = $otherType->isSmallerThan(new ConstantIntegerType($this->min));
        }
        if ($this->max === null) {
            $maxIsSmaller = TrinaryLogic::createYes();
        } else {
            $maxIsSmaller = $otherType->isSmallerThan(new ConstantIntegerType($this->max));
        }
        return TrinaryLogic::extremeIdentity($minIsSmaller, $maxIsSmaller);
    }
    public function isGreaterThanOrEqual(\PHPStan\Type\Type $otherType) : TrinaryLogic
    {
        if ($this->min === null) {
            $minIsSmaller = TrinaryLogic::createNo();
        } else {
            $minIsSmaller = $otherType->isSmallerThanOrEqual(new ConstantIntegerType($this->min));
        }
        if ($this->max === null) {
            $maxIsSmaller = TrinaryLogic::createYes();
        } else {
            $maxIsSmaller = $otherType->isSmallerThanOrEqual(new ConstantIntegerType($this->max));
        }
        return TrinaryLogic::extremeIdentity($minIsSmaller, $maxIsSmaller);
    }
    public function getSmallerType() : \PHPStan\Type\Type
    {
        $subtractedTypes = [new ConstantBooleanType(\true)];
        if ($this->max !== null) {
            $subtractedTypes[] = self::createAllGreaterThanOrEqualTo($this->max);
        }
        return \PHPStan\Type\TypeCombinator::remove(new \PHPStan\Type\MixedType(), \PHPStan\Type\TypeCombinator::union(...$subtractedTypes));
    }
    public function getSmallerOrEqualType() : \PHPStan\Type\Type
    {
        $subtractedTypes = [];
        if ($this->max !== null) {
            $subtractedTypes[] = self::createAllGreaterThan($this->max);
        }
        return \PHPStan\Type\TypeCombinator::remove(new \PHPStan\Type\MixedType(), \PHPStan\Type\TypeCombinator::union(...$subtractedTypes));
    }
    public function getGreaterType() : \PHPStan\Type\Type
    {
        $subtractedTypes = [new \PHPStan\Type\NullType(), new ConstantBooleanType(\false)];
        if ($this->min !== null) {
            $subtractedTypes[] = self::createAllSmallerThanOrEqualTo($this->min);
        }
        if ($this->min !== null && $this->min > 0 || $this->max !== null && $this->max < 0) {
            $subtractedTypes[] = new ConstantBooleanType(\true);
        }
        return \PHPStan\Type\TypeCombinator::remove(new \PHPStan\Type\MixedType(), \PHPStan\Type\TypeCombinator::union(...$subtractedTypes));
    }
    public function getGreaterOrEqualType() : \PHPStan\Type\Type
    {
        $subtractedTypes = [];
        if ($this->min !== null) {
            $subtractedTypes[] = self::createAllSmallerThan($this->min);
        }
        if ($this->min !== null && $this->min > 0 || $this->max !== null && $this->max < 0) {
            $subtractedTypes[] = new \PHPStan\Type\NullType();
            $subtractedTypes[] = new ConstantBooleanType(\false);
        }
        return \PHPStan\Type\TypeCombinator::remove(new \PHPStan\Type\MixedType(), \PHPStan\Type\TypeCombinator::union(...$subtractedTypes));
    }
    public function toBoolean() : \PHPStan\Type\BooleanType
    {
        $isZero = (new ConstantIntegerType(0))->isSuperTypeOf($this);
        if ($isZero->no()) {
            return new ConstantBooleanType(\true);
        }
        if ($isZero->maybe()) {
            return new \PHPStan\Type\BooleanType();
        }
        return new ConstantBooleanType(\false);
    }
    /**
     * Return the union with another type, but only if it can be expressed in a simpler way than using UnionType
     *
     */
    public function tryUnion(\PHPStan\Type\Type $otherType) : ?\PHPStan\Type\Type
    {
        if ($otherType instanceof self || $otherType instanceof ConstantIntegerType) {
            if ($otherType instanceof self) {
                $otherMin = $otherType->min;
                $otherMax = $otherType->max;
            } else {
                $otherMin = $otherType->getValue();
                $otherMax = $otherType->getValue();
            }
            if (self::isDisjoint($this->min, $this->max, $otherMin, $otherMax, \false)) {
                return null;
            }
            return self::fromInterval($this->min !== null && $otherMin !== null ? min($this->min, $otherMin) : null, $this->max !== null && $otherMax !== null ? max($this->max, $otherMax) : null);
        }
        if (get_class($otherType) === parent::class) {
            return $otherType;
        }
        return null;
    }
    /**
     * Return the intersection with another type, but only if it can be expressed in a simpler way than using
     * IntersectionType
     *
     */
    public function tryIntersect(\PHPStan\Type\Type $otherType) : ?\PHPStan\Type\Type
    {
        if ($otherType instanceof self || $otherType instanceof ConstantIntegerType) {
            if ($otherType instanceof self) {
                $otherMin = $otherType->min;
                $otherMax = $otherType->max;
            } else {
                $otherMin = $otherType->getValue();
                $otherMax = $otherType->getValue();
            }
            if (self::isDisjoint($this->min, $this->max, $otherMin, $otherMax, \false)) {
                return new \PHPStan\Type\NeverType();
            }
            if ($this->min === null) {
                $newMin = $otherMin;
            } elseif ($otherMin === null) {
                $newMin = $this->min;
            } else {
                $newMin = max($this->min, $otherMin);
            }
            if ($this->max === null) {
                $newMax = $otherMax;
            } elseif ($otherMax === null) {
                $newMax = $this->max;
            } else {
                $newMax = min($this->max, $otherMax);
            }
            return self::fromInterval($newMin, $newMax);
        }
        if (get_class($otherType) === parent::class) {
            return $this;
        }
        return null;
    }
    /**
     * Return the different with another type, or null if it cannot be represented.
     *
     */
    public function tryRemove(\PHPStan\Type\Type $typeToRemove) : ?\PHPStan\Type\Type
    {
        if (get_class($typeToRemove) === parent::class) {
            return new \PHPStan\Type\NeverType();
        }
        if ($typeToRemove instanceof self || $typeToRemove instanceof ConstantIntegerType) {
            if ($typeToRemove instanceof self) {
                $removeMin = $typeToRemove->min;
                $removeMax = $typeToRemove->max;
            } else {
                $removeMin = $typeToRemove->getValue();
                $removeMax = $typeToRemove->getValue();
            }
            if ($this->min !== null && $removeMax !== null && $removeMax < $this->min || $this->max !== null && $removeMin !== null && $this->max < $removeMin) {
                return $this;
            }
            if ($removeMin !== null && $removeMin !== PHP_INT_MIN) {
                $lowerPart = self::fromInterval($this->min, $removeMin - 1);
            } else {
                $lowerPart = null;
            }
            if ($removeMax !== null && $removeMax !== PHP_INT_MAX) {
                $upperPart = self::fromInterval($removeMax + 1, $this->max);
            } else {
                $upperPart = null;
            }
            if ($lowerPart !== null && $upperPart !== null) {
                return \PHPStan\Type\TypeCombinator::union($lowerPart, $upperPart);
            }
            return $lowerPart ?? $upperPart;
        }
        return null;
    }
    public function exponentiate(\PHPStan\Type\Type $exponent) : \PHPStan\Type\Type
    {
        if ($exponent instanceof \PHPStan\Type\UnionType) {
            $results = [];
            foreach ($exponent->getTypes() as $unionType) {
                $results[] = $this->exponentiate($unionType);
            }
            return \PHPStan\Type\TypeCombinator::union(...$results);
        }
        if ($exponent instanceof \PHPStan\Type\IntegerRangeType) {
            $min = null;
            $max = null;
            if ($this->getMin() !== null && $exponent->getMin() !== null) {
                $min = $this->getMin() ** $exponent->getMin();
            }
            if ($this->getMax() !== null && $exponent->getMax() !== null) {
                $max = $this->getMax() ** $exponent->getMax();
            }
            if (($min !== null || $max !== null) && !is_float($min) && !is_float($max)) {
                return self::fromInterval($min, $max);
            }
        }
        if ($exponent instanceof \PHPStan\Type\ConstantScalarType) {
            $exponentValue = $exponent->getValue();
            if (is_int($exponentValue)) {
                $min = null;
                $max = null;
                if ($this->getMin() !== null) {
                    $min = $this->getMin() ** $exponentValue;
                }
                if ($this->getMax() !== null) {
                    $max = $this->getMax() ** $exponentValue;
                }
                if (!is_float($min) && !is_float($max)) {
                    return self::fromInterval($min, $max);
                }
            }
        }
        return parent::exponentiate($exponent);
    }
    public function toPhpDocNode() : TypeNode
    {
        if ($this->min === null) {
            $min = new IdentifierTypeNode('min');
        } else {
            $min = new ConstTypeNode(new ConstExprIntegerNode((string) $this->min));
        }
        if ($this->max === null) {
            $max = new IdentifierTypeNode('max');
        } else {
            $max = new ConstTypeNode(new ConstExprIntegerNode((string) $this->max));
        }
        return new GenericTypeNode(new IdentifierTypeNode('int'), [$min, $max]);
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self($properties['min'], $properties['max']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use DateTime;
use DateTimeImmutable;
use DateTimeInterface;
use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\PhpDocParser\Ast\Type\UnionTypeNode;
use PHPStan\Reflection\ClassMemberAccessAnswerer;
use PHPStan\Reflection\ConstantReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Reflection\Type\UnionTypeUnresolvedMethodPrototypeReflection;
use PHPStan\Reflection\Type\UnionTypeUnresolvedPropertyPrototypeReflection;
use PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection;
use PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Generic\GenericClassStringType;
use PHPStan\Type\Generic\TemplateMixedType;
use PHPStan\Type\Generic\TemplateType;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\Generic\TemplateTypeVariance;
use PHPStan\Type\Generic\TemplateUnionType;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use function array_map;
use function array_unique;
use function array_values;
use function count;
use function implode;
use function sprintf;
use function strpos;
/** @api */
class UnionType implements \PHPStan\Type\CompoundType
{
    use NonGeneralizableTypeTrait;
    /**
     * @var bool
     */
    private $sortedTypes = \false;
    /** @var array<int, string> */
    private $cachedDescriptions = [];
    /**
     * @var Type[]
     */
    private $types;
    /**
     * @var bool
     */
    private $normalized = \false;
    /**
     * @api
     * @param Type[] $types
     */
    public function __construct(array $types, bool $normalized = \false)
    {
        $this->types = $types;
        $this->normalized = $normalized;
        $throwException = static function () use($types) : void {
            throw new ShouldNotHappenException(sprintf('Cannot create %s with: %s', self::class, implode(', ', array_map(static function (\PHPStan\Type\Type $type) : string {
                return $type->describe(\PHPStan\Type\VerbosityLevel::value());
            }, $types))));
        };
        if (count($types) < 2) {
            $throwException();
        }
        foreach ($types as $type) {
            if (!$type instanceof \PHPStan\Type\UnionType) {
                continue;
            }
            if ($type instanceof TemplateType) {
                continue;
            }
            $throwException();
        }
    }
    /**
     * @return Type[]
     */
    public function getTypes() : array
    {
        return $this->types;
    }
    public function isNormalized() : bool
    {
        return $this->normalized;
    }
    /**
     * @return Type[]
     */
    protected function getSortedTypes() : array
    {
        if ($this->sortedTypes) {
            return $this->types;
        }
        $this->types = \PHPStan\Type\UnionTypeHelper::sortTypes($this->types);
        $this->sortedTypes = \true;
        return $this->types;
    }
    /**
     * @return string[]
     */
    public function getReferencedClasses() : array
    {
        $classes = [];
        foreach ($this->types as $type) {
            foreach ($type->getReferencedClasses() as $className) {
                $classes[] = $className;
            }
        }
        return $classes;
    }
    public function getObjectClassNames() : array
    {
        return array_values(array_unique($this->pickFromTypes(static function (\PHPStan\Type\Type $type) {
            return $type->getObjectClassNames();
        })));
    }
    public function getObjectClassReflections() : array
    {
        return $this->pickFromTypes(static function (\PHPStan\Type\Type $type) {
            return $type->getObjectClassReflections();
        });
    }
    public function getArrays() : array
    {
        return $this->pickFromTypes(static function (\PHPStan\Type\Type $type) {
            return $type->getArrays();
        });
    }
    public function getConstantArrays() : array
    {
        return $this->pickFromTypes(static function (\PHPStan\Type\Type $type) {
            return $type->getConstantArrays();
        });
    }
    public function getConstantStrings() : array
    {
        return $this->pickFromTypes(static function (\PHPStan\Type\Type $type) {
            return $type->getConstantStrings();
        });
    }
    public function accepts(\PHPStan\Type\Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(\PHPStan\Type\Type $type, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        if ($type->equals(new \PHPStan\Type\ObjectType(DateTimeInterface::class)) && $this->accepts(new \PHPStan\Type\UnionType([new \PHPStan\Type\ObjectType(DateTime::class), new \PHPStan\Type\ObjectType(DateTimeImmutable::class)]), $strictTypes)->yes()) {
            return \PHPStan\Type\AcceptsResult::createYes();
        }
        if ($type instanceof \PHPStan\Type\CompoundType && !$type instanceof \PHPStan\Type\CallableType && !$type instanceof TemplateType && !$type instanceof \PHPStan\Type\IntersectionType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        $result = \PHPStan\Type\AcceptsResult::createNo();
        foreach ($this->getSortedTypes() as $i => $innerType) {
            $result = $result->or($innerType->acceptsWithReason($type, $strictTypes)->decorateReasons(static function (string $reason) use($i) {
                return sprintf('Type #%d from the union: %s', $i + 1, $reason);
            }));
        }
        if ($result->yes()) {
            return $result;
        }
        if ($type instanceof TemplateUnionType) {
            return $result->or($type->isAcceptedWithReasonBy($this, $strictTypes));
        }
        return $result;
    }
    public function isSuperTypeOf(\PHPStan\Type\Type $otherType) : TrinaryLogic
    {
        if ($otherType instanceof self && !$otherType instanceof TemplateUnionType || $otherType instanceof \PHPStan\Type\IterableType || $otherType instanceof \PHPStan\Type\NeverType || $otherType instanceof \PHPStan\Type\ConditionalType || $otherType instanceof \PHPStan\Type\ConditionalTypeForParameter || $otherType instanceof \PHPStan\Type\IntegerRangeType) {
            return $otherType->isSubTypeOf($this);
        }
        $result = TrinaryLogic::createNo()->lazyOr($this->getTypes(), static function (\PHPStan\Type\Type $innerType) use($otherType) {
            return $innerType->isSuperTypeOf($otherType);
        });
        if ($result->yes()) {
            return $result;
        }
        if ($otherType instanceof TemplateUnionType) {
            return $result->or($otherType->isSubTypeOf($this));
        }
        return $result;
    }
    public function isSubTypeOf(\PHPStan\Type\Type $otherType) : TrinaryLogic
    {
        return TrinaryLogic::lazyExtremeIdentity($this->getTypes(), static function (\PHPStan\Type\Type $innerType) use($otherType) {
            return $otherType->isSuperTypeOf($innerType);
        });
    }
    public function isAcceptedBy(\PHPStan\Type\Type $acceptingType, bool $strictTypes) : TrinaryLogic
    {
        return $this->isAcceptedWithReasonBy($acceptingType, $strictTypes)->result;
    }
    public function isAcceptedWithReasonBy(\PHPStan\Type\Type $acceptingType, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        return \PHPStan\Type\AcceptsResult::extremeIdentity(...array_map(static function (\PHPStan\Type\Type $innerType) use($acceptingType, $strictTypes) {
            return $acceptingType->acceptsWithReason($innerType, $strictTypes);
        }, $this->types));
    }
    public function equals(\PHPStan\Type\Type $type) : bool
    {
        if (!$type instanceof static) {
            return \false;
        }
        if (count($this->types) !== count($type->types)) {
            return \false;
        }
        $otherTypes = $type->types;
        foreach ($this->types as $innerType) {
            $match = \false;
            foreach ($otherTypes as $i => $otherType) {
                if (!$innerType->equals($otherType)) {
                    continue;
                }
                $match = \true;
                unset($otherTypes[$i]);
                break;
            }
            if (!$match) {
                return \false;
            }
        }
        return count($otherTypes) === 0;
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        if (isset($this->cachedDescriptions[$level->getLevelValue()])) {
            return $this->cachedDescriptions[$level->getLevelValue()];
        }
        $joinTypes = static function (array $types) use($level) : string {
            $typeNames = [];
            foreach ($types as $i => $type) {
                if ($type instanceof \PHPStan\Type\ClosureType || $type instanceof \PHPStan\Type\CallableType || $type instanceof TemplateUnionType) {
                    $typeNames[] = sprintf('(%s)', $type->describe($level));
                } elseif ($type instanceof TemplateType) {
                    $isLast = $i >= count($types) - 1;
                    $bound = $type->getBound();
                    if (!$isLast && ($level->isTypeOnly() || $level->isValue()) && !($bound instanceof \PHPStan\Type\MixedType && $bound->getSubtractedType() === null && !$bound instanceof TemplateMixedType)) {
                        $typeNames[] = sprintf('(%s)', $type->describe($level));
                    } else {
                        $typeNames[] = $type->describe($level);
                    }
                } elseif ($type instanceof \PHPStan\Type\IntersectionType) {
                    $intersectionDescription = $type->describe($level);
                    if (strpos($intersectionDescription, '&') !== \false) {
                        $typeNames[] = sprintf('(%s)', $type->describe($level));
                    } else {
                        $typeNames[] = $intersectionDescription;
                    }
                } else {
                    $typeNames[] = $type->describe($level);
                }
            }
            return implode('|', $typeNames);
        };
        return $this->cachedDescriptions[$level->getLevelValue()] = $level->handle(function () use($joinTypes) : string {
            $types = \PHPStan\Type\TypeCombinator::union(...array_map(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
                if ($type->isConstantValue()->yes() && $type->isTrue()->or($type->isFalse())->no()) {
                    return $type->generalize(\PHPStan\Type\GeneralizePrecision::lessSpecific());
                }
                return $type;
            }, $this->getSortedTypes()));
            if ($types instanceof \PHPStan\Type\UnionType) {
                return $joinTypes($types->getSortedTypes());
            }
            return $joinTypes([$types]);
        }, function () use($joinTypes) : string {
            return $joinTypes($this->getSortedTypes());
        });
    }
    /**
     * @param callable(Type $type): TrinaryLogic $canCallback
     * @param callable(Type $type): TrinaryLogic $hasCallback
     */
    private function hasInternal(callable $canCallback, callable $hasCallback) : TrinaryLogic
    {
        return TrinaryLogic::lazyExtremeIdentity($this->types, static function (\PHPStan\Type\Type $type) use($canCallback, $hasCallback) : TrinaryLogic {
            if ($canCallback($type)->no()) {
                return TrinaryLogic::createNo();
            }
            return $hasCallback($type);
        });
    }
    /**
     * @template TObject of object
     * @param callable(Type $type): TrinaryLogic $hasCallback
     * @param callable(Type $type): TObject $getCallback
     * @return TObject
     */
    private function getInternal(callable $hasCallback, callable $getCallback) : object
    {
        /** @var TrinaryLogic|null $result */
        $result = null;
        /** @var TObject|null $object */
        $object = null;
        foreach ($this->types as $type) {
            $has = $hasCallback($type);
            if (!$has->yes()) {
                continue;
            }
            if ($result !== null && $result->compareTo($has) !== $has) {
                continue;
            }
            $get = $getCallback($type);
            $result = $has;
            $object = $get;
        }
        if ($object === null) {
            throw new ShouldNotHappenException();
        }
        return $object;
    }
    public function getTemplateType(string $ancestorClassName, string $templateTypeName) : \PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) use($ancestorClassName, $templateTypeName) : \PHPStan\Type\Type {
            return $type->getTemplateType($ancestorClassName, $templateTypeName);
        });
    }
    public function isObject() : TrinaryLogic
    {
        return $this->unionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isObject();
        });
    }
    public function isEnum() : TrinaryLogic
    {
        return $this->unionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isEnum();
        });
    }
    public function canAccessProperties() : TrinaryLogic
    {
        return $this->unionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->canAccessProperties();
        });
    }
    public function hasProperty(string $propertyName) : TrinaryLogic
    {
        return $this->unionResults(static function (\PHPStan\Type\Type $type) use($propertyName) : TrinaryLogic {
            return $type->hasProperty($propertyName);
        });
    }
    public function getProperty(string $propertyName, ClassMemberAccessAnswerer $scope) : PropertyReflection
    {
        return $this->getUnresolvedPropertyPrototype($propertyName, $scope)->getTransformedProperty();
    }
    public function getUnresolvedPropertyPrototype(string $propertyName, ClassMemberAccessAnswerer $scope) : UnresolvedPropertyPrototypeReflection
    {
        $propertyPrototypes = [];
        foreach ($this->types as $type) {
            if (!$type->hasProperty($propertyName)->yes()) {
                continue;
            }
            $propertyPrototypes[] = $type->getUnresolvedPropertyPrototype($propertyName, $scope)->withFechedOnType($this);
        }
        $propertiesCount = count($propertyPrototypes);
        if ($propertiesCount === 0) {
            throw new ShouldNotHappenException();
        }
        if ($propertiesCount === 1) {
            return $propertyPrototypes[0];
        }
        return new UnionTypeUnresolvedPropertyPrototypeReflection($propertyName, $propertyPrototypes);
    }
    public function canCallMethods() : TrinaryLogic
    {
        return $this->unionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->canCallMethods();
        });
    }
    public function hasMethod(string $methodName) : TrinaryLogic
    {
        return $this->unionResults(static function (\PHPStan\Type\Type $type) use($methodName) : TrinaryLogic {
            return $type->hasMethod($methodName);
        });
    }
    public function getMethod(string $methodName, ClassMemberAccessAnswerer $scope) : ExtendedMethodReflection
    {
        return $this->getUnresolvedMethodPrototype($methodName, $scope)->getTransformedMethod();
    }
    public function getUnresolvedMethodPrototype(string $methodName, ClassMemberAccessAnswerer $scope) : UnresolvedMethodPrototypeReflection
    {
        $methodPrototypes = [];
        foreach ($this->types as $type) {
            if (!$type->hasMethod($methodName)->yes()) {
                continue;
            }
            $methodPrototypes[] = $type->getUnresolvedMethodPrototype($methodName, $scope)->withCalledOnType($this);
        }
        $methodsCount = count($methodPrototypes);
        if ($methodsCount === 0) {
            throw new ShouldNotHappenException();
        }
        if ($methodsCount === 1) {
            return $methodPrototypes[0];
        }
        return new UnionTypeUnresolvedMethodPrototypeReflection($methodName, $methodPrototypes);
    }
    public function canAccessConstants() : TrinaryLogic
    {
        return $this->unionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->canAccessConstants();
        });
    }
    public function hasConstant(string $constantName) : TrinaryLogic
    {
        return $this->hasInternal(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->canAccessConstants();
        }, static function (\PHPStan\Type\Type $type) use($constantName) : TrinaryLogic {
            return $type->hasConstant($constantName);
        });
    }
    public function getConstant(string $constantName) : ConstantReflection
    {
        return $this->getInternal(static function (\PHPStan\Type\Type $type) use($constantName) : TrinaryLogic {
            return $type->hasConstant($constantName);
        }, static function (\PHPStan\Type\Type $type) use($constantName) : ConstantReflection {
            return $type->getConstant($constantName);
        });
    }
    public function isIterable() : TrinaryLogic
    {
        return $this->unionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isIterable();
        });
    }
    public function isIterableAtLeastOnce() : TrinaryLogic
    {
        return $this->unionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isIterableAtLeastOnce();
        });
    }
    public function getArraySize() : \PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getArraySize();
        });
    }
    public function getIterableKeyType() : \PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getIterableKeyType();
        });
    }
    public function getFirstIterableKeyType() : \PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getFirstIterableKeyType();
        });
    }
    public function getLastIterableKeyType() : \PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getLastIterableKeyType();
        });
    }
    public function getIterableValueType() : \PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getIterableValueType();
        });
    }
    public function getFirstIterableValueType() : \PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getFirstIterableValueType();
        });
    }
    public function getLastIterableValueType() : \PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getLastIterableValueType();
        });
    }
    public function isArray() : TrinaryLogic
    {
        return $this->notBenevolentUnionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isArray();
        });
    }
    public function isConstantArray() : TrinaryLogic
    {
        return $this->notBenevolentUnionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isConstantArray();
        });
    }
    public function isOversizedArray() : TrinaryLogic
    {
        return $this->notBenevolentUnionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isOversizedArray();
        });
    }
    public function isList() : TrinaryLogic
    {
        return $this->notBenevolentUnionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isList();
        });
    }
    public function isString() : TrinaryLogic
    {
        return $this->notBenevolentUnionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isString();
        });
    }
    public function isNumericString() : TrinaryLogic
    {
        return $this->notBenevolentUnionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isNumericString();
        });
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return $this->notBenevolentUnionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isNonEmptyString();
        });
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return $this->notBenevolentUnionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isNonFalsyString();
        });
    }
    public function isLiteralString() : TrinaryLogic
    {
        return $this->notBenevolentUnionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isLiteralString();
        });
    }
    public function isClassStringType() : TrinaryLogic
    {
        return $this->notBenevolentUnionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isClassStringType();
        });
    }
    public function getClassStringObjectType() : \PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getClassStringObjectType();
        });
    }
    public function getObjectTypeOrClassStringObjectType() : \PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getObjectTypeOrClassStringObjectType();
        });
    }
    public function isVoid() : TrinaryLogic
    {
        return $this->unionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isVoid();
        });
    }
    public function isScalar() : TrinaryLogic
    {
        return $this->unionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isScalar();
        });
    }
    public function looseCompare(\PHPStan\Type\Type $type, PhpVersion $phpVersion) : \PHPStan\Type\BooleanType
    {
        return new \PHPStan\Type\BooleanType();
    }
    public function isOffsetAccessible() : TrinaryLogic
    {
        return $this->unionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isOffsetAccessible();
        });
    }
    public function hasOffsetValueType(\PHPStan\Type\Type $offsetType) : TrinaryLogic
    {
        return $this->unionResults(static function (\PHPStan\Type\Type $type) use($offsetType) : TrinaryLogic {
            return $type->hasOffsetValueType($offsetType);
        });
    }
    public function getOffsetValueType(\PHPStan\Type\Type $offsetType) : \PHPStan\Type\Type
    {
        $types = [];
        foreach ($this->types as $innerType) {
            $valueType = $innerType->getOffsetValueType($offsetType);
            if ($valueType instanceof \PHPStan\Type\ErrorType) {
                continue;
            }
            $types[] = $valueType;
        }
        if (count($types) === 0) {
            return new \PHPStan\Type\ErrorType();
        }
        return \PHPStan\Type\TypeCombinator::union(...$types);
    }
    public function setOffsetValueType(?\PHPStan\Type\Type $offsetType, \PHPStan\Type\Type $valueType, bool $unionValues = \true) : \PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) use($offsetType, $valueType, $unionValues) : \PHPStan\Type\Type {
            return $type->setOffsetValueType($offsetType, $valueType, $unionValues);
        });
    }
    public function unsetOffset(\PHPStan\Type\Type $offsetType) : \PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) use($offsetType) : \PHPStan\Type\Type {
            return $type->unsetOffset($offsetType);
        });
    }
    public function getKeysArray() : \PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getKeysArray();
        });
    }
    public function getValuesArray() : \PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getValuesArray();
        });
    }
    public function fillKeysArray(\PHPStan\Type\Type $valueType) : \PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) use($valueType) : \PHPStan\Type\Type {
            return $type->fillKeysArray($valueType);
        });
    }
    public function flipArray() : \PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->flipArray();
        });
    }
    public function intersectKeyArray(\PHPStan\Type\Type $otherArraysType) : \PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) use($otherArraysType) : \PHPStan\Type\Type {
            return $type->intersectKeyArray($otherArraysType);
        });
    }
    public function popArray() : \PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->popArray();
        });
    }
    public function searchArray(\PHPStan\Type\Type $needleType) : \PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) use($needleType) : \PHPStan\Type\Type {
            return $type->searchArray($needleType);
        });
    }
    public function shiftArray() : \PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->shiftArray();
        });
    }
    public function shuffleArray() : \PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->shuffleArray();
        });
    }
    public function getEnumCases() : array
    {
        return $this->pickFromTypes(static function (\PHPStan\Type\Type $type) {
            return $type->getEnumCases();
        });
    }
    public function isCallable() : TrinaryLogic
    {
        return $this->unionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isCallable();
        });
    }
    /**
     * @return ParametersAcceptor[]
     */
    public function getCallableParametersAcceptors(ClassMemberAccessAnswerer $scope) : array
    {
        foreach ($this->types as $type) {
            if ($type->isCallable()->no()) {
                continue;
            }
            return $type->getCallableParametersAcceptors($scope);
        }
        throw new ShouldNotHappenException();
    }
    public function isCloneable() : TrinaryLogic
    {
        return $this->unionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isCloneable();
        });
    }
    public function isSmallerThan(\PHPStan\Type\Type $otherType) : TrinaryLogic
    {
        return $this->notBenevolentUnionResults(static function (\PHPStan\Type\Type $type) use($otherType) : TrinaryLogic {
            return $type->isSmallerThan($otherType);
        });
    }
    public function isSmallerThanOrEqual(\PHPStan\Type\Type $otherType) : TrinaryLogic
    {
        return $this->notBenevolentUnionResults(static function (\PHPStan\Type\Type $type) use($otherType) : TrinaryLogic {
            return $type->isSmallerThanOrEqual($otherType);
        });
    }
    public function isNull() : TrinaryLogic
    {
        return $this->notBenevolentUnionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isNull();
        });
    }
    public function isConstantValue() : TrinaryLogic
    {
        return $this->notBenevolentUnionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isConstantValue();
        });
    }
    public function isConstantScalarValue() : TrinaryLogic
    {
        return $this->notBenevolentUnionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isConstantScalarValue();
        });
    }
    public function getConstantScalarTypes() : array
    {
        return $this->notBenevolentPickFromTypes(static function (\PHPStan\Type\Type $type) {
            return $type->getConstantScalarTypes();
        });
    }
    public function getConstantScalarValues() : array
    {
        return $this->notBenevolentPickFromTypes(static function (\PHPStan\Type\Type $type) {
            return $type->getConstantScalarValues();
        });
    }
    public function isTrue() : TrinaryLogic
    {
        return $this->notBenevolentUnionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isTrue();
        });
    }
    public function isFalse() : TrinaryLogic
    {
        return $this->notBenevolentUnionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isFalse();
        });
    }
    public function isBoolean() : TrinaryLogic
    {
        return $this->notBenevolentUnionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isBoolean();
        });
    }
    public function isFloat() : TrinaryLogic
    {
        return $this->notBenevolentUnionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isFloat();
        });
    }
    public function isInteger() : TrinaryLogic
    {
        return $this->notBenevolentUnionResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isInteger();
        });
    }
    public function getSmallerType() : \PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getSmallerType();
        });
    }
    public function getSmallerOrEqualType() : \PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getSmallerOrEqualType();
        });
    }
    public function getGreaterType() : \PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getGreaterType();
        });
    }
    public function getGreaterOrEqualType() : \PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getGreaterOrEqualType();
        });
    }
    public function isGreaterThan(\PHPStan\Type\Type $otherType) : TrinaryLogic
    {
        return $this->notBenevolentUnionResults(static function (\PHPStan\Type\Type $type) use($otherType) : TrinaryLogic {
            return $otherType->isSmallerThan($type);
        });
    }
    public function isGreaterThanOrEqual(\PHPStan\Type\Type $otherType) : TrinaryLogic
    {
        return $this->notBenevolentUnionResults(static function (\PHPStan\Type\Type $type) use($otherType) : TrinaryLogic {
            return $otherType->isSmallerThanOrEqual($type);
        });
    }
    public function toBoolean() : \PHPStan\Type\BooleanType
    {
        /** @var BooleanType $type */
        $type = $this->unionTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\BooleanType {
            return $type->toBoolean();
        });
        return $type;
    }
    public function toNumber() : \PHPStan\Type\Type
    {
        $type = $this->unionTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->toNumber();
        });
        return $type;
    }
    public function toString() : \PHPStan\Type\Type
    {
        $type = $this->unionTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->toString();
        });
        return $type;
    }
    public function toInteger() : \PHPStan\Type\Type
    {
        $type = $this->unionTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->toInteger();
        });
        return $type;
    }
    public function toFloat() : \PHPStan\Type\Type
    {
        $type = $this->unionTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->toFloat();
        });
        return $type;
    }
    public function toArray() : \PHPStan\Type\Type
    {
        $type = $this->unionTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->toArray();
        });
        return $type;
    }
    public function toArrayKey() : \PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->toArrayKey();
        });
    }
    public function inferTemplateTypes(\PHPStan\Type\Type $receivedType) : TemplateTypeMap
    {
        $types = TemplateTypeMap::createEmpty();
        if ($receivedType instanceof \PHPStan\Type\UnionType) {
            $myTypes = [];
            $remainingReceivedTypes = [];
            foreach ($receivedType->getTypes() as $receivedInnerType) {
                foreach ($this->types as $type) {
                    if ($type->isSuperTypeOf($receivedInnerType)->yes()) {
                        $types = $types->union($type->inferTemplateTypes($receivedInnerType));
                        continue 2;
                    }
                    $myTypes[] = $type;
                }
                $remainingReceivedTypes[] = $receivedInnerType;
            }
            if (count($remainingReceivedTypes) === 0) {
                return $types;
            }
            $receivedType = \PHPStan\Type\TypeCombinator::union(...$remainingReceivedTypes);
        } else {
            $myTypes = $this->types;
        }
        foreach ($myTypes as $type) {
            if ($type instanceof TemplateType || $type instanceof GenericClassStringType && $type->getGenericType() instanceof TemplateType) {
                continue;
            }
            $types = $types->union($type->inferTemplateTypes($receivedType));
        }
        if (!$types->isEmpty()) {
            return $types;
        }
        foreach ($myTypes as $type) {
            $types = $types->union($type->inferTemplateTypes($receivedType));
        }
        return $types;
    }
    public function inferTemplateTypesOn(\PHPStan\Type\Type $templateType) : TemplateTypeMap
    {
        $types = TemplateTypeMap::createEmpty();
        foreach ($this->types as $type) {
            $types = $types->union($templateType->inferTemplateTypes($type));
        }
        return $types;
    }
    public function getReferencedTemplateTypes(TemplateTypeVariance $positionVariance) : array
    {
        $references = [];
        foreach ($this->types as $type) {
            foreach ($type->getReferencedTemplateTypes($positionVariance) as $reference) {
                $references[] = $reference;
            }
        }
        return $references;
    }
    public function traverse(callable $cb) : \PHPStan\Type\Type
    {
        $types = [];
        $changed = \false;
        foreach ($this->types as $type) {
            $newType = $cb($type);
            if ($type !== $newType) {
                $changed = \true;
            }
            $types[] = $newType;
        }
        if ($changed) {
            return \PHPStan\Type\TypeCombinator::union(...$types);
        }
        return $this;
    }
    public function traverseSimultaneously(\PHPStan\Type\Type $right, callable $cb) : \PHPStan\Type\Type
    {
        $types = [];
        $changed = \false;
        if (!$right instanceof self) {
            return $this;
        }
        if (count($this->getTypes()) !== count($right->getTypes())) {
            return $this;
        }
        foreach ($this->getSortedTypes() as $i => $leftType) {
            $rightType = $right->getSortedTypes()[$i];
            $newType = $cb($leftType, $rightType);
            if ($leftType !== $newType) {
                $changed = \true;
            }
            $types[] = $newType;
        }
        if ($changed) {
            return \PHPStan\Type\TypeCombinator::union(...$types);
        }
        return $this;
    }
    public function tryRemove(\PHPStan\Type\Type $typeToRemove) : ?\PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) use($typeToRemove) : \PHPStan\Type\Type {
            return \PHPStan\Type\TypeCombinator::remove($type, $typeToRemove);
        });
    }
    public function exponentiate(\PHPStan\Type\Type $exponent) : \PHPStan\Type\Type
    {
        return $this->unionTypes(static function (\PHPStan\Type\Type $type) use($exponent) : \PHPStan\Type\Type {
            return $type->exponentiate($exponent);
        });
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self($properties['types'], $properties['normalized']);
    }
    /**
     * @param callable(Type $type): TrinaryLogic $getResult
     */
    protected function unionResults(callable $getResult) : TrinaryLogic
    {
        return TrinaryLogic::lazyExtremeIdentity($this->types, $getResult);
    }
    /**
     * @param callable(Type $type): TrinaryLogic $getResult
     */
    private function notBenevolentUnionResults(callable $getResult) : TrinaryLogic
    {
        return TrinaryLogic::lazyExtremeIdentity($this->types, $getResult);
    }
    /**
     * @param callable(Type $type): Type $getType
     */
    protected function unionTypes(callable $getType) : \PHPStan\Type\Type
    {
        return \PHPStan\Type\TypeCombinator::union(...array_map($getType, $this->types));
    }
    /**
     * @template T of Type
     * @param callable(Type $type): list<T> $getTypes
     * @return list<T>
     *
     * @deprecated Use pickFromTypes() instead.
     */
    protected function pickTypes(callable $getTypes) : array
    {
        return $this->pickFromTypes($getTypes);
    }
    /**
     * @template T
     * @param callable(Type $type): list<T> $getValues
     * @return list<T>
     */
    protected function pickFromTypes(callable $getValues) : array
    {
        $values = [];
        foreach ($this->types as $type) {
            $innerValues = $getValues($type);
            if ($innerValues === []) {
                return [];
            }
            foreach ($innerValues as $innerType) {
                $values[] = $innerType;
            }
        }
        return $values;
    }
    public function toPhpDocNode() : TypeNode
    {
        return new UnionTypeNode(array_map(static function (\PHPStan\Type\Type $type) {
            return $type->toPhpDocNode();
        }, $this->getSortedTypes()));
    }
    /**
     * @template T
     * @param callable(Type $type): list<T> $getValues
     * @return list<T>
     */
    private function notBenevolentPickFromTypes(callable $getValues) : array
    {
        $values = [];
        foreach ($this->types as $type) {
            $innerValues = $getValues($type);
            if ($innerValues === []) {
                return [];
            }
            foreach ($innerValues as $innerType) {
                $values[] = $innerType;
            }
        }
        return $values;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPStan\Analyser\SpecifiedTypes;
use PHPStan\Analyser\TypeSpecifierContext;
use PHPStan\Reflection\MethodReflection;
/**
 * This is the interface type-specifying extensions implement for non-static methods.
 *
 * To register it in the configuration file use the `phpstan.typeSpecifier.methodTypeSpecifyingExtension` service tag:
 *
 * ```
 * services:
 * 	-
 *		class: App\PHPStan\MyExtension
 *		tags:
 *			- phpstan.typeSpecifier.methodTypeSpecifyingExtension
 * ```
 *
 * Learn more: https://phpstan.org/developing-extensions/type-specifying-extensions
 *
 * @api
 */
interface MethodTypeSpecifyingExtension
{
    public function getClass() : string;
    public function isMethodSupported(MethodReflection $methodReflection, MethodCall $node, TypeSpecifierContext $context) : bool;
    public function specifyTypes(MethodReflection $methodReflection, MethodCall $node, Scope $scope, TypeSpecifierContext $context) : SpecifiedTypes;
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Traits\NonArrayTypeTrait;
use PHPStan\Type\Traits\NonCallableTypeTrait;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use PHPStan\Type\Traits\NonGenericTypeTrait;
use PHPStan\Type\Traits\NonIterableTypeTrait;
use PHPStan\Type\Traits\NonObjectTypeTrait;
use PHPStan\Type\Traits\NonOffsetAccessibleTypeTrait;
use PHPStan\Type\Traits\NonRemoveableTypeTrait;
use PHPStan\Type\Traits\TruthyBooleanTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonTypeTrait;
/** @api */
class ResourceType implements \PHPStan\Type\Type
{
    use \PHPStan\Type\JustNullableTypeTrait;
    use NonArrayTypeTrait;
    use NonCallableTypeTrait;
    use NonIterableTypeTrait;
    use NonObjectTypeTrait;
    use TruthyBooleanTypeTrait;
    use NonGenericTypeTrait;
    use UndecidedComparisonTypeTrait;
    use NonOffsetAccessibleTypeTrait;
    use NonRemoveableTypeTrait;
    use NonGeneralizableTypeTrait;
    /** @api */
    public function __construct()
    {
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        return 'resource';
    }
    public function getConstantStrings() : array
    {
        return [];
    }
    public function toNumber() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toString() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\StringType();
    }
    public function toInteger() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\IntegerType();
    }
    public function toFloat() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toArray() : \PHPStan\Type\Type
    {
        return new ConstantArrayType([new ConstantIntegerType(0)], [$this], [1], [], \true);
    }
    public function toArrayKey() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function isScalar() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function looseCompare(\PHPStan\Type\Type $type, PhpVersion $phpVersion) : \PHPStan\Type\BooleanType
    {
        return new \PHPStan\Type\BooleanType();
    }
    public function exponentiate(\PHPStan\Type\Type $exponent) : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode('resource');
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use PHPStan\Type\Traits\NonGenericTypeTrait;
use PHPStan\Type\Traits\ObjectTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonTypeTrait;
use function sprintf;
/** @api */
class ObjectWithoutClassType implements \PHPStan\Type\SubtractableType
{
    use ObjectTypeTrait;
    use NonGenericTypeTrait;
    use UndecidedComparisonTypeTrait;
    use NonGeneralizableTypeTrait;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $subtractedType;
    /** @api */
    public function __construct(?\PHPStan\Type\Type $subtractedType = null)
    {
        if ($subtractedType instanceof \PHPStan\Type\NeverType) {
            $subtractedType = null;
        }
        $this->subtractedType = $subtractedType;
    }
    /**
     * @return string[]
     */
    public function getReferencedClasses() : array
    {
        return [];
    }
    public function getObjectClassNames() : array
    {
        return [];
    }
    public function getObjectClassReflections() : array
    {
        return [];
    }
    public function accepts(\PHPStan\Type\Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(\PHPStan\Type\Type $type, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        return \PHPStan\Type\AcceptsResult::createFromBoolean($type instanceof self || $type instanceof \PHPStan\Type\ObjectShapeType || $type->getObjectClassNames() !== []);
    }
    public function isSuperTypeOf(\PHPStan\Type\Type $type) : TrinaryLogic
    {
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return $type->isSubTypeOf($this);
        }
        if ($type instanceof self) {
            if ($this->subtractedType === null) {
                return TrinaryLogic::createYes();
            }
            if ($type->subtractedType !== null) {
                $isSuperType = $type->subtractedType->isSuperTypeOf($this->subtractedType);
                if ($isSuperType->yes()) {
                    return TrinaryLogic::createYes();
                }
            }
            return TrinaryLogic::createMaybe();
        }
        if ($type instanceof \PHPStan\Type\ObjectShapeType) {
            return TrinaryLogic::createYes();
        }
        if ($type->getObjectClassNames() === []) {
            return TrinaryLogic::createNo();
        }
        if ($this->subtractedType === null) {
            return TrinaryLogic::createYes();
        }
        return $this->subtractedType->isSuperTypeOf($type)->negate();
    }
    public function equals(\PHPStan\Type\Type $type) : bool
    {
        if (!$type instanceof self) {
            return \false;
        }
        if ($this->subtractedType === null) {
            if ($type->subtractedType === null) {
                return \true;
            }
            return \false;
        }
        if ($type->subtractedType === null) {
            return \false;
        }
        return $this->subtractedType->equals($type->subtractedType);
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        return $level->handle(static function () : string {
            return 'object';
        }, static function () : string {
            return 'object';
        }, function () use($level) : string {
            $description = 'object';
            if ($this->subtractedType !== null) {
                $description .= sprintf('~%s', $this->subtractedType->describe($level));
            }
            return $description;
        });
    }
    public function getEnumCases() : array
    {
        return [];
    }
    public function subtract(\PHPStan\Type\Type $type) : \PHPStan\Type\Type
    {
        if ($type instanceof self) {
            return new \PHPStan\Type\NeverType();
        }
        if ($this->subtractedType !== null) {
            $type = \PHPStan\Type\TypeCombinator::union($this->subtractedType, $type);
        }
        return new self($type);
    }
    public function getTypeWithoutSubtractedType() : \PHPStan\Type\Type
    {
        return new self();
    }
    public function changeSubtractedType(?\PHPStan\Type\Type $subtractedType) : \PHPStan\Type\Type
    {
        return new self($subtractedType);
    }
    public function getSubtractedType() : ?\PHPStan\Type\Type
    {
        return $this->subtractedType;
    }
    public function traverse(callable $cb) : \PHPStan\Type\Type
    {
        $subtractedType = $this->subtractedType !== null ? $cb($this->subtractedType) : null;
        if ($subtractedType !== $this->subtractedType) {
            return new self($subtractedType);
        }
        return $this;
    }
    public function traverseSimultaneously(\PHPStan\Type\Type $right, callable $cb) : \PHPStan\Type\Type
    {
        if ($this->subtractedType === null) {
            return $this;
        }
        return new self();
    }
    public function tryRemove(\PHPStan\Type\Type $typeToRemove) : ?\PHPStan\Type\Type
    {
        if ($this->isSuperTypeOf($typeToRemove)->yes()) {
            return $this->subtract($typeToRemove);
        }
        return null;
    }
    public function exponentiate(\PHPStan\Type\Type $exponent) : \PHPStan\Type\Type
    {
        if (!$exponent instanceof \PHPStan\Type\NeverType && !$this->isSuperTypeOf($exponent)->no()) {
            return \PHPStan\Type\TypeCombinator::union($this, $exponent);
        }
        return new \PHPStan\Type\BenevolentUnionType([new \PHPStan\Type\FloatType(), new \PHPStan\Type\IntegerType()]);
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode('object');
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self($properties['subtractedType'] ?? null);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantFloatType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
class StaticTypeFactory
{
    public static function falsey() : \PHPStan\Type\Type
    {
        static $falsey;
        if ($falsey === null) {
            $falsey = new \PHPStan\Type\UnionType([new \PHPStan\Type\NullType(), new ConstantBooleanType(\false), new ConstantIntegerType(0), new ConstantFloatType(0.0), new ConstantStringType(''), new ConstantStringType('0'), new ConstantArrayType([], [])]);
        }
        return $falsey;
    }
    public static function truthy() : \PHPStan\Type\Type
    {
        static $truthy;
        if ($truthy === null) {
            $truthy = new \PHPStan\Type\MixedType(\false, self::falsey());
        }
        return $truthy;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Analyser\SpecifiedTypes;
use PHPStan\Analyser\TypeSpecifierContext;
use PHPStan\Reflection\FunctionReflection;
/**
 * This is the interface type-specifying extensions implement for functions.
 *
 * To register it in the configuration file use the `phpstan.typeSpecifier.functionTypeSpecifyingExtension` service tag:
 *
 * ```
 * services:
 * 	-
 *		class: App\PHPStan\MyExtension
 *		tags:
 *			- phpstan.typeSpecifier.functionTypeSpecifyingExtension
 * ```
 *
 * Learn more: https://phpstan.org/developing-extensions/type-specifying-extensions
 *
 * @api
 */
interface FunctionTypeSpecifyingExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection, FuncCall $node, TypeSpecifierContext $context) : bool;
    public function specifyTypes(FunctionReflection $functionReflection, FuncCall $node, Scope $scope, TypeSpecifierContext $context) : SpecifiedTypes;
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PhpParser\Node\Expr\StaticCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
/**
 * This is the interface dynamic throw type extensions implement for static methods.
 *
 * To register it in the configuration file use the `phpstan.dynamicStaticMethodThrowTypeExtension` service tag:
 *
 * ```
 * services:
 * 	-
 *		class: App\PHPStan\MyExtension
 *		tags:
 *			- phpstan.dynamicStaticMethodThrowTypeExtension
 * ```
 *
 * Learn more: https://phpstan.org/developing-extensions/dynamic-throw-type-extensions
 *
 * @api
 */
interface DynamicStaticMethodThrowTypeExtension
{
    public function isStaticMethodSupported(MethodReflection $methodReflection) : bool;
    public function getThrowTypeFromStaticMethodCall(MethodReflection $methodReflection, StaticCall $methodCall, Scope $scope) : ?\PHPStan\Type\Type;
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\Reflection\ClassMemberAccessAnswerer;
use PHPStan\Reflection\ConstantReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection;
use PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Traits\NonArrayTypeTrait;
use PHPStan\Type\Traits\NonCallableTypeTrait;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use PHPStan\Type\Traits\NonGenericTypeTrait;
use PHPStan\Type\Traits\NonIterableTypeTrait;
use PHPStan\Type\Traits\NonOffsetAccessibleTypeTrait;
use PHPStan\Type\Traits\NonRemoveableTypeTrait;
use PHPStan\Type\Traits\TruthyBooleanTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonTypeTrait;
class NonexistentParentClassType implements \PHPStan\Type\Type
{
    use \PHPStan\Type\JustNullableTypeTrait;
    use NonArrayTypeTrait;
    use NonCallableTypeTrait;
    use NonIterableTypeTrait;
    use NonOffsetAccessibleTypeTrait;
    use TruthyBooleanTypeTrait;
    use NonGenericTypeTrait;
    use UndecidedComparisonTypeTrait;
    use NonRemoveableTypeTrait;
    use NonGeneralizableTypeTrait;
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        return 'parent';
    }
    public function getTemplateType(string $ancestorClassName, string $templateTypeName) : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function isObject() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isEnum() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function canAccessProperties() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function hasProperty(string $propertyName) : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getProperty(string $propertyName, ClassMemberAccessAnswerer $scope) : PropertyReflection
    {
        throw new ShouldNotHappenException();
    }
    public function getUnresolvedPropertyPrototype(string $propertyName, ClassMemberAccessAnswerer $scope) : UnresolvedPropertyPrototypeReflection
    {
        throw new ShouldNotHappenException();
    }
    public function canCallMethods() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function hasMethod(string $methodName) : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getMethod(string $methodName, ClassMemberAccessAnswerer $scope) : ExtendedMethodReflection
    {
        throw new ShouldNotHappenException();
    }
    public function getUnresolvedMethodPrototype(string $methodName, ClassMemberAccessAnswerer $scope) : UnresolvedMethodPrototypeReflection
    {
        throw new ShouldNotHappenException();
    }
    public function canAccessConstants() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function hasConstant(string $constantName) : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getConstant(string $constantName) : ConstantReflection
    {
        throw new ShouldNotHappenException();
    }
    public function getConstantStrings() : array
    {
        return [];
    }
    public function isCloneable() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function toNumber() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toString() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toInteger() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toFloat() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toArray() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toArrayKey() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function isScalar() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function looseCompare(\PHPStan\Type\Type $type, PhpVersion $phpVersion) : \PHPStan\Type\BooleanType
    {
        return new \PHPStan\Type\BooleanType();
    }
    public function getEnumCases() : array
    {
        return [];
    }
    public function exponentiate(\PHPStan\Type\Type $exponent) : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode('parent');
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Analyser\OutOfClassScope;
use PHPStan\Broker\Broker;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprStringNode;
use PHPStan\PhpDocParser\Ast\Type\ConstTypeNode;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\ObjectShapeItemNode;
use PHPStan\PhpDocParser\Ast\Type\ObjectShapeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\Reflection\ClassMemberAccessAnswerer;
use PHPStan\Reflection\MissingPropertyFromReflectionException;
use PHPStan\Reflection\Php\UniversalObjectCratesClassReflectionExtension;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Reflection\ReflectionProviderStaticAccessor;
use PHPStan\Reflection\Type\CallbackUnresolvedPropertyPrototypeReflection;
use PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Accessory\HasPropertyType;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\Generic\TemplateTypeVariance;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use PHPStan\Type\Traits\ObjectTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonTypeTrait;
use function array_filter;
use function array_key_exists;
use function array_values;
use function count;
use function implode;
use function in_array;
use function sprintf;
/** @api */
class ObjectShapeType implements \PHPStan\Type\Type
{
    use ObjectTypeTrait;
    use UndecidedComparisonTypeTrait;
    use NonGeneralizableTypeTrait;
    /**
     * @var array<string, Type>
     */
    private $properties;
    /**
     * @var list<string>
     */
    private $optionalProperties;
    /**
     * @api
     * @param array<string, Type> $properties
     * @param list<string> $optionalProperties
     */
    public function __construct(array $properties, array $optionalProperties)
    {
        $this->properties = $properties;
        $this->optionalProperties = $optionalProperties;
    }
    /**
     * @return array<string, Type>
     */
    public function getProperties() : array
    {
        return $this->properties;
    }
    /**
     * @return list<string>
     */
    public function getOptionalProperties() : array
    {
        return $this->optionalProperties;
    }
    public function getReferencedClasses() : array
    {
        $classes = [];
        foreach ($this->properties as $propertyType) {
            foreach ($propertyType->getReferencedClasses() as $referencedClass) {
                $classes[] = $referencedClass;
            }
        }
        return $classes;
    }
    public function getObjectClassNames() : array
    {
        return [];
    }
    public function getObjectClassReflections() : array
    {
        return [];
    }
    public function hasProperty(string $propertyName) : TrinaryLogic
    {
        if (!array_key_exists($propertyName, $this->properties)) {
            return TrinaryLogic::createNo();
        }
        if (in_array($propertyName, $this->optionalProperties, \true)) {
            return TrinaryLogic::createMaybe();
        }
        return TrinaryLogic::createYes();
    }
    public function getProperty(string $propertyName, ClassMemberAccessAnswerer $scope) : PropertyReflection
    {
        return $this->getUnresolvedPropertyPrototype($propertyName, $scope)->getTransformedProperty();
    }
    public function getUnresolvedPropertyPrototype(string $propertyName, ClassMemberAccessAnswerer $scope) : UnresolvedPropertyPrototypeReflection
    {
        if (!array_key_exists($propertyName, $this->properties)) {
            throw new ShouldNotHappenException();
        }
        $property = new \PHPStan\Type\ObjectShapePropertyReflection($this->properties[$propertyName]);
        return new CallbackUnresolvedPropertyPrototypeReflection($property, $property->getDeclaringClass(), \false, static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type;
        });
    }
    public function accepts(\PHPStan\Type\Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(\PHPStan\Type\Type $type, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        $reflectionProvider = ReflectionProviderStaticAccessor::getInstance();
        foreach ($type->getObjectClassReflections() as $classReflection) {
            if (!UniversalObjectCratesClassReflectionExtension::isUniversalObjectCrate($reflectionProvider, Broker::getInstance()->getUniversalObjectCratesClasses(), $classReflection)) {
                continue;
            }
            return \PHPStan\Type\AcceptsResult::createMaybe();
        }
        $result = \PHPStan\Type\AcceptsResult::createYes();
        $scope = new OutOfClassScope();
        foreach ($this->properties as $propertyName => $propertyType) {
            $typeHasProperty = $type->hasProperty($propertyName);
            $hasProperty = new \PHPStan\Type\AcceptsResult($typeHasProperty, $typeHasProperty->yes() ? [] : [sprintf('%s %s have property $%s.', $type->describe(\PHPStan\Type\VerbosityLevel::typeOnly()), $typeHasProperty->no() ? 'does not' : 'might not', $propertyName)]);
            if ($hasProperty->no()) {
                if (in_array($propertyName, $this->optionalProperties, \true)) {
                    continue;
                }
                return $hasProperty;
            }
            if ($hasProperty->maybe() && in_array($propertyName, $this->optionalProperties, \true)) {
                $hasProperty = \PHPStan\Type\AcceptsResult::createYes();
            }
            $result = $result->and($hasProperty);
            try {
                $otherProperty = $type->getProperty($propertyName, $scope);
            } catch (MissingPropertyFromReflectionException $exception) {
                return new \PHPStan\Type\AcceptsResult($result->result, [sprintf('%s %s not have property $%s.', $type->describe(\PHPStan\Type\VerbosityLevel::typeOnly()), $result->no() ? 'does' : 'might', $propertyName)]);
            }
            if (!$otherProperty->isPublic()) {
                return new \PHPStan\Type\AcceptsResult(TrinaryLogic::createNo(), [sprintf('Property %s::$%s is not public.', $otherProperty->getDeclaringClass()->getDisplayName(), $propertyName)]);
            }
            if ($otherProperty->isStatic()) {
                return new \PHPStan\Type\AcceptsResult(TrinaryLogic::createNo(), [sprintf('Property %s::$%s is static.', $otherProperty->getDeclaringClass()->getDisplayName(), $propertyName)]);
            }
            if (!$otherProperty->isReadable()) {
                return new \PHPStan\Type\AcceptsResult(TrinaryLogic::createNo(), [sprintf('Property %s::$%s is not readable.', $otherProperty->getDeclaringClass()->getDisplayName(), $propertyName)]);
            }
            $otherPropertyType = $otherProperty->getReadableType();
            $verbosity = \PHPStan\Type\VerbosityLevel::getRecommendedLevelByType($propertyType, $otherPropertyType);
            $acceptsValue = $propertyType->acceptsWithReason($otherPropertyType, $strictTypes)->decorateReasons(static function (string $reason) use($propertyName, $propertyType, $verbosity, $otherPropertyType) {
                return sprintf('Property ($%s) type %s does not accept type %s: %s', $propertyName, $propertyType->describe($verbosity), $otherPropertyType->describe($verbosity), $reason);
            });
            if (!$acceptsValue->yes() && count($acceptsValue->reasons) === 0) {
                $acceptsValue = new \PHPStan\Type\AcceptsResult($acceptsValue->result, [sprintf('Property ($%s) type %s does not accept type %s.', $propertyName, $propertyType->describe($verbosity), $otherPropertyType->describe($verbosity))]);
            }
            if ($acceptsValue->no()) {
                return $acceptsValue;
            }
            $result = $result->and($acceptsValue);
        }
        return $result->and(new \PHPStan\Type\AcceptsResult($type->isObject(), []));
    }
    public function isSuperTypeOf(\PHPStan\Type\Type $type) : TrinaryLogic
    {
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return $type->isSubTypeOf($this);
        }
        if ($type instanceof \PHPStan\Type\ObjectWithoutClassType) {
            return TrinaryLogic::createMaybe();
        }
        $reflectionProvider = ReflectionProviderStaticAccessor::getInstance();
        foreach ($type->getObjectClassReflections() as $classReflection) {
            if (!UniversalObjectCratesClassReflectionExtension::isUniversalObjectCrate($reflectionProvider, Broker::getInstance()->getUniversalObjectCratesClasses(), $classReflection)) {
                continue;
            }
            return TrinaryLogic::createMaybe();
        }
        $result = TrinaryLogic::createYes();
        $scope = new OutOfClassScope();
        foreach ($this->properties as $propertyName => $propertyType) {
            $hasProperty = $type->hasProperty($propertyName);
            if ($hasProperty->no()) {
                if (in_array($propertyName, $this->optionalProperties, \true)) {
                    continue;
                }
                return $hasProperty;
            }
            if ($hasProperty->maybe() && in_array($propertyName, $this->optionalProperties, \true)) {
                $hasProperty = TrinaryLogic::createYes();
            }
            $result = $result->and($hasProperty);
            try {
                $otherProperty = $type->getProperty($propertyName, $scope);
            } catch (MissingPropertyFromReflectionException $exception) {
                return $result;
            }
            if (!$otherProperty->isPublic()) {
                return TrinaryLogic::createNo();
            }
            if ($otherProperty->isStatic()) {
                return TrinaryLogic::createNo();
            }
            if (!$otherProperty->isReadable()) {
                return TrinaryLogic::createNo();
            }
            $otherPropertyType = $otherProperty->getReadableType();
            $isSuperType = $propertyType->isSuperTypeOf($otherPropertyType);
            if ($isSuperType->no()) {
                return $isSuperType;
            }
            $result = $result->and($isSuperType);
        }
        return $result->and($type->isObject());
    }
    public function equals(\PHPStan\Type\Type $type) : bool
    {
        if (!$type instanceof self) {
            return \false;
        }
        if (count($this->properties) !== count($type->properties)) {
            return \false;
        }
        foreach ($this->properties as $name => $propertyType) {
            if (!array_key_exists($name, $type->properties)) {
                return \false;
            }
            if (!$propertyType->equals($type->properties[$name])) {
                return \false;
            }
        }
        if (count($this->optionalProperties) !== count($type->optionalProperties)) {
            return \false;
        }
        foreach ($this->optionalProperties as $name) {
            if (in_array($name, $type->optionalProperties, \true)) {
                continue;
            }
            return \false;
        }
        return \true;
    }
    public function tryRemove(\PHPStan\Type\Type $typeToRemove) : ?\PHPStan\Type\Type
    {
        if ($typeToRemove instanceof HasPropertyType) {
            $properties = $this->properties;
            unset($properties[$typeToRemove->getPropertyName()]);
            $optionalProperties = array_values(array_filter($this->optionalProperties, static function (string $propertyName) use($typeToRemove) {
                return $propertyName !== $typeToRemove->getPropertyName();
            }));
            return new self($properties, $optionalProperties);
        }
        return null;
    }
    public function makePropertyRequired(string $propertyName) : self
    {
        if (array_key_exists($propertyName, $this->properties)) {
            $optionalProperties = array_values(array_filter($this->optionalProperties, static function (string $currentPropertyName) use($propertyName) {
                return $currentPropertyName !== $propertyName;
            }));
            return new self($this->properties, $optionalProperties);
        }
        return $this;
    }
    public function inferTemplateTypes(\PHPStan\Type\Type $receivedType) : TemplateTypeMap
    {
        if ($receivedType instanceof \PHPStan\Type\UnionType || $receivedType instanceof \PHPStan\Type\IntersectionType) {
            return $receivedType->inferTemplateTypesOn($this);
        }
        if ($receivedType instanceof self) {
            $typeMap = TemplateTypeMap::createEmpty();
            $scope = new OutOfClassScope();
            foreach ($this->properties as $name => $propertyType) {
                if ($receivedType->hasProperty($name)->no()) {
                    continue;
                }
                try {
                    $receivedProperty = $receivedType->getProperty($name, $scope);
                } catch (MissingPropertyFromReflectionException $exception) {
                    continue;
                }
                if (!$receivedProperty->isPublic()) {
                    continue;
                }
                if ($receivedProperty->isStatic()) {
                    continue;
                }
                $receivedPropertyType = $receivedProperty->getReadableType();
                $typeMap = $typeMap->union($propertyType->inferTemplateTypes($receivedPropertyType));
            }
            return $typeMap;
        }
        return TemplateTypeMap::createEmpty();
    }
    public function getReferencedTemplateTypes(TemplateTypeVariance $positionVariance) : array
    {
        $variance = $positionVariance->compose(TemplateTypeVariance::createCovariant());
        $references = [];
        foreach ($this->properties as $propertyType) {
            foreach ($propertyType->getReferencedTemplateTypes($variance) as $reference) {
                $references[] = $reference;
            }
        }
        return $references;
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        $callback = function () use($level) : string {
            $items = [];
            foreach ($this->properties as $name => $propertyType) {
                $optional = in_array($name, $this->optionalProperties, \true);
                $items[] = sprintf('%s%s: %s', $name, $optional ? '?' : '', $propertyType->describe($level));
            }
            return sprintf('object{%s}', implode(', ', $items));
        };
        return $level->handle($callback, $callback);
    }
    public function getEnumCases() : array
    {
        return [];
    }
    public function traverse(callable $cb) : \PHPStan\Type\Type
    {
        $properties = [];
        $stillOriginal = \true;
        foreach ($this->properties as $name => $propertyType) {
            $transformed = $cb($propertyType);
            if ($transformed !== $propertyType) {
                $stillOriginal = \false;
            }
            $properties[$name] = $transformed;
        }
        if ($stillOriginal) {
            return $this;
        }
        return new self($properties, $this->optionalProperties);
    }
    public function traverseSimultaneously(\PHPStan\Type\Type $right, callable $cb) : \PHPStan\Type\Type
    {
        if (!$right->isObject()->yes()) {
            return $this;
        }
        $properties = [];
        $stillOriginal = \true;
        $scope = new OutOfClassScope();
        foreach ($this->properties as $name => $propertyType) {
            if (!$right->hasProperty($name)->yes()) {
                return $this;
            }
            $transformed = $cb($propertyType, $right->getProperty($name, $scope)->getReadableType());
            if ($transformed !== $propertyType) {
                $stillOriginal = \false;
            }
            $properties[$name] = $transformed;
        }
        if ($stillOriginal) {
            return $this;
        }
        return new self($properties, $this->optionalProperties);
    }
    public function exponentiate(\PHPStan\Type\Type $exponent) : \PHPStan\Type\Type
    {
        if (!$exponent instanceof \PHPStan\Type\NeverType && !$this->isSuperTypeOf($exponent)->no()) {
            return \PHPStan\Type\TypeCombinator::union($this, $exponent);
        }
        return new \PHPStan\Type\BenevolentUnionType([new \PHPStan\Type\FloatType(), new \PHPStan\Type\IntegerType()]);
    }
    public function toPhpDocNode() : TypeNode
    {
        $items = [];
        foreach ($this->properties as $name => $type) {
            if (ConstantArrayType::isValidIdentifier($name)) {
                $keyNode = new IdentifierTypeNode($name);
            } else {
                $keyPhpDocNode = (new ConstantStringType($name))->toPhpDocNode();
                if (!$keyPhpDocNode instanceof ConstTypeNode) {
                    continue;
                }
                /** @var ConstExprStringNode $keyNode */
                $keyNode = $keyPhpDocNode->constExpr;
            }
            $items[] = new ObjectShapeItemNode($keyNode, in_array($name, $this->optionalProperties, \true), $type->toPhpDocNode());
        }
        return new ObjectShapeNode($items);
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self($properties['properties'], $properties['optionalProperties']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\Reflection\ClassMemberAccessAnswerer;
use PHPStan\Reflection\ConstantReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection;
use PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Generic\TemplateMixedType;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\Generic\TemplateTypeVariance;
use PHPStan\Type\Traits\NonArrayTypeTrait;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use PHPStan\Type\Traits\NonIterableTypeTrait;
use PHPStan\Type\Traits\NonRemoveableTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
class StrictMixedType implements \PHPStan\Type\CompoundType
{
    use UndecidedComparisonCompoundTypeTrait;
    use NonArrayTypeTrait;
    use NonIterableTypeTrait;
    use NonRemoveableTypeTrait;
    use NonGeneralizableTypeTrait;
    public function getReferencedClasses() : array
    {
        return [];
    }
    public function getObjectClassNames() : array
    {
        return [];
    }
    public function getObjectClassReflections() : array
    {
        return [];
    }
    public function getConstantStrings() : array
    {
        return [];
    }
    public function accepts(\PHPStan\Type\Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(\PHPStan\Type\Type $type, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        return \PHPStan\Type\AcceptsResult::createYes();
    }
    public function isAcceptedBy(\PHPStan\Type\Type $acceptingType, bool $strictTypes) : TrinaryLogic
    {
        return $this->isAcceptedWithReasonBy($acceptingType, $strictTypes)->result;
    }
    public function isAcceptedWithReasonBy(\PHPStan\Type\Type $acceptingType, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        if ($acceptingType instanceof self) {
            return \PHPStan\Type\AcceptsResult::createYes();
        }
        if ($acceptingType instanceof \PHPStan\Type\MixedType && !$acceptingType instanceof TemplateMixedType) {
            return \PHPStan\Type\AcceptsResult::createYes();
        }
        return \PHPStan\Type\AcceptsResult::createMaybe();
    }
    public function isSuperTypeOf(\PHPStan\Type\Type $type) : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isSubTypeOf(\PHPStan\Type\Type $otherType) : TrinaryLogic
    {
        if ($otherType instanceof self) {
            return TrinaryLogic::createYes();
        }
        if ($otherType instanceof \PHPStan\Type\MixedType && !$otherType instanceof TemplateMixedType) {
            return TrinaryLogic::createYes();
        }
        return TrinaryLogic::createMaybe();
    }
    public function equals(\PHPStan\Type\Type $type) : bool
    {
        return $type instanceof self;
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        return $level->handle(static function () {
            return 'mixed';
        }, static function () {
            return 'mixed';
        }, static function () {
            return 'mixed';
        }, static function () {
            return 'strict-mixed';
        });
    }
    public function getTemplateType(string $ancestorClassName, string $templateTypeName) : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function isObject() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isEnum() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function canAccessProperties() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function hasProperty(string $propertyName) : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getProperty(string $propertyName, ClassMemberAccessAnswerer $scope) : PropertyReflection
    {
        throw new ShouldNotHappenException();
    }
    public function getUnresolvedPropertyPrototype(string $propertyName, ClassMemberAccessAnswerer $scope) : UnresolvedPropertyPrototypeReflection
    {
        throw new ShouldNotHappenException();
    }
    public function canCallMethods() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function hasMethod(string $methodName) : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getMethod(string $methodName, ClassMemberAccessAnswerer $scope) : ExtendedMethodReflection
    {
        throw new ShouldNotHappenException();
    }
    public function getUnresolvedMethodPrototype(string $methodName, ClassMemberAccessAnswerer $scope) : UnresolvedMethodPrototypeReflection
    {
        throw new ShouldNotHappenException();
    }
    public function canAccessConstants() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function hasConstant(string $constantName) : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getConstant(string $constantName) : ConstantReflection
    {
        throw new ShouldNotHappenException();
    }
    public function isIterable() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isIterableAtLeastOnce() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getIterableKeyType() : \PHPStan\Type\Type
    {
        return $this;
    }
    public function getIterableValueType() : \PHPStan\Type\Type
    {
        return $this;
    }
    public function isNull() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantScalarValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getConstantScalarTypes() : array
    {
        return [];
    }
    public function getConstantScalarValues() : array
    {
        return [];
    }
    public function isTrue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFalse() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isBoolean() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFloat() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isInteger() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNumericString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isLiteralString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isClassStringType() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getClassStringObjectType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function getObjectTypeOrClassStringObjectType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function isVoid() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isScalar() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function looseCompare(\PHPStan\Type\Type $type, PhpVersion $phpVersion) : \PHPStan\Type\BooleanType
    {
        return new \PHPStan\Type\BooleanType();
    }
    public function isOffsetAccessible() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function hasOffsetValueType(\PHPStan\Type\Type $offsetType) : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getOffsetValueType(\PHPStan\Type\Type $offsetType) : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function setOffsetValueType(?\PHPStan\Type\Type $offsetType, \PHPStan\Type\Type $valueType, bool $unionValues = \true) : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function unsetOffset(\PHPStan\Type\Type $offsetType) : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function isCallable() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getCallableParametersAcceptors(ClassMemberAccessAnswerer $scope) : array
    {
        return [];
    }
    public function isCloneable() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function toBoolean() : \PHPStan\Type\BooleanType
    {
        return new \PHPStan\Type\BooleanType();
    }
    public function toNumber() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toInteger() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toFloat() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toString() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toArray() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toArrayKey() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function inferTemplateTypes(\PHPStan\Type\Type $receivedType) : TemplateTypeMap
    {
        return TemplateTypeMap::createEmpty();
    }
    public function getReferencedTemplateTypes(TemplateTypeVariance $positionVariance) : array
    {
        return [];
    }
    public function getEnumCases() : array
    {
        return [];
    }
    public function traverse(callable $cb) : \PHPStan\Type\Type
    {
        return $this;
    }
    public function traverseSimultaneously(\PHPStan\Type\Type $right, callable $cb) : \PHPStan\Type\Type
    {
        return $this;
    }
    public function exponentiate(\PHPStan\Type\Type $exponent) : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode('mixed');
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use Closure;
use PHPStan\Analyser\OutOfClassScope;
use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\CallableTypeNode;
use PHPStan\PhpDocParser\Ast\Type\CallableTypeParameterNode;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\PhpDocParser\Printer\Printer;
use PHPStan\Reflection\ClassMemberAccessAnswerer;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ConstantReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\Native\NativeParameterReflection;
use PHPStan\Reflection\ParameterReflection;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\Reflection\PassedByReference;
use PHPStan\Reflection\Php\ClosureCallUnresolvedMethodPrototypeReflection;
use PHPStan\Reflection\Php\DummyParameter;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection;
use PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Generic\TemplateType;
use PHPStan\Type\Generic\TemplateTypeHelper;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\Traits\NonArrayTypeTrait;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use PHPStan\Type\Traits\NonGenericTypeTrait;
use PHPStan\Type\Traits\NonIterableTypeTrait;
use PHPStan\Type\Traits\NonOffsetAccessibleTypeTrait;
use PHPStan\Type\Traits\NonRemoveableTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonTypeTrait;
use function array_map;
use function array_merge;
use function count;
/** @api */
class ClosureType implements \PHPStan\Type\TypeWithClassName, ParametersAcceptor
{
    use NonArrayTypeTrait;
    use NonGenericTypeTrait;
    use NonIterableTypeTrait;
    use UndecidedComparisonTypeTrait;
    use NonOffsetAccessibleTypeTrait;
    use NonRemoveableTypeTrait;
    use NonGeneralizableTypeTrait;
    /**
     * @var \PHPStan\Type\ObjectType
     */
    private $objectType;
    /**
     * @var \PHPStan\Type\Generic\TemplateTypeMap
     */
    private $templateTypeMap;
    /**
     * @var \PHPStan\Type\Generic\TemplateTypeMap
     */
    private $resolvedTemplateTypeMap;
    /**
     * @var array<int, ParameterReflection>
     */
    private $parameters;
    /**
     * @var \PHPStan\Type\Type
     */
    private $returnType;
    /**
     * @var bool
     */
    private $variadic;
    /**
     * @api
     * @param array<int, ParameterReflection> $parameters
     */
    public function __construct(array $parameters, \PHPStan\Type\Type $returnType, bool $variadic, ?TemplateTypeMap $templateTypeMap = null, ?TemplateTypeMap $resolvedTemplateTypeMap = null)
    {
        $this->parameters = $parameters;
        $this->returnType = $returnType;
        $this->variadic = $variadic;
        $this->objectType = new \PHPStan\Type\ObjectType(Closure::class);
        $this->templateTypeMap = $templateTypeMap ?? TemplateTypeMap::createEmpty();
        $this->resolvedTemplateTypeMap = $resolvedTemplateTypeMap ?? TemplateTypeMap::createEmpty();
    }
    public function getClassName() : string
    {
        return $this->objectType->getClassName();
    }
    public function getClassReflection() : ?ClassReflection
    {
        return $this->objectType->getClassReflection();
    }
    public function getAncestorWithClassName(string $className) : ?\PHPStan\Type\TypeWithClassName
    {
        return $this->objectType->getAncestorWithClassName($className);
    }
    /**
     * @return string[]
     */
    public function getReferencedClasses() : array
    {
        $classes = $this->objectType->getReferencedClasses();
        foreach ($this->parameters as $parameter) {
            $classes = array_merge($classes, $parameter->getType()->getReferencedClasses());
        }
        return array_merge($classes, $this->returnType->getReferencedClasses());
    }
    public function getObjectClassNames() : array
    {
        return $this->objectType->getObjectClassNames();
    }
    public function getObjectClassReflections() : array
    {
        return $this->objectType->getObjectClassReflections();
    }
    public function accepts(\PHPStan\Type\Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(\PHPStan\Type\Type $type, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        if (!$type instanceof \PHPStan\Type\ClosureType) {
            return $this->objectType->acceptsWithReason($type, $strictTypes);
        }
        return $this->isSuperTypeOfInternal($type, \true);
    }
    public function isSuperTypeOf(\PHPStan\Type\Type $type) : TrinaryLogic
    {
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return $type->isSubTypeOf($this);
        }
        return $this->isSuperTypeOfInternal($type, \false)->result;
    }
    private function isSuperTypeOfInternal(\PHPStan\Type\Type $type, bool $treatMixedAsAny) : \PHPStan\Type\AcceptsResult
    {
        if ($type instanceof self) {
            return \PHPStan\Type\CallableTypeHelper::isParametersAcceptorSuperTypeOf($this, $type, $treatMixedAsAny);
        }
        if ($type->getObjectClassNames() === [Closure::class]) {
            return \PHPStan\Type\AcceptsResult::createMaybe();
        }
        return new \PHPStan\Type\AcceptsResult($this->objectType->isSuperTypeOf($type), []);
    }
    public function equals(\PHPStan\Type\Type $type) : bool
    {
        if (!$type instanceof self) {
            return \false;
        }
        return $this->returnType->equals($type->returnType);
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        return $level->handle(static function () : string {
            return 'Closure';
        }, function () : string {
            $printer = new Printer();
            $selfWithoutParameterNames = new self(array_map(static function (ParameterReflection $p) : ParameterReflection {
                return new DummyParameter('', $p->getType(), $p->isOptional() && !$p->isVariadic(), PassedByReference::createNo(), $p->isVariadic(), $p->getDefaultValue());
            }, $this->parameters), $this->returnType, $this->variadic, $this->templateTypeMap, $this->resolvedTemplateTypeMap);
            return $printer->print($selfWithoutParameterNames->toPhpDocNode());
        });
    }
    public function isObject() : TrinaryLogic
    {
        return $this->objectType->isObject();
    }
    public function isEnum() : TrinaryLogic
    {
        return $this->objectType->isEnum();
    }
    public function getTemplateType(string $ancestorClassName, string $templateTypeName) : \PHPStan\Type\Type
    {
        return $this->objectType->getTemplateType($ancestorClassName, $templateTypeName);
    }
    public function canAccessProperties() : TrinaryLogic
    {
        return $this->objectType->canAccessProperties();
    }
    public function hasProperty(string $propertyName) : TrinaryLogic
    {
        return $this->objectType->hasProperty($propertyName);
    }
    public function getProperty(string $propertyName, ClassMemberAccessAnswerer $scope) : PropertyReflection
    {
        return $this->objectType->getProperty($propertyName, $scope);
    }
    public function getUnresolvedPropertyPrototype(string $propertyName, ClassMemberAccessAnswerer $scope) : UnresolvedPropertyPrototypeReflection
    {
        return $this->objectType->getUnresolvedPropertyPrototype($propertyName, $scope);
    }
    public function canCallMethods() : TrinaryLogic
    {
        return $this->objectType->canCallMethods();
    }
    public function hasMethod(string $methodName) : TrinaryLogic
    {
        return $this->objectType->hasMethod($methodName);
    }
    public function getMethod(string $methodName, ClassMemberAccessAnswerer $scope) : ExtendedMethodReflection
    {
        return $this->getUnresolvedMethodPrototype($methodName, $scope)->getTransformedMethod();
    }
    public function getUnresolvedMethodPrototype(string $methodName, ClassMemberAccessAnswerer $scope) : UnresolvedMethodPrototypeReflection
    {
        if ($methodName === 'call') {
            return new ClosureCallUnresolvedMethodPrototypeReflection($this->objectType->getUnresolvedMethodPrototype($methodName, $scope), $this);
        }
        return $this->objectType->getUnresolvedMethodPrototype($methodName, $scope);
    }
    public function canAccessConstants() : TrinaryLogic
    {
        return $this->objectType->canAccessConstants();
    }
    public function hasConstant(string $constantName) : TrinaryLogic
    {
        return $this->objectType->hasConstant($constantName);
    }
    public function getConstant(string $constantName) : ConstantReflection
    {
        return $this->objectType->getConstant($constantName);
    }
    public function getConstantStrings() : array
    {
        return [];
    }
    public function isIterable() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isIterableAtLeastOnce() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isCallable() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function getEnumCases() : array
    {
        return [];
    }
    /**
     * @return ParametersAcceptor[]
     */
    public function getCallableParametersAcceptors(ClassMemberAccessAnswerer $scope) : array
    {
        return [$this];
    }
    public function isCloneable() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function toBoolean() : \PHPStan\Type\BooleanType
    {
        return new ConstantBooleanType(\true);
    }
    public function toNumber() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toInteger() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toFloat() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toString() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toArray() : \PHPStan\Type\Type
    {
        return new ConstantArrayType([new ConstantIntegerType(0)], [$this], [1], [], \true);
    }
    public function toArrayKey() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function getTemplateTypeMap() : TemplateTypeMap
    {
        return $this->templateTypeMap;
    }
    public function getResolvedTemplateTypeMap() : TemplateTypeMap
    {
        return $this->resolvedTemplateTypeMap;
    }
    /**
     * @return array<int, ParameterReflection>
     */
    public function getParameters() : array
    {
        return $this->parameters;
    }
    public function isVariadic() : bool
    {
        return $this->variadic;
    }
    public function getReturnType() : \PHPStan\Type\Type
    {
        return $this->returnType;
    }
    public function inferTemplateTypes(\PHPStan\Type\Type $receivedType) : TemplateTypeMap
    {
        if ($receivedType instanceof \PHPStan\Type\UnionType || $receivedType instanceof \PHPStan\Type\IntersectionType) {
            return $receivedType->inferTemplateTypesOn($this);
        }
        if ($receivedType->isCallable()->no() || !$receivedType instanceof self) {
            return TemplateTypeMap::createEmpty();
        }
        $parametersAcceptors = $receivedType->getCallableParametersAcceptors(new OutOfClassScope());
        $typeMap = TemplateTypeMap::createEmpty();
        foreach ($parametersAcceptors as $parametersAcceptor) {
            $typeMap = $typeMap->union($this->inferTemplateTypesOnParametersAcceptor($parametersAcceptor));
        }
        return $typeMap;
    }
    private function inferTemplateTypesOnParametersAcceptor(ParametersAcceptor $parametersAcceptor) : TemplateTypeMap
    {
        $typeMap = TemplateTypeMap::createEmpty();
        $args = $parametersAcceptor->getParameters();
        $returnType = $parametersAcceptor->getReturnType();
        foreach ($this->getParameters() as $i => $param) {
            $paramType = $param->getType();
            if (isset($args[$i])) {
                $argType = $args[$i]->getType();
            } elseif ($paramType instanceof TemplateType) {
                $argType = TemplateTypeHelper::resolveToBounds($paramType);
            } else {
                $argType = new \PHPStan\Type\NeverType();
            }
            $typeMap = $typeMap->union($paramType->inferTemplateTypes($argType)->convertToLowerBoundTypes());
        }
        return $typeMap->union($this->getReturnType()->inferTemplateTypes($returnType));
    }
    public function traverse(callable $cb) : \PHPStan\Type\Type
    {
        return new self(array_map(static function (ParameterReflection $param) use($cb) : NativeParameterReflection {
            $defaultValue = $param->getDefaultValue();
            return new NativeParameterReflection($param->getName(), $param->isOptional(), $cb($param->getType()), $param->passedByReference(), $param->isVariadic(), $defaultValue !== null ? $cb($defaultValue) : null);
        }, $this->getParameters()), $cb($this->getReturnType()), $this->isVariadic(), $this->templateTypeMap, $this->resolvedTemplateTypeMap);
    }
    public function traverseSimultaneously(\PHPStan\Type\Type $right, callable $cb) : \PHPStan\Type\Type
    {
        if (!$right instanceof self) {
            return $this;
        }
        $rightParameters = $right->getParameters();
        if (count($this->getParameters()) !== count($rightParameters)) {
            return $this;
        }
        $parameters = [];
        foreach ($this->getParameters() as $i => $leftParam) {
            $rightParam = $rightParameters[$i];
            $leftDefaultValue = $leftParam->getDefaultValue();
            $rightDefaultValue = $rightParam->getDefaultValue();
            $defaultValue = $leftDefaultValue;
            if ($leftDefaultValue !== null && $rightDefaultValue !== null) {
                $defaultValue = $cb($leftDefaultValue, $rightDefaultValue);
            }
            $parameters[] = new NativeParameterReflection($leftParam->getName(), $leftParam->isOptional(), $cb($leftParam->getType(), $rightParam->getType()), $leftParam->passedByReference(), $leftParam->isVariadic(), $defaultValue);
        }
        return new self($parameters, $cb($this->getReturnType(), $right->getReturnType()), $this->isVariadic());
    }
    public function isNull() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantScalarValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getConstantScalarTypes() : array
    {
        return [];
    }
    public function getConstantScalarValues() : array
    {
        return [];
    }
    public function isTrue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFalse() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isBoolean() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFloat() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isInteger() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNumericString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isLiteralString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isClassStringType() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getClassStringObjectType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function getObjectTypeOrClassStringObjectType() : \PHPStan\Type\Type
    {
        return $this;
    }
    public function isVoid() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isScalar() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function looseCompare(\PHPStan\Type\Type $type, PhpVersion $phpVersion) : \PHPStan\Type\BooleanType
    {
        return new \PHPStan\Type\BooleanType();
    }
    public function exponentiate(\PHPStan\Type\Type $exponent) : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toPhpDocNode() : TypeNode
    {
        $parameters = [];
        foreach ($this->parameters as $parameter) {
            $parameters[] = new CallableTypeParameterNode($parameter->getType()->toPhpDocNode(), !$parameter->passedByReference()->no(), $parameter->isVariadic(), $parameter->getName() === '' ? '' : '$' . $parameter->getName(), $parameter->isOptional());
        }
        return new CallableTypeNode(new IdentifierTypeNode('Closure'), $parameters, $this->returnType->toPhpDocNode());
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self($properties['parameters'], $properties['returnType'], $properties['variadic'], $properties['templateTypeMap'], $properties['resolvedTemplateTypeMap']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Analyser\NameScope;
use PHPStan\PhpDoc\TypeNodeResolver;
use PHPStan\PhpDoc\TypeStringResolver;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\ShouldNotHappenException;
use function array_key_exists;
use function sprintf;
class UsefulTypeAliasResolver implements \PHPStan\Type\TypeAliasResolver
{
    /** @var array<string, Type> */
    private $resolvedGlobalTypeAliases = [];
    /** @var array<string, Type> */
    private $resolvedLocalTypeAliases = [];
    /** @var array<string, true> */
    private $resolvingClassTypeAliases = [];
    /** @var array<string, true> */
    private $inProcess = [];
    /**
     * @var array<string, string>
     */
    private $globalTypeAliases;
    /**
     * @var \PHPStan\PhpDoc\TypeStringResolver
     */
    private $typeStringResolver;
    /**
     * @var \PHPStan\PhpDoc\TypeNodeResolver
     */
    private $typeNodeResolver;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @param array<string, string> $globalTypeAliases
     */
    public function __construct(array $globalTypeAliases, TypeStringResolver $typeStringResolver, TypeNodeResolver $typeNodeResolver, ReflectionProvider $reflectionProvider)
    {
        $this->globalTypeAliases = $globalTypeAliases;
        $this->typeStringResolver = $typeStringResolver;
        $this->typeNodeResolver = $typeNodeResolver;
        $this->reflectionProvider = $reflectionProvider;
    }
    public function hasTypeAlias(string $aliasName, ?string $classNameScope) : bool
    {
        $hasGlobalTypeAlias = array_key_exists($aliasName, $this->globalTypeAliases);
        if ($hasGlobalTypeAlias) {
            return \true;
        }
        if ($classNameScope === null || !$this->reflectionProvider->hasClass($classNameScope)) {
            return \false;
        }
        $classReflection = $this->reflectionProvider->getClass($classNameScope);
        $localTypeAliases = $classReflection->getTypeAliases();
        return array_key_exists($aliasName, $localTypeAliases);
    }
    public function resolveTypeAlias(string $aliasName, NameScope $nameScope) : ?\PHPStan\Type\Type
    {
        return $this->resolveLocalTypeAlias($aliasName, $nameScope) ?? $this->resolveGlobalTypeAlias($aliasName, $nameScope);
    }
    private function resolveLocalTypeAlias(string $aliasName, NameScope $nameScope) : ?\PHPStan\Type\Type
    {
        if (array_key_exists($aliasName, $this->globalTypeAliases)) {
            return null;
        }
        if (!$nameScope->hasTypeAlias($aliasName)) {
            return null;
        }
        $className = $nameScope->getClassNameForTypeAlias();
        if ($className === null) {
            return null;
        }
        $aliasNameInClassScope = $className . '::' . $aliasName;
        if (array_key_exists($aliasNameInClassScope, $this->resolvedLocalTypeAliases)) {
            return $this->resolvedLocalTypeAliases[$aliasNameInClassScope];
        }
        // prevent infinite recursion
        if (array_key_exists($className, $this->resolvingClassTypeAliases)) {
            return null;
        }
        $this->resolvingClassTypeAliases[$className] = \true;
        if (!$this->reflectionProvider->hasClass($className)) {
            unset($this->resolvingClassTypeAliases[$className]);
            return null;
        }
        $classReflection = $this->reflectionProvider->getClass($className);
        $localTypeAliases = $classReflection->getTypeAliases();
        unset($this->resolvingClassTypeAliases[$className]);
        if (!array_key_exists($aliasName, $localTypeAliases)) {
            return null;
        }
        if (array_key_exists($aliasNameInClassScope, $this->inProcess)) {
            // resolve circular reference as ErrorType to make it easier to detect
            throw new \PHPStan\Type\CircularTypeAliasDefinitionException();
        }
        $this->inProcess[$aliasNameInClassScope] = \true;
        try {
            $unresolvedAlias = $localTypeAliases[$aliasName];
            $resolvedAliasType = $unresolvedAlias->resolve($this->typeNodeResolver);
        } catch (\PHPStan\Type\CircularTypeAliasDefinitionException $exception) {
            $resolvedAliasType = new \PHPStan\Type\CircularTypeAliasErrorType();
        }
        $this->resolvedLocalTypeAliases[$aliasNameInClassScope] = $resolvedAliasType;
        unset($this->inProcess[$aliasNameInClassScope]);
        return $resolvedAliasType;
    }
    private function resolveGlobalTypeAlias(string $aliasName, NameScope $nameScope) : ?\PHPStan\Type\Type
    {
        if (!array_key_exists($aliasName, $this->globalTypeAliases)) {
            return null;
        }
        if (array_key_exists($aliasName, $this->resolvedGlobalTypeAliases)) {
            return $this->resolvedGlobalTypeAliases[$aliasName];
        }
        if ($this->reflectionProvider->hasClass($nameScope->resolveStringName($aliasName))) {
            throw new ShouldNotHappenException(sprintf('Type alias %s already exists as a class.', $aliasName));
        }
        if (array_key_exists($aliasName, $this->inProcess)) {
            throw new ShouldNotHappenException(sprintf('Circular definition for type alias %s.', $aliasName));
        }
        $this->inProcess[$aliasName] = \true;
        $aliasTypeString = $this->globalTypeAliases[$aliasName];
        $aliasType = $this->typeStringResolver->resolve($aliasTypeString);
        $this->resolvedGlobalTypeAliases[$aliasName] = $aliasType;
        unset($this->inProcess[$aliasName]);
        return $aliasType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Type\Accessory\AccessoryType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantFloatType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use function count;
use function strcasecmp;
use function usort;
use const PHP_INT_MIN;
class UnionTypeHelper
{
    /**
     * @param Type[] $types
     * @return Type[]
     */
    public static function sortTypes(array $types) : array
    {
        if (count($types) > 1024) {
            return $types;
        }
        usort($types, static function (\PHPStan\Type\Type $a, \PHPStan\Type\Type $b) : int {
            if ($a instanceof \PHPStan\Type\NullType) {
                return 1;
            } elseif ($b instanceof \PHPStan\Type\NullType) {
                return -1;
            }
            if ($a instanceof AccessoryType) {
                if ($b instanceof AccessoryType) {
                    return self::compareStrings($a->describe(\PHPStan\Type\VerbosityLevel::value()), $b->describe(\PHPStan\Type\VerbosityLevel::value()));
                }
                return 1;
            }
            if ($b instanceof AccessoryType) {
                return -1;
            }
            $aIsBool = $a instanceof ConstantBooleanType;
            $bIsBool = $b instanceof ConstantBooleanType;
            if ($aIsBool && !$bIsBool) {
                return 1;
            } elseif ($bIsBool && !$aIsBool) {
                return -1;
            }
            if ($a instanceof \PHPStan\Type\ConstantScalarType && !$b instanceof \PHPStan\Type\ConstantScalarType) {
                return -1;
            } elseif (!$a instanceof \PHPStan\Type\ConstantScalarType && $b instanceof \PHPStan\Type\ConstantScalarType) {
                return 1;
            }
            if (($a instanceof ConstantIntegerType || $a instanceof ConstantFloatType) && ($b instanceof ConstantIntegerType || $b instanceof ConstantFloatType)) {
                $cmp = $a->getValue() <=> $b->getValue();
                if ($cmp !== 0) {
                    return $cmp;
                }
                if ($a instanceof ConstantIntegerType && $b instanceof ConstantFloatType) {
                    return -1;
                }
                if ($b instanceof ConstantIntegerType && $a instanceof ConstantFloatType) {
                    return 1;
                }
                return 0;
            }
            if ($a instanceof \PHPStan\Type\IntegerRangeType && $b instanceof \PHPStan\Type\IntegerRangeType) {
                return ($a->getMin() ?? PHP_INT_MIN) <=> ($b->getMin() ?? PHP_INT_MIN);
            }
            if ($a instanceof \PHPStan\Type\IntegerRangeType && $b instanceof \PHPStan\Type\IntegerType) {
                return 1;
            }
            if ($b instanceof \PHPStan\Type\IntegerRangeType && $a instanceof \PHPStan\Type\IntegerType) {
                return -1;
            }
            if ($a instanceof ConstantStringType && $b instanceof ConstantStringType) {
                return self::compareStrings($a->getValue(), $b->getValue());
            }
            if ($a->isConstantArray()->yes() && $b->isConstantArray()->yes()) {
                if ($a->isIterableAtLeastOnce()->no()) {
                    if ($b->isIterableAtLeastOnce()->no()) {
                        return 0;
                    }
                    return -1;
                } elseif ($b->isIterableAtLeastOnce()->no()) {
                    return 1;
                }
                return self::compareStrings($a->describe(\PHPStan\Type\VerbosityLevel::value()), $b->describe(\PHPStan\Type\VerbosityLevel::value()));
            }
            return self::compareStrings($a->describe(\PHPStan\Type\VerbosityLevel::typeOnly()), $b->describe(\PHPStan\Type\VerbosityLevel::typeOnly()));
        });
        return $types;
    }
    private static function compareStrings(string $a, string $b) : int
    {
        $cmp = strcasecmp($a, $b);
        if ($cmp !== 0) {
            return $cmp;
        }
        return $a <=> $b;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\PhpDocParser\Ast\Type\ConditionalTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Generic\TemplateTypeVariance;
use PHPStan\Type\Traits\LateResolvableTypeTrait;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use function array_merge;
use function sprintf;
/** @api */
final class ConditionalType implements \PHPStan\Type\CompoundType, \PHPStan\Type\LateResolvableType
{
    use LateResolvableTypeTrait;
    use NonGeneralizableTypeTrait;
    /**
     * @var \PHPStan\Type\Type
     */
    private $subject;
    /**
     * @var \PHPStan\Type\Type
     */
    private $target;
    /**
     * @var \PHPStan\Type\Type
     */
    private $if;
    /**
     * @var \PHPStan\Type\Type
     */
    private $else;
    /**
     * @var bool
     */
    private $negated;
    public function __construct(\PHPStan\Type\Type $subject, \PHPStan\Type\Type $target, \PHPStan\Type\Type $if, \PHPStan\Type\Type $else, bool $negated)
    {
        $this->subject = $subject;
        $this->target = $target;
        $this->if = $if;
        $this->else = $else;
        $this->negated = $negated;
    }
    public function getSubject() : \PHPStan\Type\Type
    {
        return $this->subject;
    }
    public function getTarget() : \PHPStan\Type\Type
    {
        return $this->target;
    }
    public function getIf() : \PHPStan\Type\Type
    {
        return $this->if;
    }
    public function getElse() : \PHPStan\Type\Type
    {
        return $this->else;
    }
    public function isNegated() : bool
    {
        return $this->negated;
    }
    public function isSuperTypeOf(\PHPStan\Type\Type $type) : TrinaryLogic
    {
        if ($type instanceof self) {
            return $this->if->isSuperTypeOf($type->if)->and($this->else->isSuperTypeOf($type->else));
        }
        return $this->isSuperTypeOfDefault($type);
    }
    public function getReferencedClasses() : array
    {
        return array_merge($this->subject->getReferencedClasses(), $this->target->getReferencedClasses(), $this->if->getReferencedClasses(), $this->else->getReferencedClasses());
    }
    public function getReferencedTemplateTypes(TemplateTypeVariance $positionVariance) : array
    {
        return array_merge($this->subject->getReferencedTemplateTypes($positionVariance), $this->target->getReferencedTemplateTypes($positionVariance), $this->if->getReferencedTemplateTypes($positionVariance), $this->else->getReferencedTemplateTypes($positionVariance));
    }
    public function equals(\PHPStan\Type\Type $type) : bool
    {
        return $type instanceof self && $this->subject->equals($type->subject) && $this->target->equals($type->target) && $this->if->equals($type->if) && $this->else->equals($type->else);
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        return sprintf('(%s %s %s ? %s : %s)', $this->subject->describe($level), $this->negated ? 'is not' : 'is', $this->target->describe($level), $this->if->describe($level), $this->else->describe($level));
    }
    public function isResolvable() : bool
    {
        return !\PHPStan\Type\TypeUtils::containsTemplateType($this->subject) && !\PHPStan\Type\TypeUtils::containsTemplateType($this->target);
    }
    protected function getResult() : \PHPStan\Type\Type
    {
        $isSuperType = $this->target->isSuperTypeOf($this->subject);
        if ($isSuperType->yes()) {
            return !$this->negated ? $this->if : $this->else;
        }
        if ($isSuperType->no()) {
            return !$this->negated ? $this->else : $this->if;
        }
        return \PHPStan\Type\TypeCombinator::union($this->if, $this->else);
    }
    public function traverse(callable $cb) : \PHPStan\Type\Type
    {
        $subject = $cb($this->subject);
        $target = $cb($this->target);
        $if = $cb($this->if);
        $else = $cb($this->else);
        if ($this->subject === $subject && $this->target === $target && $this->if === $if && $this->else === $else) {
            return $this;
        }
        return new self($subject, $target, $if, $else, $this->negated);
    }
    public function traverseSimultaneously(\PHPStan\Type\Type $right, callable $cb) : \PHPStan\Type\Type
    {
        if (!$right instanceof self) {
            return $this;
        }
        $subject = $cb($this->subject, $right->subject);
        $target = $cb($this->target, $right->target);
        $if = $cb($this->if, $right->if);
        $else = $cb($this->else, $right->else);
        if ($this->subject === $subject && $this->target === $target && $this->if === $if && $this->else === $else) {
            return $this;
        }
        return new self($subject, $target, $if, $else, $this->negated);
    }
    public function toPhpDocNode() : TypeNode
    {
        return new ConditionalTypeNode($this->subject->toPhpDocNode(), $this->target->toPhpDocNode(), $this->if->toPhpDocNode(), $this->else->toPhpDocNode(), $this->negated);
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self($properties['subject'], $properties['target'], $properties['if'], $properties['else'], $properties['negated']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Type\Generic\TemplateTypeHelper;
/** @api */
class GenericTypeVariableResolver
{
    /**
     * @deprecated Use Type::getTemplateType() instead.
     */
    public static function getType(\PHPStan\Type\TypeWithClassName $type, string $genericClassName, string $typeVariableName) : ?\PHPStan\Type\Type
    {
        $classReflection = $type->getClassReflection();
        if ($classReflection === null) {
            return null;
        }
        $ancestorClassReflection = $classReflection->getAncestorWithClassName($genericClassName);
        if ($ancestorClassReflection === null) {
            return null;
        }
        $activeTemplateTypeMap = $ancestorClassReflection->getPossiblyIncompleteActiveTemplateTypeMap();
        $type = $activeTemplateTypeMap->getType($typeVariableName);
        if ($type instanceof \PHPStan\Type\ErrorType) {
            $templateTypeMap = $ancestorClassReflection->getTemplateTypeMap();
            $templateType = $templateTypeMap->getType($typeVariableName);
            if ($templateType === null) {
                return $type;
            }
            $bound = TemplateTypeHelper::resolveToBounds($templateType);
            if ($bound instanceof \PHPStan\Type\MixedType && $bound->isExplicitMixed()) {
                return new \PHPStan\Type\MixedType(\false);
            }
            return $bound;
        }
        return $type;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use Closure;
use PhpParser\Comment\Doc;
use PhpParser\Node;
use PHPStan\Analyser\NameScope;
use PHPStan\BetterReflection\Util\GetLastDocComment;
use PHPStan\Broker\AnonymousClassNameHelper;
use PHPStan\File\FileHelper;
use PHPStan\Parser\Parser;
use PHPStan\PhpDoc\PhpDocNodeResolver;
use PHPStan\PhpDoc\PhpDocStringResolver;
use PHPStan\PhpDoc\ResolvedPhpDocBlock;
use PHPStan\PhpDoc\Tag\TemplateTag;
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode;
use PHPStan\Reflection\ReflectionProvider\ReflectionProviderProvider;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Generic\GenericObjectType;
use PHPStan\Type\Generic\TemplateTypeFactory;
use PHPStan\Type\Generic\TemplateTypeHelper;
use PHPStan\Type\Generic\TemplateTypeMap;
use function array_key_exists;
use function array_keys;
use function array_map;
use function array_merge;
use function array_pop;
use function array_slice;
use function count;
use function is_array;
use function is_callable;
use function is_file;
use function ltrim;
use function md5;
use function sprintf;
use function strpos;
use function strtolower;
class FileTypeMapper
{
    private const SKIP_NODE = 1;
    private const POP_TYPE_MAP_STACK = 2;
    /** @var NameScope[][] */
    private $memoryCache = [];
    /**
     * @var int
     */
    private $memoryCacheCount = 0;
    /** @var (false|callable(): NameScope|NameScope)[][] */
    private $inProcess = [];
    /** @var array<string, ResolvedPhpDocBlock> */
    private $resolvedPhpDocBlockCache = [];
    /**
     * @var int
     */
    private $resolvedPhpDocBlockCacheCount = 0;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider\ReflectionProviderProvider
     */
    private $reflectionProviderProvider;
    /**
     * @var \PHPStan\Parser\Parser
     */
    private $phpParser;
    /**
     * @var \PHPStan\PhpDoc\PhpDocStringResolver
     */
    private $phpDocStringResolver;
    /**
     * @var \PHPStan\PhpDoc\PhpDocNodeResolver
     */
    private $phpDocNodeResolver;
    /**
     * @var \PHPStan\Broker\AnonymousClassNameHelper
     */
    private $anonymousClassNameHelper;
    /**
     * @var \PHPStan\File\FileHelper
     */
    private $fileHelper;
    public function __construct(ReflectionProviderProvider $reflectionProviderProvider, Parser $phpParser, PhpDocStringResolver $phpDocStringResolver, PhpDocNodeResolver $phpDocNodeResolver, AnonymousClassNameHelper $anonymousClassNameHelper, FileHelper $fileHelper)
    {
        $this->reflectionProviderProvider = $reflectionProviderProvider;
        $this->phpParser = $phpParser;
        $this->phpDocStringResolver = $phpDocStringResolver;
        $this->phpDocNodeResolver = $phpDocNodeResolver;
        $this->anonymousClassNameHelper = $anonymousClassNameHelper;
        $this->fileHelper = $fileHelper;
    }
    /** @api */
    public function getResolvedPhpDoc(?string $fileName, ?string $className, ?string $traitName, ?string $functionName, string $docComment) : ResolvedPhpDocBlock
    {
        if ($className === null && $traitName !== null) {
            throw new ShouldNotHappenException();
        }
        if ($docComment === '') {
            return ResolvedPhpDocBlock::createEmpty();
        }
        if ($fileName !== null) {
            $fileName = $this->fileHelper->normalizePath($fileName);
        }
        $nameScopeKey = $this->getNameScopeKey($fileName, $className, $traitName, $functionName);
        $phpDocKey = md5(sprintf('%s-%s', $nameScopeKey, $docComment));
        if (isset($this->resolvedPhpDocBlockCache[$phpDocKey])) {
            return $this->resolvedPhpDocBlockCache[$phpDocKey];
        }
        if ($fileName === null) {
            return $this->createResolvedPhpDocBlock($phpDocKey, new NameScope(null, []), $docComment, null);
        }
        $nameScopeMap = [];
        if (!isset($this->inProcess[$fileName])) {
            $nameScopeMap = $this->getNameScopeMap($fileName);
        }
        if (isset($nameScopeMap[$nameScopeKey])) {
            return $this->createResolvedPhpDocBlock($phpDocKey, $nameScopeMap[$nameScopeKey], $docComment, $fileName);
        }
        if (!isset($this->inProcess[$fileName][$nameScopeKey])) {
            // wrong $fileName due to traits
            return ResolvedPhpDocBlock::createEmpty();
        }
        if ($this->inProcess[$fileName][$nameScopeKey] === \false) {
            // PHPDoc has cyclic dependency
            return ResolvedPhpDocBlock::createEmpty();
        }
        if (is_callable($this->inProcess[$fileName][$nameScopeKey])) {
            $resolveCallback = $this->inProcess[$fileName][$nameScopeKey];
            $this->inProcess[$fileName][$nameScopeKey] = \false;
            $this->inProcess[$fileName][$nameScopeKey] = $resolveCallback();
        }
        return $this->createResolvedPhpDocBlock($phpDocKey, $this->inProcess[$fileName][$nameScopeKey], $docComment, $fileName);
    }
    private function createResolvedPhpDocBlock(string $phpDocKey, NameScope $nameScope, string $phpDocString, ?string $fileName) : ResolvedPhpDocBlock
    {
        $phpDocNode = $this->resolvePhpDocStringToDocNode($phpDocString);
        if ($this->resolvedPhpDocBlockCacheCount >= 2048) {
            $this->resolvedPhpDocBlockCache = array_slice($this->resolvedPhpDocBlockCache, 1, null, \true);
            $this->resolvedPhpDocBlockCacheCount--;
        }
        $templateTypeMap = $nameScope->getTemplateTypeMap();
        $phpDocTemplateTypes = [];
        $templateTags = $this->phpDocNodeResolver->resolveTemplateTags($phpDocNode, $nameScope);
        foreach (array_keys($templateTags) as $name) {
            $templateType = $templateTypeMap->getType($name);
            if ($templateType === null) {
                continue;
            }
            $phpDocTemplateTypes[$name] = $templateType;
        }
        $this->resolvedPhpDocBlockCache[$phpDocKey] = ResolvedPhpDocBlock::create($phpDocNode, $phpDocString, $fileName, $nameScope, new TemplateTypeMap($phpDocTemplateTypes), $templateTags, $this->phpDocNodeResolver);
        $this->resolvedPhpDocBlockCacheCount++;
        return $this->resolvedPhpDocBlockCache[$phpDocKey];
    }
    private function resolvePhpDocStringToDocNode(string $phpDocString) : PhpDocNode
    {
        return $this->phpDocStringResolver->resolve($phpDocString);
    }
    /**
     * @return NameScope[]
     */
    private function getNameScopeMap(string $fileName) : array
    {
        if (!isset($this->memoryCache[$fileName])) {
            $map = $this->createResolvedPhpDocMap($fileName);
            if ($this->memoryCacheCount >= 2048) {
                $this->memoryCache = array_slice($this->memoryCache, 1, null, \true);
                $this->memoryCacheCount--;
            }
            $this->memoryCache[$fileName] = $map;
            $this->memoryCacheCount++;
        }
        return $this->memoryCache[$fileName];
    }
    /**
     * @return NameScope[]
     */
    private function createResolvedPhpDocMap(string $fileName) : array
    {
        $nameScopeMap = $this->createNameScopeMap($fileName, null, null, [], $fileName);
        $resolvedNameScopeMap = [];
        try {
            $this->inProcess[$fileName] = $nameScopeMap;
            foreach ($nameScopeMap as $nameScopeKey => $resolveCallback) {
                $this->inProcess[$fileName][$nameScopeKey] = \false;
                $this->inProcess[$fileName][$nameScopeKey] = $data = $resolveCallback();
                $resolvedNameScopeMap[$nameScopeKey] = $data;
            }
        } finally {
            unset($this->inProcess[$fileName]);
        }
        return $resolvedNameScopeMap;
    }
    /**
     * @param array<string, string> $traitMethodAliases
     * @return (callable(): NameScope)[]
     */
    private function createNameScopeMap(string $fileName, ?string $lookForTrait, ?string $traitUseClass, array $traitMethodAliases, string $originalClassFileName) : array
    {
        /** @var (callable(): NameScope)[] $nameScopeMap */
        $nameScopeMap = [];
        /** @var (callable(): TemplateTypeMap)[] $typeMapStack */
        $typeMapStack = [];
        /** @var array<int, array<string, true>> $typeAliasStack */
        $typeAliasStack = [];
        /** @var string[] $classStack */
        $classStack = [];
        if ($lookForTrait !== null && $traitUseClass !== null) {
            $classStack[] = $traitUseClass;
            $typeAliasStack[] = [];
        }
        $namespace = null;
        $traitFound = \false;
        /** @var array<string|null> $functionStack */
        $functionStack = [];
        $uses = [];
        $constUses = [];
        $this->processNodes($this->phpParser->parseFile($fileName), function (Node $node) use($fileName, $lookForTrait, &$traitFound, $traitMethodAliases, $originalClassFileName, &$nameScopeMap, &$classStack, &$typeAliasStack, &$namespace, &$functionStack, &$uses, &$typeMapStack, &$constUses) : ?int {
            if ($node instanceof Node\Stmt\ClassLike) {
                if ($traitFound && $fileName === $originalClassFileName) {
                    return self::SKIP_NODE;
                }
                if ($lookForTrait !== null && !$traitFound) {
                    if (!$node instanceof Node\Stmt\Trait_) {
                        return self::SKIP_NODE;
                    }
                    if ((string) $node->namespacedName !== $lookForTrait) {
                        return self::SKIP_NODE;
                    }
                    $traitFound = \true;
                    $typeAliasStack[] = $this->getTypeAliasesMap($node->getDocComment());
                    $functionStack[] = null;
                } else {
                    if ($node->name === null) {
                        if (!$node instanceof Node\Stmt\Class_) {
                            throw new ShouldNotHappenException();
                        }
                        $className = $this->anonymousClassNameHelper->getAnonymousClassName($node, $fileName);
                    } elseif ((bool) $node->getAttribute('anonymousClass', \false)) {
                        $className = $node->name->name;
                    } else {
                        if ($traitFound) {
                            return self::SKIP_NODE;
                        }
                        $className = ltrim(sprintf('%s\\%s', $namespace, $node->name->name), '\\');
                    }
                    $classStack[] = $className;
                    $typeAliasStack[] = $this->getTypeAliasesMap($node->getDocComment());
                    $functionStack[] = null;
                }
            } elseif ($node instanceof Node\Stmt\ClassMethod) {
                if (array_key_exists($node->name->name, $traitMethodAliases)) {
                    $functionStack[] = $traitMethodAliases[$node->name->name];
                } else {
                    $functionStack[] = $node->name->name;
                }
            } elseif ($node instanceof Node\Stmt\Function_) {
                $functionStack[] = ltrim(sprintf('%s\\%s', $namespace, $node->name->name), '\\');
            }
            $className = $classStack[count($classStack) - 1] ?? null;
            $functionName = $functionStack[count($functionStack) - 1] ?? null;
            if ($node instanceof Node\Stmt\ClassLike || $node instanceof Node\Stmt\ClassMethod || $node instanceof Node\Stmt\Function_) {
                $phpDocString = GetLastDocComment::forNode($node);
                if ($phpDocString !== null) {
                    $typeMapStack[] = function () use($namespace, $uses, $className, $lookForTrait, $functionName, $phpDocString, $typeMapStack, $typeAliasStack, $constUses) : TemplateTypeMap {
                        $phpDocNode = $this->resolvePhpDocStringToDocNode($phpDocString);
                        $typeMapCb = $typeMapStack[count($typeMapStack) - 1] ?? null;
                        $currentTypeMap = $typeMapCb !== null ? $typeMapCb() : null;
                        $typeAliasesMap = $typeAliasStack[count($typeAliasStack) - 1] ?? [];
                        $nameScope = new NameScope($namespace, $uses, $className, $functionName, $currentTypeMap, $typeAliasesMap, \false, $constUses, $lookForTrait);
                        $templateTags = $this->phpDocNodeResolver->resolveTemplateTags($phpDocNode, $nameScope);
                        $templateTypeScope = $nameScope->getTemplateTypeScope();
                        if ($templateTypeScope === null) {
                            throw new ShouldNotHappenException();
                        }
                        $templateTypeMap = new TemplateTypeMap(array_map(static function (TemplateTag $tag) use($templateTypeScope) : \PHPStan\Type\Type {
                            return TemplateTypeFactory::fromTemplateTag($templateTypeScope, $tag);
                        }, $templateTags));
                        $nameScope = $nameScope->withTemplateTypeMap($templateTypeMap);
                        $templateTags = $this->phpDocNodeResolver->resolveTemplateTags($phpDocNode, $nameScope);
                        $templateTypeMap = new TemplateTypeMap(array_map(static function (TemplateTag $tag) use($templateTypeScope) : \PHPStan\Type\Type {
                            return TemplateTypeFactory::fromTemplateTag($templateTypeScope, $tag);
                        }, $templateTags));
                        return new TemplateTypeMap(array_merge($currentTypeMap !== null ? $currentTypeMap->getTypes() : [], $templateTypeMap->getTypes()));
                    };
                }
            }
            $typeMapCb = $typeMapStack[count($typeMapStack) - 1] ?? null;
            $typeAliasesMap = $typeAliasStack[count($typeAliasStack) - 1] ?? [];
            $nameScopeKey = $this->getNameScopeKey($originalClassFileName, $className, $lookForTrait, $functionName);
            if ($node instanceof Node\Stmt && !$node instanceof Node\Stmt\Namespace_ && !$node instanceof Node\Stmt\Declare_ && !$node instanceof Node\Stmt\DeclareDeclare && !$node instanceof Node\Stmt\Use_ && !$node instanceof Node\Stmt\UseUse && !$node instanceof Node\Stmt\GroupUse && !$node instanceof Node\Stmt\TraitUse && !$node instanceof Node\Stmt\TraitUseAdaptation && !$node instanceof Node\Stmt\InlineHTML && !($node instanceof Node\Stmt\Expression && $node->expr instanceof Node\Expr\Include_) && !array_key_exists($nameScopeKey, $nameScopeMap)) {
                $nameScopeMap[$nameScopeKey] = static function () use($namespace, $uses, $className, $functionName, $typeMapCb, $typeAliasesMap, $constUses, $lookForTrait) : NameScope {
                    return new NameScope($namespace, $uses, $className, $functionName, $typeMapCb !== null ? $typeMapCb() : TemplateTypeMap::createEmpty(), $typeAliasesMap, \false, $constUses, $lookForTrait);
                };
            }
            if ($node instanceof Node\Stmt\ClassLike || $node instanceof Node\Stmt\ClassMethod || $node instanceof Node\Stmt\Function_) {
                $phpDocString = GetLastDocComment::forNode($node);
                if ($phpDocString !== null) {
                    return self::POP_TYPE_MAP_STACK;
                }
                return null;
            }
            if ($node instanceof Node\Stmt\Namespace_) {
                $namespace = $node->name !== null ? (string) $node->name : null;
            } elseif ($node instanceof Node\Stmt\Use_) {
                if ($node->type === Node\Stmt\Use_::TYPE_NORMAL) {
                    foreach ($node->uses as $use) {
                        $uses[strtolower($use->getAlias()->name)] = (string) $use->name;
                    }
                } elseif ($node->type === Node\Stmt\Use_::TYPE_CONSTANT) {
                    foreach ($node->uses as $use) {
                        $constUses[strtolower($use->getAlias()->name)] = (string) $use->name;
                    }
                }
            } elseif ($node instanceof Node\Stmt\GroupUse) {
                $prefix = (string) $node->prefix;
                foreach ($node->uses as $use) {
                    if ($node->type === Node\Stmt\Use_::TYPE_NORMAL || $use->type === Node\Stmt\Use_::TYPE_NORMAL) {
                        $uses[strtolower($use->getAlias()->name)] = sprintf('%s\\%s', $prefix, (string) $use->name);
                    } elseif ($node->type === Node\Stmt\Use_::TYPE_CONSTANT || $use->type === Node\Stmt\Use_::TYPE_CONSTANT) {
                        $constUses[strtolower($use->getAlias()->name)] = sprintf('%s\\%s', $prefix, (string) $use->name);
                    }
                }
            } elseif ($node instanceof Node\Stmt\TraitUse) {
                $traitMethodAliases = [];
                foreach ($node->adaptations as $traitUseAdaptation) {
                    if (!$traitUseAdaptation instanceof Node\Stmt\TraitUseAdaptation\Alias) {
                        continue;
                    }
                    if ($traitUseAdaptation->trait === null) {
                        continue;
                    }
                    if ($traitUseAdaptation->newName === null) {
                        continue;
                    }
                    $traitMethodAliases[$traitUseAdaptation->trait->toString()][$traitUseAdaptation->method->toString()] = $traitUseAdaptation->newName->toString();
                }
                $useDocComment = null;
                if ($node->getDocComment() !== null) {
                    $useDocComment = $node->getDocComment()->getText();
                }
                foreach ($node->traits as $traitName) {
                    /** @var class-string $traitName */
                    $traitName = (string) $traitName;
                    $reflectionProvider = $this->reflectionProviderProvider->getReflectionProvider();
                    if (!$reflectionProvider->hasClass($traitName)) {
                        continue;
                    }
                    $traitReflection = $reflectionProvider->getClass($traitName);
                    if (!$traitReflection->isTrait()) {
                        continue;
                    }
                    if ($traitReflection->getFileName() === null) {
                        continue;
                    }
                    if (!is_file($traitReflection->getFileName())) {
                        continue;
                    }
                    $className = $classStack[count($classStack) - 1] ?? null;
                    if ($className === null) {
                        throw new ShouldNotHappenException();
                    }
                    $traitPhpDocMap = $this->createNameScopeMap($traitReflection->getFileName(), $traitName, $className, $traitMethodAliases[$traitName] ?? [], $originalClassFileName);
                    $finalTraitPhpDocMap = [];
                    foreach ($traitPhpDocMap as $nameScopeTraitKey => $callback) {
                        $finalTraitPhpDocMap[$nameScopeTraitKey] = function () use($callback, $traitReflection, $fileName, $className, $lookForTrait, $useDocComment) : NameScope {
                            /** @var NameScope $original */
                            $original = $callback();
                            if (!$traitReflection->isGeneric()) {
                                return $original;
                            }
                            $traitTemplateTypeMap = $traitReflection->getTemplateTypeMap();
                            $useType = null;
                            if ($useDocComment !== null) {
                                $useTags = $this->getResolvedPhpDoc($fileName, $className, $lookForTrait, null, $useDocComment)->getUsesTags();
                                foreach ($useTags as $useTag) {
                                    $useTagType = $useTag->getType();
                                    if (!$useTagType instanceof GenericObjectType) {
                                        continue;
                                    }
                                    if ($useTagType->getClassName() !== $traitReflection->getName()) {
                                        continue;
                                    }
                                    $useType = $useTagType;
                                    break;
                                }
                            }
                            if ($useType === null) {
                                return $original->withTemplateTypeMap($traitTemplateTypeMap->resolveToBounds());
                            }
                            $transformedTraitTypeMap = $traitReflection->typeMapFromList($useType->getTypes());
                            return $original->withTemplateTypeMap($traitTemplateTypeMap->map(static function (string $name, \PHPStan\Type\Type $type) use($transformedTraitTypeMap) : \PHPStan\Type\Type {
                                return TemplateTypeHelper::resolveTemplateTypes($type, $transformedTraitTypeMap);
                            }));
                        };
                    }
                    $nameScopeMap = array_merge($nameScopeMap, $finalTraitPhpDocMap);
                }
            }
            return null;
        }, static function (Node $node, $callbackResult) use(&$namespace, &$functionStack, &$classStack, &$typeAliasStack, &$uses, &$typeMapStack, &$constUses) : void {
            if ($node instanceof Node\Stmt\ClassLike) {
                if (count($classStack) === 0) {
                    throw new ShouldNotHappenException();
                }
                array_pop($classStack);
                if (count($typeAliasStack) === 0) {
                    throw new ShouldNotHappenException();
                }
                array_pop($typeAliasStack);
                if (count($functionStack) === 0) {
                    throw new ShouldNotHappenException();
                }
                array_pop($functionStack);
            } elseif ($node instanceof Node\Stmt\Namespace_) {
                $namespace = null;
                $uses = [];
                $constUses = [];
            } elseif ($node instanceof Node\Stmt\ClassMethod || $node instanceof Node\Stmt\Function_) {
                if (count($functionStack) === 0) {
                    throw new ShouldNotHappenException();
                }
                array_pop($functionStack);
            }
            if ($callbackResult !== self::POP_TYPE_MAP_STACK) {
                return;
            }
            if (count($typeMapStack) === 0) {
                throw new ShouldNotHappenException();
            }
            array_pop($typeMapStack);
        });
        if (count($typeMapStack) > 0) {
            throw new ShouldNotHappenException();
        }
        return $nameScopeMap;
    }
    /**
     * @return array<string, true>
     */
    private function getTypeAliasesMap(?Doc $docComment) : array
    {
        if ($docComment === null) {
            return [];
        }
        $phpDocNode = $this->phpDocStringResolver->resolve($docComment->getText());
        $nameScope = new NameScope(null, []);
        $aliasesMap = [];
        foreach (array_keys($this->phpDocNodeResolver->resolveTypeAliasImportTags($phpDocNode, $nameScope)) as $key) {
            $aliasesMap[$key] = \true;
        }
        foreach (array_keys($this->phpDocNodeResolver->resolveTypeAliasTags($phpDocNode, $nameScope)) as $key) {
            $aliasesMap[$key] = \true;
        }
        return $aliasesMap;
    }
    /**
     * @param Node[]|Node|scalar|null $node
     * @param Closure(Node $node): mixed $nodeCallback
     * @param Closure(Node $node, mixed $callbackResult): void $endNodeCallback
     */
    private function processNodes($node, Closure $nodeCallback, Closure $endNodeCallback) : void
    {
        if ($node instanceof Node) {
            $callbackResult = $nodeCallback($node);
            if ($callbackResult === self::SKIP_NODE) {
                return;
            }
            foreach ($node->getSubNodeNames() as $subNodeName) {
                $subNode = $node->{$subNodeName};
                $this->processNodes($subNode, $nodeCallback, $endNodeCallback);
            }
            $endNodeCallback($node, $callbackResult);
        } elseif (is_array($node)) {
            foreach ($node as $subNode) {
                $this->processNodes($subNode, $nodeCallback, $endNodeCallback);
            }
        }
    }
    private function getNameScopeKey(?string $file, ?string $class, ?string $trait, ?string $function) : string
    {
        if ($class === null && $trait === null && $function === null) {
            return md5(sprintf('%s', $file ?? 'no-file'));
        }
        if ($class !== null && strpos($class, 'class@anonymous') !== \false) {
            throw new ShouldNotHappenException('Wrong anonymous class name, FilTypeMapper should be called with ClassReflection::getName().');
        }
        return md5(sprintf('%s-%s-%s-%s', $file ?? 'no-file', $class, $trait, $function));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\GenericTypeNode;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\IntersectionTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\Reflection\ClassMemberAccessAnswerer;
use PHPStan\Reflection\ConstantReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Reflection\TrivialParametersAcceptor;
use PHPStan\Reflection\Type\IntersectionTypeUnresolvedMethodPrototypeReflection;
use PHPStan\Reflection\Type\IntersectionTypeUnresolvedPropertyPrototypeReflection;
use PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection;
use PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\Accessory\AccessoryLiteralStringType;
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
use PHPStan\Type\Accessory\AccessoryNonFalsyStringType;
use PHPStan\Type\Accessory\AccessoryNumericStringType;
use PHPStan\Type\Accessory\AccessoryType;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\Generic\TemplateType;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\Generic\TemplateTypeVariance;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use PHPStan\Type\Traits\NonRemoveableTypeTrait;
use function array_intersect_key;
use function array_map;
use function array_shift;
use function array_unique;
use function array_values;
use function count;
use function implode;
use function in_array;
use function ksort;
use function sprintf;
use function strlen;
use function substr;
/** @api */
class IntersectionType implements \PHPStan\Type\CompoundType
{
    use NonRemoveableTypeTrait;
    use NonGeneralizableTypeTrait;
    /**
     * @var bool
     */
    private $sortedTypes = \false;
    /**
     * @var Type[]
     */
    private $types;
    /**
     * @api
     * @param Type[] $types
     */
    public function __construct(array $types)
    {
        $this->types = $types;
        if (count($types) < 2) {
            throw new ShouldNotHappenException(sprintf('Cannot create %s with: %s', self::class, implode(', ', array_map(static function (\PHPStan\Type\Type $type) : string {
                return $type->describe(\PHPStan\Type\VerbosityLevel::value());
            }, $types))));
        }
    }
    /**
     * @return Type[]
     */
    public function getTypes() : array
    {
        return $this->types;
    }
    /**
     * @return Type[]
     */
    private function getSortedTypes() : array
    {
        if ($this->sortedTypes) {
            return $this->types;
        }
        $this->types = \PHPStan\Type\UnionTypeHelper::sortTypes($this->types);
        $this->sortedTypes = \true;
        return $this->types;
    }
    public function inferTemplateTypesOn(\PHPStan\Type\Type $templateType) : TemplateTypeMap
    {
        $types = TemplateTypeMap::createEmpty();
        foreach ($this->types as $type) {
            $types = $types->intersect($templateType->inferTemplateTypes($type));
        }
        return $types;
    }
    public function getReferencedClasses() : array
    {
        $classes = [];
        foreach ($this->types as $type) {
            foreach ($type->getReferencedClasses() as $className) {
                $classes[] = $className;
            }
        }
        return $classes;
    }
    public function getObjectClassNames() : array
    {
        $objectClassNames = [];
        foreach ($this->types as $type) {
            $innerObjectClassNames = $type->getObjectClassNames();
            foreach ($innerObjectClassNames as $innerObjectClassName) {
                $objectClassNames[] = $innerObjectClassName;
            }
        }
        return array_values(array_unique($objectClassNames));
    }
    public function getObjectClassReflections() : array
    {
        $reflections = [];
        foreach ($this->types as $type) {
            foreach ($type->getObjectClassReflections() as $reflection) {
                $reflections[] = $reflection;
            }
        }
        return $reflections;
    }
    public function getArrays() : array
    {
        $arrays = [];
        foreach ($this->types as $type) {
            foreach ($type->getArrays() as $array) {
                $arrays[] = $array;
            }
        }
        return $arrays;
    }
    public function getConstantArrays() : array
    {
        $constantArrays = [];
        foreach ($this->types as $type) {
            foreach ($type->getConstantArrays() as $constantArray) {
                $constantArrays[] = $constantArray;
            }
        }
        return $constantArrays;
    }
    public function getConstantStrings() : array
    {
        $strings = [];
        foreach ($this->types as $type) {
            foreach ($type->getConstantStrings() as $string) {
                $strings[] = $string;
            }
        }
        return $strings;
    }
    public function accepts(\PHPStan\Type\Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(\PHPStan\Type\Type $otherType, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        $result = \PHPStan\Type\AcceptsResult::createYes();
        foreach ($this->types as $type) {
            $result = $result->and($type->acceptsWithReason($otherType, $strictTypes));
        }
        return $result;
    }
    public function isSuperTypeOf(\PHPStan\Type\Type $otherType) : TrinaryLogic
    {
        if ($otherType instanceof \PHPStan\Type\IntersectionType && $this->equals($otherType)) {
            return TrinaryLogic::createYes();
        }
        if ($otherType instanceof \PHPStan\Type\NeverType) {
            return TrinaryLogic::createYes();
        }
        return TrinaryLogic::createYes()->lazyAnd($this->getTypes(), static function (\PHPStan\Type\Type $innerType) use($otherType) {
            return $innerType->isSuperTypeOf($otherType);
        });
    }
    public function isSubTypeOf(\PHPStan\Type\Type $otherType) : TrinaryLogic
    {
        if (($otherType instanceof self || $otherType instanceof \PHPStan\Type\UnionType) && !$otherType instanceof TemplateType) {
            return $otherType->isSuperTypeOf($this);
        }
        $result = TrinaryLogic::lazyMaxMin($this->getTypes(), static function (\PHPStan\Type\Type $innerType) use($otherType) {
            return $otherType->isSuperTypeOf($innerType);
        });
        if ($this->isOversizedArray()->yes()) {
            if (!$result->no()) {
                return TrinaryLogic::createYes();
            }
        }
        return $result;
    }
    public function isAcceptedBy(\PHPStan\Type\Type $acceptingType, bool $strictTypes) : TrinaryLogic
    {
        return $this->isAcceptedWithReasonBy($acceptingType, $strictTypes)->result;
    }
    public function isAcceptedWithReasonBy(\PHPStan\Type\Type $acceptingType, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        $result = \PHPStan\Type\AcceptsResult::maxMin(...array_map(static function (\PHPStan\Type\Type $innerType) use($acceptingType, $strictTypes) {
            return $acceptingType->acceptsWithReason($innerType, $strictTypes);
        }, $this->types));
        if ($this->isOversizedArray()->yes()) {
            if (!$result->no()) {
                return \PHPStan\Type\AcceptsResult::createYes();
            }
        }
        return $result;
    }
    public function equals(\PHPStan\Type\Type $type) : bool
    {
        if (!$type instanceof static) {
            return \false;
        }
        if (count($this->types) !== count($type->types)) {
            return \false;
        }
        $otherTypes = $type->types;
        foreach ($this->types as $innerType) {
            $match = \false;
            foreach ($otherTypes as $i => $otherType) {
                if (!$innerType->equals($otherType)) {
                    continue;
                }
                $match = \true;
                unset($otherTypes[$i]);
                break;
            }
            if (!$match) {
                return \false;
            }
        }
        return count($otherTypes) === 0;
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        return $level->handle(function () use($level) : string {
            $typeNames = [];
            foreach ($this->getSortedTypes() as $type) {
                if ($type instanceof AccessoryType) {
                    continue;
                }
                $typeNames[] = $type->generalize(\PHPStan\Type\GeneralizePrecision::lessSpecific())->describe($level);
            }
            return implode('&', $typeNames);
        }, function () use($level) : string {
            return $this->describeItself($level, \true);
        }, function () use($level) : string {
            return $this->describeItself($level, \false);
        });
    }
    private function describeItself(\PHPStan\Type\VerbosityLevel $level, bool $skipAccessoryTypes) : string
    {
        $baseTypes = [];
        $typesToDescribe = [];
        $skipTypeNames = [];
        $nonEmptyStr = \false;
        $nonFalsyStr = \false;
        foreach ($this->getSortedTypes() as $i => $type) {
            if ($type instanceof AccessoryNonEmptyStringType || $type instanceof AccessoryLiteralStringType || $type instanceof AccessoryNumericStringType || $type instanceof AccessoryNonFalsyStringType) {
                if ($type instanceof AccessoryNonFalsyStringType) {
                    $nonFalsyStr = \true;
                }
                if ($type instanceof AccessoryNonEmptyStringType) {
                    $nonEmptyStr = \true;
                }
                if ($nonEmptyStr && $nonFalsyStr) {
                    // prevent redundant 'non-empty-string&non-falsy-string'
                    foreach ($typesToDescribe as $key => $typeToDescribe) {
                        if (!$typeToDescribe instanceof AccessoryNonEmptyStringType) {
                            continue;
                        }
                        unset($typesToDescribe[$key]);
                    }
                }
                $typesToDescribe[$i] = $type;
                $skipTypeNames[] = 'string';
                continue;
            }
            if ($type instanceof NonEmptyArrayType || $type instanceof AccessoryArrayListType) {
                $typesToDescribe[$i] = $type;
                $skipTypeNames[] = 'array';
                continue;
            }
            if ($type instanceof \PHPStan\Type\CallableType && $type->isCommonCallable()) {
                $typesToDescribe[$i] = $type;
                $skipTypeNames[] = 'object';
                $skipTypeNames[] = 'string';
                continue;
            }
            if (!$type instanceof AccessoryType) {
                $baseTypes[$i] = $type;
                continue;
            }
            if ($skipAccessoryTypes) {
                continue;
            }
            $typesToDescribe[$i] = $type;
        }
        $describedTypes = [];
        foreach ($baseTypes as $i => $type) {
            $typeDescription = $type->describe($level);
            if (in_array($typeDescription, ['object', 'string'], \true) && in_array($typeDescription, $skipTypeNames, \true)) {
                foreach ($typesToDescribe as $j => $typeToDescribe) {
                    if ($typeToDescribe instanceof \PHPStan\Type\CallableType && $typeToDescribe->isCommonCallable()) {
                        $describedTypes[$i] = 'callable-' . $typeDescription;
                        unset($typesToDescribe[$j]);
                        continue 2;
                    }
                }
            }
            if (substr($typeDescription, 0, strlen('array<')) === 'array<' && in_array('array', $skipTypeNames, \true)) {
                $nonEmpty = \false;
                $typeName = 'array';
                foreach ($typesToDescribe as $j => $typeToDescribe) {
                    if ($typeToDescribe instanceof AccessoryArrayListType && substr($typeDescription, 0, strlen('array<int<0, max>, ')) === 'array<int<0, max>, ') {
                        $typeName = 'list';
                        $typeDescription = 'array<' . substr($typeDescription, strlen('array<int<0, max>, '));
                    } elseif ($typeToDescribe instanceof NonEmptyArrayType) {
                        $nonEmpty = \true;
                    } else {
                        continue;
                    }
                    unset($typesToDescribe[$j]);
                }
                if ($nonEmpty) {
                    $typeName = 'non-empty-' . $typeName;
                }
                $describedTypes[$i] = $typeName . '<' . substr($typeDescription, strlen('array<'));
                continue;
            }
            if (in_array($typeDescription, $skipTypeNames, \true)) {
                continue;
            }
            $describedTypes[$i] = $type->describe($level);
        }
        foreach ($typesToDescribe as $i => $typeToDescribe) {
            $describedTypes[$i] = $typeToDescribe->describe($level);
        }
        ksort($describedTypes);
        return implode('&', $describedTypes);
    }
    public function getTemplateType(string $ancestorClassName, string $templateTypeName) : \PHPStan\Type\Type
    {
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) use($ancestorClassName, $templateTypeName) : \PHPStan\Type\Type {
            return $type->getTemplateType($ancestorClassName, $templateTypeName);
        });
    }
    public function isObject() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isObject();
        });
    }
    public function isEnum() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isEnum();
        });
    }
    public function canAccessProperties() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->canAccessProperties();
        });
    }
    public function hasProperty(string $propertyName) : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) use($propertyName) : TrinaryLogic {
            return $type->hasProperty($propertyName);
        });
    }
    public function getProperty(string $propertyName, ClassMemberAccessAnswerer $scope) : PropertyReflection
    {
        return $this->getUnresolvedPropertyPrototype($propertyName, $scope)->getTransformedProperty();
    }
    public function getUnresolvedPropertyPrototype(string $propertyName, ClassMemberAccessAnswerer $scope) : UnresolvedPropertyPrototypeReflection
    {
        $propertyPrototypes = [];
        foreach ($this->types as $type) {
            if (!$type->hasProperty($propertyName)->yes()) {
                continue;
            }
            $propertyPrototypes[] = $type->getUnresolvedPropertyPrototype($propertyName, $scope)->withFechedOnType($this);
        }
        $propertiesCount = count($propertyPrototypes);
        if ($propertiesCount === 0) {
            throw new ShouldNotHappenException();
        }
        if ($propertiesCount === 1) {
            return $propertyPrototypes[0];
        }
        return new IntersectionTypeUnresolvedPropertyPrototypeReflection($propertyName, $propertyPrototypes);
    }
    public function canCallMethods() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->canCallMethods();
        });
    }
    public function hasMethod(string $methodName) : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) use($methodName) : TrinaryLogic {
            return $type->hasMethod($methodName);
        });
    }
    public function getMethod(string $methodName, ClassMemberAccessAnswerer $scope) : ExtendedMethodReflection
    {
        return $this->getUnresolvedMethodPrototype($methodName, $scope)->getTransformedMethod();
    }
    public function getUnresolvedMethodPrototype(string $methodName, ClassMemberAccessAnswerer $scope) : UnresolvedMethodPrototypeReflection
    {
        $methodPrototypes = [];
        foreach ($this->types as $type) {
            if (!$type->hasMethod($methodName)->yes()) {
                continue;
            }
            $methodPrototypes[] = $type->getUnresolvedMethodPrototype($methodName, $scope)->withCalledOnType($this);
        }
        $methodsCount = count($methodPrototypes);
        if ($methodsCount === 0) {
            throw new ShouldNotHappenException();
        }
        if ($methodsCount === 1) {
            return $methodPrototypes[0];
        }
        return new IntersectionTypeUnresolvedMethodPrototypeReflection($methodName, $methodPrototypes);
    }
    public function canAccessConstants() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->canAccessConstants();
        });
    }
    public function hasConstant(string $constantName) : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) use($constantName) : TrinaryLogic {
            return $type->hasConstant($constantName);
        });
    }
    public function getConstant(string $constantName) : ConstantReflection
    {
        foreach ($this->types as $type) {
            if ($type->hasConstant($constantName)->yes()) {
                return $type->getConstant($constantName);
            }
        }
        throw new ShouldNotHappenException();
    }
    public function isIterable() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isIterable();
        });
    }
    public function isIterableAtLeastOnce() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isIterableAtLeastOnce();
        });
    }
    public function getArraySize() : \PHPStan\Type\Type
    {
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getArraySize();
        });
    }
    public function getIterableKeyType() : \PHPStan\Type\Type
    {
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getIterableKeyType();
        });
    }
    public function getFirstIterableKeyType() : \PHPStan\Type\Type
    {
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getFirstIterableKeyType();
        });
    }
    public function getLastIterableKeyType() : \PHPStan\Type\Type
    {
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getLastIterableKeyType();
        });
    }
    public function getIterableValueType() : \PHPStan\Type\Type
    {
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getIterableValueType();
        });
    }
    public function getFirstIterableValueType() : \PHPStan\Type\Type
    {
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getFirstIterableValueType();
        });
    }
    public function getLastIterableValueType() : \PHPStan\Type\Type
    {
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getLastIterableValueType();
        });
    }
    public function isArray() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isArray();
        });
    }
    public function isConstantArray() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isConstantArray();
        });
    }
    public function isOversizedArray() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isOversizedArray();
        });
    }
    public function isList() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isList();
        });
    }
    public function isString() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isString();
        });
    }
    public function isNumericString() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isNumericString();
        });
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isNonEmptyString();
        });
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isNonFalsyString();
        });
    }
    public function isLiteralString() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isLiteralString();
        });
    }
    public function isClassStringType() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isClassStringType();
        });
    }
    public function getClassStringObjectType() : \PHPStan\Type\Type
    {
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getClassStringObjectType();
        });
    }
    public function getObjectTypeOrClassStringObjectType() : \PHPStan\Type\Type
    {
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getObjectTypeOrClassStringObjectType();
        });
    }
    public function isVoid() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isVoid();
        });
    }
    public function isScalar() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isScalar();
        });
    }
    public function looseCompare(\PHPStan\Type\Type $type, PhpVersion $phpVersion) : \PHPStan\Type\BooleanType
    {
        return new \PHPStan\Type\BooleanType();
    }
    public function isOffsetAccessible() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isOffsetAccessible();
        });
    }
    public function hasOffsetValueType(\PHPStan\Type\Type $offsetType) : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) use($offsetType) : TrinaryLogic {
            return $type->hasOffsetValueType($offsetType);
        });
    }
    public function getOffsetValueType(\PHPStan\Type\Type $offsetType) : \PHPStan\Type\Type
    {
        $result = $this->intersectTypes(static function (\PHPStan\Type\Type $type) use($offsetType) : \PHPStan\Type\Type {
            return $type->getOffsetValueType($offsetType);
        });
        if ($this->isOversizedArray()->yes()) {
            return \PHPStan\Type\TypeUtils::toBenevolentUnion($result);
        }
        return $result;
    }
    public function setOffsetValueType(?\PHPStan\Type\Type $offsetType, \PHPStan\Type\Type $valueType, bool $unionValues = \true) : \PHPStan\Type\Type
    {
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) use($offsetType, $valueType, $unionValues) : \PHPStan\Type\Type {
            return $type->setOffsetValueType($offsetType, $valueType, $unionValues);
        });
    }
    public function unsetOffset(\PHPStan\Type\Type $offsetType) : \PHPStan\Type\Type
    {
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) use($offsetType) : \PHPStan\Type\Type {
            return $type->unsetOffset($offsetType);
        });
    }
    public function getKeysArray() : \PHPStan\Type\Type
    {
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getKeysArray();
        });
    }
    public function getValuesArray() : \PHPStan\Type\Type
    {
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getValuesArray();
        });
    }
    public function fillKeysArray(\PHPStan\Type\Type $valueType) : \PHPStan\Type\Type
    {
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) use($valueType) : \PHPStan\Type\Type {
            return $type->fillKeysArray($valueType);
        });
    }
    public function flipArray() : \PHPStan\Type\Type
    {
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->flipArray();
        });
    }
    public function intersectKeyArray(\PHPStan\Type\Type $otherArraysType) : \PHPStan\Type\Type
    {
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) use($otherArraysType) : \PHPStan\Type\Type {
            return $type->intersectKeyArray($otherArraysType);
        });
    }
    public function popArray() : \PHPStan\Type\Type
    {
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->popArray();
        });
    }
    public function searchArray(\PHPStan\Type\Type $needleType) : \PHPStan\Type\Type
    {
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) use($needleType) : \PHPStan\Type\Type {
            return $type->searchArray($needleType);
        });
    }
    public function shiftArray() : \PHPStan\Type\Type
    {
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->shiftArray();
        });
    }
    public function shuffleArray() : \PHPStan\Type\Type
    {
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->shuffleArray();
        });
    }
    public function getEnumCases() : array
    {
        $compare = [];
        foreach ($this->types as $type) {
            $oneType = [];
            foreach ($type->getEnumCases() as $enumCase) {
                $oneType[$enumCase->describe(\PHPStan\Type\VerbosityLevel::typeOnly())] = $enumCase;
            }
            $compare[] = $oneType;
        }
        return array_values(array_intersect_key(...$compare));
    }
    public function isCallable() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isCallable();
        });
    }
    /**
     * @return ParametersAcceptor[]
     */
    public function getCallableParametersAcceptors(ClassMemberAccessAnswerer $scope) : array
    {
        if ($this->isCallable()->no()) {
            throw new ShouldNotHappenException();
        }
        return [new TrivialParametersAcceptor()];
    }
    public function isCloneable() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isCloneable();
        });
    }
    public function isSmallerThan(\PHPStan\Type\Type $otherType) : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) use($otherType) : TrinaryLogic {
            return $type->isSmallerThan($otherType);
        });
    }
    public function isSmallerThanOrEqual(\PHPStan\Type\Type $otherType) : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) use($otherType) : TrinaryLogic {
            return $type->isSmallerThanOrEqual($otherType);
        });
    }
    public function isNull() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isNull();
        });
    }
    public function isConstantValue() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isConstantValue();
        });
    }
    public function isConstantScalarValue() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isConstantScalarValue();
        });
    }
    public function getConstantScalarTypes() : array
    {
        $scalarTypes = [];
        foreach ($this->types as $type) {
            foreach ($type->getConstantScalarTypes() as $scalarType) {
                $scalarTypes[] = $scalarType;
            }
        }
        return $scalarTypes;
    }
    public function getConstantScalarValues() : array
    {
        $values = [];
        foreach ($this->types as $type) {
            foreach ($type->getConstantScalarValues() as $value) {
                $values[] = $value;
            }
        }
        return $values;
    }
    public function isTrue() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isTrue();
        });
    }
    public function isFalse() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isFalse();
        });
    }
    public function isBoolean() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isBoolean();
        });
    }
    public function isFloat() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isFloat();
        });
    }
    public function isInteger() : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) : TrinaryLogic {
            return $type->isInteger();
        });
    }
    public function isGreaterThan(\PHPStan\Type\Type $otherType) : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) use($otherType) : TrinaryLogic {
            return $otherType->isSmallerThan($type);
        });
    }
    public function isGreaterThanOrEqual(\PHPStan\Type\Type $otherType) : TrinaryLogic
    {
        return $this->intersectResults(static function (\PHPStan\Type\Type $type) use($otherType) : TrinaryLogic {
            return $otherType->isSmallerThanOrEqual($type);
        });
    }
    public function getSmallerType() : \PHPStan\Type\Type
    {
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getSmallerType();
        });
    }
    public function getSmallerOrEqualType() : \PHPStan\Type\Type
    {
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getSmallerOrEqualType();
        });
    }
    public function getGreaterType() : \PHPStan\Type\Type
    {
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getGreaterType();
        });
    }
    public function getGreaterOrEqualType() : \PHPStan\Type\Type
    {
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->getGreaterOrEqualType();
        });
    }
    public function toBoolean() : \PHPStan\Type\BooleanType
    {
        $type = $this->intersectTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\BooleanType {
            return $type->toBoolean();
        });
        if (!$type instanceof \PHPStan\Type\BooleanType) {
            return new \PHPStan\Type\BooleanType();
        }
        return $type;
    }
    public function toNumber() : \PHPStan\Type\Type
    {
        $type = $this->intersectTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->toNumber();
        });
        return $type;
    }
    public function toString() : \PHPStan\Type\Type
    {
        $type = $this->intersectTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->toString();
        });
        return $type;
    }
    public function toInteger() : \PHPStan\Type\Type
    {
        $type = $this->intersectTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->toInteger();
        });
        return $type;
    }
    public function toFloat() : \PHPStan\Type\Type
    {
        $type = $this->intersectTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->toFloat();
        });
        return $type;
    }
    public function toArray() : \PHPStan\Type\Type
    {
        $type = $this->intersectTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->toArray();
        });
        return $type;
    }
    public function toArrayKey() : \PHPStan\Type\Type
    {
        if ($this->isNumericString()->yes()) {
            return new \PHPStan\Type\IntegerType();
        }
        if ($this->isString()->yes()) {
            return $this;
        }
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) : \PHPStan\Type\Type {
            return $type->toArrayKey();
        });
    }
    public function inferTemplateTypes(\PHPStan\Type\Type $receivedType) : TemplateTypeMap
    {
        $types = TemplateTypeMap::createEmpty();
        foreach ($this->types as $type) {
            $types = $types->intersect($type->inferTemplateTypes($receivedType));
        }
        return $types;
    }
    public function getReferencedTemplateTypes(TemplateTypeVariance $positionVariance) : array
    {
        $references = [];
        foreach ($this->types as $type) {
            foreach ($type->getReferencedTemplateTypes($positionVariance) as $reference) {
                $references[] = $reference;
            }
        }
        return $references;
    }
    public function traverse(callable $cb) : \PHPStan\Type\Type
    {
        $types = [];
        $changed = \false;
        foreach ($this->types as $type) {
            $newType = $cb($type);
            if ($type !== $newType) {
                $changed = \true;
            }
            $types[] = $newType;
        }
        if ($changed) {
            return \PHPStan\Type\TypeCombinator::intersect(...$types);
        }
        return $this;
    }
    public function traverseSimultaneously(\PHPStan\Type\Type $right, callable $cb) : \PHPStan\Type\Type
    {
        $types = [];
        $changed = \false;
        if (!$right instanceof self) {
            return $this;
        }
        if (count($this->getTypes()) !== count($right->getTypes())) {
            return $this;
        }
        foreach ($this->getSortedTypes() as $i => $leftType) {
            $rightType = $right->getSortedTypes()[$i];
            $newType = $cb($leftType, $rightType);
            if ($leftType !== $newType) {
                $changed = \true;
            }
            $types[] = $newType;
        }
        if ($changed) {
            return \PHPStan\Type\TypeCombinator::intersect(...$types);
        }
        return $this;
    }
    public function tryRemove(\PHPStan\Type\Type $typeToRemove) : ?\PHPStan\Type\Type
    {
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) use($typeToRemove) : \PHPStan\Type\Type {
            return \PHPStan\Type\TypeCombinator::remove($type, $typeToRemove);
        });
    }
    public function exponentiate(\PHPStan\Type\Type $exponent) : \PHPStan\Type\Type
    {
        return $this->intersectTypes(static function (\PHPStan\Type\Type $type) use($exponent) : \PHPStan\Type\Type {
            return $type->exponentiate($exponent);
        });
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self($properties['types']);
    }
    /**
     * @param callable(Type $type): TrinaryLogic $getResult
     */
    private function intersectResults(callable $getResult) : TrinaryLogic
    {
        return TrinaryLogic::lazyMaxMin($this->types, $getResult);
    }
    /**
     * @param callable(Type $type): Type $getType
     */
    private function intersectTypes(callable $getType) : \PHPStan\Type\Type
    {
        $operands = array_map($getType, $this->types);
        return \PHPStan\Type\TypeCombinator::intersect(...$operands);
    }
    public function toPhpDocNode() : TypeNode
    {
        $baseTypes = [];
        $typesToDescribe = [];
        $skipTypeNames = [];
        $nonEmptyStr = \false;
        $nonFalsyStr = \false;
        foreach ($this->getSortedTypes() as $i => $type) {
            if ($type instanceof AccessoryNonEmptyStringType || $type instanceof AccessoryLiteralStringType || $type instanceof AccessoryNumericStringType || $type instanceof AccessoryNonFalsyStringType) {
                if ($type instanceof AccessoryNonFalsyStringType) {
                    $nonFalsyStr = \true;
                }
                if ($type instanceof AccessoryNonEmptyStringType) {
                    $nonEmptyStr = \true;
                }
                if ($nonEmptyStr && $nonFalsyStr) {
                    // prevent redundant 'non-empty-string&non-falsy-string'
                    foreach ($typesToDescribe as $key => $typeToDescribe) {
                        if (!$typeToDescribe instanceof AccessoryNonEmptyStringType) {
                            continue;
                        }
                        unset($typesToDescribe[$key]);
                    }
                }
                $typesToDescribe[$i] = $type;
                $skipTypeNames[] = 'string';
                continue;
            }
            if ($type instanceof NonEmptyArrayType || $type instanceof AccessoryArrayListType) {
                $typesToDescribe[$i] = $type;
                $skipTypeNames[] = 'array';
                continue;
            }
            if (!$type instanceof AccessoryType) {
                $baseTypes[$i] = $type;
                continue;
            }
            $accessoryPhpDocNode = $type->toPhpDocNode();
            if ($accessoryPhpDocNode instanceof IdentifierTypeNode && $accessoryPhpDocNode->name === '') {
                continue;
            }
            $typesToDescribe[$i] = $type;
        }
        $describedTypes = [];
        foreach ($baseTypes as $i => $type) {
            $typeNode = $type->toPhpDocNode();
            if ($typeNode instanceof GenericTypeNode && $typeNode->type->name === 'array') {
                $nonEmpty = \false;
                $typeName = 'array';
                foreach ($typesToDescribe as $j => $typeToDescribe) {
                    if ($typeToDescribe instanceof AccessoryArrayListType) {
                        $typeName = 'list';
                        if (count($typeNode->genericTypes) > 1) {
                            array_shift($typeNode->genericTypes);
                        }
                    } elseif ($typeToDescribe instanceof NonEmptyArrayType) {
                        $nonEmpty = \true;
                    } else {
                        continue;
                    }
                    unset($typesToDescribe[$j]);
                }
                if ($nonEmpty) {
                    $typeName = 'non-empty-' . $typeName;
                }
                $describedTypes[$i] = new GenericTypeNode(new IdentifierTypeNode($typeName), $typeNode->genericTypes);
                continue;
            }
            if ($typeNode instanceof IdentifierTypeNode && in_array($typeNode->name, $skipTypeNames, \true)) {
                continue;
            }
            $describedTypes[$i] = $typeNode;
        }
        foreach ($typesToDescribe as $i => $typeToDescribe) {
            $describedTypes[$i] = $typeToDescribe->toPhpDocNode();
        }
        ksort($describedTypes);
        $describedTypes = array_values($describedTypes);
        if (count($describedTypes) === 1) {
            return $describedTypes[0];
        }
        return new IntersectionTypeNode($describedTypes);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\TrinaryLogic;
/** @api */
class ClassStringType extends \PHPStan\Type\StringType
{
    /** @api */
    public function __construct()
    {
        parent::__construct();
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        return 'class-string';
    }
    public function accepts(\PHPStan\Type\Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(\PHPStan\Type\Type $type, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        return new \PHPStan\Type\AcceptsResult($type->isClassStringType(), []);
    }
    public function isSuperTypeOf(\PHPStan\Type\Type $type) : TrinaryLogic
    {
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return $type->isSubTypeOf($this);
        }
        return $type->isClassStringType();
    }
    public function isString() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isNumericString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isLiteralString() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isClassStringType() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function getClassStringObjectType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ObjectWithoutClassType();
    }
    public function getObjectTypeOrClassStringObjectType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ObjectWithoutClassType();
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode('class-string');
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\Reflection\ClassMemberAccessAnswerer;
use PHPStan\Reflection\ConstantReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Reflection\TrivialParametersAcceptor;
use PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection;
use PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use PHPStan\Type\Traits\NonGenericTypeTrait;
use PHPStan\Type\Traits\NonRemoveableTypeTrait;
use PHPStan\Type\Traits\UndecidedBooleanTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
/** @api */
class NeverType implements \PHPStan\Type\CompoundType
{
    use UndecidedBooleanTypeTrait;
    use NonGenericTypeTrait;
    use UndecidedComparisonCompoundTypeTrait;
    use NonRemoveableTypeTrait;
    use NonGeneralizableTypeTrait;
    /**
     * @var bool
     */
    private $isExplicit = \false;
    /** @api */
    public function __construct(bool $isExplicit = \false)
    {
        $this->isExplicit = $isExplicit;
    }
    public function isExplicit() : bool
    {
        return $this->isExplicit;
    }
    /**
     * @return string[]
     */
    public function getReferencedClasses() : array
    {
        return [];
    }
    public function getArrays() : array
    {
        return [];
    }
    public function getConstantArrays() : array
    {
        return [];
    }
    public function getObjectClassNames() : array
    {
        return [];
    }
    public function getObjectClassReflections() : array
    {
        return [];
    }
    public function getConstantStrings() : array
    {
        return [];
    }
    public function accepts(\PHPStan\Type\Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(\PHPStan\Type\Type $type, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        return \PHPStan\Type\AcceptsResult::createYes();
    }
    public function isSuperTypeOf(\PHPStan\Type\Type $type) : TrinaryLogic
    {
        if ($type instanceof self) {
            return TrinaryLogic::createYes();
        }
        return TrinaryLogic::createNo();
    }
    public function equals(\PHPStan\Type\Type $type) : bool
    {
        return $type instanceof self;
    }
    public function isSubTypeOf(\PHPStan\Type\Type $otherType) : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isAcceptedBy(\PHPStan\Type\Type $acceptingType, bool $strictTypes) : TrinaryLogic
    {
        return $this->isAcceptedWithReasonBy($acceptingType, $strictTypes)->result;
    }
    public function isAcceptedWithReasonBy(\PHPStan\Type\Type $acceptingType, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        return new \PHPStan\Type\AcceptsResult($this->isSubTypeOf($acceptingType), []);
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        return '*NEVER*';
    }
    public function getTemplateType(string $ancestorClassName, string $templateTypeName) : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\NeverType();
    }
    public function isObject() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isEnum() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function canAccessProperties() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function hasProperty(string $propertyName) : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getProperty(string $propertyName, ClassMemberAccessAnswerer $scope) : PropertyReflection
    {
        throw new ShouldNotHappenException();
    }
    public function getUnresolvedPropertyPrototype(string $propertyName, ClassMemberAccessAnswerer $scope) : UnresolvedPropertyPrototypeReflection
    {
        throw new ShouldNotHappenException();
    }
    public function canCallMethods() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function hasMethod(string $methodName) : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getMethod(string $methodName, ClassMemberAccessAnswerer $scope) : ExtendedMethodReflection
    {
        throw new ShouldNotHappenException();
    }
    public function getUnresolvedMethodPrototype(string $methodName, ClassMemberAccessAnswerer $scope) : UnresolvedMethodPrototypeReflection
    {
        throw new ShouldNotHappenException();
    }
    public function canAccessConstants() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function hasConstant(string $constantName) : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getConstant(string $constantName) : ConstantReflection
    {
        throw new ShouldNotHappenException();
    }
    public function isIterable() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isIterableAtLeastOnce() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getArraySize() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\NeverType();
    }
    public function getIterableKeyType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\NeverType();
    }
    public function getFirstIterableKeyType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\NeverType();
    }
    public function getLastIterableKeyType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\NeverType();
    }
    public function getIterableValueType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\NeverType();
    }
    public function getFirstIterableValueType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\NeverType();
    }
    public function getLastIterableValueType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\NeverType();
    }
    public function isArray() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantArray() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isOversizedArray() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isList() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isOffsetAccessible() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function hasOffsetValueType(\PHPStan\Type\Type $offsetType) : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function getOffsetValueType(\PHPStan\Type\Type $offsetType) : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\NeverType();
    }
    public function setOffsetValueType(?\PHPStan\Type\Type $offsetType, \PHPStan\Type\Type $valueType, bool $unionValues = \true) : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function unsetOffset(\PHPStan\Type\Type $offsetType) : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\NeverType();
    }
    public function getKeysArray() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\NeverType();
    }
    public function getValuesArray() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\NeverType();
    }
    public function fillKeysArray(\PHPStan\Type\Type $valueType) : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\NeverType();
    }
    public function flipArray() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\NeverType();
    }
    public function intersectKeyArray(\PHPStan\Type\Type $otherArraysType) : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\NeverType();
    }
    public function popArray() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\NeverType();
    }
    public function searchArray(\PHPStan\Type\Type $needleType) : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\NeverType();
    }
    public function shiftArray() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\NeverType();
    }
    public function shuffleArray() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\NeverType();
    }
    public function isCallable() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    /**
     * @return ParametersAcceptor[]
     */
    public function getCallableParametersAcceptors(ClassMemberAccessAnswerer $scope) : array
    {
        return [new TrivialParametersAcceptor()];
    }
    public function isCloneable() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function toNumber() : \PHPStan\Type\Type
    {
        return $this;
    }
    public function toString() : \PHPStan\Type\Type
    {
        return $this;
    }
    public function toInteger() : \PHPStan\Type\Type
    {
        return $this;
    }
    public function toFloat() : \PHPStan\Type\Type
    {
        return $this;
    }
    public function toArray() : \PHPStan\Type\Type
    {
        return $this;
    }
    public function toArrayKey() : \PHPStan\Type\Type
    {
        return $this;
    }
    public function traverse(callable $cb) : \PHPStan\Type\Type
    {
        return $this;
    }
    public function traverseSimultaneously(\PHPStan\Type\Type $right, callable $cb) : \PHPStan\Type\Type
    {
        return $this;
    }
    public function isNull() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantScalarValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getConstantScalarTypes() : array
    {
        return [];
    }
    public function getConstantScalarValues() : array
    {
        return [];
    }
    public function isTrue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFalse() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isBoolean() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFloat() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isInteger() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNumericString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isLiteralString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isClassStringType() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getClassStringObjectType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function getObjectTypeOrClassStringObjectType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function isVoid() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isScalar() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function looseCompare(\PHPStan\Type\Type $type, PhpVersion $phpVersion) : \PHPStan\Type\BooleanType
    {
        return new \PHPStan\Type\BooleanType();
    }
    public function getEnumCases() : array
    {
        return [];
    }
    public function exponentiate(\PHPStan\Type\Type $exponent) : \PHPStan\Type\Type
    {
        return $this;
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode('never');
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self($properties['isExplicit']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Reflection\ClassReflection;
/** @api */
interface TypeWithClassName extends \PHPStan\Type\Type
{
    public function getClassName() : string;
    public function getAncestorWithClassName(string $className) : ?self;
    public function getClassReflection() : ?ClassReflection;
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

/** @api */
interface ConstantType extends \PHPStan\Type\Type
{
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\Reflection\ClassMemberAccessAnswerer;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ConstantReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection;
use PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\Enum\EnumCaseObjectType;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\Generic\TemplateTypeReference;
use PHPStan\Type\Generic\TemplateTypeVariance;
/**
 * @api
 * @see https://phpstan.org/developing-extensions/type-system
 */
interface Type
{
    /**
     * @return string[]
     */
    public function getReferencedClasses() : array;
    /** @return list<string> */
    public function getObjectClassNames() : array;
    /**
     * @return list<ClassReflection>
     */
    public function getObjectClassReflections() : array;
    /**
     * Returns object type Foo for class-string<Foo> and 'Foo' (if Foo is a valid class).
     */
    public function getClassStringObjectType() : \PHPStan\Type\Type;
    /**
     * Returns object type Foo for class-string<Foo>, 'Foo' (if Foo is a valid class),
     * and object type Foo.
     */
    public function getObjectTypeOrClassStringObjectType() : \PHPStan\Type\Type;
    public function isObject() : TrinaryLogic;
    public function isEnum() : TrinaryLogic;
    /** @return list<ArrayType> */
    public function getArrays() : array;
    /** @return list<ConstantArrayType> */
    public function getConstantArrays() : array;
    /** @return list<ConstantStringType> */
    public function getConstantStrings() : array;
    public function accepts(\PHPStan\Type\Type $type, bool $strictTypes) : TrinaryLogic;
    /**
     * This is like accepts() but gives reasons
     * why the type was not/might not be accepted in some non-intuitive scenarios.
     *
     * In PHPStan 2.0 this method will be removed and the return type of accepts()
     * will change to AcceptsResult.
     */
    public function acceptsWithReason(\PHPStan\Type\Type $type, bool $strictTypes) : \PHPStan\Type\AcceptsResult;
    public function isSuperTypeOf(\PHPStan\Type\Type $type) : TrinaryLogic;
    public function equals(\PHPStan\Type\Type $type) : bool;
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string;
    public function canAccessProperties() : TrinaryLogic;
    public function hasProperty(string $propertyName) : TrinaryLogic;
    public function getProperty(string $propertyName, ClassMemberAccessAnswerer $scope) : PropertyReflection;
    public function getUnresolvedPropertyPrototype(string $propertyName, ClassMemberAccessAnswerer $scope) : UnresolvedPropertyPrototypeReflection;
    public function canCallMethods() : TrinaryLogic;
    public function hasMethod(string $methodName) : TrinaryLogic;
    public function getMethod(string $methodName, ClassMemberAccessAnswerer $scope) : ExtendedMethodReflection;
    public function getUnresolvedMethodPrototype(string $methodName, ClassMemberAccessAnswerer $scope) : UnresolvedMethodPrototypeReflection;
    public function canAccessConstants() : TrinaryLogic;
    public function hasConstant(string $constantName) : TrinaryLogic;
    public function getConstant(string $constantName) : ConstantReflection;
    public function isIterable() : TrinaryLogic;
    public function isIterableAtLeastOnce() : TrinaryLogic;
    public function getArraySize() : \PHPStan\Type\Type;
    public function getIterableKeyType() : \PHPStan\Type\Type;
    public function getFirstIterableKeyType() : \PHPStan\Type\Type;
    public function getLastIterableKeyType() : \PHPStan\Type\Type;
    public function getIterableValueType() : \PHPStan\Type\Type;
    public function getFirstIterableValueType() : \PHPStan\Type\Type;
    public function getLastIterableValueType() : \PHPStan\Type\Type;
    public function isArray() : TrinaryLogic;
    public function isConstantArray() : TrinaryLogic;
    public function isOversizedArray() : TrinaryLogic;
    public function isList() : TrinaryLogic;
    public function isOffsetAccessible() : TrinaryLogic;
    public function hasOffsetValueType(\PHPStan\Type\Type $offsetType) : TrinaryLogic;
    public function getOffsetValueType(\PHPStan\Type\Type $offsetType) : \PHPStan\Type\Type;
    public function setOffsetValueType(?\PHPStan\Type\Type $offsetType, \PHPStan\Type\Type $valueType, bool $unionValues = \true) : \PHPStan\Type\Type;
    public function unsetOffset(\PHPStan\Type\Type $offsetType) : \PHPStan\Type\Type;
    public function getKeysArray() : \PHPStan\Type\Type;
    public function getValuesArray() : \PHPStan\Type\Type;
    public function fillKeysArray(\PHPStan\Type\Type $valueType) : \PHPStan\Type\Type;
    public function flipArray() : \PHPStan\Type\Type;
    public function intersectKeyArray(\PHPStan\Type\Type $otherArraysType) : \PHPStan\Type\Type;
    public function popArray() : \PHPStan\Type\Type;
    public function searchArray(\PHPStan\Type\Type $needleType) : \PHPStan\Type\Type;
    public function shiftArray() : \PHPStan\Type\Type;
    public function shuffleArray() : \PHPStan\Type\Type;
    /**
     * @return list<EnumCaseObjectType>
     */
    public function getEnumCases() : array;
    public function exponentiate(\PHPStan\Type\Type $exponent) : \PHPStan\Type\Type;
    public function isCallable() : TrinaryLogic;
    /**
     * @return ParametersAcceptor[]
     */
    public function getCallableParametersAcceptors(ClassMemberAccessAnswerer $scope) : array;
    public function isCloneable() : TrinaryLogic;
    public function toBoolean() : \PHPStan\Type\BooleanType;
    public function toNumber() : \PHPStan\Type\Type;
    public function toInteger() : \PHPStan\Type\Type;
    public function toFloat() : \PHPStan\Type\Type;
    public function toString() : \PHPStan\Type\Type;
    public function toArray() : \PHPStan\Type\Type;
    public function toArrayKey() : \PHPStan\Type\Type;
    public function isSmallerThan(\PHPStan\Type\Type $otherType) : TrinaryLogic;
    public function isSmallerThanOrEqual(\PHPStan\Type\Type $otherType) : TrinaryLogic;
    /**
     * Is Type of a known constant value? Includes literal strings, integers, floats, true, false, null, and array shapes.
     */
    public function isConstantValue() : TrinaryLogic;
    /**
     * Is Type of a known constant scalar value? Includes literal strings, integers, floats, true, false, and null.
     */
    public function isConstantScalarValue() : TrinaryLogic;
    /**
     * @return list<ConstantScalarType>
     */
    public function getConstantScalarTypes() : array;
    /**
     * @return list<int|float|string|bool|null>
     */
    public function getConstantScalarValues() : array;
    public function isNull() : TrinaryLogic;
    public function isTrue() : TrinaryLogic;
    public function isFalse() : TrinaryLogic;
    public function isBoolean() : TrinaryLogic;
    public function isFloat() : TrinaryLogic;
    public function isInteger() : TrinaryLogic;
    public function isString() : TrinaryLogic;
    public function isNumericString() : TrinaryLogic;
    public function isNonEmptyString() : TrinaryLogic;
    public function isNonFalsyString() : TrinaryLogic;
    public function isLiteralString() : TrinaryLogic;
    public function isClassStringType() : TrinaryLogic;
    public function isVoid() : TrinaryLogic;
    public function isScalar() : TrinaryLogic;
    public function looseCompare(\PHPStan\Type\Type $type, PhpVersion $phpVersion) : \PHPStan\Type\BooleanType;
    public function getSmallerType() : \PHPStan\Type\Type;
    public function getSmallerOrEqualType() : \PHPStan\Type\Type;
    public function getGreaterType() : \PHPStan\Type\Type;
    public function getGreaterOrEqualType() : \PHPStan\Type\Type;
    /**
     * Returns actual template type for a given object.
     *
     * Example:
     *
     * @-template T
     * class Foo {}
     *
     * // $fooType is Foo<int>
     * $t = $fooType->getTemplateType(Foo::class, 'T');
     * $t->isInteger(); // yes
     *
     * Returns ErrorType in case of a missing type.
     *
     * @param class-string $ancestorClassName
     */
    public function getTemplateType(string $ancestorClassName, string $templateTypeName) : \PHPStan\Type\Type;
    /**
     * Infers template types
     *
     * Infers the real Type of the TemplateTypes found in $this, based on
     * the received Type.
     */
    public function inferTemplateTypes(\PHPStan\Type\Type $receivedType) : TemplateTypeMap;
    /**
     * Returns the template types referenced by this Type, recursively
     *
     * The return value is a list of TemplateTypeReferences, who contain the
     * referenced template type as well as the variance position in which it was
     * found.
     *
     * For example, calling this on array<Foo<T>,Bar> (with T a template type)
     * will return one TemplateTypeReference for the type T.
     *
     * @param TemplateTypeVariance $positionVariance The variance position in
     *                                               which the receiver type was
     *                                               found.
     *
     * @return TemplateTypeReference[]
     */
    public function getReferencedTemplateTypes(TemplateTypeVariance $positionVariance) : array;
    /**
     * Traverses inner types
     *
     * Returns a new instance with all inner types mapped through $cb. Might
     * return the same instance if inner types did not change.
     *
     * @param callable(Type):Type $cb
     */
    public function traverse(callable $cb) : \PHPStan\Type\Type;
    /**
     * Traverses inner types while keeping the same context in another type.
     *
     * @param callable(Type $left, Type $right): Type $cb
     */
    public function traverseSimultaneously(\PHPStan\Type\Type $right, callable $cb) : \PHPStan\Type\Type;
    public function toPhpDocNode() : TypeNode;
    /**
     * Return the difference with another type, or null if it cannot be represented.
     *
     * @see TypeCombinator::remove()
     */
    public function tryRemove(\PHPStan\Type\Type $typeToRemove) : ?\PHPStan\Type\Type;
    public function generalize(\PHPStan\Type\GeneralizePrecision $precision) : \PHPStan\Type\Type;
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : self;
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\PhpDocParser\Ast\Type\GenericTypeNode;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\Type\Generic\TemplateTypeVariance;
use PHPStan\Type\Traits\LateResolvableTypeTrait;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use function sprintf;
/** @api */
final class ValueOfType implements \PHPStan\Type\CompoundType, \PHPStan\Type\LateResolvableType
{
    use LateResolvableTypeTrait;
    use NonGeneralizableTypeTrait;
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    public function __construct(\PHPStan\Type\Type $type)
    {
        $this->type = $type;
    }
    public function getReferencedClasses() : array
    {
        return $this->type->getReferencedClasses();
    }
    public function getReferencedTemplateTypes(TemplateTypeVariance $positionVariance) : array
    {
        return $this->type->getReferencedTemplateTypes($positionVariance);
    }
    public function equals(\PHPStan\Type\Type $type) : bool
    {
        return $type instanceof self && $this->type->equals($type->type);
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        return sprintf('value-of<%s>', $this->type->describe($level));
    }
    public function isResolvable() : bool
    {
        return !\PHPStan\Type\TypeUtils::containsTemplateType($this->type);
    }
    protected function getResult() : \PHPStan\Type\Type
    {
        return $this->type->getIterableValueType();
    }
    /**
     * @param callable(Type): Type $cb
     */
    public function traverse(callable $cb) : \PHPStan\Type\Type
    {
        $type = $cb($this->type);
        if ($this->type === $type) {
            return $this;
        }
        return new self($type);
    }
    public function traverseSimultaneously(\PHPStan\Type\Type $right, callable $cb) : \PHPStan\Type\Type
    {
        if (!$right instanceof self) {
            return $this;
        }
        $type = $cb($this->type, $right->type);
        if ($this->type === $type) {
            return $this;
        }
        return new self($type);
    }
    public function toPhpDocNode() : TypeNode
    {
        return new GenericTypeNode(new IdentifierTypeNode('value-of'), [$this->type->toPhpDocNode()]);
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self($properties['type']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Php\PhpVersion;
use PHPStan\Type\Constant\ConstantBooleanType;
final class LooseComparisonHelper
{
    public static function compareConstantScalars(\PHPStan\Type\ConstantScalarType $leftType, \PHPStan\Type\ConstantScalarType $rightType, PhpVersion $phpVersion) : \PHPStan\Type\BooleanType
    {
        if ($phpVersion->castsNumbersToStringsOnLooseComparison()) {
            $isNumber = new \PHPStan\Type\UnionType([new \PHPStan\Type\IntegerType(), new \PHPStan\Type\FloatType()]);
            if ($leftType->isString()->yes() && $leftType->isNumericString()->no() && $isNumber->isSuperTypeOf($rightType)->yes()) {
                $stringValue = (string) $rightType->getValue();
                return new ConstantBooleanType($stringValue === $leftType->getValue());
            }
            if ($rightType->isString()->yes() && $rightType->isNumericString()->no() && $isNumber->isSuperTypeOf($leftType)->yes()) {
                $stringValue = (string) $leftType->getValue();
                return new ConstantBooleanType($stringValue === $rightType->getValue());
            }
        } else {
            if ($leftType->isString()->yes() && $leftType->isNumericString()->no() && $rightType->isFloat()->yes()) {
                $numericPart = (float) $leftType->getValue();
                return new ConstantBooleanType($numericPart === $rightType->getValue());
            }
            if ($rightType->isString()->yes() && $rightType->isNumericString()->no() && $leftType->isFloat()->yes()) {
                $numericPart = (float) $rightType->getValue();
                return new ConstantBooleanType($numericPart === $leftType->getValue());
            }
            if ($leftType->isString()->yes() && $leftType->isNumericString()->no() && $rightType->isInteger()->yes()) {
                $numericPart = (int) $leftType->getValue();
                return new ConstantBooleanType($numericPart === $rightType->getValue());
            }
            if ($rightType->isString()->yes() && $rightType->isNumericString()->no() && $leftType->isInteger()->yes()) {
                $numericPart = (int) $rightType->getValue();
                return new ConstantBooleanType($numericPart === $leftType->getValue());
            }
        }
        // @phpstan-ignore-next-line
        return new ConstantBooleanType($leftType->getValue() == $rightType->getValue());
        // phpcs:ignore
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Reflection\ReflectionProviderStaticAccessor;
use PHPStan\TrinaryLogic;
use stdClass;
class ObjectShapePropertyReflection implements PropertyReflection
{
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    public function __construct(\PHPStan\Type\Type $type)
    {
        $this->type = $type;
    }
    public function getDeclaringClass() : ClassReflection
    {
        $reflectionProvider = ReflectionProviderStaticAccessor::getInstance();
        return $reflectionProvider->getClass(stdClass::class);
    }
    public function isStatic() : bool
    {
        return \false;
    }
    public function isPrivate() : bool
    {
        return \false;
    }
    public function isPublic() : bool
    {
        return \true;
    }
    public function getDocComment() : ?string
    {
        return null;
    }
    public function getReadableType() : \PHPStan\Type\Type
    {
        return $this->type;
    }
    public function getWritableType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\NeverType();
    }
    public function canChangeTypeAfterAssignment() : bool
    {
        return \false;
    }
    public function isReadable() : bool
    {
        return \true;
    }
    public function isWritable() : bool
    {
        return \false;
    }
    public function isDeprecated() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getDeprecatedDescription() : ?string
    {
        return null;
    }
    public function isInternal() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use function array_map;
use function array_merge;
/** @api */
class AcceptsResult
{
    /**
     * @readonly
     * @var \PHPStan\TrinaryLogic
     */
    public $result;
    /**
     * @var list<string>
     * @readonly
     */
    public $reasons;
    /**
     * @param list<string> $reasons
     */
    public function __construct(TrinaryLogic $result, array $reasons)
    {
        $this->result = $result;
        $this->reasons = $reasons;
    }
    public function yes() : bool
    {
        return $this->result->yes();
    }
    public function maybe() : bool
    {
        return $this->result->maybe();
    }
    public function no() : bool
    {
        return $this->result->no();
    }
    public static function createYes() : self
    {
        return new self(TrinaryLogic::createYes(), []);
    }
    public static function createNo() : self
    {
        return new self(TrinaryLogic::createNo(), []);
    }
    public static function createMaybe() : self
    {
        return new self(TrinaryLogic::createMaybe(), []);
    }
    public static function createFromBoolean(bool $value) : self
    {
        return new self(TrinaryLogic::createFromBoolean($value), []);
    }
    public function and(self $other) : self
    {
        return new self($this->result->and($other->result), array_merge($this->reasons, $other->reasons));
    }
    public function or(self $other) : self
    {
        return new self($this->result->or($other->result), array_merge($this->reasons, $other->reasons));
    }
    /**
     * @param callable(string): string $cb
     */
    public function decorateReasons(callable $cb) : self
    {
        $reasons = [];
        foreach ($this->reasons as $reason) {
            $reasons[] = $cb($reason);
        }
        return new self($this->result, $reasons);
    }
    public static function extremeIdentity(self ...$operands) : self
    {
        if ($operands === []) {
            throw new ShouldNotHappenException();
        }
        $result = TrinaryLogic::extremeIdentity(...array_map(static function (self $result) {
            return $result->result;
        }, $operands));
        $reasons = [];
        foreach ($operands as $operand) {
            foreach ($operand->reasons as $reason) {
                $reasons[] = $reason;
            }
        }
        return new self($result, $reasons);
    }
    public static function maxMin(self ...$operands) : self
    {
        if ($operands === []) {
            throw new ShouldNotHappenException();
        }
        $result = TrinaryLogic::maxMin(...array_map(static function (self $result) {
            return $result->result;
        }, $operands));
        $reasons = [];
        foreach ($operands as $operand) {
            foreach ($operand->reasons as $reason) {
                $reasons[] = $reason;
            }
        }
        return new self($result, $reasons);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

class GeneralizePrecision
{
    private const LESS_SPECIFIC = 1;
    private const MORE_SPECIFIC = 2;
    private const TEMPLATE_ARGUMENT = 3;
    /** @var self[] */
    private static $registry;
    /**
     * @var int
     */
    private $value;
    private function __construct(int $value)
    {
        $this->value = $value;
    }
    private static function create(int $value) : self
    {
        self::$registry[$value] = self::$registry[$value] ?? new self($value);
        return self::$registry[$value];
    }
    /** @api */
    public static function lessSpecific() : self
    {
        return self::create(self::LESS_SPECIFIC);
    }
    /** @api */
    public static function moreSpecific() : self
    {
        return self::create(self::MORE_SPECIFIC);
    }
    /** @api */
    public static function templateArgument() : self
    {
        return self::create(self::TEMPLATE_ARGUMENT);
    }
    public function isLessSpecific() : bool
    {
        return $this->value === self::LESS_SPECIFIC;
    }
    public function isMoreSpecific() : bool
    {
        return $this->value === self::MORE_SPECIFIC;
    }
    public function isTemplateArgument() : bool
    {
        return $this->value === self::TEMPLATE_ARGUMENT;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\GenericTypeNode;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\Reflection\ClassMemberAccessAnswerer;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\Reflection\TrivialParametersAcceptor;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\Accessory\HasOffsetType;
use PHPStan\Type\Accessory\HasOffsetValueType;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantFloatType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\Generic\TemplateMixedType;
use PHPStan\Type\Generic\TemplateType;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\Generic\TemplateTypeVariance;
use PHPStan\Type\Traits\MaybeCallableTypeTrait;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use PHPStan\Type\Traits\NonObjectTypeTrait;
use PHPStan\Type\Traits\UndecidedBooleanTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonTypeTrait;
use function array_merge;
use function count;
use function sprintf;
/** @api */
class ArrayType implements \PHPStan\Type\Type
{
    use MaybeCallableTypeTrait;
    use NonObjectTypeTrait;
    use UndecidedBooleanTypeTrait;
    use UndecidedComparisonTypeTrait;
    use NonGeneralizableTypeTrait;
    /**
     * @var \PHPStan\Type\Type
     */
    private $keyType;
    /**
     * @var \PHPStan\Type\Type
     */
    private $itemType;
    /** @api */
    public function __construct(\PHPStan\Type\Type $keyType, \PHPStan\Type\Type $itemType)
    {
        $this->itemType = $itemType;
        if ($keyType->describe(\PHPStan\Type\VerbosityLevel::value()) === '(int|string)') {
            $keyType = new \PHPStan\Type\MixedType();
        }
        $this->keyType = $keyType;
    }
    public function getKeyType() : \PHPStan\Type\Type
    {
        return $this->keyType;
    }
    public function getItemType() : \PHPStan\Type\Type
    {
        return $this->itemType;
    }
    /**
     * @return string[]
     */
    public function getReferencedClasses() : array
    {
        return array_merge($this->keyType->getReferencedClasses(), $this->getItemType()->getReferencedClasses());
    }
    public function getObjectClassNames() : array
    {
        return [];
    }
    public function getObjectClassReflections() : array
    {
        return [];
    }
    public function getArrays() : array
    {
        return [$this];
    }
    public function getConstantArrays() : array
    {
        return [];
    }
    public function accepts(\PHPStan\Type\Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(\PHPStan\Type\Type $type, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        if ($type instanceof ConstantArrayType) {
            $result = \PHPStan\Type\AcceptsResult::createYes();
            $thisKeyType = $this->keyType;
            $itemType = $this->getItemType();
            foreach ($type->getKeyTypes() as $i => $keyType) {
                $valueType = $type->getValueTypes()[$i];
                $acceptsKey = $thisKeyType->acceptsWithReason($keyType, $strictTypes);
                $acceptsValue = $itemType->acceptsWithReason($valueType, $strictTypes);
                $result = $result->and($acceptsKey)->and($acceptsValue);
            }
            return $result;
        }
        if ($type instanceof \PHPStan\Type\ArrayType) {
            return $this->getItemType()->acceptsWithReason($type->getItemType(), $strictTypes)->and($this->keyType->acceptsWithReason($type->keyType, $strictTypes));
        }
        return \PHPStan\Type\AcceptsResult::createNo();
    }
    public function isSuperTypeOf(\PHPStan\Type\Type $type) : TrinaryLogic
    {
        if ($type instanceof self) {
            return $this->getItemType()->isSuperTypeOf($type->getItemType())->and($this->keyType->isSuperTypeOf($type->keyType));
        }
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return $type->isSubTypeOf($this);
        }
        return TrinaryLogic::createNo();
    }
    public function equals(\PHPStan\Type\Type $type) : bool
    {
        return $type instanceof self && $type->isConstantArray()->no() && $this->getItemType()->equals($type->getIterableValueType()) && $this->keyType->equals($type->keyType);
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        $isMixedKeyType = $this->keyType instanceof \PHPStan\Type\MixedType && $this->keyType->describe(\PHPStan\Type\VerbosityLevel::precise()) === 'mixed';
        $isMixedItemType = $this->itemType instanceof \PHPStan\Type\MixedType && $this->itemType->describe(\PHPStan\Type\VerbosityLevel::precise()) === 'mixed';
        $valueHandler = function () use($level, $isMixedKeyType, $isMixedItemType) : string {
            if ($isMixedKeyType || $this->keyType instanceof \PHPStan\Type\NeverType) {
                if ($isMixedItemType || $this->itemType instanceof \PHPStan\Type\NeverType) {
                    return 'array';
                }
                return sprintf('array<%s>', $this->itemType->describe($level));
            }
            return sprintf('array<%s, %s>', $this->keyType->describe($level), $this->itemType->describe($level));
        };
        return $level->handle($valueHandler, $valueHandler, function () use($level, $isMixedKeyType, $isMixedItemType) : string {
            if ($isMixedKeyType) {
                if ($isMixedItemType) {
                    return 'array';
                }
                return sprintf('array<%s>', $this->itemType->describe($level));
            }
            return sprintf('array<%s, %s>', $this->keyType->describe($level), $this->itemType->describe($level));
        });
    }
    /**
     * @deprecated
     */
    public function generalizeKeys() : self
    {
        return new self($this->keyType->generalize(\PHPStan\Type\GeneralizePrecision::lessSpecific()), $this->itemType);
    }
    public function generalizeValues() : self
    {
        return new self($this->keyType, $this->itemType->generalize(\PHPStan\Type\GeneralizePrecision::lessSpecific()));
    }
    public function getKeysArray() : \PHPStan\Type\Type
    {
        return AccessoryArrayListType::intersectWith(new self(new \PHPStan\Type\IntegerType(), $this->getIterableKeyType()));
    }
    public function getValuesArray() : \PHPStan\Type\Type
    {
        return AccessoryArrayListType::intersectWith(new self(new \PHPStan\Type\IntegerType(), $this->itemType));
    }
    public function isIterable() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isIterableAtLeastOnce() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getArraySize() : \PHPStan\Type\Type
    {
        return \PHPStan\Type\IntegerRangeType::fromInterval(0, null);
    }
    public function getIterableKeyType() : \PHPStan\Type\Type
    {
        $keyType = $this->keyType;
        if ($keyType instanceof \PHPStan\Type\MixedType && !$keyType instanceof TemplateMixedType) {
            return new \PHPStan\Type\BenevolentUnionType([new \PHPStan\Type\IntegerType(), new \PHPStan\Type\StringType()]);
        }
        if ($keyType instanceof \PHPStan\Type\StrictMixedType) {
            return new \PHPStan\Type\BenevolentUnionType([new \PHPStan\Type\IntegerType(), new \PHPStan\Type\StringType()]);
        }
        return $keyType;
    }
    public function getFirstIterableKeyType() : \PHPStan\Type\Type
    {
        return $this->getIterableKeyType();
    }
    public function getLastIterableKeyType() : \PHPStan\Type\Type
    {
        return $this->getIterableKeyType();
    }
    public function getIterableValueType() : \PHPStan\Type\Type
    {
        return $this->getItemType();
    }
    public function getFirstIterableValueType() : \PHPStan\Type\Type
    {
        return $this->getItemType();
    }
    public function getLastIterableValueType() : \PHPStan\Type\Type
    {
        return $this->getItemType();
    }
    public function isArray() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isConstantArray() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isOversizedArray() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isList() : TrinaryLogic
    {
        if (\PHPStan\Type\IntegerRangeType::fromInterval(0, null)->isSuperTypeOf($this->getKeyType())->no()) {
            return TrinaryLogic::createNo();
        }
        return TrinaryLogic::createMaybe();
    }
    public function isNull() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantScalarValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getConstantScalarTypes() : array
    {
        return [];
    }
    public function getConstantScalarValues() : array
    {
        return [];
    }
    public function isTrue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFalse() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isBoolean() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFloat() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isInteger() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNumericString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isLiteralString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isClassStringType() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getClassStringObjectType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function getObjectTypeOrClassStringObjectType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function isVoid() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isScalar() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function looseCompare(\PHPStan\Type\Type $type, PhpVersion $phpVersion) : \PHPStan\Type\BooleanType
    {
        return new \PHPStan\Type\BooleanType();
    }
    public function isOffsetAccessible() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function hasOffsetValueType(\PHPStan\Type\Type $offsetType) : TrinaryLogic
    {
        $offsetType = $offsetType->toArrayKey();
        if ($this->getKeyType()->isSuperTypeOf($offsetType)->no()) {
            return TrinaryLogic::createNo();
        }
        return TrinaryLogic::createMaybe();
    }
    public function getOffsetValueType(\PHPStan\Type\Type $offsetType) : \PHPStan\Type\Type
    {
        $offsetType = $offsetType->toArrayKey();
        if ($this->getKeyType()->isSuperTypeOf($offsetType)->no()) {
            return new \PHPStan\Type\ErrorType();
        }
        $type = $this->getItemType();
        if ($type instanceof \PHPStan\Type\ErrorType) {
            return new \PHPStan\Type\MixedType();
        }
        return $type;
    }
    public function setOffsetValueType(?\PHPStan\Type\Type $offsetType, \PHPStan\Type\Type $valueType, bool $unionValues = \true) : \PHPStan\Type\Type
    {
        if ($offsetType === null) {
            $isKeyTypeInteger = $this->keyType->isInteger();
            if ($isKeyTypeInteger->no()) {
                $offsetType = new \PHPStan\Type\IntegerType();
            } elseif ($isKeyTypeInteger->yes()) {
                $offsetType = $this->keyType;
            } else {
                $integerTypes = [];
                \PHPStan\Type\TypeTraverser::map($this->keyType, static function (\PHPStan\Type\Type $type, callable $traverse) use(&$integerTypes) : \PHPStan\Type\Type {
                    if ($type instanceof \PHPStan\Type\UnionType) {
                        return $traverse($type);
                    }
                    $isInteger = $type->isInteger();
                    if ($isInteger->yes()) {
                        $integerTypes[] = $type;
                    }
                    return $type;
                });
                if (count($integerTypes) === 0) {
                    $offsetType = $this->keyType;
                } else {
                    $offsetType = \PHPStan\Type\TypeCombinator::union(...$integerTypes);
                }
            }
        } else {
            $offsetType = $offsetType->toArrayKey();
        }
        if ($offsetType instanceof ConstantStringType || $offsetType instanceof ConstantIntegerType) {
            if ($offsetType->isSuperTypeOf($this->keyType)->yes()) {
                $builder = ConstantArrayTypeBuilder::createEmpty();
                $builder->setOffsetValueType($offsetType, $valueType);
                return $builder->getArray();
            }
            return \PHPStan\Type\TypeCombinator::intersect(new self(\PHPStan\Type\TypeCombinator::union($this->keyType, $offsetType), \PHPStan\Type\TypeCombinator::union($this->itemType, $valueType)), new HasOffsetValueType($offsetType, $valueType), new NonEmptyArrayType());
        }
        return \PHPStan\Type\TypeCombinator::intersect(new self(\PHPStan\Type\TypeCombinator::union($this->keyType, $offsetType), $unionValues ? \PHPStan\Type\TypeCombinator::union($this->itemType, $valueType) : $valueType), new NonEmptyArrayType());
    }
    public function unsetOffset(\PHPStan\Type\Type $offsetType) : \PHPStan\Type\Type
    {
        $offsetType = $offsetType->toArrayKey();
        if (($offsetType instanceof ConstantIntegerType || $offsetType instanceof ConstantStringType) && !$this->keyType->isSuperTypeOf($offsetType)->no()) {
            $keyType = \PHPStan\Type\TypeCombinator::remove($this->keyType, $offsetType);
            if ($keyType instanceof \PHPStan\Type\NeverType) {
                return new ConstantArrayType([], []);
            }
            return new self($keyType, $this->itemType);
        }
        return $this;
    }
    public function fillKeysArray(\PHPStan\Type\Type $valueType) : \PHPStan\Type\Type
    {
        $itemType = $this->getItemType();
        if ((new \PHPStan\Type\IntegerType())->isSuperTypeOf($itemType)->no()) {
            $stringKeyType = $itemType->toString();
            if ($stringKeyType instanceof \PHPStan\Type\ErrorType) {
                return $stringKeyType;
            }
            return new \PHPStan\Type\ArrayType($stringKeyType, $valueType);
        }
        return new \PHPStan\Type\ArrayType($itemType, $valueType);
    }
    public function flipArray() : \PHPStan\Type\Type
    {
        return new self($this->getIterableValueType()->toArrayKey(), $this->getIterableKeyType());
    }
    public function intersectKeyArray(\PHPStan\Type\Type $otherArraysType) : \PHPStan\Type\Type
    {
        $isKeySuperType = $otherArraysType->getIterableKeyType()->isSuperTypeOf($this->getIterableKeyType());
        if ($isKeySuperType->no()) {
            return ConstantArrayTypeBuilder::createEmpty()->getArray();
        }
        if ($isKeySuperType->yes()) {
            return $otherArraysType->isIterableAtLeastOnce()->yes() ? \PHPStan\Type\TypeCombinator::intersect($this, new NonEmptyArrayType()) : $this;
        }
        return new self($otherArraysType->getIterableKeyType(), $this->getIterableValueType());
    }
    public function popArray() : \PHPStan\Type\Type
    {
        return $this;
    }
    public function searchArray(\PHPStan\Type\Type $needleType) : \PHPStan\Type\Type
    {
        return \PHPStan\Type\TypeCombinator::union($this->getIterableKeyType(), new ConstantBooleanType(\false));
    }
    public function shiftArray() : \PHPStan\Type\Type
    {
        return $this;
    }
    public function shuffleArray() : \PHPStan\Type\Type
    {
        return AccessoryArrayListType::intersectWith(new self(new \PHPStan\Type\IntegerType(), $this->itemType));
    }
    public function isCallable() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe()->and($this->itemType->isString());
    }
    /**
     * @return ParametersAcceptor[]
     */
    public function getCallableParametersAcceptors(ClassMemberAccessAnswerer $scope) : array
    {
        if ($this->isCallable()->no()) {
            throw new ShouldNotHappenException();
        }
        return [new TrivialParametersAcceptor()];
    }
    public function toNumber() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toString() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function toInteger() : \PHPStan\Type\Type
    {
        return \PHPStan\Type\TypeCombinator::union(new ConstantIntegerType(0), new ConstantIntegerType(1));
    }
    public function toFloat() : \PHPStan\Type\Type
    {
        return \PHPStan\Type\TypeCombinator::union(new ConstantFloatType(0.0), new ConstantFloatType(1.0));
    }
    public function toArray() : \PHPStan\Type\Type
    {
        return $this;
    }
    public function toArrayKey() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    /** @deprecated Use getArraySize() instead */
    public function count() : \PHPStan\Type\Type
    {
        return $this->getArraySize();
    }
    /** @deprecated Use $offsetType->toArrayKey() instead */
    public static function castToArrayKeyType(\PHPStan\Type\Type $offsetType) : \PHPStan\Type\Type
    {
        return $offsetType->toArrayKey();
    }
    public function inferTemplateTypes(\PHPStan\Type\Type $receivedType) : TemplateTypeMap
    {
        if ($receivedType instanceof \PHPStan\Type\UnionType || $receivedType instanceof \PHPStan\Type\IntersectionType) {
            return $receivedType->inferTemplateTypesOn($this);
        }
        if ($receivedType->isArray()->yes()) {
            $keyTypeMap = $this->getKeyType()->inferTemplateTypes($receivedType->getIterableKeyType());
            $itemTypeMap = $this->getItemType()->inferTemplateTypes($receivedType->getIterableValueType());
            return $keyTypeMap->union($itemTypeMap);
        }
        return TemplateTypeMap::createEmpty();
    }
    public function getReferencedTemplateTypes(TemplateTypeVariance $positionVariance) : array
    {
        $keyVariance = $positionVariance;
        $itemVariance = $positionVariance;
        if (!$positionVariance->contravariant()) {
            $keyType = $this->getKeyType();
            if ($keyType instanceof TemplateType) {
                $keyVariance = $keyType->getVariance();
            }
            $itemType = $this->getItemType();
            if ($itemType instanceof TemplateType) {
                $itemVariance = $itemType->getVariance();
            }
        }
        return array_merge($this->getKeyType()->getReferencedTemplateTypes($keyVariance), $this->getItemType()->getReferencedTemplateTypes($itemVariance));
    }
    public function traverse(callable $cb) : \PHPStan\Type\Type
    {
        $keyType = $cb($this->keyType);
        $itemType = $cb($this->itemType);
        if ($keyType !== $this->keyType || $itemType !== $this->itemType) {
            if ($keyType instanceof \PHPStan\Type\NeverType && $itemType instanceof \PHPStan\Type\NeverType) {
                return new ConstantArrayType([], []);
            }
            return new self($keyType, $itemType);
        }
        return $this;
    }
    public function toPhpDocNode() : TypeNode
    {
        $isMixedKeyType = $this->keyType instanceof \PHPStan\Type\MixedType && $this->keyType->describe(\PHPStan\Type\VerbosityLevel::precise()) === 'mixed';
        $isMixedItemType = $this->itemType instanceof \PHPStan\Type\MixedType && $this->itemType->describe(\PHPStan\Type\VerbosityLevel::precise()) === 'mixed';
        if ($isMixedKeyType) {
            if ($isMixedItemType) {
                return new IdentifierTypeNode('array');
            }
            return new GenericTypeNode(new IdentifierTypeNode('array'), [$this->itemType->toPhpDocNode()]);
        }
        return new GenericTypeNode(new IdentifierTypeNode('array'), [$this->keyType->toPhpDocNode(), $this->itemType->toPhpDocNode()]);
    }
    public function traverseSimultaneously(\PHPStan\Type\Type $right, callable $cb) : \PHPStan\Type\Type
    {
        $keyType = $cb($this->keyType, $right->getIterableKeyType());
        $itemType = $cb($this->itemType, $right->getIterableValueType());
        if ($keyType !== $this->keyType || $itemType !== $this->itemType) {
            if ($keyType instanceof \PHPStan\Type\NeverType && $itemType instanceof \PHPStan\Type\NeverType) {
                return new ConstantArrayType([], []);
            }
            return new self($keyType, $itemType);
        }
        return $this;
    }
    public function tryRemove(\PHPStan\Type\Type $typeToRemove) : ?\PHPStan\Type\Type
    {
        if ($typeToRemove->isConstantArray()->yes() && $typeToRemove->isIterableAtLeastOnce()->no()) {
            return \PHPStan\Type\TypeCombinator::intersect($this, new NonEmptyArrayType());
        }
        if ($typeToRemove instanceof NonEmptyArrayType) {
            return new ConstantArrayType([], []);
        }
        if ($this->isConstantArray()->yes() && $typeToRemove instanceof HasOffsetType) {
            return $this->unsetOffset($typeToRemove->getOffsetType());
        }
        if ($this->isConstantArray()->yes() && $typeToRemove instanceof HasOffsetValueType) {
            return $this->unsetOffset($typeToRemove->getOffsetType());
        }
        return null;
    }
    public function exponentiate(\PHPStan\Type\Type $exponent) : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self($properties['keyType'], $properties['itemType']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

interface TypeAliasResolverProvider
{
    public function getTypeAliasResolver() : \PHPStan\Type\TypeAliasResolver;
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Broker\Broker;
use PHPStan\Reflection\BrokerAwareExtension;
use PHPStan\Reflection\ReflectionProvider;
use function array_merge;
class DynamicReturnTypeExtensionRegistry
{
    /** @var DynamicMethodReturnTypeExtension[][]|null */
    private $dynamicMethodReturnTypeExtensionsByClass;
    /** @var DynamicStaticMethodReturnTypeExtension[][]|null */
    private $dynamicStaticMethodReturnTypeExtensionsByClass;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var DynamicMethodReturnTypeExtension[]
     */
    private $dynamicMethodReturnTypeExtensions;
    /**
     * @var DynamicStaticMethodReturnTypeExtension[]
     */
    private $dynamicStaticMethodReturnTypeExtensions;
    /**
     * @var DynamicFunctionReturnTypeExtension[]
     */
    private $dynamicFunctionReturnTypeExtensions;
    /**
     * @param DynamicMethodReturnTypeExtension[] $dynamicMethodReturnTypeExtensions
     * @param DynamicStaticMethodReturnTypeExtension[] $dynamicStaticMethodReturnTypeExtensions
     * @param DynamicFunctionReturnTypeExtension[] $dynamicFunctionReturnTypeExtensions
     */
    public function __construct(Broker $broker, ReflectionProvider $reflectionProvider, array $dynamicMethodReturnTypeExtensions, array $dynamicStaticMethodReturnTypeExtensions, array $dynamicFunctionReturnTypeExtensions)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->dynamicMethodReturnTypeExtensions = $dynamicMethodReturnTypeExtensions;
        $this->dynamicStaticMethodReturnTypeExtensions = $dynamicStaticMethodReturnTypeExtensions;
        $this->dynamicFunctionReturnTypeExtensions = $dynamicFunctionReturnTypeExtensions;
        foreach (array_merge($dynamicMethodReturnTypeExtensions, $dynamicStaticMethodReturnTypeExtensions, $dynamicFunctionReturnTypeExtensions) as $extension) {
            if (!$extension instanceof BrokerAwareExtension) {
                continue;
            }
            $extension->setBroker($broker);
        }
    }
    /**
     * @return DynamicMethodReturnTypeExtension[]
     */
    public function getDynamicMethodReturnTypeExtensionsForClass(string $className) : array
    {
        if ($this->dynamicMethodReturnTypeExtensionsByClass === null) {
            $byClass = [];
            foreach ($this->dynamicMethodReturnTypeExtensions as $extension) {
                $byClass[$extension->getClass()][] = $extension;
            }
            $this->dynamicMethodReturnTypeExtensionsByClass = $byClass;
        }
        return $this->getDynamicExtensionsForType($this->dynamicMethodReturnTypeExtensionsByClass, $className);
    }
    /**
     * @return DynamicStaticMethodReturnTypeExtension[]
     */
    public function getDynamicStaticMethodReturnTypeExtensionsForClass(string $className) : array
    {
        if ($this->dynamicStaticMethodReturnTypeExtensionsByClass === null) {
            $byClass = [];
            foreach ($this->dynamicStaticMethodReturnTypeExtensions as $extension) {
                $byClass[$extension->getClass()][] = $extension;
            }
            $this->dynamicStaticMethodReturnTypeExtensionsByClass = $byClass;
        }
        return $this->getDynamicExtensionsForType($this->dynamicStaticMethodReturnTypeExtensionsByClass, $className);
    }
    /**
     * @param DynamicMethodReturnTypeExtension[][]|DynamicStaticMethodReturnTypeExtension[][] $extensions
     * @return mixed[]
     */
    private function getDynamicExtensionsForType(array $extensions, string $className) : array
    {
        if (!$this->reflectionProvider->hasClass($className)) {
            return [];
        }
        $extensionsForClass = [[]];
        $class = $this->reflectionProvider->getClass($className);
        foreach (array_merge([$className], $class->getParentClassesNames(), $class->getNativeReflection()->getInterfaceNames()) as $extensionClassName) {
            if (!isset($extensions[$extensionClassName])) {
                continue;
            }
            $extensionsForClass[] = $extensions[$extensionClassName];
        }
        return array_merge(...$extensionsForClass);
    }
    /**
     * @return DynamicFunctionReturnTypeExtension[]
     */
    public function getDynamicFunctionReturnTypeExtensions() : array
    {
        return $this->dynamicFunctionReturnTypeExtensions;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Type\Accessory\AccessoryType;
use PHPStan\Type\Accessory\HasPropertyType;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\Enum\EnumCaseObjectType;
use PHPStan\Type\Generic\TemplateType;
use function array_merge;
use function array_unique;
use function array_values;
/** @api */
class TypeUtils
{
    /**
     * @return ArrayType[]
     *
     * @deprecated Use PHPStan\Type\Type::getArrays() instead and handle optional ConstantArrayType keys if necessary.
     */
    public static function getArrays(\PHPStan\Type\Type $type) : array
    {
        if ($type instanceof ConstantArrayType) {
            return $type->getAllArrays();
        }
        if ($type instanceof \PHPStan\Type\ArrayType) {
            return [$type];
        }
        if ($type instanceof \PHPStan\Type\UnionType) {
            $matchingTypes = [];
            foreach ($type->getTypes() as $innerType) {
                if (!$innerType instanceof \PHPStan\Type\ArrayType) {
                    return [];
                }
                foreach (self::getArrays($innerType) as $innerInnerType) {
                    $matchingTypes[] = $innerInnerType;
                }
            }
            return $matchingTypes;
        }
        if ($type instanceof \PHPStan\Type\IntersectionType) {
            $matchingTypes = [];
            foreach ($type->getTypes() as $innerType) {
                if (!$innerType instanceof \PHPStan\Type\ArrayType) {
                    continue;
                }
                foreach (self::getArrays($innerType) as $innerInnerType) {
                    $matchingTypes[] = $innerInnerType;
                }
            }
            return $matchingTypes;
        }
        return [];
    }
    /**
     * @return ConstantArrayType[]
     *
     * @deprecated Use PHPStan\Type\Type::getConstantArrays() instead and handle optional keys if necessary.
     */
    public static function getConstantArrays(\PHPStan\Type\Type $type) : array
    {
        if ($type instanceof ConstantArrayType) {
            return $type->getAllArrays();
        }
        if ($type instanceof \PHPStan\Type\UnionType) {
            $matchingTypes = [];
            foreach ($type->getTypes() as $innerType) {
                if (!$innerType instanceof ConstantArrayType) {
                    return [];
                }
                foreach (self::getConstantArrays($innerType) as $innerInnerType) {
                    $matchingTypes[] = $innerInnerType;
                }
            }
            return $matchingTypes;
        }
        return [];
    }
    /**
     * @return ConstantStringType[]
     *
     * @deprecated Use PHPStan\Type\Type::getConstantStrings() instead
     */
    public static function getConstantStrings(\PHPStan\Type\Type $type) : array
    {
        return self::map(ConstantStringType::class, $type, \false);
    }
    /**
     * @return ConstantIntegerType[]
     */
    public static function getConstantIntegers(\PHPStan\Type\Type $type) : array
    {
        return self::map(ConstantIntegerType::class, $type, \false);
    }
    /**
     * @deprecated Use Type::isConstantValue() or Type::generalize()
     * @return ConstantType[]
     */
    public static function getConstantTypes(\PHPStan\Type\Type $type) : array
    {
        return self::map(\PHPStan\Type\ConstantType::class, $type, \false);
    }
    /**
     * @deprecated Use Type::isConstantValue() or Type::generalize()
     * @return ConstantType[]
     */
    public static function getAnyConstantTypes(\PHPStan\Type\Type $type) : array
    {
        return self::map(\PHPStan\Type\ConstantType::class, $type, \false, \false);
    }
    /**
     * @return ArrayType[]
     *
     * @deprecated Use PHPStan\Type\Type::getArrays() instead.
     */
    public static function getAnyArrays(\PHPStan\Type\Type $type) : array
    {
        return self::map(\PHPStan\Type\ArrayType::class, $type, \true, \false);
    }
    /**
     * @deprecated Use PHPStan\Type\Type::generalize() instead.
     */
    public static function generalizeType(\PHPStan\Type\Type $type, \PHPStan\Type\GeneralizePrecision $precision) : \PHPStan\Type\Type
    {
        return $type->generalize($precision);
    }
    /**
     * @return list<string>
     *
     * @deprecated Use Type::getObjectClassNames() instead.
     */
    public static function getDirectClassNames(\PHPStan\Type\Type $type) : array
    {
        if ($type instanceof \PHPStan\Type\TypeWithClassName) {
            return [$type->getClassName()];
        }
        if ($type instanceof \PHPStan\Type\UnionType || $type instanceof \PHPStan\Type\IntersectionType) {
            $classNames = [];
            foreach ($type->getTypes() as $innerType) {
                foreach (self::getDirectClassNames($innerType) as $n) {
                    $classNames[] = $n;
                }
            }
            return array_values(array_unique($classNames));
        }
        return [];
    }
    /**
     * @return IntegerRangeType[]
     */
    public static function getIntegerRanges(\PHPStan\Type\Type $type) : array
    {
        return self::map(\PHPStan\Type\IntegerRangeType::class, $type, \false);
    }
    /**
     * @deprecated Use Type::isConstantScalarValue() or Type::getConstantScalarTypes() or Type::getConstantScalarValues()
     * @return ConstantScalarType[]
     */
    public static function getConstantScalars(\PHPStan\Type\Type $type) : array
    {
        return self::map(\PHPStan\Type\ConstantScalarType::class, $type, \false);
    }
    /**
     * @deprecated Use Type::getEnumCases()
     * @return EnumCaseObjectType[]
     */
    public static function getEnumCaseObjects(\PHPStan\Type\Type $type) : array
    {
        return self::map(EnumCaseObjectType::class, $type, \false);
    }
    /**
     * @internal
     * @return ConstantArrayType[]
     *
     * @deprecated Use PHPStan\Type\Type::getConstantArrays().
     */
    public static function getOldConstantArrays(\PHPStan\Type\Type $type) : array
    {
        return self::map(ConstantArrayType::class, $type, \false);
    }
    /**
     * @return mixed[]
     */
    private static function map(string $typeClass, \PHPStan\Type\Type $type, bool $inspectIntersections, bool $stopOnUnmatched = \true) : array
    {
        if ($type instanceof $typeClass) {
            return [$type];
        }
        if ($type instanceof \PHPStan\Type\UnionType) {
            $matchingTypes = [];
            foreach ($type->getTypes() as $innerType) {
                $matchingInner = self::map($typeClass, $innerType, $inspectIntersections, $stopOnUnmatched);
                if ($matchingInner === []) {
                    if ($stopOnUnmatched) {
                        return [];
                    }
                    continue;
                }
                foreach ($matchingInner as $innerMapped) {
                    $matchingTypes[] = $innerMapped;
                }
            }
            return $matchingTypes;
        }
        if ($inspectIntersections && $type instanceof \PHPStan\Type\IntersectionType) {
            $matchingTypes = [];
            foreach ($type->getTypes() as $innerType) {
                if (!$innerType instanceof $typeClass) {
                    if ($stopOnUnmatched) {
                        return [];
                    }
                    continue;
                }
                $matchingTypes[] = $innerType;
            }
            return $matchingTypes;
        }
        return [];
    }
    public static function toBenevolentUnion(\PHPStan\Type\Type $type) : \PHPStan\Type\Type
    {
        if ($type instanceof \PHPStan\Type\BenevolentUnionType) {
            return $type;
        }
        if ($type instanceof \PHPStan\Type\UnionType) {
            return new \PHPStan\Type\BenevolentUnionType($type->getTypes());
        }
        return $type;
    }
    /**
     * @return Type[]
     */
    public static function flattenTypes(\PHPStan\Type\Type $type) : array
    {
        if ($type instanceof ConstantArrayType) {
            return $type->getAllArrays();
        }
        if ($type instanceof \PHPStan\Type\UnionType) {
            $types = [];
            foreach ($type->getTypes() as $innerType) {
                if ($innerType instanceof ConstantArrayType) {
                    foreach ($innerType->getAllArrays() as $array) {
                        $types[] = $array;
                    }
                    continue;
                }
                $types[] = $innerType;
            }
            return $types;
        }
        return [$type];
    }
    public static function findThisType(\PHPStan\Type\Type $type) : ?\PHPStan\Type\ThisType
    {
        if ($type instanceof \PHPStan\Type\ThisType) {
            return $type;
        }
        if ($type instanceof \PHPStan\Type\UnionType || $type instanceof \PHPStan\Type\IntersectionType) {
            foreach ($type->getTypes() as $innerType) {
                $thisType = self::findThisType($innerType);
                if ($thisType !== null) {
                    return $thisType;
                }
            }
        }
        return null;
    }
    /**
     * @return HasPropertyType[]
     */
    public static function getHasPropertyTypes(\PHPStan\Type\Type $type) : array
    {
        if ($type instanceof HasPropertyType) {
            return [$type];
        }
        if ($type instanceof \PHPStan\Type\UnionType || $type instanceof \PHPStan\Type\IntersectionType) {
            $hasPropertyTypes = [[]];
            foreach ($type->getTypes() as $innerType) {
                $hasPropertyTypes[] = self::getHasPropertyTypes($innerType);
            }
            return array_merge(...$hasPropertyTypes);
        }
        return [];
    }
    /**
     * @return AccessoryType[]
     */
    public static function getAccessoryTypes(\PHPStan\Type\Type $type) : array
    {
        return self::map(AccessoryType::class, $type, \true, \false);
    }
    /** @deprecated Use PHPStan\Type\Type::isCallable() instead. */
    public static function containsCallable(\PHPStan\Type\Type $type) : bool
    {
        if ($type->isCallable()->yes()) {
            return \true;
        }
        if ($type instanceof \PHPStan\Type\UnionType) {
            foreach ($type->getTypes() as $innerType) {
                if ($innerType->isCallable()->yes()) {
                    return \true;
                }
            }
        }
        return \false;
    }
    public static function containsTemplateType(\PHPStan\Type\Type $type) : bool
    {
        $containsTemplateType = \false;
        \PHPStan\Type\TypeTraverser::map($type, static function (\PHPStan\Type\Type $type, callable $traverse) use(&$containsTemplateType) : \PHPStan\Type\Type {
            if ($type instanceof TemplateType) {
                $containsTemplateType = \true;
            }
            return $containsTemplateType ? $type : $traverse($type);
        });
        return $containsTemplateType;
    }
    public static function resolveLateResolvableTypes(\PHPStan\Type\Type $type, bool $resolveUnresolvableTypes = \true) : \PHPStan\Type\Type
    {
        return \PHPStan\Type\TypeTraverser::map($type, static function (\PHPStan\Type\Type $type, callable $traverse) use($resolveUnresolvableTypes) : \PHPStan\Type\Type {
            $type = $traverse($type);
            if ($type instanceof \PHPStan\Type\LateResolvableType && ($resolveUnresolvableTypes || $type->isResolvable())) {
                $type = $type->resolve();
            }
            return $type;
        });
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\TrinaryLogic;
use PHPStan\Type\Generic\TemplateTypeMap;
use function count;
/** @api */
class BenevolentUnionType extends \PHPStan\Type\UnionType
{
    /**
     * @api
     * @param Type[] $types
     */
    public function __construct(array $types)
    {
        parent::__construct($types);
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        return '(' . parent::describe($level) . ')';
    }
    protected function unionTypes(callable $getType) : \PHPStan\Type\Type
    {
        $resultTypes = [];
        foreach ($this->getTypes() as $type) {
            $result = $getType($type);
            if ($result instanceof \PHPStan\Type\ErrorType) {
                continue;
            }
            $resultTypes[] = $result;
        }
        if (count($resultTypes) === 0) {
            return new \PHPStan\Type\ErrorType();
        }
        return \PHPStan\Type\TypeUtils::toBenevolentUnion(\PHPStan\Type\TypeCombinator::union(...$resultTypes));
    }
    protected function pickFromTypes(callable $getValues) : array
    {
        $values = [];
        foreach ($this->getTypes() as $type) {
            $innerValues = $getValues($type);
            foreach ($innerValues as $innerType) {
                $values[] = $innerType;
            }
        }
        return $values;
    }
    public function getOffsetValueType(\PHPStan\Type\Type $offsetType) : \PHPStan\Type\Type
    {
        $types = [];
        foreach ($this->getTypes() as $innerType) {
            $valueType = $innerType->getOffsetValueType($offsetType);
            if ($valueType instanceof \PHPStan\Type\ErrorType) {
                continue;
            }
            $types[] = $valueType;
        }
        if (count($types) === 0) {
            return new \PHPStan\Type\ErrorType();
        }
        return \PHPStan\Type\TypeUtils::toBenevolentUnion(\PHPStan\Type\TypeCombinator::union(...$types));
    }
    protected function unionResults(callable $getResult) : TrinaryLogic
    {
        return TrinaryLogic::createNo()->lazyOr($this->getTypes(), $getResult);
    }
    public function isAcceptedBy(\PHPStan\Type\Type $acceptingType, bool $strictTypes) : TrinaryLogic
    {
        return $this->isAcceptedWithReasonBy($acceptingType, $strictTypes)->result;
    }
    public function isAcceptedWithReasonBy(\PHPStan\Type\Type $acceptingType, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        $result = \PHPStan\Type\AcceptsResult::createNo();
        foreach ($this->getTypes() as $innerType) {
            $result = $result->or($acceptingType->acceptsWithReason($innerType, $strictTypes));
        }
        return $result;
    }
    public function inferTemplateTypes(\PHPStan\Type\Type $receivedType) : TemplateTypeMap
    {
        $types = TemplateTypeMap::createEmpty();
        foreach ($this->getTypes() as $type) {
            $types = $types->benevolentUnion($type->inferTemplateTypes($receivedType));
        }
        return $types;
    }
    public function inferTemplateTypesOn(\PHPStan\Type\Type $templateType) : TemplateTypeMap
    {
        $types = TemplateTypeMap::createEmpty();
        foreach ($this->getTypes() as $type) {
            $types = $types->benevolentUnion($templateType->inferTemplateTypes($type));
        }
        return $types;
    }
    public function traverse(callable $cb) : \PHPStan\Type\Type
    {
        $types = [];
        $changed = \false;
        foreach ($this->getTypes() as $type) {
            $newType = $cb($type);
            if ($type !== $newType) {
                $changed = \true;
            }
            $types[] = $newType;
        }
        if ($changed) {
            return \PHPStan\Type\TypeUtils::toBenevolentUnion(\PHPStan\Type\TypeCombinator::union(...$types));
        }
        return $this;
    }
    public function traverseSimultaneously(\PHPStan\Type\Type $right, callable $cb) : \PHPStan\Type\Type
    {
        $types = [];
        $changed = \false;
        if (!$right instanceof \PHPStan\Type\UnionType) {
            return $this;
        }
        if (count($this->getTypes()) !== count($right->getTypes())) {
            return $this;
        }
        foreach ($this->getSortedTypes() as $i => $leftType) {
            $rightType = $right->getSortedTypes()[$i];
            $newType = $cb($leftType, $rightType);
            if ($leftType !== $newType) {
                $changed = \true;
            }
            $types[] = $newType;
        }
        if ($changed) {
            return \PHPStan\Type\TypeUtils::toBenevolentUnion(\PHPStan\Type\TypeCombinator::union(...$types));
        }
        return $this;
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self($properties['types']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\BinaryOp\Pow;
use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\Type;
use function count;
class PowFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'pow';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        if (count($functionCall->getArgs()) < 2) {
            return null;
        }
        return $scope->getType(new Pow($functionCall->getArgs()[0]->value, $functionCall->getArgs()[1]->value));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\Php\SimpleXMLElementProperty;
use PHPStan\Reflection\PropertiesClassReflectionExtension;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Type\BenevolentUnionType;
use PHPStan\Type\NullType;
use PHPStan\Type\ObjectType;
class SimpleXMLElementClassPropertyReflectionExtension implements PropertiesClassReflectionExtension
{
    public function hasProperty(ClassReflection $classReflection, string $propertyName) : bool
    {
        return $classReflection->getName() === 'SimpleXMLElement' || $classReflection->isSubclassOf('SimpleXMLElement');
    }
    public function getProperty(ClassReflection $classReflection, string $propertyName) : PropertyReflection
    {
        return new SimpleXMLElementProperty($classReflection, new BenevolentUnionType([new ObjectType($classReflection->getName()), new NullType()]));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function count;
class ArrayReverseFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'array_reverse';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        if (!isset($functionCall->getArgs()[0])) {
            return null;
        }
        $type = $scope->getType($functionCall->getArgs()[0]->value);
        $preserveKeysType = isset($functionCall->getArgs()[1]) ? $scope->getType($functionCall->getArgs()[1]->value) : new NeverType();
        $preserveKeys = $preserveKeysType->isTrue()->yes();
        if (!$type->isArray()->yes()) {
            return null;
        }
        $constantArrays = $type->getConstantArrays();
        if (count($constantArrays) > 0) {
            $results = [];
            foreach ($constantArrays as $constantArray) {
                $results[] = $constantArray->reverse($preserveKeys);
            }
            return TypeCombinator::union(...$results);
        }
        return $type;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\Type;
use function array_merge;
use function count;
class CompactFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /**
     * @var bool
     */
    private $checkMaybeUndefinedVariables;
    public function __construct(bool $checkMaybeUndefinedVariables)
    {
        $this->checkMaybeUndefinedVariables = $checkMaybeUndefinedVariables;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'compact';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $defaultReturnType = ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        if (count($functionCall->getArgs()) === 0) {
            return $defaultReturnType;
        }
        if ($scope->canAnyVariableExist() && !$this->checkMaybeUndefinedVariables) {
            return $defaultReturnType;
        }
        $array = ConstantArrayTypeBuilder::createEmpty();
        foreach ($functionCall->getArgs() as $arg) {
            $type = $scope->getType($arg->value);
            $constantStrings = $this->findConstantStrings($type);
            if ($constantStrings === null) {
                return $defaultReturnType;
            }
            foreach ($constantStrings as $constantString) {
                $has = $scope->hasVariableType($constantString->getValue());
                if ($has->no()) {
                    continue;
                }
                $array->setOffsetValueType($constantString, $scope->getVariableType($constantString->getValue()), $has->maybe());
            }
        }
        return $array->getArray();
    }
    /**
     * @return array<int, ConstantStringType>|null
     */
    private function findConstantStrings(Type $type) : ?array
    {
        if ($type instanceof ConstantStringType) {
            return [$type];
        }
        if ($type instanceof ConstantArrayType) {
            $result = [];
            foreach ($type->getValueTypes() as $valueType) {
                $constantStrings = $this->findConstantStrings($valueType);
                if ($constantStrings === null) {
                    return null;
                }
                $result = array_merge($result, $constantStrings);
            }
            return $result;
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function in_array;
class ArrayNextDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return in_array($functionReflection->getName(), ['next', 'prev'], \true);
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        if (!isset($functionCall->getArgs()[0])) {
            return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        }
        $argType = $scope->getType($functionCall->getArgs()[0]->value);
        $iterableAtLeastOnce = $argType->isIterableAtLeastOnce();
        if ($iterableAtLeastOnce->no()) {
            return new ConstantBooleanType(\false);
        }
        $valueType = $argType->getIterableValueType();
        return TypeCombinator::union($valueType, new ConstantBooleanType(\false));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Accessory\AccessoryLiteralStringType;
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
use PHPStan\Type\Accessory\AccessoryNonFalsyStringType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\NeverType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use function count;
use function str_repeat;
use function strlen;
class StrRepeatFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'str_repeat';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $args = $functionCall->getArgs();
        if (count($args) < 2) {
            return new StringType();
        }
        $inputType = $scope->getType($args[0]->value);
        $multiplierType = $scope->getType($args[1]->value);
        if ((new ConstantIntegerType(0))->isSuperTypeOf($multiplierType)->yes()) {
            return new ConstantStringType('');
        }
        if ($multiplierType instanceof ConstantIntegerType && $multiplierType->getValue() < 0) {
            return new NeverType();
        }
        if ($inputType instanceof ConstantStringType && $multiplierType instanceof ConstantIntegerType && strlen($inputType->getValue()) * $multiplierType->getValue() < 100) {
            return new ConstantStringType(str_repeat($inputType->getValue(), $multiplierType->getValue()));
        }
        $accessoryTypes = [];
        if ($inputType->isNonEmptyString()->yes()) {
            if (IntegerRangeType::fromInterval(1, null)->isSuperTypeOf($multiplierType)->yes()) {
                if ($inputType->isNonFalsyString()->yes()) {
                    $accessoryTypes[] = new AccessoryNonFalsyStringType();
                } else {
                    $accessoryTypes[] = new AccessoryNonEmptyStringType();
                }
            }
        }
        if ($inputType->isLiteralString()->yes()) {
            $accessoryTypes[] = new AccessoryLiteralStringType();
        }
        if (count($accessoryTypes) > 0) {
            $accessoryTypes[] = new StringType();
            return new IntersectionType($accessoryTypes);
        }
        return new StringType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\BooleanType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\FloatType;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function count;
use function strlen;
class StrlenFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'strlen';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $args = $functionCall->getArgs();
        if (count($args) === 0) {
            return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        }
        $argType = $scope->getType($args[0]->value);
        if ($argType->isSuperTypeOf(new BooleanType())->yes()) {
            $constantScalars = TypeCombinator::remove($argType, new BooleanType())->getConstantScalarTypes();
            if (count($constantScalars) > 0) {
                $constantScalars[] = new ConstantBooleanType(\true);
                $constantScalars[] = new ConstantBooleanType(\false);
            }
        } else {
            $constantScalars = $argType->getConstantScalarTypes();
        }
        $min = null;
        $max = null;
        foreach ($constantScalars as $constantScalar) {
            $stringScalar = $constantScalar->toString();
            if (!$stringScalar instanceof ConstantStringType) {
                $min = $max = null;
                break;
            }
            $len = strlen($stringScalar->getValue());
            if ($min === null) {
                $min = $len;
                $max = $len;
            }
            if ($len < $min) {
                $min = $len;
            }
            if ($len <= $max) {
                continue;
            }
            $max = $len;
        }
        // $max is always != null, when $min is != null
        if ($min !== null) {
            return IntegerRangeType::fromInterval($min, $max);
        }
        $bool = new BooleanType();
        if ($bool->isSuperTypeOf($argType)->yes()) {
            return IntegerRangeType::fromInterval(0, 1);
        }
        $isNonEmpty = $argType->isNonEmptyString();
        $numeric = TypeCombinator::union(new IntegerType(), new FloatType());
        if ($isNonEmpty->yes() || $numeric->isSuperTypeOf($argType)->yes() || TypeCombinator::remove($argType, $numeric)->isNonEmptyString()->yes()) {
            return IntegerRangeType::fromInterval(1, null);
        }
        if ($argType->isString()->yes() && $isNonEmpty->no()) {
            return new ConstantIntegerType(0);
        }
        return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use DateTimeInterface;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Name\FullyQualified;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Type\DynamicMethodReturnTypeExtension;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use function count;
class DateFormatMethodReturnTypeExtension implements DynamicMethodReturnTypeExtension
{
    public function getClass() : string
    {
        return DateTimeInterface::class;
    }
    public function isMethodSupported(MethodReflection $methodReflection) : bool
    {
        return $methodReflection->getName() === 'format';
    }
    public function getTypeFromMethodCall(MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope) : Type
    {
        if (count($methodCall->getArgs()) === 0) {
            return new StringType();
        }
        return $scope->getType(new FuncCall(new FullyQualified('date'), [$methodCall->getArgs()[0]]));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\TrinaryLogic;
use PHPStan\Type\ClassStringType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\ObjectWithoutClassType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypeUtils;
use PHPStan\Type\UnionType;
use function count;
use function in_array;
class ClassImplementsFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return in_array($functionReflection->getName(), ['class_implements', 'class_uses', 'class_parents'], \true);
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        $args = $functionCall->getArgs();
        if (count($args) < 1) {
            return null;
        }
        $firstArgType = $scope->getType($args[0]->value);
        $autoload = TrinaryLogic::createYes();
        if (isset($args[1])) {
            $autoload = $scope->getType($args[1]->value)->isTrue();
        }
        $isObject = $firstArgType->isObject();
        $variant = ParametersAcceptorSelector::selectFromArgs($scope, $args, $functionReflection->getVariants());
        if ($isObject->yes()) {
            return TypeCombinator::remove($variant->getReturnType(), new ConstantBooleanType(\false));
        }
        $isClassStringOrObject = (new UnionType([new ObjectWithoutClassType(), new ClassStringType()]))->isSuperTypeOf($firstArgType);
        if ($isClassStringOrObject->yes()) {
            if ($autoload->yes()) {
                return TypeUtils::toBenevolentUnion($variant->getReturnType());
            }
            return $variant->getReturnType();
        }
        if ($firstArgType->isClassStringType()->no()) {
            return new ConstantBooleanType(\false);
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
use PHPStan\Type\Accessory\AccessoryNonFalsyStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\MixedType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypeUtils;
use function array_key_exists;
use function count;
class ReplaceFunctionsDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /** @var array<string, int> */
    private $functionsSubjectPosition = ['preg_replace' => 2, 'preg_replace_callback' => 2, 'preg_replace_callback_array' => 1, 'str_replace' => 2, 'str_ireplace' => 2, 'substr_replace' => 0, 'strtr' => 0];
    /** @var array<string, int> */
    private $functionsReplacePosition = ['preg_replace' => 1, 'str_replace' => 1, 'str_ireplace' => 1, 'substr_replace' => 1, 'strtr' => 2];
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return array_key_exists($functionReflection->getName(), $this->functionsSubjectPosition);
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $type = $this->getPreliminarilyResolvedTypeFromFunctionCall($functionReflection, $functionCall, $scope);
        $possibleTypes = ParametersAcceptorSelector::selectFromArgs($scope, $functionCall->getArgs(), $functionReflection->getVariants())->getReturnType();
        // resolve conditional return types
        $possibleTypes = TypeUtils::resolveLateResolvableTypes($possibleTypes);
        if (TypeCombinator::containsNull($possibleTypes)) {
            $type = TypeCombinator::addNull($type);
        }
        return $type;
    }
    private function getPreliminarilyResolvedTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $argumentPosition = $this->functionsSubjectPosition[$functionReflection->getName()];
        $defaultReturnType = ParametersAcceptorSelector::selectFromArgs($scope, $functionCall->getArgs(), $functionReflection->getVariants())->getReturnType();
        if (count($functionCall->getArgs()) <= $argumentPosition) {
            return $defaultReturnType;
        }
        $subjectArgumentType = $scope->getType($functionCall->getArgs()[$argumentPosition]->value);
        if ($subjectArgumentType instanceof MixedType) {
            return TypeUtils::toBenevolentUnion($defaultReturnType);
        }
        if ($subjectArgumentType->isNonEmptyString()->yes() && array_key_exists($functionReflection->getName(), $this->functionsReplacePosition)) {
            $replaceArgumentPosition = $this->functionsReplacePosition[$functionReflection->getName()];
            if (count($functionCall->getArgs()) > $replaceArgumentPosition) {
                $replaceArgumentType = $scope->getType($functionCall->getArgs()[$replaceArgumentPosition]->value);
                if ($subjectArgumentType->isNonFalsyString()->yes() && $replaceArgumentType->isNonFalsyString()->yes()) {
                    return new IntersectionType([new StringType(), new AccessoryNonFalsyStringType()]);
                }
                if ($replaceArgumentType->isNonEmptyString()->yes()) {
                    return new IntersectionType([new StringType(), new AccessoryNonEmptyStringType()]);
                }
            }
        }
        $isStringSuperType = $subjectArgumentType->isString();
        $isArraySuperType = $subjectArgumentType->isArray();
        $compareSuperTypes = $isStringSuperType->compareTo($isArraySuperType);
        if ($compareSuperTypes === $isStringSuperType) {
            return new StringType();
        } elseif ($compareSuperTypes === $isArraySuperType) {
            if (count($subjectArgumentType->getArrays()) > 0) {
                $result = [];
                foreach ($subjectArgumentType->getArrays() as $arrayType) {
                    $result[] = $arrayType->generalizeValues();
                }
                return TypeCombinator::union(...$result);
            }
            return $subjectArgumentType;
        }
        return $defaultReturnType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\ClassStringType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\Enum\EnumCaseObjectType;
use PHPStan\Type\Generic\GenericClassStringType;
use PHPStan\Type\Generic\TemplateType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\MixedType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\ObjectWithoutClassType;
use PHPStan\Type\StaticType;
use PHPStan\Type\ThisType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeTraverser;
use PHPStan\Type\UnionType;
use function count;
class GetClassDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'get_class';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $args = $functionCall->getArgs();
        if (count($args) === 0) {
            if ($scope->isInTrait()) {
                return new ClassStringType();
            }
            if ($scope->isInClass()) {
                return new ConstantStringType($scope->getClassReflection()->getName(), \true);
            }
            return new ConstantBooleanType(\false);
        }
        $argType = $scope->getType($args[0]->value);
        if ($scope->isInTrait() && $argType instanceof ThisType) {
            return new ClassStringType();
        }
        return TypeTraverser::map($argType, static function (Type $type, callable $traverse) : Type {
            if ($type instanceof UnionType || $type instanceof IntersectionType) {
                return $traverse($type);
            }
            if ($type instanceof EnumCaseObjectType) {
                return new GenericClassStringType(new ObjectType($type->getClassName()));
            }
            $objectClassNames = $type->getObjectClassNames();
            if ($type instanceof TemplateType && $objectClassNames === []) {
                if ($type instanceof ObjectWithoutClassType) {
                    return new GenericClassStringType($type);
                }
                return new UnionType([new GenericClassStringType($type), new ConstantBooleanType(\false)]);
            } elseif ($type instanceof MixedType) {
                return new UnionType([new ClassStringType(), new ConstantBooleanType(\false)]);
            } elseif ($type instanceof StaticType) {
                return new GenericClassStringType($type->getStaticObjectType());
            } elseif ($objectClassNames !== []) {
                return new GenericClassStringType($type);
            } elseif ($type instanceof ObjectWithoutClassType) {
                return new ClassStringType();
            }
            return new ConstantBooleanType(\false);
        });
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Accessory\AccessoryNumericStringType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\ConstantScalarType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use function in_array;
final class NumberFormatFunctionDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'number_format';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $stringType = new StringType();
        if (!isset($functionCall->getArgs()[3])) {
            return $stringType;
        }
        $thousandsType = $scope->getType($functionCall->getArgs()[3]->value);
        $decimalType = $scope->getType($functionCall->getArgs()[2]->value);
        if (!$thousandsType instanceof ConstantStringType || $thousandsType->getValue() !== '') {
            return $stringType;
        }
        if (!$decimalType instanceof ConstantScalarType || !in_array($decimalType->getValue(), [null, '.', ''], \true)) {
            return $stringType;
        }
        return new IntersectionType([$stringType, new AccessoryNumericStringType()]);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
use PHPStan\Type\Accessory\AccessoryNonFalsyStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use function count;
use function in_array;
class NonEmptyStringFunctionsReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return in_array($functionReflection->getName(), ['addslashes', 'addcslashes', 'escapeshellarg', 'escapeshellcmd', 'htmlspecialchars', 'htmlentities', 'urlencode', 'urldecode', 'preg_quote', 'rawurlencode', 'rawurldecode'], \true);
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $args = $functionCall->getArgs();
        if (count($args) === 0) {
            return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        }
        $argType = $scope->getType($args[0]->value);
        if ($argType->isNonFalsyString()->yes()) {
            return new IntersectionType([new StringType(), new AccessoryNonFalsyStringType()]);
        }
        if ($argType->isNonEmptyString()->yes()) {
            return new IntersectionType([new StringType(), new AccessoryNonEmptyStringType()]);
        }
        return new StringType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Analyser\SpecifiedTypes;
use PHPStan\Analyser\TypeSpecifier;
use PHPStan\Analyser\TypeSpecifierAwareExtension;
use PHPStan\Analyser\TypeSpecifierContext;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\ArrayType;
use PHPStan\Type\FunctionTypeSpecifyingExtension;
use PHPStan\Type\MixedType;
use function strtolower;
class IsArrayFunctionTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
{
    /**
     * @var \PHPStan\Analyser\TypeSpecifier
     */
    private $typeSpecifier;
    /**
     * @var bool
     */
    private $explicitMixed;
    public function __construct(bool $explicitMixed)
    {
        $this->explicitMixed = $explicitMixed;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection, FuncCall $node, TypeSpecifierContext $context) : bool
    {
        return strtolower($functionReflection->getName()) === 'is_array' && !$context->null();
    }
    public function specifyTypes(FunctionReflection $functionReflection, FuncCall $node, Scope $scope, TypeSpecifierContext $context) : SpecifiedTypes
    {
        if (!isset($node->getArgs()[0])) {
            return new SpecifiedTypes();
        }
        if ($context->null()) {
            throw new ShouldNotHappenException();
        }
        return $this->typeSpecifier->create($node->getArgs()[0]->value, new ArrayType(new MixedType($this->explicitMixed), new MixedType($this->explicitMixed)), $context, \false, $scope);
    }
    public function setTypeSpecifier(TypeSpecifier $typeSpecifier) : void
    {
        $this->typeSpecifier = $typeSpecifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\DynamicMethodReturnTypeExtension;
use PHPStan\Type\Type;
use PHPStan\Type\TypeWithClassName;
use function count;
final class DsMapDynamicReturnTypeExtension implements DynamicMethodReturnTypeExtension
{
    public function getClass() : string
    {
        return 'Ds\\Map';
    }
    public function isMethodSupported(MethodReflection $methodReflection) : bool
    {
        return $methodReflection->getName() === 'get' || $methodReflection->getName() === 'remove';
    }
    public function getTypeFromMethodCall(MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope) : Type
    {
        $returnType = ParametersAcceptorSelector::selectFromArgs($scope, $methodCall->getArgs(), $methodReflection->getVariants())->getReturnType();
        $argsCount = count($methodCall->getArgs());
        if ($argsCount > 1) {
            return $returnType;
        }
        if ($argsCount === 0) {
            return $returnType;
        }
        $mapType = $scope->getType($methodCall->var);
        if (!$mapType instanceof TypeWithClassName) {
            return $returnType;
        }
        $mapAncestor = $mapType->getAncestorWithClassName('Ds\\Map');
        if ($mapAncestor === null) {
            return $returnType;
        }
        $mapAncestorClass = $mapAncestor->getClassReflection();
        if ($mapAncestorClass === null) {
            return $returnType;
        }
        $valueType = $mapAncestorClass->getActiveTemplateTypeMap()->getType('TValue');
        if ($valueType === null) {
            return $returnType;
        }
        return $valueType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntegerType;
use PHPStan\Type\MixedType;
use PHPStan\Type\NeverType;
use PHPStan\Type\NullType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function count;
class ArrayColumnFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'array_column';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $numArgs = count($functionCall->getArgs());
        if ($numArgs < 2) {
            return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        }
        $arrayType = $scope->getType($functionCall->getArgs()[0]->value);
        $columnType = $scope->getType($functionCall->getArgs()[1]->value);
        $indexType = $numArgs >= 3 ? $scope->getType($functionCall->getArgs()[2]->value) : null;
        $constantArrayTypes = $arrayType->getConstantArrays();
        if (count($constantArrayTypes) === 1) {
            $type = $this->handleConstantArray($constantArrayTypes[0], $columnType, $indexType, $scope);
            if ($type !== null) {
                return $type;
            }
        }
        return $this->handleAnyArray($arrayType, $columnType, $indexType, $scope);
    }
    private function handleAnyArray(Type $arrayType, Type $columnType, ?Type $indexType, Scope $scope) : Type
    {
        $iterableAtLeastOnce = $arrayType->isIterableAtLeastOnce();
        if ($iterableAtLeastOnce->no()) {
            return new ConstantArrayType([], []);
        }
        $iterableValueType = $arrayType->getIterableValueType();
        $returnValueType = $this->getOffsetOrProperty($iterableValueType, $columnType, $scope, \false);
        if ($returnValueType === null) {
            $returnValueType = $this->getOffsetOrProperty($iterableValueType, $columnType, $scope, \true);
            $iterableAtLeastOnce = TrinaryLogic::createMaybe();
            if ($returnValueType === null) {
                throw new ShouldNotHappenException();
            }
        }
        if ($returnValueType instanceof NeverType) {
            return new ConstantArrayType([], []);
        }
        if ($indexType !== null) {
            $type = $this->getOffsetOrProperty($iterableValueType, $indexType, $scope, \false);
            if ($type !== null) {
                $returnKeyType = $type;
            } else {
                $type = $this->getOffsetOrProperty($iterableValueType, $indexType, $scope, \true);
                if ($type !== null) {
                    $returnKeyType = TypeCombinator::union($type, new IntegerType());
                } else {
                    $returnKeyType = new IntegerType();
                }
            }
        } else {
            $returnKeyType = new IntegerType();
        }
        $returnType = new ArrayType($this->castToArrayKeyType($returnKeyType), $returnValueType);
        if ($iterableAtLeastOnce->yes()) {
            $returnType = TypeCombinator::intersect($returnType, new NonEmptyArrayType());
        }
        if ($indexType === null) {
            $returnType = AccessoryArrayListType::intersectWith($returnType);
        }
        return $returnType;
    }
    private function handleConstantArray(ConstantArrayType $arrayType, Type $columnType, ?Type $indexType, Scope $scope) : ?Type
    {
        $builder = ConstantArrayTypeBuilder::createEmpty();
        foreach ($arrayType->getValueTypes() as $i => $iterableValueType) {
            $valueType = $this->getOffsetOrProperty($iterableValueType, $columnType, $scope, \false);
            if ($valueType === null) {
                return null;
            }
            if ($valueType instanceof NeverType) {
                continue;
            }
            if ($indexType !== null) {
                $type = $this->getOffsetOrProperty($iterableValueType, $indexType, $scope, \false);
                if ($type !== null) {
                    $keyType = $type;
                } else {
                    $type = $this->getOffsetOrProperty($iterableValueType, $indexType, $scope, \true);
                    if ($type !== null) {
                        $keyType = TypeCombinator::union($type, new IntegerType());
                    } else {
                        $keyType = null;
                    }
                }
            } else {
                $keyType = null;
            }
            if ($keyType !== null) {
                $keyType = $this->castToArrayKeyType($keyType);
            }
            $builder->setOffsetValueType($keyType, $valueType, $arrayType->isOptionalKey($i));
        }
        return $builder->getArray();
    }
    private function getOffsetOrProperty(Type $type, Type $offsetOrProperty, Scope $scope, bool $allowMaybe) : ?Type
    {
        $offsetIsNull = (new NullType())->isSuperTypeOf($offsetOrProperty);
        if ($offsetIsNull->yes()) {
            return $type;
        }
        $returnTypes = [];
        if ($offsetIsNull->maybe()) {
            $returnTypes[] = $type;
        }
        if (!$type->canAccessProperties()->no()) {
            $propertyTypes = $offsetOrProperty->getConstantStrings();
            if ($propertyTypes === []) {
                return new MixedType();
            }
            foreach ($propertyTypes as $propertyType) {
                $propertyName = $propertyType->getValue();
                $hasProperty = $type->hasProperty($propertyName);
                if ($hasProperty->maybe()) {
                    return $allowMaybe ? new MixedType() : null;
                }
                if (!$hasProperty->yes()) {
                    continue;
                }
                $returnTypes[] = $type->getProperty($propertyName, $scope)->getReadableType();
            }
        }
        if ($type->isOffsetAccessible()->yes()) {
            $hasOffset = $type->hasOffsetValueType($offsetOrProperty);
            if (!$allowMaybe && $hasOffset->maybe()) {
                return null;
            }
            if (!$hasOffset->no()) {
                $returnTypes[] = $type->getOffsetValueType($offsetOrProperty);
            }
        }
        if ($returnTypes === []) {
            return new NeverType();
        }
        return TypeCombinator::union(...$returnTypes);
    }
    private function castToArrayKeyType(Type $type) : Type
    {
        $isArray = $type->isArray();
        if ($isArray->yes()) {
            return $this->phpVersion->throwsTypeErrorForInternalFunctions() ? new NeverType() : new IntegerType();
        }
        if ($isArray->no()) {
            return $type->toArrayKey();
        }
        $withoutArrayType = TypeCombinator::remove($type, new ArrayType(new MixedType(), new MixedType()));
        $keyType = $withoutArrayType->toArrayKey();
        if ($this->phpVersion->throwsTypeErrorForInternalFunctions()) {
            return $keyType;
        }
        return TypeCombinator::union($keyType, new IntegerType());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node;
use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Analyser\SpecifiedTypes;
use PHPStan\Analyser\TypeSpecifier;
use PHPStan\Analyser\TypeSpecifierAwareExtension;
use PHPStan\Analyser\TypeSpecifierContext;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\FunctionTypeSpecifyingExtension;
use PHPStan\Type\MixedType;
use function count;
use function explode;
use function ltrim;
class DefinedConstantTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
{
    /**
     * @var \PHPStan\Analyser\TypeSpecifier
     */
    private $typeSpecifier;
    public function setTypeSpecifier(TypeSpecifier $typeSpecifier) : void
    {
        $this->typeSpecifier = $typeSpecifier;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection, FuncCall $node, TypeSpecifierContext $context) : bool
    {
        return $functionReflection->getName() === 'defined' && count($node->getArgs()) >= 1 && $context->true();
    }
    public function specifyTypes(FunctionReflection $functionReflection, FuncCall $node, Scope $scope, TypeSpecifierContext $context) : SpecifiedTypes
    {
        $constantName = $scope->getType($node->getArgs()[0]->value);
        if (!$constantName instanceof ConstantStringType || $constantName->getValue() === '') {
            return new SpecifiedTypes([], []);
        }
        $classConstParts = explode('::', $constantName->getValue());
        if (count($classConstParts) >= 2) {
            $classConstName = new Node\Name\FullyQualified(ltrim($classConstParts[0], '\\'));
            if ($classConstName->isSpecialClassName()) {
                $classConstName = new Node\Name($classConstName->toString());
            }
            $constNode = new Node\Expr\ClassConstFetch($classConstName, new Node\Identifier($classConstParts[1]));
        } else {
            $constNode = new Node\Expr\ConstFetch(new Node\Name\FullyQualified($constantName->getValue()));
        }
        return $this->typeSpecifier->create($constNode, new MixedType(), $context, \false, $scope);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Name;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Type\BitwiseFlagHelper;
use PHPStan\Type\DynamicFunctionThrowTypeExtension;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use function in_array;
class JsonThrowTypeExtension implements DynamicFunctionThrowTypeExtension
{
    /** @var array<string, int> */
    private $argumentPositions = ['json_encode' => 1, 'json_decode' => 3];
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Type\BitwiseFlagHelper
     */
    private $bitwiseFlagAnalyser;
    public function __construct(ReflectionProvider $reflectionProvider, BitwiseFlagHelper $bitwiseFlagAnalyser)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->bitwiseFlagAnalyser = $bitwiseFlagAnalyser;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $this->reflectionProvider->hasConstant(new Name\FullyQualified('JSON_THROW_ON_ERROR'), null) && in_array($functionReflection->getName(), ['json_encode', 'json_decode'], \true);
    }
    public function getThrowTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        $argumentPosition = $this->argumentPositions[$functionReflection->getName()];
        if (!isset($functionCall->getArgs()[$argumentPosition])) {
            return null;
        }
        $optionsExpr = $functionCall->getArgs()[$argumentPosition]->value;
        if ($this->bitwiseFlagAnalyser->bitwiseOrContainsConstant($optionsExpr, $scope, 'JSON_THROW_ON_ERROR')->yes()) {
            return new ObjectType('JsonException');
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\Type;
use function count;
use function strtolower;
class FilterVarDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /**
     * @var \PHPStan\Type\Php\FilterFunctionReturnTypeHelper
     */
    private $filterFunctionReturnTypeHelper;
    public function __construct(\PHPStan\Type\Php\FilterFunctionReturnTypeHelper $filterFunctionReturnTypeHelper)
    {
        $this->filterFunctionReturnTypeHelper = $filterFunctionReturnTypeHelper;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return strtolower($functionReflection->getName()) === 'filter_var';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        if (count($functionCall->getArgs()) < 1) {
            return null;
        }
        $inputType = $scope->getType($functionCall->getArgs()[0]->value);
        $filterType = isset($functionCall->getArgs()[1]) ? $scope->getType($functionCall->getArgs()[1]->value) : null;
        $flagsType = isset($functionCall->getArgs()[2]) ? $scope->getType($functionCall->getArgs()[2]->value) : null;
        return $this->filterFunctionReturnTypeHelper->getType($inputType, $filterType, $flagsType);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Accessory\AccessoryLiteralStringType;
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
use PHPStan\Type\Accessory\AccessoryNonFalsyStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use function count;
class StrPadFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'str_pad';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $args = $functionCall->getArgs();
        if (count($args) < 2) {
            return new StringType();
        }
        $inputType = $scope->getType($args[0]->value);
        $lengthType = $scope->getType($args[1]->value);
        $accessoryTypes = [];
        if ($inputType->isNonFalsyString()->yes()) {
            $accessoryTypes[] = new AccessoryNonFalsyStringType();
        } elseif ($inputType->isNonEmptyString()->yes() || IntegerRangeType::fromInterval(1, null)->isSuperTypeOf($lengthType)->yes()) {
            $accessoryTypes[] = new AccessoryNonEmptyStringType();
        }
        if ($inputType->isLiteralString()->yes()) {
            if (count($args) < 3) {
                $accessoryTypes[] = new AccessoryLiteralStringType();
            } else {
                $padStringType = $scope->getType($args[2]->value);
                if ($padStringType->isLiteralString()->yes()) {
                    $accessoryTypes[] = new AccessoryLiteralStringType();
                }
            }
        }
        if (count($accessoryTypes) > 0) {
            $accessoryTypes[] = new StringType();
            return new IntersectionType($accessoryTypes);
        }
        return new StringType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\MixedType;
use PHPStan\Type\NeverType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypeUtils;
use function count;
class ExplodeFunctionDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'explode';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        if (count($functionCall->getArgs()) < 2) {
            return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        }
        $delimiterType = $scope->getType($functionCall->getArgs()[0]->value);
        $isSuperset = (new ConstantStringType(''))->isSuperTypeOf($delimiterType);
        if ($isSuperset->yes()) {
            if ($this->phpVersion->getVersionId() >= 80000) {
                return new NeverType();
            }
            return new ConstantBooleanType(\false);
        } elseif ($isSuperset->no()) {
            $arrayType = AccessoryArrayListType::intersectWith(new ArrayType(new IntegerType(), new StringType()));
            if (!isset($functionCall->getArgs()[2]) || IntegerRangeType::fromInterval(0, null)->isSuperTypeOf($scope->getType($functionCall->getArgs()[2]->value))->yes()) {
                return TypeCombinator::intersect($arrayType, new NonEmptyArrayType());
            }
            return $arrayType;
        }
        $returnType = ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        if ($delimiterType instanceof MixedType) {
            return TypeUtils::toBenevolentUnion($returnType);
        }
        return $returnType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\BenevolentUnionType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\FloatType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\MixedType;
use PHPStan\Type\NeverType;
use PHPStan\Type\NullType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function count;
use function in_array;
class RoundFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return in_array($functionReflection->getName(), ['round', 'ceil', 'floor'], \true);
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        if ($this->phpVersion->hasStricterRoundFunctions()) {
            // PHP 8 fatals with a missing parameter.
            $noArgsReturnType = new NeverType(\true);
            // PHP 8 can either return a float or fatal.
            $defaultReturnType = new FloatType();
        } else {
            // PHP 7 returns null with a missing parameter.
            $noArgsReturnType = new NullType();
            // PHP 7 can return either a float or false.
            $defaultReturnType = new BenevolentUnionType([new FloatType(), new ConstantBooleanType(\false)]);
        }
        if (count($functionCall->getArgs()) < 1) {
            return $noArgsReturnType;
        }
        $firstArgType = $scope->getType($functionCall->getArgs()[0]->value);
        if ($firstArgType instanceof MixedType) {
            return $defaultReturnType;
        }
        if ($this->phpVersion->hasStricterRoundFunctions()) {
            $allowed = TypeCombinator::union(new IntegerType(), new FloatType());
            if ($allowed->isSuperTypeOf($firstArgType)->no()) {
                // PHP 8 fatals if the parameter is not an integer or float.
                return new NeverType(\true);
            }
        } elseif ($firstArgType->isArray()->yes()) {
            // PHP 7 returns false if the parameter is an array.
            return new ConstantBooleanType(\false);
        }
        return new FloatType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\ClassConstFetch;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Name;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\Type;
class GetCalledClassDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'get_called_class';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        if ($scope->isInClass()) {
            return $scope->getType(new ClassConstFetch(new Name('static'), 'class'));
        }
        return new ConstantBooleanType(\false);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\BooleanType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function array_filter;
use function count;
use function version_compare;
class VersionCompareFunctionDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'version_compare';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        if (count($functionCall->getArgs()) < 2) {
            return ParametersAcceptorSelector::selectFromArgs($scope, $functionCall->getArgs(), $functionReflection->getVariants())->getReturnType();
        }
        $version1Strings = $scope->getType($functionCall->getArgs()[0]->value)->getConstantStrings();
        $version2Strings = $scope->getType($functionCall->getArgs()[1]->value)->getConstantStrings();
        $counts = [count($version1Strings), count($version2Strings)];
        if (isset($functionCall->getArgs()[2])) {
            $operatorStrings = $scope->getType($functionCall->getArgs()[2]->value)->getConstantStrings();
            $counts[] = count($operatorStrings);
            $returnType = new BooleanType();
        } else {
            $returnType = TypeCombinator::union(new ConstantIntegerType(-1), new ConstantIntegerType(0), new ConstantIntegerType(1));
        }
        if (count(array_filter($counts, static function (int $count) : bool {
            return $count === 0;
        })) > 0) {
            return $returnType;
            // one of the arguments is not a constant string
        }
        if (count(array_filter($counts, static function (int $count) : bool {
            return $count > 1;
        })) > 1) {
            return $returnType;
            // more than one argument can have multiple possibilities, avoid combinatorial explosion
        }
        $types = [];
        foreach ($version1Strings as $version1String) {
            foreach ($version2Strings as $version2String) {
                if (isset($operatorStrings)) {
                    foreach ($operatorStrings as $operatorString) {
                        $value = version_compare($version1String->getValue(), $version2String->getValue(), $operatorString->getValue());
                        $types[$value] = new ConstantBooleanType($value);
                    }
                } else {
                    $value = version_compare($version1String->getValue(), $version2String->getValue());
                    $types[$value] = new ConstantIntegerType($value);
                }
            }
        }
        return TypeCombinator::union(...$types);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use Closure;
use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\ClosureType;
use PHPStan\Type\DynamicMethodReturnTypeExtension;
use PHPStan\Type\Type;
class ClosureBindToDynamicReturnTypeExtension implements DynamicMethodReturnTypeExtension
{
    public function getClass() : string
    {
        return Closure::class;
    }
    public function isMethodSupported(MethodReflection $methodReflection) : bool
    {
        return $methodReflection->getName() === 'bindTo';
    }
    public function getTypeFromMethodCall(MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope) : Type
    {
        $closureType = $scope->getType($methodCall->var);
        if (!$closureType instanceof ClosureType) {
            return ParametersAcceptorSelector::selectSingle($methodReflection->getVariants())->getReturnType();
        }
        return $closureType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use ArithmeticError;
use DivisionByZeroError;
use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\DynamicFunctionThrowTypeExtension;
use PHPStan\Type\NeverType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function count;
use const PHP_INT_MIN;
class IntdivThrowTypeExtension implements DynamicFunctionThrowTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'intdiv';
    }
    public function getThrowTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $funcCall, Scope $scope) : ?Type
    {
        if (count($funcCall->getArgs()) < 2) {
            return $functionReflection->getThrowType();
        }
        $containsMin = \false;
        $valueType = $scope->getType($funcCall->getArgs()[0]->value);
        foreach ($valueType->getConstantScalarTypes() as $constantScalarType) {
            if ($constantScalarType->getValue() === PHP_INT_MIN) {
                $containsMin = \true;
            }
            $valueType = TypeCombinator::remove($valueType, $constantScalarType);
        }
        if (!$valueType instanceof NeverType) {
            $containsMin = \true;
        }
        $divisionByZero = \false;
        $divisorType = $scope->getType($funcCall->getArgs()[1]->value);
        foreach ($divisorType->getConstantScalarTypes() as $constantScalarType) {
            if ($containsMin && $constantScalarType->getValue() === -1) {
                return new ObjectType(ArithmeticError::class);
            }
            if ($constantScalarType->getValue() === 0) {
                $divisionByZero = \true;
            }
            $divisorType = TypeCombinator::remove($divisorType, $constantScalarType);
        }
        if (!$divisorType instanceof NeverType) {
            return new ObjectType($containsMin ? ArithmeticError::class : DivisionByZeroError::class);
        }
        if ($divisionByZero) {
            return new ObjectType(DivisionByZeroError::class);
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\BooleanType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\NeverType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\UnionType;
use function array_key_exists;
use function array_map;
use function array_unique;
use function count;
class MbFunctionsReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    use \PHPStan\Type\Php\MbFunctionsReturnTypeExtensionTrait;
    /** @var int[]  */
    private $encodingPositionMap = ['mb_http_output' => 1, 'mb_regex_encoding' => 1, 'mb_internal_encoding' => 1, 'mb_encoding_aliases' => 1, 'mb_chr' => 2, 'mb_ord' => 2];
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return array_key_exists($functionReflection->getName(), $this->encodingPositionMap);
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $returnType = ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        $positionEncodingParam = $this->encodingPositionMap[$functionReflection->getName()];
        if (count($functionCall->getArgs()) < $positionEncodingParam) {
            return TypeCombinator::remove($returnType, new BooleanType());
        }
        $strings = $scope->getType($functionCall->getArgs()[$positionEncodingParam - 1]->value)->getConstantStrings();
        $results = array_unique(array_map(function (ConstantStringType $encoding) : bool {
            return $this->isSupportedEncoding($encoding->getValue());
        }, $strings));
        if ($returnType->equals(new UnionType([new StringType(), new BooleanType()]))) {
            return count($results) === 1 ? new ConstantBooleanType($results[0]) : new BooleanType();
        }
        if (count($results) === 1) {
            $invalidEncodingReturn = new ConstantBooleanType(\false);
            if ($this->phpVersion->throwsOnInvalidMbStringEncoding()) {
                $invalidEncodingReturn = new NeverType();
            }
            return $results[0] ? TypeCombinator::remove($returnType, new ConstantBooleanType(\false)) : $invalidEncodingReturn;
        }
        return $returnType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\BenevolentUnionType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\FloatType;
use PHPStan\Type\MixedType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\UnionType;
use function count;
class MicrotimeFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'microtime';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        if (count($functionCall->getArgs()) < 1) {
            return new StringType();
        }
        $argType = $scope->getType($functionCall->getArgs()[0]->value);
        $isTrueType = (new ConstantBooleanType(\true))->isSuperTypeOf($argType);
        $isFalseType = (new ConstantBooleanType(\false))->isSuperTypeOf($argType);
        $compareTypes = $isTrueType->compareTo($isFalseType);
        if ($compareTypes === $isTrueType) {
            return new FloatType();
        }
        if ($compareTypes === $isFalseType) {
            return new StringType();
        }
        if ($argType instanceof MixedType) {
            return new BenevolentUnionType([new StringType(), new FloatType()]);
        }
        return new UnionType([new StringType(), new FloatType()]);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use function count;
class StrTokFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'strtok';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $args = $functionCall->getArgs();
        if (count($args) !== 2) {
            return ParametersAcceptorSelector::selectFromArgs($scope, $args, $functionReflection->getVariants())->getReturnType();
        }
        $delimiterType = $scope->getType($functionCall->getArgs()[0]->value);
        $isEmptyString = (new ConstantStringType(''))->isSuperTypeOf($delimiterType);
        if ($isEmptyString->yes()) {
            return new ConstantBooleanType(\false);
        }
        if ($isEmptyString->no()) {
            return new StringType();
        }
        return ParametersAcceptorSelector::selectFromArgs($scope, $args, $functionReflection->getVariants())->getReturnType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeUtils;
use function array_map;
use function array_unique;
use function count;
use function gettype;
use function min;
use function strtotime;
class StrtotimeFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'strtotime';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $defaultReturnType = ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        if (count($functionCall->getArgs()) === 0) {
            return $defaultReturnType;
        }
        $argType = $scope->getType($functionCall->getArgs()[0]->value);
        if ($argType instanceof MixedType) {
            return TypeUtils::toBenevolentUnion($defaultReturnType);
        }
        $results = array_unique(array_map(static function (ConstantStringType $string) {
            return strtotime($string->getValue());
        }, $argType->getConstantStrings()));
        $resultTypes = array_unique(array_map(static function ($value) : string {
            return gettype($value);
        }, $results));
        if (count($resultTypes) !== 1 || count($results) === 0) {
            return $defaultReturnType;
        }
        if ($results[0] === \false) {
            return new ConstantBooleanType(\false);
        }
        // 2nd param $baseTimestamp is too non-deterministic so simply return int
        if (count($functionCall->getArgs()) > 1) {
            return new IntegerType();
        }
        // if it is positive we can narrow down to positive-int as long as time flows forward
        if (min(array_map('intval', $results)) > 0) {
            return IntegerRangeType::createAllGreaterThan(0);
        }
        return new IntegerType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\ErrorType;
use PHPStan\Type\FloatType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\NullType;
use PHPStan\Type\Type;
use function count;
use function in_array;
class StrvalFamilyFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    private const FUNCTIONS = ['strval', 'intval', 'boolval', 'floatval', 'doubleval'];
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return in_array($functionReflection->getName(), self::FUNCTIONS, \true);
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        if (count($functionCall->getArgs()) === 0) {
            return new NullType();
        }
        $argType = $scope->getType($functionCall->getArgs()[0]->value);
        switch ($functionReflection->getName()) {
            case 'strval':
                return $argType->toString();
            case 'intval':
                $type = $argType->toInteger();
                return $type instanceof ErrorType ? new IntegerType() : $type;
            case 'boolval':
                return $argType->toBoolean();
            case 'floatval':
            case 'doubleval':
                $type = $argType->toFloat();
                return $type instanceof ErrorType ? new FloatType() : $type;
            default:
                throw new ShouldNotHappenException();
        }
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\NeverType;
use PHPStan\Type\NullType;
use PHPStan\Type\Type;
use function count;
class ArrayFillKeysFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'array_fill_keys';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        if (count($functionCall->getArgs()) < 2) {
            return null;
        }
        $keysType = $scope->getType($functionCall->getArgs()[0]->value);
        if ($keysType->isArray()->no()) {
            return $this->phpVersion->arrayFunctionsReturnNullWithNonArray() ? new NullType() : new NeverType();
        }
        return $keysType->fillKeysArray($scope->getType($functionCall->getArgs()[1]->value));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function count;
use function sprintf;
class PathinfoFunctionDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(ReflectionProvider $reflectionProvider)
    {
        $this->reflectionProvider = $reflectionProvider;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'pathinfo';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, Node\Expr\FuncCall $functionCall, Scope $scope) : ?Type
    {
        $argsCount = count($functionCall->getArgs());
        if ($argsCount === 0) {
            return null;
        }
        $pathType = $scope->getType($functionCall->getArgs()[0]->value);
        $builder = ConstantArrayTypeBuilder::createEmpty();
        $builder->setOffsetValueType(new ConstantStringType('dirname'), new StringType(), !$pathType->isNonEmptyString()->yes());
        $builder->setOffsetValueType(new ConstantStringType('basename'), new StringType());
        $builder->setOffsetValueType(new ConstantStringType('extension'), new StringType(), \true);
        $builder->setOffsetValueType(new ConstantStringType('filename'), new StringType());
        $arrayType = $builder->getArray();
        if ($argsCount === 1) {
            return $arrayType;
        }
        $flagsType = $scope->getType($functionCall->getArgs()[1]->value);
        if ($flagsType instanceof ConstantIntegerType) {
            if ($flagsType->getValue() === $this->getConstant('PATHINFO_ALL')) {
                return $arrayType;
            }
            return new StringType();
        }
        return TypeCombinator::union($arrayType, new StringType());
    }
    private function getConstant(string $constantName) : ?int
    {
        if (!$this->reflectionProvider->hasConstant(new Node\Name($constantName), null)) {
            return null;
        }
        $constant = $this->reflectionProvider->getConstant(new Node\Name($constantName), null);
        $valueType = $constant->getValueType();
        if (!$valueType instanceof ConstantIntegerType) {
            throw new ShouldNotHappenException(sprintf('Constant %s does not have integer type.', $constantName));
        }
        return $valueType->getValue();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\BooleanType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\NeverType;
use PHPStan\Type\NullType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function in_array;
use function strtolower;
class MbSubstituteCharacterDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'mb_substitute_character';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $minCodePoint = $this->phpVersion->getVersionId() < 80000 ? 1 : 0;
        $maxCodePoint = $this->phpVersion->supportsAllUnicodeScalarCodePointsInMbSubstituteCharacter() ? 0x10ffff : 0xfffe;
        $ranges = [];
        if ($this->phpVersion->supportsAllUnicodeScalarCodePointsInMbSubstituteCharacter()) {
            // Surrogates aren't valid in PHP 7.2+
            $ranges[] = IntegerRangeType::fromInterval($minCodePoint, 0xd7ff);
            $ranges[] = IntegerRangeType::fromInterval(0xe000, $maxCodePoint);
        } else {
            $ranges[] = IntegerRangeType::fromInterval($minCodePoint, $maxCodePoint);
        }
        if (!isset($functionCall->getArgs()[0])) {
            return TypeCombinator::union(new ConstantStringType('none'), new ConstantStringType('long'), new ConstantStringType('entity'), ...$ranges);
        }
        $argType = $scope->getType($functionCall->getArgs()[0]->value);
        $isString = $argType->isString();
        $isNull = (new NullType())->isSuperTypeOf($argType);
        $isInteger = (new IntegerType())->isSuperTypeOf($argType);
        if ($isString->no() && $isNull->no() && $isInteger->no()) {
            if ($this->phpVersion->throwsTypeErrorForInternalFunctions()) {
                return new NeverType();
            }
            return new BooleanType();
        }
        if ($isInteger->yes()) {
            $invalidRanges = [];
            foreach ($ranges as $range) {
                $isInRange = $range->isSuperTypeOf($argType);
                if ($isInRange->yes()) {
                    return new ConstantBooleanType(\true);
                }
                $invalidRanges[] = $isInRange->no();
            }
            if ($argType instanceof ConstantIntegerType || !in_array(\false, $invalidRanges, \true)) {
                if ($this->phpVersion->throwsValueErrorForInternalFunctions()) {
                    return new NeverType();
                }
                return new ConstantBooleanType(\false);
            }
        } elseif ($isString->yes()) {
            if ($argType->isNonEmptyString()->no()) {
                // The empty string was a valid alias for "none" in PHP < 8.
                if ($this->phpVersion->isEmptyStringValidAliasForNoneInMbSubstituteCharacter()) {
                    return new ConstantBooleanType(\true);
                }
                return new NeverType();
            }
            if (!$this->phpVersion->isNumericStringValidArgInMbSubstituteCharacter() && $argType->isNumericString()->yes()) {
                return new NeverType();
            }
            if ($argType instanceof ConstantStringType) {
                $value = strtolower($argType->getValue());
                if ($value === 'none' || $value === 'long' || $value === 'entity') {
                    return new ConstantBooleanType(\true);
                }
                if ($argType->isNumericString()->yes()) {
                    $codePoint = (int) $value;
                    $isValid = $codePoint >= $minCodePoint && $codePoint <= $maxCodePoint;
                    if ($this->phpVersion->supportsAllUnicodeScalarCodePointsInMbSubstituteCharacter()) {
                        $isValid = $isValid && ($codePoint < 0xd800 || $codePoint > 0xdfff);
                    }
                    return new ConstantBooleanType($isValid);
                }
                if ($this->phpVersion->throwsValueErrorForInternalFunctions()) {
                    return new NeverType();
                }
                return new ConstantBooleanType(\false);
            }
        } elseif ($isNull->yes()) {
            // The $substitute_character arg is nullable in PHP 8+
            return new ConstantBooleanType($this->phpVersion->isNullValidArgInMbSubstituteCharacter());
        }
        return new BooleanType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\NeverType;
use PHPStan\Type\NullType;
use PHPStan\Type\Type;
use function count;
class ArrayFlipFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'array_flip';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        if (count($functionCall->getArgs()) !== 1) {
            return null;
        }
        $arrayType = $scope->getType($functionCall->getArgs()[0]->value);
        if ($arrayType->isArray()->no()) {
            return $this->phpVersion->arrayFunctionsReturnNullWithNonArray() ? new NullType() : new NeverType();
        }
        return $arrayType->flipArray();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use DateTime;
use DateTimeImmutable;
use PhpParser\Node\Expr\StaticCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Type\DynamicStaticMethodThrowTypeExtension;
use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function count;
use function in_array;
class DateTimeConstructorThrowTypeExtension implements DynamicStaticMethodThrowTypeExtension
{
    public function isStaticMethodSupported(MethodReflection $methodReflection) : bool
    {
        return $methodReflection->getName() === '__construct' && in_array($methodReflection->getDeclaringClass()->getName(), [DateTime::class, DateTimeImmutable::class], \true);
    }
    public function getThrowTypeFromStaticMethodCall(MethodReflection $methodReflection, StaticCall $methodCall, Scope $scope) : ?Type
    {
        if (count($methodCall->getArgs()) === 0) {
            return null;
        }
        $valueType = $scope->getType($methodCall->getArgs()[0]->value);
        $constantStrings = $valueType->getConstantStrings();
        foreach ($constantStrings as $constantString) {
            try {
                new DateTime($constantString->getValue());
            } catch (\Exception $e) {
                // phpcs:ignore
                return $methodReflection->getThrowType();
            }
            $valueType = TypeCombinator::remove($valueType, $constantString);
        }
        if (!$valueType instanceof NeverType) {
            return $methodReflection->getThrowType();
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\ArrayType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntegerType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
class MbConvertEncodingFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'mb_convert_encoding';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $defaultReturnType = ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        if (!isset($functionCall->getArgs()[0])) {
            return $defaultReturnType;
        }
        $argType = $scope->getType($functionCall->getArgs()[0]->value);
        $isString = $argType->isString();
        $isArray = $argType->isArray();
        $compare = $isString->compareTo($isArray);
        if ($compare === $isString) {
            return new StringType();
        } elseif ($compare === $isArray) {
            return new ArrayType(new IntegerType(), new StringType());
        }
        return $defaultReturnType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\StaticCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Type\DynamicStaticMethodThrowTypeExtension;
use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use ReflectionProperty;
use function count;
class ReflectionPropertyConstructorThrowTypeExtension implements DynamicStaticMethodThrowTypeExtension
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(ReflectionProvider $reflectionProvider)
    {
        $this->reflectionProvider = $reflectionProvider;
    }
    public function isStaticMethodSupported(MethodReflection $methodReflection) : bool
    {
        return $methodReflection->getName() === '__construct' && $methodReflection->getDeclaringClass()->getName() === ReflectionProperty::class;
    }
    public function getThrowTypeFromStaticMethodCall(MethodReflection $methodReflection, StaticCall $methodCall, Scope $scope) : ?Type
    {
        if (count($methodCall->getArgs()) < 2) {
            return $methodReflection->getThrowType();
        }
        $valueType = $scope->getType($methodCall->getArgs()[0]->value);
        $propertyType = $scope->getType($methodCall->getArgs()[1]->value);
        foreach ($valueType->getConstantStrings() as $constantString) {
            if (!$this->reflectionProvider->hasClass($constantString->getValue())) {
                return $methodReflection->getThrowType();
            }
            $classReflection = $this->reflectionProvider->getClass($constantString->getValue());
            foreach ($propertyType->getConstantStrings() as $constantPropertyString) {
                if (!$classReflection->hasProperty($constantPropertyString->getValue())) {
                    return $methodReflection->getThrowType();
                }
            }
            $valueType = TypeCombinator::remove($valueType, $constantString);
        }
        if (!$valueType instanceof NeverType) {
            return $methodReflection->getThrowType();
        }
        // Look for non constantStrings value.
        foreach ($propertyType->getConstantStrings() as $constantPropertyString) {
            $propertyType = TypeCombinator::remove($propertyType, $constantPropertyString);
        }
        if (!$propertyType instanceof NeverType) {
            return $methodReflection->getThrowType();
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntegerType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
class DioStatDynamicFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'dio_stat';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $valueType = new IntegerType();
        $builder = ConstantArrayTypeBuilder::createEmpty();
        $keys = ['device', 'inode', 'mode', 'nlink', 'uid', 'gid', 'device_type', 'size', 'blocksize', 'blocks', 'atime', 'mtime', 'ctime'];
        foreach ($keys as $key) {
            $builder->setOffsetValueType(new ConstantStringType($key), $valueType);
        }
        return TypeCombinator::addNull($builder->getArray());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Type\ArrayType;
use PHPStan\Type\DynamicMethodReturnTypeExtension;
use PHPStan\Type\Generic\GenericObjectType;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
use ReflectionAttribute;
use function count;
class ReflectionGetAttributesMethodReturnTypeExtension implements DynamicMethodReturnTypeExtension
{
    /**
     * @var class-string
     */
    private $className;
    /**
     * @param class-string $className One of reflection classes: https://www.php.net/manual/en/book.reflection.php
     */
    public function __construct(string $className)
    {
        $this->className = $className;
    }
    public function getClass() : string
    {
        return $this->className;
    }
    public function isMethodSupported(MethodReflection $methodReflection) : bool
    {
        return $methodReflection->getDeclaringClass()->getName() === $this->className && $methodReflection->getName() === 'getAttributes';
    }
    public function getTypeFromMethodCall(MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope) : ?Type
    {
        if (count($methodCall->getArgs()) === 0) {
            return null;
        }
        $argType = $scope->getType($methodCall->getArgs()[0]->value);
        $classType = $argType->getClassStringObjectType();
        return new ArrayType(new MixedType(), new GenericObjectType(ReflectionAttribute::class, [$classType]));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\Type;
use function count;
use function in_array;
use const COUNT_RECURSIVE;
class CountFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return in_array($functionReflection->getName(), ['sizeof', 'count'], \true);
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        if (count($functionCall->getArgs()) < 1) {
            return null;
        }
        if (count($functionCall->getArgs()) > 1) {
            $mode = $scope->getType($functionCall->getArgs()[1]->value);
            if ($mode->isSuperTypeOf(new ConstantIntegerType(COUNT_RECURSIVE))->yes()) {
                return null;
            }
        }
        return $scope->getType($functionCall->getArgs()[0]->value)->getArraySize();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\FloatType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\UnionType;
final class ArraySumFunctionDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'array_sum';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        if (!isset($functionCall->getArgs()[0])) {
            return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        }
        $arrayType = $scope->getType($functionCall->getArgs()[0]->value);
        $itemType = $arrayType->getIterableValueType();
        if ($arrayType->isIterableAtLeastOnce()->no()) {
            return new ConstantIntegerType(0);
        }
        $intUnionFloat = new UnionType([new IntegerType(), new FloatType()]);
        if ($arrayType->isIterableAtLeastOnce()->yes()) {
            if ($intUnionFloat->isSuperTypeOf($itemType)->yes()) {
                return $itemType;
            }
            return $intUnionFloat;
        }
        if ($intUnionFloat->isSuperTypeOf($itemType)->yes()) {
            return TypeCombinator::union(new ConstantIntegerType(0), $itemType);
        }
        return TypeCombinator::union(new ConstantIntegerType(0), $intUnionFloat);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\ArrayDimFetch;
use PhpParser\Node\Expr\BinaryOp\Identical;
use PhpParser\Node\Expr\ConstFetch;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Name;
use PHPStan\Analyser\Scope;
use PHPStan\Analyser\SpecifiedTypes;
use PHPStan\Analyser\TypeSpecifier;
use PHPStan\Analyser\TypeSpecifierAwareExtension;
use PHPStan\Analyser\TypeSpecifierContext;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Accessory\HasOffsetType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\FunctionTypeSpecifyingExtension;
use PHPStan\Type\MixedType;
use PHPStan\Type\TypeCombinator;
use function count;
use function in_array;
class ArrayKeyExistsFunctionTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
{
    /**
     * @var \PHPStan\Analyser\TypeSpecifier
     */
    private $typeSpecifier;
    public function setTypeSpecifier(TypeSpecifier $typeSpecifier) : void
    {
        $this->typeSpecifier = $typeSpecifier;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection, FuncCall $node, TypeSpecifierContext $context) : bool
    {
        return in_array($functionReflection->getName(), ['array_key_exists', 'key_exists'], \true) && !$context->null();
    }
    public function specifyTypes(FunctionReflection $functionReflection, FuncCall $node, Scope $scope, TypeSpecifierContext $context) : SpecifiedTypes
    {
        if (count($node->getArgs()) < 2) {
            return new SpecifiedTypes();
        }
        $key = $node->getArgs()[0]->value;
        $array = $node->getArgs()[1]->value;
        $keyType = $scope->getType($key);
        $arrayType = $scope->getType($array);
        if (!$keyType instanceof ConstantIntegerType && !$keyType instanceof ConstantStringType && !$arrayType->isIterableAtLeastOnce()->no()) {
            if ($context->true()) {
                $arrayKeyType = $arrayType->getIterableKeyType();
                if ($keyType->isString()->yes()) {
                    $arrayKeyType = $arrayKeyType->toString();
                } elseif ($keyType->isString()->maybe()) {
                    $arrayKeyType = TypeCombinator::union($arrayKeyType, $arrayKeyType->toString());
                }
                $specifiedTypes = $this->typeSpecifier->create($key, $arrayKeyType, $context, \false, $scope);
                $arrayDimFetch = new ArrayDimFetch($array, $key);
                return $specifiedTypes->unionWith($this->typeSpecifier->create($arrayDimFetch, $arrayType->getIterableValueType(), $context, \false, $scope, new Identical($arrayDimFetch, new ConstFetch(new Name('__PHPSTAN_FAUX_CONSTANT')))));
            }
            return new SpecifiedTypes();
        }
        if ($context->true()) {
            $type = TypeCombinator::intersect(new ArrayType(new MixedType(), new MixedType()), new HasOffsetType($keyType));
        } else {
            $type = new HasOffsetType($keyType);
        }
        return $this->typeSpecifier->create($array, $type, $context, \false, $scope);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPStan\Analyser\SpecifiedTypes;
use PHPStan\Analyser\TypeSpecifier;
use PHPStan\Analyser\TypeSpecifierAwareExtension;
use PHPStan\Analyser\TypeSpecifierContext;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\Generic\GenericObjectType;
use PHPStan\Type\MethodTypeSpecifyingExtension;
use PHPStan\Type\ObjectType;
use ReflectionClass;
class ReflectionClassIsSubclassOfTypeSpecifyingExtension implements MethodTypeSpecifyingExtension, TypeSpecifierAwareExtension
{
    /**
     * @var \PHPStan\Analyser\TypeSpecifier
     */
    private $typeSpecifier;
    public function setTypeSpecifier(TypeSpecifier $typeSpecifier) : void
    {
        $this->typeSpecifier = $typeSpecifier;
    }
    public function getClass() : string
    {
        return ReflectionClass::class;
    }
    public function isMethodSupported(MethodReflection $methodReflection, MethodCall $node, TypeSpecifierContext $context) : bool
    {
        return $methodReflection->getName() === 'isSubclassOf' && isset($node->getArgs()[0]) && $context->true();
    }
    public function specifyTypes(MethodReflection $methodReflection, MethodCall $node, Scope $scope, TypeSpecifierContext $context) : SpecifiedTypes
    {
        $valueType = $scope->getType($node->getArgs()[0]->value);
        if (!$valueType instanceof ConstantStringType) {
            return new SpecifiedTypes([], []);
        }
        return $this->typeSpecifier->create($node->var, new GenericObjectType(ReflectionClass::class, [new ObjectType($valueType->getValue())]), $context, \false, $scope);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\Cast;
use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Analyser\SpecifiedTypes;
use PHPStan\Analyser\TypeSpecifier;
use PHPStan\Analyser\TypeSpecifierAwareExtension;
use PHPStan\Analyser\TypeSpecifierContext;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Accessory\AccessoryNumericStringType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\FunctionTypeSpecifyingExtension;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\StringType;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\UnionType;
use function strtolower;
class CtypeDigitFunctionTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
{
    /**
     * @var \PHPStan\Analyser\TypeSpecifier
     */
    private $typeSpecifier;
    public function isFunctionSupported(FunctionReflection $functionReflection, FuncCall $node, TypeSpecifierContext $context) : bool
    {
        return strtolower($functionReflection->getName()) === 'ctype_digit' && !$context->null();
    }
    public function specifyTypes(FunctionReflection $functionReflection, FuncCall $node, Scope $scope, TypeSpecifierContext $context) : SpecifiedTypes
    {
        if (!isset($node->getArgs()[0])) {
            return new SpecifiedTypes();
        }
        if ($context->null()) {
            throw new ShouldNotHappenException();
        }
        $exprArg = $node->getArgs()[0]->value;
        if ($context->true() && $scope->getType($exprArg)->isNumericString()->yes()) {
            return new SpecifiedTypes();
        }
        $types = [
            IntegerRangeType::fromInterval(48, 57),
            // ASCII-codes for 0-9
            IntegerRangeType::createAllGreaterThanOrEqualTo(256),
        ];
        if ($context->true()) {
            $types[] = new IntersectionType([new StringType(), new AccessoryNumericStringType()]);
        }
        $unionType = TypeCombinator::union(...$types);
        $specifiedTypes = $this->typeSpecifier->create($exprArg, $unionType, $context, \false, $scope);
        if ($exprArg instanceof Cast\String_) {
            $castedType = new UnionType([IntegerRangeType::fromInterval(0, null), new IntersectionType([new StringType(), new AccessoryNumericStringType()]), new ConstantBooleanType(\true)]);
            $specifiedTypes = $specifiedTypes->unionWith($this->typeSpecifier->create($exprArg->expr, $castedType, $context, \false, $scope));
        }
        return $specifiedTypes;
    }
    public function setTypeSpecifier(TypeSpecifier $typeSpecifier) : void
    {
        $this->typeSpecifier = $typeSpecifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntegerType;
use PHPStan\Type\NeverType;
use PHPStan\Type\NullType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function count;
final class ArrayChunkFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'array_chunk';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        if (count($functionCall->getArgs()) < 2) {
            return null;
        }
        $arrayType = $scope->getType($functionCall->getArgs()[0]->value);
        $lengthType = $scope->getType($functionCall->getArgs()[1]->value);
        if (isset($functionCall->getArgs()[2])) {
            $preserveKeysType = $scope->getType($functionCall->getArgs()[2]->value);
            $preserveKeys = $preserveKeysType instanceof ConstantBooleanType ? $preserveKeysType->getValue() : null;
        } else {
            $preserveKeys = \false;
        }
        if ($lengthType instanceof ConstantIntegerType && $lengthType->getValue() < 1) {
            return $this->phpVersion->throwsValueErrorForInternalFunctions() ? new NeverType() : new NullType();
        }
        if (!$arrayType->isArray()->yes()) {
            return null;
        }
        $constantArrays = $arrayType->getConstantArrays();
        if ($lengthType instanceof ConstantIntegerType && $lengthType->getValue() >= 1 && $preserveKeys !== null && count($constantArrays) > 0) {
            $results = [];
            foreach ($constantArrays as $constantArray) {
                $results[] = $constantArray->chunk($lengthType->getValue(), $preserveKeys);
            }
            return TypeCombinator::union(...$results);
        }
        $chunkType = self::getChunkType($arrayType, $preserveKeys);
        $resultType = AccessoryArrayListType::intersectWith(new ArrayType(new IntegerType(), $chunkType));
        if ($arrayType->isIterableAtLeastOnce()->yes()) {
            $resultType = TypeCombinator::intersect($resultType, new NonEmptyArrayType());
        }
        return $resultType;
    }
    private static function getChunkType(Type $type, ?bool $preserveKeys) : Type
    {
        if ($preserveKeys === null) {
            $chunkType = new ArrayType(TypeCombinator::union($type->getIterableKeyType(), new IntegerType()), $type->getIterableValueType());
        } elseif ($preserveKeys) {
            $chunkType = $type;
        } else {
            $chunkType = new ArrayType(new IntegerType(), $type->getIterableValueType());
            $chunkType = AccessoryArrayListType::intersectWith($chunkType);
        }
        return TypeCombinator::intersect($chunkType, new NonEmptyArrayType());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\StaticCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Type\DynamicStaticMethodThrowTypeExtension;
use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use SimpleXMLElement;
use function count;
class SimpleXMLElementConstructorThrowTypeExtension implements DynamicStaticMethodThrowTypeExtension
{
    public function isStaticMethodSupported(MethodReflection $methodReflection) : bool
    {
        return $methodReflection->getName() === '__construct' && $methodReflection->getDeclaringClass()->getName() === SimpleXMLElement::class;
    }
    public function getThrowTypeFromStaticMethodCall(MethodReflection $methodReflection, StaticCall $methodCall, Scope $scope) : ?Type
    {
        if (count($methodCall->getArgs()) === 0) {
            return $methodReflection->getThrowType();
        }
        $valueType = $scope->getType($methodCall->getArgs()[0]->value);
        $constantStrings = $valueType->getConstantStrings();
        foreach ($constantStrings as $constantString) {
            try {
                new SimpleXMLElement($constantString->getValue());
            } catch (\Exception $e) {
                // phpcs:ignore
                return $methodReflection->getThrowType();
            }
            $valueType = TypeCombinator::remove($valueType, $constantString);
        }
        if (!$valueType instanceof NeverType) {
            return $methodReflection->getThrowType();
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function count;
class ArrayFillFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    private const MAX_SIZE_USE_CONSTANT_ARRAY = 100;
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'array_fill';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        if (count($functionCall->getArgs()) < 3) {
            return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        }
        $numberType = $scope->getType($functionCall->getArgs()[1]->value);
        $isValidNumberType = IntegerRangeType::fromInterval(0, null)->isSuperTypeOf($numberType);
        // check against negative-int, which is not allowed
        if ($isValidNumberType->no()) {
            if ($this->phpVersion->throwsValueErrorForInternalFunctions()) {
                return new NeverType();
            }
            return new ConstantBooleanType(\false);
        }
        $startIndexType = $scope->getType($functionCall->getArgs()[0]->value);
        $valueType = $scope->getType($functionCall->getArgs()[2]->value);
        if ($startIndexType instanceof ConstantIntegerType && $numberType instanceof ConstantIntegerType && $numberType->getValue() <= self::MAX_SIZE_USE_CONSTANT_ARRAY) {
            $arrayBuilder = ConstantArrayTypeBuilder::createEmpty();
            $nextIndex = $startIndexType->getValue();
            for ($i = 0; $i < $numberType->getValue(); $i++) {
                $arrayBuilder->setOffsetValueType(new ConstantIntegerType($nextIndex), $valueType);
                if ($nextIndex < 0) {
                    $nextIndex = 0;
                } else {
                    $nextIndex++;
                }
            }
            return $arrayBuilder->getArray();
        }
        $resultType = new ArrayType(new IntegerType(), $valueType);
        if ((new ConstantIntegerType(0))->isSuperTypeOf($startIndexType)->yes()) {
            $resultType = AccessoryArrayListType::intersectWith($resultType);
        }
        if (IntegerRangeType::fromInterval(1, null)->isSuperTypeOf($numberType)->yes()) {
            $resultType = TypeCombinator::intersect($resultType, new NonEmptyArrayType());
        }
        if (!$isValidNumberType->yes() && !$this->phpVersion->throwsValueErrorForInternalFunctions()) {
            $resultType = TypeCombinator::union($resultType, new ConstantBooleanType(\false));
        }
        return $resultType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\BenevolentUnionType;
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
use PHPStan\Type\Constant\ConstantFloatType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\FloatType;
use PHPStan\Type\GeneralizePrecision;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\UnionType;
use function count;
use function range;
class RangeFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    private const RANGE_LENGTH_THRESHOLD = 50;
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'range';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        if (count($functionCall->getArgs()) < 2) {
            return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        }
        $startType = $scope->getType($functionCall->getArgs()[0]->value);
        $endType = $scope->getType($functionCall->getArgs()[1]->value);
        $stepType = count($functionCall->getArgs()) >= 3 ? $scope->getType($functionCall->getArgs()[2]->value) : new ConstantIntegerType(1);
        $constantReturnTypes = [];
        $startConstants = $startType->getConstantScalarTypes();
        foreach ($startConstants as $startConstant) {
            if (!$startConstant instanceof ConstantIntegerType && !$startConstant instanceof ConstantFloatType && !$startConstant instanceof ConstantStringType) {
                continue;
            }
            $endConstants = $endType->getConstantScalarTypes();
            foreach ($endConstants as $endConstant) {
                if (!$endConstant instanceof ConstantIntegerType && !$endConstant instanceof ConstantFloatType && !$endConstant instanceof ConstantStringType) {
                    continue;
                }
                $stepConstants = $stepType->getConstantScalarTypes();
                foreach ($stepConstants as $stepConstant) {
                    if (!$stepConstant instanceof ConstantIntegerType && !$stepConstant instanceof ConstantFloatType) {
                        continue;
                    }
                    $rangeValues = range($startConstant->getValue(), $endConstant->getValue(), $stepConstant->getValue());
                    if (count($rangeValues) > self::RANGE_LENGTH_THRESHOLD) {
                        if ($startConstant instanceof ConstantIntegerType && $endConstant instanceof ConstantIntegerType) {
                            if ($startConstant->getValue() > $endConstant->getValue()) {
                                $tmp = $startConstant;
                                $startConstant = $endConstant;
                                $endConstant = $tmp;
                            }
                            return AccessoryArrayListType::intersectWith(TypeCombinator::intersect(new ArrayType(new IntegerType(), IntegerRangeType::fromInterval($startConstant->getValue(), $endConstant->getValue())), new NonEmptyArrayType()));
                        }
                        return AccessoryArrayListType::intersectWith(TypeCombinator::intersect(new ArrayType(new IntegerType(), TypeCombinator::union($startConstant->generalize(GeneralizePrecision::moreSpecific()), $endConstant->generalize(GeneralizePrecision::moreSpecific()))), new NonEmptyArrayType()));
                    }
                    $arrayBuilder = ConstantArrayTypeBuilder::createEmpty();
                    foreach ($rangeValues as $value) {
                        $arrayBuilder->setOffsetValueType(null, $scope->getTypeFromValue($value));
                    }
                    $constantReturnTypes[] = $arrayBuilder->getArray();
                }
            }
        }
        if (count($constantReturnTypes) > 0) {
            return TypeCombinator::union(...$constantReturnTypes);
        }
        $argType = TypeCombinator::union($startType, $endType);
        $isInteger = (new IntegerType())->isSuperTypeOf($argType)->yes();
        $isStepInteger = (new IntegerType())->isSuperTypeOf($stepType)->yes();
        if ($isInteger && $isStepInteger) {
            return AccessoryArrayListType::intersectWith(new ArrayType(new IntegerType(), new IntegerType()));
        }
        $isFloat = (new FloatType())->isSuperTypeOf($argType)->yes();
        if ($isFloat) {
            return AccessoryArrayListType::intersectWith(new ArrayType(new IntegerType(), new FloatType()));
        }
        $numberType = new UnionType([new IntegerType(), new FloatType()]);
        $isNumber = $numberType->isSuperTypeOf($argType)->yes();
        $isNumericString = $argType->isNumericString()->yes();
        if ($isNumber || $isNumericString) {
            return AccessoryArrayListType::intersectWith(new ArrayType(new IntegerType(), $numberType));
        }
        $isString = $argType->isString()->yes();
        if ($isString) {
            return AccessoryArrayListType::intersectWith(new ArrayType(new IntegerType(), new StringType()));
        }
        return AccessoryArrayListType::intersectWith(new ArrayType(new IntegerType(), new BenevolentUnionType([new IntegerType(), new FloatType(), new StringType()])));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use DateTime;
use DateTimeInterface;
use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\DynamicMethodReturnTypeExtension;
use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function count;
class DateTimeModifyReturnTypeExtension implements DynamicMethodReturnTypeExtension
{
    /** @var class-string<DateTimeInterface> */
    private $dateTimeClass;
    /** @param class-string<DateTimeInterface> $dateTimeClass */
    public function __construct(string $dateTimeClass = DateTime::class)
    {
        $this->dateTimeClass = $dateTimeClass;
    }
    public function getClass() : string
    {
        return $this->dateTimeClass;
    }
    public function isMethodSupported(MethodReflection $methodReflection) : bool
    {
        return $methodReflection->getName() === 'modify';
    }
    public function getTypeFromMethodCall(MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope) : ?Type
    {
        if (count($methodCall->getArgs()) < 1) {
            return null;
        }
        $valueType = $scope->getType($methodCall->getArgs()[0]->value);
        $constantStrings = $valueType->getConstantStrings();
        $hasFalse = \false;
        $hasDateTime = \false;
        foreach ($constantStrings as $constantString) {
            if (@(new DateTime())->modify($constantString->getValue()) === \false) {
                $hasFalse = \true;
            } else {
                $hasDateTime = \true;
            }
            $valueType = TypeCombinator::remove($valueType, $constantString);
        }
        if (!$valueType instanceof NeverType) {
            return null;
        }
        if ($hasFalse && !$hasDateTime) {
            return new ConstantBooleanType(\false);
        }
        if ($hasDateTime && !$hasFalse) {
            return $scope->getType($methodCall->var);
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Name\FullyQualified;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use function count;
class DateFormatFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'date_format';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        if (count($functionCall->getArgs()) < 2) {
            return new StringType();
        }
        return $scope->getType(new FuncCall(new FullyQualified('date'), [$functionCall->getArgs()[1]]));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\NullType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
class ArrayKeyLastDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'array_key_last';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        if (!isset($functionCall->getArgs()[0])) {
            return null;
        }
        $argType = $scope->getType($functionCall->getArgs()[0]->value);
        $iterableAtLeastOnce = $argType->isIterableAtLeastOnce();
        if ($iterableAtLeastOnce->no()) {
            return new NullType();
        }
        $keyType = $argType->getLastIterableKeyType();
        if ($iterableAtLeastOnce->yes()) {
            return $keyType;
        }
        return TypeCombinator::union($keyType, new NullType());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntegerType;
use PHPStan\Type\MixedType;
use PHPStan\Type\NeverType;
use PHPStan\Type\NullType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypeUtils;
use function array_slice;
use function count;
class ArrayMapFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'array_map';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        if (count($functionCall->getArgs()) < 2) {
            return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        }
        $singleArrayArgument = !isset($functionCall->getArgs()[2]);
        $callableType = $scope->getType($functionCall->getArgs()[0]->value);
        $callableIsNull = (new NullType())->isSuperTypeOf($callableType)->yes();
        if ($callableType->isCallable()->yes()) {
            $valueType = new NeverType();
            foreach ($callableType->getCallableParametersAcceptors($scope) as $parametersAcceptor) {
                $valueType = TypeCombinator::union($valueType, $parametersAcceptor->getReturnType());
            }
        } elseif ($callableIsNull) {
            $arrayBuilder = ConstantArrayTypeBuilder::createEmpty();
            foreach (array_slice($functionCall->getArgs(), 1) as $index => $arg) {
                $arrayBuilder->setOffsetValueType(new ConstantIntegerType($index), $scope->getType($arg->value)->getIterableValueType());
            }
            $valueType = $arrayBuilder->getArray();
        } else {
            $valueType = new MixedType();
        }
        $arrayType = $scope->getType($functionCall->getArgs()[1]->value);
        if ($singleArrayArgument) {
            if ($callableIsNull) {
                return $arrayType;
            }
            $constantArrays = $arrayType->getConstantArrays();
            if (count($constantArrays) > 0) {
                $arrayTypes = [];
                foreach ($constantArrays as $constantArray) {
                    $returnedArrayBuilder = ConstantArrayTypeBuilder::createEmpty();
                    foreach ($constantArray->getKeyTypes() as $i => $keyType) {
                        $returnedArrayBuilder->setOffsetValueType($keyType, $valueType, $constantArray->isOptionalKey($i));
                    }
                    $arrayTypes[] = $returnedArrayBuilder->getArray();
                }
                $mappedArrayType = TypeCombinator::union(...$arrayTypes);
            } elseif ($arrayType->isArray()->yes()) {
                $mappedArrayType = TypeCombinator::intersect(new ArrayType($arrayType->getIterableKeyType(), $valueType), ...TypeUtils::getAccessoryTypes($arrayType));
            } else {
                $mappedArrayType = new ArrayType(new MixedType(), $valueType);
            }
        } else {
            $mappedArrayType = TypeCombinator::intersect(new ArrayType(new IntegerType(), $valueType), ...TypeUtils::getAccessoryTypes($arrayType));
        }
        if ($arrayType->isIterableAtLeastOnce()->yes()) {
            $mappedArrayType = TypeCombinator::intersect($mappedArrayType, new NonEmptyArrayType());
        }
        return $mappedArrayType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Arg;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Name\FullyQualified;
use PhpParser\Node\Scalar\String_;
use PHPStan\Analyser\Scope;
use PHPStan\Analyser\SpecifiedTypes;
use PHPStan\Analyser\TypeSpecifier;
use PHPStan\Analyser\TypeSpecifierAwareExtension;
use PHPStan\Analyser\TypeSpecifierContext;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\ClassStringType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\FunctionTypeSpecifyingExtension;
use function in_array;
use function ltrim;
class ClassExistsFunctionTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
{
    /**
     * @var \PHPStan\Analyser\TypeSpecifier
     */
    private $typeSpecifier;
    public function isFunctionSupported(FunctionReflection $functionReflection, FuncCall $node, TypeSpecifierContext $context) : bool
    {
        return in_array($functionReflection->getName(), ['class_exists', 'interface_exists', 'trait_exists', 'enum_exists'], \true) && isset($node->getArgs()[0]) && $context->true();
    }
    public function specifyTypes(FunctionReflection $functionReflection, FuncCall $node, Scope $scope, TypeSpecifierContext $context) : SpecifiedTypes
    {
        $argType = $scope->getType($node->getArgs()[0]->value);
        $classStringType = new ClassStringType();
        if ($argType instanceof ConstantStringType) {
            return $this->typeSpecifier->create(new FuncCall(new FullyQualified('class_exists'), [new Arg(new String_(ltrim($argType->getValue(), '\\')))]), new ConstantBooleanType(\true), $context, \false, $scope);
        }
        return $this->typeSpecifier->create($node->getArgs()[0]->value, $classStringType, $context, \false, $scope);
    }
    public function setTypeSpecifier(TypeSpecifier $typeSpecifier) : void
    {
        $this->typeSpecifier = $typeSpecifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\ArrayType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\Type;
class ArraySpliceFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'array_splice';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        if (!isset($functionCall->getArgs()[0])) {
            return ParametersAcceptorSelector::selectFromArgs($scope, $functionCall->getArgs(), $functionReflection->getVariants())->getReturnType();
        }
        $arrayArg = $scope->getType($functionCall->getArgs()[0]->value);
        return new ArrayType($arrayArg->getIterableKeyType(), $arrayArg->getIterableValueType());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\ArrayType;
use PHPStan\Type\DynamicMethodReturnTypeExtension;
use PHPStan\Type\MixedType;
use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use SimpleXMLElement;
class SimpleXMLElementXpathMethodReturnTypeExtension implements DynamicMethodReturnTypeExtension
{
    public function getClass() : string
    {
        return SimpleXMLElement::class;
    }
    public function isMethodSupported(MethodReflection $methodReflection) : bool
    {
        return $methodReflection->getName() === 'xpath';
    }
    public function getTypeFromMethodCall(MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope) : Type
    {
        if (!isset($methodCall->getArgs()[0])) {
            return ParametersAcceptorSelector::selectSingle($methodReflection->getVariants())->getReturnType();
        }
        $argType = $scope->getType($methodCall->getArgs()[0]->value);
        $xmlElement = new SimpleXMLElement('<foo />');
        foreach ($argType->getConstantStrings() as $constantString) {
            $result = @$xmlElement->xpath($constantString->getValue());
            if ($result === \false) {
                // We can't be sure since it's maybe a namespaced xpath
                return ParametersAcceptorSelector::selectSingle($methodReflection->getVariants())->getReturnType();
            }
            $argType = TypeCombinator::remove($argType, $constantString);
        }
        if (!$argType instanceof NeverType) {
            return ParametersAcceptorSelector::selectSingle($methodReflection->getVariants())->getReturnType();
        }
        return new ArrayType(new MixedType(), $scope->getType($methodCall->var));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\UnaryMinus;
use PHPStan\Analyser\Scope;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Accessory\AccessoryNumericStringType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\ConstantScalarType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\NeverType;
use PHPStan\Type\NullType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\UnionType;
use function in_array;
use function is_numeric;
class BcMathStringOrNullReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return in_array($functionReflection->getName(), ['bcdiv', 'bcmod', 'bcpowmod', 'bcsqrt'], \true);
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        if ($functionReflection->getName() === 'bcsqrt') {
            return $this->getTypeForBcSqrt($functionCall, $scope);
        }
        if ($functionReflection->getName() === 'bcpowmod') {
            return $this->getTypeForBcPowMod($functionCall, $scope);
        }
        $stringAndNumericStringType = TypeCombinator::intersect(new StringType(), new AccessoryNumericStringType());
        if (isset($functionCall->getArgs()[1]) === \false) {
            if ($this->phpVersion->throwsTypeErrorForInternalFunctions()) {
                return new NeverType();
            }
            return new NullType();
        }
        if ($this->phpVersion->throwsTypeErrorForInternalFunctions()) {
            $defaultReturnType = $stringAndNumericStringType;
        } else {
            $defaultReturnType = new UnionType([$stringAndNumericStringType, new NullType()]);
        }
        $secondArgument = $scope->getType($functionCall->getArgs()[1]->value);
        $secondArgumentIsNumeric = $secondArgument instanceof ConstantScalarType && is_numeric($secondArgument->getValue()) || $secondArgument->isInteger()->yes();
        if ($secondArgument instanceof ConstantScalarType && ($this->isZero($secondArgument->getValue()) || !$secondArgumentIsNumeric)) {
            if ($this->phpVersion->throwsTypeErrorForInternalFunctions()) {
                return new NeverType();
            }
            return new NullType();
        }
        if (isset($functionCall->getArgs()[2]) === \false) {
            if ($secondArgument instanceof ConstantScalarType || $secondArgumentIsNumeric) {
                return $stringAndNumericStringType;
            }
            return $defaultReturnType;
        }
        $thirdArgument = $scope->getType($functionCall->getArgs()[2]->value);
        $thirdArgumentIsNumeric = \false;
        $thirdArgumentIsNegative = \false;
        if ($thirdArgument instanceof ConstantScalarType && is_numeric($thirdArgument->getValue())) {
            $thirdArgumentIsNumeric = \true;
            $thirdArgumentIsNegative = $thirdArgument->getValue() < 0;
        } elseif ((new IntegerType())->isSuperTypeOf($thirdArgument)->yes()) {
            $thirdArgumentIsNumeric = \true;
            if (IntegerRangeType::fromInterval(null, -1)->isSuperTypeOf($thirdArgument)->yes()) {
                $thirdArgumentIsNegative = \true;
            }
        }
        if ($thirdArgument instanceof ConstantScalarType && !is_numeric($thirdArgument->getValue())) {
            if ($this->phpVersion->throwsTypeErrorForInternalFunctions()) {
                return new NeverType();
            }
            return new NullType();
        }
        if ($this->phpVersion->throwsTypeErrorForInternalFunctions() && $thirdArgumentIsNegative) {
            return new NeverType();
        }
        if (($secondArgument instanceof ConstantScalarType || $secondArgumentIsNumeric) && $thirdArgumentIsNumeric) {
            return $stringAndNumericStringType;
        }
        return $defaultReturnType;
    }
    /**
     * bcsqrt
     * https://www.php.net/manual/en/function.bcsqrt.php
     * > Returns the square root as a string, or NULL if operand is negative.
     *
     */
    private function getTypeForBcSqrt(FuncCall $functionCall, Scope $scope) : Type
    {
        $stringAndNumericStringType = TypeCombinator::intersect(new StringType(), new AccessoryNumericStringType());
        if ($this->phpVersion->throwsTypeErrorForInternalFunctions()) {
            $defaultReturnType = $stringAndNumericStringType;
        } else {
            $defaultReturnType = new UnionType([$stringAndNumericStringType, new NullType()]);
        }
        if (isset($functionCall->getArgs()[0]) === \false) {
            if ($this->phpVersion->throwsTypeErrorForInternalFunctions()) {
                return new NeverType();
            }
            return $defaultReturnType;
        }
        $firstArgument = $scope->getType($functionCall->getArgs()[0]->value);
        $firstArgumentIsPositive = $firstArgument instanceof ConstantScalarType && is_numeric($firstArgument->getValue()) && $firstArgument->getValue() >= 0;
        $firstArgumentIsNegative = $firstArgument instanceof ConstantScalarType && is_numeric($firstArgument->getValue()) && $firstArgument->getValue() < 0;
        if ($firstArgument instanceof UnaryMinus || $firstArgumentIsNegative) {
            if ($this->phpVersion->throwsTypeErrorForInternalFunctions()) {
                return new NeverType();
            }
            return new NullType();
        }
        if (isset($functionCall->getArgs()[1]) === \false) {
            if ($firstArgumentIsPositive) {
                return $stringAndNumericStringType;
            }
            return $defaultReturnType;
        }
        $secondArgument = $scope->getType($functionCall->getArgs()[1]->value);
        $secondArgumentIsValid = $secondArgument instanceof ConstantScalarType && is_numeric($secondArgument->getValue()) && !$this->isZero($secondArgument->getValue());
        $secondArgumentIsNonNumeric = $secondArgument instanceof ConstantScalarType && !is_numeric($secondArgument->getValue());
        $secondArgumentIsNegative = $secondArgument instanceof ConstantScalarType && is_numeric($secondArgument->getValue()) && $secondArgument->getValue() < 0;
        if ($secondArgumentIsNonNumeric) {
            if ($this->phpVersion->throwsTypeErrorForInternalFunctions()) {
                return new NeverType();
            }
            return new NullType();
        }
        if ($secondArgument instanceof UnaryMinus || $secondArgumentIsNegative) {
            if ($this->phpVersion->throwsTypeErrorForInternalFunctions()) {
                return new NeverType();
            }
        }
        if ($firstArgumentIsPositive && $secondArgumentIsValid) {
            return $stringAndNumericStringType;
        }
        return $defaultReturnType;
    }
    /**
     * bcpowmod()
     * https://www.php.net/manual/en/function.bcpowmod.php
     * > Returns the result as a string, or FALSE if modulus is 0 or exponent is negative.
     */
    private function getTypeForBcPowMod(FuncCall $functionCall, Scope $scope) : Type
    {
        if ($this->phpVersion->throwsTypeErrorForInternalFunctions() && isset($functionCall->getArgs()[0]) === \false) {
            return new NeverType();
        }
        $stringAndNumericStringType = TypeCombinator::intersect(new StringType(), new AccessoryNumericStringType());
        if (isset($functionCall->getArgs()[1]) === \false) {
            if ($this->phpVersion->throwsTypeErrorForInternalFunctions()) {
                return new NeverType();
            }
            return new UnionType([$stringAndNumericStringType, new ConstantBooleanType(\false)]);
        }
        $exponent = $scope->getType($functionCall->getArgs()[1]->value);
        // Expontent is non numeric
        if ($this->phpVersion->throwsTypeErrorForInternalFunctions() && $exponent instanceof ConstantScalarType && !is_numeric($exponent->getValue())) {
            return new NeverType();
        }
        $exponentIsNegative = IntegerRangeType::fromInterval(null, 0)->isSuperTypeOf($exponent)->yes();
        if ($exponent instanceof ConstantScalarType) {
            $exponentIsNegative = is_numeric($exponent->getValue()) && $exponent->getValue() < 0;
        }
        if ($exponentIsNegative) {
            if ($this->phpVersion->throwsTypeErrorForInternalFunctions()) {
                return new NeverType();
            }
            return new ConstantBooleanType(\false);
        }
        if (isset($functionCall->getArgs()[2])) {
            $modulus = $scope->getType($functionCall->getArgs()[2]->value);
            $modulusIsZero = $modulus instanceof ConstantScalarType && $this->isZero($modulus->getValue());
            $modulusIsNonNumeric = $modulus instanceof ConstantScalarType && !is_numeric($modulus->getValue());
            if ($modulusIsZero || $modulusIsNonNumeric) {
                if ($this->phpVersion->throwsTypeErrorForInternalFunctions()) {
                    return new NeverType();
                }
                return new ConstantBooleanType(\false);
            }
            if ($modulus instanceof ConstantScalarType) {
                return $stringAndNumericStringType;
            }
        } else {
            if ($this->phpVersion->throwsTypeErrorForInternalFunctions()) {
                return new NeverType();
            }
        }
        if ($this->phpVersion->throwsTypeErrorForInternalFunctions()) {
            return $stringAndNumericStringType;
        }
        return new UnionType([$stringAndNumericStringType, new ConstantBooleanType(\false)]);
    }
    /**
     * Utility to help us determine if value is zero. Handles cases where we pass "0.000" too.
     *
     * @param mixed $value
     */
    private function isZero($value) : bool
    {
        if (is_numeric($value) === \false) {
            return \false;
        }
        if ($value > 0 || $value < 0) {
            return \false;
        }
        return \true;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Type\ClassStringType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypeUtils;
use PHPStan\Type\UnionType;
use function array_map;
use function count;
class GetParentClassDynamicFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(ReflectionProvider $reflectionProvider)
    {
        $this->reflectionProvider = $reflectionProvider;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'get_parent_class';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $defaultReturnType = ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        if (count($functionCall->getArgs()) === 0) {
            if ($scope->isInTrait()) {
                return $defaultReturnType;
            }
            if ($scope->isInClass()) {
                return $this->findParentClassType($scope->getClassReflection());
            }
            return new ConstantBooleanType(\false);
        }
        $argType = $scope->getType($functionCall->getArgs()[0]->value);
        if ($scope->isInTrait() && TypeUtils::findThisType($argType) !== null) {
            return $defaultReturnType;
        }
        $constantStrings = $argType->getConstantStrings();
        if (count($constantStrings) > 0) {
            return TypeCombinator::union(...array_map(function (ConstantStringType $stringType) : Type {
                return $this->findParentClassNameType($stringType->getValue());
            }, $constantStrings));
        }
        $classNames = $argType->getObjectClassNames();
        if (count($classNames) > 0) {
            return TypeCombinator::union(...array_map(function (string $classNames) : Type {
                return $this->findParentClassNameType($classNames);
            }, $classNames));
        }
        return $defaultReturnType;
    }
    private function findParentClassNameType(string $className) : Type
    {
        if (!$this->reflectionProvider->hasClass($className)) {
            return new UnionType([new ClassStringType(), new ConstantBooleanType(\false)]);
        }
        $classReflection = $this->reflectionProvider->getClass($className);
        if ($classReflection->isInterface()) {
            return new UnionType([new ClassStringType(), new ConstantBooleanType(\false)]);
        }
        return $this->findParentClassType($classReflection);
    }
    private function findParentClassType(ClassReflection $classReflection) : Type
    {
        $parentClass = $classReflection->getParentClass();
        if ($parentClass === null) {
            return new ConstantBooleanType(\false);
        }
        return new ConstantStringType($parentClass->getName(), \true);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\NullType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use ValueError;
use function count;
use function parse_url;
use const PHP_URL_FRAGMENT;
use const PHP_URL_HOST;
use const PHP_URL_PASS;
use const PHP_URL_PATH;
use const PHP_URL_PORT;
use const PHP_URL_QUERY;
use const PHP_URL_SCHEME;
use const PHP_URL_USER;
final class ParseUrlFunctionDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /** @var array<int,Type>|null */
    private $componentTypesPairedConstants;
    /** @var array<string,Type>|null */
    private $componentTypesPairedStrings;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $allComponentsTogetherType;
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'parse_url';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        if (count($functionCall->getArgs()) < 1) {
            return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        }
        $this->cacheReturnTypes();
        if (count($functionCall->getArgs()) > 1) {
            $componentType = $scope->getType($functionCall->getArgs()[1]->value);
            if (!$componentType->isConstantValue()->yes()) {
                return $this->createAllComponentsReturnType();
            }
            $componentType = $componentType->toInteger();
            if (!$componentType instanceof ConstantIntegerType) {
                return $this->createAllComponentsReturnType();
            }
        } else {
            $componentType = new ConstantIntegerType(-1);
        }
        $urlType = $scope->getType($functionCall->getArgs()[0]->value);
        if (count($urlType->getConstantStrings()) > 0) {
            $types = [];
            foreach ($urlType->getConstantStrings() as $constantString) {
                try {
                    $result = @parse_url($constantString->getValue(), $componentType->getValue());
                } catch (ValueError $exception) {
                    $types[] = new ConstantBooleanType(\false);
                    continue;
                }
                $types[] = $scope->getTypeFromValue($result);
            }
            return TypeCombinator::union(...$types);
        }
        if ($componentType->getValue() === -1) {
            return $this->createAllComponentsReturnType();
        }
        return $this->componentTypesPairedConstants[$componentType->getValue()] ?? new ConstantBooleanType(\false);
    }
    private function createAllComponentsReturnType() : Type
    {
        if ($this->allComponentsTogetherType === null) {
            $returnTypes = [new ConstantBooleanType(\false)];
            $builder = ConstantArrayTypeBuilder::createEmpty();
            if ($this->componentTypesPairedStrings === null) {
                throw new ShouldNotHappenException();
            }
            foreach ($this->componentTypesPairedStrings as $componentName => $componentValueType) {
                $builder->setOffsetValueType(new ConstantStringType($componentName), $componentValueType, \true);
            }
            $returnTypes[] = $builder->getArray();
            $this->allComponentsTogetherType = TypeCombinator::union(...$returnTypes);
        }
        return $this->allComponentsTogetherType;
    }
    private function cacheReturnTypes() : void
    {
        if ($this->componentTypesPairedConstants !== null) {
            return;
        }
        $string = new StringType();
        $port = IntegerRangeType::fromInterval(0, 65535);
        $false = new ConstantBooleanType(\false);
        $null = new NullType();
        $stringOrFalseOrNull = TypeCombinator::union($string, $false, $null);
        $portOrFalseOrNull = TypeCombinator::union($port, $false, $null);
        $this->componentTypesPairedConstants = [PHP_URL_SCHEME => $stringOrFalseOrNull, PHP_URL_HOST => $stringOrFalseOrNull, PHP_URL_PORT => $portOrFalseOrNull, PHP_URL_USER => $stringOrFalseOrNull, PHP_URL_PASS => $stringOrFalseOrNull, PHP_URL_PATH => $stringOrFalseOrNull, PHP_URL_QUERY => $stringOrFalseOrNull, PHP_URL_FRAGMENT => $stringOrFalseOrNull];
        $this->componentTypesPairedStrings = ['scheme' => $string, 'host' => $string, 'port' => $port, 'user' => $string, 'pass' => $string, 'path' => $string, 'query' => $string, 'fragment' => $string];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\NullType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
class ArrayPopFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'array_pop';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        if (!isset($functionCall->getArgs()[0])) {
            return null;
        }
        $argType = $scope->getType($functionCall->getArgs()[0]->value);
        $iterableAtLeastOnce = $argType->isIterableAtLeastOnce();
        if ($iterableAtLeastOnce->no()) {
            return new NullType();
        }
        $itemType = $argType->getLastIterableValueType();
        if ($iterableAtLeastOnce->yes()) {
            return $itemType;
        }
        return TypeCombinator::union($itemType, new NullType());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\TrinaryLogic;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\NullType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function count;
class ArrayReduceFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'array_reduce';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        if (!isset($functionCall->getArgs()[1])) {
            return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        }
        $callbackType = $scope->getType($functionCall->getArgs()[1]->value);
        if ($callbackType->isCallable()->no()) {
            return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        }
        $callbackReturnType = ParametersAcceptorSelector::selectFromArgs($scope, $functionCall->getArgs(), $callbackType->getCallableParametersAcceptors($scope))->getReturnType();
        if (isset($functionCall->getArgs()[2])) {
            $initialType = $scope->getType($functionCall->getArgs()[2]->value);
        } else {
            $initialType = new NullType();
        }
        $arraysType = $scope->getType($functionCall->getArgs()[0]->value);
        $constantArrays = $arraysType->getConstantArrays();
        if (count($constantArrays) > 0) {
            $onlyEmpty = TrinaryLogic::createYes();
            $onlyNonEmpty = TrinaryLogic::createYes();
            foreach ($constantArrays as $constantArray) {
                $iterableAtLeastOnce = $constantArray->isIterableAtLeastOnce();
                $onlyEmpty = $onlyEmpty->and($iterableAtLeastOnce->negate());
                $onlyNonEmpty = $onlyNonEmpty->and($iterableAtLeastOnce);
            }
            if ($onlyEmpty->yes()) {
                return $initialType;
            }
            if ($onlyNonEmpty->yes()) {
                return $callbackReturnType;
            }
        }
        return TypeCombinator::union($callbackReturnType, $initialType);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Expr\StaticCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Type\BooleanType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\DynamicMethodReturnTypeExtension;
use PHPStan\Type\DynamicStaticMethodReturnTypeExtension;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use PHPStan\Type\UnionType;
class XMLReaderOpenReturnTypeExtension implements DynamicMethodReturnTypeExtension, DynamicStaticMethodReturnTypeExtension
{
    private const XML_READER_CLASS = 'XMLReader';
    public function getClass() : string
    {
        return self::XML_READER_CLASS;
    }
    public function isMethodSupported(MethodReflection $methodReflection) : bool
    {
        return $methodReflection->getName() === 'open';
    }
    public function isStaticMethodSupported(MethodReflection $methodReflection) : bool
    {
        return $this->isMethodSupported($methodReflection);
    }
    public function getTypeFromMethodCall(MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope) : Type
    {
        return new BooleanType();
    }
    public function getTypeFromStaticMethodCall(MethodReflection $methodReflection, StaticCall $methodCall, Scope $scope) : Type
    {
        return new UnionType([new ObjectType(self::XML_READER_CLASS), new ConstantBooleanType(\false)]);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Name;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Type\ArrayType;
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\FloatType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\NullType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypeUtils;
use function count;
final class CurlGetinfoFunctionDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(ReflectionProvider $reflectionProvider)
    {
        $this->reflectionProvider = $reflectionProvider;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'curl_getinfo';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        if (count($functionCall->getArgs()) < 1) {
            return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        }
        if (count($functionCall->getArgs()) <= 1) {
            return $this->createAllComponentsReturnType();
        }
        $componentType = $scope->getType($functionCall->getArgs()[1]->value);
        if (!$componentType->isNull()->no()) {
            return $this->createAllComponentsReturnType();
        }
        $componentType = $componentType->toInteger();
        if (!$componentType instanceof ConstantIntegerType) {
            return $this->createAllComponentsReturnType();
        }
        $stringType = new StringType();
        $integerType = new IntegerType();
        $floatType = new FloatType();
        $falseType = new ConstantBooleanType(\false);
        $stringFalseType = TypeCombinator::union($stringType, $falseType);
        $integerStringArrayType = new ArrayType($integerType, $stringType);
        $nestedStringStringArrayType = new ArrayType($integerType, new ArrayType($stringType, $stringType));
        $componentTypesPairedConstants = ['CURLINFO_EFFECTIVE_URL' => $stringType, 'CURLINFO_FILETIME' => $integerType, 'CURLINFO_TOTAL_TIME' => $floatType, 'CURLINFO_NAMELOOKUP_TIME' => $floatType, 'CURLINFO_CONNECT_TIME' => $floatType, 'CURLINFO_PRETRANSFER_TIME' => $floatType, 'CURLINFO_STARTTRANSFER_TIME' => $floatType, 'CURLINFO_REDIRECT_COUNT' => $integerType, 'CURLINFO_REDIRECT_TIME' => $floatType, 'CURLINFO_REDIRECT_URL' => $stringType, 'CURLINFO_PRIMARY_IP' => $stringType, 'CURLINFO_PRIMARY_PORT' => $integerType, 'CURLINFO_LOCAL_IP' => $stringType, 'CURLINFO_LOCAL_PORT' => $integerType, 'CURLINFO_SIZE_UPLOAD' => $integerType, 'CURLINFO_SIZE_DOWNLOAD' => $integerType, 'CURLINFO_SPEED_DOWNLOAD' => $integerType, 'CURLINFO_SPEED_UPLOAD' => $integerType, 'CURLINFO_HEADER_SIZE' => $integerType, 'CURLINFO_HEADER_OUT' => $stringFalseType, 'CURLINFO_REQUEST_SIZE' => $integerType, 'CURLINFO_SSL_VERIFYRESULT' => $integerType, 'CURLINFO_CONTENT_LENGTH_DOWNLOAD' => $floatType, 'CURLINFO_CONTENT_LENGTH_UPLOAD' => $floatType, 'CURLINFO_CONTENT_TYPE' => $stringFalseType, 'CURLINFO_PRIVATE' => $stringFalseType, 'CURLINFO_RESPONSE_CODE' => $integerType, 'CURLINFO_HTTP_CONNECTCODE' => $integerType, 'CURLINFO_HTTPAUTH_AVAIL' => $integerType, 'CURLINFO_PROXYAUTH_AVAIL' => $integerType, 'CURLINFO_OS_ERRNO' => $integerType, 'CURLINFO_NUM_CONNECTS' => $integerType, 'CURLINFO_SSL_ENGINES' => $integerStringArrayType, 'CURLINFO_COOKIELIST' => $integerStringArrayType, 'CURLINFO_FTP_ENTRY_PATH' => $stringFalseType, 'CURLINFO_APPCONNECT_TIME' => $floatType, 'CURLINFO_CERTINFO' => $nestedStringStringArrayType, 'CURLINFO_CONDITION_UNMET' => $integerType, 'CURLINFO_RTSP_CLIENT_CSEQ' => $integerType, 'CURLINFO_RTSP_CSEQ_RECV' => $integerType, 'CURLINFO_RTSP_SERVER_CSEQ' => $integerType, 'CURLINFO_RTSP_SESSION_ID' => $integerType, 'CURLINFO_HTTP_VERSION' => $integerType, 'CURLINFO_PROTOCOL' => $stringType, 'CURLINFO_PROXY_SSL_VERIFYRESULT' => $integerType, 'CURLINFO_SCHEME' => $stringType, 'CURLINFO_CONTENT_LENGTH_DOWNLOAD_T' => $integerType, 'CURLINFO_CONTENT_LENGTH_UPLOAD_T' => $integerType, 'CURLINFO_SIZE_DOWNLOAD_T' => $integerType, 'CURLINFO_SIZE_UPLOAD_T' => $integerType, 'CURLINFO_SPEED_DOWNLOAD_T' => $integerType, 'CURLINFO_SPEED_UPLOAD_T' => $integerType, 'CURLINFO_APPCONNECT_TIME_T' => $integerType, 'CURLINFO_CONNECT_TIME_T' => $integerType, 'CURLINFO_FILETIME_T' => $integerType, 'CURLINFO_NAMELOOKUP_TIME_T' => $integerType, 'CURLINFO_PRETRANSFER_TIME_T' => $integerType, 'CURLINFO_REDIRECT_TIME_T' => $integerType, 'CURLINFO_STARTTRANSFER_TIME_T' => $integerType, 'CURLINFO_TOTAL_TIME_T' => $integerType];
        foreach ($componentTypesPairedConstants as $constantName => $type) {
            $constantNameNode = new Name($constantName);
            if ($this->reflectionProvider->hasConstant($constantNameNode, $scope) === \false) {
                continue;
            }
            $valueType = $this->reflectionProvider->getConstant($constantNameNode, $scope)->getValueType();
            if ($componentType->isSuperTypeOf($valueType)->yes()) {
                return $type;
            }
        }
        return $falseType;
    }
    private function createAllComponentsReturnType() : Type
    {
        $returnTypes = [new ConstantBooleanType(\false)];
        $builder = ConstantArrayTypeBuilder::createEmpty();
        $stringType = new StringType();
        $integerType = new IntegerType();
        $floatType = new FloatType();
        $stringOrNullType = TypeCombinator::union($stringType, new NullType());
        $nestedStringStringArrayType = new ArrayType($integerType, new ArrayType($stringType, $stringType));
        $componentTypesPairedStrings = ['url' => $stringType, 'content_type' => $stringOrNullType, 'http_code' => $integerType, 'header_size' => $integerType, 'request_size' => $integerType, 'filetime' => $integerType, 'ssl_verify_result' => $integerType, 'redirect_count' => $integerType, 'total_time' => $floatType, 'namelookup_time' => $floatType, 'connect_time' => $floatType, 'pretransfer_time' => $floatType, 'size_upload' => $floatType, 'size_download' => $floatType, 'speed_download' => $floatType, 'speed_upload' => $floatType, 'download_content_length' => $floatType, 'upload_content_length' => $floatType, 'starttransfer_time' => $floatType, 'redirect_time' => $floatType, 'redirect_url' => $stringType, 'primary_ip' => $stringType, 'certinfo' => $nestedStringStringArrayType, 'primary_port' => $integerType, 'local_ip' => $stringType, 'local_port' => $integerType, 'http_version' => $integerType, 'protocol' => $integerType, 'ssl_verifyresult' => $integerType, 'scheme' => $stringType];
        foreach ($componentTypesPairedStrings as $componentName => $componentValueType) {
            $builder->setOffsetValueType(new ConstantStringType($componentName), $componentValueType);
        }
        $returnTypes[] = $builder->getArray();
        return TypeUtils::toBenevolentUnion(TypeCombinator::union(...$returnTypes));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
use PHPStan\Type\Accessory\AccessoryNonFalsyStringType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function count;
use function is_bool;
use function substr;
class SubstrDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'substr';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        $args = $functionCall->getArgs();
        if (count($args) === 0) {
            return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        }
        if (count($args) >= 2) {
            $string = $scope->getType($args[0]->value);
            $offset = $scope->getType($args[1]->value);
            $negativeOffset = IntegerRangeType::fromInterval(null, -1)->isSuperTypeOf($offset)->yes();
            $zeroOffset = (new ConstantIntegerType(0))->isSuperTypeOf($offset)->yes();
            $length = null;
            $positiveLength = \false;
            if (count($args) === 3) {
                $length = $scope->getType($args[2]->value);
                $positiveLength = IntegerRangeType::fromInterval(1, null)->isSuperTypeOf($length)->yes();
            }
            $constantStrings = $string->getConstantStrings();
            if (count($constantStrings) > 0 && $offset instanceof ConstantIntegerType && ($length === null || $length instanceof ConstantIntegerType)) {
                $results = [];
                foreach ($constantStrings as $constantString) {
                    if ($length !== null) {
                        $substr = substr($constantString->getValue(), $offset->getValue(), $length->getValue());
                    } else {
                        $substr = substr($constantString->getValue(), $offset->getValue());
                    }
                    if (is_bool($substr)) {
                        $results[] = new ConstantBooleanType($substr);
                    } else {
                        $results[] = new ConstantStringType($substr);
                    }
                }
                return TypeCombinator::union(...$results);
            }
            if ($string->isNonEmptyString()->yes() && ($negativeOffset || $zeroOffset && $positiveLength)) {
                if ($string->isNonFalsyString()->yes()) {
                    return new IntersectionType([new StringType(), new AccessoryNonFalsyStringType()]);
                }
                return new IntersectionType([new StringType(), new AccessoryNonEmptyStringType()]);
            }
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
use PHPStan\Type\Accessory\AccessoryNonFalsyStringType;
use PHPStan\Type\Accessory\AccessoryNumericStringType;
use PHPStan\Type\ConstantScalarType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use Throwable;
use function array_key_exists;
use function array_shift;
use function count;
use function in_array;
use function is_string;
use function preg_match;
use function sprintf;
use function vsprintf;
class SprintfFunctionDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return in_array($functionReflection->getName(), ['sprintf', 'vsprintf'], \true);
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        $args = $functionCall->getArgs();
        if (count($args) === 0) {
            return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        }
        $formatType = $scope->getType($args[0]->value);
        if (count($formatType->getConstantStrings()) > 0) {
            $skip = \false;
            foreach ($formatType->getConstantStrings() as $constantString) {
                // The printf format is %[argnum$][flags][width][.precision]
                if (preg_match('/^%([0-9]*\\$)?[0-9]*\\.?[0-9]*[bdeEfFgGhHouxX]$/', $constantString->getValue(), $matches) === 1) {
                    // invalid positional argument
                    if (array_key_exists(1, $matches) && $matches[1] === '0$') {
                        return null;
                    }
                    continue;
                }
                $skip = \true;
                break;
            }
            if (!$skip) {
                return new IntersectionType([new StringType(), new AccessoryNumericStringType()]);
            }
        }
        if ($formatType->isNonFalsyString()->yes()) {
            $returnType = new IntersectionType([new StringType(), new AccessoryNonFalsyStringType()]);
        } elseif ($formatType->isNonEmptyString()->yes()) {
            $returnType = new IntersectionType([new StringType(), new AccessoryNonEmptyStringType()]);
        } else {
            $returnType = new StringType();
        }
        $values = [];
        foreach ($args as $arg) {
            $argType = $scope->getType($arg->value);
            if (!$argType instanceof ConstantScalarType) {
                return $returnType;
            }
            $values[] = $argType->getValue();
        }
        $format = array_shift($values);
        if (!is_string($format)) {
            return $returnType;
        }
        try {
            if ($functionReflection->getName() === 'sprintf') {
                $value = @sprintf($format, ...$values);
            } else {
                $value = @vsprintf($format, $values);
            }
        } catch (Throwable $exception) {
            return $returnType;
        }
        return $scope->getTypeFromValue($value);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use Closure;
use PhpParser\Node\Expr\StaticCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\ClosureType;
use PHPStan\Type\DynamicStaticMethodReturnTypeExtension;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
class ClosureFromCallableDynamicReturnTypeExtension implements DynamicStaticMethodReturnTypeExtension
{
    public function getClass() : string
    {
        return Closure::class;
    }
    public function isStaticMethodSupported(MethodReflection $methodReflection) : bool
    {
        return $methodReflection->getName() === 'fromCallable';
    }
    public function getTypeFromStaticMethodCall(MethodReflection $methodReflection, StaticCall $methodCall, Scope $scope) : Type
    {
        if (!isset($methodCall->getArgs()[0])) {
            return ParametersAcceptorSelector::selectFromArgs($scope, $methodCall->getArgs(), $methodReflection->getVariants())->getReturnType();
        }
        $callableType = $scope->getType($methodCall->getArgs()[0]->value);
        if ($callableType->isCallable()->no()) {
            return new ErrorType();
        }
        $closureTypes = [];
        foreach ($callableType->getCallableParametersAcceptors($scope) as $variant) {
            $parameters = $variant->getParameters();
            $closureTypes[] = new ClosureType($parameters, $variant->getReturnType(), $variant->isVariadic(), $variant->getTemplateTypeMap(), $variant->getResolvedTemplateTypeMap());
        }
        return TypeCombinator::union(...$closureTypes);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function count;
use function strtolower;
class ArrayReplaceFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return strtolower($functionReflection->getName()) === 'array_replace';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        $arrayTypes = $this->collectArrayTypes($functionCall, $scope);
        if (count($arrayTypes) === 0) {
            return null;
        }
        return $this->getResultType(...$arrayTypes);
    }
    private function getResultType(Type ...$arrayTypes) : Type
    {
        $keyTypes = [];
        $valueTypes = [];
        $nonEmptyArray = \false;
        foreach ($arrayTypes as $arrayType) {
            if (!$nonEmptyArray && $arrayType->isIterableAtLeastOnce()->yes()) {
                $nonEmptyArray = \true;
            }
            $keyTypes[] = $arrayType->getIterableKeyType();
            $valueTypes[] = $arrayType->getIterableValueType();
        }
        $keyType = TypeCombinator::union(...$keyTypes);
        $valueType = TypeCombinator::union(...$valueTypes);
        $arrayType = new ArrayType($keyType, $valueType);
        return $nonEmptyArray ? TypeCombinator::intersect($arrayType, new NonEmptyArrayType()) : $arrayType;
    }
    /**
     * @return Type[]
     */
    private function collectArrayTypes(FuncCall $functionCall, Scope $scope) : array
    {
        $args = $functionCall->getArgs();
        $arrayTypes = [];
        foreach ($args as $arg) {
            $argType = $scope->getType($arg->value);
            if (!$argType->isArray()->yes()) {
                continue;
            }
            $arrayTypes[] = $arg->unpack ? $argType->getIterableValueType() : $argType;
        }
        return $arrayTypes;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\ArrayType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntegerType;
use PHPStan\Type\NullType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\UnionType;
use function count;
class PregFilterFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'preg_filter';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $defaultReturn = ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        $argsCount = count($functionCall->getArgs());
        if ($argsCount < 3) {
            return $defaultReturn;
        }
        $subjectType = $scope->getType($functionCall->getArgs()[2]->value);
        if ($subjectType->isArray()->yes()) {
            return new ArrayType(new IntegerType(), new StringType());
        }
        if ($subjectType->isString()->yes()) {
            return new UnionType([new StringType(), new NullType()]);
        }
        return $defaultReturn;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Analyser\SpecifiedTypes;
use PHPStan\Analyser\TypeSpecifier;
use PHPStan\Analyser\TypeSpecifierAwareExtension;
use PHPStan\Analyser\TypeSpecifierContext;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\FunctionTypeSpecifyingExtension;
use PHPStan\Type\MixedType;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypeUtils;
use function count;
use function strtolower;
class InArrayFunctionTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
{
    /**
     * @var \PHPStan\Analyser\TypeSpecifier
     */
    private $typeSpecifier;
    public function setTypeSpecifier(TypeSpecifier $typeSpecifier) : void
    {
        $this->typeSpecifier = $typeSpecifier;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection, FuncCall $node, TypeSpecifierContext $context) : bool
    {
        return strtolower($functionReflection->getName()) === 'in_array' && !$context->null();
    }
    public function specifyTypes(FunctionReflection $functionReflection, FuncCall $node, Scope $scope, TypeSpecifierContext $context) : SpecifiedTypes
    {
        $isStrictComparison = \false;
        if (count($node->getArgs()) >= 3) {
            $strictNodeType = $scope->getType($node->getArgs()[2]->value);
            $isStrictComparison = (new ConstantBooleanType(\true))->isSuperTypeOf($strictNodeType)->yes();
        }
        $needleType = $scope->getType($node->getArgs()[0]->value);
        $arrayType = $scope->getType($node->getArgs()[1]->value);
        $arrayValueType = $arrayType->getIterableValueType();
        $isStrictComparison = $isStrictComparison || $needleType->isEnum()->yes() || $arrayValueType->isEnum()->yes();
        if (!$isStrictComparison) {
            return new SpecifiedTypes();
        }
        $specifiedTypes = new SpecifiedTypes();
        if ($context->true() || $context->false() && (count(TypeUtils::getConstantScalars($arrayValueType)) > 0 || count(TypeUtils::getEnumCaseObjects($arrayValueType)) > 0)) {
            $specifiedTypes = $this->typeSpecifier->create($node->getArgs()[0]->value, $arrayValueType, $context, \false, $scope);
        }
        if ($context->true() || $context->false() && (count(TypeUtils::getConstantScalars($needleType)) === 1 || count(TypeUtils::getEnumCaseObjects($needleType)) === 1)) {
            if ($context->true()) {
                $arrayValueType = TypeCombinator::union($arrayValueType, $needleType);
            } else {
                $arrayValueType = TypeCombinator::remove($arrayValueType, $needleType);
            }
            $specifiedTypes = $specifiedTypes->unionWith($this->typeSpecifier->create($node->getArgs()[1]->value, new ArrayType(new MixedType(), $arrayValueType), TypeSpecifierContext::createTrue(), \false, $scope));
        }
        if ($context->true() && $arrayType->isArray()->yes()) {
            $specifiedTypes = $specifiedTypes->unionWith($this->typeSpecifier->create($node->getArgs()[1]->value, TypeCombinator::intersect($arrayType, new NonEmptyArrayType()), $context, \false, $scope));
        }
        return $specifiedTypes;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntegerType;
use PHPStan\Type\Type;
use function strtolower;
final class IteratorToArrayFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return strtolower($functionReflection->getName()) === 'iterator_to_array';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $arguments = $functionCall->getArgs();
        if ($arguments === []) {
            return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        }
        $traversableType = $scope->getType($arguments[0]->value);
        $arrayKeyType = $traversableType->getIterableKeyType();
        $isList = \false;
        if (isset($arguments[1])) {
            $preserveKeysType = $scope->getType($arguments[1]->value);
            if ($preserveKeysType->isFalse()->yes()) {
                $arrayKeyType = new IntegerType();
                $isList = \true;
            }
        }
        $arrayType = new ArrayType($arrayKeyType, $traversableType->getIterableValueType());
        if ($isList) {
            $arrayType = AccessoryArrayListType::intersectWith($arrayType);
        }
        return $arrayType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\NullType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
class ArrayKeyFirstDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'array_key_first';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        if (!isset($functionCall->getArgs()[0])) {
            return null;
        }
        $argType = $scope->getType($functionCall->getArgs()[0]->value);
        $iterableAtLeastOnce = $argType->isIterableAtLeastOnce();
        if ($iterableAtLeastOnce->no()) {
            return new NullType();
        }
        $keyType = $argType->getFirstIterableKeyType();
        if ($iterableAtLeastOnce->yes()) {
            return $keyType;
        }
        return TypeCombinator::union($keyType, new NullType());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\NeverType;
use PHPStan\Type\NullType;
use PHPStan\Type\Type;
use function count;
use function strtolower;
class ArrayValuesFunctionDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return strtolower($functionReflection->getName()) === 'array_values';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        if (count($functionCall->getArgs()) !== 1) {
            return null;
        }
        $arrayType = $scope->getType($functionCall->getArgs()[0]->value);
        if ($arrayType->isArray()->no()) {
            return $this->phpVersion->arrayFunctionsReturnNullWithNonArray() ? new NullType() : new NeverType();
        }
        return $arrayType->getValuesArray();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\FloatType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypeUtils;
use function count;
class HrtimeFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'hrtime';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $arrayType = new ConstantArrayType([new ConstantIntegerType(0), new ConstantIntegerType(1)], [new IntegerType(), new IntegerType()], [2]);
        $numberType = TypeUtils::toBenevolentUnion(TypeCombinator::union(new IntegerType(), new FloatType()));
        if (count($functionCall->getArgs()) < 1) {
            return $arrayType;
        }
        $argType = $scope->getType($functionCall->getArgs()[0]->value);
        $isTrueType = (new ConstantBooleanType(\true))->isSuperTypeOf($argType);
        $isFalseType = (new ConstantBooleanType(\false))->isSuperTypeOf($argType);
        $compareTypes = $isTrueType->compareTo($isFalseType);
        if ($compareTypes === $isTrueType) {
            return $numberType;
        }
        if ($compareTypes === $isFalseType) {
            return $arrayType;
        }
        return TypeCombinator::union($arrayType, $numberType);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Analyser\SpecifiedTypes;
use PHPStan\Analyser\TypeSpecifier;
use PHPStan\Analyser\TypeSpecifierAwareExtension;
use PHPStan\Analyser\TypeSpecifierContext;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\FunctionTypeSpecifyingExtension;
use function count;
use function in_array;
class CountFunctionTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
{
    /**
     * @var \PHPStan\Analyser\TypeSpecifier
     */
    private $typeSpecifier;
    public function isFunctionSupported(FunctionReflection $functionReflection, FuncCall $node, TypeSpecifierContext $context) : bool
    {
        return !$context->null() && count($node->getArgs()) >= 1 && in_array($functionReflection->getName(), ['sizeof', 'count'], \true);
    }
    public function specifyTypes(FunctionReflection $functionReflection, FuncCall $node, Scope $scope, TypeSpecifierContext $context) : SpecifiedTypes
    {
        if (!$scope->getType($node->getArgs()[0]->value)->isArray()->yes()) {
            return new SpecifiedTypes([], []);
        }
        return $this->typeSpecifier->create($node->getArgs()[0]->value, new NonEmptyArrayType(), $context, \false, $scope);
    }
    public function setTypeSpecifier(TypeSpecifier $typeSpecifier) : void
    {
        $this->typeSpecifier = $typeSpecifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Analyser\SpecifiedTypes;
use PHPStan\Analyser\TypeSpecifier;
use PHPStan\Analyser\TypeSpecifierAwareExtension;
use PHPStan\Analyser\TypeSpecifierContext;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\FunctionTypeSpecifyingExtension;
use PHPStan\Type\Generic\GenericClassStringType;
use function count;
use function strtolower;
class IsSubclassOfFunctionTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
{
    /**
     * @var \PHPStan\Analyser\TypeSpecifier
     */
    private $typeSpecifier;
    /**
     * @var \PHPStan\Type\Php\IsAFunctionTypeSpecifyingHelper
     */
    private $isAFunctionTypeSpecifyingHelper;
    public function __construct(\PHPStan\Type\Php\IsAFunctionTypeSpecifyingHelper $isAFunctionTypeSpecifyingHelper)
    {
        $this->isAFunctionTypeSpecifyingHelper = $isAFunctionTypeSpecifyingHelper;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection, FuncCall $node, TypeSpecifierContext $context) : bool
    {
        return strtolower($functionReflection->getName()) === 'is_subclass_of' && !$context->null();
    }
    public function specifyTypes(FunctionReflection $functionReflection, FuncCall $node, Scope $scope, TypeSpecifierContext $context) : SpecifiedTypes
    {
        if (!$context->true() || count($node->getArgs()) < 2) {
            return new SpecifiedTypes();
        }
        $objectOrClassType = $scope->getType($node->getArgs()[0]->value);
        $classType = $scope->getType($node->getArgs()[1]->value);
        $allowStringType = isset($node->getArgs()[2]) ? $scope->getType($node->getArgs()[2]->value) : new ConstantBooleanType(\true);
        $allowString = !$allowStringType->equals(new ConstantBooleanType(\false));
        // prevent false-positives in IsAFunctionTypeSpecifyingHelper
        if ($objectOrClassType instanceof GenericClassStringType && $classType instanceof GenericClassStringType) {
            return new SpecifiedTypes([], []);
        }
        return $this->typeSpecifier->create($node->getArgs()[0]->value, $this->isAFunctionTypeSpecifyingHelper->determineType($objectOrClassType, $classType, $allowString, \false), $context, \false, $scope);
    }
    public function setTypeSpecifier(TypeSpecifier $typeSpecifier) : void
    {
        $this->typeSpecifier = $typeSpecifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Analyser\TypeSpecifier;
use PHPStan\Analyser\TypeSpecifierAwareExtension;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Comparison\ImpossibleCheckTypeHelper;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\Type;
use function count;
use function in_array;
class TypeSpecifyingFunctionsDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension, TypeSpecifierAwareExtension
{
    /**
     * @var \PHPStan\Analyser\TypeSpecifier
     */
    private $typeSpecifier;
    /**
     * @var \PHPStan\Rules\Comparison\ImpossibleCheckTypeHelper|null
     */
    private $helper;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var bool
     */
    private $treatPhpDocTypesAsCertain;
    /**
     * @var string[]
     */
    private $universalObjectCratesClasses;
    /**
     * @var bool
     */
    private $nullContextForVoidReturningFunctions;
    /**
     * @param string[] $universalObjectCratesClasses
     */
    public function __construct(ReflectionProvider $reflectionProvider, bool $treatPhpDocTypesAsCertain, array $universalObjectCratesClasses, bool $nullContextForVoidReturningFunctions)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->treatPhpDocTypesAsCertain = $treatPhpDocTypesAsCertain;
        $this->universalObjectCratesClasses = $universalObjectCratesClasses;
        $this->nullContextForVoidReturningFunctions = $nullContextForVoidReturningFunctions;
    }
    public function setTypeSpecifier(TypeSpecifier $typeSpecifier) : void
    {
        $this->typeSpecifier = $typeSpecifier;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return in_array($functionReflection->getName(), ['array_key_exists', 'key_exists', 'in_array', 'is_subclass_of'], \true);
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        if (count($functionCall->getArgs()) === 0) {
            return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        }
        $isAlways = $this->getHelper()->findSpecifiedType($scope, $functionCall);
        if ($isAlways === null) {
            return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        }
        return new ConstantBooleanType($isAlways);
    }
    private function getHelper() : ImpossibleCheckTypeHelper
    {
        if ($this->helper === null) {
            $this->helper = new ImpossibleCheckTypeHelper($this->reflectionProvider, $this->typeSpecifier, $this->universalObjectCratesClasses, $this->treatPhpDocTypesAsCertain, $this->nullContextForVoidReturningFunctions);
        }
        return $this->helper;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\Type;
use function count;
class FilterInputDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /**
     * @var \PHPStan\Type\Php\FilterFunctionReturnTypeHelper
     */
    private $filterFunctionReturnTypeHelper;
    public function __construct(\PHPStan\Type\Php\FilterFunctionReturnTypeHelper $filterFunctionReturnTypeHelper)
    {
        $this->filterFunctionReturnTypeHelper = $filterFunctionReturnTypeHelper;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'filter_input';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        if (count($functionCall->getArgs()) < 2) {
            return null;
        }
        return $this->filterFunctionReturnTypeHelper->getInputType($scope->getType($functionCall->getArgs()[0]->value), $scope->getType($functionCall->getArgs()[1]->value), isset($functionCall->getArgs()[2]) ? $scope->getType($functionCall->getArgs()[2]->value) : null, isset($functionCall->getArgs()[3]) ? $scope->getType($functionCall->getArgs()[3]->value) : null);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\ConstantScalarType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
use function count;
use const E_USER_ERROR;
class TriggerErrorDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'trigger_error';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        if (count($functionCall->getArgs()) < 2) {
            return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        }
        $errorType = $scope->getType($functionCall->getArgs()[1]->value);
        if ($errorType instanceof ConstantScalarType) {
            if ($errorType->getValue() === E_USER_ERROR) {
                return new NeverType(\true);
            }
        }
        return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Analyser\SpecifiedTypes;
use PHPStan\Analyser\TypeSpecifier;
use PHPStan\Analyser\TypeSpecifierAwareExtension;
use PHPStan\Analyser\TypeSpecifierContext;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\FunctionTypeSpecifyingExtension;
use function count;
use function strtolower;
class IsAFunctionTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
{
    /**
     * @var \PHPStan\Analyser\TypeSpecifier
     */
    private $typeSpecifier;
    /**
     * @var \PHPStan\Type\Php\IsAFunctionTypeSpecifyingHelper
     */
    private $isAFunctionTypeSpecifyingHelper;
    public function __construct(\PHPStan\Type\Php\IsAFunctionTypeSpecifyingHelper $isAFunctionTypeSpecifyingHelper)
    {
        $this->isAFunctionTypeSpecifyingHelper = $isAFunctionTypeSpecifyingHelper;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection, FuncCall $node, TypeSpecifierContext $context) : bool
    {
        return strtolower($functionReflection->getName()) === 'is_a' && !$context->null();
    }
    public function specifyTypes(FunctionReflection $functionReflection, FuncCall $node, Scope $scope, TypeSpecifierContext $context) : SpecifiedTypes
    {
        if (count($node->getArgs()) < 2) {
            return new SpecifiedTypes();
        }
        $classType = $scope->getType($node->getArgs()[1]->value);
        if (!$classType instanceof ConstantStringType && !$context->true()) {
            return new SpecifiedTypes([], []);
        }
        $objectOrClassType = $scope->getType($node->getArgs()[0]->value);
        $allowStringType = isset($node->getArgs()[2]) ? $scope->getType($node->getArgs()[2]->value) : new ConstantBooleanType(\false);
        $allowString = !$allowStringType->equals(new ConstantBooleanType(\false));
        return $this->typeSpecifier->create($node->getArgs()[0]->value, $this->isAFunctionTypeSpecifyingHelper->determineType($objectOrClassType, $classType, $allowString, \true), $context, \false, $scope);
    }
    public function setTypeSpecifier(TypeSpecifier $typeSpecifier) : void
    {
        $this->typeSpecifier = $typeSpecifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\ArrayType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\ErrorType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\UnionType;
use function count;
class StrWordCountFunctionDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'str_word_count';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, Node\Expr\FuncCall $functionCall, Scope $scope) : Type
    {
        $argsCount = count($functionCall->getArgs());
        if ($argsCount === 1) {
            return new IntegerType();
        } elseif ($argsCount === 2 || $argsCount === 3) {
            $formatType = $scope->getType($functionCall->getArgs()[1]->value);
            if ($formatType instanceof ConstantIntegerType) {
                $val = $formatType->getValue();
                if ($val === 0) {
                    // return word count
                    return new IntegerType();
                } elseif ($val === 1 || $val === 2) {
                    // return [word] or [offset => word]
                    return new ArrayType(new IntegerType(), new StringType());
                }
                // return false, invalid format value specified
                return new ConstantBooleanType(\false);
            }
            // Could be invalid format type as well, but parameter type checks will catch that.
            return new UnionType([new IntegerType(), new ArrayType(new IntegerType(), new StringType()), new ConstantBooleanType(\false)]);
        }
        // else fatal error; too many or too few arguments
        return new ErrorType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\BinaryOp\Smaller;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\Ternary;
use PHPStan\Analyser\Scope;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\ConstantScalarType;
use PHPStan\Type\ConstantType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\UnionType;
use function count;
class MinMaxFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /** @var string[] */
    private $functionNames = ['min' => '', 'max' => ''];
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return isset($this->functionNames[$functionReflection->getName()]);
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        if (!isset($functionCall->getArgs()[0])) {
            return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        }
        if (count($functionCall->getArgs()) === 1) {
            $argType = $scope->getType($functionCall->getArgs()[0]->value);
            if ($argType->isArray()->yes()) {
                return $this->processArrayType($functionReflection->getName(), $argType);
            }
            return new ErrorType();
        }
        // rewrite min($x, $y) as $x < $y ? $x : $y
        // we don't handle arrays, which have different semantics
        $functionName = $functionReflection->getName();
        $args = $functionCall->getArgs();
        if (count($functionCall->getArgs()) === 2) {
            $argType0 = $scope->getType($args[0]->value);
            $argType1 = $scope->getType($args[1]->value);
            if ($argType0->isArray()->no() && $argType1->isArray()->no()) {
                if ($functionName === 'min') {
                    return $scope->getType(new Ternary(new Smaller($args[0]->value, $args[1]->value), $args[0]->value, $args[1]->value));
                } elseif ($functionName === 'max') {
                    return $scope->getType(new Ternary(new Smaller($args[0]->value, $args[1]->value), $args[1]->value, $args[0]->value));
                }
            }
        }
        $argumentTypes = [];
        foreach ($functionCall->getArgs() as $arg) {
            $argType = $scope->getType($arg->value);
            if ($arg->unpack) {
                $iterableValueType = $argType->getIterableValueType();
                if ($iterableValueType instanceof UnionType) {
                    foreach ($iterableValueType->getTypes() as $innerType) {
                        $argumentTypes[] = $innerType;
                    }
                } else {
                    $argumentTypes[] = $iterableValueType;
                }
                continue;
            }
            $argumentTypes[] = $argType;
        }
        return $this->processType($functionName, $argumentTypes);
    }
    private function processArrayType(string $functionName, Type $argType) : Type
    {
        $constArrayTypes = $argType->getConstantArrays();
        if (count($constArrayTypes) > 0) {
            $resultTypes = [];
            foreach ($constArrayTypes as $constArrayType) {
                $isIterable = $constArrayType->isIterableAtLeastOnce();
                if ($isIterable->no() && !$this->phpVersion->throwsValueErrorForInternalFunctions()) {
                    $resultTypes[] = new ConstantBooleanType(\false);
                    continue;
                }
                $argumentTypes = [];
                if (!$isIterable->yes() && !$this->phpVersion->throwsValueErrorForInternalFunctions()) {
                    $argumentTypes[] = new ConstantBooleanType(\false);
                }
                foreach ($constArrayType->getValueTypes() as $innerType) {
                    $argumentTypes[] = $innerType;
                }
                $resultTypes[] = $this->processType($functionName, $argumentTypes);
            }
            return TypeCombinator::union(...$resultTypes);
        }
        $isIterable = $argType->isIterableAtLeastOnce();
        if ($isIterable->no() && !$this->phpVersion->throwsValueErrorForInternalFunctions()) {
            return new ConstantBooleanType(\false);
        }
        $iterableValueType = $argType->getIterableValueType();
        $argumentTypes = [];
        if (!$isIterable->yes() && !$this->phpVersion->throwsValueErrorForInternalFunctions()) {
            $argumentTypes[] = new ConstantBooleanType(\false);
        }
        $argumentTypes[] = $iterableValueType;
        return $this->processType($functionName, $argumentTypes);
    }
    /**
     * @param Type[] $types
     */
    private function processType(string $functionName, array $types) : Type
    {
        $resultType = null;
        foreach ($types as $type) {
            if (!$type instanceof ConstantType) {
                return TypeCombinator::union(...$types);
            }
            if ($resultType === null) {
                $resultType = $type;
                continue;
            }
            $compareResult = $this->compareTypes($resultType, $type);
            if ($functionName === 'min') {
                if ($compareResult === $type) {
                    $resultType = $type;
                }
            } elseif ($functionName === 'max') {
                if ($compareResult === $resultType) {
                    $resultType = $type;
                }
            }
        }
        if ($resultType === null) {
            return new ErrorType();
        }
        return $resultType;
    }
    private function compareTypes(Type $firstType, Type $secondType) : ?Type
    {
        if ($firstType->isConstantArray()->yes() && $secondType instanceof ConstantScalarType) {
            return $secondType;
        }
        if ($firstType instanceof ConstantScalarType && $secondType->isConstantArray()->yes()) {
            return $firstType;
        }
        if ($firstType instanceof ConstantArrayType && $secondType instanceof ConstantArrayType) {
            if ($secondType->getArraySize() < $firstType->getArraySize()) {
                return $secondType;
            } elseif ($firstType->getArraySize() < $secondType->getArraySize()) {
                return $firstType;
            }
            foreach ($firstType->getValueTypes() as $i => $firstValueType) {
                $secondValueType = $secondType->getValueTypes()[$i];
                $compareResult = $this->compareTypes($firstValueType, $secondValueType);
                if ($compareResult === $firstValueType) {
                    return $firstType;
                }
                if ($compareResult === $secondValueType) {
                    return $secondType;
                }
            }
            return null;
        }
        if ($firstType instanceof ConstantScalarType && $secondType instanceof ConstantScalarType) {
            if ($secondType->getValue() < $firstType->getValue()) {
                return $secondType;
            }
            if ($firstType->getValue() < $secondType->getValue()) {
                return $firstType;
            }
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Type\BenevolentUnionType;
use PHPStan\Type\DynamicMethodReturnTypeExtension;
use PHPStan\Type\ErrorType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use Throwable;
use function count;
use function in_array;
use function strtolower;
final class ThrowableReturnTypeExtension implements DynamicMethodReturnTypeExtension
{
    public function getClass() : string
    {
        return Throwable::class;
    }
    public function isMethodSupported(MethodReflection $methodReflection) : bool
    {
        return $methodReflection->getName() === 'getCode';
    }
    public function getTypeFromMethodCall(MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope) : Type
    {
        $type = $scope->getType($methodCall->var);
        $types = [];
        $pdoException = new ObjectType('PDOException');
        foreach ($type->getObjectClassNames() as $class) {
            $classType = new ObjectType($class);
            if ($classType->getClassReflection() !== null) {
                $classReflection = $classType->getClassReflection();
                foreach ($classReflection->getMethodTags() as $methodName => $methodTag) {
                    if (strtolower($methodName) !== 'getcode') {
                        continue;
                    }
                    $types[] = $methodTag->getReturnType();
                    continue 2;
                }
            }
            if ($pdoException->isSuperTypeOf($classType)->yes()) {
                $types[] = new BenevolentUnionType([new IntegerType(), new StringType()]);
                continue;
            }
            if (in_array(strtolower($class), ['throwable', 'exception', 'runtimeexception'], \true)) {
                $types[] = new BenevolentUnionType([new IntegerType(), new StringType()]);
                continue;
            }
            $types[] = new IntegerType();
        }
        if (count($types) === 0) {
            return new ErrorType();
        }
        return TypeCombinator::union(...$types);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\DynamicMethodReturnTypeExtension;
use PHPStan\Type\IntegerType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use SplFileObject;
use function in_array;
class StatDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension, DynamicMethodReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return in_array($functionReflection->getName(), ['stat', 'lstat', 'fstat', 'ssh2_sftp_stat'], \true);
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        return TypeCombinator::union($this->getReturnType(), new ConstantBooleanType(\false));
    }
    public function getClass() : string
    {
        return SplFileObject::class;
    }
    public function isMethodSupported(MethodReflection $methodReflection) : bool
    {
        return $methodReflection->getName() === 'fstat';
    }
    public function getTypeFromMethodCall(MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope) : Type
    {
        return $this->getReturnType();
    }
    private function getReturnType() : Type
    {
        $valueType = new IntegerType();
        $builder = ConstantArrayTypeBuilder::createEmpty();
        $keys = ['dev', 'ino', 'mode', 'nlink', 'uid', 'gid', 'rdev', 'size', 'atime', 'mtime', 'ctime', 'blksize', 'blocks'];
        foreach ($keys as $key) {
            $builder->setOffsetValueType(null, $valueType);
        }
        foreach ($keys as $key) {
            $builder->setOffsetValueType(new ConstantStringType($key), $valueType);
        }
        return $builder->getArray();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Analyser\SpecifiedTypes;
use PHPStan\Analyser\TypeSpecifier;
use PHPStan\Analyser\TypeSpecifierAwareExtension;
use PHPStan\Analyser\TypeSpecifierContext;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Accessory\HasMethodType;
use PHPStan\Type\ClassStringType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\FunctionTypeSpecifyingExtension;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\ObjectWithoutClassType;
use PHPStan\Type\UnionType;
use function count;
class MethodExistsTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
{
    /**
     * @var \PHPStan\Analyser\TypeSpecifier
     */
    private $typeSpecifier;
    public function setTypeSpecifier(TypeSpecifier $typeSpecifier) : void
    {
        $this->typeSpecifier = $typeSpecifier;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection, FuncCall $node, TypeSpecifierContext $context) : bool
    {
        return $functionReflection->getName() === 'method_exists' && $context->true() && count($node->getArgs()) >= 2;
    }
    public function specifyTypes(FunctionReflection $functionReflection, FuncCall $node, Scope $scope, TypeSpecifierContext $context) : SpecifiedTypes
    {
        $methodNameType = $scope->getType($node->getArgs()[1]->value);
        if (!$methodNameType instanceof ConstantStringType) {
            return new SpecifiedTypes([], []);
        }
        $objectType = $scope->getType($node->getArgs()[0]->value);
        if ($objectType->isString()->yes()) {
            if ($objectType->isClassStringType()->yes()) {
                return $this->typeSpecifier->create($node->getArgs()[0]->value, new IntersectionType([$objectType, new HasMethodType($methodNameType->getValue())]), $context, \false, $scope);
            }
            return new SpecifiedTypes([], []);
        }
        return $this->typeSpecifier->create($node->getArgs()[0]->value, new UnionType([new IntersectionType([new ObjectWithoutClassType(), new HasMethodType($methodNameType->getValue())]), new ClassStringType()]), $context, \false, $scope);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\NullType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
class ArrayKeyDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'key';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        if (!isset($functionCall->getArgs()[0])) {
            return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        }
        $argType = $scope->getType($functionCall->getArgs()[0]->value);
        $iterableAtLeastOnce = $argType->isIterableAtLeastOnce();
        if ($iterableAtLeastOnce->no()) {
            return new NullType();
        }
        $keyType = $argType->getIterableKeyType();
        if ($iterableAtLeastOnce->yes()) {
            return $keyType;
        }
        return TypeCombinator::union($keyType, new NullType());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node;
use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\MixedType;
use PHPStan\Type\NeverType;
use PHPStan\Type\NullType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function array_combine;
use function array_fill_keys;
use function array_map;
use function count;
use function in_array;
use function strtolower;
class FilterVarArrayDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /**
     * @var \PHPStan\Type\Php\FilterFunctionReturnTypeHelper
     */
    private $filterFunctionReturnTypeHelper;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(\PHPStan\Type\Php\FilterFunctionReturnTypeHelper $filterFunctionReturnTypeHelper, ReflectionProvider $reflectionProvider)
    {
        $this->filterFunctionReturnTypeHelper = $filterFunctionReturnTypeHelper;
        $this->reflectionProvider = $reflectionProvider;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return in_array(strtolower($functionReflection->getName()), ['filter_var_array', 'filter_input_array'], \true);
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        if (count($functionCall->getArgs()) < 2) {
            return null;
        }
        $functionName = strtolower($functionReflection->getName());
        $inputArgType = $scope->getType($functionCall->getArgs()[0]->value);
        $inputConstantArrayType = null;
        if ($functionName === 'filter_var_array') {
            if ($inputArgType->isArray()->no()) {
                return new NeverType();
            }
            $inputConstantArrayType = $inputArgType->getConstantArrays()[0] ?? null;
        } elseif ($functionName === 'filter_input_array') {
            $supportedTypes = TypeCombinator::union($this->reflectionProvider->getConstant(new Node\Name('INPUT_GET'), null)->getValueType(), $this->reflectionProvider->getConstant(new Node\Name('INPUT_POST'), null)->getValueType(), $this->reflectionProvider->getConstant(new Node\Name('INPUT_COOKIE'), null)->getValueType(), $this->reflectionProvider->getConstant(new Node\Name('INPUT_SERVER'), null)->getValueType(), $this->reflectionProvider->getConstant(new Node\Name('INPUT_ENV'), null)->getValueType());
            if (!$inputArgType->isInteger()->yes() || $supportedTypes->isSuperTypeOf($inputArgType)->no()) {
                return null;
            }
            // Pragmatical solution since global expressions are not passed through the scope for performance reasons
            // See https://github.com/phpstan/phpstan-src/pull/2012 for details
            $inputArgType = new ArrayType(new StringType(), new MixedType());
        }
        $filterArgType = $scope->getType($functionCall->getArgs()[1]->value);
        $filterConstantArrayType = $filterArgType->getConstantArrays()[0] ?? null;
        $addEmptyType = isset($functionCall->getArgs()[2]) ? $scope->getType($functionCall->getArgs()[2]->value) : null;
        $addEmpty = $addEmptyType === null || $addEmptyType->isTrue()->yes();
        $valueTypesBuilder = ConstantArrayTypeBuilder::createEmpty();
        if ($filterArgType instanceof ConstantIntegerType) {
            if ($inputConstantArrayType === null) {
                $isList = $inputArgType->isList()->yes();
                $valueType = $this->filterFunctionReturnTypeHelper->getType($inputArgType->getIterableValueType(), $filterArgType, null);
                $arrayType = new ArrayType($inputArgType->getIterableKeyType(), $valueType);
                return $isList ? AccessoryArrayListType::intersectWith($arrayType) : $arrayType;
            }
            // Override $add_empty option
            $addEmpty = \false;
            $keysType = $inputConstantArrayType;
            $inputKeysList = array_map(static function ($type) {
                return $type->getValue();
            }, $inputConstantArrayType->getKeyTypes());
            $filterTypesMap = array_fill_keys($inputKeysList, $filterArgType);
            $inputTypesMap = array_combine($inputKeysList, $inputConstantArrayType->getValueTypes());
            $optionalKeys = [];
            foreach ($inputConstantArrayType->getOptionalKeys() as $index) {
                if (!isset($inputKeysList[$index])) {
                    continue;
                }
                $optionalKeys[] = $inputKeysList[$index];
            }
        } elseif ($filterConstantArrayType === null) {
            if ($inputConstantArrayType === null) {
                $isList = $inputArgType->isList()->yes();
                $valueType = $this->filterFunctionReturnTypeHelper->getType($inputArgType, $filterArgType, null);
                $arrayType = new ArrayType($inputArgType->getIterableKeyType(), $addEmpty ? TypeCombinator::addNull($valueType) : $valueType);
                return $isList ? AccessoryArrayListType::intersectWith($arrayType) : $arrayType;
            }
            return null;
        } else {
            $keysType = $filterConstantArrayType;
            $filterKeyTypes = $filterConstantArrayType->getKeyTypes();
            $filterKeysList = array_map(static function ($type) {
                return $type->getValue();
            }, $filterKeyTypes);
            $filterTypesMap = array_combine($filterKeysList, $keysType->getValueTypes());
            if ($inputConstantArrayType !== null) {
                $inputKeysList = array_map(static function ($type) {
                    return $type->getValue();
                }, $inputConstantArrayType->getKeyTypes());
                $inputTypesMap = array_combine($inputKeysList, $inputConstantArrayType->getValueTypes());
                $optionalKeys = [];
                foreach ($inputConstantArrayType->getOptionalKeys() as $index) {
                    if (!isset($inputKeysList[$index])) {
                        continue;
                    }
                    $optionalKeys[] = $inputKeysList[$index];
                }
            } else {
                $optionalKeys = $filterKeysList;
                $inputTypesMap = array_fill_keys($optionalKeys, $inputArgType->getIterableValueType());
            }
        }
        foreach ($keysType->getKeyTypes() as $keyType) {
            $optional = \false;
            $key = $keyType->getValue();
            $inputType = $inputTypesMap[$key] ?? null;
            if ($inputType === null) {
                if ($addEmpty) {
                    $valueTypesBuilder->setOffsetValueType($keyType, new NullType());
                }
                continue;
            }
            [$filterType, $flagsType] = $this->fetchFilter($filterTypesMap[$key] ?? new MixedType());
            $valueType = $this->filterFunctionReturnTypeHelper->getType($inputType, $filterType, $flagsType);
            if (in_array($key, $optionalKeys, \true)) {
                if ($addEmpty) {
                    $valueType = TypeCombinator::addNull($valueType);
                } else {
                    $optional = \true;
                }
            }
            $valueTypesBuilder->setOffsetValueType($keyType, $valueType, $optional);
        }
        return $valueTypesBuilder->getArray();
    }
    /** @return array{?Type, ?Type} */
    public function fetchFilter(Type $type) : array
    {
        if (!$type->isArray()->yes()) {
            return [$type, null];
        }
        $filterKey = new ConstantStringType('filter');
        if (!$type->hasOffsetValueType($filterKey)->yes()) {
            return [$type, null];
        }
        $filterOffsetType = $type->getOffsetValueType($filterKey);
        $filterType = null;
        if (count($filterOffsetType->getConstantScalarTypes()) > 0) {
            $filterType = TypeCombinator::union(...$filterOffsetType->getConstantScalarTypes());
        }
        return [$filterType, $type];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Type\DynamicMethodThrowTypeExtension;
use PHPStan\Type\Type;
use PHPStan\Type\VoidType;
use function count;
final class DsMapDynamicMethodThrowTypeExtension implements DynamicMethodThrowTypeExtension
{
    public function isMethodSupported(MethodReflection $methodReflection) : bool
    {
        return $methodReflection->getDeclaringClass()->getName() === 'Ds\\Map' && ($methodReflection->getName() === 'get' || $methodReflection->getName() === 'remove');
    }
    public function getThrowTypeFromMethodCall(MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope) : ?\PHPStan\Type\Type
    {
        if (count($methodCall->args) < 2) {
            return $methodReflection->getThrowType();
        }
        return new VoidType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\ArrayType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntegerType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\UnionType;
use function count;
class ArrayRandFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'array_rand';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $argsCount = count($functionCall->getArgs());
        if ($argsCount < 1) {
            return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        }
        $firstArgType = $scope->getType($functionCall->getArgs()[0]->value);
        $isInteger = (new IntegerType())->isSuperTypeOf($firstArgType->getIterableKeyType());
        $isString = $firstArgType->getIterableKeyType()->isString();
        if ($isInteger->yes()) {
            $valueType = new IntegerType();
        } elseif ($isString->yes()) {
            $valueType = new StringType();
        } else {
            $valueType = new UnionType([new IntegerType(), new StringType()]);
        }
        if ($argsCount < 2) {
            return $valueType;
        }
        $secondArgType = $scope->getType($functionCall->getArgs()[1]->value);
        if ($secondArgType instanceof ConstantIntegerType) {
            if ($secondArgType->getValue() === 1) {
                return $valueType;
            }
            if ($secondArgType->getValue() >= 2) {
                return new ArrayType(new IntegerType(), $valueType);
            }
        }
        return TypeCombinator::union($valueType, new ArrayType(new IntegerType(), $valueType));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\NullType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
class ArrayShiftFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'array_shift';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        if (!isset($functionCall->getArgs()[0])) {
            return null;
        }
        $argType = $scope->getType($functionCall->getArgs()[0]->value);
        $iterableAtLeastOnce = $argType->isIterableAtLeastOnce();
        if ($iterableAtLeastOnce->no()) {
            return new NullType();
        }
        $itemType = $argType->getFirstIterableValueType();
        if ($iterableAtLeastOnce->yes()) {
            return $itemType;
        }
        return TypeCombinator::union($itemType, new NullType());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntegerType;
use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function array_keys;
use function count;
use function in_array;
class ArrayMergeFunctionDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'array_merge';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $args = $functionCall->getArgs();
        if (!isset($args[0])) {
            return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        }
        $argTypes = [];
        $optionalArgTypes = [];
        $allConstant = \true;
        foreach ($args as $arg) {
            $argType = $scope->getType($arg->value);
            if ($arg->unpack) {
                if ($argType instanceof ConstantArrayType) {
                    $argTypesFound = $argType->getValueTypes();
                } else {
                    $argTypesFound = [$argType->getIterableValueType()];
                }
                foreach ($argTypesFound as $argTypeFound) {
                    $argTypes[] = $argTypeFound;
                    if ($argTypeFound instanceof ConstantArrayType) {
                        continue;
                    }
                    $allConstant = \false;
                }
                if (!$argType->isIterableAtLeastOnce()->yes()) {
                    // unpacked params can be empty, making them optional
                    $optionalArgTypesOffset = count($argTypes) - 1;
                    foreach (array_keys($argTypesFound) as $key) {
                        $optionalArgTypes[] = $optionalArgTypesOffset + $key;
                    }
                }
            } else {
                $argTypes[] = $argType;
                if (!$argType instanceof ConstantArrayType) {
                    $allConstant = \false;
                }
            }
        }
        if ($allConstant) {
            $newArrayBuilder = ConstantArrayTypeBuilder::createEmpty();
            foreach ($argTypes as $argType) {
                if (!$argType instanceof ConstantArrayType) {
                    throw new ShouldNotHappenException();
                }
                $keyTypes = $argType->getKeyTypes();
                $valueTypes = $argType->getValueTypes();
                $optionalKeys = $argType->getOptionalKeys();
                foreach ($keyTypes as $k => $keyType) {
                    $isOptional = in_array($k, $optionalKeys, \true);
                    $newArrayBuilder->setOffsetValueType($keyType instanceof ConstantIntegerType ? null : $keyType, $valueTypes[$k], $isOptional);
                }
            }
            return $newArrayBuilder->getArray();
        }
        $keyTypes = [];
        $valueTypes = [];
        $nonEmpty = \false;
        $isList = \true;
        foreach ($argTypes as $key => $argType) {
            $keyType = $argType->getIterableKeyType();
            $keyTypes[] = $keyType;
            $valueTypes[] = $argType->getIterableValueType();
            if (!(new IntegerType())->isSuperTypeOf($keyType)->yes()) {
                $isList = \false;
            }
            if (in_array($key, $optionalArgTypes, \true) || !$argType->isIterableAtLeastOnce()->yes()) {
                continue;
            }
            $nonEmpty = \true;
        }
        $keyType = TypeCombinator::union(...$keyTypes);
        if ($keyType instanceof NeverType) {
            return new ConstantArrayType([], []);
        }
        $arrayType = new ArrayType($keyType, TypeCombinator::union(...$valueTypes));
        if ($nonEmpty) {
            $arrayType = TypeCombinator::intersect($arrayType, new NonEmptyArrayType());
        }
        if ($isList) {
            $arrayType = AccessoryArrayListType::intersectWith($arrayType);
        }
        return $arrayType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use DateTime;
use DateTimeImmutable;
use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function count;
use function date_create;
use function in_array;
class DateTimeCreateDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return in_array($functionReflection->getName(), ['date_create', 'date_create_immutable'], \true);
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        if (count($functionCall->getArgs()) < 1) {
            return null;
        }
        $datetimes = $scope->getType($functionCall->getArgs()[0]->value)->getConstantStrings();
        if (count($datetimes) === 0) {
            return null;
        }
        $types = [];
        $className = $functionReflection->getName() === 'date_create' ? DateTime::class : DateTimeImmutable::class;
        foreach ($datetimes as $constantString) {
            $isValid = date_create($constantString->getValue()) !== \false;
            $types[] = $isValid ? new ObjectType($className) : new ConstantBooleanType(\false);
        }
        return TypeCombinator::union(...$types);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\NeverType;
use PHPStan\Type\NullType;
use PHPStan\Type\Type;
use function count;
use function strtolower;
class ArrayKeysFunctionDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return strtolower($functionReflection->getName()) === 'array_keys';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        if (count($functionCall->getArgs()) !== 1) {
            return null;
        }
        $arrayType = $scope->getType($functionCall->getArgs()[0]->value);
        if ($arrayType->isArray()->no()) {
            return $this->phpVersion->arrayFunctionsReturnNullWithNonArray() ? new NullType() : new NeverType();
        }
        return $arrayType->getKeysArray();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use DateInterval;
use PhpParser\Node\Expr\StaticCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Type\DynamicStaticMethodThrowTypeExtension;
use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function count;
class DateIntervalConstructorThrowTypeExtension implements DynamicStaticMethodThrowTypeExtension
{
    public function isStaticMethodSupported(MethodReflection $methodReflection) : bool
    {
        return $methodReflection->getName() === '__construct' && $methodReflection->getDeclaringClass()->getName() === DateInterval::class;
    }
    public function getThrowTypeFromStaticMethodCall(MethodReflection $methodReflection, StaticCall $methodCall, Scope $scope) : ?Type
    {
        if (count($methodCall->getArgs()) === 0) {
            return $methodReflection->getThrowType();
        }
        $valueType = $scope->getType($methodCall->getArgs()[0]->value);
        $constantStrings = $valueType->getConstantStrings();
        foreach ($constantStrings as $constantString) {
            try {
                new DateInterval($constantString->getValue());
            } catch (\Exception $e) {
                // phpcs:ignore
                return $methodReflection->getThrowType();
            }
            $valueType = TypeCombinator::remove($valueType, $constantString);
        }
        if (!$valueType instanceof NeverType) {
            return $methodReflection->getThrowType();
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
class ArrayCurrentDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'current';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        if (!isset($functionCall->getArgs()[0])) {
            return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        }
        $argType = $scope->getType($functionCall->getArgs()[0]->value);
        $iterableAtLeastOnce = $argType->isIterableAtLeastOnce();
        if ($iterableAtLeastOnce->no()) {
            return new ConstantBooleanType(\false);
        }
        $keyType = $argType->getIterableValueType();
        if ($iterableAtLeastOnce->yes()) {
            return $keyType;
        }
        return TypeCombinator::union($keyType, new ConstantBooleanType(\false));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntegerType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function array_map;
use function array_unique;
use function count;
use function in_array;
use function mb_internal_encoding;
use function mb_str_split;
use function str_split;
final class StrSplitFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    use \PHPStan\Type\Php\MbFunctionsReturnTypeExtensionTrait;
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return in_array($functionReflection->getName(), ['str_split', 'mb_str_split'], \true);
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $defaultReturnType = ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        if (count($functionCall->getArgs()) < 1) {
            return $defaultReturnType;
        }
        if (count($functionCall->getArgs()) >= 2) {
            $splitLengthType = $scope->getType($functionCall->getArgs()[1]->value);
            if ($splitLengthType instanceof ConstantIntegerType) {
                $splitLength = $splitLengthType->getValue();
                if ($splitLength < 1) {
                    return new ConstantBooleanType(\false);
                }
            }
        } else {
            $splitLength = 1;
        }
        $encoding = null;
        if ($functionReflection->getName() === 'mb_str_split') {
            if (count($functionCall->getArgs()) >= 3) {
                $strings = $scope->getType($functionCall->getArgs()[2]->value)->getConstantStrings();
                $values = array_unique(array_map(static function (ConstantStringType $encoding) : string {
                    return $encoding->getValue();
                }, $strings));
                if (count($values) !== 1) {
                    return $defaultReturnType;
                }
                $encoding = $values[0];
                if (!$this->isSupportedEncoding($encoding)) {
                    return new ConstantBooleanType(\false);
                }
            } else {
                $encoding = mb_internal_encoding();
            }
        }
        if (!isset($splitLength)) {
            return $defaultReturnType;
        }
        $stringType = $scope->getType($functionCall->getArgs()[0]->value);
        $constantStrings = $stringType->getConstantStrings();
        if (count($constantStrings) > 0) {
            $results = [];
            foreach ($constantStrings as $constantString) {
                $items = $encoding === null ? str_split($constantString->getValue(), $splitLength) : @mb_str_split($constantString->getValue(), $splitLength, $encoding);
                if ($items === \false) {
                    throw new ShouldNotHappenException();
                }
                $results[] = self::createConstantArrayFrom($items, $scope);
            }
            return TypeCombinator::union(...$results);
        }
        $returnType = AccessoryArrayListType::intersectWith(new ArrayType(new IntegerType(), new StringType()));
        return $encoding === null && !$this->phpVersion->strSplitReturnsEmptyArray() ? TypeCombinator::intersect($returnType, new NonEmptyArrayType()) : $returnType;
    }
    /**
     * @param string[] $constantArray
     */
    private static function createConstantArrayFrom(array $constantArray, Scope $scope) : ConstantArrayType
    {
        $keyTypes = [];
        $valueTypes = [];
        $isList = \true;
        $i = 0;
        foreach ($constantArray as $key => $value) {
            $keyType = $scope->getTypeFromValue($key);
            if (!$keyType instanceof ConstantIntegerType) {
                throw new ShouldNotHappenException();
            }
            $keyTypes[] = $keyType;
            $valueTypes[] = $scope->getTypeFromValue($value);
            $isList = $isList && $key === $i;
            $i++;
        }
        return new ConstantArrayType($keyTypes, $valueTypes, $isList ? [$i] : [0]);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Arg;
use PhpParser\Node\Expr\BinaryOp\BooleanAnd;
use PhpParser\Node\Expr\BinaryOp\NotIdentical;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Name;
use PhpParser\Node\Scalar\String_;
use PHPStan\Analyser\Scope;
use PHPStan\Analyser\SpecifiedTypes;
use PHPStan\Analyser\TypeSpecifier;
use PHPStan\Analyser\TypeSpecifierAwareExtension;
use PHPStan\Analyser\TypeSpecifierContext;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Accessory\AccessoryLiteralStringType;
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
use PHPStan\Type\Accessory\AccessoryNonFalsyStringType;
use PHPStan\Type\Accessory\AccessoryNumericStringType;
use PHPStan\Type\FunctionTypeSpecifyingExtension;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\StringType;
use function array_key_exists;
use function count;
use function strtolower;
final class StrContainingTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
{
    /** @var array<string, array{0: int, 1: int}> */
    private $strContainingFunctions = ['fnmatch' => [1, 0], 'str_contains' => [0, 1], 'str_starts_with' => [0, 1], 'str_ends_with' => [0, 1], 'strpos' => [0, 1], 'strrpos' => [0, 1], 'stripos' => [0, 1], 'strripos' => [0, 1], 'strstr' => [0, 1]];
    /**
     * @var \PHPStan\Analyser\TypeSpecifier
     */
    private $typeSpecifier;
    public function setTypeSpecifier(TypeSpecifier $typeSpecifier) : void
    {
        $this->typeSpecifier = $typeSpecifier;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection, FuncCall $node, TypeSpecifierContext $context) : bool
    {
        return array_key_exists(strtolower($functionReflection->getName()), $this->strContainingFunctions) && $context->true();
    }
    public function specifyTypes(FunctionReflection $functionReflection, FuncCall $node, Scope $scope, TypeSpecifierContext $context) : SpecifiedTypes
    {
        $args = $node->getArgs();
        if (count($args) >= 2) {
            [$hackstackArg, $needleArg] = $this->strContainingFunctions[strtolower($functionReflection->getName())];
            $haystackType = $scope->getType($args[$hackstackArg]->value);
            $needleType = $scope->getType($args[$needleArg]->value);
            if ($needleType->isNonEmptyString()->yes() && $haystackType->isString()->yes()) {
                $accessories = [new StringType()];
                if ($needleType->isNonFalsyString()->yes()) {
                    $accessories[] = new AccessoryNonFalsyStringType();
                } else {
                    $accessories[] = new AccessoryNonEmptyStringType();
                }
                if ($haystackType->isLiteralString()->yes()) {
                    $accessories[] = new AccessoryLiteralStringType();
                }
                if ($haystackType->isNumericString()->yes()) {
                    $accessories[] = new AccessoryNumericStringType();
                }
                return $this->typeSpecifier->create($args[$hackstackArg]->value, new IntersectionType($accessories), $context, \false, $scope, new BooleanAnd(new NotIdentical($args[$needleArg]->value, new String_('')), new FuncCall(new Name('FAUX_FUNCTION'), [new Arg($args[$needleArg]->value)])));
            }
        }
        return new SpecifiedTypes();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\BitwiseFlagHelper;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function strtolower;
class PregSplitDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /**
     * @var \PHPStan\Type\BitwiseFlagHelper
     */
    private $bitwiseFlagAnalyser;
    public function __construct(BitwiseFlagHelper $bitwiseFlagAnalyser)
    {
        $this->bitwiseFlagAnalyser = $bitwiseFlagAnalyser;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return strtolower($functionReflection->getName()) === 'preg_split';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $flagsArg = $functionCall->getArgs()[3] ?? null;
        if ($flagsArg !== null && $this->bitwiseFlagAnalyser->bitwiseOrContainsConstant($flagsArg->value, $scope, 'PREG_SPLIT_OFFSET_CAPTURE')->yes()) {
            $type = new ArrayType(new IntegerType(), new ConstantArrayType([new ConstantIntegerType(0), new ConstantIntegerType(1)], [new StringType(), IntegerRangeType::fromInterval(0, null)], [2]));
            return TypeCombinator::union(AccessoryArrayListType::intersectWith($type), new ConstantBooleanType(\false));
        }
        return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
use PHPStan\Type\Accessory\AccessoryNonFalsyStringType;
use PHPStan\Type\Accessory\AccessoryNumericStringType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\UnionType;
use function count;
use function date;
use function sprintf;
class DateFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'date';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        if (count($functionCall->getArgs()) === 0) {
            return new StringType();
        }
        $argType = $scope->getType($functionCall->getArgs()[0]->value);
        $constantStrings = $argType->getConstantStrings();
        if (count($constantStrings) === 0) {
            return new StringType();
        }
        if (count($constantStrings) === 1) {
            $constantString = $constantStrings[0]->getValue();
            // see see https://www.php.net/manual/en/datetime.format.php
            switch ($constantString) {
                case 'd':
                    return $this->buildNumericRangeType(1, 31, \true);
                case 'j':
                    return $this->buildNumericRangeType(1, 31, \false);
                case 'N':
                    return $this->buildNumericRangeType(1, 7, \false);
                case 'w':
                    return $this->buildNumericRangeType(0, 6, \false);
                case 'm':
                    return $this->buildNumericRangeType(1, 12, \true);
                case 'n':
                    return $this->buildNumericRangeType(1, 12, \false);
                case 't':
                    return $this->buildNumericRangeType(28, 31, \false);
                case 'L':
                    return $this->buildNumericRangeType(0, 1, \false);
                case 'g':
                    return $this->buildNumericRangeType(1, 12, \false);
                case 'G':
                    return $this->buildNumericRangeType(0, 23, \false);
                case 'h':
                    return $this->buildNumericRangeType(1, 12, \true);
                case 'H':
                    return $this->buildNumericRangeType(0, 23, \true);
                case 'I':
                    return $this->buildNumericRangeType(0, 1, \false);
            }
        }
        $types = [];
        foreach ($constantStrings as $constantString) {
            $types[] = new ConstantStringType(date($constantString->getValue()));
        }
        $type = TypeCombinator::union(...$types);
        if ($type->isNumericString()->yes()) {
            return new IntersectionType([new StringType(), new AccessoryNumericStringType()]);
        }
        if ($type->isNonFalsyString()->yes()) {
            return new IntersectionType([new StringType(), new AccessoryNonFalsyStringType()]);
        }
        if ($type->isNonEmptyString()->yes()) {
            return new IntersectionType([new StringType(), new AccessoryNonEmptyStringType()]);
        }
        if ($type->isNonEmptyString()->no()) {
            return new ConstantStringType('');
        }
        return new StringType();
    }
    private function buildNumericRangeType(int $min, int $max, bool $zeroPad) : Type
    {
        $types = [];
        for ($i = $min; $i <= $max; $i++) {
            $string = (string) $i;
            if ($zeroPad) {
                $string = sprintf('%02s', $string);
            }
            $types[] = new ConstantStringType($string);
        }
        return new UnionType($types);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use DateInterval;
use PhpParser\Node\Expr\StaticCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\DynamicStaticMethodReturnTypeExtension;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use function count;
use function in_array;
class DateIntervalDynamicReturnTypeExtension implements DynamicStaticMethodReturnTypeExtension
{
    public function getClass() : string
    {
        return DateInterval::class;
    }
    public function isStaticMethodSupported(MethodReflection $methodReflection) : bool
    {
        return $methodReflection->getName() === 'createFromDateString';
    }
    public function getTypeFromStaticMethodCall(MethodReflection $methodReflection, StaticCall $methodCall, Scope $scope) : ?Type
    {
        $arguments = $methodCall->getArgs();
        if (!isset($arguments[0])) {
            return null;
        }
        $strings = $scope->getType($arguments[0]->value)->getConstantStrings();
        $possibleReturnTypes = [];
        foreach ($strings as $string) {
            $possibleReturnTypes[] = @DateInterval::createFromDateString($string->getValue()) instanceof DateInterval ? DateInterval::class : \false;
        }
        // the error case, when wrong types are passed
        if (count($possibleReturnTypes) === 0) {
            return null;
        }
        if (in_array(\false, $possibleReturnTypes, \true) && in_array(DateInterval::class, $possibleReturnTypes, \true)) {
            return null;
        }
        if (in_array(\false, $possibleReturnTypes, \true)) {
            return new ConstantBooleanType(\false);
        }
        return new ObjectType(DateInterval::class);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node;
use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Analyser\SpecifiedTypes;
use PHPStan\Analyser\TypeSpecifier;
use PHPStan\Analyser\TypeSpecifierAwareExtension;
use PHPStan\Analyser\TypeSpecifierContext;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\FunctionTypeSpecifyingExtension;
use function count;
class DefineConstantTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
{
    /**
     * @var \PHPStan\Analyser\TypeSpecifier
     */
    private $typeSpecifier;
    public function setTypeSpecifier(TypeSpecifier $typeSpecifier) : void
    {
        $this->typeSpecifier = $typeSpecifier;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection, FuncCall $node, TypeSpecifierContext $context) : bool
    {
        return $functionReflection->getName() === 'define' && $context->null() && count($node->getArgs()) >= 2;
    }
    public function specifyTypes(FunctionReflection $functionReflection, FuncCall $node, Scope $scope, TypeSpecifierContext $context) : SpecifiedTypes
    {
        $constantName = $scope->getType($node->getArgs()[0]->value);
        if (!$constantName instanceof ConstantStringType || $constantName->getValue() === '') {
            return new SpecifiedTypes([], []);
        }
        return $this->typeSpecifier->create(new Node\Expr\ConstFetch(new Node\Name\FullyQualified($constantName->getValue())), $scope->getType($node->getArgs()[1]->value), TypeSpecifierContext::createTruthy(), \true, $scope);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\PropertyFetch;
use PhpParser\Node\Identifier;
use PHPStan\Analyser\Scope;
use PHPStan\Analyser\SpecifiedTypes;
use PHPStan\Analyser\TypeSpecifier;
use PHPStan\Analyser\TypeSpecifierAwareExtension;
use PHPStan\Analyser\TypeSpecifierContext;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Rules\Properties\PropertyReflectionFinder;
use PHPStan\Type\Accessory\HasPropertyType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\FunctionTypeSpecifyingExtension;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\ObjectWithoutClassType;
use function count;
class PropertyExistsTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
{
    /**
     * @var \PHPStan\Analyser\TypeSpecifier
     */
    private $typeSpecifier;
    /**
     * @var \PHPStan\Rules\Properties\PropertyReflectionFinder
     */
    private $propertyReflectionFinder;
    public function __construct(PropertyReflectionFinder $propertyReflectionFinder)
    {
        $this->propertyReflectionFinder = $propertyReflectionFinder;
    }
    public function setTypeSpecifier(TypeSpecifier $typeSpecifier) : void
    {
        $this->typeSpecifier = $typeSpecifier;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection, FuncCall $node, TypeSpecifierContext $context) : bool
    {
        return $functionReflection->getName() === 'property_exists' && $context->true() && count($node->getArgs()) >= 2;
    }
    public function specifyTypes(FunctionReflection $functionReflection, FuncCall $node, Scope $scope, TypeSpecifierContext $context) : SpecifiedTypes
    {
        $propertyNameType = $scope->getType($node->getArgs()[1]->value);
        if (!$propertyNameType instanceof ConstantStringType) {
            return new SpecifiedTypes([], []);
        }
        $objectType = $scope->getType($node->getArgs()[0]->value);
        if ($objectType instanceof ConstantStringType) {
            return new SpecifiedTypes([], []);
        } elseif ($objectType->isObject()->yes()) {
            $propertyNode = new PropertyFetch($node->getArgs()[0]->value, new Identifier($propertyNameType->getValue()));
        } else {
            return new SpecifiedTypes([], []);
        }
        $propertyReflection = $this->propertyReflectionFinder->findPropertyReflectionFromNode($propertyNode, $scope);
        if ($propertyReflection !== null) {
            if (!$propertyReflection->isNative()) {
                return new SpecifiedTypes([], []);
            }
        }
        return $this->typeSpecifier->create($node->getArgs()[0]->value, new IntersectionType([new ObjectWithoutClassType(), new HasPropertyType($propertyNameType->getValue())]), $context, \false, $scope);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use BackedEnum;
use PhpParser\Node\Expr\StaticCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Type\DynamicStaticMethodReturnTypeExtension;
use PHPStan\Type\Enum\EnumCaseObjectType;
use PHPStan\Type\NullType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function count;
use function in_array;
class BackedEnumFromMethodDynamicReturnTypeExtension implements DynamicStaticMethodReturnTypeExtension
{
    public function getClass() : string
    {
        return BackedEnum::class;
    }
    public function isStaticMethodSupported(MethodReflection $methodReflection) : bool
    {
        return in_array($methodReflection->getName(), ['from', 'tryFrom'], \true);
    }
    public function getTypeFromStaticMethodCall(MethodReflection $methodReflection, StaticCall $methodCall, Scope $scope) : ?Type
    {
        if (!$methodReflection->getDeclaringClass()->isBackedEnum()) {
            return null;
        }
        $arguments = $methodCall->getArgs();
        if (count($arguments) < 1) {
            return null;
        }
        $valueType = $scope->getType($arguments[0]->value);
        $enumCases = $methodReflection->getDeclaringClass()->getEnumCases();
        if (count($enumCases) === 0) {
            if ($methodReflection->getName() === 'tryFrom') {
                return new NullType();
            }
            return null;
        }
        if (count($valueType->getConstantScalarValues()) === 0) {
            return null;
        }
        $resultEnumCases = [];
        $addNull = \false;
        foreach ($valueType->getConstantScalarValues() as $value) {
            $hasMatching = \false;
            foreach ($enumCases as $enumCase) {
                if ($enumCase->getBackingValueType() === null) {
                    continue;
                }
                $enumCaseValues = $enumCase->getBackingValueType()->getConstantScalarValues();
                if (count($enumCaseValues) !== 1) {
                    continue;
                }
                if ($value === $enumCaseValues[0]) {
                    $resultEnumCases[] = new EnumCaseObjectType($enumCase->getDeclaringEnum()->getName(), $enumCase->getName(), $enumCase->getDeclaringEnum());
                    $hasMatching = \true;
                    break;
                }
            }
            if ($hasMatching) {
                continue;
            }
            $addNull = \true;
        }
        if (count($resultEnumCases) === 0) {
            if ($methodReflection->getName() === 'tryFrom') {
                return new NullType();
            }
            return null;
        }
        $result = TypeCombinator::union(...$resultEnumCases);
        if ($addNull && $methodReflection->getName() === 'tryFrom') {
            return TypeCombinator::addNull($result);
        }
        return $result;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use Closure;
use PhpParser\Node\Expr\StaticCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\ClosureType;
use PHPStan\Type\DynamicStaticMethodReturnTypeExtension;
use PHPStan\Type\Type;
class ClosureBindDynamicReturnTypeExtension implements DynamicStaticMethodReturnTypeExtension
{
    public function getClass() : string
    {
        return Closure::class;
    }
    public function isStaticMethodSupported(MethodReflection $methodReflection) : bool
    {
        return $methodReflection->getName() === 'bind';
    }
    public function getTypeFromStaticMethodCall(MethodReflection $methodReflection, StaticCall $methodCall, Scope $scope) : Type
    {
        $closureType = $scope->getType($methodCall->getArgs()[0]->value);
        if (!$closureType instanceof ClosureType) {
            return ParametersAcceptorSelector::selectSingle($methodReflection->getVariants())->getReturnType();
        }
        return $closureType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use DatePeriod;
use DateTime;
use DateTimeInterface;
use PhpParser\Node\Expr\StaticCall;
use PhpParser\Node\Name;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Type\DynamicStaticMethodReturnTypeExtension;
use PHPStan\Type\Generic\GenericObjectType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\NullType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use function strtolower;
class DatePeriodConstructorReturnTypeExtension implements DynamicStaticMethodReturnTypeExtension
{
    public function getClass() : string
    {
        return DatePeriod::class;
    }
    public function isStaticMethodSupported(MethodReflection $methodReflection) : bool
    {
        return $methodReflection->getName() === '__construct';
    }
    public function getTypeFromStaticMethodCall(MethodReflection $methodReflection, StaticCall $methodCall, Scope $scope) : Type
    {
        if (!isset($methodCall->getArgs()[0])) {
            return new ObjectType(DatePeriod::class);
        }
        if (!$methodCall->class instanceof Name) {
            return new ObjectType(DatePeriod::class);
        }
        $className = $scope->resolveName($methodCall->class);
        if (strtolower($className) !== 'dateperiod') {
            return new ObjectType($className);
        }
        $firstArgType = $scope->getType($methodCall->getArgs()[0]->value);
        if ($firstArgType->isString()->yes()) {
            $firstArgType = new ObjectType(DateTime::class);
        }
        $thirdArgType = null;
        if (isset($methodCall->getArgs()[2])) {
            $thirdArgType = $scope->getType($methodCall->getArgs()[2]->value);
        }
        if (!$thirdArgType instanceof Type) {
            return new GenericObjectType(DatePeriod::class, [$firstArgType, new NullType(), new IntegerType()]);
        }
        if ((new ObjectType(DateTimeInterface::class))->isSuperTypeOf($thirdArgType)->yes()) {
            return new GenericObjectType(DatePeriod::class, [$firstArgType, $thirdArgType, new NullType()]);
        }
        if ((new IntegerType())->isSuperTypeOf($thirdArgType)->yes()) {
            return new GenericObjectType(DatePeriod::class, [$firstArgType, new NullType(), $thirdArgType]);
        }
        return new ObjectType(DatePeriod::class);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use DateTimeZone;
use PhpParser\Node\Expr\StaticCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Type\DynamicStaticMethodThrowTypeExtension;
use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function count;
class DateTimeZoneConstructorThrowTypeExtension implements DynamicStaticMethodThrowTypeExtension
{
    public function isStaticMethodSupported(MethodReflection $methodReflection) : bool
    {
        return $methodReflection->getName() === '__construct' && $methodReflection->getDeclaringClass()->getName() === DateTimeZone::class;
    }
    public function getThrowTypeFromStaticMethodCall(MethodReflection $methodReflection, StaticCall $methodCall, Scope $scope) : ?Type
    {
        if (count($methodCall->getArgs()) === 0) {
            return null;
        }
        $valueType = $scope->getType($methodCall->getArgs()[0]->value);
        $constantStrings = $valueType->getConstantStrings();
        foreach ($constantStrings as $constantString) {
            try {
                new DateTimeZone($constantString->getValue());
            } catch (\Exception $e) {
                // phpcs:ignore
                return $methodReflection->getThrowType();
            }
            $valueType = TypeCombinator::remove($valueType, $constantString);
        }
        if (!$valueType instanceof NeverType) {
            return $methodReflection->getThrowType();
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PHPStan\Type\ClassStringType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\Generic\GenericClassStringType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\NeverType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\ObjectWithoutClassType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypeTraverser;
use PHPStan\Type\UnionType;
use function array_unique;
use function array_values;
final class IsAFunctionTypeSpecifyingHelper
{
    public function determineType(Type $objectOrClassType, Type $classType, bool $allowString, bool $allowSameClass) : Type
    {
        $objectOrClassTypeClassNames = $objectOrClassType->getObjectClassNames();
        if ($allowString) {
            foreach ($objectOrClassType->getConstantStrings() as $constantString) {
                $objectOrClassTypeClassNames[] = $constantString->getValue();
            }
            $objectOrClassTypeClassNames = array_values(array_unique($objectOrClassTypeClassNames));
        }
        return TypeTraverser::map($classType, static function (Type $type, callable $traverse) use($objectOrClassTypeClassNames, $allowString, $allowSameClass) : Type {
            if ($type instanceof UnionType || $type instanceof IntersectionType) {
                return $traverse($type);
            }
            if ($type instanceof ConstantStringType) {
                if (!$allowSameClass && $objectOrClassTypeClassNames === [$type->getValue()]) {
                    return new NeverType();
                }
                if ($allowString) {
                    return TypeCombinator::union(new ObjectType($type->getValue()), new GenericClassStringType(new ObjectType($type->getValue())));
                }
                return new ObjectType($type->getValue());
            }
            if ($type instanceof GenericClassStringType) {
                if ($allowString) {
                    return TypeCombinator::union($type->getGenericType(), $type);
                }
                return $type->getGenericType();
            }
            if ($allowString) {
                return TypeCombinator::union(new ObjectWithoutClassType(), new ClassStringType());
            }
            return new ObjectWithoutClassType();
        });
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\GeneralizePrecision;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
class ArgumentBasedFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /** @var int[] */
    private $functionNames = ['array_unique' => 0, 'array_change_key_case' => 0, 'array_diff_assoc' => 0, 'array_diff_key' => 0, 'array_diff_uassoc' => 0, 'array_diff_ukey' => 0, 'array_diff' => 0, 'array_udiff_assoc' => 0, 'array_udiff_uassoc' => 0, 'array_udiff' => 0, 'array_intersect_assoc' => 0, 'array_intersect_uassoc' => 0, 'array_intersect_ukey' => 0, 'array_intersect' => 0, 'array_uintersect_assoc' => 0, 'array_uintersect_uassoc' => 0, 'array_uintersect' => 0];
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return isset($this->functionNames[$functionReflection->getName()]);
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $argumentPosition = $this->functionNames[$functionReflection->getName()];
        if (!isset($functionCall->getArgs()[$argumentPosition])) {
            return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        }
        $argument = $functionCall->getArgs()[$argumentPosition];
        $argumentType = $scope->getType($argument->value);
        $argumentKeyType = $argumentType->getIterableKeyType();
        $argumentValueType = $argumentType->getIterableValueType();
        if ($argument->unpack) {
            $argumentKeyType = $argumentKeyType->generalize(GeneralizePrecision::moreSpecific());
            $argumentValueType = $argumentValueType->getIterableValueType()->generalize(GeneralizePrecision::moreSpecific());
        }
        $array = new ArrayType($argumentKeyType, $argumentValueType);
        if ($functionReflection->getName() === 'array_unique' && $argumentType->isIterableAtLeastOnce()->yes()) {
            $array = TypeCombinator::intersect($array, new NonEmptyArrayType());
        }
        return $array;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
use PHPStan\Type\Accessory\AccessoryNonFalsyStringType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\BooleanType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantFloatType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\ConstantScalarType;
use PHPStan\Type\FloatType;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\MixedType;
use PHPStan\Type\NeverType;
use PHPStan\Type\NullType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function array_key_exists;
use function array_merge;
use function hexdec;
use function is_int;
use function octdec;
use function preg_match;
use function sprintf;
use const PHP_FLOAT_EPSILON;
final class FilterFunctionReturnTypeHelper
{
    /** All validation filters match 0x100. */
    private const VALIDATION_FILTER_BITMASK = 0x100;
    /**
     * @var \PHPStan\Type\Constant\ConstantStringType
     */
    private $flagsString;
    /** @var array<int, Type>|null */
    private $filterTypeMap;
    /** @var array<int, list<string>>|null */
    private $filterTypeOptions;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $supportedFilterInputTypes;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(ReflectionProvider $reflectionProvider, PhpVersion $phpVersion)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->phpVersion = $phpVersion;
        $this->flagsString = new ConstantStringType('flags');
    }
    public function getOffsetValueType(Type $inputType, Type $offsetType, ?Type $filterType, ?Type $flagsType) : ?Type
    {
        $inexistentOffsetType = $this->hasFlag($this->getConstant('FILTER_NULL_ON_FAILURE'), $flagsType) ? new ConstantBooleanType(\false) : new NullType();
        $hasOffsetValueType = $inputType->hasOffsetValueType($offsetType);
        if ($hasOffsetValueType->no()) {
            return $inexistentOffsetType;
        }
        $filteredType = $this->getType($inputType->getOffsetValueType($offsetType), $filterType, $flagsType);
        return $hasOffsetValueType->maybe() ? TypeCombinator::union($filteredType, $inexistentOffsetType) : $filteredType;
    }
    public function getInputType(Type $typeType, Type $varNameType, ?Type $filterType, ?Type $flagsType) : ?Type
    {
        $this->supportedFilterInputTypes = $this->supportedFilterInputTypes ?? TypeCombinator::union($this->reflectionProvider->getConstant(new Node\Name('INPUT_GET'), null)->getValueType(), $this->reflectionProvider->getConstant(new Node\Name('INPUT_POST'), null)->getValueType(), $this->reflectionProvider->getConstant(new Node\Name('INPUT_COOKIE'), null)->getValueType(), $this->reflectionProvider->getConstant(new Node\Name('INPUT_SERVER'), null)->getValueType(), $this->reflectionProvider->getConstant(new Node\Name('INPUT_ENV'), null)->getValueType());
        if (!$typeType->isInteger()->yes() || $this->supportedFilterInputTypes->isSuperTypeOf($typeType)->no()) {
            if ($this->phpVersion->throwsTypeErrorForInternalFunctions()) {
                return new NeverType();
            }
            // Using a null as input mimics pre PHP 8 behaviour where filter_input
            // would return the same as if the offset does not exist
            $inputType = new NullType();
        } else {
            // Pragmatical solution since global expressions are not passed through the scope for performance reasons
            // See https://github.com/phpstan/phpstan-src/pull/2012 for details
            $inputType = new ArrayType(new StringType(), new MixedType());
        }
        return $this->getOffsetValueType($inputType, $varNameType, $filterType, $flagsType);
    }
    public function getType(Type $inputType, ?Type $filterType, ?Type $flagsType) : Type
    {
        $mixedType = new MixedType();
        if ($filterType === null) {
            $filterValue = $this->getConstant('FILTER_DEFAULT');
        } else {
            if (!$filterType instanceof ConstantIntegerType) {
                return $mixedType;
            }
            $filterValue = $filterType->getValue();
        }
        if ($flagsType === null) {
            $flagsType = new ConstantIntegerType(0);
        }
        $hasOptions = $this->hasOptions($flagsType);
        $options = $hasOptions->yes() ? $this->getOptions($flagsType, $filterValue) : [];
        $defaultType = $options['default'] ?? ($this->hasFlag($this->getConstant('FILTER_NULL_ON_FAILURE'), $flagsType) ? new NullType() : new ConstantBooleanType(\false));
        $inputIsArray = $inputType->isArray();
        $hasRequireArrayFlag = $this->hasFlag($this->getConstant('FILTER_REQUIRE_ARRAY'), $flagsType);
        if ($inputIsArray->no() && $hasRequireArrayFlag) {
            return $defaultType;
        }
        $hasForceArrayFlag = $this->hasFlag($this->getConstant('FILTER_FORCE_ARRAY'), $flagsType);
        if ($inputIsArray->yes() && ($hasRequireArrayFlag || $hasForceArrayFlag)) {
            $inputArrayKeyType = $inputType->getIterableKeyType();
            $inputType = $inputType->getIterableValueType();
        }
        if ($inputType->isScalar()->no() && $inputType->isNull()->no()) {
            return $defaultType;
        }
        $exactType = $this->determineExactType($inputType, $filterValue, $defaultType, $flagsType);
        $type = $exactType ?? $this->getFilterTypeMap()[$filterValue] ?? $mixedType;
        $type = $this->applyRangeOptions($type, $options, $defaultType);
        if ($inputType->isNonEmptyString()->yes() && $type->isString()->yes() && !$this->canStringBeSanitized($filterValue, $flagsType)) {
            $accessory = new AccessoryNonEmptyStringType();
            if ($inputType->isNonFalsyString()->yes()) {
                $accessory = new AccessoryNonFalsyStringType();
            }
            $type = TypeCombinator::intersect($type, $accessory);
        }
        if ($hasRequireArrayFlag) {
            $type = new ArrayType($inputArrayKeyType ?? $mixedType, $type);
        }
        if ($exactType === null || $hasOptions->maybe() || !$inputType->equals($type) && $inputType->isSuperTypeOf($type)->yes()) {
            if ($defaultType->isSuperTypeOf($type)->no()) {
                $type = TypeCombinator::union($type, $defaultType);
            }
        }
        if (!$hasRequireArrayFlag && $hasForceArrayFlag) {
            return new ArrayType($inputArrayKeyType ?? $mixedType, $type);
        }
        return $type;
    }
    /**
     * @return array<int, Type>
     */
    private function getFilterTypeMap() : array
    {
        if ($this->filterTypeMap !== null) {
            return $this->filterTypeMap;
        }
        $booleanType = new BooleanType();
        $floatType = new FloatType();
        $intType = new IntegerType();
        $stringType = new StringType();
        $this->filterTypeMap = [$this->getConstant('FILTER_UNSAFE_RAW') => $stringType, $this->getConstant('FILTER_SANITIZE_EMAIL') => $stringType, $this->getConstant('FILTER_SANITIZE_ENCODED') => $stringType, $this->getConstant('FILTER_SANITIZE_NUMBER_FLOAT') => $stringType, $this->getConstant('FILTER_SANITIZE_NUMBER_INT') => $stringType, $this->getConstant('FILTER_SANITIZE_SPECIAL_CHARS') => $stringType, $this->getConstant('FILTER_SANITIZE_STRING') => $stringType, $this->getConstant('FILTER_SANITIZE_URL') => $stringType, $this->getConstant('FILTER_VALIDATE_BOOLEAN') => $booleanType, $this->getConstant('FILTER_VALIDATE_DOMAIN') => $stringType, $this->getConstant('FILTER_VALIDATE_EMAIL') => $stringType, $this->getConstant('FILTER_VALIDATE_FLOAT') => $floatType, $this->getConstant('FILTER_VALIDATE_INT') => $intType, $this->getConstant('FILTER_VALIDATE_IP') => $stringType, $this->getConstant('FILTER_VALIDATE_MAC') => $stringType, $this->getConstant('FILTER_VALIDATE_REGEXP') => $stringType, $this->getConstant('FILTER_VALIDATE_URL') => $stringType];
        if ($this->reflectionProvider->hasConstant(new Node\Name('FILTER_SANITIZE_MAGIC_QUOTES'), null)) {
            $this->filterTypeMap[$this->getConstant('FILTER_SANITIZE_MAGIC_QUOTES')] = $stringType;
        }
        if ($this->reflectionProvider->hasConstant(new Node\Name('FILTER_SANITIZE_ADD_SLASHES'), null)) {
            $this->filterTypeMap[$this->getConstant('FILTER_SANITIZE_ADD_SLASHES')] = $stringType;
        }
        return $this->filterTypeMap;
    }
    /**
     * @return array<int, list<string>>
     */
    private function getFilterTypeOptions() : array
    {
        if ($this->filterTypeOptions !== null) {
            return $this->filterTypeOptions;
        }
        $this->filterTypeOptions = [$this->getConstant('FILTER_VALIDATE_INT') => ['min_range', 'max_range']];
        return $this->filterTypeOptions;
    }
    private function getConstant(string $constantName) : int
    {
        $constant = $this->reflectionProvider->getConstant(new Node\Name($constantName), null);
        $valueType = $constant->getValueType();
        if (!$valueType instanceof ConstantIntegerType) {
            throw new ShouldNotHappenException(sprintf('Constant %s does not have integer type.', $constantName));
        }
        return $valueType->getValue();
    }
    private function determineExactType(Type $in, int $filterValue, Type $defaultType, ?Type $flagsType) : ?Type
    {
        if ($filterValue === $this->getConstant('FILTER_VALIDATE_BOOLEAN')) {
            if ($in->isBoolean()->yes()) {
                return $in;
            }
            if ($in->isNull()->yes()) {
                return $defaultType;
            }
        }
        if ($filterValue === $this->getConstant('FILTER_VALIDATE_FLOAT')) {
            if ($in->isFloat()->yes()) {
                return $in;
            }
            if ($in->isInteger()->yes()) {
                return $in->toFloat();
            }
            if ($in->isTrue()->yes()) {
                return new ConstantFloatType(1);
            }
            if ($in->isFalse()->yes() || $in->isNull()->yes()) {
                return $defaultType;
            }
        }
        if ($filterValue === $this->getConstant('FILTER_VALIDATE_INT')) {
            if ($in->isInteger()->yes()) {
                return $in;
            }
            if ($in->isTrue()->yes()) {
                return new ConstantIntegerType(1);
            }
            if ($in->isFalse()->yes() || $in->isNull()->yes()) {
                return $defaultType;
            }
            if ($in instanceof ConstantFloatType) {
                return $in->getValue() - (int) $in->getValue() <= PHP_FLOAT_EPSILON ? $in->toInteger() : $defaultType;
            }
            if ($in instanceof ConstantStringType) {
                $value = $in->getValue();
                $allowOctal = $this->hasFlag($this->getConstant('FILTER_FLAG_ALLOW_OCTAL'), $flagsType);
                $allowHex = $this->hasFlag($this->getConstant('FILTER_FLAG_ALLOW_HEX'), $flagsType);
                if ($allowOctal && preg_match('/\\A0[oO][0-7]+\\z/', $value) === 1) {
                    $octalValue = octdec($value);
                    return is_int($octalValue) ? new ConstantIntegerType($octalValue) : $defaultType;
                }
                if ($allowHex && preg_match('/\\A0[xX][0-9A-Fa-f]+\\z/', $value) === 1) {
                    $hexValue = hexdec($value);
                    return is_int($hexValue) ? new ConstantIntegerType($hexValue) : $defaultType;
                }
                return preg_match('/\\A[+-]?(?:0|[1-9][0-9]*)\\z/', $value) === 1 ? $in->toInteger() : $defaultType;
            }
        }
        if ($filterValue === $this->getConstant('FILTER_DEFAULT')) {
            if (!$this->canStringBeSanitized($filterValue, $flagsType) && $in->isString()->yes()) {
                return $in;
            }
            if ($in->isBoolean()->yes() || $in->isFloat()->yes() || $in->isInteger()->yes() || $in->isNull()->yes()) {
                return $in->toString();
            }
        }
        return null;
    }
    /** @param array<string, ?Type> $typeOptions */
    private function applyRangeOptions(Type $type, array $typeOptions, Type $defaultType) : Type
    {
        if (!$type->isInteger()->yes()) {
            return $type;
        }
        $range = [];
        if (isset($typeOptions['min_range'])) {
            if ($typeOptions['min_range'] instanceof ConstantScalarType) {
                $range['min'] = (int) $typeOptions['min_range']->getValue();
            } elseif ($typeOptions['min_range'] instanceof IntegerRangeType) {
                $range['min'] = $typeOptions['min_range']->getMin();
            } else {
                $range['min'] = null;
            }
        }
        if (isset($typeOptions['max_range'])) {
            if ($typeOptions['max_range'] instanceof ConstantScalarType) {
                $range['max'] = (int) $typeOptions['max_range']->getValue();
            } elseif ($typeOptions['max_range'] instanceof IntegerRangeType) {
                $range['max'] = $typeOptions['max_range']->getMax();
            } else {
                $range['max'] = null;
            }
        }
        if (array_key_exists('min', $range) || array_key_exists('max', $range)) {
            $min = $range['min'] ?? null;
            $max = $range['max'] ?? null;
            $rangeType = IntegerRangeType::fromInterval($min, $max);
            $rangeTypeIsSuperType = $rangeType->isSuperTypeOf($type);
            if ($rangeTypeIsSuperType->no()) {
                // e.g. if 9 is filtered with a range of int<17, 19>
                return $defaultType;
            }
            if ($rangeTypeIsSuperType->yes() && !$rangeType->equals($type)) {
                // e.g. if 18 or int<18, 19> are filtered with a range of int<17, 19>
                return $type;
            }
            // Open ranges on either side means that the input is potentially not part of the range
            return $min === null || $max === null ? TypeCombinator::union($rangeType, $defaultType) : $rangeType;
        }
        return $type;
    }
    private function hasOptions(Type $flagsType) : TrinaryLogic
    {
        return $flagsType->isArray()->and($flagsType->hasOffsetValueType(new ConstantStringType('options')));
    }
    /** @return array<string, ?Type> */
    private function getOptions(Type $flagsType, int $filterValue) : array
    {
        $options = [];
        $optionsType = $flagsType->getOffsetValueType(new ConstantStringType('options'));
        if (!$optionsType->isConstantArray()->yes()) {
            return $options;
        }
        $optionNames = array_merge(['default'], $this->getFilterTypeOptions()[$filterValue] ?? []);
        foreach ($optionNames as $optionName) {
            $optionaNameType = new ConstantStringType($optionName);
            if (!$optionsType->hasOffsetValueType($optionaNameType)->yes()) {
                $options[$optionName] = null;
                continue;
            }
            $options[$optionName] = $optionsType->getOffsetValueType($optionaNameType);
        }
        return $options;
    }
    private function hasFlag(int $flag, ?Type $flagsType) : bool
    {
        if ($flagsType === null) {
            return \false;
        }
        $type = $this->getFlagsValue($flagsType);
        return $type instanceof ConstantIntegerType && ($type->getValue() & $flag) === $flag;
    }
    private function getFlagsValue(Type $exprType) : Type
    {
        if (!$exprType->isConstantArray()->yes()) {
            return $exprType;
        }
        return $exprType->getOffsetValueType($this->flagsString);
    }
    private function canStringBeSanitized(int $filterValue, ?Type $flagsType) : bool
    {
        // If it is a validation filter, the string will not be changed
        if (($filterValue & self::VALIDATION_FILTER_BITMASK) !== 0) {
            return \false;
        }
        // FILTER_DEFAULT will not sanitize, unless it has FILTER_FLAG_STRIP_LOW,
        // FILTER_FLAG_STRIP_HIGH, or FILTER_FLAG_STRIP_BACKTICK
        if ($filterValue === $this->getConstant('FILTER_DEFAULT')) {
            return $this->hasFlag($this->getConstant('FILTER_FLAG_STRIP_LOW'), $flagsType) || $this->hasFlag($this->getConstant('FILTER_FLAG_STRIP_HIGH'), $flagsType) || $this->hasFlag($this->getConstant('FILTER_FLAG_STRIP_BACKTICK'), $flagsType);
        }
        return \true;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Name\FullyQualified;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Type\BitwiseFlagHelper;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\ConstantScalarType;
use PHPStan\Type\ConstantTypeHelper;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use stdClass;
use function is_bool;
use function json_decode;
class JsonThrowOnErrorDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /** @var array<string, int> */
    private $argumentPositions = ['json_encode' => 1, 'json_decode' => 3];
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Type\BitwiseFlagHelper
     */
    private $bitwiseFlagAnalyser;
    public function __construct(ReflectionProvider $reflectionProvider, BitwiseFlagHelper $bitwiseFlagAnalyser)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->bitwiseFlagAnalyser = $bitwiseFlagAnalyser;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        if ($functionReflection->getName() === 'json_decode') {
            return \true;
        }
        return $this->reflectionProvider->hasConstant(new FullyQualified('JSON_THROW_ON_ERROR'), null) && $functionReflection->getName() === 'json_encode';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $argumentPosition = $this->argumentPositions[$functionReflection->getName()];
        $defaultReturnType = ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        if ($functionReflection->getName() === 'json_decode') {
            $defaultReturnType = $this->narrowTypeForJsonDecode($functionCall, $scope, $defaultReturnType);
        }
        if (!isset($functionCall->getArgs()[$argumentPosition])) {
            return $defaultReturnType;
        }
        $optionsExpr = $functionCall->getArgs()[$argumentPosition]->value;
        if ($functionReflection->getName() === 'json_encode' && $this->bitwiseFlagAnalyser->bitwiseOrContainsConstant($optionsExpr, $scope, 'JSON_THROW_ON_ERROR')->yes()) {
            return TypeCombinator::remove($defaultReturnType, new ConstantBooleanType(\false));
        }
        return $defaultReturnType;
    }
    private function narrowTypeForJsonDecode(FuncCall $funcCall, Scope $scope, Type $fallbackType) : Type
    {
        $args = $funcCall->getArgs();
        $isArrayWithoutStdClass = $this->isForceArrayWithoutStdClass($funcCall, $scope);
        if (!isset($args[0])) {
            return $fallbackType;
        }
        $firstValueType = $scope->getType($args[0]->value);
        if ($firstValueType instanceof ConstantStringType) {
            return $this->resolveConstantStringType($firstValueType, $isArrayWithoutStdClass);
        }
        if ($isArrayWithoutStdClass) {
            return TypeCombinator::remove($fallbackType, new ObjectType(stdClass::class));
        }
        return $fallbackType;
    }
    /**
     * Is "json_decode(..., true)"?
     */
    private function isForceArrayWithoutStdClass(FuncCall $funcCall, Scope $scope) : bool
    {
        $args = $funcCall->getArgs();
        if (!isset($args[1])) {
            return \false;
        }
        $secondArgType = $scope->getType($args[1]->value);
        $secondArgValue = $secondArgType instanceof ConstantScalarType ? $secondArgType->getValue() : null;
        if (is_bool($secondArgValue)) {
            return $secondArgValue;
        }
        if ($secondArgValue !== null || !isset($args[3])) {
            return \false;
        }
        // depends on used constants, @see https://www.php.net/manual/en/json.constants.php#constant.json-object-as-array
        return $this->bitwiseFlagAnalyser->bitwiseOrContainsConstant($args[3]->value, $scope, 'JSON_OBJECT_AS_ARRAY')->yes();
    }
    private function resolveConstantStringType(ConstantStringType $constantStringType, bool $isForceArray) : Type
    {
        $decodedValue = json_decode($constantStringType->getValue(), $isForceArray);
        return ConstantTypeHelper::getTypeFromValue($decodedValue);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Analyser\SpecifiedTypes;
use PHPStan\Analyser\TypeSpecifier;
use PHPStan\Analyser\TypeSpecifierAwareExtension;
use PHPStan\Analyser\TypeSpecifierContext;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\FunctionTypeSpecifyingExtension;
class AssertFunctionTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
{
    /**
     * @var \PHPStan\Analyser\TypeSpecifier
     */
    private $typeSpecifier;
    public function isFunctionSupported(FunctionReflection $functionReflection, FuncCall $node, TypeSpecifierContext $context) : bool
    {
        return $functionReflection->getName() === 'assert' && isset($node->getArgs()[0]);
    }
    public function specifyTypes(FunctionReflection $functionReflection, FuncCall $node, Scope $scope, TypeSpecifierContext $context) : SpecifiedTypes
    {
        return $this->typeSpecifier->specifyTypesInCondition($scope, $node->getArgs()[0]->value, TypeSpecifierContext::createTruthy());
    }
    public function setTypeSpecifier(TypeSpecifier $typeSpecifier) : void
    {
        $this->typeSpecifier = $typeSpecifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\StaticCall;
use PhpParser\Node\Name;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Type\DynamicStaticMethodThrowTypeExtension;
use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use ReflectionFunction;
use function count;
class ReflectionFunctionConstructorThrowTypeExtension implements DynamicStaticMethodThrowTypeExtension
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(ReflectionProvider $reflectionProvider)
    {
        $this->reflectionProvider = $reflectionProvider;
    }
    public function isStaticMethodSupported(MethodReflection $methodReflection) : bool
    {
        return $methodReflection->getName() === '__construct' && $methodReflection->getDeclaringClass()->getName() === ReflectionFunction::class;
    }
    public function getThrowTypeFromStaticMethodCall(MethodReflection $methodReflection, StaticCall $methodCall, Scope $scope) : ?Type
    {
        if (count($methodCall->getArgs()) < 1) {
            return $methodReflection->getThrowType();
        }
        $valueType = $scope->getType($methodCall->getArgs()[0]->value);
        foreach ($valueType->getConstantStrings() as $constantString) {
            if (!$this->reflectionProvider->hasFunction(new Name($constantString->getValue()), $scope)) {
                return $methodReflection->getThrowType();
            }
            $valueType = TypeCombinator::remove($valueType, $constantString);
        }
        if (!$valueType instanceof NeverType) {
            return $methodReflection->getThrowType();
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\StaticCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicStaticMethodThrowTypeExtension;
use PHPStan\Type\Generic\GenericClassStringType;
use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypeUtils;
use ReflectionMethod;
use function count;
class ReflectionMethodConstructorThrowTypeExtension implements DynamicStaticMethodThrowTypeExtension
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(ReflectionProvider $reflectionProvider)
    {
        $this->reflectionProvider = $reflectionProvider;
    }
    public function isStaticMethodSupported(MethodReflection $methodReflection) : bool
    {
        return $methodReflection->getName() === '__construct' && $methodReflection->getDeclaringClass()->getName() === ReflectionMethod::class;
    }
    public function getThrowTypeFromStaticMethodCall(MethodReflection $methodReflection, StaticCall $methodCall, Scope $scope) : ?Type
    {
        if (count($methodCall->getArgs()) < 2) {
            return $methodReflection->getThrowType();
        }
        $valueType = $scope->getType($methodCall->getArgs()[0]->value);
        $propertyType = $scope->getType($methodCall->getArgs()[1]->value);
        foreach (TypeUtils::flattenTypes($valueType) as $type) {
            if ($type instanceof GenericClassStringType) {
                $classes = $type->getGenericType()->getObjectClassNames();
            } elseif ($type instanceof ConstantStringType && $this->reflectionProvider->hasClass($type->getValue())) {
                $classes = [$type->getValue()];
            } else {
                return $methodReflection->getThrowType();
            }
            foreach ($classes as $class) {
                $classReflection = $this->reflectionProvider->getClass($class);
                foreach ($propertyType->getConstantStrings() as $constantPropertyString) {
                    if (!$classReflection->hasMethod($constantPropertyString->getValue())) {
                        return $methodReflection->getThrowType();
                    }
                }
            }
            $valueType = TypeCombinator::remove($valueType, $type);
        }
        if (!$valueType instanceof NeverType) {
            return $methodReflection->getThrowType();
        }
        // Look for non constantStrings value.
        foreach ($propertyType->getConstantStrings() as $constantPropertyString) {
            $propertyType = TypeCombinator::remove($propertyType, $constantPropertyString);
        }
        if (!$propertyType instanceof NeverType) {
            return $methodReflection->getThrowType();
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\ClassStringType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\Type;
use function count;
use function ltrim;
class LtrimFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'ltrim';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        if (count($functionCall->getArgs()) !== 2) {
            return null;
        }
        $string = $scope->getType($functionCall->getArgs()[0]->value);
        $trimChars = $scope->getType($functionCall->getArgs()[1]->value);
        if ($trimChars instanceof ConstantStringType && $trimChars->getValue() === '\\' && $string->isClassStringType()->yes()) {
            if ($string instanceof ConstantStringType) {
                return new ConstantStringType(ltrim($string->getValue(), $trimChars->getValue()), \true);
            }
            return new ClassStringType();
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\Type;
use PHPStan\Type\UnionType;
use function array_map;
use function assert;
use function count;
use function in_array;
use function max;
use function min;
class RandomIntFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return in_array($functionReflection->getName(), ['random_int', 'rand', 'mt_rand'], \true);
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        if (in_array($functionReflection->getName(), ['rand', 'mt_rand'], \true) && count($functionCall->getArgs()) === 0) {
            return IntegerRangeType::fromInterval(0, null);
        }
        if (count($functionCall->getArgs()) < 2) {
            return ParametersAcceptorSelector::selectFromArgs($scope, $functionCall->getArgs(), $functionReflection->getVariants())->getReturnType();
        }
        $minType = $scope->getType($functionCall->getArgs()[0]->value)->toInteger();
        $maxType = $scope->getType($functionCall->getArgs()[1]->value)->toInteger();
        return $this->createRange($minType, $maxType);
    }
    private function createRange(Type $minType, Type $maxType) : Type
    {
        $minValues = array_map(static function (Type $type) : ?int {
            if ($type instanceof IntegerRangeType) {
                return $type->getMin();
            }
            if ($type instanceof ConstantIntegerType) {
                return $type->getValue();
            }
            return null;
        }, $minType instanceof UnionType ? $minType->getTypes() : [$minType]);
        $maxValues = array_map(static function (Type $type) : ?int {
            if ($type instanceof IntegerRangeType) {
                return $type->getMax();
            }
            if ($type instanceof ConstantIntegerType) {
                return $type->getValue();
            }
            return null;
        }, $maxType instanceof UnionType ? $maxType->getTypes() : [$maxType]);
        assert(count($minValues) > 0);
        assert(count($maxValues) > 0);
        return IntegerRangeType::fromInterval(in_array(null, $minValues, \true) ? null : min($minValues), in_array(null, $maxValues, \true) ? null : max($maxValues));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Arg;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Name\FullyQualified;
use PhpParser\Node\Scalar\String_;
use PHPStan\Analyser\Scope;
use PHPStan\Analyser\SpecifiedTypes;
use PHPStan\Analyser\TypeSpecifier;
use PHPStan\Analyser\TypeSpecifierAwareExtension;
use PHPStan\Analyser\TypeSpecifierContext;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\CallableType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\FunctionTypeSpecifyingExtension;
use function ltrim;
class FunctionExistsFunctionTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
{
    /**
     * @var \PHPStan\Analyser\TypeSpecifier
     */
    private $typeSpecifier;
    public function isFunctionSupported(FunctionReflection $functionReflection, FuncCall $node, TypeSpecifierContext $context) : bool
    {
        return $functionReflection->getName() === 'function_exists' && isset($node->getArgs()[0]) && $context->true();
    }
    public function specifyTypes(FunctionReflection $functionReflection, FuncCall $node, Scope $scope, TypeSpecifierContext $context) : SpecifiedTypes
    {
        $argType = $scope->getType($node->getArgs()[0]->value);
        if ($argType instanceof ConstantStringType) {
            return $this->typeSpecifier->create(new FuncCall(new FullyQualified('function_exists'), [new Arg(new String_(ltrim($argType->getValue(), '\\')))]), new ConstantBooleanType(\true), $context, \false, $scope);
        }
        return $this->typeSpecifier->create($node->getArgs()[0]->value, new CallableType(), $context, \false, $scope);
    }
    public function setTypeSpecifier(TypeSpecifier $typeSpecifier) : void
    {
        $this->typeSpecifier = $typeSpecifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Accessory\AccessoryNumericStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function array_key_exists;
use function count;
class IniGetReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'ini_get';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        $args = $functionCall->getArgs();
        if (count($args) < 1) {
            return null;
        }
        $numericString = TypeCombinator::intersect(new StringType(), new AccessoryNumericStringType());
        $types = ['date.timezone' => new StringType(), 'memory_limit' => new StringType(), 'max_execution_time' => $numericString, 'max_input_time' => $numericString, 'default_socket_timeout' => $numericString, 'precision' => $numericString];
        $argType = $scope->getType($args[0]->value);
        $results = [];
        foreach ($argType->getConstantStrings() as $constantString) {
            if (!array_key_exists($constantString->getValue(), $types)) {
                return null;
            }
            $results[] = $types[$constantString->getValue()];
        }
        if (count($results) > 0) {
            return TypeCombinator::union(...$results);
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function count;
class CurlInitReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'curl_init';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, Node\Expr\FuncCall $functionCall, Scope $scope) : Type
    {
        $argsCount = count($functionCall->getArgs());
        $returnType = ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        if ($argsCount === 0) {
            return TypeCombinator::remove($returnType, new ConstantBooleanType(\false));
        }
        return $returnType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function count;
use function in_array;
class ArrayPointerFunctionsDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /** @var string[] */
    private $functions = ['reset', 'end'];
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return in_array($functionReflection->getName(), $this->functions, \true);
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        if (count($functionCall->getArgs()) === 0) {
            return null;
        }
        $argType = $scope->getType($functionCall->getArgs()[0]->value);
        $iterableAtLeastOnce = $argType->isIterableAtLeastOnce();
        if ($iterableAtLeastOnce->no()) {
            return new ConstantBooleanType(\false);
        }
        $itemType = $functionReflection->getName() === 'reset' ? $argType->getFirstIterableValueType() : $argType->getLastIterableValueType();
        if ($iterableAtLeastOnce->yes()) {
            return $itemType;
        }
        return TypeCombinator::union($itemType, new ConstantBooleanType(\false));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Type\BooleanType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\DynamicMethodReturnTypeExtension;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\UnionType;
use SimpleXMLElement;
use function count;
class SimpleXMLElementAsXMLMethodReturnTypeExtension implements DynamicMethodReturnTypeExtension
{
    public function getClass() : string
    {
        return SimpleXMLElement::class;
    }
    public function isMethodSupported(MethodReflection $methodReflection) : bool
    {
        return $methodReflection->getName() === 'asXML';
    }
    public function getTypeFromMethodCall(MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope) : Type
    {
        if (count($methodCall->getArgs()) === 1) {
            return new BooleanType();
        }
        return new UnionType([new StringType(), new ConstantBooleanType(\false)]);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\BenevolentUnionType;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\FloatType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
use PHPStan\Type\UnionType;
class GettimeofdayDynamicFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'gettimeofday';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $arrayType = new ConstantArrayType([new ConstantStringType('sec'), new ConstantStringType('usec'), new ConstantStringType('minuteswest'), new ConstantStringType('dsttime')], [new IntegerType(), new IntegerType(), new IntegerType(), new IntegerType()]);
        $floatType = new FloatType();
        if (!isset($functionCall->getArgs()[0])) {
            return $arrayType;
        }
        $argType = $scope->getType($functionCall->getArgs()[0]->value);
        $isTrueType = (new ConstantBooleanType(\true))->isSuperTypeOf($argType);
        $isFalseType = (new ConstantBooleanType(\false))->isSuperTypeOf($argType);
        $compareTypes = $isTrueType->compareTo($isFalseType);
        if ($compareTypes === $isTrueType) {
            return $floatType;
        }
        if ($compareTypes === $isFalseType) {
            return $arrayType;
        }
        if ($argType instanceof MixedType) {
            return new BenevolentUnionType([$arrayType, $floatType]);
        }
        return new UnionType([$arrayType, $floatType]);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\ArrowFunction;
use PhpParser\Node\Expr\Closure;
use PhpParser\Node\Expr\ConstFetch;
use PhpParser\Node\Expr\Error;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\Variable;
use PhpParser\Node\Name;
use PhpParser\Node\Scalar\String_;
use PhpParser\Node\Stmt\Return_;
use PHPStan\Analyser\MutatingScope;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\ArrayType;
use PHPStan\Type\BenevolentUnionType;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\MixedType;
use PHPStan\Type\NeverType;
use PHPStan\Type\NullType;
use PHPStan\Type\StaticTypeFactory;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function array_map;
use function count;
use function is_string;
use function strtolower;
use function substr;
class ArrayFilterFunctionReturnTypeReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'array_filter';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $arrayArg = $functionCall->getArgs()[0]->value ?? null;
        $callbackArg = $functionCall->getArgs()[1]->value ?? null;
        $flagArg = $functionCall->getArgs()[2]->value ?? null;
        if ($arrayArg === null) {
            return new ArrayType(new MixedType(), new MixedType());
        }
        $arrayArgType = $scope->getType($arrayArg);
        $keyType = $arrayArgType->getIterableKeyType();
        $itemType = $arrayArgType->getIterableValueType();
        if ($itemType instanceof NeverType || $keyType instanceof NeverType) {
            return new ConstantArrayType([], []);
        }
        if ($arrayArgType instanceof MixedType) {
            return new BenevolentUnionType([new ArrayType(new MixedType(), new MixedType()), new NullType()]);
        }
        if ($callbackArg === null || $callbackArg instanceof ConstFetch && strtolower($callbackArg->name->parts[0]) === 'null') {
            return TypeCombinator::union(...array_map([$this, 'removeFalsey'], $arrayArgType->getArrays()));
        }
        if ($flagArg === null) {
            if ($callbackArg instanceof Closure && count($callbackArg->stmts) === 1 && count($callbackArg->params) > 0) {
                $statement = $callbackArg->stmts[0];
                if ($statement instanceof Return_ && $statement->expr !== null) {
                    return $this->filterByTruthyValue($scope, $callbackArg->params[0]->var, $arrayArgType, null, $statement->expr);
                }
            } elseif ($callbackArg instanceof ArrowFunction && count($callbackArg->params) > 0) {
                return $this->filterByTruthyValue($scope, $callbackArg->params[0]->var, $arrayArgType, null, $callbackArg->expr);
            } elseif ($callbackArg instanceof String_) {
                $itemVar = new Variable('item');
                $expr = new FuncCall(self::createFunctionName($callbackArg->value), [new Arg($itemVar)]);
                return $this->filterByTruthyValue($scope, $itemVar, $arrayArgType, null, $expr);
            }
        }
        if ($flagArg instanceof ConstFetch && $flagArg->name->parts[0] === 'ARRAY_FILTER_USE_KEY') {
            if ($callbackArg instanceof Closure && count($callbackArg->stmts) === 1 && count($callbackArg->params) > 0) {
                $statement = $callbackArg->stmts[0];
                if ($statement instanceof Return_ && $statement->expr !== null) {
                    return $this->filterByTruthyValue($scope, null, $arrayArgType, $callbackArg->params[0]->var, $statement->expr);
                }
            } elseif ($callbackArg instanceof ArrowFunction && count($callbackArg->params) > 0) {
                return $this->filterByTruthyValue($scope, null, $arrayArgType, $callbackArg->params[0]->var, $callbackArg->expr);
            } elseif ($callbackArg instanceof String_) {
                $keyVar = new Variable('key');
                $expr = new FuncCall(self::createFunctionName($callbackArg->value), [new Arg($keyVar)]);
                return $this->filterByTruthyValue($scope, null, $arrayArgType, $keyVar, $expr);
            }
        }
        if ($flagArg instanceof ConstFetch && $flagArg->name->parts[0] === 'ARRAY_FILTER_USE_BOTH') {
            if ($callbackArg instanceof Closure && count($callbackArg->stmts) === 1 && count($callbackArg->params) > 0) {
                $statement = $callbackArg->stmts[0];
                if ($statement instanceof Return_ && $statement->expr !== null) {
                    return $this->filterByTruthyValue($scope, $callbackArg->params[0]->var, $arrayArgType, $callbackArg->params[1]->var ?? null, $statement->expr);
                }
            } elseif ($callbackArg instanceof ArrowFunction && count($callbackArg->params) > 0) {
                return $this->filterByTruthyValue($scope, $callbackArg->params[0]->var, $arrayArgType, $callbackArg->params[1]->var ?? null, $callbackArg->expr);
            } elseif ($callbackArg instanceof String_) {
                $itemVar = new Variable('item');
                $keyVar = new Variable('key');
                $expr = new FuncCall(self::createFunctionName($callbackArg->value), [new Arg($itemVar), new Arg($keyVar)]);
                return $this->filterByTruthyValue($scope, $itemVar, $arrayArgType, $keyVar, $expr);
            }
        }
        return new ArrayType($keyType, $itemType);
    }
    public function removeFalsey(Type $type) : Type
    {
        $falseyTypes = StaticTypeFactory::falsey();
        if (count($type->getConstantArrays()) > 0) {
            $result = [];
            foreach ($type->getConstantArrays() as $constantArray) {
                $keys = $constantArray->getKeyTypes();
                $values = $constantArray->getValueTypes();
                $builder = ConstantArrayTypeBuilder::createEmpty();
                foreach ($values as $offset => $value) {
                    $isFalsey = $falseyTypes->isSuperTypeOf($value);
                    if ($isFalsey->maybe()) {
                        $builder->setOffsetValueType($keys[$offset], TypeCombinator::remove($value, $falseyTypes), \true);
                    } elseif ($isFalsey->no()) {
                        $builder->setOffsetValueType($keys[$offset], $value, $constantArray->isOptionalKey($offset));
                    }
                }
                $result[] = $builder->getArray();
            }
            return TypeCombinator::union(...$result);
        }
        $keyType = $type->getIterableKeyType();
        $valueType = $type->getIterableValueType();
        $valueType = TypeCombinator::remove($valueType, $falseyTypes);
        if ($valueType instanceof NeverType) {
            return new ConstantArrayType([], []);
        }
        return new ArrayType($keyType, $valueType);
    }
    /**
     * @param \PhpParser\Node\Expr\Error|\PhpParser\Node\Expr\Variable|null $itemVar
     * @param \PhpParser\Node\Expr\Error|\PhpParser\Node\Expr\Variable|null $keyVar
     */
    private function filterByTruthyValue(Scope $scope, $itemVar, Type $arrayType, $keyVar, Expr $expr) : Type
    {
        if (!$scope instanceof MutatingScope) {
            throw new ShouldNotHappenException();
        }
        $constantArrays = $arrayType->getConstantArrays();
        if (count($constantArrays) > 0) {
            $results = [];
            foreach ($constantArrays as $constantArray) {
                $builder = ConstantArrayTypeBuilder::createEmpty();
                foreach ($constantArray->getKeyTypes() as $i => $keyType) {
                    $itemType = $constantArray->getValueTypes()[$i];
                    [$newKeyType, $newItemType, $optional] = $this->processKeyAndItemType($scope, $keyType, $itemType, $itemVar, $keyVar, $expr);
                    if ($newKeyType instanceof NeverType || $newItemType instanceof NeverType) {
                        continue;
                    }
                    if ($itemType->equals($newItemType) && $keyType->equals($newKeyType)) {
                        $builder->setOffsetValueType($keyType, $itemType, $optional);
                        continue;
                    }
                    $builder->setOffsetValueType($newKeyType, $newItemType, \true);
                }
                $results[] = $builder->getArray();
            }
            return TypeCombinator::union(...$results);
        }
        [$newKeyType, $newItemType] = $this->processKeyAndItemType($scope, $arrayType->getIterableKeyType(), $arrayType->getIterableValueType(), $itemVar, $keyVar, $expr);
        if ($newItemType instanceof NeverType || $newKeyType instanceof NeverType) {
            return new ConstantArrayType([], []);
        }
        return new ArrayType($newKeyType, $newItemType);
    }
    /**
     * @return array{Type, Type, bool}
     * @param \PhpParser\Node\Expr\Error|\PhpParser\Node\Expr\Variable|null $itemVar
     * @param \PhpParser\Node\Expr\Error|\PhpParser\Node\Expr\Variable|null $keyVar
     */
    private function processKeyAndItemType(MutatingScope $scope, Type $keyType, Type $itemType, $itemVar, $keyVar, Expr $expr) : array
    {
        $itemVarName = null;
        if ($itemVar !== null) {
            if (!$itemVar instanceof Variable || !is_string($itemVar->name)) {
                throw new ShouldNotHappenException();
            }
            $itemVarName = $itemVar->name;
            $scope = $scope->assignVariable($itemVarName, $itemType, new MixedType());
        }
        $keyVarName = null;
        if ($keyVar !== null) {
            if (!$keyVar instanceof Variable || !is_string($keyVar->name)) {
                throw new ShouldNotHappenException();
            }
            $keyVarName = $keyVar->name;
            $scope = $scope->assignVariable($keyVarName, $keyType, new MixedType());
        }
        $booleanResult = $scope->getType($expr)->toBoolean();
        if ($booleanResult->isFalse()->yes()) {
            return [new NeverType(), new NeverType(), \false];
        }
        $scope = $scope->filterByTruthyValue($expr);
        return [$keyVarName !== null ? $scope->getVariableType($keyVarName) : $keyType, $itemVarName !== null ? $scope->getVariableType($itemVarName) : $itemType, !$booleanResult instanceof ConstantBooleanType];
    }
    private static function createFunctionName(string $funcName) : Name
    {
        if ($funcName[0] === '\\') {
            return new Name\FullyQualified(substr($funcName, 1));
        }
        return new Name($funcName);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\StaticCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Type\ClassStringType;
use PHPStan\Type\DynamicStaticMethodThrowTypeExtension;
use PHPStan\Type\ObjectWithoutClassType;
use PHPStan\Type\Type;
use PHPStan\Type\UnionType;
use ReflectionClass;
use function count;
class ReflectionClassConstructorThrowTypeExtension implements DynamicStaticMethodThrowTypeExtension
{
    public function isStaticMethodSupported(MethodReflection $methodReflection) : bool
    {
        return $methodReflection->getName() === '__construct' && $methodReflection->getDeclaringClass()->getName() === ReflectionClass::class;
    }
    public function getThrowTypeFromStaticMethodCall(MethodReflection $methodReflection, StaticCall $methodCall, Scope $scope) : ?Type
    {
        if (count($methodCall->getArgs()) < 1) {
            return $methodReflection->getThrowType();
        }
        $valueType = $scope->getType($methodCall->getArgs()[0]->value);
        $classOrString = new UnionType([new ClassStringType(), new ObjectWithoutClassType()]);
        if ($classOrString->isSuperTypeOf($valueType)->yes()) {
            return null;
        }
        return $methodReflection->getThrowType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\BenevolentUnionType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\MixedType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\UnionType;
class Base64DecodeDynamicFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'base64_decode';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        if (!isset($functionCall->getArgs()[1])) {
            return new StringType();
        }
        $argType = $scope->getType($functionCall->getArgs()[1]->value);
        if ($argType instanceof MixedType) {
            return new BenevolentUnionType([new StringType(), new ConstantBooleanType(\false)]);
        }
        $isTrueType = (new ConstantBooleanType(\true))->isSuperTypeOf($argType);
        $isFalseType = (new ConstantBooleanType(\false))->isSuperTypeOf($argType);
        $compareTypes = $isTrueType->compareTo($isFalseType);
        if ($compareTypes === $isTrueType) {
            return new UnionType([new StringType(), new ConstantBooleanType(\false)]);
        }
        if ($compareTypes === $isFalseType) {
            return new StringType();
        }
        // second argument could be interpreted as true
        if (!$isTrueType->no()) {
            return new UnionType([new StringType(), new ConstantBooleanType(\false)]);
        }
        return new StringType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Analyser\SpecifiedTypes;
use PHPStan\Analyser\TypeSpecifier;
use PHPStan\Analyser\TypeSpecifierAwareExtension;
use PHPStan\Analyser\TypeSpecifierContext;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\FunctionTypeSpecifyingExtension;
use PHPStan\Type\IterableType;
use PHPStan\Type\MixedType;
use function strtolower;
class IsIterableFunctionTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
{
    /**
     * @var \PHPStan\Analyser\TypeSpecifier
     */
    private $typeSpecifier;
    public function isFunctionSupported(FunctionReflection $functionReflection, FuncCall $node, TypeSpecifierContext $context) : bool
    {
        return strtolower($functionReflection->getName()) === 'is_iterable' && !$context->null();
    }
    public function specifyTypes(FunctionReflection $functionReflection, FuncCall $node, Scope $scope, TypeSpecifierContext $context) : SpecifiedTypes
    {
        if ($context->null()) {
            throw new ShouldNotHappenException();
        }
        if (!isset($node->getArgs()[0])) {
            return new SpecifiedTypes();
        }
        return $this->typeSpecifier->create($node->getArgs()[0]->value, new IterableType(new MixedType(), new MixedType()), $context, \false, $scope);
    }
    public function setTypeSpecifier(TypeSpecifier $typeSpecifier) : void
    {
        $this->typeSpecifier = $typeSpecifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Accessory\AccessoryLiteralStringType;
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
use PHPStan\Type\Accessory\AccessoryNonFalsyStringType;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\ConstantScalarType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function count;
use function implode;
use function in_array;
class ImplodeFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return in_array($functionReflection->getName(), ['implode', 'join'], \true);
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $args = $functionCall->getArgs();
        if (count($args) === 1) {
            $argType = $scope->getType($args[0]->value);
            if ($argType->isArray()->yes()) {
                return $this->implode($argType, new ConstantStringType(''));
            }
        }
        if (count($args) !== 2) {
            return new StringType();
        }
        $separatorType = $scope->getType($args[0]->value);
        $arrayType = $scope->getType($args[1]->value);
        return $this->implode($arrayType, $separatorType);
    }
    private function implode(Type $arrayType, Type $separatorType) : Type
    {
        if (count($arrayType->getConstantArrays()) > 0 && count($separatorType->getConstantStrings()) > 0) {
            $result = [];
            foreach ($separatorType->getConstantStrings() as $separator) {
                foreach ($arrayType->getConstantArrays() as $constantArray) {
                    $constantType = $this->inferConstantType($constantArray, $separator);
                    if ($constantType !== null) {
                        $result[] = $constantType;
                        continue;
                    }
                    $result = [];
                    break 2;
                }
            }
            if (count($result) > 0) {
                return TypeCombinator::union(...$result);
            }
        }
        $accessoryTypes = [];
        if ($arrayType->isIterableAtLeastOnce()->yes()) {
            if ($arrayType->getIterableValueType()->isNonFalsyString()->yes() || $separatorType->isNonFalsyString()->yes()) {
                $accessoryTypes[] = new AccessoryNonFalsyStringType();
            } elseif ($arrayType->getIterableValueType()->isNonEmptyString()->yes() || $separatorType->isNonEmptyString()->yes()) {
                $accessoryTypes[] = new AccessoryNonEmptyStringType();
            }
        }
        // implode is one of the four functions that can produce literal strings as blessed by the original RFC: wiki.php.net/rfc/is_literal
        if ($arrayType->getIterableValueType()->isLiteralString()->yes() && $separatorType->isLiteralString()->yes()) {
            $accessoryTypes[] = new AccessoryLiteralStringType();
        }
        if (count($accessoryTypes) > 0) {
            $accessoryTypes[] = new StringType();
            return new IntersectionType($accessoryTypes);
        }
        return new StringType();
    }
    private function inferConstantType(ConstantArrayType $arrayType, ConstantStringType $separatorType) : ?Type
    {
        $strings = [];
        foreach ($arrayType->getAllArrays() as $array) {
            $valueTypes = $array->getValueTypes();
            $arrayValues = [];
            foreach ($valueTypes as $valueType) {
                if (!$valueType instanceof ConstantScalarType) {
                    return null;
                }
                $arrayValues[] = $valueType->getValue();
            }
            $strings[] = new ConstantStringType(implode($separatorType->getValue(), $arrayValues));
        }
        return TypeCombinator::union(...$strings);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\Variable;
use PHPStan\Analyser\Scope;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\ErrorType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\MixedType;
use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\UnionType;
use function count;
class ArrayCombineFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'array_combine';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        if (count($functionCall->getArgs()) < 2) {
            return null;
        }
        $firstArg = $functionCall->getArgs()[0]->value;
        $secondArg = $functionCall->getArgs()[1]->value;
        $keysParamType = $scope->getType($firstArg);
        $valuesParamType = $scope->getType($secondArg);
        if ($keysParamType instanceof ConstantArrayType && $valuesParamType instanceof ConstantArrayType) {
            $keyTypes = $keysParamType->getValueTypes();
            $valueTypes = $valuesParamType->getValueTypes();
            if (count($keyTypes) !== count($valueTypes)) {
                if ($this->phpVersion->throwsTypeErrorForInternalFunctions()) {
                    return new NeverType();
                }
                return new ConstantBooleanType(\false);
            }
            $keyTypes = $this->sanitizeConstantArrayKeyTypes($keyTypes);
            if ($keyTypes !== null) {
                return new ConstantArrayType($keyTypes, $valueTypes, $keysParamType->getNextAutoIndexes());
            }
        }
        if ($keysParamType->isArray()->yes()) {
            $itemType = $keysParamType->getIterableValueType();
            if ((new IntegerType())->isSuperTypeOf($itemType)->no()) {
                if ($itemType->toString() instanceof ErrorType) {
                    return new NeverType();
                }
                $keyType = $itemType->toString();
            } else {
                $keyType = $itemType;
            }
        } else {
            $keyType = new MixedType();
        }
        $arrayType = new ArrayType($keyType, $valuesParamType->isArray()->yes() ? $valuesParamType->getIterableValueType() : new MixedType());
        if ($keysParamType->isIterableAtLeastOnce()->yes() && $valuesParamType->isIterableAtLeastOnce()->yes()) {
            $arrayType = TypeCombinator::intersect($arrayType, new NonEmptyArrayType());
        }
        if ($this->phpVersion->throwsTypeErrorForInternalFunctions()) {
            return $arrayType;
        }
        if ($firstArg instanceof Variable && $secondArg instanceof Variable && $firstArg->name === $secondArg->name) {
            return $arrayType;
        }
        return new UnionType([$arrayType, new ConstantBooleanType(\false)]);
    }
    /**
     * @param array<int, Type> $types
     *
     * @return array<int, ConstantIntegerType|ConstantStringType>|null
     */
    private function sanitizeConstantArrayKeyTypes(array $types) : ?array
    {
        $sanitizedTypes = [];
        foreach ($types as $type) {
            if ((new IntegerType())->isSuperTypeOf($type)->no() && !$type->toString() instanceof ErrorType) {
                $type = $type->toString();
            }
            if (!$type instanceof ConstantIntegerType && !$type instanceof ConstantStringType) {
                return null;
            }
            $sanitizedTypes[] = $type;
        }
        return $sanitizedTypes;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Analyser\SpecifiedTypes;
use PHPStan\Analyser\TypeSpecifier;
use PHPStan\Analyser\TypeSpecifierAwareExtension;
use PHPStan\Analyser\TypeSpecifierContext;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\FunctionTypeSpecifyingExtension;
use PHPStan\Type\MixedType;
use PHPStan\Type\TypeCombinator;
use function strtolower;
class ArraySearchFunctionTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
{
    /**
     * @var \PHPStan\Analyser\TypeSpecifier
     */
    private $typeSpecifier;
    public function isFunctionSupported(FunctionReflection $functionReflection, FuncCall $node, TypeSpecifierContext $context) : bool
    {
        return strtolower($functionReflection->getName()) === 'array_search' && $context->true();
    }
    public function specifyTypes(FunctionReflection $functionReflection, FuncCall $node, Scope $scope, TypeSpecifierContext $context) : SpecifiedTypes
    {
        $arrayArg = $node->getArgs()[1]->value ?? null;
        if ($arrayArg === null) {
            return new SpecifiedTypes();
        }
        return $this->typeSpecifier->create($arrayArg, TypeCombinator::intersect(new ArrayType(new MixedType(), new MixedType()), new NonEmptyArrayType()), $context, \false, $scope);
    }
    public function setTypeSpecifier(TypeSpecifier $typeSpecifier) : void
    {
        $this->typeSpecifier = $typeSpecifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use DateTime;
use DateTimeImmutable;
use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function count;
use function in_array;
class DateTimeDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return in_array($functionReflection->getName(), ['date_create_from_format', 'date_create_immutable_from_format'], \true);
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        if (count($functionCall->getArgs()) < 2) {
            return null;
        }
        $formats = $scope->getType($functionCall->getArgs()[0]->value)->getConstantStrings();
        $datetimes = $scope->getType($functionCall->getArgs()[1]->value)->getConstantStrings();
        if (count($formats) === 0 || count($datetimes) === 0) {
            return null;
        }
        $types = [];
        $className = $functionReflection->getName() === 'date_create_from_format' ? DateTime::class : DateTimeImmutable::class;
        foreach ($formats as $formatConstantString) {
            foreach ($datetimes as $datetimeConstantString) {
                $isValid = DateTime::createFromFormat($formatConstantString->getValue(), $datetimeConstantString->getValue()) !== \false;
                $types[] = $isValid ? new ObjectType($className) : new ConstantBooleanType(\false);
            }
        }
        return TypeCombinator::union(...$types);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
use PHPStan\Type\Accessory\AccessoryNonFalsyStringType;
use PHPStan\Type\Accessory\AccessoryNumericStringType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypeUtils;
use function array_map;
use function count;
use function in_array;
use function is_callable;
use function mb_check_encoding;
class StrCaseFunctionsReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /**
     * [funtion name => minimun arity]
     */
    private const FUNCTIONS = ['strtoupper' => 1, 'strtolower' => 1, 'mb_strtoupper' => 1, 'mb_strtolower' => 1, 'lcfirst' => 1, 'ucfirst' => 1, 'ucwords' => 1, 'mb_convert_case' => 2, 'mb_convert_kana' => 1];
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return isset(self::FUNCTIONS[$functionReflection->getName()]);
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $fnName = $functionReflection->getName();
        $args = $functionCall->getArgs();
        if (count($args) < self::FUNCTIONS[$fnName]) {
            return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        }
        $argType = $scope->getType($args[0]->value);
        if (!is_callable($fnName)) {
            return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        }
        $modes = [];
        if ($fnName === 'mb_convert_case') {
            $modeType = $scope->getType($args[1]->value);
            $modes = array_map(static function ($mode) {
                return $mode->getValue();
            }, TypeUtils::getConstantIntegers($modeType));
        } elseif (in_array($fnName, ['ucwords', 'mb_convert_kana'], \true)) {
            if (count($args) >= 2) {
                $modeType = $scope->getType($args[1]->value);
                $modes = array_map(static function ($mode) {
                    return $mode->getValue();
                }, $modeType->getConstantStrings());
            } else {
                $modes = $fnName === 'mb_convert_kana' ? ['KV'] : [" \t\r\n\f\v"];
            }
        }
        $constantStrings = array_map(static function ($type) {
            return $type->getValue();
        }, $argType->getConstantStrings());
        if (count($constantStrings) > 0 && mb_check_encoding($constantStrings, 'UTF-8')) {
            $strings = [];
            $parameters = [];
            if (in_array($fnName, ['ucwords', 'mb_convert_case', 'mb_convert_kana'], \true)) {
                foreach ($modes as $mode) {
                    foreach ($constantStrings as $constantString) {
                        $parameters[] = [$constantString, $mode];
                    }
                }
            } else {
                $parameters = array_map(static function ($s) {
                    return [$s];
                }, $constantStrings);
            }
            foreach ($parameters as $parameter) {
                $strings[] = $fnName(...$parameter);
            }
            if (count($strings) !== 0 && mb_check_encoding($strings, 'UTF-8')) {
                return TypeCombinator::union(...array_map(static function ($s) {
                    return new ConstantStringType($s);
                }, $strings));
            }
        }
        if ($argType->isNumericString()->yes()) {
            return new IntersectionType([new StringType(), new AccessoryNumericStringType()]);
        }
        if ($argType->isNonFalsyString()->yes()) {
            return new IntersectionType([new StringType(), new AccessoryNonFalsyStringType()]);
        }
        if ($argType->isNonEmptyString()->yes()) {
            return new IntersectionType([new StringType(), new AccessoryNonEmptyStringType()]);
        }
        return new StringType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\NeverType;
use PHPStan\Type\NullType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function array_slice;
use function count;
class ArrayIntersectKeyFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'array_intersect_key';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $args = $functionCall->getArgs();
        if (count($args) === 0) {
            return ParametersAcceptorSelector::selectFromArgs($scope, $args, $functionReflection->getVariants())->getReturnType();
        }
        $argTypes = [];
        foreach ($args as $arg) {
            $argType = $scope->getType($arg->value);
            if ($arg->unpack) {
                $argTypes[] = $argType->getIterableValueType();
                continue;
            }
            $argTypes[] = $argType;
        }
        $firstArrayType = $argTypes[0];
        $otherArraysType = TypeCombinator::union(...array_slice($argTypes, 1));
        $onlyOneArrayGiven = count($argTypes) === 1;
        if ($firstArrayType->isArray()->no() || !$onlyOneArrayGiven && $otherArraysType->isArray()->no()) {
            return $this->phpVersion->arrayFunctionsReturnNullWithNonArray() ? new NullType() : new NeverType();
        }
        if ($onlyOneArrayGiven) {
            return $firstArrayType;
        }
        return $firstArrayType->intersectKeyArray($otherArraysType);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PHPStan\ShouldNotHappenException;
use function array_filter;
use function array_map;
use function array_merge;
use function function_exists;
use function in_array;
use function is_null;
use function mb_encoding_aliases;
use function mb_list_encodings;
use function strtoupper;
trait MbFunctionsReturnTypeExtensionTrait
{
    /** @var string[]|null */
    private $supportedEncodings;
    private function isSupportedEncoding(string $encoding) : bool
    {
        return in_array(strtoupper($encoding), $this->getSupportedEncodings(), \true);
    }
    /** @return string[] */
    private function getSupportedEncodings() : array
    {
        if (!is_null($this->supportedEncodings)) {
            return $this->supportedEncodings;
        }
        $supportedEncodings = [];
        if (function_exists('mb_list_encodings')) {
            foreach (mb_list_encodings() as $encoding) {
                $aliases = @mb_encoding_aliases($encoding);
                if ($aliases === \false) {
                    throw new ShouldNotHappenException();
                }
                $supportedEncodings = array_merge($supportedEncodings, $aliases, [$encoding]);
            }
        }
        $this->supportedEncodings = array_map('strtoupper', $supportedEncodings);
        // PHP 7.3 and 7.4 claims 'pass' and its alias 'none' to be supported, but actually 'pass' was removed in 7.3
        if (!$this->phpVersion->supportsPassNoneEncodings()) {
            $this->supportedEncodings = array_filter($this->supportedEncodings, static function (string $enc) {
                return !in_array($enc, ['PASS', 'NONE'], \true);
            });
        }
        return $this->supportedEncodings;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\NeverType;
use PHPStan\Type\NullType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function count;
final class ArraySearchFunctionDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'array_search';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        $argsCount = count($functionCall->getArgs());
        if ($argsCount < 2) {
            return null;
        }
        $haystackArgType = $scope->getType($functionCall->getArgs()[1]->value);
        if ($haystackArgType->isArray()->no()) {
            return $this->phpVersion->arrayFunctionsReturnNullWithNonArray() ? new NullType() : new NeverType();
        }
        if ($argsCount < 3) {
            return TypeCombinator::union($haystackArgType->getIterableKeyType(), new ConstantBooleanType(\false));
        }
        $strictArgType = $scope->getType($functionCall->getArgs()[2]->value);
        if (!$strictArgType instanceof ConstantBooleanType || $strictArgType->getValue() === \false) {
            return TypeCombinator::union($haystackArgType->getIterableKeyType(), new ConstantBooleanType(\false));
        }
        $needleArgType = $scope->getType($functionCall->getArgs()[0]->value);
        if ($haystackArgType->getIterableValueType()->isSuperTypeOf($needleArgType)->no()) {
            return new ConstantBooleanType(\false);
        }
        return $haystackArgType->searchArray($needleArgType);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function count;
class ArraySliceFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'array_slice';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        if (count($functionCall->getArgs()) < 1) {
            return null;
        }
        $valueType = $scope->getType($functionCall->getArgs()[0]->value);
        if (!$valueType->isArray()->yes()) {
            return null;
        }
        $offsetType = isset($functionCall->getArgs()[1]) ? $scope->getType($functionCall->getArgs()[1]->value) : null;
        $offset = $offsetType instanceof ConstantIntegerType ? $offsetType->getValue() : 0;
        $constantArrays = $valueType->getConstantArrays();
        if (count($constantArrays) > 0) {
            $limitType = isset($functionCall->getArgs()[2]) ? $scope->getType($functionCall->getArgs()[2]->value) : null;
            $limit = $limitType instanceof ConstantIntegerType ? $limitType->getValue() : null;
            $preserveKeysType = isset($functionCall->getArgs()[3]) ? $scope->getType($functionCall->getArgs()[3]->value) : null;
            $preserveKeys = $preserveKeysType !== null && $preserveKeysType->isTrue()->yes();
            $results = [];
            foreach ($constantArrays as $constantArray) {
                $results[] = $constantArray->slice($offset, $limit, $preserveKeys);
            }
            return TypeCombinator::union(...$results);
        }
        if ($valueType->isIterableAtLeastOnce()->yes()) {
            return $valueType->toArray();
        }
        return $valueType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\BooleanType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\FloatType;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function array_map;
use function array_merge;
use function array_unique;
use function count;
use function in_array;
use function max;
use function mb_internal_encoding;
use function mb_strlen;
use function min;
use function range;
use function sort;
use function sprintf;
use function var_export;
class MbStrlenFunctionReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    private const UNSUPPORTED_ENCODING = 'unsupported';
    use \PHPStan\Type\Php\MbFunctionsReturnTypeExtensionTrait;
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return $functionReflection->getName() === 'mb_strlen';
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $args = $functionCall->getArgs();
        $returnType = ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        if (count($args) === 0) {
            return $returnType;
        }
        $encodings = [];
        if (count($functionCall->getArgs()) === 1) {
            // there is a chance to get an unsupported encoding 'pass' or 'none' here on PHP 7.3-7.4
            $encodings = [mb_internal_encoding()];
        } elseif (count($functionCall->getArgs()) === 2) {
            // custom encoding is specified
            $encodings = array_map(static function (ConstantStringType $t) {
                return $t->getValue();
            }, $scope->getType($functionCall->getArgs()[1]->value)->getConstantStrings());
        }
        if (count($encodings) > 0) {
            for ($i = 0; $i < count($encodings); $i++) {
                if ($this->isSupportedEncoding($encodings[$i])) {
                    continue;
                }
                $encodings[$i] = self::UNSUPPORTED_ENCODING;
            }
            $encodings = array_unique($encodings);
            if (in_array(self::UNSUPPORTED_ENCODING, $encodings, \true) && count($encodings) === 1) {
                if ($this->phpVersion->throwsOnInvalidMbStringEncoding()) {
                    return new NeverType();
                }
                return new ConstantBooleanType(\false);
            }
        } else {
            // if there aren't encoding constants, use all available encodings
            $encodings = array_merge($this->getSupportedEncodings(), [self::UNSUPPORTED_ENCODING]);
        }
        $argType = $scope->getType($args[0]->value);
        if ($argType->isSuperTypeOf(new BooleanType())->yes()) {
            $constantScalars = TypeCombinator::remove($argType, new BooleanType())->getConstantScalarTypes();
            if (count($constantScalars) > 0) {
                $constantScalars[] = new ConstantBooleanType(\true);
                $constantScalars[] = new ConstantBooleanType(\false);
            }
        } else {
            $constantScalars = $argType->getConstantScalarTypes();
        }
        $lengths = [];
        foreach ($constantScalars as $constantScalar) {
            $stringScalar = $constantScalar->toString();
            if (!$stringScalar instanceof ConstantStringType) {
                $lengths = [];
                break;
            }
            foreach ($encodings as $encoding) {
                if (!$this->isSupportedEncoding($encoding)) {
                    continue;
                }
                $length = @mb_strlen($stringScalar->getValue(), $encoding);
                if ($length === \false) {
                    throw new ShouldNotHappenException(sprintf('Got false on a supported encoding %s and value %s', $encoding, var_export($stringScalar->getValue(), \true)));
                }
                $lengths[] = $length;
            }
        }
        $isNonEmpty = $argType->isNonEmptyString();
        $numeric = TypeCombinator::union(new IntegerType(), new FloatType());
        if (count($lengths) > 0) {
            $lengths = array_unique($lengths);
            sort($lengths);
            if ($lengths === range(min($lengths), max($lengths))) {
                $range = IntegerRangeType::fromInterval(min($lengths), max($lengths));
            } else {
                $range = TypeCombinator::union(...array_map(static function ($l) {
                    return new ConstantIntegerType($l);
                }, $lengths));
            }
        } elseif ((new BooleanType())->isSuperTypeOf($argType)->yes()) {
            $range = IntegerRangeType::fromInterval(0, 1);
        } elseif ($isNonEmpty->yes() || $numeric->isSuperTypeOf($argType)->yes() || TypeCombinator::remove($argType, $numeric)->isNonEmptyString()->yes()) {
            $range = IntegerRangeType::fromInterval(1, null);
        } elseif ($argType->isString()->yes() && $isNonEmpty->no()) {
            $range = new ConstantIntegerType(0);
        } else {
            $range = TypeCombinator::remove(ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType(), new ConstantBooleanType(\false));
        }
        if (!$this->phpVersion->throwsOnInvalidMbStringEncoding() && in_array(self::UNSUPPORTED_ENCODING, $encodings, \true)) {
            return TypeCombinator::union($range, new ConstantBooleanType(\false));
        }
        return $range;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
use PHPStan\Type\Accessory\AccessoryNonFalsyStringType;
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\FloatType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function count;
use function in_array;
use function preg_match_all;
class SscanfFunctionDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        return in_array($functionReflection->getName(), ['sscanf', 'fscanf'], \true);
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : ?Type
    {
        $args = $functionCall->getArgs();
        if (count($args) !== 2) {
            return null;
        }
        $formatType = $scope->getType($args[1]->value);
        if (!$formatType instanceof ConstantStringType) {
            return null;
        }
        if (preg_match_all('/%(\\d*)(\\[[^\\]]+\\]|[cdeEfosux]{1})/', $formatType->getValue(), $matches) > 0) {
            $arrayBuilder = ConstantArrayTypeBuilder::createEmpty();
            for ($i = 0; $i < count($matches[0]); $i++) {
                $length = $matches[1][$i];
                $specifier = $matches[2][$i];
                $type = new StringType();
                if ($length !== '') {
                    if ((int) $length > 1) {
                        $type = new IntersectionType([$type, new AccessoryNonFalsyStringType()]);
                    } else {
                        $type = new IntersectionType([$type, new AccessoryNonEmptyStringType()]);
                    }
                }
                if (in_array($specifier, ['d', 'o', 'u', 'x'], \true)) {
                    $type = new IntegerType();
                }
                if (in_array($specifier, ['e', 'E', 'f'], \true)) {
                    $type = new FloatType();
                }
                $type = TypeCombinator::addNull($type);
                $arrayBuilder->setOffsetValueType(new ConstantIntegerType($i), $type);
            }
            return TypeCombinator::addNull($arrayBuilder->getArray());
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\MixedType;
use PHPStan\Type\NeverType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypeUtils;
use function array_map;
use function hash_algos;
use function in_array;
use function strtolower;
final class HashFunctionsReturnTypeExtension implements DynamicFunctionReturnTypeExtension
{
    private const SUPPORTED_FUNCTIONS = ['hash' => ['cryptographic' => \false, 'possiblyFalse' => \false], 'hash_file' => ['cryptographic' => \false, 'possiblyFalse' => \true], 'hash_hkdf' => ['cryptographic' => \true, 'possiblyFalse' => \false], 'hash_hmac' => ['cryptographic' => \true, 'possiblyFalse' => \false], 'hash_hmac_file' => ['cryptographic' => \true, 'possiblyFalse' => \true], 'hash_pbkdf2' => ['cryptographic' => \true, 'possiblyFalse' => \false]];
    private const NON_CRYPTOGRAPHIC_ALGORITHMS = ['adler32', 'crc32', 'crc32b', 'crc32c', 'fnv132', 'fnv1a32', 'fnv164', 'fnv1a64', 'joaat', 'murmur3a', 'murmur3c', 'murmur3f', 'xxh32', 'xxh64', 'xxh3', 'xxh128'];
    /** @var array<int, non-empty-string> */
    private $hashAlgorithms;
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
        $this->hashAlgorithms = hash_algos();
    }
    public function isFunctionSupported(FunctionReflection $functionReflection) : bool
    {
        $name = strtolower($functionReflection->getName());
        return isset(self::SUPPORTED_FUNCTIONS[$name]);
    }
    public function getTypeFromFunctionCall(FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope) : Type
    {
        $defaultReturnType = ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        if (!isset($functionCall->getArgs()[0])) {
            return $defaultReturnType;
        }
        $algorithmType = $scope->getType($functionCall->getArgs()[0]->value);
        if ($algorithmType instanceof MixedType) {
            return TypeUtils::toBenevolentUnion($defaultReturnType);
        }
        $constantAlgorithmTypes = $algorithmType->getConstantStrings();
        if ($constantAlgorithmTypes === []) {
            return TypeUtils::toBenevolentUnion($defaultReturnType);
        }
        $neverType = new NeverType();
        $falseType = new ConstantBooleanType(\false);
        $nonEmptyString = new IntersectionType([new StringType(), new AccessoryNonEmptyStringType()]);
        $invalidAlgorithmType = $this->phpVersion->throwsValueErrorForInternalFunctions() ? $neverType : $falseType;
        $functionData = self::SUPPORTED_FUNCTIONS[strtolower($functionReflection->getName())];
        $returnTypes = array_map(function (ConstantStringType $type) use($functionData, $nonEmptyString, $invalidAlgorithmType) {
            $algorithm = strtolower($type->getValue());
            if (!in_array($algorithm, $this->hashAlgorithms, \true)) {
                return $invalidAlgorithmType;
            }
            if ($functionData['cryptographic'] && in_array($algorithm, self::NON_CRYPTOGRAPHIC_ALGORITHMS, \true)) {
                return $invalidAlgorithmType;
            }
            return $nonEmptyString;
        }, $constantAlgorithmTypes);
        $returnType = TypeCombinator::union(...$returnTypes);
        if ($functionData['possiblyFalse'] && !$neverType->isSuperTypeOf($returnType)->yes()) {
            $returnType = TypeCombinator::union($returnType, $falseType);
        }
        return $returnType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type\Php;

use PhpParser\Node\Arg;
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Name;
use PHPStan\Analyser\Scope;
use PHPStan\Analyser\SpecifiedTypes;
use PHPStan\Analyser\TypeSpecifier;
use PHPStan\Analyser\TypeSpecifierAwareExtension;
use PHPStan\Analyser\TypeSpecifierContext;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\CallableType;
use PHPStan\Type\FunctionTypeSpecifyingExtension;
use function count;
use function strtolower;
class IsCallableFunctionTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
{
    /**
     * @var \PHPStan\Analyser\TypeSpecifier
     */
    private $typeSpecifier;
    /**
     * @var \PHPStan\Type\Php\MethodExistsTypeSpecifyingExtension
     */
    private $methodExistsExtension;
    public function __construct(\PHPStan\Type\Php\MethodExistsTypeSpecifyingExtension $methodExistsExtension)
    {
        $this->methodExistsExtension = $methodExistsExtension;
    }
    public function isFunctionSupported(FunctionReflection $functionReflection, FuncCall $node, TypeSpecifierContext $context) : bool
    {
        return strtolower($functionReflection->getName()) === 'is_callable' && !$context->null();
    }
    public function specifyTypes(FunctionReflection $functionReflection, FuncCall $node, Scope $scope, TypeSpecifierContext $context) : SpecifiedTypes
    {
        if ($context->null()) {
            throw new ShouldNotHappenException();
        }
        if (!isset($node->getArgs()[0])) {
            return new SpecifiedTypes();
        }
        $value = $node->getArgs()[0]->value;
        $valueType = $scope->getType($value);
        if ($value instanceof Array_ && count($value->items) === 2 && $valueType->isConstantArray()->yes() && !$valueType->isCallable()->no()) {
            if ($value->items[0] === null || $value->items[1] === null) {
                throw new ShouldNotHappenException();
            }
            $functionCall = new FuncCall(new Name('method_exists'), [new Arg($value->items[0]->value), new Arg($value->items[1]->value)]);
            return $this->methodExistsExtension->specifyTypes($functionReflection, $functionCall, $scope, $context);
        }
        return $this->typeSpecifier->create($value, new CallableType(), $context, \false, $scope);
    }
    public function setTypeSpecifier(TypeSpecifier $typeSpecifier) : void
    {
        $this->typeSpecifier = $typeSpecifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\PhpDocParser\Ast\Type\ThisTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ReflectionProviderStaticAccessor;
use PHPStan\TrinaryLogic;
use function sprintf;
/** @api */
class ThisType extends \PHPStan\Type\StaticType
{
    /**
     * @api
     */
    public function __construct(ClassReflection $classReflection, ?\PHPStan\Type\Type $subtractedType = null)
    {
        parent::__construct($classReflection, $subtractedType);
    }
    public function changeBaseClass(ClassReflection $classReflection) : \PHPStan\Type\StaticType
    {
        return new self($classReflection, $this->getSubtractedType());
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        return sprintf('$this(%s)', $this->getStaticObjectType()->describe($level));
    }
    public function isSuperTypeOf(\PHPStan\Type\Type $type) : TrinaryLogic
    {
        if ($type instanceof self) {
            return $this->getStaticObjectType()->isSuperTypeOf($type);
        }
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return $type->isSubTypeOf($this);
        }
        $parent = new parent($this->getClassReflection(), $this->getSubtractedType());
        return $parent->isSuperTypeOf($type)->and(TrinaryLogic::createMaybe());
    }
    public function changeSubtractedType(?\PHPStan\Type\Type $subtractedType) : \PHPStan\Type\Type
    {
        $type = parent::changeSubtractedType($subtractedType);
        if ($type instanceof parent) {
            return new self($type->getClassReflection(), $subtractedType);
        }
        return $type;
    }
    public function traverse(callable $cb) : \PHPStan\Type\Type
    {
        $subtractedType = $this->getSubtractedType() !== null ? $cb($this->getSubtractedType()) : null;
        if ($subtractedType !== $this->getSubtractedType()) {
            return new self($this->getClassReflection(), $subtractedType);
        }
        return $this;
    }
    public function traverseSimultaneously(\PHPStan\Type\Type $right, callable $cb) : \PHPStan\Type\Type
    {
        if ($this->getSubtractedType() === null) {
            return $this;
        }
        return new self($this->getClassReflection());
    }
    public function toPhpDocNode() : TypeNode
    {
        return new ThisTypeNode();
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        $reflectionProvider = ReflectionProviderStaticAccessor::getInstance();
        if ($reflectionProvider->hasClass($properties['baseClass'])) {
            return new self($reflectionProvider->getClass($properties['baseClass']), $properties['subtractedType'] ?? null);
        }
        return new \PHPStan\Type\ErrorType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Accessory\AccessoryNumericStringType;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Traits\NonArrayTypeTrait;
use PHPStan\Type\Traits\NonCallableTypeTrait;
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
use PHPStan\Type\Traits\NonGenericTypeTrait;
use PHPStan\Type\Traits\NonIterableTypeTrait;
use PHPStan\Type\Traits\NonObjectTypeTrait;
use PHPStan\Type\Traits\NonOffsetAccessibleTypeTrait;
use PHPStan\Type\Traits\NonRemoveableTypeTrait;
use PHPStan\Type\Traits\UndecidedBooleanTypeTrait;
use PHPStan\Type\Traits\UndecidedComparisonTypeTrait;
use function get_class;
/** @api */
class FloatType implements \PHPStan\Type\Type
{
    use NonArrayTypeTrait;
    use NonCallableTypeTrait;
    use NonIterableTypeTrait;
    use NonObjectTypeTrait;
    use UndecidedBooleanTypeTrait;
    use UndecidedComparisonTypeTrait;
    use NonGenericTypeTrait;
    use NonOffsetAccessibleTypeTrait;
    use NonRemoveableTypeTrait;
    use NonGeneralizableTypeTrait;
    /** @api */
    public function __construct()
    {
    }
    /**
     * @return string[]
     */
    public function getReferencedClasses() : array
    {
        return [];
    }
    public function getObjectClassNames() : array
    {
        return [];
    }
    public function getObjectClassReflections() : array
    {
        return [];
    }
    public function getConstantStrings() : array
    {
        return [];
    }
    public function accepts(\PHPStan\Type\Type $type, bool $strictTypes) : TrinaryLogic
    {
        return $this->acceptsWithReason($type, $strictTypes)->result;
    }
    public function acceptsWithReason(\PHPStan\Type\Type $type, bool $strictTypes) : \PHPStan\Type\AcceptsResult
    {
        if ($type instanceof self || $type->isInteger()->yes()) {
            return \PHPStan\Type\AcceptsResult::createYes();
        }
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return $type->isAcceptedWithReasonBy($this, $strictTypes);
        }
        return \PHPStan\Type\AcceptsResult::createNo();
    }
    public function isSuperTypeOf(\PHPStan\Type\Type $type) : TrinaryLogic
    {
        if ($type instanceof self) {
            return TrinaryLogic::createYes();
        }
        if ($type instanceof \PHPStan\Type\CompoundType) {
            return $type->isSubTypeOf($this);
        }
        return TrinaryLogic::createNo();
    }
    public function equals(\PHPStan\Type\Type $type) : bool
    {
        return get_class($type) === static::class;
    }
    public function describe(\PHPStan\Type\VerbosityLevel $level) : string
    {
        return 'float';
    }
    public function toNumber() : \PHPStan\Type\Type
    {
        return $this;
    }
    public function toFloat() : \PHPStan\Type\Type
    {
        return $this;
    }
    public function toInteger() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\IntegerType();
    }
    public function toString() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\IntersectionType([new \PHPStan\Type\StringType(), new AccessoryNumericStringType()]);
    }
    public function toArray() : \PHPStan\Type\Type
    {
        return new ConstantArrayType([new ConstantIntegerType(0)], [$this], [1], [], \true);
    }
    public function toArrayKey() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\IntegerType();
    }
    public function isNull() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isConstantScalarValue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getConstantScalarTypes() : array
    {
        return [];
    }
    public function getConstantScalarValues() : array
    {
        return [];
    }
    public function isTrue() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFalse() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isBoolean() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFloat() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isInteger() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNumericString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonEmptyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isNonFalsyString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isLiteralString() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isClassStringType() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getClassStringObjectType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function getObjectTypeOrClassStringObjectType() : \PHPStan\Type\Type
    {
        return new \PHPStan\Type\ErrorType();
    }
    public function isVoid() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isScalar() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function looseCompare(\PHPStan\Type\Type $type, PhpVersion $phpVersion) : \PHPStan\Type\BooleanType
    {
        return new \PHPStan\Type\BooleanType();
    }
    public function traverse(callable $cb) : \PHPStan\Type\Type
    {
        return $this;
    }
    public function traverseSimultaneously(\PHPStan\Type\Type $right, callable $cb) : \PHPStan\Type\Type
    {
        return $this;
    }
    public function exponentiate(\PHPStan\Type\Type $exponent) : \PHPStan\Type\Type
    {
        return \PHPStan\Type\ExponentiateHelper::exponentiate($this, $exponent);
    }
    public function toPhpDocNode() : TypeNode
    {
        return new IdentifierTypeNode('float');
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : \PHPStan\Type\Type
    {
        return new self();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Type;

use PHPStan\Type\Constant\ConstantFloatType;
use PHPStan\Type\Constant\ConstantIntegerType;
use function is_float;
use function is_int;
final class ExponentiateHelper
{
    public static function exponentiate(\PHPStan\Type\Type $base, \PHPStan\Type\Type $exponent) : \PHPStan\Type\Type
    {
        if ($exponent instanceof \PHPStan\Type\UnionType) {
            $results = [];
            foreach ($exponent->getTypes() as $unionType) {
                $results[] = self::exponentiate($base, $unionType);
            }
            return \PHPStan\Type\TypeCombinator::union(...$results);
        }
        if ($exponent instanceof \PHPStan\Type\NeverType) {
            return new \PHPStan\Type\NeverType();
        }
        $allowedExponentTypes = new \PHPStan\Type\UnionType([new \PHPStan\Type\IntegerType(), new \PHPStan\Type\FloatType(), new \PHPStan\Type\StringType(), new \PHPStan\Type\BooleanType(), new \PHPStan\Type\NullType()]);
        if (!$allowedExponentTypes->isSuperTypeOf($exponent)->yes()) {
            return new \PHPStan\Type\ErrorType();
        }
        if ($base instanceof \PHPStan\Type\ConstantScalarType) {
            $result = self::exponentiateConstantScalar($base, $exponent);
            if ($result !== null) {
                return $result;
            }
        }
        // exponentiation of a float, stays a float
        $float = new \PHPStan\Type\FloatType();
        $isFloatBase = $float->isSuperTypeOf($base)->yes();
        $isLooseZero = (new ConstantIntegerType(0))->isSuperTypeOf($exponent->toNumber());
        if ($isLooseZero->yes()) {
            if ($isFloatBase) {
                return new ConstantFloatType(1);
            }
            return new ConstantIntegerType(1);
        }
        $isLooseOne = (new ConstantIntegerType(1))->isSuperTypeOf($exponent->toNumber());
        if ($isLooseOne->yes()) {
            $possibleResults = new \PHPStan\Type\UnionType([new \PHPStan\Type\FloatType(), new \PHPStan\Type\IntegerType()]);
            if ($possibleResults->isSuperTypeOf($base)->yes()) {
                return $base;
            }
        }
        if ($isFloatBase) {
            return new \PHPStan\Type\FloatType();
        }
        return new \PHPStan\Type\BenevolentUnionType([new \PHPStan\Type\FloatType(), new \PHPStan\Type\IntegerType()]);
    }
    private static function exponentiateConstantScalar(\PHPStan\Type\ConstantScalarType $base, \PHPStan\Type\Type $exponent) : ?\PHPStan\Type\Type
    {
        if ($exponent instanceof \PHPStan\Type\IntegerRangeType) {
            $min = null;
            $max = null;
            if ($exponent->getMin() !== null) {
                $min = $base->getValue() ** $exponent->getMin();
            }
            if ($exponent->getMax() !== null) {
                $max = $base->getValue() ** $exponent->getMax();
            }
            if (!is_float($min) && !is_float($max)) {
                return \PHPStan\Type\IntegerRangeType::fromInterval($min, $max);
            }
        }
        if ($exponent instanceof \PHPStan\Type\ConstantScalarType) {
            $result = $base->getValue() ** $exponent->getValue();
            if (is_int($result)) {
                return new ConstantIntegerType($result);
            }
            return new ConstantFloatType($result);
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\NodeVisitor;

use PhpParser\Node;
use PhpParser\NodeVisitorAbstract;
use function array_pop;
use function count;
class StatementOrderVisitor extends NodeVisitorAbstract
{
    /** @var int[] */
    private $orderStack = [];
    /** @var int[] */
    private $expressionOrderStack = [];
    /**
     * @var int
     */
    private $depth = 0;
    /**
     * @var int
     */
    private $expressionDepth = 0;
    /**
     * @param Node[] $nodes $nodes
     * @return null
     */
    public function beforeTraverse(array $nodes)
    {
        $this->orderStack = [0];
        $this->depth = 0;
        return null;
    }
    /**
     * @return null
     */
    public function enterNode(Node $node)
    {
        $order = $this->orderStack[count($this->orderStack) - 1];
        $node->setAttribute('statementOrder', $order);
        $node->setAttribute('statementDepth', $this->depth);
        if (($node instanceof Node\Expr || $node instanceof Node\Arg) && count($this->expressionOrderStack) > 0) {
            $expressionOrder = $this->expressionOrderStack[count($this->expressionOrderStack) - 1];
            $node->setAttribute('expressionOrder', $expressionOrder);
            $node->setAttribute('expressionDepth', $this->expressionDepth);
            $this->expressionOrderStack[count($this->expressionOrderStack) - 1] = $expressionOrder + 1;
            $this->expressionOrderStack[] = 0;
            $this->expressionDepth++;
        }
        if (!$node instanceof Node\Stmt) {
            return null;
        }
        $this->orderStack[count($this->orderStack) - 1] = $order + 1;
        $this->orderStack[] = 0;
        $this->depth++;
        $this->expressionOrderStack = [0];
        $this->expressionDepth = 0;
        return null;
    }
    /**
     * @return null
     */
    public function leaveNode(Node $node)
    {
        if ($node instanceof Node\Expr) {
            array_pop($this->expressionOrderStack);
            $this->expressionDepth--;
        }
        if (!$node instanceof Node\Stmt) {
            return null;
        }
        array_pop($this->orderStack);
        $this->depth--;
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc;

interface TypeNodeResolverExtensionRegistryProvider
{
    public function getRegistry() : \PHPStan\PhpDoc\TypeNodeResolverExtensionRegistry;
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc;

use PHPStan\Analyser\Error;
use PHPStan\Analyser\FileAnalyser;
use PHPStan\Analyser\NodeScopeResolver;
use PHPStan\Broker\Broker;
use PHPStan\Collectors\Registry as CollectorRegistry;
use PHPStan\DependencyInjection\Container;
use PHPStan\DependencyInjection\DerivativeContainerFactory;
use PHPStan\Php\PhpVersion;
use PHPStan\PhpDocParser\Lexer\Lexer;
use PHPStan\PhpDocParser\Parser\PhpDocParser;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Reflection\ReflectionProviderStaticAccessor;
use PHPStan\Rules\ClassCaseSensitivityCheck;
use PHPStan\Rules\Classes\DuplicateClassDeclarationRule;
use PHPStan\Rules\Classes\DuplicateDeclarationRule;
use PHPStan\Rules\Classes\ExistingClassesInClassImplementsRule;
use PHPStan\Rules\Classes\ExistingClassesInInterfaceExtendsRule;
use PHPStan\Rules\Classes\ExistingClassInClassExtendsRule;
use PHPStan\Rules\Classes\ExistingClassInTraitUseRule;
use PHPStan\Rules\Classes\LocalTypeAliasesCheck;
use PHPStan\Rules\Classes\LocalTypeAliasesRule;
use PHPStan\Rules\Classes\LocalTypeTraitAliasesRule;
use PHPStan\Rules\DirectRegistry as DirectRuleRegistry;
use PHPStan\Rules\FunctionDefinitionCheck;
use PHPStan\Rules\Functions\DuplicateFunctionDeclarationRule;
use PHPStan\Rules\Functions\MissingFunctionParameterTypehintRule;
use PHPStan\Rules\Functions\MissingFunctionReturnTypehintRule;
use PHPStan\Rules\Generics\ClassAncestorsRule;
use PHPStan\Rules\Generics\ClassTemplateTypeRule;
use PHPStan\Rules\Generics\CrossCheckInterfacesHelper;
use PHPStan\Rules\Generics\FunctionSignatureVarianceRule;
use PHPStan\Rules\Generics\FunctionTemplateTypeRule;
use PHPStan\Rules\Generics\GenericAncestorsCheck;
use PHPStan\Rules\Generics\GenericObjectTypeCheck;
use PHPStan\Rules\Generics\InterfaceAncestorsRule;
use PHPStan\Rules\Generics\InterfaceTemplateTypeRule;
use PHPStan\Rules\Generics\MethodSignatureVarianceRule;
use PHPStan\Rules\Generics\MethodTemplateTypeRule;
use PHPStan\Rules\Generics\TemplateTypeCheck;
use PHPStan\Rules\Generics\TraitTemplateTypeRule;
use PHPStan\Rules\Generics\VarianceCheck;
use PHPStan\Rules\Methods\ExistingClassesInTypehintsRule;
use PHPStan\Rules\Methods\MethodParameterComparisonHelper;
use PHPStan\Rules\Methods\MethodSignatureRule;
use PHPStan\Rules\Methods\MissingMethodParameterTypehintRule;
use PHPStan\Rules\Methods\MissingMethodReturnTypehintRule;
use PHPStan\Rules\Methods\OverridingMethodRule;
use PHPStan\Rules\MissingTypehintCheck;
use PHPStan\Rules\PhpDoc\IncompatiblePhpDocTypeRule;
use PHPStan\Rules\PhpDoc\IncompatiblePropertyPhpDocTypeRule;
use PHPStan\Rules\PhpDoc\InvalidPhpDocTagValueRule;
use PHPStan\Rules\PhpDoc\InvalidPHPStanDocTagRule;
use PHPStan\Rules\PhpDoc\InvalidThrowsPhpDocValueRule;
use PHPStan\Rules\PhpDoc\UnresolvableTypeHelper;
use PHPStan\Rules\Properties\ExistingClassesInPropertiesRule;
use PHPStan\Rules\Properties\MissingPropertyTypehintRule;
use PHPStan\Rules\Registry as RuleRegistry;
use PHPStan\Type\FileTypeMapper;
use PHPStan\Type\ObjectType;
use Throwable;
use function array_fill_keys;
use function count;
use function sprintf;
class StubValidator
{
    /**
     * @var \PHPStan\DependencyInjection\DerivativeContainerFactory
     */
    private $derivativeContainerFactory;
    /**
     * @var bool
     */
    private $duplicateStubs;
    public function __construct(DerivativeContainerFactory $derivativeContainerFactory, bool $duplicateStubs)
    {
        $this->derivativeContainerFactory = $derivativeContainerFactory;
        $this->duplicateStubs = $duplicateStubs;
    }
    /**
     * @param string[] $stubFiles
     * @return list<Error>
     */
    public function validate(array $stubFiles, bool $debug) : array
    {
        if (count($stubFiles) === 0) {
            return [];
        }
        $originalBroker = Broker::getInstance();
        $originalReflectionProvider = ReflectionProviderStaticAccessor::getInstance();
        $container = $this->derivativeContainerFactory->create([__DIR__ . '/../../conf/config.stubValidator.neon']);
        $ruleRegistry = $this->getRuleRegistry($container);
        $collectorRegistry = $this->getCollectorRegistry($container);
        $fileAnalyser = $container->getByType(FileAnalyser::class);
        $nodeScopeResolver = $container->getByType(NodeScopeResolver::class);
        $nodeScopeResolver->setAnalysedFiles($stubFiles);
        $pathRoutingParser = $container->getService('pathRoutingParser');
        $pathRoutingParser->setAnalysedFiles($stubFiles);
        $analysedFiles = array_fill_keys($stubFiles, \true);
        $errors = [];
        foreach ($stubFiles as $stubFile) {
            try {
                $tmpErrors = $fileAnalyser->analyseFile($stubFile, $analysedFiles, $ruleRegistry, $collectorRegistry, static function () : void {
                })->getErrors();
                foreach ($tmpErrors as $tmpError) {
                    $errors[] = $tmpError->withoutTip()->doNotIgnore();
                }
            } catch (Throwable $e) {
                if ($debug) {
                    throw $e;
                }
                $internalErrorMessage = sprintf('Internal error: %s', $e->getMessage());
                $errors[] = new Error($internalErrorMessage, $stubFile, null, $e);
            }
        }
        Broker::registerInstance($originalBroker);
        ReflectionProviderStaticAccessor::registerInstance($originalReflectionProvider);
        ObjectType::resetCaches();
        return $errors;
    }
    private function getRuleRegistry(Container $container) : RuleRegistry
    {
        $fileTypeMapper = $container->getByType(FileTypeMapper::class);
        $genericObjectTypeCheck = $container->getByType(GenericObjectTypeCheck::class);
        $genericAncestorsCheck = $container->getByType(GenericAncestorsCheck::class);
        $templateTypeCheck = $container->getByType(TemplateTypeCheck::class);
        $varianceCheck = $container->getByType(VarianceCheck::class);
        $reflectionProvider = $container->getByType(ReflectionProvider::class);
        $classCaseSensitivityCheck = $container->getByType(ClassCaseSensitivityCheck::class);
        $functionDefinitionCheck = $container->getByType(FunctionDefinitionCheck::class);
        $missingTypehintCheck = $container->getByType(MissingTypehintCheck::class);
        $unresolvableTypeHelper = $container->getByType(UnresolvableTypeHelper::class);
        $crossCheckInterfacesHelper = $container->getByType(CrossCheckInterfacesHelper::class);
        $phpVersion = $container->getByType(PhpVersion::class);
        $localTypeAliasesCheck = $container->getByType(LocalTypeAliasesCheck::class);
        $rules = [
            // level 0
            new ExistingClassesInClassImplementsRule($classCaseSensitivityCheck, $reflectionProvider),
            new ExistingClassesInInterfaceExtendsRule($classCaseSensitivityCheck, $reflectionProvider),
            new ExistingClassInClassExtendsRule($classCaseSensitivityCheck, $reflectionProvider),
            new ExistingClassInTraitUseRule($classCaseSensitivityCheck, $reflectionProvider),
            new ExistingClassesInTypehintsRule($functionDefinitionCheck),
            new \PHPStan\Rules\Functions\ExistingClassesInTypehintsRule($functionDefinitionCheck),
            new ExistingClassesInPropertiesRule($reflectionProvider, $classCaseSensitivityCheck, $unresolvableTypeHelper, $phpVersion, \true, \false),
            new OverridingMethodRule($phpVersion, new MethodSignatureRule(\true, \true), \true, new MethodParameterComparisonHelper($phpVersion, $container->getParameter('featureToggles')['genericPrototypeMessage']), $container->getParameter('featureToggles')['genericPrototypeMessage']),
            new DuplicateDeclarationRule(),
            new LocalTypeAliasesRule($localTypeAliasesCheck),
            new LocalTypeTraitAliasesRule($localTypeAliasesCheck, $reflectionProvider),
            // level 2
            new ClassAncestorsRule($genericAncestorsCheck, $crossCheckInterfacesHelper),
            new ClassTemplateTypeRule($templateTypeCheck),
            new FunctionTemplateTypeRule($fileTypeMapper, $templateTypeCheck),
            new FunctionSignatureVarianceRule($varianceCheck),
            new InterfaceAncestorsRule($genericAncestorsCheck, $crossCheckInterfacesHelper),
            new InterfaceTemplateTypeRule($templateTypeCheck),
            new MethodTemplateTypeRule($fileTypeMapper, $templateTypeCheck),
            new MethodSignatureVarianceRule($varianceCheck),
            new TraitTemplateTypeRule($fileTypeMapper, $templateTypeCheck),
            new IncompatiblePhpDocTypeRule($fileTypeMapper, $genericObjectTypeCheck, $unresolvableTypeHelper),
            new IncompatiblePropertyPhpDocTypeRule($genericObjectTypeCheck, $unresolvableTypeHelper),
            new InvalidPhpDocTagValueRule($container->getByType(Lexer::class), $container->getByType(PhpDocParser::class), $container->getParameter('featureToggles')['allInvalidPhpDocs'], $container->getParameter('featureToggles')['invalidPhpDocTagLine']),
            new InvalidThrowsPhpDocValueRule($fileTypeMapper),
            // level 6
            new MissingFunctionParameterTypehintRule($missingTypehintCheck),
            new MissingFunctionReturnTypehintRule($missingTypehintCheck),
            new MissingMethodParameterTypehintRule($missingTypehintCheck),
            new MissingMethodReturnTypehintRule($missingTypehintCheck),
            new MissingPropertyTypehintRule($missingTypehintCheck),
        ];
        if ($this->duplicateStubs) {
            $reflector = $container->getService('stubReflector');
            $relativePathHelper = $container->getService('simpleRelativePathHelper');
            $rules[] = new DuplicateClassDeclarationRule($reflector, $relativePathHelper);
            $rules[] = new DuplicateFunctionDeclarationRule($reflector, $relativePathHelper);
        }
        if ((bool) $container->getParameter('featureToggles')['allInvalidPhpDocs']) {
            $rules[] = new InvalidPHPStanDocTagRule($container->getByType(Lexer::class), $container->getByType(PhpDocParser::class), \true);
        }
        return new DirectRuleRegistry($rules);
    }
    private function getCollectorRegistry(Container $container) : CollectorRegistry
    {
        return new CollectorRegistry([]);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc;

use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprArrayNode;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprFalseNode;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprFloatNode;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprIntegerNode;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNode;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNullNode;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprStringNode;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprTrueNode;
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantFloatType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\MixedType;
use PHPStan\Type\NullType;
use PHPStan\Type\Type;
class ConstExprNodeResolver
{
    public function resolve(ConstExprNode $node) : Type
    {
        if ($node instanceof ConstExprArrayNode) {
            return $this->resolveArrayNode($node);
        }
        if ($node instanceof ConstExprFalseNode) {
            return new ConstantBooleanType(\false);
        }
        if ($node instanceof ConstExprTrueNode) {
            return new ConstantBooleanType(\true);
        }
        if ($node instanceof ConstExprFloatNode) {
            return new ConstantFloatType((float) $node->value);
        }
        if ($node instanceof ConstExprIntegerNode) {
            return new ConstantIntegerType((int) $node->value);
        }
        if ($node instanceof ConstExprNullNode) {
            return new NullType();
        }
        if ($node instanceof ConstExprStringNode) {
            return new ConstantStringType($node->value);
        }
        return new MixedType();
    }
    private function resolveArrayNode(ConstExprArrayNode $node) : Type
    {
        $arrayBuilder = ConstantArrayTypeBuilder::createEmpty();
        foreach ($node->items as $item) {
            if ($item->key === null) {
                $key = null;
            } else {
                $key = $this->resolve($item->key);
            }
            $arrayBuilder->setOffsetValueType($key, $this->resolve($item->value));
        }
        return $arrayBuilder->getArray();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc;

interface TypeNodeResolverExtensionRegistry
{
    /**
     * @return TypeNodeResolverExtension[]
     */
    public function getExtensions() : array;
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc;

use PhpParser\Parser;
use PHPStan\BetterReflection\SourceLocator\Ast\Locator;
use PHPStan\BetterReflection\SourceLocator\SourceStubber\PhpStormStubsSourceStubber;
use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\MemoizingSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator;
use PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedSingleFileSourceLocatorRepository;
class StubSourceLocatorFactory
{
    /**
     * @var \PhpParser\Parser
     */
    private $php8Parser;
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\SourceStubber\PhpStormStubsSourceStubber
     */
    private $phpStormStubsSourceStubber;
    /**
     * @var \PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedSingleFileSourceLocatorRepository
     */
    private $optimizedSingleFileSourceLocatorRepository;
    /**
     * @var \PHPStan\PhpDoc\StubFilesProvider
     */
    private $stubFilesProvider;
    public function __construct(Parser $php8Parser, PhpStormStubsSourceStubber $phpStormStubsSourceStubber, OptimizedSingleFileSourceLocatorRepository $optimizedSingleFileSourceLocatorRepository, \PHPStan\PhpDoc\StubFilesProvider $stubFilesProvider)
    {
        $this->php8Parser = $php8Parser;
        $this->phpStormStubsSourceStubber = $phpStormStubsSourceStubber;
        $this->optimizedSingleFileSourceLocatorRepository = $optimizedSingleFileSourceLocatorRepository;
        $this->stubFilesProvider = $stubFilesProvider;
    }
    public function create() : SourceLocator
    {
        $locators = [];
        $astPhp8Locator = new Locator($this->php8Parser);
        foreach ($this->stubFilesProvider->getStubFiles() as $stubFile) {
            $locators[] = $this->optimizedSingleFileSourceLocatorRepository->getOrCreate($stubFile);
        }
        $locators[] = new PhpInternalSourceLocator($astPhp8Locator, $this->phpStormStubsSourceStubber);
        return new MemoizingSourceLocator(new AggregateSourceLocator($locators));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc;

use PHPStan\DependencyInjection\Container;
use PHPStan\Internal\ComposerHelper;
use function array_filter;
use function array_values;
use function strpos;
class DefaultStubFilesProvider implements \PHPStan\PhpDoc\StubFilesProvider
{
    /** @var string[]|null */
    private $cachedFiles;
    /** @var string[]|null */
    private $cachedProjectFiles;
    /**
     * @var \PHPStan\DependencyInjection\Container
     */
    private $container;
    /**
     * @var string[]
     */
    private $stubFiles;
    /**
     * @var string
     */
    private $currentWorkingDirectory;
    /**
     * @param string[] $stubFiles
     */
    public function __construct(Container $container, array $stubFiles, string $currentWorkingDirectory)
    {
        $this->container = $container;
        $this->stubFiles = $stubFiles;
        $this->currentWorkingDirectory = $currentWorkingDirectory;
    }
    public function getStubFiles() : array
    {
        if ($this->cachedFiles !== null) {
            return $this->cachedFiles;
        }
        $files = $this->stubFiles;
        $extensions = $this->container->getServicesByTag(\PHPStan\PhpDoc\StubFilesExtension::EXTENSION_TAG);
        foreach ($extensions as $extension) {
            foreach ($extension->getFiles() as $extensionFile) {
                $files[] = $extensionFile;
            }
        }
        return $this->cachedFiles = $files;
    }
    public function getProjectStubFiles() : array
    {
        if ($this->cachedProjectFiles !== null) {
            return $this->cachedProjectFiles;
        }
        $composerConfig = ComposerHelper::getComposerConfig($this->currentWorkingDirectory);
        if ($composerConfig === null) {
            return $this->getStubFiles();
        }
        return $this->cachedProjectFiles = array_values(array_filter($this->getStubFiles(), function (string $file) use($composerConfig) : bool {
            return strpos($file, ComposerHelper::getVendorDirFromComposerConfig($this->currentWorkingDirectory, $composerConfig)) === \false;
        }));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc;

use Closure;
use Generator;
use Iterator;
use IteratorAggregate;
use _PHPStan_dcc7b7cff\Nette\Utils\Strings;
use PhpParser\Node\Name;
use PHPStan\Analyser\ConstantResolver;
use PHPStan\Analyser\NameScope;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprArrayNode;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprFalseNode;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprFloatNode;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprIntegerNode;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNullNode;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprStringNode;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprTrueNode;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstFetchNode;
use PHPStan\PhpDocParser\Ast\Type\ArrayShapeNode;
use PHPStan\PhpDocParser\Ast\Type\ArrayTypeNode;
use PHPStan\PhpDocParser\Ast\Type\CallableTypeNode;
use PHPStan\PhpDocParser\Ast\Type\CallableTypeParameterNode;
use PHPStan\PhpDocParser\Ast\Type\ConditionalTypeForParameterNode;
use PHPStan\PhpDocParser\Ast\Type\ConditionalTypeNode;
use PHPStan\PhpDocParser\Ast\Type\ConstTypeNode;
use PHPStan\PhpDocParser\Ast\Type\GenericTypeNode;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\IntersectionTypeNode;
use PHPStan\PhpDocParser\Ast\Type\InvalidTypeNode;
use PHPStan\PhpDocParser\Ast\Type\NullableTypeNode;
use PHPStan\PhpDocParser\Ast\Type\ObjectShapeNode;
use PHPStan\PhpDocParser\Ast\Type\OffsetAccessTypeNode;
use PHPStan\PhpDocParser\Ast\Type\ThisTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\PhpDocParser\Ast\Type\UnionTypeNode;
use PHPStan\Reflection\InitializerExprContext;
use PHPStan\Reflection\InitializerExprTypeResolver;
use PHPStan\Reflection\Native\NativeParameterReflection;
use PHPStan\Reflection\PassedByReference;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\Accessory\AccessoryLiteralStringType;
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
use PHPStan\Type\Accessory\AccessoryNonFalsyStringType;
use PHPStan\Type\Accessory\AccessoryNumericStringType;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\BenevolentUnionType;
use PHPStan\Type\BooleanType;
use PHPStan\Type\CallableType;
use PHPStan\Type\ClassStringType;
use PHPStan\Type\ClosureType;
use PHPStan\Type\ConditionalType;
use PHPStan\Type\ConditionalTypeForParameter;
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantFloatType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\Enum\EnumCaseObjectType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\FloatType;
use PHPStan\Type\Generic\GenericClassStringType;
use PHPStan\Type\Generic\GenericObjectType;
use PHPStan\Type\Helper\GetTemplateTypeType;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\IterableType;
use PHPStan\Type\KeyOfType;
use PHPStan\Type\MixedType;
use PHPStan\Type\NeverType;
use PHPStan\Type\NonexistentParentClassType;
use PHPStan\Type\NullType;
use PHPStan\Type\ObjectShapeType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\ObjectWithoutClassType;
use PHPStan\Type\OffsetAccessType;
use PHPStan\Type\ResourceType;
use PHPStan\Type\StaticType;
use PHPStan\Type\StaticTypeFactory;
use PHPStan\Type\StringAlwaysAcceptingObjectWithToStringType;
use PHPStan\Type\StringType;
use PHPStan\Type\ThisType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeAliasResolver;
use PHPStan\Type\TypeAliasResolverProvider;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypeUtils;
use PHPStan\Type\UnionType;
use PHPStan\Type\ValueOfType;
use PHPStan\Type\VoidType;
use Traversable;
use function array_key_exists;
use function array_map;
use function count;
use function explode;
use function get_class;
use function in_array;
use function max;
use function min;
use function preg_match;
use function preg_quote;
use function str_replace;
use function strpos;
use function strtolower;
use function substr;
class TypeNodeResolver
{
    /**
     * @var \PHPStan\PhpDoc\TypeNodeResolverExtensionRegistryProvider
     */
    private $extensionRegistryProvider;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider\ReflectionProviderProvider
     */
    private $reflectionProviderProvider;
    /**
     * @var \PHPStan\Type\TypeAliasResolverProvider
     */
    private $typeAliasResolverProvider;
    /**
     * @var \PHPStan\Analyser\ConstantResolver
     */
    private $constantResolver;
    /**
     * @var \PHPStan\Reflection\InitializerExprTypeResolver
     */
    private $initializerExprTypeResolver;
    public function __construct(\PHPStan\PhpDoc\TypeNodeResolverExtensionRegistryProvider $extensionRegistryProvider, ReflectionProvider\ReflectionProviderProvider $reflectionProviderProvider, TypeAliasResolverProvider $typeAliasResolverProvider, ConstantResolver $constantResolver, InitializerExprTypeResolver $initializerExprTypeResolver)
    {
        $this->extensionRegistryProvider = $extensionRegistryProvider;
        $this->reflectionProviderProvider = $reflectionProviderProvider;
        $this->typeAliasResolverProvider = $typeAliasResolverProvider;
        $this->constantResolver = $constantResolver;
        $this->initializerExprTypeResolver = $initializerExprTypeResolver;
    }
    /** @api */
    public function resolve(TypeNode $typeNode, NameScope $nameScope) : Type
    {
        foreach ($this->extensionRegistryProvider->getRegistry()->getExtensions() as $extension) {
            $type = $extension->resolve($typeNode, $nameScope);
            if ($type !== null) {
                return $type;
            }
        }
        if ($typeNode instanceof IdentifierTypeNode) {
            return $this->resolveIdentifierTypeNode($typeNode, $nameScope);
        } elseif ($typeNode instanceof ThisTypeNode) {
            return $this->resolveThisTypeNode($typeNode, $nameScope);
        } elseif ($typeNode instanceof NullableTypeNode) {
            return $this->resolveNullableTypeNode($typeNode, $nameScope);
        } elseif ($typeNode instanceof UnionTypeNode) {
            return $this->resolveUnionTypeNode($typeNode, $nameScope);
        } elseif ($typeNode instanceof IntersectionTypeNode) {
            return $this->resolveIntersectionTypeNode($typeNode, $nameScope);
        } elseif ($typeNode instanceof ConditionalTypeNode) {
            return $this->resolveConditionalTypeNode($typeNode, $nameScope);
        } elseif ($typeNode instanceof ConditionalTypeForParameterNode) {
            return $this->resolveConditionalTypeForParameterNode($typeNode, $nameScope);
        } elseif ($typeNode instanceof ArrayTypeNode) {
            return $this->resolveArrayTypeNode($typeNode, $nameScope);
        } elseif ($typeNode instanceof GenericTypeNode) {
            return $this->resolveGenericTypeNode($typeNode, $nameScope);
        } elseif ($typeNode instanceof CallableTypeNode) {
            return $this->resolveCallableTypeNode($typeNode, $nameScope);
        } elseif ($typeNode instanceof ArrayShapeNode) {
            return $this->resolveArrayShapeNode($typeNode, $nameScope);
        } elseif ($typeNode instanceof ObjectShapeNode) {
            return $this->resolveObjectShapeNode($typeNode, $nameScope);
        } elseif ($typeNode instanceof ConstTypeNode) {
            return $this->resolveConstTypeNode($typeNode, $nameScope);
        } elseif ($typeNode instanceof OffsetAccessTypeNode) {
            return $this->resolveOffsetAccessNode($typeNode, $nameScope);
        } elseif ($typeNode instanceof InvalidTypeNode) {
            return new MixedType(\true);
        }
        return new ErrorType();
    }
    private function resolveIdentifierTypeNode(IdentifierTypeNode $typeNode, NameScope $nameScope) : Type
    {
        switch (strtolower($typeNode->name)) {
            case 'int':
            case 'integer':
                return new IntegerType();
            case 'positive-int':
                return IntegerRangeType::fromInterval(1, null);
            case 'negative-int':
                return IntegerRangeType::fromInterval(null, -1);
            case 'non-positive-int':
                return IntegerRangeType::fromInterval(null, 0);
            case 'non-negative-int':
                return IntegerRangeType::fromInterval(0, null);
            case 'string':
            case 'lowercase-string':
                return new StringType();
            case 'literal-string':
                return new IntersectionType([new StringType(), new AccessoryLiteralStringType()]);
            case 'class-string':
            case 'interface-string':
            case 'trait-string':
            case 'enum-string':
                return new ClassStringType();
            case 'callable-string':
                return new IntersectionType([new StringType(), new CallableType()]);
            case 'array-key':
                return new BenevolentUnionType([new IntegerType(), new StringType()]);
            case 'scalar':
                $type = $this->tryResolvePseudoTypeClassType($typeNode, $nameScope);
                if ($type !== null) {
                    return $type;
                }
                return new UnionType([new IntegerType(), new FloatType(), new StringType(), new BooleanType()]);
            case 'empty-scalar':
                return TypeCombinator::intersect(new UnionType([new IntegerType(), new FloatType(), new StringType(), new BooleanType()]), StaticTypeFactory::falsey());
            case 'non-empty-scalar':
                return TypeCombinator::remove(new UnionType([new IntegerType(), new FloatType(), new StringType(), new BooleanType()]), StaticTypeFactory::falsey());
            case 'number':
                $type = $this->tryResolvePseudoTypeClassType($typeNode, $nameScope);
                if ($type !== null) {
                    return $type;
                }
                return new UnionType([new IntegerType(), new FloatType()]);
            case 'numeric':
                $type = $this->tryResolvePseudoTypeClassType($typeNode, $nameScope);
                if ($type !== null) {
                    return $type;
                }
                return new UnionType([new IntegerType(), new FloatType(), new IntersectionType([new StringType(), new AccessoryNumericStringType()])]);
            case 'numeric-string':
                return new IntersectionType([new StringType(), new AccessoryNumericStringType()]);
            case 'non-empty-string':
            case 'non-empty-lowercase-string':
                return new IntersectionType([new StringType(), new AccessoryNonEmptyStringType()]);
            case 'truthy-string':
            case 'non-falsy-string':
                return new IntersectionType([new StringType(), new AccessoryNonFalsyStringType()]);
            case 'non-empty-literal-string':
                return new IntersectionType([new StringType(), new AccessoryNonEmptyStringType(), new AccessoryLiteralStringType()]);
            case 'bool':
                return new BooleanType();
            case 'boolean':
                $type = $this->tryResolvePseudoTypeClassType($typeNode, $nameScope);
                if ($type !== null) {
                    return $type;
                }
                return new BooleanType();
            case 'true':
                return new ConstantBooleanType(\true);
            case 'false':
                return new ConstantBooleanType(\false);
            case 'null':
                return new NullType();
            case 'float':
                return new FloatType();
            case 'double':
                $type = $this->tryResolvePseudoTypeClassType($typeNode, $nameScope);
                if ($type !== null) {
                    return $type;
                }
                return new FloatType();
            case 'array':
            case 'associative-array':
                return new ArrayType(new MixedType(), new MixedType());
            case 'non-empty-array':
                return TypeCombinator::intersect(new ArrayType(new MixedType(), new MixedType()), new NonEmptyArrayType());
            case 'iterable':
                return new IterableType(new MixedType(), new MixedType());
            case 'callable':
            case 'pure-callable':
                return new CallableType();
            case 'resource':
                $type = $this->tryResolvePseudoTypeClassType($typeNode, $nameScope);
                if ($type !== null) {
                    return $type;
                }
                return new ResourceType();
            case 'closed-resource':
                return new ResourceType();
            case 'mixed':
                return new MixedType(\true);
            case 'non-empty-mixed':
                return new MixedType(\true, StaticTypeFactory::falsey());
            case 'void':
                return new VoidType();
            case 'object':
                return new ObjectWithoutClassType();
            case 'callable-object':
                return new IntersectionType([new ObjectWithoutClassType(), new CallableType()]);
            case 'callable-array':
                return new IntersectionType([new ArrayType(new MixedType(), new MixedType()), new CallableType()]);
            case 'never':
            case 'noreturn':
                $type = $this->tryResolvePseudoTypeClassType($typeNode, $nameScope);
                if ($type !== null) {
                    return $type;
                }
                return new NeverType(\true);
            case 'never-return':
            case 'never-returns':
            case 'no-return':
                return new NeverType(\true);
            case 'list':
                return AccessoryArrayListType::intersectWith(new ArrayType(new IntegerType(), new MixedType()));
            case 'non-empty-list':
                return AccessoryArrayListType::intersectWith(TypeCombinator::intersect(new ArrayType(new IntegerType(), new MixedType()), new NonEmptyArrayType()));
            case '__always-list':
                return TypeCombinator::intersect(new ArrayType(new IntegerType(), new MixedType()), new AccessoryArrayListType());
            case 'empty':
                $type = $this->tryResolvePseudoTypeClassType($typeNode, $nameScope);
                if ($type !== null) {
                    return $type;
                }
                return StaticTypeFactory::falsey();
            case '__stringandstringable':
                return new StringAlwaysAcceptingObjectWithToStringType();
        }
        if ($nameScope->getClassName() !== null) {
            switch (strtolower($typeNode->name)) {
                case 'self':
                    return new ObjectType($nameScope->getClassName());
                case 'static':
                    if ($this->getReflectionProvider()->hasClass($nameScope->getClassName())) {
                        $classReflection = $this->getReflectionProvider()->getClass($nameScope->getClassName());
                        return new StaticType($classReflection);
                    }
                    return new ErrorType();
                case 'parent':
                    if ($this->getReflectionProvider()->hasClass($nameScope->getClassName())) {
                        $classReflection = $this->getReflectionProvider()->getClass($nameScope->getClassName());
                        if ($classReflection->getParentClass() !== null) {
                            return new ObjectType($classReflection->getParentClass()->getName());
                        }
                    }
                    return new NonexistentParentClassType();
            }
        }
        if (!$nameScope->shouldBypassTypeAliases()) {
            $typeAlias = $this->getTypeAliasResolver()->resolveTypeAlias($typeNode->name, $nameScope);
            if ($typeAlias !== null) {
                return $typeAlias;
            }
        }
        $templateType = $nameScope->resolveTemplateTypeName($typeNode->name);
        if ($templateType !== null) {
            return $templateType;
        }
        $stringName = $nameScope->resolveStringName($typeNode->name);
        if (strpos($stringName, '-') !== \false && strpos($stringName, 'OCI-') !== 0) {
            return new ErrorType();
        }
        if ($this->mightBeConstant($typeNode->name) && !$this->getReflectionProvider()->hasClass($stringName)) {
            $constType = $this->tryResolveConstant($typeNode->name, $nameScope);
            if ($constType !== null) {
                return $constType;
            }
        }
        return new ObjectType($stringName);
    }
    private function mightBeConstant(string $name) : bool
    {
        return preg_match('((?:^|\\\\)[A-Z_][A-Z0-9_]*$)', $name) > 0;
    }
    private function tryResolveConstant(string $name, NameScope $nameScope) : ?Type
    {
        foreach ($nameScope->resolveConstantNames($name) as $constName) {
            $nameNode = new Name\FullyQualified(explode('\\', $constName));
            $constType = $this->constantResolver->resolveConstant($nameNode, null);
            if ($constType !== null) {
                return $constType;
            }
        }
        return null;
    }
    private function tryResolvePseudoTypeClassType(IdentifierTypeNode $typeNode, NameScope $nameScope) : ?Type
    {
        if ($nameScope->hasUseAlias($typeNode->name)) {
            return new ObjectType($nameScope->resolveStringName($typeNode->name));
        }
        if ($nameScope->getNamespace() === null) {
            return null;
        }
        $className = $nameScope->resolveStringName($typeNode->name);
        if ($this->getReflectionProvider()->hasClass($className)) {
            return new ObjectType($className);
        }
        return null;
    }
    private function resolveThisTypeNode(ThisTypeNode $typeNode, NameScope $nameScope) : Type
    {
        $className = $nameScope->getClassName();
        if ($className !== null) {
            if ($this->getReflectionProvider()->hasClass($className)) {
                return new ThisType($this->getReflectionProvider()->getClass($className));
            }
        }
        return new ErrorType();
    }
    private function resolveNullableTypeNode(NullableTypeNode $typeNode, NameScope $nameScope) : Type
    {
        return TypeCombinator::union($this->resolve($typeNode->type, $nameScope), new NullType());
    }
    private function resolveUnionTypeNode(UnionTypeNode $typeNode, NameScope $nameScope) : Type
    {
        $iterableTypeNodes = [];
        $otherTypeNodes = [];
        foreach ($typeNode->types as $innerTypeNode) {
            if ($innerTypeNode instanceof ArrayTypeNode) {
                $iterableTypeNodes[] = $innerTypeNode->type;
            } else {
                $otherTypeNodes[] = $innerTypeNode;
            }
        }
        $otherTypeTypes = $this->resolveMultiple($otherTypeNodes, $nameScope);
        if (count($iterableTypeNodes) > 0) {
            $arrayTypeTypes = $this->resolveMultiple($iterableTypeNodes, $nameScope);
            $arrayTypeType = TypeCombinator::union(...$arrayTypeTypes);
            $addArray = \true;
            foreach ($otherTypeTypes as &$type) {
                if (!$type->isIterable()->yes() || !$type->getIterableValueType()->isSuperTypeOf($arrayTypeType)->yes()) {
                    continue;
                }
                if ($type instanceof ObjectType) {
                    $type = new IntersectionType([$type, new IterableType(new MixedType(), $arrayTypeType)]);
                } elseif ($type instanceof ArrayType) {
                    $type = new ArrayType(new MixedType(), $arrayTypeType);
                } elseif ($type instanceof IterableType) {
                    $type = new IterableType(new MixedType(), $arrayTypeType);
                } else {
                    continue;
                }
                $addArray = \false;
            }
            if ($addArray) {
                $otherTypeTypes[] = new ArrayType(new MixedType(), $arrayTypeType);
            }
        }
        return TypeCombinator::union(...$otherTypeTypes);
    }
    private function resolveIntersectionTypeNode(IntersectionTypeNode $typeNode, NameScope $nameScope) : Type
    {
        $types = $this->resolveMultiple($typeNode->types, $nameScope);
        return TypeCombinator::intersect(...$types);
    }
    private function resolveConditionalTypeNode(ConditionalTypeNode $typeNode, NameScope $nameScope) : Type
    {
        return new ConditionalType($this->resolve($typeNode->subjectType, $nameScope), $this->resolve($typeNode->targetType, $nameScope), $this->resolve($typeNode->if, $nameScope), $this->resolve($typeNode->else, $nameScope), $typeNode->negated);
    }
    private function resolveConditionalTypeForParameterNode(ConditionalTypeForParameterNode $typeNode, NameScope $nameScope) : Type
    {
        return new ConditionalTypeForParameter($typeNode->parameterName, $this->resolve($typeNode->targetType, $nameScope), $this->resolve($typeNode->if, $nameScope), $this->resolve($typeNode->else, $nameScope), $typeNode->negated);
    }
    private function resolveArrayTypeNode(ArrayTypeNode $typeNode, NameScope $nameScope) : Type
    {
        $itemType = $this->resolve($typeNode->type, $nameScope);
        return new ArrayType(new BenevolentUnionType([new IntegerType(), new StringType()]), $itemType);
    }
    private function resolveGenericTypeNode(GenericTypeNode $typeNode, NameScope $nameScope) : Type
    {
        $mainTypeName = strtolower($typeNode->type->name);
        $genericTypes = $this->resolveMultiple($typeNode->genericTypes, $nameScope);
        if ($mainTypeName === 'array' || $mainTypeName === 'non-empty-array') {
            if (count($genericTypes) === 1) {
                // array<ValueType>
                $arrayType = new ArrayType(new BenevolentUnionType([new IntegerType(), new StringType()]), $genericTypes[0]);
            } elseif (count($genericTypes) === 2) {
                // array<KeyType, ValueType>
                $keyType = TypeCombinator::intersect($genericTypes[0], new UnionType([new IntegerType(), new StringType()]));
                $arrayType = new ArrayType($keyType->toArrayKey(), $genericTypes[1]);
            } else {
                return new ErrorType();
            }
            if ($mainTypeName === 'non-empty-array') {
                return TypeCombinator::intersect($arrayType, new NonEmptyArrayType());
            }
            return $arrayType;
        } elseif ($mainTypeName === 'list' || $mainTypeName === 'non-empty-list') {
            if (count($genericTypes) === 1) {
                // list<ValueType>
                $listType = AccessoryArrayListType::intersectWith(new ArrayType(new IntegerType(), $genericTypes[0]));
                if ($mainTypeName === 'non-empty-list') {
                    return TypeCombinator::intersect($listType, new NonEmptyArrayType());
                }
                return $listType;
            }
            return new ErrorType();
        } elseif ($mainTypeName === 'iterable') {
            if (count($genericTypes) === 1) {
                // iterable<ValueType>
                return new IterableType(new MixedType(\true), $genericTypes[0]);
            }
            if (count($genericTypes) === 2) {
                // iterable<KeyType, ValueType>
                return new IterableType($genericTypes[0], $genericTypes[1]);
            }
        } elseif (in_array($mainTypeName, ['class-string', 'interface-string'], \true)) {
            if (count($genericTypes) === 1) {
                $genericType = $genericTypes[0];
                if ($genericType->isObject()->yes() || $genericType instanceof MixedType) {
                    return new GenericClassStringType($genericType);
                }
            }
            return new ErrorType();
        } elseif ($mainTypeName === 'int') {
            if (count($genericTypes) === 2) {
                // int<min, max>, int<1, 3>
                if ($genericTypes[0] instanceof ConstantIntegerType) {
                    $min = $genericTypes[0]->getValue();
                } elseif ($typeNode->genericTypes[0] instanceof IdentifierTypeNode && $typeNode->genericTypes[0]->name === 'min') {
                    $min = null;
                } else {
                    return new ErrorType();
                }
                if ($genericTypes[1] instanceof ConstantIntegerType) {
                    $max = $genericTypes[1]->getValue();
                } elseif ($typeNode->genericTypes[1] instanceof IdentifierTypeNode && $typeNode->genericTypes[1]->name === 'max') {
                    $max = null;
                } else {
                    return new ErrorType();
                }
                return IntegerRangeType::fromInterval($min, $max);
            }
        } elseif ($mainTypeName === 'key-of') {
            if (count($genericTypes) === 1) {
                // key-of<ValueType>
                $type = new KeyOfType($genericTypes[0]);
                return $type->isResolvable() ? $type->resolve() : $type;
            }
            return new ErrorType();
        } elseif ($mainTypeName === 'value-of') {
            if (count($genericTypes) === 1) {
                // value-of<ValueType>
                $genericType = $genericTypes[0];
                if ($genericType->isEnum()->yes()) {
                    $valueTypes = [];
                    foreach ($genericType->getEnumCases() as $enumCase) {
                        $valueType = $enumCase->getBackingValueType();
                        if ($valueType === null) {
                            continue;
                        }
                        $valueTypes[] = $valueType;
                    }
                    return TypeCombinator::union(...$valueTypes);
                }
                $type = new ValueOfType($genericType);
                return $type->isResolvable() ? $type->resolve() : $type;
            }
            return new ErrorType();
        } elseif ($mainTypeName === 'int-mask-of') {
            if (count($genericTypes) === 1) {
                // int-mask-of<Class::CONST*>
                $maskType = $this->expandIntMaskToType($genericTypes[0]);
                if ($maskType !== null) {
                    return $maskType;
                }
            }
            return new ErrorType();
        } elseif ($mainTypeName === 'int-mask') {
            if (count($genericTypes) > 0) {
                // int-mask<1, 2, 4>
                $maskType = $this->expandIntMaskToType(TypeCombinator::union(...$genericTypes));
                if ($maskType !== null) {
                    return $maskType;
                }
            }
            return new ErrorType();
        } elseif ($mainTypeName === '__benevolent') {
            if (count($genericTypes) === 1) {
                return TypeUtils::toBenevolentUnion($genericTypes[0]);
            }
            return new ErrorType();
        } elseif ($mainTypeName === 'template-type') {
            if (count($genericTypes) === 3) {
                $result = [];
                /** @var class-string $ancestorClassName */
                foreach ($genericTypes[1]->getObjectClassNames() as $ancestorClassName) {
                    foreach ($genericTypes[2]->getConstantStrings() as $templateTypeName) {
                        $result[] = new GetTemplateTypeType($genericTypes[0], $ancestorClassName, $templateTypeName->getValue());
                    }
                }
                return TypeCombinator::union(...$result);
            }
            return new ErrorType();
        }
        $mainType = $this->resolveIdentifierTypeNode($typeNode->type, $nameScope);
        $mainTypeObjectClassNames = $mainType->getObjectClassNames();
        if (count($mainTypeObjectClassNames) > 1) {
            throw new ShouldNotHappenException();
        }
        $mainTypeClassName = $mainTypeObjectClassNames[0] ?? null;
        if ($mainTypeClassName !== null) {
            if (!$this->getReflectionProvider()->hasClass($mainTypeClassName)) {
                return new GenericObjectType($mainTypeClassName, $genericTypes);
            }
            $classReflection = $this->getReflectionProvider()->getClass($mainTypeClassName);
            if ($classReflection->isGeneric()) {
                if (in_array($mainTypeClassName, [Traversable::class, IteratorAggregate::class, Iterator::class], \true)) {
                    if (count($genericTypes) === 1) {
                        return new GenericObjectType($mainTypeClassName, [new MixedType(\true), $genericTypes[0]]);
                    }
                    if (count($genericTypes) === 2) {
                        return new GenericObjectType($mainTypeClassName, [$genericTypes[0], $genericTypes[1]]);
                    }
                }
                if ($mainTypeClassName === Generator::class) {
                    if (count($genericTypes) === 1) {
                        $mixed = new MixedType(\true);
                        return new GenericObjectType($mainTypeClassName, [$mixed, $genericTypes[0], $mixed, $mixed]);
                    }
                    if (count($genericTypes) === 2) {
                        $mixed = new MixedType(\true);
                        return new GenericObjectType($mainTypeClassName, [$genericTypes[0], $genericTypes[1], $mixed, $mixed]);
                    }
                }
                if (!$mainType->isIterable()->yes()) {
                    return new GenericObjectType($mainTypeClassName, $genericTypes);
                }
                if (count($genericTypes) !== 1 || $classReflection->getTemplateTypeMap()->count() === 1) {
                    return new GenericObjectType($mainTypeClassName, $genericTypes);
                }
            }
        }
        if ($mainType->isIterable()->yes()) {
            if (count($genericTypes) === 1) {
                // Foo<ValueType>
                return TypeCombinator::intersect($mainType, new IterableType(new MixedType(\true), $genericTypes[0]));
            }
            if (count($genericTypes) === 2) {
                // Foo<KeyType, ValueType>
                return TypeCombinator::intersect($mainType, new IterableType($genericTypes[0], $genericTypes[1]));
            }
        }
        if ($mainTypeClassName !== null) {
            return new GenericObjectType($mainTypeClassName, $genericTypes);
        }
        return new ErrorType();
    }
    private function resolveCallableTypeNode(CallableTypeNode $typeNode, NameScope $nameScope) : Type
    {
        $mainType = $this->resolve($typeNode->identifier, $nameScope);
        $isVariadic = \false;
        $parameters = array_map(function (CallableTypeParameterNode $parameterNode) use($nameScope, &$isVariadic) : NativeParameterReflection {
            $isVariadic = $isVariadic || $parameterNode->isVariadic;
            $parameterName = $parameterNode->parameterName;
            if (strpos($parameterName, '$') === 0) {
                $parameterName = substr($parameterName, 1);
            }
            return new NativeParameterReflection($parameterName, $parameterNode->isOptional || $parameterNode->isVariadic, $this->resolve($parameterNode->type, $nameScope), $parameterNode->isReference ? PassedByReference::createCreatesNewVariable() : PassedByReference::createNo(), $parameterNode->isVariadic, null);
        }, $typeNode->parameters);
        $returnType = $this->resolve($typeNode->returnType, $nameScope);
        if ($mainType instanceof CallableType) {
            return new CallableType($parameters, $returnType, $isVariadic);
        } elseif ($mainType instanceof ObjectType && $mainType->getClassName() === Closure::class) {
            return new ClosureType($parameters, $returnType, $isVariadic);
        }
        return new ErrorType();
    }
    private function resolveArrayShapeNode(ArrayShapeNode $typeNode, NameScope $nameScope) : Type
    {
        $builder = ConstantArrayTypeBuilder::createEmpty();
        if (count($typeNode->items) > ConstantArrayTypeBuilder::ARRAY_COUNT_LIMIT) {
            $builder->degradeToGeneralArray(\true);
        }
        foreach ($typeNode->items as $itemNode) {
            $offsetType = null;
            if ($itemNode->keyName instanceof ConstExprIntegerNode) {
                $offsetType = new ConstantIntegerType((int) $itemNode->keyName->value);
            } elseif ($itemNode->keyName instanceof IdentifierTypeNode) {
                $offsetType = new ConstantStringType($itemNode->keyName->name);
            } elseif ($itemNode->keyName instanceof ConstExprStringNode) {
                $offsetType = new ConstantStringType($itemNode->keyName->value);
            } elseif ($itemNode->keyName !== null) {
                throw new ShouldNotHappenException('Unsupported key node type: ' . get_class($itemNode->keyName));
            }
            $builder->setOffsetValueType($offsetType, $this->resolve($itemNode->valueType, $nameScope), $itemNode->optional);
        }
        $arrayType = $builder->getArray();
        if ($typeNode->kind === ArrayShapeNode::KIND_LIST) {
            $arrayType = AccessoryArrayListType::intersectWith($arrayType);
        }
        return $arrayType;
    }
    private function resolveObjectShapeNode(ObjectShapeNode $typeNode, NameScope $nameScope) : Type
    {
        $properties = [];
        $optionalProperties = [];
        foreach ($typeNode->items as $itemNode) {
            if ($itemNode->keyName instanceof IdentifierTypeNode) {
                $propertyName = $itemNode->keyName->name;
            } elseif ($itemNode->keyName instanceof ConstExprStringNode) {
                $propertyName = $itemNode->keyName->value;
            }
            if ($itemNode->optional) {
                $optionalProperties[] = $propertyName;
            }
            $properties[$propertyName] = $this->resolve($itemNode->valueType, $nameScope);
        }
        return new ObjectShapeType($properties, $optionalProperties);
    }
    private function resolveConstTypeNode(ConstTypeNode $typeNode, NameScope $nameScope) : Type
    {
        $constExpr = $typeNode->constExpr;
        if ($constExpr instanceof ConstExprArrayNode) {
            throw new ShouldNotHappenException();
            // we prefer array shapes
        }
        if ($constExpr instanceof ConstExprFalseNode || $constExpr instanceof ConstExprTrueNode || $constExpr instanceof ConstExprNullNode) {
            throw new ShouldNotHappenException();
            // we prefer IdentifierTypeNode
        }
        if ($constExpr instanceof ConstFetchNode) {
            if ($constExpr->className === '') {
                throw new ShouldNotHappenException();
                // global constant should get parsed as class name in IdentifierTypeNode
            }
            if ($nameScope->getClassName() !== null) {
                switch (strtolower($constExpr->className)) {
                    case 'static':
                    case 'self':
                        $className = $nameScope->getClassName();
                        break;
                    case 'parent':
                        if ($this->getReflectionProvider()->hasClass($nameScope->getClassName())) {
                            $classReflection = $this->getReflectionProvider()->getClass($nameScope->getClassName());
                            if ($classReflection->getParentClass() === null) {
                                return new ErrorType();
                            }
                            $className = $classReflection->getParentClass()->getName();
                        }
                }
            }
            if (!isset($className)) {
                $className = $nameScope->resolveStringName($constExpr->className);
            }
            if (!$this->getReflectionProvider()->hasClass($className)) {
                return new ErrorType();
            }
            $classReflection = $this->getReflectionProvider()->getClass($className);
            $constantName = $constExpr->name;
            if (Strings::contains($constantName, '*')) {
                // convert * into .*? and escape everything else so the constants can be matched against the pattern
                $pattern = '{^' . str_replace('\\*', '.*?', preg_quote($constantName)) . '$}D';
                $constantTypes = [];
                foreach ($classReflection->getNativeReflection()->getReflectionConstants() as $reflectionConstant) {
                    $classConstantName = $reflectionConstant->getName();
                    if (Strings::match($classConstantName, $pattern) === null) {
                        continue;
                    }
                    if ($classReflection->isEnum() && $classReflection->hasEnumCase($classConstantName)) {
                        $constantTypes[] = new EnumCaseObjectType($classReflection->getName(), $classConstantName);
                        continue;
                    }
                    $declaringClassName = $reflectionConstant->getDeclaringClass()->getName();
                    if (!$this->getReflectionProvider()->hasClass($declaringClassName)) {
                        continue;
                    }
                    $constantTypes[] = $this->initializerExprTypeResolver->getType($reflectionConstant->getValueExpression(), InitializerExprContext::fromClassReflection($this->getReflectionProvider()->getClass($declaringClassName)));
                }
                if (count($constantTypes) === 0) {
                    return new ErrorType();
                }
                return TypeCombinator::union(...$constantTypes);
            }
            if (!$classReflection->hasConstant($constantName)) {
                return new ErrorType();
            }
            if ($classReflection->isEnum() && $classReflection->hasEnumCase($constantName)) {
                return new EnumCaseObjectType($classReflection->getName(), $constantName);
            }
            $reflectionConstant = $classReflection->getConstant($constantName);
            return $this->initializerExprTypeResolver->getType($reflectionConstant->getValueExpr(), InitializerExprContext::fromClassReflection($reflectionConstant->getDeclaringClass()));
        }
        if ($constExpr instanceof ConstExprFloatNode) {
            return new ConstantFloatType((float) $constExpr->value);
        }
        if ($constExpr instanceof ConstExprIntegerNode) {
            return new ConstantIntegerType((int) $constExpr->value);
        }
        if ($constExpr instanceof ConstExprStringNode) {
            return new ConstantStringType($constExpr->value);
        }
        return new ErrorType();
    }
    private function resolveOffsetAccessNode(OffsetAccessTypeNode $typeNode, NameScope $nameScope) : Type
    {
        $type = $this->resolve($typeNode->type, $nameScope);
        $offset = $this->resolve($typeNode->offset, $nameScope);
        if ($type->isOffsetAccessible()->no() || $type->hasOffsetValueType($offset)->no()) {
            return new ErrorType();
        }
        return new OffsetAccessType($type, $offset);
    }
    private function expandIntMaskToType(Type $type) : ?Type
    {
        $ints = array_map(static function (ConstantIntegerType $type) {
            return $type->getValue();
        }, TypeUtils::getConstantIntegers($type));
        if (count($ints) === 0) {
            return null;
        }
        $values = [];
        foreach ($ints as $int) {
            if ($int !== 0 && !array_key_exists($int, $values)) {
                foreach ($values as $value) {
                    $computedValue = $value | $int;
                    $values[$computedValue] = $computedValue;
                }
            }
            $values[$int] = $int;
        }
        $values[0] = 0;
        $min = min($values);
        $max = max($values);
        if ($max - $min === count($values) - 1) {
            return IntegerRangeType::fromInterval($min, $max);
        }
        return TypeCombinator::union(...array_map(static function ($value) {
            return new ConstantIntegerType($value);
        }, $values));
    }
    /**
     * @api
     * @param TypeNode[] $typeNodes
     * @return Type[]
     */
    public function resolveMultiple(array $typeNodes, NameScope $nameScope) : array
    {
        $types = [];
        foreach ($typeNodes as $typeNode) {
            $types[] = $this->resolve($typeNode, $nameScope);
        }
        return $types;
    }
    private function getReflectionProvider() : ReflectionProvider
    {
        return $this->reflectionProviderProvider->getReflectionProvider();
    }
    private function getTypeAliasResolver() : TypeAliasResolver
    {
        return $this->typeAliasResolverProvider->getTypeAliasResolver();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc;

use PHPStan\Analyser\NameScope;
use PHPStan\PhpDocParser\Lexer\Lexer;
use PHPStan\PhpDocParser\Parser\TokenIterator;
use PHPStan\PhpDocParser\Parser\TypeParser;
use PHPStan\Type\Type;
class TypeStringResolver
{
    /**
     * @var \PHPStan\PhpDocParser\Lexer\Lexer
     */
    private $typeLexer;
    /**
     * @var \PHPStan\PhpDocParser\Parser\TypeParser
     */
    private $typeParser;
    /**
     * @var \PHPStan\PhpDoc\TypeNodeResolver
     */
    private $typeNodeResolver;
    public function __construct(Lexer $typeLexer, TypeParser $typeParser, \PHPStan\PhpDoc\TypeNodeResolver $typeNodeResolver)
    {
        $this->typeLexer = $typeLexer;
        $this->typeParser = $typeParser;
        $this->typeNodeResolver = $typeNodeResolver;
    }
    /** @api */
    public function resolve(string $typeString, ?NameScope $nameScope = null) : Type
    {
        $tokens = new TokenIterator($this->typeLexer->tokenize($typeString));
        $typeNode = $this->typeParser->parse($tokens);
        $tokens->consumeTokenType(Lexer::TOKEN_END);
        // @phpstan-ignore-line
        return $this->typeNodeResolver->resolve($typeNode, $nameScope ?? new NameScope(null, []));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc;

use PhpParser\Node;
use PhpParser\Node\Expr\Variable;
use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\Interface_;
use PhpParser\Node\Stmt\Trait_;
use PHPStan\Parser\Parser;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\FileTypeMapper;
use function array_key_exists;
use function array_map;
use function is_string;
class StubPhpDocProvider
{
    /** @var array<string, ResolvedPhpDocBlock|null> */
    private $classMap = [];
    /** @var array<string, array<string, ResolvedPhpDocBlock|null>> */
    private $propertyMap = [];
    /** @var array<string, array<string, ResolvedPhpDocBlock|null>> */
    private $constantMap = [];
    /** @var array<string, array<string, null>> */
    private $methodMap = [];
    /** @var array<string, ResolvedPhpDocBlock|null> */
    private $functionMap = [];
    /**
     * @var bool
     */
    private $initialized = \false;
    /**
     * @var bool
     */
    private $initializing = \false;
    /** @var array<string, array{string, string}> */
    private $knownClassesDocComments = [];
    /** @var array<string, array{string, string}> */
    private $knownFunctionsDocComments = [];
    /** @var array<string, array<string, array{string, string}>> */
    private $knownPropertiesDocComments = [];
    /** @var array<string, array<string, array{string, string}>> */
    private $knownConstantsDocComments = [];
    /** @var array<string, array<string, array{string, string}>> */
    private $knownMethodsDocComments = [];
    /** @var array<string, array<string, array<string>>> */
    private $knownMethodsParameterNames = [];
    /** @var array<string, array<string>> */
    private $knownFunctionParameterNames = [];
    /**
     * @var \PHPStan\Parser\Parser
     */
    private $parser;
    /**
     * @var \PHPStan\Type\FileTypeMapper
     */
    private $fileTypeMapper;
    /**
     * @var \PHPStan\PhpDoc\StubFilesProvider
     */
    private $stubFilesProvider;
    public function __construct(Parser $parser, FileTypeMapper $fileTypeMapper, \PHPStan\PhpDoc\StubFilesProvider $stubFilesProvider)
    {
        $this->parser = $parser;
        $this->fileTypeMapper = $fileTypeMapper;
        $this->stubFilesProvider = $stubFilesProvider;
    }
    public function findClassPhpDoc(string $className) : ?\PHPStan\PhpDoc\ResolvedPhpDocBlock
    {
        if (!$this->isKnownClass($className)) {
            return null;
        }
        if (array_key_exists($className, $this->classMap)) {
            return $this->classMap[$className];
        }
        if (array_key_exists($className, $this->knownClassesDocComments)) {
            [$file, $docComment] = $this->knownClassesDocComments[$className];
            $this->classMap[$className] = $this->fileTypeMapper->getResolvedPhpDoc($file, $className, null, null, $docComment);
            return $this->classMap[$className];
        }
        return null;
    }
    public function findPropertyPhpDoc(string $className, string $propertyName) : ?\PHPStan\PhpDoc\ResolvedPhpDocBlock
    {
        if (!$this->isKnownClass($className)) {
            return null;
        }
        if (array_key_exists($propertyName, $this->propertyMap[$className])) {
            return $this->propertyMap[$className][$propertyName];
        }
        if (array_key_exists($propertyName, $this->knownPropertiesDocComments[$className])) {
            [$file, $docComment] = $this->knownPropertiesDocComments[$className][$propertyName];
            $this->propertyMap[$className][$propertyName] = $this->fileTypeMapper->getResolvedPhpDoc($file, $className, null, null, $docComment);
            return $this->propertyMap[$className][$propertyName];
        }
        return null;
    }
    public function findClassConstantPhpDoc(string $className, string $constantName) : ?\PHPStan\PhpDoc\ResolvedPhpDocBlock
    {
        if (!$this->isKnownClass($className)) {
            return null;
        }
        if (array_key_exists($constantName, $this->constantMap[$className])) {
            return $this->constantMap[$className][$constantName];
        }
        if (array_key_exists($constantName, $this->knownConstantsDocComments[$className])) {
            [$file, $docComment] = $this->knownConstantsDocComments[$className][$constantName];
            $this->constantMap[$className][$constantName] = $this->fileTypeMapper->getResolvedPhpDoc($file, $className, null, null, $docComment);
            return $this->constantMap[$className][$constantName];
        }
        return null;
    }
    /**
     * @param array<int, string> $positionalParameterNames
     */
    public function findMethodPhpDoc(string $className, string $methodName, array $positionalParameterNames) : ?\PHPStan\PhpDoc\ResolvedPhpDocBlock
    {
        if (!$this->isKnownClass($className)) {
            return null;
        }
        if (array_key_exists($methodName, $this->methodMap[$className])) {
            return $this->methodMap[$className][$methodName];
        }
        if (array_key_exists($methodName, $this->knownMethodsDocComments[$className])) {
            [$file, $docComment] = $this->knownMethodsDocComments[$className][$methodName];
            $resolvedPhpDoc = $this->fileTypeMapper->getResolvedPhpDoc($file, $className, null, $methodName, $docComment);
            if (!isset($this->knownMethodsParameterNames[$className][$methodName])) {
                throw new ShouldNotHappenException();
            }
            $methodParameterNames = $this->knownMethodsParameterNames[$className][$methodName];
            $parameterNameMapping = [];
            foreach ($positionalParameterNames as $i => $parameterName) {
                if (!array_key_exists($i, $methodParameterNames)) {
                    continue;
                }
                $parameterNameMapping[$methodParameterNames[$i]] = $parameterName;
            }
            return $resolvedPhpDoc->changeParameterNamesByMapping($parameterNameMapping);
        }
        return null;
    }
    /**
     * @param array<int, string> $positionalParameterNames
     * @throws ShouldNotHappenException
     */
    public function findFunctionPhpDoc(string $functionName, array $positionalParameterNames) : ?\PHPStan\PhpDoc\ResolvedPhpDocBlock
    {
        if (!$this->isKnownFunction($functionName)) {
            return null;
        }
        if (array_key_exists($functionName, $this->functionMap)) {
            return $this->functionMap[$functionName];
        }
        if (array_key_exists($functionName, $this->knownFunctionsDocComments)) {
            [$file, $docComment] = $this->knownFunctionsDocComments[$functionName];
            $resolvedPhpDoc = $this->fileTypeMapper->getResolvedPhpDoc($file, null, null, $functionName, $docComment);
            if (!isset($this->knownFunctionParameterNames[$functionName])) {
                throw new ShouldNotHappenException();
            }
            $functionParameterNames = $this->knownFunctionParameterNames[$functionName];
            $parameterNameMapping = [];
            foreach ($positionalParameterNames as $i => $parameterName) {
                if (!array_key_exists($i, $functionParameterNames)) {
                    continue;
                }
                $parameterNameMapping[$functionParameterNames[$i]] = $parameterName;
            }
            $this->functionMap[$functionName] = $resolvedPhpDoc->changeParameterNamesByMapping($parameterNameMapping);
            return $this->functionMap[$functionName];
        }
        return null;
    }
    public function isKnownClass(string $className) : bool
    {
        $this->initializeKnownElements();
        if (array_key_exists($className, $this->classMap)) {
            return \true;
        }
        return array_key_exists($className, $this->knownClassesDocComments);
    }
    private function isKnownFunction(string $functionName) : bool
    {
        $this->initializeKnownElements();
        if (array_key_exists($functionName, $this->functionMap)) {
            return \true;
        }
        return array_key_exists($functionName, $this->knownFunctionsDocComments);
    }
    private function initializeKnownElements() : void
    {
        if ($this->initializing) {
            throw new ShouldNotHappenException();
        }
        if ($this->initialized) {
            return;
        }
        $this->initializing = \true;
        try {
            foreach ($this->stubFilesProvider->getStubFiles() as $stubFile) {
                $nodes = $this->parser->parseFile($stubFile);
                foreach ($nodes as $node) {
                    $this->initializeKnownElementNode($stubFile, $node);
                }
            }
        } finally {
            $this->initializing = \false;
            $this->initialized = \true;
        }
    }
    private function initializeKnownElementNode(string $stubFile, Node $node) : void
    {
        if ($node instanceof Node\Stmt\Namespace_) {
            foreach ($node->stmts as $stmt) {
                $this->initializeKnownElementNode($stubFile, $stmt);
            }
            return;
        }
        if ($node instanceof Node\Stmt\Function_) {
            $functionName = (string) $node->namespacedName;
            $docComment = $node->getDocComment();
            if ($docComment === null) {
                $this->functionMap[$functionName] = null;
                return;
            }
            $this->knownFunctionParameterNames[$functionName] = array_map(static function (Node\Param $param) : string {
                if (!$param->var instanceof Variable || !is_string($param->var->name)) {
                    throw new ShouldNotHappenException();
                }
                return $param->var->name;
            }, $node->getParams());
            $this->knownFunctionsDocComments[$functionName] = [$stubFile, $docComment->getText()];
            return;
        }
        if (!$node instanceof Class_ && !$node instanceof Interface_ && !$node instanceof Trait_ && !$node instanceof Node\Stmt\Enum_) {
            return;
        }
        if (!isset($node->namespacedName)) {
            return;
        }
        $className = (string) $node->namespacedName;
        $docComment = $node->getDocComment();
        if ($docComment === null) {
            $this->classMap[$className] = null;
        } else {
            $this->knownClassesDocComments[$className] = [$stubFile, $docComment->getText()];
        }
        $this->methodMap[$className] = [];
        $this->propertyMap[$className] = [];
        $this->constantMap[$className] = [];
        $this->knownPropertiesDocComments[$className] = [];
        $this->knownConstantsDocComments[$className] = [];
        $this->knownMethodsDocComments[$className] = [];
        foreach ($node->stmts as $stmt) {
            $docComment = $stmt->getDocComment();
            if ($stmt instanceof Node\Stmt\Property) {
                foreach ($stmt->props as $property) {
                    if ($docComment === null) {
                        $this->propertyMap[$className][$property->name->toString()] = null;
                        continue;
                    }
                    $this->knownPropertiesDocComments[$className][$property->name->toString()] = [$stubFile, $docComment->getText()];
                }
            } elseif ($stmt instanceof Node\Stmt\ClassConst) {
                foreach ($stmt->consts as $const) {
                    if ($docComment === null) {
                        $this->constantMap[$className][$const->name->toString()] = null;
                        continue;
                    }
                    $this->knownConstantsDocComments[$className][$const->name->toString()] = [$stubFile, $docComment->getText()];
                }
            } elseif ($stmt instanceof Node\Stmt\ClassMethod) {
                if ($docComment === null) {
                    $this->methodMap[$className][$stmt->name->toString()] = null;
                    continue;
                }
                $methodName = $stmt->name->toString();
                $this->knownMethodsDocComments[$className][$methodName] = [$stubFile, $docComment->getText()];
                $this->knownMethodsParameterNames[$className][$methodName] = array_map(static function (Node\Param $param) : string {
                    if (!$param->var instanceof Variable || !is_string($param->var->name)) {
                        throw new ShouldNotHappenException();
                    }
                    return $param->var->name;
                }, $stmt->getParams());
            }
        }
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc;

use PHPStan\PhpDoc\Tag\AssertTagParameter;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ConstantReflection;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\Php\PhpMethodReflection;
use PHPStan\Reflection\Php\PhpPropertyReflection;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Reflection\ResolvedMethodReflection;
use PHPStan\Reflection\ResolvedPropertyReflection;
use PHPStan\Type\ConditionalTypeForParameter;
use PHPStan\Type\Type;
use PHPStan\Type\TypeTraverser;
use function array_key_exists;
use function count;
use function strtolower;
use function substr;
class PhpDocBlock
{
    /**
     * @var string
     */
    private $docComment;
    /**
     * @var string|null
     */
    private $file;
    /**
     * @var \PHPStan\Reflection\ClassReflection
     */
    private $classReflection;
    /**
     * @var string|null
     */
    private $trait;
    /**
     * @var bool
     */
    private $explicit;
    /**
     * @var array<string, string>
     */
    private $parameterNameMapping;
    /**
     * @var array<int, self>
     */
    private $parents;
    /**
     * @param array<string, string> $parameterNameMapping
     * @param array<int, self> $parents
     */
    private function __construct(string $docComment, ?string $file, ClassReflection $classReflection, ?string $trait, bool $explicit, array $parameterNameMapping, array $parents)
    {
        $this->docComment = $docComment;
        $this->file = $file;
        $this->classReflection = $classReflection;
        $this->trait = $trait;
        $this->explicit = $explicit;
        $this->parameterNameMapping = $parameterNameMapping;
        $this->parents = $parents;
    }
    public function getDocComment() : string
    {
        return $this->docComment;
    }
    public function getFile() : ?string
    {
        return $this->file;
    }
    public function getClassReflection() : ClassReflection
    {
        return $this->classReflection;
    }
    public function getTrait() : ?string
    {
        return $this->trait;
    }
    public function isExplicit() : bool
    {
        return $this->explicit;
    }
    /**
     * @return array<int, self>
     */
    public function getParents() : array
    {
        return $this->parents;
    }
    /**
     * @template T
     * @param array<string, T> $array
     * @return array<string, T>
     */
    public function transformArrayKeysWithParameterNameMapping(array $array) : array
    {
        $newArray = [];
        foreach ($array as $key => $value) {
            if (!array_key_exists($key, $this->parameterNameMapping)) {
                continue;
            }
            $newArray[$this->parameterNameMapping[$key]] = $value;
        }
        return $newArray;
    }
    public function transformConditionalReturnTypeWithParameterNameMapping(Type $type) : Type
    {
        return TypeTraverser::map($type, function (Type $type, callable $traverse) : Type {
            if ($type instanceof ConditionalTypeForParameter) {
                $parameterName = substr($type->getParameterName(), 1);
                if (array_key_exists($parameterName, $this->parameterNameMapping)) {
                    $type = $type->changeParameterName('$' . $this->parameterNameMapping[$parameterName]);
                }
            }
            return $traverse($type);
        });
    }
    public function transformAssertTagParameterWithParameterNameMapping(AssertTagParameter $parameter) : AssertTagParameter
    {
        $parameterName = substr($parameter->getParameterName(), 1);
        if (array_key_exists($parameterName, $this->parameterNameMapping)) {
            $parameter = $parameter->changeParameterName('$' . $this->parameterNameMapping[$parameterName]);
        }
        return $parameter;
    }
    /**
     * @param array<int, string> $originalPositionalParameterNames
     * @param array<int, string> $newPositionalParameterNames
     */
    public static function resolvePhpDocBlockForProperty(
        ?string $docComment,
        ClassReflection $classReflection,
        ?string $trait,
        string $propertyName,
        ?string $file,
        ?bool $explicit,
        array $originalPositionalParameterNames,
        // unused
        array $newPositionalParameterNames
    ) : self
    {
        return self::resolvePhpDocBlockTree($docComment, $classReflection, $trait, $propertyName, $file, 'hasNativeProperty', 'getNativeProperty', __FUNCTION__, $explicit, [], []);
    }
    /**
     * @param array<int, string> $originalPositionalParameterNames
     * @param array<int, string> $newPositionalParameterNames
     */
    public static function resolvePhpDocBlockForConstant(
        ?string $docComment,
        ClassReflection $classReflection,
        ?string $trait,
        // unused
        string $constantName,
        ?string $file,
        ?bool $explicit,
        array $originalPositionalParameterNames,
        // unused
        array $newPositionalParameterNames
    ) : self
    {
        return self::resolvePhpDocBlockTree($docComment, $classReflection, null, $constantName, $file, 'hasConstant', 'getConstant', __FUNCTION__, $explicit, [], []);
    }
    /**
     * @param array<int, string> $originalPositionalParameterNames
     * @param array<int, string> $newPositionalParameterNames
     */
    public static function resolvePhpDocBlockForMethod(?string $docComment, ClassReflection $classReflection, ?string $trait, string $methodName, ?string $file, ?bool $explicit, array $originalPositionalParameterNames, array $newPositionalParameterNames) : self
    {
        return self::resolvePhpDocBlockTree($docComment, $classReflection, $trait, $methodName, $file, 'hasNativeMethod', 'getNativeMethod', __FUNCTION__, $explicit, $originalPositionalParameterNames, $newPositionalParameterNames);
    }
    /**
     * @param array<int, string> $originalPositionalParameterNames
     * @param array<int, string> $newPositionalParameterNames
     */
    private static function resolvePhpDocBlockTree(?string $docComment, ClassReflection $classReflection, ?string $trait, string $name, ?string $file, string $hasMethodName, string $getMethodName, string $resolveMethodName, ?bool $explicit, array $originalPositionalParameterNames, array $newPositionalParameterNames) : self
    {
        $docBlocksFromParents = self::resolveParentPhpDocBlocks($classReflection, $name, $hasMethodName, $getMethodName, $resolveMethodName, $explicit ?? $docComment !== null, $newPositionalParameterNames);
        return new self($docComment ?? \PHPStan\PhpDoc\ResolvedPhpDocBlock::EMPTY_DOC_STRING, $file, $classReflection, $trait, $explicit ?? \true, self::remapParameterNames($originalPositionalParameterNames, $newPositionalParameterNames), $docBlocksFromParents);
    }
    /**
     * @param array<int, string> $originalPositionalParameterNames
     * @param array<int, string> $newPositionalParameterNames
     * @return array<string, string>
     */
    private static function remapParameterNames(array $originalPositionalParameterNames, array $newPositionalParameterNames) : array
    {
        $parameterNameMapping = [];
        foreach ($originalPositionalParameterNames as $i => $parameterName) {
            if (!array_key_exists($i, $newPositionalParameterNames)) {
                continue;
            }
            $parameterNameMapping[$newPositionalParameterNames[$i]] = $parameterName;
        }
        return $parameterNameMapping;
    }
    /**
     * @param array<int, string> $positionalParameterNames
     * @return array<int, self>
     */
    private static function resolveParentPhpDocBlocks(ClassReflection $classReflection, string $name, string $hasMethodName, string $getMethodName, string $resolveMethodName, bool $explicit, array $positionalParameterNames) : array
    {
        $result = [];
        $parentReflections = self::getParentReflections($classReflection);
        foreach ($parentReflections as $parentReflection) {
            $oneResult = self::resolvePhpDocBlockFromClass($parentReflection, $name, $hasMethodName, $getMethodName, $resolveMethodName, $explicit, $positionalParameterNames);
            if ($oneResult === null) {
                // Null if it is private or from a wrong trait.
                continue;
            }
            $result[] = $oneResult;
        }
        return $result;
    }
    /**
     * @return array<int, ClassReflection>
     */
    private static function getParentReflections(ClassReflection $classReflection) : array
    {
        $result = [];
        $parent = $classReflection->getParentClass();
        if ($parent !== null) {
            $result[] = $parent;
        }
        foreach ($classReflection->getInterfaces() as $interface) {
            $result[] = $interface;
        }
        return $result;
    }
    /**
     * @param array<int, string> $positionalParameterNames
     */
    private static function resolvePhpDocBlockFromClass(ClassReflection $classReflection, string $name, string $hasMethodName, string $getMethodName, string $resolveMethodName, bool $explicit, array $positionalParameterNames) : ?self
    {
        if ($classReflection->{$hasMethodName}($name)) {
            /** @var PropertyReflection|MethodReflection|ConstantReflection $parentReflection */
            $parentReflection = $classReflection->{$getMethodName}($name);
            if ($parentReflection->isPrivate()) {
                return null;
            }
            $classReflection = $parentReflection->getDeclaringClass();
            if ($parentReflection instanceof PhpPropertyReflection || $parentReflection instanceof ResolvedPropertyReflection) {
                $traitReflection = $parentReflection->getDeclaringTrait();
                $positionalMethodParameterNames = [];
            } elseif ($parentReflection instanceof MethodReflection) {
                $traitReflection = null;
                if ($parentReflection instanceof PhpMethodReflection || $parentReflection instanceof ResolvedMethodReflection) {
                    $traitReflection = $parentReflection->getDeclaringTrait();
                }
                $methodVariants = $parentReflection->getVariants();
                $positionalMethodParameterNames = [];
                $lowercaseMethodName = strtolower($parentReflection->getName());
                if (count($methodVariants) === 1 && $lowercaseMethodName !== '__construct' && $lowercaseMethodName !== strtolower($parentReflection->getDeclaringClass()->getName())) {
                    $methodParameters = $methodVariants[0]->getParameters();
                    foreach ($methodParameters as $methodParameter) {
                        $positionalMethodParameterNames[] = $methodParameter->getName();
                    }
                } else {
                    $positionalMethodParameterNames = $positionalParameterNames;
                }
            } else {
                $traitReflection = null;
                $positionalMethodParameterNames = [];
            }
            $trait = $traitReflection !== null ? $traitReflection->getName() : null;
            return self::$resolveMethodName($parentReflection->getDocComment() ?? \PHPStan\PhpDoc\ResolvedPhpDocBlock::EMPTY_DOC_STRING, $classReflection, $trait, $name, $classReflection->getFileName(), $explicit, $positionalParameterNames, $positionalMethodParameterNames);
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc;

/**
 * This is the extension interface to implement if you want to dynamically
 * load stub files based on your logic. As opposed to simply list them in the configuration file.
 *
 * To register it in the configuration file use the `phpstan.stubFilesExtension` service tag:
 *
 * ```
 * services:
 * 	-
 *		class: App\PHPStan\MyExtension
 *		tags:
 *			- phpstan.stubFilesExtension
 * ```
 *
 * @api
 */
interface StubFilesExtension
{
    public const EXTENSION_TAG = 'phpstan.stubFilesExtension';
    /** @return string[] */
    public function getFiles() : array;
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc;

use PHPStan\DependencyInjection\Container;
class LazyTypeNodeResolverExtensionRegistryProvider implements \PHPStan\PhpDoc\TypeNodeResolverExtensionRegistryProvider
{
    /**
     * @var \PHPStan\PhpDoc\TypeNodeResolverExtensionRegistry|null
     */
    private $registry;
    /**
     * @var \PHPStan\DependencyInjection\Container
     */
    private $container;
    public function __construct(Container $container)
    {
        $this->container = $container;
    }
    public function getRegistry() : \PHPStan\PhpDoc\TypeNodeResolverExtensionRegistry
    {
        if ($this->registry === null) {
            $this->registry = new \PHPStan\PhpDoc\TypeNodeResolverExtensionAwareRegistry($this->container->getByType(\PHPStan\PhpDoc\TypeNodeResolver::class), $this->container->getServicesByTag(\PHPStan\PhpDoc\TypeNodeResolverExtension::EXTENSION_TAG));
        }
        return $this->registry;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc;

use PHPStan\PhpDocParser\Parser\ConstExprParser;
class ConstExprParserFactory
{
    /**
     * @var bool
     */
    private $unescapeStrings;
    public function __construct(bool $unescapeStrings)
    {
        $this->unescapeStrings = $unescapeStrings;
    }
    public function create() : ConstExprParser
    {
        return new ConstExprParser($this->unescapeStrings, $this->unescapeStrings);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc;

class TypeNodeResolverExtensionAwareRegistry implements \PHPStan\PhpDoc\TypeNodeResolverExtensionRegistry
{
    /**
     * @var TypeNodeResolverExtension[]
     */
    private $extensions;
    /**
     * @param TypeNodeResolverExtension[] $extensions
     */
    public function __construct(\PHPStan\PhpDoc\TypeNodeResolver $typeNodeResolver, array $extensions)
    {
        $this->extensions = $extensions;
        foreach ($extensions as $extension) {
            if (!$extension instanceof \PHPStan\PhpDoc\TypeNodeResolverAwareExtension) {
                continue;
            }
            $extension->setTypeNodeResolver($typeNodeResolver);
        }
    }
    /**
     * @return TypeNodeResolverExtension[]
     */
    public function getExtensions() : array
    {
        return $this->extensions;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc;

use PHPStan\Analyser\NameScope;
use PHPStan\PhpDoc\Tag\AssertTag;
use PHPStan\PhpDoc\Tag\AssertTagParameter;
use PHPStan\PhpDoc\Tag\DeprecatedTag;
use PHPStan\PhpDoc\Tag\ExtendsTag;
use PHPStan\PhpDoc\Tag\ImplementsTag;
use PHPStan\PhpDoc\Tag\MethodTag;
use PHPStan\PhpDoc\Tag\MethodTagParameter;
use PHPStan\PhpDoc\Tag\MixinTag;
use PHPStan\PhpDoc\Tag\ParamOutTag;
use PHPStan\PhpDoc\Tag\ParamTag;
use PHPStan\PhpDoc\Tag\PropertyTag;
use PHPStan\PhpDoc\Tag\ReturnTag;
use PHPStan\PhpDoc\Tag\SelfOutTypeTag;
use PHPStan\PhpDoc\Tag\TemplateTag;
use PHPStan\PhpDoc\Tag\ThrowsTag;
use PHPStan\PhpDoc\Tag\TypeAliasImportTag;
use PHPStan\PhpDoc\Tag\TypeAliasTag;
use PHPStan\PhpDoc\Tag\UsesTag;
use PHPStan\PhpDoc\Tag\VarTag;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNullNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\MixinTagValueNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\TemplateTagValueNode;
use PHPStan\Reflection\PassedByReference;
use PHPStan\Rules\PhpDoc\UnresolvableTypeHelper;
use PHPStan\Type\Generic\TemplateTypeVariance;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function array_key_exists;
use function array_map;
use function array_merge;
use function array_reverse;
use function count;
use function in_array;
use function method_exists;
use function strpos;
use function substr;
class PhpDocNodeResolver
{
    /**
     * @var \PHPStan\PhpDoc\TypeNodeResolver
     */
    private $typeNodeResolver;
    /**
     * @var \PHPStan\PhpDoc\ConstExprNodeResolver
     */
    private $constExprNodeResolver;
    /**
     * @var \PHPStan\Rules\PhpDoc\UnresolvableTypeHelper
     */
    private $unresolvableTypeHelper;
    public function __construct(\PHPStan\PhpDoc\TypeNodeResolver $typeNodeResolver, \PHPStan\PhpDoc\ConstExprNodeResolver $constExprNodeResolver, UnresolvableTypeHelper $unresolvableTypeHelper)
    {
        $this->typeNodeResolver = $typeNodeResolver;
        $this->constExprNodeResolver = $constExprNodeResolver;
        $this->unresolvableTypeHelper = $unresolvableTypeHelper;
    }
    /**
     * @return array<(string|int), VarTag>
     */
    public function resolveVarTags(PhpDocNode $phpDocNode, NameScope $nameScope) : array
    {
        $resolved = [];
        $resolvedByTag = [];
        foreach (['@var', '@psalm-var', '@phpstan-var'] as $tagName) {
            $tagResolved = [];
            foreach ($phpDocNode->getVarTagValues($tagName) as $tagValue) {
                $type = $this->typeNodeResolver->resolve($tagValue->type, $nameScope);
                if ($this->shouldSkipType($tagName, $type)) {
                    continue;
                }
                if ($tagValue->variableName !== '') {
                    $variableName = substr($tagValue->variableName, 1);
                    $resolved[$variableName] = new VarTag($type);
                } else {
                    $varTag = new VarTag($type);
                    $tagResolved[] = $varTag;
                }
            }
            if (count($tagResolved) === 0) {
                continue;
            }
            $resolvedByTag[] = $tagResolved;
        }
        if (count($resolvedByTag) > 0) {
            return array_reverse($resolvedByTag)[0];
        }
        return $resolved;
    }
    /**
     * @return array<string, PropertyTag>
     */
    public function resolvePropertyTags(PhpDocNode $phpDocNode, NameScope $nameScope) : array
    {
        $resolved = [];
        foreach (['@property', '@phpstan-property'] as $tagName) {
            foreach ($phpDocNode->getPropertyTagValues($tagName) as $tagValue) {
                $propertyName = substr($tagValue->propertyName, 1);
                $propertyType = $this->typeNodeResolver->resolve($tagValue->type, $nameScope);
                $resolved[$propertyName] = new PropertyTag($propertyType, $propertyType, $propertyType);
            }
        }
        foreach (['@property-read', '@phpstan-property-read'] as $tagName) {
            foreach ($phpDocNode->getPropertyReadTagValues($tagName) as $tagValue) {
                $propertyName = substr($tagValue->propertyName, 1);
                $propertyType = $this->typeNodeResolver->resolve($tagValue->type, $nameScope);
                $writableType = null;
                if (array_key_exists($propertyName, $resolved)) {
                    $writableType = $resolved[$propertyName]->getWritableType();
                }
                $resolved[$propertyName] = new PropertyTag($propertyType, $propertyType, $writableType);
            }
        }
        foreach (['@property-write', '@phpstan-property-write'] as $tagName) {
            foreach ($phpDocNode->getPropertyWriteTagValues($tagName) as $tagValue) {
                $propertyName = substr($tagValue->propertyName, 1);
                $propertyType = $this->typeNodeResolver->resolve($tagValue->type, $nameScope);
                $readableType = null;
                if (array_key_exists($propertyName, $resolved)) {
                    $readableType = $resolved[$propertyName]->getReadableType();
                }
                $resolved[$propertyName] = new PropertyTag($readableType ?? $propertyType, $readableType, $propertyType);
            }
        }
        return $resolved;
    }
    /**
     * @return array<string, MethodTag>
     */
    public function resolveMethodTags(PhpDocNode $phpDocNode, NameScope $nameScope) : array
    {
        $resolved = [];
        foreach (['@method', '@psalm-method', '@phpstan-method'] as $tagName) {
            foreach ($phpDocNode->getMethodTagValues($tagName) as $tagValue) {
                $parameters = [];
                foreach ($tagValue->parameters as $parameterNode) {
                    $parameterName = substr($parameterNode->parameterName, 1);
                    $type = $parameterNode->type !== null ? $this->typeNodeResolver->resolve($parameterNode->type, $nameScope) : new MixedType();
                    if ($parameterNode->defaultValue instanceof ConstExprNullNode) {
                        $type = TypeCombinator::addNull($type);
                    }
                    $defaultValue = null;
                    if ($parameterNode->defaultValue !== null) {
                        $defaultValue = $this->constExprNodeResolver->resolve($parameterNode->defaultValue);
                    }
                    $parameters[$parameterName] = new MethodTagParameter($type, $parameterNode->isReference ? PassedByReference::createCreatesNewVariable() : PassedByReference::createNo(), $parameterNode->isVariadic || $parameterNode->defaultValue !== null, $parameterNode->isVariadic, $defaultValue);
                }
                $resolved[$tagValue->methodName] = new MethodTag($tagValue->returnType !== null ? $this->typeNodeResolver->resolve($tagValue->returnType, $nameScope) : new MixedType(), $tagValue->isStatic, $parameters);
            }
        }
        return $resolved;
    }
    /**
     * @return array<string, ExtendsTag>
     */
    public function resolveExtendsTags(PhpDocNode $phpDocNode, NameScope $nameScope) : array
    {
        $resolved = [];
        foreach (['@extends', '@template-extends', '@phpstan-extends'] as $tagName) {
            foreach ($phpDocNode->getExtendsTagValues($tagName) as $tagValue) {
                $resolved[$nameScope->resolveStringName($tagValue->type->type->name)] = new ExtendsTag($this->typeNodeResolver->resolve($tagValue->type, $nameScope));
            }
        }
        return $resolved;
    }
    /**
     * @return array<string, ImplementsTag>
     */
    public function resolveImplementsTags(PhpDocNode $phpDocNode, NameScope $nameScope) : array
    {
        $resolved = [];
        foreach (['@implements', '@template-implements', '@phpstan-implements'] as $tagName) {
            foreach ($phpDocNode->getImplementsTagValues($tagName) as $tagValue) {
                $resolved[$nameScope->resolveStringName($tagValue->type->type->name)] = new ImplementsTag($this->typeNodeResolver->resolve($tagValue->type, $nameScope));
            }
        }
        return $resolved;
    }
    /**
     * @return array<string, UsesTag>
     */
    public function resolveUsesTags(PhpDocNode $phpDocNode, NameScope $nameScope) : array
    {
        $resolved = [];
        foreach (['@use', '@template-use', '@phpstan-use'] as $tagName) {
            foreach ($phpDocNode->getUsesTagValues($tagName) as $tagValue) {
                $resolved[$nameScope->resolveStringName($tagValue->type->type->name)] = new UsesTag($this->typeNodeResolver->resolve($tagValue->type, $nameScope));
            }
        }
        return $resolved;
    }
    /**
     * @return array<string, TemplateTag>
     */
    public function resolveTemplateTags(PhpDocNode $phpDocNode, NameScope $nameScope) : array
    {
        $resolved = [];
        $resolvedPrefix = [];
        $prefixPriority = ['' => 0, 'psalm' => 1, 'phpstan' => 2];
        foreach ($phpDocNode->getTags() as $phpDocTagNode) {
            $valueNode = $phpDocTagNode->value;
            if (!$valueNode instanceof TemplateTagValueNode) {
                continue;
            }
            $tagName = $phpDocTagNode->name;
            if (in_array($tagName, ['@template', '@psalm-template', '@phpstan-template'], \true)) {
                $variance = TemplateTypeVariance::createInvariant();
            } elseif (in_array($tagName, ['@template-covariant', '@psalm-template-covariant', '@phpstan-template-covariant'], \true)) {
                $variance = TemplateTypeVariance::createCovariant();
            } elseif (in_array($tagName, ['@template-contravariant', '@psalm-template-contravariant', '@phpstan-template-contravariant'], \true)) {
                $variance = TemplateTypeVariance::createContravariant();
            } else {
                continue;
            }
            if (strpos($tagName, '@psalm-') === 0) {
                $prefix = 'psalm';
            } elseif (strpos($tagName, '@phpstan-') === 0) {
                $prefix = 'phpstan';
            } else {
                $prefix = '';
            }
            if (isset($resolved[$valueNode->name])) {
                $setPrefix = $resolvedPrefix[$valueNode->name];
                if ($prefixPriority[$prefix] <= $prefixPriority[$setPrefix]) {
                    continue;
                }
            }
            $resolved[$valueNode->name] = new TemplateTag($valueNode->name, $valueNode->bound !== null ? $this->typeNodeResolver->resolve($valueNode->bound, $nameScope->unsetTemplateType($valueNode->name)) : new MixedType(\true), $variance);
            $resolvedPrefix[$valueNode->name] = $prefix;
        }
        return $resolved;
    }
    /**
     * @return array<string, ParamTag>
     */
    public function resolveParamTags(PhpDocNode $phpDocNode, NameScope $nameScope) : array
    {
        $resolved = [];
        foreach (['@param', '@psalm-param', '@phpstan-param'] as $tagName) {
            foreach ($phpDocNode->getParamTagValues($tagName) as $tagValue) {
                $parameterName = substr($tagValue->parameterName, 1);
                $parameterType = $this->typeNodeResolver->resolve($tagValue->type, $nameScope);
                if ($this->shouldSkipType($tagName, $parameterType)) {
                    continue;
                }
                $resolved[$parameterName] = new ParamTag($parameterType, $tagValue->isVariadic);
            }
        }
        return $resolved;
    }
    /**
     * @return array<string, ParamOutTag>
     */
    public function resolveParamOutTags(PhpDocNode $phpDocNode, NameScope $nameScope) : array
    {
        if (!method_exists($phpDocNode, 'getParamOutTypeTagValues')) {
            return [];
        }
        $resolved = [];
        foreach (['@param-out', '@psalm-param-out', '@phpstan-param-out'] as $tagName) {
            foreach ($phpDocNode->getParamOutTypeTagValues($tagName) as $tagValue) {
                $parameterName = substr($tagValue->parameterName, 1);
                $parameterType = $this->typeNodeResolver->resolve($tagValue->type, $nameScope);
                if ($this->shouldSkipType($tagName, $parameterType)) {
                    continue;
                }
                $resolved[$parameterName] = new ParamOutTag($parameterType);
            }
        }
        return $resolved;
    }
    public function resolveReturnTag(PhpDocNode $phpDocNode, NameScope $nameScope) : ?ReturnTag
    {
        $resolved = null;
        foreach (['@return', '@psalm-return', '@phpstan-return'] as $tagName) {
            foreach ($phpDocNode->getReturnTagValues($tagName) as $tagValue) {
                $type = $this->typeNodeResolver->resolve($tagValue->type, $nameScope);
                if ($this->shouldSkipType($tagName, $type)) {
                    continue;
                }
                $resolved = new ReturnTag($type, \true);
            }
        }
        return $resolved;
    }
    public function resolveThrowsTags(PhpDocNode $phpDocNode, NameScope $nameScope) : ?ThrowsTag
    {
        foreach (['@phpstan-throws', '@throws'] as $tagName) {
            $types = [];
            foreach ($phpDocNode->getThrowsTagValues($tagName) as $tagValue) {
                $type = $this->typeNodeResolver->resolve($tagValue->type, $nameScope);
                if ($this->shouldSkipType($tagName, $type)) {
                    continue;
                }
                $types[] = $type;
            }
            if (count($types) > 0) {
                return new ThrowsTag(TypeCombinator::union(...$types));
            }
        }
        return null;
    }
    /**
     * @return array<MixinTag>
     */
    public function resolveMixinTags(PhpDocNode $phpDocNode, NameScope $nameScope) : array
    {
        return array_map(function (MixinTagValueNode $mixinTagValueNode) use($nameScope) : MixinTag {
            return new MixinTag($this->typeNodeResolver->resolve($mixinTagValueNode->type, $nameScope));
        }, $phpDocNode->getMixinTagValues());
    }
    /**
     * @return array<string, TypeAliasTag>
     */
    public function resolveTypeAliasTags(PhpDocNode $phpDocNode, NameScope $nameScope) : array
    {
        $resolved = [];
        foreach (['@psalm-type', '@phpstan-type'] as $tagName) {
            foreach ($phpDocNode->getTypeAliasTagValues($tagName) as $typeAliasTagValue) {
                $alias = $typeAliasTagValue->alias;
                $typeNode = $typeAliasTagValue->type;
                $resolved[$alias] = new TypeAliasTag($alias, $typeNode, $nameScope);
            }
        }
        return $resolved;
    }
    /**
     * @return array<string, TypeAliasImportTag>
     */
    public function resolveTypeAliasImportTags(PhpDocNode $phpDocNode, NameScope $nameScope) : array
    {
        $resolved = [];
        foreach (['@psalm-import-type', '@phpstan-import-type'] as $tagName) {
            foreach ($phpDocNode->getTypeAliasImportTagValues($tagName) as $typeAliasImportTagValue) {
                $importedAlias = $typeAliasImportTagValue->importedAlias;
                $importedFrom = $nameScope->resolveStringName($typeAliasImportTagValue->importedFrom->name);
                $importedAs = $typeAliasImportTagValue->importedAs;
                $resolved[$importedAs ?? $importedAlias] = new TypeAliasImportTag($importedAlias, $importedFrom, $importedAs);
            }
        }
        return $resolved;
    }
    /**
     * @return AssertTag[]
     */
    public function resolveAssertTags(PhpDocNode $phpDocNode, NameScope $nameScope) : array
    {
        foreach (['@phpstan', '@psalm'] as $prefix) {
            $resolved = array_merge($this->resolveAssertTagsFor($phpDocNode, $nameScope, $prefix . '-assert', AssertTag::NULL), $this->resolveAssertTagsFor($phpDocNode, $nameScope, $prefix . '-assert-if-true', AssertTag::IF_TRUE), $this->resolveAssertTagsFor($phpDocNode, $nameScope, $prefix . '-assert-if-false', AssertTag::IF_FALSE));
            if (count($resolved) > 0) {
                return $resolved;
            }
        }
        return [];
    }
    /**
     * @param AssertTag::NULL|AssertTag::IF_TRUE|AssertTag::IF_FALSE $if
     * @return AssertTag[]
     */
    private function resolveAssertTagsFor(PhpDocNode $phpDocNode, NameScope $nameScope, string $tagName, string $if) : array
    {
        $resolved = [];
        foreach ($phpDocNode->getAssertTagValues($tagName) as $assertTagValue) {
            $type = $this->typeNodeResolver->resolve($assertTagValue->type, $nameScope);
            $parameter = new AssertTagParameter($assertTagValue->parameter, null, null);
            $resolved[] = new AssertTag($if, $type, $parameter, $assertTagValue->isNegated, $assertTagValue->isEquality ?? \false);
        }
        foreach ($phpDocNode->getAssertPropertyTagValues($tagName) as $assertTagValue) {
            $type = $this->typeNodeResolver->resolve($assertTagValue->type, $nameScope);
            $parameter = new AssertTagParameter($assertTagValue->parameter, $assertTagValue->property, null);
            $resolved[] = new AssertTag($if, $type, $parameter, $assertTagValue->isNegated, $assertTagValue->isEquality ?? \false);
        }
        foreach ($phpDocNode->getAssertMethodTagValues($tagName) as $assertTagValue) {
            $type = $this->typeNodeResolver->resolve($assertTagValue->type, $nameScope);
            $parameter = new AssertTagParameter($assertTagValue->parameter, null, $assertTagValue->method);
            $resolved[] = new AssertTag($if, $type, $parameter, $assertTagValue->isNegated, $assertTagValue->isEquality ?? \false);
        }
        return $resolved;
    }
    public function resolveSelfOutTypeTag(PhpDocNode $phpDocNode, NameScope $nameScope) : ?SelfOutTypeTag
    {
        if (!method_exists($phpDocNode, 'getSelfOutTypeTagValues')) {
            return null;
        }
        foreach (['@phpstan-this-out', '@phpstan-self-out', '@psalm-this-out', '@psalm-self-out'] as $tagName) {
            foreach ($phpDocNode->getSelfOutTypeTagValues($tagName) as $selfOutTypeTagValue) {
                $type = $this->typeNodeResolver->resolve($selfOutTypeTagValue->type, $nameScope);
                return new SelfOutTypeTag($type);
            }
        }
        return null;
    }
    public function resolveDeprecatedTag(PhpDocNode $phpDocNode, NameScope $nameScope) : ?DeprecatedTag
    {
        foreach ($phpDocNode->getDeprecatedTagValues() as $deprecatedTagValue) {
            $description = (string) $deprecatedTagValue;
            return new DeprecatedTag($description === '' ? null : $description);
        }
        return null;
    }
    public function resolveIsDeprecated(PhpDocNode $phpDocNode) : bool
    {
        $deprecatedTags = $phpDocNode->getTagsByName('@deprecated');
        return count($deprecatedTags) > 0;
    }
    public function resolveIsNotDeprecated(PhpDocNode $phpDocNode) : bool
    {
        $notDeprecatedTags = $phpDocNode->getTagsByName('@not-deprecated');
        return count($notDeprecatedTags) > 0;
    }
    public function resolveIsInternal(PhpDocNode $phpDocNode) : bool
    {
        $internalTags = $phpDocNode->getTagsByName('@internal');
        return count($internalTags) > 0;
    }
    public function resolveIsFinal(PhpDocNode $phpDocNode) : bool
    {
        $finalTags = $phpDocNode->getTagsByName('@final');
        return count($finalTags) > 0;
    }
    public function resolveIsPure(PhpDocNode $phpDocNode) : bool
    {
        foreach ($phpDocNode->getTags() as $phpDocTagNode) {
            if (in_array($phpDocTagNode->name, ['@pure', '@psalm-pure', '@phpstan-pure'], \true)) {
                return \true;
            }
        }
        return \false;
    }
    public function resolveIsImpure(PhpDocNode $phpDocNode) : bool
    {
        foreach ($phpDocNode->getTags() as $phpDocTagNode) {
            if (in_array($phpDocTagNode->name, ['@impure', '@phpstan-impure'], \true)) {
                return \true;
            }
        }
        return \false;
    }
    public function resolveIsReadOnly(PhpDocNode $phpDocNode) : bool
    {
        foreach (['@readonly', '@psalm-readonly', '@phpstan-readonly', '@phpstan-readonly-allow-private-mutation', '@psalm-readonly-allow-private-mutation'] as $tagName) {
            $tags = $phpDocNode->getTagsByName($tagName);
            if (count($tags) > 0) {
                return \true;
            }
        }
        return \false;
    }
    public function resolveIsImmutable(PhpDocNode $phpDocNode) : bool
    {
        foreach (['@immutable', '@psalm-immutable', '@phpstan-immutable'] as $tagName) {
            $tags = $phpDocNode->getTagsByName($tagName);
            if (count($tags) > 0) {
                return \true;
            }
        }
        return \false;
    }
    public function resolveHasConsistentConstructor(PhpDocNode $phpDocNode) : bool
    {
        foreach (['@consistent-constructor', '@phpstan-consistent-constructor', '@psalm-consistent-constructor'] as $tagName) {
            $tags = $phpDocNode->getTagsByName($tagName);
            if (count($tags) > 0) {
                return \true;
            }
        }
        return \false;
    }
    public function resolveAcceptsNamedArguments(PhpDocNode $phpDocNode) : bool
    {
        return count($phpDocNode->getTagsByName('@no-named-arguments')) === 0;
    }
    private function shouldSkipType(string $tagName, Type $type) : bool
    {
        if (strpos($tagName, '@psalm-') !== 0) {
            return \false;
        }
        return $this->unresolvableTypeHelper->containsUnresolvableType($type);
    }
    public function resolveAllowPrivateMutation(PhpDocNode $phpDocNode) : bool
    {
        foreach (['@phpstan-readonly-allow-private-mutation', '@phpstan-allow-private-mutation', '@psalm-readonly-allow-private-mutation', '@psalm-allow-private-mutation'] as $tagName) {
            $tags = $phpDocNode->getTagsByName($tagName);
            if (count($tags) > 0) {
                return \true;
            }
        }
        return \false;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc;

use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode;
use PHPStan\PhpDocParser\Lexer\Lexer;
use PHPStan\PhpDocParser\Parser\PhpDocParser;
use PHPStan\PhpDocParser\Parser\TokenIterator;
class PhpDocStringResolver
{
    /**
     * @var \PHPStan\PhpDocParser\Lexer\Lexer
     */
    private $phpDocLexer;
    /**
     * @var \PHPStan\PhpDocParser\Parser\PhpDocParser
     */
    private $phpDocParser;
    public function __construct(Lexer $phpDocLexer, PhpDocParser $phpDocParser)
    {
        $this->phpDocLexer = $phpDocLexer;
        $this->phpDocParser = $phpDocParser;
    }
    public function resolve(string $phpDocString) : PhpDocNode
    {
        $tokens = new TokenIterator($this->phpDocLexer->tokenize($phpDocString));
        $phpDocNode = $this->phpDocParser->parse($tokens);
        $tokens->consumeTokenType(Lexer::TOKEN_END);
        // @phpstan-ignore-line
        return $phpDocNode;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc;

class CountableStubFilesExtension implements \PHPStan\PhpDoc\StubFilesExtension
{
    /**
     * @var bool
     */
    private $bleedingEdge;
    public function __construct(bool $bleedingEdge)
    {
        $this->bleedingEdge = $bleedingEdge;
    }
    public function getFiles() : array
    {
        if ($this->bleedingEdge) {
            return [__DIR__ . '/../../stubs/bleedingEdge/Countable.stub'];
        }
        return [__DIR__ . '/../../stubs/Countable.stub'];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc;

interface StubFilesProvider
{
    /** @return string[] */
    public function getStubFiles() : array;
    /** @return string[] */
    public function getProjectStubFiles() : array;
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc;

use PHPStan\BetterReflection\Reflection\Adapter\ReflectionParameter;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Type\FileTypeMapper;
use function array_map;
use function strtolower;
class PhpDocInheritanceResolver
{
    /**
     * @var \PHPStan\Type\FileTypeMapper
     */
    private $fileTypeMapper;
    /**
     * @var \PHPStan\PhpDoc\StubPhpDocProvider
     */
    private $stubPhpDocProvider;
    public function __construct(FileTypeMapper $fileTypeMapper, \PHPStan\PhpDoc\StubPhpDocProvider $stubPhpDocProvider)
    {
        $this->fileTypeMapper = $fileTypeMapper;
        $this->stubPhpDocProvider = $stubPhpDocProvider;
    }
    public function resolvePhpDocForProperty(?string $docComment, ClassReflection $classReflection, ?string $classReflectionFileName, ?string $declaringTraitName, string $propertyName) : \PHPStan\PhpDoc\ResolvedPhpDocBlock
    {
        $phpDocBlock = \PHPStan\PhpDoc\PhpDocBlock::resolvePhpDocBlockForProperty($docComment, $classReflection, null, $propertyName, $classReflectionFileName, null, [], []);
        return $this->docBlockTreeToResolvedDocBlock($phpDocBlock, $declaringTraitName, null, $propertyName, null);
    }
    public function resolvePhpDocForConstant(?string $docComment, ClassReflection $classReflection, ?string $classReflectionFileName, string $constantName) : \PHPStan\PhpDoc\ResolvedPhpDocBlock
    {
        $phpDocBlock = \PHPStan\PhpDoc\PhpDocBlock::resolvePhpDocBlockForConstant($docComment, $classReflection, null, $constantName, $classReflectionFileName, null, [], []);
        return $this->docBlockTreeToResolvedDocBlock($phpDocBlock, null, null, null, $constantName);
    }
    /**
     * @param array<int, string> $positionalParameterNames
     */
    public function resolvePhpDocForMethod(?string $docComment, ?string $fileName, ClassReflection $classReflection, ?string $declaringTraitName, string $methodName, array $positionalParameterNames) : \PHPStan\PhpDoc\ResolvedPhpDocBlock
    {
        $phpDocBlock = \PHPStan\PhpDoc\PhpDocBlock::resolvePhpDocBlockForMethod($docComment, $classReflection, $declaringTraitName, $methodName, $fileName, null, $positionalParameterNames, $positionalParameterNames);
        return $this->docBlockTreeToResolvedDocBlock($phpDocBlock, $phpDocBlock->getTrait(), $methodName, null, null);
    }
    private function docBlockTreeToResolvedDocBlock(\PHPStan\PhpDoc\PhpDocBlock $phpDocBlock, ?string $traitName, ?string $functionName, ?string $propertyName, ?string $constantName) : \PHPStan\PhpDoc\ResolvedPhpDocBlock
    {
        $parents = [];
        $parentPhpDocBlocks = [];
        foreach ($phpDocBlock->getParents() as $parentPhpDocBlock) {
            if ($parentPhpDocBlock->getClassReflection()->isBuiltin() && $functionName !== null && strtolower($functionName) === '__construct') {
                continue;
            }
            $parents[] = $this->docBlockTreeToResolvedDocBlock($parentPhpDocBlock, $parentPhpDocBlock->getTrait(), $functionName, $propertyName, $constantName);
            $parentPhpDocBlocks[] = $parentPhpDocBlock;
        }
        $oneResolvedDockBlock = $this->docBlockToResolvedDocBlock($phpDocBlock, $traitName, $functionName, $propertyName, $constantName);
        return $oneResolvedDockBlock->merge($parents, $parentPhpDocBlocks);
    }
    private function docBlockToResolvedDocBlock(\PHPStan\PhpDoc\PhpDocBlock $phpDocBlock, ?string $traitName, ?string $functionName, ?string $propertyName, ?string $constantName) : \PHPStan\PhpDoc\ResolvedPhpDocBlock
    {
        $classReflection = $phpDocBlock->getClassReflection();
        if ($functionName !== null && $classReflection->getNativeReflection()->hasMethod($functionName)) {
            $methodReflection = $classReflection->getNativeReflection()->getMethod($functionName);
            $stub = $this->stubPhpDocProvider->findMethodPhpDoc($classReflection->getName(), $functionName, array_map(static function (ReflectionParameter $parameter) : string {
                return $parameter->getName();
            }, $methodReflection->getParameters()));
            if ($stub !== null) {
                return $stub;
            }
        }
        if ($propertyName !== null && $classReflection->getNativeReflection()->hasProperty($propertyName)) {
            $stub = $this->stubPhpDocProvider->findPropertyPhpDoc($classReflection->getName(), $propertyName);
            if ($stub === null) {
                $propertyReflection = $classReflection->getNativeReflection()->getProperty($propertyName);
                $propertyDeclaringClass = $propertyReflection->getBetterReflection()->getDeclaringClass();
                if ($propertyDeclaringClass->isTrait() && (!$propertyReflection->getDeclaringClass()->isTrait() || $propertyReflection->getDeclaringClass()->getName() !== $propertyDeclaringClass->getName())) {
                    $stub = $this->stubPhpDocProvider->findPropertyPhpDoc($propertyDeclaringClass->getName(), $propertyName);
                }
            }
            if ($stub !== null) {
                return $stub;
            }
        }
        if ($constantName !== null && $classReflection->getNativeReflection()->hasConstant($constantName)) {
            $stub = $this->stubPhpDocProvider->findClassConstantPhpDoc($classReflection->getName(), $constantName);
            if ($stub !== null) {
                return $stub;
            }
        }
        return $this->fileTypeMapper->getResolvedPhpDoc($phpDocBlock->getFile(), $classReflection->getName(), $traitName, $functionName, $phpDocBlock->getDocComment());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc;

use PHPStan\Analyser\NameScope;
use PHPStan\PhpDoc\Tag\AssertTag;
use PHPStan\PhpDoc\Tag\DeprecatedTag;
use PHPStan\PhpDoc\Tag\ExtendsTag;
use PHPStan\PhpDoc\Tag\ImplementsTag;
use PHPStan\PhpDoc\Tag\MethodTag;
use PHPStan\PhpDoc\Tag\MixinTag;
use PHPStan\PhpDoc\Tag\ParamOutTag;
use PHPStan\PhpDoc\Tag\ParamTag;
use PHPStan\PhpDoc\Tag\PropertyTag;
use PHPStan\PhpDoc\Tag\ReturnTag;
use PHPStan\PhpDoc\Tag\SelfOutTypeTag;
use PHPStan\PhpDoc\Tag\TemplateTag;
use PHPStan\PhpDoc\Tag\ThrowsTag;
use PHPStan\PhpDoc\Tag\TypeAliasImportTag;
use PHPStan\PhpDoc\Tag\TypeAliasTag;
use PHPStan\PhpDoc\Tag\TypedTag;
use PHPStan\PhpDoc\Tag\UsesTag;
use PHPStan\PhpDoc\Tag\VarTag;
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode;
use PHPStan\Type\ConditionalTypeForParameter;
use PHPStan\Type\Generic\TemplateTypeHelper;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\Type;
use PHPStan\Type\TypeTraverser;
use function array_key_exists;
use function array_map;
use function count;
use function is_bool;
use function substr;
/** @api */
class ResolvedPhpDocBlock
{
    public const EMPTY_DOC_STRING = '/** */';
    /**
     * @var \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode
     */
    private $phpDocNode;
    /** @var PhpDocNode[] */
    private $phpDocNodes;
    /**
     * @var string
     */
    private $phpDocString;
    /**
     * @var string|null
     */
    private $filename;
    /**
     * @var \PHPStan\Analyser\NameScope|null
     */
    private $nameScope;
    /**
     * @var \PHPStan\Type\Generic\TemplateTypeMap
     */
    private $templateTypeMap;
    /** @var array<string, TemplateTag> */
    private $templateTags;
    /**
     * @var \PHPStan\PhpDoc\PhpDocNodeResolver
     */
    private $phpDocNodeResolver;
    /** @var array<(string|int), VarTag>|false */
    private $varTags = \false;
    /** @var array<string, MethodTag>|false */
    private $methodTags = \false;
    /** @var array<string, PropertyTag>|false */
    private $propertyTags = \false;
    /** @var array<string, ExtendsTag>|false */
    private $extendsTags = \false;
    /** @var array<string, ImplementsTag>|false */
    private $implementsTags = \false;
    /** @var array<string, UsesTag>|false */
    private $usesTags = \false;
    /** @var array<string, ParamTag>|false */
    private $paramTags = \false;
    /** @var array<string, ParamOutTag>|false */
    private $paramOutTags = \false;
    /**
     * @var \PHPStan\PhpDoc\Tag\ReturnTag|false|null
     */
    private $returnTag = \false;
    /**
     * @var \PHPStan\PhpDoc\Tag\ThrowsTag|false|null
     */
    private $throwsTag = \false;
    /** @var array<MixinTag>|false */
    private $mixinTags = \false;
    /** @var array<TypeAliasTag>|false */
    private $typeAliasTags = \false;
    /** @var array<TypeAliasImportTag>|false */
    private $typeAliasImportTags = \false;
    /** @var array<AssertTag>|false */
    private $assertTags = \false;
    /**
     * @var \PHPStan\PhpDoc\Tag\SelfOutTypeTag|false|null
     */
    private $selfOutTypeTag = \false;
    /**
     * @var \PHPStan\PhpDoc\Tag\DeprecatedTag|false|null
     */
    private $deprecatedTag = \false;
    /**
     * @var bool|null
     */
    private $isDeprecated;
    /**
     * @var bool|null
     */
    private $isNotDeprecated;
    /**
     * @var bool|null
     */
    private $isInternal;
    /**
     * @var bool|null
     */
    private $isFinal;
    /** @var bool|'notLoaded'|null */
    private $isPure = 'notLoaded';
    /**
     * @var bool|null
     */
    private $isReadOnly;
    /**
     * @var bool|null
     */
    private $isImmutable;
    /**
     * @var bool|null
     */
    private $isAllowedPrivateMutation;
    /**
     * @var bool|null
     */
    private $hasConsistentConstructor;
    /**
     * @var bool|null
     */
    private $acceptsNamedArguments;
    private function __construct()
    {
    }
    /**
     * @param TemplateTag[] $templateTags
     */
    public static function create(PhpDocNode $phpDocNode, string $phpDocString, ?string $filename, NameScope $nameScope, TemplateTypeMap $templateTypeMap, array $templateTags, \PHPStan\PhpDoc\PhpDocNodeResolver $phpDocNodeResolver) : self
    {
        // new property also needs to be added to createEmpty() and merge()
        $self = new self();
        $self->phpDocNode = $phpDocNode;
        $self->phpDocNodes = [$phpDocNode];
        $self->phpDocString = $phpDocString;
        $self->filename = $filename;
        $self->nameScope = $nameScope;
        $self->templateTypeMap = $templateTypeMap;
        $self->templateTags = $templateTags;
        $self->phpDocNodeResolver = $phpDocNodeResolver;
        return $self;
    }
    public static function createEmpty() : self
    {
        // new property also needs to be added to merge()
        $self = new self();
        $self->phpDocString = self::EMPTY_DOC_STRING;
        $self->phpDocNodes = [];
        $self->filename = null;
        $self->templateTypeMap = TemplateTypeMap::createEmpty();
        $self->templateTags = [];
        $self->varTags = [];
        $self->methodTags = [];
        $self->propertyTags = [];
        $self->extendsTags = [];
        $self->implementsTags = [];
        $self->usesTags = [];
        $self->paramTags = [];
        $self->paramOutTags = [];
        $self->returnTag = null;
        $self->throwsTag = null;
        $self->mixinTags = [];
        $self->typeAliasTags = [];
        $self->typeAliasImportTags = [];
        $self->assertTags = [];
        $self->selfOutTypeTag = null;
        $self->deprecatedTag = null;
        $self->isDeprecated = \false;
        $self->isNotDeprecated = \false;
        $self->isInternal = \false;
        $self->isFinal = \false;
        $self->isPure = null;
        $self->isReadOnly = \false;
        $self->isImmutable = \false;
        $self->isAllowedPrivateMutation = \false;
        $self->hasConsistentConstructor = \false;
        $self->acceptsNamedArguments = \true;
        return $self;
    }
    /**
     * @param array<int, self> $parents
     * @param array<int, PhpDocBlock> $parentPhpDocBlocks
     */
    public function merge(array $parents, array $parentPhpDocBlocks) : self
    {
        // new property also needs to be added to createEmpty()
        $result = new self();
        // we will resolve everything on $this here so these properties don't have to be populated
        // skip $result->phpDocNode
        $phpDocNodes = $this->phpDocNodes;
        $acceptsNamedArguments = $this->acceptsNamedArguments();
        foreach ($parents as $parent) {
            foreach ($parent->phpDocNodes as $phpDocNode) {
                $phpDocNodes[] = $phpDocNode;
                $acceptsNamedArguments = $acceptsNamedArguments && $parent->acceptsNamedArguments();
            }
        }
        $result->phpDocNodes = $phpDocNodes;
        $result->phpDocString = $this->phpDocString;
        $result->filename = $this->filename;
        // skip $result->nameScope
        $result->templateTypeMap = $this->templateTypeMap;
        $result->templateTags = $this->templateTags;
        // skip $result->phpDocNodeResolver
        $result->varTags = self::mergeVarTags($this->getVarTags(), $parents, $parentPhpDocBlocks);
        $result->methodTags = $this->getMethodTags();
        $result->propertyTags = $this->getPropertyTags();
        $result->extendsTags = $this->getExtendsTags();
        $result->implementsTags = $this->getImplementsTags();
        $result->usesTags = $this->getUsesTags();
        $result->paramTags = self::mergeParamTags($this->getParamTags(), $parents, $parentPhpDocBlocks);
        $result->paramOutTags = self::mergeParamOutTags($this->getParamOutTags(), $parents, $parentPhpDocBlocks);
        $result->returnTag = self::mergeReturnTags($this->getReturnTag(), $parents, $parentPhpDocBlocks);
        $result->throwsTag = self::mergeThrowsTags($this->getThrowsTag(), $parents);
        $result->mixinTags = $this->getMixinTags();
        $result->typeAliasTags = $this->getTypeAliasTags();
        $result->typeAliasImportTags = $this->getTypeAliasImportTags();
        $result->assertTags = self::mergeAssertTags($this->getAssertTags(), $parents, $parentPhpDocBlocks);
        $result->selfOutTypeTag = self::mergeSelfOutTypeTags($this->getSelfOutTag(), $parents);
        $result->deprecatedTag = self::mergeDeprecatedTags($this->getDeprecatedTag(), $this->isNotDeprecated(), $parents);
        $result->isDeprecated = $result->deprecatedTag !== null;
        $result->isNotDeprecated = $this->isNotDeprecated();
        $result->isInternal = $this->isInternal();
        $result->isFinal = $this->isFinal();
        $result->isPure = $this->isPure();
        $result->isReadOnly = $this->isReadOnly();
        $result->isImmutable = $this->isImmutable();
        $result->isAllowedPrivateMutation = $this->isAllowedPrivateMutation();
        $result->hasConsistentConstructor = $this->hasConsistentConstructor();
        $result->acceptsNamedArguments = $acceptsNamedArguments;
        return $result;
    }
    /**
     * @param array<string, string> $parameterNameMapping
     */
    public function changeParameterNamesByMapping(array $parameterNameMapping) : self
    {
        if (count($this->phpDocNodes) === 0) {
            return $this;
        }
        $paramTags = $this->getParamTags();
        $newParamTags = [];
        foreach ($paramTags as $key => $paramTag) {
            if (!array_key_exists($key, $parameterNameMapping)) {
                continue;
            }
            $newParamTags[$parameterNameMapping[$key]] = $paramTag;
        }
        $paramOutTags = $this->getParamOutTags();
        $newParamOutTags = [];
        foreach ($paramOutTags as $key => $paramOutTag) {
            if (!array_key_exists($key, $parameterNameMapping)) {
                continue;
            }
            $newParamOutTags[$parameterNameMapping[$key]] = $paramOutTag;
        }
        $returnTag = $this->getReturnTag();
        if ($returnTag !== null) {
            $transformedType = TypeTraverser::map($returnTag->getType(), static function (Type $type, callable $traverse) use($parameterNameMapping) : Type {
                if ($type instanceof ConditionalTypeForParameter) {
                    $parameterName = substr($type->getParameterName(), 1);
                    if (array_key_exists($parameterName, $parameterNameMapping)) {
                        $type = $type->changeParameterName('$' . $parameterNameMapping[$parameterName]);
                    }
                }
                return $traverse($type);
            });
            $returnTag = $returnTag->withType($transformedType);
        }
        $assertTags = $this->getAssertTags();
        if (count($assertTags) > 0) {
            $assertTags = array_map(static function (AssertTag $tag) use($parameterNameMapping) : AssertTag {
                $parameterName = substr($tag->getParameter()->getParameterName(), 1);
                if (array_key_exists($parameterName, $parameterNameMapping)) {
                    $tag = $tag->withParameter($tag->getParameter()->changeParameterName('$' . $parameterNameMapping[$parameterName]));
                }
                return $tag;
            }, $assertTags);
        }
        $self = new self();
        $self->phpDocNode = $this->phpDocNode;
        $self->phpDocNodes = $this->phpDocNodes;
        $self->phpDocString = $this->phpDocString;
        $self->filename = $this->filename;
        $self->nameScope = $this->nameScope;
        $self->templateTypeMap = $this->templateTypeMap;
        $self->templateTags = $this->templateTags;
        $self->phpDocNodeResolver = $this->phpDocNodeResolver;
        $self->varTags = $this->varTags;
        $self->methodTags = $this->methodTags;
        $self->propertyTags = $this->propertyTags;
        $self->extendsTags = $this->extendsTags;
        $self->implementsTags = $this->implementsTags;
        $self->usesTags = $this->usesTags;
        $self->paramTags = $newParamTags;
        $self->paramOutTags = $newParamOutTags;
        $self->returnTag = $returnTag;
        $self->throwsTag = $this->throwsTag;
        $self->mixinTags = $this->mixinTags;
        $self->typeAliasTags = $this->typeAliasTags;
        $self->typeAliasImportTags = $this->typeAliasImportTags;
        $self->assertTags = $assertTags;
        $self->selfOutTypeTag = $this->selfOutTypeTag;
        $self->deprecatedTag = $this->deprecatedTag;
        $self->isDeprecated = $this->isDeprecated;
        $self->isNotDeprecated = $this->isNotDeprecated;
        $self->isInternal = $this->isInternal;
        $self->isFinal = $this->isFinal;
        $self->isPure = $this->isPure;
        return $self;
    }
    public function hasPhpDocString() : bool
    {
        return $this->phpDocString !== self::EMPTY_DOC_STRING;
    }
    public function getPhpDocString() : string
    {
        return $this->phpDocString;
    }
    /**
     * @return PhpDocNode[]
     */
    public function getPhpDocNodes() : array
    {
        return $this->phpDocNodes;
    }
    public function getFilename() : ?string
    {
        return $this->filename;
    }
    private function getNameScope() : NameScope
    {
        return $this->nameScope;
    }
    public function getNullableNameScope() : ?NameScope
    {
        return $this->nameScope;
    }
    /**
     * @return array<(string|int), VarTag>
     */
    public function getVarTags() : array
    {
        if ($this->varTags === \false) {
            $this->varTags = $this->phpDocNodeResolver->resolveVarTags($this->phpDocNode, $this->getNameScope());
        }
        return $this->varTags;
    }
    /**
     * @return array<string, MethodTag>
     */
    public function getMethodTags() : array
    {
        if ($this->methodTags === \false) {
            $this->methodTags = $this->phpDocNodeResolver->resolveMethodTags($this->phpDocNode, $this->getNameScope());
        }
        return $this->methodTags;
    }
    /**
     * @return array<string, PropertyTag>
     */
    public function getPropertyTags() : array
    {
        if ($this->propertyTags === \false) {
            $this->propertyTags = $this->phpDocNodeResolver->resolvePropertyTags($this->phpDocNode, $this->getNameScope());
        }
        return $this->propertyTags;
    }
    /**
     * @return array<string, TemplateTag>
     */
    public function getTemplateTags() : array
    {
        return $this->templateTags;
    }
    /**
     * @return array<string, ExtendsTag>
     */
    public function getExtendsTags() : array
    {
        if ($this->extendsTags === \false) {
            $this->extendsTags = $this->phpDocNodeResolver->resolveExtendsTags($this->phpDocNode, $this->getNameScope());
        }
        return $this->extendsTags;
    }
    /**
     * @return array<string, ImplementsTag>
     */
    public function getImplementsTags() : array
    {
        if ($this->implementsTags === \false) {
            $this->implementsTags = $this->phpDocNodeResolver->resolveImplementsTags($this->phpDocNode, $this->getNameScope());
        }
        return $this->implementsTags;
    }
    /**
     * @return array<string, UsesTag>
     */
    public function getUsesTags() : array
    {
        if ($this->usesTags === \false) {
            $this->usesTags = $this->phpDocNodeResolver->resolveUsesTags($this->phpDocNode, $this->getNameScope());
        }
        return $this->usesTags;
    }
    /**
     * @return array<string, ParamTag>
     */
    public function getParamTags() : array
    {
        if ($this->paramTags === \false) {
            $this->paramTags = $this->phpDocNodeResolver->resolveParamTags($this->phpDocNode, $this->getNameScope());
        }
        return $this->paramTags;
    }
    /**
     * @return array<string, ParamOutTag>
     */
    public function getParamOutTags() : array
    {
        if ($this->paramOutTags === \false) {
            $this->paramOutTags = $this->phpDocNodeResolver->resolveParamOutTags($this->phpDocNode, $this->getNameScope());
        }
        return $this->paramOutTags;
    }
    public function getReturnTag() : ?ReturnTag
    {
        if (is_bool($this->returnTag)) {
            $this->returnTag = $this->phpDocNodeResolver->resolveReturnTag($this->phpDocNode, $this->getNameScope());
        }
        return $this->returnTag;
    }
    public function getThrowsTag() : ?ThrowsTag
    {
        if (is_bool($this->throwsTag)) {
            $this->throwsTag = $this->phpDocNodeResolver->resolveThrowsTags($this->phpDocNode, $this->getNameScope());
        }
        return $this->throwsTag;
    }
    /**
     * @return array<MixinTag>
     */
    public function getMixinTags() : array
    {
        if ($this->mixinTags === \false) {
            $this->mixinTags = $this->phpDocNodeResolver->resolveMixinTags($this->phpDocNode, $this->getNameScope());
        }
        return $this->mixinTags;
    }
    /**
     * @return array<TypeAliasTag>
     */
    public function getTypeAliasTags() : array
    {
        if ($this->typeAliasTags === \false) {
            $this->typeAliasTags = $this->phpDocNodeResolver->resolveTypeAliasTags($this->phpDocNode, $this->getNameScope());
        }
        return $this->typeAliasTags;
    }
    /**
     * @return array<TypeAliasImportTag>
     */
    public function getTypeAliasImportTags() : array
    {
        if ($this->typeAliasImportTags === \false) {
            $this->typeAliasImportTags = $this->phpDocNodeResolver->resolveTypeAliasImportTags($this->phpDocNode, $this->getNameScope());
        }
        return $this->typeAliasImportTags;
    }
    /**
     * @return array<AssertTag>
     */
    public function getAssertTags() : array
    {
        if ($this->assertTags === \false) {
            $this->assertTags = $this->phpDocNodeResolver->resolveAssertTags($this->phpDocNode, $this->getNameScope());
        }
        return $this->assertTags;
    }
    public function getSelfOutTag() : ?SelfOutTypeTag
    {
        if ($this->selfOutTypeTag === \false) {
            $this->selfOutTypeTag = $this->phpDocNodeResolver->resolveSelfOutTypeTag($this->phpDocNode, $this->getNameScope());
        }
        return $this->selfOutTypeTag;
    }
    public function getDeprecatedTag() : ?DeprecatedTag
    {
        if (is_bool($this->deprecatedTag)) {
            $this->deprecatedTag = $this->phpDocNodeResolver->resolveDeprecatedTag($this->phpDocNode, $this->getNameScope());
        }
        return $this->deprecatedTag;
    }
    public function isDeprecated() : bool
    {
        if ($this->isDeprecated === null) {
            $this->isDeprecated = $this->phpDocNodeResolver->resolveIsDeprecated($this->phpDocNode);
        }
        return $this->isDeprecated;
    }
    /**
     * @internal
     */
    public function isNotDeprecated() : bool
    {
        if ($this->isNotDeprecated === null) {
            $this->isNotDeprecated = $this->phpDocNodeResolver->resolveIsNotDeprecated($this->phpDocNode);
        }
        return $this->isNotDeprecated;
    }
    public function isInternal() : bool
    {
        if ($this->isInternal === null) {
            $this->isInternal = $this->phpDocNodeResolver->resolveIsInternal($this->phpDocNode);
        }
        return $this->isInternal;
    }
    public function isFinal() : bool
    {
        if ($this->isFinal === null) {
            $this->isFinal = $this->phpDocNodeResolver->resolveIsFinal($this->phpDocNode);
        }
        return $this->isFinal;
    }
    public function hasConsistentConstructor() : bool
    {
        if ($this->hasConsistentConstructor === null) {
            $this->hasConsistentConstructor = $this->phpDocNodeResolver->resolveHasConsistentConstructor($this->phpDocNode);
        }
        return $this->hasConsistentConstructor;
    }
    public function acceptsNamedArguments() : bool
    {
        if ($this->acceptsNamedArguments === null) {
            $this->acceptsNamedArguments = $this->phpDocNodeResolver->resolveAcceptsNamedArguments($this->phpDocNode);
        }
        return $this->acceptsNamedArguments;
    }
    public function getTemplateTypeMap() : TemplateTypeMap
    {
        return $this->templateTypeMap;
    }
    public function isPure() : ?bool
    {
        if ($this->isPure === 'notLoaded') {
            $pure = $this->phpDocNodeResolver->resolveIsPure($this->phpDocNode);
            if ($pure) {
                $this->isPure = \true;
                return $this->isPure;
            }
            $impure = $this->phpDocNodeResolver->resolveIsImpure($this->phpDocNode);
            if ($impure) {
                $this->isPure = \false;
                return $this->isPure;
            }
            $this->isPure = null;
        }
        return $this->isPure;
    }
    public function isReadOnly() : bool
    {
        if ($this->isReadOnly === null) {
            $this->isReadOnly = $this->phpDocNodeResolver->resolveIsReadOnly($this->phpDocNode);
        }
        return $this->isReadOnly;
    }
    public function isImmutable() : bool
    {
        if ($this->isImmutable === null) {
            $this->isImmutable = $this->phpDocNodeResolver->resolveIsImmutable($this->phpDocNode);
        }
        return $this->isImmutable;
    }
    public function isAllowedPrivateMutation() : bool
    {
        if ($this->isAllowedPrivateMutation === null) {
            $this->isAllowedPrivateMutation = $this->phpDocNodeResolver->resolveAllowPrivateMutation($this->phpDocNode);
        }
        return $this->isAllowedPrivateMutation;
    }
    /**
     * @param array<string|int, VarTag> $varTags
     * @param array<int, self> $parents
     * @param array<int, PhpDocBlock> $parentPhpDocBlocks
     * @return array<string|int, VarTag>
     */
    private static function mergeVarTags(array $varTags, array $parents, array $parentPhpDocBlocks) : array
    {
        // Only allow one var tag per comment. Check the parent if child does not have this tag.
        if (count($varTags) > 0) {
            return $varTags;
        }
        foreach ($parents as $i => $parent) {
            $result = self::mergeOneParentVarTags($parent, $parentPhpDocBlocks[$i]);
            if ($result === null) {
                continue;
            }
            return $result;
        }
        return [];
    }
    /**
     * @param ResolvedPhpDocBlock $parent
     * @return array<string|int, VarTag>|null
     */
    private static function mergeOneParentVarTags(self $parent, \PHPStan\PhpDoc\PhpDocBlock $phpDocBlock) : ?array
    {
        foreach ($parent->getVarTags() as $key => $parentVarTag) {
            return [$key => self::resolveTemplateTypeInTag($parentVarTag, $phpDocBlock)];
        }
        return null;
    }
    /**
     * @param array<string, ParamTag> $paramTags
     * @param array<int, self> $parents
     * @param array<int, PhpDocBlock> $parentPhpDocBlocks
     * @return array<string, ParamTag>
     */
    private static function mergeParamTags(array $paramTags, array $parents, array $parentPhpDocBlocks) : array
    {
        foreach ($parents as $i => $parent) {
            $paramTags = self::mergeOneParentParamTags($paramTags, $parent, $parentPhpDocBlocks[$i]);
        }
        return $paramTags;
    }
    /**
     * @param array<string, ParamTag> $paramTags
     * @param ResolvedPhpDocBlock $parent
     * @return array<string, ParamTag>
     */
    private static function mergeOneParentParamTags(array $paramTags, self $parent, \PHPStan\PhpDoc\PhpDocBlock $phpDocBlock) : array
    {
        $parentParamTags = $phpDocBlock->transformArrayKeysWithParameterNameMapping($parent->getParamTags());
        foreach ($parentParamTags as $name => $parentParamTag) {
            if (array_key_exists($name, $paramTags)) {
                continue;
            }
            $paramTags[$name] = self::resolveTemplateTypeInTag($parentParamTag, $phpDocBlock);
        }
        return $paramTags;
    }
    /**
     * @param array<int, self> $parents
     * @param array<int, PhpDocBlock> $parentPhpDocBlocks
     * @return ReturnTag|Null
     */
    private static function mergeReturnTags(?ReturnTag $returnTag, array $parents, array $parentPhpDocBlocks) : ?ReturnTag
    {
        if ($returnTag !== null) {
            return $returnTag;
        }
        foreach ($parents as $i => $parent) {
            $result = self::mergeOneParentReturnTag($returnTag, $parent, $parentPhpDocBlocks[$i]);
            if ($result === null) {
                continue;
            }
            return $result;
        }
        return null;
    }
    private static function mergeOneParentReturnTag(?ReturnTag $returnTag, self $parent, \PHPStan\PhpDoc\PhpDocBlock $phpDocBlock) : ?ReturnTag
    {
        $parentReturnTag = $parent->getReturnTag();
        if ($parentReturnTag === null) {
            return $returnTag;
        }
        $parentType = $parentReturnTag->getType();
        // Each parent would overwrite the previous one except if it returns a less specific type.
        // Do not care for incompatible types as there is a separate rule for that.
        if ($returnTag !== null && $parentType->isSuperTypeOf($returnTag->getType())->yes()) {
            return null;
        }
        return self::resolveTemplateTypeInTag($parentReturnTag->withType($phpDocBlock->transformConditionalReturnTypeWithParameterNameMapping($parentReturnTag->getType()))->toImplicit(), $phpDocBlock);
    }
    /**
     * @param array<AssertTag> $assertTags
     * @param array<int, self> $parents
     * @param array<int, PhpDocBlock> $parentPhpDocBlocks
     * @return array<AssertTag>
     */
    private static function mergeAssertTags(array $assertTags, array $parents, array $parentPhpDocBlocks) : array
    {
        if (count($assertTags) > 0) {
            return $assertTags;
        }
        foreach ($parents as $i => $parent) {
            $result = $parent->getAssertTags();
            if (count($result) === 0) {
                continue;
            }
            $phpDocBlock = $parentPhpDocBlocks[$i];
            return array_map(static function (AssertTag $assertTag) use($phpDocBlock) {
                return $assertTag->withParameter($phpDocBlock->transformAssertTagParameterWithParameterNameMapping($assertTag->getParameter()));
            }, $result);
        }
        return $assertTags;
    }
    /**
     * @param array<int, self> $parents
     */
    private static function mergeSelfOutTypeTags(?SelfOutTypeTag $selfOutTypeTag, array $parents) : ?SelfOutTypeTag
    {
        if ($selfOutTypeTag !== null) {
            return $selfOutTypeTag;
        }
        foreach ($parents as $parent) {
            $result = $parent->getSelfOutTag();
            if ($result === null) {
                continue;
            }
            return $result;
        }
        return null;
    }
    /**
     * @param array<int, self> $parents
     */
    private static function mergeDeprecatedTags(?DeprecatedTag $deprecatedTag, bool $hasNotDeprecatedTag, array $parents) : ?DeprecatedTag
    {
        if ($deprecatedTag !== null) {
            return $deprecatedTag;
        }
        if ($hasNotDeprecatedTag) {
            return null;
        }
        foreach ($parents as $parent) {
            $result = $parent->getDeprecatedTag();
            if ($result === null && !$parent->isNotDeprecated()) {
                continue;
            }
            return $result;
        }
        return null;
    }
    /**
     * @param array<int, self> $parents
     */
    private static function mergeThrowsTags(?ThrowsTag $throwsTag, array $parents) : ?ThrowsTag
    {
        if ($throwsTag !== null) {
            return $throwsTag;
        }
        foreach ($parents as $parent) {
            $result = $parent->getThrowsTag();
            if ($result === null) {
                continue;
            }
            return $result;
        }
        return null;
    }
    /**
     * @param array<string, ParamOutTag> $paramOutTags
     * @param array<int, self> $parents
     * @param array<int, PhpDocBlock> $parentPhpDocBlocks
     * @return array<string, ParamOutTag>
     */
    private static function mergeParamOutTags(array $paramOutTags, array $parents, array $parentPhpDocBlocks) : array
    {
        foreach ($parents as $i => $parent) {
            $paramOutTags = self::mergeOneParentParamOutTags($paramOutTags, $parent, $parentPhpDocBlocks[$i]);
        }
        return $paramOutTags;
    }
    /**
     * @param array<string, ParamOutTag> $paramOutTags
     * @param ResolvedPhpDocBlock $parent
     * @return array<string, ParamOutTag>
     */
    private static function mergeOneParentParamOutTags(array $paramOutTags, self $parent, \PHPStan\PhpDoc\PhpDocBlock $phpDocBlock) : array
    {
        $parentParamOutTags = $phpDocBlock->transformArrayKeysWithParameterNameMapping($parent->getParamOutTags());
        foreach ($parentParamOutTags as $name => $parentParamTag) {
            if (array_key_exists($name, $paramOutTags)) {
                continue;
            }
            $paramOutTags[$name] = self::resolveTemplateTypeInTag($parentParamTag, $phpDocBlock);
        }
        return $paramOutTags;
    }
    /**
     * @template T of TypedTag
     * @param T $tag
     * @return T
     */
    private static function resolveTemplateTypeInTag(TypedTag $tag, \PHPStan\PhpDoc\PhpDocBlock $phpDocBlock) : TypedTag
    {
        $type = TemplateTypeHelper::resolveTemplateTypes($tag->getType(), $phpDocBlock->getClassReflection()->getActiveTemplateTypeMap());
        return $tag->withType($type);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc;

use PHPStan\Analyser\NameScope;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\Type\Type;
/**
 * This is the interface type node resolver extensions implement for custom PHPDoc types.
 *
 * To register it in the configuration file use the `phpstan.phpDoc.typeNodeResolverExtension` service tag:
 *
 * ```
 * services:
 * 	-
 *		class: App\PHPStan\MyExtension
 *		tags:
 *			- phpstan.phpDoc.typeNodeResolverExtension
 * ```
 *
 * Learn more: https://phpstan.org/developing-extensions/custom-phpdoc-types
 *
 * @api
 */
interface TypeNodeResolverExtension
{
    public const EXTENSION_TAG = 'phpstan.phpDoc.typeNodeResolverExtension';
    public function resolve(TypeNode $typeNode, NameScope $nameScope) : ?Type;
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc;

class DirectTypeNodeResolverExtensionRegistryProvider implements \PHPStan\PhpDoc\TypeNodeResolverExtensionRegistryProvider
{
    /**
     * @var \PHPStan\PhpDoc\TypeNodeResolverExtensionRegistry
     */
    private $registry;
    public function __construct(\PHPStan\PhpDoc\TypeNodeResolverExtensionRegistry $registry)
    {
        $this->registry = $registry;
    }
    public function getRegistry() : \PHPStan\PhpDoc\TypeNodeResolverExtensionRegistry
    {
        return $this->registry;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc\Tag;

use PHPStan\Type\Type;
/** @api */
interface TypedTag
{
    public function getType() : Type;
    /**
     * @return static
     */
    public function withType(Type $type) : self;
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc\Tag;

use PHPStan\Type\Type;
/** @api */
class VarTag implements \PHPStan\PhpDoc\Tag\TypedTag
{
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    public function __construct(Type $type)
    {
        $this->type = $type;
    }
    public function getType() : Type
    {
        return $this->type;
    }
    /**
     * @return self
     */
    public function withType(Type $type) : \PHPStan\PhpDoc\Tag\TypedTag
    {
        return new self($type);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc\Tag;

use PHPStan\Type\Type;
/** @api */
class ReturnTag implements \PHPStan\PhpDoc\Tag\TypedTag
{
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    /**
     * @var bool
     */
    private $isExplicit;
    public function __construct(Type $type, bool $isExplicit)
    {
        $this->type = $type;
        $this->isExplicit = $isExplicit;
    }
    public function getType() : Type
    {
        return $this->type;
    }
    public function isExplicit() : bool
    {
        return $this->isExplicit;
    }
    /**
     * @return self
     */
    public function withType(Type $type) : \PHPStan\PhpDoc\Tag\TypedTag
    {
        return new self($type, $this->isExplicit);
    }
    public function toImplicit() : self
    {
        return new self($this->type, \false);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc\Tag;

use PHPStan\Type\Type;
/** @api */
class MixinTag
{
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    public function __construct(Type $type)
    {
        $this->type = $type;
    }
    public function getType() : Type
    {
        return $this->type;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc\Tag;

use PHPStan\Type\Type;
/** @api */
class PropertyTag
{
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $readableType;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $writableType;
    public function __construct(Type $type, ?Type $readableType, ?Type $writableType)
    {
        $this->type = $type;
        $this->readableType = $readableType;
        $this->writableType = $writableType;
    }
    /**
     * @deprecated Use getReadableType() / getWritableType()
     */
    public function getType() : Type
    {
        return $this->type;
    }
    public function getReadableType() : ?Type
    {
        return $this->readableType;
    }
    public function getWritableType() : ?Type
    {
        return $this->writableType;
    }
    /**
     * @phpstan-assert-if-true !null $this->getReadableType()
     */
    public function isReadable() : bool
    {
        return $this->readableType !== null;
    }
    /**
     * @phpstan-assert-if-true !null $this->getWritableType()
     */
    public function isWritable() : bool
    {
        return $this->writableType !== null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc\Tag;

use PHPStan\Type\Type;
class SelfOutTypeTag implements \PHPStan\PhpDoc\Tag\TypedTag
{
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    public function __construct(Type $type)
    {
        $this->type = $type;
    }
    public function getType() : Type
    {
        return $this->type;
    }
    /**
     * @return self
     */
    public function withType(Type $type) : \PHPStan\PhpDoc\Tag\TypedTag
    {
        return new self($type);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc\Tag;

/** @api */
final class TypeAliasImportTag
{
    /**
     * @var string
     */
    private $importedAlias;
    /**
     * @var string
     */
    private $importedFrom;
    /**
     * @var string|null
     */
    private $importedAs;
    public function __construct(string $importedAlias, string $importedFrom, ?string $importedAs)
    {
        $this->importedAlias = $importedAlias;
        $this->importedFrom = $importedFrom;
        $this->importedAs = $importedAs;
    }
    public function getImportedAlias() : string
    {
        return $this->importedAlias;
    }
    public function getImportedFrom() : string
    {
        return $this->importedFrom;
    }
    public function getImportedAs() : ?string
    {
        return $this->importedAs;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc\Tag;

use PHPStan\Type\Type;
/** @api */
class ImplementsTag
{
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    public function __construct(Type $type)
    {
        $this->type = $type;
    }
    public function getType() : Type
    {
        return $this->type;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc\Tag;

use PHPStan\Reflection\PassedByReference;
use PHPStan\Type\Type;
/** @api */
class MethodTagParameter
{
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    /**
     * @var \PHPStan\Reflection\PassedByReference
     */
    private $passedByReference;
    /**
     * @var bool
     */
    private $isOptional;
    /**
     * @var bool
     */
    private $isVariadic;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $defaultValue;
    public function __construct(Type $type, PassedByReference $passedByReference, bool $isOptional, bool $isVariadic, ?Type $defaultValue)
    {
        $this->type = $type;
        $this->passedByReference = $passedByReference;
        $this->isOptional = $isOptional;
        $this->isVariadic = $isVariadic;
        $this->defaultValue = $defaultValue;
    }
    public function getType() : Type
    {
        return $this->type;
    }
    public function passedByReference() : PassedByReference
    {
        return $this->passedByReference;
    }
    public function isOptional() : bool
    {
        return $this->isOptional;
    }
    public function isVariadic() : bool
    {
        return $this->isVariadic;
    }
    public function getDefaultValue() : ?Type
    {
        return $this->defaultValue;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc\Tag;

/** @api */
class DeprecatedTag
{
    /**
     * @var string|null
     */
    private $message;
    public function __construct(?string $message)
    {
        $this->message = $message;
    }
    public function getMessage() : ?string
    {
        return $this->message;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc\Tag;

use PHPStan\Type\Type;
/** @api */
class MethodTag
{
    /**
     * @var \PHPStan\Type\Type
     */
    private $returnType;
    /**
     * @var bool
     */
    private $isStatic;
    /**
     * @var array<string, MethodTagParameter>
     */
    private $parameters;
    /**
     * @param array<string, MethodTagParameter> $parameters
     */
    public function __construct(Type $returnType, bool $isStatic, array $parameters)
    {
        $this->returnType = $returnType;
        $this->isStatic = $isStatic;
        $this->parameters = $parameters;
    }
    public function getReturnType() : Type
    {
        return $this->returnType;
    }
    public function isStatic() : bool
    {
        return $this->isStatic;
    }
    /**
     * @return array<string, MethodTagParameter>
     */
    public function getParameters() : array
    {
        return $this->parameters;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc\Tag;

use PhpParser\Node\Expr;
use function sprintf;
class AssertTagParameter
{
    /**
     * @var string
     */
    private $parameterName;
    /**
     * @var string|null
     */
    private $property;
    /**
     * @var string|null
     */
    private $method;
    public function __construct(string $parameterName, ?string $property, ?string $method)
    {
        $this->parameterName = $parameterName;
        $this->property = $property;
        $this->method = $method;
    }
    public function getParameterName() : string
    {
        return $this->parameterName;
    }
    public function changeParameterName(string $parameterName) : self
    {
        return new self($parameterName, $this->property, $this->method);
    }
    public function describe() : string
    {
        if ($this->property !== null) {
            return sprintf('%s->%s', $this->parameterName, $this->property);
        }
        if ($this->method !== null) {
            return sprintf('%s->%s()', $this->parameterName, $this->method);
        }
        return $this->parameterName;
    }
    public function getExpr(Expr $parameter) : Expr
    {
        if ($this->property !== null) {
            return new Expr\PropertyFetch($parameter, $this->property);
        }
        if ($this->method !== null) {
            return new Expr\MethodCall($parameter, $this->method);
        }
        return $parameter;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc\Tag;

use PHPStan\Type\Type;
/** @api */
class UsesTag
{
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    public function __construct(Type $type)
    {
        $this->type = $type;
    }
    public function getType() : Type
    {
        return $this->type;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc\Tag;

use PHPStan\Type\Type;
/** @api */
class ThrowsTag
{
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    public function __construct(Type $type)
    {
        $this->type = $type;
    }
    public function getType() : Type
    {
        return $this->type;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc\Tag;

use PHPStan\Type\Type;
/** @api */
class ParamTag implements \PHPStan\PhpDoc\Tag\TypedTag
{
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    /**
     * @var bool
     */
    private $isVariadic;
    public function __construct(Type $type, bool $isVariadic)
    {
        $this->type = $type;
        $this->isVariadic = $isVariadic;
    }
    public function getType() : Type
    {
        return $this->type;
    }
    public function isVariadic() : bool
    {
        return $this->isVariadic;
    }
    /**
     * @return self
     */
    public function withType(Type $type) : \PHPStan\PhpDoc\Tag\TypedTag
    {
        return new self($type, $this->isVariadic);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc\Tag;

use PHPStan\Type\Type;
/** @api */
class ParamOutTag implements \PHPStan\PhpDoc\Tag\TypedTag
{
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    public function __construct(Type $type)
    {
        $this->type = $type;
    }
    public function getType() : Type
    {
        return $this->type;
    }
    /**
     * @return self
     */
    public function withType(Type $type) : \PHPStan\PhpDoc\Tag\TypedTag
    {
        return new self($type);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc\Tag;

use PHPStan\Type\Type;
/** @api */
class ExtendsTag
{
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    public function __construct(Type $type)
    {
        $this->type = $type;
    }
    public function getType() : Type
    {
        return $this->type;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc\Tag;

use PHPStan\Type\Generic\TemplateTypeVariance;
use PHPStan\Type\Type;
/** @api */
class TemplateTag
{
    /**
     * @var string
     */
    private $name;
    /**
     * @var \PHPStan\Type\Type
     */
    private $bound;
    /**
     * @var \PHPStan\Type\Generic\TemplateTypeVariance
     */
    private $variance;
    public function __construct(string $name, Type $bound, TemplateTypeVariance $variance)
    {
        $this->name = $name;
        $this->bound = $bound;
        $this->variance = $variance;
    }
    public function getName() : string
    {
        return $this->name;
    }
    public function getBound() : Type
    {
        return $this->bound;
    }
    public function getVariance() : TemplateTypeVariance
    {
        return $this->variance;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc\Tag;

use PHPStan\Analyser\NameScope;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\Type\TypeAlias;
/** @api */
class TypeAliasTag
{
    /**
     * @var string
     */
    private $aliasName;
    /**
     * @var \PHPStan\PhpDocParser\Ast\Type\TypeNode
     */
    private $typeNode;
    /**
     * @var \PHPStan\Analyser\NameScope
     */
    private $nameScope;
    public function __construct(string $aliasName, TypeNode $typeNode, NameScope $nameScope)
    {
        $this->aliasName = $aliasName;
        $this->typeNode = $typeNode;
        $this->nameScope = $nameScope;
    }
    public function getAliasName() : string
    {
        return $this->aliasName;
    }
    public function getTypeAlias() : TypeAlias
    {
        return new TypeAlias($this->typeNode, $this->nameScope);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc\Tag;

use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Type;
/** @api */
final class AssertTag implements \PHPStan\PhpDoc\Tag\TypedTag
{
    public const NULL = '';
    public const IF_TRUE = 'true';
    public const IF_FALSE = 'false';
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $originalType;
    /**
     * @var self::NULL|self::IF_TRUE|self::IF_FALSE
     */
    private $if;
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    /**
     * @var \PHPStan\PhpDoc\Tag\AssertTagParameter
     */
    private $parameter;
    /**
     * @var bool
     */
    private $negated;
    /**
     * @var bool
     */
    private $equality;
    /**
     * @param self::NULL|self::IF_TRUE|self::IF_FALSE $if
     */
    public function __construct(string $if, Type $type, \PHPStan\PhpDoc\Tag\AssertTagParameter $parameter, bool $negated, bool $equality)
    {
        $this->if = $if;
        $this->type = $type;
        $this->parameter = $parameter;
        $this->negated = $negated;
        $this->equality = $equality;
    }
    /**
     * @return self::NULL|self::IF_TRUE|self::IF_FALSE
     */
    public function getIf() : string
    {
        return $this->if;
    }
    public function getType() : Type
    {
        return $this->type;
    }
    public function getOriginalType() : Type
    {
        return $this->originalType = $this->originalType ?? $this->type;
    }
    public function getParameter() : \PHPStan\PhpDoc\Tag\AssertTagParameter
    {
        return $this->parameter;
    }
    public function isNegated() : bool
    {
        return $this->negated;
    }
    public function isEquality() : bool
    {
        return $this->equality;
    }
    /**
     * @return static
     */
    public function withType(Type $type) : \PHPStan\PhpDoc\Tag\TypedTag
    {
        $tag = new self($this->if, $type, $this->parameter, $this->negated, $this->equality);
        $tag->originalType = $this->getOriginalType();
        return $tag;
    }
    public function withParameter(\PHPStan\PhpDoc\Tag\AssertTagParameter $parameter) : self
    {
        $tag = new self($this->if, $this->type, $parameter, $this->negated, $this->equality);
        $tag->originalType = $this->getOriginalType();
        return $tag;
    }
    public function negate() : self
    {
        if ($this->isEquality()) {
            throw new ShouldNotHappenException();
        }
        $tag = new self($this->if, $this->type, $this->parameter, !$this->negated, $this->equality);
        $tag->originalType = $this->getOriginalType();
        return $tag;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\PhpDoc;

/** @api */
interface TypeNodeResolverAwareExtension
{
    public function setTypeNodeResolver(\PHPStan\PhpDoc\TypeNodeResolver $typeNodeResolver) : void;
}
<?php

declare (strict_types=1);
namespace PHPStan;

/**
 * @return array<int, callable(string): void>
 */
function autoloadFunctions() : array
{
    return $GLOBALS['__phpstanAutoloadFunctions'] ?? [];
}
<?php

declare (strict_types=1);
namespace PHPStan\DependencyInjection;

use function array_key_exists;
class MemoizingContainer implements \PHPStan\DependencyInjection\Container
{
    /** @var array<string, mixed> */
    private $servicesByType = [];
    /**
     * @var \PHPStan\DependencyInjection\Container
     */
    private $originalContainer;
    public function __construct(\PHPStan\DependencyInjection\Container $originalContainer)
    {
        $this->originalContainer = $originalContainer;
    }
    public function hasService(string $serviceName) : bool
    {
        return $this->originalContainer->hasService($serviceName);
    }
    public function getService(string $serviceName)
    {
        return $this->originalContainer->getService($serviceName);
    }
    public function getByType(string $className)
    {
        if (array_key_exists($className, $this->servicesByType)) {
            return $this->servicesByType[$className];
        }
        $service = $this->originalContainer->getByType($className);
        $this->servicesByType[$className] = $service;
        return $service;
    }
    public function findServiceNamesByType(string $className) : array
    {
        return $this->originalContainer->findServiceNamesByType($className);
    }
    public function getServicesByTag(string $tagName) : array
    {
        return $this->originalContainer->getServicesByTag($tagName);
    }
    public function getParameters() : array
    {
        return $this->originalContainer->getParameters();
    }
    public function hasParameter(string $parameterName) : bool
    {
        return $this->originalContainer->hasParameter($parameterName);
    }
    public function getParameter(string $parameterName)
    {
        return $this->originalContainer->getParameter($parameterName);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\DependencyInjection;

use Hoa\Compiler\Llk\Llk;
use Hoa\File\Read;
use _PHPStan_dcc7b7cff\Nette\DI\CompilerExtension;
use _PHPStan_dcc7b7cff\Nette\Utils\RegexpException;
use _PHPStan_dcc7b7cff\Nette\Utils\Strings;
use PHPStan\Analyser\ConstantResolver;
use PHPStan\Analyser\NameScope;
use PHPStan\Command\IgnoredRegexValidator;
use PHPStan\DependencyInjection\Type\OperatorTypeSpecifyingExtensionRegistryProvider;
use PHPStan\Php\PhpVersion;
use PHPStan\PhpDoc\DirectTypeNodeResolverExtensionRegistryProvider;
use PHPStan\PhpDoc\TypeNodeResolver;
use PHPStan\PhpDoc\TypeNodeResolverExtensionRegistry;
use PHPStan\PhpDoc\TypeStringResolver;
use PHPStan\PhpDocParser\Lexer\Lexer;
use PHPStan\PhpDocParser\Parser\ConstExprParser;
use PHPStan\PhpDocParser\Parser\TypeParser;
use PHPStan\Reflection\InitializerExprTypeResolver;
use PHPStan\Reflection\ReflectionProvider\DirectReflectionProviderProvider;
use PHPStan\Reflection\ReflectionProvider\DummyReflectionProvider;
use PHPStan\Reflection\ReflectionProviderStaticAccessor;
use PHPStan\Type\Constant\OversizedArrayBuilder;
use PHPStan\Type\DirectTypeAliasResolverProvider;
use PHPStan\Type\OperatorTypeSpecifyingExtensionRegistry;
use PHPStan\Type\Type;
use PHPStan\Type\TypeAliasResolver;
use function array_keys;
use function array_map;
use function count;
use function implode;
use function is_array;
use function sprintf;
use const PHP_VERSION_ID;
class ValidateIgnoredErrorsExtension extends CompilerExtension
{
    /**
     * @throws InvalidIgnoredErrorPatternsException
     */
    public function loadConfiguration() : void
    {
        $builder = $this->getContainerBuilder();
        if (!$builder->parameters['__validate']) {
            return;
        }
        $ignoreErrors = $builder->parameters['ignoreErrors'];
        if (count($ignoreErrors) === 0) {
            return;
        }
        /** @throws void */
        $parser = Llk::load(new Read('hoa://Library/Regex/Grammar.pp'));
        $reflectionProvider = new DummyReflectionProvider();
        $reflectionProviderProvider = new DirectReflectionProviderProvider($reflectionProvider);
        ReflectionProviderStaticAccessor::registerInstance($reflectionProvider);
        $constantResolver = new ConstantResolver($reflectionProviderProvider, []);
        $ignoredRegexValidator = new IgnoredRegexValidator($parser, new TypeStringResolver(new Lexer(), new TypeParser(new ConstExprParser($builder->parameters['featureToggles']['unescapeStrings'])), new TypeNodeResolver(new DirectTypeNodeResolverExtensionRegistryProvider(new class implements TypeNodeResolverExtensionRegistry
        {
            public function getExtensions() : array
            {
                return [];
            }
        }), $reflectionProviderProvider, new DirectTypeAliasResolverProvider(new class implements TypeAliasResolver
        {
            public function hasTypeAlias(string $aliasName, ?string $classNameScope) : bool
            {
                return \false;
            }
            public function resolveTypeAlias(string $aliasName, NameScope $nameScope) : ?Type
            {
                return null;
            }
        }), $constantResolver, new InitializerExprTypeResolver($constantResolver, $reflectionProviderProvider, new PhpVersion(PHP_VERSION_ID), new class implements OperatorTypeSpecifyingExtensionRegistryProvider
        {
            public function getRegistry() : OperatorTypeSpecifyingExtensionRegistry
            {
                return new OperatorTypeSpecifyingExtensionRegistry(null, []);
            }
        }, new OversizedArrayBuilder()))));
        $errors = [];
        foreach ($ignoreErrors as $ignoreError) {
            if (is_array($ignoreError)) {
                if (isset($ignoreError['count'])) {
                    continue;
                    // ignoreError coming from baseline will be correct
                }
                if (isset($ignoreError['messages'])) {
                    $ignoreMessages = $ignoreError['messages'];
                } else {
                    $ignoreMessages = [$ignoreError['message']];
                }
            } else {
                $ignoreMessages = [$ignoreError];
            }
            foreach ($ignoreMessages as $ignoreMessage) {
                $error = $this->validateMessage($ignoredRegexValidator, $ignoreMessage);
                if ($error === null) {
                    continue;
                }
                $errors[] = $error;
            }
        }
        if (count($errors) === 0) {
            return;
        }
        throw new \PHPStan\DependencyInjection\InvalidIgnoredErrorPatternsException($errors);
    }
    private function validateMessage(IgnoredRegexValidator $ignoredRegexValidator, string $ignoreMessage) : ?string
    {
        try {
            Strings::match('', $ignoreMessage);
            $validationResult = $ignoredRegexValidator->validate($ignoreMessage);
            $ignoredTypes = $validationResult->getIgnoredTypes();
            if (count($ignoredTypes) > 0) {
                return $this->createIgnoredTypesError($ignoreMessage, $ignoredTypes);
            }
            if ($validationResult->hasAnchorsInTheMiddle()) {
                return $this->createAnchorInTheMiddleError($ignoreMessage);
            }
            if ($validationResult->areAllErrorsIgnored()) {
                return sprintf("Ignored error %s has an unescaped '%s' which leads to ignoring all errors. Use '%s' instead.", $ignoreMessage, $validationResult->getWrongSequence(), $validationResult->getEscapedWrongSequence());
            }
        } catch (RegexpException $e) {
            return $e->getMessage();
        }
        return null;
    }
    /**
     * @param array<string, string> $ignoredTypes
     */
    private function createIgnoredTypesError(string $regex, array $ignoredTypes) : string
    {
        return sprintf("Ignored error %s has an unescaped '|' which leads to ignoring more errors than intended. Use '\\|' instead.\n%s", $regex, sprintf("It ignores all errors containing the following types:\n%s", implode("\n", array_map(static function (string $typeDescription) : string {
            return sprintf('* %s', $typeDescription);
        }, array_keys($ignoredTypes)))));
    }
    private function createAnchorInTheMiddleError(string $regex) : string
    {
        return sprintf("Ignored error %s has an unescaped anchor '\$' in the middle. This leads to unintended behavior. Use '\\\$' instead.", $regex);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\DependencyInjection;

use _PHPStan_dcc7b7cff\Nette\DI\Config\Adapters\PhpAdapter;
use _PHPStan_dcc7b7cff\Nette\DI\Extensions\ExtensionsExtension;
use _PHPStan_dcc7b7cff\Nette\DI\Extensions\PhpExtension;
use _PHPStan_dcc7b7cff\Nette\DI\Helpers;
use _PHPStan_dcc7b7cff\Nette\Utils\Strings;
use _PHPStan_dcc7b7cff\Nette\Utils\Validators;
use Phar;
use PhpParser\Parser;
use PHPStan\BetterReflection\BetterReflection;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\SourceStubber\PhpStormStubsSourceStubber;
use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator;
use PHPStan\Broker\Broker;
use PHPStan\Command\CommandHelper;
use PHPStan\File\FileHelper;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Reflection\ReflectionProviderStaticAccessor;
use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\Generic\TemplateTypeVariance;
use PHPStan\Type\ObjectType;
use _PHPStan_dcc7b7cff\Symfony\Component\Finder\Finder;
use function array_diff_key;
use function array_map;
use function array_merge;
use function array_unique;
use function count;
use function dirname;
use function extension_loaded;
use function ini_get;
use function is_dir;
use function is_file;
use function is_readable;
use function spl_object_hash;
use function sprintf;
use function str_ends_with;
use function sys_get_temp_dir;
use function time;
use function unlink;
/** @api */
class ContainerFactory
{
    /**
     * @var \PHPStan\File\FileHelper
     */
    private $fileHelper;
    /**
     * @var string
     */
    private $rootDirectory;
    /**
     * @var string
     */
    private $configDirectory;
    /**
     * @var string|null
     */
    private static $lastInitializedContainerId;
    /**
     * @var string
     */
    private $currentWorkingDirectory;
    /**
     * @var bool
     */
    private $checkDuplicateFiles = \false;
    /** @api */
    public function __construct(string $currentWorkingDirectory, bool $checkDuplicateFiles = \false)
    {
        $this->currentWorkingDirectory = $currentWorkingDirectory;
        $this->checkDuplicateFiles = $checkDuplicateFiles;
        $this->fileHelper = new FileHelper($currentWorkingDirectory);
        $rootDir = __DIR__ . '/../..';
        $originalRootDir = $this->fileHelper->normalizePath($rootDir);
        if (extension_loaded('phar')) {
            $pharPath = Phar::running(\false);
            if ($pharPath !== '') {
                $rootDir = dirname($pharPath);
            }
        }
        $this->rootDirectory = $this->fileHelper->normalizePath($rootDir);
        $this->configDirectory = $originalRootDir . '/conf';
    }
    /**
     * @param string[] $additionalConfigFiles
     * @param string[] $analysedPaths
     * @param string[] $composerAutoloaderProjectPaths
     * @param string[] $analysedPathsFromConfig
     */
    public function create(string $tempDirectory, array $additionalConfigFiles, array $analysedPaths, array $composerAutoloaderProjectPaths = [], array $analysedPathsFromConfig = [], string $usedLevel = CommandHelper::DEFAULT_LEVEL, ?string $generateBaselineFile = null, ?string $cliAutoloadFile = null) : \PHPStan\DependencyInjection\Container
    {
        $allConfigFiles = $this->detectDuplicateIncludedFiles($additionalConfigFiles, ['rootDir' => $this->rootDirectory, 'currentWorkingDirectory' => $this->currentWorkingDirectory]);
        $configurator = new \PHPStan\DependencyInjection\Configurator(new \PHPStan\DependencyInjection\LoaderFactory($this->fileHelper, $this->rootDirectory, $this->currentWorkingDirectory, $generateBaselineFile));
        $configurator->defaultExtensions = ['php' => PhpExtension::class, 'extensions' => ExtensionsExtension::class];
        $configurator->setDebugMode(\true);
        $configurator->setTempDirectory($tempDirectory);
        $configurator->addParameters(['rootDir' => $this->rootDirectory, 'currentWorkingDirectory' => $this->currentWorkingDirectory, 'cliArgumentsVariablesRegistered' => ini_get('register_argc_argv') === '1', 'tmpDir' => $tempDirectory, 'additionalConfigFiles' => $additionalConfigFiles, 'allConfigFiles' => $allConfigFiles, 'composerAutoloaderProjectPaths' => $composerAutoloaderProjectPaths, 'generateBaselineFile' => $generateBaselineFile, 'usedLevel' => $usedLevel, 'cliAutoloadFile' => $cliAutoloadFile, 'fixerTmpDir' => sys_get_temp_dir() . '/phpstan-fixer']);
        $configurator->addDynamicParameters(['analysedPaths' => $analysedPaths, 'analysedPathsFromConfig' => $analysedPathsFromConfig]);
        $configurator->addConfig($this->configDirectory . '/config.neon');
        foreach ($additionalConfigFiles as $additionalConfigFile) {
            $configurator->addConfig($additionalConfigFile);
        }
        $configurator->setAllConfigFiles($allConfigFiles);
        $container = $configurator->createContainer()->getByType(\PHPStan\DependencyInjection\Container::class);
        self::postInitializeContainer($container);
        return $container;
    }
    /** @internal */
    public static function postInitializeContainer(\PHPStan\DependencyInjection\Container $container) : void
    {
        $containerId = spl_object_hash($container);
        if ($containerId === self::$lastInitializedContainerId) {
            return;
        }
        self::$lastInitializedContainerId = $containerId;
        /** @var SourceLocator $sourceLocator */
        $sourceLocator = $container->getService('betterReflectionSourceLocator');
        /** @var Reflector $reflector */
        $reflector = $container->getService('betterReflectionReflector');
        /** @var Parser $phpParser */
        $phpParser = $container->getService('phpParserDecorator');
        BetterReflection::populate($container->getByType(PhpVersion::class)->getVersionId(), $sourceLocator, $reflector, $phpParser, $container->getByType(PhpStormStubsSourceStubber::class));
        $broker = $container->getByType(Broker::class);
        Broker::registerInstance($broker);
        ReflectionProviderStaticAccessor::registerInstance($container->getByType(ReflectionProvider::class));
        ObjectType::resetCaches();
        $container->getService('typeSpecifier');
        \PHPStan\DependencyInjection\BleedingEdgeToggle::setBleedingEdge($container->getParameter('featureToggles')['bleedingEdge']);
        AccessoryArrayListType::setListTypeEnabled($container->getParameter('featureToggles')['listType']);
        TemplateTypeVariance::setInvarianceCompositionEnabled($container->getParameter('featureToggles')['invarianceComposition']);
    }
    public function clearOldContainers(string $tempDirectory) : void
    {
        $configurator = new \PHPStan\DependencyInjection\Configurator(new \PHPStan\DependencyInjection\LoaderFactory($this->fileHelper, $this->rootDirectory, $this->currentWorkingDirectory, null));
        $configurator->setDebugMode(\true);
        $configurator->setTempDirectory($tempDirectory);
        $containerDirectory = $configurator->getContainerCacheDirectory();
        if (!is_dir($containerDirectory)) {
            return;
        }
        $finder = new Finder();
        $finder->name('Container_*')->in($containerDirectory);
        $twoDaysAgo = time() - 24 * 60 * 60 * 2;
        foreach ($finder as $containerFile) {
            $path = $containerFile->getRealPath();
            if ($path === \false) {
                continue;
            }
            if ($containerFile->getATime() > $twoDaysAgo) {
                continue;
            }
            if ($containerFile->getCTime() > $twoDaysAgo) {
                continue;
            }
            @unlink($path);
        }
    }
    public function getCurrentWorkingDirectory() : string
    {
        return $this->currentWorkingDirectory;
    }
    public function getRootDirectory() : string
    {
        return $this->rootDirectory;
    }
    public function getConfigDirectory() : string
    {
        return $this->configDirectory;
    }
    /**
     * @param string[] $configFiles
     * @param array<string, string> $loaderParameters
     * @return string[]
     * @throws DuplicateIncludedFilesException
     */
    private function detectDuplicateIncludedFiles(array $configFiles, array $loaderParameters) : array
    {
        $neonAdapter = new \PHPStan\DependencyInjection\NeonAdapter();
        $phpAdapter = new PhpAdapter();
        $allConfigFiles = [];
        foreach ($configFiles as $configFile) {
            $allConfigFiles = array_merge($allConfigFiles, self::getConfigFiles($this->fileHelper, $neonAdapter, $phpAdapter, $configFile, $loaderParameters, null));
        }
        $normalized = array_map(function (string $file) : string {
            return $this->fileHelper->normalizePath($file);
        }, $allConfigFiles);
        $deduplicated = array_unique($normalized);
        if (count($normalized) <= count($deduplicated)) {
            return $normalized;
        }
        if (!$this->checkDuplicateFiles) {
            return $normalized;
        }
        $duplicateFiles = array_unique(array_diff_key($normalized, $deduplicated));
        throw new \PHPStan\DependencyInjection\DuplicateIncludedFilesException($duplicateFiles);
    }
    /**
     * @param array<string, string> $loaderParameters
     * @return string[]
     */
    private static function getConfigFiles(FileHelper $fileHelper, \PHPStan\DependencyInjection\NeonAdapter $neonAdapter, PhpAdapter $phpAdapter, string $configFile, array $loaderParameters, ?string $generateBaselineFile) : array
    {
        if ($generateBaselineFile === $fileHelper->normalizePath($configFile)) {
            return [];
        }
        if (!is_file($configFile) || !is_readable($configFile)) {
            return [];
        }
        if (str_ends_with($configFile, '.php')) {
            $data = $phpAdapter->load($configFile);
        } else {
            $data = $neonAdapter->load($configFile);
        }
        $allConfigFiles = [$configFile];
        if (isset($data['includes'])) {
            Validators::assert($data['includes'], 'list', sprintf("section 'includes' in file '%s'", $configFile));
            $includes = Helpers::expand($data['includes'], $loaderParameters);
            foreach ($includes as $include) {
                $include = self::expandIncludedFile($include, $configFile);
                $allConfigFiles = array_merge($allConfigFiles, self::getConfigFiles($fileHelper, $neonAdapter, $phpAdapter, $include, $loaderParameters, $generateBaselineFile));
            }
        }
        return $allConfigFiles;
    }
    private static function expandIncludedFile(string $includedFile, string $mainFile) : string
    {
        return Strings::match($includedFile, '#([a-z]+:)?[/\\\\]#Ai') !== null ? $includedFile : dirname($mainFile) . '/' . $includedFile;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\DependencyInjection\Type;

use PHPStan\Broker\Broker;
use PHPStan\Broker\BrokerFactory;
use PHPStan\DependencyInjection\Container;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Type\DynamicReturnTypeExtensionRegistry;
class LazyDynamicReturnTypeExtensionRegistryProvider implements \PHPStan\DependencyInjection\Type\DynamicReturnTypeExtensionRegistryProvider
{
    /**
     * @var \PHPStan\Type\DynamicReturnTypeExtensionRegistry|null
     */
    private $registry;
    /**
     * @var \PHPStan\DependencyInjection\Container
     */
    private $container;
    public function __construct(Container $container)
    {
        $this->container = $container;
    }
    public function getRegistry() : DynamicReturnTypeExtensionRegistry
    {
        if ($this->registry === null) {
            $this->registry = new DynamicReturnTypeExtensionRegistry($this->container->getByType(Broker::class), $this->container->getByType(ReflectionProvider::class), $this->container->getServicesByTag(BrokerFactory::DYNAMIC_METHOD_RETURN_TYPE_EXTENSION_TAG), $this->container->getServicesByTag(BrokerFactory::DYNAMIC_STATIC_METHOD_RETURN_TYPE_EXTENSION_TAG), $this->container->getServicesByTag(BrokerFactory::DYNAMIC_FUNCTION_RETURN_TYPE_EXTENSION_TAG));
        }
        return $this->registry;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\DependencyInjection\Type;

use PHPStan\Type\OperatorTypeSpecifyingExtensionRegistry;
interface OperatorTypeSpecifyingExtensionRegistryProvider
{
    public function getRegistry() : OperatorTypeSpecifyingExtensionRegistry;
}
<?php

declare (strict_types=1);
namespace PHPStan\DependencyInjection\Type;

use PHPStan\Type\DynamicFunctionThrowTypeExtension;
use PHPStan\Type\DynamicMethodThrowTypeExtension;
use PHPStan\Type\DynamicStaticMethodThrowTypeExtension;
interface DynamicThrowTypeExtensionProvider
{
    /** @return DynamicFunctionThrowTypeExtension[] */
    public function getDynamicFunctionThrowTypeExtensions() : array;
    /** @return DynamicMethodThrowTypeExtension[] */
    public function getDynamicMethodThrowTypeExtensions() : array;
    /** @return DynamicStaticMethodThrowTypeExtension[] */
    public function getDynamicStaticMethodThrowTypeExtensions() : array;
}
<?php

declare (strict_types=1);
namespace PHPStan\DependencyInjection\Type;

use PHPStan\Broker\Broker;
use PHPStan\Broker\BrokerFactory;
use PHPStan\DependencyInjection\Container;
use PHPStan\Type\OperatorTypeSpecifyingExtensionRegistry;
class LazyOperatorTypeSpecifyingExtensionRegistryProvider implements \PHPStan\DependencyInjection\Type\OperatorTypeSpecifyingExtensionRegistryProvider
{
    /**
     * @var \PHPStan\Type\OperatorTypeSpecifyingExtensionRegistry|null
     */
    private $registry;
    /**
     * @var \PHPStan\DependencyInjection\Container
     */
    private $container;
    public function __construct(Container $container)
    {
        $this->container = $container;
    }
    public function getRegistry() : OperatorTypeSpecifyingExtensionRegistry
    {
        if ($this->registry === null) {
            $this->registry = new OperatorTypeSpecifyingExtensionRegistry($this->container->getByType(Broker::class), $this->container->getServicesByTag(BrokerFactory::OPERATOR_TYPE_SPECIFYING_EXTENSION_TAG));
        }
        return $this->registry;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\DependencyInjection\Type;

use PHPStan\Type\DynamicReturnTypeExtensionRegistry;
interface DynamicReturnTypeExtensionRegistryProvider
{
    public function getRegistry() : DynamicReturnTypeExtensionRegistry;
}
<?php

declare (strict_types=1);
namespace PHPStan\DependencyInjection\Type;

use PHPStan\DependencyInjection\Container;
class LazyDynamicThrowTypeExtensionProvider implements \PHPStan\DependencyInjection\Type\DynamicThrowTypeExtensionProvider
{
    public const FUNCTION_TAG = 'phpstan.dynamicFunctionThrowTypeExtension';
    public const METHOD_TAG = 'phpstan.dynamicMethodThrowTypeExtension';
    public const STATIC_METHOD_TAG = 'phpstan.dynamicStaticMethodThrowTypeExtension';
    /**
     * @var \PHPStan\DependencyInjection\Container
     */
    private $container;
    public function __construct(Container $container)
    {
        $this->container = $container;
    }
    public function getDynamicFunctionThrowTypeExtensions() : array
    {
        return $this->container->getServicesByTag(self::FUNCTION_TAG);
    }
    public function getDynamicMethodThrowTypeExtensions() : array
    {
        return $this->container->getServicesByTag(self::METHOD_TAG);
    }
    public function getDynamicStaticMethodThrowTypeExtensions() : array
    {
        return $this->container->getServicesByTag(self::STATIC_METHOD_TAG);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\DependencyInjection;

class BleedingEdgeToggle
{
    /**
     * @var bool
     */
    private static $bleedingEdge = \false;
    public static function isBleedingEdge() : bool
    {
        return self::$bleedingEdge;
    }
    public static function setBleedingEdge(bool $bleedingEdge) : void
    {
        self::$bleedingEdge = $bleedingEdge;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\DependencyInjection;

use Exception;
use function sprintf;
class ParameterNotFoundException extends Exception
{
    public function __construct(string $parameterName)
    {
        parent::__construct(sprintf('Parameter %s not found in the container.', $parameterName));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\DependencyInjection;

/** @api */
interface Container
{
    public function hasService(string $serviceName) : bool;
    /**
     * @return mixed
     */
    public function getService(string $serviceName);
    /**
     * @phpstan-template T of object
     * @phpstan-param class-string<T> $className
     * @phpstan-return T
     * @return mixed
     */
    public function getByType(string $className);
    /**
     * @param class-string $className
     * @return string[]
     */
    public function findServiceNamesByType(string $className) : array;
    /**
     * @return mixed[]
     */
    public function getServicesByTag(string $tagName) : array;
    /**
     * @return mixed[]
     */
    public function getParameters() : array;
    public function hasParameter(string $parameterName) : bool;
    /**
     * @return mixed
     * @throws ParameterNotFoundException
     */
    public function getParameter(string $parameterName);
}
<?php

declare (strict_types=1);
namespace PHPStan\DependencyInjection;

use _PHPStan_dcc7b7cff\Nette\DI\CompilerExtension;
use _PHPStan_dcc7b7cff\Nette\Schema\Expect;
use _PHPStan_dcc7b7cff\Nette\Schema\Schema;
use PHPStan\Rules\LazyRegistry;
class RulesExtension extends CompilerExtension
{
    public function getConfigSchema() : Schema
    {
        return Expect::listOf('string');
    }
    public function loadConfiguration() : void
    {
        /** @var mixed[] $config */
        $config = $this->config;
        $builder = $this->getContainerBuilder();
        foreach ($config as $key => $rule) {
            $builder->addDefinition($this->prefix((string) $key))->setFactory($rule)->setAutowired($rule)->addTag(LazyRegistry::RULE_TAG);
        }
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\DependencyInjection\Nette;

use PHPStan\DependencyInjection\Container;
use PHPStan\DependencyInjection\ParameterNotFoundException;
use function array_key_exists;
use function array_keys;
use function array_map;
/**
 * @internal
 */
class NetteContainer implements Container
{
    /**
     * @var \Nette\DI\Container
     */
    private $container;
    public function __construct(\_PHPStan_dcc7b7cff\Nette\DI\Container $container)
    {
        $this->container = $container;
    }
    public function hasService(string $serviceName) : bool
    {
        return $this->container->hasService($serviceName);
    }
    /**
     * @return mixed
     */
    public function getService(string $serviceName)
    {
        return $this->container->getService($serviceName);
    }
    /**
     * @phpstan-template T of object
     * @phpstan-param class-string<T> $className
     * @phpstan-return T
     * @return mixed
     */
    public function getByType(string $className)
    {
        return $this->container->getByType($className);
    }
    /**
     * @param class-string $className
     * @return string[]
     */
    public function findServiceNamesByType(string $className) : array
    {
        return $this->container->findByType($className);
    }
    /**
     * @return mixed[]
     */
    public function getServicesByTag(string $tagName) : array
    {
        return $this->tagsToServices($this->container->findByTag($tagName));
    }
    /**
     * @return mixed[]
     */
    public function getParameters() : array
    {
        return $this->container->parameters;
    }
    public function hasParameter(string $parameterName) : bool
    {
        return array_key_exists($parameterName, $this->container->parameters);
    }
    /**
     * @return mixed
     */
    public function getParameter(string $parameterName)
    {
        if (!$this->hasParameter($parameterName)) {
            throw new ParameterNotFoundException($parameterName);
        }
        return $this->container->parameters[$parameterName];
    }
    /**
     * @param mixed[] $tags
     * @return mixed[]
     */
    private function tagsToServices(array $tags) : array
    {
        return array_map(function (string $serviceName) {
            return $this->getService($serviceName);
        }, array_keys($tags));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\DependencyInjection;

use _PHPStan_dcc7b7cff\Nette\DI\Config\Loader;
use PHPStan\File\FileHelper;
class LoaderFactory
{
    /**
     * @var \PHPStan\File\FileHelper
     */
    private $fileHelper;
    /**
     * @var string
     */
    private $rootDir;
    /**
     * @var string
     */
    private $currentWorkingDirectory;
    /**
     * @var string|null
     */
    private $generateBaselineFile;
    public function __construct(FileHelper $fileHelper, string $rootDir, string $currentWorkingDirectory, ?string $generateBaselineFile)
    {
        $this->fileHelper = $fileHelper;
        $this->rootDir = $rootDir;
        $this->currentWorkingDirectory = $currentWorkingDirectory;
        $this->generateBaselineFile = $generateBaselineFile;
    }
    public function createLoader() : Loader
    {
        $loader = new \PHPStan\DependencyInjection\NeonLoader($this->fileHelper, $this->generateBaselineFile);
        $loader->addAdapter('dist', \PHPStan\DependencyInjection\NeonAdapter::class);
        $loader->addAdapter('neon', \PHPStan\DependencyInjection\NeonAdapter::class);
        $loader->setParameters(['rootDir' => $this->rootDir, 'currentWorkingDirectory' => $this->currentWorkingDirectory]);
        return $loader;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\DependencyInjection;

use function array_merge;
class DerivativeContainerFactory
{
    /**
     * @var string
     */
    private $currentWorkingDirectory;
    /**
     * @var string
     */
    private $tempDirectory;
    /**
     * @var string[]
     */
    private $additionalConfigFiles;
    /**
     * @var string[]
     */
    private $analysedPaths;
    /**
     * @var string[]
     */
    private $composerAutoloaderProjectPaths;
    /**
     * @var string[]
     */
    private $analysedPathsFromConfig;
    /**
     * @var string
     */
    private $usedLevel;
    /**
     * @var string|null
     */
    private $generateBaselineFile;
    /**
     * @var string|null
     */
    private $cliAutoloadFile;
    /**
     * @param string[] $additionalConfigFiles
     * @param string[] $analysedPaths
     * @param string[] $composerAutoloaderProjectPaths
     * @param string[] $analysedPathsFromConfig
     */
    public function __construct(string $currentWorkingDirectory, string $tempDirectory, array $additionalConfigFiles, array $analysedPaths, array $composerAutoloaderProjectPaths, array $analysedPathsFromConfig, string $usedLevel, ?string $generateBaselineFile, ?string $cliAutoloadFile)
    {
        $this->currentWorkingDirectory = $currentWorkingDirectory;
        $this->tempDirectory = $tempDirectory;
        $this->additionalConfigFiles = $additionalConfigFiles;
        $this->analysedPaths = $analysedPaths;
        $this->composerAutoloaderProjectPaths = $composerAutoloaderProjectPaths;
        $this->analysedPathsFromConfig = $analysedPathsFromConfig;
        $this->usedLevel = $usedLevel;
        $this->generateBaselineFile = $generateBaselineFile;
        $this->cliAutoloadFile = $cliAutoloadFile;
    }
    /**
     * @param string[] $additionalConfigFiles
     */
    public function create(array $additionalConfigFiles) : \PHPStan\DependencyInjection\Container
    {
        $containerFactory = new \PHPStan\DependencyInjection\ContainerFactory($this->currentWorkingDirectory);
        return $containerFactory->create($this->tempDirectory, array_merge($this->additionalConfigFiles, $additionalConfigFiles), $this->analysedPaths, $this->composerAutoloaderProjectPaths, $this->analysedPathsFromConfig, $this->usedLevel, $this->generateBaselineFile, $this->cliAutoloadFile);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\DependencyInjection;

use _PHPStan_dcc7b7cff\Nette\DI\CompilerExtension;
use _PHPStan_dcc7b7cff\Nette\DI\Definitions\Statement;
use _PHPStan_dcc7b7cff\Nette\Schema\Context as SchemaContext;
use _PHPStan_dcc7b7cff\Nette\Schema\DynamicParameter;
use _PHPStan_dcc7b7cff\Nette\Schema\Elements\AnyOf;
use _PHPStan_dcc7b7cff\Nette\Schema\Elements\Structure;
use _PHPStan_dcc7b7cff\Nette\Schema\Elements\Type;
use _PHPStan_dcc7b7cff\Nette\Schema\Expect;
use _PHPStan_dcc7b7cff\Nette\Schema\Processor;
use _PHPStan_dcc7b7cff\Nette\Schema\Schema;
use PHPStan\ShouldNotHappenException;
use function array_map;
use function count;
use function is_array;
use function substr;
class ParametersSchemaExtension extends CompilerExtension
{
    public function getConfigSchema() : Schema
    {
        return Expect::arrayOf(Expect::type(Statement::class))->min(1);
    }
    public function loadConfiguration() : void
    {
        $builder = $this->getContainerBuilder();
        if (!$builder->parameters['__validate']) {
            return;
        }
        /** @var mixed[] $config */
        $config = $this->config;
        $config['analysedPaths'] = new Statement(DynamicParameter::class);
        $config['analysedPathsFromConfig'] = new Statement(DynamicParameter::class);
        $schema = $this->processArgument(new Statement('schema', [new Statement('structure', [$config])]));
        $processor = new Processor();
        $processor->onNewContext[] = static function (SchemaContext $context) : void {
            $context->path = ['parameters'];
        };
        $processor->process($schema, $builder->parameters);
    }
    /**
     * @param Statement[] $statements
     */
    private function processSchema(array $statements, bool $required = \true) : Schema
    {
        if (count($statements) === 0) {
            throw new ShouldNotHappenException();
        }
        $parameterSchema = null;
        foreach ($statements as $statement) {
            $processedArguments = array_map(function ($argument) {
                return $this->processArgument($argument);
            }, $statement->arguments);
            if ($parameterSchema === null) {
                /** @var Type|AnyOf|Structure $parameterSchema */
                $parameterSchema = Expect::{$statement->getEntity()}(...$processedArguments);
            } else {
                $parameterSchema->{$statement->getEntity()}(...$processedArguments);
            }
        }
        if ($required) {
            $parameterSchema->required();
        }
        return $parameterSchema;
    }
    /**
     * @param mixed $argument
     * @return mixed
     */
    private function processArgument($argument, bool $required = \true)
    {
        if ($argument instanceof Statement) {
            if ($argument->entity === 'schema') {
                $arguments = [];
                foreach ($argument->arguments as $schemaArgument) {
                    if (!$schemaArgument instanceof Statement) {
                        throw new ShouldNotHappenException('schema() should contain another statement().');
                    }
                    $arguments[] = $schemaArgument;
                }
                if (count($arguments) === 0) {
                    throw new ShouldNotHappenException('schema() should have at least one argument.');
                }
                return $this->processSchema($arguments, $required);
            }
            return $this->processSchema([$argument], $required);
        } elseif (is_array($argument)) {
            $processedArray = [];
            foreach ($argument as $key => $val) {
                $required = $key[0] !== '?';
                $key = $required ? $key : substr($key, 1);
                $processedArray[$key] = $this->processArgument($val, $required);
            }
            return $processedArray;
        }
        return $argument;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\DependencyInjection;

use _PHPStan_dcc7b7cff\Nette;
use _PHPStan_dcc7b7cff\Nette\DI\CompilerExtension;
use _PHPStan_dcc7b7cff\Nette\Schema\Expect;
use PHPStan\Analyser\TypeSpecifierFactory;
use PHPStan\Broker\BrokerFactory;
use PHPStan\Collectors\RegistryFactory as CollectorRegistryFactory;
use PHPStan\Parser\RichParser;
use PHPStan\PhpDoc\TypeNodeResolverExtension;
use PHPStan\Rules\LazyRegistry;
use PHPStan\ShouldNotHappenException;
use function array_reduce;
use function count;
use function is_array;
use function sprintf;
class ConditionalTagsExtension extends CompilerExtension
{
    public function getConfigSchema() : Nette\Schema\Schema
    {
        $bool = Expect::anyOf(Expect::bool(), Expect::listOf(Expect::bool()));
        return Expect::arrayOf(Expect::structure([BrokerFactory::PROPERTIES_CLASS_REFLECTION_EXTENSION_TAG => $bool, BrokerFactory::METHODS_CLASS_REFLECTION_EXTENSION_TAG => $bool, BrokerFactory::DYNAMIC_METHOD_RETURN_TYPE_EXTENSION_TAG => $bool, BrokerFactory::DYNAMIC_STATIC_METHOD_RETURN_TYPE_EXTENSION_TAG => $bool, BrokerFactory::DYNAMIC_FUNCTION_RETURN_TYPE_EXTENSION_TAG => $bool, BrokerFactory::OPERATOR_TYPE_SPECIFYING_EXTENSION_TAG => $bool, LazyRegistry::RULE_TAG => $bool, TypeNodeResolverExtension::EXTENSION_TAG => $bool, TypeSpecifierFactory::FUNCTION_TYPE_SPECIFYING_EXTENSION_TAG => $bool, TypeSpecifierFactory::METHOD_TYPE_SPECIFYING_EXTENSION_TAG => $bool, TypeSpecifierFactory::STATIC_METHOD_TYPE_SPECIFYING_EXTENSION_TAG => $bool, RichParser::VISITOR_SERVICE_TAG => $bool, CollectorRegistryFactory::COLLECTOR_TAG => $bool])->min(1));
    }
    public function beforeCompile() : void
    {
        /** @var mixed[] $config */
        $config = $this->config;
        $builder = $this->getContainerBuilder();
        foreach ($config as $type => $tags) {
            $services = $builder->findByType($type);
            if (count($services) === 0) {
                throw new ShouldNotHappenException(sprintf('No services of type "%s" found.', $type));
            }
            foreach ($services as $service) {
                foreach ($tags as $tag => $parameter) {
                    if (is_array($parameter)) {
                        $parameter = array_reduce($parameter, static function ($carry, $item) {
                            return $carry && (bool) $item;
                        }, \true);
                    }
                    if ((bool) $parameter) {
                        $service->addTag($tag);
                        continue;
                    }
                }
            }
        }
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\DependencyInjection;

use _PHPStan_dcc7b7cff\Nette\DI\Config\Adapter;
use _PHPStan_dcc7b7cff\Nette\DI\Config\Helpers;
use _PHPStan_dcc7b7cff\Nette\DI\Definitions\Reference;
use _PHPStan_dcc7b7cff\Nette\DI\Definitions\Statement;
use _PHPStan_dcc7b7cff\Nette\DI\InvalidConfigurationException;
use _PHPStan_dcc7b7cff\Nette\Neon\Entity;
use _PHPStan_dcc7b7cff\Nette\Neon\Exception;
use _PHPStan_dcc7b7cff\Nette\Neon\Neon;
use PHPStan\File\FileHelper;
use PHPStan\File\FileReader;
use function array_values;
use function array_walk_recursive;
use function dirname;
use function implode;
use function in_array;
use function is_array;
use function is_int;
use function is_string;
use function ltrim;
use function sprintf;
use function strpos;
use function substr;
class NeonAdapter implements Adapter
{
    public const CACHE_KEY = 'v17-validate-schema';
    private const PREVENT_MERGING_SUFFIX = '!';
    /** @var FileHelper[] */
    private $fileHelpers = [];
    /**
     * @return mixed[]
     */
    public function load(string $file) : array
    {
        $contents = FileReader::read($file);
        try {
            return $this->process((array) Neon::decode($contents), '', $file);
        } catch (Exception $e) {
            throw new Exception(sprintf('Error while loading %s: %s', $file, $e->getMessage()));
        }
    }
    /**
     * @param mixed[] $arr
     * @return mixed[]
     */
    public function process(array $arr, string $fileKey, string $file) : array
    {
        $res = [];
        foreach ($arr as $key => $val) {
            if (is_string($key) && substr($key, -1) === self::PREVENT_MERGING_SUFFIX) {
                if (!is_array($val) && $val !== null) {
                    throw new InvalidConfigurationException(sprintf('Replacing operator is available only for arrays, item \'%s\' is not array.', $key));
                }
                $key = substr($key, 0, -1);
                $val[Helpers::PREVENT_MERGING] = \true;
            }
            if (is_array($val)) {
                if (!is_int($key)) {
                    $fileKeyToPass = $fileKey . '[' . $key . ']';
                } else {
                    $fileKeyToPass = $fileKey . '[]';
                }
                $val = $this->process($val, $fileKeyToPass, $file);
            } elseif ($val instanceof Entity) {
                if (!is_int($key)) {
                    $fileKeyToPass = $fileKey . '(' . $key . ')';
                } else {
                    $fileKeyToPass = $fileKey . '()';
                }
                if ($val->value === Neon::CHAIN) {
                    $tmp = null;
                    foreach ($this->process($val->attributes, $fileKeyToPass, $file) as $st) {
                        $tmp = new Statement($tmp === null ? $st->getEntity() : [$tmp, ltrim(implode('::', (array) $st->getEntity()), ':')], $st->arguments);
                    }
                    $val = $tmp;
                } else {
                    $tmp = $this->process([$val->value], $fileKeyToPass, $file);
                    $val = new Statement($tmp[0], $this->process($val->attributes, $fileKeyToPass, $file));
                }
            }
            $keyToResolve = $fileKey;
            if (is_int($key)) {
                $keyToResolve .= '[]';
            } else {
                $keyToResolve .= '[' . $key . ']';
            }
            if (in_array($keyToResolve, ['[parameters][paths][]', '[parameters][excludes_analyse][]', '[parameters][excludePaths][]', '[parameters][excludePaths][analyse][]', '[parameters][excludePaths][analyseAndScan][]', '[parameters][ignoreErrors][][paths][]', '[parameters][ignoreErrors][][path]', '[parameters][bootstrapFiles][]', '[parameters][scanFiles][]', '[parameters][scanDirectories][]', '[parameters][tmpDir]', '[parameters][memoryLimitFile]', '[parameters][benchmarkFile]', '[parameters][stubFiles][]', '[parameters][symfony][console_application_loader]', '[parameters][symfony][consoleApplicationLoader]', '[parameters][symfony][container_xml_path]', '[parameters][symfony][containerXmlPath]', '[parameters][doctrine][objectManagerLoader]'], \true) && is_string($val) && strpos($val, '%') === \false && strpos($val, '*') !== 0) {
                $fileHelper = $this->createFileHelperByFile($file);
                $val = $fileHelper->normalizePath($fileHelper->absolutizePath($val));
            }
            if ($keyToResolve === '[parameters][excludePaths]' && $val !== null && array_values($val) === $val) {
                $val = ['analyseAndScan' => $val, 'analyse' => []];
            }
            $res[$key] = $val;
        }
        return $res;
    }
    /**
     * @param mixed[] $data
     */
    public function dump(array $data) : string
    {
        array_walk_recursive($data, static function (&$val) : void {
            if (!$val instanceof Statement) {
                return;
            }
            $val = self::statementToEntity($val);
        });
        return "# generated by Nette\n\n" . Neon::encode($data, Neon::BLOCK);
    }
    private static function statementToEntity(Statement $val) : Entity
    {
        array_walk_recursive($val->arguments, static function (&$val) : void {
            if ($val instanceof Statement) {
                $val = self::statementToEntity($val);
            } elseif ($val instanceof Reference) {
                $val = '@' . $val->getValue();
            }
        });
        $entity = $val->getEntity();
        if ($entity instanceof Reference) {
            $entity = '@' . $entity->getValue();
        } elseif (is_array($entity)) {
            if ($entity[0] instanceof Statement) {
                return new Entity(Neon::CHAIN, [self::statementToEntity($entity[0]), new Entity('::' . $entity[1], $val->arguments)]);
            } elseif ($entity[0] instanceof Reference) {
                $entity = '@' . $entity[0]->getValue() . '::' . $entity[1];
            } elseif (is_string($entity[0])) {
                $entity = $entity[0] . '::' . $entity[1];
            }
        }
        return new Entity($entity, $val->arguments);
    }
    private function createFileHelperByFile(string $file) : FileHelper
    {
        $dir = dirname($file);
        if (!isset($this->fileHelpers[$dir])) {
            $this->fileHelpers[$dir] = new FileHelper($dir);
        }
        return $this->fileHelpers[$dir];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\DependencyInjection;

use _PHPStan_dcc7b7cff\Nette\DI\Config\Loader;
use PHPStan\File\FileHelper;
class NeonLoader extends Loader
{
    /**
     * @var \PHPStan\File\FileHelper
     */
    private $fileHelper;
    /**
     * @var string|null
     */
    private $generateBaselineFile;
    public function __construct(FileHelper $fileHelper, ?string $generateBaselineFile)
    {
        $this->fileHelper = $fileHelper;
        $this->generateBaselineFile = $generateBaselineFile;
    }
    /**
     * @return mixed[]
     */
    public function load(string $file, ?bool $merge = \true) : array
    {
        if ($this->generateBaselineFile === null) {
            return parent::load($file, $merge);
        }
        $normalizedFile = $this->fileHelper->normalizePath($file);
        if ($this->generateBaselineFile === $normalizedFile) {
            return [];
        }
        return parent::load($file, $merge);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\DependencyInjection\Reflection;

use PHPStan\Reflection\ClassReflectionExtensionRegistry;
interface ClassReflectionExtensionRegistryProvider
{
    public function getRegistry() : ClassReflectionExtensionRegistry;
}
<?php

declare (strict_types=1);
namespace PHPStan\DependencyInjection\Reflection;

use PHPStan\Broker\Broker;
use PHPStan\Reflection\AllowedSubTypesClassReflectionExtension;
use PHPStan\Reflection\ClassReflectionExtensionRegistry;
use PHPStan\Reflection\MethodsClassReflectionExtension;
use PHPStan\Reflection\PropertiesClassReflectionExtension;
/**
 * @internal
 */
class DirectClassReflectionExtensionRegistryProvider implements \PHPStan\DependencyInjection\Reflection\ClassReflectionExtensionRegistryProvider
{
    /**
     * @var \PHPStan\Broker\Broker
     */
    private $broker;
    /**
     * @var PropertiesClassReflectionExtension[]
     */
    private $propertiesClassReflectionExtensions;
    /**
     * @var MethodsClassReflectionExtension[]
     */
    private $methodsClassReflectionExtensions;
    /**
     * @var AllowedSubTypesClassReflectionExtension[]
     */
    private $allowedSubTypesClassReflectionExtensions;
    /**
     * @param PropertiesClassReflectionExtension[] $propertiesClassReflectionExtensions
     * @param MethodsClassReflectionExtension[] $methodsClassReflectionExtensions
     * @param AllowedSubTypesClassReflectionExtension[] $allowedSubTypesClassReflectionExtensions
     */
    public function __construct(array $propertiesClassReflectionExtensions, array $methodsClassReflectionExtensions, array $allowedSubTypesClassReflectionExtensions)
    {
        $this->propertiesClassReflectionExtensions = $propertiesClassReflectionExtensions;
        $this->methodsClassReflectionExtensions = $methodsClassReflectionExtensions;
        $this->allowedSubTypesClassReflectionExtensions = $allowedSubTypesClassReflectionExtensions;
    }
    public function setBroker(Broker $broker) : void
    {
        $this->broker = $broker;
    }
    public function addPropertiesClassReflectionExtension(PropertiesClassReflectionExtension $extension) : void
    {
        $this->propertiesClassReflectionExtensions[] = $extension;
    }
    public function addMethodsClassReflectionExtension(MethodsClassReflectionExtension $extension) : void
    {
        $this->methodsClassReflectionExtensions[] = $extension;
    }
    public function addAllowedSubTypesClassReflectionExtension(AllowedSubTypesClassReflectionExtension $extension) : void
    {
        $this->allowedSubTypesClassReflectionExtensions[] = $extension;
    }
    public function getRegistry() : ClassReflectionExtensionRegistry
    {
        return new ClassReflectionExtensionRegistry($this->broker, $this->propertiesClassReflectionExtensions, $this->methodsClassReflectionExtensions, $this->allowedSubTypesClassReflectionExtensions);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\DependencyInjection\Reflection;

use PHPStan\Broker\Broker;
use PHPStan\Broker\BrokerFactory;
use PHPStan\DependencyInjection\Container;
use PHPStan\Reflection\Annotations\AnnotationsMethodsClassReflectionExtension;
use PHPStan\Reflection\Annotations\AnnotationsPropertiesClassReflectionExtension;
use PHPStan\Reflection\ClassReflectionExtensionRegistry;
use PHPStan\Reflection\Php\PhpClassReflectionExtension;
use function array_merge;
class LazyClassReflectionExtensionRegistryProvider implements \PHPStan\DependencyInjection\Reflection\ClassReflectionExtensionRegistryProvider
{
    /**
     * @var \PHPStan\Reflection\ClassReflectionExtensionRegistry|null
     */
    private $registry;
    /**
     * @var \PHPStan\DependencyInjection\Container
     */
    private $container;
    public function __construct(Container $container)
    {
        $this->container = $container;
    }
    public function getRegistry() : ClassReflectionExtensionRegistry
    {
        if ($this->registry === null) {
            $phpClassReflectionExtension = $this->container->getByType(PhpClassReflectionExtension::class);
            $annotationsMethodsClassReflectionExtension = $this->container->getByType(AnnotationsMethodsClassReflectionExtension::class);
            $annotationsPropertiesClassReflectionExtension = $this->container->getByType(AnnotationsPropertiesClassReflectionExtension::class);
            $this->registry = new ClassReflectionExtensionRegistry($this->container->getByType(Broker::class), array_merge([$phpClassReflectionExtension], $this->container->getServicesByTag(BrokerFactory::PROPERTIES_CLASS_REFLECTION_EXTENSION_TAG), [$annotationsPropertiesClassReflectionExtension]), array_merge([$phpClassReflectionExtension], $this->container->getServicesByTag(BrokerFactory::METHODS_CLASS_REFLECTION_EXTENSION_TAG), [$annotationsMethodsClassReflectionExtension]), $this->container->getServicesByTag(BrokerFactory::ALLOWED_SUB_TYPES_CLASS_REFLECTION_EXTENSION_TAG));
        }
        return $this->registry;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\DependencyInjection;

use Exception;
use function implode;
class InvalidIgnoredErrorPatternsException extends Exception
{
    /**
     * @var string[]
     */
    private $errors;
    /**
     * @param string[] $errors
     */
    public function __construct(array $errors)
    {
        $this->errors = $errors;
        parent::__construct(implode("\n", $this->errors));
    }
    /**
     * @return string[]
     */
    public function getErrors() : array
    {
        return $this->errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\DependencyInjection;

use Exception;
use function implode;
use function sprintf;
class DuplicateIncludedFilesException extends Exception
{
    /**
     * @var string[]
     */
    private $files;
    /**
     * @param string[] $files
     */
    public function __construct(array $files)
    {
        $this->files = $files;
        parent::__construct(sprintf('These files are included multiple times: %s', implode(', ', $this->files)));
    }
    /**
     * @return string[]
     */
    public function getFiles() : array
    {
        return $this->files;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\DependencyInjection;

use _PHPStan_dcc7b7cff\Nette\DI\Config\Loader;
use _PHPStan_dcc7b7cff\Nette\DI\ContainerLoader;
use PHPStan\File\FileReader;
use function array_keys;
use function sha1;
use const PHP_RELEASE_VERSION;
use const PHP_VERSION_ID;
class Configurator extends \_PHPStan_dcc7b7cff\Nette\Bootstrap\Configurator
{
    /** @var string[] */
    private $allConfigFiles = [];
    /**
     * @var \PHPStan\DependencyInjection\LoaderFactory
     */
    private $loaderFactory;
    public function __construct(\PHPStan\DependencyInjection\LoaderFactory $loaderFactory)
    {
        $this->loaderFactory = $loaderFactory;
        parent::__construct();
    }
    protected function createLoader() : Loader
    {
        return $this->loaderFactory->createLoader();
    }
    /**
     * @param string[] $allConfigFiles
     */
    public function setAllConfigFiles(array $allConfigFiles) : void
    {
        $this->allConfigFiles = $allConfigFiles;
    }
    /**
     * @return mixed[]
     */
    protected function getDefaultParameters() : array
    {
        return [];
    }
    public function getContainerCacheDirectory() : string
    {
        return $this->getCacheDirectory() . '/nette.configurator';
    }
    public function loadContainer() : string
    {
        $loader = new ContainerLoader($this->getContainerCacheDirectory(), $this->staticParameters['debugMode']);
        return $loader->load([$this, 'generateContainer'], [$this->staticParameters, array_keys($this->dynamicParameters), $this->configs, PHP_VERSION_ID - PHP_RELEASE_VERSION, \PHPStan\DependencyInjection\NeonAdapter::CACHE_KEY, $this->getAllConfigFilesHashes()]);
    }
    /**
     * @return string[]
     */
    private function getAllConfigFilesHashes() : array
    {
        $hashes = [];
        foreach ($this->allConfigFiles as $file) {
            $hashes[$file] = sha1(FileReader::read($file));
        }
        return $hashes;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Dependency;

interface ExportedNode
{
    public function equals(self $node) : bool;
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : self;
    /**
     * @param mixed[] $data
     */
    public static function decode(array $data) : self;
}
<?php

declare (strict_types=1);
namespace PHPStan\Dependency;

interface RootExportedNode extends \PHPStan\Dependency\ExportedNode
{
    public const TYPE_CLASS = 'class';
    public const TYPE_INTERFACE = 'interface';
    public const TYPE_ENUM = 'enum';
    public const TYPE_TRAIT = 'trait';
    public const TYPE_FUNCTION = 'function';
    /** @return self::TYPE_* */
    public function getType() : string;
    public function getName() : string;
}
<?php

declare (strict_types=1);
namespace PHPStan\Dependency;

use PhpParser\NodeTraverser;
use PHPStan\Parser\Parser;
use PHPStan\Parser\ParserErrorsException;
class ExportedNodeFetcher
{
    /**
     * @var \PHPStan\Parser\Parser
     */
    private $parser;
    /**
     * @var \PHPStan\Dependency\ExportedNodeVisitor
     */
    private $visitor;
    public function __construct(Parser $parser, \PHPStan\Dependency\ExportedNodeVisitor $visitor)
    {
        $this->parser = $parser;
        $this->visitor = $visitor;
    }
    /**
     * @return RootExportedNode[]
     */
    public function fetchNodes(string $fileName) : array
    {
        $nodeTraverser = new NodeTraverser();
        $nodeTraverser->addVisitor($this->visitor);
        try {
            $ast = $this->parser->parseFile($fileName);
        } catch (ParserErrorsException $exception) {
            return [];
        }
        $this->visitor->reset($fileName);
        $nodeTraverser->traverse($ast);
        return $this->visitor->getExportedNodes();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Dependency;

use PhpParser\Node;
use PhpParser\NodeTraverser;
use PhpParser\NodeVisitorAbstract;
use PHPStan\ShouldNotHappenException;
class ExportedNodeVisitor extends NodeVisitorAbstract
{
    /**
     * @var string|null
     */
    private $fileName;
    /** @var RootExportedNode[] */
    private $currentNodes = [];
    /**
     * @var \PHPStan\Dependency\ExportedNodeResolver
     */
    private $exportedNodeResolver;
    /**
     * ExportedNodeVisitor constructor.
     *
     */
    public function __construct(\PHPStan\Dependency\ExportedNodeResolver $exportedNodeResolver)
    {
        $this->exportedNodeResolver = $exportedNodeResolver;
    }
    public function reset(string $fileName) : void
    {
        $this->fileName = $fileName;
        $this->currentNodes = [];
    }
    /**
     * @return RootExportedNode[]
     */
    public function getExportedNodes() : array
    {
        return $this->currentNodes;
    }
    public function enterNode(Node $node) : ?int
    {
        if ($this->fileName === null) {
            throw new ShouldNotHappenException();
        }
        $exportedNode = $this->exportedNodeResolver->resolve($this->fileName, $node);
        if ($exportedNode !== null) {
            $this->currentNodes[] = $exportedNode;
        }
        if ($node instanceof Node\Stmt\ClassMethod || $node instanceof Node\Stmt\Function_ || $node instanceof Node\Stmt\Trait_) {
            return NodeTraverser::DONT_TRAVERSE_CHILDREN;
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Dependency\ExportedNode;

use JsonSerializable;
use PHPStan\Dependency\ExportedNode;
use PHPStan\Dependency\RootExportedNode;
use ReturnTypeWillChange;
use function array_map;
use function count;
class ExportedInterfaceNode implements RootExportedNode, JsonSerializable
{
    /**
     * @var string
     */
    private $name;
    /**
     * @var \PHPStan\Dependency\ExportedNode\ExportedPhpDocNode|null
     */
    private $phpDoc;
    /**
     * @var string[]
     */
    private $extends;
    /**
     * @var ExportedNode[]
     */
    private $statements;
    /**
     * @param string[] $extends
     * @param ExportedNode[] $statements
     */
    public function __construct(string $name, ?\PHPStan\Dependency\ExportedNode\ExportedPhpDocNode $phpDoc, array $extends, array $statements)
    {
        $this->name = $name;
        $this->phpDoc = $phpDoc;
        $this->extends = $extends;
        $this->statements = $statements;
    }
    public function equals(ExportedNode $node) : bool
    {
        if (!$node instanceof self) {
            return \false;
        }
        if ($this->phpDoc === null) {
            if ($node->phpDoc !== null) {
                return \false;
            }
        } elseif ($node->phpDoc !== null) {
            if (!$this->phpDoc->equals($node->phpDoc)) {
                return \false;
            }
        } else {
            return \false;
        }
        if (count($this->statements) !== count($node->statements)) {
            return \false;
        }
        foreach ($this->statements as $i => $statement) {
            if ($statement->equals($node->statements[$i])) {
                continue;
            }
            return \false;
        }
        return $this->name === $node->name && $this->extends === $node->extends;
    }
    /**
     * @param mixed[] $properties
     * @return self
     */
    public static function __set_state(array $properties) : ExportedNode
    {
        return new self($properties['name'], $properties['phpDoc'], $properties['extends'], $properties['statements']);
    }
    /**
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize()
    {
        return ['type' => self::class, 'data' => ['name' => $this->name, 'phpDoc' => $this->phpDoc, 'extends' => $this->extends, 'statements' => $this->statements]];
    }
    /**
     * @param mixed[] $data
     * @return self
     */
    public static function decode(array $data) : ExportedNode
    {
        return new self($data['name'], $data['phpDoc'] !== null ? \PHPStan\Dependency\ExportedNode\ExportedPhpDocNode::decode($data['phpDoc']['data']) : null, $data['extends'], array_map(static function (array $node) : ExportedNode {
            $nodeType = $node['type'];
            return $nodeType::decode($node['data']);
        }, $data['statements']));
    }
    public function getType() : string
    {
        return self::TYPE_INTERFACE;
    }
    public function getName() : string
    {
        return $this->name;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Dependency\ExportedNode;

use JsonSerializable;
use PHPStan\Dependency\ExportedNode;
use PHPStan\ShouldNotHappenException;
use ReturnTypeWillChange;
use function array_map;
use function count;
class ExportedPropertiesNode implements JsonSerializable, ExportedNode
{
    /**
     * @var string[]
     */
    private $names;
    /**
     * @var \PHPStan\Dependency\ExportedNode\ExportedPhpDocNode|null
     */
    private $phpDoc;
    /**
     * @var string|null
     */
    private $type;
    /**
     * @var bool
     */
    private $public;
    /**
     * @var bool
     */
    private $private;
    /**
     * @var bool
     */
    private $static;
    /**
     * @var bool
     */
    private $readonly;
    /**
     * @var ExportedAttributeNode[]
     */
    private $attributes;
    /**
     * @param string[] $names
     * @param ExportedAttributeNode[] $attributes
     */
    public function __construct(array $names, ?\PHPStan\Dependency\ExportedNode\ExportedPhpDocNode $phpDoc, ?string $type, bool $public, bool $private, bool $static, bool $readonly, array $attributes)
    {
        $this->names = $names;
        $this->phpDoc = $phpDoc;
        $this->type = $type;
        $this->public = $public;
        $this->private = $private;
        $this->static = $static;
        $this->readonly = $readonly;
        $this->attributes = $attributes;
    }
    public function equals(ExportedNode $node) : bool
    {
        if (!$node instanceof self) {
            return \false;
        }
        if ($this->phpDoc === null) {
            if ($node->phpDoc !== null) {
                return \false;
            }
        } elseif ($node->phpDoc !== null) {
            if (!$this->phpDoc->equals($node->phpDoc)) {
                return \false;
            }
        } else {
            return \false;
        }
        if (count($this->names) !== count($node->names)) {
            return \false;
        }
        foreach ($this->names as $i => $name) {
            if ($name !== $node->names[$i]) {
                return \false;
            }
        }
        if (count($this->attributes) !== count($node->attributes)) {
            return \false;
        }
        foreach ($this->attributes as $i => $attribute) {
            if (!$attribute->equals($node->attributes[$i])) {
                return \false;
            }
        }
        return $this->type === $node->type && $this->public === $node->public && $this->private === $node->private && $this->static === $node->static && $this->readonly === $node->readonly;
    }
    /**
     * @param mixed[] $properties
     * @return self
     */
    public static function __set_state(array $properties) : ExportedNode
    {
        return new self($properties['names'], $properties['phpDoc'], $properties['type'], $properties['public'], $properties['private'], $properties['static'], $properties['readonly'], $properties['attributes']);
    }
    /**
     * @param mixed[] $data
     * @return self
     */
    public static function decode(array $data) : ExportedNode
    {
        return new self($data['names'], $data['phpDoc'] !== null ? \PHPStan\Dependency\ExportedNode\ExportedPhpDocNode::decode($data['phpDoc']['data']) : null, $data['type'], $data['public'], $data['private'], $data['static'], $data['readonly'], array_map(static function (array $attributeData) : \PHPStan\Dependency\ExportedNode\ExportedAttributeNode {
            if ($attributeData['type'] !== \PHPStan\Dependency\ExportedNode\ExportedAttributeNode::class) {
                throw new ShouldNotHappenException();
            }
            return \PHPStan\Dependency\ExportedNode\ExportedAttributeNode::decode($attributeData['data']);
        }, $data['attributes']));
    }
    /**
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize()
    {
        return ['type' => self::class, 'data' => ['names' => $this->names, 'phpDoc' => $this->phpDoc, 'type' => $this->type, 'public' => $this->public, 'private' => $this->private, 'static' => $this->static, 'readonly' => $this->readonly, 'attributes' => $this->attributes]];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Dependency\ExportedNode;

use JsonSerializable;
use PHPStan\Dependency\ExportedNode;
use PHPStan\Dependency\RootExportedNode;
use PHPStan\ShouldNotHappenException;
use ReturnTypeWillChange;
use function array_map;
use function count;
class ExportedEnumNode implements RootExportedNode, JsonSerializable
{
    /**
     * @var string
     */
    private $name;
    /**
     * @var string|null
     */
    private $scalarType;
    /**
     * @var \PHPStan\Dependency\ExportedNode\ExportedPhpDocNode|null
     */
    private $phpDoc;
    /**
     * @var string[]
     */
    private $implements;
    /**
     * @var ExportedNode[]
     */
    private $statements;
    /**
     * @var ExportedAttributeNode[]
     */
    private $attributes;
    /**
     * @param string[] $implements
     * @param ExportedNode[] $statements
     * @param ExportedAttributeNode[] $attributes
     */
    public function __construct(string $name, ?string $scalarType, ?\PHPStan\Dependency\ExportedNode\ExportedPhpDocNode $phpDoc, array $implements, array $statements, array $attributes)
    {
        $this->name = $name;
        $this->scalarType = $scalarType;
        $this->phpDoc = $phpDoc;
        $this->implements = $implements;
        $this->statements = $statements;
        $this->attributes = $attributes;
    }
    public function equals(ExportedNode $node) : bool
    {
        if (!$node instanceof self) {
            return \false;
        }
        if ($this->phpDoc === null) {
            if ($node->phpDoc !== null) {
                return \false;
            }
        } elseif ($node->phpDoc !== null) {
            if (!$this->phpDoc->equals($node->phpDoc)) {
                return \false;
            }
        } else {
            return \false;
        }
        if (count($this->statements) !== count($node->statements)) {
            return \false;
        }
        foreach ($this->statements as $i => $statement) {
            if ($statement->equals($node->statements[$i])) {
                continue;
            }
            return \false;
        }
        if (count($this->attributes) !== count($node->attributes)) {
            return \false;
        }
        foreach ($this->attributes as $i => $attribute) {
            if (!$attribute->equals($node->attributes[$i])) {
                return \false;
            }
        }
        return $this->name === $node->name && $this->scalarType === $node->scalarType && $this->implements === $node->implements;
    }
    /**
     * @param mixed[] $properties
     * @return self
     */
    public static function __set_state(array $properties) : ExportedNode
    {
        return new self($properties['name'], $properties['scalarType'], $properties['phpDoc'], $properties['implements'], $properties['statements'], $properties['attributes']);
    }
    /**
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize()
    {
        return ['type' => self::class, 'data' => ['name' => $this->name, 'scalarType' => $this->scalarType, 'phpDoc' => $this->phpDoc, 'implements' => $this->implements, 'statements' => $this->statements, 'attributes' => $this->attributes]];
    }
    /**
     * @param mixed[] $data
     * @return self
     */
    public static function decode(array $data) : ExportedNode
    {
        return new self($data['name'], $data['scalarType'], $data['phpDoc'] !== null ? \PHPStan\Dependency\ExportedNode\ExportedPhpDocNode::decode($data['phpDoc']['data']) : null, $data['implements'], array_map(static function (array $node) : ExportedNode {
            $nodeType = $node['type'];
            return $nodeType::decode($node['data']);
        }, $data['statements']), array_map(static function (array $attributeData) : \PHPStan\Dependency\ExportedNode\ExportedAttributeNode {
            if ($attributeData['type'] !== \PHPStan\Dependency\ExportedNode\ExportedAttributeNode::class) {
                throw new ShouldNotHappenException();
            }
            return \PHPStan\Dependency\ExportedNode\ExportedAttributeNode::decode($attributeData['data']);
        }, $data['attributes']));
    }
    public function getType() : string
    {
        return self::TYPE_ENUM;
    }
    public function getName() : string
    {
        return $this->name;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Dependency\ExportedNode;

use JsonSerializable;
use PHPStan\Dependency\ExportedNode;
use PHPStan\Dependency\RootExportedNode;
use PHPStan\ShouldNotHappenException;
use ReturnTypeWillChange;
use function array_map;
use function count;
class ExportedClassNode implements RootExportedNode, JsonSerializable
{
    /**
     * @var string
     */
    private $name;
    /**
     * @var \PHPStan\Dependency\ExportedNode\ExportedPhpDocNode|null
     */
    private $phpDoc;
    /**
     * @var bool
     */
    private $abstract;
    /**
     * @var bool
     */
    private $final;
    /**
     * @var string|null
     */
    private $extends;
    /**
     * @var string[]
     */
    private $implements;
    /**
     * @var string[]
     */
    private $usedTraits;
    /**
     * @var ExportedTraitUseAdaptation[]
     */
    private $traitUseAdaptations;
    /**
     * @var ExportedNode[]
     */
    private $statements;
    /**
     * @var ExportedAttributeNode[]
     */
    private $attributes;
    /**
     * @param string[] $implements
     * @param string[] $usedTraits
     * @param ExportedTraitUseAdaptation[] $traitUseAdaptations
     * @param ExportedNode[] $statements
     * @param ExportedAttributeNode[] $attributes
     */
    public function __construct(string $name, ?\PHPStan\Dependency\ExportedNode\ExportedPhpDocNode $phpDoc, bool $abstract, bool $final, ?string $extends, array $implements, array $usedTraits, array $traitUseAdaptations, array $statements, array $attributes)
    {
        $this->name = $name;
        $this->phpDoc = $phpDoc;
        $this->abstract = $abstract;
        $this->final = $final;
        $this->extends = $extends;
        $this->implements = $implements;
        $this->usedTraits = $usedTraits;
        $this->traitUseAdaptations = $traitUseAdaptations;
        $this->statements = $statements;
        $this->attributes = $attributes;
    }
    public function equals(ExportedNode $node) : bool
    {
        if (!$node instanceof self) {
            return \false;
        }
        if ($this->phpDoc === null) {
            if ($node->phpDoc !== null) {
                return \false;
            }
        } elseif ($node->phpDoc !== null) {
            if (!$this->phpDoc->equals($node->phpDoc)) {
                return \false;
            }
        } else {
            return \false;
        }
        if (count($this->attributes) !== count($node->attributes)) {
            return \false;
        }
        foreach ($this->attributes as $i => $attribute) {
            if (!$attribute->equals($node->attributes[$i])) {
                return \false;
            }
        }
        if (count($this->traitUseAdaptations) !== count($node->traitUseAdaptations)) {
            return \false;
        }
        foreach ($this->traitUseAdaptations as $i => $ourTraitUseAdaptation) {
            $theirTraitUseAdaptation = $node->traitUseAdaptations[$i];
            if (!$ourTraitUseAdaptation->equals($theirTraitUseAdaptation)) {
                return \false;
            }
        }
        if (count($this->statements) !== count($node->statements)) {
            return \false;
        }
        foreach ($this->statements as $i => $statement) {
            if ($statement->equals($node->statements[$i])) {
                continue;
            }
            return \false;
        }
        return $this->name === $node->name && $this->abstract === $node->abstract && $this->final === $node->final && $this->extends === $node->extends && $this->implements === $node->implements && $this->usedTraits === $node->usedTraits;
    }
    /**
     * @param mixed[] $properties
     * @return self
     */
    public static function __set_state(array $properties) : ExportedNode
    {
        return new self($properties['name'], $properties['phpDoc'], $properties['abstract'], $properties['final'], $properties['extends'], $properties['implements'], $properties['usedTraits'], $properties['traitUseAdaptations'], $properties['statements'], $properties['attributes']);
    }
    /**
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize()
    {
        return ['type' => self::class, 'data' => ['name' => $this->name, 'phpDoc' => $this->phpDoc, 'abstract' => $this->abstract, 'final' => $this->final, 'extends' => $this->extends, 'implements' => $this->implements, 'usedTraits' => $this->usedTraits, 'traitUseAdaptations' => $this->traitUseAdaptations, 'statements' => $this->statements, 'attributes' => $this->attributes]];
    }
    /**
     * @param mixed[] $data
     * @return self
     */
    public static function decode(array $data) : ExportedNode
    {
        return new self($data['name'], $data['phpDoc'] !== null ? \PHPStan\Dependency\ExportedNode\ExportedPhpDocNode::decode($data['phpDoc']['data']) : null, $data['abstract'], $data['final'], $data['extends'], $data['implements'], $data['usedTraits'], array_map(static function (array $traitUseAdaptationData) : \PHPStan\Dependency\ExportedNode\ExportedTraitUseAdaptation {
            if ($traitUseAdaptationData['type'] !== \PHPStan\Dependency\ExportedNode\ExportedTraitUseAdaptation::class) {
                throw new ShouldNotHappenException();
            }
            return \PHPStan\Dependency\ExportedNode\ExportedTraitUseAdaptation::decode($traitUseAdaptationData['data']);
        }, $data['traitUseAdaptations']), array_map(static function (array $node) : ExportedNode {
            $nodeType = $node['type'];
            return $nodeType::decode($node['data']);
        }, $data['statements']), array_map(static function (array $attributeData) : \PHPStan\Dependency\ExportedNode\ExportedAttributeNode {
            if ($attributeData['type'] !== \PHPStan\Dependency\ExportedNode\ExportedAttributeNode::class) {
                throw new ShouldNotHappenException();
            }
            return \PHPStan\Dependency\ExportedNode\ExportedAttributeNode::decode($attributeData['data']);
        }, $data['attributes']));
    }
    public function getType() : string
    {
        return self::TYPE_CLASS;
    }
    public function getName() : string
    {
        return $this->name;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Dependency\ExportedNode;

use JsonSerializable;
use PHPStan\Dependency\ExportedNode;
use ReturnTypeWillChange;
class ExportedEnumCaseNode implements ExportedNode, JsonSerializable
{
    /**
     * @var string
     */
    private $name;
    /**
     * @var string|null
     */
    private $value;
    /**
     * @var \PHPStan\Dependency\ExportedNode\ExportedPhpDocNode|null
     */
    private $phpDoc;
    public function __construct(string $name, ?string $value, ?\PHPStan\Dependency\ExportedNode\ExportedPhpDocNode $phpDoc)
    {
        $this->name = $name;
        $this->value = $value;
        $this->phpDoc = $phpDoc;
    }
    public function equals(ExportedNode $node) : bool
    {
        if (!$node instanceof self) {
            return \false;
        }
        if ($this->phpDoc === null) {
            if ($node->phpDoc !== null) {
                return \false;
            }
        } elseif ($node->phpDoc !== null) {
            if (!$this->phpDoc->equals($node->phpDoc)) {
                return \false;
            }
        } else {
            return \false;
        }
        return $this->name === $node->name && $this->value === $node->value;
    }
    /**
     * @param mixed[] $properties
     * @return self
     */
    public static function __set_state(array $properties) : ExportedNode
    {
        return new self($properties['name'], $properties['value'], $properties['phpDoc']);
    }
    /**
     * @param mixed[] $data
     * @return self
     */
    public static function decode(array $data) : ExportedNode
    {
        return new self($data['name'], $data['value'], $data['phpDoc'] !== null ? \PHPStan\Dependency\ExportedNode\ExportedPhpDocNode::decode($data['phpDoc']['data']) : null);
    }
    /**
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize()
    {
        return ['type' => self::class, 'data' => ['name' => $this->name, 'value' => $this->value, 'phpDoc' => $this->phpDoc]];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Dependency\ExportedNode;

use JsonSerializable;
use PHPStan\Dependency\ExportedNode;
use ReturnTypeWillChange;
use function count;
class ExportedAttributeNode implements ExportedNode, JsonSerializable
{
    /**
     * @var string
     */
    private $name;
    /**
     * @var array<(int | string), string>
     */
    private $args;
    /**
     * @param array<int|string, string> $args argument name or index(string|int) => value expression (string)
     */
    public function __construct(string $name, array $args)
    {
        $this->name = $name;
        $this->args = $args;
    }
    public function equals(ExportedNode $node) : bool
    {
        if (!$node instanceof self) {
            return \false;
        }
        if ($this->name !== $node->name) {
            return \false;
        }
        if (count($this->args) !== count($node->args)) {
            return \false;
        }
        foreach ($this->args as $argName => $argValue) {
            if (!isset($node->args[$argName]) || $argValue !== $node->args[$argName]) {
                return \false;
            }
        }
        return \true;
    }
    /**
     * @param mixed[] $properties
     * @return self
     */
    public static function __set_state(array $properties) : ExportedNode
    {
        return new self($properties['name'], $properties['args']);
    }
    /**
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize()
    {
        return ['type' => self::class, 'data' => ['name' => $this->name, 'args' => $this->args]];
    }
    /**
     * @param mixed[] $data
     * @return self
     */
    public static function decode(array $data) : ExportedNode
    {
        return new self($data['name'], $data['args']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Dependency\ExportedNode;

use JsonSerializable;
use PHPStan\Dependency\ExportedNode;
use PHPStan\ShouldNotHappenException;
use ReturnTypeWillChange;
use function array_map;
use function count;
class ExportedClassConstantsNode implements ExportedNode, JsonSerializable
{
    /**
     * @var ExportedClassConstantNode[]
     */
    private $constants;
    /**
     * @var bool
     */
    private $public;
    /**
     * @var bool
     */
    private $private;
    /**
     * @var bool
     */
    private $final;
    /**
     * @var \PHPStan\Dependency\ExportedNode\ExportedPhpDocNode|null
     */
    private $phpDoc;
    /**
     * @param ExportedClassConstantNode[] $constants
     */
    public function __construct(array $constants, bool $public, bool $private, bool $final, ?\PHPStan\Dependency\ExportedNode\ExportedPhpDocNode $phpDoc)
    {
        $this->constants = $constants;
        $this->public = $public;
        $this->private = $private;
        $this->final = $final;
        $this->phpDoc = $phpDoc;
    }
    public function equals(ExportedNode $node) : bool
    {
        if (!$node instanceof self) {
            return \false;
        }
        if ($this->phpDoc === null) {
            if ($node->phpDoc !== null) {
                return \false;
            }
        } elseif ($node->phpDoc !== null) {
            if (!$this->phpDoc->equals($node->phpDoc)) {
                return \false;
            }
        } else {
            return \false;
        }
        if (count($this->constants) !== count($node->constants)) {
            return \false;
        }
        foreach ($this->constants as $i => $constant) {
            if (!$constant->equals($node->constants[$i])) {
                return \false;
            }
        }
        return $this->public === $node->public && $this->private === $node->private && $this->final === $node->final;
    }
    /**
     * @param mixed[] $properties
     * @return self
     */
    public static function __set_state(array $properties) : ExportedNode
    {
        return new self($properties['constants'], $properties['public'], $properties['private'], $properties['final'], $properties['phpDoc']);
    }
    /**
     * @param mixed[] $data
     * @return self
     */
    public static function decode(array $data) : ExportedNode
    {
        return new self(array_map(static function (array $constantData) : \PHPStan\Dependency\ExportedNode\ExportedClassConstantNode {
            if ($constantData['type'] !== \PHPStan\Dependency\ExportedNode\ExportedClassConstantNode::class) {
                throw new ShouldNotHappenException();
            }
            return \PHPStan\Dependency\ExportedNode\ExportedClassConstantNode::decode($constantData['data']);
        }, $data['constants']), $data['public'], $data['private'], $data['final'], $data['phpDoc'] !== null ? \PHPStan\Dependency\ExportedNode\ExportedPhpDocNode::decode($data['phpDoc']['data']) : null);
    }
    /**
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize()
    {
        return ['type' => self::class, 'data' => ['constants' => $this->constants, 'public' => $this->public, 'private' => $this->private, 'final' => $this->final, 'phpDoc' => $this->phpDoc]];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Dependency\ExportedNode;

use JsonSerializable;
use PHPStan\Dependency\ExportedNode;
use ReturnTypeWillChange;
class ExportedPhpDocNode implements ExportedNode, JsonSerializable
{
    /**
     * @var string
     */
    private $phpDocString;
    /**
     * @var string|null
     */
    private $namespace;
    /**
     * @var array<string, string>
     */
    private $uses;
    /**
     * @var array<string, string>
     */
    private $constUses;
    /**
     * @param array<string, string> $uses alias(string) => fullName(string)
     * @param array<string, string> $constUses alias(string) => fullName(string)
     */
    public function __construct(string $phpDocString, ?string $namespace, array $uses, array $constUses)
    {
        $this->phpDocString = $phpDocString;
        $this->namespace = $namespace;
        $this->uses = $uses;
        $this->constUses = $constUses;
    }
    public function equals(ExportedNode $node) : bool
    {
        if (!$node instanceof self) {
            return \false;
        }
        return $this->phpDocString === $node->phpDocString && $this->namespace === $node->namespace && $this->uses === $node->uses && $this->constUses === $node->constUses;
    }
    /**
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize()
    {
        return ['type' => self::class, 'data' => ['phpDocString' => $this->phpDocString, 'namespace' => $this->namespace, 'uses' => $this->uses, 'constUses' => $this->constUses]];
    }
    /**
     * @param mixed[] $properties
     * @return self
     */
    public static function __set_state(array $properties) : ExportedNode
    {
        return new self($properties['phpDocString'], $properties['namespace'], $properties['uses'], $properties['constUses'] ?? []);
    }
    /**
     * @param mixed[] $data
     * @return self
     */
    public static function decode(array $data) : ExportedNode
    {
        return new self($data['phpDocString'], $data['namespace'], $data['uses'], $data['constUses'] ?? []);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Dependency\ExportedNode;

use JsonSerializable;
use PHPStan\Dependency\ExportedNode;
use PHPStan\ShouldNotHappenException;
use ReturnTypeWillChange;
use function array_map;
use function count;
class ExportedMethodNode implements ExportedNode, JsonSerializable
{
    /**
     * @var string
     */
    private $name;
    /**
     * @var \PHPStan\Dependency\ExportedNode\ExportedPhpDocNode|null
     */
    private $phpDoc;
    /**
     * @var bool
     */
    private $byRef;
    /**
     * @var bool
     */
    private $public;
    /**
     * @var bool
     */
    private $private;
    /**
     * @var bool
     */
    private $abstract;
    /**
     * @var bool
     */
    private $final;
    /**
     * @var bool
     */
    private $static;
    /**
     * @var string|null
     */
    private $returnType;
    /**
     * @var ExportedParameterNode[]
     */
    private $parameters;
    /**
     * @var ExportedAttributeNode[]
     */
    private $attributes;
    /**
     * @param ExportedParameterNode[] $parameters
     * @param ExportedAttributeNode[] $attributes
     */
    public function __construct(string $name, ?\PHPStan\Dependency\ExportedNode\ExportedPhpDocNode $phpDoc, bool $byRef, bool $public, bool $private, bool $abstract, bool $final, bool $static, ?string $returnType, array $parameters, array $attributes)
    {
        $this->name = $name;
        $this->phpDoc = $phpDoc;
        $this->byRef = $byRef;
        $this->public = $public;
        $this->private = $private;
        $this->abstract = $abstract;
        $this->final = $final;
        $this->static = $static;
        $this->returnType = $returnType;
        $this->parameters = $parameters;
        $this->attributes = $attributes;
    }
    public function equals(ExportedNode $node) : bool
    {
        if (!$node instanceof self) {
            return \false;
        }
        if (count($this->parameters) !== count($node->parameters)) {
            return \false;
        }
        foreach ($this->parameters as $i => $ourParameter) {
            $theirParameter = $node->parameters[$i];
            if (!$ourParameter->equals($theirParameter)) {
                return \false;
            }
        }
        if ($this->phpDoc === null) {
            if ($node->phpDoc !== null) {
                return \false;
            }
        } elseif ($node->phpDoc !== null) {
            if (!$this->phpDoc->equals($node->phpDoc)) {
                return \false;
            }
        } else {
            return \false;
        }
        if (count($this->attributes) !== count($node->attributes)) {
            return \false;
        }
        foreach ($this->attributes as $i => $attribute) {
            if (!$attribute->equals($node->attributes[$i])) {
                return \false;
            }
        }
        return $this->name === $node->name && $this->byRef === $node->byRef && $this->public === $node->public && $this->private === $node->private && $this->abstract === $node->abstract && $this->final === $node->final && $this->static === $node->static && $this->returnType === $node->returnType;
    }
    /**
     * @param mixed[] $properties
     * @return self
     */
    public static function __set_state(array $properties) : ExportedNode
    {
        return new self($properties['name'], $properties['phpDoc'], $properties['byRef'], $properties['public'], $properties['private'], $properties['abstract'], $properties['final'], $properties['static'], $properties['returnType'], $properties['parameters'], $properties['attributes']);
    }
    /**
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize()
    {
        return ['type' => self::class, 'data' => ['name' => $this->name, 'phpDoc' => $this->phpDoc, 'byRef' => $this->byRef, 'public' => $this->public, 'private' => $this->private, 'abstract' => $this->abstract, 'final' => $this->final, 'static' => $this->static, 'returnType' => $this->returnType, 'parameters' => $this->parameters, 'attributes' => $this->attributes]];
    }
    /**
     * @param mixed[] $data
     * @return self
     */
    public static function decode(array $data) : ExportedNode
    {
        return new self($data['name'], $data['phpDoc'] !== null ? \PHPStan\Dependency\ExportedNode\ExportedPhpDocNode::decode($data['phpDoc']['data']) : null, $data['byRef'], $data['public'], $data['private'], $data['abstract'], $data['final'], $data['static'], $data['returnType'], array_map(static function (array $parameterData) : \PHPStan\Dependency\ExportedNode\ExportedParameterNode {
            if ($parameterData['type'] !== \PHPStan\Dependency\ExportedNode\ExportedParameterNode::class) {
                throw new ShouldNotHappenException();
            }
            return \PHPStan\Dependency\ExportedNode\ExportedParameterNode::decode($parameterData['data']);
        }, $data['parameters']), array_map(static function (array $attributeData) : \PHPStan\Dependency\ExportedNode\ExportedAttributeNode {
            if ($attributeData['type'] !== \PHPStan\Dependency\ExportedNode\ExportedAttributeNode::class) {
                throw new ShouldNotHappenException();
            }
            return \PHPStan\Dependency\ExportedNode\ExportedAttributeNode::decode($attributeData['data']);
        }, $data['attributes']));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Dependency\ExportedNode;

use JsonSerializable;
use PHPStan\Dependency\ExportedNode;
use PHPStan\ShouldNotHappenException;
use ReturnTypeWillChange;
use function array_map;
use function count;
class ExportedParameterNode implements ExportedNode, JsonSerializable
{
    /**
     * @var string
     */
    private $name;
    /**
     * @var string|null
     */
    private $type;
    /**
     * @var bool
     */
    private $byRef;
    /**
     * @var bool
     */
    private $variadic;
    /**
     * @var bool
     */
    private $hasDefault;
    /**
     * @var ExportedAttributeNode[]
     */
    private $attributes;
    /**
     * @param ExportedAttributeNode[] $attributes
     */
    public function __construct(string $name, ?string $type, bool $byRef, bool $variadic, bool $hasDefault, array $attributes)
    {
        $this->name = $name;
        $this->type = $type;
        $this->byRef = $byRef;
        $this->variadic = $variadic;
        $this->hasDefault = $hasDefault;
        $this->attributes = $attributes;
    }
    public function equals(ExportedNode $node) : bool
    {
        if (!$node instanceof self) {
            return \false;
        }
        if (count($this->attributes) !== count($node->attributes)) {
            return \false;
        }
        foreach ($this->attributes as $i => $attribute) {
            if (!$attribute->equals($node->attributes[$i])) {
                return \false;
            }
        }
        return $this->name === $node->name && $this->type === $node->type && $this->byRef === $node->byRef && $this->variadic === $node->variadic && $this->hasDefault === $node->hasDefault;
    }
    /**
     * @param mixed[] $properties
     * @return self
     */
    public static function __set_state(array $properties) : ExportedNode
    {
        return new self($properties['name'], $properties['type'], $properties['byRef'], $properties['variadic'], $properties['hasDefault'], $properties['attributes']);
    }
    /**
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize()
    {
        return ['type' => self::class, 'data' => ['name' => $this->name, 'type' => $this->type, 'byRef' => $this->byRef, 'variadic' => $this->variadic, 'hasDefault' => $this->hasDefault, 'attributes' => $this->attributes]];
    }
    /**
     * @param mixed[] $data
     * @return self
     */
    public static function decode(array $data) : ExportedNode
    {
        return new self($data['name'], $data['type'], $data['byRef'], $data['variadic'], $data['hasDefault'], array_map(static function (array $attributeData) : \PHPStan\Dependency\ExportedNode\ExportedAttributeNode {
            if ($attributeData['type'] !== \PHPStan\Dependency\ExportedNode\ExportedAttributeNode::class) {
                throw new ShouldNotHappenException();
            }
            return \PHPStan\Dependency\ExportedNode\ExportedAttributeNode::decode($attributeData['data']);
        }, $data['attributes']));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Dependency\ExportedNode;

use JsonSerializable;
use PHPStan\Dependency\ExportedNode;
use PHPStan\Dependency\RootExportedNode;
use PHPStan\ShouldNotHappenException;
use ReturnTypeWillChange;
use function array_map;
use function count;
class ExportedFunctionNode implements RootExportedNode, JsonSerializable
{
    /**
     * @var string
     */
    private $name;
    /**
     * @var \PHPStan\Dependency\ExportedNode\ExportedPhpDocNode|null
     */
    private $phpDoc;
    /**
     * @var bool
     */
    private $byRef;
    /**
     * @var string|null
     */
    private $returnType;
    /**
     * @var ExportedParameterNode[]
     */
    private $parameters;
    /**
     * @var ExportedAttributeNode[]
     */
    private $attributes;
    /**
     * @param ExportedParameterNode[] $parameters
     * @param ExportedAttributeNode[] $attributes
     */
    public function __construct(string $name, ?\PHPStan\Dependency\ExportedNode\ExportedPhpDocNode $phpDoc, bool $byRef, ?string $returnType, array $parameters, array $attributes)
    {
        $this->name = $name;
        $this->phpDoc = $phpDoc;
        $this->byRef = $byRef;
        $this->returnType = $returnType;
        $this->parameters = $parameters;
        $this->attributes = $attributes;
    }
    public function equals(ExportedNode $node) : bool
    {
        if (!$node instanceof self) {
            return \false;
        }
        if (count($this->parameters) !== count($node->parameters)) {
            return \false;
        }
        foreach ($this->parameters as $i => $ourParameter) {
            $theirParameter = $node->parameters[$i];
            if (!$ourParameter->equals($theirParameter)) {
                return \false;
            }
        }
        if ($this->phpDoc === null) {
            if ($node->phpDoc !== null) {
                return \false;
            }
        } elseif ($node->phpDoc !== null) {
            if (!$this->phpDoc->equals($node->phpDoc)) {
                return \false;
            }
        } else {
            return \false;
        }
        if (count($this->attributes) !== count($node->attributes)) {
            return \false;
        }
        foreach ($this->attributes as $i => $attribute) {
            if (!$attribute->equals($node->attributes[$i])) {
                return \false;
            }
        }
        return $this->name === $node->name && $this->byRef === $node->byRef && $this->returnType === $node->returnType;
    }
    /**
     * @param mixed[] $properties
     * @return self
     */
    public static function __set_state(array $properties) : ExportedNode
    {
        return new self($properties['name'], $properties['phpDoc'], $properties['byRef'], $properties['returnType'], $properties['parameters'], $properties['attributes']);
    }
    /**
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize()
    {
        return ['type' => self::class, 'data' => ['name' => $this->name, 'phpDoc' => $this->phpDoc, 'byRef' => $this->byRef, 'returnType' => $this->returnType, 'parameters' => $this->parameters, 'attributes' => $this->attributes]];
    }
    /**
     * @param mixed[] $data
     * @return self
     */
    public static function decode(array $data) : ExportedNode
    {
        return new self($data['name'], $data['phpDoc'] !== null ? \PHPStan\Dependency\ExportedNode\ExportedPhpDocNode::decode($data['phpDoc']['data']) : null, $data['byRef'], $data['returnType'], array_map(static function (array $parameterData) : \PHPStan\Dependency\ExportedNode\ExportedParameterNode {
            if ($parameterData['type'] !== \PHPStan\Dependency\ExportedNode\ExportedParameterNode::class) {
                throw new ShouldNotHappenException();
            }
            return \PHPStan\Dependency\ExportedNode\ExportedParameterNode::decode($parameterData['data']);
        }, $data['parameters']), array_map(static function (array $attributeData) : \PHPStan\Dependency\ExportedNode\ExportedAttributeNode {
            if ($attributeData['type'] !== \PHPStan\Dependency\ExportedNode\ExportedAttributeNode::class) {
                throw new ShouldNotHappenException();
            }
            return \PHPStan\Dependency\ExportedNode\ExportedAttributeNode::decode($attributeData['data']);
        }, $data['attributes']));
    }
    public function getType() : string
    {
        return self::TYPE_FUNCTION;
    }
    public function getName() : string
    {
        return $this->name;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Dependency\ExportedNode;

use JsonSerializable;
use PHPStan\Dependency\ExportedNode;
use PHPStan\ShouldNotHappenException;
use ReturnTypeWillChange;
use function array_map;
use function count;
class ExportedClassConstantNode implements ExportedNode, JsonSerializable
{
    /**
     * @var string
     */
    private $name;
    /**
     * @var string
     */
    private $value;
    /**
     * @var ExportedAttributeNode[]
     */
    private $attributes;
    /**
     * @param ExportedAttributeNode[] $attributes
     */
    public function __construct(string $name, string $value, array $attributes)
    {
        $this->name = $name;
        $this->value = $value;
        $this->attributes = $attributes;
    }
    public function equals(ExportedNode $node) : bool
    {
        if (!$node instanceof self) {
            return \false;
        }
        if (count($this->attributes) !== count($node->attributes)) {
            return \false;
        }
        foreach ($this->attributes as $i => $attribute) {
            if (!$attribute->equals($node->attributes[$i])) {
                return \false;
            }
        }
        return $this->name === $node->name && $this->value === $node->value;
    }
    /**
     * @param mixed[] $properties
     * @return self
     */
    public static function __set_state(array $properties) : ExportedNode
    {
        return new self($properties['name'], $properties['value'], $properties['attributes']);
    }
    /**
     * @param mixed[] $data
     * @return self
     */
    public static function decode(array $data) : ExportedNode
    {
        return new self($data['name'], $data['value'], array_map(static function (array $attributeData) : \PHPStan\Dependency\ExportedNode\ExportedAttributeNode {
            if ($attributeData['type'] !== \PHPStan\Dependency\ExportedNode\ExportedAttributeNode::class) {
                throw new ShouldNotHappenException();
            }
            return \PHPStan\Dependency\ExportedNode\ExportedAttributeNode::decode($attributeData['data']);
        }, $data['attributes']));
    }
    /**
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize()
    {
        return ['type' => self::class, 'data' => ['name' => $this->name, 'value' => $this->value, 'attributes' => $this->attributes]];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Dependency\ExportedNode;

use JsonSerializable;
use PHPStan\Dependency\ExportedNode;
use PHPStan\Dependency\RootExportedNode;
use ReturnTypeWillChange;
class ExportedTraitNode implements RootExportedNode, JsonSerializable
{
    /**
     * @var string
     */
    private $traitName;
    public function __construct(string $traitName)
    {
        $this->traitName = $traitName;
    }
    public function equals(ExportedNode $node) : bool
    {
        return \false;
    }
    /**
     * @param mixed[] $properties
     * @return self
     */
    public static function __set_state(array $properties) : ExportedNode
    {
        return new self($properties['traitName']);
    }
    /**
     * @param mixed[] $data
     * @return self
     */
    public static function decode(array $data) : ExportedNode
    {
        return new self($data['traitName']);
    }
    /**
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize()
    {
        return ['type' => self::class, 'data' => ['traitName' => $this->traitName]];
    }
    public function getType() : string
    {
        return self::TYPE_TRAIT;
    }
    public function getName() : string
    {
        return $this->traitName;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Dependency\ExportedNode;

use JsonSerializable;
use PHPStan\Dependency\ExportedNode;
use ReturnTypeWillChange;
class ExportedTraitUseAdaptation implements ExportedNode, JsonSerializable
{
    /**
     * @var string|null
     */
    private $traitName;
    /**
     * @var string
     */
    private $method;
    /**
     * @var int|null
     */
    private $newModifier;
    /**
     * @var string|null
     */
    private $newName;
    /**
     * @var string[]|null
     */
    private $insteadOfs;
    /**
     * @param string[]|null $insteadOfs
     */
    private function __construct(?string $traitName, string $method, ?int $newModifier, ?string $newName, ?array $insteadOfs)
    {
        $this->traitName = $traitName;
        $this->method = $method;
        $this->newModifier = $newModifier;
        $this->newName = $newName;
        $this->insteadOfs = $insteadOfs;
    }
    public static function createAlias(?string $traitName, string $method, ?int $newModifier, ?string $newName) : self
    {
        return new self($traitName, $method, $newModifier, $newName, null);
    }
    /**
     * @param string[] $insteadOfs
     */
    public static function createPrecedence(?string $traitName, string $method, array $insteadOfs) : self
    {
        return new self($traitName, $method, null, null, $insteadOfs);
    }
    public function equals(ExportedNode $node) : bool
    {
        if (!$node instanceof self) {
            return \false;
        }
        return $this->traitName === $node->traitName && $this->method === $node->method && $this->newModifier === $node->newModifier && $this->newName === $node->newName && $this->insteadOfs === $node->insteadOfs;
    }
    /**
     * @param mixed[] $properties
     * @return self
     */
    public static function __set_state(array $properties) : ExportedNode
    {
        return new self($properties['traitName'], $properties['method'], $properties['newModifier'], $properties['newName'], $properties['insteadOfs']);
    }
    /**
     * @param mixed[] $data
     * @return self
     */
    public static function decode(array $data) : ExportedNode
    {
        return new self($data['traitName'], $data['method'], $data['newModifier'], $data['newName'], $data['insteadOfs']);
    }
    /**
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize()
    {
        return ['type' => self::class, 'data' => ['traitName' => $this->traitName, 'method' => $this->method, 'newModifier' => $this->newModifier, 'newName' => $this->newName, 'insteadOfs' => $this->insteadOfs]];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Dependency;

use PhpParser\Node;
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Expr\ArrayDimFetch;
use PhpParser\Node\Expr\Closure;
use PhpParser\Node\Name;
use PhpParser\Node\Stmt\Foreach_;
use PHPStan\Analyser\Scope;
use PHPStan\Broker\ClassNotFoundException;
use PHPStan\Broker\FunctionNotFoundException;
use PHPStan\File\FileHelper;
use PHPStan\Node\ClassPropertyNode;
use PHPStan\Node\InClassMethodNode;
use PHPStan\Node\InFunctionNode;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParameterReflectionWithPhpDocs;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Reflection\ParametersAcceptorWithPhpDocs;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Type\ClosureType;
use PHPStan\Type\FileTypeMapper;
use PHPStan\Type\ParserNodeTypeToPHPStanType;
use PHPStan\Type\Type;
use function array_merge;
use function count;
class DependencyResolver
{
    /**
     * @var \PHPStan\File\FileHelper
     */
    private $fileHelper;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Dependency\ExportedNodeResolver
     */
    private $exportedNodeResolver;
    /**
     * @var \PHPStan\Type\FileTypeMapper
     */
    private $fileTypeMapper;
    public function __construct(FileHelper $fileHelper, ReflectionProvider $reflectionProvider, \PHPStan\Dependency\ExportedNodeResolver $exportedNodeResolver, FileTypeMapper $fileTypeMapper)
    {
        $this->fileHelper = $fileHelper;
        $this->reflectionProvider = $reflectionProvider;
        $this->exportedNodeResolver = $exportedNodeResolver;
        $this->fileTypeMapper = $fileTypeMapper;
    }
    public function resolveDependencies(Node $node, Scope $scope) : \PHPStan\Dependency\NodeDependencies
    {
        $dependenciesReflections = [];
        if ($node instanceof Node\Stmt\Class_) {
            if ($node->namespacedName !== null) {
                $this->addClassToDependencies($node->namespacedName->toString(), $dependenciesReflections);
            }
            if ($node->extends !== null) {
                $this->addClassToDependencies($node->extends->toString(), $dependenciesReflections);
            }
            foreach ($node->implements as $className) {
                $this->addClassToDependencies($className->toString(), $dependenciesReflections);
            }
        } elseif ($node instanceof Node\Stmt\Interface_) {
            if ($node->namespacedName !== null) {
                $this->addClassToDependencies($node->namespacedName->toString(), $dependenciesReflections);
            }
            foreach ($node->extends as $className) {
                $this->addClassToDependencies($className->toString(), $dependenciesReflections);
            }
        } elseif ($node instanceof Node\Stmt\Enum_) {
            if ($node->namespacedName !== null) {
                $this->addClassToDependencies($node->namespacedName->toString(), $dependenciesReflections);
            }
            foreach ($node->implements as $className) {
                $this->addClassToDependencies($className->toString(), $dependenciesReflections);
            }
        } elseif ($node instanceof InClassMethodNode) {
            $nativeMethod = $node->getMethodReflection();
            $parametersAcceptor = ParametersAcceptorSelector::selectSingle($nativeMethod->getVariants());
            $this->extractThrowType($nativeMethod->getThrowType(), $dependenciesReflections);
            $this->extractFromParametersAcceptor($parametersAcceptor, $dependenciesReflections);
            foreach ($nativeMethod->getAsserts()->getAll() as $assertTag) {
                foreach ($assertTag->getType()->getReferencedClasses() as $referencedClass) {
                    $this->addClassToDependencies($referencedClass, $dependenciesReflections);
                }
                foreach ($assertTag->getOriginalType()->getReferencedClasses() as $referencedClass) {
                    $this->addClassToDependencies($referencedClass, $dependenciesReflections);
                }
            }
            if ($nativeMethod->getSelfOutType() !== null) {
                foreach ($nativeMethod->getSelfOutType()->getReferencedClasses() as $referencedClass) {
                    $this->addClassToDependencies($referencedClass, $dependenciesReflections);
                }
            }
        } elseif ($node instanceof ClassPropertyNode) {
            $nativeTypeNode = $node->getNativeType();
            if ($nativeTypeNode !== null && $scope->isInClass()) {
                $nativeType = ParserNodeTypeToPHPStanType::resolve($nativeTypeNode, $scope->getClassReflection());
                foreach ($nativeType->getReferencedClasses() as $referencedClass) {
                    $this->addClassToDependencies($referencedClass, $dependenciesReflections);
                }
            }
            $phpDocType = $node->getPhpDocType();
            if ($phpDocType !== null) {
                foreach ($phpDocType->getReferencedClasses() as $referencedClass) {
                    $this->addClassToDependencies($referencedClass, $dependenciesReflections);
                }
            }
        } elseif ($node instanceof InFunctionNode) {
            $functionReflection = $node->getFunctionReflection();
            $this->extractThrowType($functionReflection->getThrowType(), $dependenciesReflections);
            $parametersAcceptor = ParametersAcceptorSelector::selectSingle($functionReflection->getVariants());
            $this->extractFromParametersAcceptor($parametersAcceptor, $dependenciesReflections);
            foreach ($functionReflection->getAsserts()->getAll() as $assertTag) {
                foreach ($assertTag->getType()->getReferencedClasses() as $referencedClass) {
                    $this->addClassToDependencies($referencedClass, $dependenciesReflections);
                }
                foreach ($assertTag->getOriginalType()->getReferencedClasses() as $referencedClass) {
                    $this->addClassToDependencies($referencedClass, $dependenciesReflections);
                }
            }
        } elseif ($node instanceof Closure || $node instanceof Node\Expr\ArrowFunction) {
            $closureType = $scope->getType($node);
            if ($closureType instanceof ClosureType) {
                foreach ($closureType->getParameters() as $parameter) {
                    $referencedClasses = $parameter->getType()->getReferencedClasses();
                    foreach ($referencedClasses as $referencedClass) {
                        $this->addClassToDependencies($referencedClass, $dependenciesReflections);
                    }
                }
                $returnTypeReferencedClasses = $closureType->getReturnType()->getReferencedClasses();
                foreach ($returnTypeReferencedClasses as $referencedClass) {
                    $this->addClassToDependencies($referencedClass, $dependenciesReflections);
                }
            }
        } elseif ($node instanceof Node\Expr\FuncCall) {
            $functionName = $node->name;
            if ($functionName instanceof Node\Name) {
                try {
                    $functionReflection = $this->getFunctionReflection($functionName, $scope);
                    $dependenciesReflections[] = $functionReflection;
                    foreach ($functionReflection->getVariants() as $functionVariant) {
                        foreach ($functionVariant->getParameters() as $parameter) {
                            if ($parameter->getOutType() === null) {
                                continue;
                            }
                            foreach ($parameter->getOutType()->getReferencedClasses() as $referencedClass) {
                                $this->addClassToDependencies($referencedClass, $dependenciesReflections);
                            }
                        }
                    }
                    foreach ($functionReflection->getAsserts()->getAll() as $assertTag) {
                        foreach ($assertTag->getType()->getReferencedClasses() as $referencedClass) {
                            $this->addClassToDependencies($referencedClass, $dependenciesReflections);
                        }
                        foreach ($assertTag->getOriginalType()->getReferencedClasses() as $referencedClass) {
                            $this->addClassToDependencies($referencedClass, $dependenciesReflections);
                        }
                    }
                } catch (FunctionNotFoundException $exception) {
                    // pass
                }
            } else {
                $calledType = $scope->getType($functionName);
                if ($calledType->isCallable()->yes()) {
                    $variants = $calledType->getCallableParametersAcceptors($scope);
                    foreach ($variants as $variant) {
                        $referencedClasses = $variant->getReturnType()->getReferencedClasses();
                        foreach ($referencedClasses as $referencedClass) {
                            $this->addClassToDependencies($referencedClass, $dependenciesReflections);
                        }
                        foreach ($variant->getParameters() as $parameter) {
                            if (!$parameter instanceof ParameterReflectionWithPhpDocs) {
                                continue;
                            }
                            if ($parameter->getOutType() === null) {
                                continue;
                            }
                            foreach ($parameter->getOutType()->getReferencedClasses() as $referencedClass) {
                                $this->addClassToDependencies($referencedClass, $dependenciesReflections);
                            }
                        }
                    }
                }
            }
            $returnType = $scope->getType($node);
            foreach ($returnType->getReferencedClasses() as $referencedClass) {
                $this->addClassToDependencies($referencedClass, $dependenciesReflections);
            }
        } elseif ($node instanceof Node\Expr\MethodCall) {
            $calledOnType = $scope->getType($node->var);
            $classNames = $calledOnType->getReferencedClasses();
            foreach ($classNames as $className) {
                $this->addClassToDependencies($className, $dependenciesReflections);
            }
            $returnType = $scope->getType($node);
            foreach ($returnType->getReferencedClasses() as $referencedClass) {
                $this->addClassToDependencies($referencedClass, $dependenciesReflections);
            }
            if ($node->name instanceof Node\Identifier) {
                $methodReflection = $scope->getMethodReflection($calledOnType, $node->name->toString());
                if ($methodReflection !== null) {
                    $this->addClassToDependencies($methodReflection->getDeclaringClass()->getName(), $dependenciesReflections);
                    foreach ($methodReflection->getVariants() as $methodVariant) {
                        foreach ($methodVariant->getParameters() as $parameter) {
                            if ($parameter->getOutType() === null) {
                                continue;
                            }
                            foreach ($parameter->getOutType()->getReferencedClasses() as $referencedClass) {
                                $this->addClassToDependencies($referencedClass, $dependenciesReflections);
                            }
                        }
                    }
                    foreach ($methodReflection->getAsserts()->getAll() as $assertTag) {
                        foreach ($assertTag->getType()->getReferencedClasses() as $referencedClass) {
                            $this->addClassToDependencies($referencedClass, $dependenciesReflections);
                        }
                        foreach ($assertTag->getOriginalType()->getReferencedClasses() as $referencedClass) {
                            $this->addClassToDependencies($referencedClass, $dependenciesReflections);
                        }
                    }
                    if ($methodReflection->getSelfOutType() !== null) {
                        foreach ($methodReflection->getSelfOutType()->getReferencedClasses() as $referencedClass) {
                            $this->addClassToDependencies($referencedClass, $dependenciesReflections);
                        }
                    }
                }
            }
        } elseif ($node instanceof Node\Expr\PropertyFetch) {
            $fetchedOnType = $scope->getType($node->var);
            $classNames = $fetchedOnType->getReferencedClasses();
            foreach ($classNames as $className) {
                $this->addClassToDependencies($className, $dependenciesReflections);
            }
            $propertyType = $scope->getType($node);
            foreach ($propertyType->getReferencedClasses() as $referencedClass) {
                $this->addClassToDependencies($referencedClass, $dependenciesReflections);
            }
            if ($node->name instanceof Node\Identifier) {
                $propertyReflection = $scope->getPropertyReflection($fetchedOnType, $node->name->toString());
                if ($propertyReflection !== null) {
                    $this->addClassToDependencies($propertyReflection->getDeclaringClass()->getName(), $dependenciesReflections);
                }
            }
        } elseif ($node instanceof Node\Expr\StaticCall) {
            if ($node->class instanceof Node\Name) {
                $this->addClassToDependencies($scope->resolveName($node->class), $dependenciesReflections);
            } else {
                foreach ($scope->getType($node->class)->getReferencedClasses() as $referencedClass) {
                    $this->addClassToDependencies($referencedClass, $dependenciesReflections);
                }
            }
            $returnType = $scope->getType($node);
            foreach ($returnType->getReferencedClasses() as $referencedClass) {
                $this->addClassToDependencies($referencedClass, $dependenciesReflections);
            }
            if ($node->name instanceof Node\Identifier) {
                if ($node->class instanceof Node\Name) {
                    $className = $scope->resolveName($node->class);
                    if ($this->reflectionProvider->hasClass($className)) {
                        $methodClassReflection = $this->reflectionProvider->getClass($className);
                        if ($methodClassReflection->hasMethod($node->name->toString())) {
                            $methodReflection = $methodClassReflection->getMethod($node->name->toString(), $scope);
                            $this->addClassToDependencies($methodReflection->getDeclaringClass()->getName(), $dependenciesReflections);
                            foreach ($methodReflection->getVariants() as $methodVariant) {
                                foreach ($methodVariant->getParameters() as $parameter) {
                                    if ($parameter->getOutType() === null) {
                                        continue;
                                    }
                                    foreach ($parameter->getOutType()->getReferencedClasses() as $referencedClass) {
                                        $this->addClassToDependencies($referencedClass, $dependenciesReflections);
                                    }
                                }
                            }
                        }
                    }
                } else {
                    $methodReflection = $scope->getMethodReflection($scope->getType($node->class), $node->name->toString());
                    if ($methodReflection !== null) {
                        $this->addClassToDependencies($methodReflection->getDeclaringClass()->getName(), $dependenciesReflections);
                        foreach ($methodReflection->getVariants() as $methodVariant) {
                            foreach ($methodVariant->getParameters() as $parameter) {
                                if ($parameter->getOutType() === null) {
                                    continue;
                                }
                                foreach ($parameter->getOutType()->getReferencedClasses() as $referencedClass) {
                                    $this->addClassToDependencies($referencedClass, $dependenciesReflections);
                                }
                            }
                        }
                    }
                }
            }
        } elseif ($node instanceof Node\Expr\ClassConstFetch) {
            if ($node->class instanceof Node\Name) {
                $this->addClassToDependencies($scope->resolveName($node->class), $dependenciesReflections);
            } else {
                foreach ($scope->getType($node->class)->getReferencedClasses() as $referencedClass) {
                    $this->addClassToDependencies($referencedClass, $dependenciesReflections);
                }
            }
            $returnType = $scope->getType($node);
            foreach ($returnType->getReferencedClasses() as $referencedClass) {
                $this->addClassToDependencies($referencedClass, $dependenciesReflections);
            }
            if ($node->name instanceof Node\Identifier && $node->name->toLowerString() !== 'class') {
                if ($node->class instanceof Node\Name) {
                    $className = $scope->resolveName($node->class);
                    if ($this->reflectionProvider->hasClass($className)) {
                        $constantClassReflection = $this->reflectionProvider->getClass($className);
                        if ($constantClassReflection->hasConstant($node->name->toString())) {
                            $constantReflection = $constantClassReflection->getConstant($node->name->toString());
                            $this->addClassToDependencies($constantReflection->getDeclaringClass()->getName(), $dependenciesReflections);
                        }
                    }
                } else {
                    $constantReflection = $scope->getConstantReflection($scope->getType($node->class), $node->name->toString());
                    if ($constantReflection !== null) {
                        $this->addClassToDependencies($constantReflection->getDeclaringClass()->getName(), $dependenciesReflections);
                    }
                }
            }
        } elseif ($node instanceof Node\Expr\StaticPropertyFetch) {
            if ($node->class instanceof Node\Name) {
                $this->addClassToDependencies($scope->resolveName($node->class), $dependenciesReflections);
            } else {
                foreach ($scope->getType($node->class)->getReferencedClasses() as $referencedClass) {
                    $this->addClassToDependencies($referencedClass, $dependenciesReflections);
                }
            }
            $returnType = $scope->getType($node);
            foreach ($returnType->getReferencedClasses() as $referencedClass) {
                $this->addClassToDependencies($referencedClass, $dependenciesReflections);
            }
            if ($node->name instanceof Node\Identifier) {
                if ($node->class instanceof Node\Name) {
                    $className = $scope->resolveName($node->class);
                    if ($this->reflectionProvider->hasClass($className)) {
                        $propertyClassReflection = $this->reflectionProvider->getClass($className);
                        if ($propertyClassReflection->hasProperty($node->name->toString())) {
                            $propertyReflection = $propertyClassReflection->getProperty($node->name->toString(), $scope);
                            $this->addClassToDependencies($propertyReflection->getDeclaringClass()->getName(), $dependenciesReflections);
                        }
                    }
                } else {
                    $propertyReflection = $scope->getPropertyReflection($scope->getType($node->class), $node->name->toString());
                    if ($propertyReflection !== null) {
                        $this->addClassToDependencies($propertyReflection->getDeclaringClass()->getName(), $dependenciesReflections);
                    }
                }
            }
        } elseif ($node instanceof Node\Expr\New_ && $node->class instanceof Node\Name) {
            $this->addClassToDependencies($scope->resolveName($node->class), $dependenciesReflections);
        } elseif ($node instanceof Node\Stmt\TraitUse) {
            foreach ($node->traits as $traitName) {
                $this->addClassToDependencies($traitName->toString(), $dependenciesReflections);
            }
            $docComment = $node->getDocComment();
            if ($docComment !== null) {
                $usesTags = $this->fileTypeMapper->getResolvedPhpDoc($scope->getFile(), $scope->isInClass() ? $scope->getClassReflection()->getName() : null, $scope->isInTrait() ? $scope->getTraitReflection()->getName() : null, null, $docComment->getText())->getUsesTags();
                foreach ($usesTags as $usesTag) {
                    foreach ($usesTag->getType()->getReferencedClasses() as $referencedClass) {
                        $this->addClassToDependencies($referencedClass, $dependenciesReflections);
                    }
                }
            }
        } elseif ($node instanceof Node\Expr\Instanceof_) {
            if ($node->class instanceof Name) {
                $this->addClassToDependencies($scope->resolveName($node->class), $dependenciesReflections);
            }
        } elseif ($node instanceof Node\Stmt\Catch_) {
            foreach ($node->types as $type) {
                $this->addClassToDependencies($scope->resolveName($type), $dependenciesReflections);
            }
        } elseif ($node instanceof ArrayDimFetch && $node->dim !== null) {
            $varType = $scope->getType($node->var);
            $dimType = $scope->getType($node->dim);
            foreach ($varType->getOffsetValueType($dimType)->getReferencedClasses() as $referencedClass) {
                $this->addClassToDependencies($referencedClass, $dependenciesReflections);
            }
        } elseif ($node instanceof Foreach_) {
            $exprType = $scope->getType($node->expr);
            if ($node->keyVar !== null) {
                foreach ($exprType->getIterableKeyType()->getReferencedClasses() as $referencedClass) {
                    $this->addClassToDependencies($referencedClass, $dependenciesReflections);
                }
            }
            foreach ($exprType->getIterableValueType()->getReferencedClasses() as $referencedClass) {
                $this->addClassToDependencies($referencedClass, $dependenciesReflections);
            }
        } elseif ($node instanceof Array_ && $this->considerArrayForCallableTest($scope, $node)) {
            $arrayType = $scope->getType($node);
            if (!$arrayType->isCallable()->no()) {
                foreach ($arrayType->getCallableParametersAcceptors($scope) as $variant) {
                    $referencedClasses = $variant->getReturnType()->getReferencedClasses();
                    foreach ($referencedClasses as $referencedClass) {
                        $this->addClassToDependencies($referencedClass, $dependenciesReflections);
                    }
                }
            }
        }
        return new \PHPStan\Dependency\NodeDependencies($this->fileHelper, $dependenciesReflections, $this->exportedNodeResolver->resolve($scope->getFile(), $node));
    }
    private function considerArrayForCallableTest(Scope $scope, Array_ $arrayNode) : bool
    {
        $items = $arrayNode->items;
        if (count($items) !== 2) {
            return \false;
        }
        if ($items[0] === null) {
            return \false;
        }
        $itemType = $scope->getType($items[0]->value);
        return $itemType->isClassStringType()->yes();
    }
    /**
     * @param array<int, ClassReflection|FunctionReflection> $dependenciesReflections
     */
    private function addClassToDependencies(string $className, array &$dependenciesReflections) : void
    {
        try {
            $classReflection = $this->reflectionProvider->getClass($className);
        } catch (ClassNotFoundException $exception) {
            return;
        }
        do {
            $dependenciesReflections[] = $classReflection;
            foreach ($classReflection->getInterfaces() as $interface) {
                $dependenciesReflections[] = $interface;
            }
            foreach ($classReflection->getTraits() as $trait) {
                $dependenciesReflections[] = $trait;
            }
            foreach ($classReflection->getResolvedMixinTypes() as $mixinType) {
                foreach ($mixinType->getReferencedClasses() as $referencedClass) {
                    if (!$this->reflectionProvider->hasClass($referencedClass)) {
                        continue;
                    }
                    $dependenciesReflections[] = $this->reflectionProvider->getClass($referencedClass);
                }
            }
            foreach ($classReflection->getTemplateTags() as $templateTag) {
                foreach ($templateTag->getBound()->getReferencedClasses() as $referencedClass) {
                    if (!$this->reflectionProvider->hasClass($referencedClass)) {
                        continue;
                    }
                    $dependenciesReflections[] = $this->reflectionProvider->getClass($referencedClass);
                }
            }
            foreach ($classReflection->getPropertyTags() as $propertyTag) {
                if ($propertyTag->isReadable()) {
                    foreach ($propertyTag->getReadableType()->getReferencedClasses() as $referencedClass) {
                        if (!$this->reflectionProvider->hasClass($referencedClass)) {
                            continue;
                        }
                        $dependenciesReflections[] = $this->reflectionProvider->getClass($referencedClass);
                    }
                }
                if (!$propertyTag->isWritable()) {
                    continue;
                }
                foreach ($propertyTag->getWritableType()->getReferencedClasses() as $referencedClass) {
                    if (!$this->reflectionProvider->hasClass($referencedClass)) {
                        continue;
                    }
                    $dependenciesReflections[] = $this->reflectionProvider->getClass($referencedClass);
                }
            }
            foreach ($classReflection->getMethodTags() as $methodTag) {
                foreach ($methodTag->getReturnType()->getReferencedClasses() as $referencedClass) {
                    if (!$this->reflectionProvider->hasClass($referencedClass)) {
                        continue;
                    }
                    $dependenciesReflections[] = $this->reflectionProvider->getClass($referencedClass);
                }
                foreach ($methodTag->getParameters() as $parameter) {
                    foreach ($parameter->getType()->getReferencedClasses() as $referencedClass) {
                        if (!$this->reflectionProvider->hasClass($referencedClass)) {
                            continue;
                        }
                        $dependenciesReflections[] = $this->reflectionProvider->getClass($referencedClass);
                    }
                    if ($parameter->getDefaultValue() === null) {
                        continue;
                    }
                    foreach ($parameter->getDefaultValue()->getReferencedClasses() as $referencedClass) {
                        if (!$this->reflectionProvider->hasClass($referencedClass)) {
                            continue;
                        }
                        $dependenciesReflections[] = $this->reflectionProvider->getClass($referencedClass);
                    }
                }
            }
            foreach ($classReflection->getExtendsTags() as $extendsTag) {
                foreach ($extendsTag->getType()->getReferencedClasses() as $referencedClass) {
                    if (!$this->reflectionProvider->hasClass($referencedClass)) {
                        continue;
                    }
                    $dependenciesReflections[] = $this->reflectionProvider->getClass($referencedClass);
                }
            }
            foreach ($classReflection->getImplementsTags() as $implementsTag) {
                foreach ($implementsTag->getType()->getReferencedClasses() as $referencedClass) {
                    if (!$this->reflectionProvider->hasClass($referencedClass)) {
                        continue;
                    }
                    $dependenciesReflections[] = $this->reflectionProvider->getClass($referencedClass);
                }
            }
            $classReflection = $classReflection->getParentClass();
        } while ($classReflection !== null);
    }
    private function getFunctionReflection(Node\Name $nameNode, ?Scope $scope) : FunctionReflection
    {
        return $this->reflectionProvider->getFunction($nameNode, $scope);
    }
    /**
     * @param array<ClassReflection|FunctionReflection> $dependenciesReflections
     */
    private function extractFromParametersAcceptor(ParametersAcceptorWithPhpDocs $parametersAcceptor, array &$dependenciesReflections) : void
    {
        foreach ($parametersAcceptor->getParameters() as $parameter) {
            $referencedClasses = array_merge($parameter->getNativeType()->getReferencedClasses(), $parameter->getPhpDocType()->getReferencedClasses());
            foreach ($referencedClasses as $referencedClass) {
                $this->addClassToDependencies($referencedClass, $dependenciesReflections);
            }
            if ($parameter->getOutType() === null) {
                continue;
            }
            foreach ($parameter->getOutType()->getReferencedClasses() as $referencedClass) {
                $this->addClassToDependencies($referencedClass, $dependenciesReflections);
            }
        }
        $returnTypeReferencedClasses = array_merge($parametersAcceptor->getNativeReturnType()->getReferencedClasses(), $parametersAcceptor->getPhpDocReturnType()->getReferencedClasses());
        foreach ($returnTypeReferencedClasses as $referencedClass) {
            $this->addClassToDependencies($referencedClass, $dependenciesReflections);
        }
    }
    /**
     * @param array<ClassReflection|FunctionReflection> $dependenciesReflections
     */
    private function extractThrowType(?Type $throwType, array &$dependenciesReflections) : void
    {
        if ($throwType === null) {
            return;
        }
        foreach ($throwType->getReferencedClasses() as $referencedClass) {
            $this->addClassToDependencies($referencedClass, $dependenciesReflections);
        }
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Dependency;

use PhpParser\Node;
use PhpParser\Node\Name;
use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Function_;
use PHPStan\Dependency\ExportedNode\ExportedAttributeNode;
use PHPStan\Dependency\ExportedNode\ExportedClassConstantNode;
use PHPStan\Dependency\ExportedNode\ExportedClassConstantsNode;
use PHPStan\Dependency\ExportedNode\ExportedClassNode;
use PHPStan\Dependency\ExportedNode\ExportedEnumCaseNode;
use PHPStan\Dependency\ExportedNode\ExportedEnumNode;
use PHPStan\Dependency\ExportedNode\ExportedFunctionNode;
use PHPStan\Dependency\ExportedNode\ExportedInterfaceNode;
use PHPStan\Dependency\ExportedNode\ExportedMethodNode;
use PHPStan\Dependency\ExportedNode\ExportedParameterNode;
use PHPStan\Dependency\ExportedNode\ExportedPhpDocNode;
use PHPStan\Dependency\ExportedNode\ExportedPropertiesNode;
use PHPStan\Dependency\ExportedNode\ExportedTraitNode;
use PHPStan\Dependency\ExportedNode\ExportedTraitUseAdaptation;
use PHPStan\Node\Printer\ExprPrinter;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\FileTypeMapper;
use function array_map;
use function implode;
use function is_string;
class ExportedNodeResolver
{
    /**
     * @var \PHPStan\Type\FileTypeMapper
     */
    private $fileTypeMapper;
    /**
     * @var \PHPStan\Node\Printer\ExprPrinter
     */
    private $exprPrinter;
    public function __construct(FileTypeMapper $fileTypeMapper, ExprPrinter $exprPrinter)
    {
        $this->fileTypeMapper = $fileTypeMapper;
        $this->exprPrinter = $exprPrinter;
    }
    public function resolve(string $fileName, Node $node) : ?\PHPStan\Dependency\RootExportedNode
    {
        if ($node instanceof Class_ && isset($node->namespacedName)) {
            $docComment = $node->getDocComment();
            $extendsName = null;
            if ($node->extends !== null) {
                $extendsName = $node->extends->toString();
            }
            $implementsNames = [];
            foreach ($node->implements as $className) {
                $implementsNames[] = $className->toString();
            }
            $usedTraits = [];
            $adaptations = [];
            foreach ($node->getTraitUses() as $traitUse) {
                foreach ($traitUse->traits as $usedTraitName) {
                    $usedTraits[] = $usedTraitName->toString();
                }
                foreach ($traitUse->adaptations as $adaptation) {
                    $adaptations[] = $adaptation;
                }
            }
            $className = $node->namespacedName->toString();
            return new ExportedClassNode($className, $this->exportPhpDocNode($fileName, $className, null, $docComment !== null ? $docComment->getText() : null), $node->isAbstract(), $node->isFinal(), $extendsName, $implementsNames, $usedTraits, array_map(static function (Node\Stmt\TraitUseAdaptation $adaptation) : ExportedTraitUseAdaptation {
                if ($adaptation instanceof Node\Stmt\TraitUseAdaptation\Alias) {
                    return ExportedTraitUseAdaptation::createAlias($adaptation->trait !== null ? $adaptation->trait->toString() : null, $adaptation->method->toString(), $adaptation->newModifier, $adaptation->newName !== null ? $adaptation->newName->toString() : null);
                }
                if ($adaptation instanceof Node\Stmt\TraitUseAdaptation\Precedence) {
                    return ExportedTraitUseAdaptation::createPrecedence($adaptation->trait !== null ? $adaptation->trait->toString() : null, $adaptation->method->toString(), array_map(static function (Name $name) : string {
                        return $name->toString();
                    }, $adaptation->insteadof));
                }
                throw new ShouldNotHappenException();
            }, $adaptations), $this->exportClassStatements($node->stmts, $fileName, $className), $this->exportAttributeNodes($node->attrGroups));
        }
        if ($node instanceof Node\Stmt\Interface_ && isset($node->namespacedName)) {
            $extendsNames = array_map(static function (Name $name) : string {
                return (string) $name;
            }, $node->extends);
            $docComment = $node->getDocComment();
            $interfaceName = $node->namespacedName->toString();
            return new ExportedInterfaceNode($interfaceName, $this->exportPhpDocNode($fileName, $interfaceName, null, $docComment !== null ? $docComment->getText() : null), $extendsNames, $this->exportClassStatements($node->stmts, $fileName, $interfaceName));
        }
        if ($node instanceof Node\Stmt\Enum_ && $node->namespacedName !== null) {
            $implementsNames = array_map(static function (Name $name) : string {
                return (string) $name;
            }, $node->implements);
            $docComment = $node->getDocComment();
            $enumName = $node->namespacedName->toString();
            $scalarType = null;
            if ($node->scalarType !== null) {
                $scalarType = $node->scalarType->toString();
            }
            return new ExportedEnumNode($enumName, $scalarType, $this->exportPhpDocNode($fileName, $enumName, null, $docComment !== null ? $docComment->getText() : null), $implementsNames, $this->exportClassStatements($node->stmts, $fileName, $enumName), $this->exportAttributeNodes($node->attrGroups));
        }
        if ($node instanceof Node\Stmt\Trait_ && isset($node->namespacedName)) {
            return new ExportedTraitNode($node->namespacedName->toString());
        }
        if ($node instanceof Function_) {
            $functionName = $node->name->name;
            if (isset($node->namespacedName)) {
                $functionName = (string) $node->namespacedName;
            }
            $docComment = $node->getDocComment();
            return new ExportedFunctionNode($functionName, $this->exportPhpDocNode($fileName, null, $functionName, $docComment !== null ? $docComment->getText() : null), $node->byRef, $this->printType($node->returnType), $this->exportParameterNodes($node->params), $this->exportAttributeNodes($node->attrGroups));
        }
        return null;
    }
    /**
     * @param Node\Identifier|Node\Name|Node\ComplexType|null $type
     */
    private function printType($type) : ?string
    {
        if ($type === null) {
            return null;
        }
        if ($type instanceof Node\NullableType) {
            return '?' . $this->printType($type->type);
        }
        if ($type instanceof Node\UnionType) {
            return implode('|', array_map(function ($innerType) : string {
                $printedType = $this->printType($innerType);
                if ($printedType === null) {
                    throw new ShouldNotHappenException();
                }
                return $printedType;
            }, $type->types));
        }
        if ($type instanceof Node\IntersectionType) {
            return implode('&', array_map(function ($innerType) : string {
                $printedType = $this->printType($innerType);
                if ($printedType === null) {
                    throw new ShouldNotHappenException();
                }
                return $printedType;
            }, $type->types));
        }
        if ($type instanceof Node\Identifier || $type instanceof Name) {
            return $type->toString();
        }
        throw new ShouldNotHappenException();
    }
    /**
     * @param Node\Param[] $params
     * @return ExportedParameterNode[]
     */
    private function exportParameterNodes(array $params) : array
    {
        $nodes = [];
        foreach ($params as $param) {
            if (!$param->var instanceof Node\Expr\Variable || !is_string($param->var->name)) {
                throw new ShouldNotHappenException();
            }
            $type = $param->type;
            if ($type !== null && $param->default instanceof Node\Expr\ConstFetch && $param->default->name->toLowerString() === 'null') {
                if ($type instanceof Node\UnionType) {
                    $innerTypes = $type->types;
                    $innerTypes[] = new Name('null');
                    $type = new Node\UnionType($innerTypes);
                } elseif ($type instanceof Node\Identifier || $type instanceof Name) {
                    $type = new Node\NullableType($type);
                }
            }
            $nodes[] = new ExportedParameterNode($param->var->name, $this->printType($type), $param->byRef, $param->variadic, $param->default !== null, $this->exportAttributeNodes($param->attrGroups));
        }
        return $nodes;
    }
    private function exportPhpDocNode(string $file, ?string $className, ?string $functionName, ?string $text) : ?ExportedPhpDocNode
    {
        if ($text === null) {
            return null;
        }
        $resolvedPhpDocBlock = $this->fileTypeMapper->getResolvedPhpDoc($file, $className, null, $functionName, $text);
        $nameScope = $resolvedPhpDocBlock->getNullableNameScope();
        if ($nameScope === null) {
            return null;
        }
        return new ExportedPhpDocNode($text, $nameScope->getNamespace(), $nameScope->getUses(), $nameScope->getConstUses());
    }
    /**
     * @param Node\Stmt[] $statements
     * @return ExportedNode[]
     */
    private function exportClassStatements(array $statements, string $fileName, string $namespacedName) : array
    {
        $exportedNodes = [];
        foreach ($statements as $statement) {
            $exportedNode = $this->exportClassStatement($statement, $fileName, $namespacedName);
            if ($exportedNode === null) {
                continue;
            }
            $exportedNodes[] = $exportedNode;
        }
        return $exportedNodes;
    }
    private function exportClassStatement(Node\Stmt $node, string $fileName, string $namespacedName) : ?\PHPStan\Dependency\ExportedNode
    {
        if ($node instanceof ClassMethod) {
            if ($node->isAbstract() || $node->isFinal() || !$node->isPrivate()) {
                $methodName = $node->name->toString();
                $docComment = $node->getDocComment();
                return new ExportedMethodNode($methodName, $this->exportPhpDocNode($fileName, $namespacedName, $methodName, $docComment !== null ? $docComment->getText() : null), $node->byRef, $node->isPublic(), $node->isPrivate(), $node->isAbstract(), $node->isFinal(), $node->isStatic(), $this->printType($node->returnType), $this->exportParameterNodes($node->params), $this->exportAttributeNodes($node->attrGroups));
            }
        }
        if ($node instanceof Node\Stmt\Property) {
            if ($node->isPrivate()) {
                return null;
            }
            $docComment = $node->getDocComment();
            return new ExportedPropertiesNode(array_map(static function (Node\Stmt\PropertyProperty $prop) : string {
                return $prop->name->toString();
            }, $node->props), $this->exportPhpDocNode($fileName, $namespacedName, null, $docComment !== null ? $docComment->getText() : null), $this->printType($node->type), $node->isPublic(), $node->isPrivate(), $node->isStatic(), $node->isReadonly(), $this->exportAttributeNodes($node->attrGroups));
        }
        if ($node instanceof Node\Stmt\ClassConst) {
            if ($node->isPrivate()) {
                return null;
            }
            $docComment = $node->getDocComment();
            $constants = [];
            foreach ($node->consts as $const) {
                $constants[] = new ExportedClassConstantNode($const->name->toString(), $this->exprPrinter->printExpr($const->value), $this->exportAttributeNodes($node->attrGroups));
            }
            return new ExportedClassConstantsNode($constants, $node->isPublic(), $node->isPrivate(), $node->isFinal(), $this->exportPhpDocNode($fileName, $namespacedName, null, $docComment !== null ? $docComment->getText() : null));
        }
        if ($node instanceof Node\Stmt\EnumCase) {
            $docComment = $node->getDocComment();
            return new ExportedEnumCaseNode($node->name->toString(), $node->expr !== null ? $this->exprPrinter->printExpr($node->expr) : null, $this->exportPhpDocNode($fileName, $namespacedName, null, $docComment !== null ? $docComment->getText() : null));
        }
        return null;
    }
    /**
     * @param Node\AttributeGroup[] $attributeGroups
     * @return ExportedAttributeNode[]
     */
    private function exportAttributeNodes(array $attributeGroups) : array
    {
        $nodes = [];
        foreach ($attributeGroups as $attributeGroup) {
            foreach ($attributeGroup->attrs as $attribute) {
                $args = [];
                foreach ($attribute->args as $i => $arg) {
                    $args[$arg->name->name ?? $i] = $this->exprPrinter->printExpr($arg->value);
                }
                $nodes[] = new ExportedAttributeNode($attribute->name->toString(), $args);
            }
        }
        return $nodes;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Dependency;

use PHPStan\File\FileHelper;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\FunctionReflection;
use function array_values;
class NodeDependencies
{
    /**
     * @var \PHPStan\File\FileHelper
     */
    private $fileHelper;
    /**
     * @var array<int, (ClassReflection | FunctionReflection)>
     */
    private $reflections;
    /**
     * @var \PHPStan\Dependency\RootExportedNode|null
     */
    private $exportedNode;
    /**
     * @param array<int, ClassReflection|FunctionReflection> $reflections
     */
    public function __construct(FileHelper $fileHelper, array $reflections, ?\PHPStan\Dependency\RootExportedNode $exportedNode)
    {
        $this->fileHelper = $fileHelper;
        $this->reflections = $reflections;
        $this->exportedNode = $exportedNode;
    }
    /**
     * @param array<string, true> $analysedFiles
     * @return string[]
     */
    public function getFileDependencies(string $currentFile, array $analysedFiles) : array
    {
        $dependencies = [];
        foreach ($this->reflections as $dependencyReflection) {
            $dependencyFile = $dependencyReflection->getFileName();
            if ($dependencyFile === null) {
                continue;
            }
            $dependencyFile = $this->fileHelper->normalizePath($dependencyFile);
            if ($currentFile === $dependencyFile) {
                continue;
            }
            if (!isset($analysedFiles[$dependencyFile])) {
                continue;
            }
            $dependencies[$dependencyFile] = $dependencyFile;
        }
        return array_values($dependencies);
    }
    public function getExportedNode() : ?\PHPStan\Dependency\RootExportedNode
    {
        return $this->exportedNode;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Command;

use PHPStan\Analyser\Error;
use PHPStan\Collectors\CollectedData;
use function count;
use function usort;
/** @api */
class AnalysisResult
{
    /** @var list<Error> sorted by their file name, line number and message */
    private $fileSpecificErrors;
    /**
     * @var list<string>
     */
    private $notFileSpecificErrors;
    /**
     * @var list<string>
     */
    private $internalErrors;
    /**
     * @var list<string>
     */
    private $warnings;
    /**
     * @var list<CollectedData>
     */
    private $collectedData;
    /**
     * @var bool
     */
    private $defaultLevelUsed;
    /**
     * @var string|null
     */
    private $projectConfigFile;
    /**
     * @var bool
     */
    private $savedResultCache;
    /**
     * @var int
     */
    private $peakMemoryUsageBytes;
    /**
     * @param list<Error> $fileSpecificErrors
     * @param list<string> $notFileSpecificErrors
     * @param list<string> $internalErrors
     * @param list<string> $warnings
     * @param list<CollectedData> $collectedData
     */
    public function __construct(array $fileSpecificErrors, array $notFileSpecificErrors, array $internalErrors, array $warnings, array $collectedData, bool $defaultLevelUsed, ?string $projectConfigFile, bool $savedResultCache, int $peakMemoryUsageBytes)
    {
        $this->notFileSpecificErrors = $notFileSpecificErrors;
        $this->internalErrors = $internalErrors;
        $this->warnings = $warnings;
        $this->collectedData = $collectedData;
        $this->defaultLevelUsed = $defaultLevelUsed;
        $this->projectConfigFile = $projectConfigFile;
        $this->savedResultCache = $savedResultCache;
        $this->peakMemoryUsageBytes = $peakMemoryUsageBytes;
        usort($fileSpecificErrors, static function (Error $a, Error $b) : int {
            return [$a->getFile(), $a->getLine(), $a->getMessage()] <=> [$b->getFile(), $b->getLine(), $b->getMessage()];
        });
        $this->fileSpecificErrors = $fileSpecificErrors;
    }
    public function hasErrors() : bool
    {
        return $this->getTotalErrorsCount() > 0;
    }
    public function getTotalErrorsCount() : int
    {
        return count($this->fileSpecificErrors) + count($this->notFileSpecificErrors);
    }
    /**
     * @return list<Error> sorted by their file name, line number and message
     */
    public function getFileSpecificErrors() : array
    {
        return $this->fileSpecificErrors;
    }
    /**
     * @return list<string>
     */
    public function getNotFileSpecificErrors() : array
    {
        return $this->notFileSpecificErrors;
    }
    /**
     * @return list<string>
     */
    public function getInternalErrors() : array
    {
        return $this->internalErrors;
    }
    /**
     * @return list<string>
     */
    public function getWarnings() : array
    {
        return $this->warnings;
    }
    public function hasWarnings() : bool
    {
        return count($this->warnings) > 0;
    }
    /**
     * @return list<CollectedData>
     */
    public function getCollectedData() : array
    {
        return $this->collectedData;
    }
    public function isDefaultLevelUsed() : bool
    {
        return $this->defaultLevelUsed;
    }
    public function getProjectConfigFile() : ?string
    {
        return $this->projectConfigFile;
    }
    public function hasInternalErrors() : bool
    {
        return count($this->internalErrors) > 0;
    }
    public function isResultCacheSaved() : bool
    {
        return $this->savedResultCache;
    }
    public function getPeakMemoryUsageBytes() : int
    {
        return $this->peakMemoryUsageBytes;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Command\Symfony;

use PHPStan\Command\Output;
use PHPStan\Command\OutputStyle;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
/**
 * @internal
 */
class SymfonyOutput implements Output
{
    /**
     * @var \Symfony\Component\Console\Output\OutputInterface
     */
    private $symfonyOutput;
    /**
     * @var \PHPStan\Command\OutputStyle
     */
    private $style;
    public function __construct(OutputInterface $symfonyOutput, OutputStyle $style)
    {
        $this->symfonyOutput = $symfonyOutput;
        $this->style = $style;
    }
    public function writeFormatted(string $message) : void
    {
        $this->symfonyOutput->write($message, \false, OutputInterface::OUTPUT_NORMAL);
    }
    public function writeLineFormatted(string $message) : void
    {
        $this->symfonyOutput->writeln($message, OutputInterface::OUTPUT_NORMAL);
    }
    public function writeRaw(string $message) : void
    {
        $this->symfonyOutput->write($message, \false, OutputInterface::OUTPUT_RAW);
    }
    public function getStyle() : OutputStyle
    {
        return $this->style;
    }
    public function isVerbose() : bool
    {
        return $this->symfonyOutput->isVerbose();
    }
    public function isDebug() : bool
    {
        return $this->symfonyOutput->isDebug();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Command\Symfony;

use PHPStan\Command\OutputStyle;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Style\StyleInterface;
/**
 * @internal
 */
class SymfonyStyle implements OutputStyle
{
    /**
     * @var \Symfony\Component\Console\Style\StyleInterface
     */
    private $symfonyStyle;
    public function __construct(StyleInterface $symfonyStyle)
    {
        $this->symfonyStyle = $symfonyStyle;
    }
    public function getSymfonyStyle() : StyleInterface
    {
        return $this->symfonyStyle;
    }
    public function title(string $message) : void
    {
        $this->symfonyStyle->title($message);
    }
    public function section(string $message) : void
    {
        $this->symfonyStyle->section($message);
    }
    public function listing(array $elements) : void
    {
        $this->symfonyStyle->listing($elements);
    }
    public function success(string $message) : void
    {
        $this->symfonyStyle->success($message);
    }
    public function error(string $message) : void
    {
        $this->symfonyStyle->error($message);
    }
    public function warning(string $message) : void
    {
        $this->symfonyStyle->warning($message);
    }
    public function note(string $message) : void
    {
        $this->symfonyStyle->note($message);
    }
    public function caution(string $message) : void
    {
        $this->symfonyStyle->caution($message);
    }
    public function table(array $headers, array $rows) : void
    {
        $this->symfonyStyle->table($headers, $rows);
    }
    public function newLine(int $count = 1) : void
    {
        $this->symfonyStyle->newLine($count);
    }
    public function progressStart(int $max = 0) : void
    {
        $this->symfonyStyle->progressStart($max);
    }
    public function progressAdvance(int $step = 1) : void
    {
        $this->symfonyStyle->progressAdvance($step);
    }
    public function progressFinish() : void
    {
        $this->symfonyStyle->progressFinish();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Command;

/** @api */
interface Output
{
    public function writeFormatted(string $message) : void;
    public function writeLineFormatted(string $message) : void;
    public function writeRaw(string $message) : void;
    public function getStyle() : \PHPStan\Command\OutputStyle;
    public function isVerbose() : bool;
    public function isDebug() : bool;
}
<?php

declare (strict_types=1);
namespace PHPStan\Command;

use PHPStan\Analyser\ResultCache\ResultCacheClearer;
use PHPStan\ShouldNotHappenException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\Command;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputOption;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
use function is_string;
class ClearResultCacheCommand extends Command
{
    private const NAME = 'clear-result-cache';
    /**
     * @var string[]
     */
    private $composerAutoloaderProjectPaths;
    /**
     * @param string[] $composerAutoloaderProjectPaths
     */
    public function __construct(array $composerAutoloaderProjectPaths)
    {
        $this->composerAutoloaderProjectPaths = $composerAutoloaderProjectPaths;
        parent::__construct();
    }
    protected function configure() : void
    {
        $this->setName(self::NAME)->setDescription('Clears the result cache.')->setDefinition([new InputOption('configuration', 'c', InputOption::VALUE_REQUIRED, 'Path to project configuration file'), new InputOption('autoload-file', 'a', InputOption::VALUE_REQUIRED, 'Project\'s additional autoload file path'), new InputOption('debug', null, InputOption::VALUE_NONE, 'Show debug information - which file is analysed, do not catch internal errors'), new InputOption('memory-limit', null, InputOption::VALUE_REQUIRED, 'Memory limit for clearing result cache')]);
    }
    protected function initialize(InputInterface $input, OutputInterface $output) : void
    {
        if ((bool) $input->getOption('debug')) {
            $application = $this->getApplication();
            if ($application === null) {
                throw new ShouldNotHappenException();
            }
            $application->setCatchExceptions(\false);
            return;
        }
    }
    protected function execute(InputInterface $input, OutputInterface $output) : int
    {
        $autoloadFile = $input->getOption('autoload-file');
        $configuration = $input->getOption('configuration');
        $memoryLimit = $input->getOption('memory-limit');
        $debugEnabled = (bool) $input->getOption('debug');
        if (!is_string($autoloadFile) && $autoloadFile !== null || !is_string($configuration) && $configuration !== null || !is_string($memoryLimit) && $memoryLimit !== null) {
            throw new ShouldNotHappenException();
        }
        try {
            $inceptionResult = \PHPStan\Command\CommandHelper::begin($input, $output, ['.'], $memoryLimit, $autoloadFile, $this->composerAutoloaderProjectPaths, $configuration, null, '0', \false, $debugEnabled);
        } catch (\PHPStan\Command\InceptionNotSuccessfulException $exception) {
            return 1;
        }
        $container = $inceptionResult->getContainer();
        $resultCacheClearer = $container->getByType(ResultCacheClearer::class);
        $path = $resultCacheClearer->clear();
        $output->writeln('<info>Result cache cleared from directory:</info>');
        $output->writeln($path);
        return 0;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Command\ErrorFormatter;

use PHPStan\Analyser\Error;
use PHPStan\Command\AnalysisResult;
use PHPStan\Command\Output;
use PHPStan\File\RelativePathHelper;
use function count;
use function htmlspecialchars;
use function sprintf;
use const ENT_COMPAT;
use const ENT_XML1;
class CheckstyleErrorFormatter implements \PHPStan\Command\ErrorFormatter\ErrorFormatter
{
    /**
     * @var \PHPStan\File\RelativePathHelper
     */
    private $relativePathHelper;
    public function __construct(RelativePathHelper $relativePathHelper)
    {
        $this->relativePathHelper = $relativePathHelper;
    }
    public function formatErrors(AnalysisResult $analysisResult, Output $output) : int
    {
        $output->writeRaw('<?xml version="1.0" encoding="UTF-8"?>');
        $output->writeLineFormatted('');
        $output->writeRaw('<checkstyle>');
        $output->writeLineFormatted('');
        foreach ($this->groupByFile($analysisResult) as $relativeFilePath => $errors) {
            $output->writeRaw(sprintf('<file name="%s">', $this->escape($relativeFilePath)));
            $output->writeLineFormatted('');
            foreach ($errors as $error) {
                $output->writeRaw(sprintf('  <error line="%d" column="1" severity="error" message="%s" />', $this->escape((string) $error->getLine()), $this->escape($error->getMessage())));
                $output->writeLineFormatted('');
            }
            $output->writeRaw('</file>');
            $output->writeLineFormatted('');
        }
        $notFileSpecificErrors = $analysisResult->getNotFileSpecificErrors();
        if (count($notFileSpecificErrors) > 0) {
            $output->writeRaw('<file>');
            $output->writeLineFormatted('');
            foreach ($notFileSpecificErrors as $error) {
                $output->writeRaw(sprintf('  <error severity="error" message="%s" />', $this->escape($error)));
                $output->writeLineFormatted('');
            }
            $output->writeRaw('</file>');
            $output->writeLineFormatted('');
        }
        if ($analysisResult->hasWarnings()) {
            $output->writeRaw('<file>');
            $output->writeLineFormatted('');
            foreach ($analysisResult->getWarnings() as $warning) {
                $output->writeRaw(sprintf('  <error severity="warning" message="%s" />', $this->escape($warning)));
                $output->writeLineFormatted('');
            }
            $output->writeRaw('</file>');
            $output->writeLineFormatted('');
        }
        $output->writeRaw('</checkstyle>');
        $output->writeLineFormatted('');
        return $analysisResult->hasErrors() ? 1 : 0;
    }
    /**
     * Escapes values for using in XML
     *
     */
    private function escape(string $string) : string
    {
        return htmlspecialchars($string, ENT_XML1 | ENT_COMPAT, 'UTF-8');
    }
    /**
     * Group errors by file
     *
     * @return array<string, array<Error>> Array that have as key the relative path of file
     * and as value an array with occurred errors.
     */
    private function groupByFile(AnalysisResult $analysisResult) : array
    {
        $files = [];
        /** @var Error $fileSpecificError */
        foreach ($analysisResult->getFileSpecificErrors() as $fileSpecificError) {
            $absolutePath = $fileSpecificError->getFilePath();
            if ($fileSpecificError->getTraitFilePath() !== null) {
                $absolutePath = $fileSpecificError->getTraitFilePath();
            }
            $relativeFilePath = $this->relativePathHelper->getRelativePath($absolutePath);
            $files[$relativeFilePath][] = $fileSpecificError;
        }
        return $files;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Command\ErrorFormatter;

use PHPStan\Command\AnalysisResult;
use PHPStan\Command\Output;
use PHPStan\File\RelativePathHelper;
use function array_walk;
use function implode;
use function sprintf;
use function str_replace;
/**
 * Allow errors to be reported in pull-requests diff when run in a GitHub Action
 * @see https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
 */
class GithubErrorFormatter implements \PHPStan\Command\ErrorFormatter\ErrorFormatter
{
    /**
     * @var \PHPStan\File\RelativePathHelper
     */
    private $relativePathHelper;
    public function __construct(RelativePathHelper $relativePathHelper)
    {
        $this->relativePathHelper = $relativePathHelper;
    }
    public function formatErrors(AnalysisResult $analysisResult, Output $output) : int
    {
        foreach ($analysisResult->getFileSpecificErrors() as $fileSpecificError) {
            $metas = ['file' => $this->relativePathHelper->getRelativePath($fileSpecificError->getFile()), 'line' => $fileSpecificError->getLine(), 'col' => 0];
            array_walk($metas, static function (&$value, string $key) : void {
                $value = sprintf('%s=%s', $key, (string) $value);
            });
            $message = $fileSpecificError->getMessage();
            // newlines need to be encoded
            // see https://github.com/actions/starter-workflows/issues/68#issuecomment-581479448
            $message = str_replace("\n", '%0A', $message);
            $line = sprintf('::error %s::%s', implode(',', $metas), $message);
            $output->writeRaw($line);
            $output->writeLineFormatted('');
        }
        foreach ($analysisResult->getNotFileSpecificErrors() as $notFileSpecificError) {
            // newlines need to be encoded
            // see https://github.com/actions/starter-workflows/issues/68#issuecomment-581479448
            $notFileSpecificError = str_replace("\n", '%0A', $notFileSpecificError);
            $line = sprintf('::error ::%s', $notFileSpecificError);
            $output->writeRaw($line);
            $output->writeLineFormatted('');
        }
        foreach ($analysisResult->getWarnings() as $warning) {
            // newlines need to be encoded
            // see https://github.com/actions/starter-workflows/issues/68#issuecomment-581479448
            $warning = str_replace("\n", '%0A', $warning);
            $line = sprintf('::warning ::%s', $warning);
            $output->writeRaw($line);
            $output->writeLineFormatted('');
        }
        return $analysisResult->hasErrors() ? 1 : 0;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Command\ErrorFormatter;

use PHPStan\Analyser\Error;
use PHPStan\Command\AnalyseCommand;
use PHPStan\Command\AnalysisResult;
use PHPStan\Command\Output;
use PHPStan\File\RelativePathHelper;
use PHPStan\File\SimpleRelativePathHelper;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter\OutputFormatter;
use function array_map;
use function count;
use function explode;
use function getenv;
use function is_string;
use function ltrim;
use function sprintf;
use function str_contains;
use function str_replace;
class TableErrorFormatter implements \PHPStan\Command\ErrorFormatter\ErrorFormatter
{
    /**
     * @var \PHPStan\File\RelativePathHelper
     */
    private $relativePathHelper;
    /**
     * @var \PHPStan\File\SimpleRelativePathHelper
     */
    private $simpleRelativePathHelper;
    /**
     * @var \PHPStan\Command\ErrorFormatter\CiDetectedErrorFormatter
     */
    private $ciDetectedErrorFormatter;
    /**
     * @var bool
     */
    private $showTipsOfTheDay;
    /**
     * @var string|null
     */
    private $editorUrl;
    /**
     * @var string|null
     */
    private $editorUrlTitle;
    public function __construct(RelativePathHelper $relativePathHelper, SimpleRelativePathHelper $simpleRelativePathHelper, \PHPStan\Command\ErrorFormatter\CiDetectedErrorFormatter $ciDetectedErrorFormatter, bool $showTipsOfTheDay, ?string $editorUrl, ?string $editorUrlTitle)
    {
        $this->relativePathHelper = $relativePathHelper;
        $this->simpleRelativePathHelper = $simpleRelativePathHelper;
        $this->ciDetectedErrorFormatter = $ciDetectedErrorFormatter;
        $this->showTipsOfTheDay = $showTipsOfTheDay;
        $this->editorUrl = $editorUrl;
        $this->editorUrlTitle = $editorUrlTitle;
    }
    /** @api */
    public function formatErrors(AnalysisResult $analysisResult, Output $output) : int
    {
        $this->ciDetectedErrorFormatter->formatErrors($analysisResult, $output);
        $projectConfigFile = 'phpstan.neon';
        if ($analysisResult->getProjectConfigFile() !== null) {
            $projectConfigFile = $this->relativePathHelper->getRelativePath($analysisResult->getProjectConfigFile());
        }
        $style = $output->getStyle();
        if (!$analysisResult->hasErrors() && !$analysisResult->hasWarnings()) {
            $style->success('No errors');
            if ($this->showTipsOfTheDay) {
                if ($analysisResult->isDefaultLevelUsed()) {
                    $output->writeLineFormatted('💡 Tip of the Day:');
                    $output->writeLineFormatted(sprintf("PHPStan is performing only the most basic checks.\nYou can pass a higher rule level through the <fg=cyan>--%s</> option\n(the default and current level is %d) to analyse code more thoroughly.", AnalyseCommand::OPTION_LEVEL, AnalyseCommand::DEFAULT_LEVEL));
                    $output->writeLineFormatted('');
                }
            }
            return 0;
        }
        /** @var array<string, Error[]> $fileErrors */
        $fileErrors = [];
        foreach ($analysisResult->getFileSpecificErrors() as $fileSpecificError) {
            if (!isset($fileErrors[$fileSpecificError->getFile()])) {
                $fileErrors[$fileSpecificError->getFile()] = [];
            }
            $fileErrors[$fileSpecificError->getFile()][] = $fileSpecificError;
        }
        foreach ($fileErrors as $file => $errors) {
            $rows = [];
            foreach ($errors as $error) {
                $message = $error->getMessage();
                if ($error->getTip() !== null) {
                    $tip = $error->getTip();
                    $tip = str_replace('%configurationFile%', $projectConfigFile, $tip);
                    $message .= "\n";
                    if (str_contains($tip, "\n")) {
                        $lines = explode("\n", $tip);
                        foreach ($lines as $line) {
                            $message .= '💡 ' . ltrim($line, ' •') . "\n";
                        }
                    } else {
                        $message .= '💡 ' . $tip;
                    }
                }
                if (is_string($this->editorUrl)) {
                    $editorFile = $error->getTraitFilePath() ?? $error->getFilePath();
                    $url = str_replace(['%file%', '%relFile%', '%line%'], [$editorFile, $this->simpleRelativePathHelper->getRelativePath($editorFile), (string) $error->getLine()], $this->editorUrl);
                    if (is_string($this->editorUrlTitle)) {
                        $title = str_replace(['%file%', '%relFile%', '%line%'], [$editorFile, $this->simpleRelativePathHelper->getRelativePath($editorFile), (string) $error->getLine()], $this->editorUrlTitle);
                    } else {
                        $title = $this->relativePathHelper->getRelativePath($editorFile);
                    }
                    $message .= "\n✏️  <href=" . OutputFormatter::escape($url) . '>' . $title . '</>';
                }
                $rows[] = [$this->formatLineNumber($error->getLine()), $message];
            }
            $style->table(['Line', $this->relativePathHelper->getRelativePath($file)], $rows);
        }
        if (count($analysisResult->getNotFileSpecificErrors()) > 0) {
            $style->table(['', 'Error'], array_map(static function (string $error) : array {
                return ['', $error];
            }, $analysisResult->getNotFileSpecificErrors()));
        }
        $warningsCount = count($analysisResult->getWarnings());
        if ($warningsCount > 0) {
            $style->table(['', 'Warning'], array_map(static function (string $warning) : array {
                return ['', $warning];
            }, $analysisResult->getWarnings()));
        }
        $finalMessage = sprintf($analysisResult->getTotalErrorsCount() === 1 ? 'Found %d error' : 'Found %d errors', $analysisResult->getTotalErrorsCount());
        if ($warningsCount > 0) {
            $finalMessage .= sprintf($warningsCount === 1 ? ' and %d warning' : ' and %d warnings', $warningsCount);
        }
        if ($analysisResult->getTotalErrorsCount() > 0) {
            $style->error($finalMessage);
        } else {
            $style->warning($finalMessage);
        }
        return $analysisResult->getTotalErrorsCount() > 0 ? 1 : 0;
    }
    private function formatLineNumber(?int $lineNumber) : string
    {
        if ($lineNumber === null) {
            return '';
        }
        $isRunningInVSCodeTerminal = getenv('TERM_PROGRAM') === 'vscode';
        if ($isRunningInVSCodeTerminal) {
            return ':' . $lineNumber;
        }
        return (string) $lineNumber;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Command\ErrorFormatter;

use _PHPStan_dcc7b7cff\Nette\Utils\Json;
use PHPStan\Command\AnalysisResult;
use PHPStan\Command\Output;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Formatter\OutputFormatter;
use function array_key_exists;
use function count;
class JsonErrorFormatter implements \PHPStan\Command\ErrorFormatter\ErrorFormatter
{
    /**
     * @var bool
     */
    private $pretty;
    public function __construct(bool $pretty)
    {
        $this->pretty = $pretty;
    }
    public function formatErrors(AnalysisResult $analysisResult, Output $output) : int
    {
        $errorsArray = ['totals' => ['errors' => count($analysisResult->getNotFileSpecificErrors()), 'file_errors' => count($analysisResult->getFileSpecificErrors())], 'files' => [], 'errors' => []];
        $tipFormatter = new OutputFormatter(\false);
        foreach ($analysisResult->getFileSpecificErrors() as $fileSpecificError) {
            $file = $fileSpecificError->getFile();
            if (!array_key_exists($file, $errorsArray['files'])) {
                $errorsArray['files'][$file] = ['errors' => 0, 'messages' => []];
            }
            $errorsArray['files'][$file]['errors']++;
            $message = ['message' => $fileSpecificError->getMessage(), 'line' => $fileSpecificError->getLine(), 'ignorable' => $fileSpecificError->canBeIgnored()];
            if ($fileSpecificError->getTip() !== null) {
                $message['tip'] = $tipFormatter->format($fileSpecificError->getTip());
            }
            if ($fileSpecificError->getIdentifier() !== null) {
                $message['identifier'] = $fileSpecificError->getIdentifier();
            }
            $errorsArray['files'][$file]['messages'][] = $message;
        }
        foreach ($analysisResult->getNotFileSpecificErrors() as $notFileSpecificError) {
            $errorsArray['errors'][] = $notFileSpecificError;
        }
        $json = Json::encode($errorsArray, $this->pretty ? Json::PRETTY : 0);
        $output->writeRaw($json);
        return $analysisResult->hasErrors() ? 1 : 0;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Command\ErrorFormatter;

use PHPStan\Command\AnalysisResult;
use PHPStan\Command\Output;
use PHPStan\File\RelativePathHelper;
use function array_keys;
use function array_values;
use function count;
use function is_string;
use function preg_replace;
use const PHP_EOL;
/**
 * @see https://www.jetbrains.com/help/teamcity/build-script-interaction-with-teamcity.html#Reporting+Inspections
 */
class TeamcityErrorFormatter implements \PHPStan\Command\ErrorFormatter\ErrorFormatter
{
    /**
     * @var \PHPStan\File\RelativePathHelper
     */
    private $relativePathHelper;
    public function __construct(RelativePathHelper $relativePathHelper)
    {
        $this->relativePathHelper = $relativePathHelper;
    }
    public function formatErrors(AnalysisResult $analysisResult, Output $output) : int
    {
        $result = '';
        $fileSpecificErrors = $analysisResult->getFileSpecificErrors();
        $notFileSpecificErrors = $analysisResult->getNotFileSpecificErrors();
        $warnings = $analysisResult->getWarnings();
        if (count($fileSpecificErrors) === 0 && count($notFileSpecificErrors) === 0 && count($warnings) === 0) {
            return 0;
        }
        $result .= $this->createTeamcityLine('inspectionType', ['id' => 'phpstan', 'name' => 'phpstan', 'category' => 'phpstan', 'description' => 'phpstan Inspection']);
        foreach ($fileSpecificErrors as $fileSpecificError) {
            $result .= $this->createTeamcityLine('inspection', [
                'typeId' => 'phpstan',
                'message' => $fileSpecificError->getMessage(),
                'file' => $this->relativePathHelper->getRelativePath($fileSpecificError->getFile()),
                'line' => $fileSpecificError->getLine(),
                // additional attributes
                'SEVERITY' => 'ERROR',
                'ignorable' => $fileSpecificError->canBeIgnored(),
                'tip' => $fileSpecificError->getTip(),
            ]);
        }
        foreach ($notFileSpecificErrors as $notFileSpecificError) {
            $result .= $this->createTeamcityLine('inspection', [
                'typeId' => 'phpstan',
                'message' => $notFileSpecificError,
                // the file is required
                'file' => $analysisResult->getProjectConfigFile() !== null ? $this->relativePathHelper->getRelativePath($analysisResult->getProjectConfigFile()) : '.',
                'SEVERITY' => 'ERROR',
            ]);
        }
        foreach ($warnings as $warning) {
            $result .= $this->createTeamcityLine('inspection', [
                'typeId' => 'phpstan',
                'message' => $warning,
                // the file is required
                'file' => $analysisResult->getProjectConfigFile() !== null ? $this->relativePathHelper->getRelativePath($analysisResult->getProjectConfigFile()) : '.',
                'SEVERITY' => 'WARNING',
            ]);
        }
        $output->writeRaw($result);
        return $analysisResult->hasErrors() ? 1 : 0;
    }
    /**
     * Creates a Teamcity report line
     *
     * @param string $messageName The message name
     * @param mixed[] $keyValuePairs The key=>value pairs
     * @return string The Teamcity report line
     */
    private function createTeamcityLine(string $messageName, array $keyValuePairs) : string
    {
        $string = '##teamcity[' . $messageName;
        foreach ($keyValuePairs as $key => $value) {
            if (is_string($value)) {
                $value = $this->escape($value);
            }
            $string .= ' ' . $key . '=\'' . $value . '\'';
        }
        return $string . ']' . PHP_EOL;
    }
    /**
     * Escapes the given string for Teamcity output
     *
     * @param string $string The string to escape
     * @return string The escaped string
     */
    private function escape(string $string) : string
    {
        $replacements = ['~\\n~' => '|n', '~\\r~' => '|r', '~([\'\\|\\[\\]])~' => '|$1'];
        return (string) preg_replace(array_keys($replacements), array_values($replacements), $string);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Command\ErrorFormatter;

use PHPStan\Command\AnalysisResult;
use PHPStan\Command\Output;
use PHPStan\File\RelativePathHelper;
use function htmlspecialchars;
use function sprintf;
use const ENT_COMPAT;
use const ENT_XML1;
class JunitErrorFormatter implements \PHPStan\Command\ErrorFormatter\ErrorFormatter
{
    /**
     * @var \PHPStan\File\RelativePathHelper
     */
    private $relativePathHelper;
    public function __construct(RelativePathHelper $relativePathHelper)
    {
        $this->relativePathHelper = $relativePathHelper;
    }
    public function formatErrors(AnalysisResult $analysisResult, Output $output) : int
    {
        $totalFailuresCount = $analysisResult->getTotalErrorsCount();
        $totalTestsCount = $analysisResult->hasErrors() ? $totalFailuresCount : 1;
        $result = '<?xml version="1.0" encoding="UTF-8"?>';
        $result .= sprintf('<testsuite failures="%d" name="phpstan" tests="%d" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/junit-team/junit5/r5.5.1/platform-tests/src/test/resources/jenkins-junit.xsd">', $totalFailuresCount, $totalTestsCount);
        foreach ($analysisResult->getFileSpecificErrors() as $fileSpecificError) {
            $fileName = $this->relativePathHelper->getRelativePath($fileSpecificError->getFile());
            $result .= $this->createTestCase(sprintf('%s:%s', $fileName, (string) $fileSpecificError->getLine()), 'ERROR', $this->escape($fileSpecificError->getMessage()));
        }
        foreach ($analysisResult->getNotFileSpecificErrors() as $notFileSpecificError) {
            $result .= $this->createTestCase('General error', 'ERROR', $this->escape($notFileSpecificError));
        }
        foreach ($analysisResult->getWarnings() as $warning) {
            $result .= $this->createTestCase('Warning', 'WARNING', $this->escape($warning));
        }
        if (!$analysisResult->hasErrors()) {
            $result .= $this->createTestCase('phpstan', '');
        }
        $result .= '</testsuite>';
        $output->writeRaw($result);
        return $analysisResult->hasErrors() ? 1 : 0;
    }
    /**
     * Format a single test case
     *
     *
     */
    private function createTestCase(string $reference, string $type, ?string $message = null) : string
    {
        $result = sprintf('<testcase name="%s">', $this->escape($reference));
        if ($message !== null) {
            $result .= sprintf('<failure type="%s" message="%s" />', $this->escape($type), $this->escape($message));
        }
        $result .= '</testcase>';
        return $result;
    }
    /**
     * Escapes values for using in XML
     *
     */
    private function escape(string $string) : string
    {
        return htmlspecialchars($string, ENT_XML1 | ENT_COMPAT, 'UTF-8');
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Command\ErrorFormatter;

use _PHPStan_dcc7b7cff\Nette\Utils\Json;
use PHPStan\Command\AnalysisResult;
use PHPStan\Command\Output;
use PHPStan\File\RelativePathHelper;
use function hash;
use function implode;
/**
 * @see https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html#implementing-a-custom-tool
 */
class GitlabErrorFormatter implements \PHPStan\Command\ErrorFormatter\ErrorFormatter
{
    /**
     * @var \PHPStan\File\RelativePathHelper
     */
    private $relativePathHelper;
    public function __construct(RelativePathHelper $relativePathHelper)
    {
        $this->relativePathHelper = $relativePathHelper;
    }
    public function formatErrors(AnalysisResult $analysisResult, Output $output) : int
    {
        $errorsArray = [];
        foreach ($analysisResult->getFileSpecificErrors() as $fileSpecificError) {
            $error = ['description' => $fileSpecificError->getMessage(), 'fingerprint' => hash('sha256', implode([$fileSpecificError->getFile(), $fileSpecificError->getLine(), $fileSpecificError->getMessage()])), 'severity' => $fileSpecificError->canBeIgnored() ? 'major' : 'blocker', 'location' => ['path' => $this->relativePathHelper->getRelativePath($fileSpecificError->getFile()), 'lines' => ['begin' => $fileSpecificError->getLine() ?? 0]]];
            $errorsArray[] = $error;
        }
        foreach ($analysisResult->getNotFileSpecificErrors() as $notFileSpecificError) {
            $errorsArray[] = ['description' => $notFileSpecificError, 'fingerprint' => hash('sha256', $notFileSpecificError), 'severity' => 'major', 'location' => ['path' => '', 'lines' => ['begin' => 0]]];
        }
        $json = Json::encode($errorsArray, Json::PRETTY);
        $output->writeRaw($json);
        return $analysisResult->hasErrors() ? 1 : 0;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Command\ErrorFormatter;

use _PHPStan_dcc7b7cff\Nette\DI\Helpers;
use _PHPStan_dcc7b7cff\Nette\Neon\Neon;
use _PHPStan_dcc7b7cff\Nette\Utils\Strings;
use PHPStan\Command\AnalysisResult;
use PHPStan\Command\Output;
use PHPStan\File\RelativePathHelper;
use PHPStan\ShouldNotHappenException;
use function ksort;
use function preg_quote;
use function substr;
use const SORT_STRING;
class BaselineNeonErrorFormatter
{
    /**
     * @var \PHPStan\File\RelativePathHelper
     */
    private $relativePathHelper;
    public function __construct(RelativePathHelper $relativePathHelper)
    {
        $this->relativePathHelper = $relativePathHelper;
    }
    public function formatErrors(AnalysisResult $analysisResult, Output $output, string $existingBaselineContent) : int
    {
        if (!$analysisResult->hasErrors()) {
            $output->writeRaw($this->getNeon([], $existingBaselineContent));
            return 0;
        }
        $fileErrors = [];
        foreach ($analysisResult->getFileSpecificErrors() as $fileSpecificError) {
            if (!$fileSpecificError->canBeIgnored()) {
                continue;
            }
            $fileErrors[$this->relativePathHelper->getRelativePath($fileSpecificError->getFilePath())][] = $fileSpecificError->getMessage();
        }
        ksort($fileErrors, SORT_STRING);
        $errorsToOutput = [];
        foreach ($fileErrors as $file => $errorMessages) {
            $fileErrorsCounts = [];
            foreach ($errorMessages as $errorMessage) {
                if (!isset($fileErrorsCounts[$errorMessage])) {
                    $fileErrorsCounts[$errorMessage] = 1;
                    continue;
                }
                $fileErrorsCounts[$errorMessage]++;
            }
            ksort($fileErrorsCounts, SORT_STRING);
            foreach ($fileErrorsCounts as $message => $count) {
                $errorsToOutput[] = ['message' => Helpers::escape('#^' . preg_quote($message, '#') . '$#'), 'count' => $count, 'path' => Helpers::escape($file)];
            }
        }
        $output->writeRaw($this->getNeon($errorsToOutput, $existingBaselineContent));
        return 1;
    }
    /**
     * @param array<int, array{message: string, count: int, path: string}> $ignoreErrors
     */
    private function getNeon(array $ignoreErrors, string $existingBaselineContent) : string
    {
        $neon = Neon::encode(['parameters' => ['ignoreErrors' => $ignoreErrors]], Neon::BLOCK);
        if (substr($neon, -2) !== "\n\n") {
            throw new ShouldNotHappenException();
        }
        if ($existingBaselineContent === '') {
            return substr($neon, 0, -1);
        }
        $existingBaselineContentEndOfFileNewlinesMatches = Strings::match($existingBaselineContent, "~(\n)+\$~");
        $existingBaselineContentEndOfFileNewlines = $existingBaselineContentEndOfFileNewlinesMatches !== null ? $existingBaselineContentEndOfFileNewlinesMatches[0] : '';
        return substr($neon, 0, -2) . $existingBaselineContentEndOfFileNewlines;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Command\ErrorFormatter;

use _PHPStan_dcc7b7cff\Nette\DI\Helpers;
use PHPStan\Command\AnalysisResult;
use PHPStan\Command\Output;
use PHPStan\File\RelativePathHelper;
use function ksort;
use function preg_quote;
use function sprintf;
use function var_export;
use const SORT_STRING;
class BaselinePhpErrorFormatter
{
    /**
     * @var \PHPStan\File\RelativePathHelper
     */
    private $relativePathHelper;
    public function __construct(RelativePathHelper $relativePathHelper)
    {
        $this->relativePathHelper = $relativePathHelper;
    }
    public function formatErrors(AnalysisResult $analysisResult, Output $output) : int
    {
        if (!$analysisResult->hasErrors()) {
            $php = '<?php declare(strict_types = 1);';
            $php .= "\n\n";
            $php .= 'return [];';
            $php .= "\n";
            $output->writeRaw($php);
            return 0;
        }
        $fileErrors = [];
        foreach ($analysisResult->getFileSpecificErrors() as $fileSpecificError) {
            if (!$fileSpecificError->canBeIgnored()) {
                continue;
            }
            $fileErrors['/' . $this->relativePathHelper->getRelativePath($fileSpecificError->getFilePath())][] = $fileSpecificError->getMessage();
        }
        ksort($fileErrors, SORT_STRING);
        $php = '<?php declare(strict_types = 1);';
        $php .= "\n\n";
        $php .= '$ignoreErrors = [];';
        $php .= "\n";
        foreach ($fileErrors as $file => $errorMessages) {
            $fileErrorsCounts = [];
            foreach ($errorMessages as $errorMessage) {
                if (!isset($fileErrorsCounts[$errorMessage])) {
                    $fileErrorsCounts[$errorMessage] = 1;
                    continue;
                }
                $fileErrorsCounts[$errorMessage]++;
            }
            ksort($fileErrorsCounts, SORT_STRING);
            foreach ($fileErrorsCounts as $message => $count) {
                $php .= sprintf("\$ignoreErrors[] = [\n\t'message' => %s,\n\t'count' => %d,\n\t'path' => __DIR__ . %s,\n];\n", var_export(Helpers::escape('#^' . preg_quote($message, '#') . '$#'), \true), var_export($count, \true), var_export(Helpers::escape($file), \true));
            }
        }
        $php .= "\n";
        $php .= 'return [\'parameters\' => [\'ignoreErrors\' => $ignoreErrors]];';
        $php .= "\n";
        $output->writeRaw($php);
        return 1;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Command\ErrorFormatter;

use _PHPStan_dcc7b7cff\OndraM\CiDetector\CiDetector;
use _PHPStan_dcc7b7cff\OndraM\CiDetector\Exception\CiNotDetectedException;
use PHPStan\Command\AnalysisResult;
use PHPStan\Command\Output;
/** @api */
class CiDetectedErrorFormatter implements \PHPStan\Command\ErrorFormatter\ErrorFormatter
{
    /**
     * @var \PHPStan\Command\ErrorFormatter\GithubErrorFormatter
     */
    private $githubErrorFormatter;
    /**
     * @var \PHPStan\Command\ErrorFormatter\TeamcityErrorFormatter
     */
    private $teamcityErrorFormatter;
    public function __construct(\PHPStan\Command\ErrorFormatter\GithubErrorFormatter $githubErrorFormatter, \PHPStan\Command\ErrorFormatter\TeamcityErrorFormatter $teamcityErrorFormatter)
    {
        $this->githubErrorFormatter = $githubErrorFormatter;
        $this->teamcityErrorFormatter = $teamcityErrorFormatter;
    }
    public function formatErrors(AnalysisResult $analysisResult, Output $output) : int
    {
        $ciDetector = new CiDetector();
        try {
            $ci = $ciDetector->detect();
            if ($ci->getCiName() === CiDetector::CI_GITHUB_ACTIONS) {
                return $this->githubErrorFormatter->formatErrors($analysisResult, $output);
            } elseif ($ci->getCiName() === CiDetector::CI_TEAMCITY) {
                return $this->teamcityErrorFormatter->formatErrors($analysisResult, $output);
            }
        } catch (CiNotDetectedException $exception) {
            // pass
        }
        if (!$analysisResult->hasErrors() && !$analysisResult->hasWarnings()) {
            return 0;
        }
        return $analysisResult->getTotalErrorsCount() > 0 ? 1 : 0;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Command\ErrorFormatter;

use PHPStan\Command\AnalysisResult;
use PHPStan\Command\Output;
/**
 * This is the interface custom error formatters implement. Register it in the configuration file
 * like this:
 *
 * ```
 * services:
 * 	errorFormatter.myFormat:
 *		class: App\PHPStan\AwesomeErrorFormatter
 * ```
 *
 * Learn more: https://phpstan.org/developing-extensions/error-formatters
 *
 * @api
 */
interface ErrorFormatter
{
    /**
     * Formats the errors and outputs them to the console.
     *
     * @return int Error code.
     */
    public function formatErrors(AnalysisResult $analysisResult, Output $output) : int;
}
<?php

declare (strict_types=1);
namespace PHPStan\Command\ErrorFormatter;

use PHPStan\Command\AnalysisResult;
use PHPStan\Command\Output;
use function sprintf;
class RawErrorFormatter implements \PHPStan\Command\ErrorFormatter\ErrorFormatter
{
    public function formatErrors(AnalysisResult $analysisResult, Output $output) : int
    {
        foreach ($analysisResult->getNotFileSpecificErrors() as $notFileSpecificError) {
            $output->writeRaw(sprintf('?:?:%s', $notFileSpecificError));
            $output->writeLineFormatted('');
        }
        foreach ($analysisResult->getFileSpecificErrors() as $fileSpecificError) {
            $output->writeRaw(sprintf('%s:%d:%s', $fileSpecificError->getFile(), $fileSpecificError->getLine() ?? '?', $fileSpecificError->getMessage()));
            $output->writeLineFormatted('');
        }
        foreach ($analysisResult->getWarnings() as $warning) {
            $output->writeRaw(sprintf('?:?:%s', $warning));
            $output->writeLineFormatted('');
        }
        return $analysisResult->hasErrors() ? 1 : 0;
    }
}
-----BEGIN PUBLIC KEY-----
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAs+kHoHhs66QaDeVmF6zb
kqgEafJTHVsKraOJp64zLlrIZhEiBjKnl5EwpIvvPOfgjjI9z9zm0Y8IoWMfNMf1
MN/9f7603vfJxTAdXVVPtTq4x3dKf1z8RdE9+04Nrfb/+OuAVCtDGCjKec9sRdce
4Ex499BfQx80njFoeC84eY39hNf82rhflW9OMCQeEZhv3durZV5q+tgp+2pdf0yw
sdIc/NYebZB1C0Cj6AfqbT9WoMAojfG8R5tF+4S3mMiDHNXx6hNM4mJEpyODje1A
qZW91T0x1rFWe25WWLtQG/VP1E+an03C8axn3Ag7+9gohE5hNRKfOWZLZsx+KivD
sivJSiyZEP6h6Mxp3aVYk9fmxyJnn0+tvPGYm3wZlPYp0SQIMeYooPr1ddERwtxm
4TyoQ6v8tg+7hrPu4I5km7X8uUzKFtLWj5CB+DVQycjzSbA3Wrj7EcXbKlx8hoyl
onQWCVNkSY75CuizY3YqGJr1lCYH7Gut/IAD+gT7CuqgU0PrsSE0c1yBI36Xz090
XZbT1h5UuhF1ezVv3GYSCSHuu3vHzoO4lrrIOmOdcPlSw+BuSy3WOpS9OIud4IwZ
UFbzJNs6cOZbnwz7lwBzXFkm3PXPlwXmlGUPF9S4My+F4hYONE4zxI4IcmeF6U43
JUX0xbD+LXNnezCLkvkcVjMCAwEAAQ==
-----END PUBLIC KEY-----
<?php

declare (strict_types=1);
namespace PHPStan\Command;

class IgnoredRegexValidatorResult
{
    /**
     * @var array<string, string>
     */
    private $ignoredTypes;
    /**
     * @var bool
     */
    private $anchorsInTheMiddle;
    /**
     * @var bool
     */
    private $allErrorsIgnored;
    /**
     * @var string|null
     */
    private $wrongSequence;
    /**
     * @var string|null
     */
    private $escapedWrongSequence;
    /**
     * @param array<string, string> $ignoredTypes
     */
    public function __construct(array $ignoredTypes, bool $anchorsInTheMiddle, bool $allErrorsIgnored, ?string $wrongSequence = null, ?string $escapedWrongSequence = null)
    {
        $this->ignoredTypes = $ignoredTypes;
        $this->anchorsInTheMiddle = $anchorsInTheMiddle;
        $this->allErrorsIgnored = $allErrorsIgnored;
        $this->wrongSequence = $wrongSequence;
        $this->escapedWrongSequence = $escapedWrongSequence;
    }
    /**
     * @return array<string, string>
     */
    public function getIgnoredTypes() : array
    {
        return $this->ignoredTypes;
    }
    public function hasAnchorsInTheMiddle() : bool
    {
        return $this->anchorsInTheMiddle;
    }
    public function areAllErrorsIgnored() : bool
    {
        return $this->allErrorsIgnored;
    }
    public function getWrongSequence() : ?string
    {
        return $this->wrongSequence;
    }
    public function getEscapedWrongSequence() : ?string
    {
        return $this->escapedWrongSequence;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Command;

use _PHPStan_dcc7b7cff\Nette\Neon\Neon;
use PHPStan\ShouldNotHappenException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\Command;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputOption;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
use function is_string;
class DumpParametersCommand extends Command
{
    private const NAME = 'dump-parameters';
    /**
     * @var string[]
     */
    private $composerAutoloaderProjectPaths;
    /**
     * @param string[] $composerAutoloaderProjectPaths
     */
    public function __construct(array $composerAutoloaderProjectPaths)
    {
        $this->composerAutoloaderProjectPaths = $composerAutoloaderProjectPaths;
        parent::__construct();
    }
    protected function configure() : void
    {
        $this->setName(self::NAME)->setDescription('Dumps all parameters')->setDefinition([new InputOption('configuration', 'c', InputOption::VALUE_REQUIRED, 'Path to project configuration file'), new InputOption(\PHPStan\Command\AnalyseCommand::OPTION_LEVEL, 'l', InputOption::VALUE_REQUIRED, 'Level of rule options - the higher the stricter'), new InputOption('autoload-file', 'a', InputOption::VALUE_REQUIRED, 'Project\'s additional autoload file path'), new InputOption('debug', null, InputOption::VALUE_NONE, 'Show debug information - which file is analysed, do not catch internal errors'), new InputOption('memory-limit', null, InputOption::VALUE_REQUIRED, 'Memory limit for clearing result cache')]);
    }
    protected function initialize(InputInterface $input, OutputInterface $output) : void
    {
        if ((bool) $input->getOption('debug')) {
            $application = $this->getApplication();
            if ($application === null) {
                throw new ShouldNotHappenException();
            }
            $application->setCatchExceptions(\false);
            return;
        }
    }
    protected function execute(InputInterface $input, OutputInterface $output) : int
    {
        $memoryLimit = $input->getOption('memory-limit');
        $autoloadFile = $input->getOption('autoload-file');
        $configuration = $input->getOption('configuration');
        $level = $input->getOption(\PHPStan\Command\AnalyseCommand::OPTION_LEVEL);
        if (!is_string($memoryLimit) && $memoryLimit !== null || !is_string($autoloadFile) && $autoloadFile !== null || !is_string($configuration) && $configuration !== null || !is_string($level) && $level !== null) {
            throw new ShouldNotHappenException();
        }
        try {
            $inceptionResult = \PHPStan\Command\CommandHelper::begin($input, $output, ['.'], $memoryLimit, $autoloadFile, $this->composerAutoloaderProjectPaths, $configuration, null, $level, \false);
        } catch (\PHPStan\Command\InceptionNotSuccessfulException $exception) {
            return 1;
        }
        $parameters = $inceptionResult->getContainer()->getParameters();
        // always set to '.'
        unset($parameters['analysedPaths']);
        // irrelevant Nette parameters
        unset($parameters['debugMode']);
        unset($parameters['productionMode']);
        unset($parameters['tempDir']);
        unset($parameters['__validate']);
        $output->writeln(Neon::encode($parameters, \true));
        return 0;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Command;

use PHPStan\DependencyInjection\Container;
use PHPStan\Internal\BytesHelper;
use function sprintf;
class InceptionResult
{
    /** @var callable(): (array{string[], bool}) */
    private $filesCallback;
    /**
     * @var \PHPStan\Command\Output
     */
    private $stdOutput;
    /**
     * @var \PHPStan\Command\Output
     */
    private $errorOutput;
    /**
     * @var \PHPStan\DependencyInjection\Container
     */
    private $container;
    /**
     * @var bool
     */
    private $isDefaultLevelUsed;
    /**
     * @var string|null
     */
    private $projectConfigFile;
    /**
     * @var mixed[]|null
     */
    private $projectConfigArray;
    /**
     * @var string|null
     */
    private $generateBaselineFile;
    /**
     * @param callable(): (array{string[], bool}) $filesCallback
     * @param mixed[]|null $projectConfigArray
     */
    public function __construct(callable $filesCallback, \PHPStan\Command\Output $stdOutput, \PHPStan\Command\Output $errorOutput, Container $container, bool $isDefaultLevelUsed, ?string $projectConfigFile, ?array $projectConfigArray, ?string $generateBaselineFile)
    {
        $this->stdOutput = $stdOutput;
        $this->errorOutput = $errorOutput;
        $this->container = $container;
        $this->isDefaultLevelUsed = $isDefaultLevelUsed;
        $this->projectConfigFile = $projectConfigFile;
        $this->projectConfigArray = $projectConfigArray;
        $this->generateBaselineFile = $generateBaselineFile;
        $this->filesCallback = $filesCallback;
    }
    /**
     * @return array{string[], bool}
     */
    public function getFiles() : array
    {
        $callback = $this->filesCallback;
        return $callback();
    }
    public function getStdOutput() : \PHPStan\Command\Output
    {
        return $this->stdOutput;
    }
    public function getErrorOutput() : \PHPStan\Command\Output
    {
        return $this->errorOutput;
    }
    public function getContainer() : Container
    {
        return $this->container;
    }
    public function isDefaultLevelUsed() : bool
    {
        return $this->isDefaultLevelUsed;
    }
    public function getProjectConfigFile() : ?string
    {
        return $this->projectConfigFile;
    }
    /**
     * @return mixed[]|null
     */
    public function getProjectConfigArray() : ?array
    {
        return $this->projectConfigArray;
    }
    public function getGenerateBaselineFile() : ?string
    {
        return $this->generateBaselineFile;
    }
    public function handleReturn(int $exitCode, ?int $peakMemoryUsageBytes) : int
    {
        if ($peakMemoryUsageBytes !== null && $this->getErrorOutput()->isVerbose()) {
            $this->getErrorOutput()->writeLineFormatted(sprintf('Used memory: %s', BytesHelper::bytes($peakMemoryUsageBytes)));
        }
        return $exitCode;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Command;

use Closure;
use PHPStan\Analyser\Analyser;
use PHPStan\Analyser\AnalyserResult;
use PHPStan\Parallel\ParallelAnalyser;
use PHPStan\Parallel\Scheduler;
use PHPStan\Process\CpuCoreCounter;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
use function count;
use function function_exists;
use function is_file;
use function memory_get_peak_usage;
class AnalyserRunner
{
    /**
     * @var \PHPStan\Parallel\Scheduler
     */
    private $scheduler;
    /**
     * @var \PHPStan\Analyser\Analyser
     */
    private $analyser;
    /**
     * @var \PHPStan\Parallel\ParallelAnalyser
     */
    private $parallelAnalyser;
    /**
     * @var \PHPStan\Process\CpuCoreCounter
     */
    private $cpuCoreCounter;
    public function __construct(Scheduler $scheduler, Analyser $analyser, ParallelAnalyser $parallelAnalyser, CpuCoreCounter $cpuCoreCounter)
    {
        $this->scheduler = $scheduler;
        $this->analyser = $analyser;
        $this->parallelAnalyser = $parallelAnalyser;
        $this->cpuCoreCounter = $cpuCoreCounter;
    }
    /**
     * @param string[] $files
     * @param string[] $allAnalysedFiles
     * @param Closure(string $file): void|null $preFileCallback
     * @param Closure(int ): void|null $postFileCallback
     */
    public function runAnalyser(array $files, array $allAnalysedFiles, ?Closure $preFileCallback, ?Closure $postFileCallback, bool $debug, bool $allowParallel, ?string $projectConfigFile, InputInterface $input) : AnalyserResult
    {
        $filesCount = count($files);
        if ($filesCount === 0) {
            return new AnalyserResult([], [], [], [], [], \false, memory_get_peak_usage(\true));
        }
        $schedule = $this->scheduler->scheduleWork($this->cpuCoreCounter->getNumberOfCpuCores(), $files);
        $mainScript = null;
        if (isset($_SERVER['argv'][0]) && is_file($_SERVER['argv'][0])) {
            $mainScript = $_SERVER['argv'][0];
        }
        if (!$debug && $allowParallel && function_exists('proc_open') && $mainScript !== null && $schedule->getNumberOfProcesses() > 0) {
            return $this->parallelAnalyser->analyse($schedule, $mainScript, $postFileCallback, $projectConfigFile, $input);
        }
        return $this->analyser->analyse($files, $preFileCallback, $postFileCallback, $debug, $allAnalysedFiles);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Command;

use Hoa\Compiler\Llk\Parser;
use Hoa\Compiler\Llk\TreeNode;
use Hoa\Exception\Exception;
use _PHPStan_dcc7b7cff\Nette\Utils\Strings;
use PHPStan\PhpDoc\TypeStringResolver;
use PHPStan\PhpDocParser\Parser\ParserException;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\ObjectType;
use PHPStan\Type\VerbosityLevel;
use function count;
use function strpos;
use function strrpos;
use function substr;
class IgnoredRegexValidator
{
    /**
     * @var \Hoa\Compiler\Llk\Parser
     */
    private $parser;
    /**
     * @var \PHPStan\PhpDoc\TypeStringResolver
     */
    private $typeStringResolver;
    public function __construct(Parser $parser, TypeStringResolver $typeStringResolver)
    {
        $this->parser = $parser;
        $this->typeStringResolver = $typeStringResolver;
    }
    public function validate(string $regex) : \PHPStan\Command\IgnoredRegexValidatorResult
    {
        $regex = $this->removeDelimiters($regex);
        try {
            /** @var TreeNode $ast */
            $ast = $this->parser->parse($regex);
        } catch (Exception $e) {
            if (strpos($e->getMessage(), 'Unexpected token "|" (alternation) at line 1') === 0) {
                return new \PHPStan\Command\IgnoredRegexValidatorResult([], \false, \true, '||', '\\|\\|');
            }
            if (strpos($regex, '()') !== \false && strpos($e->getMessage(), 'Unexpected token ")" (_capturing) at line 1') === 0) {
                return new \PHPStan\Command\IgnoredRegexValidatorResult([], \false, \true, '()', '\\(\\)');
            }
            return new \PHPStan\Command\IgnoredRegexValidatorResult([], \false, \false);
        }
        return new \PHPStan\Command\IgnoredRegexValidatorResult($this->getIgnoredTypes($ast), $this->hasAnchorsInTheMiddle($ast), \false);
    }
    /**
     * @return array<string, string>
     */
    private function getIgnoredTypes(TreeNode $ast) : array
    {
        /** @var TreeNode|null $alternation */
        $alternation = $ast->getChild(0);
        if ($alternation === null) {
            return [];
        }
        if ($alternation->getId() !== '#alternation') {
            return [];
        }
        $types = [];
        foreach ($alternation->getChildren() as $child) {
            $text = $this->getText($child);
            if ($text === null) {
                continue;
            }
            $matches = Strings::match($text, '#^([a-zA-Z0-9]+)[,]?\\s*#');
            if ($matches === null) {
                continue;
            }
            try {
                $type = $this->typeStringResolver->resolve($matches[1], null);
            } catch (ParserException $exception) {
                continue;
            }
            if ($type->describe(VerbosityLevel::typeOnly()) !== $matches[1]) {
                continue;
            }
            if ($type instanceof ObjectType) {
                continue;
            }
            $types[$type->describe(VerbosityLevel::typeOnly())] = $text;
        }
        return $types;
    }
    private function removeDelimiters(string $regex) : string
    {
        $delimiter = substr($regex, 0, 1);
        $endDelimiterPosition = strrpos($regex, $delimiter);
        if ($endDelimiterPosition === \false) {
            throw new ShouldNotHappenException();
        }
        return substr($regex, 1, $endDelimiterPosition - 1);
    }
    private function getText(TreeNode $treeNode) : ?string
    {
        if ($treeNode->getId() === 'token') {
            return $treeNode->getValueValue();
        }
        if ($treeNode->getId() === '#concatenation') {
            $fullText = '';
            foreach ($treeNode->getChildren() as $child) {
                $text = $this->getText($child);
                if ($text === null) {
                    continue;
                }
                $fullText .= $text;
            }
            if ($fullText === '') {
                return null;
            }
            return $fullText;
        }
        return null;
    }
    private function hasAnchorsInTheMiddle(TreeNode $ast) : bool
    {
        if ($ast->getId() === 'token') {
            $valueArray = $ast->getValue();
            return $valueArray['token'] === 'anchor' && $valueArray['value'] === '$';
        }
        $childrenCount = count($ast->getChildren());
        foreach ($ast->getChildren() as $i => $child) {
            $has = $this->hasAnchorsInTheMiddle($child);
            if ($has && ($ast->getId() !== '#concatenation' || $i !== $childrenCount - 1)) {
                return \true;
            }
        }
        return \false;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Command;

use _PHPStan_dcc7b7cff\Nette\Utils\Json;
use PHPStan\AnalysedCodeException;
use PHPStan\Analyser\Error;
use PHPStan\Analyser\IgnoredErrorHelper;
use PHPStan\Analyser\ResultCache\ResultCacheManagerFactory;
use PHPStan\Analyser\RuleErrorTransformer;
use PHPStan\Analyser\ScopeContext;
use PHPStan\Analyser\ScopeFactory;
use PHPStan\BetterReflection\NodeCompiler\Exception\UnableToCompileNode;
use PHPStan\BetterReflection\Reflection\Exception\CircularReference;
use PHPStan\BetterReflection\Reflection\Exception\NotAClassReflection;
use PHPStan\BetterReflection\Reflection\Exception\NotAnInterfaceReflection;
use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
use PHPStan\Collectors\CollectedData;
use PHPStan\DependencyInjection\Container;
use PHPStan\Node\CollectedDataNode;
use PHPStan\Rules\Registry as RuleRegistry;
use PHPStan\ShouldNotHappenException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\Command;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputArgument;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputOption;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
use function count;
use function is_array;
use function is_bool;
use function is_string;
use function sprintf;
class FixerWorkerCommand extends Command
{
    private const NAME = 'fixer:worker';
    /**
     * @var string[]
     */
    private $composerAutoloaderProjectPaths;
    /**
     * @param string[] $composerAutoloaderProjectPaths
     */
    public function __construct(array $composerAutoloaderProjectPaths)
    {
        $this->composerAutoloaderProjectPaths = $composerAutoloaderProjectPaths;
        parent::__construct();
    }
    protected function configure() : void
    {
        $this->setName(self::NAME)->setDescription('(Internal) Support for PHPStan Pro.')->setDefinition([new InputArgument('paths', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, 'Paths with source code to run analysis on'), new InputOption('configuration', 'c', InputOption::VALUE_REQUIRED, 'Path to project configuration file'), new InputOption(\PHPStan\Command\AnalyseCommand::OPTION_LEVEL, 'l', InputOption::VALUE_REQUIRED, 'Level of rule options - the higher the stricter'), new InputOption('autoload-file', 'a', InputOption::VALUE_REQUIRED, 'Project\'s additional autoload file path'), new InputOption('memory-limit', null, InputOption::VALUE_REQUIRED, 'Memory limit for analysis'), new InputOption('xdebug', null, InputOption::VALUE_NONE, 'Allow running with XDebug for debugging purposes'), new InputOption('save-result-cache', null, InputOption::VALUE_OPTIONAL, '', \false), new InputOption('allow-parallel', null, InputOption::VALUE_NONE, 'Allow parallel analysis')]);
    }
    protected function execute(InputInterface $input, OutputInterface $output) : int
    {
        $paths = $input->getArgument('paths');
        $memoryLimit = $input->getOption('memory-limit');
        $autoloadFile = $input->getOption('autoload-file');
        $configuration = $input->getOption('configuration');
        $level = $input->getOption(\PHPStan\Command\AnalyseCommand::OPTION_LEVEL);
        $allowXdebug = $input->getOption('xdebug');
        $allowParallel = $input->getOption('allow-parallel');
        if (!is_array($paths) || !is_string($memoryLimit) && $memoryLimit !== null || !is_string($autoloadFile) && $autoloadFile !== null || !is_string($configuration) && $configuration !== null || !is_string($level) && $level !== null || !is_bool($allowXdebug) || !is_bool($allowParallel)) {
            throw new ShouldNotHappenException();
        }
        /** @var false|string|null $saveResultCache */
        $saveResultCache = $input->getOption('save-result-cache');
        try {
            $inceptionResult = \PHPStan\Command\CommandHelper::begin($input, $output, $paths, $memoryLimit, $autoloadFile, $this->composerAutoloaderProjectPaths, $configuration, null, $level, $allowXdebug, \false, \false);
        } catch (\PHPStan\Command\InceptionNotSuccessfulException $exception) {
            return 1;
        }
        $container = $inceptionResult->getContainer();
        $ignoredErrorHelper = $container->getByType(IgnoredErrorHelper::class);
        $ignoredErrorHelperResult = $ignoredErrorHelper->initialize();
        if (count($ignoredErrorHelperResult->getErrors()) > 0) {
            throw new ShouldNotHappenException();
        }
        $analyserRunner = $container->getByType(\PHPStan\Command\AnalyserRunner::class);
        $resultCacheManager = $container->getByType(ResultCacheManagerFactory::class)->create();
        $projectConfigArray = $inceptionResult->getProjectConfigArray();
        [$inceptionFiles, $isOnlyFiles] = $inceptionResult->getFiles();
        $resultCache = $resultCacheManager->restore($inceptionFiles, \false, \false, $projectConfigArray, $inceptionResult->getErrorOutput());
        $intermediateAnalyserResult = $analyserRunner->runAnalyser($resultCache->getFilesToAnalyse(), $inceptionFiles, null, null, \false, $allowParallel, $configuration, $input);
        $result = $resultCacheManager->process($intermediateAnalyserResult, $resultCache, $inceptionResult->getErrorOutput(), \false, is_string($saveResultCache) ? $saveResultCache : $saveResultCache === null)->getAnalyserResult();
        $hasInternalErrors = count($result->getInternalErrors()) > 0 || $result->hasReachedInternalErrorsCountLimit();
        $intermediateErrors = $ignoredErrorHelperResult->process($result->getErrors(), $isOnlyFiles, $inceptionFiles, $hasInternalErrors);
        if (!$hasInternalErrors) {
            foreach ($this->getCollectedDataErrors($container, $result->getCollectedData()) as $error) {
                $intermediateErrors[] = $error;
            }
        }
        $finalFileSpecificErrors = [];
        $finalNotFileSpecificErrors = [];
        foreach ($intermediateErrors as $intermediateError) {
            if (is_string($intermediateError)) {
                $finalNotFileSpecificErrors[] = $intermediateError;
                continue;
            }
            $finalFileSpecificErrors[] = $intermediateError;
        }
        $output->writeln(Json::encode(['fileSpecificErrors' => $finalFileSpecificErrors, 'notFileSpecificErrors' => $finalNotFileSpecificErrors]), OutputInterface::OUTPUT_RAW);
        return 0;
    }
    /**
     * @param CollectedData[] $collectedData
     * @return Error[]
     */
    private function getCollectedDataErrors(Container $container, array $collectedData) : array
    {
        $nodeType = CollectedDataNode::class;
        $node = new CollectedDataNode($collectedData);
        $file = 'N/A';
        $scope = $container->getByType(ScopeFactory::class)->create(ScopeContext::create($file));
        $ruleRegistry = $container->getByType(RuleRegistry::class);
        $ruleErrorTransformer = $container->getByType(RuleErrorTransformer::class);
        $errors = [];
        foreach ($ruleRegistry->getRules($nodeType) as $rule) {
            try {
                $ruleErrors = $rule->processNode($node, $scope);
            } catch (AnalysedCodeException $e) {
                $errors[] = new Error($e->getMessage(), $file, $node->getLine(), $e, null, null, $e->getTip());
                continue;
            } catch (IdentifierNotFound $e) {
                $errors[] = new Error(sprintf('Reflection error: %s not found.', $e->getIdentifier()->getName()), $file, $node->getLine(), $e, null, null, 'Learn more at https://phpstan.org/user-guide/discovering-symbols');
                continue;
            } catch (UnableToCompileNode|NotAClassReflection|NotAnInterfaceReflection|CircularReference $e) {
                $errors[] = new Error(sprintf('Reflection error: %s', $e->getMessage()), $file, $node->getLine(), $e);
                continue;
            }
            foreach ($ruleErrors as $ruleError) {
                $errors[] = $ruleErrorTransformer->transform($ruleError, $scope, $nodeType, $node->getLine());
            }
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Command;

/** @api */
interface OutputStyle
{
    public function title(string $message) : void;
    public function section(string $message) : void;
    /**
     * @param string[] $elements
     */
    public function listing(array $elements) : void;
    public function success(string $message) : void;
    public function error(string $message) : void;
    public function warning(string $message) : void;
    public function note(string $message) : void;
    public function caution(string $message) : void;
    /**
     * @param mixed[] $headers
     * @param mixed[] $rows
     */
    public function table(array $headers, array $rows) : void;
    public function newLine(int $count = 1) : void;
    public function progressStart(int $max = 0) : void;
    public function progressAdvance(int $step = 1) : void;
    public function progressFinish() : void;
}
<?php

declare (strict_types=1);
namespace PHPStan\Command;

use PHPStan\AnalysedCodeException;
use PHPStan\Analyser\AnalyserResult;
use PHPStan\Analyser\Error;
use PHPStan\Analyser\IgnoredErrorHelper;
use PHPStan\Analyser\ResultCache\ResultCacheManagerFactory;
use PHPStan\Analyser\RuleErrorTransformer;
use PHPStan\Analyser\ScopeContext;
use PHPStan\Analyser\ScopeFactory;
use PHPStan\BetterReflection\NodeCompiler\Exception\UnableToCompileNode;
use PHPStan\BetterReflection\Reflection\Exception\CircularReference;
use PHPStan\BetterReflection\Reflection\Exception\NotAClassReflection;
use PHPStan\BetterReflection\Reflection\Exception\NotAnInterfaceReflection;
use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
use PHPStan\Collectors\CollectedData;
use PHPStan\Internal\BytesHelper;
use PHPStan\Node\CollectedDataNode;
use PHPStan\PhpDoc\StubFilesProvider;
use PHPStan\PhpDoc\StubValidator;
use PHPStan\Rules\Registry as RuleRegistry;
use PHPStan\ShouldNotHappenException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
use function array_merge;
use function count;
use function is_string;
use function memory_get_peak_usage;
use function microtime;
use function sprintf;
class AnalyseApplication
{
    /**
     * @var \PHPStan\Command\AnalyserRunner
     */
    private $analyserRunner;
    /**
     * @var \PHPStan\PhpDoc\StubValidator
     */
    private $stubValidator;
    /**
     * @var \PHPStan\Analyser\ResultCache\ResultCacheManagerFactory
     */
    private $resultCacheManagerFactory;
    /**
     * @var \PHPStan\Analyser\IgnoredErrorHelper
     */
    private $ignoredErrorHelper;
    /**
     * @var int
     */
    private $internalErrorsCountLimit;
    /**
     * @var \PHPStan\PhpDoc\StubFilesProvider
     */
    private $stubFilesProvider;
    /**
     * @var RuleRegistry
     */
    private $ruleRegistry;
    /**
     * @var \PHPStan\Analyser\ScopeFactory
     */
    private $scopeFactory;
    /**
     * @var \PHPStan\Analyser\RuleErrorTransformer
     */
    private $ruleErrorTransformer;
    public function __construct(\PHPStan\Command\AnalyserRunner $analyserRunner, StubValidator $stubValidator, ResultCacheManagerFactory $resultCacheManagerFactory, IgnoredErrorHelper $ignoredErrorHelper, int $internalErrorsCountLimit, StubFilesProvider $stubFilesProvider, RuleRegistry $ruleRegistry, ScopeFactory $scopeFactory, RuleErrorTransformer $ruleErrorTransformer)
    {
        $this->analyserRunner = $analyserRunner;
        $this->stubValidator = $stubValidator;
        $this->resultCacheManagerFactory = $resultCacheManagerFactory;
        $this->ignoredErrorHelper = $ignoredErrorHelper;
        $this->internalErrorsCountLimit = $internalErrorsCountLimit;
        $this->stubFilesProvider = $stubFilesProvider;
        $this->ruleRegistry = $ruleRegistry;
        $this->scopeFactory = $scopeFactory;
        $this->ruleErrorTransformer = $ruleErrorTransformer;
    }
    /**
     * @param string[] $files
     * @param mixed[]|null $projectConfigArray
     */
    public function analyse(array $files, bool $onlyFiles, \PHPStan\Command\Output $stdOutput, \PHPStan\Command\Output $errorOutput, bool $defaultLevelUsed, bool $debug, ?string $projectConfigFile, ?array $projectConfigArray, InputInterface $input) : \PHPStan\Command\AnalysisResult
    {
        $resultCacheManager = $this->resultCacheManagerFactory->create();
        $ignoredErrorHelperResult = $this->ignoredErrorHelper->initialize();
        if (count($ignoredErrorHelperResult->getErrors()) > 0) {
            $errors = $ignoredErrorHelperResult->getErrors();
            $internalErrors = [];
            $collectedData = [];
            $savedResultCache = \false;
            $memoryUsageBytes = memory_get_peak_usage(\true);
            if ($errorOutput->isDebug()) {
                $errorOutput->writeLineFormatted('Result cache was not saved because of ignoredErrorHelperResult errors.');
            }
        } else {
            $resultCache = $resultCacheManager->restore($files, $debug, $onlyFiles, $projectConfigArray, $errorOutput);
            $intermediateAnalyserResult = $this->runAnalyser($resultCache->getFilesToAnalyse(), $files, $debug, $projectConfigFile, $stdOutput, $errorOutput, $input);
            $projectStubFiles = $this->stubFilesProvider->getProjectStubFiles();
            if ($resultCache->isFullAnalysis() && count($projectStubFiles) !== 0) {
                $stubErrors = $this->stubValidator->validate($projectStubFiles, $debug);
                $intermediateAnalyserResult = new AnalyserResult(array_merge($intermediateAnalyserResult->getErrors(), $stubErrors), $intermediateAnalyserResult->getInternalErrors(), $intermediateAnalyserResult->getCollectedData(), $intermediateAnalyserResult->getDependencies(), $intermediateAnalyserResult->getExportedNodes(), $intermediateAnalyserResult->hasReachedInternalErrorsCountLimit(), $intermediateAnalyserResult->getPeakMemoryUsageBytes());
            }
            $resultCacheResult = $resultCacheManager->process($intermediateAnalyserResult, $resultCache, $errorOutput, $onlyFiles, \true);
            $analyserResult = $resultCacheResult->getAnalyserResult();
            $internalErrors = $analyserResult->getInternalErrors();
            $errors = $analyserResult->getErrors();
            $hasInternalErrors = count($internalErrors) > 0 || $analyserResult->hasReachedInternalErrorsCountLimit();
            $memoryUsageBytes = $analyserResult->getPeakMemoryUsageBytes();
            if (!$hasInternalErrors) {
                foreach ($this->getCollectedDataErrors($analyserResult->getCollectedData()) as $error) {
                    $errors[] = $error;
                }
            }
            $errors = $ignoredErrorHelperResult->process($errors, $onlyFiles, $files, $hasInternalErrors);
            $collectedData = $analyserResult->getCollectedData();
            $savedResultCache = $resultCacheResult->isSaved();
            if ($analyserResult->hasReachedInternalErrorsCountLimit()) {
                $errors[] = sprintf('Reached internal errors count limit of %d, exiting...', $this->internalErrorsCountLimit);
            }
            $errors = array_merge($errors, $internalErrors);
        }
        $fileSpecificErrors = [];
        $notFileSpecificErrors = [];
        foreach ($errors as $error) {
            if (is_string($error)) {
                $notFileSpecificErrors[] = $error;
                continue;
            }
            $fileSpecificErrors[] = $error;
        }
        return new \PHPStan\Command\AnalysisResult($fileSpecificErrors, $notFileSpecificErrors, $internalErrors, [], $collectedData, $defaultLevelUsed, $projectConfigFile, $savedResultCache, $memoryUsageBytes);
    }
    /**
     * @param CollectedData[] $collectedData
     * @return Error[]
     */
    private function getCollectedDataErrors(array $collectedData) : array
    {
        $nodeType = CollectedDataNode::class;
        $node = new CollectedDataNode($collectedData);
        $file = 'N/A';
        $scope = $this->scopeFactory->create(ScopeContext::create($file));
        $errors = [];
        foreach ($this->ruleRegistry->getRules($nodeType) as $rule) {
            try {
                $ruleErrors = $rule->processNode($node, $scope);
            } catch (AnalysedCodeException $e) {
                $errors[] = new Error($e->getMessage(), $file, $node->getLine(), $e, null, null, $e->getTip());
                continue;
            } catch (IdentifierNotFound $e) {
                $errors[] = new Error(sprintf('Reflection error: %s not found.', $e->getIdentifier()->getName()), $file, $node->getLine(), $e, null, null, 'Learn more at https://phpstan.org/user-guide/discovering-symbols');
                continue;
            } catch (UnableToCompileNode|NotAClassReflection|NotAnInterfaceReflection|CircularReference $e) {
                $errors[] = new Error(sprintf('Reflection error: %s', $e->getMessage()), $file, $node->getLine(), $e);
                continue;
            }
            foreach ($ruleErrors as $ruleError) {
                $errors[] = $this->ruleErrorTransformer->transform($ruleError, $scope, $nodeType, $node->getLine());
            }
        }
        return $errors;
    }
    /**
     * @param string[] $files
     * @param string[] $allAnalysedFiles
     */
    private function runAnalyser(array $files, array $allAnalysedFiles, bool $debug, ?string $projectConfigFile, \PHPStan\Command\Output $stdOutput, \PHPStan\Command\Output $errorOutput, InputInterface $input) : AnalyserResult
    {
        $filesCount = count($files);
        $allAnalysedFilesCount = count($allAnalysedFiles);
        if ($filesCount === 0) {
            $errorOutput->getStyle()->progressStart($allAnalysedFilesCount);
            $errorOutput->getStyle()->progressAdvance($allAnalysedFilesCount);
            $errorOutput->getStyle()->progressFinish();
            return new AnalyserResult([], [], [], [], [], \false, memory_get_peak_usage(\true));
        }
        if (!$debug) {
            $preFileCallback = null;
            $postFileCallback = static function (int $step) use($errorOutput) : void {
                $errorOutput->getStyle()->progressAdvance($step);
            };
            $errorOutput->getStyle()->progressStart($allAnalysedFilesCount);
            $errorOutput->getStyle()->progressAdvance($allAnalysedFilesCount - $filesCount);
        } else {
            $startTime = null;
            $preFileCallback = static function (string $file) use($stdOutput, &$startTime) : void {
                $stdOutput->writeLineFormatted($file);
                $startTime = microtime(\true);
            };
            $postFileCallback = null;
            if ($stdOutput->isDebug()) {
                $previousMemory = memory_get_peak_usage(\true);
                $postFileCallback = static function () use($stdOutput, &$previousMemory, &$startTime) : void {
                    if ($startTime === null) {
                        throw new ShouldNotHappenException();
                    }
                    $currentTotalMemory = memory_get_peak_usage(\true);
                    $elapsedTime = microtime(\true) - $startTime;
                    $stdOutput->writeLineFormatted(sprintf('--- consumed %s, total %s, took %.2f s', BytesHelper::bytes($currentTotalMemory - $previousMemory), BytesHelper::bytes($currentTotalMemory), $elapsedTime));
                    $previousMemory = $currentTotalMemory;
                };
            }
        }
        $analyserResult = $this->analyserRunner->runAnalyser($files, $allAnalysedFiles, $preFileCallback, $postFileCallback, $debug, \true, $projectConfigFile, $input);
        if (!$debug) {
            $errorOutput->getStyle()->progressFinish();
        }
        return $analyserResult;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Command;

use _PHPStan_dcc7b7cff\OndraM\CiDetector\CiDetector;
use PHPStan\Command\ErrorFormatter\BaselineNeonErrorFormatter;
use PHPStan\Command\ErrorFormatter\BaselinePhpErrorFormatter;
use PHPStan\Command\ErrorFormatter\ErrorFormatter;
use PHPStan\Command\ErrorFormatter\TableErrorFormatter;
use PHPStan\Command\Symfony\SymfonyOutput;
use PHPStan\Command\Symfony\SymfonyStyle;
use PHPStan\File\CouldNotWriteFileException;
use PHPStan\File\FileReader;
use PHPStan\File\FileWriter;
use PHPStan\File\ParentDirectoryRelativePathHelper;
use PHPStan\File\PathNotFoundException;
use PHPStan\File\RelativePathHelper;
use PHPStan\Internal\BytesHelper;
use PHPStan\ShouldNotHappenException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\Command;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputArgument;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputOption;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\StringInput;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\StreamOutput;
use Throwable;
use function array_intersect;
use function array_map;
use function count;
use function dirname;
use function filesize;
use function fopen;
use function get_class;
use function implode;
use function in_array;
use function is_array;
use function is_bool;
use function is_dir;
use function is_file;
use function is_string;
use function mkdir;
use function pathinfo;
use function rewind;
use function sprintf;
use function stream_get_contents;
use function strlen;
use function substr;
use const PATHINFO_BASENAME;
use const PATHINFO_EXTENSION;
class AnalyseCommand extends Command
{
    private const NAME = 'analyse';
    public const OPTION_LEVEL = 'level';
    public const DEFAULT_LEVEL = \PHPStan\Command\CommandHelper::DEFAULT_LEVEL;
    /**
     * @var string[]
     */
    private $composerAutoloaderProjectPaths;
    /**
     * @param string[] $composerAutoloaderProjectPaths
     */
    public function __construct(array $composerAutoloaderProjectPaths)
    {
        $this->composerAutoloaderProjectPaths = $composerAutoloaderProjectPaths;
        parent::__construct();
    }
    protected function configure() : void
    {
        $this->setName(self::NAME)->setDescription('Analyses source code')->setDefinition([new InputArgument('paths', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, 'Paths with source code to run analysis on'), new InputOption('configuration', 'c', InputOption::VALUE_REQUIRED, 'Path to project configuration file'), new InputOption(self::OPTION_LEVEL, 'l', InputOption::VALUE_REQUIRED, 'Level of rule options - the higher the stricter'), new InputOption(\PHPStan\Command\ErrorsConsoleStyle::OPTION_NO_PROGRESS, null, InputOption::VALUE_NONE, 'Do not show progress bar, only results'), new InputOption('debug', null, InputOption::VALUE_NONE, 'Show debug information - which file is analysed, do not catch internal errors'), new InputOption('autoload-file', 'a', InputOption::VALUE_REQUIRED, 'Project\'s additional autoload file path'), new InputOption('error-format', null, InputOption::VALUE_REQUIRED, 'Format in which to print the result of the analysis', null), new InputOption('generate-baseline', 'b', InputOption::VALUE_OPTIONAL, 'Path to a file where the baseline should be saved', \false), new InputOption('allow-empty-baseline', null, InputOption::VALUE_NONE, 'Do not error out when the generated baseline is empty'), new InputOption('memory-limit', null, InputOption::VALUE_REQUIRED, 'Memory limit for analysis'), new InputOption('xdebug', null, InputOption::VALUE_NONE, 'Allow running with XDebug for debugging purposes'), new InputOption('fix', null, InputOption::VALUE_NONE, 'Launch PHPStan Pro'), new InputOption('watch', null, InputOption::VALUE_NONE, 'Launch PHPStan Pro'), new InputOption('pro', null, InputOption::VALUE_NONE, 'Launch PHPStan Pro')]);
    }
    /**
     * @return string[]
     */
    public function getAliases() : array
    {
        return ['analyze'];
    }
    protected function initialize(InputInterface $input, OutputInterface $output) : void
    {
        if ((bool) $input->getOption('debug')) {
            $application = $this->getApplication();
            if ($application === null) {
                return;
            }
            $application->setCatchExceptions(\false);
            return;
        }
    }
    protected function execute(InputInterface $input, OutputInterface $output) : int
    {
        $paths = $input->getArgument('paths');
        $memoryLimit = $input->getOption('memory-limit');
        $autoloadFile = $input->getOption('autoload-file');
        $configuration = $input->getOption('configuration');
        $level = $input->getOption(self::OPTION_LEVEL);
        $allowXdebug = $input->getOption('xdebug');
        $debugEnabled = (bool) $input->getOption('debug');
        $fix = (bool) $input->getOption('fix') || (bool) $input->getOption('watch') || (bool) $input->getOption('pro');
        /** @var string|false|null $generateBaselineFile */
        $generateBaselineFile = $input->getOption('generate-baseline');
        if ($generateBaselineFile === \false) {
            $generateBaselineFile = null;
        } elseif ($generateBaselineFile === null) {
            $generateBaselineFile = 'phpstan-baseline.neon';
        }
        $allowEmptyBaseline = (bool) $input->getOption('allow-empty-baseline');
        if (!is_array($paths) || !is_string($memoryLimit) && $memoryLimit !== null || !is_string($autoloadFile) && $autoloadFile !== null || !is_string($configuration) && $configuration !== null || !is_string($level) && $level !== null || !is_bool($allowXdebug)) {
            throw new ShouldNotHappenException();
        }
        try {
            $inceptionResult = \PHPStan\Command\CommandHelper::begin($input, $output, $paths, $memoryLimit, $autoloadFile, $this->composerAutoloaderProjectPaths, $configuration, $generateBaselineFile, $level, $allowXdebug, $debugEnabled);
        } catch (\PHPStan\Command\InceptionNotSuccessfulException $e) {
            return 1;
        }
        if ($generateBaselineFile === null && $allowEmptyBaseline) {
            $inceptionResult->getStdOutput()->getStyle()->error('You must pass the --generate-baseline option alongside --allow-empty-baseline.');
            return $inceptionResult->handleReturn(1, null);
        }
        $errorOutput = $inceptionResult->getErrorOutput();
        $obsoleteDockerImage = $_SERVER['PHPSTAN_OBSOLETE_DOCKER_IMAGE'] ?? 'false';
        if ($obsoleteDockerImage === 'true') {
            $errorOutput->writeLineFormatted('⚠️  You\'re using an obsolete PHPStan Docker image. ⚠️️');
            $errorOutput->writeLineFormatted('   You can obtain the current one from <fg=cyan>ghcr.io/phpstan/phpstan</>.');
            $errorOutput->writeLineFormatted('   Read more about it here:');
            $errorOutput->writeLineFormatted('   <fg=cyan>https://phpstan.org/user-guide/docker</>');
            $errorOutput->writeLineFormatted('');
        }
        $errorFormat = $input->getOption('error-format');
        if (!is_string($errorFormat) && $errorFormat !== null) {
            throw new ShouldNotHappenException();
        }
        if ($errorFormat === null) {
            $errorFormat = $inceptionResult->getContainer()->getParameter('errorFormat');
        }
        if ($errorFormat === null) {
            $errorFormat = 'table';
        }
        $container = $inceptionResult->getContainer();
        $errorFormatterServiceName = sprintf('errorFormatter.%s', $errorFormat);
        if (!$container->hasService($errorFormatterServiceName)) {
            $errorOutput->writeLineFormatted(sprintf('Error formatter "%s" not found. Available error formatters are: %s', $errorFormat, implode(', ', array_map(static function (string $name) : string {
                return substr($name, strlen('errorFormatter.'));
            }, $container->findServiceNamesByType(ErrorFormatter::class)))));
            return 1;
        }
        $generateBaselineFile = $inceptionResult->getGenerateBaselineFile();
        if ($generateBaselineFile !== null) {
            $baselineExtension = pathinfo($generateBaselineFile, PATHINFO_EXTENSION);
            if ($baselineExtension === '') {
                $inceptionResult->getStdOutput()->getStyle()->error(sprintf('Baseline filename must have an extension, %s provided instead.', pathinfo($generateBaselineFile, PATHINFO_BASENAME)));
                return $inceptionResult->handleReturn(1, null);
            }
            if (!in_array($baselineExtension, ['neon', 'php'], \true)) {
                $inceptionResult->getStdOutput()->getStyle()->error(sprintf('Baseline filename extension must be .neon or .php, .%s was used instead.', $baselineExtension));
                return $inceptionResult->handleReturn(1, null);
            }
        }
        try {
            [$files, $onlyFiles] = $inceptionResult->getFiles();
        } catch (PathNotFoundException $e) {
            $inceptionResult->getErrorOutput()->writeLineFormatted(sprintf('<error>%s</error>', $e->getMessage()));
            return 1;
        }
        if (count($files) === 0) {
            $inceptionResult->getErrorOutput()->getStyle()->note('No files found to analyse.');
            $inceptionResult->getErrorOutput()->getStyle()->warning('This will cause a non-zero exit code in PHPStan 2.0.');
            return $inceptionResult->handleReturn(0, null);
        }
        $analysedConfigFiles = array_intersect($files, $container->getParameter('allConfigFiles'));
        foreach ($analysedConfigFiles as $analysedConfigFile) {
            $fileSize = @filesize($analysedConfigFile);
            if ($fileSize === \false) {
                continue;
            }
            if ($fileSize <= 512 * 1024) {
                continue;
            }
            /** @var RelativePathHelper $relativePathHelper */
            $relativePathHelper = $container->getService('relativePathHelper');
            $inceptionResult->getErrorOutput()->getStyle()->warning(sprintf('Configuration file %s (%s) is too big and might slow down PHPStan. Consider adding it to excludePaths.', $relativePathHelper->getRelativePath($analysedConfigFile), BytesHelper::bytes($fileSize)));
        }
        $application = $container->getByType(\PHPStan\Command\AnalyseApplication::class);
        $debug = $input->getOption('debug');
        if (!is_bool($debug)) {
            throw new ShouldNotHappenException();
        }
        try {
            $analysisResult = $application->analyse($files, $onlyFiles, $inceptionResult->getStdOutput(), $inceptionResult->getErrorOutput(), $inceptionResult->isDefaultLevelUsed(), $debug, $inceptionResult->getProjectConfigFile(), $inceptionResult->getProjectConfigArray(), $input);
        } catch (Throwable $t) {
            if ($debug) {
                $stdOutput = $inceptionResult->getStdOutput();
                $stdOutput->writeRaw(sprintf('Uncaught %s: %s in %s:%d', get_class($t), $t->getMessage(), $t->getFile(), $t->getLine()));
                $stdOutput->writeLineFormatted('');
                $stdOutput->writeRaw($t->getTraceAsString());
                $stdOutput->writeLineFormatted('');
                $previous = $t->getPrevious();
                while ($previous !== null) {
                    $stdOutput->writeLineFormatted('');
                    $stdOutput->writeLineFormatted('Caused by:');
                    $stdOutput->writeRaw(sprintf('Uncaught %s: %s in %s:%d', get_class($previous), $previous->getMessage(), $previous->getFile(), $previous->getLine()));
                    $stdOutput->writeRaw($previous->getTraceAsString());
                    $stdOutput->writeLineFormatted('');
                    $previous = $previous->getPrevious();
                }
                return $inceptionResult->handleReturn(1, null);
            }
            throw $t;
        }
        if ($generateBaselineFile !== null) {
            if (!$allowEmptyBaseline && !$analysisResult->hasErrors()) {
                $inceptionResult->getStdOutput()->getStyle()->error('No errors were found during the analysis. Baseline could not be generated.');
                $inceptionResult->getStdOutput()->writeLineFormatted('To allow generating empty baselines, pass <fg=cyan>--allow-empty-baseline</> option.');
                return $inceptionResult->handleReturn(1, $analysisResult->getPeakMemoryUsageBytes());
            }
            if ($analysisResult->hasInternalErrors()) {
                $inceptionResult->getStdOutput()->getStyle()->error('An internal error occurred. Baseline could not be generated. Re-run PHPStan without --generate-baseline to see what\'s going on.');
                return $inceptionResult->handleReturn(1, $analysisResult->getPeakMemoryUsageBytes());
            }
            $streamOutput = $this->createStreamOutput();
            $errorConsoleStyle = new \PHPStan\Command\ErrorsConsoleStyle(new StringInput(''), $streamOutput);
            $baselineOutput = new SymfonyOutput($streamOutput, new SymfonyStyle($errorConsoleStyle));
            $baselineFileDirectory = dirname($generateBaselineFile);
            $baselinePathHelper = new ParentDirectoryRelativePathHelper($baselineFileDirectory);
            if ($baselineExtension === 'php') {
                $baselineErrorFormatter = new BaselinePhpErrorFormatter($baselinePathHelper);
                $baselineErrorFormatter->formatErrors($analysisResult, $baselineOutput);
            } else {
                $baselineErrorFormatter = new BaselineNeonErrorFormatter($baselinePathHelper);
                $existingBaselineContent = is_file($generateBaselineFile) ? FileReader::read($generateBaselineFile) : '';
                $baselineErrorFormatter->formatErrors($analysisResult, $baselineOutput, $existingBaselineContent);
            }
            $stream = $streamOutput->getStream();
            rewind($stream);
            $baselineContents = stream_get_contents($stream);
            if ($baselineContents === \false) {
                throw new ShouldNotHappenException();
            }
            if (!is_dir($baselineFileDirectory)) {
                $mkdirResult = @mkdir($baselineFileDirectory, 0644, \true);
                if ($mkdirResult === \false) {
                    $inceptionResult->getStdOutput()->writeLineFormatted(sprintf('Failed to create directory "%s".', $baselineFileDirectory));
                    return $inceptionResult->handleReturn(1, $analysisResult->getPeakMemoryUsageBytes());
                }
            }
            try {
                FileWriter::write($generateBaselineFile, $baselineContents);
            } catch (CouldNotWriteFileException $e) {
                $inceptionResult->getStdOutput()->writeLineFormatted($e->getMessage());
                return $inceptionResult->handleReturn(1, $analysisResult->getPeakMemoryUsageBytes());
            }
            $errorsCount = 0;
            $unignorableCount = 0;
            foreach ($analysisResult->getFileSpecificErrors() as $fileSpecificError) {
                if (!$fileSpecificError->canBeIgnored()) {
                    $unignorableCount++;
                    if ($output->isVeryVerbose()) {
                        $inceptionResult->getStdOutput()->writeLineFormatted('Unignorable could not be added to the baseline:');
                        $inceptionResult->getStdOutput()->writeLineFormatted($fileSpecificError->getMessage());
                        $inceptionResult->getStdOutput()->writeLineFormatted($fileSpecificError->getFile());
                        $inceptionResult->getStdOutput()->writeLineFormatted('');
                    }
                    continue;
                }
                $errorsCount++;
            }
            $message = sprintf('Baseline generated with %d %s.', $errorsCount, $errorsCount === 1 ? 'error' : 'errors');
            if ($unignorableCount === 0 && count($analysisResult->getNotFileSpecificErrors()) === 0) {
                $inceptionResult->getStdOutput()->getStyle()->success($message);
            } else {
                $inceptionResult->getStdOutput()->getStyle()->warning($message . "\nSome errors could not be put into baseline. Re-run PHPStan and fix them.");
            }
            return $inceptionResult->handleReturn(0, $analysisResult->getPeakMemoryUsageBytes());
        }
        if ($fix) {
            $ciDetector = new CiDetector();
            if ($ciDetector->isCiDetected()) {
                $inceptionResult->getStdOutput()->writeLineFormatted('PHPStan Pro can\'t run in CI environment yet. Stay tuned!');
                return $inceptionResult->handleReturn(1, $analysisResult->getPeakMemoryUsageBytes());
            }
            $hasInternalErrors = $analysisResult->hasInternalErrors();
            $nonIgnorableErrorsByException = [];
            foreach ($analysisResult->getFileSpecificErrors() as $fileSpecificError) {
                if (!$fileSpecificError->hasNonIgnorableException()) {
                    continue;
                }
                $nonIgnorableErrorsByException[] = $fileSpecificError;
            }
            if ($hasInternalErrors || count($nonIgnorableErrorsByException) > 0) {
                $fixerAnalysisResult = new \PHPStan\Command\AnalysisResult($nonIgnorableErrorsByException, $analysisResult->getInternalErrors(), $analysisResult->getInternalErrors(), [], $analysisResult->getCollectedData(), $analysisResult->isDefaultLevelUsed(), $analysisResult->getProjectConfigFile(), $analysisResult->isResultCacheSaved(), $analysisResult->getPeakMemoryUsageBytes());
                $stdOutput = $inceptionResult->getStdOutput();
                $stdOutput->getStyle()->error('PHPStan Pro can\'t be launched because of these errors:');
                /** @var TableErrorFormatter $tableErrorFormatter */
                $tableErrorFormatter = $container->getService('errorFormatter.table');
                $tableErrorFormatter->formatErrors($fixerAnalysisResult, $stdOutput);
                $stdOutput->writeLineFormatted('Please fix them first and then re-run PHPStan.');
                if ($stdOutput->isDebug()) {
                    $stdOutput->writeLineFormatted(sprintf('hasInternalErrors: %s', $hasInternalErrors ? 'true' : 'false'));
                    $stdOutput->writeLineFormatted(sprintf('nonIgnorableErrorsByExceptionCount: %d', count($nonIgnorableErrorsByException)));
                }
                return $inceptionResult->handleReturn(1, $analysisResult->getPeakMemoryUsageBytes());
            }
            if (!$analysisResult->isResultCacheSaved() && !$onlyFiles) {
                // this can happen only if there are some regex-related errors in ignoreErrors configuration
                $stdOutput = $inceptionResult->getStdOutput();
                if (count($analysisResult->getFileSpecificErrors()) > 0) {
                    $stdOutput->getStyle()->error('Unknown error. Please report this as a bug.');
                    return $inceptionResult->handleReturn(1, $analysisResult->getPeakMemoryUsageBytes());
                }
                $stdOutput->getStyle()->error('PHPStan Pro can\'t be launched because of these errors:');
                /** @var TableErrorFormatter $tableErrorFormatter */
                $tableErrorFormatter = $container->getService('errorFormatter.table');
                $tableErrorFormatter->formatErrors($analysisResult, $stdOutput);
                $stdOutput->writeLineFormatted('Please fix them first and then re-run PHPStan.');
                if ($stdOutput->isDebug()) {
                    $stdOutput->writeLineFormatted('Result cache was not saved.');
                }
                return $inceptionResult->handleReturn(1, $analysisResult->getPeakMemoryUsageBytes());
            }
            $inceptionResult->handleReturn(0, $analysisResult->getPeakMemoryUsageBytes());
            $fixerApplication = $container->getByType(\PHPStan\Command\FixerApplication::class);
            return $fixerApplication->run($inceptionResult->getProjectConfigFile(), $inceptionResult, $input, $output, $analysisResult->getFileSpecificErrors(), $analysisResult->getNotFileSpecificErrors(), count($files), $_SERVER['argv'][0]);
        }
        /** @var ErrorFormatter $errorFormatter */
        $errorFormatter = $container->getService($errorFormatterServiceName);
        return $inceptionResult->handleReturn($errorFormatter->formatErrors($analysisResult, $inceptionResult->getStdOutput()), $analysisResult->getPeakMemoryUsageBytes());
    }
    private function createStreamOutput() : StreamOutput
    {
        $resource = fopen('php://memory', 'w', \false);
        if ($resource === \false) {
            throw new ShouldNotHappenException();
        }
        return new StreamOutput($resource);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Command;

use Exception;
class FixerProcessException extends Exception
{
}
<?php

declare (strict_types=1);
namespace PHPStan\Command;

use _PHPStan_dcc7b7cff\Clue\React\NDJson\Decoder;
use _PHPStan_dcc7b7cff\Clue\React\NDJson\Encoder;
use PHPStan\Analyser\FileAnalyser;
use PHPStan\Analyser\NodeScopeResolver;
use PHPStan\Collectors\Registry as CollectorRegistry;
use PHPStan\DependencyInjection\Container;
use PHPStan\File\PathNotFoundException;
use PHPStan\Rules\Registry as RuleRegistry;
use PHPStan\ShouldNotHappenException;
use _PHPStan_dcc7b7cff\React\EventLoop\StreamSelectLoop;
use _PHPStan_dcc7b7cff\React\Socket\ConnectionInterface;
use _PHPStan_dcc7b7cff\React\Socket\TcpConnector;
use _PHPStan_dcc7b7cff\React\Stream\ReadableStreamInterface;
use _PHPStan_dcc7b7cff\React\Stream\WritableStreamInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Command\Command;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputArgument;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputOption;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
use Throwable;
use function array_fill_keys;
use function count;
use function defined;
use function is_array;
use function is_bool;
use function is_string;
use function memory_get_peak_usage;
use function sprintf;
class WorkerCommand extends Command
{
    private const NAME = 'worker';
    /**
     * @var int
     */
    private $errorCount = 0;
    /**
     * @var string[]
     */
    private $composerAutoloaderProjectPaths;
    /**
     * @param string[] $composerAutoloaderProjectPaths
     */
    public function __construct(array $composerAutoloaderProjectPaths)
    {
        $this->composerAutoloaderProjectPaths = $composerAutoloaderProjectPaths;
        parent::__construct();
    }
    protected function configure() : void
    {
        $this->setName(self::NAME)->setDescription('(Internal) Support for parallel analysis.')->setDefinition([new InputArgument('paths', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, 'Paths with source code to run analysis on'), new InputOption('configuration', 'c', InputOption::VALUE_REQUIRED, 'Path to project configuration file'), new InputOption(\PHPStan\Command\AnalyseCommand::OPTION_LEVEL, 'l', InputOption::VALUE_REQUIRED, 'Level of rule options - the higher the stricter'), new InputOption('autoload-file', 'a', InputOption::VALUE_REQUIRED, 'Project\'s additional autoload file path'), new InputOption('memory-limit', null, InputOption::VALUE_REQUIRED, 'Memory limit for analysis'), new InputOption('xdebug', null, InputOption::VALUE_NONE, 'Allow running with XDebug for debugging purposes'), new InputOption('port', null, InputOption::VALUE_REQUIRED), new InputOption('identifier', null, InputOption::VALUE_REQUIRED)]);
    }
    protected function execute(InputInterface $input, OutputInterface $output) : int
    {
        $paths = $input->getArgument('paths');
        $memoryLimit = $input->getOption('memory-limit');
        $autoloadFile = $input->getOption('autoload-file');
        $configuration = $input->getOption('configuration');
        $level = $input->getOption(\PHPStan\Command\AnalyseCommand::OPTION_LEVEL);
        $allowXdebug = $input->getOption('xdebug');
        $port = $input->getOption('port');
        $identifier = $input->getOption('identifier');
        if (!is_array($paths) || !is_string($memoryLimit) && $memoryLimit !== null || !is_string($autoloadFile) && $autoloadFile !== null || !is_string($configuration) && $configuration !== null || !is_string($level) && $level !== null || !is_bool($allowXdebug) || !is_string($port) || !is_string($identifier)) {
            throw new ShouldNotHappenException();
        }
        try {
            $inceptionResult = \PHPStan\Command\CommandHelper::begin($input, $output, $paths, $memoryLimit, $autoloadFile, $this->composerAutoloaderProjectPaths, $configuration, null, $level, $allowXdebug, \false, \false);
        } catch (\PHPStan\Command\InceptionNotSuccessfulException $e) {
            return 1;
        }
        $loop = new StreamSelectLoop();
        $container = $inceptionResult->getContainer();
        try {
            [$analysedFiles] = $inceptionResult->getFiles();
        } catch (PathNotFoundException $e) {
            $inceptionResult->getErrorOutput()->writeLineFormatted(sprintf('<error>%s</error>', $e->getMessage()));
            return 1;
        }
        $nodeScopeResolver = $container->getByType(NodeScopeResolver::class);
        $nodeScopeResolver->setAnalysedFiles($analysedFiles);
        $analysedFiles = array_fill_keys($analysedFiles, \true);
        $tcpConector = new TcpConnector($loop);
        $tcpConector->connect(sprintf('127.0.0.1:%d', $port))->done(function (ConnectionInterface $connection) use($container, $identifier, $output, $analysedFiles) : void {
            // phpcs:disable SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly
            $jsonInvalidUtf8Ignore = defined('JSON_INVALID_UTF8_IGNORE') ? \JSON_INVALID_UTF8_IGNORE : 0;
            // phpcs:enable
            $out = new Encoder($connection, $jsonInvalidUtf8Ignore);
            $in = new Decoder($connection, \true, 512, $jsonInvalidUtf8Ignore, $container->getParameter('parallel')['buffer']);
            $out->write(['action' => 'hello', 'identifier' => $identifier]);
            $this->runWorker($container, $out, $in, $output, $analysedFiles);
        });
        $loop->run();
        if ($this->errorCount > 0) {
            return 1;
        }
        return 0;
    }
    /**
     * @param array<string, true> $analysedFiles
     */
    private function runWorker(Container $container, WritableStreamInterface $out, ReadableStreamInterface $in, OutputInterface $output, array $analysedFiles) : void
    {
        $handleError = function (Throwable $error) use($out, $output) : void {
            $this->errorCount++;
            $output->writeln(sprintf('Error: %s', $error->getMessage()));
            $out->write(['action' => 'result', 'result' => ['errors' => [$error->getMessage()], 'dependencies' => [], 'filesCount' => 0, 'internalErrorsCount' => 1]]);
            $out->end();
        };
        $out->on('error', $handleError);
        $fileAnalyser = $container->getByType(FileAnalyser::class);
        $ruleRegistry = $container->getByType(RuleRegistry::class);
        $collectorRegistry = $container->getByType(CollectorRegistry::class);
        $in->on('data', function (array $json) use($fileAnalyser, $ruleRegistry, $collectorRegistry, $out, $analysedFiles, $output) : void {
            $action = $json['action'];
            if ($action !== 'analyse') {
                return;
            }
            $internalErrorsCount = 0;
            $files = $json['files'];
            $errors = [];
            $collectedData = [];
            $dependencies = [];
            $exportedNodes = [];
            foreach ($files as $file) {
                try {
                    $fileAnalyserResult = $fileAnalyser->analyseFile($file, $analysedFiles, $ruleRegistry, $collectorRegistry, null);
                    $fileErrors = $fileAnalyserResult->getErrors();
                    $dependencies[$file] = $fileAnalyserResult->getDependencies();
                    $exportedNodes[$file] = $fileAnalyserResult->getExportedNodes();
                    foreach ($fileErrors as $fileError) {
                        $errors[] = $fileError;
                    }
                    foreach ($fileAnalyserResult->getCollectedData() as $data) {
                        $collectedData[] = $data;
                    }
                } catch (Throwable $t) {
                    $this->errorCount++;
                    $internalErrorsCount++;
                    $internalErrorMessage = sprintf('Internal error: %s in file %s', $t->getMessage(), $file);
                    $bugReportUrl = 'https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md';
                    if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
                        $internalErrorMessage .= sprintf('%sPost the following stack trace to %s: %s%s', "\n\n", $bugReportUrl, "\n", $t->getTraceAsString());
                    } else {
                        $internalErrorMessage .= sprintf('%sRun PHPStan with -v option and post the stack trace to:%s%s', "\n", "\n", $bugReportUrl);
                    }
                    $errors[] = $internalErrorMessage;
                }
            }
            $out->write(['action' => 'result', 'result' => ['errors' => $errors, 'collectedData' => $collectedData, 'memoryUsage' => memory_get_peak_usage(\true), 'dependencies' => $dependencies, 'exportedNodes' => $exportedNodes, 'filesCount' => count($files), 'internalErrorsCount' => $internalErrorsCount]]);
        });
        $in->on('error', $handleError);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Command;

use Exception;
class InceptionNotSuccessfulException extends Exception
{
}
<?php

declare (strict_types=1);
namespace PHPStan\Command;

use _PHPStan_dcc7b7cff\OndraM\CiDetector\CiDetector;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper\ProgressBar;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper\TableSeparator;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Style\SymfonyStyle;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Terminal;
use function array_unshift;
use function explode;
use function implode;
use function sprintf;
use function str_starts_with;
use function strlen;
use function wordwrap;
use const DIRECTORY_SEPARATOR;
class ErrorsConsoleStyle extends SymfonyStyle
{
    public const OPTION_NO_PROGRESS = 'no-progress';
    /**
     * @var bool
     */
    private $showProgress;
    /**
     * @var \Symfony\Component\Console\Helper\ProgressBar
     */
    private $progressBar;
    /**
     * @var bool|null
     */
    private $isCiDetected;
    public function __construct(InputInterface $input, OutputInterface $output)
    {
        parent::__construct($input, $output);
        $this->showProgress = $input->hasOption(self::OPTION_NO_PROGRESS) && !(bool) $input->getOption(self::OPTION_NO_PROGRESS);
    }
    private function isCiDetected() : bool
    {
        if ($this->isCiDetected === null) {
            $ciDetector = new CiDetector();
            $this->isCiDetected = $ciDetector->isCiDetected();
        }
        return $this->isCiDetected;
    }
    /**
     * @param string[] $headers
     * @param string[][] $rows
     */
    public function table(array $headers, array $rows) : void
    {
        /** @var int $terminalWidth */
        $terminalWidth = (new Terminal())->getWidth() - 2;
        $maxHeaderWidth = strlen($headers[0]);
        foreach ($rows as $row) {
            $length = strlen($row[0]);
            if ($maxHeaderWidth !== 0 && $length <= $maxHeaderWidth) {
                continue;
            }
            $maxHeaderWidth = $length;
        }
        // manual wrapping could be replaced with $table->setColumnMaxWidth()
        // but it's buggy for <href> lines
        // https://github.com/symfony/symfony/issues/45520
        // https://github.com/symfony/symfony/issues/45521
        $headers = $this->wrap($headers, $terminalWidth, $maxHeaderWidth);
        foreach ($headers as $i => $header) {
            $newHeader = [];
            foreach (explode("\n", $header) as $h) {
                $newHeader[] = sprintf('<info>%s</info>', $h);
            }
            $headers[$i] = implode("\n", $newHeader);
        }
        foreach ($rows as $i => $row) {
            $rows[$i] = $this->wrap($row, $terminalWidth, $maxHeaderWidth);
        }
        $table = $this->createTable();
        array_unshift($rows, $headers, new TableSeparator());
        $table->setRows($rows);
        $table->render();
        $this->newLine();
    }
    /**
     * @param string[] $rows
     * @return string[]
     */
    private function wrap(array $rows, int $terminalWidth, int $maxHeaderWidth) : array
    {
        foreach ($rows as $i => $column) {
            $columnRows = explode("\n", $column);
            foreach ($columnRows as $k => $columnRow) {
                if (str_starts_with($columnRow, '✏️')) {
                    continue;
                }
                $wrapped = wordwrap($columnRow, $terminalWidth - $maxHeaderWidth - 5);
                if (str_starts_with($columnRow, '💡 ')) {
                    $wrappedLines = explode("\n", $wrapped);
                    $newWrappedLines = [];
                    foreach ($wrappedLines as $l => $line) {
                        if ($l === 0) {
                            $newWrappedLines[] = $line;
                            continue;
                        }
                        $newWrappedLines[] = '   ' . $line;
                    }
                    $columnRows[$k] = implode("\n", $newWrappedLines);
                } else {
                    $columnRows[$k] = $wrapped;
                }
            }
            $rows[$i] = implode("\n", $columnRows);
        }
        return $rows;
    }
    public function createProgressBar(int $max = 0) : ProgressBar
    {
        $this->progressBar = parent::createProgressBar($max);
        $format = $this->getProgressBarFormat();
        if ($format !== null) {
            $this->progressBar->setFormat($format);
        }
        $ci = $this->isCiDetected();
        $this->progressBar->setOverwrite(!$ci);
        if ($ci) {
            $this->progressBar->minSecondsBetweenRedraws(15);
            $this->progressBar->maxSecondsBetweenRedraws(30);
        } elseif (DIRECTORY_SEPARATOR === '\\') {
            $this->progressBar->minSecondsBetweenRedraws(0.5);
            $this->progressBar->maxSecondsBetweenRedraws(2);
        } else {
            $this->progressBar->minSecondsBetweenRedraws(0.1);
            $this->progressBar->maxSecondsBetweenRedraws(0.5);
        }
        return $this->progressBar;
    }
    private function getProgressBarFormat() : ?string
    {
        switch ($this->getVerbosity()) {
            case OutputInterface::VERBOSITY_NORMAL:
                $formatName = ProgressBar::FORMAT_NORMAL;
                break;
            case OutputInterface::VERBOSITY_VERBOSE:
                $formatName = ProgressBar::FORMAT_VERBOSE;
                break;
            case OutputInterface::VERBOSITY_VERY_VERBOSE:
            case OutputInterface::VERBOSITY_DEBUG:
                $formatName = ProgressBar::FORMAT_VERY_VERBOSE;
                break;
            default:
                $formatName = null;
                break;
        }
        if ($formatName === null) {
            return null;
        }
        return ProgressBar::getFormatDefinition($formatName);
    }
    public function progressStart(int $max = 0) : void
    {
        if (!$this->showProgress) {
            return;
        }
        parent::progressStart($max);
    }
    public function progressAdvance(int $step = 1) : void
    {
        if (!$this->showProgress) {
            return;
        }
        parent::progressAdvance($step);
    }
    public function progressFinish() : void
    {
        if (!$this->showProgress) {
            return;
        }
        parent::progressFinish();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Command;

use _PHPStan_dcc7b7cff\Composer\XdebugHandler\XdebugHandler;
use _PHPStan_dcc7b7cff\Nette\DI\Helpers;
use _PHPStan_dcc7b7cff\Nette\DI\InvalidConfigurationException;
use _PHPStan_dcc7b7cff\Nette\DI\ServiceCreationException;
use _PHPStan_dcc7b7cff\Nette\FileNotFoundException;
use _PHPStan_dcc7b7cff\Nette\InvalidStateException;
use _PHPStan_dcc7b7cff\Nette\Schema\ValidationException;
use _PHPStan_dcc7b7cff\Nette\Utils\AssertionException;
use _PHPStan_dcc7b7cff\Nette\Utils\Strings;
use PHPStan\Command\Symfony\SymfonyOutput;
use PHPStan\Command\Symfony\SymfonyStyle;
use PHPStan\DependencyInjection\Container;
use PHPStan\DependencyInjection\ContainerFactory;
use PHPStan\DependencyInjection\DuplicateIncludedFilesException;
use PHPStan\DependencyInjection\InvalidIgnoredErrorPatternsException;
use PHPStan\DependencyInjection\LoaderFactory;
use PHPStan\ExtensionInstaller\GeneratedConfig;
use PHPStan\File\FileExcluder;
use PHPStan\File\FileFinder;
use PHPStan\File\FileHelper;
use PHPStan\PhpDoc\StubFilesProvider;
use PHPStan\ShouldNotHappenException;
use ReflectionClass;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\ConsoleOutputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
use Throwable;
use function array_filter;
use function array_key_exists;
use function array_map;
use function array_values;
use function class_exists;
use function count;
use function dirname;
use function error_get_last;
use function get_class;
use function getcwd;
use function gettype;
use function implode;
use function ini_get;
use function ini_set;
use function is_dir;
use function is_file;
use function is_readable;
use function is_string;
use function mkdir;
use function register_shutdown_function;
use function spl_autoload_functions;
use function sprintf;
use function str_repeat;
use function strpos;
use function sys_get_temp_dir;
use const DIRECTORY_SEPARATOR;
use const E_ERROR;
use const PHP_VERSION_ID;
class CommandHelper
{
    public const DEFAULT_LEVEL = '0';
    /**
     * @var string|null
     */
    private static $reservedMemory;
    /**
     * @param string[] $paths
     * @param string[] $composerAutoloaderProjectPaths
     *
     * @throws InceptionNotSuccessfulException
     */
    public static function begin(InputInterface $input, OutputInterface $output, array $paths, ?string $memoryLimit, ?string $autoloadFile, array $composerAutoloaderProjectPaths, ?string $projectConfigFile, ?string $generateBaselineFile, ?string $level, bool $allowXdebug, bool $debugEnabled = \false, bool $cleanupContainerCache = \true) : \PHPStan\Command\InceptionResult
    {
        $stdOutput = new SymfonyOutput($output, new SymfonyStyle(new \PHPStan\Command\ErrorsConsoleStyle($input, $output)));
        $errorOutput = (static function () use($input, $output) : \PHPStan\Command\Output {
            $symfonyErrorOutput = $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output;
            return new SymfonyOutput($symfonyErrorOutput, new SymfonyStyle(new \PHPStan\Command\ErrorsConsoleStyle($input, $symfonyErrorOutput)));
        })();
        if (!$allowXdebug) {
            $xdebug = new XdebugHandler('phpstan');
            $xdebug->setPersistent();
            $xdebug->check();
            unset($xdebug);
        }
        if ($allowXdebug) {
            if (!XdebugHandler::isXdebugActive()) {
                $errorOutput->getStyle()->note('You are running with "--xdebug" enabled, but the Xdebug PHP extension is not active. The process will not halt at breakpoints.');
            } else {
                $errorOutput->getStyle()->note("You are running with \"--xdebug\" enabled, and the Xdebug PHP extension is active.\nThe process will halt at breakpoints, but PHPStan will run much slower.\nUse this only if you are debugging PHPStan itself or your custom extensions.");
            }
        } elseif (XdebugHandler::isXdebugActive()) {
            $errorOutput->getStyle()->note('The Xdebug PHP extension is active, but "--xdebug" is not used. This may slow down performance and the process will not halt at breakpoints.');
        }
        if ($memoryLimit !== null) {
            if (Strings::match($memoryLimit, '#^-?\\d+[kMG]?$#i') === null) {
                $errorOutput->writeLineFormatted(sprintf('Invalid memory limit format "%s".', $memoryLimit));
                throw new \PHPStan\Command\InceptionNotSuccessfulException();
            }
            if (ini_set('memory_limit', $memoryLimit) === \false) {
                $errorOutput->writeLineFormatted(sprintf('Memory limit "%s" cannot be set.', $memoryLimit));
                throw new \PHPStan\Command\InceptionNotSuccessfulException();
            }
        }
        self::$reservedMemory = str_repeat('PHPStan', 1463);
        // reserve 10 kB of space
        register_shutdown_function(static function () use($errorOutput) : void {
            self::$reservedMemory = null;
            $error = error_get_last();
            if ($error === null) {
                return;
            }
            if ($error['type'] !== E_ERROR) {
                return;
            }
            if (strpos($error['message'], 'Allowed memory size') === \false) {
                return;
            }
            $errorOutput->writeLineFormatted('');
            $errorOutput->writeLineFormatted(sprintf('<error>PHPStan process crashed because it reached configured PHP memory limit</error>: %s', ini_get('memory_limit')));
            $errorOutput->writeLineFormatted('Increase your memory limit in php.ini or run PHPStan with --memory-limit CLI option.');
        });
        $currentWorkingDirectory = getcwd();
        if ($currentWorkingDirectory === \false) {
            throw new ShouldNotHappenException();
        }
        $currentWorkingDirectoryFileHelper = new FileHelper($currentWorkingDirectory);
        $currentWorkingDirectory = $currentWorkingDirectoryFileHelper->getWorkingDirectory();
        /** @var array<callable>|false $autoloadFunctionsBefore */
        $autoloadFunctionsBefore = spl_autoload_functions();
        if ($autoloadFile !== null) {
            $autoloadFile = $currentWorkingDirectoryFileHelper->absolutizePath($autoloadFile);
            if (!is_file($autoloadFile)) {
                $errorOutput->writeLineFormatted(sprintf('Autoload file "%s" not found.', $autoloadFile));
                throw new \PHPStan\Command\InceptionNotSuccessfulException();
            }
            (static function (string $file) : void {
                require_once $file;
            })($autoloadFile);
        }
        if ($projectConfigFile === null) {
            foreach (['phpstan.neon', 'phpstan.neon.dist', 'phpstan.dist.neon'] as $discoverableConfigName) {
                $discoverableConfigFile = $currentWorkingDirectory . DIRECTORY_SEPARATOR . $discoverableConfigName;
                if (is_file($discoverableConfigFile)) {
                    $projectConfigFile = $discoverableConfigFile;
                    $errorOutput->writeLineFormatted(sprintf('Note: Using configuration file %s.', $projectConfigFile));
                    break;
                }
            }
        } else {
            $projectConfigFile = $currentWorkingDirectoryFileHelper->absolutizePath($projectConfigFile);
        }
        if ($generateBaselineFile !== null) {
            $generateBaselineFile = $currentWorkingDirectoryFileHelper->normalizePath($currentWorkingDirectoryFileHelper->absolutizePath($generateBaselineFile));
        }
        $defaultLevelUsed = \false;
        if ($projectConfigFile === null && $level === null) {
            $level = self::DEFAULT_LEVEL;
            $defaultLevelUsed = \true;
        }
        $paths = array_map(static function (string $path) use($currentWorkingDirectoryFileHelper) : string {
            return $currentWorkingDirectoryFileHelper->normalizePath($currentWorkingDirectoryFileHelper->absolutizePath($path));
        }, $paths);
        $analysedPathsFromConfig = [];
        $containerFactory = new ContainerFactory($currentWorkingDirectory, \true);
        $projectConfig = null;
        if ($projectConfigFile !== null) {
            if (!is_file($projectConfigFile)) {
                $errorOutput->writeLineFormatted(sprintf('Project config file at path %s does not exist.', $projectConfigFile));
                throw new \PHPStan\Command\InceptionNotSuccessfulException();
            }
            $loader = (new LoaderFactory($currentWorkingDirectoryFileHelper, $containerFactory->getRootDirectory(), $containerFactory->getCurrentWorkingDirectory(), $generateBaselineFile))->createLoader();
            try {
                $projectConfig = $loader->load($projectConfigFile, null);
            } catch (InvalidStateException|FileNotFoundException $e) {
                $errorOutput->writeLineFormatted($e->getMessage());
                throw new \PHPStan\Command\InceptionNotSuccessfulException();
            }
            $defaultParameters = ['rootDir' => $containerFactory->getRootDirectory(), 'currentWorkingDirectory' => $containerFactory->getCurrentWorkingDirectory()];
            if (isset($projectConfig['parameters']['tmpDir'])) {
                $tmpDir = Helpers::expand($projectConfig['parameters']['tmpDir'], $defaultParameters);
            }
            if ($level === null && isset($projectConfig['parameters']['level'])) {
                $level = (string) $projectConfig['parameters']['level'];
            }
            if (isset($projectConfig['parameters']['paths'])) {
                $analysedPathsFromConfig = Helpers::expand($projectConfig['parameters']['paths'], $defaultParameters);
            }
            if (count($paths) === 0) {
                $paths = $analysedPathsFromConfig;
            }
        }
        $additionalConfigFiles = [];
        if ($level !== null) {
            $levelConfigFile = sprintf('%s/config.level%s.neon', $containerFactory->getConfigDirectory(), $level);
            if (!is_file($levelConfigFile)) {
                $errorOutput->writeLineFormatted(sprintf('Level config file %s was not found.', $levelConfigFile));
                throw new \PHPStan\Command\InceptionNotSuccessfulException();
            }
            $additionalConfigFiles[] = $levelConfigFile;
        }
        if (class_exists('PHPStan\\ExtensionInstaller\\GeneratedConfig')) {
            $generatedConfigReflection = new ReflectionClass('PHPStan\\ExtensionInstaller\\GeneratedConfig');
            $generatedConfigDirectory = dirname($generatedConfigReflection->getFileName());
            foreach (GeneratedConfig::EXTENSIONS as $name => $extensionConfig) {
                foreach ($extensionConfig['extra']['includes'] ?? [] as $includedFile) {
                    if (!is_string($includedFile)) {
                        $errorOutput->writeLineFormatted(sprintf('Cannot include config from package %s, expecting string file path but got %s', $name, gettype($includedFile)));
                        throw new \PHPStan\Command\InceptionNotSuccessfulException();
                    }
                    $includedFilePath = null;
                    if (isset($extensionConfig['relative_install_path'])) {
                        $includedFilePath = sprintf('%s/%s/%s', $generatedConfigDirectory, $extensionConfig['relative_install_path'], $includedFile);
                        if (!is_file($includedFilePath) || !is_readable($includedFilePath)) {
                            $includedFilePath = null;
                        }
                    }
                    if ($includedFilePath === null) {
                        $includedFilePath = sprintf('%s/%s', $extensionConfig['install_path'], $includedFile);
                    }
                    if (!is_file($includedFilePath) || !is_readable($includedFilePath)) {
                        $errorOutput->writeLineFormatted(sprintf('Config file %s does not exist or isn\'t readable', $includedFilePath));
                        throw new \PHPStan\Command\InceptionNotSuccessfulException();
                    }
                    $additionalConfigFiles[] = $includedFilePath;
                }
            }
        }
        if ($projectConfigFile !== null && $currentWorkingDirectoryFileHelper->normalizePath($projectConfigFile, '/') !== $currentWorkingDirectoryFileHelper->normalizePath(__DIR__ . '/../../conf/config.stubFiles.neon', '/')) {
            $additionalConfigFiles[] = $projectConfigFile;
        }
        $createDir = static function (string $path) use($errorOutput) : void {
            if (!is_dir($path) && !@mkdir($path, 0777) && !is_dir($path)) {
                $errorOutput->writeLineFormatted(sprintf('Cannot create a temp directory %s', $path));
                throw new \PHPStan\Command\InceptionNotSuccessfulException();
            }
        };
        if (!isset($tmpDir)) {
            $tmpDir = sys_get_temp_dir() . '/phpstan';
            $createDir($tmpDir);
        }
        try {
            $container = $containerFactory->create($tmpDir, $additionalConfigFiles, $paths, $composerAutoloaderProjectPaths, $analysedPathsFromConfig, $level ?? self::DEFAULT_LEVEL, $generateBaselineFile, $autoloadFile);
        } catch (InvalidConfigurationException|AssertionException $e) {
            $errorOutput->writeLineFormatted('<error>Invalid configuration:</error>');
            $errorOutput->writeLineFormatted($e->getMessage());
            throw new \PHPStan\Command\InceptionNotSuccessfulException();
        } catch (InvalidIgnoredErrorPatternsException $e) {
            $errorOutput->writeLineFormatted(sprintf('<error>Invalid %s in ignoreErrors:</error>', count($e->getErrors()) === 1 ? 'entry' : 'entries'));
            foreach ($e->getErrors() as $error) {
                $errorOutput->writeLineFormatted($error);
                $errorOutput->writeLineFormatted('');
            }
            throw new \PHPStan\Command\InceptionNotSuccessfulException();
        } catch (ValidationException $e) {
            foreach ($e->getMessages() as $message) {
                $errorOutput->writeLineFormatted('<error>Invalid configuration:</error>');
                $errorOutput->writeLineFormatted($message);
            }
            throw new \PHPStan\Command\InceptionNotSuccessfulException();
        } catch (ServiceCreationException $e) {
            $matches = Strings::match($e->getMessage(), '#Service of type (?<serviceType>[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff\\\\]*[a-zA-Z0-9_\\x7f-\\xff]): Service of type (?<parserServiceType>[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff\\\\]*[a-zA-Z0-9_\\x7f-\\xff]) needed by \\$(?<parameterName>[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*) in (?<methodName>[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*)\\(\\)#');
            if ($matches === null) {
                throw $e;
            }
            if ($matches['parserServiceType'] !== 'PHPStan\\Parser\\Parser') {
                throw $e;
            }
            if ($matches['methodName'] !== '__construct') {
                throw $e;
            }
            $errorOutput->writeLineFormatted('<error>Invalid configuration:</error>');
            $errorOutput->writeLineFormatted(sprintf("Service of type <fg=cyan>%s</> is no longer autowired.\n", $matches['parserServiceType']));
            $errorOutput->writeLineFormatted('You need to choose one of the following services');
            $errorOutput->writeLineFormatted(sprintf('and use it in the %s argument of your service <fg=cyan>%s</>:', $matches['parameterName'], $matches['serviceType']));
            $errorOutput->writeLineFormatted('* <fg=cyan>defaultAnalysisParser</> (if you\'re parsing files from analysed paths)');
            $errorOutput->writeLineFormatted('* <fg=cyan>currentPhpVersionSimpleDirectParser</> (in most other situations)');
            $errorOutput->writeLineFormatted('');
            $errorOutput->writeLineFormatted('After fixing this problem, your configuration will look something like this:');
            $errorOutput->writeLineFormatted('');
            $errorOutput->writeLineFormatted('-');
            $errorOutput->writeLineFormatted(sprintf("\tclass: %s", $matches['serviceType']));
            $errorOutput->writeLineFormatted(sprintf("\targuments:"));
            $errorOutput->writeLineFormatted(sprintf("\t\t%s: @defaultAnalysisParser", $matches['parameterName']));
            $errorOutput->writeLineFormatted('');
            throw new \PHPStan\Command\InceptionNotSuccessfulException();
        } catch (DuplicateIncludedFilesException $e) {
            $format = "<error>These files are included multiple times:</error>\n- %s";
            if (count($e->getFiles()) === 1) {
                $format = "<error>This file is included multiple times:</error>\n- %s";
            }
            $errorOutput->writeLineFormatted(sprintf($format, implode("\n- ", $e->getFiles())));
            if (class_exists('PHPStan\\ExtensionInstaller\\GeneratedConfig')) {
                $errorOutput->writeLineFormatted('');
                $errorOutput->writeLineFormatted('It can lead to unexpected results. If you\'re using phpstan/extension-installer, make sure you have removed corresponding neon files from your project config file.');
            }
            throw new \PHPStan\Command\InceptionNotSuccessfulException();
        }
        if ($cleanupContainerCache) {
            $containerFactory->clearOldContainers($tmpDir);
        }
        if (count($paths) === 0) {
            $errorOutput->writeLineFormatted('At least one path must be specified to analyse.');
            throw new \PHPStan\Command\InceptionNotSuccessfulException();
        }
        /** @var bool|null $customRulesetUsed */
        $customRulesetUsed = $container->getParameter('customRulesetUsed');
        if ($customRulesetUsed === null) {
            $errorOutput->writeLineFormatted('');
            $errorOutput->writeLineFormatted('<comment>No rules detected</comment>');
            $errorOutput->writeLineFormatted('');
            $errorOutput->writeLineFormatted('You have the following choices:');
            $errorOutput->writeLineFormatted('');
            $errorOutput->writeLineFormatted('* while running the analyse option, use the <info>--level</info> option to adjust your rule level - the higher the stricter');
            $errorOutput->writeLineFormatted('');
            $errorOutput->writeLineFormatted(sprintf('* create your own <info>custom ruleset</info> by selecting which rules you want to check by copying the service definitions from the built-in config level files in <options=bold>%s</>.', $currentWorkingDirectoryFileHelper->normalizePath(__DIR__ . '/../../conf')));
            $errorOutput->writeLineFormatted('  * in this case, don\'t forget to define parameter <options=bold>customRulesetUsed</> in your config file.');
            $errorOutput->writeLineFormatted('');
            throw new \PHPStan\Command\InceptionNotSuccessfulException();
        } elseif ($customRulesetUsed) {
            $defaultLevelUsed = \false;
        }
        foreach ($container->getParameter('bootstrapFiles') as $bootstrapFileFromArray) {
            self::executeBootstrapFile($bootstrapFileFromArray, $container, $errorOutput, $debugEnabled);
        }
        /** @var array<callable>|false $autoloadFunctionsAfter */
        $autoloadFunctionsAfter = spl_autoload_functions();
        if ($autoloadFunctionsBefore !== \false && $autoloadFunctionsAfter !== \false) {
            $newAutoloadFunctions = $GLOBALS['__phpstanAutoloadFunctions'] ?? [];
            foreach ($autoloadFunctionsAfter as $after) {
                foreach ($autoloadFunctionsBefore as $before) {
                    if ($after === $before) {
                        continue 2;
                    }
                }
                $newAutoloadFunctions[] = $after;
            }
            $GLOBALS['__phpstanAutoloadFunctions'] = $newAutoloadFunctions;
        }
        if (PHP_VERSION_ID >= 80000) {
            require_once __DIR__ . '/../../stubs/runtime/Enum/UnitEnum.php';
            require_once __DIR__ . '/../../stubs/runtime/Enum/BackedEnum.php';
            require_once __DIR__ . '/../../stubs/runtime/Enum/ReflectionEnum.php';
            require_once __DIR__ . '/../../stubs/runtime/Enum/ReflectionEnumUnitCase.php';
            require_once __DIR__ . '/../../stubs/runtime/Enum/ReflectionEnumBackedCase.php';
        }
        foreach ($container->getParameter('scanFiles') as $scannedFile) {
            if (is_file($scannedFile)) {
                continue;
            }
            $errorOutput->writeLineFormatted(sprintf('Scanned file %s does not exist.', $scannedFile));
            throw new \PHPStan\Command\InceptionNotSuccessfulException();
        }
        foreach ($container->getParameter('scanDirectories') as $scannedDirectory) {
            if (is_dir($scannedDirectory)) {
                continue;
            }
            $errorOutput->writeLineFormatted(sprintf('Scanned directory %s does not exist.', $scannedDirectory));
            throw new \PHPStan\Command\InceptionNotSuccessfulException();
        }
        $alreadyAddedStubFiles = [];
        foreach ($container->getParameter('stubFiles') as $stubFile) {
            if (array_key_exists($stubFile, $alreadyAddedStubFiles)) {
                $errorOutput->writeLineFormatted(sprintf('Stub file %s is added multiple times.', $stubFile));
                throw new \PHPStan\Command\InceptionNotSuccessfulException();
            }
            $alreadyAddedStubFiles[$stubFile] = \true;
            if (is_file($stubFile)) {
                continue;
            }
            $errorOutput->writeLineFormatted(sprintf('Stub file %s does not exist.', $stubFile));
            throw new \PHPStan\Command\InceptionNotSuccessfulException();
        }
        $excludesAnalyse = $container->getParameter('excludes_analyse');
        $excludePaths = $container->getParameter('excludePaths');
        if (count($excludesAnalyse) > 0 && $excludePaths !== null) {
            $errorOutput->writeLineFormatted(sprintf('Configuration parameters <fg=cyan>excludes_analyse</> and <fg=cyan>excludePaths</> cannot be used at the same time.'));
            $errorOutput->writeLineFormatted('');
            $errorOutput->writeLineFormatted(sprintf('Parameter <fg=cyan>excludes_analyse</> has been deprecated so use <fg=cyan>excludePaths</> only from now on.'));
            $errorOutput->writeLineFormatted('');
            throw new \PHPStan\Command\InceptionNotSuccessfulException();
        } elseif (count($excludesAnalyse) > 0) {
            $errorOutput->writeLineFormatted('⚠️  You\'re using a deprecated config option <fg=cyan>excludes_analyse</>. ⚠️️');
            $errorOutput->writeLineFormatted('');
            $errorOutput->writeLineFormatted(sprintf('Parameter <fg=cyan>excludes_analyse</> has been deprecated so use <fg=cyan>excludePaths</> only from now on.'));
        }
        $tempResultCachePath = $container->getParameter('tempResultCachePath');
        $createDir($tempResultCachePath);
        /** @var FileFinder $fileFinder */
        $fileFinder = $container->getService('fileFinderAnalyse');
        $pathRoutingParser = $container->getService('pathRoutingParser');
        $stubFilesProvider = $container->getByType(StubFilesProvider::class);
        $filesCallback = static function () use($currentWorkingDirectoryFileHelper, $stubFilesProvider, $fileFinder, $pathRoutingParser, $paths) : array {
            $fileFinderResult = $fileFinder->findFiles($paths);
            $files = $fileFinderResult->getFiles();
            $pathRoutingParser->setAnalysedFiles($files);
            $stubFilesExcluder = new FileExcluder($currentWorkingDirectoryFileHelper, $stubFilesProvider->getProjectStubFiles());
            $files = array_values(array_filter($files, static function (string $file) use($stubFilesExcluder) {
                return !$stubFilesExcluder->isExcludedFromAnalysing($file);
            }));
            return [$files, $fileFinderResult->isOnlyFiles()];
        };
        return new \PHPStan\Command\InceptionResult($filesCallback, $stdOutput, $errorOutput, $container, $defaultLevelUsed, $projectConfigFile, $projectConfig, $generateBaselineFile);
    }
    /**
     * @throws InceptionNotSuccessfulException
     */
    private static function executeBootstrapFile(string $file, Container $container, \PHPStan\Command\Output $errorOutput, bool $debugEnabled) : void
    {
        if (!is_file($file)) {
            $errorOutput->writeLineFormatted(sprintf('Bootstrap file %s does not exist.', $file));
            throw new \PHPStan\Command\InceptionNotSuccessfulException();
        }
        try {
            (static function (string $file) use($container) : void {
                require_once $file;
            })($file);
        } catch (Throwable $e) {
            $errorOutput->writeLineFormatted(sprintf('%s thrown in %s on line %d while loading bootstrap file %s: %s', get_class($e), $e->getFile(), $e->getLine(), $file, $e->getMessage()));
            if ($debugEnabled) {
                $errorOutput->writeLineFormatted($e->getTraceAsString());
            }
            throw new \PHPStan\Command\InceptionNotSuccessfulException();
        }
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Command;

use _PHPStan_dcc7b7cff\Clue\React\NDJson\Decoder;
use _PHPStan_dcc7b7cff\Clue\React\NDJson\Encoder;
use _PHPStan_dcc7b7cff\Composer\CaBundle\CaBundle;
use DateTime;
use DateTimeImmutable;
use DateTimeZone;
use _PHPStan_dcc7b7cff\Nette\Utils\Json;
use Phar;
use PHPStan\Analyser\AnalyserResult;
use PHPStan\Analyser\Error;
use PHPStan\Analyser\IgnoredErrorHelper;
use PHPStan\Analyser\ResultCache\ResultCacheManagerFactory;
use PHPStan\File\FileMonitor;
use PHPStan\File\FileMonitorResult;
use PHPStan\File\FileReader;
use PHPStan\File\FileWriter;
use PHPStan\Internal\ComposerHelper;
use PHPStan\Process\ProcessHelper;
use PHPStan\Process\ProcessPromise;
use PHPStan\ShouldNotHappenException;
use _PHPStan_dcc7b7cff\Psr\Http\Message\ResponseInterface;
use _PHPStan_dcc7b7cff\React\ChildProcess\Process;
use _PHPStan_dcc7b7cff\React\Dns\Config\Config;
use _PHPStan_dcc7b7cff\React\EventLoop\Loop;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use _PHPStan_dcc7b7cff\React\EventLoop\StreamSelectLoop;
use _PHPStan_dcc7b7cff\React\Http\Browser;
use _PHPStan_dcc7b7cff\React\Promise\CancellablePromiseInterface;
use _PHPStan_dcc7b7cff\React\Promise\ExtendedPromiseInterface;
use _PHPStan_dcc7b7cff\React\Promise\PromiseInterface;
use _PHPStan_dcc7b7cff\React\Socket\ConnectionInterface;
use _PHPStan_dcc7b7cff\React\Socket\Connector;
use _PHPStan_dcc7b7cff\React\Socket\TcpServer;
use _PHPStan_dcc7b7cff\React\Stream\ReadableStreamInterface;
use RuntimeException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper\ProgressBar;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\OutputInterface;
use Throwable;
use function count;
use function defined;
use function escapeshellarg;
use function fclose;
use function fopen;
use function fwrite;
use function getenv;
use function http_build_query;
use function ini_get;
use function is_dir;
use function is_file;
use function is_string;
use function memory_get_peak_usage;
use function mkdir;
use function parse_url;
use function _PHPStan_dcc7b7cff\React\Async\await;
use function _PHPStan_dcc7b7cff\React\Promise\resolve;
use function sprintf;
use function strlen;
use function unlink;
use const PHP_BINARY;
use const PHP_URL_PORT;
use const PHP_VERSION_ID;
class FixerApplication
{
    /** @var (ExtendedPromiseInterface&CancellablePromiseInterface)|null */
    private $processInProgress;
    /**
     * @var \PHPStan\File\FileMonitor
     */
    private $fileMonitor;
    /**
     * @var \PHPStan\Analyser\ResultCache\ResultCacheManagerFactory
     */
    private $resultCacheManagerFactory;
    /**
     * @var \PHPStan\Analyser\IgnoredErrorHelper
     */
    private $ignoredErrorHelper;
    /**
     * @var string[]
     */
    private $analysedPaths;
    /**
     * @var string
     */
    private $currentWorkingDirectory;
    /**
     * @var string
     */
    private $fixerTmpDir;
    /**
     * @var list<string>
     */
    private $dnsServers;
    /**
     * @param string[] $analysedPaths
     * @param list<string> $dnsServers
     */
    public function __construct(FileMonitor $fileMonitor, ResultCacheManagerFactory $resultCacheManagerFactory, IgnoredErrorHelper $ignoredErrorHelper, array $analysedPaths, string $currentWorkingDirectory, string $fixerTmpDir, array $dnsServers)
    {
        $this->fileMonitor = $fileMonitor;
        $this->resultCacheManagerFactory = $resultCacheManagerFactory;
        $this->ignoredErrorHelper = $ignoredErrorHelper;
        $this->analysedPaths = $analysedPaths;
        $this->currentWorkingDirectory = $currentWorkingDirectory;
        $this->fixerTmpDir = $fixerTmpDir;
        $this->dnsServers = $dnsServers;
    }
    /**
     * @param Error[] $fileSpecificErrors
     * @param string[] $notFileSpecificErrors
     */
    public function run(?string $projectConfigFile, \PHPStan\Command\InceptionResult $inceptionResult, InputInterface $input, OutputInterface $output, array $fileSpecificErrors, array $notFileSpecificErrors, int $filesCount, string $mainScript) : int
    {
        $loop = new StreamSelectLoop();
        $server = new TcpServer('127.0.0.1:0', $loop);
        /** @var string $serverAddress */
        $serverAddress = $server->getAddress();
        /** @var int<0, 65535> $serverPort */
        $serverPort = parse_url($serverAddress, PHP_URL_PORT);
        $server->on('connection', function (ConnectionInterface $connection) use($loop, $projectConfigFile, $input, $output, $fileSpecificErrors, $notFileSpecificErrors, $mainScript, $filesCount, $inceptionResult) : void {
            // phpcs:disable SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly
            $jsonInvalidUtf8Ignore = defined('JSON_INVALID_UTF8_IGNORE') ? \JSON_INVALID_UTF8_IGNORE : 0;
            // phpcs:enable
            $decoder = new Decoder($connection, \true, 512, $jsonInvalidUtf8Ignore, 128 * 1024 * 1024);
            $encoder = new Encoder($connection, $jsonInvalidUtf8Ignore);
            $encoder->write(['action' => 'initialData', 'data' => ['fileSpecificErrors' => $fileSpecificErrors, 'notFileSpecificErrors' => $notFileSpecificErrors, 'currentWorkingDirectory' => $this->currentWorkingDirectory, 'analysedPaths' => $this->analysedPaths, 'projectConfigFile' => $projectConfigFile, 'filesCount' => $filesCount, 'phpstanVersion' => ComposerHelper::getPhpStanVersion()]]);
            $decoder->on('data', static function (array $data) use($output) : void {
                if ($data['action'] === 'webPort') {
                    $output->writeln(sprintf('Open your web browser at: <fg=cyan>http://127.0.0.1:%d</>', $data['data']['port']));
                    $output->writeln('Press [Ctrl-C] to quit.');
                    return;
                }
            });
            $this->fileMonitor->initialize($this->analysedPaths);
            $this->monitorFileChanges($loop, function (FileMonitorResult $changes) use($loop, $mainScript, $projectConfigFile, $input, $encoder, $output, $inceptionResult) : void {
                if ($this->processInProgress !== null) {
                    $this->processInProgress->cancel();
                    $this->processInProgress = null;
                } else {
                    $encoder->write(['action' => 'analysisStart']);
                }
                $this->reanalyseAfterFileChanges($loop, $inceptionResult, $mainScript, $projectConfigFile, $input)->done(function (array $json) use($encoder, $changes) : void {
                    $this->processInProgress = null;
                    $encoder->write(['action' => 'analysisEnd', 'data' => ['fileSpecificErrors' => $json['fileSpecificErrors'], 'notFileSpecificErrors' => $json['notFileSpecificErrors'], 'filesCount' => $changes->getTotalFilesCount()]]);
                }, function (Throwable $e) use($encoder, $output) : void {
                    $this->processInProgress = null;
                    $output->writeln('<error>Worker process exited: ' . $e->getMessage() . '</error>');
                    $encoder->write(['action' => 'analysisCrash', 'data' => ['error' => $e->getMessage()]]);
                });
            });
        });
        try {
            $fixerProcess = $this->getFixerProcess($output, $serverPort);
        } catch (\PHPStan\Command\FixerProcessException $exception) {
            return 1;
        }
        $fixerProcess->start($loop);
        $fixerProcess->on('exit', function ($exitCode) use($output, $loop) : void {
            $loop->stop();
            if ($exitCode === null) {
                return;
            }
            if ($exitCode === 0) {
                return;
            }
            $output->writeln(sprintf('<fg=red>PHPStan Pro process exited with code %d.</>', $exitCode));
            @unlink($this->fixerTmpDir . '/phar-info.json');
        });
        $loop->run();
        return 0;
    }
    /**
     * @throws FixerProcessException
     */
    private function getFixerProcess(OutputInterface $output, int $serverPort) : Process
    {
        if (!@mkdir($this->fixerTmpDir, 0777) && !is_dir($this->fixerTmpDir)) {
            $output->writeln(sprintf('Cannot create a temp directory %s', $this->fixerTmpDir));
            throw new \PHPStan\Command\FixerProcessException();
        }
        $pharPath = $this->fixerTmpDir . '/phpstan-fixer.phar';
        $infoPath = $this->fixerTmpDir . '/phar-info.json';
        try {
            $this->downloadPhar($output, $pharPath, $infoPath);
        } catch (RuntimeException $e) {
            if (!is_file($pharPath)) {
                $this->printDownloadError($output, $e);
                throw new \PHPStan\Command\FixerProcessException();
            }
        }
        $pubKeyPath = $pharPath . '.pubkey';
        FileWriter::write($pubKeyPath, FileReader::read(__DIR__ . '/fixer-phar.pubkey'));
        try {
            $phar = new Phar($pharPath);
        } catch (Throwable $exception) {
            @unlink($pharPath);
            @unlink($infoPath);
            $output->writeln('<fg=red>PHPStan Pro PHAR signature is corrupted.</>');
            throw new \PHPStan\Command\FixerProcessException();
        }
        if ($phar->getSignature()['hash_type'] !== 'OpenSSL') {
            @unlink($pharPath);
            @unlink($infoPath);
            $output->writeln('<fg=red>PHPStan Pro PHAR signature is corrupted.</>');
            throw new \PHPStan\Command\FixerProcessException();
        }
        $env = getenv();
        $forcedPort = $_SERVER['PHPSTAN_PRO_WEB_PORT'] ?? null;
        if ($forcedPort !== null) {
            $env['PHPSTAN_PRO_WEB_PORT'] = $_SERVER['PHPSTAN_PRO_WEB_PORT'];
            $isDocker = $this->isDockerRunning();
            if ($isDocker) {
                $output->writeln('Running in Docker? Don\'t forget to do these steps:');
                $output->writeln('1) Publish this port when running Docker:');
                $output->writeln(sprintf('   <fg=cyan>-p 127.0.0.1:%d:%d</>', $_SERVER['PHPSTAN_PRO_WEB_PORT'], $_SERVER['PHPSTAN_PRO_WEB_PORT']));
                $output->writeln('2) Map the temp directory to a persistent volume');
                $output->writeln('   so that you don\'t have to log in every time:');
                $output->writeln(sprintf('   <fg=cyan>-v ~/.phpstan-pro:%s</>', $this->fixerTmpDir));
                $output->writeln('');
            }
        } else {
            $isDocker = $this->isDockerRunning();
            if ($isDocker) {
                $output->writeln('Running in Docker? You need to do these steps in order to launch PHPStan Pro:');
                $output->writeln('');
                $output->writeln('1) Set the PHPSTAN_PRO_WEB_PORT environment variable in the Dockerfile:');
                $output->writeln('   <fg=cyan>ENV PHPSTAN_PRO_WEB_PORT=11111</>');
                $output->writeln('2) Expose this port in the Dockerfile:');
                $output->writeln('   <fg=cyan>EXPOSE 11111</>');
                $output->writeln('3) Publish this port when running Docker:');
                $output->writeln('   <fg=cyan>-p 127.0.0.1:11111:11111</>');
                $output->writeln('4) Map the temp directory to a persistent volume');
                $output->writeln('   so that you don\'t have to log in every time:');
                $output->writeln(sprintf('   <fg=cyan>-v ~/phpstan-pro:%s</>', $this->fixerTmpDir));
                $output->writeln('');
            }
        }
        return new Process(sprintf('%s -d memory_limit=%s %s --port %d', PHP_BINARY, escapeshellarg(ini_get('memory_limit')), escapeshellarg($pharPath), $serverPort), null, $env, []);
    }
    private function downloadPhar(OutputInterface $output, string $pharPath, string $infoPath) : void
    {
        $currentVersion = null;
        if (is_file($pharPath) && is_file($infoPath)) {
            /** @var array{version: string, date: string} $currentInfo */
            $currentInfo = Json::decode(FileReader::read($infoPath), Json::FORCE_ARRAY);
            $currentVersion = $currentInfo['version'];
            $currentDate = DateTime::createFromFormat(DateTime::ATOM, $currentInfo['date']);
            if ($currentDate === \false) {
                throw new ShouldNotHappenException();
            }
            if (new DateTimeImmutable('', new DateTimeZone('UTC')) <= $currentDate->modify('+24 hours')) {
                return;
            }
            $output->writeln('<fg=green>Checking if there\'s a new PHPStan Pro release...</>');
        }
        $dnsConfig = new Config();
        $dnsConfig->nameservers = $this->dnsServers;
        $client = new Browser(new Connector(['timeout' => 5, 'tls' => ['cafile' => CaBundle::getBundledCaBundlePath()], 'dns' => $dnsConfig]));
        /**
         * @var array{url: string, version: string} $latestInfo
         */
        $latestInfo = Json::decode((string) await($client->get(sprintf('https://fixer-download-api.phpstan.com/latest?%s', http_build_query(['phpVersion' => PHP_VERSION_ID]))))->getBody(), Json::FORCE_ARRAY);
        if ($currentVersion !== null && $latestInfo['version'] === $currentVersion) {
            $this->writeInfoFile($infoPath, $latestInfo['version']);
            $output->writeln('<fg=green>You\'re running the latest PHPStan Pro!</>');
            return;
        }
        $output->writeln('<fg=green>Downloading the latest PHPStan Pro...</>');
        $pharPathResource = fopen($pharPath, 'w');
        if ($pharPathResource === \false) {
            throw new ShouldNotHappenException(sprintf('Could not open file %s for writing.', $pharPath));
        }
        $progressBar = new ProgressBar($output);
        $client->requestStreaming('GET', $latestInfo['url'])->done(static function (ResponseInterface $response) use($progressBar, $pharPathResource) : void {
            $body = $response->getBody();
            if (!$body instanceof ReadableStreamInterface) {
                throw new ShouldNotHappenException();
            }
            $totalSize = (int) $response->getHeaderLine('Content-Length');
            $progressBar->setFormat('file_download');
            $progressBar->setMessage(sprintf('%.2f MB', $totalSize / 1000000), 'fileSize');
            $progressBar->start($totalSize);
            $bytes = 0;
            $body->on('data', static function ($chunk) use($pharPathResource, $progressBar, &$bytes) : void {
                $bytes += strlen($chunk);
                fwrite($pharPathResource, $chunk);
                $progressBar->setProgress($bytes);
            });
        }, function (Throwable $e) use($output) : void {
            $this->printDownloadError($output, $e);
        });
        Loop::run();
        fclose($pharPathResource);
        $progressBar->finish();
        $output->writeln('');
        $output->writeln('');
        $this->writeInfoFile($infoPath, $latestInfo['version']);
    }
    private function printDownloadError(OutputInterface $output, Throwable $e) : void
    {
        $output->writeln(sprintf('<fg=red>Could not download the PHPStan Pro executable:</> %s', $e->getMessage()));
        $output->writeln('');
        $output->writeln('Try different DNS servers in your configuration file:');
        $output->writeln('');
        $output->writeln('parameters:');
        $output->writeln("\tpro:");
        $output->writeln("\t\tdnsServers!:");
        $output->writeln("\t\t\t- '8.8.8.8'");
        $output->writeln('');
    }
    private function writeInfoFile(string $infoPath, string $version) : void
    {
        FileWriter::write($infoPath, Json::encode(['version' => $version, 'date' => (new DateTimeImmutable('', new DateTimeZone('UTC')))->format(DateTime::ATOM)]));
    }
    /**
     * @param callable(FileMonitorResult): void $hasChangesCallback
     */
    private function monitorFileChanges(LoopInterface $loop, callable $hasChangesCallback) : void
    {
        $callback = function () use(&$callback, $loop, $hasChangesCallback) : void {
            $changes = $this->fileMonitor->getChanges();
            if ($changes->hasAnyChanges()) {
                $hasChangesCallback($changes);
            }
            $loop->addTimer(1.0, $callback);
        };
        $loop->addTimer(1.0, $callback);
    }
    private function reanalyseAfterFileChanges(LoopInterface $loop, \PHPStan\Command\InceptionResult $inceptionResult, string $mainScript, ?string $projectConfigFile, InputInterface $input) : PromiseInterface
    {
        $ignoredErrorHelperResult = $this->ignoredErrorHelper->initialize();
        if (count($ignoredErrorHelperResult->getErrors()) > 0) {
            throw new ShouldNotHappenException();
        }
        $projectConfigArray = $inceptionResult->getProjectConfigArray();
        $resultCacheManager = $this->resultCacheManagerFactory->create();
        [$inceptionFiles, $isOnlyFiles] = $inceptionResult->getFiles();
        $resultCache = $resultCacheManager->restore($inceptionFiles, \false, \false, $projectConfigArray, $inceptionResult->getErrorOutput());
        if (count($resultCache->getFilesToAnalyse()) === 0) {
            $result = $resultCacheManager->process(new AnalyserResult([], [], [], [], [], \false, memory_get_peak_usage(\true)), $resultCache, $inceptionResult->getErrorOutput(), \false, \true)->getAnalyserResult();
            $intermediateErrors = $ignoredErrorHelperResult->process($result->getErrors(), $isOnlyFiles, $inceptionFiles, count($result->getInternalErrors()) > 0 || $result->hasReachedInternalErrorsCountLimit());
            $finalFileSpecificErrors = [];
            $finalNotFileSpecificErrors = [];
            foreach ($intermediateErrors as $intermediateError) {
                if (is_string($intermediateError)) {
                    $finalNotFileSpecificErrors[] = $intermediateError;
                    continue;
                }
                $finalFileSpecificErrors[] = $intermediateError;
            }
            return resolve(['fileSpecificErrors' => $finalFileSpecificErrors, 'notFileSpecificErrors' => $finalNotFileSpecificErrors]);
        }
        $options = ['--save-result-cache', '--allow-parallel'];
        $process = new ProcessPromise($loop, 'changedFileAnalysis', ProcessHelper::getWorkerCommand($mainScript, 'fixer:worker', $projectConfigFile, $options, $input));
        $this->processInProgress = $process->run();
        return $this->processInProgress->then(static function (string $output) : array {
            return Json::decode($output, Json::FORCE_ARRAY);
        });
    }
    private function isDockerRunning() : bool
    {
        return is_file('/.dockerenv');
    }
}
<?php

declare (strict_types=1);
namespace PHPStan;

use Exception;
abstract class AnalysedCodeException extends Exception
{
    public abstract function getTip() : ?string;
}
<?php

declare (strict_types=1);
namespace PHPStan;

/**
 * @phpstan-pure
 * @param mixed $value
 * @return mixed
 *
 * @throws void
 */
function dumpType($value)
{
    return null;
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PHPStan\ShouldNotHappenException;
use PHPStan\Type\VerbosityLevel;
use function count;
use function implode;
use function sprintf;
class ConditionalExpressionHolder
{
    /**
     * @var array<string, ExpressionTypeHolder>
     */
    private $conditionExpressionTypeHolders;
    /**
     * @var \PHPStan\Analyser\ExpressionTypeHolder
     */
    private $typeHolder;
    /**
     * @param array<string, ExpressionTypeHolder> $conditionExpressionTypeHolders
     */
    public function __construct(array $conditionExpressionTypeHolders, \PHPStan\Analyser\ExpressionTypeHolder $typeHolder)
    {
        $this->conditionExpressionTypeHolders = $conditionExpressionTypeHolders;
        $this->typeHolder = $typeHolder;
        if (count($conditionExpressionTypeHolders) === 0) {
            throw new ShouldNotHappenException();
        }
    }
    /**
     * @return array<string, ExpressionTypeHolder>
     */
    public function getConditionExpressionTypeHolders() : array
    {
        return $this->conditionExpressionTypeHolders;
    }
    public function getTypeHolder() : \PHPStan\Analyser\ExpressionTypeHolder
    {
        return $this->typeHolder;
    }
    public function getKey() : string
    {
        $parts = [];
        foreach ($this->conditionExpressionTypeHolders as $exprString => $typeHolder) {
            $parts[] = $exprString . '=' . $typeHolder->getType()->describe(VerbosityLevel::precise());
        }
        return sprintf('%s => %s (%s)', implode(' && ', $parts), $this->typeHolder->getType()->describe(VerbosityLevel::precise()), $this->typeHolder->getCertainty()->describe());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\Generic\TemplateTypeScope;
use PHPStan\Type\Type;
use function array_key_exists;
use function array_merge;
use function array_shift;
use function count;
use function explode;
use function implode;
use function ltrim;
use function sprintf;
use function strpos;
use function strtolower;
/** @api */
class NameScope
{
    /**
     * @var \PHPStan\Type\Generic\TemplateTypeMap
     */
    private $templateTypeMap;
    /**
     * @var string|null
     */
    private $namespace;
    /**
     * @var array<string, string>
     */
    private $uses;
    /**
     * @var string|null
     */
    private $className;
    /**
     * @var string|null
     */
    private $functionName;
    /**
     * @var array<string, true>
     */
    private $typeAliasesMap = [];
    /**
     * @var bool
     */
    private $bypassTypeAliases = \false;
    /**
     * @var array<string, string>
     */
    private $constUses = [];
    /**
     * @var string|null
     */
    private $typeAliasClassName;
    /**
     * @api
     * @param array<string, string> $uses alias(string) => fullName(string)
     * @param array<string, string> $constUses alias(string) => fullName(string)
     * @param array<string, true> $typeAliasesMap
     */
    public function __construct(?string $namespace, array $uses, ?string $className = null, ?string $functionName = null, ?TemplateTypeMap $templateTypeMap = null, array $typeAliasesMap = [], bool $bypassTypeAliases = \false, array $constUses = [], ?string $typeAliasClassName = null)
    {
        $this->namespace = $namespace;
        $this->uses = $uses;
        $this->className = $className;
        $this->functionName = $functionName;
        $this->typeAliasesMap = $typeAliasesMap;
        $this->bypassTypeAliases = $bypassTypeAliases;
        $this->constUses = $constUses;
        $this->typeAliasClassName = $typeAliasClassName;
        $this->templateTypeMap = $templateTypeMap ?? TemplateTypeMap::createEmpty();
    }
    public function getNamespace() : ?string
    {
        return $this->namespace;
    }
    /**
     * @return array<string, string>
     */
    public function getUses() : array
    {
        return $this->uses;
    }
    public function hasUseAlias(string $name) : bool
    {
        return isset($this->uses[strtolower($name)]);
    }
    /**
     * @return array<string, string>
     */
    public function getConstUses() : array
    {
        return $this->constUses;
    }
    public function getClassName() : ?string
    {
        return $this->className;
    }
    public function getClassNameForTypeAlias() : ?string
    {
        return $this->typeAliasClassName ?? $this->className;
    }
    public function resolveStringName(string $name) : string
    {
        if (strpos($name, '\\') === 0) {
            return ltrim($name, '\\');
        }
        $nameParts = explode('\\', $name);
        $firstNamePart = strtolower($nameParts[0]);
        if (isset($this->uses[$firstNamePart])) {
            if (count($nameParts) === 1) {
                return $this->uses[$firstNamePart];
            }
            array_shift($nameParts);
            return sprintf('%s\\%s', $this->uses[$firstNamePart], implode('\\', $nameParts));
        }
        if ($this->namespace !== null) {
            return sprintf('%s\\%s', $this->namespace, $name);
        }
        return $name;
    }
    /**
     * @return non-empty-list<string>
     */
    public function resolveConstantNames(string $name) : array
    {
        if (strpos($name, '\\') === 0) {
            return [ltrim($name, '\\')];
        }
        $nameParts = explode('\\', $name);
        $firstNamePart = strtolower($nameParts[0]);
        if (count($nameParts) > 1) {
            if (isset($this->uses[$firstNamePart])) {
                array_shift($nameParts);
                return [sprintf('%s\\%s', $this->uses[$firstNamePart], implode('\\', $nameParts))];
            }
        } elseif (isset($this->constUses[$firstNamePart])) {
            return [$this->constUses[$firstNamePart]];
        }
        if ($this->namespace !== null) {
            return [sprintf('%s\\%s', $this->namespace, $name), $name];
        }
        return [$name];
    }
    public function getTemplateTypeScope() : ?TemplateTypeScope
    {
        if ($this->className !== null) {
            if ($this->functionName !== null) {
                return TemplateTypeScope::createWithMethod($this->className, $this->functionName);
            }
            return TemplateTypeScope::createWithClass($this->className);
        }
        if ($this->functionName !== null) {
            return TemplateTypeScope::createWithFunction($this->functionName);
        }
        return null;
    }
    public function getTemplateTypeMap() : TemplateTypeMap
    {
        return $this->templateTypeMap;
    }
    public function resolveTemplateTypeName(string $name) : ?Type
    {
        return $this->templateTypeMap->getType($name);
    }
    public function withTemplateTypeMap(TemplateTypeMap $map) : self
    {
        if ($map->isEmpty() && $this->templateTypeMap->isEmpty()) {
            return $this;
        }
        return new self($this->namespace, $this->uses, $this->className, $this->functionName, new TemplateTypeMap(array_merge($this->templateTypeMap->getTypes(), $map->getTypes())), $this->typeAliasesMap, $this->bypassTypeAliases, $this->constUses);
    }
    public function unsetTemplateType(string $name) : self
    {
        $map = $this->templateTypeMap;
        if (!$map->hasType($name)) {
            return $this;
        }
        return new self($this->namespace, $this->uses, $this->className, $this->functionName, $this->templateTypeMap->unsetType($name), $this->typeAliasesMap, $this->bypassTypeAliases, $this->constUses);
    }
    public function bypassTypeAliases() : self
    {
        return new self($this->namespace, $this->uses, $this->className, $this->functionName, $this->templateTypeMap, $this->typeAliasesMap, \true, $this->constUses);
    }
    public function shouldBypassTypeAliases() : bool
    {
        return $this->bypassTypeAliases;
    }
    public function hasTypeAlias(string $alias) : bool
    {
        return array_key_exists($alias, $this->typeAliasesMap);
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : self
    {
        return new self($properties['namespace'], $properties['uses'], $properties['className'], $properties['functionName'], $properties['templateTypeMap'], $properties['typeAliasesMap'], $properties['bypassTypeAliases'], $properties['constUses']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PhpParser\Node\Scalar\LNumber;
use PhpParser\Node\Stmt;
/** @api */
class StatementResult
{
    /**
     * @var \PHPStan\Analyser\MutatingScope
     */
    private $scope;
    /**
     * @var bool
     */
    private $hasYield;
    /**
     * @var bool
     */
    private $isAlwaysTerminating;
    /**
     * @var StatementExitPoint[]
     */
    private $exitPoints;
    /**
     * @var ThrowPoint[]
     */
    private $throwPoints;
    /**
     * @param StatementExitPoint[] $exitPoints
     * @param ThrowPoint[] $throwPoints
     */
    public function __construct(\PHPStan\Analyser\MutatingScope $scope, bool $hasYield, bool $isAlwaysTerminating, array $exitPoints, array $throwPoints)
    {
        $this->scope = $scope;
        $this->hasYield = $hasYield;
        $this->isAlwaysTerminating = $isAlwaysTerminating;
        $this->exitPoints = $exitPoints;
        $this->throwPoints = $throwPoints;
    }
    public function getScope() : \PHPStan\Analyser\MutatingScope
    {
        return $this->scope;
    }
    public function hasYield() : bool
    {
        return $this->hasYield;
    }
    public function isAlwaysTerminating() : bool
    {
        return $this->isAlwaysTerminating;
    }
    public function filterOutLoopExitPoints() : self
    {
        if (!$this->isAlwaysTerminating) {
            return $this;
        }
        foreach ($this->exitPoints as $exitPoint) {
            $statement = $exitPoint->getStatement();
            if (!$statement instanceof Stmt\Break_ && !$statement instanceof Stmt\Continue_) {
                continue;
            }
            $num = $statement->num;
            if (!$num instanceof LNumber) {
                return new self($this->scope, $this->hasYield, \false, $this->exitPoints, $this->throwPoints);
            }
            if ($num->value !== 1) {
                continue;
            }
            return new self($this->scope, $this->hasYield, \false, $this->exitPoints, $this->throwPoints);
        }
        return $this;
    }
    /**
     * @return StatementExitPoint[]
     */
    public function getExitPoints() : array
    {
        return $this->exitPoints;
    }
    /**
     * @param class-string<Stmt\Continue_>|class-string<Stmt\Break_> $stmtClass
     * @return StatementExitPoint[]
     */
    public function getExitPointsByType(string $stmtClass) : array
    {
        $exitPoints = [];
        foreach ($this->exitPoints as $exitPoint) {
            $statement = $exitPoint->getStatement();
            if (!$statement instanceof $stmtClass) {
                continue;
            }
            $value = $statement->num;
            if ($value === null) {
                $exitPoints[] = $exitPoint;
                continue;
            }
            if (!$value instanceof LNumber) {
                $exitPoints[] = $exitPoint;
                continue;
            }
            $value = $value->value;
            if ($value !== 1) {
                continue;
            }
            $exitPoints[] = $exitPoint;
        }
        return $exitPoints;
    }
    /**
     * @return StatementExitPoint[]
     */
    public function getExitPointsForOuterLoop() : array
    {
        $exitPoints = [];
        foreach ($this->exitPoints as $exitPoint) {
            $statement = $exitPoint->getStatement();
            if (!$statement instanceof Stmt\Continue_ && !$statement instanceof Stmt\Break_) {
                $exitPoints[] = $exitPoint;
                continue;
            }
            if ($statement->num === null) {
                continue;
            }
            if (!$statement->num instanceof LNumber) {
                continue;
            }
            $value = $statement->num->value;
            if ($value === 1) {
                continue;
            }
            $newNode = null;
            if ($value > 2) {
                $newNode = new LNumber($value - 1);
            }
            if ($statement instanceof Stmt\Continue_) {
                $newStatement = new Stmt\Continue_($newNode);
            } else {
                $newStatement = new Stmt\Break_($newNode);
            }
            $exitPoints[] = new \PHPStan\Analyser\StatementExitPoint($newStatement, $exitPoint->getScope());
        }
        return $exitPoints;
    }
    /**
     * @return ThrowPoint[]
     */
    public function getThrowPoints() : array
    {
        return $this->throwPoints;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use _PHPStan_dcc7b7cff\Nette\Utils\Strings;
use PHPStan\File\FileExcluder;
use PHPStan\File\FileHelper;
use function count;
use function implode;
use function is_array;
use function preg_quote;
use function sprintf;
use function str_replace;
class IgnoredError
{
    /**
     * @param mixed[]|string $ignoredError
     * @return string Representation of the ignored error
     */
    public static function stringifyPattern($ignoredError) : string
    {
        if (!is_array($ignoredError)) {
            return $ignoredError;
        }
        // ignore by path
        if (isset($ignoredError['path'])) {
            return sprintf('%s in path %s', $ignoredError['message'], $ignoredError['path']);
        } elseif (isset($ignoredError['paths'])) {
            if (count($ignoredError['paths']) === 1) {
                return sprintf('%s in path %s', $ignoredError['message'], implode(', ', $ignoredError['paths']));
            }
            return sprintf('%s in paths: %s', $ignoredError['message'], implode(', ', $ignoredError['paths']));
        }
        return $ignoredError['message'];
    }
    /**
     * @return bool To ignore or not to ignore?
     */
    public static function shouldIgnore(FileHelper $fileHelper, \PHPStan\Analyser\Error $error, string $ignoredErrorPattern, ?string $path) : bool
    {
        // normalize newlines to allow working with ignore-patterns independent of used OS newline-format
        $errorMessage = $error->getMessage();
        $errorMessage = str_replace(['\\r\\n', '\\r'], '\\n', $errorMessage);
        $ignoredErrorPattern = str_replace([preg_quote('\\r\\n'), preg_quote('\\r')], preg_quote('\\n'), $ignoredErrorPattern);
        if ($path !== null) {
            if (Strings::match($errorMessage, $ignoredErrorPattern) === null) {
                return \false;
            }
            $fileExcluder = new FileExcluder($fileHelper, [$path]);
            $isExcluded = $fileExcluder->isExcludedFromAnalysing($error->getFilePath());
            if (!$isExcluded && $error->getTraitFilePath() !== null) {
                return $fileExcluder->isExcludedFromAnalysing($error->getTraitFilePath());
            }
            return $isExcluded;
        }
        return Strings::match($errorMessage, $ignoredErrorPattern) !== null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PHPStan\Reflection\ClassReflection;
use PHPStan\ShouldNotHappenException;
class ScopeContext
{
    /**
     * @var string
     */
    private $file;
    /**
     * @var \PHPStan\Reflection\ClassReflection|null
     */
    private $classReflection;
    /**
     * @var \PHPStan\Reflection\ClassReflection|null
     */
    private $traitReflection;
    private function __construct(string $file, ?ClassReflection $classReflection, ?ClassReflection $traitReflection)
    {
        $this->file = $file;
        $this->classReflection = $classReflection;
        $this->traitReflection = $traitReflection;
    }
    /** @api */
    public static function create(string $file) : self
    {
        return new self($file, null, null);
    }
    public function beginFile() : self
    {
        return new self($this->file, null, null);
    }
    public function enterClass(ClassReflection $classReflection) : self
    {
        if ($this->classReflection !== null && !$classReflection->isAnonymous()) {
            throw new ShouldNotHappenException();
        }
        if ($classReflection->isTrait()) {
            throw new ShouldNotHappenException();
        }
        return new self($this->file, $classReflection, null);
    }
    public function enterTrait(ClassReflection $traitReflection) : self
    {
        if ($this->classReflection === null) {
            throw new ShouldNotHappenException();
        }
        if (!$traitReflection->isTrait()) {
            throw new ShouldNotHappenException();
        }
        return new self($this->file, $this->classReflection, $traitReflection);
    }
    public function equals(self $otherContext) : bool
    {
        if ($this->file !== $otherContext->file) {
            return \false;
        }
        if ($this->getClassReflection() === null) {
            return $otherContext->getClassReflection() === null;
        } elseif ($otherContext->getClassReflection() === null) {
            return \false;
        }
        $isSameClass = $this->getClassReflection()->getName() === $otherContext->getClassReflection()->getName();
        if ($this->getTraitReflection() === null) {
            return $otherContext->getTraitReflection() === null && $isSameClass;
        } elseif ($otherContext->getTraitReflection() === null) {
            return \false;
        }
        $isSameTrait = $this->getTraitReflection()->getName() === $otherContext->getTraitReflection()->getName();
        return $isSameClass && $isSameTrait;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    public function getClassReflection() : ?ClassReflection
    {
        return $this->classReflection;
    }
    public function getTraitReflection() : ?ClassReflection
    {
        return $this->traitReflection;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Name;
use PhpParser\Node\Param;
use PHPStan\Reflection\ClassMemberAccessAnswerer;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ConstantReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\NamespaceAnswerer;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Type;
use PHPStan\Type\TypeWithClassName;
/** @api */
interface Scope extends ClassMemberAccessAnswerer, NamespaceAnswerer
{
    public function getFile() : string;
    public function getFileDescription() : string;
    public function isDeclareStrictTypes() : bool;
    /**
     * @phpstan-assert-if-true !null $this->getTraitReflection()
     */
    public function isInTrait() : bool;
    public function getTraitReflection() : ?ClassReflection;
    /**
     * @return FunctionReflection|ExtendedMethodReflection|null
     */
    public function getFunction();
    public function getFunctionName() : ?string;
    public function getParentScope() : ?self;
    public function hasVariableType(string $variableName) : TrinaryLogic;
    public function getVariableType(string $variableName) : Type;
    public function canAnyVariableExist() : bool;
    /**
     * @return array<int, string>
     */
    public function getDefinedVariables() : array;
    public function hasConstant(Name $name) : bool;
    public function getPropertyReflection(Type $typeWithProperty, string $propertyName) : ?PropertyReflection;
    public function getMethodReflection(Type $typeWithMethod, string $methodName) : ?ExtendedMethodReflection;
    public function getConstantReflection(Type $typeWithConstant, string $constantName) : ?ConstantReflection;
    public function isInAnonymousFunction() : bool;
    public function getAnonymousFunctionReflection() : ?ParametersAcceptor;
    public function getAnonymousFunctionReturnType() : ?Type;
    public function getType(Expr $node) : Type;
    public function getNativeType(Expr $expr) : Type;
    /**
     * @deprecated Use getNativeType()
     */
    public function doNotTreatPhpDocTypesAsCertain() : self;
    public function resolveName(Name $name) : string;
    public function resolveTypeByName(Name $name) : TypeWithClassName;
    /**
     * @param mixed $value
     */
    public function getTypeFromValue($value) : Type;
    /** @deprecated use hasExpressionType instead */
    public function isSpecified(Expr $node) : bool;
    public function hasExpressionType(Expr $node) : TrinaryLogic;
    public function isInClassExists(string $className) : bool;
    public function isInFunctionExists(string $functionName) : bool;
    public function isInClosureBind() : bool;
    public function isParameterValueNullable(Param $parameter) : bool;
    /**
     * @param Node\Name|Node\Identifier|Node\ComplexType|null $type
     */
    public function getFunctionType($type, bool $isNullable, bool $isVariadic) : Type;
    public function isInExpressionAssign(Expr $expr) : bool;
    public function isUndefinedExpressionAllowed(Expr $expr) : bool;
    public function filterByTruthyValue(Expr $expr) : self;
    public function filterByFalseyValue(Expr $expr) : self;
    public function isInFirstLevelStatement() : bool;
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use _PHPStan_dcc7b7cff\Nette\Utils\Json;
use _PHPStan_dcc7b7cff\Nette\Utils\JsonException;
use PHPStan\File\FileHelper;
use function array_key_exists;
use function array_values;
use function is_array;
use function is_file;
use function sprintf;
class IgnoredErrorHelper
{
    /**
     * @var \PHPStan\File\FileHelper
     */
    private $fileHelper;
    /**
     * @var (string | mixed[])[]
     */
    private $ignoreErrors;
    /**
     * @var bool
     */
    private $reportUnmatchedIgnoredErrors;
    /**
     * @param (string|mixed[])[] $ignoreErrors
     */
    public function __construct(FileHelper $fileHelper, array $ignoreErrors, bool $reportUnmatchedIgnoredErrors)
    {
        $this->fileHelper = $fileHelper;
        $this->ignoreErrors = $ignoreErrors;
        $this->reportUnmatchedIgnoredErrors = $reportUnmatchedIgnoredErrors;
    }
    public function initialize() : \PHPStan\Analyser\IgnoredErrorHelperResult
    {
        $otherIgnoreErrors = [];
        $ignoreErrorsByFile = [];
        $errors = [];
        $expandedIgnoreErrors = [];
        foreach ($this->ignoreErrors as $ignoreError) {
            if (is_array($ignoreError)) {
                if (!isset($ignoreError['message']) && !isset($ignoreError['messages'])) {
                    $errors[] = sprintf('Ignored error %s is missing a message.', Json::encode($ignoreError));
                    continue;
                }
                if (isset($ignoreError['messages'])) {
                    foreach ($ignoreError['messages'] as $message) {
                        $expandedIgnoreError = $ignoreError;
                        unset($expandedIgnoreError['messages']);
                        $expandedIgnoreError['message'] = $message;
                        $expandedIgnoreErrors[] = $expandedIgnoreError;
                    }
                } else {
                    $expandedIgnoreErrors[] = $ignoreError;
                }
            } else {
                $expandedIgnoreErrors[] = $ignoreError;
            }
        }
        $uniquedExpandedIgnoreErrors = [];
        foreach ($expandedIgnoreErrors as $ignoreError) {
            if (!isset($ignoreError['message'])) {
                $uniquedExpandedIgnoreErrors[] = $ignoreError;
                continue;
            }
            if (!isset($ignoreError['path'])) {
                $uniquedExpandedIgnoreErrors[] = $ignoreError;
                continue;
            }
            $key = sprintf("%s\n%s", $ignoreError['message'], $ignoreError['path']);
            if (!array_key_exists($key, $uniquedExpandedIgnoreErrors)) {
                $uniquedExpandedIgnoreErrors[$key] = $ignoreError;
                continue;
            }
            $uniquedExpandedIgnoreErrors[$key] = ['message' => $ignoreError['message'], 'path' => $ignoreError['path'], 'count' => ($uniquedExpandedIgnoreErrors[$key]['count'] ?? 1) + ($ignoreError['count'] ?? 1), 'reportUnmatched' => ($uniquedExpandedIgnoreErrors[$key]['reportUnmatched'] ?? $this->reportUnmatchedIgnoredErrors) || ($ignoreError['reportUnmatched'] ?? $this->reportUnmatchedIgnoredErrors)];
        }
        $expandedIgnoreErrors = array_values($uniquedExpandedIgnoreErrors);
        foreach ($expandedIgnoreErrors as $i => $ignoreError) {
            $ignoreErrorEntry = ['index' => $i, 'ignoreError' => $ignoreError];
            try {
                if (is_array($ignoreError)) {
                    if (!isset($ignoreError['message'])) {
                        $errors[] = sprintf('Ignored error %s is missing a message.', Json::encode($ignoreError));
                        continue;
                    }
                    if (!isset($ignoreError['path'])) {
                        $otherIgnoreErrors[] = $ignoreErrorEntry;
                    } elseif (@is_file($ignoreError['path'])) {
                        $normalizedPath = $this->fileHelper->normalizePath($ignoreError['path']);
                        $ignoreError['path'] = $normalizedPath;
                        $ignoreErrorsByFile[$normalizedPath][] = $ignoreErrorEntry;
                        $ignoreError['realPath'] = $normalizedPath;
                        $expandedIgnoreErrors[$i] = $ignoreError;
                    } else {
                        $otherIgnoreErrors[] = $ignoreErrorEntry;
                    }
                } else {
                    $otherIgnoreErrors[] = $ignoreErrorEntry;
                }
            } catch (JsonException $e) {
                $errors[] = $e->getMessage();
            }
        }
        return new \PHPStan\Analyser\IgnoredErrorHelperResult($this->fileHelper, $errors, $otherIgnoreErrors, $ignoreErrorsByFile, $expandedIgnoreErrors, $this->reportUnmatchedIgnoredErrors);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use Closure;
use PHPStan\Collectors\CollectedData;
use PHPStan\Collectors\Registry as CollectorRegistry;
use PHPStan\Rules\Registry as RuleRegistry;
use Throwable;
use function array_fill_keys;
use function array_merge;
use function count;
use function memory_get_peak_usage;
use function sprintf;
class Analyser
{
    /**
     * @var \PHPStan\Analyser\FileAnalyser
     */
    private $fileAnalyser;
    /**
     * @var RuleRegistry
     */
    private $ruleRegistry;
    /**
     * @var CollectorRegistry
     */
    private $collectorRegistry;
    /**
     * @var \PHPStan\Analyser\NodeScopeResolver
     */
    private $nodeScopeResolver;
    /**
     * @var int
     */
    private $internalErrorsCountLimit;
    public function __construct(\PHPStan\Analyser\FileAnalyser $fileAnalyser, RuleRegistry $ruleRegistry, CollectorRegistry $collectorRegistry, \PHPStan\Analyser\NodeScopeResolver $nodeScopeResolver, int $internalErrorsCountLimit)
    {
        $this->fileAnalyser = $fileAnalyser;
        $this->ruleRegistry = $ruleRegistry;
        $this->collectorRegistry = $collectorRegistry;
        $this->nodeScopeResolver = $nodeScopeResolver;
        $this->internalErrorsCountLimit = $internalErrorsCountLimit;
    }
    /**
     * @param string[] $files
     * @param Closure(string $file): void|null $preFileCallback
     * @param Closure(int ): void|null $postFileCallback
     * @param string[]|null $allAnalysedFiles
     */
    public function analyse(array $files, ?Closure $preFileCallback = null, ?Closure $postFileCallback = null, bool $debug = \false, ?array $allAnalysedFiles = null) : \PHPStan\Analyser\AnalyserResult
    {
        if ($allAnalysedFiles === null) {
            $allAnalysedFiles = $files;
        }
        $this->nodeScopeResolver->setAnalysedFiles($allAnalysedFiles);
        $allAnalysedFiles = array_fill_keys($allAnalysedFiles, \true);
        /** @var list<Error> $errors */
        $errors = [];
        /** @var list<CollectedData> $collectedData */
        $collectedData = [];
        $internalErrorsCount = 0;
        $reachedInternalErrorsCountLimit = \false;
        $dependencies = [];
        $exportedNodes = [];
        foreach ($files as $file) {
            if ($preFileCallback !== null) {
                $preFileCallback($file);
            }
            try {
                $fileAnalyserResult = $this->fileAnalyser->analyseFile($file, $allAnalysedFiles, $this->ruleRegistry, $this->collectorRegistry, null);
                $errors = array_merge($errors, $fileAnalyserResult->getErrors());
                $collectedData = array_merge($collectedData, $fileAnalyserResult->getCollectedData());
                $dependencies[$file] = $fileAnalyserResult->getDependencies();
                $fileExportedNodes = $fileAnalyserResult->getExportedNodes();
                if (count($fileExportedNodes) > 0) {
                    $exportedNodes[$file] = $fileExportedNodes;
                }
            } catch (Throwable $t) {
                if ($debug) {
                    throw $t;
                }
                $internalErrorsCount++;
                $internalErrorMessage = sprintf('Internal error: %s', $t->getMessage());
                $internalErrorMessage .= sprintf('%sRun PHPStan with --debug option and post the stack trace to:%s%s', "\n", "\n", 'https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md');
                $errors[] = new \PHPStan\Analyser\Error($internalErrorMessage, $file, null, $t);
                if ($internalErrorsCount >= $this->internalErrorsCountLimit) {
                    $reachedInternalErrorsCountLimit = \true;
                    break;
                }
            }
            if ($postFileCallback === null) {
                continue;
            }
            $postFileCallback(1);
        }
        return new \PHPStan\Analyser\AnalyserResult($errors, [], $collectedData, $internalErrorsCount === 0 ? $dependencies : null, $exportedNodes, $reachedInternalErrorsCountLimit, memory_get_peak_usage(\true));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\ArrayDimFetch;
use PhpParser\Node\Expr\BinaryOp\BooleanAnd;
use PhpParser\Node\Expr\BinaryOp\BooleanOr;
use PhpParser\Node\Expr\BinaryOp\LogicalAnd;
use PhpParser\Node\Expr\BinaryOp\LogicalOr;
use PhpParser\Node\Expr\ClassConstFetch;
use PhpParser\Node\Expr\ConstFetch;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\Instanceof_;
use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Expr\PropertyFetch;
use PhpParser\Node\Expr\StaticCall;
use PhpParser\Node\Expr\StaticPropertyFetch;
use PhpParser\Node\Name;
use PHPStan\Node\Printer\ExprPrinter;
use PHPStan\Reflection\Assertions;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Reflection\ResolvedFunctionVariant;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
use PHPStan\Type\Accessory\AccessoryNonFalsyStringType;
use PHPStan\Type\Accessory\HasOffsetType;
use PHPStan\Type\Accessory\HasPropertyType;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\BooleanType;
use PHPStan\Type\ConditionalTypeForParameter;
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\ConstantScalarType;
use PHPStan\Type\FloatType;
use PHPStan\Type\FunctionTypeSpecifyingExtension;
use PHPStan\Type\Generic\GenericClassStringType;
use PHPStan\Type\Generic\TemplateType;
use PHPStan\Type\Generic\TemplateTypeHelper;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\MethodTypeSpecifyingExtension;
use PHPStan\Type\MixedType;
use PHPStan\Type\NeverType;
use PHPStan\Type\NonexistentParentClassType;
use PHPStan\Type\NullType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\ObjectWithoutClassType;
use PHPStan\Type\ResourceType;
use PHPStan\Type\StaticMethodTypeSpecifyingExtension;
use PHPStan\Type\StaticType;
use PHPStan\Type\StaticTypeFactory;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypeTraverser;
use PHPStan\Type\UnionType;
use function array_filter;
use function array_key_exists;
use function array_map;
use function array_merge;
use function array_reduce;
use function array_reverse;
use function count;
use function in_array;
use function is_string;
use function strtolower;
use function substr;
class TypeSpecifier
{
    /** @var MethodTypeSpecifyingExtension[][]|null */
    private $methodTypeSpecifyingExtensionsByClass;
    /** @var StaticMethodTypeSpecifyingExtension[][]|null */
    private $staticMethodTypeSpecifyingExtensionsByClass;
    /**
     * @var \PHPStan\Node\Printer\ExprPrinter
     */
    private $exprPrinter;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var FunctionTypeSpecifyingExtension[]
     */
    private $functionTypeSpecifyingExtensions;
    /**
     * @var MethodTypeSpecifyingExtension[]
     */
    private $methodTypeSpecifyingExtensions;
    /**
     * @var StaticMethodTypeSpecifyingExtension[]
     */
    private $staticMethodTypeSpecifyingExtensions;
    /**
     * @var bool
     */
    private $rememberPossiblyImpureFunctionValues;
    /**
     * @param FunctionTypeSpecifyingExtension[] $functionTypeSpecifyingExtensions
     * @param MethodTypeSpecifyingExtension[] $methodTypeSpecifyingExtensions
     * @param StaticMethodTypeSpecifyingExtension[] $staticMethodTypeSpecifyingExtensions
     */
    public function __construct(ExprPrinter $exprPrinter, ReflectionProvider $reflectionProvider, array $functionTypeSpecifyingExtensions, array $methodTypeSpecifyingExtensions, array $staticMethodTypeSpecifyingExtensions, bool $rememberPossiblyImpureFunctionValues)
    {
        $this->exprPrinter = $exprPrinter;
        $this->reflectionProvider = $reflectionProvider;
        $this->functionTypeSpecifyingExtensions = $functionTypeSpecifyingExtensions;
        $this->methodTypeSpecifyingExtensions = $methodTypeSpecifyingExtensions;
        $this->staticMethodTypeSpecifyingExtensions = $staticMethodTypeSpecifyingExtensions;
        $this->rememberPossiblyImpureFunctionValues = $rememberPossiblyImpureFunctionValues;
        foreach (array_merge($functionTypeSpecifyingExtensions, $methodTypeSpecifyingExtensions, $staticMethodTypeSpecifyingExtensions) as $extension) {
            if (!$extension instanceof \PHPStan\Analyser\TypeSpecifierAwareExtension) {
                continue;
            }
            $extension->setTypeSpecifier($this);
        }
    }
    /** @api */
    public function specifyTypesInCondition(\PHPStan\Analyser\Scope $scope, Expr $expr, \PHPStan\Analyser\TypeSpecifierContext $context, ?Expr $rootExpr = null) : \PHPStan\Analyser\SpecifiedTypes
    {
        $rootExpr = $rootExpr ?? $expr;
        if ($expr instanceof Expr\CallLike && $expr->isFirstClassCallable()) {
            return new \PHPStan\Analyser\SpecifiedTypes([], [], \false, [], $rootExpr);
        }
        if ($expr instanceof Instanceof_) {
            $exprNode = $expr->expr;
            if ($expr->class instanceof Name) {
                $className = (string) $expr->class;
                $lowercasedClassName = strtolower($className);
                if ($lowercasedClassName === 'self' && $scope->isInClass()) {
                    $type = new ObjectType($scope->getClassReflection()->getName());
                } elseif ($lowercasedClassName === 'static' && $scope->isInClass()) {
                    $type = new StaticType($scope->getClassReflection());
                } elseif ($lowercasedClassName === 'parent') {
                    if ($scope->isInClass() && $scope->getClassReflection()->getParentClass() !== null) {
                        $type = new ObjectType($scope->getClassReflection()->getParentClass()->getName());
                    } else {
                        $type = new NonexistentParentClassType();
                    }
                } else {
                    $type = new ObjectType($className);
                }
                return $this->create($exprNode, $type, $context, \false, $scope, $rootExpr);
            }
            $classType = $scope->getType($expr->class);
            $type = TypeTraverser::map($classType, static function (Type $type, callable $traverse) : Type {
                if ($type instanceof UnionType || $type instanceof IntersectionType) {
                    return $traverse($type);
                }
                if ($type->getObjectClassNames() !== []) {
                    return $type;
                }
                if ($type instanceof GenericClassStringType) {
                    return $type->getGenericType();
                }
                if ($type instanceof ConstantStringType) {
                    return new ObjectType($type->getValue());
                }
                return new MixedType();
            });
            if (!$type->isSuperTypeOf(new MixedType())->yes()) {
                if ($context->true()) {
                    $type = TypeCombinator::intersect($type, new ObjectWithoutClassType());
                    return $this->create($exprNode, $type, $context, \false, $scope, $rootExpr);
                } elseif ($context->false()) {
                    $exprType = $scope->getType($expr->expr);
                    if (!$type->isSuperTypeOf($exprType)->yes()) {
                        return $this->create($exprNode, $type, $context, \false, $scope, $rootExpr);
                    }
                }
            }
            if ($context->true()) {
                return $this->create($exprNode, new ObjectWithoutClassType(), $context, \false, $scope, $rootExpr);
            }
        } elseif ($expr instanceof Node\Expr\BinaryOp\Identical) {
            $expressions = $this->findTypeExpressionsFromBinaryOperation($scope, $expr);
            if ($expressions !== null) {
                $exprNode = $expressions[0];
                $constantType = $expressions[1];
                $specifiedType = $this->specifyTypesForConstantBinaryExpression($exprNode, $constantType, $context, $scope, $rootExpr);
                if ($specifiedType !== null) {
                    return $specifiedType;
                }
            }
            $rightType = $scope->getType($expr->right);
            if ($expr->left instanceof ClassConstFetch && $expr->left->class instanceof Expr && $expr->left->name instanceof Node\Identifier && $expr->right instanceof ClassConstFetch && $rightType instanceof ConstantStringType && strtolower($expr->left->name->toString()) === 'class') {
                return $this->specifyTypesInCondition($scope, new Instanceof_($expr->left->class, new Name($rightType->getValue())), $context, $rootExpr);
            }
            if ($context->false()) {
                $identicalType = $scope->getType($expr);
                if ($identicalType instanceof ConstantBooleanType) {
                    $never = new NeverType();
                    $contextForTypes = $identicalType->getValue() ? $context->negate() : $context;
                    $leftTypes = $this->create($expr->left, $never, $contextForTypes, \false, $scope, $rootExpr);
                    $rightTypes = $this->create($expr->right, $never, $contextForTypes, \false, $scope, $rootExpr);
                    return $leftTypes->unionWith($rightTypes);
                }
            }
            $types = null;
            $exprLeftType = $scope->getType($expr->left);
            $exprRightType = $scope->getType($expr->right);
            if (count($exprLeftType->getConstantScalarValues()) === 1 || count($exprLeftType->getEnumCases()) === 1 || $exprLeftType->isConstantValue()->yes() && !$exprRightType->equals($exprLeftType) && $exprRightType->isSuperTypeOf($exprLeftType)->yes()) {
                $types = $this->create($expr->right, $exprLeftType, $context, \false, $scope, $rootExpr);
            }
            if (count($exprRightType->getConstantScalarValues()) === 1 || count($exprRightType->getEnumCases()) === 1 || $exprRightType->isConstantValue()->yes() && !$exprLeftType->equals($exprRightType) && $exprLeftType->isSuperTypeOf($exprRightType)->yes()) {
                $leftType = $this->create($expr->left, $exprRightType, $context, \false, $scope, $rootExpr);
                if ($types !== null) {
                    $types = $types->unionWith($leftType);
                } else {
                    $types = $leftType;
                }
            }
            if ($types !== null) {
                return $types;
            }
            $leftExprString = $this->exprPrinter->printExpr($expr->left);
            $rightExprString = $this->exprPrinter->printExpr($expr->right);
            if ($leftExprString === $rightExprString) {
                if (!$expr->left instanceof Expr\Variable || !$expr->right instanceof Expr\Variable) {
                    return new \PHPStan\Analyser\SpecifiedTypes([], [], \false, [], $rootExpr);
                }
            }
            if ($context->true()) {
                $leftTypes = $this->create($expr->left, $exprRightType, $context, \false, $scope, $rootExpr);
                $rightTypes = $this->create($expr->right, $exprLeftType, $context, \false, $scope, $rootExpr);
                return $leftTypes->unionWith($rightTypes);
            } elseif ($context->false()) {
                return $this->create($expr->left, $exprLeftType, $context, \false, $scope, $rootExpr)->normalize($scope)->intersectWith($this->create($expr->right, $exprRightType, $context, \false, $scope, $rootExpr)->normalize($scope));
            }
        } elseif ($expr instanceof Node\Expr\BinaryOp\NotIdentical) {
            return $this->specifyTypesInCondition($scope, new Node\Expr\BooleanNot(new Node\Expr\BinaryOp\Identical($expr->left, $expr->right)), $context, $rootExpr);
        } elseif ($expr instanceof Node\Expr\BinaryOp\Equal) {
            $expressions = $this->findTypeExpressionsFromBinaryOperation($scope, $expr);
            if ($expressions !== null) {
                $exprNode = $expressions[0];
                $constantType = $expressions[1];
                if (!$context->null() && ($constantType->getValue() === \false || $constantType->getValue() === null)) {
                    return $this->specifyTypesInCondition($scope, $exprNode, $context->true() ? \PHPStan\Analyser\TypeSpecifierContext::createFalsey() : \PHPStan\Analyser\TypeSpecifierContext::createFalsey()->negate(), $rootExpr);
                }
                if (!$context->null() && $constantType->getValue() === \true) {
                    return $this->specifyTypesInCondition($scope, $exprNode, $context->true() ? \PHPStan\Analyser\TypeSpecifierContext::createTruthy() : \PHPStan\Analyser\TypeSpecifierContext::createTruthy()->negate(), $rootExpr);
                }
                if ($exprNode instanceof FuncCall && $exprNode->name instanceof Name && strtolower($exprNode->name->toString()) === 'gettype' && isset($exprNode->getArgs()[0]) && $constantType instanceof ConstantStringType) {
                    return $this->specifyTypesInCondition($scope, new Expr\BinaryOp\Identical($expr->left, $expr->right), $context, $rootExpr);
                }
                if ($exprNode instanceof FuncCall && $exprNode->name instanceof Name && strtolower($exprNode->name->toString()) === 'get_class' && isset($exprNode->getArgs()[0]) && $constantType instanceof ConstantStringType) {
                    return $this->specifyTypesInCondition($scope, new Instanceof_($exprNode->getArgs()[0]->value, new Name($constantType->getValue())), $context, $rootExpr);
                }
            }
            $leftType = $scope->getType($expr->left);
            $rightType = $scope->getType($expr->right);
            $leftBooleanType = $leftType->toBoolean();
            if ($leftBooleanType instanceof ConstantBooleanType && $rightType->isBoolean()->yes()) {
                return $this->specifyTypesInCondition($scope, new Expr\BinaryOp\Identical(new ConstFetch(new Name($leftBooleanType->getValue() ? 'true' : 'false')), $expr->right), $context, $rootExpr);
            }
            $rightBooleanType = $rightType->toBoolean();
            if ($rightBooleanType instanceof ConstantBooleanType && $leftType->isBoolean()->yes()) {
                return $this->specifyTypesInCondition($scope, new Expr\BinaryOp\Identical($expr->left, new ConstFetch(new Name($rightBooleanType->getValue() ? 'true' : 'false'))), $context, $rootExpr);
            }
            if (!$context->null() && $rightType->isArray()->yes() && $leftType->isConstantArray()->yes() && $leftType->isIterableAtLeastOnce()->no()) {
                return $this->create($expr->right, new NonEmptyArrayType(), $context->negate(), \false, $scope, $rootExpr);
            }
            if (!$context->null() && $leftType->isArray()->yes() && $rightType->isConstantArray()->yes() && $rightType->isIterableAtLeastOnce()->no()) {
                return $this->create($expr->left, new NonEmptyArrayType(), $context->negate(), \false, $scope, $rootExpr);
            }
            $integerType = new IntegerType();
            $floatType = new FloatType();
            if ($leftType->isString()->yes() && $rightType->isString()->yes() || $integerType->isSuperTypeOf($leftType)->yes() && $integerType->isSuperTypeOf($rightType)->yes() || $floatType->isSuperTypeOf($leftType)->yes() && $floatType->isSuperTypeOf($rightType)->yes()) {
                return $this->specifyTypesInCondition($scope, new Expr\BinaryOp\Identical($expr->left, $expr->right), $context, $rootExpr);
            }
            $leftExprString = $this->exprPrinter->printExpr($expr->left);
            $rightExprString = $this->exprPrinter->printExpr($expr->right);
            if ($leftExprString === $rightExprString) {
                if (!$expr->left instanceof Expr\Variable || !$expr->right instanceof Expr\Variable) {
                    return new \PHPStan\Analyser\SpecifiedTypes([], [], \false, [], $rootExpr);
                }
            }
            $leftTypes = $this->create($expr->left, $leftType, $context, \false, $scope, $rootExpr);
            $rightTypes = $this->create($expr->right, $rightType, $context, \false, $scope, $rootExpr);
            return $context->true() ? $leftTypes->unionWith($rightTypes) : $leftTypes->normalize($scope)->intersectWith($rightTypes->normalize($scope));
        } elseif ($expr instanceof Node\Expr\BinaryOp\NotEqual) {
            return $this->specifyTypesInCondition($scope, new Node\Expr\BooleanNot(new Node\Expr\BinaryOp\Equal($expr->left, $expr->right)), $context, $rootExpr);
        } elseif ($expr instanceof Node\Expr\BinaryOp\Smaller || $expr instanceof Node\Expr\BinaryOp\SmallerOrEqual) {
            if ($expr->left instanceof FuncCall && count($expr->left->getArgs()) === 1 && $expr->left->name instanceof Name && in_array(strtolower((string) $expr->left->name), ['count', 'sizeof', 'strlen'], \true) && (!$expr->right instanceof FuncCall || !$expr->right->name instanceof Name || !in_array(strtolower((string) $expr->right->name), ['count', 'sizeof', 'strlen'], \true))) {
                $inverseOperator = $expr instanceof Node\Expr\BinaryOp\Smaller ? new Node\Expr\BinaryOp\SmallerOrEqual($expr->right, $expr->left) : new Node\Expr\BinaryOp\Smaller($expr->right, $expr->left);
                return $this->specifyTypesInCondition($scope, new Node\Expr\BooleanNot($inverseOperator), $context, $rootExpr);
            }
            $orEqual = $expr instanceof Node\Expr\BinaryOp\SmallerOrEqual;
            $offset = $orEqual ? 0 : 1;
            $leftType = $scope->getType($expr->left);
            $result = new \PHPStan\Analyser\SpecifiedTypes([], [], \false, [], $rootExpr);
            if (!$context->null() && $expr->right instanceof FuncCall && count($expr->right->getArgs()) === 1 && $expr->right->name instanceof Name && in_array(strtolower((string) $expr->right->name), ['count', 'sizeof'], \true) && (new IntegerType())->isSuperTypeOf($leftType)->yes()) {
                if ($context->truthy() && IntegerRangeType::createAllGreaterThanOrEqualTo(1 - $offset)->isSuperTypeOf($leftType)->yes() || $context->falsey() && (new ConstantIntegerType(1 - $offset))->isSuperTypeOf($leftType)->yes()) {
                    $argType = $scope->getType($expr->right->getArgs()[0]->value);
                    if ($argType->isArray()->yes()) {
                        $result = $result->unionWith($this->create($expr->right->getArgs()[0]->value, new NonEmptyArrayType(), $context, \false, $scope, $rootExpr));
                    }
                }
            }
            if (!$context->null() && $expr->right instanceof FuncCall && count($expr->right->getArgs()) === 1 && $expr->right->name instanceof Name && strtolower((string) $expr->right->name) === 'strlen' && (new IntegerType())->isSuperTypeOf($leftType)->yes()) {
                if ($context->truthy() && IntegerRangeType::createAllGreaterThanOrEqualTo(1 - $offset)->isSuperTypeOf($leftType)->yes() || $context->falsey() && (new ConstantIntegerType(1 - $offset))->isSuperTypeOf($leftType)->yes()) {
                    $argType = $scope->getType($expr->right->getArgs()[0]->value);
                    if ($argType->isString()->yes()) {
                        $accessory = new AccessoryNonEmptyStringType();
                        if ($leftType instanceof ConstantIntegerType && $leftType->getValue() >= 2) {
                            $accessory = new AccessoryNonFalsyStringType();
                        }
                        $result = $result->unionWith($this->create($expr->right->getArgs()[0]->value, $accessory, $context, \false, $scope, $rootExpr));
                    }
                }
            }
            if ($leftType instanceof ConstantIntegerType) {
                if ($expr->right instanceof Expr\PostInc) {
                    $result = $result->unionWith($this->createRangeTypes($rootExpr, $expr->right->var, IntegerRangeType::fromInterval($leftType->getValue(), null, $offset + 1), $context));
                } elseif ($expr->right instanceof Expr\PostDec) {
                    $result = $result->unionWith($this->createRangeTypes($rootExpr, $expr->right->var, IntegerRangeType::fromInterval($leftType->getValue(), null, $offset - 1), $context));
                } elseif ($expr->right instanceof Expr\PreInc || $expr->right instanceof Expr\PreDec) {
                    $result = $result->unionWith($this->createRangeTypes($rootExpr, $expr->right->var, IntegerRangeType::fromInterval($leftType->getValue(), null, $offset), $context));
                }
            }
            $rightType = $scope->getType($expr->right);
            if ($rightType instanceof ConstantIntegerType) {
                if ($expr->left instanceof Expr\PostInc) {
                    $result = $result->unionWith($this->createRangeTypes($rootExpr, $expr->left->var, IntegerRangeType::fromInterval(null, $rightType->getValue(), -$offset + 1), $context));
                } elseif ($expr->left instanceof Expr\PostDec) {
                    $result = $result->unionWith($this->createRangeTypes($rootExpr, $expr->left->var, IntegerRangeType::fromInterval(null, $rightType->getValue(), -$offset - 1), $context));
                } elseif ($expr->left instanceof Expr\PreInc || $expr->left instanceof Expr\PreDec) {
                    $result = $result->unionWith($this->createRangeTypes($rootExpr, $expr->left->var, IntegerRangeType::fromInterval(null, $rightType->getValue(), -$offset), $context));
                }
            }
            if ($context->true()) {
                if (!$expr->left instanceof Node\Scalar) {
                    $result = $result->unionWith($this->create($expr->left, $orEqual ? $rightType->getSmallerOrEqualType() : $rightType->getSmallerType(), \PHPStan\Analyser\TypeSpecifierContext::createTruthy(), \false, $scope, $rootExpr));
                }
                if (!$expr->right instanceof Node\Scalar) {
                    $result = $result->unionWith($this->create($expr->right, $orEqual ? $leftType->getGreaterOrEqualType() : $leftType->getGreaterType(), \PHPStan\Analyser\TypeSpecifierContext::createTruthy(), \false, $scope, $rootExpr));
                }
            } elseif ($context->false()) {
                if (!$expr->left instanceof Node\Scalar) {
                    $result = $result->unionWith($this->create($expr->left, $orEqual ? $rightType->getGreaterType() : $rightType->getGreaterOrEqualType(), \PHPStan\Analyser\TypeSpecifierContext::createTruthy(), \false, $scope, $rootExpr));
                }
                if (!$expr->right instanceof Node\Scalar) {
                    $result = $result->unionWith($this->create($expr->right, $orEqual ? $leftType->getSmallerType() : $leftType->getSmallerOrEqualType(), \PHPStan\Analyser\TypeSpecifierContext::createTruthy(), \false, $scope, $rootExpr));
                }
            }
            return $result;
        } elseif ($expr instanceof Node\Expr\BinaryOp\Greater) {
            return $this->specifyTypesInCondition($scope, new Expr\BinaryOp\Smaller($expr->right, $expr->left), $context, $rootExpr);
        } elseif ($expr instanceof Node\Expr\BinaryOp\GreaterOrEqual) {
            return $this->specifyTypesInCondition($scope, new Expr\BinaryOp\SmallerOrEqual($expr->right, $expr->left), $context, $rootExpr);
        } elseif ($expr instanceof FuncCall && $expr->name instanceof Name) {
            if ($this->reflectionProvider->hasFunction($expr->name, $scope)) {
                $functionReflection = $this->reflectionProvider->getFunction($expr->name, $scope);
                foreach ($this->getFunctionTypeSpecifyingExtensions() as $extension) {
                    if (!$extension->isFunctionSupported($functionReflection, $expr, $context)) {
                        continue;
                    }
                    return $extension->specifyTypes($functionReflection, $expr, $scope, $context);
                }
                $parametersAcceptor = ParametersAcceptorSelector::selectFromArgs($scope, $expr->getArgs(), $functionReflection->getVariants());
                if (count($expr->getArgs()) > 0) {
                    $specifiedTypes = $this->specifyTypesFromConditionalReturnType($context, $expr, $parametersAcceptor, $scope);
                    if ($specifiedTypes !== null) {
                        return $specifiedTypes;
                    }
                }
                $asserts = $functionReflection->getAsserts()->mapTypes(static function (Type $type) use($parametersAcceptor) {
                    return TemplateTypeHelper::resolveTemplateTypes($type, $parametersAcceptor->getResolvedTemplateTypeMap());
                });
                $specifiedTypes = $this->specifyTypesFromAsserts($context, $expr, $asserts, $parametersAcceptor, $scope);
                if ($specifiedTypes !== null) {
                    return $specifiedTypes;
                }
            }
            return $this->handleDefaultTruthyOrFalseyContext($context, $rootExpr, $expr, $scope);
        } elseif ($expr instanceof MethodCall && $expr->name instanceof Node\Identifier) {
            $methodCalledOnType = $scope->getType($expr->var);
            $methodReflection = $scope->getMethodReflection($methodCalledOnType, $expr->name->name);
            if ($methodReflection !== null) {
                $referencedClasses = $methodCalledOnType->getObjectClassNames();
                if (count($referencedClasses) === 1 && $this->reflectionProvider->hasClass($referencedClasses[0])) {
                    $methodClassReflection = $this->reflectionProvider->getClass($referencedClasses[0]);
                    foreach ($this->getMethodTypeSpecifyingExtensionsForClass($methodClassReflection->getName()) as $extension) {
                        if (!$extension->isMethodSupported($methodReflection, $expr, $context)) {
                            continue;
                        }
                        return $extension->specifyTypes($methodReflection, $expr, $scope, $context);
                    }
                }
                $parametersAcceptor = ParametersAcceptorSelector::selectFromArgs($scope, $expr->getArgs(), $methodReflection->getVariants());
                if (count($expr->getArgs()) > 0) {
                    $specifiedTypes = $this->specifyTypesFromConditionalReturnType($context, $expr, $parametersAcceptor, $scope);
                    if ($specifiedTypes !== null) {
                        return $specifiedTypes;
                    }
                }
                $asserts = $methodReflection->getAsserts()->mapTypes(static function (Type $type) use($parametersAcceptor) {
                    return TemplateTypeHelper::resolveTemplateTypes($type, $parametersAcceptor->getResolvedTemplateTypeMap());
                });
                $specifiedTypes = $this->specifyTypesFromAsserts($context, $expr, $asserts, $parametersAcceptor, $scope);
                if ($specifiedTypes !== null) {
                    return $specifiedTypes;
                }
            }
            return $this->handleDefaultTruthyOrFalseyContext($context, $rootExpr, $expr, $scope);
        } elseif ($expr instanceof StaticCall && $expr->name instanceof Node\Identifier) {
            if ($expr->class instanceof Name) {
                $calleeType = $scope->resolveTypeByName($expr->class);
            } else {
                $calleeType = $scope->getType($expr->class);
            }
            $staticMethodReflection = $scope->getMethodReflection($calleeType, $expr->name->name);
            if ($staticMethodReflection !== null) {
                $referencedClasses = $calleeType->getObjectClassNames();
                if (count($referencedClasses) === 1 && $this->reflectionProvider->hasClass($referencedClasses[0])) {
                    $staticMethodClassReflection = $this->reflectionProvider->getClass($referencedClasses[0]);
                    foreach ($this->getStaticMethodTypeSpecifyingExtensionsForClass($staticMethodClassReflection->getName()) as $extension) {
                        if (!$extension->isStaticMethodSupported($staticMethodReflection, $expr, $context)) {
                            continue;
                        }
                        return $extension->specifyTypes($staticMethodReflection, $expr, $scope, $context);
                    }
                }
                $parametersAcceptor = ParametersAcceptorSelector::selectFromArgs($scope, $expr->getArgs(), $staticMethodReflection->getVariants());
                if (count($expr->getArgs()) > 0) {
                    $specifiedTypes = $this->specifyTypesFromConditionalReturnType($context, $expr, $parametersAcceptor, $scope);
                    if ($specifiedTypes !== null) {
                        return $specifiedTypes;
                    }
                }
                $asserts = $staticMethodReflection->getAsserts()->mapTypes(static function (Type $type) use($parametersAcceptor) {
                    return TemplateTypeHelper::resolveTemplateTypes($type, $parametersAcceptor->getResolvedTemplateTypeMap());
                });
                $specifiedTypes = $this->specifyTypesFromAsserts($context, $expr, $asserts, $parametersAcceptor, $scope);
                if ($specifiedTypes !== null) {
                    return $specifiedTypes;
                }
            }
            return $this->handleDefaultTruthyOrFalseyContext($context, $rootExpr, $expr, $scope);
        } elseif ($expr instanceof BooleanAnd || $expr instanceof LogicalAnd) {
            if (!$scope instanceof \PHPStan\Analyser\MutatingScope) {
                throw new ShouldNotHappenException();
            }
            $leftTypes = $this->specifyTypesInCondition($scope, $expr->left, $context, $rootExpr);
            $rightScope = $scope->filterByTruthyValue($expr->left);
            $rightTypes = $this->specifyTypesInCondition($rightScope, $expr->right, $context, $rootExpr);
            $types = $context->true() ? $leftTypes->unionWith($rightTypes) : $leftTypes->normalize($scope)->intersectWith($rightTypes->normalize($rightScope));
            if ($context->false()) {
                return new \PHPStan\Analyser\SpecifiedTypes($types->getSureTypes(), $types->getSureNotTypes(), \false, array_merge($this->processBooleanConditionalTypes($scope, $leftTypes, $rightTypes), $this->processBooleanConditionalTypes($scope, $rightTypes, $leftTypes)), $rootExpr);
            }
            return $types;
        } elseif ($expr instanceof BooleanOr || $expr instanceof LogicalOr) {
            if (!$scope instanceof \PHPStan\Analyser\MutatingScope) {
                throw new ShouldNotHappenException();
            }
            $leftTypes = $this->specifyTypesInCondition($scope, $expr->left, $context, $rootExpr);
            $rightScope = $scope->filterByFalseyValue($expr->left);
            $rightTypes = $this->specifyTypesInCondition($rightScope, $expr->right, $context, $rootExpr);
            $types = $context->true() ? $leftTypes->normalize($scope)->intersectWith($rightTypes->normalize($rightScope)) : $leftTypes->unionWith($rightTypes);
            if ($context->true()) {
                return new \PHPStan\Analyser\SpecifiedTypes($types->getSureTypes(), $types->getSureNotTypes(), \false, array_merge($this->processBooleanConditionalTypes($scope, $leftTypes, $rightTypes), $this->processBooleanConditionalTypes($scope, $rightTypes, $leftTypes)), $rootExpr);
            }
            return $types;
        } elseif ($expr instanceof Node\Expr\BooleanNot && !$context->null()) {
            return $this->specifyTypesInCondition($scope, $expr->expr, $context->negate(), $rootExpr);
        } elseif ($expr instanceof Node\Expr\Assign) {
            if (!$scope instanceof \PHPStan\Analyser\MutatingScope) {
                throw new ShouldNotHappenException();
            }
            if ($context->null()) {
                return $this->specifyTypesInCondition($scope->exitFirstLevelStatements(), $expr->expr, $context, $rootExpr);
            }
            return $this->specifyTypesInCondition($scope->exitFirstLevelStatements(), $expr->var, $context, $rootExpr);
        } elseif ($expr instanceof Expr\Isset_ && count($expr->vars) > 0 && !$context->null()) {
            if (!$context->true()) {
                if (!$scope instanceof \PHPStan\Analyser\MutatingScope) {
                    throw new ShouldNotHappenException();
                }
                return array_reduce(array_filter($expr->vars, static function (Expr $var) use($scope) {
                    return $scope->issetCheck($var, static function () {
                        return \true;
                    });
                }), function (\PHPStan\Analyser\SpecifiedTypes $types, Expr $var) use($scope, $context, $rootExpr) {
                    return $types->unionWith($this->specifyTypesInCondition($scope, $var, $context, $rootExpr));
                }, new \PHPStan\Analyser\SpecifiedTypes());
            }
            $vars = [];
            foreach ($expr->vars as $var) {
                $tmpVars = [$var];
                while ($var instanceof ArrayDimFetch || $var instanceof PropertyFetch || $var instanceof StaticPropertyFetch && $var->class instanceof Expr) {
                    if ($var instanceof StaticPropertyFetch) {
                        /** @var Expr $var */
                        $var = $var->class;
                    } else {
                        $var = $var->var;
                    }
                    $tmpVars[] = $var;
                }
                $vars = array_merge($vars, array_reverse($tmpVars));
            }
            $types = null;
            foreach ($vars as $var) {
                if ($var instanceof Expr\Variable && is_string($var->name)) {
                    if ($scope->hasVariableType($var->name)->no()) {
                        return new \PHPStan\Analyser\SpecifiedTypes([], [], \false, [], $rootExpr);
                    }
                }
                if ($var instanceof ArrayDimFetch && $var->dim !== null && !$scope->getType($var->var) instanceof MixedType) {
                    $dimType = $scope->getType($var->dim);
                    if ($dimType instanceof ConstantIntegerType || $dimType instanceof ConstantStringType) {
                        $type = $this->create($var->var, new HasOffsetType($dimType), $context, \false, $scope, $rootExpr);
                    } else {
                        $type = new \PHPStan\Analyser\SpecifiedTypes();
                    }
                    $type = $type->unionWith($this->create($var, new NullType(), \PHPStan\Analyser\TypeSpecifierContext::createFalse(), \false, $scope, $rootExpr));
                } else {
                    $type = $this->create($var, new NullType(), \PHPStan\Analyser\TypeSpecifierContext::createFalse(), \false, $scope, $rootExpr);
                }
                if ($var instanceof PropertyFetch && $var->name instanceof Node\Identifier) {
                    $type = $type->unionWith($this->create($var->var, new IntersectionType([new ObjectWithoutClassType(), new HasPropertyType($var->name->toString())]), \PHPStan\Analyser\TypeSpecifierContext::createTruthy(), \false, $scope, $rootExpr));
                } elseif ($var instanceof StaticPropertyFetch && $var->class instanceof Expr && $var->name instanceof Node\VarLikeIdentifier) {
                    $type = $type->unionWith($this->create($var->class, new IntersectionType([new ObjectWithoutClassType(), new HasPropertyType($var->name->toString())]), \PHPStan\Analyser\TypeSpecifierContext::createTruthy(), \false, $scope, $rootExpr));
                }
                if ($types === null) {
                    $types = $type;
                } else {
                    $types = $types->unionWith($type);
                }
            }
            return $types;
        } elseif ($expr instanceof Expr\BinaryOp\Coalesce && $context->true() && (new ConstantBooleanType(\false))->isSuperTypeOf($scope->getType($expr->right))->yes()) {
            return $this->create($expr->left, new NullType(), \PHPStan\Analyser\TypeSpecifierContext::createFalse(), \false, $scope, $rootExpr);
        } elseif ($expr instanceof Expr\Empty_) {
            return $this->specifyTypesInCondition($scope, new BooleanOr(new Expr\BooleanNot(new Expr\Isset_([$expr->expr])), new Expr\BooleanNot($expr->expr)), $context, $rootExpr);
        } elseif ($expr instanceof Expr\ErrorSuppress) {
            return $this->specifyTypesInCondition($scope, $expr->expr, $context, $rootExpr);
        } elseif ($expr instanceof Expr\Ternary && !$context->null() && (new ConstantBooleanType(\false))->isSuperTypeOf($scope->getType($expr->else))->yes()) {
            $conditionExpr = $expr->cond;
            if ($expr->if !== null) {
                $conditionExpr = new BooleanAnd($conditionExpr, $expr->if);
            }
            return $this->specifyTypesInCondition($scope, $conditionExpr, $context, $rootExpr);
        } elseif ($expr instanceof Expr\NullsafePropertyFetch && !$context->null()) {
            $types = $this->specifyTypesInCondition($scope, new BooleanAnd(new Expr\BinaryOp\NotIdentical($expr->var, new ConstFetch(new Name('null'))), new PropertyFetch($expr->var, $expr->name)), $context, $rootExpr);
            $nullSafeTypes = $this->handleDefaultTruthyOrFalseyContext($context, $rootExpr, $expr, $scope);
            return $context->true() ? $types->unionWith($nullSafeTypes) : $types->normalize($scope)->intersectWith($nullSafeTypes->normalize($scope));
        } elseif ($expr instanceof Expr\NullsafeMethodCall && !$context->null()) {
            $types = $this->specifyTypesInCondition($scope, new BooleanAnd(new Expr\BinaryOp\NotIdentical($expr->var, new ConstFetch(new Name('null'))), new MethodCall($expr->var, $expr->name, $expr->args)), $context, $rootExpr);
            $nullSafeTypes = $this->handleDefaultTruthyOrFalseyContext($context, $rootExpr, $expr, $scope);
            return $context->true() ? $types->unionWith($nullSafeTypes) : $types->normalize($scope)->intersectWith($nullSafeTypes->normalize($scope));
        } elseif (!$context->null()) {
            return $this->handleDefaultTruthyOrFalseyContext($context, $rootExpr, $expr, $scope);
        }
        return new \PHPStan\Analyser\SpecifiedTypes([], [], \false, [], $rootExpr);
    }
    private function specifyTypesForConstantBinaryExpression(Expr $exprNode, ConstantScalarType $constantType, \PHPStan\Analyser\TypeSpecifierContext $context, \PHPStan\Analyser\Scope $scope, ?Expr $rootExpr) : ?\PHPStan\Analyser\SpecifiedTypes
    {
        if (!$context->null() && $constantType->getValue() === \false) {
            $types = $this->create($exprNode, $constantType, $context, \false, $scope, $rootExpr);
            return $types->unionWith($this->specifyTypesInCondition($scope, $exprNode, $context->true() ? \PHPStan\Analyser\TypeSpecifierContext::createFalse() : \PHPStan\Analyser\TypeSpecifierContext::createFalse()->negate(), $rootExpr));
        }
        if (!$context->null() && $constantType->getValue() === \true) {
            $types = $this->create($exprNode, $constantType, $context, \false, $scope, $rootExpr);
            return $types->unionWith($this->specifyTypesInCondition($scope, $exprNode, $context->true() ? \PHPStan\Analyser\TypeSpecifierContext::createTrue() : \PHPStan\Analyser\TypeSpecifierContext::createTrue()->negate(), $rootExpr));
        }
        if ($constantType->getValue() === null) {
            return $this->create($exprNode, $constantType, $context, \false, $scope, $rootExpr);
        }
        if (!$context->null() && $exprNode instanceof FuncCall && count($exprNode->getArgs()) === 1 && $exprNode->name instanceof Name && in_array(strtolower((string) $exprNode->name), ['count', 'sizeof'], \true) && $constantType instanceof ConstantIntegerType) {
            if ($context->truthy() || $constantType->getValue() === 0) {
                $newContext = $context;
                if ($constantType->getValue() === 0) {
                    $newContext = $newContext->negate();
                }
                $argType = $scope->getType($exprNode->getArgs()[0]->value);
                if ($argType->isArray()->yes()) {
                    $funcTypes = $this->create($exprNode, $constantType, $context, \false, $scope, $rootExpr);
                    if ($argType->isList()->yes() && $context->truthy() && $constantType->getValue() < ConstantArrayTypeBuilder::ARRAY_COUNT_LIMIT) {
                        $valueTypesBuilder = ConstantArrayTypeBuilder::createEmpty();
                        $itemType = $argType->getIterableValueType();
                        for ($i = 0; $i < $constantType->getValue(); $i++) {
                            $valueTypesBuilder->setOffsetValueType(new ConstantIntegerType($i), $itemType);
                        }
                        $valueTypes = $this->create($exprNode->getArgs()[0]->value, $valueTypesBuilder->getArray(), $context, \false, $scope, $rootExpr);
                    } else {
                        $valueTypes = $this->create($exprNode->getArgs()[0]->value, new NonEmptyArrayType(), $newContext, \false, $scope, $rootExpr);
                    }
                    return $funcTypes->unionWith($valueTypes);
                }
            }
        }
        if (!$context->null() && $exprNode instanceof FuncCall && count($exprNode->getArgs()) === 1 && $exprNode->name instanceof Name && strtolower((string) $exprNode->name) === 'strlen' && $constantType instanceof ConstantIntegerType) {
            if ($context->truthy() || $constantType->getValue() === 0) {
                $newContext = $context;
                if ($constantType->getValue() === 0) {
                    $newContext = $newContext->negate();
                }
                $argType = $scope->getType($exprNode->getArgs()[0]->value);
                if ($argType->isString()->yes()) {
                    $funcTypes = $this->create($exprNode, $constantType, $context, \false, $scope, $rootExpr);
                    $accessory = new AccessoryNonEmptyStringType();
                    if ($constantType->getValue() >= 2) {
                        $accessory = new AccessoryNonFalsyStringType();
                    }
                    $valueTypes = $this->create($exprNode->getArgs()[0]->value, $accessory, $newContext, \false, $scope, $rootExpr);
                    return $funcTypes->unionWith($valueTypes);
                }
            }
        }
        if ($constantType instanceof ConstantStringType) {
            return $this->specifyTypesForConstantStringBinaryExpression($exprNode, $constantType, $context, $scope, $rootExpr);
        }
        return null;
    }
    private function specifyTypesForConstantStringBinaryExpression(Expr $exprNode, ConstantStringType $constantType, \PHPStan\Analyser\TypeSpecifierContext $context, \PHPStan\Analyser\Scope $scope, ?Expr $rootExpr) : ?\PHPStan\Analyser\SpecifiedTypes
    {
        if ($context->truthy() && $exprNode instanceof FuncCall && $exprNode->name instanceof Name && in_array(strtolower($exprNode->name->toString()), ['substr', 'strstr', 'stristr', 'strchr', 'strrchr', 'strtolower', 'strtoupper', 'mb_strtolower', 'mb_strtoupper', 'ucfirst', 'lcfirst', 'ucwords', 'mb_convert_case', 'mb_convert_kana'], \true) && isset($exprNode->getArgs()[0]) && $constantType->getValue() !== '') {
            $argType = $scope->getType($exprNode->getArgs()[0]->value);
            if ($argType->isString()->yes()) {
                if ($constantType->getValue() !== '0') {
                    return $this->create($exprNode->getArgs()[0]->value, TypeCombinator::intersect($argType, new AccessoryNonFalsyStringType()), $context, \false, $scope);
                }
                return $this->create($exprNode->getArgs()[0]->value, TypeCombinator::intersect($argType, new AccessoryNonEmptyStringType()), $context, \false, $scope);
            }
        }
        if ($exprNode instanceof FuncCall && $exprNode->name instanceof Name && strtolower($exprNode->name->toString()) === 'gettype' && isset($exprNode->getArgs()[0])) {
            $type = null;
            if ($constantType->getValue() === 'string') {
                $type = new StringType();
            }
            if ($constantType->getValue() === 'array') {
                $type = new ArrayType(new MixedType(), new MixedType());
            }
            if ($constantType->getValue() === 'boolean') {
                $type = new BooleanType();
            }
            if ($constantType->getValue() === 'resource' || $constantType->getValue() === 'resource (closed)') {
                $type = new ResourceType();
            }
            if ($constantType->getValue() === 'integer') {
                $type = new IntegerType();
            }
            if ($constantType->getValue() === 'double') {
                $type = new FloatType();
            }
            if ($constantType->getValue() === 'NULL') {
                $type = new NullType();
            }
            if ($constantType->getValue() === 'object') {
                $type = new ObjectWithoutClassType();
            }
            if ($type !== null) {
                $callType = $this->create($exprNode, $constantType, $context, \false, $scope, $rootExpr);
                $argType = $this->create($exprNode->getArgs()[0]->value, $type, $context, \false, $scope, $rootExpr);
                return $callType->unionWith($argType);
            }
        }
        if ($context->true() && $exprNode instanceof FuncCall && $exprNode->name instanceof Name && strtolower((string) $exprNode->name) === 'get_parent_class' && isset($exprNode->getArgs()[0])) {
            $argType = $scope->getType($exprNode->getArgs()[0]->value);
            $objectType = new ObjectType($constantType->getValue());
            $classStringType = new GenericClassStringType($objectType);
            if ($argType->isString()->yes()) {
                return $this->create($exprNode->getArgs()[0]->value, $classStringType, $context, \false, $scope);
            }
            if ($argType->isObject()->yes()) {
                return $this->create($exprNode->getArgs()[0]->value, $objectType, $context, \false, $scope);
            }
            return $this->create($exprNode->getArgs()[0]->value, TypeCombinator::union($objectType, $classStringType), $context, \false, $scope);
        }
        return null;
    }
    private function handleDefaultTruthyOrFalseyContext(\PHPStan\Analyser\TypeSpecifierContext $context, ?Expr $rootExpr, Expr $expr, \PHPStan\Analyser\Scope $scope) : \PHPStan\Analyser\SpecifiedTypes
    {
        if ($context->null()) {
            return new \PHPStan\Analyser\SpecifiedTypes([], [], \false, [], $rootExpr);
        }
        if (!$context->truthy()) {
            $type = StaticTypeFactory::truthy();
            return $this->create($expr, $type, \PHPStan\Analyser\TypeSpecifierContext::createFalse(), \false, $scope, $rootExpr);
        } elseif (!$context->falsey()) {
            $type = StaticTypeFactory::falsey();
            return $this->create($expr, $type, \PHPStan\Analyser\TypeSpecifierContext::createFalse(), \false, $scope, $rootExpr);
        }
        return new \PHPStan\Analyser\SpecifiedTypes([], [], \false, [], $rootExpr);
    }
    private function specifyTypesFromConditionalReturnType(\PHPStan\Analyser\TypeSpecifierContext $context, Expr\CallLike $call, ParametersAcceptor $parametersAcceptor, \PHPStan\Analyser\Scope $scope) : ?\PHPStan\Analyser\SpecifiedTypes
    {
        if (!$parametersAcceptor instanceof ResolvedFunctionVariant) {
            return null;
        }
        $returnType = $parametersAcceptor->getOriginalParametersAcceptor()->getReturnType();
        if (!$returnType instanceof ConditionalTypeForParameter) {
            return null;
        }
        if ($context->true()) {
            $leftType = new ConstantBooleanType(\true);
            $rightType = new ConstantBooleanType(\false);
        } elseif ($context->false()) {
            $leftType = new ConstantBooleanType(\false);
            $rightType = new ConstantBooleanType(\true);
        } elseif ($context->null()) {
            $leftType = new MixedType();
            $rightType = new NeverType();
        } else {
            return null;
        }
        $argsMap = [];
        $parameters = $parametersAcceptor->getParameters();
        foreach ($call->getArgs() as $i => $arg) {
            if ($arg->unpack) {
                continue;
            }
            if ($arg->name !== null) {
                $paramName = $arg->name->toString();
            } elseif (isset($parameters[$i])) {
                $paramName = $parameters[$i]->getName();
            } else {
                continue;
            }
            $argsMap['$' . $paramName] = $arg->value;
        }
        return $this->getConditionalSpecifiedTypes($returnType, $leftType, $rightType, $scope, $argsMap);
    }
    /**
     * @param array<string, Expr> $argsMap
     */
    public function getConditionalSpecifiedTypes(ConditionalTypeForParameter $conditionalType, Type $leftType, Type $rightType, \PHPStan\Analyser\Scope $scope, array $argsMap) : ?\PHPStan\Analyser\SpecifiedTypes
    {
        $parameterName = $conditionalType->getParameterName();
        if (!array_key_exists($parameterName, $argsMap)) {
            return null;
        }
        $targetType = $conditionalType->getTarget();
        $ifType = $conditionalType->getIf();
        $elseType = $conditionalType->getElse();
        if ($leftType->isSuperTypeOf($ifType)->yes() && $rightType->isSuperTypeOf($elseType)->yes()) {
            $context = $conditionalType->isNegated() ? \PHPStan\Analyser\TypeSpecifierContext::createFalse() : \PHPStan\Analyser\TypeSpecifierContext::createTrue();
        } elseif ($leftType->isSuperTypeOf($elseType)->yes() && $rightType->isSuperTypeOf($ifType)->yes()) {
            $context = $conditionalType->isNegated() ? \PHPStan\Analyser\TypeSpecifierContext::createTrue() : \PHPStan\Analyser\TypeSpecifierContext::createFalse();
        } else {
            return null;
        }
        $specifiedTypes = $this->create($argsMap[$parameterName], $targetType, $context, \false, $scope);
        if ($targetType instanceof ConstantBooleanType) {
            if (!$targetType->getValue()) {
                $context = $context->negate();
            }
            $specifiedTypes = $specifiedTypes->unionWith($this->specifyTypesInCondition($scope, $argsMap[$parameterName], $context));
        }
        return $specifiedTypes;
    }
    private function specifyTypesFromAsserts(\PHPStan\Analyser\TypeSpecifierContext $context, Expr\CallLike $call, Assertions $assertions, ParametersAcceptor $parametersAcceptor, \PHPStan\Analyser\Scope $scope) : ?\PHPStan\Analyser\SpecifiedTypes
    {
        if ($context->null()) {
            $asserts = $assertions->getAsserts();
        } elseif ($context->true()) {
            $asserts = $assertions->getAssertsIfTrue();
        } elseif ($context->false()) {
            $asserts = $assertions->getAssertsIfFalse();
        } else {
            throw new ShouldNotHappenException();
        }
        if (count($asserts) === 0) {
            return null;
        }
        $argsMap = [];
        $parameters = $parametersAcceptor->getParameters();
        foreach ($call->getArgs() as $i => $arg) {
            if ($arg->unpack) {
                continue;
            }
            if ($arg->name !== null) {
                $paramName = $arg->name->toString();
            } elseif (isset($parameters[$i])) {
                $paramName = $parameters[$i]->getName();
            } elseif (count($parameters) > 0 && $parametersAcceptor->isVariadic()) {
                $lastParameter = $parameters[count($parameters) - 1];
                $paramName = $lastParameter->getName();
            } else {
                continue;
            }
            $argsMap[$paramName][] = $arg->value;
        }
        if ($call instanceof MethodCall) {
            $argsMap['this'] = [$call->var];
        }
        /** @var SpecifiedTypes|null $types */
        $types = null;
        foreach ($asserts as $assert) {
            foreach ($argsMap[substr($assert->getParameter()->getParameterName(), 1)] ?? [] as $parameterExpr) {
                $assertedType = TypeTraverser::map($assert->getType(), static function (Type $type, callable $traverse) use($argsMap, $scope) : Type {
                    if ($type instanceof ConditionalTypeForParameter) {
                        $parameterName = substr($type->getParameterName(), 1);
                        if (array_key_exists($parameterName, $argsMap)) {
                            $argType = TypeCombinator::union(...array_map(static function (Expr $expr) use($scope) {
                                return $scope->getType($expr);
                            }, $argsMap[$parameterName]));
                            $type = $type->toConditional($argType);
                        }
                    }
                    return $traverse($type);
                });
                $assertExpr = $assert->getParameter()->getExpr($parameterExpr);
                $templateTypeMap = $parametersAcceptor->getResolvedTemplateTypeMap();
                $containsUnresolvedTemplate = \false;
                TypeTraverser::map($assert->getOriginalType(), static function (Type $type, callable $traverse) use($templateTypeMap, &$containsUnresolvedTemplate) {
                    if ($type instanceof TemplateType && $type->getScope()->getClassName() !== null) {
                        $resolvedType = $templateTypeMap->getType($type->getName());
                        if ($resolvedType === null || $type->getBound()->equals($resolvedType)) {
                            $containsUnresolvedTemplate = \true;
                            return $type;
                        }
                    }
                    return $traverse($type);
                });
                $newTypes = $this->create($assertExpr, $assertedType, $assert->isNegated() ? \PHPStan\Analyser\TypeSpecifierContext::createFalse() : \PHPStan\Analyser\TypeSpecifierContext::createTrue(), \false, $scope, $containsUnresolvedTemplate || $assert->isEquality() ? $call : null);
                $types = $types !== null ? $types->unionWith($newTypes) : $newTypes;
                if (!$context->null() || !$assertedType instanceof ConstantBooleanType) {
                    continue;
                }
                $subContext = $assertedType->getValue() ? \PHPStan\Analyser\TypeSpecifierContext::createTrue() : \PHPStan\Analyser\TypeSpecifierContext::createFalse();
                if ($assert->isNegated()) {
                    $subContext = $subContext->negate();
                }
                $types = $types->unionWith($this->specifyTypesInCondition($scope, $assertExpr, $subContext));
            }
        }
        return $types;
    }
    /**
     * @return array<string, ConditionalExpressionHolder[]>
     */
    private function processBooleanConditionalTypes(\PHPStan\Analyser\Scope $scope, \PHPStan\Analyser\SpecifiedTypes $leftTypes, \PHPStan\Analyser\SpecifiedTypes $rightTypes) : array
    {
        $conditionExpressionTypes = [];
        foreach ($leftTypes->getSureNotTypes() as $exprString => [$expr, $type]) {
            if (!$expr instanceof Expr\Variable) {
                continue;
            }
            if (!is_string($expr->name)) {
                continue;
            }
            $conditionExpressionTypes[$exprString] = \PHPStan\Analyser\ExpressionTypeHolder::createYes($expr, TypeCombinator::intersect($scope->getType($expr), $type));
        }
        if (count($conditionExpressionTypes) > 0) {
            $holders = [];
            foreach ($rightTypes->getSureNotTypes() as $exprString => [$expr, $type]) {
                if (!$expr instanceof Expr\Variable) {
                    continue;
                }
                if (!is_string($expr->name)) {
                    continue;
                }
                if (!isset($holders[$exprString])) {
                    $holders[$exprString] = [];
                }
                $holder = new \PHPStan\Analyser\ConditionalExpressionHolder($conditionExpressionTypes, new \PHPStan\Analyser\ExpressionTypeHolder($expr, TypeCombinator::remove($scope->getType($expr), $type), TrinaryLogic::createYes()));
                $holders[$exprString][$holder->getKey()] = $holder;
            }
            return $holders;
        }
        return [];
    }
    /**
     * @return array{Expr, ConstantScalarType}|null
     */
    private function findTypeExpressionsFromBinaryOperation(\PHPStan\Analyser\Scope $scope, Node\Expr\BinaryOp $binaryOperation) : ?array
    {
        $leftType = $scope->getType($binaryOperation->left);
        $rightType = $scope->getType($binaryOperation->right);
        if ($leftType instanceof ConstantScalarType && !$binaryOperation->right instanceof ConstFetch && !$binaryOperation->right instanceof ClassConstFetch) {
            return [$binaryOperation->right, $leftType];
        } elseif ($rightType instanceof ConstantScalarType && !$binaryOperation->left instanceof ConstFetch && !$binaryOperation->left instanceof ClassConstFetch) {
            return [$binaryOperation->left, $rightType];
        }
        return null;
    }
    /** @api */
    public function create(Expr $expr, Type $type, \PHPStan\Analyser\TypeSpecifierContext $context, bool $overwrite = \false, ?\PHPStan\Analyser\Scope $scope = null, ?Expr $rootExpr = null) : \PHPStan\Analyser\SpecifiedTypes
    {
        if ($expr instanceof Instanceof_ || $expr instanceof Expr\List_) {
            return new \PHPStan\Analyser\SpecifiedTypes([], [], \false, [], $rootExpr);
        }
        $specifiedExprs = [];
        if ($expr instanceof Expr\Assign) {
            $specifiedExprs[] = $expr->var;
            while ($expr->expr instanceof Expr\Assign) {
                $specifiedExprs[] = $expr->expr->var;
                $expr = $expr->expr;
            }
        } else {
            $specifiedExprs[] = $expr;
        }
        $types = null;
        foreach ($specifiedExprs as $specifiedExpr) {
            $newTypes = $this->createForExpr($specifiedExpr, $type, $context, $overwrite, $scope, $rootExpr);
            if ($types === null) {
                $types = $newTypes;
            } else {
                $types = $types->unionWith($newTypes);
            }
        }
        return $types;
    }
    private function createForExpr(Expr $expr, Type $type, \PHPStan\Analyser\TypeSpecifierContext $context, bool $overwrite = \false, ?\PHPStan\Analyser\Scope $scope = null, ?Expr $rootExpr = null) : \PHPStan\Analyser\SpecifiedTypes
    {
        if ($scope !== null) {
            if ($context->true()) {
                $containsNull = TypeCombinator::containsNull($type) && TypeCombinator::containsNull($scope->getType($expr));
            } elseif ($context->false()) {
                $containsNull = !TypeCombinator::containsNull($type) && TypeCombinator::containsNull($scope->getType($expr));
            }
        }
        $originalExpr = $expr;
        if (isset($containsNull) && !$containsNull) {
            $expr = \PHPStan\Analyser\NullsafeOperatorHelper::getNullsafeShortcircuitedExpr($expr);
        }
        if ($scope !== null && !$context->null() && $expr instanceof Expr\BinaryOp\Coalesce) {
            $rightIsSuperType = $type->isSuperTypeOf($scope->getType($expr->right));
            if ($context->true() && $rightIsSuperType->no() || $context->false() && $rightIsSuperType->yes()) {
                $expr = $expr->left;
            }
        }
        if ($expr instanceof FuncCall && $expr->name instanceof Name) {
            $has = $this->reflectionProvider->hasFunction($expr->name, $scope);
            if (!$has) {
                // backwards compatibility with previous behaviour
                return new \PHPStan\Analyser\SpecifiedTypes([], [], \false, [], $rootExpr);
            }
            $functionReflection = $this->reflectionProvider->getFunction($expr->name, $scope);
            $hasSideEffects = $functionReflection->hasSideEffects();
            if ($hasSideEffects->yes()) {
                return new \PHPStan\Analyser\SpecifiedTypes([], [], \false, [], $rootExpr);
            }
            if (!$this->rememberPossiblyImpureFunctionValues && !$hasSideEffects->no()) {
                return new \PHPStan\Analyser\SpecifiedTypes([], [], \false, [], $rootExpr);
            }
        }
        if ($expr instanceof MethodCall && $expr->name instanceof Node\Identifier && $scope !== null) {
            $methodName = $expr->name->toString();
            $calledOnType = $scope->getType($expr->var);
            $methodReflection = $scope->getMethodReflection($calledOnType, $methodName);
            if ($methodReflection === null || $methodReflection->hasSideEffects()->yes() || !$this->rememberPossiblyImpureFunctionValues && !$methodReflection->hasSideEffects()->no()) {
                if (isset($containsNull) && !$containsNull) {
                    return $this->createNullsafeTypes($rootExpr, $originalExpr, $scope, $context, $overwrite, $type);
                }
                return new \PHPStan\Analyser\SpecifiedTypes([], [], \false, [], $rootExpr);
            }
        }
        if ($expr instanceof StaticCall && $expr->name instanceof Node\Identifier && $scope !== null) {
            $methodName = $expr->name->toString();
            if ($expr->class instanceof Name) {
                $calledOnType = $scope->resolveTypeByName($expr->class);
            } else {
                $calledOnType = $scope->getType($expr->class);
            }
            $methodReflection = $scope->getMethodReflection($calledOnType, $methodName);
            if ($methodReflection === null || $methodReflection->hasSideEffects()->yes() || !$this->rememberPossiblyImpureFunctionValues && !$methodReflection->hasSideEffects()->no()) {
                if (isset($containsNull) && !$containsNull) {
                    return $this->createNullsafeTypes($rootExpr, $originalExpr, $scope, $context, $overwrite, $type);
                }
                return new \PHPStan\Analyser\SpecifiedTypes([], [], \false, [], $rootExpr);
            }
        }
        $sureTypes = [];
        $sureNotTypes = [];
        $exprString = $this->exprPrinter->printExpr($expr);
        $originalExprString = $this->exprPrinter->printExpr($originalExpr);
        if ($context->false()) {
            $sureNotTypes[$exprString] = [$expr, $type];
            if ($exprString !== $originalExprString) {
                $sureNotTypes[$originalExprString] = [$originalExpr, $type];
            }
        } elseif ($context->true()) {
            $sureTypes[$exprString] = [$expr, $type];
            if ($exprString !== $originalExprString) {
                $sureTypes[$originalExprString] = [$originalExpr, $type];
            }
        }
        $types = new \PHPStan\Analyser\SpecifiedTypes($sureTypes, $sureNotTypes, $overwrite, [], $rootExpr);
        if ($scope !== null && isset($containsNull) && !$containsNull) {
            return $this->createNullsafeTypes($rootExpr, $originalExpr, $scope, $context, $overwrite, $type)->unionWith($types);
        }
        return $types;
    }
    private function createNullsafeTypes(?Expr $rootExpr, Expr $expr, \PHPStan\Analyser\Scope $scope, \PHPStan\Analyser\TypeSpecifierContext $context, bool $overwrite, ?Type $type) : \PHPStan\Analyser\SpecifiedTypes
    {
        if ($expr instanceof Expr\NullsafePropertyFetch) {
            if ($type !== null) {
                $propertyFetchTypes = $this->create(new PropertyFetch($expr->var, $expr->name), $type, $context, \false, $scope, $rootExpr);
            } else {
                $propertyFetchTypes = $this->create(new PropertyFetch($expr->var, $expr->name), new NullType(), \PHPStan\Analyser\TypeSpecifierContext::createFalse(), \false, $scope, $rootExpr);
            }
            return $propertyFetchTypes->unionWith($this->create($expr->var, new NullType(), \PHPStan\Analyser\TypeSpecifierContext::createFalse(), $overwrite, $scope, $rootExpr));
        }
        if ($expr instanceof Expr\NullsafeMethodCall) {
            if ($type !== null) {
                $methodCallTypes = $this->create(new MethodCall($expr->var, $expr->name, $expr->args), $type, $context, $overwrite, $scope, $rootExpr);
            } else {
                $methodCallTypes = $this->create(new MethodCall($expr->var, $expr->name, $expr->args), new NullType(), \PHPStan\Analyser\TypeSpecifierContext::createFalse(), $overwrite, $scope, $rootExpr);
            }
            return $methodCallTypes->unionWith($this->create($expr->var, new NullType(), \PHPStan\Analyser\TypeSpecifierContext::createFalse(), $overwrite, $scope, $rootExpr));
        }
        if ($expr instanceof Expr\PropertyFetch) {
            return $this->createNullsafeTypes($rootExpr, $expr->var, $scope, $context, $overwrite, null);
        }
        if ($expr instanceof Expr\MethodCall) {
            return $this->createNullsafeTypes($rootExpr, $expr->var, $scope, $context, $overwrite, null);
        }
        if ($expr instanceof Expr\ArrayDimFetch) {
            return $this->createNullsafeTypes($rootExpr, $expr->var, $scope, $context, $overwrite, null);
        }
        if ($expr instanceof Expr\StaticPropertyFetch && $expr->class instanceof Expr) {
            return $this->createNullsafeTypes($rootExpr, $expr->class, $scope, $context, $overwrite, null);
        }
        if ($expr instanceof Expr\StaticCall && $expr->class instanceof Expr) {
            return $this->createNullsafeTypes($rootExpr, $expr->class, $scope, $context, $overwrite, null);
        }
        return new \PHPStan\Analyser\SpecifiedTypes([], [], $overwrite, [], $rootExpr);
    }
    private function createRangeTypes(?Expr $rootExpr, Expr $expr, Type $type, \PHPStan\Analyser\TypeSpecifierContext $context) : \PHPStan\Analyser\SpecifiedTypes
    {
        $sureNotTypes = [];
        if ($type instanceof IntegerRangeType || $type instanceof ConstantIntegerType) {
            $exprString = $this->exprPrinter->printExpr($expr);
            if ($context->false()) {
                $sureNotTypes[$exprString] = [$expr, $type];
            } elseif ($context->true()) {
                $inverted = TypeCombinator::remove(new IntegerType(), $type);
                $sureNotTypes[$exprString] = [$expr, $inverted];
            }
        }
        return new \PHPStan\Analyser\SpecifiedTypes([], $sureNotTypes, \false, [], $rootExpr);
    }
    /**
     * @return FunctionTypeSpecifyingExtension[]
     */
    private function getFunctionTypeSpecifyingExtensions() : array
    {
        return $this->functionTypeSpecifyingExtensions;
    }
    /**
     * @return MethodTypeSpecifyingExtension[]
     */
    private function getMethodTypeSpecifyingExtensionsForClass(string $className) : array
    {
        if ($this->methodTypeSpecifyingExtensionsByClass === null) {
            $byClass = [];
            foreach ($this->methodTypeSpecifyingExtensions as $extension) {
                $byClass[$extension->getClass()][] = $extension;
            }
            $this->methodTypeSpecifyingExtensionsByClass = $byClass;
        }
        return $this->getTypeSpecifyingExtensionsForType($this->methodTypeSpecifyingExtensionsByClass, $className);
    }
    /**
     * @return StaticMethodTypeSpecifyingExtension[]
     */
    private function getStaticMethodTypeSpecifyingExtensionsForClass(string $className) : array
    {
        if ($this->staticMethodTypeSpecifyingExtensionsByClass === null) {
            $byClass = [];
            foreach ($this->staticMethodTypeSpecifyingExtensions as $extension) {
                $byClass[$extension->getClass()][] = $extension;
            }
            $this->staticMethodTypeSpecifyingExtensionsByClass = $byClass;
        }
        return $this->getTypeSpecifyingExtensionsForType($this->staticMethodTypeSpecifyingExtensionsByClass, $className);
    }
    /**
     * @param MethodTypeSpecifyingExtension[][]|StaticMethodTypeSpecifyingExtension[][] $extensions
     * @return mixed[]
     */
    private function getTypeSpecifyingExtensionsForType(array $extensions, string $className) : array
    {
        $extensionsForClass = [[]];
        $class = $this->reflectionProvider->getClass($className);
        foreach (array_merge([$className], $class->getParentClassesNames(), $class->getNativeReflection()->getInterfaceNames()) as $extensionClassName) {
            if (!isset($extensions[$extensionClassName])) {
                continue;
            }
            $extensionsForClass[] = $extensions[$extensionClassName];
        }
        return array_merge(...$extensionsForClass);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ParametersAcceptor;
interface InternalScopeFactory
{
    /**
     * @param array<string, ExpressionTypeHolder> $expressionTypes
     * @param array<string, ExpressionTypeHolder> $nativeExpressionTypes
     * @param array<string, ConditionalExpressionHolder[]> $conditionalExpressions
     * @param list<string> $inClosureBindScopeClasses
     * @param array<string, true> $currentlyAssignedExpressions
     * @param array<string, true> $currentlyAllowedUndefinedExpressions
     * @param array<MethodReflection|FunctionReflection> $inFunctionCallsStack
     * @param \PHPStan\Reflection\FunctionReflection|\PHPStan\Reflection\MethodReflection|null $function
     */
    public function create(\PHPStan\Analyser\ScopeContext $context, bool $declareStrictTypes = \false, $function = null, ?string $namespace = null, array $expressionTypes = [], array $nativeExpressionTypes = [], array $conditionalExpressions = [], array $inClosureBindScopeClasses = [], ?ParametersAcceptor $anonymousFunctionReflection = null, bool $inFirstLevelStatement = \true, array $currentlyAssignedExpressions = [], array $currentlyAllowedUndefinedExpressions = [], array $inFunctionCallsStack = [], bool $afterExtractCall = \false, ?\PHPStan\Analyser\Scope $parentScope = null, bool $nativeTypesPromoted = \false) : \PHPStan\Analyser\MutatingScope;
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PhpParser\Node\Stmt;
/** @api */
class StatementExitPoint
{
    /**
     * @var \PhpParser\Node\Stmt
     */
    private $statement;
    /**
     * @var \PHPStan\Analyser\MutatingScope
     */
    private $scope;
    public function __construct(Stmt $statement, \PHPStan\Analyser\MutatingScope $scope)
    {
        $this->statement = $statement;
        $this->scope = $scope;
    }
    public function getStatement() : Stmt
    {
        return $this->statement;
    }
    public function getScope() : \PHPStan\Analyser\MutatingScope
    {
        return $this->scope;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PHPStan\File\FileHelper;
use PHPStan\ShouldNotHappenException;
use function array_fill_keys;
use function array_filter;
use function array_key_exists;
use function array_merge;
use function array_values;
use function count;
use function is_array;
use function is_string;
use function sprintf;
class IgnoredErrorHelperResult
{
    /**
     * @var \PHPStan\File\FileHelper
     */
    private $fileHelper;
    /**
     * @var string[]
     */
    private $errors;
    /**
     * @var array<array<mixed>>
     */
    private $otherIgnoreErrors;
    /**
     * @var array<string, array<array<mixed>>>
     */
    private $ignoreErrorsByFile;
    /**
     * @var (string | mixed[])[]
     */
    private $ignoreErrors;
    /**
     * @var bool
     */
    private $reportUnmatchedIgnoredErrors;
    /**
     * @param string[] $errors
     * @param array<array<mixed>> $otherIgnoreErrors
     * @param array<string, array<array<mixed>>> $ignoreErrorsByFile
     * @param (string|mixed[])[] $ignoreErrors
     */
    public function __construct(FileHelper $fileHelper, array $errors, array $otherIgnoreErrors, array $ignoreErrorsByFile, array $ignoreErrors, bool $reportUnmatchedIgnoredErrors)
    {
        $this->fileHelper = $fileHelper;
        $this->errors = $errors;
        $this->otherIgnoreErrors = $otherIgnoreErrors;
        $this->ignoreErrorsByFile = $ignoreErrorsByFile;
        $this->ignoreErrors = $ignoreErrors;
        $this->reportUnmatchedIgnoredErrors = $reportUnmatchedIgnoredErrors;
    }
    /**
     * @return string[]
     */
    public function getErrors() : array
    {
        return $this->errors;
    }
    /**
     * @param Error[] $errors
     * @param string[] $analysedFiles
     * @return string[]|Error[]
     */
    public function process(array $errors, bool $onlyFiles, array $analysedFiles, bool $hasInternalErrors) : array
    {
        $unmatchedIgnoredErrors = $this->ignoreErrors;
        $addErrors = [];
        $processIgnoreError = function (\PHPStan\Analyser\Error $error, int $i, $ignore) use(&$unmatchedIgnoredErrors, &$addErrors) : bool {
            $shouldBeIgnored = \false;
            if (is_string($ignore)) {
                $shouldBeIgnored = \PHPStan\Analyser\IgnoredError::shouldIgnore($this->fileHelper, $error, $ignore, null);
                if ($shouldBeIgnored) {
                    unset($unmatchedIgnoredErrors[$i]);
                }
            } else {
                if (isset($ignore['path'])) {
                    $shouldBeIgnored = \PHPStan\Analyser\IgnoredError::shouldIgnore($this->fileHelper, $error, $ignore['message'], $ignore['path']);
                    if ($shouldBeIgnored) {
                        if (isset($ignore['count'])) {
                            $realCount = $unmatchedIgnoredErrors[$i]['realCount'] ?? 0;
                            $realCount++;
                            $unmatchedIgnoredErrors[$i]['realCount'] = $realCount;
                            if (!isset($unmatchedIgnoredErrors[$i]['file'])) {
                                $unmatchedIgnoredErrors[$i]['file'] = $error->getFile();
                                $unmatchedIgnoredErrors[$i]['line'] = $error->getLine();
                            }
                            if ($realCount > $ignore['count']) {
                                $shouldBeIgnored = \false;
                            }
                        } else {
                            unset($unmatchedIgnoredErrors[$i]);
                        }
                    }
                } elseif (isset($ignore['paths'])) {
                    foreach ($ignore['paths'] as $j => $ignorePath) {
                        $shouldBeIgnored = \PHPStan\Analyser\IgnoredError::shouldIgnore($this->fileHelper, $error, $ignore['message'], $ignorePath);
                        if (!$shouldBeIgnored) {
                            continue;
                        }
                        if (isset($unmatchedIgnoredErrors[$i])) {
                            if (!is_array($unmatchedIgnoredErrors[$i])) {
                                throw new ShouldNotHappenException();
                            }
                            unset($unmatchedIgnoredErrors[$i]['paths'][$j]);
                            if (isset($unmatchedIgnoredErrors[$i]['paths']) && count($unmatchedIgnoredErrors[$i]['paths']) === 0) {
                                unset($unmatchedIgnoredErrors[$i]);
                            }
                        }
                        break;
                    }
                } else {
                    $shouldBeIgnored = \PHPStan\Analyser\IgnoredError::shouldIgnore($this->fileHelper, $error, $ignore['message'], null);
                    if ($shouldBeIgnored) {
                        unset($unmatchedIgnoredErrors[$i]);
                    }
                }
            }
            if ($shouldBeIgnored) {
                if (!$error->canBeIgnored()) {
                    $addErrors[] = sprintf('Error message "%s" cannot be ignored, use excludePaths instead.', $error->getMessage());
                    return \true;
                }
                return \false;
            }
            return \true;
        };
        $errors = array_values(array_filter($errors, function (\PHPStan\Analyser\Error $error) use($processIgnoreError) : bool {
            $filePath = $this->fileHelper->normalizePath($error->getFilePath());
            if (isset($this->ignoreErrorsByFile[$filePath])) {
                foreach ($this->ignoreErrorsByFile[$filePath] as $ignoreError) {
                    $i = $ignoreError['index'];
                    $ignore = $ignoreError['ignoreError'];
                    $result = $processIgnoreError($error, $i, $ignore);
                    if (!$result) {
                        return \false;
                    }
                }
            }
            $traitFilePath = $error->getTraitFilePath();
            if ($traitFilePath !== null) {
                $normalizedTraitFilePath = $this->fileHelper->normalizePath($traitFilePath);
                if (isset($this->ignoreErrorsByFile[$normalizedTraitFilePath])) {
                    foreach ($this->ignoreErrorsByFile[$normalizedTraitFilePath] as $ignoreError) {
                        $i = $ignoreError['index'];
                        $ignore = $ignoreError['ignoreError'];
                        $result = $processIgnoreError($error, $i, $ignore);
                        if (!$result) {
                            return \false;
                        }
                    }
                }
            }
            foreach ($this->otherIgnoreErrors as $ignoreError) {
                $i = $ignoreError['index'];
                $ignore = $ignoreError['ignoreError'];
                $result = $processIgnoreError($error, $i, $ignore);
                if (!$result) {
                    return \false;
                }
            }
            return \true;
        }));
        foreach ($unmatchedIgnoredErrors as $unmatchedIgnoredError) {
            if (!isset($unmatchedIgnoredError['count']) || !isset($unmatchedIgnoredError['realCount'])) {
                continue;
            }
            if ($unmatchedIgnoredError['realCount'] <= $unmatchedIgnoredError['count']) {
                continue;
            }
            $addErrors[] = new \PHPStan\Analyser\Error(sprintf('Ignored error pattern %s is expected to occur %d %s, but occurred %d %s.', \PHPStan\Analyser\IgnoredError::stringifyPattern($unmatchedIgnoredError), $unmatchedIgnoredError['count'], $unmatchedIgnoredError['count'] === 1 ? 'time' : 'times', $unmatchedIgnoredError['realCount'], $unmatchedIgnoredError['realCount'] === 1 ? 'time' : 'times'), $unmatchedIgnoredError['file'], $unmatchedIgnoredError['line'], \false);
        }
        $errors = array_merge($errors, $addErrors);
        $analysedFilesKeys = array_fill_keys($analysedFiles, \true);
        if (!$hasInternalErrors) {
            foreach ($unmatchedIgnoredErrors as $unmatchedIgnoredError) {
                $reportUnmatched = $unmatchedIgnoredError['reportUnmatched'] ?? $this->reportUnmatchedIgnoredErrors;
                if ($reportUnmatched === \false) {
                    continue;
                }
                if (isset($unmatchedIgnoredError['count']) && isset($unmatchedIgnoredError['realCount']) && (isset($unmatchedIgnoredError['realPath']) || !$onlyFiles)) {
                    if ($unmatchedIgnoredError['realCount'] < $unmatchedIgnoredError['count']) {
                        $errors[] = new \PHPStan\Analyser\Error(sprintf('Ignored error pattern %s is expected to occur %d %s, but occurred only %d %s.', \PHPStan\Analyser\IgnoredError::stringifyPattern($unmatchedIgnoredError), $unmatchedIgnoredError['count'], $unmatchedIgnoredError['count'] === 1 ? 'time' : 'times', $unmatchedIgnoredError['realCount'], $unmatchedIgnoredError['realCount'] === 1 ? 'time' : 'times'), $unmatchedIgnoredError['file'], $unmatchedIgnoredError['line'], \false);
                    }
                } elseif (isset($unmatchedIgnoredError['realPath'])) {
                    if (!array_key_exists($unmatchedIgnoredError['realPath'], $analysedFilesKeys)) {
                        continue;
                    }
                    $errors[] = new \PHPStan\Analyser\Error(sprintf('Ignored error pattern %s was not matched in reported errors.', \PHPStan\Analyser\IgnoredError::stringifyPattern($unmatchedIgnoredError)), $unmatchedIgnoredError['realPath'], null, \false);
                } elseif (!$onlyFiles) {
                    $errors[] = sprintf('Ignored error pattern %s was not matched in reported errors.', \PHPStan\Analyser\IgnoredError::stringifyPattern($unmatchedIgnoredError));
                }
            }
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use ArrayAccess;
use Closure;
use Generator;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\Cast\Bool_;
use PhpParser\Node\Expr\Cast\Double;
use PhpParser\Node\Expr\Cast\Int_;
use PhpParser\Node\Expr\Cast\Object_;
use PhpParser\Node\Expr\Cast\Unset_;
use PhpParser\Node\Expr\ConstFetch;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Expr\New_;
use PhpParser\Node\Expr\PropertyFetch;
use PhpParser\Node\Expr\Variable;
use PhpParser\Node\Name;
use PhpParser\Node\Name\FullyQualified;
use PhpParser\Node\Scalar\DNumber;
use PhpParser\Node\Scalar\EncapsedStringPart;
use PhpParser\Node\Scalar\LNumber;
use PhpParser\Node\Scalar\String_;
use PhpParser\NodeFinder;
use PHPStan\Node\ExecutionEndNode;
use PHPStan\Node\Expr\GetIterableKeyTypeExpr;
use PHPStan\Node\Expr\GetIterableValueTypeExpr;
use PHPStan\Node\Expr\GetOffsetValueTypeExpr;
use PHPStan\Node\Expr\OriginalPropertyTypeExpr;
use PHPStan\Node\Expr\SetOffsetValueTypeExpr;
use PHPStan\Node\Expr\TypeExpr;
use PHPStan\Node\Printer\ExprPrinter;
use PHPStan\Parser\ArrayMapArgVisitor;
use PHPStan\Parser\NewAssignedToPropertyVisitor;
use PHPStan\Parser\Parser;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\Assertions;
use PHPStan\Reflection\ClassMemberReflection;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ConstantReflection;
use PHPStan\Reflection\Dummy\DummyConstructorReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\InitializerExprContext;
use PHPStan\Reflection\InitializerExprTypeResolver;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\Native\NativeParameterReflection;
use PHPStan\Reflection\ParameterReflection;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Reflection\ParametersAcceptorWithPhpDocs;
use PHPStan\Reflection\PassedByReference;
use PHPStan\Reflection\Php\DummyParameter;
use PHPStan\Reflection\Php\PhpFunctionFromParserNodeReflection;
use PHPStan\Reflection\Php\PhpMethodFromParserNodeReflection;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Reflection\TrivialParametersAcceptor;
use PHPStan\Rules\Properties\PropertyReflectionFinder;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\Accessory\AccessoryLiteralStringType;
use PHPStan\Type\Accessory\HasOffsetValueType;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\Accessory\OversizedArrayType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\BooleanType;
use PHPStan\Type\ClosureType;
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantFloatType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\ConstantTypeHelper;
use PHPStan\Type\DynamicReturnTypeExtensionRegistry;
use PHPStan\Type\ErrorType;
use PHPStan\Type\GeneralizePrecision;
use PHPStan\Type\Generic\GenericClassStringType;
use PHPStan\Type\Generic\GenericObjectType;
use PHPStan\Type\Generic\TemplateType;
use PHPStan\Type\Generic\TemplateTypeHelper;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\MixedType;
use PHPStan\Type\NeverType;
use PHPStan\Type\NonexistentParentClassType;
use PHPStan\Type\NullType;
use PHPStan\Type\ObjectShapeType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\ParserNodeTypeToPHPStanType;
use PHPStan\Type\StaticType;
use PHPStan\Type\StringType;
use PHPStan\Type\ThisType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypehintHelper;
use PHPStan\Type\TypeTraverser;
use PHPStan\Type\TypeUtils;
use PHPStan\Type\TypeWithClassName;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
use PHPStan\Type\VoidType;
use stdClass;
use Throwable;
use function abs;
use function array_key_exists;
use function array_key_first;
use function array_keys;
use function array_map;
use function array_merge;
use function array_pop;
use function array_slice;
use function count;
use function explode;
use function get_class;
use function implode;
use function in_array;
use function is_string;
use function ltrim;
use function sprintf;
use function str_starts_with;
use function strlen;
use function strtolower;
use function substr;
use function usort;
use const PHP_INT_MAX;
use const PHP_INT_MIN;
class MutatingScope implements \PHPStan\Analyser\Scope
{
    /** @var Type[] */
    private $resolvedTypes = [];
    /** @var array<string, self> */
    private $truthyScopes = [];
    /** @var array<string, self> */
    private $falseyScopes = [];
    /**
     * @var string|null
     */
    private $namespace;
    /**
     * @var \PHPStan\Analyser\MutatingScope|null
     */
    private $scopeOutOfFirstLevelStatement;
    /**
     * @var \PHPStan\Analyser\MutatingScope|null
     */
    private $scopeWithPromotedNativeTypes;
    /**
     * @var \PHPStan\Analyser\InternalScopeFactory
     */
    private $scopeFactory;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Reflection\InitializerExprTypeResolver
     */
    private $initializerExprTypeResolver;
    /**
     * @var \PHPStan\Type\DynamicReturnTypeExtensionRegistry
     */
    private $dynamicReturnTypeExtensionRegistry;
    /**
     * @var \PHPStan\Node\Printer\ExprPrinter
     */
    private $exprPrinter;
    /**
     * @var \PHPStan\Analyser\TypeSpecifier
     */
    private $typeSpecifier;
    /**
     * @var \PHPStan\Rules\Properties\PropertyReflectionFinder
     */
    private $propertyReflectionFinder;
    /**
     * @var \PHPStan\Parser\Parser
     */
    private $parser;
    /**
     * @var \PHPStan\Analyser\NodeScopeResolver
     */
    private $nodeScopeResolver;
    /**
     * @var \PHPStan\Analyser\ConstantResolver
     */
    private $constantResolver;
    /**
     * @var \PHPStan\Analyser\ScopeContext
     */
    private $context;
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    /**
     * @var bool
     */
    private $declareStrictTypes = \false;
    /**
     * @var \PHPStan\Reflection\FunctionReflection|\PHPStan\Reflection\ExtendedMethodReflection|null
     */
    private $function = null;
    /**
     * @var array<string, ExpressionTypeHolder>
     */
    private $expressionTypes = [];
    /**
     * @var array<string, ExpressionTypeHolder>
     */
    private $nativeExpressionTypes = [];
    /**
     * @var array<string, ConditionalExpressionHolder[]>
     */
    private $conditionalExpressions = [];
    /**
     * @var list<string>
     */
    private $inClosureBindScopeClasses = [];
    /**
     * @var \PHPStan\Reflection\ParametersAcceptor|null
     */
    private $anonymousFunctionReflection;
    /**
     * @var bool
     */
    private $inFirstLevelStatement = \true;
    /**
     * @var array<string, true>
     */
    private $currentlyAssignedExpressions = [];
    /**
     * @var array<string, true>
     */
    private $currentlyAllowedUndefinedExpressions = [];
    /**
     * @var array<(MethodReflection | FunctionReflection)>
     */
    private $inFunctionCallsStack = [];
    /**
     * @var bool
     */
    private $afterExtractCall = \false;
    /**
     * @var \PHPStan\Analyser\Scope|null
     */
    private $parentScope;
    /**
     * @var bool
     */
    private $nativeTypesPromoted = \false;
    /**
     * @var bool
     */
    private $explicitMixedInUnknownGenericNew = \false;
    /**
     * @var bool
     */
    private $explicitMixedForGlobalVariables = \false;
    /**
     * @param array<string, ExpressionTypeHolder> $expressionTypes
     * @param array<string, ConditionalExpressionHolder[]> $conditionalExpressions
     * @param list<string> $inClosureBindScopeClasses
     * @param array<string, true> $currentlyAssignedExpressions
     * @param array<string, true> $currentlyAllowedUndefinedExpressions
     * @param array<string, ExpressionTypeHolder> $nativeExpressionTypes
     * @param array<MethodReflection|FunctionReflection> $inFunctionCallsStack
     * @param \PHPStan\Reflection\FunctionReflection|\PHPStan\Reflection\ExtendedMethodReflection|null $function
     */
    public function __construct(\PHPStan\Analyser\InternalScopeFactory $scopeFactory, ReflectionProvider $reflectionProvider, InitializerExprTypeResolver $initializerExprTypeResolver, DynamicReturnTypeExtensionRegistry $dynamicReturnTypeExtensionRegistry, ExprPrinter $exprPrinter, \PHPStan\Analyser\TypeSpecifier $typeSpecifier, PropertyReflectionFinder $propertyReflectionFinder, Parser $parser, \PHPStan\Analyser\NodeScopeResolver $nodeScopeResolver, \PHPStan\Analyser\ConstantResolver $constantResolver, \PHPStan\Analyser\ScopeContext $context, PhpVersion $phpVersion, bool $declareStrictTypes = \false, $function = null, ?string $namespace = null, array $expressionTypes = [], array $nativeExpressionTypes = [], array $conditionalExpressions = [], array $inClosureBindScopeClasses = [], ?ParametersAcceptor $anonymousFunctionReflection = null, bool $inFirstLevelStatement = \true, array $currentlyAssignedExpressions = [], array $currentlyAllowedUndefinedExpressions = [], array $inFunctionCallsStack = [], bool $afterExtractCall = \false, ?\PHPStan\Analyser\Scope $parentScope = null, bool $nativeTypesPromoted = \false, bool $explicitMixedInUnknownGenericNew = \false, bool $explicitMixedForGlobalVariables = \false)
    {
        $this->scopeFactory = $scopeFactory;
        $this->reflectionProvider = $reflectionProvider;
        $this->initializerExprTypeResolver = $initializerExprTypeResolver;
        $this->dynamicReturnTypeExtensionRegistry = $dynamicReturnTypeExtensionRegistry;
        $this->exprPrinter = $exprPrinter;
        $this->typeSpecifier = $typeSpecifier;
        $this->propertyReflectionFinder = $propertyReflectionFinder;
        $this->parser = $parser;
        $this->nodeScopeResolver = $nodeScopeResolver;
        $this->constantResolver = $constantResolver;
        $this->context = $context;
        $this->phpVersion = $phpVersion;
        $this->declareStrictTypes = $declareStrictTypes;
        $this->function = $function;
        $this->expressionTypes = $expressionTypes;
        $this->nativeExpressionTypes = $nativeExpressionTypes;
        $this->conditionalExpressions = $conditionalExpressions;
        $this->inClosureBindScopeClasses = $inClosureBindScopeClasses;
        $this->anonymousFunctionReflection = $anonymousFunctionReflection;
        $this->inFirstLevelStatement = $inFirstLevelStatement;
        $this->currentlyAssignedExpressions = $currentlyAssignedExpressions;
        $this->currentlyAllowedUndefinedExpressions = $currentlyAllowedUndefinedExpressions;
        $this->inFunctionCallsStack = $inFunctionCallsStack;
        $this->afterExtractCall = $afterExtractCall;
        $this->parentScope = $parentScope;
        $this->nativeTypesPromoted = $nativeTypesPromoted;
        $this->explicitMixedInUnknownGenericNew = $explicitMixedInUnknownGenericNew;
        $this->explicitMixedForGlobalVariables = $explicitMixedForGlobalVariables;
        if ($namespace === '') {
            $namespace = null;
        }
        $this->namespace = $namespace;
    }
    /** @api */
    public function getFile() : string
    {
        return $this->context->getFile();
    }
    /** @api */
    public function getFileDescription() : string
    {
        if ($this->context->getTraitReflection() === null) {
            return $this->getFile();
        }
        /** @var ClassReflection $classReflection */
        $classReflection = $this->context->getClassReflection();
        $className = $classReflection->getDisplayName();
        if (!$classReflection->isAnonymous()) {
            $className = sprintf('class %s', $className);
        }
        $traitReflection = $this->context->getTraitReflection();
        if ($traitReflection->getFileName() === null) {
            throw new ShouldNotHappenException();
        }
        return sprintf('%s (in context of %s)', $traitReflection->getFileName(), $className);
    }
    /** @api */
    public function isDeclareStrictTypes() : bool
    {
        return $this->declareStrictTypes;
    }
    public function enterDeclareStrictTypes() : self
    {
        return $this->scopeFactory->create($this->context, \true, null, null, $this->expressionTypes, $this->nativeExpressionTypes);
    }
    /** @api */
    public function isInClass() : bool
    {
        return $this->context->getClassReflection() !== null;
    }
    /** @api */
    public function isInTrait() : bool
    {
        return $this->context->getTraitReflection() !== null;
    }
    /** @api */
    public function getClassReflection() : ?ClassReflection
    {
        return $this->context->getClassReflection();
    }
    /** @api */
    public function getTraitReflection() : ?ClassReflection
    {
        return $this->context->getTraitReflection();
    }
    /**
     * @api
     * @return FunctionReflection|ExtendedMethodReflection|null
     */
    public function getFunction()
    {
        return $this->function;
    }
    /** @api */
    public function getFunctionName() : ?string
    {
        return $this->function !== null ? $this->function->getName() : null;
    }
    /** @api */
    public function getNamespace() : ?string
    {
        return $this->namespace;
    }
    /** @api */
    public function getParentScope() : ?\PHPStan\Analyser\Scope
    {
        return $this->parentScope;
    }
    /** @api */
    public function canAnyVariableExist() : bool
    {
        return $this->function === null && !$this->isInAnonymousFunction() || $this->afterExtractCall;
    }
    public function afterExtractCall() : self
    {
        return $this->scopeFactory->create($this->context, $this->isDeclareStrictTypes(), $this->getFunction(), $this->getNamespace(), $this->expressionTypes, $this->nativeExpressionTypes, [], $this->inClosureBindScopeClasses, $this->anonymousFunctionReflection, $this->isInFirstLevelStatement(), $this->currentlyAssignedExpressions, $this->currentlyAllowedUndefinedExpressions, $this->inFunctionCallsStack, \true, $this->parentScope, $this->nativeTypesPromoted);
    }
    public function afterClearstatcacheCall() : self
    {
        $expressionTypes = $this->expressionTypes;
        foreach (array_keys($expressionTypes) as $exprString) {
            // list from https://www.php.net/manual/en/function.clearstatcache.php
            // stat(), lstat(), file_exists(), is_writable(), is_readable(), is_executable(), is_file(), is_dir(), is_link(), filectime(), fileatime(), filemtime(), fileinode(), filegroup(), fileowner(), filesize(), filetype(), and fileperms().
            foreach (['stat', 'lstat', 'file_exists', 'is_writable', 'is_writeable', 'is_readable', 'is_executable', 'is_file', 'is_dir', 'is_link', 'filectime', 'fileatime', 'filemtime', 'fileinode', 'filegroup', 'fileowner', 'filesize', 'filetype', 'fileperms'] as $functionName) {
                if (!str_starts_with($exprString, $functionName . '(') && !str_starts_with($exprString, '\\' . $functionName . '(')) {
                    continue;
                }
                unset($expressionTypes[$exprString]);
                continue 2;
            }
        }
        return $this->scopeFactory->create($this->context, $this->isDeclareStrictTypes(), $this->getFunction(), $this->getNamespace(), $expressionTypes, $this->nativeExpressionTypes, $this->conditionalExpressions, $this->inClosureBindScopeClasses, $this->anonymousFunctionReflection, $this->isInFirstLevelStatement(), $this->currentlyAssignedExpressions, $this->currentlyAllowedUndefinedExpressions, $this->inFunctionCallsStack, $this->afterExtractCall, $this->parentScope, $this->nativeTypesPromoted);
    }
    public function afterOpenSslCall(string $openSslFunctionName) : self
    {
        $expressionTypes = $this->expressionTypes;
        if (in_array($openSslFunctionName, ['openssl_cipher_iv_length', 'openssl_cms_decrypt', 'openssl_cms_encrypt', 'openssl_cms_read', 'openssl_cms_sign', 'openssl_cms_verify', 'openssl_csr_export_to_file', 'openssl_csr_export', 'openssl_csr_get_public_key', 'openssl_csr_get_subject', 'openssl_csr_new', 'openssl_csr_sign', 'openssl_decrypt', 'openssl_dh_compute_key', 'openssl_digest', 'openssl_encrypt', 'openssl_get_curve_names', 'openssl_get_privatekey', 'openssl_get_publickey', 'openssl_open', 'openssl_pbkdf2', 'openssl_pkcs12_export_to_file', 'openssl_pkcs12_export', 'openssl_pkcs12_read', 'openssl_pkcs7_decrypt', 'openssl_pkcs7_encrypt', 'openssl_pkcs7_read', 'openssl_pkcs7_sign', 'openssl_pkcs7_verify', 'openssl_pkey_derive', 'openssl_pkey_export_to_file', 'openssl_pkey_export', 'openssl_pkey_get_private', 'openssl_pkey_get_public', 'openssl_pkey_new', 'openssl_private_decrypt', 'openssl_private_encrypt', 'openssl_public_decrypt', 'openssl_public_encrypt', 'openssl_random_pseudo_bytes', 'openssl_seal', 'openssl_sign', 'openssl_spki_export_challenge', 'openssl_spki_export', 'openssl_spki_new', 'openssl_spki_verify', 'openssl_verify', 'openssl_x509_checkpurpose', 'openssl_x509_export_to_file', 'openssl_x509_export', 'openssl_x509_fingerprint', 'openssl_x509_read', 'openssl_x509_verify'], \true)) {
            unset($expressionTypes['\\openssl_error_string()']);
        }
        return $this->scopeFactory->create($this->context, $this->isDeclareStrictTypes(), $this->getFunction(), $this->getNamespace(), $expressionTypes, $this->nativeExpressionTypes, $this->conditionalExpressions, $this->inClosureBindScopeClasses, $this->anonymousFunctionReflection, $this->isInFirstLevelStatement(), $this->currentlyAssignedExpressions, $this->currentlyAllowedUndefinedExpressions, $this->inFunctionCallsStack, $this->afterExtractCall, $this->parentScope, $this->nativeTypesPromoted);
    }
    /** @api */
    public function hasVariableType(string $variableName) : TrinaryLogic
    {
        if ($this->isGlobalVariable($variableName)) {
            return TrinaryLogic::createYes();
        }
        $varExprString = '$' . $variableName;
        if (!isset($this->expressionTypes[$varExprString])) {
            if ($this->canAnyVariableExist()) {
                return TrinaryLogic::createMaybe();
            }
            return TrinaryLogic::createNo();
        }
        return $this->expressionTypes[$varExprString]->getCertainty();
    }
    /** @api */
    public function getVariableType(string $variableName) : Type
    {
        if ($this->hasVariableType($variableName)->maybe()) {
            if ($variableName === 'argc') {
                return IntegerRangeType::fromInterval(1, null);
            }
            if ($variableName === 'argv') {
                return AccessoryArrayListType::intersectWith(TypeCombinator::intersect(new ArrayType(new IntegerType(), new StringType()), new NonEmptyArrayType()));
            }
            if ($this->canAnyVariableExist()) {
                return new MixedType();
            }
        }
        if ($this->isGlobalVariable($variableName)) {
            return new ArrayType(new StringType(), new MixedType($this->explicitMixedForGlobalVariables));
        }
        if ($this->hasVariableType($variableName)->no()) {
            throw new \PHPStan\Analyser\UndefinedVariableException($this, $variableName);
        }
        $varExprString = '$' . $variableName;
        if (!array_key_exists($varExprString, $this->expressionTypes)) {
            return new MixedType();
        }
        return TypeUtils::resolveLateResolvableTypes($this->expressionTypes[$varExprString]->getType());
    }
    /**
     * @api
     * @return array<int, string>
     */
    public function getDefinedVariables() : array
    {
        $variables = [];
        foreach ($this->expressionTypes as $exprString => $holder) {
            if (!$holder->getExpr() instanceof Variable) {
                continue;
            }
            if (!$holder->getCertainty()->yes()) {
                continue;
            }
            $variables[] = substr($exprString, 1);
        }
        return $variables;
    }
    private function isGlobalVariable(string $variableName) : bool
    {
        return in_array($variableName, ['GLOBALS', '_SERVER', '_GET', '_POST', '_FILES', '_COOKIE', '_SESSION', '_REQUEST', '_ENV'], \true);
    }
    /** @api */
    public function hasConstant(Name $name) : bool
    {
        $isCompilerHaltOffset = $name->toString() === '__COMPILER_HALT_OFFSET__';
        if ($isCompilerHaltOffset) {
            return $this->fileHasCompilerHaltStatementCalls();
        }
        if (!$name->isFullyQualified() && $this->getNamespace() !== null) {
            if ($this->hasExpressionType(new ConstFetch(new FullyQualified([$this->getNamespace(), $name->toString()])))->yes()) {
                return \true;
            }
        }
        if ($this->hasExpressionType(new ConstFetch(new FullyQualified($name->toString())))->yes()) {
            return \true;
        }
        return $this->reflectionProvider->hasConstant($name, $this);
    }
    private function fileHasCompilerHaltStatementCalls() : bool
    {
        $nodes = $this->parser->parseFile($this->getFile());
        foreach ($nodes as $node) {
            if ($node instanceof Node\Stmt\HaltCompiler) {
                return \true;
            }
        }
        return \false;
    }
    /** @api */
    public function isInAnonymousFunction() : bool
    {
        return $this->anonymousFunctionReflection !== null;
    }
    /** @api */
    public function getAnonymousFunctionReflection() : ?ParametersAcceptor
    {
        return $this->anonymousFunctionReflection;
    }
    /** @api */
    public function getAnonymousFunctionReturnType() : ?Type
    {
        if ($this->anonymousFunctionReflection === null) {
            return null;
        }
        return $this->anonymousFunctionReflection->getReturnType();
    }
    /** @api */
    public function getType(Expr $node) : Type
    {
        if ($node instanceof GetIterableKeyTypeExpr) {
            return $this->getType($node->getExpr())->getIterableKeyType();
        }
        if ($node instanceof GetIterableValueTypeExpr) {
            return $this->getType($node->getExpr())->getIterableValueType();
        }
        if ($node instanceof GetOffsetValueTypeExpr) {
            return $this->getType($node->getVar())->getOffsetValueType($this->getType($node->getDim()));
        }
        if ($node instanceof SetOffsetValueTypeExpr) {
            return $this->getType($node->getVar())->setOffsetValueType($node->getDim() !== null ? $this->getType($node->getDim()) : null, $this->getType($node->getValue()));
        }
        if ($node instanceof TypeExpr) {
            return $node->getExprType();
        }
        if ($node instanceof OriginalPropertyTypeExpr) {
            $propertyReflection = $this->propertyReflectionFinder->findPropertyReflectionFromNode($node->getPropertyFetch(), $this);
            if ($propertyReflection === null) {
                return new ErrorType();
            }
            return $propertyReflection->getReadableType();
        }
        $key = $this->getNodeKey($node);
        if (!array_key_exists($key, $this->resolvedTypes)) {
            $this->resolvedTypes[$key] = TypeUtils::resolveLateResolvableTypes($this->resolveType($key, $node));
        }
        return $this->resolvedTypes[$key];
    }
    private function getNodeKey(Expr $node) : string
    {
        $key = $this->exprPrinter->printExpr($node);
        if ($node instanceof Node\FunctionLike && $node->hasAttribute(ArrayMapArgVisitor::ATTRIBUTE_NAME) && $node->hasAttribute('startFilePos')) {
            $key .= '/*' . $node->getAttribute('startFilePos') . '*/';
        }
        return $key;
    }
    private function resolveType(string $exprString, Expr $node) : Type
    {
        if ($node instanceof Expr\Exit_ || $node instanceof Expr\Throw_) {
            return new NeverType(\true);
        }
        if (!$node instanceof Variable && $this->hasExpressionType($node)->yes()) {
            return $this->expressionTypes[$exprString]->getType();
        }
        if ($node instanceof Expr\BinaryOp\Smaller) {
            return $this->getType($node->left)->isSmallerThan($this->getType($node->right))->toBooleanType();
        }
        if ($node instanceof Expr\BinaryOp\SmallerOrEqual) {
            return $this->getType($node->left)->isSmallerThanOrEqual($this->getType($node->right))->toBooleanType();
        }
        if ($node instanceof Expr\BinaryOp\Greater) {
            return $this->getType($node->right)->isSmallerThan($this->getType($node->left))->toBooleanType();
        }
        if ($node instanceof Expr\BinaryOp\GreaterOrEqual) {
            return $this->getType($node->right)->isSmallerThanOrEqual($this->getType($node->left))->toBooleanType();
        }
        if ($node instanceof Expr\BinaryOp\Equal) {
            if ($node->left instanceof Variable && is_string($node->left->name) && $node->right instanceof Variable && is_string($node->right->name) && $node->left->name === $node->right->name) {
                return new ConstantBooleanType(\true);
            }
            $leftType = $this->getType($node->left);
            $rightType = $this->getType($node->right);
            return $this->initializerExprTypeResolver->resolveEqualType($leftType, $rightType);
        }
        if ($node instanceof Expr\BinaryOp\NotEqual) {
            return $this->getType(new Expr\BooleanNot(new BinaryOp\Equal($node->left, $node->right)));
        }
        if ($node instanceof Expr\Empty_) {
            $result = $this->issetCheck($node->expr, static function (Type $type) : ?bool {
                $isNull = (new NullType())->isSuperTypeOf($type);
                $isFalsey = (new ConstantBooleanType(\false))->isSuperTypeOf($type->toBoolean());
                if ($isNull->maybe()) {
                    return null;
                }
                if ($isFalsey->maybe()) {
                    return null;
                }
                if ($isNull->yes()) {
                    return $isFalsey->no();
                }
                return !$isFalsey->yes();
            });
            if ($result === null) {
                return new BooleanType();
            }
            return new ConstantBooleanType(!$result);
        }
        if ($node instanceof Node\Expr\BooleanNot) {
            $exprBooleanType = $this->getType($node->expr)->toBoolean();
            if ($exprBooleanType instanceof ConstantBooleanType) {
                return new ConstantBooleanType(!$exprBooleanType->getValue());
            }
            return new BooleanType();
        }
        if ($node instanceof Node\Expr\BitwiseNot) {
            return $this->initializerExprTypeResolver->getBitwiseNotType($node->expr, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof Node\Expr\BinaryOp\BooleanAnd || $node instanceof Node\Expr\BinaryOp\LogicalAnd) {
            $leftBooleanType = $this->getType($node->left)->toBoolean();
            if ($leftBooleanType->isFalse()->yes()) {
                return new ConstantBooleanType(\false);
            }
            $rightBooleanType = $this->filterByTruthyValue($node->left)->getType($node->right)->toBoolean();
            if ($rightBooleanType->isFalse()->yes()) {
                return new ConstantBooleanType(\false);
            }
            if ($leftBooleanType->isTrue()->yes() && $rightBooleanType->isTrue()->yes()) {
                return new ConstantBooleanType(\true);
            }
            return new BooleanType();
        }
        if ($node instanceof Node\Expr\BinaryOp\BooleanOr || $node instanceof Node\Expr\BinaryOp\LogicalOr) {
            $leftBooleanType = $this->getType($node->left)->toBoolean();
            if ($leftBooleanType->isTrue()->yes()) {
                return new ConstantBooleanType(\true);
            }
            $rightBooleanType = $this->filterByFalseyValue($node->left)->getType($node->right)->toBoolean();
            if ($rightBooleanType->isTrue()->yes()) {
                return new ConstantBooleanType(\true);
            }
            if ($leftBooleanType->isFalse()->yes() && $rightBooleanType->isFalse()->yes()) {
                return new ConstantBooleanType(\false);
            }
            return new BooleanType();
        }
        if ($node instanceof Node\Expr\BinaryOp\LogicalXor) {
            $leftBooleanType = $this->getType($node->left)->toBoolean();
            $rightBooleanType = $this->getType($node->right)->toBoolean();
            if ($leftBooleanType instanceof ConstantBooleanType && $rightBooleanType instanceof ConstantBooleanType) {
                return new ConstantBooleanType($leftBooleanType->getValue() xor $rightBooleanType->getValue());
            }
            return new BooleanType();
        }
        if ($node instanceof Expr\BinaryOp\Identical) {
            if ($node->left instanceof Variable && is_string($node->left->name) && $node->right instanceof Variable && is_string($node->right->name) && $node->left->name === $node->right->name) {
                return new ConstantBooleanType(\true);
            }
            $leftType = $this->getType($node->left);
            $rightType = $this->getType($node->right);
            if (($node->left instanceof Node\Expr\PropertyFetch || $node->left instanceof Node\Expr\StaticPropertyFetch) && $rightType->isNull()->yes() && !$this->hasPropertyNativeType($node->left)) {
                return new BooleanType();
            }
            if (($node->right instanceof Node\Expr\PropertyFetch || $node->right instanceof Node\Expr\StaticPropertyFetch) && $leftType->isNull()->yes() && !$this->hasPropertyNativeType($node->right)) {
                return new BooleanType();
            }
            return $this->initializerExprTypeResolver->resolveIdenticalType($leftType, $rightType);
        }
        if ($node instanceof Expr\BinaryOp\NotIdentical) {
            return $this->getType(new Expr\BooleanNot(new BinaryOp\Identical($node->left, $node->right)));
        }
        if ($node instanceof Expr\Instanceof_) {
            $expressionType = $this->getType($node->expr);
            if ($this->isInTrait() && TypeUtils::findThisType($expressionType) !== null) {
                return new BooleanType();
            }
            if ($expressionType instanceof NeverType) {
                return new ConstantBooleanType(\false);
            }
            $uncertainty = \false;
            if ($node->class instanceof Node\Name) {
                $unresolvedClassName = $node->class->toString();
                if (strtolower($unresolvedClassName) === 'static' && $this->isInClass()) {
                    $classType = new StaticType($this->getClassReflection());
                } else {
                    $className = $this->resolveName($node->class);
                    $classType = new ObjectType($className);
                }
            } else {
                $classType = $this->getType($node->class);
                $classType = TypeTraverser::map($classType, static function (Type $type, callable $traverse) use(&$uncertainty) : Type {
                    if ($type instanceof UnionType || $type instanceof IntersectionType) {
                        return $traverse($type);
                    }
                    if ($type->getObjectClassNames() !== []) {
                        $uncertainty = \true;
                        return $type;
                    }
                    if ($type instanceof GenericClassStringType) {
                        $uncertainty = \true;
                        return $type->getGenericType();
                    }
                    if ($type instanceof ConstantStringType) {
                        return new ObjectType($type->getValue());
                    }
                    return new MixedType();
                });
            }
            if ($classType->isSuperTypeOf(new MixedType())->yes()) {
                return new BooleanType();
            }
            $isSuperType = $classType->isSuperTypeOf($expressionType);
            if ($isSuperType->no()) {
                return new ConstantBooleanType(\false);
            } elseif ($isSuperType->yes() && !$uncertainty) {
                return new ConstantBooleanType(\true);
            }
            return new BooleanType();
        }
        if ($node instanceof Node\Expr\UnaryPlus) {
            return $this->getType($node->expr)->toNumber();
        }
        if ($node instanceof Expr\ErrorSuppress || $node instanceof Expr\Assign) {
            return $this->getType($node->expr);
        }
        if ($node instanceof Node\Expr\UnaryMinus) {
            return $this->initializerExprTypeResolver->getUnaryMinusType($node->expr, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof Expr\BinaryOp\Concat) {
            return $this->initializerExprTypeResolver->getConcatType($node->left, $node->right, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof Expr\AssignOp\Concat) {
            return $this->initializerExprTypeResolver->getConcatType($node->var, $node->expr, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof BinaryOp\BitwiseAnd) {
            return $this->initializerExprTypeResolver->getBitwiseAndType($node->left, $node->right, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof Expr\AssignOp\BitwiseAnd) {
            return $this->initializerExprTypeResolver->getBitwiseAndType($node->var, $node->expr, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof BinaryOp\BitwiseOr) {
            return $this->initializerExprTypeResolver->getBitwiseOrType($node->left, $node->right, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof Expr\AssignOp\BitwiseOr) {
            return $this->initializerExprTypeResolver->getBitwiseOrType($node->var, $node->expr, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof BinaryOp\BitwiseXor) {
            return $this->initializerExprTypeResolver->getBitwiseXorType($node->left, $node->right, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof Expr\AssignOp\BitwiseXor) {
            return $this->initializerExprTypeResolver->getBitwiseXorType($node->var, $node->expr, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof Expr\BinaryOp\Spaceship) {
            return $this->initializerExprTypeResolver->getSpaceshipType($node->left, $node->right, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof BinaryOp\Div) {
            return $this->initializerExprTypeResolver->getDivType($node->left, $node->right, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof Expr\AssignOp\Div) {
            return $this->initializerExprTypeResolver->getDivType($node->var, $node->expr, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof BinaryOp\Mod) {
            return $this->initializerExprTypeResolver->getModType($node->left, $node->right, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof Expr\AssignOp\Mod) {
            return $this->initializerExprTypeResolver->getModType($node->var, $node->expr, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof BinaryOp\Plus) {
            return $this->initializerExprTypeResolver->getPlusType($node->left, $node->right, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof Expr\AssignOp\Plus) {
            return $this->initializerExprTypeResolver->getPlusType($node->var, $node->expr, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof BinaryOp\Minus) {
            return $this->initializerExprTypeResolver->getMinusType($node->left, $node->right, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof Expr\AssignOp\Minus) {
            return $this->initializerExprTypeResolver->getMinusType($node->var, $node->expr, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof BinaryOp\Mul) {
            return $this->initializerExprTypeResolver->getMulType($node->left, $node->right, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof Expr\AssignOp\Mul) {
            return $this->initializerExprTypeResolver->getMulType($node->var, $node->expr, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof BinaryOp\Pow) {
            return $this->initializerExprTypeResolver->getPowType($node->left, $node->right, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof Expr\AssignOp\Pow) {
            return $this->initializerExprTypeResolver->getPowType($node->var, $node->expr, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof BinaryOp\ShiftLeft) {
            return $this->initializerExprTypeResolver->getShiftLeftType($node->left, $node->right, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof Expr\AssignOp\ShiftLeft) {
            return $this->initializerExprTypeResolver->getShiftLeftType($node->var, $node->expr, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof BinaryOp\ShiftRight) {
            return $this->initializerExprTypeResolver->getShiftRightType($node->left, $node->right, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof Expr\AssignOp\ShiftRight) {
            return $this->initializerExprTypeResolver->getShiftRightType($node->var, $node->expr, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof Expr\Clone_) {
            return $this->getType($node->expr);
        }
        if ($node instanceof LNumber) {
            return $this->initializerExprTypeResolver->getType($node, InitializerExprContext::fromScope($this));
        } elseif ($node instanceof String_) {
            return $this->initializerExprTypeResolver->getType($node, InitializerExprContext::fromScope($this));
        } elseif ($node instanceof Node\Scalar\Encapsed) {
            $resultType = null;
            foreach ($node->parts as $part) {
                $partType = $part instanceof EncapsedStringPart ? new ConstantStringType($part->value) : $this->getType($part)->toString();
                if ($resultType === null) {
                    $resultType = $partType;
                    continue;
                }
                $resultType = $this->initializerExprTypeResolver->resolveConcatType($resultType, $partType);
                if (count($resultType->getConstantStrings()) === 0) {
                    return $resultType;
                }
            }
            return $resultType ?? new ConstantStringType('');
        } elseif ($node instanceof DNumber) {
            return $this->initializerExprTypeResolver->getType($node, InitializerExprContext::fromScope($this));
        } elseif ($node instanceof Expr\CallLike && $node->isFirstClassCallable()) {
            if ($node instanceof FuncCall) {
                if ($node->name instanceof Name) {
                    if ($this->reflectionProvider->hasFunction($node->name, $this)) {
                        return $this->createFirstClassCallable($this->reflectionProvider->getFunction($node->name, $this)->getVariants());
                    }
                    return new ObjectType(Closure::class);
                }
                $callableType = $this->getType($node->name);
                if (!$callableType->isCallable()->yes()) {
                    return new ObjectType(Closure::class);
                }
                return $this->createFirstClassCallable($callableType->getCallableParametersAcceptors($this));
            }
            if ($node instanceof MethodCall) {
                if (!$node->name instanceof Node\Identifier) {
                    return new ObjectType(Closure::class);
                }
                $varType = $this->getType($node->var);
                $method = $this->getMethodReflection($varType, $node->name->toString());
                if ($method === null) {
                    return new ObjectType(Closure::class);
                }
                return $this->createFirstClassCallable($method->getVariants());
            }
            if ($node instanceof Expr\StaticCall) {
                if (!$node->class instanceof Name) {
                    return new ObjectType(Closure::class);
                }
                $classType = $this->resolveTypeByName($node->class);
                if (!$node->name instanceof Node\Identifier) {
                    return new ObjectType(Closure::class);
                }
                $methodName = $node->name->toString();
                if (!$classType->hasMethod($methodName)->yes()) {
                    return new ObjectType(Closure::class);
                }
                return $this->createFirstClassCallable($classType->getMethod($methodName, $this)->getVariants());
            }
            if ($node instanceof New_) {
                return new ErrorType();
            }
            throw new ShouldNotHappenException();
        } elseif ($node instanceof Expr\Closure || $node instanceof Expr\ArrowFunction) {
            $parameters = [];
            $isVariadic = \false;
            $firstOptionalParameterIndex = null;
            foreach ($node->params as $i => $param) {
                $isOptionalCandidate = $param->default !== null || $param->variadic;
                if ($isOptionalCandidate) {
                    if ($firstOptionalParameterIndex === null) {
                        $firstOptionalParameterIndex = $i;
                    }
                } else {
                    $firstOptionalParameterIndex = null;
                }
            }
            foreach ($node->params as $i => $param) {
                if ($param->variadic) {
                    $isVariadic = \true;
                }
                if (!$param->var instanceof Variable || !is_string($param->var->name)) {
                    throw new ShouldNotHappenException();
                }
                $parameters[] = new NativeParameterReflection($param->var->name, $firstOptionalParameterIndex !== null && $i >= $firstOptionalParameterIndex, $this->getFunctionType($param->type, $this->isParameterValueNullable($param), \false), $param->byRef ? PassedByReference::createCreatesNewVariable() : PassedByReference::createNo(), $param->variadic, $param->default !== null ? $this->getType($param->default) : null);
            }
            $callableParameters = null;
            $arrayMapArgs = $node->getAttribute(ArrayMapArgVisitor::ATTRIBUTE_NAME);
            if ($arrayMapArgs !== null) {
                $callableParameters = [];
                foreach ($arrayMapArgs as $funcCallArg) {
                    $callableParameters[] = new DummyParameter('item', $this->getType($funcCallArg->value)->getIterableValueType(), \false, PassedByReference::createNo(), \false, null);
                }
            }
            if ($node instanceof Expr\ArrowFunction) {
                $arrowScope = $this->enterArrowFunctionWithoutReflection($node, $callableParameters);
                if ($node->expr instanceof Expr\Yield_ || $node->expr instanceof Expr\YieldFrom) {
                    $yieldNode = $node->expr;
                    if ($yieldNode instanceof Expr\Yield_) {
                        if ($yieldNode->key === null) {
                            $keyType = new IntegerType();
                        } else {
                            $keyType = $arrowScope->getType($yieldNode->key);
                        }
                        if ($yieldNode->value === null) {
                            $valueType = new NullType();
                        } else {
                            $valueType = $arrowScope->getType($yieldNode->value);
                        }
                    } else {
                        $yieldFromType = $arrowScope->getType($yieldNode->expr);
                        $keyType = $yieldFromType->getIterableKeyType();
                        $valueType = $yieldFromType->getIterableValueType();
                    }
                    $returnType = new GenericObjectType(Generator::class, [$keyType, $valueType, new MixedType(), new VoidType()]);
                } else {
                    $returnType = $arrowScope->getType($node->expr);
                    if ($node->returnType !== null) {
                        $returnType = TypehintHelper::decideType($this->getFunctionType($node->returnType, \false, \false), $returnType);
                    }
                }
            } else {
                $closureScope = $this->enterAnonymousFunctionWithoutReflection($node, $callableParameters);
                $closureReturnStatements = [];
                $closureYieldStatements = [];
                $closureExecutionEnds = [];
                $this->nodeScopeResolver->processStmtNodes($node, $node->stmts, $closureScope, static function (Node $node, \PHPStan\Analyser\Scope $scope) use($closureScope, &$closureReturnStatements, &$closureYieldStatements, &$closureExecutionEnds) : void {
                    if ($scope->getAnonymousFunctionReflection() !== $closureScope->getAnonymousFunctionReflection()) {
                        return;
                    }
                    if ($node instanceof ExecutionEndNode) {
                        if ($node->getStatementResult()->isAlwaysTerminating()) {
                            foreach ($node->getStatementResult()->getExitPoints() as $exitPoint) {
                                if ($exitPoint->getStatement() instanceof Node\Stmt\Return_) {
                                    continue;
                                }
                                $closureExecutionEnds[] = $node;
                                break;
                            }
                            if (count($node->getStatementResult()->getExitPoints()) === 0) {
                                $closureExecutionEnds[] = $node;
                            }
                        }
                        return;
                    }
                    if ($node instanceof Node\Stmt\Return_) {
                        $closureReturnStatements[] = [$node, $scope];
                    }
                    if (!$node instanceof Expr\Yield_ && !$node instanceof Expr\YieldFrom) {
                        return;
                    }
                    $closureYieldStatements[] = [$node, $scope];
                }, \PHPStan\Analyser\StatementContext::createTopLevel());
                $returnTypes = [];
                $hasNull = \false;
                foreach ($closureReturnStatements as [$returnNode, $returnScope]) {
                    if ($returnNode->expr === null) {
                        $hasNull = \true;
                        continue;
                    }
                    $returnTypes[] = $returnScope->getType($returnNode->expr);
                }
                if (count($returnTypes) === 0) {
                    if (count($closureExecutionEnds) > 0 && !$hasNull) {
                        $returnType = new NeverType(\true);
                    } else {
                        $returnType = new VoidType();
                    }
                } else {
                    if (count($closureExecutionEnds) > 0) {
                        $returnTypes[] = new NeverType(\true);
                    }
                    if ($hasNull) {
                        $returnTypes[] = new NullType();
                    }
                    $returnType = TypeCombinator::union(...$returnTypes);
                }
                if (count($closureYieldStatements) > 0) {
                    $keyTypes = [];
                    $valueTypes = [];
                    foreach ($closureYieldStatements as [$yieldNode, $yieldScope]) {
                        if ($yieldNode instanceof Expr\Yield_) {
                            if ($yieldNode->key === null) {
                                $keyTypes[] = new IntegerType();
                            } else {
                                $keyTypes[] = $yieldScope->getType($yieldNode->key);
                            }
                            if ($yieldNode->value === null) {
                                $valueTypes[] = new NullType();
                            } else {
                                $valueTypes[] = $yieldScope->getType($yieldNode->value);
                            }
                            continue;
                        }
                        $yieldFromType = $yieldScope->getType($yieldNode->expr);
                        $keyTypes[] = $yieldFromType->getIterableKeyType();
                        $valueTypes[] = $yieldFromType->getIterableValueType();
                    }
                    $returnType = new GenericObjectType(Generator::class, [TypeCombinator::union(...$keyTypes), TypeCombinator::union(...$valueTypes), new MixedType(), $returnType]);
                } else {
                    $returnType = TypehintHelper::decideType($this->getFunctionType($node->returnType, \false, \false), $returnType);
                }
            }
            return new ClosureType($parameters, $returnType, $isVariadic);
        } elseif ($node instanceof New_) {
            if ($node->class instanceof Name) {
                $type = $this->exactInstantiation($node, $node->class->toString());
                if ($type !== null) {
                    return $type;
                }
                $lowercasedClassName = strtolower($node->class->toString());
                if ($lowercasedClassName === 'static') {
                    if (!$this->isInClass()) {
                        return new ErrorType();
                    }
                    return new StaticType($this->getClassReflection());
                }
                if ($lowercasedClassName === 'parent') {
                    return new NonexistentParentClassType();
                }
                return new ObjectType($node->class->toString());
            }
            if ($node->class instanceof Node\Stmt\Class_) {
                $anonymousClassReflection = $this->reflectionProvider->getAnonymousClassReflection($node->class, $this);
                return new ObjectType($anonymousClassReflection->getName());
            }
            $exprType = $this->getType($node->class);
            return $exprType->getObjectTypeOrClassStringObjectType();
        } elseif ($node instanceof Array_) {
            return $this->initializerExprTypeResolver->getArrayType($node, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        } elseif ($node instanceof Int_) {
            return $this->getType($node->expr)->toInteger();
        } elseif ($node instanceof Bool_) {
            return $this->getType($node->expr)->toBoolean();
        } elseif ($node instanceof Double) {
            return $this->getType($node->expr)->toFloat();
        } elseif ($node instanceof Node\Expr\Cast\String_) {
            return $this->getType($node->expr)->toString();
        } elseif ($node instanceof Node\Expr\Cast\Array_) {
            return $this->getType($node->expr)->toArray();
        } elseif ($node instanceof Node\Scalar\MagicConst) {
            return $this->initializerExprTypeResolver->getType($node, InitializerExprContext::fromScope($this));
        } elseif ($node instanceof Object_) {
            $castToObject = static function (Type $type) : Type {
                if (count($type->getConstantArrays()) > 0) {
                    $objects = [];
                    foreach ($type->getConstantArrays() as $constantArray) {
                        $properties = [];
                        $optionalProperties = [];
                        foreach ($constantArray->getKeyTypes() as $i => $keyType) {
                            if (!$keyType instanceof ConstantStringType) {
                                // an object with integer properties is >weird<
                                continue;
                            }
                            $valueType = $constantArray->getValueTypes()[$i];
                            $optional = $constantArray->isOptionalKey($i);
                            if ($optional) {
                                $optionalProperties[] = $keyType->getValue();
                            }
                            $properties[$keyType->getValue()] = $valueType;
                        }
                        $objects[] = TypeCombinator::intersect(new ObjectShapeType($properties, $optionalProperties), new ObjectType(stdClass::class));
                    }
                    return TypeCombinator::union(...$objects);
                }
                if ($type->isObject()->yes()) {
                    return $type;
                }
                return new ObjectType('stdClass');
            };
            $exprType = $this->getType($node->expr);
            if ($exprType instanceof UnionType) {
                return TypeCombinator::union(...array_map($castToObject, $exprType->getTypes()));
            }
            return $castToObject($exprType);
        } elseif ($node instanceof Unset_) {
            return new NullType();
        } elseif ($node instanceof Expr\PostInc || $node instanceof Expr\PostDec) {
            return $this->getType($node->var);
        } elseif ($node instanceof Expr\PreInc || $node instanceof Expr\PreDec) {
            $varType = $this->getType($node->var);
            $varScalars = $varType->getConstantScalarValues();
            $stringType = new StringType();
            if (count($varScalars) > 0) {
                $newTypes = [];
                foreach ($varScalars as $varValue) {
                    if ($node instanceof Expr\PreInc) {
                        ++$varValue;
                    } else {
                        --$varValue;
                    }
                    $newTypes[] = $this->getTypeFromValue($varValue);
                }
                return TypeCombinator::union(...$newTypes);
            } elseif ($varType->isString()->yes()) {
                if ($varType->isLiteralString()->yes()) {
                    return new IntersectionType([$stringType, new AccessoryLiteralStringType()]);
                }
                return $stringType;
            }
            if ($node instanceof Expr\PreInc) {
                return $this->getType(new BinaryOp\Plus($node->var, new LNumber(1)));
            }
            return $this->getType(new BinaryOp\Minus($node->var, new LNumber(1)));
        } elseif ($node instanceof Expr\Yield_) {
            $functionReflection = $this->getFunction();
            if ($functionReflection === null) {
                return new MixedType();
            }
            $returnType = ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
            $generatorSendType = $returnType->getTemplateType(Generator::class, 'TSend');
            if ($generatorSendType instanceof ErrorType) {
                return new MixedType();
            }
            return $generatorSendType;
        } elseif ($node instanceof Expr\YieldFrom) {
            $yieldFromType = $this->getType($node->expr);
            $generatorReturnType = $yieldFromType->getTemplateType(Generator::class, 'TReturn');
            if ($generatorReturnType instanceof ErrorType) {
                return new MixedType();
            }
            return $generatorReturnType;
        } elseif ($node instanceof Expr\Match_) {
            $cond = $node->cond;
            $types = [];
            $matchScope = $this;
            foreach ($node->arms as $arm) {
                if ($arm->conds === null) {
                    $types[] = $matchScope->getType($arm->body);
                    continue;
                }
                if (count($arm->conds) === 0) {
                    throw new ShouldNotHappenException();
                }
                $filteringExpr = null;
                foreach ($arm->conds as $armCond) {
                    $armCondExpr = new BinaryOp\Identical($cond, $armCond);
                    if ($filteringExpr === null) {
                        $filteringExpr = $armCondExpr;
                        continue;
                    }
                    $filteringExpr = new BinaryOp\BooleanOr($filteringExpr, $armCondExpr);
                }
                $filteringExprType = $matchScope->getType($filteringExpr);
                if (!(new ConstantBooleanType(\false))->isSuperTypeOf($filteringExprType)->yes()) {
                    $truthyScope = $matchScope->filterByTruthyValue($filteringExpr);
                    $types[] = $truthyScope->getType($arm->body);
                }
                $matchScope = $matchScope->filterByFalseyValue($filteringExpr);
            }
            return TypeCombinator::union(...$types);
        }
        if ($node instanceof Expr\Isset_) {
            $issetResult = \true;
            foreach ($node->vars as $var) {
                $result = $this->issetCheck($var, static function (Type $type) : ?bool {
                    $isNull = (new NullType())->isSuperTypeOf($type);
                    if ($isNull->maybe()) {
                        return null;
                    }
                    return !$isNull->yes();
                });
                if ($result !== null) {
                    if (!$result) {
                        return new ConstantBooleanType($result);
                    }
                    continue;
                }
                $issetResult = $result;
            }
            if ($issetResult === null) {
                return new BooleanType();
            }
            return new ConstantBooleanType($issetResult);
        }
        if ($node instanceof Expr\AssignOp\Coalesce) {
            return $this->getType(new BinaryOp\Coalesce($node->var, $node->expr, $node->getAttributes()));
        }
        if ($node instanceof Expr\BinaryOp\Coalesce) {
            $leftType = $this->getType($node->left);
            $result = $this->issetCheck($node->left, static function (Type $type) : ?bool {
                $isNull = (new NullType())->isSuperTypeOf($type);
                if ($isNull->maybe()) {
                    return null;
                }
                return !$isNull->yes();
            });
            if ($result !== null && $result !== \false) {
                return TypeCombinator::removeNull($leftType);
            }
            $rightType = $this->filterByFalseyValue(new BinaryOp\NotIdentical($node->left, new ConstFetch(new Name('null'))))->getType($node->right);
            if ($result === null) {
                return TypeCombinator::union(TypeCombinator::removeNull($leftType), $rightType);
            }
            return $rightType;
        }
        if ($node instanceof ConstFetch) {
            $constName = (string) $node->name;
            $loweredConstName = strtolower($constName);
            if ($loweredConstName === 'true') {
                return new ConstantBooleanType(\true);
            } elseif ($loweredConstName === 'false') {
                return new ConstantBooleanType(\false);
            } elseif ($loweredConstName === 'null') {
                return new NullType();
            }
            $namespacedName = null;
            if (!$node->name->isFullyQualified() && $this->getNamespace() !== null) {
                $namespacedName = new FullyQualified([$this->getNamespace(), $node->name->toString()]);
            }
            $globalName = new FullyQualified($node->name->toString());
            foreach ([$namespacedName, $globalName] as $name) {
                if ($name === null) {
                    continue;
                }
                $constFetch = new ConstFetch($name);
                if ($this->hasExpressionType($constFetch)->yes()) {
                    return $this->constantResolver->resolveConstantType($name->toString(), $this->expressionTypes[$this->getNodeKey($constFetch)]->getType());
                }
            }
            $constantType = $this->constantResolver->resolveConstant($node->name, $this);
            if ($constantType !== null) {
                return $constantType;
            }
            return new ErrorType();
        } elseif ($node instanceof Node\Expr\ClassConstFetch && $node->name instanceof Node\Identifier) {
            if ($this->hasExpressionType($node)->yes()) {
                return $this->expressionTypes[$exprString]->getType();
            }
            return $this->initializerExprTypeResolver->getClassConstFetchTypeByReflection($node->class, $node->name->name, $this->isInClass() ? $this->getClassReflection() : null, function (Expr $expr) : Type {
                return $this->getType($expr);
            });
        }
        if ($node instanceof Expr\Ternary) {
            if ($node->if === null) {
                $conditionType = $this->getType($node->cond);
                $booleanConditionType = $conditionType->toBoolean();
                if ($booleanConditionType->isTrue()->yes()) {
                    return $this->filterByTruthyValue($node->cond)->getType($node->cond);
                }
                if ($booleanConditionType->isFalse()->yes()) {
                    return $this->filterByFalseyValue($node->cond)->getType($node->else);
                }
                return TypeCombinator::union(TypeCombinator::removeFalsey($this->filterByTruthyValue($node->cond)->getType($node->cond)), $this->filterByFalseyValue($node->cond)->getType($node->else));
            }
            $booleanConditionType = $this->getType($node->cond)->toBoolean();
            if ($booleanConditionType->isTrue()->yes()) {
                return $this->filterByTruthyValue($node->cond)->getType($node->if);
            }
            if ($booleanConditionType->isFalse()->yes()) {
                return $this->filterByFalseyValue($node->cond)->getType($node->else);
            }
            return TypeCombinator::union($this->filterByTruthyValue($node->cond)->getType($node->if), $this->filterByFalseyValue($node->cond)->getType($node->else));
        }
        if ($node instanceof Variable && is_string($node->name)) {
            if ($this->hasVariableType($node->name)->no()) {
                return new ErrorType();
            }
            return $this->getVariableType($node->name);
        }
        if ($node instanceof Expr\ArrayDimFetch && $node->dim !== null) {
            return $this->getNullsafeShortCircuitingType($node->var, $this->getTypeFromArrayDimFetch($node, $this->getType($node->dim), $this->getType($node->var)));
        }
        if ($node instanceof MethodCall && $node->name instanceof Node\Identifier) {
            if ($this->nativeTypesPromoted) {
                $typeCallback = function () use($node) : Type {
                    $methodReflection = $this->getMethodReflection($this->getNativeType($node->var), $node->name->name);
                    if ($methodReflection === null) {
                        return new ErrorType();
                    }
                    return ParametersAcceptorSelector::combineAcceptors($methodReflection->getVariants())->getNativeReturnType();
                };
                return $this->getNullsafeShortCircuitingType($node->var, $typeCallback());
            }
            $typeCallback = function () use($node) : Type {
                $returnType = $this->methodCallReturnType($this->getType($node->var), $node->name->name, $node);
                if ($returnType === null) {
                    return new ErrorType();
                }
                return $returnType;
            };
            return $this->getNullsafeShortCircuitingType($node->var, $typeCallback());
        }
        if ($node instanceof Expr\NullsafeMethodCall) {
            $varType = $this->getType($node->var);
            if (!TypeCombinator::containsNull($varType)) {
                return $this->getType(new MethodCall($node->var, $node->name, $node->args));
            }
            return TypeCombinator::union($this->filterByTruthyValue(new BinaryOp\NotIdentical($node->var, new ConstFetch(new Name('null'))))->getType(new MethodCall($node->var, $node->name, $node->args)), new NullType());
        }
        if ($node instanceof Expr\StaticCall && $node->name instanceof Node\Identifier) {
            if ($this->nativeTypesPromoted) {
                $typeCallback = function () use($node) : Type {
                    if ($node->class instanceof Name) {
                        $staticMethodCalledOnType = $this->resolveTypeByName($node->class);
                    } else {
                        $staticMethodCalledOnType = $this->getNativeType($node->class);
                    }
                    $methodReflection = $this->getMethodReflection($staticMethodCalledOnType, $node->name->name);
                    if ($methodReflection === null) {
                        return new ErrorType();
                    }
                    return ParametersAcceptorSelector::combineAcceptors($methodReflection->getVariants())->getNativeReturnType();
                };
                $callType = $typeCallback();
                if ($node->class instanceof Expr) {
                    return $this->getNullsafeShortCircuitingType($node->class, $callType);
                }
                return $callType;
            }
            $typeCallback = function () use($node) : Type {
                if ($node->class instanceof Name) {
                    $staticMethodCalledOnType = $this->resolveTypeByName($node->class);
                } else {
                    $staticMethodCalledOnType = $this->getType($node->class)->getObjectTypeOrClassStringObjectType();
                }
                $returnType = $this->methodCallReturnType($staticMethodCalledOnType, $node->name->toString(), $node);
                if ($returnType === null) {
                    return new ErrorType();
                }
                return $returnType;
            };
            $callType = $typeCallback();
            if ($node->class instanceof Expr) {
                return $this->getNullsafeShortCircuitingType($node->class, $callType);
            }
            return $callType;
        }
        if ($node instanceof PropertyFetch && $node->name instanceof Node\Identifier) {
            if ($this->nativeTypesPromoted) {
                $propertyReflection = $this->propertyReflectionFinder->findPropertyReflectionFromNode($node, $this);
                if ($propertyReflection === null) {
                    return new ErrorType();
                }
                $nativeType = $propertyReflection->getNativeType();
                if ($nativeType === null) {
                    return new ErrorType();
                }
                return $this->getNullsafeShortCircuitingType($node->var, $nativeType);
            }
            $typeCallback = function () use($node) : Type {
                $returnType = $this->propertyFetchType($this->getType($node->var), $node->name->name, $node);
                if ($returnType === null) {
                    return new ErrorType();
                }
                return $returnType;
            };
            return $this->getNullsafeShortCircuitingType($node->var, $typeCallback());
        }
        if ($node instanceof Expr\NullsafePropertyFetch) {
            $varType = $this->getType($node->var);
            if (!TypeCombinator::containsNull($varType)) {
                return $this->getType(new PropertyFetch($node->var, $node->name));
            }
            return TypeCombinator::union($this->filterByTruthyValue(new BinaryOp\NotIdentical($node->var, new ConstFetch(new Name('null'))))->getType(new PropertyFetch($node->var, $node->name)), new NullType());
        }
        if ($node instanceof Expr\StaticPropertyFetch && $node->name instanceof Node\VarLikeIdentifier) {
            if ($this->nativeTypesPromoted) {
                $propertyReflection = $this->propertyReflectionFinder->findPropertyReflectionFromNode($node, $this);
                if ($propertyReflection === null) {
                    return new ErrorType();
                }
                $nativeType = $propertyReflection->getNativeType();
                if ($nativeType === null) {
                    return new ErrorType();
                }
                if ($node->class instanceof Expr) {
                    return $this->getNullsafeShortCircuitingType($node->class, $nativeType);
                }
                return $nativeType;
            }
            $typeCallback = function () use($node) : Type {
                if ($node->class instanceof Name) {
                    $staticPropertyFetchedOnType = $this->resolveTypeByName($node->class);
                } else {
                    $staticPropertyFetchedOnType = $this->getType($node->class)->getObjectTypeOrClassStringObjectType();
                }
                $returnType = $this->propertyFetchType($staticPropertyFetchedOnType, $node->name->toString(), $node);
                if ($returnType === null) {
                    return new ErrorType();
                }
                return $returnType;
            };
            $fetchType = $typeCallback();
            if ($node->class instanceof Expr) {
                return $this->getNullsafeShortCircuitingType($node->class, $fetchType);
            }
            return $fetchType;
        }
        if ($node instanceof FuncCall) {
            if ($node->name instanceof Expr) {
                $calledOnType = $this->getType($node->name);
                if ($calledOnType->isCallable()->no()) {
                    return new ErrorType();
                }
                return ParametersAcceptorSelector::selectFromArgs($this, $node->getArgs(), $calledOnType->getCallableParametersAcceptors($this))->getReturnType();
            }
            if (!$this->reflectionProvider->hasFunction($node->name, $this)) {
                return new ErrorType();
            }
            $functionReflection = $this->reflectionProvider->getFunction($node->name, $this);
            if ($this->nativeTypesPromoted) {
                return ParametersAcceptorSelector::combineAcceptors($functionReflection->getVariants())->getNativeReturnType();
            }
            $parametersAcceptor = ParametersAcceptorSelector::selectFromArgs($this, $node->getArgs(), $functionReflection->getVariants());
            $normalizedNode = \PHPStan\Analyser\ArgumentsNormalizer::reorderFuncArguments($parametersAcceptor, $node);
            if ($normalizedNode !== null) {
                foreach ($this->dynamicReturnTypeExtensionRegistry->getDynamicFunctionReturnTypeExtensions() as $dynamicFunctionReturnTypeExtension) {
                    if (!$dynamicFunctionReturnTypeExtension->isFunctionSupported($functionReflection)) {
                        continue;
                    }
                    $resolvedType = $dynamicFunctionReturnTypeExtension->getTypeFromFunctionCall($functionReflection, $normalizedNode, $this);
                    if ($resolvedType !== null) {
                        return $resolvedType;
                    }
                }
            }
            return $parametersAcceptor->getReturnType();
        }
        return new MixedType();
    }
    private function getNullsafeShortCircuitingType(Expr $expr, Type $type) : Type
    {
        if ($expr instanceof Expr\NullsafePropertyFetch || $expr instanceof Expr\NullsafeMethodCall) {
            $varType = $this->getType($expr->var);
            if (TypeCombinator::containsNull($varType)) {
                return TypeCombinator::addNull($type);
            }
            return $type;
        }
        if ($expr instanceof Expr\ArrayDimFetch) {
            return $this->getNullsafeShortCircuitingType($expr->var, $type);
        }
        if ($expr instanceof PropertyFetch) {
            return $this->getNullsafeShortCircuitingType($expr->var, $type);
        }
        if ($expr instanceof Expr\StaticPropertyFetch && $expr->class instanceof Expr) {
            return $this->getNullsafeShortCircuitingType($expr->class, $type);
        }
        if ($expr instanceof MethodCall) {
            return $this->getNullsafeShortCircuitingType($expr->var, $type);
        }
        if ($expr instanceof Expr\StaticCall && $expr->class instanceof Expr) {
            return $this->getNullsafeShortCircuitingType($expr->class, $type);
        }
        return $type;
    }
    /**
     * @param callable(Type): ?bool $typeCallback
     */
    public function issetCheck(Expr $expr, callable $typeCallback, ?bool $result = null) : ?bool
    {
        // mirrored in PHPStan\Rules\IssetCheck
        if ($expr instanceof Node\Expr\Variable && is_string($expr->name)) {
            $hasVariable = $this->hasVariableType($expr->name);
            if ($hasVariable->maybe()) {
                return null;
            }
            if ($result === null) {
                if ($hasVariable->yes()) {
                    if ($expr->name === '_SESSION') {
                        return null;
                    }
                    return $typeCallback($this->getVariableType($expr->name));
                }
                return \false;
            }
            return $result;
        } elseif ($expr instanceof Node\Expr\ArrayDimFetch && $expr->dim !== null) {
            $type = $this->getType($expr->var);
            $dimType = $this->getType($expr->dim);
            $hasOffsetValue = $type->hasOffsetValueType($dimType);
            if (!$type->isOffsetAccessible()->yes()) {
                return $result ?? $this->issetCheckUndefined($expr->var);
            }
            if ($hasOffsetValue->no()) {
                return \false;
            }
            // If offset is cannot be null, store this error message and see if one of the earlier offsets is.
            // E.g. $array['a']['b']['c'] ?? null; is a valid coalesce if a OR b or C might be null.
            if ($hasOffsetValue->yes()) {
                $result = $typeCallback($type->getOffsetValueType($dimType));
                if ($result !== null) {
                    return $this->issetCheck($expr->var, $typeCallback, $result);
                }
            }
            // Has offset, it is nullable
            return null;
        } elseif ($expr instanceof Node\Expr\PropertyFetch || $expr instanceof Node\Expr\StaticPropertyFetch) {
            $propertyReflection = $this->propertyReflectionFinder->findPropertyReflectionFromNode($expr, $this);
            if ($propertyReflection === null) {
                if ($expr instanceof Node\Expr\PropertyFetch) {
                    return $this->issetCheckUndefined($expr->var);
                }
                if ($expr->class instanceof Expr) {
                    return $this->issetCheckUndefined($expr->class);
                }
                return null;
            }
            if (!$propertyReflection->isNative()) {
                if ($expr instanceof Node\Expr\PropertyFetch) {
                    return $this->issetCheckUndefined($expr->var);
                }
                if ($expr->class instanceof Expr) {
                    return $this->issetCheckUndefined($expr->class);
                }
                return null;
            }
            $nativeType = $propertyReflection->getNativeType();
            if (!$nativeType instanceof MixedType) {
                if (!$this->hasExpressionType($expr)->yes()) {
                    if ($expr instanceof Node\Expr\PropertyFetch) {
                        return $this->issetCheckUndefined($expr->var);
                    }
                    if ($expr->class instanceof Expr) {
                        return $this->issetCheckUndefined($expr->class);
                    }
                    return null;
                }
            }
            if ($result !== null) {
                return $result;
            }
            $result = $typeCallback($propertyReflection->getWritableType());
            if ($result !== null) {
                if ($expr instanceof Node\Expr\PropertyFetch) {
                    return $this->issetCheck($expr->var, $typeCallback, $result);
                }
                if ($expr->class instanceof Expr) {
                    return $this->issetCheck($expr->class, $typeCallback, $result);
                }
            }
            return $result;
        }
        if ($result !== null) {
            return $result;
        }
        return $typeCallback($this->getType($expr));
    }
    private function issetCheckUndefined(Expr $expr) : ?bool
    {
        if ($expr instanceof Node\Expr\Variable && is_string($expr->name)) {
            $hasVariable = $this->hasVariableType($expr->name);
            if (!$hasVariable->no()) {
                return null;
            }
            return \false;
        }
        if ($expr instanceof Node\Expr\ArrayDimFetch && $expr->dim !== null) {
            $type = $this->getType($expr->var);
            $dimType = $this->getType($expr->dim);
            $hasOffsetValue = $type->hasOffsetValueType($dimType);
            if (!$type->isOffsetAccessible()->yes()) {
                return $this->issetCheckUndefined($expr->var);
            }
            if (!$hasOffsetValue->no()) {
                return $this->issetCheckUndefined($expr->var);
            }
            return \false;
        }
        if ($expr instanceof Expr\PropertyFetch) {
            return $this->issetCheckUndefined($expr->var);
        }
        if ($expr instanceof Expr\StaticPropertyFetch && $expr->class instanceof Expr) {
            return $this->issetCheckUndefined($expr->class);
        }
        return null;
    }
    /**
     * @param ParametersAcceptor[] $variants
     */
    private function createFirstClassCallable(array $variants) : Type
    {
        $closureTypes = [];
        foreach ($variants as $variant) {
            $returnType = $variant->getReturnType();
            if ($variant instanceof ParametersAcceptorWithPhpDocs) {
                $returnType = $this->nativeTypesPromoted ? $variant->getNativeReturnType() : $returnType;
            }
            $parameters = $variant->getParameters();
            $closureTypes[] = new ClosureType($parameters, $returnType, $variant->isVariadic(), $variant->getTemplateTypeMap(), $variant->getResolvedTemplateTypeMap());
        }
        return TypeCombinator::union(...$closureTypes);
    }
    /** @api */
    public function getNativeType(Expr $expr) : Type
    {
        return $this->promoteNativeTypes()->getType($expr);
    }
    /**
     * @api
     * @deprecated Use getNativeType()
     */
    public function doNotTreatPhpDocTypesAsCertain() : \PHPStan\Analyser\Scope
    {
        return $this->promoteNativeTypes();
    }
    private function promoteNativeTypes() : self
    {
        if ($this->nativeTypesPromoted) {
            return $this;
        }
        if ($this->scopeWithPromotedNativeTypes !== null) {
            return $this->scopeWithPromotedNativeTypes;
        }
        return $this->scopeWithPromotedNativeTypes = $this->scopeFactory->create($this->context, $this->declareStrictTypes, $this->function, $this->namespace, $this->nativeExpressionTypes, [], [], $this->inClosureBindScopeClasses, $this->anonymousFunctionReflection, $this->inFirstLevelStatement, $this->currentlyAssignedExpressions, $this->currentlyAllowedUndefinedExpressions, $this->inFunctionCallsStack, $this->afterExtractCall, $this->parentScope, \true);
    }
    /**
     * @param Node\Expr\PropertyFetch|Node\Expr\StaticPropertyFetch $propertyFetch
     */
    private function hasPropertyNativeType($propertyFetch) : bool
    {
        $propertyReflection = $this->propertyReflectionFinder->findPropertyReflectionFromNode($propertyFetch, $this);
        if ($propertyReflection === null) {
            return \false;
        }
        if (!$propertyReflection->isNative()) {
            return \false;
        }
        return !$propertyReflection->getNativeType() instanceof MixedType;
    }
    /** @api */
    protected function getTypeFromArrayDimFetch(Expr\ArrayDimFetch $arrayDimFetch, Type $offsetType, Type $offsetAccessibleType) : Type
    {
        if ($arrayDimFetch->dim === null) {
            throw new ShouldNotHappenException();
        }
        if (!$offsetAccessibleType->isArray()->yes() && (new ObjectType(ArrayAccess::class))->isSuperTypeOf($offsetAccessibleType)->yes()) {
            return $this->getType(new MethodCall($arrayDimFetch->var, new Node\Identifier('offsetGet'), [new Node\Arg($arrayDimFetch->dim)]));
        }
        return $offsetAccessibleType->getOffsetValueType($offsetType);
    }
    private function resolveExactName(Name $name) : ?string
    {
        $originalClass = (string) $name;
        switch (strtolower($originalClass)) {
            case 'self':
                if (!$this->isInClass()) {
                    return null;
                }
                return $this->getClassReflection()->getName();
            case 'parent':
                if (!$this->isInClass()) {
                    return null;
                }
                $currentClassReflection = $this->getClassReflection();
                if ($currentClassReflection->getParentClass() !== null) {
                    return $currentClassReflection->getParentClass()->getName();
                }
                return null;
            case 'static':
                return null;
        }
        return $originalClass;
    }
    /** @api */
    public function resolveName(Name $name) : string
    {
        $originalClass = (string) $name;
        if ($this->isInClass()) {
            if (in_array(strtolower($originalClass), ['self', 'static'], \true)) {
                if ($this->inClosureBindScopeClasses !== [] && $this->inClosureBindScopeClasses !== ['static']) {
                    return $this->inClosureBindScopeClasses[0];
                }
                return $this->getClassReflection()->getName();
            } elseif ($originalClass === 'parent') {
                $currentClassReflection = $this->getClassReflection();
                if ($currentClassReflection->getParentClass() !== null) {
                    return $currentClassReflection->getParentClass()->getName();
                }
            }
        }
        return $originalClass;
    }
    /** @api */
    public function resolveTypeByName(Name $name) : TypeWithClassName
    {
        if ($name->toLowerString() === 'static' && $this->isInClass()) {
            if ($this->inClosureBindScopeClasses !== [] && $this->inClosureBindScopeClasses !== ['static']) {
                if ($this->reflectionProvider->hasClass($this->inClosureBindScopeClasses[0])) {
                    return new StaticType($this->reflectionProvider->getClass($this->inClosureBindScopeClasses[0]));
                }
            }
            return new StaticType($this->getClassReflection());
        }
        $originalClass = $this->resolveName($name);
        if ($this->isInClass()) {
            if ($this->inClosureBindScopeClasses === [$originalClass]) {
                if ($this->reflectionProvider->hasClass($originalClass)) {
                    return new ThisType($this->reflectionProvider->getClass($originalClass));
                }
                return new ObjectType($originalClass);
            }
            $thisType = new ThisType($this->getClassReflection());
            $ancestor = $thisType->getAncestorWithClassName($originalClass);
            if ($ancestor !== null) {
                return $ancestor;
            }
        }
        return new ObjectType($originalClass);
    }
    /**
     * @api
     * @param mixed $value
     */
    public function getTypeFromValue($value) : Type
    {
        return ConstantTypeHelper::getTypeFromValue($value);
    }
    /**
     * @api
     * @deprecated use hasExpressionType instead
     */
    public function isSpecified(Expr $node) : bool
    {
        return !$node instanceof Variable && $this->hasExpressionType($node)->yes();
    }
    /** @api */
    public function hasExpressionType(Expr $node) : TrinaryLogic
    {
        $exprString = $this->getNodeKey($node);
        if (!isset($this->expressionTypes[$exprString])) {
            return TrinaryLogic::createNo();
        }
        return $this->expressionTypes[$exprString]->getCertainty();
    }
    /**
     * @param MethodReflection|FunctionReflection $reflection
     */
    public function pushInFunctionCall($reflection) : self
    {
        $stack = $this->inFunctionCallsStack;
        $stack[] = $reflection;
        $scope = $this->scopeFactory->create($this->context, $this->isDeclareStrictTypes(), $this->getFunction(), $this->getNamespace(), $this->expressionTypes, $this->nativeExpressionTypes, $this->conditionalExpressions, $this->inClosureBindScopeClasses, $this->anonymousFunctionReflection, $this->isInFirstLevelStatement(), $this->currentlyAssignedExpressions, $this->currentlyAllowedUndefinedExpressions, $stack, $this->afterExtractCall, $this->parentScope, $this->nativeTypesPromoted);
        $scope->resolvedTypes = $this->resolvedTypes;
        $scope->truthyScopes = $this->truthyScopes;
        $scope->falseyScopes = $this->falseyScopes;
        return $scope;
    }
    public function popInFunctionCall() : self
    {
        $stack = $this->inFunctionCallsStack;
        array_pop($stack);
        $scope = $this->scopeFactory->create($this->context, $this->isDeclareStrictTypes(), $this->getFunction(), $this->getNamespace(), $this->expressionTypes, $this->nativeExpressionTypes, $this->conditionalExpressions, $this->inClosureBindScopeClasses, $this->anonymousFunctionReflection, $this->isInFirstLevelStatement(), $this->currentlyAssignedExpressions, $this->currentlyAllowedUndefinedExpressions, $stack, $this->afterExtractCall, $this->parentScope, $this->nativeTypesPromoted);
        $scope->resolvedTypes = $this->resolvedTypes;
        $scope->truthyScopes = $this->truthyScopes;
        $scope->falseyScopes = $this->falseyScopes;
        return $scope;
    }
    /** @api */
    public function isInClassExists(string $className) : bool
    {
        foreach ($this->inFunctionCallsStack as $inFunctionCall) {
            if (!$inFunctionCall instanceof FunctionReflection) {
                continue;
            }
            if (in_array($inFunctionCall->getName(), ['class_exists', 'interface_exists', 'trait_exists'], \true)) {
                return \true;
            }
        }
        $expr = new FuncCall(new FullyQualified('class_exists'), [new Arg(new String_(ltrim($className, '\\')))]);
        return (new ConstantBooleanType(\true))->isSuperTypeOf($this->getType($expr))->yes();
    }
    /** @api */
    public function isInFunctionExists(string $functionName) : bool
    {
        $expr = new FuncCall(new FullyQualified('function_exists'), [new Arg(new String_(ltrim($functionName, '\\')))]);
        return (new ConstantBooleanType(\true))->isSuperTypeOf($this->getType($expr))->yes();
    }
    /** @api */
    public function enterClass(ClassReflection $classReflection) : self
    {
        $thisHolder = \PHPStan\Analyser\ExpressionTypeHolder::createYes(new Variable('this'), new ThisType($classReflection));
        $constantTypes = $this->getConstantTypes();
        $constantTypes['$this'] = $thisHolder;
        $nativeConstantTypes = $this->getNativeConstantTypes();
        $nativeConstantTypes['$this'] = $thisHolder;
        return $this->scopeFactory->create($this->context->enterClass($classReflection), $this->isDeclareStrictTypes(), null, $this->getNamespace(), $constantTypes, $nativeConstantTypes, [], [], null, \true, [], [], [], \false, $classReflection->isAnonymous() ? $this : null);
    }
    public function enterTrait(ClassReflection $traitReflection) : self
    {
        $namespace = null;
        $traitName = $traitReflection->getName();
        $traitNameParts = explode('\\', $traitName);
        if (count($traitNameParts) > 1) {
            $namespace = implode('\\', array_slice($traitNameParts, 0, -1));
        }
        return $this->scopeFactory->create($this->context->enterTrait($traitReflection), $this->isDeclareStrictTypes(), $this->getFunction(), $namespace, $this->expressionTypes, $this->nativeExpressionTypes, [], $this->inClosureBindScopeClasses, $this->anonymousFunctionReflection);
    }
    /**
     * @api
     * @param Type[] $phpDocParameterTypes
     * @param Type[] $parameterOutTypes
     */
    public function enterClassMethod(Node\Stmt\ClassMethod $classMethod, TemplateTypeMap $templateTypeMap, array $phpDocParameterTypes, ?Type $phpDocReturnType, ?Type $throwType, ?string $deprecatedDescription, bool $isDeprecated, bool $isInternal, bool $isFinal, ?bool $isPure = null, bool $acceptsNamedArguments = \true, ?Assertions $asserts = null, ?Type $selfOutType = null, ?string $phpDocComment = null, array $parameterOutTypes = []) : self
    {
        if (!$this->isInClass()) {
            throw new ShouldNotHappenException();
        }
        return $this->enterFunctionLike(new PhpMethodFromParserNodeReflection($this->getClassReflection(), $classMethod, $this->getFile(), $templateTypeMap, $this->getRealParameterTypes($classMethod), array_map(static function (Type $type) : Type {
            return TemplateTypeHelper::toArgument($type);
        }, $phpDocParameterTypes), $this->getRealParameterDefaultValues($classMethod), $this->transformStaticType($this->getFunctionType($classMethod->returnType, \false, \false)), $phpDocReturnType !== null ? TemplateTypeHelper::toArgument($phpDocReturnType) : null, $throwType, $deprecatedDescription, $isDeprecated, $isInternal, $isFinal, $isPure, $acceptsNamedArguments, $asserts ?? Assertions::createEmpty(), $selfOutType, $phpDocComment, array_map(static function (Type $type) : Type {
            return TemplateTypeHelper::toArgument($type);
        }, $parameterOutTypes)), !$classMethod->isStatic());
    }
    private function transformStaticType(Type $type) : Type
    {
        return TypeTraverser::map($type, function (Type $type, callable $traverse) : Type {
            if (!$this->isInClass()) {
                return $type;
            }
            if ($type instanceof StaticType) {
                $classReflection = $this->getClassReflection();
                $changedType = $type->changeBaseClass($classReflection);
                if ($classReflection->isFinal()) {
                    $changedType = $changedType->getStaticObjectType();
                }
                return $traverse($changedType);
            }
            return $traverse($type);
        });
    }
    /**
     * @return Type[]
     */
    private function getRealParameterTypes(Node\FunctionLike $functionLike) : array
    {
        $realParameterTypes = [];
        foreach ($functionLike->getParams() as $parameter) {
            if (!$parameter->var instanceof Variable || !is_string($parameter->var->name)) {
                throw new ShouldNotHappenException();
            }
            $realParameterTypes[$parameter->var->name] = $this->getFunctionType($parameter->type, $this->isParameterValueNullable($parameter), \false);
        }
        return $realParameterTypes;
    }
    /**
     * @return Type[]
     */
    private function getRealParameterDefaultValues(Node\FunctionLike $functionLike) : array
    {
        $realParameterDefaultValues = [];
        foreach ($functionLike->getParams() as $parameter) {
            if ($parameter->default === null) {
                continue;
            }
            if (!$parameter->var instanceof Variable || !is_string($parameter->var->name)) {
                throw new ShouldNotHappenException();
            }
            $realParameterDefaultValues[$parameter->var->name] = $this->getType($parameter->default);
        }
        return $realParameterDefaultValues;
    }
    /**
     * @api
     * @param Type[] $phpDocParameterTypes
     * @param Type[] $parameterOutTypes
     */
    public function enterFunction(Node\Stmt\Function_ $function, TemplateTypeMap $templateTypeMap, array $phpDocParameterTypes, ?Type $phpDocReturnType, ?Type $throwType, ?string $deprecatedDescription, bool $isDeprecated, bool $isInternal, bool $isFinal, ?bool $isPure = null, bool $acceptsNamedArguments = \true, ?Assertions $asserts = null, ?string $phpDocComment = null, array $parameterOutTypes = []) : self
    {
        return $this->enterFunctionLike(new PhpFunctionFromParserNodeReflection($function, $this->getFile(), $templateTypeMap, $this->getRealParameterTypes($function), array_map(static function (Type $type) : Type {
            return TemplateTypeHelper::toArgument($type);
        }, $phpDocParameterTypes), $this->getRealParameterDefaultValues($function), $this->getFunctionType($function->returnType, $function->returnType === null, \false), $phpDocReturnType !== null ? TemplateTypeHelper::toArgument($phpDocReturnType) : null, $throwType, $deprecatedDescription, $isDeprecated, $isInternal, $isFinal, $isPure, $acceptsNamedArguments, $asserts ?? Assertions::createEmpty(), $phpDocComment, array_map(static function (Type $type) : Type {
            return TemplateTypeHelper::toArgument($type);
        }, $parameterOutTypes)), \false);
    }
    private function enterFunctionLike(PhpFunctionFromParserNodeReflection $functionReflection, bool $preserveThis) : self
    {
        $expressionTypes = [];
        $nativeExpressionTypes = [];
        foreach (ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getParameters() as $parameter) {
            $parameterType = $parameter->getType();
            $paramExprString = '$' . $parameter->getName();
            if ($parameter->isVariadic()) {
                if ($this->phpVersion->supportsNamedArguments() && $functionReflection->acceptsNamedArguments()) {
                    $parameterType = new ArrayType(new UnionType([new IntegerType(), new StringType()]), $parameterType);
                } else {
                    $parameterType = AccessoryArrayListType::intersectWith(new ArrayType(new IntegerType(), $parameterType));
                }
            }
            $parameterNode = new Variable($parameter->getName());
            $expressionTypes[$paramExprString] = \PHPStan\Analyser\ExpressionTypeHolder::createYes($parameterNode, $parameterType);
            $nativeParameterType = $parameter->getNativeType();
            if ($parameter->isVariadic()) {
                if ($this->phpVersion->supportsNamedArguments() && $functionReflection->acceptsNamedArguments()) {
                    $nativeParameterType = new ArrayType(new UnionType([new IntegerType(), new StringType()]), $nativeParameterType);
                } else {
                    $nativeParameterType = AccessoryArrayListType::intersectWith(new ArrayType(new IntegerType(), $nativeParameterType));
                }
            }
            $nativeExpressionTypes[$paramExprString] = \PHPStan\Analyser\ExpressionTypeHolder::createYes($parameterNode, $nativeParameterType);
        }
        if ($preserveThis && array_key_exists('$this', $this->expressionTypes)) {
            $expressionTypes['$this'] = $this->expressionTypes['$this'];
        }
        if ($preserveThis && array_key_exists('$this', $this->nativeExpressionTypes)) {
            $nativeExpressionTypes['$this'] = $this->nativeExpressionTypes['$this'];
        }
        return $this->scopeFactory->create($this->context, $this->isDeclareStrictTypes(), $functionReflection, $this->getNamespace(), array_merge($this->getConstantTypes(), $expressionTypes), array_merge($this->getNativeConstantTypes(), $nativeExpressionTypes));
    }
    /** @api */
    public function enterNamespace(string $namespaceName) : self
    {
        return $this->scopeFactory->create($this->context->beginFile(), $this->isDeclareStrictTypes(), null, $namespaceName);
    }
    /**
     * @param list<string> $scopeClasses
     */
    public function enterClosureBind(?Type $thisType, ?Type $nativeThisType, array $scopeClasses) : self
    {
        $expressionTypes = $this->expressionTypes;
        if ($thisType !== null) {
            $expressionTypes['$this'] = \PHPStan\Analyser\ExpressionTypeHolder::createYes(new Variable('this'), $thisType);
        } else {
            unset($expressionTypes['$this']);
        }
        $nativeExpressionTypes = $this->nativeExpressionTypes;
        if ($nativeThisType !== null) {
            $nativeExpressionTypes['$this'] = \PHPStan\Analyser\ExpressionTypeHolder::createYes(new Variable('this'), $nativeThisType);
        } else {
            unset($nativeExpressionTypes['$this']);
        }
        if ($scopeClasses === ['static'] && $this->isInClass()) {
            $scopeClasses = [$this->getClassReflection()->getName()];
        }
        return $this->scopeFactory->create($this->context, $this->isDeclareStrictTypes(), $this->getFunction(), $this->getNamespace(), $expressionTypes, $nativeExpressionTypes, $this->conditionalExpressions, $scopeClasses, $this->anonymousFunctionReflection);
    }
    public function restoreOriginalScopeAfterClosureBind(self $originalScope) : self
    {
        $expressionTypes = $this->expressionTypes;
        if (isset($originalScope->expressionTypes['$this'])) {
            $expressionTypes['$this'] = $originalScope->expressionTypes['$this'];
        } else {
            unset($expressionTypes['$this']);
        }
        $nativeExpressionTypes = $this->nativeExpressionTypes;
        if (isset($originalScope->nativeExpressionTypes['$this'])) {
            $nativeExpressionTypes['$this'] = $originalScope->nativeExpressionTypes['$this'];
        } else {
            unset($nativeExpressionTypes['$this']);
        }
        return $this->scopeFactory->create($this->context, $this->isDeclareStrictTypes(), $this->getFunction(), $this->getNamespace(), $expressionTypes, $nativeExpressionTypes, $this->conditionalExpressions, $originalScope->inClosureBindScopeClasses, $this->anonymousFunctionReflection);
    }
    public function enterClosureCall(Type $thisType, Type $nativeThisType) : self
    {
        $expressionTypes = $this->expressionTypes;
        $expressionTypes['$this'] = \PHPStan\Analyser\ExpressionTypeHolder::createYes(new Variable('this'), $thisType);
        $nativeExpressionTypes = $this->nativeExpressionTypes;
        $nativeExpressionTypes['$this'] = \PHPStan\Analyser\ExpressionTypeHolder::createYes(new Variable('this'), $nativeThisType);
        return $this->scopeFactory->create($this->context, $this->isDeclareStrictTypes(), $this->getFunction(), $this->getNamespace(), $expressionTypes, $nativeExpressionTypes, $this->conditionalExpressions, $thisType->getObjectClassNames(), $this->anonymousFunctionReflection);
    }
    /** @api */
    public function isInClosureBind() : bool
    {
        return $this->inClosureBindScopeClasses !== [];
    }
    /**
     * @api
     * @param ParameterReflection[]|null $callableParameters
     */
    public function enterAnonymousFunction(Expr\Closure $closure, ?array $callableParameters = null) : self
    {
        $anonymousFunctionReflection = $this->getType($closure);
        if (!$anonymousFunctionReflection instanceof ClosureType) {
            throw new ShouldNotHappenException();
        }
        $scope = $this->enterAnonymousFunctionWithoutReflection($closure, $callableParameters);
        return $this->scopeFactory->create($scope->context, $scope->isDeclareStrictTypes(), $scope->getFunction(), $scope->getNamespace(), $scope->expressionTypes, $scope->nativeExpressionTypes, [], $scope->inClosureBindScopeClasses, $anonymousFunctionReflection, \true, [], [], [], \false, $this, $this->nativeTypesPromoted);
    }
    /**
     * @param ParameterReflection[]|null $callableParameters
     */
    private function enterAnonymousFunctionWithoutReflection(Expr\Closure $closure, ?array $callableParameters = null) : self
    {
        $expressionTypes = [];
        $nativeTypes = [];
        foreach ($closure->params as $i => $parameter) {
            if (!$parameter->var instanceof Variable || !is_string($parameter->var->name)) {
                throw new ShouldNotHappenException();
            }
            $paramExprString = sprintf('$%s', $parameter->var->name);
            $isNullable = $this->isParameterValueNullable($parameter);
            $parameterType = $this->getFunctionType($parameter->type, $isNullable, $parameter->variadic);
            if ($callableParameters !== null) {
                if (isset($callableParameters[$i])) {
                    $parameterType = TypehintHelper::decideType($parameterType, $callableParameters[$i]->getType());
                } elseif (count($callableParameters) > 0) {
                    $lastParameter = $callableParameters[count($callableParameters) - 1];
                    if ($lastParameter->isVariadic()) {
                        $parameterType = TypehintHelper::decideType($parameterType, $lastParameter->getType());
                    } else {
                        $parameterType = TypehintHelper::decideType($parameterType, new MixedType());
                    }
                } else {
                    $parameterType = TypehintHelper::decideType($parameterType, new MixedType());
                }
            }
            $holder = \PHPStan\Analyser\ExpressionTypeHolder::createYes($parameter->var, $parameterType);
            $expressionTypes[$paramExprString] = $holder;
            $nativeTypes[$paramExprString] = $holder;
        }
        $nonRefVariableNames = [];
        foreach ($closure->uses as $use) {
            if (!is_string($use->var->name)) {
                throw new ShouldNotHappenException();
            }
            $variableName = $use->var->name;
            $paramExprString = '$' . $use->var->name;
            if ($use->byRef) {
                $holder = \PHPStan\Analyser\ExpressionTypeHolder::createYes($use->var, new MixedType());
                $expressionTypes[$paramExprString] = $holder;
                $nativeTypes[$paramExprString] = $holder;
                continue;
            }
            $nonRefVariableNames[$variableName] = \true;
            if ($this->hasVariableType($variableName)->no()) {
                $variableType = new ErrorType();
                $variableNativeType = new ErrorType();
            } else {
                $variableType = $this->getVariableType($variableName);
                $variableNativeType = $this->getNativeType($use->var);
            }
            $expressionTypes[$paramExprString] = \PHPStan\Analyser\ExpressionTypeHolder::createYes($use->var, $variableType);
            $nativeTypes[$paramExprString] = \PHPStan\Analyser\ExpressionTypeHolder::createYes($use->var, $variableNativeType);
        }
        foreach ($this->invalidateStaticExpressions($this->expressionTypes) as $exprString => $typeHolder) {
            $expr = $typeHolder->getExpr();
            if ($expr instanceof Variable) {
                continue;
            }
            $variables = (new NodeFinder())->findInstanceOf([$expr], Variable::class);
            if ($variables === [] && !$this->expressionTypeIsUnchangeable($typeHolder)) {
                continue;
            }
            foreach ($variables as $variable) {
                if (!$variable instanceof Variable) {
                    continue 2;
                }
                if (!is_string($variable->name)) {
                    continue 2;
                }
                if (!array_key_exists($variable->name, $nonRefVariableNames)) {
                    continue 2;
                }
            }
            $expressionTypes[$exprString] = $typeHolder;
        }
        if ($this->hasVariableType('this')->yes() && !$closure->static) {
            $node = new Variable('this');
            $expressionTypes['$this'] = \PHPStan\Analyser\ExpressionTypeHolder::createYes($node, $this->getType($node));
            $nativeTypes['$this'] = \PHPStan\Analyser\ExpressionTypeHolder::createYes($node, $this->getNativeType($node));
        }
        return $this->scopeFactory->create($this->context, $this->isDeclareStrictTypes(), $this->getFunction(), $this->getNamespace(), array_merge($this->getConstantTypes(), $expressionTypes), array_merge($this->getNativeConstantTypes(), $nativeTypes), [], $this->inClosureBindScopeClasses, new TrivialParametersAcceptor(), \true, [], [], [], \false, $this, $this->nativeTypesPromoted);
    }
    private function expressionTypeIsUnchangeable(\PHPStan\Analyser\ExpressionTypeHolder $typeHolder) : bool
    {
        $expr = $typeHolder->getExpr();
        $type = $typeHolder->getType();
        return $expr instanceof FuncCall && !$expr->isFirstClassCallable() && $expr->name instanceof FullyQualified && $expr->name->toLowerString() === 'function_exists' && isset($expr->getArgs()[0]) && count($this->getType($expr->getArgs()[0]->value)->getConstantStrings()) === 1 && (new ConstantBooleanType(\true))->isSuperTypeOf($type)->yes();
    }
    /**
     * @param array<string, ExpressionTypeHolder> $expressionTypes
     * @return array<string, ExpressionTypeHolder>
     */
    private function invalidateStaticExpressions(array $expressionTypes) : array
    {
        $filteredExpressionTypes = [];
        $nodeFinder = new NodeFinder();
        foreach ($expressionTypes as $exprString => $expressionType) {
            $staticExpression = $nodeFinder->findFirst([$expressionType->getExpr()], static function ($node) {
                return $node instanceof Expr\StaticCall || $node instanceof Expr\StaticPropertyFetch;
            });
            if ($staticExpression !== null) {
                continue;
            }
            $filteredExpressionTypes[$exprString] = $expressionType;
        }
        return $filteredExpressionTypes;
    }
    /**
     * @api
     * @param ParameterReflection[]|null $callableParameters
     */
    public function enterArrowFunction(Expr\ArrowFunction $arrowFunction, ?array $callableParameters = null) : self
    {
        $anonymousFunctionReflection = $this->getType($arrowFunction);
        if (!$anonymousFunctionReflection instanceof ClosureType) {
            throw new ShouldNotHappenException();
        }
        $scope = $this->enterArrowFunctionWithoutReflection($arrowFunction, $callableParameters);
        return $this->scopeFactory->create($scope->context, $scope->isDeclareStrictTypes(), $scope->getFunction(), $scope->getNamespace(), $scope->expressionTypes, $scope->nativeExpressionTypes, $scope->conditionalExpressions, $scope->inClosureBindScopeClasses, $anonymousFunctionReflection, \true, [], [], [], $scope->afterExtractCall, $scope->parentScope, $this->nativeTypesPromoted);
    }
    /**
     * @param ParameterReflection[]|null $callableParameters
     */
    private function enterArrowFunctionWithoutReflection(Expr\ArrowFunction $arrowFunction, ?array $callableParameters) : self
    {
        $arrowFunctionScope = $this;
        foreach ($arrowFunction->params as $i => $parameter) {
            if ($parameter->type === null) {
                $parameterType = new MixedType();
            } else {
                $isNullable = $this->isParameterValueNullable($parameter);
                $parameterType = $this->getFunctionType($parameter->type, $isNullable, $parameter->variadic);
            }
            if ($callableParameters !== null) {
                if (isset($callableParameters[$i])) {
                    $parameterType = TypehintHelper::decideType($parameterType, $callableParameters[$i]->getType());
                } elseif (count($callableParameters) > 0) {
                    $lastParameter = $callableParameters[count($callableParameters) - 1];
                    if ($lastParameter->isVariadic()) {
                        $parameterType = TypehintHelper::decideType($parameterType, $lastParameter->getType());
                    } else {
                        $parameterType = TypehintHelper::decideType($parameterType, new MixedType());
                    }
                } else {
                    $parameterType = TypehintHelper::decideType($parameterType, new MixedType());
                }
            }
            if (!$parameter->var instanceof Variable || !is_string($parameter->var->name)) {
                throw new ShouldNotHappenException();
            }
            $arrowFunctionScope = $arrowFunctionScope->assignVariable($parameter->var->name, $parameterType, $parameterType);
        }
        if ($arrowFunction->static) {
            $arrowFunctionScope = $arrowFunctionScope->invalidateExpression(new Variable('this'));
        }
        return $this->scopeFactory->create($arrowFunctionScope->context, $this->isDeclareStrictTypes(), $arrowFunctionScope->getFunction(), $arrowFunctionScope->getNamespace(), $this->invalidateStaticExpressions($arrowFunctionScope->expressionTypes), $arrowFunctionScope->nativeExpressionTypes, $arrowFunctionScope->conditionalExpressions, $arrowFunctionScope->inClosureBindScopeClasses, null, \true, [], [], [], $arrowFunctionScope->afterExtractCall, $arrowFunctionScope->parentScope, $this->nativeTypesPromoted);
    }
    public function isParameterValueNullable(Node\Param $parameter) : bool
    {
        if ($parameter->default instanceof ConstFetch) {
            return strtolower((string) $parameter->default->name) === 'null';
        }
        return \false;
    }
    /**
     * @api
     * @param Node\Name|Node\Identifier|Node\ComplexType|null $type
     */
    public function getFunctionType($type, bool $isNullable, bool $isVariadic) : Type
    {
        if ($isNullable) {
            return TypeCombinator::addNull($this->getFunctionType($type, \false, $isVariadic));
        }
        if ($isVariadic) {
            if ($this->phpVersion->supportsNamedArguments()) {
                return new ArrayType(new UnionType([new IntegerType(), new StringType()]), $this->getFunctionType($type, \false, \false));
            }
            return AccessoryArrayListType::intersectWith(new ArrayType(new IntegerType(), $this->getFunctionType($type, \false, \false)));
        }
        if ($type instanceof Name) {
            $className = (string) $type;
            $lowercasedClassName = strtolower($className);
            if ($lowercasedClassName === 'parent') {
                if ($this->isInClass() && $this->getClassReflection()->getParentClass() !== null) {
                    return new ObjectType($this->getClassReflection()->getParentClass()->getName());
                }
                return new NonexistentParentClassType();
            }
        }
        return ParserNodeTypeToPHPStanType::resolve($type, $this->isInClass() ? $this->getClassReflection() : null);
    }
    public function enterForeach(Expr $iteratee, string $valueName, ?string $keyName) : self
    {
        $iterateeType = $this->getType($iteratee);
        $nativeIterateeType = $this->getNativeType($iteratee);
        $scope = $this->assignVariable($valueName, $iterateeType->getIterableValueType(), $nativeIterateeType->getIterableValueType());
        if ($keyName !== null) {
            $scope = $scope->enterForeachKey($iteratee, $keyName);
        }
        return $scope;
    }
    public function enterForeachKey(Expr $iteratee, string $keyName) : self
    {
        $iterateeType = $this->getType($iteratee);
        $nativeIterateeType = $this->getNativeType($iteratee);
        $scope = $this->assignVariable($keyName, $iterateeType->getIterableKeyType(), $nativeIterateeType->getIterableKeyType());
        if ($iterateeType->isArray()->yes()) {
            $scope = $scope->assignExpression(new Expr\ArrayDimFetch($iteratee, new Variable($keyName)), $iterateeType->getIterableValueType(), $nativeIterateeType->getIterableValueType());
        }
        return $scope;
    }
    /**
     * @deprecated Use enterCatchType
     * @param Node\Name[] $classes
     */
    public function enterCatch(array $classes, ?string $variableName) : self
    {
        $type = TypeCombinator::union(...array_map(static function (Node\Name $class) : ObjectType {
            return new ObjectType((string) $class);
        }, $classes));
        return $this->enterCatchType($type, $variableName);
    }
    public function enterCatchType(Type $catchType, ?string $variableName) : self
    {
        if ($variableName === null) {
            return $this;
        }
        return $this->assignVariable($variableName, TypeCombinator::intersect($catchType, new ObjectType(Throwable::class)), TypeCombinator::intersect($catchType, new ObjectType(Throwable::class)));
    }
    public function enterExpressionAssign(Expr $expr) : self
    {
        $exprString = $this->getNodeKey($expr);
        $currentlyAssignedExpressions = $this->currentlyAssignedExpressions;
        $currentlyAssignedExpressions[$exprString] = \true;
        $scope = $this->scopeFactory->create($this->context, $this->isDeclareStrictTypes(), $this->getFunction(), $this->getNamespace(), $this->expressionTypes, $this->nativeExpressionTypes, $this->conditionalExpressions, $this->inClosureBindScopeClasses, $this->anonymousFunctionReflection, $this->isInFirstLevelStatement(), $currentlyAssignedExpressions, $this->currentlyAllowedUndefinedExpressions, [], $this->afterExtractCall, $this->parentScope, $this->nativeTypesPromoted);
        $scope->resolvedTypes = $this->resolvedTypes;
        $scope->truthyScopes = $this->truthyScopes;
        $scope->falseyScopes = $this->falseyScopes;
        return $scope;
    }
    public function exitExpressionAssign(Expr $expr) : self
    {
        $exprString = $this->getNodeKey($expr);
        $currentlyAssignedExpressions = $this->currentlyAssignedExpressions;
        unset($currentlyAssignedExpressions[$exprString]);
        $scope = $this->scopeFactory->create($this->context, $this->isDeclareStrictTypes(), $this->getFunction(), $this->getNamespace(), $this->expressionTypes, $this->nativeExpressionTypes, $this->conditionalExpressions, $this->inClosureBindScopeClasses, $this->anonymousFunctionReflection, $this->isInFirstLevelStatement(), $currentlyAssignedExpressions, $this->currentlyAllowedUndefinedExpressions, [], $this->afterExtractCall, $this->parentScope, $this->nativeTypesPromoted);
        $scope->resolvedTypes = $this->resolvedTypes;
        $scope->truthyScopes = $this->truthyScopes;
        $scope->falseyScopes = $this->falseyScopes;
        return $scope;
    }
    /** @api */
    public function isInExpressionAssign(Expr $expr) : bool
    {
        $exprString = $this->getNodeKey($expr);
        return array_key_exists($exprString, $this->currentlyAssignedExpressions);
    }
    public function setAllowedUndefinedExpression(Expr $expr) : self
    {
        if ($this->phpVersion->deprecatesDynamicProperties() && $expr instanceof Expr\StaticPropertyFetch) {
            return $this;
        }
        $exprString = $this->getNodeKey($expr);
        $currentlyAllowedUndefinedExpressions = $this->currentlyAllowedUndefinedExpressions;
        $currentlyAllowedUndefinedExpressions[$exprString] = \true;
        $scope = $this->scopeFactory->create($this->context, $this->isDeclareStrictTypes(), $this->getFunction(), $this->getNamespace(), $this->expressionTypes, $this->nativeExpressionTypes, $this->conditionalExpressions, $this->inClosureBindScopeClasses, $this->anonymousFunctionReflection, $this->isInFirstLevelStatement(), $this->currentlyAssignedExpressions, $currentlyAllowedUndefinedExpressions, [], $this->afterExtractCall, $this->parentScope, $this->nativeTypesPromoted);
        $scope->resolvedTypes = $this->resolvedTypes;
        $scope->truthyScopes = $this->truthyScopes;
        $scope->falseyScopes = $this->falseyScopes;
        return $scope;
    }
    public function unsetAllowedUndefinedExpression(Expr $expr) : self
    {
        $exprString = $this->getNodeKey($expr);
        $currentlyAllowedUndefinedExpressions = $this->currentlyAllowedUndefinedExpressions;
        unset($currentlyAllowedUndefinedExpressions[$exprString]);
        $scope = $this->scopeFactory->create($this->context, $this->isDeclareStrictTypes(), $this->getFunction(), $this->getNamespace(), $this->expressionTypes, $this->nativeExpressionTypes, $this->conditionalExpressions, $this->inClosureBindScopeClasses, $this->anonymousFunctionReflection, $this->isInFirstLevelStatement(), $this->currentlyAssignedExpressions, $currentlyAllowedUndefinedExpressions, [], $this->afterExtractCall, $this->parentScope, $this->nativeTypesPromoted);
        $scope->resolvedTypes = $this->resolvedTypes;
        $scope->truthyScopes = $this->truthyScopes;
        $scope->falseyScopes = $this->falseyScopes;
        return $scope;
    }
    /** @api */
    public function isUndefinedExpressionAllowed(Expr $expr) : bool
    {
        $exprString = $this->getNodeKey($expr);
        return array_key_exists($exprString, $this->currentlyAllowedUndefinedExpressions);
    }
    public function assignVariable(string $variableName, Type $type, Type $nativeType, ?TrinaryLogic $certainty = null) : self
    {
        $node = new Variable($variableName);
        $scope = $this->assignExpression($node, $type, $nativeType);
        if ($certainty !== null) {
            if ($certainty->no()) {
                throw new ShouldNotHappenException();
            } elseif (!$certainty->yes()) {
                $exprString = '$' . $variableName;
                $scope->expressionTypes[$exprString] = new \PHPStan\Analyser\ExpressionTypeHolder($node, $type, $certainty);
                $scope->nativeExpressionTypes[$exprString] = new \PHPStan\Analyser\ExpressionTypeHolder($node, $nativeType, $certainty);
            }
        }
        return $scope;
    }
    public function unsetExpression(Expr $expr) : self
    {
        $scope = $this;
        if ($expr instanceof Expr\ArrayDimFetch && $expr->dim !== null) {
            $exprVarType = $scope->getType($expr->var);
            $dimType = $scope->getType($expr->dim);
            $unsetType = $exprVarType->unsetOffset($dimType);
            $exprVarNativeType = $scope->getNativeType($expr->var);
            $dimNativeType = $scope->getNativeType($expr->dim);
            $unsetNativeType = $exprVarNativeType->unsetOffset($dimNativeType);
            $scope = $scope->assignExpression($expr->var, $unsetType, $unsetNativeType)->invalidateExpression(new FuncCall(new FullyQualified('count'), [new Arg($expr->var)]))->invalidateExpression(new FuncCall(new FullyQualified('sizeof'), [new Arg($expr->var)]))->invalidateExpression(new FuncCall(new Name('count'), [new Arg($expr->var)]))->invalidateExpression(new FuncCall(new Name('sizeof'), [new Arg($expr->var)]));
            if ($expr->var instanceof Expr\ArrayDimFetch && $expr->var->dim !== null) {
                $scope = $scope->assignExpression($expr->var->var, $this->getType($expr->var->var)->setOffsetValueType($scope->getType($expr->var->dim), $scope->getType($expr->var)), $this->getNativeType($expr->var->var)->setOffsetValueType($scope->getNativeType($expr->var->dim), $scope->getNativeType($expr->var)));
            }
        }
        return $scope->invalidateExpression($expr);
    }
    public function specifyExpressionType(Expr $expr, Type $type, Type $nativeType) : self
    {
        if ($expr instanceof ConstFetch) {
            $loweredConstName = strtolower($expr->name->toString());
            if (in_array($loweredConstName, ['true', 'false', 'null'], \true)) {
                return $this;
            }
        }
        if ($expr instanceof FuncCall && $expr->name instanceof Name && $type->isFalse()->yes()) {
            $functionName = $this->reflectionProvider->resolveFunctionName($expr->name, $this);
            if ($functionName !== null && in_array(strtolower($functionName), ['is_dir', 'is_file', 'file_exists'], \true)) {
                return $this;
            }
        }
        $scope = $this;
        if ($expr instanceof Expr\ArrayDimFetch && $expr->dim !== null) {
            $dimType = $scope->getType($expr->dim)->toArrayKey();
            if ($dimType instanceof ConstantIntegerType || $dimType instanceof ConstantStringType) {
                $exprVarType = $scope->getType($expr->var);
                if (!$exprVarType instanceof MixedType && !$exprVarType->isArray()->no()) {
                    $types = [new ArrayType(new MixedType(), new MixedType()), new ObjectType(ArrayAccess::class), new NullType()];
                    if ($dimType instanceof ConstantIntegerType) {
                        $types[] = new StringType();
                    }
                    $scope = $scope->specifyExpressionType($expr->var, TypeCombinator::intersect(TypeCombinator::intersect($exprVarType, TypeCombinator::union(...$types)), new HasOffsetValueType($dimType, $type)), $scope->getNativeType($expr->var));
                }
            }
        }
        $exprString = $this->getNodeKey($expr);
        $expressionTypes = $scope->expressionTypes;
        $expressionTypes[$exprString] = \PHPStan\Analyser\ExpressionTypeHolder::createYes($expr, $type);
        $nativeTypes = $scope->nativeExpressionTypes;
        $nativeTypes[$exprString] = \PHPStan\Analyser\ExpressionTypeHolder::createYes($expr, $nativeType);
        return $this->scopeFactory->create($this->context, $this->isDeclareStrictTypes(), $this->getFunction(), $this->getNamespace(), $expressionTypes, $nativeTypes, $this->conditionalExpressions, $this->inClosureBindScopeClasses, $this->anonymousFunctionReflection, $this->inFirstLevelStatement, $this->currentlyAssignedExpressions, $this->currentlyAllowedUndefinedExpressions, $this->inFunctionCallsStack, $this->afterExtractCall, $this->parentScope, $this->nativeTypesPromoted);
    }
    public function assignExpression(Expr $expr, Type $type, ?Type $nativeType = null) : self
    {
        if ($nativeType === null) {
            $nativeType = new MixedType();
        }
        $scope = $this;
        if ($expr instanceof PropertyFetch) {
            $scope = $this->invalidateExpression($expr)->invalidateMethodsOnExpression($expr->var);
        } elseif ($expr instanceof Expr\StaticPropertyFetch) {
            $scope = $this->invalidateExpression($expr);
        } elseif ($expr instanceof Variable) {
            $scope = $this->invalidateExpression($expr);
        }
        return $scope->specifyExpressionType($expr, $type, $nativeType);
    }
    public function invalidateExpression(Expr $expressionToInvalidate, bool $requireMoreCharacters = \false) : self
    {
        $expressionTypes = $this->expressionTypes;
        $nativeExpressionTypes = $this->nativeExpressionTypes;
        $invalidated = \false;
        $exprStringToInvalidate = $this->getNodeKey($expressionToInvalidate);
        foreach ($expressionTypes as $exprString => $exprTypeHolder) {
            $exprExpr = $exprTypeHolder->getExpr();
            if (!$this->shouldInvalidateExpression($exprStringToInvalidate, $expressionToInvalidate, $exprExpr, $requireMoreCharacters)) {
                continue;
            }
            unset($expressionTypes[$exprString]);
            unset($nativeExpressionTypes[$exprString]);
            $invalidated = \true;
        }
        $newConditionalExpressions = [];
        foreach ($this->conditionalExpressions as $conditionalExprString => $holders) {
            if (count($holders) === 0) {
                continue;
            }
            if ($this->shouldInvalidateExpression($exprStringToInvalidate, $expressionToInvalidate, $holders[array_key_first($holders)]->getTypeHolder()->getExpr())) {
                $invalidated = \true;
                continue;
            }
            foreach ($holders as $holder) {
                $conditionalTypeHolders = $holder->getConditionExpressionTypeHolders();
                foreach ($conditionalTypeHolders as $conditionalTypeHolder) {
                    if ($this->shouldInvalidateExpression($exprStringToInvalidate, $expressionToInvalidate, $conditionalTypeHolder->getExpr())) {
                        $invalidated = \true;
                        continue 3;
                    }
                }
            }
            $newConditionalExpressions[$conditionalExprString] = $holders;
        }
        if (!$invalidated) {
            return $this;
        }
        return $this->scopeFactory->create($this->context, $this->isDeclareStrictTypes(), $this->getFunction(), $this->getNamespace(), $expressionTypes, $nativeExpressionTypes, $newConditionalExpressions, $this->inClosureBindScopeClasses, $this->anonymousFunctionReflection, $this->inFirstLevelStatement, $this->currentlyAssignedExpressions, $this->currentlyAllowedUndefinedExpressions, [], $this->afterExtractCall, $this->parentScope, $this->nativeTypesPromoted);
    }
    private function shouldInvalidateExpression(string $exprStringToInvalidate, Expr $exprToInvalidate, Expr $expr, bool $requireMoreCharacters = \false) : bool
    {
        if ($requireMoreCharacters && $exprStringToInvalidate === $this->getNodeKey($expr)) {
            return \false;
        }
        // Variables will not contain traversable expressions. skip the NodeFinder overhead
        if ($expr instanceof Variable && is_string($expr->name)) {
            return $exprStringToInvalidate === $this->getNodeKey($expr);
        }
        $nodeFinder = new NodeFinder();
        $expressionToInvalidateClass = get_class($exprToInvalidate);
        $found = $nodeFinder->findFirst([$expr], function (Node $node) use($expressionToInvalidateClass, $exprStringToInvalidate) : bool {
            if (!$node instanceof $expressionToInvalidateClass) {
                return \false;
            }
            $nodeString = $this->getNodeKey($node);
            return $nodeString === $exprStringToInvalidate;
        });
        if ($found === null) {
            return \false;
        }
        if ($this->phpVersion->supportsReadOnlyProperties() && $expr instanceof PropertyFetch && $expr->name instanceof Node\Identifier && $requireMoreCharacters) {
            $propertyReflection = $this->propertyReflectionFinder->findPropertyReflectionFromNode($expr, $this);
            if ($propertyReflection !== null) {
                $nativePropertyReflection = $propertyReflection->getNativeReflection();
                if ($nativePropertyReflection !== null && $nativePropertyReflection->isReadOnly()) {
                    return \false;
                }
            }
        }
        return \true;
    }
    private function invalidateMethodsOnExpression(Expr $expressionToInvalidate) : self
    {
        $exprStringToInvalidate = $this->getNodeKey($expressionToInvalidate);
        $expressionTypes = $this->expressionTypes;
        $nativeExpressionTypes = $this->nativeExpressionTypes;
        $invalidated = \false;
        $nodeFinder = new NodeFinder();
        foreach ($expressionTypes as $exprString => $exprTypeHolder) {
            $expr = $exprTypeHolder->getExpr();
            $found = $nodeFinder->findFirst([$expr], function (Node $node) use($exprStringToInvalidate) : bool {
                if (!$node instanceof MethodCall) {
                    return \false;
                }
                return $this->getNodeKey($node->var) === $exprStringToInvalidate;
            });
            if ($found === null) {
                continue;
            }
            unset($expressionTypes[$exprString]);
            unset($nativeExpressionTypes[$exprString]);
            $invalidated = \true;
        }
        if (!$invalidated) {
            return $this;
        }
        return $this->scopeFactory->create($this->context, $this->isDeclareStrictTypes(), $this->getFunction(), $this->getNamespace(), $expressionTypes, $nativeExpressionTypes, $this->conditionalExpressions, $this->inClosureBindScopeClasses, $this->anonymousFunctionReflection, $this->inFirstLevelStatement, $this->currentlyAssignedExpressions, $this->currentlyAllowedUndefinedExpressions, [], $this->afterExtractCall, $this->parentScope, $this->nativeTypesPromoted);
    }
    private function addTypeToExpression(Expr $expr, Type $type) : self
    {
        $originalExprType = $this->getType($expr);
        $nativeType = $this->getNativeType($expr);
        if ($originalExprType->equals($nativeType)) {
            $newType = TypeCombinator::intersect($type, $originalExprType);
            return $this->specifyExpressionType($expr, $newType, $newType);
        }
        return $this->specifyExpressionType($expr, TypeCombinator::intersect($type, $originalExprType), TypeCombinator::intersect($type, $nativeType));
    }
    public function removeTypeFromExpression(Expr $expr, Type $typeToRemove) : self
    {
        $exprType = $this->getType($expr);
        if ($exprType instanceof NeverType || $typeToRemove instanceof NeverType) {
            return $this;
        }
        return $this->specifyExpressionType($expr, TypeCombinator::remove($exprType, $typeToRemove), TypeCombinator::remove($this->getNativeType($expr), $typeToRemove));
    }
    /**
     * @api
     * @return MutatingScope
     */
    public function filterByTruthyValue(Expr $expr) : \PHPStan\Analyser\Scope
    {
        $exprString = $this->getNodeKey($expr);
        if (array_key_exists($exprString, $this->truthyScopes)) {
            return $this->truthyScopes[$exprString];
        }
        $specifiedTypes = $this->typeSpecifier->specifyTypesInCondition($this, $expr, \PHPStan\Analyser\TypeSpecifierContext::createTruthy());
        $scope = $this->filterBySpecifiedTypes($specifiedTypes);
        $this->truthyScopes[$exprString] = $scope;
        return $scope;
    }
    /**
     * @api
     * @return MutatingScope
     */
    public function filterByFalseyValue(Expr $expr) : \PHPStan\Analyser\Scope
    {
        $exprString = $this->getNodeKey($expr);
        if (array_key_exists($exprString, $this->falseyScopes)) {
            return $this->falseyScopes[$exprString];
        }
        $specifiedTypes = $this->typeSpecifier->specifyTypesInCondition($this, $expr, \PHPStan\Analyser\TypeSpecifierContext::createFalsey());
        $scope = $this->filterBySpecifiedTypes($specifiedTypes);
        $this->falseyScopes[$exprString] = $scope;
        return $scope;
    }
    public function filterBySpecifiedTypes(\PHPStan\Analyser\SpecifiedTypes $specifiedTypes) : self
    {
        $typeSpecifications = [];
        foreach ($specifiedTypes->getSureTypes() as $exprString => [$expr, $type]) {
            if ($expr instanceof Node\Scalar || $expr instanceof Array_ || $expr instanceof Expr\UnaryMinus && $expr->expr instanceof Node\Scalar) {
                continue;
            }
            $typeSpecifications[] = ['sure' => \true, 'exprString' => $exprString, 'expr' => $expr, 'type' => $type];
        }
        foreach ($specifiedTypes->getSureNotTypes() as $exprString => [$expr, $type]) {
            if ($expr instanceof Node\Scalar || $expr instanceof Array_ || $expr instanceof Expr\UnaryMinus && $expr->expr instanceof Node\Scalar) {
                continue;
            }
            $typeSpecifications[] = ['sure' => \false, 'exprString' => $exprString, 'expr' => $expr, 'type' => $type];
        }
        usort($typeSpecifications, static function (array $a, array $b) : int {
            $length = strlen($a['exprString']) - strlen($b['exprString']);
            if ($length !== 0) {
                return $length;
            }
            return $b['sure'] - $a['sure'];
            // @phpstan-ignore-line
        });
        $scope = $this;
        $specifiedExpressions = [];
        foreach ($typeSpecifications as $typeSpecification) {
            $expr = $typeSpecification['expr'];
            $type = $typeSpecification['type'];
            if ($typeSpecification['sure']) {
                if ($specifiedTypes->shouldOverwrite()) {
                    $scope = $scope->assignExpression($expr, $type, $type);
                } else {
                    $scope = $scope->addTypeToExpression($expr, $type);
                }
            } else {
                $scope = $scope->removeTypeFromExpression($expr, $type);
            }
            $specifiedExpressions[$this->getNodeKey($expr)] = \PHPStan\Analyser\ExpressionTypeHolder::createYes($expr, $scope->getType($expr));
        }
        foreach ($scope->conditionalExpressions as $conditionalExprString => $conditionalExpressions) {
            foreach ($conditionalExpressions as $conditionalExpression) {
                foreach ($conditionalExpression->getConditionExpressionTypeHolders() as $holderExprString => $conditionalTypeHolder) {
                    if (!array_key_exists($holderExprString, $specifiedExpressions) || !$specifiedExpressions[$holderExprString]->equals($conditionalTypeHolder)) {
                        continue 2;
                    }
                }
                if ($conditionalExpression->getTypeHolder()->getCertainty()->no()) {
                    unset($scope->expressionTypes[$conditionalExprString]);
                } else {
                    $scope->expressionTypes[$conditionalExprString] = array_key_exists($conditionalExprString, $scope->expressionTypes) ? new \PHPStan\Analyser\ExpressionTypeHolder($scope->expressionTypes[$conditionalExprString]->getExpr(), TypeCombinator::intersect($scope->expressionTypes[$conditionalExprString]->getType(), $conditionalExpression->getTypeHolder()->getType()), TrinaryLogic::maxMin($scope->expressionTypes[$conditionalExprString]->getCertainty(), $conditionalExpression->getTypeHolder()->getCertainty())) : $conditionalExpression->getTypeHolder();
                    $specifiedExpressions[$conditionalExprString] = $conditionalExpression->getTypeHolder();
                }
            }
        }
        return $scope->scopeFactory->create($scope->context, $scope->isDeclareStrictTypes(), $scope->getFunction(), $scope->getNamespace(), $scope->expressionTypes, $scope->nativeExpressionTypes, array_merge($specifiedTypes->getNewConditionalExpressionHolders(), $scope->conditionalExpressions), $scope->inClosureBindScopeClasses, $scope->anonymousFunctionReflection, $scope->inFirstLevelStatement, $scope->currentlyAssignedExpressions, $scope->currentlyAllowedUndefinedExpressions, $scope->inFunctionCallsStack, $scope->afterExtractCall, $scope->parentScope, $scope->nativeTypesPromoted);
    }
    /**
     * @param ConditionalExpressionHolder[] $conditionalExpressionHolders
     */
    public function addConditionalExpressions(string $exprString, array $conditionalExpressionHolders) : self
    {
        $conditionalExpressions = $this->conditionalExpressions;
        $conditionalExpressions[$exprString] = $conditionalExpressionHolders;
        return $this->scopeFactory->create($this->context, $this->isDeclareStrictTypes(), $this->getFunction(), $this->getNamespace(), $this->expressionTypes, $this->nativeExpressionTypes, $conditionalExpressions, $this->inClosureBindScopeClasses, $this->anonymousFunctionReflection, $this->inFirstLevelStatement, $this->currentlyAssignedExpressions, $this->currentlyAllowedUndefinedExpressions, $this->inFunctionCallsStack, $this->afterExtractCall, $this->parentScope, $this->nativeTypesPromoted);
    }
    public function exitFirstLevelStatements() : self
    {
        if (!$this->inFirstLevelStatement) {
            return $this;
        }
        if ($this->scopeOutOfFirstLevelStatement !== null) {
            return $this->scopeOutOfFirstLevelStatement;
        }
        $scope = $this->scopeFactory->create($this->context, $this->isDeclareStrictTypes(), $this->getFunction(), $this->getNamespace(), $this->expressionTypes, $this->nativeExpressionTypes, $this->conditionalExpressions, $this->inClosureBindScopeClasses, $this->anonymousFunctionReflection, \false, $this->currentlyAssignedExpressions, $this->currentlyAllowedUndefinedExpressions, $this->inFunctionCallsStack, $this->afterExtractCall, $this->parentScope, $this->nativeTypesPromoted);
        $scope->resolvedTypes = $this->resolvedTypes;
        $scope->truthyScopes = $this->truthyScopes;
        $scope->falseyScopes = $this->falseyScopes;
        $this->scopeOutOfFirstLevelStatement = $scope;
        return $scope;
    }
    /** @api */
    public function isInFirstLevelStatement() : bool
    {
        return $this->inFirstLevelStatement;
    }
    public function mergeWith(?self $otherScope) : self
    {
        if ($otherScope === null) {
            return $this;
        }
        $ourExpressionTypes = $this->expressionTypes;
        $theirExpressionTypes = $otherScope->expressionTypes;
        $mergedExpressionTypes = $this->mergeVariableHolders($ourExpressionTypes, $theirExpressionTypes);
        $conditionalExpressions = $this->intersectConditionalExpressions($otherScope->conditionalExpressions);
        $conditionalExpressions = $this->createConditionalExpressions($conditionalExpressions, $ourExpressionTypes, $theirExpressionTypes, $mergedExpressionTypes);
        $conditionalExpressions = $this->createConditionalExpressions($conditionalExpressions, $theirExpressionTypes, $ourExpressionTypes, $mergedExpressionTypes);
        return $this->scopeFactory->create($this->context, $this->isDeclareStrictTypes(), $this->getFunction(), $this->getNamespace(), $mergedExpressionTypes, $this->mergeVariableHolders($this->nativeExpressionTypes, $otherScope->nativeExpressionTypes), $conditionalExpressions, $this->inClosureBindScopeClasses, $this->anonymousFunctionReflection, $this->inFirstLevelStatement, [], [], [], $this->afterExtractCall && $otherScope->afterExtractCall, $this->parentScope, $this->nativeTypesPromoted);
    }
    /**
     * @param array<string, ConditionalExpressionHolder[]> $otherConditionalExpressions
     * @return array<string, ConditionalExpressionHolder[]>
     */
    private function intersectConditionalExpressions(array $otherConditionalExpressions) : array
    {
        $newConditionalExpressions = [];
        foreach ($this->conditionalExpressions as $exprString => $holders) {
            if (!array_key_exists($exprString, $otherConditionalExpressions)) {
                continue;
            }
            $otherHolders = $otherConditionalExpressions[$exprString];
            foreach (array_keys($holders) as $key) {
                if (!array_key_exists($key, $otherHolders)) {
                    continue 2;
                }
            }
            $newConditionalExpressions[$exprString] = $holders;
        }
        return $newConditionalExpressions;
    }
    /**
     * @param array<string, ConditionalExpressionHolder[]> $conditionalExpressions
     * @param array<string, ExpressionTypeHolder> $ourExpressionTypes
     * @param array<string, ExpressionTypeHolder> $theirExpressionTypes
     * @param array<string, ExpressionTypeHolder> $mergedExpressionTypes
     * @return array<string, ConditionalExpressionHolder[]>
     */
    private function createConditionalExpressions(array $conditionalExpressions, array $ourExpressionTypes, array $theirExpressionTypes, array $mergedExpressionTypes) : array
    {
        $newVariableTypes = $ourExpressionTypes;
        foreach ($theirExpressionTypes as $exprString => $holder) {
            if (!array_key_exists($exprString, $mergedExpressionTypes)) {
                continue;
            }
            if (!$mergedExpressionTypes[$exprString]->getType()->equals($holder->getType())) {
                continue;
            }
            unset($newVariableTypes[$exprString]);
        }
        $typeGuards = [];
        foreach ($newVariableTypes as $exprString => $holder) {
            if (!$holder->getCertainty()->yes()) {
                continue;
            }
            if (!array_key_exists($exprString, $mergedExpressionTypes)) {
                continue;
            }
            if ($mergedExpressionTypes[$exprString]->getType()->equals($holder->getType())) {
                continue;
            }
            $typeGuards[$exprString] = $holder;
        }
        if (count($typeGuards) === 0) {
            return $conditionalExpressions;
        }
        foreach ($newVariableTypes as $exprString => $holder) {
            if (array_key_exists($exprString, $mergedExpressionTypes) && $mergedExpressionTypes[$exprString]->equals($holder)) {
                continue;
            }
            $variableTypeGuards = $typeGuards;
            unset($variableTypeGuards[$exprString]);
            if (count($variableTypeGuards) === 0) {
                continue;
            }
            $conditionalExpression = new \PHPStan\Analyser\ConditionalExpressionHolder($variableTypeGuards, $holder);
            $conditionalExpressions[$exprString][$conditionalExpression->getKey()] = $conditionalExpression;
        }
        foreach ($mergedExpressionTypes as $exprString => $mergedExprTypeHolder) {
            if (array_key_exists($exprString, $ourExpressionTypes)) {
                continue;
            }
            $conditionalExpression = new \PHPStan\Analyser\ConditionalExpressionHolder($typeGuards, new \PHPStan\Analyser\ExpressionTypeHolder($mergedExprTypeHolder->getExpr(), new ErrorType(), TrinaryLogic::createNo()));
            $conditionalExpressions[$exprString][$conditionalExpression->getKey()] = $conditionalExpression;
        }
        return $conditionalExpressions;
    }
    /**
     * @param array<string, ExpressionTypeHolder> $ourVariableTypeHolders
     * @param array<string, ExpressionTypeHolder> $theirVariableTypeHolders
     * @return array<string, ExpressionTypeHolder>
     */
    private function mergeVariableHolders(array $ourVariableTypeHolders, array $theirVariableTypeHolders) : array
    {
        $intersectedVariableTypeHolders = [];
        foreach ($ourVariableTypeHolders as $exprString => $variableTypeHolder) {
            if (isset($theirVariableTypeHolders[$exprString])) {
                $intersectedVariableTypeHolders[$exprString] = $variableTypeHolder->and($theirVariableTypeHolders[$exprString]);
            } else {
                $intersectedVariableTypeHolders[$exprString] = \PHPStan\Analyser\ExpressionTypeHolder::createMaybe($variableTypeHolder->getExpr(), $variableTypeHolder->getType());
            }
        }
        foreach ($theirVariableTypeHolders as $exprString => $variableTypeHolder) {
            if (isset($intersectedVariableTypeHolders[$exprString])) {
                continue;
            }
            $intersectedVariableTypeHolders[$exprString] = \PHPStan\Analyser\ExpressionTypeHolder::createMaybe($variableTypeHolder->getExpr(), $variableTypeHolder->getType());
        }
        return $intersectedVariableTypeHolders;
    }
    public function processFinallyScope(self $finallyScope, self $originalFinallyScope) : self
    {
        return $this->scopeFactory->create($this->context, $this->isDeclareStrictTypes(), $this->getFunction(), $this->getNamespace(), $this->processFinallyScopeVariableTypeHolders($this->expressionTypes, $finallyScope->expressionTypes, $originalFinallyScope->expressionTypes), $this->processFinallyScopeVariableTypeHolders($this->nativeExpressionTypes, $finallyScope->nativeExpressionTypes, $originalFinallyScope->nativeExpressionTypes), $this->conditionalExpressions, $this->inClosureBindScopeClasses, $this->anonymousFunctionReflection, $this->inFirstLevelStatement, [], [], [], $this->afterExtractCall, $this->parentScope, $this->nativeTypesPromoted);
    }
    /**
     * @param array<string, ExpressionTypeHolder> $ourVariableTypeHolders
     * @param array<string, ExpressionTypeHolder> $finallyVariableTypeHolders
     * @param array<string, ExpressionTypeHolder> $originalVariableTypeHolders
     * @return array<string, ExpressionTypeHolder>
     */
    private function processFinallyScopeVariableTypeHolders(array $ourVariableTypeHolders, array $finallyVariableTypeHolders, array $originalVariableTypeHolders) : array
    {
        foreach ($finallyVariableTypeHolders as $exprString => $variableTypeHolder) {
            if (isset($originalVariableTypeHolders[$exprString]) && !$originalVariableTypeHolders[$exprString]->getType()->equals($variableTypeHolder->getType())) {
                $ourVariableTypeHolders[$exprString] = $variableTypeHolder;
                continue;
            }
            if (isset($originalVariableTypeHolders[$exprString])) {
                continue;
            }
            $ourVariableTypeHolders[$exprString] = $variableTypeHolder;
        }
        return $ourVariableTypeHolders;
    }
    /**
     * @param Expr\ClosureUse[] $byRefUses
     */
    public function processClosureScope(self $closureScope, ?self $prevScope, array $byRefUses) : self
    {
        $nativeExpressionTypes = $this->nativeExpressionTypes;
        $expressionTypes = $this->expressionTypes;
        if (count($byRefUses) === 0) {
            return $this;
        }
        foreach ($byRefUses as $use) {
            if (!is_string($use->var->name)) {
                throw new ShouldNotHappenException();
            }
            $variableName = $use->var->name;
            $variableExprString = '$' . $variableName;
            if (!$closureScope->hasVariableType($variableName)->yes()) {
                $holder = \PHPStan\Analyser\ExpressionTypeHolder::createYes($use->var, new NullType());
                $expressionTypes[$variableExprString] = $holder;
                $nativeExpressionTypes[$variableExprString] = $holder;
                continue;
            }
            $variableType = $closureScope->getVariableType($variableName);
            if ($prevScope !== null) {
                $prevVariableType = $prevScope->getVariableType($variableName);
                if (!$variableType->equals($prevVariableType)) {
                    $variableType = TypeCombinator::union($variableType, $prevVariableType);
                    $variableType = self::generalizeType($variableType, $prevVariableType, 0);
                }
            }
            $expressionTypes[$variableExprString] = \PHPStan\Analyser\ExpressionTypeHolder::createYes($use->var, $variableType);
            $nativeExpressionTypes[$variableExprString] = \PHPStan\Analyser\ExpressionTypeHolder::createYes($use->var, $variableType);
        }
        return $this->scopeFactory->create($this->context, $this->isDeclareStrictTypes(), $this->getFunction(), $this->getNamespace(), $expressionTypes, $nativeExpressionTypes, $this->conditionalExpressions, $this->inClosureBindScopeClasses, $this->anonymousFunctionReflection, $this->inFirstLevelStatement, [], [], $this->inFunctionCallsStack, $this->afterExtractCall, $this->parentScope, $this->nativeTypesPromoted);
    }
    public function processAlwaysIterableForeachScopeWithoutPollute(self $finalScope) : self
    {
        $expressionTypes = $this->expressionTypes;
        foreach ($finalScope->expressionTypes as $variableExprString => $variableTypeHolder) {
            if (!isset($expressionTypes[$variableExprString])) {
                $expressionTypes[$variableExprString] = \PHPStan\Analyser\ExpressionTypeHolder::createMaybe($variableTypeHolder->getExpr(), $variableTypeHolder->getType());
                continue;
            }
            $expressionTypes[$variableExprString] = new \PHPStan\Analyser\ExpressionTypeHolder($variableTypeHolder->getExpr(), $variableTypeHolder->getType(), $variableTypeHolder->getCertainty()->and($expressionTypes[$variableExprString]->getCertainty()));
        }
        $nativeTypes = $this->nativeExpressionTypes;
        foreach ($finalScope->nativeExpressionTypes as $variableExprString => $variableTypeHolder) {
            if (!isset($nativeTypes[$variableExprString])) {
                $nativeTypes[$variableExprString] = \PHPStan\Analyser\ExpressionTypeHolder::createMaybe($variableTypeHolder->getExpr(), $variableTypeHolder->getType());
                continue;
            }
            $nativeTypes[$variableExprString] = new \PHPStan\Analyser\ExpressionTypeHolder($variableTypeHolder->getExpr(), $variableTypeHolder->getType(), $variableTypeHolder->getCertainty()->and($nativeTypes[$variableExprString]->getCertainty()));
        }
        return $this->scopeFactory->create($this->context, $this->isDeclareStrictTypes(), $this->getFunction(), $this->getNamespace(), $expressionTypes, $nativeTypes, $this->conditionalExpressions, $this->inClosureBindScopeClasses, $this->anonymousFunctionReflection, $this->inFirstLevelStatement, [], [], [], $this->afterExtractCall, $this->parentScope, $this->nativeTypesPromoted);
    }
    public function generalizeWith(self $otherScope) : self
    {
        $variableTypeHolders = $this->generalizeVariableTypeHolders($this->expressionTypes, $otherScope->expressionTypes);
        $nativeTypes = $this->generalizeVariableTypeHolders($this->nativeExpressionTypes, $otherScope->nativeExpressionTypes);
        return $this->scopeFactory->create($this->context, $this->isDeclareStrictTypes(), $this->getFunction(), $this->getNamespace(), $variableTypeHolders, $nativeTypes, $this->conditionalExpressions, $this->inClosureBindScopeClasses, $this->anonymousFunctionReflection, $this->inFirstLevelStatement, [], [], [], $this->afterExtractCall, $this->parentScope, $this->nativeTypesPromoted);
    }
    /**
     * @param array<string, ExpressionTypeHolder> $variableTypeHolders
     * @param array<string, ExpressionTypeHolder> $otherVariableTypeHolders
     * @return array<string, ExpressionTypeHolder>
     */
    private function generalizeVariableTypeHolders(array $variableTypeHolders, array $otherVariableTypeHolders) : array
    {
        foreach ($variableTypeHolders as $variableExprString => $variableTypeHolder) {
            if (!isset($otherVariableTypeHolders[$variableExprString])) {
                continue;
            }
            $variableTypeHolders[$variableExprString] = new \PHPStan\Analyser\ExpressionTypeHolder($variableTypeHolder->getExpr(), self::generalizeType($variableTypeHolder->getType(), $otherVariableTypeHolders[$variableExprString]->getType(), 0), $variableTypeHolder->getCertainty());
        }
        return $variableTypeHolders;
    }
    private static function generalizeType(Type $a, Type $b, int $depth) : Type
    {
        if ($a->equals($b)) {
            return $a;
        }
        $constantIntegers = ['a' => [], 'b' => []];
        $constantFloats = ['a' => [], 'b' => []];
        $constantBooleans = ['a' => [], 'b' => []];
        $constantStrings = ['a' => [], 'b' => []];
        $constantArrays = ['a' => [], 'b' => []];
        $generalArrays = ['a' => [], 'b' => []];
        $integerRanges = ['a' => [], 'b' => []];
        $otherTypes = [];
        foreach (['a' => TypeUtils::flattenTypes($a), 'b' => TypeUtils::flattenTypes($b)] as $key => $types) {
            foreach ($types as $type) {
                if ($type instanceof ConstantIntegerType) {
                    $constantIntegers[$key][] = $type;
                    continue;
                }
                if ($type instanceof ConstantFloatType) {
                    $constantFloats[$key][] = $type;
                    continue;
                }
                if ($type instanceof ConstantBooleanType) {
                    $constantBooleans[$key][] = $type;
                    continue;
                }
                if ($type instanceof ConstantStringType) {
                    $constantStrings[$key][] = $type;
                    continue;
                }
                if ($type->isConstantArray()->yes()) {
                    $constantArrays[$key][] = $type;
                    continue;
                }
                if ($type->isArray()->yes()) {
                    $generalArrays[$key][] = $type;
                    continue;
                }
                if ($type instanceof IntegerRangeType) {
                    $integerRanges[$key][] = $type;
                    continue;
                }
                $otherTypes[] = $type;
            }
        }
        $resultTypes = [];
        foreach ([$constantFloats, $constantBooleans, $constantStrings] as $constantTypes) {
            if (count($constantTypes['a']) === 0) {
                if (count($constantTypes['b']) > 0) {
                    $resultTypes[] = TypeCombinator::union(...$constantTypes['b']);
                }
                continue;
            } elseif (count($constantTypes['b']) === 0) {
                $resultTypes[] = TypeCombinator::union(...$constantTypes['a']);
                continue;
            }
            $aTypes = TypeCombinator::union(...$constantTypes['a']);
            $bTypes = TypeCombinator::union(...$constantTypes['b']);
            if ($aTypes->equals($bTypes)) {
                $resultTypes[] = $aTypes;
                continue;
            }
            $resultTypes[] = TypeCombinator::union(...$constantTypes['a'], ...$constantTypes['b'])->generalize(GeneralizePrecision::moreSpecific());
        }
        if (count($constantArrays['a']) > 0) {
            if (count($constantArrays['b']) === 0) {
                $resultTypes[] = TypeCombinator::union(...$constantArrays['a']);
            } else {
                $constantArraysA = TypeCombinator::union(...$constantArrays['a']);
                $constantArraysB = TypeCombinator::union(...$constantArrays['b']);
                if ($constantArraysA->getIterableKeyType()->equals($constantArraysB->getIterableKeyType())) {
                    $resultArrayBuilder = ConstantArrayTypeBuilder::createEmpty();
                    foreach (TypeUtils::flattenTypes($constantArraysA->getIterableKeyType()) as $keyType) {
                        $resultArrayBuilder->setOffsetValueType($keyType, self::generalizeType($constantArraysA->getOffsetValueType($keyType), $constantArraysB->getOffsetValueType($keyType), $depth + 1), !$constantArraysA->hasOffsetValueType($keyType)->and($constantArraysB->hasOffsetValueType($keyType))->negate()->no());
                    }
                    $resultTypes[] = $resultArrayBuilder->getArray();
                } else {
                    $resultType = new ArrayType(TypeCombinator::union(self::generalizeType($constantArraysA->getIterableKeyType(), $constantArraysB->getIterableKeyType(), $depth + 1)), TypeCombinator::union(self::generalizeType($constantArraysA->getIterableValueType(), $constantArraysB->getIterableValueType(), $depth + 1)));
                    if ($constantArraysA->isIterableAtLeastOnce()->yes() && $constantArraysB->isIterableAtLeastOnce()->yes()) {
                        $resultType = TypeCombinator::intersect($resultType, new NonEmptyArrayType());
                    }
                    if ($constantArraysA->isList()->yes() && $constantArraysB->isList()->yes()) {
                        $resultType = AccessoryArrayListType::intersectWith($resultType);
                    }
                    $resultTypes[] = $resultType;
                }
            }
        } elseif (count($constantArrays['b']) > 0) {
            $resultTypes[] = TypeCombinator::union(...$constantArrays['b']);
        }
        if (count($generalArrays['a']) > 0) {
            if (count($generalArrays['b']) === 0) {
                $resultTypes[] = TypeCombinator::union(...$generalArrays['a']);
            } else {
                $generalArraysA = TypeCombinator::union(...$generalArrays['a']);
                $generalArraysB = TypeCombinator::union(...$generalArrays['b']);
                $aValueType = $generalArraysA->getIterableValueType();
                $bValueType = $generalArraysB->getIterableValueType();
                if ($aValueType->isArray()->yes() && $aValueType->isConstantArray()->no() && $bValueType->isArray()->yes() && $bValueType->isConstantArray()->no()) {
                    $aDepth = self::getArrayDepth($aValueType) + $depth;
                    $bDepth = self::getArrayDepth($bValueType) + $depth;
                    if (($aDepth > 2 || $bDepth > 2) && abs($aDepth - $bDepth) > 0) {
                        $aValueType = new MixedType();
                        $bValueType = new MixedType();
                    }
                }
                $resultType = new ArrayType(TypeCombinator::union(self::generalizeType($generalArraysA->getIterableKeyType(), $generalArraysB->getIterableKeyType(), $depth + 1)), TypeCombinator::union(self::generalizeType($aValueType, $bValueType, $depth + 1)));
                if ($generalArraysA->isIterableAtLeastOnce()->yes() && $generalArraysB->isIterableAtLeastOnce()->yes()) {
                    $resultType = TypeCombinator::intersect($resultType, new NonEmptyArrayType());
                }
                if ($generalArraysA->isList()->yes() && $generalArraysB->isList()->yes()) {
                    $resultType = AccessoryArrayListType::intersectWith($resultType);
                }
                if ($generalArraysA->isOversizedArray()->yes() && $generalArraysB->isOversizedArray()->yes()) {
                    $resultType = TypeCombinator::intersect($resultType, new OversizedArrayType());
                }
                $resultTypes[] = $resultType;
            }
        } elseif (count($generalArrays['b']) > 0) {
            $resultTypes[] = TypeCombinator::union(...$generalArrays['b']);
        }
        if (count($constantIntegers['a']) > 0) {
            if (count($constantIntegers['b']) === 0) {
                $resultTypes[] = TypeCombinator::union(...$constantIntegers['a']);
            } else {
                $constantIntegersA = TypeCombinator::union(...$constantIntegers['a']);
                $constantIntegersB = TypeCombinator::union(...$constantIntegers['b']);
                if ($constantIntegersA->equals($constantIntegersB)) {
                    $resultTypes[] = $constantIntegersA;
                } else {
                    $min = null;
                    $max = null;
                    foreach ($constantIntegers['a'] as $int) {
                        if ($min === null || $int->getValue() < $min) {
                            $min = $int->getValue();
                        }
                        if ($max !== null && $int->getValue() <= $max) {
                            continue;
                        }
                        $max = $int->getValue();
                    }
                    $gotGreater = \false;
                    $gotSmaller = \false;
                    foreach ($constantIntegers['b'] as $int) {
                        if ($int->getValue() > $max) {
                            $gotGreater = \true;
                        }
                        if ($int->getValue() >= $min) {
                            continue;
                        }
                        $gotSmaller = \true;
                    }
                    if ($gotGreater && $gotSmaller) {
                        $resultTypes[] = new IntegerType();
                    } elseif ($gotGreater) {
                        $resultTypes[] = IntegerRangeType::fromInterval($min, null);
                    } elseif ($gotSmaller) {
                        $resultTypes[] = IntegerRangeType::fromInterval(null, $max);
                    } else {
                        $resultTypes[] = TypeCombinator::union($constantIntegersA, $constantIntegersB);
                    }
                }
            }
        } elseif (count($constantIntegers['b']) > 0) {
            $resultTypes[] = TypeCombinator::union(...$constantIntegers['b']);
        }
        if (count($integerRanges['a']) > 0) {
            if (count($integerRanges['b']) === 0) {
                $resultTypes[] = TypeCombinator::union(...$integerRanges['a']);
            } else {
                $integerRangesA = TypeCombinator::union(...$integerRanges['a']);
                $integerRangesB = TypeCombinator::union(...$integerRanges['b']);
                if ($integerRangesA->equals($integerRangesB)) {
                    $resultTypes[] = $integerRangesA;
                } else {
                    $min = null;
                    $max = null;
                    foreach ($integerRanges['a'] as $range) {
                        if ($range->getMin() === null) {
                            $rangeMin = PHP_INT_MIN;
                        } else {
                            $rangeMin = $range->getMin();
                        }
                        if ($range->getMax() === null) {
                            $rangeMax = PHP_INT_MAX;
                        } else {
                            $rangeMax = $range->getMax();
                        }
                        if ($min === null || $rangeMin < $min) {
                            $min = $rangeMin;
                        }
                        if ($max !== null && $rangeMax <= $max) {
                            continue;
                        }
                        $max = $rangeMax;
                    }
                    $gotGreater = \false;
                    $gotSmaller = \false;
                    foreach ($integerRanges['b'] as $range) {
                        if ($range->getMin() === null) {
                            $rangeMin = PHP_INT_MIN;
                        } else {
                            $rangeMin = $range->getMin();
                        }
                        if ($range->getMax() === null) {
                            $rangeMax = PHP_INT_MAX;
                        } else {
                            $rangeMax = $range->getMax();
                        }
                        if ($rangeMax > $max) {
                            $gotGreater = \true;
                        }
                        if ($rangeMin >= $min) {
                            continue;
                        }
                        $gotSmaller = \true;
                    }
                    if ($min === PHP_INT_MIN) {
                        $min = null;
                    }
                    if ($max === PHP_INT_MAX) {
                        $max = null;
                    }
                    if ($gotGreater && $gotSmaller) {
                        $resultTypes[] = new IntegerType();
                    } elseif ($gotGreater) {
                        $resultTypes[] = IntegerRangeType::fromInterval($min, null);
                    } elseif ($gotSmaller) {
                        $resultTypes[] = IntegerRangeType::fromInterval(null, $max);
                    } else {
                        $resultTypes[] = TypeCombinator::union($integerRangesA, $integerRangesB);
                    }
                }
            }
        } elseif (count($integerRanges['b']) > 0) {
            $resultTypes[] = TypeCombinator::union(...$integerRanges['b']);
        }
        $accessoryTypes = array_map(static function (Type $type) : Type {
            return $type->generalize(GeneralizePrecision::moreSpecific());
        }, TypeUtils::getAccessoryTypes($a));
        return TypeCombinator::intersect(TypeCombinator::union(...$resultTypes, ...$otherTypes), ...$accessoryTypes);
    }
    private static function getArrayDepth(Type $type) : int
    {
        $depth = 0;
        $arrays = TypeUtils::getAnyArrays($type);
        while (count($arrays) > 0) {
            $temp = $type->getIterableValueType();
            $type = $temp;
            $arrays = TypeUtils::getAnyArrays($type);
            $depth++;
        }
        return $depth;
    }
    public function equals(self $otherScope) : bool
    {
        if (!$this->context->equals($otherScope->context)) {
            return \false;
        }
        if (!$this->compareVariableTypeHolders($this->expressionTypes, $otherScope->expressionTypes)) {
            return \false;
        }
        return $this->compareVariableTypeHolders($this->nativeExpressionTypes, $otherScope->nativeExpressionTypes);
    }
    /**
     * @param array<string, ExpressionTypeHolder> $variableTypeHolders
     * @param array<string, ExpressionTypeHolder> $otherVariableTypeHolders
     */
    private function compareVariableTypeHolders(array $variableTypeHolders, array $otherVariableTypeHolders) : bool
    {
        if (count($variableTypeHolders) !== count($otherVariableTypeHolders)) {
            return \false;
        }
        foreach ($variableTypeHolders as $variableExprString => $variableTypeHolder) {
            if (!isset($otherVariableTypeHolders[$variableExprString])) {
                return \false;
            }
            if (!$variableTypeHolder->getCertainty()->equals($otherVariableTypeHolders[$variableExprString]->getCertainty())) {
                return \false;
            }
            if (!$variableTypeHolder->getType()->equals($otherVariableTypeHolders[$variableExprString]->getType())) {
                return \false;
            }
            unset($otherVariableTypeHolders[$variableExprString]);
        }
        return \true;
    }
    /** @api */
    public function canAccessProperty(PropertyReflection $propertyReflection) : bool
    {
        return $this->canAccessClassMember($propertyReflection);
    }
    /** @api */
    public function canCallMethod(MethodReflection $methodReflection) : bool
    {
        if ($this->canAccessClassMember($methodReflection)) {
            return \true;
        }
        return $this->canAccessClassMember($methodReflection->getPrototype());
    }
    /** @api */
    public function canAccessConstant(ConstantReflection $constantReflection) : bool
    {
        return $this->canAccessClassMember($constantReflection);
    }
    private function canAccessClassMember(ClassMemberReflection $classMemberReflection) : bool
    {
        if ($classMemberReflection->isPublic()) {
            return \true;
        }
        $classReflectionName = $classMemberReflection->getDeclaringClass()->getName();
        $canAccessClassMember = static function (ClassReflection $classReflection) use($classMemberReflection, $classReflectionName) {
            if ($classMemberReflection->isPrivate()) {
                return $classReflection->getName() === $classReflectionName;
            }
            // protected
            if ($classReflection->getName() === $classReflectionName || $classReflection->isSubclassOf($classReflectionName)) {
                return \true;
            }
            return $classMemberReflection->getDeclaringClass()->isSubclassOf($classReflection->getName());
        };
        foreach ($this->inClosureBindScopeClasses as $inClosureBindScopeClass) {
            if (!$this->reflectionProvider->hasClass($inClosureBindScopeClass)) {
                continue;
            }
            if ($canAccessClassMember($this->reflectionProvider->getClass($inClosureBindScopeClass))) {
                return \true;
            }
        }
        if ($this->isInClass()) {
            return $canAccessClassMember($this->getClassReflection());
        }
        return \false;
    }
    /**
     * @return string[]
     */
    public function debug() : array
    {
        $descriptions = [];
        foreach ($this->expressionTypes as $name => $variableTypeHolder) {
            $key = sprintf('%s (%s)', $name, $variableTypeHolder->getCertainty()->describe());
            $descriptions[$key] = $variableTypeHolder->getType()->describe(VerbosityLevel::precise());
        }
        foreach ($this->nativeExpressionTypes as $exprString => $nativeTypeHolder) {
            $key = sprintf('native %s', $exprString);
            $descriptions[$key] = $nativeTypeHolder->getType()->describe(VerbosityLevel::precise());
        }
        return $descriptions;
    }
    private function exactInstantiation(New_ $node, string $className) : ?Type
    {
        $resolvedClassName = $this->resolveExactName(new Name($className));
        if ($resolvedClassName === null) {
            return null;
        }
        if (!$this->reflectionProvider->hasClass($resolvedClassName)) {
            return null;
        }
        $classReflection = $this->reflectionProvider->getClass($resolvedClassName);
        if ($classReflection->hasConstructor()) {
            $constructorMethod = $classReflection->getConstructor();
        } else {
            $constructorMethod = new DummyConstructorReflection($classReflection);
        }
        $resolvedTypes = [];
        $methodCall = new Expr\StaticCall(new Name($resolvedClassName), new Node\Identifier($constructorMethod->getName()), $node->getArgs());
        $parametersAcceptor = ParametersAcceptorSelector::selectFromArgs($this, $methodCall->getArgs(), $constructorMethod->getVariants());
        $normalizedMethodCall = \PHPStan\Analyser\ArgumentsNormalizer::reorderStaticCallArguments($parametersAcceptor, $methodCall);
        if ($normalizedMethodCall !== null) {
            foreach ($this->dynamicReturnTypeExtensionRegistry->getDynamicStaticMethodReturnTypeExtensionsForClass($classReflection->getName()) as $dynamicStaticMethodReturnTypeExtension) {
                if (!$dynamicStaticMethodReturnTypeExtension->isStaticMethodSupported($constructorMethod)) {
                    continue;
                }
                $resolvedType = $dynamicStaticMethodReturnTypeExtension->getTypeFromStaticMethodCall($constructorMethod, $normalizedMethodCall, $this);
                if ($resolvedType === null) {
                    continue;
                }
                $resolvedTypes[] = $resolvedType;
            }
        }
        if (count($resolvedTypes) > 0) {
            return TypeCombinator::union(...$resolvedTypes);
        }
        $methodResult = $this->getType($methodCall);
        if ($methodResult instanceof NeverType && $methodResult->isExplicit()) {
            return $methodResult;
        }
        $objectType = new ObjectType($resolvedClassName);
        if (!$classReflection->isGeneric()) {
            return $objectType;
        }
        $assignedToProperty = $node->getAttribute(NewAssignedToPropertyVisitor::ATTRIBUTE_NAME);
        if ($assignedToProperty !== null) {
            $constructorVariant = ParametersAcceptorSelector::selectSingle($constructorMethod->getVariants());
            $classTemplateTypes = $classReflection->getTemplateTypeMap()->getTypes();
            $originalClassTemplateTypes = $classTemplateTypes;
            foreach ($constructorVariant->getParameters() as $parameter) {
                TypeTraverser::map($parameter->getType(), static function (Type $type, callable $traverse) use(&$classTemplateTypes) : Type {
                    if ($type instanceof TemplateType && array_key_exists($type->getName(), $classTemplateTypes)) {
                        $classTemplateType = $classTemplateTypes[$type->getName()];
                        if ($classTemplateType instanceof TemplateType && $classTemplateType->getScope()->equals($type->getScope())) {
                            unset($classTemplateTypes[$type->getName()]);
                        }
                        return $type;
                    }
                    return $traverse($type);
                });
            }
            if (count($classTemplateTypes) === count($originalClassTemplateTypes)) {
                $propertyType = TypeCombinator::removeNull($this->getType($assignedToProperty));
                if ($objectType->isSuperTypeOf($propertyType)->yes()) {
                    return $propertyType;
                }
            }
        }
        if ($constructorMethod instanceof DummyConstructorReflection || $constructorMethod->getDeclaringClass()->getName() !== $classReflection->getName()) {
            return new GenericObjectType($resolvedClassName, $classReflection->typeMapToList($classReflection->getTemplateTypeMap()->resolveToBounds()));
        }
        $parametersAcceptor = ParametersAcceptorSelector::selectFromArgs($this, $methodCall->getArgs(), $constructorMethod->getVariants());
        if ($this->explicitMixedInUnknownGenericNew) {
            return new GenericObjectType($resolvedClassName, $classReflection->typeMapToList($parametersAcceptor->getResolvedTemplateTypeMap()));
        }
        $resolvedPhpDoc = $classReflection->getResolvedPhpDoc();
        if ($resolvedPhpDoc === null) {
            return $objectType;
        }
        $list = [];
        $typeMap = $parametersAcceptor->getResolvedTemplateTypeMap();
        foreach ($resolvedPhpDoc->getTemplateTags() as $tag) {
            $templateType = $typeMap->getType($tag->getName());
            if ($templateType !== null) {
                $list[] = $templateType;
                continue;
            }
            $bound = $tag->getBound();
            if ($bound instanceof MixedType && $bound->isExplicitMixed()) {
                $bound = new MixedType(\false);
            }
            $list[] = $bound;
        }
        return new GenericObjectType($resolvedClassName, $list);
    }
    private function filterTypeWithMethod(Type $typeWithMethod, string $methodName) : ?Type
    {
        if ($typeWithMethod instanceof UnionType) {
            $newTypes = [];
            foreach ($typeWithMethod->getTypes() as $innerType) {
                if (!$innerType->hasMethod($methodName)->yes()) {
                    continue;
                }
                $newTypes[] = $innerType;
            }
            if (count($newTypes) === 0) {
                return null;
            }
            $typeWithMethod = TypeCombinator::union(...$newTypes);
        }
        if (!$typeWithMethod->hasMethod($methodName)->yes()) {
            return null;
        }
        return $typeWithMethod;
    }
    /** @api */
    public function getMethodReflection(Type $typeWithMethod, string $methodName) : ?ExtendedMethodReflection
    {
        $type = $this->filterTypeWithMethod($typeWithMethod, $methodName);
        if ($type === null) {
            return null;
        }
        return $type->getMethod($methodName, $this);
    }
    /**
     * @param MethodCall|Node\Expr\StaticCall $methodCall
     */
    private function methodCallReturnType(Type $typeWithMethod, string $methodName, Expr $methodCall) : ?Type
    {
        $typeWithMethod = $this->filterTypeWithMethod($typeWithMethod, $methodName);
        if ($typeWithMethod === null) {
            return null;
        }
        $methodReflection = $typeWithMethod->getMethod($methodName, $this);
        $parametersAcceptor = ParametersAcceptorSelector::selectFromArgs($this, $methodCall->getArgs(), $methodReflection->getVariants());
        if ($methodCall instanceof MethodCall) {
            $normalizedMethodCall = \PHPStan\Analyser\ArgumentsNormalizer::reorderMethodArguments($parametersAcceptor, $methodCall);
        } else {
            $normalizedMethodCall = \PHPStan\Analyser\ArgumentsNormalizer::reorderStaticCallArguments($parametersAcceptor, $methodCall);
        }
        if ($normalizedMethodCall === null) {
            return $parametersAcceptor->getReturnType();
        }
        $resolvedTypes = [];
        foreach ($typeWithMethod->getObjectClassNames() as $className) {
            if ($normalizedMethodCall instanceof MethodCall) {
                foreach ($this->dynamicReturnTypeExtensionRegistry->getDynamicMethodReturnTypeExtensionsForClass($className) as $dynamicMethodReturnTypeExtension) {
                    if (!$dynamicMethodReturnTypeExtension->isMethodSupported($methodReflection)) {
                        continue;
                    }
                    $resolvedType = $dynamicMethodReturnTypeExtension->getTypeFromMethodCall($methodReflection, $normalizedMethodCall, $this);
                    if ($resolvedType === null) {
                        continue;
                    }
                    $resolvedTypes[] = $resolvedType;
                }
            } else {
                foreach ($this->dynamicReturnTypeExtensionRegistry->getDynamicStaticMethodReturnTypeExtensionsForClass($className) as $dynamicStaticMethodReturnTypeExtension) {
                    if (!$dynamicStaticMethodReturnTypeExtension->isStaticMethodSupported($methodReflection)) {
                        continue;
                    }
                    $resolvedType = $dynamicStaticMethodReturnTypeExtension->getTypeFromStaticMethodCall($methodReflection, $normalizedMethodCall, $this);
                    if ($resolvedType === null) {
                        continue;
                    }
                    $resolvedTypes[] = $resolvedType;
                }
            }
        }
        if (count($resolvedTypes) > 0) {
            return TypeCombinator::union(...$resolvedTypes);
        }
        return $parametersAcceptor->getReturnType();
    }
    /** @api */
    public function getPropertyReflection(Type $typeWithProperty, string $propertyName) : ?PropertyReflection
    {
        if ($typeWithProperty instanceof UnionType) {
            $newTypes = [];
            foreach ($typeWithProperty->getTypes() as $innerType) {
                if (!$innerType->hasProperty($propertyName)->yes()) {
                    continue;
                }
                $newTypes[] = $innerType;
            }
            if (count($newTypes) === 0) {
                return null;
            }
            $typeWithProperty = TypeCombinator::union(...$newTypes);
        }
        if (!$typeWithProperty->hasProperty($propertyName)->yes()) {
            return null;
        }
        return $typeWithProperty->getProperty($propertyName, $this);
    }
    /**
     * @param PropertyFetch|Node\Expr\StaticPropertyFetch $propertyFetch
     */
    private function propertyFetchType(Type $fetchedOnType, string $propertyName, Expr $propertyFetch) : ?Type
    {
        $propertyReflection = $this->getPropertyReflection($fetchedOnType, $propertyName);
        if ($propertyReflection === null) {
            return null;
        }
        if ($this->isInExpressionAssign($propertyFetch)) {
            return $propertyReflection->getWritableType();
        }
        return $propertyReflection->getReadableType();
    }
    public function getConstantReflection(Type $typeWithConstant, string $constantName) : ?ConstantReflection
    {
        if ($typeWithConstant instanceof UnionType) {
            $newTypes = [];
            foreach ($typeWithConstant->getTypes() as $innerType) {
                if (!$innerType->hasConstant($constantName)->yes()) {
                    continue;
                }
                $newTypes[] = $innerType;
            }
            if (count($newTypes) === 0) {
                return null;
            }
            $typeWithConstant = TypeCombinator::union(...$newTypes);
        }
        if (!$typeWithConstant->hasConstant($constantName)->yes()) {
            return null;
        }
        return $typeWithConstant->getConstant($constantName);
    }
    /**
     * @return array<string, ExpressionTypeHolder>
     */
    private function getConstantTypes() : array
    {
        $constantTypes = [];
        foreach ($this->expressionTypes as $exprString => $typeHolder) {
            $expr = $typeHolder->getExpr();
            if (!$expr instanceof ConstFetch) {
                continue;
            }
            $constantTypes[$exprString] = $typeHolder;
        }
        return $constantTypes;
    }
    /**
     * @return array<string, ExpressionTypeHolder>
     */
    private function getNativeConstantTypes() : array
    {
        $constantTypes = [];
        foreach ($this->nativeExpressionTypes as $exprString => $typeHolder) {
            $expr = $typeHolder->getExpr();
            if (!$expr instanceof ConstFetch) {
                continue;
            }
            $constantTypes[$exprString] = $typeHolder;
        }
        return $constantTypes;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PHPStan\Type\Type;
class ExpressionContext
{
    /**
     * @var bool
     */
    private $isDeep;
    /**
     * @var string|null
     */
    private $inAssignRightSideVariableName;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $inAssignRightSideType;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $inAssignRightSideNativeType;
    private function __construct(bool $isDeep, ?string $inAssignRightSideVariableName, ?Type $inAssignRightSideType, ?Type $inAssignRightSideNativeType)
    {
        $this->isDeep = $isDeep;
        $this->inAssignRightSideVariableName = $inAssignRightSideVariableName;
        $this->inAssignRightSideType = $inAssignRightSideType;
        $this->inAssignRightSideNativeType = $inAssignRightSideNativeType;
    }
    public static function createTopLevel() : self
    {
        return new self(\false, null, null, null);
    }
    public static function createDeep() : self
    {
        return new self(\true, null, null, null);
    }
    public function enterDeep() : self
    {
        if ($this->isDeep) {
            return $this;
        }
        return new self(\true, $this->inAssignRightSideVariableName, $this->inAssignRightSideType, $this->inAssignRightSideNativeType);
    }
    public function isDeep() : bool
    {
        return $this->isDeep;
    }
    public function enterRightSideAssign(string $variableName, Type $type, Type $nativeType) : self
    {
        return new self($this->isDeep, $variableName, $type, $nativeType);
    }
    public function getInAssignRightSideVariableName() : ?string
    {
        return $this->inAssignRightSideVariableName;
    }
    public function getInAssignRightSideType() : ?Type
    {
        return $this->inAssignRightSideType;
    }
    public function getInAssignRightSideNativeType() : ?Type
    {
        return $this->inAssignRightSideNativeType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PhpParser\Node\Arg;
use PhpParser\Node\Expr\CallLike;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Expr\New_;
use PhpParser\Node\Expr\StaticCall;
use PHPStan\Node\Expr\TypeExpr;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Constant\ConstantArrayType;
use function array_key_exists;
use function array_keys;
use function count;
use function ksort;
use function max;
final class ArgumentsNormalizer
{
    public const ORIGINAL_ARG_ATTRIBUTE = 'originalArg';
    public static function reorderFuncArguments(ParametersAcceptor $parametersAcceptor, FuncCall $functionCall) : ?FuncCall
    {
        $reorderedArgs = self::reorderArgs($parametersAcceptor, $functionCall);
        if ($reorderedArgs === null) {
            return null;
        }
        return new FuncCall($functionCall->name, $reorderedArgs, $functionCall->getAttributes());
    }
    public static function reorderMethodArguments(ParametersAcceptor $parametersAcceptor, MethodCall $methodCall) : ?MethodCall
    {
        $reorderedArgs = self::reorderArgs($parametersAcceptor, $methodCall);
        if ($reorderedArgs === null) {
            return null;
        }
        return new MethodCall($methodCall->var, $methodCall->name, $reorderedArgs, $methodCall->getAttributes());
    }
    public static function reorderStaticCallArguments(ParametersAcceptor $parametersAcceptor, StaticCall $staticCall) : ?StaticCall
    {
        $reorderedArgs = self::reorderArgs($parametersAcceptor, $staticCall);
        if ($reorderedArgs === null) {
            return null;
        }
        return new StaticCall($staticCall->class, $staticCall->name, $reorderedArgs, $staticCall->getAttributes());
    }
    public static function reorderNewArguments(ParametersAcceptor $parametersAcceptor, New_ $new) : ?New_
    {
        $reorderedArgs = self::reorderArgs($parametersAcceptor, $new);
        if ($reorderedArgs === null) {
            return null;
        }
        return new New_($new->class, $reorderedArgs, $new->getAttributes());
    }
    /**
     * @return ?array<int, Arg>
     */
    private static function reorderArgs(ParametersAcceptor $parametersAcceptor, CallLike $callLike) : ?array
    {
        $signatureParameters = $parametersAcceptor->getParameters();
        $callArgs = $callLike->getArgs();
        if (count($callArgs) === 0) {
            return [];
        }
        $hasNamedArgs = \false;
        foreach ($callArgs as $arg) {
            if ($arg->name !== null) {
                $hasNamedArgs = \true;
                break;
            }
        }
        if (!$hasNamedArgs) {
            return $callArgs;
        }
        $hasVariadic = \false;
        $argumentPositions = [];
        foreach ($signatureParameters as $i => $parameter) {
            if ($hasVariadic) {
                // variadic parameter must be last
                return null;
            }
            $hasVariadic = $parameter->isVariadic();
            $argumentPositions[$parameter->getName()] = $i;
        }
        $reorderedArgs = [];
        $additionalNamedArgs = [];
        foreach ($callArgs as $i => $arg) {
            if ($arg->name === null) {
                // add regular args as is
                $reorderedArgs[$i] = $arg;
            } elseif (array_key_exists($arg->name->toString(), $argumentPositions)) {
                $argName = $arg->name->toString();
                // order named args into the position the signature expects them
                $attributes = $arg->getAttributes();
                $attributes[self::ORIGINAL_ARG_ATTRIBUTE] = $arg;
                $reorderedArgs[$argumentPositions[$argName]] = new Arg($arg->value, $arg->byRef, $arg->unpack, $attributes, null);
            } else {
                if (!$hasVariadic) {
                    return null;
                }
                $attributes = $arg->getAttributes();
                $attributes[self::ORIGINAL_ARG_ATTRIBUTE] = $arg;
                $additionalNamedArgs[] = new Arg($arg->value, $arg->byRef, $arg->unpack, $attributes, null);
            }
        }
        // replace variadic parameter with additional named args, except if it is already set
        $additionalNamedArgsOffset = count($argumentPositions) - 1;
        if (array_key_exists($additionalNamedArgsOffset, $reorderedArgs)) {
            $additionalNamedArgsOffset++;
        }
        foreach ($additionalNamedArgs as $i => $additionalNamedArg) {
            $reorderedArgs[$additionalNamedArgsOffset + $i] = $additionalNamedArg;
        }
        if (count($reorderedArgs) === 0) {
            return [];
        }
        // fill up all wholes with default values until the last given argument
        for ($j = 0; $j < max(array_keys($reorderedArgs)); $j++) {
            if (array_key_exists($j, $reorderedArgs)) {
                continue;
            }
            if (!array_key_exists($j, $signatureParameters)) {
                throw new ShouldNotHappenException('Parameter signatures cannot have holes');
            }
            $parameter = $signatureParameters[$j];
            // we can only fill up optional parameters with default values
            if (!$parameter->isOptional()) {
                return null;
            }
            $defaultValue = $parameter->getDefaultValue();
            if ($defaultValue === null) {
                if (!$parameter->isVariadic()) {
                    throw new ShouldNotHappenException('An optional parameter must have a default value');
                }
                $defaultValue = new ConstantArrayType([], []);
            }
            $reorderedArgs[$j] = new Arg(new TypeExpr($defaultValue));
        }
        ksort($reorderedArgs);
        return $reorderedArgs;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PhpParser\Node\Expr;
use PHPStan\Type\TypeCombinator;
class NullsafeOperatorHelper
{
    public static function getNullsafeShortcircuitedExprRespectingScope(\PHPStan\Analyser\Scope $scope, Expr $expr) : Expr
    {
        if (!TypeCombinator::containsNull($scope->getType($expr))) {
            // We're in most likely in context of a null-safe operator ($scope->moreSpecificType is defined for $expr)
            // Modifying the expression would not bring any value or worse ruin the context information
            return $expr;
        }
        return self::getNullsafeShortcircuitedExpr($expr);
    }
    /**
     * @internal Use NullsafeOperatorHelper::getNullsafeShortcircuitedExprRespectingScope
     */
    public static function getNullsafeShortcircuitedExpr(Expr $expr) : Expr
    {
        if ($expr instanceof Expr\NullsafeMethodCall) {
            return new Expr\MethodCall(self::getNullsafeShortcircuitedExpr($expr->var), $expr->name, $expr->args);
        }
        if ($expr instanceof Expr\MethodCall) {
            $var = self::getNullsafeShortcircuitedExpr($expr->var);
            if ($expr->var === $var) {
                return $expr;
            }
            return new Expr\MethodCall($var, $expr->name, $expr->getArgs());
        }
        if ($expr instanceof Expr\StaticCall && $expr->class instanceof Expr) {
            $class = self::getNullsafeShortcircuitedExpr($expr->class);
            if ($expr->class === $class) {
                return $expr;
            }
            return new Expr\StaticCall($class, $expr->name, $expr->getArgs());
        }
        if ($expr instanceof Expr\ArrayDimFetch) {
            $var = self::getNullsafeShortcircuitedExpr($expr->var);
            if ($expr->var === $var) {
                return $expr;
            }
            return new Expr\ArrayDimFetch($var, $expr->dim);
        }
        if ($expr instanceof Expr\NullsafePropertyFetch) {
            return new Expr\PropertyFetch(self::getNullsafeShortcircuitedExpr($expr->var), $expr->name);
        }
        if ($expr instanceof Expr\PropertyFetch) {
            $var = self::getNullsafeShortcircuitedExpr($expr->var);
            if ($expr->var === $var) {
                return $expr;
            }
            return new Expr\PropertyFetch($var, $expr->name);
        }
        if ($expr instanceof Expr\StaticPropertyFetch && $expr->class instanceof Expr) {
            $class = self::getNullsafeShortcircuitedExpr($expr->class);
            if ($expr->class === $class) {
                return $expr;
            }
            return new Expr\StaticPropertyFetch($class, $expr->name);
        }
        return $expr;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser\ResultCache;

use PHPStan\Analyser\AnalyserResult;
class ResultCacheProcessResult
{
    /**
     * @var \PHPStan\Analyser\AnalyserResult
     */
    private $analyserResult;
    /**
     * @var bool
     */
    private $saved;
    public function __construct(AnalyserResult $analyserResult, bool $saved)
    {
        $this->analyserResult = $analyserResult;
        $this->saved = $saved;
    }
    public function getAnalyserResult() : AnalyserResult
    {
        return $this->analyserResult;
    }
    public function isSaved() : bool
    {
        return $this->saved;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser\ResultCache;

use PHPStan\Analyser\Error;
use PHPStan\Collectors\CollectedData;
use PHPStan\Dependency\RootExportedNode;
class ResultCache
{
    /**
     * @var string[]
     */
    private $filesToAnalyse;
    /**
     * @var bool
     */
    private $fullAnalysis;
    /**
     * @var int
     */
    private $lastFullAnalysisTime;
    /**
     * @var mixed[]
     */
    private $meta;
    /**
     * @var array<string, array<Error>>
     */
    private $errors;
    /**
     * @var array<string, array<CollectedData>>
     */
    private $collectedData;
    /**
     * @var array<string, array<string>>
     */
    private $dependencies;
    /**
     * @var array<string, array<RootExportedNode>>
     */
    private $exportedNodes;
    /**
     * @param string[] $filesToAnalyse
     * @param mixed[] $meta
     * @param array<string, array<Error>> $errors
     * @param array<string, array<CollectedData>> $collectedData
     * @param array<string, array<string>> $dependencies
     * @param array<string, array<RootExportedNode>> $exportedNodes
     */
    public function __construct(array $filesToAnalyse, bool $fullAnalysis, int $lastFullAnalysisTime, array $meta, array $errors, array $collectedData, array $dependencies, array $exportedNodes)
    {
        $this->filesToAnalyse = $filesToAnalyse;
        $this->fullAnalysis = $fullAnalysis;
        $this->lastFullAnalysisTime = $lastFullAnalysisTime;
        $this->meta = $meta;
        $this->errors = $errors;
        $this->collectedData = $collectedData;
        $this->dependencies = $dependencies;
        $this->exportedNodes = $exportedNodes;
    }
    /**
     * @return string[]
     */
    public function getFilesToAnalyse() : array
    {
        return $this->filesToAnalyse;
    }
    public function isFullAnalysis() : bool
    {
        return $this->fullAnalysis;
    }
    public function getLastFullAnalysisTime() : int
    {
        return $this->lastFullAnalysisTime;
    }
    /**
     * @return mixed[]
     */
    public function getMeta() : array
    {
        return $this->meta;
    }
    /**
     * @return array<string, array<Error>>
     */
    public function getErrors() : array
    {
        return $this->errors;
    }
    /**
     * @return array<string, array<CollectedData>>
     */
    public function getCollectedData() : array
    {
        return $this->collectedData;
    }
    /**
     * @return array<string, array<string>>
     */
    public function getDependencies() : array
    {
        return $this->dependencies;
    }
    /**
     * @return array<string, array<RootExportedNode>>
     */
    public function getExportedNodes() : array
    {
        return $this->exportedNodes;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser\ResultCache;

interface ResultCacheManagerFactory
{
    public function create() : \PHPStan\Analyser\ResultCache\ResultCacheManager;
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser\ResultCache;

use function dirname;
use function is_file;
use function unlink;
class ResultCacheClearer
{
    /**
     * @var string
     */
    private $cacheFilePath;
    public function __construct(string $cacheFilePath)
    {
        $this->cacheFilePath = $cacheFilePath;
    }
    public function clear() : string
    {
        $dir = dirname($this->cacheFilePath);
        if (!is_file($this->cacheFilePath)) {
            return $dir;
        }
        @unlink($this->cacheFilePath);
        return $dir;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser\ResultCache;

use _PHPStan_dcc7b7cff\Nette\DI\Definitions\Statement;
use _PHPStan_dcc7b7cff\Nette\Neon\Neon;
use PHPStan\Analyser\AnalyserResult;
use PHPStan\Analyser\Error;
use PHPStan\Collectors\CollectedData;
use PHPStan\Command\Output;
use PHPStan\Dependency\ExportedNodeFetcher;
use PHPStan\Dependency\RootExportedNode;
use PHPStan\File\FileFinder;
use PHPStan\File\FileReader;
use PHPStan\File\FileWriter;
use PHPStan\Internal\ComposerHelper;
use PHPStan\PhpDoc\StubFilesProvider;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\ShouldNotHappenException;
use Throwable;
use function array_diff;
use function array_fill_keys;
use function array_filter;
use function array_key_exists;
use function array_keys;
use function array_merge;
use function array_unique;
use function array_values;
use function count;
use function get_loaded_extensions;
use function is_array;
use function is_file;
use function is_string;
use function ksort;
use function sha1;
use function sort;
use function sprintf;
use function str_replace;
use function time;
use function unlink;
use function var_export;
use const PHP_VERSION_ID;
class ResultCacheManager
{
    private const CACHE_VERSION = 'v10-collectedData';
    /** @var array<string, string> */
    private $fileHashes = [];
    /** @var array<string, true> */
    private $alreadyProcessed = [];
    /**
     * @var \PHPStan\Dependency\ExportedNodeFetcher
     */
    private $exportedNodeFetcher;
    /**
     * @var \PHPStan\File\FileFinder
     */
    private $scanFileFinder;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\PhpDoc\StubFilesProvider
     */
    private $stubFilesProvider;
    /**
     * @var string
     */
    private $cacheFilePath;
    /**
     * @var string[]
     */
    private $analysedPaths;
    /**
     * @var string[]
     */
    private $composerAutoloaderProjectPaths;
    /**
     * @var string
     */
    private $usedLevel;
    /**
     * @var string|null
     */
    private $cliAutoloadFile;
    /**
     * @var string[]
     */
    private $bootstrapFiles;
    /**
     * @var string[]
     */
    private $scanFiles;
    /**
     * @var string[]
     */
    private $scanDirectories;
    /**
     * @var bool
     */
    private $checkDependenciesOfProjectExtensionFiles;
    /**
     * @param string[] $analysedPaths
     * @param string[] $composerAutoloaderProjectPaths
     * @param string[] $bootstrapFiles
     * @param string[] $scanFiles
     * @param string[] $scanDirectories
     */
    public function __construct(ExportedNodeFetcher $exportedNodeFetcher, FileFinder $scanFileFinder, ReflectionProvider $reflectionProvider, StubFilesProvider $stubFilesProvider, string $cacheFilePath, array $analysedPaths, array $composerAutoloaderProjectPaths, string $usedLevel, ?string $cliAutoloadFile, array $bootstrapFiles, array $scanFiles, array $scanDirectories, bool $checkDependenciesOfProjectExtensionFiles)
    {
        $this->exportedNodeFetcher = $exportedNodeFetcher;
        $this->scanFileFinder = $scanFileFinder;
        $this->reflectionProvider = $reflectionProvider;
        $this->stubFilesProvider = $stubFilesProvider;
        $this->cacheFilePath = $cacheFilePath;
        $this->analysedPaths = $analysedPaths;
        $this->composerAutoloaderProjectPaths = $composerAutoloaderProjectPaths;
        $this->usedLevel = $usedLevel;
        $this->cliAutoloadFile = $cliAutoloadFile;
        $this->bootstrapFiles = $bootstrapFiles;
        $this->scanFiles = $scanFiles;
        $this->scanDirectories = $scanDirectories;
        $this->checkDependenciesOfProjectExtensionFiles = $checkDependenciesOfProjectExtensionFiles;
    }
    /**
     * @param string[] $allAnalysedFiles
     * @param mixed[]|null $projectConfigArray
     */
    public function restore(array $allAnalysedFiles, bool $debug, bool $onlyFiles, ?array $projectConfigArray, Output $output) : \PHPStan\Analyser\ResultCache\ResultCache
    {
        if ($debug) {
            if ($output->isDebug()) {
                $output->writeLineFormatted('Result cache not used because of debug mode.');
            }
            return new \PHPStan\Analyser\ResultCache\ResultCache($allAnalysedFiles, \true, time(), $this->getMeta($allAnalysedFiles, $projectConfigArray), [], [], [], []);
        }
        if ($onlyFiles) {
            if ($output->isDebug()) {
                $output->writeLineFormatted('Result cache not used because only files were passed as analysed paths.');
            }
            return new \PHPStan\Analyser\ResultCache\ResultCache($allAnalysedFiles, \true, time(), $this->getMeta($allAnalysedFiles, $projectConfigArray), [], [], [], []);
        }
        $cacheFilePath = $this->cacheFilePath;
        if (!is_file($cacheFilePath)) {
            if ($output->isDebug()) {
                $output->writeLineFormatted('Result cache not used because the cache file does not exist.');
            }
            return new \PHPStan\Analyser\ResultCache\ResultCache($allAnalysedFiles, \true, time(), $this->getMeta($allAnalysedFiles, $projectConfigArray), [], [], [], []);
        }
        try {
            $data = (require $cacheFilePath);
        } catch (Throwable $e) {
            if ($output->isDebug()) {
                $output->writeLineFormatted(sprintf('Result cache not used because an error occurred while loading the cache file: %s', $e->getMessage()));
            }
            @unlink($cacheFilePath);
            return new \PHPStan\Analyser\ResultCache\ResultCache($allAnalysedFiles, \true, time(), $this->getMeta($allAnalysedFiles, $projectConfigArray), [], [], [], []);
        }
        if (!is_array($data)) {
            @unlink($cacheFilePath);
            if ($output->isDebug()) {
                $output->writeLineFormatted('Result cache not used because the cache file is corrupted.');
            }
            return new \PHPStan\Analyser\ResultCache\ResultCache($allAnalysedFiles, \true, time(), $this->getMeta($allAnalysedFiles, $projectConfigArray), [], [], [], []);
        }
        $meta = $this->getMeta($allAnalysedFiles, $projectConfigArray);
        if ($this->isMetaDifferent($data['meta'], $meta)) {
            if ($output->isDebug()) {
                $output->writeLineFormatted('Result cache not used because the metadata do not match.');
            }
            return new \PHPStan\Analyser\ResultCache\ResultCache($allAnalysedFiles, \true, time(), $meta, [], [], [], []);
        }
        if (time() - $data['lastFullAnalysisTime'] >= 60 * 60 * 24 * 7) {
            if ($output->isDebug()) {
                $output->writeLineFormatted('Result cache not used because it\'s more than 7 days since last full analysis.');
            }
            // run full analysis if the result cache is older than 7 days
            return new \PHPStan\Analyser\ResultCache\ResultCache($allAnalysedFiles, \true, time(), $meta, [], [], [], []);
        }
        foreach ($data['projectExtensionFiles'] as $extensionFile => $fileHash) {
            if (!is_file($extensionFile)) {
                if ($output->isDebug()) {
                    $output->writeLineFormatted(sprintf('Result cache not used because extension file %s was not found.', $extensionFile));
                }
                return new \PHPStan\Analyser\ResultCache\ResultCache($allAnalysedFiles, \true, time(), $meta, [], [], [], []);
            }
            if ($this->getFileHash($extensionFile) === $fileHash) {
                continue;
            }
            if ($output->isDebug()) {
                $output->writeLineFormatted(sprintf('Result cache not used because extension file %s hash does not match.', $extensionFile));
            }
            return new \PHPStan\Analyser\ResultCache\ResultCache($allAnalysedFiles, \true, time(), $meta, [], [], [], []);
        }
        $invertedDependencies = $data['dependencies'];
        $deletedFiles = array_fill_keys(array_keys($invertedDependencies), \true);
        $filesToAnalyse = [];
        $invertedDependenciesToReturn = [];
        $errors = $data['errorsCallback']();
        $collectedData = $data['collectedDataCallback']();
        $exportedNodes = $data['exportedNodesCallback']();
        $filteredErrors = [];
        $filteredCollectedData = [];
        $filteredExportedNodes = [];
        $newFileAppeared = \false;
        foreach ($this->getStubFiles() as $stubFile) {
            if (!array_key_exists($stubFile, $errors)) {
                continue;
            }
            $filteredErrors[$stubFile] = $errors[$stubFile];
        }
        foreach ($allAnalysedFiles as $analysedFile) {
            if (array_key_exists($analysedFile, $errors)) {
                $filteredErrors[$analysedFile] = $errors[$analysedFile];
            }
            if (array_key_exists($analysedFile, $collectedData)) {
                $filteredCollectedData[$analysedFile] = $collectedData[$analysedFile];
            }
            if (array_key_exists($analysedFile, $exportedNodes)) {
                $filteredExportedNodes[$analysedFile] = $exportedNodes[$analysedFile];
            }
            if (!array_key_exists($analysedFile, $invertedDependencies)) {
                // new file
                $filesToAnalyse[] = $analysedFile;
                $newFileAppeared = \true;
                continue;
            }
            unset($deletedFiles[$analysedFile]);
            $analysedFileData = $invertedDependencies[$analysedFile];
            $cachedFileHash = $analysedFileData['fileHash'];
            $dependentFiles = $analysedFileData['dependentFiles'];
            $invertedDependenciesToReturn[$analysedFile] = $dependentFiles;
            $currentFileHash = $this->getFileHash($analysedFile);
            if ($cachedFileHash === $currentFileHash) {
                continue;
            }
            $filesToAnalyse[] = $analysedFile;
            if (!array_key_exists($analysedFile, $filteredExportedNodes)) {
                continue;
            }
            $cachedFileExportedNodes = $filteredExportedNodes[$analysedFile];
            $exportedNodesChanged = $this->exportedNodesChanged($analysedFile, $cachedFileExportedNodes);
            if ($exportedNodesChanged === null) {
                continue;
            }
            if ($exportedNodesChanged) {
                $newFileAppeared = \true;
            }
            foreach ($dependentFiles as $dependentFile) {
                if (!is_file($dependentFile)) {
                    continue;
                }
                $filesToAnalyse[] = $dependentFile;
            }
        }
        foreach (array_keys($deletedFiles) as $deletedFile) {
            if (!array_key_exists($deletedFile, $invertedDependencies)) {
                continue;
            }
            $deletedFileData = $invertedDependencies[$deletedFile];
            $dependentFiles = $deletedFileData['dependentFiles'];
            foreach ($dependentFiles as $dependentFile) {
                if (!is_file($dependentFile)) {
                    continue;
                }
                $filesToAnalyse[] = $dependentFile;
            }
        }
        if ($newFileAppeared) {
            foreach (array_keys($filteredErrors) as $fileWithError) {
                $filesToAnalyse[] = $fileWithError;
            }
        }
        return new \PHPStan\Analyser\ResultCache\ResultCache(array_unique($filesToAnalyse), \false, $data['lastFullAnalysisTime'], $meta, $filteredErrors, $filteredCollectedData, $invertedDependenciesToReturn, $filteredExportedNodes);
    }
    /**
     * @param mixed[] $cachedMeta
     * @param mixed[] $currentMeta
     */
    private function isMetaDifferent(array $cachedMeta, array $currentMeta) : bool
    {
        $projectConfig = $currentMeta['projectConfig'];
        if ($projectConfig !== null) {
            $currentMeta['projectConfig'] = Neon::encode($currentMeta['projectConfig']);
        }
        return $cachedMeta !== $currentMeta;
    }
    /**
     * @param array<int, RootExportedNode> $cachedFileExportedNodes
     * @return bool|null null means nothing changed, true means new root symbol appeared, false means nested node changed
     */
    private function exportedNodesChanged(string $analysedFile, array $cachedFileExportedNodes) : ?bool
    {
        $fileExportedNodes = $this->exportedNodeFetcher->fetchNodes($analysedFile);
        $cachedSymbols = [];
        foreach ($cachedFileExportedNodes as $cachedFileExportedNode) {
            $cachedSymbols[$cachedFileExportedNode->getType()][] = $cachedFileExportedNode->getName();
        }
        $fileSymbols = [];
        foreach ($fileExportedNodes as $fileExportedNode) {
            $fileSymbols[$fileExportedNode->getType()][] = $fileExportedNode->getName();
        }
        if ($cachedSymbols !== $fileSymbols) {
            return \true;
        }
        if (count($fileExportedNodes) !== count($cachedFileExportedNodes)) {
            return \true;
        }
        foreach ($fileExportedNodes as $i => $fileExportedNode) {
            $cachedExportedNode = $cachedFileExportedNodes[$i];
            if (!$cachedExportedNode->equals($fileExportedNode)) {
                return \false;
            }
        }
        return null;
    }
    /**
     * @param bool|string $save
     */
    public function process(AnalyserResult $analyserResult, \PHPStan\Analyser\ResultCache\ResultCache $resultCache, Output $output, bool $onlyFiles, $save) : \PHPStan\Analyser\ResultCache\ResultCacheProcessResult
    {
        $internalErrors = $analyserResult->getInternalErrors();
        $freshErrorsByFile = [];
        foreach ($analyserResult->getErrors() as $error) {
            $freshErrorsByFile[$error->getFilePath()][] = $error;
        }
        $freshCollectedDataByFile = [];
        foreach ($analyserResult->getCollectedData() as $collectedData) {
            $freshCollectedDataByFile[$collectedData->getFilePath()][] = $collectedData;
        }
        $meta = $resultCache->getMeta();
        $doSave = function (array $errorsByFile, $collectedDataByFile, ?array $dependencies, array $exportedNodes) use($internalErrors, $resultCache, $output, $onlyFiles, $meta) : bool {
            if ($onlyFiles) {
                if ($output->isDebug()) {
                    $output->writeLineFormatted('Result cache was not saved because only files were passed as analysed paths.');
                }
                return \false;
            }
            if ($dependencies === null) {
                if ($output->isDebug()) {
                    $output->writeLineFormatted('Result cache was not saved because of error in dependencies.');
                }
                return \false;
            }
            if (count($internalErrors) > 0) {
                if ($output->isDebug()) {
                    $output->writeLineFormatted('Result cache was not saved because of internal errors.');
                }
                return \false;
            }
            foreach ($errorsByFile as $errors) {
                foreach ($errors as $error) {
                    if (!$error->hasNonIgnorableException()) {
                        continue;
                    }
                    if ($output->isDebug()) {
                        $output->writeLineFormatted(sprintf('Result cache was not saved because of non-ignorable exception: %s', $error->getMessage()));
                    }
                    return \false;
                }
            }
            $this->save($resultCache->getLastFullAnalysisTime(), $errorsByFile, $collectedDataByFile, $dependencies, $exportedNodes, $meta);
            if ($output->isDebug()) {
                $output->writeLineFormatted('Result cache is saved.');
            }
            return \true;
        };
        if ($resultCache->isFullAnalysis()) {
            $saved = \false;
            if ($save !== \false) {
                $saved = $doSave($freshErrorsByFile, $freshCollectedDataByFile, $analyserResult->getDependencies(), $analyserResult->getExportedNodes());
            } else {
                if ($output->isDebug()) {
                    $output->writeLineFormatted('Result cache was not saved because it was not requested.');
                }
            }
            return new \PHPStan\Analyser\ResultCache\ResultCacheProcessResult($analyserResult, $saved);
        }
        $errorsByFile = $this->mergeErrors($resultCache, $freshErrorsByFile);
        $collectedDataByFile = $this->mergeCollectedData($resultCache, $freshCollectedDataByFile);
        $dependencies = $this->mergeDependencies($resultCache, $analyserResult->getDependencies());
        $exportedNodes = $this->mergeExportedNodes($resultCache, $analyserResult->getExportedNodes());
        $saved = \false;
        if ($save !== \false) {
            $saved = $doSave($errorsByFile, $collectedDataByFile, $dependencies, $exportedNodes);
        }
        $flatErrors = [];
        foreach ($errorsByFile as $fileErrors) {
            foreach ($fileErrors as $fileError) {
                $flatErrors[] = $fileError;
            }
        }
        $flatCollectedData = [];
        foreach ($collectedDataByFile as $fileCollectedData) {
            foreach ($fileCollectedData as $collectedData) {
                $flatCollectedData[] = $collectedData;
            }
        }
        return new \PHPStan\Analyser\ResultCache\ResultCacheProcessResult(new AnalyserResult($flatErrors, $internalErrors, $flatCollectedData, $dependencies, $exportedNodes, $analyserResult->hasReachedInternalErrorsCountLimit(), $analyserResult->getPeakMemoryUsageBytes()), $saved);
    }
    /**
     * @param array<string, array<Error>> $freshErrorsByFile
     * @return array<string, array<Error>>
     */
    private function mergeErrors(\PHPStan\Analyser\ResultCache\ResultCache $resultCache, array $freshErrorsByFile) : array
    {
        $errorsByFile = $resultCache->getErrors();
        foreach ($resultCache->getFilesToAnalyse() as $file) {
            if (!array_key_exists($file, $freshErrorsByFile)) {
                unset($errorsByFile[$file]);
                continue;
            }
            $errorsByFile[$file] = $freshErrorsByFile[$file];
        }
        return $errorsByFile;
    }
    /**
     * @param array<string, array<CollectedData>> $freshCollectedDataByFile
     * @return array<string, array<CollectedData>>
     */
    private function mergeCollectedData(\PHPStan\Analyser\ResultCache\ResultCache $resultCache, array $freshCollectedDataByFile) : array
    {
        $collectedDataByFile = $resultCache->getCollectedData();
        foreach ($resultCache->getFilesToAnalyse() as $file) {
            if (!array_key_exists($file, $freshCollectedDataByFile)) {
                unset($collectedDataByFile[$file]);
                continue;
            }
            $collectedDataByFile[$file] = $freshCollectedDataByFile[$file];
        }
        return $collectedDataByFile;
    }
    /**
     * @param array<string, array<string>>|null $freshDependencies
     * @return array<string, array<string>>|null
     */
    private function mergeDependencies(\PHPStan\Analyser\ResultCache\ResultCache $resultCache, ?array $freshDependencies) : ?array
    {
        if ($freshDependencies === null) {
            return null;
        }
        $cachedDependencies = [];
        $resultCacheDependencies = $resultCache->getDependencies();
        $filesNoOneIsDependingOn = array_fill_keys(array_keys($resultCacheDependencies), \true);
        foreach ($resultCacheDependencies as $file => $filesDependingOnFile) {
            foreach ($filesDependingOnFile as $fileDependingOnFile) {
                $cachedDependencies[$fileDependingOnFile][] = $file;
                unset($filesNoOneIsDependingOn[$fileDependingOnFile]);
            }
        }
        foreach (array_keys($filesNoOneIsDependingOn) as $file) {
            if (array_key_exists($file, $cachedDependencies)) {
                throw new ShouldNotHappenException();
            }
            $cachedDependencies[$file] = [];
        }
        $newDependencies = $cachedDependencies;
        foreach ($resultCache->getFilesToAnalyse() as $file) {
            if (!array_key_exists($file, $freshDependencies)) {
                unset($newDependencies[$file]);
                continue;
            }
            $newDependencies[$file] = $freshDependencies[$file];
        }
        return $newDependencies;
    }
    /**
     * @param array<string, array<RootExportedNode>> $freshExportedNodes
     * @return array<string, array<RootExportedNode>>
     */
    private function mergeExportedNodes(\PHPStan\Analyser\ResultCache\ResultCache $resultCache, array $freshExportedNodes) : array
    {
        $newExportedNodes = $resultCache->getExportedNodes();
        foreach ($resultCache->getFilesToAnalyse() as $file) {
            if (!array_key_exists($file, $freshExportedNodes)) {
                unset($newExportedNodes[$file]);
                continue;
            }
            $newExportedNodes[$file] = $freshExportedNodes[$file];
        }
        return $newExportedNodes;
    }
    /**
     * @param array<string, array<Error>> $errors
     * @param array<string, array<CollectedData>> $collectedData
     * @param array<string, array<string>> $dependencies
     * @param array<string, array<RootExportedNode>> $exportedNodes
     * @param mixed[] $meta
     */
    private function save(int $lastFullAnalysisTime, array $errors, array $collectedData, array $dependencies, array $exportedNodes, array $meta) : void
    {
        $invertedDependencies = [];
        $filesNoOneIsDependingOn = array_fill_keys(array_keys($dependencies), \true);
        foreach ($dependencies as $file => $fileDependencies) {
            foreach ($fileDependencies as $fileDep) {
                if (!array_key_exists($fileDep, $invertedDependencies)) {
                    $invertedDependencies[$fileDep] = ['fileHash' => $this->getFileHash($fileDep), 'dependentFiles' => []];
                    unset($filesNoOneIsDependingOn[$fileDep]);
                }
                $invertedDependencies[$fileDep]['dependentFiles'][] = $file;
            }
        }
        foreach (array_keys($filesNoOneIsDependingOn) as $file) {
            if (array_key_exists($file, $invertedDependencies)) {
                throw new ShouldNotHappenException();
            }
            if (!is_file($file)) {
                continue;
            }
            $invertedDependencies[$file] = ['fileHash' => $this->getFileHash($file), 'dependentFiles' => []];
        }
        ksort($errors);
        ksort($collectedData);
        ksort($invertedDependencies);
        foreach ($invertedDependencies as $file => $fileData) {
            $dependentFiles = $fileData['dependentFiles'];
            sort($dependentFiles);
            $invertedDependencies[$file]['dependentFiles'] = $dependentFiles;
        }
        $template = "<?php declare(strict_types = 1);\n\nreturn [\n\t'lastFullAnalysisTime' => %s,\n\t'meta' => %s,\n\t'projectExtensionFiles' => %s,\n\t'errorsCallback' => static function (): array { return %s; },\n\t'collectedDataCallback' => static function (): array { return %s; },\n\t'dependencies' => %s,\n\t'exportedNodesCallback' => static function (): array { return %s; },\n];\n";
        ksort($exportedNodes);
        $file = $this->cacheFilePath;
        $projectConfigArray = $meta['projectConfig'];
        if ($projectConfigArray !== null) {
            $meta['projectConfig'] = Neon::encode($projectConfigArray);
        }
        FileWriter::write($file, sprintf($template, var_export($lastFullAnalysisTime, \true), var_export($meta, \true), var_export($this->getProjectExtensionFiles($projectConfigArray, $dependencies), \true), var_export($errors, \true), var_export($collectedData, \true), var_export($invertedDependencies, \true), var_export($exportedNodes, \true)));
    }
    /**
     * @param mixed[]|null $projectConfig
     * @param array<string, mixed> $dependencies
     * @return array<string, string>
     */
    private function getProjectExtensionFiles(?array $projectConfig, array $dependencies) : array
    {
        $this->alreadyProcessed = [];
        $projectExtensionFiles = [];
        if ($projectConfig !== null) {
            $services = array_merge($projectConfig['services'] ?? [], $projectConfig['rules'] ?? []);
            foreach ($services as $service) {
                $classes = $this->getClassesFromConfigDefinition($service);
                if (is_array($service)) {
                    foreach (['class', 'factory', 'implement'] as $key) {
                        if (!isset($service[$key])) {
                            continue;
                        }
                        $classes = array_merge($classes, $this->getClassesFromConfigDefinition($service[$key]));
                    }
                }
                foreach (array_unique($classes) as $class) {
                    if (!$this->reflectionProvider->hasClass($class)) {
                        continue;
                    }
                    $classReflection = $this->reflectionProvider->getClass($class);
                    $fileName = $classReflection->getFileName();
                    if ($fileName === null) {
                        continue;
                    }
                    $allServiceFiles = $this->getAllDependencies($fileName, $dependencies);
                    foreach ($allServiceFiles as $serviceFile) {
                        if (array_key_exists($serviceFile, $projectExtensionFiles)) {
                            continue;
                        }
                        $projectExtensionFiles[$serviceFile] = $this->getFileHash($serviceFile);
                    }
                }
            }
        }
        return $projectExtensionFiles;
    }
    /**
     * @param mixed $definition
     * @return string[]
     */
    private function getClassesFromConfigDefinition($definition) : array
    {
        if (is_string($definition)) {
            return [$definition];
        }
        if ($definition instanceof Statement) {
            $entity = $definition->entity;
            if (is_string($entity)) {
                return [$entity];
            } elseif (is_array($entity) && isset($entity[0]) && is_string($entity[0])) {
                return [$entity[0]];
            }
        }
        return [];
    }
    /**
     * @param array<string, array<int, string>> $dependencies
     * @return array<int, string>
     */
    private function getAllDependencies(string $fileName, array $dependencies) : array
    {
        if (!array_key_exists($fileName, $dependencies)) {
            return [];
        }
        if (array_key_exists($fileName, $this->alreadyProcessed)) {
            return [];
        }
        $this->alreadyProcessed[$fileName] = \true;
        $files = [$fileName];
        if ($this->checkDependenciesOfProjectExtensionFiles) {
            foreach ($dependencies[$fileName] as $fileDep) {
                foreach ($this->getAllDependencies($fileDep, $dependencies) as $fileDep2) {
                    $files[] = $fileDep2;
                }
            }
        }
        return $files;
    }
    /**
     * @param string[] $allAnalysedFiles
     * @param mixed[]|null $projectConfigArray
     * @return mixed[]
     */
    private function getMeta(array $allAnalysedFiles, ?array $projectConfigArray) : array
    {
        $extensions = array_values(array_filter(get_loaded_extensions(), static function (string $extension) : bool {
            return $extension !== 'xdebug';
        }));
        sort($extensions);
        if ($projectConfigArray !== null) {
            unset($projectConfigArray['parameters']['editorUrl']);
            unset($projectConfigArray['parameters']['editorUrlTitle']);
            unset($projectConfigArray['parameters']['errorFormat']);
            unset($projectConfigArray['parameters']['ignoreErrors']);
            unset($projectConfigArray['parameters']['tipsOfTheDay']);
            unset($projectConfigArray['parameters']['parallel']);
            unset($projectConfigArray['parameters']['internalErrorsCountLimit']);
            unset($projectConfigArray['parameters']['cache']);
            unset($projectConfigArray['parameters']['memoryLimitFile']);
            unset($projectConfigArray['parameters']['pro']);
            unset($projectConfigArray['parametersSchema']);
        }
        return ['cacheVersion' => self::CACHE_VERSION, 'phpstanVersion' => ComposerHelper::getPhpStanVersion(), 'phpVersion' => PHP_VERSION_ID, 'projectConfig' => $projectConfigArray, 'analysedPaths' => $this->analysedPaths, 'scannedFiles' => $this->getScannedFiles($allAnalysedFiles), 'composerLocks' => $this->getComposerLocks(), 'composerInstalled' => $this->getComposerInstalled(), 'executedFilesHashes' => $this->getExecutedFileHashes(), 'phpExtensions' => $extensions, 'stubFiles' => $this->getStubFiles(), 'level' => $this->usedLevel];
    }
    private function getFileHash(string $path) : string
    {
        if (array_key_exists($path, $this->fileHashes)) {
            return $this->fileHashes[$path];
        }
        $contents = FileReader::read($path);
        $contents = str_replace("\r\n", "\n", $contents);
        $hash = sha1($contents);
        $this->fileHashes[$path] = $hash;
        return $hash;
    }
    /**
     * @param string[] $allAnalysedFiles
     * @return array<string, string>
     */
    private function getScannedFiles(array $allAnalysedFiles) : array
    {
        $scannedFiles = $this->scanFiles;
        foreach ($this->scanFileFinder->findFiles($this->scanDirectories)->getFiles() as $file) {
            $scannedFiles[] = $file;
        }
        $scannedFiles = array_unique($scannedFiles);
        $hashes = [];
        foreach (array_diff($scannedFiles, $allAnalysedFiles) as $file) {
            $hashes[$file] = $this->getFileHash($file);
        }
        ksort($hashes);
        return $hashes;
    }
    /**
     * @return array<string, string>
     */
    private function getExecutedFileHashes() : array
    {
        $hashes = [];
        if ($this->cliAutoloadFile !== null) {
            $hashes[$this->cliAutoloadFile] = $this->getFileHash($this->cliAutoloadFile);
        }
        foreach ($this->bootstrapFiles as $bootstrapFile) {
            $hashes[$bootstrapFile] = $this->getFileHash($bootstrapFile);
        }
        ksort($hashes);
        return $hashes;
    }
    /**
     * @return array<string, string>
     */
    private function getComposerLocks() : array
    {
        $locks = [];
        foreach ($this->composerAutoloaderProjectPaths as $autoloadPath) {
            $lockPath = $autoloadPath . '/composer.lock';
            if (!is_file($lockPath)) {
                continue;
            }
            $locks[$lockPath] = $this->getFileHash($lockPath);
        }
        return $locks;
    }
    /**
     * @return array<string, string>
     */
    private function getComposerInstalled() : array
    {
        $data = [];
        foreach ($this->composerAutoloaderProjectPaths as $autoloadPath) {
            $composer = ComposerHelper::getComposerConfig($autoloadPath);
            if ($composer === null) {
                continue;
            }
            $filePath = ComposerHelper::getVendorDirFromComposerConfig($autoloadPath, $composer) . '/composer/installed.php';
            if (!is_file($filePath)) {
                continue;
            }
            $installed = (require $filePath);
            $rootName = $installed['root']['name'];
            unset($installed['root']);
            unset($installed['versions'][$rootName]);
            $data[$filePath] = $installed;
        }
        return $data;
    }
    /**
     * @return array<string, string>
     */
    private function getStubFiles() : array
    {
        $stubFiles = [];
        foreach ($this->stubFilesProvider->getProjectStubFiles() as $stubFile) {
            $stubFiles[$stubFile] = $this->getFileHash($stubFile);
        }
        ksort($stubFiles);
        return $stubFiles;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PHPStan\Collectors\CollectedData;
use PHPStan\Dependency\RootExportedNode;
use function usort;
class AnalyserResult
{
    /** @var list<Error> */
    private $unorderedErrors;
    /**
     * @var list<Error>
     */
    private $errors;
    /**
     * @var list<string>
     */
    private $internalErrors;
    /**
     * @var list<CollectedData>
     */
    private $collectedData;
    /**
     * @var array<string, array<string>>|null
     */
    private $dependencies;
    /**
     * @var array<string, array<RootExportedNode>>
     */
    private $exportedNodes;
    /**
     * @var bool
     */
    private $reachedInternalErrorsCountLimit;
    /**
     * @var int
     */
    private $peakMemoryUsageBytes;
    /**
     * @param list<Error> $errors
     * @param list<CollectedData> $collectedData
     * @param list<string> $internalErrors
     * @param array<string, array<string>>|null $dependencies
     * @param array<string, array<RootExportedNode>> $exportedNodes
     */
    public function __construct(array $errors, array $internalErrors, array $collectedData, ?array $dependencies, array $exportedNodes, bool $reachedInternalErrorsCountLimit, int $peakMemoryUsageBytes)
    {
        $this->errors = $errors;
        $this->internalErrors = $internalErrors;
        $this->collectedData = $collectedData;
        $this->dependencies = $dependencies;
        $this->exportedNodes = $exportedNodes;
        $this->reachedInternalErrorsCountLimit = $reachedInternalErrorsCountLimit;
        $this->peakMemoryUsageBytes = $peakMemoryUsageBytes;
        $this->unorderedErrors = $errors;
        usort($this->errors, static function (\PHPStan\Analyser\Error $a, \PHPStan\Analyser\Error $b) : int {
            return [$a->getFile(), $a->getLine(), $a->getMessage()] <=> [$b->getFile(), $b->getLine(), $b->getMessage()];
        });
    }
    /**
     * @return list<Error>
     */
    public function getUnorderedErrors() : array
    {
        return $this->unorderedErrors;
    }
    /**
     * @return list<Error>
     */
    public function getErrors() : array
    {
        return $this->errors;
    }
    /**
     * @return list<string>
     */
    public function getInternalErrors() : array
    {
        return $this->internalErrors;
    }
    /**
     * @return list<CollectedData>
     */
    public function getCollectedData() : array
    {
        return $this->collectedData;
    }
    /**
     * @return array<string, array<string>>|null
     */
    public function getDependencies() : ?array
    {
        return $this->dependencies;
    }
    /**
     * @return array<string, array<RootExportedNode>>
     */
    public function getExportedNodes() : array
    {
        return $this->exportedNodes;
    }
    public function hasReachedInternalErrorsCountLimit() : bool
    {
        return $this->reachedInternalErrorsCountLimit;
    }
    public function getPeakMemoryUsageBytes() : int
    {
        return $this->peakMemoryUsageBytes;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

class EnsuredNonNullabilityResult
{
    /**
     * @var \PHPStan\Analyser\MutatingScope
     */
    private $scope;
    /**
     * @var EnsuredNonNullabilityResultExpression[]
     */
    private $specifiedExpressions;
    /**
     * @param EnsuredNonNullabilityResultExpression[] $specifiedExpressions
     */
    public function __construct(\PHPStan\Analyser\MutatingScope $scope, array $specifiedExpressions)
    {
        $this->scope = $scope;
        $this->specifiedExpressions = $specifiedExpressions;
    }
    public function getScope() : \PHPStan\Analyser\MutatingScope
    {
        return $this->scope;
    }
    /**
     * @return EnsuredNonNullabilityResultExpression[]
     */
    public function getSpecifiedExpressions() : array
    {
        return $this->specifiedExpressions;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PHPStan\DependencyInjection\Container;
use PHPStan\DependencyInjection\Type\DynamicReturnTypeExtensionRegistryProvider;
use PHPStan\Node\Printer\ExprPrinter;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\InitializerExprTypeResolver;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Properties\PropertyReflectionFinder;
use PHPStan\ShouldNotHappenException;
use function is_a;
class LazyInternalScopeFactory implements \PHPStan\Analyser\InternalScopeFactory
{
    /**
     * @var bool
     */
    private $explicitMixedInUnknownGenericNew;
    /**
     * @var bool
     */
    private $explicitMixedForGlobalVariables;
    /**
     * @var class-string
     */
    private $scopeClass;
    /**
     * @var \PHPStan\DependencyInjection\Container
     */
    private $container;
    /**
     * @param class-string $scopeClass
     */
    public function __construct(string $scopeClass, Container $container)
    {
        $this->scopeClass = $scopeClass;
        $this->container = $container;
        $this->explicitMixedInUnknownGenericNew = $this->container->getParameter('featureToggles')['explicitMixedInUnknownGenericNew'];
        $this->explicitMixedForGlobalVariables = $this->container->getParameter('featureToggles')['explicitMixedForGlobalVariables'];
    }
    /**
     * @param array<string, ExpressionTypeHolder> $expressionTypes
     * @param array<string, ExpressionTypeHolder> $nativeExpressionTypes
     * @param array<string, ConditionalExpressionHolder[]> $conditionalExpressions
     * @param array<string, true> $currentlyAssignedExpressions
     * @param array<string, true> $currentlyAllowedUndefinedExpressions
     * @param array<(FunctionReflection|MethodReflection)> $inFunctionCallsStack
     *
     * @param \PHPStan\Reflection\FunctionReflection|\PHPStan\Reflection\MethodReflection|null $function
     */
    public function create(\PHPStan\Analyser\ScopeContext $context, bool $declareStrictTypes = \false, $function = null, ?string $namespace = null, array $expressionTypes = [], array $nativeExpressionTypes = [], array $conditionalExpressions = [], array $inClosureBindScopeClasses = [], ?ParametersAcceptor $anonymousFunctionReflection = null, bool $inFirstLevelStatement = \true, array $currentlyAssignedExpressions = [], array $currentlyAllowedUndefinedExpressions = [], array $inFunctionCallsStack = [], bool $afterExtractCall = \false, ?\PHPStan\Analyser\Scope $parentScope = null, bool $nativeTypesPromoted = \false) : \PHPStan\Analyser\MutatingScope
    {
        $scopeClass = $this->scopeClass;
        if (!is_a($scopeClass, \PHPStan\Analyser\MutatingScope::class, \true)) {
            throw new ShouldNotHappenException();
        }
        return new $scopeClass($this, $this->container->getByType(ReflectionProvider::class), $this->container->getByType(InitializerExprTypeResolver::class), $this->container->getByType(DynamicReturnTypeExtensionRegistryProvider::class)->getRegistry(), $this->container->getByType(ExprPrinter::class), $this->container->getByType(\PHPStan\Analyser\TypeSpecifier::class), $this->container->getByType(PropertyReflectionFinder::class), $this->container->getService('currentPhpVersionSimpleParser'), $this->container->getByType(\PHPStan\Analyser\NodeScopeResolver::class), $this->container->getByType(\PHPStan\Analyser\ConstantResolver::class), $context, $this->container->getByType(PhpVersion::class), $declareStrictTypes, $function, $namespace, $expressionTypes, $nativeExpressionTypes, $conditionalExpressions, $inClosureBindScopeClasses, $anonymousFunctionReflection, $inFirstLevelStatement, $currentlyAssignedExpressions, $currentlyAllowedUndefinedExpressions, $inFunctionCallsStack, $afterExtractCall, $parentScope, $nativeTypesPromoted, $this->explicitMixedInUnknownGenericNew, $this->explicitMixedForGlobalVariables);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PHPStan\ShouldNotHappenException;
/** @api */
class TypeSpecifierContext
{
    public const CONTEXT_TRUE = 0b1;
    public const CONTEXT_TRUTHY_BUT_NOT_TRUE = 0b10;
    public const CONTEXT_TRUTHY = self::CONTEXT_TRUE | self::CONTEXT_TRUTHY_BUT_NOT_TRUE;
    public const CONTEXT_FALSE = 0b100;
    public const CONTEXT_FALSEY_BUT_NOT_FALSE = 0b1000;
    public const CONTEXT_FALSEY = self::CONTEXT_FALSE | self::CONTEXT_FALSEY_BUT_NOT_FALSE;
    public const CONTEXT_BITMASK = 0b1111;
    /** @var self[] */
    private static $registry;
    /**
     * @var int|null
     */
    private $value;
    private function __construct(?int $value)
    {
        $this->value = $value;
    }
    private static function create(?int $value) : self
    {
        self::$registry[$value] = self::$registry[$value] ?? new self($value);
        return self::$registry[$value];
    }
    public static function createTrue() : self
    {
        return self::create(self::CONTEXT_TRUE);
    }
    public static function createTruthy() : self
    {
        return self::create(self::CONTEXT_TRUTHY);
    }
    public static function createFalse() : self
    {
        return self::create(self::CONTEXT_FALSE);
    }
    public static function createFalsey() : self
    {
        return self::create(self::CONTEXT_FALSEY);
    }
    public static function createNull() : self
    {
        return self::create(null);
    }
    public function negate() : self
    {
        if ($this->value === null) {
            throw new ShouldNotHappenException();
        }
        return self::create(~$this->value & self::CONTEXT_BITMASK);
    }
    public function true() : bool
    {
        return $this->value !== null && (bool) ($this->value & self::CONTEXT_TRUE);
    }
    public function truthy() : bool
    {
        return $this->value !== null && (bool) ($this->value & self::CONTEXT_TRUTHY);
    }
    public function false() : bool
    {
        return $this->value !== null && (bool) ($this->value & self::CONTEXT_FALSE);
    }
    public function falsey() : bool
    {
        return $this->value !== null && (bool) ($this->value & self::CONTEXT_FALSEY);
    }
    public function null() : bool
    {
        return $this->value === null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PhpParser\Node;
use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
use function is_string;
class RuleErrorTransformer
{
    /**
     * @param class-string<Node> $nodeType
     * @param string|\PHPStan\Rules\RuleError $ruleError
     */
    public function transform($ruleError, \PHPStan\Analyser\Scope $scope, string $nodeType, int $nodeLine) : \PHPStan\Analyser\Error
    {
        $line = $nodeLine;
        $canBeIgnored = \true;
        $fileName = $scope->getFileDescription();
        $filePath = $scope->getFile();
        $traitFilePath = null;
        $tip = null;
        $identifier = null;
        $metadata = [];
        if ($scope->isInTrait()) {
            $traitReflection = $scope->getTraitReflection();
            if ($traitReflection->getFileName() !== null) {
                $traitFilePath = $traitReflection->getFileName();
            }
        }
        if (is_string($ruleError)) {
            $message = $ruleError;
        } else {
            $message = $ruleError->getMessage();
            if ($ruleError instanceof LineRuleError && $ruleError->getLine() !== -1) {
                $line = $ruleError->getLine();
            }
            if ($ruleError instanceof FileRuleError && $ruleError->getFile() !== '') {
                $fileName = $ruleError->getFile();
                $filePath = $ruleError->getFile();
                $traitFilePath = null;
            }
            if ($ruleError instanceof TipRuleError) {
                $tip = $ruleError->getTip();
            }
            if ($ruleError instanceof IdentifierRuleError) {
                $identifier = $ruleError->getIdentifier();
            }
            if ($ruleError instanceof MetadataRuleError) {
                $metadata = $ruleError->getMetadata();
            }
            if ($ruleError instanceof NonIgnorableRuleError) {
                $canBeIgnored = \false;
            }
        }
        return new \PHPStan\Analyser\Error($message, $fileName, $line, $canBeIgnored, $filePath, $traitFilePath, $tip, $nodeLine, $nodeType, $identifier, $metadata);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use ArrayAccess;
use Closure;
use DivisionByZeroError;
use PhpParser\Comment\Doc;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\AttributeGroup;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Expr\ArrayDimFetch;
use PhpParser\Node\Expr\ArrayItem;
use PhpParser\Node\Expr\Assign;
use PhpParser\Node\Expr\AssignRef;
use PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\BinaryOp\BooleanAnd;
use PhpParser\Node\Expr\BinaryOp\BooleanOr;
use PhpParser\Node\Expr\BinaryOp\Coalesce;
use PhpParser\Node\Expr\BooleanNot;
use PhpParser\Node\Expr\Cast;
use PhpParser\Node\Expr\ConstFetch;
use PhpParser\Node\Expr\ErrorSuppress;
use PhpParser\Node\Expr\Exit_;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\Instanceof_;
use PhpParser\Node\Expr\List_;
use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Expr\New_;
use PhpParser\Node\Expr\PropertyFetch;
use PhpParser\Node\Expr\StaticCall;
use PhpParser\Node\Expr\StaticPropertyFetch;
use PhpParser\Node\Expr\Ternary;
use PhpParser\Node\Expr\Variable;
use PhpParser\Node\Name;
use PhpParser\Node\Stmt\Break_;
use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\Continue_;
use PhpParser\Node\Stmt\Do_;
use PhpParser\Node\Stmt\Echo_;
use PhpParser\Node\Stmt\For_;
use PhpParser\Node\Stmt\Foreach_;
use PhpParser\Node\Stmt\If_;
use PhpParser\Node\Stmt\Return_;
use PhpParser\Node\Stmt\Static_;
use PhpParser\Node\Stmt\StaticVar;
use PhpParser\Node\Stmt\Switch_;
use PhpParser\Node\Stmt\Throw_;
use PhpParser\Node\Stmt\TryCatch;
use PhpParser\Node\Stmt\Unset_;
use PhpParser\Node\Stmt\While_;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass;
use PHPStan\BetterReflection\Reflection\ReflectionEnum;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Ast\Strategy\NodeToReflection;
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
use PHPStan\DependencyInjection\Reflection\ClassReflectionExtensionRegistryProvider;
use PHPStan\DependencyInjection\Type\DynamicThrowTypeExtensionProvider;
use PHPStan\File\FileHelper;
use PHPStan\File\FileReader;
use PHPStan\Node\BooleanAndNode;
use PHPStan\Node\BooleanOrNode;
use PHPStan\Node\BreaklessWhileLoopNode;
use PHPStan\Node\CatchWithUnthrownExceptionNode;
use PHPStan\Node\ClassConstantsNode;
use PHPStan\Node\ClassMethodsNode;
use PHPStan\Node\ClassPropertiesNode;
use PHPStan\Node\ClassPropertyNode;
use PHPStan\Node\ClassStatementsGatherer;
use PHPStan\Node\ClosureReturnStatementsNode;
use PHPStan\Node\DoWhileLoopConditionNode;
use PHPStan\Node\ExecutionEndNode;
use PHPStan\Node\Expr\GetIterableKeyTypeExpr;
use PHPStan\Node\Expr\GetIterableValueTypeExpr;
use PHPStan\Node\Expr\GetOffsetValueTypeExpr;
use PHPStan\Node\Expr\OriginalPropertyTypeExpr;
use PHPStan\Node\Expr\SetOffsetValueTypeExpr;
use PHPStan\Node\FinallyExitPointsNode;
use PHPStan\Node\FunctionCallableNode;
use PHPStan\Node\FunctionReturnStatementsNode;
use PHPStan\Node\InArrowFunctionNode;
use PHPStan\Node\InClassMethodNode;
use PHPStan\Node\InClassNode;
use PHPStan\Node\InClosureNode;
use PHPStan\Node\InForeachNode;
use PHPStan\Node\InFunctionNode;
use PHPStan\Node\InstantiationCallableNode;
use PHPStan\Node\LiteralArrayItem;
use PHPStan\Node\LiteralArrayNode;
use PHPStan\Node\MatchExpressionArm;
use PHPStan\Node\MatchExpressionArmBody;
use PHPStan\Node\MatchExpressionArmCondition;
use PHPStan\Node\MatchExpressionNode;
use PHPStan\Node\MethodCallableNode;
use PHPStan\Node\MethodReturnStatementsNode;
use PHPStan\Node\PropertyAssignNode;
use PHPStan\Node\ReturnStatement;
use PHPStan\Node\StaticMethodCallableNode;
use PHPStan\Node\UnreachableStatementNode;
use PHPStan\Node\VarTagChangedExpressionTypeNode;
use PHPStan\Parser\ArrowFunctionArgVisitor;
use PHPStan\Parser\ClosureArgVisitor;
use PHPStan\Parser\Parser;
use PHPStan\Php\PhpVersion;
use PHPStan\PhpDoc\PhpDocInheritanceResolver;
use PHPStan\PhpDoc\ResolvedPhpDocBlock;
use PHPStan\PhpDoc\StubPhpDocProvider;
use PHPStan\PhpDoc\Tag\VarTag;
use PHPStan\Reflection\Assertions;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\InitializerExprTypeResolver;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\Native\NativeMethodReflection;
use PHPStan\Reflection\Native\NativeParameterReflection;
use PHPStan\Reflection\ParameterReflectionWithPhpDocs;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Reflection\Php\PhpFunctionFromParserNodeReflection;
use PHPStan\Reflection\Php\PhpMethodFromParserNodeReflection;
use PHPStan\Reflection\Php\PhpMethodReflection;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Properties\ReadWritePropertiesExtensionProvider;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\ClosureType;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\FileTypeMapper;
use PHPStan\Type\GeneralizePrecision;
use PHPStan\Type\Generic\TemplateTypeHelper;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\IntegerType;
use PHPStan\Type\MixedType;
use PHPStan\Type\NeverType;
use PHPStan\Type\NullType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\StaticType;
use PHPStan\Type\StaticTypeFactory;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypeTraverser;
use PHPStan\Type\UnionType;
use Throwable;
use Traversable;
use TypeError;
use UnhandledMatchError;
use function array_fill_keys;
use function array_filter;
use function array_key_exists;
use function array_keys;
use function array_map;
use function array_merge;
use function array_pop;
use function array_reverse;
use function array_slice;
use function base64_decode;
use function count;
use function in_array;
use function is_array;
use function is_int;
use function is_string;
use function sprintf;
use function str_starts_with;
use function strtolower;
use function trim;
use const PHP_VERSION_ID;
class NodeScopeResolver
{
    private const LOOP_SCOPE_ITERATIONS = 3;
    private const GENERALIZE_AFTER_ITERATION = 1;
    /** @var bool[] filePath(string) => bool(true) */
    private $analysedFiles = [];
    /** @var array<string, true> */
    private $earlyTerminatingMethodNames;
    /**
     * @readonly
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @readonly
     * @var \PHPStan\Reflection\InitializerExprTypeResolver
     */
    private $initializerExprTypeResolver;
    /**
     * @readonly
     * @var \PHPStan\BetterReflection\Reflector\Reflector
     */
    private $reflector;
    /**
     * @readonly
     * @var \PHPStan\DependencyInjection\Reflection\ClassReflectionExtensionRegistryProvider
     */
    private $classReflectionExtensionRegistryProvider;
    /**
     * @readonly
     * @var \PHPStan\Parser\Parser
     */
    private $parser;
    /**
     * @readonly
     * @var \PHPStan\Type\FileTypeMapper
     */
    private $fileTypeMapper;
    /**
     * @readonly
     * @var \PHPStan\PhpDoc\StubPhpDocProvider
     */
    private $stubPhpDocProvider;
    /**
     * @readonly
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    /**
     * @readonly
     * @var \PHPStan\PhpDoc\PhpDocInheritanceResolver
     */
    private $phpDocInheritanceResolver;
    /**
     * @readonly
     * @var \PHPStan\File\FileHelper
     */
    private $fileHelper;
    /**
     * @readonly
     * @var \PHPStan\Analyser\TypeSpecifier
     */
    private $typeSpecifier;
    /**
     * @readonly
     * @var \PHPStan\DependencyInjection\Type\DynamicThrowTypeExtensionProvider
     */
    private $dynamicThrowTypeExtensionProvider;
    /**
     * @readonly
     * @var \PHPStan\Rules\Properties\ReadWritePropertiesExtensionProvider
     */
    private $readWritePropertiesExtensionProvider;
    /**
     * @readonly
     * @var bool
     */
    private $polluteScopeWithLoopInitialAssignments;
    /**
     * @readonly
     * @var bool
     */
    private $polluteScopeWithAlwaysIterableForeach;
    /**
     * @var string[][]
     * @readonly
     */
    private $earlyTerminatingMethodCalls;
    /**
     * @var array<int, string>
     * @readonly
     */
    private $earlyTerminatingFunctionCalls;
    /**
     * @readonly
     * @var bool
     */
    private $implicitThrows;
    /**
     * @readonly
     * @var bool
     */
    private $treatPhpDocTypesAsCertain;
    /**
     * @readonly
     * @var bool
     */
    private $detectDeadTypeInMultiCatch;
    /**
     * @param string[][] $earlyTerminatingMethodCalls className(string) => methods(string[])
     * @param array<int, string> $earlyTerminatingFunctionCalls
     */
    public function __construct(ReflectionProvider $reflectionProvider, InitializerExprTypeResolver $initializerExprTypeResolver, Reflector $reflector, ClassReflectionExtensionRegistryProvider $classReflectionExtensionRegistryProvider, Parser $parser, FileTypeMapper $fileTypeMapper, StubPhpDocProvider $stubPhpDocProvider, PhpVersion $phpVersion, PhpDocInheritanceResolver $phpDocInheritanceResolver, FileHelper $fileHelper, \PHPStan\Analyser\TypeSpecifier $typeSpecifier, DynamicThrowTypeExtensionProvider $dynamicThrowTypeExtensionProvider, ReadWritePropertiesExtensionProvider $readWritePropertiesExtensionProvider, bool $polluteScopeWithLoopInitialAssignments, bool $polluteScopeWithAlwaysIterableForeach, array $earlyTerminatingMethodCalls, array $earlyTerminatingFunctionCalls, bool $implicitThrows, bool $treatPhpDocTypesAsCertain, bool $detectDeadTypeInMultiCatch)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->initializerExprTypeResolver = $initializerExprTypeResolver;
        $this->reflector = $reflector;
        $this->classReflectionExtensionRegistryProvider = $classReflectionExtensionRegistryProvider;
        $this->parser = $parser;
        $this->fileTypeMapper = $fileTypeMapper;
        $this->stubPhpDocProvider = $stubPhpDocProvider;
        $this->phpVersion = $phpVersion;
        $this->phpDocInheritanceResolver = $phpDocInheritanceResolver;
        $this->fileHelper = $fileHelper;
        $this->typeSpecifier = $typeSpecifier;
        $this->dynamicThrowTypeExtensionProvider = $dynamicThrowTypeExtensionProvider;
        $this->readWritePropertiesExtensionProvider = $readWritePropertiesExtensionProvider;
        $this->polluteScopeWithLoopInitialAssignments = $polluteScopeWithLoopInitialAssignments;
        $this->polluteScopeWithAlwaysIterableForeach = $polluteScopeWithAlwaysIterableForeach;
        $this->earlyTerminatingMethodCalls = $earlyTerminatingMethodCalls;
        $this->earlyTerminatingFunctionCalls = $earlyTerminatingFunctionCalls;
        $this->implicitThrows = $implicitThrows;
        $this->treatPhpDocTypesAsCertain = $treatPhpDocTypesAsCertain;
        $this->detectDeadTypeInMultiCatch = $detectDeadTypeInMultiCatch;
        $earlyTerminatingMethodNames = [];
        foreach ($this->earlyTerminatingMethodCalls as $methodNames) {
            foreach ($methodNames as $methodName) {
                $earlyTerminatingMethodNames[strtolower($methodName)] = \true;
            }
        }
        $this->earlyTerminatingMethodNames = $earlyTerminatingMethodNames;
    }
    /**
     * @api
     * @param string[] $files
     */
    public function setAnalysedFiles(array $files) : void
    {
        $this->analysedFiles = array_fill_keys($files, \true);
    }
    /**
     * @api
     * @param Node[] $nodes
     * @param callable(Node $node, Scope $scope): void $nodeCallback
     */
    public function processNodes(array $nodes, \PHPStan\Analyser\MutatingScope $scope, callable $nodeCallback) : void
    {
        foreach ($nodes as $i => $node) {
            if (!$node instanceof Node\Stmt) {
                continue;
            }
            $statementResult = $this->processStmtNode($node, $scope, $nodeCallback, \PHPStan\Analyser\StatementContext::createTopLevel());
            $scope = $statementResult->getScope();
            if (!$statementResult->isAlwaysTerminating()) {
                continue;
            }
            $nextStmt = $this->getFirstNonNopNode(array_slice($nodes, $i + 1));
            if (!$nextStmt instanceof Node\Stmt) {
                continue;
            }
            $nodeCallback(new UnreachableStatementNode($nextStmt), $scope);
            break;
        }
    }
    /**
     * @api
     * @param Node\Stmt[] $stmts
     * @param callable(Node $node, Scope $scope): void $nodeCallback
     */
    public function processStmtNodes(Node $parentNode, array $stmts, \PHPStan\Analyser\MutatingScope $scope, callable $nodeCallback, ?\PHPStan\Analyser\StatementContext $context = null) : \PHPStan\Analyser\StatementResult
    {
        if ($context === null) {
            $context = \PHPStan\Analyser\StatementContext::createTopLevel();
        }
        $exitPoints = [];
        $throwPoints = [];
        $alreadyTerminated = \false;
        $hasYield = \false;
        $stmtCount = count($stmts);
        $shouldCheckLastStatement = $parentNode instanceof Node\Stmt\Function_ || $parentNode instanceof Node\Stmt\ClassMethod || $parentNode instanceof Expr\Closure;
        foreach ($stmts as $i => $stmt) {
            $isLast = $i === $stmtCount - 1;
            $statementResult = $this->processStmtNode($stmt, $scope, $nodeCallback, $context);
            $scope = $statementResult->getScope();
            $hasYield = $hasYield || $statementResult->hasYield();
            if ($shouldCheckLastStatement && $isLast) {
                /** @var Node\Stmt\Function_|Node\Stmt\ClassMethod|Expr\Closure $parentNode */
                $parentNode = $parentNode;
                $nodeCallback(new ExecutionEndNode($stmt, new \PHPStan\Analyser\StatementResult($scope, $hasYield, $statementResult->isAlwaysTerminating(), $statementResult->getExitPoints(), $statementResult->getThrowPoints()), $parentNode->returnType !== null), $scope);
            }
            $exitPoints = array_merge($exitPoints, $statementResult->getExitPoints());
            $throwPoints = array_merge($throwPoints, $statementResult->getThrowPoints());
            if (!$statementResult->isAlwaysTerminating()) {
                continue;
            }
            $alreadyTerminated = \true;
            $nextStmt = $this->getFirstNonNopNode(array_slice($stmts, $i + 1));
            if ($nextStmt !== null) {
                $nodeCallback(new UnreachableStatementNode($nextStmt), $scope);
            }
            break;
        }
        $statementResult = new \PHPStan\Analyser\StatementResult($scope, $hasYield, $alreadyTerminated, $exitPoints, $throwPoints);
        if ($stmtCount === 0 && $shouldCheckLastStatement) {
            /** @var Node\Stmt\Function_|Node\Stmt\ClassMethod|Expr\Closure $parentNode */
            $parentNode = $parentNode;
            $nodeCallback(new ExecutionEndNode($parentNode, $statementResult, $parentNode->returnType !== null), $scope);
        }
        return $statementResult;
    }
    /**
     * @param callable(Node $node, Scope $scope): void $nodeCallback
     */
    private function processStmtNode(Node\Stmt $stmt, \PHPStan\Analyser\MutatingScope $scope, callable $nodeCallback, \PHPStan\Analyser\StatementContext $context) : \PHPStan\Analyser\StatementResult
    {
        if ($stmt instanceof Throw_ || $stmt instanceof Return_) {
            $scope = $this->processStmtVarAnnotation($scope, $stmt, $stmt->expr, $nodeCallback);
        } elseif (!$stmt instanceof Static_ && !$stmt instanceof Foreach_ && !$stmt instanceof Node\Stmt\Global_ && !$stmt instanceof Node\Stmt\Property && !$stmt instanceof Node\Stmt\PropertyProperty && !$stmt instanceof Node\Stmt\ClassConst && !$stmt instanceof Node\Stmt\Const_) {
            $scope = $this->processStmtVarAnnotation($scope, $stmt, null, $nodeCallback);
        }
        if ($stmt instanceof Node\Stmt\ClassMethod) {
            if (!$scope->isInClass()) {
                throw new ShouldNotHappenException();
            }
            if ($scope->isInTrait() && $scope->getClassReflection()->hasNativeMethod($stmt->name->toString())) {
                $methodReflection = $scope->getClassReflection()->getNativeMethod($stmt->name->toString());
                if ($methodReflection instanceof NativeMethodReflection) {
                    return new \PHPStan\Analyser\StatementResult($scope, \false, \false, [], []);
                }
                if ($methodReflection instanceof PhpMethodReflection) {
                    $declaringTrait = $methodReflection->getDeclaringTrait();
                    if ($declaringTrait === null || $declaringTrait->getName() !== $scope->getTraitReflection()->getName()) {
                        return new \PHPStan\Analyser\StatementResult($scope, \false, \false, [], []);
                    }
                }
            }
        }
        $nodeCallback($stmt, $scope);
        $overridingThrowPoints = $this->getOverridingThrowPoints($stmt, $scope);
        if ($stmt instanceof Node\Stmt\Declare_) {
            $hasYield = \false;
            $throwPoints = [];
            foreach ($stmt->declares as $declare) {
                $nodeCallback($declare, $scope);
                $nodeCallback($declare->value, $scope);
                if ($declare->key->name !== 'strict_types' || !$declare->value instanceof Node\Scalar\LNumber || $declare->value->value !== 1) {
                    continue;
                }
                $scope = $scope->enterDeclareStrictTypes();
            }
        } elseif ($stmt instanceof Node\Stmt\Function_) {
            $hasYield = \false;
            $throwPoints = [];
            $this->processAttributeGroups($stmt->attrGroups, $scope, $nodeCallback);
            [$templateTypeMap, $phpDocParameterTypes, $phpDocReturnType, $phpDocThrowType, $deprecatedDescription, $isDeprecated, $isInternal, $isFinal, $isPure, $acceptsNamedArguments, , $phpDocComment, $asserts, , $phpDocParameterOutTypes] = $this->getPhpDocs($scope, $stmt);
            foreach ($stmt->params as $param) {
                $this->processParamNode($param, $scope, $nodeCallback);
            }
            if ($stmt->returnType !== null) {
                $nodeCallback($stmt->returnType, $scope);
            }
            $functionScope = $scope->enterFunction($stmt, $templateTypeMap, $phpDocParameterTypes, $phpDocReturnType, $phpDocThrowType, $deprecatedDescription, $isDeprecated, $isInternal, $isFinal, $isPure, $acceptsNamedArguments, $asserts, $phpDocComment, $phpDocParameterOutTypes);
            $functionReflection = $functionScope->getFunction();
            if (!$functionReflection instanceof PhpFunctionFromParserNodeReflection) {
                throw new ShouldNotHappenException();
            }
            $nodeCallback(new InFunctionNode($functionReflection, $stmt), $functionScope);
            $gatheredReturnStatements = [];
            $gatheredYieldStatements = [];
            $executionEnds = [];
            $statementResult = $this->processStmtNodes($stmt, $stmt->stmts, $functionScope, static function (Node $node, \PHPStan\Analyser\Scope $scope) use($nodeCallback, $functionScope, &$gatheredReturnStatements, &$gatheredYieldStatements, &$executionEnds) : void {
                $nodeCallback($node, $scope);
                if ($scope->getFunction() !== $functionScope->getFunction()) {
                    return;
                }
                if ($scope->isInAnonymousFunction()) {
                    return;
                }
                if ($node instanceof ExecutionEndNode) {
                    $executionEnds[] = $node;
                    return;
                }
                if ($node instanceof Expr\Yield_ || $node instanceof Expr\YieldFrom) {
                    $gatheredYieldStatements[] = $node;
                }
                if (!$node instanceof Return_) {
                    return;
                }
                $gatheredReturnStatements[] = new ReturnStatement($scope, $node);
            }, \PHPStan\Analyser\StatementContext::createTopLevel());
            $nodeCallback(new FunctionReturnStatementsNode($stmt, $gatheredReturnStatements, $gatheredYieldStatements, $statementResult, $executionEnds), $functionScope);
        } elseif ($stmt instanceof Node\Stmt\ClassMethod) {
            $hasYield = \false;
            $throwPoints = [];
            $this->processAttributeGroups($stmt->attrGroups, $scope, $nodeCallback);
            [$templateTypeMap, $phpDocParameterTypes, $phpDocReturnType, $phpDocThrowType, $deprecatedDescription, $isDeprecated, $isInternal, $isFinal, $isPure, $acceptsNamedArguments, , $phpDocComment, $asserts, $selfOutType, $phpDocParameterOutTypes] = $this->getPhpDocs($scope, $stmt);
            foreach ($stmt->params as $param) {
                $this->processParamNode($param, $scope, $nodeCallback);
            }
            if ($stmt->returnType !== null) {
                $nodeCallback($stmt->returnType, $scope);
            }
            $methodScope = $scope->enterClassMethod($stmt, $templateTypeMap, $phpDocParameterTypes, $phpDocReturnType, $phpDocThrowType, $deprecatedDescription, $isDeprecated, $isInternal, $isFinal, $isPure, $acceptsNamedArguments, $asserts, $selfOutType, $phpDocComment, $phpDocParameterOutTypes);
            if (!$scope->isInClass()) {
                throw new ShouldNotHappenException();
            }
            if ($stmt->name->toLowerString() === '__construct') {
                foreach ($stmt->params as $param) {
                    if ($param->flags === 0) {
                        continue;
                    }
                    if (!$param->var instanceof Variable || !is_string($param->var->name)) {
                        throw new ShouldNotHappenException();
                    }
                    $phpDoc = null;
                    if ($param->getDocComment() !== null) {
                        $phpDoc = $param->getDocComment()->getText();
                    }
                    $nodeCallback(new ClassPropertyNode($param->var->name, $param->flags, $param->type, null, $phpDoc, $phpDocParameterTypes[$param->var->name] ?? null, \true, $param, \false, $scope->isInTrait(), $scope->getClassReflection()->isReadOnly(), \false), $methodScope);
                }
            }
            if ($stmt->getAttribute('virtual', \false) === \false) {
                $methodReflection = $methodScope->getFunction();
                if (!$methodReflection instanceof PhpMethodFromParserNodeReflection) {
                    throw new ShouldNotHappenException();
                }
                $nodeCallback(new InClassMethodNode($scope->getClassReflection(), $methodReflection, $stmt), $methodScope);
            }
            if ($stmt->stmts !== null) {
                $gatheredReturnStatements = [];
                $gatheredYieldStatements = [];
                $executionEnds = [];
                $statementResult = $this->processStmtNodes($stmt, $stmt->stmts, $methodScope, static function (Node $node, \PHPStan\Analyser\Scope $scope) use($nodeCallback, $methodScope, &$gatheredReturnStatements, &$gatheredYieldStatements, &$executionEnds) : void {
                    $nodeCallback($node, $scope);
                    if ($scope->getFunction() !== $methodScope->getFunction()) {
                        return;
                    }
                    if ($scope->isInAnonymousFunction()) {
                        return;
                    }
                    if ($node instanceof ExecutionEndNode) {
                        $executionEnds[] = $node;
                        return;
                    }
                    if ($node instanceof Expr\Yield_ || $node instanceof Expr\YieldFrom) {
                        $gatheredYieldStatements[] = $node;
                    }
                    if (!$node instanceof Return_) {
                        return;
                    }
                    $gatheredReturnStatements[] = new ReturnStatement($scope, $node);
                }, \PHPStan\Analyser\StatementContext::createTopLevel());
                $nodeCallback(new MethodReturnStatementsNode($stmt, $gatheredReturnStatements, $gatheredYieldStatements, $statementResult, $executionEnds), $methodScope);
            }
        } elseif ($stmt instanceof Echo_) {
            $hasYield = \false;
            $throwPoints = [];
            foreach ($stmt->exprs as $echoExpr) {
                $result = $this->processExprNode($echoExpr, $scope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep());
                $throwPoints = array_merge($throwPoints, $result->getThrowPoints());
                $scope = $result->getScope();
                $hasYield = $hasYield || $result->hasYield();
            }
            $throwPoints = $overridingThrowPoints ?? $throwPoints;
        } elseif ($stmt instanceof Return_) {
            if ($stmt->expr !== null) {
                $result = $this->processExprNode($stmt->expr, $scope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep());
                $throwPoints = $result->getThrowPoints();
                $scope = $result->getScope();
                $hasYield = $result->hasYield();
            } else {
                $hasYield = \false;
                $throwPoints = [];
            }
            return new \PHPStan\Analyser\StatementResult($scope, $hasYield, \true, [new \PHPStan\Analyser\StatementExitPoint($stmt, $scope)], $overridingThrowPoints ?? $throwPoints);
        } elseif ($stmt instanceof Continue_ || $stmt instanceof Break_) {
            if ($stmt->num !== null) {
                $result = $this->processExprNode($stmt->num, $scope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep());
                $scope = $result->getScope();
                $hasYield = $result->hasYield();
                $throwPoints = $result->getThrowPoints();
            } else {
                $hasYield = \false;
                $throwPoints = [];
            }
            return new \PHPStan\Analyser\StatementResult($scope, $hasYield, \true, [new \PHPStan\Analyser\StatementExitPoint($stmt, $scope)], $overridingThrowPoints ?? $throwPoints);
        } elseif ($stmt instanceof Node\Stmt\Expression) {
            $earlyTerminationExpr = $this->findEarlyTerminatingExpr($stmt->expr, $scope);
            $result = $this->processExprNode($stmt->expr, $scope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createTopLevel());
            $scope = $result->getScope();
            $scope = $scope->filterBySpecifiedTypes($this->typeSpecifier->specifyTypesInCondition($scope, $stmt->expr, \PHPStan\Analyser\TypeSpecifierContext::createNull()));
            $hasYield = $result->hasYield();
            $throwPoints = $result->getThrowPoints();
            if ($earlyTerminationExpr !== null) {
                return new \PHPStan\Analyser\StatementResult($scope, $hasYield, \true, [new \PHPStan\Analyser\StatementExitPoint($stmt, $scope)], $overridingThrowPoints ?? $throwPoints);
            }
            return new \PHPStan\Analyser\StatementResult($scope, $hasYield, \false, [], $overridingThrowPoints ?? $throwPoints);
        } elseif ($stmt instanceof Node\Stmt\Namespace_) {
            if ($stmt->name !== null) {
                $scope = $scope->enterNamespace($stmt->name->toString());
            }
            $scope = $this->processStmtNodes($stmt, $stmt->stmts, $scope, $nodeCallback, $context)->getScope();
            $hasYield = \false;
            $throwPoints = [];
        } elseif ($stmt instanceof Node\Stmt\Trait_) {
            return new \PHPStan\Analyser\StatementResult($scope, \false, \false, [], []);
        } elseif ($stmt instanceof Node\Stmt\ClassLike) {
            $hasYield = \false;
            $throwPoints = [];
            if (isset($stmt->namespacedName)) {
                $classReflection = $this->getCurrentClassReflection($stmt, $stmt->namespacedName->toString(), $scope);
                $classScope = $scope->enterClass($classReflection);
                $nodeCallback(new InClassNode($stmt, $classReflection), $classScope);
            } elseif ($stmt instanceof Class_) {
                if ($stmt->name === null) {
                    throw new ShouldNotHappenException();
                }
                if ($stmt->getAttribute('anonymousClass', \false) === \false) {
                    $classReflection = $this->reflectionProvider->getClass($stmt->name->toString());
                } else {
                    $classReflection = $this->reflectionProvider->getAnonymousClassReflection($stmt, $scope);
                }
                $classScope = $scope->enterClass($classReflection);
                $nodeCallback(new InClassNode($stmt, $classReflection), $classScope);
            } else {
                throw new ShouldNotHappenException();
            }
            $classStatementsGatherer = new ClassStatementsGatherer($classReflection, $nodeCallback);
            $this->processAttributeGroups($stmt->attrGroups, $classScope, $classStatementsGatherer);
            $this->processStmtNodes($stmt, $stmt->stmts, $classScope, $classStatementsGatherer, $context);
            $nodeCallback(new ClassPropertiesNode($stmt, $this->readWritePropertiesExtensionProvider, $classStatementsGatherer->getProperties(), $classStatementsGatherer->getPropertyUsages(), $classStatementsGatherer->getMethodCalls()), $classScope);
            $nodeCallback(new ClassMethodsNode($stmt, $classStatementsGatherer->getMethods(), $classStatementsGatherer->getMethodCalls()), $classScope);
            $nodeCallback(new ClassConstantsNode($stmt, $classStatementsGatherer->getConstants(), $classStatementsGatherer->getConstantFetches()), $classScope);
            $classReflection->evictPrivateSymbols();
        } elseif ($stmt instanceof Node\Stmt\Property) {
            $hasYield = \false;
            $throwPoints = [];
            $this->processAttributeGroups($stmt->attrGroups, $scope, $nodeCallback);
            foreach ($stmt->props as $prop) {
                $this->processStmtNode($prop, $scope, $nodeCallback, $context);
                [, , , , , , , , , , $isReadOnly, $docComment, , , , $varTags, $isAllowedPrivateMutation] = $this->getPhpDocs($scope, $stmt);
                if (!$scope->isInClass()) {
                    throw new ShouldNotHappenException();
                }
                $propertyName = $prop->name->toString();
                $phpDocType = null;
                if (isset($varTags[0]) && count($varTags) === 1) {
                    $phpDocType = $varTags[0]->getType();
                } elseif (isset($varTags[$propertyName])) {
                    $phpDocType = $varTags[$propertyName]->getType();
                }
                $nodeCallback(new ClassPropertyNode($propertyName, $stmt->flags, $stmt->type, $prop->default, $docComment, $phpDocType, \false, $prop, $isReadOnly, $scope->isInTrait(), $scope->getClassReflection()->isReadOnly(), $isAllowedPrivateMutation), $scope);
            }
            if ($stmt->type !== null) {
                $nodeCallback($stmt->type, $scope);
            }
        } elseif ($stmt instanceof Node\Stmt\PropertyProperty) {
            $hasYield = \false;
            $throwPoints = [];
            if ($stmt->default !== null) {
                $this->processExprNode($stmt->default, $scope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep());
            }
        } elseif ($stmt instanceof Throw_) {
            $result = $this->processExprNode($stmt->expr, $scope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep());
            $throwPoints = $result->getThrowPoints();
            $throwPoints[] = \PHPStan\Analyser\ThrowPoint::createExplicit($result->getScope(), $scope->getType($stmt->expr), $stmt, \false);
            return new \PHPStan\Analyser\StatementResult($result->getScope(), $result->hasYield(), \true, [new \PHPStan\Analyser\StatementExitPoint($stmt, $scope)], $throwPoints);
        } elseif ($stmt instanceof If_) {
            $conditionType = ($this->treatPhpDocTypesAsCertain ? $scope->getType($stmt->cond) : $scope->getNativeType($stmt->cond))->toBoolean();
            $ifAlwaysTrue = $conditionType->isTrue()->yes();
            $condResult = $this->processExprNode($stmt->cond, $scope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep());
            $exitPoints = [];
            $throwPoints = $overridingThrowPoints ?? $condResult->getThrowPoints();
            $finalScope = null;
            $alwaysTerminating = \true;
            $hasYield = $condResult->hasYield();
            $branchScopeStatementResult = $this->processStmtNodes($stmt, $stmt->stmts, $condResult->getTruthyScope(), $nodeCallback, $context);
            if (!$conditionType instanceof ConstantBooleanType || $conditionType->getValue()) {
                $exitPoints = $branchScopeStatementResult->getExitPoints();
                $throwPoints = array_merge($throwPoints, $branchScopeStatementResult->getThrowPoints());
                $branchScope = $branchScopeStatementResult->getScope();
                $finalScope = $branchScopeStatementResult->isAlwaysTerminating() ? null : $branchScope;
                $alwaysTerminating = $branchScopeStatementResult->isAlwaysTerminating();
                $hasYield = $branchScopeStatementResult->hasYield() || $hasYield;
            }
            $scope = $condResult->getFalseyScope();
            $lastElseIfConditionIsTrue = \false;
            $condScope = $scope;
            foreach ($stmt->elseifs as $elseif) {
                $nodeCallback($elseif, $scope);
                $elseIfConditionType = ($this->treatPhpDocTypesAsCertain ? $condScope->getType($elseif->cond) : $scope->getNativeType($elseif->cond))->toBoolean();
                $condResult = $this->processExprNode($elseif->cond, $condScope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep());
                $throwPoints = array_merge($throwPoints, $condResult->getThrowPoints());
                $condScope = $condResult->getScope();
                $branchScopeStatementResult = $this->processStmtNodes($elseif, $elseif->stmts, $condResult->getTruthyScope(), $nodeCallback, $context);
                if (!$ifAlwaysTrue && (!$lastElseIfConditionIsTrue && (!$elseIfConditionType instanceof ConstantBooleanType || $elseIfConditionType->getValue()))) {
                    $exitPoints = array_merge($exitPoints, $branchScopeStatementResult->getExitPoints());
                    $throwPoints = array_merge($throwPoints, $branchScopeStatementResult->getThrowPoints());
                    $branchScope = $branchScopeStatementResult->getScope();
                    $finalScope = $branchScopeStatementResult->isAlwaysTerminating() ? $finalScope : $branchScope->mergeWith($finalScope);
                    $alwaysTerminating = $alwaysTerminating && $branchScopeStatementResult->isAlwaysTerminating();
                    $hasYield = $hasYield || $branchScopeStatementResult->hasYield();
                }
                if ($elseIfConditionType->isTrue()->yes()) {
                    $lastElseIfConditionIsTrue = \true;
                }
                $condScope = $condScope->filterByFalseyValue($elseif->cond);
                $scope = $condScope;
            }
            if ($stmt->else === null) {
                if (!$ifAlwaysTrue && !$lastElseIfConditionIsTrue) {
                    $finalScope = $scope->mergeWith($finalScope);
                    $alwaysTerminating = \false;
                }
            } else {
                $nodeCallback($stmt->else, $scope);
                $branchScopeStatementResult = $this->processStmtNodes($stmt->else, $stmt->else->stmts, $scope, $nodeCallback, $context);
                if (!$ifAlwaysTrue && !$lastElseIfConditionIsTrue) {
                    $exitPoints = array_merge($exitPoints, $branchScopeStatementResult->getExitPoints());
                    $throwPoints = array_merge($throwPoints, $branchScopeStatementResult->getThrowPoints());
                    $branchScope = $branchScopeStatementResult->getScope();
                    $finalScope = $branchScopeStatementResult->isAlwaysTerminating() ? $finalScope : $branchScope->mergeWith($finalScope);
                    $alwaysTerminating = $alwaysTerminating && $branchScopeStatementResult->isAlwaysTerminating();
                    $hasYield = $hasYield || $branchScopeStatementResult->hasYield();
                }
            }
            if ($finalScope === null) {
                $finalScope = $scope;
            }
            return new \PHPStan\Analyser\StatementResult($finalScope, $hasYield, $alwaysTerminating, $exitPoints, $throwPoints);
        } elseif ($stmt instanceof Node\Stmt\TraitUse) {
            $hasYield = \false;
            $throwPoints = [];
            $this->processTraitUse($stmt, $scope, $nodeCallback);
        } elseif ($stmt instanceof Foreach_) {
            $condResult = $this->processExprNode($stmt->expr, $scope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep());
            $throwPoints = $overridingThrowPoints ?? $condResult->getThrowPoints();
            $scope = $condResult->getScope();
            $arrayComparisonExpr = new BinaryOp\NotIdentical($stmt->expr, new Array_([]));
            $inForeachScope = $scope;
            if ($stmt->expr instanceof Variable && is_string($stmt->expr->name)) {
                $inForeachScope = $this->processVarAnnotation($scope, [$stmt->expr->name], $stmt);
            }
            $nodeCallback(new InForeachNode($stmt), $inForeachScope);
            $bodyScope = $scope;
            if ($context->isTopLevel()) {
                $bodyScope = $this->polluteScopeWithAlwaysIterableForeach ? $this->enterForeach($scope->filterByTruthyValue($arrayComparisonExpr), $stmt) : $this->enterForeach($scope, $stmt);
                $count = 0;
                do {
                    $prevScope = $bodyScope;
                    $bodyScope = $bodyScope->mergeWith($this->polluteScopeWithAlwaysIterableForeach ? $scope->filterByTruthyValue($arrayComparisonExpr) : $scope);
                    $bodyScope = $this->enterForeach($bodyScope, $stmt);
                    $bodyScopeResult = $this->processStmtNodes($stmt, $stmt->stmts, $bodyScope, static function () : void {
                    }, $context->enterDeep())->filterOutLoopExitPoints();
                    $bodyScope = $bodyScopeResult->getScope();
                    foreach ($bodyScopeResult->getExitPointsByType(Continue_::class) as $continueExitPoint) {
                        $bodyScope = $bodyScope->mergeWith($continueExitPoint->getScope());
                    }
                    if ($bodyScope->equals($prevScope)) {
                        break;
                    }
                    if ($count >= self::GENERALIZE_AFTER_ITERATION) {
                        $bodyScope = $prevScope->generalizeWith($bodyScope);
                    }
                    $count++;
                } while ($count < self::LOOP_SCOPE_ITERATIONS);
            }
            $bodyScope = $bodyScope->mergeWith($this->polluteScopeWithAlwaysIterableForeach ? $scope->filterByTruthyValue($arrayComparisonExpr) : $scope);
            $bodyScope = $this->enterForeach($bodyScope, $stmt);
            $finalScopeResult = $this->processStmtNodes($stmt, $stmt->stmts, $bodyScope, $nodeCallback, $context)->filterOutLoopExitPoints();
            $finalScope = $finalScopeResult->getScope();
            foreach ($finalScopeResult->getExitPointsByType(Continue_::class) as $continueExitPoint) {
                $finalScope = $continueExitPoint->getScope()->mergeWith($finalScope);
            }
            foreach ($finalScopeResult->getExitPointsByType(Break_::class) as $breakExitPoint) {
                $finalScope = $breakExitPoint->getScope()->mergeWith($finalScope);
            }
            $isIterableAtLeastOnce = $scope->getType($stmt->expr)->isIterableAtLeastOnce();
            if ($isIterableAtLeastOnce->no() || $finalScopeResult->isAlwaysTerminating()) {
                $finalScope = $scope;
            } elseif ($isIterableAtLeastOnce->maybe()) {
                if ($this->polluteScopeWithAlwaysIterableForeach) {
                    $finalScope = $finalScope->mergeWith($scope->filterByFalseyValue($arrayComparisonExpr));
                } else {
                    $finalScope = $finalScope->mergeWith($scope);
                }
            } elseif (!$this->polluteScopeWithAlwaysIterableForeach) {
                $finalScope = $scope->processAlwaysIterableForeachScopeWithoutPollute($finalScope);
                // get types from finalScope, but don't create new variables
            }
            if (!$isIterableAtLeastOnce->no()) {
                $throwPoints = array_merge($throwPoints, $finalScopeResult->getThrowPoints());
            }
            if (!(new ObjectType(Traversable::class))->isSuperTypeOf($scope->getType($stmt->expr))->no()) {
                $throwPoints[] = \PHPStan\Analyser\ThrowPoint::createImplicit($scope, $stmt->expr);
            }
            return new \PHPStan\Analyser\StatementResult($finalScope, $finalScopeResult->hasYield() || $condResult->hasYield(), $isIterableAtLeastOnce->yes() && $finalScopeResult->isAlwaysTerminating(), $finalScopeResult->getExitPointsForOuterLoop(), $throwPoints);
        } elseif ($stmt instanceof While_) {
            $condResult = $this->processExprNode($stmt->cond, $scope, static function () : void {
            }, \PHPStan\Analyser\ExpressionContext::createDeep());
            $bodyScope = $condResult->getTruthyScope();
            if ($context->isTopLevel()) {
                $count = 0;
                do {
                    $prevScope = $bodyScope;
                    $bodyScope = $bodyScope->mergeWith($scope);
                    $bodyScope = $this->processExprNode($stmt->cond, $bodyScope, static function () : void {
                    }, \PHPStan\Analyser\ExpressionContext::createDeep())->getTruthyScope();
                    $bodyScopeResult = $this->processStmtNodes($stmt, $stmt->stmts, $bodyScope, static function () : void {
                    }, $context->enterDeep())->filterOutLoopExitPoints();
                    $bodyScope = $bodyScopeResult->getScope();
                    foreach ($bodyScopeResult->getExitPointsByType(Continue_::class) as $continueExitPoint) {
                        $bodyScope = $bodyScope->mergeWith($continueExitPoint->getScope());
                    }
                    if ($bodyScope->equals($prevScope)) {
                        break;
                    }
                    if ($count >= self::GENERALIZE_AFTER_ITERATION) {
                        $bodyScope = $prevScope->generalizeWith($bodyScope);
                    }
                    $count++;
                } while ($count < self::LOOP_SCOPE_ITERATIONS);
            }
            $bodyScope = $bodyScope->mergeWith($scope);
            $bodyScopeMaybeRan = $bodyScope;
            $bodyScope = $this->processExprNode($stmt->cond, $bodyScope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep())->getTruthyScope();
            $finalScopeResult = $this->processStmtNodes($stmt, $stmt->stmts, $bodyScope, $nodeCallback, $context)->filterOutLoopExitPoints();
            $finalScope = $finalScopeResult->getScope()->filterByFalseyValue($stmt->cond);
            foreach ($finalScopeResult->getExitPointsByType(Continue_::class) as $continueExitPoint) {
                $finalScope = $finalScope->mergeWith($continueExitPoint->getScope());
            }
            $breakExitPoints = $finalScopeResult->getExitPointsByType(Break_::class);
            foreach ($breakExitPoints as $breakExitPoint) {
                $finalScope = $finalScope->mergeWith($breakExitPoint->getScope());
            }
            $beforeCondBooleanType = ($this->treatPhpDocTypesAsCertain ? $scope->getType($stmt->cond) : $scope->getNativeType($stmt->cond))->toBoolean();
            $condBooleanType = ($this->treatPhpDocTypesAsCertain ? $bodyScopeMaybeRan->getType($stmt->cond) : $bodyScopeMaybeRan->getNativeType($stmt->cond))->toBoolean();
            $isIterableAtLeastOnce = $beforeCondBooleanType->isTrue()->yes();
            $alwaysIterates = $condBooleanType->isTrue()->yes() && $context->isTopLevel();
            $neverIterates = $condBooleanType->isFalse()->yes() && $context->isTopLevel();
            $nodeCallback(new BreaklessWhileLoopNode($stmt, $finalScopeResult->getExitPoints()), $bodyScopeMaybeRan);
            if ($alwaysIterates) {
                $isAlwaysTerminating = count($finalScopeResult->getExitPointsByType(Break_::class)) === 0;
            } elseif ($isIterableAtLeastOnce) {
                $isAlwaysTerminating = $finalScopeResult->isAlwaysTerminating();
            } else {
                $isAlwaysTerminating = \false;
            }
            $condScope = $condResult->getFalseyScope();
            if (!$isIterableAtLeastOnce) {
                if (!$this->polluteScopeWithLoopInitialAssignments) {
                    $condScope = $condScope->mergeWith($scope);
                }
                $finalScope = $finalScope->mergeWith($condScope);
            }
            $throwPoints = $overridingThrowPoints ?? $condResult->getThrowPoints();
            if (!$neverIterates) {
                $throwPoints = array_merge($throwPoints, $finalScopeResult->getThrowPoints());
            }
            return new \PHPStan\Analyser\StatementResult($finalScope, $finalScopeResult->hasYield() || $condResult->hasYield(), $isAlwaysTerminating, $finalScopeResult->getExitPointsForOuterLoop(), $throwPoints);
        } elseif ($stmt instanceof Do_) {
            $finalScope = null;
            $bodyScope = $scope;
            $count = 0;
            $hasYield = \false;
            $throwPoints = [];
            if ($context->isTopLevel()) {
                do {
                    $prevScope = $bodyScope;
                    $bodyScope = $bodyScope->mergeWith($scope);
                    $bodyScopeResult = $this->processStmtNodes($stmt, $stmt->stmts, $bodyScope, static function () : void {
                    }, $context->enterDeep())->filterOutLoopExitPoints();
                    $alwaysTerminating = $bodyScopeResult->isAlwaysTerminating();
                    $bodyScope = $bodyScopeResult->getScope();
                    foreach ($bodyScopeResult->getExitPointsByType(Continue_::class) as $continueExitPoint) {
                        $bodyScope = $bodyScope->mergeWith($continueExitPoint->getScope());
                    }
                    $finalScope = $alwaysTerminating ? $finalScope : $bodyScope->mergeWith($finalScope);
                    foreach ($bodyScopeResult->getExitPointsByType(Break_::class) as $breakExitPoint) {
                        $finalScope = $breakExitPoint->getScope()->mergeWith($finalScope);
                    }
                    $bodyScope = $this->processExprNode($stmt->cond, $bodyScope, static function () : void {
                    }, \PHPStan\Analyser\ExpressionContext::createDeep())->getTruthyScope();
                    if ($bodyScope->equals($prevScope)) {
                        break;
                    }
                    if ($count >= self::GENERALIZE_AFTER_ITERATION) {
                        $bodyScope = $prevScope->generalizeWith($bodyScope);
                    }
                    $count++;
                } while ($count < self::LOOP_SCOPE_ITERATIONS);
                $bodyScope = $bodyScope->mergeWith($scope);
            }
            $bodyScopeResult = $this->processStmtNodes($stmt, $stmt->stmts, $bodyScope, $nodeCallback, $context)->filterOutLoopExitPoints();
            $bodyScope = $bodyScopeResult->getScope();
            foreach ($bodyScopeResult->getExitPointsByType(Continue_::class) as $continueExitPoint) {
                $bodyScope = $bodyScope->mergeWith($continueExitPoint->getScope());
            }
            $condBooleanType = ($this->treatPhpDocTypesAsCertain ? $bodyScope->getType($stmt->cond) : $bodyScope->getNativeType($stmt->cond))->toBoolean();
            $alwaysIterates = $condBooleanType->isTrue()->yes() && $context->isTopLevel();
            $nodeCallback(new DoWhileLoopConditionNode($stmt->cond, $bodyScopeResult->getExitPoints()), $bodyScope);
            if ($alwaysIterates) {
                $alwaysTerminating = count($bodyScopeResult->getExitPointsByType(Break_::class)) === 0;
            } else {
                $alwaysTerminating = $bodyScopeResult->isAlwaysTerminating();
            }
            $finalScope = $alwaysTerminating ? $finalScope : $bodyScope->mergeWith($finalScope);
            if ($finalScope === null) {
                $finalScope = $scope;
            }
            if (!$alwaysTerminating) {
                $condResult = $this->processExprNode($stmt->cond, $bodyScope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep());
                $hasYield = $condResult->hasYield();
                $throwPoints = $condResult->getThrowPoints();
                $finalScope = $condResult->getFalseyScope();
            } else {
                $this->processExprNode($stmt->cond, $bodyScope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep());
            }
            foreach ($bodyScopeResult->getExitPointsByType(Break_::class) as $breakExitPoint) {
                $finalScope = $breakExitPoint->getScope()->mergeWith($finalScope);
            }
            return new \PHPStan\Analyser\StatementResult($finalScope, $bodyScopeResult->hasYield() || $hasYield, $alwaysTerminating, $bodyScopeResult->getExitPointsForOuterLoop(), array_merge($throwPoints, $bodyScopeResult->getThrowPoints()));
        } elseif ($stmt instanceof For_) {
            $initScope = $scope;
            $hasYield = \false;
            $throwPoints = [];
            foreach ($stmt->init as $initExpr) {
                $initResult = $this->processExprNode($initExpr, $initScope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createTopLevel());
                $initScope = $initResult->getScope();
                $hasYield = $hasYield || $initResult->hasYield();
                $throwPoints = array_merge($throwPoints, $initResult->getThrowPoints());
            }
            $bodyScope = $initScope;
            $isIterableAtLeastOnce = TrinaryLogic::createYes();
            foreach ($stmt->cond as $condExpr) {
                $condResult = $this->processExprNode($condExpr, $bodyScope, static function () : void {
                }, \PHPStan\Analyser\ExpressionContext::createDeep());
                $initScope = $condResult->getScope();
                $condResultScope = $condResult->getScope();
                $condTruthiness = ($this->treatPhpDocTypesAsCertain ? $condResultScope->getType($condExpr) : $condResultScope->getNativeType($condExpr))->toBoolean();
                if ($condTruthiness instanceof ConstantBooleanType) {
                    $condTruthinessTrinary = TrinaryLogic::createFromBoolean($condTruthiness->getValue());
                } else {
                    $condTruthinessTrinary = TrinaryLogic::createMaybe();
                }
                $isIterableAtLeastOnce = $isIterableAtLeastOnce->and($condTruthinessTrinary);
                $hasYield = $hasYield || $condResult->hasYield();
                $throwPoints = array_merge($throwPoints, $condResult->getThrowPoints());
                $bodyScope = $condResult->getTruthyScope();
            }
            if ($context->isTopLevel()) {
                $count = 0;
                do {
                    $prevScope = $bodyScope;
                    $bodyScope = $bodyScope->mergeWith($initScope);
                    foreach ($stmt->cond as $condExpr) {
                        $bodyScope = $this->processExprNode($condExpr, $bodyScope, static function () : void {
                        }, \PHPStan\Analyser\ExpressionContext::createDeep())->getTruthyScope();
                    }
                    $bodyScopeResult = $this->processStmtNodes($stmt, $stmt->stmts, $bodyScope, static function () : void {
                    }, $context->enterDeep())->filterOutLoopExitPoints();
                    $bodyScope = $bodyScopeResult->getScope();
                    foreach ($bodyScopeResult->getExitPointsByType(Continue_::class) as $continueExitPoint) {
                        $bodyScope = $bodyScope->mergeWith($continueExitPoint->getScope());
                    }
                    foreach ($stmt->loop as $loopExpr) {
                        $exprResult = $this->processExprNode($loopExpr, $bodyScope, static function () : void {
                        }, \PHPStan\Analyser\ExpressionContext::createTopLevel());
                        $bodyScope = $exprResult->getScope();
                        $hasYield = $hasYield || $exprResult->hasYield();
                        $throwPoints = array_merge($throwPoints, $exprResult->getThrowPoints());
                    }
                    if ($bodyScope->equals($prevScope)) {
                        break;
                    }
                    if ($count >= self::GENERALIZE_AFTER_ITERATION) {
                        $bodyScope = $prevScope->generalizeWith($bodyScope);
                    }
                    $count++;
                } while ($count < self::LOOP_SCOPE_ITERATIONS);
            }
            $bodyScope = $bodyScope->mergeWith($initScope);
            foreach ($stmt->cond as $condExpr) {
                $bodyScope = $this->processExprNode($condExpr, $bodyScope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep())->getTruthyScope();
            }
            $finalScopeResult = $this->processStmtNodes($stmt, $stmt->stmts, $bodyScope, $nodeCallback, $context)->filterOutLoopExitPoints();
            $finalScope = $finalScopeResult->getScope();
            foreach ($finalScopeResult->getExitPointsByType(Continue_::class) as $continueExitPoint) {
                $finalScope = $continueExitPoint->getScope()->mergeWith($finalScope);
            }
            $loopScope = $finalScope;
            foreach ($stmt->loop as $loopExpr) {
                $loopScope = $this->processExprNode($loopExpr, $loopScope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createTopLevel())->getScope();
            }
            $finalScope = $finalScope->generalizeWith($loopScope);
            foreach ($stmt->cond as $condExpr) {
                $finalScope = $finalScope->filterByFalseyValue($condExpr);
            }
            foreach ($finalScopeResult->getExitPointsByType(Break_::class) as $breakExitPoint) {
                $finalScope = $breakExitPoint->getScope()->mergeWith($finalScope);
            }
            if ($isIterableAtLeastOnce->no() || $finalScopeResult->isAlwaysTerminating()) {
                if ($this->polluteScopeWithLoopInitialAssignments) {
                    $finalScope = $initScope;
                } else {
                    $finalScope = $scope;
                }
            } elseif ($isIterableAtLeastOnce->maybe()) {
                if ($this->polluteScopeWithLoopInitialAssignments) {
                    $finalScope = $finalScope->mergeWith($initScope);
                } else {
                    $finalScope = $finalScope->mergeWith($scope);
                }
            } else {
                if (!$this->polluteScopeWithLoopInitialAssignments) {
                    $finalScope = $finalScope->mergeWith($scope);
                }
            }
            return new \PHPStan\Analyser\StatementResult($finalScope, $finalScopeResult->hasYield() || $hasYield, \false, $finalScopeResult->getExitPointsForOuterLoop(), array_merge($throwPoints, $finalScopeResult->getThrowPoints()));
        } elseif ($stmt instanceof Switch_) {
            $condResult = $this->processExprNode($stmt->cond, $scope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep());
            $scope = $condResult->getScope();
            $scopeForBranches = $scope;
            $finalScope = null;
            $prevScope = null;
            $hasDefaultCase = \false;
            $alwaysTerminating = \true;
            $hasYield = $condResult->hasYield();
            $exitPointsForOuterLoop = [];
            $throwPoints = $condResult->getThrowPoints();
            foreach ($stmt->cases as $caseNode) {
                if ($caseNode->cond !== null) {
                    $condExpr = new BinaryOp\Equal($stmt->cond, $caseNode->cond);
                    $caseResult = $this->processExprNode($caseNode->cond, $scopeForBranches, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep());
                    $scopeForBranches = $caseResult->getScope();
                    $hasYield = $hasYield || $caseResult->hasYield();
                    $throwPoints = array_merge($throwPoints, $caseResult->getThrowPoints());
                    $branchScope = $scopeForBranches->filterByTruthyValue($condExpr);
                } else {
                    $hasDefaultCase = \true;
                    $branchScope = $scopeForBranches;
                }
                $branchScope = $branchScope->mergeWith($prevScope);
                $branchScopeResult = $this->processStmtNodes($caseNode, $caseNode->stmts, $branchScope, $nodeCallback, $context);
                $branchScope = $branchScopeResult->getScope();
                $branchFinalScopeResult = $branchScopeResult->filterOutLoopExitPoints();
                $hasYield = $hasYield || $branchFinalScopeResult->hasYield();
                foreach ($branchScopeResult->getExitPointsByType(Break_::class) as $breakExitPoint) {
                    $alwaysTerminating = \false;
                    $finalScope = $breakExitPoint->getScope()->mergeWith($finalScope);
                }
                foreach ($branchScopeResult->getExitPointsByType(Continue_::class) as $continueExitPoint) {
                    $finalScope = $continueExitPoint->getScope()->mergeWith($finalScope);
                }
                $exitPointsForOuterLoop = array_merge($exitPointsForOuterLoop, $branchFinalScopeResult->getExitPointsForOuterLoop());
                $throwPoints = array_merge($throwPoints, $branchFinalScopeResult->getThrowPoints());
                if ($branchScopeResult->isAlwaysTerminating()) {
                    $alwaysTerminating = $alwaysTerminating && $branchFinalScopeResult->isAlwaysTerminating();
                    $prevScope = null;
                    if (isset($condExpr)) {
                        $scopeForBranches = $scopeForBranches->filterByFalseyValue($condExpr);
                    }
                    if (!$branchFinalScopeResult->isAlwaysTerminating()) {
                        $finalScope = $branchScope->mergeWith($finalScope);
                    }
                } else {
                    $prevScope = $branchScope;
                }
            }
            $exhaustive = $scopeForBranches->getType($stmt->cond) instanceof NeverType;
            if (!$hasDefaultCase && !$exhaustive) {
                $alwaysTerminating = \false;
            }
            if ($prevScope !== null && isset($branchFinalScopeResult)) {
                $finalScope = $prevScope->mergeWith($finalScope);
                $alwaysTerminating = $alwaysTerminating && $branchFinalScopeResult->isAlwaysTerminating();
            }
            if (!$hasDefaultCase && !$exhaustive || $finalScope === null) {
                $finalScope = $scope->mergeWith($finalScope);
            }
            return new \PHPStan\Analyser\StatementResult($finalScope, $hasYield, $alwaysTerminating, $exitPointsForOuterLoop, $throwPoints);
        } elseif ($stmt instanceof TryCatch) {
            $branchScopeResult = $this->processStmtNodes($stmt, $stmt->stmts, $scope, $nodeCallback, $context);
            $branchScope = $branchScopeResult->getScope();
            $finalScope = $branchScopeResult->isAlwaysTerminating() ? null : $branchScope;
            $exitPoints = [];
            $finallyExitPoints = [];
            $alwaysTerminating = $branchScopeResult->isAlwaysTerminating();
            $hasYield = $branchScopeResult->hasYield();
            if ($stmt->finally !== null) {
                $finallyScope = $branchScope;
            } else {
                $finallyScope = null;
            }
            foreach ($branchScopeResult->getExitPoints() as $exitPoint) {
                $finallyExitPoints[] = $exitPoint;
                if ($exitPoint->getStatement() instanceof Throw_) {
                    continue;
                }
                if ($finallyScope !== null) {
                    $finallyScope = $finallyScope->mergeWith($exitPoint->getScope());
                }
                $exitPoints[] = $exitPoint;
            }
            $throwPoints = $branchScopeResult->getThrowPoints();
            $throwPointsForLater = [];
            $pastCatchTypes = new NeverType();
            foreach ($stmt->catches as $catchNode) {
                $nodeCallback($catchNode, $scope);
                $originalCatchTypes = array_map(static function (Name $name) : Type {
                    return new ObjectType($name->toString());
                }, $catchNode->types);
                $catchTypes = array_map(static function (Type $type) use($pastCatchTypes) : Type {
                    return TypeCombinator::remove($type, $pastCatchTypes);
                }, $originalCatchTypes);
                $originalCatchType = TypeCombinator::union(...$originalCatchTypes);
                $catchType = TypeCombinator::union(...$catchTypes);
                $pastCatchTypes = TypeCombinator::union($pastCatchTypes, $originalCatchType);
                $matchingThrowPoints = [];
                $matchingCatchTypes = array_fill_keys(array_keys($originalCatchTypes), \false);
                // throwable matches all
                foreach ($originalCatchTypes as $catchTypeIndex => $catchTypeItem) {
                    if (!$catchTypeItem->isSuperTypeOf(new ObjectType(Throwable::class))->yes()) {
                        continue;
                    }
                    foreach ($throwPoints as $throwPointIndex => $throwPoint) {
                        $matchingThrowPoints[$throwPointIndex] = $throwPoint;
                        $matchingCatchTypes[$catchTypeIndex] = \true;
                    }
                }
                // explicit only
                if (count($matchingThrowPoints) === 0) {
                    foreach ($throwPoints as $throwPointIndex => $throwPoint) {
                        foreach ($catchTypes as $catchTypeIndex => $catchTypeItem) {
                            if ($catchTypeItem->isSuperTypeOf($throwPoint->getType())->no()) {
                                continue;
                            }
                            $matchingCatchTypes[$catchTypeIndex] = \true;
                            if (!$throwPoint->isExplicit()) {
                                continue;
                            }
                            $matchingThrowPoints[$throwPointIndex] = $throwPoint;
                        }
                    }
                }
                // implicit only
                if (count($matchingThrowPoints) === 0) {
                    foreach ($throwPoints as $throwPointIndex => $throwPoint) {
                        if ($throwPoint->isExplicit()) {
                            continue;
                        }
                        foreach ($catchTypes as $catchTypeIndex => $catchTypeItem) {
                            if ($catchTypeItem->isSuperTypeOf($throwPoint->getType())->no()) {
                                continue;
                            }
                            $matchingThrowPoints[$throwPointIndex] = $throwPoint;
                        }
                    }
                }
                // include previously removed throw points
                if (count($matchingThrowPoints) === 0) {
                    if ($originalCatchType->isSuperTypeOf(new ObjectType(Throwable::class))->yes()) {
                        foreach ($branchScopeResult->getThrowPoints() as $originalThrowPoint) {
                            if (!$originalThrowPoint->canContainAnyThrowable()) {
                                continue;
                            }
                            $matchingThrowPoints[] = $originalThrowPoint;
                            $matchingCatchTypes = array_fill_keys(array_keys($originalCatchTypes), \true);
                        }
                    }
                }
                // emit error
                if ($this->detectDeadTypeInMultiCatch) {
                    foreach ($matchingCatchTypes as $catchTypeIndex => $matched) {
                        if ($matched) {
                            continue;
                        }
                        $nodeCallback(new CatchWithUnthrownExceptionNode($catchNode, $catchTypes[$catchTypeIndex], $originalCatchTypes[$catchTypeIndex]), $scope);
                    }
                }
                if (count($matchingThrowPoints) === 0) {
                    if (!$this->detectDeadTypeInMultiCatch) {
                        $nodeCallback(new CatchWithUnthrownExceptionNode($catchNode, $catchType, $originalCatchType), $scope);
                    }
                    continue;
                }
                // recompute throw points
                $newThrowPoints = [];
                foreach ($throwPoints as $throwPoint) {
                    $newThrowPoint = $throwPoint->subtractCatchType($originalCatchType);
                    if ($newThrowPoint->getType() instanceof NeverType) {
                        continue;
                    }
                    $newThrowPoints[] = $newThrowPoint;
                }
                $throwPoints = $newThrowPoints;
                $catchScope = null;
                foreach ($matchingThrowPoints as $matchingThrowPoint) {
                    if ($catchScope === null) {
                        $catchScope = $matchingThrowPoint->getScope();
                    } else {
                        $catchScope = $catchScope->mergeWith($matchingThrowPoint->getScope());
                    }
                }
                $variableName = null;
                if ($catchNode->var !== null) {
                    if (!is_string($catchNode->var->name)) {
                        throw new ShouldNotHappenException();
                    }
                    $variableName = $catchNode->var->name;
                }
                $catchScopeResult = $this->processStmtNodes($catchNode, $catchNode->stmts, $catchScope->enterCatchType($catchType, $variableName), $nodeCallback, $context);
                $catchScopeForFinally = $catchScopeResult->getScope();
                $finalScope = $catchScopeResult->isAlwaysTerminating() ? $finalScope : $catchScopeResult->getScope()->mergeWith($finalScope);
                $alwaysTerminating = $alwaysTerminating && $catchScopeResult->isAlwaysTerminating();
                $hasYield = $hasYield || $catchScopeResult->hasYield();
                $catchThrowPoints = $catchScopeResult->getThrowPoints();
                $throwPointsForLater = array_merge($throwPointsForLater, $catchThrowPoints);
                if ($finallyScope !== null) {
                    $finallyScope = $finallyScope->mergeWith($catchScopeForFinally);
                }
                foreach ($catchScopeResult->getExitPoints() as $exitPoint) {
                    $finallyExitPoints[] = $exitPoint;
                    if ($exitPoint->getStatement() instanceof Throw_) {
                        continue;
                    }
                    if ($finallyScope !== null) {
                        $finallyScope = $finallyScope->mergeWith($exitPoint->getScope());
                    }
                    $exitPoints[] = $exitPoint;
                }
                foreach ($catchThrowPoints as $catchThrowPoint) {
                    if ($finallyScope === null) {
                        continue;
                    }
                    $finallyScope = $finallyScope->mergeWith($catchThrowPoint->getScope());
                }
            }
            if ($finalScope === null) {
                $finalScope = $scope;
            }
            foreach ($throwPoints as $throwPoint) {
                if ($finallyScope === null) {
                    continue;
                }
                $finallyScope = $finallyScope->mergeWith($throwPoint->getScope());
            }
            if ($finallyScope !== null && $stmt->finally !== null) {
                $originalFinallyScope = $finallyScope;
                $finallyResult = $this->processStmtNodes($stmt->finally, $stmt->finally->stmts, $finallyScope, $nodeCallback, $context);
                $alwaysTerminating = $alwaysTerminating || $finallyResult->isAlwaysTerminating();
                $hasYield = $hasYield || $finallyResult->hasYield();
                $throwPointsForLater = array_merge($throwPointsForLater, $finallyResult->getThrowPoints());
                $finallyScope = $finallyResult->getScope();
                $finalScope = $finallyResult->isAlwaysTerminating() ? $finalScope : $finalScope->processFinallyScope($finallyScope, $originalFinallyScope);
                if (count($finallyResult->getExitPoints()) > 0) {
                    $nodeCallback(new FinallyExitPointsNode($finallyResult->getExitPoints(), $finallyExitPoints), $scope);
                }
                $exitPoints = array_merge($exitPoints, $finallyResult->getExitPoints());
            }
            return new \PHPStan\Analyser\StatementResult($finalScope, $hasYield, $alwaysTerminating, $exitPoints, array_merge($throwPoints, $throwPointsForLater));
        } elseif ($stmt instanceof Unset_) {
            $hasYield = \false;
            $throwPoints = [];
            foreach ($stmt->vars as $var) {
                $scope = $this->lookForSetAllowedUndefinedExpressions($scope, $var);
                $scope = $this->processExprNode($var, $scope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep())->getScope();
                $scope = $this->lookForUnsetAllowedUndefinedExpressions($scope, $var);
                $scope = $scope->unsetExpression($var);
            }
        } elseif ($stmt instanceof Node\Stmt\Use_) {
            $hasYield = \false;
            $throwPoints = [];
            foreach ($stmt->uses as $use) {
                $this->processStmtNode($use, $scope, $nodeCallback, $context);
            }
        } elseif ($stmt instanceof Node\Stmt\Global_) {
            $hasYield = \false;
            $throwPoints = [];
            $vars = [];
            foreach ($stmt->vars as $var) {
                if (!$var instanceof Variable) {
                    throw new ShouldNotHappenException();
                }
                $scope = $this->lookForSetAllowedUndefinedExpressions($scope, $var);
                $this->processExprNode($var, $scope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep());
                $scope = $this->lookForUnsetAllowedUndefinedExpressions($scope, $var);
                if (!is_string($var->name)) {
                    continue;
                }
                $scope = $scope->assignVariable($var->name, new MixedType(), new MixedType());
                $vars[] = $var->name;
            }
            $scope = $this->processVarAnnotation($scope, $vars, $stmt);
        } elseif ($stmt instanceof Static_) {
            $hasYield = \false;
            $throwPoints = [];
            $vars = [];
            foreach ($stmt->vars as $var) {
                $scope = $this->processStmtNode($var, $scope, $nodeCallback, $context)->getScope();
                if (!is_string($var->var->name)) {
                    continue;
                }
                $vars[] = $var->var->name;
            }
            $scope = $this->processVarAnnotation($scope, $vars, $stmt);
        } elseif ($stmt instanceof StaticVar) {
            $hasYield = \false;
            $throwPoints = [];
            if (!is_string($stmt->var->name)) {
                throw new ShouldNotHappenException();
            }
            if ($stmt->default !== null) {
                $this->processExprNode($stmt->default, $scope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep());
            }
            $scope = $scope->enterExpressionAssign($stmt->var);
            $this->processExprNode($stmt->var, $scope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep());
            $scope = $scope->exitExpressionAssign($stmt->var);
            $scope = $scope->assignVariable($stmt->var->name, new MixedType(), new MixedType());
        } elseif ($stmt instanceof Node\Stmt\Const_) {
            $hasYield = \false;
            $throwPoints = [];
            foreach ($stmt->consts as $const) {
                $nodeCallback($const, $scope);
                $this->processExprNode($const->value, $scope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep());
                if ($const->namespacedName !== null) {
                    $constantName = new Name\FullyQualified($const->namespacedName->toString());
                } else {
                    $constantName = new Name\FullyQualified($const->name->toString());
                }
                $scope = $scope->assignExpression(new ConstFetch($constantName), $scope->getType($const->value), $scope->getNativeType($const->value));
            }
        } elseif ($stmt instanceof Node\Stmt\ClassConst) {
            $hasYield = \false;
            $throwPoints = [];
            $this->processAttributeGroups($stmt->attrGroups, $scope, $nodeCallback);
            foreach ($stmt->consts as $const) {
                $nodeCallback($const, $scope);
                $this->processExprNode($const->value, $scope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep());
                if ($scope->getClassReflection() === null) {
                    throw new ShouldNotHappenException();
                }
                $scope = $scope->assignExpression(new Expr\ClassConstFetch(new Name\FullyQualified($scope->getClassReflection()->getName()), $const->name), $scope->getType($const->value), $scope->getNativeType($const->value));
            }
        } elseif ($stmt instanceof Node\Stmt\EnumCase) {
            $hasYield = \false;
            $throwPoints = [];
            $this->processAttributeGroups($stmt->attrGroups, $scope, $nodeCallback);
            if ($stmt->expr !== null) {
                $this->processExprNode($stmt->expr, $scope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep());
            }
        } elseif ($stmt instanceof Node\Stmt\Nop) {
            $hasYield = \false;
            $throwPoints = $overridingThrowPoints ?? [];
        } elseif ($stmt instanceof Node\Stmt\UseUse) {
            $hasYield = \false;
            $throwPoints = [];
        } elseif ($stmt instanceof Node\Stmt\GroupUse) {
            $hasYield = \false;
            $throwPoints = [];
            foreach ($stmt->uses as $use) {
                $this->processStmtNode($use, $scope, $nodeCallback, $context);
            }
        } else {
            $hasYield = \false;
            $throwPoints = $overridingThrowPoints ?? [];
        }
        return new \PHPStan\Analyser\StatementResult($scope, $hasYield, \false, [], $throwPoints);
    }
    /**
     * @return ThrowPoint[]|null
     */
    private function getOverridingThrowPoints(Node\Stmt $statement, \PHPStan\Analyser\MutatingScope $scope) : ?array
    {
        foreach ($statement->getComments() as $comment) {
            if (!$comment instanceof Doc) {
                continue;
            }
            $function = $scope->getFunction();
            $resolvedPhpDoc = $this->fileTypeMapper->getResolvedPhpDoc($scope->getFile(), $scope->isInClass() ? $scope->getClassReflection()->getName() : null, $scope->isInTrait() ? $scope->getTraitReflection()->getName() : null, $function !== null ? $function->getName() : null, $comment->getText());
            $throwsTag = $resolvedPhpDoc->getThrowsTag();
            if ($throwsTag !== null) {
                $throwsType = $throwsTag->getType();
                if ($throwsType->isVoid()->yes()) {
                    return [];
                }
                return [\PHPStan\Analyser\ThrowPoint::createExplicit($scope, $throwsType, $statement, \false)];
            }
        }
        return null;
    }
    private function getCurrentClassReflection(Node\Stmt\ClassLike $stmt, string $className, \PHPStan\Analyser\Scope $scope) : ClassReflection
    {
        if (!$this->reflectionProvider->hasClass($className)) {
            return $this->createAstClassReflection($stmt, $className, $scope);
        }
        $defaultClassReflection = $this->reflectionProvider->getClass($className);
        if ($defaultClassReflection->getFileName() !== $scope->getFile()) {
            return $this->createAstClassReflection($stmt, $className, $scope);
        }
        $startLine = $defaultClassReflection->getNativeReflection()->getStartLine();
        if ($startLine !== $stmt->getStartLine()) {
            return $this->createAstClassReflection($stmt, $className, $scope);
        }
        return $defaultClassReflection;
    }
    private function createAstClassReflection(Node\Stmt\ClassLike $stmt, string $className, \PHPStan\Analyser\Scope $scope) : ClassReflection
    {
        $nodeToReflection = new NodeToReflection();
        $betterReflectionClass = $nodeToReflection->__invoke($this->reflector, $stmt, new LocatedSource(FileReader::read($scope->getFile()), $className, $scope->getFile()), $scope->getNamespace() !== null ? new Node\Stmt\Namespace_(new Name($scope->getNamespace())) : null);
        if (!$betterReflectionClass instanceof \PHPStan\BetterReflection\Reflection\ReflectionClass) {
            throw new ShouldNotHappenException();
        }
        $enumAdapter = base64_decode('UEhQU3RhblxCZXR0ZXJSZWZsZWN0aW9uXFJlZmxlY3Rpb25cQWRhcHRlclxSZWZsZWN0aW9uRW51bQ==', \true);
        return new ClassReflection($this->reflectionProvider, $this->initializerExprTypeResolver, $this->fileTypeMapper, $this->stubPhpDocProvider, $this->phpDocInheritanceResolver, $this->phpVersion, $this->classReflectionExtensionRegistryProvider->getRegistry()->getPropertiesClassReflectionExtensions(), $this->classReflectionExtensionRegistryProvider->getRegistry()->getMethodsClassReflectionExtensions(), $this->classReflectionExtensionRegistryProvider->getRegistry()->getAllowedSubTypesClassReflectionExtensions(), $betterReflectionClass->getName(), $betterReflectionClass instanceof ReflectionEnum && PHP_VERSION_ID >= 80000 ? new $enumAdapter($betterReflectionClass) : new ReflectionClass($betterReflectionClass), null, null, null, sprintf('%s:%d', $scope->getFile(), $stmt->getStartLine()));
    }
    private function lookForSetAllowedUndefinedExpressions(\PHPStan\Analyser\MutatingScope $scope, Expr $expr) : \PHPStan\Analyser\MutatingScope
    {
        return $this->lookForExpressionCallback($scope, $expr, static function (\PHPStan\Analyser\MutatingScope $scope, Expr $expr) : \PHPStan\Analyser\MutatingScope {
            return $scope->setAllowedUndefinedExpression($expr);
        });
    }
    private function lookForUnsetAllowedUndefinedExpressions(\PHPStan\Analyser\MutatingScope $scope, Expr $expr) : \PHPStan\Analyser\MutatingScope
    {
        return $this->lookForExpressionCallback($scope, $expr, static function (\PHPStan\Analyser\MutatingScope $scope, Expr $expr) : \PHPStan\Analyser\MutatingScope {
            return $scope->unsetAllowedUndefinedExpression($expr);
        });
    }
    /**
     * @param Closure(MutatingScope $scope, Expr $expr): MutatingScope $callback
     */
    private function lookForExpressionCallback(\PHPStan\Analyser\MutatingScope $scope, Expr $expr, Closure $callback) : \PHPStan\Analyser\MutatingScope
    {
        if (!$expr instanceof ArrayDimFetch || $expr->dim !== null) {
            $scope = $callback($scope, $expr);
        }
        if ($expr instanceof ArrayDimFetch) {
            $scope = $this->lookForExpressionCallback($scope, $expr->var, $callback);
        } elseif ($expr instanceof PropertyFetch || $expr instanceof Expr\NullsafePropertyFetch) {
            $scope = $this->lookForExpressionCallback($scope, $expr->var, $callback);
        } elseif ($expr instanceof StaticPropertyFetch && $expr->class instanceof Expr) {
            $scope = $this->lookForExpressionCallback($scope, $expr->class, $callback);
        } elseif ($expr instanceof Array_ || $expr instanceof List_) {
            foreach ($expr->items as $item) {
                if ($item === null) {
                    continue;
                }
                $scope = $this->lookForExpressionCallback($scope, $item->value, $callback);
            }
        }
        return $scope;
    }
    private function ensureShallowNonNullability(\PHPStan\Analyser\MutatingScope $scope, \PHPStan\Analyser\Scope $originalScope, Expr $exprToSpecify) : \PHPStan\Analyser\EnsuredNonNullabilityResult
    {
        $exprType = $scope->getType($exprToSpecify);
        $isNull = $exprType->isNull();
        if ($isNull->yes()) {
            return new \PHPStan\Analyser\EnsuredNonNullabilityResult($scope, []);
        }
        $exprTypeWithoutNull = TypeCombinator::removeNull($exprType);
        if ($exprType->equals($exprTypeWithoutNull)) {
            $originalExprType = $originalScope->getType($exprToSpecify);
            if (!$originalExprType->equals($exprTypeWithoutNull)) {
                $originalNativeType = $originalScope->getNativeType($exprToSpecify);
                return new \PHPStan\Analyser\EnsuredNonNullabilityResult($scope, [new \PHPStan\Analyser\EnsuredNonNullabilityResultExpression($exprToSpecify, $originalExprType, $originalNativeType)]);
            }
            return new \PHPStan\Analyser\EnsuredNonNullabilityResult($scope, []);
        }
        $nativeType = $scope->getNativeType($exprToSpecify);
        $scope = $scope->specifyExpressionType($exprToSpecify, $exprTypeWithoutNull, TypeCombinator::removeNull($nativeType));
        return new \PHPStan\Analyser\EnsuredNonNullabilityResult($scope, [new \PHPStan\Analyser\EnsuredNonNullabilityResultExpression($exprToSpecify, $exprType, $nativeType)]);
    }
    private function ensureNonNullability(\PHPStan\Analyser\MutatingScope $scope, Expr $expr) : \PHPStan\Analyser\EnsuredNonNullabilityResult
    {
        $specifiedExpressions = [];
        $originalScope = $scope;
        $scope = $this->lookForExpressionCallback($scope, $expr, function ($scope, $expr) use(&$specifiedExpressions, $originalScope) {
            $result = $this->ensureShallowNonNullability($scope, $originalScope, $expr);
            foreach ($result->getSpecifiedExpressions() as $specifiedExpression) {
                $specifiedExpressions[] = $specifiedExpression;
            }
            return $result->getScope();
        });
        return new \PHPStan\Analyser\EnsuredNonNullabilityResult($scope, $specifiedExpressions);
    }
    /**
     * @param EnsuredNonNullabilityResultExpression[] $specifiedExpressions
     */
    private function revertNonNullability(\PHPStan\Analyser\MutatingScope $scope, array $specifiedExpressions) : \PHPStan\Analyser\MutatingScope
    {
        foreach ($specifiedExpressions as $specifiedExpressionResult) {
            $scope = $scope->specifyExpressionType($specifiedExpressionResult->getExpression(), $specifiedExpressionResult->getOriginalType(), $specifiedExpressionResult->getOriginalNativeType());
        }
        return $scope;
    }
    private function findEarlyTerminatingExpr(Expr $expr, \PHPStan\Analyser\Scope $scope) : ?Expr
    {
        if (($expr instanceof MethodCall || $expr instanceof Expr\StaticCall) && $expr->name instanceof Node\Identifier) {
            if (array_key_exists($expr->name->toLowerString(), $this->earlyTerminatingMethodNames)) {
                if ($expr instanceof MethodCall) {
                    $methodCalledOnType = $scope->getType($expr->var);
                } else {
                    if ($expr->class instanceof Name) {
                        $methodCalledOnType = $scope->resolveTypeByName($expr->class);
                    } else {
                        $methodCalledOnType = $scope->getType($expr->class);
                    }
                }
                foreach ($methodCalledOnType->getObjectClassNames() as $referencedClass) {
                    if (!$this->reflectionProvider->hasClass($referencedClass)) {
                        continue;
                    }
                    $classReflection = $this->reflectionProvider->getClass($referencedClass);
                    foreach (array_merge([$referencedClass], $classReflection->getParentClassesNames(), $classReflection->getNativeReflection()->getInterfaceNames()) as $className) {
                        if (!isset($this->earlyTerminatingMethodCalls[$className])) {
                            continue;
                        }
                        if (in_array((string) $expr->name, $this->earlyTerminatingMethodCalls[$className], \true)) {
                            return $expr;
                        }
                    }
                }
            }
        }
        if ($expr instanceof FuncCall && $expr->name instanceof Name) {
            if (in_array((string) $expr->name, $this->earlyTerminatingFunctionCalls, \true)) {
                return $expr;
            }
        }
        if ($expr instanceof Expr\Exit_ || $expr instanceof Expr\Throw_) {
            return $expr;
        }
        $exprType = $scope->getType($expr);
        if ($exprType instanceof NeverType && $exprType->isExplicit()) {
            return $expr;
        }
        return null;
    }
    /**
     * @param callable(Node $node, Scope $scope): void $nodeCallback
     */
    private function processExprNode(Expr $expr, \PHPStan\Analyser\MutatingScope $scope, callable $nodeCallback, \PHPStan\Analyser\ExpressionContext $context) : \PHPStan\Analyser\ExpressionResult
    {
        if ($expr instanceof Expr\CallLike && $expr->isFirstClassCallable()) {
            if ($expr instanceof FuncCall) {
                $newExpr = new FunctionCallableNode($expr->name, $expr);
            } elseif ($expr instanceof MethodCall) {
                $newExpr = new MethodCallableNode($expr->var, $expr->name, $expr);
            } elseif ($expr instanceof StaticCall) {
                $newExpr = new StaticMethodCallableNode($expr->class, $expr->name, $expr);
            } elseif ($expr instanceof New_ && !$expr->class instanceof Class_) {
                $newExpr = new InstantiationCallableNode($expr->class, $expr);
            } else {
                throw new ShouldNotHappenException();
            }
            return $this->processExprNode($newExpr, $scope, $nodeCallback, $context);
        }
        $this->callNodeCallbackWithExpression($nodeCallback, $expr, $scope, $context);
        if ($expr instanceof Variable) {
            $hasYield = \false;
            $throwPoints = [];
            if ($expr->name instanceof Expr) {
                return $this->processExprNode($expr->name, $scope, $nodeCallback, $context->enterDeep());
            }
        } elseif ($expr instanceof Assign || $expr instanceof AssignRef) {
            $result = $this->processAssignVar($scope, $expr->var, $expr->expr, $nodeCallback, $context, function (\PHPStan\Analyser\MutatingScope $scope) use($expr, $nodeCallback, $context) : \PHPStan\Analyser\ExpressionResult {
                if ($expr instanceof AssignRef) {
                    $scope = $scope->enterExpressionAssign($expr->expr);
                }
                if ($expr->var instanceof Variable && is_string($expr->var->name)) {
                    $context = $context->enterRightSideAssign($expr->var->name, $scope->getType($expr->expr), $scope->getNativeType($expr->expr));
                }
                $result = $this->processExprNode($expr->expr, $scope, $nodeCallback, $context->enterDeep());
                $hasYield = $result->hasYield();
                $throwPoints = $result->getThrowPoints();
                $scope = $result->getScope();
                if ($expr instanceof AssignRef) {
                    $scope = $scope->exitExpressionAssign($expr->expr);
                }
                return new \PHPStan\Analyser\ExpressionResult($scope, $hasYield, $throwPoints);
            }, \true);
            $scope = $result->getScope();
            $hasYield = $result->hasYield();
            $throwPoints = $result->getThrowPoints();
            $vars = $this->getAssignedVariables($expr->var);
            if (count($vars) > 0) {
                $varChangedScope = \false;
                $scope = $this->processVarAnnotation($scope, $vars, $expr, $varChangedScope);
                if (!$varChangedScope) {
                    $scope = $this->processStmtVarAnnotation($scope, new Node\Stmt\Expression($expr, ['comments' => $expr->getAttribute('comments')]), null, $nodeCallback);
                }
            }
        } elseif ($expr instanceof Expr\AssignOp) {
            $result = $this->processAssignVar($scope, $expr->var, $expr, $nodeCallback, $context, function (\PHPStan\Analyser\MutatingScope $scope) use($expr, $nodeCallback, $context) : \PHPStan\Analyser\ExpressionResult {
                return $this->processExprNode($expr->expr, $scope, $nodeCallback, $context->enterDeep());
            }, $expr instanceof Expr\AssignOp\Coalesce);
            $scope = $result->getScope();
            $hasYield = $result->hasYield();
            $throwPoints = $result->getThrowPoints();
            if (($expr instanceof Expr\AssignOp\Div || $expr instanceof Expr\AssignOp\Mod) && !$scope->getType($expr->expr)->toNumber()->isSuperTypeOf(new ConstantIntegerType(0))->no()) {
                $throwPoints[] = \PHPStan\Analyser\ThrowPoint::createExplicit($scope, new ObjectType(DivisionByZeroError::class), $expr, \false);
            }
        } elseif ($expr instanceof FuncCall) {
            $parametersAcceptor = null;
            $functionReflection = null;
            $throwPoints = [];
            if ($expr->name instanceof Expr) {
                $nameType = $scope->getType($expr->name);
                if ($nameType->isCallable()->yes()) {
                    $parametersAcceptor = ParametersAcceptorSelector::selectFromArgs($scope, $expr->getArgs(), $nameType->getCallableParametersAcceptors($scope));
                }
                $nameResult = $this->processExprNode($expr->name, $scope, $nodeCallback, $context->enterDeep());
                $throwPoints = $nameResult->getThrowPoints();
                $scope = $nameResult->getScope();
            } elseif ($this->reflectionProvider->hasFunction($expr->name, $scope)) {
                $functionReflection = $this->reflectionProvider->getFunction($expr->name, $scope);
                $parametersAcceptor = ParametersAcceptorSelector::selectFromArgs($scope, $expr->getArgs(), $functionReflection->getVariants());
            }
            if ($parametersAcceptor !== null) {
                $expr = \PHPStan\Analyser\ArgumentsNormalizer::reorderFuncArguments($parametersAcceptor, $expr) ?? $expr;
            }
            $result = $this->processArgs($functionReflection, $parametersAcceptor, $expr->getArgs(), $scope, $nodeCallback, $context);
            $scope = $result->getScope();
            $hasYield = $result->hasYield();
            $throwPoints = array_merge($throwPoints, $result->getThrowPoints());
            if (isset($functionReflection)) {
                $functionThrowPoint = $this->getFunctionThrowPoint($functionReflection, $parametersAcceptor, $expr, $scope);
                if ($functionThrowPoint !== null) {
                    $throwPoints[] = $functionThrowPoint;
                }
            } else {
                $throwPoints[] = \PHPStan\Analyser\ThrowPoint::createImplicit($scope, $expr);
            }
            if (isset($functionReflection) && in_array($functionReflection->getName(), ['json_encode', 'json_decode'], \true)) {
                $scope = $scope->invalidateExpression(new FuncCall(new Name('json_last_error'), []))->invalidateExpression(new FuncCall(new Name\FullyQualified('json_last_error'), []))->invalidateExpression(new FuncCall(new Name('json_last_error_msg'), []))->invalidateExpression(new FuncCall(new Name\FullyQualified('json_last_error_msg'), []));
            }
            if (isset($functionReflection) && in_array($functionReflection->getName(), ['array_pop', 'array_shift'], \true) && count($expr->getArgs()) >= 1) {
                $arrayArg = $expr->getArgs()[0]->value;
                $arrayArgType = $scope->getType($arrayArg);
                $arrayArgNativeType = $scope->getNativeType($arrayArg);
                $isArrayPop = $functionReflection->getName() === 'array_pop';
                $scope = $scope->invalidateExpression($arrayArg)->assignExpression($arrayArg, $isArrayPop ? $arrayArgType->popArray() : $arrayArgType->shiftArray(), $isArrayPop ? $arrayArgNativeType->popArray() : $arrayArgNativeType->shiftArray());
            }
            if (isset($functionReflection) && in_array($functionReflection->getName(), ['array_push', 'array_unshift'], \true) && count($expr->getArgs()) >= 2) {
                $arrayType = $this->getArrayFunctionAppendingType($functionReflection, $scope, $expr);
                $arrayNativeType = $this->getArrayFunctionAppendingType($functionReflection, $scope->doNotTreatPhpDocTypesAsCertain(), $expr);
                $arrayArg = $expr->getArgs()[0]->value;
                $scope = $scope->invalidateExpression($arrayArg)->assignExpression($arrayArg, $arrayType, $arrayNativeType);
            }
            if (isset($functionReflection) && in_array($functionReflection->getName(), ['fopen', 'file_get_contents'], \true)) {
                $scope = $scope->assignVariable('http_response_header', new ArrayType(new IntegerType(), new StringType()), new ArrayType(new IntegerType(), new StringType()));
            }
            if (isset($functionReflection) && $functionReflection->getName() === 'shuffle') {
                $arrayArg = $expr->getArgs()[0]->value;
                $scope = $scope->assignExpression($arrayArg, $scope->getType($arrayArg)->shuffleArray(), $scope->getNativeType($arrayArg)->shuffleArray());
            }
            if (isset($functionReflection) && $functionReflection->getName() === 'array_splice' && count($expr->getArgs()) >= 1) {
                $arrayArg = $expr->getArgs()[0]->value;
                $arrayArgType = $scope->getType($arrayArg);
                $valueType = $arrayArgType->getIterableValueType();
                if (count($expr->getArgs()) >= 4) {
                    $valueType = TypeCombinator::union($valueType, $scope->getType($expr->getArgs()[3]->value)->getIterableValueType());
                }
                $scope = $scope->invalidateExpression($arrayArg)->assignExpression($arrayArg, new ArrayType($arrayArgType->getIterableKeyType(), $valueType), new ArrayType($arrayArgType->getIterableKeyType(), $valueType));
            }
            if (isset($functionReflection) && $functionReflection->getName() === 'extract') {
                $extractedArg = $expr->getArgs()[0]->value;
                $extractedType = $scope->getType($extractedArg);
                if (count($extractedType->getConstantArrays()) > 0) {
                    $properties = [];
                    $optionalProperties = [];
                    $refCount = [];
                    foreach ($extractedType->getConstantArrays() as $constantArray) {
                        foreach ($constantArray->getKeyTypes() as $i => $keyType) {
                            if ($keyType->isString()->no()) {
                                // integers as variable names not allowed
                                continue;
                            }
                            $key = (string) $keyType->getValue();
                            $valueType = $constantArray->getValueTypes()[$i];
                            $optional = $constantArray->isOptionalKey($i);
                            if ($optional) {
                                $optionalProperties[] = $key;
                            }
                            if (isset($properties[$key])) {
                                $properties[$key] = TypeCombinator::union($properties[$key], $valueType);
                                $refCount[$key]++;
                            } else {
                                $properties[$key] = $valueType;
                                $refCount[$key] = 1;
                            }
                        }
                    }
                    foreach ($properties as $name => $type) {
                        $optional = in_array($name, $optionalProperties, \true) || $refCount[$name] < count($extractedType->getConstantArrays());
                        $scope = $scope->assignVariable($name, $type, $type, $optional ? TrinaryLogic::createMaybe() : TrinaryLogic::createYes());
                    }
                } else {
                    $scope = $scope->afterExtractCall();
                }
            }
            if (isset($functionReflection) && ($functionReflection->getName() === 'clearstatcache' || $functionReflection->getName() === 'unlink')) {
                $scope = $scope->afterClearstatcacheCall();
            }
            if (isset($functionReflection) && str_starts_with($functionReflection->getName(), 'openssl')) {
                $scope = $scope->afterOpenSslCall($functionReflection->getName());
            }
            if (isset($functionReflection) && $functionReflection->hasSideEffects()->yes()) {
                foreach ($expr->getArgs() as $arg) {
                    $scope = $scope->invalidateExpression($arg->value, \true);
                }
            }
        } elseif ($expr instanceof MethodCall) {
            $originalScope = $scope;
            if (($expr->var instanceof Expr\Closure || $expr->var instanceof Expr\ArrowFunction) && $expr->name instanceof Node\Identifier && strtolower($expr->name->name) === 'call' && isset($expr->getArgs()[0])) {
                $closureCallScope = $scope->enterClosureCall($scope->getType($expr->getArgs()[0]->value), $scope->getNativeType($expr->getArgs()[0]->value));
            }
            $result = $this->processExprNode($expr->var, $closureCallScope ?? $scope, $nodeCallback, $context->enterDeep());
            $hasYield = $result->hasYield();
            $throwPoints = $result->getThrowPoints();
            $scope = $result->getScope();
            if (isset($closureCallScope)) {
                $scope = $scope->restoreOriginalScopeAfterClosureBind($originalScope);
            }
            $parametersAcceptor = null;
            $methodReflection = null;
            if ($expr->name instanceof Expr) {
                $methodNameResult = $this->processExprNode($expr->name, $scope, $nodeCallback, $context->enterDeep());
                $throwPoints = array_merge($throwPoints, $methodNameResult->getThrowPoints());
                $scope = $methodNameResult->getScope();
            } else {
                $calledOnType = $scope->getType($expr->var);
                $methodName = $expr->name->name;
                $methodReflection = $scope->getMethodReflection($calledOnType, $methodName);
                if ($methodReflection !== null) {
                    $parametersAcceptor = ParametersAcceptorSelector::selectFromArgs($scope, $expr->getArgs(), $methodReflection->getVariants());
                    $methodThrowPoint = $this->getMethodThrowPoint($methodReflection, $parametersAcceptor, $expr, $scope);
                    if ($methodThrowPoint !== null) {
                        $throwPoints[] = $methodThrowPoint;
                    }
                }
            }
            if ($parametersAcceptor !== null) {
                $expr = \PHPStan\Analyser\ArgumentsNormalizer::reorderMethodArguments($parametersAcceptor, $expr) ?? $expr;
            }
            $result = $this->processArgs($methodReflection, $parametersAcceptor, $expr->getArgs(), $scope, $nodeCallback, $context);
            $scope = $result->getScope();
            if ($methodReflection !== null) {
                $hasSideEffects = $methodReflection->hasSideEffects();
                if ($hasSideEffects->yes() || $methodReflection->getName() === '__construct') {
                    $scope = $scope->invalidateExpression($expr->var, \true);
                    foreach ($expr->getArgs() as $arg) {
                        $scope = $scope->invalidateExpression($arg->value, \true);
                    }
                }
                if ($parametersAcceptor !== null) {
                    $selfOutType = $methodReflection->getSelfOutType();
                    if ($selfOutType !== null) {
                        $scope = $scope->assignExpression($expr->var, TemplateTypeHelper::resolveTemplateTypes($selfOutType, $parametersAcceptor->getResolvedTemplateTypeMap()), $scope->getNativeType($expr->var));
                    }
                }
            } else {
                $throwPoints[] = \PHPStan\Analyser\ThrowPoint::createImplicit($scope, $expr);
            }
            $hasYield = $hasYield || $result->hasYield();
            $throwPoints = array_merge($throwPoints, $result->getThrowPoints());
        } elseif ($expr instanceof Expr\NullsafeMethodCall) {
            $nonNullabilityResult = $this->ensureShallowNonNullability($scope, $scope, $expr->var);
            $exprResult = $this->processExprNode(new MethodCall($expr->var, $expr->name, $expr->args, $expr->getAttributes()), $nonNullabilityResult->getScope(), $nodeCallback, $context);
            $scope = $this->revertNonNullability($exprResult->getScope(), $nonNullabilityResult->getSpecifiedExpressions());
            return new \PHPStan\Analyser\ExpressionResult($scope, $exprResult->hasYield(), $exprResult->getThrowPoints(), static function () use($scope, $expr) : \PHPStan\Analyser\MutatingScope {
                return $scope->filterByTruthyValue($expr);
            }, static function () use($scope, $expr) : \PHPStan\Analyser\MutatingScope {
                return $scope->filterByFalseyValue($expr);
            });
        } elseif ($expr instanceof StaticCall) {
            $hasYield = \false;
            $throwPoints = [];
            if ($expr->class instanceof Expr) {
                $objectClasses = $scope->getType($expr->class)->getObjectClassNames();
                if (count($objectClasses) !== 1) {
                    $objectClasses = $scope->getType(new New_($expr->class))->getObjectClassNames();
                }
                if (count($objectClasses) === 1) {
                    $objectExprResult = $this->processExprNode(new StaticCall(new Name($objectClasses[0]), $expr->name, []), $scope, static function () : void {
                    }, $context->enterDeep());
                    $additionalThrowPoints = $objectExprResult->getThrowPoints();
                } else {
                    $additionalThrowPoints = [\PHPStan\Analyser\ThrowPoint::createImplicit($scope, $expr)];
                }
                $classResult = $this->processExprNode($expr->class, $scope, $nodeCallback, $context->enterDeep());
                $hasYield = $classResult->hasYield();
                $throwPoints = array_merge($throwPoints, $classResult->getThrowPoints());
                foreach ($additionalThrowPoints as $throwPoint) {
                    $throwPoints[] = $throwPoint;
                }
                $scope = $classResult->getScope();
            }
            $parametersAcceptor = null;
            $methodReflection = null;
            if ($expr->name instanceof Expr) {
                $result = $this->processExprNode($expr->name, $scope, $nodeCallback, $context->enterDeep());
                $hasYield = $hasYield || $result->hasYield();
                $throwPoints = array_merge($throwPoints, $result->getThrowPoints());
                $scope = $result->getScope();
            } elseif ($expr->class instanceof Name) {
                $className = $scope->resolveName($expr->class);
                if ($this->reflectionProvider->hasClass($className)) {
                    $classReflection = $this->reflectionProvider->getClass($className);
                    $methodName = $expr->name->name;
                    if ($classReflection->hasMethod($methodName)) {
                        $methodReflection = $classReflection->getMethod($methodName, $scope);
                        $parametersAcceptor = ParametersAcceptorSelector::selectFromArgs($scope, $expr->getArgs(), $methodReflection->getVariants());
                        $methodThrowPoint = $this->getStaticMethodThrowPoint($methodReflection, $parametersAcceptor, $expr, $scope);
                        if ($methodThrowPoint !== null) {
                            $throwPoints[] = $methodThrowPoint;
                        }
                        if ($classReflection->getName() === 'Closure' && strtolower($methodName) === 'bind') {
                            $thisType = null;
                            $nativeThisType = null;
                            if (isset($expr->getArgs()[1])) {
                                $argType = $scope->getType($expr->getArgs()[1]->value);
                                if ($argType->isNull()->yes()) {
                                    $thisType = null;
                                } else {
                                    $thisType = $argType;
                                }
                                $nativeArgType = $scope->getNativeType($expr->getArgs()[1]->value);
                                if ($nativeArgType->isNull()->yes()) {
                                    $nativeThisType = null;
                                } else {
                                    $nativeThisType = $nativeArgType;
                                }
                            }
                            $scopeClasses = ['static'];
                            if (isset($expr->getArgs()[2])) {
                                $argValue = $expr->getArgs()[2]->value;
                                $argValueType = $scope->getType($argValue);
                                $scopeClasses = [];
                                $directClassNames = $argValueType->getObjectClassNames();
                                if (count($directClassNames) > 0) {
                                    $scopeClasses = $directClassNames;
                                    $thisTypes = [];
                                    foreach ($directClassNames as $directClassName) {
                                        $thisTypes[] = new ObjectType($directClassName);
                                    }
                                    $thisType = TypeCombinator::union(...$thisTypes);
                                } else {
                                    $thisType = $argValueType->getClassStringObjectType();
                                    $scopeClasses = $thisType->getObjectClassNames();
                                }
                            }
                            $closureBindScope = $scope->enterClosureBind($thisType, $nativeThisType, $scopeClasses);
                        }
                    } else {
                        $throwPoints[] = \PHPStan\Analyser\ThrowPoint::createImplicit($scope, $expr);
                    }
                } else {
                    $throwPoints[] = \PHPStan\Analyser\ThrowPoint::createImplicit($scope, $expr);
                }
            }
            if ($parametersAcceptor !== null) {
                $expr = \PHPStan\Analyser\ArgumentsNormalizer::reorderStaticCallArguments($parametersAcceptor, $expr) ?? $expr;
            }
            $result = $this->processArgs($methodReflection, $parametersAcceptor, $expr->getArgs(), $scope, $nodeCallback, $context, $closureBindScope ?? null);
            $scope = $result->getScope();
            $scopeFunction = $scope->getFunction();
            if ($methodReflection !== null && !$methodReflection->isStatic() && ($methodReflection->hasSideEffects()->yes() || $methodReflection->getName() === '__construct') && $scopeFunction instanceof MethodReflection && !$scopeFunction->isStatic() && $scope->isInClass() && ($scope->getClassReflection()->getName() === $methodReflection->getDeclaringClass()->getName() || $scope->getClassReflection()->isSubclassOf($methodReflection->getDeclaringClass()->getName()))) {
                $scope = $scope->invalidateExpression(new Variable('this'), \true);
            }
            if ($methodReflection !== null) {
                if ($methodReflection->hasSideEffects()->yes() || $methodReflection->getName() === '__construct') {
                    foreach ($expr->getArgs() as $arg) {
                        $scope = $scope->invalidateExpression($arg->value, \true);
                    }
                }
            }
            $hasYield = $hasYield || $result->hasYield();
            $throwPoints = array_merge($throwPoints, $result->getThrowPoints());
        } elseif ($expr instanceof PropertyFetch) {
            $result = $this->processExprNode($expr->var, $scope, $nodeCallback, $context->enterDeep());
            $hasYield = $result->hasYield();
            $throwPoints = $result->getThrowPoints();
            $scope = $result->getScope();
            if ($expr->name instanceof Expr) {
                $result = $this->processExprNode($expr->name, $scope, $nodeCallback, $context->enterDeep());
                $hasYield = $hasYield || $result->hasYield();
                $scope = $result->getScope();
            }
        } elseif ($expr instanceof Expr\NullsafePropertyFetch) {
            $nonNullabilityResult = $this->ensureShallowNonNullability($scope, $scope, $expr->var);
            $exprResult = $this->processExprNode(new PropertyFetch($expr->var, $expr->name, $expr->getAttributes()), $nonNullabilityResult->getScope(), $nodeCallback, $context);
            $scope = $this->revertNonNullability($exprResult->getScope(), $nonNullabilityResult->getSpecifiedExpressions());
            return new \PHPStan\Analyser\ExpressionResult($scope, $exprResult->hasYield(), $exprResult->getThrowPoints(), static function () use($scope, $expr) : \PHPStan\Analyser\MutatingScope {
                return $scope->filterByTruthyValue($expr);
            }, static function () use($scope, $expr) : \PHPStan\Analyser\MutatingScope {
                return $scope->filterByFalseyValue($expr);
            });
        } elseif ($expr instanceof StaticPropertyFetch) {
            $hasYield = \false;
            $throwPoints = [];
            if ($expr->class instanceof Expr) {
                $result = $this->processExprNode($expr->class, $scope, $nodeCallback, $context->enterDeep());
                $hasYield = $result->hasYield();
                $throwPoints = $result->getThrowPoints();
                $scope = $result->getScope();
            }
            if ($expr->name instanceof Expr) {
                $result = $this->processExprNode($expr->name, $scope, $nodeCallback, $context->enterDeep());
                $hasYield = $hasYield || $result->hasYield();
                $throwPoints = array_merge($throwPoints, $result->getThrowPoints());
                $scope = $result->getScope();
            }
        } elseif ($expr instanceof Expr\Closure) {
            return $this->processClosureNode($expr, $scope, $nodeCallback, $context, null);
        } elseif ($expr instanceof Expr\ClosureUse) {
            $this->processExprNode($expr->var, $scope, $nodeCallback, $context);
            $hasYield = \false;
            $throwPoints = [];
        } elseif ($expr instanceof Expr\ArrowFunction) {
            return $this->processArrowFunctionNode($expr, $scope, $nodeCallback, $context, null);
        } elseif ($expr instanceof ErrorSuppress) {
            $result = $this->processExprNode($expr->expr, $scope, $nodeCallback, $context);
            $hasYield = $result->hasYield();
            $throwPoints = $result->getThrowPoints();
            $scope = $result->getScope();
        } elseif ($expr instanceof Exit_) {
            $hasYield = \false;
            $throwPoints = [];
            if ($expr->expr !== null) {
                $result = $this->processExprNode($expr->expr, $scope, $nodeCallback, $context->enterDeep());
                $hasYield = $result->hasYield();
                $throwPoints = $result->getThrowPoints();
                $scope = $result->getScope();
            }
        } elseif ($expr instanceof Node\Scalar\Encapsed) {
            $hasYield = \false;
            $throwPoints = [];
            foreach ($expr->parts as $part) {
                $result = $this->processExprNode($part, $scope, $nodeCallback, $context->enterDeep());
                $hasYield = $hasYield || $result->hasYield();
                $throwPoints = array_merge($throwPoints, $result->getThrowPoints());
                $scope = $result->getScope();
            }
        } elseif ($expr instanceof ArrayDimFetch) {
            $hasYield = \false;
            $throwPoints = [];
            if ($expr->dim !== null) {
                $result = $this->processExprNode($expr->dim, $scope, $nodeCallback, $context->enterDeep());
                $hasYield = $result->hasYield();
                $throwPoints = $result->getThrowPoints();
                $scope = $result->getScope();
            }
            $result = $this->processExprNode($expr->var, $scope, $nodeCallback, $context->enterDeep());
            $hasYield = $hasYield || $result->hasYield();
            $throwPoints = array_merge($throwPoints, $result->getThrowPoints());
            $scope = $result->getScope();
        } elseif ($expr instanceof Array_) {
            $itemNodes = [];
            $hasYield = \false;
            $throwPoints = [];
            foreach ($expr->items as $arrayItem) {
                $itemNodes[] = new LiteralArrayItem($scope, $arrayItem);
                if ($arrayItem === null) {
                    continue;
                }
                $result = $this->processExprNode($arrayItem, $scope, $nodeCallback, $context->enterDeep());
                $hasYield = $hasYield || $result->hasYield();
                $throwPoints = array_merge($throwPoints, $result->getThrowPoints());
                $scope = $result->getScope();
            }
            $nodeCallback(new LiteralArrayNode($expr, $itemNodes), $scope);
        } elseif ($expr instanceof ArrayItem) {
            $hasYield = \false;
            $throwPoints = [];
            if ($expr->key !== null) {
                $result = $this->processExprNode($expr->key, $scope, $nodeCallback, $context->enterDeep());
                $hasYield = $result->hasYield();
                $throwPoints = $result->getThrowPoints();
                $scope = $result->getScope();
            }
            $result = $this->processExprNode($expr->value, $scope, $nodeCallback, $context->enterDeep());
            $hasYield = $hasYield || $result->hasYield();
            $throwPoints = array_merge($throwPoints, $result->getThrowPoints());
            $scope = $result->getScope();
        } elseif ($expr instanceof BooleanAnd || $expr instanceof BinaryOp\LogicalAnd) {
            $leftResult = $this->processExprNode($expr->left, $scope, $nodeCallback, $context->enterDeep());
            $rightResult = $this->processExprNode($expr->right, $leftResult->getTruthyScope(), $nodeCallback, $context);
            $rightExprType = $rightResult->getScope()->getType($expr->right);
            if ($rightExprType instanceof NeverType && $rightExprType->isExplicit()) {
                $leftMergedWithRightScope = $leftResult->getFalseyScope();
            } else {
                $leftMergedWithRightScope = $leftResult->getScope()->mergeWith($rightResult->getScope());
            }
            $this->callNodeCallbackWithExpression($nodeCallback, new BooleanAndNode($expr, $leftResult->getTruthyScope()), $scope, $context);
            return new \PHPStan\Analyser\ExpressionResult($leftMergedWithRightScope, $leftResult->hasYield() || $rightResult->hasYield(), array_merge($leftResult->getThrowPoints(), $rightResult->getThrowPoints()), static function () use($rightResult, $expr) : \PHPStan\Analyser\MutatingScope {
                return $rightResult->getScope()->filterByTruthyValue($expr);
            }, static function () use($leftMergedWithRightScope, $expr) : \PHPStan\Analyser\MutatingScope {
                return $leftMergedWithRightScope->filterByFalseyValue($expr);
            });
        } elseif ($expr instanceof BooleanOr || $expr instanceof BinaryOp\LogicalOr) {
            $leftResult = $this->processExprNode($expr->left, $scope, $nodeCallback, $context->enterDeep());
            $rightResult = $this->processExprNode($expr->right, $leftResult->getFalseyScope(), $nodeCallback, $context);
            $rightExprType = $rightResult->getScope()->getType($expr->right);
            if ($rightExprType instanceof NeverType && $rightExprType->isExplicit()) {
                $leftMergedWithRightScope = $leftResult->getTruthyScope();
            } else {
                $leftMergedWithRightScope = $leftResult->getScope()->mergeWith($rightResult->getScope());
            }
            $this->callNodeCallbackWithExpression($nodeCallback, new BooleanOrNode($expr, $leftResult->getFalseyScope()), $scope, $context);
            return new \PHPStan\Analyser\ExpressionResult($leftMergedWithRightScope, $leftResult->hasYield() || $rightResult->hasYield(), array_merge($leftResult->getThrowPoints(), $rightResult->getThrowPoints()), static function () use($leftMergedWithRightScope, $expr) : \PHPStan\Analyser\MutatingScope {
                return $leftMergedWithRightScope->filterByTruthyValue($expr);
            }, static function () use($rightResult, $expr) : \PHPStan\Analyser\MutatingScope {
                return $rightResult->getScope()->filterByFalseyValue($expr);
            });
        } elseif ($expr instanceof Coalesce) {
            $nonNullabilityResult = $this->ensureNonNullability($scope, $expr->left);
            $condScope = $this->lookForSetAllowedUndefinedExpressions($nonNullabilityResult->getScope(), $expr->left);
            $condResult = $this->processExprNode($expr->left, $condScope, $nodeCallback, $context->enterDeep());
            $scope = $this->revertNonNullability($condResult->getScope(), $nonNullabilityResult->getSpecifiedExpressions());
            $scope = $this->lookForUnsetAllowedUndefinedExpressions($scope, $expr->left);
            $rightScope = $scope->filterByFalseyValue(new Expr\Isset_([$expr->left]));
            $rightResult = $this->processExprNode($expr->right, $rightScope, $nodeCallback, $context->enterDeep());
            $rightExprType = $scope->getType($expr->right);
            if ($rightExprType instanceof NeverType && $rightExprType->isExplicit()) {
                $scope = $scope->filterByTruthyValue(new Expr\Isset_([$expr->left]));
            } else {
                $scope = $scope->filterByTruthyValue(new Expr\Isset_([$expr->left]))->mergeWith($rightResult->getScope());
            }
            $hasYield = $condResult->hasYield() || $rightResult->hasYield();
            $throwPoints = array_merge($condResult->getThrowPoints(), $rightResult->getThrowPoints());
        } elseif ($expr instanceof BinaryOp) {
            $result = $this->processExprNode($expr->left, $scope, $nodeCallback, $context->enterDeep());
            $scope = $result->getScope();
            $hasYield = $result->hasYield();
            $throwPoints = $result->getThrowPoints();
            $result = $this->processExprNode($expr->right, $scope, $nodeCallback, $context->enterDeep());
            if (($expr instanceof BinaryOp\Div || $expr instanceof BinaryOp\Mod) && !$scope->getType($expr->right)->toNumber()->isSuperTypeOf(new ConstantIntegerType(0))->no()) {
                $throwPoints[] = \PHPStan\Analyser\ThrowPoint::createExplicit($scope, new ObjectType(DivisionByZeroError::class), $expr, \false);
            }
            $scope = $result->getScope();
            $hasYield = $hasYield || $result->hasYield();
            $throwPoints = array_merge($throwPoints, $result->getThrowPoints());
        } elseif ($expr instanceof Expr\Include_) {
            $result = $this->processExprNode($expr->expr, $scope, $nodeCallback, $context->enterDeep());
            $throwPoints = $result->getThrowPoints();
            $throwPoints[] = \PHPStan\Analyser\ThrowPoint::createImplicit($scope, $expr);
            $hasYield = $result->hasYield();
            $scope = $result->getScope();
        } elseif ($expr instanceof Expr\BitwiseNot || $expr instanceof Cast || $expr instanceof Expr\Clone_ || $expr instanceof Expr\Print_ || $expr instanceof Expr\UnaryMinus || $expr instanceof Expr\UnaryPlus) {
            $result = $this->processExprNode($expr->expr, $scope, $nodeCallback, $context->enterDeep());
            $throwPoints = $result->getThrowPoints();
            $hasYield = $result->hasYield();
            $scope = $result->getScope();
        } elseif ($expr instanceof Expr\Eval_) {
            $result = $this->processExprNode($expr->expr, $scope, $nodeCallback, $context->enterDeep());
            $throwPoints = $result->getThrowPoints();
            $throwPoints[] = \PHPStan\Analyser\ThrowPoint::createImplicit($scope, $expr);
            $hasYield = $result->hasYield();
            $scope = $result->getScope();
        } elseif ($expr instanceof Expr\YieldFrom) {
            $result = $this->processExprNode($expr->expr, $scope, $nodeCallback, $context->enterDeep());
            $throwPoints = $result->getThrowPoints();
            $throwPoints[] = \PHPStan\Analyser\ThrowPoint::createImplicit($scope, $expr);
            $hasYield = \true;
            $scope = $result->getScope();
        } elseif ($expr instanceof BooleanNot) {
            $result = $this->processExprNode($expr->expr, $scope, $nodeCallback, $context->enterDeep());
            $scope = $result->getScope();
            $hasYield = $result->hasYield();
            $throwPoints = $result->getThrowPoints();
        } elseif ($expr instanceof Expr\ClassConstFetch) {
            $hasYield = \false;
            $throwPoints = [];
            if ($expr->class instanceof Expr) {
                $result = $this->processExprNode($expr->class, $scope, $nodeCallback, $context->enterDeep());
                $scope = $result->getScope();
                $hasYield = $result->hasYield();
                $throwPoints = $result->getThrowPoints();
            }
        } elseif ($expr instanceof Expr\Empty_) {
            $nonNullabilityResult = $this->ensureNonNullability($scope, $expr->expr);
            $scope = $this->lookForSetAllowedUndefinedExpressions($nonNullabilityResult->getScope(), $expr->expr);
            $result = $this->processExprNode($expr->expr, $scope, $nodeCallback, $context->enterDeep());
            $scope = $result->getScope();
            $hasYield = $result->hasYield();
            $throwPoints = $result->getThrowPoints();
            $scope = $this->revertNonNullability($scope, $nonNullabilityResult->getSpecifiedExpressions());
            $scope = $this->lookForUnsetAllowedUndefinedExpressions($scope, $expr->expr);
        } elseif ($expr instanceof Expr\Isset_) {
            $hasYield = \false;
            $throwPoints = [];
            $nonNullabilityResults = [];
            foreach ($expr->vars as $var) {
                $nonNullabilityResult = $this->ensureNonNullability($scope, $var);
                $scope = $this->lookForSetAllowedUndefinedExpressions($nonNullabilityResult->getScope(), $var);
                $result = $this->processExprNode($var, $scope, $nodeCallback, $context->enterDeep());
                $scope = $result->getScope();
                $hasYield = $hasYield || $result->hasYield();
                $throwPoints = array_merge($throwPoints, $result->getThrowPoints());
                $nonNullabilityResults[] = $nonNullabilityResult;
            }
            foreach (array_reverse($expr->vars) as $var) {
                $scope = $this->lookForUnsetAllowedUndefinedExpressions($scope, $var);
            }
            foreach (array_reverse($nonNullabilityResults) as $nonNullabilityResult) {
                $scope = $this->revertNonNullability($scope, $nonNullabilityResult->getSpecifiedExpressions());
            }
        } elseif ($expr instanceof Instanceof_) {
            $result = $this->processExprNode($expr->expr, $scope, $nodeCallback, $context->enterDeep());
            $scope = $result->getScope();
            $hasYield = $result->hasYield();
            $throwPoints = $result->getThrowPoints();
            if ($expr->class instanceof Expr) {
                $result = $this->processExprNode($expr->class, $scope, $nodeCallback, $context->enterDeep());
                $scope = $result->getScope();
                $hasYield = $hasYield || $result->hasYield();
                $throwPoints = array_merge($throwPoints, $result->getThrowPoints());
            }
        } elseif ($expr instanceof List_) {
            // only in assign and foreach, processed elsewhere
            return new \PHPStan\Analyser\ExpressionResult($scope, \false, []);
        } elseif ($expr instanceof New_) {
            $parametersAcceptor = null;
            $constructorReflection = null;
            $hasYield = \false;
            $throwPoints = [];
            if ($expr->class instanceof Expr) {
                $objectClasses = $scope->getType($expr)->getObjectClassNames();
                if (count($objectClasses) === 1) {
                    $objectExprResult = $this->processExprNode(new New_(new Name($objectClasses[0])), $scope, static function () : void {
                    }, $context->enterDeep());
                    $additionalThrowPoints = $objectExprResult->getThrowPoints();
                } else {
                    $additionalThrowPoints = [\PHPStan\Analyser\ThrowPoint::createImplicit($scope, $expr)];
                }
                $result = $this->processExprNode($expr->class, $scope, $nodeCallback, $context->enterDeep());
                $scope = $result->getScope();
                $hasYield = $result->hasYield();
                $throwPoints = $result->getThrowPoints();
                foreach ($additionalThrowPoints as $throwPoint) {
                    $throwPoints[] = $throwPoint;
                }
            } elseif ($expr->class instanceof Class_) {
                $this->reflectionProvider->getAnonymousClassReflection($expr->class, $scope);
                // populates $expr->class->name
                $this->processStmtNode($expr->class, $scope, $nodeCallback, \PHPStan\Analyser\StatementContext::createTopLevel());
            } else {
                $className = $scope->resolveName($expr->class);
                if ($this->reflectionProvider->hasClass($className)) {
                    $classReflection = $this->reflectionProvider->getClass($className);
                    if ($classReflection->hasConstructor()) {
                        $constructorReflection = $classReflection->getConstructor();
                        $parametersAcceptor = ParametersAcceptorSelector::selectFromArgs($scope, $expr->getArgs(), $constructorReflection->getVariants());
                        $hasSideEffects = $constructorReflection->hasSideEffects();
                        if ($hasSideEffects->yes()) {
                            foreach ($expr->getArgs() as $arg) {
                                $scope = $scope->invalidateExpression($arg->value, \true);
                            }
                        }
                        $constructorThrowPoint = $this->getConstructorThrowPoint($constructorReflection, $parametersAcceptor, $classReflection, $expr, $expr->class, $expr->getArgs(), $scope);
                        if ($constructorThrowPoint !== null) {
                            $throwPoints[] = $constructorThrowPoint;
                        }
                    }
                } else {
                    $throwPoints[] = \PHPStan\Analyser\ThrowPoint::createImplicit($scope, $expr);
                }
            }
            if ($parametersAcceptor !== null) {
                $expr = \PHPStan\Analyser\ArgumentsNormalizer::reorderNewArguments($parametersAcceptor, $expr) ?? $expr;
            }
            $result = $this->processArgs($constructorReflection, $parametersAcceptor, $expr->getArgs(), $scope, $nodeCallback, $context);
            $scope = $result->getScope();
            $hasYield = $hasYield || $result->hasYield();
            $throwPoints = array_merge($throwPoints, $result->getThrowPoints());
        } elseif ($expr instanceof Expr\PreInc || $expr instanceof Expr\PostInc || $expr instanceof Expr\PreDec || $expr instanceof Expr\PostDec) {
            $result = $this->processExprNode($expr->var, $scope, $nodeCallback, $context->enterDeep());
            $scope = $result->getScope();
            $hasYield = $result->hasYield();
            $throwPoints = [];
            $newExpr = $expr;
            if ($expr instanceof Expr\PostInc) {
                $newExpr = new Expr\PreInc($expr->var);
            } elseif ($expr instanceof Expr\PostDec) {
                $newExpr = new Expr\PreDec($expr->var);
            }
            $scope = $this->processAssignVar($scope, $expr->var, $newExpr, static function (Node $node, \PHPStan\Analyser\Scope $scope) use($nodeCallback) : void {
                if (!$node instanceof PropertyAssignNode) {
                    return;
                }
                $nodeCallback($node, $scope);
            }, $context, static function (\PHPStan\Analyser\MutatingScope $scope) : \PHPStan\Analyser\ExpressionResult {
                return new \PHPStan\Analyser\ExpressionResult($scope, \false, []);
            }, \false)->getScope();
        } elseif ($expr instanceof Ternary) {
            $ternaryCondResult = $this->processExprNode($expr->cond, $scope, $nodeCallback, $context->enterDeep());
            $throwPoints = $ternaryCondResult->getThrowPoints();
            $ifTrueScope = $ternaryCondResult->getTruthyScope();
            $ifFalseScope = $ternaryCondResult->getFalseyScope();
            $ifTrueType = null;
            if ($expr->if !== null) {
                $ifResult = $this->processExprNode($expr->if, $ifTrueScope, $nodeCallback, $context);
                $throwPoints = array_merge($throwPoints, $ifResult->getThrowPoints());
                $ifTrueScope = $ifResult->getScope();
                $ifTrueType = $ifTrueScope->getType($expr->if);
            }
            $elseResult = $this->processExprNode($expr->else, $ifFalseScope, $nodeCallback, $context);
            $throwPoints = array_merge($throwPoints, $elseResult->getThrowPoints());
            $ifFalseScope = $elseResult->getScope();
            if ($ifTrueType instanceof NeverType && $ifTrueType->isExplicit()) {
                $finalScope = $ifFalseScope;
            } else {
                $ifFalseType = $ifFalseScope->getType($expr->else);
                if ($ifFalseType instanceof NeverType && $ifFalseType->isExplicit()) {
                    $finalScope = $ifTrueScope;
                } else {
                    $finalScope = $ifTrueScope->mergeWith($ifFalseScope);
                }
            }
            return new \PHPStan\Analyser\ExpressionResult($finalScope, $ternaryCondResult->hasYield(), $throwPoints, static function () use($finalScope, $expr) : \PHPStan\Analyser\MutatingScope {
                return $finalScope->filterByTruthyValue($expr);
            }, static function () use($finalScope, $expr) : \PHPStan\Analyser\MutatingScope {
                return $finalScope->filterByFalseyValue($expr);
            });
        } elseif ($expr instanceof Expr\Yield_) {
            $throwPoints = [\PHPStan\Analyser\ThrowPoint::createImplicit($scope, $expr)];
            if ($expr->key !== null) {
                $keyResult = $this->processExprNode($expr->key, $scope, $nodeCallback, $context->enterDeep());
                $scope = $keyResult->getScope();
                $throwPoints = $keyResult->getThrowPoints();
            }
            if ($expr->value !== null) {
                $valueResult = $this->processExprNode($expr->value, $scope, $nodeCallback, $context->enterDeep());
                $scope = $valueResult->getScope();
                $throwPoints = array_merge($throwPoints, $valueResult->getThrowPoints());
            }
            $hasYield = \true;
        } elseif ($expr instanceof Expr\Match_) {
            $deepContext = $context->enterDeep();
            $condResult = $this->processExprNode($expr->cond, $scope, $nodeCallback, $deepContext);
            $scope = $condResult->getScope();
            $hasYield = $condResult->hasYield();
            $throwPoints = $condResult->getThrowPoints();
            $matchScope = $scope;
            $armNodes = [];
            $hasDefaultCond = \false;
            $hasAlwaysTrueCond = \false;
            foreach ($expr->arms as $arm) {
                if ($arm->conds === null) {
                    $hasDefaultCond = \true;
                    $matchArmBody = new MatchExpressionArmBody($matchScope, $arm->body);
                    $armNodes[] = new MatchExpressionArm($matchArmBody, [], $arm->getLine());
                    $armResult = $this->processExprNode($arm->body, $matchScope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createTopLevel());
                    $matchScope = $armResult->getScope();
                    $hasYield = $hasYield || $armResult->hasYield();
                    $throwPoints = array_merge($throwPoints, $armResult->getThrowPoints());
                    $scope = $scope->mergeWith($matchScope);
                    continue;
                }
                if (count($arm->conds) === 0) {
                    throw new ShouldNotHappenException();
                }
                $filteringExpr = null;
                $armCondScope = $matchScope;
                $condNodes = [];
                foreach ($arm->conds as $armCond) {
                    $condNodes[] = new MatchExpressionArmCondition($armCond, $armCondScope, $armCond->getLine());
                    $armCondResult = $this->processExprNode($armCond, $armCondScope, $nodeCallback, $deepContext);
                    $hasYield = $hasYield || $armCondResult->hasYield();
                    $throwPoints = array_merge($throwPoints, $armCondResult->getThrowPoints());
                    $armCondExpr = new BinaryOp\Identical($expr->cond, $armCond);
                    $armCondResultScope = $armCondResult->getScope();
                    $armCondType = $this->treatPhpDocTypesAsCertain ? $armCondResultScope->getType($armCondExpr) : $armCondResultScope->getNativeType($armCondExpr);
                    if ($armCondType->isTrue()->yes()) {
                        $hasAlwaysTrueCond = \true;
                    }
                    $armCondScope = $armCondResult->getScope()->filterByFalseyValue($armCondExpr);
                    if ($filteringExpr === null) {
                        $filteringExpr = $armCondExpr;
                        continue;
                    }
                    $filteringExpr = new BinaryOp\BooleanOr($filteringExpr, $armCondExpr);
                }
                $bodyScope = $matchScope->filterByTruthyValue($filteringExpr);
                $matchArmBody = new MatchExpressionArmBody($bodyScope, $arm->body);
                $armNodes[] = new MatchExpressionArm($matchArmBody, $condNodes, $arm->getLine());
                $armResult = $this->processExprNode($arm->body, $bodyScope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createTopLevel());
                $armScope = $armResult->getScope();
                $scope = $scope->mergeWith($armScope);
                $hasYield = $hasYield || $armResult->hasYield();
                $throwPoints = array_merge($throwPoints, $armResult->getThrowPoints());
                $matchScope = $matchScope->filterByFalseyValue($filteringExpr);
            }
            $remainingType = $matchScope->getType($expr->cond);
            if (!$hasDefaultCond && !$hasAlwaysTrueCond && !$remainingType instanceof NeverType) {
                $throwPoints[] = \PHPStan\Analyser\ThrowPoint::createExplicit($scope, new ObjectType(UnhandledMatchError::class), $expr, \false);
            }
            $nodeCallback(new MatchExpressionNode($expr->cond, $armNodes, $expr, $matchScope), $scope);
        } elseif ($expr instanceof Expr\Throw_) {
            $hasYield = \false;
            $result = $this->processExprNode($expr->expr, $scope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep());
            $throwPoints = $result->getThrowPoints();
            $throwPoints[] = \PHPStan\Analyser\ThrowPoint::createExplicit($scope, $scope->getType($expr->expr), $expr, \false);
        } elseif ($expr instanceof FunctionCallableNode) {
            $throwPoints = [];
            $hasYield = \false;
            if ($expr->getName() instanceof Expr) {
                $result = $this->processExprNode($expr->getName(), $scope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep());
                $scope = $result->getScope();
                $hasYield = $result->hasYield();
                $throwPoints = $result->getThrowPoints();
            }
        } elseif ($expr instanceof MethodCallableNode) {
            $result = $this->processExprNode($expr->getVar(), $scope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep());
            $scope = $result->getScope();
            $hasYield = $result->hasYield();
            $throwPoints = $result->getThrowPoints();
            if ($expr->getName() instanceof Expr) {
                $nameResult = $this->processExprNode($expr->getVar(), $scope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep());
                $scope = $nameResult->getScope();
                $hasYield = $hasYield || $nameResult->hasYield();
                $throwPoints = array_merge($throwPoints, $nameResult->getThrowPoints());
            }
        } elseif ($expr instanceof StaticMethodCallableNode) {
            $throwPoints = [];
            $hasYield = \false;
            if ($expr->getClass() instanceof Expr) {
                $classResult = $this->processExprNode($expr->getClass(), $scope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep());
                $scope = $classResult->getScope();
                $hasYield = $classResult->hasYield();
                $throwPoints = $classResult->getThrowPoints();
            }
            if ($expr->getName() instanceof Expr) {
                $nameResult = $this->processExprNode($expr->getName(), $scope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep());
                $scope = $nameResult->getScope();
                $hasYield = $hasYield || $nameResult->hasYield();
                $throwPoints = array_merge($throwPoints, $nameResult->getThrowPoints());
            }
        } elseif ($expr instanceof InstantiationCallableNode) {
            $throwPoints = [];
            $hasYield = \false;
            if ($expr->getClass() instanceof Expr) {
                $classResult = $this->processExprNode($expr->getClass(), $scope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep());
                $scope = $classResult->getScope();
                $hasYield = $classResult->hasYield();
                $throwPoints = $classResult->getThrowPoints();
            }
        } elseif ($expr instanceof Node\Scalar) {
            $hasYield = \false;
            $throwPoints = [];
        } else {
            $hasYield = \false;
            $throwPoints = [];
        }
        return new \PHPStan\Analyser\ExpressionResult($scope, $hasYield, $throwPoints, static function () use($scope, $expr) : \PHPStan\Analyser\MutatingScope {
            return $scope->filterByTruthyValue($expr);
        }, static function () use($scope, $expr) : \PHPStan\Analyser\MutatingScope {
            return $scope->filterByFalseyValue($expr);
        });
    }
    private function getArrayFunctionAppendingType(FunctionReflection $functionReflection, \PHPStan\Analyser\Scope $scope, FuncCall $expr) : Type
    {
        $arrayArg = $expr->getArgs()[0]->value;
        $arrayType = $scope->getType($arrayArg);
        $callArgs = array_slice($expr->getArgs(), 1);
        /**
         * @param Arg[] $callArgs
         * @param callable(?Type, Type, bool): void $setOffsetValueType
         */
        $setOffsetValueTypes = static function (\PHPStan\Analyser\Scope $scope, array $callArgs, callable $setOffsetValueType, ?bool &$nonConstantArrayWasUnpacked = null) : void {
            foreach ($callArgs as $callArg) {
                $callArgType = $scope->getType($callArg->value);
                if ($callArg->unpack) {
                    if (count($callArgType->getConstantArrays()) === 1) {
                        $iterableValueTypes = $callArgType->getConstantArrays()[0]->getValueTypes();
                    } else {
                        $iterableValueTypes = [$callArgType->getIterableValueType()];
                        $nonConstantArrayWasUnpacked = \true;
                    }
                    $isOptional = !$callArgType->isIterableAtLeastOnce()->yes();
                    foreach ($iterableValueTypes as $iterableValueType) {
                        if ($iterableValueType instanceof UnionType) {
                            foreach ($iterableValueType->getTypes() as $innerType) {
                                $setOffsetValueType(null, $innerType, $isOptional);
                            }
                        } else {
                            $setOffsetValueType(null, $iterableValueType, $isOptional);
                        }
                    }
                    continue;
                }
                $setOffsetValueType(null, $callArgType, \false);
            }
        };
        $constantArrays = $arrayType->getConstantArrays();
        if (count($constantArrays) > 0) {
            $newArrayTypes = [];
            $prepend = $functionReflection->getName() === 'array_unshift';
            foreach ($constantArrays as $constantArray) {
                $arrayTypeBuilder = $prepend ? ConstantArrayTypeBuilder::createEmpty() : ConstantArrayTypeBuilder::createFromConstantArray($constantArray);
                $setOffsetValueTypes($scope, $callArgs, static function (?Type $offsetType, Type $valueType, bool $optional) use(&$arrayTypeBuilder) : void {
                    $arrayTypeBuilder->setOffsetValueType($offsetType, $valueType, $optional);
                }, $nonConstantArrayWasUnpacked);
                if ($prepend) {
                    $keyTypes = $constantArray->getKeyTypes();
                    $valueTypes = $constantArray->getValueTypes();
                    foreach ($keyTypes as $k => $keyType) {
                        $arrayTypeBuilder->setOffsetValueType(count($keyType->getConstantStrings()) === 1 ? $keyType->getConstantStrings()[0] : null, $valueTypes[$k], $constantArray->isOptionalKey($k));
                    }
                }
                $constantArray = $arrayTypeBuilder->getArray();
                if ($constantArray->isConstantArray()->yes() && $nonConstantArrayWasUnpacked) {
                    $array = new ArrayType($constantArray->generalize(GeneralizePrecision::lessSpecific())->getIterableKeyType(), $constantArray->getIterableValueType());
                    $constantArray = $constantArray->isIterableAtLeastOnce()->yes() ? TypeCombinator::intersect($array, new NonEmptyArrayType()) : $array;
                }
                $newArrayTypes[] = $constantArray;
            }
            return TypeCombinator::union(...$newArrayTypes);
        }
        $setOffsetValueTypes($scope, $callArgs, static function (?Type $offsetType, Type $valueType, bool $optional) use(&$arrayType) : void {
            $isIterableAtLeastOnce = $arrayType->isIterableAtLeastOnce()->yes() || !$optional;
            $arrayType = $arrayType->setOffsetValueType($offsetType, $valueType);
            if ($isIterableAtLeastOnce) {
                return;
            }
            $arrayType = new ArrayType($arrayType->getIterableKeyType(), $arrayType->getIterableValueType());
        });
        return $arrayType;
    }
    private function getFunctionThrowPoint(FunctionReflection $functionReflection, ?ParametersAcceptor $parametersAcceptor, FuncCall $funcCall, \PHPStan\Analyser\MutatingScope $scope) : ?\PHPStan\Analyser\ThrowPoint
    {
        $normalizedFuncCall = $funcCall;
        if ($parametersAcceptor !== null) {
            $normalizedFuncCall = \PHPStan\Analyser\ArgumentsNormalizer::reorderFuncArguments($parametersAcceptor, $funcCall);
        }
        if ($normalizedFuncCall !== null) {
            foreach ($this->dynamicThrowTypeExtensionProvider->getDynamicFunctionThrowTypeExtensions() as $extension) {
                if (!$extension->isFunctionSupported($functionReflection)) {
                    continue;
                }
                $throwType = $extension->getThrowTypeFromFunctionCall($functionReflection, $normalizedFuncCall, $scope);
                if ($throwType === null) {
                    return null;
                }
                return \PHPStan\Analyser\ThrowPoint::createExplicit($scope, $throwType, $funcCall, \false);
            }
        }
        $throwType = $functionReflection->getThrowType();
        if ($throwType === null && $parametersAcceptor !== null) {
            $returnType = $parametersAcceptor->getReturnType();
            if ($returnType instanceof NeverType && $returnType->isExplicit()) {
                $throwType = new ObjectType(Throwable::class);
            }
        }
        if ($throwType !== null) {
            if (!$throwType->isVoid()->yes()) {
                return \PHPStan\Analyser\ThrowPoint::createExplicit($scope, $throwType, $funcCall, \true);
            }
        } elseif ($this->implicitThrows) {
            $requiredParameters = null;
            if ($parametersAcceptor !== null) {
                $requiredParameters = 0;
                foreach ($parametersAcceptor->getParameters() as $parameter) {
                    if ($parameter->isOptional()) {
                        continue;
                    }
                    $requiredParameters++;
                }
            }
            if (!$functionReflection->isBuiltin() || $requiredParameters === null || $requiredParameters > 0 || count($funcCall->getArgs()) > 0) {
                $functionReturnedType = $scope->getType($funcCall);
                if (!(new ObjectType(Throwable::class))->isSuperTypeOf($functionReturnedType)->yes()) {
                    return \PHPStan\Analyser\ThrowPoint::createImplicit($scope, $funcCall);
                }
            }
        }
        return null;
    }
    private function getMethodThrowPoint(MethodReflection $methodReflection, ParametersAcceptor $parametersAcceptor, MethodCall $methodCall, \PHPStan\Analyser\MutatingScope $scope) : ?\PHPStan\Analyser\ThrowPoint
    {
        $normalizedMethodCall = \PHPStan\Analyser\ArgumentsNormalizer::reorderMethodArguments($parametersAcceptor, $methodCall);
        if ($normalizedMethodCall !== null) {
            foreach ($this->dynamicThrowTypeExtensionProvider->getDynamicMethodThrowTypeExtensions() as $extension) {
                if (!$extension->isMethodSupported($methodReflection)) {
                    continue;
                }
                $throwType = $extension->getThrowTypeFromMethodCall($methodReflection, $normalizedMethodCall, $scope);
                if ($throwType === null) {
                    return null;
                }
                return \PHPStan\Analyser\ThrowPoint::createExplicit($scope, $throwType, $methodCall, \false);
            }
        }
        $throwType = $methodReflection->getThrowType();
        if ($throwType === null) {
            $returnType = $parametersAcceptor->getReturnType();
            if ($returnType instanceof NeverType && $returnType->isExplicit()) {
                $throwType = new ObjectType(Throwable::class);
            }
        }
        if ($throwType !== null) {
            if (!$throwType->isVoid()->yes()) {
                return \PHPStan\Analyser\ThrowPoint::createExplicit($scope, $throwType, $methodCall, \true);
            }
        } elseif ($this->implicitThrows) {
            $methodReturnedType = $scope->getType($methodCall);
            if (!(new ObjectType(Throwable::class))->isSuperTypeOf($methodReturnedType)->yes()) {
                return \PHPStan\Analyser\ThrowPoint::createImplicit($scope, $methodCall);
            }
        }
        return null;
    }
    /**
     * @param Node\Arg[] $args
     */
    private function getConstructorThrowPoint(MethodReflection $constructorReflection, ParametersAcceptor $parametersAcceptor, ClassReflection $classReflection, New_ $new, Name $className, array $args, \PHPStan\Analyser\MutatingScope $scope) : ?\PHPStan\Analyser\ThrowPoint
    {
        $methodCall = new StaticCall($className, $constructorReflection->getName(), $args);
        $normalizedMethodCall = \PHPStan\Analyser\ArgumentsNormalizer::reorderStaticCallArguments($parametersAcceptor, $methodCall);
        if ($normalizedMethodCall !== null) {
            foreach ($this->dynamicThrowTypeExtensionProvider->getDynamicStaticMethodThrowTypeExtensions() as $extension) {
                if (!$extension->isStaticMethodSupported($constructorReflection)) {
                    continue;
                }
                $throwType = $extension->getThrowTypeFromStaticMethodCall($constructorReflection, $normalizedMethodCall, $scope);
                if ($throwType === null) {
                    return null;
                }
                return \PHPStan\Analyser\ThrowPoint::createExplicit($scope, $throwType, $new, \false);
            }
        }
        if ($constructorReflection->getThrowType() !== null) {
            $throwType = $constructorReflection->getThrowType();
            if (!$throwType->isVoid()->yes()) {
                return \PHPStan\Analyser\ThrowPoint::createExplicit($scope, $throwType, $new, \true);
            }
        } elseif ($this->implicitThrows) {
            if ($classReflection->getName() !== Throwable::class && !$classReflection->isSubclassOf(Throwable::class)) {
                return \PHPStan\Analyser\ThrowPoint::createImplicit($scope, $methodCall);
            }
        }
        return null;
    }
    private function getStaticMethodThrowPoint(MethodReflection $methodReflection, ParametersAcceptor $parametersAcceptor, StaticCall $methodCall, \PHPStan\Analyser\MutatingScope $scope) : ?\PHPStan\Analyser\ThrowPoint
    {
        $normalizedMethodCall = \PHPStan\Analyser\ArgumentsNormalizer::reorderStaticCallArguments($parametersAcceptor, $methodCall);
        if ($normalizedMethodCall !== null) {
            foreach ($this->dynamicThrowTypeExtensionProvider->getDynamicStaticMethodThrowTypeExtensions() as $extension) {
                if (!$extension->isStaticMethodSupported($methodReflection)) {
                    continue;
                }
                $throwType = $extension->getThrowTypeFromStaticMethodCall($methodReflection, $normalizedMethodCall, $scope);
                if ($throwType === null) {
                    return null;
                }
                return \PHPStan\Analyser\ThrowPoint::createExplicit($scope, $throwType, $methodCall, \false);
            }
        }
        if ($methodReflection->getThrowType() !== null) {
            $throwType = $methodReflection->getThrowType();
            if (!$throwType->isVoid()->yes()) {
                return \PHPStan\Analyser\ThrowPoint::createExplicit($scope, $throwType, $methodCall, \true);
            }
        } elseif ($this->implicitThrows) {
            $methodReturnedType = $scope->getType($methodCall);
            if (!(new ObjectType(Throwable::class))->isSuperTypeOf($methodReturnedType)->yes()) {
                return \PHPStan\Analyser\ThrowPoint::createImplicit($scope, $methodCall);
            }
        }
        return null;
    }
    /**
     * @return string[]
     */
    private function getAssignedVariables(Expr $expr) : array
    {
        if ($expr instanceof Expr\Variable) {
            if (is_string($expr->name)) {
                return [$expr->name];
            }
            return [];
        }
        if ($expr instanceof Expr\List_ || $expr instanceof Expr\Array_) {
            $names = [];
            foreach ($expr->items as $item) {
                if ($item === null) {
                    continue;
                }
                $names = array_merge($names, $this->getAssignedVariables($item->value));
            }
            return $names;
        }
        if ($expr instanceof ArrayDimFetch) {
            return $this->getAssignedVariables($expr->var);
        }
        return [];
    }
    /**
     * @param callable(Node $node, Scope $scope): void $nodeCallback
     */
    private function callNodeCallbackWithExpression(callable $nodeCallback, Expr $expr, \PHPStan\Analyser\MutatingScope $scope, \PHPStan\Analyser\ExpressionContext $context) : void
    {
        if ($context->isDeep()) {
            $scope = $scope->exitFirstLevelStatements();
        }
        $nodeCallback($expr, $scope);
    }
    /**
     * @param callable(Node $node, Scope $scope): void $nodeCallback
     */
    private function processClosureNode(Expr\Closure $expr, \PHPStan\Analyser\MutatingScope $scope, callable $nodeCallback, \PHPStan\Analyser\ExpressionContext $context, ?Type $passedToType) : \PHPStan\Analyser\ExpressionResult
    {
        foreach ($expr->params as $param) {
            $this->processParamNode($param, $scope, $nodeCallback);
        }
        $byRefUses = [];
        $callableParameters = null;
        $closureCallArgs = $expr->getAttribute(ClosureArgVisitor::ATTRIBUTE_NAME);
        if ($closureCallArgs !== null) {
            $acceptors = $scope->getType($expr)->getCallableParametersAcceptors($scope);
            if (count($acceptors) === 1) {
                $callableParameters = $acceptors[0]->getParameters();
                foreach ($callableParameters as $index => $callableParameter) {
                    if (!isset($closureCallArgs[$index])) {
                        continue;
                    }
                    $type = $scope->getType($closureCallArgs[$index]->value);
                    $callableParameters[$index] = new NativeParameterReflection($callableParameter->getName(), $callableParameter->isOptional(), $type, $callableParameter->passedByReference(), $callableParameter->isVariadic(), $callableParameter->getDefaultValue());
                }
            }
        } elseif ($passedToType !== null && !$passedToType->isCallable()->no()) {
            if ($passedToType instanceof UnionType) {
                $passedToType = TypeCombinator::union(...array_filter($passedToType->getTypes(), static function (Type $type) {
                    return $type->isCallable()->yes();
                }));
            }
            $acceptors = $passedToType->getCallableParametersAcceptors($scope);
            if (count($acceptors) === 1) {
                $callableParameters = $acceptors[0]->getParameters();
            }
        }
        $useScope = $scope;
        foreach ($expr->uses as $use) {
            if ($use->byRef) {
                $byRefUses[] = $use;
                $useScope = $useScope->enterExpressionAssign($use->var);
                $inAssignRightSideVariableName = $context->getInAssignRightSideVariableName();
                $inAssignRightSideType = $context->getInAssignRightSideType();
                $inAssignRightSideNativeType = $context->getInAssignRightSideNativeType();
                if ($inAssignRightSideVariableName === $use->var->name && $inAssignRightSideType !== null && $inAssignRightSideNativeType !== null) {
                    if ($inAssignRightSideType instanceof ClosureType) {
                        $variableType = $inAssignRightSideType;
                    } else {
                        $alreadyHasVariableType = $scope->hasVariableType($inAssignRightSideVariableName);
                        if ($alreadyHasVariableType->no()) {
                            $variableType = TypeCombinator::union(new NullType(), $inAssignRightSideType);
                        } else {
                            $variableType = TypeCombinator::union($scope->getVariableType($inAssignRightSideVariableName), $inAssignRightSideType);
                        }
                    }
                    if ($inAssignRightSideNativeType instanceof ClosureType) {
                        $variableNativeType = $inAssignRightSideNativeType;
                    } else {
                        $alreadyHasVariableType = $scope->hasVariableType($inAssignRightSideVariableName);
                        if ($alreadyHasVariableType->no()) {
                            $variableNativeType = TypeCombinator::union(new NullType(), $inAssignRightSideNativeType);
                        } else {
                            $variableNativeType = TypeCombinator::union($scope->getVariableType($inAssignRightSideVariableName), $inAssignRightSideNativeType);
                        }
                    }
                    $scope = $scope->assignVariable($inAssignRightSideVariableName, $variableType, $variableNativeType);
                }
            }
            $this->processExprNode($use, $useScope, $nodeCallback, $context);
            if (!$use->byRef) {
                continue;
            }
            $useScope = $useScope->exitExpressionAssign($use->var);
        }
        if ($expr->returnType !== null) {
            $nodeCallback($expr->returnType, $scope);
        }
        $closureScope = $scope->enterAnonymousFunction($expr, $callableParameters);
        $closureScope = $closureScope->processClosureScope($scope, null, $byRefUses);
        $closureType = $closureScope->getAnonymousFunctionReflection();
        if (!$closureType instanceof ClosureType) {
            throw new ShouldNotHappenException();
        }
        $nodeCallback(new InClosureNode($closureType, $expr), $closureScope);
        $executionEnds = [];
        $gatheredReturnStatements = [];
        $gatheredYieldStatements = [];
        $closureStmtsCallback = static function (Node $node, \PHPStan\Analyser\Scope $scope) use($nodeCallback, &$executionEnds, &$gatheredReturnStatements, &$gatheredYieldStatements, &$closureScope) : void {
            $nodeCallback($node, $scope);
            if ($scope->getAnonymousFunctionReflection() !== $closureScope->getAnonymousFunctionReflection()) {
                return;
            }
            if ($node instanceof ExecutionEndNode) {
                $executionEnds[] = $node;
                return;
            }
            if ($node instanceof Expr\Yield_ || $node instanceof Expr\YieldFrom) {
                $gatheredYieldStatements[] = $node;
            }
            if (!$node instanceof Return_) {
                return;
            }
            $gatheredReturnStatements[] = new ReturnStatement($scope, $node);
        };
        if (count($byRefUses) === 0) {
            $statementResult = $this->processStmtNodes($expr, $expr->stmts, $closureScope, $closureStmtsCallback, \PHPStan\Analyser\StatementContext::createTopLevel());
            $nodeCallback(new ClosureReturnStatementsNode($expr, $gatheredReturnStatements, $gatheredYieldStatements, $statementResult, $executionEnds), $closureScope);
            return new \PHPStan\Analyser\ExpressionResult($scope, \false, []);
        }
        $count = 0;
        do {
            $prevScope = $closureScope;
            $intermediaryClosureScopeResult = $this->processStmtNodes($expr, $expr->stmts, $closureScope, static function () : void {
            }, \PHPStan\Analyser\StatementContext::createTopLevel());
            $intermediaryClosureScope = $intermediaryClosureScopeResult->getScope();
            foreach ($intermediaryClosureScopeResult->getExitPoints() as $exitPoint) {
                $intermediaryClosureScope = $intermediaryClosureScope->mergeWith($exitPoint->getScope());
            }
            $closureScope = $scope->enterAnonymousFunction($expr, $callableParameters);
            $closureScope = $closureScope->processClosureScope($intermediaryClosureScope, $prevScope, $byRefUses);
            if ($closureScope->equals($prevScope)) {
                break;
            }
            if ($count >= self::GENERALIZE_AFTER_ITERATION) {
                $closureScope = $prevScope->generalizeWith($closureScope);
            }
            $count++;
        } while ($count < self::LOOP_SCOPE_ITERATIONS);
        $statementResult = $this->processStmtNodes($expr, $expr->stmts, $closureScope, $closureStmtsCallback, \PHPStan\Analyser\StatementContext::createTopLevel());
        $nodeCallback(new ClosureReturnStatementsNode($expr, $gatheredReturnStatements, $gatheredYieldStatements, $statementResult, $executionEnds), $closureScope);
        return new \PHPStan\Analyser\ExpressionResult($scope->processClosureScope($closureScope, null, $byRefUses), \false, []);
    }
    /**
     * @param callable(Node $node, Scope $scope): void $nodeCallback
     */
    private function processArrowFunctionNode(Expr\ArrowFunction $expr, \PHPStan\Analyser\MutatingScope $scope, callable $nodeCallback, \PHPStan\Analyser\ExpressionContext $context, ?Type $passedToType) : \PHPStan\Analyser\ExpressionResult
    {
        foreach ($expr->params as $param) {
            $this->processParamNode($param, $scope, $nodeCallback);
        }
        if ($expr->returnType !== null) {
            $nodeCallback($expr->returnType, $scope);
        }
        $callableParameters = null;
        $arrowFunctionCallArgs = $expr->getAttribute(ArrowFunctionArgVisitor::ATTRIBUTE_NAME);
        if ($arrowFunctionCallArgs !== null) {
            $acceptors = $scope->getType($expr)->getCallableParametersAcceptors($scope);
            if (count($acceptors) === 1) {
                $callableParameters = $acceptors[0]->getParameters();
                foreach ($callableParameters as $index => $callableParameter) {
                    if (!isset($arrowFunctionCallArgs[$index])) {
                        continue;
                    }
                    $type = $scope->getType($arrowFunctionCallArgs[$index]->value);
                    $callableParameters[$index] = new NativeParameterReflection($callableParameter->getName(), $callableParameter->isOptional(), $type, $callableParameter->passedByReference(), $callableParameter->isVariadic(), $callableParameter->getDefaultValue());
                }
            }
        } elseif ($passedToType !== null && !$passedToType->isCallable()->no()) {
            if ($passedToType instanceof UnionType) {
                $passedToType = TypeCombinator::union(...array_filter($passedToType->getTypes(), static function (Type $type) {
                    return $type->isCallable()->yes();
                }));
            }
            $acceptors = $passedToType->getCallableParametersAcceptors($scope);
            if (count($acceptors) === 1) {
                $callableParameters = $acceptors[0]->getParameters();
            }
        }
        $arrowFunctionScope = $scope->enterArrowFunction($expr, $callableParameters);
        $arrowFunctionType = $arrowFunctionScope->getAnonymousFunctionReflection();
        if (!$arrowFunctionType instanceof ClosureType) {
            throw new ShouldNotHappenException();
        }
        $nodeCallback(new InArrowFunctionNode($arrowFunctionType, $expr), $arrowFunctionScope);
        $this->processExprNode($expr->expr, $arrowFunctionScope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createTopLevel());
        return new \PHPStan\Analyser\ExpressionResult($scope, \false, []);
    }
    /**
     * @param callable(Node $node, Scope $scope): void $nodeCallback
     */
    private function processParamNode(Node\Param $param, \PHPStan\Analyser\MutatingScope $scope, callable $nodeCallback) : void
    {
        $this->processAttributeGroups($param->attrGroups, $scope, $nodeCallback);
        $nodeCallback($param, $scope);
        if ($param->type !== null) {
            $nodeCallback($param->type, $scope);
        }
        if ($param->default === null) {
            return;
        }
        $this->processExprNode($param->default, $scope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep());
    }
    /**
     * @param AttributeGroup[] $attrGroups
     * @param callable(Node $node, Scope $scope): void $nodeCallback
     */
    private function processAttributeGroups(array $attrGroups, \PHPStan\Analyser\MutatingScope $scope, callable $nodeCallback) : void
    {
        foreach ($attrGroups as $attrGroup) {
            foreach ($attrGroup->attrs as $attr) {
                foreach ($attr->args as $arg) {
                    $this->processExprNode($arg->value, $scope, $nodeCallback, \PHPStan\Analyser\ExpressionContext::createDeep());
                    $nodeCallback($arg, $scope);
                }
                $nodeCallback($attr, $scope);
            }
            $nodeCallback($attrGroup, $scope);
        }
    }
    /**
     * @param MethodReflection|FunctionReflection|null $calleeReflection
     * @param Node\Arg[] $args
     * @param callable(Node $node, Scope $scope): void $nodeCallback
     */
    private function processArgs($calleeReflection, ?ParametersAcceptor $parametersAcceptor, array $args, \PHPStan\Analyser\MutatingScope $scope, callable $nodeCallback, \PHPStan\Analyser\ExpressionContext $context, ?\PHPStan\Analyser\MutatingScope $closureBindScope = null) : \PHPStan\Analyser\ExpressionResult
    {
        $paramOutTypes = [];
        if ($parametersAcceptor !== null) {
            $parameters = $parametersAcceptor->getParameters();
            foreach ($parameters as $parameter) {
                if (!$parameter instanceof ParameterReflectionWithPhpDocs) {
                    continue;
                }
                if ($parameter->getOutType() === null) {
                    continue;
                }
                $paramOutTypes[$parameter->getName()] = TemplateTypeHelper::resolveTemplateTypes($parameter->getOutType(), $parametersAcceptor->getResolvedTemplateTypeMap());
            }
        }
        if ($calleeReflection !== null) {
            $scope = $scope->pushInFunctionCall($calleeReflection);
        }
        $hasYield = \false;
        $throwPoints = [];
        foreach ($args as $i => $arg) {
            $originalArg = $arg->getAttribute(\PHPStan\Analyser\ArgumentsNormalizer::ORIGINAL_ARG_ATTRIBUTE) ?? $arg;
            $nodeCallback($originalArg, $scope);
            if (isset($parameters) && $parametersAcceptor !== null) {
                $byRefType = new MixedType();
                $assignByReference = \false;
                if (isset($parameters[$i])) {
                    $assignByReference = $parameters[$i]->passedByReference()->createsNewVariable();
                    $parameterType = $parameters[$i]->getType();
                    if (isset($paramOutTypes[$parameters[$i]->getName()])) {
                        $byRefType = $paramOutTypes[$parameters[$i]->getName()];
                    }
                } elseif (count($parameters) > 0 && $parametersAcceptor->isVariadic()) {
                    $lastParameter = $parameters[count($parameters) - 1];
                    $assignByReference = $lastParameter->passedByReference()->createsNewVariable();
                    $parameterType = $lastParameter->getType();
                    if (isset($paramOutTypes[$lastParameter->getName()])) {
                        $byRefType = $paramOutTypes[$lastParameter->getName()];
                    }
                }
                if ($assignByReference) {
                    $argValue = $arg->value;
                    if ($argValue instanceof Variable && is_string($argValue->name)) {
                        $scope = $scope->assignVariable($argValue->name, $byRefType, new MixedType());
                    }
                }
            }
            $originalScope = $scope;
            $scopeToPass = $scope;
            if ($i === 0 && $closureBindScope !== null) {
                $scopeToPass = $closureBindScope;
            }
            if ($arg->value instanceof Expr\Closure) {
                $this->callNodeCallbackWithExpression($nodeCallback, $arg->value, $scopeToPass, $context);
                $result = $this->processClosureNode($arg->value, $scopeToPass, $nodeCallback, $context, $parameterType ?? null);
            } elseif ($arg->value instanceof Expr\ArrowFunction) {
                $this->callNodeCallbackWithExpression($nodeCallback, $arg->value, $scopeToPass, $context);
                $result = $this->processArrowFunctionNode($arg->value, $scopeToPass, $nodeCallback, $context, $parameterType ?? null);
            } else {
                $result = $this->processExprNode($arg->value, $scopeToPass, $nodeCallback, $context->enterDeep());
            }
            $scope = $result->getScope();
            $hasYield = $hasYield || $result->hasYield();
            $throwPoints = array_merge($throwPoints, $result->getThrowPoints());
            if ($i !== 0 || $closureBindScope === null) {
                continue;
            }
            $scope = $scope->restoreOriginalScopeAfterClosureBind($originalScope);
        }
        if ($calleeReflection !== null) {
            $scope = $scope->popInFunctionCall();
        }
        return new \PHPStan\Analyser\ExpressionResult($scope, $hasYield, $throwPoints);
    }
    /**
     * @param callable(Node $node, Scope $scope): void $nodeCallback
     * @param Closure(MutatingScope $scope): ExpressionResult $processExprCallback
     */
    private function processAssignVar(\PHPStan\Analyser\MutatingScope $scope, Expr $var, Expr $assignedExpr, callable $nodeCallback, \PHPStan\Analyser\ExpressionContext $context, Closure $processExprCallback, bool $enterExpressionAssign) : \PHPStan\Analyser\ExpressionResult
    {
        $nodeCallback($var, $enterExpressionAssign ? $scope->enterExpressionAssign($var) : $scope);
        $hasYield = \false;
        $throwPoints = [];
        $isAssignOp = $assignedExpr instanceof Expr\AssignOp && !$enterExpressionAssign;
        if ($var instanceof Variable && is_string($var->name)) {
            $result = $processExprCallback($scope);
            $hasYield = $result->hasYield();
            $throwPoints = $result->getThrowPoints();
            $assignedExpr = $this->unwrapAssign($assignedExpr);
            $type = $scope->getType($assignedExpr);
            $truthySpecifiedTypes = $this->typeSpecifier->specifyTypesInCondition($scope, $assignedExpr, \PHPStan\Analyser\TypeSpecifierContext::createTruthy());
            $falseySpecifiedTypes = $this->typeSpecifier->specifyTypesInCondition($scope, $assignedExpr, \PHPStan\Analyser\TypeSpecifierContext::createFalsey());
            $conditionalExpressions = [];
            $truthyType = TypeCombinator::removeFalsey($type);
            $falseyType = TypeCombinator::intersect($type, StaticTypeFactory::falsey());
            $conditionalExpressions = $this->processSureTypesForConditionalExpressionsAfterAssign($scope, $var->name, $conditionalExpressions, $truthySpecifiedTypes, $truthyType);
            $conditionalExpressions = $this->processSureNotTypesForConditionalExpressionsAfterAssign($scope, $var->name, $conditionalExpressions, $truthySpecifiedTypes, $truthyType);
            $conditionalExpressions = $this->processSureTypesForConditionalExpressionsAfterAssign($scope, $var->name, $conditionalExpressions, $falseySpecifiedTypes, $falseyType);
            $conditionalExpressions = $this->processSureNotTypesForConditionalExpressionsAfterAssign($scope, $var->name, $conditionalExpressions, $falseySpecifiedTypes, $falseyType);
            // TODO conditional expressions for native type should be handled too
            $scope = $result->getScope()->assignVariable($var->name, $type, $scope->getNativeType($assignedExpr));
            foreach ($conditionalExpressions as $exprString => $holders) {
                $scope = $scope->addConditionalExpressions($exprString, $holders);
            }
        } elseif ($var instanceof ArrayDimFetch) {
            $dimExprStack = [];
            $originalVar = $var;
            $assignedPropertyExpr = $assignedExpr;
            while ($var instanceof ArrayDimFetch) {
                $varForSetOffsetValue = $var->var;
                if ($varForSetOffsetValue instanceof PropertyFetch || $varForSetOffsetValue instanceof StaticPropertyFetch) {
                    $varForSetOffsetValue = new OriginalPropertyTypeExpr($varForSetOffsetValue);
                }
                $assignedPropertyExpr = new SetOffsetValueTypeExpr($varForSetOffsetValue, $var->dim, $assignedPropertyExpr);
                $dimExprStack[] = $var->dim;
                $var = $var->var;
            }
            // 1. eval root expr
            if ($enterExpressionAssign) {
                $scope = $scope->enterExpressionAssign($var);
            }
            $result = $this->processExprNode($var, $scope, $nodeCallback, $context->enterDeep());
            $hasYield = $result->hasYield();
            $throwPoints = $result->getThrowPoints();
            $scope = $result->getScope();
            if ($enterExpressionAssign) {
                $scope = $scope->exitExpressionAssign($var);
            }
            // 2. eval dimensions
            $offsetTypes = [];
            $offsetNativeTypes = [];
            foreach (array_reverse($dimExprStack) as $dimExpr) {
                if ($dimExpr === null) {
                    $offsetTypes[] = null;
                    $offsetNativeTypes[] = null;
                } else {
                    $offsetTypes[] = $scope->getType($dimExpr);
                    $offsetNativeTypes[] = $scope->getNativeType($dimExpr);
                    if ($enterExpressionAssign) {
                        $scope->enterExpressionAssign($dimExpr);
                    }
                    $result = $this->processExprNode($dimExpr, $scope, $nodeCallback, $context->enterDeep());
                    $hasYield = $hasYield || $result->hasYield();
                    $throwPoints = array_merge($throwPoints, $result->getThrowPoints());
                    $scope = $result->getScope();
                    if ($enterExpressionAssign) {
                        $scope = $scope->exitExpressionAssign($dimExpr);
                    }
                }
            }
            $valueToWrite = $scope->getType($assignedExpr);
            $nativeValueToWrite = $scope->getNativeType($assignedExpr);
            $originalValueToWrite = $valueToWrite;
            $originalNativeValueToWrite = $valueToWrite;
            // 3. eval assigned expr
            $result = $processExprCallback($scope);
            $hasYield = $hasYield || $result->hasYield();
            $throwPoints = array_merge($throwPoints, $result->getThrowPoints());
            $scope = $result->getScope();
            $varType = $scope->getType($var);
            $varNativeType = $scope->getNativeType($var);
            // 4. compose types
            if ($varType instanceof ErrorType) {
                $varType = new ConstantArrayType([], []);
            }
            if ($varNativeType instanceof ErrorType) {
                $varNativeType = new ConstantArrayType([], []);
            }
            $offsetValueType = $varType;
            $offsetNativeValueType = $varNativeType;
            $offsetValueTypeStack = [$offsetValueType];
            $offsetValueNativeTypeStack = [$offsetNativeValueType];
            foreach (array_slice($offsetTypes, 0, -1) as $offsetType) {
                if ($offsetType === null) {
                    $offsetValueType = new ConstantArrayType([], []);
                } else {
                    $offsetValueType = $offsetValueType->getOffsetValueType($offsetType);
                    if ($offsetValueType instanceof ErrorType) {
                        $offsetValueType = new ConstantArrayType([], []);
                    }
                }
                $offsetValueTypeStack[] = $offsetValueType;
            }
            foreach (array_slice($offsetNativeTypes, 0, -1) as $offsetNativeType) {
                if ($offsetNativeType === null) {
                    $offsetNativeValueType = new ConstantArrayType([], []);
                } else {
                    $offsetNativeValueType = $offsetNativeValueType->getOffsetValueType($offsetNativeType);
                    if ($offsetNativeValueType instanceof ErrorType) {
                        $offsetNativeValueType = new ConstantArrayType([], []);
                    }
                }
                $offsetValueNativeTypeStack[] = $offsetNativeValueType;
            }
            foreach (array_reverse($offsetTypes) as $i => $offsetType) {
                /** @var Type $offsetValueType */
                $offsetValueType = array_pop($offsetValueTypeStack);
                if (!$offsetValueType instanceof MixedType) {
                    $types = [new ArrayType(new MixedType(), new MixedType()), new ObjectType(ArrayAccess::class), new NullType()];
                    if ($offsetType !== null && (new IntegerType())->isSuperTypeOf($offsetType)->yes()) {
                        $types[] = new StringType();
                    }
                    $offsetValueType = TypeCombinator::intersect($offsetValueType, TypeCombinator::union(...$types));
                }
                $valueToWrite = $offsetValueType->setOffsetValueType($offsetType, $valueToWrite, $i === 0);
            }
            foreach (array_reverse($offsetNativeTypes) as $i => $offsetNativeType) {
                /** @var Type $offsetNativeValueType */
                $offsetNativeValueType = array_pop($offsetValueNativeTypeStack);
                if (!$offsetNativeValueType instanceof MixedType) {
                    $types = [new ArrayType(new MixedType(), new MixedType()), new ObjectType(ArrayAccess::class), new NullType()];
                    if ($offsetNativeType !== null && (new IntegerType())->isSuperTypeOf($offsetNativeType)->yes()) {
                        $types[] = new StringType();
                    }
                    $offsetNativeValueType = TypeCombinator::intersect($offsetNativeValueType, TypeCombinator::union(...$types));
                }
                $nativeValueToWrite = $offsetNativeValueType->setOffsetValueType($offsetNativeType, $nativeValueToWrite, $i === 0);
            }
            if ($varType->isArray()->yes() || !(new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->yes()) {
                if ($var instanceof Variable && is_string($var->name)) {
                    $scope = $scope->assignVariable($var->name, $valueToWrite, $nativeValueToWrite);
                } else {
                    if ($var instanceof PropertyFetch || $var instanceof StaticPropertyFetch) {
                        $nodeCallback(new PropertyAssignNode($var, $assignedPropertyExpr, $isAssignOp), $scope);
                    }
                    $scope = $scope->assignExpression($var, $valueToWrite, $nativeValueToWrite);
                }
                if ($originalVar->dim instanceof Variable || $originalVar->dim instanceof Node\Scalar) {
                    $currentVarType = $scope->getType($originalVar);
                    if (!$originalValueToWrite->isSuperTypeOf($currentVarType)->yes()) {
                        $scope = $scope->assignExpression($originalVar, $originalValueToWrite, $originalNativeValueToWrite);
                    }
                }
            } else {
                if ($var instanceof PropertyFetch || $var instanceof StaticPropertyFetch) {
                    $nodeCallback(new PropertyAssignNode($var, $assignedPropertyExpr, $isAssignOp), $scope);
                }
            }
            if (!$varType->isArray()->yes() && !(new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->no()) {
                $throwPoints = array_merge($throwPoints, $this->processExprNode(new MethodCall($var, 'offsetSet'), $scope, static function () : void {
                }, $context)->getThrowPoints());
            }
        } elseif ($var instanceof PropertyFetch) {
            $objectResult = $this->processExprNode($var->var, $scope, $nodeCallback, $context);
            $hasYield = $objectResult->hasYield();
            $throwPoints = $objectResult->getThrowPoints();
            $scope = $objectResult->getScope();
            $propertyName = null;
            if ($var->name instanceof Node\Identifier) {
                $propertyName = $var->name->name;
            } else {
                $propertyNameResult = $this->processExprNode($var->name, $scope, $nodeCallback, $context);
                $hasYield = $hasYield || $propertyNameResult->hasYield();
                $throwPoints = array_merge($throwPoints, $propertyNameResult->getThrowPoints());
                $scope = $propertyNameResult->getScope();
            }
            $result = $processExprCallback($scope);
            $hasYield = $hasYield || $result->hasYield();
            $throwPoints = array_merge($throwPoints, $result->getThrowPoints());
            $scope = $result->getScope();
            $propertyHolderType = $scope->getType($var->var);
            if ($propertyName !== null && $propertyHolderType->hasProperty($propertyName)->yes()) {
                $propertyReflection = $propertyHolderType->getProperty($propertyName, $scope);
                $assignedExprType = $scope->getType($assignedExpr);
                $nodeCallback(new PropertyAssignNode($var, $assignedExpr, $isAssignOp), $scope);
                if ($propertyReflection->canChangeTypeAfterAssignment()) {
                    $scope = $scope->assignExpression($var, $assignedExprType, $scope->getNativeType($assignedExpr));
                }
                $declaringClass = $propertyReflection->getDeclaringClass();
                if ($declaringClass->hasNativeProperty($propertyName) && !$declaringClass->getNativeProperty($propertyName)->getNativeType()->accepts($assignedExprType, \true)->yes()) {
                    $throwPoints[] = \PHPStan\Analyser\ThrowPoint::createExplicit($scope, new ObjectType(TypeError::class), $assignedExpr, \false);
                }
            } else {
                // fallback
                $assignedExprType = $scope->getType($assignedExpr);
                $nodeCallback(new PropertyAssignNode($var, $assignedExpr, $isAssignOp), $scope);
                $scope = $scope->assignExpression($var, $assignedExprType, $scope->getNativeType($assignedExpr));
                // simulate dynamic property assign by __set to get throw points
                if (!$propertyHolderType->hasMethod('__set')->no()) {
                    $throwPoints = array_merge($throwPoints, $this->processExprNode(new MethodCall($var->var, '__set'), $scope, static function () : void {
                    }, $context)->getThrowPoints());
                }
            }
        } elseif ($var instanceof Expr\StaticPropertyFetch) {
            if ($var->class instanceof Node\Name) {
                $propertyHolderType = $scope->resolveTypeByName($var->class);
            } else {
                $this->processExprNode($var->class, $scope, $nodeCallback, $context);
                $propertyHolderType = $scope->getType($var->class);
            }
            $propertyName = null;
            if ($var->name instanceof Node\Identifier) {
                $propertyName = $var->name->name;
                $hasYield = \false;
                $throwPoints = [];
            } else {
                $propertyNameResult = $this->processExprNode($var->name, $scope, $nodeCallback, $context);
                $hasYield = $propertyNameResult->hasYield();
                $throwPoints = $propertyNameResult->getThrowPoints();
                $scope = $propertyNameResult->getScope();
            }
            $result = $processExprCallback($scope);
            $hasYield = $hasYield || $result->hasYield();
            $throwPoints = array_merge($throwPoints, $result->getThrowPoints());
            $scope = $result->getScope();
            if ($propertyName !== null) {
                $propertyReflection = $scope->getPropertyReflection($propertyHolderType, $propertyName);
                $assignedExprType = $scope->getType($assignedExpr);
                $nodeCallback(new PropertyAssignNode($var, $assignedExpr, $isAssignOp), $scope);
                if ($propertyReflection !== null && $propertyReflection->canChangeTypeAfterAssignment()) {
                    $scope = $scope->assignExpression($var, $assignedExprType, $scope->getNativeType($assignedExpr));
                }
            } else {
                // fallback
                $assignedExprType = $scope->getType($assignedExpr);
                $nodeCallback(new PropertyAssignNode($var, $assignedExpr, $isAssignOp), $scope);
                $scope = $scope->assignExpression($var, $assignedExprType, $scope->getNativeType($assignedExpr));
            }
        } elseif ($var instanceof List_ || $var instanceof Array_) {
            $result = $processExprCallback($scope);
            $hasYield = $result->hasYield();
            $throwPoints = array_merge($throwPoints, $result->getThrowPoints());
            $scope = $result->getScope();
            foreach ($var->items as $i => $arrayItem) {
                if ($arrayItem === null) {
                    continue;
                }
                $itemScope = $scope;
                if ($enterExpressionAssign) {
                    $itemScope = $itemScope->enterExpressionAssign($arrayItem->value);
                }
                $itemScope = $this->lookForSetAllowedUndefinedExpressions($itemScope, $arrayItem->value);
                $itemResult = $this->processExprNode($arrayItem, $itemScope, $nodeCallback, $context->enterDeep());
                $hasYield = $hasYield || $itemResult->hasYield();
                $throwPoints = array_merge($throwPoints, $itemResult->getThrowPoints());
                if ($arrayItem->key === null) {
                    $dimExpr = new Node\Scalar\LNumber($i);
                } else {
                    $dimExpr = $arrayItem->key;
                }
                $result = $this->processAssignVar($scope, $arrayItem->value, new GetOffsetValueTypeExpr($assignedExpr, $dimExpr), $nodeCallback, $context, static function (\PHPStan\Analyser\MutatingScope $scope) : \PHPStan\Analyser\ExpressionResult {
                    return new \PHPStan\Analyser\ExpressionResult($scope, \false, []);
                }, $enterExpressionAssign);
                $scope = $result->getScope();
                $hasYield = $hasYield || $result->hasYield();
                $throwPoints = array_merge($throwPoints, $result->getThrowPoints());
            }
        }
        return new \PHPStan\Analyser\ExpressionResult($scope, $hasYield, $throwPoints);
    }
    private function unwrapAssign(Expr $expr) : Expr
    {
        if ($expr instanceof Assign) {
            return $this->unwrapAssign($expr->expr);
        }
        return $expr;
    }
    /**
     * @param array<string, ConditionalExpressionHolder[]> $conditionalExpressions
     * @return array<string, ConditionalExpressionHolder[]>
     */
    private function processSureTypesForConditionalExpressionsAfterAssign(\PHPStan\Analyser\Scope $scope, string $variableName, array $conditionalExpressions, \PHPStan\Analyser\SpecifiedTypes $specifiedTypes, Type $variableType) : array
    {
        foreach ($specifiedTypes->getSureTypes() as $exprString => [$expr, $exprType]) {
            if (!$expr instanceof Variable) {
                continue;
            }
            if (!is_string($expr->name)) {
                continue;
            }
            if ($expr->name === $variableName) {
                continue;
            }
            if (!isset($conditionalExpressions[$exprString])) {
                $conditionalExpressions[$exprString] = [];
            }
            $holder = new \PHPStan\Analyser\ConditionalExpressionHolder(['$' . $variableName => \PHPStan\Analyser\ExpressionTypeHolder::createYes(new Variable($variableName), $variableType)], \PHPStan\Analyser\ExpressionTypeHolder::createYes($expr, TypeCombinator::intersect($scope->getType($expr), $exprType)));
            $conditionalExpressions[$exprString][$holder->getKey()] = $holder;
        }
        return $conditionalExpressions;
    }
    /**
     * @param array<string, ConditionalExpressionHolder[]> $conditionalExpressions
     * @return array<string, ConditionalExpressionHolder[]>
     */
    private function processSureNotTypesForConditionalExpressionsAfterAssign(\PHPStan\Analyser\Scope $scope, string $variableName, array $conditionalExpressions, \PHPStan\Analyser\SpecifiedTypes $specifiedTypes, Type $variableType) : array
    {
        foreach ($specifiedTypes->getSureNotTypes() as $exprString => [$expr, $exprType]) {
            if (!$expr instanceof Variable) {
                continue;
            }
            if (!is_string($expr->name)) {
                continue;
            }
            if ($expr->name === $variableName) {
                continue;
            }
            if (!isset($conditionalExpressions[$exprString])) {
                $conditionalExpressions[$exprString] = [];
            }
            $holder = new \PHPStan\Analyser\ConditionalExpressionHolder(['$' . $variableName => \PHPStan\Analyser\ExpressionTypeHolder::createYes(new Variable($variableName), $variableType)], \PHPStan\Analyser\ExpressionTypeHolder::createYes($expr, TypeCombinator::remove($scope->getType($expr), $exprType)));
            $conditionalExpressions[$exprString][$holder->getKey()] = $holder;
        }
        return $conditionalExpressions;
    }
    /**
     * @param callable(Node $node, Scope $scope): void $nodeCallback
     */
    private function processStmtVarAnnotation(\PHPStan\Analyser\MutatingScope $scope, Node\Stmt $stmt, ?Expr $defaultExpr, callable $nodeCallback) : \PHPStan\Analyser\MutatingScope
    {
        $function = $scope->getFunction();
        $variableLessTags = [];
        foreach ($stmt->getComments() as $comment) {
            if (!$comment instanceof Doc) {
                continue;
            }
            $resolvedPhpDoc = $this->fileTypeMapper->getResolvedPhpDoc($scope->getFile(), $scope->isInClass() ? $scope->getClassReflection()->getName() : null, $scope->isInTrait() ? $scope->getTraitReflection()->getName() : null, $function !== null ? $function->getName() : null, $comment->getText());
            $assignedVariable = null;
            if ($stmt instanceof Node\Stmt\Expression && ($stmt->expr instanceof Assign || $stmt->expr instanceof AssignRef) && $stmt->expr->var instanceof Variable && is_string($stmt->expr->var->name)) {
                $assignedVariable = $stmt->expr->var->name;
            }
            foreach ($resolvedPhpDoc->getVarTags() as $name => $varTag) {
                if (is_int($name)) {
                    $variableLessTags[] = $varTag;
                    continue;
                }
                if ($name === $assignedVariable) {
                    continue;
                }
                $certainty = $scope->hasVariableType($name);
                if ($certainty->no()) {
                    continue;
                }
                if ($scope->isInClass() && $scope->getFunction() === null) {
                    continue;
                }
                if ($scope->canAnyVariableExist()) {
                    $certainty = TrinaryLogic::createYes();
                }
                $variableNode = new Variable($name, $stmt->getAttributes());
                $originalType = $scope->getVariableType($name);
                if (!$originalType->equals($varTag->getType())) {
                    $nodeCallback(new VarTagChangedExpressionTypeNode($varTag, $variableNode), $scope);
                }
                $scope = $scope->assignVariable($name, $varTag->getType(), $scope->getNativeType($variableNode), $certainty);
            }
        }
        if (count($variableLessTags) === 1 && $defaultExpr !== null) {
            $originalType = $scope->getType($defaultExpr);
            $varTag = $variableLessTags[0];
            if (!$originalType->equals($varTag->getType())) {
                $nodeCallback(new VarTagChangedExpressionTypeNode($varTag, $defaultExpr), $scope);
            }
            $scope = $scope->assignExpression($defaultExpr, $varTag->getType(), new MixedType());
        }
        return $scope;
    }
    /**
     * @param array<int, string> $variableNames
     */
    private function processVarAnnotation(\PHPStan\Analyser\MutatingScope $scope, array $variableNames, Node $node, bool &$changed = \false) : \PHPStan\Analyser\MutatingScope
    {
        $function = $scope->getFunction();
        $varTags = [];
        foreach ($node->getComments() as $comment) {
            if (!$comment instanceof Doc) {
                continue;
            }
            $resolvedPhpDoc = $this->fileTypeMapper->getResolvedPhpDoc($scope->getFile(), $scope->isInClass() ? $scope->getClassReflection()->getName() : null, $scope->isInTrait() ? $scope->getTraitReflection()->getName() : null, $function !== null ? $function->getName() : null, $comment->getText());
            foreach ($resolvedPhpDoc->getVarTags() as $key => $varTag) {
                $varTags[$key] = $varTag;
            }
        }
        if (count($varTags) === 0) {
            return $scope;
        }
        foreach ($variableNames as $variableName) {
            if (!isset($varTags[$variableName])) {
                continue;
            }
            $variableType = $varTags[$variableName]->getType();
            $changed = \true;
            $scope = $scope->assignVariable($variableName, $variableType, new MixedType());
        }
        if (count($variableNames) === 1 && count($varTags) === 1 && isset($varTags[0])) {
            $variableType = $varTags[0]->getType();
            $changed = \true;
            $scope = $scope->assignVariable($variableNames[0], $variableType, new MixedType());
        }
        return $scope;
    }
    private function enterForeach(\PHPStan\Analyser\MutatingScope $scope, Foreach_ $stmt) : \PHPStan\Analyser\MutatingScope
    {
        if ($stmt->expr instanceof Variable && is_string($stmt->expr->name)) {
            $scope = $this->processVarAnnotation($scope, [$stmt->expr->name], $stmt);
        }
        $iterateeType = $scope->getType($stmt->expr);
        if ($stmt->valueVar instanceof Variable && is_string($stmt->valueVar->name) && ($stmt->keyVar === null || $stmt->keyVar instanceof Variable && is_string($stmt->keyVar->name))) {
            $keyVarName = null;
            if ($stmt->keyVar instanceof Variable && is_string($stmt->keyVar->name)) {
                $keyVarName = $stmt->keyVar->name;
            }
            $scope = $scope->enterForeach($stmt->expr, $stmt->valueVar->name, $keyVarName);
            $vars = [$stmt->valueVar->name];
            if ($keyVarName !== null) {
                $vars[] = $keyVarName;
            }
        } else {
            $scope = $this->processAssignVar($scope, $stmt->valueVar, new GetIterableValueTypeExpr($stmt->expr), static function () : void {
            }, \PHPStan\Analyser\ExpressionContext::createDeep(), static function (\PHPStan\Analyser\MutatingScope $scope) : \PHPStan\Analyser\ExpressionResult {
                return new \PHPStan\Analyser\ExpressionResult($scope, \false, []);
            }, \true)->getScope();
            $vars = $this->getAssignedVariables($stmt->valueVar);
            if ($stmt->keyVar instanceof Variable && is_string($stmt->keyVar->name)) {
                $scope = $scope->enterForeachKey($stmt->expr, $stmt->keyVar->name);
                $vars[] = $stmt->keyVar->name;
            } elseif ($stmt->keyVar !== null) {
                $scope = $this->processAssignVar($scope, $stmt->keyVar, new GetIterableKeyTypeExpr($stmt->expr), static function () : void {
                }, \PHPStan\Analyser\ExpressionContext::createDeep(), static function (\PHPStan\Analyser\MutatingScope $scope) : \PHPStan\Analyser\ExpressionResult {
                    return new \PHPStan\Analyser\ExpressionResult($scope, \false, []);
                }, \true)->getScope();
                $vars = array_merge($vars, $this->getAssignedVariables($stmt->keyVar));
            }
        }
        $constantArrays = $iterateeType->getConstantArrays();
        if ($stmt->getDocComment() === null && $iterateeType->isConstantArray()->yes() && count($constantArrays) === 1 && $stmt->valueVar instanceof Variable && is_string($stmt->valueVar->name) && $stmt->keyVar instanceof Variable && is_string($stmt->keyVar->name)) {
            $valueConditionalHolders = [];
            $arrayDimFetchConditionalHolders = [];
            foreach ($constantArrays[0]->getKeyTypes() as $i => $keyType) {
                $valueType = $constantArrays[0]->getValueTypes()[$i];
                $holder = new \PHPStan\Analyser\ConditionalExpressionHolder(['$' . $stmt->keyVar->name => \PHPStan\Analyser\ExpressionTypeHolder::createYes(new Variable($stmt->keyVar->name), $keyType)], new \PHPStan\Analyser\ExpressionTypeHolder($stmt->valueVar, $valueType, TrinaryLogic::createYes()));
                $valueConditionalHolders[$holder->getKey()] = $holder;
                $arrayDimFetchHolder = new \PHPStan\Analyser\ConditionalExpressionHolder(['$' . $stmt->keyVar->name => \PHPStan\Analyser\ExpressionTypeHolder::createYes(new Variable($stmt->keyVar->name), $keyType)], new \PHPStan\Analyser\ExpressionTypeHolder(new ArrayDimFetch($stmt->expr, $stmt->keyVar), $valueType, TrinaryLogic::createYes()));
                $arrayDimFetchConditionalHolders[$arrayDimFetchHolder->getKey()] = $arrayDimFetchHolder;
            }
            $scope = $scope->addConditionalExpressions('$' . $stmt->valueVar->name, $valueConditionalHolders);
            if ($stmt->expr instanceof Variable && is_string($stmt->expr->name)) {
                $scope = $scope->addConditionalExpressions(sprintf('$%s[$%s]', $stmt->expr->name, $stmt->keyVar->name), $arrayDimFetchConditionalHolders);
            }
        }
        return $this->processVarAnnotation($scope, $vars, $stmt);
    }
    /**
     * @param callable(Node $node, Scope $scope): void $nodeCallback
     */
    private function processTraitUse(Node\Stmt\TraitUse $node, \PHPStan\Analyser\MutatingScope $classScope, callable $nodeCallback) : void
    {
        $parentTraitNames = [];
        $parent = $classScope->getParentScope();
        while ($parent !== null) {
            if ($parent->isInTrait()) {
                $parentTraitNames[] = $parent->getTraitReflection()->getName();
            }
            $parent = $parent->getParentScope();
        }
        foreach ($node->traits as $trait) {
            $traitName = (string) $trait;
            if (in_array($traitName, $parentTraitNames, \true)) {
                continue;
            }
            if (!$this->reflectionProvider->hasClass($traitName)) {
                continue;
            }
            $traitReflection = $this->reflectionProvider->getClass($traitName);
            $traitFileName = $traitReflection->getFileName();
            if ($traitFileName === null) {
                continue;
                // trait from eval or from PHP itself
            }
            $fileName = $this->fileHelper->normalizePath($traitFileName);
            if (!isset($this->analysedFiles[$fileName])) {
                continue;
            }
            $parserNodes = $this->parser->parseFile($fileName);
            $this->processNodesForTraitUse($parserNodes, $traitReflection, $classScope, $node->adaptations, $nodeCallback);
        }
    }
    /**
     * @param Node[]|Node|scalar|null $node
     * @param Node\Stmt\TraitUseAdaptation[] $adaptations
     * @param callable(Node $node, Scope $scope): void $nodeCallback
     */
    private function processNodesForTraitUse($node, ClassReflection $traitReflection, \PHPStan\Analyser\MutatingScope $scope, array $adaptations, callable $nodeCallback) : void
    {
        if ($node instanceof Node) {
            if ($node instanceof Node\Stmt\Trait_ && $traitReflection->getName() === (string) $node->namespacedName && $traitReflection->getNativeReflection()->getStartLine() === $node->getStartLine()) {
                $methodModifiers = [];
                foreach ($adaptations as $adaptation) {
                    if (!$adaptation instanceof Node\Stmt\TraitUseAdaptation\Alias) {
                        continue;
                    }
                    if ($adaptation->newModifier === null) {
                        continue;
                    }
                    $methodModifiers[$adaptation->method->toLowerString()] = $adaptation->newModifier;
                }
                $stmts = $node->stmts;
                foreach ($stmts as $i => $stmt) {
                    if (!$stmt instanceof Node\Stmt\ClassMethod) {
                        continue;
                    }
                    $methodName = $stmt->name->toLowerString();
                    if (!array_key_exists($methodName, $methodModifiers)) {
                        continue;
                    }
                    $methodAst = clone $stmt;
                    $methodAst->flags = $methodAst->flags & ~Node\Stmt\Class_::VISIBILITY_MODIFIER_MASK | $methodModifiers[$methodName];
                    $stmts[$i] = $methodAst;
                }
                $this->processStmtNodes($node, $stmts, $scope->enterTrait($traitReflection), $nodeCallback, \PHPStan\Analyser\StatementContext::createTopLevel());
                return;
            }
            if ($node instanceof Node\Stmt\ClassLike) {
                return;
            }
            if ($node instanceof Node\FunctionLike) {
                return;
            }
            foreach ($node->getSubNodeNames() as $subNodeName) {
                $subNode = $node->{$subNodeName};
                $this->processNodesForTraitUse($subNode, $traitReflection, $scope, $adaptations, $nodeCallback);
            }
        } elseif (is_array($node)) {
            foreach ($node as $subNode) {
                $this->processNodesForTraitUse($subNode, $traitReflection, $scope, $adaptations, $nodeCallback);
            }
        }
    }
    /**
     * @return array{TemplateTypeMap, array<string, Type>, ?Type, ?Type, ?string, bool, bool, bool, bool|null, bool, bool, string|null, Assertions, ?Type, array<string, Type>, array<(string|int), VarTag>, bool}
     * @param \PhpParser\Node\FunctionLike|\PhpParser\Node\Stmt\Property $node
     */
    public function getPhpDocs(\PHPStan\Analyser\Scope $scope, $node) : array
    {
        $templateTypeMap = TemplateTypeMap::createEmpty();
        $phpDocParameterTypes = [];
        $phpDocReturnType = null;
        $phpDocThrowType = null;
        $deprecatedDescription = null;
        $isDeprecated = \false;
        $isInternal = \false;
        $isFinal = \false;
        $isPure = \false;
        $isAllowedPrivateMutation = \false;
        $acceptsNamedArguments = \true;
        $isReadOnly = $scope->isInClass() && $scope->getClassReflection()->isImmutable();
        $asserts = Assertions::createEmpty();
        $selfOutType = null;
        $docComment = $node->getDocComment() !== null ? $node->getDocComment()->getText() : null;
        $file = $scope->getFile();
        $class = $scope->isInClass() ? $scope->getClassReflection()->getName() : null;
        $trait = $scope->isInTrait() ? $scope->getTraitReflection()->getName() : null;
        $resolvedPhpDoc = null;
        $functionName = null;
        $phpDocParameterOutTypes = [];
        if ($node instanceof Node\Stmt\ClassMethod) {
            if (!$scope->isInClass()) {
                throw new ShouldNotHappenException();
            }
            $functionName = $node->name->name;
            $positionalParameterNames = array_map(static function (Node\Param $param) : string {
                if (!$param->var instanceof Variable || !is_string($param->var->name)) {
                    throw new ShouldNotHappenException();
                }
                return $param->var->name;
            }, $node->getParams());
            $resolvedPhpDoc = $this->phpDocInheritanceResolver->resolvePhpDocForMethod($docComment, $file, $scope->getClassReflection(), $trait, $node->name->name, $positionalParameterNames);
            if ($node->name->toLowerString() === '__construct') {
                foreach ($node->params as $param) {
                    if ($param->flags === 0) {
                        continue;
                    }
                    if ($param->getDocComment() === null) {
                        continue;
                    }
                    if (!$param->var instanceof Variable || !is_string($param->var->name)) {
                        throw new ShouldNotHappenException();
                    }
                    $paramPhpDoc = $this->fileTypeMapper->getResolvedPhpDoc($file, $class, $trait, '__construct', $param->getDocComment()->getText());
                    $varTags = $paramPhpDoc->getVarTags();
                    if (isset($varTags[0]) && count($varTags) === 1) {
                        $phpDocType = $varTags[0]->getType();
                    } elseif (isset($varTags[$param->var->name])) {
                        $phpDocType = $varTags[$param->var->name]->getType();
                    } else {
                        continue;
                    }
                    $phpDocParameterTypes[$param->var->name] = $phpDocType;
                }
            }
        } elseif ($node instanceof Node\Stmt\Function_) {
            $functionName = trim($scope->getNamespace() . '\\' . $node->name->name, '\\');
        }
        if ($docComment !== null && $resolvedPhpDoc === null) {
            $resolvedPhpDoc = $this->fileTypeMapper->getResolvedPhpDoc($file, $class, $trait, $functionName, $docComment);
        }
        $varTags = [];
        if ($resolvedPhpDoc !== null) {
            $templateTypeMap = $resolvedPhpDoc->getTemplateTypeMap();
            foreach ($resolvedPhpDoc->getParamTags() as $paramName => $paramTag) {
                if (array_key_exists($paramName, $phpDocParameterTypes)) {
                    continue;
                }
                $paramType = $paramTag->getType();
                if ($scope->isInClass()) {
                    $paramType = $this->transformStaticType($scope->getClassReflection(), $paramType);
                }
                $phpDocParameterTypes[$paramName] = $paramType;
            }
            foreach ($resolvedPhpDoc->getParamOutTags() as $paramName => $paramOutTag) {
                $phpDocParameterOutTypes[$paramName] = $paramOutTag->getType();
            }
            if ($node instanceof Node\FunctionLike) {
                $nativeReturnType = $scope->getFunctionType($node->getReturnType(), \false, \false);
                $phpDocReturnType = $this->getPhpDocReturnType($resolvedPhpDoc, $nativeReturnType);
                if ($phpDocReturnType !== null && $scope->isInClass()) {
                    $phpDocReturnType = $this->transformStaticType($scope->getClassReflection(), $phpDocReturnType);
                }
            }
            $phpDocThrowType = $resolvedPhpDoc->getThrowsTag() !== null ? $resolvedPhpDoc->getThrowsTag()->getType() : null;
            $deprecatedDescription = $resolvedPhpDoc->getDeprecatedTag() !== null ? $resolvedPhpDoc->getDeprecatedTag()->getMessage() : null;
            $isDeprecated = $resolvedPhpDoc->isDeprecated();
            $isInternal = $resolvedPhpDoc->isInternal();
            $isFinal = $resolvedPhpDoc->isFinal();
            $isPure = $resolvedPhpDoc->isPure();
            $isAllowedPrivateMutation = $resolvedPhpDoc->isAllowedPrivateMutation();
            $acceptsNamedArguments = $resolvedPhpDoc->acceptsNamedArguments();
            $isReadOnly = $isReadOnly || $resolvedPhpDoc->isReadOnly();
            $asserts = Assertions::createFromResolvedPhpDocBlock($resolvedPhpDoc);
            $selfOutType = $resolvedPhpDoc->getSelfOutTag() !== null ? $resolvedPhpDoc->getSelfOutTag()->getType() : null;
            $varTags = $resolvedPhpDoc->getVarTags();
        }
        return [$templateTypeMap, $phpDocParameterTypes, $phpDocReturnType, $phpDocThrowType, $deprecatedDescription, $isDeprecated, $isInternal, $isFinal, $isPure, $acceptsNamedArguments, $isReadOnly, $docComment, $asserts, $selfOutType, $phpDocParameterOutTypes, $varTags, $isAllowedPrivateMutation];
    }
    private function transformStaticType(ClassReflection $declaringClass, Type $type) : Type
    {
        return TypeTraverser::map($type, static function (Type $type, callable $traverse) use($declaringClass) : Type {
            if ($type instanceof StaticType) {
                $changedType = $type->changeBaseClass($declaringClass);
                if ($declaringClass->isFinal()) {
                    $changedType = $changedType->getStaticObjectType();
                }
                return $traverse($changedType);
            }
            return $traverse($type);
        });
    }
    private function getPhpDocReturnType(ResolvedPhpDocBlock $resolvedPhpDoc, Type $nativeReturnType) : ?Type
    {
        $returnTag = $resolvedPhpDoc->getReturnTag();
        if ($returnTag === null) {
            return null;
        }
        $phpDocReturnType = $returnTag->getType();
        if ($returnTag->isExplicit()) {
            return $phpDocReturnType;
        }
        if ($nativeReturnType->isSuperTypeOf(TemplateTypeHelper::resolveToBounds($phpDocReturnType))->yes()) {
            return $phpDocReturnType;
        }
        return null;
    }
    /**
     * @template T of Node
     * @param array<T> $nodes
     * @return T
     */
    private function getFirstNonNopNode(array $nodes) : ?Node
    {
        foreach ($nodes as $node) {
            if (!$node instanceof Node\Stmt\Nop) {
                return $node;
            }
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

/** @api */
interface TypeSpecifierAwareExtension
{
    public function setTypeSpecifier(\PHPStan\Analyser\TypeSpecifier $typeSpecifier) : void;
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PHPStan\Reflection\ClassMemberAccessAnswerer;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ConstantReflection;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\PropertyReflection;
class OutOfClassScope implements ClassMemberAccessAnswerer
{
    /** @api */
    public function __construct()
    {
    }
    public function isInClass() : bool
    {
        return \false;
    }
    public function getClassReflection() : ?ClassReflection
    {
        return null;
    }
    public function canAccessProperty(PropertyReflection $propertyReflection) : bool
    {
        return $propertyReflection->isPublic();
    }
    public function canCallMethod(MethodReflection $methodReflection) : bool
    {
        return $methodReflection->isPublic();
    }
    public function canAccessConstant(ConstantReflection $constantReflection) : bool
    {
        return $constantReflection->isPublic();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PHPStan\Collectors\CollectedData;
use PHPStan\Dependency\RootExportedNode;
class FileAnalyserResult
{
    /**
     * @var list<Error>
     */
    private $errors;
    /**
     * @var list<CollectedData>
     */
    private $collectedData;
    /**
     * @var list<string>
     */
    private $dependencies;
    /**
     * @var list<RootExportedNode>
     */
    private $exportedNodes;
    /**
     * @param list<Error> $errors
     * @param list<CollectedData> $collectedData
     * @param list<string> $dependencies
     * @param list<RootExportedNode> $exportedNodes
     */
    public function __construct(array $errors, array $collectedData, array $dependencies, array $exportedNodes)
    {
        $this->errors = $errors;
        $this->collectedData = $collectedData;
        $this->dependencies = $dependencies;
        $this->exportedNodes = $exportedNodes;
    }
    /**
     * @return list<Error>
     */
    public function getErrors() : array
    {
        return $this->errors;
    }
    /**
     * @return list<CollectedData>
     */
    public function getCollectedData() : array
    {
        return $this->collectedData;
    }
    /**
     * @return list<string>
     */
    public function getDependencies() : array
    {
        return $this->dependencies;
    }
    /**
     * @return list<RootExportedNode>
     */
    public function getExportedNodes() : array
    {
        return $this->exportedNodes;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

class ExpressionResult
{
    /** @var (callable(): MutatingScope)|null */
    private $truthyScopeCallback;
    /**
     * @var \PHPStan\Analyser\MutatingScope|null
     */
    private $truthyScope;
    /** @var (callable(): MutatingScope)|null */
    private $falseyScopeCallback;
    /**
     * @var \PHPStan\Analyser\MutatingScope|null
     */
    private $falseyScope;
    /**
     * @var \PHPStan\Analyser\MutatingScope
     */
    private $scope;
    /**
     * @var bool
     */
    private $hasYield;
    /**
     * @var ThrowPoint[]
     */
    private $throwPoints;
    /**
     * @param ThrowPoint[] $throwPoints
     * @param (callable(): MutatingScope)|null $truthyScopeCallback
     * @param (callable(): MutatingScope)|null $falseyScopeCallback
     */
    public function __construct(\PHPStan\Analyser\MutatingScope $scope, bool $hasYield, array $throwPoints, ?callable $truthyScopeCallback = null, ?callable $falseyScopeCallback = null)
    {
        $this->scope = $scope;
        $this->hasYield = $hasYield;
        $this->throwPoints = $throwPoints;
        $this->truthyScopeCallback = $truthyScopeCallback;
        $this->falseyScopeCallback = $falseyScopeCallback;
    }
    public function getScope() : \PHPStan\Analyser\MutatingScope
    {
        return $this->scope;
    }
    public function hasYield() : bool
    {
        return $this->hasYield;
    }
    /**
     * @return ThrowPoint[]
     */
    public function getThrowPoints() : array
    {
        return $this->throwPoints;
    }
    public function getTruthyScope() : \PHPStan\Analyser\MutatingScope
    {
        if ($this->truthyScopeCallback === null) {
            return $this->scope;
        }
        if ($this->truthyScope !== null) {
            return $this->truthyScope;
        }
        $callback = $this->truthyScopeCallback;
        $this->truthyScope = $callback();
        return $this->truthyScope;
    }
    public function getFalseyScope() : \PHPStan\Analyser\MutatingScope
    {
        if ($this->falseyScopeCallback === null) {
            return $this->scope;
        }
        if ($this->falseyScope !== null) {
            return $this->falseyScope;
        }
        $callback = $this->falseyScopeCallback;
        $this->falseyScope = $callback();
        return $this->falseyScope;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PhpParser\Node\Expr;
use PHPStan\Type\Type;
class EnsuredNonNullabilityResultExpression
{
    /**
     * @var \PhpParser\Node\Expr
     */
    private $expression;
    /**
     * @var \PHPStan\Type\Type
     */
    private $originalType;
    /**
     * @var \PHPStan\Type\Type
     */
    private $originalNativeType;
    public function __construct(Expr $expression, Type $originalType, Type $originalNativeType)
    {
        $this->expression = $expression;
        $this->originalType = $originalType;
        $this->originalNativeType = $originalNativeType;
    }
    public function getExpression() : Expr
    {
        return $this->expression;
    }
    public function getOriginalType() : Type
    {
        return $this->originalType;
    }
    public function getOriginalNativeType() : Type
    {
        return $this->originalNativeType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PHPStan\DependencyInjection\Type\DynamicReturnTypeExtensionRegistryProvider;
use PHPStan\Node\Printer\ExprPrinter;
use PHPStan\Parser\Parser;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\InitializerExprTypeResolver;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Properties\PropertyReflectionFinder;
use PHPStan\ShouldNotHappenException;
use function is_a;
class DirectInternalScopeFactory implements \PHPStan\Analyser\InternalScopeFactory
{
    /**
     * @var class-string
     */
    private $scopeClass;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Reflection\InitializerExprTypeResolver
     */
    private $initializerExprTypeResolver;
    /**
     * @var \PHPStan\DependencyInjection\Type\DynamicReturnTypeExtensionRegistryProvider
     */
    private $dynamicReturnTypeExtensionRegistryProvider;
    /**
     * @var \PHPStan\Node\Printer\ExprPrinter
     */
    private $exprPrinter;
    /**
     * @var \PHPStan\Analyser\TypeSpecifier
     */
    private $typeSpecifier;
    /**
     * @var \PHPStan\Rules\Properties\PropertyReflectionFinder
     */
    private $propertyReflectionFinder;
    /**
     * @var \PHPStan\Parser\Parser
     */
    private $parser;
    /**
     * @var \PHPStan\Analyser\NodeScopeResolver
     */
    private $nodeScopeResolver;
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    /**
     * @var bool
     */
    private $explicitMixedInUnknownGenericNew;
    /**
     * @var bool
     */
    private $explicitMixedForGlobalVariables;
    /**
     * @var \PHPStan\Analyser\ConstantResolver
     */
    private $constantResolver;
    /**
     * @param class-string $scopeClass
     */
    public function __construct(string $scopeClass, ReflectionProvider $reflectionProvider, InitializerExprTypeResolver $initializerExprTypeResolver, DynamicReturnTypeExtensionRegistryProvider $dynamicReturnTypeExtensionRegistryProvider, ExprPrinter $exprPrinter, \PHPStan\Analyser\TypeSpecifier $typeSpecifier, PropertyReflectionFinder $propertyReflectionFinder, Parser $parser, \PHPStan\Analyser\NodeScopeResolver $nodeScopeResolver, PhpVersion $phpVersion, bool $explicitMixedInUnknownGenericNew, bool $explicitMixedForGlobalVariables, \PHPStan\Analyser\ConstantResolver $constantResolver)
    {
        $this->scopeClass = $scopeClass;
        $this->reflectionProvider = $reflectionProvider;
        $this->initializerExprTypeResolver = $initializerExprTypeResolver;
        $this->dynamicReturnTypeExtensionRegistryProvider = $dynamicReturnTypeExtensionRegistryProvider;
        $this->exprPrinter = $exprPrinter;
        $this->typeSpecifier = $typeSpecifier;
        $this->propertyReflectionFinder = $propertyReflectionFinder;
        $this->parser = $parser;
        $this->nodeScopeResolver = $nodeScopeResolver;
        $this->phpVersion = $phpVersion;
        $this->explicitMixedInUnknownGenericNew = $explicitMixedInUnknownGenericNew;
        $this->explicitMixedForGlobalVariables = $explicitMixedForGlobalVariables;
        $this->constantResolver = $constantResolver;
    }
    /**
     * @param array<string, ExpressionTypeHolder> $expressionTypes
     * @param array<string, ExpressionTypeHolder> $nativeExpressionTypes
     * @param array<string, ConditionalExpressionHolder[]> $conditionalExpressions
     * @param array<(FunctionReflection|MethodReflection)> $inFunctionCallsStack
     * @param array<string, true> $currentlyAssignedExpressions
     * @param array<string, true> $currentlyAllowedUndefinedExpressions
     * @param \PHPStan\Reflection\FunctionReflection|\PHPStan\Reflection\MethodReflection|null $function
     */
    public function create(\PHPStan\Analyser\ScopeContext $context, bool $declareStrictTypes = \false, $function = null, ?string $namespace = null, array $expressionTypes = [], array $nativeExpressionTypes = [], array $conditionalExpressions = [], array $inClosureBindScopeClasses = [], ?ParametersAcceptor $anonymousFunctionReflection = null, bool $inFirstLevelStatement = \true, array $currentlyAssignedExpressions = [], array $currentlyAllowedUndefinedExpressions = [], array $inFunctionCallsStack = [], bool $afterExtractCall = \false, ?\PHPStan\Analyser\Scope $parentScope = null, bool $nativeTypesPromoted = \false) : \PHPStan\Analyser\MutatingScope
    {
        $scopeClass = $this->scopeClass;
        if (!is_a($scopeClass, \PHPStan\Analyser\MutatingScope::class, \true)) {
            throw new ShouldNotHappenException();
        }
        return new $scopeClass($this, $this->reflectionProvider, $this->initializerExprTypeResolver, $this->dynamicReturnTypeExtensionRegistryProvider->getRegistry(), $this->exprPrinter, $this->typeSpecifier, $this->propertyReflectionFinder, $this->parser, $this->nodeScopeResolver, $this->constantResolver, $context, $this->phpVersion, $declareStrictTypes, $function, $namespace, $expressionTypes, $nativeExpressionTypes, $conditionalExpressions, $inClosureBindScopeClasses, $anonymousFunctionReflection, $inFirstLevelStatement, $currentlyAssignedExpressions, $currentlyAllowedUndefinedExpressions, $inFunctionCallsStack, $afterExtractCall, $parentScope, $nativeTypesPromoted, $this->explicitMixedInUnknownGenericNew, $this->explicitMixedForGlobalVariables);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PhpParser\Node;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use Throwable;
/** @api */
class ThrowPoint
{
    /**
     * @var \PHPStan\Analyser\MutatingScope
     */
    private $scope;
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    /**
     * @var Node\Expr|Node\Stmt
     */
    private $node;
    /**
     * @var bool
     */
    private $explicit;
    /**
     * @var bool
     */
    private $canContainAnyThrowable;
    /**
     * @param Node\Expr|Node\Stmt $node
     */
    private function __construct(\PHPStan\Analyser\MutatingScope $scope, Type $type, Node $node, bool $explicit, bool $canContainAnyThrowable)
    {
        $this->scope = $scope;
        $this->type = $type;
        $this->node = $node;
        $this->explicit = $explicit;
        $this->canContainAnyThrowable = $canContainAnyThrowable;
    }
    /**
     * @param Node\Expr|Node\Stmt $node
     */
    public static function createExplicit(\PHPStan\Analyser\MutatingScope $scope, Type $type, Node $node, bool $canContainAnyThrowable) : self
    {
        return new self($scope, $type, $node, \true, $canContainAnyThrowable);
    }
    /**
     * @param Node\Expr|Node\Stmt $node
     */
    public static function createImplicit(\PHPStan\Analyser\MutatingScope $scope, Node $node) : self
    {
        return new self($scope, new ObjectType(Throwable::class), $node, \false, \true);
    }
    public function getScope() : \PHPStan\Analyser\MutatingScope
    {
        return $this->scope;
    }
    public function getType() : Type
    {
        return $this->type;
    }
    /**
     * @return Node\Expr|Node\Stmt
     */
    public function getNode()
    {
        return $this->node;
    }
    public function isExplicit() : bool
    {
        return $this->explicit;
    }
    public function canContainAnyThrowable() : bool
    {
        return $this->canContainAnyThrowable;
    }
    public function subtractCatchType(Type $catchType) : self
    {
        return new self($this->scope, TypeCombinator::remove($this->type, $catchType), $this->node, $this->explicit, $this->canContainAnyThrowable);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PHPStan\DependencyInjection\Container;
use PHPStan\Reflection\ReflectionProvider\ReflectionProviderProvider;
class ConstantResolverFactory
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider\ReflectionProviderProvider
     */
    private $reflectionProviderProvider;
    /**
     * @var \PHPStan\DependencyInjection\Container
     */
    private $container;
    public function __construct(ReflectionProviderProvider $reflectionProviderProvider, Container $container)
    {
        $this->reflectionProviderProvider = $reflectionProviderProvider;
        $this->container = $container;
    }
    public function create() : \PHPStan\Analyser\ConstantResolver
    {
        return new \PHPStan\Analyser\ConstantResolver($this->reflectionProviderProvider, $this->container->getParameter('dynamicConstantNames'));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use Exception;
use JsonSerializable;
use PhpParser\Node;
use PHPStan\ShouldNotHappenException;
use ReturnTypeWillChange;
use Throwable;
use function is_bool;
/** @api */
class Error implements JsonSerializable
{
    /**
     * @var string
     */
    private $message;
    /**
     * @var string
     */
    private $file;
    /**
     * @var int|null
     */
    private $line;
    /**
     * @var bool|\Throwable
     */
    private $canBeIgnored = \true;
    /**
     * @var string|null
     */
    private $filePath;
    /**
     * @var string|null
     */
    private $traitFilePath;
    /**
     * @var string|null
     */
    private $tip;
    /**
     * @var int|null
     */
    private $nodeLine;
    /**
     * @var class-string<Node>|null
     */
    private $nodeType;
    /**
     * @var string|null
     */
    private $identifier;
    /**
     * @var mixed[]
     */
    private $metadata = [];
    /**
     * Error constructor.
     *
     * @param class-string<Node>|null $nodeType
     * @param mixed[] $metadata
     * @param bool|\Throwable $canBeIgnored
     */
    public function __construct(string $message, string $file, ?int $line = null, $canBeIgnored = \true, ?string $filePath = null, ?string $traitFilePath = null, ?string $tip = null, ?int $nodeLine = null, ?string $nodeType = null, ?string $identifier = null, array $metadata = [])
    {
        $this->message = $message;
        $this->file = $file;
        $this->line = $line;
        $this->canBeIgnored = $canBeIgnored;
        $this->filePath = $filePath;
        $this->traitFilePath = $traitFilePath;
        $this->tip = $tip;
        $this->nodeLine = $nodeLine;
        $this->nodeType = $nodeType;
        $this->identifier = $identifier;
        $this->metadata = $metadata;
    }
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    public function getFilePath() : string
    {
        if ($this->filePath === null) {
            return $this->file;
        }
        return $this->filePath;
    }
    public function changeFilePath(string $newFilePath) : self
    {
        if ($this->traitFilePath !== null) {
            throw new ShouldNotHappenException('Errors in traits not yet supported');
        }
        return new self($this->message, $newFilePath, $this->line, $this->canBeIgnored, $newFilePath, null, $this->tip, $this->nodeLine, $this->nodeType, $this->identifier, $this->metadata);
    }
    public function changeTraitFilePath(string $newFilePath) : self
    {
        return new self($this->message, $this->file, $this->line, $this->canBeIgnored, $this->filePath, $newFilePath, $this->tip, $this->nodeLine, $this->nodeType, $this->identifier, $this->metadata);
    }
    public function getTraitFilePath() : ?string
    {
        return $this->traitFilePath;
    }
    public function getLine() : ?int
    {
        return $this->line;
    }
    public function canBeIgnored() : bool
    {
        return $this->canBeIgnored === \true;
    }
    public function hasNonIgnorableException() : bool
    {
        return $this->canBeIgnored instanceof Throwable;
    }
    public function getTip() : ?string
    {
        return $this->tip;
    }
    public function withoutTip() : self
    {
        if ($this->tip === null) {
            return $this;
        }
        return new self($this->message, $this->file, $this->line, $this->canBeIgnored, $this->filePath, $this->traitFilePath, null, $this->nodeLine, $this->nodeType);
    }
    public function doNotIgnore() : self
    {
        if (!$this->canBeIgnored()) {
            return $this;
        }
        return new self($this->message, $this->file, $this->line, \false, $this->filePath, $this->traitFilePath, $this->tip, $this->nodeLine, $this->nodeType);
    }
    public function getNodeLine() : ?int
    {
        return $this->nodeLine;
    }
    /**
     * @return class-string<Node>|null
     */
    public function getNodeType() : ?string
    {
        return $this->nodeType;
    }
    public function getIdentifier() : ?string
    {
        return $this->identifier;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
    /**
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize()
    {
        return ['message' => $this->message, 'file' => $this->file, 'line' => $this->line, 'canBeIgnored' => is_bool($this->canBeIgnored) ? $this->canBeIgnored : 'exception', 'filePath' => $this->filePath, 'traitFilePath' => $this->traitFilePath, 'tip' => $this->tip, 'nodeLine' => $this->nodeLine, 'nodeType' => $this->nodeType, 'identifier' => $this->identifier, 'metadata' => $this->metadata];
    }
    /**
     * @param mixed[] $json
     */
    public static function decode(array $json) : self
    {
        return new self($json['message'], $json['file'], $json['line'], $json['canBeIgnored'] === 'exception' ? new Exception() : $json['canBeIgnored'], $json['filePath'], $json['traitFilePath'], $json['tip'], $json['nodeLine'] ?? null, $json['nodeType'] ?? null, $json['identifier'] ?? null, $json['metadata'] ?? []);
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : self
    {
        return new self($properties['message'], $properties['file'], $properties['line'], $properties['canBeIgnored'], $properties['filePath'], $properties['traitFilePath'], $properties['tip'], $properties['nodeLine'] ?? null, $properties['nodeType'] ?? null, $properties['identifier'] ?? null, $properties['metadata'] ?? []);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PhpParser\Node\Expr;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
class ExpressionTypeHolder
{
    /**
     * @var \PhpParser\Node\Expr
     */
    private $expr;
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    /**
     * @var \PHPStan\TrinaryLogic
     */
    private $certainty;
    public function __construct(Expr $expr, Type $type, TrinaryLogic $certainty)
    {
        $this->expr = $expr;
        $this->type = $type;
        $this->certainty = $certainty;
    }
    public static function createYes(Expr $expr, Type $type) : self
    {
        return new self($expr, $type, TrinaryLogic::createYes());
    }
    public static function createMaybe(Expr $expr, Type $type) : self
    {
        return new self($expr, $type, TrinaryLogic::createMaybe());
    }
    public function equals(self $other) : bool
    {
        if (!$this->certainty->equals($other->certainty)) {
            return \false;
        }
        return $this->type->equals($other->type);
    }
    public function and(self $other) : self
    {
        if ($this->getType()->equals($other->getType())) {
            $type = $this->getType();
        } else {
            $type = TypeCombinator::union($this->getType(), $other->getType());
        }
        return new self($this->expr, $type, $this->getCertainty()->and($other->getCertainty()));
    }
    public function getExpr() : Expr
    {
        return $this->expr;
    }
    public function getType() : Type
    {
        return $this->type;
    }
    public function getCertainty() : TrinaryLogic
    {
        return $this->certainty;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PhpParser\Node\Expr;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
class SpecifiedTypes
{
    /**
     * @var array<string, array{Expr, Type}>
     */
    private $sureTypes = [];
    /**
     * @var array<string, array{Expr, Type}>
     */
    private $sureNotTypes = [];
    /**
     * @var bool
     */
    private $overwrite = \false;
    /**
     * @var array<string, ConditionalExpressionHolder[]>
     */
    private $newConditionalExpressionHolders = [];
    /**
     * @var \PhpParser\Node\Expr|null
     */
    private $rootExpr;
    /**
     * @api
     * @param array<string, array{Expr, Type}> $sureTypes
     * @param array<string, array{Expr, Type}> $sureNotTypes
     * @param array<string, ConditionalExpressionHolder[]> $newConditionalExpressionHolders
     */
    public function __construct(array $sureTypes = [], array $sureNotTypes = [], bool $overwrite = \false, array $newConditionalExpressionHolders = [], ?Expr $rootExpr = null)
    {
        $this->sureTypes = $sureTypes;
        $this->sureNotTypes = $sureNotTypes;
        $this->overwrite = $overwrite;
        $this->newConditionalExpressionHolders = $newConditionalExpressionHolders;
        $this->rootExpr = $rootExpr;
    }
    /**
     * @api
     * @return array<string, array{Expr, Type}>
     */
    public function getSureTypes() : array
    {
        return $this->sureTypes;
    }
    /**
     * @api
     * @return array<string, array{Expr, Type}>
     */
    public function getSureNotTypes() : array
    {
        return $this->sureNotTypes;
    }
    public function shouldOverwrite() : bool
    {
        return $this->overwrite;
    }
    /**
     * @return array<string, ConditionalExpressionHolder[]>
     */
    public function getNewConditionalExpressionHolders() : array
    {
        return $this->newConditionalExpressionHolders;
    }
    public function getRootExpr() : ?Expr
    {
        return $this->rootExpr;
    }
    /** @api */
    public function intersectWith(\PHPStan\Analyser\SpecifiedTypes $other) : self
    {
        $sureTypeUnion = [];
        $sureNotTypeUnion = [];
        $rootExpr = $this->mergeRootExpr($this->rootExpr, $other->rootExpr);
        foreach ($this->sureTypes as $exprString => [$exprNode, $type]) {
            if (!isset($other->sureTypes[$exprString])) {
                continue;
            }
            $sureTypeUnion[$exprString] = [$exprNode, TypeCombinator::union($type, $other->sureTypes[$exprString][1])];
        }
        foreach ($this->sureNotTypes as $exprString => [$exprNode, $type]) {
            if (!isset($other->sureNotTypes[$exprString])) {
                continue;
            }
            $sureNotTypeUnion[$exprString] = [$exprNode, TypeCombinator::intersect($type, $other->sureNotTypes[$exprString][1])];
        }
        return new self($sureTypeUnion, $sureNotTypeUnion, $this->overwrite && $other->overwrite, [], $rootExpr);
    }
    /** @api */
    public function unionWith(\PHPStan\Analyser\SpecifiedTypes $other) : self
    {
        $sureTypeUnion = $this->sureTypes + $other->sureTypes;
        $sureNotTypeUnion = $this->sureNotTypes + $other->sureNotTypes;
        $rootExpr = $this->mergeRootExpr($this->rootExpr, $other->rootExpr);
        foreach ($this->sureTypes as $exprString => [$exprNode, $type]) {
            if (!isset($other->sureTypes[$exprString])) {
                continue;
            }
            $sureTypeUnion[$exprString] = [$exprNode, TypeCombinator::intersect($type, $other->sureTypes[$exprString][1])];
        }
        foreach ($this->sureNotTypes as $exprString => [$exprNode, $type]) {
            if (!isset($other->sureNotTypes[$exprString])) {
                continue;
            }
            $sureNotTypeUnion[$exprString] = [$exprNode, TypeCombinator::union($type, $other->sureNotTypes[$exprString][1])];
        }
        return new self($sureTypeUnion, $sureNotTypeUnion, $this->overwrite || $other->overwrite, [], $rootExpr);
    }
    public function normalize(\PHPStan\Analyser\Scope $scope) : self
    {
        $sureTypes = $this->sureTypes;
        foreach ($this->sureNotTypes as $exprString => [$exprNode, $sureNotType]) {
            if (!isset($sureTypes[$exprString])) {
                $sureTypes[$exprString] = [$exprNode, TypeCombinator::remove($scope->getType($exprNode), $sureNotType)];
                continue;
            }
            $sureTypes[$exprString][1] = TypeCombinator::remove($sureTypes[$exprString][1], $sureNotType);
        }
        return new self($sureTypes, [], $this->overwrite, $this->newConditionalExpressionHolders, $this->rootExpr);
    }
    private function mergeRootExpr(?Expr $rootExprA, ?Expr $rootExprB) : ?Expr
    {
        if ($rootExprA === $rootExprB) {
            return $rootExprA;
        }
        if ($rootExprA === null || $rootExprB === null) {
            return $rootExprA ?? $rootExprB;
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

/** @api */
class ScopeFactory
{
    /**
     * @var \PHPStan\Analyser\InternalScopeFactory
     */
    private $internalScopeFactory;
    public function __construct(\PHPStan\Analyser\InternalScopeFactory $internalScopeFactory)
    {
        $this->internalScopeFactory = $internalScopeFactory;
    }
    public function create(\PHPStan\Analyser\ScopeContext $context) : \PHPStan\Analyser\MutatingScope
    {
        return $this->internalScopeFactory->create($context);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PhpParser\Comment;
use PhpParser\Node;
use PHPStan\AnalysedCodeException;
use PHPStan\BetterReflection\NodeCompiler\Exception\UnableToCompileNode;
use PHPStan\BetterReflection\Reflection\Exception\CircularReference;
use PHPStan\BetterReflection\Reflection\Exception\NotAClassReflection;
use PHPStan\BetterReflection\Reflection\Exception\NotAnInterfaceReflection;
use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
use PHPStan\Collectors\CollectedData;
use PHPStan\Collectors\Registry as CollectorRegistry;
use PHPStan\Dependency\DependencyResolver;
use PHPStan\Node\FileNode;
use PHPStan\Parser\Parser;
use PHPStan\Parser\ParserErrorsException;
use PHPStan\Rules\Registry as RuleRegistry;
use function array_key_exists;
use function array_keys;
use function array_merge;
use function array_unique;
use function array_values;
use function error_reporting;
use function get_class;
use function is_dir;
use function is_file;
use function restore_error_handler;
use function set_error_handler;
use function sprintf;
use function strpos;
use const E_DEPRECATED;
class FileAnalyser
{
    /** @var list<Error> */
    private $collectedErrors = [];
    /**
     * @var \PHPStan\Analyser\ScopeFactory
     */
    private $scopeFactory;
    /**
     * @var \PHPStan\Analyser\NodeScopeResolver
     */
    private $nodeScopeResolver;
    /**
     * @var \PHPStan\Parser\Parser
     */
    private $parser;
    /**
     * @var \PHPStan\Dependency\DependencyResolver
     */
    private $dependencyResolver;
    /**
     * @var \PHPStan\Analyser\RuleErrorTransformer
     */
    private $ruleErrorTransformer;
    /**
     * @var bool
     */
    private $reportUnmatchedIgnoredErrors;
    public function __construct(\PHPStan\Analyser\ScopeFactory $scopeFactory, \PHPStan\Analyser\NodeScopeResolver $nodeScopeResolver, Parser $parser, DependencyResolver $dependencyResolver, \PHPStan\Analyser\RuleErrorTransformer $ruleErrorTransformer, bool $reportUnmatchedIgnoredErrors)
    {
        $this->scopeFactory = $scopeFactory;
        $this->nodeScopeResolver = $nodeScopeResolver;
        $this->parser = $parser;
        $this->dependencyResolver = $dependencyResolver;
        $this->ruleErrorTransformer = $ruleErrorTransformer;
        $this->reportUnmatchedIgnoredErrors = $reportUnmatchedIgnoredErrors;
    }
    /**
     * @param array<string, true> $analysedFiles
     * @param callable(Node $node, Scope $scope): void|null $outerNodeCallback
     */
    public function analyseFile(string $file, array $analysedFiles, RuleRegistry $ruleRegistry, CollectorRegistry $collectorRegistry, ?callable $outerNodeCallback) : \PHPStan\Analyser\FileAnalyserResult
    {
        /** @var list<Error> $fileErrors */
        $fileErrors = [];
        /** @var list<CollectedData> $fileCollectedData */
        $fileCollectedData = [];
        $fileDependencies = [];
        $exportedNodes = [];
        if (is_file($file)) {
            try {
                $this->collectErrors($analysedFiles);
                $parserNodes = $this->parser->parseFile($file);
                $linesToIgnore = $this->getLinesToIgnoreFromTokens($file, $parserNodes);
                $temporaryFileErrors = [];
                $nodeCallback = function (Node $node, \PHPStan\Analyser\Scope $scope) use(&$fileErrors, &$fileCollectedData, &$fileDependencies, &$exportedNodes, $file, $ruleRegistry, $collectorRegistry, $outerNodeCallback, $analysedFiles, &$linesToIgnore, &$temporaryFileErrors) : void {
                    if ($node instanceof Node\Stmt\Trait_) {
                        foreach (array_keys($linesToIgnore[$file] ?? []) as $lineToIgnore) {
                            if ($lineToIgnore < $node->getStartLine() || $lineToIgnore > $node->getEndLine()) {
                                continue;
                            }
                            unset($linesToIgnore[$file][$lineToIgnore]);
                        }
                    }
                    if ($outerNodeCallback !== null) {
                        $outerNodeCallback($node, $scope);
                    }
                    $uniquedAnalysedCodeExceptionMessages = [];
                    $nodeType = get_class($node);
                    foreach ($ruleRegistry->getRules($nodeType) as $rule) {
                        try {
                            $ruleErrors = $rule->processNode($node, $scope);
                        } catch (AnalysedCodeException $e) {
                            if (isset($uniquedAnalysedCodeExceptionMessages[$e->getMessage()])) {
                                continue;
                            }
                            $uniquedAnalysedCodeExceptionMessages[$e->getMessage()] = \true;
                            $fileErrors[] = new \PHPStan\Analyser\Error($e->getMessage(), $file, $node->getLine(), $e, null, null, $e->getTip());
                            continue;
                        } catch (IdentifierNotFound $e) {
                            $fileErrors[] = new \PHPStan\Analyser\Error(sprintf('Reflection error: %s not found.', $e->getIdentifier()->getName()), $file, $node->getLine(), $e, null, null, 'Learn more at https://phpstan.org/user-guide/discovering-symbols');
                            continue;
                        } catch (UnableToCompileNode|NotAClassReflection|NotAnInterfaceReflection|CircularReference $e) {
                            $fileErrors[] = new \PHPStan\Analyser\Error(sprintf('Reflection error: %s', $e->getMessage()), $file, $node->getLine(), $e);
                            continue;
                        }
                        foreach ($ruleErrors as $ruleError) {
                            $temporaryFileErrors[] = $this->ruleErrorTransformer->transform($ruleError, $scope, $nodeType, $node->getLine());
                        }
                    }
                    if ($scope->isInTrait()) {
                        $sameTraitFile = $file === $scope->getTraitReflection()->getFileName();
                        foreach ($this->getLinesToIgnore($node) as $lineToIgnore) {
                            $linesToIgnore[$scope->getFileDescription()][$lineToIgnore] = \true;
                            if (!$sameTraitFile) {
                                continue;
                            }
                            unset($linesToIgnore[$file][$lineToIgnore]);
                        }
                    }
                    foreach ($collectorRegistry->getCollectors($nodeType) as $collector) {
                        try {
                            $collectedData = $collector->processNode($node, $scope);
                        } catch (AnalysedCodeException $e) {
                            if (isset($uniquedAnalysedCodeExceptionMessages[$e->getMessage()])) {
                                continue;
                            }
                            $uniquedAnalysedCodeExceptionMessages[$e->getMessage()] = \true;
                            $fileErrors[] = new \PHPStan\Analyser\Error($e->getMessage(), $file, $node->getLine(), $e, null, null, $e->getTip());
                            continue;
                        } catch (IdentifierNotFound $e) {
                            $fileErrors[] = new \PHPStan\Analyser\Error(sprintf('Reflection error: %s not found.', $e->getIdentifier()->getName()), $file, $node->getLine(), $e, null, null, 'Learn more at https://phpstan.org/user-guide/discovering-symbols');
                            continue;
                        } catch (UnableToCompileNode|NotAClassReflection|NotAnInterfaceReflection|CircularReference $e) {
                            $fileErrors[] = new \PHPStan\Analyser\Error(sprintf('Reflection error: %s', $e->getMessage()), $file, $node->getLine(), $e);
                            continue;
                        }
                        if ($collectedData === null) {
                            continue;
                        }
                        $fileCollectedData[] = new CollectedData($collectedData, $scope->getFile(), get_class($collector));
                    }
                    try {
                        $dependencies = $this->dependencyResolver->resolveDependencies($node, $scope);
                        foreach ($dependencies->getFileDependencies($scope->getFile(), $analysedFiles) as $dependentFile) {
                            $fileDependencies[] = $dependentFile;
                        }
                        if ($dependencies->getExportedNode() !== null) {
                            $exportedNodes[] = $dependencies->getExportedNode();
                        }
                    } catch (AnalysedCodeException $exception) {
                        // pass
                    } catch (IdentifierNotFound $exception) {
                        // pass
                    } catch (UnableToCompileNode|NotAClassReflection|NotAnInterfaceReflection $exception) {
                        // pass
                    }
                };
                $scope = $this->scopeFactory->create(\PHPStan\Analyser\ScopeContext::create($file));
                $nodeCallback(new FileNode($parserNodes), $scope);
                $this->nodeScopeResolver->processNodes($parserNodes, $scope, $nodeCallback);
                $unmatchedLineIgnores = $linesToIgnore;
                foreach ($temporaryFileErrors as $tmpFileError) {
                    $line = $tmpFileError->getLine();
                    if ($line !== null && $tmpFileError->canBeIgnored() && array_key_exists($tmpFileError->getFile(), $linesToIgnore) && array_key_exists($line, $linesToIgnore[$tmpFileError->getFile()])) {
                        unset($unmatchedLineIgnores[$tmpFileError->getFile()][$line]);
                        continue;
                    }
                    $fileErrors[] = $tmpFileError;
                }
                if ($this->reportUnmatchedIgnoredErrors) {
                    foreach ($unmatchedLineIgnores as $ignoredFile => $lines) {
                        if ($ignoredFile !== $file) {
                            continue;
                        }
                        foreach (array_keys($lines) as $line) {
                            $fileErrors[] = new \PHPStan\Analyser\Error(sprintf('No error to ignore is reported on line %d.', $line), $scope->getFileDescription(), $line, \false, $scope->getFile(), null, null, null, null, 'ignoredError.unmatchedOnLine');
                        }
                    }
                }
            } catch (\PhpParser\Error $e) {
                $fileErrors[] = new \PHPStan\Analyser\Error($e->getMessage(), $file, $e->getStartLine() !== -1 ? $e->getStartLine() : null, $e);
            } catch (ParserErrorsException $e) {
                foreach ($e->getErrors() as $error) {
                    $fileErrors[] = new \PHPStan\Analyser\Error($error->getMessage(), $e->getParsedFile() ?? $file, $error->getStartLine() !== -1 ? $error->getStartLine() : null, $e);
                }
            } catch (AnalysedCodeException $e) {
                $fileErrors[] = new \PHPStan\Analyser\Error($e->getMessage(), $file, null, $e, null, null, $e->getTip());
            } catch (IdentifierNotFound $e) {
                $fileErrors[] = new \PHPStan\Analyser\Error(sprintf('Reflection error: %s not found.', $e->getIdentifier()->getName()), $file, null, $e, null, null, 'Learn more at https://phpstan.org/user-guide/discovering-symbols');
            } catch (UnableToCompileNode|NotAClassReflection|NotAnInterfaceReflection|CircularReference $e) {
                $fileErrors[] = new \PHPStan\Analyser\Error(sprintf('Reflection error: %s', $e->getMessage()), $file, null, $e);
            }
        } elseif (is_dir($file)) {
            $fileErrors[] = new \PHPStan\Analyser\Error(sprintf('File %s is a directory.', $file), $file, null, \false);
        } else {
            $fileErrors[] = new \PHPStan\Analyser\Error(sprintf('File %s does not exist.', $file), $file, null, \false);
        }
        $this->restoreCollectErrorsHandler();
        $fileErrors = array_merge($fileErrors, $this->collectedErrors);
        return new \PHPStan\Analyser\FileAnalyserResult($fileErrors, $fileCollectedData, array_values(array_unique($fileDependencies)), $exportedNodes);
    }
    /**
     * @return int[]
     */
    private function getLinesToIgnore(Node $node) : array
    {
        $lines = [];
        if ($node->getDocComment() !== null) {
            $line = $this->findLineToIgnoreComment($node->getDocComment());
            if ($line !== null) {
                $lines[] = $line;
            }
        }
        foreach ($node->getComments() as $comment) {
            $line = $this->findLineToIgnoreComment($comment);
            if ($line === null) {
                continue;
            }
            $lines[] = $line;
        }
        return $lines;
    }
    /**
     * @param Node[] $nodes
     * @return array<string, array<int, true>>
     */
    private function getLinesToIgnoreFromTokens(string $file, array $nodes) : array
    {
        if (!isset($nodes[0])) {
            return [];
        }
        /** @var int[] $tokenLines */
        $tokenLines = $nodes[0]->getAttribute('linesToIgnore', []);
        $lines = [];
        foreach ($tokenLines as $tokenLine) {
            $lines[$file][$tokenLine] = \true;
        }
        return $lines;
    }
    private function findLineToIgnoreComment(Comment $comment) : ?int
    {
        $text = $comment->getText();
        if ($comment instanceof Comment\Doc) {
            $line = $comment->getEndLine();
        } else {
            if (strpos($text, "\n") === \false || strpos($text, '//') === 0) {
                $line = $comment->getStartLine();
            } else {
                $line = $comment->getEndLine();
            }
        }
        if (strpos($text, '@phpstan-ignore-next-line') !== \false) {
            return $line + 1;
        }
        if (strpos($text, '@phpstan-ignore-line') !== \false) {
            return $line;
        }
        return null;
    }
    /**
     * @param array<string, true> $analysedFiles
     */
    private function collectErrors(array $analysedFiles) : void
    {
        $this->collectedErrors = [];
        set_error_handler(function (int $errno, string $errstr, string $errfile, int $errline) use($analysedFiles) : bool {
            if ((error_reporting() & $errno) === 0) {
                // silence @ operator
                return \true;
            }
            if ($errno === E_DEPRECATED) {
                return \true;
            }
            if (!isset($analysedFiles[$errfile])) {
                return \true;
            }
            $this->collectedErrors[] = new \PHPStan\Analyser\Error($errstr, $errfile, $errline, \true);
            return \true;
        });
    }
    private function restoreCollectErrorsHandler() : void
    {
        restore_error_handler();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

class StatementContext
{
    /**
     * @var bool
     */
    private $isTopLevel;
    private function __construct(bool $isTopLevel)
    {
        $this->isTopLevel = $isTopLevel;
    }
    public static function createTopLevel() : self
    {
        return new self(\true);
    }
    public static function createDeep() : self
    {
        return new self(\false);
    }
    public function isTopLevel() : bool
    {
        return $this->isTopLevel;
    }
    public function enterDeep() : self
    {
        if ($this->isTopLevel) {
            return self::createDeep();
        }
        return $this;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PhpParser\Node\Name;
use PHPStan\Reflection\NamespaceAnswerer;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Reflection\ReflectionProvider\ReflectionProviderProvider;
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
use PHPStan\Type\Constant\ConstantFloatType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\GeneralizePrecision;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\MixedType;
use PHPStan\Type\ResourceType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\UnionType;
use function array_key_exists;
use function in_array;
use const INF;
use const NAN;
use const PHP_INT_SIZE;
class ConstantResolver
{
    /** @var array<string, true> */
    private $currentlyResolving = [];
    /**
     * @var \PHPStan\Reflection\ReflectionProvider\ReflectionProviderProvider
     */
    private $reflectionProviderProvider;
    /**
     * @var string[]
     */
    private $dynamicConstantNames;
    /**
     * @param string[] $dynamicConstantNames
     */
    public function __construct(ReflectionProviderProvider $reflectionProviderProvider, array $dynamicConstantNames)
    {
        $this->reflectionProviderProvider = $reflectionProviderProvider;
        $this->dynamicConstantNames = $dynamicConstantNames;
    }
    public function resolveConstant(Name $name, ?NamespaceAnswerer $scope) : ?Type
    {
        if (!$this->getReflectionProvider()->hasConstant($name, $scope)) {
            return null;
        }
        /** @var string $resolvedConstantName */
        $resolvedConstantName = $this->getReflectionProvider()->resolveConstantName($name, $scope);
        $constantType = $this->resolvePredefinedConstant($resolvedConstantName);
        if ($constantType !== null) {
            return $constantType;
        }
        if (array_key_exists($resolvedConstantName, $this->currentlyResolving)) {
            return new MixedType();
        }
        $this->currentlyResolving[$resolvedConstantName] = \true;
        $constantReflection = $this->getReflectionProvider()->getConstant($name, $scope);
        $constantType = $constantReflection->getValueType();
        $type = $this->resolveConstantType($resolvedConstantName, $constantType);
        unset($this->currentlyResolving[$resolvedConstantName]);
        return $type;
    }
    public function resolvePredefinedConstant(string $resolvedConstantName) : ?Type
    {
        // core, https://www.php.net/manual/en/reserved.constants.php
        if ($resolvedConstantName === 'PHP_VERSION') {
            return new IntersectionType([new StringType(), new AccessoryNonEmptyStringType()]);
        }
        if ($resolvedConstantName === 'PHP_MAJOR_VERSION') {
            return IntegerRangeType::fromInterval(5, null);
        }
        if ($resolvedConstantName === 'PHP_MINOR_VERSION') {
            return IntegerRangeType::fromInterval(0, null);
        }
        if ($resolvedConstantName === 'PHP_RELEASE_VERSION') {
            return IntegerRangeType::fromInterval(0, null);
        }
        if ($resolvedConstantName === 'PHP_VERSION_ID') {
            return IntegerRangeType::fromInterval(50207, null);
        }
        if ($resolvedConstantName === 'PHP_ZTS') {
            return new UnionType([new ConstantIntegerType(0), new ConstantIntegerType(1)]);
        }
        if ($resolvedConstantName === 'PHP_DEBUG') {
            return new UnionType([new ConstantIntegerType(0), new ConstantIntegerType(1)]);
        }
        if ($resolvedConstantName === 'PHP_MAXPATHLEN') {
            return IntegerRangeType::fromInterval(1, null);
        }
        if ($resolvedConstantName === 'PHP_OS') {
            return new IntersectionType([new StringType(), new AccessoryNonEmptyStringType()]);
        }
        if ($resolvedConstantName === 'PHP_OS_FAMILY') {
            return new UnionType([new ConstantStringType('Windows'), new ConstantStringType('BSD'), new ConstantStringType('Darwin'), new ConstantStringType('Solaris'), new ConstantStringType('Linux'), new ConstantStringType('Unknown')]);
        }
        if ($resolvedConstantName === 'PHP_SAPI') {
            return new UnionType([new ConstantStringType('apache'), new ConstantStringType('apache2handler'), new ConstantStringType('cgi'), new ConstantStringType('cli'), new ConstantStringType('cli-server'), new ConstantStringType('embed'), new ConstantStringType('fpm-fcgi'), new ConstantStringType('litespeed'), new ConstantStringType('phpdbg'), new IntersectionType([new StringType(), new AccessoryNonEmptyStringType()])]);
        }
        if ($resolvedConstantName === 'PHP_EOL') {
            return new UnionType([new ConstantStringType("\n"), new ConstantStringType("\r\n")]);
        }
        if ($resolvedConstantName === 'PHP_INT_MAX') {
            return PHP_INT_SIZE === 8 ? new UnionType([new ConstantIntegerType(2147483647), new ConstantIntegerType(9223372036854775807)]) : new ConstantIntegerType(2147483647);
        }
        if ($resolvedConstantName === 'PHP_INT_MIN') {
            // Why the -1 you might wonder, the answer is to fit it into an int :/ see https://3v4l.org/4SHIQ
            return PHP_INT_SIZE === 8 ? new UnionType([new ConstantIntegerType(-9223372036854775807 - 1), new ConstantIntegerType(-2147483647 - 1)]) : new ConstantIntegerType(-2147483647 - 1);
        }
        if ($resolvedConstantName === 'PHP_INT_SIZE') {
            return new UnionType([new ConstantIntegerType(4), new ConstantIntegerType(8)]);
        }
        if ($resolvedConstantName === 'PHP_FLOAT_DIG') {
            return IntegerRangeType::fromInterval(1, null);
        }
        if ($resolvedConstantName === 'PHP_EXTENSION_DIR') {
            return new IntersectionType([new StringType(), new AccessoryNonEmptyStringType()]);
        }
        if ($resolvedConstantName === 'PHP_PREFIX') {
            return new IntersectionType([new StringType(), new AccessoryNonEmptyStringType()]);
        }
        if ($resolvedConstantName === 'PHP_BINDIR') {
            return new IntersectionType([new StringType(), new AccessoryNonEmptyStringType()]);
        }
        if ($resolvedConstantName === 'PHP_BINARY') {
            return new IntersectionType([new StringType(), new AccessoryNonEmptyStringType()]);
        }
        if ($resolvedConstantName === 'PHP_MANDIR') {
            return new IntersectionType([new StringType(), new AccessoryNonEmptyStringType()]);
        }
        if ($resolvedConstantName === 'PHP_LIBDIR') {
            return new IntersectionType([new StringType(), new AccessoryNonEmptyStringType()]);
        }
        if ($resolvedConstantName === 'PHP_DATADIR') {
            return new IntersectionType([new StringType(), new AccessoryNonEmptyStringType()]);
        }
        if ($resolvedConstantName === 'PHP_SYSCONFDIR') {
            return new IntersectionType([new StringType(), new AccessoryNonEmptyStringType()]);
        }
        if ($resolvedConstantName === 'PHP_LOCALSTATEDIR') {
            return new IntersectionType([new StringType(), new AccessoryNonEmptyStringType()]);
        }
        if ($resolvedConstantName === 'PHP_CONFIG_FILE_PATH') {
            return new IntersectionType([new StringType(), new AccessoryNonEmptyStringType()]);
        }
        if ($resolvedConstantName === 'PHP_SHLIB_SUFFIX') {
            return new UnionType([new ConstantStringType('so'), new ConstantStringType('dll')]);
        }
        if ($resolvedConstantName === 'PHP_FD_SETSIZE') {
            return IntegerRangeType::fromInterval(1, null);
        }
        if ($resolvedConstantName === '__COMPILER_HALT_OFFSET__') {
            return IntegerRangeType::fromInterval(0, null);
        }
        // core other, https://www.php.net/manual/en/info.constants.php
        if ($resolvedConstantName === 'PHP_WINDOWS_VERSION_MAJOR') {
            return IntegerRangeType::fromInterval(4, null);
        }
        if ($resolvedConstantName === 'PHP_WINDOWS_VERSION_MINOR') {
            return IntegerRangeType::fromInterval(0, null);
        }
        if ($resolvedConstantName === 'PHP_WINDOWS_VERSION_BUILD') {
            return IntegerRangeType::fromInterval(1, null);
        }
        // dir, https://www.php.net/manual/en/dir.constants.php
        if ($resolvedConstantName === 'DIRECTORY_SEPARATOR') {
            return new UnionType([new ConstantStringType('/'), new ConstantStringType('\\')]);
        }
        if ($resolvedConstantName === 'PATH_SEPARATOR') {
            return new UnionType([new ConstantStringType(':'), new ConstantStringType(';')]);
        }
        // iconv, https://www.php.net/manual/en/iconv.constants.php
        if ($resolvedConstantName === 'ICONV_IMPL') {
            return new IntersectionType([new StringType(), new AccessoryNonEmptyStringType()]);
        }
        // libxml, https://www.php.net/manual/en/libxml.constants.php
        if ($resolvedConstantName === 'LIBXML_VERSION') {
            return IntegerRangeType::fromInterval(1, null);
        }
        if ($resolvedConstantName === 'LIBXML_DOTTED_VERSION') {
            return new IntersectionType([new StringType(), new AccessoryNonEmptyStringType()]);
        }
        // openssl, https://www.php.net/manual/en/openssl.constants.php
        if ($resolvedConstantName === 'OPENSSL_VERSION_NUMBER') {
            return IntegerRangeType::fromInterval(1, null);
        }
        if (in_array($resolvedConstantName, ['STDIN', 'STDOUT', 'STDERR'], \true)) {
            return new ResourceType();
        }
        if ($resolvedConstantName === 'NAN') {
            return new ConstantFloatType(NAN);
        }
        if ($resolvedConstantName === 'INF') {
            return new ConstantFloatType(INF);
        }
        return null;
    }
    public function resolveConstantType(string $constantName, Type $constantType) : Type
    {
        if ($constantType->isConstantValue()->yes() && in_array($constantName, $this->dynamicConstantNames, \true)) {
            return $constantType->generalize(GeneralizePrecision::lessSpecific());
        }
        return $constantType;
    }
    private function getReflectionProvider() : ReflectionProvider
    {
        return $this->reflectionProviderProvider->getReflectionProvider();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PHPStan\Broker\BrokerFactory;
use PHPStan\DependencyInjection\Container;
use PHPStan\Node\Printer\ExprPrinter;
use PHPStan\Reflection\ReflectionProvider;
use function array_merge;
class TypeSpecifierFactory
{
    public const FUNCTION_TYPE_SPECIFYING_EXTENSION_TAG = 'phpstan.typeSpecifier.functionTypeSpecifyingExtension';
    public const METHOD_TYPE_SPECIFYING_EXTENSION_TAG = 'phpstan.typeSpecifier.methodTypeSpecifyingExtension';
    public const STATIC_METHOD_TYPE_SPECIFYING_EXTENSION_TAG = 'phpstan.typeSpecifier.staticMethodTypeSpecifyingExtension';
    /**
     * @var \PHPStan\DependencyInjection\Container
     */
    private $container;
    public function __construct(Container $container)
    {
        $this->container = $container;
    }
    public function create() : \PHPStan\Analyser\TypeSpecifier
    {
        $typeSpecifier = new \PHPStan\Analyser\TypeSpecifier($this->container->getByType(ExprPrinter::class), $this->container->getByType(ReflectionProvider::class), $this->container->getServicesByTag(self::FUNCTION_TYPE_SPECIFYING_EXTENSION_TAG), $this->container->getServicesByTag(self::METHOD_TYPE_SPECIFYING_EXTENSION_TAG), $this->container->getServicesByTag(self::STATIC_METHOD_TYPE_SPECIFYING_EXTENSION_TAG), $this->container->getParameter('rememberPossiblyImpureFunctionValues'));
        foreach (array_merge($this->container->getServicesByTag(BrokerFactory::PROPERTIES_CLASS_REFLECTION_EXTENSION_TAG), $this->container->getServicesByTag(BrokerFactory::METHODS_CLASS_REFLECTION_EXTENSION_TAG), $this->container->getServicesByTag(BrokerFactory::DYNAMIC_METHOD_RETURN_TYPE_EXTENSION_TAG), $this->container->getServicesByTag(BrokerFactory::DYNAMIC_STATIC_METHOD_RETURN_TYPE_EXTENSION_TAG), $this->container->getServicesByTag(BrokerFactory::DYNAMIC_FUNCTION_RETURN_TYPE_EXTENSION_TAG)) as $extension) {
            if (!$extension instanceof \PHPStan\Analyser\TypeSpecifierAwareExtension) {
                continue;
            }
            $extension->setTypeSpecifier($typeSpecifier);
        }
        return $typeSpecifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Analyser;

use PHPStan\AnalysedCodeException;
use function sprintf;
class UndefinedVariableException extends AnalysedCodeException
{
    /**
     * @var \PHPStan\Analyser\Scope
     */
    private $scope;
    /**
     * @var string
     */
    private $variableName;
    public function __construct(\PHPStan\Analyser\Scope $scope, string $variableName)
    {
        $this->scope = $scope;
        $this->variableName = $variableName;
        parent::__construct(sprintf('Undefined variable: $%s', $variableName));
    }
    public function getScope() : \PHPStan\Analyser\Scope
    {
        return $this->scope;
    }
    public function getVariableName() : string
    {
        return $this->variableName;
    }
    public function getTip() : ?string
    {
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Parser;

use PhpParser\Node;
use PhpParser\NodeVisitorAbstract;
use function count;
class ArrowFunctionArgVisitor extends NodeVisitorAbstract
{
    public const ATTRIBUTE_NAME = 'arrowFunctionCallArgs';
    public function enterNode(Node $node) : ?Node
    {
        if ($node instanceof Node\Expr\FuncCall && $node->name instanceof Node\Expr\ArrowFunction && !$node->isFirstClassCallable()) {
            $args = $node->getArgs();
            if (count($args) > 0) {
                $node->name->setAttribute(self::ATTRIBUTE_NAME, $args);
            }
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Parser;

use PhpParser\Node;
use PhpParser\NodeVisitorAbstract;
use function array_pop;
use function count;
use function get_class;
final class ParentStmtTypesVisitor extends NodeVisitorAbstract
{
    public const ATTRIBUTE_NAME = 'parentStmtTypes';
    /** @var array<int, class-string<Node\Stmt|Node\Expr\Closure>> */
    private $typeStack = [];
    public function beforeTraverse(array $nodes) : ?array
    {
        $this->typeStack = [];
        return null;
    }
    public function enterNode(Node $node) : ?Node
    {
        if (!$node instanceof Node\Stmt && !$node instanceof Node\Expr\Closure) {
            return null;
        }
        if (count($this->typeStack) > 0) {
            $node->setAttribute(self::ATTRIBUTE_NAME, $this->typeStack);
        }
        $this->typeStack[] = get_class($node);
        return null;
    }
    public function leaveNode(Node $node) : ?Node
    {
        if (!$node instanceof Node\Stmt && !$node instanceof Node\Expr\Closure) {
            return null;
        }
        array_pop($this->typeStack);
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Parser;

use PhpParser\Node;
use PhpParser\NodeVisitorAbstract;
class ArrayWalkArgVisitor extends NodeVisitorAbstract
{
    public const ATTRIBUTE_NAME = 'isArrayWalkArg';
    public function enterNode(Node $node) : ?Node
    {
        if ($node instanceof Node\Expr\FuncCall && $node->name instanceof Node\Name) {
            $functionName = $node->name->toLowerString();
            if ($functionName === 'array_walk') {
                $args = $node->getRawArgs();
                if (isset($args[0])) {
                    $args[0]->setAttribute(self::ATTRIBUTE_NAME, \true);
                }
            }
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Parser;

use PhpParser\Node;
use PhpParser\NodeVisitorAbstract;
use function count;
class ClosureArgVisitor extends NodeVisitorAbstract
{
    public const ATTRIBUTE_NAME = 'closureCallArgs';
    public function enterNode(Node $node) : ?Node
    {
        if ($node instanceof Node\Expr\FuncCall && $node->name instanceof Node\Expr\Closure && !$node->isFirstClassCallable()) {
            $args = $node->getArgs();
            if (count($args) > 0) {
                $node->name->setAttribute(self::ATTRIBUTE_NAME, $args);
            }
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Parser;

use PhpParser\Node;
use PhpParser\NodeVisitorAbstract;
class ArrayFilterArgVisitor extends NodeVisitorAbstract
{
    public const ATTRIBUTE_NAME = 'isArrayFilterArg';
    public function enterNode(Node $node) : ?Node
    {
        if ($node instanceof Node\Expr\FuncCall && $node->name instanceof Node\Name) {
            $functionName = $node->name->toLowerString();
            if ($functionName === 'array_filter') {
                $args = $node->getRawArgs();
                if (isset($args[0])) {
                    $args[0]->setAttribute(self::ATTRIBUTE_NAME, \true);
                }
            }
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Parser;

use PhpParser\ErrorHandler\Collecting;
use PhpParser\Node;
use PhpParser\NodeTraverser;
use PhpParser\NodeVisitor\NameResolver;
use PHPStan\File\FileReader;
use PHPStan\ShouldNotHappenException;
class SimpleParser implements \PHPStan\Parser\Parser
{
    /**
     * @var \PhpParser\Parser
     */
    private $parser;
    /**
     * @var \PhpParser\NodeVisitor\NameResolver
     */
    private $nameResolver;
    public function __construct(\PhpParser\Parser $parser, NameResolver $nameResolver)
    {
        $this->parser = $parser;
        $this->nameResolver = $nameResolver;
    }
    /**
     * @param string $file path to a file to parse
     * @return Node\Stmt[]
     */
    public function parseFile(string $file) : array
    {
        try {
            return $this->parseString(FileReader::read($file));
        } catch (\PHPStan\Parser\ParserErrorsException $e) {
            throw new \PHPStan\Parser\ParserErrorsException($e->getErrors(), $file);
        }
    }
    /**
     * @return Node\Stmt[]
     */
    public function parseString(string $sourceCode) : array
    {
        $errorHandler = new Collecting();
        $nodes = $this->parser->parse($sourceCode, $errorHandler);
        if ($errorHandler->hasErrors()) {
            throw new \PHPStan\Parser\ParserErrorsException($errorHandler->getErrors(), null);
        }
        if ($nodes === null) {
            throw new ShouldNotHappenException();
        }
        $nodeTraverser = new NodeTraverser();
        $nodeTraverser->addVisitor($this->nameResolver);
        /** @var array<Node\Stmt> */
        return $nodeTraverser->traverse($nodes);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Parser;

use PhpParser\Node;
use PHPStan\File\FileReader;
use function array_slice;
class CachedParser implements \PHPStan\Parser\Parser
{
    /** @var array<string, Node\Stmt[]>*/
    private $cachedNodesByString = [];
    /**
     * @var int
     */
    private $cachedNodesByStringCount = 0;
    /** @var array<string, true> */
    private $parsedByString = [];
    /**
     * @var \PHPStan\Parser\Parser
     */
    private $originalParser;
    /**
     * @var int
     */
    private $cachedNodesByStringCountMax;
    public function __construct(\PHPStan\Parser\Parser $originalParser, int $cachedNodesByStringCountMax)
    {
        $this->originalParser = $originalParser;
        $this->cachedNodesByStringCountMax = $cachedNodesByStringCountMax;
    }
    /**
     * @param string $file path to a file to parse
     * @return Node\Stmt[]
     */
    public function parseFile(string $file) : array
    {
        if ($this->cachedNodesByStringCountMax !== 0 && $this->cachedNodesByStringCount >= $this->cachedNodesByStringCountMax) {
            $this->cachedNodesByString = array_slice($this->cachedNodesByString, 1, null, \true);
            --$this->cachedNodesByStringCount;
        }
        $sourceCode = FileReader::read($file);
        if (!isset($this->cachedNodesByString[$sourceCode]) || isset($this->parsedByString[$sourceCode])) {
            $this->cachedNodesByString[$sourceCode] = $this->originalParser->parseFile($file);
            $this->cachedNodesByStringCount++;
            unset($this->parsedByString[$sourceCode]);
        }
        return $this->cachedNodesByString[$sourceCode];
    }
    /**
     * @return Node\Stmt[]
     */
    public function parseString(string $sourceCode) : array
    {
        if ($this->cachedNodesByStringCountMax !== 0 && $this->cachedNodesByStringCount >= $this->cachedNodesByStringCountMax) {
            $this->cachedNodesByString = array_slice($this->cachedNodesByString, 1, null, \true);
            --$this->cachedNodesByStringCount;
        }
        if (!isset($this->cachedNodesByString[$sourceCode])) {
            $this->cachedNodesByString[$sourceCode] = $this->originalParser->parseString($sourceCode);
            $this->cachedNodesByStringCount++;
            $this->parsedByString[$sourceCode] = \true;
        }
        return $this->cachedNodesByString[$sourceCode];
    }
    public function getCachedNodesByStringCount() : int
    {
        return $this->cachedNodesByStringCount;
    }
    public function getCachedNodesByStringCountMax() : int
    {
        return $this->cachedNodesByStringCountMax;
    }
    /**
     * @return array<string, Node[]>
     */
    public function getCachedNodesByString() : array
    {
        return $this->cachedNodesByString;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Parser;

use PhpParser\Node\Stmt;
use PhpParser\NodeTraverser;
use PHPStan\Php\PhpVersion;
class CleaningParser implements \PHPStan\Parser\Parser
{
    /**
     * @var \PhpParser\NodeTraverser
     */
    private $traverser;
    /**
     * @var \PHPStan\Parser\Parser
     */
    private $wrappedParser;
    public function __construct(\PHPStan\Parser\Parser $wrappedParser, PhpVersion $phpVersion)
    {
        $this->wrappedParser = $wrappedParser;
        $this->traverser = new NodeTraverser();
        $this->traverser->addVisitor(new \PHPStan\Parser\CleaningVisitor());
        $this->traverser->addVisitor(new \PHPStan\Parser\RemoveUnusedCodeByPhpVersionIdVisitor($phpVersion->getVersionString()));
    }
    public function parseFile(string $file) : array
    {
        return $this->clean($this->wrappedParser->parseFile($file));
    }
    public function parseString(string $sourceCode) : array
    {
        return $this->clean($this->wrappedParser->parseString($sourceCode));
    }
    /**
     * @param Stmt[] $ast
     * @return Stmt[]
     */
    private function clean(array $ast) : array
    {
        /** @var Stmt[] */
        return $this->traverser->traverse($ast);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Parser;

use PhpParser\Node;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Name;
use function in_array;
use function is_array;
class FunctionCallStatementFinder
{
    /**
     * @param string[] $functionNames
     * @param mixed $statements
     */
    public function findFunctionCallInStatements(array $functionNames, $statements) : ?Node
    {
        foreach ($statements as $statement) {
            if (is_array($statement)) {
                $result = $this->findFunctionCallInStatements($functionNames, $statement);
                if ($result !== null) {
                    return $result;
                }
            }
            if (!$statement instanceof Node) {
                continue;
            }
            if ($statement instanceof FuncCall && $statement->name instanceof Name) {
                if (in_array((string) $statement->name, $functionNames, \true)) {
                    return $statement;
                }
            }
            $result = $this->findFunctionCallInStatements($functionNames, $statement);
            if ($result !== null) {
                return $result;
            }
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Parser;

use PhpParser\Node;
use PhpParser\NodeVisitorAbstract;
class NewAssignedToPropertyVisitor extends NodeVisitorAbstract
{
    public const ATTRIBUTE_NAME = 'assignedToProperty';
    public function enterNode(Node $node) : ?Node
    {
        if ($node instanceof Node\Expr\Assign || $node instanceof Node\Expr\AssignRef) {
            if ($node->var instanceof Node\Expr\PropertyFetch && $node->expr instanceof Node\Expr\New_) {
                $node->expr->setAttribute(self::ATTRIBUTE_NAME, $node->var);
            }
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Parser;

use PhpParser\Node;
use PhpParser\NodeVisitorAbstract;
use function count;
class LastConditionVisitor extends NodeVisitorAbstract
{
    public const ATTRIBUTE_NAME = 'isLastCondition';
    public const ATTRIBUTE_IS_MATCH_NAME = 'isMatch';
    public function enterNode(Node $node) : ?Node
    {
        if ($node instanceof Node\Stmt\If_ && $node->elseifs !== []) {
            $lastElseIf = count($node->elseifs) - 1;
            foreach ($node->elseifs as $i => $elseif) {
                $isLast = $i === $lastElseIf && $node->else === null;
                $elseif->cond->setAttribute(self::ATTRIBUTE_NAME, $isLast);
            }
        }
        if ($node instanceof Node\Expr\Match_ && $node->arms !== []) {
            $lastArm = count($node->arms) - 1;
            foreach ($node->arms as $i => $arm) {
                if ($arm->conds === null || $arm->conds === []) {
                    continue;
                }
                $isLast = $i === $lastArm;
                $index = count($arm->conds) - 1;
                $arm->conds[$index]->setAttribute(self::ATTRIBUTE_NAME, $isLast);
                $arm->conds[$index]->setAttribute(self::ATTRIBUTE_IS_MATCH_NAME, \true);
            }
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Parser;

use PhpParser\Node;
use PhpParser\NodeVisitorAbstract;
use PHPStan\Php\PhpVersion;
use function count;
use function version_compare;
class RemoveUnusedCodeByPhpVersionIdVisitor extends NodeVisitorAbstract
{
    /**
     * @var string
     */
    private $phpVersionString;
    public function __construct(string $phpVersionString)
    {
        $this->phpVersionString = $phpVersionString;
    }
    /**
     * @return \PhpParser\Node|int|null
     */
    public function enterNode(Node $node)
    {
        if ($node instanceof Node\Stmt\ClassLike) {
            return null;
        }
        if ($node instanceof Node\FunctionLike) {
            return null;
        }
        if (!$node instanceof Node\Stmt\If_) {
            return null;
        }
        if (count($node->elseifs) > 0) {
            return null;
        }
        if ($node->else === null) {
            return null;
        }
        $cond = $node->cond;
        if (!$cond instanceof Node\Expr\BinaryOp\Smaller && !$cond instanceof Node\Expr\BinaryOp\SmallerOrEqual && !$cond instanceof Node\Expr\BinaryOp\Greater && !$cond instanceof Node\Expr\BinaryOp\GreaterOrEqual && !$cond instanceof Node\Expr\BinaryOp\Equal && !$cond instanceof Node\Expr\BinaryOp\NotEqual && !$cond instanceof Node\Expr\BinaryOp\Identical && !$cond instanceof Node\Expr\BinaryOp\NotIdentical) {
            return null;
        }
        $operator = $cond->getOperatorSigil();
        if ($operator === '===') {
            $operator = '==';
        }
        if ($operator === '!==') {
            $operator = '!=';
        }
        $operands = $this->getOperands($cond->left, $cond->right);
        if ($operands === null) {
            return null;
        }
        $result = version_compare($operands[0], $operands[1], $operator);
        if ($result) {
            // remove else
            $node->cond = new Node\Expr\ConstFetch(new Node\Name('true'));
            $node->else = null;
            return $node;
        }
        // remove if
        $node->cond = new Node\Expr\ConstFetch(new Node\Name('false'));
        $node->stmts = [];
        return $node;
    }
    /**
     * @return array{string, string}|null
     */
    private function getOperands(Node\Expr $left, Node\Expr $right) : ?array
    {
        if ($left instanceof Node\Scalar\LNumber && $right instanceof Node\Expr\ConstFetch && $right->name->toString() === 'PHP_VERSION_ID') {
            return [(new PhpVersion($left->value))->getVersionString(), $this->phpVersionString];
        }
        if ($right instanceof Node\Scalar\LNumber && $left instanceof Node\Expr\ConstFetch && $left->name->toString() === 'PHP_VERSION_ID') {
            return [$this->phpVersionString, (new PhpVersion($right->value))->getVersionString()];
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Parser;

use PhpParser\ErrorHandler\Collecting;
use PhpParser\Lexer;
use PhpParser\Node;
use PhpParser\NodeTraverser;
use PhpParser\NodeVisitor\NameResolver;
use PHPStan\DependencyInjection\Container;
use PHPStan\File\FileReader;
use PHPStan\ShouldNotHappenException;
use function is_string;
use function strpos;
use function substr_count;
use const T_COMMENT;
use const T_DOC_COMMENT;
class RichParser implements \PHPStan\Parser\Parser
{
    public const VISITOR_SERVICE_TAG = 'phpstan.parser.richParserNodeVisitor';
    /**
     * @var \PhpParser\Parser
     */
    private $parser;
    /**
     * @var \PhpParser\Lexer
     */
    private $lexer;
    /**
     * @var \PhpParser\NodeVisitor\NameResolver
     */
    private $nameResolver;
    /**
     * @var \PHPStan\DependencyInjection\Container
     */
    private $container;
    public function __construct(\PhpParser\Parser $parser, Lexer $lexer, NameResolver $nameResolver, Container $container)
    {
        $this->parser = $parser;
        $this->lexer = $lexer;
        $this->nameResolver = $nameResolver;
        $this->container = $container;
    }
    /**
     * @param string $file path to a file to parse
     * @return Node\Stmt[]
     */
    public function parseFile(string $file) : array
    {
        try {
            return $this->parseString(FileReader::read($file));
        } catch (\PHPStan\Parser\ParserErrorsException $e) {
            throw new \PHPStan\Parser\ParserErrorsException($e->getErrors(), $file);
        }
    }
    /**
     * @return Node\Stmt[]
     */
    public function parseString(string $sourceCode) : array
    {
        $errorHandler = new Collecting();
        $nodes = $this->parser->parse($sourceCode, $errorHandler);
        $tokens = $this->lexer->getTokens();
        if ($errorHandler->hasErrors()) {
            throw new \PHPStan\Parser\ParserErrorsException($errorHandler->getErrors(), null);
        }
        if ($nodes === null) {
            throw new ShouldNotHappenException();
        }
        $nodeTraverser = new NodeTraverser();
        $nodeTraverser->addVisitor($this->nameResolver);
        foreach ($this->container->getServicesByTag(self::VISITOR_SERVICE_TAG) as $visitor) {
            $nodeTraverser->addVisitor($visitor);
        }
        /** @var array<Node\Stmt> */
        $nodes = $nodeTraverser->traverse($nodes);
        if (isset($nodes[0])) {
            $nodes[0]->setAttribute('linesToIgnore', $this->getLinesToIgnore($tokens));
        }
        return $nodes;
    }
    /**
     * @param mixed[] $tokens
     * @return int[]
     */
    private function getLinesToIgnore(array $tokens) : array
    {
        $lines = [];
        foreach ($tokens as $token) {
            if (is_string($token)) {
                continue;
            }
            $type = $token[0];
            if ($type !== T_COMMENT && $type !== T_DOC_COMMENT) {
                continue;
            }
            $text = $token[1];
            $line = $token[2];
            if (strpos($text, '@phpstan-ignore-next-line') !== \false) {
                $line++;
            } elseif (strpos($text, '@phpstan-ignore-line') === \false) {
                continue;
            }
            $line += substr_count($token[1], "\n");
            $lines[] = $line;
        }
        return $lines;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Parser;

use PhpParser\Node;
use PhpParser\NodeVisitorAbstract;
class CurlSetOptArgVisitor extends NodeVisitorAbstract
{
    public const ATTRIBUTE_NAME = 'isCurlSetOptArg';
    public function enterNode(Node $node) : ?Node
    {
        if ($node instanceof Node\Expr\FuncCall && $node->name instanceof Node\Name) {
            $functionName = $node->name->toLowerString();
            if ($functionName === 'curl_setopt') {
                $args = $node->getRawArgs();
                if (isset($args[0])) {
                    $args[0]->setAttribute(self::ATTRIBUTE_NAME, \true);
                }
            }
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Parser;

use PhpParser\Error;
use PhpParser\ErrorHandler;
use PhpParser\Node;
use PhpParser\Parser;
use function sprintf;
class PhpParserDecorator implements Parser
{
    /**
     * @var \PHPStan\Parser\Parser
     */
    private $wrappedParser;
    public function __construct(\PHPStan\Parser\Parser $wrappedParser)
    {
        $this->wrappedParser = $wrappedParser;
    }
    /**
     * @return Node\Stmt[]
     */
    public function parse(string $code, ?ErrorHandler $errorHandler = null) : array
    {
        try {
            return $this->wrappedParser->parseString($code);
        } catch (\PHPStan\Parser\ParserErrorsException $e) {
            $message = $e->getMessage();
            if ($e->getParsedFile() !== null) {
                $message .= sprintf(' in file %s', $e->getParsedFile());
            }
            throw new Error($message, $e->getAttributes());
        }
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Parser;

use PhpParser\Node;
use PhpParser\NodeVisitorAbstract;
use function array_pop;
use function array_reverse;
use function count;
final class TryCatchTypeVisitor extends NodeVisitorAbstract
{
    public const ATTRIBUTE_NAME = 'tryCatchTypes';
    /** @var array<int, array<int, string>|null> */
    private $typeStack = [];
    public function beforeTraverse(array $nodes) : ?array
    {
        $this->typeStack = [];
        return null;
    }
    public function enterNode(Node $node) : ?Node
    {
        if ($node instanceof Node\Stmt || $node instanceof Node\Expr\Match_) {
            if (count($this->typeStack) > 0) {
                $node->setAttribute(self::ATTRIBUTE_NAME, $this->typeStack[count($this->typeStack) - 1]);
            }
        }
        if ($node instanceof Node\FunctionLike) {
            $this->typeStack[] = null;
        }
        if ($node instanceof Node\Stmt\TryCatch) {
            $types = [];
            foreach (array_reverse($this->typeStack) as $stackTypes) {
                if ($stackTypes === null) {
                    break;
                }
                foreach ($stackTypes as $type) {
                    $types[] = $type;
                }
            }
            foreach ($node->catches as $catch) {
                foreach ($catch->types as $type) {
                    $types[] = $type->toString();
                }
            }
            $this->typeStack[] = $types;
        }
        return null;
    }
    public function leaveNode(Node $node) : ?Node
    {
        if (!$node instanceof Node\Stmt\TryCatch && !$node instanceof Node\FunctionLike) {
            return null;
        }
        array_pop($this->typeStack);
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Parser;

use PhpParser\Node;
use PhpParser\NodeVisitorAbstract;
use function array_slice;
use function count;
class ArrayMapArgVisitor extends NodeVisitorAbstract
{
    public const ATTRIBUTE_NAME = 'arrayMapArgs';
    public function enterNode(Node $node) : ?Node
    {
        if ($node instanceof Node\Expr\FuncCall && $node->name instanceof Node\Name && !$node->isFirstClassCallable()) {
            $functionName = $node->name->toLowerString();
            if ($functionName === 'array_map') {
                $args = $node->getArgs();
                if (isset($args[0])) {
                    $slicedArgs = array_slice($args, 1);
                    if (count($slicedArgs) > 0) {
                        $args[0]->value->setAttribute(self::ATTRIBUTE_NAME, $slicedArgs);
                    }
                }
            }
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Parser;

use PhpParser\Node;
use PhpParser\NodeVisitorAbstract;
class TypeTraverserInstanceofVisitor extends NodeVisitorAbstract
{
    public const ATTRIBUTE_NAME = 'insideTypeTraverserMap';
    /**
     * @var int
     */
    private $depth = 0;
    public function beforeTraverse(array $nodes) : ?array
    {
        $this->depth = 0;
        return null;
    }
    public function enterNode(Node $node) : ?Node
    {
        if ($node instanceof Node\Expr\Instanceof_ && $this->depth > 0) {
            $node->setAttribute(self::ATTRIBUTE_NAME, \true);
            return null;
        }
        if ($node instanceof Node\Expr\StaticCall && $node->class instanceof Node\Name && $node->class->toLowerString() === 'phpstan\\type\\typetraverser' && $node->name instanceof Node\Identifier && $node->name->toLowerString() === 'map') {
            $this->depth++;
        }
        return null;
    }
    public function leaveNode(Node $node) : ?Node
    {
        if ($node instanceof Node\Expr\StaticCall && $node->class instanceof Node\Name && $node->class->toLowerString() === 'phpstan\\type\\typetraverser' && $node->name instanceof Node\Identifier && $node->name->toLowerString() === 'map') {
            $this->depth--;
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Parser;

use PhpParser\Node;
use PhpParser\NodeFinder;
use PhpParser\NodeVisitorAbstract;
use PHPStan\Reflection\ParametersAcceptor;
use function in_array;
class CleaningVisitor extends NodeVisitorAbstract
{
    /**
     * @var \PhpParser\NodeFinder
     */
    private $nodeFinder;
    public function __construct()
    {
        $this->nodeFinder = new NodeFinder();
    }
    public function enterNode(Node $node) : ?Node
    {
        if ($node instanceof Node\Stmt\Function_) {
            $node->stmts = $this->keepVariadicsAndYields($node->stmts);
            return $node;
        }
        if ($node instanceof Node\Stmt\ClassMethod && $node->stmts !== null) {
            $node->stmts = $this->keepVariadicsAndYields($node->stmts);
            return $node;
        }
        if ($node instanceof Node\Expr\Closure) {
            $node->stmts = $this->keepVariadicsAndYields($node->stmts);
            return $node;
        }
        return null;
    }
    /**
     * @param Node\Stmt[] $stmts
     * @return Node\Stmt[]
     */
    private function keepVariadicsAndYields(array $stmts) : array
    {
        $results = $this->nodeFinder->find($stmts, static function (Node $node) : bool {
            if ($node instanceof Node\Expr\YieldFrom || $node instanceof Node\Expr\Yield_) {
                return \true;
            }
            if ($node instanceof Node\Expr\FuncCall && $node->name instanceof Node\Name) {
                return in_array($node->name->toLowerString(), ParametersAcceptor::VARIADIC_FUNCTIONS, \true);
            }
            return \false;
        });
        $newStmts = [];
        foreach ($results as $result) {
            if ($result instanceof Node\Expr\Yield_ || $result instanceof Node\Expr\YieldFrom) {
                $newStmts[] = new Node\Stmt\Expression($result);
                continue;
            }
            if (!$result instanceof Node\Expr\FuncCall) {
                continue;
            }
            $newStmts[] = new Node\Stmt\Expression(new Node\Expr\FuncCall(new Node\Name\FullyQualified('func_get_args')));
        }
        return $newStmts;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Parser;

use PHPStan\File\FileHelper;
use function array_fill_keys;
use function strpos;
class PathRoutingParser implements \PHPStan\Parser\Parser
{
    /** @var bool[] filePath(string) => bool(true) */
    private $analysedFiles = [];
    /**
     * @var \PHPStan\File\FileHelper
     */
    private $fileHelper;
    /**
     * @var \PHPStan\Parser\Parser
     */
    private $currentPhpVersionRichParser;
    /**
     * @var \PHPStan\Parser\Parser
     */
    private $currentPhpVersionSimpleParser;
    /**
     * @var \PHPStan\Parser\Parser
     */
    private $php8Parser;
    public function __construct(FileHelper $fileHelper, \PHPStan\Parser\Parser $currentPhpVersionRichParser, \PHPStan\Parser\Parser $currentPhpVersionSimpleParser, \PHPStan\Parser\Parser $php8Parser)
    {
        $this->fileHelper = $fileHelper;
        $this->currentPhpVersionRichParser = $currentPhpVersionRichParser;
        $this->currentPhpVersionSimpleParser = $currentPhpVersionSimpleParser;
        $this->php8Parser = $php8Parser;
    }
    /**
     * @param string[] $files
     */
    public function setAnalysedFiles(array $files) : void
    {
        $this->analysedFiles = array_fill_keys($files, \true);
    }
    public function parseFile(string $file) : array
    {
        $normalizedPath = $this->fileHelper->normalizePath($file, '/');
        if (strpos($normalizedPath, 'vendor/jetbrains/phpstorm-stubs') !== \false) {
            return $this->php8Parser->parseFile($file);
        }
        if (strpos($normalizedPath, 'vendor/phpstan/php-8-stubs/stubs') !== \false) {
            return $this->php8Parser->parseFile($file);
        }
        $file = $this->fileHelper->normalizePath($file);
        if (!isset($this->analysedFiles[$file])) {
            return $this->currentPhpVersionSimpleParser->parseFile($file);
        }
        return $this->currentPhpVersionRichParser->parseFile($file);
    }
    public function parseString(string $sourceCode) : array
    {
        return $this->currentPhpVersionSimpleParser->parseString($sourceCode);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Parser;

use PhpParser\Lexer;
use PHPStan\Php\PhpVersion;
use const PHP_VERSION_ID;
class LexerFactory
{
    private const OPTIONS = ['usedAttributes' => ['comments', 'startLine', 'endLine', 'startTokenPos', 'endTokenPos', 'startFilePos', 'endFilePos']];
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
    }
    public function create() : Lexer
    {
        $options = self::OPTIONS;
        if ($this->phpVersion->getVersionId() === PHP_VERSION_ID) {
            return new Lexer($options);
        }
        $options['phpVersion'] = $this->phpVersion->getVersionString();
        return new Lexer\Emulative($options);
    }
    public function createEmulative() : Lexer\Emulative
    {
        return new Lexer\Emulative(self::OPTIONS);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Parser;

use PhpParser\Node;
/** @api */
interface Parser
{
    /**
     * @param string $file path to a file to parse
     * @return Node\Stmt[]
     * @throws ParserErrorsException
     */
    public function parseFile(string $file) : array;
    /**
     * @return Node\Stmt[]
     * @throws ParserErrorsException
     */
    public function parseString(string $sourceCode) : array;
}
<?php

declare (strict_types=1);
namespace PHPStan\Parser;

use Exception;
use PhpParser\Error;
use function array_map;
use function count;
use function implode;
class ParserErrorsException extends Exception
{
    /** @var mixed[] */
    private $attributes;
    /**
     * @var Error[]
     */
    private $errors;
    /**
     * @var string|null
     */
    private $parsedFile;
    /**
     * @param Error[] $errors
     */
    public function __construct(array $errors, ?string $parsedFile)
    {
        $this->errors = $errors;
        $this->parsedFile = $parsedFile;
        parent::__construct(implode(', ', array_map(static function (Error $error) : string {
            return $error->getMessage();
        }, $errors)));
        if (count($errors) > 0) {
            $this->attributes = $errors[0]->getAttributes();
        } else {
            $this->attributes = [];
        }
    }
    /**
     * @return Error[]
     */
    public function getErrors() : array
    {
        return $this->errors;
    }
    public function getParsedFile() : ?string
    {
        return $this->parsedFile;
    }
    /**
     * @return mixed[]
     */
    public function getAttributes() : array
    {
        return $this->attributes;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node;
use PHPStan\Reflection\Php\PhpFunctionFromParserNodeReflection;
/** @api */
class InFunctionNode extends Node\Stmt implements \PHPStan\Node\VirtualNode
{
    /**
     * @var \PHPStan\Reflection\Php\PhpFunctionFromParserNodeReflection
     */
    private $functionReflection;
    /**
     * @var \PhpParser\Node\Stmt\Function_
     */
    private $originalNode;
    public function __construct(PhpFunctionFromParserNodeReflection $functionReflection, Node\Stmt\Function_ $originalNode)
    {
        $this->functionReflection = $functionReflection;
        $this->originalNode = $originalNode;
        parent::__construct($originalNode->getAttributes());
    }
    public function getFunctionReflection() : PhpFunctionFromParserNodeReflection
    {
        return $this->functionReflection;
    }
    public function getOriginalNode() : Node\Stmt\Function_
    {
        return $this->originalNode;
    }
    public function getType() : string
    {
        return 'PHPStan_Stmt_InFunctionNode';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node\Expr\Array_;
use PhpParser\NodeAbstract;
/** @api */
class LiteralArrayNode extends NodeAbstract implements \PHPStan\Node\VirtualNode
{
    /**
     * @var LiteralArrayItem[]
     */
    private $itemNodes;
    /**
     * @param LiteralArrayItem[] $itemNodes
     */
    public function __construct(Array_ $originalNode, array $itemNodes)
    {
        $this->itemNodes = $itemNodes;
        parent::__construct($originalNode->getAttributes());
    }
    /**
     * @return LiteralArrayItem[]
     */
    public function getItemNodes() : array
    {
        return $this->itemNodes;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_LiteralArray';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\NodeAbstract;
use PHPStan\Analyser\StatementExitPoint;
/** @api */
class FinallyExitPointsNode extends NodeAbstract implements \PHPStan\Node\VirtualNode
{
    /**
     * @var StatementExitPoint[]
     */
    private $finallyExitPoints;
    /**
     * @var StatementExitPoint[]
     */
    private $tryCatchExitPoints;
    /**
     * @param StatementExitPoint[] $finallyExitPoints
     * @param StatementExitPoint[] $tryCatchExitPoints
     */
    public function __construct(array $finallyExitPoints, array $tryCatchExitPoints)
    {
        $this->finallyExitPoints = $finallyExitPoints;
        $this->tryCatchExitPoints = $tryCatchExitPoints;
        parent::__construct([]);
    }
    /**
     * @return StatementExitPoint[]
     */
    public function getFinallyExitPoints() : array
    {
        return $this->finallyExitPoints;
    }
    /**
     * @return StatementExitPoint[]
     */
    public function getTryCatchExitPoints() : array
    {
        return $this->tryCatchExitPoints;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_FinallyExitPointsNode';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node\Stmt\Catch_;
use PhpParser\NodeAbstract;
use PHPStan\Type\Type;
/** @api */
class CatchWithUnthrownExceptionNode extends NodeAbstract implements \PHPStan\Node\VirtualNode
{
    /**
     * @var \PhpParser\Node\Stmt\Catch_
     */
    private $originalNode;
    /**
     * @var \PHPStan\Type\Type
     */
    private $caughtType;
    /**
     * @var \PHPStan\Type\Type
     */
    private $originalCaughtType;
    public function __construct(Catch_ $originalNode, Type $caughtType, Type $originalCaughtType)
    {
        $this->originalNode = $originalNode;
        $this->caughtType = $caughtType;
        $this->originalCaughtType = $originalCaughtType;
        parent::__construct($originalNode->getAttributes());
    }
    public function getOriginalNode() : Catch_
    {
        return $this->originalNode;
    }
    public function getCaughtType() : Type
    {
        return $this->caughtType;
    }
    public function getOriginalCaughtType() : Type
    {
        return $this->originalCaughtType;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_CatchWithUnthrownExceptionNode';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node;
use PhpParser\NodeAbstract;
use PHPStan\Analyser\StatementResult;
/** @api */
class ExecutionEndNode extends NodeAbstract implements \PHPStan\Node\VirtualNode
{
    /**
     * @var \PhpParser\Node
     */
    private $node;
    /**
     * @var \PHPStan\Analyser\StatementResult
     */
    private $statementResult;
    /**
     * @var bool
     */
    private $hasNativeReturnTypehint;
    public function __construct(Node $node, StatementResult $statementResult, bool $hasNativeReturnTypehint)
    {
        $this->node = $node;
        $this->statementResult = $statementResult;
        $this->hasNativeReturnTypehint = $hasNativeReturnTypehint;
        parent::__construct($node->getAttributes());
    }
    public function getNode() : Node
    {
        return $this->node;
    }
    public function getStatementResult() : StatementResult
    {
        return $this->statementResult;
    }
    public function hasNativeReturnTypehint() : bool
    {
        return $this->hasNativeReturnTypehint;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_ExecutionEndNode';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node\Expr;
use PhpParser\Node\Name;
/** @api */
class FunctionCallableNode extends Expr implements \PHPStan\Node\VirtualNode
{
    /**
     * @var \PhpParser\Node\Name|\PhpParser\Node\Expr
     */
    private $name;
    /**
     * @var \PhpParser\Node\Expr\FuncCall
     */
    private $originalNode;
    /**
     * @param \PhpParser\Node\Name|\PhpParser\Node\Expr $name
     */
    public function __construct($name, Expr\FuncCall $originalNode)
    {
        $this->name = $name;
        $this->originalNode = $originalNode;
        parent::__construct($this->originalNode->getAttributes());
    }
    /**
     * @return Expr|Name
     */
    public function getName()
    {
        return $this->name;
    }
    public function getOriginalNode() : Expr\FuncCall
    {
        return $this->originalNode;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_FunctionCallableNode';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node\Stmt\ClassLike;
use PhpParser\NodeAbstract;
use PHPStan\Node\Method\MethodCall;
/** @api */
class ClassMethodsNode extends NodeAbstract implements \PHPStan\Node\VirtualNode
{
    /**
     * @var \PhpParser\Node\Stmt\ClassLike
     */
    private $class;
    /**
     * @var ClassMethod[]
     */
    private $methods;
    /**
     * @var array<int, MethodCall>
     */
    private $methodCalls;
    /**
     * @param ClassMethod[] $methods
     * @param array<int, MethodCall> $methodCalls
     */
    public function __construct(ClassLike $class, array $methods, array $methodCalls)
    {
        $this->class = $class;
        $this->methods = $methods;
        $this->methodCalls = $methodCalls;
        parent::__construct($class->getAttributes());
    }
    public function getClass() : ClassLike
    {
        return $this->class;
    }
    /**
     * @return ClassMethod[]
     */
    public function getMethods() : array
    {
        return $this->methods;
    }
    /**
     * @return array<int, MethodCall>
     */
    public function getMethodCalls() : array
    {
        return $this->methodCalls;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_ClassMethodsNode';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node\Property;

use PhpParser\Node\Expr\PropertyFetch;
use PhpParser\Node\Expr\StaticPropertyFetch;
use PHPStan\Analyser\Scope;
/** @api */
class PropertyRead
{
    /**
     * @var \PhpParser\Node\Expr\PropertyFetch|\PhpParser\Node\Expr\StaticPropertyFetch
     */
    private $fetch;
    /**
     * @var \PHPStan\Analyser\Scope
     */
    private $scope;
    /**
     * @param \PhpParser\Node\Expr\PropertyFetch|\PhpParser\Node\Expr\StaticPropertyFetch $fetch
     */
    public function __construct($fetch, Scope $scope)
    {
        $this->fetch = $fetch;
        $this->scope = $scope;
    }
    /**
     * @return PropertyFetch|StaticPropertyFetch
     */
    public function getFetch()
    {
        return $this->fetch;
    }
    public function getScope() : Scope
    {
        return $this->scope;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node\Property;

use PhpParser\Node\Expr\PropertyFetch;
use PhpParser\Node\Expr\StaticPropertyFetch;
use PHPStan\Analyser\Scope;
/** @api */
class PropertyWrite
{
    /**
     * @var \PhpParser\Node\Expr\PropertyFetch|\PhpParser\Node\Expr\StaticPropertyFetch
     */
    private $fetch;
    /**
     * @var \PHPStan\Analyser\Scope
     */
    private $scope;
    /**
     * @param \PhpParser\Node\Expr\PropertyFetch|\PhpParser\Node\Expr\StaticPropertyFetch $fetch
     */
    public function __construct($fetch, Scope $scope)
    {
        $this->fetch = $fetch;
        $this->scope = $scope;
    }
    /**
     * @return PropertyFetch|StaticPropertyFetch
     */
    public function getFetch()
    {
        return $this->fetch;
    }
    public function getScope() : Scope
    {
        return $this->scope;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node\Constant;

use PhpParser\Node\Expr\ClassConstFetch;
use PHPStan\Analyser\Scope;
/** @api */
class ClassConstantFetch
{
    /**
     * @var \PhpParser\Node\Expr\ClassConstFetch
     */
    private $node;
    /**
     * @var \PHPStan\Analyser\Scope
     */
    private $scope;
    public function __construct(ClassConstFetch $node, Scope $scope)
    {
        $this->node = $node;
        $this->scope = $scope;
    }
    public function getNode() : ClassConstFetch
    {
        return $this->node;
    }
    public function getScope() : Scope
    {
        return $this->scope;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node\Stmt\Foreach_;
use PhpParser\NodeAbstract;
class InForeachNode extends NodeAbstract implements \PHPStan\Node\VirtualNode
{
    /**
     * @var \PhpParser\Node\Stmt\Foreach_
     */
    private $originalNode;
    public function __construct(Foreach_ $originalNode)
    {
        $this->originalNode = $originalNode;
        parent::__construct($originalNode->getAttributes());
    }
    public function getOriginalNode() : Foreach_
    {
        return $this->originalNode;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_InForeachNode';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node\Stmt\ClassConst;
use PhpParser\Node\Stmt\ClassLike;
use PhpParser\NodeAbstract;
use PHPStan\Node\Constant\ClassConstantFetch;
/** @api */
class ClassConstantsNode extends NodeAbstract implements \PHPStan\Node\VirtualNode
{
    /**
     * @var \PhpParser\Node\Stmt\ClassLike
     */
    private $class;
    /**
     * @var ClassConst[]
     */
    private $constants;
    /**
     * @var ClassConstantFetch[]
     */
    private $fetches;
    /**
     * @param ClassConst[] $constants
     * @param ClassConstantFetch[] $fetches
     */
    public function __construct(ClassLike $class, array $constants, array $fetches)
    {
        $this->class = $class;
        $this->constants = $constants;
        $this->fetches = $fetches;
        parent::__construct($class->getAttributes());
    }
    public function getClass() : ClassLike
    {
        return $this->class;
    }
    /**
     * @return ClassConst[]
     */
    public function getConstants() : array
    {
        return $this->constants;
    }
    /**
     * @return ClassConstantFetch[]
     */
    public function getFetches() : array
    {
        return $this->fetches;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_ClassConstantsNode';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node;
use PhpParser\Node\Expr\ArrowFunction;
use PhpParser\NodeAbstract;
use PHPStan\Type\ClosureType;
/** @api */
class InArrowFunctionNode extends NodeAbstract implements \PHPStan\Node\VirtualNode
{
    /**
     * @var \PhpParser\Node\Expr\ArrowFunction
     */
    private $originalNode;
    /**
     * @var \PHPStan\Type\ClosureType
     */
    private $closureType;
    public function __construct(ClosureType $closureType, ArrowFunction $originalNode)
    {
        $this->closureType = $closureType;
        parent::__construct($originalNode->getAttributes());
        $this->originalNode = $originalNode;
    }
    public function getClosureType() : ClosureType
    {
        return $this->closureType;
    }
    public function getOriginalNode() : Node\Expr\ArrowFunction
    {
        return $this->originalNode;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_InArrowFunctionNode';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node;
use PhpParser\Node\Expr\Closure;
use PhpParser\NodeAbstract;
use PHPStan\Type\ClosureType;
/** @api */
class InClosureNode extends NodeAbstract implements \PHPStan\Node\VirtualNode
{
    /**
     * @var \PhpParser\Node\Expr\Closure
     */
    private $originalNode;
    /**
     * @var \PHPStan\Type\ClosureType
     */
    private $closureType;
    public function __construct(ClosureType $closureType, Closure $originalNode)
    {
        $this->closureType = $closureType;
        parent::__construct($originalNode->getAttributes());
        $this->originalNode = $originalNode;
    }
    public function getClosureType() : ClosureType
    {
        return $this->closureType;
    }
    public function getOriginalNode() : Closure
    {
        return $this->originalNode;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_InClosureNode';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node;
use PhpParser\Node\Expr\Closure;
use PhpParser\Node\Expr\Yield_;
use PhpParser\Node\Expr\YieldFrom;
use PhpParser\NodeAbstract;
use PHPStan\Analyser\StatementResult;
use function count;
/** @api */
class ClosureReturnStatementsNode extends NodeAbstract implements \PHPStan\Node\ReturnStatementsNode
{
    /**
     * @var \PhpParser\Node\Expr\Closure
     */
    private $closureExpr;
    /**
     * @var list<ReturnStatement>
     */
    private $returnStatements;
    /**
     * @var list<(Yield_ | YieldFrom)>
     */
    private $yieldStatements;
    /**
     * @var \PHPStan\Analyser\StatementResult
     */
    private $statementResult;
    /**
     * @var list<ExecutionEndNode>
     */
    private $executionEnds;
    /**
     * @param list<ReturnStatement> $returnStatements
     * @param list<Yield_|YieldFrom> $yieldStatements
     * @param list<ExecutionEndNode> $executionEnds
     */
    public function __construct(Closure $closureExpr, array $returnStatements, array $yieldStatements, StatementResult $statementResult, array $executionEnds)
    {
        $this->returnStatements = $returnStatements;
        $this->yieldStatements = $yieldStatements;
        $this->statementResult = $statementResult;
        $this->executionEnds = $executionEnds;
        parent::__construct($closureExpr->getAttributes());
        $this->closureExpr = $closureExpr;
    }
    public function getClosureExpr() : Closure
    {
        return $this->closureExpr;
    }
    public function hasNativeReturnTypehint() : bool
    {
        return $this->closureExpr->returnType !== null;
    }
    public function getReturnStatements() : array
    {
        return $this->returnStatements;
    }
    public function getExecutionEnds() : array
    {
        return $this->executionEnds;
    }
    public function getYieldStatements() : array
    {
        return $this->yieldStatements;
    }
    public function isGenerator() : bool
    {
        return count($this->yieldStatements) > 0;
    }
    public function getStatementResult() : StatementResult
    {
        return $this->statementResult;
    }
    public function returnsByRef() : bool
    {
        return $this->closureExpr->byRef;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_ClosureReturnStatementsNode';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Expr\ArrayDimFetch;
use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Expr\PropertyFetch;
use PhpParser\Node\Expr\StaticCall;
use PhpParser\Node\Expr\StaticPropertyFetch;
use PhpParser\Node\Identifier;
use PHPStan\Analyser\Scope;
use PHPStan\Node\Constant\ClassConstantFetch;
use PHPStan\Node\Property\PropertyRead;
use PHPStan\Node\Property\PropertyWrite;
use PHPStan\Reflection\ClassReflection;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\ThisType;
use function count;
use function in_array;
class ClassStatementsGatherer
{
    private const PROPERTY_ENUMERATING_FUNCTIONS = ['get_object_vars', 'array_walk'];
    /** @var callable(Node $node, Scope $scope): void */
    private $nodeCallback;
    /** @var ClassPropertyNode[] */
    private $properties = [];
    /** @var ClassMethod[] */
    private $methods = [];
    /** @var \PHPStan\Node\Method\MethodCall[] */
    private $methodCalls = [];
    /** @var array<int, PropertyWrite|PropertyRead> */
    private $propertyUsages = [];
    /** @var Node\Stmt\ClassConst[] */
    private $constants = [];
    /** @var ClassConstantFetch[] */
    private $constantFetches = [];
    /**
     * @var \PHPStan\Reflection\ClassReflection
     */
    private $classReflection;
    /**
     * @param callable(Node $node, Scope $scope): void $nodeCallback
     */
    public function __construct(ClassReflection $classReflection, callable $nodeCallback)
    {
        $this->classReflection = $classReflection;
        $this->nodeCallback = $nodeCallback;
    }
    /**
     * @return ClassPropertyNode[]
     */
    public function getProperties() : array
    {
        return $this->properties;
    }
    /**
     * @return ClassMethod[]
     */
    public function getMethods() : array
    {
        return $this->methods;
    }
    /**
     * @return Method\MethodCall[]
     */
    public function getMethodCalls() : array
    {
        return $this->methodCalls;
    }
    /**
     * @return array<int, PropertyWrite|PropertyRead>
     */
    public function getPropertyUsages() : array
    {
        return $this->propertyUsages;
    }
    /**
     * @return Node\Stmt\ClassConst[]
     */
    public function getConstants() : array
    {
        return $this->constants;
    }
    /**
     * @return ClassConstantFetch[]
     */
    public function getConstantFetches() : array
    {
        return $this->constantFetches;
    }
    public function __invoke(Node $node, Scope $scope) : void
    {
        $nodeCallback = $this->nodeCallback;
        $nodeCallback($node, $scope);
        $this->gatherNodes($node, $scope);
    }
    private function gatherNodes(Node $node, Scope $scope) : void
    {
        if (!$scope->isInClass()) {
            throw new ShouldNotHappenException();
        }
        if ($scope->getClassReflection()->getName() !== $this->classReflection->getName()) {
            return;
        }
        if ($node instanceof \PHPStan\Node\ClassPropertyNode) {
            $this->properties[] = $node;
            if ($node->isPromoted()) {
                $this->propertyUsages[] = new PropertyWrite(new PropertyFetch(new Expr\Variable('this'), new Identifier($node->getName())), $scope);
            }
            return;
        }
        if ($node instanceof Node\Stmt\ClassMethod) {
            $this->methods[] = new \PHPStan\Node\ClassMethod($node, $scope->isInTrait());
            return;
        }
        if ($node instanceof Node\Stmt\ClassConst) {
            $this->constants[] = $node;
            return;
        }
        if ($node instanceof MethodCall || $node instanceof StaticCall) {
            $this->methodCalls[] = new \PHPStan\Node\Method\MethodCall($node, $scope);
            return;
        }
        if ($node instanceof \PHPStan\Node\MethodCallableNode || $node instanceof \PHPStan\Node\StaticMethodCallableNode) {
            $this->methodCalls[] = new \PHPStan\Node\Method\MethodCall($node->getOriginalNode(), $scope);
            return;
        }
        if ($node instanceof Expr\FuncCall && $node->name instanceof Node\Name && in_array($node->name->toLowerString(), self::PROPERTY_ENUMERATING_FUNCTIONS, \true)) {
            $this->tryToApplyPropertyReads($node, $scope);
            return;
        }
        if ($node instanceof Array_ && count($node->items) === 2) {
            $this->methodCalls[] = new \PHPStan\Node\Method\MethodCall($node, $scope);
            return;
        }
        if ($node instanceof Expr\ClassConstFetch) {
            $this->constantFetches[] = new ClassConstantFetch($node, $scope);
            return;
        }
        if ($node instanceof \PHPStan\Node\PropertyAssignNode) {
            $this->propertyUsages[] = new PropertyWrite($node->getPropertyFetch(), $scope);
            return;
        }
        if (!$node instanceof Expr) {
            return;
        }
        if ($node instanceof Expr\AssignOp\Coalesce) {
            $this->gatherNodes($node->var, $scope);
            return;
        }
        if ($node instanceof Expr\AssignRef) {
            if (!$node->expr instanceof PropertyFetch && !$node->expr instanceof StaticPropertyFetch) {
                $this->gatherNodes($node->expr, $scope);
                return;
            }
            $this->propertyUsages[] = new PropertyRead($node->expr, $scope);
            $this->propertyUsages[] = new PropertyWrite($node->expr, $scope);
            return;
        }
        if ($node instanceof Node\Scalar\EncapsedStringPart) {
            return;
        }
        if ($node instanceof \PHPStan\Node\FunctionCallableNode) {
            $node = $node->getOriginalNode();
        } elseif ($node instanceof \PHPStan\Node\InstantiationCallableNode) {
            $node = $node->getOriginalNode();
        }
        $inAssign = $scope->isInExpressionAssign($node);
        if ($inAssign) {
            return;
        }
        while ($node instanceof ArrayDimFetch) {
            $node = $node->var;
        }
        if (!$node instanceof PropertyFetch && !$node instanceof StaticPropertyFetch) {
            return;
        }
        $this->propertyUsages[] = new PropertyRead($node, $scope);
    }
    private function tryToApplyPropertyReads(Expr\FuncCall $node, Scope $scope) : void
    {
        $args = $node->getArgs();
        if (count($args) === 0) {
            return;
        }
        $firstArgValue = $args[0]->value;
        if (!$scope->getType($firstArgValue) instanceof ThisType) {
            return;
        }
        $classProperties = $this->classReflection->getNativeReflection()->getProperties();
        foreach ($classProperties as $property) {
            if ($property->isStatic()) {
                continue;
            }
            $this->propertyUsages[] = new PropertyRead(new PropertyFetch(new Expr\Variable('this'), new Identifier($property->getName())), $scope);
        }
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node\Stmt\ClassMethod as PhpParserClassMethod;
/** @api */
class ClassMethod extends PhpParserClassMethod
{
    /**
     * @var bool
     */
    private $isDeclaredInTrait;
    public function __construct(\PhpParser\Node\Stmt\ClassMethod $node, bool $isDeclaredInTrait)
    {
        $this->isDeclaredInTrait = $isDeclaredInTrait;
        parent::__construct($node->name, ['flags' => $node->flags, 'byRef' => $node->byRef, 'params' => $node->params, 'returnType' => $node->returnType, 'stmts' => $node->stmts, 'attrGroups' => $node->attrGroups], $node->attributes);
    }
    public function getNode() : PhpParserClassMethod
    {
        return $this;
    }
    public function isDeclaredInTrait() : bool
    {
        return $this->isDeclaredInTrait;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node\Printer;

use PhpParser\Node\Expr;
/** @api */
class ExprPrinter
{
    /**
     * @var \PHPStan\Node\Printer\Printer
     */
    private $printer;
    public function __construct(\PHPStan\Node\Printer\Printer $printer)
    {
        $this->printer = $printer;
    }
    public function printExpr(Expr $expr) : string
    {
        /** @var string|null $exprString */
        $exprString = $expr->getAttribute('phpstan_cache_printer');
        if ($exprString === null) {
            $exprString = $this->printer->prettyPrintExpr($expr);
            $expr->setAttribute('phpstan_cache_printer', $exprString);
        }
        return $exprString;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node\Printer;

use PhpParser\PrettyPrinter\Standard;
use PHPStan\Node\Expr\GetIterableKeyTypeExpr;
use PHPStan\Node\Expr\GetIterableValueTypeExpr;
use PHPStan\Node\Expr\GetOffsetValueTypeExpr;
use PHPStan\Node\Expr\OriginalPropertyTypeExpr;
use PHPStan\Node\Expr\SetOffsetValueTypeExpr;
use PHPStan\Node\Expr\TypeExpr;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
class Printer extends Standard
{
    protected function pPHPStan_Node_TypeExpr(TypeExpr $expr) : string
    {
        return sprintf('__phpstanType(%s)', $expr->getExprType()->describe(VerbosityLevel::precise()));
    }
    protected function pPHPStan_Node_GetOffsetValueTypeExpr(GetOffsetValueTypeExpr $expr) : string
    {
        return sprintf('__phpstanGetOffsetValueType(%s, %s)', $this->p($expr->getVar()), $this->p($expr->getDim()));
    }
    protected function pPHPStan_Node_GetIterableValueTypeExpr(GetIterableValueTypeExpr $expr) : string
    {
        return sprintf('__phpstanGetIterableValueType(%s)', $this->p($expr->getExpr()));
    }
    protected function pPHPStan_Node_GetIterableKeyTypeExpr(GetIterableKeyTypeExpr $expr) : string
    {
        return sprintf('__phpstanGetIterableKeyType(%s)', $this->p($expr->getExpr()));
    }
    protected function pPHPStan_Node_OriginalPropertyTypeExpr(OriginalPropertyTypeExpr $expr) : string
    {
        return sprintf('__phpstanOriginalPropertyType(%s)', $this->p($expr->getPropertyFetch()));
    }
    protected function pPHPStan_Node_SetOffsetValueTypeExpr(SetOffsetValueTypeExpr $expr) : string
    {
        return sprintf('__phpstanSetOffsetValueType(%s, %s, %s)', $this->p($expr->getVar()), $expr->getDim() !== null ? $this->p($expr->getDim()) : 'null', $this->p($expr->getValue()));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node\Expr\Yield_;
use PhpParser\Node\Expr\YieldFrom;
use PhpParser\Node\Stmt\Function_;
use PhpParser\NodeAbstract;
use PHPStan\Analyser\StatementResult;
use function count;
/** @api */
class FunctionReturnStatementsNode extends NodeAbstract implements \PHPStan\Node\ReturnStatementsNode
{
    /**
     * @var \PhpParser\Node\Stmt\Function_
     */
    private $function;
    /**
     * @var list<ReturnStatement>
     */
    private $returnStatements;
    /**
     * @var list<(Yield_ | YieldFrom)>
     */
    private $yieldStatements;
    /**
     * @var \PHPStan\Analyser\StatementResult
     */
    private $statementResult;
    /**
     * @var list<ExecutionEndNode>
     */
    private $executionEnds;
    /**
     * @param list<ReturnStatement> $returnStatements
     * @param list<Yield_|YieldFrom> $yieldStatements
     * @param list<ExecutionEndNode> $executionEnds
     */
    public function __construct(Function_ $function, array $returnStatements, array $yieldStatements, StatementResult $statementResult, array $executionEnds)
    {
        $this->function = $function;
        $this->returnStatements = $returnStatements;
        $this->yieldStatements = $yieldStatements;
        $this->statementResult = $statementResult;
        $this->executionEnds = $executionEnds;
        parent::__construct($function->getAttributes());
    }
    public function getReturnStatements() : array
    {
        return $this->returnStatements;
    }
    public function getStatementResult() : StatementResult
    {
        return $this->statementResult;
    }
    public function getExecutionEnds() : array
    {
        return $this->executionEnds;
    }
    public function returnsByRef() : bool
    {
        return $this->function->byRef;
    }
    public function hasNativeReturnTypehint() : bool
    {
        return $this->function->returnType !== null;
    }
    public function getYieldStatements() : array
    {
        return $this->yieldStatements;
    }
    public function isGenerator() : bool
    {
        return count($this->yieldStatements) > 0;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_FunctionReturnStatementsNode';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Identifier;
use PhpParser\Node\Name;
use PhpParser\Node\Stmt\Class_;
use PhpParser\NodeAbstract;
use PHPStan\Type\Type;
/** @api */
class ClassPropertyNode extends NodeAbstract implements \PHPStan\Node\VirtualNode
{
    /**
     * @var string
     */
    private $name;
    /**
     * @var int
     */
    private $flags;
    /**
     * @var \PhpParser\Node\Identifier|\PhpParser\Node\Name|\PhpParser\Node\ComplexType|null
     */
    private $type;
    /**
     * @var \PhpParser\Node\Expr|null
     */
    private $default;
    /**
     * @var string|null
     */
    private $phpDoc;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $phpDocType;
    /**
     * @var bool
     */
    private $isPromoted;
    /**
     * @var bool
     */
    private $isReadonlyByPhpDoc;
    /**
     * @var bool
     */
    private $isDeclaredInTrait;
    /**
     * @var bool
     */
    private $isReadonlyClass;
    /**
     * @var bool
     */
    private $isAllowedPrivateMutation;
    /**
     * @param \PhpParser\Node\Identifier|\PhpParser\Node\Name|\PhpParser\Node\ComplexType|null $type
     */
    public function __construct(string $name, int $flags, $type, ?Expr $default, ?string $phpDoc, ?Type $phpDocType, bool $isPromoted, Node $originalNode, bool $isReadonlyByPhpDoc, bool $isDeclaredInTrait, bool $isReadonlyClass, bool $isAllowedPrivateMutation)
    {
        $this->name = $name;
        $this->flags = $flags;
        $this->type = $type;
        $this->default = $default;
        $this->phpDoc = $phpDoc;
        $this->phpDocType = $phpDocType;
        $this->isPromoted = $isPromoted;
        $this->isReadonlyByPhpDoc = $isReadonlyByPhpDoc;
        $this->isDeclaredInTrait = $isDeclaredInTrait;
        $this->isReadonlyClass = $isReadonlyClass;
        $this->isAllowedPrivateMutation = $isAllowedPrivateMutation;
        parent::__construct($originalNode->getAttributes());
    }
    public function getName() : string
    {
        return $this->name;
    }
    public function getFlags() : int
    {
        return $this->flags;
    }
    public function getDefault() : ?Expr
    {
        return $this->default;
    }
    public function isPromoted() : bool
    {
        return $this->isPromoted;
    }
    public function getPhpDoc() : ?string
    {
        return $this->phpDoc;
    }
    public function getPhpDocType() : ?Type
    {
        return $this->phpDocType;
    }
    public function isPublic() : bool
    {
        return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0 || ($this->flags & Class_::VISIBILITY_MODIFIER_MASK) === 0;
    }
    public function isProtected() : bool
    {
        return (bool) ($this->flags & Class_::MODIFIER_PROTECTED);
    }
    public function isPrivate() : bool
    {
        return (bool) ($this->flags & Class_::MODIFIER_PRIVATE);
    }
    public function isStatic() : bool
    {
        return (bool) ($this->flags & Class_::MODIFIER_STATIC);
    }
    public function isReadOnly() : bool
    {
        return (bool) ($this->flags & Class_::MODIFIER_READONLY) || $this->isReadonlyClass;
    }
    public function isReadOnlyByPhpDoc() : bool
    {
        return $this->isReadonlyByPhpDoc;
    }
    public function isDeclaredInTrait() : bool
    {
        return $this->isDeclaredInTrait;
    }
    public function isAllowedPrivateMutation() : bool
    {
        return $this->isAllowedPrivateMutation;
    }
    /**
     * @return Identifier|Name|Node\ComplexType|null
     */
    public function getNativeType()
    {
        return $this->type;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_ClassPropertyNode';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node;
use PhpParser\Node\Stmt\ClassLike;
use PHPStan\Reflection\ClassReflection;
/** @api */
class InClassNode extends Node\Stmt implements \PHPStan\Node\VirtualNode
{
    /**
     * @var \PhpParser\Node\Stmt\ClassLike
     */
    private $originalNode;
    /**
     * @var \PHPStan\Reflection\ClassReflection
     */
    private $classReflection;
    public function __construct(ClassLike $originalNode, ClassReflection $classReflection)
    {
        $this->originalNode = $originalNode;
        $this->classReflection = $classReflection;
        parent::__construct($originalNode->getAttributes());
    }
    public function getOriginalNode() : ClassLike
    {
        return $this->originalNode;
    }
    public function getClassReflection() : ClassReflection
    {
        return $this->classReflection;
    }
    public function getType() : string
    {
        return 'PHPStan_Stmt_InClassNode';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node\Expr;
use PhpParser\Node\Name;
/** @api */
class InstantiationCallableNode extends Expr implements \PHPStan\Node\VirtualNode
{
    /**
     * @var \PhpParser\Node\Name|\PhpParser\Node\Expr
     */
    private $class;
    /**
     * @var \PhpParser\Node\Expr\New_
     */
    private $originalNode;
    /**
     * @param \PhpParser\Node\Name|\PhpParser\Node\Expr $class
     */
    public function __construct($class, Expr\New_ $originalNode)
    {
        $this->class = $class;
        $this->originalNode = $originalNode;
        parent::__construct($this->originalNode->getAttributes());
    }
    /**
     * @return Expr|Name
     */
    public function getClass()
    {
        return $this->class;
    }
    public function getOriginalNode() : Expr\New_
    {
        return $this->originalNode;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_InstantiationCallableNode';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node\Expr;
use PhpParser\NodeAbstract;
use PHPStan\Analyser\Scope;
/** @api */
class MatchExpressionNode extends NodeAbstract implements \PHPStan\Node\VirtualNode
{
    /**
     * @var \PhpParser\Node\Expr
     */
    private $condition;
    /**
     * @var MatchExpressionArm[]
     */
    private $arms;
    /**
     * @var \PHPStan\Analyser\Scope
     */
    private $endScope;
    /**
     * @param MatchExpressionArm[] $arms
     */
    public function __construct(Expr $condition, array $arms, Expr\Match_ $originalNode, Scope $endScope)
    {
        $this->condition = $condition;
        $this->arms = $arms;
        $this->endScope = $endScope;
        parent::__construct($originalNode->getAttributes());
    }
    public function getCondition() : Expr
    {
        return $this->condition;
    }
    /**
     * @return MatchExpressionArm[]
     */
    public function getArms() : array
    {
        return $this->arms;
    }
    public function getEndScope() : Scope
    {
        return $this->endScope;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_MatchExpression';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node;
use PhpParser\NodeAbstract;
use PHPStan\Collectors\CollectedData;
use PHPStan\Collectors\Collector;
use function array_key_exists;
/** @api */
class CollectedDataNode extends NodeAbstract
{
    /**
     * @var CollectedData[]
     */
    private $collectedData;
    /**
     * @param CollectedData[] $collectedData
     */
    public function __construct(array $collectedData)
    {
        $this->collectedData = $collectedData;
        parent::__construct([]);
    }
    /**
     * @template TCollector of Collector<Node, TValue>
     * @template TValue
     * @param class-string<TCollector> $collectorType
     * @return array<string, list<TValue>>
     */
    public function get(string $collectorType) : array
    {
        $result = [];
        foreach ($this->collectedData as $collectedData) {
            if ($collectedData->getCollectorType() !== $collectorType) {
                continue;
            }
            $filePath = $collectedData->getFilePath();
            if (!array_key_exists($filePath, $result)) {
                $result[$filePath] = [];
            }
            $result[$filePath][] = $collectedData->getData();
        }
        return $result;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_CollectedDataNode';
    }
    /**
     * @return array{}
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node;
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Expr\PropertyFetch;
use PhpParser\Node\Identifier;
use PhpParser\Node\Name;
use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\ClassLike;
use PhpParser\NodeAbstract;
use PHPStan\Analyser\Scope;
use PHPStan\Node\Method\MethodCall;
use PHPStan\Node\Property\PropertyRead;
use PHPStan\Node\Property\PropertyWrite;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Rules\Properties\ReadWritePropertiesExtension;
use PHPStan\Rules\Properties\ReadWritePropertiesExtensionProvider;
use PHPStan\ShouldNotHappenException;
use function array_key_exists;
use function array_keys;
use function count;
use function in_array;
/** @api */
class ClassPropertiesNode extends NodeAbstract implements \PHPStan\Node\VirtualNode
{
    /**
     * @var \PhpParser\Node\Stmt\ClassLike
     */
    private $class;
    /**
     * @var \PHPStan\Rules\Properties\ReadWritePropertiesExtensionProvider
     */
    private $readWritePropertiesExtensionProvider;
    /**
     * @var ClassPropertyNode[]
     */
    private $properties;
    /**
     * @var array<int, (PropertyRead | PropertyWrite)>
     */
    private $propertyUsages;
    /**
     * @var array<int, MethodCall>
     */
    private $methodCalls;
    /**
     * @param ClassPropertyNode[] $properties
     * @param array<int, PropertyRead|PropertyWrite> $propertyUsages
     * @param array<int, MethodCall> $methodCalls
     */
    public function __construct(ClassLike $class, ReadWritePropertiesExtensionProvider $readWritePropertiesExtensionProvider, array $properties, array $propertyUsages, array $methodCalls)
    {
        $this->class = $class;
        $this->readWritePropertiesExtensionProvider = $readWritePropertiesExtensionProvider;
        $this->properties = $properties;
        $this->propertyUsages = $propertyUsages;
        $this->methodCalls = $methodCalls;
        parent::__construct($class->getAttributes());
    }
    public function getClass() : ClassLike
    {
        return $this->class;
    }
    /**
     * @return ClassPropertyNode[]
     */
    public function getProperties() : array
    {
        return $this->properties;
    }
    /**
     * @return array<int, PropertyRead|PropertyWrite>
     */
    public function getPropertyUsages() : array
    {
        return $this->propertyUsages;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_ClassPropertiesNode';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
    /**
     * @param string[] $constructors
     * @param ReadWritePropertiesExtension[]|null $extensions
     * @return array{array<string, ClassPropertyNode>, array<array{string, int, ClassPropertyNode}>, array<array{string, int, ClassPropertyNode}>}
     */
    public function getUninitializedProperties(Scope $scope, array $constructors, ?array $extensions = null) : array
    {
        if (!$this->getClass() instanceof Class_) {
            return [[], [], []];
        }
        if (!$scope->isInClass()) {
            throw new ShouldNotHappenException();
        }
        $classReflection = $scope->getClassReflection();
        $properties = [];
        foreach ($this->getProperties() as $property) {
            if ($property->isStatic()) {
                continue;
            }
            if ($property->getNativeType() === null) {
                continue;
            }
            if ($property->getDefault() !== null) {
                continue;
            }
            $properties[$property->getName()] = $property;
        }
        if ($extensions === null) {
            $extensions = $this->readWritePropertiesExtensionProvider->getExtensions();
        }
        foreach (array_keys($properties) as $name) {
            foreach ($extensions as $extension) {
                if (!$classReflection->hasNativeProperty($name)) {
                    continue;
                }
                $propertyReflection = $classReflection->getNativeProperty($name);
                if (!$extension->isInitialized($propertyReflection, $name)) {
                    continue;
                }
                unset($properties[$name]);
                break;
            }
        }
        if ($constructors === []) {
            return [$properties, [], []];
        }
        $methodsCalledFromConstructor = $this->getMethodsCalledFromConstructor($classReflection, $this->methodCalls, $constructors);
        $prematureAccess = [];
        $additionalAssigns = [];
        $originalProperties = $properties;
        foreach ($this->getPropertyUsages() as $usage) {
            $fetch = $usage->getFetch();
            if (!$fetch instanceof PropertyFetch) {
                continue;
            }
            $usageScope = $usage->getScope();
            if ($usageScope->getFunction() === null) {
                continue;
            }
            $function = $usageScope->getFunction();
            if (!$function instanceof MethodReflection) {
                continue;
            }
            if ($function->getDeclaringClass()->getName() !== $classReflection->getName()) {
                continue;
            }
            if (!in_array($function->getName(), $methodsCalledFromConstructor, \true)) {
                continue;
            }
            if (!$fetch->name instanceof Identifier) {
                continue;
            }
            $propertyName = $fetch->name->toString();
            $fetchedOnType = $usageScope->getType($fetch->var);
            $propertyReflection = $usageScope->getPropertyReflection($fetchedOnType, $propertyName);
            if ($propertyReflection === null) {
                continue;
            }
            if ($propertyReflection->getDeclaringClass()->getName() !== $classReflection->getName()) {
                continue;
            }
            if ($usage instanceof PropertyWrite) {
                if (array_key_exists($propertyName, $properties)) {
                    unset($properties[$propertyName]);
                } elseif (array_key_exists($propertyName, $originalProperties)) {
                    $additionalAssigns[] = [$propertyName, $fetch->getLine(), $originalProperties[$propertyName]];
                }
            } elseif (array_key_exists($propertyName, $properties)) {
                $prematureAccess[] = [$propertyName, $fetch->getLine(), $properties[$propertyName]];
            }
        }
        return [$properties, $prematureAccess, $additionalAssigns];
    }
    /**
     * @param MethodCall[] $methodCalls
     * @param string[] $methods
     * @return string[]
     */
    private function getMethodsCalledFromConstructor(ClassReflection $classReflection, array $methodCalls, array $methods) : array
    {
        $originalCount = count($methods);
        foreach ($methodCalls as $methodCall) {
            $methodCallNode = $methodCall->getNode();
            if ($methodCallNode instanceof Array_) {
                continue;
            }
            if (!$methodCallNode->name instanceof Identifier) {
                continue;
            }
            $callScope = $methodCall->getScope();
            if ($methodCallNode instanceof Node\Expr\MethodCall) {
                $calledOnType = $callScope->getType($methodCallNode->var);
            } else {
                if (!$methodCallNode->class instanceof Name) {
                    continue;
                }
                $calledOnType = $callScope->resolveTypeByName($methodCallNode->class);
            }
            $methodName = $methodCallNode->name->toString();
            if (in_array($methodName, $methods, \true)) {
                continue;
            }
            $methodReflection = $callScope->getMethodReflection($calledOnType, $methodName);
            if ($methodReflection === null) {
                continue;
            }
            if ($methodReflection->getDeclaringClass()->getName() !== $classReflection->getName()) {
                continue;
            }
            $inMethod = $callScope->getFunction();
            if (!$inMethod instanceof MethodReflection) {
                continue;
            }
            if (!in_array($inMethod->getName(), $methods, \true)) {
                continue;
            }
            $methods[] = $methodName;
        }
        if ($originalCount === count($methods)) {
            return $methods;
        }
        return $this->getMethodsCalledFromConstructor($classReflection, $methodCalls, $methods);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node\Expr;
use PhpParser\Node\Expr\BinaryOp\BooleanAnd;
use PhpParser\Node\Expr\BinaryOp\LogicalAnd;
use PHPStan\Analyser\Scope;
/** @api */
class BooleanAndNode extends Expr implements \PHPStan\Node\VirtualNode
{
    /**
     * @var \PhpParser\Node\Expr\BinaryOp\BooleanAnd|\PhpParser\Node\Expr\BinaryOp\LogicalAnd
     */
    private $originalNode;
    /**
     * @var \PHPStan\Analyser\Scope
     */
    private $rightScope;
    /**
     * @param \PhpParser\Node\Expr\BinaryOp\BooleanAnd|\PhpParser\Node\Expr\BinaryOp\LogicalAnd $originalNode
     */
    public function __construct($originalNode, Scope $rightScope)
    {
        $this->originalNode = $originalNode;
        $this->rightScope = $rightScope;
        parent::__construct($originalNode->getAttributes());
    }
    /**
     * @return BooleanAnd|LogicalAnd
     */
    public function getOriginalNode()
    {
        return $this->originalNode;
    }
    public function getRightScope() : Scope
    {
        return $this->rightScope;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_BooleanAndNode';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

/** @api */
class MatchExpressionArm
{
    /**
     * @var \PHPStan\Node\MatchExpressionArmBody
     */
    private $body;
    /**
     * @var MatchExpressionArmCondition[]
     */
    private $conditions;
    /**
     * @var int
     */
    private $line;
    /**
     * @param MatchExpressionArmCondition[] $conditions
     */
    public function __construct(\PHPStan\Node\MatchExpressionArmBody $body, array $conditions, int $line)
    {
        $this->body = $body;
        $this->conditions = $conditions;
        $this->line = $line;
    }
    public function getBody() : \PHPStan\Node\MatchExpressionArmBody
    {
        return $this->body;
    }
    /**
     * @return MatchExpressionArmCondition[]
     */
    public function getConditions() : array
    {
        return $this->conditions;
    }
    public function getLine() : int
    {
        return $this->line;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node\Expr;
use PhpParser\Node\Identifier;
use PhpParser\Node\Name;
/** @api */
class StaticMethodCallableNode extends Expr implements \PHPStan\Node\VirtualNode
{
    /**
     * @var \PhpParser\Node\Name|\PhpParser\Node\Expr
     */
    private $class;
    /**
     * @var \PhpParser\Node\Identifier|\PhpParser\Node\Expr
     */
    private $name;
    /**
     * @var \PhpParser\Node\Expr\StaticCall
     */
    private $originalNode;
    /**
     * @param \PhpParser\Node\Name|\PhpParser\Node\Expr $class
     * @param \PhpParser\Node\Identifier|\PhpParser\Node\Expr $name
     */
    public function __construct($class, $name, Expr\StaticCall $originalNode)
    {
        $this->class = $class;
        $this->name = $name;
        $this->originalNode = $originalNode;
        parent::__construct($originalNode->getAttributes());
    }
    /**
     * @return Expr|Name
     */
    public function getClass()
    {
        return $this->class;
    }
    /**
     * @return Identifier|Expr
     */
    public function getName()
    {
        return $this->name;
    }
    public function getOriginalNode() : Expr\StaticCall
    {
        return $this->originalNode;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_StaticMethodCallableNode';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node\Stmt;
/** @api */
class UnreachableStatementNode extends Stmt implements \PHPStan\Node\VirtualNode
{
    /**
     * @var \PhpParser\Node\Stmt
     */
    private $originalStatement;
    public function __construct(Stmt $originalStatement)
    {
        $this->originalStatement = $originalStatement;
        parent::__construct($originalStatement->getAttributes());
    }
    public function getOriginalStatement() : Stmt
    {
        return $this->originalStatement;
    }
    public function getType() : string
    {
        return 'PHPStan_Stmt_UnreachableStatementNode';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node\Expr;

use PhpParser\Node\Expr;
use PHPStan\Node\VirtualNode;
class GetOffsetValueTypeExpr extends Expr implements VirtualNode
{
    /**
     * @var \PhpParser\Node\Expr
     */
    private $var;
    /**
     * @var \PhpParser\Node\Expr
     */
    private $dim;
    public function __construct(Expr $var, Expr $dim)
    {
        $this->var = $var;
        $this->dim = $dim;
        parent::__construct([]);
    }
    public function getVar() : Expr
    {
        return $this->var;
    }
    public function getDim() : Expr
    {
        return $this->dim;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_GetOffsetValueTypeExpr';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node\Expr;

use PhpParser\Node\Expr;
use PHPStan\Node\VirtualNode;
class OriginalPropertyTypeExpr extends Expr implements VirtualNode
{
    /**
     * @var \PhpParser\Node\Expr\PropertyFetch|\PhpParser\Node\Expr\StaticPropertyFetch
     */
    private $propertyFetch;
    /**
     * @param \PhpParser\Node\Expr\PropertyFetch|\PhpParser\Node\Expr\StaticPropertyFetch $propertyFetch
     */
    public function __construct($propertyFetch)
    {
        $this->propertyFetch = $propertyFetch;
        parent::__construct([]);
    }
    /**
     * @return \PhpParser\Node\Expr\PropertyFetch|\PhpParser\Node\Expr\StaticPropertyFetch
     */
    public function getPropertyFetch()
    {
        return $this->propertyFetch;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_OriginalPropertyTypeExpr';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node\Expr;

use PhpParser\Node\Expr;
use PHPStan\Node\VirtualNode;
use PHPStan\Type\Type;
class TypeExpr extends Expr implements VirtualNode
{
    /**
     * @var \PHPStan\Type\Type
     */
    private $exprType;
    public function __construct(Type $exprType)
    {
        $this->exprType = $exprType;
        parent::__construct();
    }
    public function getExprType() : Type
    {
        return $this->exprType;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_TypeExpr';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node\Expr;

use PhpParser\Node\Expr;
use PHPStan\Node\VirtualNode;
class GetIterableKeyTypeExpr extends Expr implements VirtualNode
{
    /**
     * @var \PhpParser\Node\Expr
     */
    private $expr;
    public function __construct(Expr $expr)
    {
        $this->expr = $expr;
        parent::__construct([]);
    }
    public function getExpr() : Expr
    {
        return $this->expr;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_GetIterableKeyTypeExpr';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node\Expr;

use PhpParser\Node\Expr;
use PHPStan\Node\VirtualNode;
class SetOffsetValueTypeExpr extends Expr implements VirtualNode
{
    /**
     * @var \PhpParser\Node\Expr
     */
    private $var;
    /**
     * @var \PhpParser\Node\Expr|null
     */
    private $dim;
    /**
     * @var \PhpParser\Node\Expr
     */
    private $value;
    public function __construct(Expr $var, ?Expr $dim, Expr $value)
    {
        $this->var = $var;
        $this->dim = $dim;
        $this->value = $value;
        parent::__construct([]);
    }
    public function getVar() : Expr
    {
        return $this->var;
    }
    public function getDim() : ?Expr
    {
        return $this->dim;
    }
    public function getValue() : Expr
    {
        return $this->value;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_SetOffsetValueTypeExpr';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node\Expr;

use PhpParser\Node\Expr;
use PHPStan\Node\VirtualNode;
class GetIterableValueTypeExpr extends Expr implements VirtualNode
{
    /**
     * @var \PhpParser\Node\Expr
     */
    private $expr;
    public function __construct(Expr $expr)
    {
        $this->expr = $expr;
        parent::__construct([]);
    }
    public function getExpr() : Expr
    {
        return $this->expr;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_GetIterableValueTypeExpr';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node\Expr\ArrayItem;
use PHPStan\Analyser\Scope;
/** @api */
class LiteralArrayItem
{
    /**
     * @var \PHPStan\Analyser\Scope
     */
    private $scope;
    /**
     * @var \PhpParser\Node\Expr\ArrayItem|null
     */
    private $arrayItem;
    public function __construct(Scope $scope, ?ArrayItem $arrayItem)
    {
        $this->scope = $scope;
        $this->arrayItem = $arrayItem;
    }
    public function getScope() : Scope
    {
        return $this->scope;
    }
    public function getArrayItem() : ?ArrayItem
    {
        return $this->arrayItem;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node\Expr\Yield_;
use PhpParser\Node\Expr\YieldFrom;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\NodeAbstract;
use PHPStan\Analyser\StatementResult;
use function count;
/** @api */
class MethodReturnStatementsNode extends NodeAbstract implements \PHPStan\Node\ReturnStatementsNode
{
    /**
     * @var \PhpParser\Node\Stmt\ClassMethod
     */
    private $classMethod;
    /**
     * @var list<ReturnStatement>
     */
    private $returnStatements;
    /**
     * @var list<(Yield_ | YieldFrom)>
     */
    private $yieldStatements;
    /**
     * @var \PHPStan\Analyser\StatementResult
     */
    private $statementResult;
    /**
     * @var list<ExecutionEndNode>
     */
    private $executionEnds;
    /**
     * @param list<ReturnStatement> $returnStatements
     * @param list<Yield_|YieldFrom> $yieldStatements
     * @param list<ExecutionEndNode> $executionEnds
     */
    public function __construct(ClassMethod $method, array $returnStatements, array $yieldStatements, StatementResult $statementResult, array $executionEnds)
    {
        $this->returnStatements = $returnStatements;
        $this->yieldStatements = $yieldStatements;
        $this->statementResult = $statementResult;
        $this->executionEnds = $executionEnds;
        parent::__construct($method->getAttributes());
        $this->classMethod = $method;
    }
    public function getReturnStatements() : array
    {
        return $this->returnStatements;
    }
    public function getStatementResult() : StatementResult
    {
        return $this->statementResult;
    }
    public function getExecutionEnds() : array
    {
        return $this->executionEnds;
    }
    public function returnsByRef() : bool
    {
        return $this->classMethod->byRef;
    }
    public function hasNativeReturnTypehint() : bool
    {
        return $this->classMethod->returnType !== null;
    }
    public function getYieldStatements() : array
    {
        return $this->yieldStatements;
    }
    public function isGenerator() : bool
    {
        return count($this->yieldStatements) > 0;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_MethodReturnStatementsNode';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node\Stmt\While_;
use PhpParser\NodeAbstract;
use PHPStan\Analyser\StatementExitPoint;
/** @api */
class BreaklessWhileLoopNode extends NodeAbstract implements \PHPStan\Node\VirtualNode
{
    /**
     * @var \PhpParser\Node\Stmt\While_
     */
    private $originalNode;
    /**
     * @var StatementExitPoint[]
     */
    private $exitPoints;
    /**
     * @param StatementExitPoint[] $exitPoints
     */
    public function __construct(While_ $originalNode, array $exitPoints)
    {
        $this->originalNode = $originalNode;
        $this->exitPoints = $exitPoints;
        parent::__construct($originalNode->getAttributes());
    }
    public function getOriginalNode() : While_
    {
        return $this->originalNode;
    }
    /**
     * @return StatementExitPoint[]
     */
    public function getExitPoints() : array
    {
        return $this->exitPoints;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_BreaklessWhileLoop';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node;
use PhpParser\NodeAbstract;
/** @api */
class FileNode extends NodeAbstract implements \PHPStan\Node\VirtualNode
{
    /**
     * @var Node[]
     */
    private $nodes;
    /**
     * @param Node[] $nodes
     */
    public function __construct(array $nodes)
    {
        $this->nodes = $nodes;
        $firstNode = $nodes[0] ?? null;
        parent::__construct($firstNode !== null ? $firstNode->getAttributes() : []);
    }
    /**
     * @return Node[]
     */
    public function getNodes() : array
    {
        return $this->nodes;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_FileNode';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node\Expr;
use PhpParser\NodeAbstract;
use PHPStan\Analyser\StatementExitPoint;
class DoWhileLoopConditionNode extends NodeAbstract implements \PHPStan\Node\VirtualNode
{
    /**
     * @var \PhpParser\Node\Expr
     */
    private $cond;
    /**
     * @var StatementExitPoint[]
     */
    private $exitPoints;
    /**
     * @param StatementExitPoint[] $exitPoints
     */
    public function __construct(Expr $cond, array $exitPoints)
    {
        $this->cond = $cond;
        $this->exitPoints = $exitPoints;
        parent::__construct($cond->getAttributes());
    }
    public function getCond() : Expr
    {
        return $this->cond;
    }
    /**
     * @return StatementExitPoint[]
     */
    public function getExitPoints() : array
    {
        return $this->exitPoints;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_ClosureReturnStatementsNode';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\Php\PhpMethodFromParserNodeReflection;
/** @api */
class InClassMethodNode extends Node\Stmt implements \PHPStan\Node\VirtualNode
{
    /**
     * @var \PHPStan\Reflection\ClassReflection
     */
    private $classReflection;
    /**
     * @var \PHPStan\Reflection\Php\PhpMethodFromParserNodeReflection
     */
    private $methodReflection;
    /**
     * @var \PhpParser\Node\Stmt\ClassMethod
     */
    private $originalNode;
    public function __construct(ClassReflection $classReflection, PhpMethodFromParserNodeReflection $methodReflection, Node\Stmt\ClassMethod $originalNode)
    {
        $this->classReflection = $classReflection;
        $this->methodReflection = $methodReflection;
        $this->originalNode = $originalNode;
        parent::__construct($originalNode->getAttributes());
    }
    public function getClassReflection() : ClassReflection
    {
        return $this->classReflection;
    }
    public function getMethodReflection() : PhpMethodFromParserNodeReflection
    {
        return $this->methodReflection;
    }
    public function getOriginalNode() : Node\Stmt\ClassMethod
    {
        return $this->originalNode;
    }
    public function getType() : string
    {
        return 'PHPStan_Stmt_InClassMethodNode';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node\Expr;
use PhpParser\NodeAbstract;
use PHPStan\PhpDoc\Tag\VarTag;
class VarTagChangedExpressionTypeNode extends NodeAbstract implements \PHPStan\Node\VirtualNode
{
    /**
     * @var \PHPStan\PhpDoc\Tag\VarTag
     */
    private $varTag;
    /**
     * @var \PhpParser\Node\Expr
     */
    private $expr;
    public function __construct(VarTag $varTag, Expr $expr)
    {
        $this->varTag = $varTag;
        $this->expr = $expr;
        parent::__construct($expr->getAttributes());
    }
    public function getVarTag() : VarTag
    {
        return $this->varTag;
    }
    public function getExpr() : Expr
    {
        return $this->expr;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_VarTagChangedExpressionType';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node\Expr;
use PhpParser\NodeAbstract;
class PropertyAssignNode extends NodeAbstract implements \PHPStan\Node\VirtualNode
{
    /**
     * @var \PhpParser\Node\Expr\PropertyFetch|\PhpParser\Node\Expr\StaticPropertyFetch
     */
    private $propertyFetch;
    /**
     * @var \PhpParser\Node\Expr
     */
    private $assignedExpr;
    /**
     * @var bool
     */
    private $assignOp;
    /**
     * @param \PhpParser\Node\Expr\PropertyFetch|\PhpParser\Node\Expr\StaticPropertyFetch $propertyFetch
     */
    public function __construct($propertyFetch, Expr $assignedExpr, bool $assignOp)
    {
        $this->propertyFetch = $propertyFetch;
        $this->assignedExpr = $assignedExpr;
        $this->assignOp = $assignOp;
        parent::__construct($propertyFetch->getAttributes());
    }
    /**
     * @return \PhpParser\Node\Expr\PropertyFetch|\PhpParser\Node\Expr\StaticPropertyFetch
     */
    public function getPropertyFetch()
    {
        return $this->propertyFetch;
    }
    public function getAssignedExpr() : Expr
    {
        return $this->assignedExpr;
    }
    public function isAssignOp() : bool
    {
        return $this->assignOp;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_PropertyAssignNodeNode';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node\Method;

use PhpParser\Node;
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Expr\StaticCall;
use PHPStan\Analyser\Scope;
/** @api */
class MethodCall
{
    /**
     * @var \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\StaticCall|\PhpParser\Node\Expr\Array_
     */
    private $node;
    /**
     * @var \PHPStan\Analyser\Scope
     */
    private $scope;
    /**
     * @param \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\StaticCall|\PhpParser\Node\Expr\Array_ $node
     */
    public function __construct($node, Scope $scope)
    {
        $this->node = $node;
        $this->scope = $scope;
    }
    /**
     * @return Node\Expr\MethodCall|StaticCall|Array_
     */
    public function getNode()
    {
        return $this->node;
    }
    public function getScope() : Scope
    {
        return $this->scope;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node\Expr;
use PHPStan\Analyser\Scope;
/** @api */
class MatchExpressionArmCondition
{
    /**
     * @var \PhpParser\Node\Expr
     */
    private $condition;
    /**
     * @var \PHPStan\Analyser\Scope
     */
    private $scope;
    /**
     * @var int
     */
    private $line;
    public function __construct(Expr $condition, Scope $scope, int $line)
    {
        $this->condition = $condition;
        $this->scope = $scope;
        $this->line = $line;
    }
    public function getCondition() : Expr
    {
        return $this->condition;
    }
    public function getScope() : Scope
    {
        return $this->scope;
    }
    public function getLine() : int
    {
        return $this->line;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node\Expr\Yield_;
use PhpParser\Node\Expr\YieldFrom;
use PHPStan\Analyser\StatementResult;
/** @api */
interface ReturnStatementsNode extends \PHPStan\Node\VirtualNode
{
    /**
     * @return list<ReturnStatement>
     */
    public function getReturnStatements() : array;
    public function getStatementResult() : StatementResult;
    /**
     * @return list<ExecutionEndNode>
     */
    public function getExecutionEnds() : array;
    public function returnsByRef() : bool;
    public function hasNativeReturnTypehint() : bool;
    /**
     * @return list<Yield_|YieldFrom>
     */
    public function getYieldStatements() : array;
    public function isGenerator() : bool;
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node\Expr;
use PhpParser\Node\Expr\BinaryOp\BooleanOr;
use PhpParser\Node\Expr\BinaryOp\LogicalOr;
use PHPStan\Analyser\Scope;
/** @api */
class BooleanOrNode extends Expr implements \PHPStan\Node\VirtualNode
{
    /**
     * @var \PhpParser\Node\Expr\BinaryOp\BooleanOr|\PhpParser\Node\Expr\BinaryOp\LogicalOr
     */
    private $originalNode;
    /**
     * @var \PHPStan\Analyser\Scope
     */
    private $rightScope;
    /**
     * @param \PhpParser\Node\Expr\BinaryOp\BooleanOr|\PhpParser\Node\Expr\BinaryOp\LogicalOr $originalNode
     */
    public function __construct($originalNode, Scope $rightScope)
    {
        $this->originalNode = $originalNode;
        $this->rightScope = $rightScope;
        parent::__construct($originalNode->getAttributes());
    }
    /**
     * @return BooleanOr|LogicalOr
     */
    public function getOriginalNode()
    {
        return $this->originalNode;
    }
    public function getRightScope() : Scope
    {
        return $this->rightScope;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_BooleanOrNode';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node\Expr;
use PHPStan\Analyser\Scope;
/** @api */
class MatchExpressionArmBody
{
    /**
     * @var \PHPStan\Analyser\Scope
     */
    private $scope;
    /**
     * @var \PhpParser\Node\Expr
     */
    private $body;
    public function __construct(Scope $scope, Expr $body)
    {
        $this->scope = $scope;
        $this->body = $body;
    }
    public function getScope() : Scope
    {
        return $this->scope;
    }
    public function getBody() : Expr
    {
        return $this->body;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node;
use PhpParser\Node\Stmt\Return_;
use PHPStan\Analyser\Scope;
/** @api */
class ReturnStatement
{
    /**
     * @var \PhpParser\Node\Stmt\Return_
     */
    private $returnNode;
    /**
     * @var \PHPStan\Analyser\Scope
     */
    private $scope;
    public function __construct(Scope $scope, Return_ $returnNode)
    {
        $this->scope = $scope;
        $this->returnNode = $returnNode;
    }
    public function getScope() : Scope
    {
        return $this->scope;
    }
    public function getReturnNode() : Return_
    {
        return $this->returnNode;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node;
/** @api */
interface VirtualNode extends Node
{
}
<?php

declare (strict_types=1);
namespace PHPStan\Node;

use PhpParser\Node\Expr;
use PhpParser\Node\Identifier;
/** @api */
class MethodCallableNode extends Expr implements \PHPStan\Node\VirtualNode
{
    /**
     * @var \PhpParser\Node\Expr
     */
    private $var;
    /**
     * @var \PhpParser\Node\Identifier|\PhpParser\Node\Expr
     */
    private $name;
    /**
     * @var \PhpParser\Node\Expr\MethodCall
     */
    private $originalNode;
    /**
     * @param \PhpParser\Node\Identifier|\PhpParser\Node\Expr $name
     */
    public function __construct(Expr $var, $name, Expr\MethodCall $originalNode)
    {
        $this->var = $var;
        $this->name = $name;
        $this->originalNode = $originalNode;
        parent::__construct($originalNode->getAttributes());
    }
    public function getVar() : Expr
    {
        return $this->var;
    }
    /**
     * @return Expr|Identifier
     */
    public function getName()
    {
        return $this->name;
    }
    public function getOriginalNode() : Expr\MethodCall
    {
        return $this->originalNode;
    }
    public function getType() : string
    {
        return 'PHPStan_Node_MethodCallableNode';
    }
    /**
     * @return string[]
     */
    public function getSubNodeNames() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Parallel;

use function array_chunk;
use function count;
use function floor;
use function max;
use function min;
class Scheduler
{
    /**
     * @var positive-int
     */
    private $jobSize;
    /**
     * @var positive-int
     */
    private $maximumNumberOfProcesses;
    /**
     * @var positive-int
     */
    private $minimumNumberOfJobsPerProcess;
    /**
     * @param positive-int $jobSize
     * @param positive-int $maximumNumberOfProcesses
     * @param positive-int $minimumNumberOfJobsPerProcess
     */
    public function __construct(int $jobSize, int $maximumNumberOfProcesses, int $minimumNumberOfJobsPerProcess)
    {
        $this->jobSize = $jobSize;
        $this->maximumNumberOfProcesses = $maximumNumberOfProcesses;
        $this->minimumNumberOfJobsPerProcess = $minimumNumberOfJobsPerProcess;
    }
    /**
     * @param array<string> $files
     */
    public function scheduleWork(int $cpuCores, array $files) : \PHPStan\Parallel\Schedule
    {
        $jobs = array_chunk($files, $this->jobSize);
        $numberOfProcesses = min(max((int) floor(count($jobs) / $this->minimumNumberOfJobsPerProcess), 1), $cpuCores);
        return new \PHPStan\Parallel\Schedule(min($numberOfProcesses, $this->maximumNumberOfProcesses), $jobs);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Parallel;

use Exception;
use PHPStan\ShouldNotHappenException;
use _PHPStan_dcc7b7cff\React\EventLoop\LoopInterface;
use _PHPStan_dcc7b7cff\React\EventLoop\TimerInterface;
use _PHPStan_dcc7b7cff\React\Stream\ReadableStreamInterface;
use _PHPStan_dcc7b7cff\React\Stream\WritableStreamInterface;
use Throwable;
use function fclose;
use function is_string;
use function rewind;
use function sprintf;
use function stream_get_contents;
use function tmpfile;
class Process
{
    /**
     * @var \React\ChildProcess\Process
     */
    public $process;
    /**
     * @var \React\Stream\WritableStreamInterface
     */
    private $in;
    /** @var resource */
    private $stdOut;
    /** @var resource */
    private $stdErr;
    /** @var callable(mixed[] $json) : void */
    private $onData;
    /** @var callable(Throwable $exception): void */
    private $onError;
    /**
     * @var \React\EventLoop\TimerInterface|null
     */
    private $timer;
    /**
     * @var string
     */
    private $command;
    /**
     * @var \React\EventLoop\LoopInterface
     */
    private $loop;
    /**
     * @var float
     */
    private $timeoutSeconds;
    public function __construct(string $command, LoopInterface $loop, float $timeoutSeconds)
    {
        $this->command = $command;
        $this->loop = $loop;
        $this->timeoutSeconds = $timeoutSeconds;
    }
    /**
     * @param callable(mixed[] $json) : void $onData
     * @param callable(Throwable $exception): void $onError
     * @param callable(?int $exitCode, string $output) : void $onExit
     */
    public function start(callable $onData, callable $onError, callable $onExit) : void
    {
        $tmpStdOut = tmpfile();
        if ($tmpStdOut === \false) {
            throw new ShouldNotHappenException('Failed creating temp file for stdout.');
        }
        $tmpStdErr = tmpfile();
        if ($tmpStdErr === \false) {
            throw new ShouldNotHappenException('Failed creating temp file for stderr.');
        }
        $this->stdOut = $tmpStdOut;
        $this->stdErr = $tmpStdErr;
        $this->process = new \_PHPStan_dcc7b7cff\React\ChildProcess\Process($this->command, null, null, [1 => $this->stdOut, 2 => $this->stdErr]);
        $this->process->start($this->loop);
        $this->onData = $onData;
        $this->onError = $onError;
        $this->process->on('exit', function ($exitCode) use($onExit) : void {
            $this->cancelTimer();
            $output = '';
            rewind($this->stdOut);
            $stdOut = stream_get_contents($this->stdOut);
            if (is_string($stdOut)) {
                $output .= $stdOut;
            }
            rewind($this->stdErr);
            $stdErr = stream_get_contents($this->stdErr);
            if (is_string($stdErr)) {
                $output .= $stdErr;
            }
            $onExit($exitCode, $output);
            fclose($this->stdOut);
            fclose($this->stdErr);
        });
    }
    private function cancelTimer() : void
    {
        if ($this->timer === null) {
            return;
        }
        $this->loop->cancelTimer($this->timer);
        $this->timer = null;
    }
    /**
     * @param mixed[] $data
     */
    public function request(array $data) : void
    {
        $this->cancelTimer();
        $this->in->write($data);
        $this->timer = $this->loop->addTimer($this->timeoutSeconds, function () : void {
            $onError = $this->onError;
            $onError(new Exception(sprintf('Child process timed out after %.1f seconds. Try making it longer with parallel.processTimeout setting.', $this->timeoutSeconds)));
        });
    }
    public function quit() : void
    {
        $this->cancelTimer();
        if (!$this->process->isRunning()) {
            return;
        }
        foreach ($this->process->pipes as $pipe) {
            $pipe->close();
        }
        $this->in->end();
    }
    public function bindConnection(ReadableStreamInterface $out, WritableStreamInterface $in) : void
    {
        $out->on('data', function (array $json) : void {
            $this->cancelTimer();
            if ($json['action'] !== 'result') {
                return;
            }
            $onData = $this->onData;
            $onData($json['result']);
        });
        $this->in = $in;
        $out->on('error', function (Throwable $error) : void {
            $onError = $this->onError;
            $onError($error);
        });
        $in->on('error', function (Throwable $error) : void {
            $onError = $this->onError;
            $onError($error);
        });
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Parallel;

use Closure;
use _PHPStan_dcc7b7cff\Clue\React\NDJson\Decoder;
use _PHPStan_dcc7b7cff\Clue\React\NDJson\Encoder;
use _PHPStan_dcc7b7cff\Nette\Utils\Random;
use PHPStan\Analyser\AnalyserResult;
use PHPStan\Analyser\Error;
use PHPStan\Collectors\CollectedData;
use PHPStan\Dependency\RootExportedNode;
use PHPStan\Process\ProcessHelper;
use _PHPStan_dcc7b7cff\React\EventLoop\StreamSelectLoop;
use _PHPStan_dcc7b7cff\React\Socket\ConnectionInterface;
use _PHPStan_dcc7b7cff\React\Socket\TcpServer;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\InputInterface;
use Throwable;
use function array_map;
use function array_pop;
use function array_reverse;
use function array_sum;
use function count;
use function defined;
use function is_string;
use function max;
use function memory_get_usage;
use function parse_url;
use function sprintf;
use const PHP_URL_PORT;
class ParallelAnalyser
{
    private const DEFAULT_TIMEOUT = 600.0;
    /**
     * @var float
     */
    private $processTimeout;
    /**
     * @var \PHPStan\Parallel\ProcessPool
     */
    private $processPool;
    /**
     * @var int
     */
    private $internalErrorsCountLimit;
    /**
     * @var int
     */
    private $decoderBufferSize;
    public function __construct(int $internalErrorsCountLimit, float $processTimeout, int $decoderBufferSize)
    {
        $this->internalErrorsCountLimit = $internalErrorsCountLimit;
        $this->decoderBufferSize = $decoderBufferSize;
        $this->processTimeout = max($processTimeout, self::DEFAULT_TIMEOUT);
    }
    /**
     * @param Closure(int ): void|null $postFileCallback
     */
    public function analyse(\PHPStan\Parallel\Schedule $schedule, string $mainScript, ?Closure $postFileCallback, ?string $projectConfigFile, InputInterface $input) : AnalyserResult
    {
        $jobs = array_reverse($schedule->getJobs());
        $loop = new StreamSelectLoop();
        $numberOfProcesses = $schedule->getNumberOfProcesses();
        $someChildEnded = \false;
        $errors = [];
        $peakMemoryUsages = [];
        $internalErrors = [];
        $collectedData = [];
        $server = new TcpServer('127.0.0.1:0', $loop);
        $this->processPool = new \PHPStan\Parallel\ProcessPool($server);
        $server->on('connection', function (ConnectionInterface $connection) use(&$jobs) : void {
            // phpcs:disable SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly
            $jsonInvalidUtf8Ignore = defined('JSON_INVALID_UTF8_IGNORE') ? \JSON_INVALID_UTF8_IGNORE : 0;
            // phpcs:enable
            $decoder = new Decoder($connection, \true, 512, $jsonInvalidUtf8Ignore, $this->decoderBufferSize);
            $encoder = new Encoder($connection, $jsonInvalidUtf8Ignore);
            $decoder->on('data', function (array $data) use(&$jobs, $decoder, $encoder) : void {
                if ($data['action'] !== 'hello') {
                    return;
                }
                $identifier = $data['identifier'];
                $process = $this->processPool->getProcess($identifier);
                $process->bindConnection($decoder, $encoder);
                if (count($jobs) === 0) {
                    $this->processPool->tryQuitProcess($identifier);
                    return;
                }
                $job = array_pop($jobs);
                $process->request(['action' => 'analyse', 'files' => $job]);
            });
        });
        /** @var string $serverAddress */
        $serverAddress = $server->getAddress();
        /** @var int<0, 65535> $serverPort */
        $serverPort = parse_url($serverAddress, PHP_URL_PORT);
        $internalErrorsCount = 0;
        $reachedInternalErrorsCountLimit = \false;
        $handleError = function (Throwable $error) use(&$internalErrors, &$internalErrorsCount, &$reachedInternalErrorsCountLimit) : void {
            $internalErrors[] = sprintf('Internal error: ' . $error->getMessage());
            $internalErrorsCount++;
            $reachedInternalErrorsCountLimit = \true;
            $this->processPool->quitAll();
        };
        $dependencies = [];
        $exportedNodes = [];
        for ($i = 0; $i < $numberOfProcesses; $i++) {
            if (count($jobs) === 0) {
                break;
            }
            $processIdentifier = Random::generate();
            $commandOptions = ['--port', (string) $serverPort, '--identifier', $processIdentifier];
            $process = new \PHPStan\Parallel\Process(ProcessHelper::getWorkerCommand($mainScript, 'worker', $projectConfigFile, $commandOptions, $input), $loop, $this->processTimeout);
            $process->start(function (array $json) use($process, &$internalErrors, &$errors, &$collectedData, &$dependencies, &$exportedNodes, &$peakMemoryUsages, &$jobs, $postFileCallback, &$internalErrorsCount, &$reachedInternalErrorsCountLimit, $processIdentifier) : void {
                foreach ($json['errors'] as $jsonError) {
                    if (is_string($jsonError)) {
                        $internalErrors[] = sprintf('Internal error: %s', $jsonError);
                        continue;
                    }
                    $errors[] = Error::decode($jsonError);
                }
                foreach ($json['collectedData'] as $jsonData) {
                    $collectedData[] = CollectedData::decode($jsonData);
                }
                /**
                 * @var string $file
                 * @var array<string> $fileDependencies
                 */
                foreach ($json['dependencies'] as $file => $fileDependencies) {
                    $dependencies[$file] = $fileDependencies;
                }
                /**
                 * @var string $file
                 * @var array<mixed[]> $fileExportedNodes
                 */
                foreach ($json['exportedNodes'] as $file => $fileExportedNodes) {
                    if (count($fileExportedNodes) === 0) {
                        continue;
                    }
                    $exportedNodes[$file] = array_map(static function (array $node) : RootExportedNode {
                        $class = $node['type'];
                        return $class::decode($node['data']);
                    }, $fileExportedNodes);
                }
                if ($postFileCallback !== null) {
                    $postFileCallback($json['filesCount']);
                }
                if (!isset($peakMemoryUsages[$processIdentifier]) || $peakMemoryUsages[$processIdentifier] < $json['memoryUsage']) {
                    $peakMemoryUsages[$processIdentifier] = $json['memoryUsage'];
                }
                $internalErrorsCount += $json['internalErrorsCount'];
                if ($internalErrorsCount >= $this->internalErrorsCountLimit) {
                    $reachedInternalErrorsCountLimit = \true;
                    $this->processPool->quitAll();
                }
                if (count($jobs) === 0) {
                    $this->processPool->tryQuitProcess($processIdentifier);
                    return;
                }
                $job = array_pop($jobs);
                $process->request(['action' => 'analyse', 'files' => $job]);
            }, $handleError, function ($exitCode, string $output) use(&$someChildEnded, &$peakMemoryUsages, &$internalErrors, &$internalErrorsCount, $processIdentifier) : void {
                if ($someChildEnded === \false) {
                    $peakMemoryUsages['main'] = memory_get_usage(\true);
                }
                $someChildEnded = \true;
                $this->processPool->tryQuitProcess($processIdentifier);
                if ($exitCode === 0) {
                    return;
                }
                if ($exitCode === null) {
                    return;
                }
                $internalErrors[] = sprintf('Child process error (exit code %d): %s', $exitCode, $output);
                $internalErrorsCount++;
            });
            $this->processPool->attachProcess($processIdentifier, $process);
        }
        $loop->run();
        if (count($jobs) > 0 && $internalErrorsCount === 0) {
            $internalErrors[] = 'Some parallel worker jobs have not finished.';
            $internalErrorsCount++;
        }
        return new AnalyserResult($errors, $internalErrors, $collectedData, $internalErrorsCount === 0 ? $dependencies : null, $exportedNodes, $reachedInternalErrorsCountLimit, (int) array_sum($peakMemoryUsages));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Parallel;

use PHPStan\ShouldNotHappenException;
use _PHPStan_dcc7b7cff\React\Socket\TcpServer;
use function array_key_exists;
use function array_keys;
use function count;
use function sprintf;
class ProcessPool
{
    /** @var array<string, Process> */
    private $processes = [];
    /**
     * @var \React\Socket\TcpServer
     */
    private $server;
    public function __construct(TcpServer $server)
    {
        $this->server = $server;
    }
    public function getProcess(string $identifier) : \PHPStan\Parallel\Process
    {
        if (!array_key_exists($identifier, $this->processes)) {
            throw new ShouldNotHappenException(sprintf('Process %s not found.', $identifier));
        }
        return $this->processes[$identifier];
    }
    public function attachProcess(string $identifier, \PHPStan\Parallel\Process $process) : void
    {
        $this->processes[$identifier] = $process;
    }
    public function tryQuitProcess(string $identifier) : void
    {
        if (!array_key_exists($identifier, $this->processes)) {
            return;
        }
        $this->quitProcess($identifier);
    }
    private function quitProcess(string $identifier) : void
    {
        $process = $this->getProcess($identifier);
        $process->quit();
        unset($this->processes[$identifier]);
        if (count($this->processes) !== 0) {
            return;
        }
        $this->server->close();
    }
    public function quitAll() : void
    {
        foreach (array_keys($this->processes) as $identifier) {
            $this->quitProcess($identifier);
        }
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Parallel;

class Schedule
{
    /**
     * @var int
     */
    private $numberOfProcesses;
    /**
     * @var array<array<string>>
     */
    private $jobs;
    /**
     * @param array<array<string>> $jobs
     */
    public function __construct(int $numberOfProcesses, array $jobs)
    {
        $this->numberOfProcesses = $numberOfProcesses;
        $this->jobs = $jobs;
    }
    public function getNumberOfProcesses() : int
    {
        return $this->numberOfProcesses;
    }
    /**
     * @return array<array<string>>
     */
    public function getJobs() : array
    {
        return $this->jobs;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\File;

use PHPStan\ShouldNotHappenException;
use function array_fill;
use function array_merge;
use function array_slice;
use function count;
use function explode;
use function implode;
use function str_replace;
use function strpos;
use function substr;
use function trim;
class ParentDirectoryRelativePathHelper implements \PHPStan\File\RelativePathHelper
{
    /**
     * @var string
     */
    private $parentDirectory;
    public function __construct(string $parentDirectory)
    {
        $this->parentDirectory = $parentDirectory;
    }
    public function getRelativePath(string $filename) : string
    {
        return implode('/', $this->getFilenameParts($filename));
    }
    /**
     * @return string[]
     */
    public function getFilenameParts(string $filename) : array
    {
        $schemePosition = strpos($filename, '://');
        if ($schemePosition !== \false) {
            $filename = substr($filename, $schemePosition + 3);
        }
        $parentParts = explode('/', trim(str_replace('\\', '/', $this->parentDirectory), '/'));
        $parentPartsCount = count($parentParts);
        $filenameParts = explode('/', trim(str_replace('\\', '/', $filename), '/'));
        $filenamePartsCount = count($filenameParts);
        $i = 0;
        for (; $i < $filenamePartsCount; $i++) {
            if ($parentPartsCount < $i + 1) {
                break;
            }
            $parentPath = implode('/', array_slice($parentParts, 0, $i + 1));
            $filenamePath = implode('/', array_slice($filenameParts, 0, $i + 1));
            if ($parentPath !== $filenamePath) {
                break;
            }
        }
        if ($i === 0) {
            return [$filename];
        }
        $dotsCount = $parentPartsCount - $i;
        if ($dotsCount < 0) {
            throw new ShouldNotHappenException();
        }
        return array_merge(array_fill(0, $dotsCount, '..'), array_slice($filenameParts, $i));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\File;

use _PHPStan_dcc7b7cff\Symfony\Component\Finder\Finder;
use function array_filter;
use function array_values;
use function file_exists;
use function implode;
use function is_file;
class FileFinder
{
    /**
     * @var \PHPStan\File\FileExcluder
     */
    private $fileExcluder;
    /**
     * @var \PHPStan\File\FileHelper
     */
    private $fileHelper;
    /**
     * @var string[]
     */
    private $fileExtensions;
    /**
     * @param string[] $fileExtensions
     */
    public function __construct(\PHPStan\File\FileExcluder $fileExcluder, \PHPStan\File\FileHelper $fileHelper, array $fileExtensions)
    {
        $this->fileExcluder = $fileExcluder;
        $this->fileHelper = $fileHelper;
        $this->fileExtensions = $fileExtensions;
    }
    /**
     * @param string[] $paths
     */
    public function findFiles(array $paths) : \PHPStan\File\FileFinderResult
    {
        $onlyFiles = \true;
        $files = [];
        foreach ($paths as $path) {
            if (is_file($path)) {
                $files[] = $this->fileHelper->normalizePath($path);
            } elseif (!file_exists($path)) {
                throw new \PHPStan\File\PathNotFoundException($path);
            } else {
                $finder = new Finder();
                $finder->followLinks();
                foreach ($finder->files()->name('*.{' . implode(',', $this->fileExtensions) . '}')->in($path) as $fileInfo) {
                    $files[] = $this->fileHelper->normalizePath($fileInfo->getPathname());
                    $onlyFiles = \false;
                }
            }
        }
        $files = array_values(array_filter($files, function (string $file) : bool {
            return !$this->fileExcluder->isExcludedFromAnalysing($file);
        }));
        return new \PHPStan\File\FileFinderResult($files, $onlyFiles);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\File;

interface FileExcluderRawFactory
{
    /**
     * @param string[] $analyseExcludes
     */
    public function create(array $analyseExcludes) : \PHPStan\File\FileExcluder;
}
<?php

declare (strict_types=1);
namespace PHPStan\File;

use function str_replace;
use function strlen;
use function strpos;
use function substr;
class SimpleRelativePathHelper implements \PHPStan\File\RelativePathHelper
{
    /**
     * @var string
     */
    private $currentWorkingDirectory;
    public function __construct(string $currentWorkingDirectory)
    {
        $this->currentWorkingDirectory = $currentWorkingDirectory;
    }
    public function getRelativePath(string $filename) : string
    {
        if ($this->currentWorkingDirectory !== '' && strpos($filename, $this->currentWorkingDirectory) === 0) {
            return str_replace('\\', '/', substr($filename, strlen($this->currentWorkingDirectory) + 1));
        }
        return str_replace('\\', '/', $filename);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\File;

use _PHPStan_dcc7b7cff\Nette\Utils\Strings;
use function array_pop;
use function explode;
use function implode;
use function ltrim;
use function rtrim;
use function str_replace;
use function str_starts_with;
use function strlen;
use function strpos;
use function substr;
use function trim;
use const DIRECTORY_SEPARATOR;
class FileHelper
{
    /**
     * @var string
     */
    private $workingDirectory;
    public function __construct(string $workingDirectory)
    {
        $this->workingDirectory = $this->normalizePath($workingDirectory);
    }
    public function getWorkingDirectory() : string
    {
        return $this->workingDirectory;
    }
    /** @api */
    public function absolutizePath(string $path) : string
    {
        if (DIRECTORY_SEPARATOR === '/') {
            if (substr($path, 0, 1) === '/') {
                return $path;
            }
        } else {
            if (substr($path, 1, 1) === ':') {
                return $path;
            }
        }
        if (str_starts_with($path, 'phar://')) {
            return $path;
        }
        return rtrim($this->getWorkingDirectory(), '/\\') . DIRECTORY_SEPARATOR . ltrim($path, '/\\');
    }
    /** @api */
    public function normalizePath(string $originalPath, string $directorySeparator = DIRECTORY_SEPARATOR) : string
    {
        $isLocalPath = \false;
        if ($originalPath !== '') {
            if ($originalPath[0] === '/') {
                $isLocalPath = \true;
            } elseif (strlen($originalPath) >= 3 && $originalPath[1] === ':' && $originalPath[2] === '\\') {
                // e.g. C:\
                $isLocalPath = \true;
            }
        }
        $matches = null;
        if (!$isLocalPath) {
            $matches = Strings::match($originalPath, '~^([a-z]+)\\:\\/\\/(.+)~');
        }
        if ($matches !== null) {
            [, $scheme, $path] = $matches;
        } else {
            $scheme = null;
            $path = $originalPath;
        }
        $path = str_replace(['\\', '//', '///', '////'], '/', $path);
        $pathRoot = strpos($path, '/') === 0 ? $directorySeparator : '';
        $pathParts = explode('/', trim($path, '/'));
        $normalizedPathParts = [];
        foreach ($pathParts as $pathPart) {
            if ($pathPart === '.') {
                continue;
            }
            if ($pathPart === '..') {
                /** @var string $removedPart */
                $removedPart = array_pop($normalizedPathParts);
                if ($scheme === 'phar' && substr($removedPart, -5) === '.phar') {
                    $scheme = null;
                }
            } else {
                $normalizedPathParts[] = $pathPart;
            }
        }
        return ($scheme !== null ? $scheme . '://' : '') . $pathRoot . implode($directorySeparator, $normalizedPathParts);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\File;

use function count;
class FileMonitorResult
{
    /**
     * @var string[]
     */
    private $newFiles;
    /**
     * @var string[]
     */
    private $changedFiles;
    /**
     * @var string[]
     */
    private $deletedFiles;
    /**
     * @var int
     */
    private $totalFilesCount;
    /**
     * @param string[] $newFiles
     * @param string[] $changedFiles
     * @param string[] $deletedFiles
     */
    public function __construct(array $newFiles, array $changedFiles, array $deletedFiles, int $totalFilesCount)
    {
        $this->newFiles = $newFiles;
        $this->changedFiles = $changedFiles;
        $this->deletedFiles = $deletedFiles;
        $this->totalFilesCount = $totalFilesCount;
    }
    public function hasAnyChanges() : bool
    {
        return count($this->newFiles) > 0 || count($this->changedFiles) > 0 || count($this->deletedFiles) > 0;
    }
    public function getTotalFilesCount() : int
    {
        return $this->totalFilesCount;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\File;

use function error_get_last;
use function file_put_contents;
class FileWriter
{
    public static function write(string $fileName, string $contents) : void
    {
        $success = @file_put_contents($fileName, $contents);
        if ($success === \false) {
            $error = error_get_last();
            throw new \PHPStan\File\CouldNotWriteFileException($fileName, $error !== null ? $error['message'] : 'unknown cause');
        }
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\File;

/** @api */
interface RelativePathHelper
{
    public function getRelativePath(string $filename) : string;
}
<?php

declare (strict_types=1);
namespace PHPStan\File;

use PHPStan\AnalysedCodeException;
use function sprintf;
class CouldNotWriteFileException extends AnalysedCodeException
{
    public function __construct(string $fileName, string $error)
    {
        parent::__construct(sprintf('Could not write file: %s (%s)', $fileName, $error));
    }
    public function getTip() : ?string
    {
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\File;

use PHPStan\AnalysedCodeException;
use function sprintf;
class CouldNotReadFileException extends AnalysedCodeException
{
    public function __construct(string $fileName)
    {
        parent::__construct(sprintf('Could not read file: %s', $fileName));
    }
    public function getTip() : ?string
    {
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\File;

class FileFinderResult
{
    /**
     * @var string[]
     */
    private $files;
    /**
     * @var bool
     */
    private $onlyFiles;
    /**
     * @param string[] $files
     */
    public function __construct(array $files, bool $onlyFiles)
    {
        $this->files = $files;
        $this->onlyFiles = $onlyFiles;
    }
    /**
     * @return string[]
     */
    public function getFiles() : array
    {
        return $this->files;
    }
    public function isOnlyFiles() : bool
    {
        return $this->onlyFiles;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\File;

use function count;
use function explode;
use function implode;
use function in_array;
use function ltrim;
use function realpath;
use function str_ends_with;
use function strlen;
use function strpos;
use function substr;
use const DIRECTORY_SEPARATOR;
class FuzzyRelativePathHelper implements \PHPStan\File\RelativePathHelper
{
    /**
     * @var string
     */
    private $directorySeparator;
    /**
     * @var string|null
     */
    private $pathToTrim;
    /**
     * @var \PHPStan\File\RelativePathHelper
     */
    private $fallbackRelativePathHelper;
    /**
     * @param string[] $analysedPaths
     * @param non-empty-string|null $directorySeparator
     */
    public function __construct(\PHPStan\File\RelativePathHelper $fallbackRelativePathHelper, string $currentWorkingDirectory, array $analysedPaths, ?string $directorySeparator = null)
    {
        $this->fallbackRelativePathHelper = $fallbackRelativePathHelper;
        if ($directorySeparator === null) {
            $directorySeparator = DIRECTORY_SEPARATOR;
        }
        $this->directorySeparator = $directorySeparator;
        $pathBeginning = null;
        $pathToTrimArray = null;
        $trimBeginning = static function (string $path) : array {
            if (substr($path, 0, 1) === '/') {
                return ['/', substr($path, 1)];
            } elseif (substr($path, 1, 1) === ':') {
                return [substr($path, 0, 3), substr($path, 3)];
            }
            return ['', $path];
        };
        if (!in_array($currentWorkingDirectory, ['', '/'], \true) && !(strlen($currentWorkingDirectory) === 3 && substr($currentWorkingDirectory, 1, 1) === ':')) {
            [$pathBeginning, $currentWorkingDirectory] = $trimBeginning($currentWorkingDirectory);
            $pathToTrimArray = explode($directorySeparator, $currentWorkingDirectory);
        }
        foreach ($analysedPaths as $pathNumber => $path) {
            [$tempPathBeginning, $path] = $trimBeginning($path);
            $pathArray = explode($directorySeparator, $path);
            $pathTempParts = [];
            $pathArraySize = count($pathArray);
            foreach ($pathArray as $i => $pathPart) {
                if ($i === $pathArraySize - 1 && str_ends_with($pathPart, '.php')) {
                    continue;
                }
                if (!isset($pathToTrimArray[$i])) {
                    if ($pathNumber !== 0) {
                        $pathToTrimArray = $pathTempParts;
                        continue 2;
                    }
                } elseif ($pathToTrimArray[$i] !== $pathPart) {
                    $pathToTrimArray = $pathTempParts;
                    continue 2;
                }
                $pathTempParts[] = $pathPart;
            }
            $pathBeginning = $tempPathBeginning;
            $pathToTrimArray = $pathTempParts;
        }
        if ($pathToTrimArray === null || count($pathToTrimArray) === 0) {
            return;
        }
        $pathToTrim = $pathBeginning . implode($directorySeparator, $pathToTrimArray);
        $realPathToTrim = realpath($pathToTrim);
        if ($realPathToTrim !== \false) {
            $pathToTrim = $realPathToTrim;
        }
        $this->pathToTrim = $pathToTrim;
    }
    public function getRelativePath(string $filename) : string
    {
        if ($this->pathToTrim !== null && strpos($filename, $this->pathToTrim) === 0) {
            return ltrim(substr($filename, strlen($this->pathToTrim)), $this->directorySeparator);
        }
        return $this->fallbackRelativePathHelper->getRelativePath($filename);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\File;

class NullRelativePathHelper implements \PHPStan\File\RelativePathHelper
{
    public function getRelativePath(string $filename) : string
    {
        return $filename;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\File;

use Exception;
use function sprintf;
class PathNotFoundException extends Exception
{
    /**
     * @var string
     */
    private $path;
    public function __construct(string $path)
    {
        $this->path = $path;
        parent::__construct(sprintf('Path %s does not exist', $path));
    }
    public function getPath() : string
    {
        return $this->path;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\File;

use function file_get_contents;
use function stream_resolve_include_path;
class FileReader
{
    /**
     * @throws CouldNotReadFileException
     */
    public static function read(string $fileName) : string
    {
        $path = $fileName;
        $contents = @file_get_contents($path);
        if ($contents === \false) {
            $path = stream_resolve_include_path($fileName);
            if ($path === \false) {
                throw new \PHPStan\File\CouldNotReadFileException($fileName);
            }
            $contents = @file_get_contents($path);
        }
        if ($contents === \false) {
            throw new \PHPStan\File\CouldNotReadFileException($fileName);
        }
        return $contents;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\File;

use function fnmatch;
use function in_array;
use function preg_match;
use function strlen;
use function strpos;
use const DIRECTORY_SEPARATOR;
use const FNM_CASEFOLD;
use const FNM_NOESCAPE;
class FileExcluder
{
    /**
     * Directories to exclude from analysing
     *
     * @var string[]
     */
    private $literalAnalyseExcludes = [];
    /**
     * fnmatch() patterns to use for excluding files and directories from analysing
     * @var string[]
     */
    private $fnmatchAnalyseExcludes = [];
    /**
     * @var int
     */
    private $fnmatchFlags;
    /**
     * @param string[] $analyseExcludes
     */
    public function __construct(\PHPStan\File\FileHelper $fileHelper, array $analyseExcludes)
    {
        foreach ($analyseExcludes as $exclude) {
            $len = strlen($exclude);
            $trailingDirSeparator = $len > 0 && in_array($exclude[$len - 1], ['\\', '/'], \true);
            $normalized = $fileHelper->normalizePath($exclude);
            if ($trailingDirSeparator) {
                $normalized .= DIRECTORY_SEPARATOR;
            }
            if ($this->isFnmatchPattern($normalized)) {
                $this->fnmatchAnalyseExcludes[] = $normalized;
            } else {
                $this->literalAnalyseExcludes[] = $fileHelper->absolutizePath($normalized);
            }
        }
        $isWindows = DIRECTORY_SEPARATOR === '\\';
        if ($isWindows) {
            $this->fnmatchFlags = FNM_NOESCAPE | FNM_CASEFOLD;
        } else {
            $this->fnmatchFlags = 0;
        }
    }
    public function isExcludedFromAnalysing(string $file) : bool
    {
        foreach ($this->literalAnalyseExcludes as $exclude) {
            if (strpos($file, $exclude) === 0) {
                return \true;
            }
        }
        foreach ($this->fnmatchAnalyseExcludes as $exclude) {
            if (fnmatch($exclude, $file, $this->fnmatchFlags)) {
                return \true;
            }
        }
        return \false;
    }
    private function isFnmatchPattern(string $path) : bool
    {
        return preg_match('~[*?[\\]]~', $path) > 0;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\File;

use PHPStan\ShouldNotHappenException;
use function array_key_exists;
use function array_keys;
use function count;
use function sha1;
class FileMonitor
{
    /** @var array<string, string>|null */
    private $fileHashes;
    /** @var array<string>|null */
    private $paths;
    /**
     * @var \PHPStan\File\FileFinder
     */
    private $fileFinder;
    public function __construct(\PHPStan\File\FileFinder $fileFinder)
    {
        $this->fileFinder = $fileFinder;
    }
    /**
     * @param array<string> $paths
     */
    public function initialize(array $paths) : void
    {
        $finderResult = $this->fileFinder->findFiles($paths);
        $fileHashes = [];
        foreach ($finderResult->getFiles() as $filePath) {
            $fileHashes[$filePath] = $this->getFileHash($filePath);
        }
        $this->fileHashes = $fileHashes;
        $this->paths = $paths;
    }
    public function getChanges() : \PHPStan\File\FileMonitorResult
    {
        if ($this->fileHashes === null || $this->paths === null) {
            throw new ShouldNotHappenException();
        }
        $finderResult = $this->fileFinder->findFiles($this->paths);
        $oldFileHashes = $this->fileHashes;
        $fileHashes = [];
        $newFiles = [];
        $changedFiles = [];
        $deletedFiles = [];
        foreach ($finderResult->getFiles() as $filePath) {
            if (!array_key_exists($filePath, $oldFileHashes)) {
                $newFiles[] = $filePath;
                $fileHashes[$filePath] = $this->getFileHash($filePath);
                continue;
            }
            $oldHash = $oldFileHashes[$filePath];
            unset($oldFileHashes[$filePath]);
            $newHash = $this->getFileHash($filePath);
            $fileHashes[$filePath] = $newHash;
            if ($oldHash === $newHash) {
                continue;
            }
            $changedFiles[] = $filePath;
        }
        $this->fileHashes = $fileHashes;
        foreach (array_keys($oldFileHashes) as $file) {
            $deletedFiles[] = $file;
        }
        return new \PHPStan\File\FileMonitorResult($newFiles, $changedFiles, $deletedFiles, count($fileHashes));
    }
    private function getFileHash(string $filePath) : string
    {
        return sha1(\PHPStan\File\FileReader::read($filePath));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\File;

use function array_key_exists;
use function array_merge;
use function array_unique;
use function array_values;
class FileExcluderFactory
{
    /**
     * @var \PHPStan\File\FileExcluderRawFactory
     */
    private $fileExcluderRawFactory;
    /**
     * @var string[]
     */
    private $obsoleteExcludesAnalyse;
    /**
     * @var array{analyse?: array<int, string>, analyseAndScan?: array<int, string>}|null
     */
    private $excludePaths;
    /**
     * @param string[] $obsoleteExcludesAnalyse
     * @param array{analyse?: array<int, string>, analyseAndScan?: array<int, string>}|null $excludePaths
     */
    public function __construct(\PHPStan\File\FileExcluderRawFactory $fileExcluderRawFactory, array $obsoleteExcludesAnalyse, ?array $excludePaths)
    {
        $this->fileExcluderRawFactory = $fileExcluderRawFactory;
        $this->obsoleteExcludesAnalyse = $obsoleteExcludesAnalyse;
        $this->excludePaths = $excludePaths;
    }
    public function createAnalyseFileExcluder() : \PHPStan\File\FileExcluder
    {
        if ($this->excludePaths === null) {
            return $this->fileExcluderRawFactory->create($this->obsoleteExcludesAnalyse);
        }
        $paths = [];
        if (array_key_exists('analyse', $this->excludePaths)) {
            $paths = $this->excludePaths['analyse'];
        }
        if (array_key_exists('analyseAndScan', $this->excludePaths)) {
            $paths = array_merge($paths, $this->excludePaths['analyseAndScan']);
        }
        return $this->fileExcluderRawFactory->create(array_values(array_unique($paths)));
    }
    public function createScanFileExcluder() : \PHPStan\File\FileExcluder
    {
        if ($this->excludePaths === null) {
            return $this->fileExcluderRawFactory->create($this->obsoleteExcludesAnalyse);
        }
        $paths = [];
        if (array_key_exists('analyseAndScan', $this->excludePaths)) {
            $paths = $this->excludePaths['analyseAndScan'];
        }
        return $this->fileExcluderRawFactory->create(array_values(array_unique($paths)));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PHPStan\Type\Type;
/** @api */
class EnumCaseReflection
{
    /**
     * @var \PHPStan\Reflection\ClassReflection
     */
    private $declaringEnum;
    /**
     * @var string
     */
    private $name;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $backingValueType;
    public function __construct(\PHPStan\Reflection\ClassReflection $declaringEnum, string $name, ?Type $backingValueType)
    {
        $this->declaringEnum = $declaringEnum;
        $this->name = $name;
        $this->backingValueType = $backingValueType;
    }
    public function getDeclaringEnum() : \PHPStan\Reflection\ClassReflection
    {
        return $this->declaringEnum;
    }
    public function getName() : string
    {
        return $this->name;
    }
    public function getBackingValueType() : ?Type
    {
        return $this->backingValueType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PHPStan\Broker\Broker;
use function array_merge;
class ClassReflectionExtensionRegistry
{
    /**
     * @var PropertiesClassReflectionExtension[]
     */
    private $propertiesClassReflectionExtensions;
    /**
     * @var MethodsClassReflectionExtension[]
     */
    private $methodsClassReflectionExtensions;
    /**
     * @var AllowedSubTypesClassReflectionExtension[]
     */
    private $allowedSubTypesClassReflectionExtensions;
    /**
     * @param PropertiesClassReflectionExtension[] $propertiesClassReflectionExtensions
     * @param MethodsClassReflectionExtension[] $methodsClassReflectionExtensions
     * @param AllowedSubTypesClassReflectionExtension[] $allowedSubTypesClassReflectionExtensions
     */
    public function __construct(Broker $broker, array $propertiesClassReflectionExtensions, array $methodsClassReflectionExtensions, array $allowedSubTypesClassReflectionExtensions)
    {
        $this->propertiesClassReflectionExtensions = $propertiesClassReflectionExtensions;
        $this->methodsClassReflectionExtensions = $methodsClassReflectionExtensions;
        $this->allowedSubTypesClassReflectionExtensions = $allowedSubTypesClassReflectionExtensions;
        foreach (array_merge($propertiesClassReflectionExtensions, $methodsClassReflectionExtensions, $allowedSubTypesClassReflectionExtensions) as $extension) {
            if (!$extension instanceof \PHPStan\Reflection\BrokerAwareExtension) {
                continue;
            }
            $extension->setBroker($broker);
        }
    }
    /**
     * @return PropertiesClassReflectionExtension[]
     */
    public function getPropertiesClassReflectionExtensions() : array
    {
        return $this->propertiesClassReflectionExtensions;
    }
    /**
     * @return MethodsClassReflectionExtension[]
     */
    public function getMethodsClassReflectionExtensions() : array
    {
        return $this->methodsClassReflectionExtensions;
    }
    /**
     * @return AllowedSubTypesClassReflectionExtension[]
     */
    public function getAllowedSubTypesClassReflectionExtensions() : array
    {
        return $this->allowedSubTypesClassReflectionExtensions;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use Exception;
use function sprintf;
class MissingMethodFromReflectionException extends Exception
{
    public function __construct(string $className, string $methodName)
    {
        parent::__construct(sprintf('Method %s() was not found in reflection of class %s.', $methodName, $className));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\Type;
/** @api */
class FunctionVariant implements \PHPStan\Reflection\ParametersAcceptor
{
    /**
     * @var \PHPStan\Type\Generic\TemplateTypeMap
     */
    private $templateTypeMap;
    /**
     * @var \PHPStan\Type\Generic\TemplateTypeMap|null
     */
    private $resolvedTemplateTypeMap;
    /**
     * @var array<int, ParameterReflection>
     */
    private $parameters;
    /**
     * @var bool
     */
    private $isVariadic;
    /**
     * @var \PHPStan\Type\Type
     */
    private $returnType;
    /**
     * @api
     * @param array<int, ParameterReflection> $parameters
     */
    public function __construct(TemplateTypeMap $templateTypeMap, ?TemplateTypeMap $resolvedTemplateTypeMap, array $parameters, bool $isVariadic, Type $returnType)
    {
        $this->templateTypeMap = $templateTypeMap;
        $this->resolvedTemplateTypeMap = $resolvedTemplateTypeMap;
        $this->parameters = $parameters;
        $this->isVariadic = $isVariadic;
        $this->returnType = $returnType;
    }
    public function getTemplateTypeMap() : TemplateTypeMap
    {
        return $this->templateTypeMap;
    }
    public function getResolvedTemplateTypeMap() : TemplateTypeMap
    {
        return $this->resolvedTemplateTypeMap ?? TemplateTypeMap::createEmpty();
    }
    /**
     * @return array<int, ParameterReflection>
     */
    public function getParameters() : array
    {
        return $this->parameters;
    }
    public function isVariadic() : bool
    {
        return $this->isVariadic;
    }
    public function getReturnType() : Type
    {
        return $this->returnType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PHPStan\Reflection\Php\DummyParameterWithPhpDocs;
use PHPStan\Type\ConditionalTypeForParameter;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Generic\TemplateType;
use PHPStan\Type\Generic\TemplateTypeHelper;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\Type;
use PHPStan\Type\TypeTraverser;
use PHPStan\Type\TypeUtils;
use function array_key_exists;
use function array_map;
class ResolvedFunctionVariant implements \PHPStan\Reflection\ParametersAcceptorWithPhpDocs
{
    /** @var ParameterReflectionWithPhpDocs[]|null */
    private $parameters;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $returnTypeWithUnresolvableTemplateTypes;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $phpDocReturnTypeWithUnresolvableTemplateTypes;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $returnType;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $phpDocReturnType;
    /**
     * @var \PHPStan\Reflection\ParametersAcceptorWithPhpDocs
     */
    private $parametersAcceptor;
    /**
     * @var \PHPStan\Type\Generic\TemplateTypeMap
     */
    private $resolvedTemplateTypeMap;
    /**
     * @var array<string, Type>
     */
    private $passedArgs;
    /**
     * @param array<string, Type> $passedArgs
     */
    public function __construct(\PHPStan\Reflection\ParametersAcceptorWithPhpDocs $parametersAcceptor, TemplateTypeMap $resolvedTemplateTypeMap, array $passedArgs)
    {
        $this->parametersAcceptor = $parametersAcceptor;
        $this->resolvedTemplateTypeMap = $resolvedTemplateTypeMap;
        $this->passedArgs = $passedArgs;
    }
    public function getOriginalParametersAcceptor() : \PHPStan\Reflection\ParametersAcceptor
    {
        return $this->parametersAcceptor;
    }
    public function getTemplateTypeMap() : TemplateTypeMap
    {
        return $this->parametersAcceptor->getTemplateTypeMap();
    }
    public function getResolvedTemplateTypeMap() : TemplateTypeMap
    {
        return $this->resolvedTemplateTypeMap;
    }
    public function getParameters() : array
    {
        $parameters = $this->parameters;
        if ($parameters === null) {
            $parameters = array_map(function (\PHPStan\Reflection\ParameterReflectionWithPhpDocs $param) : \PHPStan\Reflection\ParameterReflectionWithPhpDocs {
                $paramType = TypeUtils::resolveLateResolvableTypes(TemplateTypeHelper::resolveTemplateTypes($this->resolveConditionalTypesForParameter($param->getType()), $this->resolvedTemplateTypeMap), \false);
                return new DummyParameterWithPhpDocs($param->getName(), $paramType, $param->isOptional(), $param->passedByReference(), $param->isVariadic(), $param->getDefaultValue(), $param->getNativeType(), $param->getPhpDocType(), $param->getOutType());
            }, $this->parametersAcceptor->getParameters());
            $this->parameters = $parameters;
        }
        return $parameters;
    }
    public function isVariadic() : bool
    {
        return $this->parametersAcceptor->isVariadic();
    }
    public function getReturnTypeWithUnresolvableTemplateTypes() : Type
    {
        return $this->returnTypeWithUnresolvableTemplateTypes = $this->returnTypeWithUnresolvableTemplateTypes ?? $this->resolveConditionalTypesForParameter($this->resolveResolvableTemplateTypes($this->parametersAcceptor->getReturnType()));
    }
    public function getPhpDocReturnTypeWithUnresolvableTemplateTypes() : Type
    {
        return $this->phpDocReturnTypeWithUnresolvableTemplateTypes = $this->phpDocReturnTypeWithUnresolvableTemplateTypes ?? $this->resolveConditionalTypesForParameter($this->resolveResolvableTemplateTypes($this->parametersAcceptor->getPhpDocReturnType()));
    }
    public function getReturnType() : Type
    {
        $type = $this->returnType;
        if ($type === null) {
            $type = TypeUtils::resolveLateResolvableTypes(TemplateTypeHelper::resolveTemplateTypes($this->getReturnTypeWithUnresolvableTemplateTypes(), $this->resolvedTemplateTypeMap), \false);
            $this->returnType = $type;
        }
        return $type;
    }
    public function getPhpDocReturnType() : Type
    {
        $type = $this->phpDocReturnType;
        if ($type === null) {
            $type = TypeUtils::resolveLateResolvableTypes(TemplateTypeHelper::resolveTemplateTypes($this->getPhpDocReturnTypeWithUnresolvableTemplateTypes(), $this->resolvedTemplateTypeMap), \false);
            $this->phpDocReturnType = $type;
        }
        return $type;
    }
    public function getNativeReturnType() : Type
    {
        return $this->parametersAcceptor->getNativeReturnType();
    }
    private function resolveResolvableTemplateTypes(Type $type) : Type
    {
        return TypeTraverser::map($type, function (Type $type, callable $traverse) : Type {
            if ($type instanceof TemplateType && !$type->isArgument()) {
                $newType = $this->resolvedTemplateTypeMap->getType($type->getName());
                if ($newType !== null && !$newType instanceof ErrorType) {
                    return $newType;
                }
            }
            return $traverse($type);
        });
    }
    private function resolveConditionalTypesForParameter(Type $type) : Type
    {
        return TypeTraverser::map($type, function (Type $type, callable $traverse) : Type {
            if ($type instanceof ConditionalTypeForParameter && array_key_exists($type->getParameterName(), $this->passedArgs)) {
                $type = $type->toConditional($this->passedArgs[$type->getParameterName()]);
            }
            return $traverse($type);
        });
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PHPStan\PhpDoc\ResolvedPhpDocBlock;
use PHPStan\PhpDoc\Tag\AssertTag;
use PHPStan\Type\Type;
use function array_filter;
use function array_map;
use function array_merge;
use function count;
/**
 * @api
 */
class Assertions
{
    /**
     * @var \PHPStan\Reflection\Assertions|null
     */
    private static $empty;
    /**
     * @var AssertTag[]
     */
    private $asserts;
    /**
     * @param AssertTag[] $asserts
     */
    private function __construct(array $asserts)
    {
        $this->asserts = $asserts;
    }
    /**
     * @return AssertTag[]
     */
    public function getAll() : array
    {
        return $this->asserts;
    }
    /**
     * @return AssertTag[]
     */
    public function getAsserts() : array
    {
        return array_filter($this->asserts, static function (AssertTag $assert) {
            return $assert->getIf() === AssertTag::NULL;
        });
    }
    /**
     * @return AssertTag[]
     */
    public function getAssertsIfTrue() : array
    {
        return array_merge(array_filter($this->asserts, static function (AssertTag $assert) {
            return $assert->getIf() === AssertTag::IF_TRUE;
        }), array_map(static function (AssertTag $assert) {
            return $assert->negate();
        }, array_filter($this->asserts, static function (AssertTag $assert) {
            return $assert->getIf() === AssertTag::IF_FALSE && !$assert->isEquality();
        })));
    }
    /**
     * @return AssertTag[]
     */
    public function getAssertsIfFalse() : array
    {
        return array_merge(array_filter($this->asserts, static function (AssertTag $assert) {
            return $assert->getIf() === AssertTag::IF_FALSE;
        }), array_map(static function (AssertTag $assert) {
            return $assert->negate();
        }, array_filter($this->asserts, static function (AssertTag $assert) {
            return $assert->getIf() === AssertTag::IF_TRUE && !$assert->isEquality();
        })));
    }
    /**
     * @param callable(Type): Type $callable
     */
    public function mapTypes(callable $callable) : self
    {
        $assertTagsCallback = static function (AssertTag $tag) use($callable) : AssertTag {
            return $tag->withType($callable($tag->getType()));
        };
        return new self(array_map($assertTagsCallback, $this->asserts));
    }
    public function intersectWith(\PHPStan\Reflection\Assertions $other) : self
    {
        return new self(array_merge($this->getAll(), $other->getAll()));
    }
    public static function createEmpty() : self
    {
        $empty = self::$empty;
        if ($empty !== null) {
            return $empty;
        }
        $empty = new self([]);
        self::$empty = $empty;
        return $empty;
    }
    public static function createFromResolvedPhpDocBlock(ResolvedPhpDocBlock $phpDocBlock) : self
    {
        $tags = $phpDocBlock->getAssertTags();
        if (count($tags) === 0) {
            return self::createEmpty();
        }
        return new self($tags);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use _PHPStan_dcc7b7cff\Nette\Utils\Strings;
use function ltrim;
class ClassNameHelper
{
    public static function isValidClassName(string $name) : bool
    {
        // from https://stackoverflow.com/questions/3195614/validate-class-method-names-with-regex#comment104531582_12011255
        return Strings::match(ltrim($name, '\\'), '/^[a-zA-Z_\\x80-\\xff][a-zA-Z0-9_\\x80-\\xff]*(\\\\[a-zA-Z_\\x80-\\xff][a-zA-Z0-9_\\x80-\\xff]*)*$/') !== null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PhpParser\Node\Expr;
/** @api */
interface ConstantReflection extends \PHPStan\Reflection\ClassMemberReflection, \PHPStan\Reflection\GlobalConstantReflection
{
    /**
     * @deprecated Use getValueExpr()
     * @return mixed
     */
    public function getValue();
    public function getValueExpr() : Expr;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Type;

use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\Dummy\ChangedTypePropertyReflection;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Reflection\ResolvedPropertyReflection;
use PHPStan\Type\Type;
class CallbackUnresolvedPropertyPrototypeReflection implements \PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection
{
    /** @var callable(Type): Type */
    private $transformStaticTypeCallback;
    /**
     * @var \PHPStan\Reflection\PropertyReflection|null
     */
    private $transformedProperty;
    /**
     * @var \PHPStan\Reflection\Type\CallbackUnresolvedPropertyPrototypeReflection|null
     */
    private $cachedDoNotResolveTemplateTypeMapToBounds;
    /**
     * @var \PHPStan\Reflection\PropertyReflection
     */
    private $propertyReflection;
    /**
     * @var \PHPStan\Reflection\ClassReflection
     */
    private $resolvedDeclaringClass;
    /**
     * @var bool
     */
    private $resolveTemplateTypeMapToBounds;
    /**
     * @param callable(Type): Type $transformStaticTypeCallback
     */
    public function __construct(PropertyReflection $propertyReflection, ClassReflection $resolvedDeclaringClass, bool $resolveTemplateTypeMapToBounds, callable $transformStaticTypeCallback)
    {
        $this->propertyReflection = $propertyReflection;
        $this->resolvedDeclaringClass = $resolvedDeclaringClass;
        $this->resolveTemplateTypeMapToBounds = $resolveTemplateTypeMapToBounds;
        $this->transformStaticTypeCallback = $transformStaticTypeCallback;
    }
    public function doNotResolveTemplateTypeMapToBounds() : \PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection
    {
        if ($this->cachedDoNotResolveTemplateTypeMapToBounds !== null) {
            return $this->cachedDoNotResolveTemplateTypeMapToBounds;
        }
        return $this->cachedDoNotResolveTemplateTypeMapToBounds = new self($this->propertyReflection, $this->resolvedDeclaringClass, \false, $this->transformStaticTypeCallback);
    }
    public function getNakedProperty() : PropertyReflection
    {
        return $this->propertyReflection;
    }
    public function getTransformedProperty() : PropertyReflection
    {
        if ($this->transformedProperty !== null) {
            return $this->transformedProperty;
        }
        $templateTypeMap = $this->resolvedDeclaringClass->getActiveTemplateTypeMap();
        return $this->transformedProperty = new ResolvedPropertyReflection($this->transformPropertyWithStaticType($this->resolvedDeclaringClass, $this->propertyReflection), $this->resolveTemplateTypeMapToBounds ? $templateTypeMap->resolveToBounds() : $templateTypeMap);
    }
    public function withFechedOnType(Type $type) : \PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection
    {
        return new \PHPStan\Reflection\Type\CalledOnTypeUnresolvedPropertyPrototypeReflection($this->propertyReflection, $this->resolvedDeclaringClass, $this->resolveTemplateTypeMapToBounds, $type);
    }
    private function transformPropertyWithStaticType(ClassReflection $declaringClass, PropertyReflection $property) : PropertyReflection
    {
        $readableType = $this->transformStaticType($property->getReadableType());
        $writableType = $this->transformStaticType($property->getWritableType());
        return new ChangedTypePropertyReflection($declaringClass, $property, $readableType, $writableType);
    }
    private function transformStaticType(Type $type) : Type
    {
        $callback = $this->transformStaticTypeCallback;
        return $callback($type);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Type;

use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\Dummy\ChangedTypeMethodReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\FunctionVariantWithPhpDocs;
use PHPStan\Reflection\ParameterReflectionWithPhpDocs;
use PHPStan\Reflection\ParametersAcceptorWithPhpDocs;
use PHPStan\Reflection\Php\DummyParameterWithPhpDocs;
use PHPStan\Reflection\ResolvedMethodReflection;
use PHPStan\Type\Type;
use function array_map;
class CallbackUnresolvedMethodPrototypeReflection implements \PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection
{
    /** @var callable(Type): Type */
    private $transformStaticTypeCallback;
    /**
     * @var \PHPStan\Reflection\ExtendedMethodReflection|null
     */
    private $transformedMethod;
    /**
     * @var \PHPStan\Reflection\Type\CallbackUnresolvedMethodPrototypeReflection|null
     */
    private $cachedDoNotResolveTemplateTypeMapToBounds;
    /**
     * @var \PHPStan\Reflection\ExtendedMethodReflection
     */
    private $methodReflection;
    /**
     * @var \PHPStan\Reflection\ClassReflection
     */
    private $resolvedDeclaringClass;
    /**
     * @var bool
     */
    private $resolveTemplateTypeMapToBounds;
    /**
     * @param callable(Type): Type $transformStaticTypeCallback
     */
    public function __construct(ExtendedMethodReflection $methodReflection, ClassReflection $resolvedDeclaringClass, bool $resolveTemplateTypeMapToBounds, callable $transformStaticTypeCallback)
    {
        $this->methodReflection = $methodReflection;
        $this->resolvedDeclaringClass = $resolvedDeclaringClass;
        $this->resolveTemplateTypeMapToBounds = $resolveTemplateTypeMapToBounds;
        $this->transformStaticTypeCallback = $transformStaticTypeCallback;
    }
    public function doNotResolveTemplateTypeMapToBounds() : \PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection
    {
        if ($this->cachedDoNotResolveTemplateTypeMapToBounds !== null) {
            return $this->cachedDoNotResolveTemplateTypeMapToBounds;
        }
        return $this->cachedDoNotResolveTemplateTypeMapToBounds = new self($this->methodReflection, $this->resolvedDeclaringClass, \false, $this->transformStaticTypeCallback);
    }
    public function getNakedMethod() : ExtendedMethodReflection
    {
        return $this->methodReflection;
    }
    public function getTransformedMethod() : ExtendedMethodReflection
    {
        if ($this->transformedMethod !== null) {
            return $this->transformedMethod;
        }
        $templateTypeMap = $this->resolvedDeclaringClass->getActiveTemplateTypeMap();
        return $this->transformedMethod = new ResolvedMethodReflection($this->transformMethodWithStaticType($this->resolvedDeclaringClass, $this->methodReflection), $this->resolveTemplateTypeMapToBounds ? $templateTypeMap->resolveToBounds() : $templateTypeMap);
    }
    public function withCalledOnType(Type $type) : \PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection
    {
        return new \PHPStan\Reflection\Type\CalledOnTypeUnresolvedMethodPrototypeReflection($this->methodReflection, $this->resolvedDeclaringClass, $this->resolveTemplateTypeMapToBounds, $type);
    }
    private function transformMethodWithStaticType(ClassReflection $declaringClass, ExtendedMethodReflection $method) : ExtendedMethodReflection
    {
        $variants = array_map(function (ParametersAcceptorWithPhpDocs $acceptor) : ParametersAcceptorWithPhpDocs {
            return new FunctionVariantWithPhpDocs($acceptor->getTemplateTypeMap(), $acceptor->getResolvedTemplateTypeMap(), array_map(function (ParameterReflectionWithPhpDocs $parameter) : ParameterReflectionWithPhpDocs {
                return new DummyParameterWithPhpDocs($parameter->getName(), $this->transformStaticType($parameter->getType()), $parameter->isOptional(), $parameter->passedByReference(), $parameter->isVariadic(), $parameter->getDefaultValue(), $parameter->getNativeType(), $parameter->getPhpDocType(), $parameter->getOutType());
            }, $acceptor->getParameters()), $acceptor->isVariadic(), $this->transformStaticType($acceptor->getReturnType()), $this->transformStaticType($acceptor->getPhpDocReturnType()), $this->transformStaticType($acceptor->getNativeReturnType()));
        }, $method->getVariants());
        return new ChangedTypeMethodReflection($declaringClass, $method, $variants);
    }
    private function transformStaticType(Type $type) : Type
    {
        $callback = $this->transformStaticTypeCallback;
        return $callback($type);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Type;

use PHPStan\Reflection\Assertions;
use PHPStan\Reflection\ClassMemberReflection;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function array_map;
use function array_merge;
use function count;
use function implode;
class UnionTypeMethodReflection implements ExtendedMethodReflection
{
    /**
     * @var string
     */
    private $methodName;
    /**
     * @var ExtendedMethodReflection[]
     */
    private $methods;
    /**
     * @param ExtendedMethodReflection[] $methods
     */
    public function __construct(string $methodName, array $methods)
    {
        $this->methodName = $methodName;
        $this->methods = $methods;
    }
    public function getDeclaringClass() : ClassReflection
    {
        return $this->methods[0]->getDeclaringClass();
    }
    public function isStatic() : bool
    {
        foreach ($this->methods as $method) {
            if (!$method->isStatic()) {
                return \false;
            }
        }
        return \true;
    }
    public function isPrivate() : bool
    {
        foreach ($this->methods as $method) {
            if ($method->isPrivate()) {
                return \true;
            }
        }
        return \false;
    }
    public function isPublic() : bool
    {
        foreach ($this->methods as $method) {
            if (!$method->isPublic()) {
                return \false;
            }
        }
        return \true;
    }
    public function getName() : string
    {
        return $this->methodName;
    }
    public function getPrototype() : ClassMemberReflection
    {
        return $this;
    }
    public function getVariants() : array
    {
        $variants = array_merge(...array_map(static function (MethodReflection $method) {
            return $method->getVariants();
        }, $this->methods));
        return [ParametersAcceptorSelector::combineAcceptors($variants)];
    }
    public function isDeprecated() : TrinaryLogic
    {
        return TrinaryLogic::lazyExtremeIdentity($this->methods, static function (MethodReflection $method) : TrinaryLogic {
            return $method->isDeprecated();
        });
    }
    public function getDeprecatedDescription() : ?string
    {
        $descriptions = [];
        foreach ($this->methods as $method) {
            if (!$method->isDeprecated()->yes()) {
                continue;
            }
            $description = $method->getDeprecatedDescription();
            if ($description === null) {
                continue;
            }
            $descriptions[] = $description;
        }
        if (count($descriptions) === 0) {
            return null;
        }
        return implode(' ', $descriptions);
    }
    public function isFinal() : TrinaryLogic
    {
        return TrinaryLogic::lazyExtremeIdentity($this->methods, static function (MethodReflection $method) : TrinaryLogic {
            return $method->isFinal();
        });
    }
    public function isInternal() : TrinaryLogic
    {
        return TrinaryLogic::lazyExtremeIdentity($this->methods, static function (MethodReflection $method) : TrinaryLogic {
            return $method->isInternal();
        });
    }
    public function getThrowType() : ?Type
    {
        $types = [];
        foreach ($this->methods as $method) {
            $type = $method->getThrowType();
            if ($type === null) {
                continue;
            }
            $types[] = $type;
        }
        if (count($types) === 0) {
            return null;
        }
        return TypeCombinator::union(...$types);
    }
    public function hasSideEffects() : TrinaryLogic
    {
        return TrinaryLogic::lazyExtremeIdentity($this->methods, static function (MethodReflection $method) : TrinaryLogic {
            return $method->hasSideEffects();
        });
    }
    public function getDocComment() : ?string
    {
        return null;
    }
    public function getAsserts() : Assertions
    {
        return Assertions::createEmpty();
    }
    public function getSelfOutType() : ?Type
    {
        return null;
    }
    public function returnsByReference() : TrinaryLogic
    {
        return TrinaryLogic::lazyExtremeIdentity($this->methods, static function (ExtendedMethodReflection $method) : TrinaryLogic {
            return $method->returnsByReference();
        });
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Type;

use PHPStan\Reflection\PropertyReflection;
use PHPStan\Type\Type;
use function array_map;
class IntersectionTypeUnresolvedPropertyPrototypeReflection implements \PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection
{
    /**
     * @var \PHPStan\Reflection\PropertyReflection|null
     */
    private $transformedProperty;
    /**
     * @var \PHPStan\Reflection\Type\IntersectionTypeUnresolvedPropertyPrototypeReflection|null
     */
    private $cachedDoNotResolveTemplateTypeMapToBounds;
    /**
     * @var string
     */
    private $propertyName;
    /**
     * @var UnresolvedPropertyPrototypeReflection[]
     */
    private $propertyPrototypes;
    /**
     * @param UnresolvedPropertyPrototypeReflection[] $propertyPrototypes
     */
    public function __construct(string $propertyName, array $propertyPrototypes)
    {
        $this->propertyName = $propertyName;
        $this->propertyPrototypes = $propertyPrototypes;
    }
    public function doNotResolveTemplateTypeMapToBounds() : \PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection
    {
        if ($this->cachedDoNotResolveTemplateTypeMapToBounds !== null) {
            return $this->cachedDoNotResolveTemplateTypeMapToBounds;
        }
        return $this->cachedDoNotResolveTemplateTypeMapToBounds = new self($this->propertyName, array_map(static function (\PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection $prototype) : \PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection {
            return $prototype->doNotResolveTemplateTypeMapToBounds();
        }, $this->propertyPrototypes));
    }
    public function getNakedProperty() : PropertyReflection
    {
        return $this->getTransformedProperty();
    }
    public function getTransformedProperty() : PropertyReflection
    {
        if ($this->transformedProperty !== null) {
            return $this->transformedProperty;
        }
        $properties = array_map(static function (\PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection $prototype) : PropertyReflection {
            return $prototype->getTransformedProperty();
        }, $this->propertyPrototypes);
        return $this->transformedProperty = new \PHPStan\Reflection\Type\IntersectionTypePropertyReflection($properties);
    }
    public function withFechedOnType(Type $type) : \PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection
    {
        return new self($this->propertyName, array_map(static function (\PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection $prototype) use($type) : \PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection {
            return $prototype->withFechedOnType($type);
        }, $this->propertyPrototypes));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Type;

use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Type\Type;
interface UnresolvedMethodPrototypeReflection
{
    public function doNotResolveTemplateTypeMapToBounds() : self;
    public function getNakedMethod() : ExtendedMethodReflection;
    public function getTransformedMethod() : ExtendedMethodReflection;
    public function withCalledOnType(Type $type) : self;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Type;

use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Type\Type;
use function array_map;
class UnionTypeUnresolvedMethodPrototypeReflection implements \PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection
{
    /**
     * @var \PHPStan\Reflection\ExtendedMethodReflection|null
     */
    private $transformedMethod;
    /**
     * @var \PHPStan\Reflection\Type\UnionTypeUnresolvedMethodPrototypeReflection|null
     */
    private $cachedDoNotResolveTemplateTypeMapToBounds;
    /**
     * @var string
     */
    private $methodName;
    /**
     * @var UnresolvedMethodPrototypeReflection[]
     */
    private $methodPrototypes;
    /**
     * @param UnresolvedMethodPrototypeReflection[] $methodPrototypes
     */
    public function __construct(string $methodName, array $methodPrototypes)
    {
        $this->methodName = $methodName;
        $this->methodPrototypes = $methodPrototypes;
    }
    public function doNotResolveTemplateTypeMapToBounds() : \PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection
    {
        if ($this->cachedDoNotResolveTemplateTypeMapToBounds !== null) {
            return $this->cachedDoNotResolveTemplateTypeMapToBounds;
        }
        return $this->cachedDoNotResolveTemplateTypeMapToBounds = new self($this->methodName, array_map(static function (\PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection $prototype) : \PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection {
            return $prototype->doNotResolveTemplateTypeMapToBounds();
        }, $this->methodPrototypes));
    }
    public function getNakedMethod() : ExtendedMethodReflection
    {
        return $this->getTransformedMethod();
    }
    public function getTransformedMethod() : ExtendedMethodReflection
    {
        if ($this->transformedMethod !== null) {
            return $this->transformedMethod;
        }
        $methods = array_map(static function (\PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection $prototype) : MethodReflection {
            return $prototype->getTransformedMethod();
        }, $this->methodPrototypes);
        return $this->transformedMethod = new \PHPStan\Reflection\Type\UnionTypeMethodReflection($this->methodName, $methods);
    }
    public function withCalledOnType(Type $type) : \PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection
    {
        return new self($this->methodName, array_map(static function (\PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection $prototype) use($type) : \PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection {
            return $prototype->withCalledOnType($type);
        }, $this->methodPrototypes));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Type;

use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function array_map;
use function count;
use function implode;
class UnionTypePropertyReflection implements PropertyReflection
{
    /**
     * @var PropertyReflection[]
     */
    private $properties;
    /**
     * @param PropertyReflection[] $properties
     */
    public function __construct(array $properties)
    {
        $this->properties = $properties;
    }
    public function getDeclaringClass() : ClassReflection
    {
        return $this->properties[0]->getDeclaringClass();
    }
    public function isStatic() : bool
    {
        return $this->computeResult(static function (PropertyReflection $property) {
            return $property->isStatic();
        });
    }
    public function isPrivate() : bool
    {
        return $this->computeResult(static function (PropertyReflection $property) {
            return $property->isPrivate();
        });
    }
    public function isPublic() : bool
    {
        return $this->computeResult(static function (PropertyReflection $property) {
            return $property->isPublic();
        });
    }
    public function isDeprecated() : TrinaryLogic
    {
        return TrinaryLogic::lazyExtremeIdentity($this->properties, static function (PropertyReflection $propertyReflection) : TrinaryLogic {
            return $propertyReflection->isDeprecated();
        });
    }
    public function getDeprecatedDescription() : ?string
    {
        $descriptions = [];
        foreach ($this->properties as $property) {
            if (!$property->isDeprecated()->yes()) {
                continue;
            }
            $description = $property->getDeprecatedDescription();
            if ($description === null) {
                continue;
            }
            $descriptions[] = $description;
        }
        if (count($descriptions) === 0) {
            return null;
        }
        return implode(' ', $descriptions);
    }
    public function isInternal() : TrinaryLogic
    {
        return TrinaryLogic::lazyExtremeIdentity($this->properties, static function (PropertyReflection $propertyReflection) : TrinaryLogic {
            return $propertyReflection->isInternal();
        });
    }
    public function getDocComment() : ?string
    {
        return null;
    }
    public function getReadableType() : Type
    {
        return TypeCombinator::union(...array_map(static function (PropertyReflection $property) : Type {
            return $property->getReadableType();
        }, $this->properties));
    }
    public function getWritableType() : Type
    {
        return TypeCombinator::union(...array_map(static function (PropertyReflection $property) : Type {
            return $property->getWritableType();
        }, $this->properties));
    }
    public function canChangeTypeAfterAssignment() : bool
    {
        return $this->computeResult(static function (PropertyReflection $property) {
            return $property->canChangeTypeAfterAssignment();
        });
    }
    public function isReadable() : bool
    {
        return $this->computeResult(static function (PropertyReflection $property) {
            return $property->isReadable();
        });
    }
    public function isWritable() : bool
    {
        return $this->computeResult(static function (PropertyReflection $property) {
            return $property->isWritable();
        });
    }
    /**
     * @param callable(PropertyReflection): bool $cb
     */
    private function computeResult(callable $cb) : bool
    {
        $result = \true;
        foreach ($this->properties as $property) {
            $result = $result && $cb($property);
        }
        return $result;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Type;

use PHPStan\Reflection\Assertions;
use PHPStan\Reflection\ClassMemberReflection;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\FunctionVariantWithPhpDocs;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\Reflection\ParametersAcceptorWithPhpDocs;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function array_map;
use function count;
use function implode;
class IntersectionTypeMethodReflection implements ExtendedMethodReflection
{
    /**
     * @var string
     */
    private $methodName;
    /**
     * @var ExtendedMethodReflection[]
     */
    private $methods;
    /**
     * @param ExtendedMethodReflection[] $methods
     */
    public function __construct(string $methodName, array $methods)
    {
        $this->methodName = $methodName;
        $this->methods = $methods;
    }
    public function getDeclaringClass() : ClassReflection
    {
        return $this->methods[0]->getDeclaringClass();
    }
    public function isStatic() : bool
    {
        foreach ($this->methods as $method) {
            if ($method->isStatic()) {
                return \true;
            }
        }
        return \false;
    }
    public function isPrivate() : bool
    {
        foreach ($this->methods as $method) {
            if (!$method->isPrivate()) {
                return \false;
            }
        }
        return \true;
    }
    public function isPublic() : bool
    {
        foreach ($this->methods as $method) {
            if ($method->isPublic()) {
                return \true;
            }
        }
        return \false;
    }
    public function getName() : string
    {
        return $this->methodName;
    }
    public function getPrototype() : ClassMemberReflection
    {
        return $this;
    }
    public function getVariants() : array
    {
        $returnType = TypeCombinator::intersect(...array_map(static function (MethodReflection $method) : Type {
            return TypeCombinator::intersect(...array_map(static function (ParametersAcceptor $acceptor) : Type {
                return $acceptor->getReturnType();
            }, $method->getVariants()));
        }, $this->methods));
        $phpDocReturnType = TypeCombinator::intersect(...array_map(static function (MethodReflection $method) : Type {
            return TypeCombinator::intersect(...array_map(static function (ParametersAcceptor $acceptor) : Type {
                return $acceptor->getPhpDocReturnType();
            }, $method->getVariants()));
        }, $this->methods));
        $nativeReturnType = TypeCombinator::intersect(...array_map(static function (MethodReflection $method) : Type {
            return TypeCombinator::intersect(...array_map(static function (ParametersAcceptor $acceptor) : Type {
                return $acceptor->getNativeReturnType();
            }, $method->getVariants()));
        }, $this->methods));
        return array_map(static function (ParametersAcceptorWithPhpDocs $acceptor) use($returnType, $phpDocReturnType, $nativeReturnType) : ParametersAcceptorWithPhpDocs {
            return new FunctionVariantWithPhpDocs($acceptor->getTemplateTypeMap(), $acceptor->getResolvedTemplateTypeMap(), $acceptor->getParameters(), $acceptor->isVariadic(), $returnType, $phpDocReturnType, $nativeReturnType);
        }, $this->methods[0]->getVariants());
    }
    public function isDeprecated() : TrinaryLogic
    {
        return TrinaryLogic::lazyMaxMin($this->methods, static function (MethodReflection $method) : TrinaryLogic {
            return $method->isDeprecated();
        });
    }
    public function getDeprecatedDescription() : ?string
    {
        $descriptions = [];
        foreach ($this->methods as $method) {
            if (!$method->isDeprecated()->yes()) {
                continue;
            }
            $description = $method->getDeprecatedDescription();
            if ($description === null) {
                continue;
            }
            $descriptions[] = $description;
        }
        if (count($descriptions) === 0) {
            return null;
        }
        return implode(' ', $descriptions);
    }
    public function isFinal() : TrinaryLogic
    {
        return TrinaryLogic::lazyMaxMin($this->methods, static function (MethodReflection $method) : TrinaryLogic {
            return $method->isFinal();
        });
    }
    public function isInternal() : TrinaryLogic
    {
        return TrinaryLogic::lazyMaxMin($this->methods, static function (MethodReflection $method) : TrinaryLogic {
            return $method->isInternal();
        });
    }
    public function getThrowType() : ?Type
    {
        $types = [];
        foreach ($this->methods as $method) {
            $type = $method->getThrowType();
            if ($type === null) {
                continue;
            }
            $types[] = $type;
        }
        if (count($types) === 0) {
            return null;
        }
        return TypeCombinator::intersect(...$types);
    }
    public function hasSideEffects() : TrinaryLogic
    {
        return TrinaryLogic::lazyMaxMin($this->methods, static function (MethodReflection $method) : TrinaryLogic {
            return $method->hasSideEffects();
        });
    }
    public function getDocComment() : ?string
    {
        return null;
    }
    public function getAsserts() : Assertions
    {
        $assertions = Assertions::createEmpty();
        foreach ($this->methods as $method) {
            $assertions = $assertions->intersectWith($method->getAsserts());
        }
        return $assertions;
    }
    public function getSelfOutType() : ?Type
    {
        return null;
    }
    public function returnsByReference() : TrinaryLogic
    {
        return TrinaryLogic::lazyMaxMin($this->methods, static function (ExtendedMethodReflection $method) : TrinaryLogic {
            return $method->returnsByReference();
        });
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Type;

use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Type\Type;
use function array_map;
class IntersectionTypeUnresolvedMethodPrototypeReflection implements \PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection
{
    /**
     * @var \PHPStan\Reflection\ExtendedMethodReflection|null
     */
    private $transformedMethod;
    /**
     * @var \PHPStan\Reflection\Type\IntersectionTypeUnresolvedMethodPrototypeReflection|null
     */
    private $cachedDoNotResolveTemplateTypeMapToBounds;
    /**
     * @var string
     */
    private $methodName;
    /**
     * @var UnresolvedMethodPrototypeReflection[]
     */
    private $methodPrototypes;
    /**
     * @param UnresolvedMethodPrototypeReflection[] $methodPrototypes
     */
    public function __construct(string $methodName, array $methodPrototypes)
    {
        $this->methodName = $methodName;
        $this->methodPrototypes = $methodPrototypes;
    }
    public function doNotResolveTemplateTypeMapToBounds() : \PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection
    {
        if ($this->cachedDoNotResolveTemplateTypeMapToBounds !== null) {
            return $this->cachedDoNotResolveTemplateTypeMapToBounds;
        }
        return $this->cachedDoNotResolveTemplateTypeMapToBounds = new self($this->methodName, array_map(static function (\PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection $prototype) : \PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection {
            return $prototype->doNotResolveTemplateTypeMapToBounds();
        }, $this->methodPrototypes));
    }
    public function getNakedMethod() : ExtendedMethodReflection
    {
        return $this->getTransformedMethod();
    }
    public function getTransformedMethod() : ExtendedMethodReflection
    {
        if ($this->transformedMethod !== null) {
            return $this->transformedMethod;
        }
        $methods = array_map(static function (\PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection $prototype) : MethodReflection {
            return $prototype->getTransformedMethod();
        }, $this->methodPrototypes);
        return $this->transformedMethod = new \PHPStan\Reflection\Type\IntersectionTypeMethodReflection($this->methodName, $methods);
    }
    public function withCalledOnType(Type $type) : \PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection
    {
        return new self($this->methodName, array_map(static function (\PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection $prototype) use($type) : \PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection {
            return $prototype->withCalledOnType($type);
        }, $this->methodPrototypes));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Type;

use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\Dummy\ChangedTypeMethodReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\FunctionVariantWithPhpDocs;
use PHPStan\Reflection\ParameterReflectionWithPhpDocs;
use PHPStan\Reflection\ParametersAcceptorWithPhpDocs;
use PHPStan\Reflection\Php\DummyParameterWithPhpDocs;
use PHPStan\Reflection\ResolvedMethodReflection;
use PHPStan\Type\StaticType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeTraverser;
use function array_map;
class CalledOnTypeUnresolvedMethodPrototypeReflection implements \PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection
{
    /**
     * @var \PHPStan\Reflection\ExtendedMethodReflection|null
     */
    private $transformedMethod;
    /**
     * @var \PHPStan\Reflection\Type\CalledOnTypeUnresolvedMethodPrototypeReflection|null
     */
    private $cachedDoNotResolveTemplateTypeMapToBounds;
    /**
     * @var \PHPStan\Reflection\ExtendedMethodReflection
     */
    private $methodReflection;
    /**
     * @var \PHPStan\Reflection\ClassReflection
     */
    private $resolvedDeclaringClass;
    /**
     * @var bool
     */
    private $resolveTemplateTypeMapToBounds;
    /**
     * @var \PHPStan\Type\Type
     */
    private $calledOnType;
    public function __construct(ExtendedMethodReflection $methodReflection, ClassReflection $resolvedDeclaringClass, bool $resolveTemplateTypeMapToBounds, Type $calledOnType)
    {
        $this->methodReflection = $methodReflection;
        $this->resolvedDeclaringClass = $resolvedDeclaringClass;
        $this->resolveTemplateTypeMapToBounds = $resolveTemplateTypeMapToBounds;
        $this->calledOnType = $calledOnType;
    }
    public function doNotResolveTemplateTypeMapToBounds() : \PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection
    {
        if ($this->cachedDoNotResolveTemplateTypeMapToBounds !== null) {
            return $this->cachedDoNotResolveTemplateTypeMapToBounds;
        }
        return $this->cachedDoNotResolveTemplateTypeMapToBounds = new self($this->methodReflection, $this->resolvedDeclaringClass, \false, $this->calledOnType);
    }
    public function getNakedMethod() : ExtendedMethodReflection
    {
        return $this->methodReflection;
    }
    public function getTransformedMethod() : ExtendedMethodReflection
    {
        if ($this->transformedMethod !== null) {
            return $this->transformedMethod;
        }
        $templateTypeMap = $this->resolvedDeclaringClass->getActiveTemplateTypeMap();
        return $this->transformedMethod = new ResolvedMethodReflection($this->transformMethodWithStaticType($this->resolvedDeclaringClass, $this->methodReflection), $this->resolveTemplateTypeMapToBounds ? $templateTypeMap->resolveToBounds() : $templateTypeMap);
    }
    public function withCalledOnType(Type $type) : \PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection
    {
        return new self($this->methodReflection, $this->resolvedDeclaringClass, $this->resolveTemplateTypeMapToBounds, $type);
    }
    private function transformMethodWithStaticType(ClassReflection $declaringClass, ExtendedMethodReflection $method) : ExtendedMethodReflection
    {
        $variants = array_map(function (ParametersAcceptorWithPhpDocs $acceptor) : ParametersAcceptorWithPhpDocs {
            return new FunctionVariantWithPhpDocs($acceptor->getTemplateTypeMap(), $acceptor->getResolvedTemplateTypeMap(), array_map(function (ParameterReflectionWithPhpDocs $parameter) : ParameterReflectionWithPhpDocs {
                return new DummyParameterWithPhpDocs($parameter->getName(), $this->transformStaticType($parameter->getType()), $parameter->isOptional(), $parameter->passedByReference(), $parameter->isVariadic(), $parameter->getDefaultValue(), $parameter->getNativeType(), $parameter->getPhpDocType(), $parameter->getOutType());
            }, $acceptor->getParameters()), $acceptor->isVariadic(), $this->transformStaticType($acceptor->getReturnType()), $this->transformStaticType($acceptor->getPhpDocReturnType()), $this->transformStaticType($acceptor->getNativeReturnType()));
        }, $method->getVariants());
        return new ChangedTypeMethodReflection($declaringClass, $method, $variants);
    }
    private function transformStaticType(Type $type) : Type
    {
        return TypeTraverser::map($type, function (Type $type, callable $traverse) : Type {
            if ($type instanceof StaticType) {
                return $this->calledOnType;
            }
            return $traverse($type);
        });
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Type;

use PHPStan\Reflection\PropertyReflection;
use PHPStan\Type\Type;
use function array_map;
class UnionTypeUnresolvedPropertyPrototypeReflection implements \PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection
{
    /**
     * @var \PHPStan\Reflection\PropertyReflection|null
     */
    private $transformedProperty;
    /**
     * @var \PHPStan\Reflection\Type\UnionTypeUnresolvedPropertyPrototypeReflection|null
     */
    private $cachedDoNotResolveTemplateTypeMapToBounds;
    /**
     * @var string
     */
    private $propertyName;
    /**
     * @var UnresolvedPropertyPrototypeReflection[]
     */
    private $propertyPrototypes;
    /**
     * @param UnresolvedPropertyPrototypeReflection[] $propertyPrototypes
     */
    public function __construct(string $propertyName, array $propertyPrototypes)
    {
        $this->propertyName = $propertyName;
        $this->propertyPrototypes = $propertyPrototypes;
    }
    public function doNotResolveTemplateTypeMapToBounds() : \PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection
    {
        if ($this->cachedDoNotResolveTemplateTypeMapToBounds !== null) {
            return $this->cachedDoNotResolveTemplateTypeMapToBounds;
        }
        return $this->cachedDoNotResolveTemplateTypeMapToBounds = new self($this->propertyName, array_map(static function (\PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection $prototype) : \PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection {
            return $prototype->doNotResolveTemplateTypeMapToBounds();
        }, $this->propertyPrototypes));
    }
    public function getNakedProperty() : PropertyReflection
    {
        return $this->getTransformedProperty();
    }
    public function getTransformedProperty() : PropertyReflection
    {
        if ($this->transformedProperty !== null) {
            return $this->transformedProperty;
        }
        $methods = array_map(static function (\PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection $prototype) : PropertyReflection {
            return $prototype->getTransformedProperty();
        }, $this->propertyPrototypes);
        return $this->transformedProperty = new \PHPStan\Reflection\Type\UnionTypePropertyReflection($methods);
    }
    public function withFechedOnType(Type $type) : \PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection
    {
        return new self($this->propertyName, array_map(static function (\PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection $prototype) use($type) : \PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection {
            return $prototype->withFechedOnType($type);
        }, $this->propertyPrototypes));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Type;

use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\Dummy\ChangedTypePropertyReflection;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Reflection\ResolvedPropertyReflection;
use PHPStan\Type\StaticType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeTraverser;
class CalledOnTypeUnresolvedPropertyPrototypeReflection implements \PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection
{
    /**
     * @var \PHPStan\Reflection\PropertyReflection|null
     */
    private $transformedProperty;
    /**
     * @var \PHPStan\Reflection\Type\CalledOnTypeUnresolvedPropertyPrototypeReflection|null
     */
    private $cachedDoNotResolveTemplateTypeMapToBounds;
    /**
     * @var \PHPStan\Reflection\PropertyReflection
     */
    private $propertyReflection;
    /**
     * @var \PHPStan\Reflection\ClassReflection
     */
    private $resolvedDeclaringClass;
    /**
     * @var bool
     */
    private $resolveTemplateTypeMapToBounds;
    /**
     * @var \PHPStan\Type\Type
     */
    private $fetchedOnType;
    public function __construct(PropertyReflection $propertyReflection, ClassReflection $resolvedDeclaringClass, bool $resolveTemplateTypeMapToBounds, Type $fetchedOnType)
    {
        $this->propertyReflection = $propertyReflection;
        $this->resolvedDeclaringClass = $resolvedDeclaringClass;
        $this->resolveTemplateTypeMapToBounds = $resolveTemplateTypeMapToBounds;
        $this->fetchedOnType = $fetchedOnType;
    }
    public function doNotResolveTemplateTypeMapToBounds() : \PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection
    {
        if ($this->cachedDoNotResolveTemplateTypeMapToBounds !== null) {
            return $this->cachedDoNotResolveTemplateTypeMapToBounds;
        }
        return $this->cachedDoNotResolveTemplateTypeMapToBounds = new self($this->propertyReflection, $this->resolvedDeclaringClass, \false, $this->fetchedOnType);
    }
    public function getNakedProperty() : PropertyReflection
    {
        return $this->propertyReflection;
    }
    public function getTransformedProperty() : PropertyReflection
    {
        if ($this->transformedProperty !== null) {
            return $this->transformedProperty;
        }
        $templateTypeMap = $this->resolvedDeclaringClass->getActiveTemplateTypeMap();
        return $this->transformedProperty = new ResolvedPropertyReflection($this->transformPropertyWithStaticType($this->resolvedDeclaringClass, $this->propertyReflection), $this->resolveTemplateTypeMapToBounds ? $templateTypeMap->resolveToBounds() : $templateTypeMap);
    }
    public function withFechedOnType(Type $type) : \PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection
    {
        return new self($this->propertyReflection, $this->resolvedDeclaringClass, $this->resolveTemplateTypeMapToBounds, $type);
    }
    private function transformPropertyWithStaticType(ClassReflection $declaringClass, PropertyReflection $property) : PropertyReflection
    {
        $readableType = $this->transformStaticType($property->getReadableType());
        $writableType = $this->transformStaticType($property->getWritableType());
        return new ChangedTypePropertyReflection($declaringClass, $property, $readableType, $writableType);
    }
    private function transformStaticType(Type $type) : Type
    {
        return TypeTraverser::map($type, function (Type $type, callable $traverse) : Type {
            if ($type instanceof StaticType) {
                return $this->fetchedOnType;
            }
            return $traverse($type);
        });
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Type;

use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function array_map;
use function count;
use function implode;
class IntersectionTypePropertyReflection implements PropertyReflection
{
    /**
     * @var PropertyReflection[]
     */
    private $properties;
    /**
     * @param PropertyReflection[] $properties
     */
    public function __construct(array $properties)
    {
        $this->properties = $properties;
    }
    public function getDeclaringClass() : ClassReflection
    {
        return $this->properties[0]->getDeclaringClass();
    }
    public function isStatic() : bool
    {
        return $this->computeResult(static function (PropertyReflection $property) {
            return $property->isStatic();
        });
    }
    public function isPrivate() : bool
    {
        return $this->computeResult(static function (PropertyReflection $property) {
            return $property->isPrivate();
        });
    }
    public function isPublic() : bool
    {
        return $this->computeResult(static function (PropertyReflection $property) {
            return $property->isPublic();
        });
    }
    public function isDeprecated() : TrinaryLogic
    {
        return TrinaryLogic::lazyMaxMin($this->properties, static function (PropertyReflection $propertyReflection) : TrinaryLogic {
            return $propertyReflection->isDeprecated();
        });
    }
    public function getDeprecatedDescription() : ?string
    {
        $descriptions = [];
        foreach ($this->properties as $property) {
            if (!$property->isDeprecated()->yes()) {
                continue;
            }
            $description = $property->getDeprecatedDescription();
            if ($description === null) {
                continue;
            }
            $descriptions[] = $description;
        }
        if (count($descriptions) === 0) {
            return null;
        }
        return implode(' ', $descriptions);
    }
    public function isInternal() : TrinaryLogic
    {
        return TrinaryLogic::lazyMaxMin($this->properties, static function (PropertyReflection $propertyReflection) : TrinaryLogic {
            return $propertyReflection->isInternal();
        });
    }
    public function getDocComment() : ?string
    {
        return null;
    }
    public function getReadableType() : Type
    {
        return TypeCombinator::intersect(...array_map(static function (PropertyReflection $property) : Type {
            return $property->getReadableType();
        }, $this->properties));
    }
    public function getWritableType() : Type
    {
        return TypeCombinator::intersect(...array_map(static function (PropertyReflection $property) : Type {
            return $property->getWritableType();
        }, $this->properties));
    }
    public function canChangeTypeAfterAssignment() : bool
    {
        return $this->computeResult(static function (PropertyReflection $property) {
            return $property->canChangeTypeAfterAssignment();
        });
    }
    public function isReadable() : bool
    {
        return $this->computeResult(static function (PropertyReflection $property) {
            return $property->isReadable();
        });
    }
    public function isWritable() : bool
    {
        return $this->computeResult(static function (PropertyReflection $property) {
            return $property->isWritable();
        });
    }
    /**
     * @param callable(PropertyReflection): bool $cb
     */
    private function computeResult(callable $cb) : bool
    {
        $result = \false;
        foreach ($this->properties as $property) {
            $result = $result || $cb($property);
        }
        return $result;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Type;

use PHPStan\Reflection\PropertyReflection;
use PHPStan\Type\Type;
interface UnresolvedPropertyPrototypeReflection
{
    public function doNotResolveTemplateTypeMapToBounds() : self;
    public function getNakedProperty() : PropertyReflection;
    public function getTransformedProperty() : PropertyReflection;
    public function withFechedOnType(Type $type) : self;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use Exception;
use function sprintf;
class MissingConstantFromReflectionException extends Exception
{
    public function __construct(string $className, string $constantName)
    {
        parent::__construct(sprintf('Constant %s was not found in reflection of class %s.', $constantName, $className));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PHPStan\Reflection\Php\PhpPropertyReflection;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Generic\TemplateTypeHelper;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\Type;
class ResolvedPropertyReflection implements \PHPStan\Reflection\WrapperPropertyReflection
{
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $readableType;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $writableType;
    /**
     * @var \PHPStan\Reflection\PropertyReflection
     */
    private $reflection;
    /**
     * @var \PHPStan\Type\Generic\TemplateTypeMap
     */
    private $templateTypeMap;
    public function __construct(\PHPStan\Reflection\PropertyReflection $reflection, TemplateTypeMap $templateTypeMap)
    {
        $this->reflection = $reflection;
        $this->templateTypeMap = $templateTypeMap;
    }
    public function getOriginalReflection() : \PHPStan\Reflection\PropertyReflection
    {
        return $this->reflection;
    }
    public function getDeclaringClass() : \PHPStan\Reflection\ClassReflection
    {
        return $this->reflection->getDeclaringClass();
    }
    public function getDeclaringTrait() : ?\PHPStan\Reflection\ClassReflection
    {
        if ($this->reflection instanceof PhpPropertyReflection) {
            return $this->reflection->getDeclaringTrait();
        }
        return null;
    }
    public function isStatic() : bool
    {
        return $this->reflection->isStatic();
    }
    public function isPrivate() : bool
    {
        return $this->reflection->isPrivate();
    }
    public function isPublic() : bool
    {
        return $this->reflection->isPublic();
    }
    public function getReadableType() : Type
    {
        $type = $this->readableType;
        if ($type !== null) {
            return $type;
        }
        $type = TemplateTypeHelper::resolveTemplateTypes($this->reflection->getReadableType(), $this->templateTypeMap);
        $type = TemplateTypeHelper::resolveTemplateTypes($type, $this->templateTypeMap);
        $this->readableType = $type;
        return $type;
    }
    public function getWritableType() : Type
    {
        $type = $this->writableType;
        if ($type !== null) {
            return $type;
        }
        $type = TemplateTypeHelper::resolveTemplateTypes($this->reflection->getWritableType(), $this->templateTypeMap);
        $type = TemplateTypeHelper::resolveTemplateTypes($type, $this->templateTypeMap);
        $this->writableType = $type;
        return $type;
    }
    public function canChangeTypeAfterAssignment() : bool
    {
        return $this->reflection->canChangeTypeAfterAssignment();
    }
    public function isReadable() : bool
    {
        return $this->reflection->isReadable();
    }
    public function isWritable() : bool
    {
        return $this->reflection->isWritable();
    }
    public function getDocComment() : ?string
    {
        return $this->reflection->getDocComment();
    }
    public function isDeprecated() : TrinaryLogic
    {
        return $this->reflection->isDeprecated();
    }
    public function getDeprecatedDescription() : ?string
    {
        return $this->reflection->getDeprecatedDescription();
    }
    public function isInternal() : TrinaryLogic
    {
        return $this->reflection->isInternal();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PHPStan\TrinaryLogic;
use PHPStan\Type\Type;
/** @api */
interface GlobalConstantReflection
{
    public function getName() : string;
    public function getValueType() : Type;
    public function isDeprecated() : TrinaryLogic;
    public function getDeprecatedDescription() : ?string;
    public function isInternal() : TrinaryLogic;
    public function getFileName() : ?string;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Constant;

use PHPStan\Reflection\GlobalConstantReflection;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Type;
class RuntimeConstantReflection implements GlobalConstantReflection
{
    /**
     * @var string
     */
    private $name;
    /**
     * @var \PHPStan\Type\Type
     */
    private $valueType;
    /**
     * @var string|null
     */
    private $fileName;
    public function __construct(string $name, Type $valueType, ?string $fileName)
    {
        $this->name = $name;
        $this->valueType = $valueType;
        $this->fileName = $fileName;
    }
    public function getName() : string
    {
        return $this->name;
    }
    public function getValueType() : Type
    {
        return $this->valueType;
    }
    public function getFileName() : ?string
    {
        return $this->fileName;
    }
    public function isDeprecated() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getDeprecatedDescription() : ?string
    {
        return null;
    }
    public function isInternal() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Dummy;

use PHPStan\Reflection\ClassMemberReflection;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\FunctionVariant;
use PHPStan\Reflection\MethodReflection;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\Type;
use PHPStan\Type\VoidType;
class DummyConstructorReflection implements MethodReflection
{
    /**
     * @var \PHPStan\Reflection\ClassReflection
     */
    private $declaringClass;
    public function __construct(ClassReflection $declaringClass)
    {
        $this->declaringClass = $declaringClass;
    }
    public function getDeclaringClass() : ClassReflection
    {
        return $this->declaringClass;
    }
    public function isStatic() : bool
    {
        return \false;
    }
    public function isPrivate() : bool
    {
        return \false;
    }
    public function isPublic() : bool
    {
        return \true;
    }
    public function getName() : string
    {
        return '__construct';
    }
    public function getPrototype() : ClassMemberReflection
    {
        return $this;
    }
    public function getVariants() : array
    {
        return [new FunctionVariant(TemplateTypeMap::createEmpty(), null, [], \false, new VoidType())];
    }
    public function isDeprecated() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getDeprecatedDescription() : ?string
    {
        return null;
    }
    public function isFinal() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isInternal() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getThrowType() : ?Type
    {
        return null;
    }
    public function hasSideEffects() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getDocComment() : ?string
    {
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Dummy;

use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Reflection\WrapperPropertyReflection;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Type;
class ChangedTypePropertyReflection implements WrapperPropertyReflection
{
    /**
     * @var \PHPStan\Reflection\ClassReflection
     */
    private $declaringClass;
    /**
     * @var \PHPStan\Reflection\PropertyReflection
     */
    private $reflection;
    /**
     * @var \PHPStan\Type\Type
     */
    private $readableType;
    /**
     * @var \PHPStan\Type\Type
     */
    private $writableType;
    public function __construct(ClassReflection $declaringClass, PropertyReflection $reflection, Type $readableType, Type $writableType)
    {
        $this->declaringClass = $declaringClass;
        $this->reflection = $reflection;
        $this->readableType = $readableType;
        $this->writableType = $writableType;
    }
    public function getDeclaringClass() : ClassReflection
    {
        return $this->declaringClass;
    }
    public function isStatic() : bool
    {
        return $this->reflection->isStatic();
    }
    public function isPrivate() : bool
    {
        return $this->reflection->isPrivate();
    }
    public function isPublic() : bool
    {
        return $this->reflection->isPublic();
    }
    public function getDocComment() : ?string
    {
        return $this->reflection->getDocComment();
    }
    public function getReadableType() : Type
    {
        return $this->readableType;
    }
    public function getWritableType() : Type
    {
        return $this->writableType;
    }
    public function canChangeTypeAfterAssignment() : bool
    {
        return $this->reflection->canChangeTypeAfterAssignment();
    }
    public function isReadable() : bool
    {
        return $this->reflection->isReadable();
    }
    public function isWritable() : bool
    {
        return $this->reflection->isWritable();
    }
    public function isDeprecated() : TrinaryLogic
    {
        return $this->reflection->isDeprecated();
    }
    public function getDeprecatedDescription() : ?string
    {
        return $this->reflection->getDeprecatedDescription();
    }
    public function isInternal() : TrinaryLogic
    {
        return $this->reflection->isInternal();
    }
    public function getOriginalReflection() : PropertyReflection
    {
        return $this->reflection;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Dummy;

use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Reflection\ReflectionProviderStaticAccessor;
use PHPStan\TrinaryLogic;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
use stdClass;
class DummyPropertyReflection implements PropertyReflection
{
    public function getDeclaringClass() : ClassReflection
    {
        $reflectionProvider = ReflectionProviderStaticAccessor::getInstance();
        return $reflectionProvider->getClass(stdClass::class);
    }
    public function isStatic() : bool
    {
        return \false;
    }
    public function isPrivate() : bool
    {
        return \false;
    }
    public function isPublic() : bool
    {
        return \true;
    }
    public function getReadableType() : Type
    {
        return new MixedType();
    }
    public function getWritableType() : Type
    {
        return new MixedType();
    }
    public function canChangeTypeAfterAssignment() : bool
    {
        return \true;
    }
    public function isReadable() : bool
    {
        return \true;
    }
    public function isWritable() : bool
    {
        return \true;
    }
    public function isDeprecated() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getDeprecatedDescription() : ?string
    {
        return null;
    }
    public function isInternal() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getDocComment() : ?string
    {
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Dummy;

use PhpParser\Node\Expr;
use PHPStan\Node\Expr\TypeExpr;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ConstantReflection;
use PHPStan\Reflection\ReflectionProviderStaticAccessor;
use PHPStan\TrinaryLogic;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
use stdClass;
class DummyConstantReflection implements ConstantReflection
{
    /**
     * @var string
     */
    private $name;
    public function __construct(string $name)
    {
        $this->name = $name;
    }
    public function getDeclaringClass() : ClassReflection
    {
        $reflectionProvider = ReflectionProviderStaticAccessor::getInstance();
        return $reflectionProvider->getClass(stdClass::class);
    }
    public function getFileName() : ?string
    {
        return null;
    }
    public function isStatic() : bool
    {
        return \true;
    }
    public function isPrivate() : bool
    {
        return \false;
    }
    public function isPublic() : bool
    {
        return \true;
    }
    public function getName() : string
    {
        return $this->name;
    }
    /**
     * @deprecated
     * @return mixed
     */
    public function getValue()
    {
        // so that Scope::getTypeFromValue() returns mixed
        return new stdClass();
    }
    public function getValueType() : Type
    {
        return new MixedType();
    }
    public function getValueExpr() : Expr
    {
        return new TypeExpr(new MixedType());
    }
    public function isDeprecated() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getDeprecatedDescription() : ?string
    {
        return null;
    }
    public function isInternal() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getDocComment() : ?string
    {
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Dummy;

use PHPStan\Reflection\Assertions;
use PHPStan\Reflection\ClassMemberReflection;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\ReflectionProviderStaticAccessor;
use PHPStan\Reflection\TrivialParametersAcceptor;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Type;
use stdClass;
class DummyMethodReflection implements ExtendedMethodReflection
{
    /**
     * @var string
     */
    private $name;
    public function __construct(string $name)
    {
        $this->name = $name;
    }
    public function getDeclaringClass() : ClassReflection
    {
        $reflectionProvider = ReflectionProviderStaticAccessor::getInstance();
        return $reflectionProvider->getClass(stdClass::class);
    }
    public function isStatic() : bool
    {
        return \false;
    }
    public function isPrivate() : bool
    {
        return \false;
    }
    public function isPublic() : bool
    {
        return \true;
    }
    public function getName() : string
    {
        return $this->name;
    }
    public function getPrototype() : ClassMemberReflection
    {
        return $this;
    }
    public function getVariants() : array
    {
        return [new TrivialParametersAcceptor()];
    }
    public function isDeprecated() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getDeprecatedDescription() : ?string
    {
        return null;
    }
    public function isFinal() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function isInternal() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getThrowType() : ?Type
    {
        return null;
    }
    public function hasSideEffects() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
    public function getDocComment() : ?string
    {
        return null;
    }
    public function getAsserts() : Assertions
    {
        return Assertions::createEmpty();
    }
    public function getSelfOutType() : ?Type
    {
        return null;
    }
    public function returnsByReference() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Dummy;

use PHPStan\Reflection\Assertions;
use PHPStan\Reflection\ClassMemberReflection;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\ParametersAcceptorWithPhpDocs;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Type;
class ChangedTypeMethodReflection implements ExtendedMethodReflection
{
    /**
     * @var \PHPStan\Reflection\ClassReflection
     */
    private $declaringClass;
    /**
     * @var \PHPStan\Reflection\ExtendedMethodReflection
     */
    private $reflection;
    /**
     * @var ParametersAcceptorWithPhpDocs[]
     */
    private $variants;
    /**
     * @param ParametersAcceptorWithPhpDocs[] $variants
     */
    public function __construct(ClassReflection $declaringClass, ExtendedMethodReflection $reflection, array $variants)
    {
        $this->declaringClass = $declaringClass;
        $this->reflection = $reflection;
        $this->variants = $variants;
    }
    public function getDeclaringClass() : ClassReflection
    {
        return $this->declaringClass;
    }
    public function isStatic() : bool
    {
        return $this->reflection->isStatic();
    }
    public function isPrivate() : bool
    {
        return $this->reflection->isPrivate();
    }
    public function isPublic() : bool
    {
        return $this->reflection->isPublic();
    }
    public function getDocComment() : ?string
    {
        return $this->reflection->getDocComment();
    }
    public function getName() : string
    {
        return $this->reflection->getName();
    }
    public function getPrototype() : ClassMemberReflection
    {
        return $this->reflection->getPrototype();
    }
    public function getVariants() : array
    {
        return $this->variants;
    }
    public function isDeprecated() : TrinaryLogic
    {
        return $this->reflection->isDeprecated();
    }
    public function getDeprecatedDescription() : ?string
    {
        return $this->reflection->getDeprecatedDescription();
    }
    public function isFinal() : TrinaryLogic
    {
        return $this->reflection->isFinal();
    }
    public function isInternal() : TrinaryLogic
    {
        return $this->reflection->isInternal();
    }
    public function getThrowType() : ?Type
    {
        return $this->reflection->getThrowType();
    }
    public function hasSideEffects() : TrinaryLogic
    {
        return $this->reflection->hasSideEffects();
    }
    public function getAsserts() : Assertions
    {
        return $this->reflection->getAsserts();
    }
    public function getSelfOutType() : ?Type
    {
        return $this->reflection->getSelfOutType();
    }
    public function returnsByReference() : TrinaryLogic
    {
        return $this->reflection->returnsByReference();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\Type;
/** @api */
class FunctionVariantWithPhpDocs extends \PHPStan\Reflection\FunctionVariant implements \PHPStan\Reflection\ParametersAcceptorWithPhpDocs
{
    /**
     * @var \PHPStan\Type\Type
     */
    private $phpDocReturnType;
    /**
     * @var \PHPStan\Type\Type
     */
    private $nativeReturnType;
    /**
     * @api
     * @param array<int, ParameterReflectionWithPhpDocs> $parameters
     */
    public function __construct(TemplateTypeMap $templateTypeMap, ?TemplateTypeMap $resolvedTemplateTypeMap, array $parameters, bool $isVariadic, Type $returnType, Type $phpDocReturnType, Type $nativeReturnType)
    {
        $this->phpDocReturnType = $phpDocReturnType;
        $this->nativeReturnType = $nativeReturnType;
        parent::__construct($templateTypeMap, $resolvedTemplateTypeMap, $parameters, $isVariadic, $returnType);
    }
    /**
     * @return array<int, ParameterReflectionWithPhpDocs>
     */
    public function getParameters() : array
    {
        /** @var array<int, ParameterReflectionWithPhpDocs> $parameters */
        $parameters = parent::getParameters();
        return $parameters;
    }
    public function getPhpDocReturnType() : Type
    {
        return $this->phpDocReturnType;
    }
    public function getNativeReturnType() : Type
    {
        return $this->nativeReturnType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Native;

use PHPStan\Reflection\ParameterReflectionWithPhpDocs;
use PHPStan\Reflection\PassedByReference;
use PHPStan\Type\Type;
class NativeParameterWithPhpDocsReflection implements ParameterReflectionWithPhpDocs
{
    /**
     * @var string
     */
    private $name;
    /**
     * @var bool
     */
    private $optional;
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    /**
     * @var \PHPStan\Type\Type
     */
    private $phpDocType;
    /**
     * @var \PHPStan\Type\Type
     */
    private $nativeType;
    /**
     * @var \PHPStan\Reflection\PassedByReference
     */
    private $passedByReference;
    /**
     * @var bool
     */
    private $variadic;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $defaultValue;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $outType;
    public function __construct(string $name, bool $optional, Type $type, Type $phpDocType, Type $nativeType, PassedByReference $passedByReference, bool $variadic, ?Type $defaultValue, ?Type $outType)
    {
        $this->name = $name;
        $this->optional = $optional;
        $this->type = $type;
        $this->phpDocType = $phpDocType;
        $this->nativeType = $nativeType;
        $this->passedByReference = $passedByReference;
        $this->variadic = $variadic;
        $this->defaultValue = $defaultValue;
        $this->outType = $outType;
    }
    public function getName() : string
    {
        return $this->name;
    }
    public function isOptional() : bool
    {
        return $this->optional;
    }
    public function getType() : Type
    {
        return $this->type;
    }
    public function getPhpDocType() : Type
    {
        return $this->phpDocType;
    }
    public function getNativeType() : Type
    {
        return $this->nativeType;
    }
    public function passedByReference() : PassedByReference
    {
        return $this->passedByReference;
    }
    public function isVariadic() : bool
    {
        return $this->variadic;
    }
    public function getDefaultValue() : ?Type
    {
        return $this->defaultValue;
    }
    public function getOutType() : ?Type
    {
        return $this->outType;
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : self
    {
        return new self($properties['name'], $properties['optional'], $properties['type'], $properties['phpDocType'], $properties['nativeType'], $properties['passedByReference'], $properties['variadic'], $properties['defaultValue'], $properties['outType']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Native;

use PHPStan\Reflection\ParameterReflection;
use PHPStan\Reflection\PassedByReference;
use PHPStan\Type\Type;
class NativeParameterReflection implements ParameterReflection
{
    /**
     * @var string
     */
    private $name;
    /**
     * @var bool
     */
    private $optional;
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    /**
     * @var \PHPStan\Reflection\PassedByReference
     */
    private $passedByReference;
    /**
     * @var bool
     */
    private $variadic;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $defaultValue;
    public function __construct(string $name, bool $optional, Type $type, PassedByReference $passedByReference, bool $variadic, ?Type $defaultValue)
    {
        $this->name = $name;
        $this->optional = $optional;
        $this->type = $type;
        $this->passedByReference = $passedByReference;
        $this->variadic = $variadic;
        $this->defaultValue = $defaultValue;
    }
    public function getName() : string
    {
        return $this->name;
    }
    public function isOptional() : bool
    {
        return $this->optional;
    }
    public function getType() : Type
    {
        return $this->type;
    }
    public function passedByReference() : PassedByReference
    {
        return $this->passedByReference;
    }
    public function isVariadic() : bool
    {
        return $this->variadic;
    }
    public function getDefaultValue() : ?Type
    {
        return $this->defaultValue;
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : self
    {
        return new self($properties['name'], $properties['optional'], $properties['type'], $properties['passedByReference'], $properties['variadic'], $properties['defaultValue']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Native;

use PHPStan\Reflection\Assertions;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorWithPhpDocs;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Type;
class NativeFunctionReflection implements FunctionReflection
{
    /**
     * @var \PHPStan\Reflection\Assertions
     */
    private $assertions;
    /**
     * @var \PHPStan\TrinaryLogic
     */
    private $returnsByReference;
    /**
     * @var string
     */
    private $name;
    /**
     * @var ParametersAcceptorWithPhpDocs[]
     */
    private $variants;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $throwType;
    /**
     * @var \PHPStan\TrinaryLogic
     */
    private $hasSideEffects;
    /**
     * @var bool
     */
    private $isDeprecated;
    /**
     * @var string|null
     */
    private $phpDocComment;
    /**
     * @param ParametersAcceptorWithPhpDocs[] $variants
     */
    public function __construct(string $name, array $variants, ?Type $throwType, TrinaryLogic $hasSideEffects, bool $isDeprecated, ?Assertions $assertions = null, ?string $phpDocComment = null, ?TrinaryLogic $returnsByReference = null)
    {
        $this->name = $name;
        $this->variants = $variants;
        $this->throwType = $throwType;
        $this->hasSideEffects = $hasSideEffects;
        $this->isDeprecated = $isDeprecated;
        $this->phpDocComment = $phpDocComment;
        $this->assertions = $assertions ?? Assertions::createEmpty();
        $this->returnsByReference = $returnsByReference ?? TrinaryLogic::createMaybe();
    }
    public function getName() : string
    {
        return $this->name;
    }
    public function getFileName() : ?string
    {
        return null;
    }
    /**
     * @return ParametersAcceptorWithPhpDocs[]
     */
    public function getVariants() : array
    {
        return $this->variants;
    }
    public function getThrowType() : ?Type
    {
        return $this->throwType;
    }
    public function getDeprecatedDescription() : ?string
    {
        return null;
    }
    public function isDeprecated() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->isDeprecated);
    }
    public function isInternal() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFinal() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function hasSideEffects() : TrinaryLogic
    {
        if ($this->isVoid()) {
            return TrinaryLogic::createYes();
        }
        return $this->hasSideEffects;
    }
    private function isVoid() : bool
    {
        foreach ($this->variants as $variant) {
            if (!$variant->getReturnType()->isVoid()->yes()) {
                return \false;
            }
        }
        return \true;
    }
    public function isBuiltin() : bool
    {
        return \true;
    }
    public function getAsserts() : Assertions
    {
        return $this->assertions;
    }
    public function getDocComment() : ?string
    {
        return $this->phpDocComment;
    }
    public function returnsByReference() : TrinaryLogic
    {
        return $this->returnsByReference;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Native;

use PHPStan\Reflection\Assertions;
use PHPStan\Reflection\ClassMemberReflection;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\MethodPrototypeReflection;
use PHPStan\Reflection\ParametersAcceptorWithPhpDocs;
use PHPStan\Reflection\Php\BuiltinMethodReflection;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Type;
use PHPStan\Type\TypehintHelper;
use ReflectionException;
use function strtolower;
class NativeMethodReflection implements ExtendedMethodReflection
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Reflection\ClassReflection
     */
    private $declaringClass;
    /**
     * @var \PHPStan\Reflection\Php\BuiltinMethodReflection
     */
    private $reflection;
    /**
     * @var ParametersAcceptorWithPhpDocs[]
     */
    private $variants;
    /**
     * @var \PHPStan\TrinaryLogic
     */
    private $hasSideEffects;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $throwType;
    /**
     * @var \PHPStan\Reflection\Assertions
     */
    private $assertions;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $selfOutType;
    /**
     * @var string|null
     */
    private $phpDocComment;
    /**
     * @param ParametersAcceptorWithPhpDocs[] $variants
     */
    public function __construct(ReflectionProvider $reflectionProvider, ClassReflection $declaringClass, BuiltinMethodReflection $reflection, array $variants, TrinaryLogic $hasSideEffects, ?Type $throwType, Assertions $assertions, ?Type $selfOutType, ?string $phpDocComment)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->declaringClass = $declaringClass;
        $this->reflection = $reflection;
        $this->variants = $variants;
        $this->hasSideEffects = $hasSideEffects;
        $this->throwType = $throwType;
        $this->assertions = $assertions;
        $this->selfOutType = $selfOutType;
        $this->phpDocComment = $phpDocComment;
    }
    public function getDeclaringClass() : ClassReflection
    {
        return $this->declaringClass;
    }
    public function isStatic() : bool
    {
        return $this->reflection->isStatic();
    }
    public function isPrivate() : bool
    {
        return $this->reflection->isPrivate();
    }
    public function isPublic() : bool
    {
        return $this->reflection->isPublic();
    }
    public function isAbstract() : bool
    {
        return $this->reflection->isAbstract();
    }
    public function getPrototype() : ClassMemberReflection
    {
        try {
            $prototypeMethod = $this->reflection->getPrototype();
            $prototypeDeclaringClass = $this->declaringClass->getAncestorWithClassName($prototypeMethod->getDeclaringClass()->getName());
            if ($prototypeDeclaringClass === null) {
                $prototypeDeclaringClass = $this->reflectionProvider->getClass($prototypeMethod->getDeclaringClass()->getName());
            }
            $tentativeReturnType = null;
            if ($prototypeMethod->getTentativeReturnType() !== null) {
                $tentativeReturnType = TypehintHelper::decideTypeFromReflection($prototypeMethod->getTentativeReturnType());
            }
            return new MethodPrototypeReflection($prototypeMethod->getName(), $prototypeDeclaringClass, $prototypeMethod->isStatic(), $prototypeMethod->isPrivate(), $prototypeMethod->isPublic(), $prototypeMethod->isAbstract(), $prototypeMethod->isFinal(), $prototypeDeclaringClass->getNativeMethod($prototypeMethod->getName())->getVariants(), $tentativeReturnType);
        } catch (ReflectionException $exception) {
            return $this;
        }
    }
    public function getName() : string
    {
        return $this->reflection->getName();
    }
    public function getVariants() : array
    {
        return $this->variants;
    }
    public function getDeprecatedDescription() : ?string
    {
        return null;
    }
    public function isDeprecated() : TrinaryLogic
    {
        return $this->reflection->isDeprecated();
    }
    public function isInternal() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isFinal() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->reflection->isFinal());
    }
    public function getThrowType() : ?Type
    {
        return $this->throwType;
    }
    public function hasSideEffects() : TrinaryLogic
    {
        $name = strtolower($this->getName());
        $isVoid = $this->isVoid();
        if ($name !== '__construct' && $isVoid) {
            return TrinaryLogic::createYes();
        }
        return $this->hasSideEffects;
    }
    private function isVoid() : bool
    {
        foreach ($this->variants as $variant) {
            if (!$variant->getReturnType()->isVoid()->yes()) {
                return \false;
            }
        }
        return \true;
    }
    public function getDocComment() : ?string
    {
        return $this->phpDocComment;
    }
    public function getAsserts() : Assertions
    {
        return $this->assertions;
    }
    public function getSelfOutType() : ?Type
    {
        return $this->selfOutType;
    }
    public function returnsByReference() : TrinaryLogic
    {
        return $this->reflection->returnsByReference();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PHPStan\TrinaryLogic;
use PHPStan\Type\Type;
/** @api */
interface PropertyReflection extends \PHPStan\Reflection\ClassMemberReflection
{
    public function getReadableType() : Type;
    public function getWritableType() : Type;
    public function canChangeTypeAfterAssignment() : bool;
    public function isReadable() : bool;
    public function isWritable() : bool;
    public function isDeprecated() : TrinaryLogic;
    public function getDeprecatedDescription() : ?string;
    public function isInternal() : TrinaryLogic;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Annotations;

use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Type;
class AnnotationPropertyReflection implements PropertyReflection
{
    /**
     * @var \PHPStan\Reflection\ClassReflection
     */
    private $declaringClass;
    /**
     * @var \PHPStan\Type\Type
     */
    private $readableType;
    /**
     * @var \PHPStan\Type\Type
     */
    private $writableType;
    /**
     * @var bool
     */
    private $readable;
    /**
     * @var bool
     */
    private $writable;
    public function __construct(ClassReflection $declaringClass, Type $readableType, Type $writableType, bool $readable, bool $writable)
    {
        $this->declaringClass = $declaringClass;
        $this->readableType = $readableType;
        $this->writableType = $writableType;
        $this->readable = $readable;
        $this->writable = $writable;
    }
    public function getDeclaringClass() : ClassReflection
    {
        return $this->declaringClass;
    }
    public function isStatic() : bool
    {
        return \false;
    }
    public function isPrivate() : bool
    {
        return \false;
    }
    public function isPublic() : bool
    {
        return \true;
    }
    public function getReadableType() : Type
    {
        return $this->readableType;
    }
    public function getWritableType() : Type
    {
        return $this->writableType;
    }
    public function canChangeTypeAfterAssignment() : bool
    {
        return $this->readableType->equals($this->writableType);
    }
    public function isReadable() : bool
    {
        return $this->readable;
    }
    public function isWritable() : bool
    {
        return $this->writable;
    }
    public function isDeprecated() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getDeprecatedDescription() : ?string
    {
        return null;
    }
    public function isInternal() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getDocComment() : ?string
    {
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Annotations;

use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\MethodsClassReflectionExtension;
use PHPStan\Type\Generic\TemplateTypeHelper;
use function count;
class AnnotationsMethodsClassReflectionExtension implements MethodsClassReflectionExtension
{
    /** @var ExtendedMethodReflection[][] */
    private $methods = [];
    public function hasMethod(ClassReflection $classReflection, string $methodName) : bool
    {
        if (!isset($this->methods[$classReflection->getCacheKey()][$methodName])) {
            $method = $this->findClassReflectionWithMethod($classReflection, $classReflection, $methodName);
            if ($method === null) {
                return \false;
            }
            $this->methods[$classReflection->getCacheKey()][$methodName] = $method;
        }
        return isset($this->methods[$classReflection->getCacheKey()][$methodName]);
    }
    /**
     * @return ExtendedMethodReflection
     */
    public function getMethod(ClassReflection $classReflection, string $methodName) : MethodReflection
    {
        return $this->methods[$classReflection->getCacheKey()][$methodName];
    }
    private function findClassReflectionWithMethod(ClassReflection $classReflection, ClassReflection $declaringClass, string $methodName) : ?ExtendedMethodReflection
    {
        $methodTags = $classReflection->getMethodTags();
        if (isset($methodTags[$methodName])) {
            $parameters = [];
            foreach ($methodTags[$methodName]->getParameters() as $parameterName => $parameterTag) {
                $parameters[] = new \PHPStan\Reflection\Annotations\AnnotationsMethodParameterReflection($parameterName, $parameterTag->getType(), $parameterTag->passedByReference(), $parameterTag->isOptional(), $parameterTag->isVariadic(), $parameterTag->getDefaultValue());
            }
            $isStatic = $methodTags[$methodName]->isStatic();
            $nativeCallMethodName = $isStatic ? '__callStatic' : '__call';
            return new \PHPStan\Reflection\Annotations\AnnotationMethodReflection($methodName, $declaringClass, TemplateTypeHelper::resolveTemplateTypes($methodTags[$methodName]->getReturnType(), $classReflection->getActiveTemplateTypeMap()), $parameters, $isStatic, $this->detectMethodVariadic($parameters), $classReflection->hasNativeMethod($nativeCallMethodName) ? $classReflection->getNativeMethod($nativeCallMethodName)->getThrowType() : null);
        }
        foreach ($classReflection->getTraits() as $traitClass) {
            $methodWithDeclaringClass = $this->findClassReflectionWithMethod($traitClass, $classReflection, $methodName);
            if ($methodWithDeclaringClass === null) {
                continue;
            }
            return $methodWithDeclaringClass;
        }
        foreach ($classReflection->getParents() as $parentClass) {
            $methodWithDeclaringClass = $this->findClassReflectionWithMethod($parentClass, $parentClass, $methodName);
            if ($methodWithDeclaringClass === null) {
                foreach ($parentClass->getTraits() as $traitClass) {
                    $parentTraitMethodWithDeclaringClass = $this->findClassReflectionWithMethod($traitClass, $parentClass, $methodName);
                    if ($parentTraitMethodWithDeclaringClass === null) {
                        continue;
                    }
                    return $parentTraitMethodWithDeclaringClass;
                }
                continue;
            }
            return $methodWithDeclaringClass;
        }
        foreach ($classReflection->getInterfaces() as $interfaceClass) {
            $methodWithDeclaringClass = $this->findClassReflectionWithMethod($interfaceClass, $interfaceClass, $methodName);
            if ($methodWithDeclaringClass === null) {
                continue;
            }
            return $methodWithDeclaringClass;
        }
        return null;
    }
    /**
     * @param AnnotationsMethodParameterReflection[] $parameters
     */
    private function detectMethodVariadic(array $parameters) : bool
    {
        if ($parameters === []) {
            return \false;
        }
        $possibleVariadicParameterIndex = count($parameters) - 1;
        $possibleVariadicParameter = $parameters[$possibleVariadicParameterIndex];
        return $possibleVariadicParameter->isVariadic();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Annotations;

use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\PropertiesClassReflectionExtension;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Type\Generic\TemplateTypeHelper;
use PHPStan\Type\NeverType;
class AnnotationsPropertiesClassReflectionExtension implements PropertiesClassReflectionExtension
{
    /** @var PropertyReflection[][] */
    private $properties = [];
    public function hasProperty(ClassReflection $classReflection, string $propertyName) : bool
    {
        if (!isset($this->properties[$classReflection->getCacheKey()][$propertyName])) {
            $property = $this->findClassReflectionWithProperty($classReflection, $classReflection, $propertyName);
            if ($property === null) {
                return \false;
            }
            $this->properties[$classReflection->getCacheKey()][$propertyName] = $property;
        }
        return isset($this->properties[$classReflection->getCacheKey()][$propertyName]);
    }
    public function getProperty(ClassReflection $classReflection, string $propertyName) : PropertyReflection
    {
        return $this->properties[$classReflection->getCacheKey()][$propertyName];
    }
    private function findClassReflectionWithProperty(ClassReflection $classReflection, ClassReflection $declaringClass, string $propertyName) : ?PropertyReflection
    {
        $propertyTags = $classReflection->getPropertyTags();
        if (isset($propertyTags[$propertyName])) {
            $propertyTag = $propertyTags[$propertyName];
            $isReadable = $propertyTags[$propertyName]->isReadable();
            $isWritable = $propertyTags[$propertyName]->isWritable();
            if ($classReflection->hasNativeProperty($propertyName)) {
                $nativeProperty = $classReflection->getNativeProperty($propertyName);
                $isReadable = $isReadable || $nativeProperty->isReadable();
                $isWritable = $isWritable || $nativeProperty->isWritable();
            }
            return new \PHPStan\Reflection\Annotations\AnnotationPropertyReflection($declaringClass, TemplateTypeHelper::resolveTemplateTypes($propertyTag->getReadableType() ?? new NeverType(), $classReflection->getActiveTemplateTypeMap()), TemplateTypeHelper::resolveTemplateTypes($propertyTag->getWritableType() ?? new NeverType(), $classReflection->getActiveTemplateTypeMap()), $isReadable, $isWritable);
        }
        foreach ($classReflection->getTraits() as $traitClass) {
            $methodWithDeclaringClass = $this->findClassReflectionWithProperty($traitClass, $classReflection, $propertyName);
            if ($methodWithDeclaringClass === null) {
                continue;
            }
            return $methodWithDeclaringClass;
        }
        foreach ($classReflection->getParents() as $parentClass) {
            $methodWithDeclaringClass = $this->findClassReflectionWithProperty($parentClass, $parentClass, $propertyName);
            if ($methodWithDeclaringClass === null) {
                foreach ($parentClass->getTraits() as $traitClass) {
                    $parentTraitMethodWithDeclaringClass = $this->findClassReflectionWithProperty($traitClass, $parentClass, $propertyName);
                    if ($parentTraitMethodWithDeclaringClass === null) {
                        continue;
                    }
                    return $parentTraitMethodWithDeclaringClass;
                }
                continue;
            }
            return $methodWithDeclaringClass;
        }
        foreach ($classReflection->getInterfaces() as $interfaceClass) {
            $methodWithDeclaringClass = $this->findClassReflectionWithProperty($interfaceClass, $interfaceClass, $propertyName);
            if ($methodWithDeclaringClass === null) {
                continue;
            }
            return $methodWithDeclaringClass;
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Annotations;

use PHPStan\Reflection\ParameterReflectionWithPhpDocs;
use PHPStan\Reflection\PassedByReference;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
class AnnotationsMethodParameterReflection implements ParameterReflectionWithPhpDocs
{
    /**
     * @var string
     */
    private $name;
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    /**
     * @var \PHPStan\Reflection\PassedByReference
     */
    private $passedByReference;
    /**
     * @var bool
     */
    private $isOptional;
    /**
     * @var bool
     */
    private $isVariadic;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $defaultValue;
    public function __construct(string $name, Type $type, PassedByReference $passedByReference, bool $isOptional, bool $isVariadic, ?Type $defaultValue)
    {
        $this->name = $name;
        $this->type = $type;
        $this->passedByReference = $passedByReference;
        $this->isOptional = $isOptional;
        $this->isVariadic = $isVariadic;
        $this->defaultValue = $defaultValue;
    }
    public function getName() : string
    {
        return $this->name;
    }
    public function isOptional() : bool
    {
        return $this->isOptional;
    }
    public function getType() : Type
    {
        return $this->type;
    }
    public function getPhpDocType() : Type
    {
        return $this->type;
    }
    public function getNativeType() : Type
    {
        return new MixedType();
    }
    public function getOutType() : ?Type
    {
        return null;
    }
    public function passedByReference() : PassedByReference
    {
        return $this->passedByReference;
    }
    public function isVariadic() : bool
    {
        return $this->isVariadic;
    }
    public function getDefaultValue() : ?Type
    {
        return $this->defaultValue;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Annotations;

use PHPStan\Reflection\Assertions;
use PHPStan\Reflection\ClassMemberReflection;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\FunctionVariantWithPhpDocs;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
class AnnotationMethodReflection implements ExtendedMethodReflection
{
    /** @var FunctionVariantWithPhpDocs[]|null */
    private $variants;
    /**
     * @var string
     */
    private $name;
    /**
     * @var \PHPStan\Reflection\ClassReflection
     */
    private $declaringClass;
    /**
     * @var \PHPStan\Type\Type
     */
    private $returnType;
    /**
     * @var AnnotationsMethodParameterReflection[]
     */
    private $parameters;
    /**
     * @var bool
     */
    private $isStatic;
    /**
     * @var bool
     */
    private $isVariadic;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $throwType;
    /**
     * @param AnnotationsMethodParameterReflection[] $parameters
     */
    public function __construct(string $name, ClassReflection $declaringClass, Type $returnType, array $parameters, bool $isStatic, bool $isVariadic, ?Type $throwType)
    {
        $this->name = $name;
        $this->declaringClass = $declaringClass;
        $this->returnType = $returnType;
        $this->parameters = $parameters;
        $this->isStatic = $isStatic;
        $this->isVariadic = $isVariadic;
        $this->throwType = $throwType;
    }
    public function getDeclaringClass() : ClassReflection
    {
        return $this->declaringClass;
    }
    public function getPrototype() : ClassMemberReflection
    {
        return $this;
    }
    public function isStatic() : bool
    {
        return $this->isStatic;
    }
    public function isPrivate() : bool
    {
        return \false;
    }
    public function isPublic() : bool
    {
        return \true;
    }
    public function getName() : string
    {
        return $this->name;
    }
    public function getVariants() : array
    {
        if ($this->variants === null) {
            $this->variants = [new FunctionVariantWithPhpDocs(TemplateTypeMap::createEmpty(), null, $this->parameters, $this->isVariadic, $this->returnType, $this->returnType, new MixedType())];
        }
        return $this->variants;
    }
    public function isDeprecated() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getDeprecatedDescription() : ?string
    {
        return null;
    }
    public function isFinal() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isInternal() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getThrowType() : ?Type
    {
        return $this->throwType;
    }
    public function hasSideEffects() : TrinaryLogic
    {
        if ($this->returnType->isVoid()->yes()) {
            return TrinaryLogic::createYes();
        }
        return TrinaryLogic::createMaybe();
    }
    public function getDocComment() : ?string
    {
        return null;
    }
    public function getAsserts() : Assertions
    {
        return Assertions::createEmpty();
    }
    public function getSelfOutType() : ?Type
    {
        return null;
    }
    public function returnsByReference() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Function_;
use PHPStan\Analyser\Scope;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionFunction;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionParameter;
use PHPStan\BetterReflection\Reflection\ReflectionConstant;
use function array_slice;
use function count;
use function explode;
use function implode;
use function sprintf;
/** @api */
class InitializerExprContext implements \PHPStan\Reflection\NamespaceAnswerer
{
    /**
     * @var string|null
     */
    private $file;
    /**
     * @var string|null
     */
    private $namespace;
    /**
     * @var string|null
     */
    private $className;
    /**
     * @var string|null
     */
    private $traitName;
    /**
     * @var string|null
     */
    private $function;
    /**
     * @var string|null
     */
    private $method;
    private function __construct(?string $file, ?string $namespace, ?string $className, ?string $traitName, ?string $function, ?string $method)
    {
        $this->file = $file;
        $this->namespace = $namespace;
        $this->className = $className;
        $this->traitName = $traitName;
        $this->function = $function;
        $this->method = $method;
    }
    public static function fromScope(Scope $scope) : self
    {
        return new self($scope->getFile(), $scope->getNamespace(), $scope->isInClass() ? $scope->getClassReflection()->getName() : null, $scope->isInTrait() ? $scope->getTraitReflection()->getName() : null, $scope->isInAnonymousFunction() ? '{closure}' : ($scope->getFunction() !== null ? $scope->getFunction()->getName() : null), $scope->isInAnonymousFunction() ? '{closure}' : ($scope->getFunction() instanceof \PHPStan\Reflection\MethodReflection ? sprintf('%s::%s', $scope->getFunction()->getDeclaringClass()->getName(), $scope->getFunction()->getName()) : ($scope->getFunction() instanceof \PHPStan\Reflection\FunctionReflection ? $scope->getFunction()->getName() : null)));
    }
    private static function parseNamespace(string $name) : ?string
    {
        $parts = explode('\\', $name);
        if (count($parts) > 1) {
            return implode('\\', array_slice($parts, 0, -1));
        }
        return null;
    }
    public static function fromClassReflection(\PHPStan\Reflection\ClassReflection $classReflection) : self
    {
        $className = $classReflection->getName();
        return new self($classReflection->getFileName(), self::parseNamespace($className), $className, null, null, null);
    }
    public static function fromReflectionParameter(ReflectionParameter $parameter) : self
    {
        $declaringFunction = $parameter->getDeclaringFunction();
        if ($declaringFunction instanceof ReflectionFunction) {
            $file = $declaringFunction->getFileName();
            return new self($file === \false ? null : $file, self::parseNamespace($declaringFunction->getName()), null, null, $declaringFunction->getName(), $declaringFunction->getName());
        }
        $file = $declaringFunction->getFileName();
        $betterReflection = $declaringFunction->getBetterReflection();
        return new self($file === \false ? null : $file, self::parseNamespace($betterReflection->getDeclaringClass()->getName()), $declaringFunction->getDeclaringClass()->getName(), $betterReflection->getDeclaringClass()->isTrait() ? $betterReflection->getDeclaringClass()->getName() : null, $declaringFunction->getName(), sprintf('%s::%s', $declaringFunction->getDeclaringClass()->getName(), $declaringFunction->getName()));
    }
    /**
     * @param \PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Function_ $function
     */
    public static function fromStubParameter(?string $className, string $stubFile, $function) : self
    {
        $namespace = null;
        if ($className !== null) {
            $namespace = self::parseNamespace($className);
        } else {
            if ($function instanceof Function_ && $function->namespacedName !== null) {
                $namespace = self::parseNamespace($function->namespacedName->toString());
            }
        }
        return new self($stubFile, $namespace, $className, null, $function instanceof Function_ && $function->namespacedName !== null ? $function->namespacedName->toString() : ($function instanceof ClassMethod ? $function->name->toString() : null), $function instanceof ClassMethod && $className !== null ? sprintf('%s::%s', $className, $function->name->toString()) : ($function instanceof Function_ && $function->namespacedName !== null ? $function->namespacedName->toString() : null));
    }
    public static function fromGlobalConstant(ReflectionConstant $constant) : self
    {
        return new self($constant->getFileName(), $constant->getNamespaceName(), null, null, null, null);
    }
    public static function createEmpty() : self
    {
        return new self(null, null, null, null, null, null);
    }
    public function getFile() : ?string
    {
        return $this->file;
    }
    public function getClassName() : ?string
    {
        return $this->className;
    }
    public function getNamespace() : ?string
    {
        return $this->namespace;
    }
    public function getTraitName() : ?string
    {
        return $this->traitName;
    }
    public function getFunction() : ?string
    {
        return $this->function;
    }
    public function getMethod() : ?string
    {
        return $this->method;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

/** @api */
interface NamespaceAnswerer
{
    public function getNamespace() : ?string;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PHPStan\Type\Type;
class MethodPrototypeReflection implements \PHPStan\Reflection\ClassMemberReflection
{
    /**
     * @var string
     */
    private $name;
    /**
     * @var \PHPStan\Reflection\ClassReflection
     */
    private $declaringClass;
    /**
     * @var bool
     */
    private $isStatic;
    /**
     * @var bool
     */
    private $isPrivate;
    /**
     * @var bool
     */
    private $isPublic;
    /**
     * @var bool
     */
    private $isAbstract;
    /**
     * @var bool
     */
    private $isFinal;
    /**
     * @var ParametersAcceptor[]
     */
    private $variants;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $tentativeReturnType;
    /**
     * @param ParametersAcceptor[] $variants
     */
    public function __construct(string $name, \PHPStan\Reflection\ClassReflection $declaringClass, bool $isStatic, bool $isPrivate, bool $isPublic, bool $isAbstract, bool $isFinal, array $variants, ?Type $tentativeReturnType)
    {
        $this->name = $name;
        $this->declaringClass = $declaringClass;
        $this->isStatic = $isStatic;
        $this->isPrivate = $isPrivate;
        $this->isPublic = $isPublic;
        $this->isAbstract = $isAbstract;
        $this->isFinal = $isFinal;
        $this->variants = $variants;
        $this->tentativeReturnType = $tentativeReturnType;
    }
    public function getName() : string
    {
        return $this->name;
    }
    public function getDeclaringClass() : \PHPStan\Reflection\ClassReflection
    {
        return $this->declaringClass;
    }
    public function isStatic() : bool
    {
        return $this->isStatic;
    }
    public function isPrivate() : bool
    {
        return $this->isPrivate;
    }
    public function isPublic() : bool
    {
        return $this->isPublic;
    }
    public function isAbstract() : bool
    {
        return $this->isAbstract;
    }
    public function isFinal() : bool
    {
        return $this->isFinal;
    }
    public function getDocComment() : ?string
    {
        return null;
    }
    /**
     * @return ParametersAcceptor[]
     */
    public function getVariants() : array
    {
        return $this->variants;
    }
    public function getTentativeReturnType() : ?Type
    {
        return $this->tentativeReturnType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PHPStan\Type\Type;
/** @api */
interface ParametersAcceptorWithPhpDocs extends \PHPStan\Reflection\ParametersAcceptor
{
    /**
     * @return array<int, ParameterReflectionWithPhpDocs>
     */
    public function getParameters() : array;
    public function getPhpDocReturnType() : Type;
    public function getNativeReturnType() : Type;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use Exception;
use function sprintf;
class MissingPropertyFromReflectionException extends Exception
{
    public function __construct(string $className, string $propertyName)
    {
        parent::__construct(sprintf('Property $%s was not found in reflection of class %s.', $propertyName, $className));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PhpParser\Node\Expr;
use PHPStan\BetterReflection\NodeCompiler\Exception\UnableToCompileNode;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClassConstant;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Type;
use const NAN;
class ClassConstantReflection implements \PHPStan\Reflection\ConstantReflection
{
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $valueType;
    /**
     * @var \PHPStan\Reflection\InitializerExprTypeResolver
     */
    private $initializerExprTypeResolver;
    /**
     * @var \PHPStan\Reflection\ClassReflection
     */
    private $declaringClass;
    /**
     * @var \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClassConstant
     */
    private $reflection;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $phpDocType;
    /**
     * @var string|null
     */
    private $deprecatedDescription;
    /**
     * @var bool
     */
    private $isDeprecated;
    /**
     * @var bool
     */
    private $isInternal;
    public function __construct(\PHPStan\Reflection\InitializerExprTypeResolver $initializerExprTypeResolver, \PHPStan\Reflection\ClassReflection $declaringClass, ReflectionClassConstant $reflection, ?Type $phpDocType, ?string $deprecatedDescription, bool $isDeprecated, bool $isInternal)
    {
        $this->initializerExprTypeResolver = $initializerExprTypeResolver;
        $this->declaringClass = $declaringClass;
        $this->reflection = $reflection;
        $this->phpDocType = $phpDocType;
        $this->deprecatedDescription = $deprecatedDescription;
        $this->isDeprecated = $isDeprecated;
        $this->isInternal = $isInternal;
    }
    public function getName() : string
    {
        return $this->reflection->getName();
    }
    public function getFileName() : ?string
    {
        return $this->declaringClass->getFileName();
    }
    /**
     * @deprecated Use getValueExpr()
     * @return mixed
     */
    public function getValue()
    {
        try {
            return $this->reflection->getValue();
        } catch (UnableToCompileNode $exception) {
            return NAN;
        }
    }
    public function getValueExpr() : Expr
    {
        return $this->reflection->getValueExpression();
    }
    public function hasPhpDocType() : bool
    {
        return $this->phpDocType !== null;
    }
    public function getValueType() : Type
    {
        if ($this->valueType === null) {
            if ($this->phpDocType === null) {
                $this->valueType = $this->initializerExprTypeResolver->getType($this->getValueExpr(), \PHPStan\Reflection\InitializerExprContext::fromClassReflection($this->declaringClass));
            } else {
                $this->valueType = $this->phpDocType;
            }
        }
        return $this->valueType;
    }
    public function getDeclaringClass() : \PHPStan\Reflection\ClassReflection
    {
        return $this->declaringClass;
    }
    public function isStatic() : bool
    {
        return \true;
    }
    public function isPrivate() : bool
    {
        return $this->reflection->isPrivate();
    }
    public function isPublic() : bool
    {
        return $this->reflection->isPublic();
    }
    public function isFinal() : bool
    {
        return $this->reflection->isFinal();
    }
    public function isDeprecated() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->isDeprecated);
    }
    public function getDeprecatedDescription() : ?string
    {
        if ($this->isDeprecated) {
            return $this->deprecatedDescription;
        }
        return null;
    }
    public function isInternal() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->isInternal);
    }
    public function getDocComment() : ?string
    {
        $docComment = $this->reflection->getDocComment();
        if ($docComment === \false) {
            return null;
        }
        return $docComment;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PHPStan\TrinaryLogic;
use PHPStan\Type\Type;
/**
 * The purpose of this interface is to be able to
 * answer more questions about methods
 * without breaking backward compatibility
 * with existing MethodsClassReflectionExtension.
 *
 * Developers are meant to only implement MethodReflection
 * and its methods in their code.
 *
 * New methods on ExtendedMethodReflection will be added
 * in minor versions.
 *
 * @api
 */
interface ExtendedMethodReflection extends \PHPStan\Reflection\MethodReflection
{
    /**
     * @return ParametersAcceptorWithPhpDocs[]
     */
    public function getVariants() : array;
    public function getAsserts() : \PHPStan\Reflection\Assertions;
    public function getSelfOutType() : ?Type;
    public function returnsByReference() : TrinaryLogic;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use function array_key_exists;
/** @api */
class PassedByReference
{
    private const NO = 1;
    private const READS_ARGUMENT = 2;
    private const CREATES_NEW_VARIABLE = 3;
    /** @var self[] */
    private static $registry = [];
    /**
     * @var int
     */
    private $value;
    private function __construct(int $value)
    {
        $this->value = $value;
    }
    private static function create(int $value) : self
    {
        if (!array_key_exists($value, self::$registry)) {
            self::$registry[$value] = new self($value);
        }
        return self::$registry[$value];
    }
    public static function createNo() : self
    {
        return self::create(self::NO);
    }
    public static function createCreatesNewVariable() : self
    {
        return self::create(self::CREATES_NEW_VARIABLE);
    }
    public static function createReadsArgument() : self
    {
        return self::create(self::READS_ARGUMENT);
    }
    public function no() : bool
    {
        return $this->value === self::NO;
    }
    public function yes() : bool
    {
        return !$this->no();
    }
    public function equals(self $other) : bool
    {
        return $this->value === $other->value;
    }
    public function createsNewVariable() : bool
    {
        return $this->value === self::CREATES_NEW_VARIABLE;
    }
    public function combine(self $other) : self
    {
        if ($this->value > $other->value) {
            return $this;
        } elseif ($this->value < $other->value) {
            return $other;
        }
        return $this;
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : self
    {
        return new self($properties['value']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PHPStan\DependencyInjection\Container;
use ReflectionException;
use function array_key_exists;
use function explode;
final class ConstructorsHelper
{
    /** @var array<string, list<string>> */
    private $additionalConstructorsCache = [];
    /**
     * @var \PHPStan\DependencyInjection\Container
     */
    private $container;
    /**
     * @var list<string>
     */
    private $additionalConstructors;
    /**
     * @param list<string> $additionalConstructors
     */
    public function __construct(Container $container, array $additionalConstructors)
    {
        $this->container = $container;
        $this->additionalConstructors = $additionalConstructors;
    }
    /**
     * @return list<string>
     */
    public function getConstructors(\PHPStan\Reflection\ClassReflection $classReflection) : array
    {
        if (array_key_exists($classReflection->getName(), $this->additionalConstructorsCache)) {
            return $this->additionalConstructorsCache[$classReflection->getName()];
        }
        $constructors = [];
        if ($classReflection->hasConstructor()) {
            $constructors[] = $classReflection->getConstructor()->getName();
        }
        /** @var AdditionalConstructorsExtension[] $extensions */
        $extensions = $this->container->getServicesByTag(\PHPStan\Reflection\AdditionalConstructorsExtension::EXTENSION_TAG);
        foreach ($extensions as $extension) {
            $extensionConstructors = $extension->getAdditionalConstructors($classReflection);
            foreach ($extensionConstructors as $extensionConstructor) {
                $constructors[] = $extensionConstructor;
            }
        }
        $nativeReflection = $classReflection->getNativeReflection();
        foreach ($this->additionalConstructors as $additionalConstructor) {
            [$className, $methodName] = explode('::', $additionalConstructor);
            if (!$nativeReflection->hasMethod($methodName)) {
                continue;
            }
            $nativeMethod = $nativeReflection->getMethod($methodName);
            if ($nativeMethod->getDeclaringClass()->getName() !== $nativeReflection->getName()) {
                continue;
            }
            try {
                $prototype = $nativeMethod->getPrototype();
            } catch (ReflectionException $exception) {
                $prototype = $nativeMethod;
            }
            if ($prototype->getDeclaringClass()->getName() !== $className) {
                continue;
            }
            $constructors[] = $methodName;
        }
        $this->additionalConstructorsCache[$classReflection->getName()] = $constructors;
        return $constructors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\SignatureMap;

use PhpParser\Node\Expr\Variable;
use PhpParser\Node\FunctionLike;
use PhpParser\Node\Scalar\String_;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Function_;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod;
use PHPStan\Php\PhpVersion;
use PHPStan\Php8StubsMap;
use PHPStan\PhpDoc\Tag\ParamTag;
use PHPStan\Reflection\BetterReflection\SourceLocator\FileNodesFetcher;
use PHPStan\Reflection\InitializerExprContext;
use PHPStan\Reflection\InitializerExprTypeResolver;
use PHPStan\Reflection\PassedByReference;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\FileTypeMapper;
use PHPStan\Type\MixedType;
use PHPStan\Type\ParserNodeTypeToPHPStanType;
use PHPStan\Type\Type;
use PHPStan\Type\TypehintHelper;
use ReflectionFunctionAbstract;
use function array_key_exists;
use function array_map;
use function count;
use function explode;
use function is_string;
use function sprintf;
use function strtolower;
class Php8SignatureMapProvider implements \PHPStan\Reflection\SignatureMap\SignatureMapProvider
{
    private const DIRECTORY = __DIR__ . '/../../../vendor/phpstan/php-8-stubs';
    /** @var array<string, array<string, array{ClassMethod, string}>> */
    private $methodNodes = [];
    /**
     * @var \PHPStan\Php8StubsMap
     */
    private $map;
    /**
     * @var \PHPStan\Reflection\SignatureMap\FunctionSignatureMapProvider
     */
    private $functionSignatureMapProvider;
    /**
     * @var \PHPStan\Reflection\BetterReflection\SourceLocator\FileNodesFetcher
     */
    private $fileNodesFetcher;
    /**
     * @var \PHPStan\Type\FileTypeMapper
     */
    private $fileTypeMapper;
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    /**
     * @var \PHPStan\Reflection\InitializerExprTypeResolver
     */
    private $initializerExprTypeResolver;
    public function __construct(\PHPStan\Reflection\SignatureMap\FunctionSignatureMapProvider $functionSignatureMapProvider, FileNodesFetcher $fileNodesFetcher, FileTypeMapper $fileTypeMapper, PhpVersion $phpVersion, InitializerExprTypeResolver $initializerExprTypeResolver)
    {
        $this->functionSignatureMapProvider = $functionSignatureMapProvider;
        $this->fileNodesFetcher = $fileNodesFetcher;
        $this->fileTypeMapper = $fileTypeMapper;
        $this->phpVersion = $phpVersion;
        $this->initializerExprTypeResolver = $initializerExprTypeResolver;
        $this->map = new Php8StubsMap($phpVersion->getVersionId());
    }
    public function hasMethodSignature(string $className, string $methodName) : bool
    {
        $lowerClassName = strtolower($className);
        if ($lowerClassName === 'backedenum') {
            return \false;
        }
        if (!array_key_exists($lowerClassName, $this->map->classes)) {
            return $this->functionSignatureMapProvider->hasMethodSignature($className, $methodName);
        }
        if ($this->findMethodNode($className, $methodName) === null) {
            return $this->functionSignatureMapProvider->hasMethodSignature($className, $methodName);
        }
        return \true;
    }
    /**
     * @return array{ClassMethod, string}|null
     * @throws ShouldNotHappenException
     */
    private function findMethodNode(string $className, string $methodName) : ?array
    {
        $lowerClassName = strtolower($className);
        $lowerMethodName = strtolower($methodName);
        if (isset($this->methodNodes[$lowerClassName][$lowerMethodName])) {
            return $this->methodNodes[$lowerClassName][$lowerMethodName];
        }
        $stubFile = self::DIRECTORY . '/' . $this->map->classes[$lowerClassName];
        $nodes = $this->fileNodesFetcher->fetchNodes($stubFile);
        $classes = $nodes->getClassNodes();
        if (count($classes) !== 1) {
            throw new ShouldNotHappenException(sprintf('Class %s stub not found in %s.', $className, $stubFile));
        }
        $class = $classes[$lowerClassName];
        if (count($class) !== 1) {
            throw new ShouldNotHappenException(sprintf('Class %s stub not found in %s.', $className, $stubFile));
        }
        foreach ($class[0]->getNode()->stmts as $stmt) {
            if (!$stmt instanceof ClassMethod) {
                continue;
            }
            if ($stmt->name->toLowerString() === $lowerMethodName) {
                if (!$this->isForCurrentVersion($stmt)) {
                    continue;
                }
                return $this->methodNodes[$lowerClassName][$lowerMethodName] = [$stmt, $stubFile];
            }
        }
        return null;
    }
    private function isForCurrentVersion(FunctionLike $functionLike) : bool
    {
        foreach ($functionLike->getAttrGroups() as $attrGroup) {
            foreach ($attrGroup->attrs as $attr) {
                if ($attr->name->toString() === 'Until') {
                    $arg = $attr->args[0]->value;
                    if (!$arg instanceof String_) {
                        throw new ShouldNotHappenException();
                    }
                    $parts = explode('.', $arg->value);
                    $versionId = (int) $parts[0] * 10000 + (int) ($parts[1] ?? 0) * 100 + (int) ($parts[2] ?? 0);
                    if ($this->phpVersion->getVersionId() >= $versionId) {
                        return \false;
                    }
                }
                if ($attr->name->toString() !== 'Since') {
                    continue;
                }
                $arg = $attr->args[0]->value;
                if (!$arg instanceof String_) {
                    throw new ShouldNotHappenException();
                }
                $parts = explode('.', $arg->value);
                $versionId = (int) $parts[0] * 10000 + (int) ($parts[1] ?? 0) * 100 + (int) ($parts[2] ?? 0);
                if ($this->phpVersion->getVersionId() < $versionId) {
                    return \false;
                }
            }
        }
        return \true;
    }
    public function hasFunctionSignature(string $name) : bool
    {
        $lowerName = strtolower($name);
        if (!array_key_exists($lowerName, $this->map->functions)) {
            return $this->functionSignatureMapProvider->hasFunctionSignature($name);
        }
        return \true;
    }
    public function getMethodSignatures(string $className, string $methodName, ?ReflectionMethod $reflectionMethod) : array
    {
        $lowerClassName = strtolower($className);
        if (!array_key_exists($lowerClassName, $this->map->classes)) {
            return $this->functionSignatureMapProvider->getMethodSignatures($className, $methodName, $reflectionMethod);
        }
        $methodNode = $this->findMethodNode($className, $methodName);
        if ($methodNode === null) {
            return $this->functionSignatureMapProvider->getMethodSignatures($className, $methodName, $reflectionMethod);
        }
        [$methodNode, $stubFile] = $methodNode;
        $signature = $this->getSignature($methodNode, $className, $stubFile);
        if ($this->functionSignatureMapProvider->hasMethodSignature($className, $methodName)) {
            $functionMapSignatures = $this->functionSignatureMapProvider->getMethodSignatures($className, $methodName, $reflectionMethod);
            return $this->getMergedSignatures($signature, $functionMapSignatures);
        }
        return [$signature];
    }
    public function getFunctionSignatures(string $functionName, ?string $className, ?\ReflectionFunctionAbstract $reflectionFunction) : array
    {
        $lowerName = strtolower($functionName);
        if (!array_key_exists($lowerName, $this->map->functions)) {
            return $this->functionSignatureMapProvider->getFunctionSignatures($functionName, $className, $reflectionFunction);
        }
        $stubFile = self::DIRECTORY . '/' . $this->map->functions[$lowerName];
        $nodes = $this->fileNodesFetcher->fetchNodes($stubFile);
        $functions = $nodes->getFunctionNodes();
        if (!array_key_exists($lowerName, $functions)) {
            throw new ShouldNotHappenException(sprintf('Function %s stub not found in %s.', $functionName, $stubFile));
        }
        foreach ($functions[$lowerName] as $functionNode) {
            if (!$this->isForCurrentVersion($functionNode->getNode())) {
                continue;
            }
            $signature = $this->getSignature($functionNode->getNode(), null, $stubFile);
            if ($this->functionSignatureMapProvider->hasFunctionSignature($functionName)) {
                $functionMapSignatures = $this->functionSignatureMapProvider->getFunctionSignatures($functionName, $className, $reflectionFunction);
                return $this->getMergedSignatures($signature, $functionMapSignatures);
            }
            return [$signature];
        }
        throw new ShouldNotHappenException(sprintf('Function %s stub not found in %s.', $functionName, $stubFile));
    }
    /**
     * @param array<int, FunctionSignature> $functionMapSignatures
     * @return array<int, FunctionSignature>
     */
    private function getMergedSignatures(\PHPStan\Reflection\SignatureMap\FunctionSignature $nativeSignature, array $functionMapSignatures) : array
    {
        if (count($functionMapSignatures) === 1) {
            return [$this->mergeSignatures($nativeSignature, $functionMapSignatures[0])];
        }
        return $functionMapSignatures;
    }
    private function mergeSignatures(\PHPStan\Reflection\SignatureMap\FunctionSignature $nativeSignature, \PHPStan\Reflection\SignatureMap\FunctionSignature $functionMapSignature) : \PHPStan\Reflection\SignatureMap\FunctionSignature
    {
        $parameters = [];
        foreach ($nativeSignature->getParameters() as $i => $nativeParameter) {
            if (!array_key_exists($i, $functionMapSignature->getParameters())) {
                $parameters[] = $nativeParameter;
                continue;
            }
            $functionMapParameter = $functionMapSignature->getParameters()[$i];
            $nativeParameterType = $nativeParameter->getNativeType();
            $parameters[] = new \PHPStan\Reflection\SignatureMap\ParameterSignature($nativeParameter->getName(), $nativeParameter->isOptional(), TypehintHelper::decideType($nativeParameterType, TypehintHelper::decideType($nativeParameter->getType(), $functionMapParameter->getType())), $nativeParameterType, $nativeParameter->passedByReference()->yes() ? $functionMapParameter->passedByReference() : $nativeParameter->passedByReference(), $nativeParameter->isVariadic(), $nativeParameter->getDefaultValue(), $nativeParameter->getOutType());
        }
        $nativeReturnType = $nativeSignature->getNativeReturnType();
        if ($nativeReturnType instanceof MixedType && !$nativeReturnType->isExplicitMixed()) {
            $returnType = $functionMapSignature->getReturnType();
        } else {
            $returnType = TypehintHelper::decideType($nativeReturnType, TypehintHelper::decideType($nativeSignature->getReturnType(), $functionMapSignature->getReturnType()));
        }
        return new \PHPStan\Reflection\SignatureMap\FunctionSignature($parameters, $returnType, $nativeReturnType, $nativeSignature->isVariadic());
    }
    public function hasMethodMetadata(string $className, string $methodName) : bool
    {
        return $this->functionSignatureMapProvider->hasMethodMetadata($className, $methodName);
    }
    public function hasFunctionMetadata(string $name) : bool
    {
        return $this->functionSignatureMapProvider->hasFunctionMetadata($name);
    }
    /**
     * @return array{hasSideEffects: bool}
     */
    public function getMethodMetadata(string $className, string $methodName) : array
    {
        return $this->functionSignatureMapProvider->getMethodMetadata($className, $methodName);
    }
    /**
     * @return array{hasSideEffects: bool}
     */
    public function getFunctionMetadata(string $functionName) : array
    {
        return $this->functionSignatureMapProvider->getFunctionMetadata($functionName);
    }
    /**
     * @param \PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Function_ $function
     */
    private function getSignature($function, ?string $className, string $stubFile) : \PHPStan\Reflection\SignatureMap\FunctionSignature
    {
        $phpDocParameterTypes = null;
        $phpDocReturnType = null;
        if ($function->getDocComment() !== null) {
            if ($function instanceof ClassMethod) {
                $functionName = $function->name->toString();
            } elseif ($function->namespacedName !== null) {
                $functionName = $function->namespacedName->toString();
            } else {
                throw new ShouldNotHappenException();
            }
            $phpDoc = $this->fileTypeMapper->getResolvedPhpDoc($stubFile, $className, null, $functionName, $function->getDocComment()->getText());
            $phpDocParameterTypes = array_map(static function (ParamTag $param) : Type {
                return $param->getType();
            }, $phpDoc->getParamTags());
            if ($phpDoc->getReturnTag() !== null) {
                $phpDocReturnType = $phpDoc->getReturnTag()->getType();
            }
        }
        $parameters = [];
        $variadic = \false;
        foreach ($function->getParams() as $param) {
            $name = $param->var;
            if (!$name instanceof Variable || !is_string($name->name)) {
                throw new ShouldNotHappenException();
            }
            $parameterType = ParserNodeTypeToPHPStanType::resolve($param->type, null);
            $parameters[] = new \PHPStan\Reflection\SignatureMap\ParameterSignature($name->name, $param->default !== null || $param->variadic, TypehintHelper::decideType($parameterType, $phpDocParameterTypes[$name->name] ?? null), $parameterType, $param->byRef ? PassedByReference::createCreatesNewVariable() : PassedByReference::createNo(), $param->variadic, $param->default !== null ? $this->initializerExprTypeResolver->getType($param->default, InitializerExprContext::fromStubParameter($className, $stubFile, $function)) : null, null);
            $variadic = $variadic || $param->variadic;
        }
        $returnType = ParserNodeTypeToPHPStanType::resolve($function->getReturnType(), null);
        return new \PHPStan\Reflection\SignatureMap\FunctionSignature($parameters, TypehintHelper::decideType($returnType, $phpDocReturnType ?? null), $returnType, $variadic);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\SignatureMap;

use _PHPStan_dcc7b7cff\Nette\Utils\Strings;
use PHPStan\Analyser\NameScope;
use PHPStan\PhpDoc\TypeStringResolver;
use PHPStan\Reflection\PassedByReference;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
use function array_slice;
use function strpos;
use function substr;
class SignatureMapParser
{
    /**
     * @var \PHPStan\PhpDoc\TypeStringResolver
     */
    private $typeStringResolver;
    public function __construct(TypeStringResolver $typeNodeResolver)
    {
        $this->typeStringResolver = $typeNodeResolver;
    }
    /**
     * @param mixed[] $map
     */
    public function getFunctionSignature(array $map, ?string $className) : \PHPStan\Reflection\SignatureMap\FunctionSignature
    {
        $parameterSignatures = $this->getParameters(array_slice($map, 1));
        $hasVariadic = \false;
        foreach ($parameterSignatures as $parameterSignature) {
            if ($parameterSignature->isVariadic()) {
                $hasVariadic = \true;
                break;
            }
        }
        return new \PHPStan\Reflection\SignatureMap\FunctionSignature($parameterSignatures, $this->getTypeFromString($map[0], $className), new MixedType(), $hasVariadic);
    }
    private function getTypeFromString(string $typeString, ?string $className) : Type
    {
        if ($typeString === '') {
            return new MixedType(\true);
        }
        return $this->typeStringResolver->resolve($typeString, new NameScope(null, [], $className));
    }
    /**
     * @param array<string, string> $parameterMap
     * @return array<int, ParameterSignature>
     */
    private function getParameters(array $parameterMap) : array
    {
        $parameterSignatures = [];
        foreach ($parameterMap as $parameterName => $typeString) {
            [$name, $isOptional, $passedByReference, $isVariadic] = $this->getParameterInfoFromName($parameterName);
            $parameterSignatures[] = new \PHPStan\Reflection\SignatureMap\ParameterSignature($name, $isOptional, $this->getTypeFromString($typeString, null), new MixedType(), $passedByReference, $isVariadic, null, null);
        }
        return $parameterSignatures;
    }
    /**
     * @return mixed[]
     */
    private function getParameterInfoFromName(string $parameterNameString) : array
    {
        $matches = Strings::match($parameterNameString, '#^(?P<reference>&(?:\\.\\.\\.)?r?w?_?)?(?P<variadic>\\.\\.\\.)?(?P<name>[^=]+)?(?P<optional>=)?($)#');
        if ($matches === null || !isset($matches['optional'])) {
            throw new ShouldNotHappenException();
        }
        $isVariadic = $matches['variadic'] !== '';
        $reference = $matches['reference'];
        if (strpos($reference, '&...') === 0) {
            $reference = '&' . substr($reference, 4);
            $isVariadic = \true;
        }
        if (strpos($reference, '&rw') === 0) {
            $passedByReference = PassedByReference::createReadsArgument();
        } elseif (strpos($reference, '&w') === 0 || strpos($reference, '&') === 0) {
            $passedByReference = PassedByReference::createCreatesNewVariable();
        } else {
            $passedByReference = PassedByReference::createNo();
        }
        $isOptional = $isVariadic || $matches['optional'] !== '';
        $name = $matches['name'] !== '' ? $matches['name'] : '...';
        return [$name, $isOptional, $passedByReference, $isVariadic];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\SignatureMap;

use PHPStan\Type\Type;
class FunctionSignature
{
    /**
     * @var array<int, ParameterSignature>
     */
    private $parameters;
    /**
     * @var \PHPStan\Type\Type
     */
    private $returnType;
    /**
     * @var \PHPStan\Type\Type
     */
    private $nativeReturnType;
    /**
     * @var bool
     */
    private $variadic;
    /**
     * @param array<int, ParameterSignature> $parameters
     */
    public function __construct(array $parameters, Type $returnType, Type $nativeReturnType, bool $variadic)
    {
        $this->parameters = $parameters;
        $this->returnType = $returnType;
        $this->nativeReturnType = $nativeReturnType;
        $this->variadic = $variadic;
    }
    /**
     * @return array<int, ParameterSignature>
     */
    public function getParameters() : array
    {
        return $this->parameters;
    }
    public function getReturnType() : Type
    {
        return $this->returnType;
    }
    public function getNativeReturnType() : Type
    {
        return $this->nativeReturnType;
    }
    public function isVariadic() : bool
    {
        return $this->variadic;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\SignatureMap;

use PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod;
use ReflectionFunctionAbstract;
interface SignatureMapProvider
{
    public function hasMethodSignature(string $className, string $methodName) : bool;
    public function hasFunctionSignature(string $name) : bool;
    /** @return array<int, FunctionSignature> */
    public function getMethodSignatures(string $className, string $methodName, ?ReflectionMethod $reflectionMethod) : array;
    /** @return array<int, FunctionSignature> */
    public function getFunctionSignatures(string $functionName, ?string $className, ?ReflectionFunctionAbstract $reflectionFunction) : array;
    public function hasMethodMetadata(string $className, string $methodName) : bool;
    public function hasFunctionMetadata(string $name) : bool;
    /**
     * @return array{hasSideEffects: bool}
     */
    public function getMethodMetadata(string $className, string $methodName) : array;
    /**
     * @return array{hasSideEffects: bool}
     */
    public function getFunctionMetadata(string $functionName) : array;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\SignatureMap;

use PHPStan\BetterReflection\Reflection\Adapter\ReflectionFunction;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\InitializerExprContext;
use PHPStan\Reflection\InitializerExprTypeResolver;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\MixedType;
use PHPStan\Type\TypehintHelper;
use ReflectionFunctionAbstract;
use function array_change_key_case;
use function array_key_exists;
use function array_keys;
use function is_array;
use function sprintf;
use function strtolower;
use const CASE_LOWER;
class FunctionSignatureMapProvider implements \PHPStan\Reflection\SignatureMap\SignatureMapProvider
{
    /** @var mixed[]|null */
    private $signatureMap;
    /** @var array<string, array{hasSideEffects: bool}>|null */
    private $functionMetadata;
    /**
     * @var \PHPStan\Reflection\SignatureMap\SignatureMapParser
     */
    private $parser;
    /**
     * @var \PHPStan\Reflection\InitializerExprTypeResolver
     */
    private $initializerExprTypeResolver;
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    /**
     * @var bool
     */
    private $stricterFunctionMap;
    public function __construct(\PHPStan\Reflection\SignatureMap\SignatureMapParser $parser, InitializerExprTypeResolver $initializerExprTypeResolver, PhpVersion $phpVersion, bool $stricterFunctionMap)
    {
        $this->parser = $parser;
        $this->initializerExprTypeResolver = $initializerExprTypeResolver;
        $this->phpVersion = $phpVersion;
        $this->stricterFunctionMap = $stricterFunctionMap;
    }
    public function hasMethodSignature(string $className, string $methodName) : bool
    {
        return $this->hasFunctionSignature(sprintf('%s::%s', $className, $methodName));
    }
    public function hasFunctionSignature(string $name) : bool
    {
        return array_key_exists(strtolower($name), $this->getSignatureMap());
    }
    public function getMethodSignatures(string $className, string $methodName, ?ReflectionMethod $reflectionMethod) : array
    {
        return $this->getFunctionSignatures(sprintf('%s::%s', $className, $methodName), $className, $reflectionMethod);
    }
    public function getFunctionSignatures(string $functionName, ?string $className, ?ReflectionFunctionAbstract $reflectionFunction) : array
    {
        $functionName = strtolower($functionName);
        $signatures = [$this->createSignature($functionName, $className, $reflectionFunction)];
        $i = 1;
        $variantFunctionName = $functionName . '\'' . $i;
        while ($this->hasFunctionSignature($variantFunctionName)) {
            $signatures[] = $this->createSignature($variantFunctionName, $className, $reflectionFunction);
            $i++;
            $variantFunctionName = $functionName . '\'' . $i;
        }
        return $signatures;
    }
    private function createSignature(string $functionName, ?string $className, ?ReflectionFunctionAbstract $reflectionFunction) : \PHPStan\Reflection\SignatureMap\FunctionSignature
    {
        if (!$reflectionFunction instanceof ReflectionMethod && !$reflectionFunction instanceof ReflectionFunction && $reflectionFunction !== null) {
            throw new ShouldNotHappenException();
        }
        $signatureMap = self::getSignatureMap();
        $signature = $this->parser->getFunctionSignature($signatureMap[$functionName], $className);
        $parameters = [];
        foreach ($signature->getParameters() as $i => $parameter) {
            if ($reflectionFunction === null) {
                $parameters[] = $parameter;
                continue;
            }
            $nativeParameters = $reflectionFunction->getParameters();
            if (!array_key_exists($i, $nativeParameters)) {
                $parameters[] = $parameter;
                continue;
            }
            $parameters[] = new \PHPStan\Reflection\SignatureMap\ParameterSignature($parameter->getName(), $parameter->isOptional(), $parameter->getType(), TypehintHelper::decideTypeFromReflection($nativeParameters[$i]->getType()), $parameter->passedByReference(), $parameter->isVariadic(), $nativeParameters[$i]->isDefaultValueAvailable() ? $this->initializerExprTypeResolver->getType($nativeParameters[$i]->getDefaultValueExpression(), InitializerExprContext::fromReflectionParameter($nativeParameters[$i])) : null, $parameter->getOutType());
        }
        if ($reflectionFunction === null) {
            $nativeReturnType = new MixedType();
        } else {
            $nativeReturnType = TypehintHelper::decideTypeFromReflection($reflectionFunction->getReturnType());
        }
        return new \PHPStan\Reflection\SignatureMap\FunctionSignature($parameters, $signature->getReturnType(), $nativeReturnType, $signature->isVariadic());
    }
    public function hasMethodMetadata(string $className, string $methodName) : bool
    {
        return $this->hasFunctionMetadata(sprintf('%s::%s', $className, $methodName));
    }
    public function hasFunctionMetadata(string $name) : bool
    {
        $signatureMap = $this->getFunctionMetadataMap();
        return array_key_exists(strtolower($name), $signatureMap);
    }
    /**
     * @return array{hasSideEffects: bool}
     */
    public function getMethodMetadata(string $className, string $methodName) : array
    {
        return $this->getFunctionMetadata(sprintf('%s::%s', $className, $methodName));
    }
    /**
     * @return array{hasSideEffects: bool}
     */
    public function getFunctionMetadata(string $functionName) : array
    {
        $functionName = strtolower($functionName);
        if (!$this->hasFunctionMetadata($functionName)) {
            throw new ShouldNotHappenException();
        }
        return $this->getFunctionMetadataMap()[$functionName];
    }
    /**
     * @return array<string, array{hasSideEffects: bool}>
     */
    private function getFunctionMetadataMap() : array
    {
        if ($this->functionMetadata === null) {
            /** @var array<string, array{hasSideEffects: bool}> $metadata */
            $metadata = (require __DIR__ . '/../../../resources/functionMetadata.php');
            $this->functionMetadata = array_change_key_case($metadata, CASE_LOWER);
        }
        return $this->functionMetadata;
    }
    /**
     * @return mixed[]
     */
    public function getSignatureMap() : array
    {
        if ($this->signatureMap === null) {
            $signatureMap = (require __DIR__ . '/../../../resources/functionMap.php');
            if (!is_array($signatureMap)) {
                throw new ShouldNotHappenException('Signature map could not be loaded.');
            }
            $signatureMap = array_change_key_case($signatureMap, CASE_LOWER);
            if ($this->stricterFunctionMap) {
                $stricterFunctionMap = (require __DIR__ . '/../../../resources/functionMap_bleedingEdge.php');
                if (!is_array($stricterFunctionMap)) {
                    throw new ShouldNotHappenException('Signature map could not be loaded.');
                }
                $signatureMap = $this->computeSignatureMap($signatureMap, $stricterFunctionMap);
                if ($this->phpVersion->getVersionId() >= 80000) {
                    $php80StricterFunctionMapDelta = (require __DIR__ . '/../../../resources/functionMap_php80delta_bleedingEdge.php');
                    if (!is_array($php80StricterFunctionMapDelta)) {
                        throw new ShouldNotHappenException('Signature map could not be loaded.');
                    }
                    $signatureMap = $this->computeSignatureMap($signatureMap, $php80StricterFunctionMapDelta);
                }
            }
            if ($this->phpVersion->getVersionId() >= 70400) {
                $php74MapDelta = (require __DIR__ . '/../../../resources/functionMap_php74delta.php');
                if (!is_array($php74MapDelta)) {
                    throw new ShouldNotHappenException('Signature map could not be loaded.');
                }
                $signatureMap = $this->computeSignatureMap($signatureMap, $php74MapDelta);
            }
            if ($this->phpVersion->getVersionId() >= 80000) {
                $php80MapDelta = (require __DIR__ . '/../../../resources/functionMap_php80delta.php');
                if (!is_array($php80MapDelta)) {
                    throw new ShouldNotHappenException('Signature map could not be loaded.');
                }
                $signatureMap = $this->computeSignatureMap($signatureMap, $php80MapDelta);
            }
            if ($this->phpVersion->getVersionId() >= 80100) {
                $php81MapDelta = (require __DIR__ . '/../../../resources/functionMap_php81delta.php');
                if (!is_array($php81MapDelta)) {
                    throw new ShouldNotHappenException('Signature map could not be loaded.');
                }
                $signatureMap = $this->computeSignatureMap($signatureMap, $php81MapDelta);
            }
            if ($this->phpVersion->getVersionId() >= 80200) {
                $php82MapDelta = (require __DIR__ . '/../../../resources/functionMap_php82delta.php');
                if (!is_array($php82MapDelta)) {
                    throw new ShouldNotHappenException('Signature map could not be loaded.');
                }
                $signatureMap = $this->computeSignatureMap($signatureMap, $php82MapDelta);
            }
            $this->signatureMap = $signatureMap;
        }
        return $this->signatureMap;
    }
    /**
     * @param array<string, mixed> $signatureMap
     * @param array<string, array<string, mixed>> $delta
     * @return array<string, mixed>
     */
    private function computeSignatureMap(array $signatureMap, array $delta) : array
    {
        foreach (array_keys($delta['old']) as $key) {
            unset($signatureMap[strtolower($key)]);
        }
        foreach ($delta['new'] as $key => $signature) {
            $signatureMap[strtolower($key)] = $signature;
        }
        return $signatureMap;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\SignatureMap;

use PHPStan\BetterReflection\Identifier\Exception\InvalidIdentifierName;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionFunction;
use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\PhpDoc\ResolvedPhpDocBlock;
use PHPStan\PhpDoc\StubPhpDocProvider;
use PHPStan\Reflection\Assertions;
use PHPStan\Reflection\FunctionVariantWithPhpDocs;
use PHPStan\Reflection\Native\NativeFunctionReflection;
use PHPStan\Reflection\Native\NativeParameterWithPhpDocsReflection;
use PHPStan\TrinaryLogic;
use PHPStan\Type\FileTypeMapper;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
use PHPStan\Type\TypehintHelper;
use function array_key_exists;
use function array_map;
use function strtolower;
class NativeFunctionReflectionProvider
{
    /** @var NativeFunctionReflection[] */
    private $functionMap = [];
    /**
     * @var \PHPStan\Reflection\SignatureMap\SignatureMapProvider
     */
    private $signatureMapProvider;
    /**
     * @var \PHPStan\BetterReflection\Reflector\Reflector
     */
    private $reflector;
    /**
     * @var \PHPStan\Type\FileTypeMapper
     */
    private $fileTypeMapper;
    /**
     * @var \PHPStan\PhpDoc\StubPhpDocProvider
     */
    private $stubPhpDocProvider;
    public function __construct(\PHPStan\Reflection\SignatureMap\SignatureMapProvider $signatureMapProvider, Reflector $reflector, FileTypeMapper $fileTypeMapper, StubPhpDocProvider $stubPhpDocProvider)
    {
        $this->signatureMapProvider = $signatureMapProvider;
        $this->reflector = $reflector;
        $this->fileTypeMapper = $fileTypeMapper;
        $this->stubPhpDocProvider = $stubPhpDocProvider;
    }
    public function findFunctionReflection(string $functionName) : ?NativeFunctionReflection
    {
        $lowerCasedFunctionName = strtolower($functionName);
        if (isset($this->functionMap[$lowerCasedFunctionName])) {
            return $this->functionMap[$lowerCasedFunctionName];
        }
        if (!$this->signatureMapProvider->hasFunctionSignature($lowerCasedFunctionName)) {
            return null;
        }
        $throwType = null;
        $reflectionFunctionAdapter = null;
        $isDeprecated = \false;
        $phpDocReturnType = null;
        $asserts = Assertions::createEmpty();
        $docComment = null;
        $returnsByReference = TrinaryLogic::createMaybe();
        try {
            $reflectionFunction = $this->reflector->reflectFunction($functionName);
            $reflectionFunctionAdapter = new ReflectionFunction($reflectionFunction);
            $returnsByReference = TrinaryLogic::createFromBoolean($reflectionFunctionAdapter->returnsReference());
            if ($reflectionFunction->getFileName() !== null) {
                $fileName = $reflectionFunction->getFileName();
                $docComment = $reflectionFunction->getDocComment();
                if ($docComment !== null) {
                    $resolvedPhpDoc = $this->fileTypeMapper->getResolvedPhpDoc($fileName, null, null, $reflectionFunction->getName(), $docComment);
                    $throwsTag = $resolvedPhpDoc->getThrowsTag();
                    if ($throwsTag !== null) {
                        $throwType = $throwsTag->getType();
                    }
                    $isDeprecated = $reflectionFunction->isDeprecated();
                }
            }
        } catch (IdentifierNotFound|InvalidIdentifierName $exception) {
            // pass
        }
        $functionSignatures = $this->signatureMapProvider->getFunctionSignatures($lowerCasedFunctionName, null, $reflectionFunctionAdapter);
        $phpDoc = $this->stubPhpDocProvider->findFunctionPhpDoc($lowerCasedFunctionName, array_map(static function (\PHPStan\Reflection\SignatureMap\ParameterSignature $parameter) : string {
            return $parameter->getName();
        }, $functionSignatures[0]->getParameters()));
        if ($phpDoc !== null) {
            if ($phpDoc->hasPhpDocString()) {
                $docComment = $phpDoc->getPhpDocString();
            }
            if ($phpDoc->getThrowsTag() !== null) {
                $throwType = $phpDoc->getThrowsTag()->getType();
            }
            $asserts = Assertions::createFromResolvedPhpDocBlock($phpDoc);
            $phpDocReturnType = $this->getReturnTypeFromPhpDoc($phpDoc);
        }
        $variants = [];
        $functionSignatures = $this->signatureMapProvider->getFunctionSignatures($lowerCasedFunctionName, null, $reflectionFunctionAdapter);
        foreach ($functionSignatures as $functionSignature) {
            $variants[] = new FunctionVariantWithPhpDocs(TemplateTypeMap::createEmpty(), null, array_map(static function (\PHPStan\Reflection\SignatureMap\ParameterSignature $parameterSignature) use($phpDoc) : NativeParameterWithPhpDocsReflection {
                $type = $parameterSignature->getType();
                $phpDocType = null;
                if ($phpDoc !== null) {
                    $phpDocParam = $phpDoc->getParamTags()[$parameterSignature->getName()] ?? null;
                    if ($phpDocParam !== null) {
                        $phpDocType = $phpDocParam->getType();
                    }
                }
                return new NativeParameterWithPhpDocsReflection($parameterSignature->getName(), $parameterSignature->isOptional(), TypehintHelper::decideType($type, $phpDocType), $phpDocType ?? new MixedType(), $type, $parameterSignature->passedByReference(), $parameterSignature->isVariadic(), $parameterSignature->getDefaultValue(), $phpDoc !== null ? \PHPStan\Reflection\SignatureMap\NativeFunctionReflectionProvider::getParamOutTypeFromPhpDoc($parameterSignature->getName(), $phpDoc) : null);
            }, $functionSignature->getParameters()), $functionSignature->isVariadic(), TypehintHelper::decideType($functionSignature->getReturnType(), $phpDocReturnType), $phpDocReturnType ?? new MixedType(), $functionSignature->getReturnType());
        }
        if ($this->signatureMapProvider->hasFunctionMetadata($lowerCasedFunctionName)) {
            $hasSideEffects = TrinaryLogic::createFromBoolean($this->signatureMapProvider->getFunctionMetadata($lowerCasedFunctionName)['hasSideEffects']);
        } else {
            $hasSideEffects = TrinaryLogic::createMaybe();
        }
        $functionReflection = new NativeFunctionReflection($lowerCasedFunctionName, $variants, $throwType, $hasSideEffects, $isDeprecated, $asserts, $docComment, $returnsByReference);
        $this->functionMap[$lowerCasedFunctionName] = $functionReflection;
        return $functionReflection;
    }
    private function getReturnTypeFromPhpDoc(ResolvedPhpDocBlock $phpDoc) : ?Type
    {
        $returnTag = $phpDoc->getReturnTag();
        if ($returnTag === null) {
            return null;
        }
        return $returnTag->getType();
    }
    private static function getParamOutTypeFromPhpDoc(string $paramName, ResolvedPhpDocBlock $stubPhpDoc) : ?Type
    {
        $paramOutTags = $stubPhpDoc->getParamOutTags();
        if (array_key_exists($paramName, $paramOutTags)) {
            return $paramOutTags[$paramName]->getType();
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\SignatureMap;

use PHPStan\Reflection\PassedByReference;
use PHPStan\Type\Type;
class ParameterSignature
{
    /**
     * @var string
     */
    private $name;
    /**
     * @var bool
     */
    private $optional;
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    /**
     * @var \PHPStan\Type\Type
     */
    private $nativeType;
    /**
     * @var \PHPStan\Reflection\PassedByReference
     */
    private $passedByReference;
    /**
     * @var bool
     */
    private $variadic;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $defaultValue;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $outType;
    public function __construct(string $name, bool $optional, Type $type, Type $nativeType, PassedByReference $passedByReference, bool $variadic, ?Type $defaultValue, ?Type $outType)
    {
        $this->name = $name;
        $this->optional = $optional;
        $this->type = $type;
        $this->nativeType = $nativeType;
        $this->passedByReference = $passedByReference;
        $this->variadic = $variadic;
        $this->defaultValue = $defaultValue;
        $this->outType = $outType;
    }
    public function getName() : string
    {
        return $this->name;
    }
    public function isOptional() : bool
    {
        return $this->optional;
    }
    public function getType() : Type
    {
        return $this->type;
    }
    public function getNativeType() : Type
    {
        return $this->nativeType;
    }
    public function passedByReference() : PassedByReference
    {
        return $this->passedByReference;
    }
    public function isVariadic() : bool
    {
        return $this->variadic;
    }
    public function getDefaultValue() : ?Type
    {
        return $this->defaultValue;
    }
    public function getOutType() : ?Type
    {
        return $this->outType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\SignatureMap;

use PHPStan\Php\PhpVersion;
class SignatureMapProviderFactory
{
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    /**
     * @var \PHPStan\Reflection\SignatureMap\FunctionSignatureMapProvider
     */
    private $functionSignatureMapProvider;
    /**
     * @var \PHPStan\Reflection\SignatureMap\Php8SignatureMapProvider
     */
    private $php8SignatureMapProvider;
    public function __construct(PhpVersion $phpVersion, \PHPStan\Reflection\SignatureMap\FunctionSignatureMapProvider $functionSignatureMapProvider, \PHPStan\Reflection\SignatureMap\Php8SignatureMapProvider $php8SignatureMapProvider)
    {
        $this->phpVersion = $phpVersion;
        $this->functionSignatureMapProvider = $functionSignatureMapProvider;
        $this->php8SignatureMapProvider = $php8SignatureMapProvider;
    }
    public function create() : \PHPStan\Reflection\SignatureMap\SignatureMapProvider
    {
        if ($this->phpVersion->getVersionId() < 80000) {
            return $this->functionSignatureMapProvider;
        }
        return $this->php8SignatureMapProvider;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
/** @api */
class TrivialParametersAcceptor implements \PHPStan\Reflection\ParametersAcceptorWithPhpDocs
{
    /** @api */
    public function __construct()
    {
    }
    public function getTemplateTypeMap() : TemplateTypeMap
    {
        return TemplateTypeMap::createEmpty();
    }
    public function getResolvedTemplateTypeMap() : TemplateTypeMap
    {
        return TemplateTypeMap::createEmpty();
    }
    public function getParameters() : array
    {
        return [];
    }
    public function isVariadic() : bool
    {
        return \true;
    }
    public function getReturnType() : Type
    {
        return new MixedType();
    }
    public function getPhpDocReturnType() : Type
    {
        return new MixedType();
    }
    public function getNativeReturnType() : Type
    {
        return new MixedType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

/**
 * This is the extension interface to implement if you want to dynamically
 * mark methods as constructor. As opposed to simply list them in the configuration file.
 *
 * To register it in the configuration file use the `phpstan.additionalConstructorsExtension` service tag:
 *
 * ```
 * services:
 * 	-
 *		class: App\PHPStan\MyExtension
 *		tags:
 *			- phpstan.additionalConstructorsExtension
 * ```
 *
 * @api
 */
interface AdditionalConstructorsExtension
{
    public const EXTENSION_TAG = 'phpstan.additionalConstructorsExtension';
    /** @return string[] */
    public function getAdditionalConstructors(\PHPStan\Reflection\ClassReflection $classReflection) : array;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PHPStan\Reflection\Php\DummyParameterWithPhpDocs;
use PHPStan\TrinaryLogic;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
use function array_map;
class WrappedExtendedMethodReflection implements \PHPStan\Reflection\ExtendedMethodReflection
{
    /**
     * @var \PHPStan\Reflection\MethodReflection
     */
    private $method;
    public function __construct(\PHPStan\Reflection\MethodReflection $method)
    {
        $this->method = $method;
    }
    public function getDeclaringClass() : \PHPStan\Reflection\ClassReflection
    {
        return $this->method->getDeclaringClass();
    }
    public function isStatic() : bool
    {
        return $this->method->isStatic();
    }
    public function isPrivate() : bool
    {
        return $this->method->isPrivate();
    }
    public function isPublic() : bool
    {
        return $this->method->isPublic();
    }
    public function getDocComment() : ?string
    {
        return $this->method->getDocComment();
    }
    public function getName() : string
    {
        return $this->method->getName();
    }
    public function getPrototype() : \PHPStan\Reflection\ClassMemberReflection
    {
        return $this->method->getPrototype();
    }
    public function getVariants() : array
    {
        $variants = [];
        foreach ($this->method->getVariants() as $variant) {
            if ($variant instanceof \PHPStan\Reflection\ParametersAcceptorWithPhpDocs) {
                $variants[] = $variant;
                continue;
            }
            $variants[] = new \PHPStan\Reflection\FunctionVariantWithPhpDocs($variant->getTemplateTypeMap(), $variant->getResolvedTemplateTypeMap(), array_map(static function (\PHPStan\Reflection\ParameterReflection $parameter) : \PHPStan\Reflection\ParameterReflectionWithPhpDocs {
                return $parameter instanceof \PHPStan\Reflection\ParameterReflectionWithPhpDocs ? $parameter : new DummyParameterWithPhpDocs($parameter->getName(), $parameter->getType(), $parameter->isOptional(), $parameter->passedByReference(), $parameter->isVariadic(), $parameter->getDefaultValue(), new MixedType(), $parameter->getType(), null);
            }, $variant->getParameters()), $variant->isVariadic(), $variant->getReturnType(), $variant->getReturnType(), new MixedType());
        }
        return $variants;
    }
    public function isDeprecated() : TrinaryLogic
    {
        return $this->method->isDeprecated();
    }
    public function getDeprecatedDescription() : ?string
    {
        return $this->method->getDeprecatedDescription();
    }
    public function isFinal() : TrinaryLogic
    {
        return $this->method->isFinal();
    }
    public function isInternal() : TrinaryLogic
    {
        return $this->method->isInternal();
    }
    public function getThrowType() : ?Type
    {
        return $this->method->getThrowType();
    }
    public function hasSideEffects() : TrinaryLogic
    {
        return $this->method->hasSideEffects();
    }
    public function getAsserts() : \PHPStan\Reflection\Assertions
    {
        return \PHPStan\Reflection\Assertions::createEmpty();
    }
    public function getSelfOutType() : ?Type
    {
        return null;
    }
    public function returnsByReference() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PHPStan\Reflection\Php\DummyParameterWithPhpDocs;
use PHPStan\Type\ConditionalTypeForParameter;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function array_key_exists;
use function array_map;
use function array_merge;
use function count;
use function is_int;
class GenericParametersAcceptorResolver
{
    /**
     * @api
     * @param array<int|string, Type> $argTypes
     */
    public static function resolve(array $argTypes, \PHPStan\Reflection\ParametersAcceptor $parametersAcceptor) : \PHPStan\Reflection\ParametersAcceptorWithPhpDocs
    {
        $typeMap = TemplateTypeMap::createEmpty();
        $passedArgs = [];
        $parameters = $parametersAcceptor->getParameters();
        $namedArgTypes = [];
        foreach ($argTypes as $i => $argType) {
            if (is_int($i)) {
                if (isset($parameters[$i])) {
                    $namedArgTypes[$parameters[$i]->getName()] = $argType;
                    continue;
                }
                if (count($parameters) > 0) {
                    $lastParameter = $parameters[count($parameters) - 1];
                    if ($lastParameter->isVariadic()) {
                        $parameterName = $lastParameter->getName();
                        if (array_key_exists($parameterName, $namedArgTypes)) {
                            $namedArgTypes[$parameterName] = TypeCombinator::union($namedArgTypes[$parameterName], $argType);
                            continue;
                        }
                        $namedArgTypes[$parameterName] = $argType;
                    }
                }
                continue;
            }
            $namedArgTypes[$i] = $argType;
        }
        foreach ($parametersAcceptor->getParameters() as $param) {
            if (isset($namedArgTypes[$param->getName()])) {
                $argType = $namedArgTypes[$param->getName()];
            } elseif ($param->getDefaultValue() !== null) {
                $argType = $param->getDefaultValue();
            } else {
                continue;
            }
            $paramType = $param->getType();
            $typeMap = $typeMap->union($paramType->inferTemplateTypes($argType));
            $passedArgs['$' . $param->getName()] = $argType;
        }
        $returnType = $parametersAcceptor->getReturnType();
        if ($returnType instanceof ConditionalTypeForParameter && !$returnType->isNegated() && array_key_exists($returnType->getParameterName(), $passedArgs)) {
            $paramType = $returnType->getTarget();
            $argType = $passedArgs[$returnType->getParameterName()];
            $typeMap = $typeMap->union($paramType->inferTemplateTypes($argType));
        }
        $resolvedTemplateTypeMap = new TemplateTypeMap(array_merge($parametersAcceptor->getTemplateTypeMap()->map(static function (string $name, Type $type) : Type {
            return new ErrorType();
        })->getTypes(), $typeMap->getTypes()));
        if (!$parametersAcceptor instanceof \PHPStan\Reflection\ParametersAcceptorWithPhpDocs) {
            $parametersAcceptor = new \PHPStan\Reflection\FunctionVariantWithPhpDocs($parametersAcceptor->getTemplateTypeMap(), $parametersAcceptor->getResolvedTemplateTypeMap(), array_map(static function (\PHPStan\Reflection\ParameterReflection $parameter) : \PHPStan\Reflection\ParameterReflectionWithPhpDocs {
                return new DummyParameterWithPhpDocs($parameter->getName(), $parameter->getType(), $parameter->isOptional(), $parameter->passedByReference(), $parameter->isVariadic(), $parameter->getDefaultValue(), new MixedType(), $parameter->getType(), null);
            }, $parametersAcceptor->getParameters()), $parametersAcceptor->isVariadic(), $parametersAcceptor->getReturnType(), $parametersAcceptor->getReturnType(), new MixedType());
        }
        return new \PHPStan\Reflection\ResolvedFunctionVariant($parametersAcceptor, $resolvedTemplateTypeMap, $passedArgs);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PHPStan\TrinaryLogic;
use PHPStan\Type\Type;
/** @api */
interface MethodReflection extends \PHPStan\Reflection\ClassMemberReflection
{
    public function getName() : string;
    public function getPrototype() : \PHPStan\Reflection\ClassMemberReflection;
    /**
     * @return ParametersAcceptor[]
     */
    public function getVariants() : array;
    public function isDeprecated() : TrinaryLogic;
    public function getDeprecatedDescription() : ?string;
    public function isFinal() : TrinaryLogic;
    public function isInternal() : TrinaryLogic;
    public function getThrowType() : ?Type;
    public function hasSideEffects() : TrinaryLogic;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PHPStan\Type\Type;
/** @api */
interface ParameterReflection
{
    public function getName() : string;
    public function isOptional() : bool;
    public function getType() : Type;
    public function passedByReference() : \PHPStan\Reflection\PassedByReference;
    public function isVariadic() : bool;
    public function getDefaultValue() : ?Type;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PHPStan\Reflection\Php\PhpMethodReflection;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Generic\TemplateTypeHelper;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\Type;
class ResolvedMethodReflection implements \PHPStan\Reflection\ExtendedMethodReflection
{
    /** @var ParametersAcceptorWithPhpDocs[]|null */
    private $variants;
    /**
     * @var \PHPStan\Reflection\Assertions|null
     */
    private $asserts;
    /**
     * @var \PHPStan\Type\Type|false|null
     */
    private $selfOutType = \false;
    /**
     * @var \PHPStan\Reflection\ExtendedMethodReflection
     */
    private $reflection;
    /**
     * @var \PHPStan\Type\Generic\TemplateTypeMap
     */
    private $resolvedTemplateTypeMap;
    public function __construct(\PHPStan\Reflection\ExtendedMethodReflection $reflection, TemplateTypeMap $resolvedTemplateTypeMap)
    {
        $this->reflection = $reflection;
        $this->resolvedTemplateTypeMap = $resolvedTemplateTypeMap;
    }
    public function getName() : string
    {
        return $this->reflection->getName();
    }
    public function getPrototype() : \PHPStan\Reflection\ClassMemberReflection
    {
        return $this->reflection->getPrototype();
    }
    public function getVariants() : array
    {
        $variants = $this->variants;
        if ($variants !== null) {
            return $variants;
        }
        $variants = [];
        foreach ($this->reflection->getVariants() as $variant) {
            $variants[] = new \PHPStan\Reflection\ResolvedFunctionVariant($variant, $this->resolvedTemplateTypeMap, []);
        }
        $this->variants = $variants;
        return $variants;
    }
    public function getDeclaringClass() : \PHPStan\Reflection\ClassReflection
    {
        return $this->reflection->getDeclaringClass();
    }
    public function getDeclaringTrait() : ?\PHPStan\Reflection\ClassReflection
    {
        if ($this->reflection instanceof PhpMethodReflection) {
            return $this->reflection->getDeclaringTrait();
        }
        return null;
    }
    public function isStatic() : bool
    {
        return $this->reflection->isStatic();
    }
    public function isPrivate() : bool
    {
        return $this->reflection->isPrivate();
    }
    public function isPublic() : bool
    {
        return $this->reflection->isPublic();
    }
    public function getDocComment() : ?string
    {
        return $this->reflection->getDocComment();
    }
    public function isDeprecated() : TrinaryLogic
    {
        return $this->reflection->isDeprecated();
    }
    public function getDeprecatedDescription() : ?string
    {
        return $this->reflection->getDeprecatedDescription();
    }
    public function isFinal() : TrinaryLogic
    {
        return $this->reflection->isFinal();
    }
    public function isInternal() : TrinaryLogic
    {
        return $this->reflection->isInternal();
    }
    public function getThrowType() : ?Type
    {
        return $this->reflection->getThrowType();
    }
    public function hasSideEffects() : TrinaryLogic
    {
        return $this->reflection->hasSideEffects();
    }
    public function getAsserts() : \PHPStan\Reflection\Assertions
    {
        return $this->asserts = $this->asserts ?? $this->reflection->getAsserts()->mapTypes(function (Type $type) {
            return TemplateTypeHelper::resolveTemplateTypes($type, $this->resolvedTemplateTypeMap);
        });
    }
    public function getSelfOutType() : ?Type
    {
        if ($this->selfOutType === \false) {
            $selfOutType = $this->reflection->getSelfOutType();
            if ($selfOutType !== null) {
                $selfOutType = TemplateTypeHelper::resolveTemplateTypes($selfOutType, $this->resolvedTemplateTypeMap);
            }
            $this->selfOutType = $selfOutType;
        }
        return $this->selfOutType;
    }
    public function returnsByReference() : TrinaryLogic
    {
        return $this->reflection->returnsByReference();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\Type;
/** @api */
interface ParametersAcceptor
{
    public const VARIADIC_FUNCTIONS = ['func_get_args', 'func_get_arg', 'func_num_args'];
    public function getTemplateTypeMap() : TemplateTypeMap;
    public function getResolvedTemplateTypeMap() : TemplateTypeMap;
    /**
     * @return array<int, ParameterReflection>
     */
    public function getParameters() : array;
    public function isVariadic() : bool;
    public function getReturnType() : Type;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\BetterReflection;

use Phar;
use PhpParser\Parser;
use PHPStan\BetterReflection\SourceLocator\Ast\Locator;
use PHPStan\BetterReflection\SourceLocator\SourceStubber\PhpStormStubsSourceStubber;
use PHPStan\BetterReflection\SourceLocator\SourceStubber\ReflectionSourceStubber;
use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Psr4Mapping;
use PHPStan\BetterReflection\SourceLocator\Type\EvaledCodeSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\MemoizingSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator;
use PHPStan\Reflection\BetterReflection\SourceLocator\AutoloadFunctionsSourceLocator;
use PHPStan\Reflection\BetterReflection\SourceLocator\AutoloadSourceLocator;
use PHPStan\Reflection\BetterReflection\SourceLocator\ComposerJsonAndInstalledJsonSourceLocatorMaker;
use PHPStan\Reflection\BetterReflection\SourceLocator\FileNodesFetcher;
use PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedDirectorySourceLocatorRepository;
use PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedPsrAutoloaderLocatorFactory;
use PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedSingleFileSourceLocatorRepository;
use PHPStan\Reflection\BetterReflection\SourceLocator\PhpVersionBlacklistSourceLocator;
use PHPStan\Reflection\BetterReflection\SourceLocator\ReflectionClassSourceLocator;
use PHPStan\Reflection\BetterReflection\SourceLocator\RewriteClassAliasSourceLocator;
use PHPStan\Reflection\BetterReflection\SourceLocator\SkipClassAliasSourceLocator;
use function array_merge;
use function array_unique;
use function extension_loaded;
use function is_dir;
use function is_file;
class BetterReflectionSourceLocatorFactory
{
    /**
     * @var \PhpParser\Parser
     */
    private $parser;
    /**
     * @var \PhpParser\Parser
     */
    private $php8Parser;
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\SourceStubber\PhpStormStubsSourceStubber
     */
    private $phpstormStubsSourceStubber;
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\SourceStubber\ReflectionSourceStubber
     */
    private $reflectionSourceStubber;
    /**
     * @var \PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedSingleFileSourceLocatorRepository
     */
    private $optimizedSingleFileSourceLocatorRepository;
    /**
     * @var \PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedDirectorySourceLocatorRepository
     */
    private $optimizedDirectorySourceLocatorRepository;
    /**
     * @var \PHPStan\Reflection\BetterReflection\SourceLocator\ComposerJsonAndInstalledJsonSourceLocatorMaker
     */
    private $composerJsonAndInstalledJsonSourceLocatorMaker;
    /**
     * @var \PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedPsrAutoloaderLocatorFactory
     */
    private $optimizedPsrAutoloaderLocatorFactory;
    /**
     * @var \PHPStan\Reflection\BetterReflection\SourceLocator\FileNodesFetcher
     */
    private $fileNodesFetcher;
    /**
     * @var string[]
     */
    private $scanFiles;
    /**
     * @var string[]
     */
    private $scanDirectories;
    /**
     * @var string[]
     */
    private $analysedPaths;
    /**
     * @var string[]
     */
    private $composerAutoloaderProjectPaths;
    /**
     * @var string[]
     */
    private $analysedPathsFromConfig;
    /**
     * @param string[] $scanFiles
     * @param string[] $scanDirectories
     * @param string[] $analysedPaths
     * @param string[] $composerAutoloaderProjectPaths
     * @param string[] $analysedPathsFromConfig
     */
    public function __construct(Parser $parser, Parser $php8Parser, PhpStormStubsSourceStubber $phpstormStubsSourceStubber, ReflectionSourceStubber $reflectionSourceStubber, OptimizedSingleFileSourceLocatorRepository $optimizedSingleFileSourceLocatorRepository, OptimizedDirectorySourceLocatorRepository $optimizedDirectorySourceLocatorRepository, ComposerJsonAndInstalledJsonSourceLocatorMaker $composerJsonAndInstalledJsonSourceLocatorMaker, OptimizedPsrAutoloaderLocatorFactory $optimizedPsrAutoloaderLocatorFactory, FileNodesFetcher $fileNodesFetcher, array $scanFiles, array $scanDirectories, array $analysedPaths, array $composerAutoloaderProjectPaths, array $analysedPathsFromConfig)
    {
        $this->parser = $parser;
        $this->php8Parser = $php8Parser;
        $this->phpstormStubsSourceStubber = $phpstormStubsSourceStubber;
        $this->reflectionSourceStubber = $reflectionSourceStubber;
        $this->optimizedSingleFileSourceLocatorRepository = $optimizedSingleFileSourceLocatorRepository;
        $this->optimizedDirectorySourceLocatorRepository = $optimizedDirectorySourceLocatorRepository;
        $this->composerJsonAndInstalledJsonSourceLocatorMaker = $composerJsonAndInstalledJsonSourceLocatorMaker;
        $this->optimizedPsrAutoloaderLocatorFactory = $optimizedPsrAutoloaderLocatorFactory;
        $this->fileNodesFetcher = $fileNodesFetcher;
        $this->scanFiles = $scanFiles;
        $this->scanDirectories = $scanDirectories;
        $this->analysedPaths = $analysedPaths;
        $this->composerAutoloaderProjectPaths = $composerAutoloaderProjectPaths;
        $this->analysedPathsFromConfig = $analysedPathsFromConfig;
    }
    public function create() : SourceLocator
    {
        $locators = [];
        $astLocator = new Locator($this->parser);
        $locators[] = new AutoloadFunctionsSourceLocator(new AutoloadSourceLocator($this->fileNodesFetcher, \false), new ReflectionClassSourceLocator($astLocator, $this->reflectionSourceStubber));
        $analysedDirectories = [];
        $analysedFiles = [];
        foreach (array_merge($this->analysedPaths, $this->analysedPathsFromConfig) as $analysedPath) {
            if (is_file($analysedPath)) {
                $analysedFiles[] = $analysedPath;
                continue;
            }
            if (!is_dir($analysedPath)) {
                continue;
            }
            $analysedDirectories[] = $analysedPath;
        }
        $fileLocators = [];
        $analysedFiles = array_unique(array_merge($analysedFiles, $this->scanFiles));
        foreach ($analysedFiles as $analysedFile) {
            $fileLocators[] = $this->optimizedSingleFileSourceLocatorRepository->getOrCreate($analysedFile);
        }
        $directories = array_unique(array_merge($analysedDirectories, $this->scanDirectories));
        foreach ($directories as $directory) {
            $fileLocators[] = $this->optimizedDirectorySourceLocatorRepository->getOrCreate($directory);
        }
        $astPhp8Locator = new Locator($this->php8Parser);
        foreach ($this->composerAutoloaderProjectPaths as $composerAutoloaderProjectPath) {
            $locator = $this->composerJsonAndInstalledJsonSourceLocatorMaker->create($composerAutoloaderProjectPath);
            if ($locator === null) {
                continue;
            }
            $fileLocators[] = $locator;
        }
        if (extension_loaded('phar')) {
            $pharProtocolPath = Phar::running();
            if ($pharProtocolPath !== '') {
                $fileLocators[] = $this->optimizedPsrAutoloaderLocatorFactory->create(Psr4Mapping::fromArrayMappings(['PHPStan\\Testing\\' => [$pharProtocolPath . '/src/Testing/'], 'PHPStan\\BetterReflection\\' => [$pharProtocolPath . '/vendor/ondrejmirtes/better-reflection/src/']]));
            }
        }
        $locators[] = new RewriteClassAliasSourceLocator(new AggregateSourceLocator($fileLocators));
        $locators[] = new SkipClassAliasSourceLocator(new PhpInternalSourceLocator($astPhp8Locator, $this->phpstormStubsSourceStubber));
        $locators[] = new AutoloadSourceLocator($this->fileNodesFetcher, \true);
        $locators[] = new PhpVersionBlacklistSourceLocator(new PhpInternalSourceLocator($astLocator, $this->reflectionSourceStubber), $this->phpstormStubsSourceStubber);
        $locators[] = new PhpVersionBlacklistSourceLocator(new EvaledCodeSourceLocator($astLocator, $this->reflectionSourceStubber), $this->phpstormStubsSourceStubber);
        return new MemoizingSourceLocator(new AggregateSourceLocator($locators));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\BetterReflection\SourceLocator;

use PhpParser\Node;
class FetchedNodesResult
{
    /**
     * @var array<string, array<FetchedNode<Node\Stmt\ClassLike>>>
     */
    private $classNodes;
    /**
     * @var array<string, array<FetchedNode<Node\Stmt\Function_>>>
     */
    private $functionNodes;
    /**
     * @var array<string, array<FetchedNode<(Node\Stmt\Const_ | Node\Expr\FuncCall)>>>
     */
    private $constantNodes;
    /**
     * @param array<string, array<FetchedNode<Node\Stmt\ClassLike>>> $classNodes
     * @param array<string, array<FetchedNode<Node\Stmt\Function_>>> $functionNodes
     * @param array<string, array<FetchedNode<Node\Stmt\Const_|Node\Expr\FuncCall>>> $constantNodes
     */
    public function __construct(array $classNodes, array $functionNodes, array $constantNodes)
    {
        $this->classNodes = $classNodes;
        $this->functionNodes = $functionNodes;
        $this->constantNodes = $constantNodes;
    }
    /**
     * @return array<string, array<FetchedNode<Node\Stmt\ClassLike>>>
     */
    public function getClassNodes() : array
    {
        return $this->classNodes;
    }
    /**
     * @return array<string, array<FetchedNode<Node\Stmt\Function_>>>
     */
    public function getFunctionNodes() : array
    {
        return $this->functionNodes;
    }
    /**
     * @return array<string, array<FetchedNode<Node\Stmt\Const_|Node\Expr\FuncCall>>>
     */
    public function getConstantNodes() : array
    {
        return $this->constantNodes;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\BetterReflection\SourceLocator;

use PhpParser\Node;
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
/**
 * @template-covariant T of Node
 */
class FetchedNode
{
    /**
     * @var T
     */
    private $node;
    /**
     * @var \PhpParser\Node\Stmt\Namespace_|null
     */
    private $namespace;
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\Located\LocatedSource
     */
    private $locatedSource;
    /**
     * @param T $node
     */
    public function __construct(Node $node, ?Node\Stmt\Namespace_ $namespace, LocatedSource $locatedSource)
    {
        $this->node = $node;
        $this->namespace = $namespace;
        $this->locatedSource = $locatedSource;
    }
    /**
     * @return T
     */
    public function getNode() : Node
    {
        return $this->node;
    }
    public function getNamespace() : ?Node\Stmt\Namespace_
    {
        return $this->namespace;
    }
    public function getLocatedSource() : LocatedSource
    {
        return $this->locatedSource;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\BetterReflection\SourceLocator;

use function array_keys;
use function implode;
use function preg_match;
use function preg_quote;
use function strlen;
use function substr;
/**
 * @author Jordi Boggiano <j.boggiano@seld.be>
 * @see https://github.com/composer/composer/pull/10107
 */
class PhpFileCleaner
{
    /** @var array<array{name: string, length: int, pattern: string}> */
    private $typeConfig = [];
    /**
     * @var string
     */
    private $restPattern;
    /**
     * @var string
     */
    private $contents = '';
    /**
     * @var int
     */
    private $len = 0;
    /**
     * @var int
     */
    private $index = 0;
    public function __construct()
    {
        foreach (['class', 'interface', 'trait', 'enum'] as $type) {
            $this->typeConfig[$type[0]] = ['name' => $type, 'length' => strlen($type), 'pattern' => '{.\\b(?<![\\$:>])' . $type . '\\s++[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff\\-]*+}Ais'];
        }
        $this->restPattern = '{[^{}?"\'</d' . implode('', array_keys($this->typeConfig)) . ']+}A';
    }
    public function clean(string $contents, int $maxMatches) : string
    {
        $this->contents = $contents;
        $this->len = strlen($contents);
        $this->index = 0;
        $inType = \false;
        $typeLevel = 0;
        $inDefine = \false;
        $clean = '';
        while ($this->index < $this->len) {
            $this->skipToPhp();
            $clean .= '<?';
            while ($this->index < $this->len) {
                $char = $this->contents[$this->index];
                if ($char === '?' && $this->peek('>')) {
                    $clean .= '?>';
                    $this->index += 2;
                    continue 2;
                }
                if ($char === '"' || $char === "'") {
                    if ($inDefine) {
                        $clean .= $char . $this->consumeString($char);
                        $inDefine = \false;
                    } else {
                        $this->skipString($char);
                        $clean .= 'null';
                    }
                    continue;
                }
                if ($char === '{') {
                    if ($inType) {
                        $typeLevel++;
                    }
                    $clean .= $char;
                    $this->index++;
                    continue;
                }
                if ($char === '}') {
                    if ($inType) {
                        $typeLevel--;
                        if ($typeLevel === 0) {
                            $inType = \false;
                        }
                    }
                    $clean .= $char;
                    $this->index++;
                    continue;
                }
                if ($char === '<' && $this->peek('<') && $this->match('{<<<[ \\t]*+([\'"]?)([a-zA-Z_\\x80-\\xff][a-zA-Z0-9_\\x80-\\xff]*+)\\1(?:\\r\\n|\\n|\\r)}A', $match)) {
                    $this->index += strlen($match[0]);
                    $this->skipHeredoc($match[2]);
                    $clean .= 'null';
                    continue;
                }
                if ($char === '/') {
                    if ($this->peek('/')) {
                        $this->skipToNewline();
                        continue;
                    }
                    if ($this->peek('*')) {
                        $this->skipComment();
                        continue;
                    }
                }
                if ($inType && $char === 'c' && $this->match('~.\\b(?<![\\$:>])const(\\s++[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff\\-]*+)~Ais', $match, $this->index - 1)) {
                    // It's invalid PHP but it does not matter
                    $clean .= 'class_const' . $match[1];
                    $this->index += strlen($match[0]) - 1;
                    continue;
                }
                if ($char === 'd' && $this->match('~.\\b(?<![\\$:>])define\\s*+\\(~Ais', $match, $this->index - 1)) {
                    $inDefine = \true;
                    $clean .= $match[0];
                    $this->index += strlen($match[0]) - 1;
                    continue;
                }
                if (isset($this->typeConfig[$char])) {
                    $type = $this->typeConfig[$char];
                    if (substr($this->contents, $this->index, $type['length']) === $type['name']) {
                        if ($maxMatches === 1 && $this->match($type['pattern'], $match, $this->index - 1)) {
                            return $clean . $match[0];
                        }
                        $inType = \true;
                    }
                }
                $this->index += 1;
                if ($this->match($this->restPattern, $match)) {
                    $clean .= $char . $match[0];
                    $this->index += strlen($match[0]);
                } else {
                    $clean .= $char;
                }
            }
        }
        return $clean;
    }
    private function skipToPhp() : void
    {
        while ($this->index < $this->len) {
            if ($this->contents[$this->index] === '<' && $this->peek('?')) {
                $this->index += 2;
                break;
            }
            $this->index += 1;
        }
    }
    private function consumeString(string $delimiter) : string
    {
        $string = '';
        $this->index += 1;
        while ($this->index < $this->len) {
            if ($this->contents[$this->index] === '\\' && ($this->peek('\\') || $this->peek($delimiter))) {
                $string .= $this->contents[$this->index];
                $string .= $this->contents[$this->index + 1];
                $this->index += 2;
                continue;
            }
            if ($this->contents[$this->index] === $delimiter) {
                $string .= $delimiter;
                $this->index += 1;
                break;
            }
            $string .= $this->contents[$this->index];
            $this->index += 1;
        }
        return $string;
    }
    private function skipString(string $delimiter) : void
    {
        $this->index += 1;
        while ($this->index < $this->len) {
            if ($this->contents[$this->index] === '\\' && ($this->peek('\\') || $this->peek($delimiter))) {
                $this->index += 2;
                continue;
            }
            if ($this->contents[$this->index] === $delimiter) {
                $this->index += 1;
                break;
            }
            $this->index += 1;
        }
    }
    private function skipComment() : void
    {
        $this->index += 2;
        while ($this->index < $this->len) {
            if ($this->contents[$this->index] === '*' && $this->peek('/')) {
                $this->index += 2;
                break;
            }
            $this->index += 1;
        }
    }
    private function skipToNewline() : void
    {
        while ($this->index < $this->len) {
            if ($this->contents[$this->index] === "\r" || $this->contents[$this->index] === "\n") {
                return;
            }
            $this->index += 1;
        }
    }
    private function skipHeredoc(string $delimiter) : void
    {
        $firstDelimiterChar = $delimiter[0];
        $delimiterLength = strlen($delimiter);
        $delimiterPattern = '{' . preg_quote($delimiter) . '(?![a-zA-Z0-9_\\x80-\\xff])}A';
        while ($this->index < $this->len) {
            // check if we find the delimiter after some spaces/tabs
            switch ($this->contents[$this->index]) {
                case "\t":
                case ' ':
                    $this->index += 1;
                    continue 2;
                case $firstDelimiterChar:
                    if (substr($this->contents, $this->index, $delimiterLength) === $delimiter && $this->match($delimiterPattern)) {
                        $this->index += $delimiterLength;
                        return;
                    }
                    break;
            }
            // skip the rest of the line
            while ($this->index < $this->len) {
                $this->skipToNewline();
                // skip newlines
                while ($this->index < $this->len && ($this->contents[$this->index] === "\r" || $this->contents[$this->index] === "\n")) {
                    $this->index += 1;
                }
                break;
            }
        }
    }
    private function peek(string $char) : bool
    {
        return $this->index + 1 < $this->len && $this->contents[$this->index + 1] === $char;
    }
    /**
     * @param string[]|null $match
     */
    private function match(string $regex, ?array &$match = null, ?int $offset = null) : bool
    {
        return preg_match($regex, $this->contents, $match, 0, $offset ?? $this->index) === 1;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\BetterReflection\SourceLocator;

use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\Identifier\IdentifierType;
use PHPStan\BetterReflection\Reflection\Reflection;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator;
use ReflectionClass as CoreReflectionClass;
use function class_exists;
use function interface_exists;
use function trait_exists;
class RewriteClassAliasSourceLocator implements SourceLocator
{
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\Type\SourceLocator
     */
    private $originalSourceLocator;
    public function __construct(SourceLocator $originalSourceLocator)
    {
        $this->originalSourceLocator = $originalSourceLocator;
    }
    public function locateIdentifier(Reflector $reflector, Identifier $identifier) : ?Reflection
    {
        if (!$identifier->isClass()) {
            return $this->originalSourceLocator->locateIdentifier($reflector, $identifier);
        }
        if (class_exists($identifier->getName(), \false) || interface_exists($identifier->getName(), \false) || trait_exists($identifier->getName(), \false)) {
            $classReflection = new CoreReflectionClass($identifier->getName());
            return $this->originalSourceLocator->locateIdentifier($reflector, new Identifier($classReflection->getName(), $identifier->getType()));
        }
        return $this->originalSourceLocator->locateIdentifier($reflector, $identifier);
    }
    public function locateIdentifiersByType(Reflector $reflector, IdentifierType $identifierType) : array
    {
        return $this->originalSourceLocator->locateIdentifiersByType($reflector, $identifierType);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\BetterReflection\SourceLocator;

use PHPStan\ShouldNotHappenException;
use function is_dir;
use function is_file;
use function stat;
use function stream_resolve_include_path;
use function stream_wrapper_register;
use function stream_wrapper_restore;
use function stream_wrapper_unregister;
use const SEEK_CUR;
use const SEEK_END;
use const SEEK_SET;
use const STREAM_URL_STAT_QUIET;
/**
 * This class will operate as a stream wrapper, intercepting any access to a file while
 * in operation.
 *
 * @internal DO NOT USE: this is an implementation detail of
 *           the {@see \PHPStan\BetterReflection\SourceLocator\Type\AutoloadSourceLocator}
 *
 * phpcs:disable SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
 * phpcs:disable PSR1.Methods.CamelCapsMethodName.NotCamelCaps
 * phpcs:disable Squiz.NamingConventions.ValidVariableName.NotCamelCaps
 */
final class FileReadTrapStreamWrapper
{
    private const DEFAULT_STREAM_WRAPPER_PROTOCOLS = ['file', 'phar'];
    /** @var string[]|null */
    private static $registeredStreamWrapperProtocols;
    /** @var string[] */
    public static $autoloadLocatedFiles = [];
    /**
     * @var bool
     */
    private $readFromFile = \false;
    /**
     * @var int
     */
    private $seekPosition = 0;
    /**
     * @param string[] $streamWrapperProtocols
     *
     * @return mixed
     *
     * @psalm-template ExecutedMethodReturnType of mixed
     * @psalm-param callable() : ExecutedMethodReturnType $executeMeWithinStreamWrapperOverride
     * @psalm-return ExecutedMethodReturnType
     */
    public static function withStreamWrapperOverride(callable $executeMeWithinStreamWrapperOverride, array $streamWrapperProtocols = self::DEFAULT_STREAM_WRAPPER_PROTOCOLS)
    {
        self::$registeredStreamWrapperProtocols = $streamWrapperProtocols;
        self::$autoloadLocatedFiles = [];
        try {
            foreach ($streamWrapperProtocols as $protocol) {
                stream_wrapper_unregister($protocol);
                stream_wrapper_register($protocol, self::class);
            }
            $result = $executeMeWithinStreamWrapperOverride();
        } finally {
            foreach ($streamWrapperProtocols as $protocol) {
                stream_wrapper_restore($protocol);
            }
        }
        self::$registeredStreamWrapperProtocols = null;
        self::$autoloadLocatedFiles = [];
        return $result;
    }
    /**
     * Our wrapper simply records which file we tried to load and returns
     * boolean false indicating failure.
     *
     * @internal do not call this method directly! This is stream wrapper
     *           voodoo logic that you **DO NOT** want to touch!
     *
     * @see https://php.net/manual/en/class.streamwrapper.php
     * @see https://php.net/manual/en/streamwrapper.stream-open.php
     *
     * @param string $path
     * @param string $mode
     * @param int    $options
     * @param string $openedPath
     */
    public function stream_open($path, $mode, $options, &$openedPath) : bool
    {
        $exists = is_file($path) || stream_resolve_include_path($path) !== \false;
        if ($exists) {
            self::$autoloadLocatedFiles[] = $path;
        }
        $this->readFromFile = \false;
        $this->seekPosition = 0;
        return $exists;
    }
    /**
     * Since we allow our wrapper's stream_open() to succeed, we need to
     * simulate a successful read so autoloaders with require() don't explode.
     *
     * @param int $count
     *
     */
    public function stream_read($count) : string
    {
        $this->readFromFile = \true;
        // Dummy return value that is also valid PHP for require(). We'll read
        // and process the file elsewhere, so it's OK to provide dummy data for
        // this read.
        return '';
    }
    /**
     * Since we allowed the open to succeed, we should allow the close to occur
     * as well.
     *
     */
    public function stream_close() : void
    {
        // no op
    }
    /**
     * Required for `require_once` and `include_once` to work per PHP.net
     * comment referenced below. We delegate to url_stat().
     *
     * @see https://www.php.net/manual/en/function.stream-wrapper-register.php#51855
     *
     * @return mixed[]|bool
     */
    public function stream_stat()
    {
        if (self::$autoloadLocatedFiles === []) {
            return \false;
        }
        return $this->url_stat(self::$autoloadLocatedFiles[0], STREAM_URL_STAT_QUIET);
    }
    /**
     * url_stat is triggered by calls like "file_exists". The call to "file_exists" must not be overloaded.
     * This function restores the original "file" stream, issues a call to "stat" to get the real results,
     * and then re-registers the AutoloadSourceLocator stream wrapper.
     *
     * @internal do not call this method directly! This is stream wrapper
     *           voodoo logic that you **DO NOT** want to touch!
     *
     * @see https://php.net/manual/en/class.streamwrapper.php
     * @see https://php.net/manual/en/streamwrapper.url-stat.php
     *
     * @param string $path
     * @param int    $flags
     *
     * @return mixed[]|bool
     */
    public function url_stat($path, $flags)
    {
        return $this->invokeWithRealFileStreamWrapper(static function ($path, $flags) {
            if (($flags & STREAM_URL_STAT_QUIET) !== 0) {
                return @stat($path);
            }
            return stat($path);
        }, [$path, $flags]);
    }
    /**
     * @param mixed[] $args
     * @return mixed
     */
    private function invokeWithRealFileStreamWrapper(callable $cb, array $args)
    {
        if (self::$registeredStreamWrapperProtocols === null) {
            throw new ShouldNotHappenException(self::class . ' not registered: cannot operate. Do not call this method directly.');
        }
        foreach (self::$registeredStreamWrapperProtocols as $protocol) {
            stream_wrapper_restore($protocol);
        }
        $result = $cb(...$args);
        foreach (self::$registeredStreamWrapperProtocols as $protocol) {
            stream_wrapper_unregister($protocol);
            stream_wrapper_register($protocol, self::class);
        }
        return $result;
    }
    /**
     * Simulates behavior of reading from an empty file.
     *
     */
    public function stream_eof() : bool
    {
        return $this->readFromFile;
    }
    public function stream_flush() : bool
    {
        return \true;
    }
    public function stream_tell() : int
    {
        return $this->seekPosition;
    }
    /**
     * @param   int  $offset
     * @param   int  $whence
     */
    public function stream_seek($offset, $whence) : bool
    {
        switch ($whence) {
            // Behavior is the same for a zero-length file
            case SEEK_SET:
            case SEEK_END:
                if ($offset < 0) {
                    return \false;
                }
                $this->seekPosition = $offset;
                return \true;
            case SEEK_CUR:
                if ($offset < 0) {
                    return \false;
                }
                $this->seekPosition += $offset;
                return \true;
            default:
                return \false;
        }
    }
    /**
     * @param int  $option
     * @param int  $arg1
     * @param int  $arg2
     */
    public function stream_set_option($option, $arg1, $arg2) : bool
    {
        return \false;
    }
    public function dir_opendir(string $path, int $options) : bool
    {
        return is_dir($path);
    }
    public function dir_readdir() : string
    {
        return '';
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\BetterReflection\SourceLocator;

use PhpParser\Node\Arg;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Name;
use PhpParser\Node\Scalar\String_;
use PhpParser\Node\Stmt\Const_;
use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\Identifier\IdentifierType;
use PHPStan\BetterReflection\Reflection\Reflection;
use PHPStan\BetterReflection\Reflection\ReflectionConstant;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Ast\Strategy\NodeToReflection;
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator;
use PHPStan\Node\Expr\TypeExpr;
use PHPStan\Reflection\ConstantNameHelper;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\ConstantTypeHelper;
use ReflectionClass;
use ReflectionFunction;
use function array_key_exists;
use function array_keys;
use function class_exists;
use function constant;
use function count;
use function defined;
use function function_exists;
use function interface_exists;
use function is_file;
use function is_string;
use function opcache_invalidate;
use function restore_error_handler;
use function set_error_handler;
use function spl_autoload_functions;
use function strtolower;
use function trait_exists;
use const PHP_VERSION_ID;
/**
 * Use PHP's built in autoloader to locate a class, without actually loading.
 *
 * There are some prerequisites...
 *   - we expect the autoloader to load classes from a file (i.e. using require/include)
 *
 * Modified code from Roave/BetterReflection, Copyright (c) 2017 Roave, LLC.
 */
class AutoloadSourceLocator implements SourceLocator
{
    /** @var array{classes: array<string, string>, functions: array<string, string>, constants: array<string, string>} */
    private $presentSymbols = ['classes' => [], 'functions' => [], 'constants' => []];
    /** @var array<string, true> */
    private $scannedFiles = [];
    /** @var array<string, int> */
    private $startLineByClass = [];
    /**
     * @var \PHPStan\Reflection\BetterReflection\SourceLocator\FileNodesFetcher
     */
    private $fileNodesFetcher;
    /**
     * @var bool
     */
    private $executeAutoloadersInFileReadTrap;
    public function __construct(\PHPStan\Reflection\BetterReflection\SourceLocator\FileNodesFetcher $fileNodesFetcher, bool $executeAutoloadersInFileReadTrap)
    {
        $this->fileNodesFetcher = $fileNodesFetcher;
        $this->executeAutoloadersInFileReadTrap = $executeAutoloadersInFileReadTrap;
    }
    public function locateIdentifier(Reflector $reflector, Identifier $identifier) : ?Reflection
    {
        if ($identifier->isFunction()) {
            $functionName = $identifier->getName();
            $loweredFunctionName = strtolower($functionName);
            if (array_key_exists($loweredFunctionName, $this->presentSymbols['functions'])) {
                return $this->findReflection($reflector, $this->presentSymbols['functions'][$loweredFunctionName], $identifier, null);
            }
            if (!function_exists($functionName)) {
                return null;
            }
            $reflection = new ReflectionFunction($functionName);
            $reflectionFileName = $reflection->getFileName();
            if (!is_string($reflectionFileName)) {
                return null;
            }
            if (!is_file($reflectionFileName)) {
                return null;
            }
            return $this->findReflection($reflector, $reflectionFileName, $identifier, null);
        }
        if ($identifier->isConstant()) {
            $constantName = ConstantNameHelper::normalize($identifier->getName());
            if (array_key_exists($constantName, $this->presentSymbols['constants'])) {
                return $this->findReflection($reflector, $this->presentSymbols['constants'][$constantName], $identifier, null);
            }
            if (!defined($constantName)) {
                return null;
            }
            $constantValue = @constant($constantName);
            return ReflectionConstant::createFromNode($reflector, new FuncCall(new Name('define'), [new Arg(new String_($constantName)), new Arg(new TypeExpr(ConstantTypeHelper::getTypeFromValue($constantValue)))], ['startLine' => 1, 'endLine' => 1, 'startFilePos' => 1, 'endFilePos' => 4]), new LocatedSource('<?php', $constantName, null), null, null);
        }
        if (!$identifier->isClass()) {
            return null;
        }
        $loweredClassName = strtolower($identifier->getName());
        if (array_key_exists($loweredClassName, $this->presentSymbols['classes'])) {
            $startLine = null;
            if (array_key_exists($loweredClassName, $this->startLineByClass)) {
                $startLine = $this->startLineByClass[$loweredClassName];
            } else {
                $reflection = $this->getReflectionClass($identifier->getName());
                if ($reflection !== null && $reflection->getStartLine() !== \false && is_string($reflection->getFileName()) && is_file($reflection->getFileName()) && $reflection->getFileName() === $this->presentSymbols['classes'][$loweredClassName]) {
                    $startLine = $reflection->getStartLine();
                }
            }
            return $this->findReflection($reflector, $this->presentSymbols['classes'][$loweredClassName], $identifier, $startLine);
        }
        $locateResult = $this->locateClassByName($identifier->getName());
        if ($locateResult === null) {
            return null;
        }
        [$potentiallyLocatedFiles, $className, $startLine] = $locateResult;
        if ($startLine !== null) {
            $this->startLineByClass[strtolower($className)] = $startLine;
        }
        $newIdentifier = new Identifier($className, $identifier->getType());
        foreach ($potentiallyLocatedFiles as $potentiallyLocatedFile) {
            $reflection = $this->findReflection($reflector, $potentiallyLocatedFile, $newIdentifier, $startLine);
            if ($reflection === null) {
                continue;
            }
            return $reflection;
        }
        return null;
    }
    private function findReflection(Reflector $reflector, string $file, Identifier $identifier, ?int $startLine) : ?Reflection
    {
        $result = $this->fileNodesFetcher->fetchNodes($file);
        if (!array_key_exists($file, $this->scannedFiles)) {
            foreach (array_keys($result->getClassNodes()) as $className) {
                if (array_key_exists($className, $this->presentSymbols['classes'])) {
                    continue;
                }
                $this->presentSymbols['classes'][$className] = $file;
            }
            foreach (array_keys($result->getFunctionNodes()) as $functionName) {
                if (array_key_exists($functionName, $this->presentSymbols['functions'])) {
                    continue;
                }
                $this->presentSymbols['functions'][$functionName] = $file;
            }
            foreach (array_keys($result->getConstantNodes()) as $constantName) {
                if (array_key_exists($constantName, $this->presentSymbols['constants'])) {
                    continue;
                }
                $this->presentSymbols['constants'][$constantName] = $file;
            }
            $this->scannedFiles[$file] = \true;
        }
        $nodeToReflection = new NodeToReflection();
        if ($identifier->isClass()) {
            $identifierName = strtolower($identifier->getName());
            if (!array_key_exists($identifierName, $result->getClassNodes())) {
                return null;
            }
            $classNodesCount = count($result->getClassNodes()[$identifierName]);
            foreach ($result->getClassNodes()[$identifierName] as $classNode) {
                if ($classNodesCount > 1 && $startLine !== null) {
                    if (count($classNode->getNode()->attrGroups) > 0 && PHP_VERSION_ID < 80000) {
                        $startLine--;
                    }
                    if ($startLine !== $classNode->getNode()->getStartLine()) {
                        continue;
                    }
                }
                return $nodeToReflection->__invoke($reflector, $classNode->getNode(), $classNode->getLocatedSource(), $classNode->getNamespace());
            }
            return null;
        }
        if ($identifier->isFunction()) {
            $identifierName = strtolower($identifier->getName());
            if (!array_key_exists($identifierName, $result->getFunctionNodes())) {
                return null;
            }
            foreach ($result->getFunctionNodes()[$identifierName] as $functionNode) {
                return $nodeToReflection->__invoke($reflector, $functionNode->getNode(), $functionNode->getLocatedSource(), $functionNode->getNamespace());
            }
        }
        if ($identifier->isConstant()) {
            $identifierName = ConstantNameHelper::normalize($identifier->getName());
            $constantNodes = $result->getConstantNodes();
            if (!array_key_exists($identifierName, $constantNodes)) {
                return null;
            }
            foreach ($constantNodes[$identifierName] as $fetchedConstantNode) {
                $constantNode = $fetchedConstantNode->getNode();
                $positionInNode = null;
                if ($constantNode instanceof Const_) {
                    foreach ($constantNode->consts as $constPosition => $const) {
                        if ($const->namespacedName === null) {
                            throw new ShouldNotHappenException();
                        }
                        if (ConstantNameHelper::normalize($const->namespacedName->toString()) === $identifierName) {
                            /** @var int $positionInNode */
                            $positionInNode = $constPosition;
                            break;
                        }
                    }
                    if ($positionInNode === null) {
                        throw new ShouldNotHappenException();
                    }
                }
                return $nodeToReflection->__invoke($reflector, $constantNode, $fetchedConstantNode->getLocatedSource(), $fetchedConstantNode->getNamespace(), $positionInNode);
            }
        }
        return null;
    }
    public function locateIdentifiersByType(Reflector $reflector, IdentifierType $identifierType) : array
    {
        return [];
    }
    /**
     * @return ReflectionClass<object>|null
     */
    private function getReflectionClass(string $className) : ?ReflectionClass
    {
        if (class_exists($className, \false) || interface_exists($className, \false) || trait_exists($className, \false)) {
            return new ReflectionClass($className);
        }
        return null;
    }
    /**
     * Attempt to locate a class by name.
     *
     * If class already exists, simply use internal reflection API to get the
     * filename and store it.
     *
     * If class does not exist, we make an assumption that whatever autoloaders
     * that are registered will be loading a file. We then override the file://
     * protocol stream wrapper to "capture" the filename we expect the class to
     * be in, and then restore it. Note that class_exists will cause an error
     * that it cannot find the file, so we squelch the errors by overriding the
     * error handler temporarily.
     *
     * @return array{string[], string, int|null}|null
     */
    private function locateClassByName(string $className) : ?array
    {
        $reflection = $this->getReflectionClass($className);
        if ($reflection !== null) {
            $filename = $reflection->getFileName();
            if (!is_string($filename)) {
                return null;
            }
            if (!is_file($filename)) {
                return null;
            }
            return [[$filename], $reflection->getName(), $reflection->getStartLine() !== \false ? $reflection->getStartLine() : null];
        }
        if (!$this->executeAutoloadersInFileReadTrap) {
            return null;
        }
        $this->silenceErrors();
        try {
            $result = \PHPStan\Reflection\BetterReflection\SourceLocator\FileReadTrapStreamWrapper::withStreamWrapperOverride(static function () use($className) : ?array {
                $functions = spl_autoload_functions();
                if ($functions === \false) {
                    return null;
                }
                foreach ($functions as $preExistingAutoloader) {
                    $preExistingAutoloader($className);
                    /**
                     * This static variable is populated by the side-effect of the stream wrapper
                     * trying to read the file path when `include()` is used by an autoloader.
                     *
                     * This will not be `null` when the autoloader tried to read a file.
                     */
                    if (\PHPStan\Reflection\BetterReflection\SourceLocator\FileReadTrapStreamWrapper::$autoloadLocatedFiles !== []) {
                        return [\PHPStan\Reflection\BetterReflection\SourceLocator\FileReadTrapStreamWrapper::$autoloadLocatedFiles, $className, null];
                    }
                }
                return null;
            });
            if ($result === null) {
                return null;
            }
            if (!function_exists('opcache_invalidate')) {
                return $result;
            }
            foreach ($result[0] as $file) {
                opcache_invalidate($file, \true);
            }
            return $result;
        } finally {
            restore_error_handler();
        }
    }
    private function silenceErrors() : void
    {
        set_error_handler(static function () : bool {
            return \true;
        });
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\BetterReflection\SourceLocator;

use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\Identifier\IdentifierType;
use PHPStan\BetterReflection\Reflection\Reflection;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\PsrAutoloaderMapping;
use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator;
use function is_file;
class OptimizedPsrAutoloaderLocator implements SourceLocator
{
    /** @var array<string, OptimizedSingleFileSourceLocator> */
    private $locators = [];
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\PsrAutoloaderMapping
     */
    private $mapping;
    /**
     * @var \PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedSingleFileSourceLocatorRepository
     */
    private $optimizedSingleFileSourceLocatorRepository;
    public function __construct(PsrAutoloaderMapping $mapping, \PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedSingleFileSourceLocatorRepository $optimizedSingleFileSourceLocatorRepository)
    {
        $this->mapping = $mapping;
        $this->optimizedSingleFileSourceLocatorRepository = $optimizedSingleFileSourceLocatorRepository;
    }
    public function locateIdentifier(Reflector $reflector, Identifier $identifier) : ?Reflection
    {
        foreach ($this->locators as $locator) {
            $reflection = $locator->locateIdentifier($reflector, $identifier);
            if ($reflection === null) {
                continue;
            }
            return $reflection;
        }
        foreach ($this->mapping->resolvePossibleFilePaths($identifier) as $file) {
            if (!is_file($file)) {
                continue;
            }
            $locator = $this->optimizedSingleFileSourceLocatorRepository->getOrCreate($file);
            $reflection = $locator->locateIdentifier($reflector, $identifier);
            if ($reflection === null) {
                continue;
            }
            $this->locators[$file] = $locator;
            return $reflection;
        }
        return null;
    }
    /**
     * @return list<Reflection>
     */
    public function locateIdentifiersByType(Reflector $reflector, IdentifierType $identifierType) : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\BetterReflection\SourceLocator;

use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\Identifier\IdentifierType;
use PHPStan\BetterReflection\Reflection\Reflection;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Ast\Locator;
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
use PHPStan\BetterReflection\SourceLocator\SourceStubber\ReflectionSourceStubber;
use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator;
use ReflectionClass;
class ReflectionClassSourceLocator implements SourceLocator
{
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\Ast\Locator
     */
    private $astLocator;
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\SourceStubber\ReflectionSourceStubber
     */
    private $reflectionSourceStubber;
    public function __construct(Locator $astLocator, ReflectionSourceStubber $reflectionSourceStubber)
    {
        $this->astLocator = $astLocator;
        $this->reflectionSourceStubber = $reflectionSourceStubber;
    }
    public function locateIdentifier(Reflector $reflector, Identifier $identifier) : ?Reflection
    {
        if (!$identifier->isClass()) {
            return null;
        }
        /** @var class-string $className */
        $className = $identifier->getName();
        $stub = $this->reflectionSourceStubber->generateClassStub($className);
        if ($stub === null) {
            return null;
        }
        $reflection = new ReflectionClass($className);
        return $this->astLocator->findReflection($reflector, new LocatedSource($stub->getStub(), $reflection->getName(), null), new Identifier($reflection->getName(), new IdentifierType(IdentifierType::IDENTIFIER_CLASS)));
    }
    public function locateIdentifiersByType(Reflector $reflector, IdentifierType $identifierType) : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\BetterReflection\SourceLocator;

interface OptimizedSingleFileSourceLocatorFactory
{
    public function create(string $fileName) : \PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedSingleFileSourceLocator;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\BetterReflection\SourceLocator;

use function array_key_exists;
class OptimizedSingleFileSourceLocatorRepository
{
    /** @var array<string, OptimizedSingleFileSourceLocator> */
    private $locators = [];
    /**
     * @var \PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedSingleFileSourceLocatorFactory
     */
    private $factory;
    public function __construct(\PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedSingleFileSourceLocatorFactory $factory)
    {
        $this->factory = $factory;
    }
    public function getOrCreate(string $fileName) : \PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedSingleFileSourceLocator
    {
        if (array_key_exists($fileName, $this->locators)) {
            return $this->locators[$fileName];
        }
        $this->locators[$fileName] = $this->factory->create($fileName);
        return $this->locators[$fileName];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\BetterReflection\SourceLocator;

use PhpParser\Node;
use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\Identifier\IdentifierType;
use PHPStan\BetterReflection\Reflection\Reflection;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Ast\Strategy\NodeToReflection;
use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\ConstantNameHelper;
use PHPStan\ShouldNotHappenException;
use function array_key_exists;
use function array_values;
use function count;
use function current;
use function ltrim;
use function php_strip_whitespace;
use function preg_match_all;
use function preg_replace;
use function sprintf;
use function strtolower;
class OptimizedDirectorySourceLocator implements SourceLocator
{
    /**
     * @var \PHPStan\Reflection\BetterReflection\SourceLocator\PhpFileCleaner
     */
    private $cleaner;
    /**
     * @var string
     */
    private $extraTypes;
    /** @var array<string, string>|null */
    private $classToFile;
    /** @var array<string, string>|null */
    private $constantToFile;
    /** @var array<string, array<int, string>>|null */
    private $functionToFiles;
    /**
     * @var \PHPStan\Reflection\BetterReflection\SourceLocator\FileNodesFetcher
     */
    private $fileNodesFetcher;
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    /**
     * @var string[]
     */
    private $files;
    /**
     * @param string[] $files
     */
    public function __construct(\PHPStan\Reflection\BetterReflection\SourceLocator\FileNodesFetcher $fileNodesFetcher, PhpVersion $phpVersion, array $files)
    {
        $this->fileNodesFetcher = $fileNodesFetcher;
        $this->phpVersion = $phpVersion;
        $this->files = $files;
        $this->extraTypes = $this->phpVersion->supportsEnums() ? '|enum' : '';
        $this->cleaner = new \PHPStan\Reflection\BetterReflection\SourceLocator\PhpFileCleaner();
    }
    public function locateIdentifier(Reflector $reflector, Identifier $identifier) : ?Reflection
    {
        if ($identifier->isClass()) {
            $className = strtolower($identifier->getName());
            $file = $this->findFileByClass($className);
            if ($file === null) {
                return null;
            }
            $fetchedClassNodes = $this->fileNodesFetcher->fetchNodes($file)->getClassNodes();
            if (!array_key_exists($className, $fetchedClassNodes)) {
                return null;
            }
            /** @var FetchedNode<Node\Stmt\ClassLike> $fetchedClassNode */
            $fetchedClassNode = current($fetchedClassNodes[$className]);
            return $this->nodeToReflection($reflector, $fetchedClassNode);
        }
        if ($identifier->isFunction()) {
            $functionName = strtolower($identifier->getName());
            $files = $this->findFilesByFunction($functionName);
            $fetchedFunctionNode = null;
            foreach ($files as $file) {
                $fetchedFunctionNodes = $this->fileNodesFetcher->fetchNodes($file)->getFunctionNodes();
                if (!array_key_exists($functionName, $fetchedFunctionNodes)) {
                    continue;
                }
                /** @var FetchedNode<Node\Stmt\Function_> $fetchedFunctionNode */
                $fetchedFunctionNode = current($fetchedFunctionNodes[$functionName]);
            }
            if ($fetchedFunctionNode === null) {
                return null;
            }
            return $this->nodeToReflection($reflector, $fetchedFunctionNode);
        }
        if ($identifier->isConstant()) {
            $constantName = ConstantNameHelper::normalize($identifier->getName());
            $file = $this->findFileByConstant($constantName);
            if ($file === null) {
                return null;
            }
            $fetchedConstantNodes = $this->fileNodesFetcher->fetchNodes($file)->getConstantNodes();
            if (!array_key_exists($constantName, $fetchedConstantNodes)) {
                return null;
            }
            /** @var FetchedNode<Node\Stmt\Const_|Node\Expr\FuncCall> $fetchedConstantNode */
            $fetchedConstantNode = current($fetchedConstantNodes[$constantName]);
            return $this->nodeToReflection($reflector, $fetchedConstantNode, $this->findConstantPositionInConstNode($fetchedConstantNode->getNode(), $constantName));
        }
        return null;
    }
    /**
     * @param FetchedNode<Node\Stmt\ClassLike>|FetchedNode<Node\Stmt\Function_>|FetchedNode<Node\Stmt\Const_|Node\Expr\FuncCall> $fetchedNode
     */
    private function nodeToReflection(Reflector $reflector, \PHPStan\Reflection\BetterReflection\SourceLocator\FetchedNode $fetchedNode, ?int $positionInNode = null) : Reflection
    {
        $nodeToReflection = new NodeToReflection();
        return $nodeToReflection->__invoke($reflector, $fetchedNode->getNode(), $fetchedNode->getLocatedSource(), $fetchedNode->getNamespace(), $positionInNode);
    }
    private function findFileByClass(string $className) : ?string
    {
        if ($this->classToFile === null) {
            $this->init();
            if ($this->classToFile === null) {
                throw new ShouldNotHappenException();
            }
        }
        if (!array_key_exists($className, $this->classToFile)) {
            return null;
        }
        return $this->classToFile[$className];
    }
    private function findFileByConstant(string $constantName) : ?string
    {
        if ($this->constantToFile === null) {
            $this->init();
            if ($this->constantToFile === null) {
                throw new ShouldNotHappenException();
            }
        }
        if (!array_key_exists($constantName, $this->constantToFile)) {
            return null;
        }
        return $this->constantToFile[$constantName];
    }
    /**
     * @return string[]
     */
    private function findFilesByFunction(string $functionName) : array
    {
        if ($this->functionToFiles === null) {
            $this->init();
            if ($this->functionToFiles === null) {
                throw new ShouldNotHappenException();
            }
        }
        if (!array_key_exists($functionName, $this->functionToFiles)) {
            return [];
        }
        return $this->functionToFiles[$functionName];
    }
    private function init() : void
    {
        $classToFile = [];
        $constantToFile = [];
        $functionToFiles = [];
        foreach ($this->files as $file) {
            $symbols = $this->findSymbols($file);
            foreach ($symbols['classes'] as $classInFile) {
                $classToFile[$classInFile] = $file;
            }
            foreach ($symbols['constants'] as $constantInFile) {
                $constantToFile[$constantInFile] = $file;
            }
            foreach ($symbols['functions'] as $functionInFile) {
                if (!array_key_exists($functionInFile, $functionToFiles)) {
                    $functionToFiles[$functionInFile] = [];
                }
                $functionToFiles[$functionInFile][] = $file;
            }
        }
        $this->classToFile = $classToFile;
        $this->functionToFiles = $functionToFiles;
        $this->constantToFile = $constantToFile;
    }
    /**
     * Inspired by Composer\Autoload\ClassMapGenerator::findClasses()
     * @link https://github.com/composer/composer/blob/45d3e133a4691eccb12e9cd6f9dfd76eddc1906d/src/Composer/Autoload/ClassMapGenerator.php#L216
     *
     * @return array{classes: string[], functions: string[], constants: string[]}
     */
    private function findSymbols(string $file) : array
    {
        $contents = @php_strip_whitespace($file);
        if ($contents === '') {
            return ['classes' => [], 'functions' => [], 'constants' => []];
        }
        $matchResults = (bool) preg_match_all(sprintf('{\\b(?:(?:class|interface|trait|const|function%s)\\s)|(?:define\\s*\\()}i', $this->extraTypes), $contents, $matches);
        if (!$matchResults) {
            return ['classes' => [], 'functions' => [], 'constants' => []];
        }
        $contents = $this->cleaner->clean($contents, count($matches[0]));
        preg_match_all(sprintf('{
			(?:
				\\b(?<![\\$:>])(?:
					(?: (?P<type>class|interface|trait%s) \\s++ (?P<name>[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff\\-]*+) )
					| (?: (?P<function>function) \\s++ (?:&\\s*)? (?P<fname>[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff\\-]*+) \\s*+ [&\\(] )
					| (?: (?P<constant>const) \\s++ (?P<cname>[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff\\-]*+) \\s*+ [^;] )
					| (?: (?:\\\\)? (?P<define>define) \\s*+ \\( \\s*+ [\'"] (?P<dname>[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*+(?:[\\\\]{1,2}[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*+)*+) )
					| (?: (?P<ns>namespace) (?P<nsname>\\s++[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*+(?:\\s*+\\\\\\s*+[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*+)*+)? \\s*+ [\\{;] )
				)
			)
		}ix', $this->extraTypes), $contents, $matches);
        $classes = [];
        $functions = [];
        $constants = [];
        $namespace = '';
        for ($i = 0, $len = count($matches['type']); $i < $len; $i++) {
            if (isset($matches['ns'][$i]) && $matches['ns'][$i] !== '') {
                $namespace = preg_replace('~\\s+~', '', strtolower($matches['nsname'][$i])) . '\\';
                continue;
            }
            if ($matches['function'][$i] !== '') {
                $functions[] = strtolower(ltrim($namespace . $matches['fname'][$i], '\\'));
                continue;
            }
            if ($matches['constant'][$i] !== '') {
                $constants[] = ConstantNameHelper::normalize(ltrim($namespace . $matches['cname'][$i], '\\'));
            }
            if ($matches['define'][$i] !== '') {
                $constants[] = ConstantNameHelper::normalize($matches['dname'][$i]);
                continue;
            }
            $name = $matches['name'][$i];
            // skip anon classes extending/implementing
            if ($name === 'extends' || $name === 'implements') {
                continue;
            }
            $classes[] = strtolower(ltrim($namespace . $name, '\\'));
        }
        return ['classes' => $classes, 'functions' => $functions, 'constants' => $constants];
    }
    /**
     * @return list<Reflection>
     */
    public function locateIdentifiersByType(Reflector $reflector, IdentifierType $identifierType) : array
    {
        if ($this->classToFile === null || $this->functionToFiles === null || $this->constantToFile === null) {
            $this->init();
            if ($this->classToFile === null || $this->functionToFiles === null || $this->constantToFile === null) {
                throw new ShouldNotHappenException();
            }
        }
        $reflections = [];
        if ($identifierType->isClass()) {
            foreach ($this->classToFile as $file) {
                $fetchedNodesResult = $this->fileNodesFetcher->fetchNodes($file);
                foreach ($fetchedNodesResult->getClassNodes() as $identifierName => $fetchedClassNodes) {
                    foreach ($fetchedClassNodes as $fetchedClassNode) {
                        $reflections[$identifierName] = $this->nodeToReflection($reflector, $fetchedClassNode);
                    }
                }
            }
        } elseif ($identifierType->isFunction()) {
            foreach ($this->functionToFiles as $files) {
                foreach ($files as $file) {
                    $fetchedNodesResult = $this->fileNodesFetcher->fetchNodes($file);
                    foreach ($fetchedNodesResult->getFunctionNodes() as $identifierName => $fetchedFunctionNodes) {
                        foreach ($fetchedFunctionNodes as $fetchedFunctionNode) {
                            $reflections[$identifierName] = $this->nodeToReflection($reflector, $fetchedFunctionNode);
                            continue 2;
                        }
                    }
                }
            }
        } elseif ($identifierType->isConstant()) {
            foreach ($this->constantToFile as $file) {
                $fetchedNodesResult = $this->fileNodesFetcher->fetchNodes($file);
                foreach ($fetchedNodesResult->getConstantNodes() as $identifierName => $fetchedConstantNodes) {
                    foreach ($fetchedConstantNodes as $fetchedConstantNode) {
                        $reflections[$identifierName] = $this->nodeToReflection($reflector, $fetchedConstantNode, $this->findConstantPositionInConstNode($fetchedConstantNode->getNode(), $identifierName));
                    }
                }
            }
        }
        return array_values($reflections);
    }
    /**
     * @param \PhpParser\Node\Stmt\Const_|\PhpParser\Node\Expr\FuncCall $constantNode
     */
    private function findConstantPositionInConstNode($constantNode, string $constantName) : ?int
    {
        if ($constantNode instanceof Node\Expr\FuncCall) {
            return null;
        }
        /** @var int $position */
        foreach ($constantNode->consts as $position => $const) {
            if ($const->namespacedName === null) {
                throw new ShouldNotHappenException();
            }
            if (ConstantNameHelper::normalize($const->namespacedName->toString()) === $constantName) {
                return $position;
            }
        }
        throw new ShouldNotHappenException();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\BetterReflection\SourceLocator;

use function array_key_exists;
class OptimizedDirectorySourceLocatorRepository
{
    /** @var array<string, OptimizedDirectorySourceLocator> */
    private $locators = [];
    /**
     * @var \PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedDirectorySourceLocatorFactory
     */
    private $factory;
    public function __construct(\PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedDirectorySourceLocatorFactory $factory)
    {
        $this->factory = $factory;
    }
    public function getOrCreate(string $directory) : \PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedDirectorySourceLocator
    {
        if (array_key_exists($directory, $this->locators)) {
            return $this->locators[$directory];
        }
        $this->locators[$directory] = $this->factory->createByDirectory($directory);
        return $this->locators[$directory];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\BetterReflection\SourceLocator;

use PHPStan\File\FileFinder;
use PHPStan\Php\PhpVersion;
class OptimizedDirectorySourceLocatorFactory
{
    /**
     * @var \PHPStan\Reflection\BetterReflection\SourceLocator\FileNodesFetcher
     */
    private $fileNodesFetcher;
    /**
     * @var \PHPStan\File\FileFinder
     */
    private $fileFinder;
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(\PHPStan\Reflection\BetterReflection\SourceLocator\FileNodesFetcher $fileNodesFetcher, FileFinder $fileFinder, PhpVersion $phpVersion)
    {
        $this->fileNodesFetcher = $fileNodesFetcher;
        $this->fileFinder = $fileFinder;
        $this->phpVersion = $phpVersion;
    }
    public function createByDirectory(string $directory) : \PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedDirectorySourceLocator
    {
        return new \PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedDirectorySourceLocator($this->fileNodesFetcher, $this->phpVersion, $this->fileFinder->findFiles([$directory])->getFiles());
    }
    /**
     * @param string[] $files
     */
    public function createByFiles(array $files) : \PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedDirectorySourceLocator
    {
        return new \PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedDirectorySourceLocator($this->fileNodesFetcher, $this->phpVersion, $files);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\BetterReflection\SourceLocator;

use PhpParser\Node;
use PhpParser\Node\Stmt\Namespace_;
use PhpParser\NodeTraverser;
use PhpParser\NodeVisitorAbstract;
use PHPStan\BetterReflection\Reflection\Exception\InvalidConstantNode;
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
use PHPStan\BetterReflection\Util\ConstantNodeChecker;
use PHPStan\Reflection\ConstantNameHelper;
use function strtolower;
class CachingVisitor extends NodeVisitorAbstract
{
    /**
     * @var string
     */
    private $fileName;
    /**
     * @var string
     */
    private $contents;
    /** @var array<string, array<FetchedNode<Node\Stmt\ClassLike>>> */
    private $classNodes;
    /** @var array<string, array<FetchedNode<Node\Stmt\Function_>>> */
    private $functionNodes;
    /** @var array<string, array<FetchedNode<Node\Stmt\Const_|Node\Expr\FuncCall>>> */
    private $constantNodes;
    /**
     * @var \PhpParser\Node\Stmt\Namespace_|null
     */
    private $currentNamespaceNode;
    public function enterNode(Node $node) : ?int
    {
        if ($node instanceof Namespace_) {
            $this->currentNamespaceNode = $node;
        }
        if ($node instanceof Node\Stmt\ClassLike) {
            if ($node->name !== null) {
                $fullClassName = $node->name->toString();
                if ($this->currentNamespaceNode !== null && $this->currentNamespaceNode->name !== null) {
                    $fullClassName = $this->currentNamespaceNode->name . '\\' . $fullClassName;
                }
                $this->classNodes[strtolower($fullClassName)][] = new \PHPStan\Reflection\BetterReflection\SourceLocator\FetchedNode($node, $this->currentNamespaceNode, new LocatedSource($this->contents, $fullClassName, $this->fileName));
            }
            return NodeTraverser::DONT_TRAVERSE_CHILDREN;
        }
        if ($node instanceof Node\Stmt\Function_) {
            if ($node->namespacedName !== null) {
                $functionName = $node->namespacedName->toString();
                $this->functionNodes[strtolower($functionName)][] = new \PHPStan\Reflection\BetterReflection\SourceLocator\FetchedNode($node, $this->currentNamespaceNode, new LocatedSource($this->contents, $functionName, $this->fileName));
            }
            return NodeTraverser::DONT_TRAVERSE_CHILDREN;
        }
        if ($node instanceof Node\Stmt\Const_) {
            foreach ($node->consts as $const) {
                if ($const->namespacedName === null) {
                    continue;
                }
                $this->constantNodes[ConstantNameHelper::normalize($const->namespacedName->toString())][] = new \PHPStan\Reflection\BetterReflection\SourceLocator\FetchedNode($node, $this->currentNamespaceNode, new LocatedSource($this->contents, null, $this->fileName));
            }
            return NodeTraverser::DONT_TRAVERSE_CHILDREN;
        }
        if ($node instanceof Node\Expr\FuncCall) {
            try {
                ConstantNodeChecker::assertValidDefineFunctionCall($node);
            } catch (InvalidConstantNode $exception) {
                return null;
            }
            /** @var Node\Scalar\String_ $nameNode */
            $nameNode = $node->getArgs()[0]->value;
            $constantName = $nameNode->value;
            $constantNode = new \PHPStan\Reflection\BetterReflection\SourceLocator\FetchedNode($node, $this->currentNamespaceNode, new LocatedSource($this->contents, $constantName, $this->fileName));
            $this->constantNodes[ConstantNameHelper::normalize($constantName)][] = $constantNode;
            return NodeTraverser::DONT_TRAVERSE_CHILDREN;
        }
        return null;
    }
    /**
     * @return null
     */
    public function leaveNode(Node $node)
    {
        if (!$node instanceof Namespace_) {
            return null;
        }
        $this->currentNamespaceNode = null;
        return null;
    }
    /**
     * @return array<string, array<FetchedNode<Node\Stmt\ClassLike>>>
     */
    public function getClassNodes() : array
    {
        return $this->classNodes;
    }
    /**
     * @return array<string, array<FetchedNode<Node\Stmt\Function_>>>
     */
    public function getFunctionNodes() : array
    {
        return $this->functionNodes;
    }
    /**
     * @return array<string, array<FetchedNode<Node\Stmt\Const_|Node\Expr\FuncCall>>>
     */
    public function getConstantNodes() : array
    {
        return $this->constantNodes;
    }
    public function reset(string $fileName, string $contents) : void
    {
        $this->classNodes = [];
        $this->functionNodes = [];
        $this->constantNodes = [];
        $this->fileName = $fileName;
        $this->contents = $contents;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\BetterReflection\SourceLocator;

use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\PsrAutoloaderMapping;
interface OptimizedPsrAutoloaderLocatorFactory
{
    public function create(PsrAutoloaderMapping $mapping) : \PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedPsrAutoloaderLocator;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\BetterReflection\SourceLocator;

use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\Identifier\IdentifierType;
use PHPStan\BetterReflection\Reflection\Reflection;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator;
use function class_exists;
use function interface_exists;
use function PHPStan\autoloadFunctions;
use function trait_exists;
class AutoloadFunctionsSourceLocator implements SourceLocator
{
    /**
     * @var \PHPStan\Reflection\BetterReflection\SourceLocator\AutoloadSourceLocator
     */
    private $autoloadSourceLocator;
    /**
     * @var \PHPStan\Reflection\BetterReflection\SourceLocator\ReflectionClassSourceLocator
     */
    private $reflectionClassSourceLocator;
    public function __construct(\PHPStan\Reflection\BetterReflection\SourceLocator\AutoloadSourceLocator $autoloadSourceLocator, \PHPStan\Reflection\BetterReflection\SourceLocator\ReflectionClassSourceLocator $reflectionClassSourceLocator)
    {
        $this->autoloadSourceLocator = $autoloadSourceLocator;
        $this->reflectionClassSourceLocator = $reflectionClassSourceLocator;
    }
    public function locateIdentifier(Reflector $reflector, Identifier $identifier) : ?Reflection
    {
        if (!$identifier->isClass()) {
            return null;
        }
        $className = $identifier->getName();
        if (class_exists($className, \false) || interface_exists($className, \false) || trait_exists($className, \false)) {
            return null;
        }
        $autoloadFunctions = autoloadFunctions();
        foreach ($autoloadFunctions as $autoloadFunction) {
            $autoloadFunction($className);
            $reflection = $this->autoloadSourceLocator->locateIdentifier($reflector, $identifier);
            if ($reflection !== null) {
                return $reflection;
            }
            $reflection = $this->reflectionClassSourceLocator->locateIdentifier($reflector, $identifier);
            if ($reflection !== null) {
                return $reflection;
            }
        }
        return null;
    }
    public function locateIdentifiersByType(Reflector $reflector, IdentifierType $identifierType) : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\BetterReflection\SourceLocator;

use _PHPStan_dcc7b7cff\Nette\Utils\Json;
use _PHPStan_dcc7b7cff\Nette\Utils\JsonException;
use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Psr0Mapping;
use PHPStan\BetterReflection\SourceLocator\Type\Composer\Psr\Psr4Mapping;
use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator;
use PHPStan\File\CouldNotReadFileException;
use PHPStan\File\FileReader;
use PHPStan\Internal\ComposerHelper;
use PHPStan\Php\PhpVersion;
use function array_filter;
use function array_key_exists;
use function array_map;
use function array_merge;
use function array_merge_recursive;
use function array_reverse;
use function count;
use function dirname;
use function glob;
use function is_dir;
use function is_file;
use function strpos;
use const GLOB_ONLYDIR;
class ComposerJsonAndInstalledJsonSourceLocatorMaker
{
    /**
     * @var \PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedDirectorySourceLocatorRepository
     */
    private $optimizedDirectorySourceLocatorRepository;
    /**
     * @var \PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedPsrAutoloaderLocatorFactory
     */
    private $optimizedPsrAutoloaderLocatorFactory;
    /**
     * @var \PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedDirectorySourceLocatorFactory
     */
    private $optimizedDirectorySourceLocatorFactory;
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(\PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedDirectorySourceLocatorRepository $optimizedDirectorySourceLocatorRepository, \PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedPsrAutoloaderLocatorFactory $optimizedPsrAutoloaderLocatorFactory, \PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedDirectorySourceLocatorFactory $optimizedDirectorySourceLocatorFactory, PhpVersion $phpVersion)
    {
        $this->optimizedDirectorySourceLocatorRepository = $optimizedDirectorySourceLocatorRepository;
        $this->optimizedPsrAutoloaderLocatorFactory = $optimizedPsrAutoloaderLocatorFactory;
        $this->optimizedDirectorySourceLocatorFactory = $optimizedDirectorySourceLocatorFactory;
        $this->phpVersion = $phpVersion;
    }
    public function create(string $projectInstallationPath) : ?SourceLocator
    {
        $composer = ComposerHelper::getComposerConfig($projectInstallationPath);
        if ($composer === null) {
            return null;
        }
        $vendorDirectory = ComposerHelper::getVendorDirFromComposerConfig($projectInstallationPath, $composer);
        $installedJsonPath = $vendorDirectory . '/composer/installed.json';
        if (!is_file($installedJsonPath)) {
            return null;
        }
        $installedJsonDirectoryPath = dirname($installedJsonPath);
        try {
            $installedJsonContents = FileReader::read($installedJsonPath);
            $installedJson = Json::decode($installedJsonContents, Json::FORCE_ARRAY);
        } catch (CouldNotReadFileException|JsonException $exception) {
            return null;
        }
        $installed = $installedJson['packages'] ?? $installedJson;
        $dev = (bool) ($installedJson['dev'] ?? \true);
        $classMapPaths = array_merge($this->prefixPaths($this->packageToClassMapPaths($composer), $projectInstallationPath . '/'), $dev ? $this->prefixPaths($this->packageToClassMapPaths($composer, 'autoload-dev'), $projectInstallationPath . '/') : [], ...array_map(function (array $package) use($installedJsonDirectoryPath, $vendorDirectory) : array {
            return $this->prefixPaths($this->packageToClassMapPaths($package), $this->packagePrefixPath($installedJsonDirectoryPath, $package, $vendorDirectory));
        }, $installed));
        $classMapFiles = array_filter($classMapPaths, 'is_file');
        $classMapDirectories = array_filter($classMapPaths, 'is_dir');
        $filePaths = array_merge($this->prefixPaths($this->packageToFilePaths($composer), $projectInstallationPath . '/'), $dev ? $this->prefixPaths($this->packageToFilePaths($composer, 'autoload-dev'), $projectInstallationPath . '/') : [], ...array_map(function (array $package) use($installedJsonDirectoryPath, $vendorDirectory) : array {
            return $this->prefixPaths($this->packageToFilePaths($package), $this->packagePrefixPath($installedJsonDirectoryPath, $package, $vendorDirectory));
        }, $installed));
        $locators = [];
        $locators[] = $this->optimizedPsrAutoloaderLocatorFactory->create(Psr4Mapping::fromArrayMappings(array_merge_recursive($this->prefixWithInstallationPath($this->packageToPsr4AutoloadNamespaces($composer), $projectInstallationPath), $dev ? $this->prefixWithInstallationPath($this->packageToPsr4AutoloadNamespaces($composer, 'autoload-dev'), $projectInstallationPath) : [], ...array_map(function (array $package) use($installedJsonDirectoryPath, $vendorDirectory) : array {
            return $this->prefixWithPackagePath($this->packageToPsr4AutoloadNamespaces($package), $installedJsonDirectoryPath, $package, $vendorDirectory);
        }, $installed))));
        $locators[] = $this->optimizedPsrAutoloaderLocatorFactory->create(Psr0Mapping::fromArrayMappings(array_merge_recursive($this->prefixWithInstallationPath($this->packageToPsr0AutoloadNamespaces($composer), $projectInstallationPath), $dev ? $this->prefixWithInstallationPath($this->packageToPsr0AutoloadNamespaces($composer, 'autoload-dev'), $projectInstallationPath) : [], ...array_map(function (array $package) use($installedJsonDirectoryPath, $vendorDirectory) : array {
            return $this->prefixWithPackagePath($this->packageToPsr0AutoloadNamespaces($package), $installedJsonDirectoryPath, $package, $vendorDirectory);
        }, $installed))));
        foreach ($classMapDirectories as $classMapDirectory) {
            if (!is_dir($classMapDirectory)) {
                continue;
            }
            $locators[] = $this->optimizedDirectorySourceLocatorRepository->getOrCreate($classMapDirectory);
        }
        $files = [];
        foreach (array_merge($classMapFiles, $filePaths) as $file) {
            if (!is_file($file)) {
                continue;
            }
            $files[] = $file;
        }
        if (count($files) > 0) {
            $locators[] = $this->optimizedDirectorySourceLocatorFactory->createByFiles($files);
        }
        $binDir = ComposerHelper::getBinDirFromComposerConfig($projectInstallationPath, $composer);
        $phpunitBridgeDir = $binDir . '/.phpunit';
        if (!is_dir($vendorDirectory . '/phpunit/phpunit') && is_dir($phpunitBridgeDir)) {
            // from https://github.com/composer/composer/blob/8ff237afb61b8766efa576b8ae1cc8560c8aed96/phpstan/locate-phpunit-autoloader.php
            $bestDirFound = null;
            $phpunitBridgeDirectories = glob($phpunitBridgeDir . '/phpunit-*', GLOB_ONLYDIR);
            if ($phpunitBridgeDirectories !== \false) {
                foreach (array_reverse($phpunitBridgeDirectories) as $dir) {
                    $bestDirFound = $dir;
                    if ($this->phpVersion->getVersionId() >= 80100 && strpos($dir, 'phpunit-10') !== \false) {
                        break;
                    }
                    if ($this->phpVersion->getVersionId() >= 80000) {
                        if (strpos($dir, 'phpunit-9') !== \false) {
                            break;
                        }
                        continue;
                    }
                    if (strpos($dir, 'phpunit-8') !== \false || strpos($dir, 'phpunit-7') !== \false) {
                        break;
                    }
                }
                if ($bestDirFound !== null) {
                    $phpunitBridgeLocator = $this->create($bestDirFound);
                    if ($phpunitBridgeLocator !== null) {
                        $locators[] = $phpunitBridgeLocator;
                    }
                }
            }
        }
        return new AggregateSourceLocator($locators);
    }
    /**
     * @param mixed[] $package
     *
     * @return array<string, array<int, string>>
     */
    private function packageToPsr4AutoloadNamespaces(array $package, string $autoloadSection = 'autoload') : array
    {
        return array_map(static function ($namespacePaths) : array {
            return (array) $namespacePaths;
        }, $package[$autoloadSection]['psr-4'] ?? []);
    }
    /**
     * @param mixed[] $package
     *
     * @return array<string, array<int, string>>
     */
    private function packageToPsr0AutoloadNamespaces(array $package, string $autoloadSection = 'autoload') : array
    {
        return array_map(static function ($namespacePaths) : array {
            return (array) $namespacePaths;
        }, $package[$autoloadSection]['psr-0'] ?? []);
    }
    /**
     * @param mixed[] $package
     *
     * @return array<int, string>
     */
    private function packageToClassMapPaths(array $package, string $autoloadSection = 'autoload') : array
    {
        return $package[$autoloadSection]['classmap'] ?? [];
    }
    /**
     * @param mixed[] $package
     *
     * @return array<int, string>
     */
    private function packageToFilePaths(array $package, string $autoloadSection = 'autoload') : array
    {
        return $package[$autoloadSection]['files'] ?? [];
    }
    /**
     * @param mixed[] $package
     */
    private function packagePrefixPath(string $installedJsonDirectoryPath, array $package, string $vendorDirectory) : string
    {
        if (array_key_exists('install-path', $package)) {
            return $installedJsonDirectoryPath . '/' . $package['install-path'] . '/';
        }
        return $vendorDirectory . '/' . $package['name'] . '/';
    }
    /**
     * @param array<string, array<int, string>> $paths
     * @param array<string, array<int, string>> $package
     *
     * @return array<string, array<int, string>>
     */
    private function prefixWithPackagePath(array $paths, string $installedJsonDirectoryPath, array $package, string $vendorDirectory) : array
    {
        $prefix = $this->packagePrefixPath($installedJsonDirectoryPath, $package, $vendorDirectory);
        return array_map(function (array $paths) use($prefix) : array {
            return $this->prefixPaths($paths, $prefix);
        }, $paths);
    }
    /**
     * @param array<int|string, array<string>> $paths
     *
     * @return array<int|string, array<string>>
     */
    private function prefixWithInstallationPath(array $paths, string $trimmedInstallationPath) : array
    {
        return array_map(function (array $paths) use($trimmedInstallationPath) : array {
            return $this->prefixPaths($paths, $trimmedInstallationPath . '/');
        }, $paths);
    }
    /**
     * @param array<int, string> $paths
     *
     * @return array<int, string>
     */
    private function prefixPaths(array $paths, string $prefix) : array
    {
        return array_map(static function (string $path) use($prefix) : string {
            return $prefix . $path;
        }, $paths);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\BetterReflection\SourceLocator;

use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\Identifier\IdentifierType;
use PHPStan\BetterReflection\Reflection\Reflection;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\SourceStubber\PhpStormStubsSourceStubber;
use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator;
class PhpVersionBlacklistSourceLocator implements SourceLocator
{
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\Type\SourceLocator
     */
    private $sourceLocator;
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\SourceStubber\PhpStormStubsSourceStubber
     */
    private $phpStormStubsSourceStubber;
    public function __construct(SourceLocator $sourceLocator, PhpStormStubsSourceStubber $phpStormStubsSourceStubber)
    {
        $this->sourceLocator = $sourceLocator;
        $this->phpStormStubsSourceStubber = $phpStormStubsSourceStubber;
    }
    public function locateIdentifier(Reflector $reflector, Identifier $identifier) : ?Reflection
    {
        if ($identifier->isClass()) {
            if ($this->phpStormStubsSourceStubber->isPresentClass($identifier->getName()) === \false) {
                return null;
            }
        }
        if ($identifier->isFunction()) {
            if ($this->phpStormStubsSourceStubber->isPresentFunction($identifier->getName()) === \false) {
                return null;
            }
        }
        return $this->sourceLocator->locateIdentifier($reflector, $identifier);
    }
    public function locateIdentifiersByType(Reflector $reflector, IdentifierType $identifierType) : array
    {
        return $this->sourceLocator->locateIdentifiersByType($reflector, $identifierType);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\BetterReflection\SourceLocator;

use PhpParser\Node\Stmt\Const_;
use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\Identifier\IdentifierType;
use PHPStan\BetterReflection\Reflection\Reflection;
use PHPStan\BetterReflection\Reflection\ReflectionClass;
use PHPStan\BetterReflection\Reflection\ReflectionConstant;
use PHPStan\BetterReflection\Reflection\ReflectionFunction;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Ast\Strategy\NodeToReflection;
use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator;
use PHPStan\Reflection\ConstantNameHelper;
use PHPStan\ShouldNotHappenException;
use function array_key_exists;
use function array_keys;
use function strtolower;
class OptimizedSingleFileSourceLocator implements SourceLocator
{
    /** @var array{classes: array<string, true>, functions: array<string, true>, constants: array<string, true>}|null */
    private $presentSymbols;
    /**
     * @var \PHPStan\Reflection\BetterReflection\SourceLocator\FileNodesFetcher
     */
    private $fileNodesFetcher;
    /**
     * @var string
     */
    private $fileName;
    public function __construct(\PHPStan\Reflection\BetterReflection\SourceLocator\FileNodesFetcher $fileNodesFetcher, string $fileName)
    {
        $this->fileNodesFetcher = $fileNodesFetcher;
        $this->fileName = $fileName;
    }
    public function locateIdentifier(Reflector $reflector, Identifier $identifier) : ?Reflection
    {
        if ($this->presentSymbols !== null) {
            if ($identifier->isClass()) {
                $className = strtolower($identifier->getName());
                if (!array_key_exists($className, $this->presentSymbols['classes'])) {
                    return null;
                }
            }
            if ($identifier->isFunction()) {
                $className = strtolower($identifier->getName());
                if (!array_key_exists($className, $this->presentSymbols['functions'])) {
                    return null;
                }
            }
            if ($identifier->isConstant()) {
                $constantName = ConstantNameHelper::normalize($identifier->getName());
                if (!array_key_exists($constantName, $this->presentSymbols['constants'])) {
                    return null;
                }
            }
        }
        $fetchedNodesResult = $this->fileNodesFetcher->fetchNodes($this->fileName);
        if ($this->presentSymbols === null) {
            $presentSymbols = ['classes' => [], 'functions' => [], 'constants' => []];
            foreach (array_keys($fetchedNodesResult->getClassNodes()) as $className) {
                $presentSymbols['classes'][$className] = \true;
            }
            foreach (array_keys($fetchedNodesResult->getFunctionNodes()) as $functionName) {
                $presentSymbols['functions'][$functionName] = \true;
            }
            foreach (array_keys($fetchedNodesResult->getConstantNodes()) as $constantName) {
                $presentSymbols['constants'][$constantName] = \true;
            }
            $this->presentSymbols = $presentSymbols;
        }
        $nodeToReflection = new NodeToReflection();
        if ($identifier->isClass()) {
            $classNodes = $fetchedNodesResult->getClassNodes();
            $className = strtolower($identifier->getName());
            if (!array_key_exists($className, $classNodes)) {
                return null;
            }
            foreach ($classNodes[$className] as $classNode) {
                $classReflection = $nodeToReflection->__invoke($reflector, $classNode->getNode(), $classNode->getLocatedSource(), $classNode->getNamespace());
                if (!$classReflection instanceof ReflectionClass) {
                    throw new ShouldNotHappenException();
                }
                return $classReflection;
            }
        }
        if ($identifier->isFunction()) {
            $functionNodes = $fetchedNodesResult->getFunctionNodes();
            $functionName = strtolower($identifier->getName());
            if (!array_key_exists($functionName, $functionNodes)) {
                return null;
            }
            foreach ($functionNodes[$functionName] as $functionNode) {
                $functionReflection = $nodeToReflection->__invoke($reflector, $functionNode->getNode(), $functionNode->getLocatedSource(), $functionNode->getNamespace());
                if (!$functionReflection instanceof ReflectionFunction) {
                    throw new ShouldNotHappenException();
                }
                return $functionReflection;
            }
        }
        if ($identifier->isConstant()) {
            $constantNodes = $fetchedNodesResult->getConstantNodes();
            $constantName = ConstantNameHelper::normalize($identifier->getName());
            if (!array_key_exists($constantName, $constantNodes)) {
                return null;
            }
            foreach ($constantNodes[$constantName] as $fetchedConstantNode) {
                $constantNode = $fetchedConstantNode->getNode();
                $positionInNode = null;
                if ($constantNode instanceof Const_) {
                    foreach ($constantNode->consts as $constPosition => $const) {
                        if ($const->namespacedName === null) {
                            throw new ShouldNotHappenException();
                        }
                        if (ConstantNameHelper::normalize($const->namespacedName->toString()) === $constantName) {
                            /** @var int $positionInNode */
                            $positionInNode = $constPosition;
                            break;
                        }
                    }
                    if ($positionInNode === null) {
                        throw new ShouldNotHappenException();
                    }
                }
                $constantReflection = $nodeToReflection->__invoke($reflector, $fetchedConstantNode->getNode(), $fetchedConstantNode->getLocatedSource(), $fetchedConstantNode->getNamespace(), $positionInNode);
                if (!$constantReflection instanceof ReflectionConstant) {
                    throw new ShouldNotHappenException();
                }
                return $constantReflection;
            }
            return null;
        }
        throw new ShouldNotHappenException();
    }
    public function locateIdentifiersByType(Reflector $reflector, IdentifierType $identifierType) : array
    {
        $fetchedNodesResult = $this->fileNodesFetcher->fetchNodes($this->fileName);
        $nodeToReflection = new NodeToReflection();
        $reflections = [];
        if ($identifierType->isClass()) {
            $classNodes = $fetchedNodesResult->getClassNodes();
            foreach ($classNodes as $classNodesArray) {
                foreach ($classNodesArray as $classNode) {
                    $classReflection = $nodeToReflection->__invoke($reflector, $classNode->getNode(), $classNode->getLocatedSource(), $classNode->getNamespace());
                    if (!$classReflection instanceof ReflectionClass) {
                        throw new ShouldNotHappenException();
                    }
                    $reflections[] = $classReflection;
                }
            }
        }
        if ($identifierType->isFunction()) {
            $functionNodes = $fetchedNodesResult->getFunctionNodes();
            foreach ($functionNodes as $functionNodesArray) {
                foreach ($functionNodesArray as $functionNode) {
                    $functionReflection = $nodeToReflection->__invoke($reflector, $functionNode->getNode(), $functionNode->getLocatedSource(), $functionNode->getNamespace());
                    $reflections[] = $functionReflection;
                }
            }
        }
        if ($identifierType->isConstant()) {
            $constantNodes = $fetchedNodesResult->getConstantNodes();
            foreach ($constantNodes as $constantNodesArray) {
                foreach ($constantNodesArray as $fetchedConstantNode) {
                    $constantNode = $fetchedConstantNode->getNode();
                    if ($constantNode instanceof Const_) {
                        foreach ($constantNode->consts as $constPosition => $const) {
                            if ($const->namespacedName === null) {
                                throw new ShouldNotHappenException();
                            }
                            $constantReflection = $nodeToReflection->__invoke($reflector, $constantNode, $fetchedConstantNode->getLocatedSource(), $fetchedConstantNode->getNamespace(), $constPosition);
                            if (!$constantReflection instanceof ReflectionConstant) {
                                throw new ShouldNotHappenException();
                            }
                            $reflections[] = $constantReflection;
                        }
                        continue;
                    }
                    $constantReflection = $nodeToReflection->__invoke($reflector, $constantNode, $fetchedConstantNode->getLocatedSource(), $fetchedConstantNode->getNamespace());
                    if (!$constantReflection instanceof ReflectionConstant) {
                        throw new ShouldNotHappenException();
                    }
                    $reflections[] = $constantReflection;
                }
            }
        }
        return $reflections;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\BetterReflection\SourceLocator;

use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\Identifier\IdentifierType;
use PHPStan\BetterReflection\Reflection\Reflection;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator;
use ReflectionClass;
use function class_exists;
class SkipClassAliasSourceLocator implements SourceLocator
{
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\Type\SourceLocator
     */
    private $sourceLocator;
    public function __construct(SourceLocator $sourceLocator)
    {
        $this->sourceLocator = $sourceLocator;
    }
    public function locateIdentifier(Reflector $reflector, Identifier $identifier) : ?Reflection
    {
        if ($identifier->isClass()) {
            $className = $identifier->getName();
            if (!class_exists($className, \false)) {
                return $this->sourceLocator->locateIdentifier($reflector, $identifier);
            }
            $reflection = new ReflectionClass($className);
            if ($reflection->getName() === 'ReturnTypeWillChange') {
                return $this->sourceLocator->locateIdentifier($reflector, $identifier);
            }
            if ($reflection->getFileName() === \false) {
                return $this->sourceLocator->locateIdentifier($reflector, $identifier);
            }
            return null;
        }
        return $this->sourceLocator->locateIdentifier($reflector, $identifier);
    }
    public function locateIdentifiersByType(Reflector $reflector, IdentifierType $identifierType) : array
    {
        return $this->sourceLocator->locateIdentifiersByType($reflector, $identifierType);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\BetterReflection\SourceLocator;

use PhpParser\NodeTraverser;
use PHPStan\File\FileReader;
use PHPStan\Parser\Parser;
use PHPStan\Parser\ParserErrorsException;
class FileNodesFetcher
{
    /**
     * @var \PHPStan\Reflection\BetterReflection\SourceLocator\CachingVisitor
     */
    private $cachingVisitor;
    /**
     * @var \PHPStan\Parser\Parser
     */
    private $parser;
    public function __construct(\PHPStan\Reflection\BetterReflection\SourceLocator\CachingVisitor $cachingVisitor, Parser $parser)
    {
        $this->cachingVisitor = $cachingVisitor;
        $this->parser = $parser;
    }
    public function fetchNodes(string $fileName) : \PHPStan\Reflection\BetterReflection\SourceLocator\FetchedNodesResult
    {
        $nodeTraverser = new NodeTraverser();
        $nodeTraverser->addVisitor($this->cachingVisitor);
        $contents = FileReader::read($fileName);
        try {
            $ast = $this->parser->parseFile($fileName);
        } catch (ParserErrorsException $exception) {
            return new \PHPStan\Reflection\BetterReflection\SourceLocator\FetchedNodesResult([], [], []);
        }
        $this->cachingVisitor->reset($fileName, $contents);
        $nodeTraverser->traverse($ast);
        $result = new \PHPStan\Reflection\BetterReflection\SourceLocator\FetchedNodesResult($this->cachingVisitor->getClassNodes(), $this->cachingVisitor->getFunctionNodes(), $this->cachingVisitor->getConstantNodes());
        $this->cachingVisitor->reset($fileName, $contents);
        return $result;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\BetterReflection\Reflector;

use PHPStan\BetterReflection\Identifier\Identifier;
use PHPStan\BetterReflection\Identifier\IdentifierType;
use PHPStan\BetterReflection\Reflection\ReflectionClass;
use PHPStan\BetterReflection\Reflection\ReflectionConstant;
use PHPStan\BetterReflection\Reflection\ReflectionFunction;
use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
use PHPStan\BetterReflection\Reflector\Reflector;
use function array_key_exists;
use function strtolower;
final class MemoizingReflector implements Reflector
{
    /** @var array<string, ReflectionClass|null> */
    private $classReflections = [];
    /** @var array<string, ReflectionConstant|null> */
    private $constantReflections = [];
    /** @var array<string, ReflectionFunction|null> */
    private $functionReflections = [];
    /**
     * @var \PHPStan\BetterReflection\Reflector\Reflector
     */
    private $reflector;
    public function __construct(Reflector $reflector)
    {
        $this->reflector = $reflector;
    }
    public function reflectClass(string $className) : ReflectionClass
    {
        $lowerClassName = strtolower($className);
        if (array_key_exists($lowerClassName, $this->classReflections) && $this->classReflections[$lowerClassName] !== null) {
            return $this->classReflections[$lowerClassName];
        }
        if (array_key_exists($className, $this->classReflections)) {
            $classReflection = $this->classReflections[$className];
            if ($classReflection === null) {
                throw IdentifierNotFound::fromIdentifier(new Identifier($className, new IdentifierType(IdentifierType::IDENTIFIER_CLASS)));
            }
            return $classReflection;
        }
        try {
            return $this->classReflections[$lowerClassName] = $this->reflector->reflectClass($className);
        } catch (IdentifierNotFound $e) {
            $this->classReflections[$className] = null;
            throw $e;
        }
    }
    public function reflectConstant(string $constantName) : ReflectionConstant
    {
        if (array_key_exists($constantName, $this->constantReflections)) {
            $constantReflection = $this->constantReflections[$constantName];
            if ($constantReflection === null) {
                throw IdentifierNotFound::fromIdentifier(new Identifier($constantName, new IdentifierType(IdentifierType::IDENTIFIER_CONSTANT)));
            }
            return $constantReflection;
        }
        try {
            return $this->constantReflections[$constantName] = $this->reflector->reflectConstant($constantName);
        } catch (IdentifierNotFound $e) {
            $this->constantReflections[$constantName] = null;
            throw $e;
        }
    }
    public function reflectFunction(string $functionName) : ReflectionFunction
    {
        $lowerFunctionName = strtolower($functionName);
        if (array_key_exists($lowerFunctionName, $this->functionReflections)) {
            $functionReflection = $this->functionReflections[$lowerFunctionName];
            if ($functionReflection === null) {
                throw IdentifierNotFound::fromIdentifier(new Identifier($functionName, new IdentifierType(IdentifierType::IDENTIFIER_FUNCTION)));
            }
            return $functionReflection;
        }
        try {
            return $this->functionReflections[$lowerFunctionName] = $this->reflector->reflectFunction($functionName);
        } catch (IdentifierNotFound $e) {
            $this->functionReflections[$lowerFunctionName] = null;
            throw $e;
        }
    }
    public function reflectAllClasses() : iterable
    {
        return $this->reflector->reflectAllClasses();
    }
    public function reflectAllFunctions() : iterable
    {
        return $this->reflector->reflectAllFunctions();
    }
    public function reflectAllConstants() : iterable
    {
        return $this->reflector->reflectAllConstants();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\BetterReflection;

use Closure;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\BetterReflection\Identifier\Exception\InvalidIdentifierName;
use PHPStan\BetterReflection\NodeCompiler\Exception\UnableToCompileNode;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionFunction;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionParameter;
use PHPStan\BetterReflection\Reflection\Exception\NotAClassReflection;
use PHPStan\BetterReflection\Reflection\Exception\NotAnInterfaceReflection;
use PHPStan\BetterReflection\Reflection\ReflectionEnum;
use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
use PHPStan\BetterReflection\SourceLocator\SourceStubber\PhpStormStubsSourceStubber;
use PHPStan\Broker\AnonymousClassNameHelper;
use PHPStan\Broker\ClassNotFoundException;
use PHPStan\Broker\ConstantNotFoundException;
use PHPStan\Broker\FunctionNotFoundException;
use PHPStan\DependencyInjection\Reflection\ClassReflectionExtensionRegistryProvider;
use PHPStan\File\FileHelper;
use PHPStan\File\FileReader;
use PHPStan\File\RelativePathHelper;
use PHPStan\Php\PhpVersion;
use PHPStan\PhpDoc\PhpDocInheritanceResolver;
use PHPStan\PhpDoc\StubPhpDocProvider;
use PHPStan\PhpDoc\Tag\ParamOutTag;
use PHPStan\PhpDoc\Tag\ParamTag;
use PHPStan\Reflection\Assertions;
use PHPStan\Reflection\ClassNameHelper;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\Constant\RuntimeConstantReflection;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\FunctionReflectionFactory;
use PHPStan\Reflection\GlobalConstantReflection;
use PHPStan\Reflection\InitializerExprContext;
use PHPStan\Reflection\InitializerExprTypeResolver;
use PHPStan\Reflection\NamespaceAnswerer;
use PHPStan\Reflection\Php\PhpFunctionReflection;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Reflection\SignatureMap\NativeFunctionReflectionProvider;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\FileTypeMapper;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\Type;
use function array_key_exists;
use function array_map;
use function base64_decode;
use function sprintf;
use function strtolower;
use const PHP_VERSION_ID;
class BetterReflectionProvider implements ReflectionProvider
{
    /** @var FunctionReflection[] */
    private $functionReflections = [];
    /** @var ClassReflection[] */
    private $classReflections = [];
    /** @var ClassReflection[] */
    private static $anonymousClasses = [];
    /** @var array<string, GlobalConstantReflection> */
    private $cachedConstants = [];
    /**
     * @var \PHPStan\Reflection\ReflectionProvider\ReflectionProviderProvider
     */
    private $reflectionProviderProvider;
    /**
     * @var \PHPStan\Reflection\InitializerExprTypeResolver
     */
    private $initializerExprTypeResolver;
    /**
     * @var \PHPStan\DependencyInjection\Reflection\ClassReflectionExtensionRegistryProvider
     */
    private $classReflectionExtensionRegistryProvider;
    /**
     * @var \PHPStan\BetterReflection\Reflector\Reflector
     */
    private $reflector;
    /**
     * @var \PHPStan\Type\FileTypeMapper
     */
    private $fileTypeMapper;
    /**
     * @var \PHPStan\PhpDoc\PhpDocInheritanceResolver
     */
    private $phpDocInheritanceResolver;
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    /**
     * @var \PHPStan\Reflection\SignatureMap\NativeFunctionReflectionProvider
     */
    private $nativeFunctionReflectionProvider;
    /**
     * @var \PHPStan\PhpDoc\StubPhpDocProvider
     */
    private $stubPhpDocProvider;
    /**
     * @var \PHPStan\Reflection\FunctionReflectionFactory
     */
    private $functionReflectionFactory;
    /**
     * @var \PHPStan\File\RelativePathHelper
     */
    private $relativePathHelper;
    /**
     * @var \PHPStan\Broker\AnonymousClassNameHelper
     */
    private $anonymousClassNameHelper;
    /**
     * @var \PHPStan\File\FileHelper
     */
    private $fileHelper;
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\SourceStubber\PhpStormStubsSourceStubber
     */
    private $phpstormStubsSourceStubber;
    public function __construct(ReflectionProvider\ReflectionProviderProvider $reflectionProviderProvider, InitializerExprTypeResolver $initializerExprTypeResolver, ClassReflectionExtensionRegistryProvider $classReflectionExtensionRegistryProvider, Reflector $reflector, FileTypeMapper $fileTypeMapper, PhpDocInheritanceResolver $phpDocInheritanceResolver, PhpVersion $phpVersion, NativeFunctionReflectionProvider $nativeFunctionReflectionProvider, StubPhpDocProvider $stubPhpDocProvider, FunctionReflectionFactory $functionReflectionFactory, RelativePathHelper $relativePathHelper, AnonymousClassNameHelper $anonymousClassNameHelper, FileHelper $fileHelper, PhpStormStubsSourceStubber $phpstormStubsSourceStubber)
    {
        $this->reflectionProviderProvider = $reflectionProviderProvider;
        $this->initializerExprTypeResolver = $initializerExprTypeResolver;
        $this->classReflectionExtensionRegistryProvider = $classReflectionExtensionRegistryProvider;
        $this->reflector = $reflector;
        $this->fileTypeMapper = $fileTypeMapper;
        $this->phpDocInheritanceResolver = $phpDocInheritanceResolver;
        $this->phpVersion = $phpVersion;
        $this->nativeFunctionReflectionProvider = $nativeFunctionReflectionProvider;
        $this->stubPhpDocProvider = $stubPhpDocProvider;
        $this->functionReflectionFactory = $functionReflectionFactory;
        $this->relativePathHelper = $relativePathHelper;
        $this->anonymousClassNameHelper = $anonymousClassNameHelper;
        $this->fileHelper = $fileHelper;
        $this->phpstormStubsSourceStubber = $phpstormStubsSourceStubber;
    }
    public function hasClass(string $className) : bool
    {
        if (isset(self::$anonymousClasses[$className])) {
            return \true;
        }
        if (!ClassNameHelper::isValidClassName($className)) {
            return \false;
        }
        try {
            $this->reflector->reflectClass($className);
            return \true;
        } catch (IdentifierNotFound $exception) {
            return \false;
        } catch (InvalidIdentifierName $exception) {
            return \false;
        }
    }
    public function getClass(string $className) : ClassReflection
    {
        if (isset(self::$anonymousClasses[$className])) {
            return self::$anonymousClasses[$className];
        }
        try {
            $reflectionClass = $this->reflector->reflectClass($className);
        } catch (IdentifierNotFound|InvalidIdentifierName $exception) {
            throw new ClassNotFoundException($className);
        }
        $reflectionClassName = strtolower($reflectionClass->getName());
        if (array_key_exists($reflectionClassName, $this->classReflections)) {
            return $this->classReflections[$reflectionClassName];
        }
        $enumAdapter = base64_decode('UEhQU3RhblxCZXR0ZXJSZWZsZWN0aW9uXFJlZmxlY3Rpb25cQWRhcHRlclxSZWZsZWN0aW9uRW51bQ==', \true);
        $classReflection = new ClassReflection($this->reflectionProviderProvider->getReflectionProvider(), $this->initializerExprTypeResolver, $this->fileTypeMapper, $this->stubPhpDocProvider, $this->phpDocInheritanceResolver, $this->phpVersion, $this->classReflectionExtensionRegistryProvider->getRegistry()->getPropertiesClassReflectionExtensions(), $this->classReflectionExtensionRegistryProvider->getRegistry()->getMethodsClassReflectionExtensions(), $this->classReflectionExtensionRegistryProvider->getRegistry()->getAllowedSubTypesClassReflectionExtensions(), $reflectionClass->getName(), $reflectionClass instanceof ReflectionEnum && PHP_VERSION_ID >= 80000 ? new $enumAdapter($reflectionClass) : new ReflectionClass($reflectionClass), null, null, $this->stubPhpDocProvider->findClassPhpDoc($reflectionClass->getName()));
        $this->classReflections[$reflectionClassName] = $classReflection;
        return $classReflection;
    }
    public function getClassName(string $className) : string
    {
        if (!$this->hasClass($className)) {
            throw new ClassNotFoundException($className);
        }
        if (isset(self::$anonymousClasses[$className])) {
            return self::$anonymousClasses[$className]->getDisplayName();
        }
        $reflectionClass = $this->reflector->reflectClass($className);
        return $reflectionClass->getName();
    }
    public function supportsAnonymousClasses() : bool
    {
        return \true;
    }
    public function getAnonymousClassReflection(Node\Stmt\Class_ $classNode, Scope $scope) : ClassReflection
    {
        if (isset($classNode->namespacedName)) {
            throw new ShouldNotHappenException();
        }
        if (!$scope->isInTrait()) {
            $scopeFile = $scope->getFile();
        } else {
            $scopeFile = $scope->getTraitReflection()->getFileName();
            if ($scopeFile === null) {
                $scopeFile = $scope->getFile();
            }
        }
        $filename = $this->fileHelper->normalizePath($this->relativePathHelper->getRelativePath($scopeFile), '/');
        $className = $this->anonymousClassNameHelper->getAnonymousClassName($classNode, $scopeFile);
        $classNode->name = new Node\Identifier($className);
        $classNode->setAttribute('anonymousClass', \true);
        if (isset(self::$anonymousClasses[$className])) {
            return self::$anonymousClasses[$className];
        }
        $reflectionClass = \PHPStan\BetterReflection\Reflection\ReflectionClass::createFromNode($this->reflector, $classNode, new LocatedSource(FileReader::read($scopeFile), $className, $scopeFile), null);
        self::$anonymousClasses[$className] = new ClassReflection($this->reflectionProviderProvider->getReflectionProvider(), $this->initializerExprTypeResolver, $this->fileTypeMapper, $this->stubPhpDocProvider, $this->phpDocInheritanceResolver, $this->phpVersion, $this->classReflectionExtensionRegistryProvider->getRegistry()->getPropertiesClassReflectionExtensions(), $this->classReflectionExtensionRegistryProvider->getRegistry()->getMethodsClassReflectionExtensions(), $this->classReflectionExtensionRegistryProvider->getRegistry()->getAllowedSubTypesClassReflectionExtensions(), sprintf('class@anonymous/%s:%s', $filename, $classNode->getLine()), new ReflectionClass($reflectionClass), $scopeFile, null, $this->stubPhpDocProvider->findClassPhpDoc($className));
        $this->classReflections[$className] = self::$anonymousClasses[$className];
        return self::$anonymousClasses[$className];
    }
    public function hasFunction(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer) : bool
    {
        return $this->resolveFunctionName($nameNode, $namespaceAnswerer) !== null;
    }
    public function getFunction(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer) : FunctionReflection
    {
        $functionName = $this->resolveFunctionName($nameNode, $namespaceAnswerer);
        if ($functionName === null) {
            throw new FunctionNotFoundException((string) $nameNode);
        }
        $lowerCasedFunctionName = strtolower($functionName);
        if (isset($this->functionReflections[$lowerCasedFunctionName])) {
            return $this->functionReflections[$lowerCasedFunctionName];
        }
        $nativeFunctionReflection = $this->nativeFunctionReflectionProvider->findFunctionReflection($lowerCasedFunctionName);
        if ($nativeFunctionReflection !== null) {
            $this->functionReflections[$lowerCasedFunctionName] = $nativeFunctionReflection;
            return $nativeFunctionReflection;
        }
        $this->functionReflections[$lowerCasedFunctionName] = $this->getCustomFunction($functionName);
        return $this->functionReflections[$lowerCasedFunctionName];
    }
    private function getCustomFunction(string $functionName) : PhpFunctionReflection
    {
        $reflectionFunction = new ReflectionFunction($this->reflector->reflectFunction($functionName));
        $templateTypeMap = TemplateTypeMap::createEmpty();
        $phpDocParameterTags = [];
        $phpDocReturnTag = null;
        $phpDocThrowsTag = null;
        $deprecatedTag = null;
        $isDeprecated = \false;
        $isInternal = \false;
        $isFinal = \false;
        $isPure = null;
        $asserts = Assertions::createEmpty();
        $phpDocComment = null;
        $phpDocParameterOutTags = [];
        $resolvedPhpDoc = $this->stubPhpDocProvider->findFunctionPhpDoc($reflectionFunction->getName(), array_map(static function (ReflectionParameter $parameter) : string {
            return $parameter->getName();
        }, $reflectionFunction->getParameters()));
        if ($resolvedPhpDoc === null && $reflectionFunction->getFileName() !== \false && $reflectionFunction->getDocComment() !== \false) {
            $docComment = $reflectionFunction->getDocComment();
            $resolvedPhpDoc = $this->fileTypeMapper->getResolvedPhpDoc($reflectionFunction->getFileName(), null, null, $reflectionFunction->getName(), $docComment);
        }
        if ($resolvedPhpDoc !== null) {
            $templateTypeMap = $resolvedPhpDoc->getTemplateTypeMap();
            $phpDocParameterTags = $resolvedPhpDoc->getParamTags();
            $phpDocReturnTag = $resolvedPhpDoc->getReturnTag();
            $phpDocThrowsTag = $resolvedPhpDoc->getThrowsTag();
            $deprecatedTag = $resolvedPhpDoc->getDeprecatedTag();
            $isDeprecated = $resolvedPhpDoc->isDeprecated();
            $isInternal = $resolvedPhpDoc->isInternal();
            $isFinal = $resolvedPhpDoc->isFinal();
            $isPure = $resolvedPhpDoc->isPure();
            $asserts = Assertions::createFromResolvedPhpDocBlock($resolvedPhpDoc);
            if ($resolvedPhpDoc->hasPhpDocString()) {
                $phpDocComment = $resolvedPhpDoc->getPhpDocString();
            }
            $phpDocParameterOutTags = $resolvedPhpDoc->getParamOutTags();
        }
        return $this->functionReflectionFactory->create($reflectionFunction, $templateTypeMap, array_map(static function (ParamTag $paramTag) : Type {
            return $paramTag->getType();
        }, $phpDocParameterTags), $phpDocReturnTag !== null ? $phpDocReturnTag->getType() : null, $phpDocThrowsTag !== null ? $phpDocThrowsTag->getType() : null, $deprecatedTag !== null ? $deprecatedTag->getMessage() : null, $isDeprecated, $isInternal, $isFinal, $reflectionFunction->getFileName() !== \false ? $reflectionFunction->getFileName() : null, $isPure, $asserts, $phpDocComment, array_map(static function (ParamOutTag $paramOutTag) : Type {
            return $paramOutTag->getType();
        }, $phpDocParameterOutTags));
    }
    public function resolveFunctionName(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer) : ?string
    {
        return $this->resolveName($nameNode, function (string $name) : bool {
            try {
                $this->reflector->reflectFunction($name);
                return \true;
            } catch (IdentifierNotFound $exception) {
                // pass
            } catch (InvalidIdentifierName $exception) {
                // pass
            }
            if ($this->nativeFunctionReflectionProvider->findFunctionReflection($name) !== null) {
                return $this->phpstormStubsSourceStubber->isPresentFunction($name) !== \false;
            }
            return \false;
        }, $namespaceAnswerer);
    }
    public function hasConstant(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer) : bool
    {
        return $this->resolveConstantName($nameNode, $namespaceAnswerer) !== null;
    }
    public function getConstant(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer) : GlobalConstantReflection
    {
        $constantName = $this->resolveConstantName($nameNode, $namespaceAnswerer);
        if ($constantName === null) {
            throw new ConstantNotFoundException((string) $nameNode);
        }
        if (array_key_exists($constantName, $this->cachedConstants)) {
            return $this->cachedConstants[$constantName];
        }
        $constantReflection = $this->reflector->reflectConstant($constantName);
        $fileName = $constantReflection->getFileName();
        $constantValueType = $this->initializerExprTypeResolver->getType($constantReflection->getValueExpression(), InitializerExprContext::fromGlobalConstant($constantReflection));
        return $this->cachedConstants[$constantName] = new RuntimeConstantReflection($constantName, $constantValueType, $fileName);
    }
    public function resolveConstantName(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer) : ?string
    {
        return $this->resolveName($nameNode, function (string $name) : bool {
            try {
                $this->reflector->reflectConstant($name);
                return \true;
            } catch (IdentifierNotFound $exception) {
                // pass
            } catch (UnableToCompileNode|NotAClassReflection|NotAnInterfaceReflection $exception) {
                // pass
            }
            return \false;
        }, $namespaceAnswerer);
    }
    /**
     * @param Closure(string $name): bool $existsCallback
     */
    private function resolveName(Node\Name $nameNode, Closure $existsCallback, ?NamespaceAnswerer $namespaceAnswerer) : ?string
    {
        $name = (string) $nameNode;
        if ($namespaceAnswerer !== null && $namespaceAnswerer->getNamespace() !== null && !$nameNode->isFullyQualified()) {
            $namespacedName = sprintf('%s\\%s', $namespaceAnswerer->getNamespace(), $name);
            if ($existsCallback($namespacedName)) {
                return $namespacedName;
            }
        }
        if ($existsCallback($name)) {
            return $name;
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\BetterReflection;

use PHPStan\BetterReflection\Reflector\Reflector;
interface BetterReflectionProviderFactory
{
    public function create(Reflector $reflector) : \PHPStan\Reflection\BetterReflection\BetterReflectionProvider;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\BetterReflection\SourceStubber;

use PhpParser\Parser;
use PHPStan\BetterReflection\SourceLocator\SourceStubber\PhpStormStubsSourceStubber;
use PHPStan\Php\PhpVersion;
class PhpStormStubsSourceStubberFactory
{
    /**
     * @var \PhpParser\Parser
     */
    private $phpParser;
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(Parser $phpParser, PhpVersion $phpVersion)
    {
        $this->phpParser = $phpParser;
        $this->phpVersion = $phpVersion;
    }
    public function create() : PhpStormStubsSourceStubber
    {
        return new PhpStormStubsSourceStubber($this->phpParser, $this->phpVersion->getVersionId());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use function array_filter;
use function array_slice;
use function end;
use function explode;
use function implode;
use function strpos;
use function strtolower;
class ConstantNameHelper
{
    public static function normalize(string $name) : string
    {
        if (strpos($name, '\\') === \false) {
            return $name;
        }
        $nameParts = array_filter(explode('\\', $name));
        return strtolower(implode('\\', array_slice($nameParts, 0, -1))) . '\\' . end($nameParts);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

/** @api */
interface ClassMemberReflection
{
    public function getDeclaringClass() : \PHPStan\Reflection\ClassReflection;
    public function isStatic() : bool;
    public function isPrivate() : bool;
    public function isPublic() : bool;
    public function getDocComment() : ?string;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

/** @api */
interface ClassMemberAccessAnswerer
{
    /**
     * @phpstan-assert-if-true !null $this->getClassReflection()
     */
    public function isInClass() : bool;
    public function getClassReflection() : ?\PHPStan\Reflection\ClassReflection;
    public function canAccessProperty(\PHPStan\Reflection\PropertyReflection $propertyReflection) : bool;
    public function canCallMethod(\PHPStan\Reflection\MethodReflection $methodReflection) : bool;
    public function canAccessConstant(\PHPStan\Reflection\ConstantReflection $constantReflection) : bool;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PHPStan\BetterReflection\Reflection\Adapter\ReflectionFunction;
use PHPStan\Reflection\Php\PhpFunctionReflection;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\Type;
interface FunctionReflectionFactory
{
    /**
     * @param Type[] $phpDocParameterTypes
     * @param Type[] $phpDocParameterOutTypes
     */
    public function create(ReflectionFunction $reflection, TemplateTypeMap $templateTypeMap, array $phpDocParameterTypes, ?Type $phpDocReturnType, ?Type $phpDocThrowType, ?string $deprecatedDescription, bool $isDeprecated, bool $isInternal, bool $isFinal, ?string $filename, ?bool $isPure, \PHPStan\Reflection\Assertions $asserts, ?string $phpDocComment, array $phpDocParameterOutTypes) : PhpFunctionReflection;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

/**
 * This is the interface custom properties class reflection extensions implement.
 *
 * To register it in the configuration file use the `phpstan.broker.propertiesClassReflectionExtension` service tag:
 *
 * ```
 * services:
 * 	-
 *		class: App\PHPStan\MyPropertiesClassReflectionExtension
 *		tags:
 *			- phpstan.broker.propertiesClassReflectionExtension
 * ```
 *
 * Learn more: https://phpstan.org/developing-extensions/class-reflection-extensions
 *
 * @api
 */
interface PropertiesClassReflectionExtension
{
    public function hasProperty(\PHPStan\Reflection\ClassReflection $classReflection, string $propertyName) : bool;
    public function getProperty(\PHPStan\Reflection\ClassReflection $classReflection, string $propertyName) : \PHPStan\Reflection\PropertyReflection;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
/** @api */
interface ReflectionProvider
{
    public function hasClass(string $className) : bool;
    public function getClass(string $className) : \PHPStan\Reflection\ClassReflection;
    public function getClassName(string $className) : string;
    public function supportsAnonymousClasses() : bool;
    public function getAnonymousClassReflection(Node\Stmt\Class_ $classNode, Scope $scope) : \PHPStan\Reflection\ClassReflection;
    public function hasFunction(Node\Name $nameNode, ?\PHPStan\Reflection\NamespaceAnswerer $namespaceAnswerer) : bool;
    public function getFunction(Node\Name $nameNode, ?\PHPStan\Reflection\NamespaceAnswerer $namespaceAnswerer) : \PHPStan\Reflection\FunctionReflection;
    public function resolveFunctionName(Node\Name $nameNode, ?\PHPStan\Reflection\NamespaceAnswerer $namespaceAnswerer) : ?string;
    public function hasConstant(Node\Name $nameNode, ?\PHPStan\Reflection\NamespaceAnswerer $namespaceAnswerer) : bool;
    public function getConstant(Node\Name $nameNode, ?\PHPStan\Reflection\NamespaceAnswerer $namespaceAnswerer) : \PHPStan\Reflection\GlobalConstantReflection;
    public function resolveConstantName(Node\Name $nameNode, ?\PHPStan\Reflection\NamespaceAnswerer $namespaceAnswerer) : ?string;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PHPStan\Type\Type;
/**
 * This is the extension interface to implement if you want to described
 * allowed subtypes - to limit which classes can implement a certain interface
 * or extend a certain parent class.
 *
 * To register it in the configuration file use the `phpstan.broker.allowedSubTypesClassReflectionExtension` service tag:
 *
 * ```
 * services:
 * 	-
 *		class: App\PHPStan\MyExtension
 *		tags:
 *			- phpstan.broker.allowedSubTypesClassReflectionExtension
 * ```
 *
 * Learn more: https://phpstan.org/developing-extensions/allowed-subtypes
 *
 * @api
 */
interface AllowedSubTypesClassReflectionExtension
{
    public function supports(\PHPStan\Reflection\ClassReflection $classReflection) : bool;
    /**
     * @return array<Type>
     */
    public function getAllowedSubTypes(\PHPStan\Reflection\ClassReflection $classReflection) : array;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PHPStan\ShouldNotHappenException;
class ReflectionProviderStaticAccessor
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider|null
     */
    private static $instance;
    private function __construct()
    {
    }
    public static function registerInstance(\PHPStan\Reflection\ReflectionProvider $reflectionProvider) : void
    {
        self::$instance = $reflectionProvider;
    }
    public static function getInstance() : \PHPStan\Reflection\ReflectionProvider
    {
        if (self::$instance === null) {
            throw new ShouldNotHappenException();
        }
        return self::$instance;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use Attribute;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr\StaticCall;
use PhpParser\Node\Identifier;
use PhpParser\Node\Name\FullyQualified;
use PHPStan\Analyser\ArgumentsNormalizer;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnum;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnumBackedCase;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod;
use PHPStan\Php\PhpVersion;
use PHPStan\PhpDoc\PhpDocInheritanceResolver;
use PHPStan\PhpDoc\ResolvedPhpDocBlock;
use PHPStan\PhpDoc\StubPhpDocProvider;
use PHPStan\PhpDoc\Tag\ExtendsTag;
use PHPStan\PhpDoc\Tag\ImplementsTag;
use PHPStan\PhpDoc\Tag\MethodTag;
use PHPStan\PhpDoc\Tag\MixinTag;
use PHPStan\PhpDoc\Tag\PropertyTag;
use PHPStan\PhpDoc\Tag\TemplateTag;
use PHPStan\PhpDoc\Tag\TypeAliasImportTag;
use PHPStan\PhpDoc\Tag\TypeAliasTag;
use PHPStan\Reflection\Php\PhpClassReflectionExtension;
use PHPStan\Reflection\Php\PhpPropertyReflection;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\CircularTypeAliasDefinitionException;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\FileTypeMapper;
use PHPStan\Type\Generic\GenericObjectType;
use PHPStan\Type\Generic\TemplateTypeFactory;
use PHPStan\Type\Generic\TemplateTypeHelper;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\Generic\TemplateTypeScope;
use PHPStan\Type\Type;
use PHPStan\Type\TypeAlias;
use PHPStan\Type\TypehintHelper;
use PHPStan\Type\VerbosityLevel;
use ReflectionException;
use stdClass;
use function array_diff;
use function array_filter;
use function array_key_exists;
use function array_map;
use function array_merge;
use function array_shift;
use function array_unique;
use function array_values;
use function count;
use function implode;
use function in_array;
use function is_bool;
use function is_file;
use function is_int;
use function reset;
use function sprintf;
use function strtolower;
/** @api */
class ClassReflection
{
    /** @var ExtendedMethodReflection[] */
    private $methods = [];
    /** @var PropertyReflection[] */
    private $properties = [];
    /** @var ConstantReflection[] */
    private $constants = [];
    /** @var int[]|null */
    private $classHierarchyDistances;
    /**
     * @var string|null
     */
    private $deprecatedDescription;
    /**
     * @var bool|null
     */
    private $isDeprecated;
    /**
     * @var bool|null
     */
    private $isGeneric;
    /**
     * @var bool|null
     */
    private $isInternal;
    /**
     * @var bool|null
     */
    private $isFinal;
    /**
     * @var bool|null
     */
    private $isImmutable;
    /**
     * @var bool|null
     */
    private $hasConsistentConstructor;
    /**
     * @var \PHPStan\Type\Generic\TemplateTypeMap|null
     */
    private $templateTypeMap;
    /**
     * @var \PHPStan\Type\Generic\TemplateTypeMap|null
     */
    private $activeTemplateTypeMap;
    /** @var array<string,ClassReflection>|null */
    private $ancestors;
    /**
     * @var string|null
     */
    private $cacheKey;
    /** @var array<string, bool> */
    private $subclasses = [];
    /**
     * @var string|false|null
     */
    private $filename = \false;
    /**
     * @var string|false|null
     */
    private $reflectionDocComment = \false;
    /**
     * @var false|\PHPStan\PhpDoc\ResolvedPhpDocBlock
     */
    private $resolvedPhpDocBlock = \false;
    /** @var ClassReflection[]|null */
    private $cachedInterfaces;
    /**
     * @var \PHPStan\Reflection\ClassReflection|false|null
     */
    private $cachedParentClass = \false;
    /** @var array<string, TypeAlias>|null */
    private $typeAliases;
    /** @var array<string, true> */
    private static $resolvingTypeAliasImports = [];
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Reflection\InitializerExprTypeResolver
     */
    private $initializerExprTypeResolver;
    /**
     * @var \PHPStan\Type\FileTypeMapper
     */
    private $fileTypeMapper;
    /**
     * @var \PHPStan\PhpDoc\StubPhpDocProvider
     */
    private $stubPhpDocProvider;
    /**
     * @var \PHPStan\PhpDoc\PhpDocInheritanceResolver
     */
    private $phpDocInheritanceResolver;
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    /**
     * @var PropertiesClassReflectionExtension[]
     */
    private $propertiesClassReflectionExtensions;
    /**
     * @var MethodsClassReflectionExtension[]
     */
    private $methodsClassReflectionExtensions;
    /**
     * @var AllowedSubTypesClassReflectionExtension[]
     */
    private $allowedSubTypesClassReflectionExtensions;
    /**
     * @var string
     */
    private $displayName;
    /**
     * @var \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnum
     */
    private $reflection;
    /**
     * @var string|null
     */
    private $anonymousFilename;
    /**
     * @var \PHPStan\Type\Generic\TemplateTypeMap|null
     */
    private $resolvedTemplateTypeMap;
    /**
     * @var \PHPStan\PhpDoc\ResolvedPhpDocBlock|null
     */
    private $stubPhpDocBlock;
    /**
     * @var string|null
     */
    private $extraCacheKey;
    /**
     * @param PropertiesClassReflectionExtension[] $propertiesClassReflectionExtensions
     * @param MethodsClassReflectionExtension[] $methodsClassReflectionExtensions
     * @param AllowedSubTypesClassReflectionExtension[] $allowedSubTypesClassReflectionExtensions
     * @param \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnum $reflection
     */
    public function __construct(\PHPStan\Reflection\ReflectionProvider $reflectionProvider, \PHPStan\Reflection\InitializerExprTypeResolver $initializerExprTypeResolver, FileTypeMapper $fileTypeMapper, StubPhpDocProvider $stubPhpDocProvider, PhpDocInheritanceResolver $phpDocInheritanceResolver, PhpVersion $phpVersion, array $propertiesClassReflectionExtensions, array $methodsClassReflectionExtensions, array $allowedSubTypesClassReflectionExtensions, string $displayName, $reflection, ?string $anonymousFilename, ?TemplateTypeMap $resolvedTemplateTypeMap, ?ResolvedPhpDocBlock $stubPhpDocBlock, ?string $extraCacheKey = null)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->initializerExprTypeResolver = $initializerExprTypeResolver;
        $this->fileTypeMapper = $fileTypeMapper;
        $this->stubPhpDocProvider = $stubPhpDocProvider;
        $this->phpDocInheritanceResolver = $phpDocInheritanceResolver;
        $this->phpVersion = $phpVersion;
        $this->propertiesClassReflectionExtensions = $propertiesClassReflectionExtensions;
        $this->methodsClassReflectionExtensions = $methodsClassReflectionExtensions;
        $this->allowedSubTypesClassReflectionExtensions = $allowedSubTypesClassReflectionExtensions;
        $this->displayName = $displayName;
        $this->reflection = $reflection;
        $this->anonymousFilename = $anonymousFilename;
        $this->resolvedTemplateTypeMap = $resolvedTemplateTypeMap;
        $this->stubPhpDocBlock = $stubPhpDocBlock;
        $this->extraCacheKey = $extraCacheKey;
    }
    /**
     * @return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnum
     */
    public function getNativeReflection()
    {
        return $this->reflection;
    }
    public function getFileName() : ?string
    {
        if (!is_bool($this->filename)) {
            return $this->filename;
        }
        if ($this->anonymousFilename !== null) {
            return $this->filename = $this->anonymousFilename;
        }
        $fileName = $this->reflection->getFileName();
        if ($fileName === \false) {
            return $this->filename = null;
        }
        if (!is_file($fileName)) {
            return $this->filename = null;
        }
        return $this->filename = $fileName;
    }
    /**
     * @deprecated Use getFileName()
     */
    public function getFileNameWithPhpDocs() : ?string
    {
        return $this->getFileName();
    }
    public function getParentClass() : ?\PHPStan\Reflection\ClassReflection
    {
        if (!is_bool($this->cachedParentClass)) {
            return $this->cachedParentClass;
        }
        $parentClass = $this->reflection->getParentClass();
        if ($parentClass === \false) {
            return $this->cachedParentClass = null;
        }
        $extendsTag = $this->getFirstExtendsTag();
        if ($extendsTag !== null && $this->isValidAncestorType($extendsTag->getType(), [$parentClass->getName()])) {
            $extendedType = $extendsTag->getType();
            if ($this->isGeneric()) {
                $extendedType = TemplateTypeHelper::resolveTemplateTypes($extendedType, $this->getPossiblyIncompleteActiveTemplateTypeMap());
            }
            if (!$extendedType instanceof GenericObjectType) {
                return $this->reflectionProvider->getClass($parentClass->getName());
            }
            return $extendedType->getClassReflection() ?? $this->reflectionProvider->getClass($parentClass->getName());
        }
        $parentReflection = $this->reflectionProvider->getClass($parentClass->getName());
        if ($parentReflection->isGeneric()) {
            return $parentReflection->withTypes(array_values($parentReflection->getTemplateTypeMap()->map(static function () : Type {
                return new ErrorType();
            })->getTypes()));
        }
        $this->cachedParentClass = $parentReflection;
        return $parentReflection;
    }
    /**
     * @return class-string
     */
    public function getName() : string
    {
        return $this->reflection->getName();
    }
    public function getDisplayName(bool $withTemplateTypes = \true) : string
    {
        $name = $this->displayName;
        if ($withTemplateTypes === \false || $this->resolvedTemplateTypeMap === null || count($this->resolvedTemplateTypeMap->getTypes()) === 0) {
            return $name;
        }
        return $name . '<' . implode(',', array_map(static function (Type $type) : string {
            return $type->describe(VerbosityLevel::typeOnly());
        }, $this->getActiveTemplateTypeMap()->getTypes())) . '>';
    }
    public function getCacheKey() : string
    {
        $cacheKey = $this->cacheKey;
        if ($cacheKey !== null) {
            return $this->cacheKey;
        }
        $cacheKey = $this->displayName;
        if ($this->resolvedTemplateTypeMap !== null) {
            $cacheKey .= '<' . implode(',', array_map(static function (Type $type) : string {
                return $type->describe(VerbosityLevel::cache());
            }, $this->resolvedTemplateTypeMap->getTypes())) . '>';
        }
        if ($this->extraCacheKey !== null) {
            $cacheKey .= '-' . $this->extraCacheKey;
        }
        $this->cacheKey = $cacheKey;
        return $cacheKey;
    }
    /**
     * @return int[]
     */
    public function getClassHierarchyDistances() : array
    {
        if ($this->classHierarchyDistances === null) {
            $distance = 0;
            $distances = [$this->getName() => $distance];
            $currentClassReflection = $this->getNativeReflection();
            foreach ($this->collectTraits($this->getNativeReflection()) as $trait) {
                $distance++;
                if (array_key_exists($trait->getName(), $distances)) {
                    continue;
                }
                $distances[$trait->getName()] = $distance;
            }
            while ($currentClassReflection->getParentClass() !== \false) {
                $distance++;
                $parentClassName = $currentClassReflection->getParentClass()->getName();
                if (!array_key_exists($parentClassName, $distances)) {
                    $distances[$parentClassName] = $distance;
                }
                $currentClassReflection = $currentClassReflection->getParentClass();
                foreach ($this->collectTraits($currentClassReflection) as $trait) {
                    $distance++;
                    if (array_key_exists($trait->getName(), $distances)) {
                        continue;
                    }
                    $distances[$trait->getName()] = $distance;
                }
            }
            foreach ($this->getNativeReflection()->getInterfaces() as $interface) {
                $distance++;
                if (array_key_exists($interface->getName(), $distances)) {
                    continue;
                }
                $distances[$interface->getName()] = $distance;
            }
            $this->classHierarchyDistances = $distances;
        }
        return $this->classHierarchyDistances;
    }
    /**
     * @return ReflectionClass[]
     * @param \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnum $class
     */
    private function collectTraits($class) : array
    {
        $traits = [];
        $traitsLeftToAnalyze = $class->getTraits();
        while (count($traitsLeftToAnalyze) !== 0) {
            $trait = reset($traitsLeftToAnalyze);
            $traits[] = $trait;
            foreach ($trait->getTraits() as $subTrait) {
                if (in_array($subTrait, $traits, \true)) {
                    continue;
                }
                $traitsLeftToAnalyze[] = $subTrait;
            }
            array_shift($traitsLeftToAnalyze);
        }
        return $traits;
    }
    public function allowsDynamicProperties() : bool
    {
        if ($this->isEnum()) {
            return \false;
        }
        if (!$this->phpVersion->deprecatesDynamicProperties()) {
            return \true;
        }
        if ($this->isReadOnly()) {
            return \false;
        }
        if ($this->is(stdClass::class)) {
            return \true;
        }
        $class = $this;
        $attributes = $class->reflection->getAttributes('AllowDynamicProperties');
        while (count($attributes) === 0 && $class->getParentClass() !== null) {
            $attributes = $class->getParentClass()->reflection->getAttributes('AllowDynamicProperties');
            $class = $class->getParentClass();
        }
        return count($attributes) > 0;
    }
    private function allowsDynamicPropertiesExtensions() : bool
    {
        if ($this->allowsDynamicProperties()) {
            return \true;
        }
        return $this->hasNativeMethod('__get') || $this->hasNativeMethod('__set') || $this->hasNativeMethod('__isset');
    }
    public function hasProperty(string $propertyName) : bool
    {
        if ($this->isEnum()) {
            return $this->hasNativeProperty($propertyName);
        }
        foreach ($this->propertiesClassReflectionExtensions as $i => $extension) {
            if ($i > 0 && !$this->allowsDynamicPropertiesExtensions()) {
                continue;
            }
            if ($extension->hasProperty($this, $propertyName)) {
                return \true;
            }
        }
        return \false;
    }
    public function hasMethod(string $methodName) : bool
    {
        foreach ($this->methodsClassReflectionExtensions as $extension) {
            if ($extension->hasMethod($this, $methodName)) {
                return \true;
            }
        }
        return \false;
    }
    public function getMethod(string $methodName, \PHPStan\Reflection\ClassMemberAccessAnswerer $scope) : \PHPStan\Reflection\ExtendedMethodReflection
    {
        $key = $methodName;
        if ($scope->isInClass()) {
            $key = sprintf('%s-%s', $key, $scope->getClassReflection()->getCacheKey());
        }
        if (!isset($this->methods[$key])) {
            foreach ($this->methodsClassReflectionExtensions as $extension) {
                if (!$extension->hasMethod($this, $methodName)) {
                    continue;
                }
                $method = $this->wrapExtendedMethod($extension->getMethod($this, $methodName));
                if ($scope->canCallMethod($method)) {
                    return $this->methods[$key] = $method;
                }
                $this->methods[$key] = $method;
            }
        }
        if (!isset($this->methods[$key])) {
            throw new \PHPStan\Reflection\MissingMethodFromReflectionException($this->getName(), $methodName);
        }
        return $this->methods[$key];
    }
    private function wrapExtendedMethod(\PHPStan\Reflection\MethodReflection $method) : \PHPStan\Reflection\ExtendedMethodReflection
    {
        if ($method instanceof \PHPStan\Reflection\ExtendedMethodReflection) {
            return $method;
        }
        return new \PHPStan\Reflection\WrappedExtendedMethodReflection($method);
    }
    public function hasNativeMethod(string $methodName) : bool
    {
        return $this->getPhpExtension()->hasNativeMethod($this, $methodName);
    }
    public function getNativeMethod(string $methodName) : \PHPStan\Reflection\ExtendedMethodReflection
    {
        if (!$this->hasNativeMethod($methodName)) {
            throw new \PHPStan\Reflection\MissingMethodFromReflectionException($this->getName(), $methodName);
        }
        return $this->getPhpExtension()->getNativeMethod($this, $methodName);
    }
    public function hasConstructor() : bool
    {
        return $this->findConstructor() !== null;
    }
    public function getConstructor() : \PHPStan\Reflection\ExtendedMethodReflection
    {
        $constructor = $this->findConstructor();
        if ($constructor === null) {
            throw new ShouldNotHappenException();
        }
        return $this->getNativeMethod($constructor->getName());
    }
    private function findConstructor() : ?ReflectionMethod
    {
        $constructor = $this->reflection->getConstructor();
        if ($constructor === null) {
            return null;
        }
        if ($this->phpVersion->supportsLegacyConstructor()) {
            return $constructor;
        }
        if (strtolower($constructor->getName()) !== '__construct') {
            return null;
        }
        return $constructor;
    }
    private function getPhpExtension() : PhpClassReflectionExtension
    {
        $extension = $this->methodsClassReflectionExtensions[0];
        if (!$extension instanceof PhpClassReflectionExtension) {
            throw new ShouldNotHappenException();
        }
        return $extension;
    }
    /** @internal */
    public function evictPrivateSymbols() : void
    {
        foreach ($this->constants as $name => $constant) {
            if (!$constant->isPrivate()) {
                continue;
            }
            unset($this->constants[$name]);
        }
        foreach ($this->properties as $name => $property) {
            if (!$property->isPrivate()) {
                continue;
            }
            unset($this->properties[$name]);
        }
        foreach ($this->methods as $name => $method) {
            if (!$method->isPrivate()) {
                continue;
            }
            unset($this->methods[$name]);
        }
        $this->getPhpExtension()->evictPrivateSymbols($this->getCacheKey());
    }
    public function getProperty(string $propertyName, \PHPStan\Reflection\ClassMemberAccessAnswerer $scope) : \PHPStan\Reflection\PropertyReflection
    {
        if ($this->isEnum()) {
            return $this->getNativeProperty($propertyName);
        }
        $key = $propertyName;
        if ($scope->isInClass()) {
            $key = sprintf('%s-%s', $key, $scope->getClassReflection()->getCacheKey());
        }
        if (!isset($this->properties[$key])) {
            foreach ($this->propertiesClassReflectionExtensions as $i => $extension) {
                if ($i > 0 && !$this->allowsDynamicPropertiesExtensions()) {
                    continue;
                }
                if (!$extension->hasProperty($this, $propertyName)) {
                    continue;
                }
                $property = $extension->getProperty($this, $propertyName);
                if ($scope->canAccessProperty($property)) {
                    return $this->properties[$key] = $property;
                }
                $this->properties[$key] = $property;
            }
        }
        if (!isset($this->properties[$key])) {
            throw new \PHPStan\Reflection\MissingPropertyFromReflectionException($this->getName(), $propertyName);
        }
        return $this->properties[$key];
    }
    public function hasNativeProperty(string $propertyName) : bool
    {
        return $this->getPhpExtension()->hasProperty($this, $propertyName);
    }
    public function getNativeProperty(string $propertyName) : PhpPropertyReflection
    {
        if (!$this->hasNativeProperty($propertyName)) {
            throw new \PHPStan\Reflection\MissingPropertyFromReflectionException($this->getName(), $propertyName);
        }
        return $this->getPhpExtension()->getNativeProperty($this, $propertyName);
    }
    public function isAbstract() : bool
    {
        return $this->reflection->isAbstract();
    }
    public function isInterface() : bool
    {
        return $this->reflection->isInterface();
    }
    public function isTrait() : bool
    {
        return $this->reflection->isTrait();
    }
    public function isEnum() : bool
    {
        return $this->reflection->isEnum();
    }
    public function isReadOnly() : bool
    {
        return $this->reflection->isReadOnly();
    }
    public function isBackedEnum() : bool
    {
        if (!$this->reflection instanceof ReflectionEnum) {
            return \false;
        }
        return $this->reflection->isBacked();
    }
    public function getBackedEnumType() : ?Type
    {
        if (!$this->reflection instanceof ReflectionEnum) {
            return null;
        }
        if (!$this->reflection->isBacked()) {
            return null;
        }
        $reflectionType = $this->reflection->getBackingType();
        if ($reflectionType === null) {
            return null;
        }
        return TypehintHelper::decideTypeFromReflection($reflectionType);
    }
    public function hasEnumCase(string $name) : bool
    {
        if (!$this->isEnum()) {
            return \false;
        }
        if (!$this->reflection instanceof ReflectionEnum) {
            return \false;
        }
        return $this->reflection->hasCase($name);
    }
    /**
     * @return array<string, EnumCaseReflection>
     */
    public function getEnumCases() : array
    {
        if (!$this->reflection instanceof ReflectionEnum) {
            throw new ShouldNotHappenException();
        }
        $cases = [];
        foreach ($this->reflection->getCases() as $case) {
            $valueType = null;
            if ($case instanceof ReflectionEnumBackedCase) {
                $valueType = $this->initializerExprTypeResolver->getType($case->getValueExpression(), \PHPStan\Reflection\InitializerExprContext::fromClassReflection($this));
            }
            /** @var string $caseName */
            $caseName = $case->getName();
            $cases[$caseName] = new \PHPStan\Reflection\EnumCaseReflection($this, $caseName, $valueType);
        }
        return $cases;
    }
    public function getEnumCase(string $name) : \PHPStan\Reflection\EnumCaseReflection
    {
        if (!$this->hasEnumCase($name)) {
            throw new ShouldNotHappenException(sprintf('Enum case %s::%s does not exist.', $this->getDisplayName(), $name));
        }
        if (!$this->reflection instanceof ReflectionEnum) {
            throw new ShouldNotHappenException();
        }
        $case = $this->reflection->getCase($name);
        $valueType = null;
        if ($case instanceof ReflectionEnumBackedCase) {
            $valueType = $this->initializerExprTypeResolver->getType($case->getValueExpression(), \PHPStan\Reflection\InitializerExprContext::fromClassReflection($this));
        }
        return new \PHPStan\Reflection\EnumCaseReflection($this, $name, $valueType);
    }
    public function isClass() : bool
    {
        return !$this->isInterface() && !$this->isTrait() && !$this->isEnum();
    }
    public function isAnonymous() : bool
    {
        return $this->anonymousFilename !== null;
    }
    public function is(string $className) : bool
    {
        return $this->getName() === $className || $this->isSubclassOf($className);
    }
    public function isSubclassOf(string $className) : bool
    {
        if (isset($this->subclasses[$className])) {
            return $this->subclasses[$className];
        }
        if (!$this->reflectionProvider->hasClass($className)) {
            return $this->subclasses[$className] = \false;
        }
        try {
            return $this->subclasses[$className] = $this->reflection->isSubclassOf($className);
        } catch (ReflectionException $exception) {
            return $this->subclasses[$className] = \false;
        }
    }
    public function implementsInterface(string $className) : bool
    {
        try {
            return $this->reflection->implementsInterface($className);
        } catch (ReflectionException $exception) {
            return \false;
        }
    }
    /**
     * @return ClassReflection[]
     */
    public function getParents() : array
    {
        $parents = [];
        $parent = $this->getParentClass();
        while ($parent !== null) {
            $parents[] = $parent;
            $parent = $parent->getParentClass();
        }
        return $parents;
    }
    /**
     * @return ClassReflection[]
     */
    public function getInterfaces() : array
    {
        if ($this->cachedInterfaces !== null) {
            return $this->cachedInterfaces;
        }
        $interfaces = $this->getImmediateInterfaces();
        $immediateInterfaces = $interfaces;
        $parent = $this->getParentClass();
        while ($parent !== null) {
            foreach ($parent->getImmediateInterfaces() as $parentInterface) {
                $interfaces[$parentInterface->getName()] = $parentInterface;
                foreach ($this->collectInterfaces($parentInterface) as $parentInterfaceInterface) {
                    $interfaces[$parentInterfaceInterface->getName()] = $parentInterfaceInterface;
                }
            }
            $parent = $parent->getParentClass();
        }
        foreach ($immediateInterfaces as $immediateInterface) {
            foreach ($this->collectInterfaces($immediateInterface) as $interfaceInterface) {
                $interfaces[$interfaceInterface->getName()] = $interfaceInterface;
            }
        }
        $this->cachedInterfaces = $interfaces;
        return $interfaces;
    }
    /**
     * @return ClassReflection[]
     */
    private function collectInterfaces(\PHPStan\Reflection\ClassReflection $interface) : array
    {
        $interfaces = [];
        foreach ($interface->getImmediateInterfaces() as $immediateInterface) {
            $interfaces[$immediateInterface->getName()] = $immediateInterface;
            foreach ($this->collectInterfaces($immediateInterface) as $immediateInterfaceInterface) {
                $interfaces[$immediateInterfaceInterface->getName()] = $immediateInterfaceInterface;
            }
        }
        return $interfaces;
    }
    /**
     * @return ClassReflection[]
     */
    public function getImmediateInterfaces() : array
    {
        $indirectInterfaceNames = [];
        $parent = $this->getParentClass();
        while ($parent !== null) {
            foreach ($parent->getNativeReflection()->getInterfaceNames() as $parentInterfaceName) {
                $indirectInterfaceNames[] = $parentInterfaceName;
            }
            $parent = $parent->getParentClass();
        }
        foreach ($this->getNativeReflection()->getInterfaces() as $interfaceInterface) {
            foreach ($interfaceInterface->getInterfaceNames() as $interfaceInterfaceName) {
                $indirectInterfaceNames[] = $interfaceInterfaceName;
            }
        }
        if ($this->reflection->isInterface()) {
            $implementsTags = $this->getExtendsTags();
        } else {
            $implementsTags = $this->getImplementsTags();
        }
        $immediateInterfaceNames = array_diff($this->getNativeReflection()->getInterfaceNames(), $indirectInterfaceNames);
        $immediateInterfaces = [];
        foreach ($immediateInterfaceNames as $immediateInterfaceName) {
            if (!$this->reflectionProvider->hasClass($immediateInterfaceName)) {
                continue;
            }
            $immediateInterface = $this->reflectionProvider->getClass($immediateInterfaceName);
            if (array_key_exists($immediateInterface->getName(), $implementsTags)) {
                $implementsTag = $implementsTags[$immediateInterface->getName()];
                $implementedType = $implementsTag->getType();
                if ($this->isGeneric()) {
                    $implementedType = TemplateTypeHelper::resolveTemplateTypes($implementedType, $this->getPossiblyIncompleteActiveTemplateTypeMap(), \true);
                }
                if ($implementedType instanceof GenericObjectType && $implementedType->getClassReflection() !== null) {
                    $immediateInterfaces[$immediateInterface->getName()] = $implementedType->getClassReflection();
                    continue;
                }
            }
            if ($immediateInterface->isGeneric()) {
                $immediateInterfaces[$immediateInterface->getName()] = $immediateInterface->withTypes(array_values($immediateInterface->getTemplateTypeMap()->map(static function () : Type {
                    return new ErrorType();
                })->getTypes()));
                continue;
            }
            $immediateInterfaces[$immediateInterface->getName()] = $immediateInterface;
        }
        return $immediateInterfaces;
    }
    /**
     * @return array<string, ClassReflection>
     */
    public function getTraits(bool $recursive = \false) : array
    {
        $traits = [];
        if ($recursive) {
            foreach ($this->collectTraits($this->getNativeReflection()) as $trait) {
                $traits[$trait->getName()] = $trait;
            }
        } else {
            $traits = $this->getNativeReflection()->getTraits();
        }
        $traits = array_map(function (ReflectionClass $trait) : \PHPStan\Reflection\ClassReflection {
            return $this->reflectionProvider->getClass($trait->getName());
        }, $traits);
        if ($recursive) {
            $parentClass = $this->getNativeReflection()->getParentClass();
            if ($parentClass !== \false) {
                return array_merge($traits, $this->reflectionProvider->getClass($parentClass->getName())->getTraits(\true));
            }
        }
        return $traits;
    }
    /**
     * @return string[]
     */
    public function getParentClassesNames() : array
    {
        $parentNames = [];
        $currentClassReflection = $this;
        while ($currentClassReflection->getParentClass() !== null) {
            $parentNames[] = $currentClassReflection->getParentClass()->getName();
            $currentClassReflection = $currentClassReflection->getParentClass();
        }
        return $parentNames;
    }
    public function hasConstant(string $name) : bool
    {
        if (!$this->getNativeReflection()->hasConstant($name)) {
            return \false;
        }
        $reflectionConstant = $this->getNativeReflection()->getReflectionConstant($name);
        if ($reflectionConstant === \false) {
            return \false;
        }
        return $this->reflectionProvider->hasClass($reflectionConstant->getDeclaringClass()->getName());
    }
    public function getConstant(string $name) : \PHPStan\Reflection\ConstantReflection
    {
        if (!isset($this->constants[$name])) {
            $reflectionConstant = $this->getNativeReflection()->getReflectionConstant($name);
            if ($reflectionConstant === \false) {
                throw new \PHPStan\Reflection\MissingConstantFromReflectionException($this->getName(), $name);
            }
            $declaringClass = $this->reflectionProvider->getClass($reflectionConstant->getDeclaringClass()->getName());
            $fileName = $declaringClass->getFileName();
            $phpDocType = null;
            $resolvedPhpDoc = $this->stubPhpDocProvider->findClassConstantPhpDoc($declaringClass->getName(), $name);
            if ($resolvedPhpDoc === null) {
                $docComment = null;
                if ($reflectionConstant->getDocComment() !== \false) {
                    $docComment = $reflectionConstant->getDocComment();
                }
                $resolvedPhpDoc = $this->phpDocInheritanceResolver->resolvePhpDocForConstant($docComment, $declaringClass, $fileName, $name);
            }
            $deprecatedDescription = $resolvedPhpDoc->getDeprecatedTag() !== null ? $resolvedPhpDoc->getDeprecatedTag()->getMessage() : null;
            $isDeprecated = $resolvedPhpDoc->isDeprecated();
            $isInternal = $resolvedPhpDoc->isInternal();
            $varTags = $resolvedPhpDoc->getVarTags();
            if (isset($varTags[0]) && count($varTags) === 1) {
                $phpDocType = $varTags[0]->getType();
            }
            $this->constants[$name] = new \PHPStan\Reflection\ClassConstantReflection($this->initializerExprTypeResolver, $declaringClass, $reflectionConstant, $phpDocType, $deprecatedDescription, $isDeprecated, $isInternal);
        }
        return $this->constants[$name];
    }
    public function hasTraitUse(string $traitName) : bool
    {
        return in_array($traitName, $this->getTraitNames(), \true);
    }
    /**
     * @return string[]
     */
    private function getTraitNames() : array
    {
        $class = $this->reflection;
        $traitNames = array_map(static function (ReflectionClass $class) {
            return $class->getName();
        }, $this->collectTraits($class));
        while ($class->getParentClass() !== \false) {
            $traitNames = array_values(array_unique(array_merge($traitNames, $class->getParentClass()->getTraitNames())));
            $class = $class->getParentClass();
        }
        return $traitNames;
    }
    /**
     * @return array<string, TypeAlias>
     */
    public function getTypeAliases() : array
    {
        if ($this->typeAliases === null) {
            $resolvedPhpDoc = $this->getResolvedPhpDoc();
            if ($resolvedPhpDoc === null) {
                return $this->typeAliases = [];
            }
            $typeAliasImportTags = $resolvedPhpDoc->getTypeAliasImportTags();
            $typeAliasTags = $resolvedPhpDoc->getTypeAliasTags();
            // prevent circular imports
            if (array_key_exists($this->getName(), self::$resolvingTypeAliasImports)) {
                throw new CircularTypeAliasDefinitionException();
            }
            self::$resolvingTypeAliasImports[$this->getName()] = \true;
            $importedAliases = array_map(function (TypeAliasImportTag $typeAliasImportTag) : ?TypeAlias {
                $importedAlias = $typeAliasImportTag->getImportedAlias();
                $importedFromClassName = $typeAliasImportTag->getImportedFrom();
                if (!$this->reflectionProvider->hasClass($importedFromClassName)) {
                    return null;
                }
                $importedFromReflection = $this->reflectionProvider->getClass($importedFromClassName);
                try {
                    $typeAliases = $importedFromReflection->getTypeAliases();
                } catch (CircularTypeAliasDefinitionException $exception) {
                    return TypeAlias::invalid();
                }
                if (!array_key_exists($importedAlias, $typeAliases)) {
                    return null;
                }
                return $typeAliases[$importedAlias];
            }, $typeAliasImportTags);
            unset(self::$resolvingTypeAliasImports[$this->getName()]);
            $localAliases = array_map(static function (TypeAliasTag $typeAliasTag) : TypeAlias {
                return $typeAliasTag->getTypeAlias();
            }, $typeAliasTags);
            $this->typeAliases = array_filter(array_merge($importedAliases, $localAliases), static function (?TypeAlias $typeAlias) : bool {
                return $typeAlias !== null;
            });
        }
        return $this->typeAliases;
    }
    public function getDeprecatedDescription() : ?string
    {
        if ($this->deprecatedDescription === null && $this->isDeprecated()) {
            $resolvedPhpDoc = $this->getResolvedPhpDoc();
            if ($resolvedPhpDoc !== null && $resolvedPhpDoc->getDeprecatedTag() !== null) {
                $this->deprecatedDescription = $resolvedPhpDoc->getDeprecatedTag()->getMessage();
            }
        }
        return $this->deprecatedDescription;
    }
    public function isDeprecated() : bool
    {
        if ($this->isDeprecated === null) {
            $resolvedPhpDoc = $this->getResolvedPhpDoc();
            $this->isDeprecated = $resolvedPhpDoc !== null && $resolvedPhpDoc->isDeprecated();
        }
        return $this->isDeprecated;
    }
    public function isBuiltin() : bool
    {
        return $this->reflection->isInternal();
    }
    public function isInternal() : bool
    {
        if ($this->isInternal === null) {
            $resolvedPhpDoc = $this->getResolvedPhpDoc();
            $this->isInternal = $resolvedPhpDoc !== null && $resolvedPhpDoc->isInternal();
        }
        return $this->isInternal;
    }
    public function isFinal() : bool
    {
        if ($this->isFinalByKeyword()) {
            return \true;
        }
        if ($this->isFinal === null) {
            $resolvedPhpDoc = $this->getResolvedPhpDoc();
            $this->isFinal = $resolvedPhpDoc !== null && $resolvedPhpDoc->isFinal();
        }
        return $this->isFinal;
    }
    public function isImmutable() : bool
    {
        if ($this->isImmutable === null) {
            $resolvedPhpDoc = $this->getResolvedPhpDoc();
            $this->isImmutable = $resolvedPhpDoc !== null && $resolvedPhpDoc->isImmutable();
            $parentClass = $this->getParentClass();
            if ($parentClass !== null && !$this->isImmutable) {
                $this->isImmutable = $parentClass->isImmutable();
            }
        }
        return $this->isImmutable;
    }
    public function hasConsistentConstructor() : bool
    {
        if ($this->hasConsistentConstructor === null) {
            $resolvedPhpDoc = $this->getResolvedPhpDoc();
            $this->hasConsistentConstructor = $resolvedPhpDoc !== null && $resolvedPhpDoc->hasConsistentConstructor();
        }
        return $this->hasConsistentConstructor;
    }
    public function isFinalByKeyword() : bool
    {
        if ($this->isAnonymous()) {
            return \true;
        }
        return $this->reflection->isFinal();
    }
    public function isAttributeClass() : bool
    {
        return $this->findAttributeFlags() !== null;
    }
    private function findAttributeFlags() : ?int
    {
        if ($this->isInterface() || $this->isTrait() || $this->isEnum()) {
            return null;
        }
        $nativeAttributes = $this->reflection->getAttributes(Attribute::class);
        if (count($nativeAttributes) === 1) {
            if (!$this->reflectionProvider->hasClass(Attribute::class)) {
                return null;
            }
            $attributeClass = $this->reflectionProvider->getClass(Attribute::class);
            $arguments = [];
            foreach ($nativeAttributes[0]->getArgumentsExpressions() as $i => $expression) {
                $arguments[] = new Arg($expression, \false, \false, [], is_int($i) ? null : new Identifier($i));
            }
            if (!$attributeClass->hasConstructor()) {
                return null;
            }
            $attributeConstructor = $attributeClass->getConstructor();
            $attributeConstructorVariant = \PHPStan\Reflection\ParametersAcceptorSelector::selectSingle($attributeConstructor->getVariants());
            if (count($arguments) === 0) {
                $flagType = $attributeConstructorVariant->getParameters()[0]->getDefaultValue();
            } else {
                $staticCall = ArgumentsNormalizer::reorderStaticCallArguments($attributeConstructorVariant, new StaticCall(new FullyQualified(Attribute::class), $attributeConstructor->getName(), $arguments));
                if ($staticCall === null) {
                    return null;
                }
                $flagExpr = $staticCall->getArgs()[0]->value;
                $flagType = $this->initializerExprTypeResolver->getType($flagExpr, \PHPStan\Reflection\InitializerExprContext::fromClassReflection($this));
            }
            if (!$flagType instanceof ConstantIntegerType) {
                return null;
            }
            return $flagType->getValue();
        }
        return null;
    }
    public function getAttributeClassFlags() : int
    {
        $flags = $this->findAttributeFlags();
        if ($flags === null) {
            throw new ShouldNotHappenException();
        }
        return $flags;
    }
    public function getTemplateTypeMap() : TemplateTypeMap
    {
        if ($this->templateTypeMap !== null) {
            return $this->templateTypeMap;
        }
        $resolvedPhpDoc = $this->getResolvedPhpDoc();
        if ($resolvedPhpDoc === null) {
            $this->templateTypeMap = TemplateTypeMap::createEmpty();
            return $this->templateTypeMap;
        }
        $templateTypeScope = TemplateTypeScope::createWithClass($this->getName());
        $templateTypeMap = new TemplateTypeMap(array_map(static function (TemplateTag $tag) use($templateTypeScope) : Type {
            return TemplateTypeFactory::fromTemplateTag($templateTypeScope, $tag);
        }, $this->getTemplateTags()));
        $this->templateTypeMap = $templateTypeMap;
        return $templateTypeMap;
    }
    public function getActiveTemplateTypeMap() : TemplateTypeMap
    {
        if ($this->activeTemplateTypeMap !== null) {
            return $this->activeTemplateTypeMap;
        }
        $resolved = $this->resolvedTemplateTypeMap;
        if ($resolved !== null) {
            $templateTypeMap = $this->getTemplateTypeMap();
            return $this->activeTemplateTypeMap = $resolved->map(static function (string $name, Type $type) use($templateTypeMap) : Type {
                if ($type instanceof ErrorType) {
                    $templateType = $templateTypeMap->getType($name);
                    if ($templateType !== null) {
                        return TemplateTypeHelper::resolveToBounds($templateType);
                    }
                }
                return $type;
            });
        }
        return $this->activeTemplateTypeMap = $this->getTemplateTypeMap();
    }
    public function getPossiblyIncompleteActiveTemplateTypeMap() : TemplateTypeMap
    {
        return $this->resolvedTemplateTypeMap ?? $this->getTemplateTypeMap();
    }
    public function isGeneric() : bool
    {
        if ($this->isGeneric === null) {
            if ($this->isEnum()) {
                return $this->isGeneric = \false;
            }
            $this->isGeneric = count($this->getTemplateTags()) > 0;
        }
        return $this->isGeneric;
    }
    /**
     * @param array<int, Type> $types
     */
    public function typeMapFromList(array $types) : TemplateTypeMap
    {
        $resolvedPhpDoc = $this->getResolvedPhpDoc();
        if ($resolvedPhpDoc === null) {
            return TemplateTypeMap::createEmpty();
        }
        $map = [];
        $i = 0;
        foreach ($resolvedPhpDoc->getTemplateTags() as $tag) {
            $map[$tag->getName()] = $types[$i] ?? $tag->getBound();
            $i++;
        }
        return new TemplateTypeMap($map);
    }
    /** @return array<int, Type> */
    public function typeMapToList(TemplateTypeMap $typeMap) : array
    {
        $resolvedPhpDoc = $this->getResolvedPhpDoc();
        if ($resolvedPhpDoc === null) {
            return [];
        }
        $list = [];
        foreach ($resolvedPhpDoc->getTemplateTags() as $tag) {
            $list[] = $typeMap->getType($tag->getName()) ?? $tag->getBound();
        }
        return $list;
    }
    /**
     * @param array<int, Type> $types
     */
    public function withTypes(array $types) : self
    {
        return new self($this->reflectionProvider, $this->initializerExprTypeResolver, $this->fileTypeMapper, $this->stubPhpDocProvider, $this->phpDocInheritanceResolver, $this->phpVersion, $this->propertiesClassReflectionExtensions, $this->methodsClassReflectionExtensions, $this->allowedSubTypesClassReflectionExtensions, $this->displayName, $this->reflection, $this->anonymousFilename, $this->typeMapFromList($types), $this->stubPhpDocBlock);
    }
    public function getResolvedPhpDoc() : ?ResolvedPhpDocBlock
    {
        if ($this->stubPhpDocBlock !== null) {
            return $this->stubPhpDocBlock;
        }
        $fileName = $this->getFileName();
        if (is_bool($this->reflectionDocComment)) {
            $docComment = $this->reflection->getDocComment();
            $this->reflectionDocComment = $docComment !== \false ? $docComment : null;
        }
        if ($this->reflectionDocComment === null) {
            return null;
        }
        if ($this->resolvedPhpDocBlock !== \false) {
            return $this->resolvedPhpDocBlock;
        }
        return $this->resolvedPhpDocBlock = $this->fileTypeMapper->getResolvedPhpDoc($fileName, $this->getName(), null, null, $this->reflectionDocComment);
    }
    private function getFirstExtendsTag() : ?ExtendsTag
    {
        foreach ($this->getExtendsTags() as $tag) {
            return $tag;
        }
        return null;
    }
    /** @return array<string, ExtendsTag> */
    public function getExtendsTags() : array
    {
        $resolvedPhpDoc = $this->getResolvedPhpDoc();
        if ($resolvedPhpDoc === null) {
            return [];
        }
        return $resolvedPhpDoc->getExtendsTags();
    }
    /** @return array<string, ImplementsTag> */
    public function getImplementsTags() : array
    {
        $resolvedPhpDoc = $this->getResolvedPhpDoc();
        if ($resolvedPhpDoc === null) {
            return [];
        }
        return $resolvedPhpDoc->getImplementsTags();
    }
    /** @return array<string,TemplateTag> */
    public function getTemplateTags() : array
    {
        $resolvedPhpDoc = $this->getResolvedPhpDoc();
        if ($resolvedPhpDoc === null) {
            return [];
        }
        return $resolvedPhpDoc->getTemplateTags();
    }
    /**
     * @return array<string,ClassReflection>
     */
    public function getAncestors() : array
    {
        $ancestors = $this->ancestors;
        if ($ancestors === null) {
            $ancestors = [$this->getName() => $this];
            $addToAncestors = static function (string $name, \PHPStan\Reflection\ClassReflection $classReflection) use(&$ancestors) : void {
                if (array_key_exists($name, $ancestors)) {
                    return;
                }
                $ancestors[$name] = $classReflection;
            };
            foreach ($this->getInterfaces() as $interface) {
                $addToAncestors($interface->getName(), $interface);
                foreach ($interface->getAncestors() as $name => $ancestor) {
                    $addToAncestors($name, $ancestor);
                }
            }
            foreach ($this->getTraits() as $trait) {
                $addToAncestors($trait->getName(), $trait);
                foreach ($trait->getAncestors() as $name => $ancestor) {
                    $addToAncestors($name, $ancestor);
                }
            }
            $parent = $this->getParentClass();
            if ($parent !== null) {
                $addToAncestors($parent->getName(), $parent);
                foreach ($parent->getAncestors() as $name => $ancestor) {
                    $addToAncestors($name, $ancestor);
                }
            }
            $this->ancestors = $ancestors;
        }
        return $ancestors;
    }
    public function getAncestorWithClassName(string $className) : ?self
    {
        return $this->getAncestors()[$className] ?? null;
    }
    /**
     * @param string[] $ancestorClasses
     */
    private function isValidAncestorType(Type $type, array $ancestorClasses) : bool
    {
        if (!$type instanceof GenericObjectType) {
            return \false;
        }
        $reflection = $type->getClassReflection();
        if ($reflection === null) {
            return \false;
        }
        return in_array($reflection->getName(), $ancestorClasses, \true);
    }
    /**
     * @return array<MixinTag>
     */
    public function getMixinTags() : array
    {
        $resolvedPhpDoc = $this->getResolvedPhpDoc();
        if ($resolvedPhpDoc === null) {
            return [];
        }
        return $resolvedPhpDoc->getMixinTags();
    }
    /**
     * @return array<PropertyTag>
     */
    public function getPropertyTags() : array
    {
        $resolvedPhpDoc = $this->getResolvedPhpDoc();
        if ($resolvedPhpDoc === null) {
            return [];
        }
        return $resolvedPhpDoc->getPropertyTags();
    }
    /**
     * @return array<MethodTag>
     */
    public function getMethodTags() : array
    {
        $resolvedPhpDoc = $this->getResolvedPhpDoc();
        if ($resolvedPhpDoc === null) {
            return [];
        }
        return $resolvedPhpDoc->getMethodTags();
    }
    /**
     * @return array<Type>
     */
    public function getResolvedMixinTypes() : array
    {
        $types = [];
        foreach ($this->getMixinTags() as $mixinTag) {
            if (!$this->isGeneric()) {
                $types[] = $mixinTag->getType();
                continue;
            }
            $types[] = TemplateTypeHelper::resolveTemplateTypes($mixinTag->getType(), $this->getActiveTemplateTypeMap());
        }
        return $types;
    }
    /**
     * @return array<Type>|null
     */
    public function getAllowedSubTypes() : ?array
    {
        foreach ($this->allowedSubTypesClassReflectionExtensions as $allowedSubTypesClassReflectionExtension) {
            if ($allowedSubTypesClassReflectionExtension->supports($this)) {
                return $allowedSubTypesClassReflectionExtension->getAllowedSubTypes($this);
            }
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Parser\ArrayFilterArgVisitor;
use PHPStan\Parser\ArrayMapArgVisitor;
use PHPStan\Parser\ArrayWalkArgVisitor;
use PHPStan\Parser\CurlSetOptArgVisitor;
use PHPStan\Reflection\Native\NativeParameterReflection;
use PHPStan\Reflection\Php\DummyParameter;
use PHPStan\Reflection\Php\DummyParameterWithPhpDocs;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\BooleanType;
use PHPStan\Type\CallableType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Generic\TemplateType;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\IntegerType;
use PHPStan\Type\LateResolvableType;
use PHPStan\Type\MixedType;
use PHPStan\Type\NullType;
use PHPStan\Type\ResourceType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypeTraverser;
use PHPStan\Type\UnionType;
use function array_key_last;
use function array_map;
use function array_slice;
use function constant;
use function count;
use function defined;
use function sprintf;
use const ARRAY_FILTER_USE_BOTH;
use const ARRAY_FILTER_USE_KEY;
use const CURLOPT_SSL_VERIFYHOST;
/** @api */
class ParametersAcceptorSelector
{
    /**
     * @template T of ParametersAcceptor
     * @param T[] $parametersAcceptors
     * @return T
     */
    public static function selectSingle(array $parametersAcceptors) : \PHPStan\Reflection\ParametersAcceptor
    {
        $count = count($parametersAcceptors);
        if ($count === 0) {
            throw new ShouldNotHappenException('getVariants() must return at least one variant.');
        }
        if ($count !== 1) {
            throw new ShouldNotHappenException('Multiple variants - use selectFromArgs() instead.');
        }
        return $parametersAcceptors[0];
    }
    /**
     * @param Node\Arg[] $args
     * @param ParametersAcceptor[] $parametersAcceptors
     */
    public static function selectFromArgs(Scope $scope, array $args, array $parametersAcceptors) : \PHPStan\Reflection\ParametersAcceptor
    {
        $types = [];
        $unpack = \false;
        if (count($args) > 0 && count($parametersAcceptors) > 0) {
            $arrayMapArgs = $args[0]->value->getAttribute(ArrayMapArgVisitor::ATTRIBUTE_NAME);
            if ($arrayMapArgs !== null) {
                $acceptor = $parametersAcceptors[0];
                $parameters = $acceptor->getParameters();
                $callbackParameters = [];
                foreach ($arrayMapArgs as $arg) {
                    $callbackParameters[] = new DummyParameter('item', self::getIterableValueType($scope->getType($arg->value)), \false, \PHPStan\Reflection\PassedByReference::createNo(), \false, null);
                }
                $parameters[0] = new NativeParameterReflection($parameters[0]->getName(), $parameters[0]->isOptional(), new UnionType([new CallableType($callbackParameters, new MixedType(), \false), new NullType()]), $parameters[0]->passedByReference(), $parameters[0]->isVariadic(), $parameters[0]->getDefaultValue());
                $parametersAcceptors = [new \PHPStan\Reflection\FunctionVariant($acceptor->getTemplateTypeMap(), $acceptor->getResolvedTemplateTypeMap(), $parameters, $acceptor->isVariadic(), $acceptor->getReturnType())];
            }
            if (count($args) >= 3 && (bool) $args[0]->getAttribute(CurlSetOptArgVisitor::ATTRIBUTE_NAME)) {
                $optType = $scope->getType($args[1]->value);
                if ($optType instanceof ConstantIntegerType) {
                    $optValueType = self::getCurlOptValueType($optType->getValue());
                    if ($optValueType !== null) {
                        $acceptor = $parametersAcceptors[0];
                        $parameters = $acceptor->getParameters();
                        $parameters[2] = new NativeParameterReflection($parameters[2]->getName(), $parameters[2]->isOptional(), $optValueType, $parameters[2]->passedByReference(), $parameters[2]->isVariadic(), $parameters[2]->getDefaultValue());
                        $parametersAcceptors = [new \PHPStan\Reflection\FunctionVariant($acceptor->getTemplateTypeMap(), $acceptor->getResolvedTemplateTypeMap(), $parameters, $acceptor->isVariadic(), $acceptor->getReturnType())];
                    }
                }
            }
            if (isset($args[0]) && (bool) $args[0]->getAttribute(ArrayFilterArgVisitor::ATTRIBUTE_NAME)) {
                if (isset($args[2])) {
                    $mode = $scope->getType($args[2]->value);
                    if ($mode instanceof ConstantIntegerType) {
                        if ($mode->getValue() === ARRAY_FILTER_USE_KEY) {
                            $arrayFilterParameters = [new DummyParameter('key', self::getIterableKeyType($scope->getType($args[0]->value)), \false, \PHPStan\Reflection\PassedByReference::createNo(), \false, null)];
                        } elseif ($mode->getValue() === ARRAY_FILTER_USE_BOTH) {
                            $arrayFilterParameters = [new DummyParameter('item', self::getIterableValueType($scope->getType($args[0]->value)), \false, \PHPStan\Reflection\PassedByReference::createNo(), \false, null), new DummyParameter('key', self::getIterableKeyType($scope->getType($args[0]->value)), \false, \PHPStan\Reflection\PassedByReference::createNo(), \false, null)];
                        }
                    }
                }
                $acceptor = $parametersAcceptors[0];
                $parameters = $acceptor->getParameters();
                $parameters[1] = new NativeParameterReflection($parameters[1]->getName(), $parameters[1]->isOptional(), new CallableType($arrayFilterParameters ?? [new DummyParameter('item', self::getIterableValueType($scope->getType($args[0]->value)), \false, \PHPStan\Reflection\PassedByReference::createNo(), \false, null)], new MixedType(), \false), $parameters[1]->passedByReference(), $parameters[1]->isVariadic(), $parameters[1]->getDefaultValue());
                $parametersAcceptors = [new \PHPStan\Reflection\FunctionVariant($acceptor->getTemplateTypeMap(), $acceptor->getResolvedTemplateTypeMap(), $parameters, $acceptor->isVariadic(), $acceptor->getReturnType())];
            }
            if (isset($args[0]) && (bool) $args[0]->getAttribute(ArrayWalkArgVisitor::ATTRIBUTE_NAME)) {
                $arrayWalkParameters = [new DummyParameter('item', self::getIterableValueType($scope->getType($args[0]->value)), \false, \PHPStan\Reflection\PassedByReference::createReadsArgument(), \false, null), new DummyParameter('key', self::getIterableKeyType($scope->getType($args[0]->value)), \false, \PHPStan\Reflection\PassedByReference::createNo(), \false, null)];
                if (isset($args[2])) {
                    $arrayWalkParameters[] = new DummyParameter('arg', $scope->getType($args[2]->value), \false, \PHPStan\Reflection\PassedByReference::createNo(), \false, null);
                }
                $acceptor = $parametersAcceptors[0];
                $parameters = $acceptor->getParameters();
                $parameters[1] = new NativeParameterReflection($parameters[1]->getName(), $parameters[1]->isOptional(), new CallableType($arrayWalkParameters, new MixedType(), \false), $parameters[1]->passedByReference(), $parameters[1]->isVariadic(), $parameters[1]->getDefaultValue());
                $parametersAcceptors = [new \PHPStan\Reflection\FunctionVariant($acceptor->getTemplateTypeMap(), $acceptor->getResolvedTemplateTypeMap(), $parameters, $acceptor->isVariadic(), $acceptor->getReturnType())];
            }
        }
        if (count($parametersAcceptors) === 1) {
            $acceptor = $parametersAcceptors[0];
            if (!self::hasAcceptorTemplateOrLateResolvableType($acceptor)) {
                return $acceptor;
            }
        }
        foreach ($args as $i => $arg) {
            $type = $scope->getType($arg->value);
            $index = $arg->name !== null ? $arg->name->toString() : $i;
            if ($arg->unpack) {
                $unpack = \true;
                $types[$index] = $type->getIterableValueType();
            } else {
                $types[$index] = $type;
            }
        }
        return self::selectFromTypes($types, $parametersAcceptors, $unpack);
    }
    private static function hasAcceptorTemplateOrLateResolvableType(\PHPStan\Reflection\ParametersAcceptor $acceptor) : bool
    {
        if (self::hasTemplateOrLateResolvableType($acceptor->getReturnType())) {
            return \true;
        }
        foreach ($acceptor->getParameters() as $parameter) {
            if (!self::hasTemplateOrLateResolvableType($parameter->getType())) {
                continue;
            }
            return \true;
        }
        return \false;
    }
    private static function hasTemplateOrLateResolvableType(Type $type) : bool
    {
        $has = \false;
        TypeTraverser::map($type, static function (Type $type, callable $traverse) use(&$has) : Type {
            if ($type instanceof TemplateType || $type instanceof LateResolvableType) {
                $has = \true;
                return $type;
            }
            return $traverse($type);
        });
        return $has;
    }
    /**
     * @param array<int|string, Type> $types
     * @param ParametersAcceptor[] $parametersAcceptors
     */
    public static function selectFromTypes(array $types, array $parametersAcceptors, bool $unpack) : \PHPStan\Reflection\ParametersAcceptor
    {
        if (count($parametersAcceptors) === 1) {
            return \PHPStan\Reflection\GenericParametersAcceptorResolver::resolve($types, $parametersAcceptors[0]);
        }
        if (count($parametersAcceptors) === 0) {
            throw new ShouldNotHappenException('getVariants() must return at least one variant.');
        }
        $typesCount = count($types);
        $acceptableAcceptors = [];
        foreach ($parametersAcceptors as $parametersAcceptor) {
            if ($unpack) {
                $acceptableAcceptors[] = $parametersAcceptor;
                continue;
            }
            $functionParametersMinCount = 0;
            $functionParametersMaxCount = 0;
            foreach ($parametersAcceptor->getParameters() as $parameter) {
                if (!$parameter->isOptional()) {
                    $functionParametersMinCount++;
                }
                $functionParametersMaxCount++;
            }
            if ($typesCount < $functionParametersMinCount) {
                continue;
            }
            if (!$parametersAcceptor->isVariadic() && $typesCount > $functionParametersMaxCount) {
                continue;
            }
            $acceptableAcceptors[] = $parametersAcceptor;
        }
        if (count($acceptableAcceptors) === 0) {
            return \PHPStan\Reflection\GenericParametersAcceptorResolver::resolve($types, self::combineAcceptors($parametersAcceptors));
        }
        if (count($acceptableAcceptors) === 1) {
            return \PHPStan\Reflection\GenericParametersAcceptorResolver::resolve($types, $acceptableAcceptors[0]);
        }
        $winningAcceptors = [];
        $winningCertainty = null;
        foreach ($acceptableAcceptors as $acceptableAcceptor) {
            $isSuperType = TrinaryLogic::createYes();
            $acceptableAcceptor = \PHPStan\Reflection\GenericParametersAcceptorResolver::resolve($types, $acceptableAcceptor);
            foreach ($acceptableAcceptor->getParameters() as $i => $parameter) {
                if (!isset($types[$i])) {
                    if (!$unpack || count($types) <= 0) {
                        break;
                    }
                    $type = $types[array_key_last($types)];
                } else {
                    $type = $types[$i];
                }
                if ($parameter->getType() instanceof MixedType) {
                    $isSuperType = $isSuperType->and(TrinaryLogic::createMaybe());
                } else {
                    $isSuperType = $isSuperType->and($parameter->getType()->isSuperTypeOf($type));
                }
            }
            if ($isSuperType->no()) {
                continue;
            }
            if ($winningCertainty === null) {
                $winningAcceptors[] = $acceptableAcceptor;
                $winningCertainty = $isSuperType;
            } else {
                $comparison = $winningCertainty->compareTo($isSuperType);
                if ($comparison === $isSuperType) {
                    $winningAcceptors = [$acceptableAcceptor];
                    $winningCertainty = $isSuperType;
                } elseif ($comparison === null) {
                    $winningAcceptors[] = $acceptableAcceptor;
                }
            }
        }
        if (count($winningAcceptors) === 0) {
            return \PHPStan\Reflection\GenericParametersAcceptorResolver::resolve($types, self::combineAcceptors($acceptableAcceptors));
        }
        return \PHPStan\Reflection\GenericParametersAcceptorResolver::resolve($types, self::combineAcceptors($winningAcceptors));
    }
    /**
     * @param ParametersAcceptor[] $acceptors
     */
    public static function combineAcceptors(array $acceptors) : \PHPStan\Reflection\ParametersAcceptorWithPhpDocs
    {
        if (count($acceptors) === 0) {
            throw new ShouldNotHappenException('getVariants() must return at least one variant.');
        }
        if (count($acceptors) === 1) {
            return self::wrapAcceptor($acceptors[0]);
        }
        $minimumNumberOfParameters = null;
        foreach ($acceptors as $acceptor) {
            $acceptorParametersMinCount = 0;
            foreach ($acceptor->getParameters() as $parameter) {
                if ($parameter->isOptional()) {
                    continue;
                }
                $acceptorParametersMinCount++;
            }
            if ($minimumNumberOfParameters !== null && $minimumNumberOfParameters <= $acceptorParametersMinCount) {
                continue;
            }
            $minimumNumberOfParameters = $acceptorParametersMinCount;
        }
        $parameters = [];
        $isVariadic = \false;
        $returnType = null;
        $phpDocReturnType = null;
        $nativeReturnType = null;
        foreach ($acceptors as $acceptor) {
            if ($returnType === null) {
                $returnType = $acceptor->getReturnType();
            } else {
                $returnType = TypeCombinator::union($returnType, $acceptor->getReturnType());
            }
            if ($acceptor instanceof \PHPStan\Reflection\ParametersAcceptorWithPhpDocs) {
                if ($phpDocReturnType === null) {
                    $phpDocReturnType = $acceptor->getPhpDocReturnType();
                } else {
                    $phpDocReturnType = TypeCombinator::union($phpDocReturnType, $acceptor->getPhpDocReturnType());
                }
            }
            if ($acceptor instanceof \PHPStan\Reflection\ParametersAcceptorWithPhpDocs) {
                if ($nativeReturnType === null) {
                    $nativeReturnType = $acceptor->getNativeReturnType();
                } else {
                    $nativeReturnType = TypeCombinator::union($nativeReturnType, $acceptor->getNativeReturnType());
                }
            }
            $isVariadic = $isVariadic || $acceptor->isVariadic();
            foreach ($acceptor->getParameters() as $i => $parameter) {
                if (!isset($parameters[$i])) {
                    $parameters[$i] = new DummyParameterWithPhpDocs($parameter->getName(), $parameter->getType(), $i + 1 > $minimumNumberOfParameters, $parameter->passedByReference(), $parameter->isVariadic(), $parameter->getDefaultValue(), $parameter instanceof \PHPStan\Reflection\ParameterReflectionWithPhpDocs ? $parameter->getNativeType() : new MixedType(), $parameter instanceof \PHPStan\Reflection\ParameterReflectionWithPhpDocs ? $parameter->getPhpDocType() : new MixedType(), $parameter instanceof \PHPStan\Reflection\ParameterReflectionWithPhpDocs ? $parameter->getOutType() : null);
                    continue;
                }
                $isVariadic = $parameters[$i]->isVariadic() || $parameter->isVariadic();
                $defaultValueLeft = $parameters[$i]->getDefaultValue();
                $defaultValueRight = $parameter->getDefaultValue();
                if ($defaultValueLeft !== null && $defaultValueRight !== null) {
                    $defaultValue = TypeCombinator::union($defaultValueLeft, $defaultValueRight);
                } else {
                    $defaultValue = null;
                }
                $type = TypeCombinator::union($parameters[$i]->getType(), $parameter->getType());
                $nativeType = $parameters[$i]->getNativeType();
                $phpDocType = $parameters[$i]->getPhpDocType();
                $outType = $parameters[$i]->getOutType();
                if ($parameter instanceof \PHPStan\Reflection\ParameterReflectionWithPhpDocs) {
                    $nativeType = TypeCombinator::union($nativeType, $parameter->getNativeType());
                    $phpDocType = TypeCombinator::union($phpDocType, $parameter->getPhpDocType());
                    if ($parameter->getOutType() !== null) {
                        $outType = $outType === null ? null : TypeCombinator::union($outType, $parameter->getOutType());
                    } else {
                        $outType = null;
                    }
                } else {
                    $nativeType = new MixedType();
                    $phpDocType = $type;
                    $outType = null;
                }
                $parameters[$i] = new DummyParameterWithPhpDocs($parameters[$i]->getName() !== $parameter->getName() ? sprintf('%s|%s', $parameters[$i]->getName(), $parameter->getName()) : $parameter->getName(), $type, $i + 1 > $minimumNumberOfParameters, $parameters[$i]->passedByReference()->combine($parameter->passedByReference()), $isVariadic, $defaultValue, $nativeType, $phpDocType, $outType);
                if ($isVariadic) {
                    $parameters = array_slice($parameters, 0, $i + 1);
                    break;
                }
            }
        }
        return new \PHPStan\Reflection\FunctionVariantWithPhpDocs(TemplateTypeMap::createEmpty(), null, $parameters, $isVariadic, $returnType, $phpDocReturnType ?? $returnType, $nativeReturnType ?? new MixedType());
    }
    private static function wrapAcceptor(\PHPStan\Reflection\ParametersAcceptor $acceptor) : \PHPStan\Reflection\ParametersAcceptorWithPhpDocs
    {
        if ($acceptor instanceof \PHPStan\Reflection\ParametersAcceptorWithPhpDocs) {
            return $acceptor;
        }
        return new \PHPStan\Reflection\FunctionVariantWithPhpDocs($acceptor->getTemplateTypeMap(), $acceptor->getResolvedTemplateTypeMap(), array_map(static function (\PHPStan\Reflection\ParameterReflection $parameter) : \PHPStan\Reflection\ParameterReflectionWithPhpDocs {
            return self::wrapParameter($parameter);
        }, $acceptor->getParameters()), $acceptor->isVariadic(), $acceptor->getReturnType(), $acceptor->getReturnType(), new MixedType());
    }
    private static function wrapParameter(\PHPStan\Reflection\ParameterReflection $parameter) : \PHPStan\Reflection\ParameterReflectionWithPhpDocs
    {
        return $parameter instanceof \PHPStan\Reflection\ParameterReflectionWithPhpDocs ? $parameter : new DummyParameterWithPhpDocs($parameter->getName(), $parameter->getType(), $parameter->isOptional(), $parameter->passedByReference(), $parameter->isVariadic(), $parameter->getDefaultValue(), new MixedType(), $parameter->getType(), null);
    }
    private static function getIterableValueType(Type $type) : Type
    {
        if ($type instanceof UnionType) {
            $types = [];
            foreach ($type->getTypes() as $innerType) {
                $iterableValueType = $innerType->getIterableValueType();
                if ($iterableValueType instanceof ErrorType) {
                    continue;
                }
                $types[] = $iterableValueType;
            }
            return TypeCombinator::union(...$types);
        }
        return $type->getIterableValueType();
    }
    private static function getIterableKeyType(Type $type) : Type
    {
        if ($type instanceof UnionType) {
            $types = [];
            foreach ($type->getTypes() as $innerType) {
                $iterableKeyType = $innerType->getIterableKeyType();
                if ($iterableKeyType instanceof ErrorType) {
                    continue;
                }
                $types[] = $iterableKeyType;
            }
            return TypeCombinator::union(...$types);
        }
        return $type->getIterableKeyType();
    }
    private static function getCurlOptValueType(int $curlOpt) : ?Type
    {
        if (defined('CURLOPT_SSL_VERIFYHOST') && $curlOpt === CURLOPT_SSL_VERIFYHOST) {
            return new UnionType([new ConstantIntegerType(0), new ConstantIntegerType(2)]);
        }
        $boolConstants = ['CURLOPT_AUTOREFERER', 'CURLOPT_COOKIESESSION', 'CURLOPT_CERTINFO', 'CURLOPT_CONNECT_ONLY', 'CURLOPT_CRLF', 'CURLOPT_DISALLOW_USERNAME_IN_URL', 'CURLOPT_DNS_SHUFFLE_ADDRESSES', 'CURLOPT_HAPROXYPROTOCOL', 'CURLOPT_SSH_COMPRESSION', 'CURLOPT_DNS_USE_GLOBAL_CACHE', 'CURLOPT_FAILONERROR', 'CURLOPT_SSL_FALSESTART', 'CURLOPT_FILETIME', 'CURLOPT_FOLLOWLOCATION', 'CURLOPT_FORBID_REUSE', 'CURLOPT_FRESH_CONNECT', 'CURLOPT_FTP_USE_EPRT', 'CURLOPT_FTP_USE_EPSV', 'CURLOPT_FTP_CREATE_MISSING_DIRS', 'CURLOPT_FTPAPPEND', 'CURLOPT_TCP_NODELAY', 'CURLOPT_FTPASCII', 'CURLOPT_FTPLISTONLY', 'CURLOPT_HEADER', 'CURLOPT_HTTP09_ALLOWED', 'CURLOPT_HTTPGET', 'CURLOPT_HTTPPROXYTUNNEL', 'CURLOPT_HTTP_CONTENT_DECODING', 'CURLOPT_KEEP_SENDING_ON_ERROR', 'CURLOPT_MUTE', 'CURLOPT_NETRC', 'CURLOPT_NOBODY', 'CURLOPT_NOPROGRESS', 'CURLOPT_NOSIGNAL', 'CURLOPT_PATH_AS_IS', 'CURLOPT_PIPEWAIT', 'CURLOPT_POST', 'CURLOPT_PUT', 'CURLOPT_RETURNTRANSFER', 'CURLOPT_SASL_IR', 'CURLOPT_SSL_ENABLE_ALPN', 'CURLOPT_SSL_ENABLE_NPN', 'CURLOPT_SSL_VERIFYPEER', 'CURLOPT_SSL_VERIFYSTATUS', 'CURLOPT_PROXY_SSL_VERIFYPEER', 'CURLOPT_SUPPRESS_CONNECT_HEADERS', 'CURLOPT_TCP_FASTOPEN', 'CURLOPT_TFTP_NO_OPTIONS', 'CURLOPT_TRANSFERTEXT', 'CURLOPT_UNRESTRICTED_AUTH', 'CURLOPT_UPLOAD', 'CURLOPT_VERBOSE'];
        foreach ($boolConstants as $constName) {
            if (defined($constName) && constant($constName) === $curlOpt) {
                return new BooleanType();
            }
        }
        $intConstants = ['CURLOPT_BUFFERSIZE', 'CURLOPT_CONNECTTIMEOUT', 'CURLOPT_CONNECTTIMEOUT_MS', 'CURLOPT_DNS_CACHE_TIMEOUT', 'CURLOPT_EXPECT_100_TIMEOUT_MS', 'CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS', 'CURLOPT_FTPSSLAUTH', 'CURLOPT_HEADEROPT', 'CURLOPT_HTTP_VERSION', 'CURLOPT_HTTPAUTH', 'CURLOPT_INFILESIZE', 'CURLOPT_LOW_SPEED_LIMIT', 'CURLOPT_LOW_SPEED_TIME', 'CURLOPT_MAXCONNECTS', 'CURLOPT_MAXREDIRS', 'CURLOPT_PORT', 'CURLOPT_POSTREDIR', 'CURLOPT_PROTOCOLS', 'CURLOPT_PROXYAUTH', 'CURLOPT_PROXYPORT', 'CURLOPT_PROXYTYPE', 'CURLOPT_REDIR_PROTOCOLS', 'CURLOPT_RESUME_FROM', 'CURLOPT_SOCKS5_AUTH', 'CURLOPT_SSL_OPTIONS', 'CURLOPT_SSL_VERIFYHOST', 'CURLOPT_SSLVERSION', 'CURLOPT_PROXY_SSL_OPTIONS', 'CURLOPT_PROXY_SSL_VERIFYHOST', 'CURLOPT_PROXY_SSLVERSION', 'CURLOPT_STREAM_WEIGHT', 'CURLOPT_TCP_KEEPALIVE', 'CURLOPT_TCP_KEEPIDLE', 'CURLOPT_TCP_KEEPINTVL', 'CURLOPT_TIMECONDITION', 'CURLOPT_TIMEOUT', 'CURLOPT_TIMEOUT_MS', 'CURLOPT_TIMEVALUE', 'CURLOPT_TIMEVALUE_LARGE', 'CURLOPT_MAX_RECV_SPEED_LARGE', 'CURLOPT_SSH_AUTH_TYPES', 'CURLOPT_IPRESOLVE', 'CURLOPT_FTP_FILEMETHOD'];
        foreach ($intConstants as $constName) {
            if (defined($constName) && constant($constName) === $curlOpt) {
                return new IntegerType();
            }
        }
        $nonEmptyStringConstants = ['CURLOPT_ABSTRACT_UNIX_SOCKET', 'CURLOPT_CAINFO', 'CURLOPT_CAPATH', 'CURLOPT_COOKIE', 'CURLOPT_COOKIEJAR', 'CURLOPT_COOKIELIST', 'CURLOPT_CUSTOMREQUEST', 'CURLOPT_DEFAULT_PROTOCOL', 'CURLOPT_DNS_INTERFACE', 'CURLOPT_DNS_LOCAL_IP4', 'CURLOPT_DNS_LOCAL_IP6', 'CURLOPT_EGDSOCKET', 'CURLOPT_FTPPORT', 'CURLOPT_INTERFACE', 'CURLOPT_KEYPASSWD', 'CURLOPT_KRB4LEVEL', 'CURLOPT_LOGIN_OPTIONS', 'CURLOPT_PINNEDPUBLICKEY', 'CURLOPT_PROXY_SERVICE_NAME', 'CURLOPT_PROXY_CAINFO', 'CURLOPT_PROXY_CAPATH', 'CURLOPT_PROXY_CRLFILE', 'CURLOPT_PROXY_KEYPASSWD', 'CURLOPT_PROXY_PINNEDPUBLICKEY', 'CURLOPT_PROXY_SSLCERT', 'CURLOPT_PROXY_SSLCERTTYPE', 'CURLOPT_PROXY_SSL_CIPHER_LIST', 'CURLOPT_PROXY_TLS13_CIPHERS', 'CURLOPT_PROXY_SSLKEY', 'CURLOPT_PROXY_SSLKEYTYPE', 'CURLOPT_PROXY_TLSAUTH_PASSWORD', 'CURLOPT_PROXY_TLSAUTH_TYPE', 'CURLOPT_PROXY_TLSAUTH_USERNAME', 'CURLOPT_PROXYUSERPWD', 'CURLOPT_RANDOM_FILE', 'CURLOPT_RANGE', 'CURLOPT_REFERER', 'CURLOPT_SERVICE_NAME', 'CURLOPT_SSH_HOST_PUBLIC_KEY_MD5', 'CURLOPT_SSH_PUBLIC_KEYFILE', 'CURLOPT_SSH_PRIVATE_KEYFILE', 'CURLOPT_SSL_CIPHER_LIST', 'CURLOPT_SSLCERT', 'CURLOPT_SSLCERTPASSWD', 'CURLOPT_SSLCERTTYPE', 'CURLOPT_SSLENGINE', 'CURLOPT_SSLENGINE_DEFAULT', 'CURLOPT_SSLKEY', 'CURLOPT_SSLKEYPASSWD', 'CURLOPT_SSLKEYTYPE', 'CURLOPT_TLS13_CIPHERS', 'CURLOPT_UNIX_SOCKET_PATH', 'CURLOPT_URL', 'CURLOPT_USERAGENT', 'CURLOPT_USERNAME', 'CURLOPT_PASSWORD', 'CURLOPT_USERPWD', 'CURLOPT_XOAUTH2_BEARER'];
        foreach ($nonEmptyStringConstants as $constName) {
            if (defined($constName) && constant($constName) === $curlOpt) {
                return TypeCombinator::intersect(new StringType(), new AccessoryNonEmptyStringType());
            }
        }
        $stringConstants = ['CURLOPT_COOKIEFILE', 'CURLOPT_ENCODING', 'CURLOPT_PRE_PROXY', 'CURLOPT_PRIVATE', 'CURLOPT_PROXY'];
        foreach ($stringConstants as $constName) {
            if (defined($constName) && constant($constName) === $curlOpt) {
                return new StringType();
            }
        }
        $intArrayStringKeysConstants = ['CURLOPT_HTTPHEADER'];
        foreach ($intArrayStringKeysConstants as $constName) {
            if (defined($constName) && constant($constName) === $curlOpt) {
                return new ArrayType(new IntegerType(), new StringType());
            }
        }
        $arrayConstants = ['CURLOPT_CONNECT_TO', 'CURLOPT_HTTP200ALIASES', 'CURLOPT_POSTQUOTE', 'CURLOPT_PROXYHEADER', 'CURLOPT_QUOTE', 'CURLOPT_RESOLVE'];
        foreach ($arrayConstants as $constName) {
            if (defined($constName) && constant($constName) === $curlOpt) {
                return new ArrayType(new MixedType(), new MixedType());
            }
        }
        $arrayOrStringConstants = ['CURLOPT_POSTFIELDS'];
        foreach ($arrayOrStringConstants as $constName) {
            if (defined($constName) && constant($constName) === $curlOpt) {
                return new UnionType([new StringType(), new ArrayType(new MixedType(), new MixedType())]);
            }
        }
        $resourceConstants = ['CURLOPT_FILE', 'CURLOPT_INFILE', 'CURLOPT_STDERR', 'CURLOPT_WRITEHEADER'];
        foreach ($resourceConstants as $constName) {
            if (defined($constName) && constant($constName) === $curlOpt) {
                return new ResourceType();
            }
        }
        // unknown constant
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

/**
 * This is the interface custom methods class reflection extensions implement.
 *
 * To register it in the configuration file use the `phpstan.broker.methodsClassReflectionExtension` service tag:
 *
 * ```
 * services:
 * 	-
 *		class: App\PHPStan\MyMethodsClassReflectionExtension
 *		tags:
 *			- phpstan.broker.methodsClassReflectionExtension
 * ```
 *
 * Learn more: https://phpstan.org/developing-extensions/class-reflection-extensions
 *
 * @api
 */
interface MethodsClassReflectionExtension
{
    public function hasMethod(\PHPStan\Reflection\ClassReflection $classReflection, string $methodName) : bool;
    public function getMethod(\PHPStan\Reflection\ClassReflection $classReflection, string $methodName) : \PHPStan\Reflection\MethodReflection;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Mixin;

use PHPStan\Analyser\OutOfClassScope;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\PropertiesClassReflectionExtension;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\VerbosityLevel;
use function array_intersect;
use function count;
class MixinPropertiesClassReflectionExtension implements PropertiesClassReflectionExtension
{
    /** @var array<string, array<string, true>> */
    private $inProcess = [];
    /**
     * @var string[]
     */
    private $mixinExcludeClasses;
    /**
     * @param string[] $mixinExcludeClasses
     */
    public function __construct(array $mixinExcludeClasses)
    {
        $this->mixinExcludeClasses = $mixinExcludeClasses;
    }
    public function hasProperty(ClassReflection $classReflection, string $propertyName) : bool
    {
        return $this->findProperty($classReflection, $propertyName) !== null;
    }
    public function getProperty(ClassReflection $classReflection, string $propertyName) : PropertyReflection
    {
        $property = $this->findProperty($classReflection, $propertyName);
        if ($property === null) {
            throw new ShouldNotHappenException();
        }
        return $property;
    }
    private function findProperty(ClassReflection $classReflection, string $propertyName) : ?PropertyReflection
    {
        $mixinTypes = $classReflection->getResolvedMixinTypes();
        foreach ($mixinTypes as $type) {
            if (count(array_intersect($type->getObjectClassNames(), $this->mixinExcludeClasses)) > 0) {
                continue;
            }
            $typeDescription = $type->describe(VerbosityLevel::typeOnly());
            if (isset($this->inProcess[$typeDescription][$propertyName])) {
                continue;
            }
            $this->inProcess[$typeDescription][$propertyName] = \true;
            if (!$type->hasProperty($propertyName)->yes()) {
                unset($this->inProcess[$typeDescription][$propertyName]);
                continue;
            }
            $property = $type->getProperty($propertyName, new OutOfClassScope());
            unset($this->inProcess[$typeDescription][$propertyName]);
            return $property;
        }
        foreach ($classReflection->getParents() as $parentClass) {
            $property = $this->findProperty($parentClass, $propertyName);
            if ($property === null) {
                continue;
            }
            return $property;
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Mixin;

use PHPStan\Reflection\ClassMemberReflection;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\MethodReflection;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Type;
class MixinMethodReflection implements MethodReflection
{
    /**
     * @var \PHPStan\Reflection\MethodReflection
     */
    private $reflection;
    /**
     * @var bool
     */
    private $static;
    public function __construct(MethodReflection $reflection, bool $static)
    {
        $this->reflection = $reflection;
        $this->static = $static;
    }
    public function getDeclaringClass() : ClassReflection
    {
        return $this->reflection->getDeclaringClass();
    }
    public function isStatic() : bool
    {
        return $this->static;
    }
    public function isPrivate() : bool
    {
        return $this->reflection->isPrivate();
    }
    public function isPublic() : bool
    {
        return $this->reflection->isPublic();
    }
    public function getDocComment() : ?string
    {
        return $this->reflection->getDocComment();
    }
    public function getName() : string
    {
        return $this->reflection->getName();
    }
    public function getPrototype() : ClassMemberReflection
    {
        return $this->reflection->getPrototype();
    }
    public function getVariants() : array
    {
        return $this->reflection->getVariants();
    }
    public function isDeprecated() : TrinaryLogic
    {
        return $this->reflection->isDeprecated();
    }
    public function getDeprecatedDescription() : ?string
    {
        return $this->reflection->getDeprecatedDescription();
    }
    public function isFinal() : TrinaryLogic
    {
        return $this->reflection->isFinal();
    }
    public function isInternal() : TrinaryLogic
    {
        return $this->reflection->isInternal();
    }
    public function getThrowType() : ?Type
    {
        return $this->reflection->getThrowType();
    }
    public function hasSideEffects() : TrinaryLogic
    {
        return $this->reflection->hasSideEffects();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Mixin;

use PHPStan\Analyser\OutOfClassScope;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\MethodsClassReflectionExtension;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\VerbosityLevel;
use function array_intersect;
use function count;
class MixinMethodsClassReflectionExtension implements MethodsClassReflectionExtension
{
    /** @var array<string, array<string, true>> */
    private $inProcess = [];
    /**
     * @var string[]
     */
    private $mixinExcludeClasses;
    /**
     * @param string[] $mixinExcludeClasses
     */
    public function __construct(array $mixinExcludeClasses)
    {
        $this->mixinExcludeClasses = $mixinExcludeClasses;
    }
    public function hasMethod(ClassReflection $classReflection, string $methodName) : bool
    {
        return $this->findMethod($classReflection, $methodName) !== null;
    }
    public function getMethod(ClassReflection $classReflection, string $methodName) : MethodReflection
    {
        $method = $this->findMethod($classReflection, $methodName);
        if ($method === null) {
            throw new ShouldNotHappenException();
        }
        return $method;
    }
    private function findMethod(ClassReflection $classReflection, string $methodName) : ?MethodReflection
    {
        $mixinTypes = $classReflection->getResolvedMixinTypes();
        foreach ($mixinTypes as $type) {
            if (count(array_intersect($type->getObjectClassNames(), $this->mixinExcludeClasses)) > 0) {
                continue;
            }
            $typeDescription = $type->describe(VerbosityLevel::typeOnly());
            if (isset($this->inProcess[$typeDescription][$methodName])) {
                continue;
            }
            $this->inProcess[$typeDescription][$methodName] = \true;
            if (!$type->hasMethod($methodName)->yes()) {
                unset($this->inProcess[$typeDescription][$methodName]);
                continue;
            }
            $method = $type->getMethod($methodName, new OutOfClassScope());
            unset($this->inProcess[$typeDescription][$methodName]);
            $static = $method->isStatic();
            if (!$static && $classReflection->hasNativeMethod('__callStatic')) {
                $static = \true;
            }
            return new \PHPStan\Reflection\Mixin\MixinMethodReflection($method, $static);
        }
        foreach ($classReflection->getParents() as $parentClass) {
            $method = $this->findMethod($parentClass, $methodName);
            if ($method === null) {
                continue;
            }
            return $method;
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
class InaccessibleMethod implements \PHPStan\Reflection\ParametersAcceptor
{
    /**
     * @var \PHPStan\Reflection\MethodReflection
     */
    private $methodReflection;
    public function __construct(\PHPStan\Reflection\MethodReflection $methodReflection)
    {
        $this->methodReflection = $methodReflection;
    }
    public function getMethod() : \PHPStan\Reflection\MethodReflection
    {
        return $this->methodReflection;
    }
    public function getTemplateTypeMap() : TemplateTypeMap
    {
        return TemplateTypeMap::createEmpty();
    }
    public function getResolvedTemplateTypeMap() : TemplateTypeMap
    {
        return TemplateTypeMap::createEmpty();
    }
    /**
     * @return array<int, ParameterReflection>
     */
    public function getParameters() : array
    {
        return [];
    }
    public function isVariadic() : bool
    {
        return \true;
    }
    public function getReturnType() : Type
    {
        return new MixedType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\ReflectionProvider;

use PHPStan\Reflection\ReflectionProvider;
class DirectReflectionProviderProvider implements \PHPStan\Reflection\ReflectionProvider\ReflectionProviderProvider
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(ReflectionProvider $reflectionProvider)
    {
        $this->reflectionProvider = $reflectionProvider;
    }
    public function getReflectionProvider() : ReflectionProvider
    {
        return $this->reflectionProvider;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\ReflectionProvider;

use PHPStan\Reflection\ReflectionProvider;
class ReflectionProviderFactory
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $staticReflectionProvider;
    public function __construct(ReflectionProvider $staticReflectionProvider)
    {
        $this->staticReflectionProvider = $staticReflectionProvider;
    }
    public function create() : ReflectionProvider
    {
        return new \PHPStan\Reflection\ReflectionProvider\MemoizingReflectionProvider($this->staticReflectionProvider);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\ReflectionProvider;

use PHPStan\DependencyInjection\Container;
use PHPStan\Reflection\ReflectionProvider;
class LazyReflectionProviderProvider implements \PHPStan\Reflection\ReflectionProvider\ReflectionProviderProvider
{
    /**
     * @var \PHPStan\DependencyInjection\Container
     */
    private $container;
    public function __construct(Container $container)
    {
        $this->container = $container;
    }
    public function getReflectionProvider() : ReflectionProvider
    {
        return $this->container->getByType(ReflectionProvider::class);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\ReflectionProvider;

use PHPStan\Reflection\ReflectionProvider;
class SetterReflectionProviderProvider implements \PHPStan\Reflection\ReflectionProvider\ReflectionProviderProvider
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function setReflectionProvider(ReflectionProvider $reflectionProvider) : void
    {
        $this->reflectionProvider = $reflectionProvider;
    }
    public function getReflectionProvider() : ReflectionProvider
    {
        return $this->reflectionProvider;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\ReflectionProvider;

use PHPStan\Reflection\ReflectionProvider;
interface ReflectionProviderProvider
{
    public function getReflectionProvider() : ReflectionProvider;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\ReflectionProvider;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\GlobalConstantReflection;
use PHPStan\Reflection\NamespaceAnswerer;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\ShouldNotHappenException;
class DummyReflectionProvider implements ReflectionProvider
{
    public function hasClass(string $className) : bool
    {
        return \false;
    }
    public function getClass(string $className) : ClassReflection
    {
        throw new ShouldNotHappenException();
    }
    public function getClassName(string $className) : string
    {
        return $className;
    }
    public function supportsAnonymousClasses() : bool
    {
        return \false;
    }
    public function getAnonymousClassReflection(Node\Stmt\Class_ $classNode, Scope $scope) : ClassReflection
    {
        throw new ShouldNotHappenException();
    }
    public function hasFunction(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer) : bool
    {
        return \false;
    }
    public function getFunction(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer) : FunctionReflection
    {
        throw new ShouldNotHappenException();
    }
    public function resolveFunctionName(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer) : ?string
    {
        return null;
    }
    public function hasConstant(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer) : bool
    {
        return \false;
    }
    public function getConstant(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer) : GlobalConstantReflection
    {
        throw new ShouldNotHappenException();
    }
    public function resolveConstantName(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer) : ?string
    {
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\ReflectionProvider;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\GlobalConstantReflection;
use PHPStan\Reflection\NamespaceAnswerer;
use PHPStan\Reflection\ReflectionProvider;
use function strtolower;
class MemoizingReflectionProvider implements ReflectionProvider
{
    /** @var array<string, bool> */
    private $hasClasses = [];
    /** @var array<string, ClassReflection> */
    private $classes = [];
    /** @var array<string, string> */
    private $classNames = [];
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $provider;
    public function __construct(ReflectionProvider $provider)
    {
        $this->provider = $provider;
    }
    public function hasClass(string $className) : bool
    {
        if (isset($this->hasClasses[$className])) {
            return $this->hasClasses[$className];
        }
        return $this->hasClasses[$className] = $this->provider->hasClass($className);
    }
    public function getClass(string $className) : ClassReflection
    {
        $lowerClassName = strtolower($className);
        if (isset($this->classes[$lowerClassName])) {
            return $this->classes[$lowerClassName];
        }
        return $this->classes[$lowerClassName] = $this->provider->getClass($className);
    }
    public function getClassName(string $className) : string
    {
        $lowerClassName = strtolower($className);
        if (isset($this->classNames[$lowerClassName])) {
            return $this->classNames[$lowerClassName];
        }
        return $this->classNames[$lowerClassName] = $this->provider->getClassName($className);
    }
    public function supportsAnonymousClasses() : bool
    {
        return $this->provider->supportsAnonymousClasses();
    }
    public function getAnonymousClassReflection(Node\Stmt\Class_ $classNode, Scope $scope) : ClassReflection
    {
        return $this->provider->getAnonymousClassReflection($classNode, $scope);
    }
    public function hasFunction(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer) : bool
    {
        return $this->provider->hasFunction($nameNode, $namespaceAnswerer);
    }
    public function getFunction(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer) : FunctionReflection
    {
        return $this->provider->getFunction($nameNode, $namespaceAnswerer);
    }
    public function resolveFunctionName(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer) : ?string
    {
        return $this->provider->resolveFunctionName($nameNode, $namespaceAnswerer);
    }
    public function hasConstant(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer) : bool
    {
        return $this->provider->hasConstant($nameNode, $namespaceAnswerer);
    }
    public function getConstant(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer) : GlobalConstantReflection
    {
        return $this->provider->getConstant($nameNode, $namespaceAnswerer);
    }
    public function resolveConstantName(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer) : ?string
    {
        return $this->provider->resolveConstantName($nameNode, $namespaceAnswerer);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

interface WrapperPropertyReflection extends \PHPStan\Reflection\PropertyReflection
{
    public function getOriginalReflection() : \PHPStan\Reflection\PropertyReflection;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PHPStan\Type\Type;
/** @api */
interface ParameterReflectionWithPhpDocs extends \PHPStan\Reflection\ParameterReflection
{
    public function getPhpDocType() : Type;
    public function getNativeType() : Type;
    public function getOutType() : ?Type;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PHPStan\Broker\Broker;
/**
 * @api
 * @deprecated Inject PHPStan\Reflection\ReflectionProvider into the constructor instead
 */
interface BrokerAwareExtension
{
    public function setBroker(Broker $broker) : void;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\ClassConstFetch;
use PhpParser\Node\Expr\ConstFetch;
use PhpParser\Node\Expr\PropertyFetch;
use PhpParser\Node\Identifier;
use PhpParser\Node\Name;
use PhpParser\Node\Scalar\DNumber;
use PhpParser\Node\Scalar\LNumber;
use PhpParser\Node\Scalar\MagicConst;
use PhpParser\Node\Scalar\MagicConst\Dir;
use PhpParser\Node\Scalar\MagicConst\File;
use PhpParser\Node\Scalar\MagicConst\Line;
use PhpParser\Node\Scalar\String_;
use PHPStan\Analyser\ConstantResolver;
use PHPStan\Analyser\OutOfClassScope;
use PHPStan\DependencyInjection\Type\OperatorTypeSpecifyingExtensionRegistryProvider;
use PHPStan\Node\Expr\TypeExpr;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\ReflectionProvider\ReflectionProviderProvider;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\Accessory\AccessoryLiteralStringType;
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
use PHPStan\Type\Accessory\AccessoryNonFalsyStringType;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\BenevolentUnionType;
use PHPStan\Type\BooleanType;
use PHPStan\Type\ClassStringType;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantFloatType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\Constant\OversizedArrayBuilder;
use PHPStan\Type\ConstantScalarType;
use PHPStan\Type\ConstantTypeHelper;
use PHPStan\Type\Enum\EnumCaseObjectType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\FloatType;
use PHPStan\Type\GeneralizePrecision;
use PHPStan\Type\Generic\GenericClassStringType;
use PHPStan\Type\Generic\TemplateType;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\MixedType;
use PHPStan\Type\NeverType;
use PHPStan\Type\NullType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\ObjectWithoutClassType;
use PHPStan\Type\StaticType;
use PHPStan\Type\StringType;
use PHPStan\Type\ThisType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypeTraverser;
use PHPStan\Type\TypeUtils;
use PHPStan\Type\TypeWithClassName;
use PHPStan\Type\UnionType;
use function array_keys;
use function array_merge;
use function assert;
use function ceil;
use function count;
use function dirname;
use function floor;
use function in_array;
use function is_finite;
use function is_float;
use function is_int;
use function max;
use function min;
use function sprintf;
use function strtolower;
use const INF;
class InitializerExprTypeResolver
{
    public const CALCULATE_SCALARS_LIMIT = 128;
    /**
     * @var \PHPStan\Analyser\ConstantResolver
     */
    private $constantResolver;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider\ReflectionProviderProvider
     */
    private $reflectionProviderProvider;
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    /**
     * @var \PHPStan\DependencyInjection\Type\OperatorTypeSpecifyingExtensionRegistryProvider
     */
    private $operatorTypeSpecifyingExtensionRegistryProvider;
    /**
     * @var \PHPStan\Type\Constant\OversizedArrayBuilder
     */
    private $oversizedArrayBuilder;
    /**
     * @var bool
     */
    private $usePathConstantsAsConstantString = \false;
    public function __construct(ConstantResolver $constantResolver, ReflectionProviderProvider $reflectionProviderProvider, PhpVersion $phpVersion, OperatorTypeSpecifyingExtensionRegistryProvider $operatorTypeSpecifyingExtensionRegistryProvider, OversizedArrayBuilder $oversizedArrayBuilder, bool $usePathConstantsAsConstantString = \false)
    {
        $this->constantResolver = $constantResolver;
        $this->reflectionProviderProvider = $reflectionProviderProvider;
        $this->phpVersion = $phpVersion;
        $this->operatorTypeSpecifyingExtensionRegistryProvider = $operatorTypeSpecifyingExtensionRegistryProvider;
        $this->oversizedArrayBuilder = $oversizedArrayBuilder;
        $this->usePathConstantsAsConstantString = $usePathConstantsAsConstantString;
    }
    /** @api */
    public function getType(Expr $expr, \PHPStan\Reflection\InitializerExprContext $context) : Type
    {
        if ($expr instanceof TypeExpr) {
            return $expr->getExprType();
        }
        if ($expr instanceof LNumber) {
            return new ConstantIntegerType($expr->value);
        }
        if ($expr instanceof DNumber) {
            return new ConstantFloatType($expr->value);
        }
        if ($expr instanceof String_) {
            return new ConstantStringType($expr->value);
        }
        if ($expr instanceof ConstFetch) {
            $constName = (string) $expr->name;
            $loweredConstName = strtolower($constName);
            if ($loweredConstName === 'true') {
                return new ConstantBooleanType(\true);
            } elseif ($loweredConstName === 'false') {
                return new ConstantBooleanType(\false);
            } elseif ($loweredConstName === 'null') {
                return new NullType();
            }
            $constant = $this->constantResolver->resolveConstant($expr->name, $context);
            if ($constant !== null) {
                return $constant;
            }
            return new ErrorType();
        }
        if ($expr instanceof File) {
            $file = $context->getFile();
            if ($file === null) {
                return new StringType();
            }
            $stringType = new ConstantStringType($file);
            return $this->usePathConstantsAsConstantString ? $stringType : $stringType->generalize(GeneralizePrecision::moreSpecific());
        }
        if ($expr instanceof Dir) {
            $file = $context->getFile();
            if ($file === null) {
                return new StringType();
            }
            $stringType = new ConstantStringType(dirname($file));
            return $this->usePathConstantsAsConstantString ? $stringType : $stringType->generalize(GeneralizePrecision::moreSpecific());
        }
        if ($expr instanceof Line) {
            return new ConstantIntegerType($expr->getLine());
        }
        if ($expr instanceof Expr\New_) {
            if ($expr->class instanceof Name) {
                return new ObjectType((string) $expr->class);
            }
            return new ObjectWithoutClassType();
        }
        if ($expr instanceof Expr\Array_) {
            return $this->getArrayType($expr, function (Expr $expr) use($context) : Type {
                return $this->getType($expr, $context);
            });
        }
        if ($expr instanceof Expr\ArrayDimFetch && $expr->dim !== null) {
            $var = $this->getType($expr->var, $context);
            $dim = $this->getType($expr->dim, $context);
            return $var->getOffsetValueType($dim);
        }
        if ($expr instanceof ClassConstFetch && $expr->name instanceof Identifier) {
            return $this->getClassConstFetchType($expr->class, $expr->name->toString(), $context->getClassName(), function (Expr $expr) use($context) : Type {
                return $this->getType($expr, $context);
            });
        }
        if ($expr instanceof Expr\UnaryPlus) {
            return $this->getType($expr->expr, $context)->toNumber();
        }
        if ($expr instanceof Expr\UnaryMinus) {
            return $this->getUnaryMinusType($expr->expr, function (Expr $expr) use($context) : Type {
                return $this->getType($expr, $context);
            });
        }
        if ($expr instanceof Expr\BinaryOp\Coalesce) {
            $leftType = $this->getType($expr->left, $context);
            $rightType = $this->getType($expr->right, $context);
            return TypeCombinator::union(TypeCombinator::removeNull($leftType), $rightType);
        }
        if ($expr instanceof Expr\Ternary) {
            $condType = $this->getType($expr->cond, $context);
            $elseType = $this->getType($expr->else, $context);
            if ($expr->if === null) {
                return TypeCombinator::union(TypeCombinator::removeFalsey($condType), $elseType);
            }
            $ifType = $this->getType($expr->if, $context);
            return TypeCombinator::union(TypeCombinator::removeFalsey($ifType), $elseType);
        }
        if ($expr instanceof Expr\FuncCall && $expr->name instanceof Name && $expr->name->toLowerString() === 'constant') {
            $firstArg = $expr->args[0] ?? null;
            if ($firstArg instanceof Arg && $firstArg->value instanceof String_) {
                $constant = $this->constantResolver->resolvePredefinedConstant($firstArg->value->value);
                if ($constant !== null) {
                    return $constant;
                }
            }
        }
        if ($expr instanceof Expr\BooleanNot) {
            $exprBooleanType = $this->getType($expr->expr, $context)->toBoolean();
            if ($exprBooleanType instanceof ConstantBooleanType) {
                return new ConstantBooleanType(!$exprBooleanType->getValue());
            }
            return new BooleanType();
        }
        if ($expr instanceof Expr\BitwiseNot) {
            return $this->getBitwiseNotType($expr->expr, function (Expr $expr) use($context) : Type {
                return $this->getType($expr, $context);
            });
        }
        if ($expr instanceof Expr\BinaryOp\Concat) {
            return $this->getConcatType($expr->left, $expr->right, function (Expr $expr) use($context) : Type {
                return $this->getType($expr, $context);
            });
        }
        if ($expr instanceof Expr\BinaryOp\BitwiseAnd) {
            return $this->getBitwiseAndType($expr->left, $expr->right, function (Expr $expr) use($context) : Type {
                return $this->getType($expr, $context);
            });
        }
        if ($expr instanceof Expr\BinaryOp\BitwiseOr) {
            return $this->getBitwiseOrType($expr->left, $expr->right, function (Expr $expr) use($context) : Type {
                return $this->getType($expr, $context);
            });
        }
        if ($expr instanceof Expr\BinaryOp\BitwiseXor) {
            return $this->getBitwiseXorType($expr->left, $expr->right, function (Expr $expr) use($context) : Type {
                return $this->getType($expr, $context);
            });
        }
        if ($expr instanceof Expr\BinaryOp\Spaceship) {
            return $this->getSpaceshipType($expr->left, $expr->right, function (Expr $expr) use($context) : Type {
                return $this->getType($expr, $context);
            });
        }
        if ($expr instanceof Expr\BinaryOp\BooleanAnd || $expr instanceof Expr\BinaryOp\LogicalAnd || $expr instanceof Expr\BinaryOp\BooleanOr || $expr instanceof Expr\BinaryOp\LogicalOr) {
            return new BooleanType();
        }
        if ($expr instanceof Expr\BinaryOp\Div) {
            return $this->getDivType($expr->left, $expr->right, function (Expr $expr) use($context) : Type {
                return $this->getType($expr, $context);
            });
        }
        if ($expr instanceof Expr\BinaryOp\Mod) {
            return $this->getModType($expr->left, $expr->right, function (Expr $expr) use($context) : Type {
                return $this->getType($expr, $context);
            });
        }
        if ($expr instanceof Expr\BinaryOp\Plus) {
            return $this->getPlusType($expr->left, $expr->right, function (Expr $expr) use($context) : Type {
                return $this->getType($expr, $context);
            });
        }
        if ($expr instanceof Expr\BinaryOp\Minus) {
            return $this->getMinusType($expr->left, $expr->right, function (Expr $expr) use($context) : Type {
                return $this->getType($expr, $context);
            });
        }
        if ($expr instanceof Expr\BinaryOp\Mul) {
            return $this->getMulType($expr->left, $expr->right, function (Expr $expr) use($context) : Type {
                return $this->getType($expr, $context);
            });
        }
        if ($expr instanceof Expr\BinaryOp\Pow) {
            return $this->getPowType($expr->left, $expr->right, function (Expr $expr) use($context) : Type {
                return $this->getType($expr, $context);
            });
        }
        if ($expr instanceof Expr\BinaryOp\ShiftLeft) {
            return $this->getShiftLeftType($expr->left, $expr->right, function (Expr $expr) use($context) : Type {
                return $this->getType($expr, $context);
            });
        }
        if ($expr instanceof Expr\BinaryOp\ShiftRight) {
            return $this->getShiftRightType($expr->left, $expr->right, function (Expr $expr) use($context) : Type {
                return $this->getType($expr, $context);
            });
        }
        if ($expr instanceof BinaryOp\Identical) {
            return $this->resolveIdenticalType($this->getType($expr->left, $context), $this->getType($expr->right, $context));
        }
        if ($expr instanceof BinaryOp\NotIdentical) {
            return $this->getType(new Expr\BooleanNot(new BinaryOp\Identical($expr->left, $expr->right)), $context);
        }
        if ($expr instanceof BinaryOp\Equal) {
            return $this->resolveEqualType($this->getType($expr->left, $context), $this->getType($expr->right, $context));
        }
        if ($expr instanceof BinaryOp\NotEqual) {
            return $this->getType(new Expr\BooleanNot(new BinaryOp\Equal($expr->left, $expr->right)), $context);
        }
        if ($expr instanceof Expr\BinaryOp\Smaller) {
            return $this->getType($expr->left, $context)->isSmallerThan($this->getType($expr->right, $context))->toBooleanType();
        }
        if ($expr instanceof Expr\BinaryOp\SmallerOrEqual) {
            return $this->getType($expr->left, $context)->isSmallerThanOrEqual($this->getType($expr->right, $context))->toBooleanType();
        }
        if ($expr instanceof Expr\BinaryOp\Greater) {
            return $this->getType($expr->right, $context)->isSmallerThan($this->getType($expr->left, $context))->toBooleanType();
        }
        if ($expr instanceof Expr\BinaryOp\GreaterOrEqual) {
            return $this->getType($expr->right, $context)->isSmallerThanOrEqual($this->getType($expr->left, $context))->toBooleanType();
        }
        if ($expr instanceof Expr\BinaryOp\LogicalXor) {
            $leftBooleanType = $this->getType($expr->left, $context)->toBoolean();
            $rightBooleanType = $this->getType($expr->right, $context)->toBoolean();
            if ($leftBooleanType instanceof ConstantBooleanType && $rightBooleanType instanceof ConstantBooleanType) {
                return new ConstantBooleanType($leftBooleanType->getValue() xor $rightBooleanType->getValue());
            }
            return new BooleanType();
        }
        if ($expr instanceof MagicConst\Class_) {
            if ($context->getTraitName() !== null) {
                return TypeCombinator::intersect(new ClassStringType(), new AccessoryLiteralStringType());
            }
            if ($context->getClassName() === null) {
                return new ConstantStringType('');
            }
            return new ConstantStringType($context->getClassName(), \true);
        }
        if ($expr instanceof MagicConst\Namespace_) {
            if ($context->getTraitName() !== null) {
                return TypeCombinator::intersect(new StringType(), new AccessoryLiteralStringType());
            }
            return new ConstantStringType($context->getNamespace() ?? '');
        }
        if ($expr instanceof MagicConst\Method) {
            return new ConstantStringType($context->getMethod() ?? '');
        }
        if ($expr instanceof MagicConst\Function_) {
            return new ConstantStringType($context->getFunction() ?? '');
        }
        if ($expr instanceof MagicConst\Trait_) {
            if ($context->getTraitName() === null) {
                return new ConstantStringType('');
            }
            return new ConstantStringType($context->getTraitName(), \true);
        }
        if ($expr instanceof PropertyFetch && $expr->name instanceof Identifier) {
            $fetchedOnType = $this->getType($expr->var, $context);
            if (!$fetchedOnType->hasProperty($expr->name->name)->yes()) {
                return new ErrorType();
            }
            return $fetchedOnType->getProperty($expr->name->name, new OutOfClassScope())->getReadableType();
        }
        return new MixedType();
    }
    /**
     * @param callable(Expr): Type $getTypeCallback
     */
    public function getConcatType(Expr $left, Expr $right, callable $getTypeCallback) : Type
    {
        $leftType = $getTypeCallback($left);
        $rightType = $getTypeCallback($right);
        return $this->resolveConcatType($leftType, $rightType);
    }
    public function resolveConcatType(Type $left, Type $right) : Type
    {
        $leftStringType = $left->toString();
        $rightStringType = $right->toString();
        if (TypeCombinator::union($leftStringType, $rightStringType) instanceof ErrorType) {
            return new ErrorType();
        }
        if ($leftStringType instanceof ConstantStringType && $leftStringType->getValue() === '') {
            return $rightStringType;
        }
        if ($rightStringType instanceof ConstantStringType && $rightStringType->getValue() === '') {
            return $leftStringType;
        }
        if ($leftStringType instanceof ConstantStringType && $rightStringType instanceof ConstantStringType) {
            return $leftStringType->append($rightStringType);
        }
        $leftConstantStrings = $leftStringType->getConstantStrings();
        $rightConstantStrings = $rightStringType->getConstantStrings();
        $combinedConstantStringsCount = count($leftConstantStrings) * count($rightConstantStrings);
        // we limit the number of union-types for performance reasons
        if ($combinedConstantStringsCount > 0 && $combinedConstantStringsCount <= 16) {
            $strings = [];
            foreach ($leftConstantStrings as $leftConstantString) {
                if ($leftConstantString->getValue() === '') {
                    $strings = array_merge($strings, $rightConstantStrings);
                    continue;
                }
                foreach ($rightConstantStrings as $rightConstantString) {
                    if ($rightConstantString->getValue() === '') {
                        $strings[] = $leftConstantString;
                        continue;
                    }
                    $strings[] = $leftConstantString->append($rightConstantString);
                }
            }
            if (count($strings) > 0) {
                return TypeCombinator::union(...$strings);
            }
        }
        $accessoryTypes = [];
        if ($leftStringType->isNonEmptyString()->and($rightStringType->isNonEmptyString())->yes()) {
            $accessoryTypes[] = new AccessoryNonFalsyStringType();
        } elseif ($leftStringType->isNonFalsyString()->or($rightStringType->isNonFalsyString())->yes()) {
            $accessoryTypes[] = new AccessoryNonFalsyStringType();
        } elseif ($leftStringType->isNonEmptyString()->or($rightStringType->isNonEmptyString())->yes()) {
            $accessoryTypes[] = new AccessoryNonEmptyStringType();
        }
        if ($leftStringType->isLiteralString()->and($rightStringType->isLiteralString())->yes()) {
            $accessoryTypes[] = new AccessoryLiteralStringType();
        }
        if (count($accessoryTypes) > 0) {
            $accessoryTypes[] = new StringType();
            return new IntersectionType($accessoryTypes);
        }
        return new StringType();
    }
    /**
     * @param callable(Expr): Type $getTypeCallback
     */
    public function getArrayType(Expr\Array_ $expr, callable $getTypeCallback) : Type
    {
        if (count($expr->items) > ConstantArrayTypeBuilder::ARRAY_COUNT_LIMIT) {
            return $this->oversizedArrayBuilder->build($expr, $getTypeCallback);
        }
        $arrayBuilder = ConstantArrayTypeBuilder::createEmpty();
        $isList = null;
        foreach ($expr->items as $arrayItem) {
            if ($arrayItem === null) {
                continue;
            }
            $valueType = $getTypeCallback($arrayItem->value);
            if ($arrayItem->unpack) {
                if (count($valueType->getConstantArrays()) === 1) {
                    $constantArrayType = $valueType->getConstantArrays()[0];
                    $hasStringKey = \false;
                    foreach ($constantArrayType->getKeyTypes() as $keyType) {
                        if ($keyType->isString()->yes()) {
                            $hasStringKey = \true;
                            break;
                        }
                    }
                    foreach ($constantArrayType->getValueTypes() as $i => $innerValueType) {
                        if ($hasStringKey && $this->phpVersion->supportsArrayUnpackingWithStringKeys()) {
                            $arrayBuilder->setOffsetValueType($constantArrayType->getKeyTypes()[$i], $innerValueType, $constantArrayType->isOptionalKey($i));
                        } else {
                            $arrayBuilder->setOffsetValueType(null, $innerValueType, $constantArrayType->isOptionalKey($i));
                        }
                    }
                } else {
                    $arrayBuilder->degradeToGeneralArray();
                    if ($this->phpVersion->supportsArrayUnpackingWithStringKeys() && !$valueType->getIterableKeyType()->isString()->no()) {
                        $isList = \false;
                        $offsetType = $valueType->getIterableKeyType();
                    } else {
                        $isList = $isList ?? $arrayBuilder->isList();
                        $offsetType = new IntegerType();
                    }
                    $arrayBuilder->setOffsetValueType($offsetType, $valueType->getIterableValueType(), !$valueType->isIterableAtLeastOnce()->yes());
                }
            } else {
                $arrayBuilder->setOffsetValueType($arrayItem->key !== null ? $getTypeCallback($arrayItem->key) : null, $valueType);
            }
        }
        $arrayType = $arrayBuilder->getArray();
        if ($isList === \true) {
            return AccessoryArrayListType::intersectWith($arrayType);
        }
        return $arrayType;
    }
    /**
     * @param callable(Expr): Type $getTypeCallback
     */
    public function getBitwiseAndType(Expr $left, Expr $right, callable $getTypeCallback) : Type
    {
        $leftType = $getTypeCallback($left);
        $rightType = $getTypeCallback($right);
        if ($leftType instanceof NeverType || $rightType instanceof NeverType) {
            return $this->getNeverType($leftType, $rightType);
        }
        $leftTypes = $leftType->getConstantScalarTypes();
        $rightTypes = $rightType->getConstantScalarTypes();
        $leftTypesCount = count($leftTypes);
        $rightTypesCount = count($rightTypes);
        if ($leftTypesCount > 0 && $rightTypesCount > 0) {
            $resultTypes = [];
            $generalize = $leftTypesCount * $rightTypesCount > self::CALCULATE_SCALARS_LIMIT;
            foreach ($leftTypes as $leftTypeInner) {
                foreach ($rightTypes as $rightTypeInner) {
                    if ($leftTypeInner instanceof ConstantStringType && $rightTypeInner instanceof ConstantStringType) {
                        $resultType = $this->getTypeFromValue($leftTypeInner->getValue() & $rightTypeInner->getValue());
                    } else {
                        $leftNumberType = $leftTypeInner->toNumber();
                        $rightNumberType = $rightTypeInner->toNumber();
                        if ($leftNumberType instanceof ErrorType || $rightNumberType instanceof ErrorType) {
                            return new ErrorType();
                        }
                        if (!$leftNumberType instanceof ConstantScalarType || !$rightNumberType instanceof ConstantScalarType) {
                            throw new ShouldNotHappenException();
                        }
                        $resultType = $this->getTypeFromValue($leftNumberType->getValue() & $rightNumberType->getValue());
                    }
                    if ($generalize) {
                        $resultType = $resultType->generalize(GeneralizePrecision::lessSpecific());
                    }
                    $resultTypes[] = $resultType;
                }
            }
            return TypeCombinator::union(...$resultTypes);
        }
        if ($leftType->isString()->yes() && $rightType->isString()->yes()) {
            return new StringType();
        }
        $leftNumberType = $leftType->toNumber();
        $rightNumberType = $rightType->toNumber();
        if ($leftNumberType instanceof ErrorType || $rightNumberType instanceof ErrorType) {
            return new ErrorType();
        }
        if ($rightNumberType instanceof ConstantIntegerType && $rightNumberType->getValue() >= 0) {
            return IntegerRangeType::fromInterval(0, $rightNumberType->getValue());
        }
        if ($leftNumberType instanceof ConstantIntegerType && $leftNumberType->getValue() >= 0) {
            return IntegerRangeType::fromInterval(0, $leftNumberType->getValue());
        }
        return new IntegerType();
    }
    /**
     * @param callable(Expr): Type $getTypeCallback
     */
    public function getBitwiseOrType(Expr $left, Expr $right, callable $getTypeCallback) : Type
    {
        $leftType = $getTypeCallback($left);
        $rightType = $getTypeCallback($right);
        if ($leftType instanceof NeverType || $rightType instanceof NeverType) {
            return $this->getNeverType($leftType, $rightType);
        }
        $leftTypes = $leftType->getConstantScalarTypes();
        $rightTypes = $rightType->getConstantScalarTypes();
        $leftTypesCount = count($leftTypes);
        $rightTypesCount = count($rightTypes);
        if ($leftTypesCount > 0 && $rightTypesCount > 0) {
            $resultTypes = [];
            $generalize = $leftTypesCount * $rightTypesCount > self::CALCULATE_SCALARS_LIMIT;
            foreach ($leftTypes as $leftTypeInner) {
                foreach ($rightTypes as $rightTypeInner) {
                    if ($leftTypeInner instanceof ConstantStringType && $rightTypeInner instanceof ConstantStringType) {
                        $resultType = $this->getTypeFromValue($leftTypeInner->getValue() | $rightTypeInner->getValue());
                    } else {
                        $leftNumberType = $leftTypeInner->toNumber();
                        $rightNumberType = $rightTypeInner->toNumber();
                        if ($leftNumberType instanceof ErrorType || $rightNumberType instanceof ErrorType) {
                            return new ErrorType();
                        }
                        if (!$leftNumberType instanceof ConstantScalarType || !$rightNumberType instanceof ConstantScalarType) {
                            throw new ShouldNotHappenException();
                        }
                        $resultType = $this->getTypeFromValue($leftNumberType->getValue() | $rightNumberType->getValue());
                    }
                    if ($generalize) {
                        $resultType = $resultType->generalize(GeneralizePrecision::lessSpecific());
                    }
                    $resultTypes[] = $resultType;
                }
            }
            return TypeCombinator::union(...$resultTypes);
        }
        if ($leftType->isString()->yes() && $rightType->isString()->yes()) {
            return new StringType();
        }
        if (TypeCombinator::union($leftType->toNumber(), $rightType->toNumber()) instanceof ErrorType) {
            return new ErrorType();
        }
        return new IntegerType();
    }
    /**
     * @param callable(Expr): Type $getTypeCallback
     */
    public function getBitwiseXorType(Expr $left, Expr $right, callable $getTypeCallback) : Type
    {
        $leftType = $getTypeCallback($left);
        $rightType = $getTypeCallback($right);
        if ($leftType instanceof NeverType || $rightType instanceof NeverType) {
            return $this->getNeverType($leftType, $rightType);
        }
        $leftTypes = $leftType->getConstantScalarTypes();
        $rightTypes = $rightType->getConstantScalarTypes();
        $leftTypesCount = count($leftTypes);
        $rightTypesCount = count($rightTypes);
        if ($leftTypesCount > 0 && $rightTypesCount > 0) {
            $resultTypes = [];
            $generalize = $leftTypesCount * $rightTypesCount > self::CALCULATE_SCALARS_LIMIT;
            foreach ($leftTypes as $leftTypeInner) {
                foreach ($rightTypes as $rightTypeInner) {
                    if ($leftTypeInner instanceof ConstantStringType && $rightTypeInner instanceof ConstantStringType) {
                        $resultType = $this->getTypeFromValue($leftTypeInner->getValue() ^ $rightTypeInner->getValue());
                    } else {
                        $leftNumberType = $leftTypeInner->toNumber();
                        $rightNumberType = $rightTypeInner->toNumber();
                        if ($leftNumberType instanceof ErrorType || $rightNumberType instanceof ErrorType) {
                            return new ErrorType();
                        }
                        if (!$leftNumberType instanceof ConstantScalarType || !$rightNumberType instanceof ConstantScalarType) {
                            throw new ShouldNotHappenException();
                        }
                        $resultType = $this->getTypeFromValue($leftNumberType->getValue() ^ $rightNumberType->getValue());
                    }
                    if ($generalize) {
                        $resultType = $resultType->generalize(GeneralizePrecision::lessSpecific());
                    }
                    $resultTypes[] = $resultType;
                }
            }
            return TypeCombinator::union(...$resultTypes);
        }
        if ($leftType->isString()->yes() && $rightType->isString()->yes()) {
            return new StringType();
        }
        if (TypeCombinator::union($leftType->toNumber(), $rightType->toNumber()) instanceof ErrorType) {
            return new ErrorType();
        }
        return new IntegerType();
    }
    /**
     * @param callable(Expr): Type $getTypeCallback
     */
    public function getSpaceshipType(Expr $left, Expr $right, callable $getTypeCallback) : Type
    {
        $callbackLeftType = $getTypeCallback($left);
        $callbackRightType = $getTypeCallback($right);
        if ($callbackLeftType instanceof NeverType || $callbackRightType instanceof NeverType) {
            return $this->getNeverType($callbackLeftType, $callbackRightType);
        }
        $leftTypes = $callbackLeftType->getConstantScalarTypes();
        $rightTypes = $callbackRightType->getConstantScalarTypes();
        $leftTypesCount = count($leftTypes);
        $rightTypesCount = count($rightTypes);
        if ($leftTypesCount > 0 && $rightTypesCount > 0) {
            $resultTypes = [];
            $generalize = $leftTypesCount * $rightTypesCount > self::CALCULATE_SCALARS_LIMIT;
            foreach ($leftTypes as $leftType) {
                foreach ($rightTypes as $rightType) {
                    $leftValue = $leftType->getValue();
                    $rightValue = $rightType->getValue();
                    $resultType = $this->getTypeFromValue($leftValue <=> $rightValue);
                    if ($generalize) {
                        $resultType = $resultType->generalize(GeneralizePrecision::lessSpecific());
                    }
                    $resultTypes[] = $resultType;
                }
            }
            return TypeCombinator::union(...$resultTypes);
        }
        return IntegerRangeType::fromInterval(-1, 1);
    }
    /**
     * @param callable(Expr): Type $getTypeCallback
     */
    public function getDivType(Expr $left, Expr $right, callable $getTypeCallback) : Type
    {
        $leftType = $getTypeCallback($left);
        $rightType = $getTypeCallback($right);
        $leftTypes = $leftType->getConstantScalarTypes();
        $rightTypes = $rightType->getConstantScalarTypes();
        $leftTypesCount = count($leftTypes);
        $rightTypesCount = count($rightTypes);
        if ($leftTypesCount > 0 && $rightTypesCount > 0) {
            $resultTypes = [];
            $generalize = $leftTypesCount * $rightTypesCount > self::CALCULATE_SCALARS_LIMIT;
            foreach ($leftTypes as $leftTypeInner) {
                foreach ($rightTypes as $rightTypeInner) {
                    $leftNumberType = $leftTypeInner->toNumber();
                    $rightNumberType = $rightTypeInner->toNumber();
                    if ($leftNumberType instanceof ErrorType || $rightNumberType instanceof ErrorType) {
                        return new ErrorType();
                    }
                    if (!$leftNumberType instanceof ConstantScalarType || !$rightNumberType instanceof ConstantScalarType) {
                        throw new ShouldNotHappenException();
                    }
                    if ($rightNumberType->getValue() === 0 || $rightNumberType->getValue() === 0.0) {
                        return new ErrorType();
                    }
                    $resultType = $this->getTypeFromValue($leftNumberType->getValue() / $rightNumberType->getValue());
                    // @phpstan-ignore-line
                    if ($generalize) {
                        $resultType = $resultType->generalize(GeneralizePrecision::lessSpecific());
                    }
                    $resultTypes[] = $resultType;
                }
            }
            return TypeCombinator::union(...$resultTypes);
        }
        $rightScalarValues = $rightType->toNumber()->getConstantScalarValues();
        foreach ($rightScalarValues as $scalarValue) {
            if ($scalarValue === 0 || $scalarValue === 0.0) {
                return new ErrorType();
            }
        }
        return $this->resolveCommonMath(new BinaryOp\Div($left, $right), $leftType, $rightType);
    }
    /**
     * @param callable(Expr): Type $getTypeCallback
     */
    public function getModType(Expr $left, Expr $right, callable $getTypeCallback) : Type
    {
        $leftType = $getTypeCallback($left);
        $rightType = $getTypeCallback($right);
        if ($leftType instanceof NeverType || $rightType instanceof NeverType) {
            return $this->getNeverType($leftType, $rightType);
        }
        $leftTypes = $leftType->getConstantScalarTypes();
        $rightTypes = $rightType->getConstantScalarTypes();
        $leftTypesCount = count($leftTypes);
        $rightTypesCount = count($rightTypes);
        if ($leftTypesCount > 0 && $rightTypesCount > 0) {
            $resultTypes = [];
            $generalize = $leftTypesCount * $rightTypesCount > self::CALCULATE_SCALARS_LIMIT;
            foreach ($leftTypes as $leftTypeInner) {
                foreach ($rightTypes as $rightTypeInner) {
                    $leftNumberType = $leftTypeInner->toNumber();
                    $rightNumberType = $rightTypeInner->toNumber();
                    if ($leftNumberType instanceof ErrorType || $rightNumberType instanceof ErrorType) {
                        return new ErrorType();
                    }
                    if (!$leftNumberType instanceof ConstantScalarType || !$rightNumberType instanceof ConstantScalarType) {
                        throw new ShouldNotHappenException();
                    }
                    $rightIntegerValue = (int) $rightNumberType->getValue();
                    if ($rightIntegerValue === 0) {
                        return new ErrorType();
                    }
                    $resultType = $this->getTypeFromValue((int) $leftNumberType->getValue() % $rightIntegerValue);
                    if ($generalize) {
                        $resultType = $resultType->generalize(GeneralizePrecision::lessSpecific());
                    }
                    $resultTypes[] = $resultType;
                }
            }
            return TypeCombinator::union(...$resultTypes);
        }
        $integerType = $rightType->toInteger();
        if ($integerType instanceof ConstantIntegerType && $integerType->getValue() === 1) {
            return new ConstantIntegerType(0);
        }
        $rightScalarValues = $rightType->toNumber()->getConstantScalarValues();
        foreach ($rightScalarValues as $scalarValue) {
            if ($scalarValue === 0 || $scalarValue === 0.0) {
                return new ErrorType();
            }
        }
        $integer = new IntegerType();
        $positiveInt = IntegerRangeType::fromInterval(0, null);
        if ($integer->isSuperTypeOf($rightType)->yes()) {
            $rangeMin = null;
            $rangeMax = null;
            if ($rightType instanceof IntegerRangeType) {
                $rangeMax = $rightType->getMax() !== null ? $rightType->getMax() - 1 : null;
            } elseif ($rightType instanceof ConstantIntegerType) {
                $rangeMax = $rightType->getValue() - 1;
            } elseif ($rightType instanceof UnionType) {
                foreach ($rightType->getTypes() as $type) {
                    if ($type instanceof IntegerRangeType) {
                        if ($type->getMax() === null) {
                            $rangeMax = null;
                        } else {
                            $rangeMax = max($rangeMax, $type->getMax());
                        }
                    } elseif ($type instanceof ConstantIntegerType) {
                        $rangeMax = max($rangeMax, $type->getValue() - 1);
                    }
                }
            }
            if ($positiveInt->isSuperTypeOf($leftType)->yes()) {
                $rangeMin = 0;
            } elseif ($rangeMax !== null) {
                $rangeMin = $rangeMax * -1;
            }
            return IntegerRangeType::fromInterval($rangeMin, $rangeMax);
        } elseif ($positiveInt->isSuperTypeOf($leftType)->yes()) {
            return IntegerRangeType::fromInterval(0, null);
        }
        return new IntegerType();
    }
    /**
     * @param callable(Expr): Type $getTypeCallback
     */
    public function getPlusType(Expr $left, Expr $right, callable $getTypeCallback) : Type
    {
        $leftType = $getTypeCallback($left);
        $rightType = $getTypeCallback($right);
        if ($leftType instanceof NeverType || $rightType instanceof NeverType) {
            return $this->getNeverType($leftType, $rightType);
        }
        $leftTypes = $leftType->getConstantScalarTypes();
        $rightTypes = $rightType->getConstantScalarTypes();
        $leftTypesCount = count($leftTypes);
        $rightTypesCount = count($rightTypes);
        if ($leftTypesCount > 0 && $rightTypesCount > 0) {
            $resultTypes = [];
            $generalize = $leftTypesCount * $rightTypesCount > self::CALCULATE_SCALARS_LIMIT;
            foreach ($leftTypes as $leftTypeInner) {
                foreach ($rightTypes as $rightTypeInner) {
                    $leftNumberType = $leftTypeInner->toNumber();
                    $rightNumberType = $rightTypeInner->toNumber();
                    if ($leftNumberType instanceof ErrorType || $rightNumberType instanceof ErrorType) {
                        return new ErrorType();
                    }
                    if (!$leftNumberType instanceof ConstantScalarType || !$rightNumberType instanceof ConstantScalarType) {
                        throw new ShouldNotHappenException();
                    }
                    $resultType = $this->getTypeFromValue($leftNumberType->getValue() + $rightNumberType->getValue());
                    if ($generalize) {
                        $resultType = $resultType->generalize(GeneralizePrecision::lessSpecific());
                    }
                    $resultTypes[] = $resultType;
                }
            }
            return TypeCombinator::union(...$resultTypes);
        }
        $leftConstantArrays = $leftType->getConstantArrays();
        $rightConstantArrays = $rightType->getConstantArrays();
        $leftCount = count($leftConstantArrays);
        $rightCount = count($rightConstantArrays);
        if ($leftCount > 0 && $rightCount > 0 && $leftCount + $rightCount < ConstantArrayTypeBuilder::ARRAY_COUNT_LIMIT) {
            $resultTypes = [];
            foreach ($rightConstantArrays as $rightConstantArray) {
                foreach ($leftConstantArrays as $leftConstantArray) {
                    $newArrayBuilder = ConstantArrayTypeBuilder::createFromConstantArray($rightConstantArray);
                    foreach ($leftConstantArray->getKeyTypes() as $i => $leftKeyType) {
                        $optional = $leftConstantArray->isOptionalKey($i);
                        $valueType = $leftConstantArray->getOffsetValueType($leftKeyType);
                        if (!$optional) {
                            if ($rightConstantArray->hasOffsetValueType($leftKeyType)->maybe()) {
                                $valueType = TypeCombinator::union($valueType, $rightConstantArray->getOffsetValueType($leftKeyType));
                            }
                        }
                        $newArrayBuilder->setOffsetValueType($leftKeyType, $valueType, $optional);
                    }
                    $resultTypes[] = $newArrayBuilder->getArray();
                }
            }
            return TypeCombinator::union(...$resultTypes);
        }
        $leftIsArray = $leftType->isArray();
        $rightIsArray = $rightType->isArray();
        if ($leftIsArray->yes() && $rightIsArray->yes()) {
            if ($leftType->getIterableKeyType()->equals($rightType->getIterableKeyType())) {
                // to preserve BenevolentUnionType
                $keyType = $leftType->getIterableKeyType();
            } else {
                $keyTypes = [];
                foreach ([$leftType->getIterableKeyType(), $rightType->getIterableKeyType()] as $keyType) {
                    $keyTypes[] = $keyType;
                }
                $keyType = TypeCombinator::union(...$keyTypes);
            }
            $arrayType = new ArrayType($keyType, TypeCombinator::union($leftType->getIterableValueType(), $rightType->getIterableValueType()));
            if ($leftType->isIterableAtLeastOnce()->yes() || $rightType->isIterableAtLeastOnce()->yes()) {
                $arrayType = TypeCombinator::intersect($arrayType, new NonEmptyArrayType());
            }
            if ($leftType->isList()->yes() && $rightType->isList()->yes()) {
                $arrayType = AccessoryArrayListType::intersectWith($arrayType);
            }
            return $arrayType;
        }
        if ($leftType instanceof MixedType && $rightType instanceof MixedType) {
            if ($leftIsArray->no() && $rightIsArray->no()) {
                return new BenevolentUnionType([new FloatType(), new IntegerType()]);
            }
            return new BenevolentUnionType([new FloatType(), new IntegerType(), new ArrayType(new MixedType(), new MixedType())]);
        }
        if ($leftIsArray->yes() && $rightIsArray->no() || $leftIsArray->no() && $rightIsArray->yes()) {
            return new ErrorType();
        }
        if ($leftIsArray->yes() && $rightIsArray->maybe() || $leftIsArray->maybe() && $rightIsArray->yes()) {
            $resultType = new ArrayType(new MixedType(), new MixedType());
            if ($leftType->isIterableAtLeastOnce()->yes() || $rightType->isIterableAtLeastOnce()->yes()) {
                return TypeCombinator::intersect($resultType, new NonEmptyArrayType());
            }
            return $resultType;
        }
        if ($leftIsArray->maybe() && $rightIsArray->maybe()) {
            $plusable = new UnionType([new StringType(), new FloatType(), new IntegerType(), new ArrayType(new MixedType(), new MixedType()), new BooleanType()]);
            if ($plusable->isSuperTypeOf($leftType)->yes() && $plusable->isSuperTypeOf($rightType)->yes()) {
                return TypeCombinator::union($leftType, $rightType);
            }
        }
        return $this->resolveCommonMath(new BinaryOp\Plus($left, $right), $leftType, $rightType);
    }
    /**
     * @param callable(Expr): Type $getTypeCallback
     */
    public function getMinusType(Expr $left, Expr $right, callable $getTypeCallback) : Type
    {
        $leftType = $getTypeCallback($left);
        $rightType = $getTypeCallback($right);
        $leftTypes = $leftType->getConstantScalarTypes();
        $rightTypes = $rightType->getConstantScalarTypes();
        $leftTypesCount = count($leftTypes);
        $rightTypesCount = count($rightTypes);
        if ($leftTypesCount > 0 && $rightTypesCount > 0) {
            $resultTypes = [];
            $generalize = $leftTypesCount * $rightTypesCount > self::CALCULATE_SCALARS_LIMIT;
            foreach ($leftTypes as $leftTypeInner) {
                foreach ($rightTypes as $rightTypeInner) {
                    $leftNumberType = $leftTypeInner->toNumber();
                    $rightNumberType = $rightTypeInner->toNumber();
                    if ($leftNumberType instanceof ErrorType || $rightNumberType instanceof ErrorType) {
                        return new ErrorType();
                    }
                    if (!$leftNumberType instanceof ConstantScalarType || !$rightNumberType instanceof ConstantScalarType) {
                        throw new ShouldNotHappenException();
                    }
                    $resultType = $this->getTypeFromValue($leftNumberType->getValue() - $rightNumberType->getValue());
                    if ($generalize) {
                        $resultType = $resultType->generalize(GeneralizePrecision::lessSpecific());
                    }
                    $resultTypes[] = $resultType;
                }
            }
            return TypeCombinator::union(...$resultTypes);
        }
        return $this->resolveCommonMath(new BinaryOp\Minus($left, $right), $leftType, $rightType);
    }
    /**
     * @param callable(Expr): Type $getTypeCallback
     */
    public function getMulType(Expr $left, Expr $right, callable $getTypeCallback) : Type
    {
        $leftType = $getTypeCallback($left);
        $rightType = $getTypeCallback($right);
        $leftTypes = $leftType->getConstantScalarTypes();
        $rightTypes = $rightType->getConstantScalarTypes();
        $leftTypesCount = count($leftTypes);
        $rightTypesCount = count($rightTypes);
        if ($leftTypesCount > 0 && $rightTypesCount > 0) {
            $resultTypes = [];
            $generalize = $leftTypesCount * $rightTypesCount > self::CALCULATE_SCALARS_LIMIT;
            foreach ($leftTypes as $leftTypeInner) {
                foreach ($rightTypes as $rightTypeInner) {
                    $leftNumberType = $leftTypeInner->toNumber();
                    $rightNumberType = $rightTypeInner->toNumber();
                    if ($leftNumberType instanceof ErrorType || $rightNumberType instanceof ErrorType) {
                        return new ErrorType();
                    }
                    if (!$leftNumberType instanceof ConstantScalarType || !$rightNumberType instanceof ConstantScalarType) {
                        throw new ShouldNotHappenException();
                    }
                    $resultType = $this->getTypeFromValue($leftNumberType->getValue() * $rightNumberType->getValue());
                    if ($generalize) {
                        $resultType = $resultType->generalize(GeneralizePrecision::lessSpecific());
                    }
                    $resultTypes[] = $resultType;
                }
            }
            return TypeCombinator::union(...$resultTypes);
        }
        $floatType = new FloatType();
        $leftNumberType = $leftType->toNumber();
        if ($leftNumberType instanceof ConstantIntegerType && $leftNumberType->getValue() === 0) {
            if ($floatType->isSuperTypeOf($rightType)->yes()) {
                return new ConstantFloatType(0.0);
            }
            return new ConstantIntegerType(0);
        }
        $rightNumberType = $rightType->toNumber();
        if ($rightNumberType instanceof ConstantIntegerType && $rightNumberType->getValue() === 0) {
            if ($floatType->isSuperTypeOf($leftType)->yes()) {
                return new ConstantFloatType(0.0);
            }
            return new ConstantIntegerType(0);
        }
        return $this->resolveCommonMath(new BinaryOp\Mul($left, $right), $leftType, $rightType);
    }
    /**
     * @param callable(Expr): Type $getTypeCallback
     */
    public function getPowType(Expr $left, Expr $right, callable $getTypeCallback) : Type
    {
        $leftType = $getTypeCallback($left);
        $rightType = $getTypeCallback($right);
        $exponentiatedTyped = $leftType->exponentiate($rightType);
        if (!$exponentiatedTyped instanceof ErrorType) {
            return $exponentiatedTyped;
        }
        $extensionSpecified = $this->callOperatorTypeSpecifyingExtensions(new BinaryOp\Pow($left, $right), $leftType, $rightType);
        if ($extensionSpecified !== null) {
            return $extensionSpecified;
        }
        return new ErrorType();
    }
    /**
     * @param callable(Expr): Type $getTypeCallback
     */
    public function getShiftLeftType(Expr $left, Expr $right, callable $getTypeCallback) : Type
    {
        $leftType = $getTypeCallback($left);
        $rightType = $getTypeCallback($right);
        if ($leftType instanceof NeverType || $rightType instanceof NeverType) {
            return $this->getNeverType($leftType, $rightType);
        }
        $leftTypes = $leftType->getConstantScalarTypes();
        $rightTypes = $rightType->getConstantScalarTypes();
        $leftTypesCount = count($leftTypes);
        $rightTypesCount = count($rightTypes);
        if ($leftTypesCount > 0 && $rightTypesCount > 0) {
            $resultTypes = [];
            $generalize = $leftTypesCount * $rightTypesCount > self::CALCULATE_SCALARS_LIMIT;
            foreach ($leftTypes as $leftTypeInner) {
                foreach ($rightTypes as $rightTypeInner) {
                    $leftNumberType = $leftTypeInner->toNumber();
                    $rightNumberType = $rightTypeInner->toNumber();
                    if ($leftNumberType instanceof ErrorType || $rightNumberType instanceof ErrorType) {
                        return new ErrorType();
                    }
                    if (!$leftNumberType instanceof ConstantScalarType || !$rightNumberType instanceof ConstantScalarType) {
                        throw new ShouldNotHappenException();
                    }
                    if ($rightNumberType->getValue() < 0) {
                        return new ErrorType();
                    }
                    $resultType = $this->getTypeFromValue($leftNumberType->getValue() << $rightNumberType->getValue());
                    if ($generalize) {
                        $resultType = $resultType->generalize(GeneralizePrecision::lessSpecific());
                    }
                    $resultTypes[] = $resultType;
                }
            }
            return TypeCombinator::union(...$resultTypes);
        }
        $leftNumberType = $leftType->toNumber();
        $rightNumberType = $rightType->toNumber();
        if ($leftNumberType instanceof ErrorType || $rightNumberType instanceof ErrorType) {
            return new ErrorType();
        }
        return new IntegerType();
    }
    /**
     * @param callable(Expr): Type $getTypeCallback
     */
    public function getShiftRightType(Expr $left, Expr $right, callable $getTypeCallback) : Type
    {
        $leftType = $getTypeCallback($left);
        $rightType = $getTypeCallback($right);
        if ($leftType instanceof NeverType || $rightType instanceof NeverType) {
            return $this->getNeverType($leftType, $rightType);
        }
        $leftTypes = $leftType->getConstantScalarTypes();
        $rightTypes = $rightType->getConstantScalarTypes();
        $leftTypesCount = count($leftTypes);
        $rightTypesCount = count($rightTypes);
        if ($leftTypesCount > 0 && $rightTypesCount > 0) {
            $resultTypes = [];
            $generalize = $leftTypesCount * $rightTypesCount > self::CALCULATE_SCALARS_LIMIT;
            foreach ($leftTypes as $leftTypeInner) {
                foreach ($rightTypes as $rightTypeInner) {
                    $leftNumberType = $leftTypeInner->toNumber();
                    $rightNumberType = $rightTypeInner->toNumber();
                    if ($leftNumberType instanceof ErrorType || $rightNumberType instanceof ErrorType) {
                        return new ErrorType();
                    }
                    if (!$leftNumberType instanceof ConstantScalarType || !$rightNumberType instanceof ConstantScalarType) {
                        throw new ShouldNotHappenException();
                    }
                    if ($rightNumberType->getValue() < 0) {
                        return new ErrorType();
                    }
                    $resultType = $this->getTypeFromValue($leftNumberType->getValue() >> $rightNumberType->getValue());
                    if ($generalize) {
                        $resultType = $resultType->generalize(GeneralizePrecision::lessSpecific());
                    }
                    $resultTypes[] = $resultType;
                }
            }
            return TypeCombinator::union(...$resultTypes);
        }
        $leftNumberType = $leftType->toNumber();
        $rightNumberType = $rightType->toNumber();
        if ($leftNumberType instanceof ErrorType || $rightNumberType instanceof ErrorType) {
            return new ErrorType();
        }
        return new IntegerType();
    }
    public function resolveIdenticalType(Type $leftType, Type $rightType) : BooleanType
    {
        if ($leftType instanceof ConstantScalarType && $rightType instanceof ConstantScalarType) {
            return new ConstantBooleanType($leftType->getValue() === $rightType->getValue());
        }
        $leftTypeEnumCases = $leftType->getEnumCases();
        $rightTypeEnumCases = $rightType->getEnumCases();
        if (count($leftTypeEnumCases) === 1 && count($rightTypeEnumCases) === 1) {
            return new ConstantBooleanType($leftTypeEnumCases[0]->equals($rightTypeEnumCases[0]));
        }
        $isSuperset = $leftType->isSuperTypeOf($rightType);
        if ($isSuperset->no()) {
            return new ConstantBooleanType(\false);
        }
        if ($leftType instanceof ConstantArrayType && $rightType instanceof ConstantArrayType) {
            return $this->resolveConstantArrayTypeComparison($leftType, $rightType, function ($leftValueType, $rightValueType) : BooleanType {
                return $this->resolveIdenticalType($leftValueType, $rightValueType);
            });
        }
        return new BooleanType();
    }
    public function resolveEqualType(Type $leftType, Type $rightType) : BooleanType
    {
        $integerType = new IntegerType();
        $floatType = new FloatType();
        if ($leftType->isEnum()->yes() && $rightType->isTrue()->no() || $rightType->isEnum()->yes() && $leftType->isTrue()->no() || $leftType->isString()->yes() && $rightType->isString()->yes() || $integerType->isSuperTypeOf($leftType)->yes() && $integerType->isSuperTypeOf($rightType)->yes() || $floatType->isSuperTypeOf($leftType)->yes() && $floatType->isSuperTypeOf($rightType)->yes()) {
            return $this->resolveIdenticalType($leftType, $rightType);
        }
        if ($leftType instanceof ConstantArrayType && $rightType instanceof ConstantArrayType) {
            return $this->resolveConstantArrayTypeComparison($leftType, $rightType, function ($leftValueType, $rightValueType) : BooleanType {
                return $this->resolveEqualType($leftValueType, $rightValueType);
            });
        }
        return $leftType->looseCompare($rightType, $this->phpVersion);
    }
    /**
     * @param callable(Type, Type): BooleanType $valueComparisonCallback
     */
    private function resolveConstantArrayTypeComparison(ConstantArrayType $leftType, ConstantArrayType $rightType, callable $valueComparisonCallback) : BooleanType
    {
        $leftKeyTypes = $leftType->getKeyTypes();
        $rightKeyTypes = $rightType->getKeyTypes();
        $leftValueTypes = $leftType->getValueTypes();
        $rightValueTypes = $rightType->getValueTypes();
        $resultType = new ConstantBooleanType(\true);
        foreach ($leftKeyTypes as $i => $leftKeyType) {
            $leftOptional = $leftType->isOptionalKey($i);
            if ($leftOptional) {
                $resultType = new BooleanType();
            }
            if (count($rightKeyTypes) === 0) {
                if (!$leftOptional) {
                    return new ConstantBooleanType(\false);
                }
                continue;
            }
            $found = \false;
            foreach ($rightKeyTypes as $j => $rightKeyType) {
                unset($rightKeyTypes[$j]);
                if ($leftKeyType->equals($rightKeyType)) {
                    $found = \true;
                    break;
                } elseif (!$rightType->isOptionalKey($j)) {
                    return new ConstantBooleanType(\false);
                }
            }
            if (!$found) {
                if (!$leftOptional) {
                    return new ConstantBooleanType(\false);
                }
                continue;
            }
            if (!isset($j)) {
                throw new ShouldNotHappenException();
            }
            $rightOptional = $rightType->isOptionalKey($j);
            if ($rightOptional) {
                $resultType = new BooleanType();
                if ($leftOptional) {
                    continue;
                }
            }
            $leftIdenticalToRight = $valueComparisonCallback($leftValueTypes[$i], $rightValueTypes[$j]);
            if ($leftIdenticalToRight->isFalse()->yes()) {
                return new ConstantBooleanType(\false);
            }
            $resultType = TypeCombinator::union($resultType, $leftIdenticalToRight);
        }
        foreach (array_keys($rightKeyTypes) as $j) {
            if (!$rightType->isOptionalKey($j)) {
                return new ConstantBooleanType(\false);
            }
            $resultType = new BooleanType();
        }
        return $resultType->toBoolean();
    }
    private function callOperatorTypeSpecifyingExtensions(Expr\BinaryOp $expr, Type $leftType, Type $rightType) : ?Type
    {
        $operatorSigil = $expr->getOperatorSigil();
        $operatorTypeSpecifyingExtensions = $this->operatorTypeSpecifyingExtensionRegistryProvider->getRegistry()->getOperatorTypeSpecifyingExtensions($operatorSigil, $leftType, $rightType);
        /** @var Type[] $extensionTypes */
        $extensionTypes = [];
        foreach ($operatorTypeSpecifyingExtensions as $extension) {
            $extensionTypes[] = $extension->specifyType($operatorSigil, $leftType, $rightType);
        }
        if (count($extensionTypes) > 0) {
            return TypeCombinator::union(...$extensionTypes);
        }
        return null;
    }
    /**
     * @param BinaryOp\Plus|BinaryOp\Minus|BinaryOp\Mul|BinaryOp\Div $expr
     */
    private function resolveCommonMath(Expr\BinaryOp $expr, Type $leftType, Type $rightType) : Type
    {
        if (($leftType instanceof IntegerRangeType || $leftType instanceof ConstantIntegerType || $leftType instanceof UnionType) && ($rightType instanceof IntegerRangeType || $rightType instanceof ConstantIntegerType || $rightType instanceof UnionType)) {
            if ($leftType instanceof ConstantIntegerType) {
                return $this->integerRangeMath($leftType, $expr, $rightType);
            } elseif ($leftType instanceof UnionType) {
                $unionParts = [];
                foreach ($leftType->getTypes() as $type) {
                    if ($type instanceof IntegerRangeType || $type instanceof ConstantIntegerType) {
                        $unionParts[] = $this->integerRangeMath($type, $expr, $rightType);
                    } else {
                        $unionParts[] = $type;
                    }
                }
                $union = TypeCombinator::union(...$unionParts);
                if ($leftType instanceof BenevolentUnionType) {
                    return TypeUtils::toBenevolentUnion($union)->toNumber();
                }
                return $union->toNumber();
            }
            return $this->integerRangeMath($leftType, $expr, $rightType);
        }
        $specifiedTypes = $this->callOperatorTypeSpecifyingExtensions($expr, $leftType, $rightType);
        if ($specifiedTypes !== null) {
            return $specifiedTypes;
        }
        $types = TypeCombinator::union($leftType, $rightType);
        if ($leftType->isArray()->yes() || $rightType->isArray()->yes() || $types->isArray()->yes()) {
            return new ErrorType();
        }
        $leftNumberType = $leftType->toNumber();
        $rightNumberType = $rightType->toNumber();
        if ($leftNumberType instanceof ErrorType || $rightNumberType instanceof ErrorType) {
            return new ErrorType();
        }
        if ($leftNumberType instanceof NeverType || $rightNumberType instanceof NeverType) {
            return $this->getNeverType($leftNumberType, $rightNumberType);
        }
        if ((new FloatType())->isSuperTypeOf($leftNumberType)->yes() || (new FloatType())->isSuperTypeOf($rightNumberType)->yes()) {
            return new FloatType();
        }
        $resultType = TypeCombinator::union($leftNumberType, $rightNumberType);
        if ($expr instanceof Expr\BinaryOp\Div) {
            if ($types instanceof MixedType || $resultType->isInteger()->yes()) {
                return new BenevolentUnionType([new IntegerType(), new FloatType()]);
            }
            return new UnionType([new IntegerType(), new FloatType()]);
        }
        if ($types instanceof MixedType || $leftType instanceof BenevolentUnionType || $rightType instanceof BenevolentUnionType) {
            return TypeUtils::toBenevolentUnion($resultType);
        }
        return $resultType;
    }
    /**
     * @param ConstantIntegerType|IntegerRangeType $range
     * @param BinaryOp\Div|BinaryOp\Minus|BinaryOp\Mul|BinaryOp\Plus $node
     * @param IntegerRangeType|ConstantIntegerType|UnionType $operand
     */
    private function integerRangeMath(Type $range, BinaryOp $node, Type $operand) : Type
    {
        if ($range instanceof IntegerRangeType) {
            $rangeMin = $range->getMin();
            $rangeMax = $range->getMax();
        } else {
            $rangeMin = $range->getValue();
            $rangeMax = $rangeMin;
        }
        if ($operand instanceof UnionType) {
            $unionParts = [];
            foreach ($operand->getTypes() as $type) {
                if ($type instanceof IntegerRangeType || $type instanceof ConstantIntegerType) {
                    $unionParts[] = $this->integerRangeMath($range, $node, $type);
                } else {
                    $unionParts[] = $type->toNumber();
                }
            }
            $union = TypeCombinator::union(...$unionParts);
            if ($operand instanceof BenevolentUnionType) {
                return TypeUtils::toBenevolentUnion($union)->toNumber();
            }
            return $union->toNumber();
        }
        if ($operand instanceof IntegerRangeType) {
            $operandMin = $operand->getMin();
            $operandMax = $operand->getMax();
        } else {
            $operandMin = $operand->getValue();
            $operandMax = $operand->getValue();
        }
        if ($node instanceof BinaryOp\Plus) {
            if ($operand instanceof ConstantIntegerType) {
                /** @var int|float|null $min */
                $min = $rangeMin !== null ? $rangeMin + $operand->getValue() : null;
                /** @var int|float|null $max */
                $max = $rangeMax !== null ? $rangeMax + $operand->getValue() : null;
            } else {
                /** @var int|float|null $min */
                $min = $rangeMin !== null && $operand->getMin() !== null ? $rangeMin + $operand->getMin() : null;
                /** @var int|float|null $max */
                $max = $rangeMax !== null && $operand->getMax() !== null ? $rangeMax + $operand->getMax() : null;
            }
        } elseif ($node instanceof BinaryOp\Minus) {
            if ($operand instanceof ConstantIntegerType) {
                /** @var int|float|null $min */
                $min = $rangeMin !== null ? $rangeMin - $operand->getValue() : null;
                /** @var int|float|null $max */
                $max = $rangeMax !== null ? $rangeMax - $operand->getValue() : null;
            } else {
                if ($rangeMin === $rangeMax && $rangeMin !== null && ($operand->getMin() === null || $operand->getMax() === null)) {
                    $min = null;
                    $max = $rangeMin;
                } else {
                    if ($operand->getMin() === null) {
                        $min = null;
                    } elseif ($rangeMin !== null) {
                        if ($operand->getMax() !== null) {
                            /** @var int|float $min */
                            $min = $rangeMin - $operand->getMax();
                        } else {
                            /** @var int|float $min */
                            $min = $rangeMin - $operand->getMin();
                        }
                    } else {
                        $min = null;
                    }
                    if ($operand->getMax() === null) {
                        $min = null;
                        $max = null;
                    } elseif ($rangeMax !== null) {
                        if ($rangeMin !== null && $operand->getMin() === null) {
                            /** @var int|float $min */
                            $min = $rangeMin - $operand->getMax();
                            $max = null;
                        } elseif ($operand->getMin() !== null) {
                            /** @var int|float $max */
                            $max = $rangeMax - $operand->getMin();
                        } else {
                            $max = null;
                        }
                    } else {
                        $max = null;
                    }
                    if ($min !== null && $max !== null && $min > $max) {
                        [$min, $max] = [$max, $min];
                    }
                }
            }
        } elseif ($node instanceof Expr\BinaryOp\Mul) {
            $min1 = $rangeMin === 0 || $operandMin === 0 ? 0 : ($rangeMin ?? -INF) * ($operandMin ?? -INF);
            $min2 = $rangeMin === 0 || $operandMax === 0 ? 0 : ($rangeMin ?? -INF) * ($operandMax ?? INF);
            $max1 = $rangeMax === 0 || $operandMin === 0 ? 0 : ($rangeMax ?? INF) * ($operandMin ?? -INF);
            $max2 = $rangeMax === 0 || $operandMax === 0 ? 0 : ($rangeMax ?? INF) * ($operandMax ?? INF);
            $min = min($min1, $min2, $max1, $max2);
            $max = max($min1, $min2, $max1, $max2);
            if (!is_finite($min)) {
                $min = null;
            }
            if (!is_finite($max)) {
                $max = null;
            }
        } else {
            if ($operand instanceof ConstantIntegerType) {
                $min = $rangeMin !== null && $operand->getValue() !== 0 ? $rangeMin / $operand->getValue() : null;
                $max = $rangeMax !== null && $operand->getValue() !== 0 ? $rangeMax / $operand->getValue() : null;
            } else {
                // Avoid division by zero when looking for the min and the max by using the closest int
                $operandMin = $operandMin !== 0 ? $operandMin : 1;
                $operandMax = $operandMax !== 0 ? $operandMax : -1;
                if (($operandMin < 0 || $operandMin === null) && ($operandMax > 0 || $operandMax === null)) {
                    $negativeOperand = IntegerRangeType::fromInterval($operandMin, 0);
                    assert($negativeOperand instanceof IntegerRangeType);
                    $positiveOperand = IntegerRangeType::fromInterval(0, $operandMax);
                    assert($positiveOperand instanceof IntegerRangeType);
                    $result = TypeCombinator::union($this->integerRangeMath($range, $node, $negativeOperand), $this->integerRangeMath($range, $node, $positiveOperand))->toNumber();
                    if ($result->equals(new UnionType([new IntegerType(), new FloatType()]))) {
                        return new BenevolentUnionType([new IntegerType(), new FloatType()]);
                    }
                    return $result;
                }
                if (($rangeMin < 0 || $rangeMin === null) && ($rangeMax > 0 || $rangeMax === null)) {
                    $negativeRange = IntegerRangeType::fromInterval($rangeMin, 0);
                    assert($negativeRange instanceof IntegerRangeType);
                    $positiveRange = IntegerRangeType::fromInterval(0, $rangeMax);
                    assert($positiveRange instanceof IntegerRangeType);
                    $result = TypeCombinator::union($this->integerRangeMath($negativeRange, $node, $operand), $this->integerRangeMath($positiveRange, $node, $operand))->toNumber();
                    if ($result->equals(new UnionType([new IntegerType(), new FloatType()]))) {
                        return new BenevolentUnionType([new IntegerType(), new FloatType()]);
                    }
                    return $result;
                }
                $rangeMinSign = ($rangeMin ?? -INF) <=> 0;
                $rangeMaxSign = ($rangeMax ?? INF) <=> 0;
                $min1 = $operandMin !== null ? ($rangeMin ?? -INF) / $operandMin : $rangeMinSign * -0.1;
                $min2 = $operandMax !== null ? ($rangeMin ?? -INF) / $operandMax : $rangeMinSign * 0.1;
                $max1 = $operandMin !== null ? ($rangeMax ?? INF) / $operandMin : $rangeMaxSign * -0.1;
                $max2 = $operandMax !== null ? ($rangeMax ?? INF) / $operandMax : $rangeMaxSign * 0.1;
                $min = min($min1, $min2, $max1, $max2);
                $max = max($min1, $min2, $max1, $max2);
                if ($min === -INF) {
                    $min = null;
                }
                if ($max === INF) {
                    $max = null;
                }
            }
            if ($min !== null && $max !== null && $min > $max) {
                [$min, $max] = [$max, $min];
            }
            if ($operand instanceof IntegerRangeType || ($rangeMin === null || $rangeMax === null) || is_float($min) || is_float($max)) {
                if (is_float($min)) {
                    $min = (int) ceil($min);
                }
                if (is_float($max)) {
                    $max = (int) floor($max);
                }
                // invert maximas on division with negative constants
                if (($range instanceof ConstantIntegerType && $range->getValue() < 0 || $operand instanceof ConstantIntegerType && $operand->getValue() < 0) && ($min === null || $max === null)) {
                    [$min, $max] = [$max, $min];
                }
                if ($min === null && $max === null) {
                    return new BenevolentUnionType([new IntegerType(), new FloatType()]);
                }
                return TypeCombinator::union(IntegerRangeType::fromInterval($min, $max), new FloatType());
            }
        }
        if (is_float($min)) {
            $min = null;
        }
        if (is_float($max)) {
            $max = null;
        }
        return IntegerRangeType::fromInterval($min, $max);
    }
    /**
     * @param callable(Expr): Type $getTypeCallback
     * @param \PhpParser\Node\Name|\PhpParser\Node\Expr $class
     */
    public function getClassConstFetchTypeByReflection($class, string $constantName, ?\PHPStan\Reflection\ClassReflection $classReflection, callable $getTypeCallback) : Type
    {
        $isObject = \false;
        if ($class instanceof Name) {
            $constantClass = (string) $class;
            $constantClassType = new ObjectType($constantClass);
            $namesToResolve = ['self', 'parent'];
            if ($classReflection !== null) {
                if ($classReflection->isFinal()) {
                    $namesToResolve[] = 'static';
                } elseif (strtolower($constantClass) === 'static') {
                    if (strtolower($constantName) === 'class') {
                        return new GenericClassStringType(new StaticType($classReflection));
                    }
                    $namesToResolve[] = 'static';
                    $isObject = \true;
                }
            }
            if (in_array(strtolower($constantClass), $namesToResolve, \true)) {
                $resolvedName = $this->resolveName($class, $classReflection);
                if ($resolvedName === 'parent' && strtolower($constantName) === 'class') {
                    return new ClassStringType();
                }
                $constantClassType = $this->resolveTypeByName($class, $classReflection);
            }
            if (strtolower($constantName) === 'class') {
                return new ConstantStringType($constantClassType->getClassName(), \true);
            }
        } elseif ($class instanceof String_ && strtolower($constantName) === 'class') {
            return new ConstantStringType($class->value, \true);
        } else {
            $constantClassType = $getTypeCallback($class);
            $isObject = \true;
        }
        if (strtolower($constantName) === 'class') {
            return TypeTraverser::map($constantClassType, function (Type $type, callable $traverse) : Type {
                if ($type instanceof UnionType || $type instanceof IntersectionType) {
                    return $traverse($type);
                }
                if ($type instanceof NullType) {
                    return $type;
                }
                if ($type instanceof EnumCaseObjectType) {
                    return TypeCombinator::intersect(new GenericClassStringType(new ObjectType($type->getClassName())), new AccessoryLiteralStringType());
                }
                $objectClassNames = $type->getObjectClassNames();
                if (count($objectClassNames) > 1) {
                    throw new ShouldNotHappenException();
                }
                if ($type instanceof TemplateType && $objectClassNames === []) {
                    return TypeCombinator::intersect(new GenericClassStringType($type), new AccessoryLiteralStringType());
                } elseif ($objectClassNames !== [] && $this->getReflectionProvider()->hasClass($objectClassNames[0])) {
                    $reflection = $this->getReflectionProvider()->getClass($objectClassNames[0]);
                    if ($reflection->isFinalByKeyword()) {
                        return new ConstantStringType($reflection->getName(), \true);
                    }
                    return TypeCombinator::intersect(new GenericClassStringType($type), new AccessoryLiteralStringType());
                } elseif ($type->isObject()->yes()) {
                    return TypeCombinator::intersect(new ClassStringType(), new AccessoryLiteralStringType());
                }
                return new ErrorType();
            });
        }
        $types = [];
        foreach ($constantClassType->getObjectClassNames() as $referencedClass) {
            if (!$this->getReflectionProvider()->hasClass($referencedClass)) {
                continue;
            }
            $constantClassReflection = $this->getReflectionProvider()->getClass($referencedClass);
            if (!$constantClassReflection->hasConstant($constantName)) {
                continue;
            }
            if ($constantClassReflection->isEnum() && $constantClassReflection->hasEnumCase($constantName)) {
                $types[] = new EnumCaseObjectType($constantClassReflection->getName(), $constantName);
                continue;
            }
            $constantReflection = $constantClassReflection->getConstant($constantName);
            if ($constantReflection instanceof \PHPStan\Reflection\ClassConstantReflection && $isObject && !$constantClassReflection->isFinal() && !$constantReflection->hasPhpDocType()) {
                return new MixedType();
            }
            if ($isObject && (!$constantReflection instanceof \PHPStan\Reflection\ClassConstantReflection || !$constantClassReflection->isFinal())) {
                $constantType = $constantReflection->getValueType();
            } else {
                $constantType = $this->getType($constantReflection->getValueExpr(), \PHPStan\Reflection\InitializerExprContext::fromClassReflection($constantReflection->getDeclaringClass()));
            }
            $constantType = $this->constantResolver->resolveConstantType(sprintf('%s::%s', $constantClassReflection->getName(), $constantName), $constantType);
            $types[] = $constantType;
        }
        if (count($types) > 0) {
            return TypeCombinator::union(...$types);
        }
        if (!$constantClassType->hasConstant($constantName)->yes()) {
            return new ErrorType();
        }
        return $constantClassType->getConstant($constantName)->getValueType();
    }
    /**
     * @param callable(Expr): Type $getTypeCallback
     * @param \PhpParser\Node\Name|\PhpParser\Node\Expr $class
     */
    public function getClassConstFetchType($class, string $constantName, ?string $className, callable $getTypeCallback) : Type
    {
        $classReflection = null;
        if ($className !== null && $this->getReflectionProvider()->hasClass($className)) {
            $classReflection = $this->getReflectionProvider()->getClass($className);
        }
        return $this->getClassConstFetchTypeByReflection($class, $constantName, $classReflection, $getTypeCallback);
    }
    /**
     * @param callable(Expr): Type $getTypeCallback
     */
    public function getUnaryMinusType(Expr $expr, callable $getTypeCallback) : Type
    {
        $type = $getTypeCallback($expr)->toNumber();
        $scalarValues = $type->getConstantScalarValues();
        if (count($scalarValues) > 0) {
            $newTypes = [];
            foreach ($scalarValues as $scalarValue) {
                if (is_int($scalarValue)) {
                    /** @var int|float $newValue */
                    $newValue = -$scalarValue;
                    if (!is_int($newValue)) {
                        return $type;
                    }
                    $newTypes[] = new ConstantIntegerType($newValue);
                } elseif (is_float($scalarValue)) {
                    $newTypes[] = new ConstantFloatType(-$scalarValue);
                }
            }
            return TypeCombinator::union(...$newTypes);
        }
        if ($type instanceof IntegerRangeType) {
            return $getTypeCallback(new Expr\BinaryOp\Mul($expr, new LNumber(-1)));
        }
        return $type;
    }
    /**
     * @param callable(Expr): Type $getTypeCallback
     */
    public function getBitwiseNotType(Expr $expr, callable $getTypeCallback) : Type
    {
        $exprType = $getTypeCallback($expr);
        return TypeTraverser::map($exprType, static function (Type $type, callable $traverse) : Type {
            if ($type instanceof UnionType || $type instanceof IntersectionType) {
                return $traverse($type);
            }
            if ($type instanceof ConstantStringType) {
                return new ConstantStringType(~$type->getValue());
            }
            if ($type->isString()->yes()) {
                $accessories = [new StringType()];
                if ($type->isNonEmptyString()->yes()) {
                    $accessories[] = new AccessoryNonEmptyStringType();
                }
                // it is not useful to apply numeric and literal strings here.
                // numeric string isn't certainly kept numeric: 3v4l.org/JERDB
                return TypeCombinator::intersect(...$accessories);
            }
            if ($type->isInteger()->yes() || $type->isFloat()->yes()) {
                return new IntegerType();
                //no const types here, result depends on PHP_INT_SIZE
            }
            return new ErrorType();
        });
    }
    private function resolveName(Name $name, ?\PHPStan\Reflection\ClassReflection $classReflection) : string
    {
        $originalClass = (string) $name;
        if ($classReflection !== null) {
            if (in_array(strtolower($originalClass), ['self', 'static'], \true)) {
                return $classReflection->getName();
            } elseif ($originalClass === 'parent') {
                if ($classReflection->getParentClass() !== null) {
                    return $classReflection->getParentClass()->getName();
                }
            }
        }
        return $originalClass;
    }
    private function resolveTypeByName(Name $name, ?\PHPStan\Reflection\ClassReflection $classReflection) : TypeWithClassName
    {
        if ($name->toLowerString() === 'static' && $classReflection !== null) {
            return new StaticType($classReflection);
        }
        $originalClass = $this->resolveName($name, $classReflection);
        if ($classReflection !== null) {
            $thisType = new ThisType($classReflection);
            $ancestor = $thisType->getAncestorWithClassName($originalClass);
            if ($ancestor !== null) {
                return $ancestor;
            }
        }
        return new ObjectType($originalClass);
    }
    /**
     * @param mixed $value
     */
    private function getTypeFromValue($value) : Type
    {
        return ConstantTypeHelper::getTypeFromValue($value);
    }
    private function getReflectionProvider() : \PHPStan\Reflection\ReflectionProvider
    {
        return $this->reflectionProviderProvider->getReflectionProvider();
    }
    private function getNeverType(Type $leftType, Type $rightType) : Type
    {
        // make sure we don't lose the explicit flag in the process
        if ($leftType instanceof NeverType && $leftType->isExplicit()) {
            return $leftType;
        }
        if ($rightType instanceof NeverType && $rightType->isExplicit()) {
            return $rightType;
        }
        return new NeverType();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Php;

use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\TrinaryLogic;
use PHPStan\Type\BooleanType;
use PHPStan\Type\FloatType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
class SimpleXMLElementProperty implements PropertyReflection
{
    /**
     * @var \PHPStan\Reflection\ClassReflection
     */
    private $declaringClass;
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    public function __construct(ClassReflection $declaringClass, Type $type)
    {
        $this->declaringClass = $declaringClass;
        $this->type = $type;
    }
    public function getDeclaringClass() : ClassReflection
    {
        return $this->declaringClass;
    }
    public function isStatic() : bool
    {
        return \false;
    }
    public function isPrivate() : bool
    {
        return \false;
    }
    public function isPublic() : bool
    {
        return \true;
    }
    public function getReadableType() : Type
    {
        return $this->type;
    }
    public function getWritableType() : Type
    {
        return TypeCombinator::union($this->type, new IntegerType(), new FloatType(), new StringType(), new BooleanType());
    }
    public function isReadable() : bool
    {
        return \true;
    }
    public function isWritable() : bool
    {
        return \true;
    }
    public function canChangeTypeAfterAssignment() : bool
    {
        return \false;
    }
    public function isDeprecated() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getDeprecatedDescription() : ?string
    {
        return null;
    }
    public function isInternal() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getDocComment() : ?string
    {
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Php;

use PHPStan\Reflection\Assertions;
use PHPStan\Reflection\ClassMemberReflection;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\FunctionVariantWithPhpDocs;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
class EnumCasesMethodReflection implements ExtendedMethodReflection
{
    /**
     * @var \PHPStan\Reflection\ClassReflection
     */
    private $declaringClass;
    /**
     * @var \PHPStan\Type\Type
     */
    private $returnType;
    public function __construct(ClassReflection $declaringClass, Type $returnType)
    {
        $this->declaringClass = $declaringClass;
        $this->returnType = $returnType;
    }
    public function getDeclaringClass() : ClassReflection
    {
        return $this->declaringClass;
    }
    public function isStatic() : bool
    {
        return \true;
    }
    public function isPrivate() : bool
    {
        return \false;
    }
    public function isPublic() : bool
    {
        return \true;
    }
    public function getDocComment() : ?string
    {
        return null;
    }
    public function getName() : string
    {
        return 'cases';
    }
    public function getPrototype() : ClassMemberReflection
    {
        $unitEnum = $this->declaringClass->getAncestorWithClassName('UnitEnum');
        if ($unitEnum === null) {
            throw new ShouldNotHappenException();
        }
        return $unitEnum->getNativeMethod('cases');
    }
    public function getVariants() : array
    {
        return [new FunctionVariantWithPhpDocs(TemplateTypeMap::createEmpty(), TemplateTypeMap::createEmpty(), [], \false, $this->returnType, new MixedType(), $this->returnType)];
    }
    public function isDeprecated() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getDeprecatedDescription() : ?string
    {
        return null;
    }
    public function isFinal() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
    public function isInternal() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getThrowType() : ?Type
    {
        return null;
    }
    public function hasSideEffects() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getAsserts() : Assertions
    {
        return Assertions::createEmpty();
    }
    public function getSelfOutType() : ?Type
    {
        return null;
    }
    public function returnsByReference() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Php;

use PhpParser\Node;
use PhpParser\Node\Stmt\ClassLike;
use PhpParser\Node\Stmt\Declare_;
use PhpParser\Node\Stmt\Function_;
use PhpParser\Node\Stmt\Namespace_;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionFunction;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionParameter;
use PHPStan\Cache\Cache;
use PHPStan\Parser\FunctionCallStatementFinder;
use PHPStan\Parser\Parser;
use PHPStan\Reflection\Assertions;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\FunctionVariantWithPhpDocs;
use PHPStan\Reflection\InitializerExprTypeResolver;
use PHPStan\Reflection\ParameterReflectionWithPhpDocs;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\Reflection\ParametersAcceptorWithPhpDocs;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
use PHPStan\Type\TypehintHelper;
use function array_map;
use function filemtime;
use function is_file;
use function sprintf;
use function time;
class PhpFunctionReflection implements FunctionReflection
{
    /** @var FunctionVariantWithPhpDocs[]|null */
    private $variants;
    /**
     * @var \PHPStan\Reflection\InitializerExprTypeResolver
     */
    private $initializerExprTypeResolver;
    /**
     * @var \PHPStan\BetterReflection\Reflection\Adapter\ReflectionFunction
     */
    private $reflection;
    /**
     * @var \PHPStan\Parser\Parser
     */
    private $parser;
    /**
     * @var \PHPStan\Parser\FunctionCallStatementFinder
     */
    private $functionCallStatementFinder;
    /**
     * @var \PHPStan\Cache\Cache
     */
    private $cache;
    /**
     * @var \PHPStan\Type\Generic\TemplateTypeMap
     */
    private $templateTypeMap;
    /**
     * @var Type[]
     */
    private $phpDocParameterTypes;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $phpDocReturnType;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $phpDocThrowType;
    /**
     * @var string|null
     */
    private $deprecatedDescription;
    /**
     * @var bool
     */
    private $isDeprecated;
    /**
     * @var bool
     */
    private $isInternal;
    /**
     * @var bool
     */
    private $isFinal;
    /**
     * @var string|null
     */
    private $filename;
    /**
     * @var bool|null
     */
    private $isPure;
    /**
     * @var \PHPStan\Reflection\Assertions
     */
    private $asserts;
    /**
     * @var string|null
     */
    private $phpDocComment;
    /**
     * @var Type[]
     */
    private $phpDocParameterOutTypes;
    /**
     * @param Type[] $phpDocParameterTypes
     * @param Type[] $phpDocParameterOutTypes
     */
    public function __construct(InitializerExprTypeResolver $initializerExprTypeResolver, ReflectionFunction $reflection, Parser $parser, FunctionCallStatementFinder $functionCallStatementFinder, Cache $cache, TemplateTypeMap $templateTypeMap, array $phpDocParameterTypes, ?Type $phpDocReturnType, ?Type $phpDocThrowType, ?string $deprecatedDescription, bool $isDeprecated, bool $isInternal, bool $isFinal, ?string $filename, ?bool $isPure, Assertions $asserts, ?string $phpDocComment, array $phpDocParameterOutTypes)
    {
        $this->initializerExprTypeResolver = $initializerExprTypeResolver;
        $this->reflection = $reflection;
        $this->parser = $parser;
        $this->functionCallStatementFinder = $functionCallStatementFinder;
        $this->cache = $cache;
        $this->templateTypeMap = $templateTypeMap;
        $this->phpDocParameterTypes = $phpDocParameterTypes;
        $this->phpDocReturnType = $phpDocReturnType;
        $this->phpDocThrowType = $phpDocThrowType;
        $this->deprecatedDescription = $deprecatedDescription;
        $this->isDeprecated = $isDeprecated;
        $this->isInternal = $isInternal;
        $this->isFinal = $isFinal;
        $this->filename = $filename;
        $this->isPure = $isPure;
        $this->asserts = $asserts;
        $this->phpDocComment = $phpDocComment;
        $this->phpDocParameterOutTypes = $phpDocParameterOutTypes;
    }
    public function getName() : string
    {
        return $this->reflection->getName();
    }
    public function getFileName() : ?string
    {
        if ($this->filename === null) {
            return null;
        }
        if (!is_file($this->filename)) {
            return null;
        }
        return $this->filename;
    }
    /**
     * @return ParametersAcceptorWithPhpDocs[]
     */
    public function getVariants() : array
    {
        if ($this->variants === null) {
            $this->variants = [new FunctionVariantWithPhpDocs($this->templateTypeMap, null, $this->getParameters(), $this->isVariadic(), $this->getReturnType(), $this->getPhpDocReturnType(), $this->getNativeReturnType())];
        }
        return $this->variants;
    }
    /**
     * @return ParameterReflectionWithPhpDocs[]
     */
    private function getParameters() : array
    {
        return array_map(function (ReflectionParameter $reflection) : \PHPStan\Reflection\Php\PhpParameterReflection {
            return new \PHPStan\Reflection\Php\PhpParameterReflection($this->initializerExprTypeResolver, $reflection, $this->phpDocParameterTypes[$reflection->getName()] ?? null, null, $this->phpDocParameterOutTypes[$reflection->getName()] ?? null);
        }, $this->reflection->getParameters());
    }
    private function isVariadic() : bool
    {
        $isNativelyVariadic = $this->reflection->isVariadic();
        if (!$isNativelyVariadic && $this->reflection->getFileName() !== \false) {
            $fileName = $this->reflection->getFileName();
            if (is_file($fileName)) {
                $functionName = $this->reflection->getName();
                $modifiedTime = filemtime($fileName);
                if ($modifiedTime === \false) {
                    $modifiedTime = time();
                }
                $variableCacheKey = sprintf('%d-v3', $modifiedTime);
                $key = sprintf('variadic-function-%s-%s', $functionName, $fileName);
                $cachedResult = $this->cache->load($key, $variableCacheKey);
                if ($cachedResult === null) {
                    $nodes = $this->parser->parseFile($fileName);
                    $result = $this->callsFuncGetArgs($nodes);
                    $this->cache->save($key, $variableCacheKey, $result);
                    return $result;
                }
                return $cachedResult;
            }
        }
        return $isNativelyVariadic;
    }
    /**
     * @param Node[] $nodes
     */
    private function callsFuncGetArgs(array $nodes) : bool
    {
        foreach ($nodes as $node) {
            if ($node instanceof Function_) {
                $functionName = (string) $node->namespacedName;
                if ($functionName === $this->reflection->getName()) {
                    return $this->functionCallStatementFinder->findFunctionCallInStatements(ParametersAcceptor::VARIADIC_FUNCTIONS, $node->getStmts()) !== null;
                }
                continue;
            }
            if ($node instanceof ClassLike) {
                continue;
            }
            if ($node instanceof Namespace_) {
                if ($this->callsFuncGetArgs($node->stmts)) {
                    return \true;
                }
            }
            if (!$node instanceof Declare_ || $node->stmts === null) {
                continue;
            }
            if ($this->callsFuncGetArgs($node->stmts)) {
                return \true;
            }
        }
        return \false;
    }
    private function getReturnType() : Type
    {
        return TypehintHelper::decideTypeFromReflection($this->reflection->getReturnType(), $this->phpDocReturnType);
    }
    private function getPhpDocReturnType() : Type
    {
        if ($this->phpDocReturnType !== null) {
            return $this->phpDocReturnType;
        }
        return new MixedType();
    }
    private function getNativeReturnType() : Type
    {
        return TypehintHelper::decideTypeFromReflection($this->reflection->getReturnType());
    }
    public function getDeprecatedDescription() : ?string
    {
        if ($this->isDeprecated) {
            return $this->deprecatedDescription;
        }
        return null;
    }
    public function isDeprecated() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->isDeprecated || $this->reflection->isDeprecated());
    }
    public function isInternal() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->isInternal);
    }
    public function isFinal() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->isFinal);
    }
    public function getThrowType() : ?Type
    {
        return $this->phpDocThrowType;
    }
    public function hasSideEffects() : TrinaryLogic
    {
        if ($this->getReturnType()->isVoid()->yes()) {
            return TrinaryLogic::createYes();
        }
        if ($this->isPure !== null) {
            return TrinaryLogic::createFromBoolean(!$this->isPure);
        }
        return TrinaryLogic::createMaybe();
    }
    public function isBuiltin() : bool
    {
        return $this->reflection->isInternal();
    }
    public function getAsserts() : Assertions
    {
        return $this->asserts;
    }
    public function getDocComment() : ?string
    {
        return $this->phpDocComment;
    }
    public function returnsByReference() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->reflection->returnsReference());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Php;

use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Type;
class UniversalObjectCrateProperty implements PropertyReflection
{
    /**
     * @var \PHPStan\Reflection\ClassReflection
     */
    private $declaringClass;
    /**
     * @var \PHPStan\Type\Type
     */
    private $readableType;
    /**
     * @var \PHPStan\Type\Type
     */
    private $writableType;
    public function __construct(ClassReflection $declaringClass, Type $readableType, Type $writableType)
    {
        $this->declaringClass = $declaringClass;
        $this->readableType = $readableType;
        $this->writableType = $writableType;
    }
    public function getDeclaringClass() : ClassReflection
    {
        return $this->declaringClass;
    }
    public function isStatic() : bool
    {
        return \false;
    }
    public function isPrivate() : bool
    {
        return \false;
    }
    public function isPublic() : bool
    {
        return \true;
    }
    public function getReadableType() : Type
    {
        return $this->readableType;
    }
    public function getWritableType() : Type
    {
        return $this->writableType;
    }
    public function canChangeTypeAfterAssignment() : bool
    {
        return \true;
    }
    public function isReadable() : bool
    {
        return \true;
    }
    public function isWritable() : bool
    {
        return \true;
    }
    public function isDeprecated() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getDeprecatedDescription() : ?string
    {
        return null;
    }
    public function isInternal() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getDocComment() : ?string
    {
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Php;

use PHPStan\BetterReflection\Reflection\Adapter\ReflectionParameter;
use PHPStan\Reflection\InitializerExprContext;
use PHPStan\Reflection\InitializerExprTypeResolver;
use PHPStan\Reflection\ParameterReflectionWithPhpDocs;
use PHPStan\Reflection\PassedByReference;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypehintHelper;
class PhpParameterReflection implements ParameterReflectionWithPhpDocs
{
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $type;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $nativeType;
    /**
     * @var \PHPStan\Reflection\InitializerExprTypeResolver
     */
    private $initializerExprTypeResolver;
    /**
     * @var \PHPStan\BetterReflection\Reflection\Adapter\ReflectionParameter
     */
    private $reflection;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $phpDocType;
    /**
     * @var string|null
     */
    private $declaringClassName;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $outType;
    public function __construct(InitializerExprTypeResolver $initializerExprTypeResolver, ReflectionParameter $reflection, ?Type $phpDocType, ?string $declaringClassName, ?Type $outType)
    {
        $this->initializerExprTypeResolver = $initializerExprTypeResolver;
        $this->reflection = $reflection;
        $this->phpDocType = $phpDocType;
        $this->declaringClassName = $declaringClassName;
        $this->outType = $outType;
    }
    public function isOptional() : bool
    {
        return $this->reflection->isOptional();
    }
    public function getName() : string
    {
        return $this->reflection->getName();
    }
    public function getType() : Type
    {
        if ($this->type === null) {
            $phpDocType = $this->phpDocType;
            if ($phpDocType !== null && $this->reflection->isDefaultValueAvailable()) {
                $defaultValueType = $this->initializerExprTypeResolver->getType($this->reflection->getDefaultValueExpression(), InitializerExprContext::fromReflectionParameter($this->reflection));
                if ($defaultValueType->isNull()->yes()) {
                    $phpDocType = TypeCombinator::addNull($phpDocType);
                }
            }
            $this->type = TypehintHelper::decideTypeFromReflection($this->reflection->getType(), $phpDocType, $this->declaringClassName, $this->isVariadic());
        }
        return $this->type;
    }
    public function passedByReference() : PassedByReference
    {
        return $this->reflection->isPassedByReference() ? PassedByReference::createCreatesNewVariable() : PassedByReference::createNo();
    }
    public function isVariadic() : bool
    {
        return $this->reflection->isVariadic();
    }
    public function getPhpDocType() : Type
    {
        if ($this->phpDocType !== null) {
            return $this->phpDocType;
        }
        return new MixedType();
    }
    public function getNativeType() : Type
    {
        if ($this->nativeType === null) {
            $this->nativeType = TypehintHelper::decideTypeFromReflection($this->reflection->getType(), null, $this->declaringClassName, $this->isVariadic());
        }
        return $this->nativeType;
    }
    public function getDefaultValue() : ?Type
    {
        if ($this->reflection->isDefaultValueAvailable()) {
            return $this->initializerExprTypeResolver->getType($this->reflection->getDefaultValueExpression(), InitializerExprContext::fromReflectionParameter($this->reflection));
        }
        return null;
    }
    public function getOutType() : ?Type
    {
        return $this->outType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Php;

use PHPStan\Reflection\ParameterReflection;
use PHPStan\Reflection\PassedByReference;
use PHPStan\Type\Type;
class DummyParameter implements ParameterReflection
{
    /**
     * @var \PHPStan\Reflection\PassedByReference
     */
    private $passedByReference;
    /**
     * @var string
     */
    private $name;
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    /**
     * @var bool
     */
    private $optional;
    /**
     * @var bool
     */
    private $variadic;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $defaultValue;
    public function __construct(string $name, Type $type, bool $optional, ?PassedByReference $passedByReference, bool $variadic, ?Type $defaultValue)
    {
        $this->name = $name;
        $this->type = $type;
        $this->optional = $optional;
        $this->variadic = $variadic;
        $this->defaultValue = $defaultValue;
        $this->passedByReference = $passedByReference ?? PassedByReference::createNo();
    }
    public function getName() : string
    {
        return $this->name;
    }
    public function isOptional() : bool
    {
        return $this->optional;
    }
    public function getType() : Type
    {
        return $this->type;
    }
    public function passedByReference() : PassedByReference
    {
        return $this->passedByReference;
    }
    public function isVariadic() : bool
    {
        return $this->variadic;
    }
    public function getDefaultValue() : ?Type
    {
        return $this->defaultValue;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Php;

use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Type;
class EnumPropertyReflection implements PropertyReflection
{
    /**
     * @var \PHPStan\Reflection\ClassReflection
     */
    private $declaringClass;
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    public function __construct(ClassReflection $declaringClass, Type $type)
    {
        $this->declaringClass = $declaringClass;
        $this->type = $type;
    }
    public function getDeclaringClass() : ClassReflection
    {
        return $this->declaringClass;
    }
    public function isStatic() : bool
    {
        return \false;
    }
    public function isPrivate() : bool
    {
        return \false;
    }
    public function isPublic() : bool
    {
        return \true;
    }
    public function getDocComment() : ?string
    {
        return null;
    }
    public function getReadableType() : Type
    {
        return $this->type;
    }
    public function getWritableType() : Type
    {
        return $this->type;
    }
    public function canChangeTypeAfterAssignment() : bool
    {
        return \true;
    }
    public function isReadable() : bool
    {
        return \true;
    }
    public function isWritable() : bool
    {
        return \false;
    }
    public function isDeprecated() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getDeprecatedDescription() : ?string
    {
        return null;
    }
    public function isInternal() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Php;

use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnum;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionIntersectionType;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionParameter;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionUnionType;
use PHPStan\TrinaryLogic;
use ReflectionException;
class FakeBuiltinMethodReflection implements \PHPStan\Reflection\Php\BuiltinMethodReflection
{
    /**
     * @var string
     */
    private $methodName;
    /**
     * @var \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnum
     */
    private $declaringClass;
    /**
     * @param \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnum $declaringClass
     */
    public function __construct(string $methodName, $declaringClass)
    {
        $this->methodName = $methodName;
        $this->declaringClass = $declaringClass;
    }
    public function getName() : string
    {
        return $this->methodName;
    }
    public function getReflection() : ?ReflectionMethod
    {
        return null;
    }
    public function getFileName() : ?string
    {
        return null;
    }
    /**
     * @return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnum
     */
    public function getDeclaringClass()
    {
        return $this->declaringClass;
    }
    public function getStartLine() : ?int
    {
        return null;
    }
    public function getEndLine() : ?int
    {
        return null;
    }
    public function getDocComment() : ?string
    {
        return null;
    }
    public function isStatic() : bool
    {
        return \false;
    }
    public function isPrivate() : bool
    {
        return \false;
    }
    public function isPublic() : bool
    {
        return \true;
    }
    public function getPrototype() : \PHPStan\Reflection\Php\BuiltinMethodReflection
    {
        throw new ReflectionException();
    }
    public function isDeprecated() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isVariadic() : bool
    {
        return \false;
    }
    public function isFinal() : bool
    {
        return \false;
    }
    public function isInternal() : bool
    {
        return \false;
    }
    public function isAbstract() : bool
    {
        return \false;
    }
    /**
     * @return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionIntersectionType|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionUnionType|null
     */
    public function getReturnType()
    {
        return null;
    }
    /**
     * @return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionIntersectionType|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionUnionType|null
     */
    public function getTentativeReturnType()
    {
        return null;
    }
    /**
     * @return ReflectionParameter[]
     */
    public function getParameters() : array
    {
        return [];
    }
    public function returnsByReference() : TrinaryLogic
    {
        return TrinaryLogic::createMaybe();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Php;

use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnum;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionIntersectionType;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionParameter;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionUnionType;
use PHPStan\TrinaryLogic;
interface BuiltinMethodReflection
{
    public function getName() : string;
    public function getReflection() : ?ReflectionMethod;
    public function getFileName() : ?string;
    /**
     * @return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnum
     */
    public function getDeclaringClass();
    public function getStartLine() : ?int;
    public function getEndLine() : ?int;
    public function getDocComment() : ?string;
    public function isStatic() : bool;
    public function isPrivate() : bool;
    public function isPublic() : bool;
    public function getPrototype() : self;
    public function isDeprecated() : TrinaryLogic;
    public function isVariadic() : bool;
    /**
     * @return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionIntersectionType|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionUnionType|null
     */
    public function getReturnType();
    /**
     * @return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionIntersectionType|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionUnionType|null
     */
    public function getTentativeReturnType();
    /**
     * @return ReflectionParameter[]
     */
    public function getParameters() : array;
    public function isFinal() : bool;
    public function isInternal() : bool;
    public function isAbstract() : bool;
    public function returnsByReference() : TrinaryLogic;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Php;

use PHPStan\Reflection\ParameterReflectionWithPhpDocs;
use PHPStan\Reflection\PassedByReference;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypehintHelper;
class PhpParameterFromParserNodeReflection implements ParameterReflectionWithPhpDocs
{
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $type;
    /**
     * @var string
     */
    private $name;
    /**
     * @var bool
     */
    private $optional;
    /**
     * @var \PHPStan\Type\Type
     */
    private $realType;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $phpDocType;
    /**
     * @var \PHPStan\Reflection\PassedByReference
     */
    private $passedByReference;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $defaultValue;
    /**
     * @var bool
     */
    private $variadic;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $outType;
    public function __construct(string $name, bool $optional, Type $realType, ?Type $phpDocType, PassedByReference $passedByReference, ?Type $defaultValue, bool $variadic, ?Type $outType)
    {
        $this->name = $name;
        $this->optional = $optional;
        $this->realType = $realType;
        $this->phpDocType = $phpDocType;
        $this->passedByReference = $passedByReference;
        $this->defaultValue = $defaultValue;
        $this->variadic = $variadic;
        $this->outType = $outType;
    }
    public function getName() : string
    {
        return $this->name;
    }
    public function isOptional() : bool
    {
        return $this->optional;
    }
    public function getType() : Type
    {
        if ($this->type === null) {
            $phpDocType = $this->phpDocType;
            if ($phpDocType !== null && $this->defaultValue !== null) {
                if ($this->defaultValue->isNull()->yes()) {
                    $inferred = $phpDocType->inferTemplateTypes($this->defaultValue);
                    if ($inferred->isEmpty()) {
                        $phpDocType = TypeCombinator::addNull($phpDocType);
                    }
                }
            }
            $this->type = TypehintHelper::decideType($this->realType, $phpDocType);
        }
        return $this->type;
    }
    public function getPhpDocType() : Type
    {
        return $this->phpDocType ?? new MixedType();
    }
    public function getNativeType() : Type
    {
        return $this->realType;
    }
    public function passedByReference() : PassedByReference
    {
        return $this->passedByReference;
    }
    public function isVariadic() : bool
    {
        return $this->variadic;
    }
    public function getDefaultValue() : ?Type
    {
        return $this->defaultValue;
    }
    public function getOutType() : ?Type
    {
        return $this->outType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Php\Soap;

use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\MethodsClassReflectionExtension;
class SoapClientMethodsClassReflectionExtension implements MethodsClassReflectionExtension
{
    public function hasMethod(ClassReflection $classReflection, string $methodName) : bool
    {
        return $classReflection->getName() === 'SoapClient' || $classReflection->isSubclassOf('SoapClient');
    }
    public function getMethod(ClassReflection $classReflection, string $methodName) : MethodReflection
    {
        return new \PHPStan\Reflection\Php\Soap\SoapClientMethodReflection($classReflection, $methodName);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Php\Soap;

use PHPStan\Reflection\ClassMemberReflection;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\FunctionVariant;
use PHPStan\Reflection\MethodReflection;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\MixedType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
class SoapClientMethodReflection implements MethodReflection
{
    /**
     * @var \PHPStan\Reflection\ClassReflection
     */
    private $declaringClass;
    /**
     * @var string
     */
    private $name;
    public function __construct(ClassReflection $declaringClass, string $name)
    {
        $this->declaringClass = $declaringClass;
        $this->name = $name;
    }
    public function getDeclaringClass() : ClassReflection
    {
        return $this->declaringClass;
    }
    public function isStatic() : bool
    {
        return \false;
    }
    public function isPrivate() : bool
    {
        return \false;
    }
    public function isPublic() : bool
    {
        return \true;
    }
    public function getDocComment() : ?string
    {
        return null;
    }
    public function getName() : string
    {
        return $this->name;
    }
    public function getPrototype() : ClassMemberReflection
    {
        return $this;
    }
    public function getVariants() : array
    {
        return [new FunctionVariant(TemplateTypeMap::createEmpty(), TemplateTypeMap::createEmpty(), [], \true, new MixedType(\true))];
    }
    public function isDeprecated() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getDeprecatedDescription() : ?string
    {
        return null;
    }
    public function isFinal() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function isInternal() : TrinaryLogic
    {
        return TrinaryLogic::createNo();
    }
    public function getThrowType() : ?Type
    {
        return new ObjectType('SoapFault');
    }
    public function hasSideEffects() : TrinaryLogic
    {
        return TrinaryLogic::createYes();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Php;

use PHPStan\Reflection\Assertions;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\Type;
interface PhpMethodReflectionFactory
{
    /**
     * @param Type[] $phpDocParameterTypes
     * @param Type[] $phpDocParameterOutTypes
     */
    public function create(ClassReflection $declaringClass, ?ClassReflection $declaringTrait, \PHPStan\Reflection\Php\BuiltinMethodReflection $reflection, TemplateTypeMap $templateTypeMap, array $phpDocParameterTypes, ?Type $phpDocReturnType, ?Type $phpDocThrowType, ?string $deprecatedDescription, bool $isDeprecated, bool $isInternal, bool $isFinal, ?bool $isPure, Assertions $asserts, ?Type $selfOutType, ?string $phpDocComment, array $phpDocParameterOutTypes) : \PHPStan\Reflection\Php\PhpMethodReflection;
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Php;

use PHPStan\BetterReflection\Reflection\Adapter\ReflectionIntersectionType;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionUnionType;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\TrinaryLogic;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
use PHPStan\Type\TypehintHelper;
/** @api */
class PhpPropertyReflection implements PropertyReflection
{
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $finalNativeType;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $type;
    /**
     * @var \PHPStan\Reflection\ClassReflection
     */
    private $declaringClass;
    /**
     * @var \PHPStan\Reflection\ClassReflection|null
     */
    private $declaringTrait;
    /**
     * @var \PHPStan\BetterReflection\Reflection\Adapter\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionIntersectionType|null
     */
    private $nativeType;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $phpDocType;
    /**
     * @var \PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty
     */
    private $reflection;
    /**
     * @var string|null
     */
    private $deprecatedDescription;
    /**
     * @var bool
     */
    private $isDeprecated;
    /**
     * @var bool
     */
    private $isInternal;
    /**
     * @var bool
     */
    private $isReadOnlyByPhpDoc;
    /**
     * @var bool
     */
    private $isAllowedPrivateMutation;
    /**
     * @param \PHPStan\BetterReflection\Reflection\Adapter\ReflectionUnionType|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionIntersectionType|null $nativeType
     */
    public function __construct(ClassReflection $declaringClass, ?ClassReflection $declaringTrait, $nativeType, ?Type $phpDocType, ReflectionProperty $reflection, ?string $deprecatedDescription, bool $isDeprecated, bool $isInternal, bool $isReadOnlyByPhpDoc, bool $isAllowedPrivateMutation)
    {
        $this->declaringClass = $declaringClass;
        $this->declaringTrait = $declaringTrait;
        $this->nativeType = $nativeType;
        $this->phpDocType = $phpDocType;
        $this->reflection = $reflection;
        $this->deprecatedDescription = $deprecatedDescription;
        $this->isDeprecated = $isDeprecated;
        $this->isInternal = $isInternal;
        $this->isReadOnlyByPhpDoc = $isReadOnlyByPhpDoc;
        $this->isAllowedPrivateMutation = $isAllowedPrivateMutation;
    }
    public function getDeclaringClass() : ClassReflection
    {
        return $this->declaringClass;
    }
    public function getDeclaringTrait() : ?ClassReflection
    {
        return $this->declaringTrait;
    }
    public function getDocComment() : ?string
    {
        $docComment = $this->reflection->getDocComment();
        if ($docComment === \false) {
            return null;
        }
        return $docComment;
    }
    public function isStatic() : bool
    {
        return $this->reflection->isStatic();
    }
    public function isPrivate() : bool
    {
        return $this->reflection->isPrivate();
    }
    public function isPublic() : bool
    {
        return $this->reflection->isPublic();
    }
    public function isReadOnly() : bool
    {
        return $this->reflection->isReadOnly();
    }
    public function isReadOnlyByPhpDoc() : bool
    {
        return $this->isReadOnlyByPhpDoc;
    }
    public function getReadableType() : Type
    {
        if ($this->type === null) {
            $this->type = TypehintHelper::decideTypeFromReflection($this->nativeType, $this->phpDocType, $this->declaringClass);
        }
        return $this->type;
    }
    public function getWritableType() : Type
    {
        return $this->getReadableType();
    }
    public function canChangeTypeAfterAssignment() : bool
    {
        return \true;
    }
    public function isPromoted() : bool
    {
        return $this->reflection->isPromoted();
    }
    public function hasPhpDocType() : bool
    {
        return $this->phpDocType !== null;
    }
    public function getPhpDocType() : Type
    {
        if ($this->phpDocType !== null) {
            return $this->phpDocType;
        }
        return new MixedType();
    }
    public function hasNativeType() : bool
    {
        return $this->nativeType !== null;
    }
    public function getNativeType() : Type
    {
        if ($this->finalNativeType === null) {
            $this->finalNativeType = TypehintHelper::decideTypeFromReflection($this->nativeType, null, $this->declaringClass);
        }
        return $this->finalNativeType;
    }
    public function isReadable() : bool
    {
        return \true;
    }
    public function isWritable() : bool
    {
        return \true;
    }
    public function getDeprecatedDescription() : ?string
    {
        if ($this->isDeprecated) {
            return $this->deprecatedDescription;
        }
        return null;
    }
    public function isDeprecated() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->isDeprecated);
    }
    public function isInternal() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->isInternal);
    }
    public function isAllowedPrivateMutation() : bool
    {
        return $this->isAllowedPrivateMutation;
    }
    public function getNativeReflection() : ReflectionProperty
    {
        return $this->reflection;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Php;

use PhpParser\Node;
use PhpParser\Node\Expr\Variable;
use PhpParser\Node\FunctionLike;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Function_;
use PHPStan\Reflection\Assertions;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\FunctionVariantWithPhpDocs;
use PHPStan\Reflection\ParameterReflectionWithPhpDocs;
use PHPStan\Reflection\ParametersAcceptorWithPhpDocs;
use PHPStan\Reflection\PassedByReference;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
use PHPStan\Type\TypehintHelper;
use function array_reverse;
use function is_array;
use function is_string;
/**
 * @api
 */
class PhpFunctionFromParserNodeReflection implements FunctionReflection
{
    /** @var Function_|ClassMethod */
    private $functionLike;
    /** @var FunctionVariantWithPhpDocs[]|null */
    private $variants;
    /**
     * @var string
     */
    private $fileName;
    /**
     * @var \PHPStan\Type\Generic\TemplateTypeMap
     */
    private $templateTypeMap;
    /**
     * @var Type[]
     */
    private $realParameterTypes;
    /**
     * @var Type[]
     */
    private $phpDocParameterTypes;
    /**
     * @var Type[]
     */
    private $realParameterDefaultValues;
    /**
     * @var \PHPStan\Type\Type
     */
    private $realReturnType;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $phpDocReturnType;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $throwType;
    /**
     * @var string|null
     */
    private $deprecatedDescription;
    /**
     * @var bool
     */
    private $isDeprecated;
    /**
     * @var bool
     */
    private $isInternal;
    /**
     * @var bool
     */
    private $isFinal;
    /**
     * @var bool|null
     */
    private $isPure;
    /**
     * @var bool
     */
    private $acceptsNamedArguments;
    /**
     * @var \PHPStan\Reflection\Assertions
     */
    private $assertions;
    /**
     * @var string|null
     */
    private $phpDocComment;
    /**
     * @var Type[]
     */
    private $parameterOutTypes;
    /**
     * @param Function_|ClassMethod $functionLike
     * @param Type[] $realParameterTypes
     * @param Type[] $phpDocParameterTypes
     * @param Type[] $realParameterDefaultValues
     * @param Type[] $parameterOutTypes
     */
    public function __construct(FunctionLike $functionLike, string $fileName, TemplateTypeMap $templateTypeMap, array $realParameterTypes, array $phpDocParameterTypes, array $realParameterDefaultValues, Type $realReturnType, ?Type $phpDocReturnType, ?Type $throwType, ?string $deprecatedDescription, bool $isDeprecated, bool $isInternal, bool $isFinal, ?bool $isPure, bool $acceptsNamedArguments, Assertions $assertions, ?string $phpDocComment, array $parameterOutTypes)
    {
        $this->fileName = $fileName;
        $this->templateTypeMap = $templateTypeMap;
        $this->realParameterTypes = $realParameterTypes;
        $this->phpDocParameterTypes = $phpDocParameterTypes;
        $this->realParameterDefaultValues = $realParameterDefaultValues;
        $this->realReturnType = $realReturnType;
        $this->phpDocReturnType = $phpDocReturnType;
        $this->throwType = $throwType;
        $this->deprecatedDescription = $deprecatedDescription;
        $this->isDeprecated = $isDeprecated;
        $this->isInternal = $isInternal;
        $this->isFinal = $isFinal;
        $this->isPure = $isPure;
        $this->acceptsNamedArguments = $acceptsNamedArguments;
        $this->assertions = $assertions;
        $this->phpDocComment = $phpDocComment;
        $this->parameterOutTypes = $parameterOutTypes;
        $this->functionLike = $functionLike;
    }
    protected function getFunctionLike() : FunctionLike
    {
        return $this->functionLike;
    }
    public function getFileName() : string
    {
        return $this->fileName;
    }
    public function getName() : string
    {
        if ($this->functionLike instanceof ClassMethod) {
            return $this->functionLike->name->name;
        }
        if ($this->functionLike->namespacedName === null) {
            throw new ShouldNotHappenException();
        }
        return (string) $this->functionLike->namespacedName;
    }
    /**
     * @return ParametersAcceptorWithPhpDocs[]
     */
    public function getVariants() : array
    {
        if ($this->variants === null) {
            $this->variants = [new FunctionVariantWithPhpDocs($this->templateTypeMap, null, $this->getParameters(), $this->isVariadic(), $this->getReturnType(), $this->phpDocReturnType ?? new MixedType(), $this->realReturnType)];
        }
        return $this->variants;
    }
    /**
     * @return ParameterReflectionWithPhpDocs[]
     */
    private function getParameters() : array
    {
        $parameters = [];
        $isOptional = \true;
        /** @var Node\Param $parameter */
        foreach (array_reverse($this->functionLike->getParams()) as $parameter) {
            if ($parameter->default === null && !$parameter->variadic) {
                $isOptional = \false;
            }
            if (!$parameter->var instanceof Variable || !is_string($parameter->var->name)) {
                throw new ShouldNotHappenException();
            }
            $parameters[] = new \PHPStan\Reflection\Php\PhpParameterFromParserNodeReflection($parameter->var->name, $isOptional, $this->realParameterTypes[$parameter->var->name], $this->phpDocParameterTypes[$parameter->var->name] ?? null, $parameter->byRef ? PassedByReference::createCreatesNewVariable() : PassedByReference::createNo(), $this->realParameterDefaultValues[$parameter->var->name] ?? null, $parameter->variadic, $this->parameterOutTypes[$parameter->var->name] ?? null);
        }
        return array_reverse($parameters);
    }
    private function isVariadic() : bool
    {
        foreach ($this->functionLike->getParams() as $parameter) {
            if ($parameter->variadic) {
                return \true;
            }
        }
        return \false;
    }
    private function getReturnType() : Type
    {
        return TypehintHelper::decideType($this->realReturnType, $this->phpDocReturnType);
    }
    public function getDeprecatedDescription() : ?string
    {
        if ($this->isDeprecated) {
            return $this->deprecatedDescription;
        }
        return null;
    }
    public function isDeprecated() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->isDeprecated);
    }
    public function isInternal() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->isInternal);
    }
    public function isFinal() : TrinaryLogic
    {
        $finalMethod = \false;
        if ($this->functionLike instanceof ClassMethod) {
            $finalMethod = $this->functionLike->isFinal();
        }
        return TrinaryLogic::createFromBoolean($finalMethod || $this->isFinal);
    }
    public function getThrowType() : ?Type
    {
        return $this->throwType;
    }
    public function hasSideEffects() : TrinaryLogic
    {
        if ($this->getReturnType()->isVoid()->yes()) {
            return TrinaryLogic::createYes();
        }
        if ($this->isPure !== null) {
            return TrinaryLogic::createFromBoolean(!$this->isPure);
        }
        return TrinaryLogic::createMaybe();
    }
    public function isBuiltin() : bool
    {
        return \false;
    }
    public function isGenerator() : bool
    {
        return $this->nodeIsOrContainsYield($this->functionLike);
    }
    public function acceptsNamedArguments() : bool
    {
        return $this->acceptsNamedArguments;
    }
    private function nodeIsOrContainsYield(Node $node) : bool
    {
        if ($node instanceof Node\Expr\Yield_) {
            return \true;
        }
        if ($node instanceof Node\Expr\YieldFrom) {
            return \true;
        }
        foreach ($node->getSubNodeNames() as $nodeName) {
            $nodeProperty = $node->{$nodeName};
            if ($nodeProperty instanceof Node && $this->nodeIsOrContainsYield($nodeProperty)) {
                return \true;
            }
            if (!is_array($nodeProperty)) {
                continue;
            }
            foreach ($nodeProperty as $nodePropertyArrayItem) {
                if ($nodePropertyArrayItem instanceof Node && $this->nodeIsOrContainsYield($nodePropertyArrayItem)) {
                    return \true;
                }
            }
        }
        return \false;
    }
    public function getAsserts() : Assertions
    {
        return $this->assertions;
    }
    public function getDocComment() : ?string
    {
        return $this->phpDocComment;
    }
    public function returnsByReference() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->functionLike->returnsByRef());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Php;

use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnum;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionIntersectionType;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionParameter;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionUnionType;
use PHPStan\TrinaryLogic;
class NativeBuiltinMethodReflection implements \PHPStan\Reflection\Php\BuiltinMethodReflection
{
    /**
     * @var \PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod
     */
    private $reflection;
    public function __construct(ReflectionMethod $reflection)
    {
        $this->reflection = $reflection;
    }
    public function getName() : string
    {
        return $this->reflection->getName();
    }
    public function getReflection() : ?ReflectionMethod
    {
        return $this->reflection;
    }
    public function getFileName() : ?string
    {
        $fileName = $this->reflection->getFileName();
        if ($fileName === \false) {
            return null;
        }
        return $fileName;
    }
    /**
     * @return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionClass|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnum
     */
    public function getDeclaringClass()
    {
        return $this->reflection->getDeclaringClass();
    }
    public function getStartLine() : ?int
    {
        $line = $this->reflection->getStartLine();
        if ($line === \false) {
            return null;
        }
        return $line;
    }
    public function getEndLine() : ?int
    {
        $line = $this->reflection->getEndLine();
        if ($line === \false) {
            return null;
        }
        return $line;
    }
    public function getDocComment() : ?string
    {
        $docComment = $this->reflection->getDocComment();
        if ($docComment === \false) {
            return null;
        }
        return $docComment;
    }
    public function isStatic() : bool
    {
        return $this->reflection->isStatic();
    }
    public function isPrivate() : bool
    {
        return $this->reflection->isPrivate();
    }
    public function isPublic() : bool
    {
        return $this->reflection->isPublic();
    }
    public function isConstructor() : bool
    {
        return $this->reflection->isConstructor();
    }
    public function getPrototype() : \PHPStan\Reflection\Php\BuiltinMethodReflection
    {
        return new self($this->reflection->getPrototype());
    }
    public function isDeprecated() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->reflection->isDeprecated());
    }
    public function isFinal() : bool
    {
        return $this->reflection->isFinal();
    }
    public function isInternal() : bool
    {
        return $this->reflection->isInternal();
    }
    public function isAbstract() : bool
    {
        return $this->reflection->isAbstract();
    }
    public function isVariadic() : bool
    {
        return $this->reflection->isVariadic();
    }
    /**
     * @return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionIntersectionType|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionUnionType|null
     */
    public function getReturnType()
    {
        return $this->reflection->getReturnType();
    }
    /**
     * @return \PHPStan\BetterReflection\Reflection\Adapter\ReflectionIntersectionType|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType|\PHPStan\BetterReflection\Reflection\Adapter\ReflectionUnionType|null
     */
    public function getTentativeReturnType()
    {
        return $this->reflection->getTentativeReturnType();
    }
    /**
     * @return ReflectionParameter[]
     */
    public function getParameters() : array
    {
        return $this->reflection->getParameters();
    }
    public function returnsByReference() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->reflection->returnsReference());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Php;

use PHPStan\Reflection\Assertions;
use PHPStan\Reflection\ClassMemberReflection;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\FunctionVariantWithPhpDocs;
use PHPStan\Reflection\Native\NativeParameterReflection;
use PHPStan\Reflection\ParameterReflection;
use PHPStan\Reflection\ParameterReflectionWithPhpDocs;
use PHPStan\Reflection\PassedByReference;
use PHPStan\TrinaryLogic;
use PHPStan\Type\ClosureType;
use PHPStan\Type\MixedType;
use PHPStan\Type\ObjectWithoutClassType;
use PHPStan\Type\Type;
use function array_map;
use function array_unshift;
final class ClosureCallMethodReflection implements ExtendedMethodReflection
{
    /**
     * @var \PHPStan\Reflection\ExtendedMethodReflection
     */
    private $nativeMethodReflection;
    /**
     * @var \PHPStan\Type\ClosureType
     */
    private $closureType;
    public function __construct(ExtendedMethodReflection $nativeMethodReflection, ClosureType $closureType)
    {
        $this->nativeMethodReflection = $nativeMethodReflection;
        $this->closureType = $closureType;
    }
    public function getDeclaringClass() : ClassReflection
    {
        return $this->nativeMethodReflection->getDeclaringClass();
    }
    public function isStatic() : bool
    {
        return $this->nativeMethodReflection->isStatic();
    }
    public function isPrivate() : bool
    {
        return $this->nativeMethodReflection->isPrivate();
    }
    public function isPublic() : bool
    {
        return $this->nativeMethodReflection->isPublic();
    }
    public function getDocComment() : ?string
    {
        return $this->nativeMethodReflection->getDocComment();
    }
    public function getName() : string
    {
        return $this->nativeMethodReflection->getName();
    }
    public function getPrototype() : ClassMemberReflection
    {
        return $this->nativeMethodReflection->getPrototype();
    }
    public function getVariants() : array
    {
        $parameters = $this->closureType->getParameters();
        $newThis = new NativeParameterReflection('newThis', \false, new ObjectWithoutClassType(), PassedByReference::createNo(), \false, null);
        array_unshift($parameters, $newThis);
        return [new FunctionVariantWithPhpDocs($this->closureType->getTemplateTypeMap(), $this->closureType->getResolvedTemplateTypeMap(), array_map(static function (ParameterReflection $parameter) : ParameterReflectionWithPhpDocs {
            return new \PHPStan\Reflection\Php\DummyParameterWithPhpDocs($parameter->getName(), $parameter->getType(), $parameter->isOptional(), $parameter->passedByReference(), $parameter->isVariadic(), $parameter->getDefaultValue(), new MixedType(), $parameter->getType(), null);
        }, $parameters), $this->closureType->isVariadic(), $this->closureType->getReturnType(), $this->closureType->getReturnType(), new MixedType())];
    }
    public function isDeprecated() : TrinaryLogic
    {
        return $this->nativeMethodReflection->isDeprecated();
    }
    public function getDeprecatedDescription() : ?string
    {
        return $this->nativeMethodReflection->getDeprecatedDescription();
    }
    public function isFinal() : TrinaryLogic
    {
        return $this->nativeMethodReflection->isFinal();
    }
    public function isInternal() : TrinaryLogic
    {
        return $this->nativeMethodReflection->isInternal();
    }
    public function getThrowType() : ?Type
    {
        return $this->nativeMethodReflection->getThrowType();
    }
    public function hasSideEffects() : TrinaryLogic
    {
        return $this->nativeMethodReflection->hasSideEffects();
    }
    public function getAsserts() : Assertions
    {
        return $this->nativeMethodReflection->getAsserts();
    }
    public function getSelfOutType() : ?Type
    {
        return $this->nativeMethodReflection->getSelfOutType();
    }
    public function returnsByReference() : TrinaryLogic
    {
        return $this->nativeMethodReflection->returnsByReference();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Php;

use PhpParser\Node;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Declare_;
use PhpParser\Node\Stmt\Function_;
use PhpParser\Node\Stmt\Namespace_;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionParameter;
use PHPStan\Cache\Cache;
use PHPStan\Parser\FunctionCallStatementFinder;
use PHPStan\Parser\Parser;
use PHPStan\Reflection\Assertions;
use PHPStan\Reflection\ClassMemberReflection;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\FunctionVariantWithPhpDocs;
use PHPStan\Reflection\InitializerExprTypeResolver;
use PHPStan\Reflection\MethodPrototypeReflection;
use PHPStan\Reflection\ParameterReflectionWithPhpDocs;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\Reflection\ParametersAcceptorWithPhpDocs;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\TrinaryLogic;
use PHPStan\Type\ArrayType;
use PHPStan\Type\BooleanType;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\IntegerType;
use PHPStan\Type\MixedType;
use PHPStan\Type\ObjectWithoutClassType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypehintHelper;
use PHPStan\Type\VoidType;
use ReflectionException;
use function array_map;
use function explode;
use function filemtime;
use function is_bool;
use function sprintf;
use function strtolower;
use function time;
use const PHP_VERSION_ID;
/** @api */
class PhpMethodReflection implements ExtendedMethodReflection
{
    /** @var PhpParameterReflection[]|null */
    private $parameters;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $returnType;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $nativeReturnType;
    /** @var FunctionVariantWithPhpDocs[]|null */
    private $variants;
    /**
     * @var \PHPStan\Reflection\InitializerExprTypeResolver
     */
    private $initializerExprTypeResolver;
    /**
     * @var \PHPStan\Reflection\ClassReflection
     */
    private $declaringClass;
    /**
     * @var \PHPStan\Reflection\ClassReflection|null
     */
    private $declaringTrait;
    /**
     * @var \PHPStan\Reflection\Php\BuiltinMethodReflection
     */
    private $reflection;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Parser\Parser
     */
    private $parser;
    /**
     * @var \PHPStan\Parser\FunctionCallStatementFinder
     */
    private $functionCallStatementFinder;
    /**
     * @var \PHPStan\Cache\Cache
     */
    private $cache;
    /**
     * @var \PHPStan\Type\Generic\TemplateTypeMap
     */
    private $templateTypeMap;
    /**
     * @var Type[]
     */
    private $phpDocParameterTypes;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $phpDocReturnType;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $phpDocThrowType;
    /**
     * @var string|null
     */
    private $deprecatedDescription;
    /**
     * @var bool
     */
    private $isDeprecated;
    /**
     * @var bool
     */
    private $isInternal;
    /**
     * @var bool
     */
    private $isFinal;
    /**
     * @var bool|null
     */
    private $isPure;
    /**
     * @var \PHPStan\Reflection\Assertions
     */
    private $asserts;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $selfOutType;
    /**
     * @var string|null
     */
    private $phpDocComment;
    /**
     * @var Type[]
     */
    private $phpDocParameterOutTypes;
    /**
     * @param Type[] $phpDocParameterTypes
     * @param Type[] $phpDocParameterOutTypes
     */
    public function __construct(InitializerExprTypeResolver $initializerExprTypeResolver, ClassReflection $declaringClass, ?ClassReflection $declaringTrait, \PHPStan\Reflection\Php\BuiltinMethodReflection $reflection, ReflectionProvider $reflectionProvider, Parser $parser, FunctionCallStatementFinder $functionCallStatementFinder, Cache $cache, TemplateTypeMap $templateTypeMap, array $phpDocParameterTypes, ?Type $phpDocReturnType, ?Type $phpDocThrowType, ?string $deprecatedDescription, bool $isDeprecated, bool $isInternal, bool $isFinal, ?bool $isPure, Assertions $asserts, ?Type $selfOutType, ?string $phpDocComment, array $phpDocParameterOutTypes)
    {
        $this->initializerExprTypeResolver = $initializerExprTypeResolver;
        $this->declaringClass = $declaringClass;
        $this->declaringTrait = $declaringTrait;
        $this->reflection = $reflection;
        $this->reflectionProvider = $reflectionProvider;
        $this->parser = $parser;
        $this->functionCallStatementFinder = $functionCallStatementFinder;
        $this->cache = $cache;
        $this->templateTypeMap = $templateTypeMap;
        $this->phpDocParameterTypes = $phpDocParameterTypes;
        $this->phpDocReturnType = $phpDocReturnType;
        $this->phpDocThrowType = $phpDocThrowType;
        $this->deprecatedDescription = $deprecatedDescription;
        $this->isDeprecated = $isDeprecated;
        $this->isInternal = $isInternal;
        $this->isFinal = $isFinal;
        $this->isPure = $isPure;
        $this->asserts = $asserts;
        $this->selfOutType = $selfOutType;
        $this->phpDocComment = $phpDocComment;
        $this->phpDocParameterOutTypes = $phpDocParameterOutTypes;
    }
    public function getDeclaringClass() : ClassReflection
    {
        return $this->declaringClass;
    }
    public function getDeclaringTrait() : ?ClassReflection
    {
        return $this->declaringTrait;
    }
    /**
     * @return self|MethodPrototypeReflection
     */
    public function getPrototype() : ClassMemberReflection
    {
        try {
            $prototypeMethod = $this->reflection->getPrototype();
            $prototypeDeclaringClass = $this->declaringClass->getAncestorWithClassName($prototypeMethod->getDeclaringClass()->getName());
            if ($prototypeDeclaringClass === null) {
                $prototypeDeclaringClass = $this->reflectionProvider->getClass($prototypeMethod->getDeclaringClass()->getName());
            }
            $tentativeReturnType = null;
            if ($prototypeMethod->getTentativeReturnType() !== null) {
                $tentativeReturnType = TypehintHelper::decideTypeFromReflection($prototypeMethod->getTentativeReturnType());
            }
            return new MethodPrototypeReflection($prototypeMethod->getName(), $prototypeDeclaringClass, $prototypeMethod->isStatic(), $prototypeMethod->isPrivate(), $prototypeMethod->isPublic(), $prototypeMethod->isAbstract(), $prototypeMethod->isFinal(), $prototypeDeclaringClass->getNativeMethod($prototypeMethod->getName())->getVariants(), $tentativeReturnType);
        } catch (ReflectionException $exception) {
            return $this;
        }
    }
    public function isStatic() : bool
    {
        return $this->reflection->isStatic();
    }
    public function getName() : string
    {
        $name = $this->reflection->getName();
        $lowercaseName = strtolower($name);
        if ($lowercaseName === $name) {
            if (PHP_VERSION_ID >= 80000) {
                return $name;
            }
            // fix for https://bugs.php.net/bug.php?id=74939
            foreach ($this->getDeclaringClass()->getNativeReflection()->getTraitAliases() as $traitTarget) {
                $correctName = $this->getMethodNameWithCorrectCase($name, $traitTarget);
                if ($correctName !== null) {
                    $name = $correctName;
                    break;
                }
            }
        }
        return $name;
    }
    private function getMethodNameWithCorrectCase(string $lowercaseMethodName, string $traitTarget) : ?string
    {
        $trait = explode('::', $traitTarget)[0];
        $traitReflection = $this->reflectionProvider->getClass($trait)->getNativeReflection();
        foreach ($traitReflection->getTraitAliases() as $methodAlias => $aliasTraitTarget) {
            if ($lowercaseMethodName === strtolower($methodAlias)) {
                return $methodAlias;
            }
            $correctName = $this->getMethodNameWithCorrectCase($lowercaseMethodName, $aliasTraitTarget);
            if ($correctName !== null) {
                return $correctName;
            }
        }
        return null;
    }
    /**
     * @return ParametersAcceptorWithPhpDocs[]
     */
    public function getVariants() : array
    {
        if ($this->variants === null) {
            $this->variants = [new FunctionVariantWithPhpDocs($this->templateTypeMap, null, $this->getParameters(), $this->isVariadic(), $this->getReturnType(), $this->getPhpDocReturnType(), $this->getNativeReturnType())];
        }
        return $this->variants;
    }
    /**
     * @return ParameterReflectionWithPhpDocs[]
     */
    private function getParameters() : array
    {
        if ($this->parameters === null) {
            $this->parameters = array_map(function (ReflectionParameter $reflection) : \PHPStan\Reflection\Php\PhpParameterReflection {
                return new \PHPStan\Reflection\Php\PhpParameterReflection($this->initializerExprTypeResolver, $reflection, $this->phpDocParameterTypes[$reflection->getName()] ?? null, $this->getDeclaringClass()->getName(), $this->phpDocParameterOutTypes[$reflection->getName()] ?? null);
            }, $this->reflection->getParameters());
        }
        return $this->parameters;
    }
    private function isVariadic() : bool
    {
        $isNativelyVariadic = $this->reflection->isVariadic();
        $declaringClass = $this->declaringClass;
        $filename = $this->declaringClass->getFileName();
        if ($this->declaringTrait !== null) {
            $declaringClass = $this->declaringTrait;
            $filename = $this->declaringTrait->getFileName();
        }
        if (!$isNativelyVariadic && $filename !== null) {
            $modifiedTime = @filemtime($filename);
            if ($modifiedTime === \false) {
                $modifiedTime = time();
            }
            $key = sprintf('variadic-method-%s-%s-%s', $declaringClass->getName(), $this->reflection->getName(), $filename);
            $variableCacheKey = sprintf('%d-v4', $modifiedTime);
            $cachedResult = $this->cache->load($key, $variableCacheKey);
            if ($cachedResult === null || !is_bool($cachedResult)) {
                $nodes = $this->parser->parseFile($filename);
                $result = $this->callsFuncGetArgs($declaringClass, $nodes);
                $this->cache->save($key, $variableCacheKey, $result);
                return $result;
            }
            return $cachedResult;
        }
        return $isNativelyVariadic;
    }
    /**
     * @param Node[] $nodes
     */
    private function callsFuncGetArgs(ClassReflection $declaringClass, array $nodes) : bool
    {
        foreach ($nodes as $node) {
            if ($node instanceof Node\Stmt\ClassLike) {
                if (!isset($node->namespacedName)) {
                    continue;
                }
                if ($declaringClass->getName() !== (string) $node->namespacedName) {
                    continue;
                }
                if ($this->callsFuncGetArgs($declaringClass, $node->stmts)) {
                    return \true;
                }
                continue;
            }
            if ($node instanceof ClassMethod) {
                if ($node->getStmts() === null) {
                    continue;
                    // interface
                }
                $methodName = $node->name->name;
                if ($methodName === $this->reflection->getName()) {
                    return $this->functionCallStatementFinder->findFunctionCallInStatements(ParametersAcceptor::VARIADIC_FUNCTIONS, $node->getStmts()) !== null;
                }
                continue;
            }
            if ($node instanceof Function_) {
                continue;
            }
            if ($node instanceof Namespace_) {
                if ($this->callsFuncGetArgs($declaringClass, $node->stmts)) {
                    return \true;
                }
                continue;
            }
            if (!$node instanceof Declare_ || $node->stmts === null) {
                continue;
            }
            if ($this->callsFuncGetArgs($declaringClass, $node->stmts)) {
                return \true;
            }
        }
        return \false;
    }
    public function isPrivate() : bool
    {
        return $this->reflection->isPrivate();
    }
    public function isPublic() : bool
    {
        return $this->reflection->isPublic();
    }
    private function getReturnType() : Type
    {
        if ($this->returnType === null) {
            $name = strtolower($this->getName());
            $returnType = $this->reflection->getReturnType();
            if ($returnType === null) {
                if ($name === '__construct' || $name === '__destruct' || $name === '__unset' || $name === '__wakeup' || $name === '__clone') {
                    return $this->returnType = TypehintHelper::decideType(new VoidType(), $this->phpDocReturnType);
                }
                if ($name === '__tostring') {
                    return $this->returnType = TypehintHelper::decideType(new StringType(), $this->phpDocReturnType);
                }
                if ($name === '__isset') {
                    return $this->returnType = TypehintHelper::decideType(new BooleanType(), $this->phpDocReturnType);
                }
                if ($name === '__sleep') {
                    return $this->returnType = TypehintHelper::decideType(new ArrayType(new IntegerType(), new StringType()), $this->phpDocReturnType);
                }
                if ($name === '__set_state') {
                    return $this->returnType = TypehintHelper::decideType(new ObjectWithoutClassType(), $this->phpDocReturnType);
                }
            }
            $this->returnType = TypehintHelper::decideTypeFromReflection($returnType, $this->phpDocReturnType, $this->declaringClass);
        }
        return $this->returnType;
    }
    private function getPhpDocReturnType() : Type
    {
        if ($this->phpDocReturnType !== null) {
            return $this->phpDocReturnType;
        }
        return new MixedType();
    }
    private function getNativeReturnType() : Type
    {
        if ($this->nativeReturnType === null) {
            $this->nativeReturnType = TypehintHelper::decideTypeFromReflection($this->reflection->getReturnType(), null, $this->declaringClass);
        }
        return $this->nativeReturnType;
    }
    public function getDeprecatedDescription() : ?string
    {
        if ($this->isDeprecated) {
            return $this->deprecatedDescription;
        }
        return null;
    }
    public function isDeprecated() : TrinaryLogic
    {
        return $this->reflection->isDeprecated()->or(TrinaryLogic::createFromBoolean($this->isDeprecated));
    }
    public function isInternal() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->reflection->isInternal() || $this->isInternal);
    }
    public function isFinal() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->reflection->isFinal() || $this->isFinal);
    }
    public function isAbstract() : bool
    {
        return $this->reflection->isAbstract();
    }
    public function getThrowType() : ?Type
    {
        return $this->phpDocThrowType;
    }
    public function hasSideEffects() : TrinaryLogic
    {
        if (strtolower($this->getName()) !== '__construct' && $this->getReturnType()->isVoid()->yes()) {
            return TrinaryLogic::createYes();
        }
        if ($this->isPure !== null) {
            return TrinaryLogic::createFromBoolean(!$this->isPure);
        }
        return TrinaryLogic::createMaybe();
    }
    public function getAsserts() : Assertions
    {
        return $this->asserts;
    }
    public function getSelfOutType() : ?Type
    {
        return $this->selfOutType;
    }
    public function getDocComment() : ?string
    {
        return $this->phpDocComment;
    }
    public function returnsByReference() : TrinaryLogic
    {
        return $this->reflection->returnsByReference();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Php;

use PHPStan\Reflection\ParameterReflectionWithPhpDocs;
use PHPStan\Reflection\PassedByReference;
use PHPStan\Type\Type;
class DummyParameterWithPhpDocs extends \PHPStan\Reflection\Php\DummyParameter implements ParameterReflectionWithPhpDocs
{
    /**
     * @var \PHPStan\Type\Type
     */
    private $nativeType;
    /**
     * @var \PHPStan\Type\Type
     */
    private $phpDocType;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $outType;
    public function __construct(string $name, Type $type, bool $optional, ?PassedByReference $passedByReference, bool $variadic, ?Type $defaultValue, Type $nativeType, Type $phpDocType, ?Type $outType)
    {
        $this->nativeType = $nativeType;
        $this->phpDocType = $phpDocType;
        $this->outType = $outType;
        parent::__construct($name, $type, $optional, $passedByReference, $variadic, $defaultValue);
    }
    public function getPhpDocType() : Type
    {
        return $this->phpDocType;
    }
    public function getNativeType() : Type
    {
        return $this->nativeType;
    }
    public function getOutType() : ?Type
    {
        return $this->outType;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Php;

use PhpParser\Node;
use PhpParser\Node\Stmt\ClassMethod;
use PHPStan\Reflection\Assertions;
use PHPStan\Reflection\ClassMemberReflection;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\MissingMethodFromReflectionException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\ArrayType;
use PHPStan\Type\BooleanType;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\IntegerType;
use PHPStan\Type\MixedType;
use PHPStan\Type\ObjectWithoutClassType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\VoidType;
use function strtolower;
/**
 * @api
 */
class PhpMethodFromParserNodeReflection extends \PHPStan\Reflection\Php\PhpFunctionFromParserNodeReflection implements ExtendedMethodReflection
{
    /**
     * @var \PHPStan\Reflection\ClassReflection
     */
    private $declaringClass;
    /**
     * @var \PHPStan\Type\Type|null
     */
    private $selfOutType;
    /**
     * @param Type[] $realParameterTypes
     * @param Type[] $phpDocParameterTypes
     * @param Type[] $realParameterDefaultValues
     */
    public function __construct(ClassReflection $declaringClass, ClassMethod $classMethod, string $fileName, TemplateTypeMap $templateTypeMap, array $realParameterTypes, array $phpDocParameterTypes, array $realParameterDefaultValues, Type $realReturnType, ?Type $phpDocReturnType, ?Type $throwType, ?string $deprecatedDescription, bool $isDeprecated, bool $isInternal, bool $isFinal, ?bool $isPure, bool $acceptsNamedArguments, Assertions $assertions, ?Type $selfOutType, ?string $phpDocComment, array $parameterOutTypes)
    {
        $this->declaringClass = $declaringClass;
        $this->selfOutType = $selfOutType;
        $name = strtolower($classMethod->name->name);
        if ($name === '__construct' || $name === '__destruct' || $name === '__unset' || $name === '__wakeup' || $name === '__clone') {
            $realReturnType = new VoidType();
        }
        if ($name === '__tostring') {
            $realReturnType = new StringType();
        }
        if ($name === '__isset') {
            $realReturnType = new BooleanType();
        }
        if ($name === '__sleep') {
            $realReturnType = new ArrayType(new IntegerType(), new StringType());
        }
        if ($name === '__set_state') {
            $realReturnType = TypeCombinator::intersect(new ObjectWithoutClassType(), $realReturnType);
        }
        if ($name === '__set') {
            $realReturnType = new VoidType();
        }
        if ($name === '__debuginfo') {
            $realReturnType = TypeCombinator::intersect(TypeCombinator::addNull(new ArrayType(new MixedType(\true), new MixedType(\true))), $realReturnType);
        }
        if ($name === '__unserialize') {
            $realReturnType = new VoidType();
        }
        if ($name === '__serialize') {
            $realReturnType = new ArrayType(new MixedType(\true), new MixedType(\true));
        }
        parent::__construct($classMethod, $fileName, $templateTypeMap, $realParameterTypes, $phpDocParameterTypes, $realParameterDefaultValues, $realReturnType, $phpDocReturnType, $throwType, $deprecatedDescription, $isDeprecated, $isInternal, $isFinal || $classMethod->isFinal(), $isPure, $acceptsNamedArguments, $assertions, $phpDocComment, $parameterOutTypes);
    }
    public function getDeclaringClass() : ClassReflection
    {
        return $this->declaringClass;
    }
    public function getPrototype() : ClassMemberReflection
    {
        try {
            return $this->declaringClass->getNativeMethod($this->getClassMethod()->name->name)->getPrototype();
        } catch (MissingMethodFromReflectionException $exception) {
            return $this;
        }
    }
    private function getClassMethod() : ClassMethod
    {
        /** @var Node\Stmt\ClassMethod $functionLike */
        $functionLike = $this->getFunctionLike();
        return $functionLike;
    }
    public function isStatic() : bool
    {
        return $this->getClassMethod()->isStatic();
    }
    public function isPrivate() : bool
    {
        return $this->getClassMethod()->isPrivate();
    }
    public function isPublic() : bool
    {
        return $this->getClassMethod()->isPublic();
    }
    public function isBuiltin() : bool
    {
        return \false;
    }
    public function getSelfOutType() : ?Type
    {
        return $this->selfOutType;
    }
    public function returnsByReference() : TrinaryLogic
    {
        return TrinaryLogic::createFromBoolean($this->getClassMethod()->returnsByRef());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Php;

use PhpParser\Node;
use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Declare_;
use PhpParser\Node\Stmt\Namespace_;
use PHPStan\Analyser\NodeScopeResolver;
use PHPStan\Analyser\ScopeContext;
use PHPStan\Analyser\ScopeFactory;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionParameter;
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty;
use PHPStan\Parser\Parser;
use PHPStan\PhpDoc\PhpDocInheritanceResolver;
use PHPStan\PhpDoc\ResolvedPhpDocBlock;
use PHPStan\PhpDoc\StubPhpDocProvider;
use PHPStan\Reflection\Annotations\AnnotationsMethodsClassReflectionExtension;
use PHPStan\Reflection\Annotations\AnnotationsPropertiesClassReflectionExtension;
use PHPStan\Reflection\Assertions;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\FunctionVariantWithPhpDocs;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\MethodsClassReflectionExtension;
use PHPStan\Reflection\Native\NativeMethodReflection;
use PHPStan\Reflection\Native\NativeParameterWithPhpDocsReflection;
use PHPStan\Reflection\PropertiesClassReflectionExtension;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Reflection\SignatureMap\FunctionSignature;
use PHPStan\Reflection\SignatureMap\ParameterSignature;
use PHPStan\Reflection\SignatureMap\SignatureMapProvider;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\ArrayType;
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\Enum\EnumCaseObjectType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\FileTypeMapper;
use PHPStan\Type\GeneralizePrecision;
use PHPStan\Type\Generic\TemplateTypeHelper;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\MixedType;
use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypehintHelper;
use function array_key_exists;
use function array_keys;
use function array_map;
use function array_slice;
use function count;
use function explode;
use function implode;
use function is_array;
use function sprintf;
use function strtolower;
class PhpClassReflectionExtension implements PropertiesClassReflectionExtension, MethodsClassReflectionExtension
{
    /** @var PropertyReflection[][] */
    private $propertiesIncludingAnnotations = [];
    /** @var PhpPropertyReflection[][] */
    private $nativeProperties = [];
    /** @var ExtendedMethodReflection[][] */
    private $methodsIncludingAnnotations = [];
    /** @var ExtendedMethodReflection[][] */
    private $nativeMethods = [];
    /** @var array<string, array<string, Type>> */
    private $propertyTypesCache = [];
    /** @var array<string, true> */
    private $inferClassConstructorPropertyTypesInProcess = [];
    /**
     * @var \PHPStan\Analyser\ScopeFactory
     */
    private $scopeFactory;
    /**
     * @var \PHPStan\Analyser\NodeScopeResolver
     */
    private $nodeScopeResolver;
    /**
     * @var \PHPStan\Reflection\Php\PhpMethodReflectionFactory
     */
    private $methodReflectionFactory;
    /**
     * @var \PHPStan\PhpDoc\PhpDocInheritanceResolver
     */
    private $phpDocInheritanceResolver;
    /**
     * @var \PHPStan\Reflection\Annotations\AnnotationsMethodsClassReflectionExtension
     */
    private $annotationsMethodsClassReflectionExtension;
    /**
     * @var \PHPStan\Reflection\Annotations\AnnotationsPropertiesClassReflectionExtension
     */
    private $annotationsPropertiesClassReflectionExtension;
    /**
     * @var \PHPStan\Reflection\SignatureMap\SignatureMapProvider
     */
    private $signatureMapProvider;
    /**
     * @var \PHPStan\Parser\Parser
     */
    private $parser;
    /**
     * @var \PHPStan\PhpDoc\StubPhpDocProvider
     */
    private $stubPhpDocProvider;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider\ReflectionProviderProvider
     */
    private $reflectionProviderProvider;
    /**
     * @var \PHPStan\Type\FileTypeMapper
     */
    private $fileTypeMapper;
    /**
     * @var bool
     */
    private $inferPrivatePropertyTypeFromConstructor;
    /**
     * @var string[]
     */
    private $universalObjectCratesClasses;
    /**
     * @param string[] $universalObjectCratesClasses
     */
    public function __construct(ScopeFactory $scopeFactory, NodeScopeResolver $nodeScopeResolver, \PHPStan\Reflection\Php\PhpMethodReflectionFactory $methodReflectionFactory, PhpDocInheritanceResolver $phpDocInheritanceResolver, AnnotationsMethodsClassReflectionExtension $annotationsMethodsClassReflectionExtension, AnnotationsPropertiesClassReflectionExtension $annotationsPropertiesClassReflectionExtension, SignatureMapProvider $signatureMapProvider, Parser $parser, StubPhpDocProvider $stubPhpDocProvider, ReflectionProvider\ReflectionProviderProvider $reflectionProviderProvider, FileTypeMapper $fileTypeMapper, bool $inferPrivatePropertyTypeFromConstructor, array $universalObjectCratesClasses)
    {
        $this->scopeFactory = $scopeFactory;
        $this->nodeScopeResolver = $nodeScopeResolver;
        $this->methodReflectionFactory = $methodReflectionFactory;
        $this->phpDocInheritanceResolver = $phpDocInheritanceResolver;
        $this->annotationsMethodsClassReflectionExtension = $annotationsMethodsClassReflectionExtension;
        $this->annotationsPropertiesClassReflectionExtension = $annotationsPropertiesClassReflectionExtension;
        $this->signatureMapProvider = $signatureMapProvider;
        $this->parser = $parser;
        $this->stubPhpDocProvider = $stubPhpDocProvider;
        $this->reflectionProviderProvider = $reflectionProviderProvider;
        $this->fileTypeMapper = $fileTypeMapper;
        $this->inferPrivatePropertyTypeFromConstructor = $inferPrivatePropertyTypeFromConstructor;
        $this->universalObjectCratesClasses = $universalObjectCratesClasses;
    }
    public function evictPrivateSymbols(string $classCacheKey) : void
    {
        foreach ($this->propertiesIncludingAnnotations as $key => $properties) {
            if ($key !== $classCacheKey) {
                continue;
            }
            foreach ($properties as $name => $property) {
                if (!$property->isPrivate()) {
                    continue;
                }
                unset($this->propertiesIncludingAnnotations[$key][$name]);
            }
        }
        foreach ($this->nativeProperties as $key => $properties) {
            if ($key !== $classCacheKey) {
                continue;
            }
            foreach ($properties as $name => $property) {
                if (!$property->isPrivate()) {
                    continue;
                }
                unset($this->nativeProperties[$key][$name]);
            }
        }
        foreach ($this->methodsIncludingAnnotations as $key => $methods) {
            if ($key !== $classCacheKey) {
                continue;
            }
            foreach ($methods as $name => $method) {
                if (!$method->isPrivate()) {
                    continue;
                }
                unset($this->methodsIncludingAnnotations[$key][$name]);
            }
        }
        foreach ($this->nativeMethods as $key => $methods) {
            if ($key !== $classCacheKey) {
                continue;
            }
            foreach ($methods as $name => $method) {
                if (!$method->isPrivate()) {
                    continue;
                }
                unset($this->nativeMethods[$key][$name]);
            }
        }
    }
    public function hasProperty(ClassReflection $classReflection, string $propertyName) : bool
    {
        return $classReflection->getNativeReflection()->hasProperty($propertyName);
    }
    public function getProperty(ClassReflection $classReflection, string $propertyName) : PropertyReflection
    {
        if (!isset($this->propertiesIncludingAnnotations[$classReflection->getCacheKey()][$propertyName])) {
            $this->propertiesIncludingAnnotations[$classReflection->getCacheKey()][$propertyName] = $this->createProperty($classReflection, $propertyName, \true);
        }
        return $this->propertiesIncludingAnnotations[$classReflection->getCacheKey()][$propertyName];
    }
    public function getNativeProperty(ClassReflection $classReflection, string $propertyName) : \PHPStan\Reflection\Php\PhpPropertyReflection
    {
        if (!isset($this->nativeProperties[$classReflection->getCacheKey()][$propertyName])) {
            /** @var PhpPropertyReflection $property */
            $property = $this->createProperty($classReflection, $propertyName, \false);
            $this->nativeProperties[$classReflection->getCacheKey()][$propertyName] = $property;
        }
        return $this->nativeProperties[$classReflection->getCacheKey()][$propertyName];
    }
    private function createProperty(ClassReflection $classReflection, string $propertyName, bool $includingAnnotations) : PropertyReflection
    {
        $propertyReflection = $classReflection->getNativeReflection()->getProperty($propertyName);
        $propertyName = $propertyReflection->getName();
        $declaringClassName = $propertyReflection->getDeclaringClass()->getName();
        $declaringClassReflection = $classReflection->getAncestorWithClassName($declaringClassName);
        if ($declaringClassReflection === null) {
            throw new ShouldNotHappenException(sprintf('Internal error: Expected to find an ancestor with class name %s on %s, but none was found.', $declaringClassName, $classReflection->getName()));
        }
        if ($declaringClassReflection->isEnum()) {
            if ($propertyName === 'name' || $declaringClassReflection->isBackedEnum() && $propertyName === 'value') {
                $types = [];
                foreach (array_keys($classReflection->getEnumCases()) as $name) {
                    if ($propertyName === 'name') {
                        $types[] = new ConstantStringType($name);
                        continue;
                    }
                    $case = $classReflection->getEnumCase($name);
                    $value = $case->getBackingValueType();
                    if ($value === null) {
                        throw new ShouldNotHappenException();
                    }
                    $types[] = $value;
                }
                return new \PHPStan\Reflection\Php\PhpPropertyReflection($declaringClassReflection, null, null, TypeCombinator::union(...$types), $classReflection->getNativeReflection()->getProperty($propertyName), null, \false, \false, \false, \false);
            }
        }
        $deprecatedDescription = null;
        $isDeprecated = \false;
        $isInternal = \false;
        $isReadOnlyByPhpDoc = $classReflection->isImmutable();
        $isAllowedPrivateMutation = \false;
        if ($includingAnnotations && !$declaringClassReflection->isEnum() && $this->annotationsPropertiesClassReflectionExtension->hasProperty($classReflection, $propertyName)) {
            $hierarchyDistances = $classReflection->getClassHierarchyDistances();
            $annotationProperty = $this->annotationsPropertiesClassReflectionExtension->getProperty($classReflection, $propertyName);
            if (!isset($hierarchyDistances[$annotationProperty->getDeclaringClass()->getName()])) {
                throw new ShouldNotHappenException();
            }
            $distanceDeclaringClass = $propertyReflection->getDeclaringClass()->getName();
            $propertyTrait = $this->findPropertyTrait($propertyReflection);
            if ($propertyTrait !== null) {
                $distanceDeclaringClass = $propertyTrait;
            }
            if (!isset($hierarchyDistances[$distanceDeclaringClass])) {
                throw new ShouldNotHappenException();
            }
            if ($hierarchyDistances[$annotationProperty->getDeclaringClass()->getName()] <= $hierarchyDistances[$distanceDeclaringClass]) {
                return $annotationProperty;
            }
        }
        $docComment = $propertyReflection->getDocComment() !== \false ? $propertyReflection->getDocComment() : null;
        $phpDocType = null;
        $resolvedPhpDoc = null;
        $declaringTraitName = $this->findPropertyTrait($propertyReflection);
        $constructorName = null;
        if ($propertyReflection->isPromoted()) {
            if ($declaringClassReflection->hasConstructor()) {
                $constructorName = $declaringClassReflection->getConstructor()->getName();
            }
        }
        if ($constructorName === null) {
            $resolvedPhpDoc = $this->phpDocInheritanceResolver->resolvePhpDocForProperty($docComment, $declaringClassReflection, $declaringClassReflection->getFileName(), $declaringTraitName, $propertyName);
        } elseif ($docComment !== null) {
            $resolvedPhpDoc = $this->fileTypeMapper->getResolvedPhpDoc($declaringClassReflection->getFileName(), $declaringClassName, $declaringTraitName, $constructorName, $docComment);
        }
        $phpDocBlockClassReflection = $declaringClassReflection;
        if ($resolvedPhpDoc !== null) {
            $varTags = $resolvedPhpDoc->getVarTags();
            if (isset($varTags[0]) && count($varTags) === 1) {
                $phpDocType = $varTags[0]->getType();
            } elseif (isset($varTags[$propertyName])) {
                $phpDocType = $varTags[$propertyName]->getType();
            }
            $phpDocType = $phpDocType !== null ? TemplateTypeHelper::resolveTemplateTypes($phpDocType, $phpDocBlockClassReflection->getActiveTemplateTypeMap()) : null;
            $deprecatedDescription = $resolvedPhpDoc->getDeprecatedTag() !== null ? $resolvedPhpDoc->getDeprecatedTag()->getMessage() : null;
            $isDeprecated = $resolvedPhpDoc->isDeprecated();
            $isInternal = $resolvedPhpDoc->isInternal();
            $isReadOnlyByPhpDoc = $isReadOnlyByPhpDoc || $resolvedPhpDoc->isReadOnly();
            $isAllowedPrivateMutation = $resolvedPhpDoc->isAllowedPrivateMutation();
        }
        if ($phpDocType === null) {
            if (isset($constructorName)) {
                $constructorDocComment = $declaringClassReflection->getConstructor()->getDocComment();
                $nativeClassReflection = $declaringClassReflection->getNativeReflection();
                $positionalParameterNames = [];
                if ($nativeClassReflection->getConstructor() !== null) {
                    $positionalParameterNames = array_map(static function (ReflectionParameter $parameter) : string {
                        return $parameter->getName();
                    }, $nativeClassReflection->getConstructor()->getParameters());
                }
                $resolvedConstructorPhpDoc = $this->phpDocInheritanceResolver->resolvePhpDocForMethod($constructorDocComment, $declaringClassReflection->getFileName(), $declaringClassReflection, $declaringTraitName, $constructorName, $positionalParameterNames);
                $paramTags = $resolvedConstructorPhpDoc->getParamTags();
                if (isset($paramTags[$propertyReflection->getName()])) {
                    $phpDocType = $paramTags[$propertyReflection->getName()]->getType();
                }
            }
        }
        if ($phpDocType === null && $this->inferPrivatePropertyTypeFromConstructor && $declaringClassReflection->getFileName() !== null && $propertyReflection->isPrivate() && !$propertyReflection->isPromoted() && !$propertyReflection->hasType() && $declaringClassReflection->hasConstructor() && $declaringClassReflection->getConstructor()->getDeclaringClass()->getName() === $declaringClassReflection->getName()) {
            $phpDocType = $this->inferPrivatePropertyType($propertyReflection->getName(), $declaringClassReflection->getConstructor());
        }
        $nativeType = null;
        if ($propertyReflection->getType() !== null) {
            $nativeType = $propertyReflection->getType();
        }
        $declaringTrait = null;
        $reflectionProvider = $this->reflectionProviderProvider->getReflectionProvider();
        if ($declaringTraitName !== null && $reflectionProvider->hasClass($declaringTraitName)) {
            $declaringTrait = $reflectionProvider->getClass($declaringTraitName);
        }
        return new \PHPStan\Reflection\Php\PhpPropertyReflection($declaringClassReflection, $declaringTrait, $nativeType, $phpDocType, $propertyReflection, $deprecatedDescription, $isDeprecated, $isInternal, $isReadOnlyByPhpDoc, $isAllowedPrivateMutation);
    }
    public function hasMethod(ClassReflection $classReflection, string $methodName) : bool
    {
        return $classReflection->getNativeReflection()->hasMethod($methodName);
    }
    /**
     * @return ExtendedMethodReflection
     */
    public function getMethod(ClassReflection $classReflection, string $methodName) : MethodReflection
    {
        if (isset($this->methodsIncludingAnnotations[$classReflection->getCacheKey()][$methodName])) {
            return $this->methodsIncludingAnnotations[$classReflection->getCacheKey()][$methodName];
        }
        $nativeMethodReflection = new \PHPStan\Reflection\Php\NativeBuiltinMethodReflection($classReflection->getNativeReflection()->getMethod($methodName));
        if (!isset($this->methodsIncludingAnnotations[$classReflection->getCacheKey()][$nativeMethodReflection->getName()])) {
            $method = $this->createMethod($classReflection, $nativeMethodReflection, \true);
            $this->methodsIncludingAnnotations[$classReflection->getCacheKey()][$nativeMethodReflection->getName()] = $method;
            if ($nativeMethodReflection->getName() !== $methodName) {
                $this->methodsIncludingAnnotations[$classReflection->getCacheKey()][$methodName] = $method;
            }
        }
        return $this->methodsIncludingAnnotations[$classReflection->getCacheKey()][$nativeMethodReflection->getName()];
    }
    public function hasNativeMethod(ClassReflection $classReflection, string $methodName) : bool
    {
        $hasMethod = $this->hasMethod($classReflection, $methodName);
        if ($hasMethod) {
            return \true;
        }
        if ($methodName === '__get' && \PHPStan\Reflection\Php\UniversalObjectCratesClassReflectionExtension::isUniversalObjectCrate($this->reflectionProviderProvider->getReflectionProvider(), $this->universalObjectCratesClasses, $classReflection)) {
            return \true;
        }
        return \false;
    }
    public function getNativeMethod(ClassReflection $classReflection, string $methodName) : ExtendedMethodReflection
    {
        if (isset($this->nativeMethods[$classReflection->getCacheKey()][$methodName])) {
            return $this->nativeMethods[$classReflection->getCacheKey()][$methodName];
        }
        if ($classReflection->getNativeReflection()->hasMethod($methodName)) {
            $nativeMethodReflection = new \PHPStan\Reflection\Php\NativeBuiltinMethodReflection($classReflection->getNativeReflection()->getMethod($methodName));
        } else {
            if ($methodName !== '__get' || !\PHPStan\Reflection\Php\UniversalObjectCratesClassReflectionExtension::isUniversalObjectCrate($this->reflectionProviderProvider->getReflectionProvider(), $this->universalObjectCratesClasses, $classReflection)) {
                throw new ShouldNotHappenException();
            }
            $nativeMethodReflection = new \PHPStan\Reflection\Php\FakeBuiltinMethodReflection($methodName, $classReflection->getNativeReflection());
        }
        if (!isset($this->nativeMethods[$classReflection->getCacheKey()][$nativeMethodReflection->getName()])) {
            $method = $this->createMethod($classReflection, $nativeMethodReflection, \false);
            $this->nativeMethods[$classReflection->getCacheKey()][$nativeMethodReflection->getName()] = $method;
        }
        return $this->nativeMethods[$classReflection->getCacheKey()][$nativeMethodReflection->getName()];
    }
    private function createMethod(ClassReflection $classReflection, \PHPStan\Reflection\Php\BuiltinMethodReflection $methodReflection, bool $includingAnnotations) : ExtendedMethodReflection
    {
        if ($includingAnnotations && $this->annotationsMethodsClassReflectionExtension->hasMethod($classReflection, $methodReflection->getName())) {
            $hierarchyDistances = $classReflection->getClassHierarchyDistances();
            $annotationMethod = $this->annotationsMethodsClassReflectionExtension->getMethod($classReflection, $methodReflection->getName());
            if (!isset($hierarchyDistances[$annotationMethod->getDeclaringClass()->getName()])) {
                throw new ShouldNotHappenException();
            }
            $distanceDeclaringClass = $methodReflection->getDeclaringClass()->getName();
            $methodTrait = $this->findMethodTrait($methodReflection);
            if ($methodTrait !== null) {
                $distanceDeclaringClass = $methodTrait;
            }
            if (!isset($hierarchyDistances[$distanceDeclaringClass])) {
                throw new ShouldNotHappenException();
            }
            if ($hierarchyDistances[$annotationMethod->getDeclaringClass()->getName()] <= $hierarchyDistances[$distanceDeclaringClass]) {
                return $annotationMethod;
            }
        }
        $declaringClassName = $methodReflection->getDeclaringClass()->getName();
        $declaringClass = $classReflection->getAncestorWithClassName($declaringClassName);
        if ($declaringClass === null) {
            throw new ShouldNotHappenException(sprintf('Internal error: Expected to find an ancestor with class name %s on %s, but none was found.', $declaringClassName, $classReflection->getName()));
        }
        if ($declaringClass->isEnum() && $declaringClass->getName() !== 'UnitEnum' && strtolower($methodReflection->getName()) === 'cases') {
            $arrayBuilder = ConstantArrayTypeBuilder::createEmpty();
            foreach (array_keys($classReflection->getEnumCases()) as $name) {
                $arrayBuilder->setOffsetValueType(null, new EnumCaseObjectType($classReflection->getName(), $name));
            }
            return new \PHPStan\Reflection\Php\EnumCasesMethodReflection($declaringClass, $arrayBuilder->getArray());
        }
        if ($this->signatureMapProvider->hasMethodSignature($declaringClassName, $methodReflection->getName())) {
            $variants = [];
            $reflectionMethod = null;
            $throwType = null;
            $asserts = Assertions::createEmpty();
            $selfOutType = null;
            $phpDocComment = null;
            if ($classReflection->getNativeReflection()->hasMethod($methodReflection->getName())) {
                $reflectionMethod = $classReflection->getNativeReflection()->getMethod($methodReflection->getName());
            }
            $methodSignatures = $this->signatureMapProvider->getMethodSignatures($declaringClassName, $methodReflection->getName(), $reflectionMethod);
            foreach ($methodSignatures as $methodSignature) {
                $phpDocParameterNameMapping = [];
                foreach ($methodSignature->getParameters() as $parameter) {
                    $phpDocParameterNameMapping[$parameter->getName()] = $parameter->getName();
                }
                $stubPhpDocReturnType = null;
                $stubPhpDocParameterTypes = [];
                $stubPhpDocParameterVariadicity = [];
                $phpDocParameterTypes = [];
                $phpDocReturnType = null;
                $stubPhpDocPair = null;
                $stubPhpParameterOutTypes = [];
                $phpDocParameterOutTypes = [];
                if (count($methodSignatures) === 1) {
                    $stubPhpDocPair = $this->findMethodPhpDocIncludingAncestors($declaringClass, $methodReflection->getName(), array_map(static function (ParameterSignature $parameterSignature) : string {
                        return $parameterSignature->getName();
                    }, $methodSignature->getParameters()));
                    if ($stubPhpDocPair !== null) {
                        [$stubPhpDoc, $stubDeclaringClass] = $stubPhpDocPair;
                        $templateTypeMap = $stubDeclaringClass->getActiveTemplateTypeMap();
                        $returnTag = $stubPhpDoc->getReturnTag();
                        if ($returnTag !== null) {
                            $stubPhpDocReturnType = TemplateTypeHelper::resolveTemplateTypes($returnTag->getType(), $templateTypeMap);
                        }
                        foreach ($stubPhpDoc->getParamTags() as $name => $paramTag) {
                            $stubPhpDocParameterTypes[$name] = TemplateTypeHelper::resolveTemplateTypes($paramTag->getType(), $templateTypeMap);
                            $stubPhpDocParameterVariadicity[$name] = $paramTag->isVariadic();
                        }
                        $throwsTag = $stubPhpDoc->getThrowsTag();
                        if ($throwsTag !== null) {
                            $throwType = $throwsTag->getType();
                        }
                        $asserts = Assertions::createFromResolvedPhpDocBlock($stubPhpDoc);
                        $selfOutTypeTag = $stubPhpDoc->getSelfOutTag();
                        if ($selfOutTypeTag !== null) {
                            $selfOutType = $selfOutTypeTag->getType();
                        }
                        foreach ($stubPhpDoc->getParamOutTags() as $name => $paramOutTag) {
                            $stubPhpParameterOutTypes[$name] = TemplateTypeHelper::resolveTemplateTypes($paramOutTag->getType(), $templateTypeMap);
                        }
                        if ($declaringClassName === $stubDeclaringClass->getName() && $stubPhpDoc->hasPhpDocString()) {
                            $phpDocComment = $stubPhpDoc->getPhpDocString();
                        }
                    }
                }
                if ($stubPhpDocPair === null && $reflectionMethod !== null && $reflectionMethod->getDocComment() !== \false) {
                    $filename = $reflectionMethod->getFileName();
                    if ($filename !== \false) {
                        $phpDocBlock = $this->fileTypeMapper->getResolvedPhpDoc($filename, $declaringClassName, null, $reflectionMethod->getName(), $reflectionMethod->getDocComment());
                        $throwsTag = $phpDocBlock->getThrowsTag();
                        if ($throwsTag !== null) {
                            $throwType = $throwsTag->getType();
                        }
                        $returnTag = $phpDocBlock->getReturnTag();
                        if ($returnTag !== null) {
                            $phpDocReturnType = $returnTag->getType();
                        }
                        foreach ($phpDocBlock->getParamTags() as $name => $paramTag) {
                            $phpDocParameterTypes[$name] = $paramTag->getType();
                        }
                        $asserts = Assertions::createFromResolvedPhpDocBlock($phpDocBlock);
                        $selfOutTypeTag = $phpDocBlock->getSelfOutTag();
                        if ($selfOutTypeTag !== null) {
                            $selfOutType = $selfOutTypeTag->getType();
                        }
                        if ($phpDocBlock->hasPhpDocString()) {
                            $phpDocComment = $phpDocBlock->getPhpDocString();
                        }
                        foreach ($phpDocBlock->getParamOutTags() as $name => $paramOutTag) {
                            $phpDocParameterOutTypes[$name] = $paramOutTag->getType();
                        }
                        $signatureParameters = $methodSignature->getParameters();
                        foreach ($reflectionMethod->getParameters() as $paramI => $reflectionParameter) {
                            if (!array_key_exists($paramI, $signatureParameters)) {
                                continue;
                            }
                            $phpDocParameterNameMapping[$signatureParameters[$paramI]->getName()] = $reflectionParameter->getName();
                        }
                    }
                }
                $variants[] = $this->createNativeMethodVariant($methodSignature, $stubPhpDocParameterTypes, $stubPhpDocParameterVariadicity, $stubPhpDocReturnType, $phpDocParameterTypes, $phpDocReturnType, $phpDocParameterNameMapping, $stubPhpParameterOutTypes, $phpDocParameterOutTypes);
            }
            if ($this->signatureMapProvider->hasMethodMetadata($declaringClassName, $methodReflection->getName())) {
                $hasSideEffects = TrinaryLogic::createFromBoolean($this->signatureMapProvider->getMethodMetadata($declaringClassName, $methodReflection->getName())['hasSideEffects']);
            } else {
                $hasSideEffects = TrinaryLogic::createMaybe();
            }
            return new NativeMethodReflection($this->reflectionProviderProvider->getReflectionProvider(), $declaringClass, $methodReflection, $variants, $hasSideEffects, $throwType, $asserts, $selfOutType, $phpDocComment);
        }
        $declaringTraitName = $this->findMethodTrait($methodReflection);
        $resolvedPhpDoc = null;
        $stubPhpDocPair = $this->findMethodPhpDocIncludingAncestors($declaringClass, $methodReflection->getName(), array_map(static function (ReflectionParameter $parameter) : string {
            return $parameter->getName();
        }, $methodReflection->getParameters()));
        $phpDocBlockClassReflection = $declaringClass;
        if ($methodReflection->getReflection() !== null) {
            $methodDeclaringClass = $methodReflection->getReflection()->getBetterReflection()->getDeclaringClass();
            if ($stubPhpDocPair === null && $methodDeclaringClass->isTrait()) {
                if (!$methodReflection->getDeclaringClass()->isTrait() || $methodDeclaringClass->getName() !== $methodReflection->getDeclaringClass()->getName()) {
                    $stubPhpDocPair = $this->findMethodPhpDocIncludingAncestors($this->reflectionProviderProvider->getReflectionProvider()->getClass($methodDeclaringClass->getName()), $methodReflection->getName(), array_map(static function (ReflectionParameter $parameter) : string {
                        return $parameter->getName();
                    }, $methodReflection->getParameters()));
                }
            }
        }
        if ($stubPhpDocPair !== null) {
            [$resolvedPhpDoc, $phpDocBlockClassReflection] = $stubPhpDocPair;
        }
        if ($resolvedPhpDoc === null) {
            $docComment = $methodReflection->getDocComment();
            $positionalParameterNames = array_map(static function (ReflectionParameter $parameter) : string {
                return $parameter->getName();
            }, $methodReflection->getParameters());
            $resolvedPhpDoc = $this->phpDocInheritanceResolver->resolvePhpDocForMethod($docComment, $declaringClass->getFileName(), $declaringClass, $declaringTraitName, $methodReflection->getName(), $positionalParameterNames);
            $phpDocBlockClassReflection = $declaringClass;
        }
        $declaringTrait = null;
        $reflectionProvider = $this->reflectionProviderProvider->getReflectionProvider();
        if ($declaringTraitName !== null && $reflectionProvider->hasClass($declaringTraitName)) {
            $declaringTrait = $reflectionProvider->getClass($declaringTraitName);
        }
        $phpDocParameterTypes = [];
        if ($methodReflection instanceof \PHPStan\Reflection\Php\NativeBuiltinMethodReflection && $methodReflection->isConstructor()) {
            foreach ($methodReflection->getParameters() as $parameter) {
                if (!$parameter->isPromoted()) {
                    continue;
                }
                if (!$methodReflection->getDeclaringClass()->hasProperty($parameter->getName())) {
                    continue;
                }
                $parameterProperty = $methodReflection->getDeclaringClass()->getProperty($parameter->getName());
                if (!$parameterProperty->isPromoted()) {
                    continue;
                }
                if ($parameterProperty->getDocComment() === \false) {
                    continue;
                }
                $propertyDocblock = $this->fileTypeMapper->getResolvedPhpDoc($declaringClass->getFileName(), $declaringClassName, $declaringTraitName, $methodReflection->getName(), $parameterProperty->getDocComment());
                $varTags = $propertyDocblock->getVarTags();
                if (isset($varTags[0]) && count($varTags) === 1) {
                    $phpDocType = $varTags[0]->getType();
                } elseif (isset($varTags[$parameter->getName()])) {
                    $phpDocType = $varTags[$parameter->getName()]->getType();
                } else {
                    continue;
                }
                $phpDocParameterTypes[$parameter->getName()] = $phpDocType;
            }
        }
        $templateTypeMap = $resolvedPhpDoc->getTemplateTypeMap();
        foreach ($resolvedPhpDoc->getParamTags() as $paramName => $paramTag) {
            if (array_key_exists($paramName, $phpDocParameterTypes)) {
                continue;
            }
            $phpDocParameterTypes[$paramName] = $paramTag->getType();
        }
        foreach ($phpDocParameterTypes as $paramName => $paramType) {
            $phpDocParameterTypes[$paramName] = TemplateTypeHelper::resolveTemplateTypes($paramType, $phpDocBlockClassReflection->getActiveTemplateTypeMap());
        }
        $phpDocParameterOutTypes = [];
        foreach ($resolvedPhpDoc->getParamOutTags() as $paramName => $paramOutTag) {
            $phpDocParameterOutTypes[$paramName] = TemplateTypeHelper::resolveTemplateTypes($paramOutTag->getType(), $phpDocBlockClassReflection->getActiveTemplateTypeMap());
        }
        $nativeReturnType = TypehintHelper::decideTypeFromReflection($methodReflection->getReturnType(), null, $declaringClass);
        $phpDocReturnType = $this->getPhpDocReturnType($phpDocBlockClassReflection, $resolvedPhpDoc, $nativeReturnType);
        $phpDocThrowType = $resolvedPhpDoc->getThrowsTag() !== null ? $resolvedPhpDoc->getThrowsTag()->getType() : null;
        $deprecatedDescription = $resolvedPhpDoc->getDeprecatedTag() !== null ? $resolvedPhpDoc->getDeprecatedTag()->getMessage() : null;
        $isDeprecated = $resolvedPhpDoc->isDeprecated();
        $isInternal = $resolvedPhpDoc->isInternal();
        $isFinal = $resolvedPhpDoc->isFinal();
        $isPure = $resolvedPhpDoc->isPure();
        $asserts = Assertions::createFromResolvedPhpDocBlock($resolvedPhpDoc);
        $selfOutType = $resolvedPhpDoc->getSelfOutTag() !== null ? $resolvedPhpDoc->getSelfOutTag()->getType() : null;
        $phpDocComment = null;
        if ($resolvedPhpDoc->hasPhpDocString()) {
            $phpDocComment = $resolvedPhpDoc->getPhpDocString();
        }
        return $this->methodReflectionFactory->create($declaringClass, $declaringTrait, $methodReflection, $templateTypeMap, $phpDocParameterTypes, $phpDocReturnType, $phpDocThrowType, $deprecatedDescription, $isDeprecated, $isInternal, $isFinal, $isPure, $asserts, $selfOutType, $phpDocComment, $phpDocParameterOutTypes);
    }
    /**
     * @param array<string, Type> $stubPhpDocParameterTypes
     * @param array<string, bool> $stubPhpDocParameterVariadicity
     * @param array<string, Type> $phpDocParameterTypes
     * @param array<string, string> $phpDocParameterNameMapping
     * @param array<string, Type> $stubPhpDocParameterOutTypes
     * @param array<string, Type> $phpDocParameterOutTypes
     */
    private function createNativeMethodVariant(FunctionSignature $methodSignature, array $stubPhpDocParameterTypes, array $stubPhpDocParameterVariadicity, ?Type $stubPhpDocReturnType, array $phpDocParameterTypes, ?Type $phpDocReturnType, array $phpDocParameterNameMapping, array $stubPhpDocParameterOutTypes, array $phpDocParameterOutTypes) : FunctionVariantWithPhpDocs
    {
        $parameters = [];
        foreach ($methodSignature->getParameters() as $parameterSignature) {
            $type = null;
            $phpDocType = null;
            $parameterOutType = null;
            $phpDocParameterName = $phpDocParameterNameMapping[$parameterSignature->getName()] ?? $parameterSignature->getName();
            if (isset($stubPhpDocParameterTypes[$parameterSignature->getName()])) {
                $type = $stubPhpDocParameterTypes[$parameterSignature->getName()];
                $phpDocType = $stubPhpDocParameterTypes[$parameterSignature->getName()];
            } elseif (isset($phpDocParameterTypes[$phpDocParameterName])) {
                $phpDocType = $phpDocParameterTypes[$phpDocParameterName];
            }
            if (isset($stubPhpDocParameterOutTypes[$parameterSignature->getName()])) {
                $parameterOutType = $stubPhpDocParameterOutTypes[$parameterSignature->getName()];
            } elseif (isset($phpDocParameterOutTypes[$phpDocParameterName])) {
                $parameterOutType = $phpDocParameterOutTypes[$phpDocParameterName];
            }
            $parameters[] = new NativeParameterWithPhpDocsReflection($phpDocParameterName, $parameterSignature->isOptional(), $type ?? $parameterSignature->getType(), $phpDocType ?? new MixedType(), $parameterSignature->getNativeType(), $parameterSignature->passedByReference(), $stubPhpDocParameterVariadicity[$parameterSignature->getName()] ?? $parameterSignature->isVariadic(), $parameterSignature->getDefaultValue(), $parameterOutType ?? $parameterSignature->getOutType());
        }
        $returnType = null;
        if ($stubPhpDocReturnType !== null) {
            $returnType = $stubPhpDocReturnType;
            $phpDocReturnType = $stubPhpDocReturnType;
        }
        return new FunctionVariantWithPhpDocs(TemplateTypeMap::createEmpty(), null, $parameters, $methodSignature->isVariadic(), $returnType ?? $methodSignature->getReturnType(), $phpDocReturnType ?? new MixedType(), $methodSignature->getNativeReturnType());
    }
    private function findPropertyTrait(ReflectionProperty $propertyReflection) : ?string
    {
        $declaringClass = $propertyReflection->getBetterReflection()->getDeclaringClass();
        if ($declaringClass->isTrait()) {
            if ($propertyReflection->getDeclaringClass()->isTrait() && $propertyReflection->getDeclaringClass()->getName() === $declaringClass->getName()) {
                return null;
            }
            return $declaringClass->getName();
        }
        return null;
    }
    private function findMethodTrait(\PHPStan\Reflection\Php\BuiltinMethodReflection $methodReflection) : ?string
    {
        if ($methodReflection->getReflection() === null) {
            return null;
        }
        $declaringClass = $methodReflection->getReflection()->getBetterReflection()->getDeclaringClass();
        if ($declaringClass->isTrait()) {
            if ($methodReflection->getDeclaringClass()->isTrait() && $declaringClass->getName() === $methodReflection->getDeclaringClass()->getName()) {
                return null;
            }
            return $declaringClass->getName();
        }
        return null;
    }
    private function inferPrivatePropertyType(string $propertyName, MethodReflection $constructor) : ?Type
    {
        $declaringClassName = $constructor->getDeclaringClass()->getName();
        if (isset($this->inferClassConstructorPropertyTypesInProcess[$declaringClassName])) {
            return null;
        }
        $this->inferClassConstructorPropertyTypesInProcess[$declaringClassName] = \true;
        $propertyTypes = $this->inferAndCachePropertyTypes($constructor);
        unset($this->inferClassConstructorPropertyTypesInProcess[$declaringClassName]);
        if (array_key_exists($propertyName, $propertyTypes)) {
            return $propertyTypes[$propertyName];
        }
        return null;
    }
    /**
     * @return array<string, Type>
     */
    private function inferAndCachePropertyTypes(MethodReflection $constructor) : array
    {
        $declaringClass = $constructor->getDeclaringClass();
        if (isset($this->propertyTypesCache[$declaringClass->getName()])) {
            return $this->propertyTypesCache[$declaringClass->getName()];
        }
        if ($declaringClass->getFileName() === null) {
            return $this->propertyTypesCache[$declaringClass->getName()] = [];
        }
        $fileName = $declaringClass->getFileName();
        $nodes = $this->parser->parseFile($fileName);
        $classNode = $this->findClassNode($declaringClass->getName(), $nodes);
        if ($classNode === null) {
            return $this->propertyTypesCache[$declaringClass->getName()] = [];
        }
        $methodNode = $this->findConstructorNode($constructor->getName(), $classNode->stmts);
        if ($methodNode === null || $methodNode->stmts === null || count($methodNode->stmts) === 0) {
            return $this->propertyTypesCache[$declaringClass->getName()] = [];
        }
        $classNameParts = explode('\\', $declaringClass->getName());
        $namespace = null;
        if (count($classNameParts) > 1) {
            $namespace = implode('\\', array_slice($classNameParts, 0, -1));
        }
        $classScope = $this->scopeFactory->create(ScopeContext::create($fileName));
        if ($namespace !== null) {
            $classScope = $classScope->enterNamespace($namespace);
        }
        $classScope = $classScope->enterClass($declaringClass);
        [$templateTypeMap, $phpDocParameterTypes, $phpDocReturnType, $phpDocThrowType, $deprecatedDescription, $isDeprecated, $isInternal, $isFinal, $isPure, $acceptsNamedArguments, , $phpDocComment, $asserts, $selfOutType, $phpDocParameterOutTypes] = $this->nodeScopeResolver->getPhpDocs($classScope, $methodNode);
        $methodScope = $classScope->enterClassMethod($methodNode, $templateTypeMap, $phpDocParameterTypes, $phpDocReturnType, $phpDocThrowType, $deprecatedDescription, $isDeprecated, $isInternal, $isFinal, $isPure, $acceptsNamedArguments, $asserts, $selfOutType, $phpDocComment, $phpDocParameterOutTypes);
        $propertyTypes = [];
        foreach ($methodNode->stmts as $statement) {
            if (!$statement instanceof Node\Stmt\Expression) {
                continue;
            }
            $expr = $statement->expr;
            if (!$expr instanceof Node\Expr\Assign) {
                continue;
            }
            if (!$expr->var instanceof Node\Expr\PropertyFetch) {
                continue;
            }
            $propertyFetch = $expr->var;
            if (!$propertyFetch->var instanceof Node\Expr\Variable || $propertyFetch->var->name !== 'this' || !$propertyFetch->name instanceof Node\Identifier) {
                continue;
            }
            $propertyType = $methodScope->getType($expr->expr);
            if ($propertyType instanceof ErrorType || $propertyType instanceof NeverType) {
                continue;
            }
            $propertyType = $propertyType->generalize(GeneralizePrecision::lessSpecific());
            if ($propertyType->isConstantArray()->yes()) {
                $propertyType = new ArrayType(new MixedType(\true), new MixedType(\true));
            }
            $propertyTypes[$propertyFetch->name->toString()] = $propertyType;
        }
        return $this->propertyTypesCache[$declaringClass->getName()] = $propertyTypes;
    }
    /**
     * @param Node[] $nodes
     */
    private function findClassNode(string $className, array $nodes) : ?Class_
    {
        foreach ($nodes as $node) {
            if ($node instanceof Class_ && $node->namespacedName !== null && $node->namespacedName->toString() === $className) {
                return $node;
            }
            if (!$node instanceof Namespace_ && !$node instanceof Declare_) {
                continue;
            }
            $subNodeNames = $node->getSubNodeNames();
            foreach ($subNodeNames as $subNodeName) {
                $subNode = $node->{$subNodeName};
                if (!is_array($subNode)) {
                    $subNode = [$subNode];
                }
                $result = $this->findClassNode($className, $subNode);
                if ($result === null) {
                    continue;
                }
                return $result;
            }
        }
        return null;
    }
    /**
     * @param Node\Stmt[] $classStatements
     */
    private function findConstructorNode(string $methodName, array $classStatements) : ?ClassMethod
    {
        foreach ($classStatements as $statement) {
            if ($statement instanceof ClassMethod && $statement->name->toString() === $methodName) {
                return $statement;
            }
        }
        return null;
    }
    private function getPhpDocReturnType(ClassReflection $phpDocBlockClassReflection, ResolvedPhpDocBlock $resolvedPhpDoc, Type $nativeReturnType) : ?Type
    {
        $returnTag = $resolvedPhpDoc->getReturnTag();
        if ($returnTag === null) {
            return null;
        }
        $phpDocReturnType = $returnTag->getType();
        $phpDocReturnType = TemplateTypeHelper::resolveTemplateTypes($phpDocReturnType, $phpDocBlockClassReflection->getActiveTemplateTypeMap());
        if ($returnTag->isExplicit() || $nativeReturnType->isSuperTypeOf($phpDocReturnType)->yes()) {
            return $phpDocReturnType;
        }
        return null;
    }
    /**
     * @param array<int, string> $positionalParameterNames
     * @return array{ResolvedPhpDocBlock, ClassReflection}|null
     */
    private function findMethodPhpDocIncludingAncestors(ClassReflection $declaringClass, string $methodName, array $positionalParameterNames) : ?array
    {
        $declaringClassName = $declaringClass->getName();
        $resolved = $this->stubPhpDocProvider->findMethodPhpDoc($declaringClassName, $methodName, $positionalParameterNames);
        if ($resolved !== null) {
            return [$resolved, $declaringClass];
        }
        if (!$this->stubPhpDocProvider->isKnownClass($declaringClassName)) {
            return null;
        }
        $ancestors = $declaringClass->getAncestors();
        foreach ($ancestors as $ancestor) {
            if ($ancestor->getName() === $declaringClassName) {
                continue;
            }
            if (!$ancestor->hasNativeMethod($methodName)) {
                continue;
            }
            $resolved = $this->stubPhpDocProvider->findMethodPhpDoc($ancestor->getName(), $methodName, $positionalParameterNames);
            if ($resolved === null) {
                continue;
            }
            return [$resolved, $ancestor];
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Php;

use PHPStan\Reflection\AllowedSubTypesClassReflectionExtension;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Type\Enum\EnumCaseObjectType;
use function array_keys;
class EnumAllowedSubTypesClassReflectionExtension implements AllowedSubTypesClassReflectionExtension
{
    public function supports(ClassReflection $classReflection) : bool
    {
        return $classReflection->isEnum();
    }
    public function getAllowedSubTypes(ClassReflection $classReflection) : array
    {
        $cases = [];
        foreach (array_keys($classReflection->getEnumCases()) as $name) {
            $cases[] = new EnumCaseObjectType($classReflection->getName(), $name);
        }
        return $cases;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Php;

use PHPStan\Reflection\Annotations\AnnotationsPropertiesClassReflectionExtension;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Reflection\PropertiesClassReflectionExtension;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Type\MixedType;
class UniversalObjectCratesClassReflectionExtension implements PropertiesClassReflectionExtension
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var string[]
     */
    private $classes;
    /**
     * @var \PHPStan\Reflection\Annotations\AnnotationsPropertiesClassReflectionExtension
     */
    private $annotationClassReflection;
    /**
     * @param string[] $classes
     */
    public function __construct(ReflectionProvider $reflectionProvider, array $classes, AnnotationsPropertiesClassReflectionExtension $annotationClassReflection)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->classes = $classes;
        $this->annotationClassReflection = $annotationClassReflection;
    }
    public function hasProperty(ClassReflection $classReflection, string $propertyName) : bool
    {
        return self::isUniversalObjectCrate($this->reflectionProvider, $this->classes, $classReflection);
    }
    /**
     * @param string[] $classes
     */
    public static function isUniversalObjectCrate(ReflectionProvider $reflectionProvider, array $classes, ClassReflection $classReflection) : bool
    {
        foreach ($classes as $className) {
            if (!$reflectionProvider->hasClass($className)) {
                continue;
            }
            if ($classReflection->getName() === $className || $classReflection->isSubclassOf($className)) {
                return \true;
            }
        }
        return \false;
    }
    public function getProperty(ClassReflection $classReflection, string $propertyName) : PropertyReflection
    {
        if ($this->annotationClassReflection->hasProperty($classReflection, $propertyName)) {
            return $this->annotationClassReflection->getProperty($classReflection, $propertyName);
        }
        if ($classReflection->hasNativeMethod('__get')) {
            $readableType = ParametersAcceptorSelector::selectSingle($classReflection->getNativeMethod('__get')->getVariants())->getReturnType();
        } else {
            $readableType = new MixedType();
        }
        if ($classReflection->hasNativeMethod('__set')) {
            $writableType = ParametersAcceptorSelector::selectSingle($classReflection->getNativeMethod('__set')->getVariants())->getParameters()[1]->getType();
        } else {
            $writableType = new MixedType();
        }
        return new \PHPStan\Reflection\Php\UniversalObjectCrateProperty($classReflection, $readableType, $writableType);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Php;

use PHPStan\Reflection\PropertyReflection;
use PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection;
use PHPStan\Type\Type;
class EnumUnresolvedPropertyPrototypeReflection implements UnresolvedPropertyPrototypeReflection
{
    /**
     * @var \PHPStan\Reflection\Php\EnumPropertyReflection
     */
    private $property;
    public function __construct(\PHPStan\Reflection\Php\EnumPropertyReflection $property)
    {
        $this->property = $property;
    }
    public function doNotResolveTemplateTypeMapToBounds() : UnresolvedPropertyPrototypeReflection
    {
        return $this;
    }
    public function getNakedProperty() : PropertyReflection
    {
        return $this->property;
    }
    public function getTransformedProperty() : PropertyReflection
    {
        return $this->property;
    }
    public function withFechedOnType(Type $type) : UnresolvedPropertyPrototypeReflection
    {
        return $this;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection\Php;

use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection;
use PHPStan\Type\ClosureType;
use PHPStan\Type\Type;
class ClosureCallUnresolvedMethodPrototypeReflection implements UnresolvedMethodPrototypeReflection
{
    /**
     * @var \PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection
     */
    private $prototype;
    /**
     * @var \PHPStan\Type\ClosureType
     */
    private $closure;
    public function __construct(UnresolvedMethodPrototypeReflection $prototype, ClosureType $closure)
    {
        $this->prototype = $prototype;
        $this->closure = $closure;
    }
    public function doNotResolveTemplateTypeMapToBounds() : UnresolvedMethodPrototypeReflection
    {
        return new self($this->prototype->doNotResolveTemplateTypeMapToBounds(), $this->closure);
    }
    public function getNakedMethod() : ExtendedMethodReflection
    {
        return $this->getTransformedMethod();
    }
    public function getTransformedMethod() : ExtendedMethodReflection
    {
        return new \PHPStan\Reflection\Php\ClosureCallMethodReflection($this->prototype->getTransformedMethod(), $this->closure);
    }
    public function withCalledOnType(Type $type) : UnresolvedMethodPrototypeReflection
    {
        return new self($this->prototype->withCalledOnType($type), $this->closure);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Reflection;

use PHPStan\TrinaryLogic;
use PHPStan\Type\Type;
/** @api */
interface FunctionReflection
{
    public function getName() : string;
    public function getFileName() : ?string;
    /**
     * @return ParametersAcceptorWithPhpDocs[]
     */
    public function getVariants() : array;
    public function isDeprecated() : TrinaryLogic;
    public function getDeprecatedDescription() : ?string;
    public function isFinal() : TrinaryLogic;
    public function isInternal() : TrinaryLogic;
    public function getThrowType() : ?Type;
    public function hasSideEffects() : TrinaryLogic;
    public function isBuiltin() : bool;
    public function getAsserts() : \PHPStan\Reflection\Assertions;
    public function getDocComment() : ?string;
    public function returnsByReference() : TrinaryLogic;
}
<?php

declare (strict_types=1);
namespace PHPStan\Broker;

use PhpParser\Node;
use PHPStan\File\FileHelper;
use PHPStan\File\RelativePathHelper;
use PHPStan\ShouldNotHappenException;
use function md5;
use function sprintf;
class AnonymousClassNameHelper
{
    /**
     * @var \PHPStan\File\FileHelper
     */
    private $fileHelper;
    /**
     * @var \PHPStan\File\RelativePathHelper
     */
    private $relativePathHelper;
    public function __construct(FileHelper $fileHelper, RelativePathHelper $relativePathHelper)
    {
        $this->fileHelper = $fileHelper;
        $this->relativePathHelper = $relativePathHelper;
    }
    public function getAnonymousClassName(Node\Stmt\Class_ $classNode, string $filename) : string
    {
        if (isset($classNode->namespacedName)) {
            throw new ShouldNotHappenException();
        }
        $filename = $this->relativePathHelper->getRelativePath($this->fileHelper->normalizePath($filename, '/'));
        return sprintf('AnonymousClass%s', md5(sprintf('%s:%s', $filename, $classNode->getLine())));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Broker;

use PHPStan\DependencyInjection\Container;
use PHPStan\Reflection\ReflectionProvider;
class BrokerFactory
{
    public const PROPERTIES_CLASS_REFLECTION_EXTENSION_TAG = 'phpstan.broker.propertiesClassReflectionExtension';
    public const METHODS_CLASS_REFLECTION_EXTENSION_TAG = 'phpstan.broker.methodsClassReflectionExtension';
    public const ALLOWED_SUB_TYPES_CLASS_REFLECTION_EXTENSION_TAG = 'phpstan.broker.allowedSubTypesClassReflectionExtension';
    public const DYNAMIC_METHOD_RETURN_TYPE_EXTENSION_TAG = 'phpstan.broker.dynamicMethodReturnTypeExtension';
    public const DYNAMIC_STATIC_METHOD_RETURN_TYPE_EXTENSION_TAG = 'phpstan.broker.dynamicStaticMethodReturnTypeExtension';
    public const DYNAMIC_FUNCTION_RETURN_TYPE_EXTENSION_TAG = 'phpstan.broker.dynamicFunctionReturnTypeExtension';
    public const OPERATOR_TYPE_SPECIFYING_EXTENSION_TAG = 'phpstan.broker.operatorTypeSpecifyingExtension';
    /**
     * @var \PHPStan\DependencyInjection\Container
     */
    private $container;
    public function __construct(Container $container)
    {
        $this->container = $container;
    }
    public function create() : \PHPStan\Broker\Broker
    {
        return new \PHPStan\Broker\Broker($this->container->getByType(ReflectionProvider::class), $this->container->getParameter('universalObjectCratesClasses'));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Broker;

use PHPStan\AnalysedCodeException;
use function sprintf;
class ClassNotFoundException extends AnalysedCodeException
{
    /**
     * @var string
     */
    private $className;
    public function __construct(string $className)
    {
        $this->className = $className;
        parent::__construct(sprintf('Class %s was not found while trying to analyse it - discovering symbols is probably not configured properly.', $className));
    }
    public function getClassName() : string
    {
        return $this->className;
    }
    public function getTip() : ?string
    {
        return 'Learn more at https://phpstan.org/user-guide/discovering-symbols';
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Broker;

use PHPStan\AnalysedCodeException;
use Throwable;
use function get_class;
use function sprintf;
class ClassAutoloadingException extends AnalysedCodeException
{
    /**
     * @var string
     */
    private $className;
    public function __construct(string $functionName, ?Throwable $previous = null)
    {
        if ($previous !== null) {
            parent::__construct(sprintf('%s (%s) thrown while looking for class %s.', get_class($previous), $previous->getMessage(), $functionName), 0, $previous);
        } else {
            parent::__construct(sprintf('Class %s not found.', $functionName), 0);
        }
        $this->className = $functionName;
    }
    public function getClassName() : string
    {
        return $this->className;
    }
    public function getTip() : ?string
    {
        return 'Learn more at https://phpstan.org/user-guide/discovering-symbols';
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Broker;

use PHPStan\AnalysedCodeException;
use function sprintf;
class FunctionNotFoundException extends AnalysedCodeException
{
    /**
     * @var string
     */
    private $functionName;
    public function __construct(string $functionName)
    {
        $this->functionName = $functionName;
        parent::__construct(sprintf('Function %s not found while trying to analyse it - discovering symbols is probably not configured properly.', $functionName));
    }
    public function getFunctionName() : string
    {
        return $this->functionName;
    }
    public function getTip() : ?string
    {
        return 'Learn more at https://phpstan.org/user-guide/discovering-symbols';
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Broker;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\GlobalConstantReflection;
use PHPStan\Reflection\NamespaceAnswerer;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\ShouldNotHappenException;
/** @api */
class Broker implements ReflectionProvider
{
    /**
     * @var \PHPStan\Broker\Broker|null
     */
    private static $instance;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var string[]
     */
    private $universalObjectCratesClasses;
    /**
     * @param string[] $universalObjectCratesClasses
     */
    public function __construct(ReflectionProvider $reflectionProvider, array $universalObjectCratesClasses)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->universalObjectCratesClasses = $universalObjectCratesClasses;
    }
    public static function registerInstance(\PHPStan\Broker\Broker $broker) : void
    {
        self::$instance = $broker;
    }
    /**
     * @deprecated Use PHPStan\Reflection\ReflectionProviderStaticAccessor instead
     */
    public static function getInstance() : \PHPStan\Broker\Broker
    {
        if (self::$instance === null) {
            throw new ShouldNotHappenException();
        }
        return self::$instance;
    }
    /**
     * @deprecated Use PHPStan\Reflection\ReflectionProvider instead
     */
    public function hasClass(string $className) : bool
    {
        return $this->reflectionProvider->hasClass($className);
    }
    /**
     * @deprecated Use PHPStan\Reflection\ReflectionProvider instead
     */
    public function getClass(string $className) : ClassReflection
    {
        return $this->reflectionProvider->getClass($className);
    }
    /**
     * @deprecated Use PHPStan\Reflection\ReflectionProvider instead
     */
    public function getClassName(string $className) : string
    {
        return $this->reflectionProvider->getClassName($className);
    }
    /**
     * @deprecated Use PHPStan\Reflection\ReflectionProvider instead
     */
    public function supportsAnonymousClasses() : bool
    {
        return $this->reflectionProvider->supportsAnonymousClasses();
    }
    /**
     * @deprecated Use PHPStan\Reflection\ReflectionProvider instead
     */
    public function getAnonymousClassReflection(Node\Stmt\Class_ $classNode, Scope $scope) : ClassReflection
    {
        return $this->reflectionProvider->getAnonymousClassReflection($classNode, $scope);
    }
    /**
     * @deprecated Use PHPStan\Reflection\ReflectionProvider instead
     */
    public function hasFunction(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer) : bool
    {
        return $this->reflectionProvider->hasFunction($nameNode, $namespaceAnswerer);
    }
    /**
     * @deprecated Use PHPStan\Reflection\ReflectionProvider instead
     */
    public function getFunction(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer) : FunctionReflection
    {
        return $this->reflectionProvider->getFunction($nameNode, $namespaceAnswerer);
    }
    /**
     * @deprecated Use PHPStan\Reflection\ReflectionProvider instead
     */
    public function resolveFunctionName(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer) : ?string
    {
        return $this->reflectionProvider->resolveFunctionName($nameNode, $namespaceAnswerer);
    }
    /**
     * @deprecated Use PHPStan\Reflection\ReflectionProvider instead
     */
    public function hasConstant(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer) : bool
    {
        return $this->reflectionProvider->hasConstant($nameNode, $namespaceAnswerer);
    }
    /**
     * @deprecated Use PHPStan\Reflection\ReflectionProvider instead
     */
    public function getConstant(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer) : GlobalConstantReflection
    {
        return $this->reflectionProvider->getConstant($nameNode, $namespaceAnswerer);
    }
    /**
     * @deprecated Use PHPStan\Reflection\ReflectionProvider instead
     */
    public function resolveConstantName(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer) : ?string
    {
        return $this->reflectionProvider->resolveConstantName($nameNode, $namespaceAnswerer);
    }
    /**
     * @deprecated Inject %universalObjectCratesClasses% parameter instead.
     *
     * @return string[]
     */
    public function getUniversalObjectCratesClasses() : array
    {
        return $this->universalObjectCratesClasses;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Broker;

use PHPStan\AnalysedCodeException;
use function sprintf;
class ConstantNotFoundException extends AnalysedCodeException
{
    /**
     * @var string
     */
    private $constantName;
    public function __construct(string $constantName)
    {
        $this->constantName = $constantName;
        parent::__construct(sprintf('Constant %s not found.', $constantName));
    }
    public function getConstantName() : string
    {
        return $this->constantName;
    }
    public function getTip() : ?string
    {
        return 'Learn more at https://phpstan.org/user-guide/discovering-symbols';
    }
}
<?php

declare (strict_types=1);
namespace PHPStan;

use PHPStan\Type\BooleanType;
use PHPStan\Type\Constant\ConstantBooleanType;
use function array_column;
use function max;
use function min;
/**
 * @api
 * @see https://phpstan.org/developing-extensions/trinary-logic
 */
class TrinaryLogic
{
    private const YES = 1;
    private const MAYBE = 0;
    private const NO = -1;
    /** @var self[] */
    private static $registry = [];
    /**
     * @var int
     */
    private $value;
    private function __construct(int $value)
    {
        $this->value = $value;
    }
    public static function createYes() : self
    {
        return self::$registry[self::YES] = self::$registry[self::YES] ?? new self(self::YES);
    }
    public static function createNo() : self
    {
        return self::$registry[self::NO] = self::$registry[self::NO] ?? new self(self::NO);
    }
    public static function createMaybe() : self
    {
        return self::$registry[self::MAYBE] = self::$registry[self::MAYBE] ?? new self(self::MAYBE);
    }
    public static function createFromBoolean(bool $value) : self
    {
        $yesNo = $value ? self::YES : self::NO;
        return self::$registry[$yesNo] = self::$registry[$yesNo] ?? new self($yesNo);
    }
    private static function create(int $value) : self
    {
        self::$registry[$value] = self::$registry[$value] ?? new self($value);
        return self::$registry[$value];
    }
    public function yes() : bool
    {
        return $this->value === self::YES;
    }
    public function maybe() : bool
    {
        return $this->value === self::MAYBE;
    }
    public function no() : bool
    {
        return $this->value === self::NO;
    }
    public function toBooleanType() : BooleanType
    {
        if ($this->value === self::MAYBE) {
            return new BooleanType();
        }
        return new ConstantBooleanType($this->value === self::YES);
    }
    public function and(self ...$operands) : self
    {
        $operandValues = array_column($operands, 'value');
        $operandValues[] = $this->value;
        return self::create(min($operandValues));
    }
    /**
     * @template T
     * @param T[] $objects
     * @param callable(T): self $callback
     */
    public function lazyAnd(array $objects, callable $callback) : self
    {
        if ($this->no()) {
            return $this;
        }
        $results = [];
        foreach ($objects as $object) {
            $result = $callback($object);
            if ($result->no()) {
                return $result;
            }
            $results[] = $result;
        }
        return $this->and(...$results);
    }
    public function or(self ...$operands) : self
    {
        $operandValues = array_column($operands, 'value');
        $operandValues[] = $this->value;
        return self::create(max($operandValues));
    }
    /**
     * @template T
     * @param T[] $objects
     * @param callable(T): self $callback
     */
    public function lazyOr(array $objects, callable $callback) : self
    {
        if ($this->yes()) {
            return $this;
        }
        $results = [];
        foreach ($objects as $object) {
            $result = $callback($object);
            if ($result->yes()) {
                return $result;
            }
            $results[] = $result;
        }
        return $this->or(...$results);
    }
    public static function extremeIdentity(self ...$operands) : self
    {
        if ($operands === []) {
            throw new \PHPStan\ShouldNotHappenException();
        }
        $operandValues = array_column($operands, 'value');
        $min = min($operandValues);
        $max = max($operandValues);
        return self::create($min === $max ? $min : self::MAYBE);
    }
    /**
     * @template T
     * @param T[] $objects
     * @param callable(T): self $callback
     */
    public static function lazyExtremeIdentity(array $objects, callable $callback) : self
    {
        if ($objects === []) {
            throw new \PHPStan\ShouldNotHappenException();
        }
        $lastResult = null;
        foreach ($objects as $object) {
            $result = $callback($object);
            if ($lastResult === null) {
                $lastResult = $result;
                continue;
            }
            if ($lastResult->equals($result)) {
                continue;
            }
            return self::createMaybe();
        }
        return $lastResult;
    }
    public static function maxMin(self ...$operands) : self
    {
        if ($operands === []) {
            throw new \PHPStan\ShouldNotHappenException();
        }
        $operandValues = array_column($operands, 'value');
        return self::create(max($operandValues) > 0 ? 1 : min($operandValues));
    }
    /**
     * @template T
     * @param T[] $objects
     * @param callable(T): self $callback
     */
    public static function lazyMaxMin(array $objects, callable $callback) : self
    {
        $results = [];
        foreach ($objects as $object) {
            $result = $callback($object);
            if ($result->yes()) {
                return $result;
            }
            $results[] = $result;
        }
        return self::maxMin(...$results);
    }
    public function negate() : self
    {
        return self::create(-$this->value);
    }
    public function equals(self $other) : bool
    {
        return $this === $other;
    }
    public function compareTo(self $other) : ?self
    {
        if ($this->value > $other->value) {
            return $this;
        } elseif ($other->value > $this->value) {
            return $other;
        }
        return null;
    }
    public function describe() : string
    {
        static $labels = [self::NO => 'No', self::MAYBE => 'Maybe', self::YES => 'Yes'];
        return $labels[$this->value];
    }
    /**
     * @param mixed[] $properties
     */
    public static function __set_state(array $properties) : self
    {
        return self::create($properties['value']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Exceptions;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Php\PhpVersion;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
/**
 * @implements Rule<Node\Expr\Throw_>
 */
class ThrowExpressionRule implements Rule
{
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
    }
    public function getNodeType() : string
    {
        return Node\Expr\Throw_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if ($this->phpVersion->supportsThrowExpression()) {
            return [];
        }
        return [RuleErrorBuilder::message('Throw expression is supported only on PHP 8.0 and later.')->nonIgnorable()->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Exceptions;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\MethodReturnStatementsNode;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use function sprintf;
/**
 * @implements Rule<MethodReturnStatementsNode>
 */
class MissingCheckedExceptionInMethodThrowsRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Exceptions\MissingCheckedExceptionInThrowsCheck
     */
    private $check;
    public function __construct(\PHPStan\Rules\Exceptions\MissingCheckedExceptionInThrowsCheck $check)
    {
        $this->check = $check;
    }
    public function getNodeType() : string
    {
        return MethodReturnStatementsNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $statementResult = $node->getStatementResult();
        $methodReflection = $scope->getFunction();
        if (!$methodReflection instanceof MethodReflection) {
            throw new ShouldNotHappenException();
        }
        $errors = [];
        foreach ($this->check->check($methodReflection->getThrowType(), $statementResult->getThrowPoints()) as [$className, $throwPointNode]) {
            $errors[] = RuleErrorBuilder::message(sprintf('Method %s::%s() throws checked exception %s but it\'s missing from the PHPDoc @throws tag.', $methodReflection->getDeclaringClass()->getDisplayName(), $methodReflection->getName(), $className))->line($throwPointNode->getLine())->identifier('exceptions.missingThrowsTag')->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Exceptions;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\CatchWithUnthrownExceptionNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\NeverType;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<CatchWithUnthrownExceptionNode>
 */
class CatchWithUnthrownExceptionRule implements Rule
{
    public function getNodeType() : string
    {
        return CatchWithUnthrownExceptionNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if ($node->getCaughtType() instanceof NeverType) {
            return [RuleErrorBuilder::message(sprintf('Dead catch - %s is already caught above.', $node->getOriginalCaughtType()->describe(VerbosityLevel::typeOnly())))->line($node->getLine())->build()];
        }
        return [RuleErrorBuilder::message(sprintf('Dead catch - %s is never thrown in the try block.', $node->getCaughtType()->describe(VerbosityLevel::typeOnly())))->line($node->getLine())->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Exceptions;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\MethodReturnStatementsNode;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\TypeUtils;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<MethodReturnStatementsNode>
 */
class ThrowsVoidMethodWithExplicitThrowPointRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Exceptions\ExceptionTypeResolver
     */
    private $exceptionTypeResolver;
    /**
     * @var bool
     */
    private $missingCheckedExceptionInThrows;
    public function __construct(\PHPStan\Rules\Exceptions\ExceptionTypeResolver $exceptionTypeResolver, bool $missingCheckedExceptionInThrows)
    {
        $this->exceptionTypeResolver = $exceptionTypeResolver;
        $this->missingCheckedExceptionInThrows = $missingCheckedExceptionInThrows;
    }
    public function getNodeType() : string
    {
        return MethodReturnStatementsNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $statementResult = $node->getStatementResult();
        $methodReflection = $scope->getFunction();
        if (!$methodReflection instanceof MethodReflection) {
            throw new ShouldNotHappenException();
        }
        if ($methodReflection->getThrowType() === null || !$methodReflection->getThrowType()->isVoid()->yes()) {
            return [];
        }
        $errors = [];
        foreach ($statementResult->getThrowPoints() as $throwPoint) {
            if (!$throwPoint->isExplicit()) {
                continue;
            }
            foreach (TypeUtils::flattenTypes($throwPoint->getType()) as $throwPointType) {
                $isCheckedException = TrinaryLogic::createFromBoolean($this->missingCheckedExceptionInThrows)->lazyAnd($throwPointType->getObjectClassNames(), function (string $objectClassName) use($throwPoint) {
                    return TrinaryLogic::createFromBoolean($this->exceptionTypeResolver->isCheckedException($objectClassName, $throwPoint->getScope()));
                });
                if ($isCheckedException->yes()) {
                    continue;
                }
                $errors[] = RuleErrorBuilder::message(sprintf('Method %s::%s() throws exception %s but the PHPDoc contains @throws void.', $methodReflection->getDeclaringClass()->getDisplayName(), $methodReflection->getName(), $throwPointType->describe(VerbosityLevel::typeOnly())))->line($throwPoint->getNode()->getLine())->build();
            }
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Exceptions;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\FunctionReturnStatementsNode;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\TypeUtils;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<FunctionReturnStatementsNode>
 */
class ThrowsVoidFunctionWithExplicitThrowPointRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Exceptions\ExceptionTypeResolver
     */
    private $exceptionTypeResolver;
    /**
     * @var bool
     */
    private $missingCheckedExceptionInThrows;
    public function __construct(\PHPStan\Rules\Exceptions\ExceptionTypeResolver $exceptionTypeResolver, bool $missingCheckedExceptionInThrows)
    {
        $this->exceptionTypeResolver = $exceptionTypeResolver;
        $this->missingCheckedExceptionInThrows = $missingCheckedExceptionInThrows;
    }
    public function getNodeType() : string
    {
        return FunctionReturnStatementsNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $statementResult = $node->getStatementResult();
        $functionReflection = $scope->getFunction();
        if (!$functionReflection instanceof FunctionReflection) {
            throw new ShouldNotHappenException();
        }
        if ($functionReflection->getThrowType() === null || !$functionReflection->getThrowType()->isVoid()->yes()) {
            return [];
        }
        $errors = [];
        foreach ($statementResult->getThrowPoints() as $throwPoint) {
            if (!$throwPoint->isExplicit()) {
                continue;
            }
            foreach (TypeUtils::flattenTypes($throwPoint->getType()) as $throwPointType) {
                $isCheckedException = TrinaryLogic::createFromBoolean($this->missingCheckedExceptionInThrows)->lazyAnd($throwPointType->getObjectClassNames(), function (string $objectClassName) use($throwPoint) {
                    return TrinaryLogic::createFromBoolean($this->exceptionTypeResolver->isCheckedException($objectClassName, $throwPoint->getScope()));
                });
                if ($isCheckedException->yes()) {
                    continue;
                }
                $errors[] = RuleErrorBuilder::message(sprintf('Function %s() throws exception %s but the PHPDoc contains @throws void.', $functionReflection->getName(), $throwPointType->describe(VerbosityLevel::typeOnly())))->line($throwPoint->getNode()->getLine())->build();
            }
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Exceptions;

use _PHPStan_dcc7b7cff\Nette\Utils\Strings;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use function count;
/** @api */
class DefaultExceptionTypeResolver implements \PHPStan\Rules\Exceptions\ExceptionTypeResolver
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var string[]
     */
    private $uncheckedExceptionRegexes;
    /**
     * @var string[]
     */
    private $uncheckedExceptionClasses;
    /**
     * @var string[]
     */
    private $checkedExceptionRegexes;
    /**
     * @var string[]
     */
    private $checkedExceptionClasses;
    /**
     * @param string[] $uncheckedExceptionRegexes
     * @param string[] $uncheckedExceptionClasses
     * @param string[] $checkedExceptionRegexes
     * @param string[] $checkedExceptionClasses
     */
    public function __construct(ReflectionProvider $reflectionProvider, array $uncheckedExceptionRegexes, array $uncheckedExceptionClasses, array $checkedExceptionRegexes, array $checkedExceptionClasses)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->uncheckedExceptionRegexes = $uncheckedExceptionRegexes;
        $this->uncheckedExceptionClasses = $uncheckedExceptionClasses;
        $this->checkedExceptionRegexes = $checkedExceptionRegexes;
        $this->checkedExceptionClasses = $checkedExceptionClasses;
    }
    public function isCheckedException(string $className, Scope $scope) : bool
    {
        foreach ($this->uncheckedExceptionRegexes as $regex) {
            if (Strings::match($className, $regex) !== null) {
                return \false;
            }
        }
        foreach ($this->uncheckedExceptionClasses as $uncheckedExceptionClass) {
            if ($className === $uncheckedExceptionClass) {
                return \false;
            }
        }
        if (!$this->reflectionProvider->hasClass($className)) {
            return $this->isCheckedExceptionInternal($className);
        }
        $classReflection = $this->reflectionProvider->getClass($className);
        foreach ($this->uncheckedExceptionClasses as $uncheckedExceptionClass) {
            if ($classReflection->getName() === $uncheckedExceptionClass) {
                return \false;
            }
            if (!$classReflection->isSubclassOf($uncheckedExceptionClass)) {
                continue;
            }
            return \false;
        }
        return $this->isCheckedExceptionInternal($className);
    }
    private function isCheckedExceptionInternal(string $className) : bool
    {
        foreach ($this->checkedExceptionRegexes as $regex) {
            if (Strings::match($className, $regex) !== null) {
                return \true;
            }
        }
        foreach ($this->checkedExceptionClasses as $checkedExceptionClass) {
            if ($className === $checkedExceptionClass) {
                return \true;
            }
        }
        if (!$this->reflectionProvider->hasClass($className)) {
            return count($this->checkedExceptionRegexes) === 0 && count($this->checkedExceptionClasses) === 0;
        }
        $classReflection = $this->reflectionProvider->getClass($className);
        foreach ($this->checkedExceptionClasses as $checkedExceptionClass) {
            if ($classReflection->getName() === $checkedExceptionClass) {
                return \true;
            }
            if (!$classReflection->isSubclassOf($checkedExceptionClass)) {
                continue;
            }
            return \true;
        }
        return count($this->checkedExceptionRegexes) === 0 && count($this->checkedExceptionClasses) === 0;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Exceptions;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\FinallyExitPointsNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function count;
use function sprintf;
/**
 * @implements Rule<FinallyExitPointsNode>
 */
class OverwrittenExitPointByFinallyRule implements Rule
{
    public function getNodeType() : string
    {
        return FinallyExitPointsNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (count($node->getTryCatchExitPoints()) === 0) {
            return [];
        }
        $errors = [];
        foreach ($node->getTryCatchExitPoints() as $exitPoint) {
            $errors[] = RuleErrorBuilder::message(sprintf('This %s is overwritten by a different one in the finally block below.', $this->describeExitPoint($exitPoint->getStatement())))->line($exitPoint->getStatement()->getLine())->build();
        }
        foreach ($node->getFinallyExitPoints() as $exitPoint) {
            $errors[] = RuleErrorBuilder::message(sprintf('The overwriting %s is on this line.', $this->describeExitPoint($exitPoint->getStatement())))->line($exitPoint->getStatement()->getLine())->build();
        }
        return $errors;
    }
    private function describeExitPoint(Node\Stmt $stmt) : string
    {
        if ($stmt instanceof Node\Stmt\Return_) {
            return 'return';
        }
        if ($stmt instanceof Node\Stmt\Throw_) {
            return 'throw';
        }
        if ($stmt instanceof Node\Stmt\Continue_) {
            return 'continue';
        }
        if ($stmt instanceof Node\Stmt\Break_) {
            return 'break';
        }
        return 'exit point';
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Exceptions;

use PhpParser\Node;
use PhpParser\Node\Stmt\Catch_;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\ClassCaseSensitivityCheck;
use PHPStan\Rules\ClassNameNodePair;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use Throwable;
use function array_merge;
use function sprintf;
/**
 * @implements Rule<Node\Stmt\Catch_>
 */
class CaughtExceptionExistenceRule implements Rule
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Rules\ClassCaseSensitivityCheck
     */
    private $classCaseSensitivityCheck;
    /**
     * @var bool
     */
    private $checkClassCaseSensitivity;
    public function __construct(ReflectionProvider $reflectionProvider, ClassCaseSensitivityCheck $classCaseSensitivityCheck, bool $checkClassCaseSensitivity)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->classCaseSensitivityCheck = $classCaseSensitivityCheck;
        $this->checkClassCaseSensitivity = $checkClassCaseSensitivity;
    }
    public function getNodeType() : string
    {
        return Catch_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $errors = [];
        foreach ($node->types as $class) {
            $className = (string) $class;
            if (!$this->reflectionProvider->hasClass($className)) {
                if ($scope->isInClassExists($className)) {
                    continue;
                }
                $errors[] = RuleErrorBuilder::message(sprintf('Caught class %s not found.', $className))->line($class->getLine())->discoveringSymbolsTip()->build();
                continue;
            }
            $classReflection = $this->reflectionProvider->getClass($className);
            if (!$classReflection->isInterface() && !$classReflection->implementsInterface(Throwable::class)) {
                $errors[] = RuleErrorBuilder::message(sprintf('Caught class %s is not an exception.', $classReflection->getDisplayName()))->line($class->getLine())->build();
            }
            if (!$this->checkClassCaseSensitivity) {
                continue;
            }
            $errors = array_merge($errors, $this->classCaseSensitivityCheck->checkClassNames([new ClassNameNodePair($className, $class)]));
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Exceptions;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\FunctionReturnStatementsNode;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use function sprintf;
/**
 * @implements Rule<FunctionReturnStatementsNode>
 */
class TooWideFunctionThrowTypeRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Exceptions\TooWideThrowTypeCheck
     */
    private $check;
    public function __construct(\PHPStan\Rules\Exceptions\TooWideThrowTypeCheck $check)
    {
        $this->check = $check;
    }
    public function getNodeType() : string
    {
        return FunctionReturnStatementsNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $statementResult = $node->getStatementResult();
        $functionReflection = $scope->getFunction();
        if (!$functionReflection instanceof FunctionReflection) {
            throw new ShouldNotHappenException();
        }
        $throwType = $functionReflection->getThrowType();
        if ($throwType === null) {
            return [];
        }
        $errors = [];
        foreach ($this->check->check($throwType, $statementResult->getThrowPoints()) as $throwClass) {
            $errors[] = RuleErrorBuilder::message(sprintf('Function %s() has %s in PHPDoc @throws tag but it\'s not thrown.', $functionReflection->getName(), $throwClass))->identifier('exceptions.tooWideThrowType')->metadata(['exceptionName' => $throwClass, 'statementDepth' => $node->getAttribute('statementDepth'), 'statementOrder' => $node->getAttribute('statementOrder')])->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Exceptions;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\MethodReturnStatementsNode;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\FileTypeMapper;
use function sprintf;
/**
 * @implements Rule<MethodReturnStatementsNode>
 */
class TooWideMethodThrowTypeRule implements Rule
{
    /**
     * @var \PHPStan\Type\FileTypeMapper
     */
    private $fileTypeMapper;
    /**
     * @var \PHPStan\Rules\Exceptions\TooWideThrowTypeCheck
     */
    private $check;
    public function __construct(FileTypeMapper $fileTypeMapper, \PHPStan\Rules\Exceptions\TooWideThrowTypeCheck $check)
    {
        $this->fileTypeMapper = $fileTypeMapper;
        $this->check = $check;
    }
    public function getNodeType() : string
    {
        return MethodReturnStatementsNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $statementResult = $node->getStatementResult();
        $methodReflection = $scope->getFunction();
        if (!$methodReflection instanceof MethodReflection) {
            throw new ShouldNotHappenException();
        }
        if (!$scope->isInClass()) {
            throw new ShouldNotHappenException();
        }
        $docComment = $node->getDocComment();
        if ($docComment === null) {
            return [];
        }
        $classReflection = $scope->getClassReflection();
        $resolvedPhpDoc = $this->fileTypeMapper->getResolvedPhpDoc($scope->getFile(), $classReflection->getName(), $scope->isInTrait() ? $scope->getTraitReflection()->getName() : null, $methodReflection->getName(), $docComment->getText());
        if ($resolvedPhpDoc->getThrowsTag() === null) {
            return [];
        }
        $throwType = $resolvedPhpDoc->getThrowsTag()->getType();
        $errors = [];
        foreach ($this->check->check($throwType, $statementResult->getThrowPoints()) as $throwClass) {
            $errors[] = RuleErrorBuilder::message(sprintf('Method %s::%s() has %s in PHPDoc @throws tag but it\'s not thrown.', $methodReflection->getDeclaringClass()->getDisplayName(), $methodReflection->getName(), $throwClass))->identifier('exceptions.tooWideThrowType')->metadata(['exceptionName' => $throwClass, 'statementDepth' => $node->getAttribute('statementDepth'), 'statementOrder' => $node->getAttribute('statementOrder')])->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Exceptions;

use PHPStan\Analyser\ThrowPoint;
use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypeUtils;
use PHPStan\Type\VerbosityLevel;
use function array_map;
class TooWideThrowTypeCheck
{
    /**
     * @param ThrowPoint[] $throwPoints
     * @return string[]
     */
    public function check(Type $throwType, array $throwPoints) : array
    {
        if ($throwType->isVoid()->yes()) {
            return [];
        }
        $throwPointType = TypeCombinator::union(...array_map(static function (ThrowPoint $throwPoint) : Type {
            if (!$throwPoint->isExplicit()) {
                return new NeverType();
            }
            return $throwPoint->getType();
        }, $throwPoints));
        $throwClasses = [];
        foreach (TypeUtils::flattenTypes($throwType) as $type) {
            if (!$throwPointType instanceof NeverType && !$type->isSuperTypeOf($throwPointType)->no()) {
                continue;
            }
            $throwClasses[] = $type->describe(VerbosityLevel::typeOnly());
        }
        return $throwClasses;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Exceptions;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\FunctionReturnStatementsNode;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use function sprintf;
/**
 * @implements Rule<FunctionReturnStatementsNode>
 */
class MissingCheckedExceptionInFunctionThrowsRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Exceptions\MissingCheckedExceptionInThrowsCheck
     */
    private $check;
    public function __construct(\PHPStan\Rules\Exceptions\MissingCheckedExceptionInThrowsCheck $check)
    {
        $this->check = $check;
    }
    public function getNodeType() : string
    {
        return FunctionReturnStatementsNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $statementResult = $node->getStatementResult();
        $functionReflection = $scope->getFunction();
        if (!$functionReflection instanceof FunctionReflection) {
            throw new ShouldNotHappenException();
        }
        $errors = [];
        foreach ($this->check->check($functionReflection->getThrowType(), $statementResult->getThrowPoints()) as [$className, $throwPointNode]) {
            $errors[] = RuleErrorBuilder::message(sprintf('Function %s() throws checked exception %s but it\'s missing from the PHPDoc @throws tag.', $functionReflection->getName(), $className))->line($throwPointNode->getLine())->identifier('exceptions.missingThrowsTag')->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Exceptions;

use PHPStan\Analyser\Scope;
/** @api */
interface ExceptionTypeResolver
{
    public function isCheckedException(string $className, Scope $scope) : bool;
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Exceptions;

use PhpParser\Node;
use PHPStan\Analyser\ThrowPoint;
use PHPStan\TrinaryLogic;
use PHPStan\Type\NeverType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeUtils;
use PHPStan\Type\VerbosityLevel;
use Throwable;
class MissingCheckedExceptionInThrowsCheck
{
    /**
     * @var \PHPStan\Rules\Exceptions\ExceptionTypeResolver
     */
    private $exceptionTypeResolver;
    public function __construct(\PHPStan\Rules\Exceptions\ExceptionTypeResolver $exceptionTypeResolver)
    {
        $this->exceptionTypeResolver = $exceptionTypeResolver;
    }
    /**
     * @param ThrowPoint[] $throwPoints
     * @return array<int, array{string, Node\Expr|Node\Stmt}>
     */
    public function check(?Type $throwType, array $throwPoints) : array
    {
        if ($throwType === null) {
            $throwType = new NeverType();
        }
        $classes = [];
        foreach ($throwPoints as $throwPoint) {
            if (!$throwPoint->isExplicit()) {
                continue;
            }
            foreach (TypeUtils::flattenTypes($throwPoint->getType()) as $throwPointType) {
                if ($throwPointType->isSuperTypeOf(new ObjectType(Throwable::class))->yes()) {
                    continue;
                }
                if ($throwType->isSuperTypeOf($throwPointType)->yes()) {
                    continue;
                }
                $isCheckedException = TrinaryLogic::createNo()->lazyOr($throwPointType->getObjectClassNames(), function (string $objectClassName) use($throwPoint) {
                    return TrinaryLogic::createFromBoolean($this->exceptionTypeResolver->isCheckedException($objectClassName, $throwPoint->getScope()));
                });
                if ($isCheckedException->no()) {
                    continue;
                }
                $classes[] = [$throwPointType->describe(VerbosityLevel::typeOnly()), $throwPoint->getNode()];
            }
        }
        return $classes;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Playground;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\MethodReturnStatementsNode;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use function count;
use function sprintf;
/**
 * @implements Rule<MethodReturnStatementsNode>
 */
class MethodNeverRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Playground\NeverRuleHelper
     */
    private $helper;
    public function __construct(\PHPStan\Rules\Playground\NeverRuleHelper $helper)
    {
        $this->helper = $helper;
    }
    public function getNodeType() : string
    {
        return MethodReturnStatementsNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (count($node->getReturnStatements()) > 0) {
            return [];
        }
        $method = $scope->getFunction();
        if (!$method instanceof MethodReflection) {
            throw new ShouldNotHappenException();
        }
        $returnType = ParametersAcceptorSelector::selectSingle($method->getVariants())->getReturnType();
        $helperResult = $this->helper->shouldReturnNever($node, $returnType);
        if ($helperResult === \false) {
            return [];
        }
        return [RuleErrorBuilder::message(sprintf('Method %s::%s() always %s, it should have return type "never".', $method->getDeclaringClass()->getDisplayName(), $method->getName(), count($helperResult) === 0 ? 'throws an exception' : 'terminates script execution'))->identifier('phpstanPlayground.never')->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Playground;

use PhpParser\Node;
use PHPStan\Node\ReturnStatementsNode;
use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
class NeverRuleHelper
{
    /**
     * @return list<Node>|false
     */
    public function shouldReturnNever(ReturnStatementsNode $node, Type $returnType)
    {
        if ($returnType instanceof NeverType && $returnType->isExplicit()) {
            return \false;
        }
        if ($node->isGenerator()) {
            return \false;
        }
        $other = [];
        foreach ($node->getExecutionEnds() as $executionEnd) {
            if ($executionEnd->getStatementResult()->isAlwaysTerminating()) {
                if (!$executionEnd->getNode() instanceof Node\Stmt\Throw_) {
                    $other[] = $executionEnd->getNode();
                }
                continue;
            }
            return \false;
        }
        return $other;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Playground;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\FunctionReturnStatementsNode;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use function count;
use function sprintf;
/**
 * @implements Rule<FunctionReturnStatementsNode>
 */
class FunctionNeverRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Playground\NeverRuleHelper
     */
    private $helper;
    public function __construct(\PHPStan\Rules\Playground\NeverRuleHelper $helper)
    {
        $this->helper = $helper;
    }
    public function getNodeType() : string
    {
        return FunctionReturnStatementsNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (count($node->getReturnStatements()) > 0) {
            return [];
        }
        $function = $scope->getFunction();
        if (!$function instanceof FunctionReflection) {
            throw new ShouldNotHappenException();
        }
        $returnType = ParametersAcceptorSelector::selectSingle($function->getVariants())->getReturnType();
        $helperResult = $this->helper->shouldReturnNever($node, $returnType);
        if ($helperResult === \false) {
            return [];
        }
        return [RuleErrorBuilder::message(sprintf('Function %s() always %s, it should have return type "never".', $function->getName(), count($helperResult) === 0 ? 'throws an exception' : 'terminates script execution'))->identifier('phpstanPlayground.never')->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Operators;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\BenevolentUnionType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\FloatType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\ObjectWithoutClassType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<Node\Expr\BinaryOp>
 */
class InvalidComparisonOperationRule implements Rule
{
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    public function __construct(RuleLevelHelper $ruleLevelHelper)
    {
        $this->ruleLevelHelper = $ruleLevelHelper;
    }
    public function getNodeType() : string
    {
        return Node\Expr\BinaryOp::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node instanceof Node\Expr\BinaryOp\Equal && !$node instanceof Node\Expr\BinaryOp\NotEqual && !$node instanceof Node\Expr\BinaryOp\Smaller && !$node instanceof Node\Expr\BinaryOp\SmallerOrEqual && !$node instanceof Node\Expr\BinaryOp\Greater && !$node instanceof Node\Expr\BinaryOp\GreaterOrEqual && !$node instanceof Node\Expr\BinaryOp\Spaceship) {
            return [];
        }
        if ($this->isNumberType($scope, $node->left) && $this->isNumberType($scope, $node->right)) {
            return [];
        }
        if ($this->isNumberType($scope, $node->left) && ($this->isPossiblyNullableObjectType($scope, $node->right) || $this->isPossiblyNullableArrayType($scope, $node->right)) || $this->isNumberType($scope, $node->right) && ($this->isPossiblyNullableObjectType($scope, $node->left) || $this->isPossiblyNullableArrayType($scope, $node->left))) {
            return [RuleErrorBuilder::message(sprintf('Comparison operation "%s" between %s and %s results in an error.', $node->getOperatorSigil(), $scope->getType($node->left)->describe(VerbosityLevel::value()), $scope->getType($node->right)->describe(VerbosityLevel::value())))->line($node->left->getLine())->build()];
        }
        return [];
    }
    private function isNumberType(Scope $scope, Node\Expr $expr) : bool
    {
        $acceptedType = new UnionType([new IntegerType(), new FloatType()]);
        $onlyNumber = static function (Type $type) use($acceptedType) : bool {
            return $acceptedType->isSuperTypeOf($type)->yes();
        };
        $type = $this->ruleLevelHelper->findTypeToCheck($scope, $expr, '', $onlyNumber)->getType();
        if ($type instanceof ErrorType || !$type->equals($scope->getType($expr))) {
            return \false;
        }
        // SimpleXMLElement can be cast to number union type
        return !$acceptedType->isSuperTypeOf($type)->no() || $acceptedType->equals($type->toNumber());
    }
    private function isPossiblyNullableObjectType(Scope $scope, Node\Expr $expr) : bool
    {
        $acceptedType = new ObjectWithoutClassType();
        $type = $this->ruleLevelHelper->findTypeToCheck($scope, $expr, '', static function (Type $type) use($acceptedType) : bool {
            return $acceptedType->isSuperTypeOf($type)->yes();
        })->getType();
        if ($type instanceof ErrorType) {
            return \false;
        }
        if (TypeCombinator::containsNull($type) && !$type->isNull()->yes()) {
            $type = TypeCombinator::removeNull($type);
        }
        $isSuperType = $acceptedType->isSuperTypeOf($type);
        if ($type instanceof BenevolentUnionType) {
            return !$isSuperType->no();
        }
        return $isSuperType->yes();
    }
    private function isPossiblyNullableArrayType(Scope $scope, Node\Expr $expr) : bool
    {
        $type = $this->ruleLevelHelper->findTypeToCheck($scope, $expr, '', static function (Type $type) : bool {
            return $type->isArray()->yes();
        })->getType();
        if (TypeCombinator::containsNull($type) && !$type->isNull()->yes()) {
            $type = TypeCombinator::removeNull($type);
        }
        return !$type instanceof ErrorType && $type->isArray()->yes();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Operators;

use PhpParser\Node;
use PHPStan\Analyser\MutatingScope;
use PHPStan\Analyser\Scope;
use PHPStan\Node\Printer\ExprPrinter;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
use function strlen;
use function substr;
/**
 * @implements Rule<Node\Expr>
 */
class InvalidBinaryOperationRule implements Rule
{
    /**
     * @var \PHPStan\Node\Printer\ExprPrinter
     */
    private $exprPrinter;
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    public function __construct(ExprPrinter $exprPrinter, RuleLevelHelper $ruleLevelHelper)
    {
        $this->exprPrinter = $exprPrinter;
        $this->ruleLevelHelper = $ruleLevelHelper;
    }
    public function getNodeType() : string
    {
        return Node\Expr::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node instanceof Node\Expr\BinaryOp && !$node instanceof Node\Expr\AssignOp) {
            return [];
        }
        if ($scope->getType($node) instanceof ErrorType) {
            $leftName = '__PHPSTAN__LEFT__';
            $rightName = '__PHPSTAN__RIGHT__';
            $leftVariable = new Node\Expr\Variable($leftName);
            $rightVariable = new Node\Expr\Variable($rightName);
            if ($node instanceof Node\Expr\AssignOp) {
                $newNode = clone $node;
                $newNode->setAttribute('phpstan_cache_printer', null);
                $left = $node->var;
                $right = $node->expr;
                $newNode->var = $leftVariable;
                $newNode->expr = $rightVariable;
            } else {
                $newNode = clone $node;
                $newNode->setAttribute('phpstan_cache_printer', null);
                $left = $node->left;
                $right = $node->right;
                $newNode->left = $leftVariable;
                $newNode->right = $rightVariable;
            }
            if ($node instanceof Node\Expr\AssignOp\Concat || $node instanceof Node\Expr\BinaryOp\Concat) {
                $callback = static function (Type $type) : bool {
                    return !$type->toString() instanceof ErrorType;
                };
            } else {
                $callback = static function (Type $type) : bool {
                    return !$type->toNumber() instanceof ErrorType;
                };
            }
            $leftType = $this->ruleLevelHelper->findTypeToCheck($scope, $left, '', $callback)->getType();
            if ($leftType instanceof ErrorType) {
                return [];
            }
            $rightType = $this->ruleLevelHelper->findTypeToCheck($scope, $right, '', $callback)->getType();
            if ($rightType instanceof ErrorType) {
                return [];
            }
            if (!$scope instanceof MutatingScope) {
                throw new ShouldNotHappenException();
            }
            $scope = $scope->assignVariable($leftName, $leftType, $leftType)->assignVariable($rightName, $rightType, $rightType);
            if (!$scope->getType($newNode) instanceof ErrorType) {
                return [];
            }
            return [RuleErrorBuilder::message(sprintf('Binary operation "%s" between %s and %s results in an error.', substr(substr($this->exprPrinter->printExpr($newNode), strlen($leftName) + 2), 0, -(strlen($rightName) + 2)), $scope->getType($left)->describe(VerbosityLevel::value()), $scope->getType($right)->describe(VerbosityLevel::value())))->line($left->getLine())->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Operators;

use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\Assign;
use PhpParser\Node\Expr\AssignOp;
use PhpParser\Node\Expr\AssignRef;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\NullsafeCheck;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
/**
 * @implements Rule<Expr>
 */
class InvalidAssignVarRule implements Rule
{
    /**
     * @var \PHPStan\Rules\NullsafeCheck
     */
    private $nullsafeCheck;
    public function __construct(NullsafeCheck $nullsafeCheck)
    {
        $this->nullsafeCheck = $nullsafeCheck;
    }
    public function getNodeType() : string
    {
        return Expr::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node instanceof Assign && !$node instanceof AssignOp && !$node instanceof AssignRef) {
            return [];
        }
        if ($this->nullsafeCheck->containsNullSafe($node->var)) {
            return [RuleErrorBuilder::message('Nullsafe operator cannot be on left side of assignment.')->nonIgnorable()->build()];
        }
        if ($node instanceof AssignRef && $this->nullsafeCheck->containsNullSafe($node->expr)) {
            return [RuleErrorBuilder::message('Nullsafe operator cannot be on right side of assignment by reference.')->nonIgnorable()->build()];
        }
        if ($this->containsNonAssignableExpression($node->var)) {
            return [RuleErrorBuilder::message('Expression on left side of assignment is not assignable.')->nonIgnorable()->build()];
        }
        return [];
    }
    private function containsNonAssignableExpression(Expr $expr) : bool
    {
        if ($expr instanceof Expr\Variable) {
            return \false;
        }
        if ($expr instanceof Expr\PropertyFetch) {
            return \false;
        }
        if ($expr instanceof Expr\ArrayDimFetch) {
            return \false;
        }
        if ($expr instanceof Expr\StaticPropertyFetch) {
            return \false;
        }
        if ($expr instanceof Expr\List_ || $expr instanceof Expr\Array_) {
            foreach ($expr->items as $item) {
                if ($item === null) {
                    continue;
                }
                if (!$this->containsNonAssignableExpression($item->value)) {
                    continue;
                }
                return \true;
            }
            return \false;
        }
        return \true;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Operators;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\ErrorType;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<Node\Expr>
 */
class InvalidIncDecOperationRule implements Rule
{
    /**
     * @var bool
     */
    private $checkThisOnly;
    public function __construct(bool $checkThisOnly)
    {
        $this->checkThisOnly = $checkThisOnly;
    }
    public function getNodeType() : string
    {
        return Node\Expr::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node instanceof Node\Expr\PreInc && !$node instanceof Node\Expr\PostInc && !$node instanceof Node\Expr\PreDec && !$node instanceof Node\Expr\PostDec) {
            return [];
        }
        $operatorString = $node instanceof Node\Expr\PreInc || $node instanceof Node\Expr\PostInc ? '++' : '--';
        if (!$node->var instanceof Node\Expr\Variable && !$node->var instanceof Node\Expr\ArrayDimFetch && !$node->var instanceof Node\Expr\PropertyFetch && !$node->var instanceof Node\Expr\StaticPropertyFetch) {
            return [RuleErrorBuilder::message(sprintf('Cannot use %s on a non-variable.', $operatorString))->line($node->var->getLine())->build()];
        }
        if (!$this->checkThisOnly) {
            $varType = $scope->getType($node->var);
            if (!$varType->toString() instanceof ErrorType) {
                return [];
            }
            if (!$varType->toNumber() instanceof ErrorType) {
                return [];
            }
            return [RuleErrorBuilder::message(sprintf('Cannot use %s on %s.', $operatorString, $varType->describe(VerbosityLevel::value())))->line($node->var->getLine())->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Operators;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\ErrorType;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<Node\Expr>
 */
class InvalidUnaryOperationRule implements Rule
{
    public function getNodeType() : string
    {
        return Node\Expr::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node instanceof Node\Expr\UnaryPlus && !$node instanceof Node\Expr\UnaryMinus && !$node instanceof Node\Expr\BitwiseNot) {
            return [];
        }
        if ($scope->getType($node) instanceof ErrorType) {
            if ($node instanceof Node\Expr\UnaryPlus) {
                $operator = '+';
            } elseif ($node instanceof Node\Expr\UnaryMinus) {
                $operator = '-';
            } else {
                $operator = '~';
            }
            return [RuleErrorBuilder::message(sprintf('Unary operation "%s" on %s results in an error.', $operator, $scope->getType($node->expr)->describe(VerbosityLevel::value())))->line($node->expr->getLine())->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\EnumCases;

use Attribute;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\AttributesCheck;
use PHPStan\Rules\Rule;
/**
 * @implements Rule<Node\Stmt\EnumCase>
 */
class EnumCaseAttributesRule implements Rule
{
    /**
     * @var \PHPStan\Rules\AttributesCheck
     */
    private $attributesCheck;
    public function __construct(AttributesCheck $attributesCheck)
    {
        $this->attributesCheck = $attributesCheck;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\EnumCase::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        return $this->attributesCheck->check($scope, $node->attrGroups, Attribute::TARGET_CLASS_CONSTANT, 'class constant');
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Debug;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\VerbosityLevel;
use function count;
use function sprintf;
use function strtolower;
/**
 * @implements Rule<Node\Expr\FuncCall>
 */
class DumpTypeRule implements Rule
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(ReflectionProvider $reflectionProvider)
    {
        $this->reflectionProvider = $reflectionProvider;
    }
    public function getNodeType() : string
    {
        return Node\Expr\FuncCall::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->name instanceof Node\Name) {
            return [];
        }
        $functionName = $this->reflectionProvider->resolveFunctionName($node->name, $scope);
        if ($functionName === null) {
            return [];
        }
        if (strtolower($functionName) !== 'phpstan\\dumptype') {
            return [];
        }
        if (count($node->getArgs()) === 0) {
            return [RuleErrorBuilder::message(sprintf('Missing argument for %s() function call.', $functionName))->nonIgnorable()->build()];
        }
        return [RuleErrorBuilder::message(sprintf('Dumped type: %s', $scope->getType($node->getArgs()[0]->value)->describe(VerbosityLevel::precise())))->nonIgnorable()->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Debug;

use PhpParser\Node;
use PhpParser\Node\Expr\StaticCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\TrinaryLogic;
use PHPStan\Type\VerbosityLevel;
use function count;
use function is_string;
use function sprintf;
/**
 * @implements Rule<Node\Expr\FuncCall>
 */
class FileAssertRule implements Rule
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(ReflectionProvider $reflectionProvider)
    {
        $this->reflectionProvider = $reflectionProvider;
    }
    public function getNodeType() : string
    {
        return Node\Expr\FuncCall::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->name instanceof Node\Name) {
            return [];
        }
        if (!$this->reflectionProvider->hasFunction($node->name, $scope)) {
            return [];
        }
        $function = $this->reflectionProvider->getFunction($node->name, $scope);
        if ($function->getName() === 'PHPStan\\Testing\\assertType') {
            return $this->processAssertType($node->getArgs(), $scope);
        }
        if ($function->getName() === 'PHPStan\\Testing\\assertNativeType') {
            return $this->processAssertNativeType($node->getArgs(), $scope);
        }
        if ($function->getName() === 'PHPStan\\Testing\\assertVariableCertainty') {
            return $this->processAssertVariableCertainty($node->getArgs(), $scope);
        }
        return [];
    }
    /**
     * @param Node\Arg[] $args
     * @return RuleError[]
     */
    private function processAssertType(array $args, Scope $scope) : array
    {
        if (count($args) !== 2) {
            return [];
        }
        $expectedTypeStrings = $scope->getType($args[0]->value)->getConstantStrings();
        if (count($expectedTypeStrings) !== 1) {
            return [RuleErrorBuilder::message('Expected type must be a literal string.')->nonIgnorable()->build()];
        }
        $expressionType = $scope->getType($args[1]->value)->describe(VerbosityLevel::precise());
        if ($expectedTypeStrings[0]->getValue() === $expressionType) {
            return [];
        }
        return [RuleErrorBuilder::message(sprintf('Expected type %s, actual: %s', $expectedTypeStrings[0]->getValue(), $expressionType))->nonIgnorable()->build()];
    }
    /**
     * @param Node\Arg[] $args
     * @return RuleError[]
     */
    private function processAssertNativeType(array $args, Scope $scope) : array
    {
        if (count($args) !== 2) {
            return [];
        }
        $expectedTypeStrings = $scope->getNativeType($args[0]->value)->getConstantStrings();
        if (count($expectedTypeStrings) !== 1) {
            return [RuleErrorBuilder::message('Expected native type must be a literal string.')->nonIgnorable()->build()];
        }
        $expressionType = $scope->getNativeType($args[1]->value)->describe(VerbosityLevel::precise());
        if ($expectedTypeStrings[0]->getValue() === $expressionType) {
            return [];
        }
        return [RuleErrorBuilder::message(sprintf('Expected native type %s, actual: %s', $expectedTypeStrings[0]->getValue(), $expressionType))->nonIgnorable()->build()];
    }
    /**
     * @param Node\Arg[] $args
     * @return RuleError[]
     */
    private function processAssertVariableCertainty(array $args, Scope $scope) : array
    {
        if (count($args) !== 2) {
            return [];
        }
        $certainty = $args[0]->value;
        if (!$certainty instanceof StaticCall) {
            return [RuleErrorBuilder::message('First argument of %s() must be TrinaryLogic call')->nonIgnorable()->build()];
        }
        if (!$certainty->class instanceof Node\Name) {
            return [RuleErrorBuilder::message('Invalid TrinaryLogic call.')->nonIgnorable()->build()];
        }
        if ($certainty->class->toString() !== 'PHPStan\\TrinaryLogic') {
            return [RuleErrorBuilder::message('Invalid TrinaryLogic call.')->nonIgnorable()->build()];
        }
        if (!$certainty->name instanceof Node\Identifier) {
            return [RuleErrorBuilder::message('Invalid TrinaryLogic call.')->nonIgnorable()->build()];
        }
        // @phpstan-ignore-next-line
        $expectedCertaintyValue = TrinaryLogic::{$certainty->name->toString()}();
        $variable = $args[1]->value;
        if (!$variable instanceof Node\Expr\Variable) {
            return [RuleErrorBuilder::message('Invalid assertVariableCertainty call.')->nonIgnorable()->build()];
        }
        if (!is_string($variable->name)) {
            return [RuleErrorBuilder::message('Invalid assertVariableCertainty call.')->nonIgnorable()->build()];
        }
        $actualCertaintyValue = $scope->hasVariableType($variable->name);
        if ($expectedCertaintyValue->equals($actualCertaintyValue)) {
            return [];
        }
        return [RuleErrorBuilder::message(sprintf('Expected variable certainty %s, actual: %s', $expectedCertaintyValue->describe(), $actualCertaintyValue->describe()))->nonIgnorable()->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\ClassPropertiesNode;
use PHPStan\Reflection\ConstructorsHelper;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use function sprintf;
/**
 * @implements Rule<ClassPropertiesNode>
 */
class UninitializedPropertyRule implements Rule
{
    /**
     * @var \PHPStan\Reflection\ConstructorsHelper
     */
    private $constructorsHelper;
    public function __construct(ConstructorsHelper $constructorsHelper)
    {
        $this->constructorsHelper = $constructorsHelper;
    }
    public function getNodeType() : string
    {
        return ClassPropertiesNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$scope->isInClass()) {
            throw new ShouldNotHappenException();
        }
        $classReflection = $scope->getClassReflection();
        [$properties, $prematureAccess] = $node->getUninitializedProperties($scope, $this->constructorsHelper->getConstructors($classReflection));
        $errors = [];
        foreach ($properties as $propertyName => $propertyNode) {
            if ($propertyNode->isReadOnly() || $propertyNode->isReadOnlyByPhpDoc()) {
                continue;
            }
            $errors[] = RuleErrorBuilder::message(sprintf('Class %s has an uninitialized property $%s. Give it default value or assign it in the constructor.', $classReflection->getDisplayName(), $propertyName))->line($propertyNode->getLine())->build();
        }
        foreach ($prematureAccess as [$propertyName, $line, $propertyNode]) {
            if ($propertyNode->isReadOnly() || $propertyNode->isReadOnlyByPhpDoc()) {
                continue;
            }
            $errors[] = RuleErrorBuilder::message(sprintf('Access to an uninitialized property %s::$%s.', $classReflection->getDisplayName(), $propertyName))->line($line)->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\PropertyAssignNode;
use PHPStan\Reflection\ConstructorsHelper;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\ThisType;
use function in_array;
use function sprintf;
use function strtolower;
/**
 * @implements Rule<PropertyAssignNode>
 */
class ReadOnlyByPhpDocPropertyAssignRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Properties\PropertyReflectionFinder
     */
    private $propertyReflectionFinder;
    /**
     * @var \PHPStan\Reflection\ConstructorsHelper
     */
    private $constructorsHelper;
    public function __construct(\PHPStan\Rules\Properties\PropertyReflectionFinder $propertyReflectionFinder, ConstructorsHelper $constructorsHelper)
    {
        $this->propertyReflectionFinder = $propertyReflectionFinder;
        $this->constructorsHelper = $constructorsHelper;
    }
    public function getNodeType() : string
    {
        return PropertyAssignNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $propertyFetch = $node->getPropertyFetch();
        if (!$propertyFetch instanceof Node\Expr\PropertyFetch) {
            return [];
        }
        $errors = [];
        $reflections = $this->propertyReflectionFinder->findPropertyReflectionsFromNode($propertyFetch, $scope);
        foreach ($reflections as $propertyReflection) {
            $nativeReflection = $propertyReflection->getNativeReflection();
            if ($nativeReflection === null) {
                continue;
            }
            if (!$scope->canAccessProperty($propertyReflection)) {
                continue;
            }
            if (!$nativeReflection->isReadOnlyByPhpDoc() || $nativeReflection->isReadOnly()) {
                continue;
            }
            $declaringClass = $nativeReflection->getDeclaringClass();
            if (!$scope->isInClass()) {
                $errors[] = RuleErrorBuilder::message(sprintf('@readonly property %s::$%s is assigned outside of its declaring class.', $declaringClass->getDisplayName(), $propertyReflection->getName()))->build();
                continue;
            }
            $scopeClassReflection = $scope->getClassReflection();
            if ($scopeClassReflection->getName() !== $declaringClass->getName()) {
                $errors[] = RuleErrorBuilder::message(sprintf('@readonly property %s::$%s is assigned outside of its declaring class.', $declaringClass->getDisplayName(), $propertyReflection->getName()))->build();
                continue;
            }
            $scopeMethod = $scope->getFunction();
            if (!$scopeMethod instanceof MethodReflection) {
                throw new ShouldNotHappenException();
            }
            if (in_array($scopeMethod->getName(), $this->constructorsHelper->getConstructors($scopeClassReflection), \true) || strtolower($scopeMethod->getName()) === '__unserialize') {
                if (!$scope->getType($propertyFetch->var) instanceof ThisType) {
                    $errors[] = RuleErrorBuilder::message(sprintf('@readonly property %s::$%s is not assigned on $this.', $declaringClass->getDisplayName(), $propertyReflection->getName()))->build();
                }
                continue;
            }
            if ($nativeReflection->isAllowedPrivateMutation()) {
                continue;
            }
            $errors[] = RuleErrorBuilder::message(sprintf('@readonly property %s::$%s is assigned outside of the constructor.', $declaringClass->getDisplayName(), $propertyReflection->getName()))->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\ClassPropertyNode;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\Php\PhpPropertyReflection;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\ParserNodeTypeToPHPStanType;
use PHPStan\Type\VerbosityLevel;
use function array_merge;
use function count;
use function sprintf;
/**
 * @implements Rule<ClassPropertyNode>
 */
class OverridingPropertyRule implements Rule
{
    /**
     * @var bool
     */
    private $checkPhpDocMethodSignatures;
    /**
     * @var bool
     */
    private $reportMaybes;
    public function __construct(bool $checkPhpDocMethodSignatures, bool $reportMaybes)
    {
        $this->checkPhpDocMethodSignatures = $checkPhpDocMethodSignatures;
        $this->reportMaybes = $reportMaybes;
    }
    public function getNodeType() : string
    {
        return ClassPropertyNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$scope->isInClass()) {
            throw new ShouldNotHappenException();
        }
        $classReflection = $scope->getClassReflection();
        $prototype = $this->findPrototype($classReflection, $node->getName());
        if ($prototype === null) {
            return [];
        }
        $errors = [];
        if ($prototype->isStatic()) {
            if (!$node->isStatic()) {
                $errors[] = RuleErrorBuilder::message(sprintf('Non-static property %s::$%s overrides static property %s::$%s.', $classReflection->getDisplayName(), $node->getName(), $prototype->getDeclaringClass()->getDisplayName(), $node->getName()))->nonIgnorable()->build();
            }
        } elseif ($node->isStatic()) {
            $errors[] = RuleErrorBuilder::message(sprintf('Static property %s::$%s overrides non-static property %s::$%s.', $classReflection->getDisplayName(), $node->getName(), $prototype->getDeclaringClass()->getDisplayName(), $node->getName()))->nonIgnorable()->build();
        }
        if ($prototype->isReadOnly()) {
            if (!$node->isReadOnly()) {
                $errors[] = RuleErrorBuilder::message(sprintf('Readwrite property %s::$%s overrides readonly property %s::$%s.', $classReflection->getDisplayName(), $node->getName(), $prototype->getDeclaringClass()->getDisplayName(), $node->getName()))->nonIgnorable()->build();
            }
        } elseif ($node->isReadOnly()) {
            $errors[] = RuleErrorBuilder::message(sprintf('Readonly property %s::$%s overrides readwrite property %s::$%s.', $classReflection->getDisplayName(), $node->getName(), $prototype->getDeclaringClass()->getDisplayName(), $node->getName()))->nonIgnorable()->build();
        }
        if ($prototype->isPublic()) {
            if (!$node->isPublic()) {
                $errors[] = RuleErrorBuilder::message(sprintf('%s property %s::$%s overriding public property %s::$%s should also be public.', $node->isPrivate() ? 'Private' : 'Protected', $classReflection->getDisplayName(), $node->getName(), $prototype->getDeclaringClass()->getDisplayName(), $node->getName()))->nonIgnorable()->build();
            }
        } elseif ($node->isPrivate()) {
            $errors[] = RuleErrorBuilder::message(sprintf('Private property %s::$%s overriding protected property %s::$%s should be protected or public.', $classReflection->getDisplayName(), $node->getName(), $prototype->getDeclaringClass()->getDisplayName(), $node->getName()))->nonIgnorable()->build();
        }
        $typeErrors = [];
        if ($prototype->hasNativeType()) {
            if ($node->getNativeType() === null) {
                $typeErrors[] = RuleErrorBuilder::message(sprintf('Property %s::$%s overriding property %s::$%s (%s) should also have native type %s.', $classReflection->getDisplayName(), $node->getName(), $prototype->getDeclaringClass()->getDisplayName(), $node->getName(), $prototype->getNativeType()->describe(VerbosityLevel::typeOnly()), $prototype->getNativeType()->describe(VerbosityLevel::typeOnly())))->nonIgnorable()->build();
            } else {
                $nativeType = ParserNodeTypeToPHPStanType::resolve($node->getNativeType(), $scope->getClassReflection());
                if (!$prototype->getNativeType()->equals($nativeType)) {
                    $typeErrors[] = RuleErrorBuilder::message(sprintf('Type %s of property %s::$%s is not the same as type %s of overridden property %s::$%s.', $nativeType->describe(VerbosityLevel::typeOnly()), $classReflection->getDisplayName(), $node->getName(), $prototype->getNativeType()->describe(VerbosityLevel::typeOnly()), $prototype->getDeclaringClass()->getDisplayName(), $node->getName()))->nonIgnorable()->build();
                }
            }
        } elseif ($node->getNativeType() !== null) {
            $typeErrors[] = RuleErrorBuilder::message(sprintf('Property %s::$%s (%s) overriding property %s::$%s should not have a native type.', $classReflection->getDisplayName(), $node->getName(), ParserNodeTypeToPHPStanType::resolve($node->getNativeType(), $scope->getClassReflection())->describe(VerbosityLevel::typeOnly()), $prototype->getDeclaringClass()->getDisplayName(), $node->getName()))->nonIgnorable()->build();
        }
        $errors = array_merge($errors, $typeErrors);
        if (!$this->checkPhpDocMethodSignatures) {
            return $errors;
        }
        if (count($typeErrors) > 0) {
            return $errors;
        }
        $propertyReflection = $classReflection->getNativeProperty($node->getName());
        if ($prototype->getReadableType()->equals($propertyReflection->getReadableType())) {
            return $errors;
        }
        $verbosity = VerbosityLevel::getRecommendedLevelByType($prototype->getReadableType(), $propertyReflection->getReadableType());
        $isSuperType = $prototype->getReadableType()->isSuperTypeOf($propertyReflection->getReadableType());
        $canBeTurnedOffError = RuleErrorBuilder::message(sprintf('PHPDoc type %s of property %s::$%s is not the same as PHPDoc type %s of overridden property %s::$%s.', $propertyReflection->getReadableType()->describe($verbosity), $classReflection->getDisplayName(), $node->getName(), $prototype->getReadableType()->describe($verbosity), $prototype->getDeclaringClass()->getDisplayName(), $node->getName()))->tip(sprintf("You can fix 3rd party PHPDoc types with stub files:\n   %s\n   This error can be turned off by setting\n   %s", '<fg=cyan>https://phpstan.org/user-guide/stub-files</>', '<fg=cyan>reportMaybesInPropertyPhpDocTypes: false</> in your <fg=cyan>%configurationFile%</>.'))->build();
        $cannotBeTurnedOffError = RuleErrorBuilder::message(sprintf('PHPDoc type %s of property %s::$%s is %s PHPDoc type %s of overridden property %s::$%s.', $propertyReflection->getReadableType()->describe($verbosity), $classReflection->getDisplayName(), $node->getName(), $this->reportMaybes ? 'not the same as' : 'not covariant with', $prototype->getReadableType()->describe($verbosity), $prototype->getDeclaringClass()->getDisplayName(), $node->getName()))->tip(sprintf("You can fix 3rd party PHPDoc types with stub files:\n   %s", '<fg=cyan>https://phpstan.org/user-guide/stub-files</>'))->build();
        if ($this->reportMaybes) {
            if (!$isSuperType->yes()) {
                $errors[] = $cannotBeTurnedOffError;
            } else {
                $errors[] = $canBeTurnedOffError;
            }
        } else {
            if (!$isSuperType->yes()) {
                $errors[] = $cannotBeTurnedOffError;
            }
        }
        return $errors;
    }
    private function findPrototype(ClassReflection $classReflection, string $propertyName) : ?PhpPropertyReflection
    {
        $parentClass = $classReflection->getParentClass();
        if ($parentClass === null) {
            return null;
        }
        if (!$parentClass->hasNativeProperty($propertyName)) {
            return null;
        }
        $property = $parentClass->getNativeProperty($propertyName);
        if ($property->isPrivate()) {
            return null;
        }
        return $property;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\ClassPropertyNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
/**
 * @implements Rule<ClassPropertyNode>
 */
class ReadOnlyByPhpDocPropertyRule implements Rule
{
    public function getNodeType() : string
    {
        return ClassPropertyNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!($node->isReadOnlyByPhpDoc() && !$node->isAllowedPrivateMutation()) || $node->isReadOnly()) {
            return [];
        }
        $errors = [];
        if ($node->getDefault() !== null) {
            $errors[] = RuleErrorBuilder::message('@readonly property cannot have a default value.')->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\ClassPropertyNode;
use PHPStan\Rules\MissingTypehintCheck;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\MixedType;
use PHPStan\Type\VerbosityLevel;
use function implode;
use function sprintf;
/**
 * @implements Rule<ClassPropertyNode>
 */
final class MissingPropertyTypehintRule implements Rule
{
    /**
     * @var \PHPStan\Rules\MissingTypehintCheck
     */
    private $missingTypehintCheck;
    public function __construct(MissingTypehintCheck $missingTypehintCheck)
    {
        $this->missingTypehintCheck = $missingTypehintCheck;
    }
    public function getNodeType() : string
    {
        return ClassPropertyNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$scope->isInClass()) {
            throw new ShouldNotHappenException();
        }
        $propertyReflection = $scope->getClassReflection()->getNativeProperty($node->getName());
        if ($propertyReflection->isPromoted()) {
            return [];
        }
        $propertyType = $propertyReflection->getReadableType();
        if ($propertyType instanceof MixedType && !$propertyType->isExplicitMixed()) {
            return [RuleErrorBuilder::message(sprintf('Property %s::$%s has no type specified.', $propertyReflection->getDeclaringClass()->getDisplayName(), $node->getName()))->build()];
        }
        $messages = [];
        foreach ($this->missingTypehintCheck->getIterableTypesWithMissingValueTypehint($propertyType) as $iterableType) {
            $iterableTypeDescription = $iterableType->describe(VerbosityLevel::typeOnly());
            $messages[] = RuleErrorBuilder::message(sprintf('Property %s::$%s type has no value type specified in iterable type %s.', $propertyReflection->getDeclaringClass()->getDisplayName(), $node->getName(), $iterableTypeDescription))->tip(MissingTypehintCheck::MISSING_ITERABLE_VALUE_TYPE_TIP)->build();
        }
        foreach ($this->missingTypehintCheck->getNonGenericObjectTypesWithGenericClass($propertyType) as [$name, $genericTypeNames]) {
            $messages[] = RuleErrorBuilder::message(sprintf('Property %s::$%s with generic %s does not specify its types: %s', $propertyReflection->getDeclaringClass()->getDisplayName(), $node->getName(), $name, implode(', ', $genericTypeNames)))->tip(MissingTypehintCheck::TURN_OFF_NON_GENERIC_CHECK_TIP)->build();
        }
        foreach ($this->missingTypehintCheck->getCallablesWithMissingSignature($propertyType) as $callableType) {
            $messages[] = RuleErrorBuilder::message(sprintf('Property %s::$%s type has no signature specified for %s.', $propertyReflection->getDeclaringClass()->getDisplayName(), $node->getName(), $callableType->describe(VerbosityLevel::typeOnly())))->build();
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\PropertyAssignNode;
use PHPStan\Rules\Rule;
/**
 * @implements Rule<PropertyAssignNode>
 */
class AccessPropertiesInAssignRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Properties\AccessPropertiesRule
     */
    private $accessPropertiesRule;
    public function __construct(\PHPStan\Rules\Properties\AccessPropertiesRule $accessPropertiesRule)
    {
        $this->accessPropertiesRule = $accessPropertiesRule;
    }
    public function getNodeType() : string
    {
        return PropertyAssignNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->getPropertyFetch() instanceof Node\Expr\PropertyFetch) {
            return [];
        }
        if ($node->isAssignOp()) {
            return [];
        }
        return $this->accessPropertiesRule->processNode($node->getPropertyFetch(), $scope);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use function sprintf;
/**
 * @implements Rule<Node\Expr>
 */
class ReadingWriteOnlyPropertiesRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Properties\PropertyDescriptor
     */
    private $propertyDescriptor;
    /**
     * @var \PHPStan\Rules\Properties\PropertyReflectionFinder
     */
    private $propertyReflectionFinder;
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    /**
     * @var bool
     */
    private $checkThisOnly;
    public function __construct(\PHPStan\Rules\Properties\PropertyDescriptor $propertyDescriptor, \PHPStan\Rules\Properties\PropertyReflectionFinder $propertyReflectionFinder, RuleLevelHelper $ruleLevelHelper, bool $checkThisOnly)
    {
        $this->propertyDescriptor = $propertyDescriptor;
        $this->propertyReflectionFinder = $propertyReflectionFinder;
        $this->ruleLevelHelper = $ruleLevelHelper;
        $this->checkThisOnly = $checkThisOnly;
    }
    public function getNodeType() : string
    {
        return Node\Expr::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node instanceof Node\Expr\PropertyFetch && !$node instanceof Node\Expr\StaticPropertyFetch) {
            return [];
        }
        if ($node instanceof Node\Expr\PropertyFetch && $this->checkThisOnly && !$this->ruleLevelHelper->isThis($node->var)) {
            return [];
        }
        if ($scope->isInExpressionAssign($node)) {
            return [];
        }
        $propertyReflection = $this->propertyReflectionFinder->findPropertyReflectionFromNode($node, $scope);
        if ($propertyReflection === null) {
            return [];
        }
        if (!$scope->canAccessProperty($propertyReflection)) {
            return [];
        }
        if (!$propertyReflection->isReadable()) {
            $propertyDescription = $this->propertyDescriptor->describeProperty($propertyReflection, $scope, $node);
            return [RuleErrorBuilder::message(sprintf('%s is not readable.', $propertyDescription))->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\ClassPropertiesNode;
use PHPStan\Reflection\ConstructorsHelper;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use function sprintf;
/**
 * @implements Rule<ClassPropertiesNode>
 */
class MissingReadOnlyByPhpDocPropertyAssignRule implements Rule
{
    /**
     * @var \PHPStan\Reflection\ConstructorsHelper
     */
    private $constructorsHelper;
    public function __construct(ConstructorsHelper $constructorsHelper)
    {
        $this->constructorsHelper = $constructorsHelper;
    }
    public function getNodeType() : string
    {
        return ClassPropertiesNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$scope->isInClass()) {
            throw new ShouldNotHappenException();
        }
        $classReflection = $scope->getClassReflection();
        [$properties, $prematureAccess, $additionalAssigns] = $node->getUninitializedProperties($scope, $this->constructorsHelper->getConstructors($classReflection));
        $errors = [];
        foreach ($properties as $propertyName => $propertyNode) {
            if (!$propertyNode->isReadOnlyByPhpDoc() || $propertyNode->isReadOnly()) {
                continue;
            }
            $errors[] = RuleErrorBuilder::message(sprintf('Class %s has an uninitialized @readonly property $%s. Assign it in the constructor.', $classReflection->getDisplayName(), $propertyName))->line($propertyNode->getLine())->build();
        }
        foreach ($prematureAccess as [$propertyName, $line, $propertyNode]) {
            if (!$propertyNode->isReadOnlyByPhpDoc() || $propertyNode->isReadOnly()) {
                continue;
            }
            $errors[] = RuleErrorBuilder::message(sprintf('Access to an uninitialized @readonly property %s::$%s.', $classReflection->getDisplayName(), $propertyName))->line($line)->build();
        }
        foreach ($additionalAssigns as [$propertyName, $line, $propertyNode]) {
            if (!$propertyNode->isReadOnlyByPhpDoc() || $propertyNode->isReadOnly()) {
                continue;
            }
            $errors[] = RuleErrorBuilder::message(sprintf('@readonly property %s::$%s is already assigned.', $classReflection->getDisplayName(), $propertyName))->line($line)->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\ClassPropertiesNode;
use PHPStan\Reflection\ConstructorsHelper;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use function sprintf;
/**
 * @implements Rule<ClassPropertiesNode>
 */
class MissingReadOnlyPropertyAssignRule implements Rule
{
    /**
     * @var \PHPStan\Reflection\ConstructorsHelper
     */
    private $constructorsHelper;
    public function __construct(ConstructorsHelper $constructorsHelper)
    {
        $this->constructorsHelper = $constructorsHelper;
    }
    public function getNodeType() : string
    {
        return ClassPropertiesNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$scope->isInClass()) {
            throw new ShouldNotHappenException();
        }
        $classReflection = $scope->getClassReflection();
        [$properties, $prematureAccess, $additionalAssigns] = $node->getUninitializedProperties($scope, $this->constructorsHelper->getConstructors($classReflection));
        $errors = [];
        foreach ($properties as $propertyName => $propertyNode) {
            if (!$propertyNode->isReadOnly()) {
                continue;
            }
            $errors[] = RuleErrorBuilder::message(sprintf('Class %s has an uninitialized readonly property $%s. Assign it in the constructor.', $classReflection->getDisplayName(), $propertyName))->line($propertyNode->getLine())->build();
        }
        foreach ($prematureAccess as [$propertyName, $line, $propertyNode]) {
            if (!$propertyNode->isReadOnly()) {
                continue;
            }
            $errors[] = RuleErrorBuilder::message(sprintf('Access to an uninitialized readonly property %s::$%s.', $classReflection->getDisplayName(), $propertyName))->line($line)->build();
        }
        foreach ($additionalAssigns as [$propertyName, $line, $propertyNode]) {
            if (!$propertyNode->isReadOnly()) {
                continue;
            }
            $errors[] = RuleErrorBuilder::message(sprintf('Readonly property %s::$%s is already assigned.', $classReflection->getDisplayName(), $propertyName))->line($line)->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function sprintf;
/**
 * @implements Rule<Node\Expr\AssignRef>
 */
class ReadOnlyByPhpDocPropertyAssignRefRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Properties\PropertyReflectionFinder
     */
    private $propertyReflectionFinder;
    public function __construct(\PHPStan\Rules\Properties\PropertyReflectionFinder $propertyReflectionFinder)
    {
        $this->propertyReflectionFinder = $propertyReflectionFinder;
    }
    public function getNodeType() : string
    {
        return Node\Expr\AssignRef::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->expr instanceof Node\Expr\PropertyFetch && !$node->expr instanceof Node\Expr\StaticPropertyFetch) {
            return [];
        }
        $propertyFetch = $node->expr;
        $errors = [];
        $reflections = $this->propertyReflectionFinder->findPropertyReflectionsFromNode($propertyFetch, $scope);
        foreach ($reflections as $propertyReflection) {
            $nativeReflection = $propertyReflection->getNativeReflection();
            if ($nativeReflection === null) {
                continue;
            }
            if (!$scope->canAccessProperty($propertyReflection)) {
                continue;
            }
            if (!$nativeReflection->isReadOnlyByPhpDoc() || $nativeReflection->isReadOnly()) {
                continue;
            }
            $declaringClass = $nativeReflection->getDeclaringClass();
            $errors[] = RuleErrorBuilder::message(sprintf('@readonly property %s::$%s is assigned by reference.', $declaringClass->getDisplayName(), $propertyReflection->getName()))->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\ClassPropertyNode;
use PHPStan\Php\PhpVersion;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
/**
 * @implements Rule<ClassPropertyNode>
 */
class ReadOnlyPropertyRule implements Rule
{
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
    }
    public function getNodeType() : string
    {
        return ClassPropertyNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->isReadOnly()) {
            return [];
        }
        $errors = [];
        if (!$this->phpVersion->supportsReadOnlyProperties()) {
            $errors[] = RuleErrorBuilder::message('Readonly properties are supported only on PHP 8.1 and later.')->nonIgnorable()->build();
        }
        if ($node->getNativeType() === null) {
            $errors[] = RuleErrorBuilder::message('Readonly property must have a native type.')->nonIgnorable()->build();
        }
        if ($node->getDefault() !== null) {
            $errors[] = RuleErrorBuilder::message('Readonly property cannot have a default value.')->nonIgnorable()->build();
        }
        if ($node->isStatic()) {
            $errors[] = RuleErrorBuilder::message('Readonly property cannot be static.')->nonIgnorable()->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Type\ObjectType;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
class PropertyDescriptor
{
    /**
     * @param Node\Expr\PropertyFetch|Node\Expr\StaticPropertyFetch $propertyFetch
     */
    public function describeProperty(PropertyReflection $property, Scope $scope, $propertyFetch) : string
    {
        if ($propertyFetch instanceof Node\Expr\PropertyFetch) {
            $fetchedOnType = $scope->getType($propertyFetch->var);
            $declaringClassType = new ObjectType($property->getDeclaringClass()->getName());
            if ($declaringClassType->isSuperTypeOf($fetchedOnType)->yes()) {
                $classDescription = $property->getDeclaringClass()->getDisplayName();
            } else {
                $classDescription = $fetchedOnType->describe(VerbosityLevel::typeOnly());
            }
        } else {
            $classDescription = $property->getDeclaringClass()->getDisplayName();
        }
        /** @var Node\Identifier $name */
        $name = $propertyFetch->name;
        if (!$property->isStatic()) {
            return sprintf('Property %s::$%s', $classDescription, $name->name);
        }
        return sprintf('Static property %s::$%s', $classDescription, $name->name);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

interface ReadWritePropertiesExtensionProvider
{
    public const EXTENSION_TAG = 'phpstan.properties.readWriteExtension';
    /**
     * @return ReadWritePropertiesExtension[]
     */
    public function getExtensions() : array;
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\PropertyAssignNode;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\VerbosityLevel;
use function array_merge;
use function sprintf;
/**
 * @implements Rule<PropertyAssignNode>
 */
class TypesAssignedToPropertiesRule implements Rule
{
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    /**
     * @var \PHPStan\Rules\Properties\PropertyReflectionFinder
     */
    private $propertyReflectionFinder;
    public function __construct(RuleLevelHelper $ruleLevelHelper, \PHPStan\Rules\Properties\PropertyReflectionFinder $propertyReflectionFinder)
    {
        $this->ruleLevelHelper = $ruleLevelHelper;
        $this->propertyReflectionFinder = $propertyReflectionFinder;
    }
    public function getNodeType() : string
    {
        return PropertyAssignNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $propertyReflections = $this->propertyReflectionFinder->findPropertyReflectionsFromNode($node->getPropertyFetch(), $scope);
        $errors = [];
        foreach ($propertyReflections as $propertyReflection) {
            $errors = array_merge($errors, $this->processSingleProperty($propertyReflection, $node->getAssignedExpr()));
        }
        return $errors;
    }
    /**
     * @return RuleError[]
     */
    private function processSingleProperty(\PHPStan\Rules\Properties\FoundPropertyReflection $propertyReflection, Node\Expr $assignedExpr) : array
    {
        if (!$propertyReflection->isWritable()) {
            return [];
        }
        $propertyType = $propertyReflection->getWritableType();
        $scope = $propertyReflection->getScope();
        $assignedValueType = $scope->getType($assignedExpr);
        $accepts = $this->ruleLevelHelper->acceptsWithReason($propertyType, $assignedValueType, $scope->isDeclareStrictTypes());
        if (!$accepts->result) {
            $propertyDescription = $this->describePropertyByName($propertyReflection, $propertyReflection->getName());
            $verbosityLevel = VerbosityLevel::getRecommendedLevelByType($propertyType, $assignedValueType);
            return [RuleErrorBuilder::message(sprintf('%s (%s) does not accept %s.', $propertyDescription, $propertyType->describe($verbosityLevel), $assignedValueType->describe($verbosityLevel)))->acceptsReasonsTip($accepts->reasons)->build()];
        }
        return [];
    }
    private function describePropertyByName(PropertyReflection $property, string $propertyName) : string
    {
        if (!$property->isStatic()) {
            return sprintf('Property %s::$%s', $property->getDeclaringClass()->getDisplayName(), $propertyName);
        }
        return sprintf('Static property %s::$%s', $property->getDeclaringClass()->getDisplayName(), $propertyName);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

class DirectReadWritePropertiesExtensionProvider implements \PHPStan\Rules\Properties\ReadWritePropertiesExtensionProvider
{
    /**
     * @var ReadWritePropertiesExtension[]
     */
    private $extensions;
    /**
     * @param ReadWritePropertiesExtension[] $extensions
     */
    public function __construct(array $extensions)
    {
        $this->extensions = $extensions;
    }
    /**
     * @return ReadWritePropertiesExtension[]
     */
    public function getExtensions() : array
    {
        return $this->extensions;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\PropertyAssignNode;
use PHPStan\Rules\Rule;
/**
 * @implements Rule<PropertyAssignNode>
 */
class AccessStaticPropertiesInAssignRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Properties\AccessStaticPropertiesRule
     */
    private $accessStaticPropertiesRule;
    public function __construct(\PHPStan\Rules\Properties\AccessStaticPropertiesRule $accessStaticPropertiesRule)
    {
        $this->accessStaticPropertiesRule = $accessStaticPropertiesRule;
    }
    public function getNodeType() : string
    {
        return PropertyAssignNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->getPropertyFetch() instanceof Node\Expr\StaticPropertyFetch) {
            return [];
        }
        if ($node->isAssignOp()) {
            return [];
        }
        return $this->accessStaticPropertiesRule->processNode($node->getPropertyFetch(), $scope);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\PropertyAssignNode;
use PHPStan\Reflection\ConstructorsHelper;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\ThisType;
use function in_array;
use function sprintf;
use function strtolower;
/**
 * @implements Rule<PropertyAssignNode>
 */
class ReadOnlyPropertyAssignRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Properties\PropertyReflectionFinder
     */
    private $propertyReflectionFinder;
    /**
     * @var \PHPStan\Reflection\ConstructorsHelper
     */
    private $constructorsHelper;
    public function __construct(\PHPStan\Rules\Properties\PropertyReflectionFinder $propertyReflectionFinder, ConstructorsHelper $constructorsHelper)
    {
        $this->propertyReflectionFinder = $propertyReflectionFinder;
        $this->constructorsHelper = $constructorsHelper;
    }
    public function getNodeType() : string
    {
        return PropertyAssignNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $propertyFetch = $node->getPropertyFetch();
        if (!$propertyFetch instanceof Node\Expr\PropertyFetch) {
            return [];
        }
        $errors = [];
        $reflections = $this->propertyReflectionFinder->findPropertyReflectionsFromNode($propertyFetch, $scope);
        foreach ($reflections as $propertyReflection) {
            $nativeReflection = $propertyReflection->getNativeReflection();
            if ($nativeReflection === null) {
                continue;
            }
            if (!$scope->canAccessProperty($propertyReflection)) {
                continue;
            }
            if (!$nativeReflection->isReadOnly()) {
                continue;
            }
            $declaringClass = $nativeReflection->getDeclaringClass();
            if (!$scope->isInClass()) {
                $errors[] = RuleErrorBuilder::message(sprintf('Readonly property %s::$%s is assigned outside of its declaring class.', $declaringClass->getDisplayName(), $propertyReflection->getName()))->build();
                continue;
            }
            $scopeClassReflection = $scope->getClassReflection();
            if ($scopeClassReflection->getName() !== $declaringClass->getName()) {
                $errors[] = RuleErrorBuilder::message(sprintf('Readonly property %s::$%s is assigned outside of its declaring class.', $declaringClass->getDisplayName(), $propertyReflection->getName()))->build();
                continue;
            }
            $scopeMethod = $scope->getFunction();
            if (!$scopeMethod instanceof MethodReflection) {
                throw new ShouldNotHappenException();
            }
            if (in_array($scopeMethod->getName(), $this->constructorsHelper->getConstructors($scopeClassReflection), \true) || strtolower($scopeMethod->getName()) === '__unserialize') {
                if (!$scope->getType($propertyFetch->var) instanceof ThisType) {
                    $errors[] = RuleErrorBuilder::message(sprintf('Readonly property %s::$%s is not assigned on $this.', $declaringClass->getDisplayName(), $propertyReflection->getName()))->build();
                }
                continue;
            }
            $errors[] = RuleErrorBuilder::message(sprintf('Readonly property %s::$%s is assigned outside of the constructor.', $declaringClass->getDisplayName(), $propertyReflection->getName()))->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\NullType;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<Node\Expr\NullsafePropertyFetch>
 */
class NullsafePropertyFetchRule implements Rule
{
    public function __construct()
    {
    }
    public function getNodeType() : string
    {
        return Node\Expr\NullsafePropertyFetch::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $nullType = new NullType();
        $calledOnType = $scope->getType($node->var);
        if ($calledOnType->equals($nullType)) {
            return [];
        }
        if (!$calledOnType->isSuperTypeOf($nullType)->no()) {
            return [];
        }
        if ($scope->isUndefinedExpressionAllowed($node)) {
            return [];
        }
        return [RuleErrorBuilder::message(sprintf('Using nullsafe property access on non-nullable type %s. Use -> instead.', $calledOnType->describe(VerbosityLevel::typeOnly())))->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\ClassPropertyNode;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\ClassCaseSensitivityCheck;
use PHPStan\Rules\ClassNameNodePair;
use PHPStan\Rules\PhpDoc\UnresolvableTypeHelper;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use function array_map;
use function array_merge;
use function sprintf;
/**
 * @implements Rule<ClassPropertyNode>
 */
class ExistingClassesInPropertiesRule implements Rule
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Rules\ClassCaseSensitivityCheck
     */
    private $classCaseSensitivityCheck;
    /**
     * @var \PHPStan\Rules\PhpDoc\UnresolvableTypeHelper
     */
    private $unresolvableTypeHelper;
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    /**
     * @var bool
     */
    private $checkClassCaseSensitivity;
    /**
     * @var bool
     */
    private $checkThisOnly;
    public function __construct(ReflectionProvider $reflectionProvider, ClassCaseSensitivityCheck $classCaseSensitivityCheck, UnresolvableTypeHelper $unresolvableTypeHelper, PhpVersion $phpVersion, bool $checkClassCaseSensitivity, bool $checkThisOnly)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->classCaseSensitivityCheck = $classCaseSensitivityCheck;
        $this->unresolvableTypeHelper = $unresolvableTypeHelper;
        $this->phpVersion = $phpVersion;
        $this->checkClassCaseSensitivity = $checkClassCaseSensitivity;
        $this->checkThisOnly = $checkThisOnly;
    }
    public function getNodeType() : string
    {
        return ClassPropertyNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$scope->isInClass()) {
            throw new ShouldNotHappenException();
        }
        $propertyReflection = $scope->getClassReflection()->getNativeProperty($node->getName());
        if ($this->checkThisOnly) {
            $referencedClasses = $propertyReflection->getNativeType()->getReferencedClasses();
        } else {
            $referencedClasses = array_merge($propertyReflection->getNativeType()->getReferencedClasses(), $propertyReflection->getPhpDocType()->getReferencedClasses());
        }
        $errors = [];
        foreach ($referencedClasses as $referencedClass) {
            if ($this->reflectionProvider->hasClass($referencedClass)) {
                if ($this->reflectionProvider->getClass($referencedClass)->isTrait()) {
                    $errors[] = RuleErrorBuilder::message(sprintf('Property %s::$%s has invalid type %s.', $propertyReflection->getDeclaringClass()->getDisplayName(), $node->getName(), $referencedClass))->build();
                }
                continue;
            }
            $errors[] = RuleErrorBuilder::message(sprintf('Property %s::$%s has unknown class %s as its type.', $propertyReflection->getDeclaringClass()->getDisplayName(), $node->getName(), $referencedClass))->discoveringSymbolsTip()->build();
        }
        if ($this->checkClassCaseSensitivity) {
            $errors = array_merge($errors, $this->classCaseSensitivityCheck->checkClassNames(array_map(static function (string $class) use($node) : ClassNameNodePair {
                return new ClassNameNodePair($class, $node);
            }, $referencedClasses)));
        }
        if ($this->phpVersion->supportsPureIntersectionTypes() && $this->unresolvableTypeHelper->containsUnresolvableType($propertyReflection->getNativeType())) {
            $errors[] = RuleErrorBuilder::message(sprintf('Property %s::$%s has unresolvable native type.', $propertyReflection->getDeclaringClass()->getDisplayName(), $node->getName()))->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\Php\PhpPropertyReflection;
use PHPStan\Reflection\PropertyReflection;
use PHPStan\Reflection\WrapperPropertyReflection;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Type;
class FoundPropertyReflection implements PropertyReflection
{
    /**
     * @var \PHPStan\Reflection\PropertyReflection
     */
    private $originalPropertyReflection;
    /**
     * @var \PHPStan\Analyser\Scope
     */
    private $scope;
    /**
     * @var string
     */
    private $propertyName;
    /**
     * @var \PHPStan\Type\Type
     */
    private $readableType;
    /**
     * @var \PHPStan\Type\Type
     */
    private $writableType;
    public function __construct(PropertyReflection $originalPropertyReflection, Scope $scope, string $propertyName, Type $readableType, Type $writableType)
    {
        $this->originalPropertyReflection = $originalPropertyReflection;
        $this->scope = $scope;
        $this->propertyName = $propertyName;
        $this->readableType = $readableType;
        $this->writableType = $writableType;
    }
    public function getScope() : Scope
    {
        return $this->scope;
    }
    public function getDeclaringClass() : ClassReflection
    {
        return $this->originalPropertyReflection->getDeclaringClass();
    }
    public function getName() : string
    {
        return $this->propertyName;
    }
    public function isStatic() : bool
    {
        return $this->originalPropertyReflection->isStatic();
    }
    public function isPrivate() : bool
    {
        return $this->originalPropertyReflection->isPrivate();
    }
    public function isPublic() : bool
    {
        return $this->originalPropertyReflection->isPublic();
    }
    public function getDocComment() : ?string
    {
        return $this->originalPropertyReflection->getDocComment();
    }
    public function getReadableType() : Type
    {
        return $this->readableType;
    }
    public function getWritableType() : Type
    {
        return $this->writableType;
    }
    public function canChangeTypeAfterAssignment() : bool
    {
        return $this->originalPropertyReflection->canChangeTypeAfterAssignment();
    }
    public function isReadable() : bool
    {
        return $this->originalPropertyReflection->isReadable();
    }
    public function isWritable() : bool
    {
        return $this->originalPropertyReflection->isWritable();
    }
    public function isDeprecated() : TrinaryLogic
    {
        return $this->originalPropertyReflection->isDeprecated();
    }
    public function getDeprecatedDescription() : ?string
    {
        return $this->originalPropertyReflection->getDeprecatedDescription();
    }
    public function isInternal() : TrinaryLogic
    {
        return $this->originalPropertyReflection->isInternal();
    }
    public function isNative() : bool
    {
        return $this->getNativeReflection() !== null;
    }
    public function getNativeType() : ?Type
    {
        $reflection = $this->getNativeReflection();
        if ($reflection === null) {
            return null;
        }
        return $reflection->getNativeType();
    }
    public function getNativeReflection() : ?PhpPropertyReflection
    {
        $reflection = $this->originalPropertyReflection;
        while ($reflection instanceof WrapperPropertyReflection) {
            $reflection = $reflection->getOriginalReflection();
        }
        if (!$reflection instanceof PhpPropertyReflection) {
            return null;
        }
        return $reflection;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use PhpParser\Node;
use PhpParser\Node\Expr\StaticPropertyFetch;
use PhpParser\Node\Name;
use PHPStan\Analyser\NullsafeOperatorHelper;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\ClassCaseSensitivityCheck;
use PHPStan\Rules\ClassNameNodePair;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\StringType;
use PHPStan\Type\ThisType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypeUtils;
use PHPStan\Type\VerbosityLevel;
use function array_map;
use function array_merge;
use function count;
use function in_array;
use function sprintf;
use function strtolower;
/**
 * @implements Rule<Node\Expr\StaticPropertyFetch>
 */
class AccessStaticPropertiesRule implements Rule
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    /**
     * @var \PHPStan\Rules\ClassCaseSensitivityCheck
     */
    private $classCaseSensitivityCheck;
    public function __construct(ReflectionProvider $reflectionProvider, RuleLevelHelper $ruleLevelHelper, ClassCaseSensitivityCheck $classCaseSensitivityCheck)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->ruleLevelHelper = $ruleLevelHelper;
        $this->classCaseSensitivityCheck = $classCaseSensitivityCheck;
    }
    public function getNodeType() : string
    {
        return StaticPropertyFetch::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if ($node->name instanceof Node\VarLikeIdentifier) {
            $names = [$node->name->name];
        } else {
            $names = array_map(static function (ConstantStringType $type) : string {
                return $type->getValue();
            }, $scope->getType($node->name)->getConstantStrings());
        }
        $errors = [];
        foreach ($names as $name) {
            $errors = array_merge($errors, $this->processSingleProperty($scope, $node, $name));
        }
        return $errors;
    }
    /**
     * @return RuleError[]
     */
    private function processSingleProperty(Scope $scope, StaticPropertyFetch $node, string $name) : array
    {
        $messages = [];
        if ($node->class instanceof Name) {
            $class = (string) $node->class;
            $lowercasedClass = strtolower($class);
            if (in_array($lowercasedClass, ['self', 'static'], \true)) {
                if (!$scope->isInClass()) {
                    return [RuleErrorBuilder::message(sprintf('Accessing %s::$%s outside of class scope.', $class, $name))->build()];
                }
                $classType = $scope->resolveTypeByName($node->class);
            } elseif ($lowercasedClass === 'parent') {
                if (!$scope->isInClass()) {
                    return [RuleErrorBuilder::message(sprintf('Accessing %s::$%s outside of class scope.', $class, $name))->build()];
                }
                if ($scope->getClassReflection()->getParentClass() === null) {
                    return [RuleErrorBuilder::message(sprintf('%s::%s() accesses parent::$%s but %s does not extend any class.', $scope->getClassReflection()->getDisplayName(), $scope->getFunctionName(), $name, $scope->getClassReflection()->getDisplayName()))->build()];
                }
                if ($scope->getFunctionName() === null) {
                    throw new ShouldNotHappenException();
                }
                $currentMethodReflection = $scope->getClassReflection()->getNativeMethod($scope->getFunctionName());
                if (!$currentMethodReflection->isStatic()) {
                    // calling parent::method() from instance method
                    return [];
                }
                $classType = $scope->resolveTypeByName($node->class);
            } else {
                if (!$this->reflectionProvider->hasClass($class)) {
                    if ($scope->isInClassExists($class)) {
                        return [];
                    }
                    return [RuleErrorBuilder::message(sprintf('Access to static property $%s on an unknown class %s.', $name, $class))->discoveringSymbolsTip()->build()];
                }
                $messages = $this->classCaseSensitivityCheck->checkClassNames([new ClassNameNodePair($class, $node->class)]);
                $classType = $scope->resolveTypeByName($node->class);
            }
        } else {
            $classTypeResult = $this->ruleLevelHelper->findTypeToCheck($scope, NullsafeOperatorHelper::getNullsafeShortcircuitedExprRespectingScope($scope, $node->class), sprintf('Access to static property $%s on an unknown class %%s.', SprintfHelper::escapeFormatString($name)), static function (Type $type) use($name) : bool {
                return $type->canAccessProperties()->yes() && $type->hasProperty($name)->yes();
            });
            $classType = $classTypeResult->getType();
            if ($classType instanceof ErrorType) {
                return $classTypeResult->getUnknownClassErrors();
            }
        }
        if ($classType->isString()->yes()) {
            return [];
        }
        $typeForDescribe = $classType;
        if ($classType instanceof ThisType) {
            $typeForDescribe = $classType->getStaticObjectType();
        }
        $classType = TypeCombinator::remove($classType, new StringType());
        if ($scope->isInExpressionAssign($node)) {
            return [];
        }
        if ($classType->canAccessProperties()->no() || $classType->canAccessProperties()->maybe() && !$scope->isUndefinedExpressionAllowed($node)) {
            return array_merge($messages, [RuleErrorBuilder::message(sprintf('Cannot access static property $%s on %s.', $name, $typeForDescribe->describe(VerbosityLevel::typeOnly())))->build()]);
        }
        $has = $classType->hasProperty($name);
        if (!$has->no() && $scope->isUndefinedExpressionAllowed($node)) {
            return [];
        }
        if (!$has->yes()) {
            if ($scope->hasExpressionType($node)->yes()) {
                return $messages;
            }
            $classNames = $classType->getObjectClassNames();
            if (count($classNames) === 1) {
                $propertyClassReflection = $this->reflectionProvider->getClass($classNames[0]);
                $parentClassReflection = $propertyClassReflection->getParentClass();
                while ($parentClassReflection !== null) {
                    if ($parentClassReflection->hasProperty($name)) {
                        if ($scope->canAccessProperty($parentClassReflection->getProperty($name, $scope))) {
                            return [];
                        }
                        return [RuleErrorBuilder::message(sprintf('Access to private static property $%s of parent class %s.', $name, $parentClassReflection->getDisplayName()))->build()];
                    }
                    $parentClassReflection = $parentClassReflection->getParentClass();
                }
            }
            return array_merge($messages, [RuleErrorBuilder::message(sprintf('Access to an undefined static property %s::$%s.', $typeForDescribe->describe(VerbosityLevel::typeOnly()), $name))->build()]);
        }
        $property = $classType->getProperty($name, $scope);
        if (!$property->isStatic()) {
            $hasPropertyTypes = TypeUtils::getHasPropertyTypes($classType);
            foreach ($hasPropertyTypes as $hasPropertyType) {
                if ($hasPropertyType->getPropertyName() === $name) {
                    return [];
                }
            }
            return array_merge($messages, [RuleErrorBuilder::message(sprintf('Static access to instance property %s::$%s.', $property->getDeclaringClass()->getDisplayName(), $name))->build()]);
        }
        if (!$scope->canAccessProperty($property)) {
            return array_merge($messages, [RuleErrorBuilder::message(sprintf('Access to %s property $%s of class %s.', $property->isPrivate() ? 'private' : 'protected', $name, $property->getDeclaringClass()->getDisplayName()))->build()]);
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use Attribute;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\AttributesCheck;
use PHPStan\Rules\Rule;
/**
 * @implements Rule<Node\Stmt\Property>
 */
class PropertyAttributesRule implements Rule
{
    /**
     * @var \PHPStan\Rules\AttributesCheck
     */
    private $attributesCheck;
    public function __construct(AttributesCheck $attributesCheck)
    {
        $this->attributesCheck = $attributesCheck;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\Property::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        return $this->attributesCheck->check($scope, $node->attrGroups, Attribute::TARGET_PROPERTY, 'property');
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use PhpParser\Node;
use PhpParser\Node\Name;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function sprintf;
/**
 * @implements Rule<Node\Expr\StaticPropertyFetch>
 */
class AccessPrivatePropertyThroughStaticRule implements Rule
{
    public function getNodeType() : string
    {
        return Node\Expr\StaticPropertyFetch::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->name instanceof Node\VarLikeIdentifier) {
            return [];
        }
        if (!$node->class instanceof Name) {
            return [];
        }
        $propertyName = $node->name->name;
        $className = $node->class;
        if ($className->toLowerString() !== 'static') {
            return [];
        }
        $classType = $scope->resolveTypeByName($className);
        if (!$classType->hasProperty($propertyName)->yes()) {
            return [];
        }
        $property = $classType->getProperty($propertyName, $scope);
        if (!$property->isPrivate()) {
            return [];
        }
        if (!$property->isStatic()) {
            return [];
        }
        if ($scope->isInClass() && $scope->getClassReflection()->isFinal()) {
            return [];
        }
        return [RuleErrorBuilder::message(sprintf('Unsafe access to private property %s::$%s through static::.', $property->getDeclaringClass()->getDisplayName(), $propertyName))->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Scalar\String_;
use PhpParser\Node\VarLikeIdentifier;
use PHPStan\Analyser\Scope;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\Type;
use function array_map;
class PropertyReflectionFinder
{
    /**
     * @param Node\Expr\PropertyFetch|Node\Expr\StaticPropertyFetch $propertyFetch
     * @return FoundPropertyReflection[]
     */
    public function findPropertyReflectionsFromNode($propertyFetch, Scope $scope) : array
    {
        if ($propertyFetch instanceof Node\Expr\PropertyFetch) {
            if ($propertyFetch->name instanceof Node\Identifier) {
                $names = [$propertyFetch->name->name];
            } else {
                $names = array_map(static function (ConstantStringType $name) : string {
                    return $name->getValue();
                }, $scope->getType($propertyFetch->name)->getConstantStrings());
            }
            $reflections = [];
            $propertyHolderType = $scope->getType($propertyFetch->var);
            foreach ($names as $name) {
                $reflection = $this->findPropertyReflection($propertyHolderType, $name, $propertyFetch->name instanceof Expr ? $scope->filterByTruthyValue(new Expr\BinaryOp\Identical($propertyFetch->name, new String_($name))) : $scope);
                if ($reflection === null) {
                    continue;
                }
                $reflections[] = $reflection;
            }
            return $reflections;
        }
        if ($propertyFetch->class instanceof Node\Name) {
            $propertyHolderType = $scope->resolveTypeByName($propertyFetch->class);
        } else {
            $propertyHolderType = $scope->getType($propertyFetch->class);
        }
        if ($propertyFetch->name instanceof VarLikeIdentifier) {
            $names = [$propertyFetch->name->name];
        } else {
            $names = array_map(static function (ConstantStringType $name) : string {
                return $name->getValue();
            }, $scope->getType($propertyFetch->name)->getConstantStrings());
        }
        $reflections = [];
        foreach ($names as $name) {
            $reflection = $this->findPropertyReflection($propertyHolderType, $name, $propertyFetch->name instanceof Expr ? $scope->filterByTruthyValue(new Expr\BinaryOp\Identical($propertyFetch->name, new String_($name))) : $scope);
            if ($reflection === null) {
                continue;
            }
            $reflections[] = $reflection;
        }
        return $reflections;
    }
    /**
     * @param Node\Expr\PropertyFetch|Node\Expr\StaticPropertyFetch $propertyFetch
     */
    public function findPropertyReflectionFromNode($propertyFetch, Scope $scope) : ?\PHPStan\Rules\Properties\FoundPropertyReflection
    {
        if ($propertyFetch instanceof Node\Expr\PropertyFetch) {
            if (!$propertyFetch->name instanceof Node\Identifier) {
                return null;
            }
            $propertyHolderType = $scope->getType($propertyFetch->var);
            return $this->findPropertyReflection($propertyHolderType, $propertyFetch->name->name, $scope);
        }
        if (!$propertyFetch->name instanceof Node\Identifier) {
            return null;
        }
        if ($propertyFetch->class instanceof Node\Name) {
            $propertyHolderType = $scope->resolveTypeByName($propertyFetch->class);
        } else {
            $propertyHolderType = $scope->getType($propertyFetch->class);
        }
        return $this->findPropertyReflection($propertyHolderType, $propertyFetch->name->name, $scope);
    }
    private function findPropertyReflection(Type $propertyHolderType, string $propertyName, Scope $scope) : ?\PHPStan\Rules\Properties\FoundPropertyReflection
    {
        if (!$propertyHolderType->hasProperty($propertyName)->yes()) {
            return null;
        }
        $originalProperty = $propertyHolderType->getProperty($propertyName, $scope);
        return new \PHPStan\Rules\Properties\FoundPropertyReflection($originalProperty, $scope, $propertyName, $originalProperty->getReadableType(), $originalProperty->getWritableType());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function sprintf;
/**
 * @implements Rule<Node\Expr\AssignRef>
 */
class ReadOnlyPropertyAssignRefRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Properties\PropertyReflectionFinder
     */
    private $propertyReflectionFinder;
    public function __construct(\PHPStan\Rules\Properties\PropertyReflectionFinder $propertyReflectionFinder)
    {
        $this->propertyReflectionFinder = $propertyReflectionFinder;
    }
    public function getNodeType() : string
    {
        return Node\Expr\AssignRef::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->expr instanceof Node\Expr\PropertyFetch && !$node->expr instanceof Node\Expr\StaticPropertyFetch) {
            return [];
        }
        $propertyFetch = $node->expr;
        $errors = [];
        $reflections = $this->propertyReflectionFinder->findPropertyReflectionsFromNode($propertyFetch, $scope);
        foreach ($reflections as $propertyReflection) {
            $nativeReflection = $propertyReflection->getNativeReflection();
            if ($nativeReflection === null) {
                continue;
            }
            if (!$scope->canAccessProperty($propertyReflection)) {
                continue;
            }
            if (!$nativeReflection->isReadOnly()) {
                continue;
            }
            $declaringClass = $nativeReflection->getDeclaringClass();
            $errors[] = RuleErrorBuilder::message(sprintf('Readonly property %s::$%s is assigned by reference.', $declaringClass->getDisplayName(), $propertyReflection->getName()))->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use PhpParser\Node;
use PhpParser\Node\Expr\PropertyFetch;
use PhpParser\Node\Identifier;
use PHPStan\Analyser\NullsafeOperatorHelper;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use function array_map;
use function array_merge;
use function count;
use function sprintf;
/**
 * @implements Rule<Node\Expr\PropertyFetch>
 */
class AccessPropertiesRule implements Rule
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    /**
     * @var bool
     */
    private $reportMagicProperties;
    /**
     * @var bool
     */
    private $checkDynamicProperties;
    public function __construct(ReflectionProvider $reflectionProvider, RuleLevelHelper $ruleLevelHelper, bool $reportMagicProperties, bool $checkDynamicProperties)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->ruleLevelHelper = $ruleLevelHelper;
        $this->reportMagicProperties = $reportMagicProperties;
        $this->checkDynamicProperties = $checkDynamicProperties;
    }
    public function getNodeType() : string
    {
        return PropertyFetch::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if ($node->name instanceof Identifier) {
            $names = [$node->name->name];
        } else {
            $names = array_map(static function (ConstantStringType $type) : string {
                return $type->getValue();
            }, $scope->getType($node->name)->getConstantStrings());
        }
        $errors = [];
        foreach ($names as $name) {
            $errors = array_merge($errors, $this->processSingleProperty($scope, $node, $name));
        }
        return $errors;
    }
    /**
     * @return RuleError[]
     */
    private function processSingleProperty(Scope $scope, PropertyFetch $node, string $name) : array
    {
        $typeResult = $this->ruleLevelHelper->findTypeToCheck($scope, NullsafeOperatorHelper::getNullsafeShortcircuitedExprRespectingScope($scope, $node->var), sprintf('Access to property $%s on an unknown class %%s.', SprintfHelper::escapeFormatString($name)), static function (Type $type) use($name) : bool {
            return $type->canAccessProperties()->yes() && $type->hasProperty($name)->yes();
        });
        $type = $typeResult->getType();
        if ($type instanceof ErrorType) {
            return $typeResult->getUnknownClassErrors();
        }
        if ($scope->isInExpressionAssign($node)) {
            return [];
        }
        if ($type->canAccessProperties()->no() || $type->canAccessProperties()->maybe() && !$scope->isUndefinedExpressionAllowed($node)) {
            return [RuleErrorBuilder::message(sprintf('Cannot access property $%s on %s.', $name, $type->describe(VerbosityLevel::typeOnly())))->build()];
        }
        $has = $type->hasProperty($name);
        if (!$has->no() && $this->canAccessUndefinedProperties($scope, $node)) {
            return [];
        }
        if (!$has->yes()) {
            if ($scope->hasExpressionType($node)->yes()) {
                return [];
            }
            $classNames = $type->getObjectClassNames();
            if (!$this->reportMagicProperties) {
                foreach ($classNames as $className) {
                    if (!$this->reflectionProvider->hasClass($className)) {
                        continue;
                    }
                    $classReflection = $this->reflectionProvider->getClass($className);
                    if ($classReflection->hasNativeMethod('__get') || $classReflection->hasNativeMethod('__set')) {
                        return [];
                    }
                }
            }
            if (count($classNames) === 1) {
                $propertyClassReflection = $this->reflectionProvider->getClass($classNames[0]);
                $parentClassReflection = $propertyClassReflection->getParentClass();
                while ($parentClassReflection !== null) {
                    if ($parentClassReflection->hasProperty($name)) {
                        if ($scope->canAccessProperty($parentClassReflection->getProperty($name, $scope))) {
                            return [];
                        }
                        return [RuleErrorBuilder::message(sprintf('Access to private property $%s of parent class %s.', $name, $parentClassReflection->getDisplayName()))->build()];
                    }
                    $parentClassReflection = $parentClassReflection->getParentClass();
                }
            }
            $ruleErrorBuilder = RuleErrorBuilder::message(sprintf('Access to an undefined property %s::$%s.', $type->describe(VerbosityLevel::typeOnly()), $name));
            if ($typeResult->getTip() !== null) {
                $ruleErrorBuilder->tip($typeResult->getTip());
            } else {
                $ruleErrorBuilder->tip('Learn more: <fg=cyan>https://phpstan.org/blog/solving-phpstan-access-to-undefined-property</>');
            }
            return [$ruleErrorBuilder->build()];
        }
        $propertyReflection = $type->getProperty($name, $scope);
        if (!$scope->canAccessProperty($propertyReflection)) {
            return [RuleErrorBuilder::message(sprintf('Access to %s property %s::$%s.', $propertyReflection->isPrivate() ? 'private' : 'protected', $type->describe(VerbosityLevel::typeOnly()), $name))->build()];
        }
        return [];
    }
    private function canAccessUndefinedProperties(Scope $scope, Node\Expr $node) : bool
    {
        return $scope->isUndefinedExpressionAllowed($node) && !$this->checkDynamicProperties;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use PHPStan\Reflection\PropertyReflection;
/**
 * This is the extension interface to implement if you want to describe
 * always-read or always-written properties.
 *
 * To register it in the configuration file use the `phpstan.properties.readWriteExtension` service tag:
 *
 * ```
 * services:
 * 	-
 *		class: App\PHPStan\MyExtension
 *		tags:
 *			- phpstan.properties.readWriteExtension
 * ```
 *
 * Learn more: https://phpstan.org/developing-extensions/always-read-written-properties
 *
 * @api
 */
interface ReadWritePropertiesExtension
{
    public function isAlwaysRead(PropertyReflection $property, string $propertyName) : bool;
    public function isAlwaysWritten(PropertyReflection $property, string $propertyName) : bool;
    public function isInitialized(PropertyReflection $property, string $propertyName) : bool;
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use PHPStan\DependencyInjection\Container;
class LazyReadWritePropertiesExtensionProvider implements \PHPStan\Rules\Properties\ReadWritePropertiesExtensionProvider
{
    /** @var ReadWritePropertiesExtension[]|null */
    private $extensions;
    /**
     * @var \PHPStan\DependencyInjection\Container
     */
    private $container;
    public function __construct(Container $container)
    {
        $this->container = $container;
    }
    public function getExtensions() : array
    {
        if ($this->extensions === null) {
            $this->extensions = $this->container->getServicesByTag(\PHPStan\Rules\Properties\ReadWritePropertiesExtensionProvider::EXTENSION_TAG);
        }
        return $this->extensions;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\PropertyAssignNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use function sprintf;
/**
 * @implements Rule<PropertyAssignNode>
 */
class WritingToReadOnlyPropertiesRule implements Rule
{
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    /**
     * @var \PHPStan\Rules\Properties\PropertyDescriptor
     */
    private $propertyDescriptor;
    /**
     * @var \PHPStan\Rules\Properties\PropertyReflectionFinder
     */
    private $propertyReflectionFinder;
    /**
     * @var bool
     */
    private $checkThisOnly;
    public function __construct(RuleLevelHelper $ruleLevelHelper, \PHPStan\Rules\Properties\PropertyDescriptor $propertyDescriptor, \PHPStan\Rules\Properties\PropertyReflectionFinder $propertyReflectionFinder, bool $checkThisOnly)
    {
        $this->ruleLevelHelper = $ruleLevelHelper;
        $this->propertyDescriptor = $propertyDescriptor;
        $this->propertyReflectionFinder = $propertyReflectionFinder;
        $this->checkThisOnly = $checkThisOnly;
    }
    public function getNodeType() : string
    {
        return PropertyAssignNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $propertyFetch = $node->getPropertyFetch();
        if ($propertyFetch instanceof Node\Expr\PropertyFetch && $this->checkThisOnly && !$this->ruleLevelHelper->isThis($propertyFetch->var)) {
            return [];
        }
        $propertyReflection = $this->propertyReflectionFinder->findPropertyReflectionFromNode($propertyFetch, $scope);
        if ($propertyReflection === null) {
            return [];
        }
        if (!$scope->canAccessProperty($propertyReflection)) {
            return [];
        }
        if (!$propertyReflection->isWritable()) {
            $propertyDescription = $this->propertyDescriptor->describeProperty($propertyReflection, $scope, $propertyFetch);
            return [RuleErrorBuilder::message(sprintf('%s is not writable.', $propertyDescription))->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Properties;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\ClassPropertyNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\MixedType;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<ClassPropertyNode>
 */
class DefaultValueTypesAssignedToPropertiesRule implements Rule
{
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    public function __construct(RuleLevelHelper $ruleLevelHelper)
    {
        $this->ruleLevelHelper = $ruleLevelHelper;
    }
    public function getNodeType() : string
    {
        return ClassPropertyNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$scope->isInClass()) {
            throw new ShouldNotHappenException();
        }
        $classReflection = $scope->getClassReflection();
        $default = $node->getDefault();
        if ($default === null) {
            return [];
        }
        $propertyReflection = $classReflection->getNativeProperty($node->getName());
        $propertyType = $propertyReflection->getWritableType();
        if ($propertyReflection->getNativeType() instanceof MixedType) {
            if ($default instanceof Node\Expr\ConstFetch && (string) $default->name === 'null') {
                return [];
            }
        }
        $defaultValueType = $scope->getType($default);
        $accepts = $this->ruleLevelHelper->acceptsWithReason($propertyType, $defaultValueType, \true);
        if ($accepts->result) {
            return [];
        }
        $verbosityLevel = VerbosityLevel::getRecommendedLevelByType($propertyType, $defaultValueType);
        return [RuleErrorBuilder::message(sprintf('%s %s::$%s (%s) does not accept default value of type %s.', $node->isStatic() ? 'Static property' : 'Property', $classReflection->getDisplayName(), $node->getName(), $propertyType->describe($verbosityLevel), $defaultValueType->describe($verbosityLevel)))->acceptsReasonsTip($accepts->reasons)->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules;

use DateTime;
use PhpParser\Node;
use PhpParser\Node\Expr\New_;
use PHPStan\Analyser\Scope;
use Throwable;
use function count;
use function in_array;
use function sprintf;
use function strtolower;
/**
 * @implements Rule<Node\Expr\New_>
 */
class DateTimeInstantiationRule implements \PHPStan\Rules\Rule
{
    public function getNodeType() : string
    {
        return New_::class;
    }
    /**
     * @param New_ $node
     */
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->class instanceof Node\Name || count($node->getArgs()) === 0 || !in_array(strtolower((string) $node->class), ['datetime', 'datetimeimmutable'], \true)) {
            return [];
        }
        $arg = $scope->getType($node->getArgs()[0]->value);
        $errors = [];
        foreach ($arg->getConstantStrings() as $constantString) {
            $dateString = $constantString->getValue();
            try {
                new DateTime($dateString);
            } catch (Throwable $exception) {
                // an exception is thrown for errors only but we want to catch warnings too
            }
            $lastErrors = DateTime::getLastErrors();
            if ($lastErrors === \false) {
                continue;
            }
            foreach ($lastErrors['errors'] as $error) {
                $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf('Instantiating %s with %s produces an error: %s', (string) $node->class, $dateString, $error))->build();
            }
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules;

use PHPStan\ShouldNotHappenException;
use function array_map;
use function class_exists;
use function count;
use function implode;
use function sprintf;
/** @api */
class RuleErrorBuilder
{
    private const TYPE_MESSAGE = 1;
    private const TYPE_LINE = 2;
    private const TYPE_FILE = 4;
    private const TYPE_TIP = 8;
    private const TYPE_IDENTIFIER = 16;
    private const TYPE_METADATA = 32;
    private const TYPE_NON_IGNORABLE = 64;
    /**
     * @var int
     */
    private $type;
    /** @var mixed[] */
    private $properties;
    /** @var list<string> */
    private $tips = [];
    private function __construct(string $message)
    {
        $this->properties['message'] = $message;
        $this->type = self::TYPE_MESSAGE;
    }
    /**
     * @return array<int, array{string, string|null, string|null, string|null}>
     */
    public static function getRuleErrorTypes() : array
    {
        return [self::TYPE_MESSAGE => [\PHPStan\Rules\RuleError::class, 'message', 'string', 'string'], self::TYPE_LINE => [\PHPStan\Rules\LineRuleError::class, 'line', 'int', 'int'], self::TYPE_FILE => [\PHPStan\Rules\FileRuleError::class, 'file', 'string', 'string'], self::TYPE_TIP => [\PHPStan\Rules\TipRuleError::class, 'tip', 'string', 'string'], self::TYPE_IDENTIFIER => [\PHPStan\Rules\IdentifierRuleError::class, 'identifier', 'string', 'string'], self::TYPE_METADATA => [\PHPStan\Rules\MetadataRuleError::class, 'metadata', 'array', 'mixed[]'], self::TYPE_NON_IGNORABLE => [\PHPStan\Rules\NonIgnorableRuleError::class, null, null, null]];
    }
    public static function message(string $message) : self
    {
        return new self($message);
    }
    public function line(int $line) : self
    {
        $this->properties['line'] = $line;
        $this->type |= self::TYPE_LINE;
        return $this;
    }
    public function file(string $file) : self
    {
        $this->properties['file'] = $file;
        $this->type |= self::TYPE_FILE;
        return $this;
    }
    public function tip(string $tip) : self
    {
        $this->tips = [$tip];
        $this->type |= self::TYPE_TIP;
        return $this;
    }
    public function addTip(string $tip) : self
    {
        $this->tips[] = $tip;
        $this->type |= self::TYPE_TIP;
        return $this;
    }
    public function discoveringSymbolsTip() : self
    {
        return $this->tip('Learn more at https://phpstan.org/user-guide/discovering-symbols');
    }
    /**
     * @param list<string> $reasons
     */
    public function acceptsReasonsTip(array $reasons) : self
    {
        foreach ($reasons as $reason) {
            $this->addTip($reason);
        }
        return $this;
    }
    public function identifier(string $identifier) : self
    {
        $this->properties['identifier'] = $identifier;
        $this->type |= self::TYPE_IDENTIFIER;
        return $this;
    }
    /**
     * @param mixed[] $metadata
     */
    public function metadata(array $metadata) : self
    {
        $this->properties['metadata'] = $metadata;
        $this->type |= self::TYPE_METADATA;
        return $this;
    }
    public function nonIgnorable() : self
    {
        $this->type |= self::TYPE_NON_IGNORABLE;
        return $this;
    }
    public function build() : \PHPStan\Rules\RuleError
    {
        /** @var class-string<RuleError> $className */
        $className = sprintf('PHPStan\\Rules\\RuleErrors\\RuleError%d', $this->type);
        if (!class_exists($className)) {
            throw new ShouldNotHappenException(sprintf('Class %s does not exist.', $className));
        }
        $ruleError = new $className();
        foreach ($this->properties as $propertyName => $value) {
            $ruleError->{$propertyName} = $value;
        }
        if (count($this->tips) > 0) {
            if (count($this->tips) === 1) {
                $ruleError->tip = $this->tips[0];
            } else {
                $ruleError->tip = implode("\n", array_map(static function (string $tip) {
                    return sprintf('• %s', $tip);
                }, $this->tips));
            }
        }
        return $ruleError;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules;

use function array_merge;
class RuleLevelHelperAcceptsResult
{
    /**
     * @readonly
     * @var bool
     */
    public $result;
    /**
     * @var list<string>
     * @readonly
     */
    public $reasons;
    /**
     * @param list<string> $reasons
     */
    public function __construct(bool $result, array $reasons)
    {
        $this->result = $result;
        $this->reasons = $reasons;
    }
    public function and(self $other) : self
    {
        return new self($this->result && $other->result, array_merge($this->reasons, $other->reasons));
    }
    /**
     * @param callable(string): string $cb
     */
    public function decorateReasons(callable $cb) : self
    {
        $reasons = [];
        foreach ($this->reasons as $reason) {
            $reasons[] = $cb($reason);
        }
        return new self($this->result, $reasons);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules;

use PHPStan\Type\Type;
/** @api */
class FoundTypeResult
{
    /**
     * @var \PHPStan\Type\Type
     */
    private $type;
    /**
     * @var string[]
     */
    private $referencedClasses;
    /**
     * @var RuleError[]
     */
    private $unknownClassErrors;
    /**
     * @var string|null
     */
    private $tip;
    /**
     * @param string[] $referencedClasses
     * @param RuleError[] $unknownClassErrors
     */
    public function __construct(Type $type, array $referencedClasses, array $unknownClassErrors, ?string $tip)
    {
        $this->type = $type;
        $this->referencedClasses = $referencedClasses;
        $this->unknownClassErrors = $unknownClassErrors;
        $this->tip = $tip;
    }
    public function getType() : Type
    {
        return $this->type;
    }
    /**
     * @return string[]
     */
    public function getReferencedClasses() : array
    {
        return $this->referencedClasses;
    }
    /**
     * @return RuleError[]
     */
    public function getUnknownClassErrors() : array
    {
        return $this->unknownClassErrors;
    }
    public function getTip() : ?string
    {
        return $this->tip;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Type\Constant\ConstantStringType;
use function array_fill_keys;
use function array_keys;
use function array_merge;
use function is_array;
use function is_string;
use function sprintf;
class UnusedFunctionParametersCheck
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(ReflectionProvider $reflectionProvider)
    {
        $this->reflectionProvider = $reflectionProvider;
    }
    /**
     * @param string[] $parameterNames
     * @param Node[] $statements
     * @param mixed[] $additionalMetadata
     * @return RuleError[]
     */
    public function getUnusedParameters(Scope $scope, array $parameterNames, array $statements, string $unusedParameterMessage, string $identifier, array $additionalMetadata) : array
    {
        $unusedParameters = array_fill_keys($parameterNames, \true);
        foreach ($this->getUsedVariables($scope, $statements) as $variableName) {
            if (!isset($unusedParameters[$variableName])) {
                continue;
            }
            unset($unusedParameters[$variableName]);
        }
        $errors = [];
        foreach (array_keys($unusedParameters) as $name) {
            $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf($unusedParameterMessage, $name))->identifier($identifier)->metadata($additionalMetadata + ['variableName' => $name])->build();
        }
        return $errors;
    }
    /**
     * @param Node[]|Node|scalar|null $node
     * @return string[]
     */
    private function getUsedVariables(Scope $scope, $node) : array
    {
        $variableNames = [];
        if ($node instanceof Node) {
            if ($node instanceof Node\Expr\FuncCall && $node->name instanceof Node\Name) {
                $functionName = $this->reflectionProvider->resolveFunctionName($node->name, $scope);
                if ($functionName === 'func_get_args') {
                    return $scope->getDefinedVariables();
                }
            }
            if ($node instanceof Node\Expr\Variable && is_string($node->name) && $node->name !== 'this') {
                return [$node->name];
            }
            if ($node instanceof Node\Expr\ClosureUse && is_string($node->var->name)) {
                return [$node->var->name];
            }
            if ($node instanceof Node\Expr\FuncCall && $node->name instanceof Node\Name && (string) $node->name === 'compact') {
                foreach ($node->getArgs() as $arg) {
                    $argType = $scope->getType($arg->value);
                    if (!$argType instanceof ConstantStringType) {
                        continue;
                    }
                    $variableNames[] = $argType->getValue();
                }
            }
            foreach ($node->getSubNodeNames() as $subNodeName) {
                if ($node instanceof Node\Expr\Closure && $subNodeName !== 'uses') {
                    continue;
                }
                $subNode = $node->{$subNodeName};
                $variableNames = array_merge($variableNames, $this->getUsedVariables($scope, $subNode));
            }
        } elseif (is_array($node)) {
            foreach ($node as $subNode) {
                $variableNames = array_merge($variableNames, $this->getUsedVariables($scope, $subNode));
            }
        }
        return $variableNames;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Methods;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Node\MethodCallableNode;
use PHPStan\Php\PhpVersion;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function sprintf;
/**
 * @implements Rule<MethodCallableNode>
 */
class MethodCallableRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Methods\MethodCallCheck
     */
    private $methodCallCheck;
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(\PHPStan\Rules\Methods\MethodCallCheck $methodCallCheck, PhpVersion $phpVersion)
    {
        $this->methodCallCheck = $methodCallCheck;
        $this->phpVersion = $phpVersion;
    }
    public function getNodeType() : string
    {
        return MethodCallableNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$this->phpVersion->supportsFirstClassCallables()) {
            return [RuleErrorBuilder::message('First-class callables are supported only on PHP 8.1 and later.')->nonIgnorable()->build()];
        }
        $methodName = $node->getName();
        if (!$methodName instanceof Node\Identifier) {
            return [];
        }
        $methodNameName = $methodName->toString();
        [$errors, $methodReflection] = $this->methodCallCheck->check($scope, $methodNameName, $node->getVar());
        if ($methodReflection === null) {
            return $errors;
        }
        $declaringClass = $methodReflection->getDeclaringClass();
        if ($declaringClass->hasNativeMethod($methodNameName)) {
            return $errors;
        }
        $messagesMethodName = SprintfHelper::escapeFormatString($declaringClass->getDisplayName() . '::' . $methodReflection->getName() . '()');
        $errors[] = RuleErrorBuilder::message(sprintf('Creating callable from a non-native method %s.', $messagesMethodName))->build();
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Methods;

use DOMDocument;
use PhpParser\Node\Expr;
use PhpParser\Node\Name;
use PHPStan\Analyser\NullsafeOperatorHelper;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\Native\NativeMethodReflection;
use PHPStan\Reflection\Php\PhpMethodReflection;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\ClassCaseSensitivityCheck;
use PHPStan\Rules\ClassNameNodePair;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Generic\GenericClassStringType;
use PHPStan\Type\StringType;
use PHPStan\Type\ThisType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\VerbosityLevel;
use function array_merge;
use function in_array;
use function sprintf;
use function strtolower;
class StaticMethodCallCheck
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    /**
     * @var \PHPStan\Rules\ClassCaseSensitivityCheck
     */
    private $classCaseSensitivityCheck;
    /**
     * @var bool
     */
    private $checkFunctionNameCase;
    /**
     * @var bool
     */
    private $reportMagicMethods;
    public function __construct(ReflectionProvider $reflectionProvider, RuleLevelHelper $ruleLevelHelper, ClassCaseSensitivityCheck $classCaseSensitivityCheck, bool $checkFunctionNameCase, bool $reportMagicMethods)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->ruleLevelHelper = $ruleLevelHelper;
        $this->classCaseSensitivityCheck = $classCaseSensitivityCheck;
        $this->checkFunctionNameCase = $checkFunctionNameCase;
        $this->reportMagicMethods = $reportMagicMethods;
    }
    /**
     * @param Name|Expr $class
     * @return array{RuleError[], MethodReflection|null}
     */
    public function check(Scope $scope, string $methodName, $class) : array
    {
        $errors = [];
        $isAbstract = \false;
        if ($class instanceof Name) {
            $classStringType = $scope->getType(new Expr\ClassConstFetch($class, 'class'));
            if ($classStringType->hasMethod($methodName)->yes()) {
                return [[], null];
            }
            $className = (string) $class;
            $lowercasedClassName = strtolower($className);
            if (in_array($lowercasedClassName, ['self', 'static'], \true)) {
                if (!$scope->isInClass()) {
                    return [[RuleErrorBuilder::message(sprintf('Calling %s::%s() outside of class scope.', $className, $methodName))->build()], null];
                }
                $classType = $scope->resolveTypeByName($class);
            } elseif ($lowercasedClassName === 'parent') {
                if (!$scope->isInClass()) {
                    return [[RuleErrorBuilder::message(sprintf('Calling %s::%s() outside of class scope.', $className, $methodName))->build()], null];
                }
                $currentClassReflection = $scope->getClassReflection();
                if ($currentClassReflection->getParentClass() === null) {
                    return [[RuleErrorBuilder::message(sprintf('%s::%s() calls parent::%s() but %s does not extend any class.', $scope->getClassReflection()->getDisplayName(), $scope->getFunctionName(), $methodName, $scope->getClassReflection()->getDisplayName()))->build()], null];
                }
                if ($scope->getFunctionName() === null) {
                    throw new ShouldNotHappenException();
                }
                $classType = $scope->resolveTypeByName($class);
            } else {
                if (!$this->reflectionProvider->hasClass($className)) {
                    if ($scope->isInClassExists($className)) {
                        return [[], null];
                    }
                    return [[RuleErrorBuilder::message(sprintf('Call to static method %s() on an unknown class %s.', $methodName, $className))->discoveringSymbolsTip()->build()], null];
                }
                $errors = $this->classCaseSensitivityCheck->checkClassNames([new ClassNameNodePair($className, $class)]);
                $classType = $scope->resolveTypeByName($class);
            }
            $classReflection = $classType->getClassReflection();
            if ($classReflection !== null && $classReflection->hasNativeMethod($methodName) && $lowercasedClassName !== 'static') {
                $nativeMethodReflection = $classReflection->getNativeMethod($methodName);
                if ($nativeMethodReflection instanceof PhpMethodReflection || $nativeMethodReflection instanceof NativeMethodReflection) {
                    $isAbstract = $nativeMethodReflection->isAbstract();
                }
            }
        } else {
            $classTypeResult = $this->ruleLevelHelper->findTypeToCheck($scope, NullsafeOperatorHelper::getNullsafeShortcircuitedExprRespectingScope($scope, $class), sprintf('Call to static method %s() on an unknown class %%s.', SprintfHelper::escapeFormatString($methodName)), static function (Type $type) use($methodName) : bool {
                return $type->canCallMethods()->yes() && $type->hasMethod($methodName)->yes();
            });
            $classType = $classTypeResult->getType();
            if ($classType instanceof ErrorType) {
                return [$classTypeResult->getUnknownClassErrors(), null];
            }
        }
        if ($classType instanceof GenericClassStringType) {
            $classType = $classType->getGenericType();
            if (!$classType->isObject()->yes()) {
                return [[], null];
            }
        } elseif ($classType->isString()->yes()) {
            return [[], null];
        }
        $typeForDescribe = $classType;
        if ($classType instanceof ThisType) {
            $typeForDescribe = $classType->getStaticObjectType();
        }
        $classType = TypeCombinator::remove($classType, new StringType());
        if (!$classType->canCallMethods()->yes()) {
            return [array_merge($errors, [RuleErrorBuilder::message(sprintf('Cannot call static method %s() on %s.', $methodName, $typeForDescribe->describe(VerbosityLevel::typeOnly())))->build()]), null];
        }
        if (!$classType->hasMethod($methodName)->yes()) {
            if (!$this->reportMagicMethods) {
                foreach ($classType->getObjectClassNames() as $className) {
                    if (!$this->reflectionProvider->hasClass($className)) {
                        continue;
                    }
                    $classReflection = $this->reflectionProvider->getClass($className);
                    if ($classReflection->hasNativeMethod('__callStatic')) {
                        return [[], null];
                    }
                }
            }
            return [array_merge($errors, [RuleErrorBuilder::message(sprintf('Call to an undefined static method %s::%s().', $typeForDescribe->describe(VerbosityLevel::typeOnly()), $methodName))->build()]), null];
        }
        $method = $classType->getMethod($methodName, $scope);
        if (!$method->isStatic()) {
            $function = $scope->getFunction();
            $scopeIsInMethodClassOrSubClass = TrinaryLogic::createFromBoolean($scope->isInClass())->lazyAnd($classType->getObjectClassNames(), static function (string $objectClassName) use($scope) {
                return TrinaryLogic::createFromBoolean($scope->isInClass() && ($scope->getClassReflection()->getName() === $objectClassName || $scope->getClassReflection()->isSubclassOf($objectClassName)));
            });
            if (!$function instanceof MethodReflection || $function->isStatic() || $scopeIsInMethodClassOrSubClass->no()) {
                // per php-src docs, this method can be called statically, even if declared non-static
                if (strtolower($method->getName()) === 'loadhtml' && $method->getDeclaringClass()->getName() === DOMDocument::class) {
                    return [[], null];
                }
                return [array_merge($errors, [RuleErrorBuilder::message(sprintf('Static call to instance method %s::%s().', $method->getDeclaringClass()->getDisplayName(), $method->getName()))->build()]), $method];
            }
        }
        if (!$scope->canCallMethod($method)) {
            $errors = array_merge($errors, [RuleErrorBuilder::message(sprintf('Call to %s %s %s() of class %s.', $method->isPrivate() ? 'private' : 'protected', $method->isStatic() ? 'static method' : 'method', $method->getName(), $method->getDeclaringClass()->getDisplayName()))->build()]);
        }
        if ($isAbstract) {
            return [[RuleErrorBuilder::message(sprintf('Cannot call abstract%s method %s::%s().', $method->isStatic() ? ' static' : '', $method->getDeclaringClass()->getDisplayName(), $method->getName()))->build()], $method];
        }
        $lowercasedMethodName = SprintfHelper::escapeFormatString(sprintf('%s %s', $method->isStatic() ? 'static method' : 'method', $method->getDeclaringClass()->getDisplayName() . '::' . $method->getName() . '()'));
        if ($this->checkFunctionNameCase && $method->getName() !== $methodName) {
            $errors[] = RuleErrorBuilder::message(sprintf('Call to %s with incorrect case: %s', $lowercasedMethodName, $methodName))->build();
        }
        return [$errors, $method];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Methods;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use function sprintf;
/**
 * @implements Rule<Node\Stmt\ClassMethod>
 */
class AbstractMethodInNonAbstractClassRule implements Rule
{
    public function getNodeType() : string
    {
        return Node\Stmt\ClassMethod::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$scope->isInClass()) {
            throw new ShouldNotHappenException();
        }
        $class = $scope->getClassReflection();
        if ($class->isAbstract()) {
            return [];
        }
        if (!$node->isAbstract()) {
            return [];
        }
        return [RuleErrorBuilder::message(sprintf('Non-abstract class %s contains abstract method %s().', $class->getDisplayName(), $node->name->toString()))->nonIgnorable()->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Methods;

use PhpParser\Node\Expr;
use PHPStan\Analyser\NullsafeOperatorHelper;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use function count;
use function sprintf;
use function strtolower;
class MethodCallCheck
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    /**
     * @var bool
     */
    private $checkFunctionNameCase;
    /**
     * @var bool
     */
    private $reportMagicMethods;
    public function __construct(ReflectionProvider $reflectionProvider, RuleLevelHelper $ruleLevelHelper, bool $checkFunctionNameCase, bool $reportMagicMethods)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->ruleLevelHelper = $ruleLevelHelper;
        $this->checkFunctionNameCase = $checkFunctionNameCase;
        $this->reportMagicMethods = $reportMagicMethods;
    }
    /**
     * @return array{RuleError[], MethodReflection|null}
     */
    public function check(Scope $scope, string $methodName, Expr $var) : array
    {
        $typeResult = $this->ruleLevelHelper->findTypeToCheck($scope, NullsafeOperatorHelper::getNullsafeShortcircuitedExprRespectingScope($scope, $var), sprintf('Call to method %s() on an unknown class %%s.', SprintfHelper::escapeFormatString($methodName)), static function (Type $type) use($methodName) : bool {
            return $type->canCallMethods()->yes() && $type->hasMethod($methodName)->yes();
        });
        $type = $typeResult->getType();
        if ($type instanceof ErrorType) {
            return [$typeResult->getUnknownClassErrors(), null];
        }
        if (!$type->canCallMethods()->yes() || $type->isClassStringType()->yes()) {
            return [[RuleErrorBuilder::message(sprintf('Cannot call method %s() on %s.', $methodName, $type->describe(VerbosityLevel::typeOnly())))->build()], null];
        }
        if (!$type->hasMethod($methodName)->yes()) {
            $directClassNames = $typeResult->getReferencedClasses();
            if (!$this->reportMagicMethods) {
                foreach ($directClassNames as $className) {
                    if (!$this->reflectionProvider->hasClass($className)) {
                        continue;
                    }
                    $classReflection = $this->reflectionProvider->getClass($className);
                    if ($classReflection->hasNativeMethod('__call')) {
                        return [[], null];
                    }
                }
            }
            if (count($directClassNames) === 1) {
                $referencedClass = $directClassNames[0];
                $methodClassReflection = $this->reflectionProvider->getClass($referencedClass);
                $parentClassReflection = $methodClassReflection->getParentClass();
                while ($parentClassReflection !== null) {
                    if ($parentClassReflection->hasMethod($methodName)) {
                        $methodReflection = $parentClassReflection->getMethod($methodName, $scope);
                        return [[RuleErrorBuilder::message(sprintf('Call to private method %s() of parent class %s.', $methodReflection->getName(), $parentClassReflection->getDisplayName()))->build()], $methodReflection];
                    }
                    $parentClassReflection = $parentClassReflection->getParentClass();
                }
            }
            return [[RuleErrorBuilder::message(sprintf('Call to an undefined method %s::%s().', $type->describe(VerbosityLevel::typeOnly()), $methodName))->build()], null];
        }
        $methodReflection = $type->getMethod($methodName, $scope);
        $declaringClass = $methodReflection->getDeclaringClass();
        $messagesMethodName = SprintfHelper::escapeFormatString($declaringClass->getDisplayName() . '::' . $methodReflection->getName() . '()');
        $errors = [];
        if (!$scope->canCallMethod($methodReflection)) {
            $errors[] = RuleErrorBuilder::message(sprintf('Call to %s method %s() of class %s.', $methodReflection->isPrivate() ? 'private' : 'protected', $methodReflection->getName(), $declaringClass->getDisplayName()))->build();
        }
        if ($this->checkFunctionNameCase && strtolower($methodReflection->getName()) === strtolower($methodName) && $methodReflection->getName() !== $methodName) {
            $errors[] = RuleErrorBuilder::message(sprintf('Call to method %s with incorrect case: %s', $messagesMethodName, $methodName))->build();
        }
        return [$errors, $methodReflection];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Methods;

use PhpParser\Node;
use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Rules\FunctionCallParametersCheck;
use PHPStan\Rules\Rule;
use function array_merge;
/**
 * @implements Rule<Node\Expr\MethodCall>
 */
class CallMethodsRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Methods\MethodCallCheck
     */
    private $methodCallCheck;
    /**
     * @var \PHPStan\Rules\FunctionCallParametersCheck
     */
    private $parametersCheck;
    public function __construct(\PHPStan\Rules\Methods\MethodCallCheck $methodCallCheck, FunctionCallParametersCheck $parametersCheck)
    {
        $this->methodCallCheck = $methodCallCheck;
        $this->parametersCheck = $parametersCheck;
    }
    public function getNodeType() : string
    {
        return MethodCall::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->name instanceof Node\Identifier) {
            return [];
        }
        $methodName = $node->name->name;
        [$errors, $methodReflection] = $this->methodCallCheck->check($scope, $methodName, $node->var);
        if ($methodReflection === null) {
            return $errors;
        }
        $declaringClass = $methodReflection->getDeclaringClass();
        $messagesMethodName = SprintfHelper::escapeFormatString($declaringClass->getDisplayName() . '::' . $methodReflection->getName() . '()');
        return array_merge($errors, $this->parametersCheck->check(ParametersAcceptorSelector::selectFromArgs($scope, $node->getArgs(), $methodReflection->getVariants()), $scope, $declaringClass->isBuiltin(), $node, ['Method ' . $messagesMethodName . ' invoked with %d parameter, %d required.', 'Method ' . $messagesMethodName . ' invoked with %d parameters, %d required.', 'Method ' . $messagesMethodName . ' invoked with %d parameter, at least %d required.', 'Method ' . $messagesMethodName . ' invoked with %d parameters, at least %d required.', 'Method ' . $messagesMethodName . ' invoked with %d parameter, %d-%d required.', 'Method ' . $messagesMethodName . ' invoked with %d parameters, %d-%d required.', 'Parameter %s of method ' . $messagesMethodName . ' expects %s, %s given.', 'Result of method ' . $messagesMethodName . ' (void) is used.', 'Parameter %s of method ' . $messagesMethodName . ' is passed by reference, so it expects variables only.', 'Unable to resolve the template type %s in call to method ' . $messagesMethodName, 'Missing parameter $%s in call to method ' . $messagesMethodName . '.', 'Unknown parameter $%s in call to method ' . $messagesMethodName . '.', 'Return type of call to method ' . $messagesMethodName . ' contains unresolvable type.', 'Parameter %s of method ' . $messagesMethodName . ' contains unresolvable type.']));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Methods;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\NullType;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<Node\Expr\NullsafeMethodCall>
 */
class NullsafeMethodCallRule implements Rule
{
    public function getNodeType() : string
    {
        return Node\Expr\NullsafeMethodCall::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $nullType = new NullType();
        $calledOnType = $scope->getType($node->var);
        if ($calledOnType->equals($nullType)) {
            return [];
        }
        if (!$calledOnType->isSuperTypeOf($nullType)->no()) {
            return [];
        }
        return [RuleErrorBuilder::message(sprintf('Using nullsafe method call on non-nullable type %s. Use -> instead.', $calledOnType->describe(VerbosityLevel::typeOnly())))->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Methods;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InClassMethodNode;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ParameterReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Rules\MissingTypehintCheck;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\MixedType;
use PHPStan\Type\VerbosityLevel;
use function implode;
use function sprintf;
/**
 * @implements Rule<InClassMethodNode>
 */
final class MissingMethodParameterTypehintRule implements Rule
{
    /**
     * @var \PHPStan\Rules\MissingTypehintCheck
     */
    private $missingTypehintCheck;
    public function __construct(MissingTypehintCheck $missingTypehintCheck)
    {
        $this->missingTypehintCheck = $missingTypehintCheck;
    }
    public function getNodeType() : string
    {
        return InClassMethodNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $methodReflection = $node->getMethodReflection();
        $messages = [];
        foreach (ParametersAcceptorSelector::selectSingle($methodReflection->getVariants())->getParameters() as $parameterReflection) {
            foreach ($this->checkMethodParameter($methodReflection, $parameterReflection) as $parameterMessage) {
                $messages[] = $parameterMessage;
            }
        }
        return $messages;
    }
    /**
     * @return RuleError[]
     */
    private function checkMethodParameter(MethodReflection $methodReflection, ParameterReflection $parameterReflection) : array
    {
        $parameterType = $parameterReflection->getType();
        if ($parameterType instanceof MixedType && !$parameterType->isExplicitMixed()) {
            return [RuleErrorBuilder::message(sprintf('Method %s::%s() has parameter $%s with no type specified.', $methodReflection->getDeclaringClass()->getDisplayName(), $methodReflection->getName(), $parameterReflection->getName()))->build()];
        }
        $messages = [];
        foreach ($this->missingTypehintCheck->getIterableTypesWithMissingValueTypehint($parameterType) as $iterableType) {
            $iterableTypeDescription = $iterableType->describe(VerbosityLevel::typeOnly());
            $messages[] = RuleErrorBuilder::message(sprintf('Method %s::%s() has parameter $%s with no value type specified in iterable type %s.', $methodReflection->getDeclaringClass()->getDisplayName(), $methodReflection->getName(), $parameterReflection->getName(), $iterableTypeDescription))->tip(MissingTypehintCheck::MISSING_ITERABLE_VALUE_TYPE_TIP)->build();
        }
        foreach ($this->missingTypehintCheck->getNonGenericObjectTypesWithGenericClass($parameterType) as [$name, $genericTypeNames]) {
            $messages[] = RuleErrorBuilder::message(sprintf('Method %s::%s() has parameter $%s with generic %s but does not specify its types: %s', $methodReflection->getDeclaringClass()->getDisplayName(), $methodReflection->getName(), $parameterReflection->getName(), $name, implode(', ', $genericTypeNames)))->tip(MissingTypehintCheck::TURN_OFF_NON_GENERIC_CHECK_TIP)->build();
        }
        foreach ($this->missingTypehintCheck->getCallablesWithMissingSignature($parameterType) as $callableType) {
            $messages[] = RuleErrorBuilder::message(sprintf('Method %s::%s() has parameter $%s with no signature specified for %s.', $methodReflection->getDeclaringClass()->getDisplayName(), $methodReflection->getName(), $parameterReflection->getName(), $callableType->describe(VerbosityLevel::typeOnly())))->build();
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Methods;

use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\MethodPrototypeReflection;
use PHPStan\Reflection\ParameterReflectionWithPhpDocs;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Reflection\Php\PhpMethodFromParserNodeReflection;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\ArrayType;
use PHPStan\Type\IterableType;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\VerbosityLevel;
use Traversable;
use function array_key_exists;
use function array_slice;
use function count;
use function sprintf;
class MethodParameterComparisonHelper
{
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    /**
     * @var bool
     */
    private $genericPrototypeMessage;
    public function __construct(PhpVersion $phpVersion, bool $genericPrototypeMessage)
    {
        $this->phpVersion = $phpVersion;
        $this->genericPrototypeMessage = $genericPrototypeMessage;
    }
    /**
     * @return RuleError[]
     */
    public function compare(MethodPrototypeReflection $prototype, PhpMethodFromParserNodeReflection $method, bool $ignorable = \false) : array
    {
        /** @var RuleError[] $messages */
        $messages = [];
        $prototypeVariant = $prototype->getVariants()[0];
        $methodVariant = ParametersAcceptorSelector::selectSingle($method->getVariants());
        $methodParameters = $methodVariant->getParameters();
        $prototypeAfterVariadic = \false;
        foreach ($prototypeVariant->getParameters() as $i => $prototypeParameter) {
            if (!array_key_exists($i, $methodParameters)) {
                $error = RuleErrorBuilder::message(sprintf('Method %s::%s() overrides method %s::%s() but misses parameter #%d $%s.', $method->getDeclaringClass()->getDisplayName(), $method->getName(), $prototype->getDeclaringClass()->getDisplayName($this->genericPrototypeMessage), $prototype->getName(), $i + 1, $prototypeParameter->getName()));
                if (!$ignorable) {
                    $error->nonIgnorable();
                }
                $messages[] = $error->build();
                continue;
            }
            $methodParameter = $methodParameters[$i];
            if ($prototypeParameter->passedByReference()->no()) {
                if (!$methodParameter->passedByReference()->no()) {
                    $error = RuleErrorBuilder::message(sprintf('Parameter #%d $%s of method %s::%s() is passed by reference but parameter #%d $%s of method %s::%s() is not passed by reference.', $i + 1, $methodParameter->getName(), $method->getDeclaringClass()->getDisplayName(), $method->getName(), $i + 1, $prototypeParameter->getName(), $prototype->getDeclaringClass()->getDisplayName($this->genericPrototypeMessage), $prototype->getName()));
                    if (!$ignorable) {
                        $error->nonIgnorable();
                    }
                    $messages[] = $error->build();
                }
            } elseif ($methodParameter->passedByReference()->no()) {
                $error = RuleErrorBuilder::message(sprintf('Parameter #%d $%s of method %s::%s() is not passed by reference but parameter #%d $%s of method %s::%s() is passed by reference.', $i + 1, $methodParameter->getName(), $method->getDeclaringClass()->getDisplayName(), $method->getName(), $i + 1, $prototypeParameter->getName(), $prototype->getDeclaringClass()->getDisplayName($this->genericPrototypeMessage), $prototype->getName()));
                if (!$ignorable) {
                    $error->nonIgnorable();
                }
                $messages[] = $error->build();
            }
            if ($prototypeParameter->isVariadic()) {
                $prototypeAfterVariadic = \true;
                if (!$methodParameter->isVariadic()) {
                    if (!$methodParameter->isOptional()) {
                        if (count($methodParameters) !== $i + 1) {
                            $error = RuleErrorBuilder::message(sprintf('Parameter #%d $%s of method %s::%s() is not optional.', $i + 1, $methodParameter->getName(), $method->getDeclaringClass()->getDisplayName(), $method->getName()));
                            if (!$ignorable) {
                                $error->nonIgnorable();
                            }
                            $messages[] = $error->build();
                            continue;
                        }
                        $error = RuleErrorBuilder::message(sprintf('Parameter #%d $%s of method %s::%s() is not variadic but parameter #%d $%s of method %s::%s() is variadic.', $i + 1, $methodParameter->getName(), $method->getDeclaringClass()->getDisplayName(), $method->getName(), $i + 1, $prototypeParameter->getName(), $prototype->getDeclaringClass()->getDisplayName($this->genericPrototypeMessage), $prototype->getName()));
                        if (!$ignorable) {
                            $error->nonIgnorable();
                        }
                        $messages[] = $error->build();
                        continue;
                    } elseif (count($methodParameters) === $i + 1) {
                        $error = RuleErrorBuilder::message(sprintf('Parameter #%d $%s of method %s::%s() is not variadic.', $i + 1, $methodParameter->getName(), $method->getDeclaringClass()->getDisplayName(), $method->getName()));
                        if (!$ignorable) {
                            $error->nonIgnorable();
                        }
                        $messages[] = $error->build();
                    }
                }
            } elseif ($methodParameter->isVariadic()) {
                if ($this->phpVersion->supportsLessOverridenParametersWithVariadic()) {
                    $remainingPrototypeParameters = array_slice($prototypeVariant->getParameters(), $i);
                    foreach ($remainingPrototypeParameters as $j => $remainingPrototypeParameter) {
                        if (!$remainingPrototypeParameter instanceof ParameterReflectionWithPhpDocs) {
                            continue;
                        }
                        if ($methodParameter->getNativeType()->isSuperTypeOf($remainingPrototypeParameter->getNativeType())->yes()) {
                            continue;
                        }
                        $error = RuleErrorBuilder::message(sprintf('Parameter #%d ...$%s (%s) of method %s::%s() is not contravariant with parameter #%d $%s (%s) of method %s::%s().', $i + 1, $methodParameter->getName(), $methodParameter->getNativeType()->describe(VerbosityLevel::typeOnly()), $method->getDeclaringClass()->getDisplayName(), $method->getName(), $i + $j + 1, $remainingPrototypeParameter->getName(), $remainingPrototypeParameter->getNativeType()->describe(VerbosityLevel::typeOnly()), $prototype->getDeclaringClass()->getDisplayName($this->genericPrototypeMessage), $prototype->getName()));
                        if (!$ignorable) {
                            $error->nonIgnorable();
                        }
                        $messages[] = $error->build();
                    }
                    break;
                }
                $error = RuleErrorBuilder::message(sprintf('Parameter #%d $%s of method %s::%s() is variadic but parameter #%d $%s of method %s::%s() is not variadic.', $i + 1, $methodParameter->getName(), $method->getDeclaringClass()->getDisplayName(), $method->getName(), $i + 1, $prototypeParameter->getName(), $prototype->getDeclaringClass()->getDisplayName($this->genericPrototypeMessage), $prototype->getName()));
                if (!$ignorable) {
                    $error->nonIgnorable();
                }
                $messages[] = $error->build();
                continue;
            }
            if ($prototypeParameter->isOptional() && !$methodParameter->isOptional()) {
                $error = RuleErrorBuilder::message(sprintf('Parameter #%d $%s of method %s::%s() is required but parameter #%d $%s of method %s::%s() is optional.', $i + 1, $methodParameter->getName(), $method->getDeclaringClass()->getDisplayName(), $method->getName(), $i + 1, $prototypeParameter->getName(), $prototype->getDeclaringClass()->getDisplayName($this->genericPrototypeMessage), $prototype->getName()));
                if (!$ignorable) {
                    $error->nonIgnorable();
                }
                $messages[] = $error->build();
            }
            $methodParameterType = $methodParameter->getNativeType();
            if (!$prototypeParameter instanceof ParameterReflectionWithPhpDocs) {
                continue;
            }
            $prototypeParameterType = $prototypeParameter->getNativeType();
            if (!$this->phpVersion->supportsParameterTypeWidening()) {
                if (!$methodParameterType->equals($prototypeParameterType)) {
                    $error = RuleErrorBuilder::message(sprintf('Parameter #%d $%s (%s) of method %s::%s() does not match parameter #%d $%s (%s) of method %s::%s().', $i + 1, $methodParameter->getName(), $methodParameterType->describe(VerbosityLevel::typeOnly()), $method->getDeclaringClass()->getDisplayName(), $method->getName(), $i + 1, $prototypeParameter->getName(), $prototypeParameterType->describe(VerbosityLevel::typeOnly()), $prototype->getDeclaringClass()->getDisplayName($this->genericPrototypeMessage), $prototype->getName()));
                    if (!$ignorable) {
                        $error->nonIgnorable();
                    }
                    $messages[] = $error->build();
                }
                continue;
            }
            if ($this->isParameterTypeCompatible($methodParameterType, $prototypeParameterType, $this->phpVersion->supportsParameterContravariance())) {
                continue;
            }
            if ($this->phpVersion->supportsParameterContravariance()) {
                $error = RuleErrorBuilder::message(sprintf('Parameter #%d $%s (%s) of method %s::%s() is not contravariant with parameter #%d $%s (%s) of method %s::%s().', $i + 1, $methodParameter->getName(), $methodParameterType->describe(VerbosityLevel::typeOnly()), $method->getDeclaringClass()->getDisplayName(), $method->getName(), $i + 1, $prototypeParameter->getName(), $prototypeParameterType->describe(VerbosityLevel::typeOnly()), $prototype->getDeclaringClass()->getDisplayName($this->genericPrototypeMessage), $prototype->getName()));
                if (!$ignorable) {
                    $error->nonIgnorable();
                }
                $messages[] = $error->build();
            } else {
                $error = RuleErrorBuilder::message(sprintf('Parameter #%d $%s (%s) of method %s::%s() is not compatible with parameter #%d $%s (%s) of method %s::%s().', $i + 1, $methodParameter->getName(), $methodParameterType->describe(VerbosityLevel::typeOnly()), $method->getDeclaringClass()->getDisplayName(), $method->getName(), $i + 1, $prototypeParameter->getName(), $prototypeParameterType->describe(VerbosityLevel::typeOnly()), $prototype->getDeclaringClass()->getDisplayName($this->genericPrototypeMessage), $prototype->getName()));
                if (!$ignorable) {
                    $error->nonIgnorable();
                }
                $messages[] = $error->build();
            }
        }
        if (!isset($i)) {
            $i = -1;
        }
        foreach ($methodParameters as $j => $methodParameter) {
            if ($j <= $i) {
                continue;
            }
            if ($j === count($methodParameters) - 1 && $prototypeAfterVariadic && !$methodParameter->isVariadic()) {
                $error = RuleErrorBuilder::message(sprintf('Parameter #%d $%s of method %s::%s() is not variadic.', $j + 1, $methodParameter->getName(), $method->getDeclaringClass()->getDisplayName(), $method->getName()));
                if (!$ignorable) {
                    $error->nonIgnorable();
                }
                $messages[] = $error->build();
                continue;
            }
            if ($methodParameter->isOptional()) {
                continue;
            }
            $error = RuleErrorBuilder::message(sprintf('Parameter #%d $%s of method %s::%s() is not optional.', $j + 1, $methodParameter->getName(), $method->getDeclaringClass()->getDisplayName(), $method->getName()));
            if (!$ignorable) {
                $error->nonIgnorable();
            }
            $messages[] = $error->build();
            continue;
        }
        return $messages;
    }
    public function isParameterTypeCompatible(Type $methodParameterType, Type $prototypeParameterType, bool $supportsContravariance) : bool
    {
        return $this->isTypeCompatible($methodParameterType, $prototypeParameterType, $supportsContravariance, \false);
    }
    public function isReturnTypeCompatible(Type $methodParameterType, Type $prototypeParameterType, bool $supportsCovariance) : bool
    {
        return $this->isTypeCompatible($methodParameterType, $prototypeParameterType, $supportsCovariance, \true);
    }
    private function isTypeCompatible(Type $methodParameterType, Type $prototypeParameterType, bool $supportsContravariance, bool $considerMixedExplicitness) : bool
    {
        if ($methodParameterType instanceof MixedType) {
            if ($considerMixedExplicitness && $prototypeParameterType instanceof MixedType) {
                return !$methodParameterType->isExplicitMixed() || $prototypeParameterType->isExplicitMixed();
            }
            return \true;
        }
        if (!$supportsContravariance) {
            if (TypeCombinator::containsNull($methodParameterType)) {
                $prototypeParameterType = TypeCombinator::removeNull($prototypeParameterType);
            }
            $methodParameterType = TypeCombinator::removeNull($methodParameterType);
            if ($methodParameterType->equals($prototypeParameterType)) {
                return \true;
            }
            if ($methodParameterType instanceof IterableType) {
                if ($prototypeParameterType instanceof ArrayType) {
                    return \true;
                }
                if ($prototypeParameterType->isObject()->yes() && $prototypeParameterType->getObjectClassNames() === [Traversable::class]) {
                    return \true;
                }
            }
            return \false;
        }
        return $methodParameterType->isSuperTypeOf($prototypeParameterType)->yes();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Methods;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Node\StaticMethodCallableNode;
use PHPStan\Php\PhpVersion;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function sprintf;
/**
 * @implements Rule<StaticMethodCallableNode>
 */
class StaticMethodCallableRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Methods\StaticMethodCallCheck
     */
    private $methodCallCheck;
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(\PHPStan\Rules\Methods\StaticMethodCallCheck $methodCallCheck, PhpVersion $phpVersion)
    {
        $this->methodCallCheck = $methodCallCheck;
        $this->phpVersion = $phpVersion;
    }
    public function getNodeType() : string
    {
        return StaticMethodCallableNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$this->phpVersion->supportsFirstClassCallables()) {
            return [RuleErrorBuilder::message('First-class callables are supported only on PHP 8.1 and later.')->nonIgnorable()->build()];
        }
        $methodName = $node->getName();
        if (!$methodName instanceof Node\Identifier) {
            return [];
        }
        $methodNameName = $methodName->toString();
        [$errors, $methodReflection] = $this->methodCallCheck->check($scope, $methodNameName, $node->getClass());
        if ($methodReflection === null) {
            return $errors;
        }
        $declaringClass = $methodReflection->getDeclaringClass();
        if ($declaringClass->hasNativeMethod($methodNameName)) {
            return $errors;
        }
        $messagesMethodName = SprintfHelper::escapeFormatString($declaringClass->getDisplayName() . '::' . $methodReflection->getName() . '()');
        $errors[] = RuleErrorBuilder::message(sprintf('Creating callable from a non-native static method %s.', $messagesMethodName))->build();
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Methods;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\NeverType;
use function sprintf;
/**
 * @implements Rule<Node\Stmt\Expression>
 */
class CallToConstructorStatementWithoutSideEffectsRule implements Rule
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(ReflectionProvider $reflectionProvider)
    {
        $this->reflectionProvider = $reflectionProvider;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\Expression::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->expr instanceof Node\Expr\New_) {
            return [];
        }
        $instantiation = $node->expr;
        if (!$instantiation->class instanceof Node\Name) {
            return [];
        }
        $className = $scope->resolveName($instantiation->class);
        if (!$this->reflectionProvider->hasClass($className)) {
            return [];
        }
        $classReflection = $this->reflectionProvider->getClass($className);
        if (!$classReflection->hasConstructor()) {
            return [];
        }
        $constructor = $classReflection->getConstructor();
        if ($constructor->hasSideEffects()->no()) {
            $throwsType = $constructor->getThrowType();
            if ($throwsType !== null && !$throwsType->isVoid()->yes()) {
                return [];
            }
            $methodResult = $scope->getType($instantiation);
            if ($methodResult instanceof NeverType && $methodResult->isExplicit()) {
                return [];
            }
            return [RuleErrorBuilder::message(sprintf('Call to %s::%s() on a separate line has no effect.', $classReflection->getDisplayName(), $constructor->getName()))->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Methods;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InClassMethodNode;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\ParameterReflectionWithPhpDocs;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Reflection\ParametersAcceptorWithPhpDocs;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Generic\TemplateTypeHelper;
use PHPStan\Type\MixedType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\StaticType;
use PHPStan\Type\Type;
use PHPStan\Type\TypehintHelper;
use PHPStan\Type\TypeTraverser;
use PHPStan\Type\VerbosityLevel;
use function count;
use function min;
use function sprintf;
/**
 * @implements Rule<InClassMethodNode>
 */
class MethodSignatureRule implements Rule
{
    /**
     * @var bool
     */
    private $reportMaybes;
    /**
     * @var bool
     */
    private $reportStatic;
    public function __construct(bool $reportMaybes, bool $reportStatic)
    {
        $this->reportMaybes = $reportMaybes;
        $this->reportStatic = $reportStatic;
    }
    public function getNodeType() : string
    {
        return InClassMethodNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $method = $node->getMethodReflection();
        $methodName = $method->getName();
        if ($methodName === '__construct') {
            return [];
        }
        if (!$this->reportStatic && $method->isStatic()) {
            return [];
        }
        if ($method->isPrivate()) {
            return [];
        }
        $parameters = ParametersAcceptorSelector::selectSingle($method->getVariants());
        $errors = [];
        $declaringClass = $method->getDeclaringClass();
        foreach ($this->collectParentMethods($methodName, $method->getDeclaringClass()) as $parentMethod) {
            $parentVariants = $parentMethod->getVariants();
            if (count($parentVariants) !== 1) {
                continue;
            }
            $parentParameters = ParametersAcceptorSelector::selectSingle($parentVariants);
            [$returnTypeCompatibility, $returnType, $parentReturnType] = $this->checkReturnTypeCompatibility($declaringClass, $parameters, $parentParameters);
            if ($returnTypeCompatibility->no() || !$returnTypeCompatibility->yes() && $this->reportMaybes) {
                $errors[] = RuleErrorBuilder::message(sprintf('Return type (%s) of method %s::%s() should be %s with return type (%s) of method %s::%s()', $returnType->describe(VerbosityLevel::value()), $method->getDeclaringClass()->getDisplayName(), $method->getName(), $returnTypeCompatibility->no() ? 'compatible' : 'covariant', $parentReturnType->describe(VerbosityLevel::value()), $parentMethod->getDeclaringClass()->getDisplayName(), $parentMethod->getName()))->build();
            }
            $parameterResults = $this->checkParameterTypeCompatibility($declaringClass, $parameters->getParameters(), $parentParameters->getParameters());
            foreach ($parameterResults as $parameterIndex => [$parameterResult, $parameterType, $parentParameterType]) {
                if ($parameterResult->yes()) {
                    continue;
                }
                if (!$parameterResult->no() && !$this->reportMaybes) {
                    continue;
                }
                $parameter = $parameters->getParameters()[$parameterIndex];
                $parentParameter = $parentParameters->getParameters()[$parameterIndex];
                $errors[] = RuleErrorBuilder::message(sprintf('Parameter #%d $%s (%s) of method %s::%s() should be %s with parameter $%s (%s) of method %s::%s()', $parameterIndex + 1, $parameter->getName(), $parameterType->describe(VerbosityLevel::value()), $method->getDeclaringClass()->getDisplayName(), $method->getName(), $parameterResult->no() ? 'compatible' : 'contravariant', $parentParameter->getName(), $parentParameterType->describe(VerbosityLevel::value()), $parentMethod->getDeclaringClass()->getDisplayName(), $parentMethod->getName()))->build();
            }
        }
        return $errors;
    }
    /**
     * @return ExtendedMethodReflection[]
     */
    private function collectParentMethods(string $methodName, ClassReflection $class) : array
    {
        $parentMethods = [];
        $parentClass = $class->getParentClass();
        if ($parentClass !== null && $parentClass->hasNativeMethod($methodName)) {
            $parentMethod = $parentClass->getNativeMethod($methodName);
            if (!$parentMethod->isPrivate()) {
                $parentMethods[] = $parentMethod;
            }
        }
        foreach ($class->getInterfaces() as $interface) {
            if (!$interface->hasNativeMethod($methodName)) {
                continue;
            }
            $parentMethods[] = $interface->getNativeMethod($methodName);
        }
        return $parentMethods;
    }
    /**
     * @return array{TrinaryLogic, Type, Type}
     */
    private function checkReturnTypeCompatibility(ClassReflection $declaringClass, ParametersAcceptorWithPhpDocs $currentVariant, ParametersAcceptorWithPhpDocs $parentVariant) : array
    {
        $returnType = TypehintHelper::decideType($currentVariant->getNativeReturnType(), TemplateTypeHelper::resolveToBounds($currentVariant->getPhpDocReturnType()));
        $originalParentReturnType = TypehintHelper::decideType($parentVariant->getNativeReturnType(), TemplateTypeHelper::resolveToBounds($parentVariant->getPhpDocReturnType()));
        $parentReturnType = $this->transformStaticType($declaringClass, $originalParentReturnType);
        // Allow adding `void` return type hints when the parent defines no return type
        if ($returnType->isVoid()->yes() && $parentReturnType instanceof MixedType) {
            return [TrinaryLogic::createYes(), $returnType, $parentReturnType];
        }
        // We can return anything
        if ($parentReturnType->isVoid()->yes()) {
            return [TrinaryLogic::createYes(), $returnType, $parentReturnType];
        }
        return [$parentReturnType->isSuperTypeOf($returnType), TypehintHelper::decideType($currentVariant->getNativeReturnType(), $currentVariant->getPhpDocReturnType()), $originalParentReturnType];
    }
    /**
     * @param ParameterReflectionWithPhpDocs[] $parameters
     * @param ParameterReflectionWithPhpDocs[] $parentParameters
     * @return array<int, array{TrinaryLogic, Type, Type}>
     */
    private function checkParameterTypeCompatibility(ClassReflection $declaringClass, array $parameters, array $parentParameters) : array
    {
        $parameterResults = [];
        $numberOfParameters = min(count($parameters), count($parentParameters));
        for ($i = 0; $i < $numberOfParameters; $i++) {
            $parameter = $parameters[$i];
            $parentParameter = $parentParameters[$i];
            $parameterType = TypehintHelper::decideType($parameter->getNativeType(), TemplateTypeHelper::resolveToBounds($parameter->getPhpDocType()));
            $originalParameterType = TypehintHelper::decideType($parentParameter->getNativeType(), TemplateTypeHelper::resolveToBounds($parentParameter->getPhpDocType()));
            $parentParameterType = $this->transformStaticType($declaringClass, $originalParameterType);
            $parameterResults[] = [$parameterType->isSuperTypeOf($parentParameterType), TypehintHelper::decideType($parameter->getNativeType(), $parameter->getPhpDocType()), $originalParameterType];
        }
        return $parameterResults;
    }
    private function transformStaticType(ClassReflection $declaringClass, Type $type) : Type
    {
        return TypeTraverser::map($type, static function (Type $type, callable $traverse) use($declaringClass) : Type {
            if ($type instanceof StaticType) {
                if ($declaringClass->isFinal()) {
                    $changedType = new ObjectType($declaringClass->getName());
                } else {
                    $changedType = $type->changeBaseClass($declaringClass);
                }
                return $traverse($changedType);
            }
            return $traverse($type);
        });
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Methods;

use Attribute;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\AttributesCheck;
use PHPStan\Rules\Rule;
/**
 * @implements Rule<Node\Stmt\ClassMethod>
 */
class MethodAttributesRule implements Rule
{
    /**
     * @var \PHPStan\Rules\AttributesCheck
     */
    private $attributesCheck;
    public function __construct(AttributesCheck $attributesCheck)
    {
        $this->attributesCheck = $attributesCheck;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\ClassMethod::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        return $this->attributesCheck->check($scope, $node->attrGroups, Attribute::TARGET_METHOD, 'method');
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Methods;

use PhpParser\Node;
use PHPStan\Analyser\NullsafeOperatorHelper;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\ErrorType;
use PHPStan\Type\NeverType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use function sprintf;
use function strtolower;
/**
 * @implements Rule<Node\Stmt\Expression>
 */
class CallToStaticMethodStatementWithoutSideEffectsRule implements Rule
{
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(RuleLevelHelper $ruleLevelHelper, ReflectionProvider $reflectionProvider)
    {
        $this->ruleLevelHelper = $ruleLevelHelper;
        $this->reflectionProvider = $reflectionProvider;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\Expression::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->expr instanceof Node\Expr\StaticCall) {
            return [];
        }
        $staticCall = $node->expr;
        if (!$staticCall->name instanceof Node\Identifier) {
            return [];
        }
        $methodName = $staticCall->name->toString();
        if ($staticCall->class instanceof Node\Name) {
            $className = $scope->resolveName($staticCall->class);
            if (!$this->reflectionProvider->hasClass($className)) {
                return [];
            }
            $calledOnType = new ObjectType($className);
        } else {
            $typeResult = $this->ruleLevelHelper->findTypeToCheck($scope, NullsafeOperatorHelper::getNullsafeShortcircuitedExprRespectingScope($scope, $staticCall->class), '', static function (Type $type) use($methodName) : bool {
                return $type->canCallMethods()->yes() && $type->hasMethod($methodName)->yes();
            });
            $calledOnType = $typeResult->getType();
            if ($calledOnType instanceof ErrorType) {
                return [];
            }
        }
        if (!$calledOnType->canCallMethods()->yes()) {
            return [];
        }
        if (!$calledOnType->hasMethod($methodName)->yes()) {
            return [];
        }
        $method = $calledOnType->getMethod($methodName, $scope);
        if (strtolower($method->getName()) === '__construct' || strtolower($method->getName()) === strtolower($method->getDeclaringClass()->getName())) {
            return [];
        }
        if ($method->hasSideEffects()->no() || $node->expr->isFirstClassCallable()) {
            if (!$node->expr->isFirstClassCallable()) {
                $throwsType = $method->getThrowType();
                if ($throwsType !== null && !$throwsType->isVoid()->yes()) {
                    return [];
                }
            }
            $methodResult = $scope->getType($staticCall);
            if ($methodResult instanceof NeverType && $methodResult->isExplicit()) {
                return [];
            }
            return [RuleErrorBuilder::message(sprintf('Call to %s %s::%s() on a separate line has no effect.', $method->isStatic() ? 'static method' : 'method', $method->getDeclaringClass()->getDisplayName(), $method->getName()))->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Methods;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InClassMethodNode;
use PHPStan\Php\PhpVersion;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function sprintf;
/** @implements Rule<InClassMethodNode> */
class FinalPrivateMethodRule implements Rule
{
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
    }
    public function getNodeType() : string
    {
        return InClassMethodNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $method = $node->getMethodReflection();
        if (!$this->phpVersion->producesWarningForFinalPrivateMethods()) {
            return [];
        }
        if ($method->getName() === '__construct') {
            return [];
        }
        if (!$method->isFinal()->yes() || !$method->isPrivate()) {
            return [];
        }
        return [RuleErrorBuilder::message(sprintf('Private method %s::%s() cannot be final as it is never overridden by other classes.', $method->getDeclaringClass()->getDisplayName(), $method->getName()))->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Methods;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
use PHPStan\Node\InClassNode;
use PHPStan\Php\PhpVersion;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use Serializable;
use function sprintf;
use function strtolower;
/**
 * @implements Rule<InClassNode>
 */
class MissingMagicSerializationMethodsRule implements Rule
{
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpversion;
    public function __construct(PhpVersion $phpversion)
    {
        $this->phpversion = $phpversion;
    }
    public function getNodeType() : string
    {
        return InClassNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $classReflection = $node->getClassReflection();
        if (!$this->phpversion->serializableRequiresMagicMethods()) {
            return [];
        }
        if (!$classReflection->implementsInterface(Serializable::class)) {
            return [];
        }
        if ($classReflection->isAbstract() || $classReflection->isInterface() || $classReflection->isEnum()) {
            return [];
        }
        $messages = [];
        try {
            $nativeMethods = $classReflection->getNativeReflection()->getMethods();
        } catch (IdentifierNotFound $exception) {
            return [];
        }
        $missingMagicSerialize = \true;
        $missingMagicUnserialize = \true;
        foreach ($nativeMethods as $method) {
            if (strtolower($method->getName()) === '__serialize') {
                $missingMagicSerialize = \false;
            }
            if (strtolower($method->getName()) !== '__unserialize') {
                continue;
            }
            $missingMagicUnserialize = \false;
        }
        if ($missingMagicSerialize) {
            $messages[] = RuleErrorBuilder::message(sprintf('Non-abstract class %s implements the Serializable interface, but does not implement __serialize().', $classReflection->getDisplayName()))->tip('See https://wiki.php.net/rfc/phase_out_serializable')->build();
        }
        if ($missingMagicUnserialize) {
            $messages[] = RuleErrorBuilder::message(sprintf('Non-abstract class %s implements the Serializable interface, but does not implement __unserialize().', $classReflection->getDisplayName()))->tip('See https://wiki.php.net/rfc/phase_out_serializable')->build();
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Methods;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
use PHPStan\Node\InClassNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function sprintf;
/**
 * @implements Rule<InClassNode>
 */
class MissingMethodImplementationRule implements Rule
{
    public function getNodeType() : string
    {
        return InClassNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $classReflection = $node->getClassReflection();
        if ($classReflection->isInterface()) {
            return [];
        }
        if ($classReflection->isAbstract()) {
            return [];
        }
        $messages = [];
        try {
            $nativeMethods = $classReflection->getNativeReflection()->getMethods();
        } catch (IdentifierNotFound $exception) {
            return [];
        }
        foreach ($nativeMethods as $method) {
            if (!$method->isAbstract()) {
                continue;
            }
            $declaringClass = $method->getDeclaringClass();
            $classLikeDescription = 'Non-abstract class';
            if ($classReflection->isEnum()) {
                $classLikeDescription = 'Enum';
            }
            $messages[] = RuleErrorBuilder::message(sprintf('%s %s contains abstract method %s() from %s %s.', $classLikeDescription, $classReflection->getDisplayName(), $method->getName(), $declaringClass->isInterface() ? 'interface' : 'class', $declaringClass->getName()))->nonIgnorable()->build();
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Methods;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
/**
 * @implements Rule<Node\Expr\MethodCall>
 */
class IllegalConstructorMethodCallRule implements Rule
{
    public function getNodeType() : string
    {
        return Node\Expr\MethodCall::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->name instanceof Node\Identifier || $node->name->toLowerString() !== '__construct') {
            return [];
        }
        return [RuleErrorBuilder::message('Call to __construct() on an existing object is not allowed.')->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Methods;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InClassMethodNode;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\FunctionVariantWithPhpDocs;
use PHPStan\Reflection\MethodPrototypeReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\VerbosityLevel;
use function array_merge;
use function count;
use function sprintf;
use function strtolower;
/**
 * @implements Rule<InClassMethodNode>
 */
class OverridingMethodRule implements Rule
{
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    /**
     * @var \PHPStan\Rules\Methods\MethodSignatureRule
     */
    private $methodSignatureRule;
    /**
     * @var bool
     */
    private $checkPhpDocMethodSignatures;
    /**
     * @var \PHPStan\Rules\Methods\MethodParameterComparisonHelper
     */
    private $methodParameterComparisonHelper;
    /**
     * @var bool
     */
    private $genericPrototypeMessage;
    public function __construct(PhpVersion $phpVersion, \PHPStan\Rules\Methods\MethodSignatureRule $methodSignatureRule, bool $checkPhpDocMethodSignatures, \PHPStan\Rules\Methods\MethodParameterComparisonHelper $methodParameterComparisonHelper, bool $genericPrototypeMessage)
    {
        $this->phpVersion = $phpVersion;
        $this->methodSignatureRule = $methodSignatureRule;
        $this->checkPhpDocMethodSignatures = $checkPhpDocMethodSignatures;
        $this->methodParameterComparisonHelper = $methodParameterComparisonHelper;
        $this->genericPrototypeMessage = $genericPrototypeMessage;
    }
    public function getNodeType() : string
    {
        return InClassMethodNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $method = $node->getMethodReflection();
        $prototype = $method->getPrototype();
        if ($prototype->getDeclaringClass()->getName() === $method->getDeclaringClass()->getName()) {
            if (strtolower($method->getName()) === '__construct') {
                $parent = $method->getDeclaringClass()->getParentClass();
                if ($parent !== null && $parent->hasConstructor()) {
                    $parentConstructor = $parent->getConstructor();
                    if ($parentConstructor->isFinal()->yes()) {
                        return $this->addErrors([RuleErrorBuilder::message(sprintf('Method %s::%s() overrides final method %s::%s().', $method->getDeclaringClass()->getDisplayName(), $method->getName(), $parent->getDisplayName($this->genericPrototypeMessage), $parentConstructor->getName()))->nonIgnorable()->build()], $node, $scope);
                    }
                }
            }
            return [];
        }
        if (!$prototype instanceof MethodPrototypeReflection) {
            return [];
        }
        $messages = [];
        if ($prototype->isFinal()) {
            $messages[] = RuleErrorBuilder::message(sprintf('Method %s::%s() overrides final method %s::%s().', $method->getDeclaringClass()->getDisplayName(), $method->getName(), $prototype->getDeclaringClass()->getDisplayName($this->genericPrototypeMessage), $prototype->getName()))->nonIgnorable()->build();
        }
        if ($prototype->isStatic()) {
            if (!$method->isStatic()) {
                $messages[] = RuleErrorBuilder::message(sprintf('Non-static method %s::%s() overrides static method %s::%s().', $method->getDeclaringClass()->getDisplayName(), $method->getName(), $prototype->getDeclaringClass()->getDisplayName($this->genericPrototypeMessage), $prototype->getName()))->nonIgnorable()->build();
            }
        } elseif ($method->isStatic()) {
            $messages[] = RuleErrorBuilder::message(sprintf('Static method %s::%s() overrides non-static method %s::%s().', $method->getDeclaringClass()->getDisplayName(), $method->getName(), $prototype->getDeclaringClass()->getDisplayName($this->genericPrototypeMessage), $prototype->getName()))->nonIgnorable()->build();
        }
        if ($prototype->isPublic()) {
            if (!$method->isPublic()) {
                $messages[] = RuleErrorBuilder::message(sprintf('%s method %s::%s() overriding public method %s::%s() should also be public.', $method->isPrivate() ? 'Private' : 'Protected', $method->getDeclaringClass()->getDisplayName(), $method->getName(), $prototype->getDeclaringClass()->getDisplayName($this->genericPrototypeMessage), $prototype->getName()))->nonIgnorable()->build();
            }
        } elseif ($method->isPrivate()) {
            $messages[] = RuleErrorBuilder::message(sprintf('Private method %s::%s() overriding protected method %s::%s() should be protected or public.', $method->getDeclaringClass()->getDisplayName(), $method->getName(), $prototype->getDeclaringClass()->getDisplayName($this->genericPrototypeMessage), $prototype->getName()))->nonIgnorable()->build();
        }
        $prototypeVariants = $prototype->getVariants();
        if (count($prototypeVariants) !== 1) {
            return $this->addErrors($messages, $node, $scope);
        }
        $prototypeVariant = $prototypeVariants[0];
        $methodVariant = ParametersAcceptorSelector::selectSingle($method->getVariants());
        $methodReturnType = $methodVariant->getNativeReturnType();
        if ($this->phpVersion->hasTentativeReturnTypes() && $prototype->getTentativeReturnType() !== null && !$this->hasReturnTypeWillChangeAttribute($node->getOriginalNode())) {
            if (!$this->methodParameterComparisonHelper->isReturnTypeCompatible($prototype->getTentativeReturnType(), $methodVariant->getNativeReturnType(), \true)) {
                $messages[] = RuleErrorBuilder::message(sprintf('Return type %s of method %s::%s() is not covariant with tentative return type %s of method %s::%s().', $methodReturnType->describe(VerbosityLevel::typeOnly()), $method->getDeclaringClass()->getDisplayName(), $method->getName(), $prototype->getTentativeReturnType()->describe(VerbosityLevel::typeOnly()), $prototype->getDeclaringClass()->getDisplayName($this->genericPrototypeMessage), $prototype->getName()))->tip('Make it covariant, or use the #[\\ReturnTypeWillChange] attribute to temporarily suppress the error.')->nonIgnorable()->build();
            }
        }
        $messages = array_merge($messages, $this->methodParameterComparisonHelper->compare($prototype, $method));
        if (!$prototypeVariant instanceof FunctionVariantWithPhpDocs) {
            return $this->addErrors($messages, $node, $scope);
        }
        $prototypeReturnType = $prototypeVariant->getNativeReturnType();
        if (!$this->methodParameterComparisonHelper->isReturnTypeCompatible($prototypeReturnType, $methodReturnType, $this->phpVersion->supportsReturnCovariance())) {
            if ($this->phpVersion->supportsReturnCovariance()) {
                $messages[] = RuleErrorBuilder::message(sprintf('Return type %s of method %s::%s() is not covariant with return type %s of method %s::%s().', $methodReturnType->describe(VerbosityLevel::typeOnly()), $method->getDeclaringClass()->getDisplayName(), $method->getName(), $prototypeReturnType->describe(VerbosityLevel::typeOnly()), $prototype->getDeclaringClass()->getDisplayName($this->genericPrototypeMessage), $prototype->getName()))->nonIgnorable()->build();
            } else {
                $messages[] = RuleErrorBuilder::message(sprintf('Return type %s of method %s::%s() is not compatible with return type %s of method %s::%s().', $methodReturnType->describe(VerbosityLevel::typeOnly()), $method->getDeclaringClass()->getDisplayName(), $method->getName(), $prototypeReturnType->describe(VerbosityLevel::typeOnly()), $prototype->getDeclaringClass()->getDisplayName($this->genericPrototypeMessage), $prototype->getName()))->nonIgnorable()->build();
            }
        }
        return $this->addErrors($messages, $node, $scope);
    }
    /**
     * @param RuleError[] $errors
     * @return (string|RuleError)[]
     */
    private function addErrors(array $errors, InClassMethodNode $classMethod, Scope $scope) : array
    {
        if (count($errors) > 0) {
            return $errors;
        }
        if (!$this->checkPhpDocMethodSignatures) {
            return $errors;
        }
        return $this->methodSignatureRule->processNode($classMethod, $scope);
    }
    private function hasReturnTypeWillChangeAttribute(Node\Stmt\ClassMethod $method) : bool
    {
        foreach ($method->attrGroups as $attrGroup) {
            foreach ($attrGroup->attrs as $attr) {
                if ($attr->name->toLowerString() === 'returntypewillchange') {
                    return \true;
                }
            }
        }
        return \false;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Methods;

use PhpParser\Node;
use PhpParser\Node\Stmt\Return_;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Reflection\Php\PhpMethodFromParserNodeReflection;
use PHPStan\Rules\FunctionReturnTypeCheck;
use PHPStan\Rules\Rule;
use function sprintf;
/**
 * @implements Rule<Node\Stmt\Return_>
 */
class ReturnTypeRule implements Rule
{
    /**
     * @var \PHPStan\Rules\FunctionReturnTypeCheck
     */
    private $returnTypeCheck;
    public function __construct(FunctionReturnTypeCheck $returnTypeCheck)
    {
        $this->returnTypeCheck = $returnTypeCheck;
    }
    public function getNodeType() : string
    {
        return Return_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if ($scope->getFunction() === null) {
            return [];
        }
        if ($scope->isInAnonymousFunction()) {
            return [];
        }
        $method = $scope->getFunction();
        if (!$method instanceof PhpMethodFromParserNodeReflection) {
            return [];
        }
        return $this->returnTypeCheck->checkReturnType($scope, ParametersAcceptorSelector::selectSingle($method->getVariants())->getReturnType(), $node->expr, $node, sprintf('Method %s::%s() should return %%s but empty return statement found.', $method->getDeclaringClass()->getDisplayName(), $method->getName()), sprintf('Method %s::%s() with return type void returns %%s but should not return anything.', $method->getDeclaringClass()->getDisplayName(), $method->getName()), sprintf('Method %s::%s() should return %%s but returns %%s.', $method->getDeclaringClass()->getDisplayName(), $method->getName()), sprintf('Method %s::%s() should never return but return statement found.', $method->getDeclaringClass()->getDisplayName(), $method->getName()), $method->isGenerator());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Methods;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InClassMethodNode;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Rules\MissingTypehintCheck;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\MixedType;
use PHPStan\Type\VerbosityLevel;
use function implode;
use function sprintf;
/**
 * @implements Rule<InClassMethodNode>
 */
final class MissingMethodReturnTypehintRule implements Rule
{
    /**
     * @var \PHPStan\Rules\MissingTypehintCheck
     */
    private $missingTypehintCheck;
    public function __construct(MissingTypehintCheck $missingTypehintCheck)
    {
        $this->missingTypehintCheck = $missingTypehintCheck;
    }
    public function getNodeType() : string
    {
        return InClassMethodNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $methodReflection = $node->getMethodReflection();
        $returnType = ParametersAcceptorSelector::selectSingle($methodReflection->getVariants())->getReturnType();
        if ($returnType instanceof MixedType && !$returnType->isExplicitMixed()) {
            return [RuleErrorBuilder::message(sprintf('Method %s::%s() has no return type specified.', $methodReflection->getDeclaringClass()->getDisplayName(), $methodReflection->getName()))->build()];
        }
        $messages = [];
        foreach ($this->missingTypehintCheck->getIterableTypesWithMissingValueTypehint($returnType) as $iterableType) {
            $iterableTypeDescription = $iterableType->describe(VerbosityLevel::typeOnly());
            $messages[] = RuleErrorBuilder::message(sprintf('Method %s::%s() return type has no value type specified in iterable type %s.', $methodReflection->getDeclaringClass()->getDisplayName(), $methodReflection->getName(), $iterableTypeDescription))->tip(MissingTypehintCheck::MISSING_ITERABLE_VALUE_TYPE_TIP)->build();
        }
        foreach ($this->missingTypehintCheck->getNonGenericObjectTypesWithGenericClass($returnType) as [$name, $genericTypeNames]) {
            $messages[] = RuleErrorBuilder::message(sprintf('Method %s::%s() return type with generic %s does not specify its types: %s', $methodReflection->getDeclaringClass()->getDisplayName(), $methodReflection->getName(), $name, implode(', ', $genericTypeNames)))->tip(MissingTypehintCheck::TURN_OFF_NON_GENERIC_CHECK_TIP)->build();
        }
        foreach ($this->missingTypehintCheck->getCallablesWithMissingSignature($returnType) as $callableType) {
            $messages[] = RuleErrorBuilder::message(sprintf('Method %s::%s() return type has no signature specified for %s.', $methodReflection->getDeclaringClass()->getDisplayName(), $methodReflection->getName(), $callableType->describe(VerbosityLevel::typeOnly())))->build();
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Methods;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InClassMethodNode;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\Dummy\DummyConstructorReflection;
use PHPStan\Reflection\MethodPrototypeReflection;
use PHPStan\Reflection\Php\PhpMethodReflection;
use PHPStan\Rules\Rule;
use function strtolower;
/** @implements Rule<InClassMethodNode> */
class ConsistentConstructorRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Methods\MethodParameterComparisonHelper
     */
    private $methodParameterComparisonHelper;
    public function __construct(\PHPStan\Rules\Methods\MethodParameterComparisonHelper $methodParameterComparisonHelper)
    {
        $this->methodParameterComparisonHelper = $methodParameterComparisonHelper;
    }
    public function getNodeType() : string
    {
        return InClassMethodNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $method = $node->getMethodReflection();
        if (strtolower($method->getName()) !== '__construct') {
            return [];
        }
        $parent = $method->getDeclaringClass()->getParentClass();
        if ($parent === null) {
            return [];
        }
        if ($parent->hasConstructor()) {
            $parentConstructor = $parent->getConstructor();
        } else {
            $parentConstructor = $this->getEmptyConstructor($parent);
        }
        if (!$parentConstructor instanceof PhpMethodReflection && !$parentConstructor instanceof MethodPrototypeReflection) {
            return [];
        }
        if (!$parentConstructor->getDeclaringClass()->hasConsistentConstructor()) {
            return [];
        }
        if (!$parentConstructor instanceof MethodPrototypeReflection) {
            $parentConstructor = $this->getMethodPrototypeReflection($parentConstructor, $parent);
        }
        return $this->methodParameterComparisonHelper->compare($parentConstructor, $method, \true);
    }
    private function getMethodPrototypeReflection(PhpMethodReflection $methodReflection, ClassReflection $classReflection) : MethodPrototypeReflection
    {
        return new MethodPrototypeReflection($methodReflection->getName(), $classReflection, $methodReflection->isStatic(), $methodReflection->isPrivate(), $methodReflection->isPublic(), $methodReflection->isAbstract(), $methodReflection->isFinal()->yes(), $classReflection->getNativeMethod($methodReflection->getName())->getVariants(), null);
    }
    private function getEmptyConstructor(ClassReflection $classReflection) : MethodPrototypeReflection
    {
        $emptyConstructor = new DummyConstructorReflection($classReflection);
        return new MethodPrototypeReflection($emptyConstructor->getName(), $classReflection, $emptyConstructor->isStatic(), $emptyConstructor->isPrivate(), $emptyConstructor->isPublic(), \false, $emptyConstructor->isFinal()->yes(), $emptyConstructor->getVariants(), null);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Methods;

use PhpParser\Node;
use PHPStan\Analyser\NullsafeOperatorHelper;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\ErrorType;
use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
use function sprintf;
/**
 * @implements Rule<Node\Stmt\Expression>
 */
class CallToMethodStatementWithoutSideEffectsRule implements Rule
{
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    public function __construct(RuleLevelHelper $ruleLevelHelper)
    {
        $this->ruleLevelHelper = $ruleLevelHelper;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\Expression::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if ($node->expr instanceof Node\Expr\NullsafeMethodCall) {
            $scope = $scope->filterByTruthyValue(new Node\Expr\BinaryOp\NotIdentical($node->expr->var, new Node\Expr\ConstFetch(new Node\Name('null'))));
        } elseif (!$node->expr instanceof Node\Expr\MethodCall) {
            return [];
        }
        $methodCall = $node->expr;
        if (!$methodCall->name instanceof Node\Identifier) {
            return [];
        }
        $methodName = $methodCall->name->toString();
        $typeResult = $this->ruleLevelHelper->findTypeToCheck($scope, NullsafeOperatorHelper::getNullsafeShortcircuitedExprRespectingScope($scope, $methodCall->var), '', static function (Type $type) use($methodName) : bool {
            return $type->canCallMethods()->yes() && $type->hasMethod($methodName)->yes();
        });
        $calledOnType = $typeResult->getType();
        if ($calledOnType instanceof ErrorType) {
            return [];
        }
        if (!$calledOnType->canCallMethods()->yes()) {
            return [];
        }
        if (!$calledOnType->hasMethod($methodName)->yes()) {
            return [];
        }
        $method = $calledOnType->getMethod($methodName, $scope);
        if ($method->hasSideEffects()->no() || $node->expr->isFirstClassCallable()) {
            if (!$node->expr->isFirstClassCallable()) {
                $throwsType = $method->getThrowType();
                if ($throwsType !== null && !$throwsType->isVoid()->yes()) {
                    return [];
                }
            }
            $methodResult = $scope->getType($methodCall);
            if ($methodResult instanceof NeverType && $methodResult->isExplicit()) {
                return [];
            }
            return [RuleErrorBuilder::message(sprintf('Call to %s %s::%s() on a separate line has no effect.', $method->isStatic() ? 'static method' : 'method', $method->getDeclaringClass()->getDisplayName(), $method->getName()))->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Methods;

use PhpParser\Node;
use PhpParser\Node\Expr\StaticCall;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Rules\FunctionCallParametersCheck;
use PHPStan\Rules\Rule;
use function array_merge;
use function sprintf;
/**
 * @implements Rule<Node\Expr\StaticCall>
 */
class CallStaticMethodsRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Methods\StaticMethodCallCheck
     */
    private $methodCallCheck;
    /**
     * @var \PHPStan\Rules\FunctionCallParametersCheck
     */
    private $parametersCheck;
    public function __construct(\PHPStan\Rules\Methods\StaticMethodCallCheck $methodCallCheck, FunctionCallParametersCheck $parametersCheck)
    {
        $this->methodCallCheck = $methodCallCheck;
        $this->parametersCheck = $parametersCheck;
    }
    public function getNodeType() : string
    {
        return StaticCall::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->name instanceof Node\Identifier) {
            return [];
        }
        $methodName = $node->name->name;
        [$errors, $method] = $this->methodCallCheck->check($scope, $methodName, $node->class);
        if ($method === null) {
            return $errors;
        }
        $displayMethodName = SprintfHelper::escapeFormatString(sprintf('%s %s', $method->isStatic() ? 'Static method' : 'Method', $method->getDeclaringClass()->getDisplayName() . '::' . $method->getName() . '()'));
        $lowercasedMethodName = SprintfHelper::escapeFormatString(sprintf('%s %s', $method->isStatic() ? 'static method' : 'method', $method->getDeclaringClass()->getDisplayName() . '::' . $method->getName() . '()'));
        $errors = array_merge($errors, $this->parametersCheck->check(ParametersAcceptorSelector::selectFromArgs($scope, $node->getArgs(), $method->getVariants()), $scope, $method->getDeclaringClass()->isBuiltin(), $node, [$displayMethodName . ' invoked with %d parameter, %d required.', $displayMethodName . ' invoked with %d parameters, %d required.', $displayMethodName . ' invoked with %d parameter, at least %d required.', $displayMethodName . ' invoked with %d parameters, at least %d required.', $displayMethodName . ' invoked with %d parameter, %d-%d required.', $displayMethodName . ' invoked with %d parameters, %d-%d required.', 'Parameter %s of ' . $lowercasedMethodName . ' expects %s, %s given.', 'Result of ' . $lowercasedMethodName . ' (void) is used.', 'Parameter %s of ' . $lowercasedMethodName . ' is passed by reference, so it expects variables only.', 'Unable to resolve the template type %s in call to method ' . $lowercasedMethodName, 'Missing parameter $%s in call to ' . $lowercasedMethodName . '.', 'Unknown parameter $%s in call to ' . $lowercasedMethodName . '.', 'Return type of call to ' . $lowercasedMethodName . ' contains unresolvable type.', 'Parameter %s of ' . $lowercasedMethodName . ' contains unresolvable type.']));
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Methods;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Node\InClassMethodNode;
use PHPStan\Rules\FunctionDefinitionCheck;
use PHPStan\Rules\Rule;
use function sprintf;
/**
 * @implements Rule<InClassMethodNode>
 */
class ExistingClassesInTypehintsRule implements Rule
{
    /**
     * @var \PHPStan\Rules\FunctionDefinitionCheck
     */
    private $check;
    public function __construct(FunctionDefinitionCheck $check)
    {
        $this->check = $check;
    }
    public function getNodeType() : string
    {
        return InClassMethodNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $methodReflection = $node->getMethodReflection();
        $className = SprintfHelper::escapeFormatString($node->getClassReflection()->getDisplayName());
        $methodName = SprintfHelper::escapeFormatString($methodReflection->getName());
        return $this->check->checkClassMethod($methodReflection, $node->getOriginalNode(), sprintf('Parameter $%%s of method %s::%s() has invalid type %%s.', $className, $methodName), sprintf('Method %s::%s() has invalid return type %%s.', $className, $methodName), sprintf('Method %s::%s() uses native union types but they\'re supported only on PHP 8.0 and later.', $className, $methodName), sprintf('Template type %%s of method %s::%s() is not referenced in a parameter.', $className, $methodName), sprintf('Parameter $%%s of method %s::%s() has unresolvable native type.', $className, $methodName), sprintf('Method %s::%s() has unresolvable native return type.', $className, $methodName));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Methods;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function array_map;
use function in_array;
use function strtolower;
/**
 * @implements Rule<Node\Expr\StaticCall>
 */
class IllegalConstructorStaticCallRule implements Rule
{
    public function getNodeType() : string
    {
        return Node\Expr\StaticCall::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->name instanceof Node\Identifier || $node->name->toLowerString() !== '__construct') {
            return [];
        }
        if ($this->isCollectCallingConstructor($node, $scope)) {
            return [];
        }
        return [RuleErrorBuilder::message('Static call to __construct() is only allowed on a parent class in the constructor.')->build()];
    }
    private function isCollectCallingConstructor(Node $node, Scope $scope) : bool
    {
        if (!$node instanceof Node\Expr\StaticCall) {
            return \true;
        }
        // __construct should be called from inside constructor
        if ($scope->getFunction() !== null && $scope->getFunction()->getName() !== '__construct') {
            return \false;
        }
        if (!$scope->isInClass()) {
            return \false;
        }
        if (!$node->class instanceof Node\Name) {
            return \false;
        }
        $parentClasses = array_map(static function (string $name) {
            return strtolower($name);
        }, $scope->getClassReflection()->getParentClassesNames());
        return in_array(strtolower($scope->resolveName($node->class)), $parentClasses, \true);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Methods;

use PhpParser\Node;
use PhpParser\Node\Expr\StaticCall;
use PhpParser\Node\Name;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function sprintf;
/**
 * @implements Rule<StaticCall>
 */
class CallPrivateMethodThroughStaticRule implements Rule
{
    public function getNodeType() : string
    {
        return StaticCall::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->name instanceof Node\Identifier) {
            return [];
        }
        if (!$node->class instanceof Name) {
            return [];
        }
        $methodName = $node->name->name;
        $className = $node->class;
        if ($className->toLowerString() !== 'static') {
            return [];
        }
        $classType = $scope->resolveTypeByName($className);
        if (!$classType->hasMethod($methodName)->yes()) {
            return [];
        }
        $method = $classType->getMethod($methodName, $scope);
        if (!$method->isPrivate()) {
            return [];
        }
        if ($scope->isInClass() && $scope->getClassReflection()->isFinal()) {
            return [];
        }
        return [RuleErrorBuilder::message(sprintf('Unsafe call to private method %s::%s() through static::.', $method->getDeclaringClass()->getDisplayName(), $method->getName()))->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Methods;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InClassMethodNode;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Generic\TemplateTypeHelper;
use PHPStan\Type\VerbosityLevel;
use function is_string;
use function sprintf;
/**
 * @implements Rule<InClassMethodNode>
 */
class IncompatibleDefaultParameterTypeRule implements Rule
{
    public function getNodeType() : string
    {
        return InClassMethodNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $method = $node->getMethodReflection();
        $parameters = ParametersAcceptorSelector::selectSingle($method->getVariants());
        $errors = [];
        foreach ($node->getOriginalNode()->getParams() as $paramI => $param) {
            if ($param->default === null) {
                continue;
            }
            if ($param->var instanceof Node\Expr\Error || !is_string($param->var->name)) {
                throw new ShouldNotHappenException();
            }
            $defaultValueType = $scope->getType($param->default);
            $parameterType = $parameters->getParameters()[$paramI]->getType();
            $parameterType = TemplateTypeHelper::resolveToBounds($parameterType);
            $accepts = $parameterType->acceptsWithReason($defaultValueType, \true);
            if ($accepts->yes()) {
                continue;
            }
            $verbosityLevel = VerbosityLevel::getRecommendedLevelByType($parameterType, $defaultValueType);
            $errors[] = RuleErrorBuilder::message(sprintf('Default value of the parameter #%d $%s (%s) of method %s::%s() is incompatible with type %s.', $paramI + 1, $param->var->name, $defaultValueType->describe($verbosityLevel), $method->getDeclaringClass()->getDisplayName(), $method->getName(), $parameterType->describe($verbosityLevel)))->line($param->getLine())->acceptsReasonsTip($accepts->reasons)->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules;

use PhpParser\Node;
use PHPStan\DependencyInjection\Container;
use function class_implements;
use function class_parents;
class LazyRegistry implements \PHPStan\Rules\Registry
{
    public const RULE_TAG = 'phpstan.rules.rule';
    /** @var Rule[][]|null */
    private $rules;
    /** @var Rule[][] */
    private $cache = [];
    /**
     * @var \PHPStan\DependencyInjection\Container
     */
    private $container;
    public function __construct(Container $container)
    {
        $this->container = $container;
    }
    /**
     * @template TNodeType of Node
     * @phpstan-param class-string<TNodeType> $nodeType
     * @param Node $nodeType
     * @phpstan-return array<Rule<TNodeType>>
     * @return Rule[]
     */
    public function getRules(string $nodeType) : array
    {
        if (!isset($this->cache[$nodeType])) {
            $parentNodeTypes = [$nodeType] + class_parents($nodeType) + class_implements($nodeType);
            $rules = [];
            $rulesFromContainer = $this->getRulesFromContainer();
            foreach ($parentNodeTypes as $parentNodeType) {
                foreach ($rulesFromContainer[$parentNodeType] ?? [] as $rule) {
                    $rules[] = $rule;
                }
            }
            $this->cache[$nodeType] = $rules;
        }
        /**
         * @phpstan-var array<Rule<TNodeType>> $selectedRules
         * @var Rule[] $selectedRules
         */
        $selectedRules = $this->cache[$nodeType];
        return $selectedRules;
    }
    /**
     * @return Rule[][]
     */
    private function getRulesFromContainer() : array
    {
        if ($this->rules !== null) {
            return $this->rules;
        }
        $rules = [];
        foreach ($this->container->getServicesByTag(self::RULE_TAG) as $rule) {
            $rules[$rule->getNodeType()][] = $rule;
        }
        return $this->rules = $rules;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Generics;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Rules\Rule;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\FileTypeMapper;
use PHPStan\Type\Generic\TemplateTypeScope;
use function sprintf;
/**
 * @implements Rule<Node\Stmt\Function_>
 */
class FunctionTemplateTypeRule implements Rule
{
    /**
     * @var \PHPStan\Type\FileTypeMapper
     */
    private $fileTypeMapper;
    /**
     * @var \PHPStan\Rules\Generics\TemplateTypeCheck
     */
    private $templateTypeCheck;
    public function __construct(FileTypeMapper $fileTypeMapper, \PHPStan\Rules\Generics\TemplateTypeCheck $templateTypeCheck)
    {
        $this->fileTypeMapper = $fileTypeMapper;
        $this->templateTypeCheck = $templateTypeCheck;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\Function_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $docComment = $node->getDocComment();
        if ($docComment === null) {
            return [];
        }
        if (!isset($node->namespacedName)) {
            throw new ShouldNotHappenException();
        }
        $functionName = (string) $node->namespacedName;
        $resolvedPhpDoc = $this->fileTypeMapper->getResolvedPhpDoc($scope->getFile(), null, null, $functionName, $docComment->getText());
        $escapedFunctionName = SprintfHelper::escapeFormatString($functionName);
        return $this->templateTypeCheck->check($node, TemplateTypeScope::createWithFunction($functionName), $resolvedPhpDoc->getTemplateTags(), sprintf('PHPDoc tag @template for function %s() cannot have existing class %%s as its name.', $escapedFunctionName), sprintf('PHPDoc tag @template for function %s() cannot have existing type alias %%s as its name.', $escapedFunctionName), sprintf('PHPDoc tag @template %%s for function %s() has invalid bound type %%s.', $escapedFunctionName), sprintf('PHPDoc tag @template %%s for function %s() with bound type %%s is not supported.', $escapedFunctionName));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Generics;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Node\InClassNode;
use PHPStan\Rules\Rule;
use PHPStan\Type\Generic\TemplateTypeScope;
use function sprintf;
/**
 * @implements Rule<InClassNode>
 */
class InterfaceTemplateTypeRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Generics\TemplateTypeCheck
     */
    private $templateTypeCheck;
    public function __construct(\PHPStan\Rules\Generics\TemplateTypeCheck $templateTypeCheck)
    {
        $this->templateTypeCheck = $templateTypeCheck;
    }
    public function getNodeType() : string
    {
        return InClassNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$scope->isInClass()) {
            return [];
        }
        $classReflection = $scope->getClassReflection();
        if (!$classReflection->isInterface()) {
            return [];
        }
        $interfaceName = $classReflection->getName();
        $escapadInterfaceName = SprintfHelper::escapeFormatString($interfaceName);
        return $this->templateTypeCheck->check($node, TemplateTypeScope::createWithClass($interfaceName), $classReflection->getTemplateTags(), sprintf('PHPDoc tag @template for interface %s cannot have existing class %%s as its name.', $escapadInterfaceName), sprintf('PHPDoc tag @template for interface %s cannot have existing type alias %%s as its name.', $escapadInterfaceName), sprintf('PHPDoc tag @template %%s for interface %s has invalid bound type %%s.', $escapadInterfaceName), sprintf('PHPDoc tag @template %%s for interface %s with bound type %%s is not supported.', $escapadInterfaceName));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Generics;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InClassNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function count;
use function sprintf;
/**
 * @implements Rule<InClassNode>
 */
class EnumTemplateTypeRule implements Rule
{
    public function getNodeType() : string
    {
        return InClassNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$scope->isInClass()) {
            return [];
        }
        $classReflection = $scope->getClassReflection();
        if (!$classReflection->isEnum()) {
            return [];
        }
        $templateTagsCount = count($classReflection->getTemplateTags());
        if ($templateTagsCount === 0) {
            return [];
        }
        $className = $classReflection->getDisplayName();
        return [RuleErrorBuilder::message(sprintf('Enum %s has PHPDoc @template tag%s but enums cannot be generic.', $className, $templateTagsCount === 1 ? '' : 's'))->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Generics;

use PhpParser\Node;
use PHPStan\Internal\SprintfHelper;
use PHPStan\PhpDoc\Tag\TemplateTag;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\ClassCaseSensitivityCheck;
use PHPStan\Rules\ClassNameNodePair;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\ArrayType;
use PHPStan\Type\BooleanType;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\FloatType;
use PHPStan\Type\Generic\GenericObjectType;
use PHPStan\Type\Generic\TemplateType;
use PHPStan\Type\Generic\TemplateTypeScope;
use PHPStan\Type\IntegerType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\KeyOfType;
use PHPStan\Type\MixedType;
use PHPStan\Type\ObjectShapeType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\ObjectWithoutClassType;
use PHPStan\Type\StringType;
use PHPStan\Type\TypeAliasResolver;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
use function array_map;
use function array_merge;
use function get_class;
use function sprintf;
class TemplateTypeCheck
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Rules\ClassCaseSensitivityCheck
     */
    private $classCaseSensitivityCheck;
    /**
     * @var \PHPStan\Rules\Generics\GenericObjectTypeCheck
     */
    private $genericObjectTypeCheck;
    /**
     * @var \PHPStan\Type\TypeAliasResolver
     */
    private $typeAliasResolver;
    /**
     * @var bool
     */
    private $checkClassCaseSensitivity;
    public function __construct(ReflectionProvider $reflectionProvider, ClassCaseSensitivityCheck $classCaseSensitivityCheck, \PHPStan\Rules\Generics\GenericObjectTypeCheck $genericObjectTypeCheck, TypeAliasResolver $typeAliasResolver, bool $checkClassCaseSensitivity)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->classCaseSensitivityCheck = $classCaseSensitivityCheck;
        $this->genericObjectTypeCheck = $genericObjectTypeCheck;
        $this->typeAliasResolver = $typeAliasResolver;
        $this->checkClassCaseSensitivity = $checkClassCaseSensitivity;
    }
    /**
     * @param array<string, TemplateTag> $templateTags
     * @return RuleError[]
     */
    public function check(Node $node, TemplateTypeScope $templateTypeScope, array $templateTags, string $sameTemplateTypeNameAsClassMessage, string $sameTemplateTypeNameAsTypeMessage, string $invalidBoundTypeMessage, string $notSupportedBoundMessage) : array
    {
        $messages = [];
        foreach ($templateTags as $templateTag) {
            $templateTagName = $templateTag->getName();
            if ($this->reflectionProvider->hasClass($templateTagName)) {
                $messages[] = RuleErrorBuilder::message(sprintf($sameTemplateTypeNameAsClassMessage, $templateTagName))->build();
            }
            if ($this->typeAliasResolver->hasTypeAlias($templateTagName, $templateTypeScope->getClassName())) {
                $messages[] = RuleErrorBuilder::message(sprintf($sameTemplateTypeNameAsTypeMessage, $templateTagName))->build();
            }
            $boundType = $templateTag->getBound();
            foreach ($boundType->getReferencedClasses() as $referencedClass) {
                if ($this->reflectionProvider->hasClass($referencedClass) && !$this->reflectionProvider->getClass($referencedClass)->isTrait()) {
                    continue;
                }
                $messages[] = RuleErrorBuilder::message(sprintf($invalidBoundTypeMessage, $templateTagName, $referencedClass))->build();
            }
            if ($this->checkClassCaseSensitivity) {
                $classNameNodePairs = array_map(static function (string $referencedClass) use($node) : ClassNameNodePair {
                    return new ClassNameNodePair($referencedClass, $node);
                }, $boundType->getReferencedClasses());
                $messages = array_merge($messages, $this->classCaseSensitivityCheck->checkClassNames($classNameNodePairs));
            }
            $boundType = $templateTag->getBound();
            $boundTypeClass = get_class($boundType);
            if ($boundTypeClass !== MixedType::class && $boundTypeClass !== ConstantArrayType::class && $boundTypeClass !== ArrayType::class && $boundTypeClass !== ConstantStringType::class && $boundTypeClass !== StringType::class && $boundTypeClass !== ConstantIntegerType::class && $boundTypeClass !== IntegerType::class && $boundTypeClass !== FloatType::class && $boundTypeClass !== BooleanType::class && $boundTypeClass !== ObjectWithoutClassType::class && $boundTypeClass !== ObjectType::class && $boundTypeClass !== ObjectShapeType::class && $boundTypeClass !== GenericObjectType::class && $boundTypeClass !== KeyOfType::class && !$boundType instanceof UnionType && !$boundType instanceof IntersectionType && !$boundType instanceof TemplateType) {
                $messages[] = RuleErrorBuilder::message(sprintf($notSupportedBoundMessage, $templateTagName, $boundType->describe(VerbosityLevel::typeOnly())))->build();
            }
            $escapedTemplateTagName = SprintfHelper::escapeFormatString($templateTagName);
            $genericObjectErrors = $this->genericObjectTypeCheck->check($boundType, sprintf('PHPDoc tag @template %s bound contains generic type %%s but %%s %%s is not generic.', $escapedTemplateTagName), sprintf('PHPDoc tag @template %s bound has type %%s which does not specify all template types of %%s %%s: %%s', $escapedTemplateTagName), sprintf('PHPDoc tag @template %s bound has type %%s which specifies %%d template types, but %%s %%s supports only %%d: %%s', $escapedTemplateTagName), sprintf('Type %%s in generic type %%s in PHPDoc tag @template %s is not subtype of template type %%s of %%s %%s.', $escapedTemplateTagName));
            foreach ($genericObjectErrors as $genericObjectError) {
                $messages[] = $genericObjectError;
            }
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Generics;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Node\InClassNode;
use PHPStan\PhpDoc\Tag\ExtendsTag;
use PHPStan\PhpDoc\Tag\ImplementsTag;
use PHPStan\Rules\Rule;
use PHPStan\Type\Type;
use function array_map;
use function array_merge;
use function sprintf;
/**
 * @implements Rule<InClassNode>
 */
class EnumAncestorsRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Generics\GenericAncestorsCheck
     */
    private $genericAncestorsCheck;
    /**
     * @var \PHPStan\Rules\Generics\CrossCheckInterfacesHelper
     */
    private $crossCheckInterfacesHelper;
    public function __construct(\PHPStan\Rules\Generics\GenericAncestorsCheck $genericAncestorsCheck, \PHPStan\Rules\Generics\CrossCheckInterfacesHelper $crossCheckInterfacesHelper)
    {
        $this->genericAncestorsCheck = $genericAncestorsCheck;
        $this->crossCheckInterfacesHelper = $crossCheckInterfacesHelper;
    }
    public function getNodeType() : string
    {
        return InClassNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $originalNode = $node->getOriginalNode();
        if (!$originalNode instanceof Node\Stmt\Enum_) {
            return [];
        }
        if (!$scope->isInClass()) {
            return [];
        }
        $classReflection = $scope->getClassReflection();
        $enumName = $classReflection->getName();
        $escapedEnumName = SprintfHelper::escapeFormatString($enumName);
        $extendsErrors = $this->genericAncestorsCheck->check([], array_map(static function (ExtendsTag $tag) : Type {
            return $tag->getType();
        }, $classReflection->getExtendsTags()), sprintf('Enum %s @extends tag contains incompatible type %%s.', $escapedEnumName), sprintf('Enum %s has @extends tag, but cannot extend anything.', $escapedEnumName), '', '', '', '', '', '', '', '');
        $implementsErrors = $this->genericAncestorsCheck->check($originalNode->implements, array_map(static function (ImplementsTag $tag) : Type {
            return $tag->getType();
        }, $classReflection->getImplementsTags()), sprintf('Enum %s @implements tag contains incompatible type %%s.', $escapedEnumName), sprintf('Enum %s has @implements tag, but does not implement any interface.', $escapedEnumName), sprintf('The @implements tag of eunm %s describes %%s but the enum implements: %%s', $escapedEnumName), 'PHPDoc tag @implements contains generic type %s but %s %s is not generic.', 'Generic type %s in PHPDoc tag @implements does not specify all template types of %s %s: %s', 'Generic type %s in PHPDoc tag @implements specifies %d template types, but %s %s supports only %d: %s', 'Type %s in generic type %s in PHPDoc tag @implements is not subtype of template type %s of %s %s.', 'PHPDoc tag @implements has invalid type %s.', sprintf('Enum %s implements generic interface %%s but does not specify its types: %%s', $escapedEnumName), sprintf('in implemented type %%s of enum %s', $escapedEnumName));
        foreach ($this->crossCheckInterfacesHelper->check($classReflection) as $error) {
            $implementsErrors[] = $error;
        }
        return array_merge($extendsErrors, $implementsErrors);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Generics;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\FileTypeMapper;
use PHPStan\Type\Generic\TemplateTypeScope;
use PHPStan\Type\VerbosityLevel;
use function array_keys;
use function sprintf;
/**
 * @implements Rule<Node\Stmt\ClassMethod>
 */
class MethodTemplateTypeRule implements Rule
{
    /**
     * @var \PHPStan\Type\FileTypeMapper
     */
    private $fileTypeMapper;
    /**
     * @var \PHPStan\Rules\Generics\TemplateTypeCheck
     */
    private $templateTypeCheck;
    public function __construct(FileTypeMapper $fileTypeMapper, \PHPStan\Rules\Generics\TemplateTypeCheck $templateTypeCheck)
    {
        $this->fileTypeMapper = $fileTypeMapper;
        $this->templateTypeCheck = $templateTypeCheck;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\ClassMethod::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $docComment = $node->getDocComment();
        if ($docComment === null) {
            return [];
        }
        if (!$scope->isInClass()) {
            throw new ShouldNotHappenException();
        }
        $classReflection = $scope->getClassReflection();
        $className = $classReflection->getDisplayName();
        $methodName = $node->name->toString();
        $resolvedPhpDoc = $this->fileTypeMapper->getResolvedPhpDoc($scope->getFile(), $classReflection->getName(), $scope->isInTrait() ? $scope->getTraitReflection()->getName() : null, $methodName, $docComment->getText());
        $methodTemplateTags = $resolvedPhpDoc->getTemplateTags();
        $escapedClassName = SprintfHelper::escapeFormatString($className);
        $escapedMethodName = SprintfHelper::escapeFormatString($methodName);
        $messages = $this->templateTypeCheck->check($node, TemplateTypeScope::createWithMethod($className, $methodName), $methodTemplateTags, sprintf('PHPDoc tag @template for method %s::%s() cannot have existing class %%s as its name.', $escapedClassName, $escapedMethodName), sprintf('PHPDoc tag @template for method %s::%s() cannot have existing type alias %%s as its name.', $escapedClassName, $escapedMethodName), sprintf('PHPDoc tag @template %%s for method %s::%s() has invalid bound type %%s.', $escapedClassName, $escapedMethodName), sprintf('PHPDoc tag @template %%s for method %s::%s() with bound type %%s is not supported.', $escapedClassName, $escapedMethodName));
        $classTemplateTypes = $classReflection->getTemplateTypeMap()->getTypes();
        foreach (array_keys($methodTemplateTags) as $name) {
            if (!isset($classTemplateTypes[$name])) {
                continue;
            }
            $messages[] = RuleErrorBuilder::message(sprintf('PHPDoc tag @template %s for method %s::%s() shadows @template %s for class %s.', $name, $className, $methodName, $classTemplateTypes[$name]->describe(VerbosityLevel::typeOnly()), $classReflection->getDisplayName(\false)))->build();
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Generics;

use PhpParser\Node;
use PhpParser\Node\Name;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\MissingTypehintCheck;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\Generic\GenericObjectType;
use PHPStan\Type\Generic\TemplateTypeVariance;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use function array_fill_keys;
use function array_keys;
use function array_map;
use function array_merge;
use function count;
use function implode;
use function in_array;
use function sprintf;
class GenericAncestorsCheck
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Rules\Generics\GenericObjectTypeCheck
     */
    private $genericObjectTypeCheck;
    /**
     * @var \PHPStan\Rules\Generics\VarianceCheck
     */
    private $varianceCheck;
    /**
     * @var bool
     */
    private $checkGenericClassInNonGenericObjectType;
    /**
     * @var string[]
     */
    private $skipCheckGenericClasses;
    /**
     * @param string[] $skipCheckGenericClasses
     */
    public function __construct(ReflectionProvider $reflectionProvider, \PHPStan\Rules\Generics\GenericObjectTypeCheck $genericObjectTypeCheck, \PHPStan\Rules\Generics\VarianceCheck $varianceCheck, bool $checkGenericClassInNonGenericObjectType, array $skipCheckGenericClasses)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->genericObjectTypeCheck = $genericObjectTypeCheck;
        $this->varianceCheck = $varianceCheck;
        $this->checkGenericClassInNonGenericObjectType = $checkGenericClassInNonGenericObjectType;
        $this->skipCheckGenericClasses = $skipCheckGenericClasses;
    }
    /**
     * @param array<Node\Name> $nameNodes
     * @param array<Type> $ancestorTypes
     * @return RuleError[]
     */
    public function check(array $nameNodes, array $ancestorTypes, string $incompatibleTypeMessage, string $noNamesMessage, string $noRelatedNameMessage, string $classNotGenericMessage, string $notEnoughTypesMessage, string $extraTypesMessage, string $typeIsNotSubtypeMessage, string $invalidTypeMessage, string $genericClassInNonGenericObjectType, string $invalidVarianceMessage) : array
    {
        $names = array_fill_keys(array_map(static function (Name $nameNode) : string {
            return $nameNode->toString();
        }, $nameNodes), \true);
        $unusedNames = $names;
        $messages = [];
        foreach ($ancestorTypes as $ancestorType) {
            if (!$ancestorType instanceof GenericObjectType) {
                $messages[] = RuleErrorBuilder::message(sprintf($incompatibleTypeMessage, $ancestorType->describe(VerbosityLevel::typeOnly())))->build();
                continue;
            }
            $ancestorTypeClassName = $ancestorType->getClassName();
            if (!isset($names[$ancestorTypeClassName])) {
                if (count($names) === 0) {
                    $messages[] = RuleErrorBuilder::message($noNamesMessage)->build();
                } else {
                    $messages[] = RuleErrorBuilder::message(sprintf($noRelatedNameMessage, $ancestorTypeClassName, implode(', ', array_keys($names))))->build();
                }
                continue;
            }
            unset($unusedNames[$ancestorTypeClassName]);
            $genericObjectTypeCheckMessages = $this->genericObjectTypeCheck->check($ancestorType, $classNotGenericMessage, $notEnoughTypesMessage, $extraTypesMessage, $typeIsNotSubtypeMessage);
            $messages = array_merge($messages, $genericObjectTypeCheckMessages);
            foreach ($ancestorType->getReferencedClasses() as $referencedClass) {
                if ($this->reflectionProvider->hasClass($referencedClass)) {
                    continue;
                }
                $messages[] = RuleErrorBuilder::message(sprintf($invalidTypeMessage, $referencedClass))->build();
            }
            $variance = TemplateTypeVariance::createStatic();
            $messageContext = sprintf($invalidVarianceMessage, $ancestorType->describe(VerbosityLevel::typeOnly()));
            foreach ($this->varianceCheck->check($variance, $ancestorType, $messageContext) as $message) {
                $messages[] = $message;
            }
        }
        if ($this->checkGenericClassInNonGenericObjectType) {
            foreach (array_keys($unusedNames) as $unusedName) {
                if (!$this->reflectionProvider->hasClass($unusedName)) {
                    continue;
                }
                $unusedNameClassReflection = $this->reflectionProvider->getClass($unusedName);
                if (in_array($unusedNameClassReflection->getName(), $this->skipCheckGenericClasses, \true)) {
                    continue;
                }
                if (!$unusedNameClassReflection->isGeneric()) {
                    continue;
                }
                $messages[] = RuleErrorBuilder::message(sprintf($genericClassInNonGenericObjectType, $unusedName, implode(', ', array_keys($unusedNameClassReflection->getTemplateTypeMap()->getTypes()))))->tip(MissingTypehintCheck::TURN_OFF_NON_GENERIC_CHECK_TIP)->build();
            }
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Generics;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Node\InClassNode;
use PHPStan\PhpDoc\Tag\ExtendsTag;
use PHPStan\PhpDoc\Tag\ImplementsTag;
use PHPStan\Rules\Rule;
use PHPStan\Type\Type;
use function array_map;
use function array_merge;
use function sprintf;
/**
 * @implements Rule<InClassNode>
 */
class ClassAncestorsRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Generics\GenericAncestorsCheck
     */
    private $genericAncestorsCheck;
    /**
     * @var \PHPStan\Rules\Generics\CrossCheckInterfacesHelper
     */
    private $crossCheckInterfacesHelper;
    public function __construct(\PHPStan\Rules\Generics\GenericAncestorsCheck $genericAncestorsCheck, \PHPStan\Rules\Generics\CrossCheckInterfacesHelper $crossCheckInterfacesHelper)
    {
        $this->genericAncestorsCheck = $genericAncestorsCheck;
        $this->crossCheckInterfacesHelper = $crossCheckInterfacesHelper;
    }
    public function getNodeType() : string
    {
        return InClassNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $originalNode = $node->getOriginalNode();
        if (!$originalNode instanceof Node\Stmt\Class_) {
            return [];
        }
        if (!$scope->isInClass()) {
            return [];
        }
        $classReflection = $scope->getClassReflection();
        if ($classReflection->isAnonymous()) {
            return [];
        }
        $className = $classReflection->getName();
        $escapedClassName = SprintfHelper::escapeFormatString($className);
        $extendsErrors = $this->genericAncestorsCheck->check($originalNode->extends !== null ? [$originalNode->extends] : [], array_map(static function (ExtendsTag $tag) : Type {
            return $tag->getType();
        }, $classReflection->getExtendsTags()), sprintf('Class %s @extends tag contains incompatible type %%s.', $escapedClassName), sprintf('Class %s has @extends tag, but does not extend any class.', $escapedClassName), sprintf('The @extends tag of class %s describes %%s but the class extends %%s.', $escapedClassName), 'PHPDoc tag @extends contains generic type %s but %s %s is not generic.', 'Generic type %s in PHPDoc tag @extends does not specify all template types of %s %s: %s', 'Generic type %s in PHPDoc tag @extends specifies %d template types, but %s %s supports only %d: %s', 'Type %s in generic type %s in PHPDoc tag @extends is not subtype of template type %s of %s %s.', 'PHPDoc tag @extends has invalid type %s.', sprintf('Class %s extends generic class %%s but does not specify its types: %%s', $escapedClassName), sprintf('in extended type %%s of class %s', $escapedClassName));
        $implementsErrors = $this->genericAncestorsCheck->check($originalNode->implements, array_map(static function (ImplementsTag $tag) : Type {
            return $tag->getType();
        }, $classReflection->getImplementsTags()), sprintf('Class %s @implements tag contains incompatible type %%s.', $escapedClassName), sprintf('Class %s has @implements tag, but does not implement any interface.', $escapedClassName), sprintf('The @implements tag of class %s describes %%s but the class implements: %%s', $escapedClassName), 'PHPDoc tag @implements contains generic type %s but %s %s is not generic.', 'Generic type %s in PHPDoc tag @implements does not specify all template types of %s %s: %s', 'Generic type %s in PHPDoc tag @implements specifies %d template types, but %s %s supports only %d: %s', 'Type %s in generic type %s in PHPDoc tag @implements is not subtype of template type %s of %s %s.', 'PHPDoc tag @implements has invalid type %s.', sprintf('Class %s implements generic interface %%s but does not specify its types: %%s', $escapedClassName), sprintf('in implemented type %%s of class %s', $escapedClassName));
        foreach ($this->crossCheckInterfacesHelper->check($classReflection) as $error) {
            $implementsErrors[] = $error;
        }
        return array_merge($extendsErrors, $implementsErrors);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Generics;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\PhpDoc\Tag\UsesTag;
use PHPStan\Rules\Rule;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\FileTypeMapper;
use PHPStan\Type\Type;
use function array_map;
use function sprintf;
use function ucfirst;
/**
 * @implements Rule<Node\Stmt\TraitUse>
 */
class UsedTraitsRule implements Rule
{
    /**
     * @var \PHPStan\Type\FileTypeMapper
     */
    private $fileTypeMapper;
    /**
     * @var \PHPStan\Rules\Generics\GenericAncestorsCheck
     */
    private $genericAncestorsCheck;
    public function __construct(FileTypeMapper $fileTypeMapper, \PHPStan\Rules\Generics\GenericAncestorsCheck $genericAncestorsCheck)
    {
        $this->fileTypeMapper = $fileTypeMapper;
        $this->genericAncestorsCheck = $genericAncestorsCheck;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\TraitUse::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$scope->isInClass()) {
            throw new ShouldNotHappenException();
        }
        $className = $scope->getClassReflection()->getName();
        $traitName = null;
        if ($scope->isInTrait()) {
            $traitName = $scope->getTraitReflection()->getName();
        }
        $useTags = [];
        $docComment = $node->getDocComment();
        if ($docComment !== null) {
            $resolvedPhpDoc = $this->fileTypeMapper->getResolvedPhpDoc($scope->getFile(), $className, $traitName, null, $docComment->getText());
            $useTags = $resolvedPhpDoc->getUsesTags();
        }
        $description = sprintf('class %s', SprintfHelper::escapeFormatString($className));
        $typeDescription = 'class';
        if ($traitName !== null) {
            $description = sprintf('trait %s', SprintfHelper::escapeFormatString($traitName));
            $typeDescription = 'trait';
        }
        return $this->genericAncestorsCheck->check($node->traits, array_map(static function (UsesTag $tag) : Type {
            return $tag->getType();
        }, $useTags), sprintf('%s @use tag contains incompatible type %%s.', ucfirst($description)), sprintf('%s has @use tag, but does not use any trait.', ucfirst($description)), sprintf('The @use tag of %s describes %%s but the %s uses %%s.', $description, $typeDescription), 'PHPDoc tag @use contains generic type %s but %s %s is not generic.', 'Generic type %s in PHPDoc tag @use does not specify all template types of %s %s: %s', 'Generic type %s in PHPDoc tag @use specifies %d template types, but %s %s supports only %d: %s', 'Type %s in generic type %s in PHPDoc tag @use is not subtype of template type %s of %s %s.', 'PHPDoc tag @use has invalid type %s.', sprintf('%s uses generic trait %%s but does not specify its types: %%s', ucfirst($description)), sprintf('in used type %%s of %s', $description));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Generics;

use PHPStan\Reflection\ClassReflection;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\VerbosityLevel;
use function array_key_exists;
use function sprintf;
class CrossCheckInterfacesHelper
{
    /**
     * @return RuleError[]
     */
    public function check(ClassReflection $classReflection) : array
    {
        $interfaceTemplateTypeMaps = [];
        $errors = [];
        $check = static function (ClassReflection $classReflection, bool $first) use(&$interfaceTemplateTypeMaps, &$check, &$errors) : void {
            foreach ($classReflection->getInterfaces() as $interface) {
                if (!$interface->isGeneric()) {
                    continue;
                }
                if (array_key_exists($interface->getName(), $interfaceTemplateTypeMaps)) {
                    $otherMap = $interfaceTemplateTypeMaps[$interface->getName()];
                    foreach ($interface->getActiveTemplateTypeMap()->getTypes() as $name => $type) {
                        $otherType = $otherMap->getType($name);
                        if ($otherType === null) {
                            continue;
                        }
                        if ($type->equals($otherType)) {
                            continue;
                        }
                        $errors[] = RuleErrorBuilder::message(sprintf('%s specifies template type %s of interface %s as %s but it\'s already specified as %s.', $classReflection->isInterface() ? sprintf('Interface %s', $classReflection->getName()) : sprintf('Class %s', $classReflection->getName()), $name, $interface->getName(), $type->describe(VerbosityLevel::value()), $otherType->describe(VerbosityLevel::value())))->build();
                    }
                    continue;
                }
                $interfaceTemplateTypeMaps[$interface->getName()] = $interface->getActiveTemplateTypeMap();
            }
            $parent = $classReflection->getParentClass();
            $checkParents = \true;
            if ($first && $parent !== null) {
                $extendsTags = $classReflection->getExtendsTags();
                if (!array_key_exists($parent->getName(), $extendsTags)) {
                    $checkParents = \false;
                }
            }
            if ($checkParents) {
                while ($parent !== null) {
                    $check($parent, \false);
                    $parent = $parent->getParentClass();
                }
            }
            $interfaceTags = [];
            if ($first) {
                if ($classReflection->isInterface()) {
                    $interfaceTags = $classReflection->getExtendsTags();
                } else {
                    $interfaceTags = $classReflection->getImplementsTags();
                }
            }
            foreach ($classReflection->getInterfaces() as $interface) {
                if ($first) {
                    if (!array_key_exists($interface->getName(), $interfaceTags)) {
                        continue;
                    }
                }
                $check($interface, \false);
            }
        };
        $check($classReflection, \true);
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Generics;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Node\InClassMethodNode;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Rules\Rule;
use function sprintf;
/**
 * @implements Rule<InClassMethodNode>
 */
class MethodSignatureVarianceRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Generics\VarianceCheck
     */
    private $varianceCheck;
    public function __construct(\PHPStan\Rules\Generics\VarianceCheck $varianceCheck)
    {
        $this->varianceCheck = $varianceCheck;
    }
    public function getNodeType() : string
    {
        return InClassMethodNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $method = $node->getMethodReflection();
        return $this->varianceCheck->checkParametersAcceptor(ParametersAcceptorSelector::selectSingle($method->getVariants()), sprintf('in parameter %%s of method %s::%s()', SprintfHelper::escapeFormatString($method->getDeclaringClass()->getDisplayName()), SprintfHelper::escapeFormatString($method->getName())), sprintf('in param-out type of parameter %%s of method %s::%s()', SprintfHelper::escapeFormatString($method->getDeclaringClass()->getDisplayName()), SprintfHelper::escapeFormatString($method->getName())), sprintf('in return type of method %s::%s()', $method->getDeclaringClass()->getDisplayName(), $method->getName()), sprintf('in method %s::%s()', $method->getDeclaringClass()->getDisplayName(), $method->getName()), $method->isStatic(), $method->isPrivate() || $method->getName() === '__construct');
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Generics;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Node\ClassPropertyNode;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Rules\Rule;
use PHPStan\Type\Generic\TemplateTypeVariance;
use function sprintf;
/**
 * @implements Rule<ClassPropertyNode>
 */
class PropertyVarianceRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Generics\VarianceCheck
     */
    private $varianceCheck;
    /**
     * @var bool
     */
    private $readOnlyByPhpDoc;
    public function __construct(\PHPStan\Rules\Generics\VarianceCheck $varianceCheck, bool $readOnlyByPhpDoc)
    {
        $this->varianceCheck = $varianceCheck;
        $this->readOnlyByPhpDoc = $readOnlyByPhpDoc;
    }
    public function getNodeType() : string
    {
        return ClassPropertyNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $classReflection = $scope->getClassReflection();
        if (!$classReflection instanceof ClassReflection) {
            return [];
        }
        if (!$classReflection->hasNativeProperty($node->getName())) {
            return [];
        }
        $propertyReflection = $classReflection->getNativeProperty($node->getName());
        if ($propertyReflection->isPrivate()) {
            return [];
        }
        $variance = $node->isReadOnly() || $this->readOnlyByPhpDoc && $node->isReadOnlyByPhpDoc() ? TemplateTypeVariance::createCovariant() : TemplateTypeVariance::createInvariant();
        return $this->varianceCheck->check($variance, $propertyReflection->getReadableType(), sprintf('in property %s::$%s', SprintfHelper::escapeFormatString($classReflection->getDisplayName()), SprintfHelper::escapeFormatString($node->getName())));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Generics;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Rules\Rule;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\FileTypeMapper;
use PHPStan\Type\Generic\TemplateTypeScope;
use function sprintf;
/**
 * @implements Rule<Node\Stmt\Trait_>
 */
class TraitTemplateTypeRule implements Rule
{
    /**
     * @var \PHPStan\Type\FileTypeMapper
     */
    private $fileTypeMapper;
    /**
     * @var \PHPStan\Rules\Generics\TemplateTypeCheck
     */
    private $templateTypeCheck;
    public function __construct(FileTypeMapper $fileTypeMapper, \PHPStan\Rules\Generics\TemplateTypeCheck $templateTypeCheck)
    {
        $this->fileTypeMapper = $fileTypeMapper;
        $this->templateTypeCheck = $templateTypeCheck;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\Trait_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $docComment = $node->getDocComment();
        if ($docComment === null) {
            return [];
        }
        if (!isset($node->namespacedName)) {
            throw new ShouldNotHappenException();
        }
        $traitName = (string) $node->namespacedName;
        $resolvedPhpDoc = $this->fileTypeMapper->getResolvedPhpDoc($scope->getFile(), $traitName, null, null, $docComment->getText());
        $escapedTraitName = SprintfHelper::escapeFormatString($traitName);
        return $this->templateTypeCheck->check($node, TemplateTypeScope::createWithClass($traitName), $resolvedPhpDoc->getTemplateTags(), sprintf('PHPDoc tag @template for trait %s cannot have existing class %%s as its name.', $escapedTraitName), sprintf('PHPDoc tag @template for trait %s cannot have existing type alias %%s as its name.', $escapedTraitName), sprintf('PHPDoc tag @template %%s for trait %s has invalid bound type %%s.', $escapedTraitName), sprintf('PHPDoc tag @template %%s for trait %s with bound type %%s is not supported.', $escapedTraitName));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Generics;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Node\InFunctionNode;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Rules\Rule;
use function sprintf;
/**
 * @implements Rule<InFunctionNode>
 */
class FunctionSignatureVarianceRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Generics\VarianceCheck
     */
    private $varianceCheck;
    public function __construct(\PHPStan\Rules\Generics\VarianceCheck $varianceCheck)
    {
        $this->varianceCheck = $varianceCheck;
    }
    public function getNodeType() : string
    {
        return InFunctionNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $functionReflection = $node->getFunctionReflection();
        $functionName = $functionReflection->getName();
        return $this->varianceCheck->checkParametersAcceptor(ParametersAcceptorSelector::selectSingle($functionReflection->getVariants()), sprintf('in parameter %%s of function %s()', SprintfHelper::escapeFormatString($functionName)), sprintf('in param-out type of parameter %%s of function %s()', SprintfHelper::escapeFormatString($functionName)), sprintf('in return type of function %s()', $functionName), sprintf('in function %s()', $functionName), \false, \false);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Generics;

use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Generic\GenericObjectType;
use PHPStan\Type\Generic\TemplateType;
use PHPStan\Type\Generic\TemplateTypeHelper;
use PHPStan\Type\Type;
use PHPStan\Type\TypeTraverser;
use PHPStan\Type\VerbosityLevel;
use function array_keys;
use function array_values;
use function count;
use function implode;
use function sprintf;
class GenericObjectTypeCheck
{
    /**
     * @return RuleError[]
     */
    public function check(Type $phpDocType, string $classNotGenericMessage, string $notEnoughTypesMessage, string $extraTypesMessage, string $typeIsNotSubtypeMessage) : array
    {
        $genericTypes = $this->getGenericTypes($phpDocType);
        $messages = [];
        foreach ($genericTypes as $genericType) {
            $classReflection = $genericType->getClassReflection();
            if ($classReflection === null) {
                continue;
            }
            $classLikeDescription = 'class';
            if ($classReflection->isInterface()) {
                $classLikeDescription = 'interface';
            } elseif ($classReflection->isTrait()) {
                $classLikeDescription = 'trait';
            } elseif ($classReflection->isEnum()) {
                $classLikeDescription = 'enum';
            }
            if (!$classReflection->isGeneric()) {
                $messages[] = RuleErrorBuilder::message(sprintf($classNotGenericMessage, $genericType->describe(VerbosityLevel::typeOnly()), $classLikeDescription, $classReflection->getDisplayName()))->build();
                continue;
            }
            $templateTypes = array_values($classReflection->getTemplateTypeMap()->getTypes());
            $genericTypeTypes = $genericType->getTypes();
            $templateTypesCount = count($templateTypes);
            $genericTypeTypesCount = count($genericTypeTypes);
            if ($templateTypesCount > $genericTypeTypesCount) {
                $messages[] = RuleErrorBuilder::message(sprintf($notEnoughTypesMessage, $genericType->describe(VerbosityLevel::typeOnly()), $classLikeDescription, $classReflection->getDisplayName(\false), implode(', ', array_keys($classReflection->getTemplateTypeMap()->getTypes()))))->build();
            } elseif ($templateTypesCount < $genericTypeTypesCount) {
                $messages[] = RuleErrorBuilder::message(sprintf($extraTypesMessage, $genericType->describe(VerbosityLevel::typeOnly()), $genericTypeTypesCount, $classLikeDescription, $classReflection->getDisplayName(\false), $templateTypesCount, implode(', ', array_keys($classReflection->getTemplateTypeMap()->getTypes()))))->build();
            }
            $templateTypesCount = count($templateTypes);
            for ($i = 0; $i < $templateTypesCount; $i++) {
                if (!isset($genericTypeTypes[$i])) {
                    continue;
                }
                $templateType = $templateTypes[$i];
                $boundType = TemplateTypeHelper::resolveToBounds($templateType);
                $genericTypeType = $genericTypeTypes[$i];
                if ($boundType->isSuperTypeOf($genericTypeType)->yes()) {
                    if (!$templateType instanceof TemplateType) {
                        continue;
                    }
                    $map = $templateType->inferTemplateTypes($genericTypeType);
                    for ($j = 0; $j < $templateTypesCount; $j++) {
                        if ($i === $j) {
                            continue;
                        }
                        $templateTypes[$j] = TemplateTypeHelper::resolveTemplateTypes($templateTypes[$j], $map);
                    }
                    continue;
                }
                $messages[] = RuleErrorBuilder::message(sprintf($typeIsNotSubtypeMessage, $genericTypeType->describe(VerbosityLevel::typeOnly()), $genericType->describe(VerbosityLevel::typeOnly()), $templateType->describe(VerbosityLevel::typeOnly()), $classLikeDescription, $classReflection->getDisplayName(\false)))->build();
            }
        }
        return $messages;
    }
    /**
     * @return GenericObjectType[]
     */
    private function getGenericTypes(Type $phpDocType) : array
    {
        $genericObjectTypes = [];
        TypeTraverser::map($phpDocType, static function (Type $type, callable $traverse) use(&$genericObjectTypes) : Type {
            if ($type instanceof GenericObjectType) {
                $resolvedType = TemplateTypeHelper::resolveToBounds($type);
                if (!$resolvedType instanceof GenericObjectType) {
                    throw new ShouldNotHappenException();
                }
                $genericObjectTypes[] = $resolvedType;
                $traverse($type);
                return $type;
            }
            $traverse($type);
            return $type;
        });
        return $genericObjectTypes;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Generics;

use PHPStan\Reflection\ParametersAcceptorWithPhpDocs;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\Generic\TemplateType;
use PHPStan\Type\Generic\TemplateTypeVariance;
use PHPStan\Type\Type;
use function sprintf;
class VarianceCheck
{
    /**
     * @var bool
     */
    private $checkParamOutVariance;
    /**
     * @var bool
     */
    private $strictStaticVariance;
    public function __construct(bool $checkParamOutVariance, bool $strictStaticVariance)
    {
        $this->checkParamOutVariance = $checkParamOutVariance;
        $this->strictStaticVariance = $strictStaticVariance;
    }
    /** @return RuleError[] */
    public function checkParametersAcceptor(ParametersAcceptorWithPhpDocs $parametersAcceptor, string $parameterTypeMessage, string $parameterOutTypeMessage, string $returnTypeMessage, string $generalMessage, bool $isStatic, bool $isPrivate) : array
    {
        $errors = [];
        foreach ($parametersAcceptor->getTemplateTypeMap()->getTypes() as $templateType) {
            if (!$templateType instanceof TemplateType || $templateType->getScope()->getFunctionName() === null || $templateType->getVariance()->invariant()) {
                continue;
            }
            $errors[] = RuleErrorBuilder::message(sprintf('Variance annotation is only allowed for type parameters of classes and interfaces, but occurs in template type %s in %s.', $templateType->getName(), $generalMessage))->build();
        }
        if ($isPrivate) {
            return $errors;
        }
        $covariant = TemplateTypeVariance::createCovariant();
        $parameterVariance = $isStatic && !$this->strictStaticVariance ? TemplateTypeVariance::createStatic() : TemplateTypeVariance::createContravariant();
        foreach ($parametersAcceptor->getParameters() as $parameterReflection) {
            $type = $parameterReflection->getType();
            $message = sprintf($parameterTypeMessage, $parameterReflection->getName());
            foreach ($this->check($parameterVariance, $type, $message) as $error) {
                $errors[] = $error;
            }
            if (!$this->checkParamOutVariance) {
                continue;
            }
            $paramOutType = $parameterReflection->getOutType();
            if ($paramOutType === null) {
                continue;
            }
            $outMessage = sprintf($parameterOutTypeMessage, $parameterReflection->getName());
            foreach ($this->check($covariant, $paramOutType, $outMessage) as $error) {
                $errors[] = $error;
            }
        }
        $type = $parametersAcceptor->getReturnType();
        foreach ($this->check($covariant, $type, $returnTypeMessage) as $error) {
            $errors[] = $error;
        }
        return $errors;
    }
    /** @return RuleError[] */
    public function check(TemplateTypeVariance $positionVariance, Type $type, string $messageContext) : array
    {
        $errors = [];
        foreach ($type->getReferencedTemplateTypes($positionVariance) as $reference) {
            $referredType = $reference->getType();
            if ($referredType->getScope()->getFunctionName() !== null && !$referredType->getVariance()->invariant() || $this->isTemplateTypeVarianceValid($reference->getPositionVariance(), $referredType)) {
                continue;
            }
            $errors[] = RuleErrorBuilder::message(sprintf('Template type %s is declared as %s, but occurs in %s position %s.', $referredType->getName(), $referredType->getVariance()->describe(), $reference->getPositionVariance()->describe(), $messageContext))->build();
        }
        return $errors;
    }
    private function isTemplateTypeVarianceValid(TemplateTypeVariance $positionVariance, TemplateType $type) : bool
    {
        return $positionVariance->validPosition($type->getVariance());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Generics;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Node\InClassNode;
use PHPStan\PhpDoc\Tag\ExtendsTag;
use PHPStan\PhpDoc\Tag\ImplementsTag;
use PHPStan\Rules\Rule;
use PHPStan\Type\Type;
use function array_map;
use function array_merge;
use function sprintf;
/**
 * @implements Rule<InClassNode>
 */
class InterfaceAncestorsRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Generics\GenericAncestorsCheck
     */
    private $genericAncestorsCheck;
    /**
     * @var \PHPStan\Rules\Generics\CrossCheckInterfacesHelper
     */
    private $crossCheckInterfacesHelper;
    public function __construct(\PHPStan\Rules\Generics\GenericAncestorsCheck $genericAncestorsCheck, \PHPStan\Rules\Generics\CrossCheckInterfacesHelper $crossCheckInterfacesHelper)
    {
        $this->genericAncestorsCheck = $genericAncestorsCheck;
        $this->crossCheckInterfacesHelper = $crossCheckInterfacesHelper;
    }
    public function getNodeType() : string
    {
        return InClassNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $originalNode = $node->getOriginalNode();
        if (!$originalNode instanceof Node\Stmt\Interface_) {
            return [];
        }
        if (!$scope->isInClass()) {
            return [];
        }
        $classReflection = $scope->getClassReflection();
        $interfaceName = $classReflection->getName();
        $escapedInterfaceName = SprintfHelper::escapeFormatString($interfaceName);
        $extendsErrors = $this->genericAncestorsCheck->check($originalNode->extends, array_map(static function (ExtendsTag $tag) : Type {
            return $tag->getType();
        }, $classReflection->getExtendsTags()), sprintf('Interface %s @extends tag contains incompatible type %%s.', $escapedInterfaceName), sprintf('Interface %s has @extends tag, but does not extend any interface.', $escapedInterfaceName), sprintf('The @extends tag of interface %s describes %%s but the interface extends: %%s', $escapedInterfaceName), 'PHPDoc tag @extends contains generic type %s but %s %s is not generic.', 'Generic type %s in PHPDoc tag @extends does not specify all template types of %s %s: %s', 'Generic type %s in PHPDoc tag @extends specifies %d template types, but %s %s supports only %d: %s', 'Type %s in generic type %s in PHPDoc tag @extends is not subtype of template type %s of %s %s.', 'PHPDoc tag @extends has invalid type %s.', sprintf('Interface %s extends generic interface %%s but does not specify its types: %%s', $escapedInterfaceName), sprintf('in extended type %%s of interface %s', $escapedInterfaceName));
        $implementsErrors = $this->genericAncestorsCheck->check([], array_map(static function (ImplementsTag $tag) : Type {
            return $tag->getType();
        }, $classReflection->getImplementsTags()), sprintf('Interface %s @implements tag contains incompatible type %%s.', $escapedInterfaceName), sprintf('Interface %s has @implements tag, but can not implement any interface, must extend from it.', $escapedInterfaceName), '', '', '', '', '', '', '', '');
        foreach ($this->crossCheckInterfacesHelper->check($classReflection) as $error) {
            $implementsErrors[] = $error;
        }
        return array_merge($extendsErrors, $implementsErrors);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Generics;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Node\InClassNode;
use PHPStan\Rules\Rule;
use PHPStan\Type\Generic\TemplateTypeScope;
use function sprintf;
/**
 * @implements Rule<InClassNode>
 */
class ClassTemplateTypeRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Generics\TemplateTypeCheck
     */
    private $templateTypeCheck;
    public function __construct(\PHPStan\Rules\Generics\TemplateTypeCheck $templateTypeCheck)
    {
        $this->templateTypeCheck = $templateTypeCheck;
    }
    public function getNodeType() : string
    {
        return InClassNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$scope->isInClass()) {
            return [];
        }
        $classReflection = $scope->getClassReflection();
        if (!$classReflection->isClass()) {
            return [];
        }
        $className = $classReflection->getName();
        if ($classReflection->isAnonymous()) {
            $displayName = 'anonymous class';
        } else {
            $displayName = 'class ' . SprintfHelper::escapeFormatString($classReflection->getDisplayName());
        }
        return $this->templateTypeCheck->check($node, TemplateTypeScope::createWithClass($className), $classReflection->getTemplateTags(), sprintf('PHPDoc tag @template for %s cannot have existing class %%s as its name.', $displayName), sprintf('PHPDoc tag @template for %s cannot have existing type alias %%s as its name.', $displayName), sprintf('PHPDoc tag @template %%s for %s has invalid bound type %%s.', $displayName), sprintf('PHPDoc tag @template %%s for %s with bound type %%s is not supported.', $displayName));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules;

use PhpParser\Node\Expr;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Type\BenevolentUnionType;
use PHPStan\Type\CallableType;
use PHPStan\Type\ClosureType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Generic\TemplateMixedType;
use PHPStan\Type\MixedType;
use PHPStan\Type\NeverType;
use PHPStan\Type\NullType;
use PHPStan\Type\ObjectWithoutClassType;
use PHPStan\Type\StaticType;
use PHPStan\Type\StrictMixedType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypeTraverser;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
use function array_merge;
use function count;
use function sprintf;
use function strpos;
class RuleLevelHelper
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var bool
     */
    private $checkNullables;
    /**
     * @var bool
     */
    private $checkThisOnly;
    /**
     * @var bool
     */
    private $checkUnionTypes;
    /**
     * @var bool
     */
    private $checkExplicitMixed;
    /**
     * @var bool
     */
    private $checkImplicitMixed;
    /**
     * @var bool
     */
    private $newRuleLevelHelper;
    /**
     * @var bool
     */
    private $checkBenevolentUnionTypes;
    public function __construct(ReflectionProvider $reflectionProvider, bool $checkNullables, bool $checkThisOnly, bool $checkUnionTypes, bool $checkExplicitMixed, bool $checkImplicitMixed, bool $newRuleLevelHelper, bool $checkBenevolentUnionTypes)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->checkNullables = $checkNullables;
        $this->checkThisOnly = $checkThisOnly;
        $this->checkUnionTypes = $checkUnionTypes;
        $this->checkExplicitMixed = $checkExplicitMixed;
        $this->checkImplicitMixed = $checkImplicitMixed;
        $this->newRuleLevelHelper = $newRuleLevelHelper;
        $this->checkBenevolentUnionTypes = $checkBenevolentUnionTypes;
    }
    /** @api */
    public function isThis(Expr $expression) : bool
    {
        return $expression instanceof Expr\Variable && $expression->name === 'this';
    }
    /** @api */
    public function accepts(Type $acceptingType, Type $acceptedType, bool $strictTypes) : bool
    {
        return $this->acceptsWithReason($acceptingType, $acceptedType, $strictTypes)->result;
    }
    private function transformCommonType(Type $type) : Type
    {
        if (!$this->checkExplicitMixed && !$this->checkImplicitMixed) {
            return $type;
        }
        return TypeTraverser::map($type, function (Type $type, callable $traverse) {
            if ($type instanceof TemplateMixedType) {
                return $type->toStrictMixedType();
            }
            if ($type instanceof MixedType && ($type->isExplicitMixed() && $this->checkExplicitMixed || !$type->isExplicitMixed() && $this->checkImplicitMixed)) {
                return new StrictMixedType();
            }
            return $traverse($type);
        });
    }
    /**
     * @return array{Type, bool}
     */
    private function transformAcceptedType(Type $acceptingType, Type $acceptedType) : array
    {
        $checkForUnion = $this->checkUnionTypes;
        $acceptedType = TypeTraverser::map($acceptedType, function (Type $acceptedType, callable $traverse) use($acceptingType, &$checkForUnion) : Type {
            if ($acceptedType instanceof CallableType) {
                if ($acceptedType->isCommonCallable()) {
                    return new CallableType(null, null, $acceptedType->isVariadic());
                }
                return new CallableType($acceptedType->getParameters(), $traverse($this->transformCommonType($acceptedType->getReturnType())), $acceptedType->isVariadic());
            }
            if ($acceptedType instanceof ClosureType) {
                return new ClosureType($acceptedType->getParameters(), $traverse($this->transformCommonType($acceptedType->getReturnType())), $acceptedType->isVariadic(), $acceptedType->getTemplateTypeMap(), $acceptedType->getResolvedTemplateTypeMap());
            }
            if (!$this->checkNullables && !$acceptingType instanceof NullType && !$acceptedType instanceof NullType && !$acceptedType instanceof BenevolentUnionType) {
                return $traverse(TypeCombinator::removeNull($acceptedType));
            }
            if ($this->checkBenevolentUnionTypes) {
                if ($acceptedType instanceof BenevolentUnionType) {
                    $checkForUnion = \true;
                    return $traverse(new UnionType($acceptedType->getTypes()));
                }
            }
            return $traverse($this->transformCommonType($acceptedType));
        });
        return [$acceptedType, $checkForUnion];
    }
    public function acceptsWithReason(Type $acceptingType, Type $acceptedType, bool $strictTypes) : \PHPStan\Rules\RuleLevelHelperAcceptsResult
    {
        if ($this->newRuleLevelHelper) {
            [$acceptedType, $checkForUnion] = $this->transformAcceptedType($acceptingType, $acceptedType);
            $acceptingType = $this->transformCommonType($acceptingType);
            $accepts = $acceptingType->acceptsWithReason($acceptedType, $strictTypes);
            return new \PHPStan\Rules\RuleLevelHelperAcceptsResult($checkForUnion ? $accepts->yes() : !$accepts->no(), $accepts->reasons);
        }
        $checkForUnion = $this->checkUnionTypes;
        if ($this->checkBenevolentUnionTypes) {
            $traverse = static function (Type $type, callable $traverse) use(&$checkForUnion) : Type {
                if ($type instanceof BenevolentUnionType) {
                    $checkForUnion = \true;
                    return new UnionType($type->getTypes());
                }
                return $traverse($type);
            };
            $acceptedType = TypeTraverser::map($acceptedType, $traverse);
        }
        if ($this->checkExplicitMixed) {
            $traverse = static function (Type $type, callable $traverse) : Type {
                if ($type instanceof TemplateMixedType) {
                    return $type->toStrictMixedType();
                }
                if ($type instanceof MixedType && $type->isExplicitMixed()) {
                    return new StrictMixedType();
                }
                return $traverse($type);
            };
            $acceptingType = TypeTraverser::map($acceptingType, $traverse);
            $acceptedType = TypeTraverser::map($acceptedType, $traverse);
        }
        if ($this->checkImplicitMixed) {
            $traverse = static function (Type $type, callable $traverse) : Type {
                if ($type instanceof TemplateMixedType) {
                    return $type->toStrictMixedType();
                }
                if ($type instanceof MixedType && !$type->isExplicitMixed()) {
                    return new StrictMixedType();
                }
                return $traverse($type);
            };
            $acceptingType = TypeTraverser::map($acceptingType, $traverse);
            $acceptedType = TypeTraverser::map($acceptedType, $traverse);
        }
        if (!$this->checkNullables && !$acceptingType instanceof NullType && !$acceptedType instanceof NullType && !$acceptedType instanceof BenevolentUnionType) {
            $acceptedType = TypeCombinator::removeNull($acceptedType);
        }
        $accepts = $acceptingType->acceptsWithReason($acceptedType, $strictTypes);
        if ($accepts->yes()) {
            return new \PHPStan\Rules\RuleLevelHelperAcceptsResult(\true, $accepts->reasons);
        }
        if ($acceptingType instanceof UnionType) {
            $reasons = [];
            foreach ($acceptingType->getTypes() as $innerType) {
                $accepts = self::acceptsWithReason($innerType, $acceptedType, $strictTypes);
                if ($accepts->result) {
                    return $accepts;
                }
                $reasons = array_merge($reasons, $accepts->reasons);
            }
            return new \PHPStan\Rules\RuleLevelHelperAcceptsResult(\false, $reasons);
        }
        if ($acceptedType->isArray()->yes() && $acceptingType->isArray()->yes() && ($acceptedType->isConstantArray()->no() || !$acceptedType->isIterableAtLeastOnce()->no()) && $acceptingType->isConstantArray()->no()) {
            if ($acceptingType->isIterableAtLeastOnce()->yes() && !$acceptedType->isIterableAtLeastOnce()->yes()) {
                $verbosity = VerbosityLevel::getRecommendedLevelByType($acceptingType, $acceptedType);
                return new \PHPStan\Rules\RuleLevelHelperAcceptsResult(\false, [sprintf('%s %s empty.', $acceptedType->describe($verbosity), $acceptedType->isIterableAtLeastOnce()->no() ? 'is' : 'might be')]);
            }
            if ($acceptingType->isList()->yes() && !$acceptedType->isList()->yes()) {
                $report = $checkForUnion || $acceptedType->isList()->no();
                if ($report) {
                    $verbosity = VerbosityLevel::getRecommendedLevelByType($acceptingType, $acceptedType);
                    return new \PHPStan\Rules\RuleLevelHelperAcceptsResult(\false, [sprintf('%s %s a list.', $acceptedType->describe($verbosity), $acceptedType->isList()->no() ? 'is not' : 'might not be')]);
                }
            }
            return self::acceptsWithReason($acceptingType->getIterableKeyType(), $acceptedType->getIterableKeyType(), $strictTypes)->and(self::acceptsWithReason($acceptingType->getIterableValueType(), $acceptedType->getIterableValueType(), $strictTypes));
        }
        return new \PHPStan\Rules\RuleLevelHelperAcceptsResult($checkForUnion ? $accepts->yes() : !$accepts->no(), $accepts->reasons);
    }
    /**
     * @api
     * @param callable(Type $type): bool $unionTypeCriteriaCallback
     */
    public function findTypeToCheck(Scope $scope, Expr $var, string $unknownClassErrorPattern, callable $unionTypeCriteriaCallback) : \PHPStan\Rules\FoundTypeResult
    {
        if ($this->checkThisOnly && !$this->isThis($var)) {
            return new \PHPStan\Rules\FoundTypeResult(new ErrorType(), [], [], null);
        }
        $type = $scope->getType($var);
        if (!$this->checkNullables && !$type->isNull()->yes()) {
            $type = TypeCombinator::removeNull($type);
        }
        if ($this->checkExplicitMixed && $type instanceof MixedType && !$type instanceof TemplateMixedType && $type->isExplicitMixed()) {
            return new \PHPStan\Rules\FoundTypeResult(new StrictMixedType(), [], [], null);
        }
        if ($this->checkImplicitMixed && $type instanceof MixedType && !$type instanceof TemplateMixedType && !$type->isExplicitMixed()) {
            return new \PHPStan\Rules\FoundTypeResult(new StrictMixedType(), [], [], null);
        }
        if ($type instanceof MixedType || $type instanceof NeverType) {
            return new \PHPStan\Rules\FoundTypeResult(new ErrorType(), [], [], null);
        }
        if ($type instanceof StaticType) {
            $type = $type->getStaticObjectType();
        }
        $errors = [];
        $directClassNames = $type->getObjectClassNames();
        $hasClassExistsClass = \false;
        foreach ($directClassNames as $referencedClass) {
            if ($this->reflectionProvider->hasClass($referencedClass)) {
                $classReflection = $this->reflectionProvider->getClass($referencedClass);
                if (!$classReflection->isTrait()) {
                    continue;
                }
            }
            if ($scope->isInClassExists($referencedClass)) {
                $hasClassExistsClass = \true;
                continue;
            }
            $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf($unknownClassErrorPattern, $referencedClass))->line($var->getLine())->discoveringSymbolsTip()->build();
        }
        if (count($errors) > 0 || $hasClassExistsClass) {
            return new \PHPStan\Rules\FoundTypeResult(new ErrorType(), [], $errors, null);
        }
        if (!$this->checkUnionTypes && $type instanceof ObjectWithoutClassType) {
            return new \PHPStan\Rules\FoundTypeResult(new ErrorType(), [], [], null);
        }
        if (!$this->checkUnionTypes && $type instanceof UnionType && !$type instanceof BenevolentUnionType || !$this->checkBenevolentUnionTypes && $type instanceof BenevolentUnionType) {
            $newTypes = [];
            foreach ($type->getTypes() as $innerType) {
                if (!$unionTypeCriteriaCallback($innerType)) {
                    continue;
                }
                $newTypes[] = $innerType;
            }
            if (count($newTypes) > 0) {
                return new \PHPStan\Rules\FoundTypeResult(TypeCombinator::union(...$newTypes), $directClassNames, [], null);
            }
        }
        $tip = null;
        if (strpos($type->describe(VerbosityLevel::typeOnly()), 'PhpParser\\Node\\Arg|PhpParser\\Node\\VariadicPlaceholder') !== \false && !$unionTypeCriteriaCallback($type)) {
            $tip = 'Use <fg=cyan>->getArgs()</> instead of <fg=cyan>->args</>.';
        }
        return new \PHPStan\Rules\FoundTypeResult($type, $directClassNames, [], $tip);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\TooWideTypehints;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\MethodReturnStatementsNode;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
use function count;
use function sprintf;
/**
 * @implements Rule<MethodReturnStatementsNode>
 */
class TooWideMethodReturnTypehintRule implements Rule
{
    /**
     * @var bool
     */
    private $checkProtectedAndPublicMethods;
    public function __construct(bool $checkProtectedAndPublicMethods)
    {
        $this->checkProtectedAndPublicMethods = $checkProtectedAndPublicMethods;
    }
    public function getNodeType() : string
    {
        return MethodReturnStatementsNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $method = $scope->getFunction();
        if (!$method instanceof MethodReflection) {
            throw new ShouldNotHappenException();
        }
        $isFirstDeclaration = $method->getPrototype()->getDeclaringClass() === $method->getDeclaringClass();
        if (!$method->isPrivate()) {
            if (!$this->checkProtectedAndPublicMethods) {
                return [];
            }
            if ($isFirstDeclaration && !$method->getDeclaringClass()->isFinal() && !$method->isFinal()->yes()) {
                return [];
            }
        }
        $methodReturnType = ParametersAcceptorSelector::selectSingle($method->getVariants())->getReturnType();
        if (!$methodReturnType instanceof UnionType) {
            return [];
        }
        $statementResult = $node->getStatementResult();
        if ($statementResult->hasYield()) {
            return [];
        }
        $returnStatements = $node->getReturnStatements();
        if (count($returnStatements) === 0) {
            return [];
        }
        $returnTypes = [];
        foreach ($returnStatements as $returnStatement) {
            $returnNode = $returnStatement->getReturnNode();
            if ($returnNode->expr === null) {
                continue;
            }
            $returnTypes[] = $returnStatement->getScope()->getType($returnNode->expr);
        }
        if (count($returnTypes) === 0) {
            return [];
        }
        $returnType = TypeCombinator::union(...$returnTypes);
        if (!$method->isPrivate() && ($returnType->isNull()->yes() || $returnType instanceof ConstantBooleanType) && !$isFirstDeclaration) {
            return [];
        }
        $messages = [];
        foreach ($methodReturnType->getTypes() as $type) {
            if (!$type->isSuperTypeOf($returnType)->no()) {
                continue;
            }
            if ($type->isNull()->yes() && !$node->hasNativeReturnTypehint()) {
                foreach ($node->getExecutionEnds() as $executionEnd) {
                    if ($executionEnd->getStatementResult()->isAlwaysTerminating()) {
                        continue;
                    }
                    continue 2;
                }
            }
            $messages[] = RuleErrorBuilder::message(sprintf('Method %s::%s() never returns %s so it can be removed from the return type.', $method->getDeclaringClass()->getDisplayName(), $method->getName(), $type->describe(VerbosityLevel::getRecommendedLevelByType($type))))->build();
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\TooWideTypehints;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\FunctionReturnStatementsNode;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
use function count;
use function sprintf;
/**
 * @implements Rule<FunctionReturnStatementsNode>
 */
class TooWideFunctionReturnTypehintRule implements Rule
{
    public function getNodeType() : string
    {
        return FunctionReturnStatementsNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $function = $scope->getFunction();
        if (!$function instanceof FunctionReflection) {
            throw new ShouldNotHappenException();
        }
        $functionReturnType = ParametersAcceptorSelector::selectSingle($function->getVariants())->getReturnType();
        if (!$functionReturnType instanceof UnionType) {
            return [];
        }
        $statementResult = $node->getStatementResult();
        if ($statementResult->hasYield()) {
            return [];
        }
        $returnStatements = $node->getReturnStatements();
        if (count($returnStatements) === 0) {
            return [];
        }
        $returnTypes = [];
        foreach ($returnStatements as $returnStatement) {
            $returnNode = $returnStatement->getReturnNode();
            if ($returnNode->expr === null) {
                continue;
            }
            $returnTypes[] = $returnStatement->getScope()->getType($returnNode->expr);
        }
        if (count($returnTypes) === 0) {
            return [];
        }
        $returnType = TypeCombinator::union(...$returnTypes);
        $messages = [];
        foreach ($functionReturnType->getTypes() as $type) {
            if (!$type->isSuperTypeOf($returnType)->no()) {
                continue;
            }
            if ($type->isNull()->yes() && !$node->hasNativeReturnTypehint()) {
                foreach ($node->getExecutionEnds() as $executionEnd) {
                    if ($executionEnd->getStatementResult()->isAlwaysTerminating()) {
                        continue;
                    }
                    continue 2;
                }
            }
            $messages[] = RuleErrorBuilder::message(sprintf('Function %s() never returns %s so it can be removed from the return type.', $function->getName(), $type->describe(VerbosityLevel::getRecommendedLevelByType($type))))->build();
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\TooWideTypehints;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InArrowFunctionNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<InArrowFunctionNode>
 */
class TooWideArrowFunctionReturnTypehintRule implements Rule
{
    public function getNodeType() : string
    {
        return InArrowFunctionNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $functionReturnType = $scope->getAnonymousFunctionReturnType();
        if ($functionReturnType === null || !$functionReturnType instanceof UnionType) {
            return [];
        }
        $arrowFunction = $node->getOriginalNode();
        if ($arrowFunction->returnType === null) {
            return [];
        }
        $expr = $arrowFunction->expr;
        if ($expr instanceof Node\Expr\YieldFrom || $expr instanceof Node\Expr\Yield_) {
            return [];
        }
        $returnType = $scope->getType($expr);
        if ($returnType->isNull()->yes()) {
            return [];
        }
        $messages = [];
        foreach ($functionReturnType->getTypes() as $type) {
            if (!$type->isSuperTypeOf($returnType)->no()) {
                continue;
            }
            $messages[] = RuleErrorBuilder::message(sprintf('Anonymous function never returns %s so it can be removed from the return type.', $type->describe(VerbosityLevel::getRecommendedLevelByType($type))))->build();
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\TooWideTypehints;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\ClosureReturnStatementsNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
use function count;
use function sprintf;
/**
 * @implements Rule<ClosureReturnStatementsNode>
 */
class TooWideClosureReturnTypehintRule implements Rule
{
    public function getNodeType() : string
    {
        return ClosureReturnStatementsNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $closureReturnType = $scope->getAnonymousFunctionReturnType();
        if ($closureReturnType === null || !$closureReturnType instanceof UnionType) {
            return [];
        }
        $closureExpr = $node->getClosureExpr();
        if ($closureExpr->returnType === null) {
            return [];
        }
        $statementResult = $node->getStatementResult();
        if ($statementResult->hasYield()) {
            return [];
        }
        $returnStatements = $node->getReturnStatements();
        if (count($returnStatements) === 0) {
            return [];
        }
        $returnTypes = [];
        foreach ($returnStatements as $returnStatement) {
            $returnNode = $returnStatement->getReturnNode();
            if ($returnNode->expr === null) {
                continue;
            }
            $returnTypes[] = $returnStatement->getScope()->getType($returnNode->expr);
        }
        if (count($returnTypes) === 0) {
            return [];
        }
        $returnType = TypeCombinator::union(...$returnTypes);
        if ($returnType->isNull()->yes()) {
            return [];
        }
        $messages = [];
        foreach ($closureReturnType->getTypes() as $type) {
            if (!$type->isSuperTypeOf($returnType)->no()) {
                continue;
            }
            $messages[] = RuleErrorBuilder::message(sprintf('Anonymous function never returns %s so it can be removed from the return type.', $type->describe(VerbosityLevel::getRecommendedLevelByType($type))))->build();
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Classes;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\BetterReflection\Reflection\ReflectionClass;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\File\RelativePathHelper;
use PHPStan\Node\InClassNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function array_filter;
use function array_map;
use function count;
use function implode;
use function sprintf;
/**
 * @implements Rule<InClassNode>
 */
class DuplicateClassDeclarationRule implements Rule
{
    /**
     * @var \PHPStan\BetterReflection\Reflector\Reflector
     */
    private $reflector;
    /**
     * @var \PHPStan\File\RelativePathHelper
     */
    private $relativePathHelper;
    public function __construct(Reflector $reflector, RelativePathHelper $relativePathHelper)
    {
        $this->reflector = $reflector;
        $this->relativePathHelper = $relativePathHelper;
    }
    public function getNodeType() : string
    {
        return InClassNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $thisClass = $node->getClassReflection();
        $className = $thisClass->getName();
        $allClasses = $this->reflector->reflectAllClasses();
        $filteredClasses = [];
        foreach ($allClasses as $reflectionClass) {
            if ($reflectionClass->getName() !== $className) {
                continue;
            }
            $filteredClasses[] = $reflectionClass;
        }
        if (count($filteredClasses) < 2) {
            return [];
        }
        $filteredClasses = array_filter($filteredClasses, static function (ReflectionClass $class) use($thisClass) {
            return $class->getStartLine() !== $thisClass->getNativeReflection()->getStartLine();
        });
        return [RuleErrorBuilder::message(sprintf("Class %s declared multiple times:\n%s", $thisClass->getDisplayName(), implode("\n", array_map(function (ReflectionClass $class) {
            return sprintf('- %s:%d', $this->relativePathHelper->getRelativePath($class->getFileName() ?? 'unknown'), $class->getStartLine());
        }, $filteredClasses))))->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Classes;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Php\PhpVersion;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use function is_string;
use function sprintf;
/**
 * @implements Rule<Node>
 */
class InvalidPromotedPropertiesRule implements Rule
{
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
    }
    public function getNodeType() : string
    {
        return Node::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node instanceof Node\Expr\ArrowFunction && !$node instanceof Node\Stmt\ClassMethod && !$node instanceof Node\Expr\Closure && !$node instanceof Node\Stmt\Function_) {
            return [];
        }
        $hasPromotedProperties = \false;
        foreach ($node->params as $param) {
            if ($param->flags === 0) {
                continue;
            }
            $hasPromotedProperties = \true;
            break;
        }
        if (!$hasPromotedProperties) {
            return [];
        }
        if (!$this->phpVersion->supportsPromotedProperties()) {
            return [RuleErrorBuilder::message('Promoted properties are supported only on PHP 8.0 and later.')->nonIgnorable()->build()];
        }
        if (!$node instanceof Node\Stmt\ClassMethod || $node->name->toLowerString() !== '__construct') {
            return [RuleErrorBuilder::message('Promoted properties can be in constructor only.')->nonIgnorable()->build()];
        }
        if ($node->stmts === null) {
            return [RuleErrorBuilder::message('Promoted properties are not allowed in abstract constructors.')->nonIgnorable()->build()];
        }
        $errors = [];
        foreach ($node->params as $param) {
            if ($param->flags === 0) {
                continue;
            }
            if (!$param->var instanceof Node\Expr\Variable || !is_string($param->var->name)) {
                throw new ShouldNotHappenException();
            }
            if (!$param->variadic) {
                continue;
            }
            $propertyName = $param->var->name;
            $errors[] = RuleErrorBuilder::message(sprintf('Promoted property parameter $%s can not be variadic.', $propertyName))->nonIgnorable()->line($param->getLine())->build();
            continue;
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Classes;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InClassNode;
use PHPStan\Rules\Rule;
/**
 * @implements Rule<InClassNode>
 */
class LocalTypeAliasesRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Classes\LocalTypeAliasesCheck
     */
    private $check;
    public function __construct(\PHPStan\Rules\Classes\LocalTypeAliasesCheck $check)
    {
        $this->check = $check;
    }
    public function getNodeType() : string
    {
        return InClassNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        return $this->check->check($node->getClassReflection());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Classes;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
/**
 * @implements Rule<Node\Stmt\Trait_>
 */
class LocalTypeTraitAliasesRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Classes\LocalTypeAliasesCheck
     */
    private $check;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(\PHPStan\Rules\Classes\LocalTypeAliasesCheck $check, ReflectionProvider $reflectionProvider)
    {
        $this->check = $check;
        $this->reflectionProvider = $reflectionProvider;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\Trait_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $traitName = $node->namespacedName;
        if ($traitName === null) {
            return [];
        }
        if (!$this->reflectionProvider->hasClass($traitName->toString())) {
            return [];
        }
        return $this->check->check($this->reflectionProvider->getClass($traitName->toString()));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Classes;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\ClassCaseSensitivityCheck;
use PHPStan\Rules\ClassNameNodePair;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use function array_map;
use function sprintf;
/**
 * @implements Rule<Node\Stmt\TraitUse>
 */
class ExistingClassInTraitUseRule implements Rule
{
    /**
     * @var \PHPStan\Rules\ClassCaseSensitivityCheck
     */
    private $classCaseSensitivityCheck;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(ClassCaseSensitivityCheck $classCaseSensitivityCheck, ReflectionProvider $reflectionProvider)
    {
        $this->classCaseSensitivityCheck = $classCaseSensitivityCheck;
        $this->reflectionProvider = $reflectionProvider;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\TraitUse::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $messages = $this->classCaseSensitivityCheck->checkClassNames(array_map(static function (Node\Name $traitName) : ClassNameNodePair {
            return new ClassNameNodePair((string) $traitName, $traitName);
        }, $node->traits));
        if (!$scope->isInClass()) {
            throw new ShouldNotHappenException();
        }
        $classReflection = $scope->getClassReflection();
        if ($classReflection->isInterface()) {
            if (!$scope->isInTrait()) {
                foreach ($node->traits as $trait) {
                    $messages[] = RuleErrorBuilder::message(sprintf('Interface %s uses trait %s.', $classReflection->getName(), (string) $trait))->nonIgnorable()->build();
                }
            }
        } else {
            if ($scope->isInTrait()) {
                $currentName = sprintf('Trait %s', $scope->getTraitReflection()->getName());
            } else {
                if ($classReflection->isAnonymous()) {
                    $currentName = 'Anonymous class';
                } else {
                    $currentName = sprintf('Class %s', $classReflection->getName());
                }
            }
            foreach ($node->traits as $trait) {
                $traitName = (string) $trait;
                if (!$this->reflectionProvider->hasClass($traitName)) {
                    $messages[] = RuleErrorBuilder::message(sprintf('%s uses unknown trait %s.', $currentName, $traitName))->nonIgnorable()->discoveringSymbolsTip()->build();
                } else {
                    $reflection = $this->reflectionProvider->getClass($traitName);
                    if ($reflection->isClass()) {
                        $messages[] = RuleErrorBuilder::message(sprintf('%s uses class %s.', $currentName, $reflection->getDisplayName()))->nonIgnorable()->build();
                    } elseif ($reflection->isInterface()) {
                        $messages[] = RuleErrorBuilder::message(sprintf('%s uses interface %s.', $currentName, $reflection->getDisplayName()))->nonIgnorable()->build();
                    } elseif ($reflection->isEnum()) {
                        $messages[] = RuleErrorBuilder::message(sprintf('%s uses enum %s.', $currentName, $reflection->getDisplayName()))->nonIgnorable()->build();
                    }
                }
            }
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Classes;

use Attribute;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\AttributesCheck;
use PHPStan\Rules\Rule;
/**
 * @implements Rule<Node\Stmt\ClassConst>
 */
class ClassConstantAttributesRule implements Rule
{
    /**
     * @var \PHPStan\Rules\AttributesCheck
     */
    private $attributesCheck;
    public function __construct(AttributesCheck $attributesCheck)
    {
        $this->attributesCheck = $attributesCheck;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\ClassConst::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        return $this->attributesCheck->check($scope, $node->attrGroups, Attribute::TARGET_CLASS_CONSTANT, 'class constant');
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Classes;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InClassNode;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\ClassCaseSensitivityCheck;
use PHPStan\Rules\ClassNameNodePair;
use PHPStan\Rules\Generics\GenericObjectTypeCheck;
use PHPStan\Rules\MissingTypehintCheck;
use PHPStan\Rules\PhpDoc\UnresolvableTypeHelper;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\VerbosityLevel;
use function array_merge;
use function implode;
use function sprintf;
/**
 * @implements Rule<InClassNode>
 */
class MixinRule implements Rule
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Rules\ClassCaseSensitivityCheck
     */
    private $classCaseSensitivityCheck;
    /**
     * @var \PHPStan\Rules\Generics\GenericObjectTypeCheck
     */
    private $genericObjectTypeCheck;
    /**
     * @var \PHPStan\Rules\MissingTypehintCheck
     */
    private $missingTypehintCheck;
    /**
     * @var \PHPStan\Rules\PhpDoc\UnresolvableTypeHelper
     */
    private $unresolvableTypeHelper;
    /**
     * @var bool
     */
    private $checkClassCaseSensitivity;
    public function __construct(ReflectionProvider $reflectionProvider, ClassCaseSensitivityCheck $classCaseSensitivityCheck, GenericObjectTypeCheck $genericObjectTypeCheck, MissingTypehintCheck $missingTypehintCheck, UnresolvableTypeHelper $unresolvableTypeHelper, bool $checkClassCaseSensitivity)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->classCaseSensitivityCheck = $classCaseSensitivityCheck;
        $this->genericObjectTypeCheck = $genericObjectTypeCheck;
        $this->missingTypehintCheck = $missingTypehintCheck;
        $this->unresolvableTypeHelper = $unresolvableTypeHelper;
        $this->checkClassCaseSensitivity = $checkClassCaseSensitivity;
    }
    public function getNodeType() : string
    {
        return InClassNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$scope->isInClass()) {
            return [];
        }
        $classReflection = $scope->getClassReflection();
        $mixinTags = $classReflection->getMixinTags();
        $errors = [];
        foreach ($mixinTags as $mixinTag) {
            $type = $mixinTag->getType();
            if (!$type->canCallMethods()->yes() || !$type->canAccessProperties()->yes()) {
                $errors[] = RuleErrorBuilder::message(sprintf('PHPDoc tag @mixin contains non-object type %s.', $type->describe(VerbosityLevel::typeOnly())))->build();
                continue;
            }
            if ($this->unresolvableTypeHelper->containsUnresolvableType($type)) {
                $errors[] = RuleErrorBuilder::message('PHPDoc tag @mixin contains unresolvable type.')->build();
                continue;
            }
            $errors = array_merge($errors, $this->genericObjectTypeCheck->check($type, 'PHPDoc tag @mixin contains generic type %s but %s %s is not generic.', 'Generic type %s in PHPDoc tag @mixin does not specify all template types of %s %s: %s', 'Generic type %s in PHPDoc tag @mixin specifies %d template types, but %s %s supports only %d: %s', 'Type %s in generic type %s in PHPDoc tag @mixin is not subtype of template type %s of %s %s.'));
            foreach ($this->missingTypehintCheck->getNonGenericObjectTypesWithGenericClass($type) as [$innerName, $genericTypeNames]) {
                $errors[] = RuleErrorBuilder::message(sprintf('PHPDoc tag @mixin contains generic %s but does not specify its types: %s', $innerName, implode(', ', $genericTypeNames)))->tip(MissingTypehintCheck::TURN_OFF_NON_GENERIC_CHECK_TIP)->build();
            }
            foreach ($type->getReferencedClasses() as $class) {
                if (!$this->reflectionProvider->hasClass($class)) {
                    $errors[] = RuleErrorBuilder::message(sprintf('PHPDoc tag @mixin contains unknown class %s.', $class))->discoveringSymbolsTip()->build();
                } elseif ($this->reflectionProvider->getClass($class)->isTrait()) {
                    $errors[] = RuleErrorBuilder::message(sprintf('PHPDoc tag @mixin contains invalid type %s.', $class))->build();
                } elseif ($this->checkClassCaseSensitivity) {
                    $errors = array_merge($errors, $this->classCaseSensitivityCheck->checkClassNames([new ClassNameNodePair($class, $node)]));
                }
            }
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Classes;

use Attribute;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\AttributesCheck;
use PHPStan\Rules\Rule;
/**
 * @implements Rule<Node\Stmt\ClassLike>
 */
class ClassAttributesRule implements Rule
{
    /**
     * @var \PHPStan\Rules\AttributesCheck
     */
    private $attributesCheck;
    public function __construct(AttributesCheck $attributesCheck)
    {
        $this->attributesCheck = $attributesCheck;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\ClassLike::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        return $this->attributesCheck->check($scope, $node->attrGroups, Attribute::TARGET_CLASS, 'class');
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Classes;

use PhpParser\Node;
use PhpParser\Node\Expr\Variable;
use PhpParser\Node\Param;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Node\InClassMethodNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\UnusedFunctionParametersCheck;
use PHPStan\ShouldNotHappenException;
use function array_filter;
use function array_map;
use function array_values;
use function count;
use function is_string;
use function sprintf;
use function strtolower;
/**
 * @implements Rule<InClassMethodNode>
 */
class UnusedConstructorParametersRule implements Rule
{
    /**
     * @var \PHPStan\Rules\UnusedFunctionParametersCheck
     */
    private $check;
    public function __construct(UnusedFunctionParametersCheck $check)
    {
        $this->check = $check;
    }
    public function getNodeType() : string
    {
        return InClassMethodNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $method = $node->getMethodReflection();
        $originalNode = $node->getOriginalNode();
        if (strtolower($method->getName()) !== '__construct' || $originalNode->stmts === null) {
            return [];
        }
        if (count($originalNode->params) === 0) {
            return [];
        }
        $message = sprintf('Constructor of class %s has an unused parameter $%%s.', SprintfHelper::escapeFormatString($node->getClassReflection()->getDisplayName()));
        if ($node->getClassReflection()->isAnonymous()) {
            $message = 'Constructor of an anonymous class has an unused parameter $%s.';
        }
        return $this->check->getUnusedParameters($scope, array_map(static function (Param $parameter) : string {
            if (!$parameter->var instanceof Variable || !is_string($parameter->var->name)) {
                throw new ShouldNotHappenException();
            }
            return $parameter->var->name;
        }, array_values(array_filter($originalNode->params, static function (Param $parameter) : bool {
            return $parameter->flags === 0;
        }))), $originalNode->stmts, $message, 'constructor.unusedParameter', []);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Classes;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\ClassCaseSensitivityCheck;
use PHPStan\Rules\ClassNameNodePair;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function array_map;
use function sprintf;
/**
 * @implements Rule<Node\Stmt\Interface_>
 */
class ExistingClassesInInterfaceExtendsRule implements Rule
{
    /**
     * @var \PHPStan\Rules\ClassCaseSensitivityCheck
     */
    private $classCaseSensitivityCheck;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(ClassCaseSensitivityCheck $classCaseSensitivityCheck, ReflectionProvider $reflectionProvider)
    {
        $this->classCaseSensitivityCheck = $classCaseSensitivityCheck;
        $this->reflectionProvider = $reflectionProvider;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\Interface_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $messages = $this->classCaseSensitivityCheck->checkClassNames(array_map(static function (Node\Name $interfaceName) : ClassNameNodePair {
            return new ClassNameNodePair((string) $interfaceName, $interfaceName);
        }, $node->extends));
        $currentInterfaceName = (string) $node->namespacedName;
        foreach ($node->extends as $extends) {
            $extendedInterfaceName = (string) $extends;
            if (!$this->reflectionProvider->hasClass($extendedInterfaceName)) {
                if (!$scope->isInClassExists($extendedInterfaceName)) {
                    $messages[] = RuleErrorBuilder::message(sprintf('Interface %s extends unknown interface %s.', $currentInterfaceName, $extendedInterfaceName))->nonIgnorable()->discoveringSymbolsTip()->build();
                }
            } else {
                $reflection = $this->reflectionProvider->getClass($extendedInterfaceName);
                if ($reflection->isClass()) {
                    $messages[] = RuleErrorBuilder::message(sprintf('Interface %s extends class %s.', $currentInterfaceName, $reflection->getDisplayName()))->nonIgnorable()->build();
                } elseif ($reflection->isTrait()) {
                    $messages[] = RuleErrorBuilder::message(sprintf('Interface %s extends trait %s.', $currentInterfaceName, $reflection->getDisplayName()))->nonIgnorable()->build();
                } elseif ($reflection->isEnum()) {
                    $messages[] = RuleErrorBuilder::message(sprintf('Interface %s extends enum %s.', $currentInterfaceName, $reflection->getDisplayName()))->nonIgnorable()->build();
                }
            }
            return $messages;
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Classes;

use PhpParser\Node;
use PhpParser\Node\Expr\New_;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Reflection\Php\PhpMethodReflection;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\ClassCaseSensitivityCheck;
use PHPStan\Rules\ClassNameNodePair;
use PHPStan\Rules\FunctionCallParametersCheck;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Constant\ConstantStringType;
use function array_map;
use function array_merge;
use function count;
use function sprintf;
use function strtolower;
/**
 * @implements Rule<Node\Expr\New_>
 */
class InstantiationRule implements Rule
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Rules\FunctionCallParametersCheck
     */
    private $check;
    /**
     * @var \PHPStan\Rules\ClassCaseSensitivityCheck
     */
    private $classCaseSensitivityCheck;
    public function __construct(ReflectionProvider $reflectionProvider, FunctionCallParametersCheck $check, ClassCaseSensitivityCheck $classCaseSensitivityCheck)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->check = $check;
        $this->classCaseSensitivityCheck = $classCaseSensitivityCheck;
    }
    public function getNodeType() : string
    {
        return New_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $errors = [];
        foreach ($this->getClassNames($node, $scope) as [$class, $isName]) {
            $errors = array_merge($errors, $this->checkClassName($class, $isName, $node, $scope));
        }
        return $errors;
    }
    /**
     * @param Node\Expr\New_ $node
     * @return RuleError[]
     */
    private function checkClassName(string $class, bool $isName, Node $node, Scope $scope) : array
    {
        $lowercasedClass = strtolower($class);
        $messages = [];
        $isStatic = \false;
        if ($lowercasedClass === 'static') {
            if (!$scope->isInClass()) {
                return [RuleErrorBuilder::message(sprintf('Using %s outside of class scope.', $class))->build()];
            }
            $isStatic = \true;
            $classReflection = $scope->getClassReflection();
            if (!$classReflection->isFinal()) {
                if (!$classReflection->hasConstructor()) {
                    return [];
                }
                $constructor = $classReflection->getConstructor();
                if (!$constructor->getPrototype()->getDeclaringClass()->isInterface() && $constructor instanceof PhpMethodReflection && !$constructor->isFinal()->yes() && !$constructor->getPrototype()->isAbstract()) {
                    return [];
                }
            }
        } elseif ($lowercasedClass === 'self') {
            if (!$scope->isInClass()) {
                return [RuleErrorBuilder::message(sprintf('Using %s outside of class scope.', $class))->build()];
            }
            $classReflection = $scope->getClassReflection();
        } elseif ($lowercasedClass === 'parent') {
            if (!$scope->isInClass()) {
                return [RuleErrorBuilder::message(sprintf('Using %s outside of class scope.', $class))->build()];
            }
            if ($scope->getClassReflection()->getParentClass() === null) {
                return [RuleErrorBuilder::message(sprintf('%s::%s() calls new parent but %s does not extend any class.', $scope->getClassReflection()->getDisplayName(), $scope->getFunctionName(), $scope->getClassReflection()->getDisplayName()))->build()];
            }
            $classReflection = $scope->getClassReflection()->getParentClass();
        } else {
            if (!$this->reflectionProvider->hasClass($class)) {
                if ($scope->isInClassExists($class)) {
                    return [];
                }
                return [RuleErrorBuilder::message(sprintf('Instantiated class %s not found.', $class))->discoveringSymbolsTip()->build()];
            }
            $messages = $this->classCaseSensitivityCheck->checkClassNames([new ClassNameNodePair($class, $node->class)]);
            $classReflection = $this->reflectionProvider->getClass($class);
        }
        if ($classReflection->isEnum() && $isName) {
            return [RuleErrorBuilder::message(sprintf('Cannot instantiate enum %s.', $classReflection->getDisplayName()))->build()];
        }
        if (!$isStatic && $classReflection->isInterface() && $isName) {
            return [RuleErrorBuilder::message(sprintf('Cannot instantiate interface %s.', $classReflection->getDisplayName()))->build()];
        }
        if (!$isStatic && $classReflection->isAbstract() && $isName) {
            return [RuleErrorBuilder::message(sprintf('Instantiated class %s is abstract.', $classReflection->getDisplayName()))->build()];
        }
        if (!$isName) {
            return [];
        }
        if (!$classReflection->hasConstructor()) {
            if (count($node->getArgs()) > 0) {
                return array_merge($messages, [RuleErrorBuilder::message(sprintf('Class %s does not have a constructor and must be instantiated without any parameters.', $classReflection->getDisplayName()))->build()]);
            }
            return $messages;
        }
        $constructorReflection = $classReflection->getConstructor();
        if (!$scope->canCallMethod($constructorReflection)) {
            $messages[] = RuleErrorBuilder::message(sprintf('Cannot instantiate class %s via %s constructor %s::%s().', $classReflection->getDisplayName(), $constructorReflection->isPrivate() ? 'private' : 'protected', $constructorReflection->getDeclaringClass()->getDisplayName(), $constructorReflection->getName()))->build();
        }
        $classDisplayName = SprintfHelper::escapeFormatString($classReflection->getDisplayName());
        return array_merge($messages, $this->check->check(ParametersAcceptorSelector::selectFromArgs($scope, $node->getArgs(), $constructorReflection->getVariants()), $scope, $constructorReflection->getDeclaringClass()->isBuiltin(), $node, [
            'Class ' . $classDisplayName . ' constructor invoked with %d parameter, %d required.',
            'Class ' . $classDisplayName . ' constructor invoked with %d parameters, %d required.',
            'Class ' . $classDisplayName . ' constructor invoked with %d parameter, at least %d required.',
            'Class ' . $classDisplayName . ' constructor invoked with %d parameters, at least %d required.',
            'Class ' . $classDisplayName . ' constructor invoked with %d parameter, %d-%d required.',
            'Class ' . $classDisplayName . ' constructor invoked with %d parameters, %d-%d required.',
            'Parameter %s of class ' . $classDisplayName . ' constructor expects %s, %s given.',
            '',
            // constructor does not have a return type
            'Parameter %s of class ' . $classDisplayName . ' constructor is passed by reference, so it expects variables only',
            'Unable to resolve the template type %s in instantiation of class ' . $classDisplayName,
            'Missing parameter $%s in call to ' . $classDisplayName . ' constructor.',
            'Unknown parameter $%s in call to ' . $classDisplayName . ' constructor.',
            'Return type of call to ' . $classDisplayName . ' constructor contains unresolvable type.',
            'Parameter %s of class ' . $classDisplayName . ' constructor contains unresolvable type.',
        ]));
    }
    /**
     * @param Node\Expr\New_ $node $node
     * @return array<int, array{string, bool}>
     */
    private function getClassNames(Node $node, Scope $scope) : array
    {
        if ($node->class instanceof Node\Name) {
            return [[(string) $node->class, \true]];
        }
        if ($node->class instanceof Node\Stmt\Class_) {
            $classNames = $scope->getType($node)->getObjectClassNames();
            if ($classNames === []) {
                throw new ShouldNotHappenException();
            }
            return array_map(static function (string $className) {
                return [$className, \true];
            }, $classNames);
        }
        $type = $scope->getType($node->class);
        return array_merge(array_map(static function (ConstantStringType $type) : array {
            return [$type->getValue(), \true];
        }, $type->getConstantStrings()), array_map(static function (string $name) : array {
            return [$name, \false];
        }, $type->getObjectClassNames()));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Classes;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InClassNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function array_values;
use function sprintf;
/**
 * @implements Rule<InClassNode>
 */
class AllowedSubTypesRule implements Rule
{
    public function getNodeType() : string
    {
        return InClassNode::class;
    }
    /**
     * @param InClassNode $node
     */
    public function processNode(Node $node, Scope $scope) : array
    {
        $classReflection = $node->getClassReflection();
        $className = $classReflection->getName();
        $parents = array_values($classReflection->getImmediateInterfaces());
        $parentClass = $classReflection->getParentClass();
        if ($parentClass !== null) {
            $parents[] = $parentClass;
        }
        $messages = [];
        foreach ($parents as $parentReflection) {
            $allowedSubTypes = $parentReflection->getAllowedSubTypes();
            if ($allowedSubTypes === null) {
                continue;
            }
            foreach ($allowedSubTypes as $allowedSubType) {
                if (!$allowedSubType->isObject()->yes()) {
                    continue;
                }
                if ($allowedSubType->getObjectClassNames() === [$className]) {
                    continue 2;
                }
            }
            $messages[] = RuleErrorBuilder::message(sprintf('Type %s is not allowed to be a subtype of %s.', $className, $parentReflection->getName()))->build();
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Classes;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\ClassCaseSensitivityCheck;
use PHPStan\Rules\ClassNameNodePair;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function sprintf;
/**
 * @implements Rule<Node\Stmt\Class_>
 */
class ExistingClassInClassExtendsRule implements Rule
{
    /**
     * @var \PHPStan\Rules\ClassCaseSensitivityCheck
     */
    private $classCaseSensitivityCheck;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(ClassCaseSensitivityCheck $classCaseSensitivityCheck, ReflectionProvider $reflectionProvider)
    {
        $this->classCaseSensitivityCheck = $classCaseSensitivityCheck;
        $this->reflectionProvider = $reflectionProvider;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\Class_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if ($node->extends === null) {
            return [];
        }
        $extendedClassName = (string) $node->extends;
        $messages = $this->classCaseSensitivityCheck->checkClassNames([new ClassNameNodePair($extendedClassName, $node->extends)]);
        $currentClassName = null;
        if (isset($node->namespacedName)) {
            $currentClassName = (string) $node->namespacedName;
        }
        if (!$this->reflectionProvider->hasClass($extendedClassName)) {
            if (!$scope->isInClassExists($extendedClassName)) {
                $messages[] = RuleErrorBuilder::message(sprintf('%s extends unknown class %s.', $currentClassName !== null ? sprintf('Class %s', $currentClassName) : 'Anonymous class', $extendedClassName))->nonIgnorable()->discoveringSymbolsTip()->build();
            }
        } else {
            $reflection = $this->reflectionProvider->getClass($extendedClassName);
            if ($reflection->isInterface()) {
                $messages[] = RuleErrorBuilder::message(sprintf('%s extends interface %s.', $currentClassName !== null ? sprintf('Class %s', $currentClassName) : 'Anonymous class', $reflection->getDisplayName()))->nonIgnorable()->build();
            } elseif ($reflection->isTrait()) {
                $messages[] = RuleErrorBuilder::message(sprintf('%s extends trait %s.', $currentClassName !== null ? sprintf('Class %s', $currentClassName) : 'Anonymous class', $reflection->getDisplayName()))->nonIgnorable()->build();
            } elseif ($reflection->isEnum()) {
                $messages[] = RuleErrorBuilder::message(sprintf('%s extends enum %s.', $currentClassName !== null ? sprintf('Class %s', $currentClassName) : 'Anonymous class', $reflection->getDisplayName()))->nonIgnorable()->build();
            } elseif ($reflection->isFinalByKeyword()) {
                $messages[] = RuleErrorBuilder::message(sprintf('%s extends final class %s.', $currentClassName !== null ? sprintf('Class %s', $currentClassName) : 'Anonymous class', $reflection->getDisplayName()))->nonIgnorable()->build();
            } elseif ($reflection->isFinal()) {
                $messages[] = RuleErrorBuilder::message(sprintf('%s extends @final class %s.', $currentClassName !== null ? sprintf('Class %s', $currentClassName) : 'Anonymous class', $reflection->getDisplayName()))->build();
            }
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Classes;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
/**
 * @implements Rule<Node\Stmt\Trait_>
 */
class TraitAttributeClassRule implements Rule
{
    public function getNodeType() : string
    {
        return Node\Stmt\Trait_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        foreach ($node->attrGroups as $attrGroup) {
            foreach ($attrGroup->attrs as $attr) {
                $name = $attr->name->toLowerString();
                if ($name === 'attribute') {
                    return [RuleErrorBuilder::message('Trait cannot be an Attribute class.')->build()];
                }
            }
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Classes;

use PhpParser\Node;
use PhpParser\Node\Name;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function sprintf;
/**
 * @implements Rule<Node\Expr\ClassConstFetch>
 */
class AccessPrivateConstantThroughStaticRule implements Rule
{
    public function getNodeType() : string
    {
        return Node\Expr\ClassConstFetch::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->name instanceof Node\Identifier) {
            return [];
        }
        if (!$node->class instanceof Name) {
            return [];
        }
        $constantName = $node->name->name;
        $className = $node->class;
        if ($className->toLowerString() !== 'static') {
            return [];
        }
        $classType = $scope->resolveTypeByName($className);
        if (!$classType->hasConstant($constantName)->yes()) {
            return [];
        }
        $constant = $classType->getConstant($constantName);
        if (!$constant->isPrivate()) {
            return [];
        }
        if ($scope->isInClass() && $scope->getClassReflection()->isFinal()) {
            return [];
        }
        return [RuleErrorBuilder::message(sprintf('Unsafe access to private constant %s::%s through static::.', $constant->getDeclaringClass()->getDisplayName(), $constantName))->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Classes;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InClassNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\IntegerType;
use PHPStan\Type\StringType;
use PHPStan\Type\VerbosityLevel;
use Serializable;
use function array_key_exists;
use function count;
use function implode;
use function sprintf;
/**
 * @implements Rule<InClassNode>
 */
class EnumSanityRule implements Rule
{
    private const ALLOWED_MAGIC_METHODS = ['__call' => \true, '__callstatic' => \true, '__invoke' => \true];
    public function getNodeType() : string
    {
        return InClassNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $classReflection = $node->getClassReflection();
        if (!$classReflection->isEnum()) {
            return [];
        }
        /** @var Node\Stmt\Enum_ $enumNode */
        $enumNode = $node->getOriginalNode();
        $errors = [];
        foreach ($enumNode->getMethods() as $methodNode) {
            if ($methodNode->isAbstract()) {
                $errors[] = RuleErrorBuilder::message(sprintf('Enum %s contains abstract method %s().', $classReflection->getDisplayName(), $methodNode->name->name))->line($methodNode->getLine())->nonIgnorable()->build();
            }
            $lowercasedMethodName = $methodNode->name->toLowerString();
            if ($methodNode->isMagic()) {
                if ($lowercasedMethodName === '__construct') {
                    $errors[] = RuleErrorBuilder::message(sprintf('Enum %s contains constructor.', $classReflection->getDisplayName()))->line($methodNode->getLine())->nonIgnorable()->build();
                } elseif ($lowercasedMethodName === '__destruct') {
                    $errors[] = RuleErrorBuilder::message(sprintf('Enum %s contains destructor.', $classReflection->getDisplayName()))->line($methodNode->getLine())->nonIgnorable()->build();
                } elseif (!array_key_exists($lowercasedMethodName, self::ALLOWED_MAGIC_METHODS)) {
                    $errors[] = RuleErrorBuilder::message(sprintf('Enum %s contains magic method %s().', $classReflection->getDisplayName(), $methodNode->name->name))->line($methodNode->getLine())->nonIgnorable()->build();
                }
            }
            if ($lowercasedMethodName === 'cases') {
                $errors[] = RuleErrorBuilder::message(sprintf('Enum %s cannot redeclare native method %s().', $classReflection->getDisplayName(), $methodNode->name->name))->line($methodNode->getLine())->nonIgnorable()->build();
            }
            if ($enumNode->scalarType === null) {
                continue;
            }
            if ($lowercasedMethodName !== 'from' && $lowercasedMethodName !== 'tryfrom') {
                continue;
            }
            $errors[] = RuleErrorBuilder::message(sprintf('Enum %s cannot redeclare native method %s().', $classReflection->getDisplayName(), $methodNode->name->name))->line($methodNode->getLine())->nonIgnorable()->build();
        }
        if ($enumNode->scalarType !== null && $enumNode->scalarType->name !== 'int' && $enumNode->scalarType->name !== 'string') {
            $errors[] = RuleErrorBuilder::message(sprintf('Backed enum %s can have only "int" or "string" type.', $classReflection->getDisplayName()))->line($enumNode->scalarType->getLine())->nonIgnorable()->build();
        }
        if ($classReflection->implementsInterface(Serializable::class)) {
            $errors[] = RuleErrorBuilder::message(sprintf('Enum %s cannot implement the Serializable interface.', $classReflection->getDisplayName()))->line($enumNode->getLine())->nonIgnorable()->build();
        }
        $enumCases = [];
        foreach ($enumNode->stmts as $stmt) {
            if (!$stmt instanceof Node\Stmt\EnumCase) {
                continue;
            }
            $caseName = $stmt->name->name;
            if ($stmt->expr instanceof Node\Scalar\LNumber || $stmt->expr instanceof Node\Scalar\String_) {
                if ($enumNode->scalarType === null) {
                    $errors[] = RuleErrorBuilder::message(sprintf('Enum %s is not backed, but case %s has value %s.', $classReflection->getDisplayName(), $caseName, $stmt->expr->value))->identifier('enum.caseWithValue')->line($stmt->getLine())->nonIgnorable()->build();
                } else {
                    $caseValue = $stmt->expr->value;
                    if (!isset($enumCases[$caseValue])) {
                        $enumCases[$caseValue] = [];
                    }
                    $enumCases[$caseValue][] = $caseName;
                }
            }
            if ($enumNode->scalarType === null) {
                continue;
            }
            if ($stmt->expr === null) {
                $errors[] = RuleErrorBuilder::message(sprintf('Enum case %s::%s does not have a value but the enum is backed with the "%s" type.', $classReflection->getDisplayName(), $caseName, $enumNode->scalarType->name))->identifier('enum.missingCase')->line($stmt->getLine())->nonIgnorable()->build();
                continue;
            }
            $exprType = $scope->getType($stmt->expr);
            $scalarType = $enumNode->scalarType->toLowerString() === 'int' ? new IntegerType() : new StringType();
            if ($scalarType->isSuperTypeOf($exprType)->yes()) {
                continue;
            }
            $errors[] = RuleErrorBuilder::message(sprintf('Enum case %s::%s value %s does not match the "%s" type.', $classReflection->getDisplayName(), $caseName, $exprType->describe(VerbosityLevel::value()), $scalarType->describe(VerbosityLevel::typeOnly())))->identifier('enum.caseType')->line($stmt->getLine())->nonIgnorable()->build();
        }
        foreach ($enumCases as $caseValue => $caseNames) {
            if (count($caseNames) <= 1) {
                continue;
            }
            $errors[] = RuleErrorBuilder::message(sprintf('Enum %s has duplicate value %s for cases %s.', $classReflection->getDisplayName(), $caseValue, implode(', ', $caseNames)))->identifier('enum.duplicateValue')->line($enumNode->getLine())->nonIgnorable()->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Classes;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Parser\LastConditionVisitor;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\ObjectWithoutClassType;
use PHPStan\Type\StringType;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<Node\Expr\Instanceof_>
 */
class ImpossibleInstanceOfRule implements Rule
{
    /**
     * @var bool
     */
    private $checkAlwaysTrueInstanceof;
    /**
     * @var bool
     */
    private $treatPhpDocTypesAsCertain;
    /**
     * @var bool
     */
    private $reportAlwaysTrueInLastCondition;
    public function __construct(bool $checkAlwaysTrueInstanceof, bool $treatPhpDocTypesAsCertain, bool $reportAlwaysTrueInLastCondition)
    {
        $this->checkAlwaysTrueInstanceof = $checkAlwaysTrueInstanceof;
        $this->treatPhpDocTypesAsCertain = $treatPhpDocTypesAsCertain;
        $this->reportAlwaysTrueInLastCondition = $reportAlwaysTrueInLastCondition;
    }
    public function getNodeType() : string
    {
        return Node\Expr\Instanceof_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $instanceofType = $this->treatPhpDocTypesAsCertain ? $scope->getType($node) : $scope->getNativeType($node);
        if (!$instanceofType instanceof ConstantBooleanType) {
            return [];
        }
        if ($node->class instanceof Node\Name) {
            $className = $scope->resolveName($node->class);
            $classType = new ObjectType($className);
        } else {
            $classType = $this->treatPhpDocTypesAsCertain ? $scope->getType($node->class) : $scope->getNativeType($node->class);
            $allowed = TypeCombinator::union(new StringType(), new ObjectWithoutClassType());
            if (!$allowed->isSuperTypeOf($classType)->yes()) {
                return [RuleErrorBuilder::message(sprintf('Instanceof between %s and %s results in an error.', $scope->getType($node->expr)->describe(VerbosityLevel::typeOnly()), $classType->describe(VerbosityLevel::typeOnly())))->build()];
            }
        }
        $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use($scope, $node) : RuleErrorBuilder {
            if (!$this->treatPhpDocTypesAsCertain) {
                return $ruleErrorBuilder;
            }
            $instanceofTypeWithoutPhpDocs = $scope->getNativeType($node);
            if ($instanceofTypeWithoutPhpDocs instanceof ConstantBooleanType) {
                return $ruleErrorBuilder;
            }
            return $ruleErrorBuilder->tip('Because the type is coming from a PHPDoc, you can turn off this check by setting <fg=cyan>treatPhpDocTypesAsCertain: false</> in your <fg=cyan>%configurationFile%</>.');
        };
        if (!$instanceofType->getValue()) {
            $exprType = $this->treatPhpDocTypesAsCertain ? $scope->getType($node->expr) : $scope->getNativeType($node->expr);
            return [$addTip(RuleErrorBuilder::message(sprintf('Instanceof between %s and %s will always evaluate to false.', $exprType->describe(VerbosityLevel::typeOnly()), $classType->describe(VerbosityLevel::getRecommendedLevelByType($classType)))))->build()];
        } elseif ($this->checkAlwaysTrueInstanceof) {
            $isLast = $node->getAttribute(LastConditionVisitor::ATTRIBUTE_NAME);
            if ($isLast === \true && !$this->reportAlwaysTrueInLastCondition) {
                return [];
            }
            $exprType = $this->treatPhpDocTypesAsCertain ? $scope->getType($node->expr) : $scope->getNativeType($node->expr);
            $errorBuilder = $addTip(RuleErrorBuilder::message(sprintf('Instanceof between %s and %s will always evaluate to true.', $exprType->describe(VerbosityLevel::typeOnly()), $classType->describe(VerbosityLevel::getRecommendedLevelByType($classType)))));
            if ($isLast === \false && !$this->reportAlwaysTrueInLastCondition) {
                $errorBuilder->tip('Remove remaining cases below this one and this error will disappear too.');
            }
            return [$errorBuilder->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Classes;

use PHPStan\Analyser\NameScope;
use PHPStan\PhpDoc\TypeNodeResolver;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\CircularTypeAliasErrorType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Generic\TemplateType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeTraverser;
use function array_key_exists;
use function in_array;
use function sprintf;
class LocalTypeAliasesCheck
{
    /**
     * @var array<string, string>
     */
    private $globalTypeAliases;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\PhpDoc\TypeNodeResolver
     */
    private $typeNodeResolver;
    /**
     * @param array<string, string> $globalTypeAliases
     */
    public function __construct(array $globalTypeAliases, ReflectionProvider $reflectionProvider, TypeNodeResolver $typeNodeResolver)
    {
        $this->globalTypeAliases = $globalTypeAliases;
        $this->reflectionProvider = $reflectionProvider;
        $this->typeNodeResolver = $typeNodeResolver;
    }
    /**
     * @return RuleError[]
     */
    public function check(ClassReflection $reflection) : array
    {
        $phpDoc = $reflection->getResolvedPhpDoc();
        if ($phpDoc === null) {
            return [];
        }
        $nameScope = $phpDoc->getNullableNameScope();
        $resolveName = static function (string $name) use($nameScope) : string {
            if ($nameScope === null) {
                return $name;
            }
            return $nameScope->resolveStringName($name);
        };
        $errors = [];
        $className = $reflection->getName();
        $importedAliases = [];
        foreach ($phpDoc->getTypeAliasImportTags() as $typeAliasImportTag) {
            $aliasName = $typeAliasImportTag->getImportedAs() ?? $typeAliasImportTag->getImportedAlias();
            $importedAlias = $typeAliasImportTag->getImportedAlias();
            $importedFromClassName = $typeAliasImportTag->getImportedFrom();
            if (!$this->reflectionProvider->hasClass($importedFromClassName)) {
                $errors[] = RuleErrorBuilder::message(sprintf('Cannot import type alias %s: class %s does not exist.', $importedAlias, $importedFromClassName))->build();
                continue;
            }
            $importedFromReflection = $this->reflectionProvider->getClass($importedFromClassName);
            $typeAliases = $importedFromReflection->getTypeAliases();
            if (!array_key_exists($importedAlias, $typeAliases)) {
                $errors[] = RuleErrorBuilder::message(sprintf('Cannot import type alias %s: type alias does not exist in %s.', $importedAlias, $importedFromClassName))->build();
                continue;
            }
            $resolvedName = $resolveName($aliasName);
            if ($this->reflectionProvider->hasClass($resolveName($aliasName))) {
                $classReflection = $this->reflectionProvider->getClass($resolvedName);
                $classLikeDescription = 'a class';
                if ($classReflection->isInterface()) {
                    $classLikeDescription = 'an interface';
                } elseif ($classReflection->isTrait()) {
                    $classLikeDescription = 'a trait';
                } elseif ($classReflection->isEnum()) {
                    $classLikeDescription = 'an enum';
                }
                $errors[] = RuleErrorBuilder::message(sprintf('Type alias %s already exists as %s in scope of %s.', $aliasName, $classLikeDescription, $className))->build();
                continue;
            }
            if (array_key_exists($aliasName, $this->globalTypeAliases)) {
                $errors[] = RuleErrorBuilder::message(sprintf('Type alias %s already exists as a global type alias.', $aliasName))->build();
                continue;
            }
            $importedAs = $typeAliasImportTag->getImportedAs();
            if ($importedAs !== null && !$this->isAliasNameValid($importedAs, $nameScope)) {
                $errors[] = RuleErrorBuilder::message(sprintf('Imported type alias %s has an invalid name: %s.', $importedAlias, $importedAs))->build();
                continue;
            }
            $importedAliases[] = $aliasName;
        }
        foreach ($phpDoc->getTypeAliasTags() as $typeAliasTag) {
            $aliasName = $typeAliasTag->getAliasName();
            if (in_array($aliasName, $importedAliases, \true)) {
                $errors[] = RuleErrorBuilder::message(sprintf('Type alias %s overwrites an imported type alias of the same name.', $aliasName))->build();
                continue;
            }
            $resolvedName = $resolveName($aliasName);
            if ($this->reflectionProvider->hasClass($resolvedName)) {
                $classReflection = $this->reflectionProvider->getClass($resolvedName);
                $classLikeDescription = 'a class';
                if ($classReflection->isInterface()) {
                    $classLikeDescription = 'an interface';
                } elseif ($classReflection->isTrait()) {
                    $classLikeDescription = 'a trait';
                } elseif ($classReflection->isEnum()) {
                    $classLikeDescription = 'an enum';
                }
                $errors[] = RuleErrorBuilder::message(sprintf('Type alias %s already exists as %s in scope of %s.', $aliasName, $classLikeDescription, $className))->build();
                continue;
            }
            if (array_key_exists($aliasName, $this->globalTypeAliases)) {
                $errors[] = RuleErrorBuilder::message(sprintf('Type alias %s already exists as a global type alias.', $aliasName))->build();
                continue;
            }
            if (!$this->isAliasNameValid($aliasName, $nameScope)) {
                $errors[] = RuleErrorBuilder::message(sprintf('Type alias has an invalid name: %s.', $aliasName))->build();
                continue;
            }
            $resolvedType = $typeAliasTag->getTypeAlias()->resolve($this->typeNodeResolver);
            $foundError = \false;
            TypeTraverser::map($resolvedType, static function (Type $type, callable $traverse) use(&$errors, &$foundError, $aliasName) : Type {
                if ($foundError) {
                    return $type;
                }
                if ($type instanceof CircularTypeAliasErrorType) {
                    $errors[] = RuleErrorBuilder::message(sprintf('Circular definition detected in type alias %s.', $aliasName))->build();
                    $foundError = \true;
                    return $type;
                }
                if ($type instanceof ErrorType) {
                    $errors[] = RuleErrorBuilder::message(sprintf('Invalid type definition detected in type alias %s.', $aliasName))->build();
                    $foundError = \true;
                    return $type;
                }
                return $traverse($type);
            });
        }
        return $errors;
    }
    private function isAliasNameValid(string $aliasName, ?NameScope $nameScope) : bool
    {
        if ($nameScope === null) {
            return \true;
        }
        $aliasNameResolvedType = $this->typeNodeResolver->resolve(new IdentifierTypeNode($aliasName), $nameScope->bypassTypeAliases());
        return $aliasNameResolvedType->isObject()->yes() && !in_array($aliasName, ['self', 'parent'], \true) || $aliasNameResolvedType instanceof TemplateType;
        // aliases take precedence over type parameters, this is reported by other rules using TemplateTypeCheck
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Classes;

use PhpParser\Node;
use PhpParser\Node\Stmt\ClassConst;
use PhpParser\Node\Stmt\EnumCase;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InClassNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use function array_key_exists;
use function is_string;
use function sprintf;
use function strtolower;
/**
 * @implements Rule<InClassNode>
 */
class DuplicateDeclarationRule implements Rule
{
    public function getNodeType() : string
    {
        return InClassNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $classReflection = $scope->getClassReflection();
        if ($classReflection === null) {
            throw new ShouldNotHappenException();
        }
        $errors = [];
        $declaredClassConstantsOrEnumCases = [];
        foreach ($node->getOriginalNode()->stmts as $stmtNode) {
            if ($stmtNode instanceof EnumCase) {
                if (array_key_exists($stmtNode->name->name, $declaredClassConstantsOrEnumCases)) {
                    $errors[] = RuleErrorBuilder::message(sprintf('Cannot redeclare enum case %s::%s.', $classReflection->getDisplayName(), $stmtNode->name->name))->line($stmtNode->getLine())->nonIgnorable()->build();
                } else {
                    $declaredClassConstantsOrEnumCases[$stmtNode->name->name] = \true;
                }
            } elseif ($stmtNode instanceof ClassConst) {
                foreach ($stmtNode->consts as $classConstNode) {
                    if (array_key_exists($classConstNode->name->name, $declaredClassConstantsOrEnumCases)) {
                        $errors[] = RuleErrorBuilder::message(sprintf('Cannot redeclare constant %s::%s.', $classReflection->getDisplayName(), $classConstNode->name->name))->line($classConstNode->getLine())->nonIgnorable()->build();
                    } else {
                        $declaredClassConstantsOrEnumCases[$classConstNode->name->name] = \true;
                    }
                }
            }
        }
        $declaredProperties = [];
        foreach ($node->getOriginalNode()->getProperties() as $propertyDecl) {
            foreach ($propertyDecl->props as $property) {
                if (array_key_exists($property->name->name, $declaredProperties)) {
                    $errors[] = RuleErrorBuilder::message(sprintf('Cannot redeclare property %s::$%s.', $classReflection->getDisplayName(), $property->name->name))->line($property->getLine())->nonIgnorable()->build();
                } else {
                    $declaredProperties[$property->name->name] = \true;
                }
            }
        }
        $declaredFunctions = [];
        foreach ($node->getOriginalNode()->getMethods() as $method) {
            if ($method->name->toLowerString() === '__construct') {
                foreach ($method->params as $param) {
                    if ($param->flags === 0) {
                        continue;
                    }
                    if (!$param->var instanceof Node\Expr\Variable || !is_string($param->var->name)) {
                        throw new ShouldNotHappenException();
                    }
                    $propertyName = $param->var->name;
                    if (array_key_exists($propertyName, $declaredProperties)) {
                        $errors[] = RuleErrorBuilder::message(sprintf('Cannot redeclare property %s::$%s.', $classReflection->getDisplayName(), $propertyName))->line($param->getLine())->nonIgnorable()->build();
                    } else {
                        $declaredProperties[$propertyName] = \true;
                    }
                }
            }
            if (array_key_exists(strtolower($method->name->name), $declaredFunctions)) {
                $errors[] = RuleErrorBuilder::message(sprintf('Cannot redeclare method %s::%s().', $classReflection->getDisplayName(), $method->name->name))->line($method->getStartLine())->nonIgnorable()->build();
            } else {
                $declaredFunctions[strtolower($method->name->name)] = \true;
            }
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Classes;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\ClassCaseSensitivityCheck;
use PHPStan\Rules\ClassNameNodePair;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function array_map;
use function sprintf;
/**
 * @implements Rule<Node\Stmt\Class_>
 */
class ExistingClassesInClassImplementsRule implements Rule
{
    /**
     * @var \PHPStan\Rules\ClassCaseSensitivityCheck
     */
    private $classCaseSensitivityCheck;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(ClassCaseSensitivityCheck $classCaseSensitivityCheck, ReflectionProvider $reflectionProvider)
    {
        $this->classCaseSensitivityCheck = $classCaseSensitivityCheck;
        $this->reflectionProvider = $reflectionProvider;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\Class_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $messages = $this->classCaseSensitivityCheck->checkClassNames(array_map(static function (Node\Name $interfaceName) : ClassNameNodePair {
            return new ClassNameNodePair((string) $interfaceName, $interfaceName);
        }, $node->implements));
        $currentClassName = null;
        if (isset($node->namespacedName)) {
            $currentClassName = (string) $node->namespacedName;
        }
        foreach ($node->implements as $implements) {
            $implementedClassName = (string) $implements;
            if (!$this->reflectionProvider->hasClass($implementedClassName)) {
                if (!$scope->isInClassExists($implementedClassName)) {
                    $messages[] = RuleErrorBuilder::message(sprintf('%s implements unknown interface %s.', $currentClassName !== null ? sprintf('Class %s', $currentClassName) : 'Anonymous class', $implementedClassName))->nonIgnorable()->discoveringSymbolsTip()->build();
                }
            } else {
                $reflection = $this->reflectionProvider->getClass($implementedClassName);
                if ($reflection->isClass()) {
                    $messages[] = RuleErrorBuilder::message(sprintf('%s implements class %s.', $currentClassName !== null ? sprintf('Class %s', $currentClassName) : 'Anonymous class', $reflection->getDisplayName()))->nonIgnorable()->build();
                } elseif ($reflection->isTrait()) {
                    $messages[] = RuleErrorBuilder::message(sprintf('%s implements trait %s.', $currentClassName !== null ? sprintf('Class %s', $currentClassName) : 'Anonymous class', $reflection->getDisplayName()))->nonIgnorable()->build();
                } elseif ($reflection->isEnum()) {
                    $messages[] = RuleErrorBuilder::message(sprintf('%s implements enum %s.', $currentClassName !== null ? sprintf('Class %s', $currentClassName) : 'Anonymous class', $reflection->getDisplayName()))->nonIgnorable()->build();
                }
            }
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Classes;

use PhpParser\Node;
use PhpParser\Node\Expr\Instanceof_;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\ClassCaseSensitivityCheck;
use PHPStan\Rules\ClassNameNodePair;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\VerbosityLevel;
use function array_merge;
use function in_array;
use function sprintf;
use function strtolower;
/**
 * @implements Rule<Node\Expr\Instanceof_>
 */
class ExistingClassInInstanceOfRule implements Rule
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Rules\ClassCaseSensitivityCheck
     */
    private $classCaseSensitivityCheck;
    /**
     * @var bool
     */
    private $checkClassCaseSensitivity;
    public function __construct(ReflectionProvider $reflectionProvider, ClassCaseSensitivityCheck $classCaseSensitivityCheck, bool $checkClassCaseSensitivity)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->classCaseSensitivityCheck = $classCaseSensitivityCheck;
        $this->checkClassCaseSensitivity = $checkClassCaseSensitivity;
    }
    public function getNodeType() : string
    {
        return Instanceof_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $class = $node->class;
        if (!$class instanceof Node\Name) {
            return [];
        }
        $name = (string) $class;
        $lowercaseName = strtolower($name);
        if (in_array($lowercaseName, ['self', 'static', 'parent'], \true)) {
            if (!$scope->isInClass()) {
                return [RuleErrorBuilder::message(sprintf('Using %s outside of class scope.', $lowercaseName))->line($class->getLine())->build()];
            }
            return [];
        }
        $errors = [];
        if (!$this->reflectionProvider->hasClass($name)) {
            if ($scope->isInClassExists($name)) {
                return [];
            }
            return [RuleErrorBuilder::message(sprintf('Class %s not found.', $name))->line($class->getLine())->discoveringSymbolsTip()->build()];
        } elseif ($this->checkClassCaseSensitivity) {
            $errors = array_merge($errors, $this->classCaseSensitivityCheck->checkClassNames([new ClassNameNodePair($name, $class)]));
        }
        $classReflection = $this->reflectionProvider->getClass($name);
        if ($classReflection->isTrait()) {
            $expressionType = $scope->getType($node->expr);
            $errors[] = RuleErrorBuilder::message(sprintf('Instanceof between %s and trait %s will always evaluate to false.', $expressionType->describe(VerbosityLevel::typeOnly()), $name))->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Classes;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InClassNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use function sprintf;
/**
 * @implements Rule<InClassNode>
 */
class NonClassAttributeClassRule implements Rule
{
    public function getNodeType() : string
    {
        return InClassNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $originalNode = $node->getOriginalNode();
        foreach ($originalNode->attrGroups as $attrGroup) {
            foreach ($attrGroup->attrs as $attr) {
                $name = $attr->name->toLowerString();
                if ($name === 'attribute') {
                    return $this->check($scope);
                }
            }
        }
        return [];
    }
    /**
     * @return RuleError[]
     */
    private function check(Scope $scope) : array
    {
        if (!$scope->isInClass()) {
            throw new ShouldNotHappenException();
        }
        $classReflection = $scope->getClassReflection();
        if (!$classReflection->isClass()) {
            return [RuleErrorBuilder::message(sprintf('%s cannot be an Attribute class.', $classReflection->isInterface() ? 'Interface' : 'Enum'))->build()];
        }
        if ($classReflection->isAbstract()) {
            return [RuleErrorBuilder::message(sprintf('Abstract class %s cannot be an Attribute class.', $classReflection->getDisplayName()))->build()];
        }
        if (!$classReflection->hasConstructor()) {
            return [];
        }
        if (!$classReflection->getConstructor()->isPublic()) {
            return [RuleErrorBuilder::message(sprintf('Attribute class %s constructor must be public.', $classReflection->getDisplayName()))->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Classes;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\Php\PhpMethodReflection;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function strtolower;
/**
 * @implements Rule<Node\Expr\New_>
 */
class NewStaticRule implements Rule
{
    public function getNodeType() : string
    {
        return Node\Expr\New_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->class instanceof Node\Name) {
            return [];
        }
        if (!$scope->isInClass()) {
            return [];
        }
        if (strtolower($node->class->toString()) !== 'static') {
            return [];
        }
        $classReflection = $scope->getClassReflection();
        if ($classReflection->isFinal()) {
            return [];
        }
        $messages = [RuleErrorBuilder::message('Unsafe usage of new static().')->tip('See: https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static')->build()];
        if (!$classReflection->hasConstructor()) {
            return $messages;
        }
        $constructor = $classReflection->getConstructor();
        if ($constructor->getPrototype()->getDeclaringClass()->isInterface()) {
            return [];
        }
        if ($constructor->getDeclaringClass()->hasConsistentConstructor()) {
            return [];
        }
        foreach ($classReflection->getImmediateInterfaces() as $interface) {
            if ($interface->hasConstructor()) {
                return [];
            }
        }
        if ($constructor instanceof PhpMethodReflection) {
            if ($constructor->isFinal()->yes()) {
                return [];
            }
            $prototype = $constructor->getPrototype();
            if ($prototype->isAbstract()) {
                return [];
            }
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Classes;

use PhpParser\Node;
use PhpParser\Node\Expr\ClassConstFetch;
use PHPStan\Analyser\NullsafeOperatorHelper;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\ClassCaseSensitivityCheck;
use PHPStan\Rules\ClassNameNodePair;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\ErrorType;
use PHPStan\Type\StringType;
use PHPStan\Type\ThisType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\VerbosityLevel;
use function array_merge;
use function in_array;
use function sprintf;
use function strtolower;
/**
 * @implements Rule<Node\Expr\ClassConstFetch>
 */
class ClassConstantRule implements Rule
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    /**
     * @var \PHPStan\Rules\ClassCaseSensitivityCheck
     */
    private $classCaseSensitivityCheck;
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(ReflectionProvider $reflectionProvider, RuleLevelHelper $ruleLevelHelper, ClassCaseSensitivityCheck $classCaseSensitivityCheck, PhpVersion $phpVersion)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->ruleLevelHelper = $ruleLevelHelper;
        $this->classCaseSensitivityCheck = $classCaseSensitivityCheck;
        $this->phpVersion = $phpVersion;
    }
    public function getNodeType() : string
    {
        return ClassConstFetch::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->name instanceof Node\Identifier) {
            return [];
        }
        $constantName = $node->name->name;
        $class = $node->class;
        $messages = [];
        if ($class instanceof Node\Name) {
            $className = (string) $class;
            $lowercasedClassName = strtolower($className);
            if (in_array($lowercasedClassName, ['self', 'static'], \true)) {
                if (!$scope->isInClass()) {
                    return [RuleErrorBuilder::message(sprintf('Using %s outside of class scope.', $className))->build()];
                }
                $classType = $scope->resolveTypeByName($class);
            } elseif ($lowercasedClassName === 'parent') {
                if (!$scope->isInClass()) {
                    return [RuleErrorBuilder::message(sprintf('Using %s outside of class scope.', $className))->build()];
                }
                $currentClassReflection = $scope->getClassReflection();
                if ($currentClassReflection->getParentClass() === null) {
                    return [RuleErrorBuilder::message(sprintf('Access to parent::%s but %s does not extend any class.', $constantName, $currentClassReflection->getDisplayName()))->build()];
                }
                $classType = $scope->resolveTypeByName($class);
            } else {
                if (!$this->reflectionProvider->hasClass($className)) {
                    if ($scope->isInClassExists($className)) {
                        return [];
                    }
                    if (strtolower($constantName) === 'class') {
                        return [RuleErrorBuilder::message(sprintf('Class %s not found.', $className))->discoveringSymbolsTip()->build()];
                    }
                    return [RuleErrorBuilder::message(sprintf('Access to constant %s on an unknown class %s.', $constantName, $className))->discoveringSymbolsTip()->build()];
                }
                $messages = $this->classCaseSensitivityCheck->checkClassNames([new ClassNameNodePair($className, $class)]);
                $classType = $scope->resolveTypeByName($class);
            }
            if (strtolower($constantName) === 'class') {
                return $messages;
            }
        } else {
            $classTypeResult = $this->ruleLevelHelper->findTypeToCheck($scope, NullsafeOperatorHelper::getNullsafeShortcircuitedExprRespectingScope($scope, $class), sprintf('Access to constant %s on an unknown class %%s.', SprintfHelper::escapeFormatString($constantName)), static function (Type $type) use($constantName) : bool {
                return $type->canAccessConstants()->yes() && $type->hasConstant($constantName)->yes();
            });
            $classType = $classTypeResult->getType();
            if ($classType instanceof ErrorType) {
                return $classTypeResult->getUnknownClassErrors();
            }
            if (strtolower($constantName) === 'class') {
                if (!$this->phpVersion->supportsClassConstantOnExpression()) {
                    return [RuleErrorBuilder::message('Accessing ::class constant on an expression is supported only on PHP 8.0 and later.')->nonIgnorable()->build()];
                }
                if (!$class instanceof Node\Scalar\String_ && $classType->isString()->yes()) {
                    return [RuleErrorBuilder::message('Accessing ::class constant on a dynamic string is not supported in PHP.')->nonIgnorable()->build()];
                }
            }
        }
        if ($classType->isString()->yes()) {
            return $messages;
        }
        $typeForDescribe = $classType;
        if ($classType instanceof ThisType) {
            $typeForDescribe = $classType->getStaticObjectType();
        }
        $classType = TypeCombinator::remove($classType, new StringType());
        if (!$classType->canAccessConstants()->yes()) {
            return array_merge($messages, [RuleErrorBuilder::message(sprintf('Cannot access constant %s on %s.', $constantName, $typeForDescribe->describe(VerbosityLevel::typeOnly())))->build()]);
        }
        if (strtolower($constantName) === 'class' || $scope->hasExpressionType($node)->yes()) {
            return $messages;
        }
        if (!$classType->hasConstant($constantName)->yes()) {
            return array_merge($messages, [RuleErrorBuilder::message(sprintf('Access to undefined constant %s::%s.', $typeForDescribe->describe(VerbosityLevel::typeOnly()), $constantName))->build()]);
        }
        $constantReflection = $classType->getConstant($constantName);
        if (!$scope->canAccessConstant($constantReflection)) {
            return array_merge($messages, [RuleErrorBuilder::message(sprintf('Access to %s constant %s of class %s.', $constantReflection->isPrivate() ? 'private' : 'protected', $constantName, $constantReflection->getDeclaringClass()->getDisplayName()))->build()]);
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Classes;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InstantiationCallableNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
/**
 * @implements Rule<InstantiationCallableNode>
 */
class InstantiationCallableRule implements Rule
{
    public function getNodeType() : string
    {
        return InstantiationCallableNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        return [RuleErrorBuilder::message('Cannot create callable from the new operator.')->nonIgnorable()->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Classes;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\ClassCaseSensitivityCheck;
use PHPStan\Rules\ClassNameNodePair;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function array_map;
use function sprintf;
/**
 * @implements Rule<Node\Stmt\Enum_>
 */
class ExistingClassesInEnumImplementsRule implements Rule
{
    /**
     * @var \PHPStan\Rules\ClassCaseSensitivityCheck
     */
    private $classCaseSensitivityCheck;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(ClassCaseSensitivityCheck $classCaseSensitivityCheck, ReflectionProvider $reflectionProvider)
    {
        $this->classCaseSensitivityCheck = $classCaseSensitivityCheck;
        $this->reflectionProvider = $reflectionProvider;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\Enum_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $messages = $this->classCaseSensitivityCheck->checkClassNames(array_map(static function (Node\Name $interfaceName) : ClassNameNodePair {
            return new ClassNameNodePair((string) $interfaceName, $interfaceName);
        }, $node->implements));
        $currentEnumName = (string) $node->namespacedName;
        foreach ($node->implements as $implements) {
            $implementedClassName = (string) $implements;
            if (!$this->reflectionProvider->hasClass($implementedClassName)) {
                if (!$scope->isInClassExists($implementedClassName)) {
                    $messages[] = RuleErrorBuilder::message(sprintf('Enum %s implements unknown interface %s.', $currentEnumName, $implementedClassName))->nonIgnorable()->discoveringSymbolsTip()->build();
                }
            } else {
                $reflection = $this->reflectionProvider->getClass($implementedClassName);
                if ($reflection->isClass()) {
                    $messages[] = RuleErrorBuilder::message(sprintf('Enum %s implements class %s.', $currentEnumName, $reflection->getDisplayName()))->nonIgnorable()->build();
                } elseif ($reflection->isTrait()) {
                    $messages[] = RuleErrorBuilder::message(sprintf('Enum %s implements trait %s.', $currentEnumName, $reflection->getDisplayName()))->nonIgnorable()->build();
                } elseif ($reflection->isEnum()) {
                    $messages[] = RuleErrorBuilder::message(sprintf('Enum %s implements enum %s.', $currentEnumName, $reflection->getDisplayName()))->nonIgnorable()->build();
                }
            }
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules;

use Attribute;
use PhpParser\Node\AttributeGroup;
use PhpParser\Node\Expr\New_;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Reflection\ReflectionProvider;
use function array_key_exists;
use function count;
use function sprintf;
use function strtolower;
class AttributesCheck
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Rules\FunctionCallParametersCheck
     */
    private $functionCallParametersCheck;
    /**
     * @var \PHPStan\Rules\ClassCaseSensitivityCheck
     */
    private $classCaseSensitivityCheck;
    /**
     * @var bool
     */
    private $deprecationRulesInstalled;
    public function __construct(ReflectionProvider $reflectionProvider, \PHPStan\Rules\FunctionCallParametersCheck $functionCallParametersCheck, \PHPStan\Rules\ClassCaseSensitivityCheck $classCaseSensitivityCheck, bool $deprecationRulesInstalled)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->functionCallParametersCheck = $functionCallParametersCheck;
        $this->classCaseSensitivityCheck = $classCaseSensitivityCheck;
        $this->deprecationRulesInstalled = $deprecationRulesInstalled;
    }
    /**
     * @param AttributeGroup[] $attrGroups
     * @param Attribute::TARGET_* $requiredTarget
     * @return RuleError[]
     */
    public function check(Scope $scope, array $attrGroups, int $requiredTarget, string $targetName) : array
    {
        $errors = [];
        $alreadyPresent = [];
        foreach ($attrGroups as $attrGroup) {
            foreach ($attrGroup->attrs as $attribute) {
                $name = $attribute->name->toString();
                if (!$this->reflectionProvider->hasClass($name)) {
                    $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf('Attribute class %s does not exist.', $name))->line($attribute->getLine())->build();
                    continue;
                }
                $attributeClass = $this->reflectionProvider->getClass($name);
                if (!$attributeClass->isAttributeClass()) {
                    $classLikeDescription = 'Class';
                    if ($attributeClass->isInterface()) {
                        $classLikeDescription = 'Interface';
                    } elseif ($attributeClass->isTrait()) {
                        $classLikeDescription = 'Trait';
                    } elseif ($attributeClass->isEnum()) {
                        $classLikeDescription = 'Enum';
                    }
                    $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf('%s %s is not an Attribute class.', $classLikeDescription, $attributeClass->getDisplayName()))->line($attribute->getLine())->build();
                    continue;
                }
                if ($attributeClass->isAbstract()) {
                    $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf('Attribute class %s is abstract.', $name))->line($attribute->getLine())->build();
                }
                foreach ($this->classCaseSensitivityCheck->checkClassNames([new \PHPStan\Rules\ClassNameNodePair($name, $attribute)]) as $caseSensitivityError) {
                    $errors[] = $caseSensitivityError;
                }
                $flags = $attributeClass->getAttributeClassFlags();
                if (($flags & $requiredTarget) === 0) {
                    $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf('Attribute class %s does not have the %s target.', $name, $targetName))->line($attribute->getLine())->build();
                }
                if (($flags & Attribute::IS_REPEATABLE) === 0) {
                    $loweredName = strtolower($name);
                    if (array_key_exists($loweredName, $alreadyPresent)) {
                        $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf('Attribute class %s is not repeatable but is already present above the %s.', $name, $targetName))->line($attribute->getLine())->build();
                    }
                    $alreadyPresent[$loweredName] = \true;
                }
                if ($this->deprecationRulesInstalled && $attributeClass->isDeprecated()) {
                    if ($attributeClass->getDeprecatedDescription() !== null) {
                        $deprecatedError = sprintf('Attribute class %s is deprecated: %s', $name, $attributeClass->getDeprecatedDescription());
                    } else {
                        $deprecatedError = sprintf('Attribute class %s is deprecated.', $name);
                    }
                    $errors[] = \PHPStan\Rules\RuleErrorBuilder::message($deprecatedError)->line($attribute->getLine())->build();
                }
                if (!$attributeClass->hasConstructor()) {
                    if (count($attribute->args) > 0) {
                        $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf('Attribute class %s does not have a constructor and must be instantiated without any parameters.', $name))->line($attribute->getLine())->build();
                    }
                    continue;
                }
                $attributeConstructor = $attributeClass->getConstructor();
                if (!$attributeConstructor->isPublic()) {
                    $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf('Constructor of attribute class %s is not public.', $name))->line($attribute->getLine())->build();
                }
                $attributeClassName = SprintfHelper::escapeFormatString($attributeClass->getDisplayName());
                $nodeAttributes = $attribute->getAttributes();
                $nodeAttributes['isAttribute'] = \true;
                $parameterErrors = $this->functionCallParametersCheck->check(ParametersAcceptorSelector::selectFromArgs($scope, $attribute->args, $attributeConstructor->getVariants()), $scope, $attributeConstructor->getDeclaringClass()->isBuiltin(), new New_($attribute->name, $attribute->args, $nodeAttributes), [
                    'Attribute class ' . $attributeClassName . ' constructor invoked with %d parameter, %d required.',
                    'Attribute class ' . $attributeClassName . ' constructor invoked with %d parameters, %d required.',
                    'Attribute class ' . $attributeClassName . ' constructor invoked with %d parameter, at least %d required.',
                    'Attribute class ' . $attributeClassName . ' constructor invoked with %d parameters, at least %d required.',
                    'Attribute class ' . $attributeClassName . ' constructor invoked with %d parameter, %d-%d required.',
                    'Attribute class ' . $attributeClassName . ' constructor invoked with %d parameters, %d-%d required.',
                    'Parameter %s of attribute class ' . $attributeClassName . ' constructor expects %s, %s given.',
                    '',
                    // constructor does not have a return type
                    'Parameter %s of attribute class ' . $attributeClassName . ' constructor is passed by reference, so it expects variables only',
                    'Unable to resolve the template type %s in instantiation of attribute class ' . $attributeClassName,
                    'Missing parameter $%s in call to ' . $attributeClassName . ' constructor.',
                    'Unknown parameter $%s in call to ' . $attributeClassName . ' constructor.',
                    'Return type of call to ' . $attributeClassName . ' constructor contains unresolvable type.',
                    'Parameter %s of attribute class ' . $attributeClassName . ' constructor contains unresolvable type.',
                ]);
                foreach ($parameterErrors as $error) {
                    $errors[] = $error;
                }
            }
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Generators;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\IntegerType;
use PHPStan\Type\MixedType;
use PHPStan\Type\NullType;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<Node\Expr\Yield_>
 */
class YieldTypeRule implements Rule
{
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    public function __construct(RuleLevelHelper $ruleLevelHelper)
    {
        $this->ruleLevelHelper = $ruleLevelHelper;
    }
    public function getNodeType() : string
    {
        return Node\Expr\Yield_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $anonymousFunctionReturnType = $scope->getAnonymousFunctionReturnType();
        $scopeFunction = $scope->getFunction();
        if ($anonymousFunctionReturnType !== null) {
            $returnType = $anonymousFunctionReturnType;
        } elseif ($scopeFunction !== null) {
            $returnType = ParametersAcceptorSelector::selectSingle($scopeFunction->getVariants())->getReturnType();
        } else {
            return [];
            // already reported by YieldInGeneratorRule
        }
        if ($returnType instanceof MixedType) {
            return [];
        }
        if ($node->key === null) {
            $keyType = new IntegerType();
        } else {
            $keyType = $scope->getType($node->key);
        }
        $messages = [];
        $acceptsKey = $this->ruleLevelHelper->acceptsWithReason($returnType->getIterableKeyType(), $keyType, $scope->isDeclareStrictTypes());
        if (!$acceptsKey->result) {
            $verbosityLevel = VerbosityLevel::getRecommendedLevelByType($returnType->getIterableKeyType(), $keyType);
            $messages[] = RuleErrorBuilder::message(sprintf('Generator expects key type %s, %s given.', $returnType->getIterableKeyType()->describe($verbosityLevel), $keyType->describe($verbosityLevel)))->acceptsReasonsTip($acceptsKey->reasons)->build();
        }
        if ($node->value === null) {
            $valueType = new NullType();
        } else {
            $valueType = $scope->getType($node->value);
        }
        $acceptsValue = $this->ruleLevelHelper->acceptsWithReason($returnType->getIterableValueType(), $valueType, $scope->isDeclareStrictTypes());
        if (!$acceptsValue->result) {
            $verbosityLevel = VerbosityLevel::getRecommendedLevelByType($returnType->getIterableValueType(), $valueType);
            $messages[] = RuleErrorBuilder::message(sprintf('Generator expects value type %s, %s given.', $returnType->getIterableValueType()->describe($verbosityLevel), $valueType->describe($verbosityLevel)))->acceptsReasonsTip($acceptsValue->reasons)->build();
        }
        if (!$scope->isInFirstLevelStatement() && $scope->getType($node)->isVoid()->yes()) {
            $messages[] = RuleErrorBuilder::message('Result of yield (void) is used.')->build();
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Generators;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\TrinaryLogic;
use PHPStan\Type\MixedType;
use PHPStan\Type\NeverType;
use function sprintf;
/**
 * @implements Rule<Node\Expr>
 */
class YieldInGeneratorRule implements Rule
{
    /**
     * @var bool
     */
    private $reportMaybes;
    public function __construct(bool $reportMaybes)
    {
        $this->reportMaybes = $reportMaybes;
    }
    public function getNodeType() : string
    {
        return Node\Expr::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node instanceof Node\Expr\Yield_ && !$node instanceof Node\Expr\YieldFrom) {
            return [];
        }
        $anonymousFunctionReturnType = $scope->getAnonymousFunctionReturnType();
        $scopeFunction = $scope->getFunction();
        if ($anonymousFunctionReturnType !== null) {
            $returnType = $anonymousFunctionReturnType;
        } elseif ($scopeFunction !== null) {
            $returnType = ParametersAcceptorSelector::selectSingle($scopeFunction->getVariants())->getReturnType();
        } else {
            return [RuleErrorBuilder::message('Yield can be used only inside a function.')->build()];
        }
        if ($returnType instanceof MixedType) {
            return [];
        }
        if ($returnType instanceof NeverType && $returnType->isExplicit()) {
            $isSuperType = TrinaryLogic::createNo();
        } else {
            $isSuperType = $returnType->isIterable()->and(TrinaryLogic::createFromBoolean(!$returnType->isArray()->yes()));
        }
        if ($isSuperType->yes()) {
            return [];
        }
        if ($isSuperType->maybe() && !$this->reportMaybes) {
            return [];
        }
        return [RuleErrorBuilder::message(sprintf('Yield can be used only with these return types: %s.', 'Generator, Iterator, Traversable, iterable'))->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Generators;

use Generator;
use PhpParser\Node;
use PhpParser\Node\Expr\YieldFrom;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\ErrorType;
use PHPStan\Type\MixedType;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<Node\Expr\YieldFrom>
 */
class YieldFromTypeRule implements Rule
{
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    /**
     * @var bool
     */
    private $reportMaybes;
    public function __construct(RuleLevelHelper $ruleLevelHelper, bool $reportMaybes)
    {
        $this->ruleLevelHelper = $ruleLevelHelper;
        $this->reportMaybes = $reportMaybes;
    }
    public function getNodeType() : string
    {
        return YieldFrom::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $exprType = $scope->getType($node->expr);
        $isIterable = $exprType->isIterable();
        $messagePattern = 'Argument of an invalid type %s passed to yield from, only iterables are supported.';
        if ($isIterable->no()) {
            return [RuleErrorBuilder::message(sprintf($messagePattern, $exprType->describe(VerbosityLevel::typeOnly())))->line($node->expr->getLine())->build()];
        } elseif (!$exprType instanceof MixedType && $this->reportMaybes && $isIterable->maybe()) {
            return [RuleErrorBuilder::message(sprintf($messagePattern, $exprType->describe(VerbosityLevel::typeOnly())))->line($node->expr->getLine())->build()];
        }
        $anonymousFunctionReturnType = $scope->getAnonymousFunctionReturnType();
        $scopeFunction = $scope->getFunction();
        if ($anonymousFunctionReturnType !== null) {
            $returnType = $anonymousFunctionReturnType;
        } elseif ($scopeFunction !== null) {
            $returnType = ParametersAcceptorSelector::selectSingle($scopeFunction->getVariants())->getReturnType();
        } else {
            return [];
            // already reported by YieldInGeneratorRule
        }
        if ($returnType instanceof MixedType) {
            return [];
        }
        $messages = [];
        $acceptsKey = $this->ruleLevelHelper->acceptsWithReason($returnType->getIterableKeyType(), $exprType->getIterableKeyType(), $scope->isDeclareStrictTypes());
        if (!$acceptsKey->result) {
            $verbosityLevel = VerbosityLevel::getRecommendedLevelByType($returnType->getIterableKeyType(), $exprType->getIterableKeyType());
            $messages[] = RuleErrorBuilder::message(sprintf('Generator expects key type %s, %s given.', $returnType->getIterableKeyType()->describe($verbosityLevel), $exprType->getIterableKeyType()->describe($verbosityLevel)))->line($node->expr->getLine())->acceptsReasonsTip($acceptsKey->reasons)->build();
        }
        $acceptsValue = $this->ruleLevelHelper->acceptsWithReason($returnType->getIterableValueType(), $exprType->getIterableValueType(), $scope->isDeclareStrictTypes());
        if (!$acceptsValue->result) {
            $verbosityLevel = VerbosityLevel::getRecommendedLevelByType($returnType->getIterableValueType(), $exprType->getIterableValueType());
            $messages[] = RuleErrorBuilder::message(sprintf('Generator expects value type %s, %s given.', $returnType->getIterableValueType()->describe($verbosityLevel), $exprType->getIterableValueType()->describe($verbosityLevel)))->line($node->expr->getLine())->acceptsReasonsTip($acceptsValue->reasons)->build();
        }
        $scopeFunction = $scope->getFunction();
        if ($scopeFunction === null) {
            return $messages;
        }
        $currentReturnType = ParametersAcceptorSelector::selectSingle($scopeFunction->getVariants())->getReturnType();
        $exprSendType = $exprType->getTemplateType(Generator::class, 'TSend');
        $thisSendType = $currentReturnType->getTemplateType(Generator::class, 'TSend');
        if ($exprSendType instanceof ErrorType || $thisSendType instanceof ErrorType) {
            return $messages;
        }
        $isSuperType = $exprSendType->isSuperTypeOf($thisSendType);
        if ($isSuperType->no()) {
            $messages[] = RuleErrorBuilder::message(sprintf('Generator expects delegated TSend type %s, %s given.', $exprSendType->describe(VerbosityLevel::typeOnly()), $thisSendType->describe(VerbosityLevel::typeOnly())))->build();
        } elseif ($this->reportMaybes && !$isSuperType->yes()) {
            $messages[] = RuleErrorBuilder::message(sprintf('Generator expects delegated TSend type %s, %s given.', $exprSendType->describe(VerbosityLevel::typeOnly()), $thisSendType->describe(VerbosityLevel::typeOnly())))->build();
        }
        if (!$scope->isInFirstLevelStatement() && $scope->getType($node)->isVoid()->yes()) {
            $messages[] = RuleErrorBuilder::message('Result of yield from (void) is used.')->build();
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules;

/** @api */
interface RuleError
{
    public function getMessage() : string;
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\PhpDoc;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Node\ClassPropertyNode;
use PHPStan\Rules\Generics\GenericObjectTypeCheck;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Generic\TemplateType;
use PHPStan\Type\ParserNodeTypeToPHPStanType;
use PHPStan\Type\VerbosityLevel;
use function array_merge;
use function sprintf;
/**
 * @implements Rule<ClassPropertyNode>
 */
class IncompatiblePropertyPhpDocTypeRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Generics\GenericObjectTypeCheck
     */
    private $genericObjectTypeCheck;
    /**
     * @var \PHPStan\Rules\PhpDoc\UnresolvableTypeHelper
     */
    private $unresolvableTypeHelper;
    public function __construct(GenericObjectTypeCheck $genericObjectTypeCheck, \PHPStan\Rules\PhpDoc\UnresolvableTypeHelper $unresolvableTypeHelper)
    {
        $this->genericObjectTypeCheck = $genericObjectTypeCheck;
        $this->unresolvableTypeHelper = $unresolvableTypeHelper;
    }
    public function getNodeType() : string
    {
        return ClassPropertyNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$scope->isInClass()) {
            throw new ShouldNotHappenException();
        }
        $propertyName = $node->getName();
        $phpDocType = $node->getPhpDocType();
        if ($phpDocType === null) {
            return [];
        }
        $description = 'PHPDoc tag @var';
        if ($node->isPromoted()) {
            $description = 'PHPDoc type';
        }
        $messages = [];
        if ($this->unresolvableTypeHelper->containsUnresolvableType($phpDocType)) {
            $messages[] = RuleErrorBuilder::message(sprintf('%s for property %s::$%s contains unresolvable type.', $description, $scope->getClassReflection()->getDisplayName(), $propertyName))->build();
        }
        $nativeType = ParserNodeTypeToPHPStanType::resolve($node->getNativeType(), $scope->getClassReflection());
        $isSuperType = $nativeType->isSuperTypeOf($phpDocType);
        if ($isSuperType->no()) {
            $messages[] = RuleErrorBuilder::message(sprintf('%s for property %s::$%s with type %s is incompatible with native type %s.', $description, $scope->getClassReflection()->getDisplayName(), $propertyName, $phpDocType->describe(VerbosityLevel::typeOnly()), $nativeType->describe(VerbosityLevel::typeOnly())))->build();
        } elseif ($isSuperType->maybe()) {
            $errorBuilder = RuleErrorBuilder::message(sprintf('%s for property %s::$%s with type %s is not subtype of native type %s.', $description, $scope->getClassReflection()->getDisplayName(), $propertyName, $phpDocType->describe(VerbosityLevel::typeOnly()), $nativeType->describe(VerbosityLevel::typeOnly())));
            if ($phpDocType instanceof TemplateType) {
                $errorBuilder->tip(sprintf('Write @template %s of %s to fix this.', $phpDocType->getName(), $nativeType->describe(VerbosityLevel::typeOnly())));
            }
            $messages[] = $errorBuilder->build();
        }
        $className = SprintfHelper::escapeFormatString($scope->getClassReflection()->getDisplayName());
        $escapedPropertyName = SprintfHelper::escapeFormatString($propertyName);
        $messages = array_merge($messages, $this->genericObjectTypeCheck->check($phpDocType, sprintf('%s for property %s::$%s contains generic type %%s but %%s %%s is not generic.', $description, $className, $escapedPropertyName), sprintf('Generic type %%s in %s for property %s::$%s does not specify all template types of %%s %%s: %%s', $description, $className, $escapedPropertyName), sprintf('Generic type %%s in %s for property %s::$%s specifies %%d template types, but %%s %%s supports only %%d: %%s', $description, $className, $escapedPropertyName), sprintf('Type %%s in generic type %%s in %s for property %s::$%s is not subtype of template type %%s of %%s %%s.', $description, $className, $escapedPropertyName)));
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\PhpDoc;

use PhpParser\Node;
use PhpParser\Node\Expr\Variable;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\PhpDoc\Tag\ParamOutTag;
use PHPStan\PhpDoc\Tag\ParamTag;
use PHPStan\Rules\Generics\GenericObjectTypeCheck;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\FileTypeMapper;
use PHPStan\Type\Generic\TemplateType;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use function array_merge;
use function is_string;
use function sprintf;
use function trim;
/**
 * @implements Rule<Node\FunctionLike>
 */
class IncompatiblePhpDocTypeRule implements Rule
{
    /**
     * @var \PHPStan\Type\FileTypeMapper
     */
    private $fileTypeMapper;
    /**
     * @var \PHPStan\Rules\Generics\GenericObjectTypeCheck
     */
    private $genericObjectTypeCheck;
    /**
     * @var \PHPStan\Rules\PhpDoc\UnresolvableTypeHelper
     */
    private $unresolvableTypeHelper;
    public function __construct(FileTypeMapper $fileTypeMapper, GenericObjectTypeCheck $genericObjectTypeCheck, \PHPStan\Rules\PhpDoc\UnresolvableTypeHelper $unresolvableTypeHelper)
    {
        $this->fileTypeMapper = $fileTypeMapper;
        $this->genericObjectTypeCheck = $genericObjectTypeCheck;
        $this->unresolvableTypeHelper = $unresolvableTypeHelper;
    }
    public function getNodeType() : string
    {
        return Node\FunctionLike::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $docComment = $node->getDocComment();
        if ($docComment === null) {
            return [];
        }
        if ($node instanceof Node\Stmt\ClassMethod) {
            $functionName = $node->name->name;
        } elseif ($node instanceof Node\Stmt\Function_) {
            $functionName = trim($scope->getNamespace() . '\\' . $node->name->name, '\\');
        } else {
            return [];
        }
        $resolvedPhpDoc = $this->fileTypeMapper->getResolvedPhpDoc($scope->getFile(), $scope->isInClass() ? $scope->getClassReflection()->getName() : null, $scope->isInTrait() ? $scope->getTraitReflection()->getName() : null, $functionName, $docComment->getText());
        $nativeParameterTypes = $this->getNativeParameterTypes($node, $scope);
        $nativeReturnType = $this->getNativeReturnType($node, $scope);
        $byRefParameters = $this->getByRefParameters($node);
        $errors = [];
        foreach ([$resolvedPhpDoc->getParamTags(), $resolvedPhpDoc->getParamOutTags()] as $parameters) {
            foreach ($parameters as $parameterName => $phpDocParamTag) {
                $phpDocParamType = $phpDocParamTag->getType();
                $tagName = $phpDocParamTag instanceof ParamTag ? '@param' : '@param-out';
                if (!isset($nativeParameterTypes[$parameterName])) {
                    $errors[] = RuleErrorBuilder::message(sprintf('PHPDoc tag %s references unknown parameter: $%s', $tagName, $parameterName))->identifier('phpDoc.unknownParameter')->metadata(['parameterName' => $parameterName])->build();
                } elseif ($this->unresolvableTypeHelper->containsUnresolvableType($phpDocParamType)) {
                    $errors[] = RuleErrorBuilder::message(sprintf('PHPDoc tag %s for parameter $%s contains unresolvable type.', $tagName, $parameterName))->build();
                } else {
                    $nativeParamType = $nativeParameterTypes[$parameterName];
                    if ($phpDocParamTag instanceof ParamTag && $phpDocParamTag->isVariadic() && $phpDocParamType->isArray()->yes() && $nativeParamType->isArray()->no()) {
                        $phpDocParamType = $phpDocParamType->getIterableValueType();
                    }
                    $isParamSuperType = $nativeParamType->isSuperTypeOf($phpDocParamType);
                    $escapedParameterName = SprintfHelper::escapeFormatString($parameterName);
                    $escapedTagName = SprintfHelper::escapeFormatString($tagName);
                    $errors = array_merge($errors, $this->genericObjectTypeCheck->check($phpDocParamType, sprintf('PHPDoc tag %s for parameter $%s contains generic type %%s but %%s %%s is not generic.', $escapedTagName, $escapedParameterName), sprintf('Generic type %%s in PHPDoc tag %s for parameter $%s does not specify all template types of %%s %%s: %%s', $escapedTagName, $escapedParameterName), sprintf('Generic type %%s in PHPDoc tag %s for parameter $%s specifies %%d template types, but %%s %%s supports only %%d: %%s', $escapedTagName, $escapedParameterName), sprintf('Type %%s in generic type %%s in PHPDoc tag %s for parameter $%s is not subtype of template type %%s of %%s %%s.', $escapedTagName, $escapedParameterName)));
                    if ($phpDocParamTag instanceof ParamOutTag) {
                        if (!$byRefParameters[$parameterName]) {
                            $errors[] = RuleErrorBuilder::message(sprintf('Parameter $%s for PHPDoc tag %s is not passed by reference.', $parameterName, $tagName))->build();
                        }
                        continue;
                    }
                    if ($isParamSuperType->no()) {
                        $errors[] = RuleErrorBuilder::message(sprintf('PHPDoc tag %s for parameter $%s with type %s is incompatible with native type %s.', $tagName, $parameterName, $phpDocParamType->describe(VerbosityLevel::typeOnly()), $nativeParamType->describe(VerbosityLevel::typeOnly())))->build();
                    } elseif ($isParamSuperType->maybe()) {
                        $errorBuilder = RuleErrorBuilder::message(sprintf('PHPDoc tag %s for parameter $%s with type %s is not subtype of native type %s.', $tagName, $parameterName, $phpDocParamType->describe(VerbosityLevel::typeOnly()), $nativeParamType->describe(VerbosityLevel::typeOnly())));
                        if ($phpDocParamType instanceof TemplateType) {
                            $errorBuilder->tip(sprintf('Write @template %s of %s to fix this.', $phpDocParamType->getName(), $nativeParamType->describe(VerbosityLevel::typeOnly())));
                        }
                        $errors[] = $errorBuilder->build();
                    }
                }
            }
        }
        if ($resolvedPhpDoc->getReturnTag() !== null) {
            $phpDocReturnType = $resolvedPhpDoc->getReturnTag()->getType();
            if ($this->unresolvableTypeHelper->containsUnresolvableType($phpDocReturnType)) {
                $errors[] = RuleErrorBuilder::message('PHPDoc tag @return contains unresolvable type.')->build();
            } else {
                $isReturnSuperType = $nativeReturnType->isSuperTypeOf($phpDocReturnType);
                $errors = array_merge($errors, $this->genericObjectTypeCheck->check($phpDocReturnType, 'PHPDoc tag @return contains generic type %s but %s %s is not generic.', 'Generic type %s in PHPDoc tag @return does not specify all template types of %s %s: %s', 'Generic type %s in PHPDoc tag @return specifies %d template types, but %s %s supports only %d: %s', 'Type %s in generic type %s in PHPDoc tag @return is not subtype of template type %s of %s %s.'));
                if ($isReturnSuperType->no()) {
                    $errors[] = RuleErrorBuilder::message(sprintf('PHPDoc tag @return with type %s is incompatible with native type %s.', $phpDocReturnType->describe(VerbosityLevel::typeOnly()), $nativeReturnType->describe(VerbosityLevel::typeOnly())))->build();
                } elseif ($isReturnSuperType->maybe()) {
                    $errorBuilder = RuleErrorBuilder::message(sprintf('PHPDoc tag @return with type %s is not subtype of native type %s.', $phpDocReturnType->describe(VerbosityLevel::typeOnly()), $nativeReturnType->describe(VerbosityLevel::typeOnly())));
                    if ($phpDocReturnType instanceof TemplateType) {
                        $errorBuilder->tip(sprintf('Write @template %s of %s to fix this.', $phpDocReturnType->getName(), $nativeReturnType->describe(VerbosityLevel::typeOnly())));
                    }
                    $errors[] = $errorBuilder->build();
                }
            }
        }
        return $errors;
    }
    /**
     * @return Type[]
     */
    private function getNativeParameterTypes(Node\FunctionLike $node, Scope $scope) : array
    {
        $nativeParameterTypes = [];
        foreach ($node->getParams() as $parameter) {
            $isNullable = $scope->isParameterValueNullable($parameter);
            if (!$parameter->var instanceof Variable || !is_string($parameter->var->name)) {
                throw new ShouldNotHappenException();
            }
            $nativeParameterTypes[$parameter->var->name] = $scope->getFunctionType($parameter->type, $isNullable, \false);
        }
        return $nativeParameterTypes;
    }
    /**
     * @return array<string, bool>
     */
    private function getByRefParameters(Node\FunctionLike $node) : array
    {
        $nativeParameterTypes = [];
        foreach ($node->getParams() as $parameter) {
            if (!$parameter->var instanceof Variable || !is_string($parameter->var->name)) {
                throw new ShouldNotHappenException();
            }
            $nativeParameterTypes[$parameter->var->name] = $parameter->byRef;
        }
        return $nativeParameterTypes;
    }
    private function getNativeReturnType(Node\FunctionLike $node, Scope $scope) : Type
    {
        return $scope->getFunctionType($node->getReturnType(), \false, \false);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\PhpDoc;

use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\ConditionalType;
use PHPStan\Type\ConditionalTypeForParameter;
use PHPStan\Type\Generic\TemplateType;
use PHPStan\Type\StaticType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeTraverser;
use PHPStan\Type\VerbosityLevel;
use function array_key_exists;
use function count;
use function sprintf;
use function substr;
class ConditionalReturnTypeRuleHelper
{
    /**
     * @return RuleError[]
     */
    public function check(ParametersAcceptor $acceptor) : array
    {
        $conditionalTypes = [];
        $parametersByName = [];
        foreach ($acceptor->getParameters() as $parameter) {
            TypeTraverser::map($parameter->getType(), static function (Type $type, callable $traverse) use(&$conditionalTypes) : Type {
                if ($type instanceof ConditionalType || $type instanceof ConditionalTypeForParameter) {
                    $conditionalTypes[] = $type;
                }
                return $traverse($type);
            });
            $parametersByName[$parameter->getName()] = $parameter;
        }
        TypeTraverser::map($acceptor->getReturnType(), static function (Type $type, callable $traverse) use(&$conditionalTypes) : Type {
            if ($type instanceof ConditionalType || $type instanceof ConditionalTypeForParameter) {
                $conditionalTypes[] = $type;
            }
            return $traverse($type);
        });
        $errors = [];
        foreach ($conditionalTypes as $conditionalType) {
            if ($conditionalType instanceof ConditionalType) {
                $subjectType = $conditionalType->getSubject();
                if ($subjectType instanceof StaticType) {
                    continue;
                }
                $templateTypes = [];
                TypeTraverser::map($subjectType, static function (Type $type, callable $traverse) use(&$templateTypes) : Type {
                    if ($type instanceof TemplateType) {
                        $templateTypes[] = $type;
                        return $type;
                    }
                    return $traverse($type);
                });
                if (count($templateTypes) === 0) {
                    $errors[] = RuleErrorBuilder::message(sprintf('Conditional return type uses subject type %s which is not part of PHPDoc @template tags.', $subjectType->describe(VerbosityLevel::typeOnly())))->build();
                    continue;
                }
            } else {
                $parameterName = substr($conditionalType->getParameterName(), 1);
                if (!array_key_exists($parameterName, $parametersByName)) {
                    $errors[] = RuleErrorBuilder::message(sprintf('Conditional return type references unknown parameter $%s.', $parameterName))->build();
                    continue;
                }
                $subjectType = $parametersByName[$parameterName]->getType();
            }
            $targetType = $conditionalType->getTarget();
            $isTargetSuperType = $targetType->isSuperTypeOf($subjectType);
            if ($isTargetSuperType->maybe()) {
                continue;
            }
            $verbosity = VerbosityLevel::getRecommendedLevelByType($subjectType, $targetType);
            $errors[] = RuleErrorBuilder::message(sprintf('Condition "%s" in conditional return type is always %s.', sprintf('%s %s %s', $subjectType->describe($verbosity), $conditionalType->isNegated() ? 'is not' : 'is', $targetType->describe($verbosity)), $conditionalType->isNegated() ? $isTargetSuperType->yes() ? 'false' : 'true' : ($isTargetSuperType->yes() ? 'true' : 'false')))->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\PhpDoc;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\VarTagChangedExpressionTypeNode;
use PHPStan\Rules\Rule;
/**
 * @implements Rule<VarTagChangedExpressionTypeNode>
 */
class VarTagChangedExpressionTypeRule implements Rule
{
    /**
     * @var \PHPStan\Rules\PhpDoc\VarTagTypeRuleHelper
     */
    private $varTagTypeRuleHelper;
    public function __construct(\PHPStan\Rules\PhpDoc\VarTagTypeRuleHelper $varTagTypeRuleHelper)
    {
        $this->varTagTypeRuleHelper = $varTagTypeRuleHelper;
    }
    public function getNodeType() : string
    {
        return VarTagChangedExpressionTypeNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        return $this->varTagTypeRuleHelper->checkExprType($scope, $node->getExpr(), $node->getVarTag()->getType());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\PhpDoc;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InClassMethodNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\ObjectType;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<InClassMethodNode>
 */
class IncompatibleSelfOutTypeRule implements Rule
{
    public function getNodeType() : string
    {
        return InClassMethodNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $method = $node->getMethodReflection();
        $selfOutType = $method->getSelfOutType();
        if ($selfOutType === null) {
            return [];
        }
        $classReflection = $method->getDeclaringClass();
        $classType = new ObjectType($classReflection->getName(), null, $classReflection);
        if ($classType->isSuperTypeOf($selfOutType)->yes()) {
            return [];
        }
        return [RuleErrorBuilder::message(sprintf('Self-out type %s of method %s::%s is not subtype of %s.', $selfOutType->describe(VerbosityLevel::precise()), $classReflection->getName(), $method->getName(), $classType->describe(VerbosityLevel::precise())))->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\PhpDoc;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InFunctionNode;
use PHPStan\Rules\Rule;
use function count;
/**
 * @implements Rule<InFunctionNode>
 */
class FunctionAssertRule implements Rule
{
    /**
     * @var \PHPStan\Rules\PhpDoc\AssertRuleHelper
     */
    private $helper;
    public function __construct(\PHPStan\Rules\PhpDoc\AssertRuleHelper $helper)
    {
        $this->helper = $helper;
    }
    public function getNodeType() : string
    {
        return InFunctionNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $function = $node->getFunctionReflection();
        $variants = $function->getVariants();
        if (count($variants) !== 1) {
            return [];
        }
        return $this->helper->check($function, $variants[0]);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\PhpDoc;

use _PHPStan_dcc7b7cff\Nette\Utils\Strings;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\VirtualNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\InvalidTagValueNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\TypeAliasTagValueNode;
use PHPStan\PhpDocParser\Ast\Type\InvalidTypeNode;
use PHPStan\PhpDocParser\Lexer\Lexer;
use PHPStan\PhpDocParser\Parser\PhpDocParser;
use PHPStan\PhpDocParser\Parser\TokenIterator;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function sprintf;
use function strpos;
/**
 * @implements Rule<Node>
 */
class InvalidPhpDocTagValueRule implements Rule
{
    /**
     * @var \PHPStan\PhpDocParser\Lexer\Lexer
     */
    private $phpDocLexer;
    /**
     * @var \PHPStan\PhpDocParser\Parser\PhpDocParser
     */
    private $phpDocParser;
    /**
     * @var bool
     */
    private $checkAllInvalidPhpDocs;
    /**
     * @var bool
     */
    private $invalidPhpDocTagLine;
    public function __construct(Lexer $phpDocLexer, PhpDocParser $phpDocParser, bool $checkAllInvalidPhpDocs, bool $invalidPhpDocTagLine)
    {
        $this->phpDocLexer = $phpDocLexer;
        $this->phpDocParser = $phpDocParser;
        $this->checkAllInvalidPhpDocs = $checkAllInvalidPhpDocs;
        $this->invalidPhpDocTagLine = $invalidPhpDocTagLine;
    }
    public function getNodeType() : string
    {
        return Node::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$this->checkAllInvalidPhpDocs) {
            if (!$node instanceof Node\Stmt\ClassLike && !$node instanceof Node\FunctionLike && !$node instanceof Node\Stmt\Foreach_ && !$node instanceof Node\Stmt\Property && !$node instanceof Node\Expr\Assign && !$node instanceof Node\Expr\AssignRef && !$node instanceof Node\Stmt\ClassConst) {
                return [];
            }
        } else {
            // mirrored with InvalidPHPStanDocTagRule
            if ($node instanceof VirtualNode) {
                return [];
            }
            if ($node instanceof Node\Stmt\Expression) {
                return [];
            }
            if ($node instanceof Node\Expr && !$node instanceof Node\Expr\Assign && !$node instanceof Node\Expr\AssignRef) {
                return [];
            }
        }
        $docComment = $node->getDocComment();
        if ($docComment === null) {
            return [];
        }
        $phpDocString = $docComment->getText();
        $tokens = new TokenIterator($this->phpDocLexer->tokenize($phpDocString));
        $phpDocNode = $this->phpDocParser->parse($tokens);
        $errors = [];
        foreach ($phpDocNode->getTags() as $phpDocTag) {
            if (strpos($phpDocTag->name, '@psalm-') === 0) {
                continue;
            }
            if ($phpDocTag->value instanceof TypeAliasTagValueNode) {
                if (!$phpDocTag->value->type instanceof InvalidTypeNode) {
                    continue;
                }
                $errors[] = RuleErrorBuilder::message(sprintf('PHPDoc tag %s %s has invalid value: %s', $phpDocTag->name, $phpDocTag->value->alias, $this->trimExceptionMessage($phpDocTag->value->type->getException()->getMessage())))->build();
                continue;
            } elseif (!$phpDocTag->value instanceof InvalidTagValueNode) {
                continue;
            }
            $errors[] = RuleErrorBuilder::message(sprintf('PHPDoc tag %s has invalid value (%s): %s', $phpDocTag->name, $phpDocTag->value->value, $this->trimExceptionMessage($phpDocTag->value->exception->getMessage())))->build();
        }
        return $errors;
    }
    private function trimExceptionMessage(string $message) : string
    {
        if ($this->invalidPhpDocTagLine) {
            return $message;
        }
        return Strings::replace($message, '~( on line \\d+)$~', '');
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\PhpDoc;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\FileTypeMapper;
use PHPStan\Type\ObjectType;
use PHPStan\Type\VerbosityLevel;
use PHPStan\Type\VoidType;
use Throwable;
use function sprintf;
/**
 * @implements Rule<Node\Stmt>
 */
class InvalidThrowsPhpDocValueRule implements Rule
{
    /**
     * @var \PHPStan\Type\FileTypeMapper
     */
    private $fileTypeMapper;
    public function __construct(FileTypeMapper $fileTypeMapper)
    {
        $this->fileTypeMapper = $fileTypeMapper;
    }
    public function getNodeType() : string
    {
        return Node\Stmt::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $docComment = $node->getDocComment();
        if ($docComment === null) {
            return [];
        }
        if ($node instanceof Node\Stmt\Function_ || $node instanceof Node\Stmt\ClassMethod) {
            return [];
            // is handled by virtual nodes
        }
        $functionName = null;
        if ($scope->getFunction() !== null) {
            $functionName = $scope->getFunction()->getName();
        }
        $resolvedPhpDoc = $this->fileTypeMapper->getResolvedPhpDoc($scope->getFile(), $scope->isInClass() ? $scope->getClassReflection()->getName() : null, $scope->isInTrait() ? $scope->getTraitReflection()->getName() : null, $functionName, $docComment->getText());
        if ($resolvedPhpDoc->getThrowsTag() === null) {
            return [];
        }
        $phpDocThrowsType = $resolvedPhpDoc->getThrowsTag()->getType();
        if ((new VoidType())->isSuperTypeOf($phpDocThrowsType)->yes()) {
            return [];
        }
        $isThrowsSuperType = (new ObjectType(Throwable::class))->isSuperTypeOf($phpDocThrowsType);
        if ($isThrowsSuperType->yes()) {
            return [];
        }
        return [RuleErrorBuilder::message(sprintf('PHPDoc tag @throws with type %s is not subtype of Throwable', $phpDocThrowsType->describe(VerbosityLevel::typeOnly())))->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\PhpDoc;

use PHPStan\Type\ErrorType;
use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeTraverser;
class UnresolvableTypeHelper
{
    public function containsUnresolvableType(Type $type) : bool
    {
        $containsUnresolvable = \false;
        TypeTraverser::map($type, static function (Type $type, callable $traverse) use(&$containsUnresolvable) : Type {
            if ($type instanceof ErrorType) {
                $containsUnresolvable = \true;
                return $type;
            }
            if ($type instanceof NeverType && !$type->isExplicit()) {
                $containsUnresolvable = \true;
                return $type;
            }
            return $traverse($type);
        });
        return $containsUnresolvable;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\PhpDoc;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\ClassCaseSensitivityCheck;
use PHPStan\Rules\ClassNameNodePair;
use PHPStan\Rules\Generics\GenericObjectTypeCheck;
use PHPStan\Rules\MissingTypehintCheck;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\FileTypeMapper;
use PHPStan\Type\VerbosityLevel;
use function array_map;
use function array_merge;
use function implode;
use function is_string;
use function sprintf;
/**
 * @implements Rule<Node\Stmt>
 */
class InvalidPhpDocVarTagTypeRule implements Rule
{
    /**
     * @var \PHPStan\Type\FileTypeMapper
     */
    private $fileTypeMapper;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Rules\ClassCaseSensitivityCheck
     */
    private $classCaseSensitivityCheck;
    /**
     * @var \PHPStan\Rules\Generics\GenericObjectTypeCheck
     */
    private $genericObjectTypeCheck;
    /**
     * @var \PHPStan\Rules\MissingTypehintCheck
     */
    private $missingTypehintCheck;
    /**
     * @var \PHPStan\Rules\PhpDoc\UnresolvableTypeHelper
     */
    private $unresolvableTypeHelper;
    /**
     * @var bool
     */
    private $checkClassCaseSensitivity;
    /**
     * @var bool
     */
    private $checkMissingVarTagTypehint;
    public function __construct(FileTypeMapper $fileTypeMapper, ReflectionProvider $reflectionProvider, ClassCaseSensitivityCheck $classCaseSensitivityCheck, GenericObjectTypeCheck $genericObjectTypeCheck, MissingTypehintCheck $missingTypehintCheck, \PHPStan\Rules\PhpDoc\UnresolvableTypeHelper $unresolvableTypeHelper, bool $checkClassCaseSensitivity, bool $checkMissingVarTagTypehint)
    {
        $this->fileTypeMapper = $fileTypeMapper;
        $this->reflectionProvider = $reflectionProvider;
        $this->classCaseSensitivityCheck = $classCaseSensitivityCheck;
        $this->genericObjectTypeCheck = $genericObjectTypeCheck;
        $this->missingTypehintCheck = $missingTypehintCheck;
        $this->unresolvableTypeHelper = $unresolvableTypeHelper;
        $this->checkClassCaseSensitivity = $checkClassCaseSensitivity;
        $this->checkMissingVarTagTypehint = $checkMissingVarTagTypehint;
    }
    public function getNodeType() : string
    {
        return Node\Stmt::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if ($node instanceof Node\Stmt\Property || $node instanceof Node\Stmt\PropertyProperty || $node instanceof Node\Stmt\ClassConst || $node instanceof Node\Stmt\Const_) {
            return [];
        }
        $docComment = $node->getDocComment();
        if ($docComment === null) {
            return [];
        }
        $function = $scope->getFunction();
        $resolvedPhpDoc = $this->fileTypeMapper->getResolvedPhpDoc($scope->getFile(), $scope->isInClass() ? $scope->getClassReflection()->getName() : null, $scope->isInTrait() ? $scope->getTraitReflection()->getName() : null, $function !== null ? $function->getName() : null, $docComment->getText());
        $errors = [];
        foreach ($resolvedPhpDoc->getVarTags() as $name => $varTag) {
            $varTagType = $varTag->getType();
            $identifier = 'PHPDoc tag @var';
            if (is_string($name)) {
                $identifier .= sprintf(' for variable $%s', $name);
            }
            if ($this->unresolvableTypeHelper->containsUnresolvableType($varTagType)) {
                $errors[] = RuleErrorBuilder::message(sprintf('%s contains unresolvable type.', $identifier))->line($docComment->getStartLine())->build();
                continue;
            }
            if ($this->checkMissingVarTagTypehint) {
                foreach ($this->missingTypehintCheck->getIterableTypesWithMissingValueTypehint($varTagType) as $iterableType) {
                    $iterableTypeDescription = $iterableType->describe(VerbosityLevel::typeOnly());
                    $errors[] = RuleErrorBuilder::message(sprintf('%s has no value type specified in iterable type %s.', $identifier, $iterableTypeDescription))->tip(MissingTypehintCheck::MISSING_ITERABLE_VALUE_TYPE_TIP)->build();
                }
            }
            $escapedIdentifier = SprintfHelper::escapeFormatString($identifier);
            $errors = array_merge($errors, $this->genericObjectTypeCheck->check($varTagType, sprintf('%s contains generic type %%s but %%s %%s is not generic.', $escapedIdentifier), sprintf('Generic type %%s in %s does not specify all template types of %%s %%s: %%s', $escapedIdentifier), sprintf('Generic type %%s in %s specifies %%d template types, but %%s %%s supports only %%d: %%s', $escapedIdentifier), sprintf('Type %%s in generic type %%s in %s is not subtype of template type %%s of %%s %%s.', $escapedIdentifier)));
            foreach ($this->missingTypehintCheck->getNonGenericObjectTypesWithGenericClass($varTagType) as [$innerName, $genericTypeNames]) {
                $errors[] = RuleErrorBuilder::message(sprintf('%s contains generic %s but does not specify its types: %s', $identifier, $innerName, implode(', ', $genericTypeNames)))->tip(MissingTypehintCheck::TURN_OFF_NON_GENERIC_CHECK_TIP)->build();
            }
            $referencedClasses = $varTagType->getReferencedClasses();
            foreach ($referencedClasses as $referencedClass) {
                if ($this->reflectionProvider->hasClass($referencedClass)) {
                    if ($this->reflectionProvider->getClass($referencedClass)->isTrait()) {
                        $errors[] = RuleErrorBuilder::message(sprintf(sprintf('%s has invalid type %%s.', $identifier), $referencedClass))->build();
                    }
                    continue;
                }
                if ($scope->isInClassExists($referencedClass)) {
                    continue;
                }
                $errors[] = RuleErrorBuilder::message(sprintf(sprintf('%s contains unknown class %%s.', $identifier), $referencedClass))->discoveringSymbolsTip()->build();
            }
            if (!$this->checkClassCaseSensitivity) {
                continue;
            }
            $errors = array_merge($errors, $this->classCaseSensitivityCheck->checkClassNames(array_map(static function (string $class) use($node) : ClassNameNodePair {
                return new ClassNameNodePair($class, $node);
            }, $referencedClasses)));
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\PhpDoc;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InClassMethodNode;
use PHPStan\Rules\Rule;
use function count;
/**
 * @implements Rule<InClassMethodNode>
 */
class MethodConditionalReturnTypeRule implements Rule
{
    /**
     * @var \PHPStan\Rules\PhpDoc\ConditionalReturnTypeRuleHelper
     */
    private $helper;
    public function __construct(\PHPStan\Rules\PhpDoc\ConditionalReturnTypeRuleHelper $helper)
    {
        $this->helper = $helper;
    }
    public function getNodeType() : string
    {
        return InClassMethodNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $method = $node->getMethodReflection();
        $variants = $method->getVariants();
        if (count($variants) !== 1) {
            return [];
        }
        return $this->helper->check($variants[0]);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\PhpDoc;

use PhpParser\Node;
use PhpParser\Node\Expr;
use PHPStan\Analyser\Scope;
use PHPStan\Node\Expr\GetOffsetValueTypeExpr;
use PHPStan\PhpDoc\Tag\VarTag;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\Generic\GenericObjectType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeUtils;
use PHPStan\Type\VerbosityLevel;
use function array_key_exists;
use function count;
use function is_string;
use function sprintf;
class VarTagTypeRuleHelper
{
    /**
     * @var bool
     */
    private $checkTypeAgainstPhpDocType;
    public function __construct(bool $checkTypeAgainstPhpDocType)
    {
        $this->checkTypeAgainstPhpDocType = $checkTypeAgainstPhpDocType;
    }
    /**
     * @param VarTag[] $varTags
     * @param string[] $assignedVariables
     * @return RuleError[]
     */
    public function checkVarType(Scope $scope, Node\Expr $var, Node\Expr $expr, array $varTags, array $assignedVariables) : array
    {
        $errors = [];
        if ($var instanceof Expr\Variable && is_string($var->name)) {
            if (array_key_exists($var->name, $varTags)) {
                $varTagType = $varTags[$var->name]->getType();
            } elseif (count($assignedVariables) === 1 && array_key_exists(0, $varTags)) {
                $varTagType = $varTags[0]->getType();
            } else {
                return [];
            }
            return $this->checkExprType($scope, $expr, $varTagType);
        } elseif ($var instanceof Expr\List_ || $var instanceof Expr\Array_) {
            foreach ($var->items as $i => $arrayItem) {
                if ($arrayItem === null) {
                    continue;
                }
                if ($arrayItem->key === null) {
                    $dimExpr = new Node\Scalar\LNumber($i);
                } else {
                    $dimExpr = $arrayItem->key;
                }
                $itemErrors = $this->checkVarType($scope, $arrayItem->value, new GetOffsetValueTypeExpr($expr, $dimExpr), $varTags, $assignedVariables);
                foreach ($itemErrors as $error) {
                    $errors[] = $error;
                }
            }
        }
        return $errors;
    }
    /**
     * @return RuleError[]
     */
    public function checkExprType(Scope $scope, Node\Expr $expr, Type $varTagType) : array
    {
        $errors = [];
        $exprNativeType = $scope->getNativeType($expr);
        $containsPhpStanType = $this->containsPhpStanType($varTagType);
        if ($this->shouldVarTagTypeBeReported($expr, $exprNativeType, $varTagType)) {
            $verbosity = VerbosityLevel::getRecommendedLevelByType($exprNativeType, $varTagType);
            $errors[] = RuleErrorBuilder::message(sprintf('PHPDoc tag @var with type %s is not subtype of native type %s.', $varTagType->describe($verbosity), $exprNativeType->describe($verbosity)))->build();
        } else {
            $exprType = $scope->getType($expr);
            if ($this->shouldVarTagTypeBeReported($expr, $exprType, $varTagType) && ($this->checkTypeAgainstPhpDocType || $containsPhpStanType)) {
                $verbosity = VerbosityLevel::getRecommendedLevelByType($exprType, $varTagType);
                $errors[] = RuleErrorBuilder::message(sprintf('PHPDoc tag @var with type %s is not subtype of type %s.', $varTagType->describe($verbosity), $exprType->describe($verbosity)))->build();
            }
        }
        if (count($errors) === 0 && $containsPhpStanType) {
            $exprType = $scope->getType($expr);
            if (!$exprType->equals($varTagType)) {
                $verbosity = VerbosityLevel::getRecommendedLevelByType($exprType, $varTagType);
                $errors[] = RuleErrorBuilder::message(sprintf('PHPDoc tag @var assumes the expression with type %s is always %s but it\'s error-prone and dangerous.', $exprType->describe($verbosity), $varTagType->describe($verbosity)))->build();
            }
        }
        return $errors;
    }
    private function containsPhpStanType(Type $type) : bool
    {
        $classReflections = TypeUtils::toBenevolentUnion($type)->getObjectClassReflections();
        foreach ($classReflections as $classReflection) {
            if (!$classReflection->isSubclassOf(Type::class)) {
                continue;
            }
            return \true;
        }
        return \false;
    }
    private function shouldVarTagTypeBeReported(Node\Expr $expr, Type $type, Type $varTagType) : bool
    {
        if ($expr instanceof Expr\New_) {
            if ($type instanceof GenericObjectType) {
                $type = new ObjectType($type->getClassName());
            }
        }
        return $this->checkType($type, $varTagType);
    }
    private function checkType(Type $type, Type $varTagType) : bool
    {
        if ($type->isConstantValue()->yes()) {
            return $type->isSuperTypeOf($varTagType)->no();
        }
        if ($type->isIterable()->yes() && $varTagType->isIterable()->yes()) {
            if ($type->isSuperTypeOf($varTagType)->no()) {
                return \true;
            }
            $innerType = $type->getIterableValueType();
            $innerVarTagType = $varTagType->getIterableValueType();
            if ($type->equals($innerType) || $varTagType->equals($innerVarTagType)) {
                return !$innerType->isSuperTypeOf($innerVarTagType)->yes();
            }
            return $this->checkType($innerType, $innerVarTagType);
        }
        return !$type->isSuperTypeOf($varTagType)->yes();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\PhpDoc;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Reflection\ClassConstantReflection;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\InitializerExprContext;
use PHPStan\Reflection\InitializerExprTypeResolver;
use PHPStan\Rules\Generics\GenericObjectTypeCheck;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\VerbosityLevel;
use function array_merge;
use function sprintf;
/**
 * @implements Rule<Node\Stmt\ClassConst>
 */
class IncompatibleClassConstantPhpDocTypeRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Generics\GenericObjectTypeCheck
     */
    private $genericObjectTypeCheck;
    /**
     * @var \PHPStan\Rules\PhpDoc\UnresolvableTypeHelper
     */
    private $unresolvableTypeHelper;
    /**
     * @var \PHPStan\Reflection\InitializerExprTypeResolver
     */
    private $initializerExprTypeResolver;
    public function __construct(GenericObjectTypeCheck $genericObjectTypeCheck, \PHPStan\Rules\PhpDoc\UnresolvableTypeHelper $unresolvableTypeHelper, InitializerExprTypeResolver $initializerExprTypeResolver)
    {
        $this->genericObjectTypeCheck = $genericObjectTypeCheck;
        $this->unresolvableTypeHelper = $unresolvableTypeHelper;
        $this->initializerExprTypeResolver = $initializerExprTypeResolver;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\ClassConst::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$scope->isInClass()) {
            throw new ShouldNotHappenException();
        }
        $errors = [];
        foreach ($node->consts as $const) {
            $constantName = $const->name->toString();
            $errors = array_merge($errors, $this->processSingleConstant($scope->getClassReflection(), $constantName));
        }
        return $errors;
    }
    /**
     * @return RuleError[]
     */
    private function processSingleConstant(ClassReflection $classReflection, string $constantName) : array
    {
        $constantReflection = $classReflection->getConstant($constantName);
        if (!$constantReflection instanceof ClassConstantReflection) {
            return [];
        }
        if (!$constantReflection->hasPhpDocType()) {
            return [];
        }
        $phpDocType = $constantReflection->getValueType();
        $errors = [];
        if ($this->unresolvableTypeHelper->containsUnresolvableType($phpDocType)) {
            $errors[] = RuleErrorBuilder::message(sprintf('PHPDoc tag @var for constant %s::%s contains unresolvable type.', $constantReflection->getDeclaringClass()->getName(), $constantName))->build();
        } else {
            $nativeType = $this->initializerExprTypeResolver->getType($constantReflection->getValueExpr(), InitializerExprContext::fromClassReflection($constantReflection->getDeclaringClass()));
            $isSuperType = $phpDocType->isSuperTypeOf($nativeType);
            $verbosity = VerbosityLevel::getRecommendedLevelByType($phpDocType, $nativeType);
            if ($isSuperType->no()) {
                $errors[] = RuleErrorBuilder::message(sprintf('PHPDoc tag @var for constant %s::%s with type %s is incompatible with value %s.', $constantReflection->getDeclaringClass()->getDisplayName(), $constantName, $phpDocType->describe($verbosity), $nativeType->describe(VerbosityLevel::value())))->build();
            } elseif ($isSuperType->maybe()) {
                $errors[] = RuleErrorBuilder::message(sprintf('PHPDoc tag @var for constant %s::%s with type %s is not subtype of value %s.', $constantReflection->getDeclaringClass()->getDisplayName(), $constantName, $phpDocType->describe($verbosity), $nativeType->describe(VerbosityLevel::value())))->build();
            }
        }
        $className = SprintfHelper::escapeFormatString($constantReflection->getDeclaringClass()->getDisplayName());
        $escapedConstantName = SprintfHelper::escapeFormatString($constantName);
        return array_merge($errors, $this->genericObjectTypeCheck->check($phpDocType, sprintf('PHPDoc tag @var for constant %s::%s contains generic type %%s but %%s %%s is not generic.', $className, $escapedConstantName), sprintf('Generic type %%s in PHPDoc tag @var for constant %s::%s does not specify all template types of %%s %%s: %%s', $className, $escapedConstantName), sprintf('Generic type %%s in PHPDoc tag @var for constant %s::%s specifies %%d template types, but %%s %%s supports only %%d: %%s', $className, $escapedConstantName), sprintf('Type %%s in generic type %%s in PHPDoc tag @var for constant %s::%s is not subtype of template type %%s of %%s %%s.', $className, $escapedConstantName)));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\PhpDoc;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InClassMethodNode;
use PHPStan\Rules\Rule;
use function count;
/**
 * @implements Rule<InClassMethodNode>
 */
class MethodAssertRule implements Rule
{
    /**
     * @var \PHPStan\Rules\PhpDoc\AssertRuleHelper
     */
    private $helper;
    public function __construct(\PHPStan\Rules\PhpDoc\AssertRuleHelper $helper)
    {
        $this->helper = $helper;
    }
    public function getNodeType() : string
    {
        return InClassMethodNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $method = $node->getMethodReflection();
        $variants = $method->getVariants();
        if (count($variants) !== 1) {
            return [];
        }
        return $this->helper->check($method, $variants[0]);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\PhpDoc;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InFunctionNode;
use PHPStan\Rules\Rule;
use function count;
/**
 * @implements Rule<InFunctionNode>
 */
class FunctionConditionalReturnTypeRule implements Rule
{
    /**
     * @var \PHPStan\Rules\PhpDoc\ConditionalReturnTypeRuleHelper
     */
    private $helper;
    public function __construct(\PHPStan\Rules\PhpDoc\ConditionalReturnTypeRuleHelper $helper)
    {
        $this->helper = $helper;
    }
    public function getNodeType() : string
    {
        return InFunctionNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $function = $node->getFunctionReflection();
        $variants = $function->getVariants();
        if (count($variants) !== 1) {
            return [];
        }
        return $this->helper->check($variants[0]);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\PhpDoc;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\VirtualNode;
use PHPStan\PhpDocParser\Lexer\Lexer;
use PHPStan\PhpDocParser\Parser\PhpDocParser;
use PHPStan\PhpDocParser\Parser\TokenIterator;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function in_array;
use function sprintf;
use function strpos;
/**
 * @implements Rule<Node>
 */
class InvalidPHPStanDocTagRule implements Rule
{
    private const POSSIBLE_PHPSTAN_TAGS = ['@phpstan-param', '@phpstan-param-out', '@phpstan-var', '@phpstan-extends', '@phpstan-implements', '@phpstan-use', '@phpstan-template', '@phpstan-template-contravariant', '@phpstan-template-covariant', '@phpstan-return', '@phpstan-throws', '@phpstan-ignore-next-line', '@phpstan-ignore-line', '@phpstan-method', '@phpstan-pure', '@phpstan-impure', '@phpstan-immutable', '@phpstan-type', '@phpstan-import-type', '@phpstan-property', '@phpstan-property-read', '@phpstan-property-write', '@phpstan-consistent-constructor', '@phpstan-assert', '@phpstan-assert-if-true', '@phpstan-assert-if-false', '@phpstan-self-out', '@phpstan-this-out', '@phpstan-allow-private-mutation', '@phpstan-readonly', '@phpstan-readonly-allow-private-mutation'];
    /**
     * @var \PHPStan\PhpDocParser\Lexer\Lexer
     */
    private $phpDocLexer;
    /**
     * @var \PHPStan\PhpDocParser\Parser\PhpDocParser
     */
    private $phpDocParser;
    /**
     * @var bool
     */
    private $checkAllInvalidPhpDocs;
    public function __construct(Lexer $phpDocLexer, PhpDocParser $phpDocParser, bool $checkAllInvalidPhpDocs)
    {
        $this->phpDocLexer = $phpDocLexer;
        $this->phpDocParser = $phpDocParser;
        $this->checkAllInvalidPhpDocs = $checkAllInvalidPhpDocs;
    }
    public function getNodeType() : string
    {
        return Node::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$this->checkAllInvalidPhpDocs) {
            if (!$node instanceof Node\Stmt\ClassLike && !$node instanceof Node\FunctionLike && !$node instanceof Node\Stmt\Foreach_ && !$node instanceof Node\Stmt\Property && !$node instanceof Node\Expr\Assign && !$node instanceof Node\Expr\AssignRef && !$node instanceof Node\Stmt\ClassConst) {
                return [];
            }
        } else {
            // mirrored with InvalidPhpDocTagValueRule
            if ($node instanceof VirtualNode) {
                return [];
            }
            if ($node instanceof Node\Stmt\Expression) {
                return [];
            }
            if ($node instanceof Node\Expr && !$node instanceof Node\Expr\Assign && !$node instanceof Node\Expr\AssignRef) {
                return [];
            }
        }
        $docComment = $node->getDocComment();
        if ($docComment === null) {
            return [];
        }
        $phpDocString = $docComment->getText();
        $tokens = new TokenIterator($this->phpDocLexer->tokenize($phpDocString));
        $phpDocNode = $this->phpDocParser->parse($tokens);
        $errors = [];
        foreach ($phpDocNode->getTags() as $phpDocTag) {
            if (strpos($phpDocTag->name, '@phpstan-') !== 0 || in_array($phpDocTag->name, self::POSSIBLE_PHPSTAN_TAGS, \true)) {
                continue;
            }
            $errors[] = RuleErrorBuilder::message(sprintf('Unknown PHPDoc tag: %s', $phpDocTag->name))->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\PhpDoc;

use PhpParser\Comment\Doc;
use PhpParser\Node;
use PhpParser\Node\Expr;
use PHPStan\Analyser\Scope;
use PHPStan\Node\Expr\GetIterableKeyTypeExpr;
use PHPStan\Node\Expr\GetIterableValueTypeExpr;
use PHPStan\Node\InClassMethodNode;
use PHPStan\Node\InClassNode;
use PHPStan\Node\InFunctionNode;
use PHPStan\Node\VirtualNode;
use PHPStan\PhpDoc\Tag\VarTag;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\FileTypeMapper;
use function array_keys;
use function array_map;
use function array_merge;
use function count;
use function implode;
use function in_array;
use function is_int;
use function is_string;
use function sprintf;
/**
 * @implements Rule<Node\Stmt>
 */
class WrongVariableNameInVarTagRule implements Rule
{
    /**
     * @var \PHPStan\Type\FileTypeMapper
     */
    private $fileTypeMapper;
    /**
     * @var \PHPStan\Rules\PhpDoc\VarTagTypeRuleHelper
     */
    private $varTagTypeRuleHelper;
    /**
     * @var bool
     */
    private $checkTypeAgainstNativeType;
    public function __construct(FileTypeMapper $fileTypeMapper, \PHPStan\Rules\PhpDoc\VarTagTypeRuleHelper $varTagTypeRuleHelper, bool $checkTypeAgainstNativeType)
    {
        $this->fileTypeMapper = $fileTypeMapper;
        $this->varTagTypeRuleHelper = $varTagTypeRuleHelper;
        $this->checkTypeAgainstNativeType = $checkTypeAgainstNativeType;
    }
    public function getNodeType() : string
    {
        return Node\Stmt::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if ($node instanceof Node\Stmt\Property || $node instanceof Node\Stmt\PropertyProperty || $node instanceof Node\Stmt\ClassConst || $node instanceof Node\Stmt\Const_ || $node instanceof VirtualNode && !$node instanceof InFunctionNode && !$node instanceof InClassMethodNode && !$node instanceof InClassNode) {
            return [];
        }
        $varTags = [];
        $function = $scope->getFunction();
        foreach ($node->getComments() as $comment) {
            if (!$comment instanceof Doc) {
                continue;
            }
            $resolvedPhpDoc = $this->fileTypeMapper->getResolvedPhpDoc($scope->getFile(), $scope->isInClass() ? $scope->getClassReflection()->getName() : null, $scope->isInTrait() ? $scope->getTraitReflection()->getName() : null, $function !== null ? $function->getName() : null, $comment->getText());
            foreach ($resolvedPhpDoc->getVarTags() as $key => $varTag) {
                $varTags[$key] = $varTag;
            }
        }
        if (count($varTags) === 0) {
            return [];
        }
        if ($node instanceof Node\Stmt\Foreach_) {
            return $this->processForeach($scope, $node->expr, $node->keyVar, $node->valueVar, $varTags);
        }
        if ($node instanceof Node\Stmt\Static_) {
            return $this->processStatic($scope, $node->vars, $varTags);
        }
        if ($node instanceof Node\Stmt\Expression) {
            return $this->processExpression($scope, $node->expr, $varTags);
        }
        if ($node instanceof Node\Stmt\Throw_ || $node instanceof Node\Stmt\Return_) {
            return $this->processStmt($scope, $varTags, $node->expr);
        }
        if ($node instanceof Node\Stmt\Global_) {
            return $this->processGlobal($scope, $node, $varTags);
        }
        if ($node instanceof InClassNode || $node instanceof InClassMethodNode || $node instanceof InFunctionNode) {
            $description = 'a function';
            $originalNode = $node->getOriginalNode();
            if ($originalNode instanceof Node\Stmt\Interface_) {
                $description = 'an interface';
            } elseif ($originalNode instanceof Node\Stmt\Class_) {
                $description = 'a class';
            } elseif ($originalNode instanceof Node\Stmt\Enum_) {
                $description = 'an enum';
            } elseif ($originalNode instanceof Node\Stmt\Trait_) {
                throw new ShouldNotHappenException();
            } elseif ($originalNode instanceof Node\Stmt\ClassMethod) {
                $description = 'a method';
            }
            return [RuleErrorBuilder::message(sprintf('PHPDoc tag @var above %s has no effect.', $description))->build()];
        }
        return $this->processStmt($scope, $varTags, null);
    }
    /**
     * @param VarTag[] $varTags
     * @return RuleError[]
     */
    private function processAssign(Scope $scope, Node\Expr $var, Node\Expr $expr, array $varTags) : array
    {
        $errors = [];
        $hasMultipleMessage = \false;
        $assignedVariables = $this->getAssignedVariables($var);
        if ($this->checkTypeAgainstNativeType) {
            foreach ($this->varTagTypeRuleHelper->checkVarType($scope, $var, $expr, $varTags, $assignedVariables) as $error) {
                $errors[] = $error;
            }
        }
        foreach (array_keys($varTags) as $key) {
            if (is_int($key)) {
                if (count($varTags) !== 1) {
                    if (!$hasMultipleMessage) {
                        $errors[] = RuleErrorBuilder::message('Multiple PHPDoc @var tags above single variable assignment are not supported.')->build();
                        $hasMultipleMessage = \true;
                    }
                } elseif (count($assignedVariables) !== 1) {
                    $errors[] = RuleErrorBuilder::message('PHPDoc tag @var above assignment does not specify variable name.')->build();
                }
                continue;
            }
            if (!$scope->hasVariableType($key)->no()) {
                continue;
            }
            if (in_array($key, $assignedVariables, \true)) {
                continue;
            }
            if (count($assignedVariables) === 1 && count($varTags) === 1) {
                $errors[] = RuleErrorBuilder::message(sprintf('Variable $%s in PHPDoc tag @var does not match assigned variable $%s.', $key, $assignedVariables[0]))->build();
            } else {
                $errors[] = RuleErrorBuilder::message(sprintf('Variable $%s in PHPDoc tag @var does not exist.', $key))->build();
            }
        }
        return $errors;
    }
    /**
     * @return string[]
     */
    private function getAssignedVariables(Expr $expr) : array
    {
        if ($expr instanceof Expr\Variable) {
            if (is_string($expr->name)) {
                return [$expr->name];
            }
            return [];
        }
        if ($expr instanceof Expr\List_ || $expr instanceof Expr\Array_) {
            $names = [];
            foreach ($expr->items as $item) {
                if ($item === null) {
                    continue;
                }
                $names = array_merge($names, $this->getAssignedVariables($item->value));
            }
            return $names;
        }
        return [];
    }
    /**
     * @param VarTag[] $varTags
     * @return RuleError[]
     */
    private function processForeach(Scope $scope, Node\Expr $iterateeExpr, ?Node\Expr $keyVar, Node\Expr $valueVar, array $varTags) : array
    {
        $variableNames = [];
        if ($iterateeExpr instanceof Node\Expr\Variable && is_string($iterateeExpr->name)) {
            $variableNames[] = $iterateeExpr->name;
        }
        if ($keyVar instanceof Node\Expr\Variable && is_string($keyVar->name)) {
            $variableNames[] = $keyVar->name;
        }
        $variableNames = array_merge($variableNames, $this->getAssignedVariables($valueVar));
        $errors = [];
        foreach (array_keys($varTags) as $name) {
            if (is_int($name)) {
                if (count($variableNames) === 1) {
                    continue;
                }
                $errors[] = RuleErrorBuilder::message('PHPDoc tag @var above foreach loop does not specify variable name.')->build();
                continue;
            }
            if (in_array($name, $variableNames, \true)) {
                continue;
            }
            $errors[] = RuleErrorBuilder::message(sprintf('Variable $%s in PHPDoc tag @var does not match any variable in the foreach loop: %s', $name, implode(', ', array_map(static function (string $name) : string {
                return sprintf('$%s', $name);
            }, $variableNames))))->build();
        }
        if ($this->checkTypeAgainstNativeType) {
            foreach ($this->varTagTypeRuleHelper->checkVarType($scope, $iterateeExpr, $iterateeExpr, $varTags, $variableNames) as $error) {
                $errors[] = $error;
            }
            if ($keyVar !== null) {
                foreach ($this->varTagTypeRuleHelper->checkVarType($scope, $keyVar, new GetIterableKeyTypeExpr($iterateeExpr), $varTags, $variableNames) as $error) {
                    $errors[] = $error;
                }
            }
            foreach ($this->varTagTypeRuleHelper->checkVarType($scope, $valueVar, new GetIterableValueTypeExpr($iterateeExpr), $varTags, $variableNames) as $error) {
                $errors[] = $error;
            }
        }
        return $errors;
    }
    /**
     * @param Node\Stmt\StaticVar[] $vars
     * @param VarTag[] $varTags
     * @return RuleError[]
     */
    private function processStatic(Scope $scope, array $vars, array $varTags) : array
    {
        $variableNames = [];
        foreach ($vars as $var) {
            if (!is_string($var->var->name)) {
                continue;
            }
            $variableNames[] = $var->var->name;
        }
        $errors = [];
        foreach (array_keys($varTags) as $name) {
            if (is_int($name)) {
                if (count($vars) === 1) {
                    continue;
                }
                $errors[] = RuleErrorBuilder::message('PHPDoc tag @var above multiple static variables does not specify variable name.')->build();
                continue;
            }
            if (in_array($name, $variableNames, \true)) {
                continue;
            }
            $errors[] = RuleErrorBuilder::message(sprintf('Variable $%s in PHPDoc tag @var does not match any static variable: %s', $name, implode(', ', array_map(static function (string $name) : string {
                return sprintf('$%s', $name);
            }, $variableNames))))->build();
        }
        if ($this->checkTypeAgainstNativeType) {
            foreach ($vars as $var) {
                if ($var->default === null) {
                    continue;
                }
                foreach ($this->varTagTypeRuleHelper->checkVarType($scope, $var->var, $var->default, $varTags, $variableNames) as $error) {
                    $errors[] = $error;
                }
            }
        }
        return $errors;
    }
    /**
     * @param VarTag[] $varTags
     * @return RuleError[]
     */
    private function processExpression(Scope $scope, Expr $expr, array $varTags) : array
    {
        if ($expr instanceof Node\Expr\Assign || $expr instanceof Node\Expr\AssignRef) {
            return $this->processAssign($scope, $expr->var, $expr->expr, $varTags);
        }
        return $this->processStmt($scope, $varTags, null);
    }
    /**
     * @param VarTag[] $varTags
     * @return RuleError[]
     */
    private function processStmt(Scope $scope, array $varTags, ?Expr $defaultExpr) : array
    {
        $errors = [];
        $variableLessVarTags = [];
        foreach ($varTags as $name => $varTag) {
            if (is_int($name)) {
                $variableLessVarTags[] = $varTag;
                continue;
            }
            if (!$scope->hasVariableType($name)->no()) {
                continue;
            }
            $errors[] = RuleErrorBuilder::message(sprintf('Variable $%s in PHPDoc tag @var does not exist.', $name))->build();
        }
        if (count($variableLessVarTags) !== 1 || $defaultExpr === null) {
            if (count($variableLessVarTags) > 0) {
                $errors[] = RuleErrorBuilder::message('PHPDoc tag @var does not specify variable name.')->build();
            }
        }
        return $errors;
    }
    /**
     * @param VarTag[] $varTags
     * @return RuleError[]
     */
    private function processGlobal(Scope $scope, Node\Stmt\Global_ $node, array $varTags) : array
    {
        $variableNames = [];
        foreach ($node->vars as $var) {
            if (!$var instanceof Expr\Variable) {
                continue;
            }
            if (!is_string($var->name)) {
                continue;
            }
            $variableNames[$var->name] = \true;
        }
        $errors = [];
        foreach (array_keys($varTags) as $name) {
            if (is_int($name)) {
                if (count($variableNames) === 1) {
                    continue;
                }
                $errors[] = RuleErrorBuilder::message('PHPDoc tag @var above multiple global variables does not specify variable name.')->build();
                continue;
            }
            if (isset($variableNames[$name])) {
                continue;
            }
            $errors[] = RuleErrorBuilder::message(sprintf('Variable $%s in PHPDoc tag @var does not match any global variable: %s', $name, implode(', ', array_map(static function (string $name) : string {
                return sprintf('$%s', $name);
            }, array_keys($variableNames)))))->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\PhpDoc;

use PHPStan\Node\Expr\TypeExpr;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\InitializerExprContext;
use PHPStan\Reflection\InitializerExprTypeResolver;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\ErrorType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\VerbosityLevel;
use function array_key_exists;
use function sprintf;
use function substr;
class AssertRuleHelper
{
    /**
     * @var \PHPStan\Reflection\InitializerExprTypeResolver
     */
    private $initializerExprTypeResolver;
    public function __construct(InitializerExprTypeResolver $initializerExprTypeResolver)
    {
        $this->initializerExprTypeResolver = $initializerExprTypeResolver;
    }
    /**
     * @return RuleError[]
     * @param \PHPStan\Reflection\ExtendedMethodReflection|\PHPStan\Reflection\FunctionReflection $reflection
     */
    public function check($reflection, ParametersAcceptor $acceptor) : array
    {
        $parametersByName = [];
        foreach ($acceptor->getParameters() as $parameter) {
            $parametersByName[$parameter->getName()] = $parameter->getType();
        }
        if ($reflection instanceof ExtendedMethodReflection) {
            $class = $reflection->getDeclaringClass();
            $parametersByName['this'] = new ObjectType($class->getName(), null, $class);
        }
        $context = InitializerExprContext::createEmpty();
        $errors = [];
        foreach ($reflection->getAsserts()->getAll() as $assert) {
            $parameterName = substr($assert->getParameter()->getParameterName(), 1);
            if (!array_key_exists($parameterName, $parametersByName)) {
                $errors[] = RuleErrorBuilder::message(sprintf('Assert references unknown parameter $%s.', $parameterName))->build();
                continue;
            }
            $assertedExpr = $assert->getParameter()->getExpr(new TypeExpr($parametersByName[$parameterName]));
            $assertedExprType = $this->initializerExprTypeResolver->getType($assertedExpr, $context);
            if ($assertedExprType instanceof ErrorType) {
                continue;
            }
            $assertedType = $assert->getType();
            $isSuperType = $assertedType->isSuperTypeOf($assertedExprType);
            if ($isSuperType->maybe()) {
                continue;
            }
            $assertedExprString = $assert->getParameter()->describe();
            if ($assert->isNegated() ? $isSuperType->yes() : $isSuperType->no()) {
                $errors[] = RuleErrorBuilder::message(sprintf('Asserted %stype %s for %s with type %s can never happen.', $assert->isNegated() ? 'negated ' : '', $assertedType->describe(VerbosityLevel::precise()), $assertedExprString, $assertedExprType->describe(VerbosityLevel::precise())))->build();
            } elseif ($assert->isNegated() ? $isSuperType->no() : $isSuperType->yes()) {
                $errors[] = RuleErrorBuilder::message(sprintf('Asserted %stype %s for %s with type %s does not narrow down the type.', $assert->isNegated() ? 'negated ' : '', $assertedType->describe(VerbosityLevel::precise()), $assertedExprString, $assertedExprType->describe(VerbosityLevel::precise())))->build();
            }
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Arrays;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\LiteralArrayNode;
use PHPStan\Node\Printer\ExprPrinter;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\ConstantScalarType;
use function array_keys;
use function count;
use function implode;
use function sprintf;
use function var_export;
/**
 * @implements Rule<LiteralArrayNode>
 */
class DuplicateKeysInLiteralArraysRule implements Rule
{
    /**
     * @var \PHPStan\Node\Printer\ExprPrinter
     */
    private $exprPrinter;
    public function __construct(ExprPrinter $exprPrinter)
    {
        $this->exprPrinter = $exprPrinter;
    }
    public function getNodeType() : string
    {
        return LiteralArrayNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $values = [];
        $duplicateKeys = [];
        $printedValues = [];
        $valueLines = [];
        foreach ($node->getItemNodes() as $itemNode) {
            $item = $itemNode->getArrayItem();
            if ($item === null) {
                continue;
            }
            if ($item->key === null) {
                continue;
            }
            $key = $item->key;
            $keyType = $itemNode->getScope()->getType($key);
            if (!$keyType instanceof ConstantScalarType) {
                continue;
            }
            $printedValue = $this->exprPrinter->printExpr($key);
            $value = $keyType->getValue();
            $printedValues[$value][] = $printedValue;
            if (!isset($valueLines[$value])) {
                $valueLines[$value] = $item->getLine();
            }
            $previousCount = count($values);
            $values[$value] = $printedValue;
            if ($previousCount !== count($values)) {
                continue;
            }
            $duplicateKeys[$value] = \true;
        }
        $messages = [];
        foreach (array_keys($duplicateKeys) as $value) {
            $messages[] = RuleErrorBuilder::message(sprintf('Array has %d %s with value %s (%s).', count($printedValues[$value]), count($printedValues[$value]) === 1 ? 'duplicate key' : 'duplicate keys', var_export($value, \true), implode(', ', $printedValues[$value])))->line($valueLines[$value])->build();
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Arrays;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\LiteralArrayNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
/**
 * @implements Rule<LiteralArrayNode>
 */
class EmptyArrayItemRule implements Rule
{
    public function getNodeType() : string
    {
        return LiteralArrayNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        foreach ($node->getItemNodes() as $itemNode) {
            $item = $itemNode->getArrayItem();
            if ($item !== null) {
                continue;
            }
            return [RuleErrorBuilder::message('Literal array contains empty item.')->nonIgnorable()->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Arrays;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
/**
 * @implements Rule<Node\Stmt\Foreach_>
 */
class DeadForeachRule implements Rule
{
    public function getNodeType() : string
    {
        return Node\Stmt\Foreach_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $iterableType = $scope->getType($node->expr);
        if ($iterableType->isIterable()->no()) {
            return [];
        }
        if (!$iterableType->isIterableAtLeastOnce()->no()) {
            return [];
        }
        return [RuleErrorBuilder::message('Empty array passed to foreach.')->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Arrays;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\ErrorType;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<Node\Expr\ArrayDimFetch>
 */
class InvalidKeyInArrayDimFetchRule implements Rule
{
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    /**
     * @var bool
     */
    private $reportMaybes;
    public function __construct(RuleLevelHelper $ruleLevelHelper, bool $reportMaybes)
    {
        $this->ruleLevelHelper = $ruleLevelHelper;
        $this->reportMaybes = $reportMaybes;
    }
    public function getNodeType() : string
    {
        return Node\Expr\ArrayDimFetch::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if ($node->dim === null) {
            return [];
        }
        $dimensionType = $scope->getType($node->dim);
        if ($dimensionType instanceof MixedType) {
            return [];
        }
        $varType = $this->ruleLevelHelper->findTypeToCheck($scope, $node->var, '', static function (Type $varType) use($dimensionType) : bool {
            return $varType->isArray()->no() || \PHPStan\Rules\Arrays\AllowedArrayKeysTypes::getType()->isSuperTypeOf($dimensionType)->yes();
        })->getType();
        if ($varType instanceof ErrorType || $varType->isArray()->no()) {
            return [];
        }
        $isSuperType = \PHPStan\Rules\Arrays\AllowedArrayKeysTypes::getType()->isSuperTypeOf($dimensionType);
        if ($isSuperType->yes() || $isSuperType->maybe() && !$this->reportMaybes) {
            return [];
        }
        return [RuleErrorBuilder::message(sprintf('%s array key type %s.', $isSuperType->no() ? 'Invalid' : 'Possibly invalid', $dimensionType->describe(VerbosityLevel::typeOnly())))->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Arrays;

use PHPStan\Type\BooleanType;
use PHPStan\Type\FloatType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\NullType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\UnionType;
class AllowedArrayKeysTypes
{
    public static function getType() : Type
    {
        return new UnionType([new IntegerType(), new StringType(), new FloatType(), new BooleanType(), new NullType()]);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Arrays;

use PhpParser\Node;
use PhpParser\Node\Expr\ArrayItem;
use PHPStan\Analyser\Scope;
use PHPStan\Node\Expr\GetIterableKeyTypeExpr;
use PHPStan\Php\PhpVersion;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<ArrayItem>
 */
class ArrayUnpackingRule implements Rule
{
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    public function __construct(PhpVersion $phpVersion, RuleLevelHelper $ruleLevelHelper)
    {
        $this->phpVersion = $phpVersion;
        $this->ruleLevelHelper = $ruleLevelHelper;
    }
    public function getNodeType() : string
    {
        return ArrayItem::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if ($node->unpack === \false || $this->phpVersion->supportsArrayUnpackingWithStringKeys()) {
            return [];
        }
        $typeResult = $this->ruleLevelHelper->findTypeToCheck($scope, new GetIterableKeyTypeExpr($node->value), '', static function (Type $type) : bool {
            return $type->isString()->no();
        });
        $keyType = $typeResult->getType();
        if ($keyType instanceof ErrorType) {
            return $typeResult->getUnknownClassErrors();
        }
        $isString = $keyType->isString();
        if ($isString->no()) {
            return [];
        }
        return [RuleErrorBuilder::message(sprintf('Array unpacking cannot be used on an array with %sstring keys: %s', $isString->yes() ? '' : 'potential ', $scope->getType($node->value)->describe(VerbosityLevel::value())))->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Arrays;

use PhpParser\Node;
use PhpParser\Node\Expr\ArrayDimFetch;
use PhpParser\Node\Expr\Assign;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Properties\PropertyReflectionFinder;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\IntegerType;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @deprecated Replaced by PHPStan\Rules\Properties\TypesAssignedToPropertiesRule
 * @implements Rule<Node\Expr\Assign>
 */
class AppendedArrayKeyTypeRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Properties\PropertyReflectionFinder
     */
    private $propertyReflectionFinder;
    /**
     * @var bool
     */
    private $checkUnionTypes;
    public function __construct(PropertyReflectionFinder $propertyReflectionFinder, bool $checkUnionTypes)
    {
        $this->propertyReflectionFinder = $propertyReflectionFinder;
        $this->checkUnionTypes = $checkUnionTypes;
    }
    public function getNodeType() : string
    {
        return Assign::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->var instanceof ArrayDimFetch) {
            return [];
        }
        if (!$node->var->var instanceof Node\Expr\PropertyFetch && !$node->var->var instanceof Node\Expr\StaticPropertyFetch) {
            return [];
        }
        $propertyReflection = $this->propertyReflectionFinder->findPropertyReflectionFromNode($node->var->var, $scope);
        if ($propertyReflection === null) {
            return [];
        }
        $arrayType = $propertyReflection->getReadableType();
        if (!$arrayType->isArray()->yes()) {
            return [];
        }
        if ($node->var->dim !== null) {
            $dimensionType = $scope->getType($node->var->dim);
            $isValidKey = \PHPStan\Rules\Arrays\AllowedArrayKeysTypes::getType()->isSuperTypeOf($dimensionType);
            if (!$isValidKey->yes()) {
                // already handled by InvalidKeyInArrayDimFetchRule
                return [];
            }
            $keyType = $dimensionType->toArrayKey();
            if (!$this->checkUnionTypes && $keyType instanceof UnionType) {
                return [];
            }
        } else {
            $keyType = new IntegerType();
        }
        if (!$arrayType->getIterableKeyType()->isSuperTypeOf($keyType)->yes()) {
            $verbosity = VerbosityLevel::getRecommendedLevelByType($arrayType->getIterableKeyType(), $keyType);
            return [RuleErrorBuilder::message(sprintf('Array (%s) does not accept key %s.', $arrayType->describe($verbosity), $keyType->describe(VerbosityLevel::value())))->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Arrays;

use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\Assign;
use PhpParser\Node\Expr\AssignOp;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\ErrorType;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<Expr>
 */
class OffsetAccessValueAssignmentRule implements Rule
{
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    public function __construct(RuleLevelHelper $ruleLevelHelper)
    {
        $this->ruleLevelHelper = $ruleLevelHelper;
    }
    public function getNodeType() : string
    {
        return Expr::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node instanceof Assign && !$node instanceof AssignOp && !$node instanceof Expr\AssignRef) {
            return [];
        }
        if (!$node->var instanceof Expr\ArrayDimFetch) {
            return [];
        }
        $arrayDimFetch = $node->var;
        if ($node instanceof Assign || $node instanceof Expr\AssignRef) {
            $assignedValueType = $scope->getType($node->expr);
        } else {
            $assignedValueType = $scope->getType($node);
        }
        $arrayTypeResult = $this->ruleLevelHelper->findTypeToCheck($scope, $arrayDimFetch->var, '', static function (Type $varType) use($assignedValueType) : bool {
            $result = $varType->setOffsetValueType(new MixedType(), $assignedValueType);
            return !$result instanceof ErrorType;
        });
        $arrayType = $arrayTypeResult->getType();
        if ($arrayType instanceof ErrorType) {
            return [];
        }
        $isOffsetAccessible = $arrayType->isOffsetAccessible();
        if (!$isOffsetAccessible->yes()) {
            return [];
        }
        $resultType = $arrayType->setOffsetValueType(new MixedType(), $assignedValueType);
        if (!$resultType instanceof ErrorType) {
            return [];
        }
        $originalArrayType = $scope->getType($arrayDimFetch->var);
        return [RuleErrorBuilder::message(sprintf('%s does not accept %s.', $originalArrayType->describe(VerbosityLevel::value()), $assignedValueType->describe(VerbosityLevel::typeOnly())))->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Arrays;

use PhpParser\Node\Expr;
use PHPStan\Analyser\NullsafeOperatorHelper;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\BenevolentUnionType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeUtils;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
class NonexistentOffsetInArrayDimFetchCheck
{
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    /**
     * @var bool
     */
    private $reportMaybes;
    /**
     * @var bool
     */
    private $bleedingEdge;
    public function __construct(RuleLevelHelper $ruleLevelHelper, bool $reportMaybes, bool $bleedingEdge)
    {
        $this->ruleLevelHelper = $ruleLevelHelper;
        $this->reportMaybes = $reportMaybes;
        $this->bleedingEdge = $bleedingEdge;
    }
    /**
     * @return RuleError[]
     */
    public function check(Scope $scope, Expr $var, string $unknownClassPattern, Type $dimType) : array
    {
        $typeResult = $this->ruleLevelHelper->findTypeToCheck($scope, NullsafeOperatorHelper::getNullsafeShortcircuitedExprRespectingScope($scope, $var), $unknownClassPattern, static function (Type $type) use($dimType) : bool {
            return $type->hasOffsetValueType($dimType)->yes();
        });
        $type = $typeResult->getType();
        if ($type instanceof ErrorType) {
            return $typeResult->getUnknownClassErrors();
        }
        if ($scope->isInExpressionAssign($var) || $scope->isUndefinedExpressionAllowed($var)) {
            return [];
        }
        if ($type->hasOffsetValueType($dimType)->no()) {
            return [RuleErrorBuilder::message(sprintf('Offset %s does not exist on %s.', $dimType->describe(VerbosityLevel::value()), $type->describe(VerbosityLevel::value())))->build()];
        }
        if ($this->reportMaybes) {
            $report = \false;
            if ($type instanceof BenevolentUnionType) {
                $flattenedTypes = [$type];
            } else {
                $flattenedTypes = TypeUtils::flattenTypes($type);
            }
            foreach ($flattenedTypes as $innerType) {
                if ($dimType instanceof UnionType) {
                    if ($innerType->hasOffsetValueType($dimType)->no()) {
                        $report = \true;
                        break;
                    }
                    continue;
                }
                foreach (TypeUtils::flattenTypes($dimType) as $innerDimType) {
                    if ($innerType->hasOffsetValueType($innerDimType)->no()) {
                        $report = \true;
                        break 2;
                    }
                }
            }
            if ($report) {
                if ($this->bleedingEdge) {
                    return [RuleErrorBuilder::message(sprintf('Offset %s might not exist on %s.', $dimType->describe(VerbosityLevel::value()), $type->describe(VerbosityLevel::value())))->build()];
                }
                return [RuleErrorBuilder::message(sprintf('Offset %s does not exist on %s.', $dimType->describe(VerbosityLevel::value()), $type->describe(VerbosityLevel::value())))->build()];
            }
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Arrays;

use PhpParser\Node;
use PhpParser\Node\Expr\ArrayDimFetch;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\ErrorType;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<Node\Expr\AssignOp>
 */
class OffsetAccessAssignOpRule implements Rule
{
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    public function __construct(RuleLevelHelper $ruleLevelHelper)
    {
        $this->ruleLevelHelper = $ruleLevelHelper;
    }
    public function getNodeType() : string
    {
        return Node\Expr\AssignOp::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->var instanceof ArrayDimFetch) {
            return [];
        }
        $arrayDimFetch = $node->var;
        $potentialDimType = null;
        if ($arrayDimFetch->dim !== null) {
            $potentialDimType = $scope->getType($arrayDimFetch->dim);
        }
        $varTypeResult = $this->ruleLevelHelper->findTypeToCheck($scope, $arrayDimFetch->var, '', static function (Type $varType) use($potentialDimType) : bool {
            $arrayDimType = $varType->setOffsetValueType($potentialDimType, new MixedType());
            return !$arrayDimType instanceof ErrorType;
        });
        $varType = $varTypeResult->getType();
        if ($arrayDimFetch->dim !== null) {
            $dimTypeResult = $this->ruleLevelHelper->findTypeToCheck($scope, $arrayDimFetch->dim, '', static function (Type $dimType) use($varType) : bool {
                $arrayDimType = $varType->setOffsetValueType($dimType, new MixedType());
                return !$arrayDimType instanceof ErrorType;
            });
            $dimType = $dimTypeResult->getType();
            if ($varType->hasOffsetValueType($dimType)->no()) {
                return [];
            }
        } else {
            $dimType = $potentialDimType;
        }
        $resultType = $varType->setOffsetValueType($dimType, new MixedType());
        if (!$resultType instanceof ErrorType) {
            return [];
        }
        if ($dimType === null) {
            return [RuleErrorBuilder::message(sprintf('Cannot assign new offset to %s.', $varType->describe(VerbosityLevel::typeOnly())))->build()];
        }
        return [RuleErrorBuilder::message(sprintf('Cannot assign offset %s to %s.', $dimType->describe(VerbosityLevel::value()), $varType->describe(VerbosityLevel::typeOnly())))->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Arrays;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\LiteralArrayNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<LiteralArrayNode>
 */
class UnpackIterableInArrayRule implements Rule
{
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    public function __construct(RuleLevelHelper $ruleLevelHelper)
    {
        $this->ruleLevelHelper = $ruleLevelHelper;
    }
    public function getNodeType() : string
    {
        return LiteralArrayNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $errors = [];
        foreach ($node->getItemNodes() as $itemNode) {
            $item = $itemNode->getArrayItem();
            if ($item === null) {
                continue;
            }
            if (!$item->unpack) {
                continue;
            }
            $typeResult = $this->ruleLevelHelper->findTypeToCheck($scope, $item->value, '', static function (Type $type) : bool {
                return $type->isIterable()->yes();
            });
            $type = $typeResult->getType();
            if ($type instanceof ErrorType) {
                continue;
            }
            if ($type->isIterable()->yes()) {
                continue;
            }
            $errors[] = RuleErrorBuilder::message(sprintf('Only iterables can be unpacked, %s given.', $type->describe(VerbosityLevel::typeOnly())))->line($item->getLine())->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Arrays;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
/**
 * @implements Rule<Node\Expr\ArrayDimFetch>
 */
class OffsetAccessWithoutDimForReadingRule implements Rule
{
    public function getNodeType() : string
    {
        return Node\Expr\ArrayDimFetch::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if ($scope->isInExpressionAssign($node)) {
            return [];
        }
        if ($node->dim !== null) {
            return [];
        }
        return [RuleErrorBuilder::message('Cannot use [] for reading.')->nonIgnorable()->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Arrays;

use PhpParser\Node;
use PhpParser\Node\Expr\ArrayDimFetch;
use PhpParser\Node\Expr\Assign;
use PhpParser\Node\Expr\AssignOp;
use PhpParser\Node\Expr\AssignRef;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Properties\PropertyReflectionFinder;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @deprecated Replaced by PHPStan\Rules\Properties\TypesAssignedToPropertiesRule
 * @implements Rule<Node\Expr>
 */
class AppendedArrayItemTypeRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Properties\PropertyReflectionFinder
     */
    private $propertyReflectionFinder;
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    public function __construct(PropertyReflectionFinder $propertyReflectionFinder, RuleLevelHelper $ruleLevelHelper)
    {
        $this->propertyReflectionFinder = $propertyReflectionFinder;
        $this->ruleLevelHelper = $ruleLevelHelper;
    }
    public function getNodeType() : string
    {
        return Node\Expr::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node instanceof Assign && !$node instanceof AssignOp && !$node instanceof AssignRef) {
            return [];
        }
        if (!$node->var instanceof ArrayDimFetch) {
            return [];
        }
        if (!$node->var->var instanceof Node\Expr\PropertyFetch && !$node->var->var instanceof Node\Expr\StaticPropertyFetch) {
            return [];
        }
        $propertyReflection = $this->propertyReflectionFinder->findPropertyReflectionFromNode($node->var->var, $scope);
        if ($propertyReflection === null) {
            return [];
        }
        $assignedToType = $propertyReflection->getWritableType();
        if (!$assignedToType->isArray()->yes()) {
            return [];
        }
        if ($node instanceof Assign || $node instanceof AssignRef) {
            $assignedValueType = $scope->getType($node->expr);
        } else {
            $assignedValueType = $scope->getType($node);
        }
        $itemType = $assignedToType->getIterableValueType();
        $accepts = $this->ruleLevelHelper->acceptsWithReason($itemType, $assignedValueType, $scope->isDeclareStrictTypes());
        if (!$accepts->result) {
            $verbosityLevel = VerbosityLevel::getRecommendedLevelByType($itemType, $assignedValueType);
            return [RuleErrorBuilder::message(sprintf('Array (%s) does not accept %s.', $assignedToType->describe($verbosityLevel), $assignedValueType->describe($verbosityLevel)))->acceptsReasonsTip($accepts->reasons)->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Arrays;

use PhpParser\Node;
use PHPStan\Analyser\NullsafeOperatorHelper;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<Node\Expr\ArrayDimFetch>
 */
class NonexistentOffsetInArrayDimFetchRule implements Rule
{
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    /**
     * @var \PHPStan\Rules\Arrays\NonexistentOffsetInArrayDimFetchCheck
     */
    private $nonexistentOffsetInArrayDimFetchCheck;
    /**
     * @var bool
     */
    private $reportMaybes;
    public function __construct(RuleLevelHelper $ruleLevelHelper, \PHPStan\Rules\Arrays\NonexistentOffsetInArrayDimFetchCheck $nonexistentOffsetInArrayDimFetchCheck, bool $reportMaybes)
    {
        $this->ruleLevelHelper = $ruleLevelHelper;
        $this->nonexistentOffsetInArrayDimFetchCheck = $nonexistentOffsetInArrayDimFetchCheck;
        $this->reportMaybes = $reportMaybes;
    }
    public function getNodeType() : string
    {
        return Node\Expr\ArrayDimFetch::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if ($node->dim !== null) {
            $dimType = $scope->getType($node->dim);
            $unknownClassPattern = sprintf('Access to offset %s on an unknown class %%s.', SprintfHelper::escapeFormatString($dimType->describe(VerbosityLevel::value())));
        } else {
            $dimType = null;
            $unknownClassPattern = 'Access to an offset on an unknown class %s.';
        }
        $isOffsetAccessibleTypeResult = $this->ruleLevelHelper->findTypeToCheck($scope, NullsafeOperatorHelper::getNullsafeShortcircuitedExprRespectingScope($scope, $node->var), $unknownClassPattern, static function (Type $type) : bool {
            return $type->isOffsetAccessible()->yes();
        });
        $isOffsetAccessibleType = $isOffsetAccessibleTypeResult->getType();
        if ($isOffsetAccessibleType instanceof ErrorType) {
            return $isOffsetAccessibleTypeResult->getUnknownClassErrors();
        }
        $isOffsetAccessible = $isOffsetAccessibleType->isOffsetAccessible();
        if ($scope->isInExpressionAssign($node) && $isOffsetAccessible->yes()) {
            return [];
        }
        if ($scope->isUndefinedExpressionAllowed($node) && !$isOffsetAccessible->no()) {
            return [];
        }
        if (!$isOffsetAccessible->yes()) {
            if ($isOffsetAccessible->no() || $this->reportMaybes) {
                if ($dimType !== null) {
                    return [RuleErrorBuilder::message(sprintf('Cannot access offset %s on %s.', $dimType->describe(VerbosityLevel::value()), $isOffsetAccessibleType->describe(VerbosityLevel::value())))->build()];
                }
                return [RuleErrorBuilder::message(sprintf('Cannot access an offset on %s.', $isOffsetAccessibleType->describe(VerbosityLevel::typeOnly())))->build()];
            }
            return [];
        }
        if ($dimType === null || $scope->hasExpressionType($node)->yes()) {
            return [];
        }
        return $this->nonexistentOffsetInArrayDimFetchCheck->check($scope, $node->var, $unknownClassPattern, $dimType);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Arrays;

use PhpParser\Node;
use PHPStan\Analyser\NullsafeOperatorHelper;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\ErrorType;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<Node\Expr\ArrayDimFetch>
 */
class OffsetAccessAssignmentRule implements Rule
{
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    public function __construct(RuleLevelHelper $ruleLevelHelper)
    {
        $this->ruleLevelHelper = $ruleLevelHelper;
    }
    public function getNodeType() : string
    {
        return Node\Expr\ArrayDimFetch::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$scope->isInExpressionAssign($node)) {
            return [];
        }
        $potentialDimType = null;
        if ($node->dim !== null) {
            $potentialDimType = $scope->getType($node->dim);
        }
        $varTypeResult = $this->ruleLevelHelper->findTypeToCheck($scope, NullsafeOperatorHelper::getNullsafeShortcircuitedExprRespectingScope($scope, $node->var), '', static function (Type $varType) use($potentialDimType) : bool {
            $arrayDimType = $varType->setOffsetValueType($potentialDimType, new MixedType());
            return !$arrayDimType instanceof ErrorType;
        });
        $varType = $varTypeResult->getType();
        if ($varType instanceof ErrorType) {
            return [];
        }
        if (!$varType->isOffsetAccessible()->yes()) {
            return [];
        }
        if ($node->dim !== null) {
            $dimTypeResult = $this->ruleLevelHelper->findTypeToCheck($scope, $node->dim, '', static function (Type $dimType) use($varType) : bool {
                $arrayDimType = $varType->setOffsetValueType($dimType, new MixedType());
                return !$arrayDimType instanceof ErrorType;
            });
            $dimType = $dimTypeResult->getType();
        } else {
            $dimType = $potentialDimType;
        }
        $resultType = $varType->setOffsetValueType($dimType, new MixedType());
        if (!$resultType instanceof ErrorType) {
            return [];
        }
        if ($dimType === null) {
            return [RuleErrorBuilder::message(sprintf('Cannot assign new offset to %s.', $varType->describe(VerbosityLevel::typeOnly())))->build()];
        }
        return [RuleErrorBuilder::message(sprintf('Cannot assign offset %s to %s.', $dimType->describe(VerbosityLevel::value()), $varType->describe(VerbosityLevel::typeOnly())))->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Arrays;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\MixedType;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<Node\Expr\ArrayItem>
 */
class InvalidKeyInArrayItemRule implements Rule
{
    /**
     * @var bool
     */
    private $reportMaybes;
    public function __construct(bool $reportMaybes)
    {
        $this->reportMaybes = $reportMaybes;
    }
    public function getNodeType() : string
    {
        return Node\Expr\ArrayItem::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if ($node->key === null) {
            return [];
        }
        $dimensionType = $scope->getType($node->key);
        $isSuperType = \PHPStan\Rules\Arrays\AllowedArrayKeysTypes::getType()->isSuperTypeOf($dimensionType);
        if ($isSuperType->no()) {
            return [RuleErrorBuilder::message(sprintf('Invalid array key type %s.', $dimensionType->describe(VerbosityLevel::typeOnly())))->build()];
        } elseif ($this->reportMaybes && $isSuperType->maybe() && !$dimensionType instanceof MixedType) {
            return [RuleErrorBuilder::message(sprintf('Possibly invalid array key type %s.', $dimensionType->describe(VerbosityLevel::typeOnly())))->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Arrays;

use ArrayAccess;
use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\Assign;
use PHPStan\Analyser\Scope;
use PHPStan\Node\Expr\TypeExpr;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use function array_merge;
use function sprintf;
/**
 * @implements Rule<Assign>
 */
class ArrayDestructuringRule implements Rule
{
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    /**
     * @var \PHPStan\Rules\Arrays\NonexistentOffsetInArrayDimFetchCheck
     */
    private $nonexistentOffsetInArrayDimFetchCheck;
    public function __construct(RuleLevelHelper $ruleLevelHelper, \PHPStan\Rules\Arrays\NonexistentOffsetInArrayDimFetchCheck $nonexistentOffsetInArrayDimFetchCheck)
    {
        $this->ruleLevelHelper = $ruleLevelHelper;
        $this->nonexistentOffsetInArrayDimFetchCheck = $nonexistentOffsetInArrayDimFetchCheck;
    }
    public function getNodeType() : string
    {
        return Assign::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->var instanceof Node\Expr\List_ && !$node->var instanceof Node\Expr\Array_) {
            return [];
        }
        return $this->getErrors($scope, $node->var, $node->expr);
    }
    /**
     * @param Node\Expr\List_|Node\Expr\Array_ $var
     * @return RuleError[]
     */
    private function getErrors(Scope $scope, Expr $var, Expr $expr) : array
    {
        $exprTypeResult = $this->ruleLevelHelper->findTypeToCheck($scope, $expr, '', static function (Type $varType) : bool {
            return $varType->isArray()->yes() || (new ObjectType(ArrayAccess::class))->isSuperTypeOf($varType)->yes();
        });
        $exprType = $exprTypeResult->getType();
        if ($exprType instanceof ErrorType) {
            return [];
        }
        if (!$exprType->isArray()->yes() && !(new ObjectType(ArrayAccess::class))->isSuperTypeOf($exprType)->yes()) {
            return [RuleErrorBuilder::message(sprintf('Cannot use array destructuring on %s.', $exprType->describe(VerbosityLevel::typeOnly())))->build()];
        }
        $errors = [];
        $i = 0;
        foreach ($var->items as $item) {
            if ($item === null) {
                $i++;
                continue;
            }
            $keyExpr = null;
            if ($item->key === null) {
                $keyType = new ConstantIntegerType($i);
                $keyExpr = new Node\Scalar\LNumber($i);
            } else {
                $keyType = $scope->getType($item->key);
                $keyExpr = new TypeExpr($keyType);
            }
            $itemErrors = $this->nonexistentOffsetInArrayDimFetchCheck->check($scope, $expr, '', $keyType);
            $errors = array_merge($errors, $itemErrors);
            if (!$item->value instanceof Node\Expr\List_ && !$item->value instanceof Node\Expr\Array_) {
                $i++;
                continue;
            }
            $errors = array_merge($errors, $this->getErrors($scope, $item->value, new Expr\ArrayDimFetch($expr, $keyExpr)));
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Arrays;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InForeachNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<InForeachNode>
 */
class IterableInForeachRule implements Rule
{
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    public function __construct(RuleLevelHelper $ruleLevelHelper)
    {
        $this->ruleLevelHelper = $ruleLevelHelper;
    }
    public function getNodeType() : string
    {
        return InForeachNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $originalNode = $node->getOriginalNode();
        $typeResult = $this->ruleLevelHelper->findTypeToCheck($scope, $originalNode->expr, 'Iterating over an object of an unknown class %s.', static function (Type $type) : bool {
            return $type->isIterable()->yes();
        });
        $type = $typeResult->getType();
        if ($type instanceof ErrorType) {
            return $typeResult->getUnknownClassErrors();
        }
        if ($type->isIterable()->yes()) {
            return [];
        }
        return [RuleErrorBuilder::message(sprintf('Argument of an invalid type %s supplied for foreach, only iterables are supported.', $type->describe(VerbosityLevel::typeOnly())))->line($originalNode->expr->getLine())->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\DeadCode;

use PhpParser\Node;
use PhpParser\Node\Identifier;
use PHPStan\Analyser\Scope;
use PHPStan\Node\ClassMethodsNode;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Constant\ConstantStringType;
use function array_map;
use function count;
use function sprintf;
use function strtolower;
/**
 * @implements Rule<ClassMethodsNode>
 */
class UnusedPrivateMethodRule implements Rule
{
    public function getNodeType() : string
    {
        return ClassMethodsNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->getClass() instanceof Node\Stmt\Class_ && !$node->getClass() instanceof Node\Stmt\Enum_) {
            return [];
        }
        if (!$scope->isInClass()) {
            throw new ShouldNotHappenException();
        }
        $classReflection = $scope->getClassReflection();
        $constructor = null;
        if ($classReflection->hasConstructor()) {
            $constructor = $classReflection->getConstructor();
        }
        $methods = [];
        foreach ($node->getMethods() as $method) {
            if (!$method->getNode()->isPrivate()) {
                continue;
            }
            if ($method->isDeclaredInTrait()) {
                continue;
            }
            $methodName = $method->getNode()->name->toString();
            if ($constructor !== null && $constructor->getName() === $methodName) {
                continue;
            }
            if (strtolower($methodName) === '__clone') {
                continue;
            }
            $methods[$methodName] = $method;
        }
        $arrayCalls = [];
        foreach ($node->getMethodCalls() as $methodCall) {
            $methodCallNode = $methodCall->getNode();
            if ($methodCallNode instanceof Node\Expr\Array_) {
                $arrayCalls[] = $methodCall;
                continue;
            }
            $callScope = $methodCall->getScope();
            if ($methodCallNode->name instanceof Identifier) {
                $methodNames = [$methodCallNode->name->toString()];
            } else {
                $methodNameType = $callScope->getType($methodCallNode->name);
                $strings = $methodNameType->getConstantStrings();
                if (count($strings) === 0) {
                    return [];
                }
                $methodNames = array_map(static function (ConstantStringType $type) : string {
                    return $type->getValue();
                }, $strings);
            }
            if ($methodCallNode instanceof Node\Expr\MethodCall) {
                $calledOnType = $callScope->getType($methodCallNode->var);
            } else {
                if (!$methodCallNode->class instanceof Node\Name) {
                    continue;
                }
                $calledOnType = $scope->resolveTypeByName($methodCallNode->class);
            }
            $inMethod = $callScope->getFunction();
            if (!$inMethod instanceof MethodReflection) {
                continue;
            }
            foreach ($methodNames as $methodName) {
                $methodReflection = $callScope->getMethodReflection($calledOnType, $methodName);
                if ($methodReflection === null) {
                    continue;
                }
                if ($methodReflection->getDeclaringClass()->getName() !== $classReflection->getName()) {
                    continue;
                }
                if ($inMethod->getName() === $methodName) {
                    continue;
                }
                unset($methods[$methodName]);
            }
        }
        if (count($methods) > 0) {
            foreach ($arrayCalls as $arrayCall) {
                /** @var Node\Expr\Array_ $array */
                $array = $arrayCall->getNode();
                $arrayScope = $arrayCall->getScope();
                $arrayType = $arrayScope->getType($array);
                if (!$arrayType->isCallable()->yes()) {
                    continue;
                }
                foreach ($arrayType->getConstantArrays() as $constantArray) {
                    foreach ($constantArray->findTypeAndMethodNames() as $typeAndMethod) {
                        if ($typeAndMethod->isUnknown()) {
                            return [];
                        }
                        if (!$typeAndMethod->getCertainty()->yes()) {
                            return [];
                        }
                        $calledOnType = $typeAndMethod->getType();
                        $methodReflection = $arrayScope->getMethodReflection($calledOnType, $typeAndMethod->getMethod());
                        if ($methodReflection === null) {
                            continue;
                        }
                        if ($methodReflection->getDeclaringClass()->getName() !== $classReflection->getName()) {
                            continue;
                        }
                        $inMethod = $arrayScope->getFunction();
                        if (!$inMethod instanceof MethodReflection) {
                            continue;
                        }
                        if ($inMethod->getName() === $typeAndMethod->getMethod()) {
                            continue;
                        }
                        unset($methods[$typeAndMethod->getMethod()]);
                    }
                }
            }
        }
        $errors = [];
        foreach ($methods as $methodName => $method) {
            $methodType = 'Method';
            if ($method->getNode()->isStatic()) {
                $methodType = 'Static method';
            }
            $errors[] = RuleErrorBuilder::message(sprintf('%s %s::%s() is unused.', $methodType, $classReflection->getDisplayName(), $methodName))->line($method->getNode()->getLine())->identifier('deadCode.unusedMethod')->metadata(['classOrder' => $node->getClass()->getAttribute('statementOrder'), 'classDepth' => $node->getClass()->getAttribute('statementDepth'), 'classStartLine' => $node->getClass()->getStartLine(), 'methodName' => $methodName])->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\DeadCode;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\UnreachableStatementNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
/**
 * @implements Rule<UnreachableStatementNode>
 */
class UnreachableStatementRule implements Rule
{
    public function getNodeType() : string
    {
        return UnreachableStatementNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        return [RuleErrorBuilder::message('Unreachable statement - code above always terminates.')->identifier('deadCode.unreachableStatement')->metadata(['depth' => $node->getAttribute('statementDepth'), 'order' => $node->getAttribute('statementOrder')])->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\DeadCode;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\ClassConstantsNode;
use PHPStan\Rules\Constants\AlwaysUsedClassConstantsExtensionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use function sprintf;
/**
 * @implements Rule<ClassConstantsNode>
 */
class UnusedPrivateConstantRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Constants\AlwaysUsedClassConstantsExtensionProvider
     */
    private $extensionProvider;
    public function __construct(AlwaysUsedClassConstantsExtensionProvider $extensionProvider)
    {
        $this->extensionProvider = $extensionProvider;
    }
    public function getNodeType() : string
    {
        return ClassConstantsNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->getClass() instanceof Node\Stmt\Class_ && !$node->getClass() instanceof Node\Stmt\Enum_) {
            return [];
        }
        if (!$scope->isInClass()) {
            throw new ShouldNotHappenException();
        }
        $classReflection = $scope->getClassReflection();
        $constants = [];
        foreach ($node->getConstants() as $constant) {
            if (!$constant->isPrivate()) {
                continue;
            }
            foreach ($constant->consts as $const) {
                $constantName = $const->name->toString();
                $constantReflection = $classReflection->getConstant($constantName);
                foreach ($this->extensionProvider->getExtensions() as $extension) {
                    if ($extension->isAlwaysUsed($constantReflection)) {
                        continue 2;
                    }
                }
                $constants[$constantName] = $const;
            }
        }
        foreach ($node->getFetches() as $fetch) {
            $fetchNode = $fetch->getNode();
            if (!$fetchNode->name instanceof Node\Identifier) {
                continue;
            }
            $fetchScope = $fetch->getScope();
            if ($fetchNode->class instanceof Node\Name) {
                $fetchedOnClass = $fetchScope->resolveTypeByName($fetchNode->class);
            } else {
                $fetchedOnClass = $fetchScope->getType($fetchNode->class);
            }
            $constantReflection = $fetchScope->getConstantReflection($fetchedOnClass, $fetchNode->name->toString());
            if ($constantReflection === null) {
                continue;
            }
            if ($constantReflection->getDeclaringClass()->getName() !== $classReflection->getName()) {
                continue;
            }
            unset($constants[$fetchNode->name->toString()]);
        }
        $errors = [];
        foreach ($constants as $constantName => $constantNode) {
            $errors[] = RuleErrorBuilder::message(sprintf('Constant %s::%s is unused.', $classReflection->getDisplayName(), $constantName))->line($constantNode->getLine())->identifier('deadCode.unusedClassConstant')->metadata(['classOrder' => $node->getClass()->getAttribute('statementOrder'), 'classDepth' => $node->getClass()->getAttribute('statementDepth'), 'classStartLine' => $node->getClass()->getStartLine(), 'constantName' => $constantName])->tip(sprintf('See: %s', 'https://phpstan.org/developing-extensions/always-used-class-constants'))->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\DeadCode;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\Printer\ExprPrinter;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function sprintf;
/**
 * @implements Rule<Node\Stmt\Expression>
 */
class NoopRule implements Rule
{
    /**
     * @var \PHPStan\Node\Printer\ExprPrinter
     */
    private $exprPrinter;
    public function __construct(ExprPrinter $exprPrinter)
    {
        $this->exprPrinter = $exprPrinter;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\Expression::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $originalExpr = $node->expr;
        $expr = $originalExpr;
        if ($expr instanceof Node\Expr\Cast || $expr instanceof Node\Expr\UnaryMinus || $expr instanceof Node\Expr\UnaryPlus || $expr instanceof Node\Expr\ErrorSuppress) {
            $expr = $expr->expr;
        }
        if (!$expr instanceof Node\Expr\Variable && !$expr instanceof Node\Expr\PropertyFetch && !$expr instanceof Node\Expr\StaticPropertyFetch && !$expr instanceof Node\Expr\NullsafePropertyFetch && !$expr instanceof Node\Expr\ArrayDimFetch && !$expr instanceof Node\Scalar && !$expr instanceof Node\Expr\Isset_ && !$expr instanceof Node\Expr\Empty_ && !$expr instanceof Node\Expr\ConstFetch && !$expr instanceof Node\Expr\ClassConstFetch) {
            return [];
        }
        return [RuleErrorBuilder::message(sprintf('Expression "%s" on a separate line does not do anything.', $this->exprPrinter->printExpr($originalExpr)))->line($expr->getLine())->identifier('deadCode.noopExpression')->metadata(['depth' => $node->getAttribute('statementDepth'), 'order' => $node->getAttribute('statementOrder')])->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\DeadCode;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\ClassPropertiesNode;
use PHPStan\Node\Property\PropertyRead;
use PHPStan\Rules\Properties\ReadWritePropertiesExtensionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Constant\ConstantStringType;
use function array_key_exists;
use function array_map;
use function count;
use function sprintf;
use function strpos;
/**
 * @implements Rule<ClassPropertiesNode>
 */
class UnusedPrivatePropertyRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Properties\ReadWritePropertiesExtensionProvider
     */
    private $extensionProvider;
    /**
     * @var string[]
     */
    private $alwaysWrittenTags;
    /**
     * @var string[]
     */
    private $alwaysReadTags;
    /**
     * @var bool
     */
    private $checkUninitializedProperties;
    /**
     * @param string[] $alwaysWrittenTags
     * @param string[] $alwaysReadTags
     */
    public function __construct(ReadWritePropertiesExtensionProvider $extensionProvider, array $alwaysWrittenTags, array $alwaysReadTags, bool $checkUninitializedProperties)
    {
        $this->extensionProvider = $extensionProvider;
        $this->alwaysWrittenTags = $alwaysWrittenTags;
        $this->alwaysReadTags = $alwaysReadTags;
        $this->checkUninitializedProperties = $checkUninitializedProperties;
    }
    public function getNodeType() : string
    {
        return ClassPropertiesNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->getClass() instanceof Node\Stmt\Class_) {
            return [];
        }
        if (!$scope->isInClass()) {
            throw new ShouldNotHappenException();
        }
        $classReflection = $scope->getClassReflection();
        $properties = [];
        foreach ($node->getProperties() as $property) {
            if (!$property->isPrivate()) {
                continue;
            }
            if ($property->isDeclaredInTrait()) {
                continue;
            }
            $alwaysRead = \false;
            $alwaysWritten = \false;
            if ($property->getPhpDoc() !== null) {
                $text = $property->getPhpDoc();
                foreach ($this->alwaysReadTags as $tag) {
                    if (strpos($text, $tag) === \false) {
                        continue;
                    }
                    $alwaysRead = \true;
                    break;
                }
                foreach ($this->alwaysWrittenTags as $tag) {
                    if (strpos($text, $tag) === \false) {
                        continue;
                    }
                    $alwaysWritten = \true;
                    break;
                }
            }
            $propertyName = $property->getName();
            if (!$alwaysRead || !$alwaysWritten) {
                if (!$classReflection->hasNativeProperty($propertyName)) {
                    continue;
                }
                $propertyReflection = $classReflection->getNativeProperty($propertyName);
                foreach ($this->extensionProvider->getExtensions() as $extension) {
                    if ($alwaysRead && $alwaysWritten) {
                        break;
                    }
                    if (!$alwaysRead && $extension->isAlwaysRead($propertyReflection, $propertyName)) {
                        $alwaysRead = \true;
                    }
                    if ($alwaysWritten || !$extension->isAlwaysWritten($propertyReflection, $propertyName)) {
                        continue;
                    }
                    $alwaysWritten = \true;
                }
            }
            $read = $alwaysRead;
            $written = $alwaysWritten || $property->getDefault() !== null;
            $properties[$propertyName] = ['read' => $read, 'written' => $written, 'node' => $property];
        }
        foreach ($node->getPropertyUsages() as $usage) {
            $fetch = $usage->getFetch();
            if ($fetch->name instanceof Node\Identifier) {
                $propertyNames = [$fetch->name->toString()];
            } else {
                $propertyNameType = $usage->getScope()->getType($fetch->name);
                $strings = $propertyNameType->getConstantStrings();
                if (count($strings) === 0) {
                    return [];
                }
                $propertyNames = array_map(static function (ConstantStringType $type) : string {
                    return $type->getValue();
                }, $strings);
            }
            if ($fetch instanceof Node\Expr\PropertyFetch) {
                $fetchedOnType = $usage->getScope()->getType($fetch->var);
            } else {
                if (!$fetch->class instanceof Node\Name) {
                    continue;
                }
                $fetchedOnType = $usage->getScope()->resolveTypeByName($fetch->class);
            }
            foreach ($propertyNames as $propertyName) {
                if (!array_key_exists($propertyName, $properties)) {
                    continue;
                }
                $propertyReflection = $usage->getScope()->getPropertyReflection($fetchedOnType, $propertyName);
                if ($propertyReflection === null) {
                    continue;
                }
                if ($propertyReflection->getDeclaringClass()->getName() !== $classReflection->getName()) {
                    continue;
                }
                if ($usage instanceof PropertyRead) {
                    $properties[$propertyName]['read'] = \true;
                } else {
                    $properties[$propertyName]['written'] = \true;
                }
            }
        }
        [$uninitializedProperties] = $node->getUninitializedProperties($scope, []);
        $errors = [];
        foreach ($properties as $name => $data) {
            $propertyNode = $data['node'];
            if ($propertyNode->isStatic()) {
                $propertyName = sprintf('Static property %s::$%s', $scope->getClassReflection()->getDisplayName(), $name);
            } else {
                $propertyName = sprintf('Property %s::$%s', $scope->getClassReflection()->getDisplayName(), $name);
            }
            $tip = sprintf('See: %s', 'https://phpstan.org/developing-extensions/always-read-written-properties');
            if (!$data['read']) {
                if (!$data['written']) {
                    $errors[] = RuleErrorBuilder::message(sprintf('%s is unused.', $propertyName))->line($propertyNode->getStartLine())->identifier('deadCode.unusedProperty')->metadata(['classOrder' => $node->getClass()->getAttribute('statementOrder'), 'classDepth' => $node->getClass()->getAttribute('statementDepth'), 'classStartLine' => $node->getClass()->getStartLine(), 'propertyName' => $name])->tip($tip)->build();
                } else {
                    $errors[] = RuleErrorBuilder::message(sprintf('%s is never read, only written.', $propertyName))->line($propertyNode->getStartLine())->tip($tip)->build();
                }
            } elseif (!$data['written'] && (!array_key_exists($name, $uninitializedProperties) || !$this->checkUninitializedProperties)) {
                $errors[] = RuleErrorBuilder::message(sprintf('%s is never written, only read.', $propertyName))->line($propertyNode->getStartLine())->tip($tip)->build();
            }
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Constants;

interface AlwaysUsedClassConstantsExtensionProvider
{
    public const EXTENSION_TAG = 'phpstan.constants.alwaysUsedClassConstantsExtension';
    /**
     * @return AlwaysUsedClassConstantsExtension[]
     */
    public function getExtensions() : array;
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Constants;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ClassConstantReflection;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ConstantReflection;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\VerbosityLevel;
use function array_merge;
use function sprintf;
/**
 * @implements Rule<Node\Stmt\ClassConst>
 */
class OverridingConstantRule implements Rule
{
    /**
     * @var bool
     */
    private $checkPhpDocMethodSignatures;
    public function __construct(bool $checkPhpDocMethodSignatures)
    {
        $this->checkPhpDocMethodSignatures = $checkPhpDocMethodSignatures;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\ClassConst::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$scope->isInClass()) {
            throw new ShouldNotHappenException();
        }
        $errors = [];
        foreach ($node->consts as $const) {
            $constantName = $const->name->toString();
            $errors = array_merge($errors, $this->processSingleConstant($scope->getClassReflection(), $constantName));
        }
        return $errors;
    }
    /**
     * @return RuleError[]
     */
    private function processSingleConstant(ClassReflection $classReflection, string $constantName) : array
    {
        $prototype = $this->findPrototype($classReflection, $constantName);
        if (!$prototype instanceof ClassConstantReflection) {
            return [];
        }
        $constantReflection = $classReflection->getConstant($constantName);
        if (!$constantReflection instanceof ClassConstantReflection) {
            return [];
        }
        $errors = [];
        if ($prototype->isFinal()) {
            $errors[] = RuleErrorBuilder::message(sprintf('Constant %s::%s overrides final constant %s::%s.', $classReflection->getDisplayName(), $constantReflection->getName(), $prototype->getDeclaringClass()->getDisplayName(), $prototype->getName()))->nonIgnorable()->build();
        }
        if ($prototype->isPublic()) {
            if (!$constantReflection->isPublic()) {
                $errors[] = RuleErrorBuilder::message(sprintf('%s constant %s::%s overriding public constant %s::%s should also be public.', $constantReflection->isPrivate() ? 'Private' : 'Protected', $constantReflection->getDeclaringClass()->getDisplayName(), $constantReflection->getName(), $prototype->getDeclaringClass()->getDisplayName(), $prototype->getName()))->nonIgnorable()->build();
            }
        } elseif ($constantReflection->isPrivate()) {
            $errors[] = RuleErrorBuilder::message(sprintf('Private constant %s::%s overriding protected constant %s::%s should be protected or public.', $constantReflection->getDeclaringClass()->getDisplayName(), $constantReflection->getName(), $prototype->getDeclaringClass()->getDisplayName(), $prototype->getName()))->nonIgnorable()->build();
        }
        if (!$this->checkPhpDocMethodSignatures) {
            return $errors;
        }
        if (!$prototype->hasPhpDocType()) {
            return $errors;
        }
        if (!$constantReflection->hasPhpDocType()) {
            return $errors;
        }
        if (!$prototype->getValueType()->isSuperTypeOf($constantReflection->getValueType())->yes()) {
            $errors[] = RuleErrorBuilder::message(sprintf('Type %s of constant %s::%s is not covariant with type %s of constant %s::%s.', $constantReflection->getValueType()->describe(VerbosityLevel::value()), $constantReflection->getDeclaringClass()->getDisplayName(), $constantReflection->getName(), $prototype->getValueType()->describe(VerbosityLevel::value()), $prototype->getDeclaringClass()->getDisplayName(), $prototype->getName()))->build();
        }
        return $errors;
    }
    private function findPrototype(ClassReflection $classReflection, string $constantName) : ?ConstantReflection
    {
        foreach ($classReflection->getImmediateInterfaces() as $immediateInterface) {
            if ($immediateInterface->hasConstant($constantName)) {
                return $immediateInterface->getConstant($constantName);
            }
        }
        $parentClass = $classReflection->getParentClass();
        if ($parentClass === null) {
            return null;
        }
        if (!$parentClass->hasConstant($constantName)) {
            return null;
        }
        $constant = $parentClass->getConstant($constantName);
        if ($constant->isPrivate()) {
            return null;
        }
        return $constant;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Constants;

use PhpParser\Node;
use PhpParser\Node\Stmt\ClassConst;
use PHPStan\Analyser\Scope;
use PHPStan\Php\PhpVersion;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
/** @implements Rule<ClassConst> */
class FinalConstantRule implements Rule
{
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
    }
    public function getNodeType() : string
    {
        return ClassConst::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->isFinal()) {
            return [];
        }
        if ($this->phpVersion->supportsFinalConstants()) {
            return [];
        }
        return [RuleErrorBuilder::message('Final class constants are supported only on PHP 8.1 and later.')->nonIgnorable()->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Constants;

use PHPStan\DependencyInjection\Container;
class LazyAlwaysUsedClassConstantsExtensionProvider implements \PHPStan\Rules\Constants\AlwaysUsedClassConstantsExtensionProvider
{
    /** @var AlwaysUsedClassConstantsExtension[]|null */
    private $extensions;
    /**
     * @var \PHPStan\DependencyInjection\Container
     */
    private $container;
    public function __construct(Container $container)
    {
        $this->container = $container;
    }
    public function getExtensions() : array
    {
        if ($this->extensions === null) {
            $this->extensions = $this->container->getServicesByTag(\PHPStan\Rules\Constants\AlwaysUsedClassConstantsExtensionProvider::EXTENSION_TAG);
        }
        return $this->extensions;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Constants;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function sprintf;
/**
 * @implements Rule<Node\Expr\ConstFetch>
 */
class ConstantRule implements Rule
{
    public function getNodeType() : string
    {
        return Node\Expr\ConstFetch::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$scope->hasConstant($node->name)) {
            return [RuleErrorBuilder::message(sprintf('Constant %s not found.', (string) $node->name))->discoveringSymbolsTip()->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Constants;

use PHPStan\Reflection\ConstantReflection;
/**
 * This is the extension interface to implement if you want to describe
 * always-used class constant.
 *
 * To register it in the configuration file use the `phpstan.constants.alwaysUsedClassConstantsExtension` service tag:
 *
 * ```
 * services:
 * 	-
 *		class: App\PHPStan\MyExtension
 *		tags:
 *			- phpstan.constants.alwaysUsedClassConstantsExtension
 * ```
 *
 * Learn more: https://phpstan.org/developing-extensions/always-used-class-constants
 *
 * @api
 */
interface AlwaysUsedClassConstantsExtension
{
    public function isAlwaysUsed(ConstantReflection $constant) : bool;
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Constants;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Rules\MissingTypehintCheck;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\VerbosityLevel;
use function array_merge;
use function implode;
use function sprintf;
/**
 * @implements Rule<Node\Stmt\ClassConst>
 */
final class MissingClassConstantTypehintRule implements Rule
{
    /**
     * @var \PHPStan\Rules\MissingTypehintCheck
     */
    private $missingTypehintCheck;
    public function __construct(MissingTypehintCheck $missingTypehintCheck)
    {
        $this->missingTypehintCheck = $missingTypehintCheck;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\ClassConst::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$scope->isInClass()) {
            throw new ShouldNotHappenException();
        }
        $errors = [];
        foreach ($node->consts as $const) {
            $constantName = $const->name->toString();
            $errors = array_merge($errors, $this->processSingleConstant($scope->getClassReflection(), $constantName));
        }
        return $errors;
    }
    /**
     * @return RuleError[]
     */
    private function processSingleConstant(ClassReflection $classReflection, string $constantName) : array
    {
        $constantReflection = $classReflection->getConstant($constantName);
        $constantType = $constantReflection->getValueType();
        $errors = [];
        foreach ($this->missingTypehintCheck->getIterableTypesWithMissingValueTypehint($constantType) as $iterableType) {
            $iterableTypeDescription = $iterableType->describe(VerbosityLevel::typeOnly());
            $errors[] = RuleErrorBuilder::message(sprintf('Constant %s::%s type has no value type specified in iterable type %s.', $constantReflection->getDeclaringClass()->getDisplayName(), $constantName, $iterableTypeDescription))->tip(MissingTypehintCheck::MISSING_ITERABLE_VALUE_TYPE_TIP)->build();
        }
        foreach ($this->missingTypehintCheck->getNonGenericObjectTypesWithGenericClass($constantType) as [$name, $genericTypeNames]) {
            $errors[] = RuleErrorBuilder::message(sprintf('Constant %s::%s with generic %s does not specify its types: %s', $constantReflection->getDeclaringClass()->getDisplayName(), $constantName, $name, implode(', ', $genericTypeNames)))->tip(MissingTypehintCheck::TURN_OFF_NON_GENERIC_CHECK_TIP)->build();
        }
        foreach ($this->missingTypehintCheck->getCallablesWithMissingSignature($constantType) as $callableType) {
            $errors[] = RuleErrorBuilder::message(sprintf('Constant %s::%s type has no signature specified for %s.', $constantReflection->getDeclaringClass()->getDisplayName(), $constantName, $callableType->describe(VerbosityLevel::typeOnly())))->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError27 implements RuleError, LineRuleError, TipRuleError, IdentifierRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $tip;
    /**
     * @var string
     */
    public $identifier;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError15 implements RuleError, LineRuleError, FileRuleError, TipRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $file;
    /**
     * @var string
     */
    public $tip;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError51 implements RuleError, LineRuleError, IdentifierRuleError, MetadataRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $identifier;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError23 implements RuleError, LineRuleError, FileRuleError, IdentifierRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $file;
    /**
     * @var string
     */
    public $identifier;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError67 implements RuleError, LineRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError19 implements RuleError, LineRuleError, IdentifierRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $identifier;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError105 implements RuleError, TipRuleError, MetadataRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $tip;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError113 implements RuleError, IdentifierRuleError, MetadataRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $identifier;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError103 implements RuleError, LineRuleError, FileRuleError, MetadataRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $file;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError89 implements RuleError, TipRuleError, IdentifierRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $tip;
    /**
     * @var string
     */
    public $identifier;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError33 implements RuleError, MetadataRuleError
{
    /**
     * @var string
     */
    public $message;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError77 implements RuleError, FileRuleError, TipRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $file;
    /**
     * @var string
     */
    public $tip;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError7 implements RuleError, LineRuleError, FileRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $file;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getFile() : string
    {
        return $this->file;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError97 implements RuleError, MetadataRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError71 implements RuleError, LineRuleError, FileRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $file;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getFile() : string
    {
        return $this->file;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError81 implements RuleError, IdentifierRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $identifier;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError127 implements RuleError, LineRuleError, FileRuleError, TipRuleError, IdentifierRuleError, MetadataRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $file;
    /**
     * @var string
     */
    public $tip;
    /**
     * @var string
     */
    public $identifier;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError53 implements RuleError, FileRuleError, IdentifierRuleError, MetadataRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $file;
    /**
     * @var string
     */
    public $identifier;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError49 implements RuleError, IdentifierRuleError, MetadataRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $identifier;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError109 implements RuleError, FileRuleError, TipRuleError, MetadataRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $file;
    /**
     * @var string
     */
    public $tip;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError95 implements RuleError, LineRuleError, FileRuleError, TipRuleError, IdentifierRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $file;
    /**
     * @var string
     */
    public $tip;
    /**
     * @var string
     */
    public $identifier;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError9 implements RuleError, TipRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $tip;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError37 implements RuleError, FileRuleError, MetadataRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $file;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError107 implements RuleError, LineRuleError, TipRuleError, MetadataRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $tip;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError125 implements RuleError, FileRuleError, TipRuleError, IdentifierRuleError, MetadataRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $file;
    /**
     * @var string
     */
    public $tip;
    /**
     * @var string
     */
    public $identifier;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError65 implements RuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    public function getMessage() : string
    {
        return $this->message;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError101 implements RuleError, FileRuleError, MetadataRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $file;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError57 implements RuleError, TipRuleError, IdentifierRuleError, MetadataRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $tip;
    /**
     * @var string
     */
    public $identifier;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError55 implements RuleError, LineRuleError, FileRuleError, IdentifierRuleError, MetadataRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $file;
    /**
     * @var string
     */
    public $identifier;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError99 implements RuleError, LineRuleError, MetadataRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError115 implements RuleError, LineRuleError, IdentifierRuleError, MetadataRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $identifier;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError11 implements RuleError, LineRuleError, TipRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $tip;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError91 implements RuleError, LineRuleError, TipRuleError, IdentifierRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $tip;
    /**
     * @var string
     */
    public $identifier;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError111 implements RuleError, LineRuleError, FileRuleError, TipRuleError, MetadataRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $file;
    /**
     * @var string
     */
    public $tip;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError25 implements RuleError, TipRuleError, IdentifierRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $tip;
    /**
     * @var string
     */
    public $identifier;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError39 implements RuleError, LineRuleError, FileRuleError, MetadataRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $file;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError59 implements RuleError, LineRuleError, TipRuleError, IdentifierRuleError, MetadataRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $tip;
    /**
     * @var string
     */
    public $identifier;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError121 implements RuleError, TipRuleError, IdentifierRuleError, MetadataRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $tip;
    /**
     * @var string
     */
    public $identifier;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError41 implements RuleError, TipRuleError, MetadataRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $tip;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError87 implements RuleError, LineRuleError, FileRuleError, IdentifierRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $file;
    /**
     * @var string
     */
    public $identifier;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError119 implements RuleError, LineRuleError, FileRuleError, IdentifierRuleError, MetadataRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $file;
    /**
     * @var string
     */
    public $identifier;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError5 implements RuleError, FileRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $file;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getFile() : string
    {
        return $this->file;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError117 implements RuleError, FileRuleError, IdentifierRuleError, MetadataRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $file;
    /**
     * @var string
     */
    public $identifier;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError93 implements RuleError, FileRuleError, TipRuleError, IdentifierRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $file;
    /**
     * @var string
     */
    public $tip;
    /**
     * @var string
     */
    public $identifier;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError79 implements RuleError, LineRuleError, FileRuleError, TipRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $file;
    /**
     * @var string
     */
    public $tip;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError29 implements RuleError, FileRuleError, TipRuleError, IdentifierRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $file;
    /**
     * @var string
     */
    public $tip;
    /**
     * @var string
     */
    public $identifier;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError17 implements RuleError, IdentifierRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $identifier;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError47 implements RuleError, LineRuleError, FileRuleError, TipRuleError, MetadataRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $file;
    /**
     * @var string
     */
    public $tip;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError73 implements RuleError, TipRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $tip;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError123 implements RuleError, LineRuleError, TipRuleError, IdentifierRuleError, MetadataRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $tip;
    /**
     * @var string
     */
    public $identifier;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError63 implements RuleError, LineRuleError, FileRuleError, TipRuleError, IdentifierRuleError, MetadataRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $file;
    /**
     * @var string
     */
    public $tip;
    /**
     * @var string
     */
    public $identifier;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError31 implements RuleError, LineRuleError, FileRuleError, TipRuleError, IdentifierRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $file;
    /**
     * @var string
     */
    public $tip;
    /**
     * @var string
     */
    public $identifier;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError83 implements RuleError, LineRuleError, IdentifierRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $identifier;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError69 implements RuleError, FileRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $file;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getFile() : string
    {
        return $this->file;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError3 implements RuleError, LineRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError13 implements RuleError, FileRuleError, TipRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $file;
    /**
     * @var string
     */
    public $tip;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError1 implements RuleError
{
    /**
     * @var string
     */
    public $message;
    public function getMessage() : string
    {
        return $this->message;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError85 implements RuleError, FileRuleError, IdentifierRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $file;
    /**
     * @var string
     */
    public $identifier;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError75 implements RuleError, LineRuleError, TipRuleError, NonIgnorableRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $tip;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError45 implements RuleError, FileRuleError, TipRuleError, MetadataRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $file;
    /**
     * @var string
     */
    public $tip;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError43 implements RuleError, LineRuleError, TipRuleError, MetadataRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /**
     * @var string
     */
    public $tip;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError21 implements RuleError, FileRuleError, IdentifierRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $file;
    /**
     * @var string
     */
    public $identifier;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError61 implements RuleError, FileRuleError, TipRuleError, IdentifierRuleError, MetadataRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var string
     */
    public $file;
    /**
     * @var string
     */
    public $tip;
    /**
     * @var string
     */
    public $identifier;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getFile() : string
    {
        return $this->file;
    }
    public function getTip() : string
    {
        return $this->tip;
    }
    public function getIdentifier() : string
    {
        return $this->identifier;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\RuleErrors;

use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\RuleError;
/**
 * @internal Use PHPStan\Rules\RuleErrorBuilder instead.
 */
class RuleError35 implements RuleError, LineRuleError, MetadataRuleError
{
    /**
     * @var string
     */
    public $message;
    /**
     * @var int
     */
    public $line;
    /** @var mixed[] */
    public $metadata;
    public function getMessage() : string
    {
        return $this->message;
    }
    public function getLine() : int
    {
        return $this->line;
    }
    /**
     * @return mixed[]
     */
    public function getMetadata() : array
    {
        return $this->metadata;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Traits;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\CollectedDataNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function sprintf;
use function strtolower;
/**
 * @implements Rule<CollectedDataNode>
 */
class NotAnalysedTraitRule implements Rule
{
    public function getNodeType() : string
    {
        return CollectedDataNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $traitDeclarationData = $node->get(\PHPStan\Rules\Traits\TraitDeclarationCollector::class);
        $traitUseData = $node->get(\PHPStan\Rules\Traits\TraitUseCollector::class);
        $declaredTraits = [];
        foreach ($traitDeclarationData as $file => $declaration) {
            foreach ($declaration as [$name, $line]) {
                $declaredTraits[strtolower($name)] = [$file, $name, $line];
            }
        }
        foreach ($traitUseData as $usedNamesData) {
            foreach ($usedNamesData as $usedNames) {
                foreach ($usedNames as $usedName) {
                    unset($declaredTraits[strtolower($usedName)]);
                }
            }
        }
        $errors = [];
        foreach ($declaredTraits as [$file, $name, $line]) {
            $errors[] = RuleErrorBuilder::message(sprintf('Trait %s is used zero times and is not analysed.', $name))->file($file)->line($line)->tip('See: https://phpstan.org/blog/how-phpstan-analyses-traits')->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Traits;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Collectors\Collector;
use function array_map;
use function array_values;
/**
 * @implements Collector<Node\Stmt\TraitUse, list<string>>
 */
class TraitUseCollector implements Collector
{
    public function getNodeType() : string
    {
        return Node\Stmt\TraitUse::class;
    }
    public function processNode(Node $node, Scope $scope)
    {
        return array_values(array_map(static function (Node\Name $traitName) {
            return $traitName->toString();
        }, $node->traits));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Traits;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Collectors\Collector;
/**
 * @implements Collector<Node\Stmt\Trait_, array{string, int}>
 */
class TraitDeclarationCollector implements Collector
{
    public function getNodeType() : string
    {
        return Node\Stmt\Trait_::class;
    }
    public function processNode(Node $node, Scope $scope)
    {
        if ($node->namespacedName === null) {
            return null;
        }
        return [$node->namespacedName->toString(), $node->getLine()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules;

use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ReflectionProvider;
use function sprintf;
use function strtolower;
class ClassCaseSensitivityCheck
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var bool
     */
    private $checkInternalClassCaseSensitivity;
    public function __construct(ReflectionProvider $reflectionProvider, bool $checkInternalClassCaseSensitivity)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->checkInternalClassCaseSensitivity = $checkInternalClassCaseSensitivity;
    }
    /**
     * @param ClassNameNodePair[] $pairs
     * @return RuleError[]
     */
    public function checkClassNames(array $pairs) : array
    {
        $errors = [];
        foreach ($pairs as $pair) {
            $className = $pair->getClassName();
            if (!$this->reflectionProvider->hasClass($className)) {
                continue;
            }
            $classReflection = $this->reflectionProvider->getClass($className);
            if (!$this->checkInternalClassCaseSensitivity && $classReflection->isBuiltin()) {
                continue;
                // skip built-in classes
            }
            $realClassName = $classReflection->getName();
            if (strtolower($realClassName) !== strtolower($className)) {
                continue;
                // skip class alias
            }
            if ($realClassName === $className) {
                continue;
            }
            $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf('%s %s referenced with incorrect case: %s.', $this->getTypeName($classReflection), $realClassName, $className))->line($pair->getNode()->getLine())->build();
        }
        return $errors;
    }
    private function getTypeName(ClassReflection $classReflection) : string
    {
        if ($classReflection->isInterface()) {
            return 'Interface';
        } elseif ($classReflection->isTrait()) {
            return 'Trait';
        } elseif ($classReflection->isEnum()) {
            return 'Enum';
        }
        return 'Class';
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules;

use PhpParser\Node;
interface Registry
{
    /**
     * @template TNodeType of Node
     * @phpstan-param class-string<TNodeType> $nodeType
     * @param Node $nodeType
     * @phpstan-return array<Rule<TNodeType>>
     * @return Rule[]
     */
    public function getRules(string $nodeType) : array;
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules;

use PhpParser\Node;
class ClassNameNodePair
{
    /**
     * @var string
     */
    private $className;
    /**
     * @var \PhpParser\Node
     */
    private $node;
    public function __construct(string $className, Node $node)
    {
        $this->className = $className;
        $this->node = $node;
    }
    public function getClassName() : string
    {
        return $this->className;
    }
    public function getNode() : Node
    {
        return $this->node;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules;

use PhpParser\Node;
use function class_implements;
use function class_parents;
class DirectRegistry implements \PHPStan\Rules\Registry
{
    /** @var Rule[][] */
    private $rules = [];
    /** @var Rule[][] */
    private $cache = [];
    /**
     * @param Rule[] $rules
     */
    public function __construct(array $rules)
    {
        foreach ($rules as $rule) {
            $this->rules[$rule->getNodeType()][] = $rule;
        }
    }
    /**
     * @template TNodeType of Node
     * @phpstan-param class-string<TNodeType> $nodeType
     * @param Node $nodeType
     * @phpstan-return array<Rule<TNodeType>>
     * @return Rule[]
     */
    public function getRules(string $nodeType) : array
    {
        if (!isset($this->cache[$nodeType])) {
            $parentNodeTypes = [$nodeType] + class_parents($nodeType) + class_implements($nodeType);
            $rules = [];
            foreach ($parentNodeTypes as $parentNodeType) {
                foreach ($this->rules[$parentNodeType] ?? [] as $rule) {
                    $rules[] = $rule;
                }
            }
            $this->cache[$nodeType] = $rules;
        }
        /**
         * @phpstan-var array<Rule<TNodeType>> $selectedRules
         * @var Rule[] $selectedRules
         */
        $selectedRules = $this->cache[$nodeType];
        return $selectedRules;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules;

use Generator;
use PhpParser\Node;
use PhpParser\Node\Expr;
use PHPStan\Analyser\Scope;
use PHPStan\Type\ErrorType;
use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeUtils;
use PHPStan\Type\VerbosityLevel;
use PHPStan\Type\VoidType;
use function sprintf;
class FunctionReturnTypeCheck
{
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    public function __construct(\PHPStan\Rules\RuleLevelHelper $ruleLevelHelper)
    {
        $this->ruleLevelHelper = $ruleLevelHelper;
    }
    /**
     * @return RuleError[]
     */
    public function checkReturnType(Scope $scope, Type $returnType, ?Expr $returnValue, Node $returnNode, string $emptyReturnStatementMessage, string $voidMessage, string $typeMismatchMessage, string $neverMessage, bool $isGenerator) : array
    {
        $returnType = TypeUtils::resolveLateResolvableTypes($returnType);
        if ($returnType instanceof NeverType && $returnType->isExplicit()) {
            return [\PHPStan\Rules\RuleErrorBuilder::message($neverMessage)->line($returnNode->getLine())->build()];
        }
        if ($isGenerator) {
            $returnType = $returnType->getTemplateType(Generator::class, 'TReturn');
            if ($returnType instanceof ErrorType) {
                return [];
            }
        }
        $isVoidSuperType = (new VoidType())->isSuperTypeOf($returnType);
        $verbosityLevel = VerbosityLevel::getRecommendedLevelByType($returnType, null);
        if ($returnValue === null) {
            if (!$isVoidSuperType->no()) {
                return [];
            }
            return [\PHPStan\Rules\RuleErrorBuilder::message(sprintf($emptyReturnStatementMessage, $returnType->describe($verbosityLevel)))->line($returnNode->getLine())->build()];
        }
        if ($returnNode instanceof Expr\Yield_ || $returnNode instanceof Expr\YieldFrom) {
            return [];
        }
        $returnValueType = $scope->getType($returnValue);
        $verbosityLevel = VerbosityLevel::getRecommendedLevelByType($returnType, $returnValueType);
        if ($isVoidSuperType->yes()) {
            return [\PHPStan\Rules\RuleErrorBuilder::message(sprintf($voidMessage, $returnValueType->describe($verbosityLevel)))->line($returnNode->getLine())->build()];
        }
        $accepts = $this->ruleLevelHelper->acceptsWithReason($returnType, $returnValueType, $scope->isDeclareStrictTypes());
        if (!$accepts->result) {
            return [\PHPStan\Rules\RuleErrorBuilder::message(sprintf($typeMismatchMessage, $returnType->describe($verbosityLevel), $returnValueType->describe($verbosityLevel)))->line($returnNode->getLine())->acceptsReasonsTip($accepts->reasons)->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Cast;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<Node\Expr\Print_>
 */
class PrintRule implements Rule
{
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    public function __construct(RuleLevelHelper $ruleLevelHelper)
    {
        $this->ruleLevelHelper = $ruleLevelHelper;
    }
    public function getNodeType() : string
    {
        return Node\Expr\Print_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $typeResult = $this->ruleLevelHelper->findTypeToCheck($scope, $node->expr, '', static function (Type $type) : bool {
            return !$type->toString() instanceof ErrorType;
        });
        if (!$typeResult->getType() instanceof ErrorType && $typeResult->getType()->toString() instanceof ErrorType) {
            return [RuleErrorBuilder::message(sprintf('Parameter %s of print cannot be converted to string.', $typeResult->getType()->describe(VerbosityLevel::value())))->line($node->expr->getLine())->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Cast;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\Printer\ExprPrinter;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<Node\Scalar\Encapsed>
 */
class InvalidPartOfEncapsedStringRule implements Rule
{
    /**
     * @var \PHPStan\Node\Printer\ExprPrinter
     */
    private $exprPrinter;
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    public function __construct(ExprPrinter $exprPrinter, RuleLevelHelper $ruleLevelHelper)
    {
        $this->exprPrinter = $exprPrinter;
        $this->ruleLevelHelper = $ruleLevelHelper;
    }
    public function getNodeType() : string
    {
        return Node\Scalar\Encapsed::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $messages = [];
        foreach ($node->parts as $part) {
            if ($part instanceof Node\Scalar\EncapsedStringPart) {
                continue;
            }
            $typeResult = $this->ruleLevelHelper->findTypeToCheck($scope, $part, '', static function (Type $type) : bool {
                return !$type->toString() instanceof ErrorType;
            });
            $partType = $typeResult->getType();
            if ($partType instanceof ErrorType) {
                continue;
            }
            $stringPartType = $partType->toString();
            if (!$stringPartType instanceof ErrorType) {
                continue;
            }
            $messages[] = RuleErrorBuilder::message(sprintf('Part %s (%s) of encapsed string cannot be cast to string.', $this->exprPrinter->printExpr($part), $partType->describe(VerbosityLevel::value())))->line($part->getLine())->build();
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Cast;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<Node\Stmt\Echo_>
 */
class EchoRule implements Rule
{
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    public function __construct(RuleLevelHelper $ruleLevelHelper)
    {
        $this->ruleLevelHelper = $ruleLevelHelper;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\Echo_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $messages = [];
        foreach ($node->exprs as $key => $expr) {
            $typeResult = $this->ruleLevelHelper->findTypeToCheck($scope, $expr, '', static function (Type $type) : bool {
                return !$type->toString() instanceof ErrorType;
            });
            if ($typeResult->getType() instanceof ErrorType || !$typeResult->getType()->toString() instanceof ErrorType) {
                continue;
            }
            $messages[] = RuleErrorBuilder::message(sprintf('Parameter #%d (%s) of echo cannot be converted to string.', $key + 1, $typeResult->getType()->describe(VerbosityLevel::value())))->line($expr->getLine())->build();
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Cast;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Php\PhpVersion;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
/**
 * @implements Rule<Node\Expr\Cast\Unset_>
 */
class UnsetCastRule implements Rule
{
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
    }
    public function getNodeType() : string
    {
        return Node\Expr\Cast\Unset_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if ($this->phpVersion->supportsUnsetCast()) {
            return [];
        }
        return [RuleErrorBuilder::message('The (unset) cast is no longer supported in PHP 8.0 and later.')->nonIgnorable()->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Cast;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use function get_class;
use function sprintf;
use function strtolower;
use function substr;
/**
 * @implements Rule<Node\Expr\Cast>
 */
class InvalidCastRule implements Rule
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    public function __construct(ReflectionProvider $reflectionProvider, RuleLevelHelper $ruleLevelHelper)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->ruleLevelHelper = $ruleLevelHelper;
    }
    public function getNodeType() : string
    {
        return Node\Expr\Cast::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $castTypeCallback = static function (Type $type) use($node) : ?Type {
            if ($node instanceof Node\Expr\Cast\Int_) {
                return $type->toInteger();
            } elseif ($node instanceof Node\Expr\Cast\Bool_) {
                return $type->toBoolean();
            } elseif ($node instanceof Node\Expr\Cast\Double) {
                return $type->toFloat();
            } elseif ($node instanceof Node\Expr\Cast\String_) {
                return $type->toString();
            }
            return null;
        };
        $typeResult = $this->ruleLevelHelper->findTypeToCheck($scope, $node->expr, '', static function (Type $type) use($castTypeCallback) : bool {
            $castType = $castTypeCallback($type);
            if ($castType === null) {
                return \true;
            }
            return !$castType instanceof ErrorType;
        });
        $type = $typeResult->getType();
        if ($type instanceof ErrorType) {
            return [];
        }
        $castType = $castTypeCallback($type);
        if ($castType instanceof ErrorType) {
            $classReflection = $this->reflectionProvider->getClass(get_class($node));
            $shortName = $classReflection->getNativeReflection()->getShortName();
            $shortName = strtolower($shortName);
            if ($shortName === 'double') {
                $shortName = 'float';
            } else {
                $shortName = substr($shortName, 0, -1);
            }
            return [RuleErrorBuilder::message(sprintf('Cannot cast %s to %s.', $scope->getType($node->expr)->describe(VerbosityLevel::value()), $shortName))->line($node->getLine())->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Whitespace;

use _PHPStan_dcc7b7cff\Nette\Utils\Strings;
use PhpParser\Node;
use PhpParser\NodeTraverser;
use PhpParser\NodeVisitorAbstract;
use PHPStan\Analyser\Scope;
use PHPStan\Node\FileNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function count;
/**
 * @implements Rule<FileNode>
 */
class FileWhitespaceRule implements Rule
{
    public function getNodeType() : string
    {
        return FileNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $nodes = $node->getNodes();
        if (count($nodes) === 0) {
            return [];
        }
        $firstNode = $nodes[0];
        $messages = [];
        if ($firstNode instanceof Node\Stmt\InlineHTML && $firstNode->value === "") {
            $messages[] = RuleErrorBuilder::message('File begins with UTF-8 BOM character. This may cause problems when running the code in the web browser.')->build();
        }
        $nodeTraverser = new NodeTraverser();
        $visitor = new class extends NodeVisitorAbstract
        {
            /** @var Node[] */
            private $lastNodes = [];
            /**
             * @return int|Node|null
             */
            public function enterNode(Node $node)
            {
                if ($node instanceof Node\Stmt\Declare_) {
                    if ($node->stmts !== null && count($node->stmts) > 0) {
                        $this->lastNodes[] = $node->stmts[count($node->stmts) - 1];
                    }
                    return null;
                }
                if ($node instanceof Node\Stmt\Namespace_) {
                    if (count($node->stmts) > 0) {
                        $this->lastNodes[] = $node->stmts[count($node->stmts) - 1];
                    }
                    return null;
                }
                return NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN;
            }
            /**
             * @return Node[]
             */
            public function getLastNodes() : array
            {
                return $this->lastNodes;
            }
        };
        $nodeTraverser->addVisitor($visitor);
        $nodeTraverser->traverse($nodes);
        $lastNodes = $visitor->getLastNodes();
        $lastNodes[] = $nodes[count($nodes) - 1];
        foreach ($lastNodes as $lastNode) {
            if (!$lastNode instanceof Node\Stmt\InlineHTML || Strings::match($lastNode->value, '#^(\\s+)$#') === null) {
                continue;
            }
            $messages[] = RuleErrorBuilder::message('File ends with a trailing whitespace. This may cause problems when running the code in the web browser. Remove the closing ?> mark or remove the whitespace.')->line($lastNode->getStartLine())->build();
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules;

use PhpParser\Node\Expr;
class NullsafeCheck
{
    public function containsNullSafe(Expr $expr) : bool
    {
        if ($expr instanceof Expr\NullsafePropertyFetch || $expr instanceof Expr\NullsafeMethodCall) {
            return \true;
        }
        if ($expr instanceof Expr\ArrayDimFetch) {
            return $this->containsNullSafe($expr->var);
        }
        if ($expr instanceof Expr\PropertyFetch) {
            return $this->containsNullSafe($expr->var);
        }
        if ($expr instanceof Expr\StaticPropertyFetch && $expr->class instanceof Expr) {
            return $this->containsNullSafe($expr->class);
        }
        if ($expr instanceof Expr\MethodCall) {
            return $this->containsNullSafe($expr->var);
        }
        if ($expr instanceof Expr\StaticCall && $expr->class instanceof Expr) {
            return $this->containsNullSafe($expr->class);
        }
        if ($expr instanceof Expr\List_ || $expr instanceof Expr\Array_) {
            foreach ($expr->items as $item) {
                if ($item === null) {
                    continue;
                }
                if ($item->key !== null && $this->containsNullSafe($item->key)) {
                    return \true;
                }
                if ($this->containsNullSafe($item->value)) {
                    return \true;
                }
            }
        }
        return \false;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules;

use PhpParser\Node;
use PhpParser\Node\Expr;
use PHPStan\Analyser\Scope;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\ParameterReflection;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\Reflection\ResolvedFunctionVariant;
use PHPStan\Rules\PhpDoc\UnresolvableTypeHelper;
use PHPStan\Rules\Properties\PropertyReflectionFinder;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\ConditionalType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Generic\TemplateType;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypeTraverser;
use PHPStan\Type\TypeUtils;
use PHPStan\Type\VerbosityLevel;
use function array_fill;
use function array_key_exists;
use function count;
use function is_string;
use function max;
use function sprintf;
class FunctionCallParametersCheck
{
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    /**
     * @var \PHPStan\Rules\NullsafeCheck
     */
    private $nullsafeCheck;
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    /**
     * @var \PHPStan\Rules\PhpDoc\UnresolvableTypeHelper
     */
    private $unresolvableTypeHelper;
    /**
     * @var \PHPStan\Rules\Properties\PropertyReflectionFinder
     */
    private $propertyReflectionFinder;
    /**
     * @var bool
     */
    private $checkArgumentTypes;
    /**
     * @var bool
     */
    private $checkArgumentsPassedByReference;
    /**
     * @var bool
     */
    private $checkExtraArguments;
    /**
     * @var bool
     */
    private $checkMissingTypehints;
    /**
     * @var bool
     */
    private $checkUnresolvableParameterTypes;
    public function __construct(\PHPStan\Rules\RuleLevelHelper $ruleLevelHelper, \PHPStan\Rules\NullsafeCheck $nullsafeCheck, PhpVersion $phpVersion, UnresolvableTypeHelper $unresolvableTypeHelper, PropertyReflectionFinder $propertyReflectionFinder, bool $checkArgumentTypes, bool $checkArgumentsPassedByReference, bool $checkExtraArguments, bool $checkMissingTypehints, bool $checkUnresolvableParameterTypes)
    {
        $this->ruleLevelHelper = $ruleLevelHelper;
        $this->nullsafeCheck = $nullsafeCheck;
        $this->phpVersion = $phpVersion;
        $this->unresolvableTypeHelper = $unresolvableTypeHelper;
        $this->propertyReflectionFinder = $propertyReflectionFinder;
        $this->checkArgumentTypes = $checkArgumentTypes;
        $this->checkArgumentsPassedByReference = $checkArgumentsPassedByReference;
        $this->checkExtraArguments = $checkExtraArguments;
        $this->checkMissingTypehints = $checkMissingTypehints;
        $this->checkUnresolvableParameterTypes = $checkUnresolvableParameterTypes;
    }
    /**
     * @param Node\Expr\FuncCall|Node\Expr\MethodCall|Node\Expr\StaticCall|Node\Expr\New_ $funcCall
     * @param array{0: string, 1: string, 2: string, 3: string, 4: string, 5: string, 6: string, 7: string, 8: string, 9: string, 10: string, 11: string, 12: string, 13?: string} $messages
     * @return RuleError[]
     */
    public function check(ParametersAcceptor $parametersAcceptor, Scope $scope, bool $isBuiltin, $funcCall, array $messages) : array
    {
        $functionParametersMinCount = 0;
        $functionParametersMaxCount = 0;
        foreach ($parametersAcceptor->getParameters() as $parameter) {
            if (!$parameter->isOptional()) {
                $functionParametersMinCount++;
            }
            $functionParametersMaxCount++;
        }
        if ($parametersAcceptor->isVariadic()) {
            $functionParametersMaxCount = -1;
        }
        /** @var array<int, array{Expr, Type, bool, string|null, int}> $arguments */
        $arguments = [];
        /** @var array<int, Node\Arg> $args */
        $args = $funcCall->getArgs();
        $hasNamedArguments = \false;
        $hasUnpackedArgument = \false;
        $errors = [];
        foreach ($args as $i => $arg) {
            $type = $scope->getType($arg->value);
            if ($hasNamedArguments && $arg->unpack) {
                $errors[] = \PHPStan\Rules\RuleErrorBuilder::message('Named argument cannot be followed by an unpacked (...) argument.')->line($arg->getLine())->nonIgnorable()->build();
            }
            if ($hasUnpackedArgument && !$arg->unpack) {
                $errors[] = \PHPStan\Rules\RuleErrorBuilder::message('Unpacked argument (...) cannot be followed by a non-unpacked argument.')->line($arg->getLine())->nonIgnorable()->build();
            }
            if ($arg->unpack) {
                $hasUnpackedArgument = \true;
            }
            $argumentName = null;
            if ($arg->name !== null) {
                $hasNamedArguments = \true;
                $argumentName = $arg->name->toString();
            }
            if ($arg->unpack) {
                $arrays = $type->getConstantArrays();
                if (count($arrays) > 0) {
                    $minKeys = null;
                    foreach ($arrays as $array) {
                        $countType = $array->getArraySize();
                        if ($countType instanceof ConstantIntegerType) {
                            $keysCount = $countType->getValue();
                        } elseif ($countType instanceof IntegerRangeType) {
                            $keysCount = $countType->getMin();
                            if ($keysCount === null) {
                                throw new ShouldNotHappenException();
                            }
                        } else {
                            throw new ShouldNotHappenException();
                        }
                        if ($minKeys !== null && $keysCount >= $minKeys) {
                            continue;
                        }
                        $minKeys = $keysCount;
                    }
                    for ($j = 0; $j < $minKeys; $j++) {
                        $types = [];
                        $commonKey = null;
                        foreach ($arrays as $constantArray) {
                            $types[] = $constantArray->getValueTypes()[$j];
                            $keyType = $constantArray->getKeyTypes()[$j];
                            if ($commonKey === null) {
                                $commonKey = $keyType->getValue();
                            } elseif ($commonKey !== $keyType->getValue()) {
                                $commonKey = \false;
                            }
                        }
                        $keyArgumentName = null;
                        if (is_string($commonKey)) {
                            $keyArgumentName = $commonKey;
                            $hasNamedArguments = \true;
                        }
                        $arguments[] = [$arg->value, TypeCombinator::union(...$types), \false, $keyArgumentName, $arg->getLine()];
                    }
                } else {
                    $arguments[] = [$arg->value, $type->getIterableValueType(), \true, null, $arg->getLine()];
                }
                continue;
            }
            $arguments[] = [$arg->value, $type, \false, $argumentName, $arg->getLine()];
        }
        if ($hasNamedArguments && !$this->phpVersion->supportsNamedArguments() && !(bool) $funcCall->getAttribute('isAttribute', \false)) {
            $errors[] = \PHPStan\Rules\RuleErrorBuilder::message('Named arguments are supported only on PHP 8.0 and later.')->line($funcCall->getLine())->nonIgnorable()->build();
        }
        if (!$hasNamedArguments) {
            $invokedParametersCount = count($arguments);
            foreach ($arguments as $i => [$argumentValue, $argumentValueType, $unpack, $argumentName]) {
                if ($unpack) {
                    $invokedParametersCount = max($functionParametersMinCount, $functionParametersMaxCount);
                    break;
                }
            }
            if ($invokedParametersCount < $functionParametersMinCount || $this->checkExtraArguments && $invokedParametersCount > $functionParametersMaxCount) {
                if ($functionParametersMinCount === $functionParametersMaxCount) {
                    $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf($invokedParametersCount === 1 ? $messages[0] : $messages[1], $invokedParametersCount, $functionParametersMinCount))->line($funcCall->getLine())->build();
                } elseif ($functionParametersMaxCount === -1 && $invokedParametersCount < $functionParametersMinCount) {
                    $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf($invokedParametersCount === 1 ? $messages[2] : $messages[3], $invokedParametersCount, $functionParametersMinCount))->line($funcCall->getLine())->build();
                } elseif ($functionParametersMaxCount !== -1) {
                    $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf($invokedParametersCount === 1 ? $messages[4] : $messages[5], $invokedParametersCount, $functionParametersMinCount, $functionParametersMaxCount))->line($funcCall->getLine())->build();
                }
            }
        }
        if (!$funcCall instanceof Node\Expr\New_ && !$scope->isInFirstLevelStatement() && $scope->getType($funcCall)->isVoid()->yes()) {
            $errors[] = \PHPStan\Rules\RuleErrorBuilder::message($messages[7])->line($funcCall->getLine())->build();
        }
        [$addedErrors, $argumentsWithParameters] = $this->processArguments($parametersAcceptor, $funcCall->getLine(), $isBuiltin, $arguments, $hasNamedArguments, $messages[10], $messages[11]);
        foreach ($addedErrors as $error) {
            $errors[] = $error;
        }
        if (!$this->checkArgumentTypes && !$this->checkArgumentsPassedByReference) {
            return $errors;
        }
        foreach ($argumentsWithParameters as $i => [$argumentValue, $argumentValueType, $unpack, $argumentName, $argumentLine, $parameter, $originalParameter]) {
            if ($this->checkArgumentTypes && $unpack) {
                $iterableTypeResult = $this->ruleLevelHelper->findTypeToCheck($scope, $argumentValue, '', static function (Type $type) : bool {
                    return $type->isIterable()->yes();
                });
                $iterableTypeResultType = $iterableTypeResult->getType();
                if (!$iterableTypeResultType instanceof ErrorType && !$iterableTypeResultType->isIterable()->yes()) {
                    $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf('Only iterables can be unpacked, %s given in argument #%d.', $iterableTypeResultType->describe(VerbosityLevel::typeOnly()), $i + 1))->line($argumentLine)->build();
                }
            }
            if ($parameter === null) {
                continue;
            }
            if ($this->checkArgumentTypes) {
                $parameterType = TypeUtils::resolveLateResolvableTypes($parameter->getType());
                if (!$parameter->passedByReference()->createsNewVariable()) {
                    $accepts = $this->ruleLevelHelper->acceptsWithReason($parameterType, $argumentValueType, $scope->isDeclareStrictTypes());
                    if (!$accepts->result) {
                        $verbosityLevel = VerbosityLevel::getRecommendedLevelByType($parameterType, $argumentValueType);
                        $parameterDescription = sprintf('%s$%s', $parameter->isVariadic() ? '...' : '', $parameter->getName());
                        $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf($messages[6], $argumentName === null ? sprintf('#%d %s', $i + 1, $parameterDescription) : $parameterDescription, $parameterType->describe($verbosityLevel), $argumentValueType->describe($verbosityLevel)))->line($argumentLine)->acceptsReasonsTip($accepts->reasons)->build();
                    }
                }
                if ($this->checkUnresolvableParameterTypes && $originalParameter !== null && isset($messages[13]) && !$this->unresolvableTypeHelper->containsUnresolvableType($originalParameter->getType()) && $this->unresolvableTypeHelper->containsUnresolvableType($parameterType)) {
                    $parameterDescription = sprintf('%s$%s', $parameter->isVariadic() ? '...' : '', $parameter->getName());
                    $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf($messages[13], $argumentName === null ? sprintf('#%d %s', $i + 1, $parameterDescription) : $parameterDescription))->line($argumentLine)->build();
                }
            }
            if (!$this->checkArgumentsPassedByReference || !$parameter->passedByReference()->yes()) {
                continue;
            }
            if ($this->nullsafeCheck->containsNullSafe($argumentValue)) {
                $parameterDescription = sprintf('%s$%s', $parameter->isVariadic() ? '...' : '', $parameter->getName());
                $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf($messages[8], $argumentName === null ? sprintf('#%d %s', $i + 1, $parameterDescription) : $parameterDescription))->line($argumentLine)->build();
                continue;
            }
            if ($argumentValue instanceof Node\Expr\PropertyFetch || $argumentValue instanceof Node\Expr\StaticPropertyFetch) {
                $propertyReflections = $this->propertyReflectionFinder->findPropertyReflectionsFromNode($argumentValue, $scope);
                foreach ($propertyReflections as $propertyReflection) {
                    $nativePropertyReflection = $propertyReflection->getNativeReflection();
                    if ($nativePropertyReflection === null) {
                        continue;
                    }
                    if (!$nativePropertyReflection->isReadOnly()) {
                        continue;
                    }
                    if ($nativePropertyReflection->isStatic()) {
                        $propertyDescription = sprintf('static readonly property %s::$%s', $propertyReflection->getDeclaringClass()->getDisplayName(), $propertyReflection->getName());
                    } else {
                        $propertyDescription = sprintf('readonly property %s::$%s', $propertyReflection->getDeclaringClass()->getDisplayName(), $propertyReflection->getName());
                    }
                    $parameterDescription = sprintf('%s$%s', $parameter->isVariadic() ? '...' : '', $parameter->getName());
                    $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf('Parameter %s is passed by reference so it does not accept %s.', $argumentName === null ? sprintf('#%d %s', $i + 1, $parameterDescription) : $parameterDescription, $propertyDescription))->line($argumentLine)->build();
                }
            }
            if ($argumentValue instanceof Node\Expr\Variable || $argumentValue instanceof Node\Expr\ArrayDimFetch || $argumentValue instanceof Node\Expr\PropertyFetch || $argumentValue instanceof Node\Expr\StaticPropertyFetch) {
                continue;
            }
            $parameterDescription = sprintf('%s$%s', $parameter->isVariadic() ? '...' : '', $parameter->getName());
            $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf($messages[8], $argumentName === null ? sprintf('#%d %s', $i + 1, $parameterDescription) : $parameterDescription))->line($argumentLine)->build();
        }
        if ($this->checkMissingTypehints && $parametersAcceptor instanceof ResolvedFunctionVariant) {
            $originalParametersAcceptor = $parametersAcceptor->getOriginalParametersAcceptor();
            $resolvedTypes = $parametersAcceptor->getResolvedTemplateTypeMap()->getTypes();
            if (count($resolvedTypes) > 0) {
                $returnTemplateTypes = [];
                TypeTraverser::map($parametersAcceptor->getReturnTypeWithUnresolvableTemplateTypes(), static function (Type $type, callable $traverse) use(&$returnTemplateTypes) : Type {
                    while ($type instanceof ConditionalType && $type->isResolvable()) {
                        $type = $type->resolve();
                    }
                    if ($type instanceof TemplateType) {
                        $returnTemplateTypes[$type->getName()] = \true;
                        return $type;
                    }
                    return $traverse($type);
                });
                $parameterTemplateTypes = [];
                foreach ($originalParametersAcceptor->getParameters() as $parameter) {
                    TypeTraverser::map($parameter->getType(), static function (Type $type, callable $traverse) use(&$parameterTemplateTypes) : Type {
                        if ($type instanceof TemplateType) {
                            $parameterTemplateTypes[$type->getName()] = \true;
                            return $type;
                        }
                        return $traverse($type);
                    });
                }
                foreach ($resolvedTypes as $name => $type) {
                    if (!$type instanceof ErrorType && (!$type instanceof NeverType || $type->isExplicit())) {
                        continue;
                    }
                    if (!array_key_exists($name, $returnTemplateTypes)) {
                        continue;
                    }
                    if (!array_key_exists($name, $parameterTemplateTypes)) {
                        continue;
                    }
                    $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf($messages[9], $name))->line($funcCall->getLine())->tip('See: https://phpstan.org/blog/solving-phpstan-error-unable-to-resolve-template-type')->build();
                }
            }
            if (!$this->unresolvableTypeHelper->containsUnresolvableType($originalParametersAcceptor->getReturnType()) && $this->unresolvableTypeHelper->containsUnresolvableType($parametersAcceptor->getReturnType())) {
                $errors[] = \PHPStan\Rules\RuleErrorBuilder::message($messages[12])->line($funcCall->getLine())->build();
            }
        }
        return $errors;
    }
    /**
     * @param array<int, array{Expr, Type, bool, string|null, int}> $arguments
     * @return array{RuleError[], array<int, array{Expr, Type, bool, (string|null), int, (ParameterReflection|null), (ParameterReflection|null)}>}
     */
    private function processArguments(ParametersAcceptor $parametersAcceptor, int $line, bool $isBuiltin, array $arguments, bool $hasNamedArguments, string $missingParameterMessage, string $unknownParameterMessage) : array
    {
        $parameters = $parametersAcceptor->getParameters();
        $originalParameters = $parametersAcceptor instanceof ResolvedFunctionVariant ? $parametersAcceptor->getOriginalParametersAcceptor()->getParameters() : array_fill(0, count($parameters), null);
        $parametersByName = [];
        $originalParametersByName = [];
        $unusedParametersByName = [];
        $errors = [];
        foreach ($parameters as $i => $parameter) {
            $parametersByName[$parameter->getName()] = $parameter;
            $originalParametersByName[$parameter->getName()] = $originalParameters[$i];
            if ($parameter->isVariadic()) {
                continue;
            }
            $unusedParametersByName[$parameter->getName()] = $parameter;
        }
        $newArguments = [];
        $namedArgumentAlreadyOccurred = \false;
        foreach ($arguments as $i => [$argumentValue, $argumentValueType, $unpack, $argumentName, $argumentLine]) {
            if ($argumentName === null) {
                if (!isset($parameters[$i])) {
                    if (!$parametersAcceptor->isVariadic() || count($parameters) === 0) {
                        $newArguments[$i] = [$argumentValue, $argumentValueType, $unpack, $argumentName, $argumentLine, null, null];
                        break;
                    }
                    $parameter = $parameters[count($parameters) - 1];
                    $originalParameter = $originalParameters[count($originalParameters) - 1];
                    if (!$parameter->isVariadic()) {
                        $newArguments[$i] = [$argumentValue, $argumentValueType, $unpack, $argumentName, $argumentLine, null, null];
                        break;
                        // func_get_args
                    }
                } else {
                    $parameter = $parameters[$i];
                    $originalParameter = $originalParameters[$i];
                }
            } elseif (array_key_exists($argumentName, $parametersByName)) {
                $namedArgumentAlreadyOccurred = \true;
                $parameter = $parametersByName[$argumentName];
                $originalParameter = $originalParametersByName[$argumentName];
            } else {
                $namedArgumentAlreadyOccurred = \true;
                $parametersCount = count($parameters);
                if (!$parametersAcceptor->isVariadic() || $parametersCount <= 0 || $isBuiltin) {
                    $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf($unknownParameterMessage, $argumentName))->line($argumentLine)->build();
                    $newArguments[$i] = [$argumentValue, $argumentValueType, $unpack, $argumentName, $argumentLine, null, null];
                    continue;
                }
                $parameter = $parameters[$parametersCount - 1];
                $originalParameter = $originalParameters[$parametersCount - 1];
            }
            if ($namedArgumentAlreadyOccurred && $argumentName === null && !$unpack) {
                $errors[] = \PHPStan\Rules\RuleErrorBuilder::message('Named argument cannot be followed by a positional argument.')->line($argumentLine)->nonIgnorable()->build();
                $newArguments[$i] = [$argumentValue, $argumentValueType, $unpack, $argumentName, $argumentLine, null, null];
                continue;
            }
            $newArguments[$i] = [$argumentValue, $argumentValueType, $unpack, $argumentName, $argumentLine, $parameter, $originalParameter];
            if ($hasNamedArguments && !$parameter->isVariadic() && !array_key_exists($parameter->getName(), $unusedParametersByName)) {
                $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf('Argument for parameter $%s has already been passed.', $parameter->getName()))->line($argumentLine)->build();
                continue;
            }
            unset($unusedParametersByName[$parameter->getName()]);
        }
        if ($hasNamedArguments) {
            foreach ($unusedParametersByName as $parameter) {
                if ($parameter->isOptional()) {
                    continue;
                }
                $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf($missingParameterMessage, sprintf('%s (%s)', $parameter->getName(), $parameter->getType()->describe(VerbosityLevel::typeOnly()))))->line($line)->build();
            }
        }
        return [$errors, $newArguments];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules;

use PhpParser\Node;
use PhpParser\Node\Expr;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Properties\PropertyDescriptor;
use PHPStan\Rules\Properties\PropertyReflectionFinder;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use function is_string;
use function sprintf;
class IssetCheck
{
    /**
     * @var \PHPStan\Rules\Properties\PropertyDescriptor
     */
    private $propertyDescriptor;
    /**
     * @var \PHPStan\Rules\Properties\PropertyReflectionFinder
     */
    private $propertyReflectionFinder;
    /**
     * @var bool
     */
    private $checkAdvancedIsset;
    /**
     * @var bool
     */
    private $treatPhpDocTypesAsCertain;
    /**
     * @var bool
     */
    private $strictUnnecessaryNullsafePropertyFetch;
    public function __construct(PropertyDescriptor $propertyDescriptor, PropertyReflectionFinder $propertyReflectionFinder, bool $checkAdvancedIsset, bool $treatPhpDocTypesAsCertain, bool $strictUnnecessaryNullsafePropertyFetch)
    {
        $this->propertyDescriptor = $propertyDescriptor;
        $this->propertyReflectionFinder = $propertyReflectionFinder;
        $this->checkAdvancedIsset = $checkAdvancedIsset;
        $this->treatPhpDocTypesAsCertain = $treatPhpDocTypesAsCertain;
        $this->strictUnnecessaryNullsafePropertyFetch = $strictUnnecessaryNullsafePropertyFetch;
    }
    /**
     * @param callable(Type): ?string $typeMessageCallback
     */
    public function check(Expr $expr, Scope $scope, string $operatorDescription, callable $typeMessageCallback, ?\PHPStan\Rules\RuleError $error = null) : ?\PHPStan\Rules\RuleError
    {
        // mirrored in PHPStan\Analyser\MutatingScope::issetCheck()
        if ($expr instanceof Node\Expr\Variable && is_string($expr->name)) {
            $hasVariable = $scope->hasVariableType($expr->name);
            if ($hasVariable->maybe()) {
                return null;
            }
            if ($error === null) {
                if ($hasVariable->yes()) {
                    if ($expr->name === '_SESSION') {
                        return null;
                    }
                    return $this->generateError($this->treatPhpDocTypesAsCertain ? $scope->getType($expr) : $scope->getNativeType($expr), sprintf('Variable $%s %s always exists and', $expr->name, $operatorDescription), $typeMessageCallback);
                }
                return \PHPStan\Rules\RuleErrorBuilder::message(sprintf('Variable $%s %s is never defined.', $expr->name, $operatorDescription))->build();
            }
            return $error;
        } elseif ($expr instanceof Node\Expr\ArrayDimFetch && $expr->dim !== null) {
            $type = $this->treatPhpDocTypesAsCertain ? $scope->getType($expr->var) : $scope->getNativeType($expr->var);
            $dimType = $this->treatPhpDocTypesAsCertain ? $scope->getType($expr->dim) : $scope->getNativeType($expr->dim);
            $hasOffsetValue = $type->hasOffsetValueType($dimType);
            if (!$type->isOffsetAccessible()->yes()) {
                return $error ?? $this->checkUndefined($expr->var, $scope, $operatorDescription);
            }
            if ($hasOffsetValue->no()) {
                if (!$this->checkAdvancedIsset) {
                    return null;
                }
                return \PHPStan\Rules\RuleErrorBuilder::message(sprintf('Offset %s on %s %s does not exist.', $dimType->describe(VerbosityLevel::value()), $type->describe(VerbosityLevel::value()), $operatorDescription))->build();
            }
            // If offset is cannot be null, store this error message and see if one of the earlier offsets is.
            // E.g. $array['a']['b']['c'] ?? null; is a valid coalesce if a OR b or C might be null.
            if ($hasOffsetValue->yes() || $scope->hasExpressionType($expr)->yes()) {
                if (!$this->checkAdvancedIsset) {
                    return null;
                }
                $error = $error ?? $this->generateError($type->getOffsetValueType($dimType), sprintf('Offset %s on %s %s always exists and', $dimType->describe(VerbosityLevel::value()), $type->describe(VerbosityLevel::value()), $operatorDescription), $typeMessageCallback);
                if ($error !== null) {
                    return $this->check($expr->var, $scope, $operatorDescription, $typeMessageCallback, $error);
                }
            }
            // Has offset, it is nullable
            return null;
        } elseif ($expr instanceof Node\Expr\PropertyFetch || $expr instanceof Node\Expr\StaticPropertyFetch) {
            $propertyReflection = $this->propertyReflectionFinder->findPropertyReflectionFromNode($expr, $scope);
            if ($propertyReflection === null) {
                if ($expr instanceof Node\Expr\PropertyFetch) {
                    return $this->checkUndefined($expr->var, $scope, $operatorDescription);
                }
                if ($expr->class instanceof Expr) {
                    return $this->checkUndefined($expr->class, $scope, $operatorDescription);
                }
                return null;
            }
            if (!$propertyReflection->isNative()) {
                if ($expr instanceof Node\Expr\PropertyFetch) {
                    return $this->checkUndefined($expr->var, $scope, $operatorDescription);
                }
                if ($expr->class instanceof Expr) {
                    return $this->checkUndefined($expr->class, $scope, $operatorDescription);
                }
                return null;
            }
            $nativeType = $propertyReflection->getNativeType();
            if (!$nativeType instanceof MixedType) {
                if (!$scope->hasExpressionType($expr)->yes()) {
                    if ($expr instanceof Node\Expr\PropertyFetch) {
                        return $this->checkUndefined($expr->var, $scope, $operatorDescription);
                    }
                    if ($expr->class instanceof Expr) {
                        return $this->checkUndefined($expr->class, $scope, $operatorDescription);
                    }
                    return null;
                }
            }
            $propertyDescription = $this->propertyDescriptor->describeProperty($propertyReflection, $scope, $expr);
            $propertyType = $propertyReflection->getWritableType();
            if ($error !== null) {
                return $error;
            }
            if (!$this->checkAdvancedIsset) {
                if ($expr instanceof Node\Expr\PropertyFetch) {
                    return $this->checkUndefined($expr->var, $scope, $operatorDescription);
                }
                if ($expr->class instanceof Expr) {
                    return $this->checkUndefined($expr->class, $scope, $operatorDescription);
                }
                return null;
            }
            $error = $this->generateError($propertyReflection->getWritableType(), sprintf('%s (%s) %s', $propertyDescription, $propertyType->describe(VerbosityLevel::typeOnly()), $operatorDescription), $typeMessageCallback);
            if ($error !== null) {
                if ($expr instanceof Node\Expr\PropertyFetch) {
                    return $this->check($expr->var, $scope, $operatorDescription, $typeMessageCallback, $error);
                }
                if ($expr->class instanceof Expr) {
                    return $this->check($expr->class, $scope, $operatorDescription, $typeMessageCallback, $error);
                }
            }
            return $error;
        }
        if ($error !== null) {
            return $error;
        }
        if (!$this->checkAdvancedIsset) {
            return null;
        }
        $error = $this->generateError($this->treatPhpDocTypesAsCertain ? $scope->getType($expr) : $scope->getNativeType($expr), sprintf('Expression %s', $operatorDescription), $typeMessageCallback);
        if ($error !== null) {
            return $error;
        }
        if ($expr instanceof Expr\NullsafePropertyFetch) {
            if (!$this->strictUnnecessaryNullsafePropertyFetch) {
                return null;
            }
            if ($expr->name instanceof Node\Identifier) {
                return \PHPStan\Rules\RuleErrorBuilder::message(sprintf('Using nullsafe property access "?->%s" %s is unnecessary. Use -> instead.', $expr->name->name, $operatorDescription))->build();
            }
            return \PHPStan\Rules\RuleErrorBuilder::message(sprintf('Using nullsafe property access "?->(Expression)" %s is unnecessary. Use -> instead.', $operatorDescription))->build();
        }
        return null;
    }
    private function checkUndefined(Expr $expr, Scope $scope, string $operatorDescription) : ?\PHPStan\Rules\RuleError
    {
        if ($expr instanceof Node\Expr\Variable && is_string($expr->name)) {
            $hasVariable = $scope->hasVariableType($expr->name);
            if (!$hasVariable->no()) {
                return null;
            }
            return \PHPStan\Rules\RuleErrorBuilder::message(sprintf('Variable $%s %s is never defined.', $expr->name, $operatorDescription))->build();
        }
        if ($expr instanceof Node\Expr\ArrayDimFetch && $expr->dim !== null) {
            $type = $this->treatPhpDocTypesAsCertain ? $scope->getType($expr->var) : $scope->getNativeType($expr->var);
            $dimType = $this->treatPhpDocTypesAsCertain ? $scope->getType($expr->dim) : $scope->getNativeType($expr->dim);
            $hasOffsetValue = $type->hasOffsetValueType($dimType);
            if (!$type->isOffsetAccessible()->yes()) {
                return $this->checkUndefined($expr->var, $scope, $operatorDescription);
            }
            if (!$hasOffsetValue->no()) {
                return $this->checkUndefined($expr->var, $scope, $operatorDescription);
            }
            return \PHPStan\Rules\RuleErrorBuilder::message(sprintf('Offset %s on %s %s does not exist.', $dimType->describe(VerbosityLevel::value()), $type->describe(VerbosityLevel::value()), $operatorDescription))->build();
        }
        if ($expr instanceof Expr\PropertyFetch) {
            return $this->checkUndefined($expr->var, $scope, $operatorDescription);
        }
        if ($expr instanceof Expr\StaticPropertyFetch && $expr->class instanceof Expr) {
            return $this->checkUndefined($expr->class, $scope, $operatorDescription);
        }
        return null;
    }
    /**
     * @param callable(Type): ?string $typeMessageCallback
     */
    private function generateError(Type $type, string $message, callable $typeMessageCallback) : ?\PHPStan\Rules\RuleError
    {
        $typeMessage = $typeMessageCallback($type);
        if ($typeMessage === null) {
            return null;
        }
        return \PHPStan\Rules\RuleErrorBuilder::message(sprintf('%s %s.', $message, $typeMessage))->build();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules;

/** @api */
interface NonIgnorableRuleError extends \PHPStan\Rules\RuleError
{
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules;

use Closure;
use Generator;
use Iterator;
use IteratorAggregate;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Accessory\AccessoryType;
use PHPStan\Type\CallableType;
use PHPStan\Type\ConditionalType;
use PHPStan\Type\ConditionalTypeForParameter;
use PHPStan\Type\Generic\GenericObjectType;
use PHPStan\Type\Generic\TemplateType;
use PHPStan\Type\Generic\TemplateTypeHelper;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\MixedType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeTraverser;
use Traversable;
use function array_keys;
use function array_merge;
use function in_array;
use function sprintf;
class MissingTypehintCheck
{
    public const MISSING_ITERABLE_VALUE_TYPE_TIP = 'See: https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type';
    public const TURN_OFF_NON_GENERIC_CHECK_TIP = 'You can turn this off by setting <fg=cyan>checkGenericClassInNonGenericObjectType: false</> in your <fg=cyan>%configurationFile%</>.';
    private const ITERABLE_GENERIC_CLASS_NAMES = [Traversable::class, Iterator::class, IteratorAggregate::class, Generator::class];
    /**
     * @var bool
     */
    private $disableCheckMissingIterableValueType;
    /**
     * @var bool
     */
    private $checkMissingIterableValueType;
    /**
     * @var bool
     */
    private $checkGenericClassInNonGenericObjectType;
    /**
     * @var bool
     */
    private $checkMissingCallableSignature;
    /**
     * @var string[]
     */
    private $skipCheckGenericClasses;
    /**
     * @param string[] $skipCheckGenericClasses
     */
    public function __construct(bool $disableCheckMissingIterableValueType, bool $checkMissingIterableValueType, bool $checkGenericClassInNonGenericObjectType, bool $checkMissingCallableSignature, array $skipCheckGenericClasses)
    {
        $this->disableCheckMissingIterableValueType = $disableCheckMissingIterableValueType;
        $this->checkMissingIterableValueType = $checkMissingIterableValueType;
        $this->checkGenericClassInNonGenericObjectType = $checkGenericClassInNonGenericObjectType;
        $this->checkMissingCallableSignature = $checkMissingCallableSignature;
        $this->skipCheckGenericClasses = $skipCheckGenericClasses;
    }
    /**
     * @return Type[]
     */
    public function getIterableTypesWithMissingValueTypehint(Type $type) : array
    {
        if (!$this->checkMissingIterableValueType) {
            if (!$this->disableCheckMissingIterableValueType) {
                return [];
            }
        }
        $iterablesWithMissingValueTypehint = [];
        TypeTraverser::map($type, function (Type $type, callable $traverse) use(&$iterablesWithMissingValueTypehint) : Type {
            if ($type instanceof TemplateType) {
                return $type;
            }
            if ($type instanceof AccessoryType) {
                return $type;
            }
            if ($type instanceof ConditionalType || $type instanceof ConditionalTypeForParameter) {
                $iterablesWithMissingValueTypehint = array_merge($iterablesWithMissingValueTypehint, $this->getIterableTypesWithMissingValueTypehint($type->getIf()), $this->getIterableTypesWithMissingValueTypehint($type->getElse()));
                return $type;
            }
            if ($type->isIterable()->yes()) {
                $iterableValue = $type->getIterableValueType();
                if ($iterableValue instanceof MixedType && !$iterableValue->isExplicitMixed()) {
                    $iterablesWithMissingValueTypehint[] = $type;
                }
                if (!$type instanceof IntersectionType) {
                    return $traverse($type);
                }
                return $type;
            }
            return $traverse($type);
        });
        return $iterablesWithMissingValueTypehint;
    }
    /**
     * @return array<int, array{string, string[]}>
     */
    public function getNonGenericObjectTypesWithGenericClass(Type $type) : array
    {
        if (!$this->checkGenericClassInNonGenericObjectType) {
            return [];
        }
        $objectTypes = [];
        TypeTraverser::map($type, function (Type $type, callable $traverse) use(&$objectTypes) : Type {
            if ($type instanceof GenericObjectType) {
                $traverse($type);
                return $type;
            }
            if ($type instanceof TemplateType) {
                return $type;
            }
            if ($type instanceof ObjectType) {
                $classReflection = $type->getClassReflection();
                if ($classReflection === null) {
                    return $type;
                }
                if (in_array($classReflection->getName(), self::ITERABLE_GENERIC_CLASS_NAMES, \true)) {
                    // checked by getIterableTypesWithMissingValueTypehint() already
                    return $type;
                }
                if (in_array($classReflection->getName(), $this->skipCheckGenericClasses, \true)) {
                    return $type;
                }
                if ($classReflection->isTrait()) {
                    return $type;
                }
                if (!$classReflection->isGeneric()) {
                    return $type;
                }
                $resolvedType = TemplateTypeHelper::resolveToBounds($type);
                if (!$resolvedType instanceof ObjectType) {
                    throw new ShouldNotHappenException();
                }
                $objectTypes[] = [sprintf('%s %s', $classReflection->isInterface() ? 'interface' : 'class', $classReflection->getDisplayName(\false)), array_keys($classReflection->getTemplateTypeMap()->getTypes())];
                return $type;
            }
            return $traverse($type);
        });
        return $objectTypes;
    }
    /**
     * @return Type[]
     */
    public function getCallablesWithMissingSignature(Type $type) : array
    {
        if (!$this->checkMissingCallableSignature) {
            return [];
        }
        $result = [];
        TypeTraverser::map($type, static function (Type $type, callable $traverse) use(&$result) : Type {
            if ($type instanceof CallableType && $type->isCommonCallable() || $type instanceof ObjectType && $type->getClassName() === Closure::class) {
                $result[] = $type;
            }
            return $traverse($type);
        });
        return $result;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules;

/** @api */
interface FileRuleError extends \PHPStan\Rules\RuleError
{
    public function getFile() : string;
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Namespaces;

use PhpParser\Node;
use PhpParser\Node\Stmt\Use_;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\ClassCaseSensitivityCheck;
use PHPStan\Rules\ClassNameNodePair;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use function count;
use function sprintf;
use function strtolower;
/**
 * @implements Rule<Node\Stmt\GroupUse>
 */
class ExistingNamesInGroupUseRule implements Rule
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Rules\ClassCaseSensitivityCheck
     */
    private $classCaseSensitivityCheck;
    /**
     * @var bool
     */
    private $checkFunctionNameCase;
    public function __construct(ReflectionProvider $reflectionProvider, ClassCaseSensitivityCheck $classCaseSensitivityCheck, bool $checkFunctionNameCase)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->classCaseSensitivityCheck = $classCaseSensitivityCheck;
        $this->checkFunctionNameCase = $checkFunctionNameCase;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\GroupUse::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $errors = [];
        foreach ($node->uses as $use) {
            $error = null;
            /** @var Node\Name $name */
            $name = Node\Name::concat($node->prefix, $use->name, ['startLine' => $use->getLine()]);
            if ($node->type === Use_::TYPE_CONSTANT || $use->type === Use_::TYPE_CONSTANT) {
                $error = $this->checkConstant($name);
            } elseif ($node->type === Use_::TYPE_FUNCTION || $use->type === Use_::TYPE_FUNCTION) {
                $error = $this->checkFunction($name);
            } elseif ($use->type === Use_::TYPE_NORMAL) {
                $error = $this->checkClass($name);
            } else {
                throw new ShouldNotHappenException();
            }
            if ($error === null) {
                continue;
            }
            $errors[] = $error;
        }
        return $errors;
    }
    private function checkConstant(Node\Name $name) : ?RuleError
    {
        if (!$this->reflectionProvider->hasConstant($name, null)) {
            return RuleErrorBuilder::message(sprintf('Used constant %s not found.', (string) $name))->discoveringSymbolsTip()->line($name->getLine())->build();
        }
        return null;
    }
    private function checkFunction(Node\Name $name) : ?RuleError
    {
        if (!$this->reflectionProvider->hasFunction($name, null)) {
            return RuleErrorBuilder::message(sprintf('Used function %s not found.', (string) $name))->discoveringSymbolsTip()->line($name->getLine())->build();
        }
        if ($this->checkFunctionNameCase) {
            $functionReflection = $this->reflectionProvider->getFunction($name, null);
            $realName = $functionReflection->getName();
            $usedName = (string) $name;
            if (strtolower($realName) === strtolower($usedName) && $realName !== $usedName) {
                return RuleErrorBuilder::message(sprintf('Function %s used with incorrect case: %s.', $realName, $usedName))->line($name->getLine())->build();
            }
        }
        return null;
    }
    private function checkClass(Node\Name $name) : ?RuleError
    {
        $errors = $this->classCaseSensitivityCheck->checkClassNames([new ClassNameNodePair((string) $name, $name)]);
        if (count($errors) === 0) {
            return null;
        } elseif (count($errors) === 1) {
            return $errors[0];
        }
        throw new ShouldNotHappenException();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Namespaces;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\ClassCaseSensitivityCheck;
use PHPStan\Rules\ClassNameNodePair;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use function array_map;
use function sprintf;
use function strtolower;
/**
 * @implements Rule<Node\Stmt\Use_>
 */
class ExistingNamesInUseRule implements Rule
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Rules\ClassCaseSensitivityCheck
     */
    private $classCaseSensitivityCheck;
    /**
     * @var bool
     */
    private $checkFunctionNameCase;
    public function __construct(ReflectionProvider $reflectionProvider, ClassCaseSensitivityCheck $classCaseSensitivityCheck, bool $checkFunctionNameCase)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->classCaseSensitivityCheck = $classCaseSensitivityCheck;
        $this->checkFunctionNameCase = $checkFunctionNameCase;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\Use_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if ($node->type === Node\Stmt\Use_::TYPE_UNKNOWN) {
            throw new ShouldNotHappenException();
        }
        foreach ($node->uses as $use) {
            if ($use->type !== Node\Stmt\Use_::TYPE_UNKNOWN) {
                throw new ShouldNotHappenException();
            }
        }
        if ($node->type === Node\Stmt\Use_::TYPE_CONSTANT) {
            return $this->checkConstants($node->uses);
        }
        if ($node->type === Node\Stmt\Use_::TYPE_FUNCTION) {
            return $this->checkFunctions($node->uses);
        }
        return $this->checkClasses($node->uses);
    }
    /**
     * @param Node\Stmt\UseUse[] $uses
     * @return RuleError[]
     */
    private function checkConstants(array $uses) : array
    {
        $errors = [];
        foreach ($uses as $use) {
            if ($this->reflectionProvider->hasConstant($use->name, null)) {
                continue;
            }
            $errors[] = RuleErrorBuilder::message(sprintf('Used constant %s not found.', (string) $use->name))->line($use->name->getLine())->discoveringSymbolsTip()->build();
        }
        return $errors;
    }
    /**
     * @param Node\Stmt\UseUse[] $uses
     * @return RuleError[]
     */
    private function checkFunctions(array $uses) : array
    {
        $errors = [];
        foreach ($uses as $use) {
            if (!$this->reflectionProvider->hasFunction($use->name, null)) {
                $errors[] = RuleErrorBuilder::message(sprintf('Used function %s not found.', (string) $use->name))->line($use->name->getLine())->discoveringSymbolsTip()->build();
            } elseif ($this->checkFunctionNameCase) {
                $functionReflection = $this->reflectionProvider->getFunction($use->name, null);
                $realName = $functionReflection->getName();
                $usedName = (string) $use->name;
                if (strtolower($realName) === strtolower($usedName) && $realName !== $usedName) {
                    $errors[] = RuleErrorBuilder::message(sprintf('Function %s used with incorrect case: %s.', $realName, $usedName))->line($use->name->getLine())->build();
                }
            }
        }
        return $errors;
    }
    /**
     * @param Node\Stmt\UseUse[] $uses
     * @return RuleError[]
     */
    private function checkClasses(array $uses) : array
    {
        return $this->classCaseSensitivityCheck->checkClassNames(array_map(static function (Node\Stmt\UseUse $use) : ClassNameNodePair {
            return new ClassNameNodePair((string) $use->name, $use->name);
        }, $uses));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Variables;

use PhpParser\Node;
use PhpParser\Node\Expr\Variable;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function in_array;
use function is_string;
use function sprintf;
/**
 * @implements Rule<Node\Expr\Variable>
 */
class DefinedVariableRule implements Rule
{
    /**
     * @var bool
     */
    private $cliArgumentsVariablesRegistered;
    /**
     * @var bool
     */
    private $checkMaybeUndefinedVariables;
    public function __construct(bool $cliArgumentsVariablesRegistered, bool $checkMaybeUndefinedVariables)
    {
        $this->cliArgumentsVariablesRegistered = $cliArgumentsVariablesRegistered;
        $this->checkMaybeUndefinedVariables = $checkMaybeUndefinedVariables;
    }
    public function getNodeType() : string
    {
        return Variable::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!is_string($node->name)) {
            return [];
        }
        if ($this->cliArgumentsVariablesRegistered && in_array($node->name, ['argc', 'argv'], \true)) {
            $isInMain = !$scope->isInClass() && !$scope->isInAnonymousFunction() && $scope->getFunction() === null;
            if ($isInMain) {
                return [];
            }
        }
        if ($scope->isInExpressionAssign($node) || $scope->isUndefinedExpressionAllowed($node)) {
            return [];
        }
        if ($scope->hasVariableType($node->name)->no()) {
            return [RuleErrorBuilder::message(sprintf('Undefined variable: $%s', $node->name))->identifier('variable.undefined')->metadata(['variableName' => $node->name, 'statementDepth' => $node->getAttribute('statementDepth'), 'statementOrder' => $node->getAttribute('statementOrder'), 'depth' => $node->getAttribute('expressionDepth'), 'order' => $node->getAttribute('expressionOrder'), 'variables' => $scope->getDefinedVariables(), 'parentVariables' => $this->getParentVariables($scope)])->build()];
        } elseif ($this->checkMaybeUndefinedVariables && !$scope->hasVariableType($node->name)->yes()) {
            return [RuleErrorBuilder::message(sprintf('Variable $%s might not be defined.', $node->name))->identifier('variable.maybeUndefined')->metadata(['variableName' => $node->name, 'statementDepth' => $node->getAttribute('statementDepth'), 'statementOrder' => $node->getAttribute('statementOrder'), 'depth' => $node->getAttribute('expressionDepth'), 'order' => $node->getAttribute('expressionOrder'), 'variables' => $scope->getDefinedVariables(), 'parentVariables' => $this->getParentVariables($scope)])->build()];
        }
        return [];
    }
    /**
     * @return array<int, array<int, string>>
     */
    private function getParentVariables(Scope $scope) : array
    {
        $variables = [];
        $parent = $scope->getParentScope();
        while ($parent !== null) {
            $variables[] = $parent->getDefinedVariables();
            $parent = $parent->getParentScope();
        }
        return $variables;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Variables;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\IssetCheck;
use PHPStan\Rules\Rule;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\NullType;
use PHPStan\Type\Type;
/**
 * @implements Rule<Node\Expr\Empty_>
 */
class EmptyRule implements Rule
{
    /**
     * @var \PHPStan\Rules\IssetCheck
     */
    private $issetCheck;
    public function __construct(IssetCheck $issetCheck)
    {
        $this->issetCheck = $issetCheck;
    }
    public function getNodeType() : string
    {
        return Node\Expr\Empty_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $error = $this->issetCheck->check($node->expr, $scope, 'in empty()', static function (Type $type) : ?string {
            $isNull = (new NullType())->isSuperTypeOf($type);
            $isFalsey = (new ConstantBooleanType(\false))->isSuperTypeOf($type->toBoolean());
            if ($isNull->maybe()) {
                return null;
            }
            if ($isFalsey->maybe()) {
                return null;
            }
            if ($isNull->yes()) {
                if ($isFalsey->yes()) {
                    return 'is always falsy';
                }
                if ($isFalsey->no()) {
                    return 'is not falsy';
                }
                return 'is always null';
            }
            if ($isFalsey->yes()) {
                return 'is always falsy';
            }
            if ($isFalsey->no()) {
                return 'is not falsy';
            }
            return 'is not nullable';
        });
        if ($error === null) {
            return [];
        }
        return [$error];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Variables;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\Type;
use function array_merge;
use function sprintf;
use function strtolower;
/**
 * @implements Rule<Node\Expr\FuncCall>
 */
final class CompactVariablesRule implements Rule
{
    /**
     * @var bool
     */
    private $checkMaybeUndefinedVariables;
    public function __construct(bool $checkMaybeUndefinedVariables)
    {
        $this->checkMaybeUndefinedVariables = $checkMaybeUndefinedVariables;
    }
    public function getNodeType() : string
    {
        return Node\Expr\FuncCall::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if ($node->name instanceof Node\Expr) {
            return [];
        }
        $functionName = strtolower($node->name->toString());
        if ($functionName !== 'compact') {
            return [];
        }
        $functionArguments = $node->getArgs();
        $messages = [];
        foreach ($functionArguments as $argument) {
            $argumentType = $scope->getType($argument->value);
            $constantStrings = $this->findConstantStrings($argumentType);
            foreach ($constantStrings as $constantString) {
                $variableName = $constantString->getValue();
                $scopeHasVariable = $scope->hasVariableType($variableName);
                if ($scopeHasVariable->no()) {
                    $messages[] = RuleErrorBuilder::message(sprintf('Call to function compact() contains undefined variable $%s.', $variableName))->line($argument->getLine())->build();
                } elseif ($this->checkMaybeUndefinedVariables && $scopeHasVariable->maybe()) {
                    $messages[] = RuleErrorBuilder::message(sprintf('Call to function compact() contains possibly undefined variable $%s.', $variableName))->line($argument->getLine())->build();
                }
            }
        }
        return $messages;
    }
    /**
     * @return array<int, ConstantStringType>
     */
    private function findConstantStrings(Type $type) : array
    {
        if ($type instanceof ConstantStringType) {
            return [$type];
        }
        if ($type instanceof ConstantArrayType) {
            $result = [];
            foreach ($type->getValueTypes() as $valueType) {
                $constantStrings = $this->findConstantStrings($valueType);
                $result = array_merge($result, $constantStrings);
            }
            return $result;
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Variables;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\IssetCheck;
use PHPStan\Rules\Rule;
use PHPStan\Type\NullType;
use PHPStan\Type\Type;
/**
 * @implements Rule<Node\Expr>
 */
class NullCoalesceRule implements Rule
{
    /**
     * @var \PHPStan\Rules\IssetCheck
     */
    private $issetCheck;
    public function __construct(IssetCheck $issetCheck)
    {
        $this->issetCheck = $issetCheck;
    }
    public function getNodeType() : string
    {
        return Node\Expr::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $typeMessageCallback = static function (Type $type) : ?string {
            $isNull = (new NullType())->isSuperTypeOf($type);
            if ($isNull->maybe()) {
                return null;
            }
            if ($isNull->yes()) {
                return 'is always null';
            }
            return 'is not nullable';
        };
        if ($node instanceof Node\Expr\BinaryOp\Coalesce) {
            $error = $this->issetCheck->check($node->left, $scope, 'on left side of ??', $typeMessageCallback);
        } elseif ($node instanceof Node\Expr\AssignOp\Coalesce) {
            $error = $this->issetCheck->check($node->var, $scope, 'on left side of ??=', $typeMessageCallback);
        } else {
            return [];
        }
        if ($error === null) {
            return [];
        }
        return [$error];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Variables;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\ErrorType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use Throwable;
use function sprintf;
/**
 * @implements Rule<Node\Stmt\Throw_>
 */
class ThrowTypeRule implements Rule
{
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    public function __construct(RuleLevelHelper $ruleLevelHelper)
    {
        $this->ruleLevelHelper = $ruleLevelHelper;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\Throw_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $throwableType = new ObjectType(Throwable::class);
        $typeResult = $this->ruleLevelHelper->findTypeToCheck($scope, $node->expr, 'Throwing object of an unknown class %s.', static function (Type $type) use($throwableType) : bool {
            return $throwableType->isSuperTypeOf($type)->yes();
        });
        $foundType = $typeResult->getType();
        if ($foundType instanceof ErrorType) {
            return $typeResult->getUnknownClassErrors();
        }
        $isSuperType = $throwableType->isSuperTypeOf($foundType);
        if ($isSuperType->yes()) {
            return [];
        }
        return [RuleErrorBuilder::message(sprintf('Invalid type %s to throw.', $foundType->describe(VerbosityLevel::typeOnly())))->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Variables;

use PhpParser\Node;
use PhpParser\Node\Expr\Clone_;
use PhpParser\Node\Expr\Variable;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use function is_string;
use function sprintf;
/**
 * @implements Rule<Node\Expr\Clone_>
 */
class VariableCloningRule implements Rule
{
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    public function __construct(RuleLevelHelper $ruleLevelHelper)
    {
        $this->ruleLevelHelper = $ruleLevelHelper;
    }
    public function getNodeType() : string
    {
        return Clone_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $typeResult = $this->ruleLevelHelper->findTypeToCheck($scope, $node->expr, 'Cloning object of an unknown class %s.', static function (Type $type) : bool {
            return $type->isCloneable()->yes();
        });
        $type = $typeResult->getType();
        if ($type instanceof ErrorType) {
            return $typeResult->getUnknownClassErrors();
        }
        if ($type->isCloneable()->yes()) {
            return [];
        }
        if ($node->expr instanceof Variable && is_string($node->expr->name)) {
            return [RuleErrorBuilder::message(sprintf('Cannot clone non-object variable $%s of type %s.', $node->expr->name, $type->describe(VerbosityLevel::typeOnly())))->build()];
        }
        return [RuleErrorBuilder::message(sprintf('Cannot clone %s.', $type->describe(VerbosityLevel::typeOnly())))->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Variables;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\IssetCheck;
use PHPStan\Rules\Rule;
use PHPStan\Type\NullType;
use PHPStan\Type\Type;
/**
 * @implements Rule<Node\Expr\Isset_>
 */
class IssetRule implements Rule
{
    /**
     * @var \PHPStan\Rules\IssetCheck
     */
    private $issetCheck;
    public function __construct(IssetCheck $issetCheck)
    {
        $this->issetCheck = $issetCheck;
    }
    public function getNodeType() : string
    {
        return Node\Expr\Isset_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $messages = [];
        foreach ($node->vars as $var) {
            $error = $this->issetCheck->check($var, $scope, 'in isset()', static function (Type $type) : ?string {
                $isNull = (new NullType())->isSuperTypeOf($type);
                if ($isNull->maybe()) {
                    return null;
                }
                if ($isNull->yes()) {
                    return 'is always null';
                }
                return 'is not nullable';
            });
            if ($error === null) {
                continue;
            }
            $messages[] = $error;
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Variables;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\VerbosityLevel;
use function is_string;
use function sprintf;
/**
 * @implements Rule<Node\Stmt\Unset_>
 */
class UnsetRule implements Rule
{
    public function getNodeType() : string
    {
        return Node\Stmt\Unset_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $functionArguments = $node->vars;
        $errors = [];
        foreach ($functionArguments as $argument) {
            $error = $this->canBeUnset($argument, $scope);
            if ($error === null) {
                continue;
            }
            $errors[] = $error;
        }
        return $errors;
    }
    private function canBeUnset(Node $node, Scope $scope) : ?RuleError
    {
        if ($node instanceof Node\Expr\Variable && is_string($node->name)) {
            $hasVariable = $scope->hasVariableType($node->name);
            if ($hasVariable->no()) {
                return RuleErrorBuilder::message(sprintf('Call to function unset() contains undefined variable $%s.', $node->name))->line($node->getLine())->build();
            }
        } elseif ($node instanceof Node\Expr\ArrayDimFetch && $node->dim !== null) {
            $type = $scope->getType($node->var);
            $dimType = $scope->getType($node->dim);
            if ($type->isOffsetAccessible()->no() || $type->hasOffsetValueType($dimType)->no()) {
                return RuleErrorBuilder::message(sprintf('Cannot unset offset %s on %s.', $dimType->describe(VerbosityLevel::value()), $type->describe(VerbosityLevel::value())))->line($node->getLine())->build();
            }
            return $this->canBeUnset($node->var, $scope);
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules;

use PhpParser\Node;
use PhpParser\Node\Expr\ConstFetch;
use PhpParser\Node\Expr\Variable;
use PhpParser\Node\FunctionLike;
use PhpParser\Node\Param;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Function_;
use PhpParser\Node\UnionType;
use PHPStan\Analyser\Scope;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParameterReflection;
use PHPStan\Reflection\ParameterReflectionWithPhpDocs;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Reflection\ParametersAcceptorWithPhpDocs;
use PHPStan\Reflection\Php\PhpMethodFromParserNodeReflection;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\PhpDoc\UnresolvableTypeHelper;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\ConditionalTypeForParameter;
use PHPStan\Type\Generic\TemplateType;
use PHPStan\Type\NonexistentParentClassType;
use PHPStan\Type\ParserNodeTypeToPHPStanType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeTraverser;
use PHPStan\Type\VerbosityLevel;
use function array_keys;
use function array_map;
use function array_merge;
use function count;
use function is_string;
use function sprintf;
class FunctionDefinitionCheck
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Rules\ClassCaseSensitivityCheck
     */
    private $classCaseSensitivityCheck;
    /**
     * @var \PHPStan\Rules\PhpDoc\UnresolvableTypeHelper
     */
    private $unresolvableTypeHelper;
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    /**
     * @var bool
     */
    private $checkClassCaseSensitivity;
    /**
     * @var bool
     */
    private $checkThisOnly;
    public function __construct(ReflectionProvider $reflectionProvider, \PHPStan\Rules\ClassCaseSensitivityCheck $classCaseSensitivityCheck, UnresolvableTypeHelper $unresolvableTypeHelper, PhpVersion $phpVersion, bool $checkClassCaseSensitivity, bool $checkThisOnly)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->classCaseSensitivityCheck = $classCaseSensitivityCheck;
        $this->unresolvableTypeHelper = $unresolvableTypeHelper;
        $this->phpVersion = $phpVersion;
        $this->checkClassCaseSensitivity = $checkClassCaseSensitivity;
        $this->checkThisOnly = $checkThisOnly;
    }
    /**
     * @return RuleError[]
     */
    public function checkFunction(Function_ $function, FunctionReflection $functionReflection, string $parameterMessage, string $returnMessage, string $unionTypesMessage, string $templateTypeMissingInParameterMessage, string $unresolvableParameterTypeMessage, string $unresolvableReturnTypeMessage) : array
    {
        $parametersAcceptor = ParametersAcceptorSelector::selectSingle($functionReflection->getVariants());
        return $this->checkParametersAcceptor($parametersAcceptor, $function, $parameterMessage, $returnMessage, $unionTypesMessage, $templateTypeMissingInParameterMessage, $unresolvableParameterTypeMessage, $unresolvableReturnTypeMessage);
    }
    /**
     * @param Node\Param[] $parameters
     * @param Node\Identifier|Node\Name|Node\ComplexType|null $returnTypeNode
     * @return RuleError[]
     */
    public function checkAnonymousFunction(Scope $scope, array $parameters, $returnTypeNode, string $parameterMessage, string $returnMessage, string $unionTypesMessage, string $unresolvableParameterTypeMessage, string $unresolvableReturnTypeMessage) : array
    {
        $errors = [];
        $unionTypeReported = \false;
        foreach ($parameters as $param) {
            if ($param->type === null) {
                continue;
            }
            if (!$unionTypeReported && $param->type instanceof UnionType && !$this->phpVersion->supportsNativeUnionTypes()) {
                $errors[] = \PHPStan\Rules\RuleErrorBuilder::message($unionTypesMessage)->line($param->getLine())->nonIgnorable()->build();
                $unionTypeReported = \true;
            }
            if (!$param->var instanceof Variable || !is_string($param->var->name)) {
                throw new ShouldNotHappenException();
            }
            $type = $scope->getFunctionType($param->type, \false, \false);
            if ($type->isVoid()->yes()) {
                $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf($parameterMessage, $param->var->name, 'void'))->line($param->type->getLine())->nonIgnorable()->build();
            }
            if ($this->phpVersion->supportsPureIntersectionTypes() && $this->unresolvableTypeHelper->containsUnresolvableType($type)) {
                $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf($unresolvableParameterTypeMessage, $param->var->name))->line($param->type->getLine())->nonIgnorable()->build();
            }
            foreach ($type->getReferencedClasses() as $class) {
                if (!$this->reflectionProvider->hasClass($class) || $this->reflectionProvider->getClass($class)->isTrait()) {
                    $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf($parameterMessage, $param->var->name, $class))->line($param->type->getLine())->build();
                } elseif ($this->checkClassCaseSensitivity) {
                    $errors = array_merge($errors, $this->classCaseSensitivityCheck->checkClassNames([new \PHPStan\Rules\ClassNameNodePair($class, $param->type)]));
                }
            }
        }
        if ($this->phpVersion->deprecatesRequiredParameterAfterOptional()) {
            $errors = array_merge($errors, $this->checkRequiredParameterAfterOptional($parameters));
        }
        if ($returnTypeNode === null) {
            return $errors;
        }
        if (!$unionTypeReported && $returnTypeNode instanceof UnionType && !$this->phpVersion->supportsNativeUnionTypes()) {
            $errors[] = \PHPStan\Rules\RuleErrorBuilder::message($unionTypesMessage)->line($returnTypeNode->getLine())->nonIgnorable()->build();
        }
        $returnType = $scope->getFunctionType($returnTypeNode, \false, \false);
        if ($this->phpVersion->supportsPureIntersectionTypes() && $this->unresolvableTypeHelper->containsUnresolvableType($returnType)) {
            $errors[] = \PHPStan\Rules\RuleErrorBuilder::message($unresolvableReturnTypeMessage)->line($returnTypeNode->getLine())->nonIgnorable()->build();
        }
        foreach ($returnType->getReferencedClasses() as $returnTypeClass) {
            if (!$this->reflectionProvider->hasClass($returnTypeClass) || $this->reflectionProvider->getClass($returnTypeClass)->isTrait()) {
                $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf($returnMessage, $returnTypeClass))->line($returnTypeNode->getLine())->build();
            } elseif ($this->checkClassCaseSensitivity) {
                $errors = array_merge($errors, $this->classCaseSensitivityCheck->checkClassNames([new \PHPStan\Rules\ClassNameNodePair($returnTypeClass, $returnTypeNode)]));
            }
        }
        return $errors;
    }
    /**
     * @return RuleError[]
     */
    public function checkClassMethod(PhpMethodFromParserNodeReflection $methodReflection, ClassMethod $methodNode, string $parameterMessage, string $returnMessage, string $unionTypesMessage, string $templateTypeMissingInParameterMessage, string $unresolvableParameterTypeMessage, string $unresolvableReturnTypeMessage) : array
    {
        /** @var ParametersAcceptorWithPhpDocs $parametersAcceptor */
        $parametersAcceptor = ParametersAcceptorSelector::selectSingle($methodReflection->getVariants());
        return $this->checkParametersAcceptor($parametersAcceptor, $methodNode, $parameterMessage, $returnMessage, $unionTypesMessage, $templateTypeMissingInParameterMessage, $unresolvableParameterTypeMessage, $unresolvableReturnTypeMessage);
    }
    /**
     * @return RuleError[]
     */
    private function checkParametersAcceptor(ParametersAcceptor $parametersAcceptor, FunctionLike $functionNode, string $parameterMessage, string $returnMessage, string $unionTypesMessage, string $templateTypeMissingInParameterMessage, string $unresolvableParameterTypeMessage, string $unresolvableReturnTypeMessage) : array
    {
        $errors = [];
        $parameterNodes = $functionNode->getParams();
        if (!$this->phpVersion->supportsNativeUnionTypes()) {
            $unionTypeReported = \false;
            foreach ($parameterNodes as $parameterNode) {
                if (!$parameterNode->type instanceof UnionType) {
                    continue;
                }
                $errors[] = \PHPStan\Rules\RuleErrorBuilder::message($unionTypesMessage)->line($parameterNode->getLine())->nonIgnorable()->build();
                $unionTypeReported = \true;
                break;
            }
            if (!$unionTypeReported && $functionNode->getReturnType() instanceof UnionType) {
                $errors[] = \PHPStan\Rules\RuleErrorBuilder::message($unionTypesMessage)->line($functionNode->getReturnType()->getLine())->nonIgnorable()->build();
            }
        }
        if ($this->phpVersion->deprecatesRequiredParameterAfterOptional()) {
            $errors = array_merge($errors, $this->checkRequiredParameterAfterOptional($parameterNodes));
        }
        $returnTypeNode = $functionNode->getReturnType() ?? $functionNode;
        foreach ($parametersAcceptor->getParameters() as $parameter) {
            $referencedClasses = $this->getParameterReferencedClasses($parameter);
            $parameterNode = null;
            $parameterNodeCallback = function () use($parameter, $parameterNodes, &$parameterNode) : Param {
                if ($parameterNode === null) {
                    $parameterNode = $this->getParameterNode($parameter->getName(), $parameterNodes);
                }
                return $parameterNode;
            };
            if ($parameter instanceof ParameterReflectionWithPhpDocs) {
                $parameterVar = $parameterNodeCallback()->var;
                if (!$parameterVar instanceof Variable || !is_string($parameterVar->name)) {
                    throw new ShouldNotHappenException();
                }
                if ($parameter->getNativeType()->isVoid()->yes()) {
                    $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf($parameterMessage, $parameterVar->name, 'void'))->line($parameterNodeCallback()->getLine())->nonIgnorable()->build();
                }
                if ($this->phpVersion->supportsPureIntersectionTypes() && $this->unresolvableTypeHelper->containsUnresolvableType($parameter->getNativeType())) {
                    $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf($unresolvableParameterTypeMessage, $parameterVar->name))->line($parameterNodeCallback()->getLine())->nonIgnorable()->build();
                }
            }
            foreach ($referencedClasses as $class) {
                if ($this->reflectionProvider->hasClass($class) && !$this->reflectionProvider->getClass($class)->isTrait()) {
                    continue;
                }
                $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf($parameterMessage, $parameter->getName(), $class))->line($parameterNodeCallback()->getLine())->build();
            }
            if ($this->checkClassCaseSensitivity) {
                $errors = array_merge($errors, $this->classCaseSensitivityCheck->checkClassNames(array_map(static function (string $class) use($parameterNodeCallback) : \PHPStan\Rules\ClassNameNodePair {
                    return new \PHPStan\Rules\ClassNameNodePair($class, $parameterNodeCallback());
                }, $referencedClasses)));
            }
            if (!$parameter->getType() instanceof NonexistentParentClassType) {
                continue;
            }
            $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf($parameterMessage, $parameter->getName(), $parameter->getType()->describe(VerbosityLevel::typeOnly())))->line($parameterNodeCallback()->getLine())->build();
        }
        if ($this->phpVersion->supportsPureIntersectionTypes() && $functionNode->getReturnType() !== null) {
            $nativeReturnType = ParserNodeTypeToPHPStanType::resolve($functionNode->getReturnType(), null);
            if ($this->unresolvableTypeHelper->containsUnresolvableType($nativeReturnType)) {
                $errors[] = \PHPStan\Rules\RuleErrorBuilder::message($unresolvableReturnTypeMessage)->nonIgnorable()->line($returnTypeNode->getLine())->build();
            }
        }
        $returnTypeReferencedClasses = $this->getReturnTypeReferencedClasses($parametersAcceptor);
        foreach ($returnTypeReferencedClasses as $class) {
            if ($this->reflectionProvider->hasClass($class) && !$this->reflectionProvider->getClass($class)->isTrait()) {
                continue;
            }
            $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf($returnMessage, $class))->line($returnTypeNode->getLine())->build();
        }
        if ($this->checkClassCaseSensitivity) {
            $errors = array_merge($errors, $this->classCaseSensitivityCheck->checkClassNames(array_map(static function (string $class) use($returnTypeNode) : \PHPStan\Rules\ClassNameNodePair {
                return new \PHPStan\Rules\ClassNameNodePair($class, $returnTypeNode);
            }, $returnTypeReferencedClasses)));
        }
        if ($parametersAcceptor->getReturnType() instanceof NonexistentParentClassType) {
            $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf($returnMessage, $parametersAcceptor->getReturnType()->describe(VerbosityLevel::typeOnly())))->line($returnTypeNode->getLine())->build();
        }
        $templateTypeMap = $parametersAcceptor->getTemplateTypeMap();
        $templateTypes = $templateTypeMap->getTypes();
        if (count($templateTypes) > 0) {
            foreach ($parametersAcceptor->getParameters() as $parameter) {
                TypeTraverser::map($parameter->getType(), static function (Type $type, callable $traverse) use(&$templateTypes) : Type {
                    if ($type instanceof TemplateType) {
                        unset($templateTypes[$type->getName()]);
                        return $traverse($type);
                    }
                    return $traverse($type);
                });
            }
            $returnType = $parametersAcceptor->getReturnType();
            if ($returnType instanceof ConditionalTypeForParameter && !$returnType->isNegated()) {
                TypeTraverser::map($returnType, static function (Type $type, callable $traverse) use(&$templateTypes) : Type {
                    if ($type instanceof TemplateType) {
                        unset($templateTypes[$type->getName()]);
                        return $traverse($type);
                    }
                    return $traverse($type);
                });
            }
            foreach (array_keys($templateTypes) as $templateTypeName) {
                $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf($templateTypeMissingInParameterMessage, $templateTypeName))->build();
            }
        }
        return $errors;
    }
    /**
     * @param Param[] $parameterNodes
     * @return RuleError[]
     */
    private function checkRequiredParameterAfterOptional(array $parameterNodes) : array
    {
        /** @var string|null $optionalParameter */
        $optionalParameter = null;
        $errors = [];
        foreach ($parameterNodes as $parameterNode) {
            if (!$parameterNode->var instanceof Variable) {
                throw new ShouldNotHappenException();
            }
            if (!is_string($parameterNode->var->name)) {
                throw new ShouldNotHappenException();
            }
            $parameterName = $parameterNode->var->name;
            if ($optionalParameter !== null && $parameterNode->default === null && !$parameterNode->variadic) {
                $errors[] = \PHPStan\Rules\RuleErrorBuilder::message(sprintf('Deprecated in PHP 8.0: Required parameter $%s follows optional parameter $%s.', $parameterName, $optionalParameter))->line($parameterNode->getStartLine())->build();
                continue;
            }
            if ($parameterNode->default === null) {
                continue;
            }
            if ($parameterNode->type === null) {
                $optionalParameter = $parameterName;
                continue;
            }
            $defaultValue = $parameterNode->default;
            if (!$defaultValue instanceof ConstFetch) {
                $optionalParameter = $parameterName;
                continue;
            }
            $constantName = $defaultValue->name->toLowerString();
            if ($constantName === 'null') {
                continue;
            }
            $optionalParameter = $parameterName;
        }
        return $errors;
    }
    /**
     * @param Param[] $parameterNodes
     */
    private function getParameterNode(string $parameterName, array $parameterNodes) : Param
    {
        foreach ($parameterNodes as $param) {
            if ($param->var instanceof Node\Expr\Error) {
                continue;
            }
            if (!is_string($param->var->name)) {
                continue;
            }
            if ($param->var->name === $parameterName) {
                return $param;
            }
        }
        throw new ShouldNotHappenException(sprintf('Parameter %s not found.', $parameterName));
    }
    /**
     * @return string[]
     */
    private function getParameterReferencedClasses(ParameterReflection $parameter) : array
    {
        if (!$parameter instanceof ParameterReflectionWithPhpDocs) {
            return $parameter->getType()->getReferencedClasses();
        }
        if ($this->checkThisOnly) {
            return $parameter->getNativeType()->getReferencedClasses();
        }
        return array_merge($parameter->getNativeType()->getReferencedClasses(), $parameter->getPhpDocType()->getReferencedClasses());
    }
    /**
     * @return string[]
     */
    private function getReturnTypeReferencedClasses(ParametersAcceptor $parametersAcceptor) : array
    {
        if (!$parametersAcceptor instanceof ParametersAcceptorWithPhpDocs) {
            return $parametersAcceptor->getReturnType()->getReferencedClasses();
        }
        if ($this->checkThisOnly) {
            return $parametersAcceptor->getNativeReturnType()->getReferencedClasses();
        }
        return array_merge($parametersAcceptor->getNativeReturnType()->getReferencedClasses(), $parametersAcceptor->getPhpDocReturnType()->getReferencedClasses());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Api;

use PHPStan\Analyser\Scope;
use PHPStan\File\ParentDirectoryRelativePathHelper;
use function dirname;
use function pathinfo;
use function stripos;
use function strpos;
use function strtolower;
use const PATHINFO_BASENAME;
class ApiRuleHelper
{
    public function isPhpStanCode(Scope $scope, string $namespace, ?string $declaringFile) : bool
    {
        $scopeNamespace = $scope->getNamespace();
        if ($scopeNamespace === null) {
            return $this->isPhpStanName($namespace);
        }
        if ($this->isPhpStanName($scopeNamespace)) {
            if (!$this->isPhpStanName($namespace)) {
                return \false;
            }
            if ($declaringFile !== null) {
                $scopeFile = $scope->getFile();
                $dir = dirname($scopeFile);
                $helper = new ParentDirectoryRelativePathHelper($dir);
                $pathParts = $helper->getFilenameParts($declaringFile);
                $directories = $this->createAbsoluteDirectories($dir, $pathParts);
                foreach ($directories as $directory) {
                    if (pathinfo($directory, PATHINFO_BASENAME) === 'vendor') {
                        return \true;
                    }
                }
            }
            return \false;
        }
        return $this->isPhpStanName($namespace);
    }
    /**
     * @param string[] $parts
     * @return string[]
     */
    private function createAbsoluteDirectories(string $currentDirectory, array $parts) : array
    {
        $directories = [];
        foreach ($parts as $part) {
            if ($part === '..') {
                $currentDirectory = dirname($currentDirectory);
                $directories[] = $currentDirectory;
                continue;
            }
            $currentDirectory .= '/' . $part;
            $directories[] = $currentDirectory;
        }
        return $directories;
    }
    public function isPhpStanName(string $namespace) : bool
    {
        if (strtolower($namespace) === 'phpstan') {
            return \true;
        }
        if (strpos($namespace, 'PHPStan\\PhpDocParser\\') === 0) {
            return \false;
        }
        if (strpos($namespace, 'PHPStan\\BetterReflection\\') === 0) {
            return \false;
        }
        return stripos($namespace, 'PHPStan\\') === 0;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Api;

use PhpParser\Node;
use PhpParser\Node\Stmt\Interface_;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use function array_merge;
use function count;
use function in_array;
use function sprintf;
/**
 * @implements Rule<Interface_>
 */
class ApiInterfaceExtendsRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Api\ApiRuleHelper
     */
    private $apiRuleHelper;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(\PHPStan\Rules\Api\ApiRuleHelper $apiRuleHelper, ReflectionProvider $reflectionProvider)
    {
        $this->apiRuleHelper = $apiRuleHelper;
        $this->reflectionProvider = $reflectionProvider;
    }
    public function getNodeType() : string
    {
        return Interface_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $errors = [];
        foreach ($node->extends as $extends) {
            $errors = array_merge($errors, $this->checkName($scope, $extends));
        }
        return $errors;
    }
    /**
     * @return RuleError[]
     */
    private function checkName(Scope $scope, Node\Name $name) : array
    {
        $extendedInterface = (string) $name;
        if (!$this->reflectionProvider->hasClass($extendedInterface)) {
            return [];
        }
        $extendedInterfaceReflection = $this->reflectionProvider->getClass($extendedInterface);
        if (!$this->apiRuleHelper->isPhpStanCode($scope, $extendedInterfaceReflection->getName(), $extendedInterfaceReflection->getFileName())) {
            return [];
        }
        $ruleError = RuleErrorBuilder::message(sprintf('Extending %s is not covered by backward compatibility promise. The interface might change in a minor PHPStan version.', $extendedInterfaceReflection->getDisplayName()))->tip(sprintf("If you think it should be covered by backward compatibility promise, open a discussion:\n   %s\n\n   See also:\n   https://phpstan.org/developing-extensions/backward-compatibility-promise", 'https://github.com/phpstan/phpstan/discussions'))->build();
        if (in_array($extendedInterfaceReflection->getName(), \PHPStan\Rules\Api\BcUncoveredInterface::CLASSES, \true)) {
            return [$ruleError];
        }
        $docBlock = $extendedInterfaceReflection->getResolvedPhpDoc();
        if ($docBlock === null) {
            return [$ruleError];
        }
        foreach ($docBlock->getPhpDocNodes() as $phpDocNode) {
            $apiTags = $phpDocNode->getTagsByName('@api');
            if (count($apiTags) > 0) {
                return [];
            }
        }
        return [$ruleError];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Api;

use PhpParser\Node;
use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\Type;
use function count;
use function sprintf;
/**
 * @implements Rule<MethodCall>
 */
class GetTemplateTypeRule implements Rule
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(ReflectionProvider $reflectionProvider)
    {
        $this->reflectionProvider = $reflectionProvider;
    }
    public function getNodeType() : string
    {
        return MethodCall::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $args = $node->getArgs();
        if (count($args) < 2) {
            return [];
        }
        if (!$node->name instanceof Node\Identifier) {
            return [];
        }
        if ($node->name->toLowerString() !== 'gettemplatetype') {
            return [];
        }
        $calledOnType = $scope->getType($node->var);
        $methodReflection = $scope->getMethodReflection($calledOnType, $node->name->toString());
        if ($methodReflection === null) {
            return [];
        }
        if (!$methodReflection->getDeclaringClass()->is(Type::class)) {
            return [];
        }
        $classType = $scope->getType($args[0]->value);
        $templateType = $scope->getType($args[1]->value);
        $errors = [];
        foreach ($classType->getConstantStrings() as $classNameType) {
            if (!$this->reflectionProvider->hasClass($classNameType->getValue())) {
                continue;
            }
            $classReflection = $this->reflectionProvider->getClass($classNameType->getValue());
            $templateTypeMap = $classReflection->getTemplateTypeMap();
            foreach ($templateType->getConstantStrings() as $templateTypeName) {
                if ($templateTypeMap->hasType($templateTypeName->getValue())) {
                    continue;
                }
                $errors[] = RuleErrorBuilder::message(sprintf('Call to %s::%s() references unknown template type %s on class %s.', $methodReflection->getDeclaringClass()->getDisplayName(), $methodReflection->getName(), $templateTypeName->getValue(), $classReflection->getDisplayName()))->build();
            }
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Api;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function sprintf;
/**
 * @implements Rule<Node\Stmt\TraitUse>
 */
class ApiTraitUseRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Api\ApiRuleHelper
     */
    private $apiRuleHelper;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(\PHPStan\Rules\Api\ApiRuleHelper $apiRuleHelper, ReflectionProvider $reflectionProvider)
    {
        $this->apiRuleHelper = $apiRuleHelper;
        $this->reflectionProvider = $reflectionProvider;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\TraitUse::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $errors = [];
        $tip = sprintf("If you think it should be covered by backward compatibility promise, open a discussion:\n   %s\n\n   See also:\n   https://phpstan.org/developing-extensions/backward-compatibility-promise", 'https://github.com/phpstan/phpstan/discussions');
        foreach ($node->traits as $traitName) {
            $traitName = $traitName->toString();
            if (!$this->reflectionProvider->hasClass($traitName)) {
                continue;
            }
            $traitReflection = $this->reflectionProvider->getClass($traitName);
            if (!$this->apiRuleHelper->isPhpStanCode($scope, $traitReflection->getName(), $traitReflection->getFileName())) {
                continue;
            }
            $errors[] = RuleErrorBuilder::message(sprintf('Using %s is not covered by backward compatibility promise. The trait might change in a minor PHPStan version.', $traitReflection->getDisplayName()))->tip($tip)->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Api;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use ReflectionClass;
use ReflectionClassConstant;
use ReflectionExtension;
use ReflectionFunction;
use ReflectionGenerator;
use ReflectionMethod;
use ReflectionObject;
use ReflectionParameter;
use ReflectionProperty;
use ReflectionZendExtension;
use function array_keys;
use function in_array;
use function sprintf;
use function strpos;
/**
 * @implements Rule<Node\Expr\New_>
 */
class RuntimeReflectionInstantiationRule implements Rule
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(ReflectionProvider $reflectionProvider)
    {
        $this->reflectionProvider = $reflectionProvider;
    }
    public function getNodeType() : string
    {
        return Node\Expr\New_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->class instanceof Node\Name) {
            return [];
        }
        $className = $scope->resolveName($node->class);
        if (!$this->reflectionProvider->hasClass($className)) {
            return [];
        }
        $classReflection = $this->reflectionProvider->getClass($className);
        if (!in_array($classReflection->getName(), [ReflectionMethod::class, ReflectionClass::class, ReflectionClassConstant::class, 'ReflectionEnum', 'ReflectionEnumBackedCase', ReflectionZendExtension::class, ReflectionExtension::class, ReflectionFunction::class, ReflectionObject::class, ReflectionParameter::class, ReflectionProperty::class, ReflectionGenerator::class, 'ReflectionFiber'], \true)) {
            return [];
        }
        if (!$scope->isInClass()) {
            return [];
        }
        $scopeClassReflection = $scope->getClassReflection();
        $hasPhpStanInterface = \false;
        foreach (array_keys($scopeClassReflection->getInterfaces()) as $interfaceName) {
            if (strpos($interfaceName, 'PHPStan\\') !== 0) {
                continue;
            }
            $hasPhpStanInterface = \true;
        }
        if (!$hasPhpStanInterface) {
            return [];
        }
        return [RuleErrorBuilder::message(sprintf('Creating new %s is a runtime reflection concept that might not work in PHPStan because it uses fully static reflection engine. Use objects retrieved from ReflectionProvider instead.', $classReflection->getName()))->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Api;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function count;
use function sprintf;
use function strpos;
/**
 * @implements Rule<Node\Expr\StaticCall>
 */
class ApiStaticCallRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Api\ApiRuleHelper
     */
    private $apiRuleHelper;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(\PHPStan\Rules\Api\ApiRuleHelper $apiRuleHelper, ReflectionProvider $reflectionProvider)
    {
        $this->apiRuleHelper = $apiRuleHelper;
        $this->reflectionProvider = $reflectionProvider;
    }
    public function getNodeType() : string
    {
        return Node\Expr\StaticCall::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->name instanceof Node\Identifier) {
            return [];
        }
        if (!$node->class instanceof Node\Name) {
            return [];
        }
        $className = $scope->resolveName($node->class);
        if (!$this->reflectionProvider->hasClass($className)) {
            return [];
        }
        $classReflection = $this->reflectionProvider->getClass($className);
        $methodName = $node->name->toString();
        if (!$classReflection->hasNativeMethod($methodName)) {
            return [];
        }
        $methodReflection = $classReflection->getNativeMethod($methodName);
        $declaringClass = $methodReflection->getDeclaringClass();
        if (!$this->apiRuleHelper->isPhpStanCode($scope, $declaringClass->getName(), $declaringClass->getFileName())) {
            return [];
        }
        if ($this->isCovered($methodReflection)) {
            return [];
        }
        $ruleError = RuleErrorBuilder::message(sprintf('Calling %s::%s() is not covered by backward compatibility promise. The method might change in a minor PHPStan version.', $declaringClass->getDisplayName(), $methodReflection->getName()))->tip(sprintf("If you think it should be covered by backward compatibility promise, open a discussion:\n   %s\n\n   See also:\n   https://phpstan.org/developing-extensions/backward-compatibility-promise", 'https://github.com/phpstan/phpstan/discussions'))->build();
        return [$ruleError];
    }
    private function isCovered(MethodReflection $methodReflection) : bool
    {
        $declaringClass = $methodReflection->getDeclaringClass();
        $classDocBlock = $declaringClass->getResolvedPhpDoc();
        if ($methodReflection->getName() !== '__construct' && $classDocBlock !== null) {
            foreach ($classDocBlock->getPhpDocNodes() as $phpDocNode) {
                $apiTags = $phpDocNode->getTagsByName('@api');
                if (count($apiTags) > 0) {
                    return \true;
                }
            }
        }
        $methodDocComment = $methodReflection->getDocComment();
        if ($methodDocComment === null) {
            return \false;
        }
        return strpos($methodDocComment, '@api') !== \false;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Api;

use PhpParser\Node;
use PhpParser\Node\Expr\Instanceof_;
use PHPStan\Analyser\Scope;
use PHPStan\Parser\TypeTraverserInstanceofVisitor;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\Accessory\AccessoryLiteralStringType;
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
use PHPStan\Type\Accessory\AccessoryNonFalsyStringType;
use PHPStan\Type\Accessory\AccessoryNumericStringType;
use PHPStan\Type\Accessory\AccessoryType;
use PHPStan\Type\Accessory\HasMethodType;
use PHPStan\Type\Accessory\HasOffsetType;
use PHPStan\Type\Accessory\HasPropertyType;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\Accessory\OversizedArrayType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\BooleanType;
use PHPStan\Type\CallableType;
use PHPStan\Type\ClassStringType;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\ConstantScalarType;
use PHPStan\Type\ConstantType;
use PHPStan\Type\Enum\EnumCaseObjectType;
use PHPStan\Type\FloatType;
use PHPStan\Type\Generic\GenericClassStringType;
use PHPStan\Type\Generic\GenericObjectType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\IterableType;
use PHPStan\Type\NullType;
use PHPStan\Type\ObjectShapeType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\ObjectWithoutClassType;
use PHPStan\Type\StringType;
use PHPStan\Type\TypeWithClassName;
use PHPStan\Type\VoidType;
use function array_key_exists;
use function sprintf;
use function strtolower;
/**
 * @implements Rule<Instanceof_>
 */
class ApiInstanceofTypeRule implements Rule
{
    private const MAP = [
        TypeWithClassName::class => 'Type::getObjectClassNames() or Type::getObjectClassReflections()',
        EnumCaseObjectType::class => 'Type::getEnumCases()',
        ConstantArrayType::class => 'Type::getConstantArrays()',
        ArrayType::class => 'Type::isArray() or Type::getArrays()',
        ConstantStringType::class => 'Type::getConstantStrings()',
        StringType::class => 'Type::isString()',
        ClassStringType::class => 'Type::isClassStringType()',
        IntegerType::class => 'Type::isInteger()',
        FloatType::class => 'Type::isFloat()',
        NullType::class => 'Type::isNull()',
        VoidType::class => 'Type::isVoid()',
        BooleanType::class => 'Type::isBoolean()',
        ConstantBooleanType::class => 'Type::isTrue() or Type::isFalse()',
        CallableType::class => 'Type::isCallable() and Type::getCallableParametersAcceptors()',
        IterableType::class => 'Type::isIterable()',
        ObjectWithoutClassType::class => 'Type::isObject()',
        ObjectType::class => 'Type::isObject() or Type::getObjectClassNames()',
        GenericClassStringType::class => 'Type::isClassStringType() and Type::getClassStringObjectType()',
        GenericObjectType::class => null,
        IntersectionType::class => null,
        ConstantType::class => 'Type::isConstantValue() or Type::generalize()',
        ConstantScalarType::class => 'Type::isConstantScalarValue() or Type::getConstantScalarTypes() or Type::getConstantScalarValues()',
        ObjectShapeType::class => 'Type::isObject() and Type::hasProperty()',
        // accessory types
        NonEmptyArrayType::class => 'Type::isIterableAtLeastOnce()',
        OversizedArrayType::class => 'Type::isOversizedArray()',
        AccessoryArrayListType::class => 'Type::isList()',
        AccessoryNumericStringType::class => 'Type::isNumericString()',
        AccessoryLiteralStringType::class => 'Type::isLiteralString()',
        AccessoryNonEmptyStringType::class => 'Type::isNonEmptyString()',
        AccessoryNonFalsyStringType::class => 'Type::isNonFalsyString()',
        HasMethodType::class => 'Type::hasMethod()',
        HasPropertyType::class => 'Type::hasProperty()',
        HasOffsetType::class => 'Type::hasOffsetValueType()',
        AccessoryType::class => 'methods on PHPStan\\Type\\Type',
    ];
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var bool
     */
    private $enabled;
    /**
     * @var bool
     */
    private $deprecationRulesInstalled;
    public function __construct(ReflectionProvider $reflectionProvider, bool $enabled, bool $deprecationRulesInstalled)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->enabled = $enabled;
        $this->deprecationRulesInstalled = $deprecationRulesInstalled;
    }
    public function getNodeType() : string
    {
        return Instanceof_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$this->enabled && !$this->deprecationRulesInstalled) {
            return [];
        }
        if (!$node->class instanceof Node\Name) {
            return [];
        }
        if ($node->getAttribute(TypeTraverserInstanceofVisitor::ATTRIBUTE_NAME, \false) === \true) {
            return [];
        }
        $lowerMap = [];
        foreach (self::MAP as $className => $method) {
            $lowerMap[strtolower($className)] = $method;
        }
        $className = $scope->resolveName($node->class);
        $lowerClassName = strtolower($className);
        if (!array_key_exists($lowerClassName, $lowerMap)) {
            return [];
        }
        if ($this->reflectionProvider->hasClass($className)) {
            $classReflection = $this->reflectionProvider->getClass($className);
            if ($classReflection->isSubclassOf(AccessoryType::class)) {
                if ($className === $classReflection->getName()) {
                    return [];
                }
            }
        }
        $tip = 'Learn more: <fg=cyan>https://phpstan.org/blog/why-is-instanceof-type-wrong-and-getting-deprecated</>';
        if ($lowerMap[$lowerClassName] === null) {
            return [RuleErrorBuilder::message(sprintf('Doing instanceof %s is error-prone and deprecated.', $className))->tip($tip)->build()];
        }
        return [RuleErrorBuilder::message(sprintf('Doing instanceof %s is error-prone and deprecated. Use %s instead.', $className, $lowerMap[$lowerClassName]))->tip($tip)->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Api;

use PhpParser\Node;
use PhpParser\Node\Stmt\Class_;
use PHPStan\Analyser\MutatingScope;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function count;
use function sprintf;
/**
 * @implements Rule<Class_>
 */
class ApiClassExtendsRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Api\ApiRuleHelper
     */
    private $apiRuleHelper;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(\PHPStan\Rules\Api\ApiRuleHelper $apiRuleHelper, ReflectionProvider $reflectionProvider)
    {
        $this->apiRuleHelper = $apiRuleHelper;
        $this->reflectionProvider = $reflectionProvider;
    }
    public function getNodeType() : string
    {
        return Class_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if ($node->extends === null) {
            return [];
        }
        $extendedClassName = (string) $node->extends;
        if (!$this->reflectionProvider->hasClass($extendedClassName)) {
            return [];
        }
        $extendedClassReflection = $this->reflectionProvider->getClass($extendedClassName);
        if (!$this->apiRuleHelper->isPhpStanCode($scope, $extendedClassReflection->getName(), $extendedClassReflection->getFileName())) {
            return [];
        }
        if ($extendedClassReflection->getName() === MutatingScope::class) {
            return [];
        }
        $ruleError = RuleErrorBuilder::message(sprintf('Extending %s is not covered by backward compatibility promise. The class might change in a minor PHPStan version.', $extendedClassReflection->getDisplayName()))->tip(sprintf("If you think it should be covered by backward compatibility promise, open a discussion:\n   %s\n\n   See also:\n   https://phpstan.org/developing-extensions/backward-compatibility-promise", 'https://github.com/phpstan/phpstan/discussions'))->build();
        $docBlock = $extendedClassReflection->getResolvedPhpDoc();
        if ($docBlock === null) {
            return [$ruleError];
        }
        foreach ($docBlock->getPhpDocNodes() as $phpDocNode) {
            $apiTags = $phpDocNode->getTagsByName('@api');
            if (count($apiTags) > 0) {
                return [];
            }
        }
        return [$ruleError];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Api;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use PHPStan\Type\UnionType;
use function count;
use function sprintf;
/**
 * @implements Rule<Node\Expr\Instanceof_>
 */
class ApiInstanceofRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Api\ApiRuleHelper
     */
    private $apiRuleHelper;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(\PHPStan\Rules\Api\ApiRuleHelper $apiRuleHelper, ReflectionProvider $reflectionProvider)
    {
        $this->apiRuleHelper = $apiRuleHelper;
        $this->reflectionProvider = $reflectionProvider;
    }
    public function getNodeType() : string
    {
        return Node\Expr\Instanceof_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->class instanceof Node\Name) {
            return [];
        }
        $className = $scope->resolveName($node->class);
        if (!$this->reflectionProvider->hasClass($className)) {
            return [];
        }
        $classReflection = $this->reflectionProvider->getClass($className);
        if (!$this->apiRuleHelper->isPhpStanCode($scope, $classReflection->getName(), $classReflection->getFileName())) {
            return [];
        }
        $ruleError = RuleErrorBuilder::message(sprintf('Asking about instanceof %s is not covered by backward compatibility promise. The %s might change in a minor PHPStan version.', $classReflection->getDisplayName(), $classReflection->isInterface() ? 'interface' : 'class'))->tip(sprintf("If you think it should be covered by backward compatibility promise, open a discussion:\n   %s\n\n   See also:\n   https://phpstan.org/developing-extensions/backward-compatibility-promise", 'https://github.com/phpstan/phpstan/discussions'))->build();
        $docBlock = $classReflection->getResolvedPhpDoc();
        if ($docBlock === null) {
            return [$ruleError];
        }
        foreach ($docBlock->getPhpDocNodes() as $phpDocNode) {
            $apiTags = $phpDocNode->getTagsByName('@api');
            if (count($apiTags) > 0) {
                return $this->processCoveredClass($node, $scope, $classReflection);
            }
        }
        return [$ruleError];
    }
    /**
     * @return RuleError[]
     */
    private function processCoveredClass(Node\Expr\Instanceof_ $node, Scope $scope, ClassReflection $classReflection) : array
    {
        if ($classReflection->getName() === Type::class || $classReflection->isSubclassOf(Type::class)) {
            return [];
        }
        $instanceofType = $scope->getType($node);
        if ($instanceofType->isTrue()->or($instanceofType->isFalse())->yes()) {
            return [];
        }
        $classType = new ObjectType($classReflection->getName(), null, $classReflection);
        $exprType = $scope->getType($node->expr);
        if ($exprType instanceof UnionType) {
            foreach ($exprType->getTypes() as $innerType) {
                if ($innerType->getObjectClassNames() !== [] && $classType->isSuperTypeOf($innerType)->yes()) {
                    return [];
                }
            }
        }
        return [RuleErrorBuilder::message(sprintf('Although %s is covered by backward compatibility promise, this instanceof assumption might break because it\'s not guaranteed to always stay the same.', $classReflection->getDisplayName()))->tip(sprintf("In case of questions how to solve this correctly, open a discussion:\n   %s\n\n   See also:\n   https://phpstan.org/developing-extensions/backward-compatibility-promise", 'https://github.com/phpstan/phpstan/discussions'))->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Api;

use PhpParser\Node;
use PhpParser\Node\Stmt\Class_;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use function array_merge;
use function count;
use function in_array;
use function sprintf;
/**
 * @implements Rule<Class_>
 */
class ApiClassImplementsRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Api\ApiRuleHelper
     */
    private $apiRuleHelper;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(\PHPStan\Rules\Api\ApiRuleHelper $apiRuleHelper, ReflectionProvider $reflectionProvider)
    {
        $this->apiRuleHelper = $apiRuleHelper;
        $this->reflectionProvider = $reflectionProvider;
    }
    public function getNodeType() : string
    {
        return Class_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $errors = [];
        foreach ($node->implements as $implements) {
            $errors = array_merge($errors, $this->checkName($scope, $implements));
        }
        return $errors;
    }
    /**
     * @return RuleError[]
     */
    private function checkName(Scope $scope, Node\Name $name) : array
    {
        $implementedClassName = (string) $name;
        if (!$this->reflectionProvider->hasClass($implementedClassName)) {
            return [];
        }
        $implementedClassReflection = $this->reflectionProvider->getClass($implementedClassName);
        if (!$this->apiRuleHelper->isPhpStanCode($scope, $implementedClassReflection->getName(), $implementedClassReflection->getFileName())) {
            return [];
        }
        $ruleError = RuleErrorBuilder::message(sprintf('Implementing %s is not covered by backward compatibility promise. The interface might change in a minor PHPStan version.', $implementedClassReflection->getDisplayName()))->tip(sprintf("If you think it should be covered by backward compatibility promise, open a discussion:\n   %s\n\n   See also:\n   https://phpstan.org/developing-extensions/backward-compatibility-promise", 'https://github.com/phpstan/phpstan/discussions'))->build();
        if (in_array($implementedClassReflection->getName(), \PHPStan\Rules\Api\BcUncoveredInterface::CLASSES, \true)) {
            return [$ruleError];
        }
        $docBlock = $implementedClassReflection->getResolvedPhpDoc();
        if ($docBlock === null) {
            return [$ruleError];
        }
        foreach ($docBlock->getPhpDocNodes() as $phpDocNode) {
            $apiTags = $phpDocNode->getTagsByName('@api');
            if (count($apiTags) > 0) {
                return [];
            }
        }
        return [$ruleError];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Api;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function count;
use function sprintf;
use function strpos;
/**
 * @implements Rule<Node\Expr\ClassConstFetch>
 */
class ApiClassConstFetchRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Api\ApiRuleHelper
     */
    private $apiRuleHelper;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(\PHPStan\Rules\Api\ApiRuleHelper $apiRuleHelper, ReflectionProvider $reflectionProvider)
    {
        $this->apiRuleHelper = $apiRuleHelper;
        $this->reflectionProvider = $reflectionProvider;
    }
    public function getNodeType() : string
    {
        return Node\Expr\ClassConstFetch::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->name instanceof Node\Identifier) {
            return [];
        }
        if (!$node->class instanceof Node\Name) {
            return [];
        }
        $className = $scope->resolveName($node->class);
        if (!$this->reflectionProvider->hasClass($className)) {
            return [];
        }
        $classReflection = $this->reflectionProvider->getClass($className);
        if (!$this->apiRuleHelper->isPhpStanCode($scope, $classReflection->getName(), $classReflection->getFileName())) {
            return [];
        }
        $ruleError = RuleErrorBuilder::message(sprintf('Accessing %s::%s is not covered by backward compatibility promise. The class might change in a minor PHPStan version.', $classReflection->getDisplayName(), $node->name->toString()))->tip(sprintf("If you think it should be covered by backward compatibility promise, open a discussion:\n   %s\n\n   See also:\n   https://phpstan.org/developing-extensions/backward-compatibility-promise", 'https://github.com/phpstan/phpstan/discussions'))->build();
        $docBlock = $classReflection->getResolvedPhpDoc();
        if ($docBlock !== null) {
            foreach ($docBlock->getPhpDocNodes() as $phpDocNode) {
                $apiTags = $phpDocNode->getTagsByName('@api');
                if (count($apiTags) > 0) {
                    return [];
                }
            }
        }
        if ($node->name->toLowerString() === 'class') {
            foreach ($classReflection->getNativeReflection()->getMethods() as $methodReflection) {
                $methodDocComment = $methodReflection->getDocComment();
                if ($methodDocComment === \false) {
                    continue;
                }
                if (strpos($methodDocComment, '@api') === \false) {
                    continue;
                }
                return [];
            }
        }
        return [$ruleError];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Api;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function sprintf;
use function strpos;
/**
 * @implements Rule<Node\Expr\New_>
 */
class ApiInstantiationRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Api\ApiRuleHelper
     */
    private $apiRuleHelper;
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(\PHPStan\Rules\Api\ApiRuleHelper $apiRuleHelper, ReflectionProvider $reflectionProvider)
    {
        $this->apiRuleHelper = $apiRuleHelper;
        $this->reflectionProvider = $reflectionProvider;
    }
    public function getNodeType() : string
    {
        return Node\Expr\New_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->class instanceof Node\Name) {
            return [];
        }
        $className = $scope->resolveName($node->class);
        if (!$this->reflectionProvider->hasClass($className)) {
            return [];
        }
        $classReflection = $this->reflectionProvider->getClass($className);
        if (!$this->apiRuleHelper->isPhpStanCode($scope, $classReflection->getName(), $classReflection->getFileName())) {
            return [];
        }
        $ruleError = RuleErrorBuilder::message(sprintf('Creating new %s is not covered by backward compatibility promise. The class might change in a minor PHPStan version.', $classReflection->getDisplayName()))->tip(sprintf("If you think it should be covered by backward compatibility promise, open a discussion:\n   %s\n\n   See also:\n   https://phpstan.org/developing-extensions/backward-compatibility-promise", 'https://github.com/phpstan/phpstan/discussions'))->build();
        if (!$classReflection->hasConstructor()) {
            return [$ruleError];
        }
        $constructor = $classReflection->getConstructor();
        $docComment = $constructor->getDocComment();
        if ($docComment === null) {
            return [$ruleError];
        }
        if (strpos($docComment, '@api') === \false) {
            return [$ruleError];
        }
        if ($constructor->getDeclaringClass()->getName() !== $classReflection->getName()) {
            return [$ruleError];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Api;

use _PHPStan_dcc7b7cff\Nette\Utils\Json;
use _PHPStan_dcc7b7cff\Nette\Utils\JsonException;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\File\CouldNotReadFileException;
use PHPStan\File\FileReader;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function dirname;
use function is_dir;
use function is_file;
use function strpos;
/**
 * @implements Rule<Node\Stmt\Namespace_>
 */
class PhpStanNamespaceIn3rdPartyPackageRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Api\ApiRuleHelper
     */
    private $apiRuleHelper;
    public function __construct(\PHPStan\Rules\Api\ApiRuleHelper $apiRuleHelper)
    {
        $this->apiRuleHelper = $apiRuleHelper;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\Namespace_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $namespace = null;
        if ($node->name !== null) {
            $namespace = $node->name->toString();
        }
        if ($namespace === null || !$this->apiRuleHelper->isPhpStanName($namespace)) {
            return [];
        }
        $composerJson = $this->findComposerJsonContents(dirname($scope->getFile()));
        if ($composerJson === null) {
            return [];
        }
        $packageName = $composerJson['name'] ?? null;
        if ($packageName !== null && strpos($packageName, 'phpstan/') === 0) {
            return [];
        }
        return [RuleErrorBuilder::message('Declaring PHPStan namespace is not allowed in 3rd party packages.')->tip("See:\n   https://phpstan.org/developing-extensions/backward-compatibility-promise")->build()];
    }
    /**
     * @return mixed[]|null
     */
    private function findComposerJsonContents(string $fromDirectory) : ?array
    {
        if (!is_dir($fromDirectory)) {
            return null;
        }
        $composerJsonPath = $fromDirectory . '/composer.json';
        if (!is_file($composerJsonPath)) {
            $dirName = dirname($fromDirectory);
            if ($dirName !== $fromDirectory) {
                return $this->findComposerJsonContents($dirName);
            }
            return null;
        }
        try {
            return Json::decode(FileReader::read($composerJsonPath), Json::FORCE_ARRAY);
        } catch (JsonException $exception) {
            return null;
        } catch (CouldNotReadFileException $exception) {
            return null;
        }
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Api;

use PhpParser\Node;
use PhpParser\Node\Expr\MethodCall;
use PhpParser\NodeVisitor\NodeConnectingVisitor;
use PHPStan\Analyser\Scope;
use PHPStan\DependencyInjection\Container;
use PHPStan\Parser\RichParser;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\ObjectType;
use function array_keys;
use function get_class;
use function in_array;
use function sprintf;
use function strpos;
/**
 * @implements Rule<MethodCall>
 */
class NodeConnectingVisitorAttributesRule implements Rule
{
    /**
     * @var \PHPStan\DependencyInjection\Container
     */
    private $container;
    public function __construct(Container $container)
    {
        $this->container = $container;
    }
    public function getNodeType() : string
    {
        return MethodCall::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->name instanceof Node\Identifier) {
            return [];
        }
        if ($node->name->toLowerString() !== 'getattribute') {
            return [];
        }
        $calledOnType = $scope->getType($node->var);
        if (!(new ObjectType(Node::class))->isSuperTypeOf($calledOnType)->yes()) {
            return [];
        }
        $args = $node->getArgs();
        if (!isset($args[0])) {
            return [];
        }
        $argType = $scope->getType($args[0]->value);
        if (!$argType instanceof ConstantStringType) {
            return [];
        }
        if (!in_array($argType->getValue(), ['parent', 'previous', 'next'], \true)) {
            return [];
        }
        if (!$scope->isInClass()) {
            return [];
        }
        $classReflection = $scope->getClassReflection();
        $hasPhpStanInterface = \false;
        foreach (array_keys($classReflection->getInterfaces()) as $interfaceName) {
            if (strpos($interfaceName, 'PHPStan\\') !== 0) {
                continue;
            }
            $hasPhpStanInterface = \true;
        }
        if (!$hasPhpStanInterface) {
            return [];
        }
        $isVisitorRegistered = \false;
        foreach ($this->container->getServicesByTag(RichParser::VISITOR_SERVICE_TAG) as $service) {
            if (get_class($service) !== NodeConnectingVisitor::class) {
                continue;
            }
            $isVisitorRegistered = \true;
            break;
        }
        if ($isVisitorRegistered) {
            return [];
        }
        return [RuleErrorBuilder::message(sprintf('Node attribute \'%s\' is no longer available.', $argType->getValue()))->tip('See: https://phpstan.org/blog/preprocessing-ast-for-custom-rules')->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Api;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function array_keys;
use function in_array;
use function sprintf;
use function strpos;
/**
 * @implements Rule<Node\Expr\FuncCall>
 */
class RuntimeReflectionFunctionRule implements Rule
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(ReflectionProvider $reflectionProvider)
    {
        $this->reflectionProvider = $reflectionProvider;
    }
    public function getNodeType() : string
    {
        return Node\Expr\FuncCall::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->name instanceof Node\Name) {
            return [];
        }
        if (!$this->reflectionProvider->hasFunction($node->name, $scope)) {
            return [];
        }
        $functionReflection = $this->reflectionProvider->getFunction($node->name, $scope);
        if (!in_array($functionReflection->getName(), ['is_a', 'is_subclass_of', 'class_parents', 'class_implements', 'class_uses'], \true)) {
            return [];
        }
        if (!$scope->isInClass()) {
            return [];
        }
        $classReflection = $scope->getClassReflection();
        $hasPhpStanInterface = \false;
        foreach (array_keys($classReflection->getInterfaces()) as $interfaceName) {
            if (strpos($interfaceName, 'PHPStan\\') !== 0) {
                continue;
            }
            $hasPhpStanInterface = \true;
        }
        if (!$hasPhpStanInterface) {
            return [];
        }
        return [RuleErrorBuilder::message(sprintf('Function %s() is a runtime reflection concept that might not work in PHPStan because it uses fully static reflection engine. Use objects retrieved from ReflectionProvider instead.', $functionReflection->getName()))->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Api;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function count;
use function sprintf;
use function strpos;
/**
 * @implements Rule<Node\Expr\MethodCall>
 */
class ApiMethodCallRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Api\ApiRuleHelper
     */
    private $apiRuleHelper;
    public function __construct(\PHPStan\Rules\Api\ApiRuleHelper $apiRuleHelper)
    {
        $this->apiRuleHelper = $apiRuleHelper;
    }
    public function getNodeType() : string
    {
        return Node\Expr\MethodCall::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->name instanceof Node\Identifier) {
            return [];
        }
        $methodReflection = $scope->getMethodReflection($scope->getType($node->var), $node->name->toString());
        if ($methodReflection === null) {
            return [];
        }
        $declaringClass = $methodReflection->getDeclaringClass();
        if (!$this->apiRuleHelper->isPhpStanCode($scope, $declaringClass->getName(), $declaringClass->getFileName())) {
            return [];
        }
        if ($this->isCovered($methodReflection)) {
            return [];
        }
        $ruleError = RuleErrorBuilder::message(sprintf('Calling %s::%s() is not covered by backward compatibility promise. The method might change in a minor PHPStan version.', $declaringClass->getDisplayName(), $methodReflection->getName()))->tip(sprintf("If you think it should be covered by backward compatibility promise, open a discussion:\n   %s\n\n   See also:\n   https://phpstan.org/developing-extensions/backward-compatibility-promise", 'https://github.com/phpstan/phpstan/discussions'))->build();
        return [$ruleError];
    }
    private function isCovered(MethodReflection $methodReflection) : bool
    {
        $declaringClass = $methodReflection->getDeclaringClass();
        $classDocBlock = $declaringClass->getResolvedPhpDoc();
        if ($classDocBlock !== null) {
            foreach ($classDocBlock->getPhpDocNodes() as $phpDocNode) {
                $apiTags = $phpDocNode->getTagsByName('@api');
                if (count($apiTags) > 0) {
                    return \true;
                }
            }
        }
        $methodDocComment = $methodReflection->getDocComment();
        if ($methodDocComment === null) {
            return \false;
        }
        return strpos($methodDocComment, '@api') !== \false;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Api;

use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParameterReflectionWithPhpDocs;
use PHPStan\Reflection\ParametersAcceptorWithPhpDocs;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\LineRuleError;
use PHPStan\Rules\MetadataRuleError;
use PHPStan\Rules\NonIgnorableRuleError;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\TipRuleError;
use PHPStan\Type\Type;
final class BcUncoveredInterface
{
    public const CLASSES = [Type::class, ReflectionProvider::class, Scope::class, FunctionReflection::class, ExtendedMethodReflection::class, ParametersAcceptorWithPhpDocs::class, ParameterReflectionWithPhpDocs::class, FileRuleError::class, IdentifierRuleError::class, LineRuleError::class, MetadataRuleError::class, NonIgnorableRuleError::class, RuleError::class, TipRuleError::class];
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Comparison;

use PhpParser\Node;
use PhpParser\Node\Expr;
use PHPStan\Analyser\Scope;
use PHPStan\Parser\LastConditionVisitor;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use function sprintf;
/**
 * @implements Rule<Node\Expr\MethodCall>
 */
class ImpossibleCheckTypeMethodCallRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Comparison\ImpossibleCheckTypeHelper
     */
    private $impossibleCheckTypeHelper;
    /**
     * @var bool
     */
    private $checkAlwaysTrueCheckTypeFunctionCall;
    /**
     * @var bool
     */
    private $treatPhpDocTypesAsCertain;
    /**
     * @var bool
     */
    private $reportAlwaysTrueInLastCondition;
    public function __construct(\PHPStan\Rules\Comparison\ImpossibleCheckTypeHelper $impossibleCheckTypeHelper, bool $checkAlwaysTrueCheckTypeFunctionCall, bool $treatPhpDocTypesAsCertain, bool $reportAlwaysTrueInLastCondition)
    {
        $this->impossibleCheckTypeHelper = $impossibleCheckTypeHelper;
        $this->checkAlwaysTrueCheckTypeFunctionCall = $checkAlwaysTrueCheckTypeFunctionCall;
        $this->treatPhpDocTypesAsCertain = $treatPhpDocTypesAsCertain;
        $this->reportAlwaysTrueInLastCondition = $reportAlwaysTrueInLastCondition;
    }
    public function getNodeType() : string
    {
        return Node\Expr\MethodCall::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->name instanceof Node\Identifier) {
            return [];
        }
        $isAlways = $this->impossibleCheckTypeHelper->findSpecifiedType($scope, $node);
        if ($isAlways === null) {
            return [];
        }
        $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use($scope, $node) : RuleErrorBuilder {
            if (!$this->treatPhpDocTypesAsCertain) {
                return $ruleErrorBuilder;
            }
            $isAlways = $this->impossibleCheckTypeHelper->doNotTreatPhpDocTypesAsCertain()->findSpecifiedType($scope, $node);
            if ($isAlways !== null) {
                return $ruleErrorBuilder;
            }
            return $ruleErrorBuilder->tip('Because the type is coming from a PHPDoc, you can turn off this check by setting <fg=cyan>treatPhpDocTypesAsCertain: false</> in your <fg=cyan>%configurationFile%</>.');
        };
        if (!$isAlways) {
            $method = $this->getMethod($node->var, $node->name->name, $scope);
            return [$addTip(RuleErrorBuilder::message(sprintf('Call to method %s::%s()%s will always evaluate to false.', $method->getDeclaringClass()->getDisplayName(), $method->getName(), $this->impossibleCheckTypeHelper->getArgumentsDescription($scope, $node->getArgs()))))->build()];
        } elseif ($this->checkAlwaysTrueCheckTypeFunctionCall) {
            $isLast = $node->getAttribute(LastConditionVisitor::ATTRIBUTE_NAME);
            if ($isLast === \true && !$this->reportAlwaysTrueInLastCondition) {
                return [];
            }
            $method = $this->getMethod($node->var, $node->name->name, $scope);
            $errorBuilder = $addTip(RuleErrorBuilder::message(sprintf('Call to method %s::%s()%s will always evaluate to true.', $method->getDeclaringClass()->getDisplayName(), $method->getName(), $this->impossibleCheckTypeHelper->getArgumentsDescription($scope, $node->getArgs()))));
            if ($isLast === \false && !$this->reportAlwaysTrueInLastCondition) {
                $errorBuilder->tip('Remove remaining cases below this one and this error will disappear too.');
            }
            return [$errorBuilder->build()];
        }
        return [];
    }
    private function getMethod(Expr $var, string $methodName, Scope $scope) : MethodReflection
    {
        $calledOnType = $scope->getType($var);
        $method = $scope->getMethodReflection($calledOnType, $methodName);
        if ($method === null) {
            throw new ShouldNotHappenException();
        }
        return $method;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Comparison;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Parser\LastConditionVisitor;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<Node\Expr\BinaryOp>
 */
class StrictComparisonOfDifferentTypesRule implements Rule
{
    /**
     * @var bool
     */
    private $checkAlwaysTrueStrictComparison;
    /**
     * @var bool
     */
    private $treatPhpDocTypesAsCertain;
    /**
     * @var bool
     */
    private $reportAlwaysTrueInLastCondition;
    public function __construct(bool $checkAlwaysTrueStrictComparison, bool $treatPhpDocTypesAsCertain, bool $reportAlwaysTrueInLastCondition)
    {
        $this->checkAlwaysTrueStrictComparison = $checkAlwaysTrueStrictComparison;
        $this->treatPhpDocTypesAsCertain = $treatPhpDocTypesAsCertain;
        $this->reportAlwaysTrueInLastCondition = $reportAlwaysTrueInLastCondition;
    }
    public function getNodeType() : string
    {
        return Node\Expr\BinaryOp::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node instanceof Node\Expr\BinaryOp\Identical && !$node instanceof Node\Expr\BinaryOp\NotIdentical) {
            return [];
        }
        $nodeType = $this->treatPhpDocTypesAsCertain ? $scope->getType($node) : $scope->getNativeType($node);
        if (!$nodeType instanceof ConstantBooleanType) {
            return [];
        }
        $leftType = $this->treatPhpDocTypesAsCertain ? $scope->getType($node->left) : $scope->getNativeType($node->left);
        $rightType = $this->treatPhpDocTypesAsCertain ? $scope->getType($node->right) : $scope->getNativeType($node->right);
        $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use($scope, $node) : RuleErrorBuilder {
            if (!$this->treatPhpDocTypesAsCertain) {
                return $ruleErrorBuilder;
            }
            $instanceofTypeWithoutPhpDocs = $scope->getNativeType($node);
            if ($instanceofTypeWithoutPhpDocs instanceof ConstantBooleanType) {
                return $ruleErrorBuilder;
            }
            return $ruleErrorBuilder->tip('Because the type is coming from a PHPDoc, you can turn off this check by setting <fg=cyan>treatPhpDocTypesAsCertain: false</> in your <fg=cyan>%configurationFile%</>.');
        };
        if (!$nodeType->getValue()) {
            return [$addTip(RuleErrorBuilder::message(sprintf('Strict comparison using %s between %s and %s will always evaluate to false.', $node instanceof Node\Expr\BinaryOp\Identical ? '===' : '!==', $leftType->describe(VerbosityLevel::value()), $rightType->describe(VerbosityLevel::value()))))->build()];
        } elseif ($this->checkAlwaysTrueStrictComparison) {
            $isLast = $node->getAttribute(LastConditionVisitor::ATTRIBUTE_NAME);
            if ($isLast === \true && !$this->reportAlwaysTrueInLastCondition) {
                return [];
            }
            $errorBuilder = $addTip(RuleErrorBuilder::message(sprintf('Strict comparison using %s between %s and %s will always evaluate to true.', $node instanceof Node\Expr\BinaryOp\Identical ? '===' : '!==', $leftType->describe(VerbosityLevel::value()), $rightType->describe(VerbosityLevel::value()))));
            if ($isLast === \false && !$this->reportAlwaysTrueInLastCondition) {
                $errorBuilder->addTip('Remove remaining cases below this one and this error will disappear too.');
            }
            if ($leftType->isEnum()->yes() && $rightType->isEnum()->yes() && $node->getAttribute(LastConditionVisitor::ATTRIBUTE_IS_MATCH_NAME, \false) !== \true) {
                $errorBuilder->addTip('Use match expression instead. PHPStan will report unhandled enum cases.');
            }
            return [$errorBuilder->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Comparison;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
/**
 * @implements Rule<Node\Expr\Ternary>
 */
class UnreachableTernaryElseBranchRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Comparison\ConstantConditionRuleHelper
     */
    private $helper;
    /**
     * @var bool
     */
    private $treatPhpDocTypesAsCertain;
    /**
     * @var bool
     */
    private $disable;
    public function __construct(\PHPStan\Rules\Comparison\ConstantConditionRuleHelper $helper, bool $treatPhpDocTypesAsCertain, bool $disable)
    {
        $this->helper = $helper;
        $this->treatPhpDocTypesAsCertain = $treatPhpDocTypesAsCertain;
        $this->disable = $disable;
    }
    public function getNodeType() : string
    {
        return Node\Expr\Ternary::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if ($this->disable) {
            return [];
        }
        $conditionType = $this->treatPhpDocTypesAsCertain ? $scope->getType($node->cond) : $scope->getNativeType($node->cond);
        $conditionBooleanType = $conditionType->toBoolean();
        if ($conditionBooleanType->isTrue()->yes() && $this->helper->shouldSkip($scope, $node->cond) && !$this->helper->shouldReportAlwaysTrueByDefault($node->cond)) {
            $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use($scope, $node) : RuleErrorBuilder {
                if (!$this->treatPhpDocTypesAsCertain) {
                    return $ruleErrorBuilder;
                }
                $booleanNativeType = $scope->getNativeType($node->cond);
                if ($booleanNativeType instanceof ConstantBooleanType) {
                    return $ruleErrorBuilder;
                }
                return $ruleErrorBuilder->tip('Because the type is coming from a PHPDoc, you can turn off this check by setting <fg=cyan>treatPhpDocTypesAsCertain: false</> in your <fg=cyan>%configurationFile%</>.');
            };
            return [$addTip(RuleErrorBuilder::message('Else branch is unreachable because ternary operator condition is always true.'))->line($node->else->getLine())->identifier('deadCode.unreachableTernaryElse')->metadata(['statementDepth' => $node->getAttribute('statementDepth'), 'statementOrder' => $node->getAttribute('statementOrder'), 'depth' => $node->getAttribute('expressionDepth'), 'order' => $node->getAttribute('expressionOrder')])->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Comparison;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Parser\LastConditionVisitor;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function sprintf;
use function strtolower;
/**
 * @implements Rule<Node\Expr\FuncCall>
 */
class ImpossibleCheckTypeFunctionCallRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Comparison\ImpossibleCheckTypeHelper
     */
    private $impossibleCheckTypeHelper;
    /**
     * @var bool
     */
    private $checkAlwaysTrueCheckTypeFunctionCall;
    /**
     * @var bool
     */
    private $treatPhpDocTypesAsCertain;
    /**
     * @var bool
     */
    private $reportAlwaysTrueInLastCondition;
    public function __construct(\PHPStan\Rules\Comparison\ImpossibleCheckTypeHelper $impossibleCheckTypeHelper, bool $checkAlwaysTrueCheckTypeFunctionCall, bool $treatPhpDocTypesAsCertain, bool $reportAlwaysTrueInLastCondition)
    {
        $this->impossibleCheckTypeHelper = $impossibleCheckTypeHelper;
        $this->checkAlwaysTrueCheckTypeFunctionCall = $checkAlwaysTrueCheckTypeFunctionCall;
        $this->treatPhpDocTypesAsCertain = $treatPhpDocTypesAsCertain;
        $this->reportAlwaysTrueInLastCondition = $reportAlwaysTrueInLastCondition;
    }
    public function getNodeType() : string
    {
        return Node\Expr\FuncCall::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->name instanceof Node\Name) {
            return [];
        }
        $functionName = (string) $node->name;
        if (strtolower($functionName) === 'is_a') {
            return [];
        }
        $isAlways = $this->impossibleCheckTypeHelper->findSpecifiedType($scope, $node);
        if ($isAlways === null) {
            return [];
        }
        $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use($scope, $node) : RuleErrorBuilder {
            if (!$this->treatPhpDocTypesAsCertain) {
                return $ruleErrorBuilder;
            }
            $isAlways = $this->impossibleCheckTypeHelper->doNotTreatPhpDocTypesAsCertain()->findSpecifiedType($scope, $node);
            if ($isAlways !== null) {
                return $ruleErrorBuilder;
            }
            return $ruleErrorBuilder->tip('Because the type is coming from a PHPDoc, you can turn off this check by setting <fg=cyan>treatPhpDocTypesAsCertain: false</> in your <fg=cyan>%configurationFile%</>.');
        };
        if (!$isAlways) {
            return [$addTip(RuleErrorBuilder::message(sprintf('Call to function %s()%s will always evaluate to false.', $functionName, $this->impossibleCheckTypeHelper->getArgumentsDescription($scope, $node->getArgs()))))->build()];
        } elseif ($this->checkAlwaysTrueCheckTypeFunctionCall) {
            $isLast = $node->getAttribute(LastConditionVisitor::ATTRIBUTE_NAME);
            if ($isLast === \true && !$this->reportAlwaysTrueInLastCondition) {
                return [];
            }
            $errorBuilder = $addTip(RuleErrorBuilder::message(sprintf('Call to function %s()%s will always evaluate to true.', $functionName, $this->impossibleCheckTypeHelper->getArgumentsDescription($scope, $node->getArgs()))));
            if ($isLast === \false && !$this->reportAlwaysTrueInLastCondition) {
                $errorBuilder->tip('Remove remaining cases below this one and this error will disappear too.');
            }
            return [$errorBuilder->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Comparison;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
use function sprintf;
/**
 * @implements Rule<Node\Expr\Ternary>
 */
class TernaryOperatorConstantConditionRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Comparison\ConstantConditionRuleHelper
     */
    private $helper;
    /**
     * @var bool
     */
    private $treatPhpDocTypesAsCertain;
    public function __construct(\PHPStan\Rules\Comparison\ConstantConditionRuleHelper $helper, bool $treatPhpDocTypesAsCertain)
    {
        $this->helper = $helper;
        $this->treatPhpDocTypesAsCertain = $treatPhpDocTypesAsCertain;
    }
    public function getNodeType() : string
    {
        return Node\Expr\Ternary::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $exprType = $this->helper->getBooleanType($scope, $node->cond);
        if ($exprType instanceof ConstantBooleanType) {
            $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use($scope, $node) : RuleErrorBuilder {
                if (!$this->treatPhpDocTypesAsCertain) {
                    return $ruleErrorBuilder;
                }
                $booleanNativeType = $this->helper->getNativeBooleanType($scope, $node->cond);
                if ($booleanNativeType instanceof ConstantBooleanType) {
                    return $ruleErrorBuilder;
                }
                return $ruleErrorBuilder->tip('Because the type is coming from a PHPDoc, you can turn off this check by setting <fg=cyan>treatPhpDocTypesAsCertain: false</> in your <fg=cyan>%configurationFile%</>.');
            };
            return [$addTip(RuleErrorBuilder::message(sprintf('Ternary operator condition is always %s.', $exprType->getValue() ? 'true' : 'false')))->identifier('deadCode.ternaryConstantCondition')->metadata(['statementDepth' => $node->getAttribute('statementDepth'), 'statementOrder' => $node->getAttribute('statementOrder'), 'depth' => $node->getAttribute('expressionDepth'), 'order' => $node->getAttribute('expressionOrder'), 'value' => $exprType->getValue()])->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Comparison;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\MatchExpressionNode;
use PHPStan\Parser\TryCatchTypeVisitor;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\NeverType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
use UnhandledMatchError;
use function array_map;
use function count;
use function sprintf;
/**
 * @implements Rule<MatchExpressionNode>
 */
class MatchExpressionRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Comparison\ConstantConditionRuleHelper
     */
    private $constantConditionRuleHelper;
    /**
     * @var bool
     */
    private $checkAlwaysTrueStrictComparison;
    /**
     * @var bool
     */
    private $disableUnreachable;
    /**
     * @var bool
     */
    private $reportAlwaysTrueInLastCondition;
    /**
     * @var bool
     */
    private $treatPhpDocTypesAsCertain;
    public function __construct(\PHPStan\Rules\Comparison\ConstantConditionRuleHelper $constantConditionRuleHelper, bool $checkAlwaysTrueStrictComparison, bool $disableUnreachable, bool $reportAlwaysTrueInLastCondition, bool $treatPhpDocTypesAsCertain)
    {
        $this->constantConditionRuleHelper = $constantConditionRuleHelper;
        $this->checkAlwaysTrueStrictComparison = $checkAlwaysTrueStrictComparison;
        $this->disableUnreachable = $disableUnreachable;
        $this->reportAlwaysTrueInLastCondition = $reportAlwaysTrueInLastCondition;
        $this->treatPhpDocTypesAsCertain = $treatPhpDocTypesAsCertain;
    }
    public function getNodeType() : string
    {
        return MatchExpressionNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $matchCondition = $node->getCondition();
        $matchConditionType = $scope->getType($matchCondition);
        $nextArmIsDeadForType = \false;
        $nextArmIsDeadForNativeType = \false;
        $errors = [];
        $armsCount = count($node->getArms());
        $hasDefault = \false;
        foreach ($node->getArms() as $i => $arm) {
            if ($nextArmIsDeadForNativeType || $nextArmIsDeadForType && $this->treatPhpDocTypesAsCertain) {
                if (!$this->disableUnreachable) {
                    $errors[] = RuleErrorBuilder::message('Match arm is unreachable because previous comparison is always true.')->line($arm->getLine())->build();
                }
                continue;
            }
            $armConditions = $arm->getConditions();
            if (count($armConditions) === 0) {
                $hasDefault = \true;
            }
            foreach ($armConditions as $armCondition) {
                $armConditionScope = $armCondition->getScope();
                $armConditionExpr = new Node\Expr\BinaryOp\Identical($matchCondition, $armCondition->getCondition());
                $armConditionResult = $armConditionScope->getType($armConditionExpr);
                if (!$armConditionResult instanceof ConstantBooleanType) {
                    continue;
                }
                if ($armConditionResult->getValue()) {
                    $nextArmIsDeadForType = \true;
                }
                if (!$this->treatPhpDocTypesAsCertain) {
                    $armConditionNativeResult = $armConditionScope->getNativeType($armConditionExpr);
                    if (!$armConditionNativeResult instanceof ConstantBooleanType) {
                        continue;
                    }
                    if ($armConditionNativeResult->getValue()) {
                        $nextArmIsDeadForNativeType = \true;
                    }
                }
                if ($matchConditionType instanceof ConstantBooleanType) {
                    $armConditionStandaloneResult = $this->constantConditionRuleHelper->getBooleanType($armConditionScope, $armCondition->getCondition());
                    if (!$armConditionStandaloneResult instanceof ConstantBooleanType) {
                        continue;
                    }
                }
                $armLine = $armCondition->getLine();
                if (!$armConditionResult->getValue()) {
                    $errors[] = RuleErrorBuilder::message(sprintf('Match arm comparison between %s and %s is always false.', $armConditionScope->getType($matchCondition)->describe(VerbosityLevel::value()), $armConditionScope->getType($armCondition->getCondition())->describe(VerbosityLevel::value())))->line($armLine)->build();
                } else {
                    if ($this->checkAlwaysTrueStrictComparison) {
                        if ($i === $armsCount - 1 && !$this->reportAlwaysTrueInLastCondition) {
                            continue;
                        }
                        $errorBuilder = RuleErrorBuilder::message(sprintf('Match arm comparison between %s and %s is always true.', $armConditionScope->getType($matchCondition)->describe(VerbosityLevel::value()), $armConditionScope->getType($armCondition->getCondition())->describe(VerbosityLevel::value())))->line($armLine);
                        if ($i !== $armsCount - 1 && !$this->reportAlwaysTrueInLastCondition) {
                            $errorBuilder->tip('Remove remaining cases below this one and this error will disappear too.');
                        }
                        $errors[] = $errorBuilder->build();
                    }
                }
            }
        }
        if (!$hasDefault && !$nextArmIsDeadForType) {
            $remainingType = $node->getEndScope()->getType($matchCondition);
            $cases = $remainingType->getEnumCases();
            $casesCount = count($cases);
            if ($casesCount > 1) {
                $remainingType = new UnionType($cases);
            }
            if ($casesCount === 1) {
                $remainingType = $cases[0];
            }
            if (!$remainingType instanceof NeverType && !$this->isUnhandledMatchErrorCaught($node) && !$this->hasUnhandledMatchErrorThrowsTag($scope)) {
                $errors[] = RuleErrorBuilder::message(sprintf('Match expression does not handle remaining %s: %s', $remainingType instanceof UnionType ? 'values' : 'value', $remainingType->describe(VerbosityLevel::value())))->build();
            }
        }
        return $errors;
    }
    private function isUnhandledMatchErrorCaught(Node $node) : bool
    {
        $tryCatchTypes = $node->getAttribute(TryCatchTypeVisitor::ATTRIBUTE_NAME);
        if ($tryCatchTypes === null) {
            return \false;
        }
        $tryCatchType = TypeCombinator::union(...array_map(static function (string $class) {
            return new ObjectType($class);
        }, $tryCatchTypes));
        return $tryCatchType->isSuperTypeOf(new ObjectType(UnhandledMatchError::class))->yes();
    }
    private function hasUnhandledMatchErrorThrowsTag(Scope $scope) : bool
    {
        $function = $scope->getFunction();
        if ($function === null) {
            return \false;
        }
        $throwsType = $function->getThrowType();
        if ($throwsType === null) {
            return \false;
        }
        return $throwsType->isSuperTypeOf(new ObjectType(UnhandledMatchError::class))->yes();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Comparison;

use PhpParser\Node\Expr;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPStan\Type\BooleanType;
class ConstantConditionRuleHelper
{
    /**
     * @var \PHPStan\Rules\Comparison\ImpossibleCheckTypeHelper
     */
    private $impossibleCheckTypeHelper;
    /**
     * @var bool
     */
    private $treatPhpDocTypesAsCertain;
    /**
     * @var bool
     */
    private $looseComparisonRuleEnabled;
    public function __construct(\PHPStan\Rules\Comparison\ImpossibleCheckTypeHelper $impossibleCheckTypeHelper, bool $treatPhpDocTypesAsCertain, bool $looseComparisonRuleEnabled)
    {
        $this->impossibleCheckTypeHelper = $impossibleCheckTypeHelper;
        $this->treatPhpDocTypesAsCertain = $treatPhpDocTypesAsCertain;
        $this->looseComparisonRuleEnabled = $looseComparisonRuleEnabled;
    }
    public function shouldReportAlwaysTrueByDefault(Expr $expr) : bool
    {
        return $expr instanceof Expr\BooleanNot || $expr instanceof Expr\BinaryOp\BooleanOr || $expr instanceof Expr\BinaryOp\BooleanAnd || $expr instanceof Expr\Ternary || $expr instanceof Expr\Isset_ || $expr instanceof Expr\Empty_;
    }
    public function shouldSkip(Scope $scope, Expr $expr) : bool
    {
        if ($this->looseComparisonRuleEnabled && ($expr instanceof Expr\BinaryOp\Equal || $expr instanceof Expr\BinaryOp\NotEqual)) {
            return \true;
        }
        if ($expr instanceof Expr\Instanceof_ || $expr instanceof Expr\BinaryOp\Identical || $expr instanceof Expr\BinaryOp\NotIdentical || $expr instanceof Expr\BooleanNot || $expr instanceof Expr\BinaryOp\BooleanOr || $expr instanceof Expr\BinaryOp\BooleanAnd || $expr instanceof Expr\Ternary || $expr instanceof Expr\Isset_ || $expr instanceof Expr\Empty_ || $expr instanceof Expr\BinaryOp\Greater || $expr instanceof Expr\BinaryOp\GreaterOrEqual || $expr instanceof Expr\BinaryOp\Smaller || $expr instanceof Expr\BinaryOp\SmallerOrEqual) {
            // already checked by different rules
            return \true;
        }
        if ($expr instanceof FuncCall || $expr instanceof MethodCall || $expr instanceof Expr\StaticCall) {
            $isAlways = $this->impossibleCheckTypeHelper->findSpecifiedType($scope, $expr);
            if ($isAlways !== null) {
                return \true;
            }
        }
        return \false;
    }
    public function getBooleanType(Scope $scope, Expr $expr) : BooleanType
    {
        if ($this->shouldSkip($scope, $expr)) {
            return new BooleanType();
        }
        if ($this->treatPhpDocTypesAsCertain) {
            return $scope->getType($expr)->toBoolean();
        }
        return $scope->getNativeType($expr)->toBoolean();
    }
    public function getNativeBooleanType(Scope $scope, Expr $expr) : BooleanType
    {
        if ($this->shouldSkip($scope, $expr)) {
            return new BooleanType();
        }
        return $scope->getNativeType($expr)->toBoolean();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Comparison;

use PhpParser\Node;
use PhpParser\Node\Expr;
use PHPStan\Analyser\Scope;
use PHPStan\Parser\LastConditionVisitor;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use function sprintf;
/**
 * @implements Rule<Node\Expr\StaticCall>
 */
class ImpossibleCheckTypeStaticMethodCallRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Comparison\ImpossibleCheckTypeHelper
     */
    private $impossibleCheckTypeHelper;
    /**
     * @var bool
     */
    private $checkAlwaysTrueCheckTypeFunctionCall;
    /**
     * @var bool
     */
    private $treatPhpDocTypesAsCertain;
    /**
     * @var bool
     */
    private $reportAlwaysTrueInLastCondition;
    public function __construct(\PHPStan\Rules\Comparison\ImpossibleCheckTypeHelper $impossibleCheckTypeHelper, bool $checkAlwaysTrueCheckTypeFunctionCall, bool $treatPhpDocTypesAsCertain, bool $reportAlwaysTrueInLastCondition)
    {
        $this->impossibleCheckTypeHelper = $impossibleCheckTypeHelper;
        $this->checkAlwaysTrueCheckTypeFunctionCall = $checkAlwaysTrueCheckTypeFunctionCall;
        $this->treatPhpDocTypesAsCertain = $treatPhpDocTypesAsCertain;
        $this->reportAlwaysTrueInLastCondition = $reportAlwaysTrueInLastCondition;
    }
    public function getNodeType() : string
    {
        return Node\Expr\StaticCall::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->name instanceof Node\Identifier) {
            return [];
        }
        $isAlways = $this->impossibleCheckTypeHelper->findSpecifiedType($scope, $node);
        if ($isAlways === null) {
            return [];
        }
        $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use($scope, $node) : RuleErrorBuilder {
            if (!$this->treatPhpDocTypesAsCertain) {
                return $ruleErrorBuilder;
            }
            $isAlways = $this->impossibleCheckTypeHelper->doNotTreatPhpDocTypesAsCertain()->findSpecifiedType($scope, $node);
            if ($isAlways !== null) {
                return $ruleErrorBuilder;
            }
            return $ruleErrorBuilder->tip('Because the type is coming from a PHPDoc, you can turn off this check by setting <fg=cyan>treatPhpDocTypesAsCertain: false</> in your <fg=cyan>%configurationFile%</>.');
        };
        if (!$isAlways) {
            $method = $this->getMethod($node->class, $node->name->name, $scope);
            return [$addTip(RuleErrorBuilder::message(sprintf('Call to static method %s::%s()%s will always evaluate to false.', $method->getDeclaringClass()->getDisplayName(), $method->getName(), $this->impossibleCheckTypeHelper->getArgumentsDescription($scope, $node->getArgs()))))->build()];
        } elseif ($this->checkAlwaysTrueCheckTypeFunctionCall) {
            $isLast = $node->getAttribute(LastConditionVisitor::ATTRIBUTE_NAME);
            if ($isLast === \true && !$this->reportAlwaysTrueInLastCondition) {
                return [];
            }
            $method = $this->getMethod($node->class, $node->name->name, $scope);
            $errorBuilder = $addTip(RuleErrorBuilder::message(sprintf('Call to static method %s::%s()%s will always evaluate to true.', $method->getDeclaringClass()->getDisplayName(), $method->getName(), $this->impossibleCheckTypeHelper->getArgumentsDescription($scope, $node->getArgs()))));
            if ($isLast === \false && !$this->reportAlwaysTrueInLastCondition) {
                $errorBuilder->tip('Remove remaining cases below this one and this error will disappear too.');
            }
            return [$errorBuilder->build()];
        }
        return [];
    }
    /**
     * @param Node\Name|Expr $class
     * @throws ShouldNotHappenException
     */
    private function getMethod($class, string $methodName, Scope $scope) : MethodReflection
    {
        if ($class instanceof Node\Name) {
            $calledOnType = $scope->resolveTypeByName($class);
        } else {
            $calledOnType = $scope->getType($class);
        }
        $method = $scope->getMethodReflection($calledOnType, $methodName);
        if ($method === null) {
            throw new ShouldNotHappenException();
        }
        return $method;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Comparison;

use PhpParser\Node;
use PhpParser\Node\Scalar\LNumber;
use PhpParser\Node\Stmt\Break_;
use PhpParser\Node\Stmt\Continue_;
use PHPStan\Analyser\Scope;
use PHPStan\Node\DoWhileLoopConditionNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
use function sprintf;
/**
 * @implements Rule<DoWhileLoopConditionNode>
 */
class DoWhileLoopConstantConditionRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Comparison\ConstantConditionRuleHelper
     */
    private $helper;
    /**
     * @var bool
     */
    private $treatPhpDocTypesAsCertain;
    public function __construct(\PHPStan\Rules\Comparison\ConstantConditionRuleHelper $helper, bool $treatPhpDocTypesAsCertain)
    {
        $this->helper = $helper;
        $this->treatPhpDocTypesAsCertain = $treatPhpDocTypesAsCertain;
    }
    public function getNodeType() : string
    {
        return DoWhileLoopConditionNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $exprType = $this->helper->getBooleanType($scope, $node->getCond());
        if ($exprType instanceof ConstantBooleanType) {
            if ($exprType->getValue()) {
                foreach ($node->getExitPoints() as $exitPoint) {
                    $statement = $exitPoint->getStatement();
                    if ($statement instanceof Break_) {
                        return [];
                    }
                    if (!$statement instanceof Continue_) {
                        return [];
                    }
                    if ($statement->num === null) {
                        continue;
                    }
                    if (!$statement->num instanceof LNumber) {
                        continue;
                    }
                    $value = $statement->num->value;
                    if ($value === 1) {
                        continue;
                    }
                    if ($value > 1) {
                        return [];
                    }
                }
            }
            $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use($scope, $node) : RuleErrorBuilder {
                if (!$this->treatPhpDocTypesAsCertain) {
                    return $ruleErrorBuilder;
                }
                $booleanNativeType = $this->helper->getNativeBooleanType($scope, $node->getCond());
                if ($booleanNativeType instanceof ConstantBooleanType) {
                    return $ruleErrorBuilder;
                }
                return $ruleErrorBuilder->tip('Because the type is coming from a PHPDoc, you can turn off this check by setting <fg=cyan>treatPhpDocTypesAsCertain: false</> in your <fg=cyan>%configurationFile%</>.');
            };
            return [$addTip(RuleErrorBuilder::message(sprintf('Do-while loop condition is always %s.', $exprType->getValue() ? 'true' : 'false')))->line($node->getCond()->getLine())->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Comparison;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Parser\LastConditionVisitor;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
use function sprintf;
/**
 * @implements Rule<Node\Stmt\ElseIf_>
 */
class ElseIfConstantConditionRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Comparison\ConstantConditionRuleHelper
     */
    private $helper;
    /**
     * @var bool
     */
    private $treatPhpDocTypesAsCertain;
    /**
     * @var bool
     */
    private $reportAlwaysTrueInLastCondition;
    public function __construct(\PHPStan\Rules\Comparison\ConstantConditionRuleHelper $helper, bool $treatPhpDocTypesAsCertain, bool $reportAlwaysTrueInLastCondition)
    {
        $this->helper = $helper;
        $this->treatPhpDocTypesAsCertain = $treatPhpDocTypesAsCertain;
        $this->reportAlwaysTrueInLastCondition = $reportAlwaysTrueInLastCondition;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\ElseIf_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $exprType = $this->helper->getBooleanType($scope, $node->cond);
        if ($exprType instanceof ConstantBooleanType) {
            $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use($scope, $node) : RuleErrorBuilder {
                if (!$this->treatPhpDocTypesAsCertain) {
                    return $ruleErrorBuilder;
                }
                $booleanNativeType = $this->helper->getNativeBooleanType($scope, $node->cond);
                if ($booleanNativeType instanceof ConstantBooleanType) {
                    return $ruleErrorBuilder;
                }
                return $ruleErrorBuilder->tip('Because the type is coming from a PHPDoc, you can turn off this check by setting <fg=cyan>treatPhpDocTypesAsCertain: false</> in your <fg=cyan>%configurationFile%</>.');
            };
            $isLast = $node->cond->getAttribute(LastConditionVisitor::ATTRIBUTE_NAME);
            if (!$exprType->getValue() || $isLast !== \true || $this->reportAlwaysTrueInLastCondition) {
                $errorBuilder = $addTip(RuleErrorBuilder::message(sprintf('Elseif condition is always %s.', $exprType->getValue() ? 'true' : 'false')))->line($node->cond->getLine())->identifier('deadCode.elseifConstantCondition')->metadata(['depth' => $node->getAttribute('statementDepth'), 'order' => $node->getAttribute('statementOrder'), 'value' => $exprType->getValue()]);
                if ($exprType->getValue() && $isLast === \false && !$this->reportAlwaysTrueInLastCondition) {
                    $errorBuilder->tip('Remove remaining cases below this one and this error will disappear too.');
                }
                return [$errorBuilder->build()];
            }
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Comparison;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\BooleanAndNode;
use PHPStan\Parser\LastConditionVisitor;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
use function count;
use function sprintf;
/**
 * @implements Rule<BooleanAndNode>
 */
class BooleanAndConstantConditionRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Comparison\ConstantConditionRuleHelper
     */
    private $helper;
    /**
     * @var bool
     */
    private $treatPhpDocTypesAsCertain;
    /**
     * @var bool
     */
    private $bleedingEdge;
    /**
     * @var bool
     */
    private $reportAlwaysTrueInLastCondition;
    public function __construct(\PHPStan\Rules\Comparison\ConstantConditionRuleHelper $helper, bool $treatPhpDocTypesAsCertain, bool $bleedingEdge, bool $reportAlwaysTrueInLastCondition)
    {
        $this->helper = $helper;
        $this->treatPhpDocTypesAsCertain = $treatPhpDocTypesAsCertain;
        $this->bleedingEdge = $bleedingEdge;
        $this->reportAlwaysTrueInLastCondition = $reportAlwaysTrueInLastCondition;
    }
    public function getNodeType() : string
    {
        return BooleanAndNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $errors = [];
        $originalNode = $node->getOriginalNode();
        $nodeText = $this->bleedingEdge ? $originalNode->getOperatorSigil() : '&&';
        $leftType = $this->helper->getBooleanType($scope, $originalNode->left);
        $tipText = 'Because the type is coming from a PHPDoc, you can turn off this check by setting <fg=cyan>treatPhpDocTypesAsCertain: false</> in your <fg=cyan>%configurationFile%</>.';
        if ($leftType instanceof ConstantBooleanType) {
            $addTipLeft = function (RuleErrorBuilder $ruleErrorBuilder) use($scope, $tipText, $originalNode) : RuleErrorBuilder {
                if (!$this->treatPhpDocTypesAsCertain) {
                    return $ruleErrorBuilder;
                }
                $booleanNativeType = $this->helper->getNativeBooleanType($scope, $originalNode->left);
                if ($booleanNativeType instanceof ConstantBooleanType) {
                    return $ruleErrorBuilder;
                }
                return $ruleErrorBuilder->tip($tipText);
            };
            $isLast = $node->getAttribute(LastConditionVisitor::ATTRIBUTE_NAME);
            if (!$leftType->getValue() || $isLast !== \true || $this->reportAlwaysTrueInLastCondition) {
                $errorBuilder = $addTipLeft(RuleErrorBuilder::message(sprintf('Left side of %s is always %s.', $nodeText, $leftType->getValue() ? 'true' : 'false')))->line($originalNode->left->getLine());
                if ($leftType->getValue() && $isLast === \false && !$this->reportAlwaysTrueInLastCondition) {
                    $errorBuilder->tip('Remove remaining cases below this one and this error will disappear too.');
                }
                $errors[] = $errorBuilder->build();
            }
        }
        $rightScope = $node->getRightScope();
        $rightType = $this->helper->getBooleanType($rightScope, $originalNode->right);
        if ($rightType instanceof ConstantBooleanType && !$scope->isInFirstLevelStatement()) {
            $addTipRight = function (RuleErrorBuilder $ruleErrorBuilder) use($rightScope, $originalNode, $tipText) : RuleErrorBuilder {
                if (!$this->treatPhpDocTypesAsCertain) {
                    return $ruleErrorBuilder;
                }
                $booleanNativeType = $this->helper->getNativeBooleanType($rightScope, $originalNode->right);
                if ($booleanNativeType instanceof ConstantBooleanType) {
                    return $ruleErrorBuilder;
                }
                return $ruleErrorBuilder->tip($tipText);
            };
            $isLast = $node->getAttribute(LastConditionVisitor::ATTRIBUTE_NAME);
            if (!$rightType->getValue() || $isLast !== \true || $this->reportAlwaysTrueInLastCondition) {
                $errorBuilder = $addTipRight(RuleErrorBuilder::message(sprintf('Right side of %s is always %s.', $nodeText, $rightType->getValue() ? 'true' : 'false')))->line($originalNode->right->getLine());
                if ($rightType->getValue() && $isLast === \false && !$this->reportAlwaysTrueInLastCondition) {
                    $errorBuilder->tip('Remove remaining cases below this one and this error will disappear too.');
                }
                $errors[] = $errorBuilder->build();
            }
        }
        if (count($errors) === 0 && !$scope->isInFirstLevelStatement()) {
            $nodeType = $this->treatPhpDocTypesAsCertain ? $scope->getType($originalNode) : $scope->getNativeType($originalNode);
            if ($nodeType instanceof ConstantBooleanType) {
                $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use($scope, $originalNode, $tipText) : RuleErrorBuilder {
                    if (!$this->treatPhpDocTypesAsCertain) {
                        return $ruleErrorBuilder;
                    }
                    $booleanNativeType = $scope->getNativeType($originalNode);
                    if ($booleanNativeType instanceof ConstantBooleanType) {
                        return $ruleErrorBuilder;
                    }
                    return $ruleErrorBuilder->tip($tipText);
                };
                $isLast = $node->getAttribute(LastConditionVisitor::ATTRIBUTE_NAME);
                if (!$nodeType->getValue() || $isLast !== \true || $this->reportAlwaysTrueInLastCondition) {
                    $errorBuilder = $addTip(RuleErrorBuilder::message(sprintf('Result of %s is always %s.', $nodeText, $nodeType->getValue() ? 'true' : 'false')));
                    if ($nodeType->getValue() && $isLast === \false && !$this->reportAlwaysTrueInLastCondition) {
                        $errorBuilder->tip('Remove remaining cases below this one and this error will disappear too.');
                    }
                    $errors[] = $errorBuilder->build();
                }
            }
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Comparison;

use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Expr\StaticCall;
use PHPStan\Analyser\Scope;
use PHPStan\Analyser\TypeSpecifier;
use PHPStan\Analyser\TypeSpecifierContext;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\TrinaryLogic;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\Generic\GenericClassStringType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\MixedType;
use PHPStan\Type\NeverType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeTraverser;
use PHPStan\Type\TypeUtils;
use PHPStan\Type\TypeWithClassName;
use PHPStan\Type\UnionType;
use PHPStan\Type\VerbosityLevel;
use function array_map;
use function array_pop;
use function count;
use function implode;
use function in_array;
use function is_string;
use function sprintf;
use function strtolower;
class ImpossibleCheckTypeHelper
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Analyser\TypeSpecifier
     */
    private $typeSpecifier;
    /**
     * @var string[]
     */
    private $universalObjectCratesClasses;
    /**
     * @var bool
     */
    private $treatPhpDocTypesAsCertain;
    /**
     * @var bool
     */
    private $nullContextForVoidReturningFunctions;
    /**
     * @param string[] $universalObjectCratesClasses
     */
    public function __construct(ReflectionProvider $reflectionProvider, TypeSpecifier $typeSpecifier, array $universalObjectCratesClasses, bool $treatPhpDocTypesAsCertain, bool $nullContextForVoidReturningFunctions)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->typeSpecifier = $typeSpecifier;
        $this->universalObjectCratesClasses = $universalObjectCratesClasses;
        $this->treatPhpDocTypesAsCertain = $treatPhpDocTypesAsCertain;
        $this->nullContextForVoidReturningFunctions = $nullContextForVoidReturningFunctions;
    }
    public function findSpecifiedType(Scope $scope, Expr $node) : ?bool
    {
        if ($node instanceof FuncCall) {
            $argsCount = count($node->getArgs());
            if ($node->name instanceof Node\Name) {
                $functionName = strtolower((string) $node->name);
                if ($functionName === 'assert' && $argsCount >= 1) {
                    $arg = $node->getArgs()[0]->value;
                    $assertValue = ($this->treatPhpDocTypesAsCertain ? $scope->getType($arg) : $scope->getNativeType($arg))->toBoolean();
                    if (!$assertValue instanceof ConstantBooleanType) {
                        return null;
                    }
                    return $assertValue->getValue();
                }
                if (in_array($functionName, ['class_exists', 'interface_exists', 'trait_exists', 'enum_exists'], \true)) {
                    return null;
                }
                if (in_array($functionName, ['count', 'sizeof'], \true)) {
                    return null;
                } elseif ($functionName === 'defined') {
                    return null;
                } elseif ($functionName === 'array_search') {
                    return null;
                } elseif ($functionName === 'in_array' && $argsCount >= 3) {
                    $haystackArg = $node->getArgs()[1]->value;
                    $haystackType = $this->treatPhpDocTypesAsCertain ? $scope->getType($haystackArg) : $scope->getNativeType($haystackArg);
                    if ($haystackType instanceof MixedType) {
                        return null;
                    }
                    if (!$haystackType->isArray()->yes()) {
                        return null;
                    }
                    $needleArg = $node->getArgs()[0]->value;
                    $needleType = $this->treatPhpDocTypesAsCertain ? $scope->getType($needleArg) : $scope->getNativeType($needleArg);
                    $valueType = $haystackType->getIterableValueType();
                    $constantNeedleTypesCount = count($needleType->getConstantScalarValues()) + count($needleType->getEnumCases());
                    $constantHaystackTypesCount = count($valueType->getConstantScalarValues()) + count($valueType->getEnumCases());
                    $isNeedleSupertype = $needleType->isSuperTypeOf($valueType);
                    if ($haystackType->isConstantArray()->no()) {
                        if ($haystackType->isIterableAtLeastOnce()->yes()) {
                            // In this case the generic implementation via typeSpecifier fails, because the argument types cannot be narrowed down.
                            if ($constantNeedleTypesCount === 1 && $constantHaystackTypesCount === 1) {
                                if ($isNeedleSupertype->yes()) {
                                    return \true;
                                }
                                if ($isNeedleSupertype->no()) {
                                    return \false;
                                }
                            }
                            return null;
                        }
                    }
                    if (!$haystackType instanceof ConstantArrayType || count($haystackType->getValueTypes()) > 0) {
                        $haystackArrayTypes = $haystackType->getArrays();
                        if (count($haystackArrayTypes) === 1 && $haystackArrayTypes[0]->getIterableValueType() instanceof NeverType) {
                            return null;
                        }
                        if ($isNeedleSupertype->maybe() || $isNeedleSupertype->yes()) {
                            foreach ($haystackArrayTypes as $haystackArrayType) {
                                if ($haystackArrayType instanceof ConstantArrayType) {
                                    foreach ($haystackArrayType->getValueTypes() as $i => $haystackArrayValueType) {
                                        if ($haystackArrayType->isOptionalKey($i)) {
                                            continue;
                                        }
                                        foreach ($haystackArrayValueType->getConstantScalarTypes() as $constantScalarType) {
                                            if ($constantScalarType->isSuperTypeOf($needleType)->yes()) {
                                                continue 3;
                                            }
                                        }
                                    }
                                } else {
                                    foreach ($haystackArrayType->getIterableValueType()->getConstantScalarTypes() as $constantScalarType) {
                                        if ($constantScalarType->isSuperTypeOf($needleType)->yes()) {
                                            continue 2;
                                        }
                                    }
                                }
                                return null;
                            }
                        }
                        if ($isNeedleSupertype->yes()) {
                            $hasConstantNeedleTypes = $constantNeedleTypesCount > 0;
                            $hasConstantHaystackTypes = $constantHaystackTypesCount > 0;
                            if (!$hasConstantNeedleTypes && !$hasConstantHaystackTypes || $hasConstantNeedleTypes !== $hasConstantHaystackTypes) {
                                return null;
                            }
                        }
                    }
                } elseif ($functionName === 'method_exists' && $argsCount >= 2) {
                    $objectArg = $node->getArgs()[0]->value;
                    $objectType = $this->treatPhpDocTypesAsCertain ? $scope->getType($objectArg) : $scope->getNativeType($objectArg);
                    if ($objectType instanceof ConstantStringType && !$this->reflectionProvider->hasClass($objectType->getValue())) {
                        return \false;
                    }
                    $methodArg = $node->getArgs()[1]->value;
                    $methodType = $this->treatPhpDocTypesAsCertain ? $scope->getType($methodArg) : $scope->getNativeType($methodArg);
                    if ($methodType instanceof ConstantStringType) {
                        if ($objectType instanceof ConstantStringType) {
                            $objectType = new ObjectType($objectType->getValue());
                        }
                        if ($objectType->getObjectClassNames() !== []) {
                            if ($objectType->hasMethod($methodType->getValue())->yes()) {
                                return \true;
                            }
                            if ($objectType->hasMethod($methodType->getValue())->no()) {
                                return \false;
                            }
                        }
                        $genericType = TypeTraverser::map($objectType, static function (Type $type, callable $traverse) : Type {
                            if ($type instanceof UnionType || $type instanceof IntersectionType) {
                                return $traverse($type);
                            }
                            if ($type instanceof GenericClassStringType) {
                                return $type->getGenericType();
                            }
                            return new MixedType();
                        });
                        if ($genericType instanceof TypeWithClassName) {
                            if ($genericType->hasMethod($methodType->getValue())->yes()) {
                                return \true;
                            }
                            $classReflection = $genericType->getClassReflection();
                            if ($classReflection !== null && $classReflection->isFinal() && $genericType->hasMethod($methodType->getValue())->no()) {
                                return \false;
                            }
                        }
                    }
                }
            }
        }
        $typeSpecifierScope = $this->treatPhpDocTypesAsCertain ? $scope : $scope->doNotTreatPhpDocTypesAsCertain();
        $specifiedTypes = $this->typeSpecifier->specifyTypesInCondition($typeSpecifierScope, $node, $this->determineContext($typeSpecifierScope, $node));
        // don't validate types on overwrite
        if ($specifiedTypes->shouldOverwrite()) {
            return null;
        }
        $sureTypes = $specifiedTypes->getSureTypes();
        $sureNotTypes = $specifiedTypes->getSureNotTypes();
        $rootExpr = $specifiedTypes->getRootExpr();
        if ($rootExpr !== null) {
            if (self::isSpecified($typeSpecifierScope, $node, $rootExpr)) {
                return null;
            }
            $rootExprType = $this->treatPhpDocTypesAsCertain ? $scope->getType($rootExpr) : $scope->getNativeType($rootExpr);
            if ($rootExprType instanceof ConstantBooleanType) {
                return $rootExprType->getValue();
            }
            return null;
        }
        $results = [];
        foreach ($sureTypes as $sureType) {
            if (self::isSpecified($typeSpecifierScope, $node, $sureType[0])) {
                $results[] = TrinaryLogic::createMaybe();
                continue;
            }
            if ($this->treatPhpDocTypesAsCertain) {
                $argumentType = $scope->getType($sureType[0]);
            } else {
                $argumentType = $scope->getNativeType($sureType[0]);
            }
            /** @var Type $resultType */
            $resultType = $sureType[1];
            $results[] = $resultType->isSuperTypeOf($argumentType);
        }
        foreach ($sureNotTypes as $sureNotType) {
            if (self::isSpecified($typeSpecifierScope, $node, $sureNotType[0])) {
                $results[] = TrinaryLogic::createMaybe();
                continue;
            }
            if ($this->treatPhpDocTypesAsCertain) {
                $argumentType = $scope->getType($sureNotType[0]);
            } else {
                $argumentType = $scope->getNativeType($sureNotType[0]);
            }
            /** @var Type $resultType */
            $resultType = $sureNotType[1];
            $results[] = $resultType->isSuperTypeOf($argumentType)->negate();
        }
        if (count($results) === 0) {
            return null;
        }
        $result = TrinaryLogic::createYes()->and(...$results);
        return $result->maybe() ? null : $result->yes();
    }
    private static function isSpecified(Scope $scope, Expr $node, Expr $expr) : bool
    {
        if ($expr === $node) {
            return \true;
        }
        if ($expr instanceof Expr\Variable) {
            return is_string($expr->name) && !$scope->hasVariableType($expr->name)->yes();
        }
        if ($expr instanceof Expr\BooleanNot) {
            return self::isSpecified($scope, $node, $expr->expr);
        }
        if ($expr instanceof Expr\BinaryOp) {
            return self::isSpecified($scope, $node, $expr->left) || self::isSpecified($scope, $node, $expr->right);
        }
        return ($node instanceof FuncCall || $node instanceof MethodCall || $node instanceof Expr\StaticCall) && $scope->hasExpressionType($expr)->yes();
    }
    /**
     * @param Node\Arg[] $args
     */
    public function getArgumentsDescription(Scope $scope, array $args) : string
    {
        if (count($args) === 0) {
            return '';
        }
        $descriptions = array_map(function (Arg $arg) use($scope) : string {
            return ($this->treatPhpDocTypesAsCertain ? $scope->getType($arg->value) : $scope->getNativeType($arg->value))->describe(VerbosityLevel::value());
        }, $args);
        if (count($descriptions) < 3) {
            return sprintf(' with %s', implode(' and ', $descriptions));
        }
        $lastDescription = array_pop($descriptions);
        return sprintf(' with arguments %s and %s', implode(', ', $descriptions), $lastDescription);
    }
    public function doNotTreatPhpDocTypesAsCertain() : self
    {
        if (!$this->treatPhpDocTypesAsCertain) {
            return $this;
        }
        return new self($this->reflectionProvider, $this->typeSpecifier, $this->universalObjectCratesClasses, \false, $this->nullContextForVoidReturningFunctions);
    }
    private function determineContext(Scope $scope, Expr $node) : TypeSpecifierContext
    {
        if (!$this->nullContextForVoidReturningFunctions) {
            return TypeSpecifierContext::createTruthy();
        }
        if ($node instanceof FuncCall && $node->name instanceof Node\Name) {
            if ($this->reflectionProvider->hasFunction($node->name, $scope)) {
                $functionReflection = $this->reflectionProvider->getFunction($node->name, $scope);
                $parametersAcceptor = ParametersAcceptorSelector::selectFromArgs($scope, $node->getArgs(), $functionReflection->getVariants());
                $returnType = TypeUtils::resolveLateResolvableTypes($parametersAcceptor->getReturnType());
                return $returnType->isVoid()->yes() ? TypeSpecifierContext::createNull() : TypeSpecifierContext::createTruthy();
            }
        } elseif ($node instanceof MethodCall && $node->name instanceof Node\Identifier) {
            $methodCalledOnType = $scope->getType($node->var);
            $methodReflection = $scope->getMethodReflection($methodCalledOnType, $node->name->name);
            if ($methodReflection !== null) {
                $parametersAcceptor = ParametersAcceptorSelector::selectFromArgs($scope, $node->getArgs(), $methodReflection->getVariants());
                $returnType = TypeUtils::resolveLateResolvableTypes($parametersAcceptor->getReturnType());
                return $returnType->isVoid()->yes() ? TypeSpecifierContext::createNull() : TypeSpecifierContext::createTruthy();
            }
        } elseif ($node instanceof StaticCall && $node->name instanceof Node\Identifier) {
            if ($node->class instanceof Node\Name) {
                $calleeType = $scope->resolveTypeByName($node->class);
            } else {
                $calleeType = $scope->getType($node->class);
            }
            $staticMethodReflection = $scope->getMethodReflection($calleeType, $node->name->name);
            if ($staticMethodReflection !== null) {
                $parametersAcceptor = ParametersAcceptorSelector::selectFromArgs($scope, $node->getArgs(), $staticMethodReflection->getVariants());
                $returnType = TypeUtils::resolveLateResolvableTypes($parametersAcceptor->getReturnType());
                return $returnType->isVoid()->yes() ? TypeSpecifierContext::createNull() : TypeSpecifierContext::createTruthy();
            }
        }
        return TypeSpecifierContext::createTruthy();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Comparison;

use PhpParser\Node;
use PhpParser\Node\Expr\BinaryOp;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<Node\Expr\BinaryOp>
 */
class NumberComparisonOperatorsConstantConditionRule implements Rule
{
    /**
     * @var bool
     */
    private $treatPhpDocTypesAsCertain;
    public function __construct(bool $treatPhpDocTypesAsCertain)
    {
        $this->treatPhpDocTypesAsCertain = $treatPhpDocTypesAsCertain;
    }
    public function getNodeType() : string
    {
        return BinaryOp::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node instanceof BinaryOp\Greater && !$node instanceof BinaryOp\GreaterOrEqual && !$node instanceof BinaryOp\Smaller && !$node instanceof BinaryOp\SmallerOrEqual) {
            return [];
        }
        $exprType = $this->treatPhpDocTypesAsCertain ? $scope->getType($node) : $scope->getNativeType($node);
        if ($exprType instanceof ConstantBooleanType) {
            $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use($scope, $node) : RuleErrorBuilder {
                if (!$this->treatPhpDocTypesAsCertain) {
                    return $ruleErrorBuilder;
                }
                $booleanNativeType = $scope->getNativeType($node);
                if ($booleanNativeType instanceof ConstantBooleanType) {
                    return $ruleErrorBuilder;
                }
                return $ruleErrorBuilder->tip('Because the type is coming from a PHPDoc, you can turn off this check by setting <fg=cyan>treatPhpDocTypesAsCertain: false</> in your <fg=cyan>%configurationFile%</>.');
            };
            return [$addTip(RuleErrorBuilder::message(sprintf('Comparison operation "%s" between %s and %s is always %s.', $node->getOperatorSigil(), $scope->getType($node->left)->describe(VerbosityLevel::value()), $scope->getType($node->right)->describe(VerbosityLevel::value()), $exprType->getValue() ? 'true' : 'false')))->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Comparison;

use PhpParser\Node;
use PhpParser\Node\Scalar\LNumber;
use PhpParser\Node\Stmt\Break_;
use PhpParser\Node\Stmt\Continue_;
use PHPStan\Analyser\Scope;
use PHPStan\Node\BreaklessWhileLoopNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
/**
 * @implements Rule<BreaklessWhileLoopNode>
 */
class WhileLoopAlwaysTrueConditionRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Comparison\ConstantConditionRuleHelper
     */
    private $helper;
    /**
     * @var bool
     */
    private $treatPhpDocTypesAsCertain;
    public function __construct(\PHPStan\Rules\Comparison\ConstantConditionRuleHelper $helper, bool $treatPhpDocTypesAsCertain)
    {
        $this->helper = $helper;
        $this->treatPhpDocTypesAsCertain = $treatPhpDocTypesAsCertain;
    }
    public function getNodeType() : string
    {
        return BreaklessWhileLoopNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        foreach ($node->getExitPoints() as $exitPoint) {
            $statement = $exitPoint->getStatement();
            if ($statement instanceof Break_) {
                return [];
            }
            if (!$statement instanceof Continue_) {
                return [];
            }
            if ($statement->num === null) {
                continue;
            }
            if (!$statement->num instanceof LNumber) {
                continue;
            }
            $value = $statement->num->value;
            if ($value === 1) {
                continue;
            }
            if ($value > 1) {
                return [];
            }
        }
        $originalNode = $node->getOriginalNode();
        $exprType = $this->helper->getBooleanType($scope, $originalNode->cond);
        if ($exprType->isTrue()->yes()) {
            $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use($scope, $originalNode) : RuleErrorBuilder {
                if (!$this->treatPhpDocTypesAsCertain) {
                    return $ruleErrorBuilder;
                }
                $booleanNativeType = $this->helper->getNativeBooleanType($scope, $originalNode->cond);
                if ($booleanNativeType instanceof ConstantBooleanType) {
                    return $ruleErrorBuilder;
                }
                return $ruleErrorBuilder->tip('Because the type is coming from a PHPDoc, you can turn off this check by setting <fg=cyan>treatPhpDocTypesAsCertain: false</> in your <fg=cyan>%configurationFile%</>.');
            };
            return [$addTip(RuleErrorBuilder::message('While loop condition is always true.'))->line($originalNode->cond->getLine())->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Comparison;

use PhpParser\Node;
use PhpParser\Node\Stmt\While_;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
/**
 * @implements Rule<While_>
 */
class WhileLoopAlwaysFalseConditionRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Comparison\ConstantConditionRuleHelper
     */
    private $helper;
    /**
     * @var bool
     */
    private $treatPhpDocTypesAsCertain;
    public function __construct(\PHPStan\Rules\Comparison\ConstantConditionRuleHelper $helper, bool $treatPhpDocTypesAsCertain)
    {
        $this->helper = $helper;
        $this->treatPhpDocTypesAsCertain = $treatPhpDocTypesAsCertain;
    }
    public function getNodeType() : string
    {
        return While_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $exprType = $this->helper->getBooleanType($scope, $node->cond);
        if ($exprType->isFalse()->yes()) {
            $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use($scope, $node) : RuleErrorBuilder {
                if (!$this->treatPhpDocTypesAsCertain) {
                    return $ruleErrorBuilder;
                }
                $booleanNativeType = $this->helper->getNativeBooleanType($scope, $node->cond);
                if ($booleanNativeType instanceof ConstantBooleanType) {
                    return $ruleErrorBuilder;
                }
                return $ruleErrorBuilder->tip('Because the type is coming from a PHPDoc, you can turn off this check by setting <fg=cyan>treatPhpDocTypesAsCertain: false</> in your <fg=cyan>%configurationFile%</>.');
            };
            return [$addTip(RuleErrorBuilder::message('While loop condition is always false.'))->line($node->cond->getLine())->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Comparison;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Parser\LastConditionVisitor;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
use function sprintf;
/**
 * @implements Rule<Node\Expr\BooleanNot>
 */
class BooleanNotConstantConditionRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Comparison\ConstantConditionRuleHelper
     */
    private $helper;
    /**
     * @var bool
     */
    private $treatPhpDocTypesAsCertain;
    /**
     * @var bool
     */
    private $reportAlwaysTrueInLastCondition;
    public function __construct(\PHPStan\Rules\Comparison\ConstantConditionRuleHelper $helper, bool $treatPhpDocTypesAsCertain, bool $reportAlwaysTrueInLastCondition)
    {
        $this->helper = $helper;
        $this->treatPhpDocTypesAsCertain = $treatPhpDocTypesAsCertain;
        $this->reportAlwaysTrueInLastCondition = $reportAlwaysTrueInLastCondition;
    }
    public function getNodeType() : string
    {
        return Node\Expr\BooleanNot::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $exprType = $this->helper->getBooleanType($scope, $node->expr);
        if ($exprType instanceof ConstantBooleanType) {
            $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use($scope, $node) : RuleErrorBuilder {
                if (!$this->treatPhpDocTypesAsCertain) {
                    return $ruleErrorBuilder;
                }
                $booleanNativeType = $this->helper->getNativeBooleanType($scope, $node->expr);
                if ($booleanNativeType instanceof ConstantBooleanType) {
                    return $ruleErrorBuilder;
                }
                return $ruleErrorBuilder->tip('Because the type is coming from a PHPDoc, you can turn off this check by setting <fg=cyan>treatPhpDocTypesAsCertain: false</> in your <fg=cyan>%configurationFile%</>.');
            };
            $isLast = $node->getAttribute(LastConditionVisitor::ATTRIBUTE_NAME);
            if ($exprType->getValue() || $isLast !== \true || $this->reportAlwaysTrueInLastCondition) {
                $errorBuilder = $addTip(RuleErrorBuilder::message(sprintf('Negated boolean expression is always %s.', $exprType->getValue() ? 'false' : 'true')))->line($node->expr->getLine());
                if (!$exprType->getValue() && $isLast === \false && !$this->reportAlwaysTrueInLastCondition) {
                    $errorBuilder->tip('Remove remaining cases below this one and this error will disappear too.');
                }
                return [$errorBuilder->build()];
            }
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Comparison;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
use function sprintf;
/**
 * @implements Rule<Node\Stmt\If_>
 */
class IfConstantConditionRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Comparison\ConstantConditionRuleHelper
     */
    private $helper;
    /**
     * @var bool
     */
    private $treatPhpDocTypesAsCertain;
    public function __construct(\PHPStan\Rules\Comparison\ConstantConditionRuleHelper $helper, bool $treatPhpDocTypesAsCertain)
    {
        $this->helper = $helper;
        $this->treatPhpDocTypesAsCertain = $treatPhpDocTypesAsCertain;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\If_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $exprType = $this->helper->getBooleanType($scope, $node->cond);
        if ($exprType instanceof ConstantBooleanType) {
            $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use($scope, $node) : RuleErrorBuilder {
                if (!$this->treatPhpDocTypesAsCertain) {
                    return $ruleErrorBuilder;
                }
                $booleanNativeType = $this->helper->getNativeBooleanType($scope, $node->cond);
                if ($booleanNativeType instanceof ConstantBooleanType) {
                    return $ruleErrorBuilder;
                }
                return $ruleErrorBuilder->tip('Because the type is coming from a PHPDoc, you can turn off this check by setting <fg=cyan>treatPhpDocTypesAsCertain: false</> in your <fg=cyan>%configurationFile%</>.');
            };
            return [$addTip(RuleErrorBuilder::message(sprintf('If condition is always %s.', $exprType->getValue() ? 'true' : 'false')))->line($node->cond->getLine())->identifier('deadCode.ifConstantCondition')->metadata(['depth' => $node->getAttribute('statementDepth'), 'order' => $node->getAttribute('statementOrder'), 'value' => $exprType->getValue()])->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Comparison;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Parser\LastConditionVisitor;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
/**
 * @implements Rule<Node\Expr\BinaryOp>
 */
class ConstantLooseComparisonRule implements Rule
{
    /**
     * @var bool
     */
    private $checkAlwaysTrueLooseComparison;
    /**
     * @var bool
     */
    private $treatPhpDocTypesAsCertain;
    /**
     * @var bool
     */
    private $reportAlwaysTrueInLastCondition;
    public function __construct(bool $checkAlwaysTrueLooseComparison, bool $treatPhpDocTypesAsCertain, bool $reportAlwaysTrueInLastCondition)
    {
        $this->checkAlwaysTrueLooseComparison = $checkAlwaysTrueLooseComparison;
        $this->treatPhpDocTypesAsCertain = $treatPhpDocTypesAsCertain;
        $this->reportAlwaysTrueInLastCondition = $reportAlwaysTrueInLastCondition;
    }
    public function getNodeType() : string
    {
        return Node\Expr\BinaryOp::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node instanceof Node\Expr\BinaryOp\Equal && !$node instanceof Node\Expr\BinaryOp\NotEqual) {
            return [];
        }
        $nodeType = $this->treatPhpDocTypesAsCertain ? $scope->getType($node) : $scope->getNativeType($node);
        if (!$nodeType instanceof ConstantBooleanType) {
            return [];
        }
        $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use($scope, $node) : RuleErrorBuilder {
            if (!$this->treatPhpDocTypesAsCertain) {
                return $ruleErrorBuilder;
            }
            $instanceofTypeWithoutPhpDocs = $scope->getNativeType($node);
            if ($instanceofTypeWithoutPhpDocs instanceof ConstantBooleanType) {
                return $ruleErrorBuilder;
            }
            return $ruleErrorBuilder->tip('Because the type is coming from a PHPDoc, you can turn off this check by setting <fg=cyan>treatPhpDocTypesAsCertain: false</> in your <fg=cyan>%configurationFile%</>.');
        };
        if (!$nodeType->getValue()) {
            return [$addTip(RuleErrorBuilder::message(sprintf('Loose comparison using %s between %s and %s will always evaluate to false.', $node instanceof Node\Expr\BinaryOp\Equal ? '==' : '!=', $scope->getType($node->left)->describe(VerbosityLevel::value()), $scope->getType($node->right)->describe(VerbosityLevel::value()))))->build()];
        } elseif ($this->checkAlwaysTrueLooseComparison) {
            $isLast = $node->getAttribute(LastConditionVisitor::ATTRIBUTE_NAME);
            if ($isLast === \true && !$this->reportAlwaysTrueInLastCondition) {
                return [];
            }
            $errorBuilder = $addTip(RuleErrorBuilder::message(sprintf('Loose comparison using %s between %s and %s will always evaluate to true.', $node instanceof Node\Expr\BinaryOp\Equal ? '==' : '!=', $scope->getType($node->left)->describe(VerbosityLevel::value()), $scope->getType($node->right)->describe(VerbosityLevel::value()))));
            if ($isLast === \false && !$this->reportAlwaysTrueInLastCondition) {
                $errorBuilder->tip('Remove remaining cases below this one and this error will disappear too.');
            }
            return [$errorBuilder->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Comparison;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
/**
 * @implements Rule<Node\Expr\Match_>
 */
class UsageOfVoidMatchExpressionRule implements Rule
{
    public function getNodeType() : string
    {
        return Node\Expr\Match_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$scope->isInFirstLevelStatement()) {
            $matchResultType = $scope->getType($node);
            if ($matchResultType->isVoid()->yes()) {
                return [RuleErrorBuilder::message('Result of match expression (void) is used.')->build()];
            }
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Comparison;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\BooleanOrNode;
use PHPStan\Parser\LastConditionVisitor;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
use function count;
use function sprintf;
/**
 * @implements Rule<BooleanOrNode>
 */
class BooleanOrConstantConditionRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Comparison\ConstantConditionRuleHelper
     */
    private $helper;
    /**
     * @var bool
     */
    private $treatPhpDocTypesAsCertain;
    /**
     * @var bool
     */
    private $bleedingEdge;
    /**
     * @var bool
     */
    private $reportAlwaysTrueInLastCondition;
    public function __construct(\PHPStan\Rules\Comparison\ConstantConditionRuleHelper $helper, bool $treatPhpDocTypesAsCertain, bool $bleedingEdge, bool $reportAlwaysTrueInLastCondition)
    {
        $this->helper = $helper;
        $this->treatPhpDocTypesAsCertain = $treatPhpDocTypesAsCertain;
        $this->bleedingEdge = $bleedingEdge;
        $this->reportAlwaysTrueInLastCondition = $reportAlwaysTrueInLastCondition;
    }
    public function getNodeType() : string
    {
        return BooleanOrNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $originalNode = $node->getOriginalNode();
        $nodeText = $this->bleedingEdge ? $originalNode->getOperatorSigil() : '||';
        $messages = [];
        $leftType = $this->helper->getBooleanType($scope, $originalNode->left);
        $tipText = 'Because the type is coming from a PHPDoc, you can turn off this check by setting <fg=cyan>treatPhpDocTypesAsCertain: false</> in your <fg=cyan>%configurationFile%</>.';
        if ($leftType instanceof ConstantBooleanType) {
            $addTipLeft = function (RuleErrorBuilder $ruleErrorBuilder) use($scope, $originalNode, $tipText) : RuleErrorBuilder {
                if (!$this->treatPhpDocTypesAsCertain) {
                    return $ruleErrorBuilder;
                }
                $booleanNativeType = $this->helper->getNativeBooleanType($scope, $originalNode->left);
                if ($booleanNativeType instanceof ConstantBooleanType) {
                    return $ruleErrorBuilder;
                }
                return $ruleErrorBuilder->tip($tipText);
            };
            $isLast = $node->getAttribute(LastConditionVisitor::ATTRIBUTE_NAME);
            if (!$leftType->getValue() || $isLast !== \true || $this->reportAlwaysTrueInLastCondition) {
                $errorBuilder = $addTipLeft(RuleErrorBuilder::message(sprintf('Left side of %s is always %s.', $nodeText, $leftType->getValue() ? 'true' : 'false')))->line($originalNode->left->getLine());
                if ($leftType->getValue() && $isLast === \false && !$this->reportAlwaysTrueInLastCondition) {
                    $errorBuilder->tip('Remove remaining cases below this one and this error will disappear too.');
                }
                $messages[] = $errorBuilder->build();
            }
        }
        $rightScope = $node->getRightScope();
        $rightType = $this->helper->getBooleanType($rightScope, $originalNode->right);
        if ($rightType instanceof ConstantBooleanType && !$scope->isInFirstLevelStatement()) {
            $addTipRight = function (RuleErrorBuilder $ruleErrorBuilder) use($rightScope, $originalNode, $tipText) : RuleErrorBuilder {
                if (!$this->treatPhpDocTypesAsCertain) {
                    return $ruleErrorBuilder;
                }
                $booleanNativeType = $this->helper->getNativeBooleanType($rightScope, $originalNode->right);
                if ($booleanNativeType instanceof ConstantBooleanType) {
                    return $ruleErrorBuilder;
                }
                return $ruleErrorBuilder->tip($tipText);
            };
            $isLast = $node->getAttribute(LastConditionVisitor::ATTRIBUTE_NAME);
            if (!$rightType->getValue() || $isLast !== \true || $this->reportAlwaysTrueInLastCondition) {
                $errorBuilder = $addTipRight(RuleErrorBuilder::message(sprintf('Right side of %s is always %s.', $nodeText, $rightType->getValue() ? 'true' : 'false')))->line($originalNode->right->getLine());
                if ($rightType->getValue() && $isLast === \false && !$this->reportAlwaysTrueInLastCondition) {
                    $errorBuilder->tip('Remove remaining cases below this one and this error will disappear too.');
                }
                $messages[] = $errorBuilder->build();
            }
        }
        if (count($messages) === 0 && !$scope->isInFirstLevelStatement()) {
            $nodeType = $this->treatPhpDocTypesAsCertain ? $scope->getType($originalNode) : $scope->getNativeType($originalNode);
            if ($nodeType instanceof ConstantBooleanType) {
                $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use($scope, $originalNode, $tipText) : RuleErrorBuilder {
                    if (!$this->treatPhpDocTypesAsCertain) {
                        return $ruleErrorBuilder;
                    }
                    $booleanNativeType = $scope->getNativeType($originalNode);
                    if ($booleanNativeType instanceof ConstantBooleanType) {
                        return $ruleErrorBuilder;
                    }
                    return $ruleErrorBuilder->tip($tipText);
                };
                $isLast = $node->getAttribute(LastConditionVisitor::ATTRIBUTE_NAME);
                if (!$nodeType->getValue() || $isLast !== \true || $this->reportAlwaysTrueInLastCondition) {
                    $errorBuilder = $addTip(RuleErrorBuilder::message(sprintf('Result of %s is always %s.', $nodeText, $nodeType->getValue() ? 'true' : 'false')));
                    if ($nodeType->getValue() && $isLast === \false && !$this->reportAlwaysTrueInLastCondition) {
                        $errorBuilder->tip('Remove remaining cases below this one and this error will disappear too.');
                    }
                    $messages[] = $errorBuilder->build();
                }
            }
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Comparison;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\Constant\ConstantBooleanType;
/**
 * @implements Rule<Node\Stmt\If_>
 */
class UnreachableIfBranchesRule implements Rule
{
    /**
     * @var \PHPStan\Rules\Comparison\ConstantConditionRuleHelper
     */
    private $helper;
    /**
     * @var bool
     */
    private $treatPhpDocTypesAsCertain;
    /**
     * @var bool
     */
    private $disable;
    public function __construct(\PHPStan\Rules\Comparison\ConstantConditionRuleHelper $helper, bool $treatPhpDocTypesAsCertain, bool $disable)
    {
        $this->helper = $helper;
        $this->treatPhpDocTypesAsCertain = $treatPhpDocTypesAsCertain;
        $this->disable = $disable;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\If_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if ($this->disable) {
            return [];
        }
        $errors = [];
        $condition = $node->cond;
        $conditionType = $this->treatPhpDocTypesAsCertain ? $scope->getType($condition) : $scope->getNativeType($condition);
        $conditionBooleanType = $conditionType->toBoolean();
        $nextBranchIsDead = $conditionBooleanType->isTrue()->yes() && $this->helper->shouldSkip($scope, $node->cond) && !$this->helper->shouldReportAlwaysTrueByDefault($node->cond);
        $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use($scope, &$condition) : RuleErrorBuilder {
            if (!$this->treatPhpDocTypesAsCertain) {
                return $ruleErrorBuilder;
            }
            $booleanNativeType = $scope->getNativeType($condition)->toBoolean();
            if ($booleanNativeType instanceof ConstantBooleanType) {
                return $ruleErrorBuilder;
            }
            return $ruleErrorBuilder->tip('Because the type is coming from a PHPDoc, you can turn off this check by setting <fg=cyan>treatPhpDocTypesAsCertain: false</> in your <fg=cyan>%configurationFile%</>.');
        };
        foreach ($node->elseifs as $elseif) {
            if ($nextBranchIsDead) {
                $errors[] = $addTip(RuleErrorBuilder::message('Elseif branch is unreachable because previous condition is always true.')->line($elseif->getLine()))->identifier('deadCode.unreachableElseif')->metadata(['ifDepth' => $node->getAttribute('statementDepth'), 'ifOrder' => $node->getAttribute('statementOrder'), 'depth' => $elseif->getAttribute('statementDepth'), 'order' => $elseif->getAttribute('statementOrder')])->build();
                continue;
            }
            $condition = $elseif->cond;
            $conditionType = $this->treatPhpDocTypesAsCertain ? $scope->getType($condition) : $scope->getNativeType($condition);
            $conditionBooleanType = $conditionType->toBoolean();
            $nextBranchIsDead = $conditionBooleanType->isTrue()->yes() && $this->helper->shouldSkip($scope, $elseif->cond) && !$this->helper->shouldReportAlwaysTrueByDefault($elseif->cond);
        }
        if ($node->else !== null && $nextBranchIsDead) {
            $errors[] = $addTip(RuleErrorBuilder::message('Else branch is unreachable because previous condition is always true.'))->line($node->else->getLine())->identifier('deadCode.unreachableElse')->metadata(['ifDepth' => $node->getAttribute('statementDepth'), 'ifOrder' => $node->getAttribute('statementOrder')])->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules;

/** @api */
interface IdentifierRuleError extends \PHPStan\Rules\RuleError
{
    public function getIdentifier() : string;
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
/**
 * This is the interface custom rules implement. To register it in the configuration file
 * use the `phpstan.rules.rule` service tag:
 *
 * ```
 * services:
 * 	-
 *		class: App\MyRule
 *		tags:
 *			- phpstan.rules.rule
 * ```
 *
 * Learn more: https://phpstan.org/developing-extensions/rules
 *
 * @api
 * @phpstan-template TNodeType of Node
 */
interface Rule
{
    /**
     * @phpstan-return class-string<TNodeType>
     */
    public function getNodeType() : string;
    /**
     * @phpstan-param TNodeType $node
     * @return (string|RuleError)[] errors
     */
    public function processNode(Node $node, Scope $scope) : array;
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Missing;

use Generator;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\ExecutionEndNode;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Generic\TemplateMixedType;
use PHPStan\Type\MixedType;
use PHPStan\Type\NeverType;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypeUtils;
use PHPStan\Type\VerbosityLevel;
use PHPStan\Type\VoidType;
use function sprintf;
/**
 * @implements Rule<ExecutionEndNode>
 */
class MissingReturnRule implements Rule
{
    /**
     * @var bool
     */
    private $checkExplicitMixedMissingReturn;
    /**
     * @var bool
     */
    private $checkPhpDocMissingReturn;
    public function __construct(bool $checkExplicitMixedMissingReturn, bool $checkPhpDocMissingReturn)
    {
        $this->checkExplicitMixedMissingReturn = $checkExplicitMixedMissingReturn;
        $this->checkPhpDocMissingReturn = $checkPhpDocMissingReturn;
    }
    public function getNodeType() : string
    {
        return ExecutionEndNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $statementResult = $node->getStatementResult();
        if ($statementResult->isAlwaysTerminating()) {
            return [];
        }
        $anonymousFunctionReturnType = $scope->getAnonymousFunctionReturnType();
        $scopeFunction = $scope->getFunction();
        if ($anonymousFunctionReturnType !== null) {
            $returnType = $anonymousFunctionReturnType;
            $description = 'Anonymous function';
            if (!$node->hasNativeReturnTypehint()) {
                return [];
            }
        } elseif ($scopeFunction !== null) {
            $returnType = ParametersAcceptorSelector::selectSingle($scopeFunction->getVariants())->getReturnType();
            if ($scopeFunction instanceof MethodReflection) {
                $description = sprintf('Method %s::%s()', $scopeFunction->getDeclaringClass()->getDisplayName(), $scopeFunction->getName());
            } else {
                $description = sprintf('Function %s()', $scopeFunction->getName());
            }
        } else {
            throw new ShouldNotHappenException();
        }
        $returnType = TypeUtils::resolveLateResolvableTypes($returnType);
        $isVoidSuperType = $returnType->isSuperTypeOf(new VoidType());
        if ($isVoidSuperType->yes() && !$returnType instanceof MixedType) {
            return [];
        }
        if ($statementResult->hasYield()) {
            if ($this->checkPhpDocMissingReturn) {
                $generatorReturnType = $returnType->getTemplateType(Generator::class, 'TReturn');
                if (!$generatorReturnType instanceof ErrorType) {
                    $returnType = $generatorReturnType;
                    if ($returnType->isVoid()->yes()) {
                        return [];
                    }
                    if (!$returnType instanceof MixedType) {
                        return [RuleErrorBuilder::message(sprintf('%s should return %s but return statement is missing.', $description, $returnType->describe(VerbosityLevel::typeOnly())))->line($node->getNode()->getStartLine())->build()];
                    }
                }
            }
            return [];
        }
        if (!$node->hasNativeReturnTypehint() && !$this->checkPhpDocMissingReturn && TypeCombinator::containsNull($returnType)) {
            return [];
        }
        if ($returnType instanceof NeverType && $returnType->isExplicit()) {
            $errorBuilder = RuleErrorBuilder::message(sprintf('%s should always throw an exception or terminate script execution but doesn\'t do that.', $description))->line($node->getNode()->getStartLine());
            if ($node->hasNativeReturnTypehint()) {
                $errorBuilder->nonIgnorable();
            }
            return [$errorBuilder->build()];
        }
        if ($returnType instanceof MixedType && !$returnType instanceof TemplateMixedType && !$node->hasNativeReturnTypehint() && (!$returnType->isExplicitMixed() || !$this->checkExplicitMixedMissingReturn)) {
            return [];
        }
        $errorBuilder = RuleErrorBuilder::message(sprintf('%s should return %s but return statement is missing.', $description, $returnType->describe(VerbosityLevel::typeOnly())))->line($node->getNode()->getStartLine());
        if ($node->hasNativeReturnTypehint()) {
            $errorBuilder->nonIgnorable();
        }
        return [$errorBuilder->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules;

/** @api */
interface TipRuleError extends \PHPStan\Rules\RuleError
{
    public function getTip() : string;
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Regexp;

use _PHPStan_dcc7b7cff\Nette\Utils\RegexpException;
use _PHPStan_dcc7b7cff\Nette\Utils\Strings;
use PhpParser\Node;
use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function in_array;
use function sprintf;
use function str_starts_with;
use function strtolower;
/**
 * @implements Rule<Node\Expr\FuncCall>
 */
class RegularExpressionPatternRule implements Rule
{
    public function getNodeType() : string
    {
        return FuncCall::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $patterns = $this->extractPatterns($node, $scope);
        $errors = [];
        foreach ($patterns as $pattern) {
            $errorMessage = $this->validatePattern($pattern);
            if ($errorMessage === null) {
                continue;
            }
            $errors[] = RuleErrorBuilder::message(sprintf('Regex pattern is invalid: %s', $errorMessage))->build();
        }
        return $errors;
    }
    /**
     * @return string[]
     */
    private function extractPatterns(FuncCall $functionCall, Scope $scope) : array
    {
        if (!$functionCall->name instanceof Node\Name) {
            return [];
        }
        $functionName = strtolower((string) $functionCall->name);
        if (!str_starts_with($functionName, 'preg_')) {
            return [];
        }
        if (!isset($functionCall->getArgs()[0])) {
            return [];
        }
        $patternNode = $functionCall->getArgs()[0]->value;
        $patternType = $scope->getType($patternNode);
        $patternStrings = [];
        foreach ($patternType->getConstantStrings() as $constantStringType) {
            if (!in_array($functionName, ['preg_match', 'preg_match_all', 'preg_split', 'preg_grep', 'preg_replace', 'preg_replace_callback', 'preg_filter'], \true)) {
                continue;
            }
            $patternStrings[] = $constantStringType->getValue();
        }
        foreach ($patternType->getConstantArrays() as $constantArrayType) {
            if (in_array($functionName, ['preg_replace', 'preg_replace_callback', 'preg_filter'], \true)) {
                foreach ($constantArrayType->getValueTypes() as $arrayKeyType) {
                    foreach ($arrayKeyType->getConstantStrings() as $constantString) {
                        $patternStrings[] = $constantString->getValue();
                    }
                }
            }
            if ($functionName !== 'preg_replace_callback_array') {
                continue;
            }
            foreach ($constantArrayType->getKeyTypes() as $arrayKeyType) {
                foreach ($arrayKeyType->getConstantStrings() as $constantString) {
                    $patternStrings[] = $constantString->getValue();
                }
            }
        }
        return $patternStrings;
    }
    private function validatePattern(string $pattern) : ?string
    {
        try {
            Strings::match('', $pattern);
        } catch (RegexpException $e) {
            return $e->getMessage();
        }
        return null;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use PhpParser\Node;
use PhpParser\Node\Expr\Closure;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\FunctionDefinitionCheck;
use PHPStan\Rules\Rule;
/**
 * @implements Rule<Node\Expr\Closure>
 */
class ExistingClassesInClosureTypehintsRule implements Rule
{
    /**
     * @var \PHPStan\Rules\FunctionDefinitionCheck
     */
    private $check;
    public function __construct(FunctionDefinitionCheck $check)
    {
        $this->check = $check;
    }
    public function getNodeType() : string
    {
        return Closure::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        return $this->check->checkAnonymousFunction($scope, $node->getParams(), $node->getReturnType(), 'Parameter $%s of anonymous function has invalid type %s.', 'Anonymous function has invalid return type %s.', 'Anonymous function uses native union types but they\'re supported only on PHP 8.0 and later.', 'Parameter $%s of anonymous function has unresolvable native type.', 'Anonymous function has unresolvable native return type.');
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use PhpParser\Node;
use PHPStan\Analyser\NullsafeOperatorHelper;
use PHPStan\Analyser\Scope;
use PHPStan\Node\FunctionCallableNode;
use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use function sprintf;
use function strtolower;
/**
 * @implements Rule<FunctionCallableNode>
 */
class FunctionCallableRule implements Rule
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    /**
     * @var bool
     */
    private $checkFunctionNameCase;
    /**
     * @var bool
     */
    private $reportMaybes;
    public function __construct(ReflectionProvider $reflectionProvider, RuleLevelHelper $ruleLevelHelper, PhpVersion $phpVersion, bool $checkFunctionNameCase, bool $reportMaybes)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->ruleLevelHelper = $ruleLevelHelper;
        $this->phpVersion = $phpVersion;
        $this->checkFunctionNameCase = $checkFunctionNameCase;
        $this->reportMaybes = $reportMaybes;
    }
    public function getNodeType() : string
    {
        return FunctionCallableNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$this->phpVersion->supportsFirstClassCallables()) {
            return [RuleErrorBuilder::message('First-class callables are supported only on PHP 8.1 and later.')->nonIgnorable()->build()];
        }
        $functionName = $node->getName();
        if ($functionName instanceof Node\Name) {
            $functionNameName = $functionName->toString();
            if ($this->reflectionProvider->hasFunction($functionName, $scope)) {
                if ($this->checkFunctionNameCase) {
                    $function = $this->reflectionProvider->getFunction($functionName, $scope);
                    /** @var string $calledFunctionName */
                    $calledFunctionName = $this->reflectionProvider->resolveFunctionName($functionName, $scope);
                    if (strtolower($function->getName()) === strtolower($calledFunctionName) && $function->getName() !== $calledFunctionName) {
                        return [RuleErrorBuilder::message(sprintf('Call to function %s() with incorrect case: %s', $function->getName(), $functionNameName))->build()];
                    }
                }
                return [];
            }
            if ($scope->isInFunctionExists($functionNameName)) {
                return [];
            }
            return [RuleErrorBuilder::message(sprintf('Function %s not found.', $functionNameName))->build()];
        }
        $typeResult = $this->ruleLevelHelper->findTypeToCheck($scope, NullsafeOperatorHelper::getNullsafeShortcircuitedExprRespectingScope($scope, $functionName), 'Creating callable from an unknown class %s.', static function (Type $type) : bool {
            return $type->isCallable()->yes();
        });
        $type = $typeResult->getType();
        if ($type instanceof ErrorType) {
            return $typeResult->getUnknownClassErrors();
        }
        $isCallable = $type->isCallable();
        if ($isCallable->no()) {
            return [RuleErrorBuilder::message(sprintf('Creating callable from %s but it\'s not a callable.', $type->describe(VerbosityLevel::value())))->build()];
        }
        if ($this->reportMaybes && $isCallable->maybe()) {
            return [RuleErrorBuilder::message(sprintf('Creating callable from %s but it might not be a callable.', $type->describe(VerbosityLevel::value())))->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\ClosureReturnStatementsNode;
use PHPStan\Rules\FunctionReturnTypeCheck;
use PHPStan\Rules\Rule;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
/**
 * @implements Rule<ClosureReturnStatementsNode>
 */
class ClosureReturnTypeRule implements Rule
{
    /**
     * @var \PHPStan\Rules\FunctionReturnTypeCheck
     */
    private $returnTypeCheck;
    public function __construct(FunctionReturnTypeCheck $returnTypeCheck)
    {
        $this->returnTypeCheck = $returnTypeCheck;
    }
    public function getNodeType() : string
    {
        return ClosureReturnStatementsNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$scope->isInAnonymousFunction()) {
            return [];
        }
        /** @var Type $returnType */
        $returnType = $scope->getAnonymousFunctionReturnType();
        $containsNull = TypeCombinator::containsNull($returnType);
        $hasNativeTypehint = $node->getClosureExpr()->returnType !== null;
        $messages = [];
        foreach ($node->getReturnStatements() as $returnStatement) {
            $returnNode = $returnStatement->getReturnNode();
            $returnExpr = $returnNode->expr;
            if ($returnExpr === null && $containsNull && !$hasNativeTypehint) {
                $returnExpr = new Node\Expr\ConstFetch(new Node\Name\FullyQualified('null'));
            }
            $returnMessages = $this->returnTypeCheck->checkReturnType($returnStatement->getScope(), $returnType, $returnExpr, $returnNode, 'Anonymous function should return %s but empty return statement found.', 'Anonymous function with return type void returns %s but should not return anything.', 'Anonymous function should return %s but returns %s.', 'Anonymous function should never return but return statement found.', $node->isGenerator());
            foreach ($returnMessages as $returnMessage) {
                $messages[] = $returnMessage;
            }
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use Attribute;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\AttributesCheck;
use PHPStan\Rules\Rule;
/**
 * @implements Rule<Node\Expr\ArrowFunction>
 */
class ArrowFunctionAttributesRule implements Rule
{
    /**
     * @var \PHPStan\Rules\AttributesCheck
     */
    private $attributesCheck;
    public function __construct(AttributesCheck $attributesCheck)
    {
        $this->attributesCheck = $attributesCheck;
    }
    public function getNodeType() : string
    {
        return Node\Expr\ArrowFunction::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        return $this->attributesCheck->check($scope, $node->attrGroups, Attribute::TARGET_FUNCTION, 'function');
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\ReturnStatementsNode;
use PHPStan\Rules\NullsafeCheck;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
/**
 * @implements Rule<ReturnStatementsNode>
 */
class ReturnNullsafeByRefRule implements Rule
{
    /**
     * @var \PHPStan\Rules\NullsafeCheck
     */
    private $nullsafeCheck;
    public function __construct(NullsafeCheck $nullsafeCheck)
    {
        $this->nullsafeCheck = $nullsafeCheck;
    }
    public function getNodeType() : string
    {
        return ReturnStatementsNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->returnsByRef()) {
            return [];
        }
        $errors = [];
        foreach ($node->getReturnStatements() as $returnStatement) {
            $returnNode = $returnStatement->getReturnNode();
            if ($returnNode->expr === null) {
                continue;
            }
            if (!$this->nullsafeCheck->containsNullSafe($returnNode->expr)) {
                continue;
            }
            $errors[] = RuleErrorBuilder::message('Nullsafe cannot be returned by reference.')->line($returnNode->getLine())->nonIgnorable()->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InArrowFunctionNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Generic\TemplateTypeHelper;
use PHPStan\Type\VerbosityLevel;
use function is_string;
use function sprintf;
/**
 * @implements Rule<InArrowFunctionNode>
 */
class IncompatibleArrowFunctionDefaultParameterTypeRule implements Rule
{
    public function getNodeType() : string
    {
        return InArrowFunctionNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $parameters = $node->getClosureType()->getParameters();
        $errors = [];
        foreach ($node->getOriginalNode()->getParams() as $paramI => $param) {
            if ($param->default === null) {
                continue;
            }
            if ($param->var instanceof Node\Expr\Error || !is_string($param->var->name)) {
                throw new ShouldNotHappenException();
            }
            $defaultValueType = $scope->getType($param->default);
            $parameterType = $parameters[$paramI]->getType();
            $parameterType = TemplateTypeHelper::resolveToBounds($parameterType);
            $accepts = $parameterType->acceptsWithReason($defaultValueType, \true);
            if ($accepts->yes()) {
                continue;
            }
            $verbosityLevel = VerbosityLevel::getRecommendedLevelByType($parameterType, $defaultValueType);
            $errors[] = RuleErrorBuilder::message(sprintf('Default value of the parameter #%d $%s (%s) of anonymous function is incompatible with type %s.', $paramI + 1, $param->var->name, $defaultValueType->describe($verbosityLevel), $parameterType->describe($verbosityLevel)))->line($param->getLine())->acceptsReasonsTip($accepts->reasons)->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use Attribute;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\AttributesCheck;
use PHPStan\Rules\Rule;
/**
 * @implements Rule<Node\Expr\Closure>
 */
class ClosureAttributesRule implements Rule
{
    /**
     * @var \PHPStan\Rules\AttributesCheck
     */
    private $attributesCheck;
    public function __construct(AttributesCheck $attributesCheck)
    {
        $this->attributesCheck = $attributesCheck;
    }
    public function getNodeType() : string
    {
        return Node\Expr\Closure::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        return $this->attributesCheck->check($scope, $node->attrGroups, Attribute::TARGET_FUNCTION, 'function');
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use Attribute;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\AttributesCheck;
use PHPStan\Rules\Rule;
/**
 * @implements Rule<Node\Stmt\Function_>
 */
class FunctionAttributesRule implements Rule
{
    /**
     * @var \PHPStan\Rules\AttributesCheck
     */
    private $attributesCheck;
    public function __construct(AttributesCheck $attributesCheck)
    {
        $this->attributesCheck = $attributesCheck;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\Function_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        return $this->attributesCheck->check($scope, $node->attrGroups, Attribute::TARGET_FUNCTION, 'function');
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use PhpParser\Node;
use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\FunctionCallParametersCheck;
use PHPStan\Rules\Rule;
/**
 * @implements Rule<Node\Expr\FuncCall>
 */
class CallToFunctionParametersRule implements Rule
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Rules\FunctionCallParametersCheck
     */
    private $check;
    public function __construct(ReflectionProvider $reflectionProvider, FunctionCallParametersCheck $check)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->check = $check;
    }
    public function getNodeType() : string
    {
        return FuncCall::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->name instanceof Node\Name) {
            return [];
        }
        if (!$this->reflectionProvider->hasFunction($node->name, $scope)) {
            return [];
        }
        $function = $this->reflectionProvider->getFunction($node->name, $scope);
        $functionName = SprintfHelper::escapeFormatString($function->getName());
        return $this->check->check(ParametersAcceptorSelector::selectFromArgs($scope, $node->getArgs(), $function->getVariants()), $scope, $function->isBuiltin(), $node, ['Function ' . $functionName . ' invoked with %d parameter, %d required.', 'Function ' . $functionName . ' invoked with %d parameters, %d required.', 'Function ' . $functionName . ' invoked with %d parameter, at least %d required.', 'Function ' . $functionName . ' invoked with %d parameters, at least %d required.', 'Function ' . $functionName . ' invoked with %d parameter, %d-%d required.', 'Function ' . $functionName . ' invoked with %d parameters, %d-%d required.', 'Parameter %s of function ' . $functionName . ' expects %s, %s given.', 'Result of function ' . $functionName . ' (void) is used.', 'Parameter %s of function ' . $functionName . ' is passed by reference, so it expects variables only.', 'Unable to resolve the template type %s in call to function ' . $functionName, 'Missing parameter $%s in call to function ' . $functionName . '.', 'Unknown parameter $%s in call to function ' . $functionName . '.', 'Return type of call to function ' . $functionName . ' contains unresolvable type.', 'Parameter %s of function ' . $functionName . ' contains unresolvable type.']);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use PhpParser\Node;
use PhpParser\Node\Stmt\Function_;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
/**
 * @implements Rule<Node\Stmt\Function_>
 */
class InnerFunctionRule implements Rule
{
    public function getNodeType() : string
    {
        return Function_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if ($scope->getFunction() === null) {
            return [];
        }
        return [RuleErrorBuilder::message('Inner named functions are not supported by PHPStan. Consider refactoring to an anonymous function, class method, or a top-level-defined function. See issue #165 (https://github.com/phpstan/phpstan/issues/165) for more details.')->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\BetterReflection\Reflection\ReflectionFunction;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\File\RelativePathHelper;
use PHPStan\Node\InFunctionNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function array_map;
use function count;
use function implode;
use function sprintf;
/**
 * @implements Rule<InFunctionNode>
 */
class DuplicateFunctionDeclarationRule implements Rule
{
    /**
     * @var \PHPStan\BetterReflection\Reflector\Reflector
     */
    private $reflector;
    /**
     * @var \PHPStan\File\RelativePathHelper
     */
    private $relativePathHelper;
    public function __construct(Reflector $reflector, RelativePathHelper $relativePathHelper)
    {
        $this->reflector = $reflector;
        $this->relativePathHelper = $relativePathHelper;
    }
    public function getNodeType() : string
    {
        return InFunctionNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $thisFunction = $node->getFunctionReflection();
        $allFunctions = $this->reflector->reflectAllFunctions();
        $filteredFunctions = [];
        foreach ($allFunctions as $reflectionFunction) {
            if ($reflectionFunction->getName() !== $thisFunction->getName()) {
                continue;
            }
            $filteredFunctions[] = $reflectionFunction;
        }
        if (count($filteredFunctions) < 2) {
            return [];
        }
        return [RuleErrorBuilder::message(sprintf("Function %s declared multiple times:\n%s", $thisFunction->getName(), implode("\n", array_map(function (ReflectionFunction $function) {
            return sprintf('- %s:%d', $this->relativePathHelper->getRelativePath($function->getFileName() ?? 'unknown'), $function->getStartLine());
        }, $filteredFunctions))))->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use PhpParser\Node;
use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use function count;
use function in_array;
use function sprintf;
/**
 * @implements Rule<Node\Expr\FuncCall>
 */
class ImplodeFunctionRule implements Rule
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    public function __construct(ReflectionProvider $reflectionProvider, RuleLevelHelper $ruleLevelHelper)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->ruleLevelHelper = $ruleLevelHelper;
    }
    public function getNodeType() : string
    {
        return FuncCall::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->name instanceof Node\Name) {
            return [];
        }
        $functionName = $this->reflectionProvider->resolveFunctionName($node->name, $scope);
        if (!in_array($functionName, ['implode', 'join'], \true)) {
            return [];
        }
        $args = $node->getArgs();
        if (count($args) === 1) {
            $arrayArg = $args[0]->value;
            $paramNo = 1;
        } elseif (count($args) === 2) {
            $arrayArg = $args[1]->value;
            $paramNo = 2;
        } else {
            return [];
        }
        $typeResult = $this->ruleLevelHelper->findTypeToCheck($scope, $arrayArg, '', static function (Type $type) : bool {
            return !$type->getIterableValueType()->toString() instanceof ErrorType;
        });
        if ($typeResult->getType() instanceof ErrorType || !$typeResult->getType()->getIterableValueType()->toString() instanceof ErrorType) {
            return [];
        }
        return [RuleErrorBuilder::message(sprintf('Parameter #%d $array of function %s expects array<string>, %s given.', $paramNo, $functionName, $typeResult->getType()->describe(VerbosityLevel::typeOnly())))->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use PhpParser\Node;
use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Php\PhpVersion;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function count;
use function strtolower;
/**
 * @implements Rule<Node\Expr\FuncCall>
 */
class DefineParametersRule implements Rule
{
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
    }
    public function getNodeType() : string
    {
        return FuncCall::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->name instanceof Node\Name) {
            return [];
        }
        if ($this->phpVersion->supportsCaseInsensitiveConstantNames()) {
            return [];
        }
        $name = strtolower((string) $node->name);
        if ($name !== 'define') {
            return [];
        }
        $args = $node->getArgs();
        $argsCount = count($args);
        // Expects 2 or 3, 1 arg is caught by CallToFunctionParametersRule
        if ($argsCount < 3) {
            return [];
        }
        return [RuleErrorBuilder::message('Argument #3 ($case_insensitive) is ignored since declaration of case-insensitive constants is no longer supported.')->line($node->getLine())->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use Generator;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InArrowFunctionNode;
use PHPStan\Rules\FunctionReturnTypeCheck;
use PHPStan\Rules\Rule;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use PHPStan\Type\VoidType;
/**
 * @implements Rule<InArrowFunctionNode>
 */
class ArrowFunctionReturnTypeRule implements Rule
{
    /**
     * @var \PHPStan\Rules\FunctionReturnTypeCheck
     */
    private $returnTypeCheck;
    public function __construct(FunctionReturnTypeCheck $returnTypeCheck)
    {
        $this->returnTypeCheck = $returnTypeCheck;
    }
    public function getNodeType() : string
    {
        return InArrowFunctionNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$scope->isInAnonymousFunction()) {
            throw new ShouldNotHappenException();
        }
        /** @var Type $returnType */
        $returnType = $scope->getAnonymousFunctionReturnType();
        $generatorType = new ObjectType(Generator::class);
        $originalNode = $node->getOriginalNode();
        $isVoidSuperType = (new VoidType())->isSuperTypeOf($returnType);
        if ($originalNode->returnType === null && $isVoidSuperType->yes()) {
            return [];
        }
        return $this->returnTypeCheck->checkReturnType($scope, $returnType, $originalNode->expr, $originalNode->expr, 'Anonymous function should return %s but empty return statement found.', 'Anonymous function with return type void returns %s but should not return anything.', 'Anonymous function should return %s but returns %s.', 'Anonymous function should never return but return statement found.', $generatorType->isSuperTypeOf($returnType)->yes());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InFunctionNode;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Rules\MissingTypehintCheck;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\MixedType;
use PHPStan\Type\VerbosityLevel;
use function implode;
use function sprintf;
/**
 * @implements Rule<InFunctionNode>
 */
final class MissingFunctionReturnTypehintRule implements Rule
{
    /**
     * @var \PHPStan\Rules\MissingTypehintCheck
     */
    private $missingTypehintCheck;
    public function __construct(MissingTypehintCheck $missingTypehintCheck)
    {
        $this->missingTypehintCheck = $missingTypehintCheck;
    }
    public function getNodeType() : string
    {
        return InFunctionNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $functionReflection = $node->getFunctionReflection();
        $returnType = ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType();
        if ($returnType instanceof MixedType && !$returnType->isExplicitMixed()) {
            return [RuleErrorBuilder::message(sprintf('Function %s() has no return type specified.', $functionReflection->getName()))->build()];
        }
        $messages = [];
        foreach ($this->missingTypehintCheck->getIterableTypesWithMissingValueTypehint($returnType) as $iterableType) {
            $iterableTypeDescription = $iterableType->describe(VerbosityLevel::typeOnly());
            $messages[] = RuleErrorBuilder::message(sprintf('Function %s() return type has no value type specified in iterable type %s.', $functionReflection->getName(), $iterableTypeDescription))->tip(MissingTypehintCheck::MISSING_ITERABLE_VALUE_TYPE_TIP)->build();
        }
        foreach ($this->missingTypehintCheck->getNonGenericObjectTypesWithGenericClass($returnType) as [$name, $genericTypeNames]) {
            $messages[] = RuleErrorBuilder::message(sprintf('Function %s() return type with generic %s does not specify its types: %s', $functionReflection->getName(), $name, implode(', ', $genericTypeNames)))->tip(MissingTypehintCheck::TURN_OFF_NON_GENERIC_CHECK_TIP)->build();
        }
        foreach ($this->missingTypehintCheck->getCallablesWithMissingSignature($returnType) as $callableType) {
            $messages[] = RuleErrorBuilder::message(sprintf('Function %s() return type has no signature specified for %s.', $functionReflection->getName(), $callableType->describe(VerbosityLevel::typeOnly())))->build();
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use PhpParser\Node;
use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\StaticTypeFactory;
use PHPStan\Type\VerbosityLevel;
use function count;
use function sprintf;
use function strtolower;
/**
 * @implements Rule<Node\Expr\FuncCall>
 */
class ArrayFilterRule implements Rule
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var bool
     */
    private $treatPhpDocTypesAsCertain;
    public function __construct(ReflectionProvider $reflectionProvider, bool $treatPhpDocTypesAsCertain)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->treatPhpDocTypesAsCertain = $treatPhpDocTypesAsCertain;
    }
    public function getNodeType() : string
    {
        return FuncCall::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->name instanceof Node\Name) {
            return [];
        }
        $functionName = $this->reflectionProvider->resolveFunctionName($node->name, $scope);
        if ($functionName === null || strtolower($functionName) !== 'array_filter') {
            return [];
        }
        $args = $node->getArgs();
        if (count($args) !== 1) {
            return [];
        }
        if ($this->treatPhpDocTypesAsCertain) {
            $arrayType = $scope->getType($args[0]->value);
        } else {
            $arrayType = $scope->getNativeType($args[0]->value);
        }
        if ($arrayType->isIterableAtLeastOnce()->no()) {
            $message = 'Parameter #1 $array (%s) to function array_filter is empty, call has no effect.';
            return [RuleErrorBuilder::message(sprintf($message, $arrayType->describe(VerbosityLevel::value())))->build()];
        }
        $falsyType = StaticTypeFactory::falsey();
        $isSuperType = $falsyType->isSuperTypeOf($arrayType->getIterableValueType());
        if ($isSuperType->no()) {
            $message = 'Parameter #1 $array (%s) to function array_filter does not contain falsy values, the array will always stay the same.';
            return [RuleErrorBuilder::message(sprintf($message, $arrayType->describe(VerbosityLevel::value())))->build()];
        }
        if ($isSuperType->yes()) {
            $message = 'Parameter #1 $array (%s) to function array_filter contains falsy values only, the result will always be an empty array.';
            return [RuleErrorBuilder::message(sprintf($message, $arrayType->describe(VerbosityLevel::value())))->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\UnusedFunctionParametersCheck;
use PHPStan\ShouldNotHappenException;
use function array_map;
use function count;
use function is_string;
/**
 * @implements Rule<Node\Expr\Closure>
 */
class UnusedClosureUsesRule implements Rule
{
    /**
     * @var \PHPStan\Rules\UnusedFunctionParametersCheck
     */
    private $check;
    public function __construct(UnusedFunctionParametersCheck $check)
    {
        $this->check = $check;
    }
    public function getNodeType() : string
    {
        return Node\Expr\Closure::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (count($node->uses) === 0) {
            return [];
        }
        return $this->check->getUnusedParameters($scope, array_map(static function (Node\Expr\ClosureUse $use) : string {
            if (!is_string($use->var->name)) {
                throw new ShouldNotHappenException();
            }
            return $use->var->name;
        }, $node->uses), $node->stmts, 'Anonymous function has an unused use $%s.', 'anonymousFunction.unusedUse', ['statementDepth' => $node->getAttribute('statementDepth'), 'statementOrder' => $node->getAttribute('statementOrder'), 'depth' => $node->getAttribute('expressionDepth'), 'order' => $node->getAttribute('expressionOrder')]);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\FunctionDefinitionCheck;
use PHPStan\Rules\Rule;
/**
 * @implements Rule<Node\Expr\ArrowFunction>
 */
class ExistingClassesInArrowFunctionTypehintsRule implements Rule
{
    /**
     * @var \PHPStan\Rules\FunctionDefinitionCheck
     */
    private $check;
    public function __construct(FunctionDefinitionCheck $check)
    {
        $this->check = $check;
    }
    public function getNodeType() : string
    {
        return Node\Expr\ArrowFunction::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        return $this->check->checkAnonymousFunction($scope, $node->getParams(), $node->getReturnType(), 'Parameter $%s of anonymous function has invalid type %s.', 'Anonymous function has invalid return type %s.', 'Anonymous function uses native union types but they\'re supported only on PHP 8.0 and later.', 'Parameter $%s of anonymous function has unresolvable native type.', 'Anonymous function has unresolvable native return type.');
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use PhpParser\Node;
use PhpParser\Node\Stmt\Return_;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Reflection\Php\PhpFunctionFromParserNodeReflection;
use PHPStan\Reflection\Php\PhpMethodFromParserNodeReflection;
use PHPStan\Rules\FunctionReturnTypeCheck;
use PHPStan\Rules\Rule;
use function sprintf;
/**
 * @implements Rule<Node\Stmt\Return_>
 */
class ReturnTypeRule implements Rule
{
    /**
     * @var \PHPStan\Rules\FunctionReturnTypeCheck
     */
    private $returnTypeCheck;
    public function __construct(FunctionReturnTypeCheck $returnTypeCheck)
    {
        $this->returnTypeCheck = $returnTypeCheck;
    }
    public function getNodeType() : string
    {
        return Return_::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if ($scope->getFunction() === null) {
            return [];
        }
        if ($scope->isInAnonymousFunction()) {
            return [];
        }
        $function = $scope->getFunction();
        if (!$function instanceof PhpFunctionFromParserNodeReflection || $function instanceof PhpMethodFromParserNodeReflection) {
            return [];
        }
        return $this->returnTypeCheck->checkReturnType($scope, ParametersAcceptorSelector::selectSingle($function->getVariants())->getReturnType(), $node->expr, $node, sprintf('Function %s() should return %%s but empty return statement found.', $function->getName()), sprintf('Function %s() with return type void returns %%s but should not return anything.', $function->getName()), sprintf('Function %s() should return %%s but returns %%s.', $function->getName()), sprintf('Function %s() should never return but return statement found.', $function->getName()), $function->isGenerator());
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InFunctionNode;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParameterReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Rules\MissingTypehintCheck;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\MixedType;
use PHPStan\Type\VerbosityLevel;
use function implode;
use function sprintf;
/**
 * @implements Rule<InFunctionNode>
 */
final class MissingFunctionParameterTypehintRule implements Rule
{
    /**
     * @var \PHPStan\Rules\MissingTypehintCheck
     */
    private $missingTypehintCheck;
    public function __construct(MissingTypehintCheck $missingTypehintCheck)
    {
        $this->missingTypehintCheck = $missingTypehintCheck;
    }
    public function getNodeType() : string
    {
        return InFunctionNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $functionReflection = $node->getFunctionReflection();
        $messages = [];
        foreach (ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getParameters() as $parameterReflection) {
            foreach ($this->checkFunctionParameter($functionReflection, $parameterReflection) as $parameterMessage) {
                $messages[] = $parameterMessage;
            }
        }
        return $messages;
    }
    /**
     * @return RuleError[]
     */
    private function checkFunctionParameter(FunctionReflection $functionReflection, ParameterReflection $parameterReflection) : array
    {
        $parameterType = $parameterReflection->getType();
        if ($parameterType instanceof MixedType && !$parameterType->isExplicitMixed()) {
            return [RuleErrorBuilder::message(sprintf('Function %s() has parameter $%s with no type specified.', $functionReflection->getName(), $parameterReflection->getName()))->build()];
        }
        $messages = [];
        foreach ($this->missingTypehintCheck->getIterableTypesWithMissingValueTypehint($parameterType) as $iterableType) {
            $iterableTypeDescription = $iterableType->describe(VerbosityLevel::typeOnly());
            $messages[] = RuleErrorBuilder::message(sprintf('Function %s() has parameter $%s with no value type specified in iterable type %s.', $functionReflection->getName(), $parameterReflection->getName(), $iterableTypeDescription))->tip(MissingTypehintCheck::MISSING_ITERABLE_VALUE_TYPE_TIP)->build();
        }
        foreach ($this->missingTypehintCheck->getNonGenericObjectTypesWithGenericClass($parameterType) as [$name, $genericTypeNames]) {
            $messages[] = RuleErrorBuilder::message(sprintf('Function %s() has parameter $%s with generic %s but does not specify its types: %s', $functionReflection->getName(), $parameterReflection->getName(), $name, implode(', ', $genericTypeNames)))->tip(MissingTypehintCheck::TURN_OFF_NON_GENERIC_CHECK_TIP)->build();
        }
        foreach ($this->missingTypehintCheck->getCallablesWithMissingSignature($parameterType) as $callableType) {
            $messages[] = RuleErrorBuilder::message(sprintf('Function %s() has parameter $%s with no signature specified for %s.', $functionReflection->getName(), $parameterReflection->getName(), $callableType->describe(VerbosityLevel::typeOnly())))->build();
        }
        return $messages;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\NullsafeCheck;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
/**
 * @implements Rule<Node\Expr\ArrowFunction>
 */
class ArrowFunctionReturnNullsafeByRefRule implements Rule
{
    /**
     * @var \PHPStan\Rules\NullsafeCheck
     */
    private $nullsafeCheck;
    public function __construct(NullsafeCheck $nullsafeCheck)
    {
        $this->nullsafeCheck = $nullsafeCheck;
    }
    public function getNodeType() : string
    {
        return Node\Expr\ArrowFunction::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->byRef) {
            return [];
        }
        if (!$this->nullsafeCheck->containsNullSafe($node->expr)) {
            return [];
        }
        return [RuleErrorBuilder::message('Nullsafe cannot be returned by reference.')->nonIgnorable()->build()];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use Attribute;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\AttributesCheck;
use PHPStan\Rules\Rule;
use function count;
/**
 * @implements Rule<Node\Param>
 */
class ParamAttributesRule implements Rule
{
    /**
     * @var \PHPStan\Rules\AttributesCheck
     */
    private $attributesCheck;
    public function __construct(AttributesCheck $attributesCheck)
    {
        $this->attributesCheck = $attributesCheck;
    }
    public function getNodeType() : string
    {
        return Node\Param::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $targetName = 'parameter';
        if ($node->flags !== 0) {
            $targetName = 'parameter or property';
            $propertyTargetErrors = $this->attributesCheck->check($scope, $node->attrGroups, Attribute::TARGET_PROPERTY, $targetName);
            if (count($propertyTargetErrors) === 0) {
                return $propertyTargetErrors;
            }
        }
        return $this->attributesCheck->check($scope, $node->attrGroups, Attribute::TARGET_PARAMETER, $targetName);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Node\InFunctionNode;
use PHPStan\Rules\FunctionDefinitionCheck;
use PHPStan\Rules\Rule;
use function sprintf;
/**
 * @implements Rule<InFunctionNode>
 */
class ExistingClassesInTypehintsRule implements Rule
{
    /**
     * @var \PHPStan\Rules\FunctionDefinitionCheck
     */
    private $check;
    public function __construct(FunctionDefinitionCheck $check)
    {
        $this->check = $check;
    }
    public function getNodeType() : string
    {
        return InFunctionNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $functionName = SprintfHelper::escapeFormatString($node->getFunctionReflection()->getName());
        return $this->check->checkFunction($node->getOriginalNode(), $node->getFunctionReflection(), sprintf('Parameter $%%s of function %s() has invalid type %%s.', $functionName), sprintf('Function %s() has invalid return type %%s.', $functionName), sprintf('Function %s() uses native union types but they\'re supported only on PHP 8.0 and later.', $functionName), sprintf('Template type %%s of function %s() is not referenced in a parameter.', $functionName), sprintf('Parameter $%%s of function %s() has unresolvable native type.', $functionName), sprintf('Function %s() has unresolvable native return type.', $functionName));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use PhpParser\Node;
use PHPStan\Analyser\NullsafeOperatorHelper;
use PHPStan\Analyser\Scope;
use PHPStan\Internal\SprintfHelper;
use PHPStan\Reflection\InaccessibleMethod;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Rules\FunctionCallParametersCheck;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Type\ClosureType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
use function array_merge;
use function count;
use function sprintf;
use function ucfirst;
/**
 * @implements Rule<Node\Expr\FuncCall>
 */
class CallCallablesRule implements Rule
{
    /**
     * @var \PHPStan\Rules\FunctionCallParametersCheck
     */
    private $check;
    /**
     * @var \PHPStan\Rules\RuleLevelHelper
     */
    private $ruleLevelHelper;
    /**
     * @var bool
     */
    private $reportMaybes;
    public function __construct(FunctionCallParametersCheck $check, RuleLevelHelper $ruleLevelHelper, bool $reportMaybes)
    {
        $this->check = $check;
        $this->ruleLevelHelper = $ruleLevelHelper;
        $this->reportMaybes = $reportMaybes;
    }
    public function getNodeType() : string
    {
        return Node\Expr\FuncCall::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->name instanceof Node\Expr) {
            return [];
        }
        $typeResult = $this->ruleLevelHelper->findTypeToCheck($scope, NullsafeOperatorHelper::getNullsafeShortcircuitedExprRespectingScope($scope, $node->name), 'Invoking callable on an unknown class %s.', static function (Type $type) : bool {
            return $type->isCallable()->yes();
        });
        $type = $typeResult->getType();
        if ($type instanceof ErrorType) {
            return $typeResult->getUnknownClassErrors();
        }
        $isCallable = $type->isCallable();
        if ($isCallable->no()) {
            return [RuleErrorBuilder::message(sprintf('Trying to invoke %s but it\'s not a callable.', $type->describe(VerbosityLevel::value())))->build()];
        }
        if ($this->reportMaybes && $isCallable->maybe()) {
            return [RuleErrorBuilder::message(sprintf('Trying to invoke %s but it might not be a callable.', $type->describe(VerbosityLevel::value())))->build()];
        }
        $parametersAcceptors = $type->getCallableParametersAcceptors($scope);
        $messages = [];
        if (count($parametersAcceptors) === 1 && $parametersAcceptors[0] instanceof InaccessibleMethod) {
            $method = $parametersAcceptors[0]->getMethod();
            $messages[] = RuleErrorBuilder::message(sprintf('Call to %s method %s() of class %s.', $method->isPrivate() ? 'private' : 'protected', $method->getName(), $method->getDeclaringClass()->getDisplayName()))->build();
        }
        $parametersAcceptor = ParametersAcceptorSelector::selectFromArgs($scope, $node->getArgs(), $parametersAcceptors);
        if ($type instanceof ClosureType) {
            $callableDescription = 'closure';
        } else {
            $callableDescription = sprintf('callable %s', SprintfHelper::escapeFormatString($type->describe(VerbosityLevel::value())));
        }
        return array_merge($messages, $this->check->check($parametersAcceptor, $scope, \false, $node, [ucfirst($callableDescription) . ' invoked with %d parameter, %d required.', ucfirst($callableDescription) . ' invoked with %d parameters, %d required.', ucfirst($callableDescription) . ' invoked with %d parameter, at least %d required.', ucfirst($callableDescription) . ' invoked with %d parameters, at least %d required.', ucfirst($callableDescription) . ' invoked with %d parameter, %d-%d required.', ucfirst($callableDescription) . ' invoked with %d parameters, %d-%d required.', 'Parameter %s of ' . $callableDescription . ' expects %s, %s given.', 'Result of ' . $callableDescription . ' (void) is used.', 'Parameter %s of ' . $callableDescription . ' is passed by reference, so it expects variables only.', 'Unable to resolve the template type %s in call to ' . $callableDescription, 'Missing parameter $%s in call to ' . $callableDescription . '.', 'Unknown parameter $%s in call to ' . $callableDescription . '.', 'Return type of call to ' . $callableDescription . ' contains unresolvable type.', 'Parameter %s of ' . $callableDescription . ' contains unresolvable type.']));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use PhpParser\Node;
use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function sprintf;
use function strtolower;
/**
 * @implements Rule<Node\Expr\FuncCall>
 */
class CallToNonExistentFunctionRule implements Rule
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var bool
     */
    private $checkFunctionNameCase;
    public function __construct(ReflectionProvider $reflectionProvider, bool $checkFunctionNameCase)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->checkFunctionNameCase = $checkFunctionNameCase;
    }
    public function getNodeType() : string
    {
        return FuncCall::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->name instanceof Node\Name) {
            return [];
        }
        if (!$this->reflectionProvider->hasFunction($node->name, $scope)) {
            if ($scope->isInFunctionExists($node->name->toString())) {
                return [];
            }
            return [RuleErrorBuilder::message(sprintf('Function %s not found.', (string) $node->name))->discoveringSymbolsTip()->build()];
        }
        $function = $this->reflectionProvider->getFunction($node->name, $scope);
        $name = (string) $node->name;
        if ($this->checkFunctionNameCase) {
            /** @var string $calledFunctionName */
            $calledFunctionName = $this->reflectionProvider->resolveFunctionName($node->name, $scope);
            if (strtolower($function->getName()) === strtolower($calledFunctionName) && $function->getName() !== $calledFunctionName) {
                return [RuleErrorBuilder::message(sprintf('Call to function %s() with incorrect case: %s', $function->getName(), $name))->build()];
            }
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use PhpParser\Node;
use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\VerbosityLevel;
use function array_values;
use function count;
use function sprintf;
/**
 * @implements Rule<Node\Expr\FuncCall>
 */
class RandomIntParametersRule implements Rule
{
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    /**
     * @var bool
     */
    private $reportMaybes;
    public function __construct(ReflectionProvider $reflectionProvider, bool $reportMaybes)
    {
        $this->reflectionProvider = $reflectionProvider;
        $this->reportMaybes = $reportMaybes;
    }
    public function getNodeType() : string
    {
        return FuncCall::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->name instanceof Node\Name) {
            return [];
        }
        if ($this->reflectionProvider->resolveFunctionName($node->name, $scope) !== 'random_int') {
            return [];
        }
        $args = array_values($node->getArgs());
        if (count($args) < 2) {
            return [];
        }
        $minType = $scope->getType($args[0]->value)->toInteger();
        $maxType = $scope->getType($args[1]->value)->toInteger();
        if (!$minType instanceof ConstantIntegerType && !$minType instanceof IntegerRangeType || !$maxType instanceof ConstantIntegerType && !$maxType instanceof IntegerRangeType) {
            return [];
        }
        $isSmaller = $maxType->isSmallerThan($minType);
        if ($isSmaller->yes() || $isSmaller->maybe() && $this->reportMaybes) {
            $message = 'Parameter #1 $min (%s) of function random_int expects lower number than parameter #2 $max (%s).';
            return [RuleErrorBuilder::message(sprintf($message, $minType->describe(VerbosityLevel::value()), $maxType->describe(VerbosityLevel::value())))->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use PhpParser\Node;
use PhpParser\Node\Arg;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
use function in_array;
use function sprintf;
/**
 * @implements Rule<Node\Stmt\Expression>
 */
class CallToFunctionStatementWithoutSideEffectsRule implements Rule
{
    private const SIDE_EFFECT_FLIP_PARAMETERS = [
        // functionName => [name, pos, testName, defaultHasSideEffect]
        'file_get_contents' => ['context', 2, 'isNotNull', \false],
        'print_r' => ['return', 1, 'isTruthy', \true],
        'var_export' => ['return', 1, 'isTruthy', \true],
    ];
    /**
     * @var \PHPStan\Reflection\ReflectionProvider
     */
    private $reflectionProvider;
    public function __construct(ReflectionProvider $reflectionProvider)
    {
        $this->reflectionProvider = $reflectionProvider;
    }
    public function getNodeType() : string
    {
        return Node\Stmt\Expression::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->expr instanceof Node\Expr\FuncCall) {
            return [];
        }
        $funcCall = $node->expr;
        if (!$funcCall->name instanceof Node\Name) {
            return [];
        }
        if (!$this->reflectionProvider->hasFunction($funcCall->name, $scope)) {
            return [];
        }
        $function = $this->reflectionProvider->getFunction($funcCall->name, $scope);
        $functionName = $function->getName();
        $functionHasSideEffects = !$function->hasSideEffects()->no();
        if (in_array($functionName, ['PHPStan\\dumpType', 'PHPStan\\Testing\\assertType', 'PHPStan\\Testing\\assertNativeType', 'PHPStan\\Testing\\assertVariableCertainty'], \true)) {
            return [];
        }
        if (isset(self::SIDE_EFFECT_FLIP_PARAMETERS[$functionName])) {
            [$flipParameterName, $flipParameterPosition, $testName, $defaultHasSideEffect] = self::SIDE_EFFECT_FLIP_PARAMETERS[$functionName];
            $sideEffectFlipped = \false;
            $hasNamedParameter = \false;
            $checker = ['isNotNull' => static function (Type $type) {
                return $type->isNull()->no();
            }, 'isTruthy' => static function (Type $type) {
                return $type->toBoolean()->isTrue()->yes();
            }][$testName];
            foreach ($funcCall->getRawArgs() as $i => $arg) {
                if (!$arg instanceof Arg) {
                    return [];
                }
                $isFlipParameter = \false;
                if ($arg->name !== null) {
                    $hasNamedParameter = \true;
                    if ($arg->name->name === $flipParameterName) {
                        $isFlipParameter = \true;
                    }
                }
                if (!$hasNamedParameter && $i === $flipParameterPosition) {
                    $isFlipParameter = \true;
                }
                if ($isFlipParameter) {
                    $sideEffectFlipped = $checker($scope->getType($arg->value));
                    break;
                }
            }
            if ($sideEffectFlipped xor $defaultHasSideEffect) {
                return [];
            }
            $functionHasSideEffects = \false;
        }
        if (!$functionHasSideEffects || $node->expr->isFirstClassCallable()) {
            if (!$node->expr->isFirstClassCallable()) {
                $throwsType = $function->getThrowType();
                if ($throwsType !== null && !$throwsType->isVoid()->yes()) {
                    return [];
                }
            }
            $functionResult = $scope->getType($funcCall);
            if ($functionResult instanceof NeverType && $functionResult->isExplicit()) {
                return [];
            }
            return [RuleErrorBuilder::message(sprintf('Call to function %s() on a separate line has no effect.', $function->getName()))->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InFunctionNode;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Generic\TemplateTypeHelper;
use PHPStan\Type\VerbosityLevel;
use function is_string;
use function sprintf;
/**
 * @implements Rule<InFunctionNode>
 */
class IncompatibleDefaultParameterTypeRule implements Rule
{
    public function getNodeType() : string
    {
        return InFunctionNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $function = $node->getFunctionReflection();
        $parameters = ParametersAcceptorSelector::selectSingle($function->getVariants());
        $errors = [];
        foreach ($node->getOriginalNode()->getParams() as $paramI => $param) {
            if ($param->default === null) {
                continue;
            }
            if ($param->var instanceof Node\Expr\Error || !is_string($param->var->name)) {
                throw new ShouldNotHappenException();
            }
            $defaultValueType = $scope->getType($param->default);
            $parameterType = $parameters->getParameters()[$paramI]->getType();
            $parameterType = TemplateTypeHelper::resolveToBounds($parameterType);
            $accepts = $parameterType->acceptsWithReason($defaultValueType, \true);
            if ($accepts->yes()) {
                continue;
            }
            $verbosityLevel = VerbosityLevel::getRecommendedLevelByType($parameterType, $defaultValueType);
            $errors[] = RuleErrorBuilder::message(sprintf('Default value of the parameter #%d $%s (%s) of function %s() is incompatible with type %s.', $paramI + 1, $param->var->name, $defaultValueType->describe($verbosityLevel), $function->getName(), $parameterType->describe($verbosityLevel)))->line($param->getLine())->acceptsReasonsTip($accepts->reasons)->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InClosureNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Generic\TemplateTypeHelper;
use PHPStan\Type\VerbosityLevel;
use function is_string;
use function sprintf;
/**
 * @implements Rule<InClosureNode>
 */
class IncompatibleClosureDefaultParameterTypeRule implements Rule
{
    public function getNodeType() : string
    {
        return InClosureNode::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        $parameters = $node->getClosureType()->getParameters();
        $errors = [];
        foreach ($node->getOriginalNode()->getParams() as $paramI => $param) {
            if ($param->default === null) {
                continue;
            }
            if ($param->var instanceof Node\Expr\Error || !is_string($param->var->name)) {
                throw new ShouldNotHappenException();
            }
            $defaultValueType = $scope->getType($param->default);
            $parameterType = $parameters[$paramI]->getType();
            $parameterType = TemplateTypeHelper::resolveToBounds($parameterType);
            $accepts = $parameterType->acceptsWithReason($defaultValueType, \true);
            if ($accepts->yes()) {
                continue;
            }
            $verbosityLevel = VerbosityLevel::getRecommendedLevelByType($parameterType, $defaultValueType);
            $errors[] = RuleErrorBuilder::message(sprintf('Default value of the parameter #%d $%s (%s) of anonymous function is incompatible with type %s.', $paramI + 1, $param->var->name, $defaultValueType->describe($verbosityLevel), $parameterType->describe($verbosityLevel)))->line($param->getLine())->acceptsReasonsTip($accepts->reasons)->build();
        }
        return $errors;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Functions;

use _PHPStan_dcc7b7cff\Nette\Utils\Strings;
use PhpParser\Node;
use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Php\PhpVersion;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function array_filter;
use function count;
use function in_array;
use function max;
use function sprintf;
use function strlen;
use function strtolower;
use const PREG_SET_ORDER;
/**
 * @implements Rule<Node\Expr\FuncCall>
 */
class PrintfParametersRule implements Rule
{
    /**
     * @var \PHPStan\Php\PhpVersion
     */
    private $phpVersion;
    public function __construct(PhpVersion $phpVersion)
    {
        $this->phpVersion = $phpVersion;
    }
    public function getNodeType() : string
    {
        return FuncCall::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node->name instanceof Node\Name) {
            return [];
        }
        $functionsArgumentPositions = ['printf' => 0, 'sprintf' => 0, 'sscanf' => 1, 'fscanf' => 1];
        $minimumNumberOfArguments = ['printf' => 1, 'sprintf' => 1, 'sscanf' => 3, 'fscanf' => 3];
        $name = strtolower((string) $node->name);
        if (!isset($functionsArgumentPositions[$name])) {
            return [];
        }
        $formatArgumentPosition = $functionsArgumentPositions[$name];
        $args = $node->getArgs();
        foreach ($args as $arg) {
            if ($arg->unpack) {
                return [];
            }
        }
        $argsCount = count($args);
        if ($argsCount < $minimumNumberOfArguments[$name]) {
            return [];
            // caught by CallToFunctionParametersRule
        }
        $formatArgType = $scope->getType($args[$formatArgumentPosition]->value);
        $placeHoldersCount = null;
        foreach ($formatArgType->getConstantStrings() as $formatString) {
            $format = $formatString->getValue();
            $tempPlaceHoldersCount = $this->getPlaceholdersCount($name, $format);
            if ($placeHoldersCount === null) {
                $placeHoldersCount = $tempPlaceHoldersCount;
            } elseif ($tempPlaceHoldersCount > $placeHoldersCount) {
                $placeHoldersCount = $tempPlaceHoldersCount;
            }
        }
        if ($placeHoldersCount === null) {
            return [];
        }
        $argsCount -= $formatArgumentPosition;
        if ($argsCount !== $placeHoldersCount + 1) {
            return [RuleErrorBuilder::message(sprintf(sprintf('%s, %s.', $placeHoldersCount === 1 ? 'Call to %s contains %d placeholder' : 'Call to %s contains %d placeholders', $argsCount - 1 === 1 ? '%d value given' : '%d values given'), $name, $placeHoldersCount, $argsCount - 1))->build()];
        }
        return [];
    }
    private function getPlaceholdersCount(string $functionName, string $format) : int
    {
        $specifiers = in_array($functionName, ['sprintf', 'printf'], \true) ? '(?:[bs%s]|l?[cdeEgfFGouxX])' : '(?:[cdDeEfinosuxX%s]|\\[[^\\]]+\\])';
        $addSpecifier = '';
        if ($this->phpVersion->supportsHhPrintfSpecifier()) {
            $addSpecifier .= 'hH';
        }
        $specifiers = sprintf($specifiers, $addSpecifier);
        $pattern = '~(?<before>%*)%(?:(?<position>\\d+)\\$)?[-+]?(?:[ 0]|(?:\'[^%]))?-?\\d*(?:\\.\\d*)?' . $specifiers . '~';
        $matches = Strings::matchAll($format, $pattern, PREG_SET_ORDER);
        if (count($matches) === 0) {
            return 0;
        }
        $placeholders = array_filter($matches, static function (array $match) : bool {
            return strlen($match['before']) % 2 === 0;
        });
        if (count($placeholders) === 0) {
            return 0;
        }
        $maxPositionedNumber = 0;
        $maxOrdinaryNumber = 0;
        foreach ($placeholders as $placeholder) {
            if (isset($placeholder['position']) && $placeholder['position'] !== '') {
                $maxPositionedNumber = max((int) $placeholder['position'], $maxPositionedNumber);
            } else {
                $maxOrdinaryNumber++;
            }
        }
        return max($maxPositionedNumber, $maxOrdinaryNumber);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules;

/** @api */
interface LineRuleError extends \PHPStan\Rules\RuleError
{
    public function getLine() : int;
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules\Keywords;

use PhpParser\Node;
use PhpParser\Node\Stmt;
use PHPStan\Analyser\Scope;
use PHPStan\Parser\ParentStmtTypesVisitor;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function array_reverse;
use function sprintf;
/**
 * @implements Rule<Stmt>
 */
class ContinueBreakInLoopRule implements Rule
{
    public function getNodeType() : string
    {
        return Stmt::class;
    }
    public function processNode(Node $node, Scope $scope) : array
    {
        if (!$node instanceof Stmt\Continue_ && !$node instanceof Stmt\Break_) {
            return [];
        }
        if (!$node->num instanceof Node\Scalar\LNumber) {
            $value = 1;
        } else {
            $value = $node->num->value;
        }
        $parentStmtTypes = array_reverse($node->getAttribute(ParentStmtTypesVisitor::ATTRIBUTE_NAME));
        foreach ($parentStmtTypes as $parentStmtType) {
            if ($parentStmtType === Stmt\Case_::class) {
                continue;
            }
            if ($parentStmtType === Stmt\Function_::class || $parentStmtType === Stmt\ClassMethod::class || $parentStmtType === Node\Expr\Closure::class) {
                return [RuleErrorBuilder::message(sprintf('Keyword %s used outside of a loop or a switch statement.', $node instanceof Stmt\Continue_ ? 'continue' : 'break'))->nonIgnorable()->build()];
            }
            if ($parentStmtType === Stmt\For_::class || $parentStmtType === Stmt\Foreach_::class || $parentStmtType === Stmt\Do_::class || $parentStmtType === Stmt\While_::class || $parentStmtType === Stmt\Switch_::class) {
                $value--;
            }
            if ($value === 0) {
                break;
            }
        }
        if ($value > 0) {
            return [RuleErrorBuilder::message(sprintf('Keyword %s used outside of a loop or a switch statement.', $node instanceof Stmt\Continue_ ? 'continue' : 'break'))->nonIgnorable()->build()];
        }
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Rules;

/** @api */
interface MetadataRuleError extends \PHPStan\Rules\RuleError
{
    /**
     * @return mixed[]
     */
    public function getMetadata() : array;
}
<?php

declare (strict_types=1);
namespace PHPStan;

use Exception;
final class ShouldNotHappenException extends Exception
{
    /** @api */
    public function __construct(string $message = 'Internal error.')
    {
        parent::__construct($message);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Testing;

use PhpParser\Node;
use PHPStan\Analyser\Analyser;
use PHPStan\Analyser\Error;
use PHPStan\Analyser\FileAnalyser;
use PHPStan\Analyser\NodeScopeResolver;
use PHPStan\Analyser\RuleErrorTransformer;
use PHPStan\Analyser\ScopeContext;
use PHPStan\Analyser\TypeSpecifier;
use PHPStan\Collectors\Collector;
use PHPStan\Collectors\Registry as CollectorRegistry;
use PHPStan\Dependency\DependencyResolver;
use PHPStan\DependencyInjection\Type\DynamicThrowTypeExtensionProvider;
use PHPStan\File\FileHelper;
use PHPStan\Node\CollectedDataNode;
use PHPStan\Php\PhpVersion;
use PHPStan\PhpDoc\PhpDocInheritanceResolver;
use PHPStan\PhpDoc\StubPhpDocProvider;
use PHPStan\Reflection\InitializerExprTypeResolver;
use PHPStan\Rules\DirectRegistry as DirectRuleRegistry;
use PHPStan\Rules\Properties\DirectReadWritePropertiesExtensionProvider;
use PHPStan\Rules\Properties\ReadWritePropertiesExtension;
use PHPStan\Rules\Properties\ReadWritePropertiesExtensionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Type\FileTypeMapper;
use function array_map;
use function count;
use function implode;
use function sprintf;
/**
 * @api
 * @template TRule of Rule
 */
abstract class RuleTestCase extends \PHPStan\Testing\PHPStanTestCase
{
    /**
     * @var \PHPStan\Analyser\Analyser|null
     */
    private $analyser;
    /**
     * @phpstan-return TRule
     */
    protected abstract function getRule() : Rule;
    /**
     * @return array<Collector<Node, mixed>>
     */
    protected function getCollectors() : array
    {
        return [];
    }
    /**
     * @return ReadWritePropertiesExtension[]
     */
    protected function getReadWritePropertiesExtensions() : array
    {
        return [];
    }
    protected function getTypeSpecifier() : TypeSpecifier
    {
        return self::getContainer()->getService('typeSpecifier');
    }
    private function getAnalyser() : Analyser
    {
        if ($this->analyser === null) {
            $ruleRegistry = new DirectRuleRegistry([$this->getRule()]);
            $collectorRegistry = new CollectorRegistry($this->getCollectors());
            $reflectionProvider = $this->createReflectionProvider();
            $typeSpecifier = $this->getTypeSpecifier();
            $readWritePropertiesExtensions = $this->getReadWritePropertiesExtensions();
            $nodeScopeResolver = new NodeScopeResolver($reflectionProvider, self::getContainer()->getByType(InitializerExprTypeResolver::class), self::getReflector(), self::getClassReflectionExtensionRegistryProvider(), $this->getParser(), self::getContainer()->getByType(FileTypeMapper::class), self::getContainer()->getByType(StubPhpDocProvider::class), self::getContainer()->getByType(PhpVersion::class), self::getContainer()->getByType(PhpDocInheritanceResolver::class), self::getContainer()->getByType(FileHelper::class), $typeSpecifier, self::getContainer()->getByType(DynamicThrowTypeExtensionProvider::class), $readWritePropertiesExtensions !== [] ? new DirectReadWritePropertiesExtensionProvider($readWritePropertiesExtensions) : self::getContainer()->getByType(ReadWritePropertiesExtensionProvider::class), $this->shouldPolluteScopeWithLoopInitialAssignments(), $this->shouldPolluteScopeWithAlwaysIterableForeach(), [], [], \true, $this->shouldTreatPhpDocTypesAsCertain(), self::getContainer()->getParameter('featureToggles')['detectDeadTypeInMultiCatch']);
            $fileAnalyser = new FileAnalyser($this->createScopeFactory($reflectionProvider, $typeSpecifier), $nodeScopeResolver, $this->getParser(), self::getContainer()->getByType(DependencyResolver::class), new RuleErrorTransformer(), \true);
            $this->analyser = new Analyser($fileAnalyser, $ruleRegistry, $collectorRegistry, $nodeScopeResolver, 50);
        }
        return $this->analyser;
    }
    /**
     * @param string[] $files
     * @param list<array{0: string, 1: int, 2?: string}> $expectedErrors
     */
    public function analyse(array $files, array $expectedErrors) : void
    {
        $actualErrors = $this->gatherAnalyserErrors($files);
        $strictlyTypedSprintf = static function (int $line, string $message, ?string $tip) : string {
            $message = sprintf('%02d: %s', $line, $message);
            if ($tip !== null) {
                $message .= "\n    💡 " . $tip;
            }
            return $message;
        };
        $expectedErrors = array_map(static function (array $error) use($strictlyTypedSprintf) : string {
            return $strictlyTypedSprintf($error[1], $error[0], $error[2] ?? null);
        }, $expectedErrors);
        $actualErrors = array_map(static function (Error $error) use($strictlyTypedSprintf) : string {
            $line = $error->getLine();
            if ($line === null) {
                return $strictlyTypedSprintf(-1, $error->getMessage(), $error->getTip());
            }
            return $strictlyTypedSprintf($line, $error->getMessage(), $error->getTip());
        }, $actualErrors);
        $this->assertSame(implode("\n", $expectedErrors) . "\n", implode("\n", $actualErrors) . "\n");
    }
    /**
     * @param string[] $files
     * @return list<Error>
     */
    public function gatherAnalyserErrors(array $files) : array
    {
        $files = array_map([$this->getFileHelper(), 'normalizePath'], $files);
        $analyserResult = $this->getAnalyser()->analyse($files, null, null, \true);
        if (count($analyserResult->getInternalErrors()) > 0) {
            $this->fail(implode("\n", $analyserResult->getInternalErrors()));
        }
        $actualErrors = $analyserResult->getUnorderedErrors();
        $ruleErrorTransformer = new RuleErrorTransformer();
        if (count($analyserResult->getCollectedData()) > 0) {
            $ruleRegistry = new DirectRuleRegistry([$this->getRule()]);
            $nodeType = CollectedDataNode::class;
            $node = new CollectedDataNode($analyserResult->getCollectedData());
            $scopeFactory = $this->createScopeFactory($this->createReflectionProvider(), $this->getTypeSpecifier());
            $scope = $scopeFactory->create(ScopeContext::create('irrelevant'));
            foreach ($ruleRegistry->getRules($nodeType) as $rule) {
                $ruleErrors = $rule->processNode($node, $scope);
                foreach ($ruleErrors as $ruleError) {
                    $actualErrors[] = $ruleErrorTransformer->transform($ruleError, $scope, $nodeType, $node->getLine());
                }
            }
        }
        return $actualErrors;
    }
    protected function shouldPolluteScopeWithLoopInitialAssignments() : bool
    {
        return \false;
    }
    protected function shouldPolluteScopeWithAlwaysIterableForeach() : bool
    {
        return \true;
    }
    public static function getAdditionalConfigFiles() : array
    {
        return [__DIR__ . '/../../conf/bleedingEdge.neon'];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Testing;

use Composer\Autoload\ClassLoader;
use PhpParser\Parser;
use PHPStan\BetterReflection\SourceLocator\Ast\Locator;
use PHPStan\BetterReflection\SourceLocator\SourceStubber\PhpStormStubsSourceStubber;
use PHPStan\BetterReflection\SourceLocator\SourceStubber\ReflectionSourceStubber;
use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\EvaledCodeSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\MemoizingSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator;
use PHPStan\Reflection\BetterReflection\SourceLocator\AutoloadSourceLocator;
use PHPStan\Reflection\BetterReflection\SourceLocator\ComposerJsonAndInstalledJsonSourceLocatorMaker;
use PHPStan\Reflection\BetterReflection\SourceLocator\FileNodesFetcher;
use PHPStan\Reflection\BetterReflection\SourceLocator\PhpVersionBlacklistSourceLocator;
use ReflectionClass;
use function dirname;
use function is_file;
class TestCaseSourceLocatorFactory
{
    /**
     * @var \PHPStan\Reflection\BetterReflection\SourceLocator\ComposerJsonAndInstalledJsonSourceLocatorMaker
     */
    private $composerJsonAndInstalledJsonSourceLocatorMaker;
    /**
     * @var \PhpParser\Parser
     */
    private $phpParser;
    /**
     * @var \PhpParser\Parser
     */
    private $php8Parser;
    /**
     * @var \PHPStan\Reflection\BetterReflection\SourceLocator\FileNodesFetcher
     */
    private $fileNodesFetcher;
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\SourceStubber\PhpStormStubsSourceStubber
     */
    private $phpstormStubsSourceStubber;
    /**
     * @var \PHPStan\BetterReflection\SourceLocator\SourceStubber\ReflectionSourceStubber
     */
    private $reflectionSourceStubber;
    public function __construct(ComposerJsonAndInstalledJsonSourceLocatorMaker $composerJsonAndInstalledJsonSourceLocatorMaker, Parser $phpParser, Parser $php8Parser, FileNodesFetcher $fileNodesFetcher, PhpStormStubsSourceStubber $phpstormStubsSourceStubber, ReflectionSourceStubber $reflectionSourceStubber)
    {
        $this->composerJsonAndInstalledJsonSourceLocatorMaker = $composerJsonAndInstalledJsonSourceLocatorMaker;
        $this->phpParser = $phpParser;
        $this->php8Parser = $php8Parser;
        $this->fileNodesFetcher = $fileNodesFetcher;
        $this->phpstormStubsSourceStubber = $phpstormStubsSourceStubber;
        $this->reflectionSourceStubber = $reflectionSourceStubber;
    }
    public function create() : SourceLocator
    {
        $classLoaders = ClassLoader::getRegisteredLoaders();
        $classLoaderReflection = new ReflectionClass(ClassLoader::class);
        $locators = [];
        if ($classLoaderReflection->hasProperty('vendorDir')) {
            $vendorDirProperty = $classLoaderReflection->getProperty('vendorDir');
            $vendorDirProperty->setAccessible(\true);
            foreach ($classLoaders as $classLoader) {
                $composerProjectPath = dirname($vendorDirProperty->getValue($classLoader));
                if (!is_file($composerProjectPath . '/composer.json')) {
                    continue;
                }
                $composerSourceLocator = $this->composerJsonAndInstalledJsonSourceLocatorMaker->create($composerProjectPath);
                if ($composerSourceLocator === null) {
                    continue;
                }
                $locators[] = $composerSourceLocator;
            }
        }
        $astLocator = new Locator($this->phpParser);
        $astPhp8Locator = new Locator($this->php8Parser);
        $locators[] = new PhpInternalSourceLocator($astPhp8Locator, $this->phpstormStubsSourceStubber);
        $locators[] = new AutoloadSourceLocator($this->fileNodesFetcher, \true);
        $locators[] = new PhpVersionBlacklistSourceLocator(new PhpInternalSourceLocator($astLocator, $this->reflectionSourceStubber), $this->phpstormStubsSourceStubber);
        $locators[] = new PhpVersionBlacklistSourceLocator(new EvaledCodeSourceLocator($astLocator, $this->reflectionSourceStubber), $this->phpstormStubsSourceStubber);
        return new MemoizingSourceLocator(new AggregateSourceLocator($locators));
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Testing;

use _PHPStan_dcc7b7cff\Nette\Utils\Json;
use _PHPStan_dcc7b7cff\Nette\Utils\JsonException;
use PHPStan\File\FileHelper;
use PHPStan\File\FileWriter;
use PHPStan\ShouldNotHappenException;
use PHPUnit\Framework\AssertionFailedError;
use PHPUnit\Framework\TestCase;
use function array_merge;
use function count;
use function escapeshellarg;
use function escapeshellcmd;
use function exec;
use function implode;
use function method_exists;
use function range;
use function sprintf;
use function unlink;
use const DIRECTORY_SEPARATOR;
use const PHP_BINARY;
/** @api */
abstract class LevelsTestCase extends TestCase
{
    /**
     * @return array<array<string>>
     */
    public abstract function dataTopics() : array;
    public abstract function getDataPath() : string;
    public abstract function getPhpStanExecutablePath() : string;
    public abstract function getPhpStanConfigPath() : ?string;
    protected function getResultSuffix() : string
    {
        return '';
    }
    protected function shouldAutoloadAnalysedFile() : bool
    {
        return \true;
    }
    /**
     * @dataProvider dataTopics
     */
    public function testLevels(string $topic) : void
    {
        $file = sprintf('%s' . DIRECTORY_SEPARATOR . '%s.php', $this->getDataPath(), $topic);
        $command = escapeshellcmd($this->getPhpStanExecutablePath());
        $configPath = $this->getPhpStanConfigPath();
        $fileHelper = new FileHelper(__DIR__ . '/../..');
        $previousMessages = [];
        $exceptions = [];
        exec(sprintf('%s %s clear-result-cache %s 2>&1', escapeshellarg(PHP_BINARY), $command, $configPath !== null ? '--configuration ' . escapeshellarg($configPath) : ''), $clearResultCacheOutputLines, $clearResultCacheExitCode);
        if ($clearResultCacheExitCode !== 0) {
            throw new ShouldNotHappenException('Could not clear result cache: ' . implode("\n", $clearResultCacheOutputLines));
        }
        foreach (range(0, 9) as $level) {
            unset($outputLines);
            exec(sprintf('%s %s analyse --no-progress --error-format=prettyJson --level=%d %s %s %s', escapeshellarg(PHP_BINARY), $command, $level, $configPath !== null ? '--configuration ' . escapeshellarg($configPath) : '', $this->shouldAutoloadAnalysedFile() ? sprintf('--autoload-file %s', escapeshellarg($file)) : '', escapeshellarg($file)), $outputLines);
            $output = implode("\n", $outputLines);
            try {
                $actualJson = Json::decode($output, Json::FORCE_ARRAY);
            } catch (JsonException $exception) {
                throw new JsonException(sprintf('Cannot decode: %s', $output));
            }
            if (count($actualJson['files']) > 0) {
                $normalizedFilePath = $fileHelper->normalizePath($file);
                if (!isset($actualJson['files'][$normalizedFilePath])) {
                    $messagesBeforeDiffing = [];
                } else {
                    $messagesBeforeDiffing = $actualJson['files'][$normalizedFilePath]['messages'];
                }
                foreach ($this->getAdditionalAnalysedFiles() as $additionalAnalysedFile) {
                    $normalizedAdditionalFilePath = $fileHelper->normalizePath($additionalAnalysedFile);
                    if (!isset($actualJson['files'][$normalizedAdditionalFilePath])) {
                        continue;
                    }
                    $messagesBeforeDiffing = array_merge($messagesBeforeDiffing, $actualJson['files'][$normalizedAdditionalFilePath]['messages']);
                }
            } else {
                $messagesBeforeDiffing = [];
            }
            $messages = [];
            foreach ($messagesBeforeDiffing as $message) {
                foreach ($previousMessages as $lastMessage) {
                    if ($message['message'] === $lastMessage['message'] && $message['line'] === $lastMessage['line']) {
                        continue 2;
                    }
                }
                unset($message['tip']);
                unset($message['identifier']);
                $messages[] = $message;
            }
            $missingMessages = [];
            foreach ($previousMessages as $previousMessage) {
                foreach ($messagesBeforeDiffing as $message) {
                    if ($previousMessage['message'] === $message['message'] && $previousMessage['line'] === $message['line']) {
                        continue 2;
                    }
                }
                unset($previousMessage['tip']);
                $missingMessages[] = $previousMessage;
            }
            $previousMessages = array_merge($previousMessages, $messages);
            $expectedJsonFile = sprintf('%s/%s-%d%s.json', $this->getDataPath(), $topic, $level, $this->getResultSuffix());
            $exception = $this->compareFiles($expectedJsonFile, $messages);
            if ($exception !== null) {
                $exceptions[] = $exception;
            }
            $expectedJsonMissingFile = sprintf('%s/%s-%d-missing%s.json', $this->getDataPath(), $topic, $level, $this->getResultSuffix());
            $exception = $this->compareFiles($expectedJsonMissingFile, $missingMessages);
            if ($exception === null) {
                continue;
            }
            $exceptions[] = $exception;
        }
        if (count($exceptions) > 0) {
            throw $exceptions[0];
        }
    }
    /**
     * @return string[]
     */
    public function getAdditionalAnalysedFiles() : array
    {
        return [];
    }
    /**
     * @param string[] $expectedMessages
     */
    private function compareFiles(string $expectedJsonFile, array $expectedMessages) : ?AssertionFailedError
    {
        if (count($expectedMessages) === 0) {
            try {
                self::assertFileDoesNotExist($expectedJsonFile);
                return null;
            } catch (AssertionFailedError $e) {
                unlink($expectedJsonFile);
                return $e;
            }
        }
        $actualOutput = Json::encode($expectedMessages, Json::PRETTY);
        try {
            $this->assertJsonStringEqualsJsonFile($expectedJsonFile, $actualOutput);
        } catch (AssertionFailedError $e) {
            FileWriter::write($expectedJsonFile, $actualOutput);
            return $e;
        }
        return null;
    }
    public static function assertFileDoesNotExist(string $filename, string $message = '') : void
    {
        if (!method_exists(parent::class, 'assertFileDoesNotExist')) {
            parent::assertFileNotExists($filename, $message);
            return;
        }
        parent::assertFileDoesNotExist($filename, $message);
    }
}
parameters:
	inferPrivatePropertyTypeFromConstructor: true
	featureToggles:
		checkUnresolvableParameterTypes: true

services:
	-
		class: PHPStan\Testing\TestCaseSourceLocatorFactory
		arguments:
			phpParser: @phpParserDecorator
			php8Parser: @php8PhpParser

	cacheStorage:
		class: PHPStan\Cache\MemoryCacheStorage
		arguments!: []

	currentPhpVersionSimpleParser!:
		factory: @currentPhpVersionRichParser

	currentPhpVersionLexer:
		class: PhpParser\Lexer
		factory: @PHPStan\Parser\LexerFactory::createEmulative()

	betterReflectionSourceLocator:
		class: PHPStan\BetterReflection\SourceLocator\Type\SourceLocator
		factory: @PHPStan\Testing\TestCaseSourceLocatorFactory::create()
		autowired: false

	reflectionProvider:
		factory: @betterReflectionProvider
		arguments!: []
		autowired:
			- PHPStan\Reflection\ReflectionProvider

<?php

declare (strict_types=1);
namespace PHPStan\Testing;

use PHPStan\TrinaryLogic;
/**
 * Asserts the static type of a value.
 *
 * @phpstan-pure
 * @param mixed $value
 * @return mixed
 *
 * @throws void
 */
function assertType(string $type, $value)
{
    return null;
}
/**
 * Asserts the static type of a value.
 *
 * The difference from assertType() is that it doesn't resolve
 * method/function parameter phpDocs.
 *
 * @phpstan-pure
 * @param mixed $value
 * @return mixed
 *
 * @throws void
 */
function assertNativeType(string $type, $value)
{
    return null;
}
/**
 * @phpstan-pure
 * @param mixed $variable
 * @return mixed
 *
 * @throws void
 */
function assertVariableCertainty(TrinaryLogic $certainty, $variable)
{
    return null;
}
<?php

declare (strict_types=1);
namespace PHPStan\Testing;

use PHPStan\Analyser\Error;
use PHPStan\Command\AnalysisResult;
use PHPStan\Command\ErrorsConsoleStyle;
use PHPStan\Command\Output;
use PHPStan\Command\Symfony\SymfonyOutput;
use PHPStan\Command\Symfony\SymfonyStyle;
use PHPStan\ShouldNotHappenException;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Input\StringInput;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Output\StreamOutput;
use function array_map;
use function array_slice;
use function explode;
use function fopen;
use function implode;
use function rewind;
use function rtrim;
use function stream_get_contents;
abstract class ErrorFormatterTestCase extends \PHPStan\Testing\PHPStanTestCase
{
    protected const DIRECTORY_PATH = '/data/folder/with space/and unicode 😃/project';
    private const KIND_DECORATED = 'decorated';
    private const KIND_PLAIN = 'plain';
    /** @var array<string, StreamOutput> */
    private $outputStream = [];
    /** @var array<string, Output> */
    private $output = [];
    private function getOutputStream(bool $decorated = \false) : StreamOutput
    {
        $kind = $decorated ? self::KIND_DECORATED : self::KIND_PLAIN;
        if (!isset($this->outputStream[$kind])) {
            $resource = fopen('php://memory', 'w', \false);
            if ($resource === \false) {
                throw new ShouldNotHappenException();
            }
            $this->outputStream[$kind] = new StreamOutput($resource, StreamOutput::VERBOSITY_NORMAL, $decorated);
        }
        return $this->outputStream[$kind];
    }
    protected function getOutput(bool $decorated = \false) : Output
    {
        $kind = $decorated ? self::KIND_DECORATED : self::KIND_PLAIN;
        if (!isset($this->output[$kind])) {
            $outputStream = $this->getOutputStream($decorated);
            $errorConsoleStyle = new ErrorsConsoleStyle(new StringInput(''), $outputStream);
            $this->output[$kind] = new SymfonyOutput($outputStream, new SymfonyStyle($errorConsoleStyle));
        }
        return $this->output[$kind];
    }
    protected function getOutputContent(bool $decorated = \false) : string
    {
        rewind($this->getOutputStream($decorated)->getStream());
        $contents = stream_get_contents($this->getOutputStream($decorated)->getStream());
        if ($contents === \false) {
            throw new ShouldNotHappenException();
        }
        return $this->rtrimMultiline($contents);
    }
    protected function getAnalysisResult(int $numFileErrors, int $numGenericErrors) : AnalysisResult
    {
        if ($numFileErrors > 5 || $numFileErrors < 0 || $numGenericErrors > 2 || $numGenericErrors < 0) {
            throw new ShouldNotHappenException();
        }
        $fileErrors = array_slice([new Error('Foo', self::DIRECTORY_PATH . '/folder with unicode 😃/file name with "spaces" and unicode 😃.php', 4), new Error('Foo', self::DIRECTORY_PATH . '/foo.php', 1), new Error("Bar\nBar2", self::DIRECTORY_PATH . '/foo.php', 5, \true, null, null, 'a tip'), new Error("Bar\nBar2", self::DIRECTORY_PATH . '/folder with unicode 😃/file name with "spaces" and unicode 😃.php', 2), new Error("Bar\nBar2", self::DIRECTORY_PATH . '/foo.php', null)], 0, $numFileErrors);
        $genericErrors = array_slice(['first generic error', 'second generic error'], 0, $numGenericErrors);
        return new AnalysisResult($fileErrors, $genericErrors, [], [], [], \false, null, \true, 0);
    }
    private function rtrimMultiline(string $output) : string
    {
        $result = array_map(static function (string $line) : string {
            return rtrim($line, " \r\n");
        }, explode("\n", $output));
        return implode("\n", $result);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Testing;

use PhpParser\Node;
use PhpParser\Node\Expr\StaticCall;
use PhpParser\Node\Name;
use PHPStan\Analyser\NodeScopeResolver;
use PHPStan\Analyser\Scope;
use PHPStan\Analyser\ScopeContext;
use PHPStan\DependencyInjection\Type\DynamicThrowTypeExtensionProvider;
use PHPStan\File\FileHelper;
use PHPStan\Php\PhpVersion;
use PHPStan\PhpDoc\PhpDocInheritanceResolver;
use PHPStan\PhpDoc\StubPhpDocProvider;
use PHPStan\Reflection\InitializerExprTypeResolver;
use PHPStan\Rules\Properties\ReadWritePropertiesExtensionProvider;
use PHPStan\TrinaryLogic;
use PHPStan\Type\ConstantScalarType;
use PHPStan\Type\FileTypeMapper;
use PHPStan\Type\VerbosityLevel;
use function array_map;
use function array_merge;
use function count;
use function in_array;
use function is_string;
use function sprintf;
use function stripos;
use function strtolower;
/** @api */
abstract class TypeInferenceTestCase extends \PHPStan\Testing\PHPStanTestCase
{
    /**
     * @param callable(Node , Scope ): void $callback
     * @param string[] $dynamicConstantNames
     */
    public static function processFile(string $file, callable $callback, array $dynamicConstantNames = []) : void
    {
        $reflectionProvider = self::createReflectionProvider();
        $typeSpecifier = self::getContainer()->getService('typeSpecifier');
        $fileHelper = self::getContainer()->getByType(FileHelper::class);
        $resolver = new NodeScopeResolver($reflectionProvider, self::getContainer()->getByType(InitializerExprTypeResolver::class), self::getReflector(), self::getClassReflectionExtensionRegistryProvider(), self::getParser(), self::getContainer()->getByType(FileTypeMapper::class), self::getContainer()->getByType(StubPhpDocProvider::class), self::getContainer()->getByType(PhpVersion::class), self::getContainer()->getByType(PhpDocInheritanceResolver::class), self::getContainer()->getByType(FileHelper::class), $typeSpecifier, self::getContainer()->getByType(DynamicThrowTypeExtensionProvider::class), self::getContainer()->getByType(ReadWritePropertiesExtensionProvider::class), \true, \true, static::getEarlyTerminatingMethodCalls(), static::getEarlyTerminatingFunctionCalls(), \true, self::getContainer()->getParameter('treatPhpDocTypesAsCertain'), self::getContainer()->getParameter('featureToggles')['detectDeadTypeInMultiCatch']);
        $resolver->setAnalysedFiles(array_map(static function (string $file) use($fileHelper) : string {
            return $fileHelper->normalizePath($file);
        }, array_merge([$file], static::getAdditionalAnalysedFiles())));
        $scopeFactory = self::createScopeFactory($reflectionProvider, $typeSpecifier, $dynamicConstantNames);
        $scope = $scopeFactory->create(ScopeContext::create($file));
        $resolver->processNodes(self::getParser()->parseFile($file), $scope, $callback);
    }
    /**
     * @api
     * @param mixed ...$args
     */
    public function assertFileAsserts(string $assertType, string $file, ...$args) : void
    {
        if ($assertType === 'type') {
            $expectedType = $args[0];
            $this->assertInstanceOf(ConstantScalarType::class, $expectedType);
            $expected = $expectedType->getValue();
            $actualType = $args[1];
            $actual = $actualType->describe(VerbosityLevel::precise());
            $this->assertSame($expected, $actual, sprintf('Expected type %s, got type %s in %s on line %d.', $expected, $actual, $file, $args[2]));
        } elseif ($assertType === 'variableCertainty') {
            $expectedCertainty = $args[0];
            $actualCertainty = $args[1];
            $variableName = $args[2];
            $this->assertTrue($expectedCertainty->equals($actualCertainty), sprintf('Expected %s, actual certainty of variable $%s is %s in %s on line %d.', $expectedCertainty->describe(), $variableName, $actualCertainty->describe(), $file, $args[3]));
        }
    }
    /**
     * @api
     * @return array<string, mixed[]>
     */
    public static function gatherAssertTypes(string $file) : array
    {
        $asserts = [];
        self::processFile($file, static function (Node $node, Scope $scope) use(&$asserts, $file) : void {
            if (!$node instanceof Node\Expr\FuncCall) {
                return;
            }
            $nameNode = $node->name;
            if (!$nameNode instanceof Name) {
                return;
            }
            $functionName = $nameNode->toString();
            if (in_array(strtolower($functionName), ['asserttype', 'assertnativetype', 'assertvariablecertainty'], \true)) {
                self::fail(sprintf('Missing use statement for %s() on line %d.', $functionName, $node->getLine()));
            } elseif ($functionName === 'PHPStan\\Testing\\assertType') {
                $expectedType = $scope->getType($node->getArgs()[0]->value);
                $actualType = $scope->getType($node->getArgs()[1]->value);
                $assert = ['type', $file, $expectedType, $actualType, $node->getLine()];
            } elseif ($functionName === 'PHPStan\\Testing\\assertNativeType') {
                $expectedType = $scope->getType($node->getArgs()[0]->value);
                $actualType = $scope->getNativeType($node->getArgs()[1]->value);
                $assert = ['type', $file, $expectedType, $actualType, $node->getLine()];
            } elseif ($functionName === 'PHPStan\\Testing\\assertVariableCertainty') {
                $certainty = $node->getArgs()[0]->value;
                if (!$certainty instanceof StaticCall) {
                    self::fail(sprintf('First argument of %s() must be TrinaryLogic call', $functionName));
                }
                if (!$certainty->class instanceof Node\Name) {
                    self::fail(sprintf('ERROR: Invalid TrinaryLogic call.'));
                }
                if ($certainty->class->toString() !== 'PHPStan\\TrinaryLogic') {
                    self::fail(sprintf('ERROR: Invalid TrinaryLogic call.'));
                }
                if (!$certainty->name instanceof Node\Identifier) {
                    self::fail(sprintf('ERROR: Invalid TrinaryLogic call.'));
                }
                // @phpstan-ignore-next-line
                $expectedertaintyValue = TrinaryLogic::{$certainty->name->toString()}();
                $variable = $node->getArgs()[1]->value;
                if (!$variable instanceof Node\Expr\Variable) {
                    self::fail(sprintf('ERROR: Invalid assertVariableCertainty call.'));
                }
                if (!is_string($variable->name)) {
                    self::fail(sprintf('ERROR: Invalid assertVariableCertainty call.'));
                }
                $actualCertaintyValue = $scope->hasVariableType($variable->name);
                $assert = ['variableCertainty', $file, $expectedertaintyValue, $actualCertaintyValue, $variable->name, $node->getLine()];
            } else {
                $correctFunction = null;
                $assertFunctions = ['assertType' => 'PHPStan\\Testing\\assertType', 'assertNativeType' => 'PHPStan\\Testing\\assertNativeType', 'assertVariableCertainty' => 'PHPStan\\Testing\\assertVariableCertainty'];
                foreach ($assertFunctions as $assertFn => $fqFunctionName) {
                    if (stripos($functionName, $assertFn) === \false) {
                        continue;
                    }
                    $correctFunction = $fqFunctionName;
                }
                if ($correctFunction === null) {
                    return;
                }
                self::fail(sprintf('Function %s imported with wrong namespace %s called on line %d.', $correctFunction, $functionName, $node->getLine()));
            }
            if (count($node->getArgs()) !== 2) {
                self::fail(sprintf('ERROR: Wrong %s() call on line %d.', $functionName, $node->getLine()));
            }
            $asserts[$file . ':' . $node->getLine()] = $assert;
        });
        if (count($asserts) === 0) {
            self::fail(sprintf('File %s does not contain any asserts', $file));
        }
        return $asserts;
    }
    /** @return string[] */
    protected static function getAdditionalAnalysedFiles() : array
    {
        return [];
    }
    /** @return string[][] */
    protected static function getEarlyTerminatingMethodCalls() : array
    {
        return [];
    }
    /** @return string[] */
    protected static function getEarlyTerminatingFunctionCalls() : array
    {
        return [];
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Testing;

use PHPStan\Analyser\ConstantResolver;
use PHPStan\Analyser\DirectInternalScopeFactory;
use PHPStan\Analyser\Error;
use PHPStan\Analyser\MutatingScope;
use PHPStan\Analyser\NodeScopeResolver;
use PHPStan\Analyser\ScopeFactory;
use PHPStan\Analyser\TypeSpecifier;
use PHPStan\BetterReflection\Reflector\ClassReflector;
use PHPStan\BetterReflection\Reflector\ConstantReflector;
use PHPStan\BetterReflection\Reflector\FunctionReflector;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\Broker\Broker;
use PHPStan\DependencyInjection\Container;
use PHPStan\DependencyInjection\ContainerFactory;
use PHPStan\DependencyInjection\Reflection\ClassReflectionExtensionRegistryProvider;
use PHPStan\DependencyInjection\Type\DynamicReturnTypeExtensionRegistryProvider;
use PHPStan\DependencyInjection\Type\OperatorTypeSpecifyingExtensionRegistryProvider;
use PHPStan\File\FileHelper;
use PHPStan\Node\Printer\ExprPrinter;
use PHPStan\Parser\Parser;
use PHPStan\Php\PhpVersion;
use PHPStan\PhpDoc\TypeNodeResolver;
use PHPStan\PhpDoc\TypeStringResolver;
use PHPStan\Reflection\InitializerExprTypeResolver;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Reflection\ReflectionProvider\DirectReflectionProviderProvider;
use PHPStan\Rules\Properties\PropertyReflectionFinder;
use PHPStan\Type\Constant\OversizedArrayBuilder;
use PHPStan\Type\TypeAliasResolver;
use PHPStan\Type\UsefulTypeAliasResolver;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestCase;
use function array_merge;
use function count;
use function implode;
use function is_dir;
use function mkdir;
use function rtrim;
use function sha1;
use function sprintf;
use function sys_get_temp_dir;
use const DIRECTORY_SEPARATOR;
use const PHP_VERSION_ID;
/** @api */
abstract class PHPStanTestCase extends TestCase
{
    /** @deprecated
     * @var bool */
    public static $useStaticReflectionProvider = \true;
    /** @var array<string, Container> */
    private static $containers = [];
    /** @api */
    public static function getContainer() : Container
    {
        $additionalConfigFiles = static::getAdditionalConfigFiles();
        $additionalConfigFiles[] = __DIR__ . '/TestCase.neon';
        $cacheKey = sha1(implode("\n", $additionalConfigFiles));
        if (!isset(self::$containers[$cacheKey])) {
            $tmpDir = sys_get_temp_dir() . '/phpstan-tests';
            if (!@mkdir($tmpDir, 0777) && !is_dir($tmpDir)) {
                self::fail(sprintf('Cannot create temp directory %s', $tmpDir));
            }
            $rootDir = __DIR__ . '/../..';
            $fileHelper = new FileHelper($rootDir);
            $rootDir = $fileHelper->normalizePath($rootDir, '/');
            $containerFactory = new ContainerFactory($rootDir);
            $container = $containerFactory->create($tmpDir, array_merge([$containerFactory->getConfigDirectory() . '/config.level8.neon'], $additionalConfigFiles), []);
            self::$containers[$cacheKey] = $container;
            foreach ($container->getParameter('bootstrapFiles') as $bootstrapFile) {
                (static function (string $file) use($container) : void {
                    require_once $file;
                })($bootstrapFile);
            }
            if (PHP_VERSION_ID >= 80000) {
                require_once __DIR__ . '/../../stubs/runtime/Enum/UnitEnum.php';
                require_once __DIR__ . '/../../stubs/runtime/Enum/BackedEnum.php';
                require_once __DIR__ . '/../../stubs/runtime/Enum/ReflectionEnum.php';
                require_once __DIR__ . '/../../stubs/runtime/Enum/ReflectionEnumUnitCase.php';
                require_once __DIR__ . '/../../stubs/runtime/Enum/ReflectionEnumBackedCase.php';
            }
        } else {
            ContainerFactory::postInitializeContainer(self::$containers[$cacheKey]);
        }
        return self::$containers[$cacheKey];
    }
    /**
     * @return string[]
     */
    public static function getAdditionalConfigFiles() : array
    {
        return [];
    }
    public static function getParser() : Parser
    {
        /** @var Parser $parser */
        $parser = self::getContainer()->getService('defaultAnalysisParser');
        return $parser;
    }
    /**
     * @api
     * @deprecated Use createReflectionProvider() instead
     */
    public function createBroker() : Broker
    {
        return self::getContainer()->getByType(Broker::class);
    }
    /** @api */
    public static function createReflectionProvider() : ReflectionProvider
    {
        return self::getContainer()->getByType(ReflectionProvider::class);
    }
    public static function getReflector() : Reflector
    {
        return self::getContainer()->getService('betterReflectionReflector');
    }
    /**
     * @deprecated Use getReflector() instead.
     * @return array{ClassReflector, FunctionReflector, ConstantReflector}
     */
    public static function getReflectors() : array
    {
        return [self::getContainer()->getService('betterReflectionClassReflector'), self::getContainer()->getService('betterReflectionFunctionReflector'), self::getContainer()->getService('betterReflectionConstantReflector')];
    }
    public static function getClassReflectionExtensionRegistryProvider() : ClassReflectionExtensionRegistryProvider
    {
        return self::getContainer()->getByType(ClassReflectionExtensionRegistryProvider::class);
    }
    /**
     * @param string[] $dynamicConstantNames
     */
    public static function createScopeFactory(ReflectionProvider $reflectionProvider, TypeSpecifier $typeSpecifier, array $dynamicConstantNames = []) : ScopeFactory
    {
        $container = self::getContainer();
        if (count($dynamicConstantNames) === 0) {
            $dynamicConstantNames = $container->getParameter('dynamicConstantNames');
        }
        $reflectionProviderProvider = new DirectReflectionProviderProvider($reflectionProvider);
        $constantResolver = new ConstantResolver($reflectionProviderProvider, $dynamicConstantNames);
        return new ScopeFactory(new DirectInternalScopeFactory(MutatingScope::class, $reflectionProvider, new InitializerExprTypeResolver($constantResolver, $reflectionProviderProvider, $container->getByType(PhpVersion::class), $container->getByType(OperatorTypeSpecifyingExtensionRegistryProvider::class), new OversizedArrayBuilder(), $container->getParameter('usePathConstantsAsConstantString')), $container->getByType(DynamicReturnTypeExtensionRegistryProvider::class), $container->getByType(ExprPrinter::class), $typeSpecifier, new PropertyReflectionFinder(), self::getParser(), $container->getByType(NodeScopeResolver::class), $container->getByType(PhpVersion::class), $container->getParameter('featureToggles')['explicitMixedInUnknownGenericNew'], $container->getParameter('featureToggles')['explicitMixedForGlobalVariables'], $constantResolver));
    }
    /**
     * @param array<string, string> $globalTypeAliases
     */
    public static function createTypeAliasResolver(array $globalTypeAliases, ReflectionProvider $reflectionProvider) : TypeAliasResolver
    {
        $container = self::getContainer();
        return new UsefulTypeAliasResolver($globalTypeAliases, $container->getByType(TypeStringResolver::class), $container->getByType(TypeNodeResolver::class), $reflectionProvider);
    }
    protected function shouldTreatPhpDocTypesAsCertain() : bool
    {
        return \true;
    }
    public static function getFileHelper() : FileHelper
    {
        return self::getContainer()->getByType(FileHelper::class);
    }
    /**
     * Provides a DIRECTORY_SEPARATOR agnostic assertion helper, to compare file paths.
     *
     */
    protected function assertSamePaths(string $expected, string $actual, string $message = '') : void
    {
        $expected = $this->getFileHelper()->normalizePath($expected);
        $actual = $this->getFileHelper()->normalizePath($actual);
        $this->assertSame($expected, $actual, $message);
    }
    /**
     * @param Error[]|string[] $errors
     */
    protected function assertNoErrors(array $errors) : void
    {
        try {
            $this->assertCount(0, $errors);
        } catch (ExpectationFailedException $e) {
            $messages = [];
            foreach ($errors as $error) {
                if ($error instanceof Error) {
                    $messages[] = sprintf("- %s\n  in %s on line %d\n", rtrim($error->getMessage(), '.'), $error->getFile(), $error->getLine());
                } else {
                    $messages[] = $error;
                }
            }
            $this->fail($e->getMessage() . "\n\nEmitted errors:\n" . implode("\n", $messages));
        }
    }
    protected function skipIfNotOnWindows() : void
    {
        if (DIRECTORY_SEPARATOR === '\\') {
            return;
        }
        self::markTestSkipped();
    }
    protected function skipIfNotOnUnix() : void
    {
        if (DIRECTORY_SEPARATOR === '/') {
            return;
        }
        self::markTestSkipped();
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Php;

use function floor;
/** @api */
class PhpVersion
{
    /**
     * @var int
     */
    private $versionId;
    public function __construct(int $versionId)
    {
        $this->versionId = $versionId;
    }
    public function getVersionId() : int
    {
        return $this->versionId;
    }
    public function getVersionString() : string
    {
        $first = (int) floor($this->versionId / 10000);
        $second = (int) floor($this->versionId % 10000 / 100);
        $third = (int) floor($this->versionId % 100);
        return $first . '.' . $second . ($third !== 0 ? '.' . $third : '');
    }
    public function supportsNullCoalesceAssign() : bool
    {
        return $this->versionId >= 70400;
    }
    public function supportsParameterContravariance() : bool
    {
        return $this->versionId >= 70400;
    }
    public function supportsReturnCovariance() : bool
    {
        return $this->versionId >= 70400;
    }
    public function supportsNativeUnionTypes() : bool
    {
        return $this->versionId >= 80000;
    }
    public function deprecatesRequiredParameterAfterOptional() : bool
    {
        return $this->versionId >= 80000;
    }
    public function supportsLessOverridenParametersWithVariadic() : bool
    {
        return $this->versionId >= 80000;
    }
    public function supportsThrowExpression() : bool
    {
        return $this->versionId >= 80000;
    }
    public function supportsClassConstantOnExpression() : bool
    {
        return $this->versionId >= 80000;
    }
    public function supportsLegacyConstructor() : bool
    {
        return $this->versionId < 80000;
    }
    public function supportsPromotedProperties() : bool
    {
        return $this->versionId >= 80000;
    }
    public function supportsParameterTypeWidening() : bool
    {
        return $this->versionId >= 70200;
    }
    public function supportsUnsetCast() : bool
    {
        return $this->versionId < 80000;
    }
    public function supportsNamedArguments() : bool
    {
        return $this->versionId >= 80000;
    }
    public function throwsTypeErrorForInternalFunctions() : bool
    {
        return $this->versionId >= 80000;
    }
    public function throwsValueErrorForInternalFunctions() : bool
    {
        return $this->versionId >= 80000;
    }
    public function supportsHhPrintfSpecifier() : bool
    {
        return $this->versionId >= 80000;
    }
    public function isEmptyStringValidAliasForNoneInMbSubstituteCharacter() : bool
    {
        return $this->versionId < 80000;
    }
    public function supportsAllUnicodeScalarCodePointsInMbSubstituteCharacter() : bool
    {
        return $this->versionId >= 70200;
    }
    public function isNumericStringValidArgInMbSubstituteCharacter() : bool
    {
        return $this->versionId < 80000;
    }
    public function isNullValidArgInMbSubstituteCharacter() : bool
    {
        return $this->versionId >= 80000;
    }
    public function isInterfaceConstantImplicitlyFinal() : bool
    {
        return $this->versionId < 80100;
    }
    public function supportsFinalConstants() : bool
    {
        return $this->versionId >= 80100;
    }
    public function supportsReadOnlyProperties() : bool
    {
        return $this->versionId >= 80100;
    }
    public function supportsEnums() : bool
    {
        return $this->versionId >= 80100;
    }
    public function supportsPureIntersectionTypes() : bool
    {
        return $this->versionId >= 80100;
    }
    public function supportsCaseInsensitiveConstantNames() : bool
    {
        return $this->versionId < 80000;
    }
    public function hasStricterRoundFunctions() : bool
    {
        return $this->versionId >= 80000;
    }
    public function hasTentativeReturnTypes() : bool
    {
        return $this->versionId >= 80100;
    }
    public function supportsFirstClassCallables() : bool
    {
        return $this->versionId >= 80100;
    }
    public function supportsArrayUnpackingWithStringKeys() : bool
    {
        return $this->versionId >= 80100;
    }
    public function throwsOnInvalidMbStringEncoding() : bool
    {
        return $this->versionId >= 80000;
    }
    public function supportsPassNoneEncodings() : bool
    {
        return $this->versionId < 70300;
    }
    public function producesWarningForFinalPrivateMethods() : bool
    {
        return $this->versionId >= 80000;
    }
    public function deprecatesDynamicProperties() : bool
    {
        return $this->versionId >= 80200;
    }
    public function strSplitReturnsEmptyArray() : bool
    {
        return $this->versionId >= 80200;
    }
    public function supportsDisjunctiveNormalForm() : bool
    {
        return $this->versionId >= 80200;
    }
    public function serializableRequiresMagicMethods() : bool
    {
        return $this->versionId >= 80100;
    }
    public function arrayFunctionsReturnNullWithNonArray() : bool
    {
        return $this->versionId < 80000;
    }
    // see https://www.php.net/manual/en/migration80.incompatible.php#migration80.incompatible.core.string-number-comparision
    public function castsNumbersToStringsOnLooseComparison() : bool
    {
        return $this->versionId >= 80000;
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Php;

use _PHPStan_dcc7b7cff\Nette\Utils\Json;
use _PHPStan_dcc7b7cff\Nette\Utils\JsonException;
use PHPStan\File\CouldNotReadFileException;
use PHPStan\File\FileReader;
use function count;
use function end;
use function is_file;
use function is_string;
class PhpVersionFactoryFactory
{
    /**
     * @var int|null
     */
    private $versionId;
    /**
     * @var string[]
     */
    private $composerAutoloaderProjectPaths;
    /**
     * @param string[] $composerAutoloaderProjectPaths
     */
    public function __construct(?int $versionId, array $composerAutoloaderProjectPaths)
    {
        $this->versionId = $versionId;
        $this->composerAutoloaderProjectPaths = $composerAutoloaderProjectPaths;
    }
    public function create() : \PHPStan\Php\PhpVersionFactory
    {
        $composerPhpVersion = null;
        if (count($this->composerAutoloaderProjectPaths) > 0) {
            $composerJsonPath = end($this->composerAutoloaderProjectPaths) . '/composer.json';
            if (is_file($composerJsonPath)) {
                try {
                    $composerJsonContents = FileReader::read($composerJsonPath);
                    $composer = Json::decode($composerJsonContents, Json::FORCE_ARRAY);
                    $platformVersion = $composer['config']['platform']['php'] ?? null;
                    if (is_string($platformVersion)) {
                        $composerPhpVersion = $platformVersion;
                    }
                } catch (CouldNotReadFileException|JsonException $exception) {
                    // pass
                }
            }
        }
        return new \PHPStan\Php\PhpVersionFactory($this->versionId, $composerPhpVersion);
    }
}
<?php

declare (strict_types=1);
namespace PHPStan\Php;

use function explode;
use function max;
use function min;
use const PHP_VERSION_ID;
class PhpVersionFactory
{
    /**
     * @var int|null
     */
    private $versionId;
    /**
     * @var string|null
     */
    private $composerPhpVersion;
    public function __construct(?int $versionId, ?string $composerPhpVersion)
    {
        $this->versionId = $versionId;
        $this->composerPhpVersion = $composerPhpVersion;
    }
    public function create() : \PHPStan\Php\PhpVersion
    {
        $versionId = $this->versionId;
        if ($versionId === null && $this->composerPhpVersion !== null) {
            $parts = explode('.', $this->composerPhpVersion);
            $tmp = (int) $parts[0] * 10000 + (int) ($parts[1] ?? 0) * 100 + (int) ($parts[2] ?? 0);
            $tmp = max($tmp, 70100);
            $versionId = min($tmp, 80299);
        }
        if ($versionId === null) {
            $versionId = PHP_VERSION_ID;
        }
        return new \PHPStan\Php\PhpVersion($versionId);
    }
}
<?php

declare (strict_types=1);
namespace _PHPStan_dcc7b7cff;

require_once __DIR__ . '/src/Collectors/CollectedData.php';
require_once __DIR__ . '/src/Collectors/RegistryFactory.php';
require_once __DIR__ . '/src/Collectors/Registry.php';
require_once __DIR__ . '/src/Collectors/Collector.php';
require_once __DIR__ . '/src/Internal/ContainerDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Internal/ComposerHelper.php';
require_once __DIR__ . '/src/Internal/BytesHelper.php';
require_once __DIR__ . '/src/Internal/SprintfHelper.php';
require_once __DIR__ . '/src/Process/ProcessHelper.php';
require_once __DIR__ . '/src/Process/ProcessCrashedException.php';
require_once __DIR__ . '/src/Process/ProcessCanceledException.php';
require_once __DIR__ . '/src/Process/ProcessPromise.php';
require_once __DIR__ . '/src/Process/CpuCoreCounter.php';
require_once __DIR__ . '/src/Cache/Cache.php';
require_once __DIR__ . '/src/Cache/FileCacheStorage.php';
require_once __DIR__ . '/src/Cache/CacheStorage.php';
require_once __DIR__ . '/src/Cache/MemoryCacheStorage.php';
require_once __DIR__ . '/src/Cache/CacheItem.php';
require_once __DIR__ . '/src/Type/LateResolvableType.php';
require_once __DIR__ . '/src/Type/StaticMethodTypeSpecifyingExtension.php';
require_once __DIR__ . '/src/Type/VoidType.php';
require_once __DIR__ . '/src/Type/TypeCombinator.php';
require_once __DIR__ . '/src/Type/VerbosityLevel.php';
require_once __DIR__ . '/src/Type/OperatorTypeSpecifyingExtensionRegistry.php';
require_once __DIR__ . '/src/Type/IterableType.php';
require_once __DIR__ . '/src/Type/CallableType.php';
require_once __DIR__ . '/src/Type/SubtractableType.php';
require_once __DIR__ . '/src/Type/ObjectType.php';
require_once __DIR__ . '/src/Type/DynamicMethodReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/SimultaneousTypeTraverser.php';
require_once __DIR__ . '/src/Type/CallableTypeHelper.php';
require_once __DIR__ . '/src/Type/ConstantTypeHelper.php';
require_once __DIR__ . '/src/Type/Constant/ConstantStringType.php';
require_once __DIR__ . '/src/Type/Constant/ConstantScalarToBooleanTrait.php';
require_once __DIR__ . '/src/Type/Constant/ConstantArrayTypeAndMethod.php';
require_once __DIR__ . '/src/Type/Constant/ConstantBooleanType.php';
require_once __DIR__ . '/src/Type/Constant/ConstantArrayType.php';
require_once __DIR__ . '/src/Type/Constant/OversizedArrayBuilder.php';
require_once __DIR__ . '/src/Type/Constant/ConstantIntegerType.php';
require_once __DIR__ . '/src/Type/Constant/ConstantArrayTypeBuilder.php';
require_once __DIR__ . '/src/Type/Constant/ConstantFloatType.php';
require_once __DIR__ . '/src/Type/MixedType.php';
require_once __DIR__ . '/src/Type/TypeTraverser.php';
require_once __DIR__ . '/src/Type/LazyTypeAliasResolverProvider.php';
require_once __DIR__ . '/src/Type/OperatorTypeSpecifyingExtension.php';
require_once __DIR__ . '/src/Type/ClosureTypeFactory.php';
require_once __DIR__ . '/src/Type/BooleanType.php';
require_once __DIR__ . '/src/Type/ParserNodeTypeToPHPStanType.php';
require_once __DIR__ . '/src/Type/ErrorType.php';
require_once __DIR__ . '/src/Type/Traits/ConstantNumericComparisonTypeTrait.php';
require_once __DIR__ . '/src/Type/Traits/LateResolvableTypeTrait.php';
require_once __DIR__ . '/src/Type/Traits/MaybeOffsetAccessibleTypeTrait.php';
require_once __DIR__ . '/src/Type/Traits/MaybeCallableTypeTrait.php';
require_once __DIR__ . '/src/Type/Traits/NonCallableTypeTrait.php';
require_once __DIR__ . '/src/Type/Traits/NonGeneralizableTypeTrait.php';
require_once __DIR__ . '/src/Type/Traits/ConstantScalarTypeTrait.php';
require_once __DIR__ . '/src/Type/Traits/UndecidedBooleanTypeTrait.php';
require_once __DIR__ . '/src/Type/Traits/FalseyBooleanTypeTrait.php';
require_once __DIR__ . '/src/Type/Traits/ObjectTypeTrait.php';
require_once __DIR__ . '/src/Type/Traits/MaybeObjectTypeTrait.php';
require_once __DIR__ . '/src/Type/Traits/NonRemoveableTypeTrait.php';
require_once __DIR__ . '/src/Type/Traits/UndecidedComparisonTypeTrait.php';
require_once __DIR__ . '/src/Type/Traits/NonObjectTypeTrait.php';
require_once __DIR__ . '/src/Type/Traits/NonIterableTypeTrait.php';
require_once __DIR__ . '/src/Type/Traits/NonOffsetAccessibleTypeTrait.php';
require_once __DIR__ . '/src/Type/Traits/NonArrayTypeTrait.php';
require_once __DIR__ . '/src/Type/Traits/UndecidedComparisonCompoundTypeTrait.php';
require_once __DIR__ . '/src/Type/Traits/MaybeArrayTypeTrait.php';
require_once __DIR__ . '/src/Type/Traits/NonGenericTypeTrait.php';
require_once __DIR__ . '/src/Type/Traits/MaybeIterableTypeTrait.php';
require_once __DIR__ . '/src/Type/Traits/TruthyBooleanTypeTrait.php';
require_once __DIR__ . '/src/Type/BitwiseFlagHelper.php';
require_once __DIR__ . '/src/Type/DynamicFunctionThrowTypeExtension.php';
require_once __DIR__ . '/src/Type/TypeAliasResolver.php';
require_once __DIR__ . '/src/Type/KeyOfType.php';
require_once __DIR__ . '/src/Type/StaticType.php';
require_once __DIR__ . '/src/Type/Generic/TemplateConstantArrayType.php';
require_once __DIR__ . '/src/Type/Generic/TemplateTypeReference.php';
require_once __DIR__ . '/src/Type/Generic/TemplateTypeArgumentStrategy.php';
require_once __DIR__ . '/src/Type/Generic/TemplateObjectWithoutClassType.php';
require_once __DIR__ . '/src/Type/Generic/TemplateBooleanType.php';
require_once __DIR__ . '/src/Type/Generic/TemplateStringType.php';
require_once __DIR__ . '/src/Type/Generic/TemplateGenericObjectType.php';
require_once __DIR__ . '/src/Type/Generic/TemplateFloatType.php';
require_once __DIR__ . '/src/Type/Generic/TemplateTypeFactory.php';
require_once __DIR__ . '/src/Type/Generic/GenericClassStringType.php';
require_once __DIR__ . '/src/Type/Generic/TemplateBenevolentUnionType.php';
require_once __DIR__ . '/src/Type/Generic/TemplateTypeScope.php';
require_once __DIR__ . '/src/Type/Generic/TemplateConstantStringType.php';
require_once __DIR__ . '/src/Type/Generic/TemplateTypeStrategy.php';
require_once __DIR__ . '/src/Type/Generic/TemplateArrayType.php';
require_once __DIR__ . '/src/Type/Generic/TemplateUnionType.php';
require_once __DIR__ . '/src/Type/Generic/TemplateIntegerType.php';
require_once __DIR__ . '/src/Type/Generic/TemplateTypeVariance.php';
require_once __DIR__ . '/src/Type/Generic/TemplateObjectShapeType.php';
require_once __DIR__ . '/src/Type/Generic/TemplateConstantIntegerType.php';
require_once __DIR__ . '/src/Type/Generic/TemplateTypeMap.php';
require_once __DIR__ . '/src/Type/Generic/TemplateTypeTrait.php';
require_once __DIR__ . '/src/Type/Generic/TemplateTypeHelper.php';
require_once __DIR__ . '/src/Type/Generic/TemplateStrictMixedType.php';
require_once __DIR__ . '/src/Type/Generic/TemplateIntersectionType.php';
require_once __DIR__ . '/src/Type/Generic/TemplateType.php';
require_once __DIR__ . '/src/Type/Generic/TemplateObjectType.php';
require_once __DIR__ . '/src/Type/Generic/GenericObjectType.php';
require_once __DIR__ . '/src/Type/Generic/TemplateTypeParameterStrategy.php';
require_once __DIR__ . '/src/Type/Generic/TemplateMixedType.php';
require_once __DIR__ . '/src/Type/Generic/TemplateKeyOfType.php';
require_once __DIR__ . '/src/Type/ConditionalTypeForParameter.php';
require_once __DIR__ . '/src/Type/Accessory/AccessoryArrayListType.php';
require_once __DIR__ . '/src/Type/Accessory/AccessoryLiteralStringType.php';
require_once __DIR__ . '/src/Type/Accessory/AccessoryNonFalsyStringType.php';
require_once __DIR__ . '/src/Type/Accessory/HasMethodType.php';
require_once __DIR__ . '/src/Type/Accessory/HasOffsetType.php';
require_once __DIR__ . '/src/Type/Accessory/NonEmptyArrayType.php';
require_once __DIR__ . '/src/Type/Accessory/AccessoryType.php';
require_once __DIR__ . '/src/Type/Accessory/OversizedArrayType.php';
require_once __DIR__ . '/src/Type/Accessory/HasPropertyType.php';
require_once __DIR__ . '/src/Type/Accessory/HasOffsetValueType.php';
require_once __DIR__ . '/src/Type/Accessory/AccessoryNonEmptyStringType.php';
require_once __DIR__ . '/src/Type/Accessory/AccessoryNumericStringType.php';
require_once __DIR__ . '/src/Type/NullType.php';
require_once __DIR__ . '/src/Type/OffsetAccessType.php';
require_once __DIR__ . '/src/Type/CircularTypeAliasErrorType.php';
require_once __DIR__ . '/src/Type/JustNullableTypeTrait.php';
require_once __DIR__ . '/src/Type/ConstantScalarType.php';
require_once __DIR__ . '/src/Type/CompoundType.php';
require_once __DIR__ . '/src/Type/StringAlwaysAcceptingObjectWithToStringType.php';
require_once __DIR__ . '/src/Type/Enum/EnumCaseObjectType.php';
require_once __DIR__ . '/src/Type/StringType.php';
require_once __DIR__ . '/src/Type/DynamicMethodThrowTypeExtension.php';
require_once __DIR__ . '/src/Type/TypehintHelper.php';
require_once __DIR__ . '/src/Type/DirectTypeAliasResolverProvider.php';
require_once __DIR__ . '/src/Type/RecursionGuard.php';
require_once __DIR__ . '/src/Type/IntegerType.php';
require_once __DIR__ . '/src/Type/CircularTypeAliasDefinitionException.php';
require_once __DIR__ . '/src/Type/Helper/GetTemplateTypeType.php';
require_once __DIR__ . '/src/Type/DynamicFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/DynamicStaticMethodReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/TypeAlias.php';
require_once __DIR__ . '/src/Type/IntegerRangeType.php';
require_once __DIR__ . '/src/Type/UnionType.php';
require_once __DIR__ . '/src/Type/MethodTypeSpecifyingExtension.php';
require_once __DIR__ . '/src/Type/ResourceType.php';
require_once __DIR__ . '/src/Type/ObjectWithoutClassType.php';
require_once __DIR__ . '/src/Type/StaticTypeFactory.php';
require_once __DIR__ . '/src/Type/FunctionTypeSpecifyingExtension.php';
require_once __DIR__ . '/src/Type/DynamicStaticMethodThrowTypeExtension.php';
require_once __DIR__ . '/src/Type/NonexistentParentClassType.php';
require_once __DIR__ . '/src/Type/ObjectShapeType.php';
require_once __DIR__ . '/src/Type/StrictMixedType.php';
require_once __DIR__ . '/src/Type/ClosureType.php';
require_once __DIR__ . '/src/Type/UsefulTypeAliasResolver.php';
require_once __DIR__ . '/src/Type/UnionTypeHelper.php';
require_once __DIR__ . '/src/Type/ConditionalType.php';
require_once __DIR__ . '/src/Type/GenericTypeVariableResolver.php';
require_once __DIR__ . '/src/Type/FileTypeMapper.php';
require_once __DIR__ . '/src/Type/IntersectionType.php';
require_once __DIR__ . '/src/Type/ClassStringType.php';
require_once __DIR__ . '/src/Type/NeverType.php';
require_once __DIR__ . '/src/Type/TypeWithClassName.php';
require_once __DIR__ . '/src/Type/ConstantType.php';
require_once __DIR__ . '/src/Type/Type.php';
require_once __DIR__ . '/src/Type/ValueOfType.php';
require_once __DIR__ . '/src/Type/LooseComparisonHelper.php';
require_once __DIR__ . '/src/Type/ObjectShapePropertyReflection.php';
require_once __DIR__ . '/src/Type/AcceptsResult.php';
require_once __DIR__ . '/src/Type/GeneralizePrecision.php';
require_once __DIR__ . '/src/Type/ArrayType.php';
require_once __DIR__ . '/src/Type/TypeAliasResolverProvider.php';
require_once __DIR__ . '/src/Type/DynamicReturnTypeExtensionRegistry.php';
require_once __DIR__ . '/src/Type/TypeUtils.php';
require_once __DIR__ . '/src/Type/BenevolentUnionType.php';
require_once __DIR__ . '/src/Type/Php/PowFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/SimpleXMLElementClassPropertyReflectionExtension.php';
require_once __DIR__ . '/src/Type/Php/ArrayReverseFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/CompactFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ArrayNextDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/StrRepeatFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/StrlenFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/DateFormatMethodReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ClassImplementsFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ReplaceFunctionsDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/GetClassDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/NumberFormatFunctionDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/NonEmptyStringFunctionsReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/IsArrayFunctionTypeSpecifyingExtension.php';
require_once __DIR__ . '/src/Type/Php/DsMapDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ArrayColumnFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/DefinedConstantTypeSpecifyingExtension.php';
require_once __DIR__ . '/src/Type/Php/JsonThrowTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/FilterVarDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/StrPadFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ExplodeFunctionDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/RoundFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/GetCalledClassDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/VersionCompareFunctionDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ClosureBindToDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/IntdivThrowTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/MbFunctionsReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/MicrotimeFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/StrTokFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/StrtotimeFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/StrvalFamilyFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ArrayFillKeysFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/PathinfoFunctionDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/MbSubstituteCharacterDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ArrayFlipFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/DateTimeConstructorThrowTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/MbConvertEncodingFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ReflectionPropertyConstructorThrowTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/DioStatDynamicFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ReflectionGetAttributesMethodReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/CountFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ArraySumFunctionDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ArrayKeyExistsFunctionTypeSpecifyingExtension.php';
require_once __DIR__ . '/src/Type/Php/ReflectionClassIsSubclassOfTypeSpecifyingExtension.php';
require_once __DIR__ . '/src/Type/Php/CtypeDigitFunctionTypeSpecifyingExtension.php';
require_once __DIR__ . '/src/Type/Php/ArrayChunkFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/SimpleXMLElementConstructorThrowTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ArrayFillFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/RangeFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/DateTimeModifyReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/DateFormatFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ArrayKeyLastDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ArrayMapFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ClassExistsFunctionTypeSpecifyingExtension.php';
require_once __DIR__ . '/src/Type/Php/ArraySpliceFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/SimpleXMLElementXpathMethodReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/BcMathStringOrNullReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/GetParentClassDynamicFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ParseUrlFunctionDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ArrayPopFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ArrayReduceFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/XMLReaderOpenReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/CurlGetinfoFunctionDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/SubstrDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/SprintfFunctionDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ClosureFromCallableDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ArrayReplaceFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/PregFilterFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/InArrayFunctionTypeSpecifyingExtension.php';
require_once __DIR__ . '/src/Type/Php/IteratorToArrayFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ArrayKeyFirstDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ArrayValuesFunctionDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/HrtimeFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/CountFunctionTypeSpecifyingExtension.php';
require_once __DIR__ . '/src/Type/Php/IsSubclassOfFunctionTypeSpecifyingExtension.php';
require_once __DIR__ . '/src/Type/Php/TypeSpecifyingFunctionsDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/FilterInputDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/TriggerErrorDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/IsAFunctionTypeSpecifyingExtension.php';
require_once __DIR__ . '/src/Type/Php/StrWordCountFunctionDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/MinMaxFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ThrowableReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/StatDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/MethodExistsTypeSpecifyingExtension.php';
require_once __DIR__ . '/src/Type/Php/ArrayKeyDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/FilterVarArrayDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/DsMapDynamicMethodThrowTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ArrayRandFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ArrayShiftFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ArrayMergeFunctionDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/DateTimeCreateDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ArrayKeysFunctionDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/DateIntervalConstructorThrowTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ArrayCurrentDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/StrSplitFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/StrContainingTypeSpecifyingExtension.php';
require_once __DIR__ . '/src/Type/Php/PregSplitDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/DateFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/DateIntervalDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/DefineConstantTypeSpecifyingExtension.php';
require_once __DIR__ . '/src/Type/Php/PropertyExistsTypeSpecifyingExtension.php';
require_once __DIR__ . '/src/Type/Php/BackedEnumFromMethodDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ClosureBindDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/DatePeriodConstructorReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/DateTimeZoneConstructorThrowTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/IsAFunctionTypeSpecifyingHelper.php';
require_once __DIR__ . '/src/Type/Php/ArgumentBasedFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/FilterFunctionReturnTypeHelper.php';
require_once __DIR__ . '/src/Type/Php/JsonThrowOnErrorDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/AssertFunctionTypeSpecifyingExtension.php';
require_once __DIR__ . '/src/Type/Php/ReflectionFunctionConstructorThrowTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ReflectionMethodConstructorThrowTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/LtrimFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/RandomIntFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/FunctionExistsFunctionTypeSpecifyingExtension.php';
require_once __DIR__ . '/src/Type/Php/IniGetReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/CurlInitReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ArrayPointerFunctionsDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/SimpleXMLElementAsXMLMethodReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/GettimeofdayDynamicFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ArrayFilterFunctionReturnTypeReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ReflectionClassConstructorThrowTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/Base64DecodeDynamicFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/IsIterableFunctionTypeSpecifyingExtension.php';
require_once __DIR__ . '/src/Type/Php/ImplodeFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ArrayCombineFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ArraySearchFunctionTypeSpecifyingExtension.php';
require_once __DIR__ . '/src/Type/Php/DateTimeDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/StrCaseFunctionsReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ArrayIntersectKeyFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/MbFunctionsReturnTypeExtensionTrait.php';
require_once __DIR__ . '/src/Type/Php/ArraySearchFunctionDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/ArraySliceFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/MbStrlenFunctionReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/SscanfFunctionDynamicReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/HashFunctionsReturnTypeExtension.php';
require_once __DIR__ . '/src/Type/Php/IsCallableFunctionTypeSpecifyingExtension.php';
require_once __DIR__ . '/src/Type/ThisType.php';
require_once __DIR__ . '/src/Type/FloatType.php';
require_once __DIR__ . '/src/Type/ExponentiateHelper.php';
require_once __DIR__ . '/src/NodeVisitor/StatementOrderVisitor.php';
require_once __DIR__ . '/src/PhpDoc/TypeNodeResolverExtensionRegistryProvider.php';
require_once __DIR__ . '/src/PhpDoc/StubValidator.php';
require_once __DIR__ . '/src/PhpDoc/ConstExprNodeResolver.php';
require_once __DIR__ . '/src/PhpDoc/TypeNodeResolverExtensionRegistry.php';
require_once __DIR__ . '/src/PhpDoc/StubSourceLocatorFactory.php';
require_once __DIR__ . '/src/PhpDoc/DefaultStubFilesProvider.php';
require_once __DIR__ . '/src/PhpDoc/TypeNodeResolver.php';
require_once __DIR__ . '/src/PhpDoc/TypeStringResolver.php';
require_once __DIR__ . '/src/PhpDoc/StubPhpDocProvider.php';
require_once __DIR__ . '/src/PhpDoc/PhpDocBlock.php';
require_once __DIR__ . '/src/PhpDoc/StubFilesExtension.php';
require_once __DIR__ . '/src/PhpDoc/LazyTypeNodeResolverExtensionRegistryProvider.php';
require_once __DIR__ . '/src/PhpDoc/ConstExprParserFactory.php';
require_once __DIR__ . '/src/PhpDoc/TypeNodeResolverExtensionAwareRegistry.php';
require_once __DIR__ . '/src/PhpDoc/PhpDocNodeResolver.php';
require_once __DIR__ . '/src/PhpDoc/PhpDocStringResolver.php';
require_once __DIR__ . '/src/PhpDoc/CountableStubFilesExtension.php';
require_once __DIR__ . '/src/PhpDoc/StubFilesProvider.php';
require_once __DIR__ . '/src/PhpDoc/PhpDocInheritanceResolver.php';
require_once __DIR__ . '/src/PhpDoc/ResolvedPhpDocBlock.php';
require_once __DIR__ . '/src/PhpDoc/TypeNodeResolverExtension.php';
require_once __DIR__ . '/src/PhpDoc/DirectTypeNodeResolverExtensionRegistryProvider.php';
require_once __DIR__ . '/src/PhpDoc/Tag/TypedTag.php';
require_once __DIR__ . '/src/PhpDoc/Tag/VarTag.php';
require_once __DIR__ . '/src/PhpDoc/Tag/ReturnTag.php';
require_once __DIR__ . '/src/PhpDoc/Tag/MixinTag.php';
require_once __DIR__ . '/src/PhpDoc/Tag/PropertyTag.php';
require_once __DIR__ . '/src/PhpDoc/Tag/SelfOutTypeTag.php';
require_once __DIR__ . '/src/PhpDoc/Tag/TypeAliasImportTag.php';
require_once __DIR__ . '/src/PhpDoc/Tag/ImplementsTag.php';
require_once __DIR__ . '/src/PhpDoc/Tag/MethodTagParameter.php';
require_once __DIR__ . '/src/PhpDoc/Tag/DeprecatedTag.php';
require_once __DIR__ . '/src/PhpDoc/Tag/MethodTag.php';
require_once __DIR__ . '/src/PhpDoc/Tag/AssertTagParameter.php';
require_once __DIR__ . '/src/PhpDoc/Tag/UsesTag.php';
require_once __DIR__ . '/src/PhpDoc/Tag/ThrowsTag.php';
require_once __DIR__ . '/src/PhpDoc/Tag/ParamTag.php';
require_once __DIR__ . '/src/PhpDoc/Tag/ParamOutTag.php';
require_once __DIR__ . '/src/PhpDoc/Tag/ExtendsTag.php';
require_once __DIR__ . '/src/PhpDoc/Tag/TemplateTag.php';
require_once __DIR__ . '/src/PhpDoc/Tag/TypeAliasTag.php';
require_once __DIR__ . '/src/PhpDoc/Tag/AssertTag.php';
require_once __DIR__ . '/src/PhpDoc/TypeNodeResolverAwareExtension.php';
require_once __DIR__ . '/src/autoloadFunctions.php';
require_once __DIR__ . '/src/DependencyInjection/MemoizingContainer.php';
require_once __DIR__ . '/src/DependencyInjection/ValidateIgnoredErrorsExtension.php';
require_once __DIR__ . '/src/DependencyInjection/ContainerFactory.php';
require_once __DIR__ . '/src/DependencyInjection/Type/LazyDynamicReturnTypeExtensionRegistryProvider.php';
require_once __DIR__ . '/src/DependencyInjection/Type/OperatorTypeSpecifyingExtensionRegistryProvider.php';
require_once __DIR__ . '/src/DependencyInjection/Type/DynamicThrowTypeExtensionProvider.php';
require_once __DIR__ . '/src/DependencyInjection/Type/LazyOperatorTypeSpecifyingExtensionRegistryProvider.php';
require_once __DIR__ . '/src/DependencyInjection/Type/DynamicReturnTypeExtensionRegistryProvider.php';
require_once __DIR__ . '/src/DependencyInjection/Type/LazyDynamicThrowTypeExtensionProvider.php';
require_once __DIR__ . '/src/DependencyInjection/BleedingEdgeToggle.php';
require_once __DIR__ . '/src/DependencyInjection/ParameterNotFoundException.php';
require_once __DIR__ . '/src/DependencyInjection/Container.php';
require_once __DIR__ . '/src/DependencyInjection/RulesExtension.php';
require_once __DIR__ . '/src/DependencyInjection/Nette/NetteContainer.php';
require_once __DIR__ . '/src/DependencyInjection/LoaderFactory.php';
require_once __DIR__ . '/src/DependencyInjection/DerivativeContainerFactory.php';
require_once __DIR__ . '/src/DependencyInjection/ParametersSchemaExtension.php';
require_once __DIR__ . '/src/DependencyInjection/ConditionalTagsExtension.php';
require_once __DIR__ . '/src/DependencyInjection/NeonAdapter.php';
require_once __DIR__ . '/src/DependencyInjection/NeonLoader.php';
require_once __DIR__ . '/src/DependencyInjection/Reflection/ClassReflectionExtensionRegistryProvider.php';
require_once __DIR__ . '/src/DependencyInjection/Reflection/DirectClassReflectionExtensionRegistryProvider.php';
require_once __DIR__ . '/src/DependencyInjection/Reflection/LazyClassReflectionExtensionRegistryProvider.php';
require_once __DIR__ . '/src/DependencyInjection/InvalidIgnoredErrorPatternsException.php';
require_once __DIR__ . '/src/DependencyInjection/DuplicateIncludedFilesException.php';
require_once __DIR__ . '/src/DependencyInjection/Configurator.php';
require_once __DIR__ . '/src/Dependency/ExportedNode.php';
require_once __DIR__ . '/src/Dependency/RootExportedNode.php';
require_once __DIR__ . '/src/Dependency/ExportedNodeFetcher.php';
require_once __DIR__ . '/src/Dependency/ExportedNodeVisitor.php';
require_once __DIR__ . '/src/Dependency/ExportedNode/ExportedInterfaceNode.php';
require_once __DIR__ . '/src/Dependency/ExportedNode/ExportedPropertiesNode.php';
require_once __DIR__ . '/src/Dependency/ExportedNode/ExportedEnumNode.php';
require_once __DIR__ . '/src/Dependency/ExportedNode/ExportedClassNode.php';
require_once __DIR__ . '/src/Dependency/ExportedNode/ExportedEnumCaseNode.php';
require_once __DIR__ . '/src/Dependency/ExportedNode/ExportedAttributeNode.php';
require_once __DIR__ . '/src/Dependency/ExportedNode/ExportedClassConstantsNode.php';
require_once __DIR__ . '/src/Dependency/ExportedNode/ExportedPhpDocNode.php';
require_once __DIR__ . '/src/Dependency/ExportedNode/ExportedMethodNode.php';
require_once __DIR__ . '/src/Dependency/ExportedNode/ExportedParameterNode.php';
require_once __DIR__ . '/src/Dependency/ExportedNode/ExportedFunctionNode.php';
require_once __DIR__ . '/src/Dependency/ExportedNode/ExportedClassConstantNode.php';
require_once __DIR__ . '/src/Dependency/ExportedNode/ExportedTraitNode.php';
require_once __DIR__ . '/src/Dependency/ExportedNode/ExportedTraitUseAdaptation.php';
require_once __DIR__ . '/src/Dependency/DependencyResolver.php';
require_once __DIR__ . '/src/Dependency/ExportedNodeResolver.php';
require_once __DIR__ . '/src/Dependency/NodeDependencies.php';
require_once __DIR__ . '/src/Command/AnalysisResult.php';
require_once __DIR__ . '/src/Command/Symfony/SymfonyOutput.php';
require_once __DIR__ . '/src/Command/Symfony/SymfonyStyle.php';
require_once __DIR__ . '/src/Command/Output.php';
require_once __DIR__ . '/src/Command/ClearResultCacheCommand.php';
require_once __DIR__ . '/src/Command/ErrorFormatter/CheckstyleErrorFormatter.php';
require_once __DIR__ . '/src/Command/ErrorFormatter/GithubErrorFormatter.php';
require_once __DIR__ . '/src/Command/ErrorFormatter/TableErrorFormatter.php';
require_once __DIR__ . '/src/Command/ErrorFormatter/JsonErrorFormatter.php';
require_once __DIR__ . '/src/Command/ErrorFormatter/TeamcityErrorFormatter.php';
require_once __DIR__ . '/src/Command/ErrorFormatter/JunitErrorFormatter.php';
require_once __DIR__ . '/src/Command/ErrorFormatter/GitlabErrorFormatter.php';
require_once __DIR__ . '/src/Command/ErrorFormatter/BaselineNeonErrorFormatter.php';
require_once __DIR__ . '/src/Command/ErrorFormatter/BaselinePhpErrorFormatter.php';
require_once __DIR__ . '/src/Command/ErrorFormatter/CiDetectedErrorFormatter.php';
require_once __DIR__ . '/src/Command/ErrorFormatter/ErrorFormatter.php';
require_once __DIR__ . '/src/Command/ErrorFormatter/RawErrorFormatter.php';
require_once __DIR__ . '/src/Command/IgnoredRegexValidatorResult.php';
require_once __DIR__ . '/src/Command/DumpParametersCommand.php';
require_once __DIR__ . '/src/Command/InceptionResult.php';
require_once __DIR__ . '/src/Command/AnalyserRunner.php';
require_once __DIR__ . '/src/Command/IgnoredRegexValidator.php';
require_once __DIR__ . '/src/Command/FixerWorkerCommand.php';
require_once __DIR__ . '/src/Command/OutputStyle.php';
require_once __DIR__ . '/src/Command/AnalyseApplication.php';
require_once __DIR__ . '/src/Command/AnalyseCommand.php';
require_once __DIR__ . '/src/Command/FixerProcessException.php';
require_once __DIR__ . '/src/Command/WorkerCommand.php';
require_once __DIR__ . '/src/Command/InceptionNotSuccessfulException.php';
require_once __DIR__ . '/src/Command/ErrorsConsoleStyle.php';
require_once __DIR__ . '/src/Command/CommandHelper.php';
require_once __DIR__ . '/src/Command/FixerApplication.php';
require_once __DIR__ . '/src/AnalysedCodeException.php';
require_once __DIR__ . '/src/dumpType.php';
require_once __DIR__ . '/src/Analyser/ConditionalExpressionHolder.php';
require_once __DIR__ . '/src/Analyser/NameScope.php';
require_once __DIR__ . '/src/Analyser/StatementResult.php';
require_once __DIR__ . '/src/Analyser/IgnoredError.php';
require_once __DIR__ . '/src/Analyser/ScopeContext.php';
require_once __DIR__ . '/src/Analyser/Scope.php';
require_once __DIR__ . '/src/Analyser/IgnoredErrorHelper.php';
require_once __DIR__ . '/src/Analyser/Analyser.php';
require_once __DIR__ . '/src/Analyser/TypeSpecifier.php';
require_once __DIR__ . '/src/Analyser/InternalScopeFactory.php';
require_once __DIR__ . '/src/Analyser/StatementExitPoint.php';
require_once __DIR__ . '/src/Analyser/IgnoredErrorHelperResult.php';
require_once __DIR__ . '/src/Analyser/MutatingScope.php';
require_once __DIR__ . '/src/Analyser/ExpressionContext.php';
require_once __DIR__ . '/src/Analyser/ArgumentsNormalizer.php';
require_once __DIR__ . '/src/Analyser/NullsafeOperatorHelper.php';
require_once __DIR__ . '/src/Analyser/ResultCache/ResultCacheProcessResult.php';
require_once __DIR__ . '/src/Analyser/ResultCache/ResultCache.php';
require_once __DIR__ . '/src/Analyser/ResultCache/ResultCacheManagerFactory.php';
require_once __DIR__ . '/src/Analyser/ResultCache/ResultCacheClearer.php';
require_once __DIR__ . '/src/Analyser/ResultCache/ResultCacheManager.php';
require_once __DIR__ . '/src/Analyser/AnalyserResult.php';
require_once __DIR__ . '/src/Analyser/EnsuredNonNullabilityResult.php';
require_once __DIR__ . '/src/Analyser/LazyInternalScopeFactory.php';
require_once __DIR__ . '/src/Analyser/TypeSpecifierContext.php';
require_once __DIR__ . '/src/Analyser/RuleErrorTransformer.php';
require_once __DIR__ . '/src/Analyser/NodeScopeResolver.php';
require_once __DIR__ . '/src/Analyser/TypeSpecifierAwareExtension.php';
require_once __DIR__ . '/src/Analyser/OutOfClassScope.php';
require_once __DIR__ . '/src/Analyser/FileAnalyserResult.php';
require_once __DIR__ . '/src/Analyser/ExpressionResult.php';
require_once __DIR__ . '/src/Analyser/EnsuredNonNullabilityResultExpression.php';
require_once __DIR__ . '/src/Analyser/DirectInternalScopeFactory.php';
require_once __DIR__ . '/src/Analyser/ThrowPoint.php';
require_once __DIR__ . '/src/Analyser/ConstantResolverFactory.php';
require_once __DIR__ . '/src/Analyser/Error.php';
require_once __DIR__ . '/src/Analyser/ExpressionTypeHolder.php';
require_once __DIR__ . '/src/Analyser/SpecifiedTypes.php';
require_once __DIR__ . '/src/Analyser/ScopeFactory.php';
require_once __DIR__ . '/src/Analyser/FileAnalyser.php';
require_once __DIR__ . '/src/Analyser/StatementContext.php';
require_once __DIR__ . '/src/Analyser/ConstantResolver.php';
require_once __DIR__ . '/src/Analyser/TypeSpecifierFactory.php';
require_once __DIR__ . '/src/Analyser/UndefinedVariableException.php';
require_once __DIR__ . '/src/Parser/ArrowFunctionArgVisitor.php';
require_once __DIR__ . '/src/Parser/ParentStmtTypesVisitor.php';
require_once __DIR__ . '/src/Parser/ArrayWalkArgVisitor.php';
require_once __DIR__ . '/src/Parser/ClosureArgVisitor.php';
require_once __DIR__ . '/src/Parser/ArrayFilterArgVisitor.php';
require_once __DIR__ . '/src/Parser/SimpleParser.php';
require_once __DIR__ . '/src/Parser/CachedParser.php';
require_once __DIR__ . '/src/Parser/CleaningParser.php';
require_once __DIR__ . '/src/Parser/FunctionCallStatementFinder.php';
require_once __DIR__ . '/src/Parser/NewAssignedToPropertyVisitor.php';
require_once __DIR__ . '/src/Parser/LastConditionVisitor.php';
require_once __DIR__ . '/src/Parser/RemoveUnusedCodeByPhpVersionIdVisitor.php';
require_once __DIR__ . '/src/Parser/RichParser.php';
require_once __DIR__ . '/src/Parser/CurlSetOptArgVisitor.php';
require_once __DIR__ . '/src/Parser/PhpParserDecorator.php';
require_once __DIR__ . '/src/Parser/TryCatchTypeVisitor.php';
require_once __DIR__ . '/src/Parser/ArrayMapArgVisitor.php';
require_once __DIR__ . '/src/Parser/TypeTraverserInstanceofVisitor.php';
require_once __DIR__ . '/src/Parser/CleaningVisitor.php';
require_once __DIR__ . '/src/Parser/PathRoutingParser.php';
require_once __DIR__ . '/src/Parser/LexerFactory.php';
require_once __DIR__ . '/src/Parser/Parser.php';
require_once __DIR__ . '/src/Parser/ParserErrorsException.php';
require_once __DIR__ . '/src/Node/InFunctionNode.php';
require_once __DIR__ . '/src/Node/LiteralArrayNode.php';
require_once __DIR__ . '/src/Node/FinallyExitPointsNode.php';
require_once __DIR__ . '/src/Node/CatchWithUnthrownExceptionNode.php';
require_once __DIR__ . '/src/Node/ExecutionEndNode.php';
require_once __DIR__ . '/src/Node/FunctionCallableNode.php';
require_once __DIR__ . '/src/Node/ClassMethodsNode.php';
require_once __DIR__ . '/src/Node/Property/PropertyRead.php';
require_once __DIR__ . '/src/Node/Property/PropertyWrite.php';
require_once __DIR__ . '/src/Node/Constant/ClassConstantFetch.php';
require_once __DIR__ . '/src/Node/InForeachNode.php';
require_once __DIR__ . '/src/Node/ClassConstantsNode.php';
require_once __DIR__ . '/src/Node/InArrowFunctionNode.php';
require_once __DIR__ . '/src/Node/InClosureNode.php';
require_once __DIR__ . '/src/Node/ClosureReturnStatementsNode.php';
require_once __DIR__ . '/src/Node/ClassStatementsGatherer.php';
require_once __DIR__ . '/src/Node/ClassMethod.php';
require_once __DIR__ . '/src/Node/Printer/ExprPrinter.php';
require_once __DIR__ . '/src/Node/Printer/Printer.php';
require_once __DIR__ . '/src/Node/FunctionReturnStatementsNode.php';
require_once __DIR__ . '/src/Node/ClassPropertyNode.php';
require_once __DIR__ . '/src/Node/InClassNode.php';
require_once __DIR__ . '/src/Node/InstantiationCallableNode.php';
require_once __DIR__ . '/src/Node/MatchExpressionNode.php';
require_once __DIR__ . '/src/Node/CollectedDataNode.php';
require_once __DIR__ . '/src/Node/ClassPropertiesNode.php';
require_once __DIR__ . '/src/Node/BooleanAndNode.php';
require_once __DIR__ . '/src/Node/MatchExpressionArm.php';
require_once __DIR__ . '/src/Node/StaticMethodCallableNode.php';
require_once __DIR__ . '/src/Node/UnreachableStatementNode.php';
require_once __DIR__ . '/src/Node/Expr/GetOffsetValueTypeExpr.php';
require_once __DIR__ . '/src/Node/Expr/OriginalPropertyTypeExpr.php';
require_once __DIR__ . '/src/Node/Expr/TypeExpr.php';
require_once __DIR__ . '/src/Node/Expr/GetIterableKeyTypeExpr.php';
require_once __DIR__ . '/src/Node/Expr/SetOffsetValueTypeExpr.php';
require_once __DIR__ . '/src/Node/Expr/GetIterableValueTypeExpr.php';
require_once __DIR__ . '/src/Node/LiteralArrayItem.php';
require_once __DIR__ . '/src/Node/MethodReturnStatementsNode.php';
require_once __DIR__ . '/src/Node/BreaklessWhileLoopNode.php';
require_once __DIR__ . '/src/Node/FileNode.php';
require_once __DIR__ . '/src/Node/DoWhileLoopConditionNode.php';
require_once __DIR__ . '/src/Node/InClassMethodNode.php';
require_once __DIR__ . '/src/Node/VarTagChangedExpressionTypeNode.php';
require_once __DIR__ . '/src/Node/PropertyAssignNode.php';
require_once __DIR__ . '/src/Node/Method/MethodCall.php';
require_once __DIR__ . '/src/Node/MatchExpressionArmCondition.php';
require_once __DIR__ . '/src/Node/ReturnStatementsNode.php';
require_once __DIR__ . '/src/Node/BooleanOrNode.php';
require_once __DIR__ . '/src/Node/MatchExpressionArmBody.php';
require_once __DIR__ . '/src/Node/ReturnStatement.php';
require_once __DIR__ . '/src/Node/VirtualNode.php';
require_once __DIR__ . '/src/Node/MethodCallableNode.php';
require_once __DIR__ . '/src/Parallel/Scheduler.php';
require_once __DIR__ . '/src/Parallel/Process.php';
require_once __DIR__ . '/src/Parallel/ParallelAnalyser.php';
require_once __DIR__ . '/src/Parallel/ProcessPool.php';
require_once __DIR__ . '/src/Parallel/Schedule.php';
require_once __DIR__ . '/src/File/ParentDirectoryRelativePathHelper.php';
require_once __DIR__ . '/src/File/FileFinder.php';
require_once __DIR__ . '/src/File/FileExcluderRawFactory.php';
require_once __DIR__ . '/src/File/SimpleRelativePathHelper.php';
require_once __DIR__ . '/src/File/FileHelper.php';
require_once __DIR__ . '/src/File/FileMonitorResult.php';
require_once __DIR__ . '/src/File/FileWriter.php';
require_once __DIR__ . '/src/File/RelativePathHelper.php';
require_once __DIR__ . '/src/File/CouldNotWriteFileException.php';
require_once __DIR__ . '/src/File/CouldNotReadFileException.php';
require_once __DIR__ . '/src/File/FileFinderResult.php';
require_once __DIR__ . '/src/File/FuzzyRelativePathHelper.php';
require_once __DIR__ . '/src/File/NullRelativePathHelper.php';
require_once __DIR__ . '/src/File/PathNotFoundException.php';
require_once __DIR__ . '/src/File/FileReader.php';
require_once __DIR__ . '/src/File/FileExcluder.php';
require_once __DIR__ . '/src/File/FileMonitor.php';
require_once __DIR__ . '/src/File/FileExcluderFactory.php';
require_once __DIR__ . '/src/Reflection/EnumCaseReflection.php';
require_once __DIR__ . '/src/Reflection/ClassReflectionExtensionRegistry.php';
require_once __DIR__ . '/src/Reflection/MissingMethodFromReflectionException.php';
require_once __DIR__ . '/src/Reflection/FunctionVariant.php';
require_once __DIR__ . '/src/Reflection/ResolvedFunctionVariant.php';
require_once __DIR__ . '/src/Reflection/Assertions.php';
require_once __DIR__ . '/src/Reflection/ClassNameHelper.php';
require_once __DIR__ . '/src/Reflection/ConstantReflection.php';
require_once __DIR__ . '/src/Reflection/Type/CallbackUnresolvedPropertyPrototypeReflection.php';
require_once __DIR__ . '/src/Reflection/Type/CallbackUnresolvedMethodPrototypeReflection.php';
require_once __DIR__ . '/src/Reflection/Type/UnionTypeMethodReflection.php';
require_once __DIR__ . '/src/Reflection/Type/IntersectionTypeUnresolvedPropertyPrototypeReflection.php';
require_once __DIR__ . '/src/Reflection/Type/UnresolvedMethodPrototypeReflection.php';
require_once __DIR__ . '/src/Reflection/Type/UnionTypeUnresolvedMethodPrototypeReflection.php';
require_once __DIR__ . '/src/Reflection/Type/UnionTypePropertyReflection.php';
require_once __DIR__ . '/src/Reflection/Type/IntersectionTypeMethodReflection.php';
require_once __DIR__ . '/src/Reflection/Type/IntersectionTypeUnresolvedMethodPrototypeReflection.php';
require_once __DIR__ . '/src/Reflection/Type/CalledOnTypeUnresolvedMethodPrototypeReflection.php';
require_once __DIR__ . '/src/Reflection/Type/UnionTypeUnresolvedPropertyPrototypeReflection.php';
require_once __DIR__ . '/src/Reflection/Type/CalledOnTypeUnresolvedPropertyPrototypeReflection.php';
require_once __DIR__ . '/src/Reflection/Type/IntersectionTypePropertyReflection.php';
require_once __DIR__ . '/src/Reflection/Type/UnresolvedPropertyPrototypeReflection.php';
require_once __DIR__ . '/src/Reflection/MissingConstantFromReflectionException.php';
require_once __DIR__ . '/src/Reflection/ResolvedPropertyReflection.php';
require_once __DIR__ . '/src/Reflection/GlobalConstantReflection.php';
require_once __DIR__ . '/src/Reflection/Constant/RuntimeConstantReflection.php';
require_once __DIR__ . '/src/Reflection/Dummy/DummyConstructorReflection.php';
require_once __DIR__ . '/src/Reflection/Dummy/ChangedTypePropertyReflection.php';
require_once __DIR__ . '/src/Reflection/Dummy/DummyPropertyReflection.php';
require_once __DIR__ . '/src/Reflection/Dummy/DummyConstantReflection.php';
require_once __DIR__ . '/src/Reflection/Dummy/DummyMethodReflection.php';
require_once __DIR__ . '/src/Reflection/Dummy/ChangedTypeMethodReflection.php';
require_once __DIR__ . '/src/Reflection/FunctionVariantWithPhpDocs.php';
require_once __DIR__ . '/src/Reflection/Native/NativeParameterWithPhpDocsReflection.php';
require_once __DIR__ . '/src/Reflection/Native/NativeParameterReflection.php';
require_once __DIR__ . '/src/Reflection/Native/NativeFunctionReflection.php';
require_once __DIR__ . '/src/Reflection/Native/NativeMethodReflection.php';
require_once __DIR__ . '/src/Reflection/PropertyReflection.php';
require_once __DIR__ . '/src/Reflection/Annotations/AnnotationPropertyReflection.php';
require_once __DIR__ . '/src/Reflection/Annotations/AnnotationsMethodsClassReflectionExtension.php';
require_once __DIR__ . '/src/Reflection/Annotations/AnnotationsPropertiesClassReflectionExtension.php';
require_once __DIR__ . '/src/Reflection/Annotations/AnnotationsMethodParameterReflection.php';
require_once __DIR__ . '/src/Reflection/Annotations/AnnotationMethodReflection.php';
require_once __DIR__ . '/src/Reflection/InitializerExprContext.php';
require_once __DIR__ . '/src/Reflection/NamespaceAnswerer.php';
require_once __DIR__ . '/src/Reflection/MethodPrototypeReflection.php';
require_once __DIR__ . '/src/Reflection/ParametersAcceptorWithPhpDocs.php';
require_once __DIR__ . '/src/Reflection/MissingPropertyFromReflectionException.php';
require_once __DIR__ . '/src/Reflection/ClassConstantReflection.php';
require_once __DIR__ . '/src/Reflection/ExtendedMethodReflection.php';
require_once __DIR__ . '/src/Reflection/PassedByReference.php';
require_once __DIR__ . '/src/Reflection/ConstructorsHelper.php';
require_once __DIR__ . '/src/Reflection/SignatureMap/Php8SignatureMapProvider.php';
require_once __DIR__ . '/src/Reflection/SignatureMap/SignatureMapParser.php';
require_once __DIR__ . '/src/Reflection/SignatureMap/FunctionSignature.php';
require_once __DIR__ . '/src/Reflection/SignatureMap/SignatureMapProvider.php';
require_once __DIR__ . '/src/Reflection/SignatureMap/FunctionSignatureMapProvider.php';
require_once __DIR__ . '/src/Reflection/SignatureMap/NativeFunctionReflectionProvider.php';
require_once __DIR__ . '/src/Reflection/SignatureMap/ParameterSignature.php';
require_once __DIR__ . '/src/Reflection/SignatureMap/SignatureMapProviderFactory.php';
require_once __DIR__ . '/src/Reflection/TrivialParametersAcceptor.php';
require_once __DIR__ . '/src/Reflection/AdditionalConstructorsExtension.php';
require_once __DIR__ . '/src/Reflection/WrappedExtendedMethodReflection.php';
require_once __DIR__ . '/src/Reflection/GenericParametersAcceptorResolver.php';
require_once __DIR__ . '/src/Reflection/MethodReflection.php';
require_once __DIR__ . '/src/Reflection/ParameterReflection.php';
require_once __DIR__ . '/src/Reflection/ResolvedMethodReflection.php';
require_once __DIR__ . '/src/Reflection/ParametersAcceptor.php';
require_once __DIR__ . '/src/Reflection/BetterReflection/BetterReflectionSourceLocatorFactory.php';
require_once __DIR__ . '/src/Reflection/BetterReflection/SourceLocator/FetchedNodesResult.php';
require_once __DIR__ . '/src/Reflection/BetterReflection/SourceLocator/FetchedNode.php';
require_once __DIR__ . '/src/Reflection/BetterReflection/SourceLocator/PhpFileCleaner.php';
require_once __DIR__ . '/src/Reflection/BetterReflection/SourceLocator/RewriteClassAliasSourceLocator.php';
require_once __DIR__ . '/src/Reflection/BetterReflection/SourceLocator/FileReadTrapStreamWrapper.php';
require_once __DIR__ . '/src/Reflection/BetterReflection/SourceLocator/AutoloadSourceLocator.php';
require_once __DIR__ . '/src/Reflection/BetterReflection/SourceLocator/OptimizedPsrAutoloaderLocator.php';
require_once __DIR__ . '/src/Reflection/BetterReflection/SourceLocator/ReflectionClassSourceLocator.php';
require_once __DIR__ . '/src/Reflection/BetterReflection/SourceLocator/OptimizedSingleFileSourceLocatorFactory.php';
require_once __DIR__ . '/src/Reflection/BetterReflection/SourceLocator/OptimizedSingleFileSourceLocatorRepository.php';
require_once __DIR__ . '/src/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocator.php';
require_once __DIR__ . '/src/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocatorRepository.php';
require_once __DIR__ . '/src/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocatorFactory.php';
require_once __DIR__ . '/src/Reflection/BetterReflection/SourceLocator/CachingVisitor.php';
require_once __DIR__ . '/src/Reflection/BetterReflection/SourceLocator/OptimizedPsrAutoloaderLocatorFactory.php';
require_once __DIR__ . '/src/Reflection/BetterReflection/SourceLocator/AutoloadFunctionsSourceLocator.php';
require_once __DIR__ . '/src/Reflection/BetterReflection/SourceLocator/ComposerJsonAndInstalledJsonSourceLocatorMaker.php';
require_once __DIR__ . '/src/Reflection/BetterReflection/SourceLocator/PhpVersionBlacklistSourceLocator.php';
require_once __DIR__ . '/src/Reflection/BetterReflection/SourceLocator/OptimizedSingleFileSourceLocator.php';
require_once __DIR__ . '/src/Reflection/BetterReflection/SourceLocator/SkipClassAliasSourceLocator.php';
require_once __DIR__ . '/src/Reflection/BetterReflection/SourceLocator/FileNodesFetcher.php';
require_once __DIR__ . '/src/Reflection/BetterReflection/Reflector/MemoizingReflector.php';
require_once __DIR__ . '/src/Reflection/BetterReflection/BetterReflectionProvider.php';
require_once __DIR__ . '/src/Reflection/BetterReflection/BetterReflectionProviderFactory.php';
require_once __DIR__ . '/src/Reflection/BetterReflection/SourceStubber/PhpStormStubsSourceStubberFactory.php';
require_once __DIR__ . '/src/Reflection/ConstantNameHelper.php';
require_once __DIR__ . '/src/Reflection/ClassMemberReflection.php';
require_once __DIR__ . '/src/Reflection/ClassMemberAccessAnswerer.php';
require_once __DIR__ . '/src/Reflection/FunctionReflectionFactory.php';
require_once __DIR__ . '/src/Reflection/PropertiesClassReflectionExtension.php';
require_once __DIR__ . '/src/Reflection/ReflectionProvider.php';
require_once __DIR__ . '/src/Reflection/AllowedSubTypesClassReflectionExtension.php';
require_once __DIR__ . '/src/Reflection/ReflectionProviderStaticAccessor.php';
require_once __DIR__ . '/src/Reflection/ClassReflection.php';
require_once __DIR__ . '/src/Reflection/ParametersAcceptorSelector.php';
require_once __DIR__ . '/src/Reflection/MethodsClassReflectionExtension.php';
require_once __DIR__ . '/src/Reflection/Mixin/MixinPropertiesClassReflectionExtension.php';
require_once __DIR__ . '/src/Reflection/Mixin/MixinMethodReflection.php';
require_once __DIR__ . '/src/Reflection/Mixin/MixinMethodsClassReflectionExtension.php';
require_once __DIR__ . '/src/Reflection/InaccessibleMethod.php';
require_once __DIR__ . '/src/Reflection/ReflectionProvider/DirectReflectionProviderProvider.php';
require_once __DIR__ . '/src/Reflection/ReflectionProvider/ReflectionProviderFactory.php';
require_once __DIR__ . '/src/Reflection/ReflectionProvider/LazyReflectionProviderProvider.php';
require_once __DIR__ . '/src/Reflection/ReflectionProvider/SetterReflectionProviderProvider.php';
require_once __DIR__ . '/src/Reflection/ReflectionProvider/ReflectionProviderProvider.php';
require_once __DIR__ . '/src/Reflection/ReflectionProvider/DummyReflectionProvider.php';
require_once __DIR__ . '/src/Reflection/ReflectionProvider/MemoizingReflectionProvider.php';
require_once __DIR__ . '/src/Reflection/WrapperPropertyReflection.php';
require_once __DIR__ . '/src/Reflection/ParameterReflectionWithPhpDocs.php';
require_once __DIR__ . '/src/Reflection/BrokerAwareExtension.php';
require_once __DIR__ . '/src/Reflection/InitializerExprTypeResolver.php';
require_once __DIR__ . '/src/Reflection/Php/SimpleXMLElementProperty.php';
require_once __DIR__ . '/src/Reflection/Php/EnumCasesMethodReflection.php';
require_once __DIR__ . '/src/Reflection/Php/PhpFunctionReflection.php';
require_once __DIR__ . '/src/Reflection/Php/UniversalObjectCrateProperty.php';
require_once __DIR__ . '/src/Reflection/Php/PhpParameterReflection.php';
require_once __DIR__ . '/src/Reflection/Php/DummyParameter.php';
require_once __DIR__ . '/src/Reflection/Php/EnumPropertyReflection.php';
require_once __DIR__ . '/src/Reflection/Php/FakeBuiltinMethodReflection.php';
require_once __DIR__ . '/src/Reflection/Php/BuiltinMethodReflection.php';
require_once __DIR__ . '/src/Reflection/Php/PhpParameterFromParserNodeReflection.php';
require_once __DIR__ . '/src/Reflection/Php/Soap/SoapClientMethodsClassReflectionExtension.php';
require_once __DIR__ . '/src/Reflection/Php/Soap/SoapClientMethodReflection.php';
require_once __DIR__ . '/src/Reflection/Php/PhpMethodReflectionFactory.php';
require_once __DIR__ . '/src/Reflection/Php/PhpPropertyReflection.php';
require_once __DIR__ . '/src/Reflection/Php/PhpFunctionFromParserNodeReflection.php';
require_once __DIR__ . '/src/Reflection/Php/NativeBuiltinMethodReflection.php';
require_once __DIR__ . '/src/Reflection/Php/ClosureCallMethodReflection.php';
require_once __DIR__ . '/src/Reflection/Php/PhpMethodReflection.php';
require_once __DIR__ . '/src/Reflection/Php/DummyParameterWithPhpDocs.php';
require_once __DIR__ . '/src/Reflection/Php/PhpMethodFromParserNodeReflection.php';
require_once __DIR__ . '/src/Reflection/Php/PhpClassReflectionExtension.php';
require_once __DIR__ . '/src/Reflection/Php/EnumAllowedSubTypesClassReflectionExtension.php';
require_once __DIR__ . '/src/Reflection/Php/UniversalObjectCratesClassReflectionExtension.php';
require_once __DIR__ . '/src/Reflection/Php/EnumUnresolvedPropertyPrototypeReflection.php';
require_once __DIR__ . '/src/Reflection/Php/ClosureCallUnresolvedMethodPrototypeReflection.php';
require_once __DIR__ . '/src/Reflection/FunctionReflection.php';
require_once __DIR__ . '/src/Broker/AnonymousClassNameHelper.php';
require_once __DIR__ . '/src/Broker/BrokerFactory.php';
require_once __DIR__ . '/src/Broker/ClassNotFoundException.php';
require_once __DIR__ . '/src/Broker/ClassAutoloadingException.php';
require_once __DIR__ . '/src/Broker/FunctionNotFoundException.php';
require_once __DIR__ . '/src/Broker/Broker.php';
require_once __DIR__ . '/src/Broker/ConstantNotFoundException.php';
require_once __DIR__ . '/src/TrinaryLogic.php';
require_once __DIR__ . '/src/Rules/Exceptions/ThrowExpressionRule.php';
require_once __DIR__ . '/src/Rules/Exceptions/MissingCheckedExceptionInMethodThrowsRule.php';
require_once __DIR__ . '/src/Rules/Exceptions/CatchWithUnthrownExceptionRule.php';
require_once __DIR__ . '/src/Rules/Exceptions/ThrowsVoidMethodWithExplicitThrowPointRule.php';
require_once __DIR__ . '/src/Rules/Exceptions/ThrowsVoidFunctionWithExplicitThrowPointRule.php';
require_once __DIR__ . '/src/Rules/Exceptions/DefaultExceptionTypeResolver.php';
require_once __DIR__ . '/src/Rules/Exceptions/OverwrittenExitPointByFinallyRule.php';
require_once __DIR__ . '/src/Rules/Exceptions/CaughtExceptionExistenceRule.php';
require_once __DIR__ . '/src/Rules/Exceptions/TooWideFunctionThrowTypeRule.php';
require_once __DIR__ . '/src/Rules/Exceptions/TooWideMethodThrowTypeRule.php';
require_once __DIR__ . '/src/Rules/Exceptions/TooWideThrowTypeCheck.php';
require_once __DIR__ . '/src/Rules/Exceptions/MissingCheckedExceptionInFunctionThrowsRule.php';
require_once __DIR__ . '/src/Rules/Exceptions/ExceptionTypeResolver.php';
require_once __DIR__ . '/src/Rules/Exceptions/MissingCheckedExceptionInThrowsCheck.php';
require_once __DIR__ . '/src/Rules/Playground/MethodNeverRule.php';
require_once __DIR__ . '/src/Rules/Playground/NeverRuleHelper.php';
require_once __DIR__ . '/src/Rules/Playground/FunctionNeverRule.php';
require_once __DIR__ . '/src/Rules/Operators/InvalidComparisonOperationRule.php';
require_once __DIR__ . '/src/Rules/Operators/InvalidBinaryOperationRule.php';
require_once __DIR__ . '/src/Rules/Operators/InvalidAssignVarRule.php';
require_once __DIR__ . '/src/Rules/Operators/InvalidIncDecOperationRule.php';
require_once __DIR__ . '/src/Rules/Operators/InvalidUnaryOperationRule.php';
require_once __DIR__ . '/src/Rules/EnumCases/EnumCaseAttributesRule.php';
require_once __DIR__ . '/src/Rules/Debug/DumpTypeRule.php';
require_once __DIR__ . '/src/Rules/Debug/FileAssertRule.php';
require_once __DIR__ . '/src/Rules/Properties/UninitializedPropertyRule.php';
require_once __DIR__ . '/src/Rules/Properties/ReadOnlyByPhpDocPropertyAssignRule.php';
require_once __DIR__ . '/src/Rules/Properties/OverridingPropertyRule.php';
require_once __DIR__ . '/src/Rules/Properties/ReadOnlyByPhpDocPropertyRule.php';
require_once __DIR__ . '/src/Rules/Properties/MissingPropertyTypehintRule.php';
require_once __DIR__ . '/src/Rules/Properties/AccessPropertiesInAssignRule.php';
require_once __DIR__ . '/src/Rules/Properties/ReadingWriteOnlyPropertiesRule.php';
require_once __DIR__ . '/src/Rules/Properties/MissingReadOnlyByPhpDocPropertyAssignRule.php';
require_once __DIR__ . '/src/Rules/Properties/MissingReadOnlyPropertyAssignRule.php';
require_once __DIR__ . '/src/Rules/Properties/ReadOnlyByPhpDocPropertyAssignRefRule.php';
require_once __DIR__ . '/src/Rules/Properties/ReadOnlyPropertyRule.php';
require_once __DIR__ . '/src/Rules/Properties/PropertyDescriptor.php';
require_once __DIR__ . '/src/Rules/Properties/ReadWritePropertiesExtensionProvider.php';
require_once __DIR__ . '/src/Rules/Properties/TypesAssignedToPropertiesRule.php';
require_once __DIR__ . '/src/Rules/Properties/DirectReadWritePropertiesExtensionProvider.php';
require_once __DIR__ . '/src/Rules/Properties/AccessStaticPropertiesInAssignRule.php';
require_once __DIR__ . '/src/Rules/Properties/ReadOnlyPropertyAssignRule.php';
require_once __DIR__ . '/src/Rules/Properties/NullsafePropertyFetchRule.php';
require_once __DIR__ . '/src/Rules/Properties/ExistingClassesInPropertiesRule.php';
require_once __DIR__ . '/src/Rules/Properties/FoundPropertyReflection.php';
require_once __DIR__ . '/src/Rules/Properties/AccessStaticPropertiesRule.php';
require_once __DIR__ . '/src/Rules/Properties/PropertyAttributesRule.php';
require_once __DIR__ . '/src/Rules/Properties/AccessPrivatePropertyThroughStaticRule.php';
require_once __DIR__ . '/src/Rules/Properties/PropertyReflectionFinder.php';
require_once __DIR__ . '/src/Rules/Properties/ReadOnlyPropertyAssignRefRule.php';
require_once __DIR__ . '/src/Rules/Properties/AccessPropertiesRule.php';
require_once __DIR__ . '/src/Rules/Properties/ReadWritePropertiesExtension.php';
require_once __DIR__ . '/src/Rules/Properties/LazyReadWritePropertiesExtensionProvider.php';
require_once __DIR__ . '/src/Rules/Properties/WritingToReadOnlyPropertiesRule.php';
require_once __DIR__ . '/src/Rules/Properties/DefaultValueTypesAssignedToPropertiesRule.php';
require_once __DIR__ . '/src/Rules/DateTimeInstantiationRule.php';
require_once __DIR__ . '/src/Rules/RuleErrorBuilder.php';
require_once __DIR__ . '/src/Rules/RuleLevelHelperAcceptsResult.php';
require_once __DIR__ . '/src/Rules/FoundTypeResult.php';
require_once __DIR__ . '/src/Rules/UnusedFunctionParametersCheck.php';
require_once __DIR__ . '/src/Rules/Methods/MethodCallableRule.php';
require_once __DIR__ . '/src/Rules/Methods/StaticMethodCallCheck.php';
require_once __DIR__ . '/src/Rules/Methods/AbstractMethodInNonAbstractClassRule.php';
require_once __DIR__ . '/src/Rules/Methods/MethodCallCheck.php';
require_once __DIR__ . '/src/Rules/Methods/CallMethodsRule.php';
require_once __DIR__ . '/src/Rules/Methods/NullsafeMethodCallRule.php';
require_once __DIR__ . '/src/Rules/Methods/MissingMethodParameterTypehintRule.php';
require_once __DIR__ . '/src/Rules/Methods/MethodParameterComparisonHelper.php';
require_once __DIR__ . '/src/Rules/Methods/StaticMethodCallableRule.php';
require_once __DIR__ . '/src/Rules/Methods/CallToConstructorStatementWithoutSideEffectsRule.php';
require_once __DIR__ . '/src/Rules/Methods/MethodSignatureRule.php';
require_once __DIR__ . '/src/Rules/Methods/MethodAttributesRule.php';
require_once __DIR__ . '/src/Rules/Methods/CallToStaticMethodStatementWithoutSideEffectsRule.php';
require_once __DIR__ . '/src/Rules/Methods/FinalPrivateMethodRule.php';
require_once __DIR__ . '/src/Rules/Methods/MissingMagicSerializationMethodsRule.php';
require_once __DIR__ . '/src/Rules/Methods/MissingMethodImplementationRule.php';
require_once __DIR__ . '/src/Rules/Methods/IllegalConstructorMethodCallRule.php';
require_once __DIR__ . '/src/Rules/Methods/OverridingMethodRule.php';
require_once __DIR__ . '/src/Rules/Methods/ReturnTypeRule.php';
require_once __DIR__ . '/src/Rules/Methods/MissingMethodReturnTypehintRule.php';
require_once __DIR__ . '/src/Rules/Methods/ConsistentConstructorRule.php';
require_once __DIR__ . '/src/Rules/Methods/CallToMethodStatementWithoutSideEffectsRule.php';
require_once __DIR__ . '/src/Rules/Methods/CallStaticMethodsRule.php';
require_once __DIR__ . '/src/Rules/Methods/ExistingClassesInTypehintsRule.php';
require_once __DIR__ . '/src/Rules/Methods/IllegalConstructorStaticCallRule.php';
require_once __DIR__ . '/src/Rules/Methods/CallPrivateMethodThroughStaticRule.php';
require_once __DIR__ . '/src/Rules/Methods/IncompatibleDefaultParameterTypeRule.php';
require_once __DIR__ . '/src/Rules/LazyRegistry.php';
require_once __DIR__ . '/src/Rules/Generics/FunctionTemplateTypeRule.php';
require_once __DIR__ . '/src/Rules/Generics/InterfaceTemplateTypeRule.php';
require_once __DIR__ . '/src/Rules/Generics/EnumTemplateTypeRule.php';
require_once __DIR__ . '/src/Rules/Generics/TemplateTypeCheck.php';
require_once __DIR__ . '/src/Rules/Generics/EnumAncestorsRule.php';
require_once __DIR__ . '/src/Rules/Generics/MethodTemplateTypeRule.php';
require_once __DIR__ . '/src/Rules/Generics/GenericAncestorsCheck.php';
require_once __DIR__ . '/src/Rules/Generics/ClassAncestorsRule.php';
require_once __DIR__ . '/src/Rules/Generics/UsedTraitsRule.php';
require_once __DIR__ . '/src/Rules/Generics/CrossCheckInterfacesHelper.php';
require_once __DIR__ . '/src/Rules/Generics/MethodSignatureVarianceRule.php';
require_once __DIR__ . '/src/Rules/Generics/PropertyVarianceRule.php';
require_once __DIR__ . '/src/Rules/Generics/TraitTemplateTypeRule.php';
require_once __DIR__ . '/src/Rules/Generics/FunctionSignatureVarianceRule.php';
require_once __DIR__ . '/src/Rules/Generics/GenericObjectTypeCheck.php';
require_once __DIR__ . '/src/Rules/Generics/VarianceCheck.php';
require_once __DIR__ . '/src/Rules/Generics/InterfaceAncestorsRule.php';
require_once __DIR__ . '/src/Rules/Generics/ClassTemplateTypeRule.php';
require_once __DIR__ . '/src/Rules/RuleLevelHelper.php';
require_once __DIR__ . '/src/Rules/TooWideTypehints/TooWideMethodReturnTypehintRule.php';
require_once __DIR__ . '/src/Rules/TooWideTypehints/TooWideFunctionReturnTypehintRule.php';
require_once __DIR__ . '/src/Rules/TooWideTypehints/TooWideArrowFunctionReturnTypehintRule.php';
require_once __DIR__ . '/src/Rules/TooWideTypehints/TooWideClosureReturnTypehintRule.php';
require_once __DIR__ . '/src/Rules/Classes/DuplicateClassDeclarationRule.php';
require_once __DIR__ . '/src/Rules/Classes/InvalidPromotedPropertiesRule.php';
require_once __DIR__ . '/src/Rules/Classes/LocalTypeAliasesRule.php';
require_once __DIR__ . '/src/Rules/Classes/LocalTypeTraitAliasesRule.php';
require_once __DIR__ . '/src/Rules/Classes/ExistingClassInTraitUseRule.php';
require_once __DIR__ . '/src/Rules/Classes/ClassConstantAttributesRule.php';
require_once __DIR__ . '/src/Rules/Classes/MixinRule.php';
require_once __DIR__ . '/src/Rules/Classes/ClassAttributesRule.php';
require_once __DIR__ . '/src/Rules/Classes/UnusedConstructorParametersRule.php';
require_once __DIR__ . '/src/Rules/Classes/ExistingClassesInInterfaceExtendsRule.php';
require_once __DIR__ . '/src/Rules/Classes/InstantiationRule.php';
require_once __DIR__ . '/src/Rules/Classes/AllowedSubTypesRule.php';
require_once __DIR__ . '/src/Rules/Classes/ExistingClassInClassExtendsRule.php';
require_once __DIR__ . '/src/Rules/Classes/TraitAttributeClassRule.php';
require_once __DIR__ . '/src/Rules/Classes/AccessPrivateConstantThroughStaticRule.php';
require_once __DIR__ . '/src/Rules/Classes/EnumSanityRule.php';
require_once __DIR__ . '/src/Rules/Classes/ImpossibleInstanceOfRule.php';
require_once __DIR__ . '/src/Rules/Classes/LocalTypeAliasesCheck.php';
require_once __DIR__ . '/src/Rules/Classes/DuplicateDeclarationRule.php';
require_once __DIR__ . '/src/Rules/Classes/ExistingClassesInClassImplementsRule.php';
require_once __DIR__ . '/src/Rules/Classes/ExistingClassInInstanceOfRule.php';
require_once __DIR__ . '/src/Rules/Classes/NonClassAttributeClassRule.php';
require_once __DIR__ . '/src/Rules/Classes/NewStaticRule.php';
require_once __DIR__ . '/src/Rules/Classes/ClassConstantRule.php';
require_once __DIR__ . '/src/Rules/Classes/InstantiationCallableRule.php';
require_once __DIR__ . '/src/Rules/Classes/ExistingClassesInEnumImplementsRule.php';
require_once __DIR__ . '/src/Rules/AttributesCheck.php';
require_once __DIR__ . '/src/Rules/Generators/YieldTypeRule.php';
require_once __DIR__ . '/src/Rules/Generators/YieldInGeneratorRule.php';
require_once __DIR__ . '/src/Rules/Generators/YieldFromTypeRule.php';
require_once __DIR__ . '/src/Rules/RuleError.php';
require_once __DIR__ . '/src/Rules/PhpDoc/IncompatiblePropertyPhpDocTypeRule.php';
require_once __DIR__ . '/src/Rules/PhpDoc/IncompatiblePhpDocTypeRule.php';
require_once __DIR__ . '/src/Rules/PhpDoc/ConditionalReturnTypeRuleHelper.php';
require_once __DIR__ . '/src/Rules/PhpDoc/VarTagChangedExpressionTypeRule.php';
require_once __DIR__ . '/src/Rules/PhpDoc/IncompatibleSelfOutTypeRule.php';
require_once __DIR__ . '/src/Rules/PhpDoc/FunctionAssertRule.php';
require_once __DIR__ . '/src/Rules/PhpDoc/InvalidPhpDocTagValueRule.php';
require_once __DIR__ . '/src/Rules/PhpDoc/InvalidThrowsPhpDocValueRule.php';
require_once __DIR__ . '/src/Rules/PhpDoc/UnresolvableTypeHelper.php';
require_once __DIR__ . '/src/Rules/PhpDoc/InvalidPhpDocVarTagTypeRule.php';
require_once __DIR__ . '/src/Rules/PhpDoc/MethodConditionalReturnTypeRule.php';
require_once __DIR__ . '/src/Rules/PhpDoc/VarTagTypeRuleHelper.php';
require_once __DIR__ . '/src/Rules/PhpDoc/IncompatibleClassConstantPhpDocTypeRule.php';
require_once __DIR__ . '/src/Rules/PhpDoc/MethodAssertRule.php';
require_once __DIR__ . '/src/Rules/PhpDoc/FunctionConditionalReturnTypeRule.php';
require_once __DIR__ . '/src/Rules/PhpDoc/InvalidPHPStanDocTagRule.php';
require_once __DIR__ . '/src/Rules/PhpDoc/WrongVariableNameInVarTagRule.php';
require_once __DIR__ . '/src/Rules/PhpDoc/AssertRuleHelper.php';
require_once __DIR__ . '/src/Rules/Arrays/DuplicateKeysInLiteralArraysRule.php';
require_once __DIR__ . '/src/Rules/Arrays/EmptyArrayItemRule.php';
require_once __DIR__ . '/src/Rules/Arrays/DeadForeachRule.php';
require_once __DIR__ . '/src/Rules/Arrays/InvalidKeyInArrayDimFetchRule.php';
require_once __DIR__ . '/src/Rules/Arrays/AllowedArrayKeysTypes.php';
require_once __DIR__ . '/src/Rules/Arrays/ArrayUnpackingRule.php';
require_once __DIR__ . '/src/Rules/Arrays/AppendedArrayKeyTypeRule.php';
require_once __DIR__ . '/src/Rules/Arrays/OffsetAccessValueAssignmentRule.php';
require_once __DIR__ . '/src/Rules/Arrays/NonexistentOffsetInArrayDimFetchCheck.php';
require_once __DIR__ . '/src/Rules/Arrays/OffsetAccessAssignOpRule.php';
require_once __DIR__ . '/src/Rules/Arrays/UnpackIterableInArrayRule.php';
require_once __DIR__ . '/src/Rules/Arrays/OffsetAccessWithoutDimForReadingRule.php';
require_once __DIR__ . '/src/Rules/Arrays/AppendedArrayItemTypeRule.php';
require_once __DIR__ . '/src/Rules/Arrays/NonexistentOffsetInArrayDimFetchRule.php';
require_once __DIR__ . '/src/Rules/Arrays/OffsetAccessAssignmentRule.php';
require_once __DIR__ . '/src/Rules/Arrays/InvalidKeyInArrayItemRule.php';
require_once __DIR__ . '/src/Rules/Arrays/ArrayDestructuringRule.php';
require_once __DIR__ . '/src/Rules/Arrays/IterableInForeachRule.php';
require_once __DIR__ . '/src/Rules/DeadCode/UnusedPrivateMethodRule.php';
require_once __DIR__ . '/src/Rules/DeadCode/UnreachableStatementRule.php';
require_once __DIR__ . '/src/Rules/DeadCode/UnusedPrivateConstantRule.php';
require_once __DIR__ . '/src/Rules/DeadCode/NoopRule.php';
require_once __DIR__ . '/src/Rules/DeadCode/UnusedPrivatePropertyRule.php';
require_once __DIR__ . '/src/Rules/Constants/AlwaysUsedClassConstantsExtensionProvider.php';
require_once __DIR__ . '/src/Rules/Constants/OverridingConstantRule.php';
require_once __DIR__ . '/src/Rules/Constants/FinalConstantRule.php';
require_once __DIR__ . '/src/Rules/Constants/LazyAlwaysUsedClassConstantsExtensionProvider.php';
require_once __DIR__ . '/src/Rules/Constants/ConstantRule.php';
require_once __DIR__ . '/src/Rules/Constants/AlwaysUsedClassConstantsExtension.php';
require_once __DIR__ . '/src/Rules/Constants/MissingClassConstantTypehintRule.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError27.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError15.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError51.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError23.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError67.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError19.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError105.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError113.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError103.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError89.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError33.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError77.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError7.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError97.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError71.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError81.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError127.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError53.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError49.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError109.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError95.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError9.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError37.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError107.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError125.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError65.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError101.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError57.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError55.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError99.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError115.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError11.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError91.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError111.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError25.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError39.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError59.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError121.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError41.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError87.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError119.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError5.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError117.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError93.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError79.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError29.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError17.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError47.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError73.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError123.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError63.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError31.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError83.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError69.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError3.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError13.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError1.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError85.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError75.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError45.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError43.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError21.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError61.php';
require_once __DIR__ . '/src/Rules/RuleErrors/RuleError35.php';
require_once __DIR__ . '/src/Rules/Traits/NotAnalysedTraitRule.php';
require_once __DIR__ . '/src/Rules/Traits/TraitUseCollector.php';
require_once __DIR__ . '/src/Rules/Traits/TraitDeclarationCollector.php';
require_once __DIR__ . '/src/Rules/ClassCaseSensitivityCheck.php';
require_once __DIR__ . '/src/Rules/Registry.php';
require_once __DIR__ . '/src/Rules/ClassNameNodePair.php';
require_once __DIR__ . '/src/Rules/DirectRegistry.php';
require_once __DIR__ . '/src/Rules/FunctionReturnTypeCheck.php';
require_once __DIR__ . '/src/Rules/Cast/PrintRule.php';
require_once __DIR__ . '/src/Rules/Cast/InvalidPartOfEncapsedStringRule.php';
require_once __DIR__ . '/src/Rules/Cast/EchoRule.php';
require_once __DIR__ . '/src/Rules/Cast/UnsetCastRule.php';
require_once __DIR__ . '/src/Rules/Cast/InvalidCastRule.php';
require_once __DIR__ . '/src/Rules/Whitespace/FileWhitespaceRule.php';
require_once __DIR__ . '/src/Rules/NullsafeCheck.php';
require_once __DIR__ . '/src/Rules/FunctionCallParametersCheck.php';
require_once __DIR__ . '/src/Rules/IssetCheck.php';
require_once __DIR__ . '/src/Rules/NonIgnorableRuleError.php';
require_once __DIR__ . '/src/Rules/MissingTypehintCheck.php';
require_once __DIR__ . '/src/Rules/FileRuleError.php';
require_once __DIR__ . '/src/Rules/Namespaces/ExistingNamesInGroupUseRule.php';
require_once __DIR__ . '/src/Rules/Namespaces/ExistingNamesInUseRule.php';
require_once __DIR__ . '/src/Rules/Variables/DefinedVariableRule.php';
require_once __DIR__ . '/src/Rules/Variables/EmptyRule.php';
require_once __DIR__ . '/src/Rules/Variables/CompactVariablesRule.php';
require_once __DIR__ . '/src/Rules/Variables/NullCoalesceRule.php';
require_once __DIR__ . '/src/Rules/Variables/ThrowTypeRule.php';
require_once __DIR__ . '/src/Rules/Variables/VariableCloningRule.php';
require_once __DIR__ . '/src/Rules/Variables/IssetRule.php';
require_once __DIR__ . '/src/Rules/Variables/UnsetRule.php';
require_once __DIR__ . '/src/Rules/FunctionDefinitionCheck.php';
require_once __DIR__ . '/src/Rules/Api/ApiRuleHelper.php';
require_once __DIR__ . '/src/Rules/Api/ApiInterfaceExtendsRule.php';
require_once __DIR__ . '/src/Rules/Api/GetTemplateTypeRule.php';
require_once __DIR__ . '/src/Rules/Api/ApiTraitUseRule.php';
require_once __DIR__ . '/src/Rules/Api/RuntimeReflectionInstantiationRule.php';
require_once __DIR__ . '/src/Rules/Api/ApiStaticCallRule.php';
require_once __DIR__ . '/src/Rules/Api/ApiInstanceofTypeRule.php';
require_once __DIR__ . '/src/Rules/Api/ApiClassExtendsRule.php';
require_once __DIR__ . '/src/Rules/Api/ApiInstanceofRule.php';
require_once __DIR__ . '/src/Rules/Api/ApiClassImplementsRule.php';
require_once __DIR__ . '/src/Rules/Api/ApiClassConstFetchRule.php';
require_once __DIR__ . '/src/Rules/Api/ApiInstantiationRule.php';
require_once __DIR__ . '/src/Rules/Api/PhpStanNamespaceIn3rdPartyPackageRule.php';
require_once __DIR__ . '/src/Rules/Api/NodeConnectingVisitorAttributesRule.php';
require_once __DIR__ . '/src/Rules/Api/RuntimeReflectionFunctionRule.php';
require_once __DIR__ . '/src/Rules/Api/ApiMethodCallRule.php';
require_once __DIR__ . '/src/Rules/Api/BcUncoveredInterface.php';
require_once __DIR__ . '/src/Rules/Comparison/ImpossibleCheckTypeMethodCallRule.php';
require_once __DIR__ . '/src/Rules/Comparison/StrictComparisonOfDifferentTypesRule.php';
require_once __DIR__ . '/src/Rules/Comparison/UnreachableTernaryElseBranchRule.php';
require_once __DIR__ . '/src/Rules/Comparison/ImpossibleCheckTypeFunctionCallRule.php';
require_once __DIR__ . '/src/Rules/Comparison/TernaryOperatorConstantConditionRule.php';
require_once __DIR__ . '/src/Rules/Comparison/MatchExpressionRule.php';
require_once __DIR__ . '/src/Rules/Comparison/ConstantConditionRuleHelper.php';
require_once __DIR__ . '/src/Rules/Comparison/ImpossibleCheckTypeStaticMethodCallRule.php';
require_once __DIR__ . '/src/Rules/Comparison/DoWhileLoopConstantConditionRule.php';
require_once __DIR__ . '/src/Rules/Comparison/ElseIfConstantConditionRule.php';
require_once __DIR__ . '/src/Rules/Comparison/BooleanAndConstantConditionRule.php';
require_once __DIR__ . '/src/Rules/Comparison/ImpossibleCheckTypeHelper.php';
require_once __DIR__ . '/src/Rules/Comparison/NumberComparisonOperatorsConstantConditionRule.php';
require_once __DIR__ . '/src/Rules/Comparison/WhileLoopAlwaysTrueConditionRule.php';
require_once __DIR__ . '/src/Rules/Comparison/WhileLoopAlwaysFalseConditionRule.php';
require_once __DIR__ . '/src/Rules/Comparison/BooleanNotConstantConditionRule.php';
require_once __DIR__ . '/src/Rules/Comparison/IfConstantConditionRule.php';
require_once __DIR__ . '/src/Rules/Comparison/ConstantLooseComparisonRule.php';
require_once __DIR__ . '/src/Rules/Comparison/UsageOfVoidMatchExpressionRule.php';
require_once __DIR__ . '/src/Rules/Comparison/BooleanOrConstantConditionRule.php';
require_once __DIR__ . '/src/Rules/Comparison/UnreachableIfBranchesRule.php';
require_once __DIR__ . '/src/Rules/IdentifierRuleError.php';
require_once __DIR__ . '/src/Rules/Rule.php';
require_once __DIR__ . '/src/Rules/Missing/MissingReturnRule.php';
require_once __DIR__ . '/src/Rules/TipRuleError.php';
require_once __DIR__ . '/src/Rules/Regexp/RegularExpressionPatternRule.php';
require_once __DIR__ . '/src/Rules/Functions/ExistingClassesInClosureTypehintsRule.php';
require_once __DIR__ . '/src/Rules/Functions/FunctionCallableRule.php';
require_once __DIR__ . '/src/Rules/Functions/ClosureReturnTypeRule.php';
require_once __DIR__ . '/src/Rules/Functions/ArrowFunctionAttributesRule.php';
require_once __DIR__ . '/src/Rules/Functions/ReturnNullsafeByRefRule.php';
require_once __DIR__ . '/src/Rules/Functions/IncompatibleArrowFunctionDefaultParameterTypeRule.php';
require_once __DIR__ . '/src/Rules/Functions/ClosureAttributesRule.php';
require_once __DIR__ . '/src/Rules/Functions/FunctionAttributesRule.php';
require_once __DIR__ . '/src/Rules/Functions/CallToFunctionParametersRule.php';
require_once __DIR__ . '/src/Rules/Functions/InnerFunctionRule.php';
require_once __DIR__ . '/src/Rules/Functions/DuplicateFunctionDeclarationRule.php';
require_once __DIR__ . '/src/Rules/Functions/ImplodeFunctionRule.php';
require_once __DIR__ . '/src/Rules/Functions/DefineParametersRule.php';
require_once __DIR__ . '/src/Rules/Functions/ArrowFunctionReturnTypeRule.php';
require_once __DIR__ . '/src/Rules/Functions/MissingFunctionReturnTypehintRule.php';
require_once __DIR__ . '/src/Rules/Functions/ArrayFilterRule.php';
require_once __DIR__ . '/src/Rules/Functions/UnusedClosureUsesRule.php';
require_once __DIR__ . '/src/Rules/Functions/ExistingClassesInArrowFunctionTypehintsRule.php';
require_once __DIR__ . '/src/Rules/Functions/ReturnTypeRule.php';
require_once __DIR__ . '/src/Rules/Functions/MissingFunctionParameterTypehintRule.php';
require_once __DIR__ . '/src/Rules/Functions/ArrowFunctionReturnNullsafeByRefRule.php';
require_once __DIR__ . '/src/Rules/Functions/ParamAttributesRule.php';
require_once __DIR__ . '/src/Rules/Functions/ExistingClassesInTypehintsRule.php';
require_once __DIR__ . '/src/Rules/Functions/CallCallablesRule.php';
require_once __DIR__ . '/src/Rules/Functions/CallToNonExistentFunctionRule.php';
require_once __DIR__ . '/src/Rules/Functions/RandomIntParametersRule.php';
require_once __DIR__ . '/src/Rules/Functions/CallToFunctionStatementWithoutSideEffectsRule.php';
require_once __DIR__ . '/src/Rules/Functions/IncompatibleDefaultParameterTypeRule.php';
require_once __DIR__ . '/src/Rules/Functions/IncompatibleClosureDefaultParameterTypeRule.php';
require_once __DIR__ . '/src/Rules/Functions/PrintfParametersRule.php';
require_once __DIR__ . '/src/Rules/LineRuleError.php';
require_once __DIR__ . '/src/Rules/Keywords/ContinueBreakInLoopRule.php';
require_once __DIR__ . '/src/Rules/MetadataRuleError.php';
require_once __DIR__ . '/src/ShouldNotHappenException.php';
require_once __DIR__ . '/src/Php/PhpVersion.php';
require_once __DIR__ . '/src/Php/PhpVersionFactoryFactory.php';
require_once __DIR__ . '/src/Php/PhpVersionFactory.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Comment.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NameContext.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Identifier.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Error.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Parser.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/NodeAttributes.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/NodeTraverser.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/Type/OffsetAccessTypeNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/Type/IntersectionTypeNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/Type/IdentifierTypeNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/Type/NullableTypeNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/Type/GenericTypeNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/Type/UnionTypeNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/Type/ConstTypeNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/Type/ArrayTypeNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/Type/InvalidTypeNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/Type/ObjectShapeNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/Type/ObjectShapeItemNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/Type/CallableTypeNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/Type/CallableTypeParameterNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/Type/ArrayShapeItemNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/Type/ArrayShapeNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/Type/ThisTypeNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/Type/ConditionalTypeForParameterNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/Type/ConditionalTypeNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/Type/TypeNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/QuoteAwareConstExprStringNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprStringNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprFloatNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprTrueNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprArrayItemNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstFetchNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprFalseNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprIntegerNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprArrayNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprNullNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/NodeVisitor/CloningVisitor.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/Attribute.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocChildNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/TypelessParamTagValueNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/AssertTagPropertyValueNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/TemplateTagValueNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/SelfOutTagValueNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/UsesTagValueNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/MethodTagValueParameterNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/ThrowsTagValueNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocTagValueNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/VarTagValueNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/TypeAliasImportTagValueNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/ParamOutTagValueNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocTextNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/Doctrine/DoctrineArrayItem.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/Doctrine/DoctrineAnnotation.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/Doctrine/DoctrineArray.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/Doctrine/DoctrineTagValueNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/Doctrine/DoctrineArgument.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/DeprecatedTagValueNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/TypeAliasTagValueNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/ImplementsTagValueNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/ReturnTagValueNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/ExtendsTagValueNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/PropertyTagValueNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/GenericTagValueNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/InvalidTagValueNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/MixinTagValueNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/AssertTagMethodValueNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/AssertTagValueNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/MethodTagValueNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/ParamTagValueNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocTagNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/AbstractNodeVisitor.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/Node.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/NodeVisitor.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Printer/Printer.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Printer/Differ.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Printer/DiffElem.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Lexer/Lexer.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Parser/TypeParser.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Parser/TokenIterator.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Parser/PhpDocParser.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Parser/ParserException.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Parser/ConstExprParser.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Parser/StringUnescaper.php';
includes:
	- config.level8.neon

parameters:
	checkExplicitMixed: true

includes:
	- config.level2.neon

conditionalTags:
	PHPStan\Rules\Arrays\ArrayUnpackingRule:
		phpstan.rules.rule: %featureToggles.arrayUnpacking%

	PHPStan\Rules\Properties\ReadOnlyByPhpDocPropertyAssignRefRule:
		phpstan.rules.rule: %featureToggles.readOnlyByPhpDoc%

	PHPStan\Rules\Properties\ReadOnlyByPhpDocPropertyAssignRule:
		phpstan.rules.rule: %featureToggles.readOnlyByPhpDoc%

rules:
	- PHPStan\Rules\Arrays\ArrayDestructuringRule
	- PHPStan\Rules\Arrays\IterableInForeachRule
	- PHPStan\Rules\Arrays\OffsetAccessAssignmentRule
	- PHPStan\Rules\Arrays\OffsetAccessAssignOpRule
	- PHPStan\Rules\Arrays\OffsetAccessValueAssignmentRule
	- PHPStan\Rules\Arrays\UnpackIterableInArrayRule
	- PHPStan\Rules\Functions\ArrowFunctionReturnTypeRule
	- PHPStan\Rules\Functions\ClosureReturnTypeRule
	- PHPStan\Rules\Functions\ReturnTypeRule
	- PHPStan\Rules\Generators\YieldTypeRule
	- PHPStan\Rules\Methods\ReturnTypeRule
	- PHPStan\Rules\Properties\DefaultValueTypesAssignedToPropertiesRule
	- PHPStan\Rules\Properties\ReadOnlyPropertyAssignRule
	- PHPStan\Rules\Properties\ReadOnlyPropertyAssignRefRule
	- PHPStan\Rules\Properties\TypesAssignedToPropertiesRule
	- PHPStan\Rules\Variables\ThrowTypeRule
	- PHPStan\Rules\Variables\VariableCloningRule

parameters:
	checkPhpDocMethodSignatures: true

services:
	-
		class: PHPStan\Rules\Arrays\InvalidKeyInArrayDimFetchRule
		arguments:
			reportMaybes: %reportMaybes%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Arrays\InvalidKeyInArrayItemRule
		arguments:
			reportMaybes: %reportMaybes%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Arrays\NonexistentOffsetInArrayDimFetchRule
		arguments:
			reportMaybes: %reportMaybes%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Exceptions\ThrowsVoidFunctionWithExplicitThrowPointRule
		arguments:
			exceptionTypeResolver: @exceptionTypeResolver
			missingCheckedExceptionInThrows: %exceptions.check.missingCheckedExceptionInThrows%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Exceptions\ThrowsVoidMethodWithExplicitThrowPointRule
		arguments:
			exceptionTypeResolver: @exceptionTypeResolver
			missingCheckedExceptionInThrows: %exceptions.check.missingCheckedExceptionInThrows%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Generators\YieldFromTypeRule
		arguments:
			reportMaybes: %reportMaybes%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Generators\YieldInGeneratorRule
		arguments:
			reportMaybes: %reportMaybes%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Arrays\ArrayUnpackingRule

	-
		class: PHPStan\Rules\Properties\ReadOnlyByPhpDocPropertyAssignRefRule

	-
		class: PHPStan\Rules\Properties\ReadOnlyByPhpDocPropertyAssignRule

includes:
	- config.level9.neon

parameters:
	checkThisOnly: false
	checkClassCaseSensitivity: true
	checkGenericClassInNonGenericObjectType: true
	checkMissingIterableValueType: true
	checkMissingTypehints: true
	checkMissingCallableSignature: false
	__validate: false

services:
	-
		class: PHPStan\PhpDoc\StubSourceLocatorFactory
		arguments:
			php8Parser: @php8PhpParser

	nodeScopeResolverClassReflector:
		factory: @stubReflector

	stubBetterReflectionProvider:
		class: PHPStan\Reflection\BetterReflection\BetterReflectionProvider
		arguments:
			reflector: @stubReflector

		autowired: false

	stubReflector:
		class: PHPStan\BetterReflection\Reflector\DefaultReflector
		arguments:
			sourceLocator: @stubSourceLocator

		autowired: false

	stubSourceLocator:
		class: PHPStan\BetterReflection\SourceLocator\Type\SourceLocator
		factory: @PHPStan\PhpDoc\StubSourceLocatorFactory::create()
		autowired: false

	reflectionProvider:
		factory: @stubBetterReflectionProvider
		autowired:
			- PHPStan\Reflection\ReflectionProvider

parameters:
	customRulesetUsed: false

conditionalTags:
	PHPStan\Rules\Api\NodeConnectingVisitorAttributesRule:
		phpstan.rules.rule: %featureToggles.nodeConnectingVisitorRule%

	PHPStan\Rules\Properties\MissingReadOnlyByPhpDocPropertyAssignRule:
		phpstan.rules.rule: %featureToggles.readOnlyByPhpDoc%

	PHPStan\Rules\Properties\ReadOnlyByPhpDocPropertyRule:
		phpstan.rules.rule: %featureToggles.readOnlyByPhpDoc%

	PHPStan\Rules\Properties\UninitializedPropertyRule:
		phpstan.rules.rule: %checkUninitializedProperties%

	PHPStan\Rules\Methods\ConsistentConstructorRule:
		phpstan.rules.rule: %featureToggles.consistentConstructor%

	PHPStan\Rules\Api\ApiClassConstFetchRule:
		phpstan.rules.rule: %featureToggles.runtimeReflectionRules%

	PHPStan\Rules\Api\ApiInstanceofRule:
		phpstan.rules.rule: %featureToggles.runtimeReflectionRules%

	PHPStan\Rules\Api\RuntimeReflectionFunctionRule:
		phpstan.rules.rule: %featureToggles.runtimeReflectionRules%

	PHPStan\Rules\Api\RuntimeReflectionInstantiationRule:
		phpstan.rules.rule: %featureToggles.runtimeReflectionRules%

	PHPStan\Rules\Methods\MissingMagicSerializationMethodsRule:
		phpstan.rules.rule: %featureToggles.missingMagicSerializationRule%

rules:
	- PHPStan\Rules\Api\ApiInstantiationRule
	- PHPStan\Rules\Api\ApiClassExtendsRule
	- PHPStan\Rules\Api\ApiClassImplementsRule
	- PHPStan\Rules\Api\ApiInterfaceExtendsRule
	- PHPStan\Rules\Api\ApiMethodCallRule
	- PHPStan\Rules\Api\ApiStaticCallRule
	- PHPStan\Rules\Api\ApiTraitUseRule
	- PHPStan\Rules\Api\GetTemplateTypeRule
	- PHPStan\Rules\Api\PhpStanNamespaceIn3rdPartyPackageRule
	- PHPStan\Rules\Arrays\DuplicateKeysInLiteralArraysRule
	- PHPStan\Rules\Arrays\EmptyArrayItemRule
	- PHPStan\Rules\Arrays\OffsetAccessWithoutDimForReadingRule
	- PHPStan\Rules\Cast\UnsetCastRule
	- PHPStan\Rules\Classes\AllowedSubTypesRule
	- PHPStan\Rules\Classes\ClassAttributesRule
	- PHPStan\Rules\Classes\ClassConstantAttributesRule
	- PHPStan\Rules\Classes\ClassConstantRule
	- PHPStan\Rules\Classes\DuplicateDeclarationRule
	- PHPStan\Rules\Classes\EnumSanityRule
	- PHPStan\Rules\Classes\ExistingClassesInClassImplementsRule
	- PHPStan\Rules\Classes\ExistingClassesInEnumImplementsRule
	- PHPStan\Rules\Classes\ExistingClassesInInterfaceExtendsRule
	- PHPStan\Rules\Classes\ExistingClassInTraitUseRule
	- PHPStan\Rules\Classes\InstantiationRule
	- PHPStan\Rules\Classes\InstantiationCallableRule
	- PHPStan\Rules\Classes\InvalidPromotedPropertiesRule
	- PHPStan\Rules\Classes\LocalTypeAliasesRule
	- PHPStan\Rules\Classes\LocalTypeTraitAliasesRule
	- PHPStan\Rules\Classes\NewStaticRule
	- PHPStan\Rules\Classes\NonClassAttributeClassRule
	- PHPStan\Rules\Classes\TraitAttributeClassRule
	- PHPStan\Rules\Constants\FinalConstantRule
	- PHPStan\Rules\EnumCases\EnumCaseAttributesRule
	- PHPStan\Rules\Exceptions\ThrowExpressionRule
	- PHPStan\Rules\Functions\ArrowFunctionAttributesRule
	- PHPStan\Rules\Functions\ArrowFunctionReturnNullsafeByRefRule
	- PHPStan\Rules\Functions\CallToFunctionParametersRule
	- PHPStan\Rules\Functions\ClosureAttributesRule
	- PHPStan\Rules\Functions\DefineParametersRule
	- PHPStan\Rules\Functions\ExistingClassesInArrowFunctionTypehintsRule
	- PHPStan\Rules\Functions\ExistingClassesInClosureTypehintsRule
	- PHPStan\Rules\Functions\ExistingClassesInTypehintsRule
	- PHPStan\Rules\Functions\FunctionAttributesRule
	- PHPStan\Rules\Functions\InnerFunctionRule
	- PHPStan\Rules\Functions\ParamAttributesRule
	- PHPStan\Rules\Functions\PrintfParametersRule
	- PHPStan\Rules\Functions\ReturnNullsafeByRefRule
	- PHPStan\Rules\Keywords\ContinueBreakInLoopRule
	- PHPStan\Rules\Methods\AbstractMethodInNonAbstractClassRule
	- PHPStan\Rules\Methods\CallMethodsRule
	- PHPStan\Rules\Methods\CallStaticMethodsRule
	- PHPStan\Rules\Methods\ExistingClassesInTypehintsRule
	- PHPStan\Rules\Methods\FinalPrivateMethodRule
	- PHPStan\Rules\Methods\MethodCallableRule
	- PHPStan\Rules\Methods\MissingMethodImplementationRule
	- PHPStan\Rules\Methods\MethodAttributesRule
	- PHPStan\Rules\Methods\StaticMethodCallableRule
	- PHPStan\Rules\Operators\InvalidAssignVarRule
	- PHPStan\Rules\Properties\AccessPropertiesInAssignRule
	- PHPStan\Rules\Properties\AccessStaticPropertiesInAssignRule
	- PHPStan\Rules\Properties\MissingReadOnlyPropertyAssignRule
	- PHPStan\Rules\Properties\PropertyAttributesRule
	- PHPStan\Rules\Properties\ReadOnlyPropertyRule
	- PHPStan\Rules\Variables\UnsetRule
	- PHPStan\Rules\Whitespace\FileWhitespaceRule

services:
	-
		class: PHPStan\Rules\Api\ApiClassConstFetchRule

	-
		class: PHPStan\Rules\Api\ApiInstanceofRule

	-
		class: PHPStan\Rules\Api\ApiInstanceofTypeRule
		arguments:
			enabled: %featureToggles.instanceofType%
			deprecationRulesInstalled: %deprecationRulesInstalled%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Api\NodeConnectingVisitorAttributesRule

	-
		class: PHPStan\Rules\Api\RuntimeReflectionFunctionRule

	-
		class: PHPStan\Rules\Api\RuntimeReflectionInstantiationRule

	-
		class: PHPStan\Rules\Classes\ExistingClassInClassExtendsRule
		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Classes\ExistingClassInInstanceOfRule
		tags:
			- phpstan.rules.rule

		arguments:
			checkClassCaseSensitivity: %checkClassCaseSensitivity%

	-
		class: PHPStan\Rules\Exceptions\CaughtExceptionExistenceRule
		tags:
			- phpstan.rules.rule

		arguments:
			checkClassCaseSensitivity: %checkClassCaseSensitivity%

	-
		class: PHPStan\Rules\Functions\CallToNonExistentFunctionRule
		tags:
			- phpstan.rules.rule

		arguments:
			checkFunctionNameCase: %checkFunctionNameCase%

	-
		class: PHPStan\Rules\Constants\OverridingConstantRule
		arguments:
			checkPhpDocMethodSignatures: %checkPhpDocMethodSignatures%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Methods\OverridingMethodRule
		arguments:
			checkPhpDocMethodSignatures: %checkPhpDocMethodSignatures%
			genericPrototypeMessage: %featureToggles.genericPrototypeMessage%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Methods\ConsistentConstructorRule

	-
		class: PHPStan\Rules\Missing\MissingReturnRule
		arguments:
			checkExplicitMixedMissingReturn: %checkExplicitMixedMissingReturn%
			checkPhpDocMissingReturn: %checkPhpDocMissingReturn%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Namespaces\ExistingNamesInGroupUseRule
		tags:
			- phpstan.rules.rule

		arguments:
			checkFunctionNameCase: %checkFunctionNameCase%

	-
		class: PHPStan\Rules\Namespaces\ExistingNamesInUseRule
		tags:
			- phpstan.rules.rule

		arguments:
			checkFunctionNameCase: %checkFunctionNameCase%

	-
		class: PHPStan\Rules\Operators\InvalidIncDecOperationRule
		tags:
			- phpstan.rules.rule

		arguments:
			checkThisOnly: %checkThisOnly%

	-
		class: PHPStan\Rules\Properties\AccessPropertiesRule
		tags:
			- phpstan.rules.rule

		arguments:
			reportMagicProperties: %reportMagicProperties%
			checkDynamicProperties: %checkDynamicProperties%

	-
		class: PHPStan\Rules\Properties\AccessStaticPropertiesRule
		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Properties\ExistingClassesInPropertiesRule
		tags:
			- phpstan.rules.rule

		arguments:
			checkClassCaseSensitivity: %checkClassCaseSensitivity%
			checkThisOnly: %checkThisOnly%

	-
		class: PHPStan\Rules\Functions\FunctionCallableRule
		arguments:
			checkFunctionNameCase: %checkFunctionNameCase%
			reportMaybes: %reportMaybes%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Properties\MissingReadOnlyByPhpDocPropertyAssignRule

	-
		class: PHPStan\Rules\Properties\OverridingPropertyRule
		arguments:
			checkPhpDocMethodSignatures: %checkPhpDocMethodSignatures%
			reportMaybes: %reportMaybesInPropertyPhpDocTypes%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Properties\ReadOnlyByPhpDocPropertyRule

	-
		class: PHPStan\Rules\Properties\UninitializedPropertyRule

	-
		class: PHPStan\Rules\Properties\WritingToReadOnlyPropertiesRule
		arguments:
			checkThisOnly: %checkThisOnly%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Properties\ReadingWriteOnlyPropertiesRule
		arguments:
			checkThisOnly: %checkThisOnly%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Variables\CompactVariablesRule
		arguments:
			checkMaybeUndefinedVariables: %checkMaybeUndefinedVariables%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Variables\DefinedVariableRule
		arguments:
			cliArgumentsVariablesRegistered: %cliArgumentsVariablesRegistered%
			checkMaybeUndefinedVariables: %checkMaybeUndefinedVariables%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Regexp\RegularExpressionPatternRule
		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Reflection\ConstructorsHelper
		arguments:
			additionalConstructors: %additionalConstructors%

	-
		class: PHPStan\Rules\Methods\MissingMagicSerializationMethodsRule

includes:
	- config.level7.neon

parameters:
	checkNullables: true

includes:
	- config.level0.neon

parameters:
	checkMaybeUndefinedVariables: true
	checkExtraArguments: true
	reportMagicMethods: true
	reportMagicProperties: true

rules:
	- PHPStan\Rules\Classes\UnusedConstructorParametersRule
	- PHPStan\Rules\Constants\ConstantRule
	- PHPStan\Rules\Functions\UnusedClosureUsesRule
	- PHPStan\Rules\Variables\EmptyRule
	- PHPStan\Rules\Variables\IssetRule
	- PHPStan\Rules\Variables\NullCoalesceRule

includes:
	- config.level6.neon

parameters:
	checkUnionTypes: true
	reportMaybes: true

includes:
	- config.level3.neon

rules:
	- PHPStan\Rules\Arrays\DeadForeachRule
	- PHPStan\Rules\DeadCode\NoopRule
	- PHPStan\Rules\DeadCode\UnreachableStatementRule
	- PHPStan\Rules\DeadCode\UnusedPrivateConstantRule
	- PHPStan\Rules\DeadCode\UnusedPrivateMethodRule
	- PHPStan\Rules\Exceptions\CatchWithUnthrownExceptionRule
	- PHPStan\Rules\Exceptions\OverwrittenExitPointByFinallyRule
	- PHPStan\Rules\Functions\CallToFunctionStatementWithoutSideEffectsRule
	- PHPStan\Rules\Methods\CallToConstructorStatementWithoutSideEffectsRule
	- PHPStan\Rules\Methods\CallToMethodStatementWithoutSideEffectsRule
	- PHPStan\Rules\Methods\CallToStaticMethodStatementWithoutSideEffectsRule
	- PHPStan\Rules\Methods\NullsafeMethodCallRule
	- PHPStan\Rules\TooWideTypehints\TooWideArrowFunctionReturnTypehintRule
	- PHPStan\Rules\TooWideTypehints\TooWideClosureReturnTypehintRule
	- PHPStan\Rules\TooWideTypehints\TooWideFunctionReturnTypehintRule

conditionalTags:
	PHPStan\Rules\Comparison\ConstantLooseComparisonRule:
		phpstan.rules.rule: %featureToggles.looseComparison%

	PHPStan\Rules\Traits\TraitDeclarationCollector:
		phpstan.collector: %featureToggles.notAnalysedTrait%

	PHPStan\Rules\Traits\TraitUseCollector:
		phpstan.collector: %featureToggles.notAnalysedTrait%

	PHPStan\Rules\Traits\NotAnalysedTraitRule:
		phpstan.rules.rule: %featureToggles.notAnalysedTrait%

parameters:
	checkAdvancedIsset: true

services:
	-
		class: PHPStan\Rules\Classes\ImpossibleInstanceOfRule
		arguments:
			checkAlwaysTrueInstanceof: %checkAlwaysTrueInstanceof%
			treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%
			reportAlwaysTrueInLastCondition: %reportAlwaysTrueInLastCondition%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Comparison\BooleanAndConstantConditionRule
		arguments:
			treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%
			bleedingEdge: %featureToggles.bleedingEdge%
			reportAlwaysTrueInLastCondition: %reportAlwaysTrueInLastCondition%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Comparison\BooleanOrConstantConditionRule
		arguments:
			treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%
			bleedingEdge: %featureToggles.bleedingEdge%
			reportAlwaysTrueInLastCondition: %reportAlwaysTrueInLastCondition%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Comparison\BooleanNotConstantConditionRule
		arguments:
			treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%
			reportAlwaysTrueInLastCondition: %reportAlwaysTrueInLastCondition%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\DeadCode\UnusedPrivatePropertyRule
		arguments:
			alwaysWrittenTags: %propertyAlwaysWrittenTags%
			alwaysReadTags: %propertyAlwaysReadTags%
			checkUninitializedProperties: %checkUninitializedProperties%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Comparison\DoWhileLoopConstantConditionRule
		arguments:
			treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Comparison\ElseIfConstantConditionRule
		arguments:
			treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%
			reportAlwaysTrueInLastCondition: %reportAlwaysTrueInLastCondition%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Comparison\IfConstantConditionRule
		arguments:
			treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Comparison\ImpossibleCheckTypeFunctionCallRule
		arguments:
			checkAlwaysTrueCheckTypeFunctionCall: %checkAlwaysTrueCheckTypeFunctionCall%
			treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%
			reportAlwaysTrueInLastCondition: %reportAlwaysTrueInLastCondition%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Comparison\ImpossibleCheckTypeMethodCallRule
		arguments:
			checkAlwaysTrueCheckTypeFunctionCall: %checkAlwaysTrueCheckTypeFunctionCall%
			treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%
			reportAlwaysTrueInLastCondition: %reportAlwaysTrueInLastCondition%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Comparison\ImpossibleCheckTypeStaticMethodCallRule
		arguments:
			checkAlwaysTrueCheckTypeFunctionCall: %checkAlwaysTrueCheckTypeFunctionCall%
			treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%
			reportAlwaysTrueInLastCondition: %reportAlwaysTrueInLastCondition%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Comparison\MatchExpressionRule
		arguments:
			checkAlwaysTrueStrictComparison: %checkAlwaysTrueStrictComparison%
			disableUnreachable: %featureToggles.disableUnreachableBranchesRules%
			reportAlwaysTrueInLastCondition: %reportAlwaysTrueInLastCondition%
			treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Comparison\NumberComparisonOperatorsConstantConditionRule
		arguments:
			treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Comparison\StrictComparisonOfDifferentTypesRule
		arguments:
			checkAlwaysTrueStrictComparison: %checkAlwaysTrueStrictComparison%
			treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%
			reportAlwaysTrueInLastCondition: %reportAlwaysTrueInLastCondition%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Comparison\ConstantLooseComparisonRule
		arguments:
			checkAlwaysTrueLooseComparison: %checkAlwaysTrueLooseComparison%
			treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%
			reportAlwaysTrueInLastCondition: %reportAlwaysTrueInLastCondition%

	-
		class: PHPStan\Rules\Comparison\TernaryOperatorConstantConditionRule
		arguments:
			treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Comparison\UnreachableIfBranchesRule
		arguments:
			treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%
			disable: %featureToggles.disableUnreachableBranchesRules%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Comparison\UnreachableTernaryElseBranchRule
		arguments:
			treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%
			disable: %featureToggles.disableUnreachableBranchesRules%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Comparison\WhileLoopAlwaysFalseConditionRule
		arguments:
			treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Comparison\WhileLoopAlwaysTrueConditionRule
		arguments:
			treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\TooWideTypehints\TooWideMethodReturnTypehintRule
		arguments:
			checkProtectedAndPublicMethods: %checkTooWideReturnTypesInProtectedAndPublicMethods%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Properties\NullsafePropertyFetchRule
		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Traits\TraitDeclarationCollector

	-
		class: PHPStan\Rules\Traits\TraitUseCollector

	-
		class: PHPStan\Rules\Traits\NotAnalysedTraitRule

includes:
	- config.level5.neon

parameters:
	checkGenericClassInNonGenericObjectType: true
	checkMissingIterableValueType: true
	checkMissingVarTagTypehint: true
	checkMissingTypehints: true

rules:
	- PHPStan\Rules\Constants\MissingClassConstantTypehintRule
	- PHPStan\Rules\Functions\MissingFunctionParameterTypehintRule
	- PHPStan\Rules\Functions\MissingFunctionReturnTypehintRule
	- PHPStan\Rules\Methods\MissingMethodParameterTypehintRule
	- PHPStan\Rules\Methods\MissingMethodReturnTypehintRule
	- PHPStan\Rules\Properties\MissingPropertyTypehintRule

includes:
	- config.level1.neon

parameters:
	checkClassCaseSensitivity: true
	checkThisOnly: false
	checkPhpDocMissingReturn: true

rules:
	- PHPStan\Rules\Cast\EchoRule
	- PHPStan\Rules\Cast\InvalidCastRule
	- PHPStan\Rules\Cast\InvalidPartOfEncapsedStringRule
	- PHPStan\Rules\Cast\PrintRule
	- PHPStan\Rules\Classes\AccessPrivateConstantThroughStaticRule
	- PHPStan\Rules\Comparison\UsageOfVoidMatchExpressionRule
	- PHPStan\Rules\Functions\IncompatibleDefaultParameterTypeRule
	- PHPStan\Rules\Generics\ClassAncestorsRule
	- PHPStan\Rules\Generics\ClassTemplateTypeRule
	- PHPStan\Rules\Generics\EnumAncestorsRule
	- PHPStan\Rules\Generics\EnumTemplateTypeRule
	- PHPStan\Rules\Generics\FunctionTemplateTypeRule
	- PHPStan\Rules\Generics\FunctionSignatureVarianceRule
	- PHPStan\Rules\Generics\InterfaceAncestorsRule
	- PHPStan\Rules\Generics\InterfaceTemplateTypeRule
	- PHPStan\Rules\Generics\MethodTemplateTypeRule
	- PHPStan\Rules\Generics\MethodSignatureVarianceRule
	- PHPStan\Rules\Generics\TraitTemplateTypeRule
	- PHPStan\Rules\Generics\UsedTraitsRule
	- PHPStan\Rules\Methods\CallPrivateMethodThroughStaticRule
	- PHPStan\Rules\Methods\IncompatibleDefaultParameterTypeRule
	- PHPStan\Rules\Operators\InvalidBinaryOperationRule
	- PHPStan\Rules\Operators\InvalidUnaryOperationRule
	- PHPStan\Rules\Operators\InvalidComparisonOperationRule
	- PHPStan\Rules\PhpDoc\FunctionConditionalReturnTypeRule
	- PHPStan\Rules\PhpDoc\MethodConditionalReturnTypeRule
	- PHPStan\Rules\PhpDoc\FunctionAssertRule
	- PHPStan\Rules\PhpDoc\MethodAssertRule
	- PHPStan\Rules\PhpDoc\IncompatibleSelfOutTypeRule
	- PHPStan\Rules\PhpDoc\IncompatibleClassConstantPhpDocTypeRule
	- PHPStan\Rules\PhpDoc\IncompatiblePhpDocTypeRule
	- PHPStan\Rules\PhpDoc\IncompatiblePropertyPhpDocTypeRule
	- PHPStan\Rules\PhpDoc\InvalidThrowsPhpDocValueRule
	- PHPStan\Rules\Properties\AccessPrivatePropertyThroughStaticRule

conditionalTags:
	PHPStan\Rules\Functions\IncompatibleArrowFunctionDefaultParameterTypeRule:
		phpstan.rules.rule: %featureToggles.closureDefaultParameterTypeRule%

	PHPStan\Rules\Functions\IncompatibleClosureDefaultParameterTypeRule:
		phpstan.rules.rule: %featureToggles.closureDefaultParameterTypeRule%

	PHPStan\Rules\Methods\IllegalConstructorMethodCallRule:
		phpstan.rules.rule: %featureToggles.illegalConstructorMethodCall%

	PHPStan\Rules\Methods\IllegalConstructorStaticCallRule:
		phpstan.rules.rule: %featureToggles.illegalConstructorMethodCall%

	PHPStan\Rules\PhpDoc\VarTagChangedExpressionTypeRule:
		phpstan.rules.rule: %featureToggles.varTagType%

	PHPStan\Rules\Generics\PropertyVarianceRule:
		phpstan.rules.rule: %featureToggles.propertyVariance%

services:
	-
		class: PHPStan\Rules\Classes\MixinRule
		arguments:
			checkClassCaseSensitivity: %checkClassCaseSensitivity%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Functions\IncompatibleArrowFunctionDefaultParameterTypeRule

	-
		class: PHPStan\Rules\Functions\IncompatibleClosureDefaultParameterTypeRule

	-
		class: PHPStan\Rules\Functions\CallCallablesRule
		arguments:
			reportMaybes: %reportMaybes%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Methods\IllegalConstructorMethodCallRule

	-
		class: PHPStan\Rules\Methods\IllegalConstructorStaticCallRule

	-
		class: PHPStan\Rules\PhpDoc\InvalidPhpDocTagValueRule
		arguments:
			checkAllInvalidPhpDocs: %featureToggles.allInvalidPhpDocs%
			invalidPhpDocTagLine: %featureToggles.invalidPhpDocTagLine%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\PhpDoc\InvalidPhpDocVarTagTypeRule
		arguments:
			checkClassCaseSensitivity: %checkClassCaseSensitivity%
			checkMissingVarTagTypehint: %checkMissingVarTagTypehint%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\PhpDoc\InvalidPHPStanDocTagRule
		arguments:
			checkAllInvalidPhpDocs: %featureToggles.allInvalidPhpDocs%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\PhpDoc\VarTagChangedExpressionTypeRule

	-
		class: PHPStan\Rules\PhpDoc\WrongVariableNameInVarTagRule
		arguments:
			checkTypeAgainstNativeType: %featureToggles.varTagType%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Generics\PropertyVarianceRule
		arguments:
			readOnlyByPhpDoc: %featureToggles.readOnlyByPhpDoc%

parameters:
	bootstrapFiles:
		- ../stubs/runtime/ReflectionUnionType.php
		- ../stubs/runtime/ReflectionAttribute.php
		- ../stubs/runtime/Attribute.php
		- ../stubs/runtime/ReflectionIntersectionType.php

	excludes_analyse: []
	excludePaths: null
	level: null
	paths: []
	exceptions:
		implicitThrows: true
		uncheckedExceptionRegexes: []
		uncheckedExceptionClasses: []
		checkedExceptionRegexes: []
		checkedExceptionClasses: []
		check:
			missingCheckedExceptionInThrows: false
			tooWideThrowType: false

	featureToggles:
		bleedingEdge: false
		disableRuntimeReflectionProvider: true
		skipCheckGenericClasses:
			- DatePeriod
			- CallbackFilterIterator
			- FilterIterator
			- RecursiveCallbackFilterIterator
			- AppendIterator
			- NoRewindIterator
			- LimitIterator
			- InfiniteIterator
			- CachingIterator
			- RegexIterator

		explicitMixedInUnknownGenericNew: false
		explicitMixedForGlobalVariables: false
		explicitMixedViaIsArray: false
		arrayFilter: false
		arrayUnpacking: false
		nodeConnectingVisitorCompatibility: true
		nodeConnectingVisitorRule: false
		illegalConstructorMethodCall: false
		disableCheckMissingIterableValueType: false
		strictUnnecessaryNullsafePropertyFetch: false
		looseComparison: false
		consistentConstructor: false
		checkUnresolvableParameterTypes: false
		readOnlyByPhpDoc: false
		phpDocParserRequireWhitespaceBeforeDescription: false
		runtimeReflectionRules: false
		notAnalysedTrait: false
		curlSetOptTypes: false
		listType: false
		missingMagicSerializationRule: false
		nullContextForVoidReturningFunctions: false
		unescapeStrings: false
		duplicateStubs: false
		invarianceComposition: false
		alwaysTrueAlwaysReported: false
		disableUnreachableBranchesRules: false
		varTagType: false
		closureDefaultParameterTypeRule: false
		newRuleLevelHelper: false
		instanceofType: false
		paramOutVariance: false
		allInvalidPhpDocs: false
		strictStaticMethodTemplateTypeVariance: false
		propertyVariance: false
		genericPrototypeMessage: false
		stricterFunctionMap: false
		invalidPhpDocTagLine: false
		detectDeadTypeInMultiCatch: false

	fileExtensions:
		- php

	checkAdvancedIsset: false
	checkAlwaysTrueCheckTypeFunctionCall: %featureToggles.alwaysTrueAlwaysReported%
	checkAlwaysTrueInstanceof: %featureToggles.alwaysTrueAlwaysReported%
	checkAlwaysTrueStrictComparison: %featureToggles.alwaysTrueAlwaysReported%
	checkAlwaysTrueLooseComparison: %featureToggles.alwaysTrueAlwaysReported%
	reportAlwaysTrueInLastCondition: false
	checkClassCaseSensitivity: false
	checkExplicitMixed: false
	checkImplicitMixed: false
	checkFunctionArgumentTypes: false
	checkFunctionNameCase: false
	checkGenericClassInNonGenericObjectType: false
	checkInternalClassCaseSensitivity: false
	checkMissingIterableValueType: false
	checkMissingCallableSignature: false
	checkMissingVarTagTypehint: false
	checkArgumentsPassedByReference: false
	checkMaybeUndefinedVariables: false
	checkNullables: false
	checkThisOnly: true
	checkUnionTypes: false
	checkBenevolentUnionTypes: false
	checkExplicitMixedMissingReturn: false
	checkPhpDocMissingReturn: false
	checkPhpDocMethodSignatures: false
	checkExtraArguments: false
	checkMissingTypehints: false
	checkTooWideReturnTypesInProtectedAndPublicMethods: false
	checkUninitializedProperties: false
	checkDynamicProperties: false
	deprecationRulesInstalled: false
	inferPrivatePropertyTypeFromConstructor: false
	reportMaybes: false
	reportMaybesInMethodSignatures: false
	reportMaybesInPropertyPhpDocTypes: false
	reportStaticMethodSignatures: false
	reportWrongPhpDocTypeInVarTag: false
	mixinExcludeClasses: []
	scanFiles: []
	scanDirectories: []
	parallel:
		jobSize: 20
		processTimeout: 600.0
		maximumNumberOfProcesses: 32
		minimumNumberOfJobsPerProcess: 2
		buffer: 134217728

	phpVersion: null
	polluteScopeWithLoopInitialAssignments: true
	polluteScopeWithAlwaysIterableForeach: true
	propertyAlwaysWrittenTags: []
	propertyAlwaysReadTags: []
	additionalConstructors: []
	treatPhpDocTypesAsCertain: true
	usePathConstantsAsConstantString: false
	rememberPossiblyImpureFunctionValues: true
	tipsOfTheDay: true
	reportMagicMethods: false
	reportMagicProperties: false
	ignoreErrors: []
	internalErrorsCountLimit: 50
	cache:
		nodesByFileCountMax: 1024
		nodesByStringCountMax: 256

	reportUnmatchedIgnoredErrors: true
	scopeClass: PHPStan\Analyser\MutatingScope
	typeAliases: []
	universalObjectCratesClasses:
		- stdClass

	stubFiles:
		- ../stubs/ReflectionAttribute.stub
		- ../stubs/ReflectionClass.stub
		- ../stubs/ReflectionClassConstant.stub
		- ../stubs/ReflectionFunctionAbstract.stub
		- ../stubs/ReflectionMethod.stub
		- ../stubs/ReflectionParameter.stub
		- ../stubs/ReflectionProperty.stub
		- ../stubs/iterable.stub
		- ../stubs/ArrayObject.stub
		- ../stubs/WeakReference.stub
		- ../stubs/ext-ds.stub
		- ../stubs/ImagickPixel.stub
		- ../stubs/PDOStatement.stub
		- ../stubs/date.stub
		- ../stubs/ibm_db2.stub
		- ../stubs/mysqli.stub
		- ../stubs/zip.stub
		- ../stubs/dom.stub
		- ../stubs/spl.stub
		- ../stubs/SplObjectStorage.stub
		- ../stubs/Exception.stub
		- ../stubs/arrayFunctions.stub
		- ../stubs/core.stub
		- ../stubs/typeCheckingFunctions.stub

	earlyTerminatingMethodCalls: []
	earlyTerminatingFunctionCalls: []
	memoryLimitFile: %tmpDir%/.memory_limit
	tempResultCachePath: %tmpDir%/resultCaches
	resultCachePath: %tmpDir%/resultCache.php
	resultCacheChecksProjectExtensionFilesDependencies: false
	staticReflectionClassNamePatterns: []
	dynamicConstantNames:
		- ICONV_IMPL
		- LIBXML_VERSION
		- LIBXML_DOTTED_VERSION
		- Memcached::HAVE_ENCODING
		- Memcached::HAVE_IGBINARY
		- Memcached::HAVE_JSON
		- Memcached::HAVE_MSGPACK
		- Memcached::HAVE_SASL
		- Memcached::HAVE_SESSION
		- PHP_VERSION
		- PHP_MAJOR_VERSION
		- PHP_MINOR_VERSION
		- PHP_RELEASE_VERSION
		- PHP_VERSION_ID
		- PHP_EXTRA_VERSION
		- PHP_WINDOWS_VERSION_MAJOR
		- PHP_WINDOWS_VERSION_MINOR
		- PHP_WINDOWS_VERSION_BUILD
		- PHP_ZTS
		- PHP_DEBUG
		- PHP_MAXPATHLEN
		- PHP_OS
		- PHP_OS_FAMILY
		- PHP_SAPI
		- PHP_EOL
		- PHP_INT_MAX
		- PHP_INT_MIN
		- PHP_INT_SIZE
		- PHP_FLOAT_DIG
		- PHP_FLOAT_EPSILON
		- PHP_FLOAT_MIN
		- PHP_FLOAT_MAX
		- DEFAULT_INCLUDE_PATH
		- PEAR_INSTALL_DIR
		- PEAR_EXTENSION_DIR
		- PHP_EXTENSION_DIR
		- PHP_PREFIX
		- PHP_BINDIR
		- PHP_BINARY
		- PHP_MANDIR
		- PHP_LIBDIR
		- PHP_DATADIR
		- PHP_SYSCONFDIR
		- PHP_LOCALSTATEDIR
		- PHP_CONFIG_FILE_PATH
		- PHP_CONFIG_FILE_SCAN_DIR
		- PHP_SHLIB_SUFFIX
		- PHP_FD_SETSIZE
		- OPENSSL_VERSION_NUMBER
		- ZEND_DEBUG_BUILD
		- ZEND_THREAD_SAFE

	customRulesetUsed: null
	editorUrl: null
	editorUrlTitle: null
	errorFormat: null
	pro:
		dnsServers:
			- '1.1.1.1'

	__validate: true

extensions:
	rules: PHPStan\DependencyInjection\RulesExtension
	conditionalTags: PHPStan\DependencyInjection\ConditionalTagsExtension
	parametersSchema: PHPStan\DependencyInjection\ParametersSchemaExtension
	validateIgnoredErrors: PHPStan\DependencyInjection\ValidateIgnoredErrorsExtension

parametersSchema:
	bootstrapFiles: listOf(string())
	excludes_analyse: listOf(string())
	excludePaths: schema(anyOf(structure({analyse: listOf(string())}), structure({analyseAndScan: listOf(string())}), structure({analyse: listOf(string()), analyseAndScan: listOf(string())})), nullable())
	level: schema(anyOf(int(), string()), nullable())
	paths: listOf(string())
	exceptions: structure({implicitThrows: bool(), uncheckedExceptionRegexes: listOf(string()), uncheckedExceptionClasses: listOf(string()), checkedExceptionRegexes: listOf(string()), checkedExceptionClasses: listOf(string()), check: structure({missingCheckedExceptionInThrows: bool(), tooWideThrowType: bool()})})
	featureToggles: structure({bleedingEdge: bool(), disableRuntimeReflectionProvider: bool(), skipCheckGenericClasses: listOf(string()), explicitMixedInUnknownGenericNew: bool(), explicitMixedForGlobalVariables: bool(), explicitMixedViaIsArray: bool(), arrayFilter: bool(), arrayUnpacking: bool(), nodeConnectingVisitorCompatibility: bool(), nodeConnectingVisitorRule: bool(), illegalConstructorMethodCall: bool(), disableCheckMissingIterableValueType: bool(), strictUnnecessaryNullsafePropertyFetch: bool(), looseComparison: bool(), consistentConstructor: bool(), checkUnresolvableParameterTypes: bool(), readOnlyByPhpDoc: bool(), phpDocParserRequireWhitespaceBeforeDescription: bool(), runtimeReflectionRules: bool(), notAnalysedTrait: bool(), curlSetOptTypes: bool(), listType: bool(), missingMagicSerializationRule: bool(), nullContextForVoidReturningFunctions: bool(), unescapeStrings: bool(), duplicateStubs: bool(), invarianceComposition: bool(), alwaysTrueAlwaysReported: bool(), disableUnreachableBranchesRules: bool(), varTagType: bool(), closureDefaultParameterTypeRule: bool(), newRuleLevelHelper: bool(), instanceofType: bool(), paramOutVariance: bool(), allInvalidPhpDocs: bool(), strictStaticMethodTemplateTypeVariance: bool(), propertyVariance: bool(), genericPrototypeMessage: bool(), stricterFunctionMap: bool(), invalidPhpDocTagLine: bool(), detectDeadTypeInMultiCatch: bool()})
	fileExtensions: listOf(string())
	checkAdvancedIsset: bool()
	checkAlwaysTrueCheckTypeFunctionCall: bool()
	checkAlwaysTrueInstanceof: bool()
	checkAlwaysTrueStrictComparison: bool()
	checkAlwaysTrueLooseComparison: bool()
	reportAlwaysTrueInLastCondition: bool()
	checkClassCaseSensitivity: bool()
	checkExplicitMixed: bool()
	checkImplicitMixed: bool()
	checkFunctionArgumentTypes: bool()
	checkFunctionNameCase: bool()
	checkGenericClassInNonGenericObjectType: bool()
	checkInternalClassCaseSensitivity: bool()
	checkMissingIterableValueType: bool()
	checkMissingCallableSignature: bool()
	checkMissingVarTagTypehint: bool()
	checkArgumentsPassedByReference: bool()
	checkMaybeUndefinedVariables: bool()
	checkNullables: bool()
	checkThisOnly: bool()
	checkUnionTypes: bool()
	checkBenevolentUnionTypes: bool()
	checkExplicitMixedMissingReturn: bool()
	checkPhpDocMissingReturn: bool()
	checkPhpDocMethodSignatures: bool()
	checkExtraArguments: bool()
	checkMissingTypehints: bool()
	checkTooWideReturnTypesInProtectedAndPublicMethods: bool()
	checkUninitializedProperties: bool()
	checkDynamicProperties: bool()
	deprecationRulesInstalled: bool()
	inferPrivatePropertyTypeFromConstructor: bool()
	tipsOfTheDay: bool()
	reportMaybes: bool()
	reportMaybesInMethodSignatures: bool()
	reportMaybesInPropertyPhpDocTypes: bool()
	reportStaticMethodSignatures: bool()
	reportWrongPhpDocTypeInVarTag: bool()
	parallel: structure({jobSize: int(), processTimeout: float(), maximumNumberOfProcesses: int(), minimumNumberOfJobsPerProcess: int(), buffer: int()})
	phpVersion: schema(anyOf(schema(int(), min(70100), max(80299))), nullable())
	polluteScopeWithLoopInitialAssignments: bool()
	polluteScopeWithAlwaysIterableForeach: bool()
	propertyAlwaysWrittenTags: listOf(string())
	propertyAlwaysReadTags: listOf(string())
	additionalConstructors: listOf(string())
	treatPhpDocTypesAsCertain: bool()
	usePathConstantsAsConstantString: bool()
	rememberPossiblyImpureFunctionValues: bool()
	reportMagicMethods: bool()
	reportMagicProperties: bool()
	ignoreErrors: listOf(anyOf(string(), structure({messages: listOf(string()), ?path: string(), ?reportUnmatched: bool()}), structure({message: string(), ?path: string(), ?reportUnmatched: bool()}), structure({message: string(), count: int(), path: string(), ?reportUnmatched: bool()}), structure({message: string(), paths: listOf(string()), ?reportUnmatched: bool()}), structure({messages: listOf(string()), paths: listOf(string()), ?reportUnmatched: bool()})))
	internalErrorsCountLimit: int()
	cache: structure({nodesByFileCountMax: int(), nodesByStringCountMax: int()})
	reportUnmatchedIgnoredErrors: bool()
	scopeClass: string()
	typeAliases: arrayOf(string())
	universalObjectCratesClasses: listOf(string())
	stubFiles: listOf(string())
	earlyTerminatingMethodCalls: arrayOf(listOf(string()))
	earlyTerminatingFunctionCalls: listOf(string())
	memoryLimitFile: string()
	tempResultCachePath: string()
	resultCachePath: string()
	resultCacheChecksProjectExtensionFilesDependencies: bool()
	staticReflectionClassNamePatterns: listOf(string())
	dynamicConstantNames: listOf(string())
	customRulesetUsed: schema(bool(), nullable())
	rootDir: string()
	tmpDir: string()
	currentWorkingDirectory: string()
	cliArgumentsVariablesRegistered: bool()
	mixinExcludeClasses: listOf(string())
	scanFiles: listOf(string())
	scanDirectories: listOf(string())
	fixerTmpDir: string()
	editorUrl: schema(string(), nullable())
	editorUrlTitle: schema(string(), nullable())
	errorFormat: schema(string(), nullable())
	pro: structure({dnsServers: schema(listOf(string()), min(1))})
	debugMode: bool()
	productionMode: bool()
	tempDir: string()
	__validate: bool()
	additionalConfigFiles: arrayOf(string())
	generateBaselineFile: schema(string(), nullable())
	analysedPaths: listOf(string())
	allConfigFiles: listOf(string())
	composerAutoloaderProjectPaths: listOf(string())
	analysedPathsFromConfig: listOf(string())
	usedLevel: string()
	cliAutoloadFile: schema(string(), nullable())

rules:
	- PHPStan\Rules\Debug\DumpTypeRule
	- PHPStan\Rules\Debug\FileAssertRule

conditionalTags:
	PHPStan\Rules\Exceptions\MissingCheckedExceptionInFunctionThrowsRule:
		phpstan.rules.rule: %exceptions.check.missingCheckedExceptionInThrows%

	PHPStan\Rules\Exceptions\MissingCheckedExceptionInMethodThrowsRule:
		phpstan.rules.rule: %exceptions.check.missingCheckedExceptionInThrows%

	PHPStan\Rules\Exceptions\TooWideFunctionThrowTypeRule:
		phpstan.rules.rule: %exceptions.check.tooWideThrowType%

	PHPStan\Rules\Exceptions\TooWideMethodThrowTypeRule:
		phpstan.rules.rule: %exceptions.check.tooWideThrowType%

	PhpParser\NodeVisitor\NodeConnectingVisitor:
		phpstan.parser.richParserNodeVisitor: %featureToggles.nodeConnectingVisitorCompatibility%

	PHPStan\Parser\CurlSetOptArgVisitor:
		phpstan.parser.richParserNodeVisitor: %featureToggles.curlSetOptTypes%

	PHPStan\Parser\TypeTraverserInstanceofVisitor:
		phpstan.parser.richParserNodeVisitor: %featureToggles.instanceofType%

services:
	-
		class: PhpParser\BuilderFactory

	-
		class: PHPStan\Parser\LexerFactory

	-
		class: PhpParser\NodeVisitor\NameResolver
		arguments:
			options:
				preserveOriginalNames: true

	-
		class: PHPStan\Parser\ArrayFilterArgVisitor
		tags:
			- phpstan.parser.richParserNodeVisitor

	-
		class: PHPStan\Parser\ArrayMapArgVisitor
		tags:
			- phpstan.parser.richParserNodeVisitor

	-
		class: PHPStan\Parser\ArrayWalkArgVisitor
		tags:
			- phpstan.parser.richParserNodeVisitor

	-
		class: PHPStan\Parser\ClosureArgVisitor
		tags:
			- phpstan.parser.richParserNodeVisitor

	-
		class: PHPStan\Parser\CurlSetOptArgVisitor

	-
		class: PHPStan\Parser\TypeTraverserInstanceofVisitor

	-
		class: PHPStan\Parser\ArrowFunctionArgVisitor
		tags:
			- phpstan.parser.richParserNodeVisitor

	-
		class: PHPStan\Parser\NewAssignedToPropertyVisitor
		tags:
			- phpstan.parser.richParserNodeVisitor

	-
		class: PHPStan\Parser\ParentStmtTypesVisitor
		tags:
			- phpstan.parser.richParserNodeVisitor

	-
		class: PHPStan\Parser\TryCatchTypeVisitor
		tags:
			- phpstan.parser.richParserNodeVisitor

	-
		class: PHPStan\Parser\LastConditionVisitor
		tags:
			- phpstan.parser.richParserNodeVisitor

	-
		class: PhpParser\NodeVisitor\NodeConnectingVisitor

	-
		class: PHPStan\Node\Printer\ExprPrinter

	-
		class: PHPStan\Node\Printer\Printer

	-
		class: PHPStan\Broker\AnonymousClassNameHelper
		arguments:
			relativePathHelper: @simpleRelativePathHelper

	-
		class: PHPStan\Php\PhpVersion
		factory: @PHPStan\Php\PhpVersionFactory::create

	-
		class: PHPStan\Php\PhpVersionFactory
		factory: @PHPStan\Php\PhpVersionFactoryFactory::create

	-
		class: PHPStan\Php\PhpVersionFactoryFactory
		arguments:
			versionId: %phpVersion%
			composerAutoloaderProjectPaths: %composerAutoloaderProjectPaths%

	-
		class: PHPStan\PhpDocParser\Lexer\Lexer

	-
		class: PHPStan\PhpDocParser\Parser\TypeParser
		arguments:
			quoteAwareConstExprString: %featureToggles.unescapeStrings%

	-
		class: PHPStan\PhpDocParser\Parser\ConstExprParser
		factory: @PHPStan\PhpDoc\ConstExprParserFactory::create()

	-
		class: PHPStan\PhpDocParser\Parser\PhpDocParser
		arguments:
			requireWhitespaceBeforeDescription: %featureToggles.phpDocParserRequireWhitespaceBeforeDescription%
			preserveTypeAliasesWithInvalidTypes: true

	-
		class: PHPStan\PhpDoc\ConstExprParserFactory
		arguments:
			unescapeStrings: %featureToggles.unescapeStrings%

	-
		class: PHPStan\PhpDoc\PhpDocInheritanceResolver

	-
		class: PHPStan\PhpDoc\PhpDocNodeResolver

	-
		class: PHPStan\PhpDoc\PhpDocStringResolver

	-
		class: PHPStan\PhpDoc\ConstExprNodeResolver

	-
		class: PHPStan\PhpDoc\TypeNodeResolver

	-
		class: PHPStan\PhpDoc\TypeNodeResolverExtensionRegistryProvider
		factory: PHPStan\PhpDoc\LazyTypeNodeResolverExtensionRegistryProvider

	-
		class: PHPStan\PhpDoc\TypeStringResolver

	-
		class: PHPStan\PhpDoc\StubValidator
		arguments:
			duplicateStubs: %featureToggles.duplicateStubs%

	-
		class: PHPStan\PhpDoc\CountableStubFilesExtension
		arguments:
			bleedingEdge: %featureToggles.bleedingEdge%

		tags:
			- phpstan.stubFilesExtension

	-
		class: PHPStan\PhpDoc\DefaultStubFilesProvider
		arguments:
			stubFiles: %stubFiles%
			currentWorkingDirectory: %currentWorkingDirectory%

		autowired:
			- PHPStan\PhpDoc\StubFilesProvider

	-
		class: PHPStan\Analyser\Analyser
		arguments:
			internalErrorsCountLimit: %internalErrorsCountLimit%

	-
		class: PHPStan\Analyser\FileAnalyser
		arguments:
			parser: @defaultAnalysisParser
			reportUnmatchedIgnoredErrors: %reportUnmatchedIgnoredErrors%

	-
		class: PHPStan\Analyser\RuleErrorTransformer

	-
		class: PHPStan\Analyser\IgnoredErrorHelper
		arguments:
			ignoreErrors: %ignoreErrors%
			reportUnmatchedIgnoredErrors: %reportUnmatchedIgnoredErrors%

	-
		class: PHPStan\Analyser\LazyInternalScopeFactory
		arguments:
			scopeClass: %scopeClass%

		autowired:
			- PHPStan\Analyser\InternalScopeFactory

	-
		class: PHPStan\Analyser\ScopeFactory

	-
		class: PHPStan\Analyser\NodeScopeResolver
		arguments:
			parser: @defaultAnalysisParser
			reflector: @nodeScopeResolverReflector
			polluteScopeWithLoopInitialAssignments: %polluteScopeWithLoopInitialAssignments%
			polluteScopeWithAlwaysIterableForeach: %polluteScopeWithAlwaysIterableForeach%
			earlyTerminatingMethodCalls: %earlyTerminatingMethodCalls%
			earlyTerminatingFunctionCalls: %earlyTerminatingFunctionCalls%
			implicitThrows: %exceptions.implicitThrows%
			treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%
			detectDeadTypeInMultiCatch: %featureToggles.detectDeadTypeInMultiCatch%

	-
		class: PHPStan\Analyser\ConstantResolver
		factory: @PHPStan\Analyser\ConstantResolverFactory::create()

	-
		class: PHPStan\Analyser\ConstantResolverFactory

	-
		implement: PHPStan\Analyser\ResultCache\ResultCacheManagerFactory
		arguments:
			scanFileFinder: @fileFinderScan
			cacheFilePath: %resultCachePath%
			analysedPaths: %analysedPaths%
			composerAutoloaderProjectPaths: %composerAutoloaderProjectPaths%
			usedLevel: %usedLevel%
			cliAutoloadFile: %cliAutoloadFile%
			bootstrapFiles: %bootstrapFiles%
			scanFiles: %scanFiles%
			scanDirectories: %scanDirectories%
			checkDependenciesOfProjectExtensionFiles: %resultCacheChecksProjectExtensionFilesDependencies%

	-
		class: PHPStan\Analyser\ResultCache\ResultCacheClearer
		arguments:
			cacheFilePath: %resultCachePath%

	-
		class: PHPStan\Cache\Cache
		arguments:
			storage: @cacheStorage

	-
		class: PHPStan\Collectors\Registry
		factory: @PHPStan\Collectors\RegistryFactory::create

	-
		class: PHPStan\Collectors\RegistryFactory

	-
		class: PHPStan\Command\AnalyseApplication
		arguments:
			internalErrorsCountLimit: %internalErrorsCountLimit%

	-
		class: PHPStan\Command\AnalyserRunner

	-
		class: PHPStan\Command\FixerApplication
		arguments:
			analysedPaths: %analysedPaths%
			currentWorkingDirectory: %currentWorkingDirectory%
			fixerTmpDir: %fixerTmpDir%
			dnsServers: %pro.dnsServers%

	-
		class: PHPStan\Dependency\DependencyResolver

	-
		class: PHPStan\Dependency\ExportedNodeFetcher
		arguments:
			parser: @defaultAnalysisParser

	-
		class: PHPStan\Dependency\ExportedNodeResolver

	-
		class: PHPStan\Dependency\ExportedNodeVisitor

	-
		class: PHPStan\DependencyInjection\Container
		factory: PHPStan\DependencyInjection\MemoizingContainer
		arguments:
			originalContainer: @PHPStan\DependencyInjection\Nette\NetteContainer

	-
		class: PHPStan\DependencyInjection\Nette\NetteContainer
		autowired:
			- PHPStan\DependencyInjection\Nette\NetteContainer

	-
		class: PHPStan\DependencyInjection\DerivativeContainerFactory
		arguments:
			currentWorkingDirectory: %currentWorkingDirectory%
			tempDirectory: %tempDir%
			additionalConfigFiles: %additionalConfigFiles%
			analysedPaths: %analysedPaths%
			composerAutoloaderProjectPaths: %composerAutoloaderProjectPaths%
			analysedPathsFromConfig: %analysedPathsFromConfig%
			usedLevel: %usedLevel%
			generateBaselineFile: %generateBaselineFile%
			cliAutoloadFile: %cliAutoloadFile%

	-
		class: PHPStan\DependencyInjection\Reflection\ClassReflectionExtensionRegistryProvider
		factory: PHPStan\DependencyInjection\Reflection\LazyClassReflectionExtensionRegistryProvider

	-
		class: PHPStan\DependencyInjection\Type\DynamicReturnTypeExtensionRegistryProvider
		factory: PHPStan\DependencyInjection\Type\LazyDynamicReturnTypeExtensionRegistryProvider

	-
		class: PHPStan\DependencyInjection\Type\OperatorTypeSpecifyingExtensionRegistryProvider
		factory: PHPStan\DependencyInjection\Type\LazyOperatorTypeSpecifyingExtensionRegistryProvider

	-
		class: PHPStan\DependencyInjection\Type\DynamicThrowTypeExtensionProvider
		factory: PHPStan\DependencyInjection\Type\LazyDynamicThrowTypeExtensionProvider

	-
		class: PHPStan\File\FileHelper
		arguments:
			workingDirectory: %currentWorkingDirectory%

	-
		class: PHPStan\File\FileExcluderFactory
		arguments:
			obsoleteExcludesAnalyse: %excludes_analyse%
			excludePaths: %excludePaths%

	-
		implement: PHPStan\File\FileExcluderRawFactory

	fileExcluderAnalyse:
		class: PHPStan\File\FileExcluder
		factory: @PHPStan\File\FileExcluderFactory::createAnalyseFileExcluder()
		autowired: false

	fileExcluderScan:
		class: PHPStan\File\FileExcluder
		factory: @PHPStan\File\FileExcluderFactory::createScanFileExcluder()
		autowired: false

	fileFinderAnalyse:
		class: PHPStan\File\FileFinder
		arguments:
			fileExcluder: @fileExcluderAnalyse
			fileExtensions: %fileExtensions%

		autowired: false

	fileFinderScan:
		class: PHPStan\File\FileFinder
		arguments:
			fileExcluder: @fileExcluderScan
			fileExtensions: %fileExtensions%

		autowired: false

	-
		class: PHPStan\File\FileMonitor
		arguments:
			fileFinder: @fileFinderAnalyse

	-
		class: PHPStan\NodeVisitor\StatementOrderVisitor
		tags:
			- phpstan.parser.richParserNodeVisitor

	-
		class: PHPStan\Parallel\ParallelAnalyser
		arguments:
			internalErrorsCountLimit: %internalErrorsCountLimit%
			processTimeout: %parallel.processTimeout%
			decoderBufferSize: %parallel.buffer%

	-
		class: PHPStan\Parallel\Scheduler
		arguments:
			jobSize: %parallel.jobSize%
			maximumNumberOfProcesses: %parallel.maximumNumberOfProcesses%
			minimumNumberOfJobsPerProcess: %parallel.minimumNumberOfJobsPerProcess%

	-
		class: PHPStan\Parser\FunctionCallStatementFinder

	-
		class: PHPStan\Process\CpuCoreCounter

	-
		implement: PHPStan\Reflection\FunctionReflectionFactory
		arguments:
			parser: @defaultAnalysisParser

	-
		class: PHPStan\Reflection\InitializerExprTypeResolver
		arguments:
			usePathConstantsAsConstantString: %usePathConstantsAsConstantString%

	-
		class: PHPStan\Reflection\Annotations\AnnotationsMethodsClassReflectionExtension

	-
		class: PHPStan\Reflection\Annotations\AnnotationsPropertiesClassReflectionExtension

	-
		class: PHPStan\Reflection\BetterReflection\SourceLocator\CachingVisitor

	-
		class: PHPStan\Reflection\BetterReflection\SourceLocator\FileNodesFetcher
		arguments:
			parser: @defaultAnalysisParser

	-
		class: PHPStan\Reflection\BetterReflection\SourceLocator\ComposerJsonAndInstalledJsonSourceLocatorMaker

	-
		class: PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedDirectorySourceLocatorFactory
		arguments:
			fileFinder: @fileFinderScan

	-
		class: PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedDirectorySourceLocatorRepository

	-
		implement: PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedPsrAutoloaderLocatorFactory

	-
		implement: PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedSingleFileSourceLocatorFactory

	-
		class: PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedSingleFileSourceLocatorRepository

	-
		class: PHPStan\Reflection\Mixin\MixinMethodsClassReflectionExtension
		tags:
			- phpstan.broker.methodsClassReflectionExtension

		arguments:
			mixinExcludeClasses: %mixinExcludeClasses%

	-
		class: PHPStan\Reflection\Mixin\MixinPropertiesClassReflectionExtension
		tags:
			- phpstan.broker.propertiesClassReflectionExtension

		arguments:
			mixinExcludeClasses: %mixinExcludeClasses%

	-
		class: PHPStan\Reflection\Php\PhpClassReflectionExtension
		arguments:
			parser: @defaultAnalysisParser
			inferPrivatePropertyTypeFromConstructor: %inferPrivatePropertyTypeFromConstructor%
			universalObjectCratesClasses: %universalObjectCratesClasses%

	-
		implement: PHPStan\Reflection\Php\PhpMethodReflectionFactory
		arguments:
			parser: @defaultAnalysisParser

	-
		class: PHPStan\Reflection\Php\Soap\SoapClientMethodsClassReflectionExtension
		tags:
			- phpstan.broker.methodsClassReflectionExtension

	-
		class: PHPStan\Reflection\Php\EnumAllowedSubTypesClassReflectionExtension
		tags:
			- phpstan.broker.allowedSubTypesClassReflectionExtension

	-
		class: PHPStan\Reflection\Php\UniversalObjectCratesClassReflectionExtension
		tags:
			- phpstan.broker.propertiesClassReflectionExtension

		arguments:
			classes: %universalObjectCratesClasses%

	-
		class: PHPStan\Reflection\ReflectionProvider\ReflectionProviderProvider
		factory: PHPStan\Reflection\ReflectionProvider\LazyReflectionProviderProvider

	-
		class: PHPStan\Reflection\SignatureMap\NativeFunctionReflectionProvider
		arguments:
			reflector: @betterReflectionReflector

	-
		class: PHPStan\Reflection\SignatureMap\SignatureMapParser

	-
		class: PHPStan\Reflection\SignatureMap\FunctionSignatureMapProvider
		arguments:
			stricterFunctionMap: %featureToggles.stricterFunctionMap%

		autowired:
			- PHPStan\Reflection\SignatureMap\FunctionSignatureMapProvider

	-
		class: PHPStan\Reflection\SignatureMap\Php8SignatureMapProvider
		autowired:
			- PHPStan\Reflection\SignatureMap\Php8SignatureMapProvider

	-
		class: PHPStan\Reflection\SignatureMap\SignatureMapProviderFactory

	-
		class: PHPStan\Reflection\SignatureMap\SignatureMapProvider
		factory: @PHPStan\Reflection\SignatureMap\SignatureMapProviderFactory::create()

	-
		class: PHPStan\Rules\Api\ApiRuleHelper

	-
		class: PHPStan\Rules\AttributesCheck
		arguments:
			deprecationRulesInstalled: %deprecationRulesInstalled%

	-
		class: PHPStan\Rules\Arrays\NonexistentOffsetInArrayDimFetchCheck
		arguments:
			reportMaybes: %reportMaybes%
			bleedingEdge: %featureToggles.bleedingEdge%

	-
		class: PHPStan\Rules\ClassCaseSensitivityCheck
		arguments:
			checkInternalClassCaseSensitivity: %checkInternalClassCaseSensitivity%

	-
		class: PHPStan\Rules\Classes\LocalTypeAliasesCheck
		arguments:
			globalTypeAliases: %typeAliases%

	-
		class: PHPStan\Rules\Comparison\ConstantConditionRuleHelper
		arguments:
			treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%
			looseComparisonRuleEnabled: %featureToggles.looseComparison%

	-
		class: PHPStan\Rules\Comparison\ImpossibleCheckTypeHelper
		arguments:
			universalObjectCratesClasses: %universalObjectCratesClasses%
			treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%
			nullContextForVoidReturningFunctions: %featureToggles.nullContextForVoidReturningFunctions%

	-
		class: PHPStan\Rules\Exceptions\DefaultExceptionTypeResolver
		arguments:
			uncheckedExceptionRegexes: %exceptions.uncheckedExceptionRegexes%
			uncheckedExceptionClasses: %exceptions.uncheckedExceptionClasses%
			checkedExceptionRegexes: %exceptions.checkedExceptionRegexes%
			checkedExceptionClasses: %exceptions.checkedExceptionClasses%

		autowired:
			- PHPStan\Rules\Exceptions\DefaultExceptionTypeResolver

	-
		class: PHPStan\Rules\Exceptions\MissingCheckedExceptionInFunctionThrowsRule

	-
		class: PHPStan\Rules\Exceptions\MissingCheckedExceptionInMethodThrowsRule

	-
		class: PHPStan\Rules\Exceptions\MissingCheckedExceptionInThrowsCheck
		arguments:
			exceptionTypeResolver: @exceptionTypeResolver

	-
		class: PHPStan\Rules\Exceptions\TooWideFunctionThrowTypeRule

	-
		class: PHPStan\Rules\Exceptions\TooWideMethodThrowTypeRule

	-
		class: PHPStan\Rules\Exceptions\TooWideThrowTypeCheck

	-
		class: PHPStan\Rules\FunctionCallParametersCheck
		arguments:
			checkArgumentTypes: %checkFunctionArgumentTypes%
			checkArgumentsPassedByReference: %checkArgumentsPassedByReference%
			checkExtraArguments: %checkExtraArguments%
			checkMissingTypehints: %checkMissingTypehints%
			checkUnresolvableParameterTypes: %featureToggles.checkUnresolvableParameterTypes%

	-
		class: PHPStan\Rules\FunctionDefinitionCheck
		arguments:
			checkClassCaseSensitivity: %checkClassCaseSensitivity%
			checkThisOnly: %checkThisOnly%

	-
		class: PHPStan\Rules\FunctionReturnTypeCheck

	-
		class: PHPStan\Rules\Generics\CrossCheckInterfacesHelper

	-
		class: PHPStan\Rules\Generics\GenericAncestorsCheck
		arguments:
			checkGenericClassInNonGenericObjectType: %checkGenericClassInNonGenericObjectType%
			skipCheckGenericClasses: %featureToggles.skipCheckGenericClasses%

	-
		class: PHPStan\Rules\Generics\GenericObjectTypeCheck

	-
		class: PHPStan\Rules\Generics\TemplateTypeCheck
		arguments:
			checkClassCaseSensitivity: %checkClassCaseSensitivity%

	-
		class: PHPStan\Rules\Generics\VarianceCheck
		arguments:
			checkParamOutVariance: %featureToggles.paramOutVariance%
			strictStaticVariance: %featureToggles.strictStaticMethodTemplateTypeVariance%

	-
		class: PHPStan\Rules\IssetCheck
		arguments:
			checkAdvancedIsset: %checkAdvancedIsset%
			treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%
			strictUnnecessaryNullsafePropertyFetch: %featureToggles.strictUnnecessaryNullsafePropertyFetch%

	-
		class: PHPStan\Rules\Methods\MethodCallCheck
		arguments:
			checkFunctionNameCase: %checkFunctionNameCase%
			reportMagicMethods: %reportMagicMethods%

	-
		class: PHPStan\Rules\Methods\StaticMethodCallCheck
		arguments:
			checkFunctionNameCase: %checkFunctionNameCase%
			reportMagicMethods: %reportMagicMethods%

	-
		class: PHPStan\Rules\Methods\MethodSignatureRule
		arguments:
			reportMaybes: %reportMaybesInMethodSignatures%
			reportStatic: %reportStaticMethodSignatures%

	-
		class: PHPStan\Rules\Methods\MethodParameterComparisonHelper
		arguments:
			genericPrototypeMessage: %featureToggles.genericPrototypeMessage%

	-
		class: PHPStan\Rules\MissingTypehintCheck
		arguments:
			checkMissingIterableValueType: %checkMissingIterableValueType%
			disableCheckMissingIterableValueType: %featureToggles.disableCheckMissingIterableValueType%
			checkGenericClassInNonGenericObjectType: %checkGenericClassInNonGenericObjectType%
			checkMissingCallableSignature: %checkMissingCallableSignature%
			skipCheckGenericClasses: %featureToggles.skipCheckGenericClasses%

	-
		class: PHPStan\Rules\NullsafeCheck

	-
		class: PHPStan\Rules\Constants\LazyAlwaysUsedClassConstantsExtensionProvider

	-
		class: PHPStan\Rules\PhpDoc\ConditionalReturnTypeRuleHelper

	-
		class: PHPStan\Rules\PhpDoc\AssertRuleHelper

	-
		class: PHPStan\Rules\PhpDoc\UnresolvableTypeHelper

	-
		class: PHPStan\Rules\PhpDoc\VarTagTypeRuleHelper
		arguments:
			checkTypeAgainstPhpDocType: %reportWrongPhpDocTypeInVarTag%

	-
		class: PHPStan\Rules\Playground\NeverRuleHelper

	-
		class: PHPStan\Rules\Properties\LazyReadWritePropertiesExtensionProvider

	-
		class: PHPStan\Rules\Properties\PropertyDescriptor

	-
		class: PHPStan\Rules\Properties\PropertyReflectionFinder

	-
		class: PHPStan\Rules\RuleLevelHelper
		arguments:
			checkNullables: %checkNullables%
			checkThisOnly: %checkThisOnly%
			checkUnionTypes: %checkUnionTypes%
			checkExplicitMixed: %checkExplicitMixed%
			checkImplicitMixed: %checkImplicitMixed%
			newRuleLevelHelper: %featureToggles.newRuleLevelHelper%
			checkBenevolentUnionTypes: %checkBenevolentUnionTypes%

	-
		class: PHPStan\Rules\UnusedFunctionParametersCheck

	-
		class: PHPStan\Type\FileTypeMapper
		arguments:
			phpParser: @defaultAnalysisParser

	-
		class: PHPStan\Type\TypeAliasResolver
		factory: PHPStan\Type\UsefulTypeAliasResolver
		arguments:
			globalTypeAliases: %typeAliases%

	-
		class: PHPStan\Type\TypeAliasResolverProvider
		factory: PHPStan\Type\LazyTypeAliasResolverProvider

	-
		class: PHPStan\Type\BitwiseFlagHelper

	-
		class: PHPStan\Type\Php\ArgumentBasedFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArrayIntersectKeyFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArrayChunkFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArrayColumnFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArrayCombineFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArrayCurrentDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArrayFillFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArrayFillKeysFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArrayFilterFunctionReturnTypeReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArrayFlipFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArrayKeyDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArrayKeyExistsFunctionTypeSpecifyingExtension
		tags:
			- phpstan.typeSpecifier.functionTypeSpecifyingExtension

	-
		class: PHPStan\Type\Php\ArrayKeyFirstDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArrayKeyLastDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArrayKeysFunctionDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArrayMapFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArrayMergeFunctionDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArrayNextDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArrayPopFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArrayRandFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArrayReduceFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArrayReplaceFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArrayReverseFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArrayShiftFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArraySliceFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArraySpliceFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArraySearchFunctionDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArraySearchFunctionTypeSpecifyingExtension
		tags:
			- phpstan.typeSpecifier.functionTypeSpecifyingExtension

	-
		class: PHPStan\Type\Php\ArrayValuesFunctionDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArraySumFunctionDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\BackedEnumFromMethodDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicStaticMethodReturnTypeExtension

	-
		class: PHPStan\Type\Php\Base64DecodeDynamicFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\BcMathStringOrNullReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ClosureBindDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicStaticMethodReturnTypeExtension

	-
		class: PHPStan\Type\Php\ClosureBindToDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicMethodReturnTypeExtension

	-
		class: PHPStan\Type\Php\ClosureFromCallableDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicStaticMethodReturnTypeExtension

	-
		class: PHPStan\Type\Php\CompactFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

		arguments:
			checkMaybeUndefinedVariables: %checkMaybeUndefinedVariables%

	-
		class: PHPStan\Type\Php\CountFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\CountFunctionTypeSpecifyingExtension
		tags:
			- phpstan.typeSpecifier.functionTypeSpecifyingExtension

	-
		class: PHPStan\Type\Php\CurlGetinfoFunctionDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\CurlInitReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\DateFormatFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\DateFormatMethodReturnTypeExtension
		tags:
			- phpstan.broker.dynamicMethodReturnTypeExtension

	-
		class: PHPStan\Type\Php\DateFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\DateIntervalConstructorThrowTypeExtension
		tags:
			- phpstan.dynamicStaticMethodThrowTypeExtension

	-
		class: PHPStan\Type\Php\DateIntervalDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicStaticMethodReturnTypeExtension

	-
		class: PHPStan\Type\Php\DateTimeCreateDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\DateTimeDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\DateTimeModifyReturnTypeExtension
		tags:
			- phpstan.broker.dynamicMethodReturnTypeExtension

		arguments:
			dateTimeClass: DateTime

	-
		class: PHPStan\Type\Php\DateTimeModifyReturnTypeExtension
		tags:
			- phpstan.broker.dynamicMethodReturnTypeExtension

		arguments:
			dateTimeClass: DateTimeImmutable

	-
		class: PHPStan\Type\Php\DateTimeConstructorThrowTypeExtension
		tags:
			- phpstan.dynamicStaticMethodThrowTypeExtension

	-
		class: PHPStan\Type\Php\DateTimeZoneConstructorThrowTypeExtension
		tags:
			- phpstan.dynamicStaticMethodThrowTypeExtension

	-
		class: PHPStan\Type\Php\DsMapDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicMethodReturnTypeExtension

	-
		class: PHPStan\Type\Php\DsMapDynamicMethodThrowTypeExtension
		tags:
			- phpstan.dynamicMethodThrowTypeExtension

	-
		class: PHPStan\Type\Php\DioStatDynamicFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ExplodeFunctionDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\FilterFunctionReturnTypeHelper

	-
		class: PHPStan\Type\Php\FilterInputDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\FilterVarDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\FilterVarArrayDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\GetCalledClassDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\GetClassDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\GetParentClassDynamicFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\GettimeofdayDynamicFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\HashFunctionsReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\IntdivThrowTypeExtension
		tags:
			- phpstan.dynamicFunctionThrowTypeExtension

	-
		class: PHPStan\Type\Php\IniGetReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\JsonThrowTypeExtension
		tags:
			- phpstan.dynamicFunctionThrowTypeExtension

	-
		class: PHPStan\Type\Php\ReflectionClassConstructorThrowTypeExtension
		tags:
			- phpstan.dynamicStaticMethodThrowTypeExtension

	-
		class: PHPStan\Type\Php\ReflectionFunctionConstructorThrowTypeExtension
		tags:
			- phpstan.dynamicStaticMethodThrowTypeExtension

	-
		class: PHPStan\Type\Php\ReflectionMethodConstructorThrowTypeExtension
		tags:
			- phpstan.dynamicStaticMethodThrowTypeExtension

	-
		class: PHPStan\Type\Php\ReflectionPropertyConstructorThrowTypeExtension
		tags:
			- phpstan.dynamicStaticMethodThrowTypeExtension

	-
		class: PHPStan\Type\Php\StrContainingTypeSpecifyingExtension
		tags:
			- phpstan.typeSpecifier.functionTypeSpecifyingExtension

	-
		class: PHPStan\Type\Php\SimpleXMLElementClassPropertyReflectionExtension
		tags:
			- phpstan.broker.propertiesClassReflectionExtension

	-
		class: PHPStan\Type\Php\SimpleXMLElementConstructorThrowTypeExtension
		tags:
			- phpstan.dynamicStaticMethodThrowTypeExtension

	-
		class: PHPStan\Type\Php\StatDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension
			- phpstan.broker.dynamicMethodReturnTypeExtension

	-
		class: PHPStan\Type\Php\MethodExistsTypeSpecifyingExtension
		tags:
			- phpstan.typeSpecifier.functionTypeSpecifyingExtension

	-
		class: PHPStan\Type\Php\PropertyExistsTypeSpecifyingExtension
		tags:
			- phpstan.typeSpecifier.functionTypeSpecifyingExtension

	-
		class: PHPStan\Type\Php\MinMaxFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\NumberFormatFunctionDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\PathinfoFunctionDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\PregFilterFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\PregSplitDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ReflectionClassIsSubclassOfTypeSpecifyingExtension
		tags:
			- phpstan.typeSpecifier.methodTypeSpecifyingExtension

	-
		class: PHPStan\Type\Php\ReplaceFunctionsDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ArrayPointerFunctionsDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\LtrimFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\MbFunctionsReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\MbConvertEncodingFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\MbSubstituteCharacterDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\MbStrlenFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\MicrotimeFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\HrtimeFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ImplodeFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\NonEmptyStringFunctionsReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\StrCaseFunctionsReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\StrlenFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\StrPadFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\StrRepeatFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\SubstrDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\ThrowableReturnTypeExtension
		tags:
			- phpstan.broker.dynamicMethodReturnTypeExtension

	-
		class: PHPStan\Type\Php\ParseUrlFunctionDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\TriggerErrorDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\VersionCompareFunctionDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\PowFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\RoundFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\StrtotimeFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\RandomIntFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\RangeFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\AssertFunctionTypeSpecifyingExtension
		tags:
			- phpstan.typeSpecifier.functionTypeSpecifyingExtension

	-
		class: PHPStan\Type\Php\ClassExistsFunctionTypeSpecifyingExtension
		tags:
			- phpstan.typeSpecifier.functionTypeSpecifyingExtension

	-
		class: PHPStan\Type\Php\ClassImplementsFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\DefineConstantTypeSpecifyingExtension
		tags:
			- phpstan.typeSpecifier.functionTypeSpecifyingExtension

	-
		class: PHPStan\Type\Php\DefinedConstantTypeSpecifyingExtension
		tags:
			- phpstan.typeSpecifier.functionTypeSpecifyingExtension

	-
		class: PHPStan\Type\Php\FunctionExistsFunctionTypeSpecifyingExtension
		tags:
			- phpstan.typeSpecifier.functionTypeSpecifyingExtension

	-
		class: PHPStan\Type\Php\InArrayFunctionTypeSpecifyingExtension
		tags:
			- phpstan.typeSpecifier.functionTypeSpecifyingExtension

	-
		class: PHPStan\Type\Php\IsArrayFunctionTypeSpecifyingExtension
		tags:
			- phpstan.typeSpecifier.functionTypeSpecifyingExtension

		arguments:
			explicitMixed: %featureToggles.explicitMixedViaIsArray%

	-
		class: PHPStan\Type\Php\IsCallableFunctionTypeSpecifyingExtension
		tags:
			- phpstan.typeSpecifier.functionTypeSpecifyingExtension

	-
		class: PHPStan\Type\Php\IsIterableFunctionTypeSpecifyingExtension
		tags:
			- phpstan.typeSpecifier.functionTypeSpecifyingExtension

	-
		class: PHPStan\Type\Php\IsSubclassOfFunctionTypeSpecifyingExtension
		tags:
			- phpstan.typeSpecifier.functionTypeSpecifyingExtension

	-
		class: PHPStan\Type\Php\IteratorToArrayFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\IsAFunctionTypeSpecifyingExtension
		tags:
			- phpstan.typeSpecifier.functionTypeSpecifyingExtension

	-
		class: PHPStan\Type\Php\IsAFunctionTypeSpecifyingHelper

	-
		class: PHPStan\Type\Php\CtypeDigitFunctionTypeSpecifyingExtension
		tags:
			- phpstan.typeSpecifier.functionTypeSpecifyingExtension

	-
		class: PHPStan\Type\Php\JsonThrowOnErrorDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\TypeSpecifyingFunctionsDynamicReturnTypeExtension
		arguments:
			treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%
			universalObjectCratesClasses: %universalObjectCratesClasses%
			nullContextForVoidReturningFunctions: %featureToggles.nullContextForVoidReturningFunctions%

		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\SimpleXMLElementAsXMLMethodReturnTypeExtension
		tags:
			- phpstan.broker.dynamicMethodReturnTypeExtension

	-
		class: PHPStan\Type\Php\SimpleXMLElementXpathMethodReturnTypeExtension
		tags:
			- phpstan.broker.dynamicMethodReturnTypeExtension

	-
		class: PHPStan\Type\Php\StrSplitFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\StrTokFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\SprintfFunctionDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\SscanfFunctionDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\StrvalFamilyFunctionReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\StrWordCountFunctionDynamicReturnTypeExtension
		tags:
			- phpstan.broker.dynamicFunctionReturnTypeExtension

	-
		class: PHPStan\Type\Php\XMLReaderOpenReturnTypeExtension
		tags:
			- phpstan.broker.dynamicMethodReturnTypeExtension
			- phpstan.broker.dynamicStaticMethodReturnTypeExtension

	-
		class: PHPStan\Type\Php\ReflectionGetAttributesMethodReturnTypeExtension
		arguments:
			className: ReflectionClass

		tags:
			- phpstan.broker.dynamicMethodReturnTypeExtension

	-
		class: PHPStan\Type\Php\ReflectionGetAttributesMethodReturnTypeExtension
		arguments:
			className: ReflectionClassConstant

		tags:
			- phpstan.broker.dynamicMethodReturnTypeExtension

	-
		class: PHPStan\Type\Php\ReflectionGetAttributesMethodReturnTypeExtension
		arguments:
			className: ReflectionFunctionAbstract

		tags:
			- phpstan.broker.dynamicMethodReturnTypeExtension

	-
		class: PHPStan\Type\Php\ReflectionGetAttributesMethodReturnTypeExtension
		arguments:
			className: ReflectionParameter

		tags:
			- phpstan.broker.dynamicMethodReturnTypeExtension

	-
		class: PHPStan\Type\Php\ReflectionGetAttributesMethodReturnTypeExtension
		arguments:
			className: ReflectionProperty

		tags:
			- phpstan.broker.dynamicMethodReturnTypeExtension

	-
		class: PHPStan\Type\Php\DatePeriodConstructorReturnTypeExtension
		tags:
			- phpstan.broker.dynamicStaticMethodReturnTypeExtension

	-
		class: PHPStan\Type\ClosureTypeFactory
		arguments:
			parser: @currentPhpVersionPhpParser

	-
		class: PHPStan\Type\Constant\OversizedArrayBuilder

	exceptionTypeResolver:
		class: PHPStan\Rules\Exceptions\ExceptionTypeResolver
		factory: @PHPStan\Rules\Exceptions\DefaultExceptionTypeResolver

	typeSpecifier:
		class: PHPStan\Analyser\TypeSpecifier
		factory: @typeSpecifierFactory::create

	typeSpecifierFactory:
		class: PHPStan\Analyser\TypeSpecifierFactory

	relativePathHelper:
		class: PHPStan\File\RelativePathHelper
		factory: PHPStan\File\FuzzyRelativePathHelper
		arguments:
			currentWorkingDirectory: %currentWorkingDirectory%
			analysedPaths: %analysedPaths%
			fallbackRelativePathHelper: @parentDirectoryRelativePathHelper

	simpleRelativePathHelper:
		class: PHPStan\File\RelativePathHelper
		factory: PHPStan\File\SimpleRelativePathHelper
		arguments:
			currentWorkingDirectory: %currentWorkingDirectory%

		autowired: false

	parentDirectoryRelativePathHelper:
		class: PHPStan\File\ParentDirectoryRelativePathHelper
		arguments:
			parentDirectory: %currentWorkingDirectory%

		autowired: false

	broker:
		class: PHPStan\Broker\Broker
		factory: @brokerFactory::create
		autowired:
			- PHPStan\Broker\Broker

	brokerFactory:
		class: PHPStan\Broker\BrokerFactory

	cacheStorage:
		class: PHPStan\Cache\FileCacheStorage
		arguments:
			directory: %tmpDir%/cache/PHPStan

		autowired: false

	currentPhpVersionRichParser:
		class: PHPStan\Parser\RichParser
		arguments:
			parser: @currentPhpVersionPhpParser
			lexer: @currentPhpVersionLexer

		autowired: false

	currentPhpVersionSimpleParser:
		class: PHPStan\Parser\CleaningParser
		arguments:
			wrappedParser: @currentPhpVersionSimpleDirectParser

		autowired: false

	currentPhpVersionSimpleDirectParser:
		class: PHPStan\Parser\SimpleParser
		arguments:
			parser: @currentPhpVersionPhpParser

		autowired: false

	defaultAnalysisParser:
		class: PHPStan\Parser\CachedParser
		arguments:
			originalParser: @pathRoutingParser
			cachedNodesByStringCountMax: %cache.nodesByStringCountMax%

		autowired: false

	phpParserDecorator:
		class: PHPStan\Parser\PhpParserDecorator
		arguments:
			wrappedParser: @defaultAnalysisParser

		autowired: false

	currentPhpVersionLexer:
		class: PhpParser\Lexer
		factory: @PHPStan\Parser\LexerFactory::create()
		autowired: false

	currentPhpVersionPhpParser:
		class: PhpParser\Parser\Php7
		arguments:
			lexer: @currentPhpVersionLexer

		autowired: false

	registry:
		class: PHPStan\Rules\LazyRegistry
		autowired:
			- PHPStan\Rules\Registry

	stubPhpDocProvider:
		class: PHPStan\PhpDoc\StubPhpDocProvider
		arguments:
			parser: @defaultAnalysisParser

	reflectionProviderFactory:
		class: PHPStan\Reflection\ReflectionProvider\ReflectionProviderFactory
		arguments:
			staticReflectionProvider: @betterReflectionProvider

	reflectionProvider:
		factory: @PHPStan\Reflection\ReflectionProvider\ReflectionProviderFactory::create
		autowired:
			- PHPStan\Reflection\ReflectionProvider

	betterReflectionSourceLocator:
		class: PHPStan\BetterReflection\SourceLocator\Type\SourceLocator
		factory: @PHPStan\Reflection\BetterReflection\BetterReflectionSourceLocatorFactory::create
		autowired: false

	originalBetterReflectionReflector:
		class: PHPStan\BetterReflection\Reflector\DefaultReflector
		arguments:
			sourceLocator: @betterReflectionSourceLocator

	betterReflectionReflector:
		class: PHPStan\Reflection\BetterReflection\Reflector\MemoizingReflector
		arguments:
			reflector: @originalBetterReflectionReflector

		autowired: false

	betterReflectionClassReflector:
		class: PHPStan\BetterReflection\Reflector\ClassReflector
		arguments:
			sourceLocator: @betterReflectionSourceLocator

		autowired: false

	betterReflectionFunctionReflector:
		class: PHPStan\BetterReflection\Reflector\FunctionReflector
		arguments:
			sourceLocator: @betterReflectionSourceLocator

		autowired: false

	betterReflectionConstantReflector:
		class: PHPStan\BetterReflection\Reflector\ConstantReflector
		arguments:
			sourceLocator: @betterReflectionSourceLocator

		autowired: false

	nodeScopeResolverReflector:
		factory: @betterReflectionReflector
		autowired: false

	betterReflectionProvider:
		class: PHPStan\Reflection\BetterReflection\BetterReflectionProvider
		arguments:
			reflector: @betterReflectionReflector

		autowired: false

	-
		class: PHPStan\Reflection\BetterReflection\BetterReflectionSourceLocatorFactory
		arguments:
			parser: @phpParserDecorator
			php8Parser: @php8PhpParser
			scanFiles: %scanFiles%
			scanDirectories: %scanDirectories%
			analysedPaths: %analysedPaths%
			composerAutoloaderProjectPaths: %composerAutoloaderProjectPaths%
			analysedPathsFromConfig: %analysedPathsFromConfig%

	-
		implement: PHPStan\Reflection\BetterReflection\BetterReflectionProviderFactory

	-
		class: PHPStan\Reflection\BetterReflection\SourceStubber\PhpStormStubsSourceStubberFactory
		arguments:
			phpParser: @php8PhpParser

	-
		factory: @PHPStan\Reflection\BetterReflection\SourceStubber\PhpStormStubsSourceStubberFactory::create()
		autowired:
			- PHPStan\BetterReflection\SourceLocator\SourceStubber\PhpStormStubsSourceStubber

	-
		class: PHPStan\BetterReflection\SourceLocator\SourceStubber\ReflectionSourceStubber
		autowired:
			- PHPStan\BetterReflection\SourceLocator\SourceStubber\ReflectionSourceStubber

	php8Lexer:
		class: PhpParser\Lexer\Emulative
		factory: @PHPStan\Parser\LexerFactory::createEmulative()
		autowired: false

	php8PhpParser:
		class: PhpParser\Parser\Php7
		arguments:
			lexer: @php8Lexer

		autowired: false

	php8Parser:
		class: PHPStan\Parser\SimpleParser
		arguments:
			parser: @php8PhpParser

		autowired: false

	pathRoutingParser:
		class: PHPStan\Parser\PathRoutingParser
		arguments:
			currentPhpVersionRichParser: @currentPhpVersionRichParser
			currentPhpVersionSimpleParser: @currentPhpVersionSimpleParser
			php8Parser: @php8Parser

		autowired: false

	-
		class: PHPStan\Command\ErrorFormatter\CiDetectedErrorFormatter
		autowired:
			- PHPStan\Command\ErrorFormatter\CiDetectedErrorFormatter

	errorFormatter.raw:
		class: PHPStan\Command\ErrorFormatter\RawErrorFormatter

	errorFormatter.table:
		class: PHPStan\Command\ErrorFormatter\TableErrorFormatter
		arguments:
			simpleRelativePathHelper: @simpleRelativePathHelper
			showTipsOfTheDay: %tipsOfTheDay%
			editorUrl: %editorUrl%
			editorUrlTitle: %editorUrlTitle%

	errorFormatter.checkstyle:
		class: PHPStan\Command\ErrorFormatter\CheckstyleErrorFormatter
		arguments:
			relativePathHelper: @simpleRelativePathHelper

	errorFormatter.json:
		class: PHPStan\Command\ErrorFormatter\JsonErrorFormatter
		arguments:
			pretty: false

	errorFormatter.junit:
		class: PHPStan\Command\ErrorFormatter\JunitErrorFormatter
		arguments:
			relativePathHelper: @simpleRelativePathHelper

	errorFormatter.prettyJson:
		class: PHPStan\Command\ErrorFormatter\JsonErrorFormatter
		arguments:
			pretty: true

	errorFormatter.gitlab:
		class: PHPStan\Command\ErrorFormatter\GitlabErrorFormatter
		arguments:
			relativePathHelper: @simpleRelativePathHelper

	errorFormatter.github:
		class: PHPStan\Command\ErrorFormatter\GithubErrorFormatter
		arguments:
			relativePathHelper: @simpleRelativePathHelper

	errorFormatter.teamcity:
		class: PHPStan\Command\ErrorFormatter\TeamcityErrorFormatter
		arguments:
			relativePathHelper: @simpleRelativePathHelper

includes:
	- config.level4.neon

parameters:
	checkFunctionArgumentTypes: true
	checkArgumentsPassedByReference: true

conditionalTags:
	PHPStan\Rules\Functions\ArrayFilterRule:
		phpstan.rules.rule: %featureToggles.arrayFilter%

rules:
	- PHPStan\Rules\DateTimeInstantiationRule
	- PHPStan\Rules\Functions\ImplodeFunctionRule

services:
	-
		class: PHPStan\Rules\Functions\RandomIntParametersRule
		arguments:
			reportMaybes: %reportMaybes%

		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Functions\ArrayFilterRule
		arguments:
			treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%

parameters:
	featureToggles:
		bleedingEdge: true
		skipCheckGenericClasses!: []
		explicitMixedInUnknownGenericNew: true
		explicitMixedForGlobalVariables: true
		explicitMixedViaIsArray: true
		arrayFilter: true
		arrayUnpacking: true
		nodeConnectingVisitorCompatibility: false
		nodeConnectingVisitorRule: true
		disableCheckMissingIterableValueType: true
		strictUnnecessaryNullsafePropertyFetch: true
		looseComparison: true
		consistentConstructor: true
		checkUnresolvableParameterTypes: true
		readOnlyByPhpDoc: true
		phpDocParserRequireWhitespaceBeforeDescription: true
		runtimeReflectionRules: true
		notAnalysedTrait: true
		curlSetOptTypes: true
		listType: true
		missingMagicSerializationRule: true
		nullContextForVoidReturningFunctions: true
		unescapeStrings: true
		duplicateStubs: true
		invarianceComposition: true
		alwaysTrueAlwaysReported: true
		disableUnreachableBranchesRules: true
		varTagType: true
		closureDefaultParameterTypeRule: true
		newRuleLevelHelper: true
		instanceofType: true
		paramOutVariance: true
		allInvalidPhpDocs: true
		strictStaticMethodTemplateTypeVariance: true
		propertyVariance: true
		genericPrototypeMessage: true
		stricterFunctionMap: true
		invalidPhpDocTagLine: true
		detectDeadTypeInMultiCatch: true

<?php // @codingStandardsIgnoreFile (phpcs runs out of memory)

/**
 * Copied over from https://github.com/phan/phan/blob/da49cd287e3b315f5dfdb440522da797d980fe63/src/Phan/Language/Internal/FunctionSignatureMap_php74_delta.php
 * with more functions added from PHP 7.4 changelog
 * Copyright (c) 2015 Rasmus Lerdorf
 * Copyright (c) 2015 Andrew Morrison
 */

/**
 * This contains the information needed to convert the function signatures for php 7.4 to php 7.3 (and vice versa)
 *
 * This has two sections.
 * The 'new' section contains function/method names from FunctionSignatureMap (And alternates, if applicable) that do not exist in php7.3 or have different signatures in php 7.4.
 *   If they were just updated, the function/method will be present in the 'added' signatures.
 * The 'old' signatures contains the signatures that are different in php 7.3.
 *   Functions are expected to be removed only in major releases of php.
 *
 * @see FunctionSignatureMap.php
 *
 * @phan-file-suppress PhanPluginMixedKeyNoKey (read by Phan when analyzing this file)
 */
return [
	'new' => [
		'FFI::addr' => ['FFI\CData', '&ptr'=>'FFI\CData'],
		'FFI::alignof' => ['int', '&ptr'=>'mixed'],
		'FFI::arrayType' => ['FFI\CType', 'type'=>'string|FFI\CType', 'dims'=>'array<int,int>'],
		'FFI::cast' => ['FFI\CData', 'type'=>'string|FFI\CType', '&ptr'=>''],
		'FFI::cdef' => ['FFI', 'code='=>'string', 'lib='=>'?string'],
		'FFI::free' => ['void', '&ptr'=>'FFI\CData'],
		'FFI::load' => ['FFI', 'filename'=>'string'],
		'FFI::memcmp' => ['int', '&ptr1'=>'FFI\CData|string', '&ptr2'=>'FFI\CData|string', 'size'=>'int'],
		'FFI::memcpy' => ['void', '&dst'=>'FFI\CData', '&src'=>'string|FFI\CData', 'size'=>'int'],
		'FFI::memset' => ['void', '&ptr'=>'FFI\CData', 'ch'=>'int', 'size'=>'int'],
		'FFI::new' => ['FFI\CData', 'type'=>'string|FFI\CType', 'owned='=>'bool', 'persistent='=>'bool'],
		'FFI::scope' => ['FFI', 'scope_name'=>'string'],
		'FFI::sizeof' => ['int', '&ptr'=>'FFI\CData|FFI\CType'],
		'FFI::string' => ['string', '&ptr'=>'FFI\CData', 'size='=>'int'],
		'FFI::typeof' => ['FFI\CType', '&ptr'=>'FFI\CData'],
		'FFI::type' => ['FFI\CType', 'type'=>'string'],
		'get_mangled_object_vars' => ['array', 'obj'=>'object'],
		'mb_str_split' => ['list<string>|false', 'str'=>'string', 'split_length='=>'int', 'encoding='=>'string'],
		'password_algos' => ['list<string>'],
		'password_hash' => ['__benevolent<string|false|null>', 'password'=>'string', 'algo'=>'string|null', 'options='=>'array'],
		'password_needs_rehash' => ['bool', 'hash'=>'string', 'algo'=>'string|null', 'options='=>'array'],
		'preg_replace_callback' => ['string|array|null', 'regex'=>'string|array', 'callback'=>'callable(array<int|string, string>):string', 'subject'=>'string|array', 'limit='=>'int', '&w_count='=>'int', 'flags='=>'int'],
		'preg_replace_callback_array' => ['string|array|null', 'pattern'=>'array<string,callable>', 'subject'=>'string|array', 'limit='=>'int', '&w_count='=>'int', 'flags='=>'int'],
		'sapi_windows_set_ctrl_handler' => ['bool', 'callable'=>'callable(int):void', 'add='=>'bool'],
		'ReflectionProperty::getType' => ['?ReflectionType'],
		'ReflectionProperty::hasType' => ['bool'],
		'ReflectionProperty::isInitialized' => ['bool', 'object='=>'?object'],
		'ReflectionReference::fromArrayElement' => ['?ReflectionReference', 'array'=>'array', 'key'=>'int|string'],
		'ReflectionReference::getId' => ['string'],
		'SQLite3Stmt::getSQL' => ['string', 'expanded='=>'bool'],
		'strip_tags' => ['string', 'str'=>'string', 'allowable_tags='=>'string|array<int, string>'],
		'WeakReference::create' => ['WeakReference', 'referent'=>'object'],
		'WeakReference::get' => ['?object'],
		'proc_open' => ['resource|false', 'command'=>'string|list<string>', 'descriptorspec'=>'array', '&w_pipes'=>'resource[]', 'cwd='=>'?string', 'env='=>'?array', 'other_options='=>'array'],
	],
	'old' => [
		'implode\'2' => ['string', 'pieces'=>'array', 'glue'=>'string'],
	],
];
<?php

namespace _PHPStan_dcc7b7cff;

// phpcs:ignoreFile
/**
 * Copied over from https://github.com/phan/phan/blob/8866d6b98be94b37996390da226e8c4befea29aa/src/Phan/Language/Internal/FunctionSignatureMap_php80_delta.php
 * Copyright (c) 2015 Rasmus Lerdorf
 * Copyright (c) 2015 Andrew Morrison
 */
/**
 * This contains the information needed to convert the function signatures for php 8.0 to php 7.4 (and vice versa)
 *
 * This has two sections.
 * The 'new' section contains function/method names from FunctionSignatureMap (And alternates, if applicable) that do not exist in php7.4 or have different signatures in php 8.0.
 *   If they were just updated, the function/method will be present in the 'added' signatures.
 * The 'old' signatures contains the signatures that are different in php 7.4.
 *   Functions are expected to be removed only in major releases of php.
 *
 * @see FunctionSignatureMap.php
 *
 * @phan-file-suppress PhanPluginMixedKeyNoKey (read by Phan when analyzing this file)
 */
return ['new' => [], 'old' => ['pg_escape_bytea' => ['string', 'connection' => 'resource', 'data' => 'string'], 'pg_escape_bytea\'1' => ['string', 'data' => 'string'], 'pg_escape_identifier' => ['string|false', 'connection' => 'resource', 'data' => 'string'], 'pg_escape_identifier\'1' => ['string', 'data' => 'string'], 'pg_escape_literal' => ['string|false', 'connection' => 'resource', 'data' => 'string'], 'pg_escape_literal\'1' => ['string', 'data' => 'string'], 'pg_escape_string' => ['string', 'connection' => 'resource', 'data' => 'string'], 'pg_escape_string\'1' => ['string', 'data' => 'string'], 'pg_execute' => ['resource|false', 'connection' => 'resource', 'stmtname' => 'string', 'params' => 'array'], 'pg_execute\'1' => ['resource|false', 'stmtname' => 'string', 'params' => 'array'], 'pg_fetch_object' => ['object|false', 'result' => '', 'row=' => '?int', 'result_type=' => 'int'], 'pg_fetch_object\'1' => ['object', 'result' => '', 'row=' => '?int', 'class_name=' => 'string', 'ctor_params=' => 'array'], 'pg_fetch_result' => ['', 'result' => '', 'field_name' => 'string|int'], 'pg_fetch_result\'1' => ['', 'result' => '', 'row_number' => 'int', 'field_name' => 'string|int'], 'pg_field_is_null' => ['int|false', 'result' => '', 'field_name_or_number' => 'string|int'], 'pg_field_is_null\'1' => ['int', 'result' => '', 'row' => 'int', 'field_name_or_number' => 'string|int'], 'pg_field_prtlen' => ['int|false', 'result' => '', 'field_name_or_number' => ''], 'pg_field_prtlen\'1' => ['int', 'result' => '', 'row' => 'int', 'field_name_or_number' => 'string|int'], 'pg_lo_export' => ['bool', 'connection' => 'resource', 'oid' => 'int', 'filename' => 'string'], 'pg_lo_export\'1' => ['bool', 'oid' => 'int', 'pathname' => 'string'], 'pg_lo_import' => ['int|false', 'connection' => 'resource', 'pathname' => 'string', 'oid' => ''], 'pg_lo_import\'1' => ['int', 'pathname' => 'string', 'oid' => ''], 'pg_parameter_status' => ['string|false', 'connection' => 'resource', 'param_name' => 'string'], 'pg_parameter_status\'1' => ['string|false', 'param_name' => 'string'], 'pg_prepare' => ['resource|false', 'connection' => 'resource', 'stmtname' => 'string', 'query' => 'string'], 'pg_prepare\'1' => ['resource|false', 'stmtname' => 'string', 'query' => 'string'], 'pg_put_line' => ['bool', 'connection' => 'resource', 'data' => 'string'], 'pg_put_line\'1' => ['bool', 'data' => 'string'], 'pg_query' => ['resource|false', 'connection' => 'resource', 'query' => 'string'], 'pg_query\'1' => ['resource|false', 'query' => 'string'], 'pg_query_params' => ['resource|false', 'connection' => 'resource', 'query' => 'string', 'params' => 'array'], 'pg_query_params\'1' => ['resource|false', 'query' => 'string', 'params' => 'array'], 'pg_set_client_encoding' => ['int', 'connection' => 'resource', 'encoding' => 'string'], 'pg_set_client_encoding\'1' => ['int', 'encoding' => 'string'], 'pg_set_error_verbosity' => ['int|false', 'connection' => 'resource', 'verbosity' => 'int'], 'pg_set_error_verbosity\'1' => ['int', 'verbosity' => 'int'], 'pg_tty' => ['string', 'connection=' => 'resource'], 'pg_tty\'1' => ['string'], 'pg_untrace' => ['bool', 'connection=' => 'resource'], 'pg_untrace\'1' => ['bool']]];
<?php

namespace _PHPStan_dcc7b7cff;

// phpcs:ignoreFile
/**
 * Copied over from https://github.com/phan/phan/blob/8866d6b98be94b37996390da226e8c4befea29aa/src/Phan/Language/Internal/FunctionSignatureMap_php80_delta.php
 * Copyright (c) 2015 Rasmus Lerdorf
 * Copyright (c) 2015 Andrew Morrison
 */
/**
 * This contains the information needed to convert the function signatures for php 8.0 to php 7.4 (and vice versa)
 *
 * This has two sections.
 * The 'new' section contains function/method names from FunctionSignatureMap (And alternates, if applicable) that do not exist in php7.4 or have different signatures in php 8.0.
 *   If they were just updated, the function/method will be present in the 'added' signatures.
 * The 'old' signatures contains the signatures that are different in php 7.4.
 *   Functions are expected to be removed only in major releases of php.
 *
 * @see FunctionSignatureMap.php
 *
 * @phan-file-suppress PhanPluginMixedKeyNoKey (read by Phan when analyzing this file)
 */
return ['new' => ['str_split' => ['list<string>', 'str' => 'string', 'split_length=' => 'positive-int']], 'old' => []];
<?php declare(strict_types = 1);

/**
 * GENERATED FILE - DO NOT EDIT!
 *
 * This file is generated automatically when running bin/generate-function-metadata.php
 * and the result is merged from bin/functionMetadata_original.php and by looking at jetbrains/phpstorm-stubs methods
 * and functions with the #[Pure] attribute.
 *
 * If you want to add new entries here follow these steps:
 * 1) verify on https://phpstan.org/try whether the entry you are going to add does not already work as expected.
 * 2) Contribute the functions that have 'hasSideEffects' => true as a modification to bin/functionMetadata_original.php.
 * 3) Contribute the #[Pure] functions without side effects to https://github.com/JetBrains/phpstorm-stubs
 * 4) Once the PR from 3) is merged, please update the package here and run ./bin/generate-function-metadata.php.
 */

return [
	'BackedEnum::from' => ['hasSideEffects' => false],
	'BackedEnum::tryFrom' => ['hasSideEffects' => false],
	'CURLFile::getFilename' => ['hasSideEffects' => false],
	'CURLFile::getMimeType' => ['hasSideEffects' => false],
	'CURLFile::getPostFilename' => ['hasSideEffects' => false],
	'Cassandra\\Exception\\AlreadyExistsException::__construct' => ['hasSideEffects' => false],
	'Cassandra\\Exception\\AuthenticationException::__construct' => ['hasSideEffects' => false],
	'Cassandra\\Exception\\ConfigurationException::__construct' => ['hasSideEffects' => false],
	'Cassandra\\Exception\\DivideByZeroException::__construct' => ['hasSideEffects' => false],
	'Cassandra\\Exception\\DomainException::__construct' => ['hasSideEffects' => false],
	'Cassandra\\Exception\\ExecutionException::__construct' => ['hasSideEffects' => false],
	'Cassandra\\Exception\\InvalidArgumentException::__construct' => ['hasSideEffects' => false],
	'Cassandra\\Exception\\InvalidQueryException::__construct' => ['hasSideEffects' => false],
	'Cassandra\\Exception\\InvalidSyntaxException::__construct' => ['hasSideEffects' => false],
	'Cassandra\\Exception\\IsBootstrappingException::__construct' => ['hasSideEffects' => false],
	'Cassandra\\Exception\\LogicException::__construct' => ['hasSideEffects' => false],
	'Cassandra\\Exception\\OverloadedException::__construct' => ['hasSideEffects' => false],
	'Cassandra\\Exception\\ProtocolException::__construct' => ['hasSideEffects' => false],
	'Cassandra\\Exception\\RangeException::__construct' => ['hasSideEffects' => false],
	'Cassandra\\Exception\\ReadTimeoutException::__construct' => ['hasSideEffects' => false],
	'Cassandra\\Exception\\RuntimeException::__construct' => ['hasSideEffects' => false],
	'Cassandra\\Exception\\ServerException::__construct' => ['hasSideEffects' => false],
	'Cassandra\\Exception\\TimeoutException::__construct' => ['hasSideEffects' => false],
	'Cassandra\\Exception\\TruncateException::__construct' => ['hasSideEffects' => false],
	'Cassandra\\Exception\\UnauthorizedException::__construct' => ['hasSideEffects' => false],
	'Cassandra\\Exception\\UnavailableException::__construct' => ['hasSideEffects' => false],
	'Cassandra\\Exception\\UnpreparedException::__construct' => ['hasSideEffects' => false],
	'Cassandra\\Exception\\ValidationException::__construct' => ['hasSideEffects' => false],
	'Cassandra\\Exception\\WriteTimeoutException::__construct' => ['hasSideEffects' => false],
	'Collator::__construct' => ['hasSideEffects' => false],
	'Collator::compare' => ['hasSideEffects' => false],
	'Collator::getAttribute' => ['hasSideEffects' => false],
	'Collator::getErrorCode' => ['hasSideEffects' => false],
	'Collator::getErrorMessage' => ['hasSideEffects' => false],
	'Collator::getLocale' => ['hasSideEffects' => false],
	'Collator::getSortKey' => ['hasSideEffects' => false],
	'Collator::getStrength' => ['hasSideEffects' => false],
	'DateTime::add' => ['hasSideEffects' => true],
	'DateTime::createFromFormat' => ['hasSideEffects' => false],
	'DateTime::createFromImmutable' => ['hasSideEffects' => false],
	'DateTime::diff' => ['hasSideEffects' => false],
	'DateTime::format' => ['hasSideEffects' => false],
	'DateTime::getLastErrors' => ['hasSideEffects' => false],
	'DateTime::getOffset' => ['hasSideEffects' => false],
	'DateTime::getTimestamp' => ['hasSideEffects' => false],
	'DateTime::getTimezone' => ['hasSideEffects' => false],
	'DateTime::modify' => ['hasSideEffects' => true],
	'DateTime::setDate' => ['hasSideEffects' => true],
	'DateTime::setISODate' => ['hasSideEffects' => true],
	'DateTime::setTime' => ['hasSideEffects' => true],
	'DateTime::setTimestamp' => ['hasSideEffects' => true],
	'DateTime::setTimezone' => ['hasSideEffects' => true],
	'DateTime::sub' => ['hasSideEffects' => true],
	'DateTimeImmutable::add' => ['hasSideEffects' => false],
	'DateTimeImmutable::createFromFormat' => ['hasSideEffects' => false],
	'DateTimeImmutable::createFromMutable' => ['hasSideEffects' => false],
	'DateTimeImmutable::diff' => ['hasSideEffects' => false],
	'DateTimeImmutable::format' => ['hasSideEffects' => false],
	'DateTimeImmutable::getLastErrors' => ['hasSideEffects' => false],
	'DateTimeImmutable::getOffset' => ['hasSideEffects' => false],
	'DateTimeImmutable::getTimestamp' => ['hasSideEffects' => false],
	'DateTimeImmutable::getTimezone' => ['hasSideEffects' => false],
	'DateTimeImmutable::modify' => ['hasSideEffects' => false],
	'DateTimeImmutable::setDate' => ['hasSideEffects' => false],
	'DateTimeImmutable::setISODate' => ['hasSideEffects' => false],
	'DateTimeImmutable::setTime' => ['hasSideEffects' => false],
	'DateTimeImmutable::setTimestamp' => ['hasSideEffects' => false],
	'DateTimeImmutable::setTimezone' => ['hasSideEffects' => false],
	'DateTimeImmutable::sub' => ['hasSideEffects' => false],
	'Error::__construct' => ['hasSideEffects' => false],
	'ErrorException::__construct' => ['hasSideEffects' => false],
	'Event::__construct' => ['hasSideEffects' => false],
	'EventBase::getFeatures' => ['hasSideEffects' => false],
	'EventBase::getMethod' => ['hasSideEffects' => false],
	'EventBase::getTimeOfDayCached' => ['hasSideEffects' => false],
	'EventBase::gotExit' => ['hasSideEffects' => false],
	'EventBase::gotStop' => ['hasSideEffects' => false],
	'EventBuffer::__construct' => ['hasSideEffects' => false],
	'EventBufferEvent::__construct' => ['hasSideEffects' => false],
	'EventBufferEvent::getDnsErrorString' => ['hasSideEffects' => false],
	'EventBufferEvent::getEnabled' => ['hasSideEffects' => false],
	'EventBufferEvent::getInput' => ['hasSideEffects' => false],
	'EventBufferEvent::getOutput' => ['hasSideEffects' => false],
	'EventConfig::__construct' => ['hasSideEffects' => false],
	'EventDnsBase::__construct' => ['hasSideEffects' => false],
	'EventHttpConnection::__construct' => ['hasSideEffects' => false],
	'EventHttpRequest::__construct' => ['hasSideEffects' => false],
	'EventHttpRequest::getCommand' => ['hasSideEffects' => false],
	'EventHttpRequest::getConnection' => ['hasSideEffects' => false],
	'EventHttpRequest::getHost' => ['hasSideEffects' => false],
	'EventHttpRequest::getInputBuffer' => ['hasSideEffects' => false],
	'EventHttpRequest::getInputHeaders' => ['hasSideEffects' => false],
	'EventHttpRequest::getOutputBuffer' => ['hasSideEffects' => false],
	'EventHttpRequest::getOutputHeaders' => ['hasSideEffects' => false],
	'EventHttpRequest::getResponseCode' => ['hasSideEffects' => false],
	'EventHttpRequest::getUri' => ['hasSideEffects' => false],
	'EventSslContext::__construct' => ['hasSideEffects' => false],
	'Exception::__construct' => ['hasSideEffects' => false],
	'Exception::getCode' => ['hasSideEffects' => false],
	'Exception::getFile' => ['hasSideEffects' => false],
	'Exception::getLine' => ['hasSideEffects' => false],
	'Exception::getMessage' => ['hasSideEffects' => false],
	'Exception::getPrevious' => ['hasSideEffects' => false],
	'Exception::getTrace' => ['hasSideEffects' => false],
	'Exception::getTraceAsString' => ['hasSideEffects' => false],
	'Gmagick::getcopyright' => ['hasSideEffects' => false],
	'Gmagick::getfilename' => ['hasSideEffects' => false],
	'Gmagick::getimagebackgroundcolor' => ['hasSideEffects' => false],
	'Gmagick::getimageblueprimary' => ['hasSideEffects' => false],
	'Gmagick::getimagebordercolor' => ['hasSideEffects' => false],
	'Gmagick::getimagechanneldepth' => ['hasSideEffects' => false],
	'Gmagick::getimagecolors' => ['hasSideEffects' => false],
	'Gmagick::getimagecolorspace' => ['hasSideEffects' => false],
	'Gmagick::getimagecompose' => ['hasSideEffects' => false],
	'Gmagick::getimagedelay' => ['hasSideEffects' => false],
	'Gmagick::getimagedepth' => ['hasSideEffects' => false],
	'Gmagick::getimagedispose' => ['hasSideEffects' => false],
	'Gmagick::getimageextrema' => ['hasSideEffects' => false],
	'Gmagick::getimagefilename' => ['hasSideEffects' => false],
	'Gmagick::getimageformat' => ['hasSideEffects' => false],
	'Gmagick::getimagegamma' => ['hasSideEffects' => false],
	'Gmagick::getimagegreenprimary' => ['hasSideEffects' => false],
	'Gmagick::getimageheight' => ['hasSideEffects' => false],
	'Gmagick::getimagehistogram' => ['hasSideEffects' => false],
	'Gmagick::getimageindex' => ['hasSideEffects' => false],
	'Gmagick::getimageinterlacescheme' => ['hasSideEffects' => false],
	'Gmagick::getimageiterations' => ['hasSideEffects' => false],
	'Gmagick::getimagematte' => ['hasSideEffects' => false],
	'Gmagick::getimagemattecolor' => ['hasSideEffects' => false],
	'Gmagick::getimageprofile' => ['hasSideEffects' => false],
	'Gmagick::getimageredprimary' => ['hasSideEffects' => false],
	'Gmagick::getimagerenderingintent' => ['hasSideEffects' => false],
	'Gmagick::getimageresolution' => ['hasSideEffects' => false],
	'Gmagick::getimagescene' => ['hasSideEffects' => false],
	'Gmagick::getimagesignature' => ['hasSideEffects' => false],
	'Gmagick::getimagetype' => ['hasSideEffects' => false],
	'Gmagick::getimageunits' => ['hasSideEffects' => false],
	'Gmagick::getimagewhitepoint' => ['hasSideEffects' => false],
	'Gmagick::getimagewidth' => ['hasSideEffects' => false],
	'Gmagick::getpackagename' => ['hasSideEffects' => false],
	'Gmagick::getquantumdepth' => ['hasSideEffects' => false],
	'Gmagick::getreleasedate' => ['hasSideEffects' => false],
	'Gmagick::getsamplingfactors' => ['hasSideEffects' => false],
	'Gmagick::getsize' => ['hasSideEffects' => false],
	'Gmagick::getversion' => ['hasSideEffects' => false],
	'GmagickDraw::getfillcolor' => ['hasSideEffects' => false],
	'GmagickDraw::getfillopacity' => ['hasSideEffects' => false],
	'GmagickDraw::getfont' => ['hasSideEffects' => false],
	'GmagickDraw::getfontsize' => ['hasSideEffects' => false],
	'GmagickDraw::getfontstyle' => ['hasSideEffects' => false],
	'GmagickDraw::getfontweight' => ['hasSideEffects' => false],
	'GmagickDraw::getstrokecolor' => ['hasSideEffects' => false],
	'GmagickDraw::getstrokeopacity' => ['hasSideEffects' => false],
	'GmagickDraw::getstrokewidth' => ['hasSideEffects' => false],
	'GmagickDraw::gettextdecoration' => ['hasSideEffects' => false],
	'GmagickDraw::gettextencoding' => ['hasSideEffects' => false],
	'GmagickPixel::getcolor' => ['hasSideEffects' => false],
	'GmagickPixel::getcolorcount' => ['hasSideEffects' => false],
	'GmagickPixel::getcolorvalue' => ['hasSideEffects' => false],
	'HttpMessage::getBody' => ['hasSideEffects' => false],
	'HttpMessage::getHeader' => ['hasSideEffects' => false],
	'HttpMessage::getHeaders' => ['hasSideEffects' => false],
	'HttpMessage::getHttpVersion' => ['hasSideEffects' => false],
	'HttpMessage::getInfo' => ['hasSideEffects' => false],
	'HttpMessage::getParentMessage' => ['hasSideEffects' => false],
	'HttpMessage::getRequestMethod' => ['hasSideEffects' => false],
	'HttpMessage::getRequestUrl' => ['hasSideEffects' => false],
	'HttpMessage::getResponseCode' => ['hasSideEffects' => false],
	'HttpMessage::getResponseStatus' => ['hasSideEffects' => false],
	'HttpMessage::getType' => ['hasSideEffects' => false],
	'HttpQueryString::get' => ['hasSideEffects' => false],
	'HttpQueryString::getArray' => ['hasSideEffects' => false],
	'HttpQueryString::getBool' => ['hasSideEffects' => false],
	'HttpQueryString::getFloat' => ['hasSideEffects' => false],
	'HttpQueryString::getInt' => ['hasSideEffects' => false],
	'HttpQueryString::getObject' => ['hasSideEffects' => false],
	'HttpQueryString::getString' => ['hasSideEffects' => false],
	'HttpRequest::getBody' => ['hasSideEffects' => false],
	'HttpRequest::getContentType' => ['hasSideEffects' => false],
	'HttpRequest::getCookies' => ['hasSideEffects' => false],
	'HttpRequest::getHeaders' => ['hasSideEffects' => false],
	'HttpRequest::getHistory' => ['hasSideEffects' => false],
	'HttpRequest::getMethod' => ['hasSideEffects' => false],
	'HttpRequest::getOptions' => ['hasSideEffects' => false],
	'HttpRequest::getPostFields' => ['hasSideEffects' => false],
	'HttpRequest::getPostFiles' => ['hasSideEffects' => false],
	'HttpRequest::getPutData' => ['hasSideEffects' => false],
	'HttpRequest::getPutFile' => ['hasSideEffects' => false],
	'HttpRequest::getQueryData' => ['hasSideEffects' => false],
	'HttpRequest::getRawPostData' => ['hasSideEffects' => false],
	'HttpRequest::getRawRequestMessage' => ['hasSideEffects' => false],
	'HttpRequest::getRawResponseMessage' => ['hasSideEffects' => false],
	'HttpRequest::getRequestMessage' => ['hasSideEffects' => false],
	'HttpRequest::getResponseBody' => ['hasSideEffects' => false],
	'HttpRequest::getResponseCode' => ['hasSideEffects' => false],
	'HttpRequest::getResponseCookies' => ['hasSideEffects' => false],
	'HttpRequest::getResponseData' => ['hasSideEffects' => false],
	'HttpRequest::getResponseHeader' => ['hasSideEffects' => false],
	'HttpRequest::getResponseInfo' => ['hasSideEffects' => false],
	'HttpRequest::getResponseMessage' => ['hasSideEffects' => false],
	'HttpRequest::getResponseStatus' => ['hasSideEffects' => false],
	'HttpRequest::getSslOptions' => ['hasSideEffects' => false],
	'HttpRequest::getUrl' => ['hasSideEffects' => false],
	'HttpRequestPool::getAttachedRequests' => ['hasSideEffects' => false],
	'HttpRequestPool::getFinishedRequests' => ['hasSideEffects' => false],
	'Imagick::getColorspace' => ['hasSideEffects' => false],
	'Imagick::getCompression' => ['hasSideEffects' => false],
	'Imagick::getCompressionQuality' => ['hasSideEffects' => false],
	'Imagick::getConfigureOptions' => ['hasSideEffects' => false],
	'Imagick::getFeatures' => ['hasSideEffects' => false],
	'Imagick::getFilename' => ['hasSideEffects' => false],
	'Imagick::getFont' => ['hasSideEffects' => false],
	'Imagick::getFormat' => ['hasSideEffects' => false],
	'Imagick::getGravity' => ['hasSideEffects' => false],
	'Imagick::getHDRIEnabled' => ['hasSideEffects' => false],
	'Imagick::getImage' => ['hasSideEffects' => false],
	'Imagick::getImageAlphaChannel' => ['hasSideEffects' => false],
	'Imagick::getImageArtifact' => ['hasSideEffects' => false],
	'Imagick::getImageAttribute' => ['hasSideEffects' => false],
	'Imagick::getImageBackgroundColor' => ['hasSideEffects' => false],
	'Imagick::getImageBlob' => ['hasSideEffects' => false],
	'Imagick::getImageBluePrimary' => ['hasSideEffects' => false],
	'Imagick::getImageBorderColor' => ['hasSideEffects' => false],
	'Imagick::getImageChannelDepth' => ['hasSideEffects' => false],
	'Imagick::getImageChannelDistortion' => ['hasSideEffects' => false],
	'Imagick::getImageChannelDistortions' => ['hasSideEffects' => false],
	'Imagick::getImageChannelExtrema' => ['hasSideEffects' => false],
	'Imagick::getImageChannelKurtosis' => ['hasSideEffects' => false],
	'Imagick::getImageChannelMean' => ['hasSideEffects' => false],
	'Imagick::getImageChannelRange' => ['hasSideEffects' => false],
	'Imagick::getImageChannelStatistics' => ['hasSideEffects' => false],
	'Imagick::getImageClipMask' => ['hasSideEffects' => false],
	'Imagick::getImageColormapColor' => ['hasSideEffects' => false],
	'Imagick::getImageColors' => ['hasSideEffects' => false],
	'Imagick::getImageColorspace' => ['hasSideEffects' => false],
	'Imagick::getImageCompose' => ['hasSideEffects' => false],
	'Imagick::getImageCompression' => ['hasSideEffects' => false],
	'Imagick::getImageCompressionQuality' => ['hasSideEffects' => false],
	'Imagick::getImageDelay' => ['hasSideEffects' => false],
	'Imagick::getImageDepth' => ['hasSideEffects' => false],
	'Imagick::getImageDispose' => ['hasSideEffects' => false],
	'Imagick::getImageDistortion' => ['hasSideEffects' => false],
	'Imagick::getImageExtrema' => ['hasSideEffects' => false],
	'Imagick::getImageFilename' => ['hasSideEffects' => false],
	'Imagick::getImageFormat' => ['hasSideEffects' => false],
	'Imagick::getImageGamma' => ['hasSideEffects' => false],
	'Imagick::getImageGeometry' => ['hasSideEffects' => false],
	'Imagick::getImageGravity' => ['hasSideEffects' => false],
	'Imagick::getImageGreenPrimary' => ['hasSideEffects' => false],
	'Imagick::getImageHeight' => ['hasSideEffects' => false],
	'Imagick::getImageHistogram' => ['hasSideEffects' => false],
	'Imagick::getImageIndex' => ['hasSideEffects' => false],
	'Imagick::getImageInterlaceScheme' => ['hasSideEffects' => false],
	'Imagick::getImageInterpolateMethod' => ['hasSideEffects' => false],
	'Imagick::getImageIterations' => ['hasSideEffects' => false],
	'Imagick::getImageLength' => ['hasSideEffects' => false],
	'Imagick::getImageMatte' => ['hasSideEffects' => false],
	'Imagick::getImageMatteColor' => ['hasSideEffects' => false],
	'Imagick::getImageMimeType' => ['hasSideEffects' => false],
	'Imagick::getImageOrientation' => ['hasSideEffects' => false],
	'Imagick::getImagePage' => ['hasSideEffects' => false],
	'Imagick::getImagePixelColor' => ['hasSideEffects' => false],
	'Imagick::getImageProfile' => ['hasSideEffects' => false],
	'Imagick::getImageProfiles' => ['hasSideEffects' => false],
	'Imagick::getImageProperties' => ['hasSideEffects' => false],
	'Imagick::getImageProperty' => ['hasSideEffects' => false],
	'Imagick::getImageRedPrimary' => ['hasSideEffects' => false],
	'Imagick::getImageRegion' => ['hasSideEffects' => false],
	'Imagick::getImageRenderingIntent' => ['hasSideEffects' => false],
	'Imagick::getImageResolution' => ['hasSideEffects' => false],
	'Imagick::getImageScene' => ['hasSideEffects' => false],
	'Imagick::getImageSignature' => ['hasSideEffects' => false],
	'Imagick::getImageSize' => ['hasSideEffects' => false],
	'Imagick::getImageTicksPerSecond' => ['hasSideEffects' => false],
	'Imagick::getImageTotalInkDensity' => ['hasSideEffects' => false],
	'Imagick::getImageType' => ['hasSideEffects' => false],
	'Imagick::getImageUnits' => ['hasSideEffects' => false],
	'Imagick::getImageVirtualPixelMethod' => ['hasSideEffects' => false],
	'Imagick::getImageWhitePoint' => ['hasSideEffects' => false],
	'Imagick::getImageWidth' => ['hasSideEffects' => false],
	'Imagick::getImagesBlob' => ['hasSideEffects' => false],
	'Imagick::getInterlaceScheme' => ['hasSideEffects' => false],
	'Imagick::getIteratorIndex' => ['hasSideEffects' => false],
	'Imagick::getNumberImages' => ['hasSideEffects' => false],
	'Imagick::getOption' => ['hasSideEffects' => false],
	'Imagick::getPage' => ['hasSideEffects' => false],
	'Imagick::getPixelIterator' => ['hasSideEffects' => false],
	'Imagick::getPixelRegionIterator' => ['hasSideEffects' => false],
	'Imagick::getPointSize' => ['hasSideEffects' => false],
	'Imagick::getSamplingFactors' => ['hasSideEffects' => false],
	'Imagick::getSize' => ['hasSideEffects' => false],
	'Imagick::getSizeOffset' => ['hasSideEffects' => false],
	'ImagickDraw::getBorderColor' => ['hasSideEffects' => false],
	'ImagickDraw::getClipPath' => ['hasSideEffects' => false],
	'ImagickDraw::getClipRule' => ['hasSideEffects' => false],
	'ImagickDraw::getClipUnits' => ['hasSideEffects' => false],
	'ImagickDraw::getDensity' => ['hasSideEffects' => false],
	'ImagickDraw::getFillColor' => ['hasSideEffects' => false],
	'ImagickDraw::getFillOpacity' => ['hasSideEffects' => false],
	'ImagickDraw::getFillRule' => ['hasSideEffects' => false],
	'ImagickDraw::getFont' => ['hasSideEffects' => false],
	'ImagickDraw::getFontFamily' => ['hasSideEffects' => false],
	'ImagickDraw::getFontResolution' => ['hasSideEffects' => false],
	'ImagickDraw::getFontSize' => ['hasSideEffects' => false],
	'ImagickDraw::getFontStretch' => ['hasSideEffects' => false],
	'ImagickDraw::getFontStyle' => ['hasSideEffects' => false],
	'ImagickDraw::getFontWeight' => ['hasSideEffects' => false],
	'ImagickDraw::getGravity' => ['hasSideEffects' => false],
	'ImagickDraw::getOpacity' => ['hasSideEffects' => false],
	'ImagickDraw::getStrokeAntialias' => ['hasSideEffects' => false],
	'ImagickDraw::getStrokeColor' => ['hasSideEffects' => false],
	'ImagickDraw::getStrokeDashArray' => ['hasSideEffects' => false],
	'ImagickDraw::getStrokeDashOffset' => ['hasSideEffects' => false],
	'ImagickDraw::getStrokeLineCap' => ['hasSideEffects' => false],
	'ImagickDraw::getStrokeLineJoin' => ['hasSideEffects' => false],
	'ImagickDraw::getStrokeMiterLimit' => ['hasSideEffects' => false],
	'ImagickDraw::getStrokeOpacity' => ['hasSideEffects' => false],
	'ImagickDraw::getStrokeWidth' => ['hasSideEffects' => false],
	'ImagickDraw::getTextAlignment' => ['hasSideEffects' => false],
	'ImagickDraw::getTextAntialias' => ['hasSideEffects' => false],
	'ImagickDraw::getTextDecoration' => ['hasSideEffects' => false],
	'ImagickDraw::getTextDirection' => ['hasSideEffects' => false],
	'ImagickDraw::getTextEncoding' => ['hasSideEffects' => false],
	'ImagickDraw::getTextInterLineSpacing' => ['hasSideEffects' => false],
	'ImagickDraw::getTextInterWordSpacing' => ['hasSideEffects' => false],
	'ImagickDraw::getTextKerning' => ['hasSideEffects' => false],
	'ImagickDraw::getTextUnderColor' => ['hasSideEffects' => false],
	'ImagickDraw::getVectorGraphics' => ['hasSideEffects' => false],
	'ImagickKernel::getMatrix' => ['hasSideEffects' => false],
	'ImagickPixel::getColor' => ['hasSideEffects' => false],
	'ImagickPixel::getColorAsString' => ['hasSideEffects' => false],
	'ImagickPixel::getColorCount' => ['hasSideEffects' => false],
	'ImagickPixel::getColorQuantum' => ['hasSideEffects' => false],
	'ImagickPixel::getColorValue' => ['hasSideEffects' => false],
	'ImagickPixel::getColorValueQuantum' => ['hasSideEffects' => false],
	'ImagickPixel::getHSL' => ['hasSideEffects' => false],
	'ImagickPixel::getIndex' => ['hasSideEffects' => false],
	'ImagickPixelIterator::getCurrentIteratorRow' => ['hasSideEffects' => false],
	'ImagickPixelIterator::getIteratorRow' => ['hasSideEffects' => false],
	'ImagickPixelIterator::getNextIteratorRow' => ['hasSideEffects' => false],
	'ImagickPixelIterator::getPreviousIteratorRow' => ['hasSideEffects' => false],
	'IntBackedEnum::from' => ['hasSideEffects' => false],
	'IntBackedEnum::tryFrom' => ['hasSideEffects' => false],
	'IntlBreakIterator::current' => ['hasSideEffects' => false],
	'IntlBreakIterator::getErrorCode' => ['hasSideEffects' => false],
	'IntlBreakIterator::getErrorMessage' => ['hasSideEffects' => false],
	'IntlBreakIterator::getIterator' => ['hasSideEffects' => false],
	'IntlBreakIterator::getLocale' => ['hasSideEffects' => false],
	'IntlBreakIterator::getPartsIterator' => ['hasSideEffects' => false],
	'IntlBreakIterator::getText' => ['hasSideEffects' => false],
	'IntlBreakIterator::isBoundary' => ['hasSideEffects' => false],
	'IntlCalendar::after' => ['hasSideEffects' => false],
	'IntlCalendar::before' => ['hasSideEffects' => false],
	'IntlCalendar::equals' => ['hasSideEffects' => false],
	'IntlCalendar::fieldDifference' => ['hasSideEffects' => false],
	'IntlCalendar::get' => ['hasSideEffects' => false],
	'IntlCalendar::getActualMaximum' => ['hasSideEffects' => false],
	'IntlCalendar::getActualMinimum' => ['hasSideEffects' => false],
	'IntlCalendar::getDayOfWeekType' => ['hasSideEffects' => false],
	'IntlCalendar::getErrorCode' => ['hasSideEffects' => false],
	'IntlCalendar::getErrorMessage' => ['hasSideEffects' => false],
	'IntlCalendar::getFirstDayOfWeek' => ['hasSideEffects' => false],
	'IntlCalendar::getGreatestMinimum' => ['hasSideEffects' => false],
	'IntlCalendar::getLeastMaximum' => ['hasSideEffects' => false],
	'IntlCalendar::getLocale' => ['hasSideEffects' => false],
	'IntlCalendar::getMaximum' => ['hasSideEffects' => false],
	'IntlCalendar::getMinimalDaysInFirstWeek' => ['hasSideEffects' => false],
	'IntlCalendar::getMinimum' => ['hasSideEffects' => false],
	'IntlCalendar::getRepeatedWallTimeOption' => ['hasSideEffects' => false],
	'IntlCalendar::getSkippedWallTimeOption' => ['hasSideEffects' => false],
	'IntlCalendar::getTime' => ['hasSideEffects' => false],
	'IntlCalendar::getTimeZone' => ['hasSideEffects' => false],
	'IntlCalendar::getType' => ['hasSideEffects' => false],
	'IntlCalendar::getWeekendTransition' => ['hasSideEffects' => false],
	'IntlCalendar::inDaylightTime' => ['hasSideEffects' => false],
	'IntlCalendar::isEquivalentTo' => ['hasSideEffects' => false],
	'IntlCalendar::isLenient' => ['hasSideEffects' => false],
	'IntlCalendar::isWeekend' => ['hasSideEffects' => false],
	'IntlCalendar::toDateTime' => ['hasSideEffects' => false],
	'IntlChar::hasBinaryProperty' => ['hasSideEffects' => false],
	'IntlCodePointBreakIterator::getLastCodePoint' => ['hasSideEffects' => false],
	'IntlDateFormatter::__construct' => ['hasSideEffects' => false],
	'IntlDateFormatter::getCalendar' => ['hasSideEffects' => false],
	'IntlDateFormatter::getCalendarObject' => ['hasSideEffects' => false],
	'IntlDateFormatter::getDateType' => ['hasSideEffects' => false],
	'IntlDateFormatter::getErrorCode' => ['hasSideEffects' => false],
	'IntlDateFormatter::getErrorMessage' => ['hasSideEffects' => false],
	'IntlDateFormatter::getLocale' => ['hasSideEffects' => false],
	'IntlDateFormatter::getPattern' => ['hasSideEffects' => false],
	'IntlDateFormatter::getTimeType' => ['hasSideEffects' => false],
	'IntlDateFormatter::getTimeZone' => ['hasSideEffects' => false],
	'IntlDateFormatter::getTimeZoneId' => ['hasSideEffects' => false],
	'IntlDateFormatter::isLenient' => ['hasSideEffects' => false],
	'IntlGregorianCalendar::getGregorianChange' => ['hasSideEffects' => false],
	'IntlGregorianCalendar::isLeapYear' => ['hasSideEffects' => false],
	'IntlPartsIterator::getBreakIterator' => ['hasSideEffects' => false],
	'IntlRuleBasedBreakIterator::__construct' => ['hasSideEffects' => false],
	'IntlRuleBasedBreakIterator::getBinaryRules' => ['hasSideEffects' => false],
	'IntlRuleBasedBreakIterator::getRuleStatus' => ['hasSideEffects' => false],
	'IntlRuleBasedBreakIterator::getRuleStatusVec' => ['hasSideEffects' => false],
	'IntlRuleBasedBreakIterator::getRules' => ['hasSideEffects' => false],
	'IntlTimeZone::getDSTSavings' => ['hasSideEffects' => false],
	'IntlTimeZone::getDisplayName' => ['hasSideEffects' => false],
	'IntlTimeZone::getErrorCode' => ['hasSideEffects' => false],
	'IntlTimeZone::getErrorMessage' => ['hasSideEffects' => false],
	'IntlTimeZone::getID' => ['hasSideEffects' => false],
	'IntlTimeZone::getRawOffset' => ['hasSideEffects' => false],
	'IntlTimeZone::hasSameRules' => ['hasSideEffects' => false],
	'IntlTimeZone::toDateTimeZone' => ['hasSideEffects' => false],
	'JsonIncrementalParser::__construct' => ['hasSideEffects' => false],
	'JsonIncrementalParser::get' => ['hasSideEffects' => false],
	'JsonIncrementalParser::getError' => ['hasSideEffects' => false],
	'MemcachedException::__construct' => ['hasSideEffects' => false],
	'MessageFormatter::__construct' => ['hasSideEffects' => false],
	'MessageFormatter::format' => ['hasSideEffects' => false],
	'MessageFormatter::getErrorCode' => ['hasSideEffects' => false],
	'MessageFormatter::getErrorMessage' => ['hasSideEffects' => false],
	'MessageFormatter::getLocale' => ['hasSideEffects' => false],
	'MessageFormatter::getPattern' => ['hasSideEffects' => false],
	'MessageFormatter::parse' => ['hasSideEffects' => false],
	'NumberFormatter::__construct' => ['hasSideEffects' => false],
	'NumberFormatter::format' => ['hasSideEffects' => false],
	'NumberFormatter::formatCurrency' => ['hasSideEffects' => false],
	'NumberFormatter::getAttribute' => ['hasSideEffects' => false],
	'NumberFormatter::getErrorCode' => ['hasSideEffects' => false],
	'NumberFormatter::getErrorMessage' => ['hasSideEffects' => false],
	'NumberFormatter::getLocale' => ['hasSideEffects' => false],
	'NumberFormatter::getPattern' => ['hasSideEffects' => false],
	'NumberFormatter::getSymbol' => ['hasSideEffects' => false],
	'NumberFormatter::getTextAttribute' => ['hasSideEffects' => false],
	'ReflectionAttribute::getArguments' => ['hasSideEffects' => false],
	'ReflectionAttribute::getName' => ['hasSideEffects' => false],
	'ReflectionAttribute::getTarget' => ['hasSideEffects' => false],
	'ReflectionAttribute::isRepeated' => ['hasSideEffects' => false],
	'ReflectionClass::getAttributes' => ['hasSideEffects' => false],
	'ReflectionClass::getConstant' => ['hasSideEffects' => false],
	'ReflectionClass::getConstants' => ['hasSideEffects' => false],
	'ReflectionClass::getConstructor' => ['hasSideEffects' => false],
	'ReflectionClass::getDefaultProperties' => ['hasSideEffects' => false],
	'ReflectionClass::getDocComment' => ['hasSideEffects' => false],
	'ReflectionClass::getEndLine' => ['hasSideEffects' => false],
	'ReflectionClass::getExtension' => ['hasSideEffects' => false],
	'ReflectionClass::getExtensionName' => ['hasSideEffects' => false],
	'ReflectionClass::getFileName' => ['hasSideEffects' => false],
	'ReflectionClass::getInterfaceNames' => ['hasSideEffects' => false],
	'ReflectionClass::getInterfaces' => ['hasSideEffects' => false],
	'ReflectionClass::getMethod' => ['hasSideEffects' => false],
	'ReflectionClass::getMethods' => ['hasSideEffects' => false],
	'ReflectionClass::getModifiers' => ['hasSideEffects' => false],
	'ReflectionClass::getName' => ['hasSideEffects' => false],
	'ReflectionClass::getNamespaceName' => ['hasSideEffects' => false],
	'ReflectionClass::getParentClass' => ['hasSideEffects' => false],
	'ReflectionClass::getProperties' => ['hasSideEffects' => false],
	'ReflectionClass::getProperty' => ['hasSideEffects' => false],
	'ReflectionClass::getReflectionConstant' => ['hasSideEffects' => false],
	'ReflectionClass::getReflectionConstants' => ['hasSideEffects' => false],
	'ReflectionClass::getShortName' => ['hasSideEffects' => false],
	'ReflectionClass::getStartLine' => ['hasSideEffects' => false],
	'ReflectionClass::getStaticProperties' => ['hasSideEffects' => false],
	'ReflectionClass::getStaticPropertyValue' => ['hasSideEffects' => false],
	'ReflectionClass::getTraitAliases' => ['hasSideEffects' => false],
	'ReflectionClass::getTraitNames' => ['hasSideEffects' => false],
	'ReflectionClass::getTraits' => ['hasSideEffects' => false],
	'ReflectionClass::isAbstract' => ['hasSideEffects' => false],
	'ReflectionClass::isAnonymous' => ['hasSideEffects' => false],
	'ReflectionClass::isCloneable' => ['hasSideEffects' => false],
	'ReflectionClass::isFinal' => ['hasSideEffects' => false],
	'ReflectionClass::isInstance' => ['hasSideEffects' => false],
	'ReflectionClass::isInstantiable' => ['hasSideEffects' => false],
	'ReflectionClass::isInterface' => ['hasSideEffects' => false],
	'ReflectionClass::isInternal' => ['hasSideEffects' => false],
	'ReflectionClass::isIterable' => ['hasSideEffects' => false],
	'ReflectionClass::isIterateable' => ['hasSideEffects' => false],
	'ReflectionClass::isReadOnly' => ['hasSideEffects' => false],
	'ReflectionClass::isSubclassOf' => ['hasSideEffects' => false],
	'ReflectionClass::isTrait' => ['hasSideEffects' => false],
	'ReflectionClass::isUserDefined' => ['hasSideEffects' => false],
	'ReflectionClassConstant::getAttributes' => ['hasSideEffects' => false],
	'ReflectionClassConstant::getDeclaringClass' => ['hasSideEffects' => false],
	'ReflectionClassConstant::getDocComment' => ['hasSideEffects' => false],
	'ReflectionClassConstant::getModifiers' => ['hasSideEffects' => false],
	'ReflectionClassConstant::getName' => ['hasSideEffects' => false],
	'ReflectionClassConstant::getValue' => ['hasSideEffects' => false],
	'ReflectionClassConstant::isPrivate' => ['hasSideEffects' => false],
	'ReflectionClassConstant::isProtected' => ['hasSideEffects' => false],
	'ReflectionClassConstant::isPublic' => ['hasSideEffects' => false],
	'ReflectionExtension::getClassNames' => ['hasSideEffects' => false],
	'ReflectionExtension::getClasses' => ['hasSideEffects' => false],
	'ReflectionExtension::getConstants' => ['hasSideEffects' => false],
	'ReflectionExtension::getDependencies' => ['hasSideEffects' => false],
	'ReflectionExtension::getFunctions' => ['hasSideEffects' => false],
	'ReflectionExtension::getINIEntries' => ['hasSideEffects' => false],
	'ReflectionExtension::getName' => ['hasSideEffects' => false],
	'ReflectionExtension::getVersion' => ['hasSideEffects' => false],
	'ReflectionExtension::isPersistent' => ['hasSideEffects' => false],
	'ReflectionExtension::isTemporary' => ['hasSideEffects' => false],
	'ReflectionFunction::getClosure' => ['hasSideEffects' => false],
	'ReflectionFunction::isDisabled' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::getAttributes' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::getClosureCalledClass' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::getClosureScopeClass' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::getClosureThis' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::getClosureUsedVariables' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::getDocComment' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::getEndLine' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::getExtension' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::getExtensionName' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::getFileName' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::getName' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::getNamespaceName' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::getNumberOfParameters' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::getNumberOfRequiredParameters' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::getParameters' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::getReturnType' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::getShortName' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::getStartLine' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::getStaticVariables' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::getTentativeReturnType' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::hasTentativeReturnType' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::isClosure' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::isDeprecated' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::isGenerator' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::isInternal' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::isStatic' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::isUserDefined' => ['hasSideEffects' => false],
	'ReflectionFunctionAbstract::isVariadic' => ['hasSideEffects' => false],
	'ReflectionGenerator::getExecutingFile' => ['hasSideEffects' => false],
	'ReflectionGenerator::getExecutingGenerator' => ['hasSideEffects' => false],
	'ReflectionGenerator::getExecutingLine' => ['hasSideEffects' => false],
	'ReflectionGenerator::getFunction' => ['hasSideEffects' => false],
	'ReflectionGenerator::getThis' => ['hasSideEffects' => false],
	'ReflectionGenerator::getTrace' => ['hasSideEffects' => false],
	'ReflectionIntersectionType::getTypes' => ['hasSideEffects' => false],
	'ReflectionMethod::getClosure' => ['hasSideEffects' => false],
	'ReflectionMethod::getDeclaringClass' => ['hasSideEffects' => false],
	'ReflectionMethod::getModifiers' => ['hasSideEffects' => false],
	'ReflectionMethod::getPrototype' => ['hasSideEffects' => false],
	'ReflectionMethod::isAbstract' => ['hasSideEffects' => false],
	'ReflectionMethod::isConstructor' => ['hasSideEffects' => false],
	'ReflectionMethod::isDestructor' => ['hasSideEffects' => false],
	'ReflectionMethod::isFinal' => ['hasSideEffects' => false],
	'ReflectionMethod::isPrivate' => ['hasSideEffects' => false],
	'ReflectionMethod::isProtected' => ['hasSideEffects' => false],
	'ReflectionMethod::isPublic' => ['hasSideEffects' => false],
	'ReflectionMethod::isStatic' => ['hasSideEffects' => false],
	'ReflectionMethod::setAccessible' => ['hasSideEffects' => false],
	'ReflectionNamedType::getName' => ['hasSideEffects' => false],
	'ReflectionNamedType::isBuiltin' => ['hasSideEffects' => false],
	'ReflectionParameter::getAttributes' => ['hasSideEffects' => false],
	'ReflectionParameter::getClass' => ['hasSideEffects' => false],
	'ReflectionParameter::getDeclaringClass' => ['hasSideEffects' => false],
	'ReflectionParameter::getDeclaringFunction' => ['hasSideEffects' => false],
	'ReflectionParameter::getDefaultValue' => ['hasSideEffects' => false],
	'ReflectionParameter::getDefaultValueConstantName' => ['hasSideEffects' => false],
	'ReflectionParameter::getName' => ['hasSideEffects' => false],
	'ReflectionParameter::getPosition' => ['hasSideEffects' => false],
	'ReflectionParameter::getType' => ['hasSideEffects' => false],
	'ReflectionParameter::isArray' => ['hasSideEffects' => false],
	'ReflectionParameter::isCallable' => ['hasSideEffects' => false],
	'ReflectionParameter::isDefaultValueAvailable' => ['hasSideEffects' => false],
	'ReflectionParameter::isDefaultValueConstant' => ['hasSideEffects' => false],
	'ReflectionParameter::isOptional' => ['hasSideEffects' => false],
	'ReflectionParameter::isPassedByReference' => ['hasSideEffects' => false],
	'ReflectionParameter::isPromoted' => ['hasSideEffects' => false],
	'ReflectionParameter::isVariadic' => ['hasSideEffects' => false],
	'ReflectionProperty::getAttributes' => ['hasSideEffects' => false],
	'ReflectionProperty::getDeclaringClass' => ['hasSideEffects' => false],
	'ReflectionProperty::getDefaultValue' => ['hasSideEffects' => false],
	'ReflectionProperty::getDocComment' => ['hasSideEffects' => false],
	'ReflectionProperty::getModifiers' => ['hasSideEffects' => false],
	'ReflectionProperty::getName' => ['hasSideEffects' => false],
	'ReflectionProperty::getType' => ['hasSideEffects' => false],
	'ReflectionProperty::getValue' => ['hasSideEffects' => false],
	'ReflectionProperty::isDefault' => ['hasSideEffects' => false],
	'ReflectionProperty::isInitialized' => ['hasSideEffects' => false],
	'ReflectionProperty::isPrivate' => ['hasSideEffects' => false],
	'ReflectionProperty::isPromoted' => ['hasSideEffects' => false],
	'ReflectionProperty::isProtected' => ['hasSideEffects' => false],
	'ReflectionProperty::isPublic' => ['hasSideEffects' => false],
	'ReflectionProperty::isStatic' => ['hasSideEffects' => false],
	'ReflectionProperty::setAccessible' => ['hasSideEffects' => false],
	'ReflectionReference::getId' => ['hasSideEffects' => false],
	'ReflectionType::isBuiltin' => ['hasSideEffects' => false],
	'ReflectionUnionType::getTypes' => ['hasSideEffects' => false],
	'ReflectionZendExtension::getAuthor' => ['hasSideEffects' => false],
	'ReflectionZendExtension::getCopyright' => ['hasSideEffects' => false],
	'ReflectionZendExtension::getName' => ['hasSideEffects' => false],
	'ReflectionZendExtension::getURL' => ['hasSideEffects' => false],
	'ReflectionZendExtension::getVersion' => ['hasSideEffects' => false],
	'ResourceBundle::__construct' => ['hasSideEffects' => false],
	'ResourceBundle::count' => ['hasSideEffects' => false],
	'ResourceBundle::get' => ['hasSideEffects' => false],
	'ResourceBundle::getErrorCode' => ['hasSideEffects' => false],
	'ResourceBundle::getErrorMessage' => ['hasSideEffects' => false],
	'ResourceBundle::getIterator' => ['hasSideEffects' => false],
	'SQLiteException::__construct' => ['hasSideEffects' => false],
	'SimpleXMLElement::__construct' => ['hasSideEffects' => false],
	'SimpleXMLElement::children' => ['hasSideEffects' => false],
	'SimpleXMLElement::count' => ['hasSideEffects' => false],
	'SimpleXMLElement::current' => ['hasSideEffects' => false],
	'SimpleXMLElement::getChildren' => ['hasSideEffects' => false],
	'SimpleXMLElement::getDocNamespaces' => ['hasSideEffects' => false],
	'SimpleXMLElement::getName' => ['hasSideEffects' => false],
	'SimpleXMLElement::getNamespaces' => ['hasSideEffects' => false],
	'SimpleXMLElement::hasChildren' => ['hasSideEffects' => false],
	'SimpleXMLElement::offsetExists' => ['hasSideEffects' => false],
	'SimpleXMLElement::offsetGet' => ['hasSideEffects' => false],
	'SimpleXMLElement::valid' => ['hasSideEffects' => false],
	'SimpleXMLIterator::count' => ['hasSideEffects' => false],
	'SimpleXMLIterator::current' => ['hasSideEffects' => false],
	'SimpleXMLIterator::getChildren' => ['hasSideEffects' => false],
	'SimpleXMLIterator::hasChildren' => ['hasSideEffects' => false],
	'SimpleXMLIterator::valid' => ['hasSideEffects' => false],
	'SoapFault::__construct' => ['hasSideEffects' => false],
	'Spoofchecker::__construct' => ['hasSideEffects' => false],
	'StringBackedEnum::from' => ['hasSideEffects' => false],
	'StringBackedEnum::tryFrom' => ['hasSideEffects' => false],
	'StubTests\\CodeStyle\\BracesOneLineFixer::getDefinition' => ['hasSideEffects' => false],
	'StubTests\\Parsers\\ExpectedFunctionArgumentsInfo::__toString' => ['hasSideEffects' => false],
	'StubTests\\Parsers\\Visitors\\CoreStubASTVisitor::__construct' => ['hasSideEffects' => false],
	'StubTests\\StubsMetaExpectedArgumentsTest::getClassMemberFqn' => ['hasSideEffects' => false],
	'StubTests\\StubsParameterNamesTest::printParameters' => ['hasSideEffects' => false],
	'Transliterator::createInverse' => ['hasSideEffects' => false],
	'Transliterator::getErrorCode' => ['hasSideEffects' => false],
	'Transliterator::getErrorMessage' => ['hasSideEffects' => false],
	'Transliterator::transliterate' => ['hasSideEffects' => false],
	'UConverter::__construct' => ['hasSideEffects' => false],
	'UConverter::convert' => ['hasSideEffects' => false],
	'UConverter::getDestinationEncoding' => ['hasSideEffects' => false],
	'UConverter::getDestinationType' => ['hasSideEffects' => false],
	'UConverter::getErrorCode' => ['hasSideEffects' => false],
	'UConverter::getErrorMessage' => ['hasSideEffects' => false],
	'UConverter::getSourceEncoding' => ['hasSideEffects' => false],
	'UConverter::getSourceType' => ['hasSideEffects' => false],
	'UConverter::getStandards' => ['hasSideEffects' => false],
	'UConverter::getSubstChars' => ['hasSideEffects' => false],
	'UConverter::reasonText' => ['hasSideEffects' => false],
	'UnitEnum::cases' => ['hasSideEffects' => false],
	'XmlReader::next' => ['hasSideEffects' => true],
	'XmlReader::read' => ['hasSideEffects' => true],
	'Zookeeper::getAcl' => ['hasSideEffects' => false],
	'Zookeeper::getChildren' => ['hasSideEffects' => false],
	'Zookeeper::getClientId' => ['hasSideEffects' => false],
	'Zookeeper::getRecvTimeout' => ['hasSideEffects' => false],
	'Zookeeper::getState' => ['hasSideEffects' => false],
	'_' => ['hasSideEffects' => false],
	'abs' => ['hasSideEffects' => false],
	'acos' => ['hasSideEffects' => false],
	'acosh' => ['hasSideEffects' => false],
	'addcslashes' => ['hasSideEffects' => false],
	'addslashes' => ['hasSideEffects' => false],
	'apache_get_modules' => ['hasSideEffects' => false],
	'apache_get_version' => ['hasSideEffects' => false],
	'apache_getenv' => ['hasSideEffects' => false],
	'apache_request_headers' => ['hasSideEffects' => false],
	'array_change_key_case' => ['hasSideEffects' => false],
	'array_chunk' => ['hasSideEffects' => false],
	'array_column' => ['hasSideEffects' => false],
	'array_combine' => ['hasSideEffects' => false],
	'array_count_values' => ['hasSideEffects' => false],
	'array_diff' => ['hasSideEffects' => false],
	'array_diff_assoc' => ['hasSideEffects' => false],
	'array_diff_key' => ['hasSideEffects' => false],
	'array_diff_uassoc' => ['hasSideEffects' => false],
	'array_diff_ukey' => ['hasSideEffects' => false],
	'array_fill' => ['hasSideEffects' => false],
	'array_fill_keys' => ['hasSideEffects' => false],
	'array_flip' => ['hasSideEffects' => false],
	'array_intersect' => ['hasSideEffects' => false],
	'array_intersect_assoc' => ['hasSideEffects' => false],
	'array_intersect_key' => ['hasSideEffects' => false],
	'array_intersect_uassoc' => ['hasSideEffects' => false],
	'array_intersect_ukey' => ['hasSideEffects' => false],
	'array_is_list' => ['hasSideEffects' => false],
	'array_key_exists' => ['hasSideEffects' => false],
	'array_key_first' => ['hasSideEffects' => false],
	'array_key_last' => ['hasSideEffects' => false],
	'array_keys' => ['hasSideEffects' => false],
	'array_merge' => ['hasSideEffects' => false],
	'array_merge_recursive' => ['hasSideEffects' => false],
	'array_pad' => ['hasSideEffects' => false],
	'array_pop' => ['hasSideEffects' => true],
	'array_product' => ['hasSideEffects' => false],
	'array_push' => ['hasSideEffects' => true],
	'array_rand' => ['hasSideEffects' => false],
	'array_replace' => ['hasSideEffects' => false],
	'array_replace_recursive' => ['hasSideEffects' => false],
	'array_reverse' => ['hasSideEffects' => false],
	'array_search' => ['hasSideEffects' => false],
	'array_shift' => ['hasSideEffects' => true],
	'array_slice' => ['hasSideEffects' => false],
	'array_sum' => ['hasSideEffects' => false],
	'array_udiff' => ['hasSideEffects' => false],
	'array_udiff_assoc' => ['hasSideEffects' => false],
	'array_udiff_uassoc' => ['hasSideEffects' => false],
	'array_uintersect' => ['hasSideEffects' => false],
	'array_uintersect_assoc' => ['hasSideEffects' => false],
	'array_uintersect_uassoc' => ['hasSideEffects' => false],
	'array_unique' => ['hasSideEffects' => false],
	'array_unshift' => ['hasSideEffects' => true],
	'array_values' => ['hasSideEffects' => false],
	'asin' => ['hasSideEffects' => false],
	'asinh' => ['hasSideEffects' => false],
	'atan' => ['hasSideEffects' => false],
	'atan2' => ['hasSideEffects' => false],
	'atanh' => ['hasSideEffects' => false],
	'base64_decode' => ['hasSideEffects' => false],
	'base64_encode' => ['hasSideEffects' => false],
	'base_convert' => ['hasSideEffects' => false],
	'basename' => ['hasSideEffects' => false],
	'bcadd' => ['hasSideEffects' => false],
	'bccomp' => ['hasSideEffects' => false],
	'bcdiv' => ['hasSideEffects' => false],
	'bcmod' => ['hasSideEffects' => false],
	'bcmul' => ['hasSideEffects' => false],
	'bcpow' => ['hasSideEffects' => false],
	'bcpowmod' => ['hasSideEffects' => false],
	'bcsqrt' => ['hasSideEffects' => false],
	'bcsub' => ['hasSideEffects' => false],
	'bin2hex' => ['hasSideEffects' => false],
	'bindec' => ['hasSideEffects' => false],
	'boolval' => ['hasSideEffects' => false],
	'bzcompress' => ['hasSideEffects' => false],
	'bzdecompress' => ['hasSideEffects' => false],
	'bzerrno' => ['hasSideEffects' => false],
	'bzerror' => ['hasSideEffects' => false],
	'bzerrstr' => ['hasSideEffects' => false],
	'bzopen' => ['hasSideEffects' => false],
	'ceil' => ['hasSideEffects' => false],
	'checkdate' => ['hasSideEffects' => false],
	'checkdnsrr' => ['hasSideEffects' => false],
	'chgrp' => ['hasSideEffects' => true],
	'chmod' => ['hasSideEffects' => true],
	'chop' => ['hasSideEffects' => false],
	'chown' => ['hasSideEffects' => true],
	'chr' => ['hasSideEffects' => false],
	'chunk_split' => ['hasSideEffects' => false],
	'class_implements' => ['hasSideEffects' => false],
	'class_parents' => ['hasSideEffects' => false],
	'cli_get_process_title' => ['hasSideEffects' => false],
	'collator_compare' => ['hasSideEffects' => false],
	'collator_create' => ['hasSideEffects' => false],
	'collator_get_attribute' => ['hasSideEffects' => false],
	'collator_get_error_code' => ['hasSideEffects' => false],
	'collator_get_error_message' => ['hasSideEffects' => false],
	'collator_get_locale' => ['hasSideEffects' => false],
	'collator_get_sort_key' => ['hasSideEffects' => false],
	'collator_get_strength' => ['hasSideEffects' => false],
	'compact' => ['hasSideEffects' => false],
	'connection_aborted' => ['hasSideEffects' => false],
	'connection_status' => ['hasSideEffects' => false],
	'constant' => ['hasSideEffects' => false],
	'convert_cyr_string' => ['hasSideEffects' => false],
	'convert_uudecode' => ['hasSideEffects' => false],
	'convert_uuencode' => ['hasSideEffects' => false],
	'copy' => ['hasSideEffects' => true],
	'cos' => ['hasSideEffects' => false],
	'cosh' => ['hasSideEffects' => false],
	'count' => ['hasSideEffects' => false],
	'count_chars' => ['hasSideEffects' => false],
	'crc32' => ['hasSideEffects' => false],
	'crypt' => ['hasSideEffects' => false],
	'ctype_alnum' => ['hasSideEffects' => false],
	'ctype_alpha' => ['hasSideEffects' => false],
	'ctype_cntrl' => ['hasSideEffects' => false],
	'ctype_digit' => ['hasSideEffects' => false],
	'ctype_graph' => ['hasSideEffects' => false],
	'ctype_lower' => ['hasSideEffects' => false],
	'ctype_print' => ['hasSideEffects' => false],
	'ctype_punct' => ['hasSideEffects' => false],
	'ctype_space' => ['hasSideEffects' => false],
	'ctype_upper' => ['hasSideEffects' => false],
	'ctype_xdigit' => ['hasSideEffects' => false],
	'curl_copy_handle' => ['hasSideEffects' => false],
	'curl_errno' => ['hasSideEffects' => false],
	'curl_error' => ['hasSideEffects' => false],
	'curl_escape' => ['hasSideEffects' => false],
	'curl_file_create' => ['hasSideEffects' => false],
	'curl_getinfo' => ['hasSideEffects' => false],
	'curl_multi_errno' => ['hasSideEffects' => false],
	'curl_multi_getcontent' => ['hasSideEffects' => false],
	'curl_multi_info_read' => ['hasSideEffects' => false],
	'curl_share_errno' => ['hasSideEffects' => false],
	'curl_share_strerror' => ['hasSideEffects' => false],
	'curl_strerror' => ['hasSideEffects' => false],
	'curl_unescape' => ['hasSideEffects' => false],
	'curl_version' => ['hasSideEffects' => false],
	'current' => ['hasSideEffects' => false],
	'date' => ['hasSideEffects' => false],
	'date_create' => ['hasSideEffects' => false],
	'date_create_from_format' => ['hasSideEffects' => false],
	'date_create_immutable' => ['hasSideEffects' => false],
	'date_create_immutable_from_format' => ['hasSideEffects' => false],
	'date_default_timezone_get' => ['hasSideEffects' => false],
	'date_diff' => ['hasSideEffects' => false],
	'date_format' => ['hasSideEffects' => false],
	'date_get_last_errors' => ['hasSideEffects' => false],
	'date_interval_create_from_date_string' => ['hasSideEffects' => false],
	'date_interval_format' => ['hasSideEffects' => false],
	'date_offset_get' => ['hasSideEffects' => false],
	'date_parse' => ['hasSideEffects' => false],
	'date_parse_from_format' => ['hasSideEffects' => false],
	'date_sun_info' => ['hasSideEffects' => false],
	'date_sunrise' => ['hasSideEffects' => false],
	'date_sunset' => ['hasSideEffects' => false],
	'date_timestamp_get' => ['hasSideEffects' => false],
	'date_timezone_get' => ['hasSideEffects' => false],
	'datefmt_create' => ['hasSideEffects' => false],
	'datefmt_format' => ['hasSideEffects' => false],
	'datefmt_format_object' => ['hasSideEffects' => false],
	'datefmt_get_calendar' => ['hasSideEffects' => false],
	'datefmt_get_calendar_object' => ['hasSideEffects' => false],
	'datefmt_get_datetype' => ['hasSideEffects' => false],
	'datefmt_get_error_code' => ['hasSideEffects' => false],
	'datefmt_get_error_message' => ['hasSideEffects' => false],
	'datefmt_get_locale' => ['hasSideEffects' => false],
	'datefmt_get_pattern' => ['hasSideEffects' => false],
	'datefmt_get_timetype' => ['hasSideEffects' => false],
	'datefmt_get_timezone' => ['hasSideEffects' => false],
	'datefmt_get_timezone_id' => ['hasSideEffects' => false],
	'datefmt_is_lenient' => ['hasSideEffects' => false],
	'dcngettext' => ['hasSideEffects' => false],
	'decbin' => ['hasSideEffects' => false],
	'dechex' => ['hasSideEffects' => false],
	'decoct' => ['hasSideEffects' => false],
	'defined' => ['hasSideEffects' => false],
	'deflate_init' => ['hasSideEffects' => false],
	'deg2rad' => ['hasSideEffects' => false],
	'dirname' => ['hasSideEffects' => false],
	'disk_free_space' => ['hasSideEffects' => false],
	'disk_total_space' => ['hasSideEffects' => false],
	'diskfreespace' => ['hasSideEffects' => false],
	'dngettext' => ['hasSideEffects' => false],
	'doubleval' => ['hasSideEffects' => false],
	'error_get_last' => ['hasSideEffects' => false],
	'escapeshellarg' => ['hasSideEffects' => false],
	'escapeshellcmd' => ['hasSideEffects' => false],
	'exp' => ['hasSideEffects' => false],
	'explode' => ['hasSideEffects' => false],
	'expm1' => ['hasSideEffects' => false],
	'extension_loaded' => ['hasSideEffects' => false],
	'fclose' => ['hasSideEffects' => true],
	'fdiv' => ['hasSideEffects' => false],
	'feof' => ['hasSideEffects' => false],
	'fflush' => ['hasSideEffects' => true],
	'fgetc' => ['hasSideEffects' => true],
	'fgetcsv' => ['hasSideEffects' => true],
	'fgets' => ['hasSideEffects' => true],
	'fgetss' => ['hasSideEffects' => true],
	'file' => ['hasSideEffects' => false],
	'file_exists' => ['hasSideEffects' => false],
	'file_get_contents' => ['hasSideEffects' => false],
	'file_put_contents' => ['hasSideEffects' => true],
	'fileatime' => ['hasSideEffects' => false],
	'filectime' => ['hasSideEffects' => false],
	'filegroup' => ['hasSideEffects' => false],
	'fileinode' => ['hasSideEffects' => false],
	'filemtime' => ['hasSideEffects' => false],
	'fileowner' => ['hasSideEffects' => false],
	'fileperms' => ['hasSideEffects' => false],
	'filesize' => ['hasSideEffects' => false],
	'filetype' => ['hasSideEffects' => false],
	'filter_has_var' => ['hasSideEffects' => false],
	'filter_id' => ['hasSideEffects' => false],
	'filter_input' => ['hasSideEffects' => false],
	'filter_input_array' => ['hasSideEffects' => false],
	'filter_list' => ['hasSideEffects' => false],
	'filter_var' => ['hasSideEffects' => false],
	'filter_var_array' => ['hasSideEffects' => false],
	'finfo::buffer' => ['hasSideEffects' => false],
	'finfo::file' => ['hasSideEffects' => false],
	'floatval' => ['hasSideEffects' => false],
	'flock' => ['hasSideEffects' => true],
	'floor' => ['hasSideEffects' => false],
	'fmod' => ['hasSideEffects' => false],
	'fnmatch' => ['hasSideEffects' => false],
	'fopen' => ['hasSideEffects' => true],
	'fpassthru' => ['hasSideEffects' => true],
	'fputcsv' => ['hasSideEffects' => true],
	'fputs' => ['hasSideEffects' => true],
	'fread' => ['hasSideEffects' => true],
	'fscanf' => ['hasSideEffects' => true],
	'fseek' => ['hasSideEffects' => true],
	'fstat' => ['hasSideEffects' => false],
	'ftell' => ['hasSideEffects' => false],
	'ftok' => ['hasSideEffects' => false],
	'ftruncate' => ['hasSideEffects' => true],
	'func_get_arg' => ['hasSideEffects' => false],
	'func_get_args' => ['hasSideEffects' => false],
	'func_num_args' => ['hasSideEffects' => false],
	'function_exists' => ['hasSideEffects' => false],
	'fwrite' => ['hasSideEffects' => true],
	'gc_enabled' => ['hasSideEffects' => false],
	'gc_status' => ['hasSideEffects' => false],
	'gd_info' => ['hasSideEffects' => false],
	'geoip_continent_code_by_name' => ['hasSideEffects' => false],
	'geoip_country_code3_by_name' => ['hasSideEffects' => false],
	'geoip_country_code_by_name' => ['hasSideEffects' => false],
	'geoip_country_name_by_name' => ['hasSideEffects' => false],
	'geoip_database_info' => ['hasSideEffects' => false],
	'geoip_db_avail' => ['hasSideEffects' => false],
	'geoip_db_filename' => ['hasSideEffects' => false],
	'geoip_db_get_all_info' => ['hasSideEffects' => false],
	'geoip_id_by_name' => ['hasSideEffects' => false],
	'geoip_isp_by_name' => ['hasSideEffects' => false],
	'geoip_org_by_name' => ['hasSideEffects' => false],
	'geoip_record_by_name' => ['hasSideEffects' => false],
	'geoip_region_by_name' => ['hasSideEffects' => false],
	'geoip_region_name_by_code' => ['hasSideEffects' => false],
	'geoip_time_zone_by_country_and_region' => ['hasSideEffects' => false],
	'get_browser' => ['hasSideEffects' => false],
	'get_called_class' => ['hasSideEffects' => false],
	'get_cfg_var' => ['hasSideEffects' => false],
	'get_class' => ['hasSideEffects' => false],
	'get_class_methods' => ['hasSideEffects' => false],
	'get_class_vars' => ['hasSideEffects' => false],
	'get_current_user' => ['hasSideEffects' => false],
	'get_debug_type' => ['hasSideEffects' => false],
	'get_declared_classes' => ['hasSideEffects' => false],
	'get_declared_interfaces' => ['hasSideEffects' => false],
	'get_declared_traits' => ['hasSideEffects' => false],
	'get_defined_constants' => ['hasSideEffects' => false],
	'get_defined_functions' => ['hasSideEffects' => false],
	'get_defined_vars' => ['hasSideEffects' => false],
	'get_extension_funcs' => ['hasSideEffects' => false],
	'get_headers' => ['hasSideEffects' => false],
	'get_html_translation_table' => ['hasSideEffects' => false],
	'get_include_path' => ['hasSideEffects' => false],
	'get_included_files' => ['hasSideEffects' => false],
	'get_loaded_extensions' => ['hasSideEffects' => false],
	'get_meta_tags' => ['hasSideEffects' => false],
	'get_object_vars' => ['hasSideEffects' => false],
	'get_parent_class' => ['hasSideEffects' => false],
	'get_required_files' => ['hasSideEffects' => false],
	'get_resource_id' => ['hasSideEffects' => false],
	'get_resources' => ['hasSideEffects' => false],
	'getallheaders' => ['hasSideEffects' => false],
	'getcwd' => ['hasSideEffects' => false],
	'getdate' => ['hasSideEffects' => false],
	'getenv' => ['hasSideEffects' => false],
	'gethostbyaddr' => ['hasSideEffects' => false],
	'gethostbyname' => ['hasSideEffects' => false],
	'gethostbynamel' => ['hasSideEffects' => false],
	'gethostname' => ['hasSideEffects' => false],
	'getlastmod' => ['hasSideEffects' => false],
	'getmygid' => ['hasSideEffects' => false],
	'getmyinode' => ['hasSideEffects' => false],
	'getmypid' => ['hasSideEffects' => false],
	'getmyuid' => ['hasSideEffects' => false],
	'getprotobyname' => ['hasSideEffects' => false],
	'getprotobynumber' => ['hasSideEffects' => false],
	'getrandmax' => ['hasSideEffects' => false],
	'getrusage' => ['hasSideEffects' => false],
	'getservbyname' => ['hasSideEffects' => false],
	'getservbyport' => ['hasSideEffects' => false],
	'gettext' => ['hasSideEffects' => false],
	'gettimeofday' => ['hasSideEffects' => false],
	'gettype' => ['hasSideEffects' => false],
	'glob' => ['hasSideEffects' => false],
	'gmdate' => ['hasSideEffects' => false],
	'gmmktime' => ['hasSideEffects' => false],
	'gmp_abs' => ['hasSideEffects' => false],
	'gmp_add' => ['hasSideEffects' => false],
	'gmp_and' => ['hasSideEffects' => false],
	'gmp_binomial' => ['hasSideEffects' => false],
	'gmp_cmp' => ['hasSideEffects' => false],
	'gmp_com' => ['hasSideEffects' => false],
	'gmp_div' => ['hasSideEffects' => false],
	'gmp_div_q' => ['hasSideEffects' => false],
	'gmp_div_qr' => ['hasSideEffects' => false],
	'gmp_div_r' => ['hasSideEffects' => false],
	'gmp_divexact' => ['hasSideEffects' => false],
	'gmp_export' => ['hasSideEffects' => false],
	'gmp_fact' => ['hasSideEffects' => false],
	'gmp_gcd' => ['hasSideEffects' => false],
	'gmp_gcdext' => ['hasSideEffects' => false],
	'gmp_hamdist' => ['hasSideEffects' => false],
	'gmp_import' => ['hasSideEffects' => false],
	'gmp_init' => ['hasSideEffects' => false],
	'gmp_intval' => ['hasSideEffects' => false],
	'gmp_invert' => ['hasSideEffects' => false],
	'gmp_jacobi' => ['hasSideEffects' => false],
	'gmp_kronecker' => ['hasSideEffects' => false],
	'gmp_lcm' => ['hasSideEffects' => false],
	'gmp_legendre' => ['hasSideEffects' => false],
	'gmp_mod' => ['hasSideEffects' => false],
	'gmp_mul' => ['hasSideEffects' => false],
	'gmp_neg' => ['hasSideEffects' => false],
	'gmp_nextprime' => ['hasSideEffects' => false],
	'gmp_or' => ['hasSideEffects' => false],
	'gmp_perfect_power' => ['hasSideEffects' => false],
	'gmp_perfect_square' => ['hasSideEffects' => false],
	'gmp_popcount' => ['hasSideEffects' => false],
	'gmp_pow' => ['hasSideEffects' => false],
	'gmp_powm' => ['hasSideEffects' => false],
	'gmp_prob_prime' => ['hasSideEffects' => false],
	'gmp_root' => ['hasSideEffects' => false],
	'gmp_rootrem' => ['hasSideEffects' => false],
	'gmp_scan0' => ['hasSideEffects' => false],
	'gmp_scan1' => ['hasSideEffects' => false],
	'gmp_sign' => ['hasSideEffects' => false],
	'gmp_sqrt' => ['hasSideEffects' => false],
	'gmp_sqrtrem' => ['hasSideEffects' => false],
	'gmp_strval' => ['hasSideEffects' => false],
	'gmp_sub' => ['hasSideEffects' => false],
	'gmp_testbit' => ['hasSideEffects' => false],
	'gmp_xor' => ['hasSideEffects' => false],
	'grapheme_stripos' => ['hasSideEffects' => false],
	'grapheme_stristr' => ['hasSideEffects' => false],
	'grapheme_strlen' => ['hasSideEffects' => false],
	'grapheme_strpos' => ['hasSideEffects' => false],
	'grapheme_strripos' => ['hasSideEffects' => false],
	'grapheme_strrpos' => ['hasSideEffects' => false],
	'grapheme_strstr' => ['hasSideEffects' => false],
	'grapheme_substr' => ['hasSideEffects' => false],
	'gzcompress' => ['hasSideEffects' => false],
	'gzdecode' => ['hasSideEffects' => false],
	'gzdeflate' => ['hasSideEffects' => false],
	'gzencode' => ['hasSideEffects' => false],
	'gzinflate' => ['hasSideEffects' => false],
	'gzuncompress' => ['hasSideEffects' => false],
	'hash' => ['hasSideEffects' => false],
	'hash_algos' => ['hasSideEffects' => false],
	'hash_copy' => ['hasSideEffects' => false],
	'hash_equals' => ['hasSideEffects' => false],
	'hash_file' => ['hasSideEffects' => false],
	'hash_hkdf' => ['hasSideEffects' => false],
	'hash_hmac' => ['hasSideEffects' => false],
	'hash_hmac_algos' => ['hasSideEffects' => false],
	'hash_hmac_file' => ['hasSideEffects' => false],
	'hash_init' => ['hasSideEffects' => false],
	'hash_pbkdf2' => ['hasSideEffects' => false],
	'headers_list' => ['hasSideEffects' => false],
	'hebrev' => ['hasSideEffects' => false],
	'hexdec' => ['hasSideEffects' => false],
	'hrtime' => ['hasSideEffects' => false],
	'html_entity_decode' => ['hasSideEffects' => false],
	'htmlentities' => ['hasSideEffects' => false],
	'htmlspecialchars' => ['hasSideEffects' => false],
	'htmlspecialchars_decode' => ['hasSideEffects' => false],
	'http_build_cookie' => ['hasSideEffects' => false],
	'http_build_query' => ['hasSideEffects' => false],
	'http_build_str' => ['hasSideEffects' => false],
	'http_cache_etag' => ['hasSideEffects' => false],
	'http_cache_last_modified' => ['hasSideEffects' => false],
	'http_chunked_decode' => ['hasSideEffects' => false],
	'http_date' => ['hasSideEffects' => false],
	'http_deflate' => ['hasSideEffects' => false],
	'http_get_request_body' => ['hasSideEffects' => false],
	'http_get_request_body_stream' => ['hasSideEffects' => false],
	'http_get_request_headers' => ['hasSideEffects' => false],
	'http_inflate' => ['hasSideEffects' => false],
	'http_match_etag' => ['hasSideEffects' => false],
	'http_match_modified' => ['hasSideEffects' => false],
	'http_match_request_header' => ['hasSideEffects' => false],
	'http_parse_cookie' => ['hasSideEffects' => false],
	'http_parse_headers' => ['hasSideEffects' => false],
	'http_parse_message' => ['hasSideEffects' => false],
	'http_parse_params' => ['hasSideEffects' => false],
	'http_request_body_encode' => ['hasSideEffects' => false],
	'http_request_method_exists' => ['hasSideEffects' => false],
	'http_request_method_name' => ['hasSideEffects' => false],
	'http_support' => ['hasSideEffects' => false],
	'hypot' => ['hasSideEffects' => false],
	'iconv' => ['hasSideEffects' => false],
	'iconv_get_encoding' => ['hasSideEffects' => false],
	'iconv_mime_decode' => ['hasSideEffects' => false],
	'iconv_mime_decode_headers' => ['hasSideEffects' => false],
	'iconv_mime_encode' => ['hasSideEffects' => false],
	'iconv_strlen' => ['hasSideEffects' => false],
	'iconv_strpos' => ['hasSideEffects' => false],
	'iconv_strrpos' => ['hasSideEffects' => false],
	'iconv_substr' => ['hasSideEffects' => false],
	'idate' => ['hasSideEffects' => false],
	'image_type_to_extension' => ['hasSideEffects' => false],
	'image_type_to_mime_type' => ['hasSideEffects' => false],
	'imagecolorat' => ['hasSideEffects' => false],
	'imagecolorclosest' => ['hasSideEffects' => false],
	'imagecolorclosestalpha' => ['hasSideEffects' => false],
	'imagecolorclosesthwb' => ['hasSideEffects' => false],
	'imagecolorexact' => ['hasSideEffects' => false],
	'imagecolorexactalpha' => ['hasSideEffects' => false],
	'imagecolorresolve' => ['hasSideEffects' => false],
	'imagecolorresolvealpha' => ['hasSideEffects' => false],
	'imagecolorsforindex' => ['hasSideEffects' => false],
	'imagecolorstotal' => ['hasSideEffects' => false],
	'imagecreate' => ['hasSideEffects' => false],
	'imagecreatefromstring' => ['hasSideEffects' => false],
	'imagecreatetruecolor' => ['hasSideEffects' => false],
	'imagefontheight' => ['hasSideEffects' => false],
	'imagefontwidth' => ['hasSideEffects' => false],
	'imageftbbox' => ['hasSideEffects' => false],
	'imagegetinterpolation' => ['hasSideEffects' => false],
	'imagegrabscreen' => ['hasSideEffects' => false],
	'imagegrabwindow' => ['hasSideEffects' => false],
	'imageistruecolor' => ['hasSideEffects' => false],
	'imagesx' => ['hasSideEffects' => false],
	'imagesy' => ['hasSideEffects' => false],
	'imagettfbbox' => ['hasSideEffects' => false],
	'imagetypes' => ['hasSideEffects' => false],
	'implode' => ['hasSideEffects' => false],
	'in_array' => ['hasSideEffects' => false],
	'inet_ntop' => ['hasSideEffects' => false],
	'inet_pton' => ['hasSideEffects' => false],
	'inflate_get_read_len' => ['hasSideEffects' => false],
	'inflate_get_status' => ['hasSideEffects' => false],
	'inflate_init' => ['hasSideEffects' => false],
	'ini_get' => ['hasSideEffects' => false],
	'ini_get_all' => ['hasSideEffects' => false],
	'intcal_get_maximum' => ['hasSideEffects' => false],
	'intdiv' => ['hasSideEffects' => false],
	'intl_error_name' => ['hasSideEffects' => false],
	'intl_get' => ['hasSideEffects' => false],
	'intl_get_error_code' => ['hasSideEffects' => false],
	'intl_get_error_message' => ['hasSideEffects' => false],
	'intl_is_failure' => ['hasSideEffects' => false],
	'intlcal_after' => ['hasSideEffects' => false],
	'intlcal_before' => ['hasSideEffects' => false],
	'intlcal_create_instance' => ['hasSideEffects' => false],
	'intlcal_equals' => ['hasSideEffects' => false],
	'intlcal_field_difference' => ['hasSideEffects' => false],
	'intlcal_from_date_time' => ['hasSideEffects' => false],
	'intlcal_get' => ['hasSideEffects' => false],
	'intlcal_get_actual_maximum' => ['hasSideEffects' => false],
	'intlcal_get_actual_minimum' => ['hasSideEffects' => false],
	'intlcal_get_available_locales' => ['hasSideEffects' => false],
	'intlcal_get_day_of_week_type' => ['hasSideEffects' => false],
	'intlcal_get_error_code' => ['hasSideEffects' => false],
	'intlcal_get_error_message' => ['hasSideEffects' => false],
	'intlcal_get_first_day_of_week' => ['hasSideEffects' => false],
	'intlcal_get_greatest_minimum' => ['hasSideEffects' => false],
	'intlcal_get_keyword_values_for_locale' => ['hasSideEffects' => false],
	'intlcal_get_least_maximum' => ['hasSideEffects' => false],
	'intlcal_get_locale' => ['hasSideEffects' => false],
	'intlcal_get_maximum' => ['hasSideEffects' => false],
	'intlcal_get_minimal_days_in_first_week' => ['hasSideEffects' => false],
	'intlcal_get_minimum' => ['hasSideEffects' => false],
	'intlcal_get_now' => ['hasSideEffects' => false],
	'intlcal_get_repeated_wall_time_option' => ['hasSideEffects' => false],
	'intlcal_get_skipped_wall_time_option' => ['hasSideEffects' => false],
	'intlcal_get_time' => ['hasSideEffects' => false],
	'intlcal_get_time_zone' => ['hasSideEffects' => false],
	'intlcal_get_type' => ['hasSideEffects' => false],
	'intlcal_get_weekend_transition' => ['hasSideEffects' => false],
	'intlcal_greates_minimum' => ['hasSideEffects' => false],
	'intlcal_in_daylight_time' => ['hasSideEffects' => false],
	'intlcal_is_equivalent_to' => ['hasSideEffects' => false],
	'intlcal_is_lenient' => ['hasSideEffects' => false],
	'intlcal_is_set' => ['hasSideEffects' => false],
	'intlcal_is_weekend' => ['hasSideEffects' => false],
	'intlcal_to_date_time' => ['hasSideEffects' => false],
	'intlgregcal_create_instance' => ['hasSideEffects' => false],
	'intlgregcal_get_gregorian_change' => ['hasSideEffects' => false],
	'intlgregcal_is_leap_year' => ['hasSideEffects' => false],
	'intltz_count_equivalent_ids' => ['hasSideEffects' => false],
	'intltz_create_default' => ['hasSideEffects' => false],
	'intltz_create_enumeration' => ['hasSideEffects' => false],
	'intltz_create_time_zone' => ['hasSideEffects' => false],
	'intltz_create_time_zone_id_enumeration' => ['hasSideEffects' => false],
	'intltz_from_date_time_zone' => ['hasSideEffects' => false],
	'intltz_get_canonical_id' => ['hasSideEffects' => false],
	'intltz_get_display_name' => ['hasSideEffects' => false],
	'intltz_get_dst_savings' => ['hasSideEffects' => false],
	'intltz_get_equivalent_id' => ['hasSideEffects' => false],
	'intltz_get_error_code' => ['hasSideEffects' => false],
	'intltz_get_error_message' => ['hasSideEffects' => false],
	'intltz_get_gmt' => ['hasSideEffects' => false],
	'intltz_get_id' => ['hasSideEffects' => false],
	'intltz_get_offset' => ['hasSideEffects' => false],
	'intltz_get_raw_offset' => ['hasSideEffects' => false],
	'intltz_get_region' => ['hasSideEffects' => false],
	'intltz_get_tz_data_version' => ['hasSideEffects' => false],
	'intltz_get_unknown' => ['hasSideEffects' => false],
	'intltz_getgmt' => ['hasSideEffects' => false],
	'intltz_has_same_rules' => ['hasSideEffects' => false],
	'intltz_to_date_time_zone' => ['hasSideEffects' => false],
	'intltz_use_daylight_time' => ['hasSideEffects' => false],
	'intlz_create_default' => ['hasSideEffects' => false],
	'intval' => ['hasSideEffects' => false],
	'ip2long' => ['hasSideEffects' => false],
	'iptcparse' => ['hasSideEffects' => false],
	'is_a' => ['hasSideEffects' => false],
	'is_array' => ['hasSideEffects' => false],
	'is_bool' => ['hasSideEffects' => false],
	'is_countable' => ['hasSideEffects' => false],
	'is_dir' => ['hasSideEffects' => false],
	'is_double' => ['hasSideEffects' => false],
	'is_executable' => ['hasSideEffects' => false],
	'is_file' => ['hasSideEffects' => false],
	'is_finite' => ['hasSideEffects' => false],
	'is_float' => ['hasSideEffects' => false],
	'is_infinite' => ['hasSideEffects' => false],
	'is_int' => ['hasSideEffects' => false],
	'is_integer' => ['hasSideEffects' => false],
	'is_iterable' => ['hasSideEffects' => false],
	'is_link' => ['hasSideEffects' => false],
	'is_long' => ['hasSideEffects' => false],
	'is_nan' => ['hasSideEffects' => false],
	'is_null' => ['hasSideEffects' => false],
	'is_numeric' => ['hasSideEffects' => false],
	'is_object' => ['hasSideEffects' => false],
	'is_readable' => ['hasSideEffects' => false],
	'is_real' => ['hasSideEffects' => false],
	'is_resource' => ['hasSideEffects' => false],
	'is_scalar' => ['hasSideEffects' => false],
	'is_string' => ['hasSideEffects' => false],
	'is_subclass_of' => ['hasSideEffects' => false],
	'is_uploaded_file' => ['hasSideEffects' => false],
	'is_writable' => ['hasSideEffects' => false],
	'is_writeable' => ['hasSideEffects' => false],
	'iterator_count' => ['hasSideEffects' => false],
	'join' => ['hasSideEffects' => false],
	'json_last_error' => ['hasSideEffects' => false],
	'json_last_error_msg' => ['hasSideEffects' => false],
	'key' => ['hasSideEffects' => false],
	'key_exists' => ['hasSideEffects' => false],
	'lcfirst' => ['hasSideEffects' => false],
	'lchgrp' => ['hasSideEffects' => true],
	'lchown' => ['hasSideEffects' => true],
	'libxml_get_errors' => ['hasSideEffects' => false],
	'libxml_get_last_error' => ['hasSideEffects' => false],
	'link' => ['hasSideEffects' => true],
	'linkinfo' => ['hasSideEffects' => false],
	'locale_accept_from_http' => ['hasSideEffects' => false],
	'locale_canonicalize' => ['hasSideEffects' => false],
	'locale_compose' => ['hasSideEffects' => false],
	'locale_filter_matches' => ['hasSideEffects' => false],
	'locale_get_all_variants' => ['hasSideEffects' => false],
	'locale_get_default' => ['hasSideEffects' => false],
	'locale_get_display_language' => ['hasSideEffects' => false],
	'locale_get_display_name' => ['hasSideEffects' => false],
	'locale_get_display_region' => ['hasSideEffects' => false],
	'locale_get_display_script' => ['hasSideEffects' => false],
	'locale_get_display_variant' => ['hasSideEffects' => false],
	'locale_get_keywords' => ['hasSideEffects' => false],
	'locale_get_primary_language' => ['hasSideEffects' => false],
	'locale_get_region' => ['hasSideEffects' => false],
	'locale_get_script' => ['hasSideEffects' => false],
	'locale_lookup' => ['hasSideEffects' => false],
	'locale_parse' => ['hasSideEffects' => false],
	'localeconv' => ['hasSideEffects' => false],
	'localtime' => ['hasSideEffects' => false],
	'log' => ['hasSideEffects' => false],
	'log10' => ['hasSideEffects' => false],
	'log1p' => ['hasSideEffects' => false],
	'long2ip' => ['hasSideEffects' => false],
	'lstat' => ['hasSideEffects' => false],
	'ltrim' => ['hasSideEffects' => false],
	'max' => ['hasSideEffects' => false],
	'mb_check_encoding' => ['hasSideEffects' => false],
	'mb_chr' => ['hasSideEffects' => false],
	'mb_convert_case' => ['hasSideEffects' => false],
	'mb_convert_encoding' => ['hasSideEffects' => false],
	'mb_convert_kana' => ['hasSideEffects' => false],
	'mb_decode_mimeheader' => ['hasSideEffects' => false],
	'mb_decode_numericentity' => ['hasSideEffects' => false],
	'mb_detect_encoding' => ['hasSideEffects' => false],
	'mb_encode_mimeheader' => ['hasSideEffects' => false],
	'mb_encode_numericentity' => ['hasSideEffects' => false],
	'mb_encoding_aliases' => ['hasSideEffects' => false],
	'mb_ereg_match' => ['hasSideEffects' => false],
	'mb_ereg_replace' => ['hasSideEffects' => false],
	'mb_ereg_search' => ['hasSideEffects' => false],
	'mb_ereg_search_getpos' => ['hasSideEffects' => false],
	'mb_ereg_search_getregs' => ['hasSideEffects' => false],
	'mb_ereg_search_pos' => ['hasSideEffects' => false],
	'mb_ereg_search_regs' => ['hasSideEffects' => false],
	'mb_ereg_search_setpos' => ['hasSideEffects' => false],
	'mb_eregi_replace' => ['hasSideEffects' => false],
	'mb_get_info' => ['hasSideEffects' => false],
	'mb_http_input' => ['hasSideEffects' => false],
	'mb_list_encodings' => ['hasSideEffects' => false],
	'mb_ord' => ['hasSideEffects' => false],
	'mb_output_handler' => ['hasSideEffects' => false],
	'mb_preferred_mime_name' => ['hasSideEffects' => false],
	'mb_scrub' => ['hasSideEffects' => false],
	'mb_split' => ['hasSideEffects' => false],
	'mb_str_split' => ['hasSideEffects' => false],
	'mb_strcut' => ['hasSideEffects' => false],
	'mb_strimwidth' => ['hasSideEffects' => false],
	'mb_stripos' => ['hasSideEffects' => false],
	'mb_stristr' => ['hasSideEffects' => false],
	'mb_strlen' => ['hasSideEffects' => false],
	'mb_strpos' => ['hasSideEffects' => false],
	'mb_strrchr' => ['hasSideEffects' => false],
	'mb_strrichr' => ['hasSideEffects' => false],
	'mb_strripos' => ['hasSideEffects' => false],
	'mb_strrpos' => ['hasSideEffects' => false],
	'mb_strstr' => ['hasSideEffects' => false],
	'mb_strtolower' => ['hasSideEffects' => false],
	'mb_strtoupper' => ['hasSideEffects' => false],
	'mb_strwidth' => ['hasSideEffects' => false],
	'mb_substr' => ['hasSideEffects' => false],
	'mb_substr_count' => ['hasSideEffects' => false],
	'mbereg_search_setpos' => ['hasSideEffects' => false],
	'md5' => ['hasSideEffects' => false],
	'md5_file' => ['hasSideEffects' => false],
	'memory_get_peak_usage' => ['hasSideEffects' => false],
	'memory_get_usage' => ['hasSideEffects' => false],
	'metaphone' => ['hasSideEffects' => false],
	'method_exists' => ['hasSideEffects' => false],
	'mhash' => ['hasSideEffects' => false],
	'mhash_count' => ['hasSideEffects' => false],
	'mhash_get_block_size' => ['hasSideEffects' => false],
	'mhash_get_hash_name' => ['hasSideEffects' => false],
	'mhash_keygen_s2k' => ['hasSideEffects' => false],
	'microtime' => ['hasSideEffects' => false],
	'min' => ['hasSideEffects' => false],
	'mkdir' => ['hasSideEffects' => true],
	'mktime' => ['hasSideEffects' => false],
	'move_uploaded_file' => ['hasSideEffects' => true],
	'msgfmt_create' => ['hasSideEffects' => false],
	'msgfmt_format' => ['hasSideEffects' => false],
	'msgfmt_format_message' => ['hasSideEffects' => false],
	'msgfmt_get_error_code' => ['hasSideEffects' => false],
	'msgfmt_get_error_message' => ['hasSideEffects' => false],
	'msgfmt_get_locale' => ['hasSideEffects' => false],
	'msgfmt_get_pattern' => ['hasSideEffects' => false],
	'msgfmt_parse' => ['hasSideEffects' => false],
	'msgfmt_parse_message' => ['hasSideEffects' => false],
	'mt_getrandmax' => ['hasSideEffects' => false],
	'mt_rand' => ['hasSideEffects' => true],
	'net_get_interfaces' => ['hasSideEffects' => false],
	'ngettext' => ['hasSideEffects' => false],
	'nl2br' => ['hasSideEffects' => false],
	'nl_langinfo' => ['hasSideEffects' => false],
	'normalizer_get_raw_decomposition' => ['hasSideEffects' => false],
	'normalizer_is_normalized' => ['hasSideEffects' => false],
	'normalizer_normalize' => ['hasSideEffects' => false],
	'number_format' => ['hasSideEffects' => false],
	'numfmt_create' => ['hasSideEffects' => false],
	'numfmt_format' => ['hasSideEffects' => false],
	'numfmt_format_currency' => ['hasSideEffects' => false],
	'numfmt_get_attribute' => ['hasSideEffects' => false],
	'numfmt_get_error_code' => ['hasSideEffects' => false],
	'numfmt_get_error_message' => ['hasSideEffects' => false],
	'numfmt_get_locale' => ['hasSideEffects' => false],
	'numfmt_get_pattern' => ['hasSideEffects' => false],
	'numfmt_get_symbol' => ['hasSideEffects' => false],
	'numfmt_get_text_attribute' => ['hasSideEffects' => false],
	'numfmt_parse' => ['hasSideEffects' => false],
	'ob_etaghandler' => ['hasSideEffects' => false],
	'ob_get_contents' => ['hasSideEffects' => false],
	'ob_iconv_handler' => ['hasSideEffects' => false],
	'octdec' => ['hasSideEffects' => false],
	'ord' => ['hasSideEffects' => false],
	'pack' => ['hasSideEffects' => false],
	'pam_auth' => ['hasSideEffects' => false],
	'pam_chpass' => ['hasSideEffects' => false],
	'parse_ini_file' => ['hasSideEffects' => false],
	'parse_ini_string' => ['hasSideEffects' => false],
	'parse_url' => ['hasSideEffects' => false],
	'pathinfo' => ['hasSideEffects' => false],
	'pclose' => ['hasSideEffects' => true],
	'pcntl_errno' => ['hasSideEffects' => false],
	'pcntl_get_last_error' => ['hasSideEffects' => false],
	'pcntl_getpriority' => ['hasSideEffects' => false],
	'pcntl_strerror' => ['hasSideEffects' => false],
	'pcntl_wexitstatus' => ['hasSideEffects' => false],
	'pcntl_wifcontinued' => ['hasSideEffects' => false],
	'pcntl_wifexited' => ['hasSideEffects' => false],
	'pcntl_wifsignaled' => ['hasSideEffects' => false],
	'pcntl_wifstopped' => ['hasSideEffects' => false],
	'pcntl_wstopsig' => ['hasSideEffects' => false],
	'pcntl_wtermsig' => ['hasSideEffects' => false],
	'pdo_drivers' => ['hasSideEffects' => false],
	'php_ini_loaded_file' => ['hasSideEffects' => false],
	'php_ini_scanned_files' => ['hasSideEffects' => false],
	'php_logo_guid' => ['hasSideEffects' => false],
	'php_sapi_name' => ['hasSideEffects' => false],
	'php_strip_whitespace' => ['hasSideEffects' => false],
	'php_uname' => ['hasSideEffects' => false],
	'phpversion' => ['hasSideEffects' => false],
	'pi' => ['hasSideEffects' => false],
	'popen' => ['hasSideEffects' => true],
	'pos' => ['hasSideEffects' => false],
	'posix_ctermid' => ['hasSideEffects' => false],
	'posix_errno' => ['hasSideEffects' => false],
	'posix_get_last_error' => ['hasSideEffects' => false],
	'posix_getcwd' => ['hasSideEffects' => false],
	'posix_getegid' => ['hasSideEffects' => false],
	'posix_geteuid' => ['hasSideEffects' => false],
	'posix_getgid' => ['hasSideEffects' => false],
	'posix_getgrgid' => ['hasSideEffects' => false],
	'posix_getgrnam' => ['hasSideEffects' => false],
	'posix_getgroups' => ['hasSideEffects' => false],
	'posix_getlogin' => ['hasSideEffects' => false],
	'posix_getpgid' => ['hasSideEffects' => false],
	'posix_getpgrp' => ['hasSideEffects' => false],
	'posix_getpid' => ['hasSideEffects' => false],
	'posix_getppid' => ['hasSideEffects' => false],
	'posix_getpwnam' => ['hasSideEffects' => false],
	'posix_getpwuid' => ['hasSideEffects' => false],
	'posix_getrlimit' => ['hasSideEffects' => false],
	'posix_getsid' => ['hasSideEffects' => false],
	'posix_getuid' => ['hasSideEffects' => false],
	'posix_initgroups' => ['hasSideEffects' => false],
	'posix_isatty' => ['hasSideEffects' => false],
	'posix_strerror' => ['hasSideEffects' => false],
	'posix_times' => ['hasSideEffects' => false],
	'posix_ttyname' => ['hasSideEffects' => false],
	'posix_uname' => ['hasSideEffects' => false],
	'pow' => ['hasSideEffects' => false],
	'preg_grep' => ['hasSideEffects' => false],
	'preg_last_error' => ['hasSideEffects' => false],
	'preg_last_error_msg' => ['hasSideEffects' => false],
	'preg_quote' => ['hasSideEffects' => false],
	'preg_split' => ['hasSideEffects' => false],
	'property_exists' => ['hasSideEffects' => false],
	'quoted_printable_decode' => ['hasSideEffects' => false],
	'quoted_printable_encode' => ['hasSideEffects' => false],
	'quotemeta' => ['hasSideEffects' => false],
	'rad2deg' => ['hasSideEffects' => false],
	'rand' => ['hasSideEffects' => true],
	'random_bytes' => ['hasSideEffects' => true],
	'random_int' => ['hasSideEffects' => true],
	'range' => ['hasSideEffects' => false],
	'rawurldecode' => ['hasSideEffects' => false],
	'rawurlencode' => ['hasSideEffects' => false],
	'readfile' => ['hasSideEffects' => true],
	'readlink' => ['hasSideEffects' => false],
	'realpath' => ['hasSideEffects' => false],
	'realpath_cache_get' => ['hasSideEffects' => false],
	'realpath_cache_size' => ['hasSideEffects' => false],
	'rename' => ['hasSideEffects' => true],
	'resourcebundle_count' => ['hasSideEffects' => false],
	'resourcebundle_create' => ['hasSideEffects' => false],
	'resourcebundle_get' => ['hasSideEffects' => false],
	'resourcebundle_get_error_code' => ['hasSideEffects' => false],
	'resourcebundle_get_error_message' => ['hasSideEffects' => false],
	'resourcebundle_locales' => ['hasSideEffects' => false],
	'rewind' => ['hasSideEffects' => true],
	'rmdir' => ['hasSideEffects' => true],
	'round' => ['hasSideEffects' => false],
	'rtrim' => ['hasSideEffects' => false],
	'sha1' => ['hasSideEffects' => false],
	'sha1_file' => ['hasSideEffects' => false],
	'sin' => ['hasSideEffects' => false],
	'sinh' => ['hasSideEffects' => false],
	'sizeof' => ['hasSideEffects' => false],
	'soundex' => ['hasSideEffects' => false],
	'spl_classes' => ['hasSideEffects' => false],
	'spl_object_hash' => ['hasSideEffects' => false],
	'sprintf' => ['hasSideEffects' => false],
	'sqrt' => ['hasSideEffects' => false],
	'stat' => ['hasSideEffects' => false],
	'str_contains' => ['hasSideEffects' => false],
	'str_ends_with' => ['hasSideEffects' => false],
	'str_getcsv' => ['hasSideEffects' => false],
	'str_pad' => ['hasSideEffects' => false],
	'str_repeat' => ['hasSideEffects' => false],
	'str_rot13' => ['hasSideEffects' => false],
	'str_split' => ['hasSideEffects' => false],
	'str_starts_with' => ['hasSideEffects' => false],
	'str_word_count' => ['hasSideEffects' => false],
	'strcasecmp' => ['hasSideEffects' => false],
	'strchr' => ['hasSideEffects' => false],
	'strcmp' => ['hasSideEffects' => false],
	'strcoll' => ['hasSideEffects' => false],
	'strcspn' => ['hasSideEffects' => false],
	'stream_get_filters' => ['hasSideEffects' => false],
	'stream_get_transports' => ['hasSideEffects' => false],
	'stream_get_wrappers' => ['hasSideEffects' => false],
	'stream_is_local' => ['hasSideEffects' => false],
	'stream_isatty' => ['hasSideEffects' => false],
	'strip_tags' => ['hasSideEffects' => false],
	'stripcslashes' => ['hasSideEffects' => false],
	'stripos' => ['hasSideEffects' => false],
	'stripslashes' => ['hasSideEffects' => false],
	'stristr' => ['hasSideEffects' => false],
	'strlen' => ['hasSideEffects' => false],
	'strnatcasecmp' => ['hasSideEffects' => false],
	'strnatcmp' => ['hasSideEffects' => false],
	'strncasecmp' => ['hasSideEffects' => false],
	'strncmp' => ['hasSideEffects' => false],
	'strpbrk' => ['hasSideEffects' => false],
	'strpos' => ['hasSideEffects' => false],
	'strptime' => ['hasSideEffects' => false],
	'strrchr' => ['hasSideEffects' => false],
	'strrev' => ['hasSideEffects' => false],
	'strripos' => ['hasSideEffects' => false],
	'strrpos' => ['hasSideEffects' => false],
	'strspn' => ['hasSideEffects' => false],
	'strstr' => ['hasSideEffects' => false],
	'strtolower' => ['hasSideEffects' => false],
	'strtotime' => ['hasSideEffects' => false],
	'strtoupper' => ['hasSideEffects' => false],
	'strtr' => ['hasSideEffects' => false],
	'strval' => ['hasSideEffects' => false],
	'substr' => ['hasSideEffects' => false],
	'substr_compare' => ['hasSideEffects' => false],
	'substr_count' => ['hasSideEffects' => false],
	'substr_replace' => ['hasSideEffects' => false],
	'symlink' => ['hasSideEffects' => true],
	'sys_getloadavg' => ['hasSideEffects' => false],
	'tan' => ['hasSideEffects' => false],
	'tanh' => ['hasSideEffects' => false],
	'tempnam' => ['hasSideEffects' => true],
	'timezone_abbreviations_list' => ['hasSideEffects' => false],
	'timezone_identifiers_list' => ['hasSideEffects' => false],
	'timezone_location_get' => ['hasSideEffects' => false],
	'timezone_name_from_abbr' => ['hasSideEffects' => false],
	'timezone_name_get' => ['hasSideEffects' => false],
	'timezone_offset_get' => ['hasSideEffects' => false],
	'timezone_open' => ['hasSideEffects' => false],
	'timezone_transitions_get' => ['hasSideEffects' => false],
	'timezone_version_get' => ['hasSideEffects' => false],
	'tmpfile' => ['hasSideEffects' => true],
	'token_get_all' => ['hasSideEffects' => false],
	'token_name' => ['hasSideEffects' => false],
	'touch' => ['hasSideEffects' => true],
	'transliterator_create' => ['hasSideEffects' => false],
	'transliterator_create_from_rules' => ['hasSideEffects' => false],
	'transliterator_create_inverse' => ['hasSideEffects' => false],
	'transliterator_get_error_code' => ['hasSideEffects' => false],
	'transliterator_get_error_message' => ['hasSideEffects' => false],
	'transliterator_list_ids' => ['hasSideEffects' => false],
	'transliterator_transliterate' => ['hasSideEffects' => false],
	'trim' => ['hasSideEffects' => false],
	'ucfirst' => ['hasSideEffects' => false],
	'ucwords' => ['hasSideEffects' => false],
	'umask' => ['hasSideEffects' => true],
	'unlink' => ['hasSideEffects' => true],
	'unpack' => ['hasSideEffects' => false],
	'urldecode' => ['hasSideEffects' => false],
	'urlencode' => ['hasSideEffects' => false],
	'utf8_decode' => ['hasSideEffects' => false],
	'utf8_encode' => ['hasSideEffects' => false],
	'vsprintf' => ['hasSideEffects' => false],
	'wordwrap' => ['hasSideEffects' => false],
	'xml_error_string' => ['hasSideEffects' => false],
	'xml_get_current_byte_index' => ['hasSideEffects' => false],
	'xml_get_current_column_number' => ['hasSideEffects' => false],
	'xml_get_current_line_number' => ['hasSideEffects' => false],
	'xml_get_error_code' => ['hasSideEffects' => false],
	'xml_parser_create' => ['hasSideEffects' => false],
	'xml_parser_create_ns' => ['hasSideEffects' => false],
	'xml_parser_get_option' => ['hasSideEffects' => false],
	'zend_version' => ['hasSideEffects' => false],
	'zlib_decode' => ['hasSideEffects' => false],
	'zlib_encode' => ['hasSideEffects' => false],
	'zlib_get_coding_type' => ['hasSideEffects' => false],

];<?php

namespace _PHPStan_dcc7b7cff;

// phpcs:ignoreFile
return ['new' => ['error_log' => ['bool', 'message' => 'string', 'message_type=' => '0|1|3|4', 'destination=' => 'string', 'extra_headers=' => 'string'], 'filter_input' => ['mixed', 'type' => 'INPUT_GET|INPUT_POST|INPUT_COOKIE|INPUT_SERVER|INPUT_ENV', 'variable_name' => 'string', 'filter=' => 'int', 'options=' => 'array|int'], 'filter_input_array' => ['array|false|null', 'type' => 'INPUT_GET|INPUT_POST|INPUT_COOKIE|INPUT_SERVER|INPUT_ENV', 'definition=' => 'int|array', 'add_empty=' => 'bool']], 'old' => []];
<?php // @codingStandardsIgnoreFile (phpcs runs out of memory)

/**
 * Copied over from https://github.com/phan/phan/blob/dbb7ea9bd049ebd116c0b08b043794c697486801/src/Phan/Language/Internal/FunctionSignatureMap.php
 * with some changes like removal of specific array keys and callable definitions
 * Copyright (c) 2015 Rasmus Lerdorf
 * Copyright (c) 2015 Andrew Morrison
 */

/**
 * Format
 *
 * '<function_name>' => ['<return_type>, '<arg_name>'=>'<arg_type>']
 * alternative signature for the same function
 * '<function_name\'1>' => ['<return_type>, '<arg_name>'=>'<arg_type>']
 *
 * A '&' in front of the <arg_name> means the arg is always passed by reference.
 * (i.e. ReflectionParameter->isPassedByReference())
 * This was previously only used in cases where the function actually created the
 * variable in the local scope.
 * Some reference arguments will have prefixes in <arg_name> to indicate the way the argument is used.
 * Currently, the only prefixes with meaning are 'rw_' (read-write) and 'w_' (write).
 * Those prefixes don't mean anything for non-references.
 * Code using these signatures should remove those prefixes from messages rendered to the user.
 * 1. '&rw_<arg_name>' indicates that a parameter with a value is expected to be passed in, and may be modified.
 *    Phan will warn if the variable has an incompatible type, or is undefined.
 * 2. '&w_<arg_name>' indicates that a parameter is expected to be passed in, and the value will be ignored, and may be overwritten.
 * 3. The absence of a prefix is treated by Phan the same way as having the prefix 'w_' (Some may be changed to 'rw_name'). These will have prefixes added later.
 *
 * So, for functions like sort() where technically the arg is by-ref,
 * indicate the reference param's signature by-ref and read-write,
 * as `'&rw_array'=>'array'`
 * so that Phan won't create it in the local scope
 *
 * However, for a function like preg_match() where the 3rd arg is an array of sub-pattern matches (and optional),
 * this arg needs to be marked as by-ref and write-only, as `'&w_matches='=>'array'`.
 *
 * A '=' following the <arg_name> indicates this arg is optional.
 *
 * The <arg_name> can begin with '...' to indicate the arg is variadic.
 * '...args=' indicates it is both variadic and optional.
 *
 * Some reference arguments will have prefixes in <arg_name> to indicate the way the argument is used.
 * Currently, the only prefixes with meaning are 'rw_' and 'w_'.
 * Code using these signatures should remove those prefixes from messages rendered to the user.
 * 1. '&rw_name' indicates that a parameter with a value is expected to be passed in, and may be modified.
 * 2. '&w_name' indicates that a parameter is expected to be passed in, and the value will be ignored, and may be overwritten.
 *
 * Sources of stub info:
 *
 * 1. Reflection
 * 2. docs.php.net's SVN repo or website, and examples (See internal/internalsignatures.php)
 * 3. Various websites documenting individual extensions
 * 4. PHPStorm stubs (For anything missing from the above sources)
 *    See internal/internalsignatures.php
 */

return [
'_' => ['string', 'message'=>'string'],
'abs' => ['0|positive-int', 'number'=>'int'],
'abs\'1' => ['float', 'number'=>'float'],
'abs\'2' => ['float|0|positive-int', 'number'=>'string'],
'accelerator_get_configuration' => ['array'],
'accelerator_get_scripts' => ['array'],
'accelerator_get_status' => ['array', 'fetch_scripts'=>'bool'],
'accelerator_reset' => [''],
'accelerator_set_status' => ['void', 'status'=>''],
'acos' => ['float', 'number'=>'float'],
'acosh' => ['float', 'number'=>'float'],
'addcslashes' => ['string', 'str'=>'string', 'charlist'=>'string'],
'addslashes' => ['string', 'str'=>'string'],
'AMQPChannel::__construct' => ['void', 'amqp_connection'=>'AMQPConnection'],
'AMQPChannel::basicRecover' => ['', 'requeue='=>'bool|true'],
'AMQPChannel::commitTransaction' => ['bool'],
'AMQPChannel::getChannelId' => ['int'],
'AMQPChannel::getConnection' => ['AMQPConnection'],
'AMQPChannel::getPrefetchCount' => ['int'],
'AMQPChannel::getPrefetchSize' => ['int'],
'AMQPChannel::isConnected' => ['bool'],
'AMQPChannel::qos' => ['bool', 'size'=>'int', 'count'=>'int'],
'AMQPChannel::rollbackTransaction' => ['bool'],
'AMQPChannel::setPrefetchCount' => ['bool', 'count'=>'int'],
'AMQPChannel::setPrefetchSize' => ['bool', 'size'=>'int'],
'AMQPChannel::startTransaction' => ['bool'],
'AMQPConnection::__construct' => ['void', 'credentials='=>'array'],
'AMQPConnection::connect' => ['bool'],
'AMQPConnection::disconnect' => ['bool'],
'AMQPConnection::getHost' => ['string'],
'AMQPConnection::getLogin' => ['string'],
'AMQPConnection::getMaxChannels' => ['int|null'],
'AMQPConnection::getPassword' => ['string'],
'AMQPConnection::getPort' => ['int'],
'AMQPConnection::getReadTimeout' => ['float'],
'AMQPConnection::getTimeout' => ['float'],
'AMQPConnection::getUsedChannels' => ['int'],
'AMQPConnection::getVhost' => ['string'],
'AMQPConnection::getWriteTimeout' => ['float'],
'AMQPConnection::isConnected' => ['bool'],
'AMQPConnection::isPersistent' => ['bool|null'],
'AMQPConnection::pconnect' => ['bool'],
'AMQPConnection::pdisconnect' => ['bool'],
'AMQPConnection::preconnect' => ['bool'],
'AMQPConnection::reconnect' => ['bool'],
'AMQPConnection::setHost' => ['bool', 'host'=>'string'],
'AMQPConnection::setLogin' => ['bool', 'login'=>'string'],
'AMQPConnection::setPassword' => ['bool', 'password'=>'string'],
'AMQPConnection::setPort' => ['bool', 'port'=>'int'],
'AMQPConnection::setReadTimeout' => ['bool', 'timeout'=>'int'],
'AMQPConnection::setTimeout' => ['bool', 'timeout'=>'int'],
'AMQPConnection::setVhost' => ['bool', 'vhost'=>'string'],
'AMQPConnection::setWriteTimeout' => ['bool', 'timeout'=>'int'],
'AMQPEnvelope::getAppId' => ['string'],
'AMQPEnvelope::getBody' => ['string'],
'AMQPEnvelope::getContentEncoding' => ['string'],
'AMQPEnvelope::getContentType' => ['string'],
'AMQPEnvelope::getCorrelationId' => ['string'],
'AMQPEnvelope::getDeliveryMode' => ['int'],
'AMQPEnvelope::getDeliveryTag' => ['string'],
'AMQPEnvelope::getExchangeName' => ['string'],
'AMQPEnvelope::getExpiration' => ['string'],
'AMQPEnvelope::getHeader' => ['bool|string', 'header_key'=>'string'],
'AMQPEnvelope::getHeaders' => ['array'],
'AMQPEnvelope::getMessageId' => ['string'],
'AMQPEnvelope::getPriority' => ['int'],
'AMQPEnvelope::getReplyTo' => ['string'],
'AMQPEnvelope::getRoutingKey' => ['string'],
'AMQPEnvelope::getTimeStamp' => ['string'],
'AMQPEnvelope::getType' => ['string'],
'AMQPEnvelope::getUserId' => ['string'],
'AMQPEnvelope::isRedelivery' => ['bool'],
'AMQPExchange::__construct' => ['void', 'amqp_channel'=>'AMQPChannel'],
'AMQPExchange::bind' => ['bool', 'exchange_name'=>'string', 'routing_key='=>'string', 'arguments='=>'array'],
'AMQPExchange::declareExchange' => ['bool'],
'AMQPExchange::delete' => ['bool', 'exchangeName='=>'string', 'flags='=>'int'],
'AMQPExchange::getArgument' => ['bool|int|string', 'key'=>'string'],
'AMQPExchange::getArguments' => ['array'],
'AMQPExchange::getChannel' => ['AMQPChannel'],
'AMQPExchange::getConnection' => ['AMQPConnection'],
'AMQPExchange::getFlags' => ['int'],
'AMQPExchange::getName' => ['string'],
'AMQPExchange::getType' => ['string'],
'AMQPExchange::publish' => ['bool', 'message'=>'string', 'routing_key='=>'string', 'flags='=>'int', 'attributes='=>'array'],
'AMQPExchange::setArgument' => ['bool', 'key'=>'string', 'value'=>'int|string'],
'AMQPExchange::setArguments' => ['bool', 'arguments'=>'array'],
'AMQPExchange::setFlags' => ['bool', 'flags'=>'int'],
'AMQPExchange::setName' => ['bool', 'exchange_name'=>'string'],
'AMQPExchange::setType' => ['bool', 'exchange_type'=>'string'],
'AMQPExchange::unbind' => ['bool', 'exchange_name'=>'string', 'routing_key='=>'string', 'arguments='=>'array'],
'AMQPQueue::__construct' => ['void', 'amqp_channel'=>'AMQPChannel'],
'AMQPQueue::ack' => ['bool', 'delivery_tag'=>'string', 'flags='=>'int'],
'AMQPQueue::bind' => ['bool', 'exchange_name'=>'string', 'routing_key='=>'string', 'arguments='=>'array'],
'AMQPQueue::cancel' => ['bool', 'consumer_tag='=>'string'],
'AMQPQueue::consume' => ['void', 'callback='=>'?callable', 'flags='=>'int', 'consumerTag='=>'string'],
'AMQPQueue::declareQueue' => ['int'],
'AMQPQueue::delete' => ['int', 'flags='=>'int'],
'AMQPQueue::get' => ['AMQPEnvelope|bool', 'flags='=>'int'],
'AMQPQueue::getArgument' => ['bool|int|string', 'key'=>'string'],
'AMQPQueue::getArguments' => ['array'],
'AMQPQueue::getChannel' => ['AMQPChannel'],
'AMQPQueue::getConnection' => ['AMQPConnection'],
'AMQPQueue::getFlags' => ['int'],
'AMQPQueue::getName' => ['string'],
'AMQPQueue::nack' => ['bool', 'delivery_tag'=>'string', 'flags='=>'int'],
'AMQPQueue::purge' => ['bool'],
'AMQPQueue::reject' => ['bool', 'delivery_tag'=>'string', 'flags='=>'int'],
'AMQPQueue::setArgument' => ['bool', 'key'=>'string', 'value'=>'mixed'],
'AMQPQueue::setArguments' => ['bool', 'arguments'=>'array'],
'AMQPQueue::setFlags' => ['bool', 'flags'=>'int'],
'AMQPQueue::setName' => ['bool', 'queue_name'=>'string'],
'AMQPQueue::unbind' => ['bool', 'exchange_name'=>'string', 'routing_key='=>'string', 'arguments='=>'array'],
'apache_child_terminate' => ['bool'],
'apache_get_modules' => ['array'],
'apache_get_version' => ['string|false'],
'apache_getenv' => ['string|false', 'variable'=>'string', 'walk_to_top='=>'bool'],
'apache_lookup_uri' => ['object|false', 'filename'=>'string'],
'apache_note' => ['string|false', 'note_name'=>'string', 'note_value='=>'string'],
'apache_request_headers' => ['array|false'],
'apache_reset_timeout' => ['bool'],
'apache_response_headers' => ['array|false'],
'apache_setenv' => ['bool', 'variable'=>'string', 'value'=>'string', 'walk_to_top='=>'bool'],
'apc_add' => ['bool', 'key'=>'string', 'var'=>'mixed', 'ttl='=>'int'],
'apc_add\'1' => ['array', 'values'=>'array', 'unused='=>'', 'ttl='=>'int'],
'apc_bin_dump' => ['string', 'files='=>'array', 'user_vars='=>'array'],
'apc_bin_dumpfile' => ['int', 'files'=>'array', 'user_vars'=>'array', 'filename'=>'string', 'flags='=>'int', 'context='=>'resource'],
'apc_bin_load' => ['bool', 'data'=>'string', 'flags='=>'int'],
'apc_bin_loadfile' => ['bool', 'filename'=>'string', 'context='=>'resource', 'flags='=>'int'],
'apc_cache_info' => ['array', 'cache_type='=>'string', 'limited='=>'bool'],
'apc_cas' => ['bool', 'key'=>'string', 'old'=>'int', 'new'=>'int'],
'apc_clear_cache' => ['bool', 'cache_type='=>'string'],
'apc_compile_file' => ['mixed', 'filename'=>'string', 'atomic='=>'bool'],
'apc_dec' => ['int', 'key'=>'string', 'step='=>'int', '&w_success='=>'bool'],
'apc_define_constants' => ['bool', 'key'=>'string', 'constants'=>'array', 'case_sensitive='=>'bool'],
'apc_delete' => ['bool', 'key'=>'string|string[]|APCIterator'],
'apc_delete_file' => ['mixed', 'keys'=>'mixed'],
'apc_exists' => ['bool', 'keys'=>'string'],
'apc_exists\'1' => ['array', 'keys'=>'string[]'],
'apc_fetch' => ['mixed', 'key'=>'mixed', '&w_success='=>'bool'],
'apc_inc' => ['int', 'key'=>'string', 'step='=>'int', '&w_success='=>'bool'],
'apc_load_constants' => ['bool', 'key'=>'string', 'case_sensitive='=>'bool'],
'apc_sma_info' => ['array', 'limited='=>'bool'],
'apc_store' => ['bool', 'key'=>'string', 'var'=>'', 'ttl='=>'int'],
'apc_store\'1' => ['array', 'values'=>'array', 'unused='=>'', 'ttl='=>'int'],
'APCIterator::__construct' => ['void', 'cache'=>'string', 'search='=>'', 'format='=>'int', 'chunk_size='=>'int', 'list='=>'int'],
'APCIterator::current' => ['mixed'],
'APCIterator::getTotalCount' => ['int'],
'APCIterator::getTotalHits' => ['int'],
'APCIterator::getTotalSize' => ['int'],
'APCIterator::key' => ['string'],
'APCIterator::next' => ['void'],
'APCIterator::rewind' => ['void'],
'APCIterator::valid' => ['bool'],
'apcu_add' => ['bool', 'key'=>'string', 'var'=>'', 'ttl='=>'int'],
'apcu_add\'1' => ['array<string,int>', 'values'=>'array<string,mixed>', 'unused='=>'', 'ttl='=>'int'],
'apcu_cache_info' => ['array<string,mixed>', 'limited='=>'bool'],
'apcu_cas' => ['bool', 'key'=>'string', 'old'=>'int', 'new'=>'int'],
'apcu_clear_cache' => ['bool'],
'apcu_dec' => ['int', 'key'=>'string', 'step='=>'int', '&w_success='=>'bool', 'ttl='=>'int'],
'apcu_delete' => ['bool', 'key'=>'string|APCuIterator'],
'apcu_delete\'1' => ['list<string>', 'key'=>'string[]'],
'apcu_entry' => ['mixed', 'key'=>'string', 'generator'=>'callable', 'ttl='=>'int'],
'apcu_exists' => ['bool', 'keys'=>'string'],
'apcu_exists\'1' => ['array', 'keys'=>'string[]'],
'apcu_fetch' => ['mixed', 'key'=>'string|string[]', '&w_success='=>'bool'],
'apcu_inc' => ['int', 'key'=>'string', 'step='=>'int', '&w_success='=>'bool', 'ttl='=>'int'],
'apcu_sma_info' => ['array', 'limited='=>'bool'],
'apcu_store' => ['bool', 'key'=>'string', 'var='=>'', 'ttl='=>'int'],
'apcu_store\'1' => ['array', 'values'=>'array', 'unused='=>'', 'ttl='=>'int'],
'APCuIterator::__construct' => ['void', 'search='=>'string|string[]|null', 'format='=>'int', 'chunk_size='=>'int', 'list='=>'int'],
'APCuIterator::current' => ['mixed'],
'APCuIterator::getTotalCount' => ['int'],
'APCuIterator::getTotalHits' => ['int'],
'APCuIterator::getTotalSize' => ['int'],
'APCuIterator::key' => ['string'],
'APCuIterator::next' => ['void'],
'APCuIterator::rewind' => ['void'],
'APCuIterator::valid' => ['bool'],
'apd_breakpoint' => ['bool', 'debug_level'=>'int'],
'apd_callstack' => ['array'],
'apd_clunk' => ['void', 'warning'=>'string', 'delimiter='=>'string'],
'apd_continue' => ['bool', 'debug_level'=>'int'],
'apd_croak' => ['void', 'warning'=>'string', 'delimiter='=>'string'],
'apd_dump_function_table' => ['void'],
'apd_dump_persistent_resources' => ['array'],
'apd_dump_regular_resources' => ['array'],
'apd_echo' => ['bool', 'output'=>'string'],
'apd_get_active_symbols' => ['array'],
'apd_set_pprof_trace' => ['string', 'dump_directory='=>'string', 'fragment='=>'string'],
'apd_set_session' => ['void', 'debug_level'=>'int'],
'apd_set_session_trace' => ['void', 'debug_level'=>'int', 'dump_directory='=>'string'],
'apd_set_session_trace_socket' => ['bool', 'tcp_server'=>'string', 'socket_type'=>'int', 'port'=>'int', 'debug_level'=>'int'],
'AppendIterator::__construct' => ['void'],
'AppendIterator::append' => ['void', 'iterator'=>'Iterator'],
'AppendIterator::current' => ['mixed'],
'AppendIterator::getArrayIterator' => ['ArrayIterator'],
'AppendIterator::getInnerIterator' => ['iterator'],
'AppendIterator::getIteratorIndex' => ['int'],
'AppendIterator::key' => ['mixed'],
'AppendIterator::next' => ['void'],
'AppendIterator::rewind' => ['void'],
'AppendIterator::valid' => ['bool'],
'array_change_key_case' => ['array', 'input'=>'array', 'case='=>'int'],
'array_chunk' => ['list<array>', 'input'=>'array', 'size'=>'positive-int', 'preserve_keys='=>'bool'],
'array_column' => ['array', 'array'=>'array', 'column_key'=>'mixed', 'index_key='=>'mixed'],
'array_combine' => ['array|false', 'keys'=>'array', 'values'=>'array'],
'array_count_values' => ['array<positive-int>', 'input'=>'array'],
'array_diff' => ['array', 'arr1'=>'array', 'arr2'=>'array', '...args='=>'array'],
'array_diff_assoc' => ['array', 'arr1'=>'array', 'arr2'=>'array', '...args='=>'array'],
'array_diff_key' => ['array', 'arr1'=>'array', 'arr2'=>'array', '...args='=>'array'],
'array_diff_uassoc' => ['array', 'arr1'=>'array', 'arr2'=>'array', 'data_comp_func'=>'callable(mixed,mixed):int'],
'array_diff_uassoc\'1' => ['array', 'arr1'=>'array', 'arr2'=>'array', 'arr3'=>'array', 'arg4'=>'array|callable(mixed,mixed):int', '...rest='=>'array|callable'],
'array_diff_ukey' => ['array', 'arr1'=>'array', 'arr2'=>'array', 'key_comp_func'=>'callable(mixed,mixed):int'],
'array_diff_ukey\'1' => ['array', 'arr1'=>'array', 'arr2'=>'array', 'arr3'=>'array', 'arg4'=>'array|callable(mixed,mixed):int', '...rest='=>'array|callable(mixed,mixed):int'],
'array_fill' => ['array', 'start_key'=>'int', 'num'=>'int', 'val'=>'mixed'],
'array_fill_keys' => ['array', 'keys'=>'array', 'val'=>'mixed'],
'array_filter' => ['array', 'input'=>'array', 'callback='=>'callable(mixed,mixed):bool|callable(mixed):bool', 'flag='=>'int'],
'array_flip' => ['array', 'input'=>'array<int|string>'],
'array_intersect' => ['array', 'arr1'=>'array', 'arr2'=>'array', '...args='=>'array'],
'array_intersect_assoc' => ['array', 'arr1'=>'array', 'arr2'=>'array', '...args='=>'array'],
'array_intersect_key' => ['array', 'arr1'=>'array', 'arr2'=>'array', '...args='=>'array'],
'array_intersect_uassoc' => ['array', 'arr1'=>'array', 'arr2'=>'array', 'key_compare_func'=>'callable(mixed,mixed):int'],
'array_intersect_uassoc\'1' => ['array', 'arr1'=>'array', 'arr2'=>'array', 'arr3'=>'array', 'arg4'=>'array|callable(mixed,mixed):int', '...rest'=>'array|callable'],
'array_intersect_ukey' => ['array', 'arr1'=>'array', 'arr2'=>'array', 'key_compare_func'=>'callable(mixed,mixed):int'],
'array_intersect_ukey\'1' => ['array', 'arr1'=>'array', 'arr2'=>'array', 'arr3'=>'array', 'arg4'=>'array|callable(mixed,mixed):int', '...rest'=>'array|callable(mixed,mixed):int'],
'array_key_exists' => ['bool', 'key'=>'string|int', 'search'=>'array'],
'array_key_first' => ['int|string|null', 'array' => 'array'],
'array_key_last' => ['int|string|null', 'array' => 'array'],
'array_keys' => ['list<array-key>', 'input'=>'array', 'search_value='=>'mixed', 'strict='=>'bool'],
'array_map' => ['array', 'callback'=>'?callable', 'array'=>'array', '...args='=>'array'],
'array_merge' => ['array', 'arr1'=>'array', '...args='=>'array'],
'array_merge_recursive' => ['array', 'arr1'=>'array', '...args='=>'array'],
'array_multisort' => ['bool', '&rw_array1'=>'array', 'array1_sort_order='=>'array|int', 'array1_sort_flags='=>'array|int', '...args='=>'array|int'],
'array_pad' => ['array', 'input'=>'array', 'pad_size'=>'int', 'pad_value'=>'mixed'],
'array_pop' => ['mixed', '&rw_stack'=>'array'],
'array_product' => ['int|float', 'input'=>'array'],
'array_push' => ['int', '&rw_stack'=>'array', 'var'=>'mixed', '...vars='=>'mixed'],
'array_rand' => ['int|string|array<int,int>|array<int,string>', 'input'=>'array', 'num_req'=>'int'],
'array_rand\'1' => ['int|string', 'input'=>'array'],
'array_reduce' => ['mixed', 'input'=>'array', 'callback'=>'callable(mixed,mixed):mixed', 'initial='=>'mixed'],
'array_replace' => ['array', 'arr1'=>'array', 'arr2'=>'array', '...args='=>'array'],
'array_replace_recursive' => ['array', 'arr1'=>'array', 'arr2'=>'array', '...args='=>'array'],
'array_reverse' => ['array', 'input'=>'array', 'preserve='=>'bool'],
'array_search' => ['int|string|false', 'needle'=>'mixed', 'haystack'=>'array', 'strict='=>'bool'],
'array_shift' => ['mixed', '&rw_stack'=>'array'],
'array_slice' => ['array', 'input'=>'array', 'offset'=>'int', 'length='=>'?int', 'preserve_keys='=>'bool'],
'array_splice' => ['array', '&rw_input'=>'array', 'offset'=>'int', 'length='=>'int', 'replacement='=>'mixed'],
'array_sum' => ['int|float', 'input'=>'array'],
'array_udiff' => ['array', 'arr1'=>'array', 'arr2'=>'array', 'data_comp_func'=>'callable(mixed,mixed):int'],
'array_udiff\'1' => ['array', 'arr1'=>'array', 'arr2'=>'array', 'arr3'=>'array', 'arg4'=>'array|callable(mixed,mixed):int', '...rest='=>'array|callable(mixed,mixed):int'],
'array_udiff_assoc' => ['array', 'arr1'=>'array', 'arr2'=>'array', 'key_comp_func'=>'callable(mixed,mixed):int'],
'array_udiff_assoc\'1' => ['array', 'arr1'=>'array', 'arr2'=>'array', 'arr3'=>'array', 'arg4'=>'array|callable(mixed,mixed):int', '...rest='=>'array|callable(mixed,mixed):int'],
'array_udiff_uassoc' => ['array', 'arr1'=>'array', 'arr2'=>'array', 'data_comp_func'=>'callable', 'key_comp_func'=>'callable(mixed,mixed):int'],
'array_udiff_uassoc\'1' => ['array', 'arr1'=>'array', 'arr2'=>'array', 'arr3'=>'array', 'arg4'=>'array|callable(mixed,mixed):int', 'arg5'=>'array|callable(mixed,mixed):int', '...rest='=>'array|callable(mixed,mixed):int'],
'array_uintersect' => ['array', 'arr1'=>'array', 'arr2'=>'array', 'data_compare_func'=>'callable(mixed,mixed):int'],
'array_uintersect\'1' => ['array', 'arr1'=>'array', 'arr2'=>'array', 'arr3'=>'array', 'arg4'=>'array|callable(mixed,mixed):int', '...rest='=>'array|callable(mixed,mixed):int'],
'array_uintersect_assoc' => ['array', 'arr1'=>'array', 'arr2'=>'array', 'data_compare_func'=>'callable(mixed,mixed):int'],
'array_uintersect_assoc\'1' => ['array', 'arr1'=>'array', 'arr2'=>'array', 'arr3'=>'array', 'arg4'=>'array|callable(mixed,mixed):int', '...rest='=>'array|callable(mixed,mixed):int'],
'array_uintersect_uassoc' => ['array', 'arr1'=>'array', 'arr2'=>'array', 'data_compare_func'=>'callable(mixed,mixed):int', 'key_compare_func'=>'callable(mixed,mixed):int'],
'array_uintersect_uassoc\'1' => ['array', 'arr1'=>'array', 'arr2'=>'array', 'arr3'=>'array', 'arg4'=>'array|callable(mixed,mixed):int', 'arg5'=>'array|callable(mixed,mixed):int', '...rest='=>'array|callable(mixed,mixed):int'],
'array_unique' => ['array', 'array'=>'array', 'flags='=>'int'],
'array_unshift' => ['positive-int', '&rw_stack'=>'array', 'var'=>'mixed', '...vars='=>'mixed'],
'array_values' => ['list<mixed>', 'input'=>'array'],
'array_walk' => ['bool', '&rw_input'=>'array|object', 'callback'=>'callable', 'userdata='=>'mixed'],
'array_walk_recursive' => ['bool', '&rw_input'=>'array|object', 'callback'=>'callable', 'userdata='=>'mixed'],
'ArrayAccess::offsetExists' => ['bool', 'offset'=>'mixed'],
'ArrayAccess::offsetGet' => ['mixed', 'offset'=>'mixed'],
'ArrayAccess::offsetSet' => ['void', 'offset'=>'mixed', 'value'=>'mixed'],
'ArrayAccess::offsetUnset' => ['void', 'offset'=>'mixed'],
'ArrayIterator::__construct' => ['void', 'array='=>'array|object', 'flags='=>'int'],
'ArrayIterator::append' => ['void', 'value'=>'mixed'],
'ArrayIterator::asort' => ['void'],
'ArrayIterator::count' => ['0|positive-int'],
'ArrayIterator::current' => ['mixed'],
'ArrayIterator::getArrayCopy' => ['array'],
'ArrayIterator::getFlags' => ['int'],
'ArrayIterator::key' => ['int|string|false'],
'ArrayIterator::ksort' => ['void'],
'ArrayIterator::natcasesort' => ['void'],
'ArrayIterator::natsort' => ['void'],
'ArrayIterator::next' => ['void'],
'ArrayIterator::offsetExists' => ['bool', 'index'=>'string|int|bool|null'],
'ArrayIterator::offsetGet' => ['mixed', 'index'=>'string|int|bool|null'],
'ArrayIterator::offsetSet' => ['void', 'index'=>'string|int|bool|null', 'newval'=>'mixed'],
'ArrayIterator::offsetUnset' => ['void', 'index'=>'string|int|bool|null'],
'ArrayIterator::rewind' => ['void'],
'ArrayIterator::seek' => ['void', 'position'=>'int'],
'ArrayIterator::serialize' => ['string'],
'ArrayIterator::setFlags' => ['void', 'flags'=>'string'],
'ArrayIterator::uasort' => ['void', 'callback'=>'callable(mixed,mixed):int'],
'ArrayIterator::uksort' => ['void', 'callback'=>'callable(array-key,array-key):int'],
'ArrayIterator::unserialize' => ['void', 'serialized'=>'string'],
'ArrayIterator::valid' => ['bool'],
'ArrayObject::__construct' => ['void', 'input='=>'array|object', 'flags='=>'int', 'iterator_class='=>'class-string'],
'ArrayObject::append' => ['void', 'value'=>'mixed'],
'ArrayObject::asort' => ['void'],
'ArrayObject::count' => ['0|positive-int'],
'ArrayObject::exchangeArray' => ['array', 'ar'=>'mixed'],
'ArrayObject::getArrayCopy' => ['array'],
'ArrayObject::getFlags' => ['int'],
'ArrayObject::getIterator' => ['ArrayIterator'],
'ArrayObject::getIteratorClass' => ['string'],
'ArrayObject::ksort' => ['void'],
'ArrayObject::natcasesort' => ['void'],
'ArrayObject::natsort' => ['void'],
'ArrayObject::offsetExists' => ['bool', 'index'=>'mixed'],
'ArrayObject::offsetGet' => ['mixed', 'index'=>'mixed'],
'ArrayObject::offsetSet' => ['void', 'index'=>'mixed', 'newval'=>'mixed'],
'ArrayObject::offsetUnset' => ['void', 'index'=>'mixed'],
'ArrayObject::serialize' => ['string'],
'ArrayObject::setFlags' => ['void', 'flags'=>'int'],
'ArrayObject::setIteratorClass' => ['void', 'iterator_class'=>'string'],
'ArrayObject::uasort' => ['void', 'callback'=>'callable'],
'ArrayObject::uksort' => ['void', 'callback'=>'callable(array-key,array-key):int'],
'ArrayObject::unserialize' => ['void', 'serialized'=>'string'],
'arsort' => ['bool', '&rw_array_arg'=>'array', 'sort_flags='=>'int'],
'asin' => ['float', 'number'=>'float'],
'asinh' => ['float', 'number'=>'float'],
'asort' => ['bool', '&rw_array_arg'=>'array', 'sort_flags='=>'int'],
'assert' => ['bool', 'assertion'=>'string|bool', 'description='=>'string|Throwable|null'],
'assert_options' => ['mixed', 'what'=>'int', 'value='=>'mixed'],
'ast\get_kind_name' => ['string', 'kind'=>'int'],
'ast\get_metadata' => ['array<int,ast\Metadata>'],
'ast\get_supported_versions' => ['array<int,int>', 'exclude_deprecated='=>'bool'],
'ast\kind_uses_flags' => ['bool', 'kind'=>'int'],
'ast\Node::__construct' => ['void', 'kind='=>'int', 'flags='=>'int', 'children='=>'ast\Node\Decl[]|ast\Node[]|array[]|int[]|string[]|float[]|bool[]|null[]', 'start_line='=>'int'],
'ast\parse_code' => ['ast\Node', 'code'=>'string', 'version'=>'int', 'filename='=>'string'],
'ast\parse_file' => ['ast\Node', 'filename'=>'string', 'version'=>'int'],
'atan' => ['float', 'number'=>'float'],
'atan2' => ['float', 'y'=>'float', 'x'=>'float'],
'atanh' => ['float', 'number'=>'float'],
'BadFunctionCallException::__clone' => ['void'],
'BadFunctionCallException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Throwable)|(?BadFunctionCallException)'],
'BadFunctionCallException::__toString' => ['string'],
'BadFunctionCallException::getCode' => ['int'],
'BadFunctionCallException::getFile' => ['string'],
'BadFunctionCallException::getLine' => ['int'],
'BadFunctionCallException::getMessage' => ['string'],
'BadFunctionCallException::getPrevious' => ['(?Throwable)|(?BadFunctionCallException)'],
'BadFunctionCallException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'BadFunctionCallException::getTraceAsString' => ['string'],
'BadMethodCallException::__clone' => ['void'],
'BadMethodCallException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Throwable)|(?BadMethodCallException)'],
'BadMethodCallException::__toString' => ['string'],
'BadMethodCallException::getCode' => ['int'],
'BadMethodCallException::getFile' => ['string'],
'BadMethodCallException::getLine' => ['int'],
'BadMethodCallException::getMessage' => ['string'],
'BadMethodCallException::getPrevious' => ['(?Throwable)|(?BadMethodCallException)'],
'BadMethodCallException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'BadMethodCallException::getTraceAsString' => ['string'],
'base64_decode' => ['string', 'str'=>'string', 'strict='=>'false'],
'base64_decode\'1' => ['string|false', 'str'=>'string', 'strict='=>'true'],
'base64_encode' => ['string', 'str'=>'string'],
'base_convert' => ['string', 'number'=>'string', 'frombase'=>'int', 'tobase'=>'int'],
'basename' => ['string', 'path'=>'string', 'suffix='=>'string'],
'bbcode_add_element' => ['bool', 'bbcode_container'=>'resource', 'tag_name'=>'string', 'tag_rules'=>'array'],
'bbcode_add_smiley' => ['bool', 'bbcode_container'=>'resource', 'smiley'=>'string', 'replace_by'=>'string'],
'bbcode_create' => ['resource', 'bbcode_initial_tags='=>'array'],
'bbcode_destroy' => ['bool', 'bbcode_container'=>'resource'],
'bbcode_parse' => ['string', 'bbcode_container'=>'resource', 'to_parse'=>'string'],
'bbcode_set_arg_parser' => ['bool', 'bbcode_container'=>'resource', 'bbcode_arg_parser'=>'resource'],
'bbcode_set_flags' => ['bool', 'bbcode_container'=>'resource', 'flags'=>'int', 'mode='=>'int'],
'bcadd' => ['numeric-string', 'left_operand'=>'string', 'right_operand'=>'string', 'scale='=>'int'],
'bccomp' => ['int', 'left_operand'=>'string', 'right_operand'=>'string', 'scale='=>'int'],
'bcdiv' => ['numeric-string|null', 'left_operand'=>'string', 'right_operand'=>'string', 'scale='=>'int'],
'bcmod' => ['numeric-string|null', 'left_operand'=>'string', 'right_operand'=>'string', 'scale='=>'int'],
'bcmul' => ['numeric-string', 'left_operand'=>'string', 'right_operand'=>'string', 'scale='=>'int'],
'bcompiler_load' => ['bool', 'filename'=>'string'],
'bcompiler_load_exe' => ['bool', 'filename'=>'string'],
'bcompiler_parse_class' => ['bool', 'class'=>'string', 'callback'=>'string'],
'bcompiler_read' => ['bool', 'filehandle'=>'resource'],
'bcompiler_write_class' => ['bool', 'filehandle'=>'resource', 'classname'=>'string', 'extends='=>'string'],
'bcompiler_write_constant' => ['bool', 'filehandle'=>'resource', 'constantname'=>'string'],
'bcompiler_write_exe_footer' => ['bool', 'filehandle'=>'resource', 'startpos'=>'int'],
'bcompiler_write_file' => ['bool', 'filehandle'=>'resource', 'filename'=>'string'],
'bcompiler_write_footer' => ['bool', 'filehandle'=>'resource'],
'bcompiler_write_function' => ['bool', 'filehandle'=>'resource', 'functionname'=>'string'],
'bcompiler_write_functions_from_file' => ['bool', 'filehandle'=>'resource', 'filename'=>'string'],
'bcompiler_write_header' => ['bool', 'filehandle'=>'resource', 'write_ver='=>'string'],
'bcompiler_write_included_filename' => ['bool', 'filehandle'=>'resource', 'filename'=>'string'],
'bcpow' => ['numeric-string', 'base'=>'string', 'exponent'=>'string', 'scale='=>'int'],
'bcpowmod' => ['numeric-string|null', 'base'=>'string', 'exponent'=>'string', 'modulus'=>'string', 'scale='=>'int'],
'bcscale' => ['int', 'scale='=>'int'],
'bcsqrt' => ['numeric-string', 'operand'=>'string', 'scale='=>'int'],
'bcsub' => ['numeric-string', 'left_operand'=>'string', 'right_operand'=>'string', 'scale='=>'int'],
'bin2hex' => ['string', 'data'=>'string'],
'bind_textdomain_codeset' => ['string|false', 'domain'=>'string', 'codeset'=>'string'],
'bindec' => ['float|int', 'binary_number'=>'string'],
'bindtextdomain' => ['string|false', 'domain_name'=>'string', 'dir'=>'string'],
'birdstep_autocommit' => ['bool', 'index'=>'int'],
'birdstep_close' => ['bool', 'id'=>'int'],
'birdstep_commit' => ['bool', 'index'=>'int'],
'birdstep_connect' => ['int', 'server'=>'string', 'user'=>'string', 'pass'=>'string'],
'birdstep_exec' => ['int', 'index'=>'int', 'exec_str'=>'string'],
'birdstep_fetch' => ['bool', 'index'=>'int'],
'birdstep_fieldname' => ['string', 'index'=>'int', 'col'=>'int'],
'birdstep_fieldnum' => ['int', 'index'=>'int'],
'birdstep_freeresult' => ['bool', 'index'=>'int'],
'birdstep_off_autocommit' => ['bool', 'index'=>'int'],
'birdstep_result' => ['', 'index'=>'int', 'col'=>''],
'birdstep_rollback' => ['bool', 'index'=>'int'],
'blenc_encrypt' => ['string', 'plaintext'=>'string', 'encodedfile'=>'string', 'encryption_key='=>'string'],
'boolval' => ['bool', 'var'=>'mixed'],
'BSON\Binary::__construct' => ['void', 'data'=>'string', 'subtype'=>'string'],
'BSON\Binary::getSubType' => [''],
'BSON\fromArray' => ['string', 'array'=>'string'],
'BSON\fromJSON' => ['string', 'json'=>'string'],
'BSON\Javascript::__construct' => ['void', 'javascript'=>'string', 'scope='=>'string'],
'BSON\ObjectID::__construct' => ['void', 'id='=>'string'],
'BSON\ObjectID::__toString' => ['string'],
'BSON\Regex::__construct' => ['void', 'pattern'=>'string', 'flags'=>'string'],
'BSON\Regex::__toString' => ['string'],
'BSON\Regex::getFlags' => [''],
'BSON\Regex::getPattern' => [''],
'BSON\Serializable::bsonSerialize' => ['string'],
'BSON\Timestamp::__construct' => ['void', 'increment'=>'string', 'timestamp'=>'string'],
'BSON\Timestamp::__toString' => ['string'],
'BSON\toArray' => ['array', 'bson'=>'string'],
'BSON\toJSON' => ['string', 'bson'=>'string'],
'BSON\Unserializable::bsonUnserialize' => ['', 'data'=>'array'],
'BSON\UTCDatetime::__construct' => ['void', 'milliseconds'=>'string'],
'BSON\UTCDatetime::__toString' => ['string'],
'BSON\UTCDatetime::toDateTime' => [''],
'bson_decode' => ['array', 'bson'=>'string'],
'bson_encode' => ['string', 'anything'=>'mixed'],
'bzclose' => ['bool', 'bz'=>'resource'],
'bzcompress' => ['string|int', 'source'=>'string', 'blocksize100k='=>'int', 'workfactor='=>'int'],
'bzdecompress' => ['string|false', 'source'=>'string', 'small='=>'int'],
'bzerrno' => ['int', 'bz'=>'resource'],
'bzerror' => ['array', 'bz'=>'resource'],
'bzerrstr' => ['string', 'bz'=>'resource'],
'bzflush' => ['bool', 'bz'=>'resource'],
'bzopen' => ['resource|false', 'file'=>'string|resource', 'mode'=>'string'],
'bzread' => ['string|false', 'bz'=>'resource', 'length='=>'int'],
'bzwrite' => ['int|false', 'bz'=>'resource', 'data'=>'string', 'length='=>'int'],
'CachingIterator::__construct' => ['void', 'iterator'=>'Iterator', 'flags='=>''],
'CachingIterator::__toString' => ['string'],
'CachingIterator::count' => ['0|positive-int'],
'CachingIterator::current' => ['mixed'],
'CachingIterator::getCache' => ['array'],
'CachingIterator::getFlags' => ['int'],
'CachingIterator::getInnerIterator' => ['Iterator'],
'CachingIterator::hasNext' => ['bool'],
'CachingIterator::key' => ['mixed'],
'CachingIterator::next' => ['void'],
'CachingIterator::offsetExists' => ['bool', 'index'=>'string'],
'CachingIterator::offsetGet' => ['mixed', 'index'=>'string'],
'CachingIterator::offsetSet' => ['void', 'index'=>'string', 'newval'=>'mixed'],
'CachingIterator::offsetUnset' => ['void', 'index'=>'string'],
'CachingIterator::rewind' => ['void'],
'CachingIterator::setFlags' => ['void', 'flags'=>'int'],
'CachingIterator::valid' => ['bool'],
'Cairo::availableFonts' => ['array'],
'Cairo::availableSurfaces' => ['array'],
'Cairo::statusToString' => ['string', 'status'=>'int'],
'Cairo::version' => ['int'],
'Cairo::versionString' => ['string'],
'cairo_append_path' => ['', 'path'=>'cairopath', 'context'=>'cairocontext'],
'cairo_arc' => ['', 'x'=>'float', 'y'=>'float', 'radius'=>'float', 'angle1'=>'float', 'angle2'=>'float', 'context'=>'cairocontext'],
'cairo_arc_negative' => ['', 'x'=>'float', 'y'=>'float', 'radius'=>'float', 'angle1'=>'float', 'angle2'=>'float', 'context'=>'cairocontext'],
'cairo_available_fonts' => ['array'],
'cairo_available_surfaces' => ['array'],
'cairo_clip' => ['', 'context'=>'cairocontext'],
'cairo_clip_extents' => ['array', 'context'=>'cairocontext'],
'cairo_clip_preserve' => ['', 'context'=>'cairocontext'],
'cairo_clip_rectangle_list' => ['array', 'context'=>'cairocontext'],
'cairo_close_path' => ['', 'context'=>'cairocontext'],
'cairo_copy_page' => ['', 'context'=>'cairocontext'],
'cairo_copy_path' => ['CairoPath', 'context'=>'cairocontext'],
'cairo_copy_path_flat' => ['CairoPath', 'context'=>'cairocontext'],
'cairo_create' => ['CairoContext', 'surface'=>'cairosurface'],
'cairo_curve_to' => ['', 'x1'=>'float', 'y1'=>'float', 'x2'=>'float', 'y2'=>'float', 'x3'=>'float', 'y3'=>'float', 'context'=>'cairocontext'],
'cairo_device_to_user' => ['array', 'x'=>'float', 'y'=>'float', 'context'=>'cairocontext'],
'cairo_device_to_user_distance' => ['array', 'x'=>'float', 'y'=>'float', 'context'=>'cairocontext'],
'cairo_fill' => ['', 'context'=>'cairocontext'],
'cairo_fill_extents' => ['array', 'context'=>'cairocontext'],
'cairo_fill_preserve' => ['', 'context'=>'cairocontext'],
'cairo_font_extents' => ['array', 'context'=>'cairocontext'],
'cairo_font_face_get_type' => ['int', 'fontface'=>'cairofontface'],
'cairo_font_face_status' => ['int', 'fontface'=>'cairofontface'],
'cairo_font_options_create' => ['CairoFontOptions'],
'cairo_font_options_equal' => ['bool', 'options'=>'cairofontoptions', 'other'=>'cairofontoptions'],
'cairo_font_options_get_antialias' => ['int', 'options'=>'cairofontoptions'],
'cairo_font_options_get_hint_metrics' => ['int', 'options'=>'cairofontoptions'],
'cairo_font_options_get_hint_style' => ['int', 'options'=>'cairofontoptions'],
'cairo_font_options_get_subpixel_order' => ['int', 'options'=>'cairofontoptions'],
'cairo_font_options_hash' => ['int', 'options'=>'cairofontoptions'],
'cairo_font_options_merge' => ['void', 'options'=>'cairofontoptions', 'other'=>'cairofontoptions'],
'cairo_font_options_set_antialias' => ['void', 'options'=>'cairofontoptions', 'antialias'=>'int'],
'cairo_font_options_set_hint_metrics' => ['void', 'options'=>'cairofontoptions', 'hint_metrics'=>'int'],
'cairo_font_options_set_hint_style' => ['void', 'options'=>'cairofontoptions', 'hint_style'=>'int'],
'cairo_font_options_set_subpixel_order' => ['void', 'options'=>'cairofontoptions', 'subpixel_order'=>'int'],
'cairo_font_options_status' => ['int', 'options'=>'cairofontoptions'],
'cairo_format_stride_for_width' => ['int', 'format'=>'int', 'width'=>'int'],
'cairo_get_antialias' => ['int', 'context'=>'cairocontext'],
'cairo_get_current_point' => ['array', 'context'=>'cairocontext'],
'cairo_get_dash' => ['array', 'context'=>'cairocontext'],
'cairo_get_dash_count' => ['int', 'context'=>'cairocontext'],
'cairo_get_fill_rule' => ['int', 'context'=>'cairocontext'],
'cairo_get_font_face' => ['', 'context'=>'cairocontext'],
'cairo_get_font_matrix' => ['', 'context'=>'cairocontext'],
'cairo_get_font_options' => ['', 'context'=>'cairocontext'],
'cairo_get_group_target' => ['', 'context'=>'cairocontext'],
'cairo_get_line_cap' => ['int', 'context'=>'cairocontext'],
'cairo_get_line_join' => ['int', 'context'=>'cairocontext'],
'cairo_get_line_width' => ['float', 'context'=>'cairocontext'],
'cairo_get_matrix' => ['', 'context'=>'cairocontext'],
'cairo_get_miter_limit' => ['float', 'context'=>'cairocontext'],
'cairo_get_operator' => ['int', 'context'=>'cairocontext'],
'cairo_get_scaled_font' => ['', 'context'=>'cairocontext'],
'cairo_get_source' => ['', 'context'=>'cairocontext'],
'cairo_get_target' => ['', 'context'=>'cairocontext'],
'cairo_get_tolerance' => ['float', 'context'=>'cairocontext'],
'cairo_glyph_path' => ['', 'glyphs'=>'array', 'context'=>'cairocontext'],
'cairo_has_current_point' => ['bool', 'context'=>'cairocontext'],
'cairo_identity_matrix' => ['', 'context'=>'cairocontext'],
'cairo_image_surface_create' => ['CairoImageSurface', 'format'=>'int', 'width'=>'int', 'height'=>'int'],
'cairo_image_surface_create_for_data' => ['CairoImageSurface', 'data'=>'string', 'format'=>'int', 'width'=>'int', 'height'=>'int', 'stride='=>'int'],
'cairo_image_surface_create_from_png' => ['CairoImageSurface', 'file'=>'string'],
'cairo_image_surface_get_data' => ['string', 'surface'=>'cairoimagesurface'],
'cairo_image_surface_get_format' => ['int', 'surface'=>'cairoimagesurface'],
'cairo_image_surface_get_height' => ['int', 'surface'=>'cairoimagesurface'],
'cairo_image_surface_get_stride' => ['int', 'surface'=>'cairoimagesurface'],
'cairo_image_surface_get_width' => ['int', 'surface'=>'cairoimagesurface'],
'cairo_in_fill' => ['bool', 'x'=>'string', 'y'=>'string', 'context'=>'cairocontext'],
'cairo_in_stroke' => ['bool', 'x'=>'string', 'y'=>'string', 'context'=>'cairocontext'],
'cairo_line_to' => ['', 'x'=>'string', 'y'=>'string', 'context'=>'cairocontext'],
'cairo_mask' => ['', 'pattern'=>'cairopattern', 'context'=>'cairocontext'],
'cairo_mask_surface' => ['', 'surface'=>'cairosurface', 'x='=>'string', 'y='=>'string', 'context='=>'cairocontext'],
'cairo_matrix_create_scale' => ['object', 'sx'=>'float', 'sy'=>'float'],
'cairo_matrix_init' => ['object', 'xx='=>'float', 'yx='=>'float', 'xy='=>'float', 'yy='=>'float', 'x0='=>'float', 'y0='=>'float'],
'cairo_matrix_init_identity' => ['object'],
'cairo_matrix_init_rotate' => ['object', 'radians'=>'float'],
'cairo_matrix_init_scale' => ['object', 'sx'=>'float', 'sy'=>'float'],
'cairo_matrix_init_translate' => ['object', 'tx'=>'float', 'ty'=>'float'],
'cairo_matrix_invert' => ['void', 'matrix'=>'cairomatrix'],
'cairo_matrix_multiply' => ['CairoMatrix', 'matrix1'=>'cairomatrix', 'matrix2'=>'cairomatrix'],
'cairo_matrix_rotate' => ['', 'matrix'=>'cairomatrix', 'radians'=>'float'],
'cairo_matrix_scale' => ['', 'sx'=>'float', 'sy'=>'float', 'context'=>'cairocontext'],
'cairo_matrix_transform_distance' => ['array', 'matrix'=>'cairomatrix', 'dx'=>'float', 'dy'=>'float'],
'cairo_matrix_transform_point' => ['array', 'matrix'=>'cairomatrix', 'dx'=>'float', 'dy'=>'float'],
'cairo_matrix_translate' => ['void', 'matrix'=>'cairomatrix', 'tx'=>'float', 'ty'=>'float'],
'cairo_move_to' => ['', 'x'=>'string', 'y'=>'string', 'context'=>'cairocontext'],
'cairo_new_path' => ['', 'context'=>'cairocontext'],
'cairo_new_sub_path' => ['', 'context'=>'cairocontext'],
'cairo_paint' => ['', 'context'=>'cairocontext'],
'cairo_paint_with_alpha' => ['', 'alpha'=>'string', 'context'=>'cairocontext'],
'cairo_path_extents' => ['array', 'context'=>'cairocontext'],
'cairo_pattern_add_color_stop_rgb' => ['void', 'pattern'=>'cairogradientpattern', 'offset'=>'float', 'red'=>'float', 'green'=>'float', 'blue'=>'float'],
'cairo_pattern_add_color_stop_rgba' => ['void', 'pattern'=>'cairogradientpattern', 'offset'=>'float', 'red'=>'float', 'green'=>'float', 'blue'=>'float', 'alpha'=>'float'],
'cairo_pattern_create_for_surface' => ['CairoPattern', 'surface'=>'cairosurface'],
'cairo_pattern_create_linear' => ['CairoPattern', 'x0'=>'float', 'y0'=>'float', 'x1'=>'float', 'y1'=>'float'],
'cairo_pattern_create_radial' => ['CairoPattern', 'x0'=>'float', 'y0'=>'float', 'r0'=>'float', 'x1'=>'float', 'y1'=>'float', 'r1'=>'float'],
'cairo_pattern_create_rgb' => ['CairoPattern', 'red'=>'float', 'green'=>'float', 'blue'=>'float'],
'cairo_pattern_create_rgba' => ['CairoPattern', 'red'=>'float', 'green'=>'float', 'blue'=>'float', 'alpha'=>'float'],
'cairo_pattern_get_color_stop_count' => ['int', 'pattern'=>'cairogradientpattern'],
'cairo_pattern_get_color_stop_rgba' => ['array', 'pattern'=>'cairogradientpattern', 'index'=>'int'],
'cairo_pattern_get_extend' => ['int', 'pattern'=>'string'],
'cairo_pattern_get_filter' => ['int', 'pattern'=>'cairosurfacepattern'],
'cairo_pattern_get_linear_points' => ['array', 'pattern'=>'cairolineargradient'],
'cairo_pattern_get_matrix' => ['CairoMatrix', 'pattern'=>'cairopattern'],
'cairo_pattern_get_radial_circles' => ['array', 'pattern'=>'cairoradialgradient'],
'cairo_pattern_get_rgba' => ['array', 'pattern'=>'cairosolidpattern'],
'cairo_pattern_get_surface' => ['CairoSurface', 'pattern'=>'cairosurfacepattern'],
'cairo_pattern_get_type' => ['int', 'pattern'=>'cairopattern'],
'cairo_pattern_set_extend' => ['void', 'pattern'=>'string', 'extend'=>'string'],
'cairo_pattern_set_filter' => ['void', 'pattern'=>'cairosurfacepattern', 'filter'=>'int'],
'cairo_pattern_set_matrix' => ['void', 'pattern'=>'cairopattern', 'matrix'=>'cairomatrix'],
'cairo_pattern_status' => ['int', 'pattern'=>'cairopattern'],
'cairo_pdf_surface_create' => ['CairoPdfSurface', 'file'=>'string', 'width'=>'float', 'height'=>'float'],
'cairo_pdf_surface_set_size' => ['void', 'surface'=>'cairopdfsurface', 'width'=>'float', 'height'=>'float'],
'cairo_pop_group' => ['', 'context'=>'cairocontext'],
'cairo_pop_group_to_source' => ['', 'context'=>'cairocontext'],
'cairo_ps_get_levels' => ['array'],
'cairo_ps_level_to_string' => ['string', 'level'=>'int'],
'cairo_ps_surface_create' => ['CairoPsSurface', 'file'=>'string', 'width'=>'float', 'height'=>'float'],
'cairo_ps_surface_dsc_begin_page_setup' => ['void', 'surface'=>'cairopssurface'],
'cairo_ps_surface_dsc_begin_setup' => ['void', 'surface'=>'cairopssurface'],
'cairo_ps_surface_dsc_comment' => ['void', 'surface'=>'cairopssurface', 'comment'=>'string'],
'cairo_ps_surface_get_eps' => ['bool', 'surface'=>'cairopssurface'],
'cairo_ps_surface_restrict_to_level' => ['void', 'surface'=>'cairopssurface', 'level'=>'int'],
'cairo_ps_surface_set_eps' => ['void', 'surface'=>'cairopssurface', 'level'=>'bool'],
'cairo_ps_surface_set_size' => ['void', 'surface'=>'cairopssurface', 'width'=>'float', 'height'=>'float'],
'cairo_push_group' => ['', 'context'=>'cairocontext'],
'cairo_push_group_with_content' => ['', 'content'=>'string', 'context'=>'cairocontext'],
'cairo_rectangle' => ['', 'x'=>'string', 'y'=>'string', 'width'=>'string', 'height'=>'string', 'context'=>'cairocontext'],
'cairo_rel_curve_to' => ['', 'x1'=>'string', 'y1'=>'string', 'x2'=>'string', 'y2'=>'string', 'x3'=>'string', 'y3'=>'string', 'context'=>'cairocontext'],
'cairo_rel_line_to' => ['', 'x'=>'string', 'y'=>'string', 'context'=>'cairocontext'],
'cairo_rel_move_to' => ['', 'x'=>'string', 'y'=>'string', 'context'=>'cairocontext'],
'cairo_reset_clip' => ['', 'context'=>'cairocontext'],
'cairo_restore' => ['', 'context'=>'cairocontext'],
'cairo_rotate' => ['', 'sx'=>'string', 'sy'=>'string', 'context'=>'cairocontext', 'angle'=>'string'],
'cairo_save' => ['', 'context'=>'cairocontext'],
'cairo_scale' => ['', 'x'=>'string', 'y'=>'string', 'context'=>'cairocontext'],
'cairo_scaled_font_create' => ['CairoScaledFont', 'fontface'=>'cairofontface', 'matrix'=>'cairomatrix', 'ctm'=>'cairomatrix', 'fontoptions'=>'cairofontoptions'],
'cairo_scaled_font_extents' => ['array', 'scaledfont'=>'cairoscaledfont'],
'cairo_scaled_font_get_ctm' => ['CairoMatrix', 'scaledfont'=>'cairoscaledfont'],
'cairo_scaled_font_get_font_face' => ['CairoFontFace', 'scaledfont'=>'cairoscaledfont'],
'cairo_scaled_font_get_font_matrix' => ['CairoFontOptions', 'scaledfont'=>'cairoscaledfont'],
'cairo_scaled_font_get_font_options' => ['CairoFontOptions', 'scaledfont'=>'cairoscaledfont'],
'cairo_scaled_font_get_scale_matrix' => ['CairoMatrix', 'scaledfont'=>'cairoscaledfont'],
'cairo_scaled_font_get_type' => ['int', 'scaledfont'=>'cairoscaledfont'],
'cairo_scaled_font_glyph_extents' => ['array', 'scaledfont'=>'cairoscaledfont', 'glyphs'=>'array'],
'cairo_scaled_font_status' => ['int', 'scaledfont'=>'cairoscaledfont'],
'cairo_scaled_font_text_extents' => ['array', 'scaledfont'=>'cairoscaledfont', 'text'=>'string'],
'cairo_select_font_face' => ['', 'family'=>'string', 'slant='=>'string', 'weight='=>'string', 'context='=>'cairocontext'],
'cairo_set_antialias' => ['', 'antialias='=>'string', 'context='=>'cairocontext'],
'cairo_set_dash' => ['', 'dashes'=>'array', 'offset='=>'string', 'context='=>'cairocontext'],
'cairo_set_fill_rule' => ['', 'setting'=>'string', 'context'=>'cairocontext'],
'cairo_set_font_face' => ['', 'fontface'=>'cairofontface', 'context'=>'cairocontext'],
'cairo_set_font_matrix' => ['', 'matrix'=>'cairomatrix', 'context'=>'cairocontext'],
'cairo_set_font_options' => ['', 'fontoptions'=>'cairofontoptions', 'context'=>'cairocontext'],
'cairo_set_font_size' => ['', 'size'=>'string', 'context'=>'cairocontext'],
'cairo_set_line_cap' => ['', 'setting'=>'string', 'context'=>'cairocontext'],
'cairo_set_line_join' => ['', 'setting'=>'string', 'context'=>'cairocontext'],
'cairo_set_line_width' => ['', 'width'=>'string', 'context'=>'cairocontext'],
'cairo_set_matrix' => ['', 'matrix'=>'cairomatrix', 'context'=>'cairocontext'],
'cairo_set_miter_limit' => ['', 'limit'=>'string', 'context'=>'cairocontext'],
'cairo_set_operator' => ['', 'setting'=>'string', 'context'=>'cairocontext'],
'cairo_set_scaled_font' => ['', 'scaledfont'=>'cairoscaledfont', 'context'=>'cairocontext'],
'cairo_set_source' => ['', 'red'=>'string', 'green'=>'string', 'blue'=>'string', 'alpha'=>'string', 'context'=>'cairocontext', 'pattern'=>'cairopattern'],
'cairo_set_source_surface' => ['', 'surface'=>'cairosurface', 'x='=>'string', 'y='=>'string', 'context='=>'cairocontext'],
'cairo_set_tolerance' => ['', 'tolerance'=>'string', 'context'=>'cairocontext'],
'cairo_show_page' => ['', 'context'=>'cairocontext'],
'cairo_show_text' => ['', 'text'=>'string', 'context'=>'cairocontext'],
'cairo_status' => ['int', 'context'=>'cairocontext'],
'cairo_status_to_string' => ['string', 'status'=>'int'],
'cairo_stroke' => ['', 'context'=>'cairocontext'],
'cairo_stroke_extents' => ['array', 'context'=>'cairocontext'],
'cairo_stroke_preserve' => ['', 'context'=>'cairocontext'],
'cairo_surface_copy_page' => ['void', 'surface'=>'cairosurface'],
'cairo_surface_create_similar' => ['CairoSurface', 'surface'=>'cairosurface', 'content'=>'int', 'width'=>'float', 'height'=>'float'],
'cairo_surface_finish' => ['void', 'surface'=>'cairosurface'],
'cairo_surface_flush' => ['void', 'surface'=>'cairosurface'],
'cairo_surface_get_content' => ['int', 'surface'=>'cairosurface'],
'cairo_surface_get_device_offset' => ['array', 'surface'=>'cairosurface'],
'cairo_surface_get_font_options' => ['CairoFontOptions', 'surface'=>'cairosurface'],
'cairo_surface_get_type' => ['int', 'surface'=>'cairosurface'],
'cairo_surface_mark_dirty' => ['void', 'surface'=>'cairosurface'],
'cairo_surface_mark_dirty_rectangle' => ['void', 'surface'=>'cairosurface', 'x'=>'float', 'y'=>'float', 'width'=>'float', 'height'=>'float'],
'cairo_surface_set_device_offset' => ['void', 'surface'=>'cairosurface', 'x'=>'float', 'y'=>'float'],
'cairo_surface_set_fallback_resolution' => ['void', 'surface'=>'cairosurface', 'x'=>'float', 'y'=>'float'],
'cairo_surface_show_page' => ['void', 'surface'=>'cairosurface'],
'cairo_surface_status' => ['int', 'surface'=>'cairosurface'],
'cairo_surface_write_to_png' => ['void', 'surface'=>'cairosurface', 'stream'=>'resource'],
'cairo_svg_get_versions' => ['array'],
'cairo_svg_surface_create' => ['CairoSvgSurface', 'file'=>'string', 'width'=>'float', 'height'=>'float'],
'cairo_svg_surface_get_versions' => ['array'],
'cairo_svg_surface_restrict_to_version' => ['void', 'surface'=>'cairosvgsurface', 'version'=>'int'],
'cairo_svg_version_to_string' => ['string', 'version'=>'int'],
'cairo_text_extents' => ['array', 'text'=>'string', 'context'=>'cairocontext'],
'cairo_text_path' => ['', 'string'=>'string', 'context'=>'cairocontext', 'text'=>'string'],
'cairo_transform' => ['', 'matrix'=>'cairomatrix', 'context'=>'cairocontext'],
'cairo_translate' => ['', 'tx'=>'string', 'ty'=>'string', 'context'=>'cairocontext', 'x'=>'string', 'y'=>'string'],
'cairo_user_to_device' => ['array', 'x'=>'string', 'y'=>'string', 'context'=>'cairocontext'],
'cairo_user_to_device_distance' => ['array', 'x'=>'string', 'y'=>'string', 'context'=>'cairocontext'],
'cairo_version' => ['int'],
'cairo_version_string' => ['string'],
'CairoContext::__construct' => ['void', 'surface'=>'CairoSurface'],
'CairoContext::appendPath' => ['', 'path'=>'cairopath', 'context'=>'cairocontext'],
'CairoContext::arc' => ['', 'x'=>'float', 'y'=>'float', 'radius'=>'float', 'angle1'=>'float', 'angle2'=>'float', 'context'=>'cairocontext'],
'CairoContext::arcNegative' => ['', 'x'=>'float', 'y'=>'float', 'radius'=>'float', 'angle1'=>'float', 'angle2'=>'float', 'context'=>'cairocontext'],
'CairoContext::clip' => ['', 'context'=>'cairocontext'],
'CairoContext::clipExtents' => ['array', 'context'=>'cairocontext'],
'CairoContext::clipPreserve' => ['', 'context'=>'cairocontext'],
'CairoContext::clipRectangleList' => ['array', 'context'=>'cairocontext'],
'CairoContext::closePath' => ['', 'context'=>'cairocontext'],
'CairoContext::copyPage' => ['', 'context'=>'cairocontext'],
'CairoContext::copyPath' => ['CairoPath', 'context'=>'cairocontext'],
'CairoContext::copyPathFlat' => ['CairoPath', 'context'=>'cairocontext'],
'CairoContext::curveTo' => ['', 'x1'=>'float', 'y1'=>'float', 'x2'=>'float', 'y2'=>'float', 'x3'=>'float', 'y3'=>'float', 'context'=>'cairocontext'],
'CairoContext::deviceToUser' => ['array', 'x'=>'float', 'y'=>'float', 'context'=>'cairocontext'],
'CairoContext::deviceToUserDistance' => ['array', 'x'=>'float', 'y'=>'float', 'context'=>'cairocontext'],
'CairoContext::fill' => ['', 'context'=>'cairocontext'],
'CairoContext::fillExtents' => ['array', 'context'=>'cairocontext'],
'CairoContext::fillPreserve' => ['', 'context'=>'cairocontext'],
'CairoContext::fontExtents' => ['array', 'context'=>'cairocontext'],
'CairoContext::getAntialias' => ['int', 'context'=>'cairocontext'],
'CairoContext::getCurrentPoint' => ['array', 'context'=>'cairocontext'],
'CairoContext::getDash' => ['array', 'context'=>'cairocontext'],
'CairoContext::getDashCount' => ['int', 'context'=>'cairocontext'],
'CairoContext::getFillRule' => ['int', 'context'=>'cairocontext'],
'CairoContext::getFontFace' => ['', 'context'=>'cairocontext'],
'CairoContext::getFontMatrix' => ['', 'context'=>'cairocontext'],
'CairoContext::getFontOptions' => ['', 'context'=>'cairocontext'],
'CairoContext::getGroupTarget' => ['', 'context'=>'cairocontext'],
'CairoContext::getLineCap' => ['int', 'context'=>'cairocontext'],
'CairoContext::getLineJoin' => ['int', 'context'=>'cairocontext'],
'CairoContext::getLineWidth' => ['float', 'context'=>'cairocontext'],
'CairoContext::getMatrix' => ['', 'context'=>'cairocontext'],
'CairoContext::getMiterLimit' => ['float', 'context'=>'cairocontext'],
'CairoContext::getOperator' => ['int', 'context'=>'cairocontext'],
'CairoContext::getScaledFont' => ['', 'context'=>'cairocontext'],
'CairoContext::getSource' => ['', 'context'=>'cairocontext'],
'CairoContext::getTarget' => ['', 'context'=>'cairocontext'],
'CairoContext::getTolerance' => ['float', 'context'=>'cairocontext'],
'CairoContext::glyphPath' => ['', 'glyphs'=>'array', 'context'=>'cairocontext'],
'CairoContext::hasCurrentPoint' => ['bool', 'context'=>'cairocontext'],
'CairoContext::identityMatrix' => ['', 'context'=>'cairocontext'],
'CairoContext::inFill' => ['bool', 'x'=>'string', 'y'=>'string', 'context'=>'cairocontext'],
'CairoContext::inStroke' => ['bool', 'x'=>'string', 'y'=>'string', 'context'=>'cairocontext'],
'CairoContext::lineTo' => ['', 'x'=>'string', 'y'=>'string', 'context'=>'cairocontext'],
'CairoContext::mask' => ['', 'pattern'=>'cairopattern', 'context'=>'cairocontext'],
'CairoContext::maskSurface' => ['', 'surface'=>'cairosurface', 'x='=>'string', 'y='=>'string', 'context='=>'cairocontext'],
'CairoContext::moveTo' => ['', 'x'=>'string', 'y'=>'string', 'context'=>'cairocontext'],
'CairoContext::newPath' => ['', 'context'=>'cairocontext'],
'CairoContext::newSubPath' => ['', 'context'=>'cairocontext'],
'CairoContext::paint' => ['', 'context'=>'cairocontext'],
'CairoContext::paintWithAlpha' => ['', 'alpha'=>'string', 'context'=>'cairocontext'],
'CairoContext::pathExtents' => ['array', 'context'=>'cairocontext'],
'CairoContext::popGroup' => ['', 'context'=>'cairocontext'],
'CairoContext::popGroupToSource' => ['', 'context'=>'cairocontext'],
'CairoContext::pushGroup' => ['', 'context'=>'cairocontext'],
'CairoContext::pushGroupWithContent' => ['', 'content'=>'string', 'context'=>'cairocontext'],
'CairoContext::rectangle' => ['', 'x'=>'string', 'y'=>'string', 'width'=>'string', 'height'=>'string', 'context'=>'cairocontext'],
'CairoContext::relCurveTo' => ['', 'x1'=>'string', 'y1'=>'string', 'x2'=>'string', 'y2'=>'string', 'x3'=>'string', 'y3'=>'string', 'context'=>'cairocontext'],
'CairoContext::relLineTo' => ['', 'x'=>'string', 'y'=>'string', 'context'=>'cairocontext'],
'CairoContext::relMoveTo' => ['', 'x'=>'string', 'y'=>'string', 'context'=>'cairocontext'],
'CairoContext::resetClip' => ['', 'context'=>'cairocontext'],
'CairoContext::restore' => ['', 'context'=>'cairocontext'],
'CairoContext::rotate' => ['', 'angle'=>'string', 'context'=>'cairocontext'],
'CairoContext::save' => ['', 'context'=>'cairocontext'],
'CairoContext::scale' => ['', 'x'=>'string', 'y'=>'string', 'context'=>'cairocontext'],
'CairoContext::selectFontFace' => ['', 'family'=>'string', 'slant='=>'string', 'weight='=>'string', 'context='=>'cairocontext'],
'CairoContext::setAntialias' => ['', 'antialias='=>'string', 'context='=>'cairocontext'],
'CairoContext::setDash' => ['', 'dashes'=>'array', 'offset='=>'string', 'context='=>'cairocontext'],
'CairoContext::setFillRule' => ['', 'setting'=>'string', 'context'=>'cairocontext'],
'CairoContext::setFontFace' => ['', 'fontface'=>'cairofontface', 'context'=>'cairocontext'],
'CairoContext::setFontMatrix' => ['', 'matrix'=>'cairomatrix', 'context'=>'cairocontext'],
'CairoContext::setFontOptions' => ['', 'fontoptions'=>'cairofontoptions', 'context'=>'cairocontext'],
'CairoContext::setFontSize' => ['', 'size'=>'string', 'context'=>'cairocontext'],
'CairoContext::setLineCap' => ['', 'setting'=>'string', 'context'=>'cairocontext'],
'CairoContext::setLineJoin' => ['', 'setting'=>'string', 'context'=>'cairocontext'],
'CairoContext::setLineWidth' => ['', 'width'=>'string', 'context'=>'cairocontext'],
'CairoContext::setMatrix' => ['', 'matrix'=>'cairomatrix', 'context'=>'cairocontext'],
'CairoContext::setMiterLimit' => ['', 'limit'=>'string', 'context'=>'cairocontext'],
'CairoContext::setOperator' => ['', 'setting'=>'string', 'context'=>'cairocontext'],
'CairoContext::setScaledFont' => ['', 'scaledfont'=>'cairoscaledfont', 'context'=>'cairocontext'],
'CairoContext::setSource' => ['', 'pattern'=>'cairopattern', 'context'=>'cairocontext'],
'CairoContext::setSourceRGB' => ['', 'red'=>'string', 'green'=>'string', 'blue'=>'string', 'context'=>'cairocontext', 'pattern'=>'cairopattern'],
'CairoContext::setSourceRGBA' => ['', 'red'=>'string', 'green'=>'string', 'blue'=>'string', 'alpha'=>'string', 'context'=>'cairocontext', 'pattern'=>'cairopattern'],
'CairoContext::setSourceSurface' => ['', 'surface'=>'cairosurface', 'x='=>'string', 'y='=>'string', 'context='=>'cairocontext'],
'CairoContext::setTolerance' => ['', 'tolerance'=>'string', 'context'=>'cairocontext'],
'CairoContext::showPage' => ['', 'context'=>'cairocontext'],
'CairoContext::showText' => ['', 'text'=>'string', 'context'=>'cairocontext'],
'CairoContext::status' => ['int', 'context'=>'cairocontext'],
'CairoContext::stroke' => ['', 'context'=>'cairocontext'],
'CairoContext::strokeExtents' => ['array', 'context'=>'cairocontext'],
'CairoContext::strokePreserve' => ['', 'context'=>'cairocontext'],
'CairoContext::textExtents' => ['array', 'text'=>'string', 'context'=>'cairocontext'],
'CairoContext::textPath' => ['', 'string'=>'string', 'context'=>'cairocontext', 'text'=>'string'],
'CairoContext::transform' => ['', 'matrix'=>'cairomatrix', 'context'=>'cairocontext'],
'CairoContext::translate' => ['', 'x'=>'string', 'y'=>'string', 'context'=>'cairocontext'],
'CairoContext::userToDevice' => ['array', 'x'=>'string', 'y'=>'string', 'context'=>'cairocontext'],
'CairoContext::userToDeviceDistance' => ['array', 'x'=>'string', 'y'=>'string', 'context'=>'cairocontext'],
'CairoFontFace::__construct' => ['void'],
'CairoFontFace::getType' => ['int'],
'CairoFontFace::status' => ['int', 'fontface'=>'cairofontface'],
'CairoFontOptions::__construct' => ['void'],
'CairoFontOptions::equal' => ['bool', 'other'=>'string'],
'CairoFontOptions::getAntialias' => ['int', 'context'=>'cairocontext'],
'CairoFontOptions::getHintMetrics' => ['int'],
'CairoFontOptions::getHintStyle' => ['int'],
'CairoFontOptions::getSubpixelOrder' => ['int'],
'CairoFontOptions::hash' => ['int'],
'CairoFontOptions::merge' => ['void', 'other'=>'string'],
'CairoFontOptions::setAntialias' => ['', 'antialias='=>'string', 'context='=>'cairocontext'],
'CairoFontOptions::setHintMetrics' => ['void', 'hint_metrics'=>'string'],
'CairoFontOptions::setHintStyle' => ['void', 'hint_style'=>'string'],
'CairoFontOptions::setSubpixelOrder' => ['void', 'subpixel_order'=>'string'],
'CairoFontOptions::status' => ['int', 'context'=>'cairocontext'],
'CairoFormat::strideForWidth' => ['int', 'format'=>'int', 'width'=>'int'],
'CairoGradientPattern::addColorStopRgb' => ['void', 'offset'=>'string', 'red'=>'string', 'green'=>'string', 'blue'=>'string'],
'CairoGradientPattern::addColorStopRgba' => ['void', 'offset'=>'string', 'red'=>'string', 'green'=>'string', 'blue'=>'string', 'alpha'=>'string'],
'CairoGradientPattern::getColorStopCount' => ['int'],
'CairoGradientPattern::getColorStopRgba' => ['array', 'index'=>'string'],
'CairoGradientPattern::getExtend' => ['int'],
'CairoGradientPattern::setExtend' => ['void', 'extend'=>'int'],
'CairoImageSurface::__construct' => ['void', 'format'=>'int', 'width'=>'int', 'height'=>'int'],
'CairoImageSurface::createForData' => ['void', 'data'=>'string', 'format'=>'int', 'width'=>'int', 'height'=>'int', 'stride='=>'int'],
'CairoImageSurface::createFromPng' => ['CairoImageSurface', 'file'=>'string'],
'CairoImageSurface::getData' => ['string'],
'CairoImageSurface::getFormat' => ['int'],
'CairoImageSurface::getHeight' => ['int'],
'CairoImageSurface::getStride' => ['int'],
'CairoImageSurface::getWidth' => ['int'],
'CairoLinearGradient::__construct' => ['void', 'x0'=>'float', 'y0'=>'float', 'x1'=>'float', 'y1'=>'float'],
'CairoLinearGradient::getPoints' => ['array'],
'CairoMatrix::__construct' => ['void', 'xx='=>'float', 'yx='=>'float', 'xy='=>'float', 'yy='=>'float', 'x0='=>'float', 'y0='=>'float'],
'CairoMatrix::initIdentity' => ['object'],
'CairoMatrix::initRotate' => ['object', 'radians'=>'float'],
'CairoMatrix::initScale' => ['object', 'sx'=>'float', 'sy'=>'float'],
'CairoMatrix::initTranslate' => ['object', 'tx'=>'float', 'ty'=>'float'],
'CairoMatrix::invert' => ['void'],
'CairoMatrix::multiply' => ['CairoMatrix', 'matrix1'=>'cairomatrix', 'matrix2'=>'cairomatrix'],
'CairoMatrix::rotate' => ['', 'sx'=>'string', 'sy'=>'string', 'context'=>'cairocontext', 'angle'=>'string'],
'CairoMatrix::scale' => ['', 'sx'=>'float', 'sy'=>'float', 'context'=>'cairocontext'],
'CairoMatrix::transformDistance' => ['array', 'dx'=>'string', 'dy'=>'string'],
'CairoMatrix::transformPoint' => ['array', 'dx'=>'string', 'dy'=>'string'],
'CairoMatrix::translate' => ['', 'tx'=>'string', 'ty'=>'string', 'context'=>'cairocontext', 'x'=>'string', 'y'=>'string'],
'CairoPattern::__construct' => ['void'],
'CairoPattern::getMatrix' => ['', 'context'=>'cairocontext'],
'CairoPattern::getType' => ['int'],
'CairoPattern::setMatrix' => ['', 'matrix'=>'cairomatrix', 'context'=>'cairocontext'],
'CairoPattern::status' => ['int', 'context'=>'cairocontext'],
'CairoPdfSurface::__construct' => ['void', 'file'=>'string', 'width'=>'float', 'height'=>'float'],
'CairoPdfSurface::setSize' => ['void', 'width'=>'string', 'height'=>'string'],
'CairoPsSurface::__construct' => ['void', 'file'=>'string', 'width'=>'float', 'height'=>'float'],
'CairoPsSurface::dscBeginPageSetup' => ['void'],
'CairoPsSurface::dscBeginSetup' => ['void'],
'CairoPsSurface::dscComment' => ['void', 'comment'=>'string'],
'CairoPsSurface::getEps' => ['bool'],
'CairoPsSurface::getLevels' => ['array'],
'CairoPsSurface::levelToString' => ['string', 'level'=>'int'],
'CairoPsSurface::restrictToLevel' => ['void', 'level'=>'string'],
'CairoPsSurface::setEps' => ['void', 'level'=>'string'],
'CairoPsSurface::setSize' => ['void', 'width'=>'string', 'height'=>'string'],
'CairoRadialGradient::__construct' => ['void', 'x0'=>'float', 'y0'=>'float', 'r0'=>'float', 'x1'=>'float', 'y1'=>'float', 'r1'=>'float'],
'CairoRadialGradient::getCircles' => ['array'],
'CairoScaledFont::__construct' => ['void', 'font_face'=>'CairoFontFace', 'matrix'=>'CairoMatrix', 'ctm'=>'CairoMatrix', 'options'=>'CairoFontOptions'],
'CairoScaledFont::extents' => ['array'],
'CairoScaledFont::getCtm' => ['CairoMatrix'],
'CairoScaledFont::getFontFace' => ['', 'context'=>'cairocontext'],
'CairoScaledFont::getFontMatrix' => ['', 'context'=>'cairocontext'],
'CairoScaledFont::getFontOptions' => ['', 'context'=>'cairocontext'],
'CairoScaledFont::getScaleMatrix' => ['void'],
'CairoScaledFont::getType' => ['int'],
'CairoScaledFont::glyphExtents' => ['array', 'glyphs'=>'string'],
'CairoScaledFont::status' => ['int', 'context'=>'cairocontext'],
'CairoScaledFont::textExtents' => ['array', 'text'=>'string', 'context'=>'cairocontext'],
'CairoSolidPattern::__construct' => ['void', 'red'=>'float', 'green'=>'float', 'blue'=>'float', 'alpha='=>'float'],
'CairoSolidPattern::getRgba' => ['array'],
'CairoSurface::__construct' => ['void'],
'CairoSurface::copyPage' => ['', 'context'=>'cairocontext'],
'CairoSurface::createSimilar' => ['void', 'other'=>'cairosurface', 'content'=>'int', 'width'=>'string', 'height'=>'string'],
'CairoSurface::finish' => ['void'],
'CairoSurface::flush' => ['void'],
'CairoSurface::getContent' => ['int'],
'CairoSurface::getDeviceOffset' => ['array'],
'CairoSurface::getFontOptions' => ['', 'context'=>'cairocontext'],
'CairoSurface::getType' => ['int'],
'CairoSurface::markDirty' => ['void'],
'CairoSurface::markDirtyRectangle' => ['void', 'x'=>'string', 'y'=>'string', 'width'=>'string', 'height'=>'string'],
'CairoSurface::setDeviceOffset' => ['void', 'x'=>'string', 'y'=>'string'],
'CairoSurface::setFallbackResolution' => ['void', 'x'=>'string', 'y'=>'string'],
'CairoSurface::showPage' => ['', 'context'=>'cairocontext'],
'CairoSurface::status' => ['int', 'context'=>'cairocontext'],
'CairoSurface::writeToPng' => ['void', 'file'=>'string'],
'CairoSurfacePattern::__construct' => ['void', 'surface'=>'CairoSurface'],
'CairoSurfacePattern::getExtend' => ['int'],
'CairoSurfacePattern::getFilter' => ['int'],
'CairoSurfacePattern::getSurface' => ['void'],
'CairoSurfacePattern::setExtend' => ['void', 'extend'=>'int'],
'CairoSurfacePattern::setFilter' => ['void', 'filter'=>'string'],
'CairoSvgSurface::__construct' => ['void', 'file'=>'string', 'width'=>'float', 'height'=>'float'],
'CairoSvgSurface::getVersions' => ['array'],
'CairoSvgSurface::restrictToVersion' => ['void', 'version'=>'string'],
'CairoSvgSurface::versionToString' => ['string', 'version'=>'int'],
'cal_days_in_month' => ['int', 'calendar'=>'int', 'month'=>'int', 'year'=>'int'],
'cal_from_jd' => ['array', 'jd'=>'int', 'calendar'=>'int'],
'cal_info' => ['array', 'calendar='=>'int'],
'cal_to_jd' => ['int', 'calendar'=>'int', 'month'=>'int', 'day'=>'int', 'year'=>'int'],
'calcul_hmac' => ['string', 'clent'=>'string', 'siretcode'=>'string', 'price'=>'string', 'reference'=>'string', 'validity'=>'string', 'taxation'=>'string', 'devise'=>'string', 'language'=>'string'],
'calculhmac' => ['string', 'clent'=>'string', 'data'=>'string'],
'call_user_func' => ['mixed', 'function'=>'callable', '...parameters='=>'mixed'],
'call_user_func_array' => ['mixed', 'function'=>'callable', 'parameters'=>'array<int,mixed>'],
'call_user_method' => ['mixed', 'method_name'=>'string', 'obj'=>'object', 'parameter='=>'mixed', '...args='=>'mixed'],
'call_user_method_array' => ['mixed', 'method_name'=>'string', 'obj'=>'object', 'params'=>'array<int,mixed>'],
'CallbackFilterIterator::__construct' => ['void', 'iterator'=>'Iterator', 'func'=>'callable'],
'CallbackFilterIterator::accept' => ['bool'],
'CallbackFilterIterator::current' => ['mixed'],
'CallbackFilterIterator::getInnerIterator' => ['Iterator'],
'CallbackFilterIterator::key' => ['mixed'],
'CallbackFilterIterator::next' => ['void'],
'CallbackFilterIterator::rewind' => ['void'],
'CallbackFilterIterator::valid' => ['bool'],
'ceil' => ['float|false', 'number'=>'float'],
'chdb::__construct' => ['void', 'pathname'=>'string'],
'chdb::get' => ['string', 'key'=>'string'],
'chdb_create' => ['bool', 'pathname'=>'string', 'data'=>'array'],
'chdir' => ['bool', 'directory'=>'string'],
'checkdate' => ['bool', 'month'=>'int', 'day'=>'int', 'year'=>'int'],
'checkdnsrr' => ['bool', 'host'=>'string', 'type='=>'string'],
'chgrp' => ['bool', 'filename'=>'string', 'group'=>'string|int'],
'chmod' => ['bool', 'filename'=>'string', 'mode'=>'int'],
'chop' => ['string', 'str'=>'string', 'character_mask='=>'string'],
'chown' => ['bool', 'filename'=>'string', 'user'=>'string|int'],
'chr' => ['non-empty-string', 'ascii'=>'int'],
'chroot' => ['bool', 'directory'=>'string'],
'chunk_split' => ['string', 'str'=>'string', 'chunklen='=>'positive-int', 'ending='=>'string'],
'class_alias' => ['bool', 'user_class_name'=>'string', 'alias_name'=>'string', 'autoload='=>'bool'],
'class_exists' => ['bool', 'classname'=>'string', 'autoload='=>'bool'],
'class_implements' => ['array<string,interface-string>|false', 'what'=>'object|string', 'autoload='=>'bool'],
'class_parents' => ['array<string,class-string>|false', 'instance'=>'object|string', 'autoload='=>'bool'],
'class_uses' => ['array<string,trait-string>|false', 'what'=>'object|string', 'autoload='=>'bool'],
'classkit_import' => ['array', 'filename'=>'string'],
'classkit_method_add' => ['bool', 'classname'=>'string', 'methodname'=>'string', 'args'=>'string', 'code'=>'string', 'flags='=>'int'],
'classkit_method_copy' => ['bool', 'dclass'=>'string', 'dmethod'=>'string', 'sclass'=>'string', 'smethod='=>'string'],
'classkit_method_redefine' => ['bool', 'classname'=>'string', 'methodname'=>'string', 'args'=>'string', 'code'=>'string', 'flags='=>'int'],
'classkit_method_remove' => ['bool', 'classname'=>'string', 'methodname'=>'string'],
'classkit_method_rename' => ['bool', 'classname'=>'string', 'methodname'=>'string', 'newname'=>'string'],
'classObj::__construct' => ['void', 'layer'=>'layerObj', 'class'=>'classObj'],
'classObj::addLabel' => ['int', 'label'=>'labelObj'],
'classObj::convertToString' => ['string'],
'classObj::createLegendIcon' => ['imageObj', 'width'=>'int', 'height'=>'int'],
'classObj::deletestyle' => ['int', 'index'=>'int'],
'classObj::drawLegendIcon' => ['int', 'width'=>'int', 'height'=>'int', 'im'=>'imageObj', 'dstX'=>'int', 'dstY'=>'int'],
'classObj::free' => ['void'],
'classObj::getExpressionString' => ['string'],
'classObj::getLabel' => ['labelObj', 'index'=>'int'],
'classObj::getMetaData' => ['int', 'name'=>'string'],
'classObj::getStyle' => ['styleObj', 'index'=>'int'],
'classObj::getTextString' => ['string'],
'classObj::movestyledown' => ['int', 'index'=>'int'],
'classObj::movestyleup' => ['int', 'index'=>'int'],
'classObj::ms_newClassObj' => ['classObj', 'layer'=>'layerObj', 'class'=>'classObj'],
'classObj::removeLabel' => ['labelObj', 'index'=>'int'],
'classObj::removeMetaData' => ['int', 'name'=>'string'],
'classObj::set' => ['int', 'property_name'=>'string', 'new_value'=>''],
'classObj::setExpression' => ['int', 'expression'=>'string'],
'classObj::setMetaData' => ['int', 'name'=>'string', 'value'=>'string'],
'classObj::settext' => ['int', 'text'=>'string'],
'classObj::updateFromString' => ['int', 'snippet'=>'string'],
'clearstatcache' => ['void', 'clear_realpath_cache='=>'bool', 'filename='=>'string'],
'cli_get_process_title' => ['string'],
'cli_set_process_title' => ['bool', 'arg'=>'string'],
'ClosedGeneratorException::__clone' => ['void'],
'ClosedGeneratorException::__toString' => ['string'],
'ClosedGeneratorException::getCode' => ['int'],
'ClosedGeneratorException::getFile' => ['string'],
'ClosedGeneratorException::getLine' => ['int'],
'ClosedGeneratorException::getMessage' => ['string'],
'ClosedGeneratorException::getPrevious' => ['Throwable|ClosedGeneratorException|null'],
'ClosedGeneratorException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'ClosedGeneratorException::getTraceAsString' => ['string'],
'closedir' => ['void', 'dir_handle='=>'resource'],
'closelog' => ['bool'],
'Closure::__construct' => ['void'],
'Closure::__invoke' => ['', '...args='=>''],
'Closure::bind' => ['Closure', 'old'=>'Closure', 'to'=>'?object', 'scope='=>'object|string|null'],
'Closure::bindTo' => ['Closure', 'new'=>'?object', 'newscope='=>'object|string|null'],
'Closure::call' => ['', 'to'=>'object', '...parameters='=>''],
'Closure::fromCallable' => ['Closure', 'callable'=>'callable'],
'clusterObj::convertToString' => ['string'],
'clusterObj::getFilterString' => ['string'],
'clusterObj::getGroupString' => ['string'],
'clusterObj::setFilter' => ['int', 'expression'=>'string'],
'clusterObj::setGroup' => ['int', 'expression'=>'string'],
'Collator::__construct' => ['void', 'locale'=>'string'],
'Collator::asort' => ['bool', '&rw_arr'=>'array', 'sort_flag='=>'int'],
'Collator::compare' => ['int|false', 'str1'=>'string', 'str2'=>'string'],
'Collator::create' => ['?Collator', 'locale'=>'string'],
'Collator::getAttribute' => ['int', 'attr'=>'int'],
'Collator::getErrorCode' => ['int'],
'Collator::getErrorMessage' => ['string'],
'Collator::getLocale' => ['string', 'type'=>'int'],
'Collator::getSortKey' => ['string', 'str'=>'string'],
'Collator::getStrength' => ['int'],
'Collator::setAttribute' => ['bool', 'attr'=>'int', 'val'=>'int'],
'Collator::setStrength' => ['bool', 'strength'=>'int'],
'Collator::sort' => ['bool', '&rw_arr'=>'array', 'sort_flags='=>'int'],
'Collator::sortWithSortKeys' => ['bool', '&rw_arr'=>'array'],
'collator_asort' => ['bool', 'coll'=>'collator', '&rw_arr'=>'array', 'sort_flag='=>'int'],
'collator_compare' => ['int|false', 'coll'=>'collator', 'str1'=>'string', 'str2'=>'string'],
'collator_create' => ['?Collator', 'locale'=>'string'],
'collator_get_attribute' => ['int|false', 'coll'=>'collator', 'attr'=>'int'],
'collator_get_error_code' => ['int|false', 'coll'=>'collator'],
'collator_get_error_message' => ['string|false', 'coll'=>'collator'],
'collator_get_locale' => ['string|false', 'coll'=>'collator', 'type'=>'int'],
'collator_get_sort_key' => ['string|false', 'coll'=>'collator', 'str'=>'string'],
'collator_get_strength' => ['int', 'coll'=>'collator'],
'collator_set_attribute' => ['bool', 'coll'=>'collator', 'attr'=>'int', 'val'=>'int'],
'collator_set_strength' => ['bool', 'coll'=>'collator', 'strength'=>'int'],
'collator_sort' => ['bool', 'coll'=>'collator', '&rw_arr'=>'array', 'sort_flag='=>'int'],
'collator_sort_with_sort_keys' => ['bool', 'coll'=>'collator', '&rw_arr'=>'array'],
'Collectable::isGarbage' => ['bool'],
'colorObj::setHex' => ['int', 'hex'=>'string'],
'colorObj::toHex' => ['string'],
'COM::__call' => ['', 'name'=>'', 'args'=>''],
'COM::__construct' => ['void', 'module_name'=>'string', 'server_name='=>'mixed', 'codepage='=>'int', 'typelib='=>'string'],
'COM::__get' => ['', 'name'=>''],
'COM::__set' => ['', 'name'=>'', 'value'=>''],
'com_addref' => [''],
'com_create_guid' => ['string|false'],
'com_event_sink' => ['bool', 'comobject'=>'object', 'sinkobject'=>'object', 'sinkinterface='=>'mixed'],
'com_get_active_object' => ['object', 'progid'=>'string', 'code_page='=>'int'],
'com_isenum' => ['bool', 'com_module'=>'variant'],
'com_load_typelib' => ['bool', 'typelib_name'=>'string', 'case_insensitive='=>'int'],
'com_message_pump' => ['bool', 'timeoutms='=>'int'],
'com_print_typeinfo' => ['bool', 'comobject_or_typelib'=>'object', 'dispinterface='=>'string', 'wantsink='=>'bool'],
'com_release' => [''],
'compact' => ['array<string, mixed>', '...var_names='=>'string|array'],
'COMPersistHelper::__construct' => ['void', 'com_object'=>'object'],
'COMPersistHelper::GetCurFile' => ['string'],
'COMPersistHelper::GetMaxStreamSize' => ['int'],
'COMPersistHelper::InitNew' => ['int'],
'COMPersistHelper::LoadFromFile' => ['bool', 'filename'=>'string', 'flags'=>'int'],
'COMPersistHelper::LoadFromStream' => ['', 'stream'=>''],
'COMPersistHelper::SaveToFile' => ['bool', 'filename'=>'string', 'remember'=>'bool'],
'COMPersistHelper::SaveToStream' => ['int', 'stream'=>''],
'componere\cast' => ['Type', 'arg1'=>'', 'object'=>''],
'componere\cast_by_ref' => ['Type', 'arg1'=>'', 'object'=>''],
'confirm_pdo_ibm_compiled' => [''],
'connection_aborted' => ['0|1'],
'connection_status' => ['int-mask<CONNECTION_NORMAL|CONNECTION_ABORTED|CONNECTION_TIMEOUT>'],
'connection_timeout' => ['int'],
'constant' => ['mixed', 'const_name'=>'string'],
'convert_cyr_string' => ['string', 'str'=>'string', 'from'=>'string', 'to'=>'string'],
'convert_uudecode' => ['string|false', 'data'=>'string'],
'convert_uuencode' => ['string', 'data'=>'string'],
'copy' => ['bool', 'source_file'=>'string', 'destination_file'=>'string', 'context='=>'resource'],
'cos' => ['float', 'number'=>'float'],
'cosh' => ['float', 'number'=>'float'],
'Couchbase\AnalyticsQuery::__construct' => ['void'],
'Couchbase\AnalyticsQuery::fromString' => ['Couchbase\AnalyticsQuery', 'statement'=>'string'],
'Couchbase\basicDecoderV1' => ['mixed', 'bytes'=>'string', 'flags'=>'int', 'datatype'=>'int', 'options'=>'array'],
'Couchbase\basicEncoderV1' => ['array', 'value'=>'mixed', 'options'=>'array'],
'Couchbase\BooleanFieldSearchQuery::__construct' => ['void'],
'Couchbase\BooleanFieldSearchQuery::boost' => ['Couchbase\BooleanFieldSearchQuery', 'boost'=>'float'],
'Couchbase\BooleanFieldSearchQuery::field' => ['Couchbase\BooleanFieldSearchQuery', 'field'=>'string'],
'Couchbase\BooleanFieldSearchQuery::jsonSerialize' => ['array'],
'Couchbase\BooleanSearchQuery::__construct' => ['void'],
'Couchbase\BooleanSearchQuery::boost' => ['Couchbase\BooleanSearchQuery', 'boost'=>'float'],
'Couchbase\BooleanSearchQuery::jsonSerialize' => ['array'],
'Couchbase\BooleanSearchQuery::must' => ['Couchbase\BooleanSearchQuery', '...queries='=>'array<int,Couchbase\SearchQueryPart>'],
'Couchbase\BooleanSearchQuery::mustNot' => ['Couchbase\BooleanSearchQuery', '...queries='=>'array<int,Couchbase\SearchQueryPart>'],
'Couchbase\BooleanSearchQuery::should' => ['Couchbase\BooleanSearchQuery', '...queries='=>'array<int,Couchbase\SearchQueryPart>'],
'Couchbase\Bucket::__construct' => ['void'],
'Couchbase\Bucket::__get' => ['int', 'name'=>'string'],
'Couchbase\Bucket::__set' => ['int', 'name'=>'string', 'value'=>'int'],
'Couchbase\Bucket::append' => ['Couchbase\Document|array', 'ids'=>'array|string', 'value'=>'mixed', 'options='=>'array'],
'Couchbase\Bucket::counter' => ['Couchbase\Document|array', 'ids'=>'array|string', 'delta='=>'int', 'options='=>'array'],
'Couchbase\Bucket::diag' => ['array', 'reportId='=>'string'],
'Couchbase\Bucket::get' => ['Couchbase\Document|array', 'ids'=>'array|string', 'options='=>'array'],
'Couchbase\Bucket::getAndLock' => ['Couchbase\Document|array', 'ids'=>'array|string', 'lockTime'=>'int', 'options='=>'array'],
'Couchbase\Bucket::getAndTouch' => ['Couchbase\Document|array', 'ids'=>'array|string', 'expiry'=>'int', 'options='=>'array'],
'Couchbase\Bucket::getFromReplica' => ['Couchbase\Document|array', 'ids'=>'array|string', 'options='=>'array'],
'Couchbase\Bucket::insert' => ['Couchbase\Document|array', 'ids'=>'array|string', 'value'=>'mixed', 'options='=>'array'],
'Couchbase\Bucket::listExists' => ['bool', 'id'=>'string', 'value'=>'mixed'],
'Couchbase\Bucket::listGet' => ['mixed', 'id'=>'string', 'index'=>'int'],
'Couchbase\Bucket::listPush' => ['', 'id'=>'string', 'value'=>'mixed'],
'Couchbase\Bucket::listRemove' => ['', 'id'=>'string', 'index'=>'int'],
'Couchbase\Bucket::listSet' => ['', 'id'=>'string', 'index'=>'int', 'value'=>'mixed'],
'Couchbase\Bucket::listShift' => ['', 'id'=>'string', 'value'=>'mixed'],
'Couchbase\Bucket::listSize' => ['int', 'id'=>'string'],
'Couchbase\Bucket::lookupIn' => ['Couchbase\LookupInBuilder', 'id'=>'string'],
'Couchbase\Bucket::manager' => ['Couchbase\BucketManager'],
'Couchbase\Bucket::mapAdd' => ['', 'id'=>'string', 'key'=>'string', 'value'=>'mixed'],
'Couchbase\Bucket::mapGet' => ['mixed', 'id'=>'string', 'key'=>'string'],
'Couchbase\Bucket::mapRemove' => ['', 'id'=>'string', 'key'=>'string'],
'Couchbase\Bucket::mapSize' => ['int', 'id'=>'string'],
'Couchbase\Bucket::mutateIn' => ['Couchbase\MutateInBuilder', 'id'=>'string', 'cas'=>'string'],
'Couchbase\Bucket::ping' => ['array', 'services='=>'int', 'reportId='=>'string'],
'Couchbase\Bucket::prepend' => ['Couchbase\Document|array', 'ids'=>'array|string', 'value'=>'mixed', 'options='=>'array'],
'Couchbase\Bucket::query' => ['object', 'query'=>'Couchbase\AnalyticsQuery|Couchbase\N1qlQuery|Couchbase\SearchQuery|Couchbase\SpatialViewQuery|Couchbase\ViewQuery', 'jsonAsArray='=>'bool|false'],
'Couchbase\Bucket::queueAdd' => ['', 'id'=>'string', 'value'=>'mixed'],
'Couchbase\Bucket::queueExists' => ['bool', 'id'=>'string', 'value'=>'mixed'],
'Couchbase\Bucket::queueRemove' => ['mixed', 'id'=>'string'],
'Couchbase\Bucket::queueSize' => ['int', 'id'=>'string'],
'Couchbase\Bucket::remove' => ['Couchbase\Document|array', 'ids'=>'array|string', 'options='=>'array'],
'Couchbase\Bucket::replace' => ['Couchbase\Document|array', 'ids'=>'array|string', 'value'=>'mixed', 'options='=>'array'],
'Couchbase\Bucket::retrieveIn' => ['Couchbase\DocumentFragment', 'id'=>'string', '...paths='=>'array<int,string>'],
'Couchbase\Bucket::setAdd' => ['', 'id'=>'string', 'value'=>'bool|float|int|string'],
'Couchbase\Bucket::setExists' => ['bool', 'id'=>'string', 'value'=>'bool|float|int|string'],
'Couchbase\Bucket::setRemove' => ['', 'id'=>'string', 'value'=>'bool|float|int|string'],
'Couchbase\Bucket::setSize' => ['int', 'id'=>'string'],
'Couchbase\Bucket::setTranscoder' => ['', 'encoder'=>'callable', 'decoder'=>'callable'],
'Couchbase\Bucket::touch' => ['Couchbase\Document|array', 'ids'=>'array|string', 'expiry'=>'int', 'options='=>'array'],
'Couchbase\Bucket::unlock' => ['Couchbase\Document|array', 'ids'=>'array|string', 'options='=>'array'],
'Couchbase\Bucket::upsert' => ['Couchbase\Document|array', 'ids'=>'array|string', 'value'=>'mixed', 'options='=>'array'],
'Couchbase\BucketManager::__construct' => ['void'],
'Couchbase\BucketManager::createN1qlIndex' => ['', 'name'=>'string', 'fields'=>'array', 'whereClause='=>'string', 'ignoreIfExist='=>'bool|false', 'defer='=>'bool|false'],
'Couchbase\BucketManager::createN1qlPrimaryIndex' => ['', 'customName='=>'string', 'ignoreIfExist='=>'bool|false', 'defer='=>'bool|false'],
'Couchbase\BucketManager::dropN1qlIndex' => ['', 'name'=>'string', 'ignoreIfNotExist='=>'bool|false'],
'Couchbase\BucketManager::dropN1qlPrimaryIndex' => ['', 'customName='=>'string', 'ignoreIfNotExist='=>'bool|false'],
'Couchbase\BucketManager::flush' => [''],
'Couchbase\BucketManager::getDesignDocument' => ['array', 'name'=>'string'],
'Couchbase\BucketManager::info' => ['array'],
'Couchbase\BucketManager::insertDesignDocument' => ['', 'name'=>'string', 'document'=>'array'],
'Couchbase\BucketManager::listDesignDocuments' => ['array'],
'Couchbase\BucketManager::listN1qlIndexes' => ['array'],
'Couchbase\BucketManager::removeDesignDocument' => ['', 'name'=>'string'],
'Couchbase\BucketManager::upsertDesignDocument' => ['', 'name'=>'string', 'document'=>'array'],
'Couchbase\ClassicAuthenticator::bucket' => ['', 'name'=>'string', 'password'=>'string'],
'Couchbase\ClassicAuthenticator::cluster' => ['', 'username'=>'string', 'password'=>'string'],
'Couchbase\Cluster::__construct' => ['void', 'connstr'=>'string'],
'Couchbase\Cluster::authenticate' => ['null', 'authenticator'=>'Couchbase\Authenticator'],
'Couchbase\Cluster::authenticateAs' => ['null', 'username'=>'string', 'password'=>'string'],
'Couchbase\Cluster::manager' => ['Couchbase\ClusterManager', 'username='=>'string', 'password='=>'string'],
'Couchbase\Cluster::openBucket' => ['Couchbase\Bucket', 'name='=>'string', 'password='=>'string'],
'Couchbase\ClusterManager::__construct' => ['void'],
'Couchbase\ClusterManager::createBucket' => ['', 'name'=>'string', 'options='=>'array'],
'Couchbase\ClusterManager::getUser' => ['array', 'username'=>'string', 'domain='=>'int'],
'Couchbase\ClusterManager::info' => ['array'],
'Couchbase\ClusterManager::listBuckets' => ['array'],
'Couchbase\ClusterManager::listUsers' => ['array', 'domain='=>'int'],
'Couchbase\ClusterManager::removeBucket' => ['', 'name'=>'string'],
'Couchbase\ClusterManager::removeUser' => ['', 'name'=>'string', 'domain='=>'int'],
'Couchbase\ClusterManager::upsertUser' => ['', 'name'=>'string', 'settings'=>'Couchbase\UserSettings', 'domain='=>'int'],
'Couchbase\ConjunctionSearchQuery::__construct' => ['void'],
'Couchbase\ConjunctionSearchQuery::boost' => ['Couchbase\ConjunctionSearchQuery', 'boost'=>'float'],
'Couchbase\ConjunctionSearchQuery::every' => ['Couchbase\ConjunctionSearchQuery', '...queries='=>'array<int,Couchbase\SearchQueryPart>'],
'Couchbase\ConjunctionSearchQuery::jsonSerialize' => ['array'],
'Couchbase\DateRangeSearchFacet::__construct' => ['void'],
'Couchbase\DateRangeSearchFacet::addRange' => ['Couchbase\DateSearchFacet', 'name'=>'string', 'start'=>'int|string', 'end'=>'int|string'],
'Couchbase\DateRangeSearchFacet::jsonSerialize' => ['array'],
'Couchbase\DateRangeSearchQuery::__construct' => ['void'],
'Couchbase\DateRangeSearchQuery::boost' => ['Couchbase\DateRangeSearchQuery', 'boost'=>'float'],
'Couchbase\DateRangeSearchQuery::dateTimeParser' => ['Couchbase\DateRangeSearchQuery', 'dateTimeParser'=>'string'],
'Couchbase\DateRangeSearchQuery::end' => ['Couchbase\DateRangeSearchQuery', 'end'=>'int|string', 'inclusive='=>'bool|false'],
'Couchbase\DateRangeSearchQuery::field' => ['Couchbase\DateRangeSearchQuery', 'field'=>'string'],
'Couchbase\DateRangeSearchQuery::jsonSerialize' => ['array'],
'Couchbase\DateRangeSearchQuery::start' => ['Couchbase\DateRangeSearchQuery', 'start'=>'int|string', 'inclusive='=>'bool|true'],
'Couchbase\defaultDecoder' => ['mixed', 'bytes'=>'string', 'flags'=>'int', 'datatype'=>'int'],
'Couchbase\defaultEncoder' => ['array', 'value'=>'mixed'],
'Couchbase\DisjunctionSearchQuery::__construct' => ['void'],
'Couchbase\DisjunctionSearchQuery::boost' => ['Couchbase\DisjunctionSearchQuery', 'boost'=>'float'],
'Couchbase\DisjunctionSearchQuery::either' => ['Couchbase\DisjunctionSearchQuery', '...queries='=>'array<int,Couchbase\SearchQueryPart>'],
'Couchbase\DisjunctionSearchQuery::jsonSerialize' => ['array'],
'Couchbase\DisjunctionSearchQuery::min' => ['Couchbase\DisjunctionSearchQuery', 'min'=>'int'],
'Couchbase\DocIdSearchQuery::__construct' => ['void'],
'Couchbase\DocIdSearchQuery::boost' => ['Couchbase\DocIdSearchQuery', 'boost'=>'float'],
'Couchbase\DocIdSearchQuery::docIds' => ['Couchbase\DocIdSearchQuery', '...documentIds='=>'array<int,string>'],
'Couchbase\DocIdSearchQuery::field' => ['Couchbase\DocIdSearchQuery', 'field'=>'string'],
'Couchbase\DocIdSearchQuery::jsonSerialize' => ['array'],
'Couchbase\fastlzCompress' => ['string', 'data'=>'string'],
'Couchbase\fastlzDecompress' => ['string', 'data'=>'string'],
'Couchbase\GeoBoundingBoxSearchQuery::__construct' => ['void'],
'Couchbase\GeoBoundingBoxSearchQuery::boost' => ['Couchbase\GeoBoundingBoxSearchQuery', 'boost'=>'float'],
'Couchbase\GeoBoundingBoxSearchQuery::field' => ['Couchbase\GeoBoundingBoxSearchQuery', 'field'=>'string'],
'Couchbase\GeoBoundingBoxSearchQuery::jsonSerialize' => ['array'],
'Couchbase\GeoDistanceSearchQuery::__construct' => ['void'],
'Couchbase\GeoDistanceSearchQuery::boost' => ['Couchbase\GeoDistanceSearchQuery', 'boost'=>'float'],
'Couchbase\GeoDistanceSearchQuery::field' => ['Couchbase\GeoDistanceSearchQuery', 'field'=>'string'],
'Couchbase\GeoDistanceSearchQuery::jsonSerialize' => ['array'],
'Couchbase\LookupInBuilder::__construct' => ['void'],
'Couchbase\LookupInBuilder::execute' => ['Couchbase\DocumentFragment'],
'Couchbase\LookupInBuilder::exists' => ['Couchbase\LookupInBuilder', 'path'=>'string', 'options='=>'array'],
'Couchbase\LookupInBuilder::get' => ['Couchbase\LookupInBuilder', 'path'=>'string', 'options='=>'array'],
'Couchbase\LookupInBuilder::getCount' => ['Couchbase\LookupInBuilder', 'path'=>'string', 'options='=>'array'],
'Couchbase\MatchAllSearchQuery::__construct' => ['void'],
'Couchbase\MatchAllSearchQuery::boost' => ['Couchbase\MatchAllSearchQuery', 'boost'=>'float'],
'Couchbase\MatchAllSearchQuery::jsonSerialize' => ['array'],
'Couchbase\MatchNoneSearchQuery::__construct' => ['void'],
'Couchbase\MatchNoneSearchQuery::boost' => ['Couchbase\MatchNoneSearchQuery', 'boost'=>'float'],
'Couchbase\MatchNoneSearchQuery::jsonSerialize' => ['array'],
'Couchbase\MatchPhraseSearchQuery::__construct' => ['void'],
'Couchbase\MatchPhraseSearchQuery::analyzer' => ['Couchbase\MatchPhraseSearchQuery', 'analyzer'=>'string'],
'Couchbase\MatchPhraseSearchQuery::boost' => ['Couchbase\MatchPhraseSearchQuery', 'boost'=>'float'],
'Couchbase\MatchPhraseSearchQuery::field' => ['Couchbase\MatchPhraseSearchQuery', 'field'=>'string'],
'Couchbase\MatchPhraseSearchQuery::jsonSerialize' => ['array'],
'Couchbase\MatchSearchQuery::__construct' => ['void'],
'Couchbase\MatchSearchQuery::analyzer' => ['Couchbase\MatchSearchQuery', 'analyzer'=>'string'],
'Couchbase\MatchSearchQuery::boost' => ['Couchbase\MatchSearchQuery', 'boost'=>'float'],
'Couchbase\MatchSearchQuery::field' => ['Couchbase\MatchSearchQuery', 'field'=>'string'],
'Couchbase\MatchSearchQuery::fuzziness' => ['Couchbase\MatchSearchQuery', 'fuzziness'=>'int'],
'Couchbase\MatchSearchQuery::jsonSerialize' => ['array'],
'Couchbase\MatchSearchQuery::prefixLength' => ['Couchbase\MatchSearchQuery', 'prefixLength'=>'int'],
'Couchbase\MutateInBuilder::__construct' => ['void'],
'Couchbase\MutateInBuilder::arrayAddUnique' => ['Couchbase\MutateInBuilder', 'path'=>'string', 'value'=>'mixed', 'options='=>'array|bool'],
'Couchbase\MutateInBuilder::arrayAppend' => ['Couchbase\MutateInBuilder', 'path'=>'string', 'value'=>'mixed', 'options='=>'array|bool'],
'Couchbase\MutateInBuilder::arrayAppendAll' => ['Couchbase\MutateInBuilder', 'path'=>'string', 'values'=>'array', 'options='=>'array|bool'],
'Couchbase\MutateInBuilder::arrayInsert' => ['Couchbase\MutateInBuilder', 'path'=>'string', 'value'=>'mixed', 'options='=>'array'],
'Couchbase\MutateInBuilder::arrayInsertAll' => ['Couchbase\MutateInBuilder', 'path'=>'string', 'values'=>'array', 'options='=>'array'],
'Couchbase\MutateInBuilder::arrayPrepend' => ['Couchbase\MutateInBuilder', 'path'=>'string', 'value'=>'mixed', 'options='=>'array|bool'],
'Couchbase\MutateInBuilder::arrayPrependAll' => ['Couchbase\MutateInBuilder', 'path'=>'string', 'values'=>'array', 'options='=>'array|bool'],
'Couchbase\MutateInBuilder::counter' => ['Couchbase\MutateInBuilder', 'path'=>'string', 'delta'=>'int', 'options='=>'array|bool'],
'Couchbase\MutateInBuilder::execute' => ['Couchbase\DocumentFragment'],
'Couchbase\MutateInBuilder::insert' => ['Couchbase\MutateInBuilder', 'path'=>'string', 'value'=>'mixed', 'options='=>'array|bool'],
'Couchbase\MutateInBuilder::modeDocument' => ['', 'mode'=>'int'],
'Couchbase\MutateInBuilder::remove' => ['Couchbase\MutateInBuilder', 'path'=>'string', 'options='=>'array'],
'Couchbase\MutateInBuilder::replace' => ['Couchbase\MutateInBuilder', 'path'=>'string', 'value'=>'mixed', 'options='=>'array'],
'Couchbase\MutateInBuilder::upsert' => ['Couchbase\MutateInBuilder', 'path'=>'string', 'value'=>'mixed', 'options='=>'array|bool'],
'Couchbase\MutateInBuilder::withExpiry' => ['Couchbase\MutateInBuilder', 'expiry'=>'Couchbase\expiry'],
'Couchbase\MutationState::__construct' => ['void'],
'Couchbase\MutationState::add' => ['', 'source'=>'Couchbase\Document|Couchbase\DocumentFragment|array'],
'Couchbase\MutationState::from' => ['Couchbase\MutationState', 'source'=>'Couchbase\Document|Couchbase\DocumentFragment|array'],
'Couchbase\MutationToken::__construct' => ['void'],
'Couchbase\MutationToken::bucketName' => ['string'],
'Couchbase\MutationToken::from' => ['', 'bucketName'=>'string', 'vbucketId'=>'int', 'vbucketUuid'=>'string', 'sequenceNumber'=>'string'],
'Couchbase\MutationToken::sequenceNumber' => ['string'],
'Couchbase\MutationToken::vbucketId' => ['int'],
'Couchbase\MutationToken::vbucketUuid' => ['string'],
'Couchbase\N1qlIndex::__construct' => ['void'],
'Couchbase\N1qlQuery::__construct' => ['void'],
'Couchbase\N1qlQuery::adhoc' => ['Couchbase\N1qlQuery', 'adhoc'=>'bool'],
'Couchbase\N1qlQuery::consistency' => ['Couchbase\N1qlQuery', 'consistency'=>'int'],
'Couchbase\N1qlQuery::consistentWith' => ['Couchbase\N1qlQuery', 'state'=>'Couchbase\MutationState'],
'Couchbase\N1qlQuery::crossBucket' => ['Couchbase\N1qlQuery', 'crossBucket'=>'bool'],
'Couchbase\N1qlQuery::fromString' => ['Couchbase\N1qlQuery', 'statement'=>'string'],
'Couchbase\N1qlQuery::maxParallelism' => ['Couchbase\N1qlQuery', 'maxParallelism'=>'int'],
'Couchbase\N1qlQuery::namedParams' => ['Couchbase\N1qlQuery', 'params'=>'array'],
'Couchbase\N1qlQuery::pipelineBatch' => ['Couchbase\N1qlQuery', 'pipelineBatch'=>'int'],
'Couchbase\N1qlQuery::pipelineCap' => ['Couchbase\N1qlQuery', 'pipelineCap'=>'int'],
'Couchbase\N1qlQuery::positionalParams' => ['Couchbase\N1qlQuery', 'params'=>'array'],
'Couchbase\N1qlQuery::readonly' => ['Couchbase\N1qlQuery', 'readonly'=>'bool'],
'Couchbase\N1qlQuery::scanCap' => ['Couchbase\N1qlQuery', 'scanCap'=>'int'],
'Couchbase\NumericRangeSearchFacet::__construct' => ['void'],
'Couchbase\NumericRangeSearchFacet::addRange' => ['Couchbase\NumericSearchFacet', 'name'=>'string', 'min'=>'float', 'max'=>'float'],
'Couchbase\NumericRangeSearchFacet::jsonSerialize' => ['array'],
'Couchbase\NumericRangeSearchQuery::__construct' => ['void'],
'Couchbase\NumericRangeSearchQuery::boost' => ['Couchbase\NumericRangeSearchQuery', 'boost'=>'float'],
'Couchbase\NumericRangeSearchQuery::field' => ['Couchbase\NumericRangeSearchQuery', 'field'=>'string'],
'Couchbase\NumericRangeSearchQuery::jsonSerialize' => ['array'],
'Couchbase\NumericRangeSearchQuery::max' => ['Couchbase\NumericRangeSearchQuery', 'max'=>'float', 'inclusive='=>'bool|false'],
'Couchbase\NumericRangeSearchQuery::min' => ['Couchbase\NumericRangeSearchQuery', 'min'=>'float', 'inclusive='=>'bool|true'],
'Couchbase\passthruDecoder' => ['string', 'bytes'=>'string', 'flags'=>'int', 'datatype'=>'int'],
'Couchbase\passthruEncoder' => ['array', 'value'=>'string'],
'Couchbase\PasswordAuthenticator::password' => ['Couchbase\PasswordAuthenticator', 'password'=>'string'],
'Couchbase\PasswordAuthenticator::username' => ['Couchbase\PasswordAuthenticator', 'username'=>'string'],
'Couchbase\PhraseSearchQuery::__construct' => ['void'],
'Couchbase\PhraseSearchQuery::boost' => ['Couchbase\PhraseSearchQuery', 'boost'=>'float'],
'Couchbase\PhraseSearchQuery::field' => ['Couchbase\PhraseSearchQuery', 'field'=>'string'],
'Couchbase\PhraseSearchQuery::jsonSerialize' => ['array'],
'Couchbase\PrefixSearchQuery::__construct' => ['void'],
'Couchbase\PrefixSearchQuery::boost' => ['Couchbase\PrefixSearchQuery', 'boost'=>'float'],
'Couchbase\PrefixSearchQuery::field' => ['Couchbase\PrefixSearchQuery', 'field'=>'string'],
'Couchbase\PrefixSearchQuery::jsonSerialize' => ['array'],
'Couchbase\QueryStringSearchQuery::__construct' => ['void'],
'Couchbase\QueryStringSearchQuery::boost' => ['Couchbase\QueryStringSearchQuery', 'boost'=>'float'],
'Couchbase\QueryStringSearchQuery::jsonSerialize' => ['array'],
'Couchbase\RegexpSearchQuery::__construct' => ['void'],
'Couchbase\RegexpSearchQuery::boost' => ['Couchbase\RegexpSearchQuery', 'boost'=>'float'],
'Couchbase\RegexpSearchQuery::field' => ['Couchbase\RegexpSearchQuery', 'field'=>'string'],
'Couchbase\RegexpSearchQuery::jsonSerialize' => ['array'],
'Couchbase\SearchQuery::__construct' => ['void', 'indexName'=>'string', 'queryPart'=>'Couchbase\SearchQueryPart'],
'Couchbase\SearchQuery::addFacet' => ['Couchbase\SearchQuery', 'name'=>'string', 'facet'=>'Couchbase\SearchFacet'],
'Couchbase\SearchQuery::boolean' => ['Couchbase\BooleanSearchQuery'],
'Couchbase\SearchQuery::booleanField' => ['Couchbase\BooleanFieldSearchQuery', 'value'=>'bool'],
'Couchbase\SearchQuery::conjuncts' => ['Couchbase\ConjunctionSearchQuery', '...queries='=>'array<int,Couchbase\SearchQueryPart>'],
'Couchbase\SearchQuery::consistentWith' => ['Couchbase\SearchQuery', 'state'=>'Couchbase\MutationState'],
'Couchbase\SearchQuery::dateRange' => ['Couchbase\DateRangeSearchQuery'],
'Couchbase\SearchQuery::dateRangeFacet' => ['Couchbase\DateRangeSearchFacet', 'field'=>'string', 'limit'=>'int'],
'Couchbase\SearchQuery::disjuncts' => ['Couchbase\DisjunctionSearchQuery', '...queries='=>'array<int,Couchbase\SearchQueryPart>'],
'Couchbase\SearchQuery::docId' => ['Couchbase\DocIdSearchQuery', '...documentIds='=>'array<int,string>'],
'Couchbase\SearchQuery::explain' => ['Couchbase\SearchQuery', 'explain'=>'bool'],
'Couchbase\SearchQuery::fields' => ['Couchbase\SearchQuery', '...fields='=>'array<int,string>'],
'Couchbase\SearchQuery::geoBoundingBox' => ['Couchbase\GeoBoundingBoxSearchQuery', 'topLeftLongitude'=>'float', 'topLeftLatitude'=>'float', 'bottomRightLongitude'=>'float', 'bottomRightLatitude'=>'float'],
'Couchbase\SearchQuery::geoDistance' => ['Couchbase\GeoDistanceSearchQuery', 'longitude'=>'float', 'latitude'=>'float', 'distance'=>'string'],
'Couchbase\SearchQuery::highlight' => ['Couchbase\SearchQuery', 'style'=>'string', '...fields='=>'array<int,string>'],
'Couchbase\SearchQuery::jsonSerialize' => ['array'],
'Couchbase\SearchQuery::limit' => ['Couchbase\SearchQuery', 'limit'=>'int'],
'Couchbase\SearchQuery::match' => ['Couchbase\MatchSearchQuery', 'match'=>'string'],
'Couchbase\SearchQuery::matchAll' => ['Couchbase\MatchAllSearchQuery'],
'Couchbase\SearchQuery::matchNone' => ['Couchbase\MatchNoneSearchQuery'],
'Couchbase\SearchQuery::matchPhrase' => ['Couchbase\MatchPhraseSearchQuery', '...terms='=>'array<int,string>'],
'Couchbase\SearchQuery::numericRange' => ['Couchbase\NumericRangeSearchQuery'],
'Couchbase\SearchQuery::numericRangeFacet' => ['Couchbase\NumericRangeSearchFacet', 'field'=>'string', 'limit'=>'int'],
'Couchbase\SearchQuery::prefix' => ['Couchbase\PrefixSearchQuery', 'prefix'=>'string'],
'Couchbase\SearchQuery::queryString' => ['Couchbase\QueryStringSearchQuery', 'queryString'=>'string'],
'Couchbase\SearchQuery::regexp' => ['Couchbase\RegexpSearchQuery', 'regexp'=>'string'],
'Couchbase\SearchQuery::serverSideTimeout' => ['Couchbase\SearchQuery', 'serverSideTimeout'=>'int'],
'Couchbase\SearchQuery::skip' => ['Couchbase\SearchQuery', 'skip'=>'int'],
'Couchbase\SearchQuery::sort' => ['Couchbase\SearchQuery', '...sort='=>'array<int,Couchbase\sort>'],
'Couchbase\SearchQuery::term' => ['Couchbase\TermSearchQuery', 'term'=>'string'],
'Couchbase\SearchQuery::termFacet' => ['Couchbase\TermSearchFacet', 'field'=>'string', 'limit'=>'int'],
'Couchbase\SearchQuery::termRange' => ['Couchbase\TermRangeSearchQuery'],
'Couchbase\SearchQuery::wildcard' => ['Couchbase\WildcardSearchQuery', 'wildcard'=>'string'],
'Couchbase\SpatialViewQuery::__construct' => ['void'],
'Couchbase\SpatialViewQuery::bbox' => ['Couchbase\SpatialViewQuery', 'bbox'=>'array'],
'Couchbase\SpatialViewQuery::consistency' => ['Couchbase\SpatialViewQuery', 'consistency'=>'int'],
'Couchbase\SpatialViewQuery::custom' => ['', 'customParameters'=>'array'],
'Couchbase\SpatialViewQuery::encode' => ['array'],
'Couchbase\SpatialViewQuery::endRange' => ['Couchbase\SpatialViewQuery', 'range'=>'array'],
'Couchbase\SpatialViewQuery::limit' => ['Couchbase\SpatialViewQuery', 'limit'=>'int'],
'Couchbase\SpatialViewQuery::order' => ['Couchbase\SpatialViewQuery', 'order'=>'int'],
'Couchbase\SpatialViewQuery::skip' => ['Couchbase\SpatialViewQuery', 'skip'=>'int'],
'Couchbase\SpatialViewQuery::startRange' => ['Couchbase\SpatialViewQuery', 'range'=>'array'],
'Couchbase\TermRangeSearchQuery::__construct' => ['void'],
'Couchbase\TermRangeSearchQuery::boost' => ['Couchbase\TermRangeSearchQuery', 'boost'=>'float'],
'Couchbase\TermRangeSearchQuery::field' => ['Couchbase\TermRangeSearchQuery', 'field'=>'string'],
'Couchbase\TermRangeSearchQuery::jsonSerialize' => ['array'],
'Couchbase\TermRangeSearchQuery::max' => ['Couchbase\TermRangeSearchQuery', 'max'=>'string', 'inclusive='=>'bool|false'],
'Couchbase\TermRangeSearchQuery::min' => ['Couchbase\TermRangeSearchQuery', 'min'=>'string', 'inclusive='=>'bool|true'],
'Couchbase\TermSearchFacet::__construct' => ['void'],
'Couchbase\TermSearchFacet::jsonSerialize' => ['array'],
'Couchbase\TermSearchQuery::__construct' => ['void'],
'Couchbase\TermSearchQuery::boost' => ['Couchbase\TermSearchQuery', 'boost'=>'float'],
'Couchbase\TermSearchQuery::field' => ['Couchbase\TermSearchQuery', 'field'=>'string'],
'Couchbase\TermSearchQuery::fuzziness' => ['Couchbase\TermSearchQuery', 'fuzziness'=>'int'],
'Couchbase\TermSearchQuery::jsonSerialize' => ['array'],
'Couchbase\TermSearchQuery::prefixLength' => ['Couchbase\TermSearchQuery', 'prefixLength'=>'int'],
'Couchbase\UserSettings::fullName' => ['Couchbase\UserSettings', 'fullName'=>'string'],
'Couchbase\UserSettings::password' => ['Couchbase\UserSettings', 'password'=>'string'],
'Couchbase\UserSettings::role' => ['Couchbase\UserSettings', 'role'=>'string', 'bucket='=>'string'],
'Couchbase\ViewQuery::__construct' => ['void'],
'Couchbase\ViewQuery::consistency' => ['Couchbase\ViewQuery', 'consistency'=>'int'],
'Couchbase\ViewQuery::custom' => ['Couchbase\ViewQuery', 'customParameters'=>'array'],
'Couchbase\ViewQuery::encode' => ['array'],
'Couchbase\ViewQuery::from' => ['Couchbase\ViewQuery', 'designDocumentName'=>'string', 'viewName'=>'string'],
'Couchbase\ViewQuery::fromSpatial' => ['Couchbase\SpatialViewQuery', 'designDocumentName'=>'string', 'viewName'=>'string'],
'Couchbase\ViewQuery::group' => ['Couchbase\ViewQuery', 'group'=>'bool'],
'Couchbase\ViewQuery::groupLevel' => ['Couchbase\ViewQuery', 'groupLevel'=>'int'],
'Couchbase\ViewQuery::idRange' => ['Couchbase\ViewQuery', 'startKeyDocumentId'=>'string', 'endKeyDocumentId'=>'string'],
'Couchbase\ViewQuery::key' => ['Couchbase\ViewQuery', 'key'=>'mixed'],
'Couchbase\ViewQuery::keys' => ['Couchbase\ViewQuery', 'keys'=>'array'],
'Couchbase\ViewQuery::limit' => ['Couchbase\ViewQuery', 'limit'=>'int'],
'Couchbase\ViewQuery::order' => ['Couchbase\ViewQuery', 'order'=>'int'],
'Couchbase\ViewQuery::range' => ['Couchbase\ViewQuery', 'startKey'=>'mixed', 'endKey'=>'mixed', 'inclusiveEnd='=>'bool|false'],
'Couchbase\ViewQuery::reduce' => ['Couchbase\ViewQuery', 'reduce'=>'bool'],
'Couchbase\ViewQuery::skip' => ['Couchbase\ViewQuery', 'skip'=>'int'],
'Couchbase\ViewQueryEncodable::encode' => ['array'],
'Couchbase\WildcardSearchQuery::__construct' => ['void'],
'Couchbase\WildcardSearchQuery::boost' => ['Couchbase\WildcardSearchQuery', 'boost'=>'float'],
'Couchbase\WildcardSearchQuery::field' => ['Couchbase\WildcardSearchQuery', 'field'=>'string'],
'Couchbase\WildcardSearchQuery::jsonSerialize' => ['array'],
'Couchbase\zlibCompress' => ['string', 'data'=>'string'],
'Couchbase\zlibDecompress' => ['string', 'data'=>'string'],
'count' => ['0|positive-int', 'var'=>'Countable|array', 'mode='=>'int'],
'count_chars' => ['mixed', 'input'=>'string', 'mode='=>'0|1|2|3|4'],
'Countable::count' => ['0|positive-int'],
'crack_check' => ['bool', 'dictionary'=>'', 'password'=>'string'],
'crack_closedict' => ['bool', 'dictionary='=>'resource'],
'crack_getlastmessage' => ['string'],
'crack_opendict' => ['resource', 'dictionary'=>'string'],
'crash' => [''],
'crc32' => ['int', 'str'=>'string'],
'create_function' => ['string', 'args'=>'string', 'code'=>'string'],
'crypt' => ['non-empty-string', 'str'=>'string', 'salt='=>'string'],
'ctype_alnum' => ['bool', 'c'=>'mixed'],
'ctype_alpha' => ['bool', 'c'=>'mixed'],
'ctype_cntrl' => ['bool', 'c'=>'mixed'],
'ctype_digit' => ['bool', 'c'=>'mixed'],
'ctype_graph' => ['bool', 'c'=>'mixed'],
'ctype_lower' => ['bool', 'c'=>'mixed'],
'ctype_print' => ['bool', 'c'=>'mixed'],
'ctype_punct' => ['bool', 'c'=>'mixed'],
'ctype_space' => ['bool', 'c'=>'mixed'],
'ctype_upper' => ['bool', 'c'=>'mixed'],
'ctype_xdigit' => ['bool', 'c'=>'mixed'],
'cubrid_affected_rows' => ['int', 'req_identifier='=>''],
'cubrid_bind' => ['bool', 'req_identifier'=>'resource', 'bind_param'=>'int', 'bind_value'=>'mixed', 'bind_value_type='=>'string'],
'cubrid_client_encoding' => ['string', 'conn_identifier='=>''],
'cubrid_close' => ['bool', 'conn_identifier='=>''],
'cubrid_close_prepare' => ['bool', 'req_identifier'=>'resource'],
'cubrid_close_request' => ['bool', 'req_identifier'=>'resource'],
'cubrid_col_get' => ['array', 'conn_identifier'=>'resource', 'oid'=>'string', 'attr_name'=>'string'],
'cubrid_col_size' => ['int', 'conn_identifier'=>'resource', 'oid'=>'string', 'attr_name'=>'string'],
'cubrid_column_names' => ['array', 'req_identifier'=>'resource'],
'cubrid_column_types' => ['array', 'req_identifier'=>'resource'],
'cubrid_commit' => ['bool', 'conn_identifier'=>'resource'],
'cubrid_connect' => ['resource', 'host'=>'string', 'port'=>'int', 'dbname'=>'string', 'userid='=>'string', 'passwd='=>'string'],
'cubrid_connect_with_url' => ['resource', 'conn_url'=>'string', 'userid='=>'string', 'passwd='=>'string'],
'cubrid_current_oid' => ['string', 'req_identifier'=>'resource'],
'cubrid_data_seek' => ['bool', 'req_identifier'=>'', 'row_number'=>'int'],
'cubrid_db_name' => ['string', 'result'=>'array', 'index'=>'int'],
'cubrid_db_parameter' => ['array', 'conn_identifier'=>'resource'],
'cubrid_disconnect' => ['bool', 'conn_identifier'=>'resource'],
'cubrid_drop' => ['bool', 'conn_identifier'=>'resource', 'oid'=>'string'],
'cubrid_errno' => ['int', 'conn_identifier='=>''],
'cubrid_error' => ['string', 'connection='=>''],
'cubrid_error_code' => ['int'],
'cubrid_error_code_facility' => ['int'],
'cubrid_error_msg' => ['string'],
'cubrid_execute' => ['bool', 'conn_identifier'=>'', 'sql'=>'string', 'option='=>'int', 'request_identifier='=>''],
'cubrid_fetch' => ['mixed', 'result'=>'resource', 'type='=>'int'],
'cubrid_fetch_array' => ['array', 'result'=>'', 'type='=>'int'],
'cubrid_fetch_assoc' => ['array', 'result'=>''],
'cubrid_fetch_field' => ['object', 'result'=>'', 'field_offset='=>'int'],
'cubrid_fetch_lengths' => ['array', 'result'=>''],
'cubrid_fetch_object' => ['object', 'result'=>'', 'class_name='=>'string', 'params='=>'array'],
'cubrid_fetch_row' => ['array', 'result'=>''],
'cubrid_field_flags' => ['string', 'result'=>'', 'field_offset'=>'int'],
'cubrid_field_len' => ['int', 'result'=>'', 'field_offset'=>'int'],
'cubrid_field_name' => ['string', 'result'=>'', 'field_offset'=>'int'],
'cubrid_field_seek' => ['bool', 'result'=>'', 'field_offset='=>'int'],
'cubrid_field_table' => ['string', 'result'=>'', 'field_offset'=>'int'],
'cubrid_field_type' => ['string', 'result'=>'', 'field_offset'=>'int'],
'cubrid_free_result' => ['bool', 'req_identifier'=>'resource'],
'cubrid_get' => ['mixed', 'conn_identifier'=>'resource', 'oid'=>'string', 'attr='=>'mixed'],
'cubrid_get_autocommit' => ['bool', 'conn_identifier'=>'resource'],
'cubrid_get_charset' => ['string', 'conn_identifier'=>'resource'],
'cubrid_get_class_name' => ['string', 'conn_identifier'=>'resource', 'oid'=>'string'],
'cubrid_get_client_info' => ['string'],
'cubrid_get_db_parameter' => ['array', 'conn_identifier'=>'resource'],
'cubrid_get_query_timeout' => ['int', 'req_identifier'=>'resource'],
'cubrid_get_server_info' => ['string', 'conn_identifier'=>'resource'],
'cubrid_insert_id' => ['string', 'conn_identifier='=>'resource'],
'cubrid_is_instance' => ['int', 'conn_identifier'=>'resource', 'oid'=>'string'],
'cubrid_list_dbs' => ['array', 'conn_identifier'=>''],
'cubrid_load_from_glo' => ['int', 'conn_identifier'=>'', 'oid'=>'string', 'file_name'=>'string'],
'cubrid_lob2_bind' => ['bool', 'req_identifier'=>'resource', 'bind_index'=>'int', 'bind_value'=>'mixed', 'bind_value_type='=>'string'],
'cubrid_lob2_close' => ['bool', 'lob_identifier'=>'resource'],
'cubrid_lob2_export' => ['bool', 'lob_identifier'=>'resource', 'file_name'=>'string'],
'cubrid_lob2_import' => ['bool', 'lob_identifier'=>'resource', 'file_name'=>'string'],
'cubrid_lob2_new' => ['resource', 'conn_identifier='=>'resource', 'type='=>'string'],
'cubrid_lob2_read' => ['string', 'lob_identifier'=>'resource', 'len'=>'int'],
'cubrid_lob2_seek' => ['bool', 'lob_identifier'=>'resource', 'offset'=>'int', 'origin='=>'int'],
'cubrid_lob2_seek64' => ['bool', 'lob_identifier'=>'resource', 'offset'=>'string', 'origin='=>'int'],
'cubrid_lob2_size' => ['int', 'lob_identifier'=>'resource'],
'cubrid_lob2_size64' => ['string', 'lob_identifier'=>'resource'],
'cubrid_lob2_tell' => ['int', 'lob_identifier'=>'resource'],
'cubrid_lob2_tell64' => ['string', 'lob_identifier'=>'resource'],
'cubrid_lob2_write' => ['bool', 'lob_identifier'=>'resource', 'buf'=>'string'],
'cubrid_lob_close' => ['bool', 'lob_identifier_array'=>'array'],
'cubrid_lob_export' => ['bool', 'conn_identifier'=>'resource', 'lob_identifier'=>'resource', 'path_name'=>'string'],
'cubrid_lob_get' => ['array', 'conn_identifier'=>'resource', 'sql'=>'string'],
'cubrid_lob_send' => ['bool', 'conn_identifier'=>'resource', 'lob_identifier'=>'resource'],
'cubrid_lob_size' => ['string', 'lob_identifier'=>'resource'],
'cubrid_lock_read' => ['bool', 'conn_identifier'=>'resource', 'oid'=>'string'],
'cubrid_lock_write' => ['bool', 'conn_identifier'=>'resource', 'oid'=>'string'],
'cubrid_move_cursor' => ['int', 'req_identifier'=>'resource', 'offset'=>'int', 'origin='=>'int'],
'cubrid_new_glo' => ['string', 'conn_identifier'=>'', 'class_name'=>'string', 'file_name'=>'string'],
'cubrid_next_result' => ['bool', 'result'=>'resource'],
'cubrid_num_cols' => ['int', 'req_identifier'=>'resource'],
'cubrid_num_fields' => ['int', 'result'=>''],
'cubrid_num_rows' => ['int', 'req_identifier'=>'resource'],
'cubrid_pconnect' => ['resource', 'host'=>'string', 'port'=>'int', 'dbname'=>'string', 'userid='=>'string', 'passwd='=>'string'],
'cubrid_pconnect_with_url' => ['resource', 'conn_url'=>'string', 'userid='=>'string', 'passwd='=>'string'],
'cubrid_ping' => ['bool', 'conn_identifier='=>''],
'cubrid_prepare' => ['resource', 'conn_identifier'=>'resource', 'prepare_stmt'=>'string', 'option='=>'int'],
'cubrid_put' => ['bool', 'conn_identifier'=>'resource', 'oid'=>'string', 'attr='=>'string', 'value='=>'mixed'],
'cubrid_query' => ['resource', 'query'=>'string', 'conn_identifier='=>''],
'cubrid_real_escape_string' => ['string', 'unescaped_string'=>'string', 'conn_identifier='=>''],
'cubrid_result' => ['string', 'result'=>'', 'row'=>'int', 'field='=>''],
'cubrid_rollback' => ['bool', 'conn_identifier'=>'resource'],
'cubrid_save_to_glo' => ['int', 'conn_identifier'=>'', 'oid'=>'string', 'file_name'=>'string'],
'cubrid_schema' => ['array', 'conn_identifier'=>'resource', 'schema_type'=>'int', 'class_name='=>'string', 'attr_name='=>'string'],
'cubrid_send_glo' => ['int', 'conn_identifier'=>'', 'oid'=>'string'],
'cubrid_seq_drop' => ['bool', 'conn_identifier'=>'resource', 'oid'=>'string', 'attr_name'=>'string', 'index'=>'int'],
'cubrid_seq_insert' => ['bool', 'conn_identifier'=>'resource', 'oid'=>'string', 'attr_name'=>'string', 'index'=>'int', 'seq_element'=>'string'],
'cubrid_seq_put' => ['bool', 'conn_identifier'=>'resource', 'oid'=>'string', 'attr_name'=>'string', 'index'=>'int', 'seq_element'=>'string'],
'cubrid_set_add' => ['bool', 'conn_identifier'=>'resource', 'oid'=>'string', 'attr_name'=>'string', 'set_element'=>'string'],
'cubrid_set_autocommit' => ['bool', 'conn_identifier'=>'resource', 'mode'=>'bool'],
'cubrid_set_db_parameter' => ['bool', 'conn_identifier'=>'resource', 'param_type'=>'int', 'param_value'=>'int'],
'cubrid_set_drop' => ['bool', 'conn_identifier'=>'resource', 'oid'=>'string', 'attr_name'=>'string', 'set_element'=>'string'],
'cubrid_set_query_timeout' => ['bool', 'req_identifier'=>'resource', 'timeout'=>'int'],
'cubrid_unbuffered_query' => ['resource', 'query'=>'string', 'conn_identifier='=>''],
'cubrid_version' => ['string'],
'curl_close' => ['void', 'ch'=>'resource'],
'curl_copy_handle' => ['resource|false', 'ch'=>'resource'],
'curl_errno' => ['int', 'ch'=>'resource'],
'curl_error' => ['string', 'ch'=>'resource'],
'curl_escape' => ['string|false', 'ch'=>'resource', 'str'=>'string'],
'curl_exec' => ['bool|string', 'ch'=>'resource'],
'curl_file_create' => ['CURLFile', 'filename'=>'string', 'mimetype='=>'string', 'postfilename='=>'string'],
'curl_getinfo' => ['mixed', 'ch'=>'resource', 'option='=>'int'],
'curl_init' => ['resource|false', 'url='=>'string'],
'curl_multi_add_handle' => ['int', 'mh'=>'resource', 'ch'=>'resource'],
'curl_multi_close' => ['void', 'mh'=>'resource'],
'curl_multi_errno' => ['int', 'mh'=>'resource'],
'curl_multi_exec' => ['int', 'mh'=>'resource', '&w_still_running'=>'int'],
'curl_multi_getcontent' => ['string', 'ch'=>'resource'],
'curl_multi_info_read' => ['array|false', 'mh'=>'resource', '&w_msgs_in_queue='=>'int'],
'curl_multi_init' => ['resource|false'],
'curl_multi_remove_handle' => ['int', 'mh'=>'resource', 'ch'=>'resource'],
'curl_multi_select' => ['int', 'mh'=>'resource', 'timeout='=>'float'],
'curl_multi_setopt' => ['bool', 'mh'=>'resource', 'option'=>'int', 'value'=>'mixed'],
'curl_multi_strerror' => ['string', 'code'=>'int'],
'curl_pause' => ['int', 'ch'=>'resource', 'bitmask'=>'int'],
'curl_reset' => ['void', 'ch'=>'resource'],
'curl_setopt' => ['bool', 'ch'=>'resource', 'option'=>'int', 'value'=>'mixed'],
'curl_setopt_array' => ['bool', 'ch'=>'resource', 'options'=>'array'],
'curl_share_close' => ['void', 'sh'=>'resource'],
'curl_share_errno' => ['int', 'sh'=>'resource'],
'curl_share_init' => ['resource'],
'curl_share_setopt' => ['bool', 'sh'=>'resource', 'option'=>'int', 'value'=>'mixed'],
'curl_share_strerror' => ['string', 'code'=>'int'],
'curl_strerror' => ['string', 'code'=>'int'],
'curl_unescape' => ['string|false', 'ch'=>'resource', 'str'=>'string'],
'curl_version' => ['array|false', 'version='=>'int'],
'CURLFile::__construct' => ['void', 'filename'=>'string', 'mimetype='=>'string', 'postfilename='=>'string'],
'CURLFile::__wakeup' => ['void'],
'CURLFile::getFilename' => ['string'],
'CURLFile::getMimeType' => ['string'],
'CURLFile::getPostFilename' => ['string'],
'CURLFile::setMimeType' => ['void', 'mime'=>'string'],
'CURLFile::setPostFilename' => ['void', 'name'=>'string'],
'current' => ['mixed', 'array_arg'=>'array|object'],
'cyrus_authenticate' => ['void', 'connection'=>'resource', 'mechlist='=>'string', 'service='=>'string', 'user='=>'string', 'minssf='=>'int', 'maxssf='=>'int', 'authname='=>'string', 'password='=>'string'],
'cyrus_bind' => ['bool', 'connection'=>'resource', 'callbacks'=>'array'],
'cyrus_close' => ['bool', 'connection'=>'resource'],
'cyrus_connect' => ['resource', 'host='=>'string', 'port='=>'string', 'flags='=>'int'],
'cyrus_query' => ['array', 'connection'=>'resource', 'query'=>'string'],
'cyrus_unbind' => ['bool', 'connection'=>'resource', 'trigger_name'=>'string'],
'date' => ['string', 'format'=>'string', 'timestamp='=>'int'],
'date_add' => ['DateTime|false', 'object'=>'', 'interval'=>''],
'date_create' => ['DateTime|false', 'time='=>'string|null', 'timezone='=>'?\DateTimeZone'],
'date_create_from_format' => ['DateTime|false', 'format'=>'string', 'time'=>'string', 'timezone='=>'?\DateTimeZone'],
'date_create_immutable' => ['DateTimeImmutable|false', 'time='=>'string', 'timezone='=>'?\DateTimeZone'],
'date_create_immutable_from_format' => ['DateTimeImmutable|false', 'format'=>'string', 'time'=>'string', 'timezone='=>'?\DateTimeZone'],
'date_date_set' => ['DateTime|false', 'object'=>'', 'year'=>'', 'month'=>'', 'day'=>''],
'date_default_timezone_get' => ['string'],
'date_default_timezone_set' => ['bool', 'timezone_identifier'=>'string'],
'date_diff' => ['DateInterval', 'obj1'=>'DateTimeInterface', 'obj2'=>'DateTimeInterface', 'absolute='=>'bool'],
'date_format' => ['string', 'obj'=>'DateTimeInterface', 'format'=>'string'],
'date_get_last_errors' => ['array{warning_count: int, warnings: array<int, string>, error_count: int, errors: array<int, string>}|false'],
'date_interval_create_from_date_string' => ['DateInterval|false', 'time'=>'string'],
'date_interval_format' => ['string', 'object'=>'DateInterval', 'format'=>'string'],
'date_isodate_set' => ['DateTime|false', 'object'=>'DateTime', 'year'=>'int', 'week'=>'int', 'day='=>'int|mixed'],
'date_modify' => ['DateTime|false', 'object'=>'DateTime', 'modify'=>'string'],
'date_offset_get' => ['int', 'obj'=>'DateTimeInterface'],
'date_parse' => ['array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type?: int|bool, zone?: int|bool, is_dst?: bool, tz_abbr?: string, tz_id?: string, relative?: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday?: int, weekdays?: int, first_day_of_month?: bool, last_day_of_month?: bool}}', 'date'=>'string'],
'date_parse_from_format' => ['array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type?: int|bool, zone?: int|bool, is_dst?: bool, tz_abbr?: string, tz_id?: string, relative?: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday?: int, weekdays?: int, first_day_of_month?: bool, last_day_of_month?: bool}}', 'format'=>'string', 'date'=>'string'],
'date_sub' => ['DateTime|false', 'object'=>'DateTime', 'interval'=>'DateInterval'],
'date_sun_info' => ['array', 'time'=>'int', 'latitude'=>'float', 'longitude'=>'float'],
'date_sunrise' => ['mixed', 'time'=>'int', 'format='=>'int', 'latitude='=>'float', 'longitude='=>'float', 'zenith='=>'float', 'gmt_offset='=>'float'],
'date_sunset' => ['mixed', 'time'=>'int', 'format='=>'int', 'latitude='=>'float', 'longitude='=>'float', 'zenith='=>'float', 'gmt_offset='=>'float'],
'date_time_set' => ['DateTime|false', 'object'=>'', 'hour'=>'', 'minute'=>'', 'second='=>'', 'microseconds='=>''],
'date_timestamp_get' => ['int', 'obj'=>'DateTimeInterface'],
'date_timestamp_set' => ['DateTime|false', 'object'=>'DateTime', 'unixtimestamp'=>'int'],
'date_timezone_get' => ['DateTimeZone|false', 'obj'=>'DateTimeInterface'],
'date_timezone_set' => ['DateTime|false', 'object'=>'DateTime', 'timezone'=>'DateTimeZone'],
'datefmt_create' => ['IntlDateFormatter|false', 'locale'=>'?string', 'datetype'=>'?int', 'timetype'=>'?int', 'timezone='=>'string|DateTimeZone|IntlTimeZone|null', 'calendar='=>'int|IntlCalendar|null', 'pattern='=>'string'],
'datefmt_format' => ['string|false', 'fmt'=>'IntlDateFormatter', 'value'=>'DateTime|IntlCalendar|array|int'],
'datefmt_format_object' => ['string|false', 'object'=>'object', 'format='=>'mixed', 'locale='=>'string'],
'datefmt_get_calendar' => ['int|false', 'fmt'=>'IntlDateFormatter'],
'datefmt_get_calendar_object' => ['IntlCalendar|false', 'fmt'=>'IntlDateFormatter'],
'datefmt_get_datetype' => ['int|false', 'fmt'=>'IntlDateFormatter'],
'datefmt_get_error_code' => ['int', 'fmt'=>'IntlDateFormatter'],
'datefmt_get_error_message' => ['string', 'fmt'=>'IntlDateFormatter'],
'datefmt_get_locale' => ['string|false', 'fmt'=>'IntlDateFormatter', 'which='=>'int'],
'datefmt_get_pattern' => ['string|false', 'fmt'=>'IntlDateFormatter'],
'datefmt_get_timetype' => ['int|false', 'fmt'=>'IntlDateFormatter'],
'datefmt_get_timezone' => ['IntlTimeZone|false'],
'datefmt_get_timezone_id' => ['string|false', 'fmt'=>'IntlDateFormatter'],
'datefmt_is_lenient' => ['bool', 'fmt'=>'IntlDateFormatter'],
'datefmt_localtime' => ['array|bool|false', 'fmt'=>'IntlDateFormatter', 'text_to_parse='=>'string', '&rw_parse_pos='=>'int'],
'datefmt_parse' => ['int|false', 'fmt'=>'IntlDateFormatter', 'text_to_parse='=>'string', '&rw_parse_pos='=>'int'],
'datefmt_set_calendar' => ['bool', 'fmt'=>'IntlDateFormatter', 'which'=>'int'],
'datefmt_set_lenient' => ['?bool', 'fmt'=>'IntlDateFormatter', 'lenient'=>'bool'],
'datefmt_set_pattern' => ['bool', 'fmt'=>'IntlDateFormatter', 'pattern'=>'string'],
'datefmt_set_timezone' => ['bool', 'zone'=>'mixed'],
'datefmt_set_timezone_id' => ['bool', 'fmt'=>'IntlDateFormatter', 'zone'=>'string'],
'DateInterval::__construct' => ['void', 'spec'=>'string'],
'DateInterval::__set_state' => ['DateInterval', 'array'=>'array'],
'DateInterval::__wakeup' => ['void'],
'DateInterval::createFromDateString' => ['DateInterval|false', 'time'=>'string'],
'DateInterval::format' => ['string', 'format'=>'string'],
'DatePeriod::__construct' => ['void', 'start'=>'DateTimeInterface', 'interval'=>'DateInterval', 'recur'=>'int', 'options='=>'int'],
'DatePeriod::__construct\'1' => ['void', 'start'=>'DateTimeInterface', 'interval'=>'DateInterval', 'end'=>'DateTimeInterface', 'options='=>'int'],
'DatePeriod::__construct\'2' => ['void', 'iso'=>'string', 'options='=>'int'],
'DatePeriod::__wakeup' => ['void'],
'DatePeriod::getDateInterval' => ['DateInterval'],
'DatePeriod::getEndDate' => ['?DateTimeInterface'],
'DatePeriod::getStartDate' => ['DateTimeInterface'],
'DateTime::__construct' => ['void', 'time='=>'string', 'timezone='=>'?DateTimeZone'],
'DateTime::__set_state' => ['static', 'array'=>'array'],
'DateTime::__wakeup' => ['void'],
'DateTime::add' => ['static', 'interval'=>'DateInterval'],
'DateTime::createFromFormat' => ['static|false', 'format'=>'string', 'time'=>'string', 'timezone='=>'DateTimeZone|null'],
'DateTime::createFromImmutable' => ['static', 'object'=>'DateTimeImmutable'],
'DateTime::diff' => ['DateInterval', 'datetime2'=>'DateTimeInterface', 'absolute='=>'bool'],
'DateTime::format' => ['string', 'format'=>'string'],
'DateTime::getLastErrors' => ['array{warning_count: int, warnings: array<int, string>, error_count: int, errors: array<int, string>}|false'],
'DateTime::getOffset' => ['int'],
'DateTime::getTimestamp' => ['int'],
'DateTime::getTimezone' => ['DateTimeZone'],
'DateTime::modify' => ['__benevolent<static|false>', 'modify'=>'string'],
'DateTime::setDate' => ['static', 'year'=>'int', 'month'=>'int', 'day'=>'int'],
'DateTime::setISODate' => ['static', 'year'=>'int', 'week'=>'int', 'day='=>'int'],
'DateTime::setTime' => ['static', 'hour'=>'int', 'minute'=>'int', 'second='=>'int', 'microseconds='=>'int'],
'DateTime::setTimestamp' => ['static', 'unixtimestamp'=>'int'],
'DateTime::setTimezone' => ['static', 'timezone'=>'DateTimeZone'],
'DateTime::sub' => ['static', 'interval'=>'DateInterval'],
'DateTimeImmutable::__construct' => ['void', 'time='=>'string', 'timezone='=>'?DateTimeZone'],
'DateTimeImmutable::__set_state' => ['static', 'array'=>'array'],
'DateTimeImmutable::__wakeup' => ['void'],
'DateTimeImmutable::add' => ['static', 'interval'=>'DateInterval'],
'DateTimeImmutable::createFromFormat' => ['static|false', 'format'=>'string', 'time'=>'string', 'timezone='=>'DateTimeZone|null'],
'DateTimeImmutable::createFromMutable' => ['static', 'datetime'=>'DateTime'],
'DateTimeImmutable::diff' => ['DateInterval', 'datetime2'=>'DateTimeInterface', 'absolute='=>'bool'],
'DateTimeImmutable::format' => ['string', 'format'=>'string'],
'DateTimeImmutable::getLastErrors' => ['array{warning_count: int, warnings: array<int, string>, error_count: int, errors: array<int, string>}|false'],
'DateTimeImmutable::getOffset' => ['int'],
'DateTimeImmutable::getTimestamp' => ['int'],
'DateTimeImmutable::getTimezone' => ['DateTimeZone'],
'DateTimeImmutable::modify' => ['__benevolent<static|false>', 'modify'=>'string'],
'DateTimeImmutable::setDate' => ['static', 'year'=>'int', 'month'=>'int', 'day'=>'int'],
'DateTimeImmutable::setISODate' => ['static', 'year'=>'int', 'week'=>'int', 'day='=>'int'],
'DateTimeImmutable::setTime' => ['static', 'hour'=>'int', 'minute'=>'int', 'second='=>'int', 'microseconds='=>'int'],
'DateTimeImmutable::setTimestamp' => ['static', 'unixtimestamp'=>'int'],
'DateTimeImmutable::setTimezone' => ['static', 'timezone'=>'DateTimeZone'],
'DateTimeImmutable::sub' => ['static', 'interval'=>'DateInterval'],
'DateTimeInterface::diff' => ['DateInterval', 'datetime2'=>'DateTimeInterface', 'absolute='=>'bool'],
'DateTimeInterface::format' => ['string', 'format'=>'string'],
'DateTimeInterface::getOffset' => ['int'],
'DateTimeInterface::getTimestamp' => ['int'],
'DateTimeInterface::getTimezone' => ['DateTimeZone'],
'DateTimeZone::__construct' => ['void', 'timezone'=>'string'],
'DateTimeZone::__set_state' => ['DateTimeZone', 'array'=>'array'],
'DateTimeZone::__wakeup' => ['void'],
'DateTimeZone::getLocation' => ['array{country_code: string, latitude: float, longitude: float, comments: string}|false'],
'DateTimeZone::getName' => ['string'],
'DateTimeZone::getOffset' => ['int', 'datetime'=>'DateTimeInterface'],
'DateTimeZone::getTransitions' => ['list<array{ts: int, time: string, offset: int, isdst: bool, abbr: string}>', 'timestamp_begin='=>'int', 'timestamp_end='=>'int'],
'DateTimeZone::listAbbreviations' => ['array<string, list<array{dst: bool, offset: int, timezone_id: string|null}>>'],
'DateTimeZone::listIdentifiers' => ['list<string>', 'what='=>'int', 'country='=>'string'],
'db2_autocommit' => ['DB2_AUTOCOMMIT_OFF|DB2_AUTOCOMMIT_ON|bool', 'connection'=>'resource', 'value='=>'DB2_AUTOCOMMIT_OFF|DB2_AUTOCOMMIT_ON'],
'db2_bind_param' => ['bool', 'stmt'=>'resource', 'parameter_number'=>'int', 'variable_name'=>'string', 'parameter_type='=>'int', 'data_type='=>'int', 'precision='=>'int', 'scale='=>'int'],
'db2_client_info' => ['stdClass|false', 'connection'=>'resource'],
'db2_close' => ['bool', 'connection'=>'resource'],
'db2_column_privileges' => ['resource|false', 'connection'=>'resource', 'qualifier='=>'string', 'schema='=>'string', 'table_name='=>'string', 'column_name='=>'string'],
'db2_columns' => ['resource|false', 'connection'=>'resource', 'qualifier='=>'string', 'schema='=>'string', 'table_name='=>'string', 'column_name='=>'string'],
'db2_commit' => ['bool', 'connection'=>'resource'],
'db2_conn_error' => ['string', 'connection='=>'resource'],
'db2_conn_errormsg' => ['string', 'connection='=>'resource'],
'db2_connect' => ['resource|false', 'database'=>'string', 'username'=>'string', 'password'=>'string', 'options='=>'array'],
'db2_cursor_type' => ['int', 'stmt'=>'resource'],
'db2_escape_string' => ['string', 'string_literal'=>'string'],
'db2_exec' => ['resource|false', 'connection'=>'resource', 'statement'=>'string', 'options='=>'array'],
'db2_execute' => ['bool', 'stmt'=>'resource', 'parameters='=>'array'],
'db2_fetch_array' => ['array|false', 'stmt'=>'resource', 'row_number='=>'int'],
'db2_fetch_assoc' => ['array|false', 'stmt'=>'resource', 'row_number='=>'int'],
'db2_fetch_both' => ['array|false', 'stmt'=>'resource', 'row_number='=>'int'],
'db2_fetch_object' => ['stdClass|false', 'stmt'=>'resource', 'row_number='=>'int'],
'db2_fetch_row' => ['bool', 'stmt'=>'resource', 'row_number='=>'int'],
'db2_field_display_size' => ['int|false', 'stmt'=>'resource', 'column'=>'mixed'],
'db2_field_name' => ['string|false', 'stmt'=>'resource', 'column'=>'mixed'],
'db2_field_num' => ['int|false', 'stmt'=>'resource', 'column'=>'mixed'],
'db2_field_precision' => ['int|false', 'stmt'=>'resource', 'column'=>'mixed'],
'db2_field_scale' => ['int|false', 'stmt'=>'resource', 'column'=>'mixed'],
'db2_field_type' => ['string|false', 'stmt'=>'resource', 'column'=>'mixed'],
'db2_field_width' => ['int|false', 'stmt'=>'resource', 'column'=>'mixed'],
'db2_foreign_keys' => ['resource|false', 'connection'=>'resource', 'qualifier'=>'string', 'schema'=>'string', 'table_name'=>'string'],
'db2_free_result' => ['bool', 'stmt'=>'resource'],
'db2_free_stmt' => ['bool', 'stmt'=>'resource'],
'db2_get_option' => ['string|false', 'resource'=>'resource', 'option'=>'string'],
'db2_last_insert_id' => ['string|null', 'resource'=>'resource'],
'db2_lob_read' => ['string|false', 'stmt'=>'resource', 'colnum'=>'int', 'length'=>'int'],
'db2_next_result' => ['resource|false', 'stmt'=>'resource'],
'db2_num_fields' => ['0|positive-int|false', 'stmt'=>'resource'],
'db2_num_rows' => ['0|positive-int', 'stmt'=>'resource'],
'db2_pclose' => ['bool', 'resource'=>'resource'],
'db2_pconnect' => ['resource|false', 'database'=>'string', 'username'=>'string', 'password'=>'string', 'options='=>'array'],
'db2_prepare' => ['resource|false', 'connection'=>'resource', 'statement'=>'string', 'options='=>'array'],
'db2_primary_keys' => ['resource|false', 'connection'=>'resource', 'qualifier'=>'string', 'schema'=>'string', 'table_name'=>'string'],
'db2_primarykeys' => [''],
'db2_procedure_columns' => ['resource|false', 'connection'=>'resource', 'qualifier'=>'string', 'schema'=>'string', 'procedure'=>'string', 'parameter'=>'string'],
'db2_procedurecolumns' => [''],
'db2_procedures' => ['resource|false', 'connection'=>'resource', 'qualifier'=>'string', 'schema'=>'string', 'procedure'=>'string'],
'db2_result' => ['mixed', 'stmt'=>'resource', 'column'=>'mixed'],
'db2_rollback' => ['bool', 'connection'=>'resource'],
'db2_server_info' => ['stdClass|false', 'connection'=>'resource'],
'db2_set_option' => ['bool', 'resource'=>'resource', 'options'=>'array', 'type'=>'int'],
'db2_setoption' => [''],
'db2_special_columns' => ['resource|false', 'connection'=>'resource', 'qualifier'=>'string', 'schema'=>'string', 'table_name'=>'string', 'scope'=>'int'],
'db2_specialcolumns' => [''],
'db2_statistics' => ['resource|false', 'connection'=>'resource', 'qualifier'=>'string', 'schema'=>'string', 'table_name'=>'string', 'unique'=>'bool'],
'db2_stmt_error' => ['string', 'stmt='=>'resource'],
'db2_stmt_errormsg' => ['string', 'stmt='=>'resource'],
'db2_table_privileges' => ['resource|false', 'connection'=>'resource', 'qualifier='=>'string', 'schema='=>'string', 'table_name='=>'string'],
'db2_tableprivileges' => [''],
'db2_tables' => ['resource|false', 'connection'=>'resource', 'qualifier='=>'string', 'schema='=>'string', 'table_name='=>'string', 'table_type='=>'string'],
'dba_close' => ['void', 'handle'=>'resource'],
'dba_delete' => ['bool', 'key'=>'string', 'handle'=>'resource'],
'dba_exists' => ['bool', 'key'=>'string', 'handle'=>'resource'],
'dba_fetch' => ['string|false', 'key'=>'string', 'skip'=>'int', 'handle'=>'resource'],
'dba_fetch\'1' => ['string|false', 'key'=>'string', 'handle'=>'resource'],
'dba_firstkey' => ['string|false', 'handle'=>'resource'],
'dba_handlers' => ['array', 'full_info='=>'bool'],
'dba_insert' => ['bool', 'key'=>'string', 'value'=>'string', 'handle'=>'resource'],
'dba_key_split' => ['array|false', 'key'=>'string'],
'dba_list' => ['array'],
'dba_nextkey' => ['string|false', 'handle'=>'resource'],
'dba_open' => ['resource|false', 'path'=>'string', 'mode'=>'string', 'handlername='=>'string', '...args='=>'string'],
'dba_optimize' => ['bool', 'handle'=>'resource'],
'dba_popen' => ['resource|false', 'path'=>'string', 'mode'=>'string', 'handlername='=>'string', '...args='=>'string'],
'dba_replace' => ['bool', 'key'=>'string', 'value'=>'string', 'handle'=>'resource'],
'dba_sync' => ['bool', 'handle'=>'resource'],
'dbase_add_record' => ['bool', 'dbase_identifier'=>'resource', 'record'=>'array'],
'dbase_close' => ['bool', 'dbase_identifier'=>'resource'],
'dbase_create' => ['resource|false', 'filename'=>'string', 'fields'=>'array'],
'dbase_delete_record' => ['bool', 'dbase_identifier'=>'resource', 'record_number'=>'int'],
'dbase_get_header_info' => ['array', 'dbase_identifier'=>'resource'],
'dbase_get_record' => ['array', 'dbase_identifier'=>'resource', 'record_number'=>'int'],
'dbase_get_record_with_names' => ['array', 'dbase_identifier'=>'resource', 'record_number'=>'int'],
'dbase_numfields' => ['int', 'dbase_identifier'=>'resource'],
'dbase_numrecords' => ['int', 'dbase_identifier'=>'resource'],
'dbase_open' => ['resource|false', 'filename'=>'string', 'mode'=>'int'],
'dbase_pack' => ['bool', 'dbase_identifier'=>'resource'],
'dbase_replace_record' => ['bool', 'dbase_identifier'=>'resource', 'record'=>'array', 'record_number'=>'int'],
'dbplus_add' => ['int', 'relation'=>'resource', 'tuple'=>'array'],
'dbplus_aql' => ['resource', 'query'=>'string', 'server='=>'string', 'dbpath='=>'string'],
'dbplus_chdir' => ['string', 'newdir='=>'string'],
'dbplus_close' => ['mixed', 'relation'=>'resource'],
'dbplus_curr' => ['int', 'relation'=>'resource', 'tuple'=>'array'],
'dbplus_errcode' => ['string', 'errno='=>'int'],
'dbplus_errno' => ['int'],
'dbplus_find' => ['int', 'relation'=>'resource', 'constraints'=>'array', 'tuple'=>'mixed'],
'dbplus_first' => ['int', 'relation'=>'resource', 'tuple'=>'array'],
'dbplus_flush' => ['int', 'relation'=>'resource'],
'dbplus_freealllocks' => ['int'],
'dbplus_freelock' => ['int', 'relation'=>'resource', 'tuple'=>'string'],
'dbplus_freerlocks' => ['int', 'relation'=>'resource'],
'dbplus_getlock' => ['int', 'relation'=>'resource', 'tuple'=>'string'],
'dbplus_getunique' => ['int', 'relation'=>'resource', 'uniqueid'=>'int'],
'dbplus_info' => ['int', 'relation'=>'resource', 'key'=>'string', 'result'=>'array'],
'dbplus_last' => ['int', 'relation'=>'resource', 'tuple'=>'array'],
'dbplus_lockrel' => ['int', 'relation'=>'resource'],
'dbplus_next' => ['int', 'relation'=>'resource', 'tuple'=>'array'],
'dbplus_open' => ['resource', 'name'=>'string'],
'dbplus_prev' => ['int', 'relation'=>'resource', 'tuple'=>'array'],
'dbplus_rchperm' => ['int', 'relation'=>'resource', 'mask'=>'int', 'user'=>'string', 'group'=>'string'],
'dbplus_rcreate' => ['resource', 'name'=>'string', 'domlist'=>'mixed', 'overwrite='=>'bool'],
'dbplus_rcrtexact' => ['mixed', 'name'=>'string', 'relation'=>'resource', 'overwrite='=>'bool'],
'dbplus_rcrtlike' => ['mixed', 'name'=>'string', 'relation'=>'resource', 'overwrite='=>'int'],
'dbplus_resolve' => ['array', 'relation_name'=>'string'],
'dbplus_restorepos' => ['int', 'relation'=>'resource', 'tuple'=>'array'],
'dbplus_rkeys' => ['mixed', 'relation'=>'resource', 'domlist'=>'mixed'],
'dbplus_ropen' => ['resource', 'name'=>'string'],
'dbplus_rquery' => ['resource', 'query'=>'string', 'dbpath='=>'string'],
'dbplus_rrename' => ['int', 'relation'=>'resource', 'name'=>'string'],
'dbplus_rsecindex' => ['mixed', 'relation'=>'resource', 'domlist'=>'mixed', 'type'=>'int'],
'dbplus_runlink' => ['int', 'relation'=>'resource'],
'dbplus_rzap' => ['int', 'relation'=>'resource'],
'dbplus_savepos' => ['int', 'relation'=>'resource'],
'dbplus_setindex' => ['int', 'relation'=>'resource', 'idx_name'=>'string'],
'dbplus_setindexbynumber' => ['int', 'relation'=>'resource', 'idx_number'=>'int'],
'dbplus_sql' => ['resource', 'query'=>'string', 'server='=>'string', 'dbpath='=>'string'],
'dbplus_tcl' => ['string', 'sid'=>'int', 'script'=>'string'],
'dbplus_tremove' => ['int', 'relation'=>'resource', 'tuple'=>'array', 'current='=>'array'],
'dbplus_undo' => ['int', 'relation'=>'resource'],
'dbplus_undoprepare' => ['int', 'relation'=>'resource'],
'dbplus_unlockrel' => ['int', 'relation'=>'resource'],
'dbplus_unselect' => ['int', 'relation'=>'resource'],
'dbplus_update' => ['int', 'relation'=>'resource', 'old'=>'array', 'new'=>'array'],
'dbplus_xlockrel' => ['int', 'relation'=>'resource'],
'dbplus_xunlockrel' => ['int', 'relation'=>'resource'],
'dbx_close' => ['int', 'link_identifier'=>'object'],
'dbx_compare' => ['int', 'row_a'=>'array', 'row_b'=>'array', 'column_key'=>'string', 'flags='=>'int'],
'dbx_connect' => ['object', 'module'=>'mixed', 'host'=>'string', 'database'=>'string', 'username'=>'string', 'password'=>'string', 'persistent='=>'int'],
'dbx_error' => ['string', 'link_identifier'=>'object'],
'dbx_escape_string' => ['string', 'link_identifier'=>'object', 'text'=>'string'],
'dbx_fetch_row' => ['mixed', 'result_identifier'=>'object'],
'dbx_query' => ['mixed', 'link_identifier'=>'object', 'sql_statement'=>'string', 'flags='=>'int'],
'dbx_sort' => ['bool', 'result'=>'object', 'user_compare_function'=>'string'],
'dcgettext' => ['string', 'domain_name'=>'string', 'msgid'=>'string', 'category'=>'int'],
'dcngettext' => ['string', 'domain'=>'string', 'msgid1'=>'string', 'msgid2'=>'string', 'n'=>'int', 'category'=>'int'],
'deaggregate' => ['', 'object'=>'object', 'class_name='=>'string'],
'debug_backtrace' => ['list<array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}>', 'options='=>'int|bool', 'limit='=>'int'],
'debug_print_backtrace' => ['void', 'options='=>'int|bool', 'limit='=>'int'],
'debug_zval_dump' => ['void', '...var'=>'mixed'],
'debugger_connect' => [''],
'debugger_connector_pid' => [''],
'debugger_get_server_start_time' => [''],
'debugger_print' => [''],
'debugger_start_debug' => [''],
'decbin' => ['string', 'decimal_number'=>'int'],
'dechex' => ['string', 'num'=>'int'],
'decoct' => ['string', 'decimal_number'=>'int'],
'define' => ['bool', 'constant_name'=>'string', 'value'=>'mixed', 'case_insensitive='=>'bool'],
'define_syslog_variables' => ['void'],
'defined' => ['bool', 'name'=>'string'],
'deflate_add' => ['string|false', 'context'=>'resource', 'data'=>'string', 'flush_mode='=>'int'],
'deflate_init' => ['resource|false', 'encoding'=>'int', 'options='=>'array'],
'deg2rad' => ['float', 'number'=>'float'],
'dgettext' => ['string', 'domain_name'=>'string', 'msgid'=>'string'],
'dio_close' => ['void', 'fd'=>'resource'],
'dio_fcntl' => ['mixed', 'fd'=>'resource', 'cmd'=>'int', 'args='=>'mixed'],
'dio_open' => ['resource|false', 'filename'=>'string', 'flags'=>'int', 'mode='=>'int'],
'dio_read' => ['string', 'fd'=>'resource', 'len='=>'int'],
'dio_seek' => ['int', 'fd'=>'resource', 'pos'=>'int', 'whence='=>'int'],
'dio_stat' => ['array|null', 'fd'=>'resource'],
'dio_tcsetattr' => ['bool', 'fd'=>'resource', 'options'=>'array'],
'dio_truncate' => ['bool', 'fd'=>'resource', 'offset'=>'int'],
'dio_write' => ['int', 'fd'=>'resource', 'data'=>'string', 'len='=>'int'],
'dir' => ['Directory|false', 'directory'=>'string', 'context='=>'resource'],
'Directory::close' => ['void', 'dir_handle='=>'resource'],
'Directory::read' => ['string|false', 'dir_handle='=>'resource'],
'Directory::rewind' => ['void', 'dir_handle='=>'resource'],
'DirectoryIterator::__construct' => ['void', 'path'=>'string'],
'DirectoryIterator::__toString' => ['string'],
'DirectoryIterator::current' => ['DirectoryIterator'],
'DirectoryIterator::getATime' => ['int'],
'DirectoryIterator::getBasename' => ['string', 'suffix='=>'string'],
'DirectoryIterator::getChildren' => ['RecursiveDirectoryIterator'],
'DirectoryIterator::getCTime' => ['int'],
'DirectoryIterator::getExtension' => ['string'],
'DirectoryIterator::getFileInfo' => ['SplFileInfo', 'class_name='=>'string'],
'DirectoryIterator::getFilename' => ['string'],
'DirectoryIterator::getGroup' => ['int'],
'DirectoryIterator::getInode' => ['int'],
'DirectoryIterator::getLinkTarget' => ['string'],
'DirectoryIterator::getMTime' => ['int'],
'DirectoryIterator::getOwner' => ['int'],
'DirectoryIterator::getPath' => ['string'],
'DirectoryIterator::getPathInfo' => ['SplFileInfo', 'class_name='=>'string'],
'DirectoryIterator::getPathname' => ['string'],
'DirectoryIterator::getPerms' => ['int'],
'DirectoryIterator::getRealPath' => ['string'],
'DirectoryIterator::getSize' => ['int'],
'DirectoryIterator::getType' => ['string'],
'DirectoryIterator::isDir' => ['bool'],
'DirectoryIterator::isDot' => ['bool'],
'DirectoryIterator::isExecutable' => ['bool'],
'DirectoryIterator::isFile' => ['bool'],
'DirectoryIterator::isLink' => ['bool'],
'DirectoryIterator::isReadable' => ['bool'],
'DirectoryIterator::isWritable' => ['bool'],
'DirectoryIterator::key' => ['string'],
'DirectoryIterator::next' => ['void'],
'DirectoryIterator::openFile' => ['SplFileObject', 'mode='=>'string', 'use_include_path='=>'bool', 'context='=>'resource'],
'DirectoryIterator::rewind' => ['void'],
'DirectoryIterator::seek' => ['void', 'position'=>'int'],
'DirectoryIterator::setFileClass' => ['void', 'class_name='=>'string'],
'DirectoryIterator::setInfoClass' => ['void', 'class_name='=>'string'],
'DirectoryIterator::valid' => ['bool'],
'dirname' => ['string', 'path'=>'string', 'levels='=>'positive-int'],
'disk_free_space' => ['float|false', 'path'=>'string'],
'disk_total_space' => ['float|false', 'path'=>'string'],
'diskfreespace' => ['float|false', 'path'=>'string'],
'display_disabled_function' => [''],
'dl' => ['bool', 'extension_filename'=>'string'],
'dngettext' => ['string', 'domain'=>'string', 'msgid1'=>'string', 'msgid2'=>'string', 'count'=>'int'],
'dns_check_record' => ['bool', 'host'=>'string', 'type='=>'string'],
'dns_get_mx' => ['bool', 'hostname'=>'string', '&w_mxhosts'=>'array', '&w_weight'=>'array'],
'dns_get_record' => ['list<array>|false', 'hostname'=>'string', 'type='=>'int', '&w_authns='=>'array', '&w_addtl='=>'array', 'raw='=>'bool'],
'dom_document_relaxNG_validate_file' => ['bool', 'filename'=>'string'],
'dom_document_relaxNG_validate_xml' => ['bool', 'source'=>'string'],
'dom_document_schema_validate' => ['bool', 'source'=>'string', 'flags'=>'int'],
'dom_document_schema_validate_file' => ['bool', 'filename'=>'string', 'flags'=>'int'],
'dom_document_xinclude' => ['int', 'options'=>'int'],
'dom_import_simplexml' => ['DOMElement|false', 'node'=>'SimpleXMLElement'],
'dom_xpath_evaluate' => ['', 'expr'=>'string', 'context'=>'DOMNode', 'registernodens'=>'bool'],
'dom_xpath_query' => ['DOMNodeList', 'expr'=>'string', 'context'=>'DOMNode', 'registernodens'=>'bool'],
'dom_xpath_register_ns' => ['bool', 'prefix'=>'string', 'uri'=>'string'],
'dom_xpath_register_php_functions' => [''],
'DomainException::__clone' => ['void'],
'DomainException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Throwable)|(?DomainException)'],
'DomainException::__toString' => ['string'],
'DomainException::__wakeup' => ['void'],
'DomainException::getCode' => ['int'],
'DomainException::getFile' => ['string'],
'DomainException::getLine' => ['int'],
'DomainException::getMessage' => ['string'],
'DomainException::getPrevious' => ['Throwable|DomainException|null'],
'DomainException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'DomainException::getTraceAsString' => ['string'],
'DOMAttr::__construct' => ['void', 'name'=>'string', 'value='=>'string'],
'DOMAttr::isId' => ['bool'],
'DomAttribute::name' => ['string'],
'DomAttribute::set_value' => ['bool', 'content'=>'string'],
'DomAttribute::specified' => ['bool'],
'DomAttribute::value' => ['string'],
'DOMCdataSection::__construct' => ['void', 'value'=>'string'],
'DOMCharacterData::appendData' => ['void', 'data'=>'string'],
'DOMCharacterData::deleteData' => ['void', 'offset'=>'int', 'count'=>'int'],
'DOMCharacterData::insertData' => ['void', 'offset'=>'int', 'data'=>'string'],
'DOMCharacterData::replaceData' => ['void', 'offset'=>'int', 'count'=>'int', 'data'=>'string'],
'DOMCharacterData::substringData' => ['string', 'offset'=>'int', 'count'=>'int'],
'DOMComment::__construct' => ['void', 'value='=>'string'],
'DOMDocument::__construct' => ['void', 'version='=>'string', 'encoding='=>'string'],
'DOMDocument::createAttribute' => ['DOMAttr', 'name'=>'string'],
'DOMDocument::createAttributeNS' => ['DOMAttr', 'namespaceuri'=>'string', 'qualifiedname'=>'string'],
'DOMDocument::createCDATASection' => ['DOMCDATASection', 'data'=>'string'],
'DOMDocument::createComment' => ['DOMComment', 'data'=>'string'],
'DOMDocument::createDocumentFragment' => ['DOMDocumentFragment'],
'DOMDocument::createElement' => ['DOMElement', 'name'=>'string', 'value='=>'string'],
'DOMDocument::createElementNS' => ['DOMElement', 'namespaceuri'=>'string', 'qualifiedname'=>'string', 'value='=>'string'],
'DOMDocument::createEntityReference' => ['DOMEntityReference', 'name'=>'string'],
'DOMDocument::createProcessingInstruction' => ['DOMProcessingInstruction', 'target'=>'string', 'data='=>'string'],
'DOMDocument::createTextNode' => ['DOMText', 'content'=>'string'],
'DOMDocument::getElementById' => ['DOMElement|null', 'elementid'=>'string'],
'DOMDocument::getElementsByTagName' => ['DOMNodeList', 'name'=>'string'],
'DOMDocument::getElementsByTagNameNS' => ['DOMNodeList', 'namespaceuri'=>'string', 'localname'=>'string'],
'DOMDocument::importNode' => ['DOMNode', 'importednode'=>'DOMNode', 'deep='=>'bool'],
'DOMDocument::load' => ['mixed', 'filename'=>'string', 'options='=>'int'],
'DOMDocument::loadHTML' => ['bool', 'source'=>'string', 'options='=>'int'],
'DOMDocument::loadHTMLFile' => ['bool', 'filename'=>'string', 'options='=>'int'],
'DOMDocument::loadXML' => ['mixed', 'source'=>'string', 'options='=>'int'],
'DOMDocument::normalizeDocument' => ['void'],
'DOMDocument::registerNodeClass' => ['bool', 'baseclass'=>'string', 'extendedclass'=>'string'],
'DOMDocument::relaxNGValidate' => ['bool', 'filename'=>'string'],
'DOMDocument::relaxNGValidateSource' => ['bool', 'source'=>'string'],
'DOMDocument::save' => ['int|false', 'filename'=>'string', 'options='=>'int'],
'DOMDocument::saveHTML' => ['string|false', 'node='=>'?DOMNode'],
'DOMDocument::saveHTMLFile' => ['int|false', 'filename'=>'string'],
'DOMDocument::saveXML' => ['string|false', 'node='=>'?DOMNode', 'options='=>'int'],
'DOMDocument::schemaValidate' => ['bool', 'filename'=>'string', 'flags='=>'int'],
'DOMDocument::schemaValidateSource' => ['bool', 'source'=>'string', 'flags='=>'int'],
'DOMDocument::validate' => ['bool'],
'DOMDocument::xinclude' => ['int', 'options='=>'int'],
'DOMDocumentFragment::__construct' => ['void'],
'DOMDocumentFragment::appendXML' => ['bool', 'data'=>'string'],
'DomDocumentType::entities' => ['array'],
'DomDocumentType::internal_subset' => ['bool'],
'DomDocumentType::name' => ['string'],
'DomDocumentType::notations' => ['array'],
'DomDocumentType::public_id' => ['string'],
'DomDocumentType::system_id' => ['string'],
'DOMElement::__construct' => ['void', 'name'=>'string', 'value='=>'string', 'uri='=>'string'],
'DOMElement::get_attribute' => ['string', 'name'=>'string'],
'DOMElement::get_attribute_node' => ['DomAttribute', 'name'=>'string'],
'DOMElement::get_elements_by_tagname' => ['array', 'name'=>'string'],
'DOMElement::getAttribute' => ['string', 'name'=>'string'],
'DOMElement::getAttributeNode' => ['DOMAttr', 'name'=>'string'],
'DOMElement::getAttributeNodeNS' => ['DOMAttr', 'namespaceuri'=>'string', 'localname'=>'string'],
'DOMElement::getAttributeNS' => ['string', 'namespaceuri'=>'string', 'localname'=>'string'],
'DOMElement::getElementsByTagName' => ['DOMNodeList', 'name'=>'string'],
'DOMElement::getElementsByTagNameNS' => ['DOMNodeList', 'namespaceuri'=>'string', 'localname'=>'string'],
'DOMElement::has_attribute' => ['bool', 'name'=>'string'],
'DOMElement::hasAttribute' => ['bool', 'name'=>'string'],
'DOMElement::hasAttributeNS' => ['bool', 'namespaceuri'=>'string', 'localname'=>'string'],
'DOMElement::remove_attribute' => ['bool', 'name'=>'string'],
'DOMElement::removeAttribute' => ['bool', 'name'=>'string'],
'DOMElement::removeAttributeNode' => ['bool', 'oldnode'=>'DOMAttr'],
'DOMElement::removeAttributeNS' => ['bool', 'namespaceuri'=>'string', 'localname'=>'string'],
'DOMElement::set_attribute' => ['DomAttribute', 'name'=>'string', 'value'=>'string'],
'DOMElement::set_attribute_node' => ['DomNode', 'attr'=>'DOMNode'],
'DOMElement::setAttribute' => ['DOMAttr', 'name'=>'string', 'value'=>'string'],
'DOMElement::setAttributeNode' => ['DOMAttr', 'attr'=>'DOMAttr'],
'DOMElement::setAttributeNodeNS' => ['DOMAttr', 'attr'=>'DOMAttr'],
'DOMElement::setAttributeNS' => ['void', 'namespaceuri'=>'string', 'qualifiedname'=>'string', 'value'=>'string'],
'DOMElement::setIdAttribute' => ['void', 'name'=>'string', 'isid'=>'bool'],
'DOMElement::setIdAttributeNode' => ['void', 'attr'=>'DOMAttr', 'isid'=>'bool'],
'DOMElement::setIdAttributeNS' => ['void', 'namespaceuri'=>'string', 'localname'=>'string', 'isid'=>'bool'],
'DOMElement::tagname' => ['string'],
'DOMEntityReference::__construct' => ['void', 'name'=>'string'],
'DOMImplementation::__construct' => ['void'],
'DOMImplementation::createDocument' => ['DOMDocument', 'namespaceuri='=>'string', 'qualifiedname='=>'string', 'doctype='=>'DOMDocumentType'],
'DOMImplementation::createDocumentType' => ['DOMDocumentType', 'qualifiedname='=>'string', 'publicid='=>'string', 'systemid='=>'string'],
'DOMImplementation::hasFeature' => ['bool', 'feature'=>'string', 'version'=>'string'],
'DOMNamedNodeMap::count' => ['0|positive-int'],
'DOMNamedNodeMap::getNamedItem' => ['?DOMNode', 'name'=>'string'],
'DOMNamedNodeMap::getNamedItemNS' => ['?DOMNode', 'namespaceuri'=>'string', 'localname'=>'string'],
'DOMNamedNodeMap::item' => ['?DOMNode', 'index'=>'int'],
'DomNode::add_namespace' => ['bool', 'uri'=>'string', 'prefix'=>'string'],
'DomNode::append_child' => ['DOMNode', 'newnode'=>'DOMNode'],
'DOMNode::appendChild' => ['DOMNode', 'newnode'=>'DOMNode'],
'DOMNode::C14N' => ['string', 'exclusive='=>'bool', 'with_comments='=>'bool', 'xpath='=>'array', 'ns_prefixes='=>'array'],
'DOMNode::C14NFile' => ['int', 'uri='=>'string', 'exclusive='=>'bool', 'with_comments='=>'bool', 'xpath='=>'array', 'ns_prefixes='=>'array'],
'DOMNode::cloneNode' => ['DOMNode', 'deep='=>'bool'],
'DOMNode::getLineNo' => ['int'],
'DOMNode::getNodePath' => ['?string'],
'DOMNode::hasAttributes' => ['bool'],
'DOMNode::hasChildNodes' => ['bool'],
'DOMNode::insertBefore' => ['DOMNode', 'newnode'=>'DOMNode', 'refnode='=>'DOMNode'],
'DOMNode::isDefaultNamespace' => ['bool', 'namespaceuri'=>'string'],
'DOMNode::isSameNode' => ['bool', 'node'=>'DOMNode'],
'DOMNode::isSupported' => ['bool', 'feature'=>'string', 'version'=>'string'],
'DOMNode::lookupNamespaceURI' => ['string', 'prefix'=>'string'],
'DOMNode::lookupPrefix' => ['string', 'namespaceuri'=>'string'],
'DOMNode::normalize' => ['void'],
'DOMNode::removeChild' => ['DOMNode', 'oldnode'=>'DOMNode'],
'DOMNode::replaceChild' => ['DOMNode', 'newnode'=>'DOMNode', 'oldnode'=>'DOMNode'],
'DOMNodeList::count' => ['0|positive-int'],
'DOMNodeList::item' => ['?DOMNode', 'index'=>'int'],
'DOMProcessingInstruction::__construct' => ['void', 'name'=>'string', 'value'=>'string'],
'DomProcessingInstruction::data' => ['string'],
'DomProcessingInstruction::target' => ['string'],
'DOMText::__construct' => ['void', 'value='=>'string'],
'DOMText::isElementContentWhitespace' => ['bool'],
'DOMText::isWhitespaceInElementContent' => ['bool'],
'DOMText::splitText' => ['DOMText|false', 'offset'=>'int'],
'domxml_new_doc' => ['DomDocument', 'version'=>'string'],
'domxml_open_file' => ['DomDocument', 'filename'=>'string', 'mode='=>'int', 'error='=>'array'],
'domxml_open_mem' => ['DomDocument', 'str'=>'string', 'mode='=>'int', 'error='=>'array'],
'domxml_version' => ['string'],
'domxml_xmltree' => ['DomDocument', 'str'=>'string'],
'domxml_xslt_stylesheet' => ['DomXsltStylesheet', 'xsl_buf'=>'string'],
'domxml_xslt_stylesheet_doc' => ['DomXsltStylesheet', 'xsl_doc'=>'DOMDocument'],
'domxml_xslt_stylesheet_file' => ['DomXsltStylesheet', 'xsl_file'=>'string'],
'domxml_xslt_version' => ['int'],
'DOMXPath::__construct' => ['void', 'doc'=>'DOMDocument'],
'DOMXPath::evaluate' => ['mixed', 'expression'=>'string', 'contextnode='=>'?DOMNode', 'registernodens='=>'bool'],
'DOMXPath::query' => ['DOMNodeList|false', 'expression'=>'string', 'contextnode='=>'?DOMNode', 'registernodens='=>'bool'],
'DOMXPath::registerNamespace' => ['bool', 'prefix'=>'string', 'namespaceuri'=>'string'],
'DOMXPath::registerPhpFunctions' => ['void', 'restrict='=>'mixed'],
'DomXsltStylesheet::process' => ['DomDocument', 'xml_doc'=>'DOMDocument', 'xslt_params='=>'array', 'is_xpath_param='=>'bool', 'profile_filename='=>'string'],
'DomXsltStylesheet::result_dump_file' => ['string', 'xmldoc'=>'DOMDocument', 'filename'=>'string'],
'DomXsltStylesheet::result_dump_mem' => ['string', 'xmldoc'=>'DOMDocument'],
'DOTNET::__construct' => ['void', 'assembly_name'=>'string', 'class_name'=>'string', 'codepage='=>'int'],
'dotnet_load' => ['int', 'assembly_name'=>'string', 'datatype_name='=>'string', 'codepage='=>'int'],
'doubleval' => ['float', 'var'=>'scalar|array|resource|null'],
'Ds\Collection::clear' => ['void'],
'Ds\Collection::copy' => ['Ds\Collection'],
'Ds\Collection::isEmpty' => ['bool'],
'Ds\Collection::toArray' => ['array'],
'Ds\Deque::__construct' => ['void', 'values='=>'mixed'],
'Ds\Deque::allocate' => ['void', 'capacity'=>'int'],
'Ds\Deque::apply' => ['void', 'callback'=>'callable'],
'Ds\Deque::capacity' => ['int'],
'Ds\Deque::clear' => ['void'],
'Ds\Deque::contains' => ['bool', '...values='=>'mixed'],
'Ds\Deque::copy' => ['Ds\Deque'],
'Ds\Deque::count' => ['0|positive-int'],
'Ds\Deque::filter' => ['Ds\Deque', 'callback='=>'callable'],
'Ds\Deque::find' => ['mixed', 'value'=>'mixed'],
'Ds\Deque::first' => ['mixed'],
'Ds\Deque::get' => ['void', 'index'=>'int'],
'Ds\Deque::insert' => ['void', 'index'=>'int', '...values='=>'mixed'],
'Ds\Deque::isEmpty' => ['bool'],
'Ds\Deque::join' => ['string', 'glue='=>'string'],
'Ds\Deque::jsonSerialize' => ['array'],
'Ds\Deque::last' => ['mixed'],
'Ds\Deque::map' => ['Ds\Deque', 'callback'=>'callable'],
'Ds\Deque::merge' => ['Ds\Deque', 'values'=>'mixed'],
'Ds\Deque::pop' => ['mixed'],
'Ds\Deque::push' => ['void', '...values='=>'mixed'],
'Ds\Deque::reduce' => ['mixed', 'callback'=>'callable', 'initial='=>'mixed'],
'Ds\Deque::remove' => ['mixed', 'index'=>'int'],
'Ds\Deque::reverse' => ['void'],
'Ds\Deque::reversed' => ['Ds\Deque'],
'Ds\Deque::rotate' => ['void', 'rotations'=>'int'],
'Ds\Deque::set' => ['void', 'index'=>'int', 'value'=>'mixed'],
'Ds\Deque::shift' => ['mixed'],
'Ds\Deque::slice' => ['Ds\Deque', 'index'=>'int', 'length='=>'?int'],
'Ds\Deque::sort' => ['void', 'comparator='=>'callable'],
'Ds\Deque::sorted' => ['Ds\Deque', 'comparator='=>'callable'],
'Ds\Deque::sum' => ['int|float'],
'Ds\Deque::toArray' => ['array'],
'Ds\Deque::unshift' => ['void', '...values='=>'mixed'],
'Ds\Hashable::equals' => ['bool', 'obj'=>'mixed'],
'Ds\Hashable::hash' => ['mixed'],
'Ds\Map::__construct' => ['void', 'values='=>'mixed'],
'Ds\Map::allocate' => ['void', 'capacity'=>'int'],
'Ds\Map::apply' => ['void', 'callback'=>'callable'],
'Ds\Map::capacity' => ['int'],
'Ds\Map::clear' => ['void'],
'Ds\Map::copy' => ['Ds\Map'],
'Ds\Map::count' => ['0|positive-int'],
'Ds\Map::diff' => ['Ds\Map', 'map'=>'Ds\Map'],
'Ds\Map::filter' => ['Ds\Map', 'callback='=>'callable'],
'Ds\Map::first' => ['Ds\Pair'],
'Ds\Map::get' => ['mixed', 'key'=>'mixed', 'default='=>'mixed'],
'Ds\Map::hasKey' => ['bool', 'key'=>'mixed'],
'Ds\Map::hasValue' => ['bool', 'value'=>'mixed'],
'Ds\Map::intersect' => ['Ds\Map', 'map'=>'Ds\Map'],
'Ds\Map::isEmpty' => ['bool'],
'Ds\Map::jsonSerialize' => ['array'],
'Ds\Map::keys' => ['Ds\Set'],
'Ds\Map::ksort' => ['void', 'comparator='=>'callable'],
'Ds\Map::ksorted' => ['Ds\Map', 'comparator='=>'callable'],
'Ds\Map::last' => ['Ds\Pair'],
'Ds\Map::map' => ['Ds\Map', 'callback'=>'callable'],
'Ds\Map::merge' => ['Ds\Map', 'values'=>'mixed'],
'Ds\Map::pairs' => ['Ds\Sequence'],
'Ds\Map::put' => ['void', 'key'=>'mixed', 'value'=>'mixed'],
'Ds\Map::putAll' => ['void', 'values'=>'mixed'],
'Ds\Map::reduce' => ['mixed', 'callback'=>'callable', 'initial='=>'mixed'],
'Ds\Map::remove' => ['mixed', 'key'=>'mixed', 'default='=>'mixed'],
'Ds\Map::reverse' => ['void'],
'Ds\Map::reversed' => ['Ds\Map'],
'Ds\Map::skip' => ['Ds\Pair', 'position'=>'int'],
'Ds\Map::slice' => ['Ds\Map', 'index'=>'int', 'length='=>'?int'],
'Ds\Map::sort' => ['void', 'comparator='=>'callable'],
'Ds\Map::sorted' => ['Ds\Map', 'comparator='=>'callable'],
'Ds\Map::sum' => ['int|float'],
'Ds\Map::toArray' => ['array'],
'Ds\Map::union' => ['Ds\Map', 'map'=>'Ds\Map'],
'Ds\Map::values' => ['Ds\Sequence'],
'Ds\Map::xor' => ['Ds\Map', 'map'=>'Ds\Map'],
'Ds\Pair::__construct' => ['void', 'key='=>'mixed', 'value='=>'mixed'],
'Ds\Pair::copy' => ['Ds\Pair'],
'Ds\Pair::jsonSerialize' => ['array'],
'Ds\Pair::toArray' => ['array'],
'Ds\PriorityQueue::__construct' => ['void'],
'Ds\PriorityQueue::allocate' => ['void', 'capacity'=>'int'],
'Ds\PriorityQueue::capacity' => ['int'],
'Ds\PriorityQueue::clear' => ['void'],
'Ds\PriorityQueue::copy' => ['Ds\PriorityQueue'],
'Ds\PriorityQueue::count' => ['0|positive-int'],
'Ds\PriorityQueue::isEmpty' => ['bool'],
'Ds\PriorityQueue::jsonSerialize' => ['array'],
'Ds\PriorityQueue::peek' => ['mixed'],
'Ds\PriorityQueue::pop' => ['mixed'],
'Ds\PriorityQueue::push' => ['void', 'value'=>'mixed', 'priority'=>'int'],
'Ds\PriorityQueue::toArray' => ['array'],
'Ds\Queue::__construct' => ['void', 'values='=>'mixed'],
'Ds\Queue::allocate' => ['void', 'capacity'=>'int'],
'Ds\Queue::capacity' => ['int'],
'Ds\Queue::clear' => ['void'],
'Ds\Queue::copy' => ['Ds\Queue'],
'Ds\Queue::count' => ['0|positive-int'],
'Ds\Queue::isEmpty' => ['bool'],
'Ds\Queue::jsonSerialize' => ['array'],
'Ds\Queue::peek' => ['mixed'],
'Ds\Queue::pop' => ['mixed'],
'Ds\Queue::push' => ['void', '...values='=>'mixed'],
'Ds\Queue::toArray' => ['array'],
'Ds\Sequence::allocate' => ['void', 'capacity'=>'int'],
'Ds\Sequence::apply' => ['void', 'callback'=>'callable'],
'Ds\Sequence::capacity' => ['int'],
'Ds\Sequence::contains' => ['bool', '...values='=>'mixed'],
'Ds\Sequence::filter' => ['Ds\Sequence', 'callback='=>'callable'],
'Ds\Sequence::find' => ['mixed', 'value'=>'mixed'],
'Ds\Sequence::first' => ['mixed'],
'Ds\Sequence::get' => ['mixed', 'index'=>'int'],
'Ds\Sequence::insert' => ['void', 'index'=>'int', '...values='=>'mixed'],
'Ds\Sequence::join' => ['string', 'glue='=>'string'],
'Ds\Sequence::last' => ['void'],
'Ds\Sequence::map' => ['Ds\Sequence', 'callback'=>'callable'],
'Ds\Sequence::merge' => ['Ds\Sequence', 'values'=>'mixed'],
'Ds\Sequence::pop' => ['mixed'],
'Ds\Sequence::push' => ['void', '...values='=>'mixed'],
'Ds\Sequence::reduce' => ['mixed', 'callback'=>'callable', 'initial='=>'mixed'],
'Ds\Sequence::remove' => ['mixed', 'index'=>'int'],
'Ds\Sequence::reverse' => ['void'],
'Ds\Sequence::reversed' => ['Ds\Sequence'],
'Ds\Sequence::rotate' => ['void', 'rotations'=>'int'],
'Ds\Sequence::set' => ['void', 'index'=>'int', 'value'=>'mixed'],
'Ds\Sequence::shift' => ['mixed'],
'Ds\Sequence::slice' => ['Ds\Sequence', 'index'=>'int', 'length='=>'?int'],
'Ds\Sequence::sort' => ['void', 'comparator='=>'callable'],
'Ds\Sequence::sorted' => ['Ds\Sequence', 'comparator='=>'callable'],
'Ds\Sequence::sum' => ['int|float'],
'Ds\Sequence::unshift' => ['void', '...values='=>'mixed'],
'Ds\Set::__construct' => ['void', 'values='=>'mixed'],
'Ds\Set::add' => ['void', '...values='=>'mixed'],
'Ds\Set::allocate' => ['void', 'capacity'=>'int'],
'Ds\Set::capacity' => ['int'],
'Ds\Set::clear' => ['void'],
'Ds\Set::contains' => ['bool', '...values='=>'mixed'],
'Ds\Set::copy' => ['Ds\Set'],
'Ds\Set::count' => ['0|positive-int'],
'Ds\Set::diff' => ['Ds\Set', 'set'=>'Ds\Set'],
'Ds\Set::filter' => ['Ds\Set', 'callback='=>'callable'],
'Ds\Set::first' => ['mixed'],
'Ds\Set::get' => ['mixed', 'index'=>'int'],
'Ds\Set::intersect' => ['Ds\Set', 'set'=>'Ds\Set'],
'Ds\Set::isEmpty' => ['bool'],
'Ds\Set::join' => ['string', 'glue='=>'string'],
'Ds\Set::jsonSerialize' => ['array'],
'Ds\Set::last' => ['mixed'],
'Ds\Set::map' => ['Ds\Set', 'callback='=>'callable'],
'Ds\Set::merge' => ['Ds\Set', 'values'=>'mixed'],
'Ds\Set::reduce' => ['mixed', 'callback'=>'callable', 'initial='=>'mixed'],
'Ds\Set::remove' => ['void', '...values='=>'mixed'],
'Ds\Set::reverse' => ['void'],
'Ds\Set::reversed' => ['Ds\Set'],
'Ds\Set::slice' => ['Ds\Set', 'index'=>'int', 'length='=>'?int'],
'Ds\Set::sort' => ['void', 'comparator='=>'callable'],
'Ds\Set::sorted' => ['Ds\Set', 'comparator='=>'callable'],
'Ds\Set::sum' => ['int|float'],
'Ds\Set::toArray' => ['array'],
'Ds\Set::union' => ['Ds\Set', 'set'=>'Ds\Set'],
'Ds\Set::xor' => ['Ds\Set', 'set'=>'Ds\Set'],
'Ds\Stack::__construct' => ['void', 'values='=>'mixed'],
'Ds\Stack::allocate' => ['void', 'capacity'=>'int'],
'Ds\Stack::capacity' => ['int'],
'Ds\Stack::clear' => ['void'],
'Ds\Stack::copy' => ['Ds\Stack'],
'Ds\Stack::count' => ['0|positive-int'],
'Ds\Stack::isEmpty' => ['bool'],
'Ds\Stack::jsonSerialize' => ['array'],
'Ds\Stack::peek' => ['mixed'],
'Ds\Stack::pop' => ['mixed'],
'Ds\Stack::push' => ['void', '...values='=>'mixed'],
'Ds\Stack::toArray' => ['array'],
'Ds\Vector::__construct' => ['void', 'values='=>'mixed'],
'Ds\Vector::allocate' => ['void', 'capacity'=>'int'],
'Ds\Vector::apply' => ['void', 'callback'=>'callable'],
'Ds\Vector::capacity' => ['int'],
'Ds\Vector::clear' => ['void'],
'Ds\Vector::contains' => ['bool', '...values='=>'mixed'],
'Ds\Vector::copy' => ['Ds\Vector'],
'Ds\Vector::count' => ['0|positive-int'],
'Ds\Vector::filter' => ['Ds\Vector', 'callback='=>'callable'],
'Ds\Vector::find' => ['mixed', 'value'=>'mixed'],
'Ds\Vector::first' => ['mixed'],
'Ds\Vector::get' => ['mixed', 'index'=>'int'],
'Ds\Vector::insert' => ['void', 'index'=>'int', '...values='=>'mixed'],
'Ds\Vector::isEmpty' => ['bool'],
'Ds\Vector::join' => ['string', 'glue='=>'string'],
'Ds\Vector::jsonSerialize' => ['array'],
'Ds\Vector::last' => ['mixed'],
'Ds\Vector::map' => ['Ds\Vector', 'callback'=>'callable'],
'Ds\Vector::merge' => ['Ds\Vector', 'values'=>'mixed'],
'Ds\Vector::pop' => ['mixed'],
'Ds\Vector::push' => ['void', '...values='=>'mixed'],
'Ds\Vector::reduce' => ['mixed', 'callback'=>'callable', 'initial='=>'mixed'],
'Ds\Vector::remove' => ['mixed', 'index'=>'int'],
'Ds\Vector::reverse' => ['void'],
'Ds\Vector::reversed' => ['Ds\Vector'],
'Ds\Vector::rotate' => ['void', 'rotations'=>'int'],
'Ds\Vector::set' => ['void', 'index'=>'int', 'value'=>'mixed'],
'Ds\Vector::shift' => ['mixed'],
'Ds\Vector::slice' => ['Ds\Vector', 'index'=>'int', 'length='=>'?int'],
'Ds\Vector::sort' => ['void', 'comparator='=>'callable'],
'Ds\Vector::sorted' => ['Ds\Vector', 'comparator='=>'callable'],
'Ds\Vector::sum' => ['int|float'],
'Ds\Vector::toArray' => ['array'],
'Ds\Vector::unshift' => ['void', '...values='=>'mixed'],
'each' => ['array', '&rw_arr'=>'array'],
'easter_date' => ['int', 'year='=>'int'],
'easter_days' => ['int', 'year='=>'int', 'method='=>'int'],
'eio_busy' => ['resource', 'delay'=>'int', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'eio_cancel' => ['void', 'req'=>'resource'],
'eio_chmod' => ['resource', 'path'=>'string', 'mode'=>'int', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'eio_chown' => ['resource', 'path'=>'string', 'uid'=>'int', 'gid='=>'int', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'eio_close' => ['resource', 'fd'=>'mixed', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'eio_custom' => ['resource', 'execute'=>'callable', 'pri'=>'int', 'callback'=>'callable', 'data='=>'mixed'],
'eio_dup2' => ['resource', 'fd'=>'mixed', 'fd2'=>'mixed', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'eio_event_loop' => ['bool'],
'eio_fallocate' => ['resource', 'fd'=>'mixed', 'mode'=>'int', 'offset'=>'int', 'length'=>'int', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'eio_fchmod' => ['resource', 'fd'=>'mixed', 'mode'=>'int', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'eio_fchown' => ['resource', 'fd'=>'mixed', 'uid'=>'int', 'gid='=>'int', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'eio_fdatasync' => ['resource', 'fd'=>'mixed', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'eio_fstat' => ['resource', 'fd'=>'mixed', 'pri'=>'int', 'callback'=>'callable', 'data='=>'mixed'],
'eio_fstatvfs' => ['resource', 'fd'=>'mixed', 'pri'=>'int', 'callback'=>'callable', 'data='=>'mixed'],
'eio_fsync' => ['resource', 'fd'=>'mixed', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'eio_ftruncate' => ['resource', 'fd'=>'mixed', 'offset='=>'int', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'eio_futime' => ['resource', 'fd'=>'mixed', 'atime'=>'float', 'mtime'=>'float', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'eio_get_event_stream' => ['mixed'],
'eio_get_last_error' => ['string', 'req'=>'resource'],
'eio_grp' => ['resource', 'callback'=>'callable', 'data='=>'string'],
'eio_grp_add' => ['void', 'grp'=>'resource', 'req'=>'resource'],
'eio_grp_cancel' => ['void', 'grp'=>'resource'],
'eio_grp_limit' => ['void', 'grp'=>'resource', 'limit'=>'int'],
'eio_init' => ['void'],
'eio_link' => ['resource', 'path'=>'string', 'new_path'=>'string', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'eio_lstat' => ['resource', 'path'=>'string', 'pri'=>'int', 'callback'=>'callable', 'data='=>'mixed'],
'eio_mkdir' => ['resource', 'path'=>'string', 'mode'=>'int', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'eio_mknod' => ['resource', 'path'=>'string', 'mode'=>'int', 'dev'=>'int', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'eio_nop' => ['resource', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'eio_npending' => ['int'],
'eio_nready' => ['int'],
'eio_nreqs' => ['int'],
'eio_nthreads' => ['int'],
'eio_open' => ['resource', 'path'=>'string', 'flags'=>'int', 'mode'=>'int', 'pri'=>'int', 'callback'=>'callable', 'data='=>'mixed'],
'eio_poll' => ['int'],
'eio_read' => ['resource', 'fd'=>'mixed', 'length'=>'int', 'offset'=>'int', 'pri'=>'int', 'callback'=>'callable', 'data='=>'mixed'],
'eio_readahead' => ['resource', 'fd'=>'mixed', 'offset'=>'int', 'length'=>'int', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'eio_readdir' => ['resource', 'path'=>'string', 'flags'=>'int', 'pri'=>'int', 'callback'=>'callable', 'data='=>'string'],
'eio_readlink' => ['resource', 'path'=>'string', 'pri'=>'int', 'callback'=>'callable', 'data='=>'string'],
'eio_realpath' => ['resource', 'path'=>'string', 'pri'=>'int', 'callback'=>'callable', 'data='=>'string'],
'eio_rename' => ['resource', 'path'=>'string', 'new_path'=>'string', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'eio_rmdir' => ['resource', 'path'=>'string', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'eio_seek' => ['resource', 'fd'=>'mixed', 'offset'=>'int', 'whence'=>'int', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'eio_sendfile' => ['resource', 'out_fd'=>'mixed', 'in_fd'=>'mixed', 'offset'=>'int', 'length'=>'int', 'pri='=>'int', 'callback='=>'callable', 'data='=>'string'],
'eio_set_max_idle' => ['void', 'nthreads'=>'int'],
'eio_set_max_parallel' => ['void', 'nthreads'=>'int'],
'eio_set_max_poll_reqs' => ['void', 'nreqs'=>'int'],
'eio_set_max_poll_time' => ['void', 'nseconds'=>'float'],
'eio_set_min_parallel' => ['void', 'nthreads'=>'string'],
'eio_stat' => ['resource', 'path'=>'string', 'pri'=>'int', 'callback'=>'callable', 'data='=>'mixed'],
'eio_statvfs' => ['resource', 'path'=>'string', 'pri'=>'int', 'callback'=>'callable', 'data='=>'mixed'],
'eio_symlink' => ['resource', 'path'=>'string', 'new_path'=>'string', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'eio_sync' => ['resource', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'eio_sync_file_range' => ['resource', 'fd'=>'mixed', 'offset'=>'int', 'nbytes'=>'int', 'flags'=>'int', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'eio_syncfs' => ['resource', 'fd'=>'mixed', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'eio_truncate' => ['resource', 'path'=>'string', 'offset='=>'int', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'eio_unlink' => ['resource', 'path'=>'string', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'eio_utime' => ['resource', 'path'=>'string', 'atime'=>'float', 'mtime'=>'float', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'eio_write' => ['resource', 'fd'=>'mixed', 'str'=>'string', 'length='=>'int', 'offset='=>'int', 'pri='=>'int', 'callback='=>'callable', 'data='=>'mixed'],
'EmptyIterator::current' => ['mixed'],
'EmptyIterator::key' => ['mixed'],
'EmptyIterator::next' => ['void'],
'EmptyIterator::rewind' => ['void'],
'EmptyIterator::valid' => ['bool'],
'enchant_broker_describe' => ['array', 'broker'=>'resource'],
'enchant_broker_dict_exists' => ['bool', 'broker'=>'resource', 'tag'=>'string'],
'enchant_broker_free' => ['bool', 'broker'=>'resource'],
'enchant_broker_free_dict' => ['bool', 'dict'=>'resource'],
'enchant_broker_get_dict_path' => ['string|false', 'broker'=>'resource', 'dict_type'=>'int'],
'enchant_broker_get_error' => ['string|false', 'broker'=>'resource'],
'enchant_broker_init' => ['resource|false'],
'enchant_broker_list_dicts' => ['array<int,array{lang_tag:string,provider_name:string,provider_desc:string,provider_file:string}>|false', 'broker'=>'resource'],
'enchant_broker_request_dict' => ['resource|false', 'broker'=>'resource', 'tag'=>'string'],
'enchant_broker_request_pwl_dict' => ['resource|false', 'broker'=>'resource', 'filename'=>'string'],
'enchant_broker_set_dict_path' => ['bool', 'broker'=>'resource', 'dict_type'=>'int', 'value'=>'string'],
'enchant_broker_set_ordering' => ['bool', 'broker'=>'resource', 'tag'=>'string', 'ordering'=>'string'],
'enchant_dict_add_to_personal' => ['void', 'dict'=>'resource', 'word'=>'string'],
'enchant_dict_add_to_session' => ['void', 'dict'=>'resource', 'word'=>'string'],
'enchant_dict_check' => ['bool', 'dict'=>'resource', 'word'=>'string'],
'enchant_dict_describe' => ['array', 'dict'=>'resource'],
'enchant_dict_get_error' => ['string|false', 'dict'=>'resource'],
'enchant_dict_is_in_session' => ['bool', 'dict'=>'resource', 'word'=>'string'],
'enchant_dict_quick_check' => ['bool', 'dict'=>'resource', 'word'=>'string', 'suggestions='=>'array'],
'enchant_dict_store_replacement' => ['void', 'dict'=>'resource', 'mis'=>'string', 'cor'=>'string'],
'enchant_dict_suggest' => ['array', 'dict'=>'resource', 'word'=>'string'],
'end' => ['mixed', '&rw_array_arg'=>'array|object'],
'ereg' => ['int', 'pattern'=>'string', 'string'=>'string', 'regs='=>'array'],
'ereg_replace' => ['string', 'pattern'=>'string', 'replacement'=>'string', 'string'=>'string'],
'eregi' => ['int', 'pattern'=>'string', 'string'=>'string', 'regs='=>'array'],
'eregi_replace' => ['string', 'pattern'=>'string', 'replacement'=>'string', 'string'=>'string'],
'Error::__clone' => ['void'],
'Error::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Throwable)|(?Error)'],
'Error::__toString' => ['string'],
'Error::getCode' => ['int'],
'Error::getFile' => ['string'],
'Error::getLine' => ['int'],
'Error::getMessage' => ['string'],
'Error::getPrevious' => ['Throwable|Error|null'],
'Error::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'Error::getTraceAsString' => ['string'],
'error_clear_last' => ['void'],
'error_get_last' => ['?array{type:int,message:string,file:string,line:int}'],
'error_log' => ['bool', 'message'=>'string', 'message_type='=>'int', 'destination='=>'string', 'extra_headers='=>'string'],
'error_reporting' => ['int', 'new_error_level='=>'int'],
'ErrorException::__clone' => ['void'],
'ErrorException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'severity='=>'int', 'filename='=>'string', 'lineno='=>'int', 'previous='=>'(?Throwable)|(?ErrorException)'],
'ErrorException::__toString' => ['string'],
'ErrorException::getCode' => ['int'],
'ErrorException::getFile' => ['string'],
'ErrorException::getLine' => ['int'],
'ErrorException::getMessage' => ['string'],
'ErrorException::getPrevious' => ['Throwable|ErrorException|null'],
'ErrorException::getSeverity' => ['int'],
'ErrorException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'ErrorException::getTraceAsString' => ['string'],
'escapeshellarg' => ['string', 'arg'=>'string'],
'escapeshellcmd' => ['string', 'command'=>'string'],
'Ev::backend' => ['int'],
'Ev::depth' => ['int'],
'Ev::embeddableBackends' => ['int'],
'Ev::feedSignal' => ['void', 'signum'=>'int'],
'Ev::feedSignalEvent' => ['void', 'signum'=>'int'],
'Ev::iteration' => ['int'],
'Ev::now' => ['float'],
'Ev::nowUpdate' => ['void'],
'Ev::recommendedBackends' => ['int'],
'Ev::resume' => ['void'],
'Ev::run' => ['void', 'flags='=>'int'],
'Ev::sleep' => ['void', 'seconds'=>'float'],
'Ev::stop' => ['void', 'how='=>'int'],
'Ev::supportedBackends' => ['int'],
'Ev::suspend' => ['void'],
'Ev::time' => ['float'],
'Ev::verify' => ['void'],
'EvCheck::__construct' => ['void', 'callback'=>'callable', 'data='=>'mixed', 'priority='=>'int'],
'EvCheck::createStopped' => ['object', 'callback'=>'string', 'data='=>'string', 'priority='=>'string'],
'EvChild::__construct' => ['void', 'pid'=>'int', 'trace'=>'bool', 'callback'=>'callable', 'data='=>'mixed', 'priority='=>'int'],
'EvChild::createStopped' => ['object', 'pid'=>'int', 'trace'=>'bool', 'callback'=>'callable', 'data='=>'mixed', 'priority='=>'int'],
'EvChild::set' => ['void', 'pid'=>'int', 'trace'=>'bool'],
'EvEmbed::__construct' => ['void', 'other'=>'object', 'callback='=>'callable', 'data='=>'mixed', 'priority='=>'int'],
'EvEmbed::createStopped' => ['void', 'other'=>'object', 'callback='=>'callable', 'data='=>'mixed', 'priority='=>'int'],
'EvEmbed::set' => ['void', 'other'=>'object'],
'EvEmbed::sweep' => ['void'],
'Event::__construct' => ['void', 'base'=>'EventBase', 'fd'=>'mixed', 'what'=>'int', 'cb'=>'callable', 'arg='=>'mixed'],
'Event::add' => ['bool', 'timeout='=>'float'],
'Event::addSignal' => ['bool', 'timeout='=>'float'],
'Event::addTimer' => ['bool', 'timeout='=>'float'],
'Event::del' => ['bool'],
'Event::delSignal' => ['bool'],
'Event::delTimer' => ['bool'],
'Event::free' => ['void'],
'Event::getSupportedMethods' => ['array'],
'Event::pending' => ['bool', 'flags'=>'int'],
'Event::set' => ['bool', 'base'=>'EventBase', 'fd'=>'mixed', 'what='=>'int', 'cb='=>'callable', 'arg='=>'mixed'],
'Event::setPriority' => ['bool', 'priority'=>'int'],
'Event::setTimer' => ['bool', 'base'=>'EventBase', 'cb'=>'callable', 'arg='=>'mixed'],
'Event::signal' => ['Event', 'base'=>'EventBase', 'signum'=>'int', 'cb'=>'callable', 'arg='=>'mixed'],
'Event::timer' => ['Event', 'base'=>'EventBase', 'cb'=>'callable', 'arg='=>'mixed'],
'event_add' => ['bool', 'event'=>'resource', 'timeout='=>'int'],
'event_base_free' => ['void', 'event_base'=>'resource'],
'event_base_loop' => ['int', 'event_base'=>'resource', 'flags='=>'int'],
'event_base_loopbreak' => ['bool', 'event_base'=>'resource'],
'event_base_loopexit' => ['bool', 'event_base'=>'resource', 'timeout='=>'int'],
'event_base_new' => ['resource'],
'event_base_priority_init' => ['bool', 'event_base'=>'resource', 'npriorities'=>'int'],
'event_base_reinit' => ['bool', 'event_base'=>'resource'],
'event_base_set' => ['bool', 'event'=>'resource', 'event_base'=>'resource'],
'event_buffer_base_set' => ['bool', 'bevent'=>'resource', 'event_base'=>'resource'],
'event_buffer_disable' => ['bool', 'bevent'=>'resource', 'events'=>'int'],
'event_buffer_enable' => ['bool', 'bevent'=>'resource', 'events'=>'int'],
'event_buffer_fd_set' => ['void', 'bevent'=>'resource', 'fd'=>'resource'],
'event_buffer_free' => ['void', 'bevent'=>'resource'],
'event_buffer_new' => ['resource', 'stream'=>'resource', 'readcb'=>'mixed', 'writecb'=>'mixed', 'errorcb'=>'mixed', 'arg='=>'mixed'],
'event_buffer_priority_set' => ['bool', 'bevent'=>'resource', 'priority'=>'int'],
'event_buffer_read' => ['string', 'bevent'=>'resource', 'data_size'=>'int'],
'event_buffer_set_callback' => ['bool', 'event'=>'resource', 'readcb'=>'mixed', 'writecb'=>'mixed', 'errorcb'=>'mixed', 'arg='=>'mixed'],
'event_buffer_timeout_set' => ['void', 'bevent'=>'resource', 'read_timeout'=>'int', 'write_timeout'=>'int'],
'event_buffer_watermark_set' => ['void', 'bevent'=>'resource', 'events'=>'int', 'lowmark'=>'int', 'highmark'=>'int'],
'event_buffer_write' => ['bool', 'bevent'=>'resource', 'data'=>'string', 'data_size='=>'int'],
'event_del' => ['bool', 'event'=>'resource'],
'event_free' => ['void', 'event'=>'resource'],
'event_new' => ['resource'],
'event_priority_set' => ['bool', 'event'=>'resource', 'priority'=>'int'],
'event_set' => ['bool', 'event'=>'resource', 'fd'=>'mixed', 'events'=>'int', 'callback'=>'mixed', 'arg='=>'mixed'],
'event_timer_add' => ['bool', 'event'=>'resource', 'timeout='=>'int'],
'event_timer_del' => ['bool', 'event'=>'resource'],
'event_timer_new' => ['bool|resource'],
'event_timer_pending' => ['bool', 'event'=>'resource', 'timeout='=>'int'],
'event_timer_set' => ['bool', 'event'=>'resource', 'callback'=>'callable', 'arg='=>'mixed'],
'EventBase::__construct' => ['void', 'cfg='=>'EventConfig'],
'EventBase::dispatch' => ['void'],
'EventBase::exit' => ['bool', 'timeout='=>'float'],
'EventBase::free' => ['void'],
'EventBase::getFeatures' => ['int'],
'EventBase::getMethod' => ['string', 'cfg='=>'EventConfig'],
'EventBase::getTimeOfDayCached' => ['float'],
'EventBase::gotExit' => ['bool'],
'EventBase::gotStop' => ['bool'],
'EventBase::loop' => ['bool', 'flags='=>'int'],
'EventBase::priorityInit' => ['bool', 'n_priorities'=>'int'],
'EventBase::reInit' => ['bool'],
'EventBase::stop' => ['bool'],
'EventBuffer::__construct' => ['void'],
'EventBuffer::add' => ['bool', 'data'=>'string'],
'EventBuffer::addBuffer' => ['bool', 'buf'=>'EventBuffer'],
'EventBuffer::appendFrom' => ['int', 'buf'=>'EventBuffer', 'len'=>'int'],
'EventBuffer::copyout' => ['int', '&w_data'=>'string', 'max_bytes'=>'int'],
'EventBuffer::drain' => ['bool', 'len'=>'int'],
'EventBuffer::enableLocking' => ['void'],
'EventBuffer::expand' => ['bool', 'len'=>'int'],
'EventBuffer::freeze' => ['bool', 'at_front'=>'bool'],
'EventBuffer::lock' => ['void'],
'EventBuffer::prepend' => ['bool', 'data'=>'string'],
'EventBuffer::prependBuffer' => ['bool', 'buf'=>'EventBuffer'],
'EventBuffer::pullup' => ['string', 'size'=>'int'],
'EventBuffer::read' => ['string', 'max_bytes'=>'int'],
'EventBuffer::readFrom' => ['int', 'fd'=>'mixed', 'howmuch'=>'int'],
'EventBuffer::readLine' => ['string', 'eol_style'=>'int'],
'EventBuffer::search' => ['mixed', 'what'=>'string', 'start='=>'int', 'end='=>'int'],
'EventBuffer::searchEol' => ['mixed', 'start='=>'int', 'eol_style='=>'int'],
'EventBuffer::substr' => ['string', 'start'=>'int', 'length='=>'int'],
'EventBuffer::unfreeze' => ['bool', 'at_front'=>'bool'],
'EventBuffer::unlock' => ['bool'],
'EventBuffer::write' => ['int', 'fd'=>'mixed', 'howmuch='=>'int'],
'EventBufferEvent::__construct' => ['void', 'base'=>'EventBase', 'socket='=>'mixed', 'options='=>'int', 'readcb='=>'callable', 'writecb='=>'callable', 'eventcb='=>'callable'],
'EventBufferEvent::close' => ['void'],
'EventBufferEvent::connect' => ['bool', 'addr'=>'string'],
'EventBufferEvent::connectHost' => ['bool', 'dns_base'=>'EventDnsBase', 'hostname'=>'string', 'port'=>'int', 'family='=>'int'],
'EventBufferEvent::createPair' => ['array', 'base'=>'EventBase', 'options='=>'int'],
'EventBufferEvent::disable' => ['bool', 'events'=>'int'],
'EventBufferEvent::enable' => ['bool', 'events'=>'int'],
'EventBufferEvent::free' => ['void'],
'EventBufferEvent::getDnsErrorString' => ['string'],
'EventBufferEvent::getEnabled' => ['int'],
'EventBufferEvent::getInput' => ['EventBuffer'],
'EventBufferEvent::getOutput' => ['EventBuffer'],
'EventBufferEvent::read' => ['string', 'size'=>'int'],
'EventBufferEvent::readBuffer' => ['bool', 'buf'=>'EventBuffer'],
'EventBufferEvent::setCallbacks' => ['void', 'readcb'=>'callable', 'writecb'=>'callable', 'eventcb'=>'callable', 'arg='=>'string'],
'EventBufferEvent::setPriority' => ['bool', 'priority'=>'int'],
'EventBufferEvent::setTimeouts' => ['bool', 'timeout_read'=>'float', 'timeout_write'=>'float'],
'EventBufferEvent::setWatermark' => ['void', 'events'=>'int', 'lowmark'=>'int', 'highmark'=>'int'],
'EventBufferEvent::sslError' => ['string'],
'EventBufferEvent::sslFilter' => ['EventBufferEvent', 'base'=>'EventBase', 'underlying'=>'EventBufferEvent', 'ctx'=>'EventSslContext', 'state'=>'int', 'options='=>'int'],
'EventBufferEvent::sslGetCipherInfo' => ['string'],
'EventBufferEvent::sslGetCipherName' => ['string'],
'EventBufferEvent::sslGetCipherVersion' => ['string'],
'EventBufferEvent::sslGetProtocol' => ['string'],
'EventBufferEvent::sslRenegotiate' => ['void'],
'EventBufferEvent::sslSocket' => ['EventBufferEvent', 'base'=>'EventBase', 'socket'=>'mixed', 'ctx'=>'EventSslContext', 'state'=>'int', 'options='=>'int'],
'EventBufferEvent::write' => ['bool', 'data'=>'string'],
'EventBufferEvent::writeBuffer' => ['bool', 'buf'=>'EventBuffer'],
'EventConfig::__construct' => ['void'],
'EventConfig::avoidMethod' => ['bool', 'method'=>'string'],
'EventConfig::requireFeatures' => ['bool', 'feature'=>'int'],
'EventConfig::setMaxDispatchInterval' => ['void', 'max_interval'=>'int', 'max_callbacks'=>'int', 'min_priority'=>'int'],
'EventDnsBase::__construct' => ['void', 'base'=>'EventBase', 'initialize'=>'bool'],
'EventDnsBase::addNameserverIp' => ['bool', 'ip'=>'string'],
'EventDnsBase::addSearch' => ['void', 'domain'=>'string'],
'EventDnsBase::clearSearch' => ['void'],
'EventDnsBase::countNameservers' => ['int'],
'EventDnsBase::loadHosts' => ['bool', 'hosts'=>'string'],
'EventDnsBase::parseResolvConf' => ['bool', 'flags'=>'int', 'filename'=>'string'],
'EventDnsBase::setOption' => ['bool', 'option'=>'string', 'value'=>'string'],
'EventDnsBase::setSearchNdots' => ['bool', 'ndots'=>'int'],
'EventHttp::__construct' => ['void', 'base'=>'EventBase', 'ctx='=>'EventSslContext'],
'EventHttp::accept' => ['bool', 'socket'=>'mixed'],
'EventHttp::addServerAlias' => ['bool', 'alias'=>'string'],
'EventHttp::bind' => ['void', 'address'=>'string', 'port'=>'int'],
'EventHttp::removeServerAlias' => ['bool', 'alias'=>'string'],
'EventHttp::setAllowedMethods' => ['void', 'methods'=>'int'],
'EventHttp::setCallback' => ['void', 'path'=>'string', 'cb'=>'string', 'arg='=>'string'],
'EventHttp::setDefaultCallback' => ['void', 'cb'=>'string', 'arg='=>'string'],
'EventHttp::setMaxBodySize' => ['void', 'value'=>'int'],
'EventHttp::setMaxHeadersSize' => ['void', 'value'=>'int'],
'EventHttp::setTimeout' => ['void', 'value'=>'int'],
'EventHttpConnection::__construct' => ['void', 'base'=>'EventBase', 'dns_base'=>'EventDnsBase', 'address'=>'string', 'port'=>'int', 'ctx='=>'EventSslContext'],
'EventHttpConnection::getBase' => ['EventBase'],
'EventHttpConnection::getPeer' => ['void', '&w_address'=>'string', '&w_port'=>'int'],
'EventHttpConnection::makeRequest' => ['bool', 'req'=>'EventHttpRequest', 'type'=>'int', 'uri'=>'string'],
'EventHttpConnection::setCloseCallback' => ['void', 'callback'=>'callable', 'data='=>'mixed'],
'EventHttpConnection::setLocalAddress' => ['void', 'address'=>'string'],
'EventHttpConnection::setLocalPort' => ['void', 'port'=>'int'],
'EventHttpConnection::setMaxBodySize' => ['void', 'max_size'=>'string'],
'EventHttpConnection::setMaxHeadersSize' => ['void', 'max_size'=>'string'],
'EventHttpConnection::setRetries' => ['void', 'retries'=>'int'],
'EventHttpConnection::setTimeout' => ['void', 'timeout'=>'int'],
'EventHttpRequest::__construct' => ['void', 'callback'=>'callable', 'data='=>'mixed'],
'EventHttpRequest::addHeader' => ['bool', 'key'=>'string', 'value'=>'string', 'type'=>'int'],
'EventHttpRequest::cancel' => ['void'],
'EventHttpRequest::clearHeaders' => ['void'],
'EventHttpRequest::closeConnection' => ['void'],
'EventHttpRequest::findHeader' => ['void', 'key'=>'string', 'type'=>'string'],
'EventHttpRequest::free' => ['void'],
'EventHttpRequest::getBufferEvent' => ['EventBufferEvent'],
'EventHttpRequest::getCommand' => ['void'],
'EventHttpRequest::getConnection' => ['EventHttpConnection'],
'EventHttpRequest::getHost' => ['string'],
'EventHttpRequest::getInputBuffer' => ['EventBuffer'],
'EventHttpRequest::getInputHeaders' => ['array'],
'EventHttpRequest::getOutputBuffer' => ['EventBuffer'],
'EventHttpRequest::getOutputHeaders' => ['void'],
'EventHttpRequest::getResponseCode' => ['int'],
'EventHttpRequest::getUri' => ['string'],
'EventHttpRequest::removeHeader' => ['void', 'key'=>'string', 'type'=>'string'],
'EventHttpRequest::sendError' => ['void', 'error'=>'int', 'reason='=>'string'],
'EventHttpRequest::sendReply' => ['void', 'code'=>'int', 'reason'=>'string', 'buf='=>'EventBuffer'],
'EventHttpRequest::sendReplyChunk' => ['void', 'buf'=>'EventBuffer'],
'EventHttpRequest::sendReplyEnd' => ['void'],
'EventHttpRequest::sendReplyStart' => ['void', 'code'=>'int', 'reason'=>'string'],
'EventListener::__construct' => ['void', 'base'=>'EventBase', 'cb'=>'callable', 'data'=>'mixed', 'flags'=>'int', 'backlog'=>'int', 'target'=>'mixed'],
'EventListener::disable' => ['bool'],
'EventListener::enable' => ['bool'],
'EventListener::getBase' => ['void'],
'EventListener::getSocketName' => ['bool', '&w_address'=>'string', '&w_port='=>'mixed'],
'EventListener::setCallback' => ['void', 'cb'=>'callable', 'arg='=>'mixed'],
'EventListener::setErrorCallback' => ['void', 'cb'=>'string'],
'EventSslContext::__construct' => ['void', 'method'=>'string', 'options'=>'string'],
'EventUtil::__construct' => ['void'],
'EventUtil::getLastSocketErrno' => ['int', 'socket='=>'mixed'],
'EventUtil::getLastSocketError' => ['string', 'socket='=>'mixed'],
'EventUtil::getSocketFd' => ['int', 'socket'=>'mixed'],
'EventUtil::getSocketName' => ['bool', 'socket'=>'mixed', '&w_address'=>'string', '&w_port='=>'mixed'],
'EventUtil::setSocketOption' => ['bool', 'socket'=>'mixed', 'level'=>'int', 'optname'=>'int', 'optval'=>'mixed'],
'EventUtil::sslRandPoll' => ['void'],
'EvFork::__construct' => ['void', 'callback'=>'callable', 'data='=>'mixed', 'priority='=>'int'],
'EvFork::createStopped' => ['object', 'callback'=>'string', 'data='=>'string', 'priority='=>'string'],
'EvIdle::__construct' => ['void', 'callback'=>'callable', 'data='=>'mixed', 'priority='=>'int'],
'EvIdle::createStopped' => ['object', 'callback'=>'string', 'data='=>'mixed', 'priority='=>'int'],
'EvIo::__construct' => ['void', 'fd'=>'mixed', 'events'=>'int', 'callback'=>'callable', 'data='=>'mixed', 'priority='=>'int'],
'EvIo::createStopped' => ['EvIo', 'fd'=>'mixed', 'events'=>'int', 'callback'=>'callable', 'data='=>'mixed', 'priority='=>'int'],
'EvIo::set' => ['void', 'fd'=>'mixed', 'events'=>'int'],
'EvLoop::__construct' => ['void', 'flags='=>'int', 'data='=>'mixed', 'io_interval='=>'float', 'timeout_interval='=>'float'],
'EvLoop::backend' => ['int'],
'EvLoop::check' => ['EvCheck', 'callback'=>'string', 'data='=>'string', 'priority='=>'string'],
'EvLoop::child' => ['EvChild', 'pid'=>'string', 'trace'=>'string', 'callback'=>'string', 'data='=>'string', 'priority='=>'string'],
'EvLoop::defaultLoop' => ['EvLoop', 'flags='=>'int', 'data='=>'mixed', 'io_interval='=>'float', 'timeout_interval='=>'float'],
'EvLoop::embed' => ['EvEmbed', 'other'=>'string', 'callback='=>'string', 'data='=>'string', 'priority='=>'string'],
'EvLoop::fork' => ['EvFork', 'callback'=>'callable', 'data='=>'mixed', 'priority='=>'int'],
'EvLoop::idle' => ['EvIdle', 'callback'=>'callable', 'data='=>'mixed', 'priority='=>'int'],
'EvLoop::invokePending' => ['void'],
'EvLoop::io' => ['EvIo', 'fd'=>'mixed', 'events'=>'int', 'callback'=>'callable', 'data='=>'mixed', 'priority='=>'int'],
'EvLoop::loopFork' => ['void'],
'EvLoop::now' => ['float'],
'EvLoop::nowUpdate' => ['void'],
'EvLoop::periodic' => ['EvPeriodic', 'offset'=>'float', 'interval'=>'float', 'callback'=>'callable', 'data='=>'mixed', 'priority='=>'int'],
'EvLoop::prepare' => ['EvPrepare', 'callback'=>'callable', 'data='=>'mixed', 'priority='=>'int'],
'EvLoop::resume' => ['void'],
'EvLoop::run' => ['void', 'flags='=>'int'],
'EvLoop::signal' => ['EvSignal', 'signum'=>'int', 'callback'=>'callable', 'data='=>'mixed', 'priority='=>'int'],
'EvLoop::stat' => ['EvStat', 'path'=>'string', 'interval'=>'float', 'callback'=>'callable', 'data='=>'mixed', 'priority='=>'int'],
'EvLoop::stop' => ['void', 'how='=>'int'],
'EvLoop::suspend' => ['void'],
'EvLoop::timer' => ['EvTimer', 'after'=>'float', 'repeat'=>'float', 'callback'=>'callable', 'data='=>'mixed', 'priority='=>'int'],
'EvLoop::verify' => ['void'],
'EvPeriodic::__construct' => ['void', 'offset'=>'float', 'interval'=>'string', 'reschedule_cb'=>'callable', 'callback'=>'callable', 'data='=>'mixed', 'priority='=>'int'],
'EvPeriodic::again' => ['void'],
'EvPeriodic::at' => ['float'],
'EvPeriodic::createStopped' => ['EvPeriodic', 'offset'=>'float', 'interval'=>'float', 'reschedule_cb'=>'callable', 'callback'=>'callable', 'data='=>'mixed', 'priority='=>'int'],
'EvPeriodic::set' => ['void', 'offset'=>'float', 'interval'=>'float'],
'EvPrepare::__construct' => ['void', 'callback'=>'string', 'data='=>'string', 'priority='=>'string'],
'EvPrepare::createStopped' => ['EvPrepare', 'callback'=>'callable', 'data='=>'mixed', 'priority='=>'int'],
'EvSignal::__construct' => ['void', 'signum'=>'int', 'callback'=>'callable', 'data='=>'mixed', 'priority='=>'int'],
'EvSignal::createStopped' => ['EvSignal', 'signum'=>'int', 'callback'=>'callable', 'data='=>'mixed', 'priority='=>'int'],
'EvSignal::set' => ['void', 'signum'=>'int'],
'EvStat::__construct' => ['void', 'path'=>'string', 'interval'=>'float', 'callback'=>'callable', 'data='=>'mixed', 'priority='=>'int'],
'EvStat::attr' => ['array'],
'EvStat::createStopped' => ['void', 'path'=>'string', 'interval'=>'float', 'callback'=>'callable', 'data='=>'mixed', 'priority='=>'int'],
'EvStat::prev' => ['void'],
'EvStat::set' => ['void', 'path'=>'string', 'interval'=>'float'],
'EvStat::stat' => ['bool'],
'EvTimer::__construct' => ['void', 'after'=>'float', 'repeat'=>'float', 'callback'=>'callable', 'data='=>'mixed', 'priority='=>'int'],
'EvTimer::again' => ['void'],
'EvTimer::createStopped' => ['EvTimer', 'after'=>'float', 'repeat'=>'float', 'callback'=>'callable', 'data='=>'mixed', 'priority='=>'int'],
'EvTimer::set' => ['void', 'after'=>'float', 'repeat'=>'float'],
'EvWatcher::__construct' => ['void'],
'EvWatcher::clear' => ['int'],
'EvWatcher::feed' => ['void', 'revents'=>'int'],
'EvWatcher::getLoop' => ['EvLoop'],
'EvWatcher::invoke' => ['void', 'revents'=>'int'],
'EvWatcher::keepalive' => ['bool', 'value='=>'bool'],
'EvWatcher::setCallback' => ['void', 'callback'=>'callable'],
'EvWatcher::start' => ['void'],
'EvWatcher::stop' => ['void'],
'Exception::__clone' => ['void'],
'Exception::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Throwable)|(?Exception)'],
'Exception::__toString' => ['string'],
'Exception::getCode' => ['mixed'],
'Exception::getFile' => ['string'],
'Exception::getLine' => ['int'],
'Exception::getMessage' => ['string'],
'Exception::getPrevious' => ['(?Throwable)|(?Exception)'],
'Exception::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'Exception::getTraceAsString' => ['string'],
'exec' => ['string', 'command'=>'string', '&w_output='=>'array', '&w_return_value='=>'int'],
'exif_imagetype' => ['int|false', 'imagefile'=>'string'],
'exif_read_data' => ['array|false', 'filename'=>'string|resource', 'sections_needed='=>'string', 'sub_arrays='=>'bool', 'read_thumbnail='=>'bool'],
'exif_tagname' => ['string|false', 'index'=>'int'],
'exif_thumbnail' => ['string|false', 'filename'=>'string', '&w_width='=>'int', '&w_height='=>'int', '&w_imagetype='=>'int'],
'exp' => ['float', 'number'=>'float'],
'expect_expectl' => ['int', 'expect'=>'resource', 'cases'=>'array', 'match='=>'array'],
'expect_popen' => ['resource|false', 'command'=>'string'],
'explode' => ['list<string>|false', 'separator'=>'string', 'str'=>'string', 'limit='=>'int'],
'expm1' => ['float', 'number'=>'float'],
'extension_loaded' => ['bool', 'extension_name'=>'string'],
'extract' => ['int', '&rw_var_array'=>'array', 'extract_type='=>'int', 'prefix='=>'string|null'],
'ezmlm_hash' => ['int', 'addr'=>'string'],
'fam_cancel_monitor' => ['bool', 'fam'=>'resource', 'fam_monitor'=>'resource'],
'fam_close' => ['void', 'fam'=>'resource'],
'fam_monitor_collection' => ['resource', 'fam'=>'resource', 'dirname'=>'string', 'depth'=>'int', 'mask'=>'string'],
'fam_monitor_directory' => ['resource', 'fam'=>'resource', 'dirname'=>'string'],
'fam_monitor_file' => ['resource', 'fam'=>'resource', 'filename'=>'string'],
'fam_next_event' => ['array', 'fam'=>'resource'],
'fam_open' => ['resource|false', 'appname='=>'string'],
'fam_pending' => ['int', 'fam'=>'resource'],
'fam_resume_monitor' => ['bool', 'fam'=>'resource', 'fam_monitor'=>'resource'],
'fam_suspend_monitor' => ['bool', 'fam'=>'resource', 'fam_monitor'=>'resource'],
'fann_cascadetrain_on_data' => ['bool', 'ann'=>'resource', 'data'=>'resource', 'max_neurons'=>'int', 'neurons_between_reports'=>'int', 'desired_error'=>'float'],
'fann_cascadetrain_on_file' => ['bool', 'ann'=>'resource', 'filename'=>'string', 'max_neurons'=>'int', 'neurons_between_reports'=>'int', 'desired_error'=>'float'],
'fann_clear_scaling_params' => ['bool', 'ann'=>'resource'],
'fann_copy' => ['resource', 'ann'=>'resource'],
'fann_create_from_file' => ['resource', 'configuration_file'=>'string'],
'fann_create_shortcut' => ['reference', 'num_layers'=>'int', 'num_neurons1'=>'int', 'num_neurons2'=>'int', '...args='=>'int'],
'fann_create_shortcut_array' => ['resource', 'num_layers'=>'int', 'layers'=>'array'],
'fann_create_sparse' => ['resource|false', 'connection_rate'=>'float', 'num_layers'=>'int', 'num_neurons1'=>'int', 'num_neurons2'=>'int', '...args='=>'int'],
'fann_create_sparse_array' => ['resource|false', 'connection_rate'=>'float', 'num_layers'=>'int', 'layers'=>'array'],
'fann_create_standard' => ['resource', 'num_layers'=>'int', 'num_neurons1'=>'int', 'num_neurons2'=>'int', '...args='=>'int'],
'fann_create_standard_array' => ['resource', 'num_layers'=>'int', 'layers'=>'array'],
'fann_create_train' => ['resource', 'num_data'=>'int', 'num_input'=>'int', 'num_output'=>'int'],
'fann_create_train_from_callback' => ['resource', 'num_data'=>'int', 'num_input'=>'int', 'num_output'=>'int', 'user_function'=>'callable'],
'fann_descale_input' => ['bool', 'ann'=>'resource', 'input_vector'=>'array'],
'fann_descale_output' => ['bool', 'ann'=>'resource', 'output_vector'=>'array'],
'fann_descale_train' => ['bool', 'ann'=>'resource', 'train_data'=>'resource'],
'fann_destroy' => ['bool', 'ann'=>'resource'],
'fann_destroy_train' => ['bool', 'train_data'=>'resource'],
'fann_duplicate_train_data' => ['resource', 'data'=>'resource'],
'fann_get_activation_function' => ['int', 'ann'=>'resource', 'layer'=>'int', 'neuron'=>'int'],
'fann_get_activation_steepness' => ['float', 'ann'=>'resource', 'layer'=>'int', 'neuron'=>'int'],
'fann_get_bias_array' => ['array', 'ann'=>'resource'],
'fann_get_bit_fail' => ['int', 'ann'=>'resource'],
'fann_get_bit_fail_limit' => ['float', 'ann'=>'resource'],
'fann_get_cascade_activation_functions' => ['array', 'ann'=>'resource'],
'fann_get_cascade_activation_functions_count' => ['int', 'ann'=>'resource'],
'fann_get_cascade_activation_steepnesses' => ['array', 'ann'=>'resource'],
'fann_get_cascade_activation_steepnesses_count' => ['int', 'ann'=>'resource'],
'fann_get_cascade_candidate_change_fraction' => ['float', 'ann'=>'resource'],
'fann_get_cascade_candidate_limit' => ['float', 'ann'=>'resource'],
'fann_get_cascade_candidate_stagnation_epochs' => ['float', 'ann'=>'resource'],
'fann_get_cascade_max_cand_epochs' => ['int', 'ann'=>'resource'],
'fann_get_cascade_max_out_epochs' => ['int', 'ann'=>'resource'],
'fann_get_cascade_min_cand_epochs' => ['int', 'ann'=>'resource'],
'fann_get_cascade_min_out_epochs' => ['int', 'ann'=>'resource'],
'fann_get_cascade_num_candidate_groups' => ['int', 'ann'=>'resource'],
'fann_get_cascade_num_candidates' => ['int', 'ann'=>'resource'],
'fann_get_cascade_output_change_fraction' => ['float', 'ann'=>'resource'],
'fann_get_cascade_output_stagnation_epochs' => ['int', 'ann'=>'resource'],
'fann_get_cascade_weight_multiplier' => ['float', 'ann'=>'resource'],
'fann_get_connection_array' => ['array', 'ann'=>'resource'],
'fann_get_connection_rate' => ['float', 'ann'=>'resource'],
'fann_get_errno' => ['int', 'errdat'=>'resource'],
'fann_get_errstr' => ['string', 'errdat'=>'resource'],
'fann_get_layer_array' => ['array', 'ann'=>'resource'],
'fann_get_learning_momentum' => ['float', 'ann'=>'resource'],
'fann_get_learning_rate' => ['float', 'ann'=>'resource'],
'fann_get_MSE' => ['float', 'ann'=>'resource'],
'fann_get_network_type' => ['int', 'ann'=>'resource'],
'fann_get_num_input' => ['int', 'ann'=>'resource'],
'fann_get_num_layers' => ['int', 'ann'=>'resource'],
'fann_get_num_output' => ['int', 'ann'=>'resource'],
'fann_get_quickprop_decay' => ['float', 'ann'=>'resource'],
'fann_get_quickprop_mu' => ['float', 'ann'=>'resource'],
'fann_get_rprop_decrease_factor' => ['float', 'ann'=>'resource'],
'fann_get_rprop_delta_max' => ['float', 'ann'=>'resource'],
'fann_get_rprop_delta_min' => ['float', 'ann'=>'resource'],
'fann_get_rprop_delta_zero' => ['float|false', 'ann'=>'resource'],
'fann_get_rprop_increase_factor' => ['float', 'ann'=>'resource'],
'fann_get_sarprop_step_error_shift' => ['float', 'ann'=>'resource'],
'fann_get_sarprop_step_error_threshold_factor' => ['float', 'ann'=>'resource'],
'fann_get_sarprop_temperature' => ['float', 'ann'=>'resource'],
'fann_get_sarprop_weight_decay_shift' => ['float', 'ann'=>'resource'],
'fann_get_total_connections' => ['int', 'ann'=>'resource'],
'fann_get_total_neurons' => ['int', 'ann'=>'resource'],
'fann_get_train_error_function' => ['int', 'ann'=>'resource'],
'fann_get_train_stop_function' => ['int', 'ann'=>'resource'],
'fann_get_training_algorithm' => ['int', 'ann'=>'resource'],
'fann_init_weights' => ['bool', 'ann'=>'resource', 'train_data'=>'resource'],
'fann_length_train_data' => ['int', 'data'=>'resource'],
'fann_merge_train_data' => ['resource', 'data1'=>'resource', 'data2'=>'resource'],
'fann_num_input_train_data' => ['int', 'data'=>'resource'],
'fann_num_output_train_data' => ['int', 'data'=>'resource'],
'fann_print_error' => ['void', 'errdat'=>'string'],
'fann_randomize_weights' => ['bool', 'ann'=>'resource', 'min_weight'=>'float', 'max_weight'=>'float'],
'fann_read_train_from_file' => ['resource', 'filename'=>'string'],
'fann_reset_errno' => ['void', 'errdat'=>'resource'],
'fann_reset_errstr' => ['void', 'errdat'=>'resource'],
'fann_reset_MSE' => ['bool', 'ann'=>'string'],
'fann_run' => ['array', 'ann'=>'resource', 'input'=>'array'],
'fann_save' => ['bool', 'ann'=>'resource', 'configuration_file'=>'string'],
'fann_save_train' => ['bool', 'data'=>'resource', 'file_name'=>'string'],
'fann_scale_input' => ['bool', 'ann'=>'resource', 'input_vector'=>'array'],
'fann_scale_input_train_data' => ['bool', 'train_data'=>'resource', 'new_min'=>'float', 'new_max'=>'float'],
'fann_scale_output' => ['bool', 'ann'=>'resource', 'output_vector'=>'array'],
'fann_scale_output_train_data' => ['bool', 'train_data'=>'resource', 'new_min'=>'float', 'new_max'=>'float'],
'fann_scale_train' => ['bool', 'ann'=>'resource', 'train_data'=>'resource'],
'fann_scale_train_data' => ['bool', 'train_data'=>'resource', 'new_min'=>'float', 'new_max'=>'float'],
'fann_set_activation_function' => ['bool', 'ann'=>'resource', 'activation_function'=>'int', 'layer'=>'int', 'neuron'=>'int'],
'fann_set_activation_function_hidden' => ['bool', 'ann'=>'resource', 'activation_function'=>'int'],
'fann_set_activation_function_layer' => ['bool', 'ann'=>'resource', 'activation_function'=>'int', 'layer'=>'int'],
'fann_set_activation_function_output' => ['bool', 'ann'=>'resource', 'activation_function'=>'int'],
'fann_set_activation_steepness' => ['bool', 'ann'=>'resource', 'activation_steepness'=>'float', 'layer'=>'int', 'neuron'=>'int'],
'fann_set_activation_steepness_hidden' => ['bool', 'ann'=>'resource', 'activation_steepness'=>'float'],
'fann_set_activation_steepness_layer' => ['bool', 'ann'=>'resource', 'activation_steepness'=>'float', 'layer'=>'int'],
'fann_set_activation_steepness_output' => ['bool', 'ann'=>'resource', 'activation_steepness'=>'float'],
'fann_set_bit_fail_limit' => ['bool', 'ann'=>'resource', 'bit_fail_limit'=>'float'],
'fann_set_callback' => ['bool', 'ann'=>'resource', 'callback'=>'callable'],
'fann_set_cascade_activation_functions' => ['bool', 'ann'=>'resource', 'cascade_activation_functions'=>'array'],
'fann_set_cascade_activation_steepnesses' => ['bool', 'ann'=>'resource', 'cascade_activation_steepnesses_count'=>'array'],
'fann_set_cascade_candidate_change_fraction' => ['bool', 'ann'=>'resource', 'cascade_candidate_change_fraction'=>'float'],
'fann_set_cascade_candidate_limit' => ['bool', 'ann'=>'resource', 'cascade_candidate_limit'=>'float'],
'fann_set_cascade_candidate_stagnation_epochs' => ['bool', 'ann'=>'resource', 'cascade_candidate_stagnation_epochs'=>'int'],
'fann_set_cascade_max_cand_epochs' => ['bool', 'ann'=>'resource', 'cascade_max_cand_epochs'=>'int'],
'fann_set_cascade_max_out_epochs' => ['bool', 'ann'=>'resource', 'cascade_max_out_epochs'=>'int'],
'fann_set_cascade_min_cand_epochs' => ['bool', 'ann'=>'resource', 'cascade_min_cand_epochs'=>'int'],
'fann_set_cascade_min_out_epochs' => ['bool', 'ann'=>'resource', 'cascade_min_out_epochs'=>'int'],
'fann_set_cascade_num_candidate_groups' => ['bool', 'ann'=>'resource', 'cascade_num_candidate_groups'=>'int'],
'fann_set_cascade_output_change_fraction' => ['bool', 'ann'=>'resource', 'cascade_output_change_fraction'=>'float'],
'fann_set_cascade_output_stagnation_epochs' => ['bool', 'ann'=>'resource', 'cascade_output_stagnation_epochs'=>'int'],
'fann_set_cascade_weight_multiplier' => ['bool', 'ann'=>'resource', 'cascade_weight_multiplier'=>'float'],
'fann_set_error_log' => ['void', 'errdat'=>'resource', 'log_file'=>'string'],
'fann_set_input_scaling_params' => ['bool', 'ann'=>'resource', 'train_data'=>'resource', 'new_input_min'=>'float', 'new_input_max'=>'float'],
'fann_set_learning_momentum' => ['bool', 'ann'=>'resource', 'learning_momentum'=>'float'],
'fann_set_learning_rate' => ['bool', 'ann'=>'resource', 'learning_rate'=>'float'],
'fann_set_output_scaling_params' => ['bool', 'ann'=>'resource', 'train_data'=>'resource', 'new_output_min'=>'float', 'new_output_max'=>'float'],
'fann_set_quickprop_decay' => ['bool', 'ann'=>'resource', 'quickprop_decay'=>'float'],
'fann_set_quickprop_mu' => ['bool', 'ann'=>'resource', 'quickprop_mu'=>'float'],
'fann_set_rprop_decrease_factor' => ['bool', 'ann'=>'resource', 'rprop_decrease_factor'=>'float'],
'fann_set_rprop_delta_max' => ['bool', 'ann'=>'resource', 'rprop_delta_max'=>'float'],
'fann_set_rprop_delta_min' => ['bool', 'ann'=>'resource', 'rprop_delta_min'=>'float'],
'fann_set_rprop_delta_zero' => ['bool', 'ann'=>'resource', 'rprop_delta_zero'=>'float'],
'fann_set_rprop_increase_factor' => ['bool', 'ann'=>'resource', 'rprop_increase_factor'=>'float'],
'fann_set_sarprop_step_error_shift' => ['bool', 'ann'=>'resource', 'sarprop_step_error_shift'=>'float'],
'fann_set_sarprop_step_error_threshold_factor' => ['bool', 'ann'=>'resource', 'sarprop_step_error_threshold_factor'=>'float'],
'fann_set_sarprop_temperature' => ['bool', 'ann'=>'resource', 'sarprop_temperature'=>'float'],
'fann_set_sarprop_weight_decay_shift' => ['bool', 'ann'=>'resource', 'sarprop_weight_decay_shift'=>'float'],
'fann_set_scaling_params' => ['bool', 'ann'=>'resource', 'train_data'=>'resource', 'new_input_min'=>'float', 'new_input_max'=>'float', 'new_output_min'=>'float', 'new_output_max'=>'float'],
'fann_set_train_error_function' => ['bool', 'ann'=>'resource', 'error_function'=>'int'],
'fann_set_train_stop_function' => ['bool', 'ann'=>'resource', 'stop_function'=>'int'],
'fann_set_training_algorithm' => ['bool', 'ann'=>'resource', 'training_algorithm'=>'int'],
'fann_set_weight' => ['bool', 'ann'=>'resource', 'from_neuron'=>'int', 'to_neuron'=>'int', 'weight'=>'float'],
'fann_set_weight_array' => ['bool', 'ann'=>'resource', 'connections'=>'array'],
'fann_shuffle_train_data' => ['bool', 'train_data'=>'resource'],
'fann_subset_train_data' => ['resource', 'data'=>'resource', 'pos'=>'int', 'length'=>'int'],
'fann_test' => ['bool', 'ann'=>'resource', 'input'=>'array', 'desired_output'=>'array'],
'fann_test_data' => ['float', 'ann'=>'resource', 'data'=>'resource'],
'fann_train' => ['bool', 'ann'=>'resource', 'input'=>'array', 'desired_output'=>'array'],
'fann_train_epoch' => ['float', 'ann'=>'resource', 'data'=>'resource'],
'fann_train_on_data' => ['bool', 'ann'=>'resource', 'data'=>'resource', 'max_epochs'=>'int', 'epochs_between_reports'=>'int', 'desired_error'=>'float'],
'fann_train_on_file' => ['bool', 'ann'=>'resource', 'filename'=>'string', 'max_epochs'=>'int', 'epochs_between_reports'=>'int', 'desired_error'=>'float'],
'FANNConnection::__construct' => ['void', 'from_neuron'=>'int', 'to_neuron'=>'int', 'weight'=>'float'],
'FANNConnection::getFromNeuron' => ['int'],
'FANNConnection::getToNeuron' => ['int'],
'FANNConnection::getWeight' => ['void'],
'FANNConnection::setWeight' => ['bool', 'weight'=>'float'],
'fastcgi_finish_request' => ['bool'],
'fbsql_affected_rows' => ['int', 'link_identifier='=>'?resource'],
'fbsql_autocommit' => ['bool', 'link_identifier'=>'resource', 'onoff='=>'bool'],
'fbsql_blob_size' => ['int', 'blob_handle'=>'string', 'link_identifier='=>'?resource'],
'fbsql_change_user' => ['bool', 'user'=>'string', 'password'=>'string', 'database='=>'string', 'link_identifier='=>'?resource'],
'fbsql_clob_size' => ['int', 'clob_handle'=>'string', 'link_identifier='=>'?resource'],
'fbsql_close' => ['bool', 'link_identifier='=>'?resource'],
'fbsql_commit' => ['bool', 'link_identifier='=>'?resource'],
'fbsql_connect' => ['resource', 'hostname='=>'string', 'username='=>'string', 'password='=>'string'],
'fbsql_create_blob' => ['string', 'blob_data'=>'string', 'link_identifier='=>'?resource'],
'fbsql_create_clob' => ['string', 'clob_data'=>'string', 'link_identifier='=>'?resource'],
'fbsql_create_db' => ['bool', 'database_name'=>'string', 'link_identifier='=>'?resource', 'database_options='=>'string'],
'fbsql_data_seek' => ['bool', 'result'=>'resource', 'row_number'=>'int'],
'fbsql_database' => ['string', 'link_identifier'=>'resource', 'database='=>'string'],
'fbsql_database_password' => ['string', 'link_identifier'=>'resource', 'database_password='=>'string'],
'fbsql_db_query' => ['resource', 'database'=>'string', 'query'=>'string', 'link_identifier='=>'?resource'],
'fbsql_db_status' => ['int', 'database_name'=>'string', 'link_identifier='=>'?resource'],
'fbsql_drop_db' => ['bool', 'database_name'=>'string', 'link_identifier='=>'?resource'],
'fbsql_errno' => ['int', 'link_identifier='=>'?resource'],
'fbsql_error' => ['string', 'link_identifier='=>'?resource'],
'fbsql_fetch_array' => ['array', 'result'=>'resource', 'result_type='=>'int'],
'fbsql_fetch_assoc' => ['array', 'result'=>'resource'],
'fbsql_fetch_field' => ['object', 'result'=>'resource', 'field_offset='=>'int'],
'fbsql_fetch_lengths' => ['array', 'result'=>'resource'],
'fbsql_fetch_object' => ['object', 'result'=>'resource'],
'fbsql_fetch_row' => ['array', 'result'=>'resource'],
'fbsql_field_flags' => ['string', 'result'=>'resource', 'field_offset='=>'int'],
'fbsql_field_len' => ['int', 'result'=>'resource', 'field_offset='=>'int'],
'fbsql_field_name' => ['string', 'result'=>'resource', 'field_index='=>'int'],
'fbsql_field_seek' => ['bool', 'result'=>'resource', 'field_offset='=>'int'],
'fbsql_field_table' => ['string', 'result'=>'resource', 'field_offset='=>'int'],
'fbsql_field_type' => ['string', 'result'=>'resource', 'field_offset='=>'int'],
'fbsql_free_result' => ['bool', 'result'=>'resource'],
'fbsql_get_autostart_info' => ['array', 'link_identifier='=>'?resource'],
'fbsql_hostname' => ['string', 'link_identifier'=>'resource', 'host_name='=>'string'],
'fbsql_insert_id' => ['int', 'link_identifier='=>'?resource'],
'fbsql_list_dbs' => ['resource', 'link_identifier='=>'?resource'],
'fbsql_list_fields' => ['resource', 'database_name'=>'string', 'table_name'=>'string', 'link_identifier='=>'?resource'],
'fbsql_list_tables' => ['resource', 'database'=>'string', 'link_identifier='=>'?resource'],
'fbsql_next_result' => ['bool', 'result'=>'resource'],
'fbsql_num_fields' => ['int', 'result'=>'resource'],
'fbsql_num_rows' => ['int', 'result'=>'resource'],
'fbsql_password' => ['string', 'link_identifier'=>'resource', 'password='=>'string'],
'fbsql_pconnect' => ['resource', 'hostname='=>'string', 'username='=>'string', 'password='=>'string'],
'fbsql_query' => ['resource', 'query'=>'string', 'link_identifier='=>'?resource', 'batch_size='=>'int'],
'fbsql_read_blob' => ['string', 'blob_handle'=>'string', 'link_identifier='=>'?resource'],
'fbsql_read_clob' => ['string', 'clob_handle'=>'string', 'link_identifier='=>'?resource'],
'fbsql_result' => ['mixed', 'result'=>'resource', 'row='=>'int', 'field='=>'mixed'],
'fbsql_rollback' => ['bool', 'link_identifier='=>'?resource'],
'fbsql_rows_fetched' => ['int', 'result'=>'resource'],
'fbsql_select_db' => ['bool', 'database_name='=>'string', 'link_identifier='=>'?resource'],
'fbsql_set_characterset' => ['void', 'link_identifier'=>'resource', 'characterset'=>'int', 'in_out_both='=>'int'],
'fbsql_set_lob_mode' => ['bool', 'result'=>'resource', 'lob_mode'=>'int'],
'fbsql_set_password' => ['bool', 'link_identifier'=>'resource', 'user'=>'string', 'password'=>'string', 'old_password'=>'string'],
'fbsql_set_transaction' => ['void', 'link_identifier'=>'resource', 'locking'=>'int', 'isolation'=>'int'],
'fbsql_start_db' => ['bool', 'database_name'=>'string', 'link_identifier='=>'?resource', 'database_options='=>'string'],
'fbsql_stop_db' => ['bool', 'database_name'=>'string', 'link_identifier='=>'?resource'],
'fbsql_table_name' => ['string', 'result'=>'resource', 'index'=>'int'],
'fbsql_username' => ['string', 'link_identifier'=>'resource', 'username='=>'string'],
'fbsql_warnings' => ['bool', 'onoff='=>'bool'],
'fclose' => ['bool', 'fp'=>'resource'],
'fdf_add_doc_javascript' => ['bool', 'fdf_document'=>'resource', 'script_name'=>'string', 'script_code'=>'string'],
'fdf_add_template' => ['bool', 'fdf_document'=>'resource', 'newpage'=>'int', 'filename'=>'string', 'template'=>'string', 'rename'=>'int'],
'fdf_close' => ['void', 'fdf_document'=>'resource'],
'fdf_create' => ['resource'],
'fdf_enum_values' => ['bool', 'fdf_document'=>'resource', 'function'=>'callable', 'userdata='=>'mixed'],
'fdf_errno' => ['int'],
'fdf_error' => ['string', 'error_code='=>'int'],
'fdf_get_ap' => ['bool', 'fdf_document'=>'resource', 'field'=>'string', 'face'=>'int', 'filename'=>'string'],
'fdf_get_attachment' => ['array', 'fdf_document'=>'resource', 'fieldname'=>'string', 'savepath'=>'string'],
'fdf_get_encoding' => ['string', 'fdf_document'=>'resource'],
'fdf_get_file' => ['string', 'fdf_document'=>'resource'],
'fdf_get_flags' => ['int', 'fdf_document'=>'resource', 'fieldname'=>'string', 'whichflags'=>'int'],
'fdf_get_opt' => ['mixed', 'fdf_document'=>'resource', 'fieldname'=>'string', 'element='=>'int'],
'fdf_get_status' => ['string', 'fdf_document'=>'resource'],
'fdf_get_value' => ['mixed', 'fdf_document'=>'resource', 'fieldname'=>'string', 'which='=>'int'],
'fdf_get_version' => ['string', 'fdf_document='=>'resource'],
'fdf_header' => ['void'],
'fdf_next_field_name' => ['string', 'fdf_document'=>'resource', 'fieldname='=>'string'],
'fdf_open' => ['resource|false', 'filename'=>'string'],
'fdf_open_string' => ['resource', 'fdf_data'=>'string'],
'fdf_remove_item' => ['bool', 'fdf_document'=>'resource', 'fieldname'=>'string', 'item'=>'int'],
'fdf_save' => ['bool', 'fdf_document'=>'resource', 'filename='=>'string'],
'fdf_save_string' => ['string', 'fdf_document'=>'resource'],
'fdf_set_ap' => ['bool', 'fdf_document'=>'resource', 'field_name'=>'string', 'face'=>'int', 'filename'=>'string', 'page_number'=>'int'],
'fdf_set_encoding' => ['bool', 'fdf_document'=>'resource', 'encoding'=>'string'],
'fdf_set_file' => ['bool', 'fdf_document'=>'resource', 'url'=>'string', 'target_frame='=>'string'],
'fdf_set_flags' => ['bool', 'fdf_document'=>'resource', 'fieldname'=>'string', 'whichflags'=>'int', 'newflags'=>'int'],
'fdf_set_javascript_action' => ['bool', 'fdf_document'=>'resource', 'fieldname'=>'string', 'trigger'=>'int', 'script'=>'string'],
'fdf_set_on_import_javascript' => ['bool', 'fdf_document'=>'resource', 'script'=>'string', 'before_data_import'=>'bool'],
'fdf_set_opt' => ['bool', 'fdf_document'=>'resource', 'fieldname'=>'string', 'element'=>'int', 'str1'=>'string', 'str2'=>'string'],
'fdf_set_status' => ['bool', 'fdf_document'=>'resource', 'status'=>'string'],
'fdf_set_submit_form_action' => ['bool', 'fdf_document'=>'resource', 'fieldname'=>'string', 'trigger'=>'int', 'script'=>'string', 'flags'=>'int'],
'fdf_set_target_frame' => ['bool', 'fdf_document'=>'resource', 'frame_name'=>'string'],
'fdf_set_value' => ['bool', 'fdf_document'=>'resource', 'fieldname'=>'string', 'value'=>'mixed', 'isname='=>'int'],
'fdf_set_version' => ['bool', 'fdf_document'=>'resource', 'version'=>'string'],
'feof' => ['bool', 'fp'=>'resource'],
'fflush' => ['bool', 'fp'=>'resource'],
'ffmpeg_animated_gif::__construct' => ['void', 'output_file_path'=>'string', 'width'=>'int', 'height'=>'int', 'frame_rate'=>'int', 'loop_count='=>'int'],
'ffmpeg_animated_gif::addFrame' => ['', 'frame_to_add'=>'ffmpeg_frame'],
'ffmpeg_frame::__construct' => ['void', 'gd_image'=>'resource'],
'ffmpeg_frame::crop' => ['', 'crop_top'=>'int', 'crop_bottom='=>'int', 'crop_left='=>'int', 'crop_right='=>'int'],
'ffmpeg_frame::getHeight' => ['int'],
'ffmpeg_frame::getPresentationTimestamp' => ['int'],
'ffmpeg_frame::getPTS' => ['int'],
'ffmpeg_frame::getWidth' => ['int'],
'ffmpeg_frame::resize' => ['', 'width'=>'int', 'height'=>'int', 'crop_top='=>'int', 'crop_bottom='=>'int', 'crop_left='=>'int', 'crop_right='=>'int'],
'ffmpeg_frame::toGDImage' => ['resource'],
'ffmpeg_movie::__construct' => ['void', 'path_to_media'=>'string', 'persistent'=>'bool'],
'ffmpeg_movie::getArtist' => ['string'],
'ffmpeg_movie::getAudioBitRate' => ['int'],
'ffmpeg_movie::getAudioChannels' => ['int'],
'ffmpeg_movie::getAudioCodec' => ['string'],
'ffmpeg_movie::getAudioSampleRate' => ['int'],
'ffmpeg_movie::getAuthor' => ['string'],
'ffmpeg_movie::getBitRate' => ['int'],
'ffmpeg_movie::getComment' => ['string'],
'ffmpeg_movie::getCopyright' => ['string'],
'ffmpeg_movie::getDuration' => ['int'],
'ffmpeg_movie::getFilename' => ['string'],
'ffmpeg_movie::getFrame' => ['ffmpeg_frame', 'framenumber'=>'int'],
'ffmpeg_movie::getFrameCount' => ['int'],
'ffmpeg_movie::getFrameHeight' => ['int'],
'ffmpeg_movie::getFrameNumber' => ['int'],
'ffmpeg_movie::getFrameRate' => ['int'],
'ffmpeg_movie::getFrameWidth' => ['int'],
'ffmpeg_movie::getGenre' => ['string'],
'ffmpeg_movie::getNextKeyFrame' => ['ffmpeg_frame'],
'ffmpeg_movie::getPixelFormat' => [''],
'ffmpeg_movie::getTitle' => ['string'],
'ffmpeg_movie::getTrackNumber' => ['int|string'],
'ffmpeg_movie::getVideoBitRate' => ['int'],
'ffmpeg_movie::getVideoCodec' => ['string'],
'ffmpeg_movie::getYear' => ['int|string'],
'ffmpeg_movie::hasAudio' => ['bool'],
'ffmpeg_movie::hasVideo' => ['bool'],
'fgetc' => ['string|false', 'fp'=>'resource'],
'fgetcsv' => ['list<string>|array{0: null}|false|null', 'fp'=>'resource', 'length='=>'0|positive-int', 'delimiter='=>'string', 'enclosure='=>'string', 'escape='=>'string'],
'fgets' => ['string|false', 'fp'=>'resource', 'length='=>'0|positive-int'],
'fgetss' => ['string|false', 'fp'=>'resource', 'length='=>'0|positive-int', 'allowable_tags='=>'string'],
'file' => ['list<string>|false', 'filename'=>'string', 'flags='=>'int', 'context='=>'resource'],
'file_exists' => ['bool', 'filename'=>'string'],
'file_get_contents' => ['string|false', 'filename'=>'string', 'use_include_path='=>'bool', 'context='=>'?resource', 'offset='=>'int', 'maxlen='=>'0|positive-int'],
'file_put_contents' => ['0|positive-int|false', 'file'=>'string', 'data'=>'mixed', 'flags='=>'int', 'context='=>'?resource'],
'fileatime' => ['int|false', 'filename'=>'string'],
'filectime' => ['int|false', 'filename'=>'string'],
'filegroup' => ['int|false', 'filename'=>'string'],
'fileinode' => ['int|false', 'filename'=>'string'],
'filemtime' => ['int|false', 'filename'=>'string'],
'fileowner' => ['int|false', 'filename'=>'string'],
'fileperms' => ['int|false', 'filename'=>'string'],
'filepro' => ['bool', 'directory'=>'string'],
'filepro_fieldcount' => ['int'],
'filepro_fieldname' => ['string', 'field_number'=>'int'],
'filepro_fieldtype' => ['string', 'field_number'=>'int'],
'filepro_fieldwidth' => ['int', 'field_number'=>'int'],
'filepro_retrieve' => ['string', 'row_number'=>'int', 'field_number'=>'int'],
'filepro_rowcount' => ['int'],
'filesize' => ['0|positive-int|false', 'filename'=>'string'],
'FilesystemIterator::__construct' => ['void', 'path'=>'string', 'flags='=>'int'],
'FilesystemIterator::current' => ['string|SplFileInfo'],
'FilesystemIterator::getFlags' => ['int'],
'FilesystemIterator::key' => ['string'],
'FilesystemIterator::next' => ['void'],
'FilesystemIterator::rewind' => ['void'],
'FilesystemIterator::setFlags' => ['void', 'flags='=>'int'],
'filetype' => ['string|false', 'filename'=>'string'],
'filter_has_var' => ['bool', 'type'=>'int', 'variable_name'=>'string'],
'filter_id' => ['int|false', 'filtername'=>'string'],
'filter_input' => ['mixed', 'type'=>'int', 'variable_name'=>'string', 'filter='=>'int', 'options='=>'array|int'],
'filter_input_array' => ['array|false|null', 'type'=>'int', 'definition='=>'int|array', 'add_empty='=>'bool'],
'filter_list' => ['array'],
'filter_var' => ['mixed', 'variable'=>'mixed', 'filter='=>'int', 'options='=>'mixed'],
'filter_var_array' => ['array|false|null', 'data'=>'array', 'definition='=>'mixed', 'add_empty='=>'bool'],
'FilterIterator::__construct' => ['void', 'iterator'=>'Iterator'],
'FilterIterator::accept' => ['bool'],
'FilterIterator::current' => ['mixed'],
'FilterIterator::getInnerIterator' => ['Iterator'],
'FilterIterator::key' => ['mixed'],
'FilterIterator::next' => ['void'],
'FilterIterator::rewind' => ['void'],
'FilterIterator::valid' => ['bool'],
'finfo::__construct' => ['void', 'options='=>'int', 'magic_file='=>'string'],
'finfo::finfo' => ['void', 'options='=>'int', 'magic_file='=>'string'],
'finfo::buffer' => ['string|false', 'string'=>'string', 'options='=>'int', 'context='=>'resource'],
'finfo::file' => ['string|false', 'file_name'=>'string', 'options='=>'int', 'context='=>'resource'],
'finfo::set_flags' => ['bool', 'options'=>'int'],
'finfo_buffer' => ['string|false', 'finfo'=>'resource', 'string'=>'string', 'options='=>'int', 'context='=>'resource'],
'finfo_close' => ['bool', 'finfo'=>'resource'],
'finfo_file' => ['string|false', 'finfo'=>'resource', 'file_name'=>'string', 'options='=>'int', 'context='=>'resource'],
'finfo_open' => ['resource|false', 'options='=>'int', 'arg='=>'string'],
'finfo_set_flags' => ['bool', 'finfo'=>'resource', 'options'=>'int'],
'floatval' => ['float', 'var'=>'scalar|array|resource|null'],
'flock' => ['bool', 'fp'=>'resource', 'operation'=>'int', '&w_wouldblock='=>'int'],
'floor' => ['float|false', 'number'=>'float'],
'flush' => ['void'],
'fmod' => ['float', 'x'=>'float', 'y'=>'float'],
'fnmatch' => ['bool', 'pattern'=>'string', 'filename'=>'string', 'flags='=>'int'],
'fopen' => ['resource|false', 'filename'=>'string', 'mode'=>'string', 'use_include_path='=>'bool', 'context='=>'resource|null'],
'forward_static_call' => ['mixed', 'function'=>'callable', '...parameters='=>'mixed'],
'forward_static_call_array' => ['mixed', 'function'=>'callable', 'parameters'=>'array<int,mixed>'],
'fpassthru' => ['0|positive-int|false', 'fp'=>'resource'],
'fpm_get_status' => ['array{pool: string, process-manager: \'dynamic\'|\'ondemand\'|\'static\', start-time: int<0, max>, start-since: int<0, max>, accepted-conn: int<0, max>, listen-queue: int<0, max>, max-listen-queue: int<0, max>, listen-queue-len: int<0, max>, idle-processes: int<0, max>, active-processes: int<1, max>, total-processes: int<1, max>, max-active-processes: int<1, max>, max-children-reached: 0|1, slow-requests: int<0, max>, procs: array<int, array{pid: int<2, max>, state: \'Idle\'|\'Running\', start-time: int<0, max>, start-since: int<0, max>, requests: int<0, max>, request-duration: int<0, max>, request-method: string, request-uri: string, query-string: string, request-length: int<0, max>, user: string, script: string, last-request-cpu: float, last-request-memory: int<0, max>}>}|false'],
'fprintf' => ['int', 'stream'=>'resource', 'format'=>'string', '...values='=>'__stringAndStringable|int|float|null|bool'],
'fputcsv' => ['0|positive-int|false', 'fp'=>'resource', 'fields'=>'array<int|string, __stringAndStringable|int|float|null|bool>', 'delimiter='=>'string', 'enclosure='=>'string', 'escape_char='=>'string'],
'fputs' => ['0|positive-int|false', 'fp'=>'resource', 'str'=>'string', 'length='=>'0|positive-int'],
'fread' => ['string|false', 'fp'=>'resource', 'length'=>'0|positive-int'],
'frenchtojd' => ['int', 'month'=>'int', 'day'=>'int', 'year'=>'int'],
'fribidi_log2vis' => ['string', 'str'=>'string', 'direction'=>'string', 'charset'=>'int'],
'fscanf' => ['list<mixed>|int|false', 'stream'=>'resource', 'format'=>'string', '&...w_vars='=>'string|int|float|null'],
'fseek' => ['0|-1', 'fp'=>'resource', 'offset'=>'int', 'whence='=>'int'],
'fsockopen' => ['resource|false', 'hostname'=>'string', 'port='=>'int', '&w_errno='=>'int', '&w_errstr='=>'string', 'timeout='=>'float'],
'fstat' => ['array|false', 'fp'=>'resource'],
'ftell' => ['int|false', 'fp'=>'resource'],
'ftok' => ['int', 'pathname'=>'string', 'proj'=>'string'],
'ftp_alloc' => ['bool', 'stream'=>'resource', 'size'=>'int', '&w_response='=>'string'],
'ftp_append' => ['bool', 'ftp'=>'resource', 'remote_file'=>'string', 'local_file'=>'string', 'mode='=>'int'],
'ftp_cdup' => ['bool', 'stream'=>'resource'],
'ftp_chdir' => ['bool', 'stream'=>'resource', 'directory'=>'string'],
'ftp_chmod' => ['int|false', 'stream'=>'resource', 'mode'=>'int', 'filename'=>'string'],
'ftp_close' => ['bool', 'stream'=>'resource'],
'ftp_connect' => ['resource|false', 'host'=>'string', 'port='=>'int', 'timeout='=>'int'],
'ftp_delete' => ['bool', 'stream'=>'resource', 'file'=>'string'],
'ftp_exec' => ['bool', 'stream'=>'resource', 'command'=>'string'],
'ftp_fget' => ['bool', 'stream'=>'resource', 'fp'=>'resource', 'remote_file'=>'string', 'mode='=>'int', 'resumepos='=>'int'],
'ftp_fput' => ['bool', 'stream'=>'resource', 'remote_file'=>'string', 'fp'=>'resource', 'mode='=>'int', 'startpos='=>'int'],
'ftp_get' => ['bool', 'stream'=>'resource', 'local_file'=>'string', 'remote_file'=>'string', 'mode='=>'int', 'resume_pos='=>'int'],
'ftp_get_option' => ['mixed', 'stream'=>'resource', 'option'=>'int'],
'ftp_login' => ['bool', 'stream'=>'resource', 'username'=>'string', 'password'=>'string'],
'ftp_mdtm' => ['int', 'stream'=>'resource', 'filename'=>'string'],
'ftp_mkdir' => ['string|false', 'stream'=>'resource', 'directory'=>'string'],
'ftp_mlsd' => ['array|false', 'ftp_stream'=>'resource', 'directory'=>'string'],
'ftp_nb_continue' => ['int', 'stream'=>'resource'],
'ftp_nb_fget' => ['int', 'stream'=>'resource', 'fp'=>'resource', 'remote_file'=>'string', 'mode'=>'int', 'resumepos='=>'int'],
'ftp_nb_fput' => ['int', 'stream'=>'resource', 'remote_file'=>'string', 'fp'=>'resource', 'mode'=>'int', 'startpos='=>'int'],
'ftp_nb_get' => ['int', 'stream'=>'resource', 'local_file'=>'string', 'remote_file'=>'string', 'mode'=>'int', 'resume_pos='=>'int'],
'ftp_nb_put' => ['int|false', 'stream'=>'resource', 'remote_file'=>'string', 'local_file'=>'string', 'mode'=>'int', 'startpos='=>'int'],
'ftp_nlist' => ['array|false', 'stream'=>'resource', 'directory'=>'string'],
'ftp_pasv' => ['bool', 'stream'=>'resource', 'pasv'=>'bool'],
'ftp_put' => ['bool', 'stream'=>'resource', 'remote_file'=>'string', 'local_file'=>'string', 'mode'=>'int', 'startpos='=>'int'],
'ftp_pwd' => ['string|false', 'stream'=>'resource'],
'ftp_raw' => ['array', 'stream'=>'resource', 'command'=>'string'],
'ftp_rawlist' => ['array|false', 'stream'=>'resource', 'directory'=>'string', 'recursive='=>'bool'],
'ftp_rename' => ['bool', 'stream'=>'resource', 'src'=>'string', 'dest'=>'string'],
'ftp_rmdir' => ['bool', 'stream'=>'resource', 'directory'=>'string'],
'ftp_set_option' => ['bool', 'stream'=>'resource', 'option'=>'int', 'value'=>'mixed'],
'ftp_site' => ['bool', 'stream'=>'resource', 'cmd'=>'string'],
'ftp_size' => ['int', 'stream'=>'resource', 'filename'=>'string'],
'ftp_ssl_connect' => ['resource|false', 'host'=>'string', 'port='=>'int', 'timeout='=>'int'],
'ftp_systype' => ['string|false', 'stream'=>'resource'],
'ftruncate' => ['bool', 'fp'=>'resource', 'size'=>'0|positive-int'],
'func_get_arg' => ['mixed', 'arg_num'=>'0|positive-int'],
'func_get_args' => ['list<mixed>'],
'func_num_args' => ['0|positive-int'],
'function_exists' => ['bool', 'function_name'=>'string'],
'fwrite' => ['0|positive-int|false', 'fp'=>'resource', 'str'=>'string', 'length='=>'0|positive-int'],
'gc_collect_cycles' => ['int'],
'gc_disable' => ['void'],
'gc_enable' => ['void'],
'gc_enabled' => ['bool'],
'gc_mem_caches' => ['int'],
'gc_status' => ['array{runs:int,collected:int,threshold:int,roots:int}'],
'gd_info' => ['array'],
'gearman_bugreport' => [''],
'gearman_client_add_options' => ['', 'client_object'=>'', 'option'=>''],
'gearman_client_add_server' => ['', 'client_object'=>'', 'host'=>'', 'port'=>''],
'gearman_client_add_servers' => ['', 'client_object'=>'', 'servers'=>''],
'gearman_client_add_task' => ['', 'client_object'=>'', 'function_name'=>'', 'workload'=>'', 'context'=>'', 'unique'=>''],
'gearman_client_add_task_background' => ['', 'client_object'=>'', 'function_name'=>'', 'workload'=>'', 'context'=>'', 'unique'=>''],
'gearman_client_add_task_high' => ['', 'client_object'=>'', 'function_name'=>'', 'workload'=>'', 'context'=>'', 'unique'=>''],
'gearman_client_add_task_high_background' => ['', 'client_object'=>'', 'function_name'=>'', 'workload'=>'', 'context'=>'', 'unique'=>''],
'gearman_client_add_task_low' => ['', 'client_object'=>'', 'function_name'=>'', 'workload'=>'', 'context'=>'', 'unique'=>''],
'gearman_client_add_task_low_background' => ['', 'client_object'=>'', 'function_name'=>'', 'workload'=>'', 'context'=>'', 'unique'=>''],
'gearman_client_add_task_status' => ['', 'client_object'=>'', 'job_handle'=>'', 'context'=>''],
'gearman_client_clear_fn' => ['', 'client_object'=>''],
'gearman_client_clone' => ['', 'client_object'=>''],
'gearman_client_context' => ['', 'client_object'=>''],
'gearman_client_create' => ['', 'client_object'=>''],
'gearman_client_do' => ['', 'client_object'=>'', 'function_name'=>'', 'workload'=>'', 'unique'=>''],
'gearman_client_do_background' => ['', 'client_object'=>'', 'function_name'=>'', 'workload'=>'', 'unique'=>''],
'gearman_client_do_high' => ['', 'client_object'=>'', 'function_name'=>'', 'workload'=>'', 'unique'=>''],
'gearman_client_do_high_background' => ['', 'client_object'=>'', 'function_name'=>'', 'workload'=>'', 'unique'=>''],
'gearman_client_do_job_handle' => ['', 'client_object'=>''],
'gearman_client_do_low' => ['', 'client_object'=>'', 'function_name'=>'', 'workload'=>'', 'unique'=>''],
'gearman_client_do_low_background' => ['', 'client_object'=>'', 'function_name'=>'', 'workload'=>'', 'unique'=>''],
'gearman_client_do_normal' => ['', 'client_object'=>'', 'function_name'=>'string', 'workload'=>'string', 'unique'=>'string'],
'gearman_client_do_status' => ['', 'client_object'=>''],
'gearman_client_echo' => ['', 'client_object'=>'', 'workload'=>''],
'gearman_client_errno' => ['', 'client_object'=>''],
'gearman_client_error' => ['', 'client_object'=>''],
'gearman_client_job_status' => ['', 'client_object'=>'', 'job_handle'=>''],
'gearman_client_options' => ['', 'client_object'=>''],
'gearman_client_remove_options' => ['', 'client_object'=>'', 'option'=>''],
'gearman_client_return_code' => ['', 'client_object'=>''],
'gearman_client_run_tasks' => ['', 'data'=>''],
'gearman_client_set_complete_fn' => ['', 'client_object'=>'', 'callback'=>''],
'gearman_client_set_context' => ['', 'client_object'=>'', 'context'=>''],
'gearman_client_set_created_fn' => ['', 'client_object'=>'', 'callback'=>''],
'gearman_client_set_data_fn' => ['', 'client_object'=>'', 'callback'=>''],
'gearman_client_set_exception_fn' => ['', 'client_object'=>'', 'callback'=>''],
'gearman_client_set_fail_fn' => ['', 'client_object'=>'', 'callback'=>''],
'gearman_client_set_options' => ['', 'client_object'=>'', 'option'=>''],
'gearman_client_set_status_fn' => ['', 'client_object'=>'', 'callback'=>''],
'gearman_client_set_timeout' => ['', 'client_object'=>'', 'timeout'=>''],
'gearman_client_set_warning_fn' => ['', 'client_object'=>'', 'callback'=>''],
'gearman_client_set_workload_fn' => ['', 'client_object'=>'', 'callback'=>''],
'gearman_client_timeout' => ['', 'client_object'=>''],
'gearman_client_wait' => ['', 'client_object'=>''],
'gearman_job_function_name' => ['', 'job_object'=>''],
'gearman_job_handle' => ['string'],
'gearman_job_return_code' => ['', 'job_object'=>''],
'gearman_job_send_complete' => ['', 'job_object'=>'', 'result'=>''],
'gearman_job_send_data' => ['', 'job_object'=>'', 'data'=>''],
'gearman_job_send_exception' => ['', 'job_object'=>'', 'exception'=>''],
'gearman_job_send_fail' => ['', 'job_object'=>''],
'gearman_job_send_status' => ['', 'job_object'=>'', 'numerator'=>'', 'denominator'=>''],
'gearman_job_send_warning' => ['', 'job_object'=>'', 'warning'=>''],
'gearman_job_status' => ['array', 'job_handle'=>'string'],
'gearman_job_unique' => ['', 'job_object'=>''],
'gearman_job_workload' => ['', 'job_object'=>''],
'gearman_job_workload_size' => ['', 'job_object'=>''],
'gearman_task_data' => ['', 'task_object'=>''],
'gearman_task_data_size' => ['', 'task_object'=>''],
'gearman_task_denominator' => ['', 'task_object'=>''],
'gearman_task_function_name' => ['', 'task_object'=>''],
'gearman_task_is_known' => ['', 'task_object'=>''],
'gearman_task_is_running' => ['', 'task_object'=>''],
'gearman_task_job_handle' => ['', 'task_object'=>''],
'gearman_task_numerator' => ['', 'task_object'=>''],
'gearman_task_recv_data' => ['', 'task_object'=>'', 'data_len'=>''],
'gearman_task_return_code' => ['', 'task_object'=>''],
'gearman_task_send_workload' => ['', 'task_object'=>'', 'data'=>''],
'gearman_task_unique' => ['', 'task_object'=>''],
'gearman_verbose_name' => ['', 'verbose'=>''],
'gearman_version' => [''],
'gearman_worker_add_function' => ['', 'worker_object'=>'', 'function_name'=>'', 'function'=>'', 'data'=>'', 'timeout'=>''],
'gearman_worker_add_options' => ['', 'worker_object'=>'', 'option'=>''],
'gearman_worker_add_server' => ['', 'worker_object'=>'', 'host'=>'', 'port'=>''],
'gearman_worker_add_servers' => ['', 'worker_object'=>'', 'servers'=>''],
'gearman_worker_clone' => ['', 'worker_object'=>''],
'gearman_worker_create' => [''],
'gearman_worker_echo' => ['', 'worker_object'=>'', 'workload'=>''],
'gearman_worker_errno' => ['', 'worker_object'=>''],
'gearman_worker_error' => ['', 'worker_object'=>''],
'gearman_worker_grab_job' => ['', 'worker_object'=>''],
'gearman_worker_options' => ['', 'worker_object'=>''],
'gearman_worker_register' => ['', 'worker_object'=>'', 'function_name'=>'', 'timeout'=>''],
'gearman_worker_remove_options' => ['', 'worker_object'=>'', 'option'=>''],
'gearman_worker_return_code' => ['', 'worker_object'=>''],
'gearman_worker_set_options' => ['', 'worker_object'=>'', 'option'=>''],
'gearman_worker_set_timeout' => ['', 'worker_object'=>'', 'timeout'=>''],
'gearman_worker_timeout' => ['', 'worker_object'=>''],
'gearman_worker_unregister' => ['', 'worker_object'=>'', 'function_name'=>''],
'gearman_worker_unregister_all' => ['', 'worker_object'=>''],
'gearman_worker_wait' => ['', 'worker_object'=>''],
'gearman_worker_work' => ['', 'worker_object'=>''],
'GearmanClient::__construct' => ['void'],
'GearmanClient::addOptions' => ['bool', 'options'=>'int'],
'GearmanClient::addServer' => ['bool', 'host='=>'string', 'port='=>'int'],
'GearmanClient::addServers' => ['bool', 'servers='=>'string'],
'GearmanClient::addTask' => ['GearmanTask', 'function_name'=>'string', 'workload'=>'string', 'context='=>'mixed', 'unique='=>'string'],
'GearmanClient::addTaskBackground' => ['GearmanTask', 'function_name'=>'string', 'workload'=>'string', 'context='=>'mixed', 'unique='=>'string'],
'GearmanClient::addTaskHigh' => ['GearmanTask', 'function_name'=>'string', 'workload'=>'string', 'context='=>'mixed', 'unique='=>'string'],
'GearmanClient::addTaskHighBackground' => ['GearmanTask', 'function_name'=>'string', 'workload'=>'string', 'context='=>'mixed', 'unique='=>'string'],
'GearmanClient::addTaskLow' => ['GearmanTask', 'function_name'=>'string', 'workload'=>'string', 'context='=>'mixed', 'unique='=>'string'],
'GearmanClient::addTaskLowBackground' => ['GearmanTask', 'function_name'=>'string', 'workload'=>'string', 'context='=>'mixed', 'unique='=>'string'],
'GearmanClient::addTaskStatus' => ['GearmanTask', 'job_handle'=>'string', 'context='=>'string'],
'GearmanClient::clearCallbacks' => ['bool'],
'GearmanClient::clone' => ['GearmanClient'],
'GearmanClient::context' => ['string'],
'GearmanClient::data' => ['string'],
'GearmanClient::do' => ['string', 'function_name'=>'string', 'workload'=>'string', 'unique='=>'string'],
'GearmanClient::doBackground' => ['string', 'function_name'=>'string', 'workload'=>'string', 'unique='=>'string'],
'GearmanClient::doHigh' => ['string', 'function_name'=>'string', 'workload'=>'string', 'unique='=>'string'],
'GearmanClient::doHighBackground' => ['string', 'function_name'=>'string', 'workload'=>'string', 'unique='=>'string'],
'GearmanClient::doJobHandle' => ['string'],
'GearmanClient::doLow' => ['string', 'function_name'=>'string', 'workload'=>'string', 'unique='=>'string'],
'GearmanClient::doLowBackground' => ['string', 'function_name'=>'string', 'workload'=>'string', 'unique='=>'string'],
'GearmanClient::doNormal' => ['string', 'function_name'=>'string', 'workload'=>'string', 'unique='=>'string'],
'GearmanClient::doStatus' => ['array'],
'GearmanClient::echo' => ['bool', 'workload'=>'string'],
'GearmanClient::error' => ['string'],
'GearmanClient::getErrno' => ['int'],
'GearmanClient::jobStatus' => ['array', 'job_handle'=>'string'],
'GearmanClient::options' => [''],
'GearmanClient::ping' => ['bool', 'workload'=>'string'],
'GearmanClient::removeOptions' => ['bool', 'options'=>'int'],
'GearmanClient::returnCode' => ['int'],
'GearmanClient::runTasks' => ['bool'],
'GearmanClient::setClientCallback' => ['void', 'callback'=>'callable'],
'GearmanClient::setCompleteCallback' => ['bool', 'callback'=>'callable'],
'GearmanClient::setContext' => ['bool', 'context'=>'string'],
'GearmanClient::setCreatedCallback' => ['bool', 'callback'=>'string'],
'GearmanClient::setData' => ['bool', 'data'=>'string'],
'GearmanClient::setDataCallback' => ['bool', 'callback'=>'callable'],
'GearmanClient::setExceptionCallback' => ['bool', 'callback'=>'callable'],
'GearmanClient::setFailCallback' => ['bool', 'callback'=>'callable'],
'GearmanClient::setOptions' => ['bool', 'options'=>'int'],
'GearmanClient::setStatusCallback' => ['bool', 'callback'=>'callable'],
'GearmanClient::setTimeout' => ['bool', 'timeout'=>'int'],
'GearmanClient::setWarningCallback' => ['bool', 'callback'=>'callable'],
'GearmanClient::setWorkloadCallback' => ['bool', 'callback'=>'callable'],
'GearmanClient::timeout' => ['int'],
'GearmanClient::wait' => [''],
'GearmanJob::__construct' => ['void'],
'GearmanJob::complete' => ['bool', 'result'=>'string'],
'GearmanJob::data' => ['bool', 'data'=>'string'],
'GearmanJob::exception' => ['bool', 'exception'=>'string'],
'GearmanJob::fail' => ['bool'],
'GearmanJob::functionName' => ['string'],
'GearmanJob::handle' => ['string'],
'GearmanJob::returnCode' => ['int'],
'GearmanJob::sendComplete' => ['bool', 'result'=>'string'],
'GearmanJob::sendData' => ['bool', 'data'=>'string'],
'GearmanJob::sendException' => ['bool', 'exception'=>'string'],
'GearmanJob::sendFail' => ['bool'],
'GearmanJob::sendStatus' => ['bool', 'numerator'=>'int', 'denominator'=>'int'],
'GearmanJob::sendWarning' => ['bool', 'warning'=>'string'],
'GearmanJob::setReturn' => ['bool', 'gearman_return_t'=>'string'],
'GearmanJob::status' => ['bool', 'numerator'=>'int', 'denominator'=>'int'],
'GearmanJob::unique' => ['string'],
'GearmanJob::warning' => ['bool', 'warning'=>'string'],
'GearmanJob::workload' => ['string'],
'GearmanJob::workloadSize' => ['int'],
'GearmanTask::__construct' => ['void'],
'GearmanTask::create' => ['GearmanTask'],
'GearmanTask::data' => ['string'],
'GearmanTask::dataSize' => ['int'],
'GearmanTask::function' => ['string'],
'GearmanTask::functionName' => ['string'],
'GearmanTask::isKnown' => ['bool'],
'GearmanTask::isRunning' => ['bool'],
'GearmanTask::jobHandle' => ['string'],
'GearmanTask::recvData' => ['array', 'data_len'=>'int'],
'GearmanTask::returnCode' => ['int'],
'GearmanTask::sendData' => ['int', 'data'=>'string'],
'GearmanTask::sendWorkload' => ['int', 'data'=>'string'],
'GearmanTask::taskDenominator' => ['int'],
'GearmanTask::taskNumerator' => ['int'],
'GearmanTask::unique' => ['string'],
'GearmanTask::uuid' => ['string'],
'GearmanWorker::__construct' => ['void'],
'GearmanWorker::addFunction' => ['bool', 'function_name'=>'string', 'function'=>'callable', 'context='=>'mixed', 'timeout='=>'int'],
'GearmanWorker::addOptions' => ['bool', 'option'=>'int'],
'GearmanWorker::addServer' => ['bool', 'host='=>'string', 'port='=>'int'],
'GearmanWorker::addServers' => ['bool', 'servers'=>'string'],
'GearmanWorker::clone' => ['void'],
'GearmanWorker::echo' => ['bool', 'workload'=>'string'],
'GearmanWorker::error' => ['string'],
'GearmanWorker::getErrno' => ['int'],
'GearmanWorker::grabJob' => [''],
'GearmanWorker::options' => ['int'],
'GearmanWorker::register' => ['bool', 'function_name'=>'string', 'timeout='=>'int'],
'GearmanWorker::removeOptions' => ['bool', 'option'=>'int'],
'GearmanWorker::returnCode' => ['int'],
'GearmanWorker::setId' => ['bool', 'id'=>'string'],
'GearmanWorker::setOptions' => ['bool', 'option'=>'int'],
'GearmanWorker::setTimeout' => ['bool', 'timeout'=>'int'],
'GearmanWorker::timeout' => ['int'],
'GearmanWorker::unregister' => ['bool', 'function_name'=>'string'],
'GearmanWorker::unregisterAll' => ['bool'],
'GearmanWorker::wait' => ['bool'],
'GearmanWorker::work' => ['bool'],
'Gender\Gender::__construct' => ['void', 'dsn='=>'string'],
'Gender\Gender::connect' => ['bool', 'dsn'=>'string'],
'Gender\Gender::country' => ['array', 'country'=>'int'],
'Gender\Gender::get' => ['int', 'name'=>'string', 'country='=>'int'],
'Gender\Gender::isNick' => ['array', 'name0'=>'string', 'name1'=>'string', 'country='=>'int'],
'Gender\Gender::similarNames' => ['array', 'name'=>'string', 'country='=>'int'],
'Generator::__wakeup' => ['void'],
'Generator::current' => ['mixed'],
'Generator::getReturn' => ['mixed'],
'Generator::key' => ['mixed'],
'Generator::next' => ['void'],
'Generator::rewind' => ['void'],
'Generator::send' => ['mixed', 'value'=>'mixed'],
'Generator::throw' => ['mixed', 'exception'=>'Exception|Throwable'],
'Generator::valid' => ['bool'],
'geoip_asnum_by_name' => ['string', 'hostname'=>'string'],
'geoip_continent_code_by_name' => ['string', 'hostname'=>'string'],
'geoip_country_code3_by_name' => ['string', 'hostname'=>'string'],
'geoip_country_code_by_name' => ['string', 'hostname'=>'string'],
'geoip_country_name_by_name' => ['string', 'hostname'=>'string'],
'geoip_database_info' => ['string', 'database='=>'int'],
'geoip_db_avail' => ['bool', 'database'=>'int'],
'geoip_db_filename' => ['string', 'database'=>'int'],
'geoip_db_get_all_info' => ['array'],
'geoip_domain_by_name' => ['string', 'hostname'=>'string'],
'geoip_id_by_name' => ['int', 'hostname'=>'string'],
'geoip_isp_by_name' => ['string', 'hostname'=>'string'],
'geoip_netspeedcell_by_name' => ['string', 'hostname'=>'string'],
'geoip_org_by_name' => ['string', 'hostname'=>'string'],
'geoip_record_by_name' => ['array', 'hostname'=>'string'],
'geoip_region_by_name' => ['array', 'hostname'=>'string'],
'geoip_region_name_by_code' => ['string', 'country_code'=>'string', 'region_code'=>'string'],
'geoip_setup_custom_directory' => ['void', 'path'=>'string'],
'geoip_time_zone_by_country_and_region' => ['string|false', 'country_code'=>'string', 'region_code='=>'string'],
'get_browser' => ['mixed', 'browser_name='=>'string', 'return_array='=>'bool'],
'get_call_stack' => [''],
'get_called_class' => ['class-string'],
'get_cfg_var' => ['mixed', 'option_name'=>'string'],
'get_class' => ['class-string', 'object='=>'object'],
'get_class_methods' => ['list<string>', 'class'=>'mixed'],
'get_class_vars' => ['array', 'class_name'=>'string'],
'get_current_user' => ['string'],
'get_declared_classes' => ['list<class-string>'],
'get_declared_interfaces' => ['list<interface-string>'],
'get_declared_traits' => ['list<trait-string>'],
'get_defined_constants' => ['array', 'categorize='=>'bool'],
'get_defined_functions' => ['array{internal:non-empty-list<callable-string>,user:list<callable-string>}', 'exclude_disabled='=>'bool'],
'get_defined_vars' => ['array'],
'get_extension_funcs' => ['list<callable-string>|false', 'extension_name'=>'string'],
'get_headers' => ['array|false', 'url'=>'string', 'format='=>'int', 'context='=>'resource'],
'get_html_translation_table' => ['array', 'table='=>'int', 'flags='=>'int', 'encoding='=>'string'],
'get_include_path' => ['string|false'],
'get_included_files' => ['list<string>'],
'get_loaded_extensions' => ['list<string>', 'zend_extensions='=>'bool'],
'get_magic_quotes_gpc' => ['false'],
'get_magic_quotes_runtime' => ['false'],
'get_meta_tags' => ['array|false', 'filename'=>'string', 'use_include_path='=>'bool'],
'get_object_vars' => ['array<string, mixed>', 'obj'=>'object'],
'get_parent_class' => ['class-string|false', 'object='=>'mixed'],
'get_required_files' => ['list<string>'],
'get_resource_type' => ['string', 'res'=>'resource'],
'get_resources' => ['array<int, resource>', 'type='=>'string'],
'getallheaders' => ['array'],
'getcwd' => ['non-empty-string|false'],
'getdate' => ['array{seconds: int<0, 59>, minutes: int<0, 59>, hours: int<0, 23>, mday: int<1, 31>, wday: int<0, 6>, mon: int<1, 12>, year: int, yday: int<0, 365>, weekday: "Monday"|"Tuesday"|"Wednesday"|"Thursday"|"Friday"|"Saturday"|"Sunday", month: "January"|"February"|"March"|"April"|"May"|"June"|"July"|"August"|"September"|"October"|"November"|"December", 0: int}', 'timestamp='=>'int'],
'getenv' => ['string|false', 'varname'=>'string', 'local_only='=>'bool'],
'getenv\'1' => ['array<string, string>'],
'gethostbyaddr' => ['string|false', 'ip_address'=>'string'],
'gethostbyname' => ['string', 'hostname'=>'string'],
'gethostbynamel' => ['list<string>|false', 'hostname'=>'string'],
'gethostname' => ['string|false'],
'getimagesize' => ['array{0:int, 1: int, 2: int, 3: string, mime: string, channels?: int, bits?: int}|false', 'imagefile'=>'string', '&w_info='=>'array'],
'getimagesizefromstring' => ['array{0:int, 1: int, 2: int, 3: string, mime: string, channels?: int, bits?: int}|false', 'data'=>'string', '&w_info='=>'array'],
'getlastmod' => ['int|false'],
'getmxrr' => ['bool', 'hostname'=>'string', '&w_mxhosts'=>'array', '&w_weight='=>'array'],
'getmygid' => ['int|false'],
'getmyinode' => ['int|false'],
'getmypid' => ['int|false'],
'getmyuid' => ['int|false'],
'getopt' => ['__benevolent<array<string,string>|array<string,false>|array<string,list<mixed>>|false>', 'options'=>'string', 'longopts='=>'array', '&w_optind='=>'int'],
'getprotobyname' => ['int|false', 'name'=>'string'],
'getprotobynumber' => ['string|false', 'proto'=>'int'],
'getrandmax' => ['int'],
'getrusage' => ['array|false', 'who='=>'int'],
'getservbyname' => ['int|false', 'service'=>'string', 'protocol'=>'string'],
'getservbyport' => ['string|false', 'port'=>'int', 'protocol'=>'string'],
'gettext' => ['string', 'msgid'=>'string'],
'gettimeofday' => ['array|float', 'get_as_float='=>'bool'],
'gettype' => ['string', 'var'=>'mixed'],
'glob' => ['list<string>|false', 'pattern'=>'string', 'flags='=>'int'],
'GlobIterator::__construct' => ['void', 'path'=>'string', 'flags='=>'int'],
'GlobIterator::cont' => ['int'],
'GlobIterator::count' => ['0|positive-int'],
'Gmagick::__construct' => ['void', 'filename='=>'string'],
'Gmagick::addimage' => ['Gmagick', 'gmagick'=>'gmagick'],
'Gmagick::addnoiseimage' => ['Gmagick', 'noise'=>'int'],
'Gmagick::annotateimage' => ['Gmagick', 'gmagickdraw'=>'gmagickdraw', 'x'=>'float', 'y'=>'float', 'angle'=>'float', 'text'=>'string'],
'Gmagick::blurimage' => ['Gmagick', 'radius'=>'float', 'sigma'=>'float', 'channel='=>'int'],
'Gmagick::borderimage' => ['Gmagick', 'color'=>'gmagickpixel', 'width'=>'int', 'height'=>'int'],
'Gmagick::charcoalimage' => ['Gmagick', 'radius'=>'float', 'sigma'=>'float'],
'Gmagick::chopimage' => ['Gmagick', 'width'=>'int', 'height'=>'int', 'x'=>'int', 'y'=>'int'],
'Gmagick::clear' => ['Gmagick'],
'Gmagick::commentimage' => ['Gmagick', 'comment'=>'string'],
'Gmagick::compositeimage' => ['Gmagick', 'source'=>'gmagick', 'compose'=>'int', 'x'=>'int', 'y'=>'int'],
'Gmagick::cropimage' => ['Gmagick', 'width'=>'int', 'height'=>'int', 'x'=>'int', 'y'=>'int'],
'Gmagick::cropthumbnailimage' => ['Gmagick', 'width'=>'int', 'height'=>'int'],
'Gmagick::current' => ['Gmagick'],
'Gmagick::cyclecolormapimage' => ['Gmagick', 'displace'=>'int'],
'Gmagick::deconstructimages' => ['Gmagick'],
'Gmagick::despeckleimage' => ['Gmagick'],
'Gmagick::destroy' => ['bool'],
'Gmagick::drawimage' => ['Gmagick', 'gmagickdraw'=>'gmagickdraw'],
'Gmagick::edgeimage' => ['Gmagick', 'radius'=>'float'],
'Gmagick::embossimage' => ['Gmagick', 'radius'=>'float', 'sigma'=>'float'],
'Gmagick::enhanceimage' => ['Gmagick'],
'Gmagick::equalizeimage' => ['Gmagick'],
'Gmagick::flipimage' => ['Gmagick'],
'Gmagick::flopimage' => ['Gmagick'],
'Gmagick::frameimage' => ['Gmagick', 'color'=>'gmagickpixel', 'width'=>'int', 'height'=>'int', 'inner_bevel'=>'int', 'outer_bevel'=>'int'],
'Gmagick::gammaimage' => ['Gmagick', 'gamma'=>'float'],
'Gmagick::getcopyright' => ['string'],
'Gmagick::getfilename' => ['string'],
'Gmagick::getimagebackgroundcolor' => ['GmagickPixel'],
'Gmagick::getimageblueprimary' => ['array'],
'Gmagick::getimagebordercolor' => ['GmagickPixel'],
'Gmagick::getimagechanneldepth' => ['int', 'channel_type'=>'int'],
'Gmagick::getimagecolors' => ['int'],
'Gmagick::getimagecolorspace' => ['int'],
'Gmagick::getimagecompose' => ['int'],
'Gmagick::getimagedelay' => ['int'],
'Gmagick::getimagedepth' => ['int'],
'Gmagick::getimagedispose' => ['int'],
'Gmagick::getimageextrema' => ['array'],
'Gmagick::getimagefilename' => ['string'],
'Gmagick::getimageformat' => ['string'],
'Gmagick::getimagegamma' => ['float'],
'Gmagick::getimagegreenprimary' => ['array'],
'Gmagick::getimageheight' => ['int'],
'Gmagick::getimagehistogram' => ['array'],
'Gmagick::getimageindex' => ['int'],
'Gmagick::getimageinterlacescheme' => ['int'],
'Gmagick::getimageiterations' => ['int'],
'Gmagick::getimagematte' => ['int'],
'Gmagick::getimagemattecolor' => ['GmagickPixel'],
'Gmagick::getimageprofile' => ['string', 'name'=>'string'],
'Gmagick::getimageredprimary' => ['array'],
'Gmagick::getimagerenderingintent' => ['int'],
'Gmagick::getimageresolution' => ['array'],
'Gmagick::getimagescene' => ['int'],
'Gmagick::getimagesignature' => ['string'],
'Gmagick::getimagetype' => ['int'],
'Gmagick::getimageunits' => ['int'],
'Gmagick::getimagewhitepoint' => ['array'],
'Gmagick::getimagewidth' => ['int'],
'Gmagick::getpackagename' => ['string'],
'Gmagick::getquantumdepth' => ['array'],
'Gmagick::getreleasedate' => ['string'],
'Gmagick::getsamplingfactors' => ['array'],
'Gmagick::getsize' => ['array'],
'Gmagick::getversion' => ['array'],
'Gmagick::hasnextimage' => ['bool'],
'Gmagick::haspreviousimage' => ['bool'],
'Gmagick::implodeimage' => ['mixed', 'radius'=>'float'],
'Gmagick::labelimage' => ['mixed', 'label'=>'string'],
'Gmagick::levelimage' => ['mixed', 'blackpoint'=>'float', 'gamma'=>'float', 'whitepoint'=>'float', 'channel='=>'int'],
'Gmagick::magnifyimage' => ['mixed'],
'Gmagick::mapimage' => ['Gmagick', 'gmagick'=>'gmagick', 'dither'=>'bool'],
'Gmagick::medianfilterimage' => ['void', 'radius'=>'float'],
'Gmagick::minifyimage' => ['Gmagick'],
'Gmagick::modulateimage' => ['Gmagick', 'brightness'=>'float', 'saturation'=>'float', 'hue'=>'float'],
'Gmagick::motionblurimage' => ['Gmagick', 'radius'=>'float', 'sigma'=>'float', 'angle'=>'float'],
'Gmagick::newimage' => ['Gmagick', 'width'=>'int', 'height'=>'int', 'background'=>'string', 'format='=>'string'],
'Gmagick::nextimage' => ['bool'],
'Gmagick::normalizeimage' => ['Gmagick', 'channel='=>'int'],
'Gmagick::oilpaintimage' => ['Gmagick', 'radius'=>'float'],
'Gmagick::previousimage' => ['bool'],
'Gmagick::profileimage' => ['Gmagick', 'name'=>'string', 'profile'=>'string'],
'Gmagick::quantizeimage' => ['Gmagick', 'numcolors'=>'int', 'colorspace'=>'int', 'treedepth'=>'int', 'dither'=>'bool', 'measureerror'=>'bool'],
'Gmagick::quantizeimages' => ['Gmagick', 'numcolors'=>'int', 'colorspace'=>'int', 'treedepth'=>'int', 'dither'=>'bool', 'measureerror'=>'bool'],
'Gmagick::queryfontmetrics' => ['array', 'draw'=>'gmagickdraw', 'text'=>'string'],
'Gmagick::queryfonts' => ['array', 'pattern='=>'string'],
'Gmagick::queryformats' => ['array', 'pattern='=>'string'],
'Gmagick::radialblurimage' => ['Gmagick', 'angle'=>'float', 'channel='=>'int'],
'Gmagick::raiseimage' => ['Gmagick', 'width'=>'int', 'height'=>'int', 'x'=>'int', 'y'=>'int', 'raise'=>'bool'],
'Gmagick::read' => ['Gmagick', 'filename'=>'string'],
'Gmagick::readimage' => ['Gmagick', 'filename'=>'string'],
'Gmagick::readimageblob' => ['Gmagick', 'imagecontents'=>'string', 'filename='=>'string'],
'Gmagick::readimagefile' => ['Gmagick', 'fp'=>'resource', 'filename='=>'string'],
'Gmagick::reducenoiseimage' => ['Gmagick', 'radius'=>'float'],
'Gmagick::removeimage' => ['Gmagick'],
'Gmagick::removeimageprofile' => ['string', 'name'=>'string'],
'Gmagick::resampleimage' => ['Gmagick', 'xresolution'=>'float', 'yresolution'=>'float', 'filter'=>'int', 'blur'=>'float'],
'Gmagick::resizeimage' => ['Gmagick', 'width'=>'int', 'height'=>'int', 'filter'=>'int', 'blur'=>'float', 'fit='=>'bool'],
'Gmagick::rollimage' => ['Gmagick', 'x'=>'int', 'y'=>'int'],
'Gmagick::rotateimage' => ['Gmagick', 'color'=>'mixed', 'degrees'=>'float'],
'Gmagick::scaleimage' => ['Gmagick', 'width'=>'int', 'height'=>'int', 'fit='=>'bool'],
'Gmagick::separateimagechannel' => ['Gmagick', 'channel'=>'int'],
'Gmagick::setCompressionQuality' => ['Gmagick', 'quality'=>'int'],
'Gmagick::setfilename' => ['Gmagick', 'filename'=>'string'],
'Gmagick::setimagebackgroundcolor' => ['Gmagick', 'color'=>'gmagickpixel'],
'Gmagick::setimageblueprimary' => ['Gmagick', 'x'=>'float', 'y'=>'float'],
'Gmagick::setimagebordercolor' => ['Gmagick', 'color'=>'gmagickpixel'],
'Gmagick::setimagechanneldepth' => ['Gmagick', 'channel'=>'int', 'depth'=>'int'],
'Gmagick::setimagecolorspace' => ['Gmagick', 'colorspace'=>'int'],
'Gmagick::setimagecompose' => ['Gmagick', 'composite'=>'int'],
'Gmagick::setimagedelay' => ['Gmagick', 'delay'=>'int'],
'Gmagick::setimagedepth' => ['Gmagick', 'depth'=>'int'],
'Gmagick::setimagedispose' => ['Gmagick', 'disposetype'=>'int'],
'Gmagick::setimagefilename' => ['Gmagick', 'filename'=>'string'],
'Gmagick::setimageformat' => ['Gmagick', 'imageformat'=>'string'],
'Gmagick::setimagegamma' => ['Gmagick', 'gamma'=>'float'],
'Gmagick::setimagegreenprimary' => ['Gmagick', 'x'=>'float', 'y'=>'float'],
'Gmagick::setimageindex' => ['Gmagick', 'index'=>'int'],
'Gmagick::setimageinterlacescheme' => ['Gmagick', 'interlace'=>'int'],
'Gmagick::setimageiterations' => ['Gmagick', 'iterations'=>'int'],
'Gmagick::setimageprofile' => ['Gmagick', 'name'=>'string', 'profile'=>'string'],
'Gmagick::setimageredprimary' => ['Gmagick', 'x'=>'float', 'y'=>'float'],
'Gmagick::setimagerenderingintent' => ['Gmagick', 'rendering_intent'=>'int'],
'Gmagick::setimageresolution' => ['Gmagick', 'xresolution'=>'float', 'yresolution'=>'float'],
'Gmagick::setimagescene' => ['Gmagick', 'scene'=>'int'],
'Gmagick::setimagetype' => ['Gmagick', 'imgtype'=>'int'],
'Gmagick::setimageunits' => ['Gmagick', 'resolution'=>'int'],
'Gmagick::setimagewhitepoint' => ['Gmagick', 'x'=>'float', 'y'=>'float'],
'Gmagick::setsamplingfactors' => ['Gmagick', 'factors'=>'array'],
'Gmagick::setsize' => ['Gmagick', 'columns'=>'int', 'rows'=>'int'],
'Gmagick::shearimage' => ['Gmagick', 'color'=>'mixed', 'xshear'=>'float', 'yshear'=>'float'],
'Gmagick::solarizeimage' => ['Gmagick', 'threshold'=>'int'],
'Gmagick::spreadimage' => ['Gmagick', 'radius'=>'float'],
'Gmagick::stripimage' => ['Gmagick'],
'Gmagick::swirlimage' => ['Gmagick', 'degrees'=>'float'],
'Gmagick::thumbnailimage' => ['Gmagick', 'width'=>'int', 'height'=>'int', 'fit='=>'bool'],
'Gmagick::trimimage' => ['Gmagick', 'fuzz'=>'float'],
'Gmagick::write' => ['', 'filename'=>'string'],
'Gmagick::writeimage' => ['Gmagick', 'filename'=>'string', 'all_frames='=>'bool'],
'GmagickDraw::annotate' => ['GmagickDraw', 'x'=>'float', 'y'=>'float', 'text'=>'string'],
'GmagickDraw::arc' => ['GmagickDraw', 'sx'=>'float', 'sy'=>'float', 'ex'=>'float', 'ey'=>'float', 'sd'=>'float', 'ed'=>'float'],
'GmagickDraw::bezier' => ['GmagickDraw', 'coordinate_array'=>'array'],
'GmagickDraw::ellipse' => ['GmagickDraw', 'ox'=>'float', 'oy'=>'float', 'rx'=>'float', 'ry'=>'float', 'start'=>'float', 'end'=>'float'],
'GmagickDraw::getfillcolor' => ['GmagickPixel'],
'GmagickDraw::getfillopacity' => ['float'],
'GmagickDraw::getfont' => ['string'],
'GmagickDraw::getfontsize' => ['float'],
'GmagickDraw::getfontstyle' => ['int'],
'GmagickDraw::getfontweight' => ['int'],
'GmagickDraw::getstrokecolor' => ['GmagickPixel'],
'GmagickDraw::getstrokeopacity' => ['float'],
'GmagickDraw::getstrokewidth' => ['float'],
'GmagickDraw::gettextdecoration' => ['int'],
'GmagickDraw::gettextencoding' => ['string'],
'GmagickDraw::line' => ['GmagickDraw', 'sx'=>'float', 'sy'=>'float', 'ex'=>'float', 'ey'=>'float'],
'GmagickDraw::point' => ['GmagickDraw', 'x'=>'float', 'y'=>'float'],
'GmagickDraw::polygon' => ['GmagickDraw', 'coordinates'=>'array'],
'GmagickDraw::polyline' => ['GmagickDraw', 'coordinate_array'=>'array'],
'GmagickDraw::rectangle' => ['GmagickDraw', 'x1'=>'float', 'y1'=>'float', 'x2'=>'float', 'y2'=>'float'],
'GmagickDraw::rotate' => ['GmagickDraw', 'degrees'=>'float'],
'GmagickDraw::roundrectangle' => ['GmagickDraw', 'x1'=>'float', 'y1'=>'float', 'x2'=>'float', 'y2'=>'float', 'rx'=>'float', 'ry'=>'float'],
'GmagickDraw::scale' => ['GmagickDraw', 'x'=>'float', 'y'=>'float'],
'GmagickDraw::setfillcolor' => ['GmagickDraw', 'color'=>'string'],
'GmagickDraw::setfillopacity' => ['GmagickDraw', 'fill_opacity'=>'float'],
'GmagickDraw::setfont' => ['GmagickDraw', 'font'=>'string'],
'GmagickDraw::setfontsize' => ['GmagickDraw', 'pointsize'=>'float'],
'GmagickDraw::setfontstyle' => ['GmagickDraw', 'style'=>'int'],
'GmagickDraw::setfontweight' => ['GmagickDraw', 'weight'=>'int'],
'GmagickDraw::setstrokecolor' => ['GmagickDraw', 'color'=>'gmagickpixel'],
'GmagickDraw::setstrokeopacity' => ['GmagickDraw', 'stroke_opacity'=>'float'],
'GmagickDraw::setstrokewidth' => ['GmagickDraw', 'width'=>'float'],
'GmagickDraw::settextdecoration' => ['GmagickDraw', 'decoration'=>'int'],
'GmagickDraw::settextencoding' => ['GmagickDraw', 'encoding'=>'string'],
'GmagickPixel::__construct' => ['void', 'color='=>'string'],
'GmagickPixel::getcolor' => ['mixed', 'as_array='=>'bool', 'normalize_array='=>'bool'],
'GmagickPixel::getcolorcount' => ['int'],
'GmagickPixel::getcolorvalue' => ['float', 'color'=>'int'],
'GmagickPixel::setcolor' => ['GmagickPixel', 'color'=>'string'],
'GmagickPixel::setcolorvalue' => ['GmagickPixel', 'color'=>'int', 'value'=>'float'],
'gmdate' => ['string', 'format'=>'string', 'timestamp='=>'int'],
'gmmktime' => ['int|false', 'hour='=>'int', 'min='=>'int', 'sec='=>'int', 'mon='=>'int', 'day='=>'int', 'year='=>'int'],
'GMP::__construct' => ['void'],
'GMP::__toString' => ['string'],
'GMP::serialize' => ['string'],
'GMP::unserialize' => ['void', 'serialized'=>'string'],
'gmp_abs' => ['GMP', 'a'=>'GMP|string|int'],
'gmp_add' => ['GMP', 'a'=>'GMP|string|int', 'b'=>'GMP|string|int'],
'gmp_and' => ['GMP', 'a'=>'GMP|string|int', 'b'=>'GMP|string|int'],
'gmp_binomial' => ['GMP|false', 'n'=>'GMP|string|int', 'k'=>'int'],
'gmp_clrbit' => ['void', 'a'=>'GMP|string|int', 'index'=>'int'],
'gmp_cmp' => ['int', 'a'=>'GMP|string|int', 'b'=>'GMP|string|int'],
'gmp_com' => ['GMP', 'a'=>'GMP|string|int'],
'gmp_div' => ['GMP', 'a'=>'GMP|string|int', 'b'=>'GMP|string|int', 'round='=>'int'],
'gmp_div_q' => ['GMP', 'a'=>'GMP|string|int', 'b'=>'GMP|string|int', 'round='=>'int'],
'gmp_div_qr' => ['array', 'a'=>'GMP|string|int', 'b'=>'GMP|string|int', 'round='=>'int'],
'gmp_div_r' => ['GMP', 'a'=>'GMP|string|int', 'b'=>'GMP|string|int', 'round='=>'int'],
'gmp_divexact' => ['GMP', 'a'=>'GMP|string|int', 'b'=>'GMP|string|int'],
'gmp_export' => ['string', 'gmpnumber'=>'GMP|string|int', 'word_size='=>'int', 'options='=>'int'],
'gmp_fact' => ['GMP', 'a'=>'int'],
'gmp_gcd' => ['GMP', 'a'=>'GMP|string|int', 'b'=>'GMP|string|int'],
'gmp_gcdext' => ['array', 'a'=>'GMP|string|int', 'b'=>'GMP|string|int'],
'gmp_hamdist' => ['int', 'a'=>'GMP|string|int', 'b'=>'GMP|string|int'],
'gmp_import' => ['GMP', 'data'=>'string', 'word_size='=>'int', 'options='=>'int'],
'gmp_init' => ['GMP', 'number'=>'int|string', 'base='=>'int'],
'gmp_intval' => ['int', 'gmpnumber'=>'GMP|string|int'],
'gmp_invert' => ['GMP|false', 'a'=>'GMP|string|int', 'b'=>'GMP|string|int'],
'gmp_jacobi' => ['int', 'a'=>'GMP|string|int', 'b'=>'GMP|string|int'],
'gmp_kronecker' => ['int', 'a'=>'GMP|string|int', 'b'=>'GMP|string|int'],
'gmp_lcm' => ['GMP', 'a'=>'GMP|string|int', 'b'=>'GMP|string|int'],
'gmp_legendre' => ['int', 'a'=>'GMP|string|int', 'b'=>'GMP|string|int'],
'gmp_mod' => ['GMP', 'a'=>'GMP|string|int', 'b'=>'GMP|string|int'],
'gmp_mul' => ['GMP', 'a'=>'GMP|string|int', 'b'=>'GMP|string|int'],
'gmp_neg' => ['GMP', 'a'=>'GMP|string|int'],
'gmp_nextprime' => ['GMP', 'a'=>'GMP|string|int'],
'gmp_or' => ['GMP', 'a'=>'GMP|string|int', 'b'=>'GMP|string|int'],
'gmp_perfect_power' => ['bool', 'a'=>'GMP|string|int'],
'gmp_perfect_square' => ['bool', 'a'=>'GMP|string|int'],
'gmp_popcount' => ['int', 'a'=>'GMP|string|int'],
'gmp_pow' => ['GMP', 'base'=>'GMP|string|int', 'exp'=>'int'],
'gmp_powm' => ['GMP', 'base'=>'GMP|string|int', 'exp'=>'GMP|string|int', 'mod'=>'GMP|string|int'],
'gmp_prob_prime' => ['int', 'a'=>'GMP|string|int', 'reps='=>'int'],
'gmp_random' => ['GMP', 'limiter='=>'int'],
'gmp_random_bits' => ['GMP', 'bits'=>'int'],
'gmp_random_range' => ['GMP', 'min'=>'GMP|string|int', 'max'=>'GMP|string|int'],
'gmp_random_seed' => ['void', 'seed'=>'GMP|string|int'],
'gmp_root' => ['GMP', 'a'=>'GMP|string|int', 'nth'=>'int'],
'gmp_rootrem' => ['array<int,GMP>', 'a'=>'GMP|string|int', 'nth'=>'int'],
'gmp_scan0' => ['int', 'a'=>'GMP|string|int', 'start'=>'int'],
'gmp_scan1' => ['int', 'a'=>'GMP|string|int', 'start'=>'int'],
'gmp_setbit' => ['void', 'a'=>'GMP|string|int', 'index'=>'int', 'set_clear='=>'bool'],
'gmp_sign' => ['int', 'a'=>'GMP|string|int'],
'gmp_sqrt' => ['GMP', 'a'=>'GMP|string|int'],
'gmp_sqrtrem' => ['array', 'a'=>'GMP|string|int'],
'gmp_strval' => ['string', 'gmpnumber'=>'GMP|string|int', 'base='=>'int'],
'gmp_sub' => ['GMP', 'a'=>'GMP|string|int', 'b'=>'GMP|string|int'],
'gmp_testbit' => ['bool', 'a'=>'GMP|string|int', 'index'=>'int'],
'gmp_xor' => ['GMP', 'a'=>'GMP|string|int', 'b'=>'GMP|string|int'],
'gmstrftime' => ['string|false', 'format'=>'string', 'timestamp='=>'int'],
'gnupg::adddecryptkey' => ['bool', 'fingerprint'=>'string', 'passphrase'=>'string'],
'gnupg::addencryptkey' => ['bool', 'fingerprint'=>'string'],
'gnupg::addsignkey' => ['bool', 'fingerprint'=>'string', 'passphrase='=>'string'],
'gnupg::cleardecryptkeys' => ['bool'],
'gnupg::clearencryptkeys' => ['bool'],
'gnupg::clearsignkeys' => ['bool'],
'gnupg::decrypt' => ['string|false', 'text'=>'string'],
'gnupg::deletekey' => ['bool', 'key'=>'string', 'allow_secret'=>'bool'],
'gnupg::decryptverify' => ['array|false', 'text'=>'string', '&plaintext'=>'string'],
'gnupg::encrypt' => ['string|false', 'plaintext'=>'string'],
'gnupg::encryptsign' => ['string|false', 'plaintext'=>'string'],
'gnupg::export' => ['string|false', 'fingerprint'=>'string'],
'gnupg::getengineinfo' => ['array'],
'gnupg::geterror' => ['string|false'],
'gnupg::getprotocol' => ['int'],
'gnupg::gettrustlist' => ['array', 'pattern'=>'string'],
'gnupg::import' => ['array|false', 'keydata'=>'string'],
'gnupg::init' => ['resource'],
'gnupg::keyinfo' => ['array|false', 'pattern'=>'string'],
'gnupg::listsignatures' => ['?array', 'keyid'=>'string'],
'gnupg::setarmor' => ['bool', 'armor'=>'int'],
'gnupg::seterrormode' => ['void', 'errormode'=>'int'],
'gnupg::setsignmode' => ['bool', 'signmode'=>'int'],
'gnupg::sign' => ['string|false', 'plaintext'=>'string'],
'gnupg::verify' => ['array|false', 'signed_text'=>'string', 'signature'=>'string|false', '&plaintext='=>'string'],
'gnupg_adddecryptkey' => ['bool', 'identifier'=>'resource', 'fingerprint'=>'string', 'passphrase'=>'string'],
'gnupg_addencryptkey' => ['bool', 'identifier'=>'resource', 'fingerprint'=>'string'],
'gnupg_addsignkey' => ['bool', 'identifier'=>'resource', 'fingerprint'=>'string', 'passphrase='=>'string'],
'gnupg_cleardecryptkeys' => ['bool', 'identifier'=>'resource'],
'gnupg_clearencryptkeys' => ['bool', 'identifier'=>'resource'],
'gnupg_clearsignkeys' => ['bool', 'identifier'=>'resource'],
'gnupg_decrypt' => ['string|false', 'identifier'=>'resource', 'text'=>'string'],
'gnupg_decryptverify' => ['array', 'identifier'=>'resource', 'text'=>'string', 'plaintext'=>'string'],
'gnupg_deletekey' => ['bool', 'identifier'=>'resource', 'key'=>'string', 'allow_secret'=>'bool'],
'gnupg_encrypt' => ['string|false', 'identifier'=>'resource', 'plaintext'=>'string'],
'gnupg_encryptsign' => ['string|false', 'identifier'=>'resource', 'plaintext'=>'string'],
'gnupg_export' => ['string|false', 'identifier'=>'resource', 'fingerprint'=>'string'],
'gnupg_getengineinfo' => ['array', 'identifier'=>'resource'],
'gnupg_geterror' => ['string|false', 'identifier'=>'resource'],
'gnupg_getprotocol' => ['int', 'identifier'=>'resource'],
'gnupg_gettrustlist' => ['array', 'identifier'=>'resource', 'pattern'=>'string'],
'gnupg_import' => ['array|false', 'identifier'=>'resource', 'keydata'=>'string'],
'gnupg_init' => ['resource'],
'gnupg_keyinfo' => ['array|false', 'identifier'=>'resource', 'pattern'=>'string'],
'gnupg_listsignatures' => ['?array', 'identifier'=>'resource', 'keyid'=>'string'],
'gnupg_setarmor' => ['bool', 'identifier'=>'resource', 'armor'=>'int'],
'gnupg_seterrormode' => ['void', 'identifier'=>'resource', 'errormode'=>'int'],
'gnupg_setsignmode' => ['bool', 'identifier'=>'resource', 'signmode'=>'int'],
'gnupg_sign' => ['string|false', 'identifier'=>'resource', 'plaintext'=>'string'],
'gnupg_verify' => ['array|false', 'identifier'=>'resource', 'signed_text'=>'string', 'signature'=>'string|false', '&plaintext='=>'string'],
'gopher_parsedir' => ['array', 'dirent'=>'string'],
'grapheme_extract' => ['string|false', 'str'=>'string', 'size'=>'int', 'extract_type='=>'int', 'start='=>'int', '&w_next='=>'int'],
'grapheme_stripos' => ['int|false', 'haystack'=>'string', 'needle'=>'string', 'offset='=>'int'],
'grapheme_stristr' => ['string|false', 'haystack'=>'string', 'needle'=>'string', 'part='=>'bool'],
'grapheme_strlen' => ['0|positive-int|false', 'str'=>'string'],
'grapheme_strpos' => ['int|false', 'haystack'=>'string', 'needle'=>'string', 'offset='=>'int'],
'grapheme_strripos' => ['int|false', 'haystack'=>'string', 'needle'=>'string', 'offset='=>'int'],
'grapheme_strrpos' => ['int|false', 'haystack'=>'string', 'needle'=>'string', 'offset='=>'int'],
'grapheme_strstr' => ['string|false', 'haystack'=>'string', 'needle'=>'string', 'part='=>'bool'],
'grapheme_substr' => ['string|false', 'str'=>'string', 'start'=>'int', 'length='=>'int'],
'gregoriantojd' => ['int', 'month'=>'int', 'day'=>'int', 'year'=>'int'],
'gridObj::set' => ['int', 'property_name'=>'string', 'new_value'=>''],
'Grpc\Call::__construct' => ['void', 'channel'=>'Grpc\Channel', 'method'=>'string', 'absolute_deadline'=>'Grpc\Timeval', 'host_override='=>'mixed'],
'Grpc\Call::cancel' => [''],
'Grpc\Call::getPeer' => ['string'],
'Grpc\Call::setCredentials' => ['int', 'creds_obj'=>'Grpc\CallCredentials'],
'Grpc\Call::startBatch' => ['object', 'batch'=>'array'],
'Grpc\CallCredentials::createComposite' => ['Grpc\CallCredentials', 'cred1'=>'Grpc\CallCredentials', 'cred2'=>'Grpc\CallCredentials'],
'Grpc\CallCredentials::createFromPlugin' => ['Grpc\CallCredentials', 'callback'=>'Closure'],
'Grpc\Channel::__construct' => ['void', 'target'=>'string', 'args='=>'array'],
'Grpc\Channel::close' => [''],
'Grpc\Channel::getConnectivityState' => ['int', 'try_to_connect='=>'bool|false'],
'Grpc\Channel::getTarget' => ['string'],
'Grpc\Channel::watchConnectivityState' => ['bool', 'last_state'=>'int', 'deadline_obj'=>'Grpc\Timeval'],
'Grpc\ChannelCredentials::createComposite' => ['Grpc\ChannelCredentials', 'cred1'=>'Grpc\ChannelCredentials', 'cred2'=>'Grpc\CallCredentials'],
'Grpc\ChannelCredentials::createDefault' => ['Grpc\ChannelCredentials'],
'Grpc\ChannelCredentials::createInsecure' => ['null'],
'Grpc\ChannelCredentials::createSsl' => ['Grpc\ChannelCredentials', 'pem_root_certs='=>'string|null', 'pem_private_key='=>'string|null', 'pem_cert_chain='=>'string|null'],
'Grpc\ChannelCredentials::setDefaultRootsPem' => ['', 'pem_roots'=>'string'],
'Grpc\Server::__construct' => ['void', 'args'=>'array'],
'Grpc\Server::addHttp2Port' => ['bool', 'addr'=>'string'],
'Grpc\Server::addSecureHttp2Port' => ['bool', 'addr'=>'string', 'creds_obj'=>'Grpc\ServerCredentials'],
'Grpc\Server::requestCall' => ['', 'tag_new'=>'int', 'tag_cancel'=>'int'],
'Grpc\Server::start' => [''],
'Grpc\ServerCredentials::createSsl' => ['object', 'pem_root_certs'=>'string', 'pem_private_key'=>'string', 'pem_cert_chain'=>'string'],
'Grpc\Timeval::__construct' => ['void', 'usec'=>'int'],
'Grpc\Timeval::add' => ['Grpc\Timeval', 'other'=>'Grpc\Timeval'],
'Grpc\Timeval::compare' => ['int', 'a'=>'Grpc\Timeval', 'b'=>'Grpc\Timeval'],
'Grpc\Timeval::infFuture' => ['Grpc\Timeval'],
'Grpc\Timeval::infPast' => ['Grpc\Timeval'],
'Grpc\Timeval::now' => ['Grpc\Timeval'],
'Grpc\Timeval::similar' => ['bool', 'a'=>'Grpc\Timeval', 'b'=>'Grpc\Timeval', 'threshold'=>'Grpc\Timeval'],
'Grpc\Timeval::sleepUntil' => [''],
'Grpc\Timeval::subtract' => ['Grpc\Timeval', 'other'=>'Grpc\Timeval'],
'Grpc\Timeval::zero' => ['Grpc\Timeval'],
'gupnp_context_get_host_ip' => ['string', 'context'=>'resource'],
'gupnp_context_get_port' => ['int', 'context'=>'resource'],
'gupnp_context_get_subscription_timeout' => ['int', 'context'=>'resource'],
'gupnp_context_host_path' => ['bool', 'context'=>'resource', 'local_path'=>'string', 'server_path'=>'string'],
'gupnp_context_new' => ['resource', 'host_ip='=>'string', 'port='=>'int'],
'gupnp_context_set_subscription_timeout' => ['void', 'context'=>'resource', 'timeout'=>'int'],
'gupnp_context_timeout_add' => ['bool', 'context'=>'resource', 'timeout'=>'int', 'callback'=>'mixed', 'arg='=>'mixed'],
'gupnp_context_unhost_path' => ['bool', 'context'=>'resource', 'server_path'=>'string'],
'gupnp_control_point_browse_start' => ['bool', 'cpoint'=>'resource'],
'gupnp_control_point_browse_stop' => ['bool', 'cpoint'=>'resource'],
'gupnp_control_point_callback_set' => ['bool', 'cpoint'=>'resource', 'signal'=>'int', 'callback'=>'mixed', 'arg='=>'mixed'],
'gupnp_control_point_new' => ['resource', 'context'=>'resource', 'target'=>'string'],
'gupnp_device_action_callback_set' => ['bool', 'root_device'=>'resource', 'signal'=>'int', 'action_name'=>'string', 'callback'=>'mixed', 'arg='=>'mixed'],
'gupnp_device_info_get' => ['array', 'root_device'=>'resource'],
'gupnp_device_info_get_service' => ['resource', 'root_device'=>'resource', 'type'=>'string'],
'gupnp_root_device_get_available' => ['bool', 'root_device'=>'resource'],
'gupnp_root_device_get_relative_location' => ['string', 'root_device'=>'resource'],
'gupnp_root_device_new' => ['resource', 'context'=>'resource', 'location'=>'string', 'description_dir'=>'string'],
'gupnp_root_device_set_available' => ['bool', 'root_device'=>'resource', 'available'=>'bool'],
'gupnp_root_device_start' => ['bool', 'root_device'=>'resource'],
'gupnp_root_device_stop' => ['bool', 'root_device'=>'resource'],
'gupnp_service_action_get' => ['mixed', 'action'=>'resource', 'name'=>'string', 'type'=>'int'],
'gupnp_service_action_return' => ['bool', 'action'=>'resource'],
'gupnp_service_action_return_error' => ['bool', 'action'=>'resource', 'error_code'=>'int', 'error_description='=>'string'],
'gupnp_service_action_set' => ['bool', 'action'=>'resource', 'name'=>'string', 'type'=>'int', 'value'=>'mixed'],
'gupnp_service_freeze_notify' => ['bool', 'service'=>'resource'],
'gupnp_service_info_get' => ['array', 'proxy'=>'resource'],
'gupnp_service_info_get_introspection' => ['mixed', 'proxy'=>'resource', 'callback='=>'mixed', 'arg='=>'mixed'],
'gupnp_service_introspection_get_state_variable' => ['array', 'introspection'=>'resource', 'variable_name'=>'string'],
'gupnp_service_notify' => ['bool', 'service'=>'resource', 'name'=>'string', 'type'=>'int', 'value'=>'mixed'],
'gupnp_service_proxy_action_get' => ['mixed', 'proxy'=>'resource', 'action'=>'string', 'name'=>'string', 'type'=>'int'],
'gupnp_service_proxy_action_set' => ['bool', 'proxy'=>'resource', 'action'=>'string', 'name'=>'string', 'value'=>'mixed', 'type'=>'int'],
'gupnp_service_proxy_add_notify' => ['bool', 'proxy'=>'resource', 'value'=>'string', 'type'=>'int', 'callback'=>'mixed', 'arg='=>'mixed'],
'gupnp_service_proxy_callback_set' => ['bool', 'proxy'=>'resource', 'signal'=>'int', 'callback'=>'mixed', 'arg='=>'mixed'],
'gupnp_service_proxy_get_subscribed' => ['bool', 'proxy'=>'resource'],
'gupnp_service_proxy_remove_notify' => ['bool', 'proxy'=>'resource', 'value'=>'string'],
'gupnp_service_proxy_send_action' => ['array', 'proxy'=>'resource', 'action'=>'string', 'in_params'=>'array', 'out_params'=>'array'],
'gupnp_service_proxy_set_subscribed' => ['bool', 'proxy'=>'resource', 'subscribed'=>'bool'],
'gupnp_service_thaw_notify' => ['bool', 'service'=>'resource'],
'gzclose' => ['bool', 'zp'=>'resource'],
'gzcompress' => ['string|false', 'data'=>'string', 'level='=>'int', 'encoding='=>'int'],
'gzdecode' => ['string|false', 'data'=>'string', 'length='=>'int'],
'gzdeflate' => ['string|false', 'data'=>'string', 'level='=>'int', 'encoding='=>'int'],
'gzencode' => ['string|false', 'data'=>'string', 'level='=>'int', 'encoding_mode='=>'int'],
'gzeof' => ['bool', 'zp'=>'resource'],
'gzfile' => ['list<string>|false', 'filename'=>'string', 'use_include_path='=>'int'],
'gzgetc' => ['string|false', 'zp'=>'resource'],
'gzgets' => ['string|false', 'zp'=>'resource', 'length='=>'int'],
'gzgetss' => ['string|false', 'zp'=>'resource', 'length'=>'int', 'allowable_tags='=>'string'],
'gzinflate' => ['string|false', 'data'=>'string', 'length='=>'int'],
'gzopen' => ['resource|false', 'filename'=>'string', 'mode'=>'string', 'use_include_path='=>'int'],
'gzpassthru' => ['int|false', 'zp'=>'resource'],
'gzputs' => ['int|false', 'zp'=>'resource', 'string'=>'string', 'length='=>'int'],
'gzread' => ['string|false', 'zp'=>'resource', 'length'=>'int'],
'gzrewind' => ['bool', 'zp'=>'resource'],
'gzseek' => ['int', 'zp'=>'resource', 'offset'=>'int', 'whence='=>'int'],
'gztell' => ['int|false', 'zp'=>'resource'],
'gzuncompress' => ['string|false', 'data'=>'string', 'length='=>'int'],
'gzwrite' => ['int|false', 'zp'=>'resource', 'string'=>'string', 'length='=>'int'],
'HaruAnnotation::setBorderStyle' => ['bool', 'width'=>'float', 'dash_on'=>'int', 'dash_off'=>'int'],
'HaruAnnotation::setHighlightMode' => ['bool', 'mode'=>'int'],
'HaruAnnotation::setIcon' => ['bool', 'icon'=>'int'],
'HaruAnnotation::setOpened' => ['bool', 'opened'=>'bool'],
'HaruDestination::setFit' => ['bool'],
'HaruDestination::setFitB' => ['bool'],
'HaruDestination::setFitBH' => ['bool', 'top'=>'float'],
'HaruDestination::setFitBV' => ['bool', 'left'=>'float'],
'HaruDestination::setFitH' => ['bool', 'top'=>'float'],
'HaruDestination::setFitR' => ['bool', 'left'=>'float', 'bottom'=>'float', 'right'=>'float', 'top'=>'float'],
'HaruDestination::setFitV' => ['bool', 'left'=>'float'],
'HaruDestination::setXYZ' => ['bool', 'left'=>'float', 'top'=>'float', 'zoom'=>'float'],
'HaruDoc::__construct' => ['void'],
'HaruDoc::addPage' => ['object'],
'HaruDoc::addPageLabel' => ['bool', 'first_page'=>'int', 'style'=>'int', 'first_num'=>'int', 'prefix='=>'string'],
'HaruDoc::createOutline' => ['object', 'title'=>'string', 'parent_outline='=>'object', 'encoder='=>'object'],
'HaruDoc::getCurrentEncoder' => ['object'],
'HaruDoc::getCurrentPage' => ['object'],
'HaruDoc::getEncoder' => ['object', 'encoding'=>'string'],
'HaruDoc::getFont' => ['object', 'fontname'=>'string', 'encoding='=>'string'],
'HaruDoc::getInfoAttr' => ['string', 'type'=>'int'],
'HaruDoc::getPageLayout' => ['int'],
'HaruDoc::getPageMode' => ['int'],
'HaruDoc::getStreamSize' => ['int'],
'HaruDoc::insertPage' => ['object', 'page'=>'object'],
'HaruDoc::loadJPEG' => ['object', 'filename'=>'string'],
'HaruDoc::loadPNG' => ['object', 'filename'=>'string', 'deferred='=>'bool'],
'HaruDoc::loadRaw' => ['object', 'filename'=>'string', 'width'=>'int', 'height'=>'int', 'color_space'=>'int'],
'HaruDoc::loadTTC' => ['string', 'fontfile'=>'string', 'index'=>'int', 'embed='=>'bool'],
'HaruDoc::loadTTF' => ['string', 'fontfile'=>'string', 'embed='=>'bool'],
'HaruDoc::loadType1' => ['string', 'afmfile'=>'string', 'pfmfile='=>'string'],
'HaruDoc::output' => ['bool'],
'HaruDoc::readFromStream' => ['string', 'bytes'=>'int'],
'HaruDoc::resetError' => ['bool'],
'HaruDoc::resetStream' => ['bool'],
'HaruDoc::save' => ['bool', 'file'=>'string'],
'HaruDoc::saveToStream' => ['bool'],
'HaruDoc::setCompressionMode' => ['bool', 'mode'=>'int'],
'HaruDoc::setCurrentEncoder' => ['bool', 'encoding'=>'string'],
'HaruDoc::setEncryptionMode' => ['bool', 'mode'=>'int', 'key_len='=>'int'],
'HaruDoc::setInfoAttr' => ['bool', 'type'=>'int', 'info'=>'string'],
'HaruDoc::setInfoDateAttr' => ['bool', 'type'=>'int', 'year'=>'int', 'month'=>'int', 'day'=>'int', 'hour'=>'int', 'min'=>'int', 'sec'=>'int', 'ind'=>'string', 'off_hour'=>'int', 'off_min'=>'int'],
'HaruDoc::setOpenAction' => ['bool', 'destination'=>'object'],
'HaruDoc::setPageLayout' => ['bool', 'layout'=>'int'],
'HaruDoc::setPageMode' => ['bool', 'mode'=>'int'],
'HaruDoc::setPagesConfiguration' => ['bool', 'page_per_pages'=>'int'],
'HaruDoc::setPassword' => ['bool', 'owner_password'=>'string', 'user_password'=>'string'],
'HaruDoc::setPermission' => ['bool', 'permission'=>'int'],
'HaruDoc::useCNSEncodings' => ['bool'],
'HaruDoc::useCNSFonts' => ['bool'],
'HaruDoc::useCNTEncodings' => ['bool'],
'HaruDoc::useCNTFonts' => ['bool'],
'HaruDoc::useJPEncodings' => ['bool'],
'HaruDoc::useJPFonts' => ['bool'],
'HaruDoc::useKREncodings' => ['bool'],
'HaruDoc::useKRFonts' => ['bool'],
'HaruEncoder::getByteType' => ['int', 'text'=>'string', 'index'=>'int'],
'HaruEncoder::getType' => ['int'],
'HaruEncoder::getUnicode' => ['int', 'character'=>'int'],
'HaruEncoder::getWritingMode' => ['int'],
'HaruFont::getAscent' => ['int'],
'HaruFont::getCapHeight' => ['int'],
'HaruFont::getDescent' => ['int'],
'HaruFont::getEncodingName' => ['string'],
'HaruFont::getFontName' => ['string'],
'HaruFont::getTextWidth' => ['array', 'text'=>'string'],
'HaruFont::getUnicodeWidth' => ['int', 'character'=>'int'],
'HaruFont::getXHeight' => ['int'],
'HaruFont::measureText' => ['int', 'text'=>'string', 'width'=>'float', 'font_size'=>'float', 'char_space'=>'float', 'word_space'=>'float', 'word_wrap='=>'bool'],
'HaruImage::getBitsPerComponent' => ['int'],
'HaruImage::getColorSpace' => ['string'],
'HaruImage::getHeight' => ['int'],
'HaruImage::getSize' => ['array'],
'HaruImage::getWidth' => ['int'],
'HaruImage::setColorMask' => ['bool', 'rmin'=>'int', 'rmax'=>'int', 'gmin'=>'int', 'gmax'=>'int', 'bmin'=>'int', 'bmax'=>'int'],
'HaruImage::setMaskImage' => ['bool', 'mask_image'=>'object'],
'HaruOutline::setDestination' => ['bool', 'destination'=>'object'],
'HaruOutline::setOpened' => ['bool', 'opened'=>'bool'],
'HaruPage::arc' => ['bool', 'x'=>'float', 'y'=>'float', 'ray'=>'float', 'ang1'=>'float', 'ang2'=>'float'],
'HaruPage::beginText' => ['bool'],
'HaruPage::circle' => ['bool', 'x'=>'float', 'y'=>'float', 'ray'=>'float'],
'HaruPage::closePath' => ['bool'],
'HaruPage::concat' => ['bool', 'a'=>'float', 'b'=>'float', 'c'=>'float', 'd'=>'float', 'x'=>'float', 'y'=>'float'],
'HaruPage::createDestination' => ['object'],
'HaruPage::createLinkAnnotation' => ['object', 'rectangle'=>'array', 'destination'=>'object'],
'HaruPage::createTextAnnotation' => ['object', 'rectangle'=>'array', 'text'=>'string', 'encoder='=>'object'],
'HaruPage::createURLAnnotation' => ['object', 'rectangle'=>'array', 'url'=>'string'],
'HaruPage::curveTo' => ['bool', 'x1'=>'float', 'y1'=>'float', 'x2'=>'float', 'y2'=>'float', 'x3'=>'float', 'y3'=>'float'],
'HaruPage::curveTo2' => ['bool', 'x2'=>'float', 'y2'=>'float', 'x3'=>'float', 'y3'=>'float'],
'HaruPage::curveTo3' => ['bool', 'x1'=>'float', 'y1'=>'float', 'x3'=>'float', 'y3'=>'float'],
'HaruPage::drawImage' => ['bool', 'image'=>'object', 'x'=>'float', 'y'=>'float', 'width'=>'float', 'height'=>'float'],
'HaruPage::ellipse' => ['bool', 'x'=>'float', 'y'=>'float', 'xray'=>'float', 'yray'=>'float'],
'HaruPage::endPath' => ['bool'],
'HaruPage::endText' => ['bool'],
'HaruPage::eofill' => ['bool'],
'HaruPage::eoFillStroke' => ['bool', 'close_path='=>'bool'],
'HaruPage::fill' => ['bool'],
'HaruPage::fillStroke' => ['bool', 'close_path='=>'bool'],
'HaruPage::getCharSpace' => ['float'],
'HaruPage::getCMYKFill' => ['array'],
'HaruPage::getCMYKStroke' => ['array'],
'HaruPage::getCurrentFont' => ['object'],
'HaruPage::getCurrentFontSize' => ['float'],
'HaruPage::getCurrentPos' => ['array'],
'HaruPage::getCurrentTextPos' => ['array'],
'HaruPage::getDash' => ['array'],
'HaruPage::getFillingColorSpace' => ['int'],
'HaruPage::getFlatness' => ['float'],
'HaruPage::getGMode' => ['int'],
'HaruPage::getGrayFill' => ['float'],
'HaruPage::getGrayStroke' => ['float'],
'HaruPage::getHeight' => ['float'],
'HaruPage::getHorizontalScaling' => ['float'],
'HaruPage::getLineCap' => ['int'],
'HaruPage::getLineJoin' => ['int'],
'HaruPage::getLineWidth' => ['float'],
'HaruPage::getMiterLimit' => ['float'],
'HaruPage::getRGBFill' => ['array'],
'HaruPage::getRGBStroke' => ['array'],
'HaruPage::getStrokingColorSpace' => ['int'],
'HaruPage::getTextLeading' => ['float'],
'HaruPage::getTextMatrix' => ['array'],
'HaruPage::getTextRenderingMode' => ['int'],
'HaruPage::getTextRise' => ['float'],
'HaruPage::getTextWidth' => ['float', 'text'=>'string'],
'HaruPage::getTransMatrix' => ['array'],
'HaruPage::getWidth' => ['float'],
'HaruPage::getWordSpace' => ['float'],
'HaruPage::lineTo' => ['bool', 'x'=>'float', 'y'=>'float'],
'HaruPage::measureText' => ['int', 'text'=>'string', 'width'=>'float', 'wordwrap='=>'bool'],
'HaruPage::moveTextPos' => ['bool', 'x'=>'float', 'y'=>'float', 'set_leading='=>'bool'],
'HaruPage::moveTo' => ['bool', 'x'=>'float', 'y'=>'float'],
'HaruPage::moveToNextLine' => ['bool'],
'HaruPage::rectangle' => ['bool', 'x'=>'float', 'y'=>'float', 'width'=>'float', 'height'=>'float'],
'HaruPage::setCharSpace' => ['bool', 'char_space'=>'float'],
'HaruPage::setCMYKFill' => ['bool', 'c'=>'float', 'm'=>'float', 'y'=>'float', 'k'=>'float'],
'HaruPage::setCMYKStroke' => ['bool', 'c'=>'float', 'm'=>'float', 'y'=>'float', 'k'=>'float'],
'HaruPage::setDash' => ['bool', 'pattern'=>'array', 'phase'=>'int'],
'HaruPage::setFlatness' => ['bool', 'flatness'=>'float'],
'HaruPage::setFontAndSize' => ['bool', 'font'=>'object', 'size'=>'float'],
'HaruPage::setGrayFill' => ['bool', 'value'=>'float'],
'HaruPage::setGrayStroke' => ['bool', 'value'=>'float'],
'HaruPage::setHeight' => ['bool', 'height'=>'float'],
'HaruPage::setHorizontalScaling' => ['bool', 'scaling'=>'float'],
'HaruPage::setLineCap' => ['bool', 'cap'=>'int'],
'HaruPage::setLineJoin' => ['bool', 'join'=>'int'],
'HaruPage::setLineWidth' => ['bool', 'width'=>'float'],
'HaruPage::setMiterLimit' => ['bool', 'limit'=>'float'],
'HaruPage::setRGBFill' => ['bool', 'r'=>'float', 'g'=>'float', 'b'=>'float'],
'HaruPage::setRGBStroke' => ['bool', 'r'=>'float', 'g'=>'float', 'b'=>'float'],
'HaruPage::setRotate' => ['bool', 'angle'=>'int'],
'HaruPage::setSize' => ['bool', 'size'=>'int', 'direction'=>'int'],
'HaruPage::setSlideShow' => ['bool', 'type'=>'int', 'disp_time'=>'float', 'trans_time'=>'float'],
'HaruPage::setTextLeading' => ['bool', 'text_leading'=>'float'],
'HaruPage::setTextMatrix' => ['bool', 'a'=>'float', 'b'=>'float', 'c'=>'float', 'd'=>'float', 'x'=>'float', 'y'=>'float'],
'HaruPage::setTextRenderingMode' => ['bool', 'mode'=>'int'],
'HaruPage::setTextRise' => ['bool', 'rise'=>'float'],
'HaruPage::setWidth' => ['bool', 'width'=>'float'],
'HaruPage::setWordSpace' => ['bool', 'word_space'=>'float'],
'HaruPage::showText' => ['bool', 'text'=>'string'],
'HaruPage::showTextNextLine' => ['bool', 'text'=>'string', 'word_space='=>'float', 'char_space='=>'float'],
'HaruPage::stroke' => ['bool', 'close_path='=>'bool'],
'HaruPage::textOut' => ['bool', 'x'=>'float', 'y'=>'float', 'text'=>'string'],
'HaruPage::textRect' => ['bool', 'left'=>'float', 'top'=>'float', 'right'=>'float', 'bottom'=>'float', 'text'=>'string', 'align='=>'int'],
'hash' => ['non-empty-string|false', 'algo'=>'string', 'data'=>'string', 'raw_output='=>'bool'],
'hash_algos' => ['list<non-empty-string>'],
'hash_copy' => ['HashContext', 'context'=>'HashContext'],
'hash_equals' => ['bool', 'known_string'=>'string', 'user_string'=>'string'],
'hash_file' => ['non-empty-string|false', 'algo'=>'string', 'filename'=>'string', 'raw_output='=>'bool'],
'hash_final' => ['non-empty-string', 'context'=>'HashContext', 'raw_output='=>'bool'],
'hash_hkdf' => ['non-empty-string|false', 'algo'=>'string', 'key'=>'string', 'length='=>'int', 'info='=>'string', 'salt='=>'string'],
'hash_hmac' => ['non-empty-string|false', 'algo'=>'string', 'data'=>'string', 'key'=>'string', 'raw_output='=>'bool'],
'hash_hmac_algos' => ['list<non-empty-string>'],
'hash_hmac_file' => ['non-empty-string|false', 'algo'=>'string', 'filename'=>'string', 'key'=>'string', 'raw_output='=>'bool'],
'hash_init' => ['HashContext', 'algo'=>'string', 'options='=>'int', 'key='=>'string'],
'hash_pbkdf2' => ['non-empty-string|false', 'algo'=>'string', 'password'=>'string', 'salt'=>'string', 'iterations'=>'int', 'length='=>'int', 'raw_output='=>'bool'],
'hash_update' => ['bool', 'context'=>'HashContext', 'data'=>'string'],
'hash_update_file' => ['bool', 'context'=>'HashContext', 'filename'=>'string', 'scontext='=>'?HashContext'],
'hash_update_stream' => ['int', 'context'=>'HashContext', 'handle'=>'resource', 'length='=>'int'],
'hashTableObj::clear' => ['void'],
'hashTableObj::get' => ['string', 'key'=>'string'],
'hashTableObj::nextkey' => ['string', 'previousKey'=>'string'],
'hashTableObj::remove' => ['int', 'key'=>'string'],
'hashTableObj::set' => ['int', 'key'=>'string', 'value'=>'string'],
'header' => ['void', 'header'=>'string', 'replace='=>'bool', 'http_response_code='=>'int'],
'header_register_callback' => ['bool', 'callback'=>'callable'],
'header_remove' => ['void', 'name='=>'string'],
'headers_list' => ['list<non-empty-string>'],
'headers_sent' => ['bool', '&w_file='=>'string', '&w_line='=>'int'],
'hebrev' => ['string', 'str'=>'string', 'max_chars_per_line='=>'int'],
'hebrevc' => ['string', 'str'=>'string', 'max_chars_per_line='=>'int'],
'hex2bin' => ['string|false', 'data'=>'string'],
'hexdec' => ['int|float', 'hexadecimal_number'=>'string'],
'highlight_file' => ['string|bool', 'file_name'=>'string', 'return='=>'bool'],
'highlight_string' => ['string|bool', 'string'=>'string', 'return='=>'bool'],
'hrtime' => ['array{0:int,1:int}|int|float|false', 'get_as_number='=>'bool'],
'HRTime\PerformanceCounter::getElapsedTicks' => ['int'],
'HRTime\PerformanceCounter::getFrequency' => ['int'],
'HRTime\PerformanceCounter::getLastElapsedTicks' => ['int'],
'HRTime\PerformanceCounter::getTicks' => ['int'],
'HRTime\PerformanceCounter::getTicksSince' => ['int', 'start'=>'int'],
'HRTime\PerformanceCounter::isRunning' => ['bool'],
'HRTime\PerformanceCounter::start' => ['void'],
'HRTime\PerformanceCounter::stop' => ['void'],
'HRTime\StopWatch::getElapsedTicks' => ['int'],
'HRTime\StopWatch::getElapsedTime' => ['float', 'unit='=>'int'],
'HRTime\StopWatch::getLastElapsedTicks' => ['int'],
'HRTime\StopWatch::getLastElapsedTime' => ['float', 'unit='=>'int'],
'HRTime\StopWatch::isRunning' => ['bool'],
'HRTime\StopWatch::start' => ['void'],
'HRTime\StopWatch::stop' => ['void'],
'html_entity_decode' => ['string', 'string'=>'string', 'quote_style='=>'int', 'encoding='=>'string'],
'htmlentities' => ['string', 'string'=>'string', 'quote_style='=>'int', 'encoding='=>'string', 'double_encode='=>'bool'],
'htmlspecialchars' => ['string', 'string'=>'string', 'quote_style='=>'int', 'encoding='=>'string', 'double_encode='=>'bool'],
'htmlspecialchars_decode' => ['string', 'string'=>'string', 'quote_style='=>'int'],
'http\Env\Request::__construct' => ['void'],
'http\Env\Request::getCookie' => ['mixed', 'name='=>'string', 'type='=>'mixed', 'defval='=>'mixed', 'delete='=>'bool|false'],
'http\Env\Request::getFiles' => ['array'],
'http\Env\Request::getForm' => ['mixed', 'name='=>'string', 'type='=>'mixed', 'defval='=>'mixed', 'delete='=>'bool|false'],
'http\Env\Request::getQuery' => ['mixed', 'name='=>'string', 'type='=>'mixed', 'defval='=>'mixed', 'delete='=>'bool|false'],
'http\Env\Response::__construct' => ['void'],
'http\Env\Response::__invoke' => ['bool', 'data'=>'string', 'ob_flags='=>'int'],
'http\Env\Response::isCachedByETag' => ['int', 'header_name='=>'string'],
'http\Env\Response::isCachedByLastModified' => ['int', 'header_name='=>'string'],
'http\Env\Response::send' => ['bool', 'stream='=>'resource'],
'http\Env\Response::setCacheControl' => ['http\Env\Response', 'cache_control'=>'string'],
'http\Env\Response::setContentDisposition' => ['http\Env\Response', 'disposition_params'=>'array'],
'http\Env\Response::setContentEncoding' => ['http\Env\Response', 'content_encoding'=>'int'],
'http\Env\Response::setContentType' => ['http\Env\Response', 'content_type'=>'string'],
'http\Env\Response::setCookie' => ['http\Env\Response', 'cookie'=>'mixed'],
'http\Env\Response::setEnvRequest' => ['http\Env\Response', 'env_request'=>'http\Message'],
'http\Env\Response::setEtag' => ['http\Env\Response', 'etag'=>'string'],
'http\Env\Response::setLastModified' => ['http\Env\Response', 'last_modified'=>'int'],
'http\Env\Response::setThrottleRate' => ['http\Env\Response', 'chunk_size'=>'int', 'delay='=>'float|int'],
'http\QueryString::__construct' => ['void', 'querystring'=>'string'],
'http\QueryString::__toString' => ['string'],
'http\QueryString::get' => ['', 'name='=>'string', 'type='=>'mixed', 'defval='=>'mixed', 'delete='=>'bool|false'],
'http\QueryString::getArray' => ['array', 'name'=>'string', 'defval='=>'mixed', 'delete='=>'bool|false'],
'http\QueryString::getBool' => ['bool', 'name'=>'string', 'defval='=>'mixed', 'delete='=>'bool|false'],
'http\QueryString::getFloat' => ['float', 'name'=>'string', 'defval='=>'mixed', 'delete='=>'bool|false'],
'http\QueryString::getGlobalInstance' => ['http\QueryString'],
'http\QueryString::getInt' => ['int', 'name'=>'string', 'defval='=>'mixed', 'delete='=>'bool|false'],
'http\QueryString::getIterator' => ['IteratorAggregate'],
'http\QueryString::getObject' => ['', 'name'=>'string', 'defval='=>'mixed', 'delete='=>'bool|false'],
'http\QueryString::getString' => ['string', 'name'=>'string', 'defval='=>'mixed', 'delete='=>'bool|false'],
'http\QueryString::mod' => ['http\QueryString', 'params='=>'mixed'],
'http\QueryString::offsetExists' => ['bool', 'offset'=>'mixed'],
'http\QueryString::offsetGet' => ['mixed', 'offset'=>'mixed'],
'http\QueryString::offsetSet' => ['void', 'offset'=>'mixed', 'value'=>'mixed'],
'http\QueryString::offsetUnset' => ['void', 'offset'=>'mixed'],
'http\QueryString::serialize' => ['string'],
'http\QueryString::set' => ['http\QueryString', 'params'=>'mixed'],
'http\QueryString::toArray' => ['mixed[]'],
'http\QueryString::toString' => ['string'],
'http\QueryString::unserialize' => ['void', 'serialized'=>''],
'http\QueryString::xlate' => ['http\QueryString'],
'http\Url::__construct' => ['void', 'old_url='=>'mixed', 'new_url='=>'mixed', 'flags='=>'int'],
'http\Url::__toString' => [''],
'http\Url::mod' => ['http\Url', 'parts'=>'mixed', 'flags='=>'float|int|mixed'],
'http\Url::toArray' => ['string[]'],
'http\Url::toString' => ['string'],
'http_build_cookie' => ['string', 'cookie'=>'array'],
'http_build_query' => ['string', 'querydata'=>'array|object', 'prefix='=>'string', 'arg_separator='=>'string', 'enc_type='=>'int'],
'http_build_str' => ['string', 'query'=>'array', 'prefix='=>'?string', 'arg_separator='=>'string'],
'http_build_url' => ['string', 'url='=>'string|array', 'parts='=>'string|array', 'flags='=>'int', 'new_url='=>'array'],
'http_cache_etag' => ['bool', 'etag='=>'string'],
'http_cache_last_modified' => ['bool', 'timestamp_or_expires='=>'int'],
'http_chunked_decode' => ['string', 'encoded'=>'string'],
'http_date' => ['string', 'timestamp='=>'int'],
'http_deflate' => ['string', 'data'=>'string', 'flags='=>'int'],
'http_get' => ['string', 'url'=>'string', 'options='=>'array', 'info='=>'array'],
'http_get_request_body' => ['string'],
'http_get_request_body_stream' => ['resource'],
'http_get_request_headers' => ['array'],
'http_head' => ['string', 'url'=>'string', 'options='=>'array', 'info='=>'array'],
'http_inflate' => ['string', 'data'=>'string'],
'http_match_etag' => ['bool', 'etag'=>'string', 'for_range='=>'bool'],
'http_match_modified' => ['bool', 'timestamp='=>'int', 'for_range='=>'bool'],
'http_match_request_header' => ['bool', 'header'=>'string', 'value'=>'string', 'match_case='=>'bool'],
'http_negotiate_charset' => ['string', 'supported'=>'array', 'result='=>'array'],
'http_negotiate_content_type' => ['string', 'supported'=>'array', 'result='=>'array'],
'http_negotiate_language' => ['string', 'supported'=>'array', 'result='=>'array'],
'http_parse_cookie' => ['object', 'cookie'=>'string', 'flags='=>'int', 'allowed_extras='=>'array'],
'http_parse_headers' => ['array', 'header'=>'string'],
'http_parse_message' => ['object', 'message'=>'string'],
'http_parse_params' => ['object', 'param'=>'string', 'flags='=>'int'],
'http_persistent_handles_clean' => ['string', 'ident='=>'string'],
'http_persistent_handles_count' => ['object'],
'http_persistent_handles_ident' => ['string', 'ident='=>'string'],
'http_post_data' => ['string', 'url'=>'string', 'data'=>'string', 'options='=>'array', 'info='=>'array'],
'http_post_fields' => ['string', 'url'=>'string', 'data'=>'array', 'files='=>'array', 'options='=>'array', 'info='=>'array'],
'http_put_data' => ['string', 'url'=>'string', 'data'=>'string', 'options='=>'array', 'info='=>'array'],
'http_put_file' => ['string', 'url'=>'string', 'file'=>'string', 'options='=>'array', 'info='=>'array'],
'http_put_stream' => ['string', 'url'=>'string', 'stream'=>'', 'options='=>'array', 'info='=>'array'],
'http_redirect' => ['bool', 'url='=>'string', 'params='=>'array', 'session='=>'bool', 'status='=>'int'],
'http_request' => ['string', 'method'=>'int', 'url'=>'string', 'body='=>'string', 'options='=>'array', 'info='=>'array'],
'http_request_body_encode' => ['string', 'fields'=>'array', 'files'=>'array'],
'http_request_method_exists' => ['int', 'method'=>''],
'http_request_method_name' => ['string', 'method'=>'int'],
'http_request_method_register' => ['int', 'method'=>'string'],
'http_request_method_unregister' => ['bool', 'method'=>''],
'http_response_code' => ['int|bool', 'response_code='=>'int'],
'http_send_content_disposition' => ['bool', 'filename'=>'string', 'inline='=>'bool'],
'http_send_content_type' => ['bool', 'content_type='=>'string'],
'http_send_data' => ['bool', 'data'=>'string'],
'http_send_file' => ['bool', 'file'=>'string'],
'http_send_last_modified' => ['bool', 'timestamp='=>'int'],
'http_send_status' => ['bool', 'status'=>'int'],
'http_send_stream' => ['bool', 'stream'=>''],
'http_support' => ['int', 'feature='=>'int'],
'http_throttle' => ['', 'sec'=>'float', 'bytes='=>'int'],
'HttpDeflateStream::__construct' => ['void', 'flags='=>'int'],
'HttpDeflateStream::factory' => ['HttpDeflateStream', 'flags='=>'int', 'class_name='=>'string'],
'HttpDeflateStream::finish' => ['string', 'data='=>'string'],
'HttpDeflateStream::flush' => ['string', 'data='=>'string'],
'HttpDeflateStream::update' => ['string', 'data'=>'string'],
'HttpInflateStream::__construct' => ['void', 'flags='=>'int'],
'HttpInflateStream::factory' => ['HttpInflateStream', 'flags='=>'int', 'class_name='=>'string'],
'HttpInflateStream::finish' => ['string', 'data='=>'string'],
'HttpInflateStream::flush' => ['string', 'data='=>'string'],
'HttpInflateStream::update' => ['string', 'data'=>'string'],
'HttpMessage::__construct' => ['void', 'message='=>'string'],
'HttpMessage::__toString' => ['string'],
'HttpMessage::addHeaders' => ['', 'headers'=>'array', 'append='=>'bool'],
'HttpMessage::count' => ['0|positive-int'],
'HttpMessage::current' => ['mixed'],
'HttpMessage::detach' => ['HttpMessage'],
'HttpMessage::factory' => ['HttpMessage', 'raw_message='=>'string', 'class_name='=>'string'],
'HttpMessage::fromEnv' => ['HttpMessage', 'message_type'=>'int', 'class_name='=>'string'],
'HttpMessage::fromString' => ['HttpMessage', 'raw_message='=>'string', 'class_name='=>'string'],
'HttpMessage::getBody' => ['string'],
'HttpMessage::getHeader' => ['string', 'header'=>'string'],
'HttpMessage::getHeaders' => ['array'],
'HttpMessage::getHttpVersion' => ['string'],
'HttpMessage::getInfo' => [''],
'HttpMessage::getParentMessage' => ['HttpMessage'],
'HttpMessage::getRequestMethod' => ['string'],
'HttpMessage::getRequestUrl' => ['string'],
'HttpMessage::getResponseCode' => ['int'],
'HttpMessage::getResponseStatus' => ['string'],
'HttpMessage::getType' => ['int'],
'HttpMessage::guessContentType' => ['string', 'magic_file'=>'string', 'magic_mode='=>'int'],
'HttpMessage::key' => ['int|string'],
'HttpMessage::next' => ['void'],
'HttpMessage::prepend' => ['', 'message'=>'httpmessage', 'top='=>'bool'],
'HttpMessage::reverse' => ['HttpMessage'],
'HttpMessage::rewind' => ['void'],
'HttpMessage::send' => ['bool'],
'HttpMessage::serialize' => ['string'],
'HttpMessage::setBody' => ['', 'body'=>'string'],
'HttpMessage::setHeaders' => ['', 'headers'=>'array'],
'HttpMessage::setHttpVersion' => ['bool', 'version'=>'string'],
'HttpMessage::setInfo' => ['', 'http_info'=>''],
'HttpMessage::setRequestMethod' => ['bool', 'method'=>'string'],
'HttpMessage::setRequestUrl' => ['bool', 'url'=>'string'],
'HttpMessage::setResponseCode' => ['bool', 'code'=>'int'],
'HttpMessage::setResponseStatus' => ['bool', 'status'=>'string'],
'HttpMessage::setType' => ['', 'type'=>'int'],
'HttpMessage::toMessageTypeObject' => ['HttpRequest|HttpResponse'],
'HttpMessage::toString' => ['string', 'include_parent='=>'bool'],
'HttpMessage::unserialize' => ['void', 'serialized'=>''],
'HttpMessage::valid' => ['bool'],
'HttpQueryString::__construct' => ['void', 'global='=>'bool', 'add='=>''],
'HttpQueryString::__toString' => ['string'],
'HttpQueryString::factory' => ['', 'global'=>'', 'params'=>'', 'class_name'=>''],
'HttpQueryString::get' => ['', 'key='=>'string', 'type='=>'', 'defval='=>'', 'delete='=>'bool'],
'HttpQueryString::getArray' => ['', 'name'=>'', 'defval'=>'', 'delete'=>''],
'HttpQueryString::getBool' => ['', 'name'=>'', 'defval'=>'', 'delete'=>''],
'HttpQueryString::getFloat' => ['', 'name'=>'', 'defval'=>'', 'delete'=>''],
'HttpQueryString::getInt' => ['', 'name'=>'', 'defval'=>'', 'delete'=>''],
'HttpQueryString::getObject' => ['', 'name'=>'', 'defval'=>'', 'delete'=>''],
'HttpQueryString::getString' => ['', 'name'=>'', 'defval'=>'', 'delete'=>''],
'HttpQueryString::mod' => ['HttpQueryString', 'params'=>''],
'HttpQueryString::offsetExists' => ['bool', 'offset'=>'mixed'],
'HttpQueryString::offsetGet' => ['mixed', 'offset'=>'mixed'],
'HttpQueryString::offsetSet' => ['void', 'offset'=>'mixed', 'value'=>'mixed'],
'HttpQueryString::offsetUnset' => ['void', 'offset'=>'mixed'],
'HttpQueryString::serialize' => ['string'],
'HttpQueryString::set' => ['string', 'params'=>''],
'HttpQueryString::singleton' => ['HttpQueryString', 'global='=>'bool'],
'HttpQueryString::toArray' => ['array'],
'HttpQueryString::toString' => ['string'],
'HttpQueryString::unserialize' => ['void', 'serialized'=>'string'],
'HttpQueryString::xlate' => ['bool', 'ie'=>'string', 'oe'=>'string'],
'HttpRequest::__construct' => ['void', 'url='=>'string', 'request_method='=>'int', 'options='=>'array'],
'HttpRequest::addBody' => ['', 'request_body_data'=>''],
'HttpRequest::addCookies' => ['bool', 'cookies'=>'array'],
'HttpRequest::addHeaders' => ['bool', 'headers'=>'array'],
'HttpRequest::addPostFields' => ['bool', 'post_data'=>'array'],
'HttpRequest::addPostFile' => ['bool', 'name'=>'string', 'file'=>'string', 'content_type='=>'string'],
'HttpRequest::addPutData' => ['bool', 'put_data'=>'string'],
'HttpRequest::addQueryData' => ['bool', 'query_params'=>'array'],
'HttpRequest::addRawPostData' => ['bool', 'raw_post_data'=>'string'],
'HttpRequest::addSslOptions' => ['bool', 'options'=>'array'],
'HttpRequest::clearHistory' => [''],
'HttpRequest::enableCookies' => ['bool'],
'HttpRequest::encodeBody' => ['', 'fields'=>'', 'files'=>''],
'HttpRequest::factory' => ['', 'url'=>'', 'method'=>'', 'options'=>'', 'class_name'=>''],
'HttpRequest::flushCookies' => [''],
'HttpRequest::get' => ['', 'url'=>'', 'options'=>'', '&info'=>''],
'HttpRequest::getBody' => [''],
'HttpRequest::getContentType' => ['string'],
'HttpRequest::getCookies' => ['array'],
'HttpRequest::getHeaders' => ['array'],
'HttpRequest::getHistory' => ['HttpMessage'],
'HttpRequest::getMethod' => ['int'],
'HttpRequest::getOptions' => ['array'],
'HttpRequest::getPostFields' => ['array'],
'HttpRequest::getPostFiles' => ['array'],
'HttpRequest::getPutData' => ['string'],
'HttpRequest::getPutFile' => ['string'],
'HttpRequest::getQueryData' => ['string'],
'HttpRequest::getRawPostData' => ['string'],
'HttpRequest::getRawRequestMessage' => ['string'],
'HttpRequest::getRawResponseMessage' => ['string'],
'HttpRequest::getRequestMessage' => ['HttpMessage'],
'HttpRequest::getResponseBody' => ['string'],
'HttpRequest::getResponseCode' => ['int'],
'HttpRequest::getResponseCookies' => ['array', 'flags='=>'int', 'allowed_extras='=>'array'],
'HttpRequest::getResponseData' => ['array'],
'HttpRequest::getResponseHeader' => ['', 'name='=>'string'],
'HttpRequest::getResponseInfo' => ['', 'name='=>'string'],
'HttpRequest::getResponseMessage' => ['HttpMessage'],
'HttpRequest::getResponseStatus' => ['string'],
'HttpRequest::getSslOptions' => ['array'],
'HttpRequest::getUrl' => ['string'],
'HttpRequest::head' => ['', 'url'=>'', 'options'=>'', '&info'=>''],
'HttpRequest::methodExists' => ['', 'method'=>''],
'HttpRequest::methodName' => ['', 'method_id'=>''],
'HttpRequest::methodRegister' => ['', 'method_name'=>''],
'HttpRequest::methodUnregister' => ['', 'method'=>''],
'HttpRequest::postData' => ['', 'url'=>'', 'data'=>'', 'options'=>'', '&info'=>''],
'HttpRequest::postFields' => ['', 'url'=>'', 'data'=>'', 'options'=>'', '&info'=>''],
'HttpRequest::putData' => ['', 'url'=>'', 'data'=>'', 'options'=>'', '&info'=>''],
'HttpRequest::putFile' => ['', 'url'=>'', 'file'=>'', 'options'=>'', '&info'=>''],
'HttpRequest::putStream' => ['', 'url'=>'', 'stream'=>'', 'options'=>'', '&info'=>''],
'HttpRequest::resetCookies' => ['bool', 'session_only='=>'bool'],
'HttpRequest::send' => ['HttpMessage'],
'HttpRequest::setBody' => ['bool', 'request_body_data='=>'string'],
'HttpRequest::setContentType' => ['bool', 'content_type'=>'string'],
'HttpRequest::setCookies' => ['bool', 'cookies='=>'array'],
'HttpRequest::setHeaders' => ['bool', 'headers='=>'array'],
'HttpRequest::setMethod' => ['bool', 'request_method'=>'int'],
'HttpRequest::setOptions' => ['bool', 'options='=>'array'],
'HttpRequest::setPostFields' => ['bool', 'post_data'=>'array'],
'HttpRequest::setPostFiles' => ['bool', 'post_files'=>'array'],
'HttpRequest::setPutData' => ['bool', 'put_data='=>'string'],
'HttpRequest::setPutFile' => ['bool', 'file='=>'string'],
'HttpRequest::setQueryData' => ['bool', 'query_data'=>''],
'HttpRequest::setRawPostData' => ['bool', 'raw_post_data='=>'string'],
'HttpRequest::setSslOptions' => ['bool', 'options='=>'array'],
'HttpRequest::setUrl' => ['bool', 'url'=>'string'],
'HttpRequestDataShare::__construct' => ['void'],
'HttpRequestDataShare::__destruct' => [''],
'HttpRequestDataShare::attach' => ['', 'request'=>'HttpRequest'],
'HttpRequestDataShare::count' => ['0|positive-int'],
'HttpRequestDataShare::detach' => ['', 'request'=>'HttpRequest'],
'HttpRequestDataShare::factory' => ['', 'global'=>'', 'class_name'=>''],
'HttpRequestDataShare::reset' => [''],
'HttpRequestDataShare::singleton' => ['', 'global'=>''],
'HttpRequestPool::__construct' => ['void', 'request='=>'httprequest'],
'HttpRequestPool::__destruct' => [''],
'HttpRequestPool::attach' => ['bool', 'request'=>'httprequest'],
'HttpRequestPool::count' => ['0|positive-int'],
'HttpRequestPool::current' => ['mixed'],
'HttpRequestPool::detach' => ['bool', 'request'=>'httprequest'],
'HttpRequestPool::enableEvents' => ['', 'enable'=>''],
'HttpRequestPool::enablePipelining' => ['', 'enable'=>''],
'HttpRequestPool::getAttachedRequests' => ['array'],
'HttpRequestPool::getFinishedRequests' => ['array'],
'HttpRequestPool::key' => ['int|string'],
'HttpRequestPool::next' => ['void'],
'HttpRequestPool::reset' => [''],
'HttpRequestPool::rewind' => ['void'],
'HttpRequestPool::send' => ['bool'],
'HttpRequestPool::socketPerform' => ['bool'],
'HttpRequestPool::socketSelect' => ['bool', 'timeout='=>'float'],
'HttpRequestPool::valid' => ['bool'],
'HttpResponse::capture' => [''],
'HttpResponse::getBufferSize' => ['int'],
'HttpResponse::getCache' => ['bool'],
'HttpResponse::getCacheControl' => ['string'],
'HttpResponse::getContentDisposition' => ['string'],
'HttpResponse::getContentType' => ['string'],
'HttpResponse::getData' => ['string'],
'HttpResponse::getETag' => ['string'],
'HttpResponse::getFile' => ['string'],
'HttpResponse::getGzip' => ['bool'],
'HttpResponse::getHeader' => ['', 'name='=>'string'],
'HttpResponse::getLastModified' => ['int'],
'HttpResponse::getRequestBody' => ['string'],
'HttpResponse::getRequestBodyStream' => ['resource'],
'HttpResponse::getRequestHeaders' => ['array'],
'HttpResponse::getStream' => ['resource'],
'HttpResponse::getThrottleDelay' => ['float'],
'HttpResponse::guessContentType' => ['string', 'magic_file'=>'string', 'magic_mode='=>'int'],
'HttpResponse::redirect' => ['', 'url='=>'string', 'params='=>'array', 'session='=>'bool', 'status='=>'int'],
'HttpResponse::send' => ['bool', 'clean_ob='=>'bool'],
'HttpResponse::setBufferSize' => ['bool', 'bytes'=>'int'],
'HttpResponse::setCache' => ['bool', 'cache'=>'bool'],
'HttpResponse::setCacheControl' => ['bool', 'control'=>'string', 'max_age='=>'int', 'must_revalidate='=>'bool'],
'HttpResponse::setContentDisposition' => ['bool', 'filename'=>'string', 'inline='=>'bool'],
'HttpResponse::setContentType' => ['bool', 'content_type'=>'string'],
'HttpResponse::setData' => ['bool', 'data'=>''],
'HttpResponse::setETag' => ['bool', 'etag'=>'string'],
'HttpResponse::setFile' => ['bool', 'file'=>'string'],
'HttpResponse::setGzip' => ['bool', 'gzip'=>'bool'],
'HttpResponse::setHeader' => ['bool', 'name'=>'string', 'value='=>'', 'replace='=>'bool'],
'HttpResponse::setLastModified' => ['bool', 'timestamp'=>'int'],
'HttpResponse::setStream' => ['bool', 'stream'=>''],
'HttpResponse::setThrottleDelay' => ['bool', 'seconds'=>'float'],
'HttpResponse::status' => ['bool', 'status'=>'int'],
'HttpUtil::buildCookie' => ['', 'cookie_array'=>''],
'HttpUtil::buildStr' => ['', 'query'=>'', 'prefix'=>'', 'arg_sep'=>''],
'HttpUtil::buildUrl' => ['', 'url'=>'', 'parts'=>'', 'flags'=>'', '&composed'=>''],
'HttpUtil::chunkedDecode' => ['', 'encoded_string'=>''],
'HttpUtil::date' => ['', 'timestamp'=>''],
'HttpUtil::deflate' => ['', 'plain'=>'', 'flags'=>''],
'HttpUtil::inflate' => ['', 'encoded'=>''],
'HttpUtil::matchEtag' => ['', 'plain_etag'=>'', 'for_range'=>''],
'HttpUtil::matchModified' => ['', 'last_modified'=>'', 'for_range'=>''],
'HttpUtil::matchRequestHeader' => ['', 'header_name'=>'', 'header_value'=>'', 'case_sensitive'=>''],
'HttpUtil::negotiateCharset' => ['', 'supported'=>'', '&result'=>''],
'HttpUtil::negotiateContentType' => ['', 'supported'=>'', '&result'=>''],
'HttpUtil::negotiateLanguage' => ['', 'supported'=>'', '&result'=>''],
'HttpUtil::parseCookie' => ['', 'cookie_string'=>''],
'HttpUtil::parseHeaders' => ['', 'headers_string'=>''],
'HttpUtil::parseMessage' => ['', 'message_string'=>''],
'HttpUtil::parseParams' => ['', 'param_string'=>'', 'flags'=>''],
'HttpUtil::support' => ['', 'feature'=>''],
'hw_api::checkin' => ['bool', 'parameter'=>'array'],
'hw_api::checkout' => ['bool', 'parameter'=>'array'],
'hw_api::children' => ['array', 'parameter'=>'array'],
'hw_api::content' => ['HW_API_Content', 'parameter'=>'array'],
'hw_api::copy' => ['hw_api_content', 'parameter'=>'array'],
'hw_api::dbstat' => ['hw_api_object', 'parameter'=>'array'],
'hw_api::dcstat' => ['hw_api_object', 'parameter'=>'array'],
'hw_api::dstanchors' => ['array', 'parameter'=>'array'],
'hw_api::dstofsrcanchor' => ['hw_api_object', 'parameter'=>'array'],
'hw_api::find' => ['array', 'parameter'=>'array'],
'hw_api::ftstat' => ['hw_api_object', 'parameter'=>'array'],
'hw_api::hwstat' => ['hw_api_object', 'parameter'=>'array'],
'hw_api::identify' => ['bool', 'parameter'=>'array'],
'hw_api::info' => ['array', 'parameter'=>'array'],
'hw_api::insert' => ['hw_api_object', 'parameter'=>'array'],
'hw_api::insertanchor' => ['hw_api_object', 'parameter'=>'array'],
'hw_api::insertcollection' => ['hw_api_object', 'parameter'=>'array'],
'hw_api::insertdocument' => ['hw_api_object', 'parameter'=>'array'],
'hw_api::link' => ['bool', 'parameter'=>'array'],
'hw_api::lock' => ['bool', 'parameter'=>'array'],
'hw_api::move' => ['bool', 'parameter'=>'array'],
'hw_api::object' => ['hw_api_object', 'parameter'=>'array'],
'hw_api::objectbyanchor' => ['hw_api_object', 'parameter'=>'array'],
'hw_api::parents' => ['array', 'parameter'=>'array'],
'hw_api::remove' => ['bool', 'parameter'=>'array'],
'hw_api::replace' => ['hw_api_object', 'parameter'=>'array'],
'hw_api::setcommittedversion' => ['hw_api_object', 'parameter'=>'array'],
'hw_api::srcanchors' => ['array', 'parameter'=>'array'],
'hw_api::srcsofdst' => ['array', 'parameter'=>'array'],
'hw_api::unlock' => ['bool', 'parameter'=>'array'],
'hw_api::user' => ['hw_api_object', 'parameter'=>'array'],
'hw_api::userlist' => ['array', 'parameter'=>'array'],
'hw_api_attribute' => ['HW_API_Attribute', 'name='=>'string', 'value='=>'string'],
'hw_api_attribute::key' => ['string'],
'hw_api_attribute::langdepvalue' => ['string', 'language'=>'string'],
'hw_api_attribute::value' => ['string'],
'hw_api_attribute::values' => ['array'],
'hw_api_content' => ['HW_API_Content', 'content'=>'string', 'mimetype'=>'string'],
'hw_api_content::mimetype' => ['string'],
'hw_api_content::read' => ['string', 'buffer'=>'string', 'len'=>'int'],
'hw_api_error::count' => ['0|positive-int'],
'hw_api_error::reason' => ['HW_API_Reason'],
'hw_api_object' => ['hw_api_object', 'parameter'=>'array'],
'hw_api_object::assign' => ['bool', 'parameter'=>'array'],
'hw_api_object::attreditable' => ['bool', 'parameter'=>'array'],
'hw_api_object::count' => ['0|positive-int', 'parameter'=>'array'],
'hw_api_object::insert' => ['bool', 'attribute'=>'hw_api_attribute'],
'hw_api_object::remove' => ['bool', 'name'=>'string'],
'hw_api_object::title' => ['string', 'parameter'=>'array'],
'hw_api_object::value' => ['string', 'name'=>'string'],
'hw_api_reason::description' => ['string'],
'hw_api_reason::type' => ['HW_API_Reason'],
'hw_Array2Objrec' => ['string', 'object_array'=>'array'],
'hw_changeobject' => ['bool', 'link'=>'int', 'objid'=>'int', 'attributes'=>'array'],
'hw_Children' => ['array', 'connection'=>'int', 'objectid'=>'int'],
'hw_ChildrenObj' => ['array', 'connection'=>'int', 'objectid'=>'int'],
'hw_Close' => ['bool', 'connection'=>'int'],
'hw_Connect' => ['int', 'host'=>'string', 'port'=>'int', 'username='=>'string', 'password='=>'string'],
'hw_connection_info' => ['', 'link'=>'int'],
'hw_cp' => ['int', 'connection'=>'int', 'object_id_array'=>'array', 'destination_id'=>'int'],
'hw_Deleteobject' => ['bool', 'connection'=>'int', 'object_to_delete'=>'int'],
'hw_DocByAnchor' => ['int', 'connection'=>'int', 'anchorid'=>'int'],
'hw_DocByAnchorObj' => ['string', 'connection'=>'int', 'anchorid'=>'int'],
'hw_Document_Attributes' => ['string', 'hw_document'=>'int'],
'hw_Document_BodyTag' => ['string', 'hw_document'=>'int', 'prefix='=>'string'],
'hw_Document_Content' => ['string', 'hw_document'=>'int'],
'hw_Document_SetContent' => ['bool', 'hw_document'=>'int', 'content'=>'string'],
'hw_Document_Size' => ['int', 'hw_document'=>'int'],
'hw_dummy' => ['string', 'link'=>'int', 'id'=>'int', 'msgid'=>'int'],
'hw_EditText' => ['bool', 'connection'=>'int', 'hw_document'=>'int'],
'hw_Error' => ['int', 'connection'=>'int'],
'hw_ErrorMsg' => ['string', 'connection'=>'int'],
'hw_Free_Document' => ['bool', 'hw_document'=>'int'],
'hw_GetAnchors' => ['array', 'connection'=>'int', 'objectid'=>'int'],
'hw_GetAnchorsObj' => ['array', 'connection'=>'int', 'objectid'=>'int'],
'hw_GetAndLock' => ['string', 'connection'=>'int', 'objectid'=>'int'],
'hw_GetChildColl' => ['array', 'connection'=>'int', 'objectid'=>'int'],
'hw_GetChildCollObj' => ['array', 'connection'=>'int', 'objectid'=>'int'],
'hw_GetChildDocColl' => ['array', 'connection'=>'int', 'objectid'=>'int'],
'hw_GetChildDocCollObj' => ['array', 'connection'=>'int', 'objectid'=>'int'],
'hw_GetObject' => ['', 'connection'=>'int', 'objectid'=>'', 'query='=>'string'],
'hw_GetObjectByQuery' => ['array', 'connection'=>'int', 'query'=>'string', 'max_hits'=>'int'],
'hw_GetObjectByQueryColl' => ['array', 'connection'=>'int', 'objectid'=>'int', 'query'=>'string', 'max_hits'=>'int'],
'hw_GetObjectByQueryCollObj' => ['array', 'connection'=>'int', 'objectid'=>'int', 'query'=>'string', 'max_hits'=>'int'],
'hw_GetObjectByQueryObj' => ['array', 'connection'=>'int', 'query'=>'string', 'max_hits'=>'int'],
'hw_GetParents' => ['array', 'connection'=>'int', 'objectid'=>'int'],
'hw_GetParentsObj' => ['array', 'connection'=>'int', 'objectid'=>'int'],
'hw_getrellink' => ['string', 'link'=>'int', 'rootid'=>'int', 'sourceid'=>'int', 'destid'=>'int'],
'hw_GetRemote' => ['int', 'connection'=>'int', 'objectid'=>'int'],
'hw_getremotechildren' => ['', 'connection'=>'int', 'object_record'=>'string'],
'hw_GetSrcByDestObj' => ['array', 'connection'=>'int', 'objectid'=>'int'],
'hw_GetText' => ['int', 'connection'=>'int', 'objectid'=>'int', 'prefix='=>''],
'hw_getusername' => ['string', 'connection'=>'int'],
'hw_Identify' => ['string', 'link'=>'int', 'username'=>'string', 'password'=>'string'],
'hw_InCollections' => ['array', 'connection'=>'int', 'object_id_array'=>'array', 'collection_id_array'=>'array', 'return_collections'=>'int'],
'hw_Info' => ['string', 'connection'=>'int'],
'hw_InsColl' => ['int', 'connection'=>'int', 'objectid'=>'int', 'object_array'=>'array'],
'hw_InsDoc' => ['int', 'connection'=>'', 'parentid'=>'int', 'object_record'=>'string', 'text='=>'string'],
'hw_insertanchors' => ['bool', 'hwdoc'=>'int', 'anchorecs'=>'array', 'dest'=>'array', 'urlprefixes='=>'array'],
'hw_InsertDocument' => ['int', 'connection'=>'int', 'parent_id'=>'int', 'hw_document'=>'int'],
'hw_InsertObject' => ['int', 'connection'=>'int', 'object_rec'=>'string', 'parameter'=>'string'],
'hw_mapid' => ['int', 'connection'=>'int', 'server_id'=>'int', 'object_id'=>'int'],
'hw_Modifyobject' => ['bool', 'connection'=>'int', 'object_to_change'=>'int', 'remove'=>'array', 'add'=>'array', 'mode='=>'int'],
'hw_mv' => ['int', 'connection'=>'int', 'object_id_array'=>'array', 'source_id'=>'int', 'destination_id'=>'int'],
'hw_New_Document' => ['int', 'object_record'=>'string', 'document_data'=>'string', 'document_size'=>'int'],
'hw_objrec2array' => ['array', 'object_record'=>'string', 'format='=>'array'],
'hw_Output_Document' => ['bool', 'hw_document'=>'int'],
'hw_pConnect' => ['int', 'host'=>'string', 'port'=>'int', 'username='=>'string', 'password='=>'string'],
'hw_PipeDocument' => ['int', 'connection'=>'int', 'objectid'=>'int', 'url_prefixes='=>'array'],
'hw_Root' => ['int'],
'hw_setlinkroot' => ['int', 'link'=>'int', 'rootid'=>'int'],
'hw_stat' => ['string', 'link'=>'int'],
'hw_Unlock' => ['bool', 'connection'=>'int', 'objectid'=>'int'],
'hw_Who' => ['array', 'connection'=>'int'],
'hwapi_attribute_new' => ['HW_API_Attribute', 'name='=>'string', 'value='=>'string'],
'hwapi_content_new' => ['HW_API_Content', 'content'=>'string', 'mimetype'=>'string'],
'hwapi_hgcsp' => ['HW_API', 'hostname'=>'string', 'port='=>'int'],
'hwapi_object_new' => ['hw_api_object', 'parameter'=>'array'],
'hypot' => ['float', 'num1'=>'float', 'num2'=>'float'],
'ibase_add_user' => ['bool', 'service_handle'=>'resource', 'user_name'=>'string', 'password'=>'string', 'first_name='=>'string', 'middle_name='=>'string', 'last_name='=>'string'],
'ibase_affected_rows' => ['int', 'link_identifier='=>'resource'],
'ibase_backup' => ['mixed', 'service_handle'=>'resource', 'source_db'=>'string', 'dest_file'=>'string', 'options='=>'int', 'verbose='=>'bool'],
'ibase_blob_add' => ['void', 'blob_handle'=>'resource', 'data'=>'string'],
'ibase_blob_cancel' => ['bool', 'blob_handle'=>'resource'],
'ibase_blob_close' => ['string', 'blob_handle'=>'resource'],
'ibase_blob_create' => ['resource', 'link_identifier='=>'resource'],
'ibase_blob_echo' => ['bool', 'link_identifier'=>'', 'blob_id'=>'string'],
'ibase_blob_echo\'1' => ['bool', 'blob_id'=>'string'],
'ibase_blob_get' => ['string', 'blob_handle'=>'resource', 'len'=>'int'],
'ibase_blob_import' => ['string', 'link_identifier'=>'', 'file_handle'=>''],
'ibase_blob_info' => ['array', 'link_identifier'=>'', 'blob_id'=>'string'],
'ibase_blob_info\'1' => ['array', 'blob_id'=>'string'],
'ibase_blob_open' => ['resource|false', 'link_identifier'=>'', 'blob_id'=>'string'],
'ibase_blob_open\'1' => ['resource', 'blob_id'=>'string'],
'ibase_close' => ['bool', 'link_identifier='=>'resource'],
'ibase_commit' => ['bool', 'link_identifier='=>'resource'],
'ibase_commit_ret' => ['bool', 'link_identifier='=>'resource'],
'ibase_connect' => ['resource', 'database='=>'string', 'username='=>'string', 'password='=>'string', 'charset='=>'string', 'buffers='=>'int', 'dialect='=>'int', 'role='=>'string'],
'ibase_db_info' => ['string', 'service_handle'=>'resource', 'db'=>'string', 'action'=>'int', 'argument='=>'int'],
'ibase_delete_user' => ['bool', 'service_handle'=>'resource', 'user_name'=>'string', 'password='=>'string', 'first_name='=>'string', 'middle_name='=>'string', 'last_name='=>'string'],
'ibase_drop_db' => ['bool', 'link_identifier='=>'resource'],
'ibase_errcode' => ['int'],
'ibase_errmsg' => ['string'],
'ibase_execute' => ['resource', 'query'=>'resource', 'bind_arg='=>'mixed', '...args='=>'mixed'],
'ibase_fetch_assoc' => ['array', 'result'=>'resource', 'fetch_flags='=>'int'],
'ibase_fetch_object' => ['object', 'result'=>'resource', 'fetch_flags='=>'int'],
'ibase_fetch_row' => ['array', 'result'=>'resource', 'fetch_flags='=>'int'],
'ibase_field_info' => ['array', 'query_result'=>'resource', 'field_number'=>'int'],
'ibase_free_event_handler' => ['bool', 'event'=>'resource'],
'ibase_free_query' => ['bool', 'query'=>'resource'],
'ibase_free_result' => ['bool', 'result'=>'resource'],
'ibase_gen_id' => ['int', 'generator'=>'string', 'increment='=>'int', 'link_identifier='=>'resource'],
'ibase_maintain_db' => ['bool', 'service_handle'=>'resource', 'db'=>'string', 'action'=>'int', 'argument='=>'int'],
'ibase_modify_user' => ['bool', 'service_handle'=>'resource', 'user_name'=>'string', 'password'=>'string', 'first_name='=>'string', 'middle_name='=>'string', 'last_name='=>'string'],
'ibase_name_result' => ['bool', 'result'=>'resource', 'name'=>'string'],
'ibase_num_fields' => ['int', 'query_result'=>'resource'],
'ibase_num_params' => ['int', 'query'=>'resource'],
'ibase_num_rows' => ['int', 'result_identifier'=>''],
'ibase_param_info' => ['array', 'query'=>'resource', 'field_number'=>'int'],
'ibase_pconnect' => ['resource', 'database='=>'string', 'username='=>'string', 'password='=>'string', 'charset='=>'string', 'buffers='=>'int', 'dialect='=>'int', 'role='=>'string'],
'ibase_prepare' => ['resource', 'link_identifier'=>'', 'query'=>'string', 'trans_identifier'=>''],
'ibase_query' => ['resource', 'link_identifier='=>'resource', 'string='=>'string', 'bind_arg='=>'int', '...args='=>''],
'ibase_restore' => ['mixed', 'service_handle'=>'resource', 'source_file'=>'string', 'dest_db'=>'string', 'options='=>'int', 'verbose='=>'bool'],
'ibase_rollback' => ['bool', 'link_identifier='=>'resource'],
'ibase_rollback_ret' => ['bool', 'link_identifier='=>'resource'],
'ibase_server_info' => ['string', 'service_handle'=>'resource', 'action'=>'int'],
'ibase_service_attach' => ['resource', 'host'=>'string', 'dba_username'=>'string', 'dba_password'=>'string'],
'ibase_service_detach' => ['bool', 'service_handle'=>'resource'],
'ibase_set_event_handler' => ['resource', 'link_identifier'=>'', 'callback'=>'callable', 'event='=>'string', '...args='=>''],
'ibase_set_event_handler\'1' => ['resource', 'callback'=>'callable', 'event'=>'string', '...args'=>''],
'ibase_timefmt' => ['bool', 'format'=>'string', 'columntype='=>'int'],
'ibase_trans' => ['resource', 'trans_args='=>'int', 'link_identifier='=>'', '...args='=>''],
'ibase_wait_event' => ['string', 'link_identifier'=>'', 'event='=>'string', '...args='=>''],
'ibase_wait_event\'1' => ['string', 'event'=>'string', '...args'=>''],
'iconv' => ['string|false', 'in_charset'=>'string', 'out_charset'=>'string', 'str'=>'string'],
'iconv_get_encoding' => ['mixed', 'type='=>'string'],
'iconv_mime_decode' => ['string|false', 'encoded_string'=>'string', 'mode='=>'int', 'charset='=>'string'],
'iconv_mime_decode_headers' => ['array|false', 'headers'=>'string', 'mode='=>'int', 'charset='=>'string'],
'iconv_mime_encode' => ['string|false', 'field_name'=>'string', 'field_value'=>'string', 'preference='=>'array'],
'iconv_set_encoding' => ['bool', 'type'=>'string', 'charset'=>'string'],
'iconv_strlen' => ['0|positive-int|false', 'str'=>'string', 'charset='=>'string'],
'iconv_strpos' => ['int|false', 'haystack'=>'string', 'needle'=>'string', 'offset='=>'int', 'charset='=>'string'],
'iconv_strrpos' => ['int|false', 'haystack'=>'string', 'needle'=>'string', 'charset='=>'string'],
'iconv_substr' => ['string|false', 'str'=>'string', 'offset'=>'int', 'length='=>'int', 'charset='=>'string'],
'id3_get_frame_long_name' => ['string', 'frameid'=>'string'],
'id3_get_frame_short_name' => ['string', 'frameid'=>'string'],
'id3_get_genre_id' => ['int', 'genre'=>'string'],
'id3_get_genre_list' => ['array'],
'id3_get_genre_name' => ['string', 'genre_id'=>'int'],
'id3_get_tag' => ['array', 'filename'=>'string', 'version='=>'int'],
'id3_get_version' => ['int', 'filename'=>'string'],
'id3_remove_tag' => ['bool', 'filename'=>'string', 'version='=>'int'],
'id3_set_tag' => ['bool', 'filename'=>'string', 'tag'=>'array', 'version='=>'int'],
'idate' => ['int|false', 'format'=>'string', 'timestamp='=>'int'],
'idn_strerror' => ['string', 'errorcode'=>'int'],
'idn_to_ascii' => ['string|false', 'domain'=>'string', 'options='=>'int', 'variant='=>'int', '&w_idna_info='=>'array'],
'idn_to_utf8' => ['string|false', 'domain'=>'string', 'options='=>'int', 'variant='=>'int', '&w_idna_info='=>'array'],
'ifx_affected_rows' => ['int', 'result_id'=>'resource'],
'ifx_blobinfile_mode' => ['bool', 'mode'=>'int'],
'ifx_byteasvarchar' => ['bool', 'mode'=>'int'],
'ifx_close' => ['bool', 'link_identifier='=>'resource'],
'ifx_connect' => ['resource', 'database='=>'string', 'userid='=>'string', 'password='=>'string'],
'ifx_copy_blob' => ['int', 'bid'=>'int'],
'ifx_create_blob' => ['int', 'type'=>'int', 'mode'=>'int', 'param'=>'string'],
'ifx_create_char' => ['int', 'param'=>'string'],
'ifx_do' => ['bool', 'result_id'=>'resource'],
'ifx_error' => ['string', 'link_identifier='=>'resource'],
'ifx_errormsg' => ['string', 'errorcode='=>'int'],
'ifx_fetch_row' => ['array', 'result_id'=>'resource', 'position='=>'mixed'],
'ifx_fieldproperties' => ['array', 'result_id'=>'resource'],
'ifx_fieldtypes' => ['array', 'result_id'=>'resource'],
'ifx_free_blob' => ['bool', 'bid'=>'int'],
'ifx_free_char' => ['bool', 'bid'=>'int'],
'ifx_free_result' => ['bool', 'result_id'=>'resource'],
'ifx_get_blob' => ['string', 'bid'=>'int'],
'ifx_get_char' => ['string', 'bid'=>'int'],
'ifx_getsqlca' => ['array', 'result_id'=>'resource'],
'ifx_htmltbl_result' => ['int', 'result_id'=>'resource', 'html_table_options='=>'string'],
'ifx_nullformat' => ['bool', 'mode'=>'int'],
'ifx_num_fields' => ['int', 'result_id'=>'resource'],
'ifx_num_rows' => ['int', 'result_id'=>'resource'],
'ifx_pconnect' => ['resource', 'database='=>'string', 'userid='=>'string', 'password='=>'string'],
'ifx_prepare' => ['resource', 'query'=>'string', 'link_identifier'=>'resource', 'cursor_def='=>'int', 'blobidarray='=>'mixed'],
'ifx_query' => ['resource', 'query'=>'string', 'link_identifier'=>'resource', 'cursor_type='=>'int', 'blobidarray='=>'mixed'],
'ifx_textasvarchar' => ['bool', 'mode'=>'int'],
'ifx_update_blob' => ['bool', 'bid'=>'int', 'content'=>'string'],
'ifx_update_char' => ['bool', 'bid'=>'int', 'content'=>'string'],
'ifxus_close_slob' => ['bool', 'bid'=>'int'],
'ifxus_create_slob' => ['int', 'mode'=>'int'],
'ifxus_free_slob' => ['bool', 'bid'=>'int'],
'ifxus_open_slob' => ['int', 'bid'=>'int', 'mode'=>'int'],
'ifxus_read_slob' => ['string', 'bid'=>'int', 'nbytes'=>'int'],
'ifxus_seek_slob' => ['int', 'bid'=>'int', 'mode'=>'int', 'offset'=>'int'],
'ifxus_tell_slob' => ['int', 'bid'=>'int'],
'ifxus_write_slob' => ['int', 'bid'=>'int', 'content'=>'string'],
'igbinary_serialize' => ['string|null', 'value'=>'mixed'],
'igbinary_unserialize' => ['mixed', 'str'=>'string'],
'ignore_user_abort' => ['int', 'value='=>'bool'],
'iis_add_server' => ['int', 'path'=>'string', 'comment'=>'string', 'server_ip'=>'string', 'port'=>'int', 'host_name'=>'string', 'rights'=>'int', 'start_server'=>'int'],
'iis_get_dir_security' => ['int', 'server_instance'=>'int', 'virtual_path'=>'string'],
'iis_get_script_map' => ['string', 'server_instance'=>'int', 'virtual_path'=>'string', 'script_extension'=>'string'],
'iis_get_server_by_comment' => ['int', 'comment'=>'string'],
'iis_get_server_by_path' => ['int', 'path'=>'string'],
'iis_get_server_rights' => ['int', 'server_instance'=>'int', 'virtual_path'=>'string'],
'iis_get_service_state' => ['int', 'service_id'=>'string'],
'iis_remove_server' => ['int', 'server_instance'=>'int'],
'iis_set_app_settings' => ['int', 'server_instance'=>'int', 'virtual_path'=>'string', 'application_scope'=>'string'],
'iis_set_dir_security' => ['int', 'server_instance'=>'int', 'virtual_path'=>'string', 'directory_flags'=>'int'],
'iis_set_script_map' => ['int', 'server_instance'=>'int', 'virtual_path'=>'string', 'script_extension'=>'string', 'engine_path'=>'string', 'allow_scripting'=>'int'],
'iis_set_server_rights' => ['int', 'server_instance'=>'int', 'virtual_path'=>'string', 'directory_flags'=>'int'],
'iis_start_server' => ['int', 'server_instance'=>'int'],
'iis_start_service' => ['int', 'service_id'=>'string'],
'iis_stop_server' => ['int', 'server_instance'=>'int'],
'iis_stop_service' => ['int', 'service_id'=>'string'],
'image2wbmp' => ['bool', 'im'=>'resource', 'filename='=>'?string', 'threshold='=>'int'],
'image_type_to_extension' => ['string|false', 'imagetype'=>'int', 'include_dot='=>'bool'],
'image_type_to_mime_type' => ['string', 'imagetype'=>'int'],
'imageaffine' => ['resource|false', 'src'=>'resource', 'affine'=>'array', 'clip='=>'array'],
'imageaffineconcat' => ['array', 'm1'=>'array', 'm2'=>'array'],
'imageaffinematrixconcat' => ['array{0:float,1:float,2:float,3:float,4:float,5:float}|false', 'm1'=>'array', 'm2'=>'array'],
'imageaffinematrixget' => ['array{0:float,1:float,2:float,3:float,4:float,5:float}|false', 'type'=>'int', 'options'=>'array|float'],
'imagealphablending' => ['bool', 'im'=>'resource', 'on'=>'bool'],
'imageantialias' => ['bool', 'im'=>'resource', 'on'=>'bool'],
'imagearc' => ['bool', 'im'=>'resource', 'cx'=>'int', 'cy'=>'int', 'w'=>'int', 'h'=>'int', 's'=>'int', 'e'=>'int', 'col'=>'int'],
'imagebmp' => ['bool', 'image'=>'resource', 'to='=>'string|resource|null', 'compressed='=>'bool'],
'imagechar' => ['bool', 'im'=>'resource', 'font'=>'int', 'x'=>'int', 'y'=>'int', 'c'=>'string', 'col'=>'int'],
'imagecharup' => ['bool', 'im'=>'resource', 'font'=>'int', 'x'=>'int', 'y'=>'int', 'c'=>'string', 'col'=>'int'],
'imagecolorallocate' => ['int|false', 'im'=>'resource', 'red'=>'int', 'green'=>'int', 'blue'=>'int'],
'imagecolorallocatealpha' => ['int|false', 'im'=>'resource', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'alpha'=>'int'],
'imagecolorat' => ['int|false', 'im'=>'resource', 'x'=>'int', 'y'=>'int'],
'imagecolorclosest' => ['int|false', 'im'=>'resource', 'red'=>'int', 'green'=>'int', 'blue'=>'int'],
'imagecolorclosestalpha' => ['int|false', 'im'=>'resource', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'alpha'=>'int'],
'imagecolorclosesthwb' => ['int|false', 'im'=>'resource', 'red'=>'int', 'green'=>'int', 'blue'=>'int'],
'imagecolordeallocate' => ['bool', 'im'=>'resource', 'index'=>'int'],
'imagecolorexact' => ['int|false', 'im'=>'resource', 'red'=>'int', 'green'=>'int', 'blue'=>'int'],
'imagecolorexactalpha' => ['int|false', 'im'=>'resource', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'alpha'=>'int'],
'imagecolormatch' => ['bool', 'im1'=>'resource', 'im2'=>'resource'],
'imagecolorresolve' => ['int|false', 'im'=>'resource', 'red'=>'int', 'green'=>'int', 'blue'=>'int'],
'imagecolorresolvealpha' => ['int|false', 'im'=>'resource', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'alpha'=>'int'],
'imagecolorset' => ['void', 'im'=>'resource', 'col'=>'int', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'alpha='=>'int'],
'imagecolorsforindex' => ['array|false', 'im'=>'resource', 'col'=>'int'],
'imagecolorstotal' => ['int', 'im'=>'resource'],
'imagecolortransparent' => ['int', 'im'=>'resource', 'col='=>'int'],
'imageconvolution' => ['bool', 'src_im'=>'resource', 'matrix3x3'=>'array', 'div'=>'float', 'offset'=>'float'],
'imagecopy' => ['bool', 'dst_im'=>'resource', 'src_im'=>'resource', 'dst_x'=>'int', 'dst_y'=>'int', 'src_x'=>'int', 'src_y'=>'int', 'src_w'=>'int', 'src_h'=>'int'],
'imagecopymerge' => ['bool', 'src_im'=>'resource', 'dst_im'=>'resource', 'dst_x'=>'int', 'dst_y'=>'int', 'src_x'=>'int', 'src_y'=>'int', 'src_w'=>'int', 'src_h'=>'int', 'pct'=>'int'],
'imagecopymergegray' => ['bool', 'src_im'=>'resource', 'dst_im'=>'resource', 'dst_x'=>'int', 'dst_y'=>'int', 'src_x'=>'int', 'src_y'=>'int', 'src_w'=>'int', 'src_h'=>'int', 'pct'=>'int'],
'imagecopyresampled' => ['bool', 'dst_im'=>'resource', 'src_im'=>'resource', 'dst_x'=>'int', 'dst_y'=>'int', 'src_x'=>'int', 'src_y'=>'int', 'dst_w'=>'int', 'dst_h'=>'int', 'src_w'=>'int', 'src_h'=>'int'],
'imagecopyresized' => ['bool', 'dst_im'=>'resource', 'src_im'=>'resource', 'dst_x'=>'int', 'dst_y'=>'int', 'src_x'=>'int', 'src_y'=>'int', 'dst_w'=>'int', 'dst_h'=>'int', 'src_w'=>'int', 'src_h'=>'int'],
'imagecreate' => ['resource|false', 'x_size'=>'int', 'y_size'=>'int'],
'imagecreatefrombmp' => ['resource|false', 'filename'=>'string'],
'imagecreatefromgd' => ['resource|false', 'filename'=>'string'],
'imagecreatefromgd2' => ['resource|false', 'filename'=>'string'],
'imagecreatefromgd2part' => ['resource|false', 'filename'=>'string', 'srcx'=>'int', 'srcy'=>'int', 'width'=>'int', 'height'=>'int'],
'imagecreatefromgif' => ['resource|false', 'filename'=>'string'],
'imagecreatefromjpeg' => ['resource|false', 'filename'=>'string'],
'imagecreatefrompng' => ['resource|false', 'filename'=>'string'],
'imagecreatefromstring' => ['resource|false', 'image'=>'string'],
'imagecreatefromwbmp' => ['resource|false', 'filename'=>'string'],
'imagecreatefromwebp' => ['resource|false', 'filename'=>'string'],
'imagecreatefromxbm' => ['resource|false', 'filename'=>'string'],
'imagecreatefromxpm' => ['resource|false', 'filename'=>'string'],
'imagecreatetruecolor' => ['resource|false', 'x_size'=>'int', 'y_size'=>'int'],
'imagecrop' => ['resource|false', 'im'=>'resource', 'rect'=>'array'],
'imagecropauto' => ['resource|false', 'im'=>'resource', 'mode='=>'int', 'threshold='=>'float', 'color='=>'int'],
'imagedashedline' => ['bool', 'im'=>'resource', 'x1'=>'int', 'y1'=>'int', 'x2'=>'int', 'y2'=>'int', 'col'=>'int'],
'imagedestroy' => ['bool', 'im'=>'resource'],
'imageellipse' => ['bool', 'im'=>'resource', 'cx'=>'int', 'cy'=>'int', 'w'=>'int', 'h'=>'int', 'color'=>'int'],
'imagefill' => ['bool', 'im'=>'resource', 'x'=>'int', 'y'=>'int', 'col'=>'int'],
'imagefilledarc' => ['bool', 'im'=>'resource', 'cx'=>'int', 'cy'=>'int', 'w'=>'int', 'h'=>'int', 's'=>'int', 'e'=>'int', 'col'=>'int', 'style'=>'int'],
'imagefilledellipse' => ['bool', 'im'=>'resource', 'cx'=>'int', 'cy'=>'int', 'w'=>'int', 'h'=>'int', 'color'=>'int'],
'imagefilledpolygon' => ['bool', 'im'=>'resource', 'point'=>'array', 'num_points'=>'int', 'col'=>'int'],
'imagefilledrectangle' => ['bool', 'im'=>'resource', 'x1'=>'int', 'y1'=>'int', 'x2'=>'int', 'y2'=>'int', 'col'=>'int'],
'imagefilltoborder' => ['bool', 'im'=>'resource', 'x'=>'int', 'y'=>'int', 'border'=>'int', 'col'=>'int'],
'imagefilter' => ['bool', 'src_im'=>'resource', 'filtertype'=>'int', 'arg1='=>'int', 'arg2='=>'int', 'arg3='=>'int', 'arg4='=>'int'],
'imageflip' => ['bool', 'im'=>'resource', 'mode'=>'int'],
'imagefontheight' => ['int', 'font'=>'int'],
'imagefontwidth' => ['int', 'font'=>'int'],
'imageftbbox' => ['array|false', 'size'=>'float', 'angle'=>'float', 'font_file'=>'string', 'text'=>'string', 'extrainfo='=>'array'],
'imagefttext' => ['array|false', 'im'=>'resource', 'size'=>'float', 'angle'=>'float', 'x'=>'int', 'y'=>'int', 'col'=>'int', 'font_file'=>'string', 'text'=>'string', 'extrainfo='=>'array'],
'imagegammacorrect' => ['bool', 'im'=>'resource', 'inputgamma'=>'float', 'outputgamma'=>'float'],
'imagegd' => ['bool', 'im'=>'resource', 'filename='=>'string|resource|null'],
'imagegd2' => ['bool', 'im'=>'resource', 'filename='=>'string|resource|null', 'chunk_size='=>'int', 'type='=>'int'],
'imagegetclip' => ['array', 'im'=>'resource'],
'imagegif' => ['bool', 'im'=>'resource', 'filename='=>'string|resource|null'],
'imagegrabscreen' => ['resource|false'],
'imagegrabwindow' => ['resource|false', 'window_handle'=>'int', 'client_area='=>'int'],
'imageinterlace' => ['int', 'im'=>'resource', 'interlace='=>'int'],
'imageistruecolor' => ['bool', 'im'=>'resource'],
'imagejpeg' => ['bool', 'im'=>'resource', 'filename='=>'string|resource|null', 'quality='=>'int'],
'imagelayereffect' => ['bool', 'im'=>'resource', 'effect'=>'int'],
'imageline' => ['bool', 'im'=>'resource', 'x1'=>'int', 'y1'=>'int', 'x2'=>'int', 'y2'=>'int', 'col'=>'int'],
'imageloadfont' => ['int|false', 'filename'=>'string'],
'imageObj::pasteImage' => ['void', 'srcImg'=>'imageObj', 'transparentColorHex'=>'int', 'dstX'=>'int', 'dstY'=>'int', 'angle'=>'int'],
'imageObj::saveImage' => ['int', 'filename'=>'string', 'oMap'=>'mapObj'],
'imageObj::saveWebImage' => ['string'],
'imageopenpolygon' => ['bool', 'image'=>'resource', 'points'=>'array', 'num_points'=>'int', 'color'=>'int'],
'imagepalettecopy' => ['void', 'dst'=>'resource', 'src'=>'resource'],
'imagepalettetotruecolor' => ['bool', 'src'=>'resource'],
'imagepng' => ['bool', 'im'=>'resource', 'filename='=>'string|resource|null', 'quality='=>'int', 'filters='=>'int'],
'imagepolygon' => ['bool', 'im'=>'resource', 'point'=>'array', 'num_points'=>'int', 'col'=>'int'],
'imagepsbbox' => ['array', 'text'=>'string', 'font'=>'', 'size'=>'int', 'space'=>'int', 'tightness'=>'int', 'angle'=>'float'],
'imagepsencodefont' => ['bool', 'font_index'=>'resource', 'encodingfile'=>'string'],
'imagepsextendfont' => ['bool', 'font_index'=>'resource', 'extend'=>'float'],
'imagepsfreefont' => ['bool', 'font_index'=>'resource'],
'imagepsloadfont' => ['resource', 'filename'=>'string'],
'imagepsslantfont' => ['bool', 'font_index'=>'resource', 'slant'=>'float'],
'imagepstext' => ['array', 'image'=>'resource', 'text'=>'string', 'font_index'=>'resource', 'size'=>'int', 'foreground'=>'int', 'background'=>'int', 'x'=>'int', 'y'=>'int', 'space='=>'int', 'tightness='=>'int', 'angle='=>'float', 'antialias_steps='=>'int'],
'imagerectangle' => ['bool', 'im'=>'resource', 'x1'=>'int', 'y1'=>'int', 'x2'=>'int', 'y2'=>'int', 'col'=>'int'],
'imageresolution' => ['mixed', 'image'=>'resource', 'res_x='=>'int', 'res_y='=>'int'],
'imagerotate' => ['resource|false', 'src_im'=>'resource', 'angle'=>'float', 'bgdcolor'=>'int', 'ignoretransparent='=>'int'],
'imagesavealpha' => ['bool', 'im'=>'resource', 'on'=>'bool'],
'imagescale' => ['resource|false', 'im'=>'resource', 'new_width'=>'int', 'new_height='=>'int', 'method='=>'int'],
'imagesetbrush' => ['bool', 'image'=>'resource', 'brush'=>'resource'],
'imagesetclip' => ['bool', 'im'=>'resource', 'x1'=>'int', 'y1'=>'int', 'x2'=>'int', 'y2'=>'int'],
'imagesetinterpolation' => ['bool', 'im'=>'resource', 'method'=>'int'],
'imagesetpixel' => ['bool', 'im'=>'resource', 'x'=>'int', 'y'=>'int', 'col'=>'int'],
'imagesetstyle' => ['bool', 'im'=>'resource', 'styles'=>'array'],
'imagesetthickness' => ['bool', 'im'=>'resource', 'thickness'=>'int'],
'imagesettile' => ['bool', 'image'=>'resource', 'tile'=>'resource'],
'imagestring' => ['bool', 'im'=>'resource', 'font'=>'int', 'x'=>'int', 'y'=>'int', 'str'=>'string', 'col'=>'int'],
'imagestringup' => ['bool', 'im'=>'resource', 'font'=>'int', 'x'=>'int', 'y'=>'int', 'str'=>'string', 'col'=>'int'],
'imagesx' => ['int|false', 'im'=>'resource'],
'imagesy' => ['int|false', 'im'=>'resource'],
'imagetruecolortopalette' => ['bool', 'im'=>'resource', 'ditherflag'=>'bool', 'colorswanted'=>'int'],
'imagettfbbox' => ['array|false', 'size'=>'float', 'angle'=>'float', 'font_file'=>'string', 'text'=>'string'],
'imagettftext' => ['array|false', 'im'=>'resource', 'size'=>'float', 'angle'=>'float', 'x'=>'int', 'y'=>'int', 'col'=>'int', 'font_file'=>'string', 'text'=>'string'],
'imagetypes' => ['int'],
'imagewbmp' => ['bool', 'im'=>'resource', 'filename='=>'string|resource|null', 'foreground='=>'int'],
'imagewebp' => ['bool', 'im'=>'resource', 'filename='=>'string|resource|null', 'quality='=>'int'],
'imagexbm' => ['bool', 'im'=>'resource', 'filename='=>'string|resource|null', 'foreground='=>'int'],
'Imagick::__construct' => ['void', 'files='=>''],
'Imagick::__toString' => ['string'],
'Imagick::adaptiveBlurImage' => ['bool', 'radius'=>'float', 'sigma'=>'float', 'channel='=>'int'],
'Imagick::adaptiveResizeImage' => ['bool', 'columns'=>'int', 'rows'=>'int', 'bestfit='=>'bool'],
'Imagick::adaptiveSharpenImage' => ['bool', 'radius'=>'float', 'sigma'=>'float', 'channel='=>'int'],
'Imagick::adaptiveThresholdImage' => ['bool', 'width'=>'int', 'height'=>'int', 'offset'=>'int'],
'Imagick::addImage' => ['bool', 'source'=>'imagick'],
'Imagick::addNoiseImage' => ['bool', 'noise_type'=>'int', 'channel='=>'int'],
'Imagick::affineTransformImage' => ['bool', 'matrix'=>'imagickdraw'],
'Imagick::animateImages' => ['bool', 'x_server'=>'string'],
'Imagick::annotateImage' => ['bool', 'draw_settings'=>'imagickdraw', 'x'=>'float', 'y'=>'float', 'angle'=>'float', 'text'=>'string'],
'Imagick::appendImages' => ['Imagick', 'stack'=>'bool'],
'Imagick::autoGammaImage' => ['bool', 'channel='=>'int'],
'Imagick::autoLevelImage' => ['bool', 'channel='=>'int'],
'Imagick::autoOrient' => ['bool'],
'Imagick::averageImages' => ['Imagick'],
'Imagick::blackThresholdImage' => ['bool', 'threshold'=>'mixed'],
'Imagick::blueShiftImage' => ['bool', 'factor='=>'float'],
'Imagick::blurImage' => ['bool', 'radius'=>'float', 'sigma'=>'float', 'channel='=>'int'],
'Imagick::borderImage' => ['bool', 'bordercolor'=>'mixed', 'width'=>'int', 'height'=>'int'],
'Imagick::brightnessContrastImage' => ['bool', 'brightness'=>'float', 'contrast'=>'float', 'channel='=>'int'],
'Imagick::charcoalImage' => ['bool', 'radius'=>'float', 'sigma'=>'float'],
'Imagick::chopImage' => ['bool', 'width'=>'int', 'height'=>'int', 'x'=>'int', 'y'=>'int'],
'Imagick::clampImage' => ['bool', 'channel='=>'int'],
'Imagick::clear' => ['bool'],
'Imagick::clipImage' => ['bool'],
'Imagick::clipImagePath' => ['void', 'pathname'=>'string', 'inside'=>'string'],
'Imagick::clipPathImage' => ['bool', 'pathname'=>'string', 'inside'=>'bool'],
'Imagick::clone' => ['Imagick'],
'Imagick::clutImage' => ['bool', 'lookup_table'=>'imagick', 'int='=>'float'],
'Imagick::coalesceImages' => ['Imagick'],
'Imagick::colorFloodfillImage' => ['bool', 'fill'=>'mixed', 'fuzz'=>'float', 'bordercolor'=>'mixed', 'x'=>'int', 'y'=>'int'],
'Imagick::colorizeImage' => ['bool', 'colorize'=>'mixed', 'opacity'=>'mixed'],
'Imagick::colorMatrixImage' => ['bool', 'color_matrix'=>'array'],
'Imagick::combineImages' => ['Imagick', 'channeltype'=>'int'],
'Imagick::commentImage' => ['bool', 'comment'=>'string'],
'Imagick::compareImageChannels' => ['array{Imagick,float}', 'image'=>'imagick', 'channeltype'=>'int', 'metrictype'=>'int'],
'Imagick::compareImageLayers' => ['Imagick', 'method'=>'int'],
'Imagick::compareImages' => ['array{Imagick,float}', 'compare'=>'imagick', 'metric'=>'int'],
'Imagick::compositeImage' => ['bool', 'composite_object'=>'imagick', 'composite'=>'int', 'x'=>'int', 'y'=>'int', 'channel='=>'int'],
'Imagick::compositeImageGravity' => ['bool', 'imagick'=>'Imagick', 'COMPOSITE_CONSTANT'=>'int', 'GRAVITY_CONSTANT'=>'int'],
'Imagick::contrastImage' => ['bool', 'sharpen'=>'bool'],
'Imagick::contrastStretchImage' => ['bool', 'black_point'=>'float', 'white_point'=>'float', 'channel='=>'int'],
'Imagick::convolveImage' => ['bool', 'kernel'=>'array', 'channel='=>'int'],
'Imagick::count' => ['0|positive-int', 'mode='=>'int'],
'Imagick::cropImage' => ['bool', 'width'=>'int', 'height'=>'int', 'x'=>'int', 'y'=>'int'],
'Imagick::cropThumbnailImage' => ['bool', 'width'=>'int', 'height'=>'int', 'legacy='=>'bool'],
'Imagick::current' => ['Imagick'],
'Imagick::cycleColormapImage' => ['bool', 'displace'=>'int'],
'Imagick::decipherImage' => ['bool', 'passphrase'=>'string'],
'Imagick::deconstructImages' => ['Imagick'],
'Imagick::deleteImageArtifact' => ['bool', 'artifact'=>'string'],
'Imagick::deleteImageProperty' => ['void', 'name'=>'string'],
'Imagick::deskewImage' => ['bool', 'threshold'=>'float'],
'Imagick::despeckleImage' => ['bool'],
'Imagick::destroy' => ['bool'],
'Imagick::displayImage' => ['bool', 'servername'=>'string'],
'Imagick::displayImages' => ['bool', 'servername'=>'string'],
'Imagick::distortImage' => ['bool', 'method'=>'int', 'arguments'=>'array', 'bestfit'=>'bool'],
'Imagick::drawImage' => ['bool', 'draw'=>'imagickdraw'],
'Imagick::edgeImage' => ['bool', 'radius'=>'float'],
'Imagick::embossImage' => ['bool', 'radius'=>'float', 'sigma'=>'float'],
'Imagick::encipherImage' => ['bool', 'passphrase'=>'string'],
'Imagick::enhanceImage' => ['bool'],
'Imagick::equalizeImage' => ['bool'],
'Imagick::evaluateImage' => ['bool', 'op'=>'int', 'constant'=>'float', 'channel='=>'int'],
'Imagick::evaluateImages' => ['bool', 'EVALUATE_CONSTANT'=>'int'],
'Imagick::exportImagePixels' => ['list<int>', 'x'=>'int', 'y'=>'int', 'width'=>'int', 'height'=>'int', 'map'=>'string', 'storage'=>'int'],
'Imagick::extentImage' => ['bool', 'width'=>'int', 'height'=>'int', 'x'=>'int', 'y'=>'int'],
'Imagick::filter' => ['bool', 'ImagickKernel'=>'ImagickKernel', 'CHANNEL='=>'int'],
'Imagick::flattenImages' => ['Imagick'],
'Imagick::flipImage' => ['bool'],
'Imagick::floodFillPaintImage' => ['bool', 'fill'=>'mixed', 'fuzz'=>'float', 'target'=>'mixed', 'x'=>'int', 'y'=>'int', 'invert'=>'bool', 'channel='=>'int'],
'Imagick::flopImage' => ['bool'],
'Imagick::forwardFourierTransformimage' => ['bool', 'magnitude'=>'bool'],
'Imagick::frameImage' => ['bool', 'matte_color'=>'mixed', 'width'=>'int', 'height'=>'int', 'inner_bevel'=>'int', 'outer_bevel'=>'int'],
'Imagick::functionImage' => ['bool', 'function'=>'int', 'arguments'=>'array', 'channel='=>'int'],
'Imagick::fxImage' => ['Imagick', 'expression'=>'string', 'channel='=>'int'],
'Imagick::gammaImage' => ['bool', 'gamma'=>'float', 'channel='=>'int'],
'Imagick::gaussianBlurImage' => ['bool', 'radius'=>'float', 'sigma'=>'float', 'channel='=>'int'],
'Imagick::getColorspace' => ['Imagick::COLORSPACE_*'],
'Imagick::getCompression' => ['Imagick::COMPRESSION_*'],
'Imagick::getCompressionQuality' => ['int'],
'Imagick::getConfigureOptions' => ['string'],
'Imagick::getCopyright' => ['string'],
'Imagick::getFeatures' => ['string'],
'Imagick::getFilename' => ['string'],
'Imagick::getFont' => ['string'],
'Imagick::getFormat' => ['string'],
'Imagick::getGravity' => ['Imagick::GRAVITY_*'],
'Imagick::getHDRIEnabled' => ['int'],
'Imagick::getHomeURL' => ['string'],
'Imagick::getImage' => ['Imagick'],
'Imagick::getImageAlphaChannel' => ['bool'],
'Imagick::getImageArtifact' => ['string', 'artifact'=>'string'],
'Imagick::getImageAttribute' => ['string', 'key'=>'string'],
'Imagick::getImageBackgroundColor' => ['ImagickPixel'],
'Imagick::getImageBlob' => ['string'],
'Imagick::getImageBluePrimary' => ['array{x:float,y:float}'],
'Imagick::getImageBorderColor' => ['ImagickPixel'],
'Imagick::getImageChannelDepth' => ['int', 'channel'=>'int'],
'Imagick::getImageChannelDistortion' => ['float', 'reference'=>'imagick', 'channel'=>'int', 'metric'=>'int'],
'Imagick::getImageChannelDistortions' => ['float', 'reference'=>'imagick', 'metric'=>'int', 'channel='=>'int'],
'Imagick::getImageChannelExtrema' => ['array{minima:0|positive-int,maxima:0|positive-int}', 'channel'=>'int'],
'Imagick::getImageChannelKurtosis' => ['array{kurtosis:float,skewness:float}', 'channel='=>'int'],
'Imagick::getImageChannelMean' => ['array{mean:float,standardDeviation:float}', 'channel'=>'int'],
'Imagick::getImageChannelRange' => ['array{minima:float,maxima:float}', 'channel'=>'int'],
'Imagick::getImageChannelStatistics' => ['array{mean:float,minima:float,maxima:float,standardDeviation:float,depth:int}'],
'Imagick::getImageClipMask' => ['Imagick'],
'Imagick::getImageColormapColor' => ['ImagickPixel', 'index'=>'int'],
'Imagick::getImageColors' => ['int'],
'Imagick::getImageColorspace' => ['Imagick::COLORSPACE_*'],
'Imagick::getImageCompose' => ['Imagick::COMPOSITE_*'],
'Imagick::getImageCompression' => ['Imagick::COMPRESSION_*'],
'Imagick::getImageCompressionQuality' => ['int'],
'Imagick::getImageDelay' => ['int'],
'Imagick::getImageDepth' => ['int'],
'Imagick::getImageDispose' => ['Imagick::DISPOSE_*'],
'Imagick::getImageDistortion' => ['float', 'reference'=>'magickwand', 'metric'=>'int'],
'Imagick::getImageExtrema' => ['array{min:0|positive-int,max:0|positive-int}'],
'Imagick::getImageFilename' => ['string'],
'Imagick::getImageFormat' => ['string'],
'Imagick::getImageGamma' => ['float'],
'Imagick::getImageGeometry' => ['array{width:int,height:int}'],
'Imagick::getImageGravity' => ['Imagick::GRAVITY_*'],
'Imagick::getImageGreenPrimary' => ['array{x:float,y:float}'],
'Imagick::getImageHeight' => ['int'],
'Imagick::getImageHistogram' => ['list<ImagickPixel>'],
'Imagick::getImageIndex' => ['int'],
'Imagick::getImageInterlaceScheme' => ['Imagick::INTERLACE_*'],
'Imagick::getImageInterpolateMethod' => ['Imagick::INTERPOLATE_*'],
'Imagick::getImageIterations' => ['int'],
'Imagick::getImageLength' => ['0|positive-int'],
'Imagick::getImageMagickLicense' => ['string'],
'Imagick::getImageMatte' => ['bool'],
'Imagick::getImageMatteColor' => ['ImagickPixel'],
'Imagick::getImageMimeType' => ['non-empty-string'],
'Imagick::getImageOrientation' => ['Imagick::ORIENTATION_*'],
'Imagick::getImagePage' => ['array{width:int,height:int,x:int,y:int}'],
'Imagick::getImagePixelColor' => ['ImagickPixel', 'x'=>'int', 'y'=>'int'],
'Imagick::getImageProfile' => ['string', 'name'=>'string'],
'Imagick::getImageProfiles' => ['array', 'pattern='=>'string', 'only_names='=>'bool'],
'Imagick::getImageProperties' => ['array', 'pattern='=>'string', 'only_names='=>'bool'],
'Imagick::getImageProperty' => ['string', 'name'=>'string'],
'Imagick::getImageRedPrimary' => ['array{x:float,y:float}'],
'Imagick::getImageRegion' => ['Imagick', 'width'=>'int', 'height'=>'int', 'x'=>'int', 'y'=>'int'],
'Imagick::getImageRenderingIntent' => ['Imagick::RENDERINGINTENT_*'],
'Imagick::getImageResolution' => ['array{x:float,y:float}'],
'Imagick::getImagesBlob' => ['string'],
'Imagick::getImageScene' => ['0|positive-int'],
'Imagick::getImageSignature' => ['string'],
'Imagick::getImageSize' => ['0|positive-int'],
'Imagick::getImageTicksPerSecond' => ['0|positive-int'],
'Imagick::getImageTotalInkDensity' => ['float'],
'Imagick::getImageType' => ['Imagick::IMGTYPE_*'],
'Imagick::getImageUnits' => ['int'],
'Imagick::getImageVirtualPixelMethod' => ['int'],
'Imagick::getImageWhitePoint' => ['array{x:float,y:float}'],
'Imagick::getImageWidth' => ['0|positive-int'],
'Imagick::getInterlaceScheme' => ['Imagick::INTERLACE_*'],
'Imagick::getIteratorIndex' => ['int'],
'Imagick::getNumberImages' => ['0|positive-int'],
'Imagick::getOption' => ['string', 'key'=>'string'],
'Imagick::getPackageName' => ['string'],
'Imagick::getPage' => ['array{width:int,height:int,x:int,y:int}'],
'Imagick::getPixelIterator' => ['ImagickPixelIterator'],
'Imagick::getPixelRegionIterator' => ['ImagickPixelIterator', 'x'=>'int', 'y'=>'int', 'columns'=>'int', 'rows'=>'int'],
'Imagick::getPointSize' => ['float'],
'Imagick::getQuantum' => ['0|positive-int'],
'Imagick::getQuantumDepth' => ['array{quantumDepthLong:0|positive-int,quantumDepthString:numeric-string}'],
'Imagick::getQuantumRange' => ['array{quantumRangeLong:0|positive-int,quantumRangeString:numeric-string}'],
'Imagick::getRegistry' => ['string', 'key'=>'string'],
'Imagick::getReleaseDate' => ['string'],
'Imagick::getResource' => ['int', 'type'=>'int'],
'Imagick::getResourceLimit' => ['int', 'type'=>'int'],
'Imagick::getSamplingFactors' => ['list<float>'],
'Imagick::getSize' => ['array{columns:0|positive-int,rows:0|positive-int}'],
'Imagick::getSizeOffset' => ['int'],
'Imagick::getVersion' => ['array{versionNumber:0|positive-int,versionString:non-falsy-string}'],
'Imagick::haldClutImage' => ['bool', 'clut'=>'imagick', 'channel='=>'int'],
'Imagick::hasNextImage' => ['bool'],
'Imagick::hasPreviousImage' => ['bool'],
'Imagick::identifyFormat' => ['string|false', 'embedText'=>'string'],
'Imagick::identifyImage' => ['array{width:0|positive-int,height:0|positive-int}', 'appendrawoutput='=>'bool'],
'Imagick::identifyImageType' => ['int'],
'Imagick::implodeImage' => ['bool', 'radius'=>'float'],
'Imagick::importImagePixels' => ['bool', 'x'=>'int', 'y'=>'int', 'width'=>'int', 'height'=>'int', 'map'=>'string', 'storage'=>'int', 'pixels'=>'array'],
'Imagick::inverseFourierTransformImage' => ['bool', 'complement'=>'Imagick', 'magnitude'=>'bool'],
'Imagick::key' => ['int|string'],
'Imagick::labelImage' => ['bool', 'label'=>'string'],
'Imagick::levelImage' => ['bool', 'blackpoint'=>'float', 'gamma'=>'float', 'whitepoint'=>'float', 'channel='=>'int'],
'Imagick::linearStretchImage' => ['bool', 'blackpoint'=>'float', 'whitepoint'=>'float'],
'Imagick::liquidRescaleImage' => ['bool', 'width'=>'int', 'height'=>'int', 'delta_x'=>'float', 'rigidity'=>'float'],
'Imagick::listRegistry' => ['array<string,string>'],
'Imagick::localContrastImage' => ['bool', 'radius'=>'float', 'strength'=>'float'],
'Imagick::magnifyImage' => ['bool'],
'Imagick::mapImage' => ['bool', 'map'=>'imagick', 'dither'=>'bool'],
'Imagick::matteFloodfillImage' => ['bool', 'alpha'=>'float', 'fuzz'=>'float', 'bordercolor'=>'mixed', 'x'=>'int', 'y'=>'int'],
'Imagick::medianFilterImage' => ['bool', 'radius'=>'float'],
'Imagick::mergeImageLayers' => ['Imagick', 'layer_method'=>'int'],
'Imagick::minifyImage' => ['bool'],
'Imagick::modulateImage' => ['bool', 'brightness'=>'float', 'saturation'=>'float', 'hue'=>'float'],
'Imagick::montageImage' => ['Imagick', 'draw'=>'imagickdraw', 'tile_geometry'=>'string', 'thumbnail_geometry'=>'string', 'mode'=>'int', 'frame'=>'string'],
'Imagick::morphImages' => ['Imagick', 'number_frames'=>'int'],
'Imagick::morphology' => ['bool', 'morphologyMethod'=>'int', 'iterations'=>'int', 'ImagickKernel'=>'ImagickKernel', 'channel='=>'int'],
'Imagick::mosaicImages' => ['Imagick'],
'Imagick::motionBlurImage' => ['bool', 'radius'=>'float', 'sigma'=>'float', 'angle'=>'float', 'channel='=>'int'],
'Imagick::negateImage' => ['bool', 'gray'=>'bool', 'channel='=>'int'],
'Imagick::newImage' => ['bool', 'cols'=>'int', 'rows'=>'int', 'background'=>'mixed', 'format='=>'string'],
'Imagick::newPseudoImage' => ['bool', 'columns'=>'int', 'rows'=>'int', 'pseudostring'=>'string'],
'Imagick::next' => ['void'],
'Imagick::nextImage' => ['bool'],
'Imagick::normalizeImage' => ['bool', 'channel='=>'int'],
'Imagick::oilPaintImage' => ['bool', 'radius'=>'float'],
'Imagick::opaquePaintImage' => ['bool', 'target'=>'mixed', 'fill'=>'mixed', 'fuzz'=>'float', 'invert'=>'bool', 'channel='=>'int'],
'Imagick::optimizeImageLayers' => ['bool'],
'Imagick::orderedPosterizeImage' => ['bool', 'threshold_map'=>'string', 'channel='=>'int'],
'Imagick::paintFloodfillImage' => ['bool', 'fill'=>'mixed', 'fuzz'=>'float', 'bordercolor'=>'mixed', 'x'=>'int', 'y'=>'int', 'channel='=>'int'],
'Imagick::paintOpaqueImage' => ['bool', 'target'=>'mixed', 'fill'=>'mixed', 'fuzz'=>'float', 'channel='=>'int'],
'Imagick::paintTransparentImage' => ['bool', 'target'=>'mixed', 'alpha'=>'float', 'fuzz'=>'float'],
'Imagick::pingImage' => ['bool', 'filename'=>'string'],
'Imagick::pingImageBlob' => ['bool', 'image'=>'string'],
'Imagick::pingImageFile' => ['bool', 'filehandle'=>'resource', 'filename='=>'string'],
'Imagick::polaroidImage' => ['bool', 'properties'=>'imagickdraw', 'angle'=>'float'],
'Imagick::posterizeImage' => ['bool', 'levels'=>'int', 'dither'=>'bool'],
'Imagick::previewImages' => ['bool', 'preview'=>'int'],
'Imagick::previousImage' => ['bool'],
'Imagick::profileImage' => ['bool', 'name'=>'string', 'profile'=>'?string'],
'Imagick::quantizeImage' => ['bool', 'numbercolors'=>'int', 'colorspace'=>'int', 'treedepth'=>'int', 'dither'=>'bool', 'measureerror'=>'bool'],
'Imagick::quantizeImages' => ['bool', 'numbercolors'=>'int', 'colorspace'=>'int', 'treedepth'=>'int', 'dither'=>'bool', 'measureerror'=>'bool'],
'Imagick::queryFontMetrics' => ['array{characterWidth:float,characterHeight:float,ascender:float,descender:float,textWidth:float,textHeight:float,maxHorizontalAdvance:float,boundingBox:array{x1:float,x2:float,y1:float,y2:float},originX:float,originY:float}', 'properties'=>'imagickdraw', 'text'=>'string', 'multiline='=>'bool'],
'Imagick::queryFonts' => ['list<string>', 'pattern='=>'string'],
'Imagick::queryFormats' => ['list<string>', 'pattern='=>'string'],
'Imagick::radialBlurImage' => ['bool', 'angle'=>'float', 'channel='=>'int'],
'Imagick::raiseImage' => ['bool', 'width'=>'int', 'height'=>'int', 'x'=>'int', 'y'=>'int', 'raise'=>'bool'],
'Imagick::randomThresholdImage' => ['bool', 'low'=>'float', 'high'=>'float', 'channel='=>'int'],
'Imagick::readImage' => ['bool', 'filename'=>'string'],
'Imagick::readImageBlob' => ['bool', 'image'=>'string', 'filename='=>'string'],
'Imagick::readImageFile' => ['bool', 'filehandle'=>'resource', 'filename='=>'string'],
'Imagick::readImages' => ['Imagick', 'filenames'=>'string'],
'Imagick::recolorImage' => ['bool', 'matrix'=>'array'],
'Imagick::reduceNoiseImage' => ['bool', 'radius'=>'float'],
'Imagick::remapImage' => ['bool', 'replacement'=>'imagick', 'dither'=>'int'],
'Imagick::removeImage' => ['bool'],
'Imagick::removeImageProfile' => ['string', 'name'=>'string'],
'Imagick::render' => ['bool'],
'Imagick::resampleImage' => ['bool', 'x_resolution'=>'float', 'y_resolution'=>'float', 'filter'=>'int', 'blur'=>'float'],
'Imagick::resetImagePage' => ['bool', 'page'=>'string'],
'Imagick::resetIterator' => [''],
'Imagick::resizeImage' => ['bool', 'columns'=>'int', 'rows'=>'int', 'filter'=>'int', 'blur'=>'float', 'bestfit='=>'bool'],
'Imagick::rewind' => ['void'],
'Imagick::rollImage' => ['bool', 'x'=>'int', 'y'=>'int'],
'Imagick::rotateImage' => ['bool', 'background'=>'mixed', 'degrees'=>'float'],
'Imagick::rotationalBlurImage' => ['bool', 'float'=>'string', 'channel='=>'int'],
'Imagick::roundCorners' => ['bool', 'x_rounding'=>'float', 'y_rounding'=>'float', 'stroke_width='=>'float', 'displace='=>'float', 'size_correction='=>'float'],
'Imagick::roundCornersImage' => ['bool', 'x_rounding'=>'', 'y_rounding'=>'', 'stroke_width='=>'', 'displace='=>'', 'size_correction='=>''],
'Imagick::sampleImage' => ['bool', 'columns'=>'int', 'rows'=>'int'],
'Imagick::scaleImage' => ['bool', 'cols'=>'int', 'rows'=>'int', 'bestfit='=>'bool'],
'Imagick::segmentImage' => ['bool', 'colorspace'=>'int', 'cluster_threshold'=>'float', 'smooth_threshold'=>'float', 'verbose='=>'bool'],
'Imagick::selectiveBlurImage' => ['bool', 'radius'=>'float', 'sigma'=>'float', 'threshold'=>'float', 'channel='=>'int'],
'Imagick::separateImageChannel' => ['bool', 'channel'=>'int'],
'Imagick::sepiaToneImage' => ['bool', 'threshold'=>'float'],
'Imagick::setAntiAlias' => ['int', 'antialias'=>'bool'],
'Imagick::setBackgroundColor' => ['bool', 'background'=>'mixed'],
'Imagick::setColorspace' => ['bool', 'colorspace'=>'int'],
'Imagick::setCompression' => ['bool', 'compression'=>'int'],
'Imagick::setCompressionQuality' => ['bool', 'quality'=>'int'],
'Imagick::setFilename' => ['bool', 'filename'=>'string'],
'Imagick::setFirstIterator' => ['bool'],
'Imagick::setFont' => ['bool', 'font'=>'string'],
'Imagick::setFormat' => ['bool', 'format'=>'string'],
'Imagick::setGravity' => ['bool', 'gravity'=>'int'],
'Imagick::setImage' => ['bool', 'replace'=>'imagick'],
'Imagick::setImageAlpha' => ['bool', 'alpha'=>'float'],
'Imagick::setImageAlphaChannel' => ['bool', 'mode'=>'int'],
'Imagick::setImageArtifact' => ['bool', 'artifact'=>'string', 'value'=>'string'],
'Imagick::setImageAttribute' => ['bool', 'key'=>'string', 'value'=>'string'],
'Imagick::setImageBackgroundColor' => ['bool', 'background'=>'mixed'],
'Imagick::setImageBias' => ['bool', 'bias'=>'float'],
'Imagick::setImageBiasQuantum' => ['void', 'bias'=>'string'],
'Imagick::setImageBluePrimary' => ['bool', 'x'=>'float', 'y'=>'float'],
'Imagick::setImageBorderColor' => ['bool', 'border'=>'mixed'],
'Imagick::setImageChannelDepth' => ['bool', 'channel'=>'int', 'depth'=>'int'],
'Imagick::setImageChannelMask' => ['', 'channel'=>'int'],
'Imagick::setImageClipMask' => ['bool', 'clip_mask'=>'imagick'],
'Imagick::setImageColormapColor' => ['bool', 'index'=>'int', 'color'=>'imagickpixel'],
'Imagick::setImageColorspace' => ['bool', 'colorspace'=>'int'],
'Imagick::setImageCompose' => ['bool', 'compose'=>'int'],
'Imagick::setImageCompression' => ['bool', 'compression'=>'int'],
'Imagick::setImageCompressionQuality' => ['bool', 'quality'=>'int'],
'Imagick::setImageDelay' => ['bool', 'delay'=>'int'],
'Imagick::setImageDepth' => ['bool', 'depth'=>'int'],
'Imagick::setImageDispose' => ['bool', 'dispose'=>'int'],
'Imagick::setImageExtent' => ['bool', 'columns'=>'int', 'rows'=>'int'],
'Imagick::setImageFilename' => ['bool', 'filename'=>'string'],
'Imagick::setImageFormat' => ['bool', 'format'=>'string'],
'Imagick::setImageGamma' => ['bool', 'gamma'=>'float'],
'Imagick::setImageGravity' => ['bool', 'gravity'=>'int'],
'Imagick::setImageGreenPrimary' => ['bool', 'x'=>'float', 'y'=>'float'],
'Imagick::setImageIndex' => ['bool', 'index'=>'int'],
'Imagick::setImageInterlaceScheme' => ['bool', 'interlace_scheme'=>'int'],
'Imagick::setImageInterpolateMethod' => ['bool', 'method'=>'int'],
'Imagick::setImageIterations' => ['bool', 'iterations'=>'int'],
'Imagick::setImageMatte' => ['bool', 'matte'=>'bool'],
'Imagick::setImageMatteColor' => ['bool', 'matte'=>'mixed'],
'Imagick::setImageOpacity' => ['bool', 'opacity'=>'float'],
'Imagick::setImageOrientation' => ['bool', 'orientation'=>'int'],
'Imagick::setImagePage' => ['bool', 'width'=>'int', 'height'=>'int', 'x'=>'int', 'y'=>'int'],
'Imagick::setImageProfile' => ['bool', 'name'=>'string', 'profile'=>'string'],
'Imagick::setImageProgressMonitor' => ['', 'filename'=>''],
'Imagick::setImageProperty' => ['bool', 'name'=>'string', 'value'=>'string'],
'Imagick::setImageRedPrimary' => ['bool', 'x'=>'float', 'y'=>'float'],
'Imagick::setImageRenderingIntent' => ['bool', 'rendering_intent'=>'int'],
'Imagick::setImageResolution' => ['bool', 'x_resolution'=>'float', 'y_resolution'=>'float'],
'Imagick::setImageScene' => ['bool', 'scene'=>'int'],
'Imagick::setImageTicksPerSecond' => ['bool', 'ticks_per_second'=>'int'],
'Imagick::setImageType' => ['bool', 'image_type'=>'int'],
'Imagick::setImageUnits' => ['bool', 'units'=>'int'],
'Imagick::setImageVirtualPixelMethod' => ['bool', 'method'=>'int'],
'Imagick::setImageWhitePoint' => ['bool', 'x'=>'float', 'y'=>'float'],
'Imagick::setInterlaceScheme' => ['bool', 'interlace_scheme'=>'int'],
'Imagick::setIteratorIndex' => ['bool', 'index'=>'int'],
'Imagick::setLastIterator' => ['bool'],
'Imagick::setOption' => ['bool', 'key'=>'string', 'value'=>'string'],
'Imagick::setPage' => ['bool', 'width'=>'int', 'height'=>'int', 'x'=>'int', 'y'=>'int'],
'Imagick::setPointSize' => ['bool', 'point_size'=>'float'],
'Imagick::setProgressMonitor' => ['bool', 'callback'=>'callable'],
'Imagick::setRegistry' => ['bool', 'key'=>'string', 'value'=>'string'],
'Imagick::setResolution' => ['bool', 'x_resolution'=>'float', 'y_resolution'=>'float'],
'Imagick::setResourceLimit' => ['bool', 'type'=>'int', 'limit'=>'int'],
'Imagick::setSamplingFactors' => ['bool', 'factors'=>'array'],
'Imagick::setSize' => ['bool', 'columns'=>'int', 'rows'=>'int'],
'Imagick::setSizeOffset' => ['bool', 'columns'=>'int', 'rows'=>'int', 'offset'=>'int'],
'Imagick::setType' => ['bool', 'image_type'=>'int'],
'Imagick::shadeImage' => ['bool', 'gray'=>'bool', 'azimuth'=>'float', 'elevation'=>'float'],
'Imagick::shadowImage' => ['bool', 'opacity'=>'float', 'sigma'=>'float', 'x'=>'int', 'y'=>'int'],
'Imagick::sharpenImage' => ['bool', 'radius'=>'float', 'sigma'=>'float', 'channel='=>'int'],
'Imagick::shaveImage' => ['bool', 'columns'=>'int', 'rows'=>'int'],
'Imagick::shearImage' => ['bool', 'background'=>'mixed', 'x_shear'=>'float', 'y_shear'=>'float'],
'Imagick::sigmoidalContrastImage' => ['bool', 'sharpen'=>'bool', 'alpha'=>'float', 'beta'=>'float', 'channel='=>'int'],
'Imagick::similarityImage' => ['Imagick', 'imagick'=>'Imagick', '&bestMatch'=>'array', '&similarity'=>'float', 'similarity_threshold'=>'float', 'metric'=>'int'],
'Imagick::sketchImage' => ['bool', 'radius'=>'float', 'sigma'=>'float', 'angle'=>'float'],
'Imagick::smushImages' => ['Imagick', 'stack'=>'bool', 'offset'=>'int'],
'Imagick::solarizeImage' => ['bool', 'threshold'=>'0|positive-int'],
'Imagick::sparseColorImage' => ['bool', 'sparse_method'=>'int', 'arguments'=>'array', 'channel='=>'int'],
'Imagick::spliceImage' => ['bool', 'width'=>'int', 'height'=>'int', 'x'=>'int', 'y'=>'int'],
'Imagick::spreadImage' => ['bool', 'radius'=>'float'],
'Imagick::statisticImage' => ['bool', 'type'=>'int', 'width'=>'int', 'height'=>'int', 'channel='=>'int'],
'Imagick::steganoImage' => ['Imagick', 'watermark_wand'=>'imagick', 'offset'=>'int'],
'Imagick::stereoImage' => ['bool', 'offset_wand'=>'imagick'],
'Imagick::stripImage' => ['bool'],
'Imagick::subImageMatch' => ['Imagick', 'Imagick'=>'Imagick', '&w_offset='=>'array', '&w_similarity='=>'float'],
'Imagick::swirlImage' => ['bool', 'degrees'=>'float'],
'Imagick::textureImage' => ['Imagick', 'texture_wand'=>'imagick'],
'Imagick::thresholdImage' => ['bool', 'threshold'=>'float', 'channel='=>'int'],
'Imagick::thumbnailImage' => ['bool', 'columns'=>'int', 'rows'=>'int', 'bestfit='=>'bool', 'fill='=>'bool', 'legacy='=>'bool'],
'Imagick::tintImage' => ['bool', 'tint'=>'mixed', 'opacity'=>'mixed'],
'Imagick::transformImage' => ['Imagick', 'crop'=>'string', 'geometry'=>'string'],
'Imagick::transformImageColorspace' => ['bool', 'colorspace'=>'int'],
'Imagick::transparentPaintImage' => ['bool', 'target'=>'mixed', 'alpha'=>'float', 'fuzz'=>'float', 'invert'=>'bool'],
'Imagick::transposeImage' => ['bool'],
'Imagick::transverseImage' => ['bool'],
'Imagick::trimImage' => ['bool', 'fuzz'=>'float'],
'Imagick::uniqueImageColors' => ['bool'],
'Imagick::unsharpMaskImage' => ['bool', 'radius'=>'float', 'sigma'=>'float', 'amount'=>'float', 'threshold'=>'float', 'channel='=>'int'],
'Imagick::valid' => ['bool'],
'Imagick::vignetteImage' => ['bool', 'blackpoint'=>'float', 'whitepoint'=>'float', 'x'=>'int', 'y'=>'int'],
'Imagick::waveImage' => ['bool', 'amplitude'=>'float', 'length'=>'float'],
'Imagick::whiteThresholdImage' => ['bool', 'threshold'=>'mixed'],
'Imagick::writeImage' => ['bool', 'filename='=>'string'],
'Imagick::writeImageFile' => ['bool', 'filehandle'=>'resource'],
'Imagick::writeImages' => ['bool', 'filename'=>'string', 'adjoin'=>'bool'],
'Imagick::writeImagesFile' => ['bool', 'filehandle'=>'resource'],
'ImagickDraw::__construct' => ['void'],
'ImagickDraw::affine' => ['bool', 'affine'=>'array'],
'ImagickDraw::annotation' => ['bool', 'x'=>'float', 'y'=>'float', 'text'=>'string'],
'ImagickDraw::arc' => ['bool', 'sx'=>'float', 'sy'=>'float', 'ex'=>'float', 'ey'=>'float', 'sd'=>'float', 'ed'=>'float'],
'ImagickDraw::bezier' => ['bool', 'coordinates'=>'array'],
'ImagickDraw::circle' => ['bool', 'ox'=>'float', 'oy'=>'float', 'px'=>'float', 'py'=>'float'],
'ImagickDraw::clear' => ['bool'],
'ImagickDraw::clone' => ['ImagickDraw'],
'ImagickDraw::color' => ['bool', 'x'=>'float', 'y'=>'float', 'paintmethod'=>'int'],
'ImagickDraw::comment' => ['bool', 'comment'=>'string'],
'ImagickDraw::composite' => ['bool', 'compose'=>'int', 'x'=>'float', 'y'=>'float', 'width'=>'float', 'height'=>'float', 'compositewand'=>'imagick'],
'ImagickDraw::destroy' => ['bool'],
'ImagickDraw::ellipse' => ['bool', 'ox'=>'float', 'oy'=>'float', 'rx'=>'float', 'ry'=>'float', 'start'=>'float', 'end'=>'float'],
'ImagickDraw::getBorderColor' => ['ImagickPixel'],
'ImagickDraw::getClipPath' => ['string'],
'ImagickDraw::getClipRule' => ['int'],
'ImagickDraw::getClipUnits' => ['int'],
'ImagickDraw::getDensity' => ['null|string'],
'ImagickDraw::getFillColor' => ['ImagickPixel'],
'ImagickDraw::getFillOpacity' => ['float'],
'ImagickDraw::getFillRule' => ['Imagick::FILLRULE_*'],
'ImagickDraw::getFont' => ['string'],
'ImagickDraw::getFontFamily' => ['string'],
'ImagickDraw::getFontResolution' => ['array'],
'ImagickDraw::getFontSize' => ['float'],
'ImagickDraw::getFontStretch' => ['Imagick::STRETCH_*'],
'ImagickDraw::getFontStyle' => ['Imagick::STYLE_*'],
'ImagickDraw::getFontWeight' => ['int'],
'ImagickDraw::getGravity' => ['Imagick::GRAVITY_*'],
'ImagickDraw::getOpacity' => ['float'],
'ImagickDraw::getStrokeAntialias' => ['bool'],
'ImagickDraw::getStrokeColor' => ['ImagickPixel'],
'ImagickDraw::getStrokeDashArray' => ['array'],
'ImagickDraw::getStrokeDashOffset' => ['float'],
'ImagickDraw::getStrokeLineCap' => ['Imagick::LINECAP_*'],
'ImagickDraw::getStrokeLineJoin' => ['Imagick::LINEJOIN_*'],
'ImagickDraw::getStrokeMiterLimit' => ['int'],
'ImagickDraw::getStrokeOpacity' => ['float'],
'ImagickDraw::getStrokeWidth' => ['float'],
'ImagickDraw::getTextAlignment' => ['Imagick::ALIGN_*'],
'ImagickDraw::getTextAntialias' => ['bool'],
'ImagickDraw::getTextDecoration' => ['Imagick::DECORATION_*'],
'ImagickDraw::getTextDirection' => ['bool'],
'ImagickDraw::getTextEncoding' => ['string'],
'ImagickDraw::getTextInterlineSpacing' => ['float'],
'ImagickDraw::getTextInterwordSpacing' => ['float'],
'ImagickDraw::getTextKerning' => ['float'],
'ImagickDraw::getTextUnderColor' => ['ImagickPixel'],
'ImagickDraw::getVectorGraphics' => ['string'],
'ImagickDraw::line' => ['bool', 'sx'=>'float', 'sy'=>'float', 'ex'=>'float', 'ey'=>'float'],
'ImagickDraw::matte' => ['bool', 'x'=>'float', 'y'=>'float', 'paintmethod'=>'int'],
'ImagickDraw::pathClose' => ['bool'],
'ImagickDraw::pathCurveToAbsolute' => ['bool', 'x1'=>'float', 'y1'=>'float', 'x2'=>'float', 'y2'=>'float', 'x'=>'float', 'y'=>'float'],
'ImagickDraw::pathCurveToQuadraticBezierAbsolute' => ['bool', 'x1'=>'float', 'y1'=>'float', 'x'=>'float', 'y'=>'float'],
'ImagickDraw::pathCurveToQuadraticBezierRelative' => ['bool', 'x1'=>'float', 'y1'=>'float', 'x'=>'float', 'y'=>'float'],
'ImagickDraw::pathCurveToQuadraticBezierSmoothAbsolute' => ['bool', 'x'=>'float', 'y'=>'float'],
'ImagickDraw::pathCurveToQuadraticBezierSmoothRelative' => ['bool', 'x'=>'float', 'y'=>'float'],
'ImagickDraw::pathCurveToRelative' => ['bool', 'x1'=>'float', 'y1'=>'float', 'x2'=>'float', 'y2'=>'float', 'x'=>'float', 'y'=>'float'],
'ImagickDraw::pathCurveToSmoothAbsolute' => ['bool', 'x2'=>'float', 'y2'=>'float', 'x'=>'float', 'y'=>'float'],
'ImagickDraw::pathCurveToSmoothRelative' => ['bool', 'x2'=>'float', 'y2'=>'float', 'x'=>'float', 'y'=>'float'],
'ImagickDraw::pathEllipticArcAbsolute' => ['bool', 'rx'=>'float', 'ry'=>'float', 'x_axis_rotation'=>'float', 'large_arc_flag'=>'bool', 'sweep_flag'=>'bool', 'x'=>'float', 'y'=>'float'],
'ImagickDraw::pathEllipticArcRelative' => ['bool', 'rx'=>'float', 'ry'=>'float', 'x_axis_rotation'=>'float', 'large_arc_flag'=>'bool', 'sweep_flag'=>'bool', 'x'=>'float', 'y'=>'float'],
'ImagickDraw::pathFinish' => ['bool'],
'ImagickDraw::pathLineToAbsolute' => ['bool', 'x'=>'float', 'y'=>'float'],
'ImagickDraw::pathLineToHorizontalAbsolute' => ['bool', 'x'=>'float'],
'ImagickDraw::pathLineToHorizontalRelative' => ['bool', 'x'=>'float'],
'ImagickDraw::pathLineToRelative' => ['bool', 'x'=>'float', 'y'=>'float'],
'ImagickDraw::pathLineToVerticalAbsolute' => ['bool', 'y'=>'float'],
'ImagickDraw::pathLineToVerticalRelative' => ['bool', 'y'=>'float'],
'ImagickDraw::pathMoveToAbsolute' => ['bool', 'x'=>'float', 'y'=>'float'],
'ImagickDraw::pathMoveToRelative' => ['bool', 'x'=>'float', 'y'=>'float'],
'ImagickDraw::pathStart' => ['bool'],
'ImagickDraw::point' => ['bool', 'x'=>'float', 'y'=>'float'],
'ImagickDraw::polygon' => ['bool', 'coordinates'=>'array'],
'ImagickDraw::polyline' => ['bool', 'coordinates'=>'array'],
'ImagickDraw::pop' => ['bool'],
'ImagickDraw::popClipPath' => ['bool'],
'ImagickDraw::popDefs' => ['bool'],
'ImagickDraw::popPattern' => ['bool'],
'ImagickDraw::push' => ['bool'],
'ImagickDraw::pushClipPath' => ['bool', 'clip_mask_id'=>'string'],
'ImagickDraw::pushDefs' => ['bool'],
'ImagickDraw::pushPattern' => ['bool', 'pattern_id'=>'string', 'x'=>'float', 'y'=>'float', 'width'=>'float', 'height'=>'float'],
'ImagickDraw::rectangle' => ['bool', 'x1'=>'float', 'y1'=>'float', 'x2'=>'float', 'y2'=>'float'],
'ImagickDraw::render' => ['bool'],
'ImagickDraw::resetVectorGraphics' => ['void'],
'ImagickDraw::rotate' => ['bool', 'degrees'=>'float'],
'ImagickDraw::roundRectangle' => ['bool', 'x1'=>'float', 'y1'=>'float', 'x2'=>'float', 'y2'=>'float', 'rx'=>'float', 'ry'=>'float'],
'ImagickDraw::scale' => ['bool', 'x'=>'float', 'y'=>'float'],
'ImagickDraw::setBorderColor' => ['bool', 'color'=>'ImagickPixel|string'],
'ImagickDraw::setClipPath' => ['bool', 'clip_mask'=>'string'],
'ImagickDraw::setClipRule' => ['bool', 'fill_rule'=>'int'],
'ImagickDraw::setClipUnits' => ['bool', 'clip_units'=>'int'],
'ImagickDraw::setDensity' => ['bool', 'density_string'=>'string'],
'ImagickDraw::setFillAlpha' => ['bool', 'opacity'=>'float'],
'ImagickDraw::setFillColor' => ['bool', 'fill_pixel'=>'ImagickPixel|string'],
'ImagickDraw::setFillOpacity' => ['bool', 'fillopacity'=>'float'],
'ImagickDraw::setFillPatternURL' => ['bool', 'fill_url'=>'string'],
'ImagickDraw::setFillRule' => ['bool', 'fill_rule'=>'int'],
'ImagickDraw::setFont' => ['bool', 'font_name'=>'string'],
'ImagickDraw::setFontFamily' => ['bool', 'font_family'=>'string'],
'ImagickDraw::setFontResolution' => ['bool', 'x'=>'float', 'y'=>'float'],
'ImagickDraw::setFontSize' => ['bool', 'pointsize'=>'float'],
'ImagickDraw::setFontStretch' => ['bool', 'fontstretch'=>'int'],
'ImagickDraw::setFontStyle' => ['bool', 'style'=>'int'],
'ImagickDraw::setFontWeight' => ['bool', 'font_weight'=>'int'],
'ImagickDraw::setGravity' => ['bool', 'gravity'=>'int'],
'ImagickDraw::setOpacity' => ['void', 'opacity'=>'float'],
'ImagickDraw::setResolution' => ['void', 'x_resolution'=>'float', 'y_resolution'=>'float'],
'ImagickDraw::setStrokeAlpha' => ['bool', 'opacity'=>'float'],
'ImagickDraw::setStrokeAntialias' => ['bool', 'stroke_antialias'=>'bool'],
'ImagickDraw::setStrokeColor' => ['bool', 'stroke_pixel'=>'ImagickPixel|string'],
'ImagickDraw::setStrokeDashArray' => ['bool', 'dasharray'=>'array'],
'ImagickDraw::setStrokeDashOffset' => ['bool', 'dash_offset'=>'float'],
'ImagickDraw::setStrokeLineCap' => ['bool', 'linecap'=>'int'],
'ImagickDraw::setStrokeLineJoin' => ['bool', 'linejoin'=>'int'],
'ImagickDraw::setStrokeMiterLimit' => ['bool', 'miterlimit'=>'int'],
'ImagickDraw::setStrokeOpacity' => ['bool', 'stroke_opacity'=>'float'],
'ImagickDraw::setStrokePatternURL' => ['bool', 'stroke_url'=>'string'],
'ImagickDraw::setStrokeWidth' => ['bool', 'stroke_width'=>'float'],
'ImagickDraw::setTextAlignment' => ['bool', 'alignment'=>'int'],
'ImagickDraw::setTextAntialias' => ['bool', 'antialias'=>'bool'],
'ImagickDraw::setTextDecoration' => ['bool', 'decoration'=>'int'],
'ImagickDraw::setTextDirection' => ['bool', 'direction'=>'int'],
'ImagickDraw::setTextEncoding' => ['bool', 'encoding'=>'string'],
'ImagickDraw::setTextInterlineSpacing' => ['void', 'spacing'=>'float'],
'ImagickDraw::setTextInterwordSpacing' => ['void', 'spacing'=>'float'],
'ImagickDraw::setTextKerning' => ['void', 'kerning'=>'float'],
'ImagickDraw::setTextUnderColor' => ['bool', 'under_color'=>'ImagickPixel|string'],
'ImagickDraw::setVectorGraphics' => ['bool', 'xml'=>'string'],
'ImagickDraw::setViewbox' => ['bool', 'x1'=>'int', 'y1'=>'int', 'x2'=>'int', 'y2'=>'int'],
'ImagickDraw::skewX' => ['bool', 'degrees'=>'float'],
'ImagickDraw::skewY' => ['bool', 'degrees'=>'float'],
'ImagickDraw::translate' => ['bool', 'x'=>'float', 'y'=>'float'],
'ImagickKernel::addKernel' => ['void', 'ImagickKernel'=>'ImagickKernel'],
'ImagickKernel::addUnityKernel' => ['void'],
'ImagickKernel::fromBuiltin' => ['ImagickKernel', 'kernelType'=>'int', 'kernelString'=>'string'],
'ImagickKernel::fromMatrix' => ['ImagickKernel', 'matrix'=>'array', 'origin='=>'array'],
'ImagickKernel::getMatrix' => ['list<list<float|false>>'],
'ImagickKernel::scale' => ['void', 'scale'=>'float', 'normalizeFlag'=>'int'],
'ImagickKernel::separate' => ['array'],
'ImagickPixel::__construct' => ['void', 'color='=>'string'],
'ImagickPixel::clear' => ['bool'],
'ImagickPixel::clone' => ['void'],
'ImagickPixel::destroy' => ['bool'],
'ImagickPixel::getColor' => ['array{r: int|float, g: int|float, b: int|float, a: int|float}', 'normalized='=>'0|1|2'],
'ImagickPixel::getColorAsString' => ['string'],
'ImagickPixel::getColorCount' => ['int'],
'ImagickPixel::getColorQuantum' => ['mixed'],
'ImagickPixel::getColorValue' => ['float', 'color'=>'int'],
'ImagickPixel::getColorValueQuantum' => ['mixed'],
'ImagickPixel::getHSL' => ['array'],
'ImagickPixel::getIndex' => ['int'],
'ImagickPixel::isPixelSimilar' => ['bool', 'color'=>'ImagickPixel', 'fuzz'=>'float'],
'ImagickPixel::isPixelSimilarQuantum' => ['bool', 'color'=>'string', 'fuzz='=>'string'],
'ImagickPixel::isSimilar' => ['bool', 'color'=>'imagickpixel', 'fuzz'=>'float'],
'ImagickPixel::setColor' => ['bool', 'color'=>'string'],
'ImagickPixel::setcolorcount' => ['void', 'colorCount'=>'string'],
'ImagickPixel::setColorFromPixel' => ['bool', 'srcPixel'=>'ImagickPixel'],
'ImagickPixel::setColorValue' => ['bool', 'color'=>'int', 'value'=>'float'],
'ImagickPixel::setColorValueQuantum' => ['void', 'color'=>'int', 'value'=>'mixed'],
'ImagickPixel::setHSL' => ['bool', 'hue'=>'float', 'saturation'=>'float', 'luminosity'=>'float'],
'ImagickPixel::setIndex' => ['void', 'index'=>'int'],
'ImagickPixelIterator::__construct' => ['void', 'wand'=>'imagick'],
'ImagickPixelIterator::clear' => ['bool'],
'ImagickPixelIterator::current' => ['mixed'],
'ImagickPixelIterator::destroy' => ['bool'],
'ImagickPixelIterator::getCurrentIteratorRow' => ['array'],
'ImagickPixelIterator::getIteratorRow' => ['int'],
'ImagickPixelIterator::getNextIteratorRow' => ['array'],
'ImagickPixelIterator::getpixeliterator' => ['', 'Imagick'=>'Imagick'],
'ImagickPixelIterator::getpixelregioniterator' => ['', 'Imagick'=>'Imagick', 'x'=>'', 'y'=>'', 'columns'=>'', 'rows'=>''],
'ImagickPixelIterator::getPreviousIteratorRow' => ['array'],
'ImagickPixelIterator::key' => ['int|string'],
'ImagickPixelIterator::newPixelIterator' => ['bool', 'wand'=>'imagick'],
'ImagickPixelIterator::newPixelRegionIterator' => ['bool', 'wand'=>'imagick', 'x'=>'int', 'y'=>'int', 'columns'=>'int', 'rows'=>'int'],
'ImagickPixelIterator::next' => ['void'],
'ImagickPixelIterator::resetIterator' => ['bool'],
'ImagickPixelIterator::rewind' => ['void'],
'ImagickPixelIterator::setIteratorFirstRow' => ['bool'],
'ImagickPixelIterator::setIteratorLastRow' => ['bool'],
'ImagickPixelIterator::setIteratorRow' => ['bool', 'row'=>'int'],
'ImagickPixelIterator::syncIterator' => ['bool'],
'ImagickPixelIterator::valid' => ['bool'],
'imap_8bit' => ['string|false', 'text'=>'string'],
'imap_alerts' => ['array|false'],
'imap_append' => ['bool', 'stream_id'=>'resource', 'folder'=>'string', 'message'=>'string', 'options='=>'string', 'internal_date='=>'string'],
'imap_base64' => ['string|false', 'text'=>'string'],
'imap_binary' => ['string|false', 'text'=>'string'],
'imap_body' => ['string|false', 'stream_id'=>'resource', 'msg_no'=>'int', 'options='=>'int'],
'imap_bodystruct' => ['stdClass|false', 'stream_id'=>'resource', 'msg_no'=>'int', 'section'=>'string'],
'imap_check' => ['stdClass|false', 'stream_id'=>'resource'],
'imap_clearflag_full' => ['bool', 'stream_id'=>'resource', 'sequence'=>'string', 'flag'=>'string', 'options='=>'int'],
'imap_close' => ['bool', 'stream_id'=>'resource', 'options='=>'int'],
'imap_create' => ['bool', 'stream_id'=>'resource', 'mailbox'=>'string'],
'imap_createmailbox' => ['bool', 'stream_id'=>'resource', 'mailbox'=>'string'],
'imap_delete' => ['bool', 'stream_id'=>'resource', 'msg_no'=>'string', 'options='=>'int'],
'imap_deletemailbox' => ['bool', 'stream_id'=>'resource', 'mailbox'=>'string'],
'imap_errors' => ['array|false'],
'imap_expunge' => ['bool', 'stream_id'=>'resource'],
'imap_fetch_overview' => ['array|false', 'stream_id'=>'resource', 'sequence'=>'string', 'options='=>'int'],
'imap_fetchbody' => ['string|false', 'stream_id'=>'resource', 'msg_no'=>'int', 'section'=>'string', 'options='=>'int'],
'imap_fetchheader' => ['string|false', 'stream_id'=>'resource', 'msg_no'=>'int', 'options='=>'int'],
'imap_fetchmime' => ['string|false', 'stream_id'=>'resource', 'msg_no'=>'int', 'section'=>'string', 'options='=>'int'],
'imap_fetchstructure' => ['stdClass|false', 'stream_id'=>'resource', 'msg_no'=>'int', 'options='=>'int'],
'imap_fetchtext' => ['string|false', 'stream_id'=>'resource', 'msg_no'=>'int', 'options='=>'int'],
'imap_gc' => ['bool', 'stream_id'=>'resource', 'flags'=>'int'],
'imap_get_quota' => ['array|false', 'stream_id'=>'resource', 'qroot'=>'string'],
'imap_get_quotaroot' => ['array|false', 'stream_id'=>'resource', 'mbox'=>'string'],
'imap_getacl' => ['array|false', 'stream_id'=>'resource', 'mailbox'=>'string'],
'imap_getmailboxes' => ['array|false', 'stream_id'=>'resource', 'ref'=>'string', 'pattern'=>'string'],
'imap_getsubscribed' => ['array|false', 'stream_id'=>'resource', 'ref'=>'string', 'pattern'=>'string'],
'imap_header' => ['stdClass|false', 'stream_id'=>'resource', 'msg_no'=>'int', 'from_length='=>'int', 'subject_length='=>'int', 'default_host='=>'string'],
'imap_headerinfo' => ['stdClass|false', 'stream_id'=>'resource', 'msg_no'=>'int', 'from_length='=>'int', 'subject_length='=>'int', 'default_host='=>'string|null'],
'imap_headers' => ['array|false', 'stream_id'=>'resource'],
'imap_last_error' => ['string|false'],
'imap_list' => ['array|false', 'stream_id'=>'resource', 'ref'=>'string', 'pattern'=>'string'],
'imap_listmailbox' => ['array|false', 'stream_id'=>'resource', 'ref'=>'string', 'pattern'=>'string'],
'imap_listscan' => ['array|false', 'stream_id'=>'resource', 'ref'=>'string', 'pattern'=>'string', 'content'=>'string'],
'imap_listsubscribed' => ['array|false', 'stream_id'=>'resource', 'ref'=>'string', 'pattern'=>'string'],
'imap_lsub' => ['array|false', 'stream_id'=>'resource', 'ref'=>'string', 'pattern'=>'string'],
'imap_mail' => ['bool', 'to'=>'string', 'subject'=>'string', 'message'=>'string', 'additional_headers='=>'string', 'cc='=>'string', 'bcc='=>'string', 'rpath='=>'string'],
'imap_mail_compose' => ['string|false', 'envelope'=>'array', 'body'=>'array'],
'imap_mail_copy' => ['bool', 'stream_id'=>'resource', 'msglist'=>'string', 'mailbox'=>'string', 'options='=>'int'],
'imap_mail_move' => ['bool', 'stream_id'=>'resource', 'sequence'=>'string', 'mailbox'=>'string', 'options='=>'int'],
'imap_mailboxmsginfo' => ['stdClass|false', 'stream_id'=>'resource'],
'imap_mime_header_decode' => ['array|false', 'str'=>'string'],
'imap_msgno' => ['int|false', 'stream_id'=>'resource', 'unique_msg_id'=>'int'],
'imap_mutf7_to_utf8' => ['string|false', 'in'=>'string'],
'imap_num_msg' => ['int|false', 'stream_id'=>'resource'],
'imap_num_recent' => ['int|false', 'stream_id'=>'resource'],
'imap_open' => ['resource|false', 'mailbox'=>'string', 'user'=>'string', 'password'=>'string', 'options='=>'int', 'n_retries='=>'int', 'params=' => 'array|null'],
'imap_ping' => ['bool', 'stream_id'=>'resource'],
'imap_qprint' => ['string|false', 'text'=>'string'],
'imap_rename' => ['bool', 'stream_id'=>'resource', 'old_name'=>'string', 'new_name'=>'string'],
'imap_renamemailbox' => ['bool', 'stream_id'=>'resource', 'old_name'=>'string', 'new_name'=>'string'],
'imap_reopen' => ['bool', 'stream_id'=>'resource', 'mailbox'=>'string', 'options='=>'int', 'n_retries='=>'int'],
'imap_rfc822_parse_adrlist' => ['array', 'address_string'=>'string', 'default_host'=>'string'],
'imap_rfc822_parse_headers' => ['stdClass', 'headers'=>'string', 'default_host='=>'string'],
'imap_rfc822_write_address' => ['string|false', 'mailbox'=>'?string', 'host'=>'?string', 'personal'=>'?string'],
'imap_savebody' => ['bool', 'stream_id'=>'resource', 'file'=>'string|resource', 'msg_no'=>'int', 'section='=>'string', 'options='=>'int'],
'imap_scan' => ['array|false', 'stream_id'=>'resource', 'ref'=>'string', 'pattern'=>'string', 'content'=>'string'],
'imap_scanmailbox' => ['array|false', 'stream_id'=>'resource', 'ref'=>'string', 'pattern'=>'string', 'content'=>'string'],
'imap_search' => ['array|false', 'stream_id'=>'resource', 'criteria'=>'string', 'options='=>'int', 'charset='=>'string'],
'imap_set_quota' => ['bool', 'stream_id'=>'resource', 'qroot'=>'string', 'mailbox_size'=>'int'],
'imap_setacl' => ['bool', 'stream_id'=>'resource', 'mailbox'=>'string', 'id'=>'string', 'rights'=>'string'],
'imap_setflag_full' => ['bool', 'stream_id'=>'resource', 'sequence'=>'string', 'flag'=>'string', 'options='=>'int'],
'imap_sort' => ['array|false', 'stream_id'=>'resource', 'criteria'=>'int', 'reverse'=>'int', 'options='=>'int', 'search_criteria='=>'string', 'charset='=>'string'],
'imap_status' => ['stdClass|false', 'stream_id'=>'resource', 'mailbox'=>'string', 'options'=>'int'],
'imap_subscribe' => ['bool', 'stream_id'=>'resource', 'mailbox'=>'string'],
'imap_thread' => ['array|false', 'stream_id'=>'resource', 'options='=>'int'],
'imap_timeout' => ['mixed', 'timeout_type'=>'int', 'timeout='=>'int'],
'imap_uid' => ['int|false', 'stream_id'=>'resource', 'msg_no'=>'int'],
'imap_undelete' => ['bool', 'stream_id'=>'resource', 'msg_no'=>'string', 'flags='=>'int'],
'imap_unsubscribe' => ['bool', 'stream_id'=>'resource', 'mailbox'=>'string'],
'imap_utf7_decode' => ['string|false', 'buf'=>'string'],
'imap_utf7_encode' => ['string', 'buf'=>'string'],
'imap_utf8' => ['string', 'mime_encoded_text'=>'string'],
'imap_utf8_to_mutf7' => ['string|false', 'in'=>'string'],
'implode' => ['string', 'glue'=>'string', 'pieces'=>'array'],
'implode\'1' => ['string', 'pieces'=>'array'],
'implode\'2' => ['string', 'pieces'=>'array', 'glue'=>'string'],
'import_request_variables' => ['bool', 'types'=>'string', 'prefix='=>'string'],
'in_array' => ['bool', 'needle'=>'mixed', 'haystack'=>'array', 'strict='=>'bool'],
'inclued_get_data' => ['array'],
'inet_ntop' => ['string|false', 'in_addr'=>'string'],
'inet_pton' => ['string|false', 'ip_address'=>'string'],
'InfiniteIterator::__construct' => ['void', 'iterator'=>'Iterator'],
'InfiniteIterator::next' => ['void'],
'inflate_add' => ['string|false', 'context'=>'resource', 'encoded_data'=>'string', 'flush_mode='=>'int'],
'inflate_get_read_len' => ['int|false', 'resource'=>'resource'],
'inflate_get_status' => ['int|false', 'resource'=>'resource'],
'inflate_init' => ['resource|false', 'encoding'=>'int', 'options='=>'array'],
'ingres_autocommit' => ['bool', 'link'=>'resource'],
'ingres_autocommit_state' => ['bool', 'link'=>'resource'],
'ingres_charset' => ['string', 'link'=>'resource'],
'ingres_close' => ['bool', 'link'=>'resource'],
'ingres_commit' => ['bool', 'link'=>'resource'],
'ingres_connect' => ['resource', 'database='=>'string', 'username='=>'string', 'password='=>'string', 'options='=>'array'],
'ingres_cursor' => ['string', 'result'=>'resource'],
'ingres_errno' => ['int', 'link='=>'resource'],
'ingres_error' => ['string', 'link='=>'resource'],
'ingres_errsqlstate' => ['string', 'link='=>'resource'],
'ingres_escape_string' => ['string', 'link'=>'resource', 'source_string'=>'string'],
'ingres_execute' => ['bool', 'result'=>'resource', 'params='=>'array', 'types='=>'string'],
'ingres_fetch_array' => ['array', 'result'=>'resource', 'result_type='=>'int'],
'ingres_fetch_assoc' => ['array', 'result'=>'resource'],
'ingres_fetch_object' => ['object', 'result'=>'resource', 'result_type='=>'int'],
'ingres_fetch_proc_return' => ['int', 'result'=>'resource'],
'ingres_fetch_row' => ['array', 'result'=>'resource'],
'ingres_field_length' => ['int', 'result'=>'resource', 'index'=>'int'],
'ingres_field_name' => ['string', 'result'=>'resource', 'index'=>'int'],
'ingres_field_nullable' => ['bool', 'result'=>'resource', 'index'=>'int'],
'ingres_field_precision' => ['int', 'result'=>'resource', 'index'=>'int'],
'ingres_field_scale' => ['int', 'result'=>'resource', 'index'=>'int'],
'ingres_field_type' => ['string', 'result'=>'resource', 'index'=>'int'],
'ingres_free_result' => ['bool', 'result'=>'resource'],
'ingres_next_error' => ['bool', 'link='=>'resource'],
'ingres_num_fields' => ['int', 'result'=>'resource'],
'ingres_num_rows' => ['int', 'result'=>'resource'],
'ingres_pconnect' => ['resource', 'database='=>'string', 'username='=>'string', 'password='=>'string', 'options='=>'array'],
'ingres_prepare' => ['mixed', 'link'=>'resource', 'query'=>'string'],
'ingres_query' => ['mixed', 'link'=>'resource', 'query'=>'string', 'params='=>'array', 'types='=>'string'],
'ingres_result_seek' => ['bool', 'result'=>'resource', 'position'=>'int'],
'ingres_rollback' => ['bool', 'link'=>'resource'],
'ingres_set_environment' => ['bool', 'link'=>'resource', 'options'=>'array'],
'ingres_unbuffered_query' => ['mixed', 'link'=>'resource', 'query'=>'string', 'params='=>'array', 'types='=>'string'],
'ini_alter' => ['string|false', 'varname'=>'string', 'newvalue'=>'string'],
'ini_get' => ['string|false', 'varname'=>'string'],
'ini_get_all' => ['array|false', 'extension='=>'?string', 'details='=>'bool'],
'ini_restore' => ['void', 'varname'=>'string'],
'ini_set' => ['string|false', 'varname'=>'string', 'newvalue'=>'string'],
'inotify_add_watch' => ['int', 'inotify_instance'=>'resource', 'pathname'=>'string', 'mask'=>'int'],
'inotify_init' => ['resource'],
'inotify_queue_len' => ['int', 'inotify_instance'=>'resource'],
'inotify_read' => ['array', 'inotify_instance'=>'resource'],
'inotify_rm_watch' => ['bool', 'inotify_instance'=>'resource', 'watch_descriptor'=>'int'],
'intdiv' => ['int', 'numerator'=>'int', 'divisor'=>'int'],
'interface_exists' => ['bool', 'classname'=>'string', 'autoload='=>'bool'],
'intl_error_name' => ['string', 'error_code'=>'int'],
'intl_get_error_code' => ['int'],
'intl_get_error_message' => ['string'],
'intl_is_failure' => ['bool', 'error_code'=>'int'],
'IntlBreakIterator::__construct' => ['void'],
'IntlBreakIterator::createCharacterInstance' => ['IntlRuleBasedBreakIterator', 'locale='=>'string'],
'IntlBreakIterator::createCodePointInstance' => ['IntlCodePointBreakIterator'],
'IntlBreakIterator::createLineInstance' => ['IntlRuleBasedBreakIterator', 'locale='=>'string'],
'IntlBreakIterator::createSentenceInstance' => ['IntlRuleBasedBreakIterator', 'locale='=>'string'],
'IntlBreakIterator::createTitleInstance' => ['IntlRuleBasedBreakIterator', 'locale='=>'string'],
'IntlBreakIterator::createWordInstance' => ['IntlRuleBasedBreakIterator', 'locale='=>'string'],
'IntlBreakIterator::current' => ['int'],
'IntlBreakIterator::first' => ['int'],
'IntlBreakIterator::following' => ['int', 'offset'=>'int'],
'IntlBreakIterator::getErrorCode' => ['int'],
'IntlBreakIterator::getErrorMessage' => ['string'],
'IntlBreakIterator::getLocale' => ['string', 'locale_type'=>'string'],
'IntlBreakIterator::getPartsIterator' => ['IntlPartsIterator', 'key_type='=>'IntlPartsIterator::KEY_*'],
'IntlBreakIterator::getText' => ['string'],
'IntlBreakIterator::isBoundary' => ['bool', 'offset'=>'int'],
'IntlBreakIterator::last' => ['int'],
'IntlBreakIterator::next' => ['int', 'offset='=>'int'],
'IntlBreakIterator::preceding' => ['int', 'offset'=>'int'],
'IntlBreakIterator::previous' => ['int'],
'IntlBreakIterator::setText' => ['bool', 'text'=>'string'],
'intlcal_add' => ['bool', 'cal'=>'IntlCalendar', 'field'=>'int', 'amount'=>'int'],
'intlcal_after' => ['bool', 'cal'=>'IntlCalendar', 'other'=>'IntlCalendar'],
'intlcal_before' => ['bool', 'cal'=>'IntlCalendar', 'other'=>'IntlCalendar'],
'intlcal_clear' => ['bool', 'cal'=>'IntlCalendar', 'field='=>'int'],
'intlcal_create_instance' => ['IntlCalendar', 'timeZone='=>'mixed', 'locale='=>'string'],
'intlcal_equals' => ['bool', 'cal'=>'IntlCalendar', 'other'=>'IntlCalendar'],
'intlcal_field_difference' => ['int', 'cal'=>'IntlCalendar', 'when'=>'float', 'field'=>'int'],
'intlcal_from_date_time' => ['IntlCalendar', 'dateTime'=>'DateTime|string'],
'intlcal_get' => ['int', 'cal'=>'IntlCalendar', 'field'=>'int'],
'intlcal_get_actual_maximum' => ['int', 'cal'=>'IntlCalendar', 'field'=>'int'],
'intlcal_get_actual_minimum' => ['int', 'cal'=>'IntlCalendar', 'field'=>'int'],
'intlcal_get_available_locales' => ['array'],
'intlcal_get_day_of_week_type' => ['int', 'cal'=>'IntlCalendar', 'dayOfWeek'=>'int'],
'intlcal_get_first_day_of_week' => ['int', 'cal'=>'IntlCalendar'],
'intlcal_get_greatest_minimum' => ['int', 'cal'=>'IntlCalendar', 'field'=>'int'],
'intlcal_get_keyword_values_for_locale' => ['Iterator|false', 'key'=>'string', 'locale'=>'string', 'commonlyUsed'=>'bool'],
'intlcal_get_least_maximum' => ['int', 'cal'=>'IntlCalendar', 'field'=>'int'],
'intlcal_get_locale' => ['string', 'cal'=>'IntlCalendar', 'localeType'=>'int'],
'intlcal_get_maximum' => ['int', 'cal'=>'IntlCalendar', 'field'=>'int'],
'intlcal_get_minimal_days_in_first_week' => ['int', 'cal'=>'IntlCalendar'],
'intlcal_get_minimum' => ['int', 'cal'=>'IntlCalendar', 'field'=>'int'],
'intlcal_get_now' => ['float'],
'intlcal_get_repeated_wall_time_option' => ['int', 'cal'=>'IntlCalendar'],
'intlcal_get_skipped_wall_time_option' => ['int', 'cal'=>'IntlCalendar'],
'intlcal_get_time' => ['float', 'cal'=>'IntlCalendar'],
'intlcal_get_time_zone' => ['IntlTimeZone|false', 'cal'=>'IntlCalendar'],
'intlcal_get_type' => ['string', 'cal'=>'IntlCalendar'],
'intlcal_get_weekend_transition' => ['int', 'cal'=>'IntlCalendar', 'dayOfWeek'=>'string'],
'intlcal_in_daylight_time' => ['bool', 'cal'=>'IntlCalendar'],
'intlcal_is_equivalent_to' => ['bool', 'cal'=>'IntlCalendar', 'other'=>'IntlCalendar'],
'intlcal_is_lenient' => ['bool', 'cal'=>'IntlCalendar'],
'intlcal_is_set' => ['bool', 'cal'=>'IntlCalendar', 'field'=>'int'],
'intlcal_is_weekend' => ['bool', 'cal'=>'IntlCalendar', 'date='=>'float'],
'intlcal_roll' => ['bool', 'cal'=>'IntlCalendar', 'field'=>'int', 'amountOrUpOrDown'=>'mixed'],
'intlcal_set' => ['bool', 'cal'=>'IntlCalendar', 'field'=>'int', 'value'=>'int'],
'intlcal_set\'1' => ['bool', 'cal'=>'IntlCalendar', 'year'=>'int', 'month'=>'int', 'dayOfMonth='=>'int', 'hour='=>'int', 'minute='=>'int', 'second='=>'int'],
'intlcal_set_first_day_of_week' => ['bool', 'cal'=>'IntlCalendar', 'dayOfWeek'=>'int'],
'intlcal_set_lenient' => ['bool', 'cal'=>'IntlCalendar', 'isLenient'=>'bool'],
'intlcal_set_repeated_wall_time_option' => ['bool', 'cal'=>'IntlCalendar', 'wallTimeOption'=>'int'],
'intlcal_set_skipped_wall_time_option' => ['bool', 'cal'=>'IntlCalendar', 'wallTimeOption'=>'int'],
'intlcal_set_time' => ['bool', 'cal'=>'IntlCalendar', 'date'=>'float'],
'intlcal_set_time_zone' => ['bool', 'cal'=>'IntlCalendar', 'timeZone'=>'mixed'],
'intlcal_to_date_time' => ['DateTime|false', 'cal'=>'IntlCalendar'],
'IntlCalendar::__construct' => ['void'],
'IntlCalendar::add' => ['bool', 'field'=>'int', 'amount'=>'int'],
'IntlCalendar::after' => ['bool', 'other'=>'IntlCalendar'],
'IntlCalendar::before' => ['bool', 'other'=>'IntlCalendar'],
'IntlCalendar::clear' => ['bool', 'field='=>'int'],
'IntlCalendar::createInstance' => ['IntlCalendar', 'timeZone='=>'mixed', 'locale='=>'string'],
'IntlCalendar::equals' => ['bool', 'other'=>'IntlCalendar'],
'IntlCalendar::fieldDifference' => ['int', 'when'=>'float', 'field'=>'int'],
'IntlCalendar::fromDateTime' => ['IntlCalendar', 'dateTime'=>'DateTime|string'],
'IntlCalendar::get' => ['int', 'field'=>'int'],
'IntlCalendar::getActualMaximum' => ['int', 'field'=>'int'],
'IntlCalendar::getActualMinimum' => ['int', 'field'=>'int'],
'IntlCalendar::getAvailableLocales' => ['array'],
'IntlCalendar::getDayOfWeekType' => ['int', 'dayOfWeek'=>'int'],
'IntlCalendar::getErrorCode' => ['int'],
'IntlCalendar::getErrorMessage' => ['string'],
'IntlCalendar::getFirstDayOfWeek' => ['int'],
'IntlCalendar::getGreatestMinimum' => ['int', 'field'=>'int'],
'IntlCalendar::getKeywordValuesForLocale' => ['Iterator', 'key'=>'string', 'locale'=>'string', 'commonlyUsed'=>'bool'],
'IntlCalendar::getLeastMaximum' => ['int', 'field'=>'int'],
'IntlCalendar::getLocale' => ['string', 'localeType'=>'int'],
'IntlCalendar::getMaximum' => ['int', 'field'=>'int'],
'IntlCalendar::getMinimalDaysInFirstWeek' => ['int'],
'IntlCalendar::getMinimum' => ['int', 'field'=>'int'],
'IntlCalendar::getNow' => ['float'],
'IntlCalendar::getRepeatedWallTimeOption' => ['int'],
'IntlCalendar::getSkippedWallTimeOption' => ['int'],
'IntlCalendar::getTime' => ['float'],
'IntlCalendar::getTimeZone' => ['IntlTimeZone'],
'IntlCalendar::getType' => ['string'],
'IntlCalendar::getWeekendTransition' => ['int', 'dayOfWeek'=>'string'],
'IntlCalendar::inDaylightTime' => ['bool'],
'IntlCalendar::isEquivalentTo' => ['bool', 'other'=>'IntlCalendar'],
'IntlCalendar::isLenient' => ['bool'],
'IntlCalendar::isSet' => ['bool', 'field'=>'int'],
'IntlCalendar::isWeekend' => ['bool', 'date='=>'float'],
'IntlCalendar::roll' => ['bool', 'field'=>'int', 'amountOrUpOrDown'=>'mixed'],
'IntlCalendar::set' => ['bool', 'field'=>'int', 'value'=>'int'],
'IntlCalendar::set\'1' => ['bool', 'year'=>'int', 'month'=>'int', 'dayOfMonth='=>'int', 'hour='=>'int', 'minute='=>'int', 'second='=>'int'],
'IntlCalendar::setFirstDayOfWeek' => ['bool', 'dayOfWeek'=>'int'],
'IntlCalendar::setLenient' => ['bool', 'isLenient'=>'string'],
'IntlCalendar::setMinimalDaysInFirstWeek' => ['bool', 'minimalDays'=>'int'],
'IntlCalendar::setRepeatedWallTimeOption' => ['bool', 'wallTimeOption'=>'int'],
'IntlCalendar::setSkippedWallTimeOption' => ['bool', 'wallTimeOption'=>'int'],
'IntlCalendar::setTime' => ['bool', 'date'=>'float'],
'IntlCalendar::setTimeZone' => ['bool', 'timeZone'=>'mixed'],
'IntlCalendar::toDateTime' => ['DateTime'],
'IntlChar::charAge' => ['array', 'char'=>'int|string'],
'IntlChar::charDigitValue' => ['int', 'codepoint'=>'mixed'],
'IntlChar::charDirection' => ['int', 'codepoint'=>'mixed'],
'IntlChar::charFromName' => ['int', 'name'=>'string', 'namechoice='=>'int'],
'IntlChar::charMirror' => ['mixed', 'codepoint'=>'mixed'],
'IntlChar::charName' => ['string', 'char'=>'int|string', 'namechoice='=>'int'],
'IntlChar::charType' => ['int', 'codepoint'=>'mixed'],
'IntlChar::chr' => ['string', 'codepoint'=>'mixed'],
'IntlChar::digit' => ['int', 'char'=>'int|string', 'radix='=>'int'],
'IntlChar::enumCharNames' => ['void', 'start'=>'mixed', 'limit'=>'mixed', 'callback'=>'callable', 'nameChoice='=>'int'],
'IntlChar::enumCharTypes' => ['void', 'cb='=>'callable'],
'IntlChar::foldCase' => ['int|string', 'char'=>'int|string', 'options='=>'int'],
'IntlChar::forDigit' => ['int', 'digit'=>'int', 'radix'=>'int'],
'IntlChar::getBidiPairedBracket' => ['mixed', 'codepoint'=>'mixed'],
'IntlChar::getBlockCode' => ['int', 'char'=>'int|string'],
'IntlChar::getCombiningClass' => ['int', 'codepoint'=>'mixed'],
'IntlChar::getFC_NFKC_Closure' => ['string', 'char'=>'int|string'],
'IntlChar::getIntPropertyMaxValue' => ['int', 'property'=>'int'],
'IntlChar::getIntPropertyMinValue' => ['int', 'property'=>'int'],
'IntlChar::getIntPropertyMxValue' => ['int', 'property'=>'int'],
'IntlChar::getIntPropertyValue' => ['int', 'char'=>'int|string', 'property'=>'int'],
'IntlChar::getNumericValue' => ['float', 'char'=>'int|string'],
'IntlChar::getPropertyEnum' => ['int', 'alias'=>'string'],
'IntlChar::getPropertyName' => ['string', 'property'=>'int', 'namechoice='=>'int'],
'IntlChar::getPropertyValueEnum' => ['int', 'property'=>'int', 'name'=>'string'],
'IntlChar::getPropertyValueName' => ['string', 'prop'=>'int', 'val'=>'int', 'namechoice='=>'int'],
'IntlChar::getUnicodeVersion' => ['array'],
'IntlChar::hasBinaryProperty' => ['bool', 'char'=>'int|string', 'property'=>'int'],
'IntlChar::isalnum' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::isalpha' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::isbase' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::isblank' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::iscntrl' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::isdefined' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::isdigit' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::isgraph' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::isIDIgnorable' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::isIDPart' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::isIDStart' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::isISOControl' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::isJavaIDPart' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::isJavaIDStart' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::isJavaSpaceChar' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::islower' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::isMirrored' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::isprint' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::ispunct' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::isspace' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::istitle' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::isUAlphabetic' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::isULowercase' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::isupper' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::isUUppercase' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::isUWhiteSpace' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::isWhitespace' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::isxdigit' => ['bool', 'codepoint'=>'mixed'],
'IntlChar::ord' => ['int', 'character'=>'mixed'],
'IntlChar::tolower' => ['mixed', 'codepoint'=>'mixed'],
'IntlChar::totitle' => ['mixed', 'codepoint'=>'mixed'],
'IntlChar::toupper' => ['mixed', 'codepoint'=>'mixed'],
'IntlCodePointBreakIterator::getLastCodePoint' => ['int'],
'IntlDateFormatter::__construct' => ['void', 'locale'=>'?string', 'datetype'=>'?int', 'timetype'=>'?int', 'timezone='=>'null|string|IntlTimeZone|DateTimeZone', 'calendar='=>'null|int|IntlCalendar', 'pattern='=>'string'],
'IntlDateFormatter::create' => ['IntlDateFormatter|null', 'locale'=>'?string', 'datetype'=>'?int', 'timetype'=>'?int', 'timezone='=>'null|string|IntlTimeZone|DateTimeZone', 'calendar='=>'int|IntlCalendar', 'pattern='=>'string'],
'IntlDateFormatter::format' => ['string|false', 'args'=>''],
'IntlDateFormatter::formatObject' => ['string', 'object'=>'object', 'format='=>'mixed', 'locale='=>'string'],
'IntlDateFormatter::getCalendar' => ['int'],
'IntlDateFormatter::getCalendarObject' => ['IntlCalendar'],
'IntlDateFormatter::getDateType' => ['int'],
'IntlDateFormatter::getErrorCode' => ['int'],
'IntlDateFormatter::getErrorMessage' => ['string'],
'IntlDateFormatter::getLocale' => ['string'],
'IntlDateFormatter::getPattern' => ['string'],
'IntlDateFormatter::getTimeType' => ['int'],
'IntlDateFormatter::getTimeZone' => ['IntlTimeZone'],
'IntlDateFormatter::getTimeZoneId' => ['string'],
'IntlDateFormatter::isLenient' => ['bool'],
'IntlDateFormatter::localtime' => ['array', 'text_to_parse'=>'string', '&w_parse_pos='=>'int'],
'IntlDateFormatter::parse' => ['int|false', 'text_to_parse'=>'string', '&w_parse_pos='=>'int'],
'IntlDateFormatter::setCalendar' => ['bool', 'calendar'=>''],
'IntlDateFormatter::setLenient' => ['bool', 'lenient'=>'bool'],
'IntlDateFormatter::setPattern' => ['bool', 'pattern'=>'string'],
'IntlDateFormatter::setTimeZone' => ['bool', 'timezone'=>''],
'IntlDateFormatter::setTimeZoneId' => ['bool', 'zone'=>'string', 'fmt='=>'IntlDateFormatter'],
'IntlGregorianCalendar::getGregorianChange' => ['float'],
'IntlGregorianCalendar::isLeapYear' => ['bool', 'year'=>'int'],
'IntlGregorianCalendar::setGregorianChange' => ['bool', 'date'=>'float'],
'IntlIterator::current' => ['mixed'],
'IntlIterator::key' => ['string'],
'IntlIterator::next' => ['void'],
'IntlIterator::rewind' => ['void'],
'IntlIterator::valid' => ['bool'],
'IntlPartsIterator::current' => ['non-empty-string'],
'IntlPartsIterator::getBreakIterator' => ['IntlBreakIterator'],
'IntlRuleBasedBreakIterator::__construct' => ['void', 'rules'=>'string', 'areCompiled='=>'string'],
'IntlRuleBasedBreakIterator::createCharacterInstance' => ['IntlRuleBasedBreakIterator', 'locale'=>'string'],
'IntlRuleBasedBreakIterator::createCodePointInstance' => ['IntlCodePointBreakIterator'],
'IntlRuleBasedBreakIterator::createLineInstance' => ['IntlRuleBasedBreakIterator', 'locale'=>'string'],
'IntlRuleBasedBreakIterator::createSentenceInstance' => ['IntlRuleBasedBreakIterator', 'locale'=>'string'],
'IntlRuleBasedBreakIterator::createTitleInstance' => ['IntlRuleBasedBreakIterator', 'locale'=>'string'],
'IntlRuleBasedBreakIterator::createWordInstance' => ['IntlRuleBasedBreakIterator', 'locale'=>'string'],
'IntlRuleBasedBreakIterator::current' => ['int'],
'IntlRuleBasedBreakIterator::first' => ['int'],
'IntlRuleBasedBreakIterator::following' => ['int', 'offset'=>'int'],
'IntlRuleBasedBreakIterator::getBinaryRules' => ['string'],
'IntlRuleBasedBreakIterator::getErrorCode' => ['int'],
'IntlRuleBasedBreakIterator::getErrorMessage' => ['string'],
'IntlRuleBasedBreakIterator::getLocale' => ['string', 'locale_type'=>'string'],
'IntlRuleBasedBreakIterator::getPartsIterator' => ['IntlPartsIterator', 'key_type='=>'int'],
'IntlRuleBasedBreakIterator::getRules' => ['string'],
'IntlRuleBasedBreakIterator::getRuleStatus' => ['int'],
'IntlRuleBasedBreakIterator::getRuleStatusVec' => ['array'],
'IntlRuleBasedBreakIterator::getText' => ['string'],
'IntlRuleBasedBreakIterator::isBoundary' => ['bool', 'offset'=>'int'],
'IntlRuleBasedBreakIterator::last' => ['int'],
'IntlRuleBasedBreakIterator::next' => ['int', 'offset='=>'int'],
'IntlRuleBasedBreakIterator::preceding' => ['int', 'offset'=>'int'],
'IntlRuleBasedBreakIterator::previous' => ['int'],
'IntlRuleBasedBreakIterator::setText' => ['bool', 'text'=>'string'],
'IntlTimeZone::countEquivalentIDs' => ['int', 'zoneId'=>'string'],
'IntlTimeZone::createDefault' => ['IntlTimeZone'],
'IntlTimeZone::createEnumeration' => ['IntlIterator', 'countryOrRawOffset='=>'mixed'],
'IntlTimeZone::createTimeZone' => ['IntlTimeZone', 'zoneId'=>'string'],
'IntlTimeZone::createTimeZoneIDEnumeration' => ['IntlIterator', 'zoneType'=>'int', 'region='=>'string', 'rawOffset='=>'int'],
'IntlTimeZone::fromDateTimeZone' => ['IntlTimeZone', 'zoneId'=>'DateTimeZone'],
'IntlTimeZone::getCanonicalID' => ['string', 'zoneId'=>'string', '&w_isSystemID='=>'bool'],
'IntlTimeZone::getDisplayName' => ['string', 'isDaylight='=>'bool', 'style='=>'int', 'locale='=>'string'],
'IntlTimeZone::getDSTSavings' => ['int'],
'IntlTimeZone::getEquivalentID' => ['string', 'zoneId'=>'string', 'index'=>'int'],
'IntlTimeZone::getErrorCode' => ['int'],
'IntlTimeZone::getErrorMessage' => ['string'],
'IntlTimeZone::getGMT' => ['IntlTimeZone'],
'IntlTimeZone::getID' => ['string'],
'IntlTimeZone::getIDForWindowsID' => ['string', 'timezone'=>'string', 'region='=>'string'],
'IntlTimeZone::getOffset' => ['int', 'date'=>'float', 'local'=>'bool', '&w_rawOffset'=>'int', '&w_dstOffset'=>'int'],
'IntlTimeZone::getRawOffset' => ['int'],
'IntlTimeZone::getRegion' => ['string', 'zoneId'=>'string'],
'IntlTimeZone::getTZDataVersion' => ['string'],
'IntlTimeZone::getUnknown' => ['IntlTimeZone'],
'IntlTimeZone::getWindowsID' => ['string', 'timezone'=>'string'],
'IntlTimeZone::hasSameRules' => ['bool', 'otherTimeZone'=>'IntlTimeZone'],
'IntlTimeZone::toDateTimeZone' => ['DateTimeZone'],
'IntlTimeZone::useDaylightTime' => ['bool'],
'intltz_count_equivalent_ids' => ['int|false', 'zoneId'=>'string'],
'intltz_create_enumeration' => ['IntlIterator', 'countryOrRawOffset'=>'mixed'],
'intltz_create_time_zone' => ['IntlTimeZone', 'zoneId'=>'string'],
'intltz_from_date_time_zone' => ['IntlTimeZone', 'zoneId'=>'DateTimeZone'],
'intltz_get_canonical_id' => ['string|false', 'zoneId'=>'string', '&isSystemID'=>'bool'],
'intltz_get_display_name' => ['string|false', 'obj'=>'IntlTimeZone', 'isDaylight'=>'bool', 'style'=>'int', 'locale'=>'string'],
'intltz_get_dst_savings' => ['int', 'obj'=>'IntlTimeZone'],
'intltz_get_equivalent_id' => ['string|false', 'zoneId'=>'string', 'index'=>'int'],
'intltz_get_error_code' => ['int|false', 'obj'=>'IntlTimeZone'],
'intltz_get_error_message' => ['string|false', 'obj'=>'IntlTimeZone'],
'intltz_get_id' => ['string|false', 'obj'=>'IntlTimeZone'],
'intltz_get_offset' => ['int', 'obj'=>'IntlTimeZone', 'date'=>'float', 'local'=>'bool', '&rawOffset'=>'int', '&dstOffset'=>'int'],
'intltz_get_raw_offset' => ['int', 'obj'=>'IntlTimeZone'],
'intltz_get_tz_data_version' => ['string|false', 'obj'=>'IntlTimeZone'],
'intltz_getGMT' => ['IntlTimeZone'],
'intltz_has_same_rules' => ['bool', 'obj'=>'IntlTimeZone', 'otherTimeZone'=>'IntlTimeZone'],
'intltz_to_date_time_zone' => ['DateTimeZone|false', 'obj'=>''],
'intltz_use_daylight_time' => ['bool', 'obj'=>''],
'intlz_create_default' => ['IntlTimeZone'],
'intval' => ['int', 'var'=>'scalar|array|resource|null', 'base='=>'int'],
'InvalidArgumentException::__clone' => ['void'],
'InvalidArgumentException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Throwable)|(?InvalidArgumentException)'],
'InvalidArgumentException::__toString' => ['string'],
'InvalidArgumentException::getCode' => ['int'],
'InvalidArgumentException::getFile' => ['string'],
'InvalidArgumentException::getLine' => ['int'],
'InvalidArgumentException::getMessage' => ['string'],
'InvalidArgumentException::getPrevious' => ['Throwable|InvalidArgumentException|null'],
'InvalidArgumentException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'InvalidArgumentException::getTraceAsString' => ['string'],
'ip2long' => ['int|false', 'ip_address'=>'string'],
'iptcembed' => ['string|bool', 'iptcdata'=>'string', 'jpeg_file_name'=>'string', 'spool='=>'int'],
'iptcparse' => ['array|false', 'iptcdata'=>'string'],
'is_a' => ['bool', 'object_or_string'=>'object|string', 'class_name'=>'string', 'allow_string='=>'bool'],
'is_array' => ['bool', 'var'=>'mixed'],
'is_bool' => ['bool', 'var'=>'mixed'],
'is_callable' => ['bool', 'var'=>'mixed', 'syntax_only='=>'bool', '&w_callable_name='=>'string'],
'is_countable' => ['bool', 'var'=>'mixed'],
'is_dir' => ['bool', 'filename'=>'string'],
'is_double' => ['bool', 'var'=>''],
'is_executable' => ['bool', 'filename'=>'string'],
'is_file' => ['bool', 'filename'=>'string'],
'is_finite' => ['bool', 'val'=>'float'],
'is_float' => ['bool', 'var'=>'mixed'],
'is_infinite' => ['bool', 'val'=>'float'],
'is_int' => ['bool', 'var'=>'mixed'],
'is_integer' => ['bool', 'var'=>''],
'is_iterable' => ['bool', 'var'=>'mixed'],
'is_link' => ['bool', 'filename'=>'string'],
'is_long' => ['bool', 'var'=>''],
'is_nan' => ['bool', 'val'=>'float'],
'is_null' => ['bool', 'var'=>'mixed'],
'is_numeric' => ['bool', 'value'=>'mixed'],
'is_object' => ['bool', 'var'=>'mixed'],
'is_readable' => ['bool', 'filename'=>'string'],
'is_real' => ['bool', 'var'=>''],
'is_resource' => ['bool', 'var'=>'mixed'],
'is_scalar' => ['bool', 'value'=>'mixed'],
'is_soap_fault' => ['bool', 'object'=>'mixed'],
'is_string' => ['bool', 'var'=>'mixed'],
'is_subclass_of' => ['bool', 'object_or_string'=>'object|string', 'class_name'=>'string', 'allow_string='=>'bool'],
'is_tainted' => ['bool', 'string'=>'string'],
'is_uploaded_file' => ['bool', 'path'=>'string'],
'is_writable' => ['bool', 'filename'=>'string'],
'is_writeable' => ['bool', 'filename'=>'string'],
'Iterator::current' => ['mixed'],
'Iterator::key' => ['mixed'],
'Iterator::next' => ['void'],
'Iterator::rewind' => ['void'],
'Iterator::valid' => ['bool'],
'iterator_apply' => ['0|positive-int', 'iterator'=>'Traversable', 'function'=>'callable', 'params='=>'array'],
'iterator_count' => ['0|positive-int', 'iterator'=>'Traversable'],
'iterator_to_array' => ['array', 'iterator'=>'Traversable', 'use_keys='=>'bool'],
'IteratorAggregate::getIterator' => ['Traversable'],
'IteratorIterator::__construct' => ['void', 'iterator'=>'Traversable'],
'IteratorIterator::current' => ['mixed'],
'IteratorIterator::getInnerIterator' => ['Traversable'],
'IteratorIterator::key' => ['mixed'],
'IteratorIterator::next' => ['void'],
'IteratorIterator::rewind' => ['void'],
'IteratorIterator::valid' => ['bool'],
'java_last_exception_clear' => [''],
'java_last_exception_get' => ['object'],
'java_reload' => ['array', 'new_jarpath'=>'new_jarpath'],
'java_require' => ['array', 'new_classpath'=>'new_classpath'],
'java_set_encoding' => ['array', 'encoding'=>'encoding'],
'java_set_ignore_case' => ['void', 'ignore'=>'ignore'],
'java_throw_exceptions' => ['void', 'throw'=>'throw'],
'JavaException::getCause' => ['object'],
'jddayofweek' => ['mixed', 'juliandaycount'=>'int', 'mode='=>'int'],
'jdmonthname' => ['string', 'juliandaycount'=>'int', 'mode'=>'int'],
'jdtofrench' => ['string', 'juliandaycount'=>'int'],
'jdtogregorian' => ['string', 'juliandaycount'=>'int'],
'jdtojewish' => ['string', 'juliandaycount'=>'int', 'hebrew='=>'bool', 'fl='=>'int'],
'jdtojulian' => ['string', 'juliandaycount'=>'int'],
'jdtounix' => ['int|false', 'jday'=>'int'],
'jewishtojd' => ['int', 'month'=>'int', 'day'=>'int', 'year'=>'int'],
'jobqueue_license_info' => ['array'],
'join' => ['string', 'glue'=>'string', 'pieces'=>'array'],
'join\'1' => ['string', 'pieces'=>'array'],
'jpeg2wbmp' => ['bool', 'jpegname'=>'string', 'wbmpname'=>'string', 'dest_height'=>'int', 'dest_width'=>'int', 'threshold'=>'int'],
'json_decode' => ['mixed', 'json'=>'string', 'assoc='=>'bool|null', 'depth='=>'positive-int', 'options='=>'int'],
'json_encode' => ['non-empty-string|false', 'data'=>'mixed', 'options='=>'int', 'depth='=>'positive-int'],
'json_last_error' => ['int'],
'json_last_error_msg' => ['string'],
'JsonIncrementalParser::__construct' => ['void', 'depth'=>'', 'options'=>''],
'JsonIncrementalParser::get' => ['', 'options'=>''],
'JsonIncrementalParser::getError' => [''],
'JsonIncrementalParser::parse' => ['', 'json'=>''],
'JsonIncrementalParser::parseFile' => ['', 'filename'=>''],
'JsonIncrementalParser::reset' => [''],
'JsonSerializable::jsonSerialize' => ['mixed'],
'Judy::__construct' => ['void', 'judy_type'=>'int'],
'Judy::__destruct' => [''],
'Judy::byCount' => ['int', 'nth_index'=>'int'],
'Judy::count' => ['0|positive-int', 'index_start='=>'int', 'index_end='=>'int'],
'Judy::first' => ['mixed', 'index='=>'mixed'],
'Judy::firstEmpty' => ['int', 'index='=>'mixed'],
'Judy::free' => ['int'],
'Judy::getType' => ['int'],
'Judy::last' => ['void', 'index='=>'string'],
'Judy::lastEmpty' => ['int', 'index='=>'int'],
'Judy::memoryUsage' => ['int'],
'Judy::next' => ['mixed', 'index'=>'mixed'],
'Judy::nextEmpty' => ['int', 'index'=>'int'],
'Judy::offsetExists' => ['bool', 'offset'=>'mixed'],
'Judy::offsetGet' => ['mixed', 'offset'=>'mixed'],
'Judy::offsetSet' => ['bool', 'offset'=>'mixed', 'value'=>'mixed'],
'Judy::offsetUnset' => ['bool', 'offset'=>'mixed'],
'Judy::prev' => ['mixed', 'index'=>'mixed'],
'Judy::prevEmpty' => ['int', 'index'=>'mixed'],
'Judy::size' => ['void'],
'judy_type' => ['int', 'array'=>'judy'],
'judy_version' => ['string'],
'juliantojd' => ['int', 'month'=>'int', 'day'=>'int', 'year'=>'int'],
'kadm5_chpass_principal' => ['bool', 'handle'=>'resource', 'principal'=>'string', 'password'=>'string'],
'kadm5_create_principal' => ['bool', 'handle'=>'resource', 'principal'=>'string', 'password='=>'string', 'options='=>'array'],
'kadm5_delete_principal' => ['bool', 'handle'=>'resource', 'principal'=>'string'],
'kadm5_destroy' => ['bool', 'handle'=>'resource'],
'kadm5_flush' => ['bool', 'handle'=>'resource'],
'kadm5_get_policies' => ['array', 'handle'=>'resource'],
'kadm5_get_principal' => ['array', 'handle'=>'resource', 'principal'=>'string'],
'kadm5_get_principals' => ['array', 'handle'=>'resource'],
'kadm5_init_with_password' => ['resource', 'admin_server'=>'string', 'realm'=>'string', 'principal'=>'string', 'password'=>'string'],
'kadm5_modify_principal' => ['bool', 'handle'=>'resource', 'principal'=>'string', 'options'=>'array'],
'key' => ['int|string|null', 'array_arg'=>'array|object'],
'key_exists' => ['bool', 'key'=>'string|int', 'search'=>'array'],
'krsort' => ['bool', '&rw_array_arg'=>'array', 'sort_flags='=>'int'],
'ksort' => ['bool', '&rw_array_arg'=>'array', 'sort_flags='=>'int'],
'KTaglib_ID3v2_AttachedPictureFrame::getDescription' => ['string'],
'KTaglib_ID3v2_AttachedPictureFrame::getMimeType' => ['string'],
'KTaglib_ID3v2_AttachedPictureFrame::getType' => ['int'],
'KTaglib_ID3v2_AttachedPictureFrame::savePicture' => ['bool', 'filename'=>'string'],
'KTaglib_ID3v2_AttachedPictureFrame::setMimeType' => ['string', 'type'=>'string'],
'KTaglib_ID3v2_AttachedPictureFrame::setPicture' => ['', 'filename'=>'string'],
'KTaglib_ID3v2_AttachedPictureFrame::setType' => ['', 'type'=>'int'],
'KTaglib_ID3v2_Frame::__toString' => ['string'],
'KTaglib_ID3v2_Frame::getSize' => ['int'],
'KTaglib_ID3v2_Tag::addFrame' => ['bool', 'frame'=>'ktaglib_id3v2_frame'],
'KTaglib_ID3v2_Tag::getFrameList' => ['array'],
'KTaglib_MPEG_AudioProperties::getBitrate' => ['int'],
'KTaglib_MPEG_AudioProperties::getChannels' => ['int'],
'KTaglib_MPEG_AudioProperties::getLayer' => ['int'],
'KTaglib_MPEG_AudioProperties::getLength' => ['int'],
'KTaglib_MPEG_AudioProperties::getSampleBitrate' => ['int'],
'KTaglib_MPEG_AudioProperties::getVersion' => ['int'],
'KTaglib_MPEG_AudioProperties::isCopyrighted' => ['bool'],
'KTaglib_MPEG_AudioProperties::isOriginal' => ['bool'],
'KTaglib_MPEG_AudioProperties::isProtectionEnabled' => ['bool'],
'KTaglib_MPEG_File::getAudioProperties' => ['KTaglib_MPEG_File'],
'KTaglib_MPEG_File::getID3v1Tag' => ['KTaglib_ID3v1_Tag', 'create='=>'bool'],
'KTaglib_MPEG_File::getID3v2Tag' => ['KTaglib_ID3v2_Tag', 'create='=>'bool'],
'KTaglib_Tag::getAlbum' => ['string'],
'KTaglib_Tag::getArtist' => ['string'],
'KTaglib_Tag::getComment' => ['string'],
'KTaglib_Tag::getGenre' => ['string'],
'KTaglib_Tag::getTitle' => ['string'],
'KTaglib_Tag::getTrack' => ['int'],
'KTaglib_Tag::getYear' => ['int'],
'KTaglib_Tag::isEmpty' => ['bool'],
'labelcacheObj::freeCache' => ['bool'],
'labelObj::__construct' => ['void'],
'labelObj::convertToString' => ['string'],
'labelObj::deleteStyle' => ['int', 'index'=>'int'],
'labelObj::free' => ['void'],
'labelObj::getBinding' => ['string', 'labelbinding'=>'mixed'],
'labelObj::getExpressionString' => ['string'],
'labelObj::getStyle' => ['styleObj', 'index'=>'int'],
'labelObj::getTextString' => ['string'],
'labelObj::moveStyleDown' => ['int', 'index'=>'int'],
'labelObj::moveStyleUp' => ['int', 'index'=>'int'],
'labelObj::removeBinding' => ['int', 'labelbinding'=>'mixed'],
'labelObj::set' => ['int', 'property_name'=>'string', 'new_value'=>''],
'labelObj::setBinding' => ['int', 'labelbinding'=>'mixed', 'value'=>'string'],
'labelObj::setExpression' => ['int', 'expression'=>'string'],
'labelObj::setText' => ['int', 'text'=>'string'],
'labelObj::updateFromString' => ['int', 'snippet'=>'string'],
'Lapack::eigenValues' => ['array', 'a'=>'array', 'left='=>'array', 'right='=>'array'],
'Lapack::identity' => ['array', 'n'=>'int'],
'Lapack::leastSquaresByFactorisation' => ['array', 'a'=>'array', 'b'=>'array'],
'Lapack::leastSquaresBySVD' => ['array', 'a'=>'array', 'b'=>'array'],
'Lapack::pseudoInverse' => ['array', 'a'=>'array'],
'Lapack::singularValues' => ['array', 'a'=>'array'],
'Lapack::solveLinearEquation' => ['array', 'a'=>'array', 'b'=>'array'],
'layerObj::addFeature' => ['int', 'shape'=>'shapeObj'],
'layerObj::applySLD' => ['int', 'sldxml'=>'string', 'namedlayer'=>'string'],
'layerObj::applySLDURL' => ['int', 'sldurl'=>'string', 'namedlayer'=>'string'],
'layerObj::clearProcessing' => ['void'],
'layerObj::close' => ['void'],
'layerObj::convertToString' => ['string'],
'layerObj::draw' => ['int', 'image'=>'imageObj'],
'layerObj::drawQuery' => ['int', 'image'=>'imageObj'],
'layerObj::free' => ['void'],
'layerObj::generateSLD' => ['string'],
'layerObj::getClass' => ['classObj', 'classIndex'=>'int'],
'layerObj::getClassIndex' => ['int', 'shape'=>'', 'classgroup'=>'', 'numclasses'=>''],
'layerObj::getExtent' => ['rectObj'],
'layerObj::getFilterString' => ['string'],
'layerObj::getGridIntersectionCoordinates' => ['array'],
'layerObj::getItems' => ['array'],
'layerObj::getMetaData' => ['int', 'name'=>'string'],
'layerObj::getNumResults' => ['int'],
'layerObj::getProcessing' => ['array'],
'layerObj::getProjection' => ['string'],
'layerObj::getResult' => ['resultObj', 'index'=>'int'],
'layerObj::getResultsBounds' => ['rectObj'],
'layerObj::getShape' => ['shapeObj', 'result'=>'resultObj'],
'layerObj::getWMSFeatureInfoURL' => ['string', 'clickX'=>'int', 'clickY'=>'int', 'featureCount'=>'int', 'infoFormat'=>'string'],
'layerObj::isVisible' => ['bool'],
'layerObj::moveclassdown' => ['int', 'index'=>'int'],
'layerObj::moveclassup' => ['int', 'index'=>'int'],
'layerObj::ms_newLayerObj' => ['layerObj', 'map'=>'mapObj', 'layer'=>'layerObj'],
'layerObj::nextShape' => ['shapeObj'],
'layerObj::open' => ['int'],
'layerObj::queryByAttributes' => ['int', 'qitem'=>'string', 'qstring'=>'string', 'mode'=>'int'],
'layerObj::queryByFeatures' => ['int', 'slayer'=>'int'],
'layerObj::queryByPoint' => ['int', 'point'=>'pointObj', 'mode'=>'int', 'buffer'=>'float'],
'layerObj::queryByRect' => ['int', 'rect'=>'rectObj'],
'layerObj::queryByShape' => ['int', 'shape'=>'shapeObj'],
'layerObj::removeClass' => ['classObj', 'index'=>'int'],
'layerObj::removeMetaData' => ['int', 'name'=>'string'],
'layerObj::set' => ['int', 'property_name'=>'string', 'new_value'=>''],
'layerObj::setConnectionType' => ['int', 'connectiontype'=>'int', 'plugin_library'=>'string'],
'layerObj::setFilter' => ['int', 'expression'=>'string'],
'layerObj::setMetaData' => ['int', 'name'=>'string', 'value'=>'string'],
'layerObj::setProjection' => ['int', 'proj_params'=>'string'],
'layerObj::setWKTProjection' => ['int', 'proj_params'=>'string'],
'layerObj::updateFromString' => ['int', 'snippet'=>'string'],
'lcfirst' => ['string', 'str'=>'string'],
'lcg_value' => ['float'],
'lchgrp' => ['bool', 'filename'=>'string', 'group'=>'string|int'],
'lchown' => ['bool', 'filename'=>'string', 'user'=>'string|int'],
'ldap_8859_to_t61' => ['string|false', 'value'=>'string'],
'ldap_add' => ['bool', 'link_identifier'=>'resource', 'dn'=>'string', 'entry'=>'array', 'servercontrols='=>'array'],
'ldap_add_ext' => ['resource|false', 'link_identifier'=>'resource', 'dn'=>'string', 'entry'=>'array', 'servercontrols='=>'array'],
'ldap_bind' => ['bool', 'link_identifier'=>'resource', 'bind_rdn='=>'string|null', 'bind_password='=>'string|null', 'serverctrls=' => 'array'],
'ldap_bind_ext' => ['resource|false', 'link_identifier'=>'resource', 'bind_rdn='=>'string|null', 'bind_password='=>'string|null', 'serverctrls=' => 'array'],
'ldap_close' => ['bool', 'link_identifier'=>'resource'],
'ldap_compare' => ['bool', 'link_identifier'=>'resource', 'dn'=>'string', 'attr'=>'string', 'value'=>'string', 'servercontrols='=>'array'],
'ldap_connect' => ['resource|false', 'host='=>'string', 'port='=>'int', 'wallet='=>'string', 'wallet_passwd='=>'string', 'authmode='=>'int'],
'ldap_control_paged_result' => ['bool', 'link_identifier'=>'resource', 'pagesize'=>'int', 'iscritical='=>'bool', 'cookie='=>'string'],
'ldap_control_paged_result_response' => ['bool', 'link_identifier'=>'resource', 'result_identifier'=>'resource', '&w_cookie='=>'string', '&w_estimated='=>'int'],
'ldap_count_entries' => ['int', 'link_identifier'=>'resource', 'result'=>'resource'],
'ldap_delete' => ['bool', 'link_identifier'=>'resource', 'dn'=>'string', 'servercontrols='=>'array'],
'ldap_delete_ext' => ['resource|false', 'link_identifier'=>'resource', 'dn'=>'string', 'servercontrols='=>'array'],
'ldap_dn2ufn' => ['string|false', 'dn'=>'string'],
'ldap_err2str' => ['string', 'errno'=>'int'],
'ldap_errno' => ['int', 'link_identifier'=>'resource'],
'ldap_error' => ['string', 'link_identifier'=>'resource'],
'ldap_escape' => ['string', 'value'=>'string', 'ignore='=>'string', 'flags='=>'int'],
'ldap_exop' => ['resource|bool', 'link'=>'resource', 'reqoid'=>'string', 'reqdata='=>'string', 'serverctrls='=>'array|null', '&w_retdata='=>'string', '&w_retoid='=>'string'],
'ldap_exop_passwd' => ['string|bool', 'link'=>'resource', 'user='=>'string', 'oldpw='=>'string', 'newpw='=>'string', 'serverctrls='=>'array'],
'ldap_exop_refresh' => ['int|false', 'link'=>'resource', 'dn'=>'string', 'ttl'=>'int'],
'ldap_exop_whoami' => ['string|bool', 'link'=>'resource'],
'ldap_explode_dn' => ['array|false', 'dn'=>'string', 'with_attrib'=>'int'],
'ldap_first_attribute' => ['string|false', 'link_identifier'=>'resource', 'result_entry_identifier'=>'resource'],
'ldap_first_entry' => ['resource|false', 'link_identifier'=>'resource', 'result_identifier'=>'resource'],
'ldap_first_reference' => ['resource|false', 'link_identifier'=>'resource', 'result_identifier'=>'resource'],
'ldap_free_result' => ['bool', 'result_identifier'=>'resource'],
'ldap_get_attributes' => ['array', 'link_identifier'=>'resource', 'result_entry_identifier'=>'resource'],
'ldap_get_dn' => ['string|false', 'link_identifier'=>'resource', 'result_entry_identifier'=>'resource'],
'ldap_get_entries' => ['array|false', 'link_identifier'=>'resource', 'result_identifier'=>'resource'],
'ldap_get_option' => ['bool', 'link_identifier'=>'resource', 'option'=>'int', '&w_retval'=>'mixed'],
'ldap_get_values' => ['array|false', 'link_identifier'=>'resource', 'result_entry_identifier'=>'resource', 'attribute'=>'string'],
'ldap_get_values_len' => ['array|false', 'link_identifier'=>'resource', 'result_entry_identifier'=>'resource', 'attribute'=>'string'],
'ldap_list' => ['resource|false', 'link'=>'resource|array', 'base_dn'=>'string', 'filter'=>'string', 'attrs='=>'array', 'attrsonly='=>'int', 'sizelimit='=>'int', 'timelimit='=>'int', 'deref='=>'int', 'servercontrols='=>'array'],
'ldap_mod_add' => ['bool', 'link_identifier'=>'resource', 'dn'=>'string', 'entry'=>'array', 'servercontrols='=>'array'],
'ldap_mod_add_ext' => ['resource|false', 'link_identifier'=>'resource', 'dn'=>'string', 'entry'=>'array', 'servercontrols='=>'array'],
'ldap_mod_del' => ['bool', 'link_identifier'=>'resource', 'dn'=>'string', 'entry'=>'array', 'servercontrols='=>'array'],
'ldap_mod_del_ext' => ['resource|false', 'link_identifier'=>'resource', 'dn'=>'string', 'entry'=>'array', 'servercontrols='=>'array'],
'ldap_mod_replace' => ['bool', 'link_identifier'=>'resource', 'dn'=>'string', 'entry'=>'array', 'servercontrols='=>'array'],
'ldap_mod_replace_ext' => ['resource|false', 'link_identifier'=>'resource', 'dn'=>'string', 'entry'=>'array', 'servercontrols='=>'array'],
'ldap_modify' => ['bool', 'link_identifier'=>'resource', 'dn'=>'string', 'entry'=>'array'],
'ldap_modify_batch' => ['bool', 'link_identifier'=>'resource', 'dn'=>'string', 'modifs'=>'array', 'servercontrols='=>'array'],
'ldap_next_attribute' => ['string|false', 'link_identifier'=>'resource', 'result_entry_identifier'=>'resource'],
'ldap_next_entry' => ['resource|false', 'link_identifier'=>'resource', 'result_entry_identifier'=>'resource'],
'ldap_next_reference' => ['resource|false', 'link_identifier'=>'resource', 'reference_entry_identifier'=>'resource'],
'ldap_parse_exop' => ['bool', 'link'=>'resource', 'result'=>'resource', '&w_retdata='=>'string', '&w_retoid='=>'string'],
'ldap_parse_reference' => ['bool', 'link_identifier'=>'resource', 'reference_entry_identifier'=>'resource', 'referrals'=>'array'],
'ldap_parse_result' => ['bool', 'link_identifier'=>'resource', 'result'=>'resource', '&w_errcode'=>'int', '&w_matcheddn='=>'string', '&w_errmsg='=>'string', '&w_referrals='=>'array', '&w_serverctrls='=>'array'],
'ldap_read' => ['resource|false', 'link'=>'resource|array', 'base_dn'=>'string', 'filter'=>'string', 'attrs='=>'array', 'attrsonly='=>'int', 'sizelimit='=>'int', 'timelimit='=>'int', 'deref='=>'int', 'servercontrols='=>'array'],
'ldap_rename' => ['bool', 'link_identifier'=>'resource', 'dn'=>'string', 'newrdn'=>'string', 'newparent'=>'string', 'deleteoldrdn'=>'bool', 'servercontrols='=>'array'],
'ldap_rename_ext' => ['resource|false', 'link_identifier'=>'resource', 'dn'=>'string', 'newrdn'=>'string', 'newparent'=>'string', 'deleteoldrdn'=>'bool', 'servercontrols='=>'array'],
'ldap_sasl_bind' => ['bool', 'link_identifier'=>'resource', 'binddn='=>'string', 'password='=>'string', 'sasl_mech='=>'string', 'sasl_realm='=>'string', 'sasl_authc_id='=>'string', 'sasl_authz_id='=>'string', 'props='=>'string'],
'ldap_search' => ['resource|false', 'link_identifier'=>'resource|array', 'base_dn'=>'string', 'filter'=>'string', 'attrs='=>'array', 'attrsonly='=>'int', 'sizelimit='=>'int', 'timelimit='=>'int', 'deref='=>'int', 'servercontrols='=>'array'],
'ldap_set_option' => ['bool', 'link_identifier'=>'resource|null', 'option'=>'int', 'newval'=>'mixed'],
'ldap_set_rebind_proc' => ['bool', 'link_identifier'=>'resource', 'callback'=>'callable'],
'ldap_sort' => ['bool', 'link_identifier'=>'resource', 'result_identifier'=>'resource', 'sortfilter'=>'string'],
'ldap_start_tls' => ['bool', 'link_identifier'=>'resource'],
'ldap_t61_to_8859' => ['string|false', 'value'=>'string'],
'ldap_unbind' => ['bool', 'link_identifier'=>'resource'],
'leak' => ['', 'num_bytes'=>'int'],
'leak_variable' => ['', 'variable'=>'', 'leak_data'=>'bool'],
'legendObj::convertToString' => ['string'],
'legendObj::free' => ['void'],
'legendObj::set' => ['int', 'property_name'=>'string', 'new_value'=>''],
'legendObj::updateFromString' => ['int', 'snippet'=>'string'],
'LengthException::__clone' => ['void'],
'LengthException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Throwable)|(?LengthException)'],
'LengthException::__toString' => ['string'],
'LengthException::getCode' => ['int'],
'LengthException::getFile' => ['string'],
'LengthException::getLine' => ['int'],
'LengthException::getMessage' => ['string'],
'LengthException::getPrevious' => ['Throwable|LengthException|null'],
'LengthException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'LengthException::getTraceAsString' => ['string'],
'levenshtein' => ['int', 'str1'=>'string', 'str2'=>'string'],
'levenshtein\'1' => ['int', 'str1'=>'string', 'str2'=>'string', 'cost_ins'=>'int', 'cost_rep'=>'int', 'cost_del'=>'int'],
'libxml_clear_errors' => ['void'],
'libxml_disable_entity_loader' => ['bool', 'disable='=>'bool'],
'libxml_get_errors' => ['array<int,LibXMLError>'],
'libxml_get_last_error' => ['LibXMLError|false'],
'libxml_set_external_entity_loader' => ['bool', 'resolver_function'=>'callable'],
'libxml_set_streams_context' => ['void', 'streams_context'=>'resource'],
'libxml_use_internal_errors' => ['bool', 'use_errors='=>'bool'],
'LimitIterator::__construct' => ['void', 'iterator'=>'Iterator', 'offset='=>'int', 'count='=>'int'],
'LimitIterator::current' => ['mixed'],
'LimitIterator::getInnerIterator' => ['Iterator'],
'LimitIterator::getPosition' => ['int'],
'LimitIterator::key' => ['mixed'],
'LimitIterator::next' => ['void'],
'LimitIterator::rewind' => ['void'],
'LimitIterator::seek' => ['int', 'position'=>'int'],
'LimitIterator::valid' => ['bool'],
'lineObj::__construct' => ['void'],
'lineObj::add' => ['int', 'point'=>'pointObj'],
'lineObj::addXY' => ['int', 'x'=>'float', 'y'=>'float', 'm'=>'float'],
'lineObj::addXYZ' => ['int', 'x'=>'float', 'y'=>'float', 'z'=>'float', 'm'=>'float'],
'lineObj::ms_newLineObj' => ['lineObj'],
'lineObj::point' => ['pointObj', 'i'=>'int'],
'lineObj::project' => ['int', 'in'=>'projectionObj', 'out'=>'projectionObj'],
'link' => ['bool', 'target'=>'string', 'link'=>'string'],
'linkinfo' => ['int|false', 'filename'=>'string'],
'litespeed_request_headers' => ['array'],
'litespeed_response_headers' => ['array|false'],
'Locale::acceptFromHttp' => ['string|false', 'header'=>'string'],
'Locale::canonicalize' => ['string', 'locale'=>'string'],
'Locale::composeLocale' => ['string', 'subtags'=>'array'],
'Locale::filterMatches' => ['bool', 'langtag'=>'string', 'locale'=>'string', 'canonicalize='=>'bool'],
'Locale::getAllVariants' => ['array', 'locale'=>'string'],
'Locale::getDefault' => ['string'],
'Locale::getDisplayLanguage' => ['string', 'locale'=>'string', 'in_locale='=>'string'],
'Locale::getDisplayName' => ['string', 'locale'=>'string', 'in_locale='=>'string'],
'Locale::getDisplayRegion' => ['string', 'locale'=>'string', 'in_locale='=>'string'],
'Locale::getDisplayScript' => ['string', 'locale'=>'string', 'in_locale='=>'string'],
'Locale::getDisplayVariant' => ['string', 'locale'=>'string', 'in_locale='=>'string'],
'Locale::getKeywords' => ['array|false', 'locale'=>'string'],
'Locale::getPrimaryLanguage' => ['string', 'locale'=>'string'],
'Locale::getRegion' => ['string', 'locale'=>'string'],
'Locale::getScript' => ['string', 'locale'=>'string'],
'Locale::lookup' => ['string', 'langtag'=>'array', 'locale'=>'string', 'canonicalize='=>'bool', 'default='=>'string'],
'Locale::parseLocale' => ['array', 'locale'=>'string'],
'Locale::setDefault' => ['bool', 'locale'=>'string'],
'locale_accept_from_http' => ['string|false', 'header'=>'string'],
'locale_canonicalize' => ['', 'arg1'=>''],
'locale_compose' => ['string|false', 'subtags'=>'array'],
'locale_filter_matches' => ['bool', 'langtag'=>'string', 'locale'=>'string', 'canonicalize='=>'bool'],
'locale_get_all_variants' => ['array', 'locale'=>'string'],
'locale_get_default' => ['string'],
'locale_get_display_language' => ['string|false', 'locale'=>'string', 'in_locale='=>'string'],
'locale_get_display_name' => ['string|false', 'locale'=>'string', 'in_locale='=>'string'],
'locale_get_display_region' => ['string|false', 'locale'=>'string', 'in_locale='=>'string'],
'locale_get_display_script' => ['string|false', 'locale'=>'string', 'in_locale='=>'string'],
'locale_get_display_variant' => ['string|false', 'locale'=>'string', 'in_locale='=>'string'],
'locale_get_keywords' => ['array|false', 'locale'=>'string'],
'locale_get_primary_language' => ['string', 'locale'=>'string'],
'locale_get_region' => ['string', 'locale'=>'string'],
'locale_get_script' => ['string', 'locale'=>'string'],
'locale_lookup' => ['string', 'langtag'=>'array', 'locale'=>'string', 'canonicalize='=>'bool', 'default='=>'string'],
'locale_parse' => ['array', 'locale'=>'string'],
'locale_set_default' => ['bool', 'locale'=>'string'],
'localeconv' => ['array'],
'localtime' => ['array', 'timestamp='=>'int', 'associative_array='=>'bool'],
'log' => ['float', 'number'=>'float', 'base='=>'float'],
'log10' => ['float', 'number'=>'float'],
'log1p' => ['float', 'number'=>'float'],
'LogicException::__clone' => ['void'],
'LogicException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Throwable)|(?LogicException)'],
'LogicException::__toString' => ['string'],
'LogicException::getCode' => ['int'],
'LogicException::getFile' => ['string'],
'LogicException::getLine' => ['int'],
'LogicException::getMessage' => ['string'],
'LogicException::getPrevious' => ['Throwable|LogicException|null'],
'LogicException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'LogicException::getTraceAsString' => ['string'],
'long2ip' => ['string|false', 'proper_address'=>'int'],
'lstat' => ['array|false', 'filename'=>'string'],
'ltrim' => ['string', 'str'=>'string', 'character_mask='=>'string'],
'Lua::__call' => ['mixed', 'lua_func'=>'callable', 'args='=>'array', 'use_self='=>'int'],
'Lua::__construct' => ['void', 'lua_script_file'=>'string'],
'Lua::assign' => ['mixed', 'name'=>'string', 'value'=>'string'],
'Lua::call' => ['mixed', 'lua_func'=>'callable', 'args='=>'array', 'use_self='=>'int'],
'Lua::eval' => ['mixed', 'statements'=>'string'],
'Lua::getVersion' => ['string'],
'Lua::include' => ['mixed', 'file'=>'string'],
'Lua::registerCallback' => ['mixed', 'name'=>'string', 'function'=>'callable'],
'LuaClosure::__invoke' => ['void', 'arg'=>'mixed', '...args='=>'mixed'],
'lzf_compress' => ['string', 'data'=>'string'],
'lzf_decompress' => ['string', 'data'=>'string'],
'lzf_optimized_for' => ['int'],
'm_checkstatus' => ['int', 'conn'=>'resource', 'identifier'=>'int'],
'm_completeauthorizations' => ['int', 'conn'=>'resource', 'array'=>'int'],
'm_connect' => ['int', 'conn'=>'resource'],
'm_connectionerror' => ['string', 'conn'=>'resource'],
'm_deletetrans' => ['bool', 'conn'=>'resource', 'identifier'=>'int'],
'm_destroyconn' => ['bool', 'conn'=>'resource'],
'm_destroyengine' => ['void'],
'm_getcell' => ['string', 'conn'=>'resource', 'identifier'=>'int', 'column'=>'string', 'row'=>'int'],
'm_getcellbynum' => ['string', 'conn'=>'resource', 'identifier'=>'int', 'column'=>'int', 'row'=>'int'],
'm_getcommadelimited' => ['string', 'conn'=>'resource', 'identifier'=>'int'],
'm_getheader' => ['string', 'conn'=>'resource', 'identifier'=>'int', 'column_num'=>'int'],
'm_initconn' => ['resource'],
'm_initengine' => ['int', 'location'=>'string'],
'm_iscommadelimited' => ['int', 'conn'=>'resource', 'identifier'=>'int'],
'm_maxconntimeout' => ['bool', 'conn'=>'resource', 'secs'=>'int'],
'm_monitor' => ['int', 'conn'=>'resource'],
'm_numcolumns' => ['int', 'conn'=>'resource', 'identifier'=>'int'],
'm_numrows' => ['int', 'conn'=>'resource', 'identifier'=>'int'],
'm_parsecommadelimited' => ['int', 'conn'=>'resource', 'identifier'=>'int'],
'm_responsekeys' => ['array', 'conn'=>'resource', 'identifier'=>'int'],
'm_responseparam' => ['string', 'conn'=>'resource', 'identifier'=>'int', 'key'=>'string'],
'm_returnstatus' => ['int', 'conn'=>'resource', 'identifier'=>'int'],
'm_setblocking' => ['int', 'conn'=>'resource', 'tf'=>'int'],
'm_setdropfile' => ['int', 'conn'=>'resource', 'directory'=>'string'],
'm_setip' => ['int', 'conn'=>'resource', 'host'=>'string', 'port'=>'int'],
'm_setssl' => ['int', 'conn'=>'resource', 'host'=>'string', 'port'=>'int'],
'm_setssl_cafile' => ['int', 'conn'=>'resource', 'cafile'=>'string'],
'm_setssl_files' => ['int', 'conn'=>'resource', 'sslkeyfile'=>'string', 'sslcertfile'=>'string'],
'm_settimeout' => ['int', 'conn'=>'resource', 'seconds'=>'int'],
'm_sslcert_gen_hash' => ['string', 'filename'=>'string'],
'm_transactionssent' => ['int', 'conn'=>'resource'],
'm_transinqueue' => ['int', 'conn'=>'resource'],
'm_transkeyval' => ['int', 'conn'=>'resource', 'identifier'=>'int', 'key'=>'string', 'value'=>'string'],
'm_transnew' => ['int', 'conn'=>'resource'],
'm_transsend' => ['int', 'conn'=>'resource', 'identifier'=>'int'],
'm_uwait' => ['int', 'microsecs'=>'int'],
'm_validateidentifier' => ['int', 'conn'=>'resource', 'tf'=>'int'],
'm_verifyconnection' => ['bool', 'conn'=>'resource', 'tf'=>'int'],
'm_verifysslcert' => ['bool', 'conn'=>'resource', 'tf'=>'int'],
'magic_quotes_runtime' => ['', 'new_setting'=>''],
'mail' => ['bool', 'to'=>'string', 'subject'=>'string', 'message'=>'string', 'additional_headers='=>'string|array|null', 'additional_parameters='=>'string'],
'mailparse_determine_best_xfer_encoding' => ['string', 'fp'=>'resource'],
'mailparse_msg_create' => ['resource'],
'mailparse_msg_extract_part' => ['void', 'mimemail'=>'resource', 'msgbody'=>'string', 'callbackfunc='=>'callable'],
'mailparse_msg_extract_part_file' => ['string', 'mimemail'=>'resource', 'filename'=>'mixed', 'callbackfunc='=>'callable'],
'mailparse_msg_extract_whole_part_file' => ['string', 'mimemail'=>'resource', 'filename'=>'string', 'callbackfunc='=>'callable'],
'mailparse_msg_free' => ['bool', 'mimemail'=>'resource'],
'mailparse_msg_get_part' => ['resource', 'mimemail'=>'resource', 'mimesection'=>'string'],
'mailparse_msg_get_part_data' => ['array', 'mimemail'=>'resource'],
'mailparse_msg_get_structure' => ['array', 'mimemail'=>'resource'],
'mailparse_msg_parse' => ['bool', 'mimemail'=>'resource', 'data'=>'string'],
'mailparse_msg_parse_file' => ['resource', 'filename'=>'string'],
'mailparse_rfc822_parse_addresses' => ['array', 'addresses'=>'string'],
'mailparse_stream_encode' => ['bool', 'sourcefp'=>'resource', 'destfp'=>'resource', 'encoding'=>'string'],
'mailparse_uudecode_all' => ['array', 'fp'=>'resource'],
'mapObj::__construct' => ['void', 'map_file_name'=>'string', 'new_map_path'=>'string'],
'mapObj::appendOutputFormat' => ['int', 'outputFormat'=>'outputformatObj'],
'mapObj::applyconfigoptions' => ['int'],
'mapObj::applySLD' => ['int', 'sldxml'=>'string'],
'mapObj::applySLDURL' => ['int', 'sldurl'=>'string'],
'mapObj::convertToString' => ['string'],
'mapObj::draw' => ['imageObj'],
'mapObj::drawLabelCache' => ['int', 'image'=>'imageObj'],
'mapObj::drawLegend' => ['imageObj'],
'mapObj::drawQuery' => ['imageObj'],
'mapObj::drawReferenceMap' => ['imageObj'],
'mapObj::drawScaleBar' => ['imageObj'],
'mapObj::embedLegend' => ['int', 'image'=>'imageObj'],
'mapObj::embedScalebar' => ['int', 'image'=>'imageObj'],
'mapObj::free' => ['void'],
'mapObj::generateSLD' => ['string'],
'mapObj::getAllGroupNames' => ['array'],
'mapObj::getAllLayerNames' => ['array'],
'mapObj::getColorbyIndex' => ['colorObj', 'iCloIndex'=>'int'],
'mapObj::getConfigOption' => ['string', 'key'=>'string'],
'mapObj::getLabel' => ['labelcacheMemberObj', 'index'=>'int'],
'mapObj::getLayer' => ['layerObj', 'index'=>'int'],
'mapObj::getLayerByName' => ['layerObj', 'layer_name'=>'string'],
'mapObj::getLayersDrawingOrder' => ['array'],
'mapObj::getLayersIndexByGroup' => ['array', 'groupname'=>'string'],
'mapObj::getMetaData' => ['int', 'name'=>'string'],
'mapObj::getNumSymbols' => ['int'],
'mapObj::getOutputFormat' => ['outputformatObj', 'index'=>'int'],
'mapObj::getProjection' => ['string'],
'mapObj::getSymbolByName' => ['int', 'symbol_name'=>'string'],
'mapObj::getSymbolObjectById' => ['symbolObj', 'symbolid'=>'int'],
'mapObj::loadMapContext' => ['int', 'filename'=>'string', 'unique_layer_name'=>'bool'],
'mapObj::loadOWSParameters' => ['int', 'request'=>'OwsrequestObj', 'version'=>'string'],
'mapObj::moveLayerDown' => ['int', 'layerindex'=>'int'],
'mapObj::moveLayerUp' => ['int', 'layerindex'=>'int'],
'mapObj::ms_newMapObjFromString' => ['mapObj', 'map_file_string'=>'string', 'new_map_path'=>'string'],
'mapObj::offsetExtent' => ['int', 'x'=>'float', 'y'=>'float'],
'mapObj::owsDispatch' => ['int', 'request'=>'OwsrequestObj'],
'mapObj::prepareImage' => ['imageObj'],
'mapObj::prepareQuery' => ['void'],
'mapObj::processLegendTemplate' => ['string', 'params'=>'array'],
'mapObj::processQueryTemplate' => ['string', 'params'=>'array', 'generateimages'=>'bool'],
'mapObj::processTemplate' => ['string', 'params'=>'array', 'generateimages'=>'bool'],
'mapObj::queryByFeatures' => ['int', 'slayer'=>'int'],
'mapObj::queryByIndex' => ['int', 'layerindex'=>'', 'tileindex'=>'', 'shapeindex'=>'', 'addtoquery'=>''],
'mapObj::queryByPoint' => ['int', 'point'=>'pointObj', 'mode'=>'int', 'buffer'=>'float'],
'mapObj::queryByRect' => ['int', 'rect'=>'rectObj'],
'mapObj::queryByShape' => ['int', 'shape'=>'shapeObj'],
'mapObj::removeLayer' => ['layerObj', 'nIndex'=>'int'],
'mapObj::removeMetaData' => ['int', 'name'=>'string'],
'mapObj::removeOutputFormat' => ['int', 'name'=>'string'],
'mapObj::save' => ['int', 'filename'=>'string'],
'mapObj::saveMapContext' => ['int', 'filename'=>'string'],
'mapObj::saveQuery' => ['int', 'filename'=>'string', 'results'=>'int'],
'mapObj::scaleExtent' => ['int', 'zoomfactor'=>'float', 'minscaledenom'=>'float', 'maxscaledenom'=>'float'],
'mapObj::selectOutputFormat' => ['int', 'type'=>'string'],
'mapObj::set' => ['int', 'property_name'=>'string', 'new_value'=>''],
'mapObj::setCenter' => ['int', 'center'=>'pointObj'],
'mapObj::setConfigOption' => ['int', 'key'=>'string', 'value'=>'string'],
'mapObj::setExtent' => ['void', 'minx'=>'float', 'miny'=>'float', 'maxx'=>'float', 'maxy'=>'float'],
'mapObj::setFontSet' => ['int', 'fileName'=>'string'],
'mapObj::setMetaData' => ['int', 'name'=>'string', 'value'=>'string'],
'mapObj::setProjection' => ['int', 'proj_params'=>'string', 'bSetUnitsAndExtents'=>'bool'],
'mapObj::setRotation' => ['int', 'rotation_angle'=>'float'],
'mapObj::setSize' => ['int', 'width'=>'int', 'height'=>'int'],
'mapObj::setSymbolSet' => ['int', 'fileName'=>'string'],
'mapObj::setWKTProjection' => ['int', 'proj_params'=>'string', 'bSetUnitsAndExtents'=>'bool'],
'mapObj::zoomPoint' => ['int', 'nZoomFactor'=>'int', 'oPixelPos'=>'pointObj', 'nImageWidth'=>'int', 'nImageHeight'=>'int', 'oGeorefExt'=>'rectObj'],
'mapObj::zoomRectangle' => ['int', 'oPixelExt'=>'rectObj', 'nImageWidth'=>'int', 'nImageHeight'=>'int', 'oGeorefExt'=>'rectObj'],
'mapObj::zoomScale' => ['int', 'nScaleDenom'=>'float', 'oPixelPos'=>'pointObj', 'nImageWidth'=>'int', 'nImageHeight'=>'int', 'oGeorefExt'=>'rectObj', 'oMaxGeorefExt'=>'rectObj'],
'max' => ['', '...arg1'=>'array'],
'max\'1' => ['', 'arg1'=>'', 'arg2'=>'', '...args='=>''],
'maxdb::__construct' => ['void', 'host='=>'string', 'username='=>'string', 'passwd='=>'string', 'dbname='=>'string', 'port='=>'int', 'socket='=>'string'],
'maxdb::affected_rows' => ['int', 'link'=>''],
'maxdb::auto_commit' => ['bool', 'link'=>'', 'mode'=>'bool'],
'maxdb::change_user' => ['bool', 'link'=>'', 'user'=>'string', 'password'=>'string', 'database'=>'string'],
'maxdb::character_set_name' => ['string', 'link'=>''],
'maxdb::close' => ['bool', 'link'=>''],
'maxdb::commit' => ['bool', 'link'=>''],
'maxdb::disable_reads_from_master' => ['', 'link'=>''],
'maxdb::errno' => ['int', 'link'=>''],
'maxdb::error' => ['string', 'link'=>''],
'maxdb::field_count' => ['int', 'link'=>''],
'maxdb::get_host_info' => ['string', 'link'=>''],
'maxdb::info' => ['string', 'link'=>''],
'maxdb::insert_id' => ['', 'link'=>''],
'maxdb::kill' => ['bool', 'link'=>'', 'processid'=>'int'],
'maxdb::more_results' => ['bool', 'link'=>''],
'maxdb::multi_query' => ['bool', 'link'=>'', 'query'=>'string'],
'maxdb::next_result' => ['bool', 'link'=>''],
'maxdb::num_rows' => ['int', 'result'=>''],
'maxdb::options' => ['bool', 'link'=>'', 'option'=>'int', 'value'=>''],
'maxdb::ping' => ['bool', 'link'=>''],
'maxdb::prepare' => ['maxdb_stmt', 'link'=>'', 'query'=>'string'],
'maxdb::protocol_version' => ['string', 'link'=>''],
'maxdb::query' => ['', 'link'=>'', 'query'=>'string', 'resultmode='=>'int'],
'maxdb::real_connect' => ['bool', 'link'=>'', 'hostname='=>'string', 'username='=>'string', 'passwd='=>'string', 'dbname='=>'string', 'port='=>'int', 'socket='=>'string'],
'maxdb::real_escape_string' => ['string', 'link'=>'', 'escapestr'=>'string'],
'maxdb::real_query' => ['bool', 'link'=>'', 'query'=>'string'],
'maxdb::rollback' => ['bool', 'link'=>''],
'maxdb::rpl_query_type' => ['int', 'link'=>''],
'maxdb::select_db' => ['bool', 'link'=>'', 'dbname'=>'string'],
'maxdb::send_query' => ['bool', 'link'=>'', 'query'=>'string'],
'maxdb::server_info' => ['string', 'link'=>''],
'maxdb::server_version' => ['int', 'link'=>''],
'maxdb::sqlstate' => ['string', 'link'=>''],
'maxdb::ssl_set' => ['bool', 'link'=>'', 'key'=>'string', 'cert'=>'string', 'ca'=>'string', 'capath'=>'string', 'cipher'=>'string'],
'maxdb::stat' => ['string', 'link'=>''],
'maxdb::stmt_init' => ['object', 'link'=>''],
'maxdb::store_result' => ['bool', 'link'=>''],
'maxdb::thread_id' => ['int', 'link'=>''],
'maxdb::use_result' => ['resource', 'link'=>''],
'maxdb::warning_count' => ['int', 'link'=>''],
'maxdb_affected_rows' => ['int', 'link'=>'resource'],
'maxdb_autocommit' => ['bool', 'link'=>'', 'mode'=>'bool'],
'maxdb_change_user' => ['bool', 'link'=>'', 'user'=>'string', 'password'=>'string', 'database'=>'string'],
'maxdb_character_set_name' => ['string', 'link'=>''],
'maxdb_close' => ['bool', 'link'=>''],
'maxdb_commit' => ['bool', 'link'=>''],
'maxdb_connect' => ['resource', 'host='=>'string', 'username='=>'string', 'passwd='=>'string', 'dbname='=>'string', 'port='=>'int', 'socket='=>'string'],
'maxdb_connect_errno' => ['int'],
'maxdb_connect_error' => ['string'],
'maxdb_data_seek' => ['bool', 'result'=>'', 'offset'=>'int'],
'maxdb_debug' => ['void', 'debug'=>'string'],
'maxdb_disable_reads_from_master' => ['', 'link'=>''],
'maxdb_disable_rpl_parse' => ['bool', 'link'=>'resource'],
'maxdb_dump_debug_info' => ['bool', 'link'=>'resource'],
'maxdb_embedded_connect' => ['resource', 'dbname='=>'string'],
'maxdb_enable_reads_from_master' => ['bool', 'link'=>'resource'],
'maxdb_enable_rpl_parse' => ['bool', 'link'=>'resource'],
'maxdb_errno' => ['int', 'link'=>'resource'],
'maxdb_error' => ['string', 'link'=>'resource'],
'maxdb_fetch_array' => ['', 'result'=>'', 'resulttype='=>'int'],
'maxdb_fetch_assoc' => ['array', 'result'=>''],
'maxdb_fetch_field' => ['', 'result'=>''],
'maxdb_fetch_field_direct' => ['', 'result'=>'', 'fieldnr'=>'int'],
'maxdb_fetch_fields' => ['', 'result'=>''],
'maxdb_fetch_lengths' => ['array', 'result'=>'resource'],
'maxdb_fetch_object' => ['object', 'result'=>'object'],
'maxdb_fetch_row' => ['', 'result'=>''],
'maxdb_field_count' => ['int', 'link'=>''],
'maxdb_field_seek' => ['bool', 'result'=>'', 'fieldnr'=>'int'],
'maxdb_field_tell' => ['int', 'result'=>'resource'],
'maxdb_free_result' => ['', 'result'=>''],
'maxdb_get_client_info' => ['string'],
'maxdb_get_client_version' => ['int'],
'maxdb_get_host_info' => ['string', 'link'=>'resource'],
'maxdb_get_proto_info' => ['string', 'link'=>'resource'],
'maxdb_get_server_info' => ['string', 'link'=>'resource'],
'maxdb_get_server_version' => ['int', 'link'=>'resource'],
'maxdb_info' => ['string', 'link'=>'resource'],
'maxdb_init' => ['resource'],
'maxdb_insert_id' => ['mixed', 'link'=>'resource'],
'maxdb_kill' => ['bool', 'link'=>'', 'processid'=>'int'],
'maxdb_master_query' => ['bool', 'link'=>'resource', 'query'=>'string'],
'maxdb_more_results' => ['bool', 'link'=>'resource'],
'maxdb_multi_query' => ['bool', 'link'=>'', 'query'=>'string'],
'maxdb_next_result' => ['bool', 'link'=>'resource'],
'maxdb_num_fields' => ['int', 'result'=>'resource'],
'maxdb_num_rows' => ['int', 'result'=>'resource'],
'maxdb_options' => ['bool', 'link'=>'', 'option'=>'int', 'value'=>''],
'maxdb_ping' => ['bool', 'link'=>''],
'maxdb_prepare' => ['maxdb_stmt', 'link'=>'', 'query'=>'string'],
'maxdb_query' => ['', 'link'=>'', 'query'=>'string', 'resultmode='=>'int'],
'maxdb_real_connect' => ['bool', 'link'=>'', 'hostname='=>'string', 'username='=>'string', 'passwd='=>'string', 'dbname='=>'string', 'port='=>'int', 'socket='=>'string'],
'maxdb_real_escape_string' => ['string', 'link'=>'', 'escapestr'=>'string'],
'maxdb_real_query' => ['bool', 'link'=>'', 'query'=>'string'],
'maxdb_report' => ['bool', 'flags'=>'int'],
'maxdb_result::current_field' => ['int', 'result'=>''],
'maxdb_result::data_seek' => ['bool', 'result'=>'', 'offset'=>'int'],
'maxdb_result::fetch_array' => ['', 'result'=>'', 'resulttype='=>'int'],
'maxdb_result::fetch_assoc' => ['array', 'result'=>''],
'maxdb_result::fetch_field' => ['', 'result'=>''],
'maxdb_result::fetch_field_direct' => ['', 'result'=>'', 'fieldnr'=>'int'],
'maxdb_result::fetch_fields' => ['', 'result'=>''],
'maxdb_result::fetch_object' => ['object', 'result'=>'object'],
'maxdb_result::fetch_row' => ['', 'result'=>''],
'maxdb_result::field_count' => ['int', 'result'=>''],
'maxdb_result::field_seek' => ['bool', 'result'=>'', 'fieldnr'=>'int'],
'maxdb_result::free' => ['', 'result'=>''],
'maxdb_result::lengths' => ['array', 'result'=>''],
'maxdb_rollback' => ['bool', 'link'=>''],
'maxdb_rpl_parse_enabled' => ['int', 'link'=>'resource'],
'maxdb_rpl_probe' => ['bool', 'link'=>'resource'],
'maxdb_rpl_query_type' => ['int', 'link'=>''],
'maxdb_select_db' => ['bool', 'link'=>'resource', 'dbname'=>'string'],
'maxdb_send_query' => ['bool', 'link'=>'', 'query'=>'string'],
'maxdb_server_end' => ['void'],
'maxdb_server_init' => ['bool', 'server='=>'array', 'groups='=>'array'],
'maxdb_sqlstate' => ['string', 'link'=>'resource'],
'maxdb_ssl_set' => ['bool', 'link'=>'', 'key'=>'string', 'cert'=>'string', 'ca'=>'string', 'capath'=>'string', 'cipher'=>'string'],
'maxdb_stat' => ['string', 'link'=>''],
'maxdb_stmt::affected_rows' => ['int', 'stmt'=>''],
'maxdb_stmt::bind_param' => ['bool', 'stmt'=>'', 'types'=>'string', '&...rw_var'=>''],
'maxdb_stmt::bind_param\'1' => ['bool', 'stmt'=>'', 'types'=>'string', '&rw_var'=>'array'],
'maxdb_stmt::bind_result' => ['bool', 'stmt'=>'', '&w_var1'=>'', '&...w_vars='=>''],
'maxdb_stmt::close' => ['bool', 'stmt'=>''],
'maxdb_stmt::close_long_data' => ['bool', 'stmt'=>'', 'param_nr'=>'int'],
'maxdb_stmt::data_seek' => ['bool', 'statement'=>'', 'offset'=>'int'],
'maxdb_stmt::errno' => ['int', 'stmt'=>''],
'maxdb_stmt::error' => ['string', 'stmt'=>''],
'maxdb_stmt::execute' => ['bool', 'stmt'=>''],
'maxdb_stmt::fetch' => ['bool', 'stmt'=>''],
'maxdb_stmt::free_result' => ['', 'stmt'=>''],
'maxdb_stmt::num_rows' => ['int', 'stmt'=>''],
'maxdb_stmt::param_count' => ['int', 'stmt'=>''],
'maxdb_stmt::prepare' => ['', 'stmt'=>'', 'query'=>'string'],
'maxdb_stmt::reset' => ['bool', 'stmt'=>''],
'maxdb_stmt::result_metadata' => ['resource', 'stmt'=>''],
'maxdb_stmt::send_long_data' => ['bool', 'stmt'=>'', 'param_nr'=>'int', 'data'=>'string'],
'maxdb_stmt::stmt_send_long_data' => ['bool', 'param_nr'=>'int', 'data'=>'string'],
'maxdb_stmt::store_result' => ['bool'],
'maxdb_stmt_affected_rows' => ['int', 'stmt'=>'resource'],
'maxdb_stmt_bind_param' => ['bool', 'stmt'=>'', 'types'=>'string', 'var1'=>'', '...args='=>'', 'var='=>'array'],
'maxdb_stmt_bind_result' => ['bool', 'stmt'=>'', '&w_var1'=>'', '&...w_vars='=>''],
'maxdb_stmt_close' => ['bool', 'stmt'=>''],
'maxdb_stmt_close_long_data' => ['bool', 'stmt'=>'', 'param_nr'=>'int'],
'maxdb_stmt_data_seek' => ['bool', 'statement'=>'', 'offset'=>'int'],
'maxdb_stmt_errno' => ['int', 'stmt'=>'resource'],
'maxdb_stmt_error' => ['string', 'stmt'=>'resource'],
'maxdb_stmt_execute' => ['bool', 'stmt'=>''],
'maxdb_stmt_fetch' => ['bool', 'stmt'=>''],
'maxdb_stmt_free_result' => ['', 'stmt'=>''],
'maxdb_stmt_init' => ['object', 'link'=>''],
'maxdb_stmt_num_rows' => ['int', 'stmt'=>'resource'],
'maxdb_stmt_param_count' => ['int', 'stmt'=>'resource'],
'maxdb_stmt_prepare' => ['', 'stmt'=>'', 'query'=>'string'],
'maxdb_stmt_reset' => ['bool', 'stmt'=>''],
'maxdb_stmt_result_metadata' => ['resource', 'stmt'=>''],
'maxdb_stmt_send_long_data' => ['bool', 'stmt'=>'', 'param_nr'=>'int', 'data'=>'string'],
'maxdb_stmt_sqlstate' => ['string', 'stmt'=>'resource'],
'maxdb_stmt_store_result' => ['bool', 'stmt'=>''],
'maxdb_store_result' => ['bool', 'link'=>''],
'maxdb_thread_id' => ['int', 'link'=>'resource'],
'maxdb_thread_safe' => ['bool'],
'maxdb_use_result' => ['resource', 'link'=>''],
'maxdb_warning_count' => ['int', 'link'=>'resource'],
'mb_check_encoding' => ['bool', 'var='=>'string|array<string>', 'encoding='=>'string'],
'mb_chr' => ['string|false', 'cp'=>'int', 'encoding='=>'string'],
'mb_convert_case' => ['string', 'sourcestring'=>'string', 'mode'=>'int', 'encoding='=>'string'],
'mb_convert_encoding' => ['string|array<int, string>|false', 'val'=>'string|array<int, string>', 'to_encoding'=>'string', 'from_encoding='=>'mixed'],
'mb_convert_kana' => ['string', 'str'=>'string', 'option='=>'string', 'encoding='=>'string'],
'mb_convert_variables' => ['string|false', 'to_encoding'=>'string', 'from_encoding'=>'array|string', '&rw_vars'=>'string|array|object', '&...rw_vars='=>'string|array|object'],
'mb_decode_mimeheader' => ['string', 'string'=>'string'],
'mb_decode_numericentity' => ['string', 'string'=>'string', 'convmap'=>'array', 'encoding'=>'string'],
'mb_detect_encoding' => ['string|false', 'str'=>'string', 'encoding_list='=>'mixed', 'strict='=>'bool'],
'mb_detect_order' => ['bool|list<string>', 'encoding_list='=>'mixed'],
'mb_encode_mimeheader' => ['string', 'str'=>'string', 'charset='=>'string', 'transfer_encoding='=>'string', 'linefeed='=>'string', 'indent='=>'int'],
'mb_encode_numericentity' => ['string', 'string'=>'string', 'convmap'=>'array', 'encoding='=>'string', 'is_hex='=>'bool'],
'mb_encoding_aliases' => ['list<string>|false', 'encoding'=>'string'],
'mb_ereg' => ['int|false', 'pattern'=>'string', 'string'=>'string', '&w_registers='=>'array'],
'mb_ereg_match' => ['bool', 'pattern'=>'string', 'string'=>'string', 'option='=>'string'],
'mb_ereg_replace' => ['string|false|null', 'pattern'=>'string', 'replacement'=>'string', 'string'=>'string', 'option='=>'string'],
'mb_ereg_replace_callback' => ['string|false|null', 'pattern'=>'string', 'callback'=>'callable(array<int|string, string>):string', 'string'=>'string', 'option='=>'string'],
'mb_ereg_search' => ['bool', 'pattern='=>'string', 'option='=>'string'],
'mb_ereg_search_getpos' => ['int'],
'mb_ereg_search_getregs' => ['array|false'],
'mb_ereg_search_init' => ['bool', 'string'=>'string', 'pattern='=>'string', 'option='=>'string'],
'mb_ereg_search_pos' => ['array|false', 'pattern='=>'string', 'option='=>'string'],
'mb_ereg_search_regs' => ['array|false', 'pattern='=>'string', 'option='=>'string'],
'mb_ereg_search_setpos' => ['bool', 'position'=>'int'],
'mb_eregi' => ['int', 'pattern'=>'string', 'string'=>'string', '&w_registers='=>'array'],
'mb_eregi_replace' => ['string|false', 'pattern'=>'string', 'replacement'=>'string', 'string'=>'string', 'option='=>'string'],
'mb_get_info' => ['mixed', 'type='=>'string'],
'mb_http_input' => ['mixed', 'type='=>'string'],
'mb_http_output' => ['string|bool', 'encoding='=>'string'],
'mb_internal_encoding' => ['string|bool', 'encoding='=>'string'],
'mb_language' => ['string|bool', 'language='=>'string'],
'mb_list_encodings' => ['list<string>'],
'mb_ord' => ['int|false', 'str'=>'string', 'enc='=>'string'],
'mb_output_handler' => ['string', 'contents'=>'string', 'status'=>'int'],
'mb_parse_str' => ['bool', 'encoded_string'=>'string', '&w_result='=>'array'],
'mb_preferred_mime_name' => ['string|false', 'encoding'=>'string'],
'mb_regex_encoding' => ['string|bool', 'encoding='=>'string'],
'mb_regex_set_options' => ['string', 'options='=>'string'],
'mb_scrub' => ['string', 'str'=>'string', 'enc='=>'string'],
'mb_send_mail' => ['bool', 'to'=>'string', 'subject'=>'string', 'message'=>'string', 'additional_headers='=>'string|array|null', 'additional_parameter='=>'string'],
'mb_split' => ['list<string>|false', 'pattern'=>'string', 'string'=>'string', 'limit='=>'int'],
'mb_strcut' => ['string', 'str'=>'string', 'start'=>'int', 'length='=>'?int', 'encoding='=>'string'],
'mb_strimwidth' => ['string', 'str'=>'string', 'start'=>'int', 'width'=>'int', 'trimmarker='=>'string', 'encoding='=>'string'],
'mb_stripos' => ['0|positive-int|false', 'haystack'=>'string', 'needle'=>'string', 'offset='=>'int', 'encoding='=>'string'],
'mb_stristr' => ['string|false', 'haystack'=>'string', 'needle'=>'string', 'part='=>'bool', 'encoding='=>'string'],
'mb_strlen' => ['0|positive-int|false', 'str'=>'string', 'encoding='=>'string'],
'mb_strpos' => ['0|positive-int|false', 'haystack'=>'string', 'needle'=>'string', 'offset='=>'int', 'encoding='=>'string'],
'mb_strrchr' => ['string|false', 'haystack'=>'string', 'needle'=>'string', 'part='=>'bool', 'encoding='=>'string'],
'mb_strrichr' => ['string|false', 'haystack'=>'string', 'needle'=>'string', 'part='=>'bool', 'encoding='=>'string'],
'mb_strripos' => ['0|positive-int|false', 'haystack'=>'string', 'needle'=>'string', 'offset='=>'int', 'encoding='=>'string'],
'mb_strrpos' => ['0|positive-int|false', 'haystack'=>'string', 'needle'=>'string', 'offset='=>'int', 'encoding='=>'string'],
'mb_strstr' => ['string|false', 'haystack'=>'string', 'needle'=>'string', 'part='=>'bool', 'encoding='=>'string'],
'mb_strtolower' => ['string', 'str'=>'string', 'encoding='=>'string'],
'mb_strtoupper' => ['string', 'str'=>'string', 'encoding='=>'string'],
'mb_strwidth' => ['0|positive-int', 'str'=>'string', 'encoding='=>'string'],
'mb_substitute_character' => ['mixed', 'substchar='=>'mixed'],
'mb_substr' => ['string', 'str'=>'string', 'start'=>'int', 'length='=>'?int', 'encoding='=>'string'],
'mb_substr_count' => ['0|positive-int', 'haystack'=>'string', 'needle'=>'string', 'encoding='=>'string'],
'mcrypt_cbc' => ['string', 'cipher'=>'string', 'key'=>'string', 'data'=>'string', 'mode'=>'int', 'iv='=>'string'],
'mcrypt_cfb' => ['string', 'cipher'=>'string', 'key'=>'string', 'data'=>'string', 'mode'=>'int', 'iv='=>'string'],
'mcrypt_create_iv' => ['string', 'size'=>'int', 'source='=>'int'],
'mcrypt_decrypt' => ['string', 'cipher'=>'string', 'key'=>'string', 'data'=>'string', 'mode'=>'string', 'iv='=>'string'],
'mcrypt_ecb' => ['string', 'cipher'=>'string', 'key'=>'string', 'data'=>'string', 'mode'=>'int', 'iv='=>'string'],
'mcrypt_enc_get_algorithms_name' => ['string', 'td'=>'resource'],
'mcrypt_enc_get_block_size' => ['int', 'td'=>'resource'],
'mcrypt_enc_get_iv_size' => ['int', 'td'=>'resource'],
'mcrypt_enc_get_key_size' => ['int', 'td'=>'resource'],
'mcrypt_enc_get_modes_name' => ['string', 'td'=>'resource'],
'mcrypt_enc_get_supported_key_sizes' => ['array', 'td'=>'resource'],
'mcrypt_enc_is_block_algorithm' => ['bool', 'td'=>'resource'],
'mcrypt_enc_is_block_algorithm_mode' => ['bool', 'td'=>'resource'],
'mcrypt_enc_is_block_mode' => ['bool', 'td'=>'resource'],
'mcrypt_enc_self_test' => ['int', 'td'=>'resource'],
'mcrypt_encrypt' => ['string', 'cipher'=>'string', 'key'=>'string', 'data'=>'string', 'mode'=>'string', 'iv='=>'string'],
'mcrypt_generic' => ['string', 'td'=>'resource', 'data'=>'string'],
'mcrypt_generic_deinit' => ['bool', 'td'=>'resource'],
'mcrypt_generic_end' => ['bool', 'td'=>'resource'],
'mcrypt_generic_init' => ['int', 'td'=>'resource', 'key'=>'string', 'iv'=>'string'],
'mcrypt_get_block_size' => ['int', 'cipher'=>'string', 'module'=>'string'],
'mcrypt_get_cipher_name' => ['string', 'cipher'=>'int|string'],
'mcrypt_get_iv_size' => ['int', 'cipher'=>'string', 'module'=>'string'],
'mcrypt_get_key_size' => ['int', 'cipher'=>'string', 'module'=>'string'],
'mcrypt_list_algorithms' => ['array', 'lib_dir='=>'string'],
'mcrypt_list_modes' => ['array', 'lib_dir='=>'string'],
'mcrypt_module_close' => ['bool', 'td'=>'resource'],
'mcrypt_module_get_algo_block_size' => ['int', 'algorithm'=>'string', 'lib_dir='=>'string'],
'mcrypt_module_get_algo_key_size' => ['int', 'algorithm'=>'string', 'lib_dir='=>'string'],
'mcrypt_module_get_supported_key_sizes' => ['array', 'algorithm'=>'string', 'lib_dir='=>'string'],
'mcrypt_module_is_block_algorithm' => ['bool', 'algorithm'=>'string', 'lib_dir='=>'string'],
'mcrypt_module_is_block_algorithm_mode' => ['bool', 'mode'=>'string', 'lib_dir='=>'string'],
'mcrypt_module_is_block_mode' => ['bool', 'mode'=>'string', 'lib_dir='=>'string'],
'mcrypt_module_open' => ['resource|false', 'cipher'=>'string', 'cipher_directory'=>'string', 'mode'=>'string', 'mode_directory'=>'string'],
'mcrypt_module_self_test' => ['bool', 'algorithm'=>'string', 'lib_dir='=>'string'],
'mcrypt_ofb' => ['string', 'cipher'=>'string', 'key'=>'string', 'data'=>'string', 'mode'=>'int', 'iv='=>'string'],
'md5' => ['non-empty-string', 'str'=>'string', 'raw_output='=>'bool'],
'md5_file' => ['non-empty-string|false', 'filename'=>'string', 'raw_output='=>'bool'],
'mdecrypt_generic' => ['string', 'td'=>'resource', 'data'=>'string'],
'Memcache::add' => ['bool', 'key'=>'string', 'var'=>'mixed', 'flag='=>'int', 'expire='=>'int'],
'Memcache::addServer' => ['bool', 'host'=>'string', 'port='=>'int', 'persistent='=>'bool', 'weight='=>'int', 'timeout='=>'int', 'retry_interval='=>'int', 'status='=>'bool', 'failure_callback='=>'callable', 'timeoutms='=>'int'],
'Memcache::close' => ['bool'],
'Memcache::connect' => ['bool', 'host'=>'string', 'port='=>'int', 'timeout='=>'int'],
'Memcache::decrement' => ['int', 'key'=>'string', 'value='=>'int'],
'Memcache::delete' => ['bool', 'key'=>'string', 'timeout='=>'int'],
'Memcache::flush' => ['bool'],
'Memcache::get' => ['mixed', 'key'=>'string', '&flags='=>'int'],
'Memcache::get\'1' => ['mixed[]|false', 'keys'=>'string[]', '&flags='=>'int[]'],
'Memcache::getExtendedStats' => ['array', 'type='=>'string', 'slabid='=>'int', 'limit='=>'int'],
'Memcache::getServerStatus' => ['int', 'host'=>'string', 'port='=>'int'],
'Memcache::getStats' => ['array', 'type='=>'string', 'slabid='=>'int', 'limit='=>'int'],
'Memcache::getVersion' => ['string'],
'Memcache::increment' => ['int', 'key'=>'string', 'value='=>'int'],
'Memcache::pconnect' => ['bool', 'host'=>'string', 'port='=>'int', 'timeout='=>'int'],
'Memcache::replace' => ['bool', 'key'=>'string', 'var'=>'mixed', 'flag='=>'int', 'expire='=>'int'],
'Memcache::set' => ['bool', 'key'=>'string', 'var'=>'mixed', 'flag='=>'int', 'expire='=>'int'],
'Memcache::setCompressThreshold' => ['bool', 'threshold'=>'int', 'min_savings='=>'float'],
'Memcache::setServerParams' => ['bool', 'host'=>'string', 'port='=>'int', 'timeout='=>'int', 'retry_interval='=>'int', 'status='=>'bool', 'failure_callback='=>'callable'],
'memcache_debug' => ['bool', 'on_off'=>'bool'],
'Memcached::add' => ['bool', 'key'=>'string', 'value'=>'mixed', 'expiration='=>'int'],
'Memcached::addByKey' => ['bool', 'server_key'=>'string', 'key'=>'string', 'value'=>'mixed', 'expiration='=>'int'],
'Memcached::addServer' => ['bool', 'host'=>'string', 'port'=>'int', 'weight='=>'int'],
'Memcached::addServers' => ['bool', 'servers'=>'array'],
'Memcached::append' => ['bool', 'key'=>'string', 'value'=>'string'],
'Memcached::appendByKey' => ['bool', 'server_key'=>'string', 'key'=>'string', 'value'=>'string'],
'Memcached::cas' => ['bool', 'cas_token'=>'float', 'key'=>'string', 'value'=>'mixed', 'expiration='=>'int'],
'Memcached::casByKey' => ['bool', 'cas_token'=>'float', 'server_key'=>'string', 'key'=>'string', 'value'=>'mixed', 'expiration='=>'int'],
'Memcached::decrement' => ['int|false', 'key'=>'string', 'offset='=>'int', 'initial_value='=>'int', 'expiry='=>'int'],
'Memcached::decrementByKey' => ['int|false', 'server_key'=>'string', 'key'=>'string', 'offset='=>'int', 'initial_value='=>'int', 'expiry='=>'int'],
'Memcached::delete' => ['bool', 'key'=>'string', 'time='=>'int'],
'Memcached::deleteByKey' => ['bool', 'server_key'=>'string', 'key'=>'string', 'time='=>'int'],
'Memcached::deleteMulti' => ['array', 'keys'=>'array', 'time='=>'int'],
'Memcached::deleteMultiByKey' => ['bool', 'server_key'=>'string', 'keys'=>'array', 'time='=>'int'],
'Memcached::fetch' => ['array'],
'Memcached::fetchAll' => ['array'],
'Memcached::flush' => ['bool', 'delay='=>'int'],
'Memcached::get' => ['mixed', 'key'=>'string', 'cache_cb='=>'?callable', 'flags='=>'int'],
'Memcached::getAllKeys' => ['array|false'],
'Memcached::getByKey' => ['mixed', 'server_key'=>'string', 'key'=>'string', 'value_cb='=>'?callable', 'flags='=>'int'],
'Memcached::getDelayed' => ['bool', 'keys'=>'array', 'with_cas='=>'bool', 'value_cb='=>'callable'],
'Memcached::getDelayedByKey' => ['bool', 'server_key'=>'string', 'keys'=>'array', 'with_cas='=>'bool', 'value_cb='=>'?callable'],
'Memcached::getMulti' => ['array|false', 'keys'=>'array', 'flags='=>'int'],
'Memcached::getMultiByKey' => ['array', 'server_key'=>'string', 'keys'=>'array', 'flags='=>'int'],
'Memcached::getOption' => ['mixed', 'option'=>'int'],
'Memcached::getResultCode' => ['int'],
'Memcached::getResultMessage' => ['string'],
'Memcached::getServerByKey' => ['array', 'server_key'=>'string'],
'Memcached::getServerList' => ['array'],
'Memcached::getStats' => ['array', 'type='=>'?string'],
'Memcached::getVersion' => ['array'],
'Memcached::increment' => ['int|false', 'key'=>'string', 'offset='=>'int', 'initial_value='=>'int', 'expiry='=>'int'],
'Memcached::incrementByKey' => ['int|false', 'server_key'=>'string', 'key'=>'string', 'offset='=>'int', 'initial_value='=>'int', 'expiry='=>'int'],
'Memcached::isPersistent' => ['bool'],
'Memcached::isPristine' => ['bool'],
'Memcached::prepend' => ['bool', 'key'=>'string', 'value'=>'string'],
'Memcached::prependByKey' => ['bool', 'server_key'=>'string', 'key'=>'string', 'value'=>'string'],
'Memcached::quit' => ['bool'],
'Memcached::replace' => ['bool', 'key'=>'string', 'value'=>'mixed', 'expiration='=>'int'],
'Memcached::replaceByKey' => ['bool', 'server_key'=>'string', 'key'=>'string', 'value'=>'mixed', 'expiration='=>'int'],
'Memcached::resetServerList' => ['bool'],
'Memcached::set' => ['bool', 'key'=>'string', 'value'=>'mixed', 'expiration='=>'int'],
'Memcached::setByKey' => ['bool', 'server_key'=>'string', 'key'=>'string', 'value'=>'mixed', 'expiration='=>'int'],
'Memcached::setMulti' => ['bool', 'items'=>'array', 'expiration='=>'int'],
'Memcached::setMultiByKey' => ['bool', 'server_key'=>'string', 'items'=>'array', 'expiration='=>'int'],
'Memcached::setOption' => ['bool', 'option'=>'int', 'value'=>'mixed'],
'Memcached::setOptions' => ['bool', 'options'=>'array'],
'Memcached::setSaslAuthData' => ['void', 'username'=>'string', 'password'=>'string'],
'Memcached::touch' => ['bool', 'key'=>'string', 'expiration'=>'int'],
'Memcached::touchByKey' => ['bool', 'server_key'=>'string', 'key'=>'string', 'expiration'=>'int'],
'MemcachePool::add' => ['bool', 'key'=>'string', 'var'=>'mixed', 'flag='=>'int', 'expire='=>'int'],
'MemcachePool::close' => ['bool'],
'MemcachePool::decrement' => ['int', 'key'=>'string', 'value='=>'int'],
'MemcachePool::delete' => ['bool', 'key'=>'string', 'timeout='=>'int'],
'MemcachePool::flush' => ['bool'],
'MemcachePool::get' => ['mixed', 'key'=>'string', '&flags='=>'int'],
'MemcachePool::get\'1' => ['mixed[]|false', 'keys'=>'string[]', '&flags='=>'int[]'],
'MemcachePool::getExtendedStats' => ['array', 'type='=>'string', 'slabid='=>'int', 'limit='=>'int'],
'MemcachePool::getServerStatus' => ['int', 'host'=>'string', 'port='=>'int'],
'MemcachePool::getStats' => ['array', 'type='=>'string', 'slabid='=>'int', 'limit='=>'int'],
'MemcachePool::getVersion' => ['string'],
'MemcachePool::increment' => ['int', 'key'=>'string', 'value='=>'int'],
'MemcachePool::replace' => ['bool', 'key'=>'string', 'var'=>'mixed', 'flag='=>'int', 'expire='=>'int'],
'MemcachePool::set' => ['bool', 'key'=>'string', 'var'=>'mixed', 'flag='=>'int', 'expire='=>'int'],
'MemcachePool::setCompressThreshold' => ['bool', 'threshold'=>'int', 'min_savings='=>'float'],
'MemcachePool::setServerParams' => ['bool', 'host'=>'string', 'port='=>'int', 'timeout='=>'int', 'retry_interval='=>'int', 'status='=>'bool', 'failure_callback='=>'callable'],
'memory_get_peak_usage' => ['int', 'real_usage='=>'bool'],
'memory_get_usage' => ['int', 'real_usage='=>'bool'],
'MessageFormatter::__construct' => ['void', 'locale'=>'string', 'pattern'=>'string'],
'MessageFormatter::create' => ['MessageFormatter', 'locale'=>'string', 'pattern'=>'string'],
'MessageFormatter::format' => ['false|string', 'args'=>'array'],
'MessageFormatter::formatMessage' => ['false|string', 'locale'=>'string', 'pattern'=>'string', 'args'=>'array'],
'MessageFormatter::getErrorCode' => ['int'],
'MessageFormatter::getErrorMessage' => ['string'],
'MessageFormatter::getLocale' => ['string'],
'MessageFormatter::getPattern' => ['string'],
'MessageFormatter::parse' => ['array', 'value'=>'string'],
'MessageFormatter::parseMessage' => ['array', 'locale'=>'string', 'pattern'=>'string', 'source'=>'string'],
'MessageFormatter::setPattern' => ['bool', 'pattern'=>'string'],
'metaphone' => ['string', 'text'=>'string', 'phones='=>'int'],
'method_exists' => ['bool', 'object'=>'object|string', 'method'=>'string'],
'mhash' => ['string|false', 'hash'=>'int', 'data'=>'string', 'key='=>'string'],
'mhash_count' => ['int'],
'mhash_get_block_size' => ['int|false', 'hash'=>'int'],
'mhash_get_hash_name' => ['string|false', 'hash'=>'int'],
'mhash_keygen_s2k' => ['string|false', 'hash'=>'int', 'input_password'=>'string', 'salt'=>'string', 'bytes'=>'int'],
'microtime' => ['mixed', 'get_as_float='=>'bool'],
'mime_content_type' => ['string|false', 'filename_or_stream'=>'string|resource'],
'min' => ['', '...arg1'=>'array'],
'min\'1' => ['', 'arg1'=>'', 'arg2'=>'', '...args='=>''],
'ming_keypress' => ['int', 'char'=>'string'],
'ming_setcubicthreshold' => ['void', 'threshold'=>'int'],
'ming_setscale' => ['void', 'scale'=>'float'],
'ming_setswfcompression' => ['void', 'level'=>'int'],
'ming_useconstants' => ['void', 'use'=>'int'],
'ming_useswfversion' => ['void', 'version'=>'int'],
'mkdir' => ['bool', 'pathname'=>'string', 'mode='=>'int', 'recursive='=>'bool', 'context='=>'resource'],
'mktime' => ['int|false', 'hour='=>'int', 'min='=>'int', 'sec='=>'int', 'mon='=>'int', 'day='=>'int', 'year='=>'int'],
'money_format' => ['string', 'format'=>'string', 'value'=>'float'],
'Mongo::__construct' => ['void', 'server='=>'string', 'options='=>'array', 'driver_options='=>'array'],
'Mongo::__get' => ['MongoDB', 'dbname'=>'string'],
'Mongo::__toString' => ['string'],
'Mongo::close' => ['bool'],
'Mongo::connect' => ['bool'],
'Mongo::connectUtil' => ['bool'],
'Mongo::dropDB' => ['array', 'db'=>''],
'Mongo::forceError' => ['bool'],
'Mongo::getConnections' => ['array'],
'Mongo::getHosts' => ['array'],
'Mongo::getPoolSize' => ['int'],
'Mongo::getReadPreference' => ['array'],
'Mongo::getSlave' => ['string'],
'Mongo::getSlaveOkay' => ['bool'],
'Mongo::getWriteConcern' => ['array'],
'Mongo::killCursor' => ['', 'server_hash'=>'string', 'id'=>'MongoInt64|int'],
'Mongo::lastError' => ['array|null'],
'Mongo::listDBs' => ['array'],
'Mongo::pairConnect' => ['bool'],
'Mongo::pairPersistConnect' => ['bool', 'username='=>'string', 'password='=>'string'],
'Mongo::persistConnect' => ['bool', 'username='=>'string', 'password='=>'string'],
'Mongo::poolDebug' => ['array'],
'Mongo::prevError' => ['array'],
'Mongo::resetError' => ['array'],
'Mongo::selectCollection' => ['MongoCollection', 'db'=>'string', 'collection'=>'string'],
'Mongo::selectDB' => ['MongoDB', 'name'=>'string'],
'Mongo::setPoolSize' => ['bool', 'size'=>'int'],
'Mongo::setReadPreference' => ['bool', 'readPreference'=>'string', 'tags='=>'array'],
'Mongo::setSlaveOkay' => ['bool', 'ok='=>'bool'],
'Mongo::switchSlave' => ['string'],
'MongoBinData::__construct' => ['void', 'data'=>'string', 'type='=>'int'],
'MongoBinData::__toString' => ['string'],
'MongoClient::__construct' => ['void', 'server='=>'string', 'options='=>'array', 'driver_options='=>'array'],
'MongoClient::__get' => ['MongoDB', 'dbname'=>'string'],
'MongoClient::__toString' => ['string'],
'MongoClient::close' => ['bool', 'connection='=>'bool|string'],
'MongoClient::connect' => ['bool'],
'MongoClient::dropDB' => ['array', 'db'=>'mixed'],
'MongoClient::getConnections' => ['array'],
'MongoClient::getHosts' => ['array'],
'MongoClient::getReadPreference' => ['array'],
'MongoClient::getWriteConcern' => ['array'],
'MongoClient::killCursor' => ['bool', 'server_hash'=>'string', 'id'=>'int|MongoInt64'],
'MongoClient::listDBs' => ['array'],
'MongoClient::selectCollection' => ['MongoCollection', 'db'=>'string', 'collection'=>'string'],
'MongoClient::selectDB' => ['MongoDB', 'name'=>'string'],
'MongoClient::setReadPreference' => ['bool', 'read_preference'=>'string', 'tags='=>'array'],
'MongoClient::setWriteConcern' => ['bool', 'w'=>'mixed', 'wtimeout='=>'int'],
'MongoClient::switchSlave' => ['string'],
'MongoCode::__construct' => ['void', 'code'=>'string', 'scope='=>'array'],
'MongoCode::__toString' => ['string'],
'MongoCollection::__construct' => ['void', 'db'=>'MongoDB', 'name'=>'string'],
'MongoCollection::__get' => ['MongoCollection', 'name'=>'string'],
'MongoCollection::__toString' => ['string'],
'MongoCollection::aggregate' => ['array', 'op'=>'array', 'op='=>'array', '...args='=>'array'],
'MongoCollection::aggregate\'1' => ['array', 'pipeline'=>'array', 'options='=>'array'],
'MongoCollection::aggregateCursor' => ['MongoCommandCursor', 'command'=>'array', 'options='=>'array'],
'MongoCollection::batchInsert' => ['mixed', 'a'=>'array', 'options='=>'array'],
'MongoCollection::count' => ['0|positive-int', 'query='=>'array', 'limit='=>'int', 'skip='=>'int'],
'MongoCollection::createDBRef' => ['array', 'a'=>'array'],
'MongoCollection::createIndex' => ['bool', 'keys'=>'array', 'options='=>'array'],
'MongoCollection::deleteIndex' => ['array', 'keys'=>'string|array'],
'MongoCollection::deleteIndexes' => ['array'],
'MongoCollection::distinct' => ['array', 'key'=>'string', 'query='=>'array'],
'MongoCollection::drop' => ['array'],
'MongoCollection::ensureIndex' => ['bool', 'keys'=>'array', 'options='=>'array'],
'MongoCollection::find' => ['MongoCursor', 'query='=>'array', 'fields='=>'array'],
'MongoCollection::findAndModify' => ['array', 'query'=>'array', 'update='=>'array', 'fields='=>'array', 'options='=>'array'],
'MongoCollection::findOne' => ['array', 'query='=>'array', 'fields='=>'array'],
'MongoCollection::getDBRef' => ['array', 'ref'=>'array'],
'MongoCollection::getIndexInfo' => ['array'],
'MongoCollection::getName' => ['string'],
'MongoCollection::getReadPreference' => ['array'],
'MongoCollection::getSlaveOkay' => ['bool'],
'MongoCollection::getWriteConcern' => ['array'],
'MongoCollection::group' => ['array', 'keys'=>'mixed', 'initial'=>'array', 'reduce'=>'mongocode', 'options='=>'array'],
'MongoCollection::insert' => ['bool|array', 'a'=>'array', 'options='=>'array'],
'MongoCollection::parallelCollectionScan' => ['MongoCommandCursor[]', 'num_cursors'=>'int'],
'MongoCollection::remove' => ['bool|array', 'criteria='=>'array', 'options='=>'array'],
'MongoCollection::save' => ['mixed', 'a'=>'array', 'options='=>'array'],
'MongoCollection::setReadPreference' => ['bool', 'read_preference'=>'string', 'tags='=>'array'],
'MongoCollection::setSlaveOkay' => ['bool', 'ok='=>'bool'],
'MongoCollection::setWriteConcern' => ['bool', 'w'=>'mixed', 'wtimeout='=>'int'],
'MongoCollection::toIndexString' => ['string', 'keys'=>'mixed'],
'MongoCollection::update' => ['bool', 'criteria'=>'array', 'newobj'=>'array', 'options='=>'array'],
'MongoCollection::validate' => ['array', 'scan_data='=>'bool'],
'MongoCommandCursor::__construct' => ['void', 'connection'=>'MongoClient', 'ns'=>'string', 'command'=>'array'],
'MongoCommandCursor::batchSize' => ['MongoCommandCursor', 'batchSize'=>'int'],
'MongoCommandCursor::createFromDocument' => ['MongoCommandCursor', 'connection'=>'MongoClient', 'hash'=>'string', 'document'=>'array'],
'MongoCommandCursor::current' => ['array'],
'MongoCommandCursor::dead' => ['bool'],
'MongoCommandCursor::getReadPreference' => ['array'],
'MongoCommandCursor::info' => ['array'],
'MongoCommandCursor::key' => ['int'],
'MongoCommandCursor::next' => ['void'],
'MongoCommandCursor::rewind' => ['array'],
'MongoCommandCursor::setReadPreference' => ['MongoCommandCursor', 'read_preference'=>'string', 'tags='=>'array'],
'MongoCommandCursor::timeout' => ['MongoCommandCursor', 'ms'=>'int'],
'MongoCommandCursor::valid' => ['bool'],
'MongoCursor::__construct' => ['void', 'connection'=>'MongoClient', 'ns'=>'string', 'query='=>'array', 'fields='=>'array'],
'MongoCursor::addOption' => ['MongoCursor', 'key'=>'string', 'value'=>'mixed'],
'MongoCursor::awaitData' => ['MongoCursor', 'wait='=>'bool'],
'MongoCursor::batchSize' => ['MongoCursor', 'num'=>'int'],
'MongoCursor::count' => ['0|positive-int', 'foundonly='=>'bool'],
'MongoCursor::current' => ['array'],
'MongoCursor::dead' => ['bool'],
'MongoCursor::doQuery' => ['void'],
'MongoCursor::explain' => ['array'],
'MongoCursor::fields' => ['MongoCursor', 'f'=>'array'],
'MongoCursor::getNext' => ['array'],
'MongoCursor::getReadPreference' => ['array'],
'MongoCursor::hasNext' => ['bool'],
'MongoCursor::hint' => ['MongoCursor', 'key_pattern'=>'array'],
'MongoCursor::immortal' => ['MongoCursor', 'liveforever='=>'bool'],
'MongoCursor::info' => ['array'],
'MongoCursor::key' => ['string'],
'MongoCursor::limit' => ['MongoCursor', 'num'=>'int'],
'MongoCursor::maxTimeMS' => ['MongoCursor', 'ms'=>'int'],
'MongoCursor::next' => ['array'],
'MongoCursor::partial' => ['MongoCursor', 'okay='=>'bool'],
'MongoCursor::reset' => ['void'],
'MongoCursor::rewind' => ['void'],
'MongoCursor::setFlag' => ['MongoCursor', 'flag'=>'int', 'set='=>'bool'],
'MongoCursor::setReadPreference' => ['MongoCursor', 'read_preference'=>'string', 'tags='=>'array'],
'MongoCursor::skip' => ['MongoCursor', 'num'=>'int'],
'MongoCursor::slaveOkay' => ['MongoCursor', 'okay='=>'bool'],
'MongoCursor::snapshot' => ['MongoCursor'],
'MongoCursor::sort' => ['MongoCursor', 'fields'=>'array'],
'MongoCursor::tailable' => ['MongoCursor', 'tail='=>'bool'],
'MongoCursor::timeout' => ['MongoCursor', 'ms'=>'int'],
'MongoCursor::valid' => ['bool'],
'MongoCursorException::__clone' => ['void'],
'MongoCursorException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Exception)|(?Throwable)'],
'MongoCursorException::__toString' => ['string'],
'MongoCursorException::__wakeup' => ['void'],
'MongoCursorException::getCode' => ['int'],
'MongoCursorException::getFile' => ['string'],
'MongoCursorException::getHost' => ['string'],
'MongoCursorException::getLine' => ['int'],
'MongoCursorException::getMessage' => ['string'],
'MongoCursorException::getPrevious' => ['Exception|Throwable'],
'MongoCursorException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'MongoCursorException::getTraceAsString' => ['string'],
'MongoCursorInterface::__construct' => ['void'],
'MongoCursorInterface::batchSize' => ['MongoCursorInterface', 'batchSize'=>'int'],
'MongoCursorInterface::current' => ['mixed'],
'MongoCursorInterface::dead' => ['bool'],
'MongoCursorInterface::getReadPreference' => ['array'],
'MongoCursorInterface::info' => ['array'],
'MongoCursorInterface::key' => ['int|string'],
'MongoCursorInterface::next' => ['void'],
'MongoCursorInterface::rewind' => ['void'],
'MongoCursorInterface::setReadPreference' => ['MongoCursorInterface', 'read_preference'=>'string', 'tags='=>'array'],
'MongoCursorInterface::timeout' => ['MongoCursorInterface', 'ms'=>'int'],
'MongoCursorInterface::valid' => ['bool'],
'MongoDate::__construct' => ['void', 'sec='=>'int', 'usec='=>'int'],
'MongoDate::__toString' => ['string'],
'MongoDate::toDateTime' => ['DateTime'],
'MongoDB::__construct' => ['void', 'conn'=>'MongoClient', 'name'=>'string'],
'MongoDB::__get' => ['MongoCollection', 'name'=>'string'],
'MongoDB::__toString' => ['string'],
'MongoDB::authenticate' => ['array', 'username'=>'string', 'password'=>'string'],
'MongoDB::command' => ['array', 'command'=>'array'],
'MongoDB::createCollection' => ['MongoCollection', 'name'=>'string', 'capped='=>'bool', 'size='=>'int', 'max='=>'int'],
'MongoDB::createDBRef' => ['array', 'collection'=>'string', 'a'=>''],
'MongoDB::drop' => ['array'],
'MongoDB::dropCollection' => ['array', 'coll'=>''],
'MongoDB::execute' => ['array', 'code'=>'', 'args='=>'array'],
'MongoDB::forceError' => ['bool'],
'MongoDB::getCollectionInfo' => ['array', 'options='=>'array'],
'MongoDB::getCollectionNames' => ['array', 'options='=>'array'],
'MongoDB::getDBRef' => ['array', 'ref'=>'array'],
'MongoDB::getGridFS' => ['MongoGridFS', 'prefix='=>'string'],
'MongoDB::getProfilingLevel' => ['int'],
'MongoDB::getReadPreference' => ['array'],
'MongoDB::getSlaveOkay' => ['bool'],
'MongoDB::getWriteConcern' => ['array'],
'MongoDB::lastError' => ['array'],
'MongoDB::listCollections' => ['array'],
'MongoDB::prevError' => ['array'],
'MongoDB::repair' => ['array', 'preserve_cloned_files='=>'bool', 'backup_original_files='=>'bool'],
'MongoDB::resetError' => ['array'],
'MongoDB::selectCollection' => ['MongoCollection', 'name'=>'string'],
'MongoDB::setProfilingLevel' => ['int', 'level'=>'int'],
'MongoDB::setReadPreference' => ['bool', 'read_preference'=>'string', 'tags='=>'array'],
'MongoDB::setSlaveOkay' => ['bool', 'ok='=>'bool'],
'MongoDB::setWriteConcern' => ['bool', 'w'=>'mixed', 'wtimeout='=>'int'],
'MongoDB\BSON\Binary::__construct' => ['void', 'data'=>'string', 'type'=>'int'],
'MongoDB\BSON\Binary::getData' => ['string'],
'MongoDB\BSON\Binary::getType' => ['int'],
'MongoDB\BSON\Decimal128::__construct' => ['void', 'value='=>'string'],
'MongoDB\BSON\Decimal128::__toString' => ['string'],
'MongoDB\BSON\fromJSON' => ['string', 'json'=>'string'],
'MongoDB\BSON\fromPHP' => ['string', 'value'=>'array|object'],
'MongoDB\BSON\Javascript::__construct' => ['void', 'code'=>'string', 'scope='=>'array|object'],
'MongoDB\BSON\ObjectId::__construct' => ['void', 'id='=>'string'],
'MongoDB\BSON\ObjectId::__toString' => ['string'],
'MongoDB\BSON\Regex::__construct' => ['void', 'pattern'=>'string', 'flags='=>'string'],
'MongoDB\BSON\Regex::__toString' => ['string'],
'MongoDB\BSON\Regex::getFlags' => [''],
'MongoDB\BSON\Regex::getPattern' => ['string'],
'MongoDB\BSON\Serializable::bsonSerialize' => ['array|object'],
'MongoDB\BSON\Timestamp::__construct' => ['void', 'increment'=>'int', 'timestamp'=>'int'],
'MongoDB\BSON\Timestamp::__toString' => ['string'],
'MongoDB\BSON\toJSON' => ['string', 'bson'=>'string'],
'MongoDB\BSON\toPHP' => ['object', 'bson'=>'string', 'typeMap='=>'array'],
'MongoDB\BSON\Unserializable::bsonUnserialize' => ['', 'data'=>'array'],
'MongoDB\BSON\UTCDateTime::__construct' => ['void', 'milliseconds='=>'int|DateTimeInterface'],
'MongoDB\BSON\UTCDateTime::__toString' => ['string'],
'MongoDB\BSON\UTCDateTime::toDateTime' => ['DateTime'],
'MongoDB\Driver\BulkWrite::__construct' => ['void', 'ordered='=>'bool'],
'MongoDB\Driver\BulkWrite::count' => ['0|positive-int'],
'MongoDB\Driver\BulkWrite::delete' => ['void', 'filter'=>'array|object', 'deleteOptions='=>'array'],
'MongoDB\Driver\BulkWrite::insert' => ['MongoDB\Driver\ObjectID', 'document'=>'array|object'],
'MongoDB\Driver\BulkWrite::update' => ['void', 'filter'=>'array|object', 'newObj'=>'array|object', 'updateOptions='=>'array'],
'MongoDB\Driver\Command::__construct' => ['void', 'document'=>'array|object'],
'MongoDB\Driver\Cursor::__construct' => ['void', 'server'=>'Server', 'responseDocument'=>'string'],
'MongoDB\Driver\Cursor::getId' => ['MongoDB\Driver\CursorId'],
'MongoDB\Driver\Cursor::getServer' => ['MongoDB\Driver\Server'],
'MongoDB\Driver\Cursor::isDead' => ['bool'],
'MongoDB\Driver\Cursor::setTypeMap' => ['void', 'typemap'=>'array'],
'MongoDB\Driver\Cursor::toArray' => ['array'],
'MongoDB\Driver\CursorId::__construct' => ['void', 'id'=>'string'],
'MongoDB\Driver\CursorId::__toString' => ['string'],
'MongoDB\Driver\Exception\RuntimeException::__clone' => ['void'],
'MongoDB\Driver\Exception\RuntimeException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?RuntimeException)|(?Throwable)'],
'MongoDB\Driver\Exception\RuntimeException::__toString' => ['string'],
'MongoDB\Driver\Exception\RuntimeException::__wakeup' => ['void'],
'MongoDB\Driver\Exception\RuntimeException::getCode' => ['int'],
'MongoDB\Driver\Exception\RuntimeException::getFile' => ['string'],
'MongoDB\Driver\Exception\RuntimeException::getLine' => ['int'],
'MongoDB\Driver\Exception\RuntimeException::getMessage' => ['string'],
'MongoDB\Driver\Exception\RuntimeException::getPrevious' => ['RuntimeException|Throwable'],
'MongoDB\Driver\Exception\RuntimeException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'MongoDB\Driver\Exception\RuntimeException::getTraceAsString' => ['string'],
'MongoDB\Driver\Exception\WriteException::__clone' => ['void'],
'MongoDB\Driver\Exception\WriteException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?RuntimeException)|(?Throwable)'],
'MongoDB\Driver\Exception\WriteException::__toString' => ['string'],
'MongoDB\Driver\Exception\WriteException::__wakeup' => ['void'],
'MongoDB\Driver\Exception\WriteException::getCode' => ['int'],
'MongoDB\Driver\Exception\WriteException::getFile' => ['string'],
'MongoDB\Driver\Exception\WriteException::getLine' => ['int'],
'MongoDB\Driver\Exception\WriteException::getMessage' => ['string'],
'MongoDB\Driver\Exception\WriteException::getPrevious' => ['RuntimeException|Throwable'],
'MongoDB\Driver\Exception\WriteException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'MongoDB\Driver\Exception\WriteException::getTraceAsString' => ['string'],
'MongoDB\Driver\Exception\WriteException::getWriteResult' => ['MongoDB\Driver\WriteResult'],
'MongoDB\Driver\Manager::__construct' => ['void', 'uri'=>'string', 'options='=>'array', 'driverOptions='=>'array'],
'MongoDB\Driver\Manager::executeBulkWrite' => ['MongoDB\Driver\WriteResult', 'namespace'=>'string', 'bulk'=>'MongoDB\Driver\BulkWrite', 'writeConcern='=>'MongoDB\Driver\WriteConcern'],
'MongoDB\Driver\Manager::executeCommand' => ['MongoDB\Driver\Cursor', 'db'=>'string', 'command'=>'MongoDB\Driver\Command', 'readPreference='=>'MongoDB\Driver\ReadPreference'],
'MongoDB\Driver\Manager::executeDelete' => ['MongoDB\Driver\WriteResult', 'namespace'=>'string', 'filter'=>'array|object', 'deleteOptions='=>'array', 'writeConcern='=>'MongoDB\Driver\WriteConcern'],
'MongoDB\Driver\Manager::executeInsert' => ['MongoDB\Driver\WriteResult', 'namespace'=>'string', 'document'=>'array|object', 'writeConcern='=>'MongoDB\Driver\WriteConcern'],
'MongoDB\Driver\Manager::executeQuery' => ['MongoDB\Driver\Cursor', 'namespace'=>'string', 'query'=>'MongoDB\Driver\Query', 'readPreference='=>'MongoDB\Driver\ReadPreference'],
'MongoDB\Driver\Manager::executeUpdate' => ['MongoDB\Driver\WriteResult', 'namespace'=>'string', 'filter'=>'array|object', 'newObj'=>'array|object', 'updateOptions='=>'array', 'writeConcern='=>'MongoDB\Driver\WriteConcern'],
'MongoDB\Driver\Manager::getReadConcern' => ['MongoDB\Driver\ReadConcern'],
'MongoDB\Driver\Manager::getReadPreference' => ['MongoDB\Driver\ReadPreference'],
'MongoDB\Driver\Manager::getServers' => ['array'],
'MongoDB\Driver\Manager::getWriteConcern' => ['MongoDB\Driver\WriteConcern'],
'MongoDB\Driver\Manager::selectServer' => ['MongoDB\Driver\Server', 'readPreference'=>'MongoDB\Driver\ReadPreference'],
'MongoDB\Driver\Query::__construct' => ['void', 'filter'=>'array|object', 'queryOptions='=>'array'],
'MongoDB\Driver\ReadConcern::__construct' => ['void', 'level='=>'string'],
'MongoDB\Driver\ReadConcern::bsonSerialize' => ['object'],
'MongoDB\Driver\ReadConcern::getLevel' => ['null|string'],
'MongoDB\Driver\ReadPreference::__construct' => ['void', 'mode'=>'string|int', 'tagSets='=>'array', 'options='=>'array'],
'MongoDB\Driver\ReadPreference::bsonSerialize' => ['object'],
'MongoDB\Driver\ReadPreference::getMode' => ['int'],
'MongoDB\Driver\ReadPreference::getTagSets' => ['array'],
'MongoDB\Driver\Server::__construct' => ['void', 'host'=>'string', 'port'=>'string', 'options='=>'array', 'driverOptions='=>'array'],
'MongoDB\Driver\Server::executeBulkWrite' => ['', 'namespace'=>'string', 'zwrite'=>'BulkWrite'],
'MongoDB\Driver\Server::executeCommand' => ['MongoDB\Driver\Cursor', 'db'=>'string', 'command'=>'MongoDB\Driver\Command', 'readPreference='=>'MongoDB\Driver\ReadPreference'],
'MongoDB\Driver\Server::executeQuery' => ['MongoDB\Driver\Cursor', 'namespace'=>'string', 'query'=>'MongoDB\Driver\Query', 'readPreference='=>'MongoDB\Driver\ReadPreference'],
'MongoDB\Driver\Server::getHost' => [''],
'MongoDB\Driver\Server::getInfo' => [''],
'MongoDB\Driver\Server::getLatency' => [''],
'MongoDB\Driver\Server::getPort' => [''],
'MongoDB\Driver\Server::getState' => [''],
'MongoDB\Driver\Server::getTags' => ['array'],
'MongoDB\Driver\Server::getType' => [''],
'MongoDB\Driver\Server::isArbiter' => ['bool'],
'MongoDB\Driver\Server::isDelayed' => [''],
'MongoDB\Driver\Server::isHidden' => ['bool'],
'MongoDB\Driver\Server::isPassive' => [''],
'MongoDB\Driver\Server::isPrimary' => ['bool'],
'MongoDB\Driver\Server::isSecondary' => ['bool'],
'MongoDB\Driver\WriteConcern::__construct' => ['void', 'w'=>'string|int', 'wtimeout='=>'int', 'journal='=>'bool', 'fsync='=>'bool'],
'MongoDB\Driver\WriteConcern::getJurnal' => ['bool|null'],
'MongoDB\Driver\WriteConcern::getW' => ['int|null|string'],
'MongoDB\Driver\WriteConcern::getWtimeout' => ['int'],
'MongoDB\Driver\WriteConcernError::getCode' => [''],
'MongoDB\Driver\WriteConcernError::getInfo' => [''],
'MongoDB\Driver\WriteConcernError::getMessage' => [''],
'MongoDB\Driver\WriteError::getCode' => [''],
'MongoDB\Driver\WriteError::getIndex' => [''],
'MongoDB\Driver\WriteError::getInfo' => ['mixed'],
'MongoDB\Driver\WriteError::getMessage' => [''],
'MongoDB\Driver\WriteException::getWriteResult' => [''],
'MongoDB\Driver\WriteResult::getDeletedCount' => ['int'],
'MongoDB\Driver\WriteResult::getInfo' => [''],
'MongoDB\Driver\WriteResult::getInsertedCount' => ['int'],
'MongoDB\Driver\WriteResult::getMatchedCount' => ['int'],
'MongoDB\Driver\WriteResult::getModifiedCount' => ['int'],
'MongoDB\Driver\WriteResult::getServer' => [''],
'MongoDB\Driver\WriteResult::getUpsertedCount' => ['int'],
'MongoDB\Driver\WriteResult::getUpsertedIds' => [''],
'MongoDB\Driver\WriteResult::getWriteConcernError' => [''],
'MongoDB\Driver\WriteResult::getWriteErrors' => [''],
'MongoDB\Driver\WriteResult::isAcknowledged' => ['bool'],
'MongoDBRef::create' => ['array', 'collection'=>'string', 'id'=>'mixed', 'database='=>'string'],
'MongoDBRef::get' => ['array', 'db'=>'mongodb', 'ref'=>'array'],
'MongoDBRef::isRef' => ['bool', 'ref'=>'mixed'],
'MongoDeleteBatch::__construct' => ['void', 'collection'=>'MongoCollection', 'write_options='=>'array'],
'MongoException::__clone' => ['void'],
'MongoException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Exception)|(?Throwable)'],
'MongoException::__toString' => ['string'],
'MongoException::__wakeup' => ['void'],
'MongoException::getCode' => ['int'],
'MongoException::getFile' => ['string'],
'MongoException::getLine' => ['int'],
'MongoException::getMessage' => ['string'],
'MongoException::getPrevious' => ['Exception|Throwable'],
'MongoException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'MongoException::getTraceAsString' => ['string'],
'MongoGridFS::__construct' => ['void', 'db'=>'MongoDB', 'prefix='=>'string', 'chunks='=>'mixed'],
'MongoGridFS::__get' => ['MongoCollection', 'name'=>'string'],
'MongoGridFS::__toString' => ['string'],
'MongoGridFS::aggregate' => ['array', 'pipeline'=>'array', 'op'=>'array', 'pipelineOperators'=>'array'],
'MongoGridFS::aggregateCursor' => ['MongoCommandCursor', 'pipeline'=>'array', 'options'=>'array'],
'MongoGridFS::batchInsert' => ['mixed', 'a'=>'array', 'options='=>'array'],
'MongoGridFS::count' => ['0|positive-int', 'query='=>'stdClass|array'],
'MongoGridFS::createDBRef' => ['array', 'a'=>'array'],
'MongoGridFS::createIndex' => ['array', 'keys'=>'array', 'options='=>'array'],
'MongoGridFS::delete' => ['bool', 'id'=>'mixed'],
'MongoGridFS::deleteIndex' => ['array', 'keys'=>'array|string'],
'MongoGridFS::deleteIndexes' => ['array'],
'MongoGridFS::distinct' => ['array|bool', 'key'=>'string', 'query='=>'?array'],
'MongoGridFS::drop' => ['array'],
'MongoGridFS::ensureIndex' => ['bool', 'keys'=>'array', 'options='=>'array'],
'MongoGridFS::find' => ['MongoGridFSCursor', 'query='=>'array', 'fields='=>'array'],
'MongoGridFS::findAndModify' => ['array', 'query'=>'array', 'update='=>'?array', 'fields='=>'?array', 'options='=>'?array'],
'MongoGridFS::findOne' => ['MongoGridFSFile', 'query='=>'mixed', 'fields='=>'mixed'],
'MongoGridFS::get' => ['MongoGridFSFile', 'id'=>'mixed'],
'MongoGridFS::getDBRef' => ['array', 'ref'=>'array'],
'MongoGridFS::getIndexInfo' => ['array'],
'MongoGridFS::getName' => ['string'],
'MongoGridFS::getReadPreference' => ['array'],
'MongoGridFS::getSlaveOkay' => ['bool'],
'MongoGridFS::group' => ['array', 'keys'=>'mixed', 'initial'=>'array', 'reduce'=>'MongoCode', 'condition='=>'array'],
'MongoGridFS::insert' => ['array|bool', 'a'=>'array|object', 'options='=>'array'],
'MongoGridFS::put' => ['mixed', 'filename'=>'string', 'extra='=>'array'],
'MongoGridFS::remove' => ['bool', 'criteria='=>'array', 'options='=>'array'],
'MongoGridFS::save' => ['array|bool', 'a'=>'array|object', 'options='=>'array'],
'MongoGridFS::setReadPreference' => ['bool', 'read_preference'=>'string', 'tags'=>'array'],
'MongoGridFS::setSlaveOkay' => ['bool', 'ok='=>'bool|true'],
'MongoGridFS::storeBytes' => ['mixed', 'bytes'=>'string', 'extra='=>'array', 'options='=>'array'],
'MongoGridFS::storeFile' => ['mixed', 'filename'=>'string', 'extra='=>'array', 'options='=>'array'],
'MongoGridFS::storeUpload' => ['mixed', 'name'=>'string', 'filename='=>'string'],
'MongoGridFS::toIndexString' => ['string', 'keys'=>'mixed'],
'MongoGridFS::update' => ['bool', 'criteria'=>'array', 'newobj'=>'array', 'options='=>'array'],
'MongoGridFS::validate' => ['array', 'scan_data='=>'bool|false'],
'MongoGridFSCursor::__construct' => ['void', 'gridfs'=>'MongoGridFS', 'connection'=>'resource', 'ns'=>'string', 'query'=>'array', 'fields'=>'array'],
'MongoGridFSCursor::addOption' => ['MongoCursor', 'key'=>'string', 'value'=>'mixed'],
'MongoGridFSCursor::awaitData' => ['MongoCursor', 'wait='=>'bool|true'],
'MongoGridFSCursor::batchSize' => ['MongoCursor', 'batchSize'=>'int'],
'MongoGridFSCursor::count' => ['0|positive-int', 'all='=>'bool|false'],
'MongoGridFSCursor::current' => ['MongoGridFSFile'],
'MongoGridFSCursor::dead' => ['bool'],
'MongoGridFSCursor::doQuery' => ['void'],
'MongoGridFSCursor::explain' => ['array'],
'MongoGridFSCursor::fields' => ['MongoCursor', 'f'=>'array'],
'MongoGridFSCursor::getNext' => ['MongoGridFSFile'],
'MongoGridFSCursor::getReadPreference' => ['array'],
'MongoGridFSCursor::hasNext' => ['bool'],
'MongoGridFSCursor::hint' => ['MongoCursor', 'key_pattern'=>'mixed'],
'MongoGridFSCursor::immortal' => ['MongoCursor', 'liveForever='=>'bool|true'],
'MongoGridFSCursor::info' => ['array'],
'MongoGridFSCursor::key' => ['string'],
'MongoGridFSCursor::limit' => ['MongoCursor', 'num'=>'int'],
'MongoGridFSCursor::maxTimeMS' => ['MongoCursor', 'ms'=>'int'],
'MongoGridFSCursor::next' => ['void'],
'MongoGridFSCursor::partial' => ['MongoCursor', 'okay='=>'bool|true'],
'MongoGridFSCursor::reset' => ['void'],
'MongoGridFSCursor::rewind' => ['void'],
'MongoGridFSCursor::setFlag' => ['MongoCursor', 'flag'=>'int', 'set='=>'bool|true'],
'MongoGridFSCursor::setReadPreference' => ['MongoCursor', 'read_preference'=>'string', 'tags'=>'array'],
'MongoGridFSCursor::skip' => ['MongoCursor', 'num'=>'int'],
'MongoGridFSCursor::slaveOkay' => ['MongoCursor', 'okay='=>'bool|true'],
'MongoGridFSCursor::snapshot' => ['MongoCursor'],
'MongoGridFSCursor::sort' => ['MongoCursor', 'fields'=>'array'],
'MongoGridFSCursor::tailable' => ['MongoCursor', 'tail='=>'bool|true'],
'MongoGridFSCursor::timeout' => ['MongoCursor', 'ms'=>'int'],
'MongoGridFSCursor::valid' => ['bool'],
'MongoGridfsFile::__construct' => ['void', 'gridfs'=>'MongoGridFS', 'file'=>'array'],
'MongoGridFSFile::getBytes' => ['string'],
'MongoGridFSFile::getFilename' => ['string'],
'MongoGridFSFile::getResource' => ['resource'],
'MongoGridFSFile::getSize' => ['int'],
'MongoGridFSFile::write' => ['int', 'filename='=>'string'],
'MongoId::__construct' => ['void', 'id='=>'string|MongoId'],
'MongoId::__set_state' => ['MongoId', 'props'=>'array'],
'MongoId::__toString' => ['string'],
'MongoId::getHostname' => ['string'],
'MongoId::getInc' => ['int'],
'MongoId::getPID' => ['int'],
'MongoId::getTimestamp' => ['int'],
'MongoId::isValid' => ['bool', 'value'=>'mixed'],
'MongoInsertBatch::__construct' => ['void', 'collection'=>'MongoCollection', 'write_options='=>'array'],
'MongoInt32::__construct' => ['void', 'value'=>'string'],
'MongoInt32::__toString' => ['string'],
'MongoInt64::__construct' => ['void', 'value'=>'string'],
'MongoInt64::__toString' => ['string'],
'MongoLog::getCallback' => ['callable'],
'MongoLog::getLevel' => ['int'],
'MongoLog::getModule' => ['int'],
'MongoLog::setCallback' => ['void', 'log_function'=>'callable'],
'MongoLog::setLevel' => ['void', 'level'=>'int'],
'MongoLog::setModule' => ['void', 'module'=>'int'],
'MongoPool::getSize' => ['int'],
'MongoPool::info' => ['array'],
'MongoPool::setSize' => ['bool', 'size'=>'int'],
'MongoRegex::__construct' => ['void', 'regex'=>'string'],
'MongoRegex::__toString' => ['string'],
'MongoResultException::__clone' => ['void'],
'MongoResultException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Exception)|(?Throwable)'],
'MongoResultException::__toString' => ['string'],
'MongoResultException::__wakeup' => ['void'],
'MongoResultException::getCode' => ['int'],
'MongoResultException::getDocument' => ['array'],
'MongoResultException::getFile' => ['string'],
'MongoResultException::getLine' => ['int'],
'MongoResultException::getMessage' => ['string'],
'MongoResultException::getPrevious' => ['Exception|Throwable'],
'MongoResultException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'MongoResultException::getTraceAsString' => ['string'],
'MongoTimestamp::__construct' => ['void', 'sec='=>'int', 'inc='=>'int'],
'MongoTimestamp::__toString' => ['string'],
'MongoUpdateBatch::__construct' => ['void', 'collection'=>'MongoCollection', 'write_options='=>'array'],
'MongoUpdateBatch::add' => ['bool', 'item'=>'array'],
'MongoUpdateBatch::execute' => ['array', 'write_options'=>'array'],
'MongoWriteBatch::__construct' => ['void', 'collection'=>'MongoCollection', 'batch_type'=>'string', 'write_options'=>'array'],
'MongoWriteBatch::add' => ['bool', 'item'=>'array'],
'MongoWriteBatch::execute' => ['array', 'write_options'=>'array'],
'MongoWriteConcernException::__clone' => ['void'],
'MongoWriteConcernException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Exception)|(?Throwable)'],
'MongoWriteConcernException::__toString' => ['string'],
'MongoWriteConcernException::__wakeup' => ['void'],
'MongoWriteConcernException::getCode' => ['int'],
'MongoWriteConcernException::getDocument' => ['array'],
'MongoWriteConcernException::getFile' => ['string'],
'MongoWriteConcernException::getLine' => ['int'],
'MongoWriteConcernException::getMessage' => ['string'],
'MongoWriteConcernException::getPrevious' => ['Exception|Throwable'],
'MongoWriteConcernException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'MongoWriteConcernException::getTraceAsString' => ['string'],
'monitor_custom_event' => ['void', 'class'=>'string', 'text'=>'string', 'severe='=>'int', 'user_data='=>'mixed'],
'monitor_httperror_event' => ['void', 'error_code'=>'int', 'url'=>'string', 'severe='=>'int'],
'monitor_license_info' => ['array'],
'monitor_pass_error' => ['void', 'errno'=>'int', 'errstr'=>'string', 'errfile'=>'string', 'errline'=>'int'],
'monitor_set_aggregation_hint' => ['void', 'hint'=>'string'],
'move_uploaded_file' => ['bool', 'path'=>'string', 'new_path'=>'string'],
'mqseries_back' => ['void', 'hconn'=>'resource', 'compcode'=>'resource', 'reason'=>'resource'],
'mqseries_begin' => ['void', 'hconn'=>'resource', 'beginoptions'=>'array', 'compcode'=>'resource', 'reason'=>'resource'],
'mqseries_close' => ['void', 'hconn'=>'resource', 'hobj'=>'resource', 'options'=>'int', 'compcode'=>'resource', 'reason'=>'resource'],
'mqseries_cmit' => ['void', 'hconn'=>'resource', 'compcode'=>'resource', 'reason'=>'resource'],
'mqseries_conn' => ['void', 'qmanagername'=>'string', 'hconn'=>'resource', 'compcode'=>'resource', 'reason'=>'resource'],
'mqseries_connx' => ['void', 'qmanagername'=>'string', 'connoptions'=>'array', 'hconn'=>'resource', 'compcode'=>'resource', 'reason'=>'resource'],
'mqseries_disc' => ['void', 'hconn'=>'resource', 'compcode'=>'resource', 'reason'=>'resource'],
'mqseries_get' => ['void', 'hconn'=>'resource', 'hobj'=>'resource', 'md'=>'array', 'gmo'=>'array', 'bufferlength'=>'int', 'msg'=>'string', 'data_length'=>'int', 'compcode'=>'resource', 'reason'=>'resource'],
'mqseries_inq' => ['void', 'hconn'=>'resource', 'hobj'=>'resource', 'selectorcount'=>'int', 'selectors'=>'array', 'intattrcount'=>'int', 'intattr'=>'resource', 'charattrlength'=>'int', 'charattr'=>'resource', 'compcode'=>'resource', 'reason'=>'resource'],
'mqseries_open' => ['void', 'hconn'=>'resource', 'objdesc'=>'array', 'option'=>'int', 'hobj'=>'resource', 'compcode'=>'resource', 'reason'=>'resource'],
'mqseries_put' => ['void', 'hconn'=>'resource', 'hobj'=>'resource', 'md'=>'array', 'pmo'=>'array', 'message'=>'string', 'compcode'=>'resource', 'reason'=>'resource'],
'mqseries_put1' => ['void', 'hconn'=>'resource', 'objdesc'=>'resource', 'msgdesc'=>'resource', 'pmo'=>'resource', 'buffer'=>'string', 'compcode'=>'resource', 'reason'=>'resource'],
'mqseries_set' => ['void', 'hconn'=>'resource', 'hobj'=>'resource', 'selectorcount'=>'int', 'selectors'=>'array', 'intattrcount'=>'int', 'intattrs'=>'array', 'charattrlength'=>'int', 'charattrs'=>'array', 'compcode'=>'resource', 'reason'=>'resource'],
'mqseries_strerror' => ['string', 'reason'=>'int'],
'ms_GetErrorObj' => ['errorObj'],
'ms_GetVersion' => ['string'],
'ms_GetVersionInt' => ['int'],
'ms_iogetStdoutBufferBytes' => ['int'],
'ms_iogetstdoutbufferstring' => ['void'],
'ms_ioinstallstdinfrombuffer' => ['void'],
'ms_ioinstallstdouttobuffer' => ['void'],
'ms_ioresethandlers' => ['void'],
'ms_iostripstdoutbuffercontentheaders' => ['void'],
'ms_iostripstdoutbuffercontenttype' => ['string'],
'ms_ResetErrorList' => ['void'],
'ms_TokenizeMap' => ['array', 'map_file_name'=>'string'],
'msession_connect' => ['bool', 'host'=>'string', 'port'=>'string'],
'msession_count' => ['int'],
'msession_create' => ['bool', 'session'=>'string', 'classname='=>'string', 'data='=>'string'],
'msession_destroy' => ['bool', 'name'=>'string'],
'msession_disconnect' => ['void'],
'msession_find' => ['array', 'name'=>'string', 'value'=>'string'],
'msession_get' => ['string', 'session'=>'string', 'name'=>'string', 'value'=>'string'],
'msession_get_array' => ['array', 'session'=>'string'],
'msession_get_data' => ['string', 'session'=>'string'],
'msession_inc' => ['string', 'session'=>'string', 'name'=>'string'],
'msession_list' => ['array'],
'msession_listvar' => ['array', 'name'=>'string'],
'msession_lock' => ['int', 'name'=>'string'],
'msession_plugin' => ['string', 'session'=>'string', 'val'=>'string', 'param='=>'string'],
'msession_randstr' => ['string', 'param'=>'int'],
'msession_set' => ['bool', 'session'=>'string', 'name'=>'string', 'value'=>'string'],
'msession_set_array' => ['void', 'session'=>'string', 'tuples'=>'array'],
'msession_set_data' => ['bool', 'session'=>'string', 'value'=>'string'],
'msession_timeout' => ['int', 'session'=>'string', 'param='=>'int'],
'msession_uniq' => ['string', 'param'=>'int', 'classname='=>'string', 'data='=>'string'],
'msession_unlock' => ['int', 'session'=>'string', 'key'=>'int'],
'msg_get_queue' => ['resource|false', 'key'=>'int', 'perms='=>'int'],
'msg_queue_exists' => ['bool', 'key'=>'int'],
'msg_receive' => ['bool', 'queue'=>'resource', 'desiredmsgtype'=>'int', '&w_msgtype'=>'int', 'maxsize'=>'int', '&w_message'=>'mixed', 'unserialize='=>'bool', 'flags='=>'int', '&w_errorcode='=>'int'],
'msg_remove_queue' => ['bool', 'queue'=>'resource'],
'msg_send' => ['bool', 'queue'=>'resource', 'msgtype'=>'int', 'message'=>'mixed', 'serialize='=>'bool', 'blocking='=>'bool', '&w_errorcode='=>'int'],
'msg_set_queue' => ['bool', 'queue'=>'resource', 'data'=>'array'],
'msg_stat_queue' => ['array|false', 'queue'=>'resource'],
'msgfmt_create' => ['MessageFormatter', 'locale'=>'string', 'pattern'=>'string'],
'msgfmt_format' => ['string|false', 'fmt'=>'messageformatter', 'args'=>'array'],
'msgfmt_format_message' => ['string|false', 'locale'=>'string', 'pattern'=>'string', 'args'=>'array'],
'msgfmt_get_error_code' => ['int', 'fmt'=>'messageformatter'],
'msgfmt_get_error_message' => ['string', 'fmt'=>'messageformatter'],
'msgfmt_get_locale' => ['string', 'formatter'=>'messageformatter'],
'msgfmt_get_pattern' => ['string|false', 'fmt'=>'messageformatter'],
'msgfmt_parse' => ['array|false', 'fmt'=>'messageformatter', 'value'=>'string'],
'msgfmt_parse_message' => ['array|false', 'locale'=>'string', 'pattern'=>'string', 'source'=>'string'],
'msgfmt_set_pattern' => ['bool', 'fmt'=>'messageformatter', 'pattern'=>'string'],
'msql_affected_rows' => ['int', 'result'=>'resource'],
'msql_close' => ['bool', 'link_identifier='=>'?resource'],
'msql_connect' => ['resource', 'hostname='=>'string'],
'msql_create_db' => ['bool', 'database_name'=>'string', 'link_identifier='=>'?resource'],
'msql_data_seek' => ['bool', 'result'=>'resource', 'row_number'=>'int'],
'msql_db_query' => ['resource', 'database'=>'string', 'query'=>'string', 'link_identifier='=>'?resource'],
'msql_drop_db' => ['bool', 'database_name'=>'string', 'link_identifier='=>'?resource'],
'msql_error' => ['string'],
'msql_fetch_array' => ['array', 'result'=>'resource', 'result_type='=>'int'],
'msql_fetch_field' => ['object', 'result'=>'resource', 'field_offset='=>'int'],
'msql_fetch_object' => ['object', 'result'=>'resource'],
'msql_fetch_row' => ['array', 'result'=>'resource'],
'msql_field_flags' => ['string', 'result'=>'resource', 'field_offset'=>'int'],
'msql_field_len' => ['int', 'result'=>'resource', 'field_offset'=>'int'],
'msql_field_name' => ['string', 'result'=>'resource', 'field_offset'=>'int'],
'msql_field_seek' => ['bool', 'result'=>'resource', 'field_offset'=>'int'],
'msql_field_table' => ['int', 'result'=>'resource', 'field_offset'=>'int'],
'msql_field_type' => ['string', 'result'=>'resource', 'field_offset'=>'int'],
'msql_free_result' => ['bool', 'result'=>'resource'],
'msql_list_dbs' => ['resource', 'link_identifier='=>'?resource'],
'msql_list_fields' => ['resource', 'database'=>'string', 'tablename'=>'string', 'link_identifier='=>'?resource'],
'msql_list_tables' => ['resource', 'database'=>'string', 'link_identifier='=>'?resource'],
'msql_num_fields' => ['int', 'result'=>'resource'],
'msql_num_rows' => ['int', 'query_identifier'=>'resource'],
'msql_pconnect' => ['resource', 'hostname='=>'string'],
'msql_query' => ['resource', 'query'=>'string', 'link_identifier='=>'?resource'],
'msql_result' => ['string', 'result'=>'resource', 'row'=>'int', 'field='=>'mixed'],
'msql_select_db' => ['bool', 'database_name'=>'string', 'link_identifier='=>'?resource'],
'mssql_bind' => ['bool', 'stmt'=>'resource', 'param_name'=>'string', 'var'=>'mixed', 'type'=>'int', 'is_output='=>'bool', 'is_null='=>'bool', 'maxlen='=>'int'],
'mssql_close' => ['bool', 'link_identifier='=>'resource'],
'mssql_connect' => ['resource', 'servername='=>'string', 'username='=>'string', 'password='=>'string', 'new_link='=>'bool'],
'mssql_data_seek' => ['bool', 'result_identifier'=>'resource', 'row_number'=>'int'],
'mssql_execute' => ['mixed', 'stmt'=>'resource', 'skip_results='=>'bool'],
'mssql_fetch_array' => ['array', 'result'=>'resource', 'result_type='=>'int'],
'mssql_fetch_assoc' => ['array', 'result_id'=>'resource'],
'mssql_fetch_batch' => ['int', 'result'=>'resource'],
'mssql_fetch_field' => ['object', 'result'=>'resource', 'field_offset='=>'int'],
'mssql_fetch_object' => ['object', 'result'=>'resource'],
'mssql_fetch_row' => ['array', 'result'=>'resource'],
'mssql_field_length' => ['int', 'result'=>'resource', 'offset='=>'int'],
'mssql_field_name' => ['string', 'result'=>'resource', 'offset='=>'int'],
'mssql_field_seek' => ['bool', 'result'=>'resource', 'field_offset'=>'int'],
'mssql_field_type' => ['string', 'result'=>'resource', 'offset='=>'int'],
'mssql_free_result' => ['bool', 'result'=>'resource'],
'mssql_free_statement' => ['bool', 'stmt'=>'resource'],
'mssql_get_last_message' => ['string'],
'mssql_guid_string' => ['string', 'binary'=>'string', 'short_format='=>'bool'],
'mssql_init' => ['resource', 'sp_name'=>'string', 'link_identifier='=>'resource'],
'mssql_min_error_severity' => ['void', 'severity'=>'int'],
'mssql_min_message_severity' => ['void', 'severity'=>'int'],
'mssql_next_result' => ['bool', 'result_id'=>'resource'],
'mssql_num_fields' => ['int', 'result'=>'resource'],
'mssql_num_rows' => ['int', 'result'=>'resource'],
'mssql_pconnect' => ['resource', 'servername='=>'string', 'username='=>'string', 'password='=>'string', 'new_link='=>'bool'],
'mssql_query' => ['mixed', 'query'=>'string', 'link_identifier='=>'resource', 'batch_size='=>'int'],
'mssql_result' => ['string', 'result'=>'resource', 'row'=>'int', 'field'=>'mixed'],
'mssql_rows_affected' => ['int', 'link_identifier'=>'resource'],
'mssql_select_db' => ['bool', 'database_name'=>'string', 'link_identifier='=>'resource'],
'mt_getrandmax' => ['int'],
'mt_rand' => ['int', 'min'=>'int', 'max'=>'int'],
'mt_rand\'1' => ['int'],
'mt_srand' => ['void', 'seed='=>'int', 'mode='=>'int'],
'MultipleIterator::__construct' => ['void', 'flags='=>'int'],
'MultipleIterator::attachIterator' => ['void', 'iterator'=>'Iterator', 'infos='=>'string'],
'MultipleIterator::containsIterator' => ['bool', 'iterator'=>'Iterator'],
'MultipleIterator::countIterators' => ['int'],
'MultipleIterator::current' => ['array'],
'MultipleIterator::detachIterator' => ['void', 'iterator'=>'Iterator'],
'MultipleIterator::getFlags' => ['int'],
'MultipleIterator::key' => ['array'],
'MultipleIterator::next' => ['void'],
'MultipleIterator::rewind' => ['void'],
'MultipleIterator::setFlags' => ['int', 'flags'=>'int'],
'MultipleIterator::valid' => ['bool'],
'mysql_affected_rows' => ['int', 'link_identifier='=>'resource'],
'mysql_client_encoding' => ['string', 'link_identifier='=>'resource'],
'mysql_close' => ['bool', 'link_identifier='=>'resource'],
'mysql_connect' => ['resource|false', 'server='=>'string', 'username='=>'string', 'password='=>'string', 'new_link='=>'bool', 'client_flags='=>'int'],
'mysql_create_db' => ['bool', 'database_name'=>'string', 'link_identifier='=>'resource'],
'mysql_data_seek' => ['bool', 'result'=>'resource', 'row_number'=>'int'],
'mysql_db_name' => ['string|false', 'result'=>'resource', 'row'=>'int', 'field='=>'mixed'],
'mysql_db_query' => ['resource|bool', 'database'=>'string', 'query'=>'string', 'link_identifier='=>'resource'],
'mysql_drop_db' => ['bool', 'database_name'=>'string', 'link_identifier='=>'resource'],
'mysql_errno' => ['int', 'link_identifier='=>'resource'],
'mysql_error' => ['string', 'link_identifier='=>'resource'],
'mysql_escape_string' => ['string', 'unescaped_string'=>'string'],
'mysql_fetch_array' => ['array|false', 'result'=>'resource', 'result_type='=>'int'],
'mysql_fetch_assoc' => ['array|false', 'result'=>'resource'],
'mysql_fetch_field' => ['object', 'result'=>'resource', 'field_offset='=>'int'],
'mysql_fetch_lengths' => ['array|false', 'result'=>'resource'],
'mysql_fetch_object' => ['object|false', 'result'=>'resource', 'class_name='=>'string', 'params='=>'array'],
'mysql_fetch_row' => ['array|false', 'result'=>'resource'],
'mysql_field_flags' => ['string|false', 'result'=>'resource', 'field_offset'=>'int'],
'mysql_field_len' => ['int|false', 'result'=>'resource', 'field_offset'=>'int'],
'mysql_field_name' => ['string|false', 'result'=>'resource', 'field_offset'=>'int'],
'mysql_field_seek' => ['bool', 'result'=>'resource', 'field_offset'=>'int'],
'mysql_field_table' => ['string', 'result'=>'resource', 'field_offset'=>'int'],
'mysql_field_type' => ['string', 'result'=>'resource', 'field_offset'=>'int'],
'mysql_free_result' => ['bool', 'result'=>'resource'],
'mysql_get_client_info' => ['string'],
'mysql_get_host_info' => ['string|false', 'link_identifier='=>'resource'],
'mysql_get_proto_info' => ['int|false', 'link_identifier='=>'resource'],
'mysql_get_server_info' => ['string|false', 'link_identifier='=>'resource'],
'mysql_info' => ['string|false', 'link_identifier='=>'resource'],
'mysql_insert_id' => ['int|false', 'link_identifier='=>'resource'],
'mysql_list_dbs' => ['resource|false', 'link_identifier='=>'resource'],
'mysql_list_fields' => ['resource|false', 'database_name'=>'string', 'table_name'=>'string', 'link_identifier='=>'resource'],
'mysql_list_processes' => ['resource|false', 'link_identifier='=>'resource'],
'mysql_list_tables' => ['resource', 'database'=>'string', 'link_identifier='=>'resource'],
'mysql_num_fields' => ['int|false', 'result'=>'resource'],
'mysql_num_rows' => ['int|false', 'result'=>'resource'],
'mysql_pconnect' => ['resource|false', 'server='=>'string', 'username='=>'string', 'password='=>'string', 'client_flags='=>'int'],
'mysql_ping' => ['bool', 'link_identifier='=>'resource'],
'mysql_query' => ['resource|bool', 'query'=>'string', 'link_identifier='=>'resource'],
'mysql_real_escape_string' => ['string|false', 'unescaped_string'=>'string', 'link_identifier='=>'resource'],
'mysql_result' => ['string|false', 'result'=>'resource', 'row'=>'int', 'field='=>'mixed'],
'mysql_select_db' => ['bool', 'database_name'=>'string', 'link_identifier='=>'resource'],
'mysql_set_charset' => ['bool', 'charset'=>'string', 'link_identifier='=>'resource'],
'mysql_stat' => ['string|null', 'link_identifier='=>'resource'],
'mysql_tablename' => ['string|false', 'result'=>'resource', 'i'=>'int'],
'mysql_thread_id' => ['int|false', 'link_identifier='=>'resource'],
'mysql_unbuffered_query' => ['resource|bool', 'query'=>'string', 'link_identifier='=>'resource'],
'mysqli::__construct' => ['void', 'host='=>'string', 'username='=>'string', 'passwd='=>'string', 'dbname='=>'string', 'port='=>'int', 'socket='=>'string'],
'mysqli::autocommit' => ['bool', 'mode'=>'bool'],
'mysqli::begin_transaction' => ['bool', 'flags='=>'int', 'name='=>'string'],
'mysqli::change_user' => ['bool', 'user'=>'string', 'password'=>'string', 'database'=>'string'],
'mysqli::character_set_name' => ['string'],
'mysqli::close' => ['bool'],
'mysqli::commit' => ['bool', 'flags='=>'int', 'name='=>'string'],
'mysqli::debug' => ['bool', 'message'=>'string'],
'mysqli::disable_reads_from_master' => ['bool'],
'mysqli::dump_debug_info' => ['bool'],
'mysqli::get_charset' => ['object'],
'mysqli::get_client_info' => ['string'],
'mysqli::get_connection_stats' => ['array|false'],
'mysqli::get_warnings' => ['mysqli_warning'],
'mysqli::init' => ['mysqli'],
'mysqli::kill' => ['bool', 'processid'=>'int'],
'mysqli::more_results' => ['bool'],
'mysqli::multi_query' => ['bool', 'query'=>'string'],
'mysqli::next_result' => ['bool'],
'mysqli::options' => ['bool', 'option'=>'int', 'value'=>'mixed'],
'mysqli::ping' => ['bool'],
'mysqli::poll' => ['int|false', '&w_read'=>'array', '&w_error'=>'array', '&w_reject'=>'array', 'sec'=>'int', 'usec='=>'int'],
'mysqli::prepare' => ['mysqli_stmt|false', 'query'=>'string'],
'mysqli::query' => ['bool|mysqli_result', 'query'=>'string', 'resultmode='=>'int'],
'mysqli::real_connect' => ['bool', 'host='=>'string', 'username='=>'string', 'passwd='=>'string', 'dbname='=>'string', 'port='=>'int', 'socket='=>'string', 'flags='=>'int'],
'mysqli::real_escape_string' => ['string', 'escapestr'=>'string'],
'mysqli::real_query' => ['bool', 'query'=>'string'],
'mysqli::reap_async_query' => ['mysqli_result|false'],
'mysqli::refresh' => ['bool', 'options'=>'int'],
'mysqli::release_savepoint' => ['bool', 'name'=>'string'],
'mysqli::rollback' => ['bool', 'flags='=>'int', 'name='=>'string'],
'mysqli::rpl_query_type' => ['int', 'query'=>'string'],
'mysqli::savepoint' => ['bool', 'name'=>'string'],
'mysqli::select_db' => ['bool', 'dbname'=>'string'],
'mysqli::send_query' => ['bool', 'query'=>'string'],
'mysqli::set_charset' => ['bool', 'charset'=>'string'],
'mysqli::set_local_infile_default' => ['void'],
'mysqli::set_local_infile_handler' => ['bool', 'read_func='=>'callable'],
'mysqli::ssl_set' => ['bool', 'key'=>'string', 'cert'=>'string', 'ca'=>'string', 'capath'=>'string', 'cipher'=>'string'],
'mysqli::stat' => ['string|false'],
'mysqli::stmt_init' => ['mysqli_stmt'],
'mysqli::store_result' => ['mysqli_result|false', 'option='=>'int'],
'mysqli::thread_safe' => ['bool'],
'mysqli::use_result' => ['mysqli_result|false'],
'mysqli_affected_rows' => ['int<-1,max>|numeric-string', 'link'=>'mysqli'],
'mysqli_autocommit' => ['bool', 'link'=>'mysqli', 'mode'=>'bool'],
'mysqli_begin_transaction' => ['bool', 'link'=>'mysqli', 'flags='=>'int', 'name='=>'string'],
'mysqli_change_user' => ['bool', 'link'=>'mysqli', 'user'=>'string', 'password'=>'string', 'database'=>'string'],
'mysqli_character_set_name' => ['string', 'link'=>'mysqli'],
'mysqli_close' => ['bool', 'link'=>'mysqli'],
'mysqli_commit' => ['bool', 'link'=>'mysqli', 'flags='=>'int', 'name='=>'string'],
'mysqli_connect' => ['mysqli|false|null', 'host='=>'string', 'username='=>'string', 'passwd='=>'string', 'dbname='=>'string', 'port='=>'int', 'socket='=>'string'],
'mysqli_connect_errno' => ['int'],
'mysqli_connect_error' => ['string|null'],
'mysqli_data_seek' => ['bool', 'result'=>'mysqli_result', 'offset'=>'int'],
'mysqli_debug' => ['bool', 'message'=>'string'],
'mysqli_disable_reads_from_master' => ['bool', 'link'=>'mysqli'],
'mysqli_disable_rpl_parse' => ['bool', 'link'=>'mysqli'],
'mysqli_driver::embedded_server_end' => ['void'],
'mysqli_driver::embedded_server_start' => ['bool', 'start'=>'int', 'arguments'=>'array', 'groups'=>'array'],
'mysqli_dump_debug_info' => ['bool', 'link'=>'mysqli'],
'mysqli_embedded_server_end' => ['void'],
'mysqli_embedded_server_start' => ['bool', 'start'=>'int', 'arguments'=>'array', 'groups'=>'array'],
'mysqli_enable_reads_from_master' => ['bool', 'link'=>'mysqli'],
'mysqli_enable_rpl_parse' => ['bool', 'link'=>'mysqli'],
'mysqli_errno' => ['int', 'link'=>'mysqli'],
'mysqli_error' => ['string|null', 'link'=>'mysqli'],
'mysqli_error_list' => ['array', 'connection'=>'mysqli'],
'mysqli_fetch_all' => ['array|false', 'result'=>'mysqli_result', 'resulttype='=>'int'],
'mysqli_fetch_array' => ['array|null|false', 'result'=>'mysqli_result', 'resulttype='=>'int'],
'mysqli_fetch_assoc' => ['array<string,string>|null', 'result'=>'mysqli_result'],
'mysqli_fetch_field' => ['object|false', 'result'=>'mysqli_result'],
'mysqli_fetch_field_direct' => ['object|false', 'result'=>'mysqli_result', 'fieldnr'=>'int'],
'mysqli_fetch_fields' => ['array', 'result'=>'mysqli_result'],
'mysqli_fetch_lengths' => ['array|false', 'result'=>'mysqli_result'],
'mysqli_fetch_object' => ['object|null', 'result'=>'mysqli_result', 'class_name='=>'string', 'params='=>'?array'],
'mysqli_fetch_row' => ['array|null', 'result'=>'mysqli_result'],
'mysqli_field_count' => ['int', 'link'=>'mysqli'],
'mysqli_field_seek' => ['bool', 'result'=>'mysqli_result', 'fieldnr'=>'int'],
'mysqli_field_tell' => ['int', 'result'=>'mysqli_result'],
'mysqli_free_result' => ['void', 'link'=>'mysqli_result'],
'mysqli_get_cache_stats' => ['array'],
'mysqli_get_charset' => ['object', 'link'=>'mysqli'],
'mysqli_get_client_info' => ['string', 'link='=>'mysqli'],
'mysqli_get_client_stats' => ['array|false'],
'mysqli_get_client_version' => ['int'],
'mysqli_get_connection_stats' => ['array|false', 'link'=>'mysqli'],
'mysqli_get_host_info' => ['string', 'link'=>'mysqli'],
'mysqli_get_links_stats' => ['array'],
'mysqli_get_proto_info' => ['int', 'link'=>'mysqli'],
'mysqli_get_server_info' => ['string', 'link'=>'mysqli'],
'mysqli_get_server_version' => ['int', 'link'=>'mysqli'],
'mysqli_get_warnings' => ['mysqli_warning|false', 'link'=>'mysqli'],
'mysqli_info' => ['?string', 'link'=>'mysqli'],
'mysqli_init' => ['mysqli|false'],
'mysqli_insert_id' => ['int|string', 'link'=>'mysqli'],
'mysqli_kill' => ['bool', 'link'=>'mysqli', 'processid'=>'int'],
'mysqli_link_construct' => ['object'],
'mysqli_master_query' => ['bool', 'link'=>'mysqli', 'query'=>'string'],
'mysqli_more_results' => ['bool', 'link'=>'mysqli'],
'mysqli_multi_query' => ['bool', 'link'=>'mysqli', 'query'=>'string'],
'mysqli_next_result' => ['bool', 'link'=>'mysqli'],
'mysqli_num_fields' => ['int', 'link'=>'mysqli_result'],
'mysqli_num_rows' => ['int<0,max>|numeric-string', 'link'=>'mysqli_result'],
'mysqli_options' => ['bool', 'link'=>'mysqli', 'option'=>'int', 'value'=>'mixed'],
'mysqli_ping' => ['bool', 'link'=>'mysqli'],
'mysqli_poll' => ['int|false', 'read'=>'array', 'error'=>'array', 'reject'=>'array', 'sec'=>'int', 'usec='=>'int'],
'mysqli_prepare' => ['mysqli_stmt|false', 'link'=>'mysqli', 'query'=>'string'],
'mysqli_query' => ['mysqli_result|bool', 'link'=>'mysqli', 'query'=>'string', 'resultmode='=>'int'],
'mysqli_real_connect' => ['bool', 'link='=>'mysqli', 'host='=>'string', 'username='=>'string', 'passwd='=>'string', 'dbname='=>'string', 'port='=>'int', 'socket='=>'string', 'flags='=>'int'],
'mysqli_real_escape_string' => ['string', 'link'=>'mysqli', 'escapestr'=>'string'],
'mysqli_real_query' => ['bool', 'link'=>'mysqli', 'query'=>'string'],
'mysqli_reap_async_query' => ['mysqli_result|false', 'link'=>'mysqli'],
'mysqli_refresh' => ['bool', 'link'=>'mysqli', 'options'=>'int'],
'mysqli_release_savepoint' => ['bool', 'link'=>'mysqli', 'name'=>'string'],
'mysqli_report' => ['bool', 'flags'=>'int'],
'mysqli_result::__construct' => ['void', 'link'=>'mysqli', 'resultmode='=>'int'],
'mysqli_result::close' => ['void'],
'mysqli_result::data_seek' => ['bool', 'offset'=>'int'],
'mysqli_result::fetch_all' => ['array', 'resulttype='=>'int'],
'mysqli_result::fetch_array' => ['array|null', 'resulttype='=>'int'],
'mysqli_result::fetch_assoc' => ['array<string,string>|null'],
'mysqli_result::fetch_field' => ['object|false'],
'mysqli_result::fetch_field_direct' => ['object|false', 'fieldnr'=>'int'],
'mysqli_result::fetch_fields' => ['array'],
'mysqli_result::fetch_object' => ['object|null', 'class_name='=>'string', 'params='=>'array'],
'mysqli_result::fetch_row' => ['array|null'],
'mysqli_result::field_seek' => ['bool', 'fieldnr'=>'int'],
'mysqli_result::free' => ['void'],
'mysqli_result::free_result' => ['void'],
'mysqli_rollback' => ['bool', 'link'=>'mysqli', 'flags='=>'int', 'name='=>'string'],
'mysqli_rpl_parse_enabled' => ['int', 'link'=>'mysqli'],
'mysqli_rpl_probe' => ['bool', 'link'=>'mysqli'],
'mysqli_rpl_query_type' => ['int', 'link'=>'mysqli', 'query'=>'string'],
'mysqli_savepoint' => ['bool', 'link'=>'mysqli', 'name'=>'string'],
'mysqli_savepoint_libmysql' => ['bool'],
'mysqli_select_db' => ['bool', 'link'=>'mysqli', 'dbname'=>'string'],
'mysqli_send_query' => ['bool', 'link'=>'mysqli', 'query'=>'string'],
'mysqli_set_charset' => ['bool', 'link'=>'mysqli', 'charset'=>'string'],
'mysqli_set_local_infile_default' => ['void', 'link'=>'mysqli'],
'mysqli_set_local_infile_handler' => ['bool', 'link'=>'mysqli', 'read_func'=>'callable'],
'mysqli_slave_query' => ['bool', 'link'=>'mysqli', 'query'=>'string'],
'mysqli_sqlstate' => ['string', 'link'=>'mysqli'],
'mysqli_ssl_set' => ['bool', 'link'=>'mysqli', 'key'=>'string', 'cert'=>'string', 'ca'=>'string', 'capath'=>'string', 'cipher'=>'string'],
'mysqli_stat' => ['string|false', 'link'=>'mysqli'],
'mysqli_stmt::__construct' => ['void', 'link'=>'mysqli', 'query='=>'string'],
'mysqli_stmt::attr_get' => ['false|int', 'attr'=>'int'],
'mysqli_stmt::attr_set' => ['bool', 'attr'=>'int', 'mode'=>'int'],
'mysqli_stmt::bind_param' => ['bool', 'types'=>'string', 'var1'=>'mixed', '...args='=>'mixed'],
'mysqli_stmt::bind_result' => ['bool', '&w_var1'=>'', '&...w_vars='=>''],
'mysqli_stmt::close' => ['bool'],
'mysqli_stmt::data_seek' => ['void', 'offset'=>'int'],
'mysqli_stmt::execute' => ['bool'],
'mysqli_stmt::fetch' => ['bool|null'],
'mysqli_stmt::free_result' => ['void'],
'mysqli_stmt::get_result' => ['mysqli_result|false'],
'mysqli_stmt::get_warnings' => ['object'],
'mysqli_stmt::more_results' => ['bool'],
'mysqli_stmt::next_result' => ['bool'],
'mysqli_stmt::num_rows' => ['int<0,max>|numeric-string'],
'mysqli_stmt::prepare' => ['bool', 'query'=>'string'],
'mysqli_stmt::reset' => ['bool'],
'mysqli_stmt::result_metadata' => ['mysqli_result|false'],
'mysqli_stmt::send_long_data' => ['bool', 'param_nr'=>'int', 'data'=>'string'],
'mysqli_stmt::store_result' => ['bool'],
'mysqli_stmt_affected_rows' => ['int<-1,max>|numeric-string', 'stmt'=>'mysqli_stmt'],
'mysqli_stmt_attr_get' => ['int|false', 'stmt'=>'mysqli_stmt', 'attr'=>'int'],
'mysqli_stmt_attr_set' => ['bool', 'stmt'=>'mysqli_stmt', 'attr'=>'int', 'mode'=>'int'],
'mysqli_stmt_bind_param' => ['bool', 'stmt'=>'mysqli_stmt', 'types'=>'string', 'var1'=>'mixed', '...args='=>'mixed'],
'mysqli_stmt_bind_result' => ['bool', 'stmt'=>'mysqli_stmt', '&w_var1'=>'', '&...w_vars='=>''],
'mysqli_stmt_close' => ['bool', 'stmt'=>'mysqli_stmt'],
'mysqli_stmt_data_seek' => ['void', 'stmt'=>'mysqli_stmt', 'offset'=>'int'],
'mysqli_stmt_errno' => ['int', 'stmt'=>'mysqli_stmt'],
'mysqli_stmt_error' => ['string', 'stmt'=>'mysqli_stmt'],
'mysqli_stmt_error_list' => ['list<array{errno: int, sqlstate: string, error: string}>', 'stmt'=>'mysqli_stmt'],
'mysqli_stmt_execute' => ['bool', 'stmt'=>'mysqli_stmt'],
'mysqli_stmt_fetch' => ['bool|null', 'stmt'=>'mysqli_stmt'],
'mysqli_stmt_field_count' => ['0|positive-int', 'stmt'=>'mysqli_stmt'],
'mysqli_stmt_free_result' => ['void', 'stmt'=>'mysqli_stmt'],
'mysqli_stmt_get_result' => ['mysqli_result|false', 'stmt'=>'mysqli_stmt'],
'mysqli_stmt_get_warnings' => ['object|false', 'stmt'=>'mysqli_stmt'],
'mysqli_stmt_init' => ['mysqli_stmt|false', 'link'=>'mysqli'],
'mysqli_stmt_insert_id' => ['', 'stmt'=>'mysqli_stmt'],
'mysqli_stmt_more_results' => ['bool', 'stmt'=>'mysqli_stmt'],
'mysqli_stmt_next_result' => ['bool', 'stmt'=>'mysqli_stmt'],
'mysqli_stmt_num_rows' => ['0|positive-int', 'stmt'=>'mysqli_stmt'],
'mysqli_stmt_param_count' => ['0|positive-int', 'stmt'=>'mysqli_stmt'],
'mysqli_stmt_prepare' => ['bool', 'stmt'=>'mysqli_stmt', 'query'=>'string'],
'mysqli_stmt_reset' => ['bool', 'stmt'=>'mysqli_stmt'],
'mysqli_stmt_result_metadata' => ['mysqli_result|false', 'stmt'=>'mysqli_stmt'],
'mysqli_stmt_send_long_data' => ['bool', 'stmt'=>'mysqli_stmt', 'param_nr'=>'int', 'data'=>'string'],
'mysqli_stmt_sqlstate' => ['non-empty-string', 'stmt'=>'mysqli_stmt'],
'mysqli_stmt_store_result' => ['bool', 'stmt'=>'mysqli_stmt'],
'mysqli_store_result' => ['mysqli_result|false', 'link'=>'mysqli', 'option='=>'int'],
'mysqli_thread_id' => ['int', 'link'=>'mysqli'],
'mysqli_thread_safe' => ['bool'],
'mysqli_use_result' => ['mysqli_result|false', 'link'=>'mysqli'],
'mysqli_warning::__construct' => ['void'],
'mysqli_warning::next' => ['bool'],
'mysqli_warning_count' => ['int', 'link'=>'mysqli'],
'mysqlnd_memcache_get_config' => ['array', 'connection'=>'mixed'],
'mysqlnd_memcache_set' => ['bool', 'mysql_connection'=>'mixed', 'memcache_connection='=>'Memcached', 'pattern='=>'string', 'callback='=>'callable'],
'mysqlnd_ms_dump_servers' => ['array', 'connection'=>'mixed'],
'mysqlnd_ms_fabric_select_global' => ['array', 'connection'=>'mixed', 'table_name'=>'mixed'],
'mysqlnd_ms_fabric_select_shard' => ['array', 'connection'=>'mixed', 'table_name'=>'mixed', 'shard_key'=>'mixed'],
'mysqlnd_ms_get_last_gtid' => ['string', 'connection'=>'mixed'],
'mysqlnd_ms_get_last_used_connection' => ['array', 'connection'=>'mixed'],
'mysqlnd_ms_get_stats' => ['array'],
'mysqlnd_ms_match_wild' => ['bool', 'table_name'=>'string', 'wildcard'=>'string'],
'mysqlnd_ms_query_is_select' => ['int', 'query'=>'string'],
'mysqlnd_ms_set_qos' => ['bool', 'connection'=>'mixed', 'service_level'=>'int', 'service_level_option='=>'int', 'option_value='=>'mixed'],
'mysqlnd_ms_set_user_pick_server' => ['bool', 'function'=>'string'],
'mysqlnd_ms_xa_begin' => ['int', 'connection'=>'mixed', 'gtrid'=>'string', 'timeout='=>'int'],
'mysqlnd_ms_xa_commit' => ['int', 'connection'=>'mixed', 'gtrid'=>'string'],
'mysqlnd_ms_xa_gc' => ['int', 'connection'=>'mixed', 'gtrid='=>'string', 'ignore_max_retries='=>'bool'],
'mysqlnd_ms_xa_rollback' => ['int', 'connection'=>'mixed', 'gtrid'=>'string'],
'mysqlnd_qc_change_handler' => ['bool', 'handler'=>''],
'mysqlnd_qc_clear_cache' => ['bool'],
'mysqlnd_qc_get_available_handlers' => ['array'],
'mysqlnd_qc_get_cache_info' => ['array'],
'mysqlnd_qc_get_core_stats' => ['array'],
'mysqlnd_qc_get_handler' => ['array'],
'mysqlnd_qc_get_normalized_query_trace_log' => ['array'],
'mysqlnd_qc_get_query_trace_log' => ['array'],
'mysqlnd_qc_set_cache_condition' => ['bool', 'condition_type'=>'int', 'condition'=>'mixed', 'condition_option'=>'mixed'],
'mysqlnd_qc_set_is_select' => ['mixed', 'callback'=>'string'],
'mysqlnd_qc_set_storage_handler' => ['bool', 'handler'=>'string'],
'mysqlnd_qc_set_user_handlers' => ['bool', 'get_hash'=>'string', 'find_query_in_cache'=>'string', 'return_to_cache'=>'string', 'add_query_to_cache_if_not_exists'=>'string', 'query_is_select'=>'string', 'update_query_run_time_stats'=>'string', 'get_stats'=>'string', 'clear_cache'=>'string'],
'mysqlnd_uh_convert_to_mysqlnd' => ['resource', '&rw_mysql_connection'=>'mysqli'],
'mysqlnd_uh_set_connection_proxy' => ['bool', '&rw_connection_proxy'=>'MysqlndUhConnection', '&rw_mysqli_connection='=>'mysqli'],
'mysqlnd_uh_set_statement_proxy' => ['bool', '&rw_statement_proxy'=>'MysqlndUhStatement'],
'MysqlndUhConnection::__construct' => ['void'],
'MysqlndUhConnection::changeUser' => ['bool', 'connection'=>'mysqlnd_connection', 'user'=>'string', 'password'=>'string', 'database'=>'string', 'silent'=>'bool', 'passwd_len'=>'int'],
'MysqlndUhConnection::charsetName' => ['string', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::close' => ['bool', 'connection'=>'mysqlnd_connection', 'close_type'=>'int'],
'MysqlndUhConnection::connect' => ['bool', 'connection'=>'mysqlnd_connection', 'host'=>'string', 'use'=>'string', 'password'=>'string', 'database'=>'string', 'port'=>'int', 'socket'=>'string', 'mysql_flags'=>'int'],
'MysqlndUhConnection::endPSession' => ['bool', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::escapeString' => ['string', 'connection'=>'mysqlnd_connection', 'escape_string'=>'string'],
'MysqlndUhConnection::getAffectedRows' => ['int', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::getErrorNumber' => ['int', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::getErrorString' => ['string', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::getFieldCount' => ['int', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::getHostInformation' => ['string', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::getLastInsertId' => ['int', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::getLastMessage' => ['void', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::getProtocolInformation' => ['string', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::getServerInformation' => ['string', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::getServerStatistics' => ['string', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::getServerVersion' => ['int', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::getSqlstate' => ['string', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::getStatistics' => ['array', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::getThreadId' => ['int', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::getWarningCount' => ['int', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::init' => ['bool', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::killConnection' => ['bool', 'connection'=>'mysqlnd_connection', 'pid'=>'int'],
'MysqlndUhConnection::listFields' => ['array', 'connection'=>'mysqlnd_connection', 'table'=>'string', 'achtung_wild'=>'string'],
'MysqlndUhConnection::listMethod' => ['void', 'connection'=>'mysqlnd_connection', 'query'=>'string', 'achtung_wild'=>'string', 'par1'=>'string'],
'MysqlndUhConnection::moreResults' => ['bool', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::nextResult' => ['bool', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::ping' => ['bool', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::query' => ['bool', 'connection'=>'mysqlnd_connection', 'query'=>'string'],
'MysqlndUhConnection::queryReadResultsetHeader' => ['bool', 'connection'=>'mysqlnd_connection', 'mysqlnd_stmt'=>'mysqlnd_statement'],
'MysqlndUhConnection::reapQuery' => ['bool', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::refreshServer' => ['bool', 'connection'=>'mysqlnd_connection', 'options'=>'int'],
'MysqlndUhConnection::restartPSession' => ['bool', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::selectDb' => ['bool', 'connection'=>'mysqlnd_connection', 'database'=>'string'],
'MysqlndUhConnection::sendClose' => ['bool', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::sendQuery' => ['bool', 'connection'=>'mysqlnd_connection', 'query'=>'string'],
'MysqlndUhConnection::serverDumpDebugInformation' => ['bool', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::setAutocommit' => ['bool', 'connection'=>'mysqlnd_connection', 'mode'=>'int'],
'MysqlndUhConnection::setCharset' => ['bool', 'connection'=>'mysqlnd_connection', 'charset'=>'string'],
'MysqlndUhConnection::setClientOption' => ['bool', 'connection'=>'mysqlnd_connection', 'option'=>'int', 'value'=>'int'],
'MysqlndUhConnection::setServerOption' => ['void', 'connection'=>'mysqlnd_connection', 'option'=>'int'],
'MysqlndUhConnection::shutdownServer' => ['void', 'MYSQLND_UH_RES_MYSQLND_NAME'=>'string', 'level'=>'string'],
'MysqlndUhConnection::simpleCommand' => ['bool', 'connection'=>'mysqlnd_connection', 'command'=>'int', 'arg'=>'string', 'ok_packet'=>'int', 'silent'=>'bool', 'ignore_upsert_status'=>'bool'],
'MysqlndUhConnection::simpleCommandHandleResponse' => ['bool', 'connection'=>'mysqlnd_connection', 'ok_packet'=>'int', 'silent'=>'bool', 'command'=>'int', 'ignore_upsert_status'=>'bool'],
'MysqlndUhConnection::sslSet' => ['bool', 'connection'=>'mysqlnd_connection', 'key'=>'string', 'cert'=>'string', 'ca'=>'string', 'capath'=>'string', 'cipher'=>'string'],
'MysqlndUhConnection::stmtInit' => ['resource', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::storeResult' => ['resource', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::txCommit' => ['bool', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::txRollback' => ['bool', 'connection'=>'mysqlnd_connection'],
'MysqlndUhConnection::useResult' => ['resource', 'connection'=>'mysqlnd_connection'],
'MysqlndUhPreparedStatement::__construct' => ['void'],
'MysqlndUhPreparedStatement::execute' => ['bool', 'statement'=>'mysqlnd_prepared_statement'],
'MysqlndUhPreparedStatement::prepare' => ['bool', 'statement'=>'mysqlnd_prepared_statement', 'query'=>'string'],
'natcasesort' => ['bool', '&rw_array_arg'=>'array'],
'natsort' => ['bool', '&rw_array_arg'=>'array'],
'ncurses_addch' => ['int', 'ch'=>'int'],
'ncurses_addchnstr' => ['int', 's'=>'string', 'n'=>'int'],
'ncurses_addchstr' => ['int', 's'=>'string'],
'ncurses_addnstr' => ['int', 's'=>'string', 'n'=>'int'],
'ncurses_addstr' => ['int', 'text'=>'string'],
'ncurses_assume_default_colors' => ['int', 'fg'=>'int', 'bg'=>'int'],
'ncurses_attroff' => ['int', 'attributes'=>'int'],
'ncurses_attron' => ['int', 'attributes'=>'int'],
'ncurses_attrset' => ['int', 'attributes'=>'int'],
'ncurses_baudrate' => ['int'],
'ncurses_beep' => ['int'],
'ncurses_bkgd' => ['int', 'attrchar'=>'int'],
'ncurses_bkgdset' => ['void', 'attrchar'=>'int'],
'ncurses_border' => ['int', 'left'=>'int', 'right'=>'int', 'top'=>'int', 'bottom'=>'int', 'tl_corner'=>'int', 'tr_corner'=>'int', 'bl_corner'=>'int', 'br_corner'=>'int'],
'ncurses_bottom_panel' => ['int', 'panel'=>'resource'],
'ncurses_can_change_color' => ['bool'],
'ncurses_cbreak' => ['bool'],
'ncurses_clear' => ['bool'],
'ncurses_clrtobot' => ['bool'],
'ncurses_clrtoeol' => ['bool'],
'ncurses_color_content' => ['int', 'color'=>'int', 'r'=>'int', 'g'=>'int', 'b'=>'int'],
'ncurses_color_set' => ['int', 'pair'=>'int'],
'ncurses_curs_set' => ['int', 'visibility'=>'int'],
'ncurses_def_prog_mode' => ['bool'],
'ncurses_def_shell_mode' => ['bool'],
'ncurses_define_key' => ['int', 'definition'=>'string', 'keycode'=>'int'],
'ncurses_del_panel' => ['bool', 'panel'=>'resource'],
'ncurses_delay_output' => ['int', 'milliseconds'=>'int'],
'ncurses_delch' => ['bool'],
'ncurses_deleteln' => ['bool'],
'ncurses_delwin' => ['bool', 'window'=>'resource'],
'ncurses_doupdate' => ['bool'],
'ncurses_echo' => ['bool'],
'ncurses_echochar' => ['int', 'character'=>'int'],
'ncurses_end' => ['int'],
'ncurses_erase' => ['bool'],
'ncurses_erasechar' => ['string'],
'ncurses_filter' => ['void'],
'ncurses_flash' => ['bool'],
'ncurses_flushinp' => ['bool'],
'ncurses_getch' => ['int'],
'ncurses_getmaxyx' => ['void', 'window'=>'resource', 'y'=>'int', 'x'=>'int'],
'ncurses_getmouse' => ['bool', 'mevent'=>'array'],
'ncurses_getyx' => ['void', 'window'=>'resource', 'y'=>'int', 'x'=>'int'],
'ncurses_halfdelay' => ['int', 'tenth'=>'int'],
'ncurses_has_colors' => ['bool'],
'ncurses_has_ic' => ['bool'],
'ncurses_has_il' => ['bool'],
'ncurses_has_key' => ['int', 'keycode'=>'int'],
'ncurses_hide_panel' => ['int', 'panel'=>'resource'],
'ncurses_hline' => ['int', 'charattr'=>'int', 'n'=>'int'],
'ncurses_inch' => ['string'],
'ncurses_init' => ['void'],
'ncurses_init_color' => ['int', 'color'=>'int', 'r'=>'int', 'g'=>'int', 'b'=>'int'],
'ncurses_init_pair' => ['int', 'pair'=>'int', 'fg'=>'int', 'bg'=>'int'],
'ncurses_insch' => ['int', 'character'=>'int'],
'ncurses_insdelln' => ['int', 'count'=>'int'],
'ncurses_insertln' => ['int'],
'ncurses_insstr' => ['int', 'text'=>'string'],
'ncurses_instr' => ['int', 'buffer'=>'string'],
'ncurses_isendwin' => ['bool'],
'ncurses_keyok' => ['int', 'keycode'=>'int', 'enable'=>'bool'],
'ncurses_keypad' => ['int', 'window'=>'resource', 'bf'=>'bool'],
'ncurses_killchar' => ['string'],
'ncurses_longname' => ['string'],
'ncurses_meta' => ['int', 'window'=>'resource', '_8bit'=>'bool'],
'ncurses_mouse_trafo' => ['bool', 'y'=>'int', 'x'=>'int', 'toscreen'=>'bool'],
'ncurses_mouseinterval' => ['int', 'milliseconds'=>'int'],
'ncurses_mousemask' => ['int', 'newmask'=>'int', 'oldmask'=>'int'],
'ncurses_move' => ['int', 'y'=>'int', 'x'=>'int'],
'ncurses_move_panel' => ['int', 'panel'=>'resource', 'startx'=>'int', 'starty'=>'int'],
'ncurses_mvaddch' => ['int', 'y'=>'int', 'x'=>'int', 'c'=>'int'],
'ncurses_mvaddchnstr' => ['int', 'y'=>'int', 'x'=>'int', 's'=>'string', 'n'=>'int'],
'ncurses_mvaddchstr' => ['int', 'y'=>'int', 'x'=>'int', 's'=>'string'],
'ncurses_mvaddnstr' => ['int', 'y'=>'int', 'x'=>'int', 's'=>'string', 'n'=>'int'],
'ncurses_mvaddstr' => ['int', 'y'=>'int', 'x'=>'int', 's'=>'string'],
'ncurses_mvcur' => ['int', 'old_y'=>'int', 'old_x'=>'int', 'new_y'=>'int', 'new_x'=>'int'],
'ncurses_mvdelch' => ['int', 'y'=>'int', 'x'=>'int'],
'ncurses_mvgetch' => ['int', 'y'=>'int', 'x'=>'int'],
'ncurses_mvhline' => ['int', 'y'=>'int', 'x'=>'int', 'attrchar'=>'int', 'n'=>'int'],
'ncurses_mvinch' => ['int', 'y'=>'int', 'x'=>'int'],
'ncurses_mvvline' => ['int', 'y'=>'int', 'x'=>'int', 'attrchar'=>'int', 'n'=>'int'],
'ncurses_mvwaddstr' => ['int', 'window'=>'resource', 'y'=>'int', 'x'=>'int', 'text'=>'string'],
'ncurses_napms' => ['int', 'milliseconds'=>'int'],
'ncurses_new_panel' => ['resource', 'window'=>'resource'],
'ncurses_newpad' => ['resource', 'rows'=>'int', 'cols'=>'int'],
'ncurses_newwin' => ['resource', 'rows'=>'int', 'cols'=>'int', 'y'=>'int', 'x'=>'int'],
'ncurses_nl' => ['bool'],
'ncurses_nocbreak' => ['bool'],
'ncurses_noecho' => ['bool'],
'ncurses_nonl' => ['bool'],
'ncurses_noqiflush' => ['void'],
'ncurses_noraw' => ['bool'],
'ncurses_pair_content' => ['int', 'pair'=>'int', 'f'=>'int', 'b'=>'int'],
'ncurses_panel_above' => ['resource', 'panel'=>'resource'],
'ncurses_panel_below' => ['resource', 'panel'=>'resource'],
'ncurses_panel_window' => ['resource', 'panel'=>'resource'],
'ncurses_pnoutrefresh' => ['int', 'pad'=>'resource', 'pminrow'=>'int', 'pmincol'=>'int', 'sminrow'=>'int', 'smincol'=>'int', 'smaxrow'=>'int', 'smaxcol'=>'int'],
'ncurses_prefresh' => ['int', 'pad'=>'resource', 'pminrow'=>'int', 'pmincol'=>'int', 'sminrow'=>'int', 'smincol'=>'int', 'smaxrow'=>'int', 'smaxcol'=>'int'],
'ncurses_putp' => ['int', 'text'=>'string'],
'ncurses_qiflush' => ['void'],
'ncurses_raw' => ['bool'],
'ncurses_refresh' => ['int', 'ch'=>'int'],
'ncurses_replace_panel' => ['int', 'panel'=>'resource', 'window'=>'resource'],
'ncurses_reset_prog_mode' => ['int'],
'ncurses_reset_shell_mode' => ['int'],
'ncurses_resetty' => ['bool'],
'ncurses_savetty' => ['bool'],
'ncurses_scr_dump' => ['int', 'filename'=>'string'],
'ncurses_scr_init' => ['int', 'filename'=>'string'],
'ncurses_scr_restore' => ['int', 'filename'=>'string'],
'ncurses_scr_set' => ['int', 'filename'=>'string'],
'ncurses_scrl' => ['int', 'count'=>'int'],
'ncurses_show_panel' => ['int', 'panel'=>'resource'],
'ncurses_slk_attr' => ['int'],
'ncurses_slk_attroff' => ['int', 'intarg'=>'int'],
'ncurses_slk_attron' => ['int', 'intarg'=>'int'],
'ncurses_slk_attrset' => ['int', 'intarg'=>'int'],
'ncurses_slk_clear' => ['bool'],
'ncurses_slk_color' => ['int', 'intarg'=>'int'],
'ncurses_slk_init' => ['bool', 'format'=>'int'],
'ncurses_slk_noutrefresh' => ['bool'],
'ncurses_slk_refresh' => ['int'],
'ncurses_slk_restore' => ['int'],
'ncurses_slk_set' => ['bool', 'labelnr'=>'int', 'label'=>'string', 'format'=>'int'],
'ncurses_slk_touch' => ['int'],
'ncurses_standend' => ['int'],
'ncurses_standout' => ['int'],
'ncurses_start_color' => ['int'],
'ncurses_termattrs' => ['bool'],
'ncurses_termname' => ['string'],
'ncurses_timeout' => ['void', 'millisec'=>'int'],
'ncurses_top_panel' => ['int', 'panel'=>'resource'],
'ncurses_typeahead' => ['int', 'fd'=>'int'],
'ncurses_ungetch' => ['int', 'keycode'=>'int'],
'ncurses_ungetmouse' => ['bool', 'mevent'=>'array'],
'ncurses_update_panels' => ['void'],
'ncurses_use_default_colors' => ['bool'],
'ncurses_use_env' => ['void', 'flag'=>'bool'],
'ncurses_use_extended_names' => ['int', 'flag'=>'bool'],
'ncurses_vidattr' => ['int', 'intarg'=>'int'],
'ncurses_vline' => ['int', 'charattr'=>'int', 'n'=>'int'],
'ncurses_waddch' => ['int', 'window'=>'resource', 'ch'=>'int'],
'ncurses_waddstr' => ['int', 'window'=>'resource', 'str'=>'string', 'n='=>'int'],
'ncurses_wattroff' => ['int', 'window'=>'resource', 'attrs'=>'int'],
'ncurses_wattron' => ['int', 'window'=>'resource', 'attrs'=>'int'],
'ncurses_wattrset' => ['int', 'window'=>'resource', 'attrs'=>'int'],
'ncurses_wborder' => ['int', 'window'=>'resource', 'left'=>'int', 'right'=>'int', 'top'=>'int', 'bottom'=>'int', 'tl_corner'=>'int', 'tr_corner'=>'int', 'bl_corner'=>'int', 'br_corner'=>'int'],
'ncurses_wclear' => ['int', 'window'=>'resource'],
'ncurses_wcolor_set' => ['int', 'window'=>'resource', 'color_pair'=>'int'],
'ncurses_werase' => ['int', 'window'=>'resource'],
'ncurses_wgetch' => ['int', 'window'=>'resource'],
'ncurses_whline' => ['int', 'window'=>'resource', 'charattr'=>'int', 'n'=>'int'],
'ncurses_wmouse_trafo' => ['bool', 'window'=>'resource', 'y'=>'int', 'x'=>'int', 'toscreen'=>'bool'],
'ncurses_wmove' => ['int', 'window'=>'resource', 'y'=>'int', 'x'=>'int'],
'ncurses_wnoutrefresh' => ['int', 'window'=>'resource'],
'ncurses_wrefresh' => ['int', 'window'=>'resource'],
'ncurses_wstandend' => ['int', 'window'=>'resource'],
'ncurses_wstandout' => ['int', 'window'=>'resource'],
'ncurses_wvline' => ['int', 'window'=>'resource', 'charattr'=>'int', 'n'=>'int'],
'net_get_interfaces' => ['array|false'],
'newrelic_add_custom_parameter' => ['bool', 'key'=>'string', 'value'=>''],
'newrelic_add_custom_tracer' => ['bool', 'function_name'=>'string'],
'newrelic_background_job' => ['void', 'flag='=>'bool'],
'newrelic_capture_params' => ['void', 'enable='=>'bool'],
'newrelic_custom_metric' => ['bool', 'metric_name'=>'string', 'value'=>'float'],
'newrelic_disable_autorum' => ['bool'],
'newrelic_end_of_transaction' => ['void'],
'newrelic_end_transaction' => ['bool', 'ignore='=>'bool'],
'newrelic_get_browser_timing_footer' => ['string', 'include_tags='=>'bool'],
'newrelic_get_browser_timing_header' => ['string', 'include_tags='=>'bool'],
'newrelic_ignore_apdex' => ['void'],
'newrelic_ignore_transaction' => ['void'],
'newrelic_name_transaction' => ['bool', 'name'=>'string'],
'newrelic_notice_error' => ['void', 'message'=>'string', 'exception='=>'Exception|Throwable'],
'newrelic_notice_error\'1' => ['void', 'unused_1'=>'string', 'message'=>'string', 'unused_2'=>'string', 'unused_3'=>'int', 'unused_4='=>''],
'newrelic_record_custom_event' => ['void', 'name'=>'string', 'attributes'=>'array'],
'newrelic_record_datastore_segment' => ['mixed', 'func'=>'callable', 'parameters'=>'array'],
'newrelic_set_appname' => ['bool', 'name'=>'string', 'license='=>'string', 'xmit='=>'bool'],
'newrelic_set_user_attributes' => ['bool', 'user'=>'string', 'account'=>'string', 'product'=>'string'],
'newrelic_start_transaction' => ['bool', 'appname'=>'string', 'license='=>'string'],
'newt_bell' => ['void'],
'newt_button' => ['resource', 'left'=>'int', 'top'=>'int', 'text'=>'string'],
'newt_button_bar' => ['resource', 'buttons'=>'array'],
'newt_centered_window' => ['int', 'width'=>'int', 'height'=>'int', 'title='=>'string'],
'newt_checkbox' => ['resource', 'left'=>'int', 'top'=>'int', 'text'=>'string', 'def_value'=>'string', 'seq='=>'string'],
'newt_checkbox_get_value' => ['string', 'checkbox'=>'resource'],
'newt_checkbox_set_flags' => ['void', 'checkbox'=>'resource', 'flags'=>'int', 'sense'=>'int'],
'newt_checkbox_set_value' => ['void', 'checkbox'=>'resource', 'value'=>'string'],
'newt_checkbox_tree' => ['resource', 'left'=>'int', 'top'=>'int', 'height'=>'int', 'flags='=>'int'],
'newt_checkbox_tree_add_item' => ['void', 'checkboxtree'=>'resource', 'text'=>'string', 'data'=>'mixed', 'flags'=>'int', 'index'=>'int', '...args='=>'int'],
'newt_checkbox_tree_find_item' => ['array', 'checkboxtree'=>'resource', 'data'=>'mixed'],
'newt_checkbox_tree_get_current' => ['mixed', 'checkboxtree'=>'resource'],
'newt_checkbox_tree_get_entry_value' => ['string', 'checkboxtree'=>'resource', 'data'=>'mixed'],
'newt_checkbox_tree_get_multi_selection' => ['array', 'checkboxtree'=>'resource', 'seqnum'=>'string'],
'newt_checkbox_tree_get_selection' => ['array', 'checkboxtree'=>'resource'],
'newt_checkbox_tree_multi' => ['resource', 'left'=>'int', 'top'=>'int', 'height'=>'int', 'seq'=>'string', 'flags='=>'int'],
'newt_checkbox_tree_set_current' => ['void', 'checkboxtree'=>'resource', 'data'=>'mixed'],
'newt_checkbox_tree_set_entry' => ['void', 'checkboxtree'=>'resource', 'data'=>'mixed', 'text'=>'string'],
'newt_checkbox_tree_set_entry_value' => ['void', 'checkboxtree'=>'resource', 'data'=>'mixed', 'value'=>'string'],
'newt_checkbox_tree_set_width' => ['void', 'checkbox_tree'=>'resource', 'width'=>'int'],
'newt_clear_key_buffer' => ['void'],
'newt_cls' => ['void'],
'newt_compact_button' => ['resource', 'left'=>'int', 'top'=>'int', 'text'=>'string'],
'newt_component_add_callback' => ['void', 'component'=>'resource', 'func_name'=>'mixed', 'data'=>'mixed'],
'newt_component_takes_focus' => ['void', 'component'=>'resource', 'takes_focus'=>'bool'],
'newt_create_grid' => ['resource', 'cols'=>'int', 'rows'=>'int'],
'newt_cursor_off' => ['void'],
'newt_cursor_on' => ['void'],
'newt_delay' => ['void', 'microseconds'=>'int'],
'newt_draw_form' => ['void', 'form'=>'resource'],
'newt_draw_root_text' => ['void', 'left'=>'int', 'top'=>'int', 'text'=>'string'],
'newt_entry' => ['resource', 'left'=>'int', 'top'=>'int', 'width'=>'int', 'init_value='=>'string', 'flags='=>'int'],
'newt_entry_get_value' => ['string', 'entry'=>'resource'],
'newt_entry_set' => ['void', 'entry'=>'resource', 'value'=>'string', 'cursor_at_end='=>'bool'],
'newt_entry_set_filter' => ['void', 'entry'=>'resource', 'filter'=>'callable', 'data'=>'mixed'],
'newt_entry_set_flags' => ['void', 'entry'=>'resource', 'flags'=>'int', 'sense'=>'int'],
'newt_finished' => ['int'],
'newt_form' => ['resource', 'vert_bar='=>'resource', 'help='=>'string', 'flags='=>'int'],
'newt_form_add_component' => ['void', 'form'=>'resource', 'component'=>'resource'],
'newt_form_add_components' => ['void', 'form'=>'resource', 'components'=>'array'],
'newt_form_add_hot_key' => ['void', 'form'=>'resource', 'key'=>'int'],
'newt_form_destroy' => ['void', 'form'=>'resource'],
'newt_form_get_current' => ['resource', 'form'=>'resource'],
'newt_form_run' => ['void', 'form'=>'resource', 'exit_struct'=>'array'],
'newt_form_set_background' => ['void', 'from'=>'resource', 'background'=>'int'],
'newt_form_set_height' => ['void', 'form'=>'resource', 'height'=>'int'],
'newt_form_set_size' => ['void', 'form'=>'resource'],
'newt_form_set_timer' => ['void', 'form'=>'resource', 'milliseconds'=>'int'],
'newt_form_set_width' => ['void', 'form'=>'resource', 'width'=>'int'],
'newt_form_watch_fd' => ['void', 'form'=>'resource', 'stream'=>'resource', 'flags='=>'int'],
'newt_get_screen_size' => ['void', 'cols'=>'int', 'rows'=>'int'],
'newt_grid_add_components_to_form' => ['void', 'grid'=>'resource', 'form'=>'resource', 'recurse'=>'bool'],
'newt_grid_basic_window' => ['resource', 'text'=>'resource', 'middle'=>'resource', 'buttons'=>'resource'],
'newt_grid_free' => ['void', 'grid'=>'resource', 'recurse'=>'bool'],
'newt_grid_get_size' => ['void', 'grid'=>'resource', 'width'=>'int', 'height'=>'int'],
'newt_grid_h_close_stacked' => ['resource', 'element1_type'=>'int', 'element1'=>'resource', '...args='=>'resource'],
'newt_grid_h_stacked' => ['resource', 'element1_type'=>'int', 'element1'=>'resource', '...args='=>'resource'],
'newt_grid_place' => ['void', 'grid'=>'resource', 'left'=>'int', 'top'=>'int'],
'newt_grid_set_field' => ['void', 'grid'=>'resource', 'col'=>'int', 'row'=>'int', 'type'=>'int', 'val'=>'resource', 'pad_left'=>'int', 'pad_top'=>'int', 'pad_right'=>'int', 'pad_bottom'=>'int', 'anchor'=>'int', 'flags='=>'int'],
'newt_grid_simple_window' => ['resource', 'text'=>'resource', 'middle'=>'resource', 'buttons'=>'resource'],
'newt_grid_v_close_stacked' => ['resource', 'element1_type'=>'int', 'element1'=>'resource', '...args='=>'resource'],
'newt_grid_v_stacked' => ['resource', 'element1_type'=>'int', 'element1'=>'resource', '...args='=>'resource'],
'newt_grid_wrapped_window' => ['void', 'grid'=>'resource', 'title'=>'string'],
'newt_grid_wrapped_window_at' => ['void', 'grid'=>'resource', 'title'=>'string', 'left'=>'int', 'top'=>'int'],
'newt_init' => ['int'],
'newt_label' => ['resource', 'left'=>'int', 'top'=>'int', 'text'=>'string'],
'newt_label_set_text' => ['void', 'label'=>'resource', 'text'=>'string'],
'newt_listbox' => ['resource', 'left'=>'int', 'top'=>'int', 'height'=>'int', 'flags='=>'int'],
'newt_listbox_append_entry' => ['void', 'listbox'=>'resource', 'text'=>'string', 'data'=>'mixed'],
'newt_listbox_clear' => ['void', 'listobx'=>'resource'],
'newt_listbox_clear_selection' => ['void', 'listbox'=>'resource'],
'newt_listbox_delete_entry' => ['void', 'listbox'=>'resource', 'key'=>'mixed'],
'newt_listbox_get_current' => ['string', 'listbox'=>'resource'],
'newt_listbox_get_selection' => ['array', 'listbox'=>'resource'],
'newt_listbox_insert_entry' => ['void', 'listbox'=>'resource', 'text'=>'string', 'data'=>'mixed', 'key'=>'mixed'],
'newt_listbox_item_count' => ['int', 'listbox'=>'resource'],
'newt_listbox_select_item' => ['void', 'listbox'=>'resource', 'key'=>'mixed', 'sense'=>'int'],
'newt_listbox_set_current' => ['void', 'listbox'=>'resource', 'num'=>'int'],
'newt_listbox_set_current_by_key' => ['void', 'listbox'=>'resource', 'key'=>'mixed'],
'newt_listbox_set_data' => ['void', 'listbox'=>'resource', 'num'=>'int', 'data'=>'mixed'],
'newt_listbox_set_entry' => ['void', 'listbox'=>'resource', 'num'=>'int', 'text'=>'string'],
'newt_listbox_set_width' => ['void', 'listbox'=>'resource', 'width'=>'int'],
'newt_listitem' => ['resource', 'left'=>'int', 'top'=>'int', 'text'=>'string', 'is_default'=>'bool', 'prev_item'=>'resource', 'data'=>'mixed', 'flags='=>'int'],
'newt_listitem_get_data' => ['mixed', 'item'=>'resource'],
'newt_listitem_set' => ['void', 'item'=>'resource', 'text'=>'string'],
'newt_open_window' => ['int', 'left'=>'int', 'top'=>'int', 'width'=>'int', 'height'=>'int', 'title='=>'string'],
'newt_pop_help_line' => ['void'],
'newt_pop_window' => ['void'],
'newt_push_help_line' => ['void', 'text='=>'string'],
'newt_radio_get_current' => ['resource', 'set_member'=>'resource'],
'newt_radiobutton' => ['resource', 'left'=>'int', 'top'=>'int', 'text'=>'string', 'is_default'=>'bool', 'prev_button='=>'resource'],
'newt_redraw_help_line' => ['void'],
'newt_reflow_text' => ['string', 'text'=>'string', 'width'=>'int', 'flex_down'=>'int', 'flex_up'=>'int', 'actual_width'=>'int', 'actual_height'=>'int'],
'newt_refresh' => ['void'],
'newt_resize_screen' => ['void', 'redraw='=>'bool'],
'newt_resume' => ['void'],
'newt_run_form' => ['resource', 'form'=>'resource'],
'newt_scale' => ['resource', 'left'=>'int', 'top'=>'int', 'width'=>'int', 'full_value'=>'int'],
'newt_scale_set' => ['void', 'scale'=>'resource', 'amount'=>'int'],
'newt_scrollbar_set' => ['void', 'scrollbar'=>'resource', 'where'=>'int', 'total'=>'int'],
'newt_set_help_callback' => ['void', 'function'=>'mixed'],
'newt_set_suspend_callback' => ['void', 'function'=>'callable', 'data'=>'mixed'],
'newt_suspend' => ['void'],
'newt_textbox' => ['resource', 'left'=>'int', 'top'=>'int', 'width'=>'int', 'height'=>'int', 'flags='=>'int'],
'newt_textbox_get_num_lines' => ['int', 'textbox'=>'resource'],
'newt_textbox_reflowed' => ['resource', 'left'=>'int', 'top'=>'int', 'text'=>'char', 'width'=>'int', 'flex_down'=>'int', 'flex_up'=>'int', 'flags='=>'int'],
'newt_textbox_set_height' => ['void', 'textbox'=>'resource', 'height'=>'int'],
'newt_textbox_set_text' => ['void', 'textbox'=>'resource', 'text'=>'string'],
'newt_vertical_scrollbar' => ['resource', 'left'=>'int', 'top'=>'int', 'height'=>'int', 'normal_colorset='=>'int', 'thumb_colorset='=>'int'],
'newt_wait_for_key' => ['void'],
'newt_win_choice' => ['int', 'title'=>'string', 'button1_text'=>'string', 'button2_text'=>'string', 'format'=>'string', 'args='=>'mixed', '...args='=>'mixed'],
'newt_win_entries' => ['int', 'title'=>'string', 'text'=>'string', 'suggested_width'=>'int', 'flex_down'=>'int', 'flex_up'=>'int', 'data_width'=>'int', 'items'=>'array', 'button1'=>'string', '...args='=>'string'],
'newt_win_menu' => ['int', 'title'=>'string', 'text'=>'string', 'suggestedwidth'=>'int', 'flexdown'=>'int', 'flexup'=>'int', 'maxlistheight'=>'int', 'items'=>'array', 'listitem'=>'int', 'button1='=>'string', '...args='=>'string'],
'newt_win_message' => ['void', 'title'=>'string', 'button_text'=>'string', 'format'=>'string', 'args='=>'mixed', '...args='=>'mixed'],
'newt_win_messagev' => ['void', 'title'=>'string', 'button_text'=>'string', 'format'=>'string', 'args'=>'array'],
'newt_win_ternary' => ['int', 'title'=>'string', 'button1_text'=>'string', 'button2_text'=>'string', 'button3_text'=>'string', 'format'=>'string', 'args='=>'mixed', '...args='=>'mixed'],
'next' => ['mixed', '&rw_array_arg'=>'array|object'],
'ngettext' => ['string', 'msgid1'=>'string', 'msgid2'=>'string', 'n'=>'int'],
'nl2br' => ['string', 'str'=>'string', 'is_xhtml='=>'bool'],
'nl_langinfo' => ['string|false', 'item'=>'int'],
'NoRewindIterator::__construct' => ['void', 'iterator'=>'Iterator'],
'NoRewindIterator::current' => ['mixed'],
'NoRewindIterator::getInnerIterator' => ['Iterator'],
'NoRewindIterator::key' => ['mixed'],
'NoRewindIterator::next' => ['void'],
'NoRewindIterator::rewind' => ['void'],
'NoRewindIterator::valid' => ['bool'],
'Normalizer::getRawDecomposition' => ['string|null', 'input'=>'string'],
'Normalizer::isNormalized' => ['bool', 'input'=>'string', 'form='=>'int'],
'Normalizer::normalize' => ['string|false', 'input'=>'string', 'form='=>'int'],
'normalizer_get_raw_decomposition' => ['string|null', 'input'=>'string'],
'normalizer_is_normalized' => ['bool', 'input'=>'string', 'form='=>'int'],
'normalizer_normalize' => ['string|false', 'input'=>'string', 'form='=>'int'],
'notes_body' => ['array', 'server'=>'string', 'mailbox'=>'string', 'msg_number'=>'int'],
'notes_copy_db' => ['bool', 'from_database_name'=>'string', 'to_database_name'=>'string'],
'notes_create_db' => ['bool', 'database_name'=>'string'],
'notes_create_note' => ['bool', 'database_name'=>'string', 'form_name'=>'string'],
'notes_drop_db' => ['bool', 'database_name'=>'string'],
'notes_find_note' => ['int', 'database_name'=>'string', 'name'=>'string', 'type='=>'string'],
'notes_header_info' => ['object', 'server'=>'string', 'mailbox'=>'string', 'msg_number'=>'int'],
'notes_list_msgs' => ['bool', 'db'=>'string'],
'notes_mark_read' => ['bool', 'database_name'=>'string', 'user_name'=>'string', 'note_id'=>'string'],
'notes_mark_unread' => ['bool', 'database_name'=>'string', 'user_name'=>'string', 'note_id'=>'string'],
'notes_nav_create' => ['bool', 'database_name'=>'string', 'name'=>'string'],
'notes_search' => ['array', 'database_name'=>'string', 'keywords'=>'string'],
'notes_unread' => ['array', 'database_name'=>'string', 'user_name'=>'string'],
'notes_version' => ['float', 'database_name'=>'string'],
'nsapi_request_headers' => ['array'],
'nsapi_response_headers' => ['array'],
'nsapi_virtual' => ['bool', 'uri'=>'string'],
'nthmac' => ['string', 'clent'=>'string', 'data'=>'string'],
'number_format' => ['string', 'number'=>'float', 'num_decimal_places='=>'int', 'dec_separator='=>'string|null', 'thousands_separator='=>'string|null'],
'NumberFormatter::__construct' => ['void', 'locale'=>'string', 'style'=>'int', 'pattern='=>'string'],
'NumberFormatter::create' => ['NumberFormatter', 'locale'=>'string', 'style'=>'int', 'pattern='=>'string'],
'NumberFormatter::format' => ['string|false', 'num'=>'', 'type='=>'int'],
'NumberFormatter::formatCurrency' => ['string|false', 'num'=>'float', 'currency'=>'string'],
'NumberFormatter::getAttribute' => ['int', 'attr'=>'int'],
'NumberFormatter::getErrorCode' => ['int'],
'NumberFormatter::getErrorMessage' => ['string'],
'NumberFormatter::getLocale' => ['string', 'type='=>'int'],
'NumberFormatter::getPattern' => ['string'],
'NumberFormatter::getSymbol' => ['string', 'attr'=>'int'],
'NumberFormatter::getTextAttribute' => ['string', 'attr'=>'int'],
'NumberFormatter::parse' => ['float|false', 'str'=>'string', 'type='=>'int', '&rw_position='=>'int'],
'NumberFormatter::parseCurrency' => ['float|false', 'str'=>'string', '&w_currency'=>'string', '&rw_position='=>'int'],
'NumberFormatter::setAttribute' => ['bool', 'attr'=>'int', 'value'=>''],
'NumberFormatter::setPattern' => ['bool', 'pattern'=>'string'],
'NumberFormatter::setSymbol' => ['bool', 'attr'=>'int', 'symbol'=>'string'],
'NumberFormatter::setTextAttribute' => ['bool', 'attr'=>'int', 'value'=>'string'],
'numfmt_create' => ['NumberFormatter', 'locale'=>'string', 'style'=>'int', 'pattern='=>'string'],
'numfmt_format' => ['string|false', 'fmt'=>'numberformatter', 'value='=>'float', 'type='=>'int'],
'numfmt_format_currency' => ['string|false', 'fmt'=>'numberformatter', 'value'=>'float', 'currency'=>'string'],
'numfmt_get_attribute' => ['int|false', 'fmt'=>'numberformatter', 'attr'=>'int'],
'numfmt_get_error_code' => ['int', 'fmt'=>'numberformatter'],
'numfmt_get_error_message' => ['string', 'fmt'=>'numberformatter'],
'numfmt_get_locale' => ['string|false', 'fmt'=>'numberformatter', 'type='=>'int'],
'numfmt_get_pattern' => ['string|false', 'fmt'=>'numberformatter'],
'numfmt_get_symbol' => ['string|false', 'fmt'=>'numberformatter', 'attr'=>'int'],
'numfmt_get_text_attribute' => ['string|false', 'fmt'=>'numberformatter', 'attr'=>'int'],
'numfmt_parse' => ['float|false', 'fmt'=>'numberformatter', 'value'=>'string', 'type='=>'int', '&rw_position='=>'int'],
'numfmt_parse_currency' => ['float|false', 'fmt'=>'numberformatter', 'value'=>'string', '&w_currency'=>'string', '&rw_position='=>'int'],
'numfmt_set_attribute' => ['bool', 'fmt'=>'numberformatter', 'attr'=>'int', 'value'=>'int'],
'numfmt_set_pattern' => ['bool', 'fmt'=>'numberformatter', 'pattern'=>'string'],
'numfmt_set_symbol' => ['bool', 'fmt'=>'numberformatter', 'attr'=>'int', 'value'=>'string'],
'numfmt_set_text_attribute' => ['bool', 'fmt'=>'numberformatter', 'attr'=>'int', 'value'=>'string'],
'OAuth::__construct' => ['void', 'consumer_key'=>'string', 'consumer_secret'=>'string', 'signature_method='=>'string', 'auth_type='=>'int'],
'OAuth::__destruct' => [''],
'OAuth::disableDebug' => ['bool'],
'OAuth::disableRedirects' => ['bool'],
'OAuth::disableSSLChecks' => ['bool'],
'OAuth::enableDebug' => ['bool'],
'OAuth::enableRedirects' => ['bool'],
'OAuth::enableSSLChecks' => ['bool'],
'OAuth::fetch' => ['mixed', 'protected_resource_url'=>'string', 'extra_parameters='=>'array', 'http_method='=>'string', 'http_headers='=>'array'],
'OAuth::generateSignature' => ['string', 'http_method'=>'string', 'url'=>'string', 'extra_parameters='=>'mixed'],
'OAuth::getAccessToken' => ['array|false', 'access_token_url'=>'string', 'auth_session_handle='=>'string', 'verifier_token='=>'string'],
'OAuth::getCAPath' => ['array'],
'OAuth::getLastResponse' => ['string'],
'OAuth::getLastResponseHeaders' => ['string|false'],
'OAuth::getLastResponseInfo' => ['array'],
'OAuth::getRequestHeader' => ['string|false', 'http_method'=>'string', 'url'=>'string', 'extra_parameters='=>'mixed'],
'OAuth::getRequestToken' => ['array|false', 'request_token_url'=>'string', 'callback_url='=>'string'],
'OAuth::setAuthType' => ['bool', 'auth_type'=>'int'],
'OAuth::setCAPath' => ['mixed', 'ca_path='=>'string', 'ca_info='=>'string'],
'OAuth::setNonce' => ['mixed', 'nonce'=>'string'],
'OAuth::setRequestEngine' => ['void', 'reqengine'=>'int'],
'OAuth::setRSACertificate' => ['mixed', 'cert'=>'string'],
'OAuth::setSSLChecks' => ['bool', 'sslcheck'=>'int'],
'OAuth::setTimestamp' => ['mixed', 'timestamp'=>'string'],
'OAuth::setToken' => ['bool', 'token'=>'string', 'token_secret'=>'string'],
'OAuth::setVersion' => ['bool', 'version'=>'string'],
'oauth_get_sbs' => ['string', 'http_method'=>'string', 'uri'=>'string', 'request_parameters='=>'array'],
'oauth_urlencode' => ['string', 'uri'=>'string'],
'OAuthProvider::__construct' => ['void', 'params_array='=>'array'],
'OAuthProvider::addRequiredParameter' => ['bool', 'req_params'=>'string'],
'OAuthProvider::callconsumerHandler' => ['void'],
'OAuthProvider::callTimestampNonceHandler' => ['void'],
'OAuthProvider::calltokenHandler' => ['void'],
'OAuthProvider::checkOAuthRequest' => ['void', 'uri='=>'string', 'method='=>'string'],
'OAuthProvider::consumerHandler' => ['void', 'callback_function'=>'callable'],
'OAuthProvider::generateToken' => ['string', 'size'=>'int', 'strong='=>'bool'],
'OAuthProvider::is2LeggedEndpoint' => ['void', 'params_array'=>'mixed'],
'OAuthProvider::isRequestTokenEndpoint' => ['void', 'will_issue_request_token'=>'bool'],
'OAuthProvider::removeRequiredParameter' => ['bool', 'req_params'=>'string'],
'OAuthProvider::reportProblem' => ['string', 'oauthexception'=>'string', 'send_headers='=>'bool'],
'OAuthProvider::setParam' => ['bool', 'param_key'=>'string', 'param_val='=>'mixed'],
'OAuthProvider::setRequestTokenPath' => ['bool', 'path'=>'string'],
'OAuthProvider::timestampNonceHandler' => ['void', 'callback_function'=>'callable'],
'OAuthProvider::tokenHandler' => ['void', 'callback_function'=>'callable'],
'ob_clean' => ['bool'],
'ob_deflatehandler' => ['string', 'data'=>'string', 'mode'=>'int'],
'ob_end_clean' => ['bool'],
'ob_end_flush' => ['bool'],
'ob_etaghandler' => ['string', 'data'=>'string', 'mode'=>'int'],
'ob_flush' => ['bool'],
'ob_get_clean' => ['string|false'],
'ob_get_contents' => ['string|false'],
'ob_get_flush' => ['string|false'],
'ob_get_length' => ['int|false'],
'ob_get_level' => ['int'],
'ob_get_status' => ['array', 'full_status='=>'bool'],
'ob_gzhandler' => ['string|false', 'data'=>'string', 'flags'=>'int'],
'ob_iconv_handler' => ['string', 'contents'=>'string', 'status'=>'int'],
'ob_implicit_flush' => ['void', 'flag='=>'int'],
'ob_inflatehandler' => ['string', 'data'=>'string', 'mode'=>'int'],
'ob_list_handlers' => ['false|list<string>'],
'ob_start' => ['bool', 'user_function='=>'string|array|callable|null', 'chunk_size='=>'int', 'flags='=>'int'],
'ob_tidyhandler' => ['string', 'input'=>'string', 'mode='=>'int'],
'OCI-Collection::append' => ['bool', 'value'=>'mixed'],
'OCI-Collection::assign' => ['bool', 'from'=>'OCI-Collection'],
'OCI-Collection::assignElem' => ['bool', 'index'=>'int', 'value'=>''],
'OCI-Collection::assignelem' => ['bool', 'index'=>'int', 'value'=>'mixed'],
'OCI-Collection::free' => ['bool'],
'OCI-Collection::getElem' => ['', 'index'=>'int'],
'OCI-Collection::getelem' => ['mixed', 'index'=>'int'],
'OCI-Collection::max' => ['int'],
'OCI-Collection::size' => ['int'],
'OCI-Collection::trim' => ['bool', 'num'=>'int'],
'OCI-Lob::append' => ['bool', 'lob_from'=>'OCI-Lob'],
'OCI-Lob::close' => ['bool'],
'OCI-Lob::eof' => ['bool'],
'OCI-Lob::erase' => ['int', 'offset='=>'int', 'length='=>'int'],
'OCI-Lob::export' => ['bool', 'filename'=>'string', 'start='=>'int', 'length='=>'int'],
'OCI-Lob::flush' => ['bool', 'flag='=>'int'],
'OCI-Lob::free' => ['bool'],
'OCI-Lob::getBuffering' => ['bool'],
'OCI-Lob::getbuffering' => ['bool'],
'OCI-Lob::import' => ['bool', 'filename'=>'string'],
'OCI-Lob::load' => ['string'],
'OCI-Lob::read' => ['string', 'length'=>'int'],
'OCI-Lob::rewind' => ['bool'],
'OCI-Lob::save' => ['bool', 'data'=>'string', 'offset='=>'int'],
'OCI-Lob::savefile' => ['bool', 'filename'=>''],
'OCI-Lob::seek' => ['bool', 'offset'=>'int', 'whence='=>'int'],
'OCI-Lob::setBuffering' => ['bool', 'on_off'=>'bool'],
'OCI-Lob::setbuffering' => ['bool', 'on_off'=>'bool'],
'OCI-Lob::size' => ['int'],
'OCI-Lob::tell' => ['int'],
'OCI-Lob::truncate' => ['bool', 'length='=>'int'],
'OCI-Lob::write' => ['int', 'data'=>'string', 'length='=>'int'],
'OCI-Lob::writeTemporary' => ['bool', 'data'=>'string', 'lob_type='=>'int'],
'OCI-Lob::writetofile' => ['bool', 'filename'=>'', 'start'=>'', 'length'=>''],
'oci_bind_array_by_name' => ['bool', 'stmt'=>'resource', 'name'=>'string', '&rw_var'=>'array', 'max_table_length'=>'int', 'max_item_length='=>'int', 'type='=>'int'],
'oci_bind_by_name' => ['bool', 'stmt'=>'resource', 'name'=>'string', '&rw_var'=>'mixed', 'maxlength='=>'int', 'type='=>'int'],
'oci_cancel' => ['bool', 'stmt'=>'resource'],
'oci_client_version' => ['string'],
'oci_close' => ['bool', 'connection'=>'resource'],
'oci_collection_append' => ['bool', 'value'=>'string'],
'oci_collection_assign' => ['bool', 'from'=>'OCI-Collection'],
'oci_collection_element_assign' => ['bool', 'index'=>'int', 'val'=>'string'],
'oci_collection_element_get' => ['string|false', 'ndx'=>'int'],
'oci_collection_max' => ['int|false'],
'oci_collection_size' => ['int|false'],
'oci_collection_trim' => ['bool', 'num'=>'int'],
'oci_commit' => ['bool', 'connection'=>'resource'],
'oci_connect' => ['resource|false', 'user'=>'string', 'pass'=>'string', 'db='=>'string', 'charset='=>'string', 'session_mode='=>'int'],
'oci_define_by_name' => ['bool', 'stmt'=>'resource', 'name'=>'string', '&w_var'=>'mixed', 'type='=>'int'],
'oci_error' => ['array|false', 'resource='=>'resource'],
'oci_execute' => ['bool', 'stmt'=>'resource', 'mode='=>'int'],
'oci_fetch' => ['bool', 'stmt'=>'resource'],
'oci_fetch_all' => ['int|false', 'stmt'=>'resource', '&w_output'=>'array', 'skip='=>'int', 'maxrows='=>'int', 'flags='=>'int'],
'oci_fetch_array' => ['array|false', 'stmt'=>'resource', 'mode='=>'int'],
'oci_fetch_assoc' => ['array|false', 'stmt'=>'resource'],
'oci_fetch_object' => ['object|false', 'stmt'=>'resource'],
'oci_fetch_row' => ['array|false', 'stmt'=>'resource'],
'oci_field_is_null' => ['bool', 'stmt'=>'resource', 'col'=>'mixed'],
'oci_field_name' => ['string|false', 'stmt'=>'resource', 'col'=>'mixed'],
'oci_field_precision' => ['int|false', 'stmt'=>'resource', 'col'=>'mixed'],
'oci_field_scale' => ['int|false', 'stmt'=>'resource', 'col'=>'mixed'],
'oci_field_size' => ['int|false', 'stmt'=>'resource', 'col'=>'mixed'],
'oci_field_type' => ['mixed', 'stmt'=>'resource', 'col'=>'mixed'],
'oci_field_type_raw' => ['int|false', 'stmt'=>'resource', 'col'=>'mixed'],
'oci_free_collection' => ['bool'],
'oci_free_cursor' => ['bool', 'stmt'=>'resource'],
'oci_free_descriptor' => ['bool'],
'oci_free_statement' => ['bool', 'stmt'=>'resource'],
'oci_get_implicit' => ['bool', 'stmt'=>''],
'oci_get_implicit_resultset' => ['resource|false', 'statement'=>'resource'],
'oci_internal_debug' => ['void', 'onoff'=>'bool'],
'oci_lob_append' => ['bool', 'lob'=>'OCI-Lob'],
'oci_lob_close' => ['bool'],
'oci_lob_copy' => ['bool', 'lob_to'=>'OCI-Lob', 'lob_from'=>'OCI-Lob', 'length='=>'int'],
'oci_lob_eof' => ['bool'],
'oci_lob_erase' => ['int|false', 'offset'=>'int', 'length'=>'int'],
'oci_lob_export' => ['bool', 'filename'=>'string', 'start'=>'int', 'length'=>'int'],
'oci_lob_flush' => ['bool', 'flag'=>'int'],
'oci_lob_import' => ['bool', 'filename'=>'string'],
'oci_lob_is_equal' => ['bool', 'lob1'=>'OCI-Lob', 'lob2'=>'OCI-Lob'],
'oci_lob_load' => ['string|false'],
'oci_lob_read' => ['string|false', 'length'=>'int'],
'oci_lob_rewind' => ['bool'],
'oci_lob_save' => ['bool', 'data'=>'string', 'offset'=>'int'],
'oci_lob_seek' => ['bool', 'offset'=>'int', 'whence'=>'int'],
'oci_lob_size' => ['int|false'],
'oci_lob_tell' => ['int|false'],
'oci_lob_truncate' => ['bool', 'length'=>'int'],
'oci_lob_write' => ['int|false', 'string'=>'string', 'length'=>'int'],
'oci_lob_write_temporary' => ['bool', 'var'=>'string', 'lob_type'=>'int'],
'oci_new_collection' => ['OCI-Collection|false', 'connection'=>'resource', 'tdo'=>'string', 'schema='=>'string'],
'oci_new_connect' => ['resource|false', 'user'=>'string', 'pass'=>'string', 'db='=>'string', 'charset='=>'string', 'session_mode='=>'int'],
'oci_new_cursor' => ['resource|false', 'connection'=>'resource'],
'oci_new_descriptor' => ['OCI-Lob|false', 'connection'=>'resource', 'type='=>'int'],
'oci_num_fields' => ['0|positive-int|false', 'stmt'=>'resource'],
'oci_num_rows' => ['0|positive-int|false', 'stmt'=>'resource'],
'oci_parse' => ['resource|false', 'connection'=>'resource', 'statement'=>'string'],
'oci_password_change' => ['bool', 'connection'=>'', 'username'=>'string', 'old_password'=>'string', 'new_password'=>'string'],
'oci_pconnect' => ['resource|false', 'user'=>'string', 'pass'=>'string', 'db='=>'string', 'charset='=>'string', 'session_mode='=>'int'],
'oci_register_taf_callback' => ['bool', 'connection'=>'resource', 'callback='=>'callable'],
'oci_result' => ['string|false', 'stmt'=>'resource', 'column'=>'mixed'],
'oci_rollback' => ['bool', 'connection'=>'resource'],
'oci_server_version' => ['string|false', 'connection'=>'resource'],
'oci_set_action' => ['bool', 'connection'=>'resource', 'value'=>'string'],
'oci_set_client_identifier' => ['bool', 'connection'=>'resource', 'value'=>'string'],
'oci_set_client_info' => ['bool', 'connection'=>'resource', 'value'=>'string'],
'oci_set_db_operation' => ['bool', 'connection'=>'resource', 'value'=>'string'],
'oci_set_edition' => ['bool', 'value'=>'string'],
'oci_set_module_name' => ['bool', 'connection'=>'resource', 'value'=>'string'],
'oci_set_prefetch' => ['bool', 'stmt'=>'resource', 'prefetch_rows'=>'int'],
'oci_statement_type' => ['string|false', 'stmt'=>'resource'],
'oci_unregister_taf_callback' => ['bool', 'connection'=>'resource'],
'ocifetchinto' => ['int|false', 'stmt'=>'', '&w_output'=>'array', 'mode='=>'int'],
'ocigetbufferinglob' => ['bool'],
'ocisetbufferinglob' => ['bool', 'flag'=>'bool'],
'octdec' => ['int|float', 'octal_number'=>'string'],
'odbc_autocommit' => ['mixed', 'connection_id'=>'resource', 'onoff='=>'bool'],
'odbc_binmode' => ['bool', 'result_id'=>'int', 'mode'=>'int'],
'odbc_close' => ['void', 'connection_id'=>'resource'],
'odbc_close_all' => ['void'],
'odbc_columnprivileges' => ['resource', 'connection_id'=>'resource', 'catalog'=>'string', 'schema'=>'string', 'table'=>'string', 'column'=>'string'],
'odbc_columns' => ['resource', 'connection_id'=>'resource', 'qualifier='=>'string', 'owner='=>'string', 'table_name='=>'string', 'column_name='=>'string'],
'odbc_commit' => ['bool', 'connection_id'=>'resource'],
'odbc_connect' => ['resource|false', 'dsn'=>'string', 'user'=>'string', 'password'=>'string', 'cursor_option='=>'int'],
'odbc_cursor' => ['string|false', 'result_id'=>'resource'],
'odbc_data_source' => ['array|false', 'connection_id'=>'resource', 'fetch_type'=>'int'],
'odbc_do' => ['resource', 'connection_id'=>'resource', 'query'=>'string', 'flags='=>'int'],
'odbc_error' => ['string', 'connection_id='=>'resource'],
'odbc_errormsg' => ['string', 'connection_id='=>'resource'],
'odbc_exec' => ['resource|false', 'connection_id'=>'resource', 'query'=>'string', 'flags='=>'int'],
'odbc_execute' => ['bool', 'result_id'=>'resource', 'parameters_array='=>'array'],
'odbc_fetch_array' => ['array|false', 'result'=>'resource', 'rownumber='=>'int'],
'odbc_fetch_into' => ['int|false', 'result_id'=>'resource', '&w_result_array'=>'array', 'rownumber='=>'int'],
'odbc_fetch_object' => ['object|false', 'result'=>'int', 'rownumber='=>'int'],
'odbc_fetch_row' => ['bool', 'result_id'=>'resource', 'row_number='=>'int'],
'odbc_field_len' => ['int|false', 'result_id'=>'resource', 'field_number'=>'int'],
'odbc_field_name' => ['string|false', 'result_id'=>'resource', 'field_number'=>'int'],
'odbc_field_num' => ['int|false', 'result_id'=>'resource', 'field_name'=>'string'],
'odbc_field_precision' => ['int|false', 'result_id'=>'resource', 'field_number'=>'int'],
'odbc_field_scale' => ['int|false', 'result_id'=>'resource', 'field_number'=>'int'],
'odbc_field_type' => ['string|false', 'result_id'=>'resource', 'field_number'=>'int'],
'odbc_foreignkeys' => ['resource', 'connection_id'=>'resource', 'pk_qualifier'=>'string', 'pk_owner'=>'string', 'pk_table'=>'string', 'fk_qualifier'=>'string', 'fk_owner'=>'string', 'fk_table'=>'string'],
'odbc_free_result' => ['bool', 'result_id'=>'resource'],
'odbc_gettypeinfo' => ['resource', 'connection_id'=>'resource', 'data_type='=>'int'],
'odbc_longreadlen' => ['bool', 'result_id'=>'resource', 'length'=>'int'],
'odbc_next_result' => ['bool', 'result_id'=>'resource'],
'odbc_num_fields' => ['int', 'result_id'=>'resource'],
'odbc_num_rows' => ['int', 'result_id'=>'resource'],
'odbc_pconnect' => ['resource', 'dsn'=>'string', 'user'=>'string', 'password'=>'string', 'cursor_option='=>'int'],
'odbc_prepare' => ['resource|false', 'connection_id'=>'resource', 'query'=>'string'],
'odbc_primarykeys' => ['resource', 'connection_id'=>'resource', 'qualifier'=>'string', 'owner'=>'string', 'table'=>'string'],
'odbc_procedurecolumns' => ['resource', 'connection_id'=>'', 'qualifier'=>'string', 'owner'=>'string', 'proc'=>'string', 'column'=>'string'],
'odbc_procedures' => ['resource', 'connection_id'=>'', 'qualifier'=>'string', 'owner'=>'string', 'name'=>'string'],
'odbc_result' => ['mixed', 'result_id'=>'resource', 'field'=>'mixed'],
'odbc_result_all' => ['int|false', 'result_id'=>'resource', 'format='=>'string'],
'odbc_rollback' => ['bool', 'connection_id'=>'resource'],
'odbc_setoption' => ['bool', 'result_id'=>'resource', 'which'=>'int', 'option'=>'int', 'value'=>'int'],
'odbc_specialcolumns' => ['resource', 'connection_id'=>'resource', 'type'=>'int', 'qualifier'=>'string', 'owner'=>'string', 'table'=>'string', 'scope'=>'int', 'nullable'=>'int'],
'odbc_statistics' => ['resource', 'connection_id'=>'resource', 'qualifier'=>'string', 'owner'=>'string', 'name'=>'string', 'unique'=>'int', 'accuracy'=>'int'],
'odbc_tableprivileges' => ['resource', 'connection_id'=>'resource', 'qualifier'=>'string', 'owner'=>'string', 'name'=>'string'],
'odbc_tables' => ['resource', 'connection_id'=>'resource', 'qualifier='=>'string', 'owner='=>'string', 'name='=>'string', 'table_types='=>'string'],
'opcache_compile_file' => ['bool', 'file'=>'string'],
'opcache_get_configuration' => ['array|false'],
'opcache_get_status' => ['array|false', 'get_scripts='=>'bool'],
'opcache_invalidate' => ['bool', 'script'=>'string', 'force='=>'bool'],
'opcache_is_script_cached' => ['bool', 'script'=>'string'],
'opcache_reset' => ['bool'],
'openal_buffer_create' => ['resource'],
'openal_buffer_data' => ['bool', 'buffer'=>'resource', 'format'=>'int', 'data'=>'string', 'freq'=>'int'],
'openal_buffer_destroy' => ['bool', 'buffer'=>'resource'],
'openal_buffer_get' => ['int', 'buffer'=>'resource', 'property'=>'int'],
'openal_buffer_loadwav' => ['bool', 'buffer'=>'resource', 'wavfile'=>'string'],
'openal_context_create' => ['resource', 'device'=>'resource'],
'openal_context_current' => ['bool', 'context'=>'resource'],
'openal_context_destroy' => ['bool', 'context'=>'resource'],
'openal_context_process' => ['bool', 'context'=>'resource'],
'openal_context_suspend' => ['bool', 'context'=>'resource'],
'openal_device_close' => ['bool', 'device'=>'resource'],
'openal_device_open' => ['resource|false', 'device_desc='=>'string'],
'openal_listener_get' => ['mixed', 'property'=>'int'],
'openal_listener_set' => ['bool', 'property'=>'int', 'setting'=>'mixed'],
'openal_source_create' => ['resource'],
'openal_source_destroy' => ['bool', 'source'=>'resource'],
'openal_source_get' => ['mixed', 'source'=>'resource', 'property'=>'int'],
'openal_source_pause' => ['bool', 'source'=>'resource'],
'openal_source_play' => ['bool', 'source'=>'resource'],
'openal_source_rewind' => ['bool', 'source'=>'resource'],
'openal_source_set' => ['bool', 'source'=>'resource', 'property'=>'int', 'setting'=>'mixed'],
'openal_source_stop' => ['bool', 'source'=>'resource'],
'openal_stream' => ['resource', 'source'=>'resource', 'format'=>'int', 'rate'=>'int'],
'opendir' => ['resource|false', 'path'=>'string', 'context='=>'resource'],
'openlog' => ['bool', 'ident'=>'string', 'option'=>'int', 'facility'=>'int'],
'openssl_cipher_iv_length' => ['int|false', 'method'=>'string'],
'openssl_csr_export' => ['bool', 'csr'=>'string|resource', '&w_out'=>'string', 'notext='=>'bool'],
'openssl_csr_export_to_file' => ['bool', 'csr'=>'string|resource', 'outfilename'=>'string', 'notext='=>'bool'],
'openssl_csr_get_public_key' => ['resource|false', 'csr'=>'string|resource', 'use_shortnames='=>'bool'],
'openssl_csr_get_subject' => ['array|false', 'csr'=>'string|resource', 'use_shortnames='=>'bool'],
'openssl_csr_new' => ['resource|false', 'dn'=>'array', '&w_privkey'=>'resource', 'configargs='=>'array', 'extraattribs='=>'array'],
'openssl_csr_sign' => ['resource|false', 'csr'=>'string|resource', 'x509'=>'string|resource|null', 'priv_key'=>'string|resource|array', 'days'=>'int', 'config_args='=>'array', 'serial='=>'int'],
'openssl_decrypt' => ['string|false', 'data'=>'string', 'method'=>'string', 'key'=>'string', 'options='=>'int', 'iv='=>'string', 'tag='=>'string', 'aad='=>'string'],
'openssl_dh_compute_key' => ['string|false', 'pub_key'=>'string', 'dh_key'=>'resource'],
'openssl_digest' => ['string|false', 'data'=>'string', 'method'=>'string', 'raw_output='=>'bool'],
'openssl_encrypt' => ['string|false', 'data'=>'string', 'method'=>'string', 'key'=>'string', 'options='=>'int', 'iv='=>'string', '&w_tag='=>'string', 'aad='=>'string', 'tag_length='=>'int'],
'openssl_error_string' => ['string|false'],
'openssl_free_key' => ['void', 'key_identifier'=>'resource'],
'openssl_get_cert_locations' => ['array'],
'openssl_get_cipher_methods' => ['array', 'aliases='=>'bool'],
'openssl_get_curve_names' => ['list<string>|false'],
'openssl_get_md_methods' => ['array', 'aliases='=>'bool'],
'openssl_get_privatekey' => ['resource|false', 'key'=>'string', 'passphrase='=>'string'],
'openssl_get_publickey' => ['resource|false', 'cert'=>'resource|string'],
'openssl_open' => ['bool', 'sealed_data'=>'string', '&w_open_data'=>'string', 'env_key'=>'string', 'priv_key_id'=>'string|array|resource', 'method='=>'string', 'iv='=>'string'],
'openssl_pbkdf2' => ['string|false', 'password'=>'string', 'salt'=>'string', 'key_length'=>'int', 'iterations'=>'int', 'digest_algorithm'=>'string'],
'openssl_pkcs12_export' => ['bool', 'x509'=>'string|resource', '&w_out'=>'string', 'priv_key'=>'string|array|resource', 'pass'=>'string', 'args='=>'array'],
'openssl_pkcs12_export_to_file' => ['bool', 'x509'=>'string|resource', 'filename'=>'string', 'priv_key'=>'string|array|resource', 'pass'=>'string', 'args='=>'array'],
'openssl_pkcs12_read' => ['bool', 'pkcs12'=>'string', '&w_certs'=>'array', 'pass'=>'string'],
'openssl_pkcs7_decrypt' => ['bool', 'infilename'=>'string', 'outfilename'=>'string', 'recipcert'=>'string|resource', 'recipkey='=>'string|resource|array'],
'openssl_pkcs7_encrypt' => ['bool', 'infile'=>'string', 'outfile'=>'string', 'recipcerts'=>'string|resource|array', 'headers'=>'array', 'flags='=>'int', 'cipherid='=>'int'],
'openssl_pkcs7_read' => ['bool', 'infilename'=>'string', '&w_certs'=>'array'],
'openssl_pkcs7_sign' => ['bool', 'infile'=>'string', 'outfile'=>'string', 'signcert'=>'string|resource', 'privkey'=>'string|resource|array', 'headers'=>'array', 'flags='=>'int', 'extracerts='=>'string'],
'openssl_pkcs7_verify' => ['bool|int', 'filename'=>'string', 'flags'=>'int', 'outfilename='=>'string', 'cainfo='=>'array', 'extracerts='=>'string', 'content='=>'string', 'p7bfilename='=>'string'],
'openssl_pkey_derive' => ['string|false', 'pub_key'=>'resource', 'priv_key'=>'resource', 'keylen='=>'int'],
'openssl_pkey_export' => ['bool', 'key'=>'resource', '&w_out'=>'string', 'passphrase='=>'string|null', 'configargs='=>'array'],
'openssl_pkey_export_to_file' => ['bool', 'key'=>'resource|string|array', 'outfilename'=>'string', 'passphrase='=>'string|null', 'configargs='=>'array'],
'openssl_pkey_free' => ['void', 'key'=>'resource'],
'openssl_pkey_get_details' => ['array|false', 'key'=>'resource'],
'openssl_pkey_get_private' => ['resource|false', 'key'=>'string', 'passphrase='=>'string'],
'openssl_pkey_get_public' => ['resource|false', 'certificate'=>'resource|string'],
'openssl_pkey_new' => ['resource|false', 'configargs='=>'array'],
'openssl_private_decrypt' => ['bool', 'data'=>'string', '&w_decrypted'=>'string', 'key'=>'string|resource|array', 'padding='=>'int'],
'openssl_private_encrypt' => ['bool', 'data'=>'string', '&w_crypted'=>'string', 'key'=>'string|resource|array', 'padding='=>'int'],
'openssl_public_decrypt' => ['bool', 'data'=>'string', '&w_decrypted'=>'string', 'key'=>'string|resource', 'padding='=>'int'],
'openssl_public_encrypt' => ['bool', 'data'=>'string', '&w_crypted'=>'string', 'key'=>'string|resource', 'padding='=>'int'],
'openssl_random_pseudo_bytes' => ['string|false', 'length'=>'int', '&w_crypto_strong='=>'bool'],
'openssl_seal' => ['int|false', 'data'=>'string', '&w_sealed_data'=>'string', '&w_env_keys'=>'array', 'pub_key_ids'=>'array', 'method='=>'string', '&w_iv='=>'string'],
'openssl_sign' => ['bool', 'data'=>'string', '&w_signature'=>'string', 'priv_key_id'=>'resource|string', 'signature_alg='=>'int|string'],
'openssl_spki_export' => ['string|null|false', 'spkac'=>'string'],
'openssl_spki_export_challenge' => ['string|null|false', 'spkac'=>'string'],
'openssl_spki_new' => ['string|null|false', 'privkey'=>'resource', 'challenge'=>'string', 'algorithm='=>'int'],
'openssl_spki_verify' => ['bool', 'spkac'=>'string'],
'openssl_verify' => ['-1|0|1|false', 'data'=>'string', 'signature'=>'string', 'pub_key_id'=>'resource|string', 'signature_alg='=>'int|string'],
'openssl_x509_check_private_key' => ['bool', 'cert'=>'string|resource', 'key'=>'string|resource|array'],
'openssl_x509_checkpurpose' => ['bool|int', 'x509cert'=>'string|resource', 'purpose'=>'int', 'cainfo='=>'array', 'untrustedfile='=>'string'],
'openssl_x509_export' => ['bool', 'x509'=>'string|resource', '&w_output'=>'string', 'notext='=>'bool'],
'openssl_x509_export_to_file' => ['bool', 'x509'=>'string|resource', 'outfilename'=>'string', 'notext='=>'bool'],
'openssl_x509_fingerprint' => ['string|false', 'x509'=>'string|resource', 'hash_algorithm='=>'string', 'raw_output='=>'bool'],
'openssl_x509_free' => ['void', 'x509'=>'resource'],
'openssl_x509_parse' => ['array|false', 'x509cert'=>'string|resource', 'shortnames='=>'bool'],
'openssl_x509_read' => ['resource|false', 'x509certdata'=>'string|resource'],
'ord' => ['int<0, 255>', 'character'=>'string'],
'OuterIterator::getInnerIterator' => ['Iterator'],
'OutOfBoundsException::__clone' => ['void'],
'OutOfBoundsException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Throwable)|(?OutOfBoundsException)'],
'OutOfBoundsException::__toString' => ['string'],
'OutOfBoundsException::getCode' => ['int'],
'OutOfBoundsException::getFile' => ['string'],
'OutOfBoundsException::getLine' => ['int'],
'OutOfBoundsException::getMessage' => ['string'],
'OutOfBoundsException::getPrevious' => ['Throwable|OutOfBoundsException|null'],
'OutOfBoundsException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'OutOfBoundsException::getTraceAsString' => ['string'],
'OutOfRangeException::__clone' => ['void'],
'OutOfRangeException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Throwable)|(?OutOfRangeException)'],
'OutOfRangeException::__toString' => ['string'],
'OutOfRangeException::getCode' => ['int'],
'OutOfRangeException::getFile' => ['string'],
'OutOfRangeException::getLine' => ['int'],
'OutOfRangeException::getMessage' => ['string'],
'OutOfRangeException::getPrevious' => ['Throwable|OutOfRangeException|null'],
'OutOfRangeException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'OutOfRangeException::getTraceAsString' => ['string'],
'output_add_rewrite_var' => ['bool', 'name'=>'string', 'value'=>'string'],
'output_reset_rewrite_vars' => ['bool'],
'OverflowException::__clone' => ['void'],
'OverflowException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Throwable)|(?OverflowException)'],
'OverflowException::__toString' => ['string'],
'OverflowException::getCode' => ['int'],
'OverflowException::getFile' => ['string'],
'OverflowException::getLine' => ['int'],
'OverflowException::getMessage' => ['string'],
'OverflowException::getPrevious' => ['Throwable|OverflowException|null'],
'OverflowException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'OverflowException::getTraceAsString' => ['string'],
'overload' => ['', 'class_name'=>'string'],
'override_function' => ['bool', 'function_name'=>'string', 'function_args'=>'string', 'function_code'=>'string'],
'pack' => ['string', 'format'=>'string', '...args='=>'mixed'],
'ParentIterator::__construct' => ['void', 'iterator'=>'RecursiveIterator'],
'ParentIterator::accept' => ['bool'],
'ParentIterator::getChildren' => ['ParentIterator'],
'ParentIterator::hasChildren' => ['bool'],
'ParentIterator::next' => ['void'],
'ParentIterator::rewind' => ['void'],
'ParentIterator::valid' => [''],
'Parle\Lexer::advance' => ['void'],
'Parle\Lexer::build' => ['void'],
'Parle\Lexer::callout' => ['void', 'id'=>'int', 'callback'=>'callable'],
'Parle\Lexer::consume' => ['void', 'data'=>'string'],
'Parle\Lexer::dump' => ['void'],
'Parle\Lexer::getToken' => ['Parle\Token'],
'Parle\Lexer::insertMacro' => ['void', 'name'=>'string', 'regex'=>'string'],
'Parle\Lexer::push' => ['void', 'regex'=>'string', 'id'=>'int'],
'Parle\Lexer::reset' => ['void', 'pos'=>'int'],
'Parle\Parser::advance' => ['void'],
'Parle\Parser::build' => ['void'],
'Parle\Parser::consume' => ['void', 'data'=>'string', 'lexer'=>'Parle\Lexer'],
'Parle\Parser::dump' => ['void'],
'Parle\Parser::errorInfo' => ['Parle\ErrorInfo'],
'Parle\Parser::left' => ['void', 'token'=>'string'],
'Parle\Parser::nonassoc' => ['void', 'token'=>'string'],
'Parle\Parser::precedence' => ['void', 'token'=>'string'],
'Parle\Parser::push' => ['int', 'name'=>'string', 'rule'=>'string'],
'Parle\Parser::reset' => ['void', 'tokenId'=>'int'],
'Parle\Parser::right' => ['void', 'token'=>'string'],
'Parle\Parser::sigil' => ['string', 'idx'=>'array'],
'Parle\Parser::token' => ['void', 'token'=>'string'],
'Parle\Parser::tokenId' => ['int', 'token'=>'string'],
'Parle\Parser::trace' => ['string'],
'Parle\Parser::validate' => ['bool', 'data'=>'string', 'lexer'=>'Parle\Lexer'],
'Parle\RLexer::advance' => ['void'],
'Parle\RLexer::build' => ['void'],
'Parle\RLexer::callout' => ['void', 'id'=>'int', 'callback'=>'callable'],
'Parle\RLexer::consume' => ['void', 'data'=>'string'],
'Parle\RLexer::dump' => ['void'],
'Parle\RLexer::getToken' => ['Parle\Token'],
'Parle\RLexer::push' => ['void', 'state'=>'string', 'regex'=>'string', 'newState'=>'string'],
'Parle\RLexer::pushState' => ['int', 'state'=>'string'],
'Parle\RLexer::reset' => ['void', 'pos'=>'int'],
'Parle\RParser::advance' => ['void'],
'Parle\RParser::build' => ['void'],
'Parle\RParser::consume' => ['void', 'data'=>'string', 'lexer'=>'Parle\Lexer'],
'Parle\RParser::dump' => ['void'],
'Parle\RParser::errorInfo' => ['Parle\ErrorInfo'],
'Parle\RParser::left' => ['void', 'token'=>'string'],
'Parle\RParser::nonassoc' => ['void', 'token'=>'string'],
'Parle\RParser::precedence' => ['void', 'token'=>'string'],
'Parle\RParser::push' => ['int', 'name'=>'string', 'rule'=>'string'],
'Parle\RParser::reset' => ['void', 'tokenId'=>'int'],
'Parle\RParser::right' => ['void', 'token'=>'string'],
'Parle\RParser::sigil' => ['string', 'idx'=>'array'],
'Parle\RParser::token' => ['void', 'token'=>'string'],
'Parle\RParser::tokenId' => ['int', 'token'=>'string'],
'Parle\RParser::trace' => ['string'],
'Parle\RParser::validate' => ['bool', 'data'=>'string', 'lexer'=>'Parle\Lexer'],
'Parle\Stack::pop' => ['void'],
'Parle\Stack::push' => ['void', 'item'=>''],
'parse_ini_file' => ['array|false', 'filename'=>'string', 'process_sections='=>'bool', 'scanner_mode='=>'int'],
'parse_ini_string' => ['array|false', 'ini_string'=>'string', 'process_sections='=>'bool', 'scanner_mode='=>'int'],
'parse_str' => ['void', 'encoded_string'=>'string', '&w_result='=>'array'],
'parse_url' => ['array|int|string|false|null', 'url'=>'string', 'url_component='=>'int'],
'ParseError::__clone' => ['void'],
'ParseError::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Throwable)|(?ParseError)'],
'ParseError::__toString' => ['string'],
'ParseError::getCode' => ['int'],
'ParseError::getFile' => ['string'],
'ParseError::getLine' => ['int'],
'ParseError::getMessage' => ['string'],
'ParseError::getPrevious' => ['Throwable|ParseError|null'],
'ParseError::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'ParseError::getTraceAsString' => ['string'],
'parsekit_compile_file' => ['array', 'filename'=>'string', 'errors='=>'array', 'options='=>'int'],
'parsekit_compile_string' => ['array', 'phpcode'=>'string', 'errors='=>'array', 'options='=>'int'],
'parsekit_func_arginfo' => ['array', 'function'=>'mixed'],
'passthru' => ['void', 'command'=>'string', '&w_return_value='=>'int'],
'password_get_info' => ['array', 'hash'=>'string'],
'password_hash' => ['__benevolent<non-empty-string|false|null>', 'password'=>'string', 'algo'=>'int', 'options='=>'array'],
'password_make_salt' => ['bool', 'password'=>'string', 'hash'=>'string'],
'password_needs_rehash' => ['bool', 'hash'=>'string', 'algo'=>'int', 'options='=>'array'],
'password_verify' => ['bool', 'password'=>'string', 'hash'=>'string'],
'pathinfo' => ['array|string', 'path'=>'string', 'options='=>'int'],
'pclose' => ['int', 'fp'=>'resource'],
'pcnlt_sigwaitinfo' => ['int', 'set'=>'array', '&w_siginfo'=>'array'],
'pcntl_alarm' => ['int', 'seconds'=>'int'],
'pcntl_async_signals' => ['bool', 'on='=>'bool'],
'pcntl_errno' => ['int'],
'pcntl_exec' => ['bool', 'path'=>'string', 'args='=>'array', 'envs='=>'array'],
'pcntl_fork' => ['int'],
'pcntl_get_last_error' => ['int'],
'pcntl_getpriority' => ['int|false', 'pid='=>'int', 'process_identifier='=>'int'],
'pcntl_setpriority' => ['bool', 'priority'=>'int', 'pid='=>'int', 'process_identifier='=>'int'],
'pcntl_signal' => ['bool', 'signo'=>'int', 'handle'=>'callable|int', 'restart_syscalls='=>'bool'],
'pcntl_signal_dispatch' => ['bool'],
'pcntl_signal_get_handler' => ['int|string', 'signo'=>'int'],
'pcntl_sigprocmask' => ['bool', 'how'=>'int', 'set'=>'array', '&w_oldset='=>'array'],
'pcntl_sigtimedwait' => ['int|false', 'set'=>'array', '&w_siginfo='=>'array', 'seconds='=>'int', 'nanoseconds='=>'int'],
'pcntl_sigwaitinfo' => ['int|false', 'set'=>'array', '&w_siginfo='=>'array'],
'pcntl_strerror' => ['string', 'errno'=>'int'],
'pcntl_wait' => ['int', '&w_status'=>'int', 'options='=>'int', '&w_rusage='=>'array'],
'pcntl_waitpid' => ['int', 'pid'=>'int', '&w_status'=>'int', 'options='=>'int', '&w_rusage='=>'array'],
'pcntl_wexitstatus' => ['int|false', 'status'=>'int'],
'pcntl_wifcontinued' => ['bool', 'status'=>'int'],
'pcntl_wifexited' => ['bool', 'status'=>'int'],
'pcntl_wifsignaled' => ['bool', 'status'=>'int'],
'pcntl_wifstopped' => ['bool', 'status'=>'int'],
'pcntl_wstopsig' => ['int|false', 'status'=>'int'],
'pcntl_wtermsig' => ['int|false', 'status'=>'int'],
'PDF_activate_item' => ['bool', 'pdfdoc'=>'resource', 'id'=>'int'],
'PDF_add_launchlink' => ['bool', 'pdfdoc'=>'resource', 'llx'=>'float', 'lly'=>'float', 'urx'=>'float', 'ury'=>'float', 'filename'=>'string'],
'PDF_add_locallink' => ['bool', 'pdfdoc'=>'resource', 'lowerleftx'=>'float', 'lowerlefty'=>'float', 'upperrightx'=>'float', 'upperrighty'=>'float', 'page'=>'int', 'dest'=>'string'],
'PDF_add_nameddest' => ['bool', 'pdfdoc'=>'resource', 'name'=>'string', 'optlist'=>'string'],
'PDF_add_note' => ['bool', 'pdfdoc'=>'resource', 'llx'=>'float', 'lly'=>'float', 'urx'=>'float', 'ury'=>'float', 'contents'=>'string', 'title'=>'string', 'icon'=>'string', 'open'=>'int'],
'PDF_add_pdflink' => ['bool', 'pdfdoc'=>'resource', 'bottom_left_x'=>'float', 'bottom_left_y'=>'float', 'up_right_x'=>'float', 'up_right_y'=>'float', 'filename'=>'string', 'page'=>'int', 'dest'=>'string'],
'PDF_add_table_cell' => ['int', 'pdfdoc'=>'resource', 'table'=>'int', 'column'=>'int', 'row'=>'int', 'text'=>'string', 'optlist'=>'string'],
'PDF_add_textflow' => ['int', 'pdfdoc'=>'resource', 'textflow'=>'int', 'text'=>'string', 'optlist'=>'string'],
'PDF_add_thumbnail' => ['bool', 'pdfdoc'=>'resource', 'image'=>'int'],
'PDF_add_weblink' => ['bool', 'pdfdoc'=>'resource', 'lowerleftx'=>'float', 'lowerlefty'=>'float', 'upperrightx'=>'float', 'upperrighty'=>'float', 'url'=>'string'],
'PDF_arc' => ['bool', 'p'=>'resource', 'x'=>'float', 'y'=>'float', 'r'=>'float', 'alpha'=>'float', 'beta'=>'float'],
'PDF_arcn' => ['bool', 'p'=>'resource', 'x'=>'float', 'y'=>'float', 'r'=>'float', 'alpha'=>'float', 'beta'=>'float'],
'PDF_attach_file' => ['bool', 'pdfdoc'=>'resource', 'llx'=>'float', 'lly'=>'float', 'urx'=>'float', 'ury'=>'float', 'filename'=>'string', 'description'=>'string', 'author'=>'string', 'mimetype'=>'string', 'icon'=>'string'],
'PDF_begin_document' => ['int', 'pdfdoc'=>'resource', 'filename'=>'string', 'optlist'=>'string'],
'PDF_begin_font' => ['bool', 'pdfdoc'=>'resource', 'filename'=>'string', 'a'=>'float', 'b'=>'float', 'c'=>'float', 'd'=>'float', 'e'=>'float', 'f'=>'float', 'optlist'=>'string'],
'PDF_begin_glyph' => ['bool', 'pdfdoc'=>'resource', 'glyphname'=>'string', 'wx'=>'float', 'llx'=>'float', 'lly'=>'float', 'urx'=>'float', 'ury'=>'float'],
'PDF_begin_item' => ['int', 'pdfdoc'=>'resource', 'tag'=>'string', 'optlist'=>'string'],
'PDF_begin_layer' => ['bool', 'pdfdoc'=>'resource', 'layer'=>'int'],
'PDF_begin_page' => ['bool', 'pdfdoc'=>'resource', 'width'=>'float', 'height'=>'float'],
'PDF_begin_page_ext' => ['bool', 'pdfdoc'=>'resource', 'width'=>'float', 'height'=>'float', 'optlist'=>'string'],
'PDF_begin_pattern' => ['int', 'pdfdoc'=>'resource', 'width'=>'float', 'height'=>'float', 'xstep'=>'float', 'ystep'=>'float', 'painttype'=>'int'],
'PDF_begin_template' => ['int', 'pdfdoc'=>'resource', 'width'=>'float', 'height'=>'float'],
'PDF_begin_template_ext' => ['int', 'pdfdoc'=>'resource', 'width'=>'float', 'height'=>'float', 'optlist'=>'string'],
'PDF_circle' => ['bool', 'pdfdoc'=>'resource', 'x'=>'float', 'y'=>'float', 'r'=>'float'],
'PDF_clip' => ['bool', 'p'=>'resource'],
'PDF_close' => ['bool', 'p'=>'resource'],
'PDF_close_image' => ['bool', 'p'=>'resource', 'image'=>'int'],
'PDF_close_pdi' => ['bool', 'p'=>'resource', 'doc'=>'int'],
'PDF_close_pdi_page' => ['bool', 'p'=>'resource', 'page'=>'int'],
'PDF_closepath' => ['bool', 'p'=>'resource'],
'PDF_closepath_fill_stroke' => ['bool', 'p'=>'resource'],
'PDF_closepath_stroke' => ['bool', 'p'=>'resource'],
'PDF_concat' => ['bool', 'p'=>'resource', 'a'=>'float', 'b'=>'float', 'c'=>'float', 'd'=>'float', 'e'=>'float', 'f'=>'float'],
'PDF_continue_text' => ['bool', 'p'=>'resource', 'text'=>'string'],
'PDF_create_3dview' => ['int', 'pdfdoc'=>'resource', 'username'=>'string', 'optlist'=>'string'],
'PDF_create_action' => ['int', 'pdfdoc'=>'resource', 'type'=>'string', 'optlist'=>'string'],
'PDF_create_annotation' => ['bool', 'pdfdoc'=>'resource', 'llx'=>'float', 'lly'=>'float', 'urx'=>'float', 'ury'=>'float', 'type'=>'string', 'optlist'=>'string'],
'PDF_create_bookmark' => ['int', 'pdfdoc'=>'resource', 'text'=>'string', 'optlist'=>'string'],
'PDF_create_field' => ['bool', 'pdfdoc'=>'resource', 'llx'=>'float', 'lly'=>'float', 'urx'=>'float', 'ury'=>'float', 'name'=>'string', 'type'=>'string', 'optlist'=>'string'],
'PDF_create_fieldgroup' => ['bool', 'pdfdoc'=>'resource', 'name'=>'string', 'optlist'=>'string'],
'PDF_create_gstate' => ['int', 'pdfdoc'=>'resource', 'optlist'=>'string'],
'PDF_create_pvf' => ['bool', 'pdfdoc'=>'resource', 'filename'=>'string', 'data'=>'string', 'optlist'=>'string'],
'PDF_create_textflow' => ['int', 'pdfdoc'=>'resource', 'text'=>'string', 'optlist'=>'string'],
'PDF_curveto' => ['bool', 'p'=>'resource', 'x1'=>'float', 'y1'=>'float', 'x2'=>'float', 'y2'=>'float', 'x3'=>'float', 'y3'=>'float'],
'PDF_define_layer' => ['int', 'pdfdoc'=>'resource', 'name'=>'string', 'optlist'=>'string'],
'PDF_delete' => ['bool', 'pdfdoc'=>'resource'],
'PDF_delete_pvf' => ['int', 'pdfdoc'=>'resource', 'filename'=>'string'],
'PDF_delete_table' => ['bool', 'pdfdoc'=>'resource', 'table'=>'int', 'optlist'=>'string'],
'PDF_delete_textflow' => ['bool', 'pdfdoc'=>'resource', 'textflow'=>'int'],
'PDF_encoding_set_char' => ['bool', 'pdfdoc'=>'resource', 'encoding'=>'string', 'slot'=>'int', 'glyphname'=>'string', 'uv'=>'int'],
'PDF_end_document' => ['bool', 'pdfdoc'=>'resource', 'optlist'=>'string'],
'PDF_end_font' => ['bool', 'pdfdoc'=>'resource'],
'PDF_end_glyph' => ['bool', 'pdfdoc'=>'resource'],
'PDF_end_item' => ['bool', 'pdfdoc'=>'resource', 'id'=>'int'],
'PDF_end_layer' => ['bool', 'pdfdoc'=>'resource'],
'PDF_end_page' => ['bool', 'p'=>'resource'],
'PDF_end_page_ext' => ['bool', 'pdfdoc'=>'resource', 'optlist'=>'string'],
'PDF_end_pattern' => ['bool', 'p'=>'resource'],
'PDF_end_template' => ['bool', 'p'=>'resource'],
'PDF_endpath' => ['bool', 'p'=>'resource'],
'PDF_fill' => ['bool', 'p'=>'resource'],
'PDF_fill_imageblock' => ['int', 'pdfdoc'=>'resource', 'page'=>'int', 'blockname'=>'string', 'image'=>'int', 'optlist'=>'string'],
'PDF_fill_pdfblock' => ['int', 'pdfdoc'=>'resource', 'page'=>'int', 'blockname'=>'string', 'contents'=>'int', 'optlist'=>'string'],
'PDF_fill_stroke' => ['bool', 'p'=>'resource'],
'PDF_fill_textblock' => ['int', 'pdfdoc'=>'resource', 'page'=>'int', 'blockname'=>'string', 'text'=>'string', 'optlist'=>'string'],
'PDF_findfont' => ['int', 'p'=>'resource', 'fontname'=>'string', 'encoding'=>'string', 'embed'=>'int'],
'PDF_fit_image' => ['bool', 'pdfdoc'=>'resource', 'image'=>'int', 'x'=>'float', 'y'=>'float', 'optlist'=>'string'],
'PDF_fit_pdi_page' => ['bool', 'pdfdoc'=>'resource', 'page'=>'int', 'x'=>'float', 'y'=>'float', 'optlist'=>'string'],
'PDF_fit_table' => ['string', 'pdfdoc'=>'resource', 'table'=>'int', 'llx'=>'float', 'lly'=>'float', 'urx'=>'float', 'ury'=>'float', 'optlist'=>'string'],
'PDF_fit_textflow' => ['string', 'pdfdoc'=>'resource', 'textflow'=>'int', 'llx'=>'float', 'lly'=>'float', 'urx'=>'float', 'ury'=>'float', 'optlist'=>'string'],
'PDF_fit_textline' => ['bool', 'pdfdoc'=>'resource', 'text'=>'string', 'x'=>'float', 'y'=>'float', 'optlist'=>'string'],
'PDF_get_apiname' => ['string', 'pdfdoc'=>'resource'],
'PDF_get_buffer' => ['string', 'p'=>'resource'],
'PDF_get_errmsg' => ['string', 'pdfdoc'=>'resource'],
'PDF_get_errnum' => ['int', 'pdfdoc'=>'resource'],
'PDF_get_majorversion' => ['int'],
'PDF_get_minorversion' => ['int'],
'PDF_get_parameter' => ['string', 'p'=>'resource', 'key'=>'string', 'modifier'=>'float'],
'PDF_get_pdi_parameter' => ['string', 'p'=>'resource', 'key'=>'string', 'doc'=>'int', 'page'=>'int', 'reserved'=>'int'],
'PDF_get_pdi_value' => ['float', 'p'=>'resource', 'key'=>'string', 'doc'=>'int', 'page'=>'int', 'reserved'=>'int'],
'PDF_get_value' => ['float', 'p'=>'resource', 'key'=>'string', 'modifier'=>'float'],
'PDF_info_font' => ['float', 'pdfdoc'=>'resource', 'font'=>'int', 'keyword'=>'string', 'optlist'=>'string'],
'PDF_info_matchbox' => ['float', 'pdfdoc'=>'resource', 'boxname'=>'string', 'num'=>'int', 'keyword'=>'string'],
'PDF_info_table' => ['float', 'pdfdoc'=>'resource', 'table'=>'int', 'keyword'=>'string'],
'PDF_info_textflow' => ['float', 'pdfdoc'=>'resource', 'textflow'=>'int', 'keyword'=>'string'],
'PDF_info_textline' => ['float', 'pdfdoc'=>'resource', 'text'=>'string', 'keyword'=>'string', 'optlist'=>'string'],
'PDF_initgraphics' => ['bool', 'p'=>'resource'],
'PDF_lineto' => ['bool', 'p'=>'resource', 'x'=>'float', 'y'=>'float'],
'PDF_load_3ddata' => ['int', 'pdfdoc'=>'resource', 'filename'=>'string', 'optlist'=>'string'],
'PDF_load_font' => ['int', 'pdfdoc'=>'resource', 'fontname'=>'string', 'encoding'=>'string', 'optlist'=>'string'],
'PDF_load_iccprofile' => ['int', 'pdfdoc'=>'resource', 'profilename'=>'string', 'optlist'=>'string'],
'PDF_load_image' => ['int', 'pdfdoc'=>'resource', 'imagetype'=>'string', 'filename'=>'string', 'optlist'=>'string'],
'PDF_makespotcolor' => ['int', 'p'=>'resource', 'spotname'=>'string'],
'PDF_moveto' => ['bool', 'p'=>'resource', 'x'=>'float', 'y'=>'float'],
'PDF_new' => ['resource'],
'PDF_open_ccitt' => ['int', 'pdfdoc'=>'resource', 'filename'=>'string', 'width'=>'int', 'height'=>'int', 'bitreverse'=>'int', 'k'=>'int', 'blackls1'=>'int'],
'PDF_open_file' => ['bool', 'p'=>'resource', 'filename'=>'string'],
'PDF_open_image' => ['int', 'p'=>'resource', 'imagetype'=>'string', 'source'=>'string', 'data'=>'string', 'length'=>'int', 'width'=>'int', 'height'=>'int', 'components'=>'int', 'bpc'=>'int', 'params'=>'string'],
'PDF_open_image_file' => ['int', 'p'=>'resource', 'imagetype'=>'string', 'filename'=>'string', 'stringparam'=>'string', 'intparam'=>'int'],
'PDF_open_memory_image' => ['int', 'p'=>'resource', 'image'=>'resource'],
'PDF_open_pdi' => ['int', 'pdfdoc'=>'resource', 'filename'=>'string', 'optlist'=>'string', 'len'=>'int'],
'PDF_open_pdi_document' => ['int', 'p'=>'resource', 'filename'=>'string', 'optlist'=>'string'],
'PDF_open_pdi_page' => ['int', 'p'=>'resource', 'doc'=>'int', 'pagenumber'=>'int', 'optlist'=>'string'],
'PDF_pcos_get_number' => ['float', 'p'=>'resource', 'doc'=>'int', 'path'=>'string'],
'PDF_pcos_get_stream' => ['string', 'p'=>'resource', 'doc'=>'int', 'optlist'=>'string', 'path'=>'string'],
'PDF_pcos_get_string' => ['string', 'p'=>'resource', 'doc'=>'int', 'path'=>'string'],
'PDF_place_image' => ['bool', 'pdfdoc'=>'resource', 'image'=>'int', 'x'=>'float', 'y'=>'float', 'scale'=>'float'],
'PDF_place_pdi_page' => ['bool', 'pdfdoc'=>'resource', 'page'=>'int', 'x'=>'float', 'y'=>'float', 'sx'=>'float', 'sy'=>'float'],
'PDF_process_pdi' => ['int', 'pdfdoc'=>'resource', 'doc'=>'int', 'page'=>'int', 'optlist'=>'string'],
'PDF_rect' => ['bool', 'p'=>'resource', 'x'=>'float', 'y'=>'float', 'width'=>'float', 'height'=>'float'],
'PDF_restore' => ['bool', 'p'=>'resource'],
'PDF_resume_page' => ['bool', 'pdfdoc'=>'resource', 'optlist'=>'string'],
'PDF_rotate' => ['bool', 'p'=>'resource', 'phi'=>'float'],
'PDF_save' => ['bool', 'p'=>'resource'],
'PDF_scale' => ['bool', 'p'=>'resource', 'sx'=>'float', 'sy'=>'float'],
'PDF_set_border_color' => ['bool', 'p'=>'resource', 'red'=>'float', 'green'=>'float', 'blue'=>'float'],
'PDF_set_border_dash' => ['bool', 'pdfdoc'=>'resource', 'black'=>'float', 'white'=>'float'],
'PDF_set_border_style' => ['bool', 'pdfdoc'=>'resource', 'style'=>'string', 'width'=>'float'],
'PDF_set_gstate' => ['bool', 'pdfdoc'=>'resource', 'gstate'=>'int'],
'PDF_set_info' => ['bool', 'p'=>'resource', 'key'=>'string', 'value'=>'string'],
'PDF_set_layer_dependency' => ['bool', 'pdfdoc'=>'resource', 'type'=>'string', 'optlist'=>'string'],
'PDF_set_parameter' => ['bool', 'p'=>'resource', 'key'=>'string', 'value'=>'string'],
'PDF_set_text_pos' => ['bool', 'p'=>'resource', 'x'=>'float', 'y'=>'float'],
'PDF_set_value' => ['bool', 'p'=>'resource', 'key'=>'string', 'value'=>'float'],
'PDF_setcolor' => ['bool', 'p'=>'resource', 'fstype'=>'string', 'colorspace'=>'string', 'c1'=>'float', 'c2'=>'float', 'c3'=>'float', 'c4'=>'float'],
'PDF_setdash' => ['bool', 'pdfdoc'=>'resource', 'b'=>'float', 'w'=>'float'],
'PDF_setdashpattern' => ['bool', 'pdfdoc'=>'resource', 'optlist'=>'string'],
'PDF_setflat' => ['bool', 'pdfdoc'=>'resource', 'flatness'=>'float'],
'PDF_setfont' => ['bool', 'pdfdoc'=>'resource', 'font'=>'int', 'fontsize'=>'float'],
'PDF_setgray' => ['bool', 'p'=>'resource', 'g'=>'float'],
'PDF_setgray_fill' => ['bool', 'p'=>'resource', 'g'=>'float'],
'PDF_setgray_stroke' => ['bool', 'p'=>'resource', 'g'=>'float'],
'PDF_setlinecap' => ['bool', 'p'=>'resource', 'linecap'=>'int'],
'PDF_setlinejoin' => ['bool', 'p'=>'resource', 'value'=>'int'],
'PDF_setlinewidth' => ['bool', 'p'=>'resource', 'width'=>'float'],
'PDF_setmatrix' => ['bool', 'p'=>'resource', 'a'=>'float', 'b'=>'float', 'c'=>'float', 'd'=>'float', 'e'=>'float', 'f'=>'float'],
'PDF_setmiterlimit' => ['bool', 'pdfdoc'=>'resource', 'miter'=>'float'],
'PDF_setrgbcolor' => ['bool', 'p'=>'resource', 'red'=>'float', 'green'=>'float', 'blue'=>'float'],
'PDF_setrgbcolor_fill' => ['bool', 'p'=>'resource', 'red'=>'float', 'green'=>'float', 'blue'=>'float'],
'PDF_setrgbcolor_stroke' => ['bool', 'p'=>'resource', 'red'=>'float', 'green'=>'float', 'blue'=>'float'],
'PDF_shading' => ['int', 'pdfdoc'=>'resource', 'shtype'=>'string', 'x0'=>'float', 'y0'=>'float', 'x1'=>'float', 'y1'=>'float', 'c1'=>'float', 'c2'=>'float', 'c3'=>'float', 'c4'=>'float', 'optlist'=>'string'],
'PDF_shading_pattern' => ['int', 'pdfdoc'=>'resource', 'shading'=>'int', 'optlist'=>'string'],
'PDF_shfill' => ['bool', 'pdfdoc'=>'resource', 'shading'=>'int'],
'PDF_show' => ['bool', 'pdfdoc'=>'resource', 'text'=>'string'],
'PDF_show_boxed' => ['int', 'p'=>'resource', 'text'=>'string', 'left'=>'float', 'top'=>'float', 'width'=>'float', 'height'=>'float', 'mode'=>'string', 'feature'=>'string'],
'PDF_show_xy' => ['bool', 'p'=>'resource', 'text'=>'string', 'x'=>'float', 'y'=>'float'],
'PDF_skew' => ['bool', 'p'=>'resource', 'alpha'=>'float', 'beta'=>'float'],
'PDF_stringwidth' => ['float', 'p'=>'resource', 'text'=>'string', 'font'=>'int', 'fontsize'=>'float'],
'PDF_stroke' => ['bool', 'p'=>'resource'],
'PDF_suspend_page' => ['bool', 'pdfdoc'=>'resource', 'optlist'=>'string'],
'PDF_translate' => ['bool', 'p'=>'resource', 'tx'=>'float', 'ty'=>'float'],
'PDF_utf16_to_utf8' => ['string', 'pdfdoc'=>'resource', 'utf16string'=>'string'],
'PDF_utf32_to_utf16' => ['string', 'pdfdoc'=>'resource', 'utf32string'=>'string', 'ordering'=>'string'],
'PDF_utf8_to_utf16' => ['string', 'pdfdoc'=>'resource', 'utf8string'=>'string', 'ordering'=>'string'],
'PDO::__construct' => ['void', 'dsn'=>'string', 'username='=>'?string', 'passwd='=>'?string', 'options='=>'?array'],
'PDO::__sleep' => ['list<string>'],
'PDO::__wakeup' => ['void'],
'PDO::beginTransaction' => ['bool'],
'PDO::commit' => ['bool'],
'PDO::cubrid_schema' => ['array', 'schema_type'=>'int', 'table_name='=>'string', 'col_name='=>'string'],
'PDO::errorCode' => ['string'],
'PDO::errorInfo' => ['array'],
'PDO::exec' => ['int|false', 'query'=>'string'],
'PDO::getAttribute' => ['', 'attribute'=>'int'],
'PDO::getAvailableDrivers' => ['array'],
'PDO::inTransaction' => ['bool'],
'PDO::lastInsertId' => ['string|false', 'seqname='=>'string'],
'PDO::pgsqlCopyFromArray' => ['bool', 'table_name'=>'string', 'rows'=>'array', 'delimiter='=>'string', 'null_as='=>'string', 'fields='=>'string'],
'PDO::pgsqlCopyFromFile' => ['bool', 'table_name'=>'string', 'filename'=>'string', 'delimiter='=>'string', 'null_as='=>'string', 'fields='=>'string'],
'PDO::pgsqlCopyToArray' => ['array', 'table_name'=>'string', 'delimiter='=>'string', 'null_as='=>'string', 'fields='=>'string'],
'PDO::pgsqlCopyToFile' => ['bool', 'table_name'=>'string', 'filename'=>'string', 'delimiter='=>'string', 'null_as='=>'string', 'fields='=>'string'],
'PDO::pgsqlGetNotify' => ['array', 'result_type='=>'int', 'ms_timeout='=>'int'],
'PDO::pgsqlGetPid' => ['int'],
'PDO::pgsqlLOBCreate' => ['string'],
'PDO::pgsqlLOBOpen' => ['resource', 'oid'=>'string', 'mode='=>'string'],
'PDO::pgsqlLOBUnlink' => ['bool', 'oid'=>'string'],
'PDO::prepare' => ['__benevolent<PDOStatement|false>', 'statement'=>'string', 'options='=>'array'],
'PDO::query' => ['PDOStatement|false', 'sql'=>'string'],
'PDO::query\'1' => ['PDOStatement|false', 'sql'=>'string', 'fetch_column'=>'int', 'colno'=>'int'],
'PDO::query\'2' => ['PDOStatement|false', 'sql'=>'string', 'fetch_class'=>'int', 'classname'=>'string', 'ctorargs'=>'array'],
'PDO::query\'3' => ['PDOStatement|false', 'sql'=>'string', 'fetch_into'=>'int', 'object'=>'object'],
'PDO::quote' => ['string', 'string'=>'string', 'paramtype='=>'int'],
'PDO::rollBack' => ['bool'],
'PDO::setAttribute' => ['bool', 'attribute'=>'int', 'value'=>''],
'PDO::sqliteCreateAggregate' => ['bool', 'function_name'=>'string', 'step_func'=>'callable', 'finalize_func'=>'callable', 'num_args='=>'int'],
'PDO::sqliteCreateCollation' => ['bool', 'name'=>'string', 'callback'=>'callable'],
'PDO::sqliteCreateFunction' => ['bool', 'function_name'=>'string', 'callback'=>'callable', 'num_args='=>'int', 'flags='=>'int'],
'pdo_drivers' => ['array'],
'PDOException::getCode' => [''],
'PDOException::getFile' => [''],
'PDOException::getLine' => [''],
'PDOException::getMessage' => [''],
'PDOException::getPrevious' => [''],
'PDOException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'PDOException::getTraceAsString' => [''],
'PDOStatement::__sleep' => ['list<string>'],
'PDOStatement::__wakeup' => ['void'],
'PDOStatement::bindColumn' => ['bool', 'column'=>'mixed', '&w_param'=>'mixed', 'type='=>'int', 'maxlen='=>'int', 'driverdata='=>'mixed'],
'PDOStatement::bindParam' => ['bool', 'parameter'=>'mixed', '&w_variable'=>'mixed', 'data_type='=>'int', 'length='=>'int', 'driver_options='=>'mixed'],
'PDOStatement::bindValue' => ['bool', 'parameter'=>'mixed', 'value'=>'mixed', 'data_type='=>'int'],
'PDOStatement::closeCursor' => ['bool'],
'PDOStatement::columnCount' => ['0|positive-int'],
'PDOStatement::debugDumpParams' => ['void'],
'PDOStatement::errorCode' => ['string'],
'PDOStatement::errorInfo' => ['array'],
'PDOStatement::execute' => ['bool', 'bound_input_params='=>'?array'],
'PDOStatement::fetch' => ['mixed', 'how='=>'int', 'orientation='=>'int', 'offset='=>'int'],
'PDOStatement::fetchAll' => ['array|false', 'how='=>'int', 'fetch_argument='=>'int|string|callable', 'ctor_args='=>'?array'],
'PDOStatement::fetchColumn' => ['string|null|false|int', 'column_number='=>'int'],
'PDOStatement::fetchObject' => ['mixed', 'class_name='=>'string', 'ctor_args='=>'?array'],
'PDOStatement::getAttribute' => ['mixed', 'attribute'=>'int'],
'PDOStatement::getColumnMeta' => ['array|false', 'column'=>'int'],
'PDOStatement::nextRowset' => ['bool'],
'PDOStatement::rowCount' => ['0|positive-int'],
'PDOStatement::setAttribute' => ['bool', 'attribute'=>'int', 'value'=>'mixed'],
'PDOStatement::setFetchMode' => ['bool', 'mode'=>'int'],
'PDOStatement::setFetchMode\'1' => ['bool', 'fetch_column'=>'int', 'colno'=>'int'],
'PDOStatement::setFetchMode\'2' => ['bool', 'fetch_class'=>'int', 'classname'=>'string', 'ctorargs='=>'?array'],
'PDOStatement::setFetchMode\'3' => ['bool', 'fetch_into'=>'int', 'object'=>'object'],
'pfsockopen' => ['resource|false', 'hostname'=>'string', 'port='=>'int', '&w_errno='=>'int', '&w_errstr='=>'string', 'timeout='=>'float'],
'pg_affected_rows' => ['int', 'result'=>'resource'],
'pg_cancel_query' => ['bool', 'connection'=>'resource'],
'pg_client_encoding' => ['string', 'connection='=>'resource'],
'pg_close' => ['bool', 'connection='=>'resource'],
'pg_connect' => ['resource|false', 'connection_string'=>'string', 'connect_type='=>'int'],
'pg_connect_poll' => ['int', 'connection'=>'resource'],
'pg_connection_busy' => ['bool', 'connection'=>'resource'],
'pg_connection_reset' => ['bool', 'connection'=>'resource'],
'pg_connection_status' => ['int', 'connection'=>'resource'],
'pg_consume_input' => ['bool', 'connection'=>'resource'],
'pg_convert' => ['array|false', 'db'=>'resource', 'table'=>'string', 'values'=>'array', 'options='=>'int'],
'pg_copy_from' => ['bool', 'connection'=>'resource', 'table_name'=>'string', 'rows'=>'array', 'delimiter='=>'string', 'null_as='=>'string'],
'pg_copy_to' => ['array|false', 'connection'=>'resource', 'table_name'=>'string', 'delimiter='=>'string', 'null_as='=>'string'],
'pg_dbname' => ['string', 'connection='=>'resource'],
'pg_delete' => ['mixed', 'db'=>'resource', 'table'=>'string', 'ids'=>'array', 'options='=>'int'],
'pg_end_copy' => ['bool', 'connection='=>'resource'],
'pg_escape_bytea' => ['string', 'connection'=>'resource', 'data'=>'string'],
'pg_escape_bytea\'1' => ['string', 'data'=>'string'],
'pg_escape_identifier' => ['string|false', 'connection'=>'resource', 'data'=>'string'],
'pg_escape_identifier\'1' => ['string', 'data'=>'string'],
'pg_escape_literal' => ['string|false', 'connection'=>'resource', 'data'=>'string'],
'pg_escape_literal\'1' => ['string', 'data'=>'string'],
'pg_escape_string' => ['string', 'connection'=>'resource', 'data'=>'string'],
'pg_escape_string\'1' => ['string', 'data'=>'string'],
'pg_execute' => ['resource|false', 'connection'=>'resource', 'stmtname'=>'string', 'params'=>'array'],
'pg_execute\'1' => ['resource|false', 'stmtname'=>'string', 'params'=>'array'],
'pg_fetch_all' => ['array|false', 'result'=>'resource', 'result_type='=>'int'],
'pg_fetch_all_columns' => ['array|false', 'result'=>'resource', 'column_number='=>'int'],
'pg_fetch_array' => ['array|false', 'result'=>'resource', 'row='=>'?int', 'result_type='=>'int'],
'pg_fetch_assoc' => ['array|false', 'result'=>'resource', 'row='=>'?int'],
'pg_fetch_object' => ['object|false', 'result'=>'', 'row='=>'?int', 'result_type='=>'int'],
'pg_fetch_object\'1' => ['object', 'result'=>'', 'row='=>'?int', 'class_name='=>'string', 'ctor_params='=>'array'],
'pg_fetch_result' => ['', 'result'=>'', 'field_name'=>'string|int'],
'pg_fetch_result\'1' => ['', 'result'=>'', 'row_number'=>'int', 'field_name'=>'string|int'],
'pg_fetch_row' => ['array|false', 'result'=>'resource', 'row='=>'?int', 'result_type='=>'int'],
'pg_field_is_null' => ['int|false', 'result'=>'', 'field_name_or_number'=>'string|int'],
'pg_field_is_null\'1' => ['int', 'result'=>'', 'row'=>'int', 'field_name_or_number'=>'string|int'],
'pg_field_name' => ['string|false', 'result'=>'resource', 'field_number'=>'int'],
'pg_field_num' => ['int', 'result'=>'resource', 'field_name'=>'string'],
'pg_field_prtlen' => ['int|false', 'result'=>'', 'field_name_or_number'=>''],
'pg_field_prtlen\'1' => ['int', 'result'=>'', 'row'=>'int', 'field_name_or_number'=>'string|int'],
'pg_field_size' => ['int', 'result'=>'resource', 'field_number'=>'int'],
'pg_field_table' => ['mixed', 'result'=>'resource', 'field_number'=>'int', 'oid_only='=>'bool'],
'pg_field_type' => ['string', 'result'=>'resource', 'field_number'=>'int'],
'pg_field_type_oid' => ['int|false', 'result'=>'resource', 'field_number'=>'int'],
'pg_flush' => ['mixed', 'connection'=>'resource'],
'pg_free_result' => ['bool', 'result'=>'resource'],
'pg_get_notify' => ['array|false', 'connection'=>'resource', 'result_type='=>'int'],
'pg_get_pid' => ['int|false', 'connection'=>'resource'],
'pg_get_result' => ['resource|false', 'connection='=>'resource'],
'pg_host' => ['string', 'connection='=>'resource'],
'pg_insert' => ['mixed', 'db'=>'resource', 'table'=>'string', 'values'=>'array', 'options='=>'int'],
'pg_last_error' => ['string', 'connection='=>'resource', 'operation='=>'int'],
'pg_last_notice' => ['string', 'connection'=>'resource', 'option='=>'int'],
'pg_last_oid' => ['string|false', 'result'=>'resource'],
'pg_lo_close' => ['bool', 'large_object'=>'resource'],
'pg_lo_create' => ['int|false', 'connection='=>'resource', 'large_object_oid='=>''],
'pg_lo_export' => ['bool', 'connection'=>'resource', 'oid'=>'int', 'filename'=>'string'],
'pg_lo_export\'1' => ['bool', 'oid'=>'int', 'pathname'=>'string'],
'pg_lo_import' => ['int|false', 'connection'=>'resource', 'pathname'=>'string', 'oid'=>''],
'pg_lo_import\'1' => ['int', 'pathname'=>'string', 'oid'=>''],
'pg_lo_open' => ['resource|false', 'connection'=>'resource', 'oid'=>'int', 'mode'=>'string'],
'pg_lo_read' => ['string|false', 'large_object'=>'resource', 'len='=>'int'],
'pg_lo_read_all' => ['int', 'large_object'=>'resource'],
'pg_lo_seek' => ['bool', 'large_object'=>'resource', 'offset'=>'int', 'whence='=>'int'],
'pg_lo_tell' => ['int', 'large_object'=>'resource'],
'pg_lo_truncate' => ['bool', 'large_object'=>'resource', 'size'=>'int'],
'pg_lo_unlink' => ['bool', 'connection'=>'resource', 'oid'=>'int'],
'pg_lo_write' => ['int|false', 'large_object'=>'resource', 'data'=>'string', 'len='=>'int'],
'pg_meta_data' => ['array|false', 'db'=>'resource', 'table'=>'string', 'extended='=>'bool'],
'pg_num_fields' => ['int', 'result'=>'resource'],
'pg_num_rows' => ['int', 'result'=>'resource'],
'pg_options' => ['string', 'connection='=>'resource'],
'pg_parameter_status' => ['string|false', 'connection'=>'resource', 'param_name'=>'string'],
'pg_parameter_status\'1' => ['string|false', 'param_name'=>'string'],
'pg_pconnect' => ['resource|false', 'connection_string'=>'string', 'connect_type='=>'int'],
'pg_ping' => ['bool', 'connection='=>'resource'],
'pg_port' => ['int', 'connection='=>'resource'],
'pg_prepare' => ['resource|false', 'connection'=>'resource', 'stmtname'=>'string', 'query'=>'string'],
'pg_prepare\'1' => ['resource|false', 'stmtname'=>'string', 'query'=>'string'],
'pg_put_line' => ['bool', 'connection'=>'resource', 'data'=>'string'],
'pg_put_line\'1' => ['bool', 'data'=>'string'],
'pg_query' => ['resource|false', 'connection'=>'resource', 'query'=>'string'],
'pg_query\'1' => ['resource|false', 'query'=>'string'],
'pg_query_params' => ['resource|false', 'connection'=>'resource', 'query'=>'string', 'params'=>'array'],
'pg_query_params\'1' => ['resource|false', 'query'=>'string', 'params'=>'array'],
'pg_result_error' => ['string|false', 'result'=>'resource'],
'pg_result_error_field' => ['string|false|null', 'result'=>'resource', 'fieldcode'=>'int'],
'pg_result_seek' => ['bool', 'result'=>'resource', 'offset'=>'int'],
'pg_result_status' => ['mixed', 'result'=>'resource', 'result_type='=>'int'],
'pg_select' => ['mixed', 'db'=>'resource', 'table'=>'string', 'ids'=>'array', 'options='=>'int', 'result_type='=>'int'],
'pg_send_execute' => ['bool', 'connection'=>'resource', 'stmtname'=>'string', 'params'=>'array'],
'pg_send_prepare' => ['bool', 'connection'=>'resource', 'stmtname'=>'string', 'query'=>'string'],
'pg_send_query' => ['bool', 'connection'=>'resource', 'query'=>'string'],
'pg_send_query_params' => ['bool', 'connection'=>'resource', 'query'=>'string', 'params'=>'array'],
'pg_set_client_encoding' => ['int', 'connection'=>'resource', 'encoding'=>'string'],
'pg_set_client_encoding\'1' => ['int', 'encoding'=>'string'],
'pg_set_error_verbosity' => ['int|false', 'connection'=>'resource', 'verbosity'=>'int'],
'pg_set_error_verbosity\'1' => ['int', 'verbosity'=>'int'],
'pg_socket' => ['resource|false', 'connection'=>'resource'],
'pg_trace' => ['bool', 'filename'=>'string', 'mode='=>'string', 'connection='=>'resource'],
'pg_transaction_status' => ['int', 'connection'=>'resource'],
'pg_tty' => ['string', 'connection='=>'resource'],
'pg_tty\'1' => ['string'],
'pg_unescape_bytea' => ['string', 'data'=>'string'],
'pg_untrace' => ['bool', 'connection='=>'resource'],
'pg_untrace\'1' => ['bool'],
'pg_update' => ['mixed', 'db'=>'resource', 'table'=>'string', 'fields'=>'array', 'ids'=>'array', 'options='=>'int'],
'pg_version' => ['array', 'connection='=>'resource'],
'Phar::__construct' => ['void', 'fname'=>'string', 'flags='=>'int', 'alias='=>'string'],
'Phar::addEmptyDir' => ['', 'dirname'=>'string'],
'Phar::addFile' => ['', 'file'=>'string', 'localname='=>'string'],
'Phar::addFromString' => ['', 'localname'=>'string', 'contents'=>'string'],
'Phar::apiVersion' => ['string'],
'Phar::buildFromDirectory' => ['array', 'base_dir'=>'string', 'regex='=>'string'],
'Phar::buildFromIterator' => ['array', 'iter'=>'Iterator', 'base_directory='=>'string'],
'Phar::canCompress' => ['bool', 'method='=>'int'],
'Phar::canWrite' => ['bool'],
'Phar::compress' => ['Phar', 'compression'=>'int', 'extension='=>'string'],
'Phar::compressAllFilesBZIP2' => ['bool'],
'Phar::compressAllFilesGZ' => ['bool'],
'Phar::compressFiles' => ['', 'compression'=>'int'],
'Phar::convertToData' => ['PharData', 'format='=>'int', 'compression='=>'int', 'extension='=>'string'],
'Phar::convertToExecutable' => ['Phar', 'format='=>'int', 'compression='=>'int', 'extension='=>'string'],
'Phar::copy' => ['bool', 'oldfile'=>'string', 'newfile'=>'string'],
'Phar::count' => ['0|positive-int'],
'Phar::createDefaultStub' => ['string', 'indexfile='=>'string', 'webindexfile='=>'string'],
'Phar::decompress' => ['Phar', 'extension='=>'string'],
'Phar::decompressFiles' => ['bool'],
'Phar::delete' => ['bool', 'entry'=>'string'],
'Phar::delMetadata' => ['bool'],
'Phar::extractTo' => ['bool', 'pathto'=>'string', 'files='=>'string|array|null', 'overwrite='=>'bool'],
'Phar::getAlias' => ['string'],
'Phar::getMetadata' => ['mixed'],
'Phar::getModified' => ['bool'],
'Phar::getPath' => ['string'],
'Phar::getSignature' => ['array{hash:string, hash_type:string}'],
'Phar::getStub' => ['string'],
'Phar::getSupportedCompression' => ['array'],
'Phar::getSupportedSignatures' => ['array'],
'Phar::getVersion' => ['string'],
'Phar::hasMetadata' => ['bool'],
'Phar::interceptFileFuncs' => [''],
'Phar::isBuffering' => ['bool'],
'Phar::isCompressed' => [''],
'Phar::isFileFormat' => ['bool', 'format'=>'int'],
'Phar::isValidPharFilename' => ['bool', 'filename'=>'string', 'executable='=>'bool'],
'Phar::isWritable' => ['bool'],
'Phar::loadPhar' => ['bool', 'filename'=>'string', 'alias='=>'string'],
'Phar::mapPhar' => ['bool', 'alias='=>'string', 'dataoffset='=>'int'],
'Phar::mount' => ['void', 'pharpath'=>'string', 'externalpath'=>'string'],
'Phar::mungServer' => ['', 'munglist'=>'array'],
'Phar::offsetExists' => ['bool', 'offset'=>'string'],
'Phar::offsetGet' => ['PharFileInfo', 'offset'=>'string'],
'Phar::offsetSet' => ['', 'offset'=>'string', 'value'=>'string'],
'Phar::offsetUnset' => ['bool', 'offset'=>'string'],
'Phar::running' => ['string', 'retphar='=>'bool'],
'Phar::setAlias' => ['bool', 'alias'=>'string'],
'Phar::setDefaultStub' => ['bool', 'index='=>'string', 'webindex='=>'string'],
'Phar::setMetadata' => ['', 'metadata'=>''],
'Phar::setSignatureAlgorithm' => ['', 'sigtype'=>'int', 'privatekey='=>'string'],
'Phar::setStub' => ['bool', 'stub'=>'string', 'len='=>'int'],
'Phar::startBuffering' => [''],
'Phar::stopBuffering' => [''],
'Phar::uncompressAllFiles' => ['bool'],
'Phar::unlinkArchive' => ['bool', 'archive'=>'string'],
'Phar::webPhar' => ['', 'alias='=>'string', 'index='=>'string', 'f404='=>'string', 'mimetypes='=>'array', 'rewrites='=>'array'],
'PharData::__construct' => ['void', 'fname'=>'string', 'flags='=>'int', 'alias='=>'string', 'format='=>'int'],
'PharData::addEmptyDir' => ['bool', 'dirname'=>'string'],
'PharData::addFile' => ['', 'file'=>'string', 'localname='=>'string'],
'PharData::addFromString' => ['bool', 'localname'=>'string', 'contents'=>'string'],
'PharData::buildFromDirectory' => ['array', 'base_dir'=>'string', 'regex='=>'string'],
'PharData::buildFromIterator' => ['array', 'iter'=>'Iterator', 'base_directory='=>'string'],
'PharData::compress' => ['PharData', 'compression'=>'int', 'extension='=>'string'],
'PharData::compressFiles' => ['bool', 'compression'=>'int'],
'PharData::convertToData' => ['PharData', 'format='=>'int', 'compression='=>'int', 'extension='=>'string'],
'PharData::convertToExecutable' => ['Phar', 'format='=>'int', 'compression='=>'int', 'extension='=>'string'],
'PharData::copy' => ['bool', 'oldfile'=>'string', 'newfile'=>'string'],
'PharData::decompress' => ['PharData', 'extension='=>'string'],
'PharData::decompressFiles' => ['bool'],
'PharData::delete' => ['bool', 'entry'=>'string'],
'PharData::delMetadata' => ['bool'],
'PharData::extractTo' => ['bool', 'pathto'=>'string', 'files='=>'string|array|null', 'overwrite='=>'bool'],
'PharData::isWritable' => ['bool'],
'PharData::offsetGet' => ['PharFileInfo', 'offset'=>'string'],
'PharData::offsetSet' => ['', 'offset'=>'string', 'value'=>'string'],
'PharData::offsetUnset' => ['bool', 'offset'=>'string'],
'PharData::setAlias' => ['bool', 'alias'=>'string'],
'PharData::setDefaultStub' => ['bool', 'index='=>'string', 'webindex='=>'string'],
'PharData::setStub' => ['bool', 'stub'=>'string'],
'PharFileInfo::__construct' => ['void', 'entry'=>'string'],
'PharFileInfo::chmod' => ['void', 'permissions'=>'int'],
'PharFileInfo::compress' => ['bool', 'compression'=>'int'],
'PharFileInfo::decompress' => ['bool'],
'PharFileInfo::delMetadata' => ['bool'],
'PharFileInfo::getCompressedSize' => ['int'],
'PharFileInfo::getContent' => ['string'],
'PharFileInfo::getCRC32' => ['int'],
'PharFileInfo::getMetadata' => ['mixed'],
'PharFileInfo::getPharFlags' => ['int'],
'PharFileInfo::hasMetadata' => ['bool'],
'PharFileInfo::isCompressed' => ['bool', 'compression_type='=>'int'],
'PharFileInfo::isCompressedBZIP2' => ['bool'],
'PharFileInfo::isCompressedGZ' => ['bool'],
'PharFileInfo::isCRCChecked' => ['bool'],
'PharFileInfo::setCompressedBZIP2' => ['bool'],
'PharFileInfo::setCompressedGZ' => ['bool'],
'PharFileInfo::setMetadata' => ['void', 'metadata'=>'mixed'],
'PharFileInfo::setUncompressed' => ['bool'],
'phdfs::__construct' => ['void', 'ip'=>'string', 'port'=>'string'],
'phdfs::__destruct' => [''],
'phdfs::connect' => ['bool'],
'phdfs::copy' => ['bool', 'source_file'=>'string', 'destination_file'=>'string'],
'phdfs::create_directory' => ['bool', 'path'=>'string'],
'phdfs::delete' => ['bool', 'path'=>'string'],
'phdfs::disconnect' => ['bool'],
'phdfs::exists' => ['bool', 'path'=>'string'],
'phdfs::file_info' => ['array', 'path'=>'string'],
'phdfs::list_directory' => ['array', 'path'=>'string'],
'phdfs::read' => ['string', 'path'=>'string', 'length='=>'string'],
'phdfs::rename' => ['bool', 'old_path'=>'string', 'new_path'=>'string'],
'phdfs::tell' => ['int', 'path'=>'string'],
'phdfs::write' => ['bool', 'path'=>'string', 'buffer'=>'string', 'mode='=>'string'],
'php_check_syntax' => ['bool', 'filename'=>'string', 'error_message='=>'string'],
'php_ini_loaded_file' => ['string|false'],
'php_ini_scanned_files' => ['string|false'],
'php_logo_guid' => ['string'],
'php_sapi_name' => ['string|false'],
'php_strip_whitespace' => ['string', 'file_name'=>'string'],
'php_uname' => ['string', 'mode='=>'string'],
'php_user_filter::filter' => ['int', 'in'=>'resource', 'out'=>'resource', '&rw_consumed'=>'int', 'closing'=>'bool'],
'php_user_filter::onClose' => ['void'],
'php_user_filter::onCreate' => ['bool'],
'phpcredits' => ['bool', 'flag='=>'int'],
'phpdbg_break_file' => ['', 'file'=>'string', 'line'=>'int'],
'phpdbg_break_function' => ['', 'function'=>'string'],
'phpdbg_break_method' => ['', 'class'=>'string', 'method'=>'string'],
'phpdbg_break_next' => [''],
'phpdbg_clear' => [''],
'phpdbg_color' => ['', 'element'=>'int', 'color'=>'string'],
'phpdbg_end_oplog' => ['array', 'options='=>'array'],
'phpdbg_prompt' => ['', 'prompt'=>'string'],
'phpdbg_start_oplog' => [''],
'phpinfo' => ['bool', 'what='=>'int'],
'phpversion' => ['string'],
'phpversion\'1' => ['string|false', 'extension'=>'string'],
'pht\AtomicInteger::__construct' => ['void', 'value='=>'int'],
'pht\AtomicInteger::dec' => ['void'],
'pht\AtomicInteger::get' => ['int'],
'pht\AtomicInteger::inc' => ['void'],
'pht\AtomicInteger::lock' => ['void'],
'pht\AtomicInteger::set' => ['void', 'value'=>'int'],
'pht\AtomicInteger::unlock' => ['void'],
'pht\HashTable::lock' => ['void'],
'pht\HashTable::size' => ['int'],
'pht\HashTable::unlock' => ['void'],
'pht\Queue::front' => ['mixed'],
'pht\Queue::lock' => ['void'],
'pht\Queue::pop' => ['mixed'],
'pht\Queue::push' => ['void', 'value'=>'mixed'],
'pht\Queue::size' => ['int'],
'pht\Queue::unlock' => ['void'],
'pht\Runnable::run' => ['void'],
'pht\Vector::__construct' => ['void', 'size='=>'int', 'value='=>'mixed'],
'pht\Vector::deleteAt' => ['void', 'offset'=>'int'],
'pht\Vector::insertAt' => ['void', 'value'=>'mixed', 'offset'=>'int'],
'pht\Vector::lock' => ['void'],
'pht\Vector::pop' => ['mixed'],
'pht\Vector::push' => ['void', 'value'=>'mixed'],
'pht\Vector::resize' => ['void', 'size'=>'int', 'value='=>'mixed'],
'pht\Vector::shift' => ['mixed'],
'pht\Vector::size' => ['int'],
'pht\Vector::unlock' => ['void'],
'pht\Vector::unshift' => ['void', 'value'=>'mixed'],
'pht\Vector::updateAt' => ['void', 'value'=>'mixed', 'offset'=>'int'],
'pi' => ['float'],
'png2wbmp' => ['bool', 'pngname'=>'string', 'wbmpname'=>'string', 'dest_height'=>'int', 'dest_width'=>'int', 'threshold'=>'int'],
'pointObj::__construct' => ['void'],
'pointObj::distanceToLine' => ['float', 'p1'=>'pointObj', 'p2'=>'pointObj'],
'pointObj::distanceToPoint' => ['float', 'poPoint'=>'pointObj'],
'pointObj::distanceToShape' => ['float', 'shape'=>'shapeObj'],
'pointObj::draw' => ['int', 'map'=>'mapObj', 'layer'=>'layerObj', 'img'=>'imageObj', 'class_index'=>'int', 'text'=>'string'],
'pointObj::ms_newPointObj' => ['pointObj'],
'pointObj::project' => ['int', 'in'=>'projectionObj', 'out'=>'projectionObj'],
'pointObj::setXY' => ['int', 'x'=>'float', 'y'=>'float', 'm'=>'float'],
'pointObj::setXYZ' => ['int', 'x'=>'float', 'y'=>'float', 'z'=>'float', 'm'=>'float'],
'Pool::__construct' => ['void', 'size'=>'int', 'class'=>'string', 'ctor='=>'array'],
'Pool::collect' => ['int', 'collector'=>'Callable'],
'Pool::resize' => ['void', 'size'=>'int'],
'Pool::shutdown' => ['void'],
'Pool::submit' => ['int', 'task'=>'Threaded'],
'Pool::submitTo' => ['int', 'worker'=>'int', 'task'=>'Threaded'],
'popen' => ['resource|false', 'command'=>'string', 'mode'=>'string'],
'pos' => ['mixed', 'array_arg'=>'array'],
'posix_access' => ['bool', 'file'=>'string', 'mode='=>'int'],
'posix_ctermid' => ['string|false'],
'posix_errno' => ['int'],
'posix_get_last_error' => ['int'],
'posix_getcwd' => ['string|false'],
'posix_getegid' => ['int'],
'posix_geteuid' => ['int'],
'posix_getgid' => ['int'],
'posix_getgrgid' => ['array{name: string, passwd: string, gid: int, members: list<string>}|false', 'gid'=>'int'],
'posix_getgrnam' => ['array{name: string, passwd: string, gid: int, members: list<string>}|false', 'groupname'=>'string'],
'posix_getgroups' => ['list<int>|false'],
'posix_getlogin' => ['string|false'],
'posix_getpgid' => ['int|false', 'pid'=>'int'],
'posix_getpgrp' => ['int'],
'posix_getpid' => ['int'],
'posix_getppid' => ['int'],
'posix_getpwnam' => ['array|false', 'groupname'=>'string'],
'posix_getpwuid' => ['array|false', 'uid'=>'int'],
'posix_getrlimit' => ['array|false'],
'posix_getsid' => ['int|false', 'pid'=>'int'],
'posix_getuid' => ['int'],
'posix_initgroups' => ['bool', 'name'=>'string', 'base_group_id'=>'int'],
'posix_isatty' => ['bool', 'fd'=>'resource|int'],
'posix_kill' => ['bool', 'pid'=>'int', 'sig'=>'int'],
'posix_mkfifo' => ['bool', 'pathname'=>'string', 'mode'=>'int'],
'posix_mknod' => ['bool', 'pathname'=>'string', 'mode'=>'int', 'major='=>'int', 'minor='=>'int'],
'posix_setegid' => ['bool', 'uid'=>'int'],
'posix_seteuid' => ['bool', 'uid'=>'int'],
'posix_setgid' => ['bool', 'uid'=>'int'],
'posix_setpgid' => ['bool', 'pid'=>'int', 'pgid'=>'int'],
'posix_setrlimit' => ['bool', 'resource'=>'int', 'softlimit'=>'int', 'hardlimit'=>'int'],
'posix_setsid' => ['int'],
'posix_setuid' => ['bool', 'uid'=>'int'],
'posix_strerror' => ['string', 'errno'=>'int'],
'posix_times' => ['array|false'],
'posix_ttyname' => ['string|false', 'fd'=>'resource|int'],
'posix_uname' => ['array|false'],
'Postal\Expand::expand_address' => ['string[]', 'address'=>'string', 'options='=>'array<string, mixed>'],
'Postal\Parser::parse_address' => ['array<string,string>', 'address'=>'string', 'options='=>'array<string, string>'],
'pow' => ['float|int', 'base'=>'int|float', 'exponent'=>'int|float'],
'preg_filter' => ['string|array|null', 'regex'=>'string|array', 'replace'=>'string|array', 'subject'=>'string|array', 'limit='=>'int', '&w_count='=>'int'],
'preg_grep' => ['array|false', 'regex'=>'string', 'input'=>'array', 'flags='=>'int'],
'preg_last_error' => ['int'],
'preg_match' => ['0|1|false', 'pattern'=>'string', 'subject'=>'string', '&w_subpatterns='=>'string[]', 'flags='=>'int', 'offset='=>'int'],
'preg_match_all' => ['0|positive-int|false|null', 'pattern'=>'string', 'subject'=>'string', '&w_subpatterns='=>'array', 'flags='=>'int', 'offset='=>'int'],
'preg_quote' => ['string', 'str'=>'string', 'delim_char='=>'string'],
'preg_replace' => ['string|array|null', 'regex'=>'string|array', 'replace'=>'string|array', 'subject'=>'string|array', 'limit='=>'int', '&w_count='=>'int'],
'preg_replace_callback' => ['string|array|null', 'regex'=>'string|array', 'callback'=>'callable(array<int|string, string>):string', 'subject'=>'string|array', 'limit='=>'int', '&w_count='=>'int'],
'preg_replace_callback_array' => ['string|array|null', 'pattern'=>'array<string,callable>', 'subject'=>'string|array', 'limit='=>'int', '&w_count='=>'int'],
'preg_split' => ['list<string>|false', 'pattern'=>'string', 'subject'=>'string', 'limit='=>'?int', 'flags='=>'int'],
'prev' => ['mixed', '&rw_array_arg'=>'array|object'],
'print_r' => ['string|true', 'var'=>'mixed', 'return='=>'bool'],
'printf' => ['int', 'format'=>'string', '...values='=>'__stringAndStringable|int|float|null|bool'],
'proc_close' => ['int', 'process'=>'resource'],
'proc_get_status' => ['array{command: string, pid: int, running: bool, signaled: bool, stopped: bool, exitcode: int, termsig: int, stopsig: int}|false', 'process'=>'resource'],
'proc_nice' => ['bool', 'priority'=>'int'],
'proc_open' => ['resource|false', 'command'=>'string', 'descriptorspec'=>'array', '&w_pipes'=>'resource[]', 'cwd='=>'?string', 'env='=>'?array', 'other_options='=>'array'],
'proc_terminate' => ['bool', 'process'=>'resource', 'signal='=>'int'],
'projectionObj::__construct' => ['void', 'projectionString'=>'string'],
'projectionObj::getUnits' => ['int'],
'projectionObj::ms_newProjectionObj' => ['projectionObj', 'projectionString'=>'string'],
'property_exists' => ['bool', 'object_or_class'=>'object|string', 'property_name'=>'string'],
'ps_add_bookmark' => ['int', 'psdoc'=>'resource', 'text'=>'string', 'parent='=>'int', 'open='=>'int'],
'ps_add_launchlink' => ['bool', 'psdoc'=>'resource', 'llx'=>'float', 'lly'=>'float', 'urx'=>'float', 'ury'=>'float', 'filename'=>'string'],
'ps_add_locallink' => ['bool', 'psdoc'=>'resource', 'llx'=>'float', 'lly'=>'float', 'urx'=>'float', 'ury'=>'float', 'page'=>'int', 'dest'=>'string'],
'ps_add_note' => ['bool', 'psdoc'=>'resource', 'llx'=>'float', 'lly'=>'float', 'urx'=>'float', 'ury'=>'float', 'contents'=>'string', 'title'=>'string', 'icon'=>'string', 'open'=>'int'],
'ps_add_pdflink' => ['bool', 'psdoc'=>'resource', 'llx'=>'float', 'lly'=>'float', 'urx'=>'float', 'ury'=>'float', 'filename'=>'string', 'page'=>'int', 'dest'=>'string'],
'ps_add_weblink' => ['bool', 'psdoc'=>'resource', 'llx'=>'float', 'lly'=>'float', 'urx'=>'float', 'ury'=>'float', 'url'=>'string'],
'ps_arc' => ['bool', 'psdoc'=>'resource', 'x'=>'float', 'y'=>'float', 'radius'=>'float', 'alpha'=>'float', 'beta'=>'float'],
'ps_arcn' => ['bool', 'psdoc'=>'resource', 'x'=>'float', 'y'=>'float', 'radius'=>'float', 'alpha'=>'float', 'beta'=>'float'],
'ps_begin_page' => ['bool', 'psdoc'=>'resource', 'width'=>'float', 'height'=>'float'],
'ps_begin_pattern' => ['int', 'psdoc'=>'resource', 'width'=>'float', 'height'=>'float', 'xstep'=>'float', 'ystep'=>'float', 'painttype'=>'int'],
'ps_begin_template' => ['int', 'psdoc'=>'resource', 'width'=>'float', 'height'=>'float'],
'ps_circle' => ['bool', 'psdoc'=>'resource', 'x'=>'float', 'y'=>'float', 'radius'=>'float'],
'ps_clip' => ['bool', 'psdoc'=>'resource'],
'ps_close' => ['bool', 'psdoc'=>'resource'],
'ps_close_image' => ['void', 'psdoc'=>'resource', 'imageid'=>'int'],
'ps_closepath' => ['bool', 'psdoc'=>'resource'],
'ps_closepath_stroke' => ['bool', 'psdoc'=>'resource'],
'ps_continue_text' => ['bool', 'psdoc'=>'resource', 'text'=>'string'],
'ps_curveto' => ['bool', 'psdoc'=>'resource', 'x1'=>'float', 'y1'=>'float', 'x2'=>'float', 'y2'=>'float', 'x3'=>'float', 'y3'=>'float'],
'ps_delete' => ['bool', 'psdoc'=>'resource'],
'ps_end_page' => ['bool', 'psdoc'=>'resource'],
'ps_end_pattern' => ['bool', 'psdoc'=>'resource'],
'ps_end_template' => ['bool', 'psdoc'=>'resource'],
'ps_fill' => ['bool', 'psdoc'=>'resource'],
'ps_fill_stroke' => ['bool', 'psdoc'=>'resource'],
'ps_findfont' => ['int', 'psdoc'=>'resource', 'fontname'=>'string', 'encoding'=>'string', 'embed='=>'bool'],
'ps_get_buffer' => ['string', 'psdoc'=>'resource'],
'ps_get_parameter' => ['string', 'psdoc'=>'resource', 'name'=>'string', 'modifier='=>'float'],
'ps_get_value' => ['float', 'psdoc'=>'resource', 'name'=>'string', 'modifier='=>'float'],
'ps_hyphenate' => ['array', 'psdoc'=>'resource', 'text'=>'string'],
'ps_include_file' => ['bool', 'psdoc'=>'resource', 'file'=>'string'],
'ps_lineto' => ['bool', 'psdoc'=>'resource', 'x'=>'float', 'y'=>'float'],
'ps_makespotcolor' => ['int', 'psdoc'=>'resource', 'name'=>'string', 'reserved='=>'int'],
'ps_moveto' => ['bool', 'psdoc'=>'resource', 'x'=>'float', 'y'=>'float'],
'ps_new' => ['resource'],
'ps_open_file' => ['bool', 'psdoc'=>'resource', 'filename='=>'string'],
'ps_open_image' => ['int', 'psdoc'=>'resource', 'type'=>'string', 'source'=>'string', 'data'=>'string', 'length'=>'int', 'width'=>'int', 'height'=>'int', 'components'=>'int', 'bpc'=>'int', 'params'=>'string'],
'ps_open_image_file' => ['int', 'psdoc'=>'resource', 'type'=>'string', 'filename'=>'string', 'stringparam='=>'string', 'intparam='=>'int'],
'ps_open_memory_image' => ['int', 'psdoc'=>'resource', 'gd'=>'int'],
'ps_place_image' => ['bool', 'psdoc'=>'resource', 'imageid'=>'int', 'x'=>'float', 'y'=>'float', 'scale'=>'float'],
'ps_rect' => ['bool', 'psdoc'=>'resource', 'x'=>'float', 'y'=>'float', 'width'=>'float', 'height'=>'float'],
'ps_restore' => ['bool', 'psdoc'=>'resource'],
'ps_rotate' => ['bool', 'psdoc'=>'resource', 'rot'=>'float'],
'ps_save' => ['bool', 'psdoc'=>'resource'],
'ps_scale' => ['bool', 'psdoc'=>'resource', 'x'=>'float', 'y'=>'float'],
'ps_set_border_color' => ['bool', 'psdoc'=>'resource', 'red'=>'float', 'green'=>'float', 'blue'=>'float'],
'ps_set_border_dash' => ['bool', 'psdoc'=>'resource', 'black'=>'float', 'white'=>'float'],
'ps_set_border_style' => ['bool', 'psdoc'=>'resource', 'style'=>'string', 'width'=>'float'],
'ps_set_info' => ['bool', 'p'=>'resource', 'key'=>'string', 'val'=>'string'],
'ps_set_parameter' => ['bool', 'psdoc'=>'resource', 'name'=>'string', 'value'=>'string'],
'ps_set_text_pos' => ['bool', 'psdoc'=>'resource', 'x'=>'float', 'y'=>'float'],
'ps_set_value' => ['bool', 'psdoc'=>'resource', 'name'=>'string', 'value'=>'float'],
'ps_setcolor' => ['bool', 'psdoc'=>'resource', 'type'=>'string', 'colorspace'=>'string', 'c1'=>'float', 'c2'=>'float', 'c3'=>'float', 'c4'=>'float'],
'ps_setdash' => ['bool', 'psdoc'=>'resource', 'on'=>'float', 'off'=>'float'],
'ps_setflat' => ['bool', 'psdoc'=>'resource', 'value'=>'float'],
'ps_setfont' => ['bool', 'psdoc'=>'resource', 'fontid'=>'int', 'size'=>'float'],
'ps_setgray' => ['bool', 'psdoc'=>'resource', 'gray'=>'float'],
'ps_setlinecap' => ['bool', 'psdoc'=>'resource', 'type'=>'int'],
'ps_setlinejoin' => ['bool', 'psdoc'=>'resource', 'type'=>'int'],
'ps_setlinewidth' => ['bool', 'psdoc'=>'resource', 'width'=>'float'],
'ps_setmiterlimit' => ['bool', 'psdoc'=>'resource', 'value'=>'float'],
'ps_setoverprintmode' => ['bool', 'psdoc'=>'resource', 'mode'=>'int'],
'ps_setpolydash' => ['bool', 'psdoc'=>'resource', 'arr'=>'float'],
'ps_shading' => ['int', 'psdoc'=>'resource', 'type'=>'string', 'x0'=>'float', 'y0'=>'float', 'x1'=>'float', 'y1'=>'float', 'c1'=>'float', 'c2'=>'float', 'c3'=>'float', 'c4'=>'float', 'optlist'=>'string'],
'ps_shading_pattern' => ['int', 'psdoc'=>'resource', 'shadingid'=>'int', 'optlist'=>'string'],
'ps_shfill' => ['bool', 'psdoc'=>'resource', 'shadingid'=>'int'],
'ps_show' => ['bool', 'psdoc'=>'resource', 'text'=>'string'],
'ps_show2' => ['bool', 'psdoc'=>'resource', 'text'=>'string', 'len'=>'int'],
'ps_show_boxed' => ['int', 'psdoc'=>'resource', 'text'=>'string', 'left'=>'float', 'bottom'=>'float', 'width'=>'float', 'height'=>'float', 'hmode'=>'string', 'feature='=>'string'],
'ps_show_xy' => ['bool', 'psdoc'=>'resource', 'text'=>'string', 'x'=>'float', 'y'=>'float'],
'ps_show_xy2' => ['bool', 'psdoc'=>'resource', 'text'=>'string', 'len'=>'int', 'xcoor'=>'float', 'ycoor'=>'float'],
'ps_string_geometry' => ['array', 'psdoc'=>'resource', 'text'=>'string', 'fontid='=>'int', 'size='=>'float'],
'ps_stringwidth' => ['float', 'psdoc'=>'resource', 'text'=>'string', 'fontid='=>'int', 'size='=>'float'],
'ps_stroke' => ['bool', 'psdoc'=>'resource'],
'ps_symbol' => ['bool', 'psdoc'=>'resource', 'ord'=>'int'],
'ps_symbol_name' => ['string', 'psdoc'=>'resource', 'ord'=>'int', 'fontid='=>'int'],
'ps_symbol_width' => ['float', 'psdoc'=>'resource', 'ord'=>'int', 'fontid='=>'int', 'size='=>'float'],
'ps_translate' => ['bool', 'psdoc'=>'resource', 'x'=>'float', 'y'=>'float'],
'pspell_add_to_personal' => ['bool', 'pspell'=>'int', 'word'=>'string'],
'pspell_add_to_session' => ['bool', 'pspell'=>'int', 'word'=>'string'],
'pspell_check' => ['bool', 'pspell'=>'int', 'word'=>'string'],
'pspell_clear_session' => ['bool', 'pspell'=>'int'],
'pspell_config_create' => ['int|false', 'language'=>'string', 'spelling='=>'string', 'jargon='=>'string', 'encoding='=>'string'],
'pspell_config_data_dir' => ['bool', 'conf'=>'int', 'directory'=>'string'],
'pspell_config_dict_dir' => ['bool', 'conf'=>'int', 'directory'=>'string'],
'pspell_config_ignore' => ['bool', 'conf'=>'int', 'ignore'=>'int'],
'pspell_config_mode' => ['bool', 'conf'=>'int', 'mode'=>'int'],
'pspell_config_personal' => ['bool', 'conf'=>'int', 'personal'=>'string'],
'pspell_config_repl' => ['bool', 'conf'=>'int', 'repl'=>'string'],
'pspell_config_runtogether' => ['bool', 'conf'=>'int', 'runtogether'=>'bool'],
'pspell_config_save_repl' => ['bool', 'conf'=>'int', 'save'=>'bool'],
'pspell_new' => ['int|false', 'language'=>'string', 'spelling='=>'string', 'jargon='=>'string', 'encoding='=>'string', 'mode='=>'int'],
'pspell_new_config' => ['int|false', 'config'=>'int'],
'pspell_new_personal' => ['int|false', 'personal'=>'string', 'language'=>'string', 'spelling='=>'string', 'jargon='=>'string', 'encoding='=>'string', 'mode='=>'int'],
'pspell_save_wordlist' => ['bool', 'pspell'=>'int'],
'pspell_store_replacement' => ['bool', 'pspell'=>'int', 'misspell'=>'string', 'correct'=>'string'],
'pspell_suggest' => ['array|false', 'pspell'=>'int', 'word'=>'string'],
'putenv' => ['bool', 'setting'=>'string'],
'px_close' => ['bool', 'pxdoc'=>'resource'],
'px_create_fp' => ['bool', 'pxdoc'=>'resource', 'file'=>'resource', 'fielddesc'=>'array'],
'px_date2string' => ['string', 'pxdoc'=>'resource', 'value'=>'int', 'format'=>'string'],
'px_delete' => ['bool', 'pxdoc'=>'resource'],
'px_delete_record' => ['bool', 'pxdoc'=>'resource', 'num'=>'int'],
'px_get_field' => ['array', 'pxdoc'=>'resource', 'fieldno'=>'int'],
'px_get_info' => ['array', 'pxdoc'=>'resource'],
'px_get_parameter' => ['string', 'pxdoc'=>'resource', 'name'=>'string'],
'px_get_record' => ['array', 'pxdoc'=>'resource', 'num'=>'int', 'mode='=>'int'],
'px_get_schema' => ['array', 'pxdoc'=>'resource', 'mode='=>'int'],
'px_get_value' => ['float', 'pxdoc'=>'resource', 'name'=>'string'],
'px_insert_record' => ['int', 'pxdoc'=>'resource', 'data'=>'array'],
'px_new' => ['resource'],
'px_numfields' => ['int', 'pxdoc'=>'resource'],
'px_numrecords' => ['int', 'pxdoc'=>'resource'],
'px_open_fp' => ['bool', 'pxdoc'=>'resource', 'file'=>'resource'],
'px_put_record' => ['bool', 'pxdoc'=>'resource', 'record'=>'array', 'recpos='=>'int'],
'px_retrieve_record' => ['array', 'pxdoc'=>'resource', 'num'=>'int', 'mode='=>'int'],
'px_set_blob_file' => ['bool', 'pxdoc'=>'resource', 'filename'=>'string'],
'px_set_parameter' => ['bool', 'pxdoc'=>'resource', 'name'=>'string', 'value'=>'string'],
'px_set_tablename' => ['void', 'pxdoc'=>'resource', 'name'=>'string'],
'px_set_targetencoding' => ['bool', 'pxdoc'=>'resource', 'encoding'=>'string'],
'px_set_value' => ['bool', 'pxdoc'=>'resource', 'name'=>'string', 'value'=>'float'],
'px_timestamp2string' => ['string', 'pxdoc'=>'resource', 'value'=>'float', 'format'=>'string'],
'px_update_record' => ['bool', 'pxdoc'=>'resource', 'data'=>'array', 'num'=>'int'],
'qdom_error' => ['string'],
'qdom_tree' => ['QDomDocument', 'doc'=>'string'],
'querymapObj::convertToString' => ['string'],
'querymapObj::free' => ['void'],
'querymapObj::set' => ['int', 'property_name'=>'string', 'new_value'=>''],
'querymapObj::updateFromString' => ['int', 'snippet'=>'string'],
'QuickHashIntHash::__construct' => ['void', 'size'=>'int', 'options='=>'int'],
'QuickHashIntHash::add' => ['bool', 'key'=>'int', 'value='=>'int'],
'QuickHashIntHash::delete' => ['bool', 'key'=>'int'],
'QuickHashIntHash::exists' => ['bool', 'key'=>'int'],
'QuickHashIntHash::get' => ['int', 'key'=>'int'],
'QuickHashIntHash::getSize' => ['int'],
'QuickHashIntHash::loadFromFile' => ['QuickHashIntHash', 'filename'=>'string', 'options='=>'int'],
'QuickHashIntHash::loadFromString' => ['QuickHashIntHash', 'contents'=>'string', 'options='=>'int'],
'QuickHashIntHash::saveToFile' => ['void', 'filename'=>'string'],
'QuickHashIntHash::saveToString' => ['string'],
'QuickHashIntHash::set' => ['bool', 'key'=>'int', 'value'=>'int'],
'QuickHashIntHash::update' => ['bool', 'key'=>'int', 'value'=>'int'],
'QuickHashIntSet::__construct' => ['void', 'size'=>'int', 'options='=>'int'],
'QuickHashIntSet::add' => ['bool', 'key'=>'int'],
'QuickHashIntSet::delete' => ['bool', 'key'=>'int'],
'QuickHashIntSet::exists' => ['bool', 'key'=>'int'],
'QuickHashIntSet::getSize' => ['int'],
'QuickHashIntSet::loadFromFile' => ['QuickHashIntSet', 'filename'=>'string', 'size='=>'int', 'options='=>'int'],
'QuickHashIntSet::loadFromString' => ['QuickHashIntSet', 'contents'=>'string', 'size='=>'int', 'options='=>'int'],
'QuickHashIntSet::saveToFile' => ['void', 'filename'=>'string'],
'QuickHashIntSet::saveToString' => ['string'],
'QuickHashIntStringHash::__construct' => ['void', 'size'=>'int', 'options='=>'int'],
'QuickHashIntStringHash::add' => ['bool', 'key'=>'int', 'value'=>'string'],
'QuickHashIntStringHash::delete' => ['bool', 'key'=>'int'],
'QuickHashIntStringHash::exists' => ['bool', 'key'=>'int'],
'QuickHashIntStringHash::get' => ['mixed', 'key'=>'int'],
'QuickHashIntStringHash::getSize' => ['int'],
'QuickHashIntStringHash::loadFromFile' => ['QuickHashIntStringHash', 'filename'=>'string', 'size='=>'int', 'options='=>'int'],
'QuickHashIntStringHash::loadFromString' => ['QuickHashIntStringHash', 'contents'=>'string', 'size='=>'int', 'options='=>'int'],
'QuickHashIntStringHash::saveToFile' => ['void', 'filename'=>'string'],
'QuickHashIntStringHash::saveToString' => ['string'],
'QuickHashIntStringHash::set' => ['int', 'key'=>'int', 'value'=>'string'],
'QuickHashIntStringHash::update' => ['bool', 'key'=>'int', 'value'=>'string'],
'QuickHashStringIntHash::__construct' => ['void', 'size'=>'int', 'options='=>'int'],
'QuickHashStringIntHash::add' => ['bool', 'key'=>'string', 'value'=>'int'],
'QuickHashStringIntHash::delete' => ['bool', 'key'=>'string'],
'QuickHashStringIntHash::exists' => ['bool', 'key'=>'string'],
'QuickHashStringIntHash::get' => ['mixed', 'key'=>'string'],
'QuickHashStringIntHash::getSize' => ['int'],
'QuickHashStringIntHash::loadFromFile' => ['QuickHashStringIntHash', 'filename'=>'string', 'size='=>'int', 'options='=>'int'],
'QuickHashStringIntHash::loadFromString' => ['QuickHashStringIntHash', 'contents'=>'string', 'size='=>'int', 'options='=>'int'],
'QuickHashStringIntHash::saveToFile' => ['void', 'filename'=>'string'],
'QuickHashStringIntHash::saveToString' => ['string'],
'QuickHashStringIntHash::set' => ['int', 'key'=>'string', 'value'=>'int'],
'QuickHashStringIntHash::update' => ['bool', 'key'=>'string', 'value'=>'int'],
'quoted_printable_decode' => ['string', 'str'=>'string'],
'quoted_printable_encode' => ['string', 'str'=>'string'],
'quotemeta' => ['string', 'str'=>'string'],
'rad2deg' => ['float', 'number'=>'float'],
'radius_acct_open' => ['resource|false'],
'radius_add_server' => ['bool', 'radius_handle'=>'resource', 'hostname'=>'string', 'port'=>'int', 'secret'=>'string', 'timeout'=>'int', 'max_tries'=>'int'],
'radius_auth_open' => ['resource|false'],
'radius_close' => ['bool', 'radius_handle'=>'resource'],
'radius_config' => ['bool', 'radius_handle'=>'resource', 'file'=>'string'],
'radius_create_request' => ['bool', 'radius_handle'=>'resource', 'type'=>'int'],
'radius_cvt_addr' => ['string', 'data'=>'string'],
'radius_cvt_int' => ['int', 'data'=>'string'],
'radius_cvt_string' => ['string', 'data'=>'string'],
'radius_demangle' => ['string', 'radius_handle'=>'resource', 'mangled'=>'string'],
'radius_demangle_mppe_key' => ['string', 'radius_handle'=>'resource', 'mangled'=>'string'],
'radius_get_attr' => ['mixed', 'radius_handle'=>'resource'],
'radius_get_tagged_attr_data' => ['string', 'data'=>'string'],
'radius_get_tagged_attr_tag' => ['int', 'data'=>'string'],
'radius_get_vendor_attr' => ['array', 'data'=>'string'],
'radius_put_addr' => ['bool', 'radius_handle'=>'resource', 'type'=>'int', 'addr'=>'string'],
'radius_put_attr' => ['bool', 'radius_handle'=>'resource', 'type'=>'int', 'value'=>'string'],
'radius_put_int' => ['bool', 'radius_handle'=>'resource', 'type'=>'int', 'value'=>'int'],
'radius_put_string' => ['bool', 'radius_handle'=>'resource', 'type'=>'int', 'value'=>'string'],
'radius_put_vendor_addr' => ['bool', 'radius_handle'=>'resource', 'vendor'=>'int', 'type'=>'int', 'addr'=>'string'],
'radius_put_vendor_attr' => ['bool', 'radius_handle'=>'resource', 'vendor'=>'int', 'type'=>'int', 'value'=>'string'],
'radius_put_vendor_int' => ['bool', 'radius_handle'=>'resource', 'vendor'=>'int', 'type'=>'int', 'value'=>'int'],
'radius_put_vendor_string' => ['bool', 'radius_handle'=>'resource', 'vendor'=>'int', 'type'=>'int', 'value'=>'string'],
'radius_request_authenticator' => ['string', 'radius_handle'=>'resource'],
'radius_salt_encrypt_attr' => ['string', 'radius_handle'=>'resource', 'data'=>'string'],
'radius_send_request' => ['int', 'radius_handle'=>'resource'],
'radius_server_secret' => ['string', 'radius_handle'=>'resource'],
'radius_strerror' => ['string', 'radius_handle'=>'resource'],
'rand' => ['int', 'min'=>'int', 'max'=>'int'],
'rand\'1' => ['int'],
'random_bytes' => ['non-empty-string', 'length'=>'positive-int'],
'random_int' => ['int', 'min'=>'int', 'max'=>'int'],
'range' => ['array', 'low'=>'int|float|string', 'high'=>'int|float|string', 'step='=>'int|float'],
'RangeException::__clone' => ['void'],
'RangeException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Throwable)|(?RangeException)'],
'RangeException::__toString' => ['string'],
'RangeException::getCode' => ['int'],
'RangeException::getFile' => ['string'],
'RangeException::getLine' => ['int'],
'RangeException::getMessage' => ['string'],
'RangeException::getPrevious' => ['Throwable|RangeException|null'],
'RangeException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'RangeException::getTraceAsString' => ['string'],
'rar_allow_broken_set' => ['bool', 'rarfile'=>'RarArchive', 'allow_broken'=>'bool'],
'rar_broken_is' => ['bool', 'rarfile'=>'RarArchive'],
'rar_close' => ['bool', 'rarfile'=>'RarArchive'],
'rar_comment_get' => ['string|null', 'rarfile'=>'RarArchive'],
'rar_entry_get' => ['RarEntry|false', 'rarfile'=>'RarArchive', 'entryname'=>'string'],
'rar_list' => ['RarEntry[]|false', 'rarfile'=>'RarArchive'],
'rar_open' => ['RarArchive|false', 'filename'=>'string', 'password='=>'string', 'volume_callback='=>'callable'],
'rar_solid_is' => ['bool', 'rarfile'=>'RarArchive'],
'rar_wrapper_cache_stats' => ['string'],
'RarArchive::__toString' => ['string'],
'RarArchive::close' => ['bool'],
'RarArchive::getComment' => ['string|null'],
'RarArchive::getEntries' => ['RarEntry[]|false'],
'RarArchive::getEntry' => ['RarEntry|false', 'entryname'=>'string'],
'RarArchive::isBroken' => ['bool'],
'RarArchive::isSolid' => ['bool'],
'RarArchive::open' => ['RarArchive|false', 'filename'=>'string', 'password='=>'string', 'volume_callback='=>'callable'],
'RarArchive::setAllowBroken' => ['bool', 'allow_broken'=>'bool'],
'RarEntry::__toString' => ['string'],
'RarEntry::extract' => ['bool', 'dir'=>'string', 'filepath='=>'string', 'password='=>'string', 'extended_data='=>'bool'],
'RarEntry::getAttr' => ['int'],
'RarEntry::getCrc' => ['string'],
'RarEntry::getFileTime' => ['string'],
'RarEntry::getHostOs' => ['int'],
'RarEntry::getMethod' => ['int'],
'RarEntry::getName' => ['string'],
'RarEntry::getPackedSize' => ['int'],
'RarEntry::getPosition' => ['int'],
'RarEntry::getRedirTarget' => ['string|bool'],
'RarEntry::getRedirType' => ['int|false|null'],
'RarEntry::getStream' => ['resource|false', 'password='=>'string'],
'RarEntry::getUnpackedSize' => ['int'],
'RarEntry::getVersion' => ['int'],
'RarEntry::isDirectory' => ['bool'],
'RarEntry::isEncrypted' => ['bool'],
'RarEntry::isRedirectToDirectory' => ['bool|null'],
'RarException::getCode' => ['int'],
'RarException::getFile' => ['string'],
'RarException::getLine' => ['int'],
'RarException::getMessage' => ['string'],
'RarException::getPrevious' => ['Exception|Throwable'],
'RarException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'RarException::getTraceAsString' => ['string'],
'RarException::isUsingExceptions' => ['bool'],
'RarException::setUsingExceptions' => ['void', 'using_exceptions'=>'bool'],
'rawurldecode' => ['string', 'str'=>'string'],
'rawurlencode' => ['string', 'str'=>'string'],
'read_exif_data' => ['array', 'filename'=>'string|resource', 'sections_needed='=>'string', 'sub_arrays='=>'bool', 'read_thumbnail='=>'bool'],
'readdir' => ['non-empty-string|false', 'dir_handle='=>'resource'],
'readfile' => ['0|positive-int|false', 'filename'=>'string', 'use_include_path='=>'bool', 'context='=>'resource'],
'readgzfile' => ['0|positive-int|false', 'filename'=>'string', 'use_include_path='=>'int'],
'readline' => ['string|false', 'prompt='=>'?string'],
'readline_add_history' => ['bool', 'prompt'=>'string'],
'readline_callback_handler_install' => ['bool', 'prompt'=>'string', 'callback'=>'callable'],
'readline_callback_handler_remove' => ['bool'],
'readline_callback_read_char' => ['void'],
'readline_clear_history' => ['bool'],
'readline_completion_function' => ['bool', 'funcname'=>'callable'],
'readline_info' => ['mixed', 'varname='=>'string', 'newvalue='=>'string'],
'readline_list_history' => ['array'],
'readline_on_new_line' => ['void'],
'readline_read_history' => ['bool', 'filename='=>'string'],
'readline_redisplay' => ['void'],
'readline_write_history' => ['bool', 'filename='=>'string'],
'readlink' => ['string|false', 'filename'=>'string'],
'realpath' => ['non-empty-string|false', 'path'=>'string'],
'realpath_cache_get' => ['array'],
'realpath_cache_size' => ['int'],
'recode' => ['string', 'request'=>'string', 'str'=>'string'],
'recode_file' => ['bool', 'request'=>'string', 'input'=>'resource', 'output'=>'resource'],
'recode_string' => ['string', 'request'=>'string', 'str'=>'string'],
'rectObj::__construct' => ['void'],
'rectObj::draw' => ['int', 'map'=>'mapObj', 'layer'=>'layerObj', 'img'=>'imageObj', 'class_index'=>'int', 'text'=>'string'],
'rectObj::fit' => ['float', 'width'=>'int', 'height'=>'int'],
'rectObj::ms_newRectObj' => ['rectObj'],
'rectObj::project' => ['int', 'in'=>'projectionObj', 'out'=>'projectionObj'],
'rectObj::set' => ['int', 'property_name'=>'string', 'new_value'=>''],
'rectObj::setextent' => ['void', 'minx'=>'float', 'miny'=>'float', 'maxx'=>'float', 'maxy'=>'float'],
'RecursiveArrayIterator::__construct' => ['void', 'array='=>'array|object', 'flags='=>'int'],
'RecursiveArrayIterator::append' => ['void', 'value'=>'mixed'],
'RecursiveArrayIterator::asort' => ['void'],
'RecursiveArrayIterator::count' => ['0|positive-int'],
'RecursiveArrayIterator::current' => ['mixed'],
'RecursiveArrayIterator::getArrayCopy' => ['array'],
'RecursiveArrayIterator::getChildren' => ['RecursiveArrayIterator'],
'RecursiveArrayIterator::getFlags' => ['void'],
'RecursiveArrayIterator::hasChildren' => ['bool'],
'RecursiveArrayIterator::key' => ['false|int|string'],
'RecursiveArrayIterator::ksort' => ['void'],
'RecursiveArrayIterator::natcasesort' => ['void'],
'RecursiveArrayIterator::natsort' => ['void'],
'RecursiveArrayIterator::next' => ['void'],
'RecursiveArrayIterator::offsetExists' => ['void', 'index'=>'string'],
'RecursiveArrayIterator::offsetGet' => ['mixed', 'index'=>'string'],
'RecursiveArrayIterator::offsetSet' => ['void', 'index'=>'string', 'newval'=>'string'],
'RecursiveArrayIterator::offsetUnset' => ['void', 'index'=>'string'],
'RecursiveArrayIterator::rewind' => ['void'],
'RecursiveArrayIterator::seek' => ['void', 'position'=>'int'],
'RecursiveArrayIterator::serialize' => ['string'],
'RecursiveArrayIterator::setFlags' => ['void', 'flags'=>'string'],
'RecursiveArrayIterator::uasort' => ['void', 'callback'=>'callable(mixed,mixed):int'],
'RecursiveArrayIterator::uksort' => ['void', 'callback'=>'callable(array-key,array-key):int'],
'RecursiveArrayIterator::unserialize' => ['string', 'serialized'=>'string'],
'RecursiveArrayIterator::valid' => ['bool'],
'RecursiveCachingIterator::__construct' => ['void', 'iterator'=>'Iterator', 'flags'=>''],
'RecursiveCachingIterator::getChildren' => ['RecursiveCachingIterator'],
'RecursiveCachingIterator::hasChildren' => ['bool'],
'RecursiveCallbackFilterIterator::__construct' => ['void', 'iterator'=>'RecursiveIterator', 'func'=>'callable'],
'RecursiveCallbackFilterIterator::getChildren' => ['RecursiveCallbackFilterIterator'],
'RecursiveCallbackFilterIterator::hasChildren' => ['void'],
'RecursiveDirectoryIterator::__construct' => ['void', 'path'=>'string', 'flags='=>'int'],
'RecursiveDirectoryIterator::getChildren' => ['object'],
'RecursiveDirectoryIterator::getSubPath' => ['string'],
'RecursiveDirectoryIterator::getSubPathname' => ['string'],
'RecursiveDirectoryIterator::hasChildren' => ['bool', 'allow_links='=>'bool'],
'RecursiveDirectoryIterator::key' => ['string'],
'RecursiveDirectoryIterator::next' => ['void'],
'RecursiveDirectoryIterator::rewind' => ['void'],
'RecursiveFilterIterator::__construct' => ['void', 'iterator'=>'RecursiveIterator'],
'RecursiveFilterIterator::getChildren' => ['RecursiveFilterIterator'],
'RecursiveFilterIterator::hasChildren' => ['bool'],
'RecursiveIterator::getChildren' => ['RecursiveIterator'],
'RecursiveIterator::hasChildren' => ['bool'],
'RecursiveIteratorIterator::__construct' => ['void', 'iterator'=>'RecursiveIterator|IteratorAggregate', 'mode='=>'int', 'flags='=>'int'],
'RecursiveIteratorIterator::beginChildren' => ['void'],
'RecursiveIteratorIterator::beginIteration' => ['RecursiveIterator'],
'RecursiveIteratorIterator::callGetChildren' => ['RecursiveIterator'],
'RecursiveIteratorIterator::callHasChildren' => ['bool'],
'RecursiveIteratorIterator::current' => ['mixed'],
'RecursiveIteratorIterator::endChildren' => ['void'],
'RecursiveIteratorIterator::endIteration' => ['RecursiveIterator'],
'RecursiveIteratorIterator::getDepth' => ['int'],
'RecursiveIteratorIterator::getInnerIterator' => ['RecursiveIterator'],
'RecursiveIteratorIterator::getMaxDepth' => ['int|false'],
'RecursiveIteratorIterator::getSubIterator' => ['RecursiveIterator', 'level='=>'int'],
'RecursiveIteratorIterator::key' => ['mixed'],
'RecursiveIteratorIterator::next' => ['void'],
'RecursiveIteratorIterator::nextElement' => ['void'],
'RecursiveIteratorIterator::rewind' => ['void'],
'RecursiveIteratorIterator::setMaxDepth' => ['void', 'max_depth='=>'int'],
'RecursiveIteratorIterator::valid' => ['bool'],
'RecursiveRegexIterator::__construct' => ['void', 'iterator'=>'RecursiveIterator', 'regex='=>'string', 'mode='=>'int', 'flags='=>'int', 'preg_flags='=>'int'],
'RecursiveRegexIterator::getChildren' => ['RecursiveRegexIterator'],
'RecursiveRegexIterator::hasChildren' => ['bool'],
'RecursiveTreeIterator::__construct' => ['void', 'iterator'=>'RecursiveIterator|IteratorAggregate', 'flags='=>'int', 'cit_flags='=>'int', 'mode='=>'int'],
'RecursiveTreeIterator::beginChildren' => ['void'],
'RecursiveTreeIterator::beginIteration' => ['RecursiveIterator'],
'RecursiveTreeIterator::callGetChildren' => ['RecursiveIterator'],
'RecursiveTreeIterator::callHasChildren' => ['bool'],
'RecursiveTreeIterator::current' => ['string'],
'RecursiveTreeIterator::endChildren' => ['void'],
'RecursiveTreeIterator::endIteration' => ['void'],
'RecursiveTreeIterator::getEntry' => ['string'],
'RecursiveTreeIterator::getPostfix' => ['string'],
'RecursiveTreeIterator::getPrefix' => ['string'],
'RecursiveTreeIterator::key' => ['string'],
'RecursiveTreeIterator::next' => ['void'],
'RecursiveTreeIterator::nextElement' => ['void'],
'RecursiveTreeIterator::rewind' => ['void'],
'RecursiveTreeIterator::setPostfix' => ['void', 'prefix'=>'string'],
'RecursiveTreeIterator::setPrefixPart' => ['void', 'part'=>'int', 'prefix'=>'string'],
'RecursiveTreeIterator::valid' => ['bool'],
'Redis::__construct' => ['void'],
'Redis::_prefix' => ['string', 'value'=>'mixed'],
'Redis::_serialize' => ['mixed', 'value'=>'mixed'],
'Redis::_unserialize' => ['mixed', 'value'=>'string'],
'Redis::append' => ['int', 'key'=>'string', 'value'=>'string'],
'Redis::auth' => ['bool', 'password'=>'string|string[]'],
'Redis::bgRewriteAOF' => ['bool'],
'Redis::bgSave' => ['bool'],
'Redis::bitCount' => ['int', 'key'=>'string'],
'Redis::bitOp' => ['int', 'operation'=>'string', '...args'=>'string'],
'Redis::bitpos' => ['int', 'key'=>'string', 'bit'=>'int', 'start='=>'int', 'end='=>'int'],
'Redis::blPop' => ['array', 'keys'=>'string[]', 'timeout'=>'int'],
'Redis::blPop\'1' => ['array', 'key'=>'string', 'timeout_or_key'=>'int|string', '...extra_args'=>'int|string'],
'Redis::brPop' => ['array', 'keys'=>'string[]', 'timeout'=>'int'],
'Redis::brPop\'1' => ['array', 'key'=>'string', 'timeout_or_key'=>'int|string', '...extra_args'=>'int|string'],
'Redis::brpoplpush' => ['string|false', 'srcKey'=>'string', 'dstKey'=>'string', 'timeout'=>'int'],
'Redis::clearLastError' => ['bool'],
'Redis::client' => ['mixed', 'command'=>'string', 'arg='=>'string'],
'Redis::close' => ['bool'],
'Redis::config' => ['string', 'operation'=>'string', 'key'=>'string', 'value='=>'string'],
'Redis::connect' => ['bool', 'host'=>'string', 'port='=>'int', 'timeout='=>'float', 'persistent_id='=>'?string', 'retry_interval='=>'?int', 'read_timeout='=>'float'],
'Redis::dbSize' => ['int'],
'Redis::decr' => ['int', 'key'=>'string'],
'Redis::decrBy' => ['int', 'key'=>'string', 'value'=>'int'],
'Redis::decrByFloat' => ['float', 'key'=>'string', 'value'=>'float'],
'Redis::del' => ['int', 'key'=>'string', '...args'=>'string'],
'Redis::del\'1' => ['int', 'key'=>'string[]'],
'Redis::delete' => ['int', 'key'=>'string', '...args'=>'string'],
'Redis::delete\'1' => ['int', 'key'=>'string[]'],
'Redis::discard' => [''],
'Redis::dump' => ['string|false', 'key'=>'string'],
'Redis::echo' => ['string', 'message'=>'string'],
'Redis::eval' => ['mixed', 'script'=>'', 'args='=>'', 'numKeys='=>''],
'Redis::evalSha' => ['mixed', 'scriptSha'=>'string', 'args='=>'array', 'numKeys='=>'int'],
'Redis::evaluate' => ['mixed', 'script'=>'string', 'args='=>'array', 'numKeys='=>'int'],
'Redis::evaluateSha' => ['', 'scriptSha'=>'string', 'args='=>'array', 'numKeys='=>'int'],
'Redis::exec' => ['array'],
'Redis::exists' => ['int', 'keys'=>'string|string[]'],
'Redis::exists\'1' => ['int', '...keys'=>'string'],
'Redis::expire' => ['bool', 'key'=>'string', 'ttl'=>'int'],
'Redis::expireAt' => ['bool', 'key'=>'string', 'expiry'=>'int'],
'Redis::flushAll' => ['bool', 'async='=>'bool'],
'Redis::flushDb' => ['bool', 'async='=>'bool'],
'Redis::geoAdd' => ['int', 'key'=>'string', 'longitude'=>'float', 'latitude'=>'float', 'member'=>'string', '...other_triples='=>'string|int|float'],
'Redis::geoDist' => ['float', 'key'=>'string', 'member1'=>'string', 'member2'=>'string', 'unit='=>'string'],
'Redis::geoHash' => ['array<int,string>', 'key'=>'string', 'member'=>'string', '...other_members='=>'string'],
'Redis::geoPos' => ['array<int,array{0:string,1:string}>', 'key'=>'string', 'member'=>'string', '...members'=>'string'],
'Redis::geoRadius' => ['array<int,mixed>|int', 'key'=>'string', 'longitude'=>'float', 'latitude'=>'float', 'radius'=>'float', 'unit'=>'float', 'options='=>'array<string,mixed>'],
'Redis::geoRadiusByMember' => ['array<int,mixed>|int', 'key'=>'string', 'member'=>'string', 'radius'=>'float', 'units'=>'string', 'options='=>'array<string,mixed>'],
'Redis::get' => ['string|false', 'key'=>'string'],
'Redis::getAuth' => ['string|false|null'],
'Redis::getBit' => ['int', 'key'=>'string', 'offset'=>'int'],
'Redis::getKeys' => ['array<int,string>', 'pattern'=>'string'],
'Redis::getLastError' => ['null|string'],
'Redis::getMode' => ['int'],
'Redis::getMultiple' => ['array', 'keys'=>'string[]'],
'Redis::getOption' => ['int', 'name'=>'int'],
'Redis::getRange' => ['int', 'key'=>'string', 'start'=>'int', 'end'=>'int'],
'Redis::getSet' => ['string', 'key'=>'string', 'string'=>'string'],
'Redis::hDel' => ['int|false', 'key'=>'string', 'hashKey1'=>'string', '...otherHashKeys='=>'string'],
'Redis::hExists' => ['bool', 'key'=>'string', 'hashKey'=>'string'],
'Redis::hGet' => ['string|false', 'key'=>'string', 'hashKey'=>'string'],
'Redis::hGetAll' => ['array', 'key'=>'string'],
'Redis::hIncrBy' => ['int', 'key'=>'string', 'hashKey'=>'string', 'value'=>'int'],
'Redis::hIncrByFloat' => ['float', 'key'=>'string', 'field'=>'string', 'increment'=>'float'],
'Redis::hKeys' => ['array', 'key'=>'string'],
'Redis::hLen' => ['int|false', 'key'=>'string'],
'Redis::hMGet' => ['array', 'key'=>'string', 'hashKeys'=>'array'],
'Redis::hMSet' => ['bool', 'key'=>'string', 'hashKeys'=>'array'],
'Redis::hScan' => ['array', 'key'=>'string', '&iterator'=>'int', 'pattern='=>'string', 'count='=>'int'],
'Redis::hSet' => ['int|false', 'key'=>'string', 'hashKey'=>'string', 'value'=>'string'],
'Redis::hSetNx' => ['bool', 'key'=>'string', 'hashKey'=>'string', 'value'=>'string'],
'Redis::hVals' => ['array', 'key'=>'string'],
'Redis::incr' => ['int', 'key'=>'string'],
'Redis::incrBy' => ['int', 'key'=>'string', 'value'=>'int'],
'Redis::incrByFloat' => ['float', 'key'=>'string', 'value'=>'float'],
'Redis::info' => ['array', 'option='=>'string'],
'Redis::keys' => ['array<int,string>', 'pattern'=>'string'],
'Redis::lastSave' => ['int'],
'Redis::lGet' => ['', 'key'=>'string', 'index'=>'int'],
'Redis::lGetRange' => ['', 'key'=>'string', 'start'=>'int', 'end'=>'int'],
'Redis::lIndex' => ['string|false', 'key'=>'string', 'index'=>'int'],
'Redis::lInsert' => ['int', 'key'=>'string', 'position'=>'int', 'pivot'=>'string', 'value'=>'string'],
'Redis::listTrim' => ['', 'key'=>'string', 'start'=>'int', 'stop'=>'int'],
'Redis::lLen' => ['int|false', 'key'=>'string'],
'Redis::lPop' => ['string', 'key'=>'string'],
'Redis::lPush' => ['int|false', 'key'=>'string', 'value1'=>'string', 'value2='=>'string', 'valueN='=>'string'],
'Redis::lPushx' => ['int|false', 'key'=>'string', 'value'=>'string'],
'Redis::lRange' => ['array', 'key'=>'string', 'start'=>'int', 'end'=>'int'],
'Redis::lRem' => ['int|false', 'key'=>'string', 'value'=>'string', 'count'=>'int'],
'Redis::lRemove' => ['', 'key'=>'string', 'value'=>'string', 'count'=>'int'],
'Redis::lSet' => ['bool', 'key'=>'string', 'index'=>'int', 'value'=>'string'],
'Redis::lSize' => ['', 'key'=>'string'],
'Redis::lTrim' => ['array|false', 'key'=>'string', 'start'=>'int', 'stop'=>'int'],
'Redis::mGet' => ['array', 'keys'=>'string[]'],
'Redis::migrate' => ['bool', 'host'=>'string', 'port'=>'int', 'key'=>'string|string[]', 'db'=>'int', 'timeout'=>'int', 'copy='=>'bool', 'replace='=>'bool'],
'Redis::move' => ['bool', 'key'=>'string', 'dbindex'=>'int'],
'Redis::mSet' => ['bool', 'pairs'=>'array'],
'Redis::mSetNx' => ['bool', 'pairs'=>'array'],
'Redis::multi' => ['Redis', 'mode='=>'int'],
'Redis::object' => ['string|long|false', 'info'=>'string', 'key'=>'string'],
'Redis::open' => ['bool', 'host'=>'string', 'port='=>'int', 'timeout='=>'float', 'reserved='=>'null', 'retry_interval='=>'?int', 'read_timeout='=>'float'],
'Redis::pconnect' => ['bool', 'host'=>'string', 'port='=>'int', 'timeout='=>'float', 'persistent_id='=>'string', 'retry_interval='=>'?int'],
'Redis::persist' => ['bool', 'key'=>'string'],
'Redis::pExpire' => ['bool', 'key'=>'string', 'ttl'=>'int'],
'Redis::pexpireAt' => ['bool', 'key'=>'string', 'expiry'=>'int'],
'Redis::pfAdd' => ['bool', 'key'=>'string', 'elements'=>'array'],
'Redis::pfCount' => ['int', 'key'=>'array|string'],
'Redis::pfMerge' => ['bool', 'destkey'=>'string', 'sourcekeys'=>'array'],
'Redis::ping' => ['string'],
'Redis::popen' => ['bool', 'host'=>'string', 'port='=>'int', 'timeout='=>'float', 'persistent_id='=>'string', 'retry_interval='=>'?int'],
'Redis::psetex' => ['bool', 'key'=>'string', 'ttl'=>'int', 'value'=>'string'],
'Redis::psubscribe' => ['', 'patterns'=>'array', 'callback'=>'array|string'],
'Redis::pttl' => ['int|false', 'key'=>'string'],
'Redis::publish' => ['int', 'channel'=>'string', 'message'=>'string'],
'Redis::pubsub' => ['array|int', 'keyword'=>'string', 'argument'=>'array|string'],
'Redis::punsubscribe' => ['', 'pattern'=>'string', '...other_patterns='=>'string'],
'Redis::randomKey' => ['string'],
'Redis::rawCommand' => ['mixed', 'command'=>'string', '...arguments='=>'mixed'],
'Redis::rename' => ['bool', 'srckey'=>'string', 'dstkey'=>'string'],
'Redis::renameKey' => ['bool', 'srckey'=>'string', 'dstkey'=>'string'],
'Redis::renameNx' => ['bool', 'srckey'=>'string', 'dstkey'=>'string'],
'Redis::resetStat' => ['bool'],
'Redis::restore' => ['bool', 'key'=>'string', 'ttl'=>'int', 'value'=>'string'],
'Redis::rPop' => ['string', 'key'=>'string'],
'Redis::rpoplpush' => ['string', 'srcKey'=>'string', 'dstKey'=>'string'],
'Redis::rPush' => ['int|false', 'key'=>'string', 'value1'=>'string', 'value2='=>'string', 'valueN='=>'string'],
'Redis::rPushx' => ['int|false', 'key'=>'string', 'value'=>'string'],
'Redis::sAdd' => ['int|false', 'key'=>'string', 'value1'=>'string', 'value2='=>'string', 'valueN='=>'string'],
'Redis::sAddArray' => ['bool', 'key'=>'string', 'values'=>'array'],
'Redis::save' => ['bool'],
'Redis::scan' => ['array<int,string>|false', '&w_iterator'=>'?int', 'pattern='=>'?string', 'count='=>'?int'],
'Redis::sCard' => ['int', 'key'=>'string'],
'Redis::sContains' => ['', 'key'=>'string', 'value'=>'string'],
'Redis::script' => ['mixed', 'command'=>'string', '...args='=>'mixed'],
'Redis::sDiff' => ['list<string>', 'key1'=>'string', '...other_keys='=>'string'],
'Redis::sDiffStore' => ['int|false', 'dstKey'=>'string', 'key'=>'string', '...other_keys='=>'string'],
'Redis::select' => ['bool', 'dbindex'=>'int'],
'Redis::set' => ['bool', 'key'=>'string', 'value'=>'mixed', 'options='=>'array'],
'Redis::set\'1' => ['bool', 'key'=>'string', 'value'=>'mixed', 'timeout='=>'int'],
'Redis::setBit' => ['int', 'key'=>'string', 'offset'=>'int', 'value'=>'int'],
'Redis::setEx' => ['bool', 'key'=>'string', 'ttl'=>'int', 'value'=>'string'],
'Redis::setex' => ['bool', 'key'=>'string', 'ttl'=>'int', 'value'=>'string'],
'Redis::setNx' => ['bool', 'key'=>'string', 'value'=>'string'],
'Redis::setnx' => ['bool', 'key'=>'string', 'value'=>'string'],
'Redis::setOption' => ['bool', 'name'=>'int', 'value'=>'mixed'],
'Redis::setRange' => ['int', 'key'=>'string', 'offset'=>'int', 'end'=>'string'],
'Redis::setTimeout' => ['bool', 'key'=>'string', 'ttl'=>'int'],
'Redis::sGetMembers' => ['array', 'key'=>'string'],
'Redis::sInter' => ['list<string>|false', 'key'=>'string', '...other_keys='=>'string'],
'Redis::sInterStore' => ['int|false', 'dstKey'=>'string', 'key'=>'string', '...other_keys='=>'string'],
'Redis::sIsMember' => ['bool', 'key'=>'string', 'value'=>'string'],
'Redis::slave' => ['bool', 'host'=>'string', 'port'=>'int'],
'Redis::slave\'1' => ['bool', 'host'=>'string', 'port'=>'int'],
'Redis::slaveof' => ['bool', 'host='=>'string', 'port='=>'int'],
'Redis::slowLog' => ['mixed', 'operation'=>'string', 'length='=>'int'],
'Redis::sMembers' => ['list<string>', 'key'=>'string'],
'Redis::sMove' => ['bool', 'srcKey'=>'string', 'dstKey'=>'string', 'member'=>'string'],
'Redis::sort' => ['array|int', 'key'=>'string', 'options='=>'array'],
'Redis::sPop' => ['string|false', 'key'=>'string'],
'Redis::sRandMember' => ['array|string|false', 'key'=>'string', 'count='=>'int'],
'Redis::sRem' => ['int', 'key'=>'string', 'member1'=>'string', '...other_members='=>'string'],
'Redis::sRemove' => ['int', 'key'=>'string', 'member1'=>'string', '...other_members='=>'string'],
'Redis::sScan' => ['array|bool', 'key'=>'string', '&iterator'=>'int', 'pattern='=>'string', 'count='=>'int'],
'Redis::strLen' => ['0|positive-int', 'key'=>'string'],
'Redis::subscribe' => ['mixed|null', 'channels'=>'array', 'callback'=>'string|array'],
'Redis::substr' => ['', 'key'=>'string', 'start'=>'int', 'end'=>'int'],
'Redis::sUnion' => ['list<string>', 'key'=>'string', '...other_keys='=>'string'],
'Redis::sUnionStore' => ['int', 'dstKey'=>'string', 'key'=>'string', '...other_keys='=>'string'],
'Redis::time' => ['array'],
'Redis::ttl' => ['int|false', 'key'=>'string'],
'Redis::type' => ['int', 'key'=>'string'],
'Redis::unlink' => ['int', 'key'=>'string', '...args'=>'string'],
'Redis::unlink\'1' => ['int', 'key'=>'string[]'],
'Redis::unsubscribe' => ['', 'channel'=>'string', '...other_channels='=>'string'],
'Redis::unwatch' => [''],
'Redis::wait' => ['int', 'numSlaves'=>'int', 'timeout'=>'int'],
'Redis::watch' => ['void', 'key'=>'string', '...other_keys='=>'string'],
'Redis::xack' => ['', 'str_key'=>'string', 'str_group'=>'string', 'arr_ids'=>'array'],
'Redis::xadd' => ['', 'str_key'=>'string', 'str_id'=>'string', 'arr_fields'=>'array', 'i_maxlen='=>'', 'boo_approximate='=>''],
'Redis::xclaim' => ['', 'str_key'=>'string', 'str_group'=>'string', 'str_consumer'=>'string', 'i_min_idle'=>'', 'arr_ids'=>'array', 'arr_opts='=>'array'],
'Redis::xdel' => ['', 'str_key'=>'string', 'arr_ids'=>'array'],
'Redis::xgroup' => ['', 'str_operation'=>'string', 'str_key='=>'string', 'str_arg1='=>'', 'str_arg2='=>'', 'str_arg3='=>''],
'Redis::xinfo' => ['', 'str_cmd'=>'string', 'str_key='=>'string', 'str_group='=>'string'],
'Redis::xlen' => ['', 'key'=>''],
'Redis::xpending' => ['', 'str_key'=>'string', 'str_group'=>'string', 'str_start='=>'', 'str_end='=>'', 'i_count='=>'', 'str_consumer='=>'string'],
'Redis::xrange' => ['', 'str_key'=>'string', 'str_start'=>'', 'str_end'=>'', 'i_count='=>''],
'Redis::xread' => ['', 'arr_streams'=>'array', 'i_count='=>'', 'i_block='=>''],
'Redis::xreadgroup' => ['', 'str_group'=>'string', 'str_consumer'=>'string', 'arr_streams'=>'array', 'i_count='=>'', 'i_block='=>''],
'Redis::xrevrange' => ['', 'str_key'=>'string', 'str_start'=>'', 'str_end'=>'', 'i_count='=>''],
'Redis::xtrim' => ['', 'str_key'=>'string', 'i_maxlen'=>'', 'boo_approximate='=>''],
'Redis::zAdd' => ['int', 'key'=>'string', 'score1'=>'float', 'value1'=>'string', 'score2='=>'float', 'value2='=>'string', 'scoreN='=>'float', 'valueN='=>'string'],
'Redis::zAdd\'1' => ['int', 'key'=>'string', 'options'=>'array', 'score1'=>'float', 'value1'=>'string', 'score2='=>'float', 'value2='=>'string', 'scoreN='=>'float', 'valueN='=>'string'],
'Redis::zCard' => ['int', 'key'=>'string'],
'Redis::zCount' => ['int', 'key'=>'string', 'start'=>'string', 'end'=>'string'],
'Redis::zDelete' => ['int', 'key'=>'string', 'member'=>'string', '...other_members='=>'string'],
'Redis::zDeleteRangeByRank' => ['', 'key'=>'string', 'start'=>'int', 'end'=>'int'],
'Redis::zDeleteRangeByScore' => ['', 'key'=>'string', 'start'=>'float', 'end'=>'float'],
'Redis::zIncrBy' => ['float', 'key'=>'string', 'value'=>'float', 'member'=>'string'],
'Redis::zInter' => ['int', 'Output'=>'string', 'ZSetKeys'=>'array', 'Weights='=>'?array', 'aggregateFunction='=>'string'],
'Redis::zRange' => ['array', 'key'=>'string', 'start'=>'int', 'end'=>'int', 'withscores='=>'bool'],
'Redis::zRangeByLex' => ['array|false', 'key'=>'string', 'min'=>'int', 'max'=>'int', 'offset='=>'int', 'limit='=>'int'],
'Redis::zRangeByScore' => ['array', 'key'=>'string', 'start'=>'int|string', 'end'=>'int|string', 'options='=>'array'],
'Redis::zRank' => ['int', 'key'=>'string', 'member'=>'string'],
'Redis::zRem' => ['int', 'key'=>'string', 'member'=>'string', '...other_members='=>'string'],
'Redis::zRemove' => ['int', 'key'=>'string', 'member'=>'string', '...other_members='=>'string'],
'Redis::zRemRangeByRank' => ['int', 'key'=>'string', 'start'=>'int', 'end'=>'int'],
'Redis::zRemRangeByScore' => ['int', 'key'=>'string', 'start'=>'float|string', 'end'=>'float|string'],
'Redis::zRevRange' => ['array', 'key'=>'string', 'start'=>'int', 'end'=>'int', 'withscore='=>'bool'],
'Redis::zRevRangeByLex' => ['array', 'key'=>'string', 'min'=>'int', 'max'=>'int', 'offset='=>'int', 'limit='=>'int'],
'Redis::zRevRangeByScore' => ['array', 'key'=>'string', 'start'=>'int', 'end'=>'int', 'options='=>'array'],
'Redis::zRevRank' => ['int', 'key'=>'string', 'member'=>'string'],
'Redis::zScan' => ['array|false', 'key'=>'string', '&iterator'=>'int', 'pattern='=>'string', 'count='=>'int'],
'Redis::zScore' => ['float|false', 'key'=>'string', 'member'=>'string'],
'Redis::zSize' => ['', 'key'=>'string'],
'Redis::zUnion' => ['int', 'Output'=>'string', 'ZSetKeys'=>'array', 'Weights='=>'?array', 'aggregateFunction='=>'string'],
'RedisArray::__construct' => ['void', 'name'=>'string'],
'RedisArray::__construct\'1' => ['void', 'hosts'=>'array<int, string>', 'opts='=>'array<string, string>'],
'RedisArray::_function' => ['string'],
'RedisArray::_hosts' => ['array'],
'RedisArray::_rehash' => ['', 'callable='=>'callable'],
'RedisArray::_target' => ['string', 'key'=>'string'],
'RedisCluster::__construct' => ['void', 'name'=>'string|null', 'seeds'=>'array', 'timeout='=>'float', 'readTimeout='=>'float', 'persistent='=>'bool|false', 'auth='=>'string|array|null'],
'RedisCluster::_masters' => ['array'],
'RedisCluster::_prefix' => ['string', 'value'=>'mixed'],
'RedisCluster::_serialize' => ['mixed', 'value'=>'mixed'],
'RedisCluster::_unserialize' => ['mixed', 'value'=>'string'],
'RedisCluster::append' => ['int', 'key'=>'string', 'value'=>'string'],
'RedisCluster::bgrewriteaof' => ['bool', 'nodeParams'=>'string'],
'RedisCluster::bgsave' => ['bool', 'nodeParams'=>'string'],
'RedisCluster::bitCount' => ['int', 'key'=>'string'],
'RedisCluster::bitOp' => ['int', 'operation'=>'string', 'retKey'=>'string', 'key1'=>'string', 'key2'=>'string', 'key3='=>'string'],
'RedisCluster::bitpos' => ['int', 'key'=>'string', 'bit'=>'int', 'start='=>'int', 'end='=>'int'],
'RedisCluster::blPop' => ['array', 'keys'=>'array', 'timeout'=>'int'],
'RedisCluster::brPop' => ['array', 'keys'=>'array', 'timeout'=>'int'],
'RedisCluster::brpoplpush' => ['string', 'srcKey'=>'string', 'dstKey'=>'string', 'timeout'=>'int'],
'RedisCluster::clearLastError' => ['bool'],
'RedisCluster::client' => ['', 'nodeParams'=>'string', 'subCmd'=>'', 'args'=>''],
'RedisCluster::close' => [''],
'RedisCluster::cluster' => ['mixed', 'nodeParams'=>'string', 'command'=>'string', 'arguments'=>'mixed'],
'RedisCluster::command' => ['mixed'],
'RedisCluster::config' => ['array', 'nodeParams'=>'string', 'operation'=>'string', 'key'=>'string', 'value'=>'string'],
'RedisCluster::dbSize' => ['int', 'nodeParams'=>'string'],
'RedisCluster::decr' => ['int', 'key'=>'string'],
'RedisCluster::decrBy' => ['int', 'key'=>'string', 'value'=>'int'],
'RedisCluster::del' => ['int', 'key1'=>'int|string', 'key2='=>'int|string', 'key3='=>'int|string'],
'RedisCluster::discard' => [''],
'RedisCluster::dump' => ['string', 'key'=>'string'],
'RedisCluster::echo' => ['mixed', 'nodeParams'=>'string', 'msg'=>'string'],
'RedisCluster::eval' => ['mixed', 'script'=>'', 'args='=>'', 'numKeys='=>''],
'RedisCluster::evalSha' => ['mixed', 'scriptSha'=>'string', 'args='=>'array', 'numKeys='=>'int'],
'RedisCluster::exec' => ['array|void'],
'RedisCluster::exists' => ['bool', 'key'=>'string'],
'RedisCluster::expire' => ['bool', 'key'=>'string', 'ttl'=>'int'],
'RedisCluster::expireAt' => ['bool', 'key'=>'string', 'timestamp'=>'int'],
'RedisCluster::flushAll' => ['bool', 'nodeParams'=>'string'],
'RedisCluster::flushDB' => ['bool', 'nodeParams'=>'string'],
'RedisCluster::geoAdd' => ['', 'key'=>'string', 'longitude'=>'float', 'latitude'=>'float', 'member'=>'string'],
'RedisCluster::geoDist' => ['', 'key'=>'string', 'member1'=>'string', 'member2'=>'string', 'unit='=>'string'],
'RedisCluster::geohash' => ['', 'key'=>'', 'member1'=>'', 'member2='=>'mixed', 'memberN='=>'mixed'],
'RedisCluster::geopos' => ['', 'key'=>'', 'member1'=>'', 'member2='=>'mixed', 'memberN='=>'mixed'],
'RedisCluster::geoRadius' => ['', 'key'=>'string', 'longitude'=>'float', 'latitude'=>'float', 'radius'=>'float', 'radiusUnit'=>'string', 'options'=>'array'],
'RedisCluster::geoRadiusByMember' => ['', 'key'=>'string', 'member'=>'string', 'radius'=>'float', 'radiusUnit'=>'string', 'options'=>'array'],
'RedisCluster::get' => ['bool|string', 'key'=>'string'],
'RedisCluster::getBit' => ['int', 'key'=>'string', 'offset'=>'int'],
'RedisCluster::getLastError' => ['string'],
'RedisCluster::getMode' => ['int'],
'RedisCluster::getOption' => ['int', 'name'=>'int'],
'RedisCluster::getRange' => ['string', 'key'=>'string', 'start'=>'int', 'end'=>'int'],
'RedisCluster::getSet' => ['string', 'key'=>'string', 'value'=>'string'],
'RedisCluster::hDel' => ['int', 'key'=>'string', 'hashKey1'=>'string', 'hashKey2='=>'string', 'hashKeyN='=>'string'],
'RedisCluster::hExists' => ['bool', 'key'=>'string', 'hashKey'=>'string'],
'RedisCluster::hGet' => ['string', 'key'=>'string', 'hashKey'=>'string'],
'RedisCluster::hGetAll' => ['array', 'key'=>'string'],
'RedisCluster::hIncrBy' => ['int', 'key'=>'string', 'hashKey'=>'string', 'value'=>'int'],
'RedisCluster::hIncrByFloat' => ['float', 'key'=>'string', 'field'=>'string', 'increment'=>'float'],
'RedisCluster::hKeys' => ['array', 'key'=>'string'],
'RedisCluster::hLen' => ['int', 'key'=>'string'],
'RedisCluster::hMGet' => ['array', 'key'=>'string', 'hashKeys'=>'array'],
'RedisCluster::hMSet' => ['bool', 'key'=>'string', 'hashKeys'=>'array'],
'RedisCluster::hScan' => ['array', 'key'=>'string', '&iterator'=>'int', 'pattern='=>'string', 'count='=>'int'],
'RedisCluster::hSet' => ['int', 'key'=>'string', 'hashKey'=>'string', 'value'=>'string'],
'RedisCluster::hSetNx' => ['bool', 'key'=>'string', 'hashKey'=>'string', 'value'=>'string'],
'RedisCluster::hVals' => ['array', 'key'=>'string'],
'RedisCluster::incr' => ['int', 'key'=>'string'],
'RedisCluster::incrBy' => ['int', 'key'=>'string', 'value'=>'int'],
'RedisCluster::incrByFloat' => ['float', 'key'=>'string', 'increment'=>'float'],
'RedisCluster::info' => ['string', 'option='=>'string'],
'RedisCluster::keys' => ['array', 'pattern'=>'string'],
'RedisCluster::lastSave' => ['int', 'nodeParams'=>'string'],
'RedisCluster::lGet' => ['', 'key'=>'string', 'index'=>'int'],
'RedisCluster::lIndex' => ['string', 'key'=>'string', 'index'=>'int'],
'RedisCluster::lInsert' => ['int', 'key'=>'string', 'position'=>'int', 'pivot'=>'string', 'value'=>'string'],
'RedisCluster::lLen' => ['int', 'key'=>'string'],
'RedisCluster::lPop' => ['string', 'key'=>'string'],
'RedisCluster::lPush' => ['int', 'key'=>'string', 'value1'=>'string', 'value2='=>'string', 'valueN='=>'string'],
'RedisCluster::lPushx' => ['int', 'key'=>'string', 'value'=>'string'],
'RedisCluster::lRange' => ['array', 'key'=>'string', 'start'=>'int', 'end'=>'int'],
'RedisCluster::lRem' => ['int', 'key'=>'string', 'value'=>'string', 'count'=>'int'],
'RedisCluster::lSet' => ['bool', 'key'=>'string', 'index'=>'int', 'value'=>'string'],
'RedisCluster::lTrim' => ['array', 'key'=>'string', 'start'=>'int', 'stop'=>'int'],
'RedisCluster::mget' => ['array', 'array'=>'array'],
'RedisCluster::mset' => ['bool', 'array'=>'array'],
'RedisCluster::msetnx' => ['int', 'array'=>'array'],
'RedisCluster::multi' => ['Redis', 'mode='=>'int'],
'RedisCluster::object' => ['string', 'string='=>'string', 'key='=>'string'],
'RedisCluster::persist' => ['bool', 'key'=>'string'],
'RedisCluster::pExpire' => ['bool', 'key'=>'string', 'ttl'=>'int'],
'RedisCluster::pExpireAt' => ['bool', 'key'=>'string', 'timestamp'=>'int'],
'RedisCluster::pfAdd' => ['bool', 'key'=>'string', 'elements'=>'array'],
'RedisCluster::pfCount' => ['int', 'key'=>'string'],
'RedisCluster::pfMerge' => ['bool', 'destKey'=>'string', 'sourceKeys'=>'array'],
'RedisCluster::ping' => ['string', 'nodeParams'=>'string'],
'RedisCluster::psetex' => ['bool', 'key'=>'string', 'ttl'=>'int', 'value'=>'string'],
'RedisCluster::psubscribe' => ['mixed', 'patterns'=>'array', 'callback'=>'string'],
'RedisCluster::pttl' => ['int', 'key'=>'string'],
'RedisCluster::publish' => ['int', 'channel'=>'string', 'message'=>'string'],
'RedisCluster::pubsub' => ['array', 'nodeParams'=>'string', 'keyword'=>'string', '...argument='=>'string'],
'RedisCluster::punSubscribe' => ['', 'channels'=>'', 'callback'=>''],
'RedisCluster::randomKey' => ['string', 'nodeParams'=>'string'],
'RedisCluster::rawCommand' => ['mixed', 'nodeParams'=>'string', 'command'=>'string', 'arguments'=>'mixed'],
'RedisCluster::rename' => ['bool', 'srcKey'=>'string', 'dstKey'=>'string'],
'RedisCluster::renameNx' => ['bool', 'srcKey'=>'string', 'dstKey'=>'string'],
'RedisCluster::restore' => ['bool', 'key'=>'string', 'ttl'=>'int', 'value'=>'string'],
'RedisCluster::role' => ['array', 'nodeParams'=>'string'],
'RedisCluster::rPop' => ['string', 'key'=>'string'],
'RedisCluster::rpoplpush' => ['string', 'srcKey'=>'string', 'dstKey'=>'string'],
'RedisCluster::rPush' => ['int', 'key'=>'string', 'value1'=>'string', 'value2='=>'string', 'valueN='=>'string'],
'RedisCluster::rPushx' => ['int', 'key'=>'string', 'value'=>'string'],
'RedisCluster::sAdd' => ['int', 'key'=>'string', 'value1'=>'string', 'value2='=>'string', 'valueN='=>'string'],
'RedisCluster::sAddArray' => ['int', 'key'=>'string', 'valueArray'=>'array'],
'RedisCluster::save' => ['bool', 'nodeParams'=>'string'],
'RedisCluster::scan' => ['array', '&iterator'=>'int', 'pattern='=>'string', 'count='=>'int'],
'RedisCluster::sCard' => ['int', 'key'=>'string'],
'RedisCluster::script' => ['mixed', 'nodeParams'=>'string', 'command'=>'string', 'script'=>'string'],
'RedisCluster::sDiff' => ['list<string>', 'key1'=>'string', 'key2'=>'string', '...other_keys='=>'string'],
'RedisCluster::sDiffStore' => ['int', 'dstKey'=>'string', 'key1'=>'string', '...other_keys='=>'string'],
'RedisCluster::set' => ['bool', 'key'=>'string', 'value'=>'string', 'timeout='=>'array|int'],
'RedisCluster::setBit' => ['int', 'key'=>'string', 'offset'=>'int', 'value'=>'bool|int'],
'RedisCluster::setex' => ['bool', 'key'=>'string', 'ttl'=>'int', 'value'=>'string'],
'RedisCluster::setnx' => ['bool', 'key'=>'string', 'value'=>'string'],
'RedisCluster::setOption' => ['bool', 'name'=>'int', 'value'=>'mixed'],
'RedisCluster::setRange' => ['string', 'key'=>'string', 'offset'=>'int', 'value'=>'string'],
'RedisCluster::sInter' => ['list<string>', 'key'=>'string', '...other_keys='=>'string'],
'RedisCluster::sInterStore' => ['int', 'dstKey'=>'string', 'key'=>'string', '...other_keys='=>'string'],
'RedisCluster::sIsMember' => ['bool', 'key'=>'string', 'value'=>'string'],
'RedisCluster::slowLog' => ['', 'nodeParams'=>'string', 'command'=>'string', 'argument'=>'mixed', '...other_arguments='=>'mixed'],
'RedisCluster::sMembers' => ['list<string>', 'key'=>'string'],
'RedisCluster::sMove' => ['bool', 'srcKey'=>'string', 'dstKey'=>'string', 'member'=>'string'],
'RedisCluster::sort' => ['array', 'key'=>'string', 'option='=>'array'],
'RedisCluster::sPop' => ['string', 'key'=>'string'],
'RedisCluster::sRandMember' => ['array|string', 'key'=>'string', 'count='=>'int'],
'RedisCluster::sRem' => ['int', 'key'=>'string', 'member1'=>'string', '...other_members='=>'string'],
'RedisCluster::sScan' => ['array', 'key'=>'string', '&iterator'=>'int', 'pattern='=>'null', 'count='=>'int'],
'RedisCluster::strlen' => ['0|positive-int', 'key'=>'string'],
'RedisCluster::subscribe' => ['mixed', 'channels'=>'array', 'callback'=>'string'],
'RedisCluster::sUnion' => ['array', 'key1'=>'string', '...other_keys='=>'string'],
'RedisCluster::sUnionStore' => ['int', 'dstKey'=>'string', 'key1'=>'string', '...other_keys='=>'string'],
'RedisCluster::time' => ['array', 'nodeParams'=>'string'],
'RedisCluster::ttl' => ['int', 'key'=>'string'],
'RedisCluster::type' => ['int', 'key'=>'string'],
'RedisCluster::unlink' => ['int', 'key'=>'string', '...other_keys='=>'string'],
'RedisCluster::unSubscribe' => ['', 'channels'=>'', '...other_channels='=>''],
'RedisCluster::unwatch' => [''],
'RedisCluster::watch' => ['void', 'key'=>'string', '...other_keys='=>'string'],
'RedisCluster::xack' => ['', 'str_key'=>'string', 'str_group'=>'string', 'arr_ids'=>'array'],
'RedisCluster::xadd' => ['', 'str_key'=>'string', 'str_id'=>'string', 'arr_fields'=>'array', 'i_maxlen='=>'', 'boo_approximate='=>''],
'RedisCluster::xclaim' => ['', 'str_key'=>'string', 'str_group'=>'string', 'str_consumer'=>'string', 'i_min_idle'=>'', 'arr_ids'=>'array', 'arr_opts='=>'array'],
'RedisCluster::xdel' => ['', 'str_key'=>'string', 'arr_ids'=>'array'],
'RedisCluster::xgroup' => ['', 'str_operation'=>'string', 'str_key='=>'string', 'str_arg1='=>'', 'str_arg2='=>'', 'str_arg3='=>''],
'RedisCluster::xinfo' => ['', 'str_cmd'=>'string', 'str_key='=>'string', 'str_group='=>'string'],
'RedisCluster::xlen' => ['', 'key'=>''],
'RedisCluster::xpending' => ['', 'str_key'=>'string', 'str_group'=>'string', 'str_start='=>'', 'str_end='=>'', 'i_count='=>'', 'str_consumer='=>'string'],
'RedisCluster::xrange' => ['', 'str_key'=>'string', 'str_start'=>'', 'str_end'=>'', 'i_count='=>''],
'RedisCluster::xread' => ['', 'arr_streams'=>'array', 'i_count='=>'', 'i_block='=>''],
'RedisCluster::xreadgroup' => ['', 'str_group'=>'string', 'str_consumer'=>'string', 'arr_streams'=>'array', 'i_count='=>'', 'i_block='=>''],
'RedisCluster::xrevrange' => ['', 'str_key'=>'string', 'str_start'=>'', 'str_end'=>'', 'i_count='=>''],
'RedisCluster::xtrim' => ['', 'str_key'=>'string', 'i_maxlen'=>'', 'boo_approximate='=>''],
'RedisCluster::zAdd' => ['int', 'key'=>'string', 'score1'=>'float', 'value1'=>'string', 'score2='=>'float', 'value2='=>'string', 'scoreN='=>'float', 'valueN='=>'string'],
'RedisCluster::zCard' => ['int', 'key'=>'string'],
'RedisCluster::zCount' => ['int', 'key'=>'string', 'start'=>'string', 'end'=>'string'],
'RedisCluster::zIncrBy' => ['float', 'key'=>'string', 'value'=>'float', 'member'=>'string'],
'RedisCluster::zInterStore' => ['int', 'Output'=>'string', 'ZSetKeys'=>'array', 'Weights='=>'?array', 'aggregateFunction='=>'string'],
'RedisCluster::zLexCount' => ['int', 'key'=>'string', 'min'=>'int', 'max'=>'int'],
'RedisCluster::zRange' => ['array', 'key'=>'string', 'start'=>'int', 'end'=>'int', 'withscores='=>'bool'],
'RedisCluster::zRangeByLex' => ['array', 'key'=>'string', 'min'=>'int', 'max'=>'int', 'offset='=>'int', 'limit='=>'int'],
'RedisCluster::zRangeByScore' => ['array', 'key'=>'string', 'start'=>'int', 'end'=>'int', 'options='=>'array'],
'RedisCluster::zRank' => ['int', 'key'=>'string', 'member'=>'string'],
'RedisCluster::zRem' => ['int', 'key'=>'string', 'member1'=>'string', '...other_members='=>'string'],
'RedisCluster::zRemRangeByLex' => ['array', 'key'=>'string', 'min'=>'int', 'max'=>'int'],
'RedisCluster::zRemRangeByRank' => ['int', 'key'=>'string', 'start'=>'int', 'end'=>'int'],
'RedisCluster::zRemRangeByScore' => ['int', 'key'=>'string', 'start'=>'float|string', 'end'=>'float|string'],
'RedisCluster::zRevRange' => ['array', 'key'=>'string', 'start'=>'int', 'end'=>'int', 'withscore='=>'bool'],
'RedisCluster::zRevRangeByLex' => ['array', 'key'=>'string', 'min'=>'int', 'max'=>'int', 'offset='=>'int', 'limit='=>'int'],
'RedisCluster::zRevRangeByScore' => ['array', 'key'=>'string', 'start'=>'int', 'end'=>'int', 'options='=>'array'],
'RedisCluster::zRevRank' => ['int', 'key'=>'string', 'member'=>'string'],
'RedisCluster::zScan' => ['array', 'key'=>'string', '&iterator'=>'int', 'pattern='=>'string', 'count='=>'int'],
'RedisCluster::zScore' => ['float', 'key'=>'string', 'member'=>'string'],
'RedisCluster::zUnionStore' => ['int', 'Output'=>'string', 'ZSetKeys'=>'array', 'Weights='=>'?array', 'aggregateFunction='=>'string'],
'Reflection::export' => ['string|null', 'r'=>'reflector', 'return='=>'bool'],
'Reflection::getModifierNames' => ['array', 'modifiers'=>'int'],
'ReflectionClass::__clone' => ['void'],
'ReflectionClass::__construct' => ['void', 'argument'=>'object|string'],
'ReflectionClass::__toString' => ['string'],
'ReflectionClass::export' => ['string|null', 'argument'=>'string|object', 'return='=>'bool'],
'ReflectionClass::getConstant' => ['mixed', 'name'=>'string'],
'ReflectionClass::getConstants' => ['array<string,mixed>'],
'ReflectionClass::getConstructor' => ['ReflectionMethod|null'],
'ReflectionClass::getDefaultProperties' => ['array<string, mixed>'],
'ReflectionClass::getDocComment' => ['string|false'],
'ReflectionClass::getEndLine' => ['int|false'],
'ReflectionClass::getExtension' => ['ReflectionExtension|null'],
'ReflectionClass::getExtensionName' => ['string|false'],
'ReflectionClass::getFileName' => ['string|false'],
'ReflectionClass::getInterfaceNames' => ['list<class-string>'],
'ReflectionClass::getInterfaces' => ['array<string, ReflectionClass>'],
'ReflectionClass::getMethod' => ['ReflectionMethod', 'name'=>'string'],
'ReflectionClass::getMethods' => ['list<ReflectionMethod>', 'filter='=>'int'],
'ReflectionClass::getModifiers' => ['int'],
'ReflectionClass::getName' => ['class-string'],
'ReflectionClass::getNamespaceName' => ['string'],
'ReflectionClass::getParentClass' => ['ReflectionClass|false'],
'ReflectionClass::getProperties' => ['list<ReflectionProperty>', 'filter='=>'int'],
'ReflectionClass::getProperty' => ['ReflectionProperty', 'name'=>'string'],
'ReflectionClass::getReflectionConstant' => ['ReflectionClassConstant|false', 'name'=>'string'],
'ReflectionClass::getReflectionConstants' => ['list<ReflectionClassConstant>'],
'ReflectionClass::getShortName' => ['string'],
'ReflectionClass::getStartLine' => ['int|false'],
'ReflectionClass::getStaticProperties' => ['array<string, mixed>'],
'ReflectionClass::getStaticPropertyValue' => ['mixed', 'name'=>'string', 'default='=>'mixed'],
'ReflectionClass::getTraitAliases' => ['array<string,string>'],
'ReflectionClass::getTraitNames' => ['list<trait-string>'],
'ReflectionClass::getTraits' => ['array<string,ReflectionClass>'],
'ReflectionClass::hasConstant' => ['bool', 'name'=>'string'],
'ReflectionClass::hasMethod' => ['bool', 'name'=>'string'],
'ReflectionClass::hasProperty' => ['bool', 'name'=>'string'],
'ReflectionClass::implementsInterface' => ['bool', 'interface_name'=>'string|ReflectionClass'],
'ReflectionClass::inNamespace' => ['bool'],
'ReflectionClass::isAbstract' => ['bool'],
'ReflectionClass::isAnonymous' => ['bool'],
'ReflectionClass::isCloneable' => ['bool'],
'ReflectionClass::isFinal' => ['bool'],
'ReflectionClass::isInstance' => ['bool', 'object'=>'object'],
'ReflectionClass::isInstantiable' => ['bool'],
'ReflectionClass::isInterface' => ['bool'],
'ReflectionClass::isInternal' => ['bool'],
'ReflectionClass::isIterable' => ['bool'],
'ReflectionClass::isIterateable' => ['bool'],
'ReflectionClass::isSubclassOf' => ['bool', 'class'=>'string|ReflectionClass'],
'ReflectionClass::isTrait' => ['bool'],
'ReflectionClass::isUserDefined' => ['bool'],
'ReflectionClass::newInstance' => ['object', 'args='=>'mixed', '...args='=>'mixed'],
'ReflectionClass::newInstanceArgs' => ['object', 'args='=>'array'],
'ReflectionClass::newInstanceWithoutConstructor' => ['object'],
'ReflectionClass::setStaticPropertyValue' => ['void', 'name'=>'string', 'value'=>'mixed'],
'ReflectionClassConstant::__construct' => ['void', 'class'=>'mixed', 'name'=>'string'],
'ReflectionClassConstant::__toString' => ['string'],
'ReflectionClassConstant::export' => ['string', 'class'=>'mixed', 'name'=>'string', 'return='=>'bool'],
'ReflectionClassConstant::getDeclaringClass' => ['ReflectionClass'],
'ReflectionClassConstant::getDocComment' => ['string|false'],
'ReflectionClassConstant::getModifiers' => ['int'],
'ReflectionClassConstant::getName' => ['string'],
'ReflectionClassConstant::getValue' => ['mixed'],
'ReflectionClassConstant::isPrivate' => ['bool'],
'ReflectionClassConstant::isProtected' => ['bool'],
'ReflectionClassConstant::isPublic' => ['bool'],
'ReflectionExtension::__clone' => ['void'],
'ReflectionExtension::__construct' => ['void', 'name'=>'string'],
'ReflectionExtension::__toString' => ['string'],
'ReflectionExtension::export' => ['string|null', 'name'=>'string', 'return='=>'bool'],
'ReflectionExtension::getClasses' => ['array<string,ReflectionClass>'],
'ReflectionExtension::getClassNames' => ['list<class-string>'],
'ReflectionExtension::getConstants' => ['array<string,mixed>'],
'ReflectionExtension::getDependencies' => ['array<string,string>'],
'ReflectionExtension::getFunctions' => ['array<string,ReflectionFunction>'],
'ReflectionExtension::getINIEntries' => ['array<string,mixed>'],
'ReflectionExtension::getName' => ['string'],
'ReflectionExtension::getVersion' => ['string'],
'ReflectionExtension::info' => ['void'],
'ReflectionExtension::isPersistent' => ['void'],
'ReflectionExtension::isTemporary' => ['bool'],
'ReflectionFunction::__construct' => ['void', 'name'=>'string|Closure'],
'ReflectionFunction::__toString' => ['string'],
'ReflectionFunction::export' => ['string|null', 'name'=>'string', 'return='=>'bool'],
'ReflectionFunction::getClosure' => ['?Closure'],
'ReflectionFunction::getClosureScopeClass' => ['ReflectionClass'],
'ReflectionFunction::getClosureThis' => ['bool'],
'ReflectionFunction::getDocComment' => ['string|false'],
'ReflectionFunction::getEndLine' => ['int|false'],
'ReflectionFunction::getExtension' => ['ReflectionExtension|null'],
'ReflectionFunction::getExtensionName' => ['string|false'],
'ReflectionFunction::getFileName' => ['string|false'],
'ReflectionFunction::getName' => ['non-empty-string'],
'ReflectionFunction::getNamespaceName' => ['string'],
'ReflectionFunction::getNumberOfParameters' => ['int'],
'ReflectionFunction::getNumberOfRequiredParameters' => ['int'],
'ReflectionFunction::getParameters' => ['list<ReflectionParameter>'],
'ReflectionFunction::getReturnType' => ['?ReflectionType'],
'ReflectionFunction::getShortName' => ['string'],
'ReflectionFunction::getStartLine' => ['int|false'],
'ReflectionFunction::getStaticVariables' => ['array'],
'ReflectionFunction::inNamespace' => ['bool'],
'ReflectionFunction::invoke' => ['mixed', '...args='=>'mixed'],
'ReflectionFunction::invokeArgs' => ['mixed', 'args'=>'array'],
'ReflectionFunction::isClosure' => ['bool'],
'ReflectionFunction::isDeprecated' => ['bool'],
'ReflectionFunction::isDisabled' => ['bool'],
'ReflectionFunction::isGenerator' => ['bool'],
'ReflectionFunction::isInternal' => ['bool'],
'ReflectionFunction::isUserDefined' => ['bool'],
'ReflectionFunction::isVariadic' => ['bool'],
'ReflectionFunction::returnsReference' => ['bool'],
'ReflectionFunctionAbstract::__clone' => ['void'],
'ReflectionFunctionAbstract::__toString' => ['string'],
'ReflectionFunctionAbstract::getClosureScopeClass' => ['ReflectionClass|null'],
'ReflectionFunctionAbstract::getClosureThis' => ['object|null'],
'ReflectionFunctionAbstract::getDocComment' => ['string|false'],
'ReflectionFunctionAbstract::getEndLine' => ['int|false'],
'ReflectionFunctionAbstract::getExtension' => ['ReflectionExtension'],
'ReflectionFunctionAbstract::getExtensionName' => ['string'],
'ReflectionFunctionAbstract::getFileName' => ['string|false'],
'ReflectionFunctionAbstract::getName' => ['non-empty-string'],
'ReflectionFunctionAbstract::getNamespaceName' => ['string'],
'ReflectionFunctionAbstract::getNumberOfParameters' => ['int'],
'ReflectionFunctionAbstract::getNumberOfRequiredParameters' => ['int'],
'ReflectionFunctionAbstract::getParameters' => ['list<ReflectionParameter>'],
'ReflectionFunctionAbstract::getReturnType' => ['?ReflectionType'],
'ReflectionFunctionAbstract::getShortName' => ['string'],
'ReflectionFunctionAbstract::getStartLine' => ['int|false'],
'ReflectionFunctionAbstract::getStaticVariables' => ['array'],
'ReflectionFunctionAbstract::hasReturnType' => ['bool'],
'ReflectionFunctionAbstract::inNamespace' => ['bool'],
'ReflectionFunctionAbstract::isClosure' => ['bool'],
'ReflectionFunctionAbstract::isDeprecated' => ['bool'],
'ReflectionFunctionAbstract::isGenerator' => ['bool'],
'ReflectionFunctionAbstract::isInternal' => ['bool'],
'ReflectionFunctionAbstract::isUserDefined' => ['bool'],
'ReflectionFunctionAbstract::isVariadic' => ['bool'],
'ReflectionFunctionAbstract::returnsReference' => ['bool'],
'ReflectionGenerator::__construct' => ['void', 'generator'=>'object'],
'ReflectionGenerator::getExecutingFile' => ['string'],
'ReflectionGenerator::getExecutingGenerator' => ['Generator'],
'ReflectionGenerator::getExecutingLine' => ['int'],
'ReflectionGenerator::getFunction' => ['ReflectionFunctionAbstract'],
'ReflectionGenerator::getThis' => ['object'],
'ReflectionGenerator::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}', 'options'=>'int'],
'ReflectionMethod::__construct' => ['void', 'class'=>'string|object', 'name'=>'string'],
'ReflectionMethod::__construct\'1' => ['void', 'class_method'=>'string'],
'ReflectionMethod::__toString' => ['string'],
'ReflectionMethod::export' => ['string|null', 'class'=>'string', 'name'=>'string', 'return='=>'bool'],
'ReflectionMethod::getClosure' => ['?Closure', 'object'=>'?object'],
'ReflectionMethod::getDeclaringClass' => ['ReflectionClass'],
'ReflectionMethod::getModifiers' => ['int'],
'ReflectionMethod::getPrototype' => ['ReflectionMethod'],
'ReflectionMethod::invoke' => ['mixed', 'object'=>'?object', '...args='=>'mixed'],
'ReflectionMethod::invokeArgs' => ['mixed', 'object'=>'?object', 'args'=>'array'],
'ReflectionMethod::isAbstract' => ['bool'],
'ReflectionMethod::isConstructor' => ['bool'],
'ReflectionMethod::isDestructor' => ['bool'],
'ReflectionMethod::isFinal' => ['bool'],
'ReflectionMethod::isPrivate' => ['bool'],
'ReflectionMethod::isProtected' => ['bool'],
'ReflectionMethod::isPublic' => ['bool'],
'ReflectionMethod::isStatic' => ['bool'],
'ReflectionMethod::setAccessible' => ['void', 'visible'=>'bool'],
'ReflectionNamedType::__toString' => ['string'],
'ReflectionNamedType::allowsNull' => ['bool'],
'ReflectionNamedType::getName' => ['string'],
'ReflectionNamedType::isBuiltin' => ['bool'],
'ReflectionObject::__construct' => ['void', 'argument'=>'object'],
'ReflectionObject::export' => ['string|null', 'argument'=>'object', 'return='=>'bool'],
'ReflectionParameter::__clone' => ['void'],
'ReflectionParameter::__construct' => ['void', 'function'=>'', 'parameter'=>''],
'ReflectionParameter::__toString' => ['string'],
'ReflectionParameter::allowsNull' => ['bool'],
'ReflectionParameter::canBePassedByValue' => ['bool'],
'ReflectionParameter::export' => ['string|null', 'function'=>'string', 'parameter'=>'string', 'return='=>'bool'],
'ReflectionParameter::getClass' => ['ReflectionClass|null'],
'ReflectionParameter::getDeclaringClass' => ['ReflectionClass|null'],
'ReflectionParameter::getDeclaringFunction' => ['ReflectionFunctionAbstract'],
'ReflectionParameter::getDefaultValue' => ['mixed'],
'ReflectionParameter::getDefaultValueConstantName' => ['?string'],
'ReflectionParameter::getName' => ['non-empty-string'],
'ReflectionParameter::getPosition' => ['int'],
'ReflectionParameter::getType' => ['ReflectionType|null'],
'ReflectionParameter::hasType' => ['bool'],
'ReflectionParameter::isArray' => ['bool'],
'ReflectionParameter::isCallable' => ['bool'],
'ReflectionParameter::isDefaultValueAvailable' => ['bool'],
'ReflectionParameter::isDefaultValueConstant' => ['bool'],
'ReflectionParameter::isOptional' => ['bool'],
'ReflectionParameter::isPassedByReference' => ['bool'],
'ReflectionParameter::isVariadic' => ['bool'],
'ReflectionProperty::__clone' => ['void'],
'ReflectionProperty::__construct' => ['void', 'class'=>'', 'name'=>'string'],
'ReflectionProperty::__toString' => ['string'],
'ReflectionProperty::export' => ['string|null', 'class'=>'mixed', 'name'=>'string', 'return='=>'bool'],
'ReflectionProperty::getDeclaringClass' => ['ReflectionClass'],
'ReflectionProperty::getDocComment' => ['string|false'],
'ReflectionProperty::getModifiers' => ['int'],
'ReflectionProperty::getName' => ['non-empty-string'],
'ReflectionProperty::getValue' => ['mixed', 'object='=>'object'],
'ReflectionProperty::isDefault' => ['bool'],
'ReflectionProperty::isPrivate' => ['bool'],
'ReflectionProperty::isProtected' => ['bool'],
'ReflectionProperty::isPublic' => ['bool'],
'ReflectionProperty::isStatic' => ['bool'],
'ReflectionProperty::setAccessible' => ['void', 'visible'=>'bool'],
'ReflectionProperty::setValue' => ['void', 'object'=>'null|object', 'value'=>''],
'ReflectionProperty::setValue\'1' => ['void', 'value'=>''],
'ReflectionType::__toString' => ['string'],
'ReflectionType::allowsNull' => ['bool'],
'ReflectionType::isBuiltin' => ['bool'],
'ReflectionZendExtension::__clone' => ['void'],
'ReflectionZendExtension::__construct' => ['void', 'name'=>'string'],
'ReflectionZendExtension::__toString' => ['string'],
'ReflectionZendExtension::export' => ['string|null', 'name'=>'string', 'return='=>'bool'],
'ReflectionZendExtension::getAuthor' => ['string'],
'ReflectionZendExtension::getCopyright' => ['string'],
'ReflectionZendExtension::getName' => ['string'],
'ReflectionZendExtension::getURL' => ['string'],
'ReflectionZendExtension::getVersion' => ['string'],
'Reflector::__toString' => ['string'],
'Reflector::export' => ['?string'],
'RegexIterator::__construct' => ['void', 'iterator'=>'Iterator', 'regex'=>'string', 'mode='=>'int', 'flags='=>'int', 'preg_flags='=>'int'],
'RegexIterator::accept' => ['bool'],
'RegexIterator::getFlags' => ['int'],
'RegexIterator::getMode' => ['int'],
'RegexIterator::getPregFlags' => ['int'],
'RegexIterator::getRegex' => ['string'],
'RegexIterator::setFlags' => ['bool', 'new_flags'=>'int'],
'RegexIterator::setMode' => ['bool', 'new_mode'=>'int'],
'RegexIterator::setPregFlags' => ['bool', 'new_flags'=>'int'],
'register_event_handler' => ['bool', 'event_handler_func'=>'event_handler_func', 'handler_register_name'=>'handler_register_name', 'event_type_mask'=>'event_type_mask'],
'register_shutdown_function' => ['void', 'function'=>'callable', '...parameter='=>'mixed'],
'register_tick_function' => ['bool', 'function'=>'callable(): void', '...args='=>'mixed'],
'rename' => ['bool', 'old_name'=>'string', 'new_name'=>'string', 'context='=>'resource'],
'rename_function' => ['bool', 'original_name'=>'string', 'new_name'=>'string'],
'reset' => ['mixed', '&rw_array'=>'array|object'],
'ResourceBundle::__construct' => ['void', 'locale'=>'string', 'bundlename'=>'string', 'fallback='=>'bool'],
'ResourceBundle::count' => ['0|positive-int'],
'ResourceBundle::create' => ['?ResourceBundle', 'locale'=>'string', 'bundlename'=>'string', 'fallback='=>'bool'],
'ResourceBundle::get' => ['', 'index'=>'string|int', 'fallback='=>'bool'],
'ResourceBundle::getErrorCode' => ['int'],
'ResourceBundle::getErrorMessage' => ['string'],
'ResourceBundle::getLocales' => ['array', 'bundlename'=>'string'],
'resourcebundle_count' => ['int', 'r'=>'resourcebundle'],
'resourcebundle_create' => ['?ResourceBundle', 'locale'=>'string', 'bundlename'=>'string', 'fallback='=>'bool'],
'resourcebundle_get' => ['', 'r'=>'resourcebundle', 'index'=>'string|int', 'fallback='=>'bool'],
'resourcebundle_get_error_code' => ['int', 'r'=>'resourcebundle'],
'resourcebundle_get_error_message' => ['string', 'r'=>'resourcebundle'],
'resourcebundle_locales' => ['array|false', 'bundlename'=>'string'],
'restore_error_handler' => ['true'],
'restore_exception_handler' => ['true'],
'restore_include_path' => ['void'],
'rewind' => ['bool', 'fp'=>'resource'],
'rewinddir' => ['null|false', 'dir_handle='=>'resource'],
'rmdir' => ['bool', 'dirname'=>'string', 'context='=>'resource'],
'round' => ['float|false', 'number'=>'float', 'precision='=>'int', 'mode='=>'1|2|3|4'],
'rpm_close' => ['bool', 'rpmr'=>'resource'],
'rpm_get_tag' => ['mixed', 'rpmr'=>'resource', 'tagnum'=>'int'],
'rpm_is_valid' => ['bool', 'filename'=>'string'],
'rpm_open' => ['resource|false', 'filename'=>'string'],
'rpm_version' => ['string'],
'rrd_create' => ['bool', 'filename'=>'string', 'options'=>'array'],
'rrd_error' => ['string'],
'rrd_fetch' => ['array', 'filename'=>'string', 'options'=>'array'],
'rrd_first' => ['int', 'file'=>'string', 'raaindex='=>'int'],
'rrd_graph' => ['array', 'filename'=>'string', 'options'=>'array'],
'rrd_info' => ['array', 'filename'=>'string'],
'rrd_last' => ['int', 'filename'=>'string'],
'rrd_lastupdate' => ['array', 'filename'=>'string'],
'rrd_restore' => ['bool', 'xml_file'=>'string', 'rrd_file'=>'string', 'options='=>'array'],
'rrd_tune' => ['bool', 'filename'=>'string', 'options'=>'array'],
'rrd_update' => ['bool', 'filename'=>'string', 'options'=>'array'],
'rrd_version' => ['string'],
'rrd_xport' => ['array', 'options'=>'array'],
'rrdc_disconnect' => ['void'],
'RRDCreator::__construct' => ['void', 'path'=>'string', 'starttime='=>'string', 'step='=>'int'],
'RRDCreator::addArchive' => ['void', 'description'=>'string'],
'RRDCreator::addDataSource' => ['void', 'description'=>'string'],
'RRDCreator::save' => ['bool'],
'RRDGraph::__construct' => ['void', 'path'=>'string'],
'RRDGraph::save' => ['array'],
'RRDGraph::saveVerbose' => ['array'],
'RRDGraph::setOptions' => ['void', 'options'=>'array'],
'RRDUpdater::__construct' => ['void', 'path'=>'string'],
'RRDUpdater::update' => ['bool', 'values'=>'array', 'time='=>'string'],
'rsort' => ['bool', '&rw_array_arg'=>'array', 'sort_flags='=>'int'],
'rtrim' => ['string', 'str'=>'string', 'character_mask='=>'string'],
'runkit_class_adopt' => ['bool', 'classname'=>'string', 'parentname'=>'string'],
'runkit_class_emancipate' => ['bool', 'classname'=>'string'],
'runkit_constant_add' => ['bool', 'constname'=>'string', 'value'=>'mixed'],
'runkit_constant_redefine' => ['bool', 'constname'=>'string', 'newvalue'=>'mixed'],
'runkit_constant_remove' => ['bool', 'constname'=>'string'],
'runkit_function_add' => ['bool', 'funcname'=>'string', 'arglist'=>'string', 'code'=>'string', 'doccomment='=>'?string'],
'runkit_function_add\'1' => ['bool', 'funcname'=>'string', 'closure'=>'Closure', 'doccomment='=>'?string'],
'runkit_function_copy' => ['bool', 'funcname'=>'string', 'targetname'=>'string'],
'runkit_function_redefine' => ['bool', 'funcname'=>'string', 'arglist'=>'string', 'code'=>'string', 'doccomment='=>'?string'],
'runkit_function_redefine\'1' => ['bool', 'funcname'=>'string', 'closure'=>'Closure', 'doccomment='=>'?string'],
'runkit_function_remove' => ['bool', 'funcname'=>'string'],
'runkit_function_rename' => ['bool', 'funcname'=>'string', 'newname'=>'string'],
'runkit_import' => ['bool', 'filename'=>'string', 'flags='=>'int'],
'runkit_lint' => ['bool', 'code'=>'string'],
'runkit_lint_file' => ['bool', 'filename'=>'string'],
'runkit_method_add' => ['bool', 'classname'=>'string', 'methodname'=>'string', 'args'=>'string', 'code'=>'string', 'flags='=>'int', 'doccomment='=>'?string'],
'runkit_method_add\'1' => ['bool', 'classname'=>'string', 'methodname'=>'string', 'closure'=>'Closure', 'flags='=>'int', 'doccomment='=>'?string'],
'runkit_method_copy' => ['bool', 'dclass'=>'string', 'dmethod'=>'string', 'sclass'=>'string', 'smethod='=>'string'],
'runkit_method_redefine' => ['bool', 'classname'=>'string', 'methodname'=>'string', 'args'=>'string', 'code'=>'string', 'flags='=>'int', 'doccomment='=>'?string'],
'runkit_method_redefine\'1' => ['bool', 'classname'=>'string', 'methodname'=>'string', 'closure'=>'Closure', 'flags='=>'int', 'doccomment='=>'?string'],
'runkit_method_remove' => ['bool', 'classname'=>'string', 'methodname'=>'string'],
'runkit_method_rename' => ['bool', 'classname'=>'string', 'methodname'=>'string', 'newname'=>'string'],
'runkit_return_value_used' => ['bool'],
'Runkit_Sandbox::__construct' => ['void', 'options='=>'array'],
'runkit_sandbox_output_handler' => ['mixed', 'sandbox'=>'object', 'callback='=>'mixed'],
'Runkit_Sandbox_Parent' => [''],
'Runkit_Sandbox_Parent::__construct' => ['void'],
'runkit_superglobals' => ['array'],
'RuntimeException::__clone' => ['void'],
'RuntimeException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Throwable)|(?RuntimeException)'],
'RuntimeException::__toString' => ['string'],
'RuntimeException::getCode' => ['int'],
'RuntimeException::getFile' => ['string'],
'RuntimeException::getLine' => ['int'],
'RuntimeException::getMessage' => ['string'],
'RuntimeException::getPrevious' => ['Throwable|RuntimeException|null'],
'RuntimeException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'RuntimeException::getTraceAsString' => ['string'],
'SAMConnection::commit' => ['bool'],
'SAMConnection::connect' => ['bool', 'protocol'=>'string', 'properties='=>'array'],
'SAMConnection::disconnect' => ['bool'],
'SAMConnection::errno' => ['int'],
'SAMConnection::error' => ['string'],
'SAMConnection::isConnected' => ['bool'],
'SAMConnection::peek' => ['SAMMessage', 'target'=>'string', 'properties='=>'array'],
'SAMConnection::peekAll' => ['array', 'target'=>'string', 'properties='=>'array'],
'SAMConnection::receive' => ['SAMMessage', 'target'=>'string', 'properties='=>'array'],
'SAMConnection::remove' => ['SAMMessage', 'target'=>'string', 'properties='=>'array'],
'SAMConnection::rollback' => ['bool'],
'SAMConnection::send' => ['string', 'target'=>'string', 'msg'=>'sammessage', 'properties='=>'array'],
'SAMConnection::setDebug' => ['', 'switch'=>'bool'],
'SAMConnection::subscribe' => ['string', 'targettopic'=>'string'],
'SAMConnection::unsubscribe' => ['bool', 'subscriptionid'=>'string', 'targettopic='=>'string'],
'SAMMessage::body' => ['string'],
'SAMMessage::header' => ['object'],
'sapi_windows_cp_conv' => ['string', 'in_codepage'=>'int|string', 'out_codepage'=>'int|string', 'subject'=>'string'],
'sapi_windows_cp_get' => ['int'],
'sapi_windows_cp_is_utf8' => ['bool'],
'sapi_windows_cp_set' => ['bool', 'code_page'=>'int'],
'sapi_windows_vt100_support' => ['bool', 'stream'=>'resource', 'enable='=>'bool'],
'SCA::createDataObject' => ['SDO_DataObject', 'type_namespace_uri'=>'string', 'type_name'=>'string'],
'SCA::getService' => ['', 'target'=>'string', 'binding='=>'string', 'config='=>'array'],
'SCA_LocalProxy::createDataObject' => ['SDO_DataObject', 'type_namespace_uri'=>'string', 'type_name'=>'string'],
'SCA_SoapProxy::createDataObject' => ['SDO_DataObject', 'type_namespace_uri'=>'string', 'type_name'=>'string'],
'scalebarObj::convertToString' => ['string'],
'scalebarObj::free' => ['void'],
'scalebarObj::set' => ['int', 'property_name'=>'string', 'new_value'=>''],
'scalebarObj::setImageColor' => ['int', 'red'=>'int', 'green'=>'int', 'blue'=>'int'],
'scalebarObj::updateFromString' => ['int', 'snippet'=>'string'],
'scandir' => ['list<string>|false', 'dir'=>'string', 'sorting_order='=>'int', 'context='=>'resource'],
'SDO_DAS_ChangeSummary::beginLogging' => [''],
'SDO_DAS_ChangeSummary::endLogging' => [''],
'SDO_DAS_ChangeSummary::getChangedDataObjects' => ['SDO_List'],
'SDO_DAS_ChangeSummary::getChangeType' => ['int', 'dataobject'=>'sdo_dataobject'],
'SDO_DAS_ChangeSummary::getOldContainer' => ['SDO_DataObject', 'data_object'=>'sdo_dataobject'],
'SDO_DAS_ChangeSummary::getOldValues' => ['SDO_List', 'data_object'=>'sdo_dataobject'],
'SDO_DAS_ChangeSummary::isLogging' => ['bool'],
'SDO_DAS_DataFactory::addPropertyToType' => ['', 'parent_type_namespace_uri'=>'string', 'parent_type_name'=>'string', 'property_name'=>'string', 'type_namespace_uri'=>'string', 'type_name'=>'string', 'options='=>'array'],
'SDO_DAS_DataFactory::addType' => ['', 'type_namespace_uri'=>'string', 'type_name'=>'string', 'options='=>'array'],
'SDO_DAS_DataFactory::getDataFactory' => ['SDO_DAS_DataFactory'],
'SDO_DAS_DataObject::getChangeSummary' => ['SDO_DAS_ChangeSummary'],
'SDO_DAS_Relational::__construct' => ['void', 'database_metadata'=>'array', 'application_root_type='=>'string', 'sdo_containment_references_metadata='=>'array'],
'SDO_DAS_Relational::applyChanges' => ['', 'database_handle'=>'pdo', 'root_data_object'=>'sdodataobject'],
'SDO_DAS_Relational::createRootDataObject' => ['SDODataObject'],
'SDO_DAS_Relational::executePreparedQuery' => ['SDODataObject', 'database_handle'=>'pdo', 'prepared_statement'=>'pdostatement', 'value_list'=>'array', 'column_specifier='=>'array'],
'SDO_DAS_Relational::executeQuery' => ['SDODataObject', 'database_handle'=>'pdo', 'sql_statement'=>'string', 'column_specifier='=>'array'],
'SDO_DAS_Setting::getListIndex' => ['int'],
'SDO_DAS_Setting::getPropertyIndex' => ['int'],
'SDO_DAS_Setting::getPropertyName' => ['string'],
'SDO_DAS_Setting::getValue' => [''],
'SDO_DAS_Setting::isSet' => ['bool'],
'SDO_DAS_XML::addTypes' => ['', 'xsd_file'=>'string'],
'SDO_DAS_XML::create' => ['SDO_DAS_XML', 'xsd_file='=>'mixed', 'key='=>'string'],
'SDO_DAS_XML::createDataObject' => ['SDO_DataObject', 'namespace_uri'=>'string', 'type_name'=>'string'],
'SDO_DAS_XML::createDocument' => ['SDO_DAS_XML_Document', 'document_element_name'=>'string', 'document_element_namespace_uri'=>'string', 'dataobject='=>'sdo_dataobject'],
'SDO_DAS_XML::loadFile' => ['SDO_XMLDocument', 'xml_file'=>'string'],
'SDO_DAS_XML::loadString' => ['SDO_DAS_XML_Document', 'xml_string'=>'string'],
'SDO_DAS_XML::saveFile' => ['', 'xdoc'=>'sdo_xmldocument', 'xml_file'=>'string', 'indent='=>'int'],
'SDO_DAS_XML::saveString' => ['string', 'xdoc'=>'sdo_xmldocument', 'indent='=>'int'],
'SDO_DAS_XML_Document::getRootDataObject' => ['SDO_DataObject'],
'SDO_DAS_XML_Document::getRootElementName' => ['string'],
'SDO_DAS_XML_Document::getRootElementURI' => ['string'],
'SDO_DAS_XML_Document::setEncoding' => ['', 'encoding'=>'string'],
'SDO_DAS_XML_Document::setXMLDeclaration' => ['', 'xmldeclatation'=>'bool'],
'SDO_DAS_XML_Document::setXMLVersion' => ['', 'xmlversion'=>'string'],
'SDO_DataFactory::create' => ['void', 'type_namespace_uri'=>'string', 'type_name'=>'string'],
'SDO_DataObject::clear' => ['void'],
'SDO_DataObject::createDataObject' => ['SDO_DataObject', 'identifier'=>''],
'SDO_DataObject::getContainer' => ['SDO_DataObject'],
'SDO_DataObject::getSequence' => ['SDO_Sequence'],
'SDO_DataObject::getTypeName' => ['string'],
'SDO_DataObject::getTypeNamespaceURI' => ['string'],
'SDO_Exception::getCause' => [''],
'SDO_List::insert' => ['void', 'value'=>'mixed', 'index='=>'int'],
'SDO_Model_Property::getContainingType' => ['SDO_Model_Type'],
'SDO_Model_Property::getDefault' => [''],
'SDO_Model_Property::getName' => ['string'],
'SDO_Model_Property::getType' => ['SDO_Model_Type'],
'SDO_Model_Property::isContainment' => ['bool'],
'SDO_Model_Property::isMany' => ['bool'],
'SDO_Model_ReflectionDataObject::__construct' => ['void', 'data_object'=>'sdo_dataobject'],
'SDO_Model_ReflectionDataObject::export' => ['mixed', 'rdo'=>'sdo_model_reflectiondataobject', 'return='=>'bool'],
'SDO_Model_ReflectionDataObject::getContainmentProperty' => ['SDO_Model_Property'],
'SDO_Model_ReflectionDataObject::getInstanceProperties' => ['array'],
'SDO_Model_ReflectionDataObject::getType' => ['SDO_Model_Type'],
'SDO_Model_Type::getBaseType' => ['SDO_Model_Type'],
'SDO_Model_Type::getName' => ['string'],
'SDO_Model_Type::getNamespaceURI' => ['string'],
'SDO_Model_Type::getProperties' => ['array'],
'SDO_Model_Type::getProperty' => ['SDO_Model_Property', 'identifier'=>''],
'SDO_Model_Type::isAbstractType' => ['bool'],
'SDO_Model_Type::isDataType' => ['bool'],
'SDO_Model_Type::isInstance' => ['bool', 'data_object'=>'sdo_dataobject'],
'SDO_Model_Type::isOpenType' => ['bool'],
'SDO_Model_Type::isSequencedType' => ['bool'],
'SDO_Sequence::getProperty' => ['SDO_Model_Property', 'sequence_index'=>'int'],
'SDO_Sequence::insert' => ['void', 'value'=>'mixed', 'sequenceindex='=>'int', 'propertyidentifier='=>'mixed'],
'SDO_Sequence::move' => ['void', 'toindex'=>'int', 'fromindex'=>'int'],
'SeekableIterator::seek' => ['void', 'position'=>'int'],
'sem_acquire' => ['bool', 'sem_identifier'=>'resource', 'nowait='=>'bool'],
'sem_get' => ['resource|false', 'key'=>'int', 'max_acquire='=>'int', 'perm='=>'int', 'auto_release='=>'int'],
'sem_release' => ['bool', 'sem_identifier'=>'resource'],
'sem_remove' => ['bool', 'sem_identifier'=>'resource'],
'Serializable::serialize' => ['string'],
'Serializable::unserialize' => ['void', 'serialized'=>'string'],
'serialize' => ['string', 'variable'=>'mixed'],
'ServerRequest::withInput' => ['ServerRequest', 'input'=>'mixed'],
'ServerRequest::withoutParams' => ['ServerRequest', 'params'=>'int|string'],
'ServerRequest::withParam' => ['ServerRequest', 'key'=>'int|string', 'val'=>'mixed'],
'ServerRequest::withParams' => ['ServerRequest', 'params'=>'mixed'],
'ServerRequest::withUrl' => ['ServerRequest', 'url'=>'array'],
'ServerResponse::addHeader' => ['void', 'label'=>'string', 'value'=>'string'],
'ServerResponse::date' => ['string', 'date'=>'string|DateTimeInterface'],
'ServerResponse::getHeader' => ['string', 'label'=>'string'],
'ServerResponse::getHeaders' => ['string[]'],
'ServerResponse::getStatus' => ['int'],
'ServerResponse::getVersion' => ['string'],
'ServerResponse::setHeader' => ['void', 'label'=>'string', 'value'=>'string'],
'ServerResponse::setStatus' => ['void', 'status'=>'int'],
'ServerResponse::setVersion' => ['void', 'version'=>'string'],
'session_abort' => ['bool'],
'session_cache_expire' => ['int|false', 'new_cache_expire='=>'int'],
'session_cache_limiter' => ['string|false', 'new_cache_limiter='=>'string'],
'session_commit' => ['bool'],
'session_create_id' => ['string|false', 'prefix='=>'string'],
'session_decode' => ['bool', 'data'=>'string'],
'session_destroy' => ['bool'],
'session_encode' => ['string|false'],
'session_gc' => ['int|false'],
'session_get_cookie_params' => ['array'],
'session_id' => ['string|false', 'newid='=>'string'],
'session_is_registered' => ['bool', 'name'=>'string'],
'session_module_name' => ['string|false', 'newname='=>'string'],
'session_name' => ['string|false', 'newname='=>'string'],
'session_pgsql_add_error' => ['bool', 'error_level'=>'int', 'error_message='=>'string'],
'session_pgsql_get_error' => ['array', 'with_error_message='=>'bool'],
'session_pgsql_get_field' => ['string'],
'session_pgsql_reset' => ['bool'],
'session_pgsql_set_field' => ['bool', 'value'=>'string'],
'session_pgsql_status' => ['array'],
'session_regenerate_id' => ['bool', 'delete_old_session='=>'bool'],
'session_register' => ['bool', 'name'=>'mixed', '...args='=>'mixed'],
'session_register_shutdown' => ['void'],
'session_reset' => ['bool'],
'session_save_path' => ['string|false', 'newname='=>'string'],
'session_set_cookie_params' => ['bool', 'lifetime'=>'int', 'path='=>'string', 'domain='=>'?string', 'secure='=>'bool', 'httponly='=>'bool'],
'session_set_cookie_params\'1' => ['bool', 'options'=>'array{lifetime?:int,path?:string,domain?:?string,secure?:bool,httponly?:bool,samesite?:string}'],
'session_set_save_handler' => ['bool', 'open'=>'callable(string,string):bool', 'close'=>'callable():bool', 'read'=>'callable(string):string', 'write'=>'callable(string,string):bool', 'destroy'=>'callable(string):bool', 'gc'=>'callable(string):bool', 'create_sid='=>'callable():string', 'validate_sid='=>'callable(string):bool', 'update_timestamp='=>'callable(string):bool'],
'session_set_save_handler\'1' => ['bool', 'sessionhandler'=>'SessionHandlerInterface', 'register_shutdown='=>'bool'],
'session_start' => ['bool', 'options='=>'array'],
'session_status' => ['int'],
'session_unregister' => ['bool', 'name'=>'string'],
'session_unset' => ['bool'],
'session_write_close' => ['bool'],
'SessionHandler::close' => ['bool'],
'SessionHandler::create_sid' => ['char'],
'SessionHandler::destroy' => ['bool', 'id'=>'string'],
'SessionHandler::gc' => ['int|false', 'maxlifetime'=>'int'],
'SessionHandler::open' => ['bool', 'save_path'=>'string', 'session_name'=>'string'],
'SessionHandler::read' => ['string', 'id'=>'string'],
'SessionHandler::updateTimestamp' => ['bool', 'session_id'=>'string', 'session_data'=>'string'],
'SessionHandler::validateId' => ['bool', 'session_id'=>'string'],
'SessionHandler::write' => ['bool', 'id'=>'string', 'data'=>'string'],
'SessionHandlerInterface::close' => ['bool'],
'SessionHandlerInterface::destroy' => ['bool', 'session_id'=>'string'],
'SessionHandlerInterface::gc' => ['int|false', 'maxlifetime'=>'int'],
'SessionHandlerInterface::open' => ['bool', 'save_path'=>'string', 'name'=>'string'],
'SessionHandlerInterface::read' => ['string', 'session_id'=>'string'],
'SessionHandlerInterface::write' => ['bool', 'session_id'=>'string', 'session_data'=>'string'],
'SessionIdInterface::create_sid' => ['string'],
'SessionUpdateTimestampHandler::updateTimestamp' => ['bool', 'id'=>'string', 'data'=>'string'],
'SessionUpdateTimestampHandler::validateId' => ['char', 'id'=>'string'],
'SessionUpdateTimestampHandlerInterface::updateTimestamp' => ['bool', 'key'=>'string', 'val'=>'string'],
'SessionUpdateTimestampHandlerInterface::validateId' => ['bool', 'key'=>'string'],
'set_error_handler' => ['?callable', 'callback'=>'null|callable(int,string,string,int,array):bool', 'error_types='=>'int'],
'set_exception_handler' => ['null|callable(Throwable):void', 'exception_handler'=>'null|callable(Throwable):void'],
'set_file_buffer' => ['int', 'fp'=>'resource', 'buffer'=>'int'],
'set_include_path' => ['string|false', 'new_include_path'=>'string'],
'set_magic_quotes_runtime' => ['bool', 'new_setting'=>'bool'],
'set_time_limit' => ['bool', 'seconds'=>'int'],
'setcookie' => ['bool', 'name'=>'string', 'value='=>'string', 'expires='=>'int', 'path='=>'string', 'domain='=>'string', 'secure='=>'bool', 'httponly='=>'bool', 'samesite='=>'\'None\'|\'Lax\'|\'Strict\'|\'none\'|\'lax\'|\'strict\'', 'url_encode='=>'int'],
'setcookie\'1' => ['bool', 'name'=>'string', 'value='=>'string', 'options='=>'array{ expires?:int, path?:string, domain?:string, secure?:bool, httponly?:bool, samesite?:\'None\'|\'Lax\'|\'Strict\'|\'none\'|\'lax\'|\'strict\', url_encode?:int}'],
'setLeftFill' => ['void', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'a='=>'int'],
'setLine' => ['void', 'width'=>'int', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'a='=>'int'],
'setlocale' => ['string|false', 'category'=>'int', 'locale'=>'string|null', '...args='=>'string'],
'setlocale\'1' => ['string|false', 'category'=>'int', 'locale'=>'?array'],
'setproctitle' => ['void', 'title'=>'string'],
'setrawcookie' => ['bool', 'name'=>'string', 'value='=>'string', 'expires='=>'int', 'path='=>'string', 'domain='=>'string', 'secure='=>'bool', 'httponly='=>'bool', 'samesite='=>'\'None\'|\'Lax\'|\'Strict\'|\'none\'|\'lax\'|\'strict\'', 'url_encode='=>'int'],
'setrawcookie\'1' => ['bool', 'name'=>'string', 'value='=>'string', 'options='=>'array{ expires?:int, path?:string, domain?:string, secure?:bool, httponly?:bool, samesite?:\'None\'|\'Lax\'|\'Strict\'|\'none\'|\'lax\'|\'strict\', url_encode?:int}'],
'setRightFill' => ['void', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'a='=>'int'],
'setthreadtitle' => ['bool', 'title'=>'string'],
'settype' => ['bool', '&rw_var'=>'mixed', 'type'=>'string'],
'sha1' => ['non-empty-string', 'str'=>'string', 'raw_output='=>'bool'],
'sha1_file' => ['non-empty-string|false', 'filename'=>'string', 'raw_output='=>'bool'],
'sha256' => ['string', 'str'=>'string', 'raw_output='=>'bool'],
'sha256_file' => ['string', 'filename'=>'string', 'raw_output='=>'bool'],
'shapefileObj::__construct' => ['void', 'filename'=>'string', 'type'=>'int'],
'shapefileObj::addPoint' => ['int', 'point'=>'pointObj'],
'shapefileObj::addShape' => ['int', 'shape'=>'shapeObj'],
'shapefileObj::free' => ['void'],
'shapefileObj::getExtent' => ['rectObj', 'i'=>'int'],
'shapefileObj::getPoint' => ['shapeObj', 'i'=>'int'],
'shapefileObj::getShape' => ['shapeObj', 'i'=>'int'],
'shapefileObj::getTransformed' => ['shapeObj', 'map'=>'mapObj', 'i'=>'int'],
'shapefileObj::ms_newShapefileObj' => ['shapefileObj', 'filename'=>'string', 'type'=>'int'],
'shapeObj::__construct' => ['void', 'type'=>'int'],
'shapeObj::add' => ['int', 'line'=>'lineObj'],
'shapeObj::boundary' => ['shapeObj'],
'shapeObj::contains' => ['bool', 'point'=>'pointObj'],
'shapeObj::containsShape' => ['int', 'shape2'=>'shapeObj'],
'shapeObj::convexhull' => ['shapeObj'],
'shapeObj::crosses' => ['int', 'shape'=>'shapeObj'],
'shapeObj::difference' => ['shapeObj', 'shape'=>'shapeObj'],
'shapeObj::disjoint' => ['int', 'shape'=>'shapeObj'],
'shapeObj::draw' => ['int', 'map'=>'mapObj', 'layer'=>'layerObj', 'img'=>'imageObj'],
'shapeObj::equals' => ['int', 'shape'=>'shapeObj'],
'shapeObj::free' => ['void'],
'shapeObj::getArea' => ['float'],
'shapeObj::getCentroid' => ['pointObj'],
'shapeObj::getLabelPoint' => ['pointObj'],
'shapeObj::getLength' => ['float'],
'shapeObj::getPointUsingMeasure' => ['pointObj', 'm'=>'float'],
'shapeObj::getValue' => ['string', 'layer'=>'layerObj', 'filedname'=>'string'],
'shapeObj::intersection' => ['shapeObj', 'shape'=>'shapeObj'],
'shapeObj::intersects' => ['bool', 'shape'=>'shapeObj'],
'shapeObj::line' => ['lineObj', 'i'=>'int'],
'shapeObj::ms_shapeObjFromWkt' => ['shapeObj', 'wkt'=>'string'],
'shapeObj::overlaps' => ['int', 'shape'=>'shapeObj'],
'shapeObj::project' => ['int', 'in'=>'projectionObj', 'out'=>'projectionObj'],
'shapeObj::set' => ['int', 'property_name'=>'string', 'new_value'=>''],
'shapeObj::setBounds' => ['int'],
'shapeObj::simplify' => ['shapeObj', 'tolerance'=>'float'],
'shapeObj::symdifference' => ['shapeObj', 'shape'=>'shapeObj'],
'shapeObj::topologyPreservingSimplify' => ['shapeObj', 'tolerance'=>'float'],
'shapeObj::touches' => ['int', 'shape'=>'shapeObj'],
'shapeObj::toWkt' => ['string'],
'shapeObj::union' => ['shapeObj', 'shape'=>'shapeObj'],
'shapeObj::within' => ['int', 'shape2'=>'shapeObj'],
'shell_exec' => ['?string', 'cmd'=>'string'],
'shm_attach' => ['resource|false', 'key'=>'int', 'memsize='=>'int', 'perm='=>'int'],
'shm_detach' => ['bool', 'shm_identifier'=>'resource'],
'shm_get_var' => ['mixed', 'id'=>'resource', 'variable_key'=>'int'],
'shm_has_var' => ['bool', 'shm_identifier'=>'resource', 'variable_key'=>'int'],
'shm_put_var' => ['bool', 'shm_identifier'=>'resource', 'variable_key'=>'int', 'variable'=>'mixed'],
'shm_remove' => ['bool', 'shm_identifier'=>'resource'],
'shm_remove_var' => ['bool', 'shm_identifier'=>'resource', 'variable_key'=>'int'],
'shmop_close' => ['void', 'shmid'=>'resource'],
'shmop_delete' => ['bool', 'shmid'=>'resource'],
'shmop_open' => ['resource|false', 'key'=>'int', 'flags'=>'string', 'mode'=>'int', 'size'=>'int'],
'shmop_read' => ['string', 'shmid'=>'resource', 'start'=>'int', 'count'=>'int'],
'shmop_size' => ['int', 'shmid'=>'resource'],
'shmop_write' => ['int', 'shmid'=>'resource', 'data'=>'string', 'offset'=>'int'],
'show_source' => ['', 'file_name'=>'', 'return'=>''],
'shuffle' => ['bool', '&rw_array_arg'=>'array'],
'signeurlpaiement' => ['string', 'clent'=>'string', 'data'=>'string'],
'similar_text' => ['int', 'str1'=>'string', 'str2'=>'string', '&w_percent='=>'float'],
'simplexml_import_dom' => ['SimpleXMLElement|null', 'node'=>'DOMNode', 'class_name='=>'string'],
'simplexml_load_file' => ['SimpleXMLElement|false', 'filename'=>'string', 'class_name='=>'string', 'options='=>'int', 'ns='=>'string', 'is_prefix='=>'bool'],
'simplexml_load_string' => ['SimpleXMLElement|false', 'data'=>'string', 'class_name='=>'string', 'options='=>'int', 'ns='=>'string', 'is_prefix='=>'bool'],
'SimpleXMLElement::__construct' => ['void', 'data'=>'string', 'options='=>'int', 'data_is_url='=>'bool', 'ns='=>'string', 'is_prefix='=>'bool'],
'SimpleXMLElement::__get' => ['static', 'name'=>'string'],
'SimpleXMLElement::__toString' => ['string'],
'SimpleXMLElement::addAttribute' => ['void', 'name'=>'string', 'value='=>'string', 'ns='=>'string'],
'SimpleXMLElement::addChild' => ['static', 'name'=>'string', 'value='=>'string|null', 'ns='=>'string|null'],
'SimpleXMLElement::asXML' => ['string|bool', 'filename='=>'string'],
'SimpleXMLElement::attributes' => ['static|null', 'ns='=>'string', 'is_prefix='=>'bool'],
'SimpleXMLElement::children' => ['__benevolent<static|null>', 'namespaceOrPrefix='=>'string|null', 'is_prefix='=>'bool'],
'SimpleXMLElement::count' => ['0|positive-int'],
'SimpleXMLElement::getDocNamespaces' => ['string[]|false', 'recursive='=>'bool', 'from_root='=>'bool'],
'SimpleXMLElement::getName' => ['string'],
'SimpleXMLElement::getNamespaces' => ['string[]', 'recursive='=>'bool'],
'SimpleXMLElement::registerXPathNamespace' => ['bool', 'prefix'=>'string', 'ns'=>'string'],
'SimpleXMLElement::xpath' => ['static[]|false|null', 'path'=>'string'],
'SimpleXMLIterator::current' => ['SimpleXMLIterator'],
'SimpleXMLIterator::getChildren' => ['SimpleXMLIterator'],
'SimpleXMLIterator::hasChildren' => ['bool'],
'SimpleXMLIterator::key' => ['string|false'],
'SimpleXMLIterator::next' => ['void'],
'SimpleXMLIterator::rewind' => ['void'],
'SimpleXMLIterator::valid' => ['bool'],
'sin' => ['float', 'number'=>'float'],
'sinh' => ['float', 'number'=>'float'],
'sizeof' => ['int', 'var'=>'Countable|array', 'mode='=>'int'],
'sleep' => ['int|false', 'seconds'=>'int'],
'snmp2_get' => ['string|false', 'host'=>'string', 'community'=>'string', 'object_id'=>'string', 'timeout='=>'int', 'retries='=>'int'],
'snmp2_getnext' => ['string|false', 'host'=>'string', 'community'=>'string', 'object_id'=>'string', 'timeout='=>'int', 'retries='=>'int'],
'snmp2_real_walk' => ['array|false', 'host'=>'string', 'community'=>'string', 'object_id'=>'string', 'timeout='=>'int', 'retries='=>'int'],
'snmp2_set' => ['bool', 'host'=>'string', 'community'=>'string', 'object_id'=>'string', 'type'=>'string', 'value'=>'string', 'timeout='=>'int', 'retries='=>'int'],
'snmp2_walk' => ['array|false', 'host'=>'string', 'community'=>'string', 'object_id'=>'string', 'timeout='=>'int', 'retries='=>'int'],
'snmp3_get' => ['string|false', 'host'=>'string', 'sec_name'=>'string', 'sec_level'=>'string', 'auth_protocol'=>'string', 'auth_passphrase'=>'string', 'priv_protocol'=>'string', 'priv_passphrase'=>'string', 'object_id'=>'string', 'timeout='=>'int', 'retries='=>'int'],
'snmp3_getnext' => ['string|false', 'host'=>'string', 'sec_name'=>'string', 'sec_level'=>'string', 'auth_protocol'=>'string', 'auth_passphrase'=>'string', 'priv_protocol'=>'string', 'priv_passphrase'=>'string', 'object_id'=>'string', 'timeout='=>'int', 'retries='=>'int'],
'snmp3_real_walk' => ['array|false', 'host'=>'string', 'sec_name'=>'string', 'sec_level'=>'string', 'auth_protocol'=>'string', 'auth_passphrase'=>'string', 'priv_protocol'=>'string', 'priv_passphrase'=>'string', 'object_id'=>'string', 'timeout='=>'int', 'retries='=>'int'],
'snmp3_set' => ['bool', 'host'=>'string', 'sec_name'=>'string', 'sec_level'=>'string', 'auth_protocol'=>'string', 'auth_passphrase'=>'string', 'priv_protocol'=>'string', 'priv_passphrase'=>'string', 'object_id'=>'string', 'type'=>'string', 'value'=>'string', 'timeout='=>'int', 'retries='=>'int'],
'snmp3_walk' => ['array|false', 'host'=>'string', 'sec_name'=>'string', 'sec_level'=>'string', 'auth_protocol'=>'string', 'auth_passphrase'=>'string', 'priv_protocol'=>'string', 'priv_passphrase'=>'string', 'object_id'=>'string', 'timeout='=>'int', 'retries='=>'int'],
'SNMP::__construct' => ['void', 'version'=>'int', 'hostname'=>'string', 'community'=>'string', 'timeout='=>'int', 'retries='=>'int'],
'SNMP::close' => ['bool'],
'SNMP::get' => ['array|string|false', 'object_id'=>'string|array', 'preserve_keys='=>'bool'],
'SNMP::getErrno' => ['int'],
'SNMP::getError' => ['string'],
'SNMP::getnext' => ['string|array|false', 'object_id'=>'string|array'],
'SNMP::set' => ['bool', 'object_id'=>'string|array', 'type'=>'string|array', 'value'=>'mixed'],
'SNMP::setSecurity' => ['bool', 'sec_level'=>'string', 'auth_protocol='=>'string', 'auth_passphrase='=>'string', 'priv_protocol='=>'string', 'priv_passphrase='=>'string', 'contextname='=>'string', 'contextengineid='=>'string'],
'SNMP::walk' => ['array|false', 'object_id'=>'string', 'suffix_as_key='=>'bool', 'non_repeaters='=>'int', 'max_repetitions='=>'int'],
'snmp_get_quick_print' => ['bool'],
'snmp_get_valueretrieval' => ['int'],
'snmp_read_mib' => ['bool', 'filename'=>'string'],
'snmp_set_enum_print' => ['bool', 'enum_print'=>'int'],
'snmp_set_oid_numeric_print' => ['void', 'oid_format'=>'int'],
'snmp_set_oid_output_format' => ['bool', 'oid_format'=>'int'],
'snmp_set_quick_print' => ['bool', 'quick_print'=>'int'],
'snmp_set_valueretrieval' => ['bool', 'method='=>'int'],
'snmpget' => ['string|false', 'host'=>'string', 'community'=>'string', 'object_id'=>'string', 'timeout='=>'int', 'retries='=>'int'],
'snmpgetnext' => ['string|false', 'host'=>'string', 'community'=>'string', 'object_id'=>'string', 'timeout='=>'int', 'retries='=>'int'],
'snmprealwalk' => ['array|false', 'host'=>'string', 'community'=>'string', 'object_id'=>'string', 'timeout='=>'int', 'retries='=>'int'],
'snmpset' => ['bool', 'host'=>'string', 'community'=>'string', 'object_id'=>'string', 'type'=>'string', 'value'=>'mixed', 'timeout='=>'int', 'retries='=>'int'],
'snmpwalk' => ['array|false', 'host'=>'string', 'community'=>'string', 'object_id'=>'string', 'timeout='=>'int', 'retries='=>'int'],
'snmpwalkoid' => ['array|false', 'hostname'=>'string', 'community'=>'string', 'object_id'=>'string', 'timeout='=>'int', 'retries='=>'int'],
'SoapClient::__call' => ['mixed', 'function_name'=>'string', 'arguments'=>'array'],
'SoapClient::__construct' => ['void', 'wsdl'=>'mixed', 'options='=>'array|null'],
'SoapClient::__doRequest' => ['string|null', 'request'=>'string', 'location'=>'string', 'action'=>'string', 'version'=>'int', 'one_way='=>'int'],
'SoapClient::__getCookies' => ['array'],
'SoapClient::__getFunctions' => ['array|null'],
'SoapClient::__getLastRequest' => ['string|null'],
'SoapClient::__getLastRequestHeaders' => ['string|null'],
'SoapClient::__getLastResponse' => ['string|null'],
'SoapClient::__getLastResponseHeaders' => ['string|null'],
'SoapClient::__getTypes' => ['array|null'],
'SoapClient::__setCookie' => ['', 'name'=>'string', 'value='=>'string'],
'SoapClient::__setLocation' => ['string|null', 'new_location='=>'string'],
'SoapClient::__setSoapHeaders' => ['bool', 'soapheaders='=>''],
'SoapClient::__soapCall' => ['mixed', 'function_name'=>'string', 'arguments'=>'array', 'options='=>'array', 'input_headers='=>'SoapHeader|array', '&w_output_headers='=>'array'],
'SoapClient::SoapClient' => ['object', 'wsdl'=>'mixed', 'options='=>'array|null'],
'SoapFault::__construct' => ['void', 'faultcode'=>'string', 'string'=>'string', 'faultactor='=>'string', 'detail='=>'mixed', 'faultname='=>'string', 'headerfault='=>'mixed'],
'SoapFault::__toString' => ['string'],
'SoapFault::SoapFault' => ['object', 'faultcode'=>'string', 'string'=>'string', 'faultactor='=>'string', 'detail='=>'string', 'faultname='=>'string', 'headerfault='=>'string'],
'SoapHeader::__construct' => ['void', 'namespace'=>'string', 'name'=>'string', 'data='=>'mixed', 'mustunderstand='=>'bool', 'actor='=>'string'],
'SoapHeader::SoapHeader' => ['object', 'namespace'=>'string', 'name'=>'string', 'data='=>'mixed', 'mustunderstand='=>'bool', 'actor='=>'string'],
'SoapParam::__construct' => ['void', 'data'=>'mixed', 'name'=>'string'],
'SoapParam::SoapParam' => ['object', 'data'=>'mixed', 'name'=>'string'],
'SoapServer::__construct' => ['void', 'wsdl'=>'?string', 'options='=>'array'],
'SoapServer::addFunction' => ['void', 'functions'=>'mixed'],
'SoapServer::addSoapHeader' => ['void', 'object'=>'soapheader'],
'SoapServer::fault' => ['void', 'code'=>'string', 'string'=>'string', 'actor='=>'string', 'details='=>'string', 'name='=>'string'],
'SoapServer::getFunctions' => ['array'],
'SoapServer::handle' => ['void', 'soap_request='=>'string'],
'SoapServer::setClass' => ['void', 'class_name'=>'string', '...args='=>'mixed'],
'SoapServer::setObject' => ['void', 'obj'=>'object'],
'SoapServer::setPersistence' => ['void', 'mode'=>'int'],
'SoapServer::SoapServer' => ['object', 'wsdl'=>'?string', 'options='=>'array'],
'SoapVar::__construct' => ['void', 'data'=>'mixed', 'encoding'=>'int', 'type_name='=>'string|null', 'type_namespace='=>'string|null', 'node_name='=>'string|null', 'node_namespace='=>'string|null'],
'SoapVar::SoapVar' => ['object', 'data'=>'mixed', 'encoding'=>'int', 'type_name='=>'string|null', 'type_namespace='=>'string|null', 'node_name='=>'string|null', 'node_namespace='=>'string|null'],
'socket_accept' => ['resource|false', 'socket'=>'resource'],
'socket_addrinfo_bind' => ['resource|null|false', 'addrinfo'=>'resource'],
'socket_addrinfo_connect' => ['resource|null|false', 'addrinfo'=>'resource'],
'socket_addrinfo_explain' => ['array', 'addrinfo'=>'resource'],
'socket_addrinfo_lookup' => ['resource[]|false', 'node'=>'string', 'service='=>'mixed', 'hints='=>'array'],
'socket_bind' => ['bool', 'socket'=>'resource', 'addr'=>'string', 'port='=>'int'],
'socket_clear_error' => ['void', 'socket='=>'resource'],
'socket_close' => ['void', 'socket'=>'resource'],
'socket_cmsg_space' => ['int', 'level'=>'int', 'type'=>'int'],
'socket_connect' => ['bool', 'socket'=>'resource', 'addr'=>'string', 'port='=>'int'],
'socket_create' => ['resource|false', 'domain'=>'int', 'type'=>'int', 'protocol'=>'int'],
'socket_create_listen' => ['resource|false', 'port'=>'int', 'backlog='=>'int'],
'socket_create_pair' => ['bool', 'domain'=>'int', 'type'=>'int', 'protocol'=>'int', '&w_fd'=>'resource[]'],
'socket_export_stream' => ['resource|false', 'socket'=>'resource'],
'socket_get_option' => ['mixed', 'socket'=>'resource', 'level'=>'int', 'optname'=>'int'],
'socket_getopt' => ['mixed', 'socket'=>'resource', 'level'=>'int', 'optname'=>'int'],
'socket_getpeername' => ['bool', 'socket'=>'resource', '&w_addr'=>'string', '&w_port='=>'int'],
'socket_getsockname' => ['bool', 'socket'=>'resource', '&w_addr'=>'string', '&w_port='=>'int'],
'socket_import_stream' => ['resource|false', 'stream'=>'resource'],
'socket_last_error' => ['int', 'socket='=>'resource'],
'socket_listen' => ['bool', 'socket'=>'resource', 'backlog='=>'int'],
'socket_read' => ['string|false', 'socket'=>'resource', 'length'=>'int', 'type='=>'int'],
'socket_recv' => ['int|false', 'socket'=>'resource', '&w_buf'=>'string', 'len'=>'int', 'flags'=>'int'],
'socket_recvfrom' => ['int|false', 'socket'=>'resource', '&w_buf'=>'string', 'len'=>'int', 'flags'=>'int', '&w_name'=>'string', '&w_port='=>'int'],
'socket_recvmsg' => ['int|false', 'socket'=>'resource', '&w_message'=>'string', 'flags='=>'int'],
'socket_select' => ['int|false', '&rw_read_fds'=>'resource[]|null', '&rw_write_fds'=>'resource[]|null', '&rw_except_fds'=>'resource[]|null', 'tv_sec'=>'int|null', 'tv_usec='=>'int|null'],
'socket_send' => ['int|false', 'socket'=>'resource', 'buf'=>'string', 'len'=>'int', 'flags'=>'int'],
'socket_sendmsg' => ['int|false', 'socket'=>'resource', 'message'=>'array', 'flags'=>'int'],
'socket_sendto' => ['int|false', 'socket'=>'resource', 'buf'=>'string', 'len'=>'int', 'flags'=>'int', 'addr'=>'string', 'port='=>'int'],
'socket_set_block' => ['bool', 'socket'=>'resource'],
'socket_set_nonblock' => ['bool', 'socket'=>'resource'],
'socket_set_option' => ['bool', 'socket'=>'resource', 'level'=>'int', 'optname'=>'int', 'optval'=>'int|string|array'],
'socket_shutdown' => ['bool', 'socket'=>'resource', 'how='=>'int'],
'socket_strerror' => ['string', 'errno'=>'int'],
'socket_write' => ['int|false', 'socket'=>'resource', 'buf'=>'string', 'length='=>'int'],
'socket_wsaprotocol_info_export' => ['string|false', 'stream'=>'resource', 'target_pid'=>'int'],
'socket_wsaprotocol_info_import' => ['resource|false', 'id'=>'string'],
'socket_wsaprotocol_info_release' => ['bool', 'id'=>'string'],
'Sodium\add' => ['', '&left'=>'string', 'right'=>'string'],
'Sodium\bin2hex' => ['string', 'binary'=>'string'],
'Sodium\compare' => ['int', 'left'=>'string', 'right'=>'string'],
'Sodium\crypto_aead_aes256gcm_decrypt' => ['string', 'msg'=>'string', 'nonce'=>'string', 'key'=>'string', 'ad='=>'string'],
'Sodium\crypto_aead_aes256gcm_encrypt' => ['string', 'msg'=>'string', 'nonce'=>'string', 'key'=>'string', 'ad='=>'string'],
'Sodium\crypto_aead_aes256gcm_is_available' => ['bool'],
'Sodium\crypto_aead_chacha20poly1305_decrypt' => ['string', 'msg'=>'string', 'nonce'=>'string', 'key'=>'string', 'ad='=>'string'],
'Sodium\crypto_aead_chacha20poly1305_encrypt' => ['string', 'msg'=>'string', 'nonce'=>'string', 'key'=>'string', 'ad='=>'string'],
'Sodium\crypto_auth' => ['string', 'msg'=>'string', 'key'=>'string'],
'Sodium\crypto_auth_verify' => ['bool', 'mac'=>'string', 'msg'=>'string', 'key'=>'string'],
'Sodium\crypto_box' => ['string', 'msg'=>'string', 'nonce'=>'string', 'keypair'=>'string'],
'Sodium\crypto_box_keypair' => ['string'],
'Sodium\crypto_box_keypair_from_secretkey_and_publickey' => ['string', 'secretkey'=>'string', 'publickey'=>'string'],
'Sodium\crypto_box_open' => ['string', 'msg'=>'string', 'nonce'=>'string', 'keypair'=>'string'],
'Sodium\crypto_box_publickey' => ['string', 'keypair'=>'string'],
'Sodium\crypto_box_publickey_from_secretkey' => ['string', 'secretkey'=>'string'],
'Sodium\crypto_box_seal' => ['string', 'message'=>'string', 'publickey'=>'string'],
'Sodium\crypto_box_seal_open' => ['string', 'encrypted'=>'string', 'keypair'=>'string'],
'Sodium\crypto_box_secretkey' => ['string', 'keypair'=>'string'],
'Sodium\crypto_box_seed_keypair' => ['string', 'seed'=>'string'],
'Sodium\crypto_generichash' => ['string', 'input'=>'string', 'key='=>'string', 'length='=>'int'],
'Sodium\crypto_generichash_final' => ['string', 'state'=>'string', 'length='=>'int'],
'Sodium\crypto_generichash_init' => ['string', 'key='=>'string', 'length='=>'int'],
'Sodium\crypto_generichash_update' => ['bool', '&hashState'=>'string', 'append'=>'string'],
'Sodium\crypto_kx' => ['string', 'secretkey'=>'string', 'publickey'=>'string', 'client_publickey'=>'string', 'server_publickey'=>'string'],
'Sodium\crypto_pwhash' => ['string', 'out_len'=>'int', 'passwd'=>'string', 'salt'=>'string', 'opslimit'=>'int', 'memlimit'=>'int'],
'Sodium\crypto_pwhash_scryptsalsa208sha256' => ['string', 'out_len'=>'int', 'passwd'=>'string', 'salt'=>'string', 'opslimit'=>'int', 'memlimit'=>'int'],
'Sodium\crypto_pwhash_scryptsalsa208sha256_str' => ['string', 'passwd'=>'string', 'opslimit'=>'int', 'memlimit'=>'int'],
'Sodium\crypto_pwhash_scryptsalsa208sha256_str_verify' => ['bool', 'hash'=>'string', 'passwd'=>'string'],
'Sodium\crypto_pwhash_str' => ['string', 'passwd'=>'string', 'opslimit'=>'int', 'memlimit'=>'int'],
'Sodium\crypto_pwhash_str_verify' => ['bool', 'hash'=>'string', 'passwd'=>'string'],
'Sodium\crypto_scalarmult' => ['string', 'ecdhA'=>'string', 'ecdhB'=>'string'],
'Sodium\crypto_scalarmult_base' => ['string', 'sk'=>'string'],
'Sodium\crypto_secretbox' => ['string', 'plaintext'=>'string', 'nonce'=>'string', 'key'=>'string'],
'Sodium\crypto_secretbox_open' => ['string', 'ciphertext'=>'string', 'nonce'=>'string', 'key'=>'string'],
'Sodium\crypto_shorthash' => ['string', 'message'=>'string', 'key'=>'string'],
'Sodium\crypto_sign' => ['string', 'message'=>'string', 'secretkey'=>'string'],
'Sodium\crypto_sign_detached' => ['string', 'message'=>'string', 'secretkey'=>'string'],
'Sodium\crypto_sign_ed25519_pk_to_curve25519' => ['string', 'sign_pk'=>'string'],
'Sodium\crypto_sign_ed25519_sk_to_curve25519' => ['string', 'sign_sk'=>'string'],
'Sodium\crypto_sign_keypair' => ['string'],
'Sodium\crypto_sign_keypair_from_secretkey_and_publickey' => ['string', 'secretkey'=>'string', 'publickey'=>'string'],
'Sodium\crypto_sign_open' => ['string|false', 'signed_message'=>'string', 'publickey'=>'string'],
'Sodium\crypto_sign_publickey' => ['string', 'keypair'=>'string'],
'Sodium\crypto_sign_publickey_from_secretkey' => ['string', 'secretkey'=>'string'],
'Sodium\crypto_sign_secretkey' => ['string', 'keypair'=>'string'],
'Sodium\crypto_sign_seed_keypair' => ['string', 'seed'=>'string'],
'Sodium\crypto_sign_verify_detached' => ['bool', 'signature'=>'string', 'msg'=>'string', 'publickey'=>'string'],
'Sodium\crypto_stream' => ['string', 'length'=>'int', 'nonce'=>'string', 'key'=>'string'],
'Sodium\crypto_stream_xor' => ['string', 'plaintext'=>'string', 'nonce'=>'string', 'key'=>'string'],
'Sodium\hex2bin' => ['string', 'hex'=>'string'],
'Sodium\increment' => ['string', '&nonce'=>'string'],
'Sodium\library_version_major' => ['int'],
'Sodium\library_version_minor' => ['int'],
'Sodium\memcmp' => ['int', 'left'=>'string', 'right'=>'string'],
'Sodium\memzero' => ['', '&target'=>'string'],
'Sodium\randombytes_buf' => ['string', 'length'=>'int'],
'Sodium\randombytes_random16' => ['int|string'],
'Sodium\randombytes_uniform' => ['int', 'upperBoundNonInclusive'=>'int'],
'Sodium\version_string' => ['string'],
'sodium_add' => ['string', 'string_1'=>'string', 'string_2'=>'string'],
'sodium_base642bin' => ['string', 'base64'=>'string', 'variant'=>'int', 'ignore='=>'string'],
'sodium_bin2base64' => ['string', 'binary'=>'string', 'variant'=>'int'],
'sodium_bin2hex' => ['string', 'binary'=>'string'],
'sodium_compare' => ['int', 'string_1'=>'string', 'string_2'=>'string'],
'sodium_crypto_aead_aes256gcm_decrypt' => ['string|false', 'confidential_message'=>'string', 'public_message'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_aead_aes256gcm_encrypt' => ['string', 'confidential_message'=>'string', 'public_message'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_aead_aes256gcm_is_available' => ['bool'],
'sodium_crypto_aead_aes256gcm_keygen' => ['string'],
'sodium_crypto_aead_chacha20poly1305_decrypt' => ['string|false', 'confidential_message'=>'string', 'public_message'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_aead_chacha20poly1305_encrypt' => ['string', 'confidential_message'=>'string', 'public_message'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_aead_chacha20poly1305_ietf_decrypt' => ['string|false', 'confidential_message'=>'string', 'public_message'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_aead_chacha20poly1305_ietf_encrypt' => ['string', 'confidential_message'=>'string', 'public_message'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_aead_chacha20poly1305_ietf_keygen' => ['string'],
'sodium_crypto_aead_chacha20poly1305_keygen' => ['string'],
'sodium_crypto_aead_xchacha20poly1305_ietf_decrypt' => ['string|false', 'confidential_message'=>'string', 'public_message'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_aead_xchacha20poly1305_ietf_encrypt' => ['string', 'confidential_message'=>'string', 'public_message'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_aead_xchacha20poly1305_ietf_keygen' => ['string'],
'sodium_crypto_auth' => ['string', 'message'=>'string', 'key'=>'string'],
'sodium_crypto_auth_keygen' => ['string'],
'sodium_crypto_auth_verify' => ['bool', 'mac'=>'string', 'message'=>'string', 'key'=>'string'],
'sodium_crypto_box' => ['string', 'string'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_box_keypair' => ['string'],
'sodium_crypto_box_keypair_from_secretkey_and_publickey' => ['string', 'secret_key'=>'string', 'public_key'=>'string'],
'sodium_crypto_box_open' => ['string|false', 'message'=>'string', 'nonce'=>'string', 'message_keypair'=>'string'],
'sodium_crypto_box_publickey' => ['string', 'keypair'=>'string'],
'sodium_crypto_box_publickey_from_secretkey' => ['string', 'secretkey'=>'string'],
'sodium_crypto_box_seal' => ['string', 'message'=>'string', 'publickey'=>'string'],
'sodium_crypto_box_seal_open' => ['string|false', 'message'=>'string', 'recipient_keypair'=>'string'],
'sodium_crypto_box_secretkey' => ['string', 'keypair'=>'string'],
'sodium_crypto_box_seed_keypair' => ['string', 'seed'=>'string'],
'sodium_crypto_generichash' => ['non-empty-string', 'msg'=>'string', 'key='=>'?string', 'length='=>'?int'],
'sodium_crypto_generichash_final' => ['non-empty-string', 'state'=>'non-empty-string', 'length='=>'?int'],
'sodium_crypto_generichash_init' => ['non-empty-string', 'key='=>'?string', 'length='=>'?int'],
'sodium_crypto_generichash_keygen' => ['non-empty-string'],
'sodium_crypto_generichash_update' => ['bool', 'state'=>'non-empty-string', 'string'=>'string'],
'sodium_crypto_kdf_derive_from_key' => ['string', 'subkey_len'=>'int', 'subkey_id'=>'int', 'context'=>'string', 'key'=>'string'],
'sodium_crypto_kdf_keygen' => ['string'],
'sodium_crypto_kx' => ['string', 'secretkey'=>'string', 'publickey'=>'string', 'client_publickey'=>'string', 'server_publickey'=>'string'],
'sodium_crypto_kx_client_session_keys' => ['array<int,string>', 'client_keypair'=>'string', 'server_key'=>'string'],
'sodium_crypto_kx_keypair' => ['string'],
'sodium_crypto_kx_publickey' => ['string', 'keypair'=>'string'],
'sodium_crypto_kx_secretkey' => ['string', 'keypair'=>'string'],
'sodium_crypto_kx_seed_keypair' => ['string', 'seed'=>'string'],
'sodium_crypto_kx_server_session_keys' => ['array<int,string>', 'server_keypair'=>'string', 'client_key'=>'string'],
'sodium_crypto_pwhash' => ['string', 'length'=>'int', 'password'=>'string', 'salt'=>'string', 'opslimit'=>'int', 'memlimit'=>'int', 'alg='=>'int'],
'sodium_crypto_pwhash_scryptsalsa208sha256' => ['string', 'length'=>'int', 'password'=>'string', 'salt'=>'string', 'opslimit'=>'int', 'memlimit'=>'int'],
'sodium_crypto_pwhash_scryptsalsa208sha256_str' => ['string', 'password'=>'string', 'opslimit'=>'int', 'memlimit'=>'int'],
'sodium_crypto_pwhash_scryptsalsa208sha256_str_verify' => ['bool', 'hash'=>'string', 'password'=>'string'],
'sodium_crypto_pwhash_str' => ['string', 'password'=>'string', 'opslimit'=>'int', 'memlimit'=>'int'],
'sodium_crypto_pwhash_str_needs_rehash' => ['bool', 'password'=>'string', 'opslimit'=>'int', 'memlimit'=>'int'],
'sodium_crypto_pwhash_str_verify' => ['bool', 'hash'=>'string', 'password'=>'string'],
'sodium_crypto_scalarmult' => ['string', 'string_1'=>'string', 'string_2'=>'string'],
'sodium_crypto_scalarmult_base' => ['string', 'key'=>'string'],
'sodium_crypto_secretbox' => ['string', 'plaintext'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_secretbox_keygen' => ['string'],
'sodium_crypto_secretbox_open' => ['string|false', 'ciphertext'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_secretstream_xchacha20poly1305_init_pull' => ['string', 'header'=>'string', 'key'=>'string'],
'sodium_crypto_secretstream_xchacha20poly1305_init_push' => ['array', 'key'=>'string'],
'sodium_crypto_secretstream_xchacha20poly1305_keygen' => ['string'],
'sodium_crypto_secretstream_xchacha20poly1305_pull' => ['array|false', 'state'=>'string', 'c'=>'string', 'ad='=>'string'],
'sodium_crypto_secretstream_xchacha20poly1305_push' => ['string', 'state'=>'string', 'msg'=>'string', 'ad='=>'string', 'tag='=>'int'],
'sodium_crypto_secretstream_xchacha20poly1305_rekey' => ['void', 'state'=>'string'],
'sodium_crypto_shorthash' => ['string', 'message'=>'string', 'key'=>'string'],
'sodium_crypto_shorthash_keygen' => ['string'],
'sodium_crypto_sign' => ['non-empty-string', 'message'=>'string', 'secretkey'=>'non-empty-string'],
'sodium_crypto_sign_detached' => ['non-empty-string', 'message'=>'string', 'secretkey'=>'non-empty-string'],
'sodium_crypto_sign_ed25519_pk_to_curve25519' => ['non-empty-string', 'ed25519pk'=>'non-empty-string'],
'sodium_crypto_sign_ed25519_sk_to_curve25519' => ['non-empty-string', 'ed25519sk'=>'non-empty-string'],
'sodium_crypto_sign_keypair' => ['non-empty-string'],
'sodium_crypto_sign_keypair_from_secretkey_and_publickey' => ['non-empty-string', 'secret_key'=>'non-empty-string', 'public_key'=>'non-empty-string'],
'sodium_crypto_sign_open' => ['string|false', 'message'=>'string', 'publickey'=>'non-empty-string'],
'sodium_crypto_sign_publickey' => ['non-empty-string', 'keypair'=>'non-empty-string'],
'sodium_crypto_sign_publickey_from_secretkey' => ['non-empty-string', 'secretkey'=>'non-empty-string'],
'sodium_crypto_sign_secretkey' => ['non-empty-string', 'keypair'=>'non-empty-string'],
'sodium_crypto_sign_seed_keypair' => ['non-empty-string', 'seed'=>'non-empty-string'],
'sodium_crypto_sign_verify_detached' => ['bool', 'signature'=>'non-empty-string', 'message'=>'string', 'publickey'=>'non-empty-string'],
'sodium_crypto_stream' => ['string', 'length'=>'int', 'nonce'=>'string', 'key'=>'string'],
'sodium_crypto_stream_keygen' => ['string'],
'sodium_crypto_stream_xor' => ['string', 'message'=>'string', 'nonce'=>'string', 'key'=>'string'],
'sodium_hex2bin' => ['string', 'hex'=>'string', 'ignore='=>'string'],
'sodium_increment' => ['string', '&binary_string'=>'string'],
'sodium_library_version_major' => ['int'],
'sodium_library_version_minor' => ['int'],
'sodium_memcmp' => ['int', 'string_1'=>'string', 'string_2'=>'string'],
'sodium_memzero' => ['void', '&secret'=>'string'],
'sodium_pad' => ['string', 'unpadded'=>'string', 'length'=>'int'],
'sodium_randombytes_buf' => ['string', 'length'=>'int'],
'sodium_randombytes_random16' => ['int|string'],
'sodium_randombytes_uniform' => ['int', 'upperBoundNonInclusive'=>'int'],
'sodium_unpad' => ['string', 'padded'=>'string', 'length'=>'int'],
'sodium_version_string' => ['string'],
'solid_fetch_prev' => ['bool', 'result_id'=>''],
'solr_get_version' => ['string'],
'SolrClient::__construct' => ['void', 'clientOptions'=>'array'],
'SolrClient::__destruct' => [''],
'SolrClient::addDocument' => ['SolrUpdateResponse', 'doc'=>'solrinputdocument', 'allowdups='=>'bool', 'commitwithin='=>'int'],
'SolrClient::addDocuments' => ['SolrUpdateResponse', 'docs'=>'array', 'allowdups='=>'bool', 'commitwithin='=>'int'],
'SolrClient::commit' => ['SolrUpdateResponse', 'maxsegments='=>'int', 'waitflush='=>'bool', 'waitsearcher='=>'bool'],
'SolrClient::deleteById' => ['SolrUpdateResponse', 'id'=>'string'],
'SolrClient::deleteByIds' => ['SolrUpdateResponse', 'ids'=>'array'],
'SolrClient::deleteByQueries' => ['SolrUpdateResponse', 'queries'=>'array'],
'SolrClient::deleteByQuery' => ['SolrUpdateResponse', 'query'=>'string'],
'SolrClient::getById' => ['SolrQueryResponse', 'id'=>'string'],
'SolrClient::getByIds' => ['SolrQueryResponse', 'ids'=>'array'],
'SolrClient::getDebug' => ['string'],
'SolrClient::getOptions' => ['array'],
'SolrClient::optimize' => ['SolrUpdateResponse', 'maxsegments='=>'int', 'waitflush='=>'bool', 'waitsearcher='=>'bool'],
'SolrClient::ping' => ['SolrPingResponse'],
'SolrClient::query' => ['SolrQueryResponse', 'query'=>'solrparams'],
'SolrClient::request' => ['SolrUpdateResponse', 'raw_request'=>'string'],
'SolrClient::rollback' => ['SolrUpdateResponse'],
'SolrClient::setResponseWriter' => ['void', 'responsewriter'=>'string'],
'SolrClient::setServlet' => ['bool', 'type'=>'int', 'value'=>'string'],
'SolrClient::system' => ['void'],
'SolrClient::threads' => ['void'],
'SolrClientException::getInternalInfo' => ['array'],
'SolrCollapseFunction::__toString' => ['string'],
'SolrCollapseFunction::getField' => ['string'],
'SolrCollapseFunction::getHint' => ['string'],
'SolrCollapseFunction::getMax' => ['string'],
'SolrCollapseFunction::getMin' => ['string'],
'SolrCollapseFunction::getNullPolicy' => ['string'],
'SolrCollapseFunction::getSize' => ['int'],
'SolrCollapseFunction::setField' => ['SolrCollapseFunction', 'fieldName'=>'string'],
'SolrCollapseFunction::setHint' => ['SolrCollapseFunction', 'hint'=>'string'],
'SolrCollapseFunction::setMax' => ['SolrCollapseFunction', 'max'=>'string'],
'SolrCollapseFunction::setMin' => ['SolrCollapseFunction', 'min'=>'string'],
'SolrCollapseFunction::setNullPolicy' => ['SolrCollapseFunction', 'nullPolicy'=>'string'],
'SolrCollapseFunction::setSize' => ['SolrCollapseFunction', 'size'=>'int'],
'SolrDisMaxQuery::__construct' => ['void', 'q='=>'string'],
'SolrDisMaxQuery::addBigramPhraseField' => ['SolrDisMaxQuery', 'field'=>'string', 'boost'=>'string', 'slop='=>'string'],
'SolrDisMaxQuery::addBoostQuery' => ['SolrDisMaxQuery', 'field'=>'string', 'value'=>'string', 'boost='=>'string'],
'SolrDisMaxQuery::addExpandFilterQuery' => ['SolrQuery', 'fq'=>'string'],
'SolrDisMaxQuery::addExpandSortField' => ['SolrQuery', 'field'=>'string', 'order'=>'string'],
'SolrDisMaxQuery::addFacetDateField' => ['SolrQuery', 'dateField'=>'string'],
'SolrDisMaxQuery::addFacetDateOther' => ['SolrQuery', 'value'=>'string', 'field_override'=>'string'],
'SolrDisMaxQuery::addFacetField' => ['SolrQuery', 'field'=>'string'],
'SolrDisMaxQuery::addFacetQuery' => ['SolrQuery', 'facetQuery'=>'string'],
'SolrDisMaxQuery::addField' => ['SolrQuery', 'field'=>'string'],
'SolrDisMaxQuery::addFilterQuery' => ['SolrQuery', 'fq'=>'string'],
'SolrDisMaxQuery::addGroupField' => ['SolrQuery', 'value'=>'string'],
'SolrDisMaxQuery::addGroupFunction' => ['SolrQuery', 'value'=>'string'],
'SolrDisMaxQuery::addGroupQuery' => ['SolrQuery', 'value'=>'string'],
'SolrDisMaxQuery::addGroupSortField' => ['SolrQuery', 'field'=>'string', 'order'=>'int'],
'SolrDisMaxQuery::addHighlightField' => ['SolrQuery', 'field'=>'string'],
'SolrDisMaxQuery::addMltField' => ['SolrQuery', 'field'=>'string'],
'SolrDisMaxQuery::addMltQueryField' => ['SolrQuery', 'field'=>'string', 'boost'=>'float'],
'SolrDisMaxQuery::addParam' => ['SolrParams', 'name'=>'string', 'value'=>'string'],
'SolrDisMaxQuery::addPhraseField' => ['SolrDisMaxQuery', 'field'=>'string', 'boost'=>'string', 'slop='=>'string'],
'SolrDisMaxQuery::addQueryField' => ['SolrDisMaxQuery', 'field'=>'string', 'boost='=>'string'],
'SolrDisMaxQuery::addSortField' => ['SolrQuery', 'field'=>'string', 'order='=>'int'],
'SolrDisMaxQuery::addStatsFacet' => ['SolrQuery', 'field'=>'string'],
'SolrDisMaxQuery::addStatsField' => ['SolrQuery', 'field'=>'string'],
'SolrDisMaxQuery::addTrigramPhraseField' => ['SolrDisMaxQuery', 'field'=>'string', 'boost'=>'string', 'slop='=>'string'],
'SolrDisMaxQuery::addUserField' => ['SolrDisMaxQuery', 'field'=>'string'],
'SolrDisMaxQuery::collapse' => ['SolrQuery', 'collapseFunction'=>'SolrCollapseFunction'],
'SolrDisMaxQuery::get' => ['mixed', 'param_name'=>'string'],
'SolrDisMaxQuery::getExpand' => ['bool'],
'SolrDisMaxQuery::getExpandFilterQueries' => ['array'],
'SolrDisMaxQuery::getExpandQuery' => ['array'],
'SolrDisMaxQuery::getExpandRows' => ['int'],
'SolrDisMaxQuery::getExpandSortFields' => ['array'],
'SolrDisMaxQuery::getFacet' => ['bool'],
'SolrDisMaxQuery::getFacetDateEnd' => ['string', 'field_override'=>'string'],
'SolrDisMaxQuery::getFacetDateFields' => ['array'],
'SolrDisMaxQuery::getFacetDateGap' => ['string', 'field_override'=>'string'],
'SolrDisMaxQuery::getFacetDateHardEnd' => ['string', 'field_override'=>'string'],
'SolrDisMaxQuery::getFacetDateOther' => ['string', 'field_override'=>'string'],
'SolrDisMaxQuery::getFacetDateStart' => ['string', 'field_override'=>'string'],
'SolrDisMaxQuery::getFacetFields' => ['array'],
'SolrDisMaxQuery::getFacetLimit' => ['int', 'field_override'=>'string'],
'SolrDisMaxQuery::getFacetMethod' => ['string', 'field_override'=>'string'],
'SolrDisMaxQuery::getFacetMinCount' => ['int', 'field_override'=>'string'],
'SolrDisMaxQuery::getFacetMissing' => ['string', 'field_override'=>'string'],
'SolrDisMaxQuery::getFacetOffset' => ['int', 'field_override'=>'string'],
'SolrDisMaxQuery::getFacetPrefix' => ['string', 'field_override'=>'string'],
'SolrDisMaxQuery::getFacetQueries' => ['string'],
'SolrDisMaxQuery::getFacetSort' => ['int', 'field_override'=>'string'],
'SolrDisMaxQuery::getFields' => ['string'],
'SolrDisMaxQuery::getFilterQueries' => ['string'],
'SolrDisMaxQuery::getGroup' => ['bool'],
'SolrDisMaxQuery::getGroupCachePercent' => ['int'],
'SolrDisMaxQuery::getGroupFacet' => ['bool'],
'SolrDisMaxQuery::getGroupFields' => ['array'],
'SolrDisMaxQuery::getGroupFormat' => ['string'],
'SolrDisMaxQuery::getGroupFunctions' => ['array'],
'SolrDisMaxQuery::getGroupLimit' => ['int'],
'SolrDisMaxQuery::getGroupMain' => ['bool'],
'SolrDisMaxQuery::getGroupNGroups' => ['bool'],
'SolrDisMaxQuery::getGroupOffset' => ['bool'],
'SolrDisMaxQuery::getGroupQueries' => ['array'],
'SolrDisMaxQuery::getGroupSortFields' => ['array'],
'SolrDisMaxQuery::getGroupTruncate' => ['bool'],
'SolrDisMaxQuery::getHighlight' => ['bool'],
'SolrDisMaxQuery::getHighlightAlternateField' => ['string', 'field_override'=>'string'],
'SolrDisMaxQuery::getHighlightFields' => ['array'],
'SolrDisMaxQuery::getHighlightFormatter' => ['string', 'field_override'=>'string'],
'SolrDisMaxQuery::getHighlightFragmenter' => ['string', 'field_override'=>'string'],
'SolrDisMaxQuery::getHighlightFragsize' => ['int', 'field_override'=>'string'],
'SolrDisMaxQuery::getHighlightHighlightMultiTerm' => ['bool'],
'SolrDisMaxQuery::getHighlightMaxAlternateFieldLength' => ['int', 'field_override'=>'string'],
'SolrDisMaxQuery::getHighlightMaxAnalyzedChars' => ['int'],
'SolrDisMaxQuery::getHighlightMergeContiguous' => ['bool', 'field_override'=>'string'],
'SolrDisMaxQuery::getHighlightRegexMaxAnalyzedChars' => ['int'],
'SolrDisMaxQuery::getHighlightRegexPattern' => ['string'],
'SolrDisMaxQuery::getHighlightRegexSlop' => ['float'],
'SolrDisMaxQuery::getHighlightRequireFieldMatch' => ['bool'],
'SolrDisMaxQuery::getHighlightSimplePost' => ['string', 'field_override'=>'string'],
'SolrDisMaxQuery::getHighlightSimplePre' => ['string', 'field_override'=>'string'],
'SolrDisMaxQuery::getHighlightSnippets' => ['int', 'field_override'=>'string'],
'SolrDisMaxQuery::getHighlightUsePhraseHighlighter' => ['bool'],
'SolrDisMaxQuery::getMlt' => ['bool'],
'SolrDisMaxQuery::getMltBoost' => ['bool'],
'SolrDisMaxQuery::getMltCount' => ['int'],
'SolrDisMaxQuery::getMltFields' => ['array'],
'SolrDisMaxQuery::getMltMaxNumQueryTerms' => ['int'],
'SolrDisMaxQuery::getMltMaxNumTokens' => ['int'],
'SolrDisMaxQuery::getMltMaxWordLength' => ['int'],
'SolrDisMaxQuery::getMltMinDocFrequency' => ['int'],
'SolrDisMaxQuery::getMltMinTermFrequency' => ['int'],
'SolrDisMaxQuery::getMltMinWordLength' => ['int'],
'SolrDisMaxQuery::getMltQueryFields' => ['array'],
'SolrDisMaxQuery::getParam' => ['mixed', 'param_name'=>'string'],
'SolrDisMaxQuery::getParams' => ['array'],
'SolrDisMaxQuery::getPreparedParams' => ['array'],
'SolrDisMaxQuery::getQuery' => ['string'],
'SolrDisMaxQuery::getRows' => ['int'],
'SolrDisMaxQuery::getSortFields' => ['array'],
'SolrDisMaxQuery::getStart' => ['int'],
'SolrDisMaxQuery::getStats' => ['bool'],
'SolrDisMaxQuery::getStatsFacets' => ['array'],
'SolrDisMaxQuery::getStatsFields' => ['array'],
'SolrDisMaxQuery::getTerms' => ['bool'],
'SolrDisMaxQuery::getTermsField' => ['string'],
'SolrDisMaxQuery::getTermsIncludeLowerBound' => ['bool'],
'SolrDisMaxQuery::getTermsIncludeUpperBound' => ['bool'],
'SolrDisMaxQuery::getTermsLimit' => ['int'],
'SolrDisMaxQuery::getTermsLowerBound' => ['string'],
'SolrDisMaxQuery::getTermsMaxCount' => ['int'],
'SolrDisMaxQuery::getTermsMinCount' => ['int'],
'SolrDisMaxQuery::getTermsPrefix' => ['string'],
'SolrDisMaxQuery::getTermsReturnRaw' => ['bool'],
'SolrDisMaxQuery::getTermsSort' => ['int'],
'SolrDisMaxQuery::getTermsUpperBound' => ['string'],
'SolrDisMaxQuery::getTimeAllowed' => ['int'],
'SolrDisMaxQuery::removeBigramPhraseField' => ['SolrDisMaxQuery', 'field'=>'string'],
'SolrDisMaxQuery::removeBoostQuery' => ['SolrDisMaxQuery', 'field'=>'string'],
'SolrDisMaxQuery::removeExpandFilterQuery' => ['SolrQuery', 'fq'=>'string'],
'SolrDisMaxQuery::removeExpandSortField' => ['SolrQuery', 'field'=>'string'],
'SolrDisMaxQuery::removeFacetDateField' => ['SolrQuery', 'field'=>'string'],
'SolrDisMaxQuery::removeFacetDateOther' => ['SolrQuery', 'value'=>'string', 'field_override'=>'string'],
'SolrDisMaxQuery::removeFacetField' => ['SolrQuery', 'field'=>'string'],
'SolrDisMaxQuery::removeFacetQuery' => ['SolrQuery', 'value'=>'string'],
'SolrDisMaxQuery::removeField' => ['SolrQuery', 'field'=>'string'],
'SolrDisMaxQuery::removeFilterQuery' => ['SolrQuery', 'fq'=>'string'],
'SolrDisMaxQuery::removeHighlightField' => ['SolrQuery', 'field'=>'string'],
'SolrDisMaxQuery::removeMltField' => ['SolrQuery', 'field'=>'string'],
'SolrDisMaxQuery::removeMltQueryField' => ['SolrQuery', 'queryField'=>'string'],
'SolrDisMaxQuery::removePhraseField' => ['SolrDisMaxQuery', 'field'=>'string'],
'SolrDisMaxQuery::removeQueryField' => ['SolrDisMaxQuery', 'field'=>'string'],
'SolrDisMaxQuery::removeSortField' => ['SolrQuery', 'field'=>'string'],
'SolrDisMaxQuery::removeStatsFacet' => ['SolrQuery', 'value'=>'string'],
'SolrDisMaxQuery::removeStatsField' => ['SolrQuery', 'field'=>'string'],
'SolrDisMaxQuery::removeTrigramPhraseField' => ['SolrDisMaxQuery', 'field'=>'string'],
'SolrDisMaxQuery::removeUserField' => ['SolrDisMaxQuery', 'field'=>'string'],
'SolrDisMaxQuery::serialize' => ['string'],
'SolrDisMaxQuery::set' => ['SolrParams', 'name'=>'string', 'value'=>''],
'SolrDisMaxQuery::setBigramPhraseFields' => ['SolrDisMaxQuery', 'fields'=>'string'],
'SolrDisMaxQuery::setBigramPhraseSlop' => ['SolrDisMaxQuery', 'slop'=>'string'],
'SolrDisMaxQuery::setBoostFunction' => ['SolrDisMaxQuery', 'function'=>'string'],
'SolrDisMaxQuery::setBoostQuery' => ['SolrDisMaxQuery', 'q'=>'string'],
'SolrDisMaxQuery::setEchoHandler' => ['SolrQuery', 'flag'=>'bool'],
'SolrDisMaxQuery::setEchoParams' => ['SolrQuery', 'type'=>'string'],
'SolrDisMaxQuery::setExpand' => ['SolrQuery', 'value'=>'bool'],
'SolrDisMaxQuery::setExpandQuery' => ['SolrQuery', 'q'=>'string'],
'SolrDisMaxQuery::setExpandRows' => ['SolrQuery', 'value'=>'int'],
'SolrDisMaxQuery::setExplainOther' => ['SolrQuery', 'query'=>'string'],
'SolrDisMaxQuery::setFacet' => ['SolrQuery', 'flag'=>'bool'],
'SolrDisMaxQuery::setFacetDateEnd' => ['SolrQuery', 'value'=>'string', 'field_override'=>'string'],
'SolrDisMaxQuery::setFacetDateGap' => ['SolrQuery', 'value'=>'string', 'field_override'=>'string'],
'SolrDisMaxQuery::setFacetDateHardEnd' => ['SolrQuery', 'value'=>'string', 'field_override'=>'string'],
'SolrDisMaxQuery::setFacetDateStart' => ['SolrQuery', 'value'=>'string', 'field_override'=>'string'],
'SolrDisMaxQuery::setFacetEnumCacheMinDefaultFrequency' => ['SolrQuery', 'frequency'=>'int', 'field_override'=>'string'],
'SolrDisMaxQuery::setFacetLimit' => ['SolrQuery', 'limit'=>'int', 'field_override'=>'string'],
'SolrDisMaxQuery::setFacetMethod' => ['SolrQuery', 'method'=>'string', 'field_override'=>'string'],
'SolrDisMaxQuery::setFacetMinCount' => ['SolrQuery', 'mincount'=>'int', 'field_override'=>'string'],
'SolrDisMaxQuery::setFacetMissing' => ['SolrQuery', 'flag'=>'bool', 'field_override'=>'string'],
'SolrDisMaxQuery::setFacetOffset' => ['SolrQuery', 'offset'=>'int', 'field_override'=>'string'],
'SolrDisMaxQuery::setFacetPrefix' => ['SolrQuery', 'prefix'=>'string', 'field_override'=>'string'],
'SolrDisMaxQuery::setFacetSort' => ['SolrQuery', 'facetSort'=>'int', 'field_override'=>'string'],
'SolrDisMaxQuery::setGroup' => ['SolrQuery', 'value'=>'bool'],
'SolrDisMaxQuery::setGroupCachePercent' => ['SolrQuery', 'percent'=>'int'],
'SolrDisMaxQuery::setGroupFacet' => ['SolrQuery', 'value'=>'bool'],
'SolrDisMaxQuery::setGroupFormat' => ['SolrQuery', 'value'=>'string'],
'SolrDisMaxQuery::setGroupLimit' => ['SolrQuery', 'value'=>'int'],
'SolrDisMaxQuery::setGroupMain' => ['SolrQuery', 'value'=>'string'],
'SolrDisMaxQuery::setGroupNGroups' => ['SolrQuery', 'value'=>'bool'],
'SolrDisMaxQuery::setGroupOffset' => ['SolrQuery', 'value'=>'int'],
'SolrDisMaxQuery::setGroupTruncate' => ['SolrQuery', 'value'=>'bool'],
'SolrDisMaxQuery::setHighlight' => ['SolrQuery', 'flag'=>'bool'],
'SolrDisMaxQuery::setHighlightAlternateField' => ['SolrQuery', 'field'=>'string', 'field_override'=>'string'],
'SolrDisMaxQuery::setHighlightFormatter' => ['SolrQuery', 'formatter'=>'string', 'field_override'=>'string'],
'SolrDisMaxQuery::setHighlightFragmenter' => ['SolrQuery', 'fragmenter'=>'string', 'field_override'=>'string'],
'SolrDisMaxQuery::setHighlightFragsize' => ['SolrQuery', 'size'=>'int', 'field_override'=>'string'],
'SolrDisMaxQuery::setHighlightHighlightMultiTerm' => ['SolrQuery', 'flag'=>'bool'],
'SolrDisMaxQuery::setHighlightMaxAlternateFieldLength' => ['SolrQuery', 'fieldLength'=>'string', 'field_override'=>'string'],
'SolrDisMaxQuery::setHighlightMaxAnalyzedChars' => ['SolrQuery', 'value'=>'int'],
'SolrDisMaxQuery::setHighlightMergeContiguous' => ['SolrQuery', 'flag'=>'bool', 'field_override'=>'string'],
'SolrDisMaxQuery::setHighlightRegexMaxAnalyzedChars' => ['SolrQuery', 'maxAnalyzedChars'=>'int'],
'SolrDisMaxQuery::setHighlightRegexPattern' => ['SolrQuery', 'value'=>'string'],
'SolrDisMaxQuery::setHighlightRegexSlop' => ['SolrQuery', 'factor'=>'float'],
'SolrDisMaxQuery::setHighlightRequireFieldMatch' => ['SolrQuery', 'flag'=>'bool'],
'SolrDisMaxQuery::setHighlightSimplePost' => ['SolrQuery', 'simplePost'=>'string', 'field_override'=>'string'],
'SolrDisMaxQuery::setHighlightSimplePre' => ['SolrQuery', 'simplePre'=>'string', 'field_override'=>'string'],
'SolrDisMaxQuery::setHighlightSnippets' => ['SolrQuery', 'value'=>'int', 'field_override'=>'string'],
'SolrDisMaxQuery::setHighlightUsePhraseHighlighter' => ['SolrQuery', 'flag'=>'bool'],
'SolrDisMaxQuery::setMinimumMatch' => ['SolrDisMaxQuery', 'value'=>'string'],
'SolrDisMaxQuery::setMlt' => ['SolrQuery', 'flag'=>'bool'],
'SolrDisMaxQuery::setMltBoost' => ['SolrQuery', 'flag'=>'bool'],
'SolrDisMaxQuery::setMltCount' => ['SolrQuery', 'count'=>'int'],
'SolrDisMaxQuery::setMltMaxNumQueryTerms' => ['SolrQuery', 'value'=>'int'],
'SolrDisMaxQuery::setMltMaxNumTokens' => ['SolrQuery', 'value'=>'int'],
'SolrDisMaxQuery::setMltMaxWordLength' => ['SolrQuery', 'maxWordLength'=>'int'],
'SolrDisMaxQuery::setMltMinDocFrequency' => ['SolrQuery', 'minDocFrequency'=>'int'],
'SolrDisMaxQuery::setMltMinTermFrequency' => ['SolrQuery', 'minTermFrequency'=>'int'],
'SolrDisMaxQuery::setMltMinWordLength' => ['SolrQuery', 'minWordLength'=>'int'],
'SolrDisMaxQuery::setOmitHeader' => ['SolrQuery', 'flag'=>'bool'],
'SolrDisMaxQuery::setParam' => ['SolrParams', 'name'=>'string', 'value'=>''],
'SolrDisMaxQuery::setPhraseFields' => ['SolrDisMaxQuery', 'fields'=>'string'],
'SolrDisMaxQuery::setPhraseSlop' => ['SolrDisMaxQuery', 'slop'=>'string'],
'SolrDisMaxQuery::setQuery' => ['SolrQuery', 'query'=>'string'],
'SolrDisMaxQuery::setQueryAlt' => ['SolrDisMaxQuery', 'q'=>'string'],
'SolrDisMaxQuery::setQueryPhraseSlop' => ['SolrDisMaxQuery', 'slop'=>'string'],
'SolrDisMaxQuery::setRows' => ['SolrQuery', 'rows'=>'int'],
'SolrDisMaxQuery::setShowDebugInfo' => ['SolrQuery', 'flag'=>'bool'],
'SolrDisMaxQuery::setStart' => ['SolrQuery', 'start'=>'int'],
'SolrDisMaxQuery::setStats' => ['SolrQuery', 'flag'=>'bool'],
'SolrDisMaxQuery::setTerms' => ['SolrQuery', 'flag'=>'bool'],
'SolrDisMaxQuery::setTermsField' => ['SolrQuery', 'fieldname'=>'string'],
'SolrDisMaxQuery::setTermsIncludeLowerBound' => ['SolrQuery', 'flag'=>'bool'],
'SolrDisMaxQuery::setTermsIncludeUpperBound' => ['SolrQuery', 'flag'=>'bool'],
'SolrDisMaxQuery::setTermsLimit' => ['SolrQuery', 'limit'=>'int'],
'SolrDisMaxQuery::setTermsLowerBound' => ['SolrQuery', 'lowerBound'=>'string'],
'SolrDisMaxQuery::setTermsMaxCount' => ['SolrQuery', 'frequency'=>'int'],
'SolrDisMaxQuery::setTermsMinCount' => ['SolrQuery', 'frequency'=>'int'],
'SolrDisMaxQuery::setTermsPrefix' => ['SolrQuery', 'prefix'=>'string'],
'SolrDisMaxQuery::setTermsReturnRaw' => ['SolrQuery', 'flag'=>'bool'],
'SolrDisMaxQuery::setTermsSort' => ['SolrQuery', 'sortType'=>'int'],
'SolrDisMaxQuery::setTermsUpperBound' => ['SolrQuery', 'upperBound'=>'string'],
'SolrDisMaxQuery::setTieBreaker' => ['SolrDisMaxQuery', 'tieBreaker'=>'string'],
'SolrDisMaxQuery::setTimeAllowed' => ['SolrQuery', 'timeAllowed'=>'int'],
'SolrDisMaxQuery::setTrigramPhraseFields' => ['SolrDisMaxQuery', 'fields'=>'string'],
'SolrDisMaxQuery::setTrigramPhraseSlop' => ['SolrDisMaxQuery', 'slop'=>'string'],
'SolrDisMaxQuery::setUserFields' => ['SolrDisMaxQuery', 'fields'=>'string'],
'SolrDisMaxQuery::toString' => ['string', 'url_encode='=>'bool|false'],
'SolrDisMaxQuery::unserialize' => ['void', 'serialized'=>'string'],
'SolrDisMaxQuery::useDisMaxQueryParser' => ['SolrDisMaxQuery'],
'SolrDisMaxQuery::useEDisMaxQueryParser' => ['SolrDisMaxQuery'],
'SolrDocument::__clone' => ['void'],
'SolrDocument::__construct' => ['void'],
'SolrDocument::__destruct' => [''],
'SolrDocument::__get' => ['SolrDocumentField', 'fieldname'=>'string'],
'SolrDocument::__isset' => ['bool', 'fieldname'=>'string'],
'SolrDocument::__set' => ['bool', 'fieldname'=>'string', 'fieldvalue'=>'string'],
'SolrDocument::__unset' => ['bool', 'fieldname'=>'string'],
'SolrDocument::addField' => ['bool', 'fieldname'=>'string', 'fieldvalue'=>'string'],
'SolrDocument::clear' => ['bool'],
'SolrDocument::current' => ['SolrDocumentField'],
'SolrDocument::deleteField' => ['bool', 'fieldname'=>'string'],
'SolrDocument::fieldExists' => ['bool', 'fieldname'=>'string'],
'SolrDocument::getChildDocuments' => ['array'],
'SolrDocument::getChildDocumentsCount' => ['int'],
'SolrDocument::getField' => ['SolrDocumentField', 'fieldname'=>'string'],
'SolrDocument::getFieldCount' => ['int'],
'SolrDocument::getFieldNames' => ['array'],
'SolrDocument::getInputDocument' => ['SolrInputDocument'],
'SolrDocument::hasChildDocuments' => ['bool'],
'SolrDocument::key' => ['string'],
'SolrDocument::merge' => ['bool', 'sourcedoc'=>'solrdocument', 'overwrite='=>'bool'],
'SolrDocument::next' => ['void'],
'SolrDocument::offsetExists' => ['bool', 'fieldname'=>'string'],
'SolrDocument::offsetGet' => ['SolrDocumentField', 'fieldname'=>'string'],
'SolrDocument::offsetSet' => ['void', 'fieldname'=>'string', 'fieldvalue'=>'string'],
'SolrDocument::offsetUnset' => ['void', 'fieldname'=>'string'],
'SolrDocument::reset' => ['bool'],
'SolrDocument::rewind' => ['void'],
'SolrDocument::serialize' => ['string'],
'SolrDocument::sort' => ['bool', 'sortorderby'=>'int', 'sortdirection='=>'int'],
'SolrDocument::toArray' => ['array'],
'SolrDocument::unserialize' => ['void', 'serialized'=>'string'],
'SolrDocument::valid' => ['bool'],
'SolrDocumentField::__construct' => ['void'],
'SolrDocumentField::__destruct' => [''],
'SolrException::__clone' => ['void'],
'SolrException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Exception)|(?Throwable)'],
'SolrException::__toString' => ['string'],
'SolrException::__wakeup' => ['void'],
'SolrException::getCode' => ['int'],
'SolrException::getFile' => ['string'],
'SolrException::getInternalInfo' => ['array'],
'SolrException::getLine' => ['int'],
'SolrException::getMessage' => ['string'],
'SolrException::getPrevious' => ['Exception|Throwable'],
'SolrException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'SolrException::getTraceAsString' => ['string'],
'SolrGenericResponse::__construct' => ['void'],
'SolrGenericResponse::__destruct' => [''],
'SolrGenericResponse::getDigestedResponse' => ['string'],
'SolrGenericResponse::getHttpStatus' => ['int'],
'SolrGenericResponse::getHttpStatusMessage' => ['string'],
'SolrGenericResponse::getRawRequest' => ['string'],
'SolrGenericResponse::getRawRequestHeaders' => ['string'],
'SolrGenericResponse::getRawResponse' => ['string'],
'SolrGenericResponse::getRawResponseHeaders' => ['string'],
'SolrGenericResponse::getRequestUrl' => ['string'],
'SolrGenericResponse::getResponse' => ['SolrObject'],
'SolrGenericResponse::setParseMode' => ['bool', 'parser_mode='=>'int'],
'SolrGenericResponse::success' => ['bool'],
'SolrIllegalArgumentException::__clone' => ['void'],
'SolrIllegalArgumentException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Exception)|(?Throwable)'],
'SolrIllegalArgumentException::__toString' => ['string'],
'SolrIllegalArgumentException::__wakeup' => ['void'],
'SolrIllegalArgumentException::getCode' => ['int'],
'SolrIllegalArgumentException::getFile' => ['string'],
'SolrIllegalArgumentException::getInternalInfo' => ['array'],
'SolrIllegalArgumentException::getLine' => ['int'],
'SolrIllegalArgumentException::getMessage' => ['string'],
'SolrIllegalArgumentException::getPrevious' => ['Exception|Throwable'],
'SolrIllegalArgumentException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'SolrIllegalArgumentException::getTraceAsString' => ['string'],
'SolrIllegalOperationException::__clone' => ['void'],
'SolrIllegalOperationException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Exception)|(?Throwable)'],
'SolrIllegalOperationException::__toString' => ['string'],
'SolrIllegalOperationException::__wakeup' => ['void'],
'SolrIllegalOperationException::getCode' => ['int'],
'SolrIllegalOperationException::getFile' => ['string'],
'SolrIllegalOperationException::getInternalInfo' => ['array'],
'SolrIllegalOperationException::getLine' => ['int'],
'SolrIllegalOperationException::getMessage' => ['string'],
'SolrIllegalOperationException::getPrevious' => ['Exception|Throwable'],
'SolrIllegalOperationException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'SolrIllegalOperationException::getTraceAsString' => ['string'],
'SolrInputDocument::__clone' => ['void'],
'SolrInputDocument::__construct' => ['void'],
'SolrInputDocument::__destruct' => [''],
'SolrInputDocument::addChildDocument' => ['void', 'child'=>'SolrInputDocument'],
'SolrInputDocument::addChildDocuments' => ['void', 'docs'=>'array'],
'SolrInputDocument::addField' => ['bool', 'fieldname'=>'string', 'fieldvalue'=>'string', 'fieldboostvalue='=>'float'],
'SolrInputDocument::clear' => ['bool'],
'SolrInputDocument::deleteField' => ['bool', 'fieldname'=>'string'],
'SolrInputDocument::fieldExists' => ['bool', 'fieldname'=>'string'],
'SolrInputDocument::getBoost' => ['float'],
'SolrInputDocument::getChildDocuments' => ['array'],
'SolrInputDocument::getChildDocumentsCount' => ['int'],
'SolrInputDocument::getField' => ['SolrDocumentField', 'fieldname'=>'string'],
'SolrInputDocument::getFieldBoost' => ['float', 'fieldname'=>'string'],
'SolrInputDocument::getFieldCount' => ['int'],
'SolrInputDocument::getFieldNames' => ['array'],
'SolrInputDocument::hasChildDocuments' => ['bool'],
'SolrInputDocument::merge' => ['bool', 'sourcedoc'=>'solrinputdocument', 'overwrite='=>'bool'],
'SolrInputDocument::reset' => ['bool'],
'SolrInputDocument::setBoost' => ['bool', 'documentboostvalue'=>'float'],
'SolrInputDocument::setFieldBoost' => ['bool', 'fieldname'=>'string', 'fieldboostvalue'=>'float'],
'SolrInputDocument::sort' => ['bool', 'sortorderby'=>'int', 'sortdirection='=>'int'],
'SolrInputDocument::toArray' => ['array'],
'SolrModifiableParams::__construct' => ['void'],
'SolrModifiableParams::__destruct' => [''],
'SolrModifiableParams::add' => ['SolrParams', 'name'=>'string', 'value'=>'string'],
'SolrModifiableParams::addParam' => ['SolrParams', 'name'=>'string', 'value'=>'string'],
'SolrModifiableParams::get' => ['mixed', 'param_name'=>'string'],
'SolrModifiableParams::getParam' => ['mixed', 'param_name'=>'string'],
'SolrModifiableParams::getParams' => ['array'],
'SolrModifiableParams::getPreparedParams' => ['array'],
'SolrModifiableParams::serialize' => ['string'],
'SolrModifiableParams::set' => ['SolrParams', 'name'=>'string', 'value'=>''],
'SolrModifiableParams::setParam' => ['SolrParams', 'name'=>'string', 'value'=>''],
'SolrModifiableParams::toString' => ['string', 'url_encode='=>'bool|false'],
'SolrModifiableParams::unserialize' => ['void', 'serialized'=>'string'],
'SolrObject::__construct' => ['void'],
'SolrObject::__destruct' => [''],
'SolrObject::getPropertyNames' => ['array'],
'SolrObject::offsetExists' => ['bool', 'property_name'=>'string'],
'SolrObject::offsetGet' => ['mixed', 'property_name'=>'string'],
'SolrObject::offsetSet' => ['void', 'property_name'=>'string', 'property_value'=>'string'],
'SolrObject::offsetUnset' => ['void', 'property_name'=>'string'],
'SolrParams::__construct' => ['void'],
'SolrParams::add' => ['SolrParams', 'name'=>'string', 'value'=>'string'],
'SolrParams::addParam' => ['SolrParams', 'name'=>'string', 'value'=>'string'],
'SolrParams::get' => ['mixed', 'param_name'=>'string'],
'SolrParams::getParam' => ['mixed', 'param_name='=>'string'],
'SolrParams::getParams' => ['array'],
'SolrParams::getPreparedParams' => ['array'],
'SolrParams::serialize' => ['string'],
'SolrParams::set' => ['void', 'name'=>'string', 'value'=>'string'],
'SolrParams::setParam' => ['SolrParams', 'name'=>'string', 'value'=>'string'],
'SolrParams::toString' => ['string', 'url_encode='=>'bool'],
'SolrParams::unserialize' => ['void', 'serialized'=>'string'],
'SolrPingResponse::__construct' => ['void'],
'SolrPingResponse::__destruct' => [''],
'SolrPingResponse::getDigestedResponse' => ['string'],
'SolrPingResponse::getHttpStatus' => ['int'],
'SolrPingResponse::getHttpStatusMessage' => ['string'],
'SolrPingResponse::getRawRequest' => ['string'],
'SolrPingResponse::getRawRequestHeaders' => ['string'],
'SolrPingResponse::getRawResponse' => ['string'],
'SolrPingResponse::getRawResponseHeaders' => ['string'],
'SolrPingResponse::getRequestUrl' => ['string'],
'SolrPingResponse::getResponse' => ['string'],
'SolrPingResponse::setParseMode' => ['bool', 'parser_mode='=>'int'],
'SolrPingResponse::success' => ['bool'],
'SolrQuery::__construct' => ['void', 'q='=>'string'],
'SolrQuery::__destruct' => [''],
'SolrQuery::add' => ['SolrParams', 'name'=>'string', 'value'=>'string'],
'SolrQuery::addExpandFilterQuery' => ['SolrQuery', 'fq'=>'string'],
'SolrQuery::addExpandSortField' => ['SolrQuery', 'field'=>'string', 'order='=>'string'],
'SolrQuery::addFacetDateField' => ['SolrQuery', 'datefield'=>'string'],
'SolrQuery::addFacetDateOther' => ['SolrQuery', 'value'=>'string', 'field_override='=>'string'],
'SolrQuery::addFacetField' => ['SolrQuery', 'field'=>'string'],
'SolrQuery::addFacetQuery' => ['SolrQuery', 'facetquery'=>'string'],
'SolrQuery::addField' => ['SolrQuery', 'field'=>'string'],
'SolrQuery::addFilterQuery' => ['SolrQuery', 'fq'=>'string'],
'SolrQuery::addGroupField' => ['SolrQuery', 'value'=>'string'],
'SolrQuery::addGroupFunction' => ['SolrQuery', 'value'=>'string'],
'SolrQuery::addGroupQuery' => ['SolrQuery', 'value'=>'string'],
'SolrQuery::addGroupSortField' => ['SolrQuery', 'field'=>'string', 'order='=>'int'],
'SolrQuery::addHighlightField' => ['SolrQuery', 'field'=>'string'],
'SolrQuery::addMltField' => ['SolrQuery', 'field'=>'string'],
'SolrQuery::addMltQueryField' => ['SolrQuery', 'field'=>'string', 'boost'=>'float'],
'SolrQuery::addParam' => ['SolrParams', 'name'=>'string', 'value'=>'string'],
'SolrQuery::addSortField' => ['SolrQuery', 'field'=>'string', 'order='=>'int'],
'SolrQuery::addStatsFacet' => ['SolrQuery', 'field'=>'string'],
'SolrQuery::addStatsField' => ['SolrQuery', 'field'=>'string'],
'SolrQuery::collapse' => ['SolrQuery', 'collapseFunction'=>'SolrCollapseFunction'],
'SolrQuery::get' => ['mixed', 'param_name'=>'string'],
'SolrQuery::getExpand' => ['bool'],
'SolrQuery::getExpandFilterQueries' => ['array'],
'SolrQuery::getExpandQuery' => ['array'],
'SolrQuery::getExpandRows' => ['int'],
'SolrQuery::getExpandSortFields' => ['array'],
'SolrQuery::getFacet' => ['bool'],
'SolrQuery::getFacetDateEnd' => ['string', 'field_override='=>'string'],
'SolrQuery::getFacetDateFields' => ['array'],
'SolrQuery::getFacetDateGap' => ['string', 'field_override='=>'string'],
'SolrQuery::getFacetDateHardEnd' => ['string', 'field_override='=>'string'],
'SolrQuery::getFacetDateOther' => ['?string', 'field_override='=>'string'],
'SolrQuery::getFacetDateStart' => ['string', 'field_override='=>'string'],
'SolrQuery::getFacetFields' => ['array'],
'SolrQuery::getFacetLimit' => ['int', 'field_override='=>'string'],
'SolrQuery::getFacetMethod' => ['string', 'field_override='=>'string'],
'SolrQuery::getFacetMinCount' => ['int', 'field_override='=>'string'],
'SolrQuery::getFacetMissing' => ['bool', 'field_override='=>'string'],
'SolrQuery::getFacetOffset' => ['int', 'field_override='=>'string'],
'SolrQuery::getFacetPrefix' => ['string', 'field_override='=>'string'],
'SolrQuery::getFacetQueries' => ['array'],
'SolrQuery::getFacetSort' => ['int', 'field_override='=>'string'],
'SolrQuery::getFields' => ['array'],
'SolrQuery::getFilterQueries' => ['array'],
'SolrQuery::getGroup' => ['bool'],
'SolrQuery::getGroupCachePercent' => ['int'],
'SolrQuery::getGroupFacet' => ['bool'],
'SolrQuery::getGroupFields' => ['array'],
'SolrQuery::getGroupFormat' => ['string'],
'SolrQuery::getGroupFunctions' => ['array'],
'SolrQuery::getGroupLimit' => ['int'],
'SolrQuery::getGroupMain' => ['bool'],
'SolrQuery::getGroupNGroups' => ['bool'],
'SolrQuery::getGroupOffset' => ['int'],
'SolrQuery::getGroupQueries' => ['array'],
'SolrQuery::getGroupSortFields' => ['array'],
'SolrQuery::getGroupTruncate' => ['bool'],
'SolrQuery::getHighlight' => ['bool'],
'SolrQuery::getHighlightAlternateField' => ['string', 'field_override='=>'string'],
'SolrQuery::getHighlightFields' => ['array'],
'SolrQuery::getHighlightFormatter' => ['string', 'field_override='=>'string'],
'SolrQuery::getHighlightFragmenter' => ['string', 'field_override='=>'string'],
'SolrQuery::getHighlightFragsize' => ['int', 'field_override='=>'string'],
'SolrQuery::getHighlightHighlightMultiTerm' => ['bool'],
'SolrQuery::getHighlightMaxAlternateFieldLength' => ['int', 'field_override='=>'string'],
'SolrQuery::getHighlightMaxAnalyzedChars' => ['int'],
'SolrQuery::getHighlightMergeContiguous' => ['bool', 'field_override='=>'string'],
'SolrQuery::getHighlightRegexMaxAnalyzedChars' => ['int'],
'SolrQuery::getHighlightRegexPattern' => ['string'],
'SolrQuery::getHighlightRegexSlop' => ['float'],
'SolrQuery::getHighlightRequireFieldMatch' => ['bool'],
'SolrQuery::getHighlightSimplePost' => ['string', 'field_override='=>'string'],
'SolrQuery::getHighlightSimplePre' => ['string', 'field_override='=>'string'],
'SolrQuery::getHighlightSnippets' => ['int', 'field_override='=>'string'],
'SolrQuery::getHighlightUsePhraseHighlighter' => ['bool'],
'SolrQuery::getMlt' => ['bool'],
'SolrQuery::getMltBoost' => ['bool'],
'SolrQuery::getMltCount' => ['int'],
'SolrQuery::getMltFields' => ['array'],
'SolrQuery::getMltMaxNumQueryTerms' => ['int'],
'SolrQuery::getMltMaxNumTokens' => ['int'],
'SolrQuery::getMltMaxWordLength' => ['int'],
'SolrQuery::getMltMinDocFrequency' => ['int'],
'SolrQuery::getMltMinTermFrequency' => ['int'],
'SolrQuery::getMltMinWordLength' => ['int'],
'SolrQuery::getMltQueryFields' => ['array'],
'SolrQuery::getParam' => ['mixed', 'param_name'=>'string'],
'SolrQuery::getParams' => ['array'],
'SolrQuery::getPreparedParams' => ['array'],
'SolrQuery::getQuery' => ['string'],
'SolrQuery::getRows' => ['int'],
'SolrQuery::getSortFields' => ['array'],
'SolrQuery::getStart' => ['int'],
'SolrQuery::getStats' => ['bool'],
'SolrQuery::getStatsFacets' => ['array'],
'SolrQuery::getStatsFields' => ['array'],
'SolrQuery::getTerms' => ['bool'],
'SolrQuery::getTermsField' => ['string'],
'SolrQuery::getTermsIncludeLowerBound' => ['bool'],
'SolrQuery::getTermsIncludeUpperBound' => ['bool'],
'SolrQuery::getTermsLimit' => ['int'],
'SolrQuery::getTermsLowerBound' => ['string'],
'SolrQuery::getTermsMaxCount' => ['int'],
'SolrQuery::getTermsMinCount' => ['int'],
'SolrQuery::getTermsPrefix' => ['string'],
'SolrQuery::getTermsReturnRaw' => ['bool'],
'SolrQuery::getTermsSort' => ['int'],
'SolrQuery::getTermsUpperBound' => ['string'],
'SolrQuery::getTimeAllowed' => ['int'],
'SolrQuery::removeExpandFilterQuery' => ['SolrQuery', 'fq'=>'string'],
'SolrQuery::removeExpandSortField' => ['SolrQuery', 'field'=>'string'],
'SolrQuery::removeFacetDateField' => ['SolrQuery', 'field'=>'string'],
'SolrQuery::removeFacetDateOther' => ['SolrQuery', 'value'=>'string', 'field_override='=>'string'],
'SolrQuery::removeFacetField' => ['SolrQuery', 'field'=>'string'],
'SolrQuery::removeFacetQuery' => ['SolrQuery', 'value'=>'string'],
'SolrQuery::removeField' => ['SolrQuery', 'field'=>'string'],
'SolrQuery::removeFilterQuery' => ['SolrQuery', 'fq'=>'string'],
'SolrQuery::removeHighlightField' => ['SolrQuery', 'field'=>'string'],
'SolrQuery::removeMltField' => ['SolrQuery', 'field'=>'string'],
'SolrQuery::removeMltQueryField' => ['SolrQuery', 'queryfield'=>'string'],
'SolrQuery::removeSortField' => ['SolrQuery', 'field'=>'string'],
'SolrQuery::removeStatsFacet' => ['SolrQuery', 'value'=>'string'],
'SolrQuery::removeStatsField' => ['SolrQuery', 'field'=>'string'],
'SolrQuery::serialize' => ['string'],
'SolrQuery::set' => ['SolrParams', 'name'=>'string', 'value'=>''],
'SolrQuery::setEchoHandler' => ['SolrQuery', 'flag'=>'bool'],
'SolrQuery::setEchoParams' => ['SolrQuery', 'type'=>'string'],
'SolrQuery::setExpand' => ['SolrQuery', 'value'=>'bool'],
'SolrQuery::setExpandQuery' => ['SolrQuery', 'q'=>'string'],
'SolrQuery::setExpandRows' => ['SolrQuery', 'value'=>'int'],
'SolrQuery::setExplainOther' => ['SolrQuery', 'query'=>'string'],
'SolrQuery::setFacet' => ['SolrQuery', 'flag'=>'bool'],
'SolrQuery::setFacetDateEnd' => ['SolrQuery', 'value'=>'string', 'field_override='=>'string'],
'SolrQuery::setFacetDateGap' => ['SolrQuery', 'value'=>'string', 'field_override='=>'string'],
'SolrQuery::setFacetDateHardEnd' => ['SolrQuery', 'value'=>'bool', 'field_override='=>'string'],
'SolrQuery::setFacetDateStart' => ['SolrQuery', 'value'=>'string', 'field_override='=>'string'],
'SolrQuery::setFacetEnumCacheMinDefaultFrequency' => ['SolrQuery', 'frequency'=>'int', 'field_override='=>'string'],
'SolrQuery::setFacetLimit' => ['SolrQuery', 'limit'=>'int', 'field_override='=>'string'],
'SolrQuery::setFacetMethod' => ['SolrQuery', 'method'=>'string', 'field_override='=>'string'],
'SolrQuery::setFacetMinCount' => ['SolrQuery', 'mincount'=>'int', 'field_override='=>'string'],
'SolrQuery::setFacetMissing' => ['SolrQuery', 'flag'=>'bool', 'field_override='=>'string'],
'SolrQuery::setFacetOffset' => ['SolrQuery', 'offset'=>'int', 'field_override='=>'string'],
'SolrQuery::setFacetPrefix' => ['SolrQuery', 'prefix'=>'string', 'field_override='=>'string'],
'SolrQuery::setFacetSort' => ['SolrQuery', 'facetsort'=>'int', 'field_override='=>'string'],
'SolrQuery::setGroup' => ['SolrQuery', 'value'=>'bool'],
'SolrQuery::setGroupCachePercent' => ['SolrQuery', 'percent'=>'int'],
'SolrQuery::setGroupFacet' => ['SolrQuery', 'value'=>'bool'],
'SolrQuery::setGroupFormat' => ['SolrQuery', 'value'=>'string'],
'SolrQuery::setGroupLimit' => ['SolrQuery', 'value'=>'int'],
'SolrQuery::setGroupMain' => ['SolrQuery', 'value'=>'string'],
'SolrQuery::setGroupNGroups' => ['SolrQuery', 'value'=>'bool'],
'SolrQuery::setGroupOffset' => ['SolrQuery', 'value'=>'int'],
'SolrQuery::setGroupTruncate' => ['SolrQuery', 'value'=>'bool'],
'SolrQuery::setHighlight' => ['SolrQuery', 'flag'=>'bool'],
'SolrQuery::setHighlightAlternateField' => ['SolrQuery', 'field'=>'string', 'field_override='=>'string'],
'SolrQuery::setHighlightFormatter' => ['SolrQuery', 'formatter'=>'string', 'field_override='=>'string'],
'SolrQuery::setHighlightFragmenter' => ['SolrQuery', 'fragmenter'=>'string', 'field_override='=>'string'],
'SolrQuery::setHighlightFragsize' => ['SolrQuery', 'size'=>'int', 'field_override='=>'string'],
'SolrQuery::setHighlightHighlightMultiTerm' => ['SolrQuery', 'flag'=>'bool'],
'SolrQuery::setHighlightMaxAlternateFieldLength' => ['SolrQuery', 'fieldlength'=>'int', 'field_override='=>'string'],
'SolrQuery::setHighlightMaxAnalyzedChars' => ['SolrQuery', 'value'=>'int'],
'SolrQuery::setHighlightMergeContiguous' => ['SolrQuery', 'flag'=>'bool', 'field_override='=>'string'],
'SolrQuery::setHighlightRegexMaxAnalyzedChars' => ['SolrQuery', 'maxanalyzedchars'=>'int'],
'SolrQuery::setHighlightRegexPattern' => ['SolrQuery', 'value'=>'string'],
'SolrQuery::setHighlightRegexSlop' => ['SolrQuery', 'factor'=>'float'],
'SolrQuery::setHighlightRequireFieldMatch' => ['SolrQuery', 'flag'=>'bool'],
'SolrQuery::setHighlightSimplePost' => ['SolrQuery', 'simplepost'=>'string', 'field_override='=>'string'],
'SolrQuery::setHighlightSimplePre' => ['SolrQuery', 'simplepre'=>'string', 'field_override='=>'string'],
'SolrQuery::setHighlightSnippets' => ['SolrQuery', 'value'=>'int', 'field_override='=>'string'],
'SolrQuery::setHighlightUsePhraseHighlighter' => ['SolrQuery', 'flag'=>'bool'],
'SolrQuery::setMlt' => ['SolrQuery', 'flag'=>'bool'],
'SolrQuery::setMltBoost' => ['SolrQuery', 'flag'=>'bool'],
'SolrQuery::setMltCount' => ['SolrQuery', 'count'=>'int'],
'SolrQuery::setMltMaxNumQueryTerms' => ['SolrQuery', 'value'=>'int'],
'SolrQuery::setMltMaxNumTokens' => ['SolrQuery', 'value'=>'int'],
'SolrQuery::setMltMaxWordLength' => ['SolrQuery', 'maxwordlength'=>'int'],
'SolrQuery::setMltMinDocFrequency' => ['SolrQuery', 'mindocfrequency'=>'int'],
'SolrQuery::setMltMinTermFrequency' => ['SolrQuery', 'mintermfrequency'=>'int'],
'SolrQuery::setMltMinWordLength' => ['SolrQuery', 'minwordlength'=>'int'],
'SolrQuery::setOmitHeader' => ['SolrQuery', 'flag'=>'bool'],
'SolrQuery::setParam' => ['SolrParams', 'name'=>'string', 'value'=>''],
'SolrQuery::setQuery' => ['SolrQuery', 'query'=>'string'],
'SolrQuery::setRows' => ['SolrQuery', 'rows'=>'int'],
'SolrQuery::setShowDebugInfo' => ['SolrQuery', 'flag'=>'bool'],
'SolrQuery::setStart' => ['SolrQuery', 'start'=>'int'],
'SolrQuery::setStats' => ['SolrQuery', 'flag'=>'bool'],
'SolrQuery::setTerms' => ['SolrQuery', 'flag'=>'bool'],
'SolrQuery::setTermsField' => ['SolrQuery', 'fieldname'=>'string'],
'SolrQuery::setTermsIncludeLowerBound' => ['SolrQuery', 'flag'=>'bool'],
'SolrQuery::setTermsIncludeUpperBound' => ['SolrQuery', 'flag'=>'bool'],
'SolrQuery::setTermsLimit' => ['SolrQuery', 'limit'=>'int'],
'SolrQuery::setTermsLowerBound' => ['SolrQuery', 'lowerbound'=>'string'],
'SolrQuery::setTermsMaxCount' => ['SolrQuery', 'frequency'=>'int'],
'SolrQuery::setTermsMinCount' => ['SolrQuery', 'frequency'=>'int'],
'SolrQuery::setTermsPrefix' => ['SolrQuery', 'prefix'=>'string'],
'SolrQuery::setTermsReturnRaw' => ['SolrQuery', 'flag'=>'bool'],
'SolrQuery::setTermsSort' => ['SolrQuery', 'sorttype'=>'int'],
'SolrQuery::setTermsUpperBound' => ['SolrQuery', 'upperbound'=>'string'],
'SolrQuery::setTimeAllowed' => ['SolrQuery', 'timeallowed'=>'int'],
'SolrQuery::toString' => ['string', 'url_encode='=>'bool|false'],
'SolrQuery::unserialize' => ['void', 'serialized'=>'string'],
'SolrQueryResponse::__construct' => ['void'],
'SolrQueryResponse::__destruct' => [''],
'SolrQueryResponse::getDigestedResponse' => ['string'],
'SolrQueryResponse::getHttpStatus' => ['int'],
'SolrQueryResponse::getHttpStatusMessage' => ['string'],
'SolrQueryResponse::getRawRequest' => ['string'],
'SolrQueryResponse::getRawRequestHeaders' => ['string'],
'SolrQueryResponse::getRawResponse' => ['string'],
'SolrQueryResponse::getRawResponseHeaders' => ['string'],
'SolrQueryResponse::getRequestUrl' => ['string'],
'SolrQueryResponse::getResponse' => ['SolrObject'],
'SolrQueryResponse::setParseMode' => ['bool', 'parser_mode='=>'int'],
'SolrQueryResponse::success' => ['bool'],
'SolrResponse::getDigestedResponse' => ['string'],
'SolrResponse::getHttpStatus' => ['int'],
'SolrResponse::getHttpStatusMessage' => ['string'],
'SolrResponse::getRawRequest' => ['string'],
'SolrResponse::getRawRequestHeaders' => ['string'],
'SolrResponse::getRawResponse' => ['string'],
'SolrResponse::getRawResponseHeaders' => ['string'],
'SolrResponse::getRequestUrl' => ['string'],
'SolrResponse::getResponse' => ['SolrObject'],
'SolrResponse::setParseMode' => ['bool', 'parser_mode='=>'int'],
'SolrResponse::success' => ['bool'],
'SolrServerException::__clone' => ['void'],
'SolrServerException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Exception)|(?Throwable)'],
'SolrServerException::__toString' => ['string'],
'SolrServerException::__wakeup' => ['void'],
'SolrServerException::getCode' => ['int'],
'SolrServerException::getFile' => ['string'],
'SolrServerException::getInternalInfo' => ['array'],
'SolrServerException::getLine' => ['int'],
'SolrServerException::getMessage' => ['string'],
'SolrServerException::getPrevious' => ['Exception|Throwable'],
'SolrServerException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'SolrServerException::getTraceAsString' => ['string'],
'SolrUpdateResponse::__construct' => ['void'],
'SolrUpdateResponse::__destruct' => [''],
'SolrUpdateResponse::getDigestedResponse' => ['string'],
'SolrUpdateResponse::getHttpStatus' => ['int'],
'SolrUpdateResponse::getHttpStatusMessage' => ['string'],
'SolrUpdateResponse::getRawRequest' => ['string'],
'SolrUpdateResponse::getRawRequestHeaders' => ['string'],
'SolrUpdateResponse::getRawResponse' => ['string'],
'SolrUpdateResponse::getRawResponseHeaders' => ['string'],
'SolrUpdateResponse::getRequestUrl' => ['string'],
'SolrUpdateResponse::getResponse' => ['SolrObject'],
'SolrUpdateResponse::setParseMode' => ['bool', 'parser_mode='=>'int'],
'SolrUpdateResponse::success' => ['bool'],
'SolrUtils::digestXmlResponse' => ['SolrObject', 'xmlresponse'=>'string', 'parse_mode='=>'int'],
'SolrUtils::escapeQueryChars' => ['string|false', 'str'=>'string'],
'SolrUtils::getSolrVersion' => ['string'],
'SolrUtils::queryPhrase' => ['string', 'str'=>'string'],
'sort' => ['bool', '&rw_array_arg'=>'array', 'sort_flags='=>'int'],
'soundex' => ['string', 'str'=>'string'],
'SphinxClient::__construct' => ['void'],
'SphinxClient::addQuery' => ['int', 'query'=>'string', 'index='=>'string', 'comment='=>'string'],
'SphinxClient::buildExcerpts' => ['array', 'docs'=>'array', 'index'=>'string', 'words'=>'string', 'opts='=>'array'],
'SphinxClient::buildKeywords' => ['array', 'query'=>'string', 'index'=>'string', 'hits'=>'bool'],
'SphinxClient::close' => ['bool'],
'SphinxClient::escapeString' => ['string', 'string'=>'string'],
'SphinxClient::getLastError' => ['string'],
'SphinxClient::getLastWarning' => ['string'],
'SphinxClient::open' => ['bool'],
'SphinxClient::query' => ['array', 'query'=>'string', 'index='=>'string', 'comment='=>'string'],
'SphinxClient::resetFilters' => ['void'],
'SphinxClient::resetGroupBy' => ['void'],
'SphinxClient::runQueries' => ['array'],
'SphinxClient::setArrayResult' => ['bool', 'array_result'=>'bool'],
'SphinxClient::setConnectTimeout' => ['bool', 'timeout'=>'float'],
'SphinxClient::setFieldWeights' => ['bool', 'weights'=>'array'],
'SphinxClient::setFilter' => ['bool', 'attribute'=>'string', 'values'=>'array', 'exclude='=>'bool'],
'SphinxClient::setFilterFloatRange' => ['bool', 'attribute'=>'string', 'min'=>'float', 'max'=>'float', 'exclude='=>'bool'],
'SphinxClient::setFilterRange' => ['bool', 'attribute'=>'string', 'min'=>'int', 'max'=>'int', 'exclude='=>'bool'],
'SphinxClient::setGeoAnchor' => ['bool', 'attrlat'=>'string', 'attrlong'=>'string', 'latitude'=>'float', 'longitude'=>'float'],
'SphinxClient::setGroupBy' => ['bool', 'attribute'=>'string', 'func'=>'int', 'groupsort='=>'string'],
'SphinxClient::setGroupDistinct' => ['bool', 'attribute'=>'string'],
'SphinxClient::setIDRange' => ['bool', 'min'=>'int', 'max'=>'int'],
'SphinxClient::setIndexWeights' => ['bool', 'weights'=>'array'],
'SphinxClient::setLimits' => ['bool', 'offset'=>'int', 'limit'=>'int', 'max_matches='=>'int', 'cutoff='=>'int'],
'SphinxClient::setMatchMode' => ['bool', 'mode'=>'int'],
'SphinxClient::setMaxQueryTime' => ['bool', 'qtime'=>'int'],
'SphinxClient::setOverride' => ['bool', 'attribute'=>'string', 'type'=>'int', 'values'=>'array'],
'SphinxClient::setRankingMode' => ['bool', 'ranker'=>'int'],
'SphinxClient::setRetries' => ['bool', 'count'=>'int', 'delay='=>'int'],
'SphinxClient::setSelect' => ['bool', 'clause'=>'string'],
'SphinxClient::setServer' => ['bool', 'server'=>'string', 'port'=>'int'],
'SphinxClient::setSortMode' => ['bool', 'mode'=>'int', 'sortby='=>'string'],
'SphinxClient::status' => ['array'],
'SphinxClient::updateAttributes' => ['int', 'index'=>'string', 'attributes'=>'array', 'values'=>'array', 'mva='=>'bool'],
'spl_autoload' => ['void', 'class_name'=>'string', 'file_extensions='=>'string'],
'spl_autoload_call' => ['void', 'class_name'=>'string'],
'spl_autoload_extensions' => ['string', 'file_extensions='=>'string'],
'spl_autoload_functions' => ['false|list<callable(string):void>'],
'spl_autoload_register' => ['bool', 'autoload_function='=>'callable(string):void', 'throw='=>'bool', 'prepend='=>'bool'],
'spl_autoload_unregister' => ['bool', 'autoload_function'=>'mixed'],
'spl_classes' => ['array'],
'spl_object_hash' => ['string', 'obj'=>'object'],
'spl_object_id' => ['int', 'obj'=>'object'],
'SplDoublyLinkedList::add' => ['void', 'index'=>'mixed', 'newval'=>'mixed'],
'SplDoublyLinkedList::bottom' => ['mixed'],
'SplDoublyLinkedList::count' => ['0|positive-int'],
'SplDoublyLinkedList::current' => ['mixed'],
'SplDoublyLinkedList::getIteratorMode' => ['int'],
'SplDoublyLinkedList::isEmpty' => ['bool'],
'SplDoublyLinkedList::key' => ['mixed'],
'SplDoublyLinkedList::next' => ['void'],
'SplDoublyLinkedList::offsetExists' => ['bool', 'index'=>'mixed'],
'SplDoublyLinkedList::offsetGet' => ['mixed', 'index'=>'mixed'],
'SplDoublyLinkedList::offsetSet' => ['void', 'index'=>'mixed', 'newval'=>'mixed'],
'SplDoublyLinkedList::offsetUnset' => ['void', 'index'=>'mixed'],
'SplDoublyLinkedList::pop' => ['mixed'],
'SplDoublyLinkedList::prev' => ['void'],
'SplDoublyLinkedList::push' => ['void', 'value'=>'mixed'],
'SplDoublyLinkedList::rewind' => ['void'],
'SplDoublyLinkedList::serialize' => ['string'],
'SplDoublyLinkedList::setIteratorMode' => ['int', 'flags'=>'int'],
'SplDoublyLinkedList::shift' => ['mixed'],
'SplDoublyLinkedList::top' => ['mixed'],
'SplDoublyLinkedList::unserialize' => ['void', 'serialized'=>'string'],
'SplDoublyLinkedList::unshift' => ['bool', 'value'=>'mixed'],
'SplDoublyLinkedList::valid' => ['bool'],
'SplEnum::__construct' => ['void', 'initial_value='=>'mixed', 'strict='=>'bool|true'],
'SplEnum::getConstList' => ['array', 'include_default='=>'bool'],
'SplFileInfo::__construct' => ['void', 'file_name'=>'string'],
'SplFileInfo::__toString' => ['string'],
'SplFileInfo::getATime' => ['__benevolent<int|false>'],
'SplFileInfo::getBasename' => ['string', 'suffix='=>'string'],
'SplFileInfo::getCTime' => ['int'],
'SplFileInfo::getExtension' => ['string'],
'SplFileInfo::getFileInfo' => ['SplFileInfo', 'class_name='=>'string'],
'SplFileInfo::getFilename' => ['string'],
'SplFileInfo::getGroup' => ['__benevolent<int|false>'],
'SplFileInfo::getInode' => ['__benevolent<int|false>'],
'SplFileInfo::getLinkTarget' => ['__benevolent<string|false>'],
'SplFileInfo::getMTime' => ['__benevolent<int|false>'],
'SplFileInfo::getOwner' => ['__benevolent<int|false>'],
'SplFileInfo::getPath' => ['string'],
'SplFileInfo::getPathInfo' => ['SplFileInfo', 'class_name='=>'string'],
'SplFileInfo::getPathname' => ['string'],
'SplFileInfo::getPerms' => ['__benevolent<int|false>'],
'SplFileInfo::getRealPath' => ['__benevolent<string|false>'],
'SplFileInfo::getSize' => ['__benevolent<int|false>'],
'SplFileInfo::getType' => ['__benevolent<string|false>'],
'SplFileInfo::isDir' => ['bool'],
'SplFileInfo::isExecutable' => ['bool'],
'SplFileInfo::isFile' => ['bool'],
'SplFileInfo::isLink' => ['bool'],
'SplFileInfo::isReadable' => ['bool'],
'SplFileInfo::isWritable' => ['bool'],
'SplFileInfo::openFile' => ['SplFileObject', 'mode='=>'string', 'use_include_path='=>'bool', 'context='=>'resource'],
'SplFileInfo::setFileClass' => ['void', 'class_name='=>'string'],
'SplFileInfo::setInfoClass' => ['void', 'class_name='=>'string'],
'SplFileObject::__construct' => ['void', 'filename'=>'string', 'mode='=>'string', 'use_include_path='=>'bool', 'context='=>''],
'SplFileObject::__toString' => ['string'],
'SplFileObject::current' => ['string|array|false'],
'SplFileObject::eof' => ['bool'],
'SplFileObject::fflush' => ['bool'],
'SplFileObject::fgetc' => ['string|false'],
// Do not believe https://www.php.net/manual/en/splfileobject.fgetcsv#refsect1-splfileobject.fgetcsv-returnvalues
'SplFileObject::fgetcsv' => ['list<string>|array{0: null}|false|null', 'delimiter='=>'string', 'enclosure='=>'string', 'escape='=>'string'],
'SplFileObject::fgets' => ['string|false'],
'SplFileObject::fgetss' => ['string|false', 'allowable_tags='=>'string'],
'SplFileObject::flock' => ['bool', 'operation'=>'int', '&w_wouldblock='=>'int'],
'SplFileObject::fpassthru' => ['int'],
'SplFileObject::fputcsv' => ['int|false', 'fields'=>'array', 'delimiter='=>'string', 'enclosure='=>'string', 'escape='=>'string'],
'SplFileObject::fread' => ['string|false', 'length'=>'int'],
'SplFileObject::fscanf' => ['bool', 'format'=>'string', '&...w_vars='=>'string|int|float'],
'SplFileObject::fseek' => ['int', 'pos'=>'int', 'whence='=>'int'],
'SplFileObject::fstat' => ['array'],
'SplFileObject::ftell' => ['int|false'],
'SplFileObject::ftruncate' => ['bool', 'size'=>'int'],
'SplFileObject::fwrite' => ['int', 'str'=>'string', 'length='=>'int'],
'SplFileObject::getChildren' => ['null'],
'SplFileObject::getCsvControl' => ['array'],
'SplFileObject::getCurrentLine' => ['string|false'],
'SplFileObject::getFlags' => ['int'],
'SplFileObject::getMaxLineLen' => ['int'],
'SplFileObject::hasChildren' => ['false'],
'SplFileObject::key' => ['int'],
'SplFileObject::next' => ['void'],
'SplFileObject::rewind' => ['void'],
'SplFileObject::seek' => ['void', 'line_pos'=>'int'],
'SplFileObject::setCsvControl' => ['void', 'delimiter='=>'string', 'enclosure='=>'string', 'escape='=>'string'],
'SplFileObject::setFlags' => ['void', 'flags'=>'int'],
'SplFileObject::setMaxLineLen' => ['void', 'max_len'=>'int'],
'SplFileObject::valid' => ['bool'],
'SplFixedArray::__construct' => ['void', 'size='=>'int'],
'SplFixedArray::__wakeup' => ['void'],
'SplFixedArray::count' => ['0|positive-int'],
'SplFixedArray::current' => ['mixed'],
'SplFixedArray::fromArray' => ['SplFixedArray', 'data'=>'array', 'save_indexes='=>'bool'],
'SplFixedArray::getSize' => ['int'],
'SplFixedArray::key' => ['int'],
'SplFixedArray::next' => ['void'],
'SplFixedArray::offsetExists' => ['bool', 'index'=>'int'],
'SplFixedArray::offsetGet' => ['mixed', 'index'=>'int'],
'SplFixedArray::offsetSet' => ['void', 'index'=>'int', 'newval'=>'mixed'],
'SplFixedArray::offsetUnset' => ['void', 'index'=>'int'],
'SplFixedArray::rewind' => ['void'],
'SplFixedArray::setSize' => ['bool', 'size'=>'int'],
'SplFixedArray::toArray' => ['array'],
'SplFixedArray::valid' => ['bool'],
'SplHeap::compare' => ['int', 'value1'=>'mixed', 'value2'=>'mixed'],
'SplHeap::count' => ['0|positive-int'],
'SplHeap::current' => ['mixed'],
'SplHeap::extract' => ['mixed'],
'SplHeap::insert' => ['bool', 'value'=>'mixed'],
'SplHeap::isCorrupted' => ['int'],
'SplHeap::isEmpty' => ['bool'],
'SplHeap::key' => ['int'],
'SplHeap::next' => ['void'],
'SplHeap::recoverFromCorruption' => ['int'],
'SplHeap::rewind' => ['void'],
'SplHeap::top' => ['mixed'],
'SplHeap::valid' => ['bool'],
'split' => ['array', 'pattern'=>'string', 'string'=>'string', 'limit='=>'int'],
'spliti' => ['array', 'pattern'=>'string', 'string'=>'string', 'limit='=>'int'],
'SplMaxHeap::compare' => ['int', 'a'=>'mixed', 'b'=>'mixed'],
'SplMinHeap::compare' => ['int', 'a'=>'mixed', 'b'=>'mixed'],
'SplObjectStorage::addAll' => ['0|positive-int', 'os'=>'SplObjectStorage'],
'SplObjectStorage::attach' => ['void', 'obj'=>'object', 'inf='=>'mixed'],
'SplObjectStorage::contains' => ['bool', 'obj'=>'object'],
'SplObjectStorage::count' => ['0|positive-int'],
'SplObjectStorage::current' => ['object'],
'SplObjectStorage::detach' => ['void', 'obj'=>'object'],
'SplObjectStorage::getHash' => ['string', 'obj'=>'object'],
'SplObjectStorage::getInfo' => ['mixed'],
'SplObjectStorage::key' => ['int'],
'SplObjectStorage::next' => ['void'],
'SplObjectStorage::offsetExists' => ['bool', 'object'=>'object'],
'SplObjectStorage::offsetGet' => ['mixed', 'obj'=>'object'],
'SplObjectStorage::offsetSet' => ['object', 'object'=>'object', 'data='=>'mixed'],
'SplObjectStorage::offsetUnset' => ['object', 'object'=>'object'],
'SplObjectStorage::removeAll' => ['0|positive-int', 'os'=>'SplObjectStorage'],
'SplObjectStorage::removeAllExcept' => ['0|positive-int', 'os'=>'SplObjectStorage'],
'SplObjectStorage::rewind' => ['void'],
'SplObjectStorage::serialize' => ['string'],
'SplObjectStorage::setInfo' => ['void', 'inf'=>'mixed'],
'SplObjectStorage::unserialize' => ['void', 'serialized'=>'string'],
'SplObjectStorage::valid' => ['bool'],
'SplObserver::update' => ['void', 'subject'=>'SplSubject'],
'SplPriorityQueue::compare' => ['int', 'a'=>'mixed', 'b'=>'mixed'],
'SplPriorityQueue::count' => ['0|positive-int'],
'SplPriorityQueue::current' => ['mixed'],
'SplPriorityQueue::extract' => ['mixed'],
'SplPriorityQueue::getExtractFlags' => ['int'],
'SplPriorityQueue::insert' => ['bool', 'value'=>'mixed', 'priority'=>'mixed'],
'SplPriorityQueue::isEmpty' => ['bool'],
'SplPriorityQueue::key' => ['mixed'],
'SplPriorityQueue::next' => ['void'],
'SplPriorityQueue::recoverFromCorruption' => ['void'],
'SplPriorityQueue::rewind' => ['void'],
'SplPriorityQueue::setExtractFlags' => ['void', 'flags'=>'int'],
'SplPriorityQueue::top' => ['mixed'],
'SplPriorityQueue::valid' => ['bool'],
'SplQueue::dequeue' => ['mixed'],
'SplQueue::enqueue' => ['void', 'value'=>'mixed'],
'SplQueue::setIteratorMode' => ['void', 'mode'=>'int'],
'SplStack::setIteratorMode' => ['void', 'mode'=>'int'],
'SplSubject::attach' => ['void', 'observer'=>'SplObserver'],
'SplSubject::detach' => ['void', 'observer'=>'SplObserver'],
'SplSubject::notify' => ['void'],
'SplTempFileObject::__construct' => ['void', 'max_memory='=>'int'],
'SplType::__construct' => ['void', 'initial_value='=>'mixed', 'strict='=>'bool'],
'Spoofchecker::__construct' => ['void'],
'Spoofchecker::areConfusable' => ['bool', 's1'=>'string', 's2'=>'string', '&w_error='=>'string'],
'Spoofchecker::isSuspicious' => ['bool', 'text'=>'string', '&w_error='=>'string'],
'Spoofchecker::setAllowedLocales' => ['void', 'locale_list'=>'string'],
'Spoofchecker::setChecks' => ['void', 'checks'=>'long'],
'Spoofchecker::setRestrictionLevel' => ['void', 'restriction_level'=>'int'],
'sprintf' => ['string', 'format'=>'string', '...values='=>'__stringAndStringable|int|float|null|bool'],
'sql_regcase' => ['string', 'string'=>'string'],
'SQLite3::__construct' => ['void', 'filename'=>'string', 'flags='=>'int', 'encryption_key='=>'string|null'],
'SQLite3::busyTimeout' => ['bool', 'msecs'=>'int'],
'SQLite3::changes' => ['int'],
'SQLite3::close' => ['bool'],
'SQLite3::createAggregate' => ['bool', 'name'=>'string', 'step_callback'=>'callable', 'final_callback'=>'callable', 'argument_count='=>'int'],
'SQLite3::createCollation' => ['bool', 'name'=>'string', 'callback'=>'callable'],
'SQLite3::createFunction' => ['bool', 'name'=>'string', 'callback'=>'callable', 'argument_count='=>'int', 'flags='=>'int'],
'SQLite3::enableExceptions' => ['bool', 'enableexceptions='=>'bool'],
'SQLite3::escapeString' => ['string', 'value'=>'string'],
'SQLite3::exec' => ['bool', 'query'=>'string'],
'SQLite3::lastErrorCode' => ['int'],
'SQLite3::lastErrorMsg' => ['string'],
'SQLite3::lastInsertRowID' => ['int'],
'SQLite3::loadExtension' => ['bool', 'shared_library'=>'string'],
'SQLite3::open' => ['void', 'filename'=>'string', 'flags='=>'int', 'encryption_key='=>'string|null'],
'SQLite3::openBlob' => ['resource', 'table'=>'string', 'column'=>'string', 'rowid'=>'int', 'dbname'=>'string', 'flags='=>'int'],
'SQLite3::prepare' => ['SQLite3Stmt|false', 'query'=>'string'],
'SQLite3::query' => ['SQLite3Result|false', 'query'=>'string'],
'SQLite3::querySingle' => ['array|int|string|bool|float|null|false', 'query'=>'string', 'entire_row='=>'bool'],
'SQLite3::version' => ['array'],
'SQLite3Result::__construct' => ['void'],
'SQLite3Result::columnName' => ['string', 'column_number'=>'int'],
'SQLite3Result::columnType' => ['int', 'column_number'=>'int'],
'SQLite3Result::fetchArray' => ['array|false', 'mode='=>'int'],
'SQLite3Result::finalize' => ['bool'],
'SQLite3Result::numColumns' => ['int'],
'SQLite3Result::reset' => ['bool'],
'SQLite3Stmt::__construct' => ['void', 'dbobject'=>'sqlite3', 'statement'=>'string'],
'SQLite3Stmt::bindParam' => ['bool', 'parameter_name_or_number'=>'string|int', '&rw_parameter'=>'mixed', 'type='=>'int'],
'SQLite3Stmt::bindValue' => ['bool', 'parameter_name_or_number'=>'string|int', 'parameter'=>'mixed', 'type='=>'int'],
'SQLite3Stmt::clear' => ['bool'],
'SQLite3Stmt::close' => ['bool'],
'SQLite3Stmt::execute' => ['false|SQLite3Result'],
'SQLite3Stmt::paramCount' => ['int'],
'SQLite3Stmt::readOnly' => ['bool'],
'SQLite3Stmt::reset' => ['bool'],
'sqlite_array_query' => ['array', 'dbhandle'=>'', 'query'=>'string', 'result_type='=>'int', 'decode_binary='=>'bool'],
'sqlite_busy_timeout' => ['', 'dbhandle'=>'', 'milliseconds'=>'int'],
'sqlite_changes' => ['int', 'dbhandle'=>''],
'sqlite_close' => ['void', 'dbhandle'=>'resource'],
'sqlite_column' => ['', 'result'=>'', 'index_or_name'=>'', 'decode_binary='=>'bool'],
'sqlite_create_aggregate' => ['', 'dbhandle'=>'', 'function_name'=>'string', 'step_func'=>'callable', 'finalize_func'=>'callable', 'num_args='=>'int'],
'sqlite_create_function' => ['', 'dbhandle'=>'', 'function_name'=>'string', 'callback'=>'callable', 'num_args='=>'int'],
'sqlite_current' => ['array', 'result'=>'', 'result_type='=>'int', 'decode_binary='=>'bool'],
'sqlite_error_string' => ['string', 'error_code'=>'int'],
'sqlite_escape_string' => ['string', 'item'=>'string'],
'sqlite_exec' => ['bool', 'dbhandle'=>'', 'query'=>'string', 'error_msg='=>'string'],
'sqlite_factory' => ['SQLiteDatabase', 'filename'=>'string', 'mode='=>'int', 'error_message='=>'string'],
'sqlite_fetch_all' => ['array', 'result'=>'', 'result_type='=>'int', 'decode_binary='=>'bool'],
'sqlite_fetch_array' => ['array', 'result'=>'', 'result_type='=>'int', 'decode_binary='=>'bool'],
'sqlite_fetch_column_types' => ['array', 'table_name'=>'string', 'dbhandle'=>'', 'result_type='=>'int'],
'sqlite_fetch_object' => ['object', 'result'=>'', 'class_name='=>'string', 'ctor_params='=>'array', 'decode_binary='=>'bool'],
'sqlite_fetch_single' => ['string', 'result'=>'', 'decode_binary='=>'bool'],
'sqlite_field_name' => ['string', 'result'=>'', 'field_index'=>'int'],
'sqlite_has_more' => ['bool', 'result'=>'resource'],
'sqlite_has_prev' => ['bool', 'result'=>''],
'sqlite_key' => ['int', 'result'=>''],
'sqlite_last_error' => ['int', 'dbhandle'=>''],
'sqlite_last_insert_rowid' => ['int', 'dbhandle'=>''],
'sqlite_libencoding' => ['string'],
'sqlite_libversion' => ['string'],
'sqlite_next' => ['bool', 'result'=>''],
'sqlite_num_fields' => ['int', 'result'=>''],
'sqlite_num_rows' => ['int', 'result'=>''],
'sqlite_open' => ['resource|false', 'filename'=>'string', 'mode='=>'int', 'error_message='=>'string'],
'sqlite_popen' => ['resource|false', 'filename'=>'string', 'mode='=>'int', 'error_message='=>'string'],
'sqlite_prev' => ['bool', 'result'=>''],
'sqlite_query' => ['SQLiteResult', 'dbhandle'=>'', 'query'=>'string', 'result_type='=>'int', 'error_msg='=>'string'],
'sqlite_rewind' => ['bool', 'result'=>''],
'sqlite_seek' => ['bool', 'result'=>'', 'rownum'=>'int'],
'sqlite_single_query' => ['array', 'db'=>'', 'query'=>'string', 'first_row_only='=>'bool', 'decode_binary='=>'bool'],
'sqlite_udf_decode_binary' => ['string', 'data'=>'string'],
'sqlite_udf_encode_binary' => ['string', 'data'=>'string'],
'sqlite_unbuffered_query' => ['SQLiteUnbuffered', 'dbhandle'=>'', 'query'=>'string', 'result_type='=>'int', 'error_msg='=>'string'],
'sqlite_valid' => ['bool', 'result'=>''],
'SQLiteDatabase::arrayQuery' => ['array', 'dbhandle'=>'', 'query'=>'string', 'result_type='=>'int', 'decode_binary='=>'bool'],
'SQLiteDatabase::busyTimeout' => ['', 'dbhandle'=>'', 'milliseconds'=>'int'],
'SQLiteDatabase::changes' => ['int', 'dbhandle'=>''],
'SQLiteDatabase::createAggregate' => ['', 'dbhandle'=>'', 'function_name'=>'string', 'step_func'=>'callable', 'finalize_func'=>'callable', 'num_args='=>'int'],
'SQLiteDatabase::createFunction' => ['', 'dbhandle'=>'', 'function_name'=>'string', 'callback'=>'callable', 'num_args='=>'int'],
'SQLiteDatabase::exec' => ['bool', 'dbhandle'=>'', 'query'=>'string', 'error_msg='=>'string'],
'SQLiteDatabase::fetchColumnTypes' => ['array', 'table_name'=>'string', 'dbhandle'=>'', 'result_type='=>'int'],
'SQLiteDatabase::lastError' => ['int', 'dbhandle'=>''],
'SQLiteDatabase::lastInsertRowid' => ['int', 'dbhandle'=>''],
'SQLiteDatabase::query' => ['SQLiteResult', 'dbhandle'=>'', 'query'=>'string', 'result_type='=>'int', 'error_msg='=>'string'],
'SQLiteDatabase::queryExec' => ['bool', 'query'=>'string', '&w_error_msg='=>'string'],
'SQLiteDatabase::singleQuery' => ['array', 'db'=>'', 'query'=>'string', 'first_row_only='=>'bool', 'decode_binary='=>'bool'],
'SQLiteDatabase::unbufferedQuery' => ['SQLiteUnbuffered', 'dbhandle'=>'', 'query'=>'string', 'result_type='=>'int', 'error_msg='=>'string'],
'SQLiteResult::column' => ['', 'result'=>'', 'index_or_name'=>'', 'decode_binary='=>'bool'],
'SQLiteResult::current' => ['array', 'result'=>'', 'result_type='=>'int', 'decode_binary='=>'bool'],
'SQLiteResult::fetch' => ['array', 'result'=>'', 'result_type='=>'int', 'decode_binary='=>'bool'],
'SQLiteResult::fetchAll' => ['array', 'result'=>'', 'result_type='=>'int', 'decode_binary='=>'bool'],
'SQLiteResult::fetchObject' => ['object', 'result'=>'', 'class_name='=>'string', 'ctor_params='=>'array', 'decode_binary='=>'bool'],
'SQLiteResult::fetchSingle' => ['string', 'result'=>'', 'decode_binary='=>'bool'],
'SQLiteResult::fieldName' => ['string', 'result'=>'', 'field_index'=>'int'],
'SQLiteResult::hasPrev' => ['bool', 'result'=>''],
'SQLiteResult::key' => ['int', 'result'=>''],
'SQLiteResult::next' => ['bool', 'result'=>''],
'SQLiteResult::numFields' => ['int', 'result'=>''],
'SQLiteResult::numRows' => ['int', 'result'=>''],
'SQLiteResult::prev' => ['bool', 'result'=>''],
'SQLiteResult::rewind' => ['bool', 'result'=>''],
'SQLiteResult::seek' => ['bool', 'result'=>'', 'rownum'=>'int'],
'SQLiteResult::valid' => ['bool', 'result'=>''],
'SQLiteUnbuffered::column' => ['', 'result'=>'', 'index_or_name'=>'', 'decode_binary='=>'bool'],
'SQLiteUnbuffered::current' => ['array', 'result'=>'', 'result_type='=>'int', 'decode_binary='=>'bool'],
'SQLiteUnbuffered::fetch' => ['array', 'result'=>'', 'result_type='=>'int', 'decode_binary='=>'bool'],
'SQLiteUnbuffered::fetchAll' => ['array', 'result'=>'', 'result_type='=>'int', 'decode_binary='=>'bool'],
'SQLiteUnbuffered::fetchObject' => ['object', 'result'=>'', 'class_name='=>'string', 'ctor_params='=>'array', 'decode_binary='=>'bool'],
'SQLiteUnbuffered::fetchSingle' => ['string', 'result'=>'', 'decode_binary='=>'bool'],
'SQLiteUnbuffered::fieldName' => ['string', 'result'=>'', 'field_index'=>'int'],
'SQLiteUnbuffered::next' => ['bool', 'result'=>''],
'SQLiteUnbuffered::numFields' => ['int', 'result'=>''],
'SQLiteUnbuffered::valid' => ['bool', 'result'=>''],
'sqlsrv_begin_transaction' => ['bool', 'conn'=>'resource'],
'sqlsrv_cancel' => ['bool', 'stmt'=>'resource'],
'sqlsrv_client_info' => ['array|false', 'conn'=>'resource'],
'sqlsrv_close' => ['bool', 'conn'=>'resource'],
'sqlsrv_commit' => ['bool', 'conn'=>'resource'],
'sqlsrv_configure' => ['bool', 'setting'=>'string', 'value'=>'mixed'],
'sqlsrv_connect' => ['resource|false', 'serverName'=>'string', 'connectionInfo='=>'array'],
'sqlsrv_errors' => ['array|null', 'errorsOrWarnings='=>'int'],
'sqlsrv_execute' => ['bool', 'stmt'=>'resource'],
'sqlsrv_fetch' => ['bool|null', 'stmt'=>'resource', 'row='=>'int', 'offset='=>'int'],
'sqlsrv_fetch_array' => ['array|null|false', 'stmt'=>'resource', 'fetchType='=>'int', 'row='=>'int', 'offset='=>'int'],
'sqlsrv_fetch_object' => ['object|null|false', 'stmt'=>'resource', 'className='=>'string', 'ctorParams='=>'array', 'row='=>'int', 'offset='=>'int'],
'sqlsrv_field_metadata' => ['array|false', 'stmt'=>'resource'],
'sqlsrv_free_stmt' => ['bool', 'stmt'=>'resource'],
'sqlsrv_get_config' => ['mixed', 'setting'=>'string'],
'sqlsrv_get_field' => ['mixed', 'stmt'=>'resource', 'fieldIndex'=>'int', 'getAsType='=>'int'],
'sqlsrv_has_rows' => ['bool', 'stmt'=>'resource'],
'sqlsrv_next_result' => ['bool|null', 'stmt'=>'resource'],
'sqlsrv_num_fields' => ['int|false', 'stmt'=>'resource'],
'sqlsrv_num_rows' => ['int|false', 'stmt'=>'resource'],
'sqlsrv_prepare' => ['resource|false', 'conn'=>'resource', 'sql'=>'string', 'params='=>'array', 'options='=>'array'],
'sqlsrv_query' => ['resource|false', 'conn'=>'resource', 'sql'=>'string', 'params='=>'array', 'options='=>'array'],
'sqlsrv_rollback' => ['bool', 'conn'=>'resource'],
'sqlsrv_rows_affected' => ['int<-1,max>|false', 'stmt'=>'resource'],
'sqlsrv_send_stream_data' => ['bool', 'stmt'=>'resource'],
'sqlsrv_server_info' => ['array', 'conn'=>'resource'],
'sqrt' => ['float', 'number'=>'float'],
'srand' => ['void', 'seed='=>'int', 'mode='=>'int'],
'sscanf' => ['int|null', 'str'=>'string', 'format'=>'string', '&w_war'=>'string|int|float|null', '&...w_vars='=>'string|int|float|null'],
'sscanf\'1' => ['array|null', 'str'=>'string', 'format'=>'string'],
'ssdeep_fuzzy_compare' => ['int', 'signature1'=>'string', 'signature2'=>'string'],
'ssdeep_fuzzy_hash' => ['string', 'to_hash'=>'string'],
'ssdeep_fuzzy_hash_filename' => ['string', 'file_name'=>'string'],
'ssh2_auth_agent' => ['bool', 'session'=>'resource', 'username'=>'string'],
'ssh2_auth_hostbased_file' => ['bool', 'session'=>'resource', 'username'=>'string', 'hostname'=>'string', 'pubkeyfile'=>'string', 'privkeyfile'=>'string', 'passphrase='=>'string', 'local_username='=>'string'],
'ssh2_auth_none' => ['bool|string[]', 'session'=>'resource', 'username'=>'string'],
'ssh2_auth_password' => ['bool', 'session'=>'resource', 'username'=>'string', 'password'=>'string'],
'ssh2_auth_pubkey_file' => ['bool', 'session'=>'resource', 'username'=>'string', 'pubkeyfile'=>'string', 'privkeyfile'=>'string', 'passphrase='=>'string'],
'ssh2_connect' => ['resource|false', 'host'=>'string', 'port='=>'int', 'methods='=>'array', 'callbacks='=>'array'],
'ssh2_disconnect' => ['bool', 'session'=>'resource'],
'ssh2_exec' => ['resource|false', 'session'=>'resource', 'command'=>'string', 'pty='=>'string', 'env='=>'array', 'width='=>'int', 'height='=>'int', 'width_height_type='=>'int'],
'ssh2_fetch_stream' => ['resource|false', 'channel'=>'resource', 'streamid'=>'int'],
'ssh2_fingerprint' => ['string|false', 'session'=>'resource', 'flags='=>'int'],
'ssh2_methods_negotiated' => ['array|false', 'session'=>'resource'],
'ssh2_publickey_add' => ['bool', 'pkey'=>'resource', 'algoname'=>'string', 'blob'=>'string', 'overwrite='=>'bool', 'attributes='=>'array'],
'ssh2_publickey_init' => ['resource|false', 'session'=>'resource'],
'ssh2_publickey_list' => ['array|false', 'pkey'=>'resource'],
'ssh2_publickey_remove' => ['bool', 'pkey'=>'resource', 'algoname'=>'string', 'blob'=>'string'],
'ssh2_scp_recv' => ['bool', 'session'=>'resource', 'remote_file'=>'string', 'local_file'=>'string'],
'ssh2_scp_send' => ['bool', 'session'=>'resource', 'local_file'=>'string', 'remote_file'=>'string', 'create_mode='=>'int'],
'ssh2_sftp' => ['resource|false', 'session'=>'resource'],
'ssh2_sftp_chmod' => ['bool', 'sftp'=>'resource', 'filename'=>'string', 'mode'=>'int'],
'ssh2_sftp_lstat' => ['array|false', 'sftp'=>'resource', 'path'=>'string'],
'ssh2_sftp_mkdir' => ['bool', 'sftp'=>'resource', 'dirname'=>'string', 'mode='=>'int', 'recursive='=>'bool'],
'ssh2_sftp_readlink' => ['string|false', 'sftp'=>'resource', 'link'=>'string'],
'ssh2_sftp_realpath' => ['string|false', 'sftp'=>'resource', 'filename'=>'string'],
'ssh2_sftp_rename' => ['bool', 'sftp'=>'resource', 'from'=>'string', 'to'=>'string'],
'ssh2_sftp_rmdir' => ['bool', 'sftp'=>'resource', 'dirname'=>'string'],
'ssh2_sftp_stat' => ['array|false', 'sftp'=>'resource', 'path'=>'string'],
'ssh2_sftp_symlink' => ['bool', 'sftp'=>'resource', 'target'=>'string', 'link'=>'string'],
'ssh2_sftp_unlink' => ['bool', 'sftp'=>'resource', 'filename'=>'string'],
'ssh2_shell' => ['resource|false', 'session'=>'resource', 'term_type='=>'string', 'env='=>'array', 'width='=>'int', 'height='=>'int', 'width_height_type='=>'int'],
'ssh2_tunnel' => ['resource|false', 'session'=>'resource', 'host'=>'string', 'port'=>'int'],
'stat' => ['array|false', 'filename'=>'string'],
'stats_absolute_deviation' => ['float', 'a'=>'array'],
'stats_cdf_beta' => ['float', 'par1'=>'float', 'par2'=>'float', 'par3'=>'float', 'which'=>'int'],
'stats_cdf_binomial' => ['float', 'par1'=>'float', 'par2'=>'float', 'par3'=>'float', 'which'=>'int'],
'stats_cdf_cauchy' => ['float', 'par1'=>'float', 'par2'=>'float', 'par3'=>'float', 'which'=>'int'],
'stats_cdf_chisquare' => ['float', 'par1'=>'float', 'par2'=>'float', 'which'=>'int'],
'stats_cdf_exponential' => ['float', 'par1'=>'float', 'par2'=>'float', 'which'=>'int'],
'stats_cdf_f' => ['float', 'par1'=>'float', 'par2'=>'float', 'par3'=>'float', 'which'=>'int'],
'stats_cdf_gamma' => ['float', 'par1'=>'float', 'par2'=>'float', 'par3'=>'float', 'which'=>'int'],
'stats_cdf_laplace' => ['float', 'par1'=>'float', 'par2'=>'float', 'par3'=>'float', 'which'=>'int'],
'stats_cdf_logistic' => ['float', 'par1'=>'float', 'par2'=>'float', 'par3'=>'float', 'which'=>'int'],
'stats_cdf_negative_binomial' => ['float', 'par1'=>'float', 'par2'=>'float', 'par3'=>'float', 'which'=>'int'],
'stats_cdf_noncentral_chisquare' => ['float', 'par1'=>'float', 'par2'=>'float', 'par3'=>'float', 'which'=>'int'],
'stats_cdf_noncentral_f' => ['float', 'par1'=>'float', 'par2'=>'float', 'par3'=>'float', 'par4'=>'float', 'which'=>'int'],
'stats_cdf_noncentral_t' => ['float', 'par1'=>'float', 'par2'=>'float', 'par3'=>'float', 'which'=>'int'],
'stats_cdf_normal' => ['float', 'par1'=>'float', 'par2'=>'float', 'par3'=>'float', 'which'=>'int'],
'stats_cdf_poisson' => ['float', 'par1'=>'float', 'par2'=>'float', 'which'=>'int'],
'stats_cdf_t' => ['float', 'par1'=>'float', 'par2'=>'float', 'which'=>'int'],
'stats_cdf_uniform' => ['float', 'par1'=>'float', 'par2'=>'float', 'par3'=>'float', 'which'=>'int'],
'stats_cdf_weibull' => ['float', 'par1'=>'float', 'par2'=>'float', 'par3'=>'float', 'which'=>'int'],
'stats_covariance' => ['float', 'a'=>'array', 'b'=>'array'],
'stats_den_uniform' => ['float', 'x'=>'float', 'a'=>'float', 'b'=>'float'],
'stats_dens_beta' => ['float', 'x'=>'float', 'a'=>'float', 'b'=>'float'],
'stats_dens_cauchy' => ['float', 'x'=>'float', 'ave'=>'float', 'stdev'=>'float'],
'stats_dens_chisquare' => ['float', 'x'=>'float', 'dfr'=>'float'],
'stats_dens_exponential' => ['float', 'x'=>'float', 'scale'=>'float'],
'stats_dens_f' => ['float', 'x'=>'float', 'dfr1'=>'float', 'dfr2'=>'float'],
'stats_dens_gamma' => ['float', 'x'=>'float', 'shape'=>'float', 'scale'=>'float'],
'stats_dens_laplace' => ['float', 'x'=>'float', 'ave'=>'float', 'stdev'=>'float'],
'stats_dens_logistic' => ['float', 'x'=>'float', 'ave'=>'float', 'stdev'=>'float'],
'stats_dens_negative_binomial' => ['float', 'x'=>'float', 'n'=>'float', 'pi'=>'float'],
'stats_dens_normal' => ['float', 'x'=>'float', 'ave'=>'float', 'stdev'=>'float'],
'stats_dens_pmf_binomial' => ['float', 'x'=>'float', 'n'=>'float', 'pi'=>'float'],
'stats_dens_pmf_hypergeometric' => ['float', 'n1'=>'float', 'n2'=>'float', 'N1'=>'float', 'N2'=>'float'],
'stats_dens_pmf_negative_binomial' => ['float', 'x'=>'float', 'n'=>'float', 'pi'=>'float'],
'stats_dens_pmf_poisson' => ['float', 'x'=>'float', 'lb'=>'float'],
'stats_dens_t' => ['float', 'x'=>'float', 'dfr'=>'float'],
'stats_dens_uniform' => ['float', 'x'=>'float', 'a'=>'float', 'b'=>'float'],
'stats_dens_weibull' => ['float', 'x'=>'float', 'a'=>'float', 'b'=>'float'],
'stats_harmonic_mean' => ['float', 'a'=>'array'],
'stats_kurtosis' => ['float', 'a'=>'array'],
'stats_rand_gen_beta' => ['float', 'a'=>'float', 'b'=>'float'],
'stats_rand_gen_chisquare' => ['float', 'df'=>'float'],
'stats_rand_gen_exponential' => ['float', 'av'=>'float'],
'stats_rand_gen_f' => ['float', 'dfn'=>'float', 'dfd'=>'float'],
'stats_rand_gen_funiform' => ['float', 'low'=>'float', 'high'=>'float'],
'stats_rand_gen_gamma' => ['float', 'a'=>'float', 'r'=>'float'],
'stats_rand_gen_ibinomial' => ['int', 'n'=>'int', 'pp'=>'float'],
'stats_rand_gen_ibinomial_negative' => ['int', 'n'=>'int', 'p'=>'float'],
'stats_rand_gen_int' => ['int'],
'stats_rand_gen_ipoisson' => ['int', 'mu'=>'float'],
'stats_rand_gen_iuniform' => ['int', 'low'=>'int', 'high'=>'int'],
'stats_rand_gen_noncenral_chisquare' => ['float', 'df'=>'float', 'xnonc'=>'float'],
'stats_rand_gen_noncentral_chisquare' => ['float', 'df'=>'float', 'xnonc'=>'float'],
'stats_rand_gen_noncentral_f' => ['float', 'dfn'=>'float', 'dfd'=>'float', 'xnonc'=>'float'],
'stats_rand_gen_noncentral_t' => ['float', 'df'=>'float', 'xnonc'=>'float'],
'stats_rand_gen_normal' => ['float', 'av'=>'float', 'sd'=>'float'],
'stats_rand_gen_t' => ['float', 'df'=>'float'],
'stats_rand_get_seeds' => ['array'],
'stats_rand_phrase_to_seeds' => ['array', 'phrase'=>'string'],
'stats_rand_ranf' => ['float'],
'stats_rand_setall' => ['void', 'iseed1'=>'int', 'iseed2'=>'int'],
'stats_skew' => ['float', 'a'=>'array'],
'stats_standard_deviation' => ['float', 'a'=>'array', 'sample='=>'bool'],
'stats_stat_binomial_coef' => ['float', 'x'=>'int', 'n'=>'int'],
'stats_stat_correlation' => ['float', 'arr1'=>'array', 'arr2'=>'array'],
'stats_stat_factorial' => ['float', 'n'=>'int'],
'stats_stat_gennch' => ['float', 'n'=>'int'],
'stats_stat_independent_t' => ['float', 'arr1'=>'array', 'arr2'=>'array'],
'stats_stat_innerproduct' => ['float', 'arr1'=>'array', 'arr2'=>'array'],
'stats_stat_noncentral_t' => ['float', 'par1'=>'float', 'par2'=>'float', 'par3'=>'float', 'which'=>'int'],
'stats_stat_paired_t' => ['float', 'arr1'=>'array', 'arr2'=>'array'],
'stats_stat_percentile' => ['float', 'df'=>'float', 'xnonc'=>'float'],
'stats_stat_powersum' => ['float', 'arr'=>'array', 'power'=>'float'],
'stats_variance' => ['float', 'a'=>'array', 'sample='=>'bool'],
'Stomp::__construct' => ['void', 'broker='=>'string', 'username='=>'string', 'password='=>'string', 'headers='=>'array'],
'Stomp::__destruct' => ['bool', 'link'=>''],
'Stomp::abort' => ['bool', 'transaction_id'=>'string', 'headers='=>'array', 'link='=>''],
'Stomp::ack' => ['bool', 'msg'=>'', 'headers='=>'array', 'link='=>''],
'Stomp::begin' => ['bool', 'transaction_id'=>'string', 'headers='=>'array', 'link='=>''],
'Stomp::commit' => ['bool', 'transaction_id'=>'string', 'headers='=>'array', 'link='=>''],
'Stomp::error' => ['string', 'link'=>''],
'Stomp::getReadTimeout' => ['array', 'link'=>''],
'Stomp::getSessionId' => ['string', 'link'=>''],
'Stomp::hasFrame' => ['bool', 'link'=>''],
'Stomp::readFrame' => ['array', 'class_name='=>'string', 'link='=>''],
'Stomp::send' => ['bool', 'destination'=>'string', 'msg'=>'', 'headers='=>'array', 'link='=>''],
'Stomp::setReadTimeout' => ['', 'seconds'=>'int', 'microseconds='=>'int', 'link='=>''],
'Stomp::subscribe' => ['bool', 'destination'=>'string', 'headers='=>'array', 'link='=>''],
'Stomp::unsubscribe' => ['bool', 'destination'=>'string', 'headers='=>'array', 'link='=>''],
'stomp_abort' => ['bool', 'transaction_id'=>'string', 'headers='=>'array', 'link='=>''],
'stomp_ack' => ['bool', 'msg'=>'', 'headers='=>'array', 'link='=>''],
'stomp_begin' => ['bool', 'transaction_id'=>'string', 'headers='=>'array', 'link='=>''],
'stomp_close' => ['bool', 'link'=>''],
'stomp_commit' => ['bool', 'transaction_id'=>'string', 'headers='=>'array', 'link='=>''],
'stomp_connect' => ['resource', 'broker='=>'string', 'username='=>'string', 'password='=>'string', 'headers='=>'array'],
'stomp_connect_error' => ['string'],
'stomp_error' => ['string', 'link'=>''],
'stomp_get_read_timeout' => ['array', 'link'=>''],
'stomp_get_session_id' => ['string', 'link'=>''],
'stomp_has_frame' => ['bool', 'link'=>''],
'stomp_read_frame' => ['array', 'class_name='=>'string', 'link='=>''],
'stomp_send' => ['bool', 'destination'=>'string', 'msg'=>'', 'headers='=>'array', 'link='=>''],
'stomp_set_read_timeout' => ['', 'seconds'=>'int', 'microseconds='=>'int', 'link='=>''],
'stomp_subscribe' => ['bool', 'destination'=>'string', 'headers='=>'array', 'link='=>''],
'stomp_unsubscribe' => ['bool', 'destination'=>'string', 'headers='=>'array', 'link='=>''],
'stomp_version' => ['string'],
'StompException::getDetails' => ['string'],
'StompFrame::__construct' => ['void', 'command='=>'string', 'headers='=>'array', 'body='=>'string'],
'str_getcsv' => ['non-empty-list<?string>', 'input'=>'string', 'delimiter='=>'string', 'enclosure='=>'string', 'escape='=>'string'],
'str_ireplace' => ['string|string[]', 'search'=>'string|array', 'replace'=>'string|array', 'subject'=>'string|array', '&w_replace_count='=>'int'],
'str_pad' => ['string', 'input'=>'string', 'pad_length'=>'int', 'pad_string='=>'string', 'pad_type='=>'int'],
'str_repeat' => ['string', 'input'=>'string', 'multiplier'=>'int'],
'str_replace' => ['string|array', 'search'=>'string|array', 'replace'=>'string|array', 'subject'=>'string|array', '&w_replace_count='=>'int'],
'str_rot13' => ['string', 'str'=>'string'],
'str_shuffle' => ['string', 'str'=>'string'],
'str_split' => ['non-empty-list<string>|false', 'str'=>'string', 'split_length='=>'positive-int'],
'str_word_count' => ['array<int,string>|int|false', 'string'=>'string', 'format='=>'int', 'charlist='=>'string'],
'strcasecmp' => ['int<-1, 1>', 'str1'=>'string', 'str2'=>'string'],
'strchr' => ['string|false', 'haystack'=>'string', 'needle'=>'string', 'before_needle='=>'bool'],
'strcmp' => ['int<-1, 1>', 'str1'=>'string', 'str2'=>'string'],
'strcoll' => ['int<-1, 1>', 'str1'=>'string', 'str2'=>'string'],
'strcspn' => ['int', 'str'=>'string', 'mask'=>'string', 'start='=>'int', 'length='=>'int'],
'stream_bucket_append' => ['void', 'brigade'=>'resource', 'bucket'=>'object'],
'stream_bucket_make_writeable' => ['stdClass|null', 'brigade'=>'resource'],
'stream_bucket_new' => ['object', 'stream'=>'resource', 'buffer'=>'string'],
'stream_bucket_prepend' => ['void', 'brigade'=>'resource', 'bucket'=>'object'],
'stream_context_create' => ['resource', 'options='=>'array', 'params='=>'array'],
'stream_context_get_default' => ['resource', 'options='=>'array'],
'stream_context_get_options' => ['array', 'context'=>'resource'],
'stream_context_get_params' => ['array', 'context'=>'resource'],
'stream_context_set_default' => ['resource', 'options'=>'array'],
'stream_context_set_option' => ['bool', 'context'=>'', 'wrappername'=>'string', 'optionname'=>'string', 'value'=>''],
'stream_context_set_option\'1' => ['bool', 'context'=>'', 'options'=>'array'],
'stream_context_set_params' => ['bool', 'context'=>'resource', 'options'=>'array'],
'stream_copy_to_stream' => ['int|false', 'source'=>'resource', 'dest'=>'resource', 'maxlen='=>'int', 'pos='=>'int'],
'stream_encoding' => ['bool', 'stream'=>'resource', 'encoding='=>'string'],
'stream_filter_append' => ['resource|false', 'stream'=>'resource', 'filtername'=>'string', 'read_write='=>'int', 'filterparams='=>'array'],
'stream_filter_prepend' => ['resource|false', 'stream'=>'resource', 'filtername'=>'string', 'read_write='=>'int', 'filterparams='=>'array'],
'stream_filter_register' => ['bool', 'filtername'=>'string', 'classname'=>'string'],
'stream_filter_remove' => ['bool', 'stream_filter'=>'resource'],
'stream_get_contents' => ['string|false', 'source'=>'resource', 'maxlen='=>'int', 'offset='=>'int'],
'stream_get_filters' => ['list<string>'],
'stream_get_line' => ['string|false', 'stream'=>'resource', 'maxlen'=>'int', 'ending='=>'string'],
'stream_get_meta_data' => ['array{timed_out:bool,blocked:bool,eof:bool,unread_bytes:int,stream_type:string,wrapper_type:string,wrapper_data:mixed,mode:string,seekable:bool,uri:string,mediatype?:string,base64?:bool}', 'fp'=>'resource'],
'stream_get_transports' => ['list<string>'],
'stream_get_wrappers' => ['list<string>'],
'stream_is_local' => ['bool', 'stream'=>'resource|string'],
'stream_isatty' => ['bool', 'stream'=>'resource'],
'stream_notification_callback' => ['callback', 'notification_code'=>'int', 'severity'=>'int', 'message'=>'string', 'message_code'=>'int', 'bytes_transferred'=>'int', 'bytes_max'=>'int'],
'stream_resolve_include_path' => ['string|false', 'filename'=>'string'],
'stream_select' => ['int|false', '&rw_read_streams'=>'resource[]|null', '&rw_write_streams'=>'resource[]|null', '&rw_except_streams'=>'resource[]|null', 'tv_sec'=>'?int', 'tv_usec='=>'?int'],
'stream_set_blocking' => ['bool', 'socket'=>'resource', 'mode'=>'bool'],
'stream_set_chunk_size' => ['int|false', 'fp'=>'resource', 'chunk_size'=>'int'],
'stream_set_read_buffer' => ['int', 'fp'=>'resource', 'buffer'=>'int'],
'stream_set_timeout' => ['bool', 'stream'=>'resource', 'seconds'=>'int', 'microseconds='=>'int'],
'stream_set_write_buffer' => ['int', 'fp'=>'resource', 'buffer'=>'int'],
'stream_socket_accept' => ['resource|false', 'serverstream'=>'resource', 'timeout='=>'float', '&w_peername='=>'string'],
'stream_socket_client' => ['resource|false', 'remoteaddress'=>'string', '&w_errcode='=>'int', '&w_errstring='=>'string', 'timeout='=>'float', 'flags='=>'int', 'context='=>'resource'],
'stream_socket_enable_crypto' => ['int|bool', 'stream'=>'resource', 'enable'=>'bool', 'cryptokind='=>'int', 'sessionstream='=>'resource'],
'stream_socket_get_name' => ['string|false', 'stream'=>'resource', 'want_peer'=>'bool'],
'stream_socket_pair' => ['resource[]|false', 'domain'=>'int', 'type'=>'int', 'protocol'=>'int'],
'stream_socket_recvfrom' => ['string|false', 'stream'=>'resource', 'amount'=>'int', 'flags='=>'int', '&w_remote_addr='=>'string'],
'stream_socket_sendto' => ['int|false', 'stream'=>'resource', 'data'=>'string', 'flags='=>'int', 'target_addr='=>'string'],
'stream_socket_server' => ['resource|false', 'localaddress'=>'string', '&w_errcode='=>'int', '&w_errstring='=>'string', 'flags='=>'int', 'context='=>'resource'],
'stream_socket_shutdown' => ['bool', 'stream'=>'resource', 'how'=>'int'],
'stream_supports_lock' => ['bool', 'stream'=>'resource'],
'stream_wrapper_register' => ['bool', 'protocol'=>'string', 'classname'=>'string', 'flags='=>'int'],
'stream_wrapper_restore' => ['bool', 'protocol'=>'string'],
'stream_wrapper_unregister' => ['bool', 'protocol'=>'string'],
'streamWrapper::__construct' => ['void'],
'streamWrapper::__destruct' => [''],
'streamWrapper::dir_closedir' => ['bool'],
'streamWrapper::dir_opendir' => ['bool', 'path'=>'string', 'options'=>'int'],
'streamWrapper::dir_readdir' => ['string'],
'streamWrapper::dir_rewinddir' => ['bool'],
'streamWrapper::mkdir' => ['bool', 'path'=>'string', 'mode'=>'int', 'options'=>'int'],
'streamWrapper::rename' => ['bool', 'path_from'=>'string', 'path_to'=>'string'],
'streamWrapper::rmdir' => ['bool', 'path'=>'string', 'options'=>'int'],
'streamWrapper::stream_cast' => ['resource', 'cast_as'=>'int'],
'streamWrapper::stream_close' => ['void'],
'streamWrapper::stream_eof' => ['bool'],
'streamWrapper::stream_flush' => ['bool'],
'streamWrapper::stream_lock' => ['bool', 'operation'=>'mode'],
'streamWrapper::stream_metadata' => ['bool', 'path'=>'string', 'option'=>'int', 'value'=>'mixed'],
'streamWrapper::stream_open' => ['bool', 'path'=>'string', 'mode'=>'string', 'options'=>'int', 'opened_path'=>'string'],
'streamWrapper::stream_read' => ['string', 'count'=>'int'],
'streamWrapper::stream_seek' => ['bool', 'offset'=>'int', 'whence'=>'int'],
'streamWrapper::stream_set_option' => ['bool', 'option'=>'int', 'arg1'=>'int', 'arg2'=>'int'],
'streamWrapper::stream_stat' => ['array'],
'streamWrapper::stream_tell' => ['int'],
'streamWrapper::stream_truncate' => ['bool', 'new_size'=>'int'],
'streamWrapper::stream_write' => ['int', 'data'=>'string'],
'streamWrapper::unlink' => ['bool', 'path'=>'string'],
'streamWrapper::url_stat' => ['array', 'path'=>'string', 'flags'=>'int'],
'strftime' => ['string|false', 'format'=>'string', 'timestamp='=>'int'],
'strip_tags' => ['string', 'str'=>'string', 'allowable_tags='=>'string'],
'stripcslashes' => ['string', 'str'=>'string'],
'stripos' => ['0|positive-int|false', 'haystack'=>'string', 'needle'=>'string|int', 'offset='=>'int'],
'stripslashes' => ['string', 'str'=>'string'],
'stristr' => ['string|false', 'haystack'=>'string', 'needle'=>'mixed', 'before_needle='=>'bool'],
'strlen' => ['0|positive-int', 'string'=>'string'],
'strnatcasecmp' => ['int<-1, 1>', 's1'=>'string', 's2'=>'string'],
'strnatcmp' => ['int<-1, 1>', 's1'=>'string', 's2'=>'string'],
'strncasecmp' => ['int<-1, 1>', 'str1'=>'string', 'str2'=>'string', 'len'=>'int'],
'strncmp' => ['int<-1, 1>', 'str1'=>'string', 'str2'=>'string', 'len'=>'int'],
'strpbrk' => ['string|false', 'haystack'=>'string', 'char_list'=>'string'],
'strpos' => ['positive-int|0|false', 'haystack'=>'string', 'needle'=>'string|int', 'offset='=>'int'],
'strptime' => ['array|false', 'datestr'=>'string', 'format'=>'string'],
'strrchr' => ['string|false', 'haystack'=>'string', 'needle'=>'mixed'],
'strrev' => ['string', 'str'=>'string'],
'strripos' => ['0|positive-int|false', 'haystack'=>'string', 'needle'=>'string|int', 'offset='=>'int'],
'strrpos' => ['0|positive-int|false', 'haystack'=>'string', 'needle'=>'string|int', 'offset='=>'int'],
'strspn' => ['int', 'str'=>'string', 'mask'=>'string', 'start='=>'int', 'len='=>'int'],
'strstr' => ['string|false', 'haystack'=>'string', 'needle'=>'mixed', 'before_needle='=>'bool'],
'strtok' => ['string|false', 'str'=>'string', 'token'=>'string'],
'strtok\'1' => ['string|false', 'token'=>'string'],
'strtolower' => ['string', 'str'=>'string'],
'strtotime' => ['int|false', 'time'=>'string', 'now='=>'int'],
'strtoupper' => ['string', 'str'=>'string'],
'strtr' => ['string', 'str'=>'string', 'from'=>'string', 'to'=>'string'],
'strtr\'1' => ['string', 'str'=>'string', 'replace_pairs'=>'array'],
'strval' => ['string', 'var'=>'__stringAndStringable|int|float|bool|resource|null'],
'substr' => ['__benevolent<string|false>', 'string'=>'string', 'start'=>'int', 'length='=>'int'],
'substr_compare' => ['int<-1, 1>|false', 'main_str'=>'string', 'str'=>'string', 'offset'=>'int', 'length='=>'int', 'case_sensitivity='=>'bool'],
'substr_count' => ['0|positive-int', 'haystack'=>'string', 'needle'=>'string', 'offset='=>'int', 'length='=>'int'],
'substr_replace' => ['string|array', 'str'=>'string|array', 'repl'=>'mixed', 'start'=>'mixed', 'length='=>'mixed'],
'suhosin_encrypt_cookie' => ['string', 'name'=>'string', 'value'=>'string'],
'suhosin_get_raw_cookies' => ['array'],
'SVM::__construct' => ['void'],
'svm::crossvalidate' => ['float', 'problem'=>'array', 'number_of_folds'=>'int'],
'SVM::getOptions' => ['array'],
'SVM::setOptions' => ['bool', 'params'=>'array'],
'svm::train' => ['SVMModel', 'problem'=>'array', 'weights='=>'array'],
'SVMModel::__construct' => ['void', 'filename='=>'string'],
'SVMModel::checkProbabilityModel' => ['bool'],
'SVMModel::getLabels' => ['array'],
'SVMModel::getNrClass' => ['int'],
'SVMModel::getSvmType' => ['int'],
'SVMModel::getSvrProbability' => ['float'],
'SVMModel::load' => ['bool', 'filename'=>'string'],
'SVMModel::predict' => ['float', 'data'=>'array'],
'SVMModel::predict_probability' => ['float', 'data'=>'array'],
'SVMModel::save' => ['bool', 'filename'=>'string'],
'svn_add' => ['bool', 'path'=>'string', 'recursive='=>'bool', 'force='=>'bool'],
'svn_auth_get_parameter' => ['string', 'key'=>'string'],
'svn_auth_set_parameter' => ['void', 'key'=>'string', 'value'=>'string'],
'svn_blame' => ['array', 'repository_url'=>'string', 'revision_no='=>'int'],
'svn_cat' => ['string', 'repos_url'=>'string', 'revision_no='=>'int'],
'svn_checkout' => ['bool', 'repos'=>'string', 'targetpath'=>'string', 'revision='=>'int', 'flags='=>'int'],
'svn_cleanup' => ['bool', 'workingdir'=>'string'],
'svn_client_version' => ['string'],
'svn_commit' => ['array', 'log'=>'string', 'targets'=>'array', 'dontrecurse='=>'bool'],
'svn_delete' => ['bool', 'path'=>'string', 'force='=>'bool'],
'svn_diff' => ['array', 'path1'=>'string', 'rev1'=>'int', 'path2'=>'string', 'rev2'=>'int'],
'svn_export' => ['bool', 'frompath'=>'string', 'topath'=>'string', 'working_copy='=>'bool', 'revision_no='=>'int'],
'svn_fs_abort_txn' => ['bool', 'txn'=>'resource'],
'svn_fs_apply_text' => ['resource', 'root'=>'resource', 'path'=>'string'],
'svn_fs_begin_txn2' => ['resource', 'repos'=>'resource', 'rev'=>'int'],
'svn_fs_change_node_prop' => ['bool', 'root'=>'resource', 'path'=>'string', 'name'=>'string', 'value'=>'string'],
'svn_fs_check_path' => ['int', 'fsroot'=>'resource', 'path'=>'string'],
'svn_fs_contents_changed' => ['bool', 'root1'=>'resource', 'path1'=>'string', 'root2'=>'resource', 'path2'=>'string'],
'svn_fs_copy' => ['bool', 'from_root'=>'resource', 'from_path'=>'string', 'to_root'=>'resource', 'to_path'=>'string'],
'svn_fs_delete' => ['bool', 'root'=>'resource', 'path'=>'string'],
'svn_fs_dir_entries' => ['array', 'fsroot'=>'resource', 'path'=>'string'],
'svn_fs_file_contents' => ['resource', 'fsroot'=>'resource', 'path'=>'string'],
'svn_fs_file_length' => ['int', 'fsroot'=>'resource', 'path'=>'string'],
'svn_fs_is_dir' => ['bool', 'root'=>'resource', 'path'=>'string'],
'svn_fs_is_file' => ['bool', 'root'=>'resource', 'path'=>'string'],
'svn_fs_make_dir' => ['bool', 'root'=>'resource', 'path'=>'string'],
'svn_fs_make_file' => ['bool', 'root'=>'resource', 'path'=>'string'],
'svn_fs_node_created_rev' => ['int', 'fsroot'=>'resource', 'path'=>'string'],
'svn_fs_node_prop' => ['string', 'fsroot'=>'resource', 'path'=>'string', 'propname'=>'string'],
'svn_fs_props_changed' => ['bool', 'root1'=>'resource', 'path1'=>'string', 'root2'=>'resource', 'path2'=>'string'],
'svn_fs_revision_prop' => ['string', 'fs'=>'resource', 'revnum'=>'int', 'propname'=>'string'],
'svn_fs_revision_root' => ['resource', 'fs'=>'resource', 'revnum'=>'int'],
'svn_fs_txn_root' => ['resource', 'txn'=>'resource'],
'svn_fs_youngest_rev' => ['int', 'fs'=>'resource'],
'svn_import' => ['bool', 'path'=>'string', 'url'=>'string', 'nonrecursive'=>'bool'],
'svn_log' => ['array', 'repos_url'=>'string', 'start_revision='=>'int', 'end_revision='=>'int', 'limit='=>'int', 'flags='=>'int'],
'svn_ls' => ['array', 'repos_url'=>'string', 'revision_no='=>'int', 'recurse='=>'bool', 'peg='=>'bool'],
'svn_mkdir' => ['bool', 'path'=>'string', 'log_message='=>'string'],
'svn_move' => ['mixed', 'src_path'=>'string', 'dst_path'=>'string', 'force='=>'bool|false'],
'svn_propget' => ['mixed', 'path'=>'string', 'property_name'=>'string', 'recurse='=>'bool|false', 'revision='=>'int'],
'svn_proplist' => ['mixed', 'path'=>'string', 'recurse='=>'bool|false', 'revision='=>'int'],
'svn_repos_create' => ['resource', 'path'=>'string', 'config='=>'array', 'fsconfig='=>'array'],
'svn_repos_fs' => ['resource', 'repos'=>'resource'],
'svn_repos_fs_begin_txn_for_commit' => ['resource', 'repos'=>'resource', 'rev'=>'int', 'author'=>'string', 'log_msg'=>'string'],
'svn_repos_fs_commit_txn' => ['int', 'txn'=>'resource'],
'svn_repos_hotcopy' => ['bool', 'repospath'=>'string', 'destpath'=>'string', 'cleanlogs'=>'bool'],
'svn_repos_open' => ['resource', 'path'=>'string'],
'svn_repos_recover' => ['bool', 'path'=>'string'],
'svn_revert' => ['bool', 'path'=>'string', 'recursive='=>'bool'],
'svn_status' => ['array', 'path'=>'string', 'flags='=>'int'],
'svn_update' => ['int', 'path'=>'string', 'revno='=>'int', 'recurse='=>'bool'],
'swf_actiongeturl' => ['', 'url'=>'string', 'target'=>'string'],
'swf_actiongotoframe' => ['', 'framenumber'=>'int'],
'swf_actiongotolabel' => ['', 'label'=>'string'],
'swf_actionnextframe' => [''],
'swf_actionplay' => [''],
'swf_actionprevframe' => [''],
'swf_actionsettarget' => ['', 'target'=>'string'],
'swf_actionstop' => [''],
'swf_actiontogglequality' => [''],
'swf_actionwaitforframe' => ['', 'framenumber'=>'int', 'skipcount'=>'int'],
'swf_addbuttonrecord' => ['', 'states'=>'int', 'shapeid'=>'int', 'depth'=>'int'],
'swf_addcolor' => ['', 'r'=>'float', 'g'=>'float', 'b'=>'float', 'a'=>'float'],
'swf_closefile' => ['', 'return_file='=>'int'],
'swf_definebitmap' => ['', 'objid'=>'int', 'image_name'=>'string'],
'swf_definefont' => ['', 'fontid'=>'int', 'fontname'=>'string'],
'swf_defineline' => ['', 'objid'=>'int', 'x1'=>'float', 'y1'=>'float', 'x2'=>'float', 'y2'=>'float', 'width'=>'float'],
'swf_definepoly' => ['', 'objid'=>'int', 'coords'=>'array', 'npoints'=>'int', 'width'=>'float'],
'swf_definerect' => ['', 'objid'=>'int', 'x1'=>'float', 'y1'=>'float', 'x2'=>'float', 'y2'=>'float', 'width'=>'float'],
'swf_definetext' => ['', 'objid'=>'int', 'str'=>'string', 'docenter'=>'int'],
'swf_endbutton' => [''],
'swf_enddoaction' => [''],
'swf_endshape' => [''],
'swf_endsymbol' => [''],
'swf_fontsize' => ['', 'size'=>'float'],
'swf_fontslant' => ['', 'slant'=>'float'],
'swf_fonttracking' => ['', 'tracking'=>'float'],
'swf_getbitmapinfo' => ['array', 'bitmapid'=>'int'],
'swf_getfontinfo' => ['array'],
'swf_getframe' => ['int'],
'swf_labelframe' => ['', 'name'=>'string'],
'swf_lookat' => ['', 'view_x'=>'float', 'view_y'=>'float', 'view_z'=>'float', 'reference_x'=>'float', 'reference_y'=>'float', 'reference_z'=>'float', 'twist'=>'float'],
'swf_modifyobject' => ['', 'depth'=>'int', 'how'=>'int'],
'swf_mulcolor' => ['', 'r'=>'float', 'g'=>'float', 'b'=>'float', 'a'=>'float'],
'swf_nextid' => ['int'],
'swf_oncondition' => ['', 'transition'=>'int'],
'swf_openfile' => ['', 'filename'=>'string', 'width'=>'float', 'height'=>'float', 'framerate'=>'float', 'r'=>'float', 'g'=>'float', 'b'=>'float'],
'swf_ortho' => ['', 'xmin'=>'float', 'xmax'=>'float', 'ymin'=>'float', 'ymax'=>'float', 'zmin'=>'float', 'zmax'=>'float'],
'swf_ortho2' => ['', 'xmin'=>'float', 'xmax'=>'float', 'ymin'=>'float', 'ymax'=>'float'],
'swf_perspective' => ['', 'fovy'=>'float', 'aspect'=>'float', 'near'=>'float', 'far'=>'float'],
'swf_placeobject' => ['', 'objid'=>'int', 'depth'=>'int'],
'swf_polarview' => ['', 'dist'=>'float', 'azimuth'=>'float', 'incidence'=>'float', 'twist'=>'float'],
'swf_popmatrix' => [''],
'swf_posround' => ['', 'round'=>'int'],
'swf_pushmatrix' => [''],
'swf_removeobject' => ['', 'depth'=>'int'],
'swf_rotate' => ['', 'angle'=>'float', 'axis'=>'string'],
'swf_scale' => ['', 'x'=>'float', 'y'=>'float', 'z'=>'float'],
'swf_setfont' => ['', 'fontid'=>'int'],
'swf_setframe' => ['', 'framenumber'=>'int'],
'swf_shapearc' => ['', 'x'=>'float', 'y'=>'float', 'r'=>'float', 'ang1'=>'float', 'ang2'=>'float'],
'swf_shapecurveto' => ['', 'x1'=>'float', 'y1'=>'float', 'x2'=>'float', 'y2'=>'float'],
'swf_shapecurveto3' => ['', 'x1'=>'float', 'y1'=>'float', 'x2'=>'float', 'y2'=>'float', 'x3'=>'float', 'y3'=>'float'],
'swf_shapefillbitmapclip' => ['', 'bitmapid'=>'int'],
'swf_shapefillbitmaptile' => ['', 'bitmapid'=>'int'],
'swf_shapefilloff' => [''],
'swf_shapefillsolid' => ['', 'r'=>'float', 'g'=>'float', 'b'=>'float', 'a'=>'float'],
'swf_shapelinesolid' => ['', 'r'=>'float', 'g'=>'float', 'b'=>'float', 'a'=>'float', 'width'=>'float'],
'swf_shapelineto' => ['', 'x'=>'float', 'y'=>'float'],
'swf_shapemoveto' => ['', 'x'=>'float', 'y'=>'float'],
'swf_showframe' => [''],
'swf_startbutton' => ['', 'objid'=>'int', 'type'=>'int'],
'swf_startdoaction' => [''],
'swf_startshape' => ['', 'objid'=>'int'],
'swf_startsymbol' => ['', 'objid'=>'int'],
'swf_textwidth' => ['float', 'str'=>'string'],
'swf_translate' => ['', 'x'=>'float', 'y'=>'float', 'z'=>'float'],
'swf_viewport' => ['', 'xmin'=>'float', 'xmax'=>'float', 'ymin'=>'float', 'ymax'=>'float'],
'SWFAction::__construct' => ['void', 'script'=>'string'],
'SWFBitmap::__construct' => ['void', 'file'=>'', 'alphafile='=>''],
'SWFBitmap::getHeight' => ['float'],
'SWFBitmap::getWidth' => ['float'],
'SWFButton::__construct' => ['void'],
'SWFButton::addAction' => ['void', 'action'=>'swfaction', 'flags'=>'int'],
'SWFButton::addASound' => ['SWFSoundInstance', 'sound'=>'swfsound', 'flags'=>'int'],
'SWFButton::addShape' => ['void', 'shape'=>'swfshape', 'flags'=>'int'],
'SWFButton::setAction' => ['void', 'action'=>'swfaction'],
'SWFButton::setDown' => ['void', 'shape'=>'swfshape'],
'SWFButton::setHit' => ['void', 'shape'=>'swfshape'],
'SWFButton::setMenu' => ['void', 'flag'=>'int'],
'SWFButton::setOver' => ['void', 'shape'=>'swfshape'],
'SWFButton::setUp' => ['void', 'shape'=>'swfshape'],
'SWFDisplayItem::addAction' => ['void', 'action'=>'swfaction', 'flags'=>'int'],
'SWFDisplayItem::addColor' => ['void', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'a='=>'int'],
'SWFDisplayItem::endMask' => ['void'],
'SWFDisplayItem::getRot' => ['float'],
'SWFDisplayItem::getX' => ['float'],
'SWFDisplayItem::getXScale' => ['float'],
'SWFDisplayItem::getXSkew' => ['float'],
'SWFDisplayItem::getY' => ['float'],
'SWFDisplayItem::getYScale' => ['float'],
'SWFDisplayItem::getYSkew' => ['float'],
'SWFDisplayItem::move' => ['void', 'dx'=>'float', 'dy'=>'float'],
'SWFDisplayItem::moveTo' => ['void', 'x'=>'float', 'y'=>'float'],
'SWFDisplayItem::multColor' => ['void', 'red'=>'float', 'green'=>'float', 'blue'=>'float', 'a='=>'float'],
'SWFDisplayItem::remove' => ['void'],
'SWFDisplayItem::rotate' => ['void', 'angle'=>'float'],
'SWFDisplayItem::rotateTo' => ['void', 'angle'=>'float'],
'SWFDisplayItem::scale' => ['void', 'dx'=>'float', 'dy'=>'float'],
'SWFDisplayItem::scaleTo' => ['void', 'x'=>'float', 'y='=>'float'],
'SWFDisplayItem::setDepth' => ['void', 'depth'=>'int'],
'SWFDisplayItem::setMaskLevel' => ['void', 'level'=>'int'],
'SWFDisplayItem::setMatrix' => ['void', 'a'=>'float', 'b'=>'float', 'c'=>'float', 'd'=>'float', 'x'=>'float', 'y'=>'float'],
'SWFDisplayItem::setName' => ['void', 'name'=>'string'],
'SWFDisplayItem::setRatio' => ['void', 'ratio'=>'float'],
'SWFDisplayItem::skewX' => ['void', 'ddegrees'=>'float'],
'SWFDisplayItem::skewXTo' => ['void', 'degrees'=>'float'],
'SWFDisplayItem::skewY' => ['void', 'ddegrees'=>'float'],
'SWFDisplayItem::skewYTo' => ['void', 'degrees'=>'float'],
'SWFFill::moveTo' => ['void', 'x'=>'float', 'y'=>'float'],
'SWFFill::rotateTo' => ['void', 'angle'=>'float'],
'SWFFill::scaleTo' => ['void', 'x'=>'float', 'y='=>'float'],
'SWFFill::skewXTo' => ['void', 'x'=>'float'],
'SWFFill::skewYTo' => ['void', 'y'=>'float'],
'SWFFont::__construct' => ['void', 'filename'=>'string'],
'SWFFont::getAscent' => ['float'],
'SWFFont::getDescent' => ['float'],
'SWFFont::getLeading' => ['float'],
'SWFFont::getShape' => ['string', 'code'=>'int'],
'SWFFont::getUTF8Width' => ['float', 'string'=>'string'],
'SWFFont::getWidth' => ['float', 'string'=>'string'],
'SWFFontChar::addChars' => ['void', 'char'=>'string'],
'SWFFontChar::addUTF8Chars' => ['void', 'char'=>'string'],
'SWFGradient::__construct' => ['void'],
'SWFGradient::addEntry' => ['void', 'ratio'=>'float', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'alpha='=>'int'],
'SWFMorph::__construct' => ['void'],
'SWFMorph::getShape1' => ['SWFShape'],
'SWFMorph::getShape2' => ['SWFShape'],
'SWFMovie::__construct' => ['void', 'version='=>'int'],
'SWFMovie::add' => ['mixed', 'instance'=>'object'],
'SWFMovie::addExport' => ['void', 'char'=>'swfcharacter', 'name'=>'string'],
'SWFMovie::addFont' => ['mixed', 'font'=>'swffont'],
'SWFMovie::importChar' => ['SWFSprite', 'libswf'=>'string', 'name'=>'string'],
'SWFMovie::importFont' => ['SWFFontChar', 'libswf'=>'string', 'name'=>'string'],
'SWFMovie::labelFrame' => ['void', 'label'=>'string'],
'SWFMovie::nextFrame' => ['void'],
'SWFMovie::output' => ['int', 'compression='=>'int'],
'SWFMovie::remove' => ['void', 'instance'=>'object'],
'SWFMovie::save' => ['int', 'filename'=>'string', 'compression='=>'int'],
'SWFMovie::saveToFile' => ['int', 'x'=>'resource', 'compression='=>'int'],
'SWFMovie::setbackground' => ['void', 'red'=>'int', 'green'=>'int', 'blue'=>'int'],
'SWFMovie::setDimension' => ['void', 'width'=>'float', 'height'=>'float'],
'SWFMovie::setFrames' => ['void', 'number'=>'int'],
'SWFMovie::setRate' => ['void', 'rate'=>'float'],
'SWFMovie::startSound' => ['SWFSoundInstance', 'sound'=>'swfsound'],
'SWFMovie::stopSound' => ['void', 'sound'=>'swfsound'],
'SWFMovie::streamMP3' => ['int', 'mp3file'=>'mixed', 'skip='=>'float'],
'SWFMovie::writeExports' => ['void'],
'SWFPrebuiltClip::__construct' => ['void', 'file'=>''],
'SWFShape::__construct' => ['void'],
'SWFShape::addFill' => ['SWFFill', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'alpha='=>'int', 'bitmap='=>'swfbitmap', 'flags='=>'int', 'gradient='=>'swfgradient'],
'SWFShape::addFill\'1' => ['SWFFill', 'bitmap'=>'SWFBitmap', 'flags='=>'int'],
'SWFShape::addFill\'2' => ['SWFFill', 'gradient'=>'SWFGradient', 'flags='=>'int'],
'SWFShape::drawArc' => ['void', 'r'=>'float', 'startangle'=>'float', 'endangle'=>'float'],
'SWFShape::drawCircle' => ['void', 'r'=>'float'],
'SWFShape::drawCubic' => ['int', 'bx'=>'float', 'by'=>'float', 'cx'=>'float', 'cy'=>'float', 'dx'=>'float', 'dy'=>'float'],
'SWFShape::drawCubicTo' => ['int', 'bx'=>'float', 'by'=>'float', 'cx'=>'float', 'cy'=>'float', 'dx'=>'float', 'dy'=>'float'],
'SWFShape::drawCurve' => ['int', 'controldx'=>'float', 'controldy'=>'float', 'anchordx'=>'float', 'anchordy'=>'float', 'targetdx='=>'float', 'targetdy='=>'float'],
'SWFShape::drawCurveTo' => ['int', 'controlx'=>'float', 'controly'=>'float', 'anchorx'=>'float', 'anchory'=>'float', 'targetx='=>'float', 'targety='=>'float'],
'SWFShape::drawGlyph' => ['void', 'font'=>'swffont', 'character'=>'string', 'size='=>'int'],
'SWFShape::drawLine' => ['void', 'dx'=>'float', 'dy'=>'float'],
'SWFShape::drawLineTo' => ['void', 'x'=>'float', 'y'=>'float'],
'SWFShape::movePen' => ['void', 'dx'=>'float', 'dy'=>'float'],
'SWFShape::movePenTo' => ['void', 'x'=>'float', 'y'=>'float'],
'SWFShape::setLeftFill' => ['', 'fill'=>'swfgradient', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'a='=>'int'],
'SWFShape::setLine' => ['', 'shape'=>'swfshape', 'width'=>'int', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'a='=>'int'],
'SWFShape::setRightFill' => ['', 'fill'=>'swfgradient', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'a='=>'int'],
'SWFSound' => ['SWFSound', 'filename'=>'string', 'flags='=>'int'],
'SWFSound::__construct' => ['void', 'filename'=>'string', 'flags='=>'int'],
'SWFSoundInstance::loopCount' => ['void', 'point'=>'int'],
'SWFSoundInstance::loopInPoint' => ['void', 'point'=>'int'],
'SWFSoundInstance::loopOutPoint' => ['void', 'point'=>'int'],
'SWFSoundInstance::noMultiple' => ['void'],
'SWFSprite::__construct' => ['void'],
'SWFSprite::add' => ['void', 'object'=>'object'],
'SWFSprite::labelFrame' => ['void', 'label'=>'string'],
'SWFSprite::nextFrame' => ['void'],
'SWFSprite::remove' => ['void', 'object'=>'object'],
'SWFSprite::setFrames' => ['void', 'number'=>'int'],
'SWFSprite::startSound' => ['SWFSoundInstance', 'sount'=>'swfsound'],
'SWFSprite::stopSound' => ['void', 'sount'=>'swfsound'],
'SWFText::__construct' => ['void'],
'SWFText::addString' => ['void', 'string'=>'string'],
'SWFText::addUTF8String' => ['void', 'text'=>'string'],
'SWFText::getAscent' => ['float'],
'SWFText::getDescent' => ['float'],
'SWFText::getLeading' => ['float'],
'SWFText::getUTF8Width' => ['float', 'string'=>'string'],
'SWFText::getWidth' => ['float', 'string'=>'string'],
'SWFText::moveTo' => ['void', 'x'=>'float', 'y'=>'float'],
'SWFText::setColor' => ['void', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'a='=>'int'],
'SWFText::setFont' => ['void', 'font'=>'swffont'],
'SWFText::setHeight' => ['void', 'height'=>'float'],
'SWFText::setSpacing' => ['void', 'spacing'=>'float'],
'SWFTextField::__construct' => ['void', 'flags='=>'int'],
'SWFTextField::addChars' => ['void', 'chars'=>'string'],
'SWFTextField::addString' => ['void', 'string'=>'string'],
'SWFTextField::align' => ['void', 'alignement'=>'int'],
'SWFTextField::setBounds' => ['void', 'width'=>'float', 'height'=>'float'],
'SWFTextField::setColor' => ['void', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'a='=>'int'],
'SWFTextField::setFont' => ['void', 'font'=>'swffont'],
'SWFTextField::setHeight' => ['void', 'height'=>'float'],
'SWFTextField::setIndentation' => ['void', 'width'=>'float'],
'SWFTextField::setLeftMargin' => ['void', 'width'=>'float'],
'SWFTextField::setLineSpacing' => ['void', 'height'=>'float'],
'SWFTextField::setMargins' => ['void', 'left'=>'float', 'right'=>'float'],
'SWFTextField::setName' => ['void', 'name'=>'string'],
'SWFTextField::setPadding' => ['void', 'padding'=>'float'],
'SWFTextField::setRightMargin' => ['void', 'width'=>'float'],
'SWFVideoStream::__construct' => ['void', 'file='=>'string'],
'SWFVideoStream::getNumFrames' => ['int'],
'SWFVideoStream::setDimension' => ['void', 'x'=>'int', 'y'=>'int'],
'Swish::__construct' => ['void', 'index_names'=>'string'],
'Swish::getMetaList' => ['array', 'index_name'=>'string'],
'Swish::getPropertyList' => ['array', 'index_name'=>'string'],
'Swish::prepare' => ['object', 'query='=>'string'],
'Swish::query' => ['object', 'query'=>'string'],
'SwishResult::getMetaList' => ['array'],
'SwishResult::stem' => ['array', 'word'=>'string'],
'SwishResults::getParsedWords' => ['array', 'index_name'=>'string'],
'SwishResults::getRemovedStopwords' => ['array', 'index_name'=>'string'],
'SwishResults::nextResult' => ['object'],
'SwishResults::seekResult' => ['int', 'position'=>'int'],
'SwishSearch::execute' => ['object', 'query='=>'string'],
'SwishSearch::resetLimit' => [''],
'SwishSearch::setLimit' => ['', 'property'=>'string', 'low'=>'string', 'high'=>'string'],
'SwishSearch::setPhraseDelimiter' => ['', 'delimiter'=>'string'],
'SwishSearch::setSort' => ['', 'sort'=>'string'],
'SwishSearch::setStructure' => ['', 'structure'=>'int'],
'swoole_async_dns_lookup' => ['bool', 'hostname'=>'string', 'callback'=>'callable'],
'swoole_async_read' => ['bool', 'filename'=>'string', 'callback'=>'callable', 'chunk_size='=>'int', 'offset='=>'int'],
'swoole_async_readfile' => ['bool', 'filename'=>'string', 'callback'=>'string'],
'swoole_async_set' => ['void', 'settings'=>'array'],
'swoole_async_write' => ['bool', 'filename'=>'string', 'content'=>'string', 'offset='=>'int', 'callback='=>'callable'],
'swoole_async_writefile' => ['bool', 'filename'=>'string', 'content'=>'string', 'callback='=>'callable', 'flags='=>'int'],
'swoole_client_select' => ['int', 'read_array'=>'array', 'write_array'=>'array', 'error_array'=>'array', 'timeout='=>'float'],
'swoole_cpu_num' => ['int'],
'swoole_errno' => ['int'],
'swoole_event_add' => ['int', 'fd'=>'int', 'read_callback='=>'callable', 'write_callback='=>'callable', 'events='=>'int'],
'swoole_event_defer' => ['bool', 'callback'=>'callable'],
'swoole_event_del' => ['bool', 'fd'=>'int'],
'swoole_event_exit' => ['void'],
'swoole_event_set' => ['bool', 'fd'=>'int', 'read_callback='=>'callable', 'write_callback='=>'callable', 'events='=>'int'],
'swoole_event_wait' => ['void'],
'swoole_event_write' => ['bool', 'fd'=>'int', 'data'=>'string'],
'swoole_get_local_ip' => ['array'],
'swoole_last_error' => ['int'],
'swoole_load_module' => ['mixed', 'filename'=>'string'],
'swoole_select' => ['int', 'read_array'=>'array', 'write_array'=>'array', 'error_array'=>'array', 'timeout='=>'float'],
'swoole_set_process_name' => ['void', 'process_name'=>'string', 'size='=>'int'],
'swoole_strerror' => ['string', 'errno'=>'int', 'error_type='=>'int'],
'swoole_timer_after' => ['int', 'ms'=>'int', 'callback'=>'callable', 'param='=>'mixed'],
'swoole_timer_exists' => ['bool', 'timer_id'=>'int'],
'swoole_timer_tick' => ['int', 'ms'=>'int', 'callback'=>'callable', 'param='=>'mixed'],
'swoole_version' => ['string'],
'sybase_affected_rows' => ['int', 'link_identifier='=>'resource'],
'sybase_close' => ['bool', 'link_identifier='=>'resource'],
'sybase_connect' => ['resource', 'servername='=>'string', 'username='=>'string', 'password='=>'string', 'charset='=>'string', 'appname='=>'string', 'new='=>'bool'],
'sybase_data_seek' => ['bool', 'result_identifier'=>'resource', 'row_number'=>'int'],
'sybase_deadlock_retry_count' => ['void', 'retry_count'=>'int'],
'sybase_fetch_array' => ['array', 'result'=>'resource'],
'sybase_fetch_assoc' => ['array', 'result'=>'resource'],
'sybase_fetch_field' => ['object', 'result'=>'resource', 'field_offset='=>'int'],
'sybase_fetch_object' => ['object', 'result'=>'resource', 'object='=>'mixed'],
'sybase_fetch_row' => ['array|false', 'result'=>'resource'],
'sybase_field_seek' => ['bool', 'result'=>'resource', 'field_offset'=>'int'],
'sybase_free_result' => ['bool', 'result'=>'resource'],
'sybase_get_last_message' => ['string'],
'sybase_min_client_severity' => ['void', 'severity'=>'int'],
'sybase_min_error_severity' => ['void', 'severity'=>'int'],
'sybase_min_message_severity' => ['void', 'severity'=>'int'],
'sybase_min_server_severity' => ['void', 'severity'=>'int'],
'sybase_num_fields' => ['int', 'result'=>'resource'],
'sybase_num_rows' => ['int', 'result'=>'resource'],
'sybase_pconnect' => ['resource|false', 'servername='=>'string', 'username='=>'string', 'password='=>'string', 'charset='=>'string', 'appname='=>'string'],
'sybase_query' => ['mixed', 'query'=>'string', 'link_identifier='=>'resource'],
'sybase_result' => ['string', 'result'=>'resource', 'row'=>'int', 'field'=>'mixed'],
'sybase_select_db' => ['bool', 'database_name'=>'string', 'link_identifier='=>'resource'],
'sybase_set_message_handler' => ['bool', 'handler'=>'callable', 'connection='=>'resource'],
'sybase_unbuffered_query' => ['resource|false', 'query'=>'string', 'link_identifier'=>'resource', 'store_result='=>'bool'],
'symbolObj::__construct' => ['void', 'map'=>'mapObj', 'symbolname'=>'string'],
'symbolObj::free' => ['void'],
'symbolObj::getPatternArray' => ['array'],
'symbolObj::getPointsArray' => ['array'],
'symbolObj::ms_newSymbolObj' => ['int', 'map'=>'mapObj', 'symbolname'=>'string'],
'symbolObj::set' => ['int', 'property_name'=>'string', 'new_value'=>''],
'symbolObj::setImagePath' => ['int', 'filename'=>'string'],
'symbolObj::setPattern' => ['int', 'int'=>'array'],
'symbolObj::setPoints' => ['int', 'double'=>'array'],
'symlink' => ['bool', 'target'=>'string', 'link'=>'string'],
'SyncEvent::__construct' => ['void', 'name='=>'string', 'manual='=>'bool'],
'SyncEvent::fire' => ['bool'],
'SyncEvent::reset' => ['bool'],
'SyncEvent::wait' => ['bool', 'wait='=>'int'],
'SyncMutex::__construct' => ['void', 'name='=>'string'],
'SyncMutex::lock' => ['bool', 'wait='=>'int'],
'SyncMutex::unlock' => ['bool', 'all='=>'bool'],
'SyncReaderWriter::__construct' => ['void', 'name='=>'string', 'autounlock='=>'bool'],
'SyncReaderWriter::readlock' => ['bool', 'wait='=>'int'],
'SyncReaderWriter::readunlock' => ['bool'],
'SyncReaderWriter::writelock' => ['bool', 'wait='=>'int'],
'SyncReaderWriter::writeunlock' => ['bool'],
'SyncSemaphore::__construct' => ['void', 'name='=>'string', 'initialval='=>'int', 'autounlock='=>'bool'],
'SyncSemaphore::lock' => ['bool', 'wait='=>'int'],
'SyncSemaphore::unlock' => ['bool', '&w_prevcount='=>'int'],
'SyncSharedMemory::__construct' => ['void', 'name'=>'string', 'size'=>'int'],
'SyncSharedMemory::first' => ['bool'],
'SyncSharedMemory::read' => ['', 'start='=>'int', 'length='=>'int'],
'SyncSharedMemory::size' => ['bool'],
'SyncSharedMemory::write' => ['', 'string='=>'string', 'start='=>'int'],
'sys_get_temp_dir' => ['string'],
'sys_getloadavg' => ['array|false'],
'syslog' => ['bool', 'priority'=>'int', 'message'=>'string'],
'system' => ['string|false', 'command'=>'string', '&w_return_value='=>'int'],
'taint' => ['bool', '&rw_string'=>'string', '&...w_other_strings='=>'string'],
'tan' => ['float', 'number'=>'float'],
'tanh' => ['float', 'number'=>'float'],
'tcpwrap_check' => ['bool', 'daemon'=>'string', 'address'=>'string', 'user='=>'string', 'nodns='=>'bool'],
'tempnam' => ['string|false', 'dir'=>'string', 'prefix'=>'string'],
'textdomain' => ['string', 'domain'=>'string'],
'Thread::__construct' => ['void'],
'Thread::chunk' => ['array', 'size'=>'int', 'preserve'=>'bool'],
'Thread::count' => ['0|positive-int'],
'Thread::getCreatorId' => ['int'],
'Thread::getCurrentThread' => ['Thread|null'],
'Thread::getCurrentThreadId' => ['int'],
'Thread::getThreadId' => ['int'],
'Thread::isJoined' => ['bool'],
'Thread::isRunning' => ['bool'],
'Thread::isStarted' => ['bool'],
'Thread::isTerminated' => ['bool'],
'Thread::join' => ['bool'],
'Thread::merge' => ['bool', 'from'=>'', 'overwrite='=>'mixed'],
'Thread::notify' => ['bool'],
'Thread::notifyOne' => ['bool'],
'Thread::offsetExists' => ['bool', 'offset'=>'mixed'],
'Thread::offsetGet' => ['mixed', 'offset'=>'mixed'],
'Thread::offsetSet' => ['void', 'offset'=>'mixed', 'value'=>'mixed'],
'Thread::offsetUnset' => ['void', 'offset'=>'mixed'],
'Thread::pop' => ['bool'],
'Thread::run' => ['void'],
'Thread::shift' => ['bool'],
'Thread::start' => ['bool', 'options='=>'int'],
'Thread::synchronized' => ['mixed', 'block'=>'Closure', '_='=>'mixed'],
'Thread::wait' => ['bool', 'timeout='=>'int'],
'Threaded::__construct' => ['void'],
'Threaded::chunk' => ['array', 'size'=>'int', 'preserve'=>'bool'],
'Threaded::count' => ['0|positive-int'],
'Threaded::extend' => ['bool', 'class'=>'string'],
'Threaded::isRunning' => ['bool'],
'Threaded::isTerminated' => ['bool'],
'Threaded::merge' => ['bool', 'from'=>'mixed', 'overwrite='=>'bool'],
'Threaded::notify' => ['bool'],
'Threaded::notifyOne' => ['bool'],
'Threaded::offsetExists' => ['bool', 'offset'=>'mixed'],
'Threaded::offsetGet' => ['mixed', 'offset'=>'mixed'],
'Threaded::offsetSet' => ['void', 'offset'=>'mixed', 'value'=>'mixed'],
'Threaded::offsetUnset' => ['void', 'offset'=>'mixed'],
'Threaded::pop' => ['bool'],
'Threaded::run' => ['void'],
'Threaded::shift' => ['mixed'],
'Threaded::synchronized' => ['mixed', 'block'=>'Closure', '...args='=>'mixed'],
'Threaded::wait' => ['bool', 'timeout='=>'int'],
'Throwable::__toString' => ['string'],
'Throwable::getCode' => ['mixed'],
'Throwable::getFile' => ['string'],
'Throwable::getLine' => ['int'],
'Throwable::getMessage' => ['string'],
'Throwable::getPrevious' => ['Throwable|null'],
'Throwable::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'Throwable::getTraceAsString' => ['string'],
'tidy::__construct' => ['void', 'filename='=>'string', 'config='=>'', 'encoding='=>'string', 'use_include_path='=>'bool'],
'tidy::body' => ['tidyNode'],
'tidy::cleanRepair' => ['bool'],
'tidy::diagnose' => ['bool'],
'tidy::getConfig' => ['array'],
'tidy::getHtmlVer' => ['int'],
'tidy::getOpt' => ['', 'option'=>'string'],
'tidy::getOptDoc' => ['string', 'optname'=>'string'],
'tidy::getRelease' => ['string'],
'tidy::getStatus' => ['int'],
'tidy::head' => ['tidyNode'],
'tidy::html' => ['tidyNode'],
'tidy::htmlver' => ['int'],
'tidy::isXhtml' => ['bool'],
'tidy::isXml' => ['bool'],
'tidy::parseFile' => ['bool', 'filename'=>'string', 'config='=>'mixed', 'encoding='=>'string', 'use_include_path='=>'bool'],
'tidy::parseString' => ['bool', 'input'=>'string', 'config='=>'mixed', 'encoding='=>'string'],
'tidy::repairFile' => ['string', 'filename'=>'string', 'config='=>'mixed', 'encoding='=>'string', 'use_include_path='=>'bool'],
'tidy::repairString' => ['string', 'data'=>'string', 'config='=>'mixed', 'encoding='=>'string'],
'tidy::root' => ['tidyNode'],
'tidy_access_count' => ['int', 'obj'=>'tidy'],
'tidy_clean_repair' => ['bool', 'obj'=>'tidy'],
'tidy_config_count' => ['int', 'obj'=>'tidy'],
'tidy_diagnose' => ['bool', 'obj'=>'tidy'],
'tidy_error_count' => ['int', 'obj'=>'tidy'],
'tidy_get_body' => ['tidyNode', 'obj'=>'tidy'],
'tidy_get_config' => ['array', 'obj'=>'tidy'],
'tidy_get_error_buffer' => ['string|false', 'obj'=>'tidy'],
'tidy_get_head' => ['tidyNode', 'obj'=>'tidy'],
'tidy_get_html' => ['tidyNode', 'obj'=>'tidy'],
'tidy_get_html_ver' => ['int', 'obj'=>'tidy'],
'tidy_get_opt_doc' => ['string|false', 'obj'=>'tidy', 'optname'=>'string'],
'tidy_get_output' => ['string', 'obj'=>'tidy'],
'tidy_get_release' => ['string'],
'tidy_get_root' => ['tidyNode', 'obj'=>'tidy'],
'tidy_get_status' => ['int', 'obj'=>'tidy'],
'tidy_getopt' => ['mixed', 'option'=>'string', 'obj'=>'tidy'],
'tidy_is_xhtml' => ['bool', 'obj'=>'tidy'],
'tidy_is_xml' => ['bool', 'obj'=>'tidy'],
'tidy_load_config' => ['void', 'filename'=>'string', 'encoding'=>'string'],
'tidy_parse_file' => ['tidy|false', 'file'=>'string', 'config_options='=>'', 'encoding='=>'string', 'use_include_path='=>'bool'],
'tidy_parse_string' => ['tidy|false', 'input'=>'string', 'config_options='=>'', 'encoding='=>'string'],
'tidy_repair_file' => ['string|false', 'filename'=>'string', 'config_file='=>'', 'encoding='=>'string', 'use_include_path='=>'bool'],
'tidy_repair_string' => ['string|false', 'data'=>'string', 'config_file='=>'', 'encoding='=>'string'],
'tidy_reset_config' => ['bool'],
'tidy_save_config' => ['bool', 'filename'=>'string'],
'tidy_set_encoding' => ['bool', 'encoding'=>'string'],
'tidy_setopt' => ['bool', 'option'=>'string', 'value'=>'mixed'],
'tidy_warning_count' => ['int', 'obj'=>'tidy'],
'tidyNode::__construct' => ['void'],
'tidyNode::getParent' => ['tidyNode'],
'tidyNode::hasChildren' => ['bool'],
'tidyNode::hasSiblings' => ['bool'],
'tidyNode::isAsp' => ['bool'],
'tidyNode::isComment' => ['bool'],
'tidyNode::isHtml' => ['bool'],
'tidyNode::isJste' => ['bool'],
'tidyNode::isPhp' => ['bool'],
'tidyNode::isText' => ['bool'],
'time' => ['positive-int'],
'time_nanosleep' => ['array{seconds:0|positive-int,nanoseconds:0|positive-int}|bool', 'seconds'=>'int', 'nanoseconds'=>'int'],
'time_sleep_until' => ['bool', 'timestamp'=>'float'],
'timezone_abbreviations_list' => ['array<string, list<array{dst: bool, offset: int, timezone_id: string|null}>>'],
'timezone_identifiers_list' => ['list<string>', 'what='=>'int', 'country='=>'?string'],
'timezone_location_get' => ['array{country_code: string, latitude: float, longitude: float, comments: string}|false', 'object'=>'DateTimeZone'],
'timezone_name_from_abbr' => ['string|false', 'abbr'=>'string', 'gmtoffset='=>'int', 'isdst='=>'int'],
'timezone_name_get' => ['string', 'object'=>'DateTimeZone'],
'timezone_offset_get' => ['int', 'object'=>'DateTimeZone', 'datetime'=>'DateTime'],
'timezone_open' => ['DateTimeZone|false', 'timezone'=>'string'],
'timezone_transitions_get' => ['list<array{ts: int, time: string, offset: int, isdst: bool, abbr: string}>|false', 'object'=>'DateTimeZone', 'timestamp_begin='=>'int', 'timestamp_end='=>'int'],
'timezone_version_get' => ['string'],
'tmpfile' => ['resource|false'],
'token_get_all' => ['list<string|array{0:int,1:string,2:int}>', 'source'=>'string', 'flags='=>'int'],
'token_name' => ['string', 'type'=>'int'],
'TokyoTyrant::__construct' => ['void', 'host='=>'string', 'port='=>'int', 'options='=>'array'],
'TokyoTyrant::add' => ['int|float', 'key'=>'string', 'increment'=>'float', 'type='=>'int'],
'TokyoTyrant::connect' => ['TokyoTyrant', 'host'=>'string', 'port='=>'int', 'options='=>'array'],
'TokyoTyrant::connectUri' => ['TokyoTyrant', 'uri'=>'string'],
'TokyoTyrant::copy' => ['TokyoTyrant', 'path'=>'string'],
'TokyoTyrant::ext' => ['string', 'name'=>'string', 'options'=>'int', 'key'=>'string', 'value'=>'string'],
'TokyoTyrant::fwmKeys' => ['array', 'prefix'=>'string', 'max_recs'=>'int'],
'TokyoTyrant::get' => ['array', 'keys'=>'mixed'],
'TokyoTyrant::getIterator' => ['TokyoTyrantIterator'],
'TokyoTyrant::num' => ['int'],
'TokyoTyrant::out' => ['string', 'keys'=>'mixed'],
'TokyoTyrant::put' => ['TokyoTyrant', 'keys'=>'mixed', 'value='=>'string'],
'TokyoTyrant::putCat' => ['TokyoTyrant', 'keys'=>'mixed', 'value='=>'string'],
'TokyoTyrant::putKeep' => ['TokyoTyrant', 'keys'=>'mixed', 'value='=>'string'],
'TokyoTyrant::putNr' => ['TokyoTyrant', 'keys'=>'mixed', 'value='=>'string'],
'TokyoTyrant::putShl' => ['mixed', 'key'=>'string', 'value'=>'string', 'width'=>'int'],
'TokyoTyrant::restore' => ['mixed', 'log_dir'=>'string', 'timestamp'=>'int', 'check_consistency='=>'bool'],
'TokyoTyrant::setMaster' => ['mixed', 'host'=>'string', 'port'=>'int', 'timestamp'=>'int', 'check_consistency='=>'bool'],
'TokyoTyrant::size' => ['int', 'key'=>'string'],
'TokyoTyrant::stat' => ['array'],
'TokyoTyrant::sync' => ['mixed'],
'TokyoTyrant::tune' => ['TokyoTyrant', 'timeout'=>'float', 'options='=>'int'],
'TokyoTyrant::vanish' => ['mixed'],
'TokyoTyrantIterator::__construct' => ['void', 'object'=>'mixed'],
'TokyoTyrantIterator::current' => ['mixed'],
'TokyoTyrantIterator::key' => ['mixed'],
'TokyoTyrantIterator::next' => ['mixed'],
'TokyoTyrantIterator::rewind' => ['void'],
'TokyoTyrantIterator::valid' => ['bool'],
'TokyoTyrantQuery::__construct' => ['void', 'table'=>'TokyoTyrantTable'],
'TokyoTyrantQuery::addCond' => ['mixed', 'name'=>'string', 'op'=>'int', 'expr'=>'string'],
'TokyoTyrantQuery::count' => ['0|positive-int'],
'TokyoTyrantQuery::current' => ['array'],
'TokyoTyrantQuery::hint' => ['string'],
'TokyoTyrantQuery::key' => ['string'],
'TokyoTyrantQuery::metaSearch' => ['array', 'queries'=>'array', 'type'=>'int'],
'TokyoTyrantQuery::next' => ['array'],
'TokyoTyrantQuery::out' => ['TokyoTyrantQuery'],
'TokyoTyrantQuery::rewind' => ['bool'],
'TokyoTyrantQuery::search' => ['array'],
'TokyoTyrantQuery::setLimit' => ['mixed', 'max='=>'int', 'skip='=>'int'],
'TokyoTyrantQuery::setOrder' => ['mixed', 'name'=>'string', 'type'=>'int'],
'TokyoTyrantQuery::valid' => ['bool'],
'TokyoTyrantTable::add' => ['void', 'key'=>'string', 'increment'=>'mixed', 'type='=>'string'],
'TokyoTyrantTable::genUid' => ['int'],
'TokyoTyrantTable::get' => ['array', 'keys'=>'mixed'],
'TokyoTyrantTable::getIterator' => ['TokyoTyrantIterator'],
'TokyoTyrantTable::getQuery' => ['TokyoTyrantQuery'],
'TokyoTyrantTable::out' => ['void', 'keys'=>'mixed'],
'TokyoTyrantTable::put' => ['int', 'key'=>'string', 'columns'=>'array'],
'TokyoTyrantTable::putCat' => ['void', 'key'=>'string', 'columns'=>'array'],
'TokyoTyrantTable::putKeep' => ['void', 'key'=>'string', 'columns'=>'array'],
'TokyoTyrantTable::putNr' => ['void', 'keys'=>'mixed', 'value='=>'string'],
'TokyoTyrantTable::putShl' => ['void', 'key'=>'string', 'value'=>'string', 'width'=>'int'],
'TokyoTyrantTable::setIndex' => ['mixed', 'column'=>'string', 'type'=>'int'],
'touch' => ['bool', 'filename'=>'string', 'time='=>'int', 'atime='=>'int'],
'trader_acos' => ['array', 'real'=>'array'],
'trader_ad' => ['array', 'high'=>'array', 'low'=>'array', 'close'=>'array', 'volume'=>'array'],
'trader_add' => ['array', 'real0'=>'array', 'real1'=>'array'],
'trader_adosc' => ['array', 'high'=>'array', 'low'=>'array', 'close'=>'array', 'volume'=>'array', 'fastPeriod='=>'int', 'slowPeriod='=>'int'],
'trader_adx' => ['array', 'high'=>'array', 'low'=>'array', 'close'=>'array', 'timePeriod='=>'int'],
'trader_adxr' => ['array', 'high'=>'array', 'low'=>'array', 'close'=>'array', 'timePeriod='=>'int'],
'trader_apo' => ['array', 'real'=>'array', 'fastPeriod='=>'int', 'slowPeriod='=>'int', 'mAType='=>'int'],
'trader_aroon' => ['array', 'high'=>'array', 'low'=>'array', 'timePeriod='=>'int'],
'trader_aroonosc' => ['array', 'high'=>'array', 'low'=>'array', 'timePeriod='=>'int'],
'trader_asin' => ['array', 'real'=>'array'],
'trader_atan' => ['array', 'real'=>'array'],
'trader_atr' => ['array', 'high'=>'array', 'low'=>'array', 'close'=>'array', 'timePeriod='=>'int'],
'trader_avgprice' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_bbands' => ['array', 'real'=>'array', 'timePeriod='=>'int', 'nbDevUp='=>'float', 'nbDevDn='=>'float', 'mAType='=>'int'],
'trader_beta' => ['array', 'real0'=>'array', 'real1'=>'array', 'timePeriod='=>'int'],
'trader_bop' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cci' => ['array', 'high'=>'array', 'low'=>'array', 'close'=>'array', 'timePeriod='=>'int'],
'trader_cdl2crows' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdl3blackcrows' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdl3inside' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdl3linestrike' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdl3outside' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdl3starsinsouth' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdl3whitesoldiers' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlabandonedbaby' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array', 'penetration='=>'float'],
'trader_cdladvanceblock' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlbelthold' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlbreakaway' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlclosingmarubozu' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlconcealbabyswall' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlcounterattack' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdldarkcloudcover' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array', 'penetration='=>'float'],
'trader_cdldoji' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdldojistar' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdldragonflydoji' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlengulfing' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdleveningdojistar' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array', 'penetration='=>'float'],
'trader_cdleveningstar' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array', 'penetration='=>'float'],
'trader_cdlgapsidesidewhite' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlgravestonedoji' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlhammer' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlhangingman' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlharami' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlharamicross' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlhighwave' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlhikkake' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlhikkakemod' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlhomingpigeon' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlidentical3crows' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlinneck' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlinvertedhammer' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlkicking' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlkickingbylength' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlladderbottom' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdllongleggeddoji' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdllongline' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlmarubozu' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlmatchinglow' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlmathold' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array', 'penetration='=>'float'],
'trader_cdlmorningdojistar' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array', 'penetration='=>'float'],
'trader_cdlmorningstar' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array', 'penetration='=>'float'],
'trader_cdlonneck' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlpiercing' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlrickshawman' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlrisefall3methods' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlseparatinglines' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlshootingstar' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlshortline' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlspinningtop' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlstalledpattern' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlsticksandwich' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdltakuri' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdltasukigap' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlthrusting' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdltristar' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlunique3river' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlupsidegap2crows' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_cdlxsidegap3methods' => ['array', 'open'=>'array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_ceil' => ['array', 'real'=>'array'],
'trader_cmo' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trader_correl' => ['array', 'real0'=>'array', 'real1'=>'array', 'timePeriod='=>'int'],
'trader_cos' => ['array', 'real'=>'array'],
'trader_cosh' => ['array', 'real'=>'array'],
'trader_dema' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trader_div' => ['array', 'real0'=>'array', 'real1'=>'array'],
'trader_dx' => ['array', 'high'=>'array', 'low'=>'array', 'close'=>'array', 'timePeriod='=>'int'],
'trader_ema' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trader_errno' => ['int'],
'trader_exp' => ['array', 'real'=>'array'],
'trader_floor' => ['array', 'real'=>'array'],
'trader_get_compat' => ['int'],
'trader_get_unstable_period' => ['int', 'functionId'=>'int'],
'trader_ht_dcperiod' => ['array', 'real'=>'array'],
'trader_ht_dcphase' => ['array', 'real'=>'array'],
'trader_ht_phasor' => ['array', 'real'=>'array'],
'trader_ht_sine' => ['array', 'real'=>'array'],
'trader_ht_trendline' => ['array', 'real'=>'array'],
'trader_ht_trendmode' => ['array', 'real'=>'array'],
'trader_kama' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trader_linearreg' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trader_linearreg_angle' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trader_linearreg_intercept' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trader_linearreg_slope' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trader_ln' => ['array', 'real'=>'array'],
'trader_log10' => ['array', 'real'=>'array'],
'trader_ma' => ['array', 'real'=>'array', 'timePeriod='=>'int', 'mAType='=>'int'],
'trader_macd' => ['array', 'real'=>'array', 'fastPeriod='=>'int', 'slowPeriod='=>'int', 'signalPeriod='=>'int'],
'trader_macdext' => ['array', 'real'=>'array', 'fastPeriod='=>'int', 'fastMAType='=>'int', 'slowPeriod='=>'int', 'slowMAType='=>'int', 'signalPeriod='=>'int', 'signalMAType='=>'int'],
'trader_macdfix' => ['array', 'real'=>'array', 'signalPeriod='=>'int'],
'trader_mama' => ['array', 'real'=>'array', 'fastLimit='=>'float', 'slowLimit='=>'float'],
'trader_mavp' => ['array', 'real'=>'array', 'periods'=>'array', 'minPeriod='=>'int', 'maxPeriod='=>'int', 'mAType='=>'int'],
'trader_max' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trader_maxindex' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trader_medprice' => ['array', 'high'=>'array', 'low'=>'array'],
'trader_mfi' => ['array', 'high'=>'array', 'low'=>'array', 'close'=>'array', 'volume'=>'array', 'timePeriod='=>'int'],
'trader_midpoint' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trader_midprice' => ['array', 'high'=>'array', 'low'=>'array', 'timePeriod='=>'int'],
'trader_min' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trader_minindex' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trader_minmax' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trader_minmaxindex' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trader_minus_di' => ['array', 'high'=>'array', 'low'=>'array', 'close'=>'array', 'timePeriod='=>'int'],
'trader_minus_dm' => ['array', 'high'=>'array', 'low'=>'array', 'timePeriod='=>'int'],
'trader_mom' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trader_mult' => ['array', 'real0'=>'array', 'real1'=>'array'],
'trader_natr' => ['array', 'high'=>'array', 'low'=>'array', 'close'=>'array', 'timePeriod='=>'int'],
'trader_obv' => ['array', 'real'=>'array', 'volume'=>'array'],
'trader_plus_di' => ['array', 'high'=>'array', 'low'=>'array', 'close'=>'array', 'timePeriod='=>'int'],
'trader_plus_dm' => ['array', 'high'=>'array', 'low'=>'array', 'timePeriod='=>'int'],
'trader_ppo' => ['array', 'real'=>'array', 'fastPeriod='=>'int', 'slowPeriod='=>'int', 'mAType='=>'int'],
'trader_roc' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trader_rocp' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trader_rocr' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trader_rocr100' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trader_rsi' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trader_sar' => ['array', 'high'=>'array', 'low'=>'array', 'acceleration='=>'float', 'maximum='=>'float'],
'trader_sarext' => ['array', 'high'=>'array', 'low'=>'array', 'startValue='=>'float', 'offsetOnReverse='=>'float', 'accelerationInitLong='=>'float', 'accelerationLong='=>'float', 'accelerationMaxLong='=>'float', 'accelerationInitShort='=>'float', 'accelerationShort='=>'float', 'accelerationMaxShort='=>'float'],
'trader_set_compat' => ['void', 'compatId'=>'int'],
'trader_set_unstable_period' => ['void', 'functionId'=>'int', 'timePeriod'=>'int'],
'trader_sin' => ['array', 'real'=>'array'],
'trader_sinh' => ['array', 'real'=>'array'],
'trader_sma' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trader_sqrt' => ['array', 'real'=>'array'],
'trader_stddev' => ['array', 'real'=>'array', 'timePeriod='=>'int', 'nbDev='=>'float'],
'trader_stoch' => ['array', 'high'=>'array', 'low'=>'array', 'close'=>'array', 'fastK_Period='=>'int', 'slowK_Period='=>'int', 'slowK_MAType='=>'int', 'slowD_Period='=>'int', 'slowD_MAType='=>'int'],
'trader_stochf' => ['array', 'high'=>'array', 'low'=>'array', 'close'=>'array', 'fastK_Period='=>'int', 'fastD_Period='=>'int', 'fastD_MAType='=>'int'],
'trader_stochrsi' => ['array', 'real'=>'array', 'timePeriod='=>'int', 'fastK_Period='=>'int', 'fastD_Period='=>'int', 'fastD_MAType='=>'int'],
'trader_sub' => ['array', 'real0'=>'array', 'real1'=>'array'],
'trader_sum' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trader_t3' => ['array', 'real'=>'array', 'timePeriod='=>'int', 'vFactor='=>'float'],
'trader_tan' => ['array', 'real'=>'array'],
'trader_tanh' => ['array', 'real'=>'array'],
'trader_tema' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trader_trange' => ['array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_trima' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trader_trix' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trader_tsf' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trader_typprice' => ['array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_ultosc' => ['array', 'high'=>'array', 'low'=>'array', 'close'=>'array', 'timePeriod1='=>'int', 'timePeriod2='=>'int', 'timePeriod3='=>'int'],
'trader_var' => ['array', 'real'=>'array', 'timePeriod='=>'int', 'nbDev='=>'float'],
'trader_wclprice' => ['array', 'high'=>'array', 'low'=>'array', 'close'=>'array'],
'trader_willr' => ['array', 'high'=>'array', 'low'=>'array', 'close'=>'array', 'timePeriod='=>'int'],
'trader_wma' => ['array', 'real'=>'array', 'timePeriod='=>'int'],
'trait_exists' => ['bool', 'traitname'=>'string', 'autoload='=>'bool'],
'Transliterator::create' => ['?Transliterator', 'id'=>'string', 'direction='=>'int'],
'Transliterator::createFromRules' => ['?Transliterator', 'rules'=>'string', 'direction='=>'int'],
'Transliterator::createInverse' => ['Transliterator'],
'Transliterator::getErrorCode' => ['int'],
'Transliterator::getErrorMessage' => ['string'],
'Transliterator::listIDs' => ['array'],
'Transliterator::transliterate' => ['string|false', 'subject'=>'string', 'start='=>'int', 'end='=>'int'],
'transliterator_create' => ['?Transliterator', 'id'=>'string', 'direction='=>'int'],
'transliterator_create_from_rules' => ['?Transliterator', 'rules'=>'string', 'direction='=>'int'],
'transliterator_create_inverse' => ['Transliterator', 'obj'=>'Transliterator'],
'transliterator_get_error_code' => ['int|false', 'obj'=>'Transliterator'],
'transliterator_get_error_message' => ['string|false', 'obj'=>'Transliterator'],
'transliterator_list_ids' => ['array|false'],
'transliterator_transliterate' => ['string|false', 'obj'=>'Transliterator|string', 'subject'=>'string', 'start='=>'int', 'end='=>'int'],
'trigger_error' => ['bool', 'message'=>'string', 'error_type='=>'int'],
'trim' => ['string', 'str'=>'string', 'character_mask='=>'string'],
'TypeError::__clone' => ['void'],
'TypeError::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Throwable)|(?TypeError)'],
'TypeError::__toString' => ['string'],
'TypeError::getCode' => ['int'],
'TypeError::getFile' => ['string'],
'TypeError::getLine' => ['int'],
'TypeError::getMessage' => ['string'],
'TypeError::getPrevious' => ['Throwable|TypeError|null'],
'TypeError::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'TypeError::getTraceAsString' => ['string'],
'uasort' => ['bool', '&rw_array_arg'=>'array', 'callback'=>'callable(mixed,mixed):int'],
'ucfirst' => ['string', 'str'=>'string'],
'UConverter::__construct' => ['void', 'destination_encoding'=>'string', 'source_encoding='=>'string'],
'UConverter::convert' => ['string', 'str'=>'string', 'reverse='=>'bool'],
'UConverter::fromUCallback' => ['mixed', 'reason'=>'int', 'source'=>'string', 'codePoint'=>'string', '&w_error'=>'int'],
'UConverter::getAliases' => ['array', 'name='=>'string'],
'UConverter::getAvailable' => ['array'],
'UConverter::getDestinationEncoding' => ['string'],
'UConverter::getDestinationType' => ['int'],
'UConverter::getErrorCode' => ['int'],
'UConverter::getErrorMessage' => ['string'],
'UConverter::getSourceEncoding' => ['string'],
'UConverter::getSourceType' => ['int'],
'UConverter::getStandards' => ['array'],
'UConverter::getSubstChars' => ['string'],
'UConverter::reasonText' => ['string', 'reason='=>'int'],
'UConverter::setDestinationEncoding' => ['bool', 'encoding'=>'string'],
'UConverter::setSourceEncoding' => ['bool', 'encoding'=>'string'],
'UConverter::setSubstChars' => ['bool', 'chars'=>'string'],
'UConverter::toUCallback' => ['mixed', 'reason'=>'int', 'source'=>'string', 'codeUnits'=>'string', '&w_error'=>'int'],
'UConverter::transcode' => ['string', 'str'=>'string', 'toEncoding'=>'string', 'fromEncoding'=>'string', 'options='=>'array'],
'ucwords' => ['string', 'str'=>'string', 'delims='=>'string'],
'udm_add_search_limit' => ['bool', 'agent'=>'resource', 'var'=>'int', 'val'=>'string'],
'udm_alloc_agent' => ['resource', 'dbaddr'=>'string', 'dbmode='=>'string'],
'udm_alloc_agent_array' => ['resource', 'databases'=>'array'],
'udm_api_version' => ['int'],
'udm_cat_list' => ['array', 'agent'=>'resource', 'category'=>'string'],
'udm_cat_path' => ['array', 'agent'=>'resource', 'category'=>'string'],
'udm_check_charset' => ['bool', 'agent'=>'resource', 'charset'=>'string'],
'udm_check_stored' => ['int', 'agent'=>'', 'link'=>'int', 'doc_id'=>'string'],
'udm_clear_search_limits' => ['bool', 'agent'=>'resource'],
'udm_close_stored' => ['int', 'agent'=>'', 'link'=>'int'],
'udm_crc32' => ['int', 'agent'=>'resource', 'str'=>'string'],
'udm_errno' => ['int', 'agent'=>'resource'],
'udm_error' => ['string', 'agent'=>'resource'],
'udm_find' => ['resource', 'agent'=>'resource', 'query'=>'string'],
'udm_free_agent' => ['int', 'agent'=>'resource'],
'udm_free_ispell_data' => ['bool', 'agent'=>'int'],
'udm_free_res' => ['bool', 'res'=>'resource'],
'udm_get_doc_count' => ['int', 'agent'=>'resource'],
'udm_get_res_field' => ['string', 'res'=>'resource', 'row'=>'int', 'field'=>'int'],
'udm_get_res_param' => ['string', 'res'=>'resource', 'param'=>'int'],
'udm_hash32' => ['int', 'agent'=>'resource', 'str'=>'string'],
'udm_load_ispell_data' => ['bool', 'agent'=>'resource', 'var'=>'int', 'val1'=>'string', 'val2'=>'string', 'flag'=>'int'],
'udm_open_stored' => ['int', 'agent'=>'', 'storedaddr'=>'string'],
'udm_set_agent_param' => ['bool', 'agent'=>'resource', 'var'=>'int', 'val'=>'string'],
'ui\draw\text\font\fontfamilies' => ['array'],
'ui\quit' => ['void'],
'ui\run' => ['void', 'flags='=>'int'],
'uksort' => ['bool', '&rw_array_arg'=>'array', 'callback'=>'callable(array-key,array-key):int'],
'umask' => ['int', 'mask='=>'int'],
'UnderflowException::__clone' => ['void'],
'UnderflowException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Throwable)|(?UnderflowException)'],
'UnderflowException::__toString' => ['string'],
'UnderflowException::getCode' => ['int'],
'UnderflowException::getFile' => ['string'],
'UnderflowException::getLine' => ['int'],
'UnderflowException::getMessage' => ['string'],
'UnderflowException::getPrevious' => ['Throwable|UnderflowException|null'],
'UnderflowException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'UnderflowException::getTraceAsString' => ['string'],
'UnexpectedValueException::__clone' => ['void'],
'UnexpectedValueException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Throwable)|(?UnexpectedValueException)'],
'UnexpectedValueException::__toString' => ['string'],
'UnexpectedValueException::getCode' => ['int'],
'UnexpectedValueException::getFile' => ['string'],
'UnexpectedValueException::getLine' => ['int'],
'UnexpectedValueException::getMessage' => ['string'],
'UnexpectedValueException::getPrevious' => ['Throwable|UnexpectedValueException|null'],
'UnexpectedValueException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'UnexpectedValueException::getTraceAsString' => ['string'],
'uniqid' => ['non-empty-string', 'prefix='=>'string', 'more_entropy='=>'bool'],
'unixtojd' => ['int|false', 'timestamp='=>'int'],
'unlink' => ['bool', 'filename'=>'string', 'context='=>'resource'],
'unpack' => ['array|false', 'format'=>'string', 'data'=>'string', 'offset='=>'int'],
'unregister_tick_function' => ['void', 'function_name'=>'callable'],
'unserialize' => ['mixed', 'variable_representation'=>'string', 'allowed_classes='=>'array{allowed_classes?:string[]|bool}'],
'untaint' => ['bool', '&rw_string'=>'string', '&...rw_strings='=>'string'],
'uopz_add_function' => ['bool', 'class'=>'string', 'function'=>'string', 'handler'=>'Closure', '$flags'=>'bool', '$all'=>'bool'],
'uopz_add_function\1' => ['bool', 'function'=>'string', 'handler'=>'Closure', '$flags'=>'bool'],
'uopz_allow_exit' => ['void', 'allow'=>'bool'],
'uopz_backup' => ['void', 'class'=>'string', 'function'=>'string'],
'uopz_backup\'1' => ['void', 'function'=>'string'],
'uopz_compose' => ['void', 'name'=>'string', 'classes'=>'array', 'methods='=>'array', 'properties='=>'array', 'flags='=>'int'],
'uopz_copy' => ['Closure', 'class'=>'string', 'function'=>'string'],
'uopz_copy\'1' => ['Closure', 'function'=>'string'],
'uopz_del_function' => ['bool', 'class'=>'string', 'function'=>'string', '$all'=>'bool'],
'uopz_del_function\1' => ['bool', 'function'=>'string'],
'uopz_delete' => ['void', 'class'=>'string', 'function'=>'string'],
'uopz_delete\'1' => ['void', 'function'=>'string'],
'uopz_extend' => ['void', 'class'=>'string', 'parent'=>'string'],
'uopz_flags' => ['int', 'class'=>'string', 'function'=>'string', 'flags'=>'int'],
'uopz_flags\'1' => ['int', 'function'=>'string', 'flags'=>'int'],
'uopz_function' => ['void', 'class'=>'string', 'function'=>'string', 'handler'=>'Closure', 'modifiers='=>'int'],
'uopz_function\'1' => ['void', 'function'=>'string', 'handler'=>'Closure', 'modifiers='=>'int'],
'uopz_get_exit_status' => ['mixed'],
'uopz_get_hook' => ['Closure', 'class'=>'string', 'function'=>'string'],
'uopz_get_hook\1' => ['Closure', 'function'=>'string'],
'uopz_get_mock' => ['mixed', 'class'=>'string'],
'uopz_get_property' => ['void', 'class'=>'string', 'property'=>'string'],
'uopz_get_property\1' => ['void', 'instance'=>'object', 'property'=>'string'],
'uopz_get_return' => ['mixed', 'class='=>'string', 'function='=>'string'],
'uopz_get_static' => ['array', 'class='=>'string', 'function='=>'string'],
'uopz_get_static\1' => ['array', 'function='=>'string'],
'uopz_implement' => ['void', 'class'=>'string', 'interface'=>'string'],
'uopz_overload' => ['void', 'opcode'=>'int', 'callable'=>'Callable'],
'uopz_redefine' => ['void', 'class'=>'string', 'constant'=>'string', 'value'=>'mixed'],
'uopz_redefine\'1' => ['void', 'constant'=>'string', 'value'=>'mixed'],
'uopz_rename' => ['void', 'class'=>'string', 'function'=>'string', 'rename'=>'string'],
'uopz_rename\'1' => ['void', 'function'=>'string', 'rename'=>'string'],
'uopz_restore' => ['void', 'class'=>'string', 'function'=>'string'],
'uopz_restore\'1' => ['void', 'function'=>'string'],
'uopz_set_mock' => ['void', 'class'=>'string', 'mock'=>'object|string'],
'uopz_set_property' => ['void', 'class'=>'string', 'property'=>'string', 'value'=>'mixed'],
'uopz_set_property\1' => ['void', 'instance'=>'object', 'property'=>'string', 'value'=>'mixed'],
'uopz_set_return' => ['bool', 'class'=>'string', 'function'=>'string', 'value'=>'mixed', 'execute='=>'bool'],
'uopz_set_return\'1' => ['bool', 'function'=>'string', 'value'=>'mixed', 'execute='=>'bool'],
'uopz_undefine' => ['void', 'class'=>'string', 'constant'=>'string'],
'uopz_undefine\'1' => ['void', 'constant'=>'string'],
'uopz_set_hook' => ['bool', 'class'=>'string', 'function'=>'string', 'hook'=>'Closure'],
'uopz_set_hook\1' => ['bool', 'function'=>'string', 'hook'=>'Closure'],
'uopz_unset_mock' => ['void', 'class'=>'string'],
'uopz_unset_return' => ['bool', 'class='=>'string', 'function='=>'string'],
'uopz_unset_return\'1' => ['bool', 'function'=>'string'],
'urldecode' => ['string', 'str'=>'string'],
'urlencode' => ['string', 'str'=>'string'],
'use_soap_error_handler' => ['bool', 'handler='=>'bool'],
'usleep' => ['void', 'micro_seconds'=>'int'],
'usort' => ['bool', '&rw_array_arg'=>'array', 'callback'=>'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', 'snapshot_blob='=>'string'],
'V8Js::clearPendingException' => [''],
'V8Js::compileString' => ['resource', 'script'=>'', 'identifier='=>'string'],
'V8Js::createSnapshot' => ['false|string', 'embed_source'=>'string'],
'V8Js::executeScript' => ['', 'script'=>'resource', 'flags='=>'int', 'time_limit='=>'int', 'memory_limit='=>'int'],
'V8Js::executeString' => ['mixed', 'script'=>'string', 'identifier='=>'string', 'flags='=>'int'],
'V8Js::getExtensions' => ['array'],
'V8Js::getPendingException' => ['V8JsException'],
'V8Js::registerExtension' => ['bool', 'extension_name'=>'string', 'script'=>'string', 'dependencies='=>'array', 'auto_enable='=>'bool'],
'V8Js::setAverageObjectSize' => ['', 'average_object_size'=>'int'],
'V8Js::setMemoryLimit' => ['', 'limit'=>'int'],
'V8Js::setModuleLoader' => ['', 'loader'=>'callable'],
'V8Js::setModuleNormaliser' => ['', 'normaliser'=>'callable'],
'V8Js::setTimeLimit' => ['', 'limit'=>'int'],
'V8JsException::getJsFileName' => ['string'],
'V8JsException::getJsLineNumber' => ['int'],
'V8JsException::getJsSourceLine' => ['int'],
'V8JsException::getJsTrace' => ['string'],
'V8JsScriptException::__clone' => ['void'],
'V8JsScriptException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Exception)|(?Throwable)'],
'V8JsScriptException::__toString' => ['string'],
'V8JsScriptException::__wakeup' => ['void'],
'V8JsScriptException::getCode' => ['int'],
'V8JsScriptException::getFile' => ['string'],
'V8JsScriptException::getJsEndColumn' => ['int'],
'V8JsScriptException::getJsFileName' => ['string'],
'V8JsScriptException::getJsLineNumber' => ['int'],
'V8JsScriptException::getJsSourceLine' => ['string'],
'V8JsScriptException::getJsStartColumn' => ['int'],
'V8JsScriptException::getJsTrace' => ['string'],
'V8JsScriptException::getLine' => ['int'],
'V8JsScriptException::getMessage' => ['string'],
'V8JsScriptException::getPrevious' => ['Exception|Throwable'],
'V8JsScriptException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:\'::\'|\'->\',args?:mixed[],object?:object}'],
'V8JsScriptException::getTraceAsString' => ['string'],
'var_dump' => ['void', 'var'=>'mixed', '...args='=>'mixed'],
'var_export' => ['string|null', 'var'=>'mixed', 'return='=>'bool'],
'VARIANT::__construct' => ['void', 'value='=>'mixed', 'type='=>'int', 'codepage='=>'int'],
'variant_abs' => ['mixed', 'left'=>'mixed'],
'variant_add' => ['mixed', 'left'=>'mixed', 'right'=>'mixed'],
'variant_and' => ['mixed', 'left'=>'mixed', 'right'=>'mixed'],
'variant_cast' => ['object', 'variant'=>'object', 'type'=>'int'],
'variant_cat' => ['mixed', 'left'=>'mixed', 'right'=>'mixed'],
'variant_cmp' => ['int', 'left'=>'mixed', 'right'=>'mixed', 'lcid='=>'int', 'flags='=>'int'],
'variant_date_from_timestamp' => ['object', 'timestamp'=>'int'],
'variant_date_to_timestamp' => ['int', 'variant'=>'object'],
'variant_div' => ['mixed', 'left'=>'mixed', 'right'=>'mixed'],
'variant_eqv' => ['mixed', 'left'=>'mixed', 'right'=>'mixed'],
'variant_fix' => ['mixed', 'left'=>'mixed'],
'variant_get_type' => ['int', 'variant'=>'object'],
'variant_idiv' => ['mixed', 'left'=>'mixed', 'right'=>'mixed'],
'variant_imp' => ['mixed', 'left'=>'mixed', 'right'=>'mixed'],
'variant_int' => ['mixed', 'left'=>'mixed'],
'variant_mod' => ['mixed', 'left'=>'mixed', 'right'=>'mixed'],
'variant_mul' => ['mixed', 'left'=>'mixed', 'right'=>'mixed'],
'variant_neg' => ['mixed', 'left'=>'mixed'],
'variant_not' => ['mixed', 'left'=>'mixed'],
'variant_or' => ['mixed', 'left'=>'mixed', 'right'=>'mixed'],
'variant_pow' => ['mixed', 'left'=>'mixed', 'right'=>'mixed'],
'variant_round' => ['mixed', 'left'=>'mixed', 'decimals'=>'int'],
'variant_set' => ['void', 'variant'=>'object', 'value'=>'mixed'],
'variant_set_type' => ['void', 'variant'=>'object', 'type'=>'int'],
'variant_sub' => ['mixed', 'left'=>'mixed', 'right'=>'mixed'],
'variant_xor' => ['mixed', 'left'=>'mixed', 'right'=>'mixed'],
'VarnishAdmin::__construct' => ['void', 'args='=>'array'],
'VarnishAdmin::auth' => ['bool'],
'VarnishAdmin::ban' => ['int', 'vcl_regex'=>'string'],
'VarnishAdmin::banUrl' => ['int', 'vcl_regex'=>'string'],
'VarnishAdmin::clearPanic' => ['int'],
'VarnishAdmin::connect' => ['bool'],
'VarnishAdmin::disconnect' => ['bool'],
'VarnishAdmin::getPanic' => ['string'],
'VarnishAdmin::getParams' => ['array'],
'VarnishAdmin::isRunning' => ['bool'],
'VarnishAdmin::setCompat' => ['void', 'compat'=>'int'],
'VarnishAdmin::setHost' => ['void', 'host'=>'string'],
'VarnishAdmin::setIdent' => ['void', 'ident'=>'string'],
'VarnishAdmin::setParam' => ['int', 'name'=>'string', 'value'=>'string|int'],
'VarnishAdmin::setPort' => ['void', 'port'=>'int'],
'VarnishAdmin::setSecret' => ['void', 'secret'=>'string'],
'VarnishAdmin::setTimeout' => ['void', 'timeout'=>'int'],
'VarnishAdmin::start' => ['int'],
'VarnishAdmin::stop' => ['int'],
'VarnishLog::__construct' => ['void', 'args='=>'array'],
'VarnishLog::getLine' => ['array'],
'VarnishLog::getTagName' => ['string', 'index'=>'int'],
'VarnishStat::__construct' => ['void', 'args='=>'array'],
'VarnishStat::getSnapshot' => ['array'],
'version_compare' => ['int', 'version1'=>'string', 'version2'=>'string'],
'version_compare\'1' => ['bool', 'version1'=>'string', 'version2'=>'string', 'operator'=>'string'],
'vfprintf' => ['int', 'stream'=>'resource', 'format'=>'string', 'args'=>'array<__stringAndStringable|int|float|null|bool>'],
'virtual' => ['bool', 'uri'=>'string'],
'Volatile::__construct' => ['void'],
'Volatile::chunk' => ['array', 'size'=>'int', 'preserve'=>'bool'],
'Volatile::count' => ['0|positive-int'],
'Volatile::extend' => ['bool', 'class'=>'string'],
'Volatile::isRunning' => ['bool'],
'Volatile::isTerminated' => ['bool'],
'Volatile::merge' => ['bool', 'from'=>'mixed', 'overwrite='=>'bool'],
'Volatile::notify' => ['bool'],
'Volatile::notifyOne' => ['bool'],
'Volatile::offsetExists' => ['bool', 'offset'=>'mixed'],
'Volatile::offsetGet' => ['mixed', 'offset'=>'mixed'],
'Volatile::offsetSet' => ['void', 'offset'=>'mixed', 'value'=>'mixed'],
'Volatile::offsetUnset' => ['void', 'offset'=>'mixed'],
'Volatile::pop' => ['bool'],
'Volatile::run' => ['void'],
'Volatile::shift' => ['mixed'],
'Volatile::synchronized' => ['mixed', 'block'=>'Closure', '...args='=>'mixed'],
'Volatile::wait' => ['bool', 'timeout='=>'int'],
'vpopmail_add_alias_domain' => ['bool', 'domain'=>'string', 'aliasdomain'=>'string'],
'vpopmail_add_alias_domain_ex' => ['bool', 'olddomain'=>'string', 'newdomain'=>'string'],
'vpopmail_add_domain' => ['bool', 'domain'=>'string', 'dir'=>'string', 'uid'=>'int', 'gid'=>'int'],
'vpopmail_add_domain_ex' => ['bool', 'domain'=>'string', 'passwd'=>'string', 'quota='=>'string', 'bounce='=>'string', 'apop='=>'bool'],
'vpopmail_add_user' => ['bool', 'user'=>'string', 'domain'=>'string', 'password'=>'string', 'gecos='=>'string', 'apop='=>'bool'],
'vpopmail_alias_add' => ['bool', 'user'=>'string', 'domain'=>'string', 'alias'=>'string'],
'vpopmail_alias_del' => ['bool', 'user'=>'string', 'domain'=>'string'],
'vpopmail_alias_del_domain' => ['bool', 'domain'=>'string'],
'vpopmail_alias_get' => ['array', 'alias'=>'string', 'domain'=>'string'],
'vpopmail_alias_get_all' => ['array', 'domain'=>'string'],
'vpopmail_auth_user' => ['bool', 'user'=>'string', 'domain'=>'string', 'password'=>'string', 'apop='=>'string'],
'vpopmail_del_domain' => ['bool', 'domain'=>'string'],
'vpopmail_del_domain_ex' => ['bool', 'domain'=>'string'],
'vpopmail_del_user' => ['bool', 'user'=>'string', 'domain'=>'string'],
'vpopmail_error' => ['string'],
'vpopmail_passwd' => ['bool', 'user'=>'string', 'domain'=>'string', 'password'=>'string', 'apop='=>'bool'],
'vpopmail_set_user_quota' => ['bool', 'user'=>'string', 'domain'=>'string', 'quota'=>'string'],
'vprintf' => ['int', 'format'=>'string', 'args'=>'array<__stringAndStringable|int|float|null|bool>'],
'vsprintf' => ['string', 'format'=>'string', 'args'=>'array<__stringAndStringable|int|float|null|bool>'],
'w32api_deftype' => ['bool', 'typename'=>'string', 'member1_type'=>'string', 'member1_name'=>'string', '...args='=>'string'],
'w32api_init_dtype' => ['resource', 'typename'=>'string', 'value'=>'', '...args='=>''],
'w32api_invoke_function' => ['', 'funcname'=>'string', 'argument'=>'', '...args='=>''],
'w32api_register_function' => ['bool', 'library'=>'string', 'function_name'=>'string', 'return_type'=>'string'],
'w32api_set_call_method' => ['', 'method'=>'int'],
'wddx_add_vars' => ['bool', 'packet_id'=>'resource', 'var_names'=>'mixed', '...vars='=>'mixed'],
'wddx_deserialize' => ['mixed', 'packet'=>'string'],
'wddx_packet_end' => ['string', 'packet_id'=>'resource'],
'wddx_packet_start' => ['resource', 'comment='=>'string'],
'wddx_serialize_value' => ['string', 'var'=>'mixed', 'comment='=>'string'],
'wddx_serialize_vars' => ['string', 'var_name'=>'mixed', '...vars='=>'mixed'],
'WeakMap::__construct' => ['void'],
'WeakMap::count' => ['0|positive-int'],
'WeakMap::current' => ['mixed'],
'WeakMap::key' => ['object'],
'WeakMap::next' => ['void'],
'WeakMap::offsetExists' => ['bool', 'object'=>'object'],
'WeakMap::offsetGet' => ['mixed', 'object'=>'object'],
'WeakMap::offsetSet' => ['void', 'object'=>'object', 'value'=>'mixed'],
'WeakMap::offsetUnset' => ['void', 'object'=>'object'],
'WeakMap::rewind' => ['void'],
'WeakMap::valid' => ['bool'],
'Weakref::acquire' => ['bool'],
'Weakref::get' => ['object'],
'Weakref::release' => ['bool'],
'Weakref::valid' => ['bool'],
'webObj::convertToString' => ['string'],
'webObj::free' => ['void'],
'webObj::set' => ['int', 'property_name'=>'string', 'new_value'=>''],
'webObj::updateFromString' => ['int', 'snippet'=>'string'],
'win32_continue_service' => ['int', 'servicename'=>'string', 'machine='=>'string'],
'win32_create_service' => ['mixed', 'details'=>'array', 'machine='=>'string'],
'win32_delete_service' => ['mixed', 'servicename'=>'string', 'machine='=>'string'],
'win32_get_last_control_message' => ['int'],
'win32_pause_service' => ['int', 'servicename'=>'string', 'machine='=>'string'],
'win32_ps_list_procs' => ['array'],
'win32_ps_stat_mem' => ['array'],
'win32_ps_stat_proc' => ['array', 'pid='=>'int'],
'win32_query_service_status' => ['mixed', 'servicename'=>'string', 'machine='=>'string'],
'win32_set_service_status' => ['bool', 'status'=>'int', 'checkpoint='=>'int'],
'win32_start_service' => ['int', 'servicename'=>'string', 'machine='=>'string'],
'win32_start_service_ctrl_dispatcher' => ['mixed', 'name'=>'string'],
'win32_stop_service' => ['int', 'servicename'=>'string', 'machine='=>'string'],
'wincache_fcache_fileinfo' => ['array', 'summaryonly='=>'bool'],
'wincache_fcache_meminfo' => ['array'],
'wincache_lock' => ['bool', 'key'=>'string', 'isglobal='=>'bool'],
'wincache_ocache_fileinfo' => ['array', 'summaryonly='=>'bool'],
'wincache_ocache_meminfo' => ['array'],
'wincache_refresh_if_changed' => ['bool', 'files='=>'array'],
'wincache_rplist_fileinfo' => ['array', 'summaryonly='=>'bool'],
'wincache_rplist_meminfo' => ['array'],
'wincache_scache_info' => ['array|false', 'summaryonly='=>'bool'],
'wincache_scache_meminfo' => ['array|false'],
'wincache_ucache_add' => ['bool', 'key'=>'string', 'value'=>'', 'ttl='=>'int'],
'wincache_ucache_add\'1' => ['bool', 'values'=>'array', 'unused='=>'', 'ttl='=>'int'],
'wincache_ucache_cas' => ['bool', 'key'=>'string', 'old_value'=>'int', 'new_value'=>'int'],
'wincache_ucache_clear' => ['bool'],
'wincache_ucache_dec' => ['mixed', 'key'=>'string', 'dec_by='=>'int', '&w_success='=>'bool'],
'wincache_ucache_delete' => ['bool', 'key'=>'mixed'],
'wincache_ucache_exists' => ['bool', 'key'=>'string'],
'wincache_ucache_get' => ['mixed', 'key'=>'mixed', '&w_success='=>'bool'],
'wincache_ucache_inc' => ['int|false', 'key'=>'string', 'inc_by='=>'int', '&w_success='=>'bool'],
'wincache_ucache_info' => ['array|false', 'summaryonly='=>'bool', 'key='=>'string'],
'wincache_ucache_meminfo' => ['array'],
'wincache_ucache_set' => ['bool', 'key'=>'', 'value'=>'', 'ttl='=>'int'],
'wincache_ucache_set\'1' => ['bool', 'values'=>'array', 'unused='=>'', 'ttl='=>'int'],
'wincache_unlock' => ['bool', 'key'=>'string'],
'wordwrap' => ['string', 'str'=>'string', 'width='=>'int', 'break='=>'string', 'cut='=>'bool'],
'Worker::__construct' => ['void'],
'Worker::chunk' => ['array', 'size'=>'int', 'preserve'=>'bool'],
'Worker::collect' => ['int', 'collector='=>'Callable'],
'Worker::count' => ['0|positive-int'],
'Worker::getCreatorId' => ['int'],
'Worker::getCurrentThread' => ['Thread'],
'Worker::getCurrentThreadId' => ['int'],
'Worker::getStacked' => ['int'],
'Worker::getThreadId' => ['int'],
'Worker::isJoined' => ['bool'],
'Worker::isRunning' => ['bool'],
'Worker::isShutdown' => ['bool'],
'Worker::isStarted' => ['bool'],
'Worker::isTerminated' => ['bool'],
'Worker::join' => ['bool'],
'Worker::merge' => ['bool', 'from'=>'', 'overwrite='=>'mixed'],
'Worker::notify' => ['bool'],
'Worker::notifyOne' => ['bool'],
'Worker::offsetExists' => ['bool', 'offset'=>'mixed'],
'Worker::offsetGet' => ['mixed', 'offset'=>'mixed'],
'Worker::offsetSet' => ['void', 'offset'=>'mixed', 'value'=>'mixed'],
'Worker::offsetUnset' => ['void', 'offset'=>'mixed'],
'Worker::pop' => ['bool'],
'Worker::run' => ['void'],
'Worker::shift' => ['bool'],
'Worker::shutdown' => ['bool'],
'Worker::stack' => ['int', 'work'=>'Threaded'],
'Worker::start' => ['bool', 'options='=>'int'],
'Worker::synchronized' => ['mixed', 'block'=>'Closure', '_='=>'mixed'],
'Worker::unstack' => ['Collectable|null'],
'Worker::wait' => ['bool', 'timeout='=>'int'],
'xattr_get' => ['string', 'filename'=>'string', 'name'=>'string', 'flags='=>'int'],
'xattr_list' => ['array', 'filename'=>'string', 'flags='=>'int'],
'xattr_remove' => ['bool', 'filename'=>'string', 'name'=>'string', 'flags='=>'int'],
'xattr_set' => ['bool', 'filename'=>'string', 'name'=>'string', 'value'=>'string', 'flags='=>'int'],
'xattr_supported' => ['bool', 'filename'=>'string', 'flags='=>'int'],
'xcache_asm' => ['string', 'filename'=>'string'],
'xcache_clear_cache' => ['void', 'type'=>'int', 'id='=>'int'],
'xcache_coredump' => ['string', 'op_type'=>'int'],
'xcache_count' => ['int', 'type'=>'int'],
'xcache_coverager_decode' => ['array', 'data'=>'string'],
'xcache_coverager_get' => ['array', 'clean='=>'bool|false'],
'xcache_coverager_start' => ['void', 'clean='=>'bool|true'],
'xcache_coverager_stop' => ['void', 'clean='=>'bool|false'],
'xcache_dasm_file' => ['string', 'filename'=>'string'],
'xcache_dasm_string' => ['string', 'code'=>'string'],
'xcache_dec' => ['int', 'name'=>'string', 'value='=>'int|mixed', 'ttl='=>'int'],
'xcache_decode' => ['bool', 'filename'=>'string'],
'xcache_encode' => ['string', 'filename'=>'string'],
'xcache_get' => ['mixed', 'name'=>'string'],
'xcache_get_data_type' => ['string', 'type'=>'int'],
'xcache_get_op_spec' => ['string', 'op_type'=>'int'],
'xcache_get_op_type' => ['string', 'op_type'=>'int'],
'xcache_get_opcode' => ['string', 'opcode'=>'int'],
'xcache_get_opcode_spec' => ['string', 'opcode'=>'int'],
'xcache_inc' => ['int', 'name'=>'string', 'value='=>'int|mixed', 'ttl='=>'int'],
'xcache_info' => ['array', 'type'=>'int', 'id'=>'int'],
'xcache_is_autoglobal' => ['string', 'name'=>'string'],
'xcache_isset' => ['bool', 'name'=>'string'],
'xcache_list' => ['array', 'type'=>'int', 'id'=>'int'],
'xcache_set' => ['bool', 'name'=>'string', 'value'=>'mixed', 'ttl='=>'int'],
'xcache_unset' => ['bool', 'name'=>'string'],
'xcache_unset_by_prefix' => ['bool', 'prefix'=>'string'],
'Xcom::__construct' => ['void', 'fabric_url='=>'string', 'fabric_token='=>'string', 'capability_token='=>'string'],
'Xcom::decode' => ['object', 'avro_msg'=>'string', 'json_schema'=>'string'],
'Xcom::encode' => ['string', 'data'=>'stdClass', 'avro_schema'=>'string'],
'Xcom::getDebugOutput' => ['string'],
'Xcom::getLastResponse' => ['string'],
'Xcom::getLastResponseInfo' => ['array'],
'Xcom::getOnboardingURL' => ['string', 'capability_name'=>'string', 'agreement_url'=>'string'],
'Xcom::send' => ['int', 'topic'=>'string', 'data'=>'mixed', 'json_schema='=>'string', 'http_headers='=>'array'],
'Xcom::sendAsync' => ['int', 'topic'=>'string', 'data'=>'mixed', 'json_schema='=>'string', 'http_headers='=>'array'],
'xdebug_break' => ['bool'],
'xdebug_call_class' => ['string', 'depth=' => 'int'],
'xdebug_call_file' => ['string', 'depth=' => 'int'],
'xdebug_call_function' => ['string', 'depth=' => 'int'],
'xdebug_call_line' => ['int', 'depth=' => 'int'],
'xdebug_clear_aggr_profiling_data' => ['bool'],
'xdebug_code_coverage_started' => ['bool'],
'xdebug_connect_to_client' => ['bool'],
'xdebug_debug_zval' => ['void', '...varName'=>'string'],
'xdebug_debug_zval_stdout' => ['void', '...varName'=>'string'],
'xdebug_disable' => ['void'],
'xdebug_dump_aggr_profiling_data' => ['bool'],
'xdebug_dump_superglobals' => ['void'],
'xdebug_enable' => ['void'],
'xdebug_get_code_coverage' => ['array'],
'xdebug_get_collected_errors' => ['string', 'clean='=>'bool|false'],
'xdebug_get_declared_vars' => ['array'],
'xdebug_get_formatted_function_stack' => [''],
'xdebug_get_function_count' => ['int'],
'xdebug_get_function_stack' => ['array', 'message='=>'string', 'options='=>'int'],
'xdebug_get_headers' => ['array'],
'xdebug_get_monitored_functions' => ['array'],
'xdebug_get_profiler_filename' => ['string'],
'xdebug_get_stack_depth' => ['int'],
'xdebug_get_tracefile_name' => ['string'],
'xdebug_is_debugger_active' => ['bool'],
'xdebug_is_enabled' => ['bool'],
'xdebug_memory_usage' => ['int'],
'xdebug_notify' => ['bool', 'data' => 'mixed'],
'xdebug_peak_memory_usage' => ['int'],
'xdebug_print_function_stack' => ['array', 'message='=>'string', 'options=' => 'int'],
'xdebug_set_filter' => ['void', 'group' => 'int', 'list_type' => 'int', 'configuration' => 'array'],
'xdebug_start_code_coverage' => ['void', 'options='=>'int'],
'xdebug_start_error_collection' => ['void'],
'xdebug_start_function_monitor' => ['void', 'list_of_functions_to_monitor'=>'string[]'],
'xdebug_start_trace' => ['void', 'trace_file'=>'', 'options='=>'int|mixed'],
'xdebug_stop_code_coverage' => ['void', 'cleanup='=>'bool|true'],
'xdebug_stop_error_collection' => ['void'],
'xdebug_stop_function_monitor' => ['void'],
'xdebug_stop_trace' => ['void'],
'xdebug_time_index' => ['float'],
'xdebug_var_dump' => ['void', '...var'=>''],
'xdiff_file_bdiff' => ['bool', 'old_file'=>'string', 'new_file'=>'string', 'dest'=>'string'],
'xdiff_file_bdiff_size' => ['int', 'file'=>'string'],
'xdiff_file_bpatch' => ['bool', 'file'=>'string', 'patch'=>'string', 'dest'=>'string'],
'xdiff_file_diff' => ['bool', 'old_file'=>'string', 'new_file'=>'string', 'dest'=>'string', 'context='=>'int', 'minimal='=>'bool'],
'xdiff_file_diff_binary' => ['bool', 'old_file'=>'string', 'new_file'=>'string', 'dest'=>'string'],
'xdiff_file_merge3' => ['mixed', 'old_file'=>'string', 'new_file1'=>'string', 'new_file2'=>'string', 'dest'=>'string'],
'xdiff_file_patch' => ['mixed', 'file'=>'string', 'patch'=>'string', 'dest'=>'string', 'flags='=>'int'],
'xdiff_file_patch_binary' => ['bool', 'file'=>'string', 'patch'=>'string', 'dest'=>'string'],
'xdiff_file_rabdiff' => ['bool', 'old_file'=>'string', 'new_file'=>'string', 'dest'=>'string'],
'xdiff_string_bdiff' => ['string', 'old_data'=>'string', 'new_data'=>'string'],
'xdiff_string_bdiff_size' => ['int', 'patch'=>'string'],
'xdiff_string_bpatch' => ['string', 'str'=>'string', 'patch'=>'string'],
'xdiff_string_diff' => ['string', 'old_data'=>'string', 'new_data'=>'string', 'context='=>'int', 'minimal='=>'bool'],
'xdiff_string_diff_binary' => ['string', 'old_data'=>'string', 'new_data'=>'string'],
'xdiff_string_merge3' => ['mixed', 'old_data'=>'string', 'new_data1'=>'string', 'new_data2'=>'string', 'error='=>'string'],
'xdiff_string_patch' => ['string', 'str'=>'string', 'patch'=>'string', 'flags='=>'int', '&w_error='=>'string'],
'xdiff_string_patch_binary' => ['string', 'str'=>'string', 'patch'=>'string'],
'xdiff_string_rabdiff' => ['string', 'old_data'=>'string', 'new_data'=>'string'],
'xhprof_disable' => ['array'],
'xhprof_enable' => ['void', 'flags='=>'int', 'options='=>'array'],
'xhprof_sample_disable' => ['array<string,string>'],
'xhprof_sample_enable' => ['void'],
'xml_error_string' => ['string', 'code'=>'int'],
'xml_get_current_byte_index' => ['int', 'parser'=>'resource'],
'xml_get_current_column_number' => ['int', 'parser'=>'resource'],
'xml_get_current_line_number' => ['int', 'parser'=>'resource'],
'xml_get_error_code' => ['int', 'parser'=>'resource'],
'xml_parse' => ['int', 'parser'=>'resource', 'data'=>'string', 'isfinal='=>'bool'],
'xml_parse_into_struct' => ['int', 'parser'=>'resource', 'data'=>'string', '&w_values'=>'array', '&w_index='=>'array'],
'xml_parser_create' => ['resource', 'encoding='=>'string'],
'xml_parser_create_ns' => ['resource', 'encoding='=>'string', 'sep='=>'string'],
'xml_parser_free' => ['bool', 'parser'=>'resource'],
'xml_parser_get_option' => ['mixed', 'parser'=>'resource', 'option'=>'int'],
'xml_parser_set_option' => ['bool', 'parser'=>'resource', 'option'=>'int', 'value'=>'mixed'],
'xml_set_character_data_handler' => ['bool', 'parser'=>'resource', 'hdl'=>'callable'],
'xml_set_default_handler' => ['bool', 'parser'=>'resource', 'hdl'=>'callable'],
'xml_set_element_handler' => ['bool', 'parser'=>'resource', 'shdl'=>'callable', 'ehdl'=>'callable'],
'xml_set_end_namespace_decl_handler' => ['bool', 'parser'=>'resource', 'hdl'=>'callable'],
'xml_set_external_entity_ref_handler' => ['bool', 'parser'=>'resource', 'hdl'=>'callable'],
'xml_set_notation_decl_handler' => ['bool', 'parser'=>'resource', 'hdl'=>'callable'],
'xml_set_object' => ['bool', 'parser'=>'resource', 'obj'=>'object'],
'xml_set_processing_instruction_handler' => ['bool', 'parser'=>'resource', 'hdl'=>'callable'],
'xml_set_start_namespace_decl_handler' => ['bool', 'parser'=>'resource', 'hdl'=>'callable'],
'xml_set_unparsed_entity_decl_handler' => ['bool', 'parser'=>'resource', 'hdl'=>'callable'],
'XMLDiff\Base::__construct' => ['void', 'nsname'=>'string'],
'XMLDiff\Base::diff' => ['mixed', 'from'=>'mixed', 'to'=>'mixed'],
'XMLDiff\Base::merge' => ['mixed', 'src'=>'mixed', 'diff'=>'mixed'],
'XMLDiff\DOM::diff' => ['DOMDocument', 'from'=>'DOMDocument', 'to'=>'DOMDocument'],
'XMLDiff\DOM::merge' => ['DOMDocument', 'src'=>'DOMDocument', 'diff'=>'DOMDocument'],
'XMLDiff\File::diff' => ['string', 'from'=>'string', 'to'=>'string'],
'XMLDiff\File::merge' => ['string', 'src'=>'string', 'diff'=>'string'],
'XMLDiff\Memory::diff' => ['string', 'from'=>'string', 'to'=>'string'],
'XMLDiff\Memory::merge' => ['string', 'src'=>'string', 'diff'=>'string'],
'XMLReader::close' => ['bool'],
'XMLReader::expand' => ['DOMNode|false', 'basenode='=>'DOMNode'],
'XMLReader::getAttribute' => ['string|null', 'name'=>'string'],
'XMLReader::getAttributeNo' => ['string|null', 'index'=>'int'],
'XMLReader::getAttributeNs' => ['string|null', 'name'=>'string', 'namespaceuri'=>'string'],
'XMLReader::getParserProperty' => ['bool', 'property'=>'int'],
'XMLReader::isValid' => ['bool'],
'XMLReader::lookupNamespace' => ['?string', 'prefix'=>'string'],
'XMLReader::moveToAttribute' => ['bool', 'name'=>'string'],
'XMLReader::moveToAttributeNo' => ['bool', 'index'=>'int'],
'XMLReader::moveToAttributeNs' => ['bool', 'localname'=>'string', 'namespaceuri'=>'string'],
'XMLReader::moveToElement' => ['bool'],
'XMLReader::moveToFirstAttribute' => ['bool'],
'XMLReader::moveToNextAttribute' => ['bool'],
'XMLReader::next' => ['bool', 'localname='=>'string'],
'XMLReader::open' => ['bool|XMLReader', 'uri'=>'string', 'encoding='=>'?string', 'options='=>'int'],
'XMLReader::read' => ['bool'],
'XMLReader::readInnerXML' => ['string'],
'XMLReader::readOuterXML' => ['string'],
'XMLReader::readString' => ['string'],
'XMLReader::setParserProperty' => ['bool', 'property'=>'int', 'value'=>'bool'],
'XMLReader::setRelaxNGSchema' => ['bool', 'filename'=>'string'],
'XMLReader::setRelaxNGSchemaSource' => ['bool', 'source'=>'string'],
'XMLReader::setSchema' => ['bool', 'filename'=>'string'],
'XMLReader::XML' => ['bool|XMLReader', 'source'=>'string', 'encoding='=>'?string', 'options='=>'int'],
'xmlrpc_decode' => ['?array', 'xml'=>'string', 'encoding='=>'string'],
'xmlrpc_decode_request' => ['?array', 'xml'=>'string', '&w_method'=>'string', 'encoding='=>'string'],
'xmlrpc_encode' => ['string', 'value'=>'mixed'],
'xmlrpc_encode_request' => ['string', 'method'=>'string', 'params'=>'mixed', 'output_options='=>'array'],
'xmlrpc_get_type' => ['string', 'value'=>'mixed'],
'xmlrpc_is_fault' => ['bool', 'arg'=>'array'],
'xmlrpc_parse_method_descriptions' => ['array', 'xml'=>'string'],
'xmlrpc_server_add_introspection_data' => ['int', 'server'=>'resource', 'desc'=>'array'],
'xmlrpc_server_call_method' => ['string', 'server'=>'resource', 'xml'=>'string', 'user_data'=>'mixed', 'output_options='=>'array'],
'xmlrpc_server_create' => ['resource'],
'xmlrpc_server_destroy' => ['int', 'server'=>'resource'],
'xmlrpc_server_register_introspection_callback' => ['bool', 'server'=>'resource', 'function'=>'string'],
'xmlrpc_server_register_method' => ['bool', 'server'=>'resource', 'method_name'=>'string', 'function'=>'string'],
'xmlrpc_set_type' => ['bool', '&rw_value'=>'string|DateTime', 'type'=>'string'],
'XMLWriter::endAttribute' => ['bool'],
'XMLWriter::endCData' => ['bool'],
'XMLWriter::endComment' => ['bool'],
'XMLWriter::endDocument' => ['bool'],
'XMLWriter::endDTD' => ['bool', 'xmlwriter='=>''],
'XMLWriter::endDTDAttlist' => ['bool'],
'XMLWriter::endDTDElement' => ['bool'],
'XMLWriter::endDTDEntity' => ['bool'],
'XMLWriter::endElement' => ['bool'],
'XMLWriter::endPI' => ['bool'],
'XMLWriter::flush' => ['', 'empty='=>'bool', 'xmlwriter='=>''],
'XMLWriter::fullEndElement' => ['bool'],
'XMLWriter::openMemory' => ['bool'],
'XMLWriter::openURI' => ['bool', 'uri'=>'string'],
'XMLWriter::outputMemory' => ['string', 'flush='=>'bool', 'xmlwriter='=>''],
'XMLWriter::setIndent' => ['bool', 'indent'=>'bool'],
'XMLWriter::setIndentString' => ['bool', 'indentstring'=>'string'],
'XMLWriter::startAttribute' => ['bool', 'name'=>'string'],
'XMLWriter::startAttributeNS' => ['bool', 'prefix'=>'string|null', 'name'=>'string', 'uri'=>'string'],
'XMLWriter::startCData' => ['bool'],
'XMLWriter::startComment' => ['bool'],
'XMLWriter::startDocument' => ['bool', 'version='=>'string', 'encoding='=>'string', 'standalone='=>'string'],
'XMLWriter::startDTD' => ['bool', 'qualifiedname'=>'string', 'publicid='=>'string', 'systemid='=>'string'],
'XMLWriter::startDTDAttlist' => ['bool', 'name'=>'string'],
'XMLWriter::startDTDElement' => ['bool', 'qualifiedname'=>'string'],
'XMLWriter::startDTDEntity' => ['bool', 'name'=>'string', 'isparam'=>'bool'],
'XMLWriter::startElement' => ['bool', 'name'=>'string'],
'XMLWriter::startElementNS' => ['bool', 'prefix'=>'string|null', 'name'=>'string', 'uri'=>'string|null'],
'XMLWriter::startPI' => ['bool', 'target'=>'string'],
'XMLWriter::text' => ['bool', 'content'=>'string'],
'XMLWriter::writeAttribute' => ['bool', 'name'=>'string', 'value'=>'string'],
'XMLWriter::writeAttributeNS' => ['bool', 'prefix'=>'string|null', 'name'=>'string', 'uri'=>'string', 'content'=>'string'],
'XMLWriter::writeCData' => ['bool', 'content'=>'string'],
'XMLWriter::writeComment' => ['bool', 'content'=>'string'],
'XMLWriter::writeDTD' => ['bool', 'name'=>'string', 'publicid='=>'string', 'systemid='=>'string', 'subset='=>'string'],
'XMLWriter::writeDTDAttlist' => ['bool', 'name'=>'string', 'content'=>'string'],
'XMLWriter::writeDTDElement' => ['bool', 'name'=>'string', 'content'=>'string'],
'XMLWriter::writeDTDEntity' => ['bool', 'name'=>'string', 'content'=>'string', 'pe'=>'bool', 'pubid'=>'string', 'sysid'=>'string', 'ndataid'=>'string'],
'XMLWriter::writeElement' => ['bool', 'name'=>'string', 'content='=>'string|null'],
'XMLWriter::writeElementNS' => ['bool', 'prefix'=>'string|null', 'name'=>'string', 'uri'=>'string', 'content='=>'string|null'],
'XMLWriter::writePI' => ['bool', 'target'=>'string', 'content'=>'string'],
'XMLWriter::writeRaw' => ['bool', 'content'=>'string'],
'xmlwriter_end_attribute' => ['bool', 'xmlwriter'=>'resource'],
'xmlwriter_end_cdata' => ['bool', 'xmlwriter'=>'resource'],
'xmlwriter_end_comment' => ['bool', 'xmlwriter'=>'resource'],
'xmlwriter_end_document' => ['bool', 'xmlwriter'=>'resource'],
'xmlwriter_end_dtd' => ['bool', 'xmlwriter'=>'resource'],
'xmlwriter_end_dtd_attlist' => ['bool', 'xmlwriter'=>'resource'],
'xmlwriter_end_dtd_element' => ['bool', 'xmlwriter'=>'resource'],
'xmlwriter_end_dtd_entity' => ['bool', 'xmlwriter'=>'resource'],
'xmlwriter_end_element' => ['bool', 'xmlwriter'=>'resource'],
'xmlwriter_end_pi' => ['bool', 'xmlwriter'=>'resource'],
'xmlwriter_flush' => ['', 'xmlwriter'=>'resource', 'empty='=>'bool'],
'xmlwriter_full_end_element' => ['bool', 'xmlwriter'=>'resource'],
'xmlwriter_open_memory' => ['resource|false'],
'xmlwriter_open_uri' => ['resource|false', 'source'=>'string'],
'xmlwriter_output_memory' => ['string', 'xmlwriter'=>'resource', 'flush='=>'bool'],
'xmlwriter_set_indent' => ['bool', 'xmlwriter'=>'resource', 'indent'=>'bool'],
'xmlwriter_set_indent_string' => ['bool', 'xmlwriter'=>'resource', 'indentstring'=>'string'],
'xmlwriter_start_attribute' => ['bool', 'xmlwriter'=>'resource', 'name'=>'string'],
'xmlwriter_start_attribute_ns' => ['bool', 'xmlwriter'=>'resource', 'prefix'=>'string|null', 'name'=>'string', 'uri'=>'string'],
'xmlwriter_start_cdata' => ['bool', 'xmlwriter'=>'resource'],
'xmlwriter_start_comment' => ['bool', 'xmlwriter'=>'resource'],
'xmlwriter_start_document' => ['bool', 'xmlwriter'=>'resource', 'version'=>'string', 'encoding'=>'string', 'standalone'=>'string'],
'xmlwriter_start_dtd' => ['bool', 'xmlwriter'=>'resource', 'name'=>'string', 'pubid'=>'string', 'sysid'=>'string'],
'xmlwriter_start_dtd_attlist' => ['bool', 'xmlwriter'=>'resource', 'name'=>'string'],
'xmlwriter_start_dtd_element' => ['bool', 'xmlwriter'=>'resource', 'name'=>'string'],
'xmlwriter_start_dtd_entity' => ['bool', 'xmlwriter'=>'resource', 'name'=>'string', 'isparam'=>'bool'],
'xmlwriter_start_element' => ['bool', 'xmlwriter'=>'resource', 'name'=>'string'],
'xmlwriter_start_element_ns' => ['bool', 'xmlwriter'=>'resource', 'prefix'=>'string|null', 'name'=>'string', 'uri'=>'string|null'],
'xmlwriter_start_pi' => ['bool', 'xmlwriter'=>'resource', 'target'=>'string'],
'xmlwriter_text' => ['bool', 'xmlwriter'=>'resource', 'content'=>'string'],
'xmlwriter_write_attribute' => ['bool', 'xmlwriter'=>'resource', 'name'=>'string', 'content'=>'string'],
'xmlwriter_write_attribute_ns' => ['bool', 'xmlwriter'=>'resource', 'prefix'=>'string|null', 'name'=>'string', 'uri'=>'string', 'content'=>'string'],
'xmlwriter_write_cdata' => ['bool', 'xmlwriter'=>'resource', 'content'=>'string'],
'xmlwriter_write_comment' => ['bool', 'xmlwriter'=>'resource', 'content'=>'string'],
'xmlwriter_write_dtd' => ['bool', 'xmlwriter'=>'resource', 'name'=>'string', 'pubid'=>'string', 'sysid'=>'string', 'subset'=>'string'],
'xmlwriter_write_dtd_attlist' => ['bool', 'xmlwriter'=>'resource', 'name'=>'string', 'content'=>'string'],
'xmlwriter_write_dtd_element' => ['bool', 'xmlwriter'=>'resource', 'name'=>'string', 'content'=>'string'],
'xmlwriter_write_dtd_entity' => ['bool', 'xmlwriter'=>'resource', 'name'=>'string', 'content'=>'string', 'pe'=>'int', 'pubid'=>'string', 'sysid'=>'string', 'ndataid'=>'string'],
'xmlwriter_write_element' => ['bool', 'xmlwriter'=>'resource', 'name'=>'string', 'content'=>'string'],
'xmlwriter_write_element_ns' => ['bool', 'xmlwriter'=>'resource', 'prefix'=>'string|null', 'name'=>'string', 'uri'=>'string', 'content'=>'string'],
'xmlwriter_write_pi' => ['bool', 'xmlwriter'=>'resource', 'target'=>'string', 'content'=>'string'],
'xmlwriter_write_raw' => ['bool', 'xmlwriter'=>'resource', 'content'=>'string'],
'xpath_new_context' => ['XPathContext', 'dom_document'=>'DOMDocument'],
'xpath_register_ns' => ['bool', 'xpath_context'=>'xpathcontext', 'prefix'=>'string', 'uri'=>'string'],
'xpath_register_ns_auto' => ['bool', 'xpath_context'=>'xpathcontext', 'context_node='=>'object'],
'xptr_new_context' => ['XPathContext'],
'xsl_xsltprocessor_get_parameter' => ['string', 'namespace'=>'string', 'name'=>'string'],
'xsl_xsltprocessor_get_security_prefs' => ['int'],
'xsl_xsltprocessor_has_exslt_support' => ['bool'],
'xsl_xsltprocessor_register_php_functions' => ['', 'restrict'=>''],
'xsl_xsltprocessor_remove_parameter' => ['bool', 'namespace'=>'string', 'name'=>'string'],
'xsl_xsltprocessor_set_parameter' => ['bool', 'namespace'=>'string', 'name'=>'', 'value'=>'string'],
'xsl_xsltprocessor_set_profiling' => ['bool', 'filename'=>'string'],
'xsl_xsltprocessor_set_security_prefs' => ['int', 'securityprefs'=>'int'],
'xsl_xsltprocessor_transform_to_uri' => ['int', 'doc'=>'DOMDocument', 'uri'=>'string'],
'xsl_xsltprocessor_transform_to_xml' => ['string', 'doc'=>'DOMDocument'],
'xslt_backend_info' => ['string'],
'xslt_backend_name' => ['string'],
'xslt_backend_version' => ['string'],
'xslt_create' => ['resource'],
'xslt_errno' => ['int', 'xh'=>''],
'xslt_error' => ['string', 'xh'=>''],
'xslt_free' => ['', 'xh'=>''],
'xslt_getopt' => ['int', 'processor'=>''],
'xslt_process' => ['', 'xh'=>'', 'xmlcontainer'=>'string', 'xslcontainer'=>'string', 'resultcontainer='=>'string', 'arguments='=>'array', 'parameters='=>'array'],
'xslt_set_base' => ['', 'xh'=>'', 'uri'=>'string'],
'xslt_set_encoding' => ['', 'xh'=>'', 'encoding'=>'string'],
'xslt_set_error_handler' => ['', 'xh'=>'', 'handler'=>''],
'xslt_set_log' => ['', 'xh'=>'', 'log='=>''],
'xslt_set_object' => ['bool', 'processor'=>'', 'obj'=>'object'],
'xslt_set_sax_handler' => ['', 'xh'=>'', 'handlers'=>'array'],
'xslt_set_sax_handlers' => ['', 'processor'=>'', 'handlers'=>'array'],
'xslt_set_scheme_handler' => ['', 'xh'=>'', 'handlers'=>'array'],
'xslt_set_scheme_handlers' => ['', 'xh'=>'', 'handlers'=>'array'],
'xslt_setopt' => ['', 'processor'=>'', 'newmask'=>'int'],
'XSLTProcessor::getParameter' => ['string|false', 'namespaceuri'=>'string', 'localname'=>'string'],
'XsltProcessor::getSecurityPrefs' => ['int'],
'XSLTProcessor::hasExsltSupport' => ['bool'],
'XSLTProcessor::importStylesheet' => ['bool', 'stylesheet'=>'object'],
'XSLTProcessor::registerPHPFunctions' => ['void', 'restrict='=>'mixed'],
'XSLTProcessor::removeParameter' => ['bool', 'namespaceuri'=>'string', 'localname'=>'string'],
'XSLTProcessor::setParameter' => ['bool', 'namespace'=>'string', 'name'=>'string', 'value'=>'string'],
'XSLTProcessor::setParameter\'1' => ['bool', 'namespace'=>'string', 'options'=>'array'],
'XSLTProcessor::setProfiling' => ['bool', 'filename'=>'string'],
'XsltProcessor::setSecurityPrefs' => ['int', 'securityPrefs'=>'int'],
'XSLTProcessor::transformToDoc' => ['DOMDocument|false', 'doc'=>'DOMNode'],
'XSLTProcessor::transformToURI' => ['int', 'doc'=>'DOMDocument', 'uri'=>'string'],
'XSLTProcessor::transformToXML' => ['string|false|null', 'doc'=>'DOMDocument|SimpleXMLElement'],
'Yaconf::get' => ['mixed', 'name'=>'string', 'default_value='=>'mixed'],
'Yaconf::has' => ['bool', 'name'=>'string'],
'Yaf_Action_Abstract::__construct' => ['void', 'request'=>'Yaf_Request_Abstract', 'response'=>'Yaf_Response_Abstract', 'view'=>'Yaf_View_Interface', 'invokeArgs='=>'?array'],
'Yaf_Action_Abstract::display' => ['bool', 'tpl'=>'string', 'parameters='=>'?array'],
'Yaf_Action_Abstract::execute' => ['mixed', 'arg='=>'mixed', '...args='=>'mixed'],
'Yaf_Action_Abstract::forward' => ['bool', 'module'=>'string', 'controller='=>'string', 'action='=>'string', 'parameters='=>'?array'],
'Yaf_Action_Abstract::getController' => ['Yaf_Controller_Abstract'],
'Yaf_Action_Abstract::getInvokeArg' => ['mixed|null', 'name'=>'string'],
'Yaf_Action_Abstract::getInvokeArgs' => ['array'],
'Yaf_Action_Abstract::getModuleName' => ['string'],
'Yaf_Action_Abstract::getRequest' => ['Yaf_Request_Abstract'],
'Yaf_Action_Abstract::getResponse' => ['Yaf_Response_Abstract'],
'Yaf_Action_Abstract::getView' => ['Yaf_View_Interface'],
'Yaf_Action_Abstract::getViewpath' => ['string'],
'Yaf_Action_Abstract::init' => [''],
'Yaf_Action_Abstract::initView' => ['Yaf_Response_Abstract', 'options='=>'?array'],
'Yaf_Action_Abstract::redirect' => ['bool', 'url'=>'string'],
'Yaf_Action_Abstract::render' => ['string', 'tpl'=>'string', 'parameters='=>'?array'],
'Yaf_Action_Abstract::setViewpath' => ['bool', 'view_directory'=>'string'],
'Yaf_Application::__clone' => ['void'],
'Yaf_Application::__construct' => ['void', 'config'=>'mixed', 'envrion='=>'string'],
'Yaf_Application::__destruct' => ['void'],
'Yaf_Application::__sleep' => ['list<string>'],
'Yaf_Application::__wakeup' => ['void'],
'Yaf_Application::app' => ['void'],
'Yaf_Application::bootstrap' => ['void', 'bootstrap='=>'Yaf_Bootstrap_Abstract'],
'Yaf_Application::clearLastError' => ['Yaf_Application'],
'Yaf_Application::environ' => ['void'],
'Yaf_Application::execute' => ['void', 'entry'=>'callable', '...args'=>'string'],
'Yaf_Application::getAppDirectory' => ['Yaf_Application'],
'Yaf_Application::getConfig' => ['Yaf_Config_Abstract'],
'Yaf_Application::getDispatcher' => ['Yaf_Dispatcher'],
'Yaf_Application::getLastErrorMsg' => ['string'],
'Yaf_Application::getLastErrorNo' => ['int'],
'Yaf_Application::getModules' => ['array'],
'Yaf_Application::run' => ['void'],
'Yaf_Application::setAppDirectory' => ['Yaf_Application', 'directory'=>'string'],
'Yaf_Config_Abstract::get' => ['mixed', 'name'=>'string', 'value'=>'mixed'],
'Yaf_Config_Abstract::readonly' => ['bool'],
'Yaf_Config_Abstract::set' => ['Yaf_Config_Abstract'],
'Yaf_Config_Abstract::toArray' => ['array'],
'Yaf_Config_Ini::__construct' => ['void', 'config_file'=>'string', 'section='=>'string'],
'Yaf_Config_Ini::__get' => ['void', 'name='=>'string'],
'Yaf_Config_Ini::__isset' => ['void', 'name'=>'string'],
'Yaf_Config_Ini::__set' => ['void', 'name'=>'string', 'value'=>'mixed'],
'Yaf_Config_Ini::count' => ['0|positive-int'],
'Yaf_Config_Ini::current' => ['void'],
'Yaf_Config_Ini::get' => ['mixed', 'name='=>'mixed'],
'Yaf_Config_Ini::key' => ['void'],
'Yaf_Config_Ini::next' => ['void'],
'Yaf_Config_Ini::offsetExists' => ['void', 'name'=>'string'],
'Yaf_Config_Ini::offsetGet' => ['void', 'name'=>'string'],
'Yaf_Config_Ini::offsetSet' => ['void', 'name'=>'string', 'value'=>'string'],
'Yaf_Config_Ini::offsetUnset' => ['void', 'name'=>'string'],
'Yaf_Config_Ini::readonly' => ['void'],
'Yaf_Config_Ini::rewind' => ['void'],
'Yaf_Config_Ini::set' => ['Yaf_Config_Abstract', 'name'=>'string', 'value'=>'mixed'],
'Yaf_Config_Ini::toArray' => ['array'],
'Yaf_Config_Ini::valid' => ['void'],
'Yaf_Config_Simple::__construct' => ['void', 'config_file'=>'string', 'section='=>'string'],
'Yaf_Config_Simple::__get' => ['void', 'name='=>'string'],
'Yaf_Config_Simple::__isset' => ['void', 'name'=>'string'],
'Yaf_Config_Simple::__set' => ['void', 'name'=>'string', 'value'=>'string'],
'Yaf_Config_Simple::count' => ['0|positive-int'],
'Yaf_Config_Simple::current' => ['void'],
'Yaf_Config_Simple::get' => ['mixed', 'name='=>'mixed'],
'Yaf_Config_Simple::key' => ['void'],
'Yaf_Config_Simple::next' => ['void'],
'Yaf_Config_Simple::offsetExists' => ['void', 'name'=>'string'],
'Yaf_Config_Simple::offsetGet' => ['void', 'name'=>'string'],
'Yaf_Config_Simple::offsetSet' => ['void', 'name'=>'string', 'value'=>'string'],
'Yaf_Config_Simple::offsetUnset' => ['void', 'name'=>'string'],
'Yaf_Config_Simple::readonly' => ['void'],
'Yaf_Config_Simple::rewind' => ['void'],
'Yaf_Config_Simple::set' => ['Yaf_Config_Abstract', 'name'=>'string', 'value'=>'mixed'],
'Yaf_Config_Simple::toArray' => ['array'],
'Yaf_Config_Simple::valid' => ['void'],
'Yaf_Controller_Abstract::__clone' => ['void'],
'Yaf_Controller_Abstract::__construct' => ['void'],
'Yaf_Controller_Abstract::display' => ['bool', 'tpl'=>'string', 'parameters='=>'array'],
'Yaf_Controller_Abstract::forward' => ['void', 'action'=>'string', 'parameters='=>'array'],
'Yaf_Controller_Abstract::forward\'1' => ['void', 'controller'=>'string', 'action'=>'string', 'parameters='=>'array'],
'Yaf_Controller_Abstract::forward\'2' => ['void', 'module'=>'string', 'controller'=>'string', 'action'=>'string', 'parameters='=>'array'],
'Yaf_Controller_Abstract::getInvokeArg' => ['void', 'name'=>'string'],
'Yaf_Controller_Abstract::getInvokeArgs' => ['void'],
'Yaf_Controller_Abstract::getModuleName' => ['string'],
'Yaf_Controller_Abstract::getRequest' => ['Yaf_Request_Abstract'],
'Yaf_Controller_Abstract::getResponse' => ['Yaf_Response_Abstract'],
'Yaf_Controller_Abstract::getView' => ['Yaf_View_Interface'],
'Yaf_Controller_Abstract::getViewpath' => ['void'],
'Yaf_Controller_Abstract::init' => ['void'],
'Yaf_Controller_Abstract::initView' => ['void', 'options='=>'array'],
'Yaf_Controller_Abstract::redirect' => ['bool', 'url'=>'string'],
'Yaf_Controller_Abstract::render' => ['string', 'tpl'=>'string', 'parameters='=>'array'],
'Yaf_Controller_Abstract::setViewpath' => ['void', 'view_directory'=>'string'],
'Yaf_Dispatcher::__clone' => ['void'],
'Yaf_Dispatcher::__construct' => ['void'],
'Yaf_Dispatcher::__sleep' => ['list<string>'],
'Yaf_Dispatcher::__wakeup' => ['void'],
'Yaf_Dispatcher::autoRender' => ['Yaf_Dispatcher', 'flag='=>'bool'],
'Yaf_Dispatcher::catchException' => ['Yaf_Dispatcher', 'flag='=>'bool'],
'Yaf_Dispatcher::disableView' => ['bool'],
'Yaf_Dispatcher::dispatch' => ['Yaf_Response_Abstract', 'request'=>'Yaf_Request_Abstract'],
'Yaf_Dispatcher::enableView' => ['Yaf_Dispatcher'],
'Yaf_Dispatcher::flushInstantly' => ['Yaf_Dispatcher', 'flag='=>'bool'],
'Yaf_Dispatcher::getApplication' => ['Yaf_Application'],
'Yaf_Dispatcher::getInstance' => ['Yaf_Dispatcher'],
'Yaf_Dispatcher::getRequest' => ['Yaf_Request_Abstract'],
'Yaf_Dispatcher::getRouter' => ['Yaf_Router'],
'Yaf_Dispatcher::initView' => ['Yaf_View_Interface', 'templates_dir'=>'string', 'options='=>'array'],
'Yaf_Dispatcher::registerPlugin' => ['Yaf_Dispatcher', 'plugin'=>'Yaf_Plugin_Abstract'],
'Yaf_Dispatcher::returnResponse' => ['Yaf_Dispatcher', 'flag'=>'bool'],
'Yaf_Dispatcher::setDefaultAction' => ['Yaf_Dispatcher', 'action'=>'string'],
'Yaf_Dispatcher::setDefaultController' => ['Yaf_Dispatcher', 'controller'=>'string'],
'Yaf_Dispatcher::setDefaultModule' => ['Yaf_Dispatcher', 'module'=>'string'],
'Yaf_Dispatcher::setErrorHandler' => ['Yaf_Dispatcher', 'callback'=>'call', 'error_types'=>'int'],
'Yaf_Dispatcher::setRequest' => ['Yaf_Dispatcher', 'request'=>'Yaf_Request_Abstract'],
'Yaf_Dispatcher::setView' => ['Yaf_Dispatcher', 'view'=>'Yaf_View_Interface'],
'Yaf_Dispatcher::throwException' => ['Yaf_Dispatcher', 'flag='=>'bool'],
'Yaf_Exception::__construct' => ['void'],
'Yaf_Exception::getPrevious' => ['void'],
'Yaf_Loader::__clone' => ['void'],
'Yaf_Loader::__construct' => ['void'],
'Yaf_Loader::__sleep' => ['list<string>'],
'Yaf_Loader::__wakeup' => ['void'],
'Yaf_Loader::autoload' => ['void'],
'Yaf_Loader::clearLocalNamespace' => ['void'],
'Yaf_Loader::getInstance' => ['void'],
'Yaf_Loader::getLibraryPath' => ['Yaf_Loader', 'is_global='=>'bool'],
'Yaf_Loader::getLocalNamespace' => ['void'],
'Yaf_Loader::import' => ['void'],
'Yaf_Loader::isLocalName' => ['void'],
'Yaf_Loader::registerLocalNamespace' => ['void', 'prefix'=>'mixed'],
'Yaf_Loader::setLibraryPath' => ['Yaf_Loader', 'directory'=>'string', 'is_global='=>'bool'],
'Yaf_Plugin_Abstract::dispatchLoopShutdown' => ['void', 'request'=>'Yaf_Request_Abstract', 'response'=>'Yaf_Response_Abstract'],
'Yaf_Plugin_Abstract::dispatchLoopStartup' => ['void', 'request'=>'Yaf_Request_Abstract', 'response'=>'Yaf_Response_Abstract'],
'Yaf_Plugin_Abstract::postDispatch' => ['void', 'request'=>'Yaf_Request_Abstract', 'response'=>'Yaf_Response_Abstract'],
'Yaf_Plugin_Abstract::preDispatch' => ['void', 'request'=>'Yaf_Request_Abstract', 'response'=>'Yaf_Response_Abstract'],
'Yaf_Plugin_Abstract::preResponse' => ['void', 'request'=>'Yaf_Request_Abstract', 'response'=>'Yaf_Response_Abstract'],
'Yaf_Plugin_Abstract::routerShutdown' => ['void', 'request'=>'Yaf_Request_Abstract', 'response'=>'Yaf_Response_Abstract'],
'Yaf_Plugin_Abstract::routerStartup' => ['void', 'request'=>'Yaf_Request_Abstract', 'response'=>'Yaf_Response_Abstract'],
'Yaf_Registry::__clone' => ['void'],
'Yaf_Registry::__construct' => ['void'],
'Yaf_Registry::del' => ['void', 'name'=>'string'],
'Yaf_Registry::get' => ['mixed', 'name'=>'string'],
'Yaf_Registry::has' => ['bool', 'name'=>'string'],
'Yaf_Registry::set' => ['bool', 'name'=>'string', 'value'=>'string'],
'Yaf_Request_Abstract::getActionName' => ['void'],
'Yaf_Request_Abstract::getBaseUri' => ['void'],
'Yaf_Request_Abstract::getControllerName' => ['void'],
'Yaf_Request_Abstract::getEnv' => ['void', 'name'=>'string', 'default='=>'string'],
'Yaf_Request_Abstract::getException' => ['void'],
'Yaf_Request_Abstract::getLanguage' => ['void'],
'Yaf_Request_Abstract::getMethod' => ['void'],
'Yaf_Request_Abstract::getModuleName' => ['void'],
'Yaf_Request_Abstract::getParam' => ['void', 'name'=>'string', 'default='=>'string'],
'Yaf_Request_Abstract::getParams' => ['void'],
'Yaf_Request_Abstract::getRequestUri' => ['void'],
'Yaf_Request_Abstract::getServer' => ['void', 'name'=>'string', 'default='=>'string'],
'Yaf_Request_Abstract::isCli' => ['void'],
'Yaf_Request_Abstract::isDispatched' => ['void'],
'Yaf_Request_Abstract::isGet' => ['void'],
'Yaf_Request_Abstract::isHead' => ['void'],
'Yaf_Request_Abstract::isOptions' => ['void'],
'Yaf_Request_Abstract::isPost' => ['void'],
'Yaf_Request_Abstract::isPut' => ['void'],
'Yaf_Request_Abstract::isRouted' => ['void'],
'Yaf_Request_Abstract::isXmlHttpRequest' => ['void'],
'Yaf_Request_Abstract::setActionName' => ['void', 'action'=>'string'],
'Yaf_Request_Abstract::setBaseUri' => ['bool', 'uir'=>'string'],
'Yaf_Request_Abstract::setControllerName' => ['void', 'controller'=>'string'],
'Yaf_Request_Abstract::setDispatched' => ['void'],
'Yaf_Request_Abstract::setModuleName' => ['void', 'module'=>'string'],
'Yaf_Request_Abstract::setParam' => ['void', 'name'=>'string', 'value='=>'string'],
'Yaf_Request_Abstract::setRequestUri' => ['void', 'uir'=>'string'],
'Yaf_Request_Abstract::setRouted' => ['void', 'flag='=>'string'],
'Yaf_Request_Http::__clone' => ['void'],
'Yaf_Request_Http::__construct' => ['void'],
'Yaf_Request_Http::get' => ['mixed', 'name'=>'string', 'default='=>'string'],
'Yaf_Request_Http::getActionName' => ['string'],
'Yaf_Request_Http::getBaseUri' => ['string'],
'Yaf_Request_Http::getControllerName' => ['string'],
'Yaf_Request_Http::getCookie' => ['mixed', 'name'=>'string', 'default='=>'string'],
'Yaf_Request_Http::getEnv' => ['mixed', 'name='=>'string', 'default='=>'mixed'],
'Yaf_Request_Http::getException' => ['Yaf_Exception'],
'Yaf_Request_Http::getFiles' => ['void'],
'Yaf_Request_Http::getLanguage' => ['string'],
'Yaf_Request_Http::getMethod' => ['string'],
'Yaf_Request_Http::getModuleName' => ['string'],
'Yaf_Request_Http::getParam' => ['mixed', 'name'=>'string', 'default='=>'mixed'],
'Yaf_Request_Http::getParams' => ['array'],
'Yaf_Request_Http::getPost' => ['mixed', 'name'=>'string', 'default='=>'string'],
'Yaf_Request_Http::getQuery' => ['mixed', 'name'=>'string', 'default='=>'string'],
'Yaf_Request_Http::getRaw' => ['mixed'],
'Yaf_Request_Http::getRequest' => ['void'],
'Yaf_Request_Http::getRequestUri' => ['string'],
'Yaf_Request_Http::getServer' => ['mixed', 'name='=>'string', 'default='=>'mixed'],
'Yaf_Request_Http::isCli' => ['bool'],
'Yaf_Request_Http::isDispatched' => ['bool'],
'Yaf_Request_Http::isGet' => ['bool'],
'Yaf_Request_Http::isHead' => ['bool'],
'Yaf_Request_Http::isOptions' => ['bool'],
'Yaf_Request_Http::isPost' => ['bool'],
'Yaf_Request_Http::isPut' => ['bool'],
'Yaf_Request_Http::isRouted' => ['bool'],
'Yaf_Request_Http::isXmlHttpRequest' => ['bool'],
'Yaf_Request_Http::setActionName' => ['Yaf_Request_Abstract|bool', 'action'=>'string'],
'Yaf_Request_Http::setBaseUri' => ['bool', 'uri'=>'string'],
'Yaf_Request_Http::setControllerName' => ['Yaf_Request_Abstract|bool', 'controller'=>'string'],
'Yaf_Request_Http::setDispatched' => ['bool'],
'Yaf_Request_Http::setModuleName' => ['Yaf_Request_Abstract|bool', 'module'=>'string'],
'Yaf_Request_Http::setParam' => ['Yaf_Request_Abstract|bool', 'name'=>'array|string', 'value='=>'string'],
'Yaf_Request_Http::setRequestUri' => ['', 'uri'=>'string'],
'Yaf_Request_Http::setRouted' => ['Yaf_Request_Abstract|bool'],
'Yaf_Request_Simple::__clone' => ['void'],
'Yaf_Request_Simple::__construct' => ['void'],
'Yaf_Request_Simple::get' => ['void'],
'Yaf_Request_Simple::getActionName' => ['string'],
'Yaf_Request_Simple::getBaseUri' => ['string'],
'Yaf_Request_Simple::getControllerName' => ['string'],
'Yaf_Request_Simple::getCookie' => ['void'],
'Yaf_Request_Simple::getEnv' => ['mixed', 'name='=>'string', 'default='=>'mixed'],
'Yaf_Request_Simple::getException' => ['Yaf_Exception'],
'Yaf_Request_Simple::getFiles' => ['void'],
'Yaf_Request_Simple::getLanguage' => ['string'],
'Yaf_Request_Simple::getMethod' => ['string'],
'Yaf_Request_Simple::getModuleName' => ['string'],
'Yaf_Request_Simple::getParam' => ['mixed', 'name'=>'string', 'default='=>'mixed'],
'Yaf_Request_Simple::getParams' => ['array'],
'Yaf_Request_Simple::getPost' => ['void'],
'Yaf_Request_Simple::getQuery' => ['void'],
'Yaf_Request_Simple::getRequest' => ['void'],
'Yaf_Request_Simple::getRequestUri' => ['string'],
'Yaf_Request_Simple::getServer' => ['mixed', 'name='=>'string', 'default='=>'mixed'],
'Yaf_Request_Simple::isCli' => ['bool'],
'Yaf_Request_Simple::isDispatched' => ['bool'],
'Yaf_Request_Simple::isGet' => ['bool'],
'Yaf_Request_Simple::isHead' => ['bool'],
'Yaf_Request_Simple::isOptions' => ['bool'],
'Yaf_Request_Simple::isPost' => ['bool'],
'Yaf_Request_Simple::isPut' => ['bool'],
'Yaf_Request_Simple::isRouted' => ['bool'],
'Yaf_Request_Simple::isXmlHttpRequest' => ['void'],
'Yaf_Request_Simple::setActionName' => ['Yaf_Request_Abstract|bool', 'action'=>'string'],
'Yaf_Request_Simple::setBaseUri' => ['bool', 'uri'=>'string'],
'Yaf_Request_Simple::setControllerName' => ['Yaf_Request_Abstract|bool', 'controller'=>'string'],
'Yaf_Request_Simple::setDispatched' => ['bool'],
'Yaf_Request_Simple::setModuleName' => ['Yaf_Request_Abstract|bool', 'module'=>'string'],
'Yaf_Request_Simple::setParam' => ['Yaf_Request_Abstract|bool', 'name'=>'array|string', 'value='=>'string'],
'Yaf_Request_Simple::setRequestUri' => ['', 'uri'=>'string'],
'Yaf_Request_Simple::setRouted' => ['Yaf_Request_Abstract|bool'],
'Yaf_Response_Abstract::__clone' => ['void'],
'Yaf_Response_Abstract::__construct' => ['void'],
'Yaf_Response_Abstract::__destruct' => ['void'],
'Yaf_Response_Abstract::__toString' => ['string'],
'Yaf_Response_Abstract::appendBody' => ['bool', 'content'=>'string', 'key='=>'string'],
'Yaf_Response_Abstract::clearBody' => ['bool', 'key='=>'string'],
'Yaf_Response_Abstract::clearHeaders' => ['void'],
'Yaf_Response_Abstract::getBody' => ['mixed', 'key='=>'string'],
'Yaf_Response_Abstract::getHeader' => ['void'],
'Yaf_Response_Abstract::prependBody' => ['bool', 'content'=>'string', 'key='=>'string'],
'Yaf_Response_Abstract::response' => ['void'],
'Yaf_Response_Abstract::setAllHeaders' => ['void'],
'Yaf_Response_Abstract::setBody' => ['bool', 'content'=>'string', 'key='=>'string'],
'Yaf_Response_Abstract::setHeader' => ['void'],
'Yaf_Response_Abstract::setRedirect' => ['void'],
'Yaf_Response_Cli::__clone' => [''],
'Yaf_Response_Cli::__construct' => ['void'],
'Yaf_Response_Cli::__destruct' => [''],
'Yaf_Response_Cli::__toString' => ['string'],
'Yaf_Response_Cli::appendBody' => ['bool', 'content'=>'string', 'key='=>'string'],
'Yaf_Response_Cli::clearBody' => ['bool', 'key='=>'string'],
'Yaf_Response_Cli::getBody' => ['mixed', 'key='=>'null|string'],
'Yaf_Response_Cli::prependBody' => ['bool', 'content'=>'string', 'key='=>'string'],
'Yaf_Response_Cli::setBody' => ['bool', 'content'=>'string', 'key='=>'string'],
'Yaf_Response_Http::__clone' => [''],
'Yaf_Response_Http::__construct' => ['void'],
'Yaf_Response_Http::__destruct' => [''],
'Yaf_Response_Http::__toString' => ['string'],
'Yaf_Response_Http::appendBody' => ['bool', 'content'=>'string', 'key='=>'string'],
'Yaf_Response_Http::clearBody' => ['bool', 'key='=>'string'],
'Yaf_Response_Http::clearHeaders' => ['Yaf_Response_Abstract|false', 'name='=>'string'],
'Yaf_Response_Http::getBody' => ['mixed', 'key='=>'null|string'],
'Yaf_Response_Http::getHeader' => ['mixed', 'name='=>'string'],
'Yaf_Response_Http::prependBody' => ['bool', 'content'=>'string', 'key='=>'string'],
'Yaf_Response_Http::response' => ['bool'],
'Yaf_Response_Http::setAllHeaders' => ['bool', 'headers'=>'array'],
'Yaf_Response_Http::setBody' => ['bool', 'content'=>'string', 'key='=>'string'],
'Yaf_Response_Http::setHeader' => ['bool', 'name'=>'string', 'value'=>'string', 'replace='=>'bool|false', 'response_code='=>'int'],
'Yaf_Response_Http::setRedirect' => ['bool', 'url'=>'string'],
'Yaf_Route_Interface::__construct' => ['void'],
'Yaf_Route_Interface::assemble' => ['string', 'info'=>'array', 'query='=>'array'],
'Yaf_Route_Interface::route' => ['bool', 'request'=>'Yaf_Request_Abstract'],
'Yaf_Route_Map::__construct' => ['void', 'controller_prefer='=>'string', 'delimiter='=>'string'],
'Yaf_Route_Map::assemble' => ['string', 'info'=>'array', 'query='=>'array'],
'Yaf_Route_Map::route' => ['bool', 'request'=>'Yaf_Request_Abstract'],
'Yaf_Route_Regex::__construct' => ['void', 'match'=>'string', 'route'=>'array', 'map='=>'array', 'verify='=>'array', 'reverse='=>'string'],
'Yaf_Route_Regex::addConfig' => ['Yaf_Router|bool', 'config'=>'Yaf_Config_Abstract'],
'Yaf_Route_Regex::addRoute' => ['Yaf_Router|bool', 'name'=>'string', 'route'=>'Yaf_Route_Interface'],
'Yaf_Route_Regex::assemble' => ['string', 'info'=>'array', 'query='=>'array'],
'Yaf_Route_Regex::getCurrentRoute' => ['string'],
'Yaf_Route_Regex::getRoute' => ['Yaf_Route_Interface', 'name'=>'string'],
'Yaf_Route_Regex::getRoutes' => ['Yaf_Route_Interface[]'],
'Yaf_Route_Regex::route' => ['bool', 'request'=>'Yaf_Request_Abstract'],
'Yaf_Route_Rewrite::__construct' => ['void', 'match'=>'string', 'route'=>'array', 'verify='=>'array'],
'Yaf_Route_Rewrite::addConfig' => ['Yaf_Router|bool', 'config'=>'Yaf_Config_Abstract'],
'Yaf_Route_Rewrite::addRoute' => ['Yaf_Router|bool', 'name'=>'string', 'route'=>'Yaf_Route_Interface'],
'Yaf_Route_Rewrite::assemble' => ['string', 'info'=>'array', 'query='=>'array'],
'Yaf_Route_Rewrite::getCurrentRoute' => ['string'],
'Yaf_Route_Rewrite::getRoute' => ['Yaf_Route_Interface', 'name'=>'string'],
'Yaf_Route_Rewrite::getRoutes' => ['Yaf_Route_Interface[]'],
'Yaf_Route_Rewrite::route' => ['bool', 'request'=>'Yaf_Request_Abstract'],
'Yaf_Route_Simple::__construct' => ['void', 'module_name'=>'string', 'controller_name'=>'string', 'action_name'=>'string'],
'Yaf_Route_Simple::assemble' => ['string', 'info'=>'array', 'query='=>'array'],
'Yaf_Route_Simple::route' => ['bool', 'request'=>'Yaf_Request_Abstract'],
'Yaf_Route_Static::assemble' => ['string', 'info'=>'array', 'query='=>'array'],
'Yaf_Route_Static::match' => ['void', 'uri'=>'string'],
'Yaf_Route_Static::route' => ['bool', 'request'=>'Yaf_Request_Abstract'],
'Yaf_Route_Supervar::__construct' => ['void', 'supervar_name'=>'string'],
'Yaf_Route_Supervar::assemble' => ['string', 'info'=>'array', 'query='=>'array'],
'Yaf_Route_Supervar::route' => ['bool', 'request'=>'Yaf_Request_Abstract'],
'Yaf_Router::__construct' => ['void'],
'Yaf_Router::addConfig' => ['bool', 'config'=>'Yaf_Config_Abstract'],
'Yaf_Router::addRoute' => ['bool', 'name'=>'string', 'route'=>'Yaf_Route_Abstract'],
'Yaf_Router::getCurrentRoute' => ['string'],
'Yaf_Router::getRoute' => ['Yaf_Route_Interface', 'name'=>'string'],
'Yaf_Router::getRoutes' => ['mixed'],
'Yaf_Router::route' => ['bool', 'request'=>'Yaf_Request_Abstract'],
'Yaf_Session::__clone' => ['void'],
'Yaf_Session::__construct' => ['void'],
'Yaf_Session::__get' => ['void', 'name'=>'string'],
'Yaf_Session::__isset' => ['void', 'name'=>'string'],
'Yaf_Session::__set' => ['void', 'name'=>'string', 'value'=>'string'],
'Yaf_Session::__sleep' => ['list<string>'],
'Yaf_Session::__unset' => ['void', 'name'=>'string'],
'Yaf_Session::__wakeup' => ['void'],
'Yaf_Session::count' => ['0|positive-int'],
'Yaf_Session::current' => ['void'],
'Yaf_Session::del' => ['void', 'name'=>'string'],
'Yaf_Session::get' => ['mixed', 'name'=>'string'],
'Yaf_Session::getInstance' => ['void'],
'Yaf_Session::has' => ['void', 'name'=>'string'],
'Yaf_Session::key' => ['void'],
'Yaf_Session::next' => ['void'],
'Yaf_Session::offsetExists' => ['void', 'name'=>'string'],
'Yaf_Session::offsetGet' => ['void', 'name'=>'string'],
'Yaf_Session::offsetSet' => ['void', 'name'=>'string', 'value'=>'string'],
'Yaf_Session::offsetUnset' => ['void', 'name'=>'string'],
'Yaf_Session::rewind' => ['void'],
'Yaf_Session::set' => ['Yaf_Session|bool', 'name'=>'string', 'value'=>'mixed'],
'Yaf_Session::start' => ['void'],
'Yaf_Session::valid' => ['void'],
'Yaf_View_Interface::assign' => ['bool', 'name'=>'string', 'value='=>'string'],
'Yaf_View_Interface::display' => ['bool', 'tpl'=>'string', 'tpl_vars='=>'array'],
'Yaf_View_Interface::getScriptPath' => ['void'],
'Yaf_View_Interface::render' => ['string', 'tpl'=>'string', 'tpl_vars='=>'array'],
'Yaf_View_Interface::setScriptPath' => ['void', 'template_dir'=>'string'],
'Yaf_View_Simple::__construct' => ['void', 'tempalte_dir'=>'string', 'options='=>'array'],
'Yaf_View_Simple::__get' => ['void', 'name='=>'string'],
'Yaf_View_Simple::__isset' => ['void', 'name'=>'string'],
'Yaf_View_Simple::__set' => ['void', 'name'=>'string', 'value'=>'mixed'],
'Yaf_View_Simple::assign' => ['bool', 'name'=>'string', 'value='=>'mixed'],
'Yaf_View_Simple::assignRef' => ['bool', 'name'=>'string', '&rw_value'=>'mixed'],
'Yaf_View_Simple::clear' => ['bool', 'name='=>'string'],
'Yaf_View_Simple::display' => ['bool', 'tpl'=>'string', 'tpl_vars='=>'array'],
'Yaf_View_Simple::eval' => ['string', 'tpl_content'=>'string', 'tpl_vars='=>'array'],
'Yaf_View_Simple::getScriptPath' => ['string'],
'Yaf_View_Simple::render' => ['string', 'tpl'=>'string', 'tpl_vars='=>'array'],
'Yaf_View_Simple::setScriptPath' => ['bool', 'template_dir'=>'string'],
'yaml_emit' => ['string', 'data'=>'mixed', 'encoding='=>'int', 'linebreak='=>'int'],
'yaml_emit_file' => ['bool', 'filename'=>'string', 'data'=>'mixed', 'encoding='=>'int', 'linebreak='=>'int'],
'yaml_parse' => ['mixed', 'input'=>'string', 'pos='=>'int', '&w_ndocs='=>'int', 'callbacks='=>'array'],
'yaml_parse_file' => ['mixed', 'filename'=>'string', 'pos='=>'int', '&w_ndocs='=>'int', 'callbacks='=>'array'],
'yaml_parse_url' => ['mixed', 'url'=>'string', 'pos='=>'int', '&w_ndocs='=>'int', 'callbacks='=>'array'],
'Yar_Client::__call' => ['void', 'method'=>'string', 'parameters'=>'array'],
'Yar_Client::__construct' => ['void', 'url'=>'string'],
'Yar_Client::setOpt' => ['bool', 'name'=>'int', 'value'=>'mixed'],
'Yar_Client_Exception::getType' => ['void'],
'Yar_Concurrent_Client::call' => ['int', 'uri'=>'string', 'method'=>'string', 'parameters'=>'array', 'callback='=>'callable'],
'Yar_Concurrent_Client::loop' => ['bool', 'callback='=>'callable', 'error_callback='=>'callable'],
'Yar_Concurrent_Client::reset' => ['bool'],
'Yar_Server::__construct' => ['void', 'obj'=>'Object'],
'Yar_Server::handle' => ['bool'],
'Yar_Server_Exception::getType' => ['string'],
'yaz_addinfo' => ['string', 'id'=>'resource'],
'yaz_ccl_conf' => ['void', 'id'=>'resource', 'config'=>'array'],
'yaz_ccl_parse' => ['bool', 'id'=>'resource', 'query'=>'string', '&w_result'=>'array'],
'yaz_close' => ['bool', 'id'=>'resource'],
'yaz_connect' => ['mixed', 'zurl'=>'string', 'options='=>'mixed'],
'yaz_database' => ['bool', 'id'=>'resource', 'databases'=>'string'],
'yaz_element' => ['bool', 'id'=>'resource', 'elementset'=>'string'],
'yaz_errno' => ['int', 'id'=>'resource'],
'yaz_error' => ['string', 'id'=>'resource'],
'yaz_es' => ['void', 'id'=>'resource', 'type'=>'string', 'args'=>'array'],
'yaz_es_result' => ['array', 'id'=>'resource'],
'yaz_get_option' => ['string', 'id'=>'resource', 'name'=>'string'],
'yaz_hits' => ['int', 'id'=>'resource', 'searchresult='=>'array'],
'yaz_itemorder' => ['void', 'id'=>'resource', 'args'=>'array'],
'yaz_present' => ['bool', 'id'=>'resource'],
'yaz_range' => ['void', 'id'=>'resource', 'start'=>'int', 'number'=>'int'],
'yaz_record' => ['string', 'id'=>'resource', 'pos'=>'int', 'type'=>'string'],
'yaz_scan' => ['void', 'id'=>'resource', 'type'=>'string', 'startterm'=>'string', 'flags='=>'array'],
'yaz_scan_result' => ['array', 'id'=>'resource', 'result='=>'array'],
'yaz_schema' => ['void', 'id'=>'resource', 'schema'=>'string'],
'yaz_search' => ['bool', 'id'=>'resource', 'type'=>'string', 'query'=>'string'],
'yaz_set_option' => ['', 'id'=>'', 'name'=>'string', 'value'=>'string', 'options'=>'array'],
'yaz_sort' => ['void', 'id'=>'resource', 'criteria'=>'string'],
'yaz_syntax' => ['void', 'id'=>'resource', 'syntax'=>'string'],
'yaz_wait' => ['mixed', '&rw_options='=>'array'],
'yp_all' => ['void', 'domain'=>'string', 'map'=>'string', 'callback'=>'string'],
'yp_cat' => ['array', 'domain'=>'string', 'map'=>'string'],
'yp_err_string' => ['string', 'errorcode'=>'int'],
'yp_errno' => ['int'],
'yp_first' => ['array', 'domain'=>'string', 'map'=>'string'],
'yp_get_default_domain' => ['string'],
'yp_master' => ['string', 'domain'=>'string', 'map'=>'string'],
'yp_match' => ['string', 'domain'=>'string', 'map'=>'string', 'key'=>'string'],
'yp_next' => ['array', 'domain'=>'string', 'map'=>'string', 'key'=>'string'],
'yp_order' => ['int', 'domain'=>'string', 'map'=>'string'],
'zem_get_extension_info_by_id' => [''],
'zem_get_extension_info_by_name' => [''],
'zem_get_extensions_info' => [''],
'zem_get_license_info' => [''],
'zend_current_obfuscation_level' => ['int'],
'zend_disk_cache_clear' => ['bool', 'namespace='=>'mixed|string'],
'zend_disk_cache_delete' => ['mixed|null', 'key'=>''],
'zend_disk_cache_fetch' => ['mixed|null', 'key'=>''],
'zend_disk_cache_store' => ['bool', 'key'=>'', 'value'=>'', 'ttl='=>'int|mixed'],
'zend_get_id' => ['array', 'all_ids='=>'all_ids|false'],
'zend_is_configuration_changed' => [''],
'zend_loader_current_file' => ['string'],
'zend_loader_enabled' => ['bool'],
'zend_loader_file_encoded' => ['bool'],
'zend_loader_file_licensed' => ['array'],
'zend_loader_install_license' => ['bool', 'license_file'=>'license_file', 'override'=>'override'],
'zend_logo_guid' => ['string'],
'zend_obfuscate_class_name' => ['string', 'class_name'=>'class_name'],
'zend_obfuscate_function_name' => ['string', 'function_name'=>'function_name'],
'zend_optimizer_version' => ['string'],
'zend_runtime_obfuscate' => ['void'],
'zend_send_buffer' => ['null|false', 'buffer'=>'string', 'mime_type='=>'string', 'custom_headers='=>'string'],
'zend_send_file' => ['null|false', 'filename'=>'string', 'mime_type='=>'string', 'custom_headers='=>'string'],
'zend_set_configuration_changed' => [''],
'zend_shm_cache_clear' => ['bool', 'namespace='=>'mixed|string'],
'zend_shm_cache_delete' => ['mixed|null', 'key'=>''],
'zend_shm_cache_fetch' => ['mixed|null', 'key'=>''],
'zend_shm_cache_store' => ['bool', 'key'=>'', 'value'=>'', 'ttl='=>'int|mixed'],
'zend_thread_id' => ['int'],
'zend_version' => ['string'],
'ZendAPI_Job::addJobToQueue' => ['int', 'jobqueue_url'=>'string', 'password'=>'string'],
'ZendAPI_Job::getApplicationID' => [''],
'ZendAPI_Job::getEndTime' => [''],
'ZendAPI_Job::getGlobalVariables' => [''],
'ZendAPI_Job::getHost' => [''],
'ZendAPI_Job::getID' => [''],
'ZendAPI_Job::getInterval' => [''],
'ZendAPI_Job::getJobDependency' => [''],
'ZendAPI_Job::getJobName' => [''],
'ZendAPI_Job::getJobPriority' => [''],
'ZendAPI_Job::getJobStatus' => ['int'],
'ZendAPI_Job::getLastPerformedStatus' => ['int'],
'ZendAPI_Job::getOutput' => ['An'],
'ZendAPI_Job::getPreserved' => [''],
'ZendAPI_Job::getProperties' => ['array'],
'ZendAPI_Job::getScheduledTime' => [''],
'ZendAPI_Job::getScript' => [''],
'ZendAPI_Job::getTimeToNextRepeat' => ['int'],
'ZendAPI_Job::getUserVariables' => [''],
'ZendAPI_Job::setApplicationID' => ['', 'app_id'=>''],
'ZendAPI_Job::setGlobalVariables' => ['', 'vars'=>''],
'ZendAPI_Job::setJobDependency' => ['', 'job_id'=>''],
'ZendAPI_Job::setJobName' => ['', 'name'=>''],
'ZendAPI_Job::setJobPriority' => ['', 'priority'=>'int'],
'ZendAPI_Job::setPreserved' => ['', 'preserved'=>''],
'ZendAPI_Job::setRecurrenceData' => ['', 'interval'=>'', 'end_time='=>'mixed'],
'ZendAPI_Job::setScheduledTime' => ['', 'timestamp'=>''],
'ZendAPI_Job::setScript' => ['', 'script'=>''],
'ZendAPI_Job::setUserVariables' => ['', 'vars'=>''],
'ZendAPI_Job::ZendAPI_Job' => ['Job', 'script'=>'script'],
'ZendAPI_Queue::addJob' => ['int', '&job'=>'Job'],
'ZendAPI_Queue::getAllApplicationIDs' => ['array'],
'ZendAPI_Queue::getAllhosts' => ['array'],
'ZendAPI_Queue::getHistoricJobs' => ['array', 'status'=>'int', 'start_time'=>'', 'end_time'=>'', 'index'=>'int', 'count'=>'int', '&total'=>'int'],
'ZendAPI_Queue::getJob' => ['Job', 'job_id'=>'int'],
'ZendAPI_Queue::getJobsInQueue' => ['array', 'filter_options='=>'array', 'max_jobs='=>'int', 'with_globals_and_output='=>'bool|false'],
'ZendAPI_Queue::getLastError' => ['string'],
'ZendAPI_Queue::getNumOfJobsInQueue' => ['int', 'filter_options='=>'array'],
'ZendAPI_Queue::getStatistics' => ['array'],
'ZendAPI_Queue::isScriptExists' => ['bool', 'path'=>'string'],
'ZendAPI_Queue::isSuspend' => ['bool'],
'ZendAPI_Queue::login' => ['bool', 'password'=>'string', 'application_id='=>'int'],
'ZendAPI_Queue::removeJob' => ['bool', 'job_id'=>'array|int'],
'ZendAPI_Queue::requeueJob' => ['bool', 'job'=>'Job'],
'ZendAPI_Queue::resumeJob' => ['bool', 'job_id'=>'array|int'],
'ZendAPI_Queue::resumeQueue' => ['bool'],
'ZendAPI_Queue::setMaxHistoryTime' => ['bool'],
'ZendAPI_Queue::suspendJob' => ['bool', 'job_id'=>'array|int'],
'ZendAPI_Queue::suspendQueue' => ['bool'],
'ZendAPI_Queue::updateJob' => ['int', '&job'=>'Job'],
'ZendAPI_Queue::zendapi_queue' => ['ZendAPI_Queue', 'queue_url'=>'string'],
'zip_close' => ['void', 'zip'=>'resource'],
'zip_entry_close' => ['bool', 'zip_ent'=>'resource'],
'zip_entry_compressedsize' => ['int|false', 'zip_entry'=>'resource'],
'zip_entry_compressionmethod' => ['string|false', 'zip_entry'=>'resource'],
'zip_entry_filesize' => ['int|false', 'zip_entry'=>'resource'],
'zip_entry_name' => ['string|false', 'zip_entry'=>'resource'],
'zip_entry_open' => ['bool', 'zip_dp'=>'resource', 'zip_entry'=>'resource', 'mode='=>'string'],
'zip_entry_read' => ['string|false', 'zip_entry'=>'resource', 'len='=>'int'],
'zip_open' => ['resource|false|int', 'filename'=>'string'],
'zip_read' => ['resource|false|int', 'zip'=>'resource'],
'ZipArchive::addEmptyDir' => ['bool', 'dirname'=>'string'],
'ZipArchive::addFile' => ['bool', 'filepath'=>'string', 'entryname='=>'string', 'start='=>'int', 'length='=>'int'],
'ZipArchive::addFromString' => ['bool', 'entryname'=>'string', 'content'=>'string'],
'ZipArchive::addGlob' => ['bool', 'pattern'=>'string', 'flags='=>'int', 'options='=>'array'],
'ZipArchive::addPattern' => ['bool', 'pattern'=>'string', 'path='=>'string', 'options='=>'array'],
'ZipArchive::close' => ['bool'],
'ZipArchive::count' => ['0|positive-int'],
'ZipArchive::createEmptyDir' => ['bool', 'dirname'=>'string'],
'ZipArchive::deleteIndex' => ['bool', 'index'=>'int'],
'ZipArchive::deleteName' => ['bool', 'name'=>'string'],
'ZipArchive::extractTo' => ['bool', 'pathto'=>'string', 'files='=>'string[]|string'],
'ZipArchive::getArchiveComment' => ['string', 'flags='=>'int'],
'ZipArchive::getCommentIndex' => ['string', 'index'=>'int', 'flags='=>'int'],
'ZipArchive::getCommentName' => ['string', 'name'=>'string', 'flags='=>'int'],
'ZipArchive::getExternalAttributesIndex' => ['bool', 'index'=>'int', '&w_opsys'=>'int', '&w_attr'=>'int', 'flags='=>'int'],
'ZipArchive::getExternalAttributesName' => ['bool', 'name'=>'string', '&w_opsys'=>'int', '&w_attr'=>'int', 'flags='=>'int'],
'ZipArchive::getFromIndex' => ['string|false', 'index'=>'int', 'len='=>'int', 'flags='=>'int'],
'ZipArchive::getFromName' => ['string|false', 'entryname'=>'string', 'len='=>'int', 'flags='=>'int'],
'ZipArchive::getNameIndex' => ['string|false', 'index'=>'int', 'flags='=>'int'],
'ZipArchive::getStatusString' => ['string'],
'ZipArchive::getStream' => ['resource|false', 'entryname'=>'string'],
'ZipArchive::locateName' => ['int|false', 'filename'=>'string', 'flags='=>'int'],
'ZipArchive::open' => ['ZipArchive::ER_*|true', 'source'=>'string', 'flags='=>'int'],
'ZipArchive::renameIndex' => ['bool', 'index'=>'int', 'new_name'=>'string'],
'ZipArchive::renameName' => ['bool', 'name'=>'string', 'new_name'=>'string'],
'ZipArchive::setArchiveComment' => ['bool', 'comment'=>'string'],
'ZipArchive::setCommentIndex' => ['bool', 'index'=>'int', 'comment'=>'string'],
'ZipArchive::setCommentName' => ['bool', 'name'=>'string', 'comment'=>'string'],
'ZipArchive::setCompressionIndex' => ['bool', 'index'=>'int', 'comp_method'=>'int', 'comp_flags='=>'int'],
'ZipArchive::setCompressionName' => ['bool', 'name'=>'string', 'comp_method'=>'int', 'comp_flags='=>'int'],
'ZipArchive::setEncryptionIndex' => ['bool', 'index'=>'int', 'method'=>'string', 'password='=>'string'],
'ZipArchive::setEncryptionName' => ['bool', 'name'=>'string', 'method'=>'int', 'password='=>'string'],
'ZipArchive::setExternalAttributesIndex' => ['bool', 'index'=>'int', 'opsys'=>'int', 'attr'=>'int', 'flags='=>'int'],
'ZipArchive::setExternalAttributesName' => ['bool', 'name'=>'string', 'opsys'=>'int', 'attr'=>'int', 'flags='=>'int'],
'ZipArchive::setPassword' => ['bool', 'password'=>'string'],
'ZipArchive::statIndex' => ['array|false', 'index'=>'int', 'flags='=>'int'],
'ZipArchive::statName' => ['array|false', 'filename'=>'string', 'flags='=>'int'],
'ZipArchive::unchangeAll' => ['bool'],
'ZipArchive::unchangeArchive' => ['bool'],
'ZipArchive::unchangeIndex' => ['bool', 'index'=>'int'],
'ZipArchive::unchangeName' => ['bool', 'name'=>'string'],
'zlib_decode' => ['string|false', 'data'=>'string', 'max_decoded_len='=>'int'],
'zlib_encode' => ['string|false', 'data'=>'string', 'encoding'=>'int', 'level='=>'string|int'],
'zlib_get_coding_type' => ['string|false'],
'ZMQ::__construct' => ['void'],
'ZMQContext::__construct' => ['void', 'io_threads='=>'int', 'is_persistent='=>'bool'],
'ZMQContext::getOpt' => ['mixed', 'key'=>'string'],
'ZMQContext::getSocket' => ['ZMQSocket', 'type'=>'int', 'persistent_id='=>'string', 'on_new_socket='=>'callable'],
'ZMQContext::isPersistent' => ['bool'],
'ZMQContext::setOpt' => ['ZMQContext', 'key'=>'int', 'value'=>'mixed'],
'ZMQDevice::__construct' => ['void', 'frontend'=>'ZMQSocket', 'backend'=>'ZMQSocket', 'listener='=>'ZMQSocket'],
'ZMQDevice::getIdleTimeout' => ['ZMQDevice'],
'ZMQDevice::getTimerTimeout' => ['ZMQDevice'],
'ZMQDevice::run' => ['void'],
'ZMQDevice::setIdleCallback' => ['ZMQDevice', 'cb_func'=>'callable', 'timeout'=>'int', 'user_data='=>'mixed'],
'ZMQDevice::setIdleTimeout' => ['ZMQDevice', 'timeout'=>'int'],
'ZMQDevice::setTimerCallback' => ['ZMQDevice', 'cb_func'=>'callable', 'timeout'=>'int', 'user_data='=>'mixed'],
'ZMQDevice::setTimerTimeout' => ['ZMQDevice', 'timeout'=>'int'],
'ZMQPoll::add' => ['string', 'entry'=>'mixed', 'type'=>'int'],
'ZMQPoll::clear' => ['ZMQPoll'],
'ZMQPoll::count' => ['0|positive-int'],
'ZMQPoll::getLastErrors' => ['array'],
'ZMQPoll::poll' => ['int', '&w_readable'=>'array', '&w_writable'=>'array', 'timeout='=>'int'],
'ZMQPoll::remove' => ['bool', 'item'=>'mixed'],
'ZMQSocket::__construct' => ['void', 'context'=>'ZMQContext', 'type'=>'int', 'persistent_id='=>'string', 'on_new_socket='=>'callable'],
'ZMQSocket::bind' => ['ZMQSocket', 'dsn'=>'string', 'force='=>'bool'],
'ZMQSocket::connect' => ['ZMQSocket', 'dsn'=>'string', 'force='=>'bool'],
'ZMQSocket::disconnect' => ['ZMQSocket', 'dsn'=>'string'],
'ZMQSocket::getEndpoints' => ['array'],
'ZMQSocket::getPersistentId' => ['string'],
'ZMQSocket::getSocketType' => ['int'],
'ZMQSocket::getSockOpt' => ['mixed', 'key'=>'string'],
'ZMQSocket::isPersistent' => ['bool'],
'ZMQSocket::recv' => ['string', 'mode='=>'int'],
'ZMQSocket::recvMulti' => ['string[]', 'mode='=>'int'],
'ZMQSocket::send' => ['ZMQSocket', 'message'=>'array', 'mode='=>'int'],
'ZMQSocket::send\'1' => ['ZMQSocket', 'message'=>'string', 'mode='=>'int'],
'ZMQSocket::sendmulti' => ['ZMQSocket', 'message'=>'array', 'mode='=>'int'],
'ZMQSocket::setSockOpt' => ['ZMQSocket', 'key'=>'int', 'value'=>'mixed'],
'ZMQSocket::unbind' => ['ZMQSocket', 'dsn'=>'string'],
'Zookeeper::addAuth' => ['bool', 'scheme'=>'string', 'cert'=>'string', 'completion_cb='=>'callable'],
'Zookeeper::connect' => ['void', 'host'=>'string', 'watcher_cb='=>'callable', 'recv_timeout='=>'int'],
'Zookeeper::create' => ['string', 'path'=>'string', 'value'=>'string', 'acls'=>'array', 'flags='=>'int'],
'Zookeeper::delete' => ['bool', 'path'=>'string', 'version='=>'int'],
'Zookeeper::exists' => ['bool', 'path'=>'string', 'watcher_cb='=>'callable'],
'Zookeeper::get' => ['string', 'path'=>'string', 'watcher_cb='=>'callable', 'stat='=>'array', 'max_size='=>'int'],
'Zookeeper::getAcl' => ['array', 'path'=>'string'],
'Zookeeper::getChildren' => ['array', 'path'=>'string', 'watcher_cb='=>'callable'],
'Zookeeper::getClientId' => ['int'],
'Zookeeper::getRecvTimeout' => ['int'],
'Zookeeper::getState' => ['int'],
'Zookeeper::isRecoverable' => ['bool'],
'Zookeeper::set' => ['bool', 'path'=>'string', 'value'=>'string', 'version='=>'int', 'stat='=>'array'],
'Zookeeper::setAcl' => ['bool', 'path'=>'string', 'version'=>'int', 'acl'=>'array'],
'Zookeeper::setDebugLevel' => ['bool', 'logLevel'=>'int'],
'Zookeeper::setDeterministicConnOrder' => ['bool', 'yesOrNo'=>'bool'],
'Zookeeper::setLogStream' => ['bool', 'stream'=>'resource'],
'Zookeeper::setWatcher' => ['bool', 'watcher_cb'=>'callable'],
'zookeeper_dispatch' => ['void'],
];
<?php // phpcs:ignoreFile

/**
 * Copied over from https://github.com/phan/phan/blob/8866d6b98be94b37996390da226e8c4befea29aa/src/Phan/Language/Internal/FunctionSignatureMap_php80_delta.php
 * Copyright (c) 2015 Rasmus Lerdorf
 * Copyright (c) 2015 Andrew Morrison
 */

/**
 * This contains the information needed to convert the function signatures for php 8.0 to php 7.4 (and vice versa)
 *
 * This has two sections.
 * The 'new' section contains function/method names from FunctionSignatureMap (And alternates, if applicable) that do not exist in php7.4 or have different signatures in php 8.0.
 *   If they were just updated, the function/method will be present in the 'added' signatures.
 * The 'old' signatures contains the signatures that are different in php 7.4.
 *   Functions are expected to be removed only in major releases of php.
 *
 * @see FunctionSignatureMap.php
 *
 * @phan-file-suppress PhanPluginMixedKeyNoKey (read by Phan when analyzing this file)
 */
return [
	'new' => [
		'array_combine' => ['associative-array', 'keys'=>'string[]|int[]', 'values'=>'array'],
		'bcdiv' => ['string', 'dividend'=>'string', 'divisor'=>'string', 'scale='=>'int'],
		'bcmod' => ['string', 'dividend'=>'string', 'divisor'=>'string', 'scale='=>'int'],
		'bcpowmod' => ['string', 'base'=>'string', 'exponent'=>'string', 'modulus'=>'string', 'scale='=>'int'],
		'call_user_func_array' => ['mixed', 'function'=>'callable', 'parameters'=>'array<int|string,mixed>'],
		'com_load_typelib' => ['bool', 'typelib_name'=>'string', 'case_insensitive='=>'true'],
		'count_chars' => ['array<int,int>|string', 'input'=>'string', 'mode='=>'int'],
		'date_add' => ['DateTime', 'object'=>'DateTime', 'interval'=>'DateInterval'],
		'date_date_set' => ['DateTime', 'object'=>'DateTime', 'year'=>'int', 'month'=>'int', 'day'=>'int'],
		'date_diff' => ['DateInterval', 'obj1'=>'DateTimeInterface', 'obj2'=>'DateTimeInterface', 'absolute='=>'bool'],
		'date_format' => ['string', 'object'=>'DateTimeInterface', 'format'=>'string'],
		'date_isodate_set' => ['DateTime', 'object'=>'DateTime', 'year'=>'int', 'week'=>'int', 'day='=>'int|mixed'],
		'date_parse' => ['array<string,mixed>', 'date'=>'string'],
		'date_sub' => ['DateTime', 'object'=>'DateTime', 'interval'=>'DateInterval'],
		'date_sun_info' => ['array<string,bool|int>', 'time'=>'int', 'latitude'=>'float', 'longitude'=>'float'],
		'date_time_set' => ['DateTime', 'object'=>'DateTime', 'hour'=>'int', 'minute'=>'int', 'second='=>'int', 'microseconds='=>'int'],
		'date_timestamp_set' => ['DateTime', 'object'=>'DateTime', 'unixtimestamp'=>'int'],
		'date_timezone_set' => ['DateTime', 'object'=>'DateTime', 'timezone'=>'DateTimeZone'],
		'explode' => ['list<string>', 'separator'=>'non-empty-string', 'str'=>'string', 'limit='=>'int'],
		'fdiv' => ['float', 'dividend'=>'float', 'divisor'=>'float'],
		'forward_static_call_array' => ['mixed', 'function'=>'callable', 'parameters'=>'array<int|string,mixed>'],
		'get_debug_type' => ['string', 'var'=>'mixed'],
		'get_resource_id' => ['int', 'res'=>'resource'],
		'gmdate' => ['string', 'format'=>'string', 'timestamp='=>'int'],
		'gmmktime' => ['int|false', 'hour'=>'int', 'minute='=>'int', 'second='=>'int', 'month='=>'int', 'day='=>'int', 'year='=>'int'],
		'hash' => ['non-empty-string', 'algo'=>'string', 'data'=>'string', 'raw_output='=>'bool'],
		'hash_hkdf' => ['non-empty-string', 'algo'=>'string', 'key'=>'string', 'length='=>'int', 'info='=>'string', 'salt='=>'string'],
		'hash_hmac' => ['non-empty-string', 'algo'=>'string', 'data'=>'string', 'key'=>'string', 'raw_output='=>'bool'],
		'hash_pbkdf2' => ['non-empty-string', 'algo'=>'string', 'password'=>'string', 'salt'=>'string', 'iterations'=>'int', 'length='=>'int', 'raw_output='=>'bool'],
		'imageaffine' => ['false|object', 'src'=>'resource', 'affine'=>'array', 'clip='=>'array'],
		'imagecreate' => ['false|object', 'x_size'=>'int', 'y_size'=>'int'],
		'imagecreatefrombmp' => ['false|object', 'filename'=>'string'],
		'imagecreatefromgd' => ['false|object', 'filename'=>'string'],
		'imagecreatefromgd2' => ['false|object', 'filename'=>'string'],
		'imagecreatefromgd2part' => ['false|object', 'filename'=>'string', 'srcx'=>'int', 'srcy'=>'int', 'width'=>'int', 'height'=>'int'],
		'imagecreatefromgif' => ['false|object', 'filename'=>'string'],
		'imagecreatefromjpeg' => ['false|object', 'filename'=>'string'],
		'imagecreatefrompng' => ['false|object', 'filename'=>'string'],
		'imagecreatefromstring' => ['false|object', 'image'=>'string'],
		'imagecreatefromwbmp' => ['false|object', 'filename'=>'string'],
		'imagecreatefromwebp' => ['false|object', 'filename'=>'string'],
		'imagecreatefromxbm' => ['false|object', 'filename'=>'string'],
		'imagecreatefromxpm' => ['false|object', 'filename'=>'string'],
		'imagecreatetruecolor' => ['false|object', 'x_size'=>'int', 'y_size'=>'int'],
		'imagecrop' => ['false|object', 'im'=>'resource', 'rect'=>'array'],
		'imagecropauto' => ['false|object', 'im'=>'resource', 'mode'=>'int', 'threshold'=>'float', 'color'=>'int'],
		'imagegetclip' => ['array<int,int>', 'im'=>'resource'],
		'imagegrabscreen' => ['false|object'],
		'imagegrabwindow' => ['false|object', 'window_handle'=>'int', 'client_area='=>'int'],
		'imagejpeg' => ['bool', 'im'=>'GdImage', 'filename='=>'string|resource|null', 'quality='=>'int'],
		'imagerotate' => ['false|object', 'src_im'=>'resource', 'angle'=>'float', 'bgdcolor'=>'int', 'ignoretransparent='=>'int'],
		'imagescale' => ['false|object', 'im'=>'resource', 'new_width'=>'int', 'new_height='=>'int', 'method='=>'int'],
		'ldap_set_rebind_proc' => ['bool', 'ldap'=>'resource', 'callback'=>'?callable'],
		'mb_decode_numericentity' => ['string|false', 'string'=>'string', 'convmap'=>'array', 'encoding='=>'string'],
		'mb_encoding_aliases' => ['list<string>', 'encoding'=>'string'],
		'mb_str_split' => ['list<string>', 'str'=>'string', 'split_length='=>'positive-int', 'encoding='=>'string'],
		'mb_strlen' => ['0|positive-int', 'str'=>'string', 'encoding='=>'string'],
		'mktime' => ['int|false', 'hour'=>'int', 'minute='=>'int', 'second='=>'int', 'month='=>'int', 'day='=>'int', 'year='=>'int'],
		'odbc_exec' => ['resource|false', 'connection_id'=>'resource', 'query'=>'string'],
		'parse_str' => ['void', 'encoded_string'=>'string', '&w_result'=>'array'],
		'password_hash' => ['string', 'password'=>'string', 'algo'=>'string|int|null', 'options='=>'array'],
		'PDOStatement::fetchAll' => ['array', 'how='=>'int', 'fetch_argument='=>'int|string|callable', 'ctor_args='=>'?array'],
		'PhpToken::tokenize' => ['list<PhpToken>', 'code'=>'string', 'flags='=>'int'],
		'PhpToken::is' => ['bool', 'kind'=>'string|int|string[]|int[]'],
		'PhpToken::isIgnorable' => ['bool'],
		'PhpToken::getTokenName' => ['string'],
		'preg_match_all' => ['0|positive-int|false', 'pattern'=>'string', 'subject'=>'string', '&w_subpatterns='=>'array', 'flags='=>'int', 'offset='=>'int'],
		'proc_get_status' => ['array{command: string, pid: int, running: bool, signaled: bool, stopped: bool, exitcode: int, termsig: int, stopsig: int}', 'process'=>'resource'],
		'set_error_handler' => ['?callable', 'callback'=>'null|callable(int,string,string,int):bool', 'error_types='=>'int'],
		'socket_addrinfo_lookup' => ['AddressInfo[]', 'node'=>'string', 'service='=>'mixed', 'hints='=>'array'],
		'socket_select' => ['int|false', '&rw_read'=>'Socket[]|null', '&rw_write'=>'Socket[]|null', '&rw_except'=>'Socket[]|null', 'seconds'=>'int|null', 'microseconds='=>'int'],
		'sodium_crypto_aead_chacha20poly1305_ietf_decrypt' => ['string|false', 'confidential_message'=>'string', 'public_message'=>'string', 'nonce'=>'string', 'key'=>'string'],
		'str_contains' => ['bool', 'haystack'=>'string', 'needle'=>'string'],
		'str_split' => ['non-empty-list<string>', 'str'=>'string', 'split_length='=>'positive-int'],
		'str_ends_with' => ['bool', 'haystack'=>'string', 'needle'=>'string'],
		'str_starts_with' => ['bool', 'haystack'=>'string', 'needle'=>'string'],
		'strchr' => ['string|false', 'haystack'=>'string', 'needle'=>'string', 'before_needle='=>'bool'],
		'stripos' => ['int|false', 'haystack'=>'string', 'needle'=>'string', 'offset='=>'int'],
		'stristr' => ['string|false', 'haystack'=>'string', 'needle'=>'string', 'before_needle='=>'bool'],
		'strpos' => ['positive-int|0|false', 'haystack'=>'string', 'needle'=>'string', 'offset='=>'int'],
		'strrchr' => ['string|false', 'haystack'=>'string', 'needle'=>'string'],
		'strripos' => ['int|false', 'haystack'=>'string', 'needle'=>'string', 'offset='=>'int'],
		'strrpos' => ['int|false', 'haystack'=>'string', 'needle'=>'string', 'offset='=>'int'],
		'strstr' => ['string|false', 'haystack'=>'string', 'needle'=>'string', 'before_needle='=>'bool'],
		'substr' => ['string', 'string'=>'string', 'start'=>'int', 'length='=>'int'],
		'version_compare' => ['int|bool', 'version1'=>'string', 'version2'=>'string', 'operator='=>'string'],
		'xml_parser_create' => ['XMLParser', 'encoding='=>'string'],
		'xml_parser_create_ns' => ['XMLParser', 'encoding='=>'string', 'sep='=>'string'],
		'xml_parser_free' => ['bool', 'parser'=>'XMLParser'],
		'xml_parser_get_option' => ['mixed|false', 'parser'=>'XMLParser', 'option'=>'int'],
		'xml_parser_set_option' => ['bool', 'parser'=>'XMLParser', 'option'=>'int', 'value'=>'mixed'],
		'xmlwriter_end_attribute' => ['bool', 'xmlwriter'=>'XMLWriter'],
		'xmlwriter_end_cdata' => ['bool', 'xmlwriter'=>'XMLWriter'],
		'xmlwriter_end_comment' => ['bool', 'xmlwriter'=>'XMLWriter'],
		'xmlwriter_end_document' => ['bool', 'xmlwriter'=>'XMLWriter'],
		'xmlwriter_end_dtd' => ['bool', 'xmlwriter'=>'XMLWriter'],
		'xmlwriter_end_dtd_attlist' => ['bool', 'xmlwriter'=>'XMLWriter'],
		'xmlwriter_end_dtd_element' => ['bool', 'xmlwriter'=>'XMLWriter'],
		'xmlwriter_end_dtd_entity' => ['bool', 'xmlwriter'=>'XMLWriter'],
		'xmlwriter_end_element' => ['bool', 'xmlwriter'=>'XMLWriter'],
		'xmlwriter_end_pi' => ['bool', 'xmlwriter'=>'XMLWriter'],
		'xmlwriter_flush' => ['mixed', 'xmlwriter'=>'XMLWriter', 'empty='=>'bool'],
		'xmlwriter_full_end_element' => ['bool', 'xmlwriter'=>'XMLWriter'],
		'xmlwriter_open_memory' => ['XMLWriter'],
		'xmlwriter_open_uri' => ['XMLWriter', 'source'=>'string'],
		'xmlwriter_output_memory' => ['string', 'xmlwriter'=>'XMLWriter', 'flush='=>'bool'],
		'xmlwriter_set_indent' => ['bool', 'xmlwriter'=>'XMLWriter', 'indent'=>'bool'],
		'xmlwriter_set_indent_string' => ['bool', 'xmlwriter'=>'XMLWriter', 'indentstring'=>'string'],
		'xmlwriter_start_attribute' => ['bool', 'xmlwriter'=>'XMLWriter', 'name'=>'string'],
		'xmlwriter_start_attribute_ns' => ['bool', 'xmlwriter'=>'XMLWriter', 'prefix'=>'string', 'name'=>'string', 'uri'=>'string'],
		'xmlwriter_start_cdata' => ['bool', 'xmlwriter'=>'XMLWriter'],
		'xmlwriter_start_comment' => ['bool', 'xmlwriter'=>'XMLWriter'],
		'xmlwriter_start_document' => ['bool', 'xmlwriter'=>'XMLWriter', 'version='=>'string', 'encoding='=>'string', 'standalone='=>'string'],
		'xmlwriter_start_dtd' => ['bool', 'xmlwriter'=>'XMLWriter', 'name'=>'string', 'publicid='=>'string', 'sysid='=>'string'],
		'xmlwriter_start_dtd_attlist' => ['bool', 'xmlwriter'=>'XMLWriter', 'name'=>'string'],
		'xmlwriter_start_dtd_element' => ['bool', 'xmlwriter'=>'XMLWriter', 'name'=>'string'],
		'xmlwriter_start_dtd_entity' => ['bool', 'xmlwriter'=>'XMLWriter', 'name'=>'string', 'isparam'=>'bool'],
		'xmlwriter_start_element' => ['bool', 'xmlwriter'=>'XMLWriter', 'name'=>'string'],
		'xmlwriter_start_element_ns' => ['bool', 'xmlwriter'=>'XMLWriter', 'prefix'=>'string', 'name'=>'string', 'uri'=>'string|null'],
		'xmlwriter_start_pi' => ['bool', 'xmlwriter'=>'XMLWriter', 'target'=>'string'],
		'xmlwriter_text' => ['bool', 'xmlwriter'=>'XMLWriter', 'content'=>'string'],
		'xmlwriter_write_attribute' => ['bool', 'xmlwriter'=>'XMLWriter', 'name'=>'string', 'content'=>'string'],
		'xmlwriter_write_attribute_ns' => ['bool', 'xmlwriter'=>'XMLWriter', 'prefix'=>'string', 'name'=>'string', 'uri'=>'string', 'content'=>'string'],
		'xmlwriter_write_cdata' => ['bool', 'xmlwriter'=>'XMLWriter', 'content'=>'string'],
		'xmlwriter_write_comment' => ['bool', 'xmlwriter'=>'XMLWriter', 'content'=>'string'],
		'xmlwriter_write_dtd' => ['bool', 'xmlwriter'=>'XMLWriter', 'name'=>'string', 'publicid='=>'string', 'sysid='=>'string', 'subset='=>'string'],
		'xmlwriter_write_dtd_attlist' => ['bool', 'xmlwriter'=>'XMLWriter', 'name'=>'string', 'content'=>'string'],
		'xmlwriter_write_dtd_element' => ['bool', 'xmlwriter'=>'XMLWriter', 'name'=>'string', 'content'=>'string'],
		'xmlwriter_write_dtd_entity' => ['bool', 'xmlwriter'=>'XMLWriter', 'name'=>'string', 'content'=>'string', 'pe'=>'bool', 'publicid'=>'string', 'sysid'=>'string', 'ndataid'=>'string'],
		'xmlwriter_write_element' => ['bool', 'xmlwriter'=>'XMLWriter', 'name'=>'string', 'content'=>'string'],
		'xmlwriter_write_element_ns' => ['bool', 'xmlwriter'=>'XMLWriter', 'prefix'=>'string', 'name'=>'string', 'uri'=>'string', 'content'=>'string'],
		'xmlwriter_write_pi' => ['bool', 'xmlwriter'=>'XMLWriter', 'target'=>'string', 'content'=>'string'],
		'xmlwriter_write_raw' => ['bool', 'xmlwriter'=>'XMLWriter', 'content'=>'string'],
	],
	'old' => [

		'array_combine' => ['associative-array|false', 'keys'=>'string[]|int[]', 'values'=>'array'],
		'bcdiv' => ['?string', 'dividend'=>'string', 'divisor'=>'string', 'scale='=>'int'],
		'bcmod' => ['?string', 'dividend'=>'string', 'divisor'=>'string', 'scale='=>'int'],
		'bcpowmod' => ['?string', 'base'=>'string', 'exponent'=>'string', 'modulus'=>'string', 'scale='=>'int'],
		'com_load_typelib' => ['bool', 'typelib_name'=>'string', 'case_insensitive='=>'bool'],
		'count_chars' => ['array<int,int>|false|string', 'input'=>'string', 'mode='=>'int'],
		'date_add' => ['DateTime|false', 'object'=>'DateTime', 'interval'=>'DateInterval'],
		'date_date_set' => ['DateTime|false', 'object'=>'DateTime', 'year'=>'int', 'month'=>'int', 'day'=>'int'],
		'date_diff' => ['DateInterval|false', 'obj1'=>'DateTimeInterface', 'obj2'=>'DateTimeInterface', 'absolute='=>'bool'],
		'date_format' => ['string|false', 'object'=>'DateTimeInterface', 'format'=>'string'],
		'date_isodate_set' => ['DateTime|false', 'object'=>'DateTime', 'year'=>'int', 'week'=>'int', 'day='=>'int|mixed'],
		'date_parse' => ['array<string,mixed>|false', 'date'=>'string'],
		'date_sub' => ['DateTime|false', 'object'=>'DateTime', 'interval'=>'DateInterval'],
		'date_sun_info' => ['array<string,bool|int>|false', 'time'=>'int', 'latitude'=>'float', 'longitude'=>'float'],
		'date_time_set' => ['DateTime|false', 'object'=>'DateTime', 'hour'=>'int', 'minute'=>'int', 'second='=>'int', 'microseconds='=>'int'],
		'date_timestamp_set' => ['DateTime|false', 'object'=>'DateTime', 'unixtimestamp'=>'int'],
		'date_timezone_set' => ['DateTime|false', 'object'=>'DateTime', 'timezone'=>'DateTimeZone'],
		'each' => ['array{0:int|string,key:int|string,1:mixed,value:mixed}', '&r_arr'=>'array'],
		'gmdate' => ['string|false', 'format'=>'string', 'timestamp='=>'int'],
		'gmmktime' => ['int|false', 'hour='=>'int', 'minute='=>'int', 'second='=>'int', 'month='=>'int', 'day='=>'int', 'year='=>'int'],
		'gmp_random' => ['GMP', 'limiter='=>'int'],
		'gzgetss' => ['string|false', 'zp'=>'resource', 'length'=>'int', 'allowable_tags='=>'string'],
		'hash' => ['non-empty-string|false', 'algo'=>'string', 'data'=>'string', 'raw_output='=>'bool'],
		'hash_hkdf' => ['non-empty-string|false', 'algo'=>'string', 'key'=>'string', 'length='=>'int', 'info='=>'string', 'salt='=>'string'],
		'hash_hmac' => ['non-empty-string|false', 'algo'=>'string', 'data'=>'string', 'key'=>'string', 'raw_output='=>'bool'],
		'hash_pbkdf2' => ['non-empty-string|false', 'algo'=>'string', 'password'=>'string', 'salt'=>'string', 'iterations'=>'int', 'length='=>'int', 'raw_output='=>'bool'],
		'image2wbmp' => ['bool', 'im'=>'resource', 'filename='=>'?string', 'threshold='=>'int'],
		'imageaffine' => ['resource|false', 'src'=>'resource', 'affine'=>'array', 'clip='=>'array'],
		'imagecreate' => ['resource|false', 'x_size'=>'int', 'y_size'=>'int'],
		'imagecreatefrombmp' => ['resource|false', 'filename'=>'string'],
		'imagecreatefromgd' => ['resource|false', 'filename'=>'string'],
		'imagecreatefromgd2' => ['resource|false', 'filename'=>'string'],
		'imagecreatefromgd2part' => ['resource|false', 'filename'=>'string', 'srcx'=>'int', 'srcy'=>'int', 'width'=>'int', 'height'=>'int'],
		'imagecreatefromgif' => ['resource|false', 'filename'=>'string'],
		'imagecreatefromjpeg' => ['resource|false', 'filename'=>'string'],
		'imagecreatefrompng' => ['resource|false', 'filename'=>'string'],
		'imagecreatefromstring' => ['resource|false', 'image'=>'string'],
		'imagecreatefromwbmp' => ['resource|false', 'filename'=>'string'],
		'imagecreatefromwebp' => ['resource|false', 'filename'=>'string'],
		'imagecreatefromxbm' => ['resource|false', 'filename'=>'string'],
		'imagecreatefromxpm' => ['resource|false', 'filename'=>'string'],
		'imagecreatetruecolor' => ['resource|false', 'x_size'=>'int', 'y_size'=>'int'],
		'imagecrop' => ['resource|false', 'im'=>'resource', 'rect'=>'array'],
		'imagecropauto' => ['resource|false', 'im'=>'resource', 'mode'=>'int', 'threshold'=>'float', 'color'=>'int'],
		'imagegetclip' => ['array<int,int>|false', 'im'=>'resource'],
		'imagegrabscreen' => ['false|resource'],
		'imagegrabwindow' => ['false|resource', 'window_handle'=>'int', 'client_area='=>'int'],
		'imagejpeg' => ['bool', 'im'=>'resource', 'filename='=>'string|resource|null', 'quality='=>'int'],
		'imagerotate' => ['resource|false', 'src_im'=>'resource', 'angle'=>'float', 'bgdcolor'=>'int', 'ignoretransparent='=>'int'],
		'imagescale' => ['resource|false', 'im'=>'resource', 'new_width'=>'int', 'new_height='=>'int', 'method='=>'int'],
		'implode\'1' => ['string', 'pieces'=>'array'],
		'jpeg2wbmp' => ['bool', 'jpegname'=>'string', 'wbmpname'=>'string', 'dest_height'=>'int', 'dest_width'=>'int', 'threshold'=>'int'],
		'ldap_set_rebind_proc' => ['bool', 'link_identifier'=>'resource', 'callback'=>'callable'],
		'ldap_sort' => ['bool', 'link_identifier'=>'resource', 'result_identifier'=>'resource', 'sortfilter'=>'string'],
		'mb_decode_numericentity' => ['string|false', 'string'=>'string', 'convmap'=>'array', 'encoding='=>'string', 'is_hex='=>'bool'],
		'mktime' => ['int|false', 'hour='=>'int', 'minute='=>'int', 'second='=>'int', 'month='=>'int', 'day='=>'int', 'year='=>'int'],
		'mb_strlen' => ['0|positive-int', 'str'=>'string', 'encoding='=>'string'],
		'odbc_exec' => ['resource|false', 'connection_id'=>'resource', 'query'=>'string', 'flags='=>'int'],
		'parse_str' => ['void', 'encoded_string'=>'string', '&w_result='=>'array'],
		'password_hash' => ['string|false|null', 'password'=>'string', 'algo'=>'?string|?int', 'options='=>'array'],
		'png2wbmp' => ['bool', 'pngname'=>'string', 'wbmpname'=>'string', 'dest_height'=>'int', 'dest_width'=>'int', 'threshold'=>'int'],
		'proc_get_status' => ['array{command: string, pid: int, running: bool, signaled: bool, stopped: bool, exitcode: int, termsig: int, stopsig: int}|false', 'process'=>'resource'],
		'read_exif_data' => ['array', 'filename'=>'string', 'sections_needed='=>'string', 'sub_arrays='=>'bool', 'read_thumbnail='=>'bool'],
		'socket_select' => ['int|false', '&rw_read_fds'=>'resource[]|null', '&rw_write_fds'=>'resource[]|null', '&rw_except_fds'=>'resource[]|null', 'tv_sec'=>'int|null', 'tv_usec='=>'int|null'],
		'sodium_crypto_aead_chacha20poly1305_ietf_decrypt' => ['?string|?false', 'confidential_message'=>'string', 'public_message'=>'string', 'nonce'=>'string', 'key'=>'string'],
		'SplFileObject::fgetss' => ['string|false', 'allowable_tags='=>'string'],
		'strchr' => ['string|false', 'haystack'=>'string', 'needle'=>'string|int', 'before_needle='=>'bool'],
		'stripos' => ['int|false', 'haystack'=>'string', 'needle'=>'string|int', 'offset='=>'int'],
		'stristr' => ['string|false', 'haystack'=>'string', 'needle'=>'string|int', 'before_needle='=>'bool'],
		'strpos' => ['int|false', 'haystack'=>'string', 'needle'=>'string|int', 'offset='=>'int'],
		'strrchr' => ['string|false', 'haystack'=>'string', 'needle'=>'string|int'],
		'strripos' => ['int|false', 'haystack'=>'string', 'needle'=>'string|int', 'offset='=>'int'],
		'strrpos' => ['int|false', 'haystack'=>'string', 'needle'=>'string|int', 'offset='=>'int'],
		'strstr' => ['string|false', 'haystack'=>'string', 'needle'=>'string|int', 'before_needle='=>'bool'],
		'substr' => ['__benevolent<string|false>', 'string'=>'string', 'start'=>'int', 'length='=>'int'],
		'version_compare' => ['int|bool', 'version1'=>'string', 'version2'=>'string', 'operator='=>'string'],
		'xml_parser_create' => ['resource', 'encoding='=>'string'],
		'xml_parser_create_ns' => ['resource', 'encoding='=>'string', 'sep='=>'string'],
		'xml_parser_free' => ['bool', 'parser'=>'resource'],
		'xml_parser_get_option' => ['mixed|false', 'parser'=>'resource', 'option'=>'int'],
		'xml_parser_set_option' => ['bool', 'parser'=>'resource', 'option'=>'int', 'value'=>'mixed'],
		'xmlwriter_end_attribute' => ['bool', 'xmlwriter'=>'resource'],
		'xmlwriter_end_cdata' => ['bool', 'xmlwriter'=>'resource'],
		'xmlwriter_end_comment' => ['bool', 'xmlwriter'=>'resource'],
		'xmlwriter_end_document' => ['bool', 'xmlwriter'=>'resource'],
		'xmlwriter_end_dtd' => ['bool', 'xmlwriter'=>'resource'],
		'xmlwriter_end_dtd_attlist' => ['bool', 'xmlwriter'=>'resource'],
		'xmlwriter_end_dtd_element' => ['bool', 'xmlwriter'=>'resource'],
		'xmlwriter_end_dtd_entity' => ['bool', 'xmlwriter'=>'resource'],
		'xmlwriter_end_element' => ['bool', 'xmlwriter'=>'resource'],
		'xmlwriter_end_pi' => ['bool', 'xmlwriter'=>'resource'],
		'xmlwriter_flush' => ['mixed', 'xmlwriter'=>'resource', 'empty='=>'bool'],
		'xmlwriter_full_end_element' => ['bool', 'xmlwriter'=>'resource'],
		'xmlwriter_open_memory' => ['resource'],
		'xmlwriter_open_uri' => ['resource', 'source'=>'string'],
		'xmlwriter_output_memory' => ['string', 'xmlwriter'=>'resource', 'flush='=>'bool'],
		'xmlwriter_set_indent' => ['bool', 'xmlwriter'=>'resource', 'indent'=>'bool'],
		'xmlwriter_set_indent_string' => ['bool', 'xmlwriter'=>'resource', 'indentstring'=>'string'],
		'xmlwriter_start_attribute' => ['bool', 'xmlwriter'=>'resource', 'name'=>'string'],
		'xmlwriter_start_attribute_ns' => ['bool', 'xmlwriter'=>'resource', 'prefix'=>'string', 'name'=>'string', 'uri'=>'string'],
		'xmlwriter_start_cdata' => ['bool', 'xmlwriter'=>'resource'],
		'xmlwriter_start_comment' => ['bool', 'xmlwriter'=>'resource'],
		'xmlwriter_start_document' => ['bool', 'xmlwriter'=>'resource', 'version='=>'string', 'encoding='=>'string', 'standalone='=>'string'],
		'xmlwriter_start_dtd' => ['bool', 'xmlwriter'=>'resource', 'name'=>'string', 'publicid='=>'string', 'sysid='=>'string'],
		'xmlwriter_start_dtd_attlist' => ['bool', 'xmlwriter'=>'resource', 'name'=>'string'],
		'xmlwriter_start_dtd_element' => ['bool', 'xmlwriter'=>'resource', 'name'=>'string'],
		'xmlwriter_start_dtd_entity' => ['bool', 'xmlwriter'=>'resource', 'name'=>'string', 'isparam'=>'bool'],
		'xmlwriter_start_element' => ['bool', 'xmlwriter'=>'resource', 'name'=>'string'],
		'xmlwriter_start_element_ns' => ['bool', 'xmlwriter'=>'resource', 'prefix'=>'string', 'name'=>'string', 'uri'=>'string|null'],
		'xmlwriter_start_pi' => ['bool', 'xmlwriter'=>'resource', 'target'=>'string'],
		'xmlwriter_text' => ['bool', 'xmlwriter'=>'resource', 'content'=>'string'],
		'xmlwriter_write_attribute' => ['bool', 'xmlwriter'=>'resource', 'name'=>'string', 'content'=>'string'],
		'xmlwriter_write_attribute_ns' => ['bool', 'xmlwriter'=>'resource', 'prefix'=>'string', 'name'=>'string', 'uri'=>'string', 'content'=>'string'],
		'xmlwriter_write_cdata' => ['bool', 'xmlwriter'=>'resource', 'content'=>'string'],
		'xmlwriter_write_comment' => ['bool', 'xmlwriter'=>'resource', 'content'=>'string'],
		'xmlwriter_write_dtd' => ['bool', 'xmlwriter'=>'resource', 'name'=>'string', 'publicid='=>'string', 'sysid='=>'string', 'subset='=>'string'],
		'xmlwriter_write_dtd_attlist' => ['bool', 'xmlwriter'=>'resource', 'name'=>'string', 'content'=>'string'],
		'xmlwriter_write_dtd_element' => ['bool', 'xmlwriter'=>'resource', 'name'=>'string', 'content'=>'string'],
		'xmlwriter_write_dtd_entity' => ['bool', 'xmlwriter'=>'resource', 'name'=>'string', 'content'=>'string', 'pe'=>'bool', 'publicid'=>'string', 'sysid'=>'string', 'ndataid'=>'string'],
		'xmlwriter_write_element' => ['bool', 'xmlwriter'=>'resource', 'name'=>'string', 'content'=>'string'],
		'xmlwriter_write_element_ns' => ['bool', 'xmlwriter'=>'resource', 'prefix'=>'string', 'name'=>'string', 'uri'=>'string', 'content'=>'string'],
		'xmlwriter_write_pi' => ['bool', 'xmlwriter'=>'resource', 'target'=>'string', 'content'=>'string'],
		'xmlwriter_write_raw' => ['bool', 'xmlwriter'=>'resource', 'content'=>'string'],
	]
];
<?php

namespace _PHPStan_dcc7b7cff;

// phpcs:ignoreFile
return ['new' => ['error_log' => ['bool', 'message' => 'string', 'message_type=' => '0|1|2|3|4', 'destination=' => 'string', 'extra_headers=' => 'string'], 'Imagick::adaptiveBlurImage' => ['bool', 'radius' => 'float', 'sigma' => 'float', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::adaptiveSharpenImage' => ['bool', 'radius' => 'float', 'sigma' => 'float', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::addNoiseImage' => ['bool', 'noise_type' => 'Imagick::NOISE_*', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::autoGammaImage' => ['bool', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::autoLevelImage' => ['bool', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::blurImage' => ['bool', 'radius' => 'float', 'sigma' => 'float', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::brightnessContrastImage' => ['bool', 'brightness' => 'float', 'contrast' => 'float', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::clampImage' => ['bool', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::combineImages' => ['Imagick', 'channeltype' => 'Imagick::CHANNEL_*'], 'Imagick::compareImageChannels' => ['array{Imagick,float}', 'image' => 'imagick', 'channeltype' => 'Imagick::CHANNEL_*', 'metrictype' => 'Imagick::METRIC_*'], 'Imagick::compareImageLayers' => ['Imagick', 'method' => 'Imagick::LAYERMETHOD_*'], 'Imagick::compareImages' => ['array{Imagick,float}', 'compare' => 'imagick', 'metric' => 'Imagick::METRIC_*'], 'Imagick::compositeImage' => ['bool', 'composite_object' => 'imagick', 'composite' => 'Imagick::COMPOSITE_*', 'x' => 'int', 'y' => 'int', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::contrastStretchImage' => ['bool', 'black_point' => 'float', 'white_point' => 'float', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::convolveImage' => ['bool', 'kernel' => 'array', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::distortImage' => ['bool', 'method' => 'Imagick::DISTORTION_*', 'arguments' => 'array', 'bestfit' => 'bool'], 'Imagick::evaluateImage' => ['bool', 'op' => 'Imagick::EVALUATE_*', 'constant' => 'float', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::exportImagePixels' => ['list<int>', 'x' => 'int', 'y' => 'int', 'width' => 'int', 'height' => 'int', 'map' => 'string', 'storage' => 'Imagick::PIXEL_*'], 'Imagick::floodFillPaintImage' => ['bool', 'fill' => 'mixed', 'fuzz' => 'float', 'target' => 'mixed', 'x' => 'int', 'y' => 'int', 'invert' => 'bool', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::functionImage' => ['bool', 'function' => 'Imagick::FUNCTION_*', 'arguments' => 'array', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::fxImage' => ['Imagick', 'expression' => 'string', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::gammaImage' => ['bool', 'gamma' => 'float', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::gaussianBlurImage' => ['bool', 'radius' => 'float', 'sigma' => 'float', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::getImageChannelDepth' => ['int', 'channel' => 'Imagick::CHANNEL_*'], 'Imagick::getImageChannelDistortion' => ['float', 'reference' => 'imagick', 'channel' => 'Imagick::CHANNEL_*', 'metric' => 'Imagick::METRIC_*'], 'Imagick::getImageChannelDistortions' => ['float', 'reference' => 'imagick', 'metric' => 'Imagick::METRIC_*', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::getImageChannelExtrema' => ['array{minima:0|positive-int,maxima:0|positive-int}', 'channel' => 'Imagick::CHANNEL_*'], 'Imagick::getImageChannelKurtosis' => ['array{kurtosis:float,skewness:float}', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::getImageChannelMean' => ['array{mean:float,standardDeviation:float}', 'channel' => 'Imagick::CHANNEL_*'], 'Imagick::getImageChannelRange' => ['array{minima:float,maxima:float}', 'channel' => 'Imagick::CHANNEL_*'], 'Imagick::getImageDistortion' => ['float', 'reference' => 'magickwand', 'metric' => 'Imagick::METRIC_*'], 'Imagick::getResource' => ['int', 'type' => 'Imagick::RESOURCETYPE_*'], 'Imagick::getResourceLimit' => ['int', 'type' => 'Imagick::RESOURCETYPE_*'], 'Imagick::importImagePixels' => ['bool', 'x' => 'int', 'y' => 'int', 'width' => 'int', 'height' => 'int', 'map' => 'string', 'storage' => 'Imagick::PIXEL_*', 'pixels' => 'array'], 'Imagick::levelImage' => ['bool', 'blackpoint' => 'float', 'gamma' => 'float', 'whitepoint' => 'float', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::mergeImageLayers' => ['Imagick', 'layer_method' => 'Imagick::LAYERMETHOD_*'], 'Imagick::montageImage' => ['Imagick', 'draw' => 'imagickdraw', 'tile_geometry' => 'string', 'thumbnail_geometry' => 'string', 'mode' => 'Imagick::MONTAGEMODE_*', 'frame' => 'string'], 'Imagick::morphology' => ['bool', 'morphologyMethod' => 'Imagick::MORPHOLOGY_*', 'iterations' => 'int', 'ImagickKernel' => 'ImagickKernel', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::motionBlurImage' => ['bool', 'radius' => 'float', 'sigma' => 'float', 'angle' => 'float', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::negateImage' => ['bool', 'gray' => 'bool', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::normalizeImage' => ['bool', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::opaquePaintImage' => ['bool', 'target' => 'mixed', 'fill' => 'mixed', 'fuzz' => 'float', 'invert' => 'bool', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::orderedPosterizeImage' => ['bool', 'threshold_map' => 'string', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::paintFloodfillImage' => ['bool', 'fill' => 'mixed', 'fuzz' => 'float', 'bordercolor' => 'mixed', 'x' => 'int', 'y' => 'int', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::paintOpaqueImage' => ['bool', 'target' => 'mixed', 'fill' => 'mixed', 'fuzz' => 'float', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::radialBlurImage' => ['bool', 'angle' => 'float', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::randomThresholdImage' => ['bool', 'low' => 'float', 'high' => 'float', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::remapImage' => ['bool', 'replacement' => 'imagick', 'dither' => 'Imagick::DITHERMETHOD_*'], 'Imagick::rotationalBlurImage' => ['bool', 'float' => 'string', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::segmentImage' => ['bool', 'colorspace' => 'Imagick::COLORSPACE_*', 'cluster_threshold' => 'float', 'smooth_threshold' => 'float', 'verbose=' => 'bool'], 'Imagick::selectiveBlurImage' => ['bool', 'radius' => 'float', 'sigma' => 'float', 'threshold' => 'float', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::separateImageChannel' => ['bool', 'channel' => 'Imagick::CHANNEL_*'], 'Imagick::setColorspace' => ['bool', 'colorspace' => 'Imagick::COLORSPACE_*'], 'Imagick::setCompression' => ['bool', 'compression' => 'Imagick::COMPRESSION_*'], 'Imagick::setGravity' => ['bool', 'gravity' => 'Imagick::GRAVITY_*'], 'Imagick::setImageAlphaChannel' => ['bool', 'mode' => 'Imagick::ALPHACHANNEL_*'], 'Imagick::setImageChannelDepth' => ['bool', 'channel' => 'Imagick::CHANNEL_*', 'depth' => 'int'], 'Imagick::setImageChannelMask' => ['', 'channel' => 'Imagick::CHANNEL_*'], 'Imagick::setImageClipMask' => ['bool', 'clip_mask' => 'imagick'], 'Imagick::setImageColormapColor' => ['bool', 'index' => 'int', 'color' => 'imagickpixel'], 'Imagick::setImageColorspace' => ['bool', 'colorspace' => 'Imagick::COLORSPACE_*'], 'Imagick::setImageCompose' => ['bool', 'compose' => 'Imagick::COMPOSITE_*'], 'Imagick::setImageCompression' => ['bool', 'compression' => 'Imagick::COMPRESSION_*'], 'Imagick::setImageDispose' => ['bool', 'dispose' => 'Imagick::DISPOSE_*'], 'Imagick::setImageGravity' => ['bool', 'gravity' => 'Imagick::GRAVITY_*'], 'Imagick::setImageInterlaceScheme' => ['bool', 'interlace_scheme' => 'Imagick::INTERLACE_*'], 'Imagick::setImageInterpolateMethod' => ['bool', 'method' => 'Imagick::INTERPOLATE_*'], 'Imagick::setImageOrientation' => ['bool', 'orientation' => 'Imagick::ORIENTATION_*'], 'Imagick::setImageRenderingIntent' => ['bool', 'rendering_intent' => 'Imagick::RENDERINGINTENT_*'], 'Imagick::setImageType' => ['bool', 'image_type' => 'Imagick::IMGTYPE_*'], 'Imagick::setType' => ['bool', 'image_type' => 'Imagick::IMGTYPE_*'], 'Imagick::sharpenImage' => ['bool', 'radius' => 'float', 'sigma' => 'float', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::sigmoidalContrastImage' => ['bool', 'sharpen' => 'bool', 'alpha' => 'float', 'beta' => 'float', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::similarityImage' => ['Imagick', 'imagick' => 'Imagick', '&bestMatch' => 'array', '&similarity' => 'float', 'similarity_threshold' => 'float', 'metric' => 'Imagick::METRIC_*'], 'Imagick::sparseColorImage' => ['bool', 'sparse_method' => 'Imagick::SPARSECOLORMETHOD_*', 'arguments' => 'array', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::statisticImage' => ['bool', 'type' => 'Imagick::STATISTIC_*', 'width' => 'int', 'height' => 'int', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::thresholdImage' => ['bool', 'threshold' => 'float', 'channel=' => 'Imagick::CHANNEL_*'], 'Imagick::transformImageColorspace' => ['bool', 'colorspace' => 'Imagick::COLORSPACE_*'], 'Imagick::unsharpMaskImage' => ['bool', 'radius' => 'float', 'sigma' => 'float', 'amount' => 'float', 'threshold' => 'float', 'channel=' => 'Imagick::CHANNEL_*'], 'ImagickDraw::color' => ['bool', 'x' => 'float', 'y' => 'float', 'paintmethod' => 'Imagick::PAINT_*'], 'ImagickDraw::composite' => ['bool', 'compose' => 'Imagick::COMPOSITE_*', 'x' => 'float', 'y' => 'float', 'width' => 'float', 'height' => 'float', 'compositewand' => 'imagick'], 'ImagickDraw::getFillRule' => ['Imagick::FILLRULE_*'], 'ImagickDraw::getFontStretch' => ['Imagick::STRETCH_*'], 'ImagickDraw::getFontStyle' => ['Imagick::STYLE_*'], 'ImagickDraw::getGravity' => ['Imagick::GRAVITY_*'], 'ImagickDraw::getStrokeLineCap' => ['Imagick::LINECAP_*'], 'ImagickDraw::getStrokeLineJoin' => ['Imagick::LINEJOIN_*'], 'ImagickDraw::getTextAlignment' => ['Imagick::ALIGN_*'], 'ImagickDraw::getTextDecoration' => ['Imagick::DECORATION_*'], 'ImagickDraw::matte' => ['bool', 'x' => 'float', 'y' => 'float', 'paintmethod' => 'Imagick::PAINT_*'], 'ImagickDraw::setClipRule' => ['bool', 'fill_rule' => 'Imagick::FILLRULE_*'], 'ImagickDraw::setFillRule' => ['bool', 'fill_rule' => 'Imagick::FILLRULE_*'], 'ImagickDraw::setFontStretch' => ['bool', 'fontstretch' => 'Imagick::STRETCH_*'], 'ImagickDraw::setFontStyle' => ['bool', 'style' => 'Imagick::STYLE_*'], 'ImagickDraw::setGravity' => ['bool', 'gravity' => 'Imagick::GRAVITY_*'], 'ImagickDraw::setStrokeLineCap' => ['bool', 'linecap' => 'Imagick::LINECAP_*'], 'ImagickDraw::setStrokeLineJoin' => ['bool', 'linejoin' => 'Imagick::LINEJOIN_*'], 'ImagickDraw::setTextAlignment' => ['bool', 'alignment' => 'Imagick::ALIGN_*'], 'ImagickDraw::setTextAntialias' => ['bool', 'antialias' => 'bool'], 'ImagickDraw::setTextDecoration' => ['bool', 'decoration' => 'Imagick::DECORATION_*'], 'ImagickKernel::fromBuiltin' => ['ImagickKernel', 'kernelType' => 'Imagick::KERNEL_*', 'kernelString' => 'string'], 'ImagickKernel::scale' => ['void', 'scale' => 'float', 'normalizeFlag' => 'Imagick::NORMALIZE_KERNEL_*'], 'max' => ['', '...arg1' => 'non-empty-array'], 'min' => ['', '...arg1' => 'non-empty-array']], 'old' => []];
<?php

declare (strict_types=1);
namespace _PHPStan_dcc7b7cff;

use PHPStan\Command\AnalyseCommand;
use PHPStan\Command\ClearResultCacheCommand;
use PHPStan\Command\DumpParametersCommand;
use PHPStan\Command\FixerWorkerCommand;
use PHPStan\Command\WorkerCommand;
use PHPStan\Internal\ComposerHelper;
use _PHPStan_dcc7b7cff\Symfony\Component\Console\Helper\ProgressBar;
(function () {
    \error_reporting(\E_ALL);
    \ini_set('display_errors', 'stderr');
    if (\version_compare(\PHP_VERSION, '7.4.0', '<')) {
        // PHP earlier than 7.4.x with OpCache triggers a bug when we intercept
        // custom autoloaders' reads to discover file paths. See PHPStan #4881.
        \ini_set('opcache.enable', 'Off');
    }
    if (\PHP_VERSION_ID < 70300) {
        \gc_disable();
        // performance boost
    }
    \define('__PHPSTAN_RUNNING__', \true);
    $devOrPharLoader = (require_once 'phar://phpstan.phar/vendor/autoload.php');
    require_once 'phar://phpstan.phar/preload.php';
    $composer = ComposerHelper::getComposerConfig(\getcwd());
    if ($composer !== null) {
        $vendorDirectory = ComposerHelper::getVendorDirFromComposerConfig(\getcwd(), $composer);
    } else {
        $vendorDirectory = \getcwd() . '/' . 'vendor';
    }
    $devOrPharLoader->unregister();
    $composerAutoloadFiles = $GLOBALS['__composer_autoload_files'];
    if (!\array_key_exists('e88992873b7765f9b5710cab95ba5dd7', $composerAutoloadFiles) || !\array_key_exists('3e76f7f02b41af8cea96018933f6b7e3', $composerAutoloadFiles) || !\array_key_exists('a4a119a56e50fbb293281d9a48007e0e', $composerAutoloadFiles) || !\array_key_exists('0e6d7bf4a5811bfa5cf40c5ccd6fae6a', $composerAutoloadFiles) || !\array_key_exists('e69f7f6ee287b969198c3c9d6777bd38', $composerAutoloadFiles) || !\array_key_exists('0d59ee240a4cd96ddbb4ff164fccea4d', $composerAutoloadFiles) || !\array_key_exists('b686b8e46447868025a15ce5d0cb2634', $composerAutoloadFiles) || !\array_key_exists('8825ede83f2f289127722d4e842cf7e8', $composerAutoloadFiles)) {
        echo "Composer autoloader changed\n";
        exit(1);
    }
    // empty the global variable so that unprefixed functions from user-space can be loaded
    $GLOBALS['__composer_autoload_files'] = [
        // fix unprefixed Hoa namespace - files already loaded
        'e88992873b7765f9b5710cab95ba5dd7' => \true,
        '3e76f7f02b41af8cea96018933f6b7e3' => \true,
        // vendor/symfony/polyfill-php80/bootstrap.php
        'a4a119a56e50fbb293281d9a48007e0e' => \true,
        // vendor/symfony/polyfill-mbstring/bootstrap.php
        '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => \true,
        // vendor/symfony/polyfill-intl-normalizer/bootstrap.php
        'e69f7f6ee287b969198c3c9d6777bd38' => \true,
        // vendor/symfony/polyfill-php73/bootstrap.php
        '0d59ee240a4cd96ddbb4ff164fccea4d' => \true,
        // vendor/symfony/polyfill-php74/bootstrap.php
        'b686b8e46447868025a15ce5d0cb2634' => \true,
        // vendor/symfony/polyfill-intl-grapheme/bootstrap.php
        '8825ede83f2f289127722d4e842cf7e8' => \true,
    ];
    $autoloaderInWorkingDirectory = $vendorDirectory . '/autoload.php';
    $composerAutoloaderProjectPaths = [];
    /** @var array<callable>|false $autoloadFunctionsBefore */
    $autoloadFunctionsBefore = \spl_autoload_functions();
    if (@\is_file($autoloaderInWorkingDirectory)) {
        $composerAutoloaderProjectPaths[] = \dirname($autoloaderInWorkingDirectory, 2);
        require_once $autoloaderInWorkingDirectory;
    }
    $autoloadProjectAutoloaderFile = function (string $file) use(&$composerAutoloaderProjectPaths) : void {
        $path = \dirname(__DIR__) . $file;
        if (!\extension_loaded('phar')) {
            if (@\is_file($path)) {
                $composerAutoloaderProjectPaths[] = \dirname($path, 2);
                require_once $path;
            }
        } else {
            $pharPath = \Phar::running(\false);
            if ($pharPath === '') {
                if (@\is_file($path)) {
                    $composerAutoloaderProjectPaths[] = \dirname($path, 2);
                    require_once $path;
                }
            } else {
                $path = \dirname($pharPath) . $file;
                if (@\is_file($path)) {
                    $composerAutoloaderProjectPaths[] = \dirname($path, 2);
                    require_once $path;
                }
            }
        }
    };
    $autoloadProjectAutoloaderFile('/../../autoload.php');
    /** @var array<callable>|false $autoloadFunctionsAfter */
    $autoloadFunctionsAfter = \spl_autoload_functions();
    if ($autoloadFunctionsBefore !== \false && $autoloadFunctionsAfter !== \false) {
        $newAutoloadFunctions = [];
        foreach ($autoloadFunctionsAfter as $after) {
            if (\is_array($after) && \count($after) > 0) {
                if (\is_object($after[0]) && \get_class($after[0]) === \Composer\Autoload\ClassLoader::class) {
                    continue;
                }
                if ($after[0] === 'PHPStan\\PharAutoloader') {
                    continue;
                }
            }
            foreach ($autoloadFunctionsBefore as $before) {
                if ($after === $before) {
                    continue 2;
                }
            }
            $newAutoloadFunctions[] = $after;
        }
        $GLOBALS['__phpstanAutoloadFunctions'] = $newAutoloadFunctions;
    }
    $devOrPharLoader->register(\true);
    $application = new \_PHPStan_dcc7b7cff\Symfony\Component\Console\Application('PHPStan - PHP Static Analysis Tool', ComposerHelper::getPhpStanVersion());
    $application->setDefaultCommand('analyse');
    ProgressBar::setFormatDefinition('file_download', ' [%bar%] %percent:3s%% %fileSize%');
    $reversedComposerAutoloaderProjectPaths = \array_reverse($composerAutoloaderProjectPaths);
    $application->add(new AnalyseCommand($reversedComposerAutoloaderProjectPaths));
    $application->add(new WorkerCommand($reversedComposerAutoloaderProjectPaths));
    $application->add(new ClearResultCacheCommand($reversedComposerAutoloaderProjectPaths));
    $application->add(new FixerWorkerCommand($reversedComposerAutoloaderProjectPaths));
    $application->add(new DumpParametersCommand($reversedComposerAutoloaderProjectPaths));
    $application->run();
})();
<?php

abstract class ReflectionFunctionAbstract
{

	/**
	 * @return string|false
	 */
	public function getFileName () {}

    /**
     * @return array<ReflectionAttribute<object>>
     */
    public function getAttributes(?string $name = null, int $flags = 0)
    {
    }
}
<?php

class ReflectionMethod
{

	/**
	 * @var class-string
	 */
	public $class;

}
<?php

class ImagickPixel
{
	/**
	 * @return ($normalized is 0 ? array{r: int<0, 255>, g: int<0, 255>, b: int<0, 255>, a: int<0, 1>} : ($normalized is 1 ? array{r: float, g: float, b: float, a: float} : ($normalized is 2 ? array{r: int<0, 255>, g: int<0, 255>, b: int<0, 255>, a: int<0, 255>} : array{})))
	 */
	public function getColor(int $normalized = 0): array;
}
<?php

/**
 * @template-covariant T as object
 */
final class WeakReference
{

	/**
	 * @template TIn as object
	 * @param TIn $referent
	 * @return WeakReference<TIn>
	 */
	public static function create(object $referent): WeakReference {}

	/** @return ?T */
	public function get() {}
}


/**
 * @template TKey of object
 * @template TValue
 * @implements \ArrayAccess<TKey, TValue>
 * @implements \IteratorAggregate<TKey, TValue>
 */
final class WeakMap implements \ArrayAccess, \Countable, \IteratorAggregate
{
}
<?php

namespace Ds;

use ArrayAccess;
use Countable;
use JsonSerializable;
use OutOfBoundsException;
use OutOfRangeException;
use IteratorAggregate;
use UnderflowException;

/**
 * @template-covariant TKey
 * @template-covariant TValue
 * @extends IteratorAggregate<TKey, TValue>
 */
interface Collection extends IteratorAggregate, Countable, JsonSerializable
{
	/**
	 * @return static
	 */
	public function copy();

	/**
	 * @return array<TKey, TValue>
	 */
	public function toArray(): array;
}

/**
 * @template TValue
 * @implements Sequence<TValue>
 */
final class Deque implements Sequence
{
	/**
	 * @param iterable<TValue> $values
	 */
	public function __construct(iterable $values = [])
	{
	}

	/**
	 * @return Deque<TValue>
	 */
	public function copy()
	{
	}

	/**
	 * @template TValue2
	 * @param iterable<TValue2> $values
	 * @return Deque<TValue|TValue2>
	 */
	public function merge(iterable $values): Deque
	{
	}

	/**
	 * @param (callable(TValue): bool)|null $callback
	 * @return Deque<TValue>
	 */
	public function filter(callable $callback = null): Deque
	{
	}

	/**
	 * @template TNewValue
	 * @param callable(TValue): TNewValue $callback
	 * @return Deque<TNewValue>
	 */
	public function map(callable $callback): Deque
	{
	}

	/**
	 * @return Deque<TValue>
	 */
	public function reversed(): Deque
	{
	}

	/**
	 * @return Deque<TValue>
	 */
	public function slice(int $offset, ?int $length = null): Deque
	{
	}
}

/**
 * @template TKey
 * @template TValue
 * @implements Collection<TKey, TValue>
 * @implements ArrayAccess<TKey, TValue>
 */
final class Map implements Collection, ArrayAccess
{
	/**
	 * @param iterable<TKey, TValue> $values
	 */
	public function __construct(iterable $values = [])
	{
	}

	/**
	 * @return Map<TKey, TValue>
	 */
	public function copy(): Map
	{
	}

	/**
	 * @param callable(TKey, TValue): TValue $callback
	 * @return void
	 */
	public function apply(callable $callback)
	{
	}

	/**
	 * @return Pair<TKey, TValue>
	 * @throws UnderflowException
	 */
	public function first(): Pair
	{
	}

	/**
	 * @return Pair<TKey, TValue>
	 * @throws UnderflowException
	 */
	public function last(): Pair
	{
	}

	/**
	 * @return Pair<TKey, TValue>
	 * @throws OutOfRangeException
	 */
	public function skip(int $position): Pair
	{
	}

	/**
	 * @template TKey2
	 * @template TValue2
	 * @param iterable<TKey2, TValue2> $values
	 * @return Map<TKey|TKey2, TValue|TValue2>
	 */
	public function merge(iterable $values): Map
	{
	}

	/**
	 * @template TKey2
	 * @template TValue2
	 * @param Map<TKey2, TValue2> $map
	 * @return Map<TKey&TKey2, TValue>
	 */
	public function intersect(Map $map): Map
	{
	}

	/**
	 * @template TValue2
	 * @param Map<TKey, TValue2> $map
	 * @return Map<TKey, TValue>
	 */
	public function diff(Map $map): Map
	{
	}

	/**
	 * @param TKey $key
	 */
	public function hasKey($key): bool
	{
	}

	/**
	 * @param TValue $value
	 */
	public function hasValue($value): bool
	{
	}

	/**
	 * @param (callable(TKey, TValue): bool)|null $callback
	 * @return Map<TKey, TValue>
	 */
	public function filter(callable $callback = null): Map
	{
	}

	/**
	 * @template TDefault
	 * @param TKey $key
	 * @param TDefault $default
	 * @return TValue|TDefault
	 * @throws OutOfBoundsException
	 */
	public function get($key, $default = null)
	{
	}

	/**
	 * @return Set<TKey>
	 */
	public function keys(): Set
	{
	}

	/**
	 * @template TNewValue
	 * @param callable(TKey, TValue): TNewValue $callback
	 * @return Map<TKey, TNewValue>
	 */
	public function map(callable $callback): Map
	{
	}

	/**
	 * @return Sequence<Pair<TKey, TValue>>
	 */
	public function pairs(): Sequence
	{
	}

	/**
	 * @param TKey $key
	 * @param TValue $value
	 * @return void
	 */
	public function put($key, $value)
	{
	}

	/**
	 * @param iterable<TKey, TValue> $values
	 * @return void
	 */
	public function putAll(iterable $values)
	{
	}

	/**
	 * @template TCarry
	 * @param callable(TCarry, TKey, TValue): TCarry $callback
	 * @param TCarry $initial
	 * @return TCarry
	 */
	public function reduce(callable $callback, $initial = null)
	{
	}

	/**
	 * @template TDefault
	 * @param TKey $key
	 * @param TDefault $default
	 * @return TValue|TDefault
	 * @throws \OutOfBoundsException
	 */
	public function remove($key, $default = null)
	{
	}

	/**
	 * @return Map<TKey, TValue>
	 */
	public function reversed(): Map
	{
	}

	/**
	 * @return Map<TKey, TValue>
	 */
	public function slice(int $offset, ?int $length = null): Map
	{
	}

	/**
	 * @param (callable(TValue, TValue): int)|null $comparator
	 * @return void
	 */
	public function sort(callable $comparator = null)
	{
	}

	/**
	 * @param (callable(TValue, TValue): int)|null $comparator
	 * @return Map<TKey, TValue>
	 */
	public function sorted(callable $comparator = null): Map
	{
	}

	/**
	 * @param (callable(TKey, TKey): int)|null $comparator
	 * @return void
	 */
	public function ksort(callable $comparator = null)
	{
	}

	/**
	 * @param (callable(TKey, TKey): int)|null $comparator
	 * @return Map<TKey, TValue>
	 */
	public function ksorted(callable $comparator = null): Map
	{
	}

	/**
	 * @return array<TKey, TValue>
	 */
	public function toArray(): array
	{
	}

	/**
	 * @return Sequence<TValue>
	 */
	public function values(): Sequence
	{
	}

	/**
	 * @template TKey2
	 * @template TValue2
	 * @param Map<TKey2, TValue2> $map
	 * @return Map<TKey|TKey2, TValue|TValue2>
	 */
	public function union(Map $map): Map
	{
	}

	/**
	 * @template TKey2
	 * @template TValue2
	 * @param Map<TKey2, TValue2> $map
	 * @return Map<TKey|TKey2, TValue|TValue2>
	 */
	public function xor(Map $map): Map
	{
	}
}

/**
 * @template-covariant TKey
 * @template-covariant TValue
 */
final class Pair implements JsonSerializable
{
	/**
	 * @var TKey
	 */
	public $key;

	/**
	 * @var TValue
	 */
	public $value;

	/**
	 * @param TKey $key
	 * @param TValue $value
	 */
	public function __construct($key = null, $value = null)
	{
	}

	/**
	 * @return Pair<TKey, TValue>
	 */
	public function copy(): Pair
	{
	}
}

/**
 * @template TValue
 * @extends Collection<int, TValue>
 * @extends ArrayAccess<int, TValue>
 */
interface Sequence extends Collection, ArrayAccess
{
	/**
	 * @param callable(TValue): TValue $callback
	 * @return void
	 */
	public function apply(callable $callback);

	/**
	 * @param TValue ...$values
	 */
	public function contains(...$values): bool;

	/**
	 * @param (callable(TValue): bool)|null $callback
	 * @return Sequence<TValue>
	 */
	public function filter(callable $callback = null);

	/**
	 * @param TValue $value
	 * @return int|false
	 */
	public function find($value);

	/**
	 * @return TValue
	 * @throws \UnderflowException
	 */
	public function first();

	/**
	 * @return TValue
	 * @throws \OutOfRangeException
	 */
	public function get(int $index);

	/**
	 * @param TValue ...$values
	 * @throws \OutOfRangeException
	 * @return void
	 */
	public function insert(int $index, ...$values);

	/**
	 * @param string $glue
	 * @return string
	 */
	public function join(string $glue = null): string;

	/**
	 * @return TValue
	 * @throws \UnderflowException
	 */
	public function last();

	/**
	 * @template TNewValue
	 * @param callable(TValue): TNewValue $callback
	 * @return Sequence<TNewValue>
	 */
	public function map(callable $callback);

	/**
	 * @template TValue2
	 * @param iterable<TValue2> $values
	 * @return Sequence<TValue|TValue2>
	 */
	public function merge(iterable $values);

	/**
	 * @return TValue
	 * @throws \UnderflowException
	 */
	public function pop();

	/**
	 * @param TValue ...$values
	 * @return void
	 */
	public function push(...$values);

	/**
	 * @template TCarry
	 * @param callable(TCarry, TValue): TCarry $callback
	 * @param TCarry $initial
	 * @return TCarry
	 */
	public function reduce(callable $callback, $initial = null);

	/**
	 * @return TValue
	 * @throws \OutOfRangeException
	 */
	public function remove(int $index);

	/**
	 * @return Sequence<TValue>
	 */
	public function reversed();

	/**
	 * @param TValue $value
	 * @throws \OutOfRangeException
	 * @return void
	 */
	public function set(int $index, $value);

	/**
	 * @return TValue
	 * @throws \UnderflowException
	 */
	public function shift();

	/**
	 * @return Sequence<TValue>
	 */
	public function slice(int $index, ?int $length = null);

	/**
	 * @param (callable(TValue, TValue): int)|null $comparator
	 * @return void
	 */
	public function sort(callable $comparator = null);

	/**
	 * @param (callable(TValue, TValue): int)|null $comparator
	 * @return Sequence<TValue>
	 */
	public function sorted(callable $comparator = null);

	/**
	 * @param TValue ...$values
	 * @return void
	 */
	public function unshift(...$values);
}


/**
 * @template TValue
 * @implements Sequence<TValue>
 */
final class Vector implements Sequence
{
	/**
	 * @param iterable<TValue> $values
	 */
	public function __construct(iterable $values = [])
	{
	}

	/**
	 * @return Vector<TValue>
	 */
	public function copy()
	{
	}

	/**
	 * @return Vector<TValue>
	 */
	public function reversed(): Vector
	{
	}

	/**
	 * @return Vector<TValue>
	 */
	public function slice(int $offset, ?int $length = null): Vector
	{
	}

	/**
	 * @param (callable(TValue, TValue): int)|null $comparator
	 * @return Vector<TValue>
	 */
	public function sorted(callable $comparator = null): Vector
	{
	}

	/**
	 * @param (callable(TValue): bool)|null $callback
	 * @return Vector<TValue>
	 */
	public function filter(callable $callback = null): Vector
	{
	}

	/**
	 * @template TNewValue
	 * @param callable(TValue): TNewValue $callback
	 * @return Vector<TNewValue>
	 */
	public function map(callable $callback): Vector
	{
	}

	/**
	 * @template TValue2
	 * @param iterable<TValue2> $values
	 * @return Vector<TValue|TValue2>
	 */
	public function merge(iterable $values): Vector
	{
	}
}

/**
 * @template TValue
 * @implements Collection<int, TValue>
 * @implements ArrayAccess<int, TValue>
 */
final class Set implements Collection, ArrayAccess
{
	/**
	 * @param iterable<TValue> $values
	 */
	public function __construct(iterable $values = [])
	{
	}

	/**
	 * @param TValue ...$values
	 */
	public function add(...$values): void
	{
	}

	/**
	 * @param TValue ...$values
	 */
	public function contains(...$values): bool
	{
	}

	/**
	 * @return Set<TValue>
	 */
	public function copy(): Set
	{
	}

	/**
	 * @template TValue2
	 * @param Set<TValue2> $set
	 * @return Set<TValue>
	 */
	public function diff(Set $set): Set
	{
	}

	/**
	 * @param (callable(TValue): bool)|null $callback
	 * @return Set<TValue>
	 */
	public function filter(callable $callback = null): Set
	{
	}

	/**
	 * @return TValue
	 * @throws \UnderflowException
	 */
	public function first()
	{
	}

	/**
	 * @return TValue
	 * @throws \OutOfRangeException
	 */
	public function get(int $index)
	{
	}

	/**
	 * @template TValue2
	 * @param Set<TValue2> $set
	 * @return Set<TValue&TValue2>
	 */
	public function intersect(Set $set): Set
	{
	}

	/**
	 * @return TValue
	 * @throws \UnderflowException
	 */
	public function last()
	{
	}

	/**
	 * @template TNewValue
	 * @param callable(TValue): TNewValue $callback
	 * @return Set<TNewValue>
	 */
	public function map(callable $callback): Set
	{
	}

	/**
	 * @template TValue2
	 * @param iterable<TValue2> $values
	 * @return Set<TValue|TValue2>
	 */
	public function merge(iterable $values): Set
	{
	}

	/**
	 * @template TCarry
	 * @param callable(TCarry, TValue): TCarry $callback
	 * @param TCarry $initial
	 * @return TCarry
	 */
	public function reduce(callable $callback, $initial = null)
	{
	}

	/**
	 * @param TValue ...$values
	 */
	public function remove(...$values): void
	{
	}

	/**
	 * @return Set<TValue>
	 */
	public function reversed(): Set
	{
	}

	/**
	 * @return Set<TValue>
	 */
	public function slice(int $index, ?int $length = null): Set
	{
	}

	/**
	 * @param (callable(TValue, TValue): int)|null $comparator
	 */
	public function sort(callable $comparator = null): void
	{
	}

	/**
	 * @param (callable(TValue, TValue): int)|null $comparator
	 * @return Set<TValue>
	 */
	public function sorted(callable $comparator = null): Set
	{
	}

	/**
	 * @return list<TValue>
	 */
	public function toArray(): array
	{
	}

	/**
	 * @template TValue2
	 * @param Set<TValue2> $set
	 * @return Set<TValue|TValue2>
	 */
	public function union(Set $set): Set
	{
	}

	/**
	 * @template TValue2
	 * @param Set<TValue2> $set
	 * @return Set<TValue|TValue2>
	 */
	public function xor(Set $set): Set
	{
	}
}

/**
 * @template TValue
 * @implements Collection<int, TValue>
 * @implements ArrayAccess<int, TValue>
 */
final class Stack implements Collection, ArrayAccess
{
	/**
	 * @param iterable<TValue> $values
	 */
	public function __construct(iterable $values = [])
	{
	}

	/**
	 * @return Stack<TValue>
	 */
	public function copy(): Stack
	{
	}

	/**
	 * @return TValue
	 * @throws UnderflowException
	 */
	public function peek()
	{
	}

	/**
	 * @return TValue
	 * @throws UnderflowException
	 */
	public function pop()
	{
	}

	/**
	 * @param TValue ...$values
	 * @return void
	 */
	public function push(...$values): void
	{
	}

	/**
	 * @return list<TValue>
	 */
	public function toArray(): array
	{
	}
}

/**
 * @template TValue
 * @implements Collection<int, TValue>
 * @implements ArrayAccess<int, TValue>
 */
final class Queue implements Collection, ArrayAccess
{
	/**
	 * @param iterable<TValue> $values
	 */
	public function __construct(iterable $values = [])
	{
	}

	/**
	 * @return Queue<TValue>
	 */
	public function copy(): Queue
	{
	}

	/**
	 * @return TValue
	 * @throws UnderflowException
	 */
	public function peek()
	{
	}

	/**
	 * @return TValue
	 * @throws UnderflowException
	 */
	public function pop()
	{
	}

	/**
	 * @param TValue ...$values
	 */
	public function push(...$values): void
	{
	}

	/**
	 * @return list<TValue>
	 */
	public function toArray(): array
	{
	}
}

/**
 * @template TValue
 * @implements Collection<int, TValue>
 */
final class PriorityQueue implements Collection
{
	/**
	 * @return PriorityQueue<TValue>
	 */
	public function copy(): PriorityQueue
	{
	}

	/**
	 * @return TValue
	 * @throws UnderflowException
	 */
	public function peek()
	{
	}

	/**
	 * @return TValue
	 * @throws UnderflowException
	 */
	public function pop()
	{
	}

	/**
	 * @param TValue $value
	 */
	public function push($value, int $priority): void
	{
	}

	/**
	 * @return list<TValue>
	 */
	public function toArray(): array
	{
	}
}
<?php

/**
 * @template-covariant TKey
 * @template-covariant TValue
 */
interface Traversable
{
}

/**
 * @template-covariant TKey
 * @template-covariant TValue
 *
 * @extends Traversable<TKey, TValue>
 */
interface IteratorAggregate extends Traversable
{

	/**
	 * @return Traversable<TKey, TValue>
	 */
	public function getIterator();

}

/**
 * @template-covariant TKey
 * @template-covariant TValue
 *
 * @extends Traversable<TKey, TValue>
 */
interface Iterator extends Traversable
{

	/**
	 * @return TValue
	 */
	public function current();

	/**
	 * @return TKey
	 */
	public function key();

}

/**
 * @template-covariant TKey
 * @template-covariant TValue
 *
 * @extends Iterator<TKey, TValue>
 */
interface RecursiveIterator extends Iterator
{

}

/**
 * @template-covariant TKey
 * @template-covariant TValue
 * @template TSend
 * @template-covariant TReturn
 *
 * @implements Iterator<TKey, TValue>
 */
class Generator implements Iterator
{

	/**
	 * @return TReturn
	 */
	public function getReturn() {}

	/**
	 * @param TSend $value
	 * @return TValue
	 */
	public function send($value) {}

}

/**
 * @implements Traversable<string, static>
 * @implements ArrayAccess<int|string, static>
 * @implements Iterator<string, static>
 * @implements RecursiveIterator<string, static>
 */
class SimpleXMLElement implements Traversable, ArrayAccess, Iterator, RecursiveIterator
{

	/**
	 * @return ($filename is null ? string|false : bool)
	 */
	public function asXML(?string $filename = null) {  }

	/**
	 * @return ($filename is null ? string|false : bool)
	 */
	public function saveXML(?string $filename = null) {  }

}

/**
 * @template-covariant TKey
 * @template-covariant TValue
 * @extends Iterator<TKey, TValue>
 */
interface SeekableIterator extends Iterator
{

}

/**
 * @template TKey of array-key
 * @template TValue
 * @implements SeekableIterator<TKey, TValue>
 * @implements ArrayAccess<TKey, TValue>
 */
class ArrayIterator implements SeekableIterator, ArrayAccess, Countable
{

	/**
	 * @param array<TKey, TValue> $array
	 * @param int $flags
	 */
	public function __construct($array = array(), $flags = 0) { }

	/**
	 * @param TValue $value
	 * @return void
	 */
	public function append($value) { }

	/**
	 * @return array<TKey, TValue>
	 */
	public function getArrayCopy() { }

	/**
	 * @param callable(TValue, TValue): int $cmp_function
	 * @return void
	 */
	public function uasort($cmp_function) { }

	/**
	 * @param callable(TKey, TKey): int $cmp_function
	 * @return void
	 */
	public function uksort($cmp_function) { }

}

/**
 * @template T of \RecursiveIterator|\IteratorAggregate
 * @mixin T
 */
class RecursiveIteratorIterator
{

	/**
	 * @param T $iterator
	 * @param int $mode
	 * @param int $flags
	 */
	public function __construct(
		$iterator,
		$mode = RecursiveIteratorIterator::LEAVES_ONLY,
		int $flags = 0
	)
	{

	}

}

/**
 * @template-covariant TKey
 * @template-covariant TValue
 *
 * @template-extends Iterator<TKey, TValue>
 */
interface OuterIterator extends Iterator {
    /**
     * @return Iterator<TKey, TValue>
     */
    public function getInnerIterator();
}

/**
 * @template-covariant TKey
 * @template-covariant TValue
 * @template TIterator as Traversable<TKey, TValue>
 *
 * @template-implements OuterIterator<TKey, TValue>
 *
 * @mixin TIterator
 */
class IteratorIterator implements OuterIterator {
    /**
     * @param TIterator $iterator
     */
    public function __construct(Traversable $iterator) {}
}

/**
 * @template-covariant TKey
 * @template-covariant TValue
 * @template TIterator as Traversable<TKey, TValue>
 *
 * @template-extends IteratorIterator<TKey, TValue, TIterator>
 */
class FilterIterator extends IteratorIterator
{

}

/**
 * @template-covariant TKey
 * @template-covariant TValue
 * @template TIterator as Traversable<TKey, TValue>
 *
 * @extends FilterIterator<TKey, TValue, TIterator>
 */
class CallbackFilterIterator extends FilterIterator
{

}

/**
 * @template-covariant TKey
 * @template-covariant TValue
 * @template TIterator as Traversable<TKey, TValue>
 *
 * @extends CallbackFilterIterator<TKey, TValue, TIterator>
 * @implements RecursiveIterator<TKey, TValue>
 */
class RecursiveCallbackFilterIterator extends CallbackFilterIterator implements RecursiveIterator
{
    /**
     * @return bool
     */
    public function hasChildren() {}

    /**
     * @return RecursiveCallbackFilterIterator<TKey, TValue, TIterator>
     */
    public function getChildren() {}

}

/**
 * @template TKey of array-key
 * @template TValue
 *
 * @template-implements RecursiveIterator<TKey, TValue>
 * @template-extends ArrayIterator<TKey, TValue>
 */
class RecursiveArrayIterator extends ArrayIterator implements RecursiveIterator {

    /**
     * @return RecursiveArrayIterator<TKey, TValue>
     */
    public function getChildren() {}

    /**
     * @return bool
     */
    public function hasChildren() {}

    /**
     * @return TValue
     */
    public function current() {}

    /**
     * @return TKey
     */
    public function key() {}

    /**
     * @param callable(TKey, TKey): int $cmp_function
     * @return void
     */
    public function uksort($cmp_function) { }
}

/**
 * @template TKey
 * @template TValue
 * @template TIterator as Iterator<TKey, TValue>
 *
 * @template-extends IteratorIterator<TKey, TValue, TIterator>
 */
class AppendIterator extends IteratorIterator {

    /**
     * @param TIterator $iterator
     * @return void
     */
    public function append(Iterator $iterator) {}

    /**
     * @return ArrayIterator<array-key, TValue>
     */
    public function getArrayIterator() {}

}

/**
 * @template-covariant TKey
 * @template-covariant TValue
 * @template TIterator as Iterator<TKey, TValue>
 *
 * @template-extends IteratorIterator<TKey, TValue, TIterator>
 */
class NoRewindIterator extends IteratorIterator {
    /**
     * @param TIterator $iterator
     */
    public function __construct(Iterator $iterator) {}

    /**
     * @return TValue
     */
    public function current() {}

    /**
     * @return TKey
     */
    public function key() {}
}

/**
 * @template-covariant TKey
 * @template-covariant TValue
 * @template TIterator as Iterator<TKey, TValue>
 *
 * @template-implements OuterIterator<TKey, TValue>
 * @template-extends IteratorIterator<TKey, TValue, TIterator>
 */
class LimitIterator extends IteratorIterator implements OuterIterator {
    /**
     * @param TIterator $iterator
     */
    public function __construct(Iterator $iterator, int $offset = 0, int $count = -1) {}

    /**
     * @return TValue
     */
    public function current() {}

    /**
     * @return TKey
     */
    public function key() {}
}

/**
 * @template-covariant TKey
 * @template-covariant TValue
 * @template TIterator as Iterator<TKey, TValue>
 *
 * @template-extends IteratorIterator<TKey, TValue, TIterator>
 */
class InfiniteIterator extends IteratorIterator {
    /**
     * @param TIterator $iterator
     */
    public function __construct(Iterator $iterator) {}

    /**
     * @return TValue
     */
    public function current() {}

    /**
     * @return TKey
     */
    public function key() {}
}

/**
 * @template TKey
 * @template TValue
 * @template TIterator as Iterator<TKey, TValue>
 *
 * @template-implements OuterIterator<TKey, TValue>
 * @template-implements ArrayAccess<TKey, TValue>
 *
 * @template-extends IteratorIterator<TKey, TValue, TIterator>
 */
class CachingIterator extends IteratorIterator implements OuterIterator, ArrayAccess, Countable {
    const CALL_TOSTRING = 1 ;
    const CATCH_GET_CHILD = 16 ;
    const TOSTRING_USE_KEY = 2 ;
    const TOSTRING_USE_CURRENT = 4 ;
    const TOSTRING_USE_INNER = 8 ;
    const FULL_CACHE = 256 ;

    /**
     * @param TIterator $iterator
     * @param int-mask-of<self::*> $flags
     */
    public function __construct(Iterator $iterator, int $flags = self::CALL_TOSTRING) {}

    /**
     * @return TValue
     */
    public function current() {}

    /**
     * @return TKey
     */
    public function key() {}

    /**
     * @return array<array-key, TValue>
     */
    public function getCache() {}
}

/**
 * @template TKey
 * @template TValue
 * @template TIterator of Traversable<TKey, TValue>
 *
 * @template-extends FilterIterator<TKey, TValue, TIterator>
 */
class RegexIterator extends FilterIterator {
    const MATCH = 0 ;
    const GET_MATCH = 1 ;
    const ALL_MATCHES = 2 ;
    const SPLIT = 3 ;
    const REPLACE = 4 ;
    const USE_KEY = 1 ;

    /**
     * @param Iterator<TKey, TValue> $iterator
     * @param self::MATCH|self::GET_MATCH|self::ALL_MATCHES|self::SPLIT|self::REPLACE $mode
     */
    public function __construct(Iterator $iterator, string $regex, int $mode = self::MATCH, int $flags = 0, int $preg_flags = 0) {}

    /**
     * @return TValue
     */
    public function current() {}

    /**
     * @return TKey
     */
    public function key() {}
}

/**
 * @template-implements Iterator<never, never>
 */
class EmptyIterator implements Iterator {
    /**
     * @return never
     */
    public function current() {}

    /**
     * @return never
     */
    public function key() {}

    /**
     * @return false
     */
    public function valid() {}
}
<?php

class ReflectionProperty
{
    /**
     * @return array<ReflectionAttribute<object>>
     */
    public function getAttributes(?string $name = null, int $flags = 0)
    {
    }
}
<?php

/**
 * @template-covariant T of object
 */
class ReflectionClass
{

	/**
	 * @var class-string<T>
	 */
	public $name;

	/**
	 * @param T|class-string<T> $argument
	 * @throws ReflectionException
	 */
	public function __construct($argument) {}

	/**
	 * @return class-string<T>
	 */
	public function getName() : string;

	/**
	 * @param mixed ...$args
	 *
	 * @return T
	 */
	public function newInstance(...$args) {}

	/**
	 * @param array<int|string, mixed> $args
	 *
	 * @return T
	 */
	public function newInstanceArgs(array $args) {}

	/**
	 * @return T
	 */
	public function newInstanceWithoutConstructor();

    /**
     * @return array<ReflectionAttribute<object>>
     */
    public function getAttributes(?string $name = null, int $flags = 0)
    {
    }
}
<?php

class ReflectionClassConstant
{
    /**
     * @return array<ReflectionAttribute<object>>
     */
    public function getAttributes(?string $name = null, int $flags = 0)
    {
    }
}
<?php

/**
 * @template-covariant T of object
 */
class ReflectionAttribute
{
    /**
     * @return class-string<T>
     */
    public function getName() : string
    {
    }

    /**
     * @return T
     */
    public function newInstance() : object
    {
    }
}
<?php

class ReflectionParameter
{
    /**
     * @return array<ReflectionAttribute<object>>
     */
    public function getAttributes(?string $name = null, int $flags = 0)
    {
    }
}
<?php

/**
 * @implements Traversable<array<int|string, mixed>>
 * @implements IteratorAggregate<array<int|string, mixed>>
 * @link https://php.net/manual/en/class.pdostatement.php
 */
class PDOStatement implements Traversable, IteratorAggregate
{
    /**
     * @template T of object
     * @param class-string<T> $class
     * @param array<mixed> $ctorArgs
     * @return false|T
     */
    public function fetchObject($class = \stdClass::class, array $ctorArgs = array()) {}

    /**
     * @return array{name: string, table?: string, native_type?: string, len: int, flags: array<int, string>, precision: int<0, max>, pdo_type: PDO::PARAM_* }|false
     */
    public function getColumnMeta(int $column) {}
}
<?php

/**
 * @template TIn of mixed
 * @template TReturn of mixed
 *
 * @param array<TIn> $one
 * @param callable(TReturn, TIn): TReturn $two
 * @param TReturn $three
 *
 * @return TReturn
 */
function array_reduce(
	array $one,
	callable $two,
	$three = null
) {}

/**
 * @template TKey as (int|string)
 * @template T
 * @template TArray as array<TKey,T>
 *
 * @param TArray $array
 * @param callable(T,T):int $callback
 * @param-out (TArray is non-empty-array ? non-empty-array<TKey,T> : array<TKey,T>) $array
 */
function uasort(array &$array, callable $callback): bool
{}

/**
 * @template T
 * @template TArray as array<T>
 *
 * @param TArray $array
 * @param callable(T,T):int $callback
 * @param-out (TArray is non-empty-array ? non-empty-list<T> : list<T>) $array
 */
function usort(array &$array, callable $callback): bool
{}

/**
 * @template TKey as (int|string)
 * @template T
 * @template TArray as array<TKey,T>
 *
 * @param TArray $array
 * @param callable(TKey,TKey):int $callback
 * @param-out (TArray is non-empty-array ? non-empty-array<TKey,T> : array<TKey,T>) $array
 */
function uksort(array &$array, callable $callback): bool
{
}

/**
 * @template T of mixed
 *
 * @param array<T> $one
 * @param array<T> $two
 * @param callable(T, T): int<-1, 1> $three
 */
function array_udiff(
    array $one,
    array $two,
    callable $three
): int {}

/**
 * @param array<array-key, mixed> $value
 * @return ($value is __always-list ? true : false)
 */
function array_is_list(array $value): bool {}
<?php

/**
 * @param ($allow_string is false ? object : object|string) $object_or_class
 * @param string $class
 * @param bool $allow_string
 * @return ($allow_string is false ? ($object_or_class is object ? bool : false) : bool)
 */
function is_subclass_of($object_or_class, string $class, $allow_string = true): bool{}

/**
 * @param ($allow_string is false ? object : object|string) $object_or_class
 * @param string $class
 * @param bool $allow_string
 * @return ($allow_string is false ? ($object_or_class is object ? bool : false) : bool)
 */
function is_a($object_or_class, string $class, $allow_string = false): bool{}

/**
 * @param mixed $var
 * @param bool $return
 * @return ($return is true ? string : null)
 */
function var_export($var, bool $return = false) {}

/**
 * @param mixed $var
 * @return ($return is true ? string : bool)
 */
function highlight_file($var, bool $return = false) {}

/**
 * @param mixed $var
 * @return ($return is true ? string : bool)
 */
function show_source($var, bool $return = false) {}

/**
 * @param mixed $var
 * @return ($return is true ? string : bool)
 */
function highlight_string($var, bool $return = false) {}

/**
 * @param mixed $var
 * @param bool $return
 * @return ($return is true ? string : true)
 */
function print_r($var, bool $return = false) {}

/**
 * @return ($string is non-empty-string ? non-empty-string : string)
 */
function sodium_bin2base64(string $string, int $id): string {}

/**
 * @return ($string is non-empty-string ? non-empty-string : string)
 */
function sodium_bin2hex(string $string): string {}

/**
 * @return ($string is non-empty-string ? non-empty-string : string)
 */
function base64_encode(string $string) : string {}

/**
 * @return ($string is non-empty-string ? non-empty-string : string)
 */
function bin2hex(string $string): string {}

/**
 * @param array<mixed> $result
 * @param-out array<int|string, array|string> $result
 */
function parse_str(string $string, array &$result): void {}

/**
 * @param array<mixed> $result
 * @param-out array<string, array|string> $result
 */
function mb_parse_str(string $string, array &$result): bool {}

/** @param-out float $percent */
function similar_text(string $string1, string $string2, float &$percent = null) : int {}

/**
 * @param mixed $output
 * @param mixed $result_code
 *
 * @param-out list<string> $output
 * @param-out int $result_code
 *
 * @return string|false
 */
function exec(string $command, &$output, &$result_code) {}

/**
 * @param mixed $result_code
 * @param-out int $result_code
 *
 * @return string|false
 */
function system(string $command, &$result_code) {}

/**
 * @param mixed $result_code
 * @param-out int $result_code
 */
function passthru(string $command, &$result_code): ?bool {}


/**
 * @template T
 * @template TArray as array<T>
 *
 * @param TArray $array
 * @param-out (TArray is non-empty-array ? non-empty-list<T> : list<T>) $array
 */
function shuffle(array &$array): bool
{
}

/**
 * @template T
 * @template TArray as array<T>
 *
 * @param TArray $array
 * @param-out (TArray is non-empty-array ? non-empty-list<T> : list<T>) $array
 */
function sort(array &$array, int $flags = SORT_REGULAR): bool
{
}

/**
 * @template T
 * @template TArray as array<T>
 *
 * @param TArray $array
 * @param-out (TArray is non-empty-array ? non-empty-list<T> : list<T>) $array
 */
function rsort(array &$array, int $flags = SORT_REGULAR): bool
{
}

/**
 * @param string $string
 * @param-out null $string
 */
function sodium_memzero(string &$string): void
{
}

/**
 * @param resource $stream
 * @param mixed $vars
 * @param-out string|int|float|null $vars
 *
 * @return list<mixed>|int|false
 */
function fscanf($stream, string $format, &...$vars) {}

/**
 * @param mixed $war
 * @param mixed $vars
 * @param-out string|int|float|null $war
 * @param-out string|int|float|null $vars
 *
 * @return int|array<mixed>|null
 */
function sscanf(string $string, string $format, &$war, &...$vars) {}

/**
 * @template TFlags as int
 *
 * @param string $pattern
 * @param string $subject
 * @param mixed $matches
 * @param TFlags $flags
 * @param-out (
 *          TFlags is 1
 *          ? array<list<string>>
 *          : (TFlags is 2
 *              ? list<array<string>>
 *              : (TFlags is 256|257
 *                  ? array<list<array{string, int}>>
 *                  : (TFlags is 258
 *                      ? list<array<array{string, int}>>
 *                      : (TFlags is 512|513
 *                          ? array<list<?string>>
 *                          : (TFlags is 514
 *                              ? list<array<?string>>
 *                              : (TFlags is 770
 *                                  ? list<array<array{?string, int}>>
 *                                  : array
 *                              )
 *                          )
 *                      )
 *                  )
 *              )
 *          )
 *        ) $matches
 * @return int|false
 */
function preg_match_all($pattern, $subject, &$matches = [], int $flags = 1, int $offset = 0) {}

/**
 * @template TFlags as int-mask<0, 256, 512>
 *
 * @param string $pattern
 * @param string $subject
 * @param mixed $matches
 * @param TFlags $flags
 * @param-out (
 *             TFlags is 256
 *             ? array<array-key, array{string, 0|positive-int}|array{'', -1}>
 *             : (TFlags is 512
 *                 ? array<array-key, string|null>
 *                 : (TFlags is 768
 *                     ? array<array-key, array{string, 0|positive-int}|array{null, -1}>
 *                     : array<array-key, string>
 *                     )
 *                 )
 *             ) $matches
 * @return 1|0|false
 */
function preg_match($pattern, $subject, &$matches = [], int $flags = 0, int $offset = 0) {}

/**
 * @param string|array<mixed> $pattern
 * @param callable(array<int|string, string>):string $callback
 * @param string|array<mixed> $subject
 * @param int $count
 * @param-out 0|positive-int $count
 * @return ($subject is array ? list<string>|null : string|null)
 */
function preg_replace_callback($pattern, $callback, $subject, int $limit = -1, &$count = null, int $flags = 0) {}

/**
 * @param string|array<mixed> $pattern
 * @param string|array<mixed> $replacement
 * @param string|array<mixed> $subject
 * @param int $count
 * @param-out 0|positive-int $count
 * @return ($subject is array ? list<string>|null : string|null)
 */
function preg_replace($pattern, $replacement, $subject, int $limit = -1, &$count = null) {}

/**
 * @param string|array<mixed> $pattern
 * @param string|array<mixed> $replacement
 * @param string|array<mixed> $subject
 * @param int $count
 * @param-out 0|positive-int $count
 * @return ($subject is array ? list<string> : string|null)
 */
function preg_filter($pattern, $replacement, $subject, int $limit = -1, &$count = null) {}

/**
 * @param array<mixed>|string $search
 * @param array<mixed>|string $replace
 * @param array<mixed>|string $subject
 * @param-out int $count
 * @return list<string>|string
 */
function str_replace($search, $replace, $subject, int &$count = null) {}

/**
 * @param array<mixed>|string $search
 * @param array<mixed>|string $replace
 * @param array<mixed>|string $subject
 * @param-out int $count
 * @return list<string>|string
 */
function str_ireplace($search, $replace, $subject, int &$count = null) {}

/**
 * @template TRead of null|array<array-key, resource>
 * @template TWrite of null|array<array-key, resource>
 * @template TExcept of null|array<array-key, resource>
 * @param TRead $read
 * @param TWrite $write
 * @param TExcept $except
 * @return false|0|positive-int
 * @param-out (TRead is null ? null : array<array-key, resource>) $read
 * @param-out (TWrite is null ? null : array<array-key, resource>) $write
 * @param-out (TExcept is null ? null : array<array-key, resource>) $except
 */
function stream_select(?array &$read, ?array &$write, ?array &$except, ?int $seconds, ?int $microseconds = null) {}

/**
 * @param resource $stream
 * @param-out 0|1 $would_block
 */
function flock($stream, int $operation, mixed &$would_block = null): bool {}

/**
 * @param-out int $error_code
 * @param-out string $error_message
 * @return resource|false
 */
function fsockopen(string $hostname, int $port = -1, int &$error_code = null, string &$error_message = null, ?float $timeout = null) {}

/**
 * @param-out string $filename
 * @param-out int $line
 */
function headers_sent(string &$filename = null, int &$line = null): bool {}

/**
 * @param-out callable-string $callable_name
 * @return ($value is callable ? true : false)
 */
function is_callable(mixed $value, bool $syntax_only = false, string &$callable_name = null): bool {}
<?php

/**
 * @template TObject of object
 * @template TData
 *
 * @template-implements Iterator<int, TObject>
 * @template-implements ArrayAccess<TObject, TData>
 */
class SplObjectStorage implements Countable, Iterator, Serializable, ArrayAccess
{

    /**
     * @param \SplObjectStorage<TObject, TData> $storage
     */
    public function addAll(SplObjectStorage $storage): void { }

    /**
     * @param TObject $object
     * @param TData $data
     */
    public function attach(object $object, $data = null): void { }

    /**
     * @param TObject $object
     */
    public function contains(object $object): bool { }

    /**
     * @param TObject $object
     */
    public function detach(object $object): void { }

    /**
     * @param TObject $object
     */
    public function getHash(object $object): string { }

    /**
     * @return TData
     */
    public function getInfo() { }

    /**
     * @param \SplObjectStorage<object, mixed> $storage
     */
    public function removeAll(SplObjectStorage $storage): void { }

    /**
     * @param \SplObjectStorage<object, mixed> $storage
     */
    public function removeAllExcept(SplObjectStorage $storage): void { }

    /**
     * @param TData $data
     */
    public function setInfo($data): void { }

    /**
     * @param TObject $offset
     * @return TData
     */
    public function offsetGet($offset);

}
<?php

if (\PHP_VERSION_ID < 80000 && !class_exists('Attribute', false)) {
	#[Attribute(Attribute::TARGET_CLASS)]
	class Attribute
	{

		/** @var int */
		public $flags;

		/**
		 * Marks that attribute declaration is allowed only in classes.
		 */
		const TARGET_CLASS = 1;

		/**
		 * Marks that attribute declaration is allowed only in functions.
		 */
		const TARGET_FUNCTION = 1 << 1;

		/**
		 * Marks that attribute declaration is allowed only in class methods.
		 */
		const TARGET_METHOD = 1 << 2;

		/**
		 * Marks that attribute declaration is allowed only in class properties.
		 */
		const TARGET_PROPERTY = 1 << 3;

		/**
		 * Marks that attribute declaration is allowed only in class constants.
		 */
		const TARGET_CLASS_CONSTANT = 1 << 4;

		/**
		 * Marks that attribute declaration is allowed only in function or method parameters.
		 */
		const TARGET_PARAMETER = 1 << 5;

		/**
		 * Marks that attribute declaration is allowed anywhere.
		 */
		const TARGET_ALL = (1 << 6) - 1;

		/**
		 * Notes that an attribute declaration in the same place is
		 * allowed multiple times.
		 */
		const IS_REPEATABLE = 1 << 6;

		/**
		 * @param int $flags A value in the form of a bitmask indicating the places
		 * where attributes can be defined.
		 */
		public function __construct($flags = self::TARGET_ALL)
		{
			$this->flags = $flags;
		}

	}
}

if (\PHP_VERSION_ID < 80100 && !class_exists('ReturnTypeWillChange', false)) {
	#[Attribute(Attribute::TARGET_METHOD)]
	final class ReturnTypeWillChange
	{
	}
}

if (\PHP_VERSION_ID < 80200 && !class_exists('AllowDynamicProperties', false)) {
	#[Attribute(Attribute::TARGET_CLASS)]
	final class AllowDynamicProperties
	{
	}
}

if (\PHP_VERSION_ID < 80200 && !class_exists('SensitiveParameter', false)) {
	#[Attribute(Attribute::TARGET_PARAMETER)]
	final class SensitiveParameter
	{
	}
}
<?php

if (\PHP_VERSION_ID < 80100) {
	if (class_exists('ReflectionIntersectionType', false)) {
		return;
	}

	class ReflectionIntersectionType extends ReflectionType
	{

		/** @return ReflectionType[] */
		public function getTypes()
		{
			return [];
		}

	}
}
<?php

if (\PHP_VERSION_ID < 80000) {
	if (class_exists('ReflectionAttribute', false)) {
		return;
	}

	class ReflectionAttribute
	{

		public const IS_INSTANCEOF = 2;

		public function getName(): string
		{
		}

		public function getTarget(): int
		{
		}

		public function isRepeated(): bool
		{
		}

		public function getArguments(): array
		{
		}

		public function newInstance(): object
		{
		}

		private function __clone()
		{
		}

		private function __construct()
		{
		}
	}
}
<?php

if (\PHP_VERSION_ID < 80100) {
	if (class_exists('ReflectionEnumUnitCase', false)) {
		return;
	}

	class ReflectionEnumUnitCase extends ReflectionClassConstant
	{
		public function __construct(object|string $class, string $constant)
		{
		}

		public function getValue(): UnitEnum
		{
		}

		/**
		 * @return ReflectionEnum
		 */
		public function getEnum(): ReflectionEnum
		{
		}
	}
}
<?php

if (\PHP_VERSION_ID < 80100) {
	if (interface_exists('BackedEnum', false)) {
		return;
	}

	interface BackedEnum extends UnitEnum
	{
		public static function from(int|string $value): static;

		public static function tryFrom(int|string $value): ?static;
	}
}
<?php

if (\PHP_VERSION_ID < 80100) {
	if (class_exists('ReflectionEnum', false)) {
		return;
	}

	class ReflectionEnum extends ReflectionClass
	{
		public function __construct(object|string $objectOrClass) {}

		public function hasCase(string $name): bool
		{
		}

		public function getCases(): array
		{
		}

		public function getCase(string $name): ReflectionEnumUnitCase
		{
		}

		public function isBacked(): bool
		{
		}

		public function getBackingType(): ?ReflectionType
		{
		}
	}
}
<?php

if (\PHP_VERSION_ID < 80100) {
	if (interface_exists('UnitEnum', false)) {
		return;
	}

	interface UnitEnum
	{
		/**
		 * @return static[]
		 */
		public static function cases(): array;
	}
}
<?php

if (\PHP_VERSION_ID < 80100) {
	if (class_exists('ReflectionEnumBackedCase', false)) {
		return;
	}

	class ReflectionEnumBackedCase extends ReflectionEnumUnitCase
	{
		public function getBackingValue(): int|string
		{
		}
	}
}
<?php

if (\PHP_VERSION_ID < 80000) {
	if (class_exists('ReflectionUnionType', false)) {
		return;
	}

	class ReflectionUnionType extends ReflectionType
	{

		/** @return ReflectionType[] */
		public function getTypes()
		{
			return [];
		}

	}
}
<?php

interface Throwable
{
	/**
	 * @return string
	 * @throws void
	 */
	public function getMessage();

	/**
	 * @return mixed
	 * @throws void
	 */
	public function getCode();

	/**
	 * @return string
	 * @throws void
	 */
	public function getFile();

	/**
	 * @return int
	 * @throws void
	 */
	public function getLine();

	/**
	 * @return list<array{function:string,line?:int,file?:string,class?:class-string,type?:'::'|'->',args?:mixed[],object?:object}>
	 * @throws void
	 */
	public function getTrace();

	/**
	 * @return string
	 * @throws void
	 */
	public function getTraceAsString();

	/**
	 * @return null|Throwable
	 * @throws void
	 */
	public function getPrevious();

	/**
	 * @return string
	 */
	public function __toString();
}

class Exception implements Throwable
{

	/**
	 * @return string
	 * @throws void
	 */
	final public function getMessage(): string {}

	/**
	 * @return mixed
	 * @throws void
	 */
	final public function getCode() {}

	/**
	 * @return string
	 * @throws void
	 */
	final public function getFile(): string {}

	/**
	 * @return int
	 * @throws void
	 */
	final public function getLine(): int {}

	/**
	 * @return list<array{function:string,line?:int,file?:string,class?:class-string,type?:'::'|'->',args?:mixed[],object?:object}>
	 * @throws void
	 */
	final public function getTrace(): array {}

	/**
	 * @return null|Throwable
	 * @throws void
	 */
	final public function getPrevious(): ?Throwable {}

	/**
	 * @return string
	 * @throws void
	 */
	final public function getTraceAsString(): string {}

}

class Error implements Throwable
{

	/**
	 * @return string
	 * @throws void
	 */
	final public function getMessage(): string {}

	/**
	 * @return mixed
	 * @throws void
	 */
	final public function getCode() {}

	/**
	 * @return string
	 * @throws void
	 */
	final public function getFile(): string {}

	/**
	 * @return int
	 * @throws void
	 */
	final public function getLine(): int {}

	/**
	 * @return list<array{function:string,line?:int,file?:string,class?:class-string,type?:'::'|'->',args?:mixed[],object?:object}>
	 * @throws void
	 */
	final public function getTrace(): array {}

	/**
	 * @return null|Throwable
	 * @throws void
	 */
	final public function getPrevious(): ?Throwable {}

	/**
	 * @return string
	 * @throws void
	 */
	final public function getTraceAsString(): string {}

}
<?php

/**
 * @template-covariant TDate of DateTimeInterface
 * @template-covariant TEnd of ?DateTimeInterface
 * @template-covariant TRecurrences of ?int
 * @implements \IteratorAggregate<int, TDate>
 * @implements \Traversable<int, TDate>
 */
class DatePeriod implements \IteratorAggregate, \Traversable
{

	/**
	 * @return TEnd
	 */
	public function getEndDate()
	{

	}

	/**
	 * @return TRecurrences
	 */
	public function getRecurrences()
	{

	}

	/**
	 * @return TDate
	 */
	public function getStartDate(): DateTimeInterface
	{

	}
}
<?php

/**
 * @return ($value is string ? true : false)
 */
function is_string(mixed $value): bool
{

}

/**
 * @return ($value is float ? true : false)
 */
function is_float(mixed $value): bool
{

}

/**
 * @return ($value is float ? true : false)
 */
function is_double(mixed $value): bool
{

}

/**
 * @return ($value is float ? true : false)
 */
function is_real(mixed $value): bool
{

}

/**
 * @return ($value is float|int|numeric-string ? true : false)
 */
function is_numeric(mixed $value): bool
{

}

/**
 * @return ($value is null ? true : false)
 */
function is_null(mixed $value): bool
{

}

/**
 * @return ($value is bool ? true : false)
 */
function is_bool(mixed $value): bool
{

}

/**
 * @return ($value is array<array-key, mixed>|\Countable ? true : false)
 */
function is_countable(mixed $value): bool
{

}

/**
 * @return ($value is object ? true : false)
 */
function is_object(mixed $value): bool
{

}

/**
 * @return ($value is scalar ? true : false)
 */
function is_scalar(mixed $value): bool
{

}

/**
 * @return ($value is int ? true : false)
 */
function is_int(mixed $value): bool
{

}

/**
 * @return ($value is int ? true : false)
 */
function is_integer(mixed $value): bool
{

}

/**
 * @return ($value is int ? true : false)
 */
function is_long(mixed $value): bool
{

}

/**
 * @phpstan-assert-if-true resource $value
 * @return bool
 */
function is_resource(mixed $value): bool
{

}

/**
 * @return ($value is array ? true : false)
 */
function is_array(mixed $value): bool
{

}

/**
 * @return ($value is iterable<mixed, mixed> ? true : false)
 */
function is_iterable(mixed $value): bool
{

}
<?php

class ZipArchive
{

    /**
     * @var int
     */
    public $status;

    /**
     * @var int
     */
    public $statusSys;

    /**
     * @var int
     */
    public $numFiles;

    /**
     * @var string
     */
    public $filename;

    /**
     * @var string
     */
    public $comment;

}
<?php

class mysqli_stmt
{

    /**
     * @var int<-1,max>|numeric-string
     */
    public $affected_rows;

    /**
     * @var int
     */
    public $errno;

    /**
     * @var list<array{errno: int, sqlstate: string, error: string}>
     */
    public $error_list;

    /**
     * @var string
     */
    public $error;

    /**
     * @var 0|positive-int
     */
    public $field_count;

    /**
     * @var int|string
     */
    public $insert_id;

    /**
     * @var int<0,max>|numeric-string
     */
    public $num_rows;

    /**
     * @var 0|positive-int
     */
    public $param_count;

    /**
     * @var non-empty-string
     */
    public $sqlstate;

}
<?php

interface Countable
{
    /**
     * @return 0|positive-int
     */
    public function count(): int;
}
<?php

interface Countable
{
    /**
     * @return int
     */
    public function count(): int;
}
<?php

class DOMDocument
{

	/** @var DOMDocumentType|null */
	public $doctype;

	/** @var DOMElement|null */
	public $documentElement;

	/** @var null */
	public $ownerDocument;

	/**
	 * @param string $name
	 * @return DOMNodeList<DOMElement>
	 */
	public function getElementsByTagName ($name) {}

	/**
	 * @param string $namespaceURI
	 * @param string $localName
	 * @return DOMNodeList<DOMElement>
	 */
	public function getElementsByTagNameNS ($namespaceURI, $localName) {}

}

class DOMNode
{

}

class DOMElement extends DOMNode
{

	/** @var DOMDocument */
	public $ownerDocument;

	/**
	 * @param string $name
	 * @return DOMNodeList<DOMElement>
	 */
	public function getElementsByTagName ($name) {}

	/**
	 * @param string $namespaceURI
	 * @param string $localName
	 * @return DOMNodeList<DOMElement>
	 */
	public function getElementsByTagNameNS ($namespaceURI, $localName) {}

}

/**
 * @template-covariant TNode as DOMNode
 * @implements Traversable<int, TNode>
 * @implements IteratorAggregate<int, TNode>
 */
class DOMNodeList implements Traversable, IteratorAggregate, Countable
{

	/**
	 * @param int $index
	 * @return TNode|null
	 */
	public function item ($index) {}

}

class DOMXPath
{

    /**
     * @param string $expression
     * @param DOMNode|null $contextNode
     * @param boolean $registerNodeNS
     * @return DOMNodeList<DOMNode>|false
     */
    public function query($expression, $contextNode, $registerNodeNS) {}

}

class DOMAttr
{

	/** @var DOMDocument */
	public $ownerDocument;

}

class DOMCharacterData
{

	/** @var DOMDocument */
	public $ownerDocument;

}

class DOMDocumentType
{

	/** @var DOMDocument */
	public $ownerDocument;

}

class DOMEntity
{

	/** @var DOMDocument */
	public $ownerDocument;

}

class DOMNotation
{

	/** @var DOMDocument */
	public $ownerDocument;

}

class DOMProcessingInstruction
{

	/** @var DOMDocument */
	public $ownerDocument;

	/**
	 * @var string
	 */
	public $target;

	/**
	 * @var string
	 */
	public $data;

}

/**
 * @property-read int $length
 */
class DOMNamedNodeMap
{

}

class DOMText
{

	/** @var string */
	public $wholeText;

}
<?php

declare(strict_types=1);

/**
 * @template TValue
 * @implements \Iterator<int, TValue>
 * @implements \ArrayAccess<int, TValue>
 */
class SplDoublyLinkedList implements \Iterator, \ArrayAccess {
	/**
	 * @param int $index
	 * @param TValue $newval
	 * @return void
	 */
	public function add($index, $newval) {}

	/**
	 * @return TValue
	 */
	public function pop () {}

	/**
	 * @return TValue
	 */
	public function shift () {}

	/**
	 * @param TValue $value
	 * @return void
	 */
	public function push ($value) {}

	/**
	 * @param TValue $value
	 * @return void
	 */
	public function unshift ($value) {}

	/**
	 * @return TValue
	 */
	public function top () {}

	/**
	 * @return TValue
	 */
	public function bottom () {}

	/**
	 * @param int $offset
	 * @return TValue
	 */
	public function offsetGet ($offset) {}
}

/**
 * @template TValue
 * @extends \SplDoublyLinkedList<TValue>
 */
class SplQueue extends \SplDoublyLinkedList {
	/**
	 * @param TValue $value
	 * @return void
	 */
	public function enqueue ($value) {}

	/**
	 * @return TValue
	 */
	public function dequeue () {}
}

/**
 * @template TPriority
 * @template TValue
 *
 * @implements \Iterator<int, TValue>
 */
class SplPriorityQueue implements \Iterator {
	/**
	 * @param TPriority $priority1
	 * @param TPriority $priority2
	 * @return int
	 */
	public function compare ($priority1, $priority2) {}

	/**
	 * @param TValue $value
	 * @param TPriority $priority
	 * @return true
	 */
	public function insert ($value, $priority) {}

	/**
	 * @return TPriority|TValue|array{priority: TPriority, data: TValue}
	 */
	public function top () {}

	/**
	 * @return TPriority|TValue|array{priority: TPriority, data: TValue}
	 */
	public function extract () {}

	/**
	 * @return TPriority|TValue|array{priority: TPriority, data: TValue}
	 */
	public function current () {}
}
<?php

/**
 * @param resource                               $connection
 * @param \DB2_AUTOCOMMIT_OFF|\DB2_AUTOCOMMIT_ON $value
 *
 * @return ($value is null ? \DB2_AUTOCOMMIT_OFF|\DB2_AUTOCOMMIT_ON : bool)
 */
function db2_autocommit($connection, int $value = null) {}
<?php

/**
 * @template TKey
 * @template TValue
 */
interface ArrayAccess
{

	/**
	 * @param TKey $offset
	 * @return bool
	 */
	public function offsetExists($offset);

	/**
	 * @param TKey $offset
	 * @return TValue|null
	 */
	public function offsetGet($offset);

	/**
	 * @param TKey|null $offset
	 * @param TValue $value
	 * @return void
	 */
	public function offsetSet($offset, $value);

	/**
	 * @param TKey $offset
	 * @return void
	 */
	public function offsetUnset($offset);

}

/**
 * @template TKey of array-key
 * @template TValue
 * @implements IteratorAggregate<TKey, TValue>
 * @implements ArrayAccess<TKey, TValue>
 */
class ArrayObject implements IteratorAggregate, ArrayAccess
{

	/**
	 * @param array<TKey, TValue>|object $input
	 * @param int $flags
	 * @param class-string $iterator_class
	 */
	public function __construct($input = null, $flags = 0, $iterator_class = "ArrayIterator") { }

	/**
	 * @param TValue $value
	 * @return void
	 */
	public function append($value) { }

	/**
	 * @return array<TKey, TValue>
	 */
	public function getArrayCopy() { }

	/**
	 * @param callable(TValue, TValue): int $cmp_function
	 * @return void
	 */
	public function uasort($cmp_function) { }

	/**
	 * @param callable(TKey, TKey): int $cmp_function
	 * @return void
	 */
	public function uksort($cmp_function) { }

	/**
	 * @return ArrayIterator<TKey, TValue>
	 */
	public function getIterator() { }

	/**
	 * @param class-string $iterator_class
	 * @return void
	 */
	public function setIteratorClass($iterator_class) { }

}

/**
 * @template TValue
 * @implements Iterator<int, TValue|null>
 * @implements IteratorAggregate<int, TValue|null>
 * @implements ArrayAccess<int, TValue|null>
 */
class SplFixedArray implements Iterator, IteratorAggregate, ArrayAccess, Countable
{
	/**
	 * @template TInput
	 * @param array<int, TInput> $array
	 * @return SplFixedArray<TInput>
	 */
	public static function fromArray(array $array, bool $save_indexes = true): SplFixedArray { }

	/**
	 * @return array<int, TValue|null>
	 */
	public function toArray(): array { }
}
=�2��P�jbg�"?�UGBMB

Zerion Mini Shell 1.0